From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 8E537822E2 for ; Wed, 21 Dec 2016 23:33:59 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 21 Dec 2016 23:33:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,387,1477983600"; d="scan'208";a="42393699" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 21 Dec 2016 23:33:58 -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.248.2; Wed, 21 Dec 2016 23:33:57 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Thu, 22 Dec 2016 15:33:55 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Zhang, Lubo" , "Long, Qin" , Thomas Palmer Thread-Topic: [Patch 07/10] NetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6 Thread-Index: AQHSVdyMv9OkcP5KJU21E34UmppyrqEThZvQ Date: Thu, 22 Dec 2016 07:33:55 +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: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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, 22 Dec 2016 07:33:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgSmlheGluLA0KDQpTb21lIGNvbW1lbnRzIGluY2x1ZGVkIGJlbG93Lg0KDQoxLiBJbiBUbHND b25maWdDZXJ0aWZpY2F0ZSwgSHR0cEluc3RhbmNlLT5UbHNDb25maWdEYXRhLkNBQ2VydCBpcyBu b3QgdXNlZCBhbmQgbG9jYWwgdmFyaWFibGUgIkNBQ2VydCIgaXMgbm90IGZyZWVkIGFmdGVyIGNh bGxpbmcgVGxzQ29uZmlndXJhdGlvbi0+U2V0RGF0YS4NCjIuIEluIFRsc0NvbmZpZ3VyZVNlc3Np b24sIHNldmVyYWwgZ290b3MgYXJlIHVzZWxlc3MuIFN1Z2dlc3QgdG8gcmVwbGFjZSB3aXRoIHJl dHVybiBzdGF0dXMgZGlyZWN0bHkuDQozLiAgVGhpcyB0d28gcGFydHMgd2lsbCBiZSA9PT4gVGhl c2UNCg0KT3RoZXJzIGFyZSBnb29kIHRvIG1lLg0KDQpSZXZpZXdlZC1ieTogWWUgVGluZyA8dGlu Zy55ZUBpbnRlbC5jb20+DQoNCkJlc3QgUmVnYXJkcywNClllIFRpbmcNCg0KDQoNCi0tLS0tT3Jp Z2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBXdSwgSmlheGluIA0KU2VudDogV2VkbmVzZGF5LCBE ZWNlbWJlciAxNCwgMjAxNiAzOjM0IFBNDQpUbzogZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCkNj OiBZZSwgVGluZyA8dGluZy55ZUBpbnRlbC5jb20+OyBGdSwgU2l5dWFuIDxzaXl1YW4uZnVAaW50 ZWwuY29tPjsgWmhhbmcsIEx1Ym8gPGx1Ym8uemhhbmdAaW50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RG5zNlNlcnZpY2VCaW5kaW5nUHJvdG9jb2xHdWlkICAgICAgICAgICAgICAgIyMgU09N RVRJTUVTX0NPTlNVTUVTDQogICBnRWZpRG5zNlByb3RvY29sR3VpZCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIyMgU09NRVRJTUVTX0NPTlNVTUVTDQogICBnRWZpSXA0Q29uZmlnMlByb3Rv Y29sR3VpZCAgICAgICAgICAgICAgICAgICAgICAgIyMgU09NRVRJTUVTX0NPTlNVTUVTDQogICBn RWZpSXA2Q29uZmlnUHJvdG9jb2xHdWlkICAgICAgICAgICAgICAgICAgICAgICAgIyMgU09NRVRJ TUVTX0NPTlNVTUVTDQorICBnRWZpVGxzU2VydmljZUJpbmRpbmdQcm90b2NvbEd1aWQgICAgICAg ICAgICAgICAgIyMgU09NRVRJTUVTX0NPTlNVTUVTDQorICBnRWZpVGxzUHJvdG9jb2xHdWlkICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIyMgU09NRVRJTUVTX0NPTlNVTUVTDQorICBnRWZp VGxzQ29uZmlndXJhdGlvblByb3RvY29sR3VpZCAgICAgICAgICAgICAgICAgIyMgU09NRVRJTUVT X0NPTlNVTUVTDQorDQorW0d1aWRzXQ0KKyAgZ0VmaVRsc0NhQ2VydGlmaWNhdGVHdWlkICAgICAg ICAgICAgICAgICAgICAgICAgICMjIENPTlNVTUVTICAjIyBHVUlEDQogDQogW1VzZXJFeHRlbnNp b25zLlRpYW5vQ29yZS4iRXh0cmFGaWxlcyJdDQogICBIdHRwRHhlRXh0cmEudW5pDQpcIE5vIG5l d2xpbmUgYXQgZW5kIG9mIGZpbGUNCmRpZmYgLS1naXQgYS9OZXR3b3JrUGtnL0h0dHBEeGUvSHR0 cEltcGwuYyBiL05ldHdvcmtQa2cvSHR0cER4ZS9IdHRwSW1wbC5jDQppbmRleCA2ZmNiMGI3Li43 N2FhNjRhIDEwMDY0NA0KLS0tIGEvTmV0d29ya1BrZy9IdHRwRHhlL0h0dHBJbXBsLmMNCisrKyBi L05ldHdvcmtQa2cvSHR0cER4ZS9IdHRwSW1wbC5jDQpAQCAtMjM5LDEwICsyMzksMTEgQEAgRWZp SHR0cFJlcXVlc3QgKA0KICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgSG9zdE5hbWVT aXplOw0KICAgVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgUmVtb3RlUG9ydDsNCiAgIEhU VFBfUFJPVE9DT0wgICAgICAgICAgICAgICAgICpIdHRwSW5zdGFuY2U7DQogICBCT09MRUFOICAg ICAgICAgICAgICAgICAgICAgICBDb25maWd1cmU7DQogICBCT09MRUFOICAgICAgICAgICAgICAg ICAgICAgICBSZUNvbmZpZ3VyZTsNCisgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgIFRs c0NvbmZpZ3VyZTsNCiAgIENIQVI4ICAgICAgICAgICAgICAgICAgICAgICAgICpSZXF1ZXN0TXNn Ow0KICAgQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAgKlVybDsNCiAgIFVJTlROICAgICAg ICAgICAgICAgICAgICAgICAgIFVybExlbjsNCiAgIENIQVIxNiAgICAgICAgICAgICAgICAgICAg ICAgICpIb3N0TmFtZVN0cjsNCiAgIEhUVFBfVE9LRU5fV1JBUCAgICAgICAgICAgICAgICpXcmFw Ow0KQEAgLTI1OCwxMCArMjU5LDExIEBAIEVmaUh0dHBSZXF1ZXN0ICgNCiAgIEhvc3ROYW1lID0g TlVMTDsNCiAgIFJlcXVlc3RNc2cgPSBOVUxMOw0KICAgSG9zdE5hbWVTdHIgPSBOVUxMOw0KICAg V3JhcCA9IE5VTEw7DQogICBGaWxlVXJsID0gTlVMTDsNCisgIFRsc0NvbmZpZ3VyZSA9IEZBTFNF Ow0KIA0KICAgaWYgKChUaGlzID09IE5VTEwpIHx8IChUb2tlbiA9PSBOVUxMKSkgew0KICAgICBy ZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KICAgfQ0KIA0KQE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gICAgICAgICAgICAgICAgJihIdHRwSW5zdGFuY2UtPlRsc0NvbmZpZ3VyYXRpb24pDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgICBpZiAoSHR0 cEluc3RhbmNlLT5UbHNDaGlsZEhhbmRsZSA9PSBOVUxMKSB7DQorICAgICAgICByZXR1cm4gRUZJ X0RFVklDRV9FUlJPUjsNCisgICAgICB9DQorDQorICAgICAgVGxzQ29uZmlndXJlID0gVFJVRTsN CisgICAgfQ0KKw0KICAgICBVcmxQYXJzZXIgPSBOVUxMOw0KICAgICBTdGF0dXMgPSBIdHRwUGFy c2VVcmwgKFVybCwgKFVJTlQzMikgQXNjaWlTdHJMZW4gKFVybCksIEZBTFNFLCAmVXJsUGFyc2Vy KTsNCiAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KICAgICAgIGdvdG8gRXJyb3IxOw0K ICAgICB9DQpAQCAtMzU3LDExICszODUsMTUgQEAgRWZpSHR0cFJlcXVlc3QgKA0KICAgICAgZ290 byBFcnJvcjE7DQogICAgIH0NCiANCiAgICAgU3RhdHVzID0gSHR0cFVybEdldFBvcnQgKFVybCwg VXJsUGFyc2VyLCAmUmVtb3RlUG9ydCk7DQogICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsN Ci0gICAgICBSZW1vdGVQb3J0ID0gSFRUUF9ERUZBVUxUX1BPUlQ7DQorICAgICAgaWYgKEh0dHBJ bnN0YW5jZS0+VXNlSHR0cHMpIHsNCisgICAgICAgIFJlbW90ZVBvcnQgPSBIVFRQU19ERUZBVUxU X1BPUlQ7DQorICAgICAgfSBlbHNlIHsNCisgICAgICAgIFJlbW90ZVBvcnQgPSBIVFRQX0RFRkFV TFRfUE9SVDsNCisgICAgICB9DQogICAgIH0NCiAgICAgLy8NCiAgICAgLy8gSWYgQ29uZmlndXJl IGlzIFRSVUUsIGl0IGluZGljYXRlcyB0aGUgZmlyc3QgdGltZSB0byBjYWxs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luc3RhbmNlLT5UY3A2VGxzUnhUb2tlbi5Db21wbGV0aW9uVG9rZW4pOw0K ICAgICB9DQogICB9DQotDQorICANCiAgIHJldHVybiBFRklfU1VDQ0VTUzsNCiB9DQogDQogDQog LyoqDQpAQCAtODgwLDEwICs5NDQsMTEgQEAgSHR0cFJlc3BvbnNlV29ya2VyICgNCiAgIEhUVFBf UFJPVE9DT0wgICAgICAgICAgICAgICAgICpIdHRwSW5zdGFuY2U7DQogICBFRklfSFRUUF9UT0tF TiAgICAgICAgICAgICAgICAqVG9rZW47DQogICBORVRfTUFQX0lURU0gICAgICAgICAgICAgICAg ICAqSXRlbTsNCiAgIEhUVFBfVE9LRU5fV1JBUCAgICAgICAgICAgICAgICpWYWx1ZUluSXRlbTsN CiAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgIEhkckxlbjsNCisgIE5FVF9GUkFHTUVO VCAgICAgICAgICAgICAgICAgIEZyYWdtZW50Ow0KIA0KICAgaWYgKFdyYXAgPT0gTlVMTCB8fCBX cmFwLT5IdHRwSW5zdGFuY2UgPT0gTlVMTCkgew0KICAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFS QU1FVEVSOw0KICAgfQ0KICAgDQpAQCAtODk3LDIxICs5NjIsMTUgQEAgSHR0cFJlc3BvbnNlV29y a2VyICgNCiAgIEh0dHBIZWFkZXJzICAgICAgICAgICAgICAgPSBOVUxMOw0KICAgU2l6ZW9mSGVh ZGVycyAgICAgICAgICAgICA9IDA7DQogICBCdWZmZXJTaXplICAgICAgICAgICAgICAgID0gMDsN CiAgIEVuZG9mSGVhZGVyICAgICAgICAgICAgICAgPSBOVUxMOw0KICAgVmFsdWVJbkl0ZW0gICAg ICAgICAgICAgICA9IE5VTEw7DQorICBGcmFnbWVudC5MZW4gICAgICAgICAgICAgID0gMDsNCisg IEZyYWdtZW50LkJ1bGsgICAgICAgICAgICAgPSBOVUxMOw0KICANCiAgIGlmIChIdHRwTXNnLT5E YXRhLlJlc3BvbnNlICE9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zID0gSHR0cFRjcFJlY2VpdmVCb2R5IChXcmFwLCBIdHRwTXNnKTsNCisN CisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIGdvdG8gRXJyb3IyOw0KKyAg ICB9DQorICAgIA0KKyAgfSBlbHNlIHsNCisgICAgaWYgKEh0dHBJbnN0YW5jZS0+VGltZW91dEV2 ZW50ID09IE5VTEwpIHsNCisgICAgICAvLw0KKyAgICAgIC8vIENyZWF0ZSBUaW1lb3V0RXZlbnQg Zm9yIHJlc3BvbnNlDQorICAgICAgLy8NCisgICAgICBTdGF0dXMgPSBnQlMtPkNyZWF0ZUV2ZW50 ICgNCisgICAgICAgICAgICAgICAgICAgICAgRVZUX1RJTUVSLA0KKyAgICAgICAgICAgICAgICAg ICAgICBUUExfQ0FMTEJBQ0ssDQorICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAg ICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgICZIdHRwSW5zdGFu Y2UtPlRpbWVvdXRFdmVudA0KKyAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICAgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICAgIGdvdG8gRXJyb3IyOw0KKyAgICAgIH0NCisg ICAgfQ0KKw0KKyAgICAvLw0KKyAgICAvLyBTdGFydCB0aGUgdGltZXIsIGFuZCB3YWl0IFRpbWVv dXQgc2Vjb25kcyB0byByZWNlaXZlIHRoZSBib2R5IHBhY2tldC4NCisgICAgLy8NCisgICAgU3Rh dHVzID0gZ0JTLT5TZXRUaW1lciAoSHR0cEluc3RhbmNlLT5UaW1lb3V0RXZlbnQsIFRpbWVyUmVs YXRpdmUsIEhUVFBfUkVTUE9OU0VfVElNRU9VVCAqIFRJQ0tTX1BFUl9TRUNPTkQpOw0KKyAgICBp ZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgZ290byBFcnJvcjI7DQorICAgIH0NCis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ICAgICAgICAgICBFVlRfVElNRVIsDQor ICAgICAgICAgICAgICAgICAgICAgIFRQTF9DQUxMQkFDSywNCisgICAgICAgICAgICAgICAgICAg ICAgTlVMTCwNCisgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAgICAg ICAgICAgJkh0dHBJbnN0YW5jZS0+VGltZW91dEV2ZW50DQorICAgICAgICAgICAgICAgICAgICAg ICk7DQorICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgVGxzQ2xvc2VU eFJ4RXZlbnQgKEh0dHBJbnN0YW5jZSk7DQorICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAg IH0NCisgICAgfQ0KKw0KKyAgICAvLw0KKyAgICAvLyBTdGFydCB0aGUgdGltZXIsIGFuZCB3YWl0 IFRpbWVvdXQgc2Vjb25kcyBmb3IgY29ubmVjdGlvbi4NCisgICAgLy8NCisgICAgU3RhdHVzID0g Z0JTLT5TZXRUaW1lciAoSHR0cEluc3RhbmNlLT5UaW1lb3V0RXZlbnQsIFRpbWVyUmVsYXRpdmUs IEhUVFBfQ09OTkVDVElPTl9USU1FT1VUICogVElDS1NfUEVSX1NFQ09ORCk7DQorICAgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBUbHNDbG9zZVR4UnhFdmVudCAoSHR0cEluc3Rh bmNlKTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorICAgIA0KKyAgICBTdGF0dXMg PSBUbHNDb25uZWN0U2Vzc2lvbiAoSHR0cEluc3RhbmNlLCBIdHRwSW5zdGFuY2UtPlRpbWVvdXRF dmVudCk7DQorDQorICAgIGdCUy0+U2V0VGltZXIgKEh0dHBJbnN0YW5jZS0+VGltZW91dEV2ZW50 LCBUaW1lckNhbmNlbCwgMCk7DQorICAgIA0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7 DQorICAgICAgVGxzQ2xvc2VUeFJ4R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9FUlJPUihTdGF0dXMpKXsNCisgICAgREVC VUcgKChFRklfRF9FUlJPUiwgIlRjcDYgQ29ubmVjdGlvbiBmYWlsIC0gJXhcbiIsIFN0YXR1cykp Ow0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKyAgDQorICAvLw0KKyAgLy8gVGxzIHNlc3Np b24gY29ubmVjdGlvbi4NCisgIC8vDQorICBpZiAoSHR0cEluc3RhbmNlLT5Vc2VIdHRwcykgew0K KyAgICBpZiAoSHR0cEluc3RhbmNlLT5UaW1lb3V0RXZlbnQgPT0gTlVMTCkgew0KKyAgICAgIC8v DQorICAgICAgLy8gQ3JlYXRlIFRpbWVvdXRFdmVudCBmb3IgVExTIGNvbm5lY3Rpb24uDQorICAg ICAgLy8NCisgICAgICBTdGF0dXMgPSBnQlMtPkNyZWF0ZUV2ZW50ICgNCisgICAgICAgICAgICAg ICAgICAgICAgRVZUX1RJTUVSLA0KKyAgICAgICAgICAgICAgICAgICAgICBUUExfQ0FMTEJBQ0ss DQorICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgIE5V TEwsDQorICAgICAgICAgICAgICAgICAgICAgICZIdHRwSW5zdGFuY2UtPlRpbWVvdXRFdmVudA0K KyAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCisgICAgICAgIFRsc0Nsb3NlVHhSeEV2ZW50IChIdHRwSW5zdGFuY2UpOw0KKyAgICAgICAg cmV0dXJuIFN0YXR1czsNCisgICAgICB9DQorICAgIH0NCisNCisgICAgLy8NCisgICAgLy8gU3Rh cnQgdGhlIHRpbWVyLCBhbmQgd2FpdCBUaW1lb3V0IHNlY29uZHMgZm9yIGNvbm5lY3Rpb24uDQor ICAgIC8vDQorICAgIFN0YXR1cyA9IGdCUy0+U2V0VGltZXIgKEh0dHBJbnN0YW5jZS0+VGltZW91 dEV2ZW50LCBUaW1lclJlbGF0aXZl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R4NlRva2VuOw0KICAgRUZJX1RDUDZfUFJPVE9D T0wgICAgICAgICAgICAgKlRjcDY7DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAq QnVmZmVyOyAgDQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJTaXplOw0K KyAgTkVUX0ZSQUdNRU5UICAgICAgICAgICAgICAgICAgVGVtcEZyYWdtZW50Ow0KKw0KKyAgU3Rh dHVzICAgICAgICAgICAgICAgID0gRUZJX1NVQ0NFU1M7DQorICBCdWZmZXIgICAgICAgICAgICAg ICAgPSBOVUxMOw0KKw0KKyAgLy8NCisgIC8vIE5lZWQgdG8gZW5jcnlwdCBkYXRhLg0KKyAgLy8N CisgIGlmIChIdHRwSW5zdGFuY2UtPlVzZUh0dHBzKSB7DQorICAgIC8vDQorICAgIC8vIEJ1aWxk IEJ1ZmZlck91dCBkYXRhDQorICAgIC8vDQorICAgIEJ1ZmZlclNpemUgPSBzaXplb2YgKFRMU19S RUNPUkRfSEVBREVSKSArIFR4U3RyaW5nTGVuOw0KKyAgICBCdWZmZXIgICAgID0gQWxsb2NhdGVa ZXJvUG9vbCAoQnVmZmVyU2l6ZSk7DQorICAgIGlmIChCdWZmZXIgPT0gTlVMTCkgew0KKyAgICAg IFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICAgIHJldHVybiBTdGF0dXM7DQor ICAgIH0NCisgICAgKChUTFNfUkVDT1JEX0hFQURFUiAqKSBCdWZmZXIpLT5Db250ZW50VHlwZSA9 IFRMU19DT05URU5UX1RZUEVfQVBQTElDQVRJT05fREFUQTsNCisgICAgKChUTFNfUkVDT1JEX0hF QURFUiAqKSBCdWZmZXIpLT5WZXJzaW9uLk1ham9yID0gSHR0cEluc3RhbmNlLT5UbHNDb25maWdE YXRhLlZlcnNpb24uTWFqb3I7DQorICAgICgoVExTX1JFQ09SRF9IRUFERVIgKikgQnVmZmVyKS0+ VmVyc2lvbi5N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cmFtW2luXSAgTWFwICAgICAgICAgICAgICAg IFRoZSBjb250YWluZXIgb2YgVHg0VG9rZW4gb3IgVHg2VG9rZW4uDQogICBAcGFyYW1baW5dICBJ dGVtICAgICAgICAgICAgICAgQ3VycmVudCBpdGVtIHRvIGNoZWNrIGFnYWluc3QuDQogICBAcGFy YW1baW5dICBDb250ZXh0ICAgICAgICAgICAgVGhlIFRva2VuIHRvIGNoZWNrIGFnYWluaXN0Lg0K IA0KQEAgLTE1ODgsMTY3ICsxNzY2LDIzNSBAQCBIdHRwVGNwUmVjZWl2ZUhlYWRlciAoDQogICBF RklfVENQNl9JT19UT0tFTiAgICAgICAgICAgICAqUng2VG9rZW47DQogICBFRklfVENQNl9QUk9U T0NPTCAgICAgICAgICAgICAqVGNwNjsNCiAgIENIQVI4ICAgICAgICAgICAgICAgICAgICAgICAg ICoqRW5kb2ZIZWFkZXI7DQogICBDSEFSOCAgICAgICAgICAgICAgICAgICAgICAgICAqKkh0dHBI ZWFkZXJzOw0KICAgQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAgKkJ1ZmZlcjsNCisgIE5F VF9GUkFHTUVOVCAgICAgICAgICAgICAgICAgIEZyYWdtZW50Ow0KIA0KICAgQVNTRVJUIChIdHRw SW5zdGFuY2UgIT0gTlVMTCk7DQogDQogICBFbmRvZkhlYWRlciA9IEh0dHBJbnN0YW5jZS0+RW5k b2ZIZWFkZXI7DQogICBIdHRwSGVhZGVycyA9IEh0dHBJbnN0YW5jZS0+SHR0cEhlYWRlcnM7DQog ICBUY3A0ID0gSHR0cEluc3RhbmNlLT5UY3A0Ow0KICAgVGNwNiA9IEh0dHBJbnN0YW5jZS0+VGNw NjsNCiAgIEJ1ZmZlciAgICAgID0gTlVMTDsNCiAgIFJ4NFRva2VuICAgID0gTlVMTDsNCiAgIFJ4 NlRva2VuICAgID0gTlVMTDsNCisgIEZyYWdtZW50LkxlbiAgPSAwOw0KKyAgRnJhZ21lbnQuQnVs ayA9IE5VTEw7DQogIC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isgICAgICAgICAgZ0JTLT5DbG9zZUV2ZW50IChSeDRUb2tlbi0+ Q29tcGxldGlvblRva2VuLkV2ZW50KTsNCisgICAgICAgICAgUng0VG9rZW4tPkNvbXBsZXRpb25U b2tlbi5TdGF0dXMgPSBFRklfVElNRU9VVDsNCisgICAgICAgIH0NCisNCisgICAgICAgIFN0YXR1 cyA9IFJ4NFRva2VuLT5Db21wbGV0aW9uVG9rZW4uU3RhdHVzOw0KKyAgICAgICAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgfQ0K KyAgICAgICAgDQorICAgICAgICBGcmFnbWVudC5MZW4gID0gUng0VG9rZW4tPlBhY2tldC5SeERh dGEtPkZyYWdtZW50VGFibGVbMF0uRnJhZ21lbnRMZW5ndGg7DQorICAgICAgICBGcmFnbWVudC5C dWxrID0gKFVJTlQ4ICopIFJ4NFRva2VuLT5QYWNrZXQuUnhEYXRhLT5GcmFnbWVudFRhYmxlWzBd LkZyYWdtZW50QnVmZmVyOw0KKyAgICAgIH0gZWxzZSB7DQorICAgICAgICBpZiAoRnJhZ21lbnQu QnVsayAhPSBOVUxMKSB7DQorICAgICAgICAgIEZyZWVQb29sIChGcmFnbWVudC5CdWxrKTsNCisg ICAgICAgICAgRnJhZ21lbnQuQnVsayA9IE5VTEw7DQorICAgICAgICB9DQorICAgICAgICANCisg ICAgICAgIFN0YXR1cyA9IEh0dHBzUmVjZWl2ZSAoSHR0cEluc3RhbmNlLCAmRnJhZ21lbnQsIFRp bWVvdXQpOw0KKyAgICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgICBE RUJVRyAoKEVGSV9EX0VSUk9SLCAiVGNwNCByZWNlaXZlIGZhaWxlZDogJXJcbiIsIFN0YXR1cykp Ow0KKyAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgfQ0KICAgICAgIH0NCiANCi0g ICA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orDQogICAgICAgaWYgKCpIdHRwSGVhZGVycyAh PSBOVUxMKSB7DQotICAgICAgICBDb3B5TWVtIChCdWZmZXIsICpIdHRwSGVhZGVycywgKCpTaXpl b2ZIZWFkZXJzKSk7DQorICAgICAgICBDb3B5TWVtIChCdWZmZXIsICpIdHRwSGVhZGVycywgKlNp emVvZkhlYWRlcnMpOw0KICAgICAgICAgRnJlZVBvb2wgKCpIdHRwSGVhZGVycyk7DQogICAgICAg fQ0KLSAgDQorDQogICAgICAgQ29weU1lbSAoDQotICAgICAgICBCdWZmZXIgKyAoKlNpemVvZkhl YWRlcnMpLA0KLSAgICAgICAgUng0VG9rZW4tPlBhY2tldC5SeERhdGEtPkZyYWdtZW50VGFibGVb MF0uRnJhZ21lbnRCdWZmZXIsDQotICAgICAgICBSeDRUb2tlbi0+UGFja2V0LlJ4RGF0YS0+RnJh Z21lbnRUYWJsZVswXS5GcmFnbWVudExlbmd0aA0KKyAgICAgICAgQnVmZmVyICsgKlNpemVvZkhl YWRlcnMsDQorICAgICAgICBGcmFnbWVudC5CdWxrLA0KKyAgICAgICAgRnJhZ21lbnQuTGVuDQog ICAgICAgICApOw0KLSAgICAgICpIdHRwSGVhZGVycyAgICA9IEJ1ZmZlcjsNCi0gICAgICAqU2l6 ZW9mSGVhZGVycyAgPSAqQnVmZmVyU2l6ZTsNCi0gIA0KKyAgICAgICpIdHRwSGVhZGVycyAgID0g QnVmZmVyOw0KKyAgICAgICpTaXplb2ZIZWFkZXJzID0gKkJ1ZmZlclNpemU7DQorDQogICAgICAg Ly8NCiAgICAgICAvLyBDaGVjayB3aGV0aGVyIHdlIHJlY2VpdmVkIGVuZCBvZiBIVFRQIGhlYWRl cnMuDQogICAgICAgLy8NCiAgICAgICAqRW5kb2ZIZWFkZXIgPSBBc2NpaVN0clN0ciAoKkh0dHBI ZWFkZXJzLCBIVFRQX0VORF9PRl9IRFJfU1RSKTsgDQotICAgIH0NCi0gICAgRnJlZVBvb2wgKFJ4 NFRva2VuLT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AgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgKkNBQ2Vy dDsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgIENBQ2VydFNpemU7DQorICBWT0lE ICAgICAgICAgICAgICAgICAgICAgICAgICAqQ2xpZW50Q2VydDsNCisgIFVJTlROICAgICAgICAg ICAgICAgICAgICAgICAgIENsaWVudENlcnRTaXplOw0KKyAgVk9JRCAgICAgICAgICAgICAgICAg ICAgICAgICAgKkNsaWVudFByaXZhdGVLZXk7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICBDbGllbnRQcml2YXRlS2V5U2l6ZTsNCit9IFRMU19DT05GSUdfREFUQTsNCisNCiB0eXBl ZGVmIHN0cnVjdCBfSFRUUF9QUk9UT0NPTCB7DQogICBVSU5UMzIgICAgICAgICAgICAgICAgICAg ICAgICBTaWduYXR1cmU7DQogICBFRklfSFRUUF9QUk9UT0NPTCAgICAgICAgICAgICBIdHRwOw0K ICAgRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAgSGFuZGxlOw0KICAgSFRUUF9TRVJWSUNF ICAgICAgICAgICAgICAgICAgKlNlcnZpY2U7DQpAQCAtMTUxLDEwICsxNjUsMzkgQEAgdHlwZWRl ZiBzdHJ1Y3QgX0hUVFBfUFJPVE9DT0wgew0KIA0KICAgTkVUX01BUCAgICAgICAgICAgICAgICAg ICAgICAgVHhUb2tlbnM7DQogICBORVRfTUFQICAgICAgICAgICAgICAgICAgICAgICBSeFRva2Vu czsNCiANCiAgIENIQVI4ICAgICAgICAgICAgICAgICAgICAgICAgICpVcmw7DQorDQorICAvLw0K KyAgLy8gSHR0cHMgU3VwcG9ydA0KKyAgLy8NCisgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAg ICAgICAgIFVzZUh0dHBzOw0KKyAgDQorICBFRklfSEFORExFICAgICAgICAgICAgICAgICAgICAg ICBUbHNDaGlsZEhhbmRsZTsgLy8vIFRscyBDaGlsZEhhbmRsZQ0KKyA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ICAgICBQb2ludGVy IHRvIHRoZSBFRklfVExTX0NPTkZJR1VSQVRJT05fUFJPVE9DT0wgaW5zdGFuY2UuDQorDQorICBA cmV0dXJuICBUaGUgY2hpbGQgaGFuZGxlIHdpdGggb3BlbmVkIEVGSV9UTFNfUFJPVE9DT0wgYW5k IEVGSV9UTFNfQ09ORklHVVJBVElPTl9QUk9UT0NPTC4NCisNCisqKi8NCitFRklfSEFORExFDQor RUZJQVBJDQorVGxzQ3JlYXRlQ2hpbGQgKA0KKyAgSU4gIEVGSV9IQU5ETEUgICAgICAgICAgICAg ICAgICAgICBJbWFnZUhhbmRsZSwNCisgIE9VVCBFRklfVExTX1BST1RPQ09MICAgICAgICAgICAg ICAgKipUbHNQcm90bywNCisgIE9VVCBFRklfVExTX0NPTkZJR1VSQVRJT05fUFJPVE9DT0wgKipU bHNDb25maWd1cmF0aW9uDQorICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAg ICAgU3RhdHVzOw0KKyAgRUZJX1NFUlZJQ0VfQklORElOR19QUk9UT0NPTCAgKlRsc1NiOw0KKyAg RUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAgVGxzQ2hpbGRIYW5kbGU7DQorDQorICBUbHNT YiAgICAgICAgICA9IE5VTEw7DQorICBUbHNDaGlsZEhhbmRsZSA9IDA7DQorDQorICAvLw0KKyAg Ly8gTG9jYXRlIFRsc1NlcnZpY2VCaW5kaW5nIHByb3RvY29sLg0KKyAgLy8NCisgIGdCUy0+TG9j YXRlUHJvdG9jb2wgKA0KKyAgICAgJmdFZmlUbHNTZXJ2aWNlQmluZGluZ1Byb3RvY29sR3VpZCwN CisgICAgIE5VTEwsDQorICAgICAoVk9JRCAqKikgJlRsc1NiDQorICAgICApOw0KKyAgaWYgKFRs c1NiID09IE5VTEwpIHsNCisgICAgcmV0dXJuIE5VTEw7DQorICB9DQorDQorICBTdGF0dXMgPSBU bHNTYi0+Q3JlYXRlQ2hpbGQgKFRsc1NiLCAmVGxzQ2hpbGRIYW5kbGUpOw0KKyAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KKyAgICByZXR1cm4gTlVMTDsNCisgIH0NCisNCisgIFN0YXR1cyA9 IGdCUy0+T3BlblByb3RvY29sICgNCisgICAgICAgICAgICAgICAgICBUbHNDaGlsZEhhbmRsZSwN CisgICAgICAgICAgICAgICAgICAmZ0VmaVRsc1Byb3RvY29sR3VpZCwNCisgICAgICAgICAgICAg ICAgICAoVk9JRCAqKikgVGxzUHJvdG8sDQorICAgICAgICAgICAgICAgICAgSW1hZ2VIYW5kbGUs DQorICAgICAgICAgICAgICAgICAgVGxzQ2hpbGRIYW5kbGUsDQorICAgICAgICAgICAgICAgICAg RUZJX09QRU5fUFJPVE9DT0xfR0VUX1BST1RPQ09MDQorICAgICAgICAgICAgICAgICAgKTsNCisg IGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgVGxzU2ItPkRlc3Ryb3lDaGlsZCAoVGxz U2IsIFRsc0NoaWxkSGFuZGxlKTsNCisgICAgcmV0dXJuIE5VTEw7DQorICB9DQorDQorICBTdGF0 dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgVGxzQ2hpbGRIYW5k bGUsDQorICAgICAgICAgICAgICAgICAgJmdFZmlUbHNDb25maWd1cmF0aW9uUHJvdG9jb2xHdWlk LA0KKyAgICAgICAgICAgICAgICAgIChWT0lEICoqKSBUbHNDb25maWd1cmF0aW9uLA0KKyAgICAg ICAgICAgICAgICAgIEltYWdlSGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgIFRsc0NoaWxkSGFu ZGxlLA0KKyAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0dFVF9QUk9UT0NPTA0K KyAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAg IFRsc1NiLT5EZXN0cm95Q2hpbGQgKFRsc1NiLCBU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oDQorICAgICAgICAgICAgICAgICAgICBFVlRfTk9USUZZX1NJ R05BTCwNCisgICAgICAgICAgICAgICAgICAgIFRQTF9OT1RJRlksDQorICAgICAgICAgICAgICAg ICAgICBIdHRwQ29tbW9uTm90aWZ5LA0KKyAgICAgICAgICAgICAgICAgICAgJkh0dHBJbnN0YW5j ZS0+VGxzSXNSeERvbmUsDQorICAgICAgICAgICAgICAgICAgICAmSHR0cEluc3RhbmNlLT5UY3A0 VGxzUnhUb2tlbi5Db21wbGV0aW9uVG9rZW4uRXZlbnQNCisgICAgICAgICAgICAgICAgICAgICk7 DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBnb3RvIEVSUk9SOw0KKyAg ICB9DQorDQorICAgIEh0dHBJbnN0YW5jZS0+VGNwNFRsc1J4RGF0YS5EYXRhTGVuZ3RoICAgICAg ICAgICAgICAgICAgICAgICA9IDA7DQorICAgIEh0dHBJbnN0YW5jZS0+VGNwNFRsc1J4RGF0YS5G cmFnbWVudENvdW50ICAgICAgICAgICAgICAgICAgICA9IDE7DQorICAgIEh0dHBJbnN0YW5jZS0+ VGNwNFRsc1J4RGF0YS5GcmFnbWVudFRhYmxlWzBdLkZyYWdtZW50TGVuZ3RoICA9IEh0dHBJbnN0 YW5jZS0+VGNwNFRsc1J4RGF0YS5EYXRhTGVuZ3RoIDsNCisgICAgSHR0cEluc3RhbmNlLT5UY3A0 VGxzUnhEYXRhLkZyYWdtZW50VGFibGVbMF0uRnJhZ21lbnRCdWZmZXIgID0gTlVMTDsNCisgICAg SHR0cEluc3RhbmNlLT5UY3A0VGxzUnhUb2tlbi5QYWNrZXQuUnhEYXRhICAgICAgICAgID0gJkh0 dHBJbnN0YW5jZS0+VGNwNFRsc1J4RGF0YTsNCisgICAgSHR0cEluc3RhbmNlLT5UY3A0VGxzUnhU b2tlbi5Db21wbGV0aW9uVG9rZW4uU3RhdHVzID0gRUZJX05PVF9SRUFEWTsNCisgIH0gZWxzZSB7 DQorICAgIC8vDQorICAgIC8vIEZvciBUY3A2VGxzVHhUb2tlbi4NCisgICAgLy8NCisgICAgU3Rh dHVzID0gZ0JTLT5DcmVhdGVFdmVudCAoDQorICAgICAgICAgICAgICAgICAgICBFVlRfTk9USUZZ X1NJR05BTCwNCisgICAgICAgICAgICAgICAgICAgIFRQTF9OT1RJRlksDQorICAgICAgICAgICAg ICAgICAgICBIdHRwQ29tbW9uTm90aWZ5LA0KKyAgICAgICAgICAgICAgICAgICAgJkh0dHBJbnN0 YW5jZS0+VGxzSXNUeERvbmUsDQorICAgICAgICAgICAgICAgICAgICAmSHR0cEluc3RhbmNlLT5U Y3A2VGxzVHhUb2tlbi5Db21wbGV0aW9uVG9rZW4uRXZlbnQNCisgICAgICAgICAgICAgICAgICAg ICk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBnb3RvIEVSUk9SOw0K KyAgICB9DQorDQorICAgIEh0dHBJbnN0YW5jZS0+VGNwNlRsc1R4RGF0YS5QdXNoID0gVFJVRTsN CisgICAgSHR0cEluc3RhbmNlLT5UY3A2VGxzVHhEYXRhLlVyZ2VudCA9IEZBTFNFOw0KKyAgICBI dHRwSW5zdGFuY2UtPlRjcDZUbHNUeERhdGEuRGF0YUxlbmd0aCA9IDA7DQorICAgIEh0dHBJbnN0 YW5jZS0+VGNwNlRsc1R4RGF0YS5GcmFnbWVudENvdW50ID0gMTsNCisgICAgSHR0cEluc3RhbmNl LT5UY3A2VGxzVHhEYXRhLkZyYWdtZW50VGFibGVbMF0uRnJhZ21lbnRMZW5ndGggPSBIdHRwSW5z dGFuY2UtPlRjcDZUbHNUeERhdGEuRGF0YUxlbmd0aDsNCisgICAgSHR0cEluc3RhbmNlLT5UY3A2 VGxzVHhEYXRhLkZyYWdtZW50VGFibGVbMF0uRnJhZ21lbnRCdWZmZXIgPSBOVUxMOw0KKyAgICBI dHRwSW5zdGFuY2UtPlRjcDZUbHNUeFRva2VuLlBhY2tldC5UeERhdGEgPSAmSHR0cEluc3RhbmNl LT5UY3A2VGxzVHhEYXRhOw0KKyAgICBIdHRwSW5zdGFuY2UtPlRjcDZUbHNUeFRva2VuLkNvbXBs ZXRpb25Ub2tlbi5TdGF0dXMgPSBFRklfTk9UX1JFQURZOw0KKw0KKyAgICAvLw0KKyAgICAvLyBG b3IgVGNwNlRsc1J4VG9rZW4uDQorICAgIC8vDQorICAgIFN0YXR1cyA9IGdCUy0+Q3JlYXRlRXZl bnQgKA0KKyAgICAgICAgICAgICAgICAgICAgRVZUX05PVElGWV9TSUdOQUwsDQorICAgICAgICAg ICAgICAgICAgICBUUExfTk9USUZZLA0KKyAgICAgICAgICAgICAgICAgICAgSHR0cENvbW1vbk5v dGlmeSwNCisgICAgICAgICAgICAgICAgICAgICZIdHRwSW5zdGFuY2UtPlRsc0lzUnhEb25lLA0K KyAgICAgICAgICAgICAgICAgICAgJkh0dHBJbnN0YW5jZS0+VGNwNlRsc1J4VG9rZW4uQ29tcGxl dGlvblRva2VuLkV2ZW50DQorICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoRUZJX0VS Uk9SIChTdGF0dXMpKSB7DQorICAgICAgZ290byBFUlJPUjsNCisgICAgfQ0KKw0KKyAgICBIdHRw SW5zdGFuY2UtPlRjcDZUbHNSeERhdGEuRGF0YUxlbmd0aCAgICAgICAgICAgICAgICAgICAgICAg PSAwOw0KKyAgICBIdHRwSW5zdGFuY2UtPlRjcDZUbHNSeERhdGEuRnJhZ21lbnRDb3VudCAgICAg ICAgICAgICAgICAgICAgPSAxOw0KKyAgICBIdHRwSW5zdGFuY2UtPlRjcDZUbHNSeERhdGEuRnJh Z21lbnRUYWJsZVswXS5GcmFnbWVudExlbmd0aCAgPSBIdHRwSW5zdGFuY2UtPlRjcDZUbHNSeERh dGEuRGF0YUxlbmd0aCA7DQorICAgIEh0dHBJbnN0YW5jZS0+VGNwNlRsc1J4RGF0YS5GcmFnbWVu dFRhYmxlWzBdLkZyYWdtZW50QnVmZmVyIC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NlcnRTaXplOw0KKw0KKyAgLy8NCisgIC8vIFRyeSB0byBy ZWFkIHRoZSBUbHNDYUNlcnRpZmljYXRlIHZhcmlhYmxlLg0KKyAgLy8NCisgIENBQ2VydFNpemUg PSAwOw0KKyAgU3RhdHVzICA9IGdSVC0+R2V0VmFyaWFibGUgKA0KKyAgICAgICAgICAgICAgICAg ICBFRklfVExTX0NBX0NFUlRJRklDQVRFX1ZBUklBQkxFLA0KKyAgICAgICAgICAgICAgICAgICAm Z0VmaVRsc0NhQ2VydGlmaWNhdGVHdWlkLA0KKyAgICAgICAgICAgICAgICAgICBOVUxMLA0KKyAg ICAgICAgICAgICAgICAgICAmQ0FDZXJ0U2l6ZSwNCisgICAgICAgICAgICAgICAgICAgTlVMTA0K KyAgICAgICAgICAgICAgICAgICApOw0KKw0KKyAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVSX1RP T19TTUFMTCkgew0KKyAgICAvLw0KKyAgICAvLyBBbGxvY2F0ZSBidWZmZXIgYW5kIHJlYWQgdGhl IGNvbmZpZyB2YXJpYWJsZS4NCisgICAgLy8NCisgICAgQ0FDZXJ0ID0gQWxsb2NhdGVQb29sIChD QUNlcnRTaXplKTsNCisgICAgaWYgKENBQ2VydCA9PSBOVUxMKSB7DQorICAgICAgcmV0dXJuIEVG SV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IGdSVC0+R2V0VmFy aWFibGUgKA0KKyAgICAgICAgICAgICAgICAgICAgRUZJX1RMU19DQV9DRVJUSUZJQ0FURV9WQVJJ QUJMRSwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpVGxzQ2FDZXJ0aWZpY2F0ZUd1aWQsDQor ICAgICAgICAgICAgICAgICAgICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAgJkNBQ2VydFNp emUsDQorICAgICAgICAgICAgICAgICAgICBDQUNlcnQNCisgICAgICAgICAgICAgICAgICAgICk7 DQorICAgIGlmIChFRklf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NBQ2VydGlmaWNhdGUNCisgICAgICAvLw0K KyAgICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzQ29uZmlndXJhdGlvbi0+U2V0RGF0YSAo DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJ bnN0YW5jZS0+VGxzQ29uZmlndXJhdGlvbiwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgRWZpVGxzQ29uZmlnRGF0YVR5cGVDQUNlcnRpZmljYXRlLA0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDZXJ0LT5T aWduYXR1cmVEYXRhLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBDZXJ0TGlzdC0+U2lnbmF0dXJlU2l6ZSAtIHNpemVvZiAoQ2VydC0+U2lnbmF0dXJl T3duZXIpDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICk7DQorICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgICAgcmV0dXJuIFN0 YXR1czsNCisgICAgICB9DQorDQorICAgICAgQ2VydCA9IChFRklfU0lHTkFUVVJFX0RBVEEgKikg KChVSU5UOCAqKSBDZXJ0ICsgQ2VydExpc3QtPlNpZ25hdHVyZVNpemUpOw0KKyAgICB9DQorDQor ICAgIEl0ZW1EYXRhU2l6ZSAtPSBDZXJ0TGlzdC0+U2lnbmF0dXJlTGlzdFNpemU7DQorICAgIENl cnRMaXN0ID0gKEVGSV9TSUdOQVRVUkVfTElTVCAqKSAoKFVJTlQ4ICopIENlcnRMaXN0ICsgQ2Vy dExpc3QtPlNpZ25hdHVyZUxpc3RTaXplKTsNCisgIH0NCisNCisgIHJldHVybiBTdGF0dXM7DQor fQ0KKw0KKy8qKg0KKyAgQ29uZmlndXJlIFRMUyBzZXN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ICAgICAgICAgICAgICAgICAgICAgICAgICAgRWZpVGxzQ29ubmVjdGlvbkVuZCwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYoSHR0cEluc3RhbmNlLT5UbHNDb25maWdEYXRh LkNvbm5lY3Rpb25FbmQpLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9m IChFRklfVExTX0NPTk5FQ1RJT05fRU5EKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgZ290byBFUlJPUjsNCisg IH0NCisNCisgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5TZXRTZXNzaW9uRGF0YSAoDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaVRsc1ZlcmlmeU1ldGhvZCwNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZIdHRwSW5zdGFuY2UtPlRsc0NvbmZpZ0RhdGEuVmVy aWZ5TWV0aG9kLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChFRklf VExTX1ZFUklGWSkNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICBpZiAo RUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIGdvdG8gRVJST1I7DQorICB9DQorDQorICBTdGF0 dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+U2V0U2Vzc2lvbkRhdGEgKA0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBFZmlUbHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmKEh0dHBJbnN0YW5jZS0+VGxz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RfREFUQSkgKw0KKyAgICAgICAgICAgKFBhY2tldC0+ QmxvY2tPcE51bSAtIDEpICogc2l6ZW9mIChFRklfVENQNF9GUkFHTUVOVF9EQVRBKTsNCisgIH0g ZWxzZSB7DQorICAgIFNpemUgPSBzaXplb2YgKEVGSV9UQ1A2X1RSQU5TTUlUX0RBVEEpICsNCisg ICAgICAgICAgIChQYWNrZXQtPkJsb2NrT3BOdW0gLSAxKSAqIHNpemVvZiAoRUZJX1RDUDZfRlJB R01FTlRfREFUQSk7DQorICB9DQorDQorICBEYXRhID0gQWxsb2NhdGVQb29sIChTaXplKTsNCisg IGlmIChEYXRhID09IE5VTEwpIHsNCisgICAgcmV0dXJuIEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0K KyAgfQ0KKw0KKyAgaWYgKCFIdHRwSW5zdGFuY2UtPkxvY2FsQWRkcmVzc0lzSVB2Nikgew0KKyAg ICAoKEVGSV9UQ1A0X1RSQU5TTUlUX0RBVEEgKikgRGF0YSktPlB1c2ggICAgICAgID0gVFJVRTsN CisgICAgKChFRklfVENQNF9UUkFOU01JVF9EQVRBICopIERhdGEpLT5VcmdlbnQgICAgICA9IEZB TFNFOw0KKyAgICAoKEVGSV9UQ1A0X1RSQU5TTUlUX0RBVEEgKikgRGF0YSktPkRhdGFMZW5ndGgg ID0gUGFja2V0LT5Ub3RhbFNpemU7DQorDQorICAgIC8vDQorICAgIC8vIEJ1aWxkIHRoZSBmcmFn bWVudCB0YWJsZS4NCisgICAgLy8NCisgICAgKChFRklfVENQNF9UUkFOU01JVF9EQVRBICopIERh dGEpLT5GcmFnbWVudENvdW50ID0gUGFja2V0LT5CbG9ja09wTnVtOw0KKw0KKyAgICBOZXRidWZC dWlsZEV4dCAoDQorICAgICAgUGFja2V0LA0KKyAgICAgIChORVRfRlJBR01FTlQgKikgJigoRUZJ X1RDUDRfVFJBTlNNSVRfREFUQSAqKSBEYXRhKS0+RnJhZ21lbnRUYWJsZVswXSwNCisgICAgICAm KChFRklf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BJbnN0YW5jZSwNCisgIElOICAgICBORVRfQlVGICAgICAg ICAgICAgKlBhY2tldCwNCisgIElOICAgICBFRklfRVZFTlQgICAgICAgICAgVGltZW91dA0KKyAg KQ0KK3sNCisgIEVGSV9UQ1A0X1JFQ0VJVkVfREFUQSAgICAgKlRjcDRSeERhdGE7DQorICBFRklf VENQNl9SRUNFSVZFX0RBVEEgICAgICpUY3A2UnhEYXRhOw0KKyAgRUZJX1NUQVRVUyAgICAgICAg ICAgICAgICBTdGF0dXM7DQorICBORVRfRlJBR01FTlQgICAgICAgICAgICAgICpGcmFnbWVudDsN CisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgRnJhZ21lbnRDb3VudDsNCisgIFVJTlQzMiAg ICAgICAgICAgICAgICAgICAgQ3VycmVudEZyYWdtZW50Ow0KKw0KKyAgVGNwNFJ4RGF0YSA9IE5V TEw7DQorICBUY3A2UnhEYXRhID0gTlVMTDsNCisNCisgIGlmICgoSHR0cEluc3RhbmNlID09IE5V TEwpIHx8IChQYWNrZXQgPT0gTlVMTCkpIHsNCisgICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFN RVRFUjsNCisgIH0NCisNCisgIEZyYWdtZW50Q291bnQgPSBQYWNrZXQtPkJsb2NrT3BOdW07DQor ICBGcmFnbWVudCAgICAgID0gQWxsb2NhdGVQb29sIChGcmFnbWVudENvdW50ICogc2l6ZW9mIChO RVRfRlJBR01FTlQpKTsNCisgIGlmIChGcmFnbWVudCA9PSBOVUxMKSB7DQorICAgIFN0YXR1cyA9 IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0KKyAgICBnb3RvIE9OX0VYSVQ7DQorICB9DQorDQorICAv Lw0KKyAgLy8gQnVpbGQgdGhlIGZyYWdtZW50IHRhYmxlLg0KKyAgLy8NCisgIE5ldGJ1ZkJ1aWxk RXh0IChQYWNrZXQsIEZyYWdtZW50LCAmRnJhZ21lbnRDb3VudCk7DQorDQorICBpZiAoIUh0dHBJ bnN0YW5j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qSHR0cEluc3RhbmNlLA0KKyAgICAgT1VUIE5FVF9CVUYgICAgICAgICAgICAqKlBk dSwNCisgIElOICAgICBFRklfRVZFTlQgICAgICAgICAgVGltZW91dA0KKyAgKQ0KK3sNCisgIEVG SV9TVEFUVVMgICAgICBTdGF0dXM7DQorDQorICBMSVNUX0VOVFJZICAgICAgKk5idWZMaXN0Ow0K Kw0KKyAgVUlOVDMyICAgICAgICAgIExlbjsNCisNCisgIE5FVF9CVUYgICAgICAgICAgICpQZHVI ZHI7DQorICBVSU5UOCAgICAgICAgICAgICAqSGVhZGVyOw0KKyAgVExTX1JFQ09SRF9IRUFERVIg UmVjb3JkSGVhZGVyOw0KKw0KKyAgTkVUX0JVRiAgICAgICAgICAgKkRhdGFTZWc7DQorDQorICBO YnVmTGlzdCA9IE5VTEw7DQorICBQZHVIZHIgICA9IE5VTEw7DQorICBIZWFkZXIgICA9IE5VTEw7 DQorICBEYXRhU2VnICA9IE5VTEw7DQorDQorICBOYnVmTGlzdCA9IEFsbG9jYXRlUG9vbCAoc2l6 ZW9mIChMSVNUX0VOVFJZKSk7DQorICBpZiAoTmJ1Zkxpc3QgPT0gTlVMTCkgew0KKyAgICByZXR1 cm4gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICB9DQorDQorICBJbml0aWFsaXplTGlzdEhlYWQg KE5idWZMaXN0KTsNCisNCisgIC8vDQorICAvLyBBbGxvY2F0ZSBidWZmZXIgdG8gcmVjZWl2ZSBv bmUgVExTIGhlYWRlci4NCisgIC8vDQorICBMZW4gICAgID0gc2l6ZW9mIChUTFNfUkVDT1JEX0hF QURFUik7DQorICBQZHVIZHIgID0gTmV0YnVmQWxsb2MgKExlbik7DQorICBpZiAoUGR1SGRyID09 IE5VTEwpIHsNCisgICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgIGdvdG8g T05fRVhJVDsNCisgIH0NCisNCisgIEhlYWRlciA9IE5ldGJ1ZkFsbG9jU3BhY2UgKF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QgICAgICAgICAgICBUTFMgc2Vzc2lvbiBzdGF0ZSBpcyBp bmNvcnJlY3QuDQorICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgICAgICAgT3RoZXIgZXJyb3Ig YXMgaW5kaWNhdGVkLg0KKw0KKyoqLw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitUbHNDb25uZWN0 U2Vzc2lvbiAoDQorICBJTiAgSFRUUF9QUk9UT0NPTCAgICAgICAgICAgICpIdHRwSW5zdGFuY2Us DQorICBJTiAgRUZJX0VWRU5UICAgICAgICAgICAgICAgIFRpbWVvdXQNCisgICkNCit7DQorICBF RklfU1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7DQorICBVSU5UOCAgICAgICAgICAgICAgICAg ICAqQnVmZmVyT3V0Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgQnVmZmVyT3V0U2l6ZTsN CisgIE5FVF9CVUYgICAgICAgICAgICAgICAgICpQYWNrZXRPdXQ7DQorICBVSU5UOCAgICAgICAg ICAgICAgICAgICAqRGF0YU91dDsNCisgIE5FVF9CVUYgICAgICAgICAgICAgICAgICpQZHU7DQor ICBVSU5UOCAgICAgICAgICAgICAgICAgICAqQnVmZmVySW47DQorICBVSU5UTiAgICAgICAgICAg ICAgICAgICBCdWZmZXJJblNpemU7DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAqR2V0U2Vz c2lvbkRhdGFCdWZmZXI7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICBHZXRTZXNzaW9uRGF0 YUJ1ZmZlclNpemU7DQorDQorICBCdWZmZXJPdXQgICAgPSBOVUxMOw0KKyAgUGFja2V0T3V0ICAg ID0gTlVMTDsNCisgIERhdGFPdXQgICAgICA9IE5VTEw7DQorICBQZHUgICAgICAgICAgPSBOVUxM Ow0KKyAgQnVmZmVySW4gICAgID0gTlVMTDsNCisNCisgIC8vDQorICAvLyBJbml0aWFsaXplIFRM UyBzdGF0ZS4NCisgIC8vDQorICBIdHRwSW5zdGFuY2UtPlRsc1Nlc3Npb25TdGF0ZSA9IEVmaVRs c1Nlc3Npb25Ob3RTdGFydGVkOw0KKyAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5UbHMtPlNldFNl c3Npb25EYXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJbnN0YW5j ZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWZpVGxzU2Vzc2lvblN0 YXRlLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihIdHRwSW5zdGFuY2UtPlRs c1Nlc3Npb25TdGF0ZSksDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2Yg KEVGSV9UTFNfU0VTU0lPTl9TVEFURSkNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQor ICB9DQorDQorICAvLw0KKyAgLy8gQ3JlYXRlIENsaWVudEhlbGxvDQorICAvLw0KKyAgQnVmZmVy T3V0U2l6ZSA9IERFRl9CVUZfTEVOOw0KKyAgQnVmZmVyT3V0ID0gQWxsb2NhdGVaZXJvUG9vbCAo QnVmZmVyT3V0U2l6ZSk7DQorICBpZiAoQnVmZmVyT3V0ID09IE5VTEwpIHsNCisgICAgU3RhdHVz ID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQor ICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+QnVpbGRSZXNwb25zZVBhY2tldCAoDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAwLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVmZmVyT3V0LA0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoU3RhdHVzID09IEVGSV9CVUZGRVJf VE9PX1NNQUxMKSB7DQorICAgIEZyZWVQb29sIChCdWZmZXJPdXQpOw0KKyAgICBCdWZmZXJPdXQg PSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJPdXRTaXplKTsNCisgICAgaWYgKEJ1ZmZlck91dCA9 PSBOVUxMKSB7DQorICAgICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgICAg cmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKw0KKyAgICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRs cy0+QnVpbGRSZXNwb25zZVBhY2tldCAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEh0dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBOVUxMLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZCdWZmZXJPdXRTaXplDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICk7DQorICB9DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIEZy ZWVQb29sIChCdWZmZXJPdXQpOw0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKw0KKyAgLy8N CisgIC8vIFRyYW5zbWl0IENsaWVudEhlbGxvDQorICAvLw0KKyAgUGFja2V0T3V0ID0gTmV0YnVm QWxsb2MgKChVSU5UMzIpIEJ1ZmZlck91dFNpemUpOw0KKyAgRGF0YU91dCA9IE5ldGJ1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AgIHJldHVybiBTdGF0dXM7DQorICAgIH0NCisNCisgICAgTmV0YnVmQ29weSAoUGR1LCAwLCAo VUlOVDMyKUJ1ZmZlckluU2l6ZSwgQnVmZmVySW4pOw0KKw0KKyAgICBOZXRidWZGcmVlIChQZHUp Ow0KKw0KKyAgICAvLw0KKyAgICAvLyBIYW5kbGUgUmVjZWl2ZSBkYXRhLg0KKyAgICAvLw0KKyAg ICBCdWZmZXJPdXRTaXplID0gREVGX0JVRl9MRU47DQorICAgIEJ1ZmZlck91dCA9IEFsbG9jYXRl WmVyb1Bvb2wgKEJ1ZmZlck91dFNpemUpOw0KKyAgICBpZiAoQnVmZmVyT3V0ID09IE5VTEwpIHsN CisgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgICByZXR1cm4gU3Rh dHVzOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJl c3BvbnNlUGFja2V0ICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0cElu c3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlcklu LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJJblNpemUsDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKTsNCisgICAgaWYgKFN0YXR1cyA9PSBFRklfQlVGRkVSX1RPT19TTUFM TCkgew0KKyAgICAgICBGcmVlUG9vbCAoQnVmZmVyT3V0KTsNCisgICAgICAgQnVmZmVyT3V0ID0g QWxsb2NhdGVaZXJvUG9vbCAoQnVmZmVyT3V0U2l6ZSk7DQorICAgICAgIGlmIChCdWZmZXJPdXQg PT0gTlVMTCkgew0KKyAgICAgICAgIEZyZWVQb29sIChCdWZmZXJJbik7DQorICAgICAgICAgU3Rh dHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgICAgICAgcmV0dXJuIFN0YXR1czsNCisg ICAgICAgfQ0KKw0KKyAgICAgICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+QnVpbGRSZXNw b25zZVBhY2tldCAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJ bnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZm ZXJJbiwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVmZmVySW5TaXpl LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZCdWZmZXJPdXRTaXplDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICAgIH0NCisNCisgICAgRnJlZVBv b2wgKEJ1ZmZlckluKTsNCisNCisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAg IHJldHVybiBTdGF0dXM7DQorICAgIH0NCisNCisgICAgaWYgKEJ1ZmZlck91dFNpemUgIT0gMCkg ew0KKyAgICAgIC8vDQorICAgICAgLy8gVHJhbnNtaXQgdGhlIHJlc3BvbnNlIHBhY2tldC4NCisg ICAgICAvLw0KKyAgICAgIFBhY2tldE91dCA9IE5ldGJ1ZkFsbG9jICgoVUlOVDMyKSBCdWZmZXJP dXRTaXplKTsNCisgICAgICBEYXRhT3V0ID0gTmV0YnVmQWxsb2NTcGFjZSAoUGFja2V0T3V0LCAo VUlOVDMyKSBCdWZmZXJPdXRTaXplLCBORVRfQlVGX1RBSUwpOw0KKyAgICAgIENvcHlNZW0gKERh dGFPdXQsIEJ1ZmZlck91dCw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AgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJkdldFNlc3Npb25EYXRhQnVmZmVyU2l6ZQ0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoU3RhdHVzID09IEVG SV9CVUZGRVJfVE9PX1NNQUxMKSB7DQorICAgICAgIEZyZWVQb29sIChHZXRTZXNzaW9uRGF0YUJ1 ZmZlcik7DQorICAgICAgIEdldFNlc3Npb25EYXRhQnVmZmVyID0gQWxsb2NhdGVaZXJvUG9vbCAo R2V0U2Vzc2lvbkRhdGFCdWZmZXJTaXplKTsNCisgICAgICAgaWYgKEdldFNlc3Npb25EYXRhQnVm ZmVyID09IE5VTEwpIHsNCisgICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsN CisgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICB9DQorDQorICAgICAgIFN0YXR1cyA9 IEh0dHBJbnN0YW5jZS0+VGxzLT5HZXRTZXNzaW9uRGF0YSAoDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEh0dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBFZmlUbHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIEdldFNlc3Npb25EYXRhQnVmZmVyLA0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmR2V0U2Vzc2lvbkRhdGFCdWZmZXJTaXplDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICAgIH0NCisgICAgaWYgKEVG SV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIEZyZWVQb29sKEdldFNlc3Npb25EYXRhQnVmZmVy KTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIEFTU0VSVChHZXRTZXNz aW9uRGF0YUJ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NhdGVkLg0KKw0KKyoqLw0KK0VGSV9TVEFUVVMNCitF RklBUEkNCitUbHNDbG9zZVNlc3Npb24gKA0KKyAgSU4gIEhUVFBfUFJPVE9DT0wgICAgICAgICAg ICAqSHR0cEluc3RhbmNlDQorICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgIFN0YXR1czsNCisN CisgIFVJTlQ4ICAgICAgICAgICAqQnVmZmVyT3V0Ow0KKyAgVUlOVE4gICAgICAgICAgIEJ1ZmZl ck91dFNpemU7DQorDQorICBORVRfQlVGICAgICAgICAgKlBhY2tldE91dDsNCisgIFVJTlQ4ICAg ICAgICAgICAqRGF0YU91dDsNCisNCisgIFN0YXR1cyAgICA9IEVGSV9TVUNDRVNTOw0KKyAgQnVm ZmVyT3V0ID0gTlVMTDsNCisgIFBhY2tldE91dCA9IE5VTEw7DQorICBEYXRhT3V0ICAgPSBOVUxM Ow0KKw0KKyAgaWYgKEh0dHBJbnN0YW5jZSA9PSBOVUxMKSB7DQorICAgIHJldHVybiBFRklfSU5W QUxJRF9QQVJBTUVURVI7DQorICB9DQorDQorICBIdHRwSW5zdGFuY2UtPlRsc1Nlc3Npb25TdGF0 ZSA9IEVmaVRsc1Nlc3Npb25DbG9zaW5nOw0KKw0KKyAgU3RhdHVzID0gSHR0cEluc3RhbmNlLT5U bHMtPlNldFNlc3Npb25EYXRhICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0 dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWZpVGxz U2Vzc2lvblN0YXRlLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihIdHRwSW5z dGFuY2UtPlRsc1Nlc3Npb25TdGF0ZSksDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzaXplb2YgKEVGSV9UTFNfU0VTU0lPTl9TVEFURSkNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBT dGF0dXM7DQorICB9DQorDQorICBCdWZmZXJPdXRTaXplID0gREVGX0JVRl9MRU47DQorICBCdWZm ZXJPdXQgPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJPdXRTaXplKTsNCisgIGlmIChCdWZmZXJP dXQgPT0gTlVMTCkgew0KKyAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAg cmV0dXJuIFN0YXR1czsNCisgIH0NCisNCisgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5C dWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0 dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmQnVmZmVyT3V0U2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisg IGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsNCisgICAgRnJlZVBvb2wgKEJ1 ZmZlck91dCk7DQorICAgIEJ1ZmZlck91dCA9IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZlck91dFNp emUpOw0KKyAgICBpZiAoQnVmZmVyT3V0ID09IE5VTEwpIHsNCisgICAgICBTdGF0dXMgPSBFRklf T1VUX09GX1JFU09VUkNFUzsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAg IFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZl ck91dCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgIH0NCisNCisgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgRnJlZVBvb2wgKEJ1ZmZlck91dCk7DQorICAgIHJl dHVybiBTdGF0dXM7DQorICB9DQorDQorICBQYWNrZXRPdXQgPSBOZXRidWZBbGxvYyAoKFVJTlQz MikgQnVmZmVyT3V0U2l6ZSk7DQorICBEYXRhT3V0ID0gTmV0YnVmQWxsb2NTcGFjZSAoUGFja2V0 T3V0LCAoVUlOVDMyKSBCdWZmZXJPdXRTaXplLCBORVRfQlVGX1RBSUwpOw0KKyAgQ29weU1lbSAo RGF0YU91dCwgQnVmZmVyT3V0LCBCdWZmZXJPdXRTaXplKTsNCisNCisgIFN0YXR1cyA9IFRsc0Nv bW1vblRyYW5zbWl0IChIdHRwSW5zdGFuY2UsIFBhY2tldE91dCk7DQorDQorICBGcmVlUG9vbCAo QnVmZmVyT3V0KTsNCisgIE5ldGJ1ZkZyZWUgKFBhY2tldE91dCk7DQorDQorICBpZiAoRUZJX0VS Uk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICByZXR1cm4g U3RhdHVzOw0KK30NCisNCisvKioNCisgIFByb2Nlc3Mgb25lIG1lc3NhZ2UgYWNjb3JkaW5nIHRv IHRoZSBDcnlwdE1vZGUuDQorDQorICBAcGFyYW1baW5dICAgICAgICAgICBIdHRwSW5zdGFuY2Ug ICAgUG9pbnRlciB0byBIVFRQX1BST1RPQ09MIHN0cnV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9kZSwNCisgIElOIE9VVCBORVRfRlJBR01FTlQgICAgICAgICAgICAgKkZyYWdtZW50DQor ICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBV SU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICpCdWZmZXI7DQorICBVSU5UMzIgICAgICAg ICAgICAgICAgICAgICAgICAgIEJ1ZmZlclNpemU7DQorICBVSU5UMzIgICAgICAgICAgICAgICAg ICAgICAgICAgIEJ5dGVzQ29waWVkOw0KKyAgRUZJX1RMU19GUkFHTUVOVF9EQVRBICAgICAgICAg ICAqRnJhZ21lbnRUYWJsZTsNCisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICAgRnJh Z21lbnRDb3VudDsNCisgIEVGSV9UTFNfRlJBR01FTlRfREFUQSAgICAgICAgICAgKk9yaWdpbmFs RnJhZ21lbnRUYWJsZTsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7 DQorDQorICBTdGF0dXMgICAgICAgICAgICAgICAgICAgPSBFRklfU1VDQ0VTUzsNCisgIEJ1ZmZl ciAgICAgICAgICAgICAgICAgICA9IE5VTEw7DQorICBCdWZmZXJTaXplICAgICAgICAgICAgICAg PSAwOw0KKyAgQnl0ZXNDb3BpZWQgICAgICAgICAgICAgID0gMDsNCisgIEZyYWdtZW50VGFibGUg ICAgICAgICAgICA9IE5VTEw7DQorICBPcmlnaW5hbEZyYWdtZW50VGFibGUgICAgPSBOVUxMOw0K Kw0KKyAgLy8NCisgIC8vIFJlYnVpbGQgZnJhZ21lbnQgdGFibGUgZnJvbSBCdWZmZXJJbi4NCisg IC8vDQorICBGcmFnbWVudENvdW50ID0gMTsNCisgIEZyYWdtZW50VGFibGUgPSBBbGxvY2F0ZVpl cm9Qb29sIChGcmFnbWVudENvdW50ICogc2l6ZW9mIChFRklfVExTX0ZSQUdNRU5UX0RBVEEpKTsN CisgIGlmIChGcmFnbWVudFRhYmxlID09IE5VTEwpIHsNCisgICAgU3RhdHVzID0gRUZJX09VVF9P Rl9SRVNPVVJDRVM7DQorICAgIGdvdG8gT05fRVhJVDsNCisgIH0NCisNCisgIEZyYWdtZW50VGFi bGUtPkZyYWdtZW50TGVuZ3RoID0gKFVJTlQzMikgTWVzc2FnZVNpemU7DQorICBGcmFnbWVudFRh YmxlLT5GcmFnbWVudEJ1ZmZlciA9IE1lc3NhZ2U7DQorDQorICAvLw0KKyAgLy8gUmVjb3JkIHRo ZSBvcmlnaW5hbCBGcmFnbWVudFRhYmxlLg0KKyAgLy8NCisgIE9yaWdpbmFsRnJhZ21lbnRUYWJs ZSA9IEZyYWdtZW50VGFibGU7DQorDQorICAvLw0KKyAgLy8gUHJvY2VzcyB0aGUgTWVzc2FnZS4N CisgIC8vDQorICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+UHJvY2Vzc1BhY2tldCAoDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZGcmFnbWVudFRhYmxlLA0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJkZyYWdtZW50Q291bnQsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBQcm9jZXNzTW9kZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgZ290byBPTl9FWElUOw0K KyAgfQ0KKw0KKyAgLy8NCisgIC8vIENhbGN1bGF0ZSB0aGUgc2l6ZSBhY2NvcmRpbmcgdG8gRnJh Z21lbnRUYWJsZS4NCisgIC8vDQorICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBGcmFnbWVudENv dW50OyBJbmRleCsrKSB7DQorICAgIEJ1ZmZlclNpemUgKz0gRnJhZ21lbnRUYWJsZVtJbmRleF0u RnJhZ21lbnRMZ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0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitIdHRwc1JlY2VpdmUgKA0KKyAgSU4gICAgIEhUVFBf UFJPVE9DT0wgICAgICAgICAqSHR0cEluc3RhbmNlLA0KKyAgSU4gT1VUIE5FVF9GUkFHTUVOVCAg ICAgICAgICAqRnJhZ21lbnQsDQorICBJTiAgICAgRUZJX0VWRU5UICAgICAgICAgICAgIFRpbWVv dXQNCisgICkNCit7DQorICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsN CisgIE5FVF9CVUYgICAgICAgICAgICAgICAgICAgICAgICAgKlBkdTsNCisgIFRMU19SRUNPUkRf SEVBREVSICAgICAgICAgICAgICAgUmVjb3JkSGVhZGVyOw0KKyAgVUlOVDggICAgICAgICAgICAg ICAgICAgICAgICAgICAqQnVmZmVySW47DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAg ICAgIEJ1ZmZlckluU2l6ZTsNCisgIE5FVF9GUkFHTUVOVCAgICAgICAgICAgICAgICAgICAgVGVt cEZyYWdtZW50Ow0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAqQnVmZmVyT3V0 Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJPdXRTaXplOw0KKyAg TkVUX0JVRiAgICAgICAgICAgICAgICAgICAgICAgICAqUGFja2V0T3V0Ow0KKyAgVUlOVDggICAg ICAgICAgICAgICAgICAgICAgICAgICAqRGF0YU91dDsNCisgIFVJTlQ4ICAgICAgICAgICAgICAg ICAgICAgICAgICAgKkdldFNlc3Npb25EYXRhQnVmZmVyOw0KKyAgVUlOVE4gICAgICAgICAgICAg ICAgICAgICAgICAgICBHZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemU7DQorDQorICBTdGF0dXMgICAg ICAgICAgICAgICAgICAgPSBFRklfU1VDQ0VTUzsNCisgIFBkdSAgICAgICAgICAgICAgICAgICAg ICA9IE5VTEw7DQorICBCdWZmZXJJbi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jsNCisN CisgIGlmICgoUmVjb3JkSGVhZGVyLkNvbnRlbnRUeXBlID09IFRMU19DT05URU5UX1RZUEVfQVBQ TElDQVRJT05fREFUQSkgJiYNCisgICAgKFJlY29yZEhlYWRlci5WZXJzaW9uLk1ham9yID09IDB4 MDMpICYmDQorICAgIChSZWNvcmRIZWFkZXIuVmVyc2lvbi5NaW5vciA9PSBUTFMxMF9QUk9UT0NP TF9WRVJTSU9OX01JTk9SIHx8DQorICAgIFJlY29yZEhlYWRlci5WZXJzaW9uLk1pbm9yID09IFRM UzExX1BST1RPQ09MX1ZFUlNJT05fTUlOT1IgfHwNCisgICAgUmVjb3JkSGVhZGVyLlZlcnNpb24u TWlub3IgPT0gVExTMTJfUFJPVE9DT0xfVkVSU0lPTl9NSU5PUikNCisgICkgew0KKyAgICAvLw0K KyAgICAvLyBEZWNyeXB0IFBhY2tldC4NCisgICAgLy8NCisgICAgU3RhdHVzID0gVGxzUHJvY2Vz c01lc3NhZ2UgKA0KKyAgICAgICAgICAgICAgIEh0dHBJbnN0YW5jZSwNCisgICAgICAgICAgICAg ICBCdWZmZXJJbiwNCisgICAgICAgICAgICAgICBCdWZmZXJJblNpemUsDQorICAgICAgICAgICAg ICAgRWZpVGxzRGVjcnlwdCwNCisgICAgICAgICAgICAgICAmVGVtcEZyYWdtZW50DQorICAgICAg ICAgICAgICAgKTsNCisNCisgICAgRnJlZVBvb2wgKEJ1ZmZlckluKTsNCisNCisgICAgaWYgKEVG SV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIGlmIChTdGF0dXMgPT0gRUZJX0FCT1JURUQpIHsN CisgICAgICAgIC8vDQorICAgICAgICAvLyBTb21ldGhpbmcgd3JvbmcgZGVjcnlwdGlvbiB0aGUg bWVzc2FnZS4NCisgICAgICAgIC8vIEJ1aWxkUmVzcG9uc2VQYWNrZXQoKSB3aWxsIGJlIGNhbGxl ZCB0byBnZW5lcmF0ZSBFcnJvciBBbGVydCBtZXNzYWdlIGFuZCBzZW5kIGl0IG91dC4NCisgICAg ICAgIC8vDQorICAgICAgICBCdWZmZXJPdXRTaXplID0gREVGX0JVRl9MRU47DQorICAgICAgICBC dWZmZXJPdXQgPSBBbGxvY2F0ZVplcm9Qb29sIChCdWZmZXJPdXRTaXplKTsNCisgICAgICAgIGlm IChCdWZmZXJPdXQgPT0gTlVMTCkgew0KKyAgICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JF U09VUkNFUzsNCisgICAgICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgICAgIH0NCisNCisgICAg ICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJbnN0YW5jZS0+VGxzLA0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmQnVmZmVyT3V0U2l6ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKTsNCisgICAgICAgIGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsN CisgICAgICAgICAgRnJlZVBvb2wgKEJ1ZmZlck91dCk7DQorICAgICAgICAgIEJ1ZmZlck91dCA9 IEFsbG9jYXRlWmVyb1Bvb2wgKEJ1ZmZlck91dFNpemUpOw0KKyAgICAgICAgICBpZiAoQnVmZmVy T3V0ID09IE5VTEwpIHsNCisgICAgICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNF UzsNCisgICAgICAgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICAgICAgICB9DQorDQorICAgICAg ICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMs DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIEJ1ZmZlck91dCwNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJkJ1ZmZlck91dFNpemUNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKTsNCisgICAgICAgIH0NCisgICAgICAgIGlmIChFRklfRVJST1Ig KFN0YXR1cykpIHsNCisgICAgICAgICAgRnJlZVBvb2woQnVmZmVyT3V0KTsNCisgICAgICAgICAg cmV0dXJuIFN0YXR1czsNCisgICAgICAgIH0NCisNCisgICAgICAgIGlmIChCdWZmZXJPdXRTaXpl ICE9IDApIHsNCisgICAgICAgICAgUGFja2V0T3V0ID0gTmV0YnVmQWxsb2MgKChVSU5UMzIpQnVm ZmVyT3V0U2l6ZSk7DQorICAgICAgICAgIERhdGFPdXQgPSBOZXRidWZBbGxvY1NwYWNlIChQYWNr ZXRPdXQsIChVSU5UMzIpIEJ1ZmZlck91dFNpemUsIE5FVF9CVUZfVEFJTCk7DQorICAgICAgICAg IENvcHlNZW0gKERhdGFPdXQsIEJ1ZmZlck91dCwgQnVmZmVyT3V0U2l6ZSk7DQorDQorICAgICAg ICAgIFN0YXR1cyA9IFRsc0NvbW1vblRyYW5zbWl0IChIdHRwSW5zdGFuY2UsIFBhY2tldE91dCk7 DQorDQorICAgICAgICAgIE5ldGJ1ZkZyZWUgKFBhY2tldE91dCk7DQorICAgICAgICB9DQorDQor ICAgICAgICBGcmVlUG9vbChCdWZmZXJPdXQpOw0KKw0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ham9yID09IDB4MDMpICYmDQorICAgIChSZWNvcmRIZWFkZXIuVmVyc2lvbi5NaW5vciA9 PSBUTFMxMF9QUk9UT0NPTF9WRVJTSU9OX01JTk9SIHx8DQorICAgIFJlY29yZEhlYWRlci5WZXJz aW9uLk1pbm9yID09IFRMUzExX1BST1RPQ09MX1ZFUlNJT05fTUlOT1IgfHwNCisgICAgUmVjb3Jk SGVhZGVyLlZlcnNpb24uTWlub3IgPT0gVExTMTJfUFJPVE9DT0xfVkVSU0lPTl9NSU5PUikNCisg ICAgKSB7DQorICAgIEJ1ZmZlck91dFNpemUgPSBERUZfQlVGX0xFTjsNCisgICAgQnVmZmVyT3V0 ID0gQWxsb2NhdGVaZXJvUG9vbCAoQnVmZmVyT3V0U2l6ZSk7DQorICAgIGlmIChCdWZmZXJPdXQg PT0gTlVMTCkgew0KKyAgICAgIEZyZWVQb29sIChCdWZmZXJJbik7DQorICAgICAgU3RhdHVzID0g RUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKw0K KyAgICBTdGF0dXMgPSBIdHRwSW5zdGFuY2UtPlRscy0+QnVpbGRSZXNwb25zZVBhY2tldCAoDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJbnN0YW5jZS0+VGxzLA0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJJbiwNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgQnVmZmVySW5TaXplLA0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCdWZmZXJPdXQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICZCdWZmZXJPdXRTaXplDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7 DQorICAgIGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsNCisgICAgICBGcmVl UG9vbCAoQnVmZmVyT3V0KTsNCisgICAgICBCdWZmZXJPdXQgPSBBbGxvY2F0ZVplcm9Qb29sIChC dWZmZXJPdXRTaXplKTsNCisgICAgICBpZiAoQnVmZmVyT3V0ID09IE5VTEwpIHsNCisgICAgICAg IEZyZWVQb29sIChCdWZmZXJJbik7DQorICAgICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09V UkNFUzsNCisgICAgICAgIHJldHVybiBTdGF0dXM7DQorICAgICAgfQ0KKw0KKyAgICAgIFN0YXR1 cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5CdWlsZFJlc3BvbnNlUGFja2V0ICgNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwSW5zdGFuY2UtPlRscywNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBCdWZmZXJJbiwNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBCdWZmZXJJblNpemUsDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgQnVmZmVyT3V0LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICZCdWZmZXJPdXRTaXplDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KTsNCisgICAgfQ0KKw0KKyAgICBGcmVlUG9vbCAoQnVmZmVySW4pOw0KKw0KKyAgICBpZiAoRUZJ X0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgRnJlZVBvb2wgKEJ1ZmZlck91dCk7DQorICAgICAg cmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKw0KKyAgICBpZiAoQnVmZmVyT3V0U2l6ZSAhPSAwKSB7 DQorICAgICAgUGFja2V0T3V0ID0gTmV0YnVmQWxsb2MgKChVSU5UMzIpIEJ1ZmZlck91dFNpemUp Ow0KKyAgICAgIERhdGFPdXQgPSBOZXRidWZBbGxvY1NwYWNlIChQYWNrZXRPdXQsIChVSU5UMzIp IEJ1ZmZlck91dFNpemUsIE5FVF9CVUZfVEFJTCk7DQorICAgICAgQ29weU1lbSAoRGF0YU91dCwg QnVmZmVyT3V0LCBCdWZmZXJPdXRTaXplKTsNCisNCisgICAgICBTdGF0dXMgPSBUbHNDb21tb25U cmFuc21pdCAoSHR0cEluc3RhbmNlLCBQYWNrZXRPdXQpOw0KKw0KKyAgICAgIE5ldGJ1ZkZyZWUg KFBhY2tldE91dCk7DQorICAgIH0NCisNCisgICAgRnJlZVBvb2wgKEJ1ZmZlck91dCk7DQorDQor ICAgIC8vDQorICAgIC8vIEdldCB0aGUgc2Vzc2lvbiBzdGF0ZS4NCisgICAgLy8NCisgICAgR2V0 U2Vzc2lvbkRhdGFCdWZmZXJTaXplID0gREVGX0JVRl9MRU47DQorICAgIEdldFNlc3Npb25EYXRh QnVmZmVyID0gQWxsb2NhdGVaZXJvUG9vbCAoR2V0U2Vzc2lvbkRhdGFCdWZmZXJTaXplKTsNCisg ICAgaWYgKEdldFNlc3Npb25EYXRhQnVmZmVyID09IE5VTEwpIHsNCisgICAgICBTdGF0dXMgPSBF RklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQor ICAgIFN0YXR1cyA9IEh0dHBJbnN0YW5jZS0+VGxzLT5HZXRTZXNzaW9uRGF0YSAoDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh0dHBJbnN0YW5jZS0+VGxzLA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBFZmlUbHNTZXNzaW9uU3RhdGUsDQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIEdldFNlc3Npb25EYXRhQnVmZmVyLA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmR2V0U2Vzc2lvbkRhdGFCdWZmZXJTaXplDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICAgIGlmIChTdGF0dXMgPT0gRUZJ X0JVRkZFUl9UT09fU01BTEwpIHsNCisgICAgICAgRnJlZVBvb2wgKEdldFNlc3Npb25EYXRhQnVm ZmVyKTsNCisgICAgICAgR2V0U2Vzc2lvbkRhdGFCdWZmZXIgPSBBbGxvY2F0ZVplcm9Qb29sIChH ZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemUpOw0KKyAgICAgICBpZiAoR2V0U2Vzc2lvbkRhdGFCdWZm ZXIgPT0gTlVMTCkgew0KKyAgICAgICAgIFN0YXR1cyA9IEVGSV9PVVRfT0ZfUkVTT1VSQ0VTOw0K KyAgICAgICAgIHJldHVybiBTdGF0dXM7DQorICAgICAgIH0NCisNCisgICAgICAgU3RhdHVzID0g SHR0cEluc3RhbmNlLT5UbHMtPkdldFNlc3Npb25EYXRhICgNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgSHR0cEluc3RhbmNlLT5UbHMsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEVmaVRsc1Nlc3Npb25TdGF0ZSwNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgR2V0U2Vzc2lvbkRhdGFCdWZmZXIsDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZHZXRTZXNzaW9uRGF0YUJ1ZmZlclNpemUNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgfQ0KKyAgICBpZiAoRUZJ X0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgRnJlZVBvb2wgKEdldFNlc3Npb25EYXRhQnVmZmVy KTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIEFTU0VSVChHZXRTZXNz aW9uRGF0YUJ1ZmZlclNpemUgPT0gc2l6ZW9mIChFRklfVExTX1NFU1NJT05fU1RBVEUpKTsNCisg ICAgSHR0cEluc3RhbmNlLT5UbHNTZXNzaW9uU3RhdGUgPSAqKEVGSV9UTFNfU0VTU0lPTl9TVEFU RSAqKSBHZXRTZ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ENhbid0IGFsbG9jYXRlIG1lbW9yeSByZXNvdXJjZXMuDQorICBAcmV0dmFs IEVGSV9OT1RfRk9VTkQgICAgICAgICAgRmFpbCB0byBnZXQgIlRsc0NhQ2VydGlmaWNhdGUiIHZh cmlhYmxlLg0KKyAgQHJldHZhbCBPdGhlcnMgICAgICAgICAgICAgICAgIE90aGVyIGVycm9yIGFz IGluZGljYXRlZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorVGxzQ29uZmlnQ2VydGlmaWNhdGUg KA0KKyAgSU4gT1VUIEhUVFBfUFJPVE9DT0wgICAgICAqSHR0cEluc3RhbmNlDQorICApOw0KKw0K Ky8qKg0KKyAgQ29uZmlndXJlIFRMUyBzZXNzaW9uIGRhdGEuDQorDQorICBAcGFyYW1baW4sIG91 dF0gIEh0dHBJbnN0YW5jZSAgICAgICBUaGUgSFRUUCBpbnN0YW5jZSBwcml2YXRlIGRhdGEuDQor DQorICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgVExTIHNlc3Npb24gZGF0YSBpcyBj b25maWd1cmVkLg0KKyAgQHJldHZhbCBPdGhlcnMgICAgICAgICAgICAgICAgIE90aGVyIGVycm9y IGFzIGluZGljYXRlZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorVGxzQ29uZmln dXJlU2Vzc2lvbiAoDQorICBJTiBPVVQgSFRUUF9QUk9UT0NPTCAgICAgICpIdHRwSW5zdGFuY2UN CisgICk7DQorDQorLyoqDQorICBUcmFuc21pdCB0aGUgUGFja2V0IGJ5IHByb2Nlc3NpbmcgdGhl IGFzc29jaWF0ZWQgSFRUUFMgdG9rZW4uDQorDQorICBAcGFyYW1baW4sIG91dF0gICBIdHRwSW5z dGFuY2UgICAgUG9pbnRlciB0byBIVFRQX1BST1RPQ09MIHN0cnVjdHVyZS4NCisgIEBwYXJhbVtp bl0gICAgICAgIFBhY2tldCAgICAgICAgICBUaGUgcGFja2V0IHRvIHRyYW5zbWl0Lg0KK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LA0KKyAgSU4gICAgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAqTWVzc2Fn ZSwNCisgIElOICAgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZVNpemUsDQorICBJ TiAgICAgRUZJX1RMU19DUllQVF9NT0RFICAgICAgIFByb2Nlc3NNb2RlLA0KKyAgSU4gT1VUIE5F VF9GUkFHTUVOVCAgICAgICAgICAgICAqRnJhZ21lbnQNCisgICk7DQorDQorLyoqDQorICBSZWNl aXZlIG9uZSBmcmFnbWVudCBkZWNyeXB0ZWQgZnJvbSBvbmUgVExTIHJlY29yZC4NCisNCisgIEBw YXJhbVtpbl0gICAgICAgICAgIEh0dHBJbnN0YW5jZSAgICBQb2ludGVyIHRvIEhUVFBfUFJPVE9D T0wgc3RydWN0dXJlLg0KKyAgQHBhcmFtW2luLCBvdXRdICAgICAgRnJhZ21lbnQgICAgICAgIFRo ZSByZWNlaXZlZCBGcmFnbWVudC4NCisgIEBwYXJhbVtpbl0gICAgICAgICAgIFRpbWVvdXQgICAg ICAgICBUaGUgdGltZSB0byB3YWl0IGZvciBjb25uZWN0aW9uIGRvbmUuDQorDQorICBAcmV0dmFs IEVGSV9TVUNDRVNTICAgICAgICAgIE9uZSBmcmFnbWVudCBpcyByZWNlaXZlZC4NCisgIEByZXR2 YWwgRUZJX09VVF9PRl9SRVNPVVJDRVMgQ2FuJ3QgYWxsb2NhdGUgbWVtb3J5IHJlc291cmNlcy4N CisgIEByZXR2YWwgRUZJX0FCT1JURUQgICAgICAgICAgU29tZXRoaW5nIHdyb25nIGRlY3J5cHRp b24gdGhlIG1lc3NhZ2UuDQorICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgICAgIE90aGVyIGVy cm9ycyBhcyBpbmRpY2F0ZWQuDQorDQorKiovDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK0h0dHBz UmVjZWl2ZSAoDQorICBJTiAgICAgSFRUUF9QUk9UT0NPTCAgICAgICAgICpIdHRwSW5zdGFuY2Us DQorICBJTiBPVVQgTkVUX0ZSQUdNRU5UICAgICAgICAgICpGcmFnbWVudCwNCisgIElOICAgICBF RklfRVZFTlQgICAgICAgICAgICAgVGltZW91dA0KKyAgKTsNCisNCisjZW5kaWYNCi0tIA0KMS45 LjUubXN5c2dpdC4xDQoNCg==