From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1F8E6211AE8C3 for ; Wed, 9 Jan 2019 07:03:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2019 07:03:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,457,1539673200"; d="scan'208";a="133049085" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 09 Jan 2019 07:03:07 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 9 Jan 2019 07:03:04 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.63]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.196]) with mapi id 14.03.0415.000; Wed, 9 Jan 2019 23:03:02 +0800 From: "Zhang, Chao B" To: "Chen, Chen A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH v2] SecurityPkg: Remove code under UserIdentification folder. Thread-Index: AQHUp+lDqpZq2VR9OkutzQkbVJX74KWnCJ5w Date: Wed, 9 Jan 2019 15:03:01 +0000 Message-ID: References: <20190109070207.10100-1-chen.a.chen@intel.com> In-Reply-To: <20190109070207.10100-1-chen.a.chen@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmJmYjI0ZjUtZjM3MS00MjEzLTllMTYtMWU0ODE1MGMxNjA5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiM0JIYk11WmNaV3E1R1VCdjd6THN1QXlnUk56aTNWS3d1VFNEZFdZMUl1R0V0d3hvQlRcL050XC9mYXdIa2lxYUhjIn0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] SecurityPkg: Remove code under UserIdentification folder. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 15:03:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgQ2hlbmNoZW46DQogICAgUGxlYXNlIHVwZGF0ZSBsaWNlbnNlIHRvIDIwMTkuIE90aGVycyBh cmUgZ29vZCB0byBtZS4NCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IENoZW4s IENoZW4gQSANClNlbnQ6IFdlZG5lc2RheSwgSmFudWFyeSA5LCAyMDE5IDM6MDIgUE0NClRvOiBl ZGsyLWRldmVsQGxpc3RzLjAxLm9yZw0KQ2M6IENoZW4sIENoZW4gQSA8Y2hlbi5hLmNoZW5AaW50 ZWwuY29tPjsgWmhhbmcsIENoYW8gQiA8Y2hhby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5kZWMgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMTIgLQ0KIFNl Y3VyaXR5UGtnL1NlY3VyaXR5UGtnLmRzYyAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgNCAt DQogLi4uL1B3ZENyZWRlbnRpYWxQcm92aWRlci5jICAgICAgICAgICAgICAgICAgICAgICAgfCAx NDY0IC0tLS0tLS0tDQogLi4uL1B3ZENyZWRlbnRpYWxQcm92aWRlci5oICAgICAgICAgICAgICAg ICAgICAgICAgfCAgMzc0IC0tDQogLi4uL1B3ZENyZWRlbnRpYWxQcm92aWRlci51bmkgICAgICAg ICAgICAgICAgICAgICAgfCAgIDIxIC0NCiAuLi4vUHdkQ3JlZGVudGlhbFByb3ZpZGVyRGF0YS5o ICAgICAgICAgICAgICAgICAgICB8ICAgMzAgLQ0KIC4uLi9Qd2RDcmVkZW50aWFsUHJvdmlkZXJE eGUuaW5mICAgICAgICAgICAgICAgICAgIHwgICA2NSAtDQogLi4uL1B3ZENyZWRlbnRpYWxQcm92 aWRlckV4dHJhLnVuaSAgICAgICAgICAgICAgICAgfCAgIDE5IC0NCiAuLi4vUHdkQ3JlZGVudGlh bFByb3ZpZGVyU3RyaW5ncy51bmkgICAgICAgICAgICAgICB8ICAgMzggLQ0KIC4uLi9Qd2RDcmVk ZW50aWFsUHJvdmlkZXJWZnIuVmZyICAgICAgICAgICAgICAgICAgIHwgICAzNCAtDQogLi4uL1Vz YkNyZWRlbnRpYWxQcm92aWRlci5jICAgICAgICAgICAgICAgICAgICAgICAgfCAxNDEwIC0tLS0t LS0tDQogLi4uL1VzYkNyZWRlbnRpYWxQcm92aWRlci5oICAgICAgICAgICAgICAgICAgICAgICAg fCAgMzYxIC0tDQogLi4uL1VzYkNyZWRlbnRpYWxQcm92aWRlci51bmkgICAgICAgICAgICAgICAg ICAgICAgfCAgIDIzIC0NCiAuLi4vVXNiQ3JlZGVudGlhbFByb3ZpZGVyRHhlLmluZiAgICAgICAg ICAgICAgICAgICB8ICA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lbnRpYWxQ cm92aWRlckd1aWQsDQotICAgICAgICAgICAgICAgICAgRUZJX1ZBUklBQkxFX05PTl9WT0xBVElM RSB8IEVGSV9WQVJJQUJMRV9CT09UU0VSVklDRV9BQ0NFU1MsDQotICAgICAgICAgICAgICAgICAg bVB3ZFRhYmxlLT5Db3VudCAqIHNpemVvZiAoUEFTU1dPUkRfSU5GTyksDQotICAgICAgICAgICAg ICAgICAgJm1Qd2RUYWJsZS0+VXNlckluZm8NCi0gICAgICAgICAgICAgICAgICApOw0KLSAgcmV0 dXJuIFN0YXR1czsNCi19DQotDQotDQotLyoqDQotICBDcmVhdGUgYSBwYXNzd29yZCB0YWJsZS4N Ci0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICBDcmVhdGUgYSBwYXNzd29yZCB0YWJsZSBz dWNjZXNzZnVsbHkuDQotICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgRmFpbGVkIHRvIGNyZWF0 ZSBhIHBhc3N3b3JkLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1Jbml0Q3JlZGVudGlhbFRhYmxl ICgNCi0gIFZPSUQNCi0gICkNCi17DQotICBFRklfU1RBVFVTICBTdGF0dXM7DQotICBVSU5UOCAg ICAgICAqVmFyOw0KLSAgVUlOVE4gICAgICAgVmFyU2l6ZTsNCi0NCi0gIC8vDQotICAvLyBHZXQg UGFzc3dvcmQgY3JlZGVudGlhbCBkYXRhIGZyb20gTlYgdmFyaWFibGUuDQotICAvLw0KLSAgVmFy U2l6ZSA9IDA7DQotICBWYXIgICAgID0gTlVMTDsNCi0gIFN0YXR1cyAgPSBnUlQtPkdldFZhcmlh YmxlICgNCi0gICAgICAgICAgICAgICAgICAgTCJQd2RDcmVkZW50aWFsIiwNCi0gICAgICAgICAg ICAgICAgICAgJmdQd2RDcmVkZW50aWFsUHJvdmlkZXJHdWlkLA0KLSAgICAgICAgICAgICAgICAg ICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAmVmFyU2l6ZSwNCi0gICAgICAgICAgICAgICAg ICAgVmFyDQotICAgICAgICAgICAgICAgICAgICk7DQotICBpZiAoU3RhdHVzID09IEVGSV9CVUZG RVJfVE9PX1NNQUxMKSB7DQotICAgIFZhciA9IEFsbG9jYXRlWmVyb1Bvb2wgKFZhclNpemUpOw0K LSAgICBpZiAoVmFyID09IE5VTEwpIHsNCi0gICAgICByZXR1cm4gRUZJX09VVF9PRl9SRVNPVVJD RVM7DQotICAgIH0NCi0gICAgU3RhdHVzID0gZ1JULT5HZXRWYXJpYWJsZSAoDQotICAgICAgICAg ICAgICAgICAgICBMIlB3ZENyZWRlbnRpYWwiLA0KLSAgICAgICAgICAgICAgICAgICAgJmdQd2RD cmVkZW50aWFsUHJvdmlkZXJHdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAg ICAgICAgICAgICAgICAgICZWYXJTaXplLA0KLSAgICAgICAgICAgICAgICAgICAgVmFyDQotICAg ICAgICAgICAgICAgICAgICApOw0KLSAgfQ0KLSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSAmJiAo U3RhdHVzICE9IEVGSV9OT1RfRk9VTkQpKSB7DQotICAgIHJldHVybiBTdGF0dXM7DQotICB9DQot DQotICAvLw0KLSAgLy8gQ3JlYXRlIHRoZSBwYXNzd29yZCBjcmVkZW50aWFsIHRhYmxlLg0KLSAg Ly8NCi0gIG1Qd2RUYWJsZSA9IEFsbG9jYXRlWmVyb1Bvb2wgKA0KLSAgICAgICAgICAgICAgICBz aXplb2YgKENSRURFTlRJQUxfVEFCTEUpIC0gc2l6ZW9mIChQQVNTV09SRF9JTkZPKSArDQotICAg ICAgICAgICAgICAgIFBBU1NXT1JEX1RBQkxFX0lOQyAqIHNpemVvZiAoUEFTU1dPUkRfSU5GTykg Kw0KLSAgICAgICAgICAgICAgICBWYXJTaXplDQotICAgICAgICAgICAgICAgICk7DQotICBpZiAo bVB3ZFRhYmxlID09IE5VTEwpIHsNCi0gICAgRnJl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Q3JlYXRlUG9wVXAgKA0KLSAgICAgIEVG SV9MSUdIVEdSQVkgfCBFRklfQkFDS0dST1VORF9CTFVFLA0KLSAgICAgICZLZXksDQotICAgICAg UXVlc3Rpb25TdHIsDQotICAgICAgTGluZVN0ciwNCi0gICAgICBQYXNzd29yZE1hc2ssDQotICAg ICAgTlVMTA0KLSAgICAgICk7DQotICAgIEZyZWVQb29sIChRdWVzdGlvblN0cik7DQotICAgIEZy ZWVQb29sIChMaW5lU3RyKTsNCi0NCi0gICAgLy8NCi0gICAgLy8gQ2hlY2sga2V5IHN0cm9rZQ0K LSAgICAvLw0KLSAgICBpZiAoS2V5LlNjYW5Db2RlID09IFNDQU5fTlVMTCkgew0KLSAgICAgIGlm IChLZXkuVW5pY29kZUNoYXIgPT0gQ0hBUl9DQVJSSUFHRV9SRVRVUk4pIHsNCi0gICAgICAgIGJy ZWFrOw0KLSAgICAgIH0gZWxzZSBpZiAoS2V5LlVuaWNvZGVDaGFyID09IENIQVJfQkFDS1NQQUNF KSB7DQotICAgICAgICBpZiAoUGFzc3dvcmRMZW4gPiAwKSB7DQotICAgICAgICAgIFBhc3N3b3Jk TGVuLS07DQotICAgICAgICB9DQotICAgICAgfSBlbHNlIGlmICgoS2V5LlVuaWNvZGVDaGFyID09 IENIQVJfTlVMTCkgfHwNCi0gICAgICAgICAgICAgICAgIChLZXkuVW5pY29kZUNoYXIgPT0gQ0hB Ul9UQUIpIHx8DQotICAgICAgICAgICAgICAgICAoS2V5LlVuaWNvZGVDaGFyID09IENIQVJfTElO RUZFRUQpKSB7DQotICAgICAgICBjb250aW51ZTsNCi0gICAgICB9IGVsc2Ugew0KLSAgICAgICAg UGFzc3dvcmRbUGFzc3dvcmRMZW5dID0gS2V5LlVuaWNvZGVDaGFyOw0KLSAgICAgICAgUGFzc3dv cmRNYXNrW1Bhc3N3b3JkTGVuXSA9IEwnKic7DQotICAgICAgICBQYXNzd29yZExlbisrOw0KLSAg ICAgICAgaWYgKFBhc3N3b3JkT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gICAgICAgKTsN Ci0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIEVGSV9OT1RfRk9VTkQ7 DQotICB9DQotDQotICAvLw0KLSAgLy8gR2V0IGVhY2ggdXNlciBpbmZvcm1hdGlvbi4NCi0gIC8v DQotDQotICBVc2VySW5mb0hhbmRsZSA9IE5VTEw7DQotICBVc2VySW5mbyAgICAgICA9IE5VTEw7 DQotICBVc2VySW5mb1NpemUgICA9IDA7DQotICB3aGlsZSAoVFJVRSkgew0KLSAgICBTdGF0dXMg PSBVc2VyTWFuYWdlci0+R2V0TmV4dEluZm8gKFVzZXJNYW5hZ2VyLCBVc2VyLCAmVXNlckluZm9I YW5kbGUpOw0KLSAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgICAgYnJlYWs7DQot ICAgIH0NCi0gICAgLy8NCi0gICAgLy8gR2V0IGluZm9ybWF0aW9uLg0KLSAgICAvLw0KLSAgICBT dGF0dXMgPSBVc2VyTWFuYWdlci0+R2V0SW5mbyAoDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyLA0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VySW5mb0hhbmRsZSwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgVXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICZV c2VySW5mb1NpemUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKFN0 YXR1cyA9PSBFRklfQlVGRkVSX1RPT19TTUFMTCkgew0KLSAgICAgIGlmIChVc2VySW5mbyAhPSBO VUxMKSB7DQotICAgICAgICBGcmVlUG9vbCAoVXNlckluZm8pOw0KLSAgICAgIH0NCi0gICAgICBV c2VySW5mbyA9IEFsbG9jYXRlWmVyb1Bvb2wgKFVzZXJJbmZvU2l6ZSk7DQotICAgICAgaWYgKFVz ZXJJbmZvID09IE5VTEwpIHsNCi0gICAgICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsN Ci0gICAgICB9DQotICAgICAgU3RhdHVzID0gVXNlck1hbmFnZXItPkdldEluZm8gKA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlcklu Zm9IYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm8sDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJlVzZXJJbmZvU2l6ZQ0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICk7DQotICAgIH0NCi0gICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkg ew0KLSAgICAgIGJyZWFrOw0KLSAgICB9DQotDQotICAgIEFTU0VSVCAoVXNlckluZm8gIT0gTlVM TCk7DQotICAgIGlmIChVc2VySW5mby0+SW5mb1R5cGUgPT0gSW5mb1R5cGUpIHsNCi0gICAgICAq SW5mbyA9IFVzZXJJbmZvOw0KLSAgICAgIHJldHVybiBFRklfU1VDQ0VTUzsNCi0gICAgfQ0KLSAg fQ0KLQ0KLSAgaWYgKFVzZXJJbmZvICE9IE5VTEwpIHsNCi0gICAgRnJlZVBvb2wgKFVzZXJJbmZv KTsNCi0gIH0NCi0gIHJldHVybiBTdGF0dXM7DQotfQ0KLQ0KLQ0KLS8qKg0KLSAgVGhpcyBmdW5j dGlvbiBwcm9jZXNzZXMgdGhlIHJlc3VsdHMgb2YgY2hhbmdlcyBpbiBjb25maWd1cmF0aW9uLg0K LQ0KLSAgQHBhcmFtICBUaGlzICAgICAgICAgICAgICAgICAgIFBvaW50cyB0byB0aGUgRUZJX0hJ SV9DT05GSUdfQUNDRVNTX1BST1RPQ09MLg0KLSAgQHBhcmFtICBBY3Rpb24gICAgICAgICAgICAg ICAgIFNwZWNpZmllcyB0aGUgdHlwZSBvZiBhY3Rpb24gdGFrZW4gYnkgdGhlIGJyb3dzZXIuDQot ICBAcGFyYW0gIFF1ZXN0aW9uSWQgICAgICAgICAgICAgQSB1bmlxdWUgdmFsdWUgd2hpY2ggaXMg c2VudCB0byB0aGUgb3JpZ2luYWwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBl eHBvcnRpbmcgZHJpdmVyIHNvIHRoYXQgaXQgY2FuIGlkZW50aWZ5IHRoZSB0eXBlDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgb2YgZGF0YSB0byBleHBlY3QuDQotICBAcGFyYW0g IFR5cGUgICAgICAgICAgICAgICAgICAgVGhlIHR5cGUgb2YgdmFsdWUgZm9yIHRoZSBxdWVzdGlv bi4NCi0gIEBwYXJhbSAgVmFsdWUgICAgICAgICAgICAgICAgICBBIHBvaW50ZXIgdG8gdGhlIGRh dGEgYmVpbmcgc2VudCB0byB0aGUgb3JpZ2luYWwNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBleHBvcnRpbmcgZHJpdmVyLg0KLSAgQHBhcmFtICBBY3Rpb25SZXF1ZXN0ICAgICAg ICAgIE9uIHJldHVybiwgcG9pbnRzIHRvIHRoZSBhY3Rpb24gcmVxdWVzdGVkIGJ5IHRoZQ0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrIGZ1bmN0aW9uLg0KLQ0KLSAg QHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgIFRoZSBjYWxsYmFjayBzdWNjZXNzZnVsbHkg aGFuZGxlZCB0aGUgYWN0aW9uLg0KLSAgQHJldHZhbCBFRklfT1VUX09GX1JFU09VUkNFUyAgIE5v dCBlbm91Z2ggc3RvcmFnZSBpcyBhdmFpbGFibGUgdG8gaG9sZCB0aGUNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB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nv bEd1aWQsDQotICAgICAgICAgICAgICAgICAgJkNhbGxiYWNrSW5mby0+Q29uZmlnQWNjZXNzLA0K LSAgICAgICAgICAgICAgICAgIE5VTEwNCi0gICAgICAgICAgICAgICAgICApOw0KLSAgQVNTRVJU X0VGSV9FUlJPUiAoU3RhdHVzKTsNCi0NCi0gIC8vDQotICAvLyBQdWJsaXNoIEhJSSBkYXRhLg0K LSAgLy8NCi0gIENhbGxiYWNrSW5mby0+SGlpSGFuZGxlID0gSGlpQWRkUGFja2FnZXMgKA0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnUHdkQ3JlZGVudGlhbFByb3ZpZGVyR3VpZCwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDYWxsYmFja0luZm8tPkRyaXZlckhhbmRs ZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQd2RDcmVkZW50aWFsUHJvdmlkZXJT dHJpbmdzLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFB3ZENyZWRlbnRpYWxQcm92 aWRlclZmckJpbiwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChDYWxsYmFja0luZm8tPkhpaUhhbmRs ZSA9PSBOVUxMKSB7DQotICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCi0gIH0NCi0g IG1DYWxsYmFja0luZm8gPSBDYWxsYmFja0luZm87DQotDQotICByZXR1cm4gU3RhdHVzOw0KLX0N Ci0NCi0NCi0vKioNCi0gIEVucm9sbCBhIHVzZXIgb24gYSBjcmVkZW50aWFsIHByb3ZpZGVyLg0K LQ0KLSAgVGhpcyBmdW5jdGlvbiBlbnJvbGxzIGEgdXNlciBvbiB0aGlzIGNyZWRlbnRpYWwgcHJv dmlkZXIuIElmIHRoZSB1c2VyIGV4aXN0cyBvbg0KLSAgdGhpcyBjcmVkZW50aWFsIHByb3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ICAgICAgICAgICAgdGhlIHByZS1PUy4NCi0gIEByZXR2YWwg RUZJX0RFVklDRV9FUlJPUiAgICAgICBUaGUgbmV3IGNyZWRlbnRpYWwgY291bGQgbm90IGJlIGNy ZWF0ZWQgYmVjYXVzZSBvZiBhIGRldmljZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGVycm9yLg0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgIFVzZXIgZG9lcyBu b3QgcmVmZXIgdG8gYSB2YWxpZCB1c2VyIHByb2ZpbGUgaGFuZGxlLg0KLQ0KLSoqLw0KLUVGSV9T VEFUVVMNCi1FRklBUEkNCi1DcmVkZW50aWFsRW5yb2xsICgNCi0gIElOIENPTlNUICBFRklfVVNF Ul9DUkVERU5USUFMMl9QUk9UT0NPTCAgICAgICAqVGhpcywNCi0gIElOICAgICAgICBFRklfVVNF Ul9QUk9GSUxFX0hBTkRMRSAgICAgICAgICAgICBVc2VyDQotICApDQotew0KLSAgRUZJX1NUQVRV UyAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgIElu ZGV4Ow0KLSAgUEFTU1dPUkRfSU5GTyAgICAgICAgICAgICBQd2RJbmZvOw0KLSAgRUZJX1VTRVJf SU5GTyAgICAgICAgICAgICAqVXNlckluZm87DQotICBDSEFSOCAgICAgICAgICAgICAgICAgICAg IFBhc3N3b3JkW0NSRURFTlRJQUxfTEVOXTsNCi0gIEVGSV9JTlBVVF9LRVkgICAgICAgICAgICAg S2V5Ow0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAqVXNlcklkOw0KLSAgQ0hBUjE2ICAg ICAgICAgICAgICAgICAgICAqUXVlc3Rpb25TdHI7DQotICBDSEFSMTYgICAgICAgICAgICAgICAg ICAgICpQcm9tcHRTdHI7DQotDQotICBpZiAoKFRoaXMgPT0gTlVMTCkgfHwgKFVzZXIgPT0gTlVM TCkpIHsNCi0gICAgcmV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ZSBISUkgZGF0 YWJhc2UgaGFuZGxlLg0KLSAgQHBhcmFtW291dF0gRm9ybVNldElkICBPbiByZXR1cm4sIGhvbGRz IHRoZSBpZGVudGlmaWVyIG9mIHRoZSBmb3JtIHNldCB3aGljaCBjb250YWlucw0KLSAgICAgICAg ICAgICAgICAgICAgICAgICB0aGUgZm9ybSB1c2VkIGR1cmluZyB1c2VyIGlkZW50aWZpY2F0aW9u Lg0KLSAgQHBhcmFtW291dF0gRm9ybUlkICAgICBPbiByZXR1cm4sIGhvbGRzIHRoZSBpZGVudGlm aWVyIG9mIHRoZSBmb3JtIHVzZWQgZHVyaW5nIHVzZXINCi0gICAgICAgICAgICAgICAgICAgICAg ICAgaWRlbnRpZmljYXRpb24uDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAg Rm9ybSByZXR1cm5lZCBzdWNjZXNzZnVsbHkuDQotICBAcmV0dmFsIEVGSV9OT1RfRk9VTkQgICAg ICAgICAgRm9ybSBub3QgcmV0dXJuZWQuDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRF UiAgSGlpIGlzIE5VTEwgb3IgRm9ybVNldElkIGlzIE5VTEwgb3IgRm9ybUlkIGlzIE5VTEwuDQot DQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLUNyZWRlbnRpYWxGb3JtICgNCi0gIElOIENP TlNUICBFRklfVVNFUl9DUkVERU5USUFMMl9QUk9UT0NPTCAgICAgICAqVGhpcywNCi0gIE9VVCAg ICAgICBFRklfSElJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAgICAqSGlpLA0KLSAgT1VUICAg ICAgIEVGSV9HVUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICpGb3JtU2V0SWQsDQotICBP VVQgICAgICAgRUZJX0ZPUk1fSUQgICAgICAgICAgICAgICAgICAgICAgICAgKkZvcm1JZA0KLSAg KQ0KLXsNCi0gIGlmICgoVGhpcyA9PSBOVUxMKSB8fCAoSG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vaW50cyB0 byB0aGUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoIG9mIHRoZSBiaXRtYXAgcmV0 dXJuZWQuDQotICBAcGFyYW1baW4sIG91dF0gSGVpZ2h0ICBPbiBlbnRyeSwgcG9pbnRzIHRvIHRo ZSBkZXNpcmVkIGJpdG1hcCBoZWlnaHQuIElmIE5VTEwgdGhlbiBubw0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgYml0bWFwIGluZm9ybWF0aW9uIHdpbGwgYmUgcmV0dXJuZWQuIE9uIGV4aXQs IHBvaW50cyB0byB0aGUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodCBvZiB0aGUg Yml0bWFwIHJldHVybmVkDQotICBAcGFyYW1bb3V0XSAgICAgSGlpICAgICBPbiByZXR1cm4sIGhv bGRzIHRoZSBISUkgZGF0YWJhc2UgaGFuZGxlLg0KLSAgQHBhcmFtW291dF0gICAgIEltYWdlICAg T24gcmV0dXJuLCBob2xkcyB0aGUgSElJIGltYWdlIGlkZW50aWZpZXIuDQotDQotICBAcmV0dmFs IEVGSV9TVUNDRVNTICAgICAgICAgICAgSW1hZ2UgaWRlbnRpZmllciByZXR1cm5lZCBzdWNjZXNz ZnVsbHkuDQotICBAcmV0dmFsIEVGSV9OT1RfRk9VTkQgICAgICAgICAgSW1hZ2UgaWRlbnRpZmll ciBub3QgcmV0dXJuZWQuDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiAgSGlpIGlz IE5VTEwgb3IgSW1hZ2UgaXMgTlVMTC4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQot Q3JlZGVudGlhbFRpbGUgKA0KLSAgSU4gIENPTlNUICBFRklfVVNFUl9DUkVERU5USUFMMl9QUk9U T0NPTCAgICAgICAqVGhpcywNCi0gIElOICBPVVQgICAgVUlOVE4gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKldpZHRoLA0KLSAgSU4gIE9VVC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XRpb24uDQotDQotICBAcGFyYW1baW5dICAgICAgVGhpcyAgICAgICAgICBQb2ludHMgdG8g dGhpcyBpbnN0YW5jZSBvZiB0aGUgRUZJX1VTRVJfQ1JFREVOVElBTDJfUFJPVE9DT0wuDQotICBA cGFyYW1baW5dICAgICAgVXNlckluZm8gICAgICBIYW5kbGUgb2YgdGhlIHVzZXIgaW5mb3JtYXRp b24gZGF0YSByZWNvcmQuDQotICBAcGFyYW1bb3V0XSAgICAgSW5mbyAgICAgICAgICBPbiBlbnRy eSwgcG9pbnRzIHRvIGEgYnVmZmVyIG9mIGF0IGxlYXN0ICpJbmZvU2l6ZSBieXRlcy4gT24NCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4aXQsIGhvbGRzIHRoZSB1c2VyIGluZm9y bWF0aW9uLiBJZiB0aGUgYnVmZmVyIGlzIHRvbyBzbWFsbA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgdG8gaG9sZCB0aGUgaW5mb3JtYXRpb24sIHRoZW4gRUZJX0JVRkZFUl9UT09f U01BTEwgaXMgcmV0dXJuZWQNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCBJ bmZvU2l6ZSBpcyB1cGRhdGVkIHRvIGNvbnRhaW4gdGhlIG51bWJlciBvZiBieXRlcyBhY3R1YWxs eQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQuDQotICBAcGFyYW1b aW4sIG91dF0gSW5mb1NpemUgICAgICBPbiBlbnRyeSwgcG9pbnRzIHRvIHRoZSBzaXplIG9mIElu Zm8uIE9uIHJldHVybiwgcG9pbnRzIHRvIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc2l6ZSBvZiB0aGUgdXNlciBpbmZvcm1hdGlvbi4NCi0NCi0gIEByZXR2YWwgRUZJX1NV Q0NFU1MgICAgICAgICAgIEluZm9ybWF0aW9uIHJldHVybmVkIHN1Y2Nlc3NmdWxseS4NCi0gIEBy ZXR2YWwgRUZJX0JVRkZFUl9UT09fU01BTEwgIFRoZSBzaXplIHNwZWNpZmllZCBieSBJbmZvU2l6 ZSBpcyB0b28gc21hbGwgdG8gaG9sZCBhbGwgb2YgdGhlDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB1c2VyIGluZm9ybWF0aW9uLiBUaGUgc2l6ZSByZXF1aXJlZCBpcyByZXR1cm5l ZCBpbiAqSW5mb1NpemUuDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBJbmZvIGlz IE5VTEwgb3IgSW5mb1NpemUgaXMgTlVMTC4NCi0gIEByZXR2YWwgRUZJX05PVF9GT1VORCAgICAg ICAgIFRoZSBzcGVjaWZpZWQgVXNlckluZm8gZG9lcyBub3QgcmVmZXIgdG8gYSB2YWxpZCB1c2Vy IGluZm8gaGFuZGxlLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1DcmVkZW50aWFs R2V0SW5mbyAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJfQ1JFREVOVElBTDJfUFJPVE9DT0wgICAg ICAgKlRoaXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJfSU5GT19IQU5ETEUgICAgICAgICAgICAg ICAgVXNlckluZm8sDQotICBPVVQgICAgICAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICAgICAg ICAgICAgKkluZm8sDQotICBJTiBPVVQgICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKkluZm9TaXplDQotICApDQotew0KLSAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICpD cmVkZW50aWFsSW5mbzsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0NCi0g IGlmICgoVGhpcyA9PSBOVUxMKSB8fCAoSW5mb1NpemUgPT0gTlVMTCkgfHwgKEluZm8gPT0gTlVM TCkpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZB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BBUkFNRVRFUiAgVXNlckluZm8gaXMgTlVMTC4NCi0NCi0qKi8NCi1FRklfU1RBVFVT DQotRUZJQVBJDQotQ3JlZGVudGlhbEdldE5leHRJbmZvICgNCi0gIElOIENPTlNUICBFRklfVVNF Ul9DUkVERU5USUFMMl9QUk9UT0NPTCAgICAgICAqVGhpcywNCi0gIElOIE9VVCAgICBFRklfVVNF Ul9JTkZPX0hBTkRMRSAgICAgICAgICAgICAgICAqVXNlckluZm8NCi0gICkNCi17DQotICBFRklf VVNFUl9JTkZPICAgICAgICAgICAgKkluZm87DQotICBDSEFSMTYgICAgICAgICAgICAgICAgICAg KlByb3ZOYW1lU3RyOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgIEluZm9MZW47DQotICBV SU5UTiAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQotICBVSU5UTiAgICAgICAgICAgICAgICAg ICAgUHJvdlN0ckxlbjsNCi0NCi0gIGlmICgoVGhpcyA9PSBOVUxMKSB8fCAoVXNlckluZm8gPT0g TlVMTCkpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0g IGlmIChtUHdkSW5mb0hhbmRsZSA9PSBOVUxMKSB7DQotICAgIC8vDQotICAgIC8vIEluaXRpbGl6 ZWQgdXNlciBpbmZvIHRhYmxlLiBUaGVyZSBhcmUgNCB1c2VyIGluZm8gcmVjb3JkcyBpbiB0aGUg dGFibGUuDQotICAgIC8vDQotICAgIEluZm9MZW4gID0gc2l6ZW9mIChQQVNTV09SRF9DUkVERU5U SUFMX0lORk8pICsgKDQgLSAxKSAqIHNpemVvZiAoRUZJX1VTRVJfSU5GTyAqKTsNCi0gICAgbVB3 ZEluZm9IYW5kbGUgPSBBbGxvY2F0ZVplcm9Qb29sIChJbmZvTGVuKTsNCi0gICAgaWYgKG1Qd2RJ bmZvSGFuZGxlID09IE5VTEwpIHsNCi0gICAgICAqVXNlckluZm8gPSBOVUxMOw0KLS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Vz ZXIgcHJvZmlsZSBjYW5ub3QgZW5yb2xsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgb24gYW55IHVzZXIgcHJvZmlsZSBvciBjYW5ub3QgZW5yb2xsIG9uIGEgdXNlciBwcm9maWxl DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXIgdGhhbiB0aGUgY3VycmVu dCB1c2VyIHByb2ZpbGUuDQotICBAcmV0dmFsIEVGSV9VTlNVUFBPUlRFRCAgICAgICAgVGhpcyBj cmVkZW50aWFsIHByb3ZpZGVyIGRvZXMgbm90IHN1cHBvcnQgZW5yb2xsbWVudCBpbg0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBwcmUtT1MuDQotICBAcmV0dmFsIEVGSV9E RVZJQ0VfRVJST1IgICAgICAgVGhlIG5ldyBjcmVkZW50aWFsIGNvdWxkIG5vdCBiZSBjcmVhdGVk IGJlY2F1c2Ugb2YgYSBkZXZpY2UNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBl cnJvci4NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICBVc2VyIGRvZXMgbm90IHJl ZmVyIHRvIGEgdmFsaWQgdXNlciBwcm9maWxlIGhhbmRsZS4NCi0NCi0qKi8NCi1FRklfU1RBVFVT DQotRUZJQVBJDQotQ3JlZGVudGlhbEVucm9sbCAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJfQ1JF REVOVElBTDJfUFJPVE9DT0wgICAgICAgKlRoaXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJfUFJP RklMRV9IQU5ETEUgICAgICAgICAgICAgVXNlcg0KLSAgKTsNCi0NCi0vKioNCi0gIFJldHVybnMg dGhlIHVzZXIgaW50ZXJmYWNlIGluZm9ybWF0aW9uIHVzZWQgZHVyaW5nIHVzZXIgaWRlbnRpZmlj YXRpb24uDQotDQotICBUaGlzIGZ1bmN0aW9uIHJldHVybnMgaW5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pZGVyLg0K LQ0KLSAgVGhpcyBmdW5jdGlvbiByZXR1cm5zIHVzZXIgaW5mb3JtYXRpb24uDQotDQotICBAcGFy YW1baW5dICAgICAgVGhpcyAgICAgICAgICBQb2ludHMgdG8gdGhpcyBpbnN0YW5jZSBvZiB0aGUg RUZJX1VTRVJfQ1JFREVOVElBTDJfUFJPVE9DT0wuDQotICBAcGFyYW1baW5dICAgICAgVXNlcklu Zm8gICAgICBIYW5kbGUgb2YgdGhlIHVzZXIgaW5mb3JtYXRpb24gZGF0YSByZWNvcmQuDQotICBA cGFyYW1bb3V0XSAgICAgSW5mbyAgICAgICAgICBPbiBlbnRyeSwgcG9pbnRzIHRvIGEgYnVmZmVy IG9mIGF0IGxlYXN0ICpJbmZvU2l6ZSBieXRlcy4gT24NCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGV4aXQsIGhvbGRzIHRoZSB1c2VyIGluZm9ybWF0aW9uLiBJZiB0aGUgYnVmZmVy IGlzIHRvbyBzbWFsbA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gaG9sZCB0 aGUgaW5mb3JtYXRpb24sIHRoZW4gRUZJX0JVRkZFUl9UT09fU01BTEwgaXMgcmV0dXJuZWQNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCBJbmZvU2l6ZSBpcyB1cGRhdGVkIHRv IGNvbnRhaW4gdGhlIG51bWJlciBvZiBieXRlcyBhY3R1YWxseQ0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcmVxdWlyZWQuDQotICBAcGFyYW1baW4sIG91dF0gSW5mb1NpemUgICAg ICBPbiBlbnRyeSwgcG9pbnRzIHRvIHRoZSBzaXplIG9mIEluZm8uIE9uIHJldHVybiwgcG9pbnRz IHRvIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiB0aGUgdXNl ciBpbmZvcm1hdGlvbi4NCi0NCi0gIEByZXR2YWwg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GVyIChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0ZP Uk1fVElUTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiR2V0 IFBhc3N3b3JkIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgI2xhbmd1YWdlIGZyLUZSICAiR2V0IFBhc3N3b3JkKEZyZW5jaCkiDQotI3N0cmluZyBT VFJfTlVMTF9TVFJJTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMg ICIiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAj bGFuZ3VhZ2UgZnItRlIgICIiDQotI3N0cmluZyBTVFJfSU5QVVRfUEFTU1dPUkQgICAgICAgICAg ICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJQbGVhc2UgSW5wdXQgUGFzc3dvcmQiDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3Vh Z2UgZnItRlIgICJQbGVhc2UgSW5wdXQgUGFzc3dvcmQoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9Q Uk9WSURFUl9OQU1FICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJJ TlRFTCBQYXNzd29yZCBDcmVkZW50aWFsIFByb3ZpZGVyIg0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiSU5URUwgUGFz c3dvcmQgQ3JlZGVudGlhbCBQcm92aWRlcihGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX1BST1ZJREVS X1RZUEVfTkFNRSAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiUGFzc3dvcmQg Q3JlZGVudGlhbCBQcm92aWRlciINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlBhc3N3b3JkIENyZWRlbnRpYWwgUHJv dmlkZXIoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9JTlBVVF9QQVNTV09SRF9BR0FJTiAgICAgICAg ICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIklucHV0IFBhc3N3b3JkIEFnYWluIg0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZy LUZSICAiSW5wdXQgUGFzc3dvcmQgQWdhaW4gKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfRFJBV19B X0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICItLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIi0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSINCi0jc3RyaW5nIFNUUl9QQVNTV09SRF9JTkNPUlJFQ1QgICAgICAg ICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIiAgICAgSW5jb3JyZWN0IFBhc3N3b3JkISAg ICAgIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg I2xhbmd1YWdlIGZyLUZSICAiICAgIEluY29ycmVjdCBQYXNzd29yZCEgKEZyZW5jaCkgICAgIg0K LSNzdHJpbmcgU1RSX1BBU1NXT1JEX01JU01BVENIICAgICAgICAgICAgICAgICAgICAgI2xhbmd1 YWdlIGVuLVVTICAiICAgIFRoZSBQYXNzd29yZCBNaXNtYXRjaCEgICAgIg0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI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NmdWxseS4NCi0gIEByZXR2 YWwgT3RoZXJzICAgICAgICAgICAgICAgICBGYWlsZWQgdG8gbW9kaWZ5IHRoZSB0YWJsZS4NCi0N Ci0qKi8NCi1FRklfU1RBVFVTDQotTW9kaWZ5VGFibGUgKA0KLSAgSU4gIFVJTlROICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBJbmRleCwNCi0gIElOICBVU0JfSU5GTyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKiBJbmZvIE9QVElPTkFMDQotICApDQotew0KLSAgRUZJX1NUQVRV UyAgU3RhdHVzOw0KLSAgVVNCX0lORk8gICAgKk5ld1VzYkluZm87DQotDQotICBOZXdVc2JJbmZv ID0gTlVMTDsNCi0gIGlmIChJbmRleCA8IG1Vc2JUYWJsZS0+Q291bnQpIHsNCi0gICAgaWYgKElu Zm8gPT0gTlVMTCkgew0KLSAgICAgIC8vDQotICAgICAgLy8gRGVsZXRlIHRoZSBzcGVjaWZpZWQg ZW50cnkuDQotICAgICAgLy8NCi0gICAgICBtVXNiVGFibGUtPkNvdW50LS07DQotICAgICAgaWYg KEluZGV4ICE9IG1Vc2JUYWJsZS0+Q291bnQpIHsNCi0gICAgICAgIE5ld1VzYkluZm8gPSAmbVVz YlRhYmxlLT5Vc2VySW5mb1ttVXNiVGFibGUtPkNvdW50XTsNCi0gICAgICB9DQotICAgIH0gZWxz ZSB7DQotICAgICAgLy8NCi0gICAgICAvLyBVcGRhdGUgdGhlIHNwZWNpZmllZCBlbnRyeS4NCi0g ICAgICAvLw0KLSAgICAgIE5ld1VzYkluZm8gPSBJbmZvOw0KLSAgICB9DQotICB9IGVsc2Ugew0K LSAgICAvLw0KLSAgICAvLyBBZGQgYSBuZXcgZW50cnkNCi0gICAgLy8NCi0gICAgaWYgKEluZm8g PT0gTlVMTCkgew0KLSAgICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7DQotICAgIH0N Ci0NCi0gICAgaWYgKG1Vc2JUYWJsZS0+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KiovDQotRUZJX1NUQVRV Uw0KLUluaXRDcmVkZW50aWFsVGFibGUgKA0KLSAgVk9JRA0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFU VVMgIFN0YXR1czsNCi0gIFVJTlQ4ICAgICAgICpWYXI7DQotICBVSU5UTiAgICAgICBWYXJTaXpl Ow0KLQ0KLSAgLy8NCi0gIC8vIEdldCBVc2IgY3JlZGVudGlhbCBkYXRhIGZyb20gTlYgdmFyaWFi bGUuDQotICAvLw0KLSAgVmFyU2l6ZSA9IDA7DQotICBWYXIgICAgID0gTlVMTDsNCi0gIFN0YXR1 cyAgPSBnUlQtPkdldFZhcmlhYmxlICgNCi0gICAgICAgICAgICAgICAgICAgTCJVc2JDcmVkZW50 aWFsIiwNCi0gICAgICAgICAgICAgICAgICAgJmdVc2JDcmVkZW50aWFsUHJvdmlkZXJHdWlkLA0K LSAgICAgICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAmVmFyU2l6ZSwN Ci0gICAgICAgICAgICAgICAgICAgVmFyDQotICAgICAgICAgICAgICAgICAgICk7DQotICBpZiAo U3RhdHVzID09IEVGSV9CVUZGRVJfVE9PX1NNQUxMKSB7DQotICAgIFZhciA9IEFsbG9jYXRlWmVy b1Bvb2wgKFZhclNpemUpOw0KLSAgICBpZiAoVmFyID09IE5VTEwpIHsNCi0gICAgICByZXR1cm4g RUZJX09VVF9PRl9SRVNPVVJDRVM7DQotICAgIH0NCi0gICAgU3RhdHVzID0gZ1JULT5HZXRWYXJp YWJsZSAoDQotICAgICAgICAgICAgICAgICAgICBMIlVzYkNyZWRlbnRpYWwiLA0KLSAgICAgICAg ICAgICAgICAgICAgJmdVc2JDcmVkZW50aWFsUHJvdmlkZXJHdWlkLA0KLSAgICAgICAgICAgICAg ICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICZWYXJTaXplLA0KLSAgICAgICAgICAg ICAgICAgICAgVmFyDQotICAgICAgICAgICAgICAgICAgICApOw0KL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QotICBOb3RlOiB0aGUgY2FsbGVyIGlzIHJlc3BvbnNpYmxlIHRvIGZyZWUgdGhl IGJ1ZmZlciBtZW1vcnkuDQotDQotICBAcGFyYW0gIEZpbGVOYW1lICAgICAgICAgICAgICAgRmls ZSB0byByZWFkLg0KLSAgQHBhcmFtICBCdWZmZXIgICAgICAgICAgICAgICAgIFJldHVybmVkIHdp dGggZGF0YSByZWFkIGZyb20gdGhlIGZpbGUuDQotICBAcGFyYW0gIEJ1ZmZlclNpemUgICAgICAg ICAgICAgU2l6ZSBvZiB0aGUgZGF0YSBidWZmZXIuDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNT ICAgICAgICAgICAgVGhlIGNvbW1hbmQgY29tcGxldGVkIHN1Y2Nlc3NmdWxseS4NCi0gIEByZXR2 YWwgRUZJX09VVF9PRl9SRVNPVVJDRVMgICBSZXNvdXJjZSBhbGxvY2F0aW9uIGZhaWxlZC4NCi0g IEByZXR2YWwgRUZJX05PVF9GT1VORCAgICAgICAgICBGaWxlIG5vdCBmb3VuZC4NCi0gIEByZXR2 YWwgRUZJX0RFVklDRV9FUlJPUiAgICAgICBEZXZpY2UgSS9PIGVycm9yLg0KLQ0KLSoqLw0KLUVG SV9TVEFUVVMNCi1HZXRGaWxlRGF0YSAoDQotICBJTiAgICAgQ0hBUjE2ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKkZpbGVOYW1lLA0KLSAgT1VUIFZPSUQgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICoqQnVmZmVyLA0KLSAgT1VUIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICpCdWZmZXJTaXplDQotICApDQotew0KLSAgRUZJX1NU QVRVUyAgICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBVSU5UTiAgICAgICAgICAgICAg ICAgICAgICAgICAgIEluZGV4Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICBI YW5kbGVDb3VudDsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgU2NyYXRjaEJ1 ZmZlclNpemU7DQotICBFRklfSEFORExFICAgICAgICAgICAgICAgICAgICAgICpIYW5kbGVCdWZm ZXI7DQotICBFRklfRklMRSAgICAgICAgICAgICAgICAgICAgICAgICpSb290RnM7DQotICBFRklf RklMRSAgICAgICAgICAgICAgICAgICAgICAgICpGaWxlSGFuZGxlOw0KLSAgRUZJX0ZJTEVfSU5G TyAgICAgICAgICAgICAgICAgICAqRmlsZUluZm87DQotICBFRklfU0lNUExFX0ZJTEVfU1lTVEVN X1BST1RPQ09MICpTaW1wbGVGaWxlU3lzdGVtOw0KLSAgRUZJX0JMT0NLX0lPX1BST1RPQ09MICAg ICAgICAgICAqQmxrSW87DQotDQotICBGaWxlSW5mbyAgICAgID0gTlVMTDsNCi0gIEZpbGVIYW5k bGUgICAgPSBOVUxMOw0KLQ0KLSAgU3RhdHVzID0gZ0JTLT5Mb2NhdGVIYW5kbGVCdWZmZXIgKA0K LSAgICAgICAgICAgICAgICAgIEJ5UHJvdG9jb2wsDQotICAgICAgICAgICAgICAgICAgJmdFZmlT aW1wbGVGaWxlU3lzdGVtUHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgIE5VTEwsDQot ICAgICAgICAgICAgICAgICAgJkhhbmRsZUNvdW50LA0KLSAgICAgICAgICAgICAgICAgICZIYW5k bGVCdWZmZXINCi0gICAgICAgICAgICAgICAgICApOw0KLSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KLSAgICBERUJVRyAoKERFQlVHX0VSUk9SLCAiQ2FuIG5vdCBMb2NhdGUgU2ltcGxlRmls ZVN5c3RlbVByb3RvY29sXG4iKSk7DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIC8vDQot ICAvLyBGaW5kIGFuZCBvcGVuIHRoZSBmaWxlIGluIHJlbW92YWJsZSBtZWRpYSBkaXNrLg0KLSAg Ly8NCi0gIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IEhhbmRsZUNvdW50OyBJbmRleCsrKSB7DQot ICAgIFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KLSAgICAgICAgICAgICAgICAgICAg SGFuZGxlQnVmZmVyW0luZGV4XSwNCi0gICAgICAgICAgICAgICAgICAgICZnRWZpQmxvY2tJb1By b3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgIChWT0lEICoqKSAmQmxrSW8NCi0gICAg ICAgICAgICAgICAgICAgICk7DQotICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAg ICBjb250aW51ZTsNCi0gICAgfQ0KLQ0KLSAgICBpZiAoQmxrSW8tPk1lZGlhLT5SZW1vdmFibGVN ZWRpYSkgew0KLSAgICAgIFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KLSAgICAgICAg ICAgICAgICAgICAgICBIYW5kbGVCdWZmZXJbSW5kZXhdLA0KLSAgICAgICAgICAgICAgICAgICAg ICAmZ0VmaVNpbXBsZUZpbGVTeXN0ZW1Qcm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAg ICAgIChWT0lEICoqKSAmU2ltcGxlRmlsZVN5c3RlbQ0KLSAgICAgICAgICAgICAgICAgICAgICAp Ow0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICAgIGNvbnRpbnVlOw0K LSAgICAgIH0NCi0NCi0gICAgICBTdGF0dXMgPSBTaW1wbGVGaWxlU3lzdGVtLT5PcGVuVm9sdW1l ICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpbXBsZUZpbGVTeXN0ZW0s DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmUm9vdEZzDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1 cykpIHsNCi0gICAgICAgIGNvbnRpbnVlOw0KLSAgICAgIH0NCi0NCi0gICAgICBTdGF0dXMgPSBS b290RnMtPk9wZW4gKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICBSb290RnMsDQotICAgICAg ICAgICAgICAgICAgICAgICAgICZGaWxlSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICBGaWxlTmFtZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgRUZJX0ZJTEVfTU9ERV9SRUFE LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAwDQotICAgICAgICAgICAgICAgICAgICAgICAg ICk7DQotICAgICAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICAgIGJyZWFrOw0K LSAgICAgIH0NCi0gICAgfQ0KLSAgfQ0KLQ0KLSAgRnJlZVBvb2wgKEhhbmRsZUJ1ZmZlcik7DQot DQotICBpZiAoSW5kZXggPj0gSGFuZGxlQ291bnQpIHsNCi0gICAgREVCVUcgKChERUJVR19FUlJP UiwgIkNhbiBub3QgZm91bmQgdGhlIHRva2VuIGZpbGUhXG4iKSk7DQotICAgIFN0YXR1cyA9IEVG SV9OT1RfRk9VTkQ7DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBGaWd1 cmUgb3V0IGhvdyBiaWcgdGhlIGZpbGUgaXMuDQotICAvLw0KLSAgU2NyYXRjaEJ1ZmZlclNpemUg PSAwOw0KLSAgU3RhdHVzID0gRmlsZUhhbmRsZS0+R2V0SW5mbyAoDQotICAgICAgICAgICAgICAg ICAgICAgICAgRmlsZUhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaUZpbGVJ bmZvR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAmU2NyYXRjaEJ1ZmZlclNpemUsDQot ICAgICAgICAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAgICAgICAgICAgICAgICk7 DQotICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpICYmIChTdGF0dXMgIT0gRUZJX0JVRkZFUl9UT09f U01BTEwpKSB7DQotICAgIERFQlVHICgoREVCVUdfRVJST1IsICJDYW4gbm90IG9idGFpbiBmaWxl IHNpemUgaW5mbyFcbiIpKTsNCi0gICAgU3RhdHVzID0gRUZJX0RFVklDRV9FUlJPUjsNCi0gICAg Z290byBEb25lOw0KLSAgfQ0KLQ0KLSAgRmlsZUluZm8gPSBBbGxvY2F0ZVplcm9Qb29sIChTY3Jh dGNoQnVmZmVyU2l6ZSk7DQotICBpZiAoRmlsZUluZm8gPT0gTlVMTCkgew0KLSAgICBERUJVRyAo KERFQlVHX0VSUk9SLCAiQ2FuIG5vdCBhbGxvY2F0ZSBlbm91Z2ggbWVtb3J5IGZvciB0aGUgdG9r ZW4gZmlsZSFcbiIpKTsNCi0gICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQotICAg IGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIFN0YXR1cyA9IEZpbGVIYW5kbGUtPkdldEluZm8gKA0K LSAgICAgICAgICAgICAgICAgICAgICAgIEZpbGVIYW5kbGUsDQotICAgICAgICAgICAgICAgICAg ICAgICAgJmdFZmlGaWxlSW5mb0d1aWQsDQotICAgICAgICAgICAgICAgICAgICAgICAgJlNjcmF0 Y2hCdWZmZXJTaXplLA0KLSAgICAgICAgICAgICAgICAgICAgICAgIEZpbGVJbmZvDQotICAgICAg ICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAg REVCVUcgKChERUJVR19FUlJPUiwgIkNhbiBub3Qgb2J0YWluIGZpbGUgaW5mbyBmcm9tIHRoZSB0 b2tlbiBmaWxlIVxuIikpOw0KLSAgICBTdGF0dXMgPSBFRklfREVWSUNFX0VSUk9SOw0KLSAgICBn b3RvIERvbmU7DQotICB9DQotDQotICAvLw0KLSAgLy8gQWxsb2NhdGUgYSBidWZmZXIgZm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KLSAgfQ0KLQ0KLURvbmU6DQotDQotICBpZiAoRmlsZUluZm8gIT0gTlVMTCkg ew0KLSAgICBGcmVlUG9vbCAoRmlsZUluZm8pOw0KLSAgfQ0KLQ0KLSAgcmV0dXJuIFN0YXR1czsN Ci19DQotDQotDQotLyoqDQotICBIYXNoIHRoZSBkYXRhIHRvIGdldCBjcmVkZW50aWFsLg0KLQ0K LSAgQHBhcmFtW2luXSAgIEJ1ZmZlciAgICAgICAgIFBvaW50cyB0byB0aGUgZGF0YSBidWZmZXIN Ci0gIEBwYXJhbVtpbl0gICBCdWZmZXJTaXplICAgICBUaGUgc2l6ZSBvZiBkYXRhIGluIGJ1ZmZl ciwgaW4gYnl0ZXMuDQotICBAcGFyYW1bb3V0XSAgQ3JlZGVudGlhbCAgICAgUG9pbnRzIHRvIHRo ZSBoYXNoZWQgcmVzdWx0DQotDQotICBAcmV0dmFsICAgICAgVFJVRSAgICAgICAgICAgSGFzaCB0 aGUgZGF0YSBzdWNjZXNzZnVsbHkuDQotICBAcmV0dmFsICAgICAgRkFMU0UgICAgICAgICAgRmFp bGVkIHRvIGhhc2ggdGhlIGRhdGEuDQotDQotKiovDQotQk9PTEVBTg0KLUdlbmVyYXRlQ3JlZGVu dGlhbCAoDQotICBJTiAgICAgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpC dWZmZXIsDQotICBJTiAgICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1 ZmZlclNpemUsDQotICAgICBPVVQgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICpDcmVkZW50aWFsDQotICApDQotew0KLSAgQk9PTEVBTiAgICAgICAgICAgU3RhdHVzOw0KLSAg VUlOVE4gICAgICAgICAgICAgSGFzaFNpemU7DQotICBWT0lEICAgICAgICAgICAgICAqSGFzaDsN Ci0NCi0gIEhhc2hTaXplID0gU2hhMUdldENvbnRleHRTaXplICgpOw0KLSAgSGFzaCAgICAgP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ICAgLy8gR2V0IGluZm9ybWF0aW9uLg0KLSAgICAvLw0KLSAgICBTdGF0dXMgPSBVc2Vy TWFuYWdlci0+R2V0SW5mbyAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVzZXJNYW5h Z2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyLA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICBVc2VySW5mb0hhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgVXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICZVc2VySW5mb1NpemUN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKFN0YXR1cyA9PSBFRklf QlVGRkVSX1RPT19TTUFMTCkgew0KLSAgICAgIGlmIChVc2VySW5mbyAhPSBOVUxMKSB7DQotICAg ICAgICBGcmVlUG9vbCAoVXNlckluZm8pOw0KLSAgICAgIH0NCi0gICAgICBVc2VySW5mbyA9IEFs bG9jYXRlWmVyb1Bvb2wgKFVzZXJJbmZvU2l6ZSk7DQotICAgICAgaWYgKFVzZXJJbmZvID09IE5V TEwpIHsNCi0gICAgICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCi0gICAgICB9DQot ICAgICAgU3RhdHVzID0gVXNlck1hbmFnZXItPkdldEluZm8gKA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm9IYW5kbGUsDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm8sDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJlVzZXJJbmZvU2l6ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICk7DQotICAgIH0NCi0gICAgaWYgKEVGSV9FUlJPUiAoU3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ICAgICAgICAgICAgICAg ICBlcnJvci4NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICBVc2VyIGRvZXMgbm90 IHJlZmVyIHRvIGEgdmFsaWQgdXNlciBwcm9maWxlIGhhbmRsZS4NCi0NCi0qKi8NCi1FRklfU1RB VFVTDQotRUZJQVBJDQotQ3JlZGVudGlhbEVucm9sbCAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJf Q1JFREVOVElBTDJfUFJPVE9DT0wgICAgICAgKlRoaXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJf UFJPRklMRV9IQU5ETEUgICAgICAgICAgICAgVXNlcg0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMg ICAgICAgICAgICAgICAgU3RhdHVzOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBJbmRl eDsNCi0gIFVTQl9JTkZPICAgICAgICAgICAgICAgICAgVXNiSW5mbzsNCi0gIEVGSV9VU0VSX0lO Rk8gICAgICAgICAgICAgKlVzZXJJbmZvOw0KLSAgRUZJX0lOUFVUX0tFWSAgICAgICAgICAgICBL ZXk7DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICpVc2VySWQ7DQotICBDSEFSMTYgICAg ICAgICAgICAgICAgICAgICpRdWVzdGlvblN0cjsNCi0gIENIQVIxNiAgICAgICAgICAgICAgICAg ICAgKlByb21wdFN0cjsNCi0NCi0gIGlmICgoVGhpcyA9PSBOVUxMKSB8fCAoVXNlciA9PSBOVUxM KSkgew0KLSAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KLSAgfQ0KLQ0KLSAgLy8N Ci0gIC8vIEdldCBVc2VyIElkZW50aWZpZXINCi0gIC8vDQotICBVc2VySW5mbyA9IE5VTEw7DQot ICBTdGF0dXMgPSBGaW5kVXNlckluZm9CeVR5cGUgKA0KLSAgICAgICAgICAgICBVc2VyLA0KLSAg ICAgICAgICAgICBFRklfVVNFUl9JTkZPX0lERU5US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IFRoaXMgICAg ICAgICAgUG9pbnRzIHRvIHRoaXMgaW5zdGFuY2Ugb2YgdGhlIEVGSV9VU0VSX0NSRURFTlRJQUwy X1BST1RPQ09MLg0KLSAgQHBhcmFtW2luXSAgICAgIFVzZXJJbmZvICAgICAgSGFuZGxlIG9mIHRo ZSB1c2VyIGluZm9ybWF0aW9uIGRhdGEgcmVjb3JkLg0KLSAgQHBhcmFtW291dF0gICAgIEluZm8g ICAgICAgICAgT24gZW50cnksIHBvaW50cyB0byBhIGJ1ZmZlciBvZiBhdCBsZWFzdCAqSW5mb1Np emUgYnl0ZXMuIE9uDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleGl0LCBob2xk cyB0aGUgdXNlciBpbmZvcm1hdGlvbi4gSWYgdGhlIGJ1ZmZlciBpcyB0b28gc21hbGwNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIGhvbGQgdGhlIGluZm9ybWF0aW9uLCB0aGVu IEVGSV9CVUZGRVJfVE9PX1NNQUxMIGlzIHJldHVybmVkDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBhbmQgSW5mb1NpemUgaXMgdXBkYXRlZCB0byBjb250YWluIHRoZSBudW1iZXIg b2YgYnl0ZXMgYWN0dWFsbHkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVp cmVkLg0KLSAgQHBhcmFtW2luLCBvdXRdIEluZm9TaXplICAgICAgT24gZW50cnksIHBvaW50cyB0 byB0aGUgc2l6ZSBvZiBJbmZvLiBPbiByZXR1cm4sIHBvaW50cyB0byB0aGUNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHNpemUgb2YgdGhlIHVzZXIgaW5mb3JtYXRpb24uDQotDQot ICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICBJbmZvcm1hdGlvbiByZXR1cm5lZCBzdWNj ZXNzZnVsbHkuDQotICBAcmV0dmFsIEVGSV9CVUZGRVJfVE9PX1NNQUxMICBUaGUgc2l6ZSBzcGVj aWZpZWQgYnkgSW5mb1NpemUgaXMgdG9vIHNtYWxsIHRvIGhvbGQgYWxsIG9mIHRoZQ0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlciBpbmZvcm1hdGlvbi4gVGhlIHNpemUgcmVx dWlyZWQgaXMgcmV0dXJuZWQgaW4gKkluZm9TaXplLg0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9Q QVJBTUVURVIgSW5mbyBpcyBOVUxMIG9yIEluZm9TaXplIGlzIE5VTEwuDQotICBAcmV0dmFsIEVG SV9OT1RfRk9VTkQgICAgICAgICBUaGUgc3BlY2lmaWVkIFVzZXJJbmZvIGRvZXMgbm90IHJlZmVy IHRvIGEgdmFsaWQgdXNlciBpbmZvIGhhbmRsZS4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJ QVBJDQotQ3JlZGVudGlhbEdldEluZm8gKA0KLSAgSU4gQ09OU1QgIEVGSV9VU0VSX0NSRURFTlRJ QUwyX1BST1RPQ09MICAgICAgICpUaGlzLA0KLSAgSU4gICAgICAgIEVGSV9VU0VSX0lORk9fSEFO RExFICAgICAgICAgICAgICAgIFVzZXJJbmZvLA0KLSAgT1VUICAgICAgIEVGSV9VU0VSX0lORk8g ICAgICAgICAgICAgICAgICAgICAgICpJbmZvLA0KLSAgSU4gT1VUICAgIFVJTlROICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICpJbmZvU2l6ZQ0KLSAgKQ0KLXsNCi0gIEVGSV9VU0VSX0lO Rk8gICAgICAgICAgICAqQ3JlZGVudGlhbEluZm87DQotICBVSU5UTiAgICAgICAgICAgICAgICAg ICAgSW5kZXg7DQotDQotICBpZiAoKFRoaXMgPT0gTlVMTCkgfHwgKEluZm9TaXplID09IE5VTEwp IHx8IChJbmZvID09IE5VTEwpKSB7DQotICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7 DQotICB9DQotDQotICBpZiAoK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QotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLUNyZWRlbnRpYWxHZXROZXh0SW5mbyAoDQot ICBJTiBDT05TVCAgRUZJX1VTRVJfQ1JFREVOVElBTDJfUFJPVE9DT0wgICAgICAgKlRoaXMsDQot ICBJTiBPVVQgICAgRUZJX1VTRVJfSU5GT19IQU5ETEUgICAgICAgICAgICAgICAgKlVzZXJJbmZv DQotICApDQotew0KLSAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICpJbmZvOw0KLSAgQ0hBUjE2 ICAgICAgICAgICAgICAgICAgICpQcm92TmFtZVN0cjsNCi0gIFVJTlROICAgICAgICAgICAgICAg ICAgICBJbmZvTGVuOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLSAgVUlO VE4gICAgICAgICAgICAgICAgICAgIFByb3ZTdHJMZW47DQotDQotICBpZiAoKFRoaXMgPT0gTlVM TCkgfHwgKFVzZXJJbmZvID09IE5VTEwpKSB7DQotICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJB TUVURVI7DQotICB9DQotDQotICBpZiAobVVzYkluZm9IYW5kbGUgPT0gTlVMTCkgew0KLSAgICAv Lw0KLSAgICAvLyBJbml0aWxpemVkIHVzZXIgaW5mbyB0YWJsZS4gVGhlcmUgYXJlIDQgdXNlciBp bmZvIHJlY29yZHMgaW4gdGhlIHRhYmxlLg0KLSAgICAvLw0KLSAgICBJbmZvTGVuICA9IHNpemVv ZiAoVVNCX0NSRURFTlRJQUxfSU5GTykgKyAoNCAtIDEpICogc2l6ZW9mIChFRklfVVNFUl9JTkZP ICopOw0KLSAgICBtVXNiSW5mb0hhbmRsZSA9IEFsbG9jYXRlWmVyb1Bvb2wgKEluZm9MZW4pOw0K LSAgICBpZiAobVVzYkluZm9IYW5kbGUgPT0gTlVMTCkgew0KLSAgICAgICpVc2VySW5mbyA9IE5V TEw7DQotICAgICAgcmV0dXJuIEVGSV9OT1RfRk9VTkQ7DQotICAgIH0NCi0NCi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W55IHVzZXIgcHJvZmlsZSBvciBjYW5ub3QgZGVsZXRlDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgb24gYSB1c2VyIHByb2ZpbGUgb3RoZXIgdGhhbiB0aGUgY3VycmVu dCB1c2VyIHByb2ZpbGUuDQotICBAcmV0dmFsIEVGSV9VTlNVUFBPUlRFRCAgICAgICAgVGhpcyBj cmVkZW50aWFsIHByb3ZpZGVyIGRvZXMgbm90IHN1cHBvcnQgZGVsZXRpb24gaW4gdGhlIHByZS1P Uy4NCi0gIEByZXR2YWwgRUZJX0RFVklDRV9FUlJPUiAgICAgICBUaGUgbmV3IGNyZWRlbnRpYWwg Y291bGQgbm90IGJlIGRlbGV0ZWQgYmVjYXVzZSBvZiBhIGRldmljZSBlcnJvci4NCi0gIEByZXR2 YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICBVc2VyIGRvZXMgbm90IHJlZmVyIHRvIGEgdmFsaWQg dXNlciBwcm9maWxlIGhhbmRsZS4NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQotQ3JlZGVu dGlhbERlbGV0ZSAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJfQ1JFREVOVElBTDJfUFJPVE9DT0wg ICAgICAgKlRoaXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJfUFJPRklMRV9IQU5ETEUgICAgICAg ICAgICAgVXNlcg0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgU3RhdHVz Ow0KLSAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICAqVXNlckluZm87DQotICBVSU5UOCAgICAg ICAgICAgICAgICAgICAgICpVc2VySWQ7DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICpO ZXdVc2VySWQ7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLQ0KLSAgaWYg KChUaGlzID09IE5VTEwpIHx8IChVc2VyID09IE5VTEwpKSB7DQotICAgIHJldHVybiBFRklfSU5W QUxJRF9QQVJBTUVURVI7DQotICB9DQotDQotICAvLw0KLSAgLy8gR2V0IFVzZXIgSWRlbnRpZmll ci4NCi0gIC8vDQotICBVc2VySW5mbyA9IE5VTEw7DQotICBTdGF0dXMgPSBGaW5kVXNlckluZm9C eVR5cGUgKA0KLSAgICAgICAgICAgICBVc2VyLA0KLSAgICAgICAgICAgICBFRklfVVNFUl9JTkZP X0lERU5USUZJRVJfUkVDT1JELA0KLSAgICAgICAgICAgICAmVXNlckluZm8NCi0gICAgICAgICAg ICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZB TElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBGaW5kIHRoZSB1c2VyIGJ5IHVz ZXIgaWRlbnRpZmllciBpbiBtUHdkVGFibGUuDQotICAvLw0KLSAgZm9yIChJbmRleCA9IDA7IElu ZGV4IDwgbVVzYlRhYmxlLT5Db3VudDsgSW5kZXgrKykgew0KLSAgICBVc2VySWQgICAgPSAoVUlO VDggKikgJm1Vc2JUYWJsZS0+VXNlckluZm9bSW5kZXhdLlVzZXJJZDsNCi0gICAgTmV3VXNlcklk ID0gKFVJTlQ4ICopIChVc2VySW5mbyArIDEpOw0KLSAgICBpZiAoQ29tcGFyZU1lbSAoVXNlcklk LCBOZXdVc2VySWQsIHNpemVvZiAoRUZJX1VTRVJfSU5GT19JREVOVElGSUVSKSkgPT0gMCkgew0K LSAgICAgIC8vDQotICAgICAgLy8gRm91bmQgdGhlIHVzZXIsIGRlbGV0ZSBpdC4NCi0gICAgICAv Lw0KLSAgICAgIE1vZGlmeVRhYmxlIChJbmRleCwgTlVMTCk7DQotICAgICAgYnJlYWs7DQotICAg IH0NCi0gIH0NCi0NCi0gIEZyZWVQb29sIChVc2VySW5mbyk7DQotICByZXR1cm4gRUZJX1NVQ0NF U1M7DQotfQ0KLQ0KLQ0KLS8qKg0KLSAgT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RzIHRvIHRoZSBkZXNpcmVkIGJp dG1hcCBoZWlnaHQuIElmIE5VTEwgdGhlbiBubw0KLSAgICAgICAgICAgICAgICAgICAgICAgICBi aXRtYXAgaW5mb3JtYXRpb24gd2lsbCBiZSByZXR1cm5lZC4gT24gZXhpdCwgcG9pbnRzIHRvIHRo ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQgb2YgdGhlIGJpdG1hcCByZXR1cm5l ZC4NCi0gIEBwYXJhbVtvdXRdICAgIEhpaSAgICAgT24gcmV0dXJuLCBob2xkcyB0aGUgSElJIGRh dGFiYXNlIGhhbmRsZS4NCi0gIEBwYXJhbVtvdXRdICAgIEltYWdlICAgT24gcmV0dXJuLCBob2xk cyB0aGUgSElJIGltYWdlIGlkZW50aWZpZXIuDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAg ICAgICAgICAgSW1hZ2UgaWRlbnRpZmllciByZXR1cm5lZCBzdWNjZXNzZnVsbHkuDQotICBAcmV0 dmFsIEVGSV9OT1RfRk9VTkQgICAgICAgICAgSW1hZ2UgaWRlbnRpZmllciBub3QgcmV0dXJuZWQu DQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiAgSGlpIGlzIE5VTEwgb3IgSW1hZ2Ug aXMgTlVMTC4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQotQ3JlZGVudGlhbFRpbGUg KA0KLSAgSU4gQ09OU1QgIEVGSV9VU0VSX0NSRURFTlRJQUwyX1BST1RPQ09MICAgICAgICpUaGlz LA0KLSAgSU4gT1VUICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpXaWR0 aCwNCi0gIElOIE9VVCAgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGVp Z2h0LA0KLSAgT1VUICAgICAgIEVGSV9ISUlfSEFORExFICAgICAgICAgICAgICAgICAgICAgICpI aWksDQotICBPVVQgICAgICAgRUZJX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0aW9uLiAgVGhlIGZ1bGwgdGV4dCBvZiB0aGUgbGljZW5z ZSBtYXkgYmUgZm91bmQgYXQNCi1odHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvYnNkLWxp Y2Vuc2UucGhwLg0KLQ0KLVRIRSBQUk9HUkFNIElTIERJU1RSSUJVVEVEIFVOREVSIFRIRSBCU0Qg TElDRU5TRSBPTiBBTiAiQVMgSVMiIEJBU0lTLA0KLVdJVEhPVVQgV0FSUkFOVElFUyBPUiBSRVBS RVNFTlRBVElPTlMgT0YgQU5ZIEtJTkQsIEVJVEhFUiBFWFBSRVNTIE9SIElNUExJRUQuDQotDQot KiovDQotDQotI2xhbmdkZWYgZW4tVVMgIkVuZ2xpc2giDQotI2xhbmdkZWYgZnItRlIgIkZyYW5j YWlzIg0KLQ0KLSNzdHJpbmcgU1RSX0NSRURFTlRJQUxfVElUTEUgICAgICAgICAgICAgICAgICAg ICAgI2xhbmd1YWdlIGVuLVVTICAiVVNCIENyZWRlbnRpYWwgUHJvdmlkZXIiDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIg ICJVU0IgQ3JlZGVudGlhbCBQcm92aWRlciAoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9OVUxMX1NU UklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIiINCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBm ci1GUiAgIiINCi0jc3RyaW5nIFNUUl9QUk9WSURFUl9OQU1FICAgICAgICAgICAgICAgICAgICAg ICAgICNsYW5ndWFnZSBlbi1VUyAgIklOVEVMIFVTQiBDcmVkZW50aWFsIFByb3ZpZGVyIg0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdl IGZyLUZSICAi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DQotRUZJX0hBTkRMRSAgICAgICAg bURlZmVycmVkSW1hZ2VIYW5kbGU7DQotDQotLyoqDQotICBUaGUgZnVuY3Rpb24gd2lsbCBsb2Fk IGFsbCB0aGUgZGVmZXJyZWQgaW1hZ2VzIGFnYWluLiBJZiB0aGUgZGVmZXJyZWQgaW1hZ2UgaXMg bG9hZGVkDQotICBzdWNjZXNzZnVsbHksIHRyeSB0byBzdGFydCBpdC4NCi0NCi0gIEBwYXJhbSAg RXZlbnQgICAgICAgICBFdmVudCB3aG9zZSBub3RpZmljYXRpb24gZnVuY3Rpb24gaXMgYmVpbmcg aW52b2tlZC4NCi0gIEBwYXJhbSAgQ29udGV4dCAgICAgICBQb2ludGVyIHRvIHRoZSBub3RpZmlj YXRpb24gZnVuY3Rpb24ncyBjb250ZXh0DQotDQotKiovDQotVk9JRA0KLUVGSUFQSQ0KLUxvYWRE ZWZlcnJlZEltYWdlICgNCi0gIElOIEVGSV9FVkVOVCAgICAgICAgICAgICAgICAgICAgICAgRXZl bnQsDQotICBJTiBWT0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICpDb250ZXh0DQotICAp DQotew0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBF RklfREVGRVJSRURfSU1BR0VfTE9BRF9QUk9UT0NPTCAgICpEZWZlcnJlZEltYWdlOw0KLSAgVUlO VE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIYW5kbGVDb3VudDsNCi0gIEVGSV9IQU5E TEUgICAgICAgICAgICAgICAgICAgICAgICAgKkhhbmRsZUJ1ZjsNCi0gIFVJTlROICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIERyaXZlckluZGV4Ow0KLSAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAg ICAgICAqSW1hZ2VEZXZpY2VQYXRoOw0KLSAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAqRHJpdmVySW1hZ2U7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IEltYWdlU2l6ZTsNCi0gIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQm9vdE9w dGlvbjsNCi0gIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgICAgICAgSW1hZ2VIYW5kbGU7 DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEV4aXREYXRhU2l6ZTsNCi0g IENIQVIxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkV4aXREYXRhOw0KLQ0KLSAgLy8N Ci0gIC8vIEZpbmQgYWxsIHRoZSBkZWZlcnJlZCBpbWFnZSBsb2FkIHByb3RvY29scy4NCi0gIC8v DQotICBIYW5kbGVDb3VudCA9IDA7DQotICBIYW5kbGVCdWYgICA9IE5VTEw7DQotICBTdGF0dXMg PSBnQlMtPkxvY2F0ZUhhbmRsZUJ1ZmZlciAoDQotICAgICAgICAgICAgICAgICAgQnlQcm90b2Nv bCwNCi0gICAgICAgICAgICAgICAgICAmZ0VmaURlZmVycmVkSW1hZ2VMb2FkUHJvdG9jb2xHdWlk LA0KLSAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAgICAgJkhhbmRsZUNv dW50LA0KLSAgICAgICAgICAgICAgICAgICZIYW5kbGVCdWYNCi0gICAgICAgICAgICAgICAgICAp Ow0KLSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICByZXR1cm4gOw0KLSAgfQ0KLQ0K LSAgZm9yIChJbmRleCA9IDA7IEluZGV4IDwgSGFuZGxlQ291bnQ7IEluZGV4KyspIHsNCi0gICAg U3RhdHVzID0gZ0JTLT5IYW5kbGVQcm90b2NvbCAoDQotICAgICAgICAgICAgICAgICAgICBIYW5k bGVCdWZbSW5kZXhdLA0KLSAgICAgICAgICAgICAgICAgICAgJmdFZmlEZWZlcnJlZEltYWdlTG9h ZFByb3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgIChWT0lEICoqKSAmRGVmZXJyZWRJ bWFnZQ0KLSAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KLSAgICAgIGNvbnRpbnVlIDsNCi0gICAgfQ0KLQ0KLSAgICBEcml2ZXJJbmRleCA9IDA7 DQotICAgIGRvIHsNCi0gICAgICAvLw0KLSAgICAgIC8vIExvYWQgYWxsIHRoZSBkZWZlcnJlZCBp bWFnZXMgaW4gdGhpcyBwcm90b2NvbCBpbnN0YW5jZS4NCi0gICAgICAvLw0KLSAgICAgIFN0YXR1 cyA9IERlZmVycmVkSW1hZ2UtPkdldEltYWdlSW5mbygNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIERlZmVycmVkSW1hZ2UsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBEcml2ZXJJbmRleCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZJbWFnZURl dmljZVBhdGgsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKikgJkRy aXZlckltYWdlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkltYWdlU2l6ZSwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZCb290T3B0aW9uDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCi0gICAgICAgIGJyZWFrOw0KLSAgICAgIH0NCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIExv YWQgYW5kIHN0YXJ0IHRoZSBpbWFnZS4NCi0gICAgICAvLw0KLSAgICAgIFN0YXR1cyA9IGdCUy0+ TG9hZEltYWdlICgNCi0gICAgICAgICAgICAgICAgICAgICAgQm9vdE9wdGlvbiwNCi0gICAgICAg ICAgICAgICAgICAgICAgbURlZmVycmVkSW1hZ2VIYW5kbGUsDQotICAgICAgICAgICAgICAgICAg ICAgIEltYWdlRGV2aWNlUGF0aCwNCi0gICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAg ICAgICAgICAgICAgICAgICAgMCwNCi0gICAgICAgICAgICAgICAgICAgICAgJkltYWdlSGFuZGxl DQotICAgICAgICAgICAgICAgICAgICAgICk7DQotICAgICAgaWYgKCFFRklfRVJST1IgKFN0YXR1 cykpIHsNCi0gICAgICAgIC8vDQotICAgICAgICAvLyBCZWZvcmUgY2FsbGluZyB0aGUgaW1hZ2Us IGVuYWJsZSB0aGUgV2F0Y2hkb2cgVGltZXIgZm9yDQotICAgICAgICAvLyBhIDUgTWludXRlIHBl cmlvZA0KLSAgICAgICAgLy8NCi0gICAgICAgIGdCUy0+U2V0V2F0Y2hkb2dUaW1lciAoNSAqIDYw LCAweDAwMDAsIDB4MDAsIE5VTEwpOw0KLSAgICAgICAgU3RhdHVzID0gZ0JTLT5TdGFydEltYWdl IChJbWFnZUhhbmRsZSwgJkV4aXREYXRhU2l6ZSwgJkV4aXREYXRhKTsNCi0NCi0gICAgICAgIC8v DQotICAgICAgICAvLyBDbGVhciB0aGUgV2F0Y2hkb2cgVGltZXIgYWZ0ZXIgdGhlIGltYWdlIHJl dHVybnMuDQotICAgICAgICAvLw0KLSAgICAgICAgZ0JTLT5TZXRXYXRjaGRvZ1RpbWVyICgweDAw MDAsIDB4MDAwMCwgMHgwMDAwLCBOVUxMKTsNCi0gICAgICB9DQotICAgICAgRHJpdmVySW5kZXgr KzsNCi0gICAgfSB3aGlsZSAoVFJVRSk7DQotICB9DQotICBGcmVlUG9vbCAoSGFuZGxlQnVmKTsN Ci19DQotDQotDQotLyoqDQotICBSZWdpc3RlciBhbiBldmVudCBub3RpZmljYXRpb24gZnVuY3Rp b24gZm9yIHVzZXIgcHJvZmlsZSBjaGFuZ2VkLg0KLQ0KLSAgQHBhcmFtW2luXSA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GUgKA0KLSAgSU4gT1VUICBVU0VSX1BST0ZJTEVfRU5UUlkgICAgICAgICAgICAgICAg ICAgICoqVXNlciwNCi0gIElOICAgICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBOZXh0VXNlciwNCi0gICAgIE9VVCAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqUHJvZmlsZUluZGV4IE9QVElPTkFMDQotICApDQotew0KLSAgVUlOVE4gICAgICAg ICAgICAgICBJbmRleDsNCi0NCi0gIC8vDQotICAvLyBDaGVjayBwYXJhbWV0ZXJzDQotICAvLw0K LSAgaWYgKChtVXNlclByb2ZpbGVEYiA9PSBOVUxMKSB8fCAoVXNlciA9PSBOVUxMKSkgew0KLSAg ICByZXR1cm4gRUZJX05PVF9GT1VORDsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBDaGVjayB3aGV0 aGVyIHRoZSB1c2VyIHByb2ZpbGUgaXMgaW4gdGhlIHVzZXIgcHJvZmlsZSBkYXRhYmFzZS4NCi0g IC8vDQotICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBtVXNlclByb2ZpbGVEYi0+VXNlclByb2Zp bGVOdW07IEluZGV4KyspIHsNCi0gICAgaWYgKG1Vc2VyUHJvZmlsZURiLT5Vc2VyUHJvZmlsZVtJ bmRleF0gPT0gKlVzZXIpIHsNCi0gICAgICBpZiAoUHJvZmlsZUluZGV4ICE9IE5VTEwpIHsNCi0g ICAgICAgICpQcm9maWxlSW5kZXggPSBJbmRleDsNCi0gICAgICB9DQotICAgICAgYnJlYWs7DQot ICAgIH0NCi0gIH0NCi0NCi0gIGlmIChOZXh0VXNlcikgew0KLSAgICAvLw0KLSAgICAvLyBGaW5k IHRoZSBuZXh0IHVzZXIgcHJvZmlsZS4NCi0gICAgLy8NCi0gICAgSW5kZXgrKzsNCi0gICAgaWYg KEluZGV4IDwgbVVzZXJQcm9maWxlRGItPlVzZXJQcm9maWxlTnVtKSB7DQotICA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gZm91bmQgaW4gdXNlciBw cm9maWxlLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1GaW5kVXNlckluZm8gKA0KLSAgSU4gICAg IFVTRVJfUFJPRklMRV9FTlRSWSAgICAgICAgICAgICAgICAgICAgKiBVc2VyLA0KLSAgSU4gT1VU IEVGSV9VU0VSX0lORk8gICAgICAgICAgICAgICAgICAgICAgICAgKipJbmZvLA0KLSAgSU4gICAg IEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTmV4dEluZm8sDQotICAgICBP VVQgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqT2Zmc2V0IE9QVElPTkFM DQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgICBTdGF0dXM7DQotICBFRklfVVNFUl9JTkZPICpV c2VySW5mbzsNCi0gIFVJTlROICAgICAgICAgSW5mb0xlbjsNCi0NCi0gIGlmIChJbmZvID09IE5V TEwpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0gIC8v DQotICAvLyBDaGVjayB1c2VyIHByb2ZpbGUgZW50cnkNCi0gIC8vDQotICBTdGF0dXMgPSBGaW5k VXNlclByb2ZpbGUgKCZVc2VyLCBGQUxTRSwgTlVMTCk7DQotICBpZiAoRUZJX0VSUk9SIChTdGF0 dXMpKSB7DQotICAgIHJldHVybiBTdGF0dXM7DQotICB9DQotDQotICAvLw0KLSAgLy8gRmluZCB1 c2VyIGluZm9ybWF0aW9uIGluIHRoZSBzcGVjaWZpZWQgdXNlciByZWNvcmQuDQotICAvLw0KLSAg SW5mb0xlbiA9IDA7DQotICB3aGlsZSAoSW5mb0xlbiA8IFVzZXItPlVzZXJQcm9maWxlU2l6ZSkg ew0KLSAgICBVc2VySW5mbyA9IChFRklfVVNFUl9JTkZPICopIChVc2VyLT5Qcm9maWxlSW5mbyAr IEluZm9MZW4pOw0KLSAgICBpZiAoVXNlckluZm8gPT0gK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B1c2VyIGluZm9ybWF0aW9uIHJlY29yZCBvciBOVUxMIHRvIHN0 YXJ0DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VhcmNoaW5nIHdpdGggdGhlIGZpcnN0 IHVzZXIgaW5mb3JtYXRpb24gcmVjb3JkLg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgIE9u IHJldHVybiwgcG9pbnRzIHRvIHRoZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZCBvciBOVUxMIGlm IG5vdCBmb3VuZC4NCi0gIEBwYXJhbVtpbl0gICAgICBJbmZvVHlwZSBUaGUgaW5mb21hdGlvbiB0 eXBlIHRvIGJlIHNlYXJjaGVkLg0KLQ0KLSAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAg VXNlciBpbmZvcm1hdGlvbiB3YXMgZm91bmQuIEluZm8gcG9pbnRzIHRvIHRoZSB1c2VyIGluZm9y bWF0aW9uIHJlY29yZC4NCi0gIEByZXR2YWwgRUZJX05PVF9GT1VORCAgICAgICAgIFVzZXIgaW5m b3JtYXRpb24gd2FzIG5vdCBmb3VuZC4NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVS IFVzZXIgaXMgTlVMTCBvciBJbmZvIGlzIE5VTEwuDQotDQotKiovDQotRUZJX1NUQVRVUw0KLUZp bmRVc2VySW5mb0J5VHlwZSAoDQotICBJTiAgICAgIFVTRVJfUFJPRklMRV9FTlRSWSAgICAgICAg ICAgICAgICAgICAgKlVzZXIsDQotICBJTiBPVVQgIEVGSV9VU0VSX0lORk8gICAgICAgICAgICAg ICAgICAgICAgICAgKipJbmZvLA0KLSAgSU4gICAgICBVSU5UOCAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEluZm9UeXBlDQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgICBTdGF0dXM7 DQotICBFRklfVVNFUl9JTkZPICpVc2VySW5mbzsNCi0gIFVJTlROICAgICAgICAgSW5mb0xlbjsN Ci0N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c2VyLCBGQUxTRSwgTlVMTCk7 DQotDQotICB3aGlsZSAoIUVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAvLw0KLSAgICAvLyBG aW5kIHRoZSB1c2VyIGluZm9ybWF0aW9uIGluIGEgdXNlciBwcm9maWxlLg0KLSAgICAvLw0KLSAg ICB3aGlsZSAoVFJVRSkgew0KLSAgICAgIFN0YXR1cyA9IEZpbmRVc2VySW5mb0J5VHlwZSAoKlVz ZXIsICZJbmZvRW50cnksIEluZm8tPkluZm9UeXBlKTsNCi0gICAgICBpZiAoRUZJX0VSUk9SIChT dGF0dXMpKSB7DQotICAgICAgICBicmVhazsNCi0gICAgICB9DQotDQotICAgICAgaWYgKEluZm9T aXplID09IEluZm8tPkluZm9TaXplKSB7DQotICAgICAgICBpZiAoQ29tcGFyZU1lbSAoKFVJTlQ4 ICopIChJbmZvRW50cnkgKyAxKSwgKFVJTlQ4ICopIChJbmZvICsgMSksIEluZm9TaXplIC0gc2l6 ZW9mIChFRklfVVNFUl9JTkZPKSkgPT0gMCkgew0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICAv LyBGb3VuZCB0aGUgaW5mb21hdGlvbiByZWNvcmQuDQotICAgICAgICAgIC8vDQotICAgICAgICAg IGlmIChVc2VySW5mbyAhPSBOVUxMKSB7DQotICAgICAgICAgICAgKlVzZXJJbmZvID0gSW5mb0Vu dHJ5Ow0KLSAgICAgICAgICB9DQotICAgICAgICAgIHJldHVybiBFRklfU1VDQ0VTUzsNCi0gICAg ICAgIH0NCi0gICAgICB9DQotICAgIH0NCi0NCi0gICAgLy8NCi0gICAgLy8gR2V0IG5leHQgdXNl ciBwcm9maWxlLg0KLSAgICAvLw0KLSAgICBJbmZvRW50cnkgPSBOVUxMOw0KLSAgICBTdGF0dXMg ICAgPSBGaW5kVXNlclByb2ZpbGUgKFVzZXIsIFRSVUUsIE5VTEwpOw0KLSAgfQ0KLQ0KLSAgcmV0 dXJuIEVGSV9OT1RfRk9VTkQ7DQ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UgICAgIFRoZSBwb2xpY3kgaXMgYSB2YWxpZCBpZGVu dGl0eSBwb2xpY3kuDQotICBAcmV0dmFsIEZBTFNFICAgIFRoZSBhY2Nlc3MgcG9saWN5IGlzIG5v dCBhIHZhbGlkIGlkZW50aXR5IHBvbGljeS4NCi0NCi0qKi8NCi1CT09MRUFODQotQ2hlY2tJZGVu dGl0eVBvbGljeSAoDQotICBJTiAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKlBvbGljeUluZm8sDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgSW5mb0xlbg0KLSAgKQ0KLXsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAg ICAgICAgIFRvdGFsTGVuOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgVmFsdWVM ZW47DQotICBFRklfVVNFUl9JTkZPX0lERU5USVRZX1BPTElDWSAqSWRlbnRpdHk7DQotDQotICBU b3RhbExlbiAgPSAwOw0KLQ0KLSAgLy8NCi0gIC8vIENoZWNrIGVhY2ggcGFydCBvZiBwb2xpY3kg ZXhwcmVzc2lvbi4NCi0gIC8vDQotICB3aGlsZSAoVG90YWxMZW4gPCBJbmZvTGVuKSB7DQotICAg IC8vDQotICAgIC8vIENoZWNrIGFjY2VzcyBwb2xpc3kgYWNjb3JkaW5nIHRvIHR5cGUuDQotICAg IC8vDQotICAgIElkZW50aXR5ICA9IChFRklfVVNFUl9JTkZPX0lERU5USVRZX1BPTElDWSAqKSAo UG9saWN5SW5mbyArIFRvdGFsTGVuKTsNCi0gICAgVmFsdWVMZW4gID0gSWRlbnRpdHktPkxlbmd0 aCAtIHNpemVvZiAoRUZJX1VTRVJfSU5GT19JREVOVElUWV9QT0xJQ1kpOw0KLSAgICBzd2l0Y2gg KElkZW50aXR5LT5UeXBlKSB7DQotICAgIC8vDQotICAgIC8vIENoZWNrIEZhbHNlIG9wdGlvbi4N Ci0gICAgLy8NCi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ZSBzcGVjaWZpZWQgUmlnaHRUeXBlIGlu IGN1cnJlbnQgdXNlciBwcm9maWxlLg0KLSAgQHJldHZhbCBGQUxTRSAgICBDYW4ndCBmaW5kIHRo ZSByaWdodCBpbiB0aGUgcHJvZmlsZS4NCi0NCi0qKi8NCi1CT09MRUFODQotQ2hlY2tDdXJyZW50 VXNlckFjY2Vzc1JpZ2h0ICgNCi0gIElOICAgICAgICBVSU5UMzIgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBSaWdodFR5cGUNCi0gICkNCi17DQotICBFRklfU1RBVFVTICAgICAgICAgICAg ICAgICAgICBTdGF0dXM7DQotICBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAqSW5mbzsN Ci0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgIFRvdGFsTGVuOw0KLSAgVUlOVE4gICAg ICAgICAgICAgICAgICAgICAgICAgQ2hlY2tMZW47DQotICBFRklfVVNFUl9JTkZPX0FDQ0VTU19D T05UUk9MICBBY2Nlc3M7DQotDQotICAvLw0KLSAgLy8gR2V0IHVzZXIgYWNjZXNzIHJpZ2h0IGlu Zm9ybWF0aW9uLg0KLSAgLy8NCi0gIEluZm8gPSBOVUxMOw0KLSAgU3RhdHVzID0gRmluZFVzZXJJ bmZvQnlUeXBlICgNCi0gICAgICAgICAgICAoVVNFUl9QUk9GSUxFX0VOVFJZICopIG1DdXJyZW50 VXNlciwNCi0gICAgICAgICAgICAmSW5mbywNCi0gICAgICAgICAgICBFRklfVVNFUl9JTkZPX0FD Q0VTU19QT0xJQ1lfUkVDT1JEDQotICAgICAgICAgICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0 YXR1cykpIHsNCi0gICAgcmV0dXJuIEZBTFNFOw0KLSAgfQ0KLQ0KLSAgQVNTRVJUIChJbmZvICE9 IE5VTEwpOw0KLSAgVG90YWxMZW4gID0gSW5mby0+SW5mb1NpemUgLSBzaXplb2YgKEVGSV9VU0VS X0lORk8pOw0KLSAgQ2hl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ZXJvcy4NCi0gIC8vDQotICBmb3IgKEluZGV4ID0g MDsgSW5kZXggPCBzaXplb2YgKEVGSV9USU1FKTsgSW5kZXgrKykgew0KLSAgICBpZiAoSWRlbnRp ZmllcltJbmRleF0gPT0gMCkgew0KLSAgICAgIElkZW50aWZpZXJbSW5kZXhdID0gMHg1YTsNCi0g ICAgfQ0KLSAgfQ0KLQ0KLSAgTW9ub3RvbmljUG9pbnRlciA9IChVSU5UMzIgKikgSWRlbnRpZmll cjsNCi0gIGdCUy0+R2V0TmV4dE1vbm90b25pY0NvdW50ICgmTW9ub3RvbmljQ291bnQpOw0KLSAg TW9ub3RvbmljUG9pbnRlclswXSArPSAoVUlOVDMyKSBNb25vdG9uaWNDb3VudDsNCi0gIE1vbm90 b25pY1BvaW50ZXJbMV0gKz0gKFVJTlQzMikgTW9ub3RvbmljQ291bnQ7DQotICBNb25vdG9uaWNQ b2ludGVyWzJdICs9IChVSU5UMzIpIE1vbm90b25pY0NvdW50Ow0KLSAgTW9ub3RvbmljUG9pbnRl clszXSArPSAoVUlOVDMyKSBNb25vdG9uaWNDb3VudDsNCi19DQotDQotDQotLyoqDQotICBHZW5l cmF0ZSB1bmlxdWUgdXNlciBJRC4NCi0NCi0gIEBwYXJhbVtvdXRdICBVc2VySWQgICAgICAgICAg ICAgICAgIFBvaW50cyB0byB0aGUgdXNlciBpZGVudGlmZXIuDQotDQotKiovDQotVk9JRA0KLUdl bmVyYXRlVXNlcklkICgNCi0gIE9VVCAgICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAqVXNlcklkDQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgU3RhdHVz Ow0KLSAgVVNFUl9QUk9GSUxFX0VOVFJZICAgICAgKlVzZXJQcm9maWxlOw0KLSAgRUZJX1VTRVJf SU5GTyAgICAgICAgICAgKlVzZXJJbmZvOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgSW5k ZXg7DQotDQotICAvLw0K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K LUFkZFVzZXJJbmZvICgNCi0gIElOICBVU0VSX1BST0ZJTEVfRU5UUlkgICAgICAgICAgICAgICAg ICAgICAgICAqVXNlciwNCi0gIElOICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqSW5mbywNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBJbmZvU2l6ZSwNCi0gIE9VVCBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAqKlVzZXJJbmZvLCBPUFRJT05BTA0KLSAgSU4gIEJPT0xFQU4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFNhdmUNCi0gICkNCi17DQotICBFRklfU1RBVFVTICBT dGF0dXM7DQotDQotICBpZiAoKEluZm8gPT0gTlVMTCkgfHwgKFVzZXIgPT0gTlVMTCkpIHsNCi0g ICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBD aGVjayB1c2VyIHByb2ZpbGUgaGFuZGxlLg0KLSAgLy8NCi0gIFN0YXR1cyA9IEZpbmRVc2VyUHJv ZmlsZSAoJlVzZXIsIEZBTFNFLCBOVUxMKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsN Ci0gICAgcmV0dXJuIFN0YXR1czsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBDaGVjayB1c2VyIGlu Zm9ybWF0aW9uIG1lbW9yeSBzaXplLg0KLSAgLy8NCi0gIGlmIChVc2VyLT5NYXhQcm9maWxlU2l6 ZSAtIFVzZXItPlVzZXJQcm9maWxlU2l6ZSA8IEFMSUdOX1ZBUklBQkxFIChJbmZvU2l6ZSkpIHsN Ci0gICAgaWYgKCFFeHBhbmRVc2VyUHJvZmlsZSAoVXNlciwgQUxJR05fVkFSSUFCTEUgKEluZm9T aXplKSkpIHsNCi0gICAgICByZXR1cm4gRUZJX09VVF9PRl9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zZXJJbmZvICgNCi0gIElOICAg ICAgICBVU0VSX1BST0ZJTEVfRU5UUlkgICAgICAgICAgICAgICAgICAqVXNlciwNCi0gIElOICAg ICAgICBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAgICAgICAqVXNlckluZm8sDQotICBP VVQgICAgICAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICAgICAgICAgICAgKkluZm8sDQotICBJ TiBPVVQgICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkluZm9TaXplLA0K LSAgSU4gICAgICAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIENoa1JpZ2h0 DQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgU3RhdHVzOw0KLQ0KLSAgaWYgKChJbmZvU2l6ZSA9 PSBOVUxMKSB8fCAoVXNlckluZm8gPT0gTlVMTCkpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElE X1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0gIGlmICgoKkluZm9TaXplICE9IDApICYmIChJbmZvID09 IE5VTEwpKSB7DQotICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7DQotICB9DQotDQot ICAvLw0KLSAgLy8gRmluZCB0aGUgdXNlciBpbmZvcm1hdGlvbiB0byBnZXQuDQotICAvLw0KLSAg U3RhdHVzID0gRmluZFVzZXJJbmZvIChVc2VyLCAmVXNlckluZm8sIEZBTFNFLCBOVUxMKTsNCi0g IGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0YXR1czsNCi0gIH0NCi0N Ci0gIC8vDQotICAvLyBDaGVjayBpbmZvcm1hdGlvbiBhdHRyaWJ1dGVzLg0KLSAgLy8NCi0gIGlm IChDaGtSaWdodCkgew0KLSAgICBzd2l0Y2ggKFVzZXJJbmZvLT5JbmZvQXR0cmlicyAmIEVGSV9V U0VSX0lORk9fQUNDRVNTKSB7DQotICAgIGNhc2UgRUZJX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0gIEBwYXJhbVtp bl0gICAgICBJbmZvICAgICAgICAgICBQb2ludHMgdG8gdGhlIG5ldyB1c2VyIGluZm9ybWF0aW9u Lg0KLSAgQHBhcmFtW2luXSAgICAgIEluZm9TaXplICAgICAgIFRoZSBzaXplIG9mIEluZm8saW4g Ynl0ZXMuDQotDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiAgVXNlckluZm8gaXMg TlVMTCBvciBJbmZvIGlzIE5VTEwuDQotICBAcmV0dmFsIEVGSV9BQ0NFU1NfREVOSUVEICAgICAg VGhlIHJlY29yZCBpcyBleGNsdXNpdmUuDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAg ICAgVXNlciBpbmZvcm1hdGlvbiB3YXMgc3VjY2Vzc2Z1bGx5IGNoYW5nZWQvYWRkZWQuDQotDQot KiovDQotRUZJX1NUQVRVUw0KLU1vZGlmeVVzZXJJbmZvICgNCi0gIElOICAgICAgICBVU0VSX1BS T0ZJTEVfRU5UUlkgICAgICAgICAgICAgICAgICAqVXNlciwNCi0gIElOIE9VVCAgICBFRklfVVNF Ul9JTkZPICAgICAgICAgICAgICAgICAgICAgICAqKlVzZXJJbmZvLA0KLSAgSU4gQ09OU1QgIEVG SV9VU0VSX0lORk8gICAgICAgICAgICAgICAgICAgICAgICpJbmZvLA0KLSAgSU4gICAgICAgIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZm9TaXplDQotICApDQotew0KLSAg RUZJX1NUQVRVUyAgICBTdGF0dXM7DQotICBVSU5UTiAgICAgICAgIFBheWxvYWRMZW47DQotICBF RklfVVNFUl9JTkZPICpPbGRJbmZvOw0KLQ0KLSAgaWYgKChVc2VySW5mbyA9PSBOVUxMKSB8fCAo SW5mbyA9PSBOVUxMKSkgew0KLSAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KLSAg fQ0KLQ0KLSAgaWYgKEluZm9TaXplIDwgc2l6ZW9mIChFRkl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aXZlIGluZm9ybWF0aW9u Lg0KLSAgICAgICAgLy8NCi0gICAgICAgIHJldHVybiBFRklfQUNDRVNTX0RFTklFRDsNCi0gICAg ICB9DQotDQotICAgICAgLy8NCi0gICAgICAvLyBDaGVjayB3aGV0aGVyIGl0IGV4aXN0cyBpbiBE Qi4NCi0gICAgICAvLw0KLSAgICAgIGlmIChJbmZvLT5JbmZvU2l6ZSAhPSBPbGRJbmZvLT5JbmZv U2l6ZSkgew0KLSAgICAgICAgY29udGludWU7DQotICAgICAgfQ0KLQ0KLSAgICAgIGlmICghQ29t cGFyZUd1aWQgKCZPbGRJbmZvLT5DcmVkZW50aWFsLCAmSW5mby0+Q3JlZGVudGlhbCkpIHsNCi0g ICAgICAgIGNvbnRpbnVlOw0KLSAgICAgIH0NCi0NCi0gICAgICBQYXlsb2FkTGVuID0gSW5mby0+ SW5mb1NpemUgLSBzaXplb2YgKEVGSV9VU0VSX0lORk8pOw0KLSAgICAgIGlmIChQYXlsb2FkTGVu ID09IDApIHsNCi0gICAgICAgIGNvbnRpbnVlOw0KLSAgICAgIH0NCi0NCi0gICAgICBpZiAoQ29t cGFyZU1lbSAoKFVJTlQ4ICopKE9sZEluZm8gKyAxKSwgKFVJTlQ4ICopKEluZm8gKyAxKSwgUGF5 bG9hZExlbikgIT0gMCkgew0KLSAgICAgICAgY29udGludWU7DQotICAgICAgfQ0KLQ0KLSAgICAg IC8vDQotICAgICAgLy8gWWVzLiBUaGUgbmV3IGluZm8gaXMgYXMgc2FtZSBhcyB0aGUgb25lIGlu IHByb2ZpbGUuDQotICAgICAgLy8NCi0gICAgICByZXR1cm4gRUZJX1NVQ0NFU1M7DQotICAgIH0g d2hpbGUgKCFFRklfRVJST1IgKFN0YXR1cykpOw0KLQ0KLSAgICBTdGF0dXMgPSBBZGRVc2VySW5m byAoVXNlciwgKFVJTlQ4ICopIEluZm8sIEluZm9TaXplLCBVc2VySW5mbywgVFJVRSk7DQotICAg IHJldHVybiBTdGF0dXM7DQotICB9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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBGQUxTRSwgZG9uJ3Qgc2F2ZSB0 aGUgcHJvZmlsZSB0byBOViBmbGFzaC4NCi0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAg ICBBZGQgdXNlciBwcm9maWxlIHRvIHVzZXIgcHJvZmlsZSBkYXRhYmFzZSBzdWNjZXNzZnVsbHku DQotICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgICAgRmFpbCB0byBhZGQgdXNlciBwcm9maWxl IHRvIHVzZXIgcHJvZmlsZSBkYXRhYmFzZS4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotQWRkVXNl clByb2ZpbGUgKA0KLSAgICAgT1VUICBVU0VSX1BST0ZJTEVfRU5UUlkgICAgICAgICAgICAgICAg ICAgICoqVXNlclByb2ZpbGUsIE9QVElPTkFMDQotICBJTiAgICAgIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgUHJvZmlsZVNpemUsDQotICBJTiAgICAgIFVJTlQ4ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKlByb2ZpbGVJbmZvLA0KLSAgSU4gICAgICBCT09M RUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhdmUNCi0gICkNCi17DQotICBFRklf U1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7DQotICBVU0VSX1BST0ZJTEVfRU5UUlkgICAgICAq VXNlcjsNCi0NCi0gIC8vDQotICAvLyBDaGVjayB0aGUgZGF0YSBmb3JtYXQgdG8gYmUgYWRkZWQu DQotICAvLw0KLSAgaWYgKCFDaGVja1Byb2ZpbGVJbmZvIChQcm9maWxlSW5mbywgUHJvZmlsZVNp emUpKSB7DQotICAgIHJldHVybiBFRklfU0VDVVJJVFlfVklPTEFUSU9OOw0KLSAgfQ0KLQ0KLSAg Ly8NCi0gIC8vIENyZWF0ZSB1c2VyIHByb2ZpbGUgZW50cnkuDQotICAvLw0KLSAgVXNlciA9IE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dHkgcG9saWN5IGluIHdoaWNoIHRoZSBjcmVkZW50aWFsDQotICBwcm92aWRlciBo YW5kbGVzIGFyZSBjb25uZWN0ZWQgYnkgdGhlIG9wZXJhdG9yICdBTkQnIG9yICdPUicuDQotDQot DQotICBAcGFyYW1baW5dICAgVXNlciAgICAgICAgICAgICAgSGFuZGxlIG9mIGEgdXNlciBwcm9m aWxlLg0KLSAgQHBhcmFtW291dF0gIFBvbGljeVR5cGUgICAgICAgIFBvaW50IHRvIHRoZSBpZGVu dGl0eSB0eXBlLg0KLQ0KLSAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgIEdldCB1c2Vy J3MgaWRlbnRpdHkgdHlwZSBzdWNjZXNzZnVsbHkuDQotICBAcmV0dmFsIE90aGVycyAgICAgICAg ICAgICAgICAgRmFpbCB0byBnZXQgdXNlcidzIGlkZW50aXR5IHR5cGUuDQotDQotKiovDQotRUZJ X1NUQVRVUw0KLUdldElkZW50aWZ5VHlwZSAoDQotICBJTiAgICAgIEVGSV9VU0VSX1BST0ZJTEVf SEFORExFICAgICAgICAgICAgICAgVXNlciwNCi0gICAgIE9VVCAgVUlOVDggICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqUG9saWN5VHlwZQ0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMg ICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCi0gIEVGSV9VU0VSX0lORk8gICAgICAgICAgICAg ICAgICpJZGVudGlmeUluZm87DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBUb3Rh bExlbjsNCi0gIEVGSV9VU0VSX0lORk9fSURFTlRJVFlfUE9MSUNZICpJZGVudGl0eTsNCi0NCi0g IC8vDQotICAvLyBHZXQgdXNlciBpZGVudGlmeSBwb2xpY3kgaW5mb3JtYXRpb24uDQotICAvLw0K LSAgSWRlbnRpZnlJbmZvICA9IE5VTEw7DQotICBTdGF0dXMgICAgICAgID0gRmluZFVzZXJJbmZv QnlUeXBl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RoZSBVc2VyIGJ5IHRoZSBzcGVjZmllZCBw cm92aWRlci4NCi0NCi0gIEBwYXJhbVtpbl0gIFVzZXIgICAgICAgICAgICAgICAgSGFuZGxlIG9m IGEgdXNlciBwcm9maWxlLg0KLSAgQHBhcmFtW2luXSAgUHJvdmlkZXIgICAgICAgICAgICBQb2lu dHMgdG8gdGhlIGlkZW50aWZpZXIgb2YgY3JlZGVudGlhbCBwcm92aWRlci4NCi0NCi0gIEByZXR2 YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICAgUHJvdmlkZXIgaXMgTlVMTC4NCi0gIEByZXR2YWwg RUZJX05PVF9GT1VORCAgICAgICAgICAgRmFpbCB0byBpZGVudGlmeSB0aGUgc3BlY2lmaWVkIHVz ZXIuDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgIFVzZXIgaXMgaWRlbnRpZmll ZCBzdWNjZXNzZnVsbHkuDQotDQotKiovDQotRUZJX1NUQVRVUw0KLUlkZW50aWZ5QnlQcm92aWRl cklkICgNCi0gIElOICBFRklfVVNFUl9QUk9GSUxFX0hBTkRMRSAgICAgICAgICAgICAgICAgICBV c2VyLA0KLSAgSU4gIEVGSV9HVUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpQ cm92aWRlcg0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgICAgIFN0YXR1 czsNCi0gIEVGSV9VU0VSX0lORk9fSURFTlRJRklFUiAgICAgIFVzZXJJZDsNCi0gIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLSAgRUZJX0NSRURFTlRJQUxfTE9HT05fRkxB R1MgICAgQXV0b0xvZ29uOw0KLSAgRUZJX0hJSV9IQU5ETEUgICAgICAgICAgICAgICAgSGlpSGFu ZGxlOw0KLSAgRUZJX0dVSUQgICAgICAgICAgICAgICAgICAgICAgRm9ybVNldElkOw0KLSAgRUZJ X0ZPUk1fSUQgICAgICAg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gICAgICBVc2VyQ3JlZGVudGlh bCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZIaWlIYW5kbGUsDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRm9ybVNldElkLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJkZvcm1JZA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKTsNCi0gICAgICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAg ICAgICAgIC8vDQotICAgICAgICAgIC8vIFNlbmQgZm9ybSB0byBnZXQgdXNlciBpbnB1dC4NCi0g ICAgICAgICAgLy8NCi0gICAgICAgICAgU3RhdHVzID0gbUNhbGxiYWNrSW5mby0+Rm9ybUJyb3dz ZXIyLT5TZW5kRm9ybSAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtQ2FsbGJhY2tJbmZvLT5Gb3JtQnJvd3NlcjIsDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSGlpSGFuZGxlLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZGb3JtU2V0SWQsDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGb3JtSWQsDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0g ICAgICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgICAgICAgIHJldHVybiBT dGF0dXM7DQotICAgICAgICAgIH0NCi0gICAgICAgIH0NCi0gICAgICB9DQotDQotICAgICAgU3Rh dHVzID0gVXNlckNyZWRlbnRpYWwtPlVzZXIgKFVzZXJDcmVkZW50aWFsLCBVc2VyLCAmVXNlcklk KTsNCi0gICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgICAgICByZXR1cm4gU3Rh dHVzOw0KLSAgICAgIH0NCi0NCi0gICAgICBTdGF0dXMgPSBVc2VyQ3JlZGVudGlhbC0+RGVzZWxl Y3QgKFVzZXJDcmVkZW50aWFsKTsNCi0gICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQot ICAgICAgICByZXR1cm4gU3RhdHVzOw0KLSAgICAgIH0NCi0NCi0gICAgICByZXR1cm4gRUZJX1NV Q0NFU1M7DQotICAgIH0NCi0gIH0NCi0NCi0gIHJldHVybiBFRklfTk9UX0ZPVU5EOw0KLX0NCi0N Ci0NCi0vKioNCi0gIFVwZGF0ZSB1c2VyIGluZm9ybWF0aW9uIHdoZW4gdXNlciBpcyBsb2dvbiBv biBzdWNjZXNzZnVsbHkuDQotDQotICBAcGFyYW1baW5dICBVc2VyICAgICAgICAgUG9pbnRzIHRv IHVzZXIgcHJvZmlsZS4NCi0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICBVcGRhdGUgdXNl ciBpbmZvcm1hdGlvbiBzdWNjZXNzZnVsbHkuDQotICBAcmV0dmFsIE90aGVycyAgICAgICAgICAg RmFpbCB0byB1cGRhdGUgdXNlciBpbmZvcm1hdGlvbi4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQot VXBkYXRlVXNlckluZm8gKA0KLSAgSU4gIFVTRVJfUFJPRklMRV9FTlRSWSAgICAgICAgICAgICAg ICAgICAgICAgICpVc2VyDQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICBT dGF0dXM7DQotICBFRklfVVNFUl9JTkZP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QotICBAcGFyYW1b aW5dICBQcm92aWRlckd1aWQgICAgICAgIFBvaW50cyB0byB0aGUgaWRlbnRpZmlyIG9mIGNyZWRl bnRpYWwgcHJvdmlkZXIuDQotICBAcGFyYW1baW5dICBPcENvZGVIYW5kbGUgICAgICAgIFBvaW50 cyB0byBjb250YWluZXIgZm9yIGR5bmFtaWMgY3JlYXRlZCBvcGNvZGVzLg0KLQ0KLSoqLw0KLVZP SUQNCi1BZGRQcm92aWRlclNlbGVjdGlvbiAoDQotICBJTiAgICAgRUZJX0dVSUQgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKlByb3ZpZGVyR3VpZCwNCi0gIElOICAgICBWT0lEICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqT3BDb2RlSGFuZGxlDQotICApDQotew0KLSAg RUZJX0hJSV9IQU5ETEUgICAgICAgICAgICAgICAgSGlpSGFuZGxlOw0KLSAgRUZJX1NUUklOR19J RCAgICAgICAgICAgICAgICAgUHJvdklEOw0KLSAgQ0hBUjE2ICAgICAgICAgICAgICAgICAgICAg ICAgKlByb3ZTdHI7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0g IEVGSV9VU0VSX0NSRURFTlRJQUwyX1BST1RPQ09MICpVc2VyQ3JlZGVudGlhbDsNCi0NCi0gIGZv ciAoSW5kZXggPSAwOyBJbmRleCA8IG1Qcm92aWRlckRiLT5Db3VudDsgSW5kZXgrKykgew0KLSAg ICBVc2VyQ3JlZGVudGlhbCA9IG1Qcm92aWRlckRiLT5Qcm92aWRlcltJbmRleF07DQotICAgIGlm IChDb21wYXJlR3VpZCAoJlVzZXJDcmVkZW50aWFsLT5JZGVudGlmaWVyLCBQcm92aWRlckd1aWQp KSB7DQotICAgICAgLy8NCi0gICAgICAvLyBBZGQgY3JlZGVudGlhbCBwcm92aWRlciBzZWxlY3Rp b24uDQotICAgICAgLy8NCi0gICAgICBVc2VyQ3JlZGVudGlhbC0+VGl0bGUgKFVzZXJDcmVkZW50 aWFsLCAmSGlpSGFuZGxlLCAmUHJvdklEKTsNCi0gICAgICBQcm92U3RyID0gSGlpR2V0U3RyaW5n IChIaWlIYW5kbGUsIFByb3ZJRCwgTlVMTCk7DQotICAgICAgaWYgKFByb3ZTdHIgPT0gTlVMTCkg ew0KLSAgICAgICAgY29udGludWUgOw0KLSAgICAgIH0NCi0gICAgICBQcm92SUQgID0gSGlpU2V0 U3RyaW5nIChtQ2FsbGJhY2tJbmZvLT5IaWlIYW5kbGUsIDAsIFByb3ZTdHIsIE5VTEwpOw0KLSAg ICAgIEZyZWVQb29sIChQcm92U3RyKTsNCi0gICAgICBIaWlDcmVhdGVBY3Rpb25PcENvZGUgKA0K LSAgICAgICAgT3BDb2RlSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29udGFp bmVyIGZvciBkeW5hbWljIGNyZWF0ZWQgb3Bjb2Rlcw0KLSAgICAgICAgKEVGSV9RVUVTVElPTl9J RCkoTEFCRUxfUFJPVklERVJfTkFNRSArIEluZGV4KSwgIC8vIFF1ZXN0aW9uIElEDQotICAgICAg ICBQcm92SUQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQcm9tcHQgdGV4dA0K LSAgICAgICAgU1RSSU5HX1RPS0VOIChTVFJfTlVMTF9TVFJJTkcpLCAgICAgICAgLy8gSGVscCB0 ZXh0DQotICAgICAgICBFRklfSUZSX0ZMQUdfQ0FMTEJBQ0ssICAgICAgICAgICAgICAgICAvLyBR dWVzdGlvbiBmbGFnDQotICAgICAgICAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAvLyBBY3Rpb24gU3RyaW5nIElEDQotICAgICAgICApOw0KLSAgICAgIGJyZWFrOw0KLSAg ICB9DQotICB9DQotfQ0KLQ0KLQ0KLS8qKg0KLSAgQWRkIGEgdXNlcm5hbWUgaXRlbSBpbiBmb3Jt Lg0KLQ0KLSAgQHBhcmFtW2luXSAgSW5kZX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gdXNlciBpcyBpZGVudGlmaWVkIHN1Y2Nlc3NmdWxs eS4NCi0gIEByZXR2YWwgT3RoZXJzICAgICAgICAgICAgICAgRmFpbCB0byBpZGVudGlmeSB0aGUg dXNlci4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotSWRlbnRpZnlBbmRUeXBlVXNlciAoDQotICBJ TiAgVVNFUl9QUk9GSUxFX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgKlVzZXINCi0gICkN Ci17DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBFRklfVVNF Ul9JTkZPICAgICAgICAgICAgICAgICAqSWRlbnRpZnlJbmZvOw0KLSAgQk9PTEVBTiAgICAgICAg ICAgICAgICAgICAgICAgU3VjY2VzczsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAg IFRvdGFsTGVuOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgVmFsdWVMZW47DQot ICBFRklfVVNFUl9JTkZPX0lERU5USVRZX1BPTElDWSAqSWRlbnRpdHk7DQotDQotICAvLw0KLSAg Ly8gR2V0IHVzZXIgaWRlbnRpZnkgcG9saWN5IGluZm9ybWF0aW9uLg0KLSAgLy8NCi0gIElkZW50 aWZ5SW5mbyAgPSBOVUxMOw0KLSAgU3RhdHVzICAgICAgICA9IEZpbmRVc2VySW5mb0J5VHlwZSAo VXNlciwgJklkZW50aWZ5SW5mbywgRUZJX1VTRVJfSU5GT19JREVOVElUWV9QT0xJQ1lfUkVDT1JE KTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0YXR1czsNCi0g IH0NCi0gIEFTU0VSVCAoSWRlbnRpZnlJbmZvICE9IE5VTEwpOw0KLQ0KLSAgLy8NCi0gIC8vIENo ZWNrIGVhY2ggcGFydCBvZiBpZGVudGlmaWNhdGlvbiBwb2xpY3kgZXhwcmVzc2lvbi4NCi0gIC8v DQotICBTdWNjZ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dXJuIEVGSV9OT1RfUkVB RFk7DQotICAgICAgfQ0KLQ0KLSAgICAgIFN1Y2Nlc3MgPSBGQUxTRTsNCi0gICAgICBicmVhazsN Ci0NCi0gICAgY2FzZSBFRklfVVNFUl9JTkZPX0lERU5USVRZX09SOg0KLSAgICAgIC8vDQotICAg ICAgLy8gQ2hlY2sgb3Igb3BlcmF0aW9uLg0KLSAgICAgIC8vDQotICAgICAgaWYgKFN1Y2Nlc3Mp IHsNCi0gICAgICAgIHJldHVybiBFRklfU1VDQ0VTUzsNCi0gICAgICB9DQotICAgICAgYnJlYWs7 DQotDQotICAgIGNhc2UgRUZJX1VTRVJfSU5GT19JREVOVElUWV9DUkVERU5USUFMX1RZUEU6DQot ICAgICAgLy8NCi0gICAgICAvLyBDaGVjayBjcmVkZW50aWFsIHByb3ZpZGVyIGJ5IHR5cGUuDQot ICAgICAgLy8NCi0gICAgICBicmVhazsNCi0NCi0gICAgY2FzZSBFRklfVVNFUl9JTkZPX0lERU5U SVRZX0NSRURFTlRJQUxfUFJPVklERVI6DQotICAgICAgLy8NCi0gICAgICAvLyBDaGVjayBjcmVk ZW50aWFsIHByb3ZpZGVyIGJ5IElELg0KLSAgICAgIC8vDQotICAgICAgaWYgKFZhbHVlTGVuICE9 IHNpemVvZiAoRUZJX0dVSUQpKSB7DQotICAgICAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1F VEVSOw0KLSAgICAgIH0NCi0NCi0gICAgICBTdGF0dXMgPSBJZGVudGlmeUJ5UHJvdmlkZXJJZCAo VXNlciwgKEVGSV9HVUlEICopIChJZGVudGl0eSArIDEpKTsNCi0gICAgICBpZiAoRUZJX0VSUk9S IChTdGF0dXMpKSB7DQotICAgICAgICByZXR1cm4gU3RhdHVzOw0KLSAgICAgIH0NCi0NCi0gICAg ICBTdWNjZXNzID0gVFJVRTsNCi0gICAgICBicmVhazsNCi0NCi0gICAgZGVmYXVsdDoNCi0gICAg ICByZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KLSAgICAgIGJyZWFrOw0KLSAgICB9DQot DQotICAgIFRvdGFsTGVuICs9IElkZW50aXR5LT5MZW5ndGg7DQotICB9DQotDQotICBpZiAoVG90 YWxMZW4gIT0gSWRlbnRpZnlJbmZvLT5JbmZvU2l6ZSAtIHNpemVvZiAoRUZJX1VTRVJfSU5GTykp IHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0gIGlmICgh U3VjY2Vzcykgew0KLSAgICByZXR1cm4gRUZJX05PVF9SRUFEWTsNCi0gIH0NCi0NCi0gIHJldHVy biBFRklfU1VDQ0VTUzsNCi19DQotDQotDQotLyoqDQotICBJZGVudGlmeSB0aGUgdXNlciB3aG9z ZSBpZGVudGl0eSBwb2xpY3kgZG9lcyBub3QgY29udGFpbiB0aGUgb3BlcmF0b3IgJ0FORCcuDQot DQotICBAcGFyYW1baW5dICBVc2VyICAgICAgICAgICAgIFBvaW50cyB0byB0aGUgdXNlciBwcm9m aWxlLg0KLQ0KLSAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICBUaGUgc3BlY2lmaWVkIHVz ZXIgaXMgaWRlbnRpZmllZCBzdWNjZXNzZnVsbHkuDQotICBAcmV0dmFsIE90aGVycyAgICAgICAg ICAgICAgIEZhaWwgdG8gaWRlbnRpZnkgdGhlIHVzZXIuDQotDQotKiovDQotRUZJX1NUQVRVUw0K LUlkZW50aWZ5T3JUeXBlVXNlciAoDQotICBJTiAgVVNFUl9QUk9GSUxFX0VOVFJZICAgICAgICAg ICAgICAgICAgICAgICAgKlVzZXINCi0gICkNCi17DQotICBFRklfU1RBVFVTICAgICAgICAgICAg ICAgICAgICBTdGF0dXM7DQotICBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAqSWRlbnRp ZnlJbmZvOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgVG90YWxMZW47DQotICBV SU5UTiAgICAgICAgICA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yZWF0ZSBIaWkgRXh0ZW5kIExhYmVs IE9wQ29kZS4NCi0gIC8vDQotICBTdGFydExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBI aWlDcmVhdGVHdWlkT3BDb2RlICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgU3RhcnRPcENvZGVIYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBzaXplb2YgKEVGSV9JRlJfR1VJRF9MQUJFTCkNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKTsNCi0gIFN0YXJ0TGFiZWwtPkV4dGVuZE9wQ29kZSAgPSBFRklf SUZSX0VYVEVORF9PUF9MQUJFTDsNCi0gIFN0YXJ0TGFiZWwtPk51bWJlciAgICAgICAgPSBMQUJF TF9QUk9WSURFUl9OQU1FOw0KLQ0KLSAgRW5kTGFiZWwgPSAoRUZJX0lGUl9HVUlEX0xBQkVMICop IEhpaUNyZWF0ZUd1aWRPcENvZGUgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgRW5kT3BDb2RlSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJmdFZmlJZnJUaWFub0d1aWQsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6 ZW9mIChFRklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApOw0KLSAgRW5kTGFiZWwtPkV4dGVuZE9wQ29kZSAgPSBFRklfSUZSX0VYVE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SAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGV4cG9ydGluZyBkcml2ZXIuDQotICBAcGFyYW0gIEFjdGlvblJlcXVlc3QgICAg ICAgICAgT24gcmV0dXJuLCBwb2ludHMgdG8gdGhlIGFjdGlvbiByZXF1ZXN0ZWQgYnkgdGhlDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgZnVuY3Rpb24uDQotDQot ICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgVGhlIGNhbGxiYWNrIHN1Y2Nlc3NmdWxs eSBoYW5kbGVkIHRoZSBhY3Rpb24uDQotICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgICAgICAg RmFpbCB0byBoYW5kbGUgdGhlIGFjdGlvbi4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJ DQotVXNlcklkZW50aWZ5TWFuYWdlckNhbGxiYWNrICgNCi0gIElOICBDT05TVCBFRklfSElJX0NP TkZJR19BQ0NFU1NfUFJPVE9DT0wgICAgICAqVGhpcywNCi0gIElOICBFRklfQlJPV1NFUl9BQ1RJ T04gICAgICAgICAgICAgICAgICAgICAgICBBY3Rpb24sDQotICBJTiAgRUZJX1FVRVNUSU9OX0lE ICAgICAgICAgICAgICAgICAgICAgICAgICAgUXVlc3Rpb25JZCwNCi0gIElOICBVSU5UOCAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUeXBlLA0KLSAgSU4gIEVGSV9JRlJfVFlQ RV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICpWYWx1ZSwNCi0gIE9VVCBFRklfQlJPV1NF Ul9BQ1RJT05fUkVRVUVTVCAgICAgICAgICAgICAgICAqQWN0aW9uUmVxdWVzdA0KLSAgKQ0KLXsN Ci0gIEVGSV9TVEFUVVMgICAgICAgICAgICAgIFN0YXR1czsNCi0gIFVTRVJfUFJPRklMRV9FTlRS WSAgICAgICpVc2VyOw0KLSAgVUlOVDggICA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hhbmRsZSA9IEhp aUFsbG9jYXRlT3BDb2RlSGFuZGxlICgpOw0KLSAgICAgIEFTU0VSVCAoRW5kT3BDb2RlSGFuZGxl ICE9IE5VTEwpOw0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8gQ3JlYXRlIEhpaSBFeHRlbmQgTGFi ZWwgT3BDb2RlLg0KLSAgICAgIC8vDQotICAgICAgU3RhcnRMYWJlbCA9IChFRklfSUZSX0dVSURf TEFCRUwgKikgSGlpQ3JlYXRlR3VpZE9wQ29kZSAoDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBTdGFydE9wQ29kZUhhbmRsZSwNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVM KQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAg ICBTdGFydExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQot ICAgICAgU3RhcnRMYWJlbC0+TnVtYmVyICAgICAgICA9IExBQkVMX1VTRVJfTkFNRTsNCi0NCi0g ICAgICBFbmRMYWJlbCA9IChFRklfSUZSX0dVSURfTEFCRUwgKikgSGlpQ3JlYXRlR3VpZE9wQ29k ZSAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5kT3BDb2Rl SGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZp SWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IE5VTEwsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9m IChFRklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKTsNCi0gICAgICBFbmRMYWJlbC0+RXh0ZW5kT3BDb2RlICA9IEVGSV9JRlJfRVhU RU5EX09QX0xBQkVMOw0KLSAgICAgIEVuZExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCRUxfRU5E Ow0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8gQWRkIGFsbCB0aGUgdXNlciBwcm9maWxlIGluIHRo ZSB1c2VyIHByb2ZpbGUgZGF0YWJhc2UuDQotICAgICAgLy8NCi0gICAgICBmb3IgKEluZGV4ID0g MDsgSW5kZXggPCBtVXNlclByb2ZpbGVEYi0+VXNlclByb2ZpbGVOdW07IEluZGV4KyspIHsNCi0g ICAgICAgIFVzZXIgPSAoVVNFUl9QUk9GSUxFX0VOVFJZICopIG1Vc2VyUHJvZmlsZURiLT5Vc2Vy UHJvZmlsZVtJbmRleF07DQotICAgICAgICBBZGRVc2VyU2VsZWN0aW9uICgoVUlOVDE2KShMQUJF TF9VU0VSX05BTUUgKyBJbmRleCksIFVzZXIsIFN0YXJ0T3BDb2RlSGFuZGxlKTsNCi0gICAgICB9 DQotDQotICAgICAgSGlpVXBkYXRlRm9ybSAoDQotICAgICAgICBtQ2FsbGJhY2tJbmZvLT5IaWlI YW5kbGUsIC8vIEhJSSBoYW5kbGUNCi0gICAgICAgICZnVXNlcklkZW50aWZ5TWFuYWdlckd1aWQs Ly8gRm9ybXNldCBHVUlEDQotICAgICAgICBGT1JNSURfVVNFUl9GT1JNLCAgICAgICAgIC8vIEZv cm0gSUQNCi0gICAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLCAgICAgICAgLy8gTGFiZWwgZm9yIHdo ZXJlIHRvIGluc2VydCBvcGNvZGVzDQotICAgICAgICBFbmRPcENvZGVIYW5k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z1bGx5Lg0KLSAgQHJldHZh bCBPdGhlcnMgICAgICAgICAgICAgICAgIEZhaWwgdG8gY29sbGVjdCBjcmVkZW50aWFsIHByb3Zp ZGVycy4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotSW5pdFByb3ZpZGVySW5mbyAoDQotICBWT0lE DQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgU3RhdHVzOw0KLSAgVUlOVE4gICAgICAgSGFuZGxl Q291bnQ7DQotICBFRklfSEFORExFICAqSGFuZGxlQnVmOw0KLSAgVUlOVE4gICAgICAgSW5kZXg7 DQotDQotICBpZiAobVByb3ZpZGVyRGIgIT0gTlVMTCkgew0KLSAgICAvLw0KLSAgICAvLyBUaGUg Y3JlZGVudGlhbCBwcm92aWRlcnMgaGFkIGJlZW4gY29sbGVjdGVkIGJlZm9yZS4NCi0gICAgLy8N Ci0gICAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIFRyeSB0byBm aW5kIGFsbCB0aGUgdXNlciBjcmVkZW50aWFsIHByb3ZpZGVyIGRyaXZlci4NCi0gIC8vDQotICBI YW5kbGVDb3VudCA9IDA7DQotICBIYW5kbGVCdWYgICA9IE5VTEw7DQotICBTdGF0dXMgPSBnQlMt PkxvY2F0ZUhhbmRsZUJ1ZmZlciAoDQotICAgICAgICAgICAgICAgICAgQnlQcm90b2NvbCwNCi0g ICAgICAgICAgICAgICAgICAmZ0VmaVVzZXJDcmVkZW50aWFsMlByb3RvY29sR3VpZCwNCi0gICAg ICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICZIYW5kbGVDb3VudCwNCi0g ICAgICAgICAgICAgICAgICAmSGFuZGxlQnVmDQotICAgICAgICAgICAgICAgICAgKTsNCi0gIGlm IChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0YXR1czsNCi0gIH0NCi0NCi0g IC8vDQotICAvLyBHZXQgcHJvdmlkZXIgaW5mb21hdGlvbi4NCi0gIC8vDQotICBtUHJvdmlkZXJE YiA9IEFsbG9jYXRlWmVyb1Bvb2wgKA0KLSAgICAgICAgICAgICAgICAgIHNpemVvZiAoQ1JFREVO VElBTF9QUk9WSURFUl9JTkZPKSAtDQotICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfVVNF Ul9DUkVERU5USUFMMl9QUk9UT0NPTCAqKSArDQotICAgICAgICAgICAgICAgICAgSGFuZGxlQ291 bnQgKiBzaXplb2YgKEVGSV9VU0VSX0NSRURFTlRJQUwyX1BST1RPQ09MICopDQotICAgICAgICAg ICAgICAgICAgKTsNCi0gIGlmIChtUHJvdmlkZXJEYiA9PSBOVUxMKSB7DQotICAgIEZyZWVQb29s IChIYW5kbGVCdWYpOw0KLSAgICByZXR1cm4gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQotICB9DQot DQotIG1Qcm92aWRlckRiLT5Db3VudCA9IEhhbmRsZUNvdW50Ow0KLSAgZm9yIChJbmRleCA9IDA7 IEluZGV4IDwgSGFuZGxlQ291bnQ7IEluZGV4KyspIHsNCi0gICAgU3RhdHVzID0gZ0JTLT5IYW5k bGVQcm90b2NvbCAoDQotICAgICAgICAgICAgICAgICAgICBIYW5kbGVCdWZbSW5kZXhdLA0KLSAg ICAgICAgICAgICAgICAgICAgJmdFZmlVc2VyQ3JlZGVudGlhbDJQcm90b2NvbEd1aWQsDQotICAg ICAgICAgICAgICAgICAgICAoVk9JRCAqKikgJm1Qcm92aWRlckRiLT5Qcm92aWRlcltJbmRleF0N Ci0gICAgICAgICAgICAgICAgICAgICk7DQotICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsN Ci0gICAgICBGcmVlUG9vbCAoSGFuZGxlQnVmKTsNCi0gICAgICBGcmVlUG9vbCAobVByb3ZpZGVy RGIpOw0KLSAgICAgIG1Qcm92aWRlckRiID0gTlVMTDsNCi0gICAgICByZXR1cm4gU3RhdHVzOw0K LSAgICB9DQotICB9DQotDQ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Byb3RvY29s IHRvIGRyaXZlciBoYW5kbGUuDQotICAvLw0KLSAgU3RhdHVzID0gZ0JTLT5JbnN0YWxsTXVsdGlw bGVQcm90b2NvbEludGVyZmFjZXMgKA0KLSAgICAgICAgICAgICAgICAgICZDYWxsYmFja0luZm8t PkRyaXZlckhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90b2Nv bEd1aWQsDQotICAgICAgICAgICAgICAgICAgJm1IaWlWZW5kb3JEZXZpY2VQYXRoLA0KLSAgICAg ICAgICAgICAgICAgICZnRWZpSGlpQ29uZmlnQWNjZXNzUHJvdG9jb2xHdWlkLA0KLSAgICAgICAg ICAgICAgICAgICZDYWxsYmFja0luZm8tPkNvbmZpZ0FjY2VzcywNCi0gICAgICAgICAgICAgICAg ICBOVUxMDQotICAgICAgICAgICAgICAgICAgKTsNCi0gIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1 cyk7DQotDQotICAvLw0KLSAgLy8gUHVibGlzaCBISUkgZGF0YS4NCi0gIC8vDQotICBDYWxsYmFj a0luZm8tPkhpaUhhbmRsZSA9IEhpaUFkZFBhY2thZ2VzICgNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmZ1VzZXJJZGVudGlmeU1hbmFnZXJHdWlkLA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIENhbGxiYWNrSW5mby0+RHJpdmVySGFuZGxlLA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFVzZXJJZGVudGlmeU1hbmFnZXJTdHJpbmdzLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFVzZXJJZGVudGlmeU1hbmFnZXJWZnJCaW4sDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICk7DQotICBpZiAoQ2FsbGJhY2tJbmZvLT5IaWlIYW5kbGUgPT0gTlVMTCkgew0KLSAgICByZXR1 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V9VU0VSX0lORk8pICsgc2l6ZW9mIChFRklfVVNFUl9JTkZPX0lERU5U SUZJRVIpKTsNCi0gIGlmIChJbmZvID09IE5VTEwpIHsNCi0gICAgcmV0dXJuIEVGSV9PVVRfT0Zf UkVTT1VSQ0VTOw0KLSAgfQ0KLQ0KLSAgSW5mby0+SW5mb1R5cGUgID0gRUZJX1VTRVJfSU5GT19J REVOVElGSUVSX1JFQ09SRDsNCi0gIEluZm8tPkluZm9TaXplICA9IHNpemVvZiAoRUZJX1VTRVJf SU5GTykgKyBzaXplb2YgKEVGSV9VU0VSX0lORk9fSURFTlRJRklFUik7DQotDQotICAvLw0KLSAg Ly8gSWRlbnRpZnkgdGhlIHNwZWNpZmllZCBjcmVkZW50aWFsIHByb3ZpZGVyJ3MgYXV0byBsb2dv biB1c2VyLg0KLSAgLy8NCi0gIFN0YXR1cyA9IG1Qcm92aWRlckRiLT5Qcm92aWRlcltQcm92aWRl ckluZGV4XS0+VXNlciAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbVByb3ZpZGVyRGItPlByb3ZpZGVyW1Byb3ZpZGVySW5kZXhdLA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEVGSV9VU0VS X0lORk9fSURFTlRJRklFUiAqKSAoSW5mbyArIDEpDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCi0gICAgRnJlZVBvb2wgKEluZm8pOw0KLSAgICByZXR1cm4gU3RhdHVzOw0KLSAgfQ0KLQ0K LSAgLy8NCi0gIC8vIEZpbmQgdXNlciB3aXRoIHRoZSBzcGVjaWZpZWQgdXNlciBJRC4NCi0gIC8v DQotICAqVXNlciAgID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ZA0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMg ICAgICAgICAgICAgICAgICAgU3RhdHVzOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAg ICBIYW5kbGVDb3VudDsNCi0gIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgKkhhbmRsZUJ1 ZjsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQotICBFRklfREVWSUNF X1BBVEhfUFJPVE9DT0wgICAgICpEZXZpY2VQYXRoOw0KLQ0KLSAgLy8NCi0gIC8vIFRyeSB0byBm aW5kIGFsbCB0aGUgaGFuZGxlIGRyaXZlci4NCi0gIC8vDQotICBIYW5kbGVDb3VudCA9IDA7DQot ICBIYW5kbGVCdWYgICA9IE5VTEw7DQotICBTdGF0dXMgPSBnQlMtPkxvY2F0ZUhhbmRsZUJ1ZmZl ciAoDQotICAgICAgICAgICAgICAgICAgQnlQcm90b2NvbCwNCi0gICAgICAgICAgICAgICAgICBQ cm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAg ICAmSGFuZGxlQ291bnQsDQotICAgICAgICAgICAgICAgICAgJkhhbmRsZUJ1Zg0KLSAgICAgICAg ICAgICAgICAgICk7DQotICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgIHJldHVybiBG QUxTRTsNCi0gIH0NCi0NCi0gIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IEhhbmRsZUNvdW50OyBJ bmRleCsrKSB7DQotICAgIERldmljZVBhdGggPSBEZXZpY2VQYXRoRnJvbUhhbmRsZSAoSGFuZGxl QnVmW0luZGV4XSk7DQotICAgIGlmIChEZXZpY2VQYXRoICE9IE5VTEwpIHsNCi0gICAgICBGcmVl UG9vbCAoSGFuZGxlQnVmKTsNCi0gICAgICByZXR1cm4gVFJVRTsNCi0gICAgfQ0KLSAgfQ0KLSAg RnJlZVBvb2wgKEhhbmRsZU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KSkgIT0gMCkgew0KLSAgICAgIFN0YXR1cyA9 IElkZW50aWZ5QXV0b0xvZ29uVXNlciAoSW5kZXgsICZVc2VyRW50cnkpOw0KLSAgICAgIGlmIChT dGF0dXMgPT0gRUZJX1NVQ0NFU1MpIHsNCi0gICAgICAgIG1DdXJyZW50VXNlciA9IChFRklfVVNF Ul9QUk9GSUxFX0hBTkRMRSkgVXNlckVudHJ5Ow0KLSAgICAgICAgVXBkYXRlVXNlckluZm8gKFVz ZXJFbnRyeSk7DQotICAgICAgICAqVXNlciA9IFVzZXJFbnRyeTsNCi0gICAgICAgIHJldHVybiBF RklfU1VDQ0VTUzsNCi0gICAgICB9DQotICAgIH0NCi0gIH0NCi0NCi0gIGlmICghSXNDb25zb2xl UmVhZHkgKCkpIHsNCi0gICAgLy8NCi0gICAgLy8gVGhlIGNvbnNvbGUgaXMgc3RpbGwgbm90IHJl YWR5IGZvciB1c2VyIHNlbGVjdGlvbi4NCi0gICAgLy8NCi0gICAgcmV0dXJuIEVGSV9BQ0NFU1Nf REVOSUVEOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIFNlbGVjdCBhIHVzZXIgYW5kIGlkZW50aWZ5 IGl0Lg0KLSAgLy8NCi0gIG1DYWxsYmFja0luZm8tPkZvcm1Ccm93c2VyMi0+U2VuZEZvcm0gKA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DYWxsYmFja0luZm8tPkZvcm1Ccm93 c2VyMiwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmbUNhbGxiYWNrSW5mby0+ SGlpSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJmdVc2VySWRlbnRpZnlNYW5hZ2VyR3VpZCwNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIE5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ICAgIGZvdW5kLg0KLSAgQHBhcmFtW2luLCBvdXRdIFVz ZXJJbmZvICAgICAgIE9uIGVudHJ5LCBwb2ludHMgdG8gdGhlIHByZXZpb3VzbHkgcmV0dXJuZWQg dXNlciBpbmZvcm1hdGlvbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRs ZSwgb3IgTlVMTCB0byBzdGFydCBzZWFyY2hpbmcgd2l0aCB0aGUgZmlyc3QuIE9uIHJldHVybiwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb2ludHMgdG8gdGhlIHVzZXIgaW5m b3JtYXRpb24gaGFuZGxlIG9mIHRoZSB1c2VyIGluZm9ybWF0aW9uDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcmVjb3JkLCBvciBOVUxMIGlmIG5vdCBmb3VuZC4gQ2FuIGJlIE5V TEwsIGluIHdoaWNoIGNhc2Ugb25seQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9uZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZCBwZXIgdXNlciBjYW4gYmUgcmV0dXJuZWQuDQot ICBAcGFyYW1baW5dICAgICAgSW5mbyAgICAgICAgICAgUG9pbnRzIHRvIHRoZSBidWZmZXIgY29u dGFpbmluZyB0aGUgdXNlciBpbmZvcm1hdGlvbiB0byBiZQ0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGNvbXBhcmVkIHRvIHRoZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZC4gSWYg dGhlIHVzZXIgaW5mb3JtYXRpb24NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBy ZWNvcmQgZGF0YSBpcyBlbXB0eSwgdGhlbiBvbmx5IHRoZSB1c2VyIGluZm9ybWF0aW9uIHJlY29y ZCB0eXBlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgY29tcGFyZWQuIElm IEluZm9TaXplIGlzIDAsIHRoZW4gdGhlIHVzZXIgaW5mb3JtYXRpb24gcmVjb3JkDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVzdCBiZSBlbXB0eS4NCi0NCi0gIEBwYXJhbVtp bl0gICAgICBJbmZvU2l6ZSAgICAgICBUaGUgc2l6ZSBvZiBJbmZvLCBpbiBieXRlcy4NCi0NCi0g IEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICBVc2VyIGluZm9ybWF0aW9uIHdhcyBmb3Vu ZC4gVXNlciBwb2ludHMgdG8gdGhlIHVzZXIgcHJvZmlsZQ0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGhhbmRsZSwgYW5kIFVzZXJJbmZvIHBvaW50cyB0byB0aGUgdXNlciBpbmZv cm1hdGlvbiBoYW5kbGUuDQotICBAcmV0dmFsIEVGSV9OT1RfRk9VTkQgICAgICAgICAgVXNlciBp bmZvcm1hdGlvbiB3YXMgbm90IGZvdW5kLiBVc2VyIHBvaW50cyB0byBOVUxMLCBhbmQNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VySW5mbyBwb2ludHMgdG8gTlVMTC4NCi0g IEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICBVc2VyIGlzIE5VTEwuIE9yIEluZm8gaXMg TlVMTC4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQotVXNlclByb2ZpbGVGaW5kICgN Ci0gIElOICAgICBDT05TVCBFRklfVVNFUl9NQU5BR0VSX1BST1RPQ09MICAgICAgICAqVGhpcywN Ci0gIElOIE9VVCBFRklfVVNFUl9QUk9GSUxFX0hBTkRMRSAgICAgICAgICAgICAgICAqVXNlciwN Ci0gIElOIE9VVCBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICAgICAgICAgICAgICAgICAqVXNlcklu Zm8gT1BUSU9OQUwsDQotICBJTiAgICAgQ09OU1QgRUZJX1VTRVJfSU5GTyAgICAgICAgICAgICAg ICAgICAgKkluZm8sDQotICBJTiAgICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgSW5mb1NpemUNCi0gICkNCi17DQotICBFRklfU1RBVFVTICBTdGF0dXM7DQotICBVSU5U TiAgICAgICBTaXplOw0KLQ0KLSAgaWYgKChUaGlzID09IE5VTEwpIHx8IChVc2VyID09IE5VTEwp IHx8IChJbmZvID09IE5VTEwpKSB7DQotICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7 DQotICB9DQotDQotICBpZiAoSW5mb1NpemUgPT0gMCkgew0KLSAgICAvLw0KLSAgICAvLyBJZiBJ bmZvU2l6ZSBpcyAwLCB0aGVuIHRoZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZCBtdXN0IGJlIGVt cHR5Lg0KLSAgICAvLw0KLSAgICBpZiAoSW5mby0+SW5mb1NpemUgIT0gc2l6ZW9mIChFRklfVVNF Ul9JTkZPKSkgew0KLSAgICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7DQotICAgIH0N Ci0gIH0gZWxzZSB7DQotICAgIGlmIChJbmZvU2l6ZSAhPSBJbmZvLT5JbmZvU2l6ZSkgew0KLSAg ICAgIHJldHVybiBFRklfSU5WQUxJRF9QQVJBTUVURVI7DQotICAgIH0NCi0gIH0NCi0gIFNpemUg PSBJbmZvLT5JbmZvU2l6ZTsNCi0NCi0gIC8vDQotICAvLyBGaW5kIHVzZXIgcHJvZmlsZSBhY2Nk b3JpbmcgdG8gdXNlciBpbmZvcm1hdGlvbi4NCi0gIC8vDQotICBTdGF0dXMgPSBGaW5kVXNlclBy b2ZpbGVCeUluZm8gKA0KLSAgICAgICAgICAgIChVU0VSX1BST0ZJTEVfRU5UUlkgKiopIFVzZXIs DQotICAgICAgICAgICAgKEVGSV9VU0VSX0lORk8gKiopIFVzZXJJbmZvLA0KLSAgICAgICAgICAg IChFRklfVVNFUl9JTkZPICopIEluZm8sDQotICAgICAgICAgICAgU2l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BJbmZvICAgICAgICAgICAgT24gZW50cnksIHBvaW50cyB0byBhIGJ1ZmZlciBvZiBhdCBs ZWFzdCAqSW5mb1NpemUgYnl0ZXMuIE9uIGV4aXQsDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGhvbGRzIHRoZSB1c2VyIGluZm9ybWF0aW9uLiBJZiB0aGUgYnVmZmVyIGlzIHRv byBzbWFsbCB0byBob2xkIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBp bmZvcm1hdGlvbiwgdGhlbiBFRklfQlVGRkVSX1RPT19TTUFMTCBpcyByZXR1cm5lZCBhbmQgSW5m b1NpemUgaXMNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlZCB0byBj b250YWluIHRoZSBudW1iZXIgb2YgYnl0ZXMgYWN0dWFsbHkgcmVxdWlyZWQuDQotICBAcGFyYW1b aW5dICAgICAgSW5mb1NpemUgICAgICAgIE9uIGVudHJ5LCBwb2ludHMgdG8gdGhlIHNpemUgb2Yg SW5mby4gT24gcmV0dXJuLCBwb2ludHMgdG8gdGhlIHNpemUNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgb2YgdGhlIHVzZXIgaW5mb3JtYXRpb24uDQotDQotICBAcmV0dmFsIEVG SV9TVUNDRVNTICAgICAgICAgICAgIEluZm9ybWF0aW9uIHJldHVybmVkIHN1Y2Nlc3NmdWxseS4N Ci0gIEByZXR2YWwgRUZJX0FDQ0VTU19ERU5JRUQgICAgICAgVGhlIHJlY29yZCBpcyBleGNsdXNp dmUuDQotICBAcmV0dmFsIEVGSV9TRUNVUklUWV9WSU9MQVRJT04gIFRoZSBjdXJyZW50IHVzZXIg ZG9lcyBub3QgaGF2ZSBwZXJtaXNzaW9uIHRvIGNoYW5nZSB0aGUgc3BlY2lmaWVkDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXIgcHJvZmlsZSBvciB1c2VyIGluZm9ybWF0 aW9uIHJlY29yZC4NCi0gIEByZXR2YWwgRUZJX05PVF9GT1VORCAgICAgICAgICAgVXNlciBkb2Vz IG5vdCByZWZlciB0byBhIHZhbGlkIHVzZXIgcHJvZmlsZSBvciBVc2VySW5mbyBkb2VzIG5vdA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZlciB0byBhIHZhbGlkIHVzZXIg aW5mbyBoYW5kbGUuDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiAgIFVzZXJJbmZv IGlzIE5VTEwgb3IgSW5mbyBpcyBOVUxMLg0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1V c2VyUHJvZmlsZVNldEluZm8gKA0KLSAgSU4gQ09OU1QgIEVGSV9VU0VSX01BTkFHRVJfUFJPVE9D T0wgICAgICAgICAgICpUaGlzLA0KLSAgSU4gICAgICAgIEVGSV9VU0VSX1BST0ZJTEVfSEFORExF ICAgICAgICAgICAgIFVzZXIsDQotICBJTiBPVVQgICAgRUZJX1VTRVJfSU5GT19IQU5ETEUgICAg ICAgICAgICAgICAgKlVzZXJJbmZvLA0KLSAgSU4gQ09OU1QgIEVGSV9VU0VSX0lORk8gICAgICAg ICAgICAgICAgICAgICAgICpJbmZvLA0KLSAgSU4gICAgICAgIFVJTlROICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEluZm9TaXplDQotICApDQotew0KLSAgRUZJX1NUQVRVUyAgU3RhdHVz Ow0KLQ0KLSAgaWYgKChUaGlzID09IE5VTEwpIHx8IChVc2VyID09IE5VTEwpIHx8IChVc2VySW5m byA9PSBOVUxMKSB8fCAoSW5mbyA9PSBOVUxMKSkgew0KLSAgICByZXR1cm4gRUZJX0lOVkFMSURf UEFSQU1FVEVSOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIENoZWNrIHRoZSByaWdodCBvZiB0aGUg Y3VycmVudCB1c2VyLg0KLSAgLy8NCi0gIGlmIChVc2VyICE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HByb2ZpbGUuDQotDQotICBAcmV0dmFsIEVGSV9TVUND RVNTICAgICAgICAgICAgIFVzZXIgcHJvZmlsZSB3YXMgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQuDQot ICBAcmV0dmFsIEVGSV9BQ0NFU1NfREVOSUVEICAgICAgIEN1cnJlbnQgdXNlciBkb2VzIG5vdCBo YXZlIHN1ZmZpY2llbnQgcGVybWlzc2lvbnMNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdG8gY3JlYXRlIGEgdXNlciBwcm9maWxlLg0KLSAgQHJldHZhbCBFRklfVU5TVVBQT1JU RUQgICAgICAgICBDcmVhdGlvbiBvZiBuZXcgdXNlciBwcm9maWxlcyBpcyBub3Qgc3VwcG9ydGVk Lg0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgICBVc2VyIGlzIE5VTEwuDQotDQot KiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLVVzZXJQcm9maWxlQ3JlYXRlICgNCi0gIElOIENP TlNUICBFRklfVVNFUl9NQU5BR0VSX1BST1RPQ09MICAgICAgICAgICAqVGhpcywNCi0gIE9VVCAg ICAgICBFRklfVVNFUl9QUk9GSUxFX0hBTkRMRSAgICAgICAgICAgICAqVXNlcg0KLSAgKTsNCi0N Ci0NCi0vKioNCi0gIERlbGV0ZSBhbiBleGlzdGluZyB1c2VyIHByb2ZpbGUuDQotDQotICBAcGFy YW0gIFRoaXMgICAgICAgICAgICAgICAgICAgIFByb3RvY29sIEVGSV9VU0VSX01BTkFHRVJfUFJP VE9DT0wgaW5zdGFuY2UNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRl ci4NCi0gIEBwYXJhbSAgVXNlciAgICAgICAgICAgICAgICAgICAgVXNlciBwcm9maWxlIGhhbmRs ZS4NCi0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICAgVXNlciBwcm9maWxlIHdh cyBzdWNjZXNzZnVsbHkgZGVsZXRlZC4NCi0gIEByZXR2YWwgRUZJX0FDQ0VTU19ERU5JRUQgICAg ICAgQ3VycmVudCB1c2VyIGRvZXMgbm90IGhhdmUgc3VmZmljaWVudCBwZXJtaXNzaW9ucw0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBkZWxldGUgYSB1c2VyIHByb2ZpbGUg b3IgdGhlcmUgaXMgb25seSBvbmUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg dXNlciBwcm9maWxlLg0KLSAgQHJldHZhbCBFRklfVU5TVVBQT1JURUQgICAgICAgICBEZWxldGlv biBvZiBuZXcgdXNlciBwcm9maWxlcyBpcyBub3Qgc3VwcG9ydGVkLg0KLSAgQHJldHZhbCBFRklf SU5WQUxJRF9QQVJBTUVURVIgICBVc2VyIGRvZXMgbm90IHJlZmVyIHRvIGEgdmFsaWQgdXNlciBw cm9maWxlLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1Vc2VyUHJvZmlsZURlbGV0 ZSAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJfTUFOQUdFUl9QUk9UT0NPTCAgICAgICAgICAgKlRo aXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJfUFJPRklMRV9IQU5ETEUgICAgICAgICAgICAgVXNl cg0KLSAgKTsNCi0NCi0NCi0vKioNCi0gIEdldCBuZXh0IHVzZXIgcHJvZmlsZSBmcm9tIHRoZSB1 c2VyIHByb2ZpbGUgZGF0YWJhc2UuDQotDQotICBAcGFyYW1baW5dICAgICAgIFRoaXMgICAgICAg ICAgIFByb3RvY29sIEVGSV9VU0VSX01BTkFHRVJfUFJPVE9DT0wgaW5zdGFuY2UNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlci4NCi0gIEBwYXJhbVtpbiwgb3V0XSAg VXNlciAgICAgICAgICAgVXNlciBwcm9maWxlIGhhbmRsZS4NCi0NCi0gIEByZ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JJbmZvIE9uIGVudHJ5LCBwb2ludHMgdG8gdGhl IHByZXZpb3VzbHkgcmV0dXJuZWQgdXNlciBpbmZvcm1hdGlvbg0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgIGhhbmRsZSwgb3IgTlVMTCB0byBzdGFydCBzZWFyY2hpbmcgd2l0aCB0aGUgZmly c3QuIE9uIHJldHVybiwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBwb2ludHMgdG8gdGhl IHVzZXIgaW5mb3JtYXRpb24gaGFuZGxlIG9mIHRoZSB1c2VyIGluZm9ybWF0aW9uDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgcmVjb3JkLCBvciBOVUxMIGlmIG5vdCBmb3VuZC4gQ2FuIGJl IE5VTEwsIGluIHdoaWNoIGNhc2Ugb25seQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgIG9u ZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZCBwZXIgdXNlciBjYW4gYmUgcmV0dXJuZWQuDQotICBA cGFyYW1baW5dICAgICAgSW5mbyAgICAgUG9pbnRzIHRvIHRoZSBidWZmZXIgY29udGFpbmluZyB0 aGUgdXNlciBpbmZvcm1hdGlvbiB0byBiZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgIGNv bXBhcmVkIHRvIHRoZSB1c2VyIGluZm9ybWF0aW9uIHJlY29yZC4gSWYgTlVMTCwgdGhlbiBvbmx5 DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHVzZXIgaW5mb3JtYXRpb24gcmVjb3Jk IHR5cGUgaXMgY29tcGFyZWQuIElmIEluZm9TaXplIGlzIDAsDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgdGhlbiB0aGUgdXNlciBpbmZvcm1hdGlvbiByZWNvcmQgbXVzdCBiZSBlbXB0eS4N Ci0NCi0gIEBwYXJhbVtpbl0gICAgICBJbmZvU2l6ZSBUaGUgc2l6ZSBvZiBJbmZvLCBpbiBieXRl cy4NCi0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICBVc2VyIGluZm9ybWF0aW9uIHdhcyBm b3VuZC4gVXNlciBwb2ludHMgdG8gdGhlIHVzZXIgcHJvZmlsZSBoYW5kbGUsDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgYW5kIFVzZXJJbmZvIHBvaW50cyB0byB0aGUgdXNlciBpbmZvcm1h dGlvbiBoYW5kbGUuDQotICBAcmV0dmFsIEVGSV9OT1RfRk9VTkQgICAgVXNlciBpbmZvcm1hdGlv biB3YXMgbm90IGZvdW5kLiBVc2VyIHBvaW50cyB0byBOVUxMIGFuZCBVc2VySW5mbw0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgIHBvaW50cyB0byBOVUxMLg0KLQ0KLSoqLw0KLUVGSV9TVEFU VVMNCi1FRklBUEkNCi1Vc2VyUHJvZmlsZUZpbmQgKA0KLSAgSU4gICAgIENPTlNUIEVGSV9VU0VS X01BTkFHRVJfUFJPVE9DT0wgICAgICAgICpUaGlzLA0KLSAgSU4gT1VUIEVGSV9VU0VSX1BST0ZJ TEVfSEFORExFICAgICAgICAgICAgICAgICpVc2VyLA0KLSAgSU4gT1VUIEVGSV9VU0VSX0lORk9f SEFORExFICAgICAgICAgICAgICAgICAgICpVc2VySW5mbyBPUFRJT05BTCwNCi0gIElOICAgICBD T05TVCBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAgICAqSW5mbywNCi0gIElOICAgICBV SU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZvU2l6ZQ0KLSAgKTsNCi0N Ci0NCi0vKioNCi0gIFRoaXMgZnVuY3Rpb24gcmV0dXJucyB1c2VyIGluZm9ybWF0aW9uLg0KLQ0K LSAgQHBhcmFtICBUaGlzICAgICAgICAgICAgICAgICAgICBQcm90b2NvbCBFRklfVVNFUl9NQU5B R0VSX1BST1RPQ09MIGluc3RhbmNlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHBvaW50ZXIuDQotICBAcGFyYW0gIFVzZXIgICAgICAgICAgICAgICAgICAgIEhhbmRsZSBvZiB0 aGUgdXNlciB3aG9zZSBwcm9maWxlIHdpbGwgYmUNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcmV0cmlldmVkLg0KLSAgQHBhcmFtICBVc2VySW5mbyAgICAgICAgICAgICAgICBI YW5kbGUgb2YgdGhlIHVzZXIgaW5mb3JtYXRpb24gZGF0YSByZWNvcmQuDQotICBAcGFyYW0gIElu Zm8gICAgICAgICAgICAgICAgICAgIE9uIGVudHJ5LCBwb2ludHMgdG8gYSBidWZmZXIgb2YgYXQg bGVhc3QNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkluZm9TaXplIGJ5dGVz LiAgT24gZXhpdCwgaG9sZHMgdGhlIHVzZXINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgaW5mb3JtYXRpb24uDQotICBAcGFyYW0gIEluZm9TaXplICAgICAgICAgICAgICAgIE9u IGVudHJ5LCBwb2ludHMgdG8gdGhlIHNpemUgb2YgSW5mby4gT24gcmV0dXJuLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBwb2ludHMgdG8gdGhlIHNpemUgb2YgdGhlIHVzZXIg aW5mb3JtYXRpb24uDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgIEluZm9y bWF0aW9uIHJldHVybmVkIHN1Y2Nlc3NmdWxseS4NCi0gIEByZXR2YWwgRUZJX0FDQ0VTU19ERU5J RUQgICAgICAgVGhlIGluZm9ybWF0aW9uIGFib3V0IHRoZSBzcGVjaWZpZWQgdXNlciBjYW5ub3QN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmUgYWNjZXNzZWQgIGJ5IHRoZSBj dXJyZW50IHVzZXIuDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9CVUZG RVJfVE9PX1NNQUxMLSBUaGUgbnVtYmVyIG9mIGJ5dGVzDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNwZWNpZmllZCBieSAqSW5mb1NpemUgaXMgdG9vIHNtYWxsIHRvIGhvbGQg dGhlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybmVkIGRhdGEuDQot DQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLVVzZXJQcm9maWxlR2V0SW5mbyAoDQotICBJ TiBDT05TVCAgRUZJX1VTRVJfTUFOQUdFUl9QUk9UT0NPTCAgICAgICAgICAgKlRoaXMsDQotICBJ TiAgICAgICAgRUZJX1VTRVJfUFJPRklMRV9IQU5ETEUgICAgICAgICAgICAgVXNlciwNCi0gIElO ICAgICAgICBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICAgICAgICAgICAgICBVc2VySW5mbywNCi0g IE9VVCAgICAgICBFRklfVVNFUl9JTkZPICAgICAgICAgICAgICAgICAgICAgICAqSW5mbywNCi0g IElOIE9VVCAgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSW5mb1NpemUN Ci0gICk7DQotDQotDQotLyoqDQotICBUaGlzIGZ1bmN0aW9uIGNoYW5nZXMgdXNlciBpbmZvcm1h dGlvbi4NCi0NCi0gIEBwYXJhbSAgVGhpcyAgICAgICAgICAgICAgICAgICAgUHJvdG9jb2wgRUZJ X1VTRVJfTUFOQUdFUl9QUk9UT0NPTCBpbnN0YW5jZQ0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBwb2ludGVyLg0KLSAgQHBhcmFtICBVc2VyICAgICAgICAgICAgICAgICAgICBI YW5kbGUgb2YgdGhlIHVzZXIgd2hvc2UgcHJvZmlsZSB3aWxsIGJlDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJldHJpZXZlZC4NCi0gIEBwYXJhbSAgVXNlckluZm8gICAgICAg ICAgICAgICAgSGFuZGxlIG9mIHRoZSB1c2VyIGluZm9ybWF0aW9uIGRhdGEgcmVjb3JkLg0KLSAg QHBhcmFtICBJbmZvICAgICAgICAgICAgICAgICAgICBQb2ludHMgdG8gdGhlIHVzZXIgaW5mb3Jt YXRpb24uDQotICBAcGFyYW0gIEluZm9TaXplICAgICAgICAgICAgICAgIFRoZSBzaXplIG9mIElu Zm8sIGluIGJ5dGVzLg0KLQ0KLSAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgICBVc2Vy IHByb2ZpbGUgaW5mb3JtYXRpb24gd2FzIHN1Y2Nlc3NmdWxseQ0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjaGFuZ2VkL2FkZGVkLg0KLSAgQHJldHZhbCBFRklfQUNDRVNTX0RF TklFRCAgICAgICBUaGUgcmVjb3JkIGlzIGV4Y2x1c2l2ZS4NCi0gIEByZXR2YWwgRUZJX1NFQ1VS SVRZX1ZJT0xBVElPTiAgVGhlIGN1cnJlbnQgdXNlciBkb2VzIG5vdCBoYXZlIHBlcm1pc3Npb24g dG8NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlICB0aGUgc3BlY2lm aWVkIHVzZXIgcHJvZmlsZSBvciB1c2VyDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGluZm9ybWF0aW9uIHJlY29yZC4NCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQot VXNlclByb2ZpbGVTZXRJbmZvICgNCi0gIElOIENPTlNUICBFRklfVVNFUl9NQU5BR0VSX1BST1RP Q09MICAgICAgICAgICAqVGhpcywNCi0gIElOICAgICAgICBFRklfVVNFUl9QUk9GSUxFX0hBTkRM RSAgICAgICAgICAgICBVc2VyLA0KLSAgSU4gT1VUICAgIEVGSV9VU0VSX0lORk9fSEFORExFICAg ICAgICAgICAgICAgICpVc2VySW5mbywNCi0gIElOIENPTlNUICBFRklfVVNFUl9JTkZPICAgICAg ICAgICAgICAgICAgICAgICAqSW5mbywNCi0gIElOICAgICAgICBVSU5UTiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBJbmZvU2l6ZQ0KLSAgKTsNCi0NCi0NCi0vKioNCi0gIFRoaXMgZnVu Y3Rpb24gYWxsb3dzIHRoZSBjcmVkZW50aWFsIHByb3ZpZGVyIHRvIG5vdGlmeSB0aGUgVXNlciBJ ZGVudGl0eSBNYW5hZ2VyDQotICB3aGVuIHVzZXIgc3RhdHVzIGhhcyBjaGFuZ2VkIHdoaWxlIGRl c2VsZWN0ZWQuDQotDQotICBAcGFyYW0gIFRoaXMgICAgICAgICAgICAgICAgICAgIFByb3RvY29s IEVGSV9VU0VSX01BTkFHRVJfUFJPVE9DT0wgaW5zdGFuY2UNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcG9pbnRlci4NCi0gIEBwYXJhbSAgQ2hhbmdlZCAgICAgICAgICAgICAg ICAgUG9pbnRzIHRvIHRoZSBpbnN0YW5jZSBvZiB0aGUNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgRUZJX1VTRVJfQ1JFREVOVElBTF9QUk9UT0NPTCAgd2hlcmUgdGhlIHVzZXIg aGFzDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZWQuDQotDQotICBA cmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgIFRoZSBVc2VyIElkZW50aXR5IE1hbmFnZXIg aGFzIGhhbmRsZWQgdGhlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlm aWNhdGlvbi4NCi0gIEByZXR2YWwgRUZJX05PVF9SRUFEWSAgICAgICAgICAgVGhlIGZ1bmN0aW9u IHdhcyBjYWxsZWQgd2hpbGUgdGhlIHNwZWNpZmllZA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjcmVkZW50aWFsICBwcm92aWRlciB3YXMgbm90IHNlbGVjdGVkLg0KLSAgQHJl dHZhbC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w0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBkZWxldGUgdGhpcyB1c2VyIGluLWZvcm1hdGlvbi4NCi0gIEByZXR2YWwgRUZJ X05PVF9GT1VORCAgICAgICAgICAgVXNlciBpbmZvcm1hdGlvbiByZWNvcmQgVXNlckluZm8gZG9l cyBub3QgZXhpc3QNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIHVz ZXIgcHJvLWZpbGUuDQotDQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLVVzZXJQcm9maWxl RGVsZXRlSW5mbyAoDQotICBJTiBDT05TVCAgRUZJX1VTRVJfTUFOQUdFUl9QUk9UT0NPTCAgICAg ICAgICAgKlRoaXMsDQotICBJTiAgICAgICAgRUZJX1VTRVJfUFJPRklMRV9IQU5ETEUgICAgICAg ICAgICAgVXNlciwNCi0gIElOICAgICAgICBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICAgICAgICAg ICAgICBVc2VySW5mbw0KLSAgKTsNCi0NCi0NCi0vKioNCi0gIFRoaXMgZnVuY3Rpb24gcmV0dXJu cyB0aGUgbmV4dCB1c2VyIGluZm9ybWF0aW9uIHJlY29yZC4NCi0NCi0gIEBwYXJhbSAgVGhpcyAg ICAgICAgICAgICAgICAgICAgUHJvdG9jb2wgRUZJX1VTRVJfTUFOQUdFUl9QUk9UT0NPTCBpbnN0 YW5jZSBwb2ludGVyLg0KLSAgQHBhcmFtICBVc2VyICAgICAgICAgICAgICAgICAgICBIYW5kbGUg b2YgdGhlIHVzZXIgd2hvc2UgcHJvZmlsZSB3aWxsIGJlIHJldHJpZXZlZC4NCi0gIEBwYXJhbSAg VXNlckluZm8gICAgICAgICAgICAgICAgSGFuZGxlIG9mIHRoZSB1c2VyIGluZm9ybWF0aW9uIGRh dGEgcmVjb3JkLg0KLQ0KLSAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgICBVc2VyIGlu Zm9ybWF0aW9uI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WJ1Z0xpYg0KLSAgSGlpTGliDQotICBVZWZpTGliDQotDQotW0d1aWRzXQ0KLSAgZ0VmaUlmclRp YW5vR3VpZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMjIFNPTUVUSU1FU19DT05TVU1F UyAgIyMgR1VJRA0KLSAgZ0VmaUV2ZW50VXNlclByb2ZpbGVDaGFuZ2VkR3VpZCAgICAgICAgICAg ICAgICMjIFNPTUVUSU1FU19QUk9EVUNFUyAgIyMgRXZlbnQNCi0NCi0gICMjIFNPTUVUSU1FU19Q Uk9EVUNFUyAgICAgICAgICAgICAgICAgICAgICAgICAjIyBWYXJpYWJsZTpMIlVzZXJ4eHh4Ig0K LSAgIyMgU09NRVRJTUVTX0NPTlNVTUVTICAgICAgICAgICAgICAgICAgICAgICAgICMjIFZhcmlh YmxlOkwiVXNlcnh4eHgiDQotICAjIyBDT05TVU1FUyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIyMgSElJDQotICBnVXNlcklkZW50aWZ5TWFuYWdlckd1aWQNCi0NCi1bUHJvdG9j b2xzXQ0KLSAgZ0VmaUZvcm1Ccm93c2VyMlByb3RvY29sR3VpZCAgICAgICAgICAgICAgICAgICMj IENPTlNVTUVTDQotICBnRWZpSGlpRGF0YWJhc2VQcm90b2NvbEd1aWQgICAgICAgICAgICAgICAg ICAgIyMgQ09OU1VNRVMNCi0gIGdFZmlVc2VyQ3JlZGVudGlhbDJQcm90b2NvbEd1aWQgICAgICAg ICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCi0gIGdFZmlEZWZlcnJlZEltYWdlTG9hZFBy b3RvY29sR3VpZCAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCi0gIGdFZmlTaW1w bGVUZXh0T3V0UHJvdG9jb2xHdWlkICAgICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VN RVMNCi0gIGdFZmlTaW1wbGVUZXh0SW5Qcm90b2NvbEd1aWQgICAgIC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SQU0gSVMgRElTVFJJ QlVURUQgVU5ERVIgVEhFIEJTRCBMSUNFTlNFIE9OIEFOICJBUyBJUyIgQkFTSVMsDQotV0lUSE9V VCBXQVJSQU5USUVTIE9SIFJFUFJFU0VOVEFUSU9OUyBPRiBBTlkgS0lORCwgRUlUSEVSIEVYUFJF U1MgT1IgSU1QTElFRC4NCi0NCi0qKi8NCi0NCi0jbGFuZ2RlZiBlbi1VUyAiRW5nbGlzaCINCi0j bGFuZ2RlZiBmci1GUiAiRnJhbmNhaXMiDQotDQotI3N0cmluZyBTVFJfVElUTEUgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJVc2VyIElkZW50aXR5IE1h bmFnZXIiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAjbGFuZ3VhZ2UgZnItRlIgICJVc2VyIElkZW50aXR5IE1hbmFnZXIoRnJlbmNoKSINCi0jc3Ry aW5nIFNUUl9VU0VSX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBl bi1VUyAgIlVzZXIgU2VsZWN0aW9uIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiVXNlciBTZWxlY3Rpb24oRnJlbmNo KSINCi0jc3RyaW5nIFNUUl9QUk9WSURFUl9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICNs YW5ndWFnZSBlbi1VUyAgIlByb3ZpZGVyIFNlbGVjdGlvbiINCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlVzZXIgU2Vs ZWN0aW9uKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfTlVMTF9TVFJJTkcgICAgICAgICAgICAgICAg ICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICIiDQot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1Bvb2wgKHNpemVvZiAoRUZJX1VT RVJfSU5GTykgKyBtVXNlckluZm8uQWNjZXNzUG9saWN5TGVuKTsNCi0gICAgaWYgKEluZm8gPT0g TlVMTCkgew0KLSAgICAgIHJldHVybiA7DQotICAgIH0NCi0NCi0gICAgU3RhdHVzID0gRmluZElu Zm9CeVR5cGUgKG1Nb2RpZnlVc2VyLCBFRklfVVNFUl9JTkZPX0FDQ0VTU19QT0xJQ1lfUkVDT1JE LCAmVXNlckluZm8pOw0KLSAgICBpZiAoIUVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgIElu Zm8tPkluZm9UeXBlICAgID0gRUZJX1VTRVJfSU5GT19BQ0NFU1NfUE9MSUNZX1JFQ09SRDsNCi0g ICAgICBJbmZvLT5JbmZvQXR0cmlicyA9IEVGSV9VU0VSX0lORk9fU1RPUkFHRV9QTEFURk9STV9O ViB8DQotICAgICAgICAgICAgICAgICAgICAgICAgICBFRklfVVNFUl9JTkZPX1BVQkxJQyB8DQot ICAgICAgICAgICAgICAgICAgICAgICAgICBFRklfVVNFUl9JTkZPX0VYQ0xVU0lWRTsNCi0gICAg ICBJbmZvLT5JbmZvU2l6ZSAgICA9IChVSU5UMzIpIChzaXplb2YgKEVGSV9VU0VSX0lORk8pICsg bVVzZXJJbmZvLkFjY2Vzc1BvbGljeUxlbik7DQotICAgICAgQ29weU1lbSAoKFVJTlQ4ICopIChJ bmZvICsgMSksIG1Vc2VySW5mby5BY2Nlc3NQb2xpY3ksIG1Vc2VySW5mby5BY2Nlc3NQb2xpY3lM ZW4pOw0KLSAgICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdlci0+U2V0SW5mbyAoDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1Vc2VyTWFuYWdlciwNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbU1vZGlmeVVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICZVc2VySW5mbywNCi0gICAgICA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Lg0KLQ0K LSAgQHBhcmFtW2luXSAgUXVlc3Rpb25JRCAgICAgICAgICAgIFRoZSBxdWVzdGlvbiBJRC4NCi0g IEBwYXJhbVtpbl0gIERldmljZVBhdGggICAgICAgICAgICBQb2ludHMgdG8gZGV2aWNlIHBhdGgu DQotICBAcGFyYW1baW5dICBPcENvZGVIYW5kbGUgICAgICAgICAgUG9pbnRzIHRvIGNvbnRhaW5l ciBmb3IgZHluYW1pYyBjcmVhdGVkIG9wY29kZXMuDQotDQotKiovDQotVk9JRA0KLUFkZERldmlj ZVBhdGggKA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFF1ZXN0aW9uSUQsDQotICBJTiAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAgICAgICAg ICAgICAgKkRldmljZVBhdGgsDQotICBJTiAgICAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKk9wQ29kZUhhbmRsZQ0KLSAgKQ0KLXsNCi0gIEVGSV9ERVZJQ0VfUEFUSF9Q Uk9UT0NPTCAgICAgICAgICAqTmV4dDsNCi0gIEVGSV9TVFJJTkdfSUQgICAgICAgICAgICAgICAg ICAgICBOYW1lSUQ7DQotICBFRklfU1RSSU5HICAgICAgICAgICAgICAgICAgICAgICAgRHJpdmVy TmFtZTsNCi0NCi0gIC8vDQotICAvLyBHZXQgZHJpdmVyIGZpbGUgbmFtZSBub2RlLg0KLSAgLy8N Ci0gIE5leHQgPSBEZXZpY2VQYXRoOw0KLSAgd2hpbGUgKCFJc0RldmljZVBhdGhFbmQgKE5leHQp KSB7DQotICAgIERldmljZVBhdGggID0gTmV4dDsNCi0gICAgTmV4dCAgICAgICAgPSBOZXh0RGV2 aWNlUGF0aE5vZGUgKE5leHQpOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIERpc3BsYXkgdGhlIGRl dmljZSBwYXRoIGluIGZvcm0uDQotICAvLw0KLSAgRHJpdmVyT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HBhdGggZm9yYmlkIGxpc3QuDQotICBAcmV0dmFsIEZBTFNFICAgIFRoZSBEZXZpY2VQ YXRoIGlzIG5vdCBpbiB0aGUgZGV2aWNlIHBhdGggZm9yYmlkIGxpc3QuDQotDQotKiovDQotQk9P TEVBTg0KLUlzTG9hZEZvcmJpZGRlbiAoDQotICBJTiAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09M ICAgICAgICAgICAgICAgICAgKkRldmljZVBhdGgNCi0gICkNCi17DQotICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgIE9mZlNldDsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgRFBTaXpl Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBTaXplOw0KLSAgRUZJX0RFVklDRV9QQVRI X1BST1RPQ09MICAqRHA7DQotDQotICBPZmZTZXQgPSAwOw0KLSAgU2l6ZSAgID0gR2V0RGV2aWNl UGF0aFNpemUgKERldmljZVBhdGgpOw0KLSAgLy8NCi0gIC8vIENoZWNrIGVhY2ggZGV2aWNlIHBh dGguDQotICAvLw0KLSAgd2hpbGUgKE9mZlNldCA8IG1BY2Nlc3NJbmZvLkxvYWRGb3JiaWRMZW4p IHsNCi0gICAgRHAgICAgICA9IChFRklfREVWSUNFX1BBVEhfUFJPVE9DT0wgKikgKG1BY2Nlc3NJ bmZvLkxvYWRGb3JiaWQgKyBPZmZTZXQpOw0KLSAgICBEUFNpemUgID0gR2V0RGV2aWNlUGF0aFNp emUgKERwKTsNCi0gICAgLy8NCi0gICAgLy8gQ29tcGFyZSBkZXZpY2UgcGF0aC4NCi0gICAgLy8N Ci0gICAgaWYgKChEUFNpemUgPT0gU2l6ZSkgJiYgKENvbXBhcmVNZW0gKERldmljZVBhdGgsIERw LCBTaXplKSA9PSAwKSkgew0KLSAgICAgIHJldHVybiBUUlVFOw0KLSAgICB9DQotICAgIE9mZlNl dCArPSBEUFNpemU7DQotICB9DQotICByZXR1cm4gRkFMU0U7DQotfQ0KLQ0KLQ0KLS8qKg0KLSAg RGlzcGxheSB0aGUgcGVybWl0IGxvYWQgZGV2aWNlIHBhdGggaW4gdGhlIGxvYWRhYmxlIGRldmlj ZSBwYXRoIGxpc3QuDQotDQotKiovDQotVk9JRA0KLURpc3BsYXlMb2FkUGVybWl0KA0KLSAgVk9J RA0KLSAgKQ0KLXsNCi0gIEVGSV9TVEFUVVMgICAgICAgICAgU3RhdHVzOw0KLSAgQ0hBUjE2ICAg ICAgICAgICAgICAqT3JkZXI7DQotICBVSU5UTiAgICAgICAgICAgICAgIE9yZGVyU2l6ZTsNCi0g IFVJTlROICAgICAgICAgICAgICAgTGlzdENvdW50Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICBJ bmRleDsNCi0gIFVJTlQ4ICAgICAgICAgICAgICAgKlZhcjsNCi0gIFVJTlQ4ICAgICAgICAgICAg ICAgKlZhclB0cjsNCi0gIENIQVIxNiAgICAgICAgICAgICAgVmFyTmFtZVsxMl07DQotICBWT0lE ICAgICAgICAgICAgICAgICpTdGFydE9wQ29kZUhhbmRsZTsNCi0gIFZPSUQgICAgICAgICAgICAg ICAgKkVuZE9wQ29kZUhhbmRsZTsNCi0gIEVGSV9JRlJfR1VJRF9MQUJFTCAgKlN0YXJ0TGFiZWw7 DQotICBFRklfSUZSX0dVSURfTEFCRUwgICpFbmRMYWJlbDsNCi0NCi0gIC8vDQotICAvLyBHZXQg RHJpdmVyT3JkZXIuDQotICAvLw0KLSAgT3JkZXJTaXplID0gMDsNCi0gIFN0YXR1cyAgICA9IGdS VC0+R2V0VmFyaWFibGUgKA0KLSAgICAgICAgICAgICAgICAgICAgIEwiRHJpdmVyT3JkZXIiLA0K LSAgICAgICAgICAgICAgICAgICAgICZnRWZpR2xvYmFsVmFyaWFibGVHdWlkLA0KLSAgICAgICAg ICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAgICAgICAgJk9yZGVyU2l6ZSwNCi0g ICAgICAgICAgICAgICAgICAgICBOVUxMDQotICAgICA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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaUlmclRpYW5vR3Vp ZCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfSUZSX0dVSURf TEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICBT dGFydExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQotICBT dGFydExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCRUxfUEVSTUlUX0xPQURfRlVOQzsNCi0NCi0g IEVuZExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVHdWlkT3BDb2RlICgN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuZE9wQ29kZUhhbmRsZSwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlk LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVM KQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIEVuZExhYmVs LT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQotICBFbmRMYWJlbC0+ TnVtYmVyICAgICAgICA9IExBQkVMX0VORDsNCi0NCi0gIC8vDQotICAvLyBBZGQgZWFjaCBkcml2 ZXIgb3B0aW9uLg0KLSAgLy8NCi0gIFZhciAgICAg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0T3BDb2RlSGFuZGxl LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaUlmclRpYW5v R3VpZCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfSUZSX0dV SURfTEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQot ICBTdGFydExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQot ICBTdGFydExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCTEVfRk9SQklEX0xPQURfRlVOQzsNCi0N Ci0gIEVuZExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVHdWlkT3BDb2Rl ICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuZE9wQ29kZUhhbmRs ZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9H dWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xB QkVMKQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIEVuZExh YmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQotICBFbmRMYWJl bC0+TnVtYmVyICAgICAgICA9IExBQkVMX0VORDsNCi0NCi0gIC8vDQotICAvLyBBZGQgZWFjaCBm b3JiaWQgbG9hZCBkcml2ZXJzLg0KLSAgLy8NCi0gIE9mZnNldCAgPSAwOw0KLSAgSW5kZXggICA9 IDA7DQot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AgICAgICBPZmZzZXQ7 DQotICBFRklfVVNFUl9JTkZPX0lERU5USVRZX1BPTElDWSAqSWRlbnRpdHk7DQotICBFRklfSU5Q VVRfS0VZICAgICAgICAgICAgICAgICBLZXk7DQotDQotICBPZmZzZXQgPSAwOw0KLSAgd2hpbGUg KE9mZnNldCA8IG1Vc2VySW5mby5OZXdJZGVudGl0eVBvbGljeUxlbikgew0KLSAgICBJZGVudGl0 eSA9IChFRklfVVNFUl9JTkZPX0lERU5USVRZX1BPTElDWSAqKSAobVVzZXJJbmZvLk5ld0lkZW50 aXR5UG9saWN5ICsgT2Zmc2V0KTsNCi0gICAgaWYgKElkZW50aXR5LT5UeXBlID09IEVGSV9VU0VS X0lORk9fSURFTlRJVFlfQ1JFREVOVElBTF9QUk9WSURFUikgew0KLSAgICAgIGlmIChDb21wYXJl R3VpZCAoTmV3R3VpZCwgKEVGSV9HVUlEICopIChJZGVudGl0eSArIDEpKSkgew0KLSAgICAgICAg Q3JlYXRlUG9wVXAgKA0KLSAgICAgICAgICBFRklfTElHSFRHUkFZIHwgRUZJX0JBQ0tHUk9VTkRf QkxVRSwNCi0gICAgICAgICAgJktleSwNCi0gICAgICAgICAgTCJUaGlzIENyZWRlbnRpYWwgUHJv dmlkZXIgQXJlIEFscmVhZHkgVXNlZCEiLA0KLSAgICAgICAgICBMIiIsDQotICAgICAgICAgIEwi UHJlc3MgQW55IEtleSB0byBDb250aW51ZSAuLi4iLA0KLSAgICAgICAgICBOVUxMDQotICAgICAg ICAgICk7DQotICAgICAgICByZXR1cm4gVFJVRTsNCi0gICAgICB9DQotICAgIH0NCi0gICAgT2Zm c2V0ICs9IElkZW50aXR5LT5MZW5ndGg7DQotICB9DQotDQotICByZXR1cm4gRkFMU0U7DQotfQ0K LQ0KLQ0KLS8qKg0KLSAgQWRkIHRoZSB1c2VyJ3MgY3JlZGVudGlhbCByZWNvcmQgaW4gdGhlIHBy b3ZpZGVyLg0KLQ0KLSAgQHBhcmFtW2luXSAgSWRlb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B3aGV0aGVyIHRoZSBpZGVudGl0eSBwb2xpY3kgaXMgdmFsaWQuDQotDQotICBAcGFyYW1baW5d ICBQb2xpY3lJbmZvICAgICAgICAgIFBvaW50IHRvIHRoZSBpZGVudGl0eSBwb2xpY3kuDQotICBA cGFyYW1baW5dICBQb2xpY3lJbmZvTGVuICAgICAgIFRoZSBwb2xpY3kgbGVuZ3RoLg0KLQ0KLSAg QHJldHZhbCBUUlVFICAgICBUaGUgcG9saWN5IGlzIGEgdmFsaWQgaWRlbnRpdHkgcG9saWN5Lg0K LSAgQHJldHZhbCBGQUxTRSAgICBUaGUgcG9saWN5IGlzIG5vdCBhIHZhbGlkIGlkZW50aXR5IHBv bGljeS4NCi0NCi0qKi8NCi1CT09MRUFODQotQ2hlY2tOZXdJZGVudGl0eVBvbGljeSAoDQotICBJ TiAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlBvbGljeUluZm8s DQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUG9saWN5 SW5mb0xlbg0KLSAgKQ0KLXsNCi0gIEVGSV9VU0VSX0lORk9fSURFTlRJVFlfUE9MSUNZICpJZGVu dGl0eTsNCi0gIEVGSV9JTlBVVF9LRVkgICAgICAgICAgICAgICAgIEtleTsNCi0gIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgIE9mZnNldDsNCi0gIFVJTlQzMiAgICAgICAgICAgICAgICAg ICAgICAgIE9wQ29kZTsNCi0NCi0gIC8vDQotICAvLyBDaGVjayBwb2xpY3kgZXhwcmVzc2lvbi4N Ci0gIC8vDQotICBPcENvZGUgID0gRUZJX1VTRVJfSU5GT19JREVOVElUWV9GQUxTRTsNCi0gIE9m ZnNldCAgPSAwOw0KLSAgd2hpbGUgKE9mZnNldCA8IFBvbGljeUluZm9MZW4pIHsNCi0gICAgLy8N Ci0gICAgLy8gQ2hlY2sgaWRlbnRpZmljYXRpb24gcG9saWN5IGFjY29yZGluZyB0byB0eXBlDQot ICAgIC8vDQotICAgIElkZW50aXR5ID0gKEVGSV9VU0VSX0lORk9fSURFTlRJVFlfUE9MSUNZICop IChQb2xpY3lJbmZvICsgT2Zmc2V0KTsNCi0gICAgc3dpdGNoIChJZGVudGl0eS0+VHlwZSkgew0K LQ0KLSAgICBjYXNlIEVGSV9VU0VSX0lORk9fSURFTlRJVFlfVFJVRToNCi0gICAgICBicmVhazsN Ci0NCi0gICAgY2FzZSBFRklfVVNFUl9JTkZPX0lERU5USVRZX09SOg0KLSAgICAgIGlmIChPcENv ZGUgPT0gRUZJX1VTRVJfSU5GT19JREVOVElUWV9BTkQpIHsNCi0gICAgICAgIENyZWF0ZVBvcFVw ICgNCi0gICAgICAgICAgRUZJX0xJR0hUR1JBWSB8IEVGSV9CQUNLR1JPVU5EX0JMVUUsDQotICAg ICAgICAgICZLZXksDQotICAgICAgICAgIEwiSW52YWxpZCBJZGVudGl0eSBQb2xpY3ksIE1peGVk IENvbm5lY3RvciBVbnN1cHBvcnQhIiwNCi0gICAgICAgICAgTCIiLA0KLSAgICAgICAgICBMIlBy ZXNzIEFueSBLZXkgdG8gQ29udGludWUgLi4uIiwNCi0gICAgICAgICAgTlVMTA0KLSAgICAgICAg ICApOw0KLSAgICAgICAgcmV0dXJuIEZBTFNFOw0KLSAgICAgIH0NCi0NCi0gICAgICBPcENvZGUg PSBFRklfVVNFUl9JTkZPX0lERU5USVRZX09SOw0KLSAgICAgIGJyZWFrOw0KLQ0KLSAgICBjYXNl IEVGSV9VU0VSX0lORk9fSURFTlRJVFlfQU5EOg0KLSAgICAgIGlmIChPcENvZGUgPT0gRUZJX1VT RVJfSU5GT19JREVOVElUWV9PUikgew0KLSAgICAgICAgQ3JlYXRlUG9wVXAgKA0KLSAgICAgICAg ICBFRklfTElHSFRHUkFZIHwgRUZJX0JBQ0tHUk9VTkRfQkxVRSwNCi0gICAgICAgICAgJktleSwN Ci0gICAgICAgICAgTCJJbnZhbGlkIElkZW50aXR5IF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E5hbWUsDQotICAgICAgTlVMTA0KLSAg ICAgICk7DQotICAgIC8vDQotICAgIC8vIENoZWNrIGtleS4NCi0gICAgLy8NCi0gICAgaWYgKEtl eS5TY2FuQ29kZSA9PSBTQ0FOX05VTEwpIHsNCi0gICAgICBpZiAoS2V5LlVuaWNvZGVDaGFyID09 IENIQVJfQ0FSUklBR0VfUkVUVVJOKSB7DQotICAgICAgICAvLw0KLSAgICAgICAgLy8gQWRkIHRo ZSBudWxsIHRlcm1pbmF0b3IuDQotICAgICAgICAvLw0KLSAgICAgICAgTmFtZVtOYW1lTGVuXSA9 IDA7DQotICAgICAgICBOYW1lTGVuKys7DQotICAgICAgICBicmVhazsNCi0gICAgICB9IGVsc2Ug aWYgKChLZXkuVW5pY29kZUNoYXIgPT0gQ0hBUl9OVUxMKSB8fA0KLSAgICAgICAgICAgICAgICAg KEtleS5Vbmljb2RlQ2hhciA9PSBDSEFSX1RBQikgfHwNCi0gICAgICAgICAgICAgICAgIChLZXku VW5pY29kZUNoYXIgPT0gQ0hBUl9MSU5FRkVFRCkNCi0gICAgICAgICAgICAgICAgICkgew0KLSAg ICAgICAgY29udGludWU7DQotICAgICAgfSBlbHNlIHsNCi0gICAgICAgIGlmIChLZXkuVW5pY29k ZUNoYXIgPT0gQ0hBUl9CQUNLU1BBQ0UpIHsNCi0gICAgICAgICAgaWYgKE5hbWVMZW4gPiAwKSB7 DQotICAgICAgICAgICAgTmFtZUxlbi0tOw0KLSAgICAgICAgICB9DQotICAgICAgICB9IGVsc2Ug ew0KLSAgICAgICAgICBOYW1lW05hbWVMZW5dID0gS2V5LlVuaWNvZGVDaGFyOw0KLSAgICAgICAg ICBOYW1lTGVuKys7DQotICAgICAgICAgIGlmIChOYW1lTGVuICsgMSA9PSBVU0VSX05BTUVfTEVO R1RIKSB7DQotICAgICAgICAgICAgLy8NCi0gICAgICAgICAgICAvLyBBZGQgdGhlIG51bGwgdGVy bWluYXRvci4NCi0gICAgICAgICAgICAvLw0KLSAgICAg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ncyB1c2VybmFt ZSBzdWNjZXNzZnVsbHkgd2l0aA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlcm5h bWUgaW4gbUFkZFVzZXJOYW1lLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1TZXRVc2VyTmFtZSAo DQotICBJTiAgRUZJX1VTRVJfUFJPRklMRV9IQU5ETEUgICAgVXNlciwNCi0gIElOICBVSU5UTiAg ICAgICAgICAgICAgICAgICAgICBVc2VyTmFtZUxlbiwNCi0gIElOICBDSEFSMTYgICAgICAgICAg ICAgICAgICAgICAqVXNlck5hbWUNCi0gICkNCi17DQotICBFRklfU1RBVFVTICAgICAgICAgICAg ICBTdGF0dXM7DQotICBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICBVc2VySW5mbzsNCi0gIEVGSV9V U0VSX1BST0ZJTEVfSEFORExFIFRlbXBVc2VyOw0KLSAgRUZJX1VTRVJfSU5GTyAgICAgICAgICAg Kk5ld1VzZXJJbmZvOw0KLQ0KLSAgTmV3VXNlckluZm8gPSBBbGxvY2F0ZVplcm9Qb29sIChzaXpl b2YgKEVGSV9VU0VSX0lORk8pICsgVXNlck5hbWVMZW4pOw0KLSAgQVNTRVJUIChOZXdVc2VySW5m byAhPSBOVUxMKTsNCi0NCi0gIE5ld1VzZXJJbmZvLT5JbmZvVHlwZSAgICA9IEVGSV9VU0VSX0lO Rk9fTkFNRV9SRUNPUkQ7DQotICBOZXdVc2VySW5mby0+SW5mb0F0dHJpYnMgPSBFRklfVVNFUl9J TkZPX1NUT1JBR0VfUExBVEZPUk1fTlYgfA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RUZJX1VTRVJfSU5GT19QVUJMSUMgfA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRUZJ X1VTRVJfSU5GT19FWENMVVNJVkU7DQotICBOZXdVc2VySW5mby0+SW5mb1NpemUgICAgPSAoVUlO VDMyKSAoc2l6ZW9mIChFRklfVVNFUl9JTkZPKSArIFVzZXJOYW1lTGVuKTsNCi0gIENvcHlNZW0g KChVSU5UOCAqKSAoTmV3VXNlckluZm8gKyAxKSwgVXNlck5hbWUsIFVzZXJOYW1lTGVuKTsNCi0g IFRlbXBVc2VyICA9IE5VTEw7DQotICBTdGF0dXMgICAgPSBtVXNlck1hbmFnZXItPkZpbmQgKA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1Vc2VyTWFuYWdlciwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmVGVtcFVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOZXdVc2VySW5mbywN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOZXdVc2VySW5mby0+SW5mb1NpemUNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgaWYgKCFFRklfRVJST1IgKFN0YXR1 cykpIHsNCi0gICAgLy8NCi0gICAgLy8gVGhlIHVzZXIgbmFtZSBoYWQgYmVlbiB1c2VkLCByZXR1 cm4gZXJyb3IuDQotICAgIC8vDQotICAgIEZyZWVQb29sIChOZXdVc2VySW5mbyk7DQotICAgIHJl dHVybiBFRklfTk9UX1JFQURZOw0KLSAgfQ0KLQ0KLSAgVXNlckluZm8gPSBOVUxMOw0KLSAgbVVz ZXJNYW5hZ2VyLT5TZXRJbmZvICgNCi0gICAgICAgICAgICAgICAgICBtVXNlck1hbmFnZXIsDQot ICAgICAgICAgICAgICAgICAgVXNlciwNCi0gICAgICAgICAgICAgICAgICAmVXNlckluZm8sDQot ICAgICAgICAgICAgICAgICAgTmV3VXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgTmV3VXNl ckluZm8tPkluZm9TaXplDQotICAgICAgICAgICAgICAgICAgKTsNCi0gIEZyZWVQb29sIChOZXdV c2VySW5mbyk7DQotICByZXR1cm4gRUZJX1NVQ0NFU1M7DQotfQ0KLQ0KLQ0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pQb2xpY3k7DQot ICBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICAgICAgICBVc2VySW5mbzsNCi0gIEVGSV9VU0VSX0lO Rk8gICAgICAgICAgICAgICAgICpOZXdVc2VySW5mbzsNCi0NCi0gIE5ld1VzZXJJbmZvID0gQWxs b2NhdGVaZXJvUG9vbCAoDQotICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfVVNFUl9JTkZP KSArDQotICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfVVNFUl9JTkZPX0lERU5USVRZX1BP TElDWSkNCi0gICAgICAgICAgICAgICAgICApOw0KLSAgQVNTRVJUIChOZXdVc2VySW5mbyAhPSBO VUxMKTsNCi0NCi0gIFBvbGljeSAgICAgICAgICAgICAgICAgICA9IChFRklfVVNFUl9JTkZPX0lE RU5USVRZX1BPTElDWSAqKSAoTmV3VXNlckluZm8gKyAxKTsNCi0gIFBvbGljeS0+VHlwZSAgICAg ICAgICAgICA9IEVGSV9VU0VSX0lORk9fSURFTlRJVFlfVFJVRTsNCi0gIFBvbGljeS0+TGVuZ3Ro ICAgICAgICAgICA9IHNpemVvZiAoRUZJX1VTRVJfSU5GT19JREVOVElUWV9QT0xJQ1kpOw0KLQ0K LSAgTmV3VXNlckluZm8tPkluZm9UeXBlICAgID0gRUZJX1VTRVJfSU5GT19JREVOVElUWV9QT0xJ Q1lfUkVDT1JEOw0KLSAgTmV3VXNlckluZm8tPkluZm9BdHRyaWJzID0gRUZJX1VTRVJfSU5GT19T VE9SQUdFX1BMQVRGT1JNX05WIHwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9V U0VSX0lORk9fUFVCTElDIHwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9VU0VS X0lORk9fRVhDTFVTSVZFOw0KLSAgTmV3VXNlckluZm8tPkluZm9TaXplICAgID0gc2l6ZW9mIChF RklfVVNFUl9JTkZPKSArIFBvbGljeS0+TGVuZ3RoOw0KLSAgVXNlckluZm8gICAgICAgICAgICAg ICAgID0gTlVMTDsNCi0gIG1Vc2VyTWFuYWdlci0+U2V0SW5mbyAoDQotICAgICAgICAgICAgICAg ICAgbVVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAgIFVzZXIsDQotICAgICAgICAgICAg ICAgICAgJlVzZXJJbmZvLA0KLSAgICAgICAgICAgICAgICAgIE5ld1VzZXJJbmZvLA0KLSAgICAg ICAgICAgICAgICAgIE5ld1VzZXJJbmZvLT5JbmZvU2l6ZQ0KLSAgICAgICAgICAgICAgICAgICk7 DQotICBGcmVlUG9vbCAoTmV3VXNlckluZm8pOw0KLX0NCi0NCi0NCi0vKioNCi0gIFNldCB0aGUg ZGVmYXVsdCBhY2Nlc3MgcG9saWN5IG9mIHRoZSBzcGVjaWZpZWQgdXNlci4NCi0NCi0gIEBwYXJh bVtpbl0gIFVzZXIgICAgICAgICAgICAgICBIYW5kbGUgb2YgYSB1c2VyIHByb2ZpbGUuDQotDQot KiovDQotVk9JRA0KLVNldEFjY2Vzc1BvbGljeSAoDQotICBJTiAgICAgICAgRUZJX1VTRVJfUFJP RklMRV9IQU5ETEUgICBVc2VyDQotICApDQotew0KLSAgRUZJX1VTRVJfSU5GT19BQ0NFU1NfQ09O VFJPTCAgKkNvbnRyb2w7DQotICBFRklfVVNFUl9JTkZPX0hBTkRMRSAgICAgICAgICBVc2VySW5m bzsNCi0gIEVGSV9VU0VSX0lORk8gICAgICAgICAgICAgICAgICpOZXdVc2VySW5mbzsNCi0NCi0g IE5ld1VzZXJJbmZvID0gQWxsb2NhdGVaZXJvUG9vbCAoDQotICAgICAgICAgICAgICAgICAgc2l6 ZW9mIChFRklfVVNFUl9JTkZPKSArDQotICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfVVNF Ul9JTkZPX0FDQ0VTU19DT05UUk9MKQ0KLSAgICAgICAgICAgICAgICAgICk7DQotICBBU1NFUlQg KE5ld1VzZXJJbmZvICE9IE5VTEwpOw0KLQ0KLSAgQ29udHJvbCAgICAgICAgICAgICAgICAgID0g KEVGSV9VU0VSX0lORk9fQUNDRVNTX0NPTlRST0wgKikgKE5ld1VzZXJJbmZvICsgMSk7DQotICBD b250cm9sLT5UeXBlICAgICAgICAgICAgPSBFRklfVVNFUl9JTkZPX0FDQ0VTU19FTlJPTExfU0VM RjsNCi0gIENvbnRyb2wtPlNpemUgICAgICAgICAgICA9IHNpemVvZiAoRUZJX1VTRVJfSU5GT19B Q0NFU1NfQ09OVFJPTCk7DQotDQotICBOZXdVc2VySW5mby0+SW5mb1R5cGUgICAgPSBFRklfVVNF Ul9JTkZPX0FDQ0VTU19QT0xJQ1lfUkVDT1JEOw0KLSAgTmV3VXNlckluZm8tPkluZm9BdHRyaWJz ID0gRUZJX1VTRVJfSU5GT19TVE9SQUdFX1BMQVRGT1JNX05WIHwNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEVGSV9VU0VSX0lORk9fUFVCTElDIHwNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgIEVGSV9VU0VSX0lORk9fRVhDTFVTSVZFOw0KLSAgTmV3VXNlckluZm8tPkluZm9T aXplICAgID0gc2l6ZW9mIChFRklfVVNFUl9JTkZPKSArIENvbnRyb2wtPlNpemU7DQotICBVc2Vy SW5mbyAgICAgICAgICAgICAgICAgPSBOVUxMOw0KLSAgbVVzZXJNYW5hZ2VyLT5TZXRJbmZvICgN Ci0gICAgICAgICAgICAgICAgICBtVXNlck1hbmFnZXIsDQotICAgICAgICAgICAgICAgICAgVXNl ciwNCi0gICAgICAgICAgICAgICAgICAmVXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgTmV3 VXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgTmV3VXNlckluZm8tPkluZm9TaXplDQotICAg ICAgICAgICAgICAgICAgKTsNCi0gIEZyZWVQb29sIChOZXdVc2VySW5mbyk7DQotfQ0KLQ0KLQ0K LS8qKg0KLSAgQWRkIGEgbmV3IHVzZXIgcHJvZmlsZSBpbnRvIHRoZSB1c2VyIHByb2ZpbGUgZGF0 YWJhc2UuDQotDQotKiovDQotVk9JRA0KLUNhbGxBZGRVc2VyICgNCi0gIFZPSUQNCi0gICkNCi17 DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7DQotICBFRklfSU5QVVRfS0VZICAg ICAgICAgICBLZXk7DQotICBFRklfVVNFUl9QUk9GSUxFX0hBTkRMRSBVc2VyOw0KLSAgVUlOVE4g ICAgICAgICAgICAgICAgICAgVXNlck5hbWVMZW47DQotICBDSEFSMTYgICAgICAgICAgICAgICAg ICBVc2VyTmFtZVtVU0VSX05BTUVfTEVOR1RIXTsNCi0gIENIQVIxNiAgICAgICAgICAgICAgICAg ICpRdWVzdGlvblN0cjsNCi0gIENIQVIxNiAgICAgICAgICAgICAgICAgICpQcm9tcHRTdHI7DQot DQotICBRdWVzdGlvblN0ciA9IE5VTEw7DQotICBQcm9tcHRTdHIgICA9IE5VTEw7DQotDQotICAv Lw0KLSAgLy8gR2V0IHVzZXIgbmFtZSB0byBhZGQuDQotICAvLw0KLSAgVXNlck5hbWVMZW4gPSBz aXplb2YgKFVzZXJOYW1lKTsNCi0gIFN0YXR1cyA9IEdldFVzZXJOYW1lSW5wdXQgKCZVc2VyTmFt ZUxlbiwgVXNlck5hbWUpOw0KLSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICBpZiAo U3RhdHVzICE9IEVGSV9BQk9SVEVEKSB7DQotICAgICAgUXVlc3Rpb25TdHIgPSBHZXRTdHJpbmdC eUlkIChTVFJJTkdfVE9LRU4gKFNUUl9HRVRfVVNFUk5BTUVfRkFJTEVEKSk7DQotICAgICAgUHJv bXB0U3RyICAgPSBHZXRTdHJpbmdCeUlkIChTVFJJTkdfVE9LRU4gKFNUUl9TVFJPS0VfS0VZX0NP TlRJTlVFKSk7DQotICAgICAgZ290byBEb25lOw0KLSAgICB9DQotICAgIHJldHVybiA7DQotICB9 DQotDQotICAvLw0KLS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SV9VU0VSX0lORk8gICAgICAg ICAqSW5mbzsNCi0gIFVJTlROICAgICAgICAgICAgICAgICBJbmZvU2l6ZTsNCi0gIFVJTlROICAg ICAgICAgICAgICAgICBNZW1TaXplOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgIE5hbWVMZW47 DQotICBDSEFSMTYgICAgICAgICAgICAgICAgVXNlck5hbWVbVVNFUl9OQU1FX0xFTkdUSF07DQot ICBFRklfU1RSSU5HX0lEICAgICAgICAgVXNlcklkOw0KLQ0KLSAgLy8NCi0gIC8vIEFsbG9jYXRl IHVzZXIgaW5mb3JtYXRpb24gbWVtb3J5Lg0KLSAgLy8NCi0gIE1lbVNpemUgPSBzaXplb2YgKEVG SV9VU0VSX0lORk8pICsgNjM7DQotICBJbmZvICAgID0gQWxsb2NhdGVaZXJvUG9vbCAoTWVtU2l6 ZSk7DQotICBBU1NFUlQgKEluZm8gIT0gTlVMTCk7DQotDQotICAvLw0KLSAgLy8gR2V0IHVzZXIg bmFtZSBpbmZvcm1hdGlvbi4NCi0gIC8vDQotICBVc2VySW5mbyA9IE5VTEw7DQotICB3aGlsZSAo VFJVRSkgew0KLSAgICBJbmZvU2l6ZSA9IE1lbVNpemU7DQotICAgIC8vDQotICAgIC8vIEdldCBu ZXh0IHVzZXIgaW5mb3JtYXRpb24uDQotICAgIC8vDQotICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdl ci0+R2V0TmV4dEluZm8gKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbVVzZXJNYW5h Z2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlciwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZVc2VySW5mbw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KTsNCi0gICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgIGJyZWFrOw0KLSAgICB9 DQotDQotICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdlci0+R2V0SW5mbyAoDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtVXNlck1hbmFnZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBVc2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm8sDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZvLA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJkluZm9TaXplDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICBp ZiAoU3RhdHVzID09IEVGSV9CVUZGRVJfVE9PX1NNQUxMKSB7DQotICAgICAgTWVtU2l6ZSA9IElu Zm9TaXplOw0KLSAgICAgIEZyZWVQb29sIChJbmZvKTsNCi0gICAgICBJbmZvID0gQWxsb2NhdGVa ZXJvUG9vbCAoTWVtU2l6ZSk7DQotICAgICAgQVNTRVJUIChJbmZvICE9IE5VTEwpOw0KLQ0KLSAg ICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdlci0+R2V0SW5mbyAoDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1Vc2VyTWFuYWdlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgVXNlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm8sDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZm8sDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICZJbmZvU2l6ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0K LSAgICB9DQotICAgIC8vDQotICAgIC8vIENoZWNrIHVzZXIgaW5mb3JtYXRpb24uDQotICAgIC8v DQotICAgIGlmIChTdGF0dXMgPT0gRUZJX1NVQ0NFU1MpIHsNCi0gICAgICBpZiAoSW5mby0+SW5m b1R5cGUgPT0gRUZJX1VTRVJfSU5GT19OQU1FX1JFQ09SRCkgew0KLSAgICAgICAgTmFtZUxlbiA9 IEluZm8t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4ICAgICAgICAgVGhlIGluZGV4 IG9mIHRoZSB1c2VyIGluIHRoZSB1c2VyIG5hbWUgbGlzdA0KLSAgQHBhcmFtW2luXSAgT3BDb2Rl SGFuZGxlICBQb2ludHMgdG8gY29udGFpbmVyIGZvciBkeW5hbWljIGNyZWF0ZWQgb3Bjb2Rlcy4N Ci0NCi0qKi8NCi1WT0lEDQotQWRkVXNlclRvRm9ybSAoDQotICBJTiAgRUZJX1VTRVJfUFJPRklM RV9IQU5ETEUgICAgICAgICAgICAgICAgICAgVXNlciwNCi0gIElOICBVSU5UMTYgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBJbmRleCwNCi0gIElOICBWT0lEICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqT3BDb2RlSGFuZGxlDQotICApDQotew0KLSAgRUZJ X1NUUklOR19JRCBOYW1lSWQ7DQotDQotICAvLw0KLSAgLy8gR2V0IHVzZXIgbmFtZQ0KLSAgLy8N Ci0gIE5hbWVJZCA9IEdldFVzZXJOYW1lIChVc2VyKTsNCi0gIGlmIChOYW1lSWQgPT0gMCkgew0K LSAgICByZXR1cm4gOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIENyZWF0ZSB1c2VyIG5hbWUgb3B0 aW9uLg0KLSAgLy8NCi0gIHN3aXRjaCAoSW5kZXggJiBLRVlfRklSU1RfRk9STV9NQVNLKSB7DQot ICBjYXNlIEtFWV9NT0RJRllfVVNFUjoNCi0gICAgSGlpQ3JlYXRlR290b09wQ29kZSAoDQotICAg ICAgT3BDb2RlSGFuZGxlLCAgICAgICAgICAgICAgICAgICAvLyBDb250YWluZXIgZm9yIGR5bmFt aWMgY3JlYXRlZCBvcGNvZGVzDQotICAgICAgRk9STUlEX1VTRVJfSU5GTywgICAgICAgICAgICAg ICAvLyBUYXJnZXQgRm9ybSBJRA0KLSAgICAgIE5hbWVJZCwgICAgICAgICAgICAgICAgICAgICAg ICAgLy8gUHJvbXB0IHRleHQNCi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Ag ICAgICAgICAgICAgICAgICAgICB0byBiZSBkZWxldGVkLg0KLQ0KLSoqLw0KLVZPSUQNCi1EZWxl dGVVc2VyICgNCi0gIElOIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBVc2VySW5kZXgNCi0gICkNCi17DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7 DQotICBFRklfVVNFUl9QUk9GSUxFX0hBTkRMRSBVc2VyOw0KLSAgRUZJX0lOUFVUX0tFWSAgICAg ICAgICAgS2V5Ow0KLSAgRUZJX1VTRVJfSU5GT19IQU5ETEUgICAgVXNlckluZm87DQotICBFRklf VVNFUl9JTkZPICAgICAgICAgICAqSW5mbzsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgIElu Zm9TaXplOw0KLQ0KLSAgLy8NCi0gIC8vIEZpbmQgc3BlY2lmaWVkIHVzZXIgcHJvZmlsZSBhbmQg ZGVsZXRlIGl0Lg0KLSAgLy8NCi0gIFVzZXIgICAgPSBOVUxMOw0KLSAgU3RhdHVzICA9IG1Vc2Vy TWFuYWdlci0+R2V0TmV4dCAobVVzZXJNYW5hZ2VyLCAmVXNlcik7DQotICBpZiAoRUZJX0VSUk9S IChTdGF0dXMpKSB7DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIHdoaWxlIChVc2VySW5k ZXggPiAxKSB7DQotICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdlci0+R2V0TmV4dCAobVVzZXJNYW5h Z2VyLCAmVXNlcik7DQotICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICBnb3Rv IERvbmU7DQotICAgIH0NCi0gICAgVXNlckluZGV4LS07DQotICB9DQotDQotICBpZiAoVXNlcklu ZGV4ID09IDEpIHsNCi0gICAgLy8NCi0gICAgLy8gR2V0IHRoZSBpZGVudGlmaWNhdGlvbiBwb2xp Y3kuDQotICAgIC8vDQotICAgIFN0YXR1cyA9IEZpbmRJbm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ICAgKkVuZE9wQ29kZUhhbmRsZTsNCi0gIEVGSV9JRlJf R1VJRF9MQUJFTCAgICAgICpTdGFydExhYmVsOw0KLSAgRUZJX0lGUl9HVUlEX0xBQkVMICAgICAg KkVuZExhYmVsOw0KLQ0KLSAgLy8NCi0gIC8vIEluaXRpYWxpemUgdGhlIGNvbnRhaW5lciBmb3Ig ZHluYW1pYyBvcGNvZGVzLg0KLSAgLy8NCi0gIFN0YXJ0T3BDb2RlSGFuZGxlID0gSGlpQWxsb2Nh dGVPcENvZGVIYW5kbGUgKCk7DQotICBBU1NFUlQgKFN0YXJ0T3BDb2RlSGFuZGxlICE9IE5VTEwp Ow0KLQ0KLSAgRW5kT3BDb2RlSGFuZGxlID0gSGlpQWxsb2NhdGVPcENvZGVIYW5kbGUgKCk7DQot ICBBU1NFUlQgKEVuZE9wQ29kZUhhbmRsZSAhPSBOVUxMKTsNCi0NCi0gIC8vDQotICAvLyBDcmVh dGUgSGlpIEV4dGVuZCBMYWJlbCBPcENvZGUuDQotICAvLw0KLSAgU3RhcnRMYWJlbCA9IChFRklf SUZSX0dVSURfTEFCRUwgKikgSGlpQ3JlYXRlR3VpZE9wQ29kZSAoDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaUlmclRpYW5vR3VpZCwNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfSUZSX0dVSURfTEFCRUwpDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICBTdGFydExhYmVsLT5F eHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQotICBTdGFydExhYmVsLT5O dW1iZXIgICAgICAgID0gTEFCRUxfVVNFUl9ERUxfRlVOQzsNCi0NCi0gIEVuZExhYmVsID0gKEVG SV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVHdWlkT3BDb2RlICgNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIEVuZE9wQ29kZUhhbmRsZSwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVMKQ0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIEVuZExhYmVsLT5FeHRlbmRPcENvZGUg ID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQotICBFbmRMYWJlbC0+TnVtYmVyICAgICAgICA9 IExBQkVMX0VORDsNCi0NCi0gIC8vDQotICAvLyBBZGQgZWFjaCB1c2VyIGNhbiBiZSBkZWxldGVk Lg0KLSAgLy8NCi0gIFVzZXIgID0gTlVMTDsNCi0gIEluZGV4ID0gMTsNCi0gIG1Vc2VyTWFuYWdl ci0+Q3VycmVudCAobVVzZXJNYW5hZ2VyLCAmQ3VycmVudFVzZXIpOw0KLSAgd2hpbGUgKFRSVUUp IHsNCi0gICAgU3RhdHVzID0gbVVzZXJNYW5hZ2VyLT5HZXROZXh0IChtVXNlck1hbmFnZXIsICZV c2VyKTsNCi0gICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgIGJyZWFrOw0KLSAg ICB9DQotDQotICAgIGlmIChVc2VyICE9IEN1cnJlbnRVc2VyKSB7DQotICAgICAgQWRkVXNlclRv Rm9ybSAoDQotICAgICAgICBVc2VyLA0KLSAgICAgICAgKFVJTlQxNikoS0VZX0RFTF9V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vbi4N Ci0gIEByZXR2YWwgT3RoZXJzICAgICAgICAgICAgICAgICBGYWlsIHRvIGhhbmRsZSB0aGUgYWN0 aW9uLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1Vc2VyUHJvZmlsZU1hbmFnZXJD YWxsYmFjayAoDQotICBJTiAgQ09OU1QgRUZJX0hJSV9DT05GSUdfQUNDRVNTX1BST1RPQ09MICAg ICAgKlRoaXMsDQotICBJTiAgRUZJX0JST1dTRVJfQUNUSU9OICAgICAgICAgICAgICAgICAgICAg ICAgQWN0aW9uLA0KLSAgSU4gIEVGSV9RVUVTVElPTl9JRCAgICAgICAgICAgICAgICAgICAgICAg ICAgIFF1ZXN0aW9uSWQsDQotICBJTiAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgVHlwZSwNCi0gIElOICBFRklfSUZSX1RZUEVfVkFMVUUgICAgICAgICAgICAgICAg ICAgICAgICAqVmFsdWUsDQotICBPVVQgRUZJX0JST1dTRVJfQUNUSU9OX1JFUVVFU1QgICAgICAg ICAgICAgICAgKkFjdGlvblJlcXVlc3QNCi0gICkNCi17DQotICBFRklfU1RBVFVTICAgICAgICAg ICAgICAgU3RhdHVzOw0KLSAgRUZJX0lOUFVUX0tFWSAgICAgICAgICAgIEtleTsNCi0gIFVJTlQz MiAgICAgICAgICAgICAgICAgICBDdXJyZW50QWNjZXNzUmlnaHQ7DQotICBDSEFSMTYgICAgICAg ICAgICAgICAgICAgKlF1ZXN0aW9uU3RyOw0KLSAgQ0hBUjE2ICAgICAgICAgICAgICAgICAgICpQ cm9tcHRTdHI7DQotICBWT0lEICAgICAgICAgICAgICAgICAgICAgKlN0YXJ0T3BDb2RlSGFuZGxl Ow0KLSAgVk9JRCAgICAgICAgICAgICAgICAgICAgICpFbmRPcENvZGVIYW5kbGU7DQotICBFRklf SUZSX0dVSURfTEFCRUwgICAgICAgKlN0YXJ0TGFiZWw7DQotICBFRklfSUZSX0dVSUR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cm1hdGlvbi4NCi0gICAgICAvLw0KLSAgICAgIFN0YXR1cyA9IEdldEFjY2Vzc1Jp Z2h0ICgmQ3VycmVudEFjY2Vzc1JpZ2h0KTsNCi0gICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQotICAgICAgICBDdXJyZW50QWNjZXNzUmlnaHQgPSBFRklfVVNFUl9JTkZPX0FDQ0VTU19F TlJPTExfU0VMRjsNCi0gICAgICB9DQotDQotICAgICAgLy8NCi0gICAgICAvLyBJbml0IGNyZWRl bnRpYWwgcHJvdmlkZXIgaW5mb3JtYXRpb24uDQotICAgICAgLy8NCi0gICAgICBTdGF0dXMgPSBJ bml0UHJvdmlkZXJJbmZvICgpOw0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0g ICAgICAgIHJldHVybiBTdGF0dXM7DQotICAgICAgfQ0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8g SW5pdGlhbGl6ZSB0aGUgY29udGFpbmVyIGZvciBkeW5hbWljIG9wY29kZXMuDQotICAgICAgLy8N Ci0gICAgICBTdGFydE9wQ29kZUhhbmRsZSA9IEhpaUFsbG9jYXRlT3BDb2RlSGFuZGxlICgpOw0K LSAgICAgIEFTU0VSVCAoU3RhcnRPcENvZGVIYW5kbGUgIT0gTlVMTCk7DQotDQotICAgICAgRW5k T3BDb2RlSGFuZGxlID0gSGlpQWxsb2NhdGVPcENvZGVIYW5kbGUgKCk7DQotICAgICAgQVNTRVJU IChFbmRPcENvZGVIYW5kbGUgIT0gTlVMTCk7DQotDQotICAgICAgLy8NCi0gICAgICAvLyBDcmVh dGUgSGlpIEV4dGVuZCBMYWJlbCBPcENvZGUuDQotICAgICAgLy8NCi0gICAgICBTdGFydExhYmVs ID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVHdWlkT3BDb2RlICgNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmdFZmlJZnJUaWFu b0d1aWQsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxM LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChF RklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApOw0KLSAgICAgIFN0YXJ0TGFiZWwtPkV4dGVuZE9wQ29kZSAgPSBFRklfSUZSX0VY VEVORF9PUF9MQUJFTDsNCi0gICAgICBTdGFydExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCRUxf VVNFUl9NQU5BR0VfRlVOQzsNCi0NCi0gICAgICBFbmRMYWJlbCA9IChFRklfSUZSX0dVSURfTEFC RUwgKikgSGlpQ3JlYXRlR3VpZE9wQ29kZSAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgRW5kT3BDb2RlSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgICBFbmRMYWJlbC0+RXh0 ZW5kT3BDb2RlICA9IEVGSV9JRlJfRVhURU5EX09QX0xBQkVMOw0KLSAgICAgIEVuZExhYmVsLT5O dW1iZXIgICAgICAgID0gTEFCRUxfRU5EOw0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8gQWRkIHVz ZXIgcHJvZmlsZSBvcHRpb24uDQotICAgICAgLy8NCi0gICAgICBpZiAoKEN1cnJlbnRBY2Nlc3NS aWdodCA9PSBFRklfVVNFUl9JTkZPX0FDQ0VTU19NQU5BR0UpIHx8DQotICAgICAgICAgIChDdXJy ZW50QWNjZXNzUmlnaHQgPT0gRUZJX1VTRVJfSU5GT19BQ0NFU1NfRU5ST0xMX09USEVSUykNCi0g ICAgICAgICAgKSB7DQotICAgICAgICBIaWlDcmVhdGVBY3Rpb25PcENvZGUgKA0KLSAgICAgICAg ICBTdGFydE9wQ29kZUhhbmRsZSwgICAgICAgICAgICAgICAgICAvLyBDb250YWluZXIgZm9yIGR5 bmFtaWMgY3JlYXRlZCBvcGNvZGVzDQotICAgICAgICAgIEtFWV9BRERfVVNFUiwgICAgICAgICAg ICAgICAgICAgICAgIC8vIFF1ZXN0aW9uIElEDQotICAgICAgICAgIFNUUklOR19UT0tFTiAoU1RS X0FERF9VU0VSX1RJVExFKSwgIC8vIFByb21wdCB0ZXh0DQotICAgICAgICAgIFNUUklOR19UT0tF TiAoU1RSX0FERF9VU0VSX0hFTFApLCAgIC8vIEhlbHAgdGV4dA0KLSAgICAgICAgICBFRklfSUZS X0ZMQUdfQ0FMTEJBQ0ssICAgICAgICAgICAgICAvLyBRdWVzdGlvbiBmbGFnDQotICAgICAgICAg IDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFjdGlvbiBTdHJpbmcgSUQN Ci0gICAgICAgICAgKTsNCi0gICAgICB9DQotDQotICAgICAgLy8NCi0gICAgICAvLyBBZGQgbW9k aWZ5IHVzZXIgcHJvZmlsZSBvcHRpb24uDQotICAgICAgLy8NCi0gICAgICBIaWlDcmVhdGVHb3Rv T3BDb2RlICgNCi0gICAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLCAgICAgICAgICAgICAgICAgICAg Ly8gQ29udGFpbmVyIGZvciBkeW5hbWljIGNyZWF0ZWQgb3Bjb2Rlcw0KLSAgICAgICAgRk9STUlE X01PRElGWV9VU0VSLCAgICAgICAgICAgICAgICAgICAvLyBUYXJnZXQgRm9ybSBJRA0KLSAgICAg ICAgU1RSSU5HX1RPS0VOIChTVFJfTU9ESUZZX1VTRVJfVElUTEUpLCAvLyBQcm9tcHQgdGV4dA0K LSAgICAgICAgU1RSSU5HX1RPS0VOIChTVFJfTU9ESUZZX1VTRVJfSEVMUCksICAvLyBIZWxwIHRl eHQNCi0gICAgICAgIEVGSV9JRlJfRkxBR19DQUxMQkFDSywgICAgICAgICAgICAgICAgLy8gUXVl c3Rpb24gZmxhZw0KLSAgICAgICAgS0VZX01PRElGWV9VU0VSICAgICAgICAgICAgICAgICAgICAg ICAvLyBRdWVzdGlvbiBJRA0KLSAgICAgICAgKTsNCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIEFk ZCBkZWxldGUgdXNlciBwcm9maWxlIG9wdGlvbg0KLSAgICAgIC8vDQotICAgICAgaWYgKEN1cnJl bnRBY2Nlc3NSaWdodCA9PSBFRklfVVNFUl9JTkZPX0FDQ0VTU19NQU5BR0UpIHsNCi0gICAgICAg IEhpaUNyZWF0ZUdvdG9PcENvZGUgKA0KLSAgICAgICAgICBTdGFydE9wQ29kZUhhbmRsZSwgICAg ICAgICAgICAgICAgICAgIC8vIENvbnRhaW5lciBmb3IgZHluYW1pYyBjcmVhdGVkIG9wY29kZXMN Ci0gICAgICAgICAgRk9STUlEX0RFTF9VU0VSLCAgICAgICAgICAgICAgICAgICAgICAvLyBUYXJn ZXQgRm9ybSBJRA0KLSAgICAgICAgICBTVFJJTkdfVE9LRU4gKFNUUl9ERUxFVEVfVVNFUl9USVRM RSksIC8vIFByb21wdCB0ZXh0DQotICAgICAgICAgIFNUUklOR19UT0tFTiAoU1RSX0RFTEVURV9V U0VSX0hFTFApLCAgLy8gSGVscCB0ZXh0DQotICAgICAgICAgIEVGSV9JRlJfRkxBR19DQUxMQkFD SywgICAgICAgICAgICAgICAgLy8gUXVlc3Rpb24gZmxhZw0KLSAgICAgICAgICBLRVlfREVMX1VT RVIgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFF1ZXN0aW9uIElEDQotICAgICAgICAgICk7 DQotICAgICAgfQ0KLQ0KLSAgICAgIEhpaVVwZGF0ZUZvcm0gKA0KLSAgICAgICAgbUNhbGxiYWNr SW5mby0+SGlpSGFuZGxlLCAgICAgICAgICAgICAgIC8vIEhJSSBoYW5kbGUNCi0gICAgICAgICZn VXNlclByb2ZpbGVNYW5hZ2VyR3VpZCwgICAgICAgICAgICAgICAvLyBGb3Jtc2V0IEdVSUQNCi0g ICAgICAgIEZPUk1JRF9VU0VSX01BTkFHRSwgICAgICAgICAgICAgICAgICAgICAvLyBGb3JtIElE DQotICAgICAgICBTdGFydE9wQ29kZUhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgLy8gTGFi ZWwgZm9yIHdoZXJlIHRvIGluc2VydCBvcGNvZGVzDQotICAgICAgICBFbmRPcENvZGVIYW5kbGUg ICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmVwbGFjZSBkYXRhDQotICAgICAgICApOw0KLQ0K LSAgICAgIEhpaUZyZWVPcENvZGVIYW5kbGUgKFN0YXJ0T3BDb2RlSGFuZGxlKTsNCi0gICAgICBI aWlGcmVlT3BDb2RlSGFuZGxlIChFbmRPcENvZGVIYW5kbGUpOw0KLQ0KLSAgICAgIHJldHVybiBF RklfU1VDQ0VTUzsNCi0gICAgfQ0KLSAgICBicmVhazsNCi0NCi0gIGNhc2UgRUZJX0JST1dTRVJf QUNUSU9OX0ZPUk1fQ0xPU0U6DQotICAgIFN0YXR1cyA9IEVGSV9TVUNDRVNTOw0KLSAgICBicmVh azsNCi0NCi0gIGNhc2UgRUZJX0JST1dTRVJfQUNUSU9OX0NIQU5HRUQ6DQotICB7DQotICAgIC8v DQotICAgIC8vIEhhbmRsZSB0aGUgcmVxdWVzdCBmcm9tIGZvcm0uDQotICAgIC8vDQotICAgIGlm ICgoVmFsdWUgPT0gTlVMTCkgfHwgKEFjdGlvblJlcXVlc3QgPT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aWZ5IHVzZXIgcHJvZmlsZSBvcGVyYXRpb24uDQotICAgIC8vDQotICAgIGNhc2UgS0VZ X01PRElGWV9VU0VSOg0KLSAgICAgIC8vDQotICAgICAgLy8gSnVkZ2UgbmV4dCAyIGJpdHMuDQot ICAgICAgLy8NCi0gICAgICBzd2l0Y2ggKFF1ZXN0aW9uSWQgJiBLRVlfU0VDT05EX0ZPUk1fTUFT Sykgew0KLSAgICAgIC8vDQotICAgICAgLy8gRW50ZXIgdXNlciBwcm9maWxlIGluZm9ybWF0aW9u IGZvcm0uDQotICAgICAgLy8NCi0gICAgICBjYXNlIEtFWV9TRUxFQ1RfVVNFUjoNCi0gICAgICAg IC8vDQotICAgICAgICAvLyBKdWRnZSBuZXh0IDMgYml0cy4NCi0gICAgICAgIC8vDQotICAgICAg ICBzd2l0Y2ggKFF1ZXN0aW9uSWQgJiBLRVlfTU9ESUZZX0lORk9fTUFTSykgew0KLSAgICAgICAg Ly8NCi0gICAgICAgIC8vIE1vZGlmeSB1c2VyIG5hbWUuDQotICAgICAgICAvLw0KLSAgICAgICAg Y2FzZSBLRVlfTU9ESUZZX05BTUU6DQotICAgICAgICAgIE1vZGlmeVVzZXJOYW1lICgpOw0KLSAg ICAgICAgICAvLw0KLSAgICAgICAgICAvLyBVcGRhdGUgdXNlcm5hbWUgaW4gcGFyZW50IGZvcm0u DQotICAgICAgICAgIC8vDQotICAgICAgICAgIFNlbGVjdFVzZXJUb01vZGlmeSAoKTsNCi0gICAg ICAgICAgYnJlYWs7DQotDQotICAgICAgICAvLw0KLSAgICAgICAgLy8gTW9kaWZ5IGlkZW50aXR5 IHBvbGljeS4NCi0gICAgICAgIC8vDQotICAgICAgICBjYXNlIEtFWV9NT0RJRllfSVA6DQotICAg ICAgICAgIC8vDQotICAgICAgICAgIC8vIEp1ZGdlIG5leHQgMyBiaXRzDQotICAgICAgICAgIC8v DQotICAgICAgICAgIHN3aXRjaCAoUXVlc3Rpb25JZCAmIEtFWV9NT0RJRllfSVBfTUFTSykgew0K LSAgICAgICAgICAvLw0KLSAgICAgICAgICAvLyBDaGFuZ2UgY3JlZGVudGlhbCBwcm92aWRlciBv cHRpb24uDQotICAgICAgICAgIC8vDQotICAgICAgICAgIGNhc2UgS0VZX01PRElGWV9QUk9WOg0K LSAgICAgICAgICAgIG1Qcm92aWRlckNob2ljZSA9IFZhbHVlLT51ODsNCi0gICAgICAgICAgICBi cmVhazsNCi0NCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gQ2hhbmdlIGxvZ2ljYWwgY29u bmVjdG9yLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9NT0RJRllfQ09OTjoN Ci0gICAgICAgICAgICBtQ29ubmNldExvZ2ljYWwgPSBWYWx1ZS0+dTg7DQotICAgICAgICAgICAg YnJlYWs7DQotDQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIFNhdmUgb3B0aW9uLg0KLSAg ICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9BRERfSVBfT1A6DQotICAgICAgICAgICAg QWRkSWRlbnRpdHlQb2xpY3lJdGVtICgpOw0KLSAgICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAg ICAgICAvLw0KLSAgICAgICAgICAvLyBSZXR1cm4gdG8gdXNlciBwcm9maWxlIGluZm9ybWF0aW9u IGZvcm0uDQotICAgICAgICAgIC8vDQotICAgICAgICAgIGNhc2UgS0VZX0lQX1JFVFVSTl9VSUY6 DQotICAgICAgICAgICAgU2F2ZUlkZW50aXR5UG9saWN5ICgpOw0KLSAgICAgICAgICAgICpBY3Rp b25SZXF1ZXN0ID0gRUZJX0JST1dTRVJfQUNUSU9OX1JFUVVFU1RfRk9STV9TVUJNSVRfRVhJVDsN Ci0gICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgICAgZGVmYXVsdDoNCi0gICAgICAgICAg ICBicmVhazsNCi0gICAgICAgICAgfQ0KLSAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgIC8v DQotICAgICAgICAvLyBNb2RpZnkgYWNjZXNzIHBvbGljeS4NCi0gICAgICAgIC8vDQotICAgICAg ICBjYXNlIEtFWV9NT0RJRllfQVA6DQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIEp1ZGdl IG5leHQgMyBiaXRzLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBzd2l0Y2ggKFF1ZXN0aW9u SWQgJiBLRVlfTU9ESUZZX0FQX01BU0spIHsNCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8g Q2hhbmdlIGFjY2VzcyByaWdodCBjaG9pY2UuDQotICAgICAgICAgIC8vDQotICAgICAgICAgIGNh c2UgS0VZX01PRElGWV9SSUdIVDoNCi0gICAgICAgICAgICBtQWNjZXNzSW5mby5BY2Nlc3NSaWdo dCA9IFZhbHVlLT51ODsNCi0gICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgICAgLy8NCi0g ICAgICAgICAgLy8gQ2hhbmdlIHNldHVwIGNob2ljZS4NCi0gICAgICAgICAgLy8NCi0gICAgICAg ICAgY2FzZSBLRVlfTU9ESUZZX1NFVFVQOg0KLSAgICAgICAgICAgIG1BY2Nlc3NJbmZvLkFjY2Vz c1NldHVwPSBWYWx1ZS0+dTg7DQotICAgICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICAgIC8v DQotICAgICAgICAgIC8vIENoYW5nZSBib290IG9yZGVyIGNob2ljZS4NCi0gICAgICAgICAgLy8N Ci0gICAgICAgICAgY2FzZSBLRVlfTU9ESUZZX0JPT1Q6DQotICAgICAgICAgICAgbUFjY2Vzc0lu Zm8uQWNjZXNzQm9vdE9yZGVyID0gVmFsdWUtPnUzMjsNCi0gICAgICAgICAgICBicmVhazsNCi0N Ci0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gUmV0dXJuIHRvIHVzZXIgcHJvZmlsZSBpbmZv cm1hdGlvbiBmb3JtLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9BUF9SRVRV Uk5fVUlGOg0KLSAgICAgICAgICAgIFNhdmVBY2Nlc3NQb2xpY3kgKCk7DQotICAgICAgICAgICAg KkFjdGlvblJlcXVlc3QgPSBFRklfQlJPV1NFUl9BQ1RJT05fUkVRVUVTVF9GT1JNX1NVQk1JVF9F WElUOw0KLSAgICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAgICAgICBkZWZhdWx0Og0KLSAgICAg ICAgICAgIGJyZWFrOw0KLSAgICAgICAgICB9DQotICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAg ICAgZGVmYXVsdDoNCi0gICAgICAgICAgYnJlYWs7DQotICAgICAgICB9DQotICAgICAgICBicmVh azsNCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIEFjY2VzcyBwb2xpY3kgZGV2aWNlIHBhdGggbW9k aWZpZWQuDQotICAgICAgLy8NCi0gICAgICBjYXNlIEtFWV9NT0RJRllfQVBfRFA6DQotICAgICAg ICAvLw0KLSAgICAgICAgLy8gSnVkZ2UgbmV4dCAyIGJpdHMuDQotICAgICAgICAvLw0KLSAgICAg ICAgc3dpdGNoIChRdWVzdGlvbklkICYgS0VZX01PRElGWV9EUF9NQVNLKSB7DQotICAgICAgICAv Lw0KLSAgICAgICAgLy8gTG9hZCBwZXJtaXQgZGV2aWNlIHBhdGggbW9kaWZpZWQuDQotICAgICAg ICAvLw0KLSAgICAgICAgY2FzZSBLRVlfTE9BRF9QRVJNSVRfTU9ESUZZOg0KLSAgICAgICAgICBR dWVzdGlvblN0ciA9IEdldFN0cmluZ0J5SWQgKFNUUklOR19UT0tFTiAoU1RSX01PVkVfVE9fRk9S QklEX0xJU1QpKTsNCi0gICAgICAgICAgUHJvbXB0U3RyICAgPSBHZXRTdHJpbmdCeUlkIChTVFJJ TkdfVE9LRU4gKFNUUl9QUkVTU19LRVlfQ09OVElOVUUpKTsNCi0gICAgICAgICAgQ3JlYXRlUG9w VXAgKA0KLSAgICAgICAgICAgIEVGSV9MSUdIVEdSQVkgfCBFRklfQkFDS0dST1VORF9CTFVFLA0K LSAgICAgICAgICAgICZLZXksDQotICAgICAgICAgICAgUXVlc3Rpb25TdHIsDQotICAgICAgICAg ICAgTCIiLA0KLSAgICAgICAgICAgIFByb21wdFN0ciwNCi0gICAgICAgICAgICBOVUxMDQotICAg ICAgICAgICAgKTsNCi0gICAgICAgICAgRnJlZVBvb2wgKFF1ZXN0aW9uU3RyKTsNCi0gICAgICAg ICAgRnJlZVBvb2wgKFByb21wdFN0cik7DQotICAgICAgICAgIGlmIChLZXkuVW5pY29kZUNoYXIg IT0gQ0hBUl9DQVJSSUFHRV9SRVRVUk4pIHsNCi0gICAgICAgICAgICBicmVhazsNCi0gICAgICAg ICAgfQ0KLQ0KLSAgICAgICAgICBBZGRUb0ZvcmJpZExvYWQgKChVSU5UMTYpKFF1ZXN0aW9uSWQg JiAoS0VZX01PRElGWV9EUF9NQVNLIC0gMSkpKTsNCi0gICAgICAgICAgRGlzcGxheUxvYWRQZXJt aXQgKCk7DQotICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIExv YWQgZm9yYmlkIGRldmljZSBwYXRoIG1vZGlmaWVkLg0KLSAgICAgICAgLy8NCi0gICAgICAgIGNh c2UgS0VZX0xPQURfRk9SQklEX01PRElGWToNCi0gICAgICAgICAgUXVlc3Rpb25TdHIgPSBHZXRT dHJpbmdCeUlkIChTVFJJTkdfVE9LRU4gKFNUUl9NT1ZFX1RPX1BFUk1JVF9MSVNUKSk7DQotICAg ICAgICAgIFByb21wdFN0ciAgID0gR2V0U3RyaW5nQnlJZCAoU1RSSU5HX1RPS0VOIChTVFJfUFJF U1NfS0VZX0NPTlRJTlVFKSk7DQotICAgICAgICAgIENyZWF0ZVBvcFVwICgNCi0gICAgICAgICAg ICBFRklfTElHSFRHUkFZIHwgRUZJX0JBQ0tHUk9VTkRfQkxVRSwNCi0gICAgICAgICAgICAmS2V5 LA0KLSAgICAgICAgICAgIFF1ZXN0aW9uU3RyLA0KLSAgICAgICAgICAgIEwiIiwNCi0gICAgICAg ICAgICBQcm9tcHRTdHIsDQotICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAgICk7DQotICAg ICAgICAgIEZyZWVQb29sIChRdWVzdGlvblN0cik7DQotICAgICAgICAgIEZyZWVQb29sIChQcm9t cHRTdHIpOw0KLSAgICAgICAgICBpZiAoS2V5LlVuaWNvZGVDaGFyICE9IENIQVJfQ0FSUklBR0Vf UkVUVVJOKSB7DQotICAgICAgICAgICAgYnJlYWs7DQotICAgICAgICAgIH0NCi0NCi0gICAgICAg ICAgRGVsZXRlRnJvbUZvcmJpZExvYWQgKChVSU5UMTYpKFF1ZXN0aW9uSWQgJiAoS0VZX01PRElG WV9EUF9NQVNLIC0gMSkpKTsNCi0gICAgICAgICAgRGlzcGxheUxvYWRGb3JiaWQgKCk7DQotICAg ICAgICAgIGJyZWFrOw0KLQ0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIENvbm5lY3QgcGVybWl0 IGRldmljZSBwYXRoIG1vZGlmaWVkLg0KLSAgICAgICAgLy8NCi0gICAgICAgIGNhc2UgS0VZX0NP Tk5FQ1RfUEVSTUlUX01PRElGWToNCi0gICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICAvLw0K LSAgICAgICAgLy8gQ29ubmVjdCBmb3JiaWQgZGV2aWNlIHBhdGggbW9kaWZpZWQuDQotICAgICAg ICAvLw0KLSAgICAgICAgY2FzZSBLRVlfQ09OTkVDVF9GT1JCSURfTU9ESUZZOg0KLSAgICAgICAg ICBicmVhazsNCi0NCi0gICAgICAgIGRlZmF1bHQ6DQotICAgICAgICAgIGJyZWFrOw0KLSAgICAg ICAgfQ0KLSAgICAgICAgYnJlYWs7DQotDQotICAgICAgZGVmYXVsdDoNCi0gICAgICAgIGJyZWFr Ow0KLSAgICAgIH0NCi0gICAgICBicmVhazsNCi0NCi0gICAgZGVmYXVsdDoNCi0gICAgICBicmVh azsNCi0gICAgfQ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i0gICAgICAvLw0KLSAgICAg IHN3aXRjaCAoUXVlc3Rpb25JZCAmIEtFWV9TRUNPTkRfRk9STV9NQVNLKSB7DQotICAgICAgLy8N Ci0gICAgICAvLyBFbnRlciBtb2RpZnkgdXNlciBwcm9maWxlIGZvcm0uDQotICAgICAgLy8NCi0g ICAgICBjYXNlIEtFWV9FTlRFUl9ORVhUX0ZPUk06DQotICAgICAgICBTZWxlY3RVc2VyVG9Nb2Rp ZnkgKCk7DQotICAgICAgICBicmVhazsNCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIEVudGVyIHVz ZXIgcHJvZmlsZSBpbmZvcm1hdGlvbiBmb3JtLg0KLSAgICAgIC8vDQotICAgICAgY2FzZSBLRVlf U0VMRUNUX1VTRVI6DQotICAgICAgICAvLw0KLSAgICAgICAgLy8gSnVkZ2UgbmV4dCAzIGJpdHMu DQotICAgICAgICAvLw0KLSAgICAgICAgc3dpdGNoIChRdWVzdGlvbklkICYgS0VZX01PRElGWV9J TkZPX01BU0spIHsNCi0gICAgICAgIC8vDQotICAgICAgICAvLyBEaXNwbGF5IHVzZXIgaW5mb3Jt YXRpb24gZm9ybS4NCi0gICAgICAgIC8vDQotICAgICAgICBjYXNlIEtFWV9FTlRFUl9ORVhUX0ZP Uk06DQotICAgICAgICAgIE1vZGlmeVVzZXJJbmZvICgoVUlOVDgpIFF1ZXN0aW9uSWQpOw0KLSAg ICAgICAgICBicmVhazsNCi0NCi0gICAgICAgIC8vDQotICAgICAgICAvLyBNb2RpZnkgaWRlbnRp dHkgcG9saWN5Lg0KLSAgICAgICAgLy8NCi0gICAgICAgIGNhc2UgS0VZX01PRElGWV9JUDoNCi0g ICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gSnVkZ2UgbmV4dCAzIGJpdHMNCi0gICAgICAgICAg Ly8NCi0gICAgICAgICAgc3dpdGNoIChRdWVzdGlvbklkICYgS0VZX01PRElGWV9JUF9NQVNLKSB7 DQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIERpc3BsYXkgaWRlbnRpdHkgcG9saWN5IG1v ZGlmeSBmb3JtLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9FTlRFUl9ORVhU X0ZPUk06DQotICAgICAgICAgICAgTW9kaWZ5SWRlbnRpdHlQb2xpY3kgKCk7DQotICAgICAgICAg ICAgYnJlYWs7DQotDQotICAgICAgICAgIGRlZmF1bHQ6DQotICAgICAgICAgICAgYnJlYWs7DQot ICAgICAgICAgIH0NCi0gICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICAvLw0KLSAgICAgICAg Ly8gTW9kaWZ5IGFjY2VzcyBwb2xpY3kuDQotICAgICAgICAvLw0KLSAgICAgICAgY2FzZSBLRVlf TU9ESUZZX0FQOg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICAvLyBKdWRnZSBuZXh0IDMgYml0 cy4NCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgc3dpdGNoIChRdWVzdGlvbklkICYgS0VZX01P RElGWV9BUF9NQVNLKSB7DQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIERpc3BsYXkgYWNj ZXNzIHBvbGljeSBtb2RpZnkgZm9ybS4NCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgY2FzZSBL RVlfRU5URVJfTkVYVF9GT1JNOg0KLSAgICAgICAgICAgIE1vZGlkeUFjY2Vzc1BvbGljeSAoKTsN Ci0gICAgICAgICAgICBicmVhazsNCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gTG9hZCBk ZXZpY2UgcGF0aCBmb3JtLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9NT0RJ RllfTE9BRDoNCi0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIC8vIEp1ZGdlIG5leHQgMiBi aXRzLg0KLSAgICAgICAgICAgIC8vDQotICAgICAgICAgICAgc3dpdGNoIChRdWVzdGlvbklkICYg S0VZX0RJU1BMQVlfRFBfTUFTSykgew0KLSAgICAgICAgICAgIC8vDQotICAgICAgICAgICAgLy8g UGVybWl0IGxvYWQgZGV2aWNlIHBhdGguDQotICAgICAgICAgICAgLy8NCi0gICAgICAgICAgICBj YXNlIEtFWV9QRVJNSVRfTU9ESUZZOg0KLSAgICAgICAgICAgICAgRGlzcGxheUxvYWRQZXJtaXQg KCk7DQotICAgICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgICAgICAvLw0KLSAgICAgICAg ICAgIC8vIEZvcmJpZCBsb2FkIGRldmljZSBwYXRoLg0KLSAgICAgICAgICAgIC8vDQotICAgICAg ICAgICAgY2FzZSBLRVlfRk9SQklEX01PRElGWToNCi0gICAgICAgICAgICAgIERpc3BsYXlMb2Fk Rm9yYmlkICgpOw0KLSAgICAgICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICAgICAgZGVmYXVs dDoNCi0gICAgICAgICAgICAgIGJyZWFrOw0KLSAgICAgICAgICAgIH0NCi0gICAgICAgICAgICBi cmVhazsNCi0NCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gQ29ubmVjdCBkZXZpY2UgcGF0 aCBmb3JtLg0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICBjYXNlIEtFWV9NT0RJRllfQ09OTkVD VDoNCi0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIC8vIEp1ZGdlIG5leHQgMiBiaXRzLg0K LSAgICAgICAgICAgIC8vDQotICAgICAgICAgICAgc3dpdGNoIChRdWVzdGlvbklkICYgS0VZX0RJ U1BMQVlfRFBfTUFTSykgew0KLSAgICAgICAgICAgIC8vDQotICAgICAgICAgICAgLy8gUGVybWl0 IGNvbm5lY3QgZGV2aWNlIHBhdGguDQotICAgICAgICAgICAgLy8NCi0gICAgICAgICAgICBjYXNl IEtFWV9QRVJNSVRfTU9ESUZZOg0KLSAgICAgICAgICAgICAgRGlzcGxheUNvbm5lY3RQZXJtaXQg KCk7DQotICAgICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgICAgICAvLw0KLSAgICAgICAg ICAgIC8vIEZvcmJpZCBjb25uZWN0IGRldmljZSBwYXRoLg0KLSAgICAgICAgICAgIC8vDQotICAg ICAgICAgICAgY2FzZSBLRVlfRk9SQklEX01PRElGWToNCi0gICAgICAgICAgICAgIERpc3BsYXlD b25uZWN0Rm9yYmlkICgpOw0KLSAgICAgICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICAgICAg ZGVmYXVsdDoNCi0gICAgICAgICAgICAgIGJyZWFrOw0KLSAgICAgICAgICAgIH0NCi0gICAgICAg ICAgICBicmVhazsNCi0NCi0gICAgICAgICAgZGVmYXVsdDoNCi0gICAgICAgICAgICBicmVhazsN Ci0gICAgICAgICAgfQ0KLSAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgIGRlZmF1bHQ6DQot ICAgICAgICAgIGJyZWFrOw0KLSAgICAgICAgfQ0KLSAgICAgICAgYnJlYWs7DQotDQotICAgICAg ZGVmYXVsdDoNCi0gICAgICAgIGJyZWFrOw0KLSAgICAgIH0NCi0gICAgICBicmVhazsNCi0NCi0g ICAgZGVmYXVsdDoNCi0gICAgICBicmVhazsNCi0gICAgfQ0KLSAgfQ0KLSAgYnJlYWs7DQotDQot ICBkZWZhdWx0Og0KLSAgICAvLw0KLSAgICAvLyBBbGwgb3RoZXIgYWN0aW9uIHJldHVybiB1bnN1 cHBvcnRlZC4NCi0gICAgLy8NCi0gICAgU3RhdHVzID0gRUZJX1VOU1VQUE9SVEVEOw0KLSAgICBi cmVhazsNCi0gIH0NCi0NCi0NCi0gIHJldHVybiBTdGF0dXM7DQotfQ0KLQ0KLQ0KLS8qKg0KLSAg VGhpcyBmdW5jdGlvbiBhbGxvd3MgYSBjYWxsZXIgdG8gZXh0cmFjdCB0aGUgY3VycmVudCBjb25m aWd1cmF0aW9uIGZvciBvbmUNCi0gIG9yIG1vcmUgbmFtZWQgZWxlbWVudHMgZnJvbSB0aGUgdGFy Z2V0IGRyaXZlci4NCi0NCi0NCi0gIEBwYXJhb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0KLUZha2VSb3V0ZUNvbmZpZyAo DQotICBJTiAgQ09OU1QgRUZJX0hJSV9DT05GSUdfQUNDRVNTX1BST1RPQ09MICAgKlRoaXMsDQot ICBJTiAgQ09OU1QgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgQ29uZmlndXJhdGlv biwNCi0gIE9VVCBFRklfU1RSSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqUHJvZ3Jl c3MNCi0gICkNCi17DQotICBpZiAoQ29uZmlndXJhdGlvbiA9PSBOVUxMIHx8IFByb2dyZXNzID09 IE5VTEwpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCi0gIH0NCi0NCi0g ICpQcm9ncmVzcyA9IENvbmZpZ3VyYXRpb247DQotDQotICByZXR1cm4gRUZJX05PVF9GT1VORDsN Ci19DQotDQotDQotLyoqDQotICBNYWluIGVudHJ5IGZvciB0aGlzIGRyaXZlci4NCi0NCi0gIEBw YXJhbSBJbWFnZUhhbmRsZSAgICAgSW1hZ2UgaGFuZGxlIHRoaXMgZHJpdmVyLg0KLSAgQHBhcmFt IFN5c3RlbVRhYmxlICAgICBQb2ludGVyIHRvIFN5c3RlbVRhYmxlLg0KLQ0KLSAgQHJldHZhbCBF RklfU1VDRVNTICAgICBUaGlzIGZ1bmN0aW9uIGFsd2F5cyBjb21wbGV0ZSBzdWNjZXNzZnVsbHku DQotDQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLVVzZXJQcm9maWxlTWFuYWdlckluaXQg KA0KLSAgSU4gRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAgICAgSW1hZ2VIYW5kbGUsDQot ICBJTiBFRklfU1lTVEVNX1RBQkxFICAgICAgICAgICAgICAgICAqU3lzdGVtVGFibGUNCi0gICkN Ci17DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBV U0VSX1BST0ZJTEVfTUFOQUdFUl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WxlTWFuYWdlckNhbGxiYWNr Ow0KLSAgQ2FsbGJhY2tJbmZvLT5Ecml2ZXJIYW5kbGUgICAgICAgICAgICAgICAgPSBOVUxMOw0K LQ0KLSAgLy8NCi0gIC8vIEluc3RhbGwgRGV2aWNlIFBhdGggUHJvdG9jb2wgYW5kIENvbmZpZyBB Y2Nlc3MgcHJvdG9jb2wgdG8gZHJpdmVyIGhhbmRsZS4NCi0gIC8vDQotICBTdGF0dXMgPSBnQlMt Pkluc3RhbGxNdWx0aXBsZVByb3RvY29sSW50ZXJmYWNlcyAoDQotICAgICAgICAgICAgICAgICAg JkNhbGxiYWNrSW5mby0+RHJpdmVySGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICZnRWZpRGV2 aWNlUGF0aFByb3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICAmbUhpaVZlbmRvckRldmlj ZVBhdGgsDQotICAgICAgICAgICAgICAgICAgJmdFZmlIaWlDb25maWdBY2Nlc3NQcm90b2NvbEd1 aWQsDQotICAgICAgICAgICAgICAgICAgJkNhbGxiYWNrSW5mby0+Q29uZmlnQWNjZXNzLA0KLSAg ICAgICAgICAgICAgICAgIE5VTEwNCi0gICAgICAgICAgICAgICAgICApOw0KLSAgQVNTRVJUX0VG SV9FUlJPUiAoU3RhdHVzKTsNCi0NCi0gIC8vDQotICAvLyBQdWJsaXNoIEhJSSBkYXRhLg0KLSAg Ly8NCi0gIENhbGxiYWNrSW5mby0+SGlpSGFuZGxlID0gSGlpQWRkUGFja2FnZXMgKA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZnVXNlclByb2ZpbGVNYW5hZ2VyR3VpZCwNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBDYWxsYmFja0luZm8tPkRyaXZlckhhbmRsZSwNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyUHJvZmlsZU1hbmFnZXJTdHJpbmdzLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgIC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VuaWNvZGUgc3Ry aW5nIGFuZCB1cGRhdGUgdGhlIEhpaSBkYXRhYmFzZQ0KLSAgSXBTdHJpbmdJZCBzdHJpbmcgd2l0 aCBpdC4NCi0NCi0gIEBwYXJhbVtpbl0gIElwICAgICAgICAgUG9pbnRzIHRvIGlkZW50aXR5IHBv bGljeS4NCi0gIEBwYXJhbVtpbl0gIElwTGVuICAgICAgVGhlIGlkZW50aXR5IHBvbGljeSBsZW5n dGguDQotICBAcGFyYW1baW5dICBJcFN0cmluZ0lkIFN0cmluZyBJRCBpbiB0aGUgSElJIGRhdGFi YXNlIHRvIGJlIHJlcGxhY2VkLg0KLQ0KLSoqLw0KLVZPSUQNCi1SZXNvbHZlSWRlbnRpdHlQb2xp Y3kgKA0KLSAgSU4gIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpJ cCwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJcExl biwNCi0gIElOICBFRklfU1RSSU5HX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJcFN0 cmluZ0lkDQotICApOw0KLQ0KLS8qKg0KLSAgRXhwYW5kIGFjY2VzcyBwb2xpY3kgbWVtb3J5IHNp emUuDQotDQotICBAcGFyYW1baW5dIFZhbGlkTGVuICAgICAgIFRoZSB2YWxpZCBhY2Nlc3MgcG9s aWN5IGxlbmd0aC4NCi0gIEBwYXJhbVtpbl0gRXhwYW5kTGVuICAgICAgVGhlIGxlbmd0aCB0aGF0 IGlzIG5lZWRlZCB0byBleHBhbmQuDQotDQotKiovDQotVk9JRA0KLUV4cGFuZE1lbW9yeSAoDQot ICBJTiAgICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmFsaWRMZW4s DQotICBJTiAgICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRXhwYW5k TGVuDQotICApOw0KLQ0KLS8qKg0KLSAgRGVsZXRlIFV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0KLS8vDQotLy8g U3BlY2lmaWVkIGtleSwgdXNlZCBpbiBWRlIgKEtFWV9NT0RJRllfVVNFUiB8IEtFWV9TRUxFQ1Rf VVNFUiB8IEtFWV9NT0RJRllfTkFNRSkuDQotLy8NCi0jZGVmaW5lICBLRVlfTU9ESUZZX1VTRVJf TkFNRSAgICAgICAweDUyMDANCi0NCi0vLw0KLS8vIE1vZGlmeSBpZGVudGl0eSBwb2xpY3kgZm9y bSBrZXkuDQotLy8gTmV4dCAzIGJpdHMgKGJpdCA5fjcpLg0KLS8vDQotI2RlZmluZSAgS0VZX01P RElGWV9QUk9WICAgICAgICAgICAgMHgwMDQwDQotI2RlZmluZSAgS0VZX01PRElGWV9NVFlQRSAg ICAgICAgICAgMHgwMDgwDQotI2RlZmluZSAgS0VZX01PRElGWV9DT05OICAgICAgICAgICAgMHgw MEMwDQotI2RlZmluZSAgS0VZX0FERF9JUF9PUCAgICAgICAgICAgICAgMHgwMTAwDQotI2RlZmlu ZSAgS0VZX0lQX1JFVFVSTl9VSUYgICAgICAgICAgMHgwMTQwDQotI2RlZmluZSAgS0VZX01PRElG WV9JUF9NQVNLICAgICAgICAgMHgwMUMwDQotDQotLy8NCi0vLyBTcGVjaWZpZWQga2V5Lg0KLS8v DQotI2RlZmluZSAgS0VZX0FERF9MT0dJQ0FMX09QICAgICAgICAgMHg1NTAwDQotI2RlZmluZSAg S0VZX0lQX1JFVFVSTiAgICAgICAgICAgICAgMHg1NTQwDQotDQotLy8NCi0vLyBNb2RpZnkgYWNj ZXNzIHBvbGljeSBmb3JtIGtleS4NCi0vLyBOZXh0IDMgYml0cyAoYml0IDl+NykuDQotLy8NCi0j ZGVmaW5lICBLRVlfTU9ESUZZX1JJR0hUICAgICAgICAgICAweDAwNDANCi0jZGVmaW5lICBLRVlf TU9ESUZZX1NFVFVQICAgICAgICAgICAweDAwODANCi0jZGVmaW5lICBLRVlfTU9ESUZZX0JPT1Qg ICAgICAgICAgICAweDAwQzANCi0jZGVmaW5l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ICAjbGFuZ3VhZ2UgZW4tVVMgICIiDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiIg0KLSNzdHJpbmcgU1RSX0ZP Uk1TRVRfVElUTEUgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlVzZXIgTWFuYWdlciIN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIg ICJVc2VyIE1hbmFnZXIoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9USVRMRV9IRUxQICAgICAgICAg ICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJUaGlzIHNlbGVjdGlvbiB3aWxsIHRha2UgeW91IHRv IHRoZSBVc2VyIE1hbmFnZXIiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgI2xhbmd1YWdlIGZyLUZSICAiVGhpcyBzZWxlY3Rpb24gd2lsbCB0YWtlIHlvdSB0byB0aGUg VXNlciBNYW5hZ2VyKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfVVNFUk1BTl9USVRMRSAgICAgICAg ICAgICAgI2xhbmd1YWdlIGVuLVVTICAiVXNlciBNYW5hZ2VyIg0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlVzZXIgTWFuYWdlcihGcmVu Y2gpIg0KLSNzdHJpbmcgU1RSX0FERF9VU0VSX1RJVExFICAgICAgICAgICAgICNsYW5ndWFnZSBl bi1VUyAgIkFkZCBVc2VyIFByb2ZpbGUiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQWRkIFVzZXIgUHJvZmlsZShGcmVuY2gpIg0KLSNz dHJpbmcgU1RSX0FERF9VU0VSX0hFTFAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJB ZGQgVXNlciBQcm9maWxlIHRvIFVzZXIgRGF0YWJhc2UiDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQWRkIFVzZXIgUHJvZmlsZSB0byBV c2VyIERhdGFiYXNlKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfTU9ESUZZX1VTRVJfVElUTEUgICAg ICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIk1vZGlmeSBVc2VyIFByb2ZpbGUiDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiTW9kaWZ5IFVz ZXIgUHJvZmlsZShGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX01PRElGWV9VU0VSX0hFTFAgICAgICAg ICAgICNsYW5ndWFnZSBlbi1VUyAgIk1vZGlmeSBVc2VyIFByb2ZpbGUgSW5mb3JtYXRpb24iDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAi TW9kaWZ5IFVzZXIgUHJvZmlsZSBJbmZvcm1hdGlvbihGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0RF TEVURV9VU0VSX1RJVExFICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJEZWxldGUgVXNlciBQ cm9maWxlIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFn ZSBmci1GUiAgIkRlbGV0ZSBVc2VyIFByb2ZpbGUoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9ERUxF VEVfVVNFUl9IRUxQICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJEZWxldGUgVXNlciBQcm9m aWxlIGZyb20gVXNlciBEYXRhYmFzZSINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJEZWxldGUgVXNlciBQcm9maWxlIGZyb20gVXNlciBE YXRhYmFzZShGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX1VTRVJfSU5GTyAgICAgICAgICAgICAgICAg ICAjbGFuZ3VhZ2UgZW4tVVMgICJVc2VyIFByb2ZpbGUgSW5mb3JtYXRpb24iDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiVXNlciBQcm9m aWxlIEluZm9ybWF0aW9uKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfVVNFUl9OQU1FICAgICAgICAg ICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlVzZXIgTmFtZSINCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJVc2VyIE5hbWUoRnJlbmNo KSINCi0jc3RyaW5nIFNUUl9VU0VSX05BTUVfVkFMICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVu LVVTICAiIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFn ZSBmci1GUiAgIiINCi0jc3RyaW5nIFNUUl9DUkVBVEVfREFURSAgICAgICAgICAgICAgICAgI2xh bmd1YWdlIGVuLVVTICAiQ3JlYXRlIERhdGUiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQ3JlYXRlIERhdGUoRnJlbmNoKSINCi0jc3Ry aW5nIFNUUl9DUkVBVEVfREFURV9WQUwgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiIg0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAg IiINCi0jc3RyaW5nIFNUUl9VU0FHRV9EQVRFICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVu LVVTICAiVXNhZ2UgRGF0ZSINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAjbGFuZ3VhZ2UgZnItRlIgICJVc2FnZSBEYXRlKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfVVNB R0VfREFURV9WQUwgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiIg0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIiINCi0jc3RyaW5n IFNUUl9VU0FHRV9DT1VOVCAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiVXNhZ2Ug Q291bnQiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdl IGZyLUZSICAiVXNhZ2UgQ291bnQoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9VU0FHRV9DT1VOVF9W QUwgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiIg0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIiINCi0jc3RyaW5nIFNUUl9JREVO VElGWV9QT0xJQ1kgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiSWRlbnRpZnkgUG9saWN5 Ig0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1G UiAgIklkZW50aWZ5IFBvbGljeShGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0lERU5USUZZX1BPTElD WV9WQUwgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICIiDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiIg0KLSNzdHJpbmcgU1RSX0FDQ0VT U19QT0xJQ1kgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJBY2Nlc3MgUG9saWN5Ig0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAg IkFjY2VzcyBQb2xpY3koRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9TQVZFICAgICAgICAgICAgICAg ICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJTYXZlICYgRXhpdCINCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJTYXZlICYgRXhpdChGcmVu Y2gpIg0KLSNzdHJpbmcgU1RSX0lERU5USUZZX1NBVkVfSEVMUCAgICAgICAgICNsYW5ndWFnZSBl bi1VUyAgIlNhdmUgSWRlbnRpZnkgUG9saWN5IGFuZCBFeGl0Ig0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlNhdmUgSWRlbnRpZnkgUG9s aWN5IGFuZCBFeGl0KEZyZW5jaCkiDQotI3N0cmluZyBTVFJfUFJPVklERVIgICAgICAgICAgICAg ICAgICAgI2xhbmd1YWdlIGVuLVVTICAiQ3JlZGVudGlhbCBQcm92aWRlciINCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJDcmVkZW50aWFs IFByb3ZpZGVyKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfUFJPVklERVJfSEVMUCAgICAgICAgICAg ICAgICNsYW5ndWFnZSBlbi1VUyAgIlNlbGVjdCBDcmVkZW50aWFsIFByb3ZpZGVyIE9wdGlvbiIN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIg ICJTZWxlY3QgQ3JlZGVudGlhbCBQcm92aWRlciBPcHRpb24oRnJlbmNoKSINCi0jc3RyaW5nIFNU Ul9PUl9DT04gICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJPciINCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJPcihG cmVuY2gpIg0KLSNzdHJpbmcgU1RSX0FORF9DT04gICAgICAgICAgICAgICAgICAgICAjbGFuZ3Vh Z2UgZW4tVVMgICJBbmQiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg I2xhbmd1YWdlIGZyLUZSICAiQW5kKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQ09OTkVDVE9SICAg ICAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIkxvZ2ljYWwgQ29ubmVjdG9yIg0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIkxv Z2ljYWwgQ29ubmVjdG9yKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQ09OTkVDVE9SX0hFTFAgICAg ICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiU2VsZWN0IExvZ2ljYWwgQ29ubmVjdG9yIE9wdGlv biINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnIt RlIgICJTZWxlY3QgTG9naWNhbCBDb25uZWN0b3IgT3B0aW9uKEZyZW5jaCkiDQotI3N0cmluZyBT VFJfSURFTlRJRllfUE9MSUNZX1ZBTFVFICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIiINCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICIiDQot I3N0cmluZyBTVFJfSURFTlRJRllfUE9MSUNZX0hFTFAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAi Q3VycmVudCBJZGVudGlmeSBQb2xpY3kiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQ3VycmVudCBJZGVudGlmeSBQb2xpY3koRnJlbmNo KSINCi0jc3RyaW5nIFNUUl9BRERfT1BUSU9OICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4t VVMgICJBZGQgT3B0aW9uIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICNsYW5ndWFnZSBmci1GUiAgIkFkZCBPcHRpb24oRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9BRERf T1BUSU9OX0hFTFAgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiQWRkIFRoaXMgT3B0aW9u IHRvIElkZW50aWZ5IFBvbGljeSINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAjbGFuZ3VhZ2UgZnItRlIgICJBZGQgVGhpcyBPcHRpb24gdG8gSWRlbnRpZnkgUG9saWN5 KEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQUNDRVNTX1NBVkVfSEVMUCAgICAgICAgICAgI2xhbmd1 YWdlIGVuLVVTICAiU2F2ZSBBY2Nlc3MgUG9saWN5IGFuZCBFeGl0Ig0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlNhdmUgQWNjZXNzIFBv bGljeSBhbmQgRXhpdChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0FDQ0VTU19SSUdIVCAgICAgICAg ICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIkFjY2VzcyBSaWdodCINCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJBY2Nlc3MgUmlnaHQoRnJl bmNoKSINCi0jc3RyaW5nIFNUUl9BQ0NFU1NfUklHSFRfSEVMUCAgICAgICAgICAgI2xhbmd1YWdl IGVuLVVTICAiU2VsZWN0IEFjY2VzcyBSaWdodCBPcHRpb24iDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiU2VsZWN0IEFjY2VzcyBSaWdo dCBPcHRpb24oRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9OT1JNQUwgICAgICAgICAgICAgICAgICAg ICAjbGFuZ3VhZ2UgZW4tVVMgICJOb3JtYWwiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiTm9ybWFsKEZyZW5jaCkiDQotI3N0cmluZyBT VFJfRU5ST0xMICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAiRW5yb2xsIg0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAg IkVucm9sbChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX01BTkFHRSAgICAgICAgICAgICAgICAgICAg ICNsYW5ndWFnZSBlbi1VUyAgIk1hbmFnZSINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJNYW5hZ2UoRnJlbmNoKSINCi0jc3RyaW5nIFNU Ul9BQ0NFU1NfU0VUVVAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJBY2Nlc3MgU2V0 dXAiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZy LUZSICAiQWNjZXNzIFNldHVwKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQUNDRVNTX1NFVFVQX0hF TFAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlNlbGVjdCBBY2Nlc3MgU2V0dXAgT3B0aW9u Ig0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1G UiAgIlNlbGVsY3QgQWNjZXNzIFNldHVwIE9wdGlvbihGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX1JF U1RSSUNURUQgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlJlc3RyaWN0ZWQiDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAi UmVzdHJpY3RlZChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0FETUlOICAgICAgICAgICAgICAgICAg ICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJBZG1pbiINCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJBZG1pbihGcmVuY2gpIg0KLSNzdHJpbmcg U1RSX0JPT1JfT1JERVIgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIkFjY2VzcyBC b290IE9yZGVyIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5n dWFnZSBmci1GUiAgIkFjY2VzcyBCb290IE9yZGVyKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQk9P VF9PUkRFUl9IRUxQICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlNlbGVjdCBBY2Nlc3Mg Qm9vdCBPcmRlciBPcHRpb24iDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgI2xhbmd1YWdlIGZyLUZSICAiU2VsZWN0IEFjY2VzcyBCb290IE9yZGVyIE9wdGlvbihGcmVu Y2gpIg0KLSNzdHJpbmcgU1RSX0lOU0VSVCAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBl bi1VUyAgIkluc2VydCINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAj bGFuZ3VhZ2UgZnItRlIgICJJbnNlcnQoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9BUFBFTkQgICAg ICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJBcHBlbmQiDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQXBwZW5kKEZyZW5j aCkiDQotI3N0cmluZyBTVFJfUkVQTEFDRSAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBl bi1VUyAgIlJlcGxhY2UiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg I2xhbmd1YWdlIGZyLUZSICAiUmVwbGFjZShGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX05PREVGQVVM VCAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJOb2RlZmF1bHQiDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiTm9kZWZh dWx0KEZyZW5jaCkiDQotI3N0cmluZyBTVFJfTE9BRCAgICAgICAgICAgICAgICAgICAgICAgICNs YW5ndWFnZSBlbi1VUyAgIkxvYWQgRGV2aWNlIFBhdGgiDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIkxvYWQgRGV2aWNlIFBhdGgoRnJl bmNoKSINCi0jc3RyaW5nIFNUUl9MT0FEX0hFTFAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdl IGVuLVVTICAiU2VsZWN0IFBlcm1pdC9Gb3JiaWQgTG9hZCBEZXZpY2UgUGF0aCINCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIgICJTZWxlY3Qg UGVybWl0L0ZvcmJpZCBMb2FkIERldmljZSBQYXRoKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfQ09O TkVDVCAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIkNvbm5lY3QgRGV2aWNl IFBhdGgiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdl IGZyLUZSICAiQ29ubmVjdCBEZXZpY2UgUGF0aChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0NPTk5F Q1RfSEVMUCAgICAgICAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlNlbGVjdCBQZXJtaXQvRm9y YmlkIENvbm5lY3QgRGV2aWNlIFBhdGgiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiU2VsZWN0IFBlcm1pdC9Gb3JiaWQgQ29ubmVjdCBE ZXZpY2UgUGF0aChGcmVuY2gpIg0KLSNzdHJpbmcgU1RSX0xPQURfUEVSTUlUICAgICAgICAgICAg ICAgICAgI2xhbmd1YWdlIGVuLVVTICAiUGVybWl0IExvYWQgRGV2aWNlIFBhdGgiDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiUGVybWl0 IExvYWQgRGV2aWNlIFBhdGgoRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9MT0FEX1BFUk1JVF9IRUxQ ICAgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJDaGFuZ2UgUGVybWl0IExvYWQgRGV2aWNlIFBh dGggdG8gRm9yYmlkIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNs YW5ndWFnZSBmci1GUiAgIkNoYW5nZSBQZXJtaXQgTG9hZCBEZXZpY2UgUGF0aCB0byBGb3JiaWQo RnJlbmNoKSINCi0jc3RyaW5nIFNUUl9MT0FEX0ZPUkJJRCAgICAgICAgICAgICAgICAgICNsYW5n dWFnZSBlbi1VUyAgIkZvcmJpZCBMb2FkIERldmljZSBQYXRoIg0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIkZvcmJpZCBMb2FkIERldmlj ZSBQYXRoKEZyZW5jaCkiDQotI3N0cmluZyBTVFJfTE9BRF9GT1JCSURfSEVMUCAgICAgICAgICAg I2xhbmd1YWdlIGVuLVVTICAiQ2hhbmdlIEZvcmJpZCBMb2FkIERldmljZSBQYXRoIHRvIFBlcm1p dCINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnIt RlIgICJDaGFuZ2UgRm9yYmlkIExvYWQgRGV2aWNlIFBhdGggdG8gUGVybWl0KEZyZW5jaCkiDQot I3N0cmluZyBTVFJfQ09OTkVDVF9QRVJNSVQgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAi UGVybWl0IENvbm5lY3QgRGV2aWNlIFBhdGgiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiUGVybWl0IENvbm5lY3QgRGV2aWNlIFBhdGgo RnJlbmNoKSINCi0jc3RyaW5nIFNUUl9DT05ORUNUX1BFUk1JVF9IRUxQICAgICAgICAgI2xhbmd1 YWdlIGVuLVVTICAiQ2hhbmdlIFBlcm1pdCBDb25uZWN0IERldmljZSBQYXRoIHRvIEZvcmJpZCIN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIg ICJDaGFuZ2UgUGVybWl0IENvbm5lY3QgRGV2aWNlIFBhdGggdG8gRm9yYmlkKEZyZW5jaCkiDQot I3N0cmluZyBTVFJfQ09OTkVDVF9GT1JCSUQgICAgICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAi Rm9yYmlkIENvbm5lY3QgRGV2aWNlIFBhdGgiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiRm9yYmlkIENvbm5lY3QgRGV2aWNlIFBhdGgo RnJlbmNoKSINCi0jc3RyaW5nIFNUUl9DT05ORUNUX0ZPUkJJRF9IRUxQICAgICAgICAgI2xhbmd1 YWdlIGVuLVVTICAiQ2hhbmdlIEZvcmJpZCBDb25uZWN0IERldmljZSBQYXRoIHRvIFBlcm1pdCIN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjbGFuZ3VhZ2UgZnItRlIg ICJDaGFuZ2UgRm9yYmlkIENvbm5lY3QgRGV2aWNlIFBhdGggdG8gUGVybWl0KEZyZW5jaCkiDQot I3N0cmluZyBTVFJfUFJFU1NfS0VZX0NPTlRJTlVFICAgICAgICAgI2xhbmd1YWdlIGVuLVVTICAi UHJlc3MgRU5URVIgdG8gQ29udGludWUsIE90aGVyIEtleSB0byBDYW5jZWwgLi4uIg0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlByZXNz IEVOVEVSIHRvIENvbnRpbnVlLCBPdGhlciBLZXkgdG8gQ2FuY2VsIC4uLihGcmVuY2gpIg0KLSNz dHJpbmcgU1RSX01PVkVfVE9fRk9SQklEX0xJU1QgICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJB cmUgWW91IFN1cmUgdG8gTW92ZSBJdCB0byBGb3JiaWQgTGlzdD8iDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiQXJlIFlvdSBTdXJlIHRv IE1vdmUgSXQgdG8gRm9yYmlkIExpc3Q/KEZyZW5jaCkiDQotI3N0cmluZyBTVFJfTU9WRV9UT19Q RVJNSVRfTElTVCAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIkFyZSBZb3UgU3VyZSB0byBNb3Zl IEl0IHRvIFBlcm1pdCBMaXN0PyINCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAjbGFuZ3VhZ2UgZnItRlIgICJBcmUgWW91IFN1cmUgdG8gTW92ZSBJdCB0byBQZXJtaXQg TGlzdD8oRnJlbmNoKSINCi0jc3RyaW5nIFNUUl9TVFJPS0VfS0VZX0NPTlRJTlVFICAgICAgICAj bGFuZ3VhZ2UgZW4tVVMgICJQbGVhc2UgUHJlc3MgQW55IEtleSB0byBDb250aW51ZSAuLi4iDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZS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lOw0KLSAgVk9JRCAgICAgICAgICAgICAg ICAgICAgKkVuZE9wQ29kZUhhbmRsZTsNCi0gIEVGSV9JRlJfR1VJRF9MQUJFTCAgICAgICpTdGFy dExhYmVsOw0KLSAgRUZJX0lGUl9HVUlEX0xBQkVMICAgICAgKkVuZExhYmVsOw0KLQ0KLSAgLy8N Ci0gIC8vIEluaXRpYWxpemUgdGhlIGNvbnRhaW5lciBmb3IgZHluYW1pYyBvcGNvZGVzLg0KLSAg Ly8NCi0gIFN0YXJ0T3BDb2RlSGFuZGxlID0gSGlpQWxsb2NhdGVPcENvZGVIYW5kbGUgKCk7DQot ICBBU1NFUlQgKFN0YXJ0T3BDb2RlSGFuZGxlICE9IE5VTEwpOw0KLQ0KLSAgRW5kT3BDb2RlSGFu ZGxlID0gSGlpQWxsb2NhdGVPcENvZGVIYW5kbGUgKCk7DQotICBBU1NFUlQgKEVuZE9wQ29kZUhh bmRsZSAhPSBOVUxMKTsNCi0NCi0gIC8vDQotICAvLyBDcmVhdGUgSGlpIEV4dGVuZCBMYWJlbCBP cENvZGUuDQotICAvLw0KLSAgU3RhcnRMYWJlbCA9IChFRklfSUZSX0dVSURfTEFCRUwgKikgSGlp Q3JlYXRlR3VpZE9wQ29kZSAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFN0YXJ0T3BDb2RlSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmZ0VmaUlmclRpYW5vR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2l6ZW9mIChFRklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICk7DQotICBTdGFydExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lG Ul9FWFRFTkRfT1BfTEFCRUw7DQotICBTdGFydExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCRUxf VVNFUl9NT0RfRlVOQzsNCi0NCi0gIEVuZExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBI aWlDcmVhdGVHdWlkT3BDb2RlICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEVuZE9wQ29kZUhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVv ZiAoRUZJX0lGUl9HVUlEX0xBQkVMKQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKTsNCi0gIEVuZExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1Bf TEFCRUw7DQotICBFbmRMYWJlbC0+TnVtYmVyICAgICAgICA9IExBQkVMX0VORDsNCi0NCi0gIC8v DQotICAvLyBBZGQgZWFjaCB1c2VyIGNhbiBiZSBtb2RpZmllZC4NCi0gIC8vDQotICBVc2VyICA9 IE5VTEw7DQotICBJbmRleCA9IDE7DQotICBtVXNlck1hbmFnZXItPkN1cnJlbnQgKG1Vc2VyTWFu YWdlciwgJkN1cnJlbnRVc2VyKTsNCi0gIHdoaWxlIChUUlVFKSB7DQotICAgIFN0YXR1cyA9IG1V c2VyTWFuYWdlci0+R2V0TmV4dCAobVVzZXJNYW5hZ2VyLCAmVXNlcik7DQotICAgIGlmIChFRklf RVJST1IgKFN0YXR1cykpIHsNCi0gICAgICBicmVhazsNCi0gICAgfQ0KLQ0KLSAgICBTdGF0dXMg PSBHZXRBY2Nlc3NSaWdodCAoJkN1cnJlbnRBY2Nlc3NSaWdodCk7DQotICAgIGlmIChFRklfRVJS T1IgKFN0YX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1vZGlmaWVkICA9IEZB TFNFOw0KLSAgaWYgKG1Vc2VySW5mby5JZGVudGl0eVBvbGljeSAhPSBOVUxMKSB7DQotICAgIEZy ZWVQb29sIChtVXNlckluZm8uSWRlbnRpdHlQb2xpY3kpOw0KLSAgICBtVXNlckluZm8uSWRlbnRp dHlQb2xpY3kgPSBOVUxMOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIEFsbG9jYXRlIHVzZXIgaW5m b3JtYXRpb24gbWVtb3J5Lg0KLSAgLy8NCi0gIE1lbVNpemUgPSBzaXplb2YgKEVGSV9VU0VSX0lO Rk8pICsgNjM7DQotICBJbmZvICAgID0gQWxsb2NhdGVaZXJvUG9vbCAoTWVtU2l6ZSk7DQotICBp ZiAoSW5mbyA9PSBOVUxMKSB7DQotICAgIHJldHVybiA7DQotICB9DQotDQotICAvLw0KLSAgLy8g R2V0IGVhY2ggdXNlciBpbmZvcm1hdGlvbi4NCi0gIC8vDQotICBVc2VySW5mbyA9IE5VTEw7DQot ICB3aGlsZSAoVFJVRSkgew0KLSAgICBTdGF0dXMgPSBtVXNlck1hbmFnZXItPkdldE5leHRJbmZv IChtVXNlck1hbmFnZXIsIG1Nb2RpZnlVc2VyLCAmVXNlckluZm8pOw0KLSAgICBpZiAoRUZJX0VS Uk9SIChTdGF0dXMpKSB7DQotICAgICAgYnJlYWs7DQotICAgIH0NCi0gICAgLy8NCi0gICAgLy8g R2V0IGluZm9ybWF0aW9uLg0KLSAgICAvLw0KLSAgICBJbmZvU2l6ZSAgPSBNZW1TaXplOw0KLSAg ICBTdGF0dXMgICAgPSBtVXNlck1hbmFnZXItPkdldEluZm8gKA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbVVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbU1vZGlmeVVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2Vy SW5mbywNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZm8sDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmSW5mb1NpemUNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICk7DQotICAgIGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsN Ci0gICAgICBNZW1TaXplID0gSW5mb1NpemU7DQotICAgICAgRnJlZVBvb2wgKEluZm8pOw0KLSAg ICAgIEluZm8gPSBBbGxvY2F0ZVplcm9Qb29sIChNZW1TaXplKTsNCi0gICAgICBpZiAoSW5mbyA9 PSBOVUxMKSB7DQotICAgICAgICByZXR1cm4gOw0KLSAgICAgIH0NCi0NCi0gICAgICBTdGF0dXMg PSBtVXNlck1hbmFnZXItPkdldEluZm8gKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtVXNlck1hbmFnZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1Nb2RpZnlV c2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VySW5mbywNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSW5mbywNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJkluZm9TaXplDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICAg IH0NCi0NCi0gICAgaWYgKFN0YXR1cyA9PSBFRklfU1VDQ0VTUykgew0KLSAgICAgIC8vDQotICAg ICAgLy8gRGVhbCB3aXRoIGVhY2ggaW5mb3JtYXRpb24gYWNjb3JkaW5nIHRvIGluZm9ybWFpdG9u IHR5cGUuDQotICAgICAgLy8NCi0gICAgICBEYXRhTGVuID0gSW5mby0+SW5mb1NpemUgLSBzaXpl b2YgKEVGSV9VU0VSX0lORk8pOw0KLSAgICAgIHN3aXRjaCAoSW5mby0+SW5mb1R5cGUpIHsNCi0g ICAgICBjYXNlIEVGSV9VU0VSX0lORk9fTkFNRV9SRUNPUkQ6DQotICAgICAgICB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ID0gVG1wU3RyOw0KLX0NCi0NCi0NCi0vKioNCi0gIENvbnZlcnQgdGhlIGlkZW50aXR5 IHBvbGljeSB0byBhIHVuaWNvZGUgc3RyaW5nIGFuZCB1cGRhdGUgdGhlIEhpaSBkYXRhYmFzZQ0K LSAgSXBTdHJpbmdJZCBzdHJpbmcgd2l0aCBpdC4NCi0NCi0gIEBwYXJhbVtpbl0gIElwICAgICAg ICAgUG9pbnRzIHRvIGlkZW50aXR5IHBvbGljeS4NCi0gIEBwYXJhbVtpbl0gIElwTGVuICAgICAg VGhlIGlkZW50aXR5IHBvbGljeSBsZW5ndGguDQotICBAcGFyYW1baW5dICBJcFN0cmluZ0lkIFN0 cmluZyBJRCBpbiB0aGUgSElJIGRhdGFiYXNlIHRvIGJlIHJlcGxhY2VkLg0KLQ0KLSoqLw0KLVZP SUQNCi1SZXNvbHZlSWRlbnRpdHlQb2xpY3kgKA0KLSAgSU4gIFVJTlQ4ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICpJcCwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBJcExlbiwNCi0gIElOICBFRklfU1RSSU5HX0lEICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBJcFN0cmluZ0lkDQotICApDQotew0KLSAgQ0hBUjE2ICAgICAg ICAgICAgICAgICAgICAgICAgKlRtcFN0cjsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAg ICAgIENoa0xlbjsNCi0gIEVGSV9VU0VSX0lORk9fSURFTlRJVFlfUE9MSUNZICpJZGVudGl0eTsN Ci0gIFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLSAgQ0hBUjE2ICAgICAg ICAgICAgICAgICAgICAgICAgKlByb3ZTdHI7DQotICBFRklfU1RSSU5HX0lEICAgICAgICAgICAg ICAgICBQcm92SWQ7DQotICBFRklfSElJX0hBTkRMRSAgICAgICAgICAgICAgICBIaWlIYW5kbGU7 DQotICBFRklfVVNFUl9DUkVERU5USUFMMl9QUk9UT0NPTCAqVXNlckNyZWRlbnRpYWw7DQotDQot ICBUbXBTdHIgPSBOVUxMOw0KLQ0KLSAgLy8NCi0gIC8vIFJlc29sdmUgZWFjaCBwb2xpY3kuDQot ICAvLw0KLSAgQ2hrTGVuICA9IDA7DQotICB3aGlsZSAoQ2hrTGVuIDwgSXBMZW4pIHsNCi0gICAg SWRlbnRpdHkgPSAoRUZJX1VTRVJfSU5GT19JREVOVElUWV9QT0xJQ1kgKikgKElwICsgQ2hrTGVu KTsNCi0gICAgc3dpdGNoIChJZGVudGl0eS0+VHlwZSkgew0KLSAgICBjYXNlIEVGSV9VU0VSX0lO Rk9fSURFTlRJVFlfRkFMU0U6DQotICAgICAgQWRkU3RyICgmVG1wU3RyLCBMIkZhbHNlIik7DQot ICAgICAgYnJlYWs7DQotDQotICAgIGNhc2UgRUZJX1VTRVJfSU5GT19JREVOVElUWV9UUlVFOg0K LSAgICAgIEFkZFN0ciAoJlRtcFN0ciwgTCJOb25lIik7DQotICAgICAgYnJlYWs7DQotDQotICAg IGNhc2UgRUZJX1VTRVJfSU5GT19JREVOVElUWV9OT1Q6DQotICAgICAgQWRkU3RyICgmVG1wU3Ry LCBMIiEgIik7DQotICAgICAgYnJlYWs7DQotDQotICAgIGNhc2UgRUZJX1VTRVJfSU5GT19JREVO VElUWV9BTkQ6DQotICAgICAgQWRkU3RyICgmVG1wU3RyLCBMIiAmJiAiKTsNCi0gICAgICBicmVh azsNCi0NCi0gICAgY2FzZSBFRklfVVNFUl9JTkZPX0lERU5USVRZX09SOg0KLSAgICAgIEFkZFN0 ciAoJlRtcFN0ciwgTCIgfHwgIik7DQotICAgICAgYnJlYWs7DQotDQotICAgIGNhc2UgRUZJX1VT RVJfSU5GT19JREVOVElUWV9DUkVERU5USUFMX1RZUEU6DQotICAgICAgZm9yIChJbmRleCA9IDA7 IEluZGV4IDwgbVByb3ZpZGVySW5mby0+Q291bnQ7IEluZGV4KyspIHsNCi0gICAgICAgIFVzZXJD cmVkZW50aWFsID0gbVByb3ZpZGVySW5mby0+UHJvdmlkZXJbSW5kZXhdOw0KLSAgICAgICAgaWYg KENvbXBhcmVHdWlkICgoRUZJX0dVSUQgKikgKElkZW50aXR5ICsgMSksICZVc2VyQ3JlZGVudGlh bC0+VHlwZSkpIHsNCi0gICAgICAgICAgVXNlckNyZWRlbnRpYWwtPlRpdGxlICgNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgVXNlckNyZWRlbnRpYWwsDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICZIaWlIYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICZQcm92 SWQNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgICAgICAgUHJvdlN0ciA9 IEhpaUdldFN0cmluZyAoSGlpSGFuZGxlLCBQcm92SWQsIE5VTEwpOw0KLSAgICAgICAgICBpZiAo UHJvdlN0ciAhPSBOVUxMKSB7DQotICAgICAgICAgICAgQWRkU3RyICgmVG1wU3RyLCBQcm92U3Ry KTsNCi0gICAgICAgICAgICBGcmVlUG9vbCAoUHJvdlN0cik7DQotICAgICAgICAgIH0NCi0gICAg ICAgICAgYnJlYWs7DQotICAgICAgICB9DQotICAgICAgfQ0KLSAgICAgIGJyZWFrOw0KLQ0KLSAg ICBjYXNlIEVGSV9VU0VSX0lORk9fSURFTlRJVFlfQ1JFREVOVElBTF9QUk9WSURFUjoNCi0gICAg ICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBtUHJvdmlkZXJJbmZvLT5Db3VudDsgSW5kZXgrKykg ew0KLSAgICAgICAgVXNlckNyZWRlbnRpYWwgPSBtUHJvdmlkZXJJbmZvLT5Qcm92aWRlcltJbmRl eF07DQotICAgICAgICBpZiAoQ29tcGFyZUd1aWQgKChFRklfR1VJRCAqKSAoSWRlbnRpdHkgKyAx KSwgJlVzZXJDcmVkZW50aWFsLT5JZGVudGlmaWVyKSkgew0KLSAgICAgICAgICBVc2VyQ3JlZGVu dGlhbC0+VGl0bGUgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyQ3JlZGVudGlh bCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgJkhpaUhhbmRsZSwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgJlByb3ZJZA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAp Ow0KLSAgICAgICAgICBQcm92U3RyID0gSGlpR2V0U3RyaW5nIChIaWlIYW5kbGUsIFByb3ZJZCwg TlVMTCk7DQotICAgICAgICAgIGlmIChQcm92U3RyICE9IE5VTEwpIHsNCi0gICAgICAgICAgICBB ZGRTdHIgKCZUbXBTdHIsIFByb3ZTdHIpOw0KLSAgICAgICAgICAgIEZyZWVQb29sIChQcm92U3Ry KTsNCi0gICAgICAgICAgfQ0KLSAgICAgICAgICBicmVhazsNCi0gICAgICAgIH0NCi0gICAgICB9 DQotICAgICAgYnJlYWs7DQotICAgIH0NCi0NCi0gICAgQ2hrTGVuICs9IElkZW50aXR5LT5MZW5n dGg7DQotICB9DQotDQotICBpZiAoVG1wU3RyICE9IE5VTEwpIHsNCi0gICAgSGlpU2V0U3RyaW5n IChtQ2FsbGJhY2tJbmZvLT5IaWlIYW5kbGUsIElwU3RyaW5nSWQsIFRtcFN0ciwgTlVMTCk7DQot ICAgIEZyZWVQb29sIChUbXBTdHIpOw0KLSAgfQ0KLX0NCi0NCi0NCi0vKioNCi0gIERpc3BsYXkg bW9kaWZ5IHVzZXIgaW5mb3JtYXRpb24gZm9ybS4NCi0NCi0gIFRoaXMgZm9ybSBkaXNwbGF5cywg dXNlcm5hbWUsIGNyZWF0ZSBEYXRlLCB1c2FnZSBkYXRlLCB1c2FnZSBjb3VudCwgaWRlbnRpdHkg cG9saWN5LA0KLSAgYW5kIGFjY2VzcyBwb2xpY3kuDQotDQotICBAcGFyYW1baW5dIFVzZXJJbmRl eCAgICAgICBUaGUgaW5kZXgg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GUgKA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBTdGFydE9wQ29kZUhhbmRsZSwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmdFZmlJZnJUaWFub0d1aWQsDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVMKQ0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgU3RhcnRMYWJlbC0+ RXh0ZW5kT3BDb2RlICA9IEVGSV9JRlJfRVhURU5EX09QX0xBQkVMOw0KLSAgU3RhcnRMYWJlbC0+ TnVtYmVyICAgICAgICA9IExBQkVMX1VTRVJfSU5GT19GVU5DOw0KLQ0KLSAgRW5kTGFiZWwgPSAo RUZJX0lGUl9HVUlEX0xBQkVMICopIEhpaUNyZWF0ZUd1aWRPcENvZGUgKA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5kT3BDb2RlSGFuZGxlLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJmdFZmlJZnJUaWFub0d1aWQsDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklfSUZSX0dVSURfTEFCRUwpDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgRW5kTGFiZWwtPkV4dGVuZE9wQ29k ZSAgPSBFRklfSUZSX0VYVEVORF9PUF9MQUJFTDsNCi0gIEVuZExhYmVsLT5OdW1iZXIgICAgICAg ID0gTEFCRUxfRU5EOw0KLQ0KLSAgLy8NCi0gIC8vIEZpbmQgdGhlIHVzZXIgcHJvZmlsZS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llfUE9MSUNZX1ZBTCkNCi0gICAgICApOw0KLSAgICBIaWlDcmVh dGVHb3RvT3BDb2RlICgNCi0gICAgICBTdGFydE9wQ29kZUhhbmRsZSwgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgLy8gQ29udGFpbmVyIGZvciBvcGNvZGVzDQotICAgICAgRk9STUlE X01PRElGWV9JUCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRhcmdldCBG b3JtIElEDQotICAgICAgU1RSSU5HX1RPS0VOIChTVFJfSURFTlRJRllfUE9MSUNZKSwgICAgICAg ICAgICAgICAgIC8vIFByb21wdCB0ZXh0DQotICAgICAgU1RSSU5HX1RPS0VOIChTVFJfSURFTlRJ RllfUE9MSUNZX1ZBTCksICAgICAgICAgICAgIC8vIEhlbHAgdGV4dA0KLSAgICAgIEVGSV9JRlJf RkxBR19DQUxMQkFDSywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBRdWVzdGlvbiBm bGFnDQotICAgICAgS0VZX01PRElGWV9VU0VSIHwgS0VZX1NFTEVDVF9VU0VSIHwgS0VZX01PRElG WV9JUCAgIC8vIFF1ZXN0aW9uIElEDQotICAgICAgKTsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBB ZGQgYWNjZXNzIHBvbGljeS4NCi0gIC8vDQotICBTdGF0dXMgPSBHZXRBY2Nlc3NSaWdodCAoJkN1 cnJlbnRBY2Nlc3NSaWdodCk7DQotICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgIEN1 cnJlbnRBY2Nlc3NSaWdodCA9IEVGSV9VU0VSX0lORk9fQUNDRVNTX0VOUk9MTF9TRUxGOw0KLSAg fQ0KLQ0KLSAgaWYgKEN1cnJlbnRBY2Nlc3NSaWdodCA9PSBFRklfVVNFUl9JTkZPX0FDQ0VTU19N QU5BR0UpIHsNCi0gICAgSGlpQ3JlYXRlR290b09wQ29kZSAoDQotICAgICAgU3RhcnRPcENvZGVI YW5kbGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENvbnRhaW5lciBmb3Ig b3Bjb2Rlcw0KLSAgICAgIEZPUk1JRF9NT0RJRllfQVAsICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAvLyBUYXJnZXQgRm9ybSBJRA0KLSAgICAgIFNUUklOR19UT0tFTiAoU1RSX0FD Q0VTU19QT0xJQ1kpLCAgICAgICAgICAgICAgICAgICAvLyBQcm9tcHQgdGV4dA0KLSAgICAgIFNU UklOR19UT0tFTiAoU1RSX05VTExfU1RSSU5HKSwgICAgICAgICAgICAgICAgICAgICAvLyBIZWxw IHRleHQNCi0gICAgICBFRklfSUZSX0ZMQUdfQ0FMTEJBQ0ssICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgLy8gUXVlc3Rpb24gZmxhZw0KLSAgICAgIEtFWV9NT0RJRllfVVNFUiB8IEtFWV9T RUxFQ1RfVVNFUiB8IEtFWV9NT0RJRllfQVAgICAvLyBRdWVzdGlvbiBJRA0KLSAgICAgICk7DQot ICB9DQotDQotICBIaWlVcGRhdGVGb3JtICgNCi0gICAgbUNhbGxiYWNrSW5mby0+SGlpSGFuZGxl LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSElJIGhhbmRsZQ0KLSAgICAmZ1VzZXJQ cm9maWxlTWFuYWdlckd1aWQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGb3Jtc2V0 IEdVSUQNCi0gICAgRk9STUlEX1VTRVJfSU5GTywgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgLy8gRm9ybSBJRA0KLSAgICBTdGFydE9wQ29kZUhhbmRsZSwgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAvLyBMYWJlbA0KLSAgICBFbmRPcENvZGVIYW5kbGUgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSZXBsYWNlIGRhdGENCi0gICAg KTsNCi0NCi0gIEh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bmFn ZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKlVzZXJJbmZvLA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgSW5mbywNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZJbmZvU2l6 ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKFN0YXR1cyA9 PSBFRklfQlVGRkVSX1RPT19TTUFMTCkgew0KLSAgICAgIE1lbVNpemUgPSBJbmZvU2l6ZTsNCi0g ICAgICBGcmVlUG9vbCAoSW5mbyk7DQotICAgICAgSW5mbyA9IEFsbG9jYXRlWmVyb1Bvb2wgKE1l bVNpemUpOw0KLSAgICAgIGlmIChJbmZvID09IE5VTEwpIHsNCi0gICAgICAgIHJldHVybiBFRklf T1VUX09GX1JFU09VUkNFUzsNCi0gICAgICB9DQotICAgICAgU3RhdHVzID0gbVVzZXJNYW5hZ2Vy LT5HZXRJbmZvICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbVVzZXJNYW5hZ2Vy LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VyLA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAqVXNlckluZm8sDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEluZm8sDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZJbmZvU2l6ZQ0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICB9DQotICAgIGlmIChTdGF0dXMg PT0gRUZJX1NVQ0NFU1MpIHsNCi0gICAgICBpZiAoSW5mby0+SW5mb1R5cGUgPT0gSW5mb1R5cGUp IHsNCi0gICAgICAgIGJyZWFrOw0KLSAgICAgIH0NCi0gICAgfQ0KLSAgfQ0KLQ0KLSAgRnJlZVBv b2wgKEluZm8pOw0KLSAg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SAgLy8NCi0gIC8vIENyZWF0ZSBIaWkgRXh0ZW5kIExhYmVsIE9wQ29kZS4N Ci0gIC8vDQotICBTdGFydExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVH dWlkT3BDb2RlICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3Rh cnRPcENvZGVIYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXpl b2YgKEVGSV9JRlJfR1VJRF9MQUJFTCkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKTsNCi0gIFN0YXJ0TGFiZWwtPkV4dGVuZE9wQ29kZSAgPSBFRklfSUZSX0VYVEVO RF9PUF9MQUJFTDsNCi0gIFN0YXJ0TGFiZWwtPk51bWJlciAgICAgICAgPSBMQUJFTF9BUF9NT0Rf RlVOQzsNCi0NCi0gIEVuZExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJFTCAqKSBIaWlDcmVhdGVH dWlkT3BDb2RlICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuZE9w Q29kZUhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZp SWZyVGlhbm9HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVM TCwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lG Ul9HVUlEX0xBQkVMKQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsN Ci0gIEVuZExhYmVsLT5FeHRlbmRPcENvZGUg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Ag ICAgICAgICAgICAgIEVGSV9VU0VSX0lORk9fUFVCTElDIHwNCi0gICAgICAgICAgICAgICAgICAg ICAgRUZJX1VTRVJfSU5GT19FWENMVVNJVkU7DQotICBJbmZvLT5JbmZvU2l6ZSAgICA9IChVSU5U MzIpIChzaXplb2YgKEVGSV9VU0VSX0lORk8pICsgTGVuKTsNCi0gIENvcHlNZW0gKChVSU5UOCAq KSAoSW5mbyArIDEpLCBVc2VyTmFtZSwgTGVuKTsNCi0NCi0gIFRlbXBVc2VyICA9IE5VTEw7DQot ICBTdGF0dXMgICAgPSBtVXNlck1hbmFnZXItPkZpbmQgKA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1Vc2VyTWFuYWdlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm VGVtcFVzZXIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBJbmZvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEluZm8tPkluZm9TaXplDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0g IGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgIENyZWF0ZVBvcFVwICgNCi0gICAgICBF RklfTElHSFRHUkFZIHwgRUZJX0JBQ0tHUk9VTkRfQkxVRSwNCi0gICAgICAmS2V5LA0KLSAgICAg IEwiVGhlIFVzZXIgTmFtZSBIYWQgQmVlbiBVc2VkLiIsDQotICAgICAgTCIiLA0KLSAgICAgIEwi UGxlYXNlIFVzZSBPdGhlciBVc2VyIE5hbWUiLA0KLSAgICAgIE5VTEwNCi0gICAgICApOw0KLSAg ICBGcmVlUG9vbCAoSW5mbyk7DQotICAgIHJldHVybiA7DQotICB9DQotDQotICAvLw0KLSAgLy8g VXBkYXRlIHVzZXJuYW1lIGRpc3BsYXkgaW4gdGhlIGZvcm0uDQotICAvLw0KLSAgQ29weU1lbSAo bVVzZXJJbmZvLlVzZXJOYW1lLCBVc2VyTmFtZSwgTGVuKTsNCi0gIEhpaVNldFN0cmluZyAoDQot ICAgIG1DYWxsYmFja0luZm8tPkhpaUhhbmRsZSwNCi0gICAgU1RSSU5HX1RPS0VOIChTVFJfVVNF Ul9OQU1FX1ZBTCksDQotICAgIG1Vc2VySW5mby5Vc2VyTmFtZSwNCi0gICAgTlVMTA0KLSAgICAp Ow0KLQ0KLSAgLy8NCi0gIC8vIFNhdmUgdGhlIHVzZXIgbmFtZS4NCi0gIC8vDQotICBTdGF0dXMg PSBGaW5kSW5mb0J5VHlwZSAobU1vZGlmeVVzZXIsIEVGSV9VU0VSX0lORk9fTkFNRV9SRUNPUkQs ICZVc2VySW5mbyk7DQotICBpZiAoIUVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICBtVXNlck1h bmFnZXItPlNldEluZm8gKA0KLSAgICAgICAgICAgICAgICAgICAgbVVzZXJNYW5hZ2VyLA0KLSAg ICAgICAgICAgICAgICAgICAgbU1vZGlmeVVzZXIsDQotICAgICAgICAgICAgICAgICAgICAmVXNl ckluZm8sDQotICAgICAgICAgICAgICAgICAgICBJbmZvLA0KLSAgICAgICAgICAgICAgICAgICAg SW5mby0+SW5mb1NpemUNCi0gICAgICAgICAgICAgICAgICAgICk7DQotICB9DQotICBGcmVlUG9v bCAoSW5mbyk7DQotfQ0KLQ0KLQ0KLS8qKg0KLSAgRGlzcGxheSB0aGUgZm9ybSBvZiB0aGUgbW9k aWZ5aW5nIHVzZXIgaWRlbnRpdHkgcG9saWN5Lg0KLQ0KLSoqLw0KLVZPSUQNCi1Nb2RpZnlJZGVu dGl0eVBvbGljeSAoDQotICBWT0lEDQotICApDQotew0KLSAgVUlOVE4gICAgICAgICAgICAgICBJ bmRleDsNCi0gIENIQVIxNiAgICAgICAgICAgICAgKlByb3ZTdHI7DQotICBFRklfU1RSSU5HX0lE ICAgICAgIFByb3ZJRDsNCi0gIEVGSV9ISUlfSEFORExFICAgICAg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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQot ICBTdGFydExhYmVsLT5FeHRlbmRPcENvZGUgID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQot ICBTdGFydExhYmVsLT5OdW1iZXIgICAgICAgID0gTEFCRUxfSVBfTU9EX0ZVTkM7DQotDQotICBF bmRMYWJlbCA9IChFRklfSUZSX0dVSURfTEFCRUwgKikgSGlpQ3JlYXRlR3VpZE9wQ29kZSAoDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmRPcENvZGVIYW5kbGUsDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaUlmclRpYW5vR3VpZCwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKEVGSV9JRlJfR1VJRF9MQUJFTCkN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICBFbmRMYWJlbC0+ RXh0ZW5kT3BDb2RlICA9IEVGSV9JRlJfRVhURU5EX09QX0xBQkVMOw0KLSAgRW5kTGFiZWwtPk51 bWJlciAgICAgICAgPSBMQUJFTF9FTkQ7DQotDQotICAvLw0KLSAgLy8gQWRkIGNyZWRlbnRpYWwg cHJvdmlkZXJzDQotICAvLy4NCi0gIGlmIChtUHJvdmlkZXJJbmZvLT5Db3VudCA+IDApIHsNCi0g ICAgT3B0aW9uc09wQ29kZUhhbmRsZSA9IEhpaUFsbG9jYXRlT3BDb2RlSGFuZGxlICgpOw0KLSAg ICBBU1NFUlQgKE9wdGlvbnNPcENvZGVIYW5kbGUgIT0gTlVMTCk7DQotDQotICAgIC8vDQotICAg IC8vIEFkZCBjcmVkZW50aWFsIHByb3ZpZGVyIE9wdGlvbiBPcENvZGUuDQotICAgIC8vDQotICAg IGZvciAoSW5kZXggPSAwOyBJbmRleCA8IG1Qcm92aWRlckluZm8tPkNvdW50OyBJbmRleCsrKSB7 DQotICAgICAgbVByb3ZpZGVySW5mby0+UHJvdmlkZXJbSW5kZXhdLT5UaXRsZSAoDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1Qcm92aWRlckluZm8tPlByb3ZpZGVy W0luZGV4XSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkhpaUhh bmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlByb3ZJRA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgIFByb3ZT dHIgPSBIaWlHZXRTdHJpbmcgKEhpaUhhbmRsZSwgUHJvdklELCBOVUxMKTsNCi0gICAgICBQcm92 SUQgID0gSGlpU2V0U3RyaW5nIChtQ2FsbGJhY2tJbmZvLT5IaWlIYW5kbGUsIDAsIFByb3ZTdHIs IE5VTEwpOw0KLSAgICAgIEZyZWVQb29sIChQcm92U3RyKTsNCi0gICAgICBpZiAoUHJvdklEID09 IDApIHsNCi0gICAgICAgIHJldHVybiA7DQotICAgICAgfQ0KLQ0KLSAgICAgIEhpaUNyZWF0ZU9u ZU9mT3B0aW9uT3BDb2RlICgNCi0gICAgICAgIE9wdGlvbnNPcENvZGVIYW5kbGUsDQotICAgICAg ICBQcm92SUQsDQotICAgICAgICAwLA0KLSAgICAgICAgRUZJX0lGUl9OVU1FUklDX1NJWkVfMSwN Ci0gICAgICAgIChVSU5UOCkgSW5kZXgNCi0gICAgICAgICk7DQotICAgIH0NCi0NCi0gICAgSGlp Q3JlYXRlT25lT2ZPcENvZGUgKA0KLSAgICAgIFN0YXJ0T3BDb2RlSGFuZGxlLCAgICAgICAgICAg ICAgICAvLyBDb250YWluZXIgZm9yIGR5bmFtaWMgY3JlYXRlZCBvcGNvZGVzDQotICAgICAgS0VZ X01PRElGWV9VU0VSIHwgS0VZX1N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FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgIGJyZWFrOw0K LSAgICB9DQotDQotICAgIFN0YXR1cyA9IG1Vc2VyTWFuYWdlci0+R2V0SW5mbyAoDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtVXNlck1hbmFnZXIsDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBDdXJyZW50VXNlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVz ZXJJbmZvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5mbywNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZJbmZvU2l6ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKTsNCi0gICAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVSX1RPT19TTUFMTCkgew0KLSAgICAg IE1lbVNpemUgPSBJbmZvU2l6ZTsNCi0gICAgICBGcmVlUG9vbCAoSW5mbyk7DQotICAgICAgSW5m byA9IEFsbG9jYXRlWmVyb1Bvb2wgKE1lbVNpemUpOw0KLSAgICAgIGlmIChJbmZvID09IE5VTEwp IHsNCi0gICAgICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCi0gICAgICB9DQotICAg ICAgU3RhdHVzID0gbVVzZXJNYW5hZ2VyLT5HZXRJbmZvICgNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbVVzZXJNYW5hZ2VyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBDdXJyZW50VXNlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlckluZm8s DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZm8sDQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZJbmZvU2l6ZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICApOw0KLSAgICB9DQotICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICBicmVh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