From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 2152881C64 for ; Wed, 14 Dec 2016 18:39:37 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 14 Dec 2016 18:39:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,349,1477983600"; d="scan'208";a="18303627" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 14 Dec 2016 18:39:35 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Dec 2016 18:39:33 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Dec 2016 18:39:32 -0800 Received: from shsmsx151.ccr.corp.intel.com ([169.254.3.77]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.97]) with mapi id 14.03.0248.002; Thu, 15 Dec 2016 10:39:30 +0800 From: "Fu, Siyuan" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Zhang, Lubo" , "Long, Qin" , Thomas Palmer Thread-Topic: [Patch 07/10] NetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6 Thread-Index: AQHSVdyMHynDoPIcnEORMjwQd1owV6EISf0g Date: Thu, 15 Dec 2016 02:39:29 +0000 Message-ID: References: <1481700859-76060-1-git-send-email-jiaxin.wu@intel.com> <1481700859-76060-8-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1481700859-76060-8-git-send-email-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTA2NDlhODUtZmU4Ni00NjlhLTk5YzUtNDVhZWM3MWI0YmFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkFub3dFdkM5QXFZZ1wvSnR1RjQyQ25kbEd3ZjZleXNSdzE4YWErdk5wVG5rPSJ9 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 07/10] NetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 02:39:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGksIEppYXhpbg0KDQpJbiBmdW5jdGlvbiBJc0h0dHBzVXJsKCksIEkgc3VnZ2VzdCB0byBzZWFy Y2ggc3RyaW5nICJodHRwczovLyIgaW5zdGVhZCBvZiBvbmx5ICJodHRwcyIsIGluIGNhc2Ugb2Yg c29tZSBpbmNvcnJlY3Qgc2NoZW1lIGxpa2UgImh0dHBzYWJjOi8vIi4NCkhvd2V2ZXIsIHNpbmNl IHRoZXJlIGlzIGFscmVhZHkgY29kZSB0byBwYXJzZSB0aGUgVVJMIGJ5IHVzaW5nIEh0dHBQYXJz ZVVybCgpLCB0aGUgc2NoZW1lIHNob3VsZCBhbHJlYWR5IGJ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iAgIEh0dHBJ bXBsLmgNCiAgIEh0dHBJbXBsLmMNCiAgIEh0dHBQcm90by5oDQogICBIdHRwUHJvdG8uYw0KKyAg SHR0cHNTdXBwb3J0LmgNCisgIEh0dHBzU3VwcG9ydC5jDQogDQogW0xpYnJhcnlDbGFzc2VzXQ0K ICAgVWVmaURyaXZlckVudHJ5UG9pbnQNCiAgIFVlZmlCb290U2VydmljZXNUYWJsZUxpYg0KKyAg VWVmaVJ1bnRpbWVTZXJ2aWNlc1RhYmxlTGliDQogICBNZW1vcnlBbGxvY2F0aW9uTGliDQogICBC YXNlTGliDQogICBVZWZpTGliDQogICBEZWJ1Z0xpYg0KICAgTmV0TGliDQpAQCAtNjIsOCArNjYs MTQgQEANCiAgIGdFZmlEbnM0UHJvdG9jb2xHdWlkICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCiAgIGdFZmlEbnM2U2VydmljZUJpbmRpbmdQcm90b2Nv bEd1aWQgICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCiAgIGdFZmlEbnM2UHJv dG9jb2xHdWlkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VN RVMNCiAgIGdFZmlJcDRDb25maWcyUHJvdG9jb2xHdWlkICAgICAgICAgICAgICAgICAgICAgICAj IyBTT01FVElNRVNfQ09OU1VNRVMNCiAgIGdFZmlJcDZDb25maWdQcm90b2NvbEd1aWQgICAgICAg ICAgICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCisgIGdFZmlUbHNTZXJ2aWNl QmluZGluZ1Byb3RvY29sR3VpZCAgICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMN CisgIGdFZmlUbHNQcm90b2NvbEd1aWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIyBT T01FVElNRVNfQ09OU1VNRVMNCisgIGdFZmlUbHNDb25maWd1cmF0aW9uUHJvdG9jb2xHdWlkICAg ICAgICAgICAgICAgICAjIyBTT01FVElNRVNfQ09OU1VNRVMNCisNCitbR3VpZHNdDQorICBnRWZp VGxzQ2FDZXJ0aWZpY2F0ZUd1aWQgICAgICAgICAgICAgICAgICAgICAgICAgIyMgQ09OU1VNRVMg ICMjIEdVSUQNCiANCiBbVXNlckV4dGVuc2lvbnMuVGlhbm9Db3JlLiJFeHRyYUZpbGVzIl0NCiAg IEh0dHBEeGVFeHRyYS51bmkNClwgTm8gbmV3bGluZSBhdCBlbmQgb2YgZmlsZQ0KZGlmZiAtLWdp dCBhL05ldHdvcmtQa2cvSHR0cER4ZS9IdHRwSW1wbC5jIGIvTmV0d29ya1BrZy9IdHRwRHhlL0h0 dHBJbXBsLmMNCmluZGV4IDZmY2IwYjcuLjc3YWE2NGEgMTAwNjQ0DQotLS0gYS9OZXR3b3JrUGtn L0h0dHBEeGUvSHR0cEltcGwuYw0KKysrIGIvTmV0d29ya1BrZy9IdHRwRHhlL0h0dHBJbXBsLmMN CkBAIC0yMzksMTAgKzIzOSwxMSBAQCBFZmlIdHRwUmVxdWVzdCAoDQogICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgICAgICBIb3N0TmFtZVNpemU7DQogICBVSU5UMTYgICAgICAgICAgICAgICAg ICAgICAgICBSZW1vdGVQb3J0Ow0KICAgSFRUUF9QUk9UT0NPTCAgICAgICAgICAgICAgICAgKkh0 dHBJbnN0YW5jZTsNCiAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ3VyZTsN CiAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgIFJlQ29uZmlndXJlOw0KKyAgQk9PTEVB TiAgICAgICAgICAgICAgICAgICAgICAgVGxzQ29uZmlndXJlOw0KICAgQ0hBUjggICAgICAgICAg ICAgICAgICAgICAgICAgKlJlcXVlc3RNc2c7DQogICBDSEFSOCAgICAgICAgICAgICAgICAgICAg ICAgICAqVXJsOw0KICAgVUlOVE4g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w SW5zdGFuY2UtPlVzZUh0dHBzICYmIEh0dHBJbnN0YW5jZS0+VGxzQ2hpbGRIYW5kbGUgPT0gTlVM TCkgew0KKyAgICAgIC8vDQorICAgICAgLy8gVXNlIFRsc1NiIHRvIGNyZWF0ZSBUbHMgY2hpbGQg YW5kIG9wZW4gdGhlIFRMUyBwcm90b2NvbC4NCisgICAgICAvLw0KKyAgICAgIEh0dHBJbnN0YW5j ZS0+VGxzQ2hpbGRIYW5kbGUgPSBUbHNDcmVhdGVDaGlsZCAoDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5TZXJ2aWNlLT5JbWFnZUhhbmRsZSwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKEh0dHBJbnN0YW5jZS0+ VGxzKSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKEh0dHBJbnN0 YW5jZS0+VGxzQ29uZmlndXJhdGlvbikNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApOw0KKyAgICAgIGlmIChIdHRwSW5zdGFuY2UtPlRsc0NoaWxkSGFuZGxlID09IE5V TEwpIHsNCisgICAgICAgIHJldHVybiBFRklfREVWSUNFX0VSUk9SOw0KKyAgICAgIH0NCisNCisg ICAgICBUbHNDb25maWd1cmUgPSBUUlVFOw0KKyAgICB9DQorDQogICAgIFVybFBhcnNlciA9IE5V TEw7DQogICAgIFN0YXR1cyA9IEh0dHBQYXJzZVVybCAoVXJsLCAoVUlOVDMyKSBBc2NpaVN0ckxl biAoVXJsKSwgRkFMU0UsICZVcmxQYXJzZXIpOw0KICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQogICAgICAgZ290byBFcnJvcjE7DQogICAgIH0NCkBAIC0zNTcsMTEgKzM4NSwxNSBAQCBF ZmlIdHRwUmVxdWVzdCAoDQogICAgICBnb3RvIEVycm9yMTsNCiAgICAgfQ0KIA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HVzKSl7DQorICAg IERFQlVHICgoRUZJX0RfRVJST1IsICJUY3A0IENvbm5lY3Rpb24gZmFpbCAtICV4XG4iLCBTdGF0 dXMpKTsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisgIA0KKyAgLy8NCisgIC8vIFRscyBz ZXNzaW9uIGNvbm5lY3Rpb24uDQorICAvLw0KKyAgaWYgKEh0dHBJbnN0YW5jZS0+VXNlSHR0cHMp IHsNCisgICAgaWYgKEh0dHBJbnN0YW5jZS0+VGltZW91dEV2ZW50ID09IE5VTEwpIHsNCisgICAg ICAvLw0KKyAgICAgIC8vIENyZWF0ZSBUaW1lb3V0RXZlbnQgZm9yIFRMUyBjb25uZWN0aW9uLg0K KyAgICAgIC8vDQorICAgICAgU3RhdHVzID0gZ0JTLT5DcmVhdGVFdmVudCAoDQorICAgICAgICAg ICAgICAgICAgICAgIEVWVF9USU1FUiwNCisgICAgICAgICAgICAgICAgICAgICAgVFBMX0NBTExC QUNLLA0KKyAgICAgICAgICAgICAgICAgICAgICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAg ICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAgICAmSHR0cEluc3RhbmNlLT5UaW1lb3V0RXZl bnQNCisgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0 dXMpKSB7DQorICAgICAgICBUbHNDbG9zZVR4UnhFdmVudCAoSHR0cEluc3RhbmNlKTsNCisgICAg ICAgIHJldHVybiBTdGF0dXM7DQorICAgICAgfQ0KKyAgICB9DQorDQorICAgIC8vDQorICAgIC8v IFN0YXJ0IHRoZSB0aW1lciwgYW5kIHdhaXQgVGltZW91dCBzZWNvbmRzIGZvciBjb25uZWN0aW9u Lg0KKyAgICAvLw0KKyAgICBTdGF0dXMgPSBnQlMtPlNldFRpbWVyIChIdHRwSW5zdGFuY2UtPlRp bWVvdXRFdmVudCwgVGltZXJSZWxhdGl2ZSwgSFRUUF9DT05ORU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W5n ICAgICAgICAgICBCdWZmZXIgY29udGFpbmluZyB0aGUgSFRUUCBtZXNzYWdlIHN0cmluZy4NCiAg IEBwYXJhbVtpbl0gIFR4U3RyaW5nTGVuICAgICAgICBMZW5ndGggb2YgdGhlIEhUVFAgbWVzc2Fn ZSBzdHJpbmcgaW4gYnl0ZXMuDQpAQCAtMTM2MCwxOCArMTQ4Miw2OCBAQCBIdHRwVHJhbnNtaXRU Y3AgKA0KICAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgU3RhdHVzOw0KICAgRUZJX1RD UDRfSU9fVE9LRU4gICAgICAgICAgICAgKlR4NFRva2VuOw0KICAgRUZJX1RDUDRfUFJPVE9DT0wg ICAgICAgICAgICAgKlRjcDQ7DQogICBFRklfVENQNl9JT19UT0tFTiAgICAgICAgICAgICAqVHg2 VG9rZW47DQogICBFRklfVENQNl9QUk9UT0NPTCAgICAgICAgICAgICAqVGNwNjsNCisgIFVJTlQ4 ICAgICAgICAgICAgICAgICAgICAgICAgICpCdWZmZXI7ICANCisgIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgIEJ1ZmZlclNpemU7DQorICBORVRfRlJBR01FTlQgICAgICAgICAgICAgICAg ICBUZW1wRnJhZ21lbnQ7DQorDQorICBTdGF0dXMgICAgICAgICAgICAgICAgPSBFRklfU1VDQ0VT UzsNCisgIEJ1ZmZlciAgICAgICAgICAgICAgICA9IE5VTEw7DQorDQorICAvLw0KKyAgLy8gTmVl ZCB0byBlbmNyeXB0IGRhdGEuDQorICAvLw0KKyAgaWYgKEh0dHBJbnN0YW5jZS0+VXNlSHR0cHMp IHsNCisgICAgLy8NCisgICAgLy8gQnVpbGQgQnVmZmVyT3V0IGRhdGENCisgICAgLy8NCisgICAg QnVmZmVyU2l6ZSA9IHNpemVvZiAoVExTX1JFQ09SRF9IRUFERVIpICsgVHhTdHJpbmdMZW47DQor ICAgIEJ1ZmZlciAgICAgPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJTaXplKTsNCisgICAgaWYg KEJ1ZmZlciA9PSBOVUxMKSB7DQorICAgICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7 DQorICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKyAgICAoKFRMU19SRUNPUkRfSEVBREVS ICopIEJ1ZmZlciktPkNvbnRlbnRUeXBlID0gVExTX0NPTlRFTlRfVFlQRV9BUFBMSUNBVElPTl9E QVRBOw0KKyAgICAoKFRMU19SRUNPUkRfSEVBREVSICopIEJ1ZmZlciktPlZlcnNpb24uTWFqb3Ig PSBIdHRwSW5zdGFuY2UtPlRsc0NvbmZpZ0RhdGEuVmVyc2lvbi5NYWpvcjsNCisgICAgKChUTFNf UkVDT1JEX0hFQURFUiAqKSBCdWZmZXIpLT5WZXJzaW9uLk1pbm9yID0gSHR0cEluc3RhbmNlLT5U bHNDb25maWdEYXRhLlZlcnNpb24uTWlub3I7DQorICAgICgoVExTX1JFQ09SRF9IRUFERVIgKikg QnVmZmVyKS0+TGVuZ3RoID0gKFVJTlQxNikgKFR4U3RyaW5nTGVuKTsNCisgICAgQ29weU1lbSAo QnVmZmVyICsgc2l6ZW9mIChUTFNfUkVDT1JEX0hFQURFUiksIFR4U3RyaW5nLCBUeFN0cmluZ0xl bik7DQorICAgIA0KKyAgICAvLw0KKyAgICAvLyBFbmNyeXB0IFBhY2tldC4NCisgICAgLy8NCisg ICAgU3RhdHVzID0gVGxzUHJvY2Vzc01lc3NhZ2UgKA0KKyAgICAgICAgICAgICAgIEh0dHBJbnN0 YW5jZSwgDQorICAgICAgICAgICAgICAgQnVmZmVyLCANCisgICAgICAgICAgICAgICBCdWZmZXJT aXplLCANCisgICAgICAgICAgICAgICBFZmlUbHNFbmNyeXB0LCANCisgICAgICAgICAgICAgICAm VGVtcEZyYWdtZW50DQorICAgICAgICAgICAgICAgKTsNCisgICAgDQorICAgIEZyZWVQb29sIChC dWZmZXIpOw0KKw0KKyAgICBpZiAoRUZJX0VSUk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gIGlmIChGcmFnbWVudC5CdWxrICE9IE5VTEwpIHsNCisgICAgICAgICAgRnJl ZVBvb2wgKEZyYWdtZW50LkJ1bGspOw0KKyAgICAgICAgICBGcmFnbWVudC5CdWxrID0gTlVMTDsN CisgICAgICAgIH0NCisgICAgICAgIA0KKyAgICAgICAgU3RhdHVzID0gSHR0cHNSZWNlaXZlIChI dHRwSW5zdGFuY2UsICZGcmFnbWVudCwgVGltZW91dCk7DQorICAgICAgICBpZiAoRUZJX0VSUk9S IChTdGF0dXMpKSB7DQorICAgICAgICAgIERFQlVHICgoRUZJX0RfRVJST1IsICJUY3A0IHJlY2Vp dmUgZmFpbGVkOiAlclxuIiwgU3RhdHVzKSk7DQorICAgICAgICAgIHJldHVybiBTdGF0dXM7DQor ICAgICAgICB9DQogICAgICAgfQ0KIA0KLSAgICAgIGlmICghSHR0cEluc3RhbmNlLT5Jc1J4RG9u ZSkgew0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIENhbmNsZSB0aGUgVG9rZW4gYmVmb3JlIGNs b3NlIGl0cyBFdmVudC4NCi0gICAgICAgIC8vDQotICAgICAgICBUY3A0LT5DYW5jZWwgKEh0dHBJ bnN0YW5jZS0+VGNwNCwgJlJ4NFRva2VuLT5Db21wbGV0aW9uVG9rZW4pOw0KLSAgICAgICAgZ0JT LT5DbG9zZUV2ZW50IChSeDRUb2tlbi0+Q29tcGxldGlvblRva2VuLkV2ZW50KTsNCi0gICAgICAg IFJ4NFRva2VuLT5Db21wbGV0aW9uVG9rZW4uU3RhdHVzID0gRUZJX1RJTUVPVVQ7DQotICAgICAg fQ0KLSAgDQotICAgICAgU3RhdHVzID0gUng0VG9rZW4tPkNvbXBsZXRpb25Ub2tlbi5TdGF0dXM7 DQotICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAgICAgcmV0dXJuIFN0YXR1 czsNCi0gICAgICB9DQotICANCiAgICAgICAvLw0KICAgICAgIC8vIEFwcGVuZCB0aGUgc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WNrZXQuUnhEYXRhLT5GcmFnbWVudFRhYmxlWzBd LkZyYWdtZW50TGVuZ3RoID0gREVGX0JVRl9MRU47DQorICAgICAgICBTdGF0dXMgPSBUY3A2LT5S ZWNlaXZlIChUY3A2LCBSeDZUb2tlbik7DQorICAgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQorICAgICAgICAgIERFQlVHICgoRUZJX0RfRVJST1IsICJUY3A2IHJlY2VpdmUgZmFpbGVk OiAlclxuIiwgU3RhdHVzKSk7DQorICAgICAgICAgIHJldHVybiBTdGF0dXM7DQorICAgICAgICB9 DQorDQorICAgICAgICB3aGlsZSAoIUh0dHBJbnN0YW5jZS0+SXNSeERvbmUgJiYgKChUaW1lb3V0 ID09IE5VTEwpIHx8IEVGSV9FUlJPUiAoZ0JTLT5DaGVja0V2ZW50IChUaW1lb3V0KSkpKSB7DQor ICAgICAgICAgIFRjcDYtPlBvbGwgKFRjcDYpOw0KKyAgICAgICAgfQ0KKw0KKyAgICAgICAgaWYg KCFIdHRwSW5zdGFuY2UtPklzUnhEb25lKSB7DQorICAgICAgICAgIC8vDQorICAgICAgICAgIC8v IENhbmNsZSB0aGUgVG9rZW4gYmVmb3JlIGNsb3NlIGl0cyBFdmVudC4NCisgICAgICAgICAgLy8N CisgICAgICAgICAgVGNwNi0+Q2FuY2VsIChIdHRwSW5zdGFuY2UtPlRjcDYsICZSeDZUb2tlbi0+ Q29tcGxldGlvblRva2VuKTsNCisgICAgICAgICAgZ0JTLT5DbG9zZUV2ZW50IChSeDZUb2tlbi0+ Q29tcGxldGlvblRva2VuLkV2ZW50KTsNCisgICAgICAgICAgUng2VG9rZW4tPkNvbXBsZXRpb25U b2tlbi5TdGF0dXMgPSBFRklfVElNRU9VVDsNCisgICAgICAgIH0NCisNCisgICAgICAgIFN0YXR1 cyA9IFJ4NlRva2VuLT5Db21wbGV0aW9uVG9rZW4uU3RhdHVzOw0KKyAgICAgICAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgfQ0K KyAgICAgICAgDQorICAgICAgICBGcmFnbWVudC5MZW4gID0gUng2VG9rZW4tPlBhY2tldC5SeERh dGEtPkZyYWdtZW50VGFibGVbMF0uRnJhZ21lbnRMZW5ndGg7DQorICAgICAgICBGcmFnbWVudC5C dWxrID0gKFVJTlQ4ICopIFJ4NlRva2VuLT5QYWNrZXQuUnhEYXRhLT5GcmFnbWVudFRhYmxlWzBd LkZyYWdtZW50QnVmZmVyOw0KKyAgICAgIH0gZWxzZSB7DQorICAgICAgICBpZiAoRnJhZ21lbnQu QnVsayAhPSBOVUxMKSB7DQorICAgICAgICAgIEZyZWVQb29sIChGcmFnbWVudC5CdWxrKTsNCisg ICAgICAgICAgRnJhZ21lbnQuQnVsayA9IE5VTEw7DQorICAgICAgICB9DQorICAgICAgICANCisg ICAgICAgIFN0YXR1cyA9IEh0dHBzUmVjZWl2ZSAoSHR0cEluc3RhbmNlLCAmRnJhZ21lbnQsIFRp bWVvdXQpOw0KKyAgICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgICBE RUJVRyAoKEVGSV9EX0VSUk9SLCAiVGNwNiByZWNlaXZlIGZhaWxlZDogJXJcbiIsIFN0YXR1cykp Ow0KKyAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgfQ0KICAgICAgIH0NCiANCi0g ICAgICBpZiAoIUh0dHBJbnN0YW5jZS0+SXNSeERvbmUpIHsNCi0gICAgICAgIC8vDQotICAgICAg ICAvLyBDYW5jbGUgdGhlIFRva2VuIGJlZm9yZSBjbG9zZSBpdHMgRXZlbnQuDQotICAgICAgICAv Lw0KLSAgICAgICAgVGNwNi0+Q2FuY2VsIChIdHRwSW5zdGFuY2UtPlRjcDYsICZSeDZUb2tlbi0+ Q29tcGxldGlvblRva2VuKTsNCi0gICAgICAgIGdCUy0+Q2xvc2VFdmVudCAoUng2VG9rZW4tPkNv bXBsZXRpb25Ub2tlbi5FdmVudCk7DQotICAgICAgICBSeDZUb2tlbi0+Q29tcGxldGlvblRva2Vu LlN0YXR1cyA9IEVGSV9USU1FT1VUOw0KLSAgICAgIH0NCi0gIA0KLSAgICAgIFN0YXR1cyA9IFJ4 NlRva2VuLT5Db21wbGV0aW9uVG9rZW4uU3RhdHVzOw0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0 YXR1cykpIHsNCi0gICAgICAgIHJldHVybiBTdGF0dXM7DQotICAgICAgfQ0KLSAgDQogICAgICAg Ly8NCiAgICAgICAvLyBBcHBlbmQgdGhlIHJlc3BvbnNlIHN0cmluZy4NCiAgICAgICAvLw0KLSAg ICAgICpCdWZmZXJTaXplID0gKCpTaXplb2ZIZWFkZXJzKSArIFJ4NlRva2VuLT5QYWNrZXQuUnhE YXRhLT5GcmFnbWVudFRhYmxlWzBdLkZyYWdtZW50TGVuZ3RoOw0KKyAgICAgICpCdWZmZXJTaXpl ID0gKlNpemVvZkhlYWRlcnMgKyBGcmFnbWVudC5MZW47DQogICAgICAgQnVmZmVyICAgICAgPSBB bGxvY2F0ZVplcm9Qb29sICgqQnVmZmVyU2l6ZSk7DQogICAgICAgaWYgKEJ1ZmZlciA9PSBOVUxM KSB7DQogICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCiAgICAgICAgIHJl dHVybiBTdGF0dXM7DQogICAgICAgfQ0KLSAgDQorDQogICAgICAgaWYgKCpIdHRwSGVhZGVycyAh PSBOVUxMKSB7DQotICAgICAgICBDb3B5TWVtIChCdWZmZXIsICpIdHRwSGVhZGVycywgKCpTaXpl b2ZIZWFkZXJzKSk7DQorICAgICAgICBDb3B5TWVtIChCdWZmZXIsICpIdHRwSGVhZGVycywgKlNp emVvZkhlYWRlcnMpOw0KICAgICAgICAgRnJlZVBvb2wgKCpIdHRwSGVhZGVycyk7DQogICAgICAg fQ0KLSAgDQorDQogICAgICAgQ29weU1lbSA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AgICAgICAgICAgICAgICAgIEJvZHlMZW47DQogICBFRklfSFRU UF9NRVRIT0QgICAgICAgICAgICAgICBNZXRob2Q7DQogfSBIVFRQX1RDUF9UT0tFTl9XUkFQOw0K IA0KK3R5cGVkZWYgc3RydWN0IHsNCisgIEVGSV9UTFNfVkVSU0lPTiAgICAgICAgICAgICAgIFZl cnNpb247DQorICBFRklfVExTX0NPTk5FQ1RJT05fRU5EICAgICAgICBDb25uZWN0aW9uRW5kOw0K KyAgRUZJX1RMU19WRVJJRlkgICAgICAgICAgICAgICAgVmVyaWZ5TWV0aG9kOw0KKyAgRUZJX1RM U19TRVNTSU9OX1NUQVRFICAgICAgICAgU2Vzc2lvblN0YXRlOw0KKyAgDQorICBWT0lEICAgICAg ICAgICAgICAgICAgICAgICAgICAqQ0FDZXJ0Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAg ICAgICAgQ0FDZXJ0U2l6ZTsNCisgIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAgICpDbGll bnRDZXJ0Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgQ2xpZW50Q2VydFNpemU7 DQorICBWT0lEICAgICAgICAgICAgICAgICAgICAgICAgICAqQ2xpZW50UHJpdmF0ZUtleTsNCisg IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgIENsaWVudFByaXZhdGVLZXlTaXplOw0KK30g VExTX0NPTkZJR19EQVRBOw0KKw0KIHR5cGVkZWYgc3RydWN0IF9IVFRQX1BST1RPQ09MIHsNCiAg IFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgIFNpZ25hdHVyZTsNCiAgIEVGSV9IVFRQX1BS T1RPQ09MICAgICAgICAgICAgIEh0dHA7DQogICBFRklfSEFORExFICAgICAgICAgICAgICAgICAg ICBIYW5kbGU7DQogICBIVFRQX1NFUlZJQ0UgICAgICAgICAgICAgICAgICAqU2VydmljZTsNCkBA IC0xNTEsMTAgKzE2NSwzOSBAQCB0eXBlZGVmIHN0cnVjdCBfSFRUUF9QUk9UT0NPTCB7DQogDQog ICBORVRfTUFQICAgICAgICAgICAgICAgICAgICAgICBUeFRva2VuczsNCiAgIE5FVF9NQVAgICAg ICAgICAgICAgICAgICAgICAgIFJ4VG9rZW5zOw0KIA0KICAgQ0hBUjggICAgICAgICAgICAgICAg ICAgICAgICAgKlVybDsNCisNCisgIC8vDQorICAvLyBIdHRwcyBTdXBwb3J0DQorICAvLw0KKyAg Qk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlSHR0cHM7DQorICANCisgIEVGSV9I QU5ETEUgICAgICAgICAgICAgICAgICAgICAgIFRsc0NoaWxkSGFuZGxlOyAvLy8gVGxzIENoaWxk SGFuZGxlDQorICBUTFNfQ09ORklHX0RBVEEgICAgICAgICAgICAgICAgICBUbHNDb25maWdEYXRh Ow0KKyAgRUZJX1RMU19QUk9UT0NPTCAgICAgICAgICAgICAgICAgKlRsczsNCisgIEVGSV9UTFNf Q09ORklHVVJBVElPTl9QUk9UT0NPTCAgICpUbHNDb25maWd1cmF0aW9uOw0KKyAgRUZJX1RMU19T RVNTSU9OX1NUQVRFICAgICAgICAgICAgVGxzU2Vzc2lvblN0YXRlOw0KKw0KKyAgLy8NCisgIC8v IFRsc1R4RGF0YSB1c2VkIGZvciB0cmFuc21pdHRpbmcgVExTIHJlbGF0ZWQgbWVzc2FnZXMuDQor ICAvLw0KKyAgRUZJX1RDUDRfSU9fVE9LRU4gICAgICAgICAgICAgICAgVGNwNFRsc1R4VG9rZW47 DQorICBFRklfVENQNF9UUkFOU01JVF9EQVRBICAgICAgICAgICBUY3A0VGxzVHhEYXRhOw0KKyAg RUZJX1RDUDZfSU9fVE9LRU4gICAgICAgICAgICAgICAgVGNwNlRsc1R4VG9rZW47DQorICBFRklf VENQNl9UUkFOU01JVF9EQVRBICAgICAgICAgICBUY3A2VGxzVHhEYXRhOw0KKyAgQk9PTEVBTiAg ICAgICAgICAgICAgICAgICAgICAgICAgVGxzSXNUeERv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iBQY2RNYXhpbXVtQXNjaWlTdHJpbmdMZW5ndGgN CisgIC8vDQorICBBU1NFUlQgKEFzY2lpU3RyU2l6ZSAoU3RyaW5nKSAhPSAwKTsNCisgIEFTU0VS VCAoQXNjaWlTdHJTaXplIChTZWFyY2hTdHJpbmcpICE9IDApOw0KKw0KKyAgaWYgKCpTZWFyY2hT dHJpbmcgPT0gJ1wwJykgew0KKyAgICByZXR1cm4gKENIQVI4ICopIFN0cmluZzsNCisgIH0NCisN CisgIHdoaWxlICgqU3RyaW5nICE9ICdcMCcpIHsNCisgICAgU2VhcmNoU3RyaW5nVG1wID0gU2Vh cmNoU3RyaW5nOw0KKyAgICBGaXJzdE1hdGNoID0gU3RyaW5nOw0KKw0KKyAgICB3aGlsZSAoKCpT ZWFyY2hTdHJpbmdUbXAgIT0gJ1wwJykNCisgICAgICAgICAgICAmJiAoKlN0cmluZyAhPSAnXDAn KSkgew0KKyAgICAgIFNyYyA9ICpTdHJpbmc7DQorICAgICAgRHN0ID0gKlNlYXJjaFN0cmluZ1Rt cDsNCisNCisgICAgICBpZiAoKFNyYyA+PSAnQScpICYmIChTcmMgPD0gJ1onKSkgew0KKyAgICAg ICAgU3JjIC09ICgnQScgLSAnYScpOw0KKyAgICAgIH0NCisNCisgICAgICBpZiAoKERzdCA+PSAn QScpICYmIChEc3QgPD0gJ1onKSkgew0KKyAgICAgICAgRHN0IC09ICgnQScgLSAnYScpOw0KKyAg ICAgIH0NCisNCisgICAgICBpZiAoU3JjICE9IERzdCkgew0KKyAgICAgICAgYnJlYWs7DQorICAg ICAgfQ0KKw0KKyAgICAgIFN0cmluZysrOw0KKyAgICAgIFNlYXJjaFN0cmluZ1RtcCsrOw0KKyAg ICB9DQorDQorICAgIGlmICgqU2VhcmNoU3RyaW5nVG1wID09ICdcMCcpIHsNCisgICAgICByZXR1 cm4gKENIQVI4ICopIEZpcnN0TWF0Y2g7DQorICAgIH0NCisNCisgICAgU3RyaW5nID0gRmlyc3RN YXRjaCArIDE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IC8vDQorICAvLyBMb2NhdGUgVGxzU2VydmljZUJpbmRpbmcgcHJv dG9jb2wuDQorICAvLw0KKyAgZ0JTLT5Mb2NhdGVQcm90b2NvbCAoDQorICAgICAmZ0VmaVRsc1Nl cnZpY2VCaW5kaW5nUHJvdG9jb2xHdWlkLA0KKyAgICAgTlVMTCwNCisgICAgIChWT0lEICoqKSAm VGxzU2INCisgICAgICk7DQorICBpZiAoVGxzU2IgPT0gTlVMTCkgew0KKyAgICByZXR1cm4gTlVM TDsNCisgIH0NCisNCisgIFN0YXR1cyA9IFRsc1NiLT5DcmVhdGVDaGlsZCAoVGxzU2IsICZUbHND aGlsZEhhbmRsZSk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBO VUxMOw0KKyAgfQ0KKw0KKyAgU3RhdHVzID0gZ0JTLT5PcGVuUHJvdG9jb2wgKA0KKyAgICAgICAg ICAgICAgICAgIFRsc0NoaWxkSGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpVGxzUHJv dG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAgICAgIChWT0lEICoqKSBUbHNQcm90bywNCisgICAg ICAgICAgICAgICAgICBJbWFnZUhhbmRsZSwNCisgICAgICAgICAgICAgICAgICBUbHNDaGlsZEhh bmRsZSwNCisgICAgICAgICAgICAgICAgICBFRklfT1BFTl9QUk9UT0NPTF9HRVRfUFJPVE9DT0wN CisgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAg ICBUbHNTYi0+RGVzdHJveUNoaWxkIChUbHNTYiwgVGxzQ2hpbGRIYW5kbGUpOw0KKyAgICByZXR1 cm4gTlVMTDsNCisgIH0NCisNCisgIFN0YXR1cyA9IGdCUy0+T3BlblByb3RvY29sICgNCisgICAg ICAgICAgICAgICAgICBUbHNDaGlsZEhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAmZ0VmaVRs c0NvbmZpZ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dLkZyYWdtZW50QnVmZmVyID0gTlVMTDsNCisgICAgSHR0cEluc3RhbmNlLT5U Y3A0VGxzVHhUb2tlbi5QYWNrZXQuVHhEYXRhID0gJkh0dHBJbnN0YW5jZS0+VGNwNFRsc1R4RGF0 YTsNCisgICAgSHR0cEluc3RhbmNlLT5UY3A0VGxzVHhUb2tlbi5Db21wbGV0aW9uVG9rZW4uU3Rh dHVzID0gRUZJX05PVF9SRUFEWTsNCisNCisgICAgLy8NCisgICAgLy8gRm9yIFRjcDRUbHNSeFRv a2VuLg0KKyAgICAvLw0KKyAgICBTdGF0dXMgPSBnQlMtPkNyZWF0ZUV2ZW50ICgNCisgICAgICAg ICAgICAgICAgICAgIEVWVF9OT1RJRllfU0lHTkFMLA0KKyAgICAgICAgICAgICAgICAgICAgVFBM X05PVElGWSwNCisgICAgICAgICAgICAgICAgICAgIEh0dHBDb21tb25Ob3RpZnksDQorICAgICAg ICAgICAgICAgICAgICAmSHR0cEluc3RhbmNlLT5UbHNJc1J4RG9uZSwNCisgICAgICAgICAgICAg ICAgICAgICZIdHRwSW5zdGFuY2UtPlRjcDRUbHNSeFRva2VuLkNvbXBsZXRpb25Ub2tlbi5FdmVu dA0KKyAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkg ew0KKyAgICAgIGdvdG8gRVJST1I7DQorICAgIH0NCisNCisgICAgSHR0cEluc3RhbmNlLT5UY3A0 VGxzUnhEYXRhLkRhdGFMZW5ndGggICAgICAgICAgICAgICAgICAgICAgID0gMDsNCisgICAgSHR0 cEluc3RhbmNlLT5UY3A0VGxzUnhEYXRhLkZyYWdtZW50Q291bnQgICAgICAgICAgICAgICAgICAg ID0gMTsNCisgICAgSHR0cEluc3RhbmNlLT5UY3A0VGxzUnhEYXRhLkZyYWdtZW50VGFibGVbMF0u RnJhZ21lbnRMZW5ndGggID0gSHR0cEluc3RhbmNlLT5UY3A0VGxzUnhEYXRhLkRhdGFMZW5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XN0ICsgc2l6ZW9mIChF RklfU0lHTkFUVVJFX0xJU1QpICsgQ2VydExpc3QtPlNpZ25hdHVyZUhlYWRlclNpemUpOw0KKyAg ICBDZXJ0Q291bnQgID0gKENlcnRMaXN0LT5TaWduYXR1cmVMaXN0U2l6ZSAtIHNpemVvZiAoRUZJ X1NJR05BVFVSRV9MSVNUKSAtIENlcnRMaXN0LT5TaWduYXR1cmVIZWFkZXJTaXplKSAvIENlcnRM aXN0LT5TaWduYXR1cmVTaXplOw0KKyAgICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBDZXJ0Q291 bnQ7IEluZGV4KyspIHsNCisgICAgICAvLw0KKyAgICAgIC8vIEVmaVRsc0NvbmZpZ0RhdGFUeXBl Q0FDZXJ0aWZpY2F0ZQ0KKyAgICAgIC8vDQorICAgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5U bHNDb25maWd1cmF0aW9uLT5TZXREYXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHNDb25maWd1cmF0aW9uLA0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFZmlUbHNDb25m aWdEYXRhVHlwZUNBQ2VydGlmaWNhdGUsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIENlcnQtPlNpZ25hdHVyZURhdGEsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENlcnRMaXN0LT5TaWduYXR1cmVTaXpl IC0gc2l6ZW9mIChDZXJ0LT5TaWduYXR1cmVPd25lcikNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0 dXMpKSB7DQorICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgIH0NCisNCisgICAg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UZJX1RMU19WRVJJRllfUEVFUjsNCisgIEh0dHBJbnN0YW5jZS0+VGxz Q29uZmlnRGF0YS5TZXNzaW9uU3RhdGUgPSBFZmlUbHNTZXNzaW9uTm90U3RhcnRlZDsNCisNCisg IC8vDQorICAvLyBFZmlUbHNDb25uZWN0aW9uRW5kLA0KKyAgLy8gRWZpVGxzVmVyaWZ5TWV0aG9k DQorICAvLyBFZmlUbHNTZXNzaW9uU3RhdGUNCisgIC8vDQorICBTdGF0dXMgPSBIdHRwSW5zdGFu Y2UtPlRscy0+U2V0U2Vzc2lvbkRhdGEgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBF ZmlUbHNDb25uZWN0aW9uRW5kLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihI dHRwSW5zdGFuY2UtPlRsc0NvbmZpZ0RhdGEuQ29ubmVjdGlvbkVuZCksDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzaXplb2YgKEVGSV9UTFNfQ09OTkVDVElPTl9FTkQpDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KKyAgICBnb3RvIEVSUk9SOw0KKyAgfQ0KKw0KKyAgU3RhdHVzID0gSHR0cEluc3RhbmNl LT5UbHMtPlNldFNlc3Npb25EYXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IEh0dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWZp VGxzVmVyaWZ5TWV0aG9kLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkh0dHBJ bnN0YW5jZS0+VGxzQ29uZmlnRGF0YS5WZXJpZnlNZXRob2QsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBzaXplb2YgKEVGSV9UTFNfVkVSSUZZKQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgZ290 byBFUlJPUjsNCisgIH0NCisNCisgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5TZXRTZXNz aW9uRGF0YSAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2Ut PlRscywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaVRsc1Nlc3Npb25TdGF0 ZSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYoSHR0cEluc3RhbmNlLT5UbHND b25maWdEYXRhLlNlc3Npb25TdGF0ZSksDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzaXplb2YgKEVGSV9UTFNfU0VTU0lPTl9TVEFURSkNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIGdvdG8gRVJS T1I7DQorICB9DQorDQorICAvLw0KKyAgLy8gVGxzIENvbmZpZyBDZXJ0aWZpY2F0ZQ0KKyAgLy8N CisgIFN0YXR1cyA9IFRsc0NvbmZpZ0NlcnRpZmljYXRlIChIdHRwSW5zdGFuY2UpOw0KKyAgaWYg KEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICBERUJVRyAoKEVGSV9EX0VSUk9SLCAiVExTIENl cnRpZmljYXRlIENvbmZpZyBFcnJvciFcbiIpKTsNCisgICAgZ290byBFUlJPUjsNCisgIH0NCisN CisgIC8vDQorICAvLyBUbHNDcmVhdGVUeFJ4RXZlbnQNCisgIC8vDQorICBTdGF0dXMgPSBUbHND cmVhdGVUeFJ4RXZlbnQgKEh0dHBJbnN0YW5jZSk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQorICAgIGdvdG8gRVJ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BEVSBpcyByZWNlaXZlZC4NCisgIEByZXR2YWwgRUZJX09V VF9PRl9SRVNPVVJDRVMgQ2FuJ3QgYWxsb2NhdGUgbWVtb3J5IHJlc291cmNlcy4NCisgIEByZXR2 YWwgRUZJX1BST1RPQ09MX0VSUk9SICAgQW4gdW5leHBlY3RlZCBUTFMgcGFja2V0IHdhcyByZWNl aXZlZC4NCisgIEByZXR2YWwgT3RoZXJzICAgICAgICAgICAgICAgT3RoZXIgZXJyb3JzIGFzIGlu ZGljYXRlZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorVGxzUmVjZWl2ZU9uZVBk dSAoDQorICBJTiBPVVQgSFRUUF9QUk9UT0NPTCAgICAgICpIdHRwSW5zdGFuY2UsDQorICAgICBP VVQgTkVUX0JVRiAgICAgICAgICAgICoqUGR1LA0KKyAgSU4gICAgIEVGSV9FVkVOVCAgICAgICAg ICBUaW1lb3V0DQorICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgIFN0YXR1czsNCisNCisgIExJ U1RfRU5UUlkgICAgICAqTmJ1Zkxpc3Q7DQorDQorICBVSU5UMzIgICAgICAgICAgTGVuOw0KKw0K KyAgTkVUX0JVRiAgICAgICAgICAgKlBkdUhkcjsNCisgIFVJTlQ4ICAgICAgICAgICAgICpIZWFk ZXI7DQorICBUTFNfUkVDT1JEX0hFQURFUiBSZWNvcmRIZWFkZXI7DQorDQorICBORVRfQlVGICAg ICAgICAgICAqRGF0YVNlZzsNCisNCisgIE5idWZMaXN0ID0gTlVMTDsNCisgIFBkdUhkciAgID0g TlVMTDsNCisgIEhlYWRlciAgID0gTlVMTDsNCisgIERhdGFTZWcgID0gTlVMTDsNCisNCisgIE5i dWZMaXN0ID0gQWxsb2NhdGVQb29sIChzaXplb2YgKExJU1RfRU5UUlkpKTsNCisgIGlmIChOYnVm TGlzdCA9PSBOVUxMKSB7DQorICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgIH0N CisNCisgIE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IEh0dHBJbnN0 YW5jZSAgICAgICBUaGUgSFRUUCBpbnN0YW5jZSBwcml2YXRlIGRhdGEuDQorICBAcGFyYW1baW5d ICBUaW1lb3V0ICAgICAgICAgICAgVGhlIHRpbWUgdG8gd2FpdCBmb3IgY29ubmVjdGlvbiBkb25l Lg0KKw0KKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgIFRoZSBUTFMgc2Vzc2lvbiBp cyBlc3RhYmxpc2hlZC4NCisgIEByZXR2YWwgRUZJX09VVF9PRl9SRVNPVVJDRVMgICBDYW4ndCBh bGxvY2F0ZSBtZW1vcnkgcmVzb3VyY2VzLg0KKyAgQHJldHZhbCBFRklfQUJPUlRFRCAgICAgICAg ICAgIFRMUyBzZXNzaW9uIHN0YXRlIGlzIGluY29ycmVjdC4NCisgIEByZXR2YWwgT3RoZXJzICAg ICAgICAgICAgICAgICBPdGhlciBlcnJvciBhcyBpbmRpY2F0ZWQuDQorDQorKiovDQorRUZJX1NU QVRVUw0KK0VGSUFQSQ0KK1Rsc0Nvbm5lY3RTZXNzaW9uICgNCisgIElOICBIVFRQX1BST1RPQ09M ICAgICAgICAgICAgKkh0dHBJbnN0YW5jZSwNCisgIElOICBFRklfRVZFTlQgICAgICAgICAgICAg ICAgVGltZW91dA0KKyAgKQ0KK3sNCisgIEVGSV9TVEFUVVMgICAgICAgICAgICAgIFN0YXR1czsN CisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICpCdWZmZXJPdXQ7DQorICBVSU5UTiAgICAgICAg ICAgICAgICAgICBCdWZmZXJPdXRTaXplOw0KKyAgTkVUX0JVRiAgICAgICAgICAgICAgICAgKlBh Y2tldE91dDsNCisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICpEYXRhT3V0Ow0KKyAgTkVUX0JV RiAgICAgICAgICAgICAgICAgKlBkdTsNCisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICpCdWZm ZXJJbjsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgIEJ1ZmZlckluU2l6ZTsNCisgIFVJTlQ4 ICAgICAgICAgICAgICAgICAgICpHZXRTZXNzaW9uRGF0YUJ1ZmZlcjsNCisgIFVJTlROICAgICAg ICAgICAgICAgICAgIEdldFNlc3Npb25EYXRhQnVmZmVyU2l6ZTsNCisNCisgIEJ1ZmZlck91dCAg ICA9IE5VTEw7DQorICBQYWNrZXRPdXQgICAgPSBOVUxMOw0KKyAgRGF0YU91dCAgICAgID0gTlVM TDsNCisgIFBkdSAgICAgICAgICA9IE5VTEw7DQorICBCdWZmZXJJbiAgICAgPSBOVUxMOw0KKw0K KyAgLy8NCisgIC8vIEluaXRpYWxpemUgVExTIHN0YXRlLg0KKyAgLy8NCisgIEh0dHBJbnN0YW5j ZS0+VGxzU2Vzc2lvblN0YXRlID0gRWZpVGxzU2Vzc2lvbk5vdFN0YXJ0ZWQ7DQorICBTdGF0dXMg PSBIdHRwSW5zdGFuY2UtPlRscy0+U2V0U2Vzc2lvbkRhdGEgKA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBFZmlUbHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmKEh0dHBJbnN0YW5jZS0+VGxzU2Vzc2lvblN0YXRlKSwNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX1RMU19TRVNTSU9OX1NUQVRFKQ0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisNCisgIC8vDQorICAvLyBDcmVhdGUgQ2xp ZW50SGVsbG8NCisgIC8vDQorICBCdWZmZXJPdXRTaXplID0gREVGX0JVRl9MRU47DQorICBCdWZm ZXJPdXQgPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJPdXRTaXplKTsNCisgIGlmIChCdWZmZXJP dXQgPT0gTlVMTCkgew0KKyAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAg cmV0dXJuIFN0YXR1czsNCisgIH0NCisNCisgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5C dWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0 dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmQnVmZmVyT3V0U2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisg IGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsNCisgICAgRnJlZVBvb2wgKEJ1 ZmZlck91dCk7DQorICAgIEJ1ZmZlck91dCA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZlck91dFNp emUpOw0KKyAgICBpZiAoQnVmZmVyT3V0ID09IE5VTEwpIHsNCisgICAgICBTdGF0dXMgPSBFRklf T1VUX09GX1JFU09VUkNFUzsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAg IFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAgICAgICA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XZlT25lUGR1IChIdHRwSW5zdGFuY2UsICZQZHUsIFRpbWVvdXQp Ow0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgcmV0dXJuIFN0YXR1czsN CisgICAgfQ0KKw0KKyAgICBCdWZmZXJJblNpemUgPSBQZHUtPlRvdGFsU2l6ZTsNCisgICAgQnVm ZmVySW4gPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJJblNpemUpOw0KKyAgICBpZiAoQnVmZmVy SW4gPT0gTlVMTCkgew0KKyAgICAgIE5ldGJ1ZkZyZWUgKFBkdSk7DQorICAgICAgU3RhdHVzID0g RUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKw0K KyAgICBOZXRidWZDb3B5IChQZHUsIDAsIChVSU5UMzIpQnVmZmVySW5TaXplLCBCdWZmZXJJbik7 DQorDQorICAgIE5ldGJ1ZkZyZWUgKFBkdSk7DQorDQorICAgIC8vDQorICAgIC8vIEhhbmRsZSBS ZWNlaXZlIGRhdGEuDQorICAgIC8vDQorICAgIEJ1ZmZlck91dFNpemUgPSBERUZfQlVGX0xFTjsN CisgICAgQnVmZmVyT3V0ID0gQWxsb2NhdGVaZXJvUG9vbCAoQnVmZmVyT3V0U2l6ZSk7DQorICAg IGlmIChCdWZmZXJPdXQgPT0gTlVMTCkgew0KKyAgICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVT T1VSQ0VTOw0KKyAgICAgIHJldHVybiBTdGF0dXM7DQorICAgIH0NCisNCisgICAgU3RhdHVzID0g SHR0cEluc3RhbmNlLT5UbHMtPkJ1aWxkUmVzcG9uc2VQYWNrZXQgKA0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgQnVmZmVySW4sDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEJ1ZmZlckluU2l6ZSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg QnVmZmVyT3V0LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmQnVmZmVyT3V0 U2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoU3Rh dHVzID09IEVGSV9CVUZGRVJfVE9PX1NNQUxMKSB7DQorICAgICAgIEZyZWVQb29sIChCdWZmZXJP dXQpOw0KKyAgICAgICBCdWZmZXJPdXQgPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJPdXRTaXpl KTsNCisgICAgICAgaWYgKEJ1ZmZlck91dCA9PSBOVUxMKSB7DQorICAgICAgICAgRnJlZVBvb2wg KEJ1ZmZlckluKTsNCisgICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisg ICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICB9DQorDQorICAgICAgIFN0YXR1cyA9IEh0 dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlckluLA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCdWZmZXJJblNpemUsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KTsNCisgICAgfQ0KKw0KKyAgICBGcmVlUG9vbCAoQnVmZmVySW4pOw0KKw0KKyAgICBpZiAoRUZJ X0VSUk9SIChTdGF0dXMpKSB7DQorICAg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RhQnVmZmVyID09 IE5VTEwpIHsNCisgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgICBy ZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxz LT5HZXRTZXNzaW9uRGF0YSAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0 dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFZmlU bHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdldFNl c3Npb25EYXRhQnVmZmVyLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmR2V0 U2Vzc2lvbkRhdGFCdWZmZXJTaXplDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICk7DQorICAgIGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsNCisgICAgICAg RnJlZVBvb2wgKEdldFNlc3Npb25EYXRhQnVmZmVyKTsNCisgICAgICAgR2V0U2Vzc2lvbkRhdGFC dWZmZXIgPSBBbGxvY2F0ZVplcm9Qb29sIChHZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemUpOw0KKyAg ICAgICBpZiAoR2V0U2Vzc2lvbkRhdGFCdWZmZXIgPT0gTlVMTCkgew0KKyAgICAgICAgIFN0YXR1 cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgICAgIHJldHVybiBTdGF0dXM7DQorICAg ICAgIH0NCisNCisgICAgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMtPkdldFNlc3Npb25E YXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNl LT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaVRsc1N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vbkNsb3Npbmc7DQorDQor ICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+U2V0U2Vzc2lvbkRhdGEgKA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBFZmlUbHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmKEh0dHBJbnN0YW5jZS0+VGxzU2Vzc2lvblN0YXRlKSwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX1RMU19TRVNTSU9OX1NUQVRF KQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgIGlmIChFRklfRVJST1Ig KFN0YXR1cykpIHsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisNCisgIEJ1ZmZlck91dFNp emUgPSBERUZfQlVGX0xFTjsNCisgIEJ1ZmZlck91dCA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZl ck91dFNpemUpOw0KKyAgaWYgKEJ1ZmZlck91dCA9PSBOVUxMKSB7DQorICAgIFN0YXR1cyA9IEVG SV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKw0KKyAgU3Rh dHVzID0gSHR0cEluc3RhbmNlLT5UbHMtPkJ1aWxkUmVzcG9uc2VQYWNrZXQgKA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgMCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZCdWZmZXJPdXRTaXplDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVSX1RPT19T TUFMTCkgew0KKyAgICBGcmVlUG9vbCAoQnVmZmVyT3V0KTsNCisgICAgQnVmZmVyT3V0ID0gQWxs b2NhdGVaZXJvUG9vbCAoQnVmZmVyT3V0U2l6ZSk7DQorICAgIGlmIChCdWZmZXJPdXQgPT0gTlVM TCkgew0KKyAgICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgIHJldHVy biBTdGF0dXM7DQorICAgIH0NCisNCisgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMtPkJ1 aWxkUmVzcG9uc2VQYWNrZXQgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBI dHRwSW5zdGFuY2UtPlRscywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVM TCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgQnVmZmVyT3V0LA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmQnVmZmVyT3V0U2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICApOw0KKyAgfQ0KKw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICBGcmVl UG9vbCAoQnVmZmVyT3V0KTsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisNCisgIFBhY2tl dE91dCA9IE5ldGJ1ZkFsbG9jICgoVUlOVDMyKSBCdWZmZXJPdXRTaXplKTsNCisgIERhdGFPdXQg PSBOZXRidWZBbGxvY1NwYWNlIChQYWNrZXRPdXQsIChVSU5UMzIpIEJ1ZmZlck91dFNpemUsIE5F VF9CVUZfVEFJTCk7DQorICBDb3B5TWVtIChEYXRhT3V0LCBCdWZmZXJP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mV0dmFsIEVGSV9PVVRfT0ZfUkVTT1VSQ0VTICAgQ2FuJ3QgYWxsb2NhdGUgbWVtb3J5 IHJlc291cmNlcy4NCisgIEByZXR2YWwgT3RoZXJzICAgICAgICAgICAgICAgT3RoZXIgZXJyb3Jz IGFzIGluZGljYXRlZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorVGxzUHJvY2Vz c01lc3NhZ2UgKA0KKyAgSU4gICAgIEhUVFBfUFJPVE9DT0wgICAgICAgICAgICAqSHR0cEluc3Rh bmNlLA0KKyAgSU4gICAgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAqTWVzc2FnZSwNCisgIElO ICAgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZVNpemUsDQorICBJTiAgICAgRUZJ X1RMU19DUllQVF9NT0RFICAgICAgIFByb2Nlc3NNb2RlLA0KKyAgSU4gT1VUIE5FVF9GUkFHTUVO VCAgICAgICAgICAgICAqRnJhZ21lbnQNCisgICkNCit7DQorICBFRklfU1RBVFVTICAgICAgICAg ICAgICAgICAgICAgIFN0YXR1czsNCisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAg KkJ1ZmZlcjsNCisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICAgQnVmZmVyU2l6ZTsN CisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICAgQnl0ZXNDb3BpZWQ7DQorICBFRklf VExTX0ZSQUdNRU5UX0RBVEEgICAgICAgICAgICpGcmFnbWVudFRhYmxlOw0KKyAgVUlOVDMyICAg ICAgICAgICAgICAgICAgICAgICAgICBGcmFnbWVudENvdW50Ow0KKyAgRUZJX1RMU19GUkFHTUVO VF9EQVRBICAgICAgICAgICAqT3JpZ2luYWxGcmFnbWVudFRhYmxlOw0KKyAgVUlOVE4gICAgICAg ICAgICAgICAgICAgICAgICAgICBJbmRleDsNCisNCisgIFN0YXR1cyAgICAgICAgICAgICAgICAg ICA9IEVGS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gICAgICAgICAgICAgICAgICAgICAgJkZy YWdtZW50VGFibGUsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRnJhZ21lbnRD b3VudCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFByb2Nlc3NNb2RlDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KKyAgICBnb3RvIE9OX0VYSVQ7DQorICB9DQorDQorICAvLw0KKyAgLy8gQ2FsY3VsYXRl IHRoZSBzaXplIGFjY29yZGluZyB0byBGcmFnbWVudFRhYmxlLg0KKyAgLy8NCisgIGZvciAoSW5k ZXggPSAwOyBJbmRleCA8IEZyYWdtZW50Q291bnQ7IEluZGV4KyspIHsNCisgICAgQnVmZmVyU2l6 ZSArPSBGcmFnbWVudFRhYmxlW0luZGV4XS5GcmFnbWVudExlbmd0aDsNCisgIH0NCisNCisgIC8v DQorICAvLyBBbGxvY2F0ZSBidWZmZXIgZm9yIHByb2Nlc3NlZCBkYXRhLg0KKyAgLy8NCisgIEJ1 ZmZlciA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZlclNpemUpOw0KKyAgaWYgKEJ1ZmZlciA9PSBO VUxMKSB7DQorICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICBnb3RvIE9O X0VYSVQ7DQorICB9DQorDQorICAvLw0KKyAgLy8gQ29weSB0aGUgbmV3IEZyYWdtZW50VGFibGUg YnVmZmVyIGludG8gQnVmZmVyLg0KKyAgLy8NCisgIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IEZy YWdtZW50Q291bnQ7IEluZGV4KyspIHsNCisgICAgQ29weU1lbSAoDQorICAgICAgKEJ1ZmZlciAr IEJ5dGVzQ29waWVkKSwNCisgICAgICBGcmFnbWVudFRhYmxlW0luZGV4XS5GcmFnbWVudEJ1ZmZl ciwNCisgICAgICBGcmFnbWVud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nJhZ21lbnQgICAgICAgIFRo ZSByZWNlaXZlZCBGcmFnbWVudC4NCisgIEBwYXJhbVtpbl0gICAgICAgICAgIFRpbWVvdXQgICAg ICAgICBUaGUgdGltZSB0byB3YWl0IGZvciBjb25uZWN0aW9uIGRvbmUuDQorDQorICBAcmV0dmFs IEVGSV9TVUNDRVNTICAgICAgICAgIE9uZSBmcmFnbWVudCBpcyByZWNlaXZlZC4NCisgIEByZXR2 YWwgRUZJX09VVF9PRl9SRVNPVVJDRVMgQ2FuJ3QgYWxsb2NhdGUgbWVtb3J5IHJlc291cmNlcy4N CisgIEByZXR2YWwgRUZJX0FCT1JURUQgICAgICAgICAgU29tZXRoaW5nIHdyb25nIGRlY3J5cHRp b24gdGhlIG1lc3NhZ2UuDQorICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgICAgIE90aGVyIGVy cm9ycyBhcyBpbmRpY2F0ZWQuDQorDQorKiovDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK0h0dHBz UmVjZWl2ZSAoDQorICBJTiAgICAgSFRUUF9QUk9UT0NPTCAgICAgICAgICpIdHRwSW5zdGFuY2Us DQorICBJTiBPVVQgTkVUX0ZSQUdNRU5UICAgICAgICAgICpGcmFnbWVudCwNCisgIElOICAgICBF RklfRVZFTlQgICAgICAgICAgICAgVGltZW91dA0KKyAgKQ0KK3sNCisgIEVGSV9TVEFUVVMgICAg ICAgICAgICAgICAgICAgICAgU3RhdHVzOw0KKyAgTkVUX0JVRiAgICAgICAgICAgICAgICAgICAg ICAgICAqUGR1Ow0KKyAgVExTX1JFQ09SRF9IRUFERVIgICAgICAgICAgICAgICBSZWNvcmRIZWFk ZXI7DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICpCdWZmZXJJbjsNCisgIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVmZmVySW5TaXplOw0KKyAgTkVUX0ZSQUdN RU5UICAgICAgICAgICAgICAgICAgICBUZW1wRnJhZ21lbnQ7DQorICBVSU5UOCAgICAgICAgICAg ICAgICAgICAgICAgICAgICpCdWZmZXJPdXQ7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgIEJ1ZmZlck91dFNpemU7DQorICBORVRfQlVGICAgICAgICAgICAgICAgICAgICAgICAg ICpQYWNrZXRPdXQ7DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICpEYXRhT3V0 Ow0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAqR2V0U2Vzc2lvbkRhdGFCdWZm ZXI7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgIEdldFNlc3Npb25EYXRhQnVm ZmVyU2l6ZTsNCisNCisgIFN0YXR1cyAgICAgICAgICAgICAgICAgICA9IEVGSV9TVUNDRVNTOw0K KyAgUGR1ICAgICAgICAgICAgICAgICAgICAgID0gTlVMTDsNCisgIEJ1ZmZlckluICAgICAgICAg ICAgICAgICA9IE5VTEw7DQorICBCdWZmZXJJblNpemUgICAgICAgICAgICAgPSAwOw0KKyAgQnVm ZmVyT3V0ICAgICAgICAgICAgICAgID0gTlVMTDsNCisgIEJ1ZmZlck91dFNpemUgICAgICAgICAg ICA9IDA7DQorICBQYWNrZXRPdXQgICAgICAgICAgICAgICAgPSBOVUxMOw0KKyAgRGF0YU91dCAg ICAgICAgICAgICAgICAgID0gTlVMTDsNCisgIEdldFNlc3Npb25EYXRhQnVmZmVyICAgICA9IE5V TEw7DQorICBHZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemUgPSAwOw0KKw0KKyAgLy8NCisgIC8vIFJl Y2VpdmUgb25seSBvbmUgVExTIHJlY29yZA0KKyAgLy8NCisgIFN0YXR1cyA9IFRsc1JlY2VpdmVP bmVQZHUgKEh0dHBJbnN0YW5jZSwgJlBkdSwgVGltZW91dCk7DQorICBpZiAoRUZJX0VSUk9SIChT dGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICBCdWZm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cEluc3RhbmNlLA0KKyAgICAgICAgICAgICAgIEJ1ZmZlckluLA0KKyAgICAgICAgICAgICAgIEJ1 ZmZlckluU2l6ZSwNCisgICAgICAgICAgICAgICBFZmlUbHNEZWNyeXB0LA0KKyAgICAgICAgICAg ICAgICZUZW1wRnJhZ21lbnQNCisgICAgICAgICAgICAgICApOw0KKw0KKyAgICBGcmVlUG9vbCAo QnVmZmVySW4pOw0KKw0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgaWYg KFN0YXR1cyA9PSBFRklfQUJPUlRFRCkgew0KKyAgICAgICAgLy8NCisgICAgICAgIC8vIFNvbWV0 aGluZyB3cm9uZyBkZWNyeXB0aW9uIHRoZSBtZXNzYWdlLg0KKyAgICAgICAgLy8gQnVpbGRSZXNw b25zZVBhY2tldCgpIHdpbGwgYmUgY2FsbGVkIHRvIGdlbmVyYXRlIEVycm9yIEFsZXJ0IG1lc3Nh Z2UgYW5kIHNlbmQgaXQgb3V0Lg0KKyAgICAgICAgLy8NCisgICAgICAgIEJ1ZmZlck91dFNpemUg PSBERUZfQlVGX0xFTjsNCisgICAgICAgIEJ1ZmZlck91dCA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1 ZmZlck91dFNpemUpOw0KKyAgICAgICAgaWYgKEJ1ZmZlck91dCA9PSBOVUxMKSB7DQorICAgICAg ICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgICAgICByZXR1cm4gU3Rh dHVzOw0KKyAgICAgICAgfQ0KKw0KKyAgICAgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMt PkJ1aWxkUmVzcG9uc2VQYWNrZXQgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZCdWZmZXJPdXRTaXplDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICAgICAgaWYgKFN0YXR1cyA9 PSBFRklfQlVGRkVSX1RPT19TTUFMTCkgew0KKyAgICAgICAgICBGcmVlUG9vbCAoQnVmZmVyT3V0 KTsNCisgICAgICAgICAgQnVmZmVyT3V0ID0gQWxsb2NhdGVaZXJvUG9vbCAoQnVmZmVyT3V0U2l6 ZSk7DQorICAgICAgICAgIGlmIChCdWZmZXJPdXQgPT0gTlVMTCkgew0KKyAgICAgICAgICAgIFN0 YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgICAgICAgIHJldHVybiBTdGF0dXM7 DQorICAgICAgICAgIH0NCisNCisgICAgICAgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMt PkJ1aWxkUmVzcG9uc2VQYWNrZXQgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgMCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVmZmVyT3V0 LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmQnVmZmVyT3V0U2l6 ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICAgICAg fQ0KKyAgICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgICBGcmVlUG9v bChCdWZmZXJPdXQpOw0KKyAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgfQ0KKw0K KyAgICAgICAgaWYgKEJ1ZmZlck91dFNpemUgIT0gMCkgew0KKyAgICAgICAgICBQYWNrZXRPdXQg PSBOZXRidWZBbGxvYyAoKFVJTlQzMilCdWZmZXJPdXRTaXplKTsNCisgICAgICAgICAgRGF0YU91 dCA9IE5ldGJ1ZkFsbG9jU3BhY2UgKFBhY2tldE91dCwgKFVJTlQzMikgQnVmZmVyT3V0U2l6ZSwg TkVUX0JVRl9UQUlMKTsNCisgICAgICAgICAgQ29weU1lbSAoRGF0YU91dCwgQnVmZmVyT3V0LCBC dWZmZXJPdXRTaXplKTsNCisNCisgICAgICAgICAgU3RhdHVzID0gVGxzQ29tbW9uVHJhbnNtaXQg KEh0dHBJbnN0YW5jZSwgUGFja2V0T3V0KTsNCisNCisgICAgICAgICAgTmV0YnVmRnJlZSAoUGFj a2V0T3V0KTsNCisgICAgICAgIH0NCisNCisgICAgICAgIEZyZWVQb29sKEJ1ZmZlck91dCk7DQor DQorICAgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgICAgIHJldHVybiBT dGF0dXM7DQorICAgICAgICB9DQorDQorICAgICAgICByZXR1cm4gRUZJX0FCT1JURUQ7DQorICAg ICAgfQ0KKw0KKyAgICAgIHJldHVybiBTdGF0dXM7DQorICAgIH0NCisNCisgICAgLy8NCisgICAg Ly8gUGFyc2luZyBidWZmZXIuDQorICAgIC8vDQorICAgIEFTU0VSVCAoKChUTFNfUkVDT1JEX0hF QURFUiAqKSAoVGVtcEZyYWdtZW50LkJ1bGspKS0+Q29udGVudFR5cGUgPT0gVExTX0NPTlRFTlRf VFlQRV9BUFBMSUNBVElPTl9EQVRBKTsNCisNCisgICAgQnVmZmVySW5TaXplID0gKChUTFNfUkVD T1JEX0hFQURFUiAqKSAoVGVtcEZyYWdtZW50LkJ1bGspKS0+TGVuZ3RoOw0KKyAgICBCdWZmZXJJ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AgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgICBy ZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxz LT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IEJ1ZmZlckluLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJJblNp emUsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVS X1RPT19TTUFMTCkgew0KKyAgICAgIEZyZWVQb29sIChCdWZmZXJPdXQpOw0KKyAgICAgIEJ1ZmZl ck91dCA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZlck91dFNpemUpOw0KKyAgICAgIGlmIChCdWZm ZXJPdXQgPT0gTlVMTCkgew0KKyAgICAgICAgRnJlZVBvb2wgKEJ1ZmZlckluKTsNCisgICAgICAg IFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgICAgcmV0dXJuIFN0YXR1czsN CisgICAgICB9DQorDQorICAgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMtPkJ1aWxkUmVz cG9uc2VQYWNrZXQgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJ bnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZl ckluLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlckluU2l6ZSwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICB9DQorDQorICAgIEZyZWVQb29sIChC dWZmZXJJbik7DQorDQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBGcmVl UG9vbCAoQnVmZmVyT3V0KTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAg IGlmIChCdWZmZXJPdXRTaXplICE9IDApIHsNCisgICAgICBQYWNrZXRPdXQgPSBOZXRidWZBbGxv YyAoKFVJTlQzMikgQnVmZmVyT3V0U2l6ZSk7DQorICAgICAgRGF0YU91dCA9IE5ldGJ1ZkFsbG9j U3BhY2UgKFBhY2tldE91dCwgKFVJTlQzMikgQnVmZmVyT3V0U2l6ZSwgTkVUX0JVRl9UQUlMKTsN CisgICAgICBDb3B5TWVtIChEYXRhT3V0LCBCdWZmZXJPdXQsIEJ1ZmZlck91dFNpemUpOw0KKw0K KyAgICAgIFN0YXR1cyA9IFRsc0NvbW1vblRyYW5zbWl0IChIdHRwSW5zdGFuY2UsIFBhY2tldE91 dCk7DQorDQorICAgICAgTmV0YnVmRnJlZSAoUGFja2V0T3V0KTsNCisgICAgfQ0KKw0KKyAgICBG cmVlUG9vbCAoQnVmZmVyT3V0KTsNCisNCisgICAgLy8NCisgICAgLy8gR2V0IHRoZSBzZXNzaW9u IHN0YXRlLg0KKyAgICAvLw0KKyAgICBHZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemUgPSBERUZfQlVG X0xFTjsNCisgICAgR2V0U2Vzc2lvbkRhdGFCdWZmZXIgPSBBbGxvY2F0ZVplcm9Qb29sIChHZXRT ZXNzaW9uRGF0YUJ1ZmZlclNpemUpOw0KKyAgICBpZiAoR2V0U2Vzc2lvbkRhdGFCdWZmZXIgPT0g TlVMTCkgew0KKyAgICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgIHJl dHVybiBTdGF0dXM7DQorICAgIH0NCisNCisgICAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMt PkdldFNlc3Npb25EYXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0 cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaVRs c1Nlc3Npb25TdGF0ZSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR2V0U2Vz c2lvbkRhdGFCdWZmZXIsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZHZXRT ZXNzaW9uRGF0YUJ1ZmZlclNpemUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KTsNCisgICAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVSX1RPT19TTUFMTCkgew0KKyAgICAgICBG cmVlUG9vbCAoR2V0U2Vzc2lvbkRhdGFCdWZmZXIpOw0KKyAgICAgICBHZXRTZXNzaW9uRGF0YUJ1 ZmZlciA9IEFsbG9jYXRlWmVyb1Bvb2wgKEdldFNlc3Npb25EYXRhQnVmZmVyU2l6ZSk7DQorICAg ICAgIGlmIChHZXRTZXNzaW9uRGF0YUJ1ZmZlciA9PSBOVUxMKSB7DQorICAgICAgICAgU3RhdHVz ID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAg ICAgfQ0KKw0KKyAgICAgICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+R2V0U2Vzc2lvbkRh dGEgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2Ut PlRscywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWZpVGxzU2Vzc2lv blN0YXRlLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHZXRTZXNzaW9u RGF0YUJ1ZmZlciwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkdldFNl c3Npb25EYXRhQnVmZmVyU2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICApOw0KKyAgICB9DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBGcmVl UG9vbCAoR2V0U2Vzc2lvbkRhdGFCdWZmZXIpOw0KKyAgICAgIHJldHVybiBTdGF0dXM7DQorICAg IH0NCisNCisgICAgQVNTRVJUKEdldFNlc3Npb25EYXRhQnVmZmVyU2l6ZSA9PSBzaXplb2YgKEVG SV9UTFNfU0VTU0lPTl9TVEFURSkpOw0KKyAgICBIdHRwSW5zdGFuY2UtPlRsc1Nlc3Npb25TdGF0 ZSA9ICooRUZJX1RMU19TRVNTSU9OX1NUQVRFICopIEdldFNlc3Npb25EYXRhQnVmZmVyOw0KKw0K KyAgICBGcmVlUG9vbCAoR2V0U2Vzc2lvbkRhdGFCdWZmZXIpOw0KKw0KKyAgICBpZihIdHRwSW5z dGFuY2UtPlRsc1Nlc3Npb25TdGF0ZSA9PSBFZmlUbHNTZXNzaW9uRXJyb3IpIHsNCisgICAgICBE RUJVRyAoKEVGSV9EX0VSUk9SLCAiVExTIFNlc3Npb24gU3RhdGUgRXJyb3IhXG4iKSk7DQorICAg ICAgcmV0dXJuIEVGSV9BQk9SVEVEOw0KKyAgICB9DQorDQorICAgIEJ1ZmZlckluID0gTlVMTDsN CisgICAgQnVmZmVySW5TaXplID0gMDsNCisgIH0NCisNCisgIEZyYWdtZW50LT5CdWxrID0gQnVm ZmVySW47DQorICBGcmFnbWVudC0+TGVuID0gKFVJTlQzMikgQnVmZmVySW5TaXplOw0KKw0KKyAg c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TUyBP UiBJTVBMSUVELg0KKw0KKyoqLw0KKw0KKyNpZm5kZWYgX19FRklfSFRUUFNfU1VQUE9SVF9IX18N CisjZGVmaW5lIF9fRUZJX0hUVFBTX1NVUFBPUlRfSF9fDQorDQorI2RlZmluZSBIVFRQU19ERUZB VUxUX1BPUlQgICAgICAgNDQzDQorDQorI2RlZmluZSBIVFRQU19GTEFHICAgICAgICAgICAgICAg Imh0dHBzIg0KKw0KKy8qKg0KKyAgQ2hlY2sgd2hldGhlciB0aGUgVXJsIGlzIGZyb20gSHR0cHMu DQorDQorICBAcGFyYW1baW5dICAgIFVybCAgICAgICAgICAgICBUaGUgcG9pbnRlciB0byBhIEhU VFAgb3IgSFRUUFMgVVJMIHN0cmluZy4NCisNCisgIEByZXR2YWwgVFJVRSAgICAgICAgICAgICAg ICAgIFRoZSBVcmwgaXMgZnJvbSBIVFRQUy4NCisgIEByZXR2YWwgRkFMU0UgICAgICAgICAgICAg ICAgIFRoZSBVcmwgaXMgZnJvbSBIVFRQLg0KKw0KKyoqLw0KK0JPT0xFQU4NCitJc0h0dHBzVXJs ICgNCisgIElOIENIQVI4ICAgICpVcmwNCisgICk7DQorDQorLyoqDQorICBDcmVhdGVzIGEgVGxz IGNoaWxkIGhhbmRsZSwgb3BlbiBFRklfVExTX1BST1RPQ09MIGFuZCBFRklfVExTX0NPTkZJR1VS QVRJT05fUFJPVE9DT0wuDQorDQorICBAcGFyYW1baW5dICBJbWFnZUhhbmRsZSAgICAgICAgICAg VGhlIGZpcm13YXJlIGFsbG9jYXRlZCBoYW5kbGUgZm9yIHRoZSBVRUZJIGltYWdlLg0KKyAgQHBh cmFtW291dF0gVGxzUHJvdG8gICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIEVGSV9UTFNfUFJP VE9DT0wgaW5zdGFuY2UuDQorICBAcGFyYW1bb3V0XSBUbHNDb25maWd1cmF0aW9uICAgICAgUG9p bnRlciB0byB0aGUgRUZJX1RMU19DT05GSUdVUkFUSU9OX1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