From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.81]) by mx.groups.io with SMTP id smtpd.web10.23620.1681618143673652341 for ; Sat, 15 Apr 2023 21:09:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=xaua7ibw; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.81, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FTLkOKZOs1PJW1osLrZBBWq8HzhMjvKIzo+Cg/DNjhztLoBDryYC/ilqiGWVFKL7re9dqr2Fv2YxpWJ4Q+1wh50mywCrwvq2LlS/S495ULXNBw3b0Nmq5PGyab06B+iV+2L2wWebpyxVBanZmAFqH1zxt2PSgXmDhCK1U+JPp1LMX2ZTeV5JDoS0Era77mi+mIKUPzeU4tuqH8AypoRi6MLMegnqNSL2cZpnqWGwfXh3KFRpUIxYzlwLRsIFzOeEbQ/RbiyNuhJCgkuB2h5ltd800XOnmq7RbrACmfiYmUiXE1zzOxOJa29dlKT5Oi7BqYaFquEqFEdW0d7Z3hPLHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8daKJqiyZS3AeU6rODCng2bdBEuSnJZqYi1pw1Pxy8s=; b=B4zA2fvD+7bXMJZONLwWuAZKowjmU0+VpvYCYV3jHvPJX3GhLnG6bWLGz3C7FCUqGog6CEczeuOO7SHWUAt5cpS15bQjAdho6imwnfvxRfzXBGFWKnMFnwmr6GArXYbnPjkQVYERXH97ojYsmkTo/XwEQP58vhgL43xiithc732InG32NN2prH3FXpXoRNyiZzUp5Pl16auReAqDFmLIFNU5UMLPJVELiCOlFxk6dVYFKrot70WKBtT0NcroY3KyqlkCutuvKUnG/ERHGmKgEa+KFzeIn2RxxI++JVIQBklodzG+QVOLbLTlNoUT6aUE8iZ26v4HE3cyyA8iEfBPmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8daKJqiyZS3AeU6rODCng2bdBEuSnJZqYi1pw1Pxy8s=; b=xaua7ibwQNd1T5Qm5TnmDggK7URV69efg7/53kI3M4qn6lm9mW78l34aiDrOuadpyhgotn7kb3t7uBblP3k5dGUNghrb+qO+Zgt3CZtf0n9deFkbVPUolUSbiN3beEtlijH8Hr+yl7aIoRRBghQ0vjGKbbqxYaBcZZsjacBQICw= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SN7PR12MB7786.namprd12.prod.outlook.com (2603:10b6:806:349::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Sun, 16 Apr 2023 04:08:58 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::30f:bd83:40dd:8f1]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::30f:bd83:40dd:8f1%3]) with mapi id 15.20.6298.030; Sun, 16 Apr 2023 04:08:57 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: Igor Kulchytskyy , Nick Ramirez Subject: Re: [PATCH 3/5] RedfishPkg: Implementation of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL Thread-Topic: [PATCH 3/5] RedfishPkg: Implementation of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL Thread-Index: AQHZbdAqiNbQPKPc6EK6N9LfSO4RHa8tTeyw Date: Sun, 16 Apr 2023 04:08:57 +0000 Message-ID: References: <20230413062052.1700-1-nicklew@nvidia.com> In-Reply-To: <20230413062052.1700-1-nicklew@nvidia.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-04-16T04:08:53Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=20849906-9a4e-4ba7-a8aa-2688cc0d85b5; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|SN7PR12MB7786:EE_ x-ms-office365-filtering-correlation-id: 5550dad0-15d6-4f36-619e-08db3e304d16 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l0fCzIMCsGTOLQVTPRpnKR7y+T5U4Wu1+Kwh4vT/TbDMR7b/F2DNWi85Cb3JunIqLIMJDq4g989xaPzD0jSYdybM7o3xPP3XgPat8KwKHhx+RK9jQqZ8kM0/g9srEIbaK5F98Jo/PEiPywmE3ZMykCkKegwfO079cqwPqLS3tzUtxGp6xMQHxkeoAiOc6DiQ2FJpzmOyzSRe2yGAIbcWqWjEVfZzKu49eBGuAy7OC3UfOae4rzGMSBdyLKedTiqdpXQA4dAFXzgLvDMBpnjifETR/B0A+K4YB2OqkGLiOo8JgzXdUSFz6mKSYkN6wFVzN2TBVXQq5fiYyykRJ6MN5i29pEALKEfetFvnBp9SLDV0XNPhGwBewqXlibpk2yhV/TgfHag4KEtIRorZ6Bx7eciCPprBnkNg6q78UmHG+/lt/gJUON5kbfB1eJWy9e4yXKcl1S7CuciWRFyEoOoQgpvo+AZ0goD7osGVghtrFenbJvuCbX85YCdpZcghn2QjgXBrJjrV7nmznVdbD4C//GX0beWvovo4cSAI2uRmeWlwH0NRjsr1Pw2TfQ0frVIixbQrk+X3nYfSJJaERp008UBmLRps2vwlF73kjknJASYFjD0JfXV0EiJV2SXd+/5wqH6LWY9yY7pWn7eNmBZVfg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(376002)(346002)(396003)(39860400002)(451199021)(316002)(4326008)(38100700002)(64756008)(66446008)(66556008)(66946007)(76116006)(66476007)(5660300002)(52536014)(7696005)(71200400001)(86362001)(41300700001)(19627235002)(54906003)(186003)(9686003)(53546011)(6506007)(26005)(66899021)(38070700005)(2906002)(30864003)(8676002)(83380400001)(8936002)(55016003)(478600001)(33656002)(110136005)(122000001)(403724002)(579004)(559001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?a25oMXhlMTVyZ3dLNnpaY1FxaDZYTmRXNUFrY3VVZmpnWHpOUkJ5UFBQMDFp?= =?utf-8?B?ZHVkaHdROStFYVZheTA1TTVXdldJNlRBQWxPNDJJMHlPYTE3dnI3WUcxUzFx?= =?utf-8?B?cElreUxvRmxQMnhTNUtNeXIrcmdJUjdXcW9GN3Fyejk2QkNwai9JZWtmYWNx?= =?utf-8?B?Vm9rTnljSWpqQnhCeDN0WkNRZ2IrO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VEoxeWpXTXFKZzNsd3dQdVJUd1krWkZGa0R5M1ZZN2hrN203YjJZNjVBWU92?= =?utf-8?B?ejAvWlZoVVZ0OHkya2kzL1hkYklKaGN3QUYzQ21WT3FHbFlaQ2EzYnJUbnlJ?= =?utf-8?Q?AuJs=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5550dad0-15d6-4f36-619e-08db3e304d16 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2023 04:08:57.5639 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eHpprmBxnz4MZBgX+DbRPafmrlzVAhqUgUKybK7zqU7rhpYTFdSR9jYsqGwcRAXifZKI/1zPZ5Qilbi98jNjAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7786 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 W0FNRCBPZmZpY2lhbCBVc2UgT25seSAtIEdlbmVyYWxdDQoNCg0KDQo+IC0tLS0tT3JpZ2luYWwg TWVzc2FnZS0tLS0tDQo+IEZyb206IE5pY2tsZSBXYW5nIDxuaWNrbGV3QG52aWRpYS5jb20+DQo+ IFNlbnQ6IFRodXJzZGF5LCBBcHJpbCAxMywgMjAyMyAyOjIxIFBNDQo+IFRvOiBkZXZlbEBlZGsy Lmdyb3Vwcy5pbw0KPiBDYzogQ2hhbmcsIEFibmVyIDxBYm5lci5DaGFuZ0BhbWQuY29tPjsgSWdv ciBLdWxjaHl0c2t5eQ0KPiA8aWdvcmtAYW1pLmNvbT47IE5pY2sgUmFtaXJleiA8bnJhbWlyZXpA bnZpZGl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VfUFJPVE9DT0wgICAgICAgICAgICAgICAgICpIaWlEYXRhYmFzZTsgICAgICAgICAgICAgICAv LyBUaGUgSElJDQo+IGRhdGFiYXNlIHByb3RvY29sLg0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NP TkZJR19OT1RJRlkgICAgICAgICAgICBIaWlTdHJpbmdOb3RpZnk7DQo+ICsgIEVGSV9ISUlfU1RS SU5HX1BST1RPQ09MICAgICAgICAgICAgICAgICAgICpIaWlTdHJpbmc7ICAgICAgICAgICAgICAg ICAvLyBISUkgU3RyaW5nDQo+IFByb3RvY29sLg0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJ R19OT1RJRlkgICAgICAgICAgICBSZWdleE5vdGlmeTsNCj4gKyAgRUZJX1JFR1VMQVJfRVhQUkVT U0lPTl9QUk9UT0NPTCAgICAgICAgICAgKlJlZ3VsYXJFeHByZXNzaW9uUHJvdG9jb2w7DQo+IC8v IFJlZ3VsYXIgRXhwcmVzc2lvbiBQcm90b2NvbC4NCj4gKyAgRUZJX0hBTkRMRSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgTm90aWZ5SGFuZGxlOyAgICAgICAgICAgICAgIC8vIFRoZSBu b3RpZnkgaGFuZGxlLg0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBGb3Jtc2V0TGlzdDsgICAgICAgICAgICAgICAgLy8gVGhlIGxpc3QgdG8ga2VlcCBjYWNo ZWQNCj4gSElJIGZvcm1zZXQuDQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFBlbmRpbmdMaXN0OyAgICAgICAgICAgICAgICAvLyBUaGUgbGlzdCB0byBrZWVw IHVwZGF0ZWQNCj4gSElJIGhhbmRsZS4NCj4gK30gUkVERklTSF9QTEFURk9STV9DT05GSUdfUFJJ VkFURTsNCj4gKw0KPiArLy8NCj4gKy8vIERlZmluaXRpb24gb2YgUkVERklTSF9TVEF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pc3QNCj4gK30gUkVERklTSF9QTEFURk9STV9DT05GSUdfU0NIRU1BOw0KPiArDQo+ICsvLw0K PiArLy8gRGVmaW5pdGlvbiBvZiBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JNX1NFVF9QUklW QVRFDQo+ICsvLw0KPiArdHlwZWRlZiBzdHJ1Y3Qgew0KPiArICBMSVNUX0VOVFJZICAgICAgICAg ICAgICAgICAgICAgICAgTGluazsNCj4gKyAgSElJX0ZPUk1TRVQgICAgICAgICAgICAgICAgICAg ICAgICpIaWlGb3JtU2V0OyAgICAgLy8gUG9pbnRlciB0byBISUkgZm9ybXNldCBkYXRhLg0KPiAr ICBFRklfR1VJRCAgICAgICAgICAgICAgICAgICAgICAgICAgR3VpZDsgICAgICAgICAgICAvLyBG b3Jtc2V0IEdVSUQuDQo+ICsgIEVGSV9ISUlfSEFORExFICAgICAgICAgICAgICAgICAgICBIaWlI YW5kbGU7ICAgICAgIC8vIEhpaSBIYW5kbGUgb2YgdGhpcyBmb3Jtc2V0Lg0KPiArICBMSVNUX0VO VFJZICAgICAgICAgICAgICAgICAgICAgICAgSGlpRm9ybUxpc3Q7ICAgICAvLyBGb3JtIGxpc3Qg dGhhdCBrZWVwIGZvcm0gZGF0YQ0KPiB1bmRlciB0aGlzIGZvcm1zZXQuDQo+ICsgIENIQVIxNiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqRGV2aWNlUGF0aFN0cjsgIC8vIERldmljZSBwYXRo IG9mIHRoaXMgZm9ybXNldC4NCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05GSUdfU0NIRU1BICAg IFN1cHBvcnRlZFNjaGVtYTsgLy8gU2NoZW1hDQo+IHRoYXQgaXMgc3VwcG9ydGVkIGluIHRoaXMg Zm9ybXNldC4NCj4gK30gUkVERklTSF9QTEFURk9STV9DT05GSUdfRk9STV9TRVRfUFJJVkFURTsN Cj4gKw0KPiArI2RlZmluZSBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JNU0VUX0ZST01fTElO SyhhKSAgQkFTRV9DUg0KPiAoYSwgUkVERklTSF9QTEFURk9STV9DT05GSUdfRk9STV9TRVRfUFJJ VkFURSwgTGluaykNCj4gKw0KPiArLy8NCj4gKy8vIERlZmluaXRpb24gb2YgUkVERklTSF9QTEFU Rk9STV9DT05GSUdfRk9STV9QUklWQVRFDQo+ICsvLw0KPiArdHlwZWRlZiBzdHJ1Y3Qgew0KPiAr ICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExpbms7DQo+ICsg IFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWQ7ICAgICAgICAg ICAvLyBGb3JtIElELg0KPiArICBFRklfU1RSSU5HX0lEICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFRpdGxlOyAgICAgICAgLy8gU3RyaW5nIHRva2VuIG9mIGZvcm0gdGl0bGUuDQo+ICsg IFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZPUk1fU0VUX1BSSVZBVEUgICAgKlBhcmVudEZvcm1z ZXQ7DQo+ICsgIEhJSV9GT1JNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhp aUZvcm07ICAgICAgLy8gUG9pbnRlciB0byBISUkgZm9ybSBkYXRhLg0KPiArICBMSVNUX0VOVFJZ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXRlbWVudExpc3Q7IC8vIFN0YXRl bWVudCBsaXN0IHRoYXQga2VlcA0KPiBzdGF0ZW1lbnQgdW5kZXIgdGhpcyBmb3JtLg0KPiArICBC T09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN1cHByZXNzZWQ7ICAg IC8vIEZvcm0gaXMgc3VwcHJlc3NlZA0KPiArfSBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JN X1BSSVZBVEU7DQo+ICsNCj4gKyNkZWZpbmUgUkVERklTSF9QTEFURk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gICAgICAgICAgICAgIERlc2NyaXB0aW9uOyAgICAvLyBTdHJpbmcgdG9rZW4g b2YgdGhpcyBxdWVzdGlvbi4NCj4gKyAgRUZJX1NUUklOR19JRCAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgSGVscDsgICAgICAgICAgIC8vIFN0cmluZyB0b2tlbiBvZiBoZWxwIG1lc3NhZ2Uu DQo+ICsgIEVGSV9TVFJJTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlc1N0cmlu Z0NhY2hlOyAvLyBUaGUgc3RyaW5nIGNhY2hlIGZvciBzZWFyY2gNCj4gZnVuY3Rpb24uDQo+ICsg IFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAg ICAvLyBUaGUgc3RhdGVtZW50IGZsYWcuDQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX1NU QVRFTUVOVF9EQVRBICAgIFN0YXRlbWVudERhdGE7ICAvLw0KPiBUaGUgbWF4L21pbiBmb3Igc3Rh dGVtZW50IHZhbHVlLg0KPiArICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBTdXBwcmVzc2VkOyAgICAgLy8gU3RhdGVtZW50IGlzIHN1cHByZXNzZWQuDQo+ICsgIEJP T0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXllZE91dDsgICAgICAv LyBTdGF0ZW1lbnQgaXMgR3JheWVkT3V0Lg0KPiArfSBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19T VEFURU1FTlRfUFJJVkFURTsNCj4gKw0KPiArI2RlZmluZSBSRURGSVNIX1BMQVRGT1JNX0NPTkZJ R19TVEFURU1FTlRfRlJPTV9MSU5LKGEpDQo+IEJBU0VfQ1IgKGEsIFJFREZJU0hfUExBVEZPUk1f Q09ORklHX1NUQVRFTUVOVF9QUklWQVRFLCBMaW5rKQ0KPiArDQo+ICsvLw0KPiArLy8gR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Zm9ybSBsaW5rcyB0byBnaXZlIGZvcm0uDQo+ICsNCj4gKyoqLw0KPiArUkVERklTSF9Q TEFURk9STV9DT05GSUdfRk9STV9QUklWQVRFICoNCj4gK0ZpbmRGb3JtTGlua1RvVGhpcyAoDQo+ ICsgIElOIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZPUk1fUFJJVkFURSAgKkZvcm1Qcml2YXRl DQo+ICsgICkNCj4gK3sNCj4gKyAgTElTVF9FTlRSWSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICpIaWlGb3JtTGluazsNCj4gKyAgTElTVF9FTlRSWSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICpIaWlOZXh0Rm9ybUxpbms7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09O RklHX0ZPUk1fUFJJVkFURSAgICAgICAqSGlpRm9ybVByaXZhdGU7DQo+ICsgIExJU1RfRU5UUlkg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlpU3RhdGVtZW50TGluazsNCj4gKyAg TElTVF9FTlRSWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpIaWlOZXh0U3RhdGVt ZW50TGluazsNCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05GSUdfU1RBVEVNRU5UX1BSSVZBVEUN Cj4gKkhpaVN0YXRlbWVudFByaXZhdGU7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZP Uk1fU0VUX1BSSVZBVEUgICAqSGlpRm9ybXNldFByaXZhdGU7DQo+ICsNCj4gKyAgaWYgKEZvcm1Q cml2YXRlID09IE5VTEwpIHsNCj4gKyAgICByZXR1cm4gTlVMTDsNCj4gKyAgfQ0KPiArDQo+ICsg IEhpaUZvcm1zZXRQcml2YXRlID0gRm9ybVByaXZhdGUtPlBhcmVudEZvcm1zZXQ7DQo+ICsNCj4g KyAgaWYgKElzTGlzdEVtcHR5ICgmSGlpRm9ybXNldFByaXZhdGUtPkhpaUZ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SAgU3RhdGVtZW50UHJpdmF0ZSAgIFBvaW50ZXIgdG8gc3RhdGVtZW50IHByaXZhdGUgaW5z dGFuY2UuDQo+ICsNCj4gKyAgQHJldHZhbCBDSEFSOCAqICAgICAgICAgICAgICAgIE1lbnUgcGF0 aCB0byBnaXZlbiBzdGF0ZW1lbnQuDQo+ICsgIEByZXR2YWwgTlVMTCAgICAgICAgICAgICAgICAg ICBDYW4gbm90IGZpbmQgbWVudSBwYXRoLg0KPiArDQo+ICsqKi8NCj4gK0NIQVI4ICoNCj4gK0J1 aWxkTWVuUGF0aCAoDQo+ICsgIElOIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX1NUQVRFTUVOVF9Q UklWQVRFDQo+ICpTdGF0ZW1lbnRQcml2YXRlDQo+ICsgICkNCj4gK3sNCj4gKyAgUkVERklTSF9T VEFDSyAgICAgICAgICAgICAgICAgICAgICAgICAqRm9ybVN0YWNrOw0KPiArICBSRURGSVNIX1BM QVRGT1JNX0NPTkZJR19GT1JNX1BSSVZBVEUgICpGb3JtUHJpdmF0ZTsNCj4gKyAgVUlOVE4gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPbGRCdWZmZXJTaXplOw0KPiArICBVSU5UTiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5ld0J1ZmZlclNpemU7DQo+ICsgIENIQVI4 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkJ1ZmZlcjsNCj4gKyAgQ0hBUjggICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqRm9ybVRpdGxlOw0KPiArICBFRklfU1RBVFVT ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCj4gKw0KPiArICBCdWZmZXIgICAg ICAgID0gTlVMTDsNCj4gKyAgT2xkQnVmZmVyU2l6ZSA9IDA7DQo+ICsgIE5ld0J1ZmZlclNpemUg PSAwOw0KPiArICBGb3JtU3RhY2sgICAgID0gTmV3UmVkZmlzaFN0YWNrIChSR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3RIZWFkLCBMaW5rKTsNCj4gKyAgfQ0KPiArDQo+ICsgIHJldHVybiAwOw0K PiArfQ0KPiArDQo+ICsvKioNCj4gKyAgQ29udmVydCBISUkgc3RyaW5nIHRvIHRoZSB2YWx1ZSBp biBISUkgb25lLW9mIG9wY29kZS4NCj4gKw0KPiArICBAcGFyYW1baW5dICBTdGF0ZW1lbnQgICAg IFN0YXRlbWVudCBwcml2YXRlIGluc3RhbmNlDQo+ICsgIEBwYXJhbVtpbl0gIFNjaGVtYSAgICAg ICAgU2NoZW1hIHN0cmluZw0KPiArICBAcGFyYW1baW5dICBIaWlTdHJpbmcgICAgIElucHV0IHN0 cmluZw0KPiArICBAcGFyYW1bb3V0XSBWYWx1ZSAgICAgICAgIFZhbHVlIHJldHVybmVkDQo+ICsN Cj4gKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICBISUkgdmFsdWUgaXMgcmV0dXJuZWQgc3Vj Y2Vzc2Z1bGx5Lg0KPiArICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgIEVycm9ycyBvY2N1cg0K PiArDQo+ICsqKi8NCj4gK0VGSV9TVEFUVVMNCj4gK0hpaVN0cmluZ1RvT25lT2ZPcHRpb25WYWx1 ZSAoDQo+ICsgIElOICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19TVEFURU1FTlRfUFJJVkFURSAg KlN0YXRlbWVudCwNCj4gKyAgSU4gIENIQVI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqU2NoZW1hLA0KPiArICBJTiAgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEhpaVN0cmluZywNCj4gKyAgT1VUIEhJSV9TVEFURU1FTlRfVkFMVUUgICAg ICAgICAgICAgICAgICAgICAgICAqVmFsdWUNCj4gKyAgKQ0KPiArew0KPiArICBMSVNUX0VOVFJZ ICAgICAgICAgICAqTGluazsNCj4gKyAgSElJX1FVRVNUSU9OX09QVElPTiAgKk9wdG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Ugd2hp Y2ggbWF0Y2ggdGhpcyBjb25maWd1cmUNCj4gTGFuZ3VhZ2UuDQo+ICsgIEBwYXJhbVtvdXRdICBW YWx1ZSAgICAgICAgICAgICAgIFRoZSByZXR1cm5lZCB2YWx1ZS4NCj4gKw0KPiArICBAcmV0dmFs IEVGSV9TVUNDRVNTICAgICAgICAgICAgICBWYWx1ZSBpcyByZXR1cm5lZCBzdWNjZXNzZnVsbHku DQo+ICsgIEByZXR2YWwgT3RoZXJzICAgICAgICAgICAgICAgICAgIFNvbWUgZXJyb3IgaGFwcGVu ZWQuDQo+ICsNCj4gKyoqLw0KPiArRUZJX1NUQVRVUw0KPiArRUZJQVBJDQo+ICtSZWRmaXNoUGxh dGZvcm1Db25maWdQcm90b2NvbEdldFZhbHVlICgNCj4gKyAgSU4gICAgIEVES0lJX1JFREZJU0hf UExBVEZPUk1fQ09ORklHX1BST1RPQ09MICAqVGhpcywNCj4gKyAgSU4gICAgIENIQVI4ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqU2NoZW1hLA0KPiArICBJTiAgICAgQ0hBUjgg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpWZXJzaW9uLA0KPiArICBJTiAgICAg RUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ3VyZUxhbmcsDQo+ ICsgIE9VVCAgICBFREtJSV9SRURGSVNIX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgKlZhbHVl DQo+ICsgICkNCj4gK3sNCj4gKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFN0YXR1czsNCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05GSUdfUFJJVkFURQ0KPiAq UmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJpdmF0ZTsNCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05G SUdfU1RBVEVNRU5UX1BSSVZBVEUgICpUYXJnZXRTdGF0ZW1lbnQ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AgIENvbmZpZ3VyZSBsYW5n dWFnZSB0aGF0IHJlZmVycyB0byB0aGlzDQo+IHN0YXRlbWVudC4NCj4gKyAgQHBhcmFtW2luXSAg IFN0YXRlbWVudFZhbHVlICAgICAgICAgICAgICAgICBTdGF0ZW1lbnQgdmFsdWUuDQo+ICsNCj4g KyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICBISUkgdmFsdWUgaXMgcmV0dXJuZWQgc3VjY2Vz c2Z1bGx5Lg0KPiArICBAcmV0dmFsIE90aGVycyAgICAgICAgICAgIEVycm9ycyBvY2N1cg0KPiAr DQo+ICsqKi8NCj4gK0VGSV9TVEFUVVMNCj4gK1JlZGZpc2hQbGF0Zm9ybUNvbmZpZ1NldFN0YXRl bWVudENvbW1vbiAoDQo+ICsgIElOICAgICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19QUklWQVRF DQo+ICpSZWRmaXNoUGxhdGZvcm1Db25maWdQcml2YXRlLA0KPiArICBJTiAgICAgQ0hBUjggICAg ICAgICAgICAgICAgICAgICAgICAgICAgKlNjaGVtYSwNCj4gKyAgSU4gICAgIEVGSV9TVFJJTkcg ICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ3VyZUxhbmcsDQo+ICsgIElOICAgICBISUlfU1RB VEVNRU5UX1ZBTFVFICAgICAgICAgICAgICAqU3RhdGVtZW50VmFsdWUNCj4gKyAgKQ0KPiArew0K PiArICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3RhdHVzOw0K PiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19TVEFURU1FTlRfUFJJVkFURSAgKlRhcmdldFN0 YXRlbWVudDsNCj4gKyAgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFRlbXBCdWZmZXI7DQo+ICsgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAqU3RyaW5nQXJyYXk7DQo+ICsgIFVJTl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E9DT0wgICpUaGlzLA0KPiArICBJTiAg ICAgQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpTY2hlbWEsDQo+ICsg IElOICAgICBDSEFSOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlZlcnNpb24s DQo+ICsgIElOICAgICBFRklfU1RSSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29u ZmlndXJlTGFuZywNCj4gKyAgSU4gICAgIEVES0lJX1JFREZJU0hfVkFMVUUgICAgICAgICAgICAg ICAgICAgICBWYWx1ZQ0KPiArICApDQo+ICt7DQo+ICsgIEVGSV9TVEFUVVMgICAgICAgICAgICAg ICAgICAgICAgIFN0YXR1czsNCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05GSUdfUFJJVkFURSAg KlJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1ByaXZhdGU7DQo+ICsgIENIQVI4ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICpGdWxsU2NoZW1hOw0KPiArICBISUlfU1RBVEVNRU5UX1ZBTFVFICAgICAg ICAgICAgICBOZXdWYWx1ZTsNCj4gKw0KPiArICBpZiAoKFRoaXMgPT0gTlVMTCkgfHwgSVNfRU1Q VFlfU1RSSU5HIChTY2hlbWEpIHx8IElTX0VNUFRZX1NUUklORw0KPiAoVmVyc2lvbikgfHwgSVNf RU1QVFlfU1RSSU5HIChDb25maWd1cmVMYW5nKSkgew0KPiArICAgIHJldHVybiBFRklfSU5WQUxJ RF9QQVJBTUVURVI7DQo+ICsgIH0NCj4gKw0KPiArICBpZiAoKFZhbHVlLlR5cGUgPT0gUmVkZmlz aFZhbHVlVHlwZVVua25vd24pIHx8IChWYWx1ZS5UeXBlID49DQo+IFJlZGZpc2hWYWx1ZVR5cGVN YXgpKSB7DQo+ICsgICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCj4gKyAgfQ0KPiAr DQo+ICsgIFJlZGZpc2hQbGF0Zm9ybU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ndWFnZS4NCj4gKyAgQHBhcmFtW291dF0gIENvdW50ICAgICAgICAg ICAgICAgVGhlIG51bWJlciBvZiBDb25maWd1cmUgTGFuZ3VhZ2UgaW4NCj4gQ29uZmlndXJlTGFu Z0xpc3QuDQo+ICsNCj4gKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgICAgQ29uZmln dXJlTGFuZ0xpc3QgaXMgcmV0dXJuZWQgc3VjY2Vzc2Z1bGx5Lg0KPiArICBAcmV0dmFsIE90aGVy cyAgICAgICAgICAgICAgICAgICBTb21lIGVycm9yIGhhcHBlbmVkLg0KPiArDQo+ICsqKi8NCj4g K0VGSV9TVEFUVVMNCj4gK0VGSUFQSQ0KPiArUmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJvdG9jb2xH ZXRDb25maWd1cmVMYW5nICgNCj4gKyAgSU4gICAgIEVES0lJX1JFREZJU0hfUExBVEZPUk1fQ09O RklHX1BST1RPQ09MICAqVGhpcywNCj4gKyAgSU4gICAgIENIQVI4ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAqU2NoZW1hLA0KPiArICBJTiAgICAgQ0hBUjggICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICpWZXJzaW9uLA0KPiArICBJTiAgICAgRUZJX1NUUklORyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlZ2V4UGF0dGVybiwNCj4gKyAgT1VUICAgIEVG SV9TVFJJTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKkNvbmZpZ3VyZUxhbmdMaXN0 LA0KPiArICBPVVQgICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpD b3VudA0KPiArICApDQo+ICt7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX1BSSVZBVEUN Cj4gKlJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1ByaXZhdGU7DQo+ICsgIEVGSV9TVEFUVVMgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCj4gKyAgUkVERklTSF9QTEFU Rk9STV9DT05GSUdfU1RBVEVNRU5UX1BSSVZBVEVfTElTVCAgU3RhdGVtZW50TGlzdDsNCj4gKyAg UkVERklTSF9QTEFURk9STV9DT05GSUdfU1RBVEVNRU5UX1BSSVZBVEVfUkVGDQo+ICpTdGF0ZW1l bnRSZWY7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICpOZXh0TGluazsNCj4gKyAgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgVG1wU3RyaW5nOw0KPiArICBFRklfU1RSSU5HICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqVG1wQ29uZmlndXJlTGFuZ0xpc3Q7DQo+ICsgIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KPiArICBDSEFS OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqRnVsbFNjaGVtYTsN Cj4gKw0KPiArICBpZiAoKFRoaXMgPT0gTlVMTCkgfHwgSVNfRU1QVFlfU1RSSU5HIChTY2hlbWEp IHx8IElTX0VNUFRZX1NUUklORw0KPiAoVmVyc2lvbikgfHwgKENvdW50ID09IE5VTEwpIHx8IChD b25maWd1cmVMYW5nTGlzdCA9PSBOVUxMKSB8fA0KPiBJU19FTVBUWV9TVFJJTkcgKFJlZ2V4UGF0 dGVybikpIHsNCj4gKyAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KPiArICB9DQo+ ICsNCj4gKyAgKkNvdW50ICAgICAgICAgICAgICAgICAgICAgICA9IDA7DQo+ICsgICpDb25maWd1 cmVMYW5nTGlzdCAgICAgICAgICAgPSBOVUxMOw0KPiArICBGdWxsU2NoZW1hICAgICAgICAgICAg ICAgICAgID0gTlVMTDsNCj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gcmV0dXJuZWQgc3VjY2Vzc2Z1bGx5Lg0KPiArICBAcmV0dmFsIE90aGVycyAg ICAgICAgICAgICAgICAgICBTb21lIGVycm9yIGhhcHBlbmVkLg0KPiArDQo+ICsqKi8NCj4gK0VG SV9TVEFUVVMNCj4gK0VGSUFQSQ0KPiArUmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJvdG9jb2xHZXRT dXBwb3J0ZWRTY2hlbWEgKA0KPiArICBJTiAgICAgRURLSUlfUkVERklTSF9QTEFURk9STV9DT05G SUdfUFJPVE9DT0wgICpUaGlzLA0KPiArICBPVVQgICAgQ0hBUjggICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICoqU3VwcG9ydGVkU2NoZW1hDQo+ICsgICkNCj4gK3sNCj4gKyAgUkVE RklTSF9QTEFURk9STV9DT05GSUdfUFJJVkFURQ0KPiAqUmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJp dmF0ZTsNCj4gKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3Rh dHVzOw0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlp Rm9ybXNldExpbms7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICpIaWlGb3Jtc2V0TmV4dExpbms7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZP Uk1fU0VUX1BSSVZBVEUgICpIaWlGb3Jtc2V0UHJpdmF0ZTsNCj4gKyAgVUlOVE4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQo+ICsgIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFN0cmluZ1NpemU7DQo+ICsgIENIQVI4ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICpTdHJpbmdCdWZmZXI7DQo+ICsgIFVJTlROICAg ICAgICAgICA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cGFyYW1baW5dICAgRGVmYXVsdENsYXNzICAg ICAgICBUaGUgVUVGSSBkZWZpbmVkIGRlZmF1bHQgY2xhc3MuDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFBsZWFzZSByZWZlciB0byBVRUZJIHNwZWMuIDMzLjIuNS44ICJk ZWZhdWx0cyIgZm9yIGRldGFpbHMuDQo+ICsgIEBwYXJhbVtvdXRdICBWYWx1ZSAgICAgICAgICAg ICAgIFRoZSByZXR1cm5lZCB2YWx1ZS4NCj4gKw0KPiArICBAcmV0dmFsIEVGSV9TVUNDRVNTICAg ICAgICAgICAgICBWYWx1ZSBpcyByZXR1cm5lZCBzdWNjZXNzZnVsbHkuDQo+ICsgIEByZXR2YWwg T3RoZXJzICAgICAgICAgICAgICAgICAgIFNvbWUgZXJyb3IgaGFwcGVuZWQuDQo+ICsNCj4gKyoq Lw0KPiArRUZJX1NUQVRVUw0KPiArRUZJQVBJDQo+ICtSZWRmaXNoUGxhdGZvcm1Db25maWdQcm90 b2NvbEdldERlZmF1bHRWYWx1ZSAoDQo+ICsgIElOICAgICBFREtJSV9SRURGSVNIX1BMQVRGT1JN X0NPTkZJR19QUk9UT0NPTCAgKlRoaXMsDQo+ICsgIElOICAgICBDSEFSOCAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKlNjaGVtYSwNCj4gKyAgSU4gICAgIENIQVI4ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqVmVyc2lvbiwNCj4gKyAgSU4gICAgIEVGSV9TVFJJ TkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb25maWd1cmVMYW5nLA0KPiArICBJTiAg ICAgVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlZmF1bHRDbGFzcywN Cj4gKyAgT1VUICAgIEVES0lJX1JFREZJU0hfVkFMVUUgICAgICAgICAgICAgICAgICAgICAqVmFs dWUNCj4gKyAgKQ0KPiArew0KPiArICBF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aXNoIHZlcnNpb24gdG8gcXVlcnkuDQo+ICsgIEBwYXJhbVtpbl0gICBD b25maWd1cmVMYW5nICAgICAgIFRoZSB0YXJnZXQgdmFsdWUgd2hpY2ggbWF0Y2ggdGhpcyBjb25m aWd1cmUNCj4gTGFuZ3VhZ2UuDQo+ICsgIEBwYXJhbVtvdXRdICBBdHRyaWJ1dGVWYWx1ZSAgICAg IFRoZSBhdHRyaWJ1dGUgdmFsdWUuDQo+ICsNCj4gKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAg ICAgICAgICAgVmFsdWUgaXMgcmV0dXJuZWQgc3VjY2Vzc2Z1bGx5Lg0KPiArICBAcmV0dmFsIE90 aGVycyAgICAgICAgICAgICAgICAgICBTb21lIGVycm9yIGhhcHBlbmVkLg0KPiArDQo+ICsqKi8N Cj4gK0VGSV9TVEFUVVMNCj4gK0VGSUFQSQ0KPiArUmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJvdG9j b2xHZXRBdHRyaWJ1dGUgKA0KPiArICBJTiAgICAgRURLSUlfUkVERklTSF9QTEFURk9STV9DT05G SUdfUFJPVE9DT0wgICpUaGlzLA0KPiArICBJTiAgICAgQ0hBUjggICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICpTY2hlbWEsDQo+ICsgIElOICAgICBDSEFSOCAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKlZlcnNpb24sDQo+ICsgIElOICAgICBFRklfU1RSSU5HICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29uZmlndXJlTGFuZywNCj4gKyAgT1VUICAgIEVE S0lJX1JFREZJU0hfQVRUUklCVVRFICAgICAgICAgICAgICAgICAqQXR0cmlidXRlVmFsdWUNCj4g KyAgKQ0KPiArew0KPiArICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgU3RhdHVzOw0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19QUklWQVRFDQo+ICpSZWRm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IaWlEYXRhYmFzZQ0KPiArICAgICAgICAgICAgICAgICAgKTsNCj4gKyAgaWYgKEVGSV9FUlJP UiAoU3RhdHVzKSkgew0KPiArICAgIERFQlVHICgoREVCVUdfRVJST1IsICIlYSwgbG9jYXRlIEVG SV9ISUlfREFUQUJBU0VfUFJPVE9DT0wNCj4gZmFpbHVyZTogJXJcbiIsIF9fRlVOQ1RJT05fXywg U3RhdHVzKSk7DQo+ICsgICAgcmV0dXJuOw0KPiArICB9DQo+ICsNCj4gKyAgLy8NCj4gKyAgLy8g UmVnaXN0ZXIgcGFja2FnZSBub3RpZmljYXRpb24gd2hlbiBuZXcgZm9ybSBwYWNrYWdlIGlzIGlu c3RhbGxlZC4NCj4gKyAgLy8NCj4gKyAgU3RhdHVzID0gbVJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1By aXZhdGUtPkhpaURhdGFiYXNlLQ0KPiA+UmVnaXN0ZXJQYWNrYWdlTm90aWZ5ICgNCj4gKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1SZWRm aXNoUGxhdGZvcm1Db25maWdQcml2YXRlLT5IaWlEYXRhYmFzZSwNCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9ISUlfUEFDS0FH RV9GT1JNUywNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIE5VTEwsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBSZWRmaXNoUGxhdGZvcm1Db25maWdGb3JtVXBkYXRlTm90 aWZ5LA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRUZJX0hJSV9EQVRBQkFTRV9OT1RJRllfTkVXX1BBQ0ssDQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmbVJlZGZpc2hQ bGF0Zm9ybUNvbmZpZ1ByaXZhdGUtDQo+ID5Ob3RpZnlIYW5kbGUNCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQo+ICsgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCj4gKyAgICBERUJVRyAoKERFQlVHX0VSUk9SLCAiJWEsIFJl Z2lzdGVyUGFja2FnZU5vdGlmeSBmb3INCj4gRUZJX0hJSV9EQVRBQkFTRV9OT1RJRllfTkVXX1BB Q0sgZmFpbHVyZTogJXJcbiIsIF9fRlVOQ1RJT05fXywNCj4gU3RhdHVzKSk7DQo+ICsgIH0NCj4g Kw0KPiArICAvLw0KPiArICAvLyBSZWdpc3RlciBwYWNrYWdlIG5vdGlmaWNhdGlvbiB3aGVuIG5l dyBmb3JtIHBhY2thZ2UgaXMgdXBkYXRlZC4NCj4gKyAgLy8NCj4gKyAgU3RhdHVzID0gbVJlZGZp c2hQbGF0Zm9ybUNvbmZpZ1ByaXZhdGUtPkhpaURhdGFiYXNlLQ0KPiA+UmVnaXN0ZXJQYWNrYWdl Tm90aWZ5ICgNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1SZWRmaXNoUGxhdGZvcm1Db25maWdQcml2YXRlLT5IaWlEYXRhYmFzZSwN Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEVGSV9ISUlfUEFDS0FHRV9GT1JNUywNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZWRmaXNoUGxhdGZvcm1D b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ICAgIEFTU0VSVCAoRkFMU0UpOw0KPiArICB9DQo+ICsNCj4gKyAgLy8NCj4gKyAgLy8g SW5zdGFsbCBwcm90b2NvbCBub3RpZmljYXRpb24gaWYgSElJIGRhdGFiYXNlIHByb3RvY29sIGlz IGluc3RhbGxlZC4NCj4gKyAgLy8NCj4gKyAgbVJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1ByaXZhdGUt PkhpaURiTm90aWZ5LlByb3RvY29sRXZlbnQgPQ0KPiBFZmlDcmVhdGVQcm90b2NvbE5vdGlmeUV2 ZW50ICgNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZnRWZpSGlpRGF0YWJhc2VQcm90b2NvbEd1aWQsDQo+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBU UExfQ0FMTEJBQ0ssDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBIaWlEYXRhYmFzZVByb3RvY29sSW5zdGFsbGVkLA0KPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgTlVMTCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICZtUmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJpdmF0ZS0NCj4g PkhpaURiTm90aWZ5LlJlZ2lzdHJhdGlvbg0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCj4gKyAgaWYgKG1SZWRmaXNo UGxhdGZvcm1Db25maWdQcml2YXRlLT5IaWlEYk5vdGlmeS5Qcm90b2NvbEV2ZW50ID09IE5VTEwp IHsNCj4gKyAgICBERUJVRyAoKERFQlVHX0VSUk9SLCAiJWEsIGZhaWxlZCB0byBjcmVhdGUgcHJv dG9jb2wgbm90aWZpY2F0aW9uIGZvcg0KPiBnRWZpSGlpRGF0YWJhc2VQcm90b2NvbEd1aWRcbiIs IF9fRlVOQ1RJT05fXykpOw0KPiArICAgIEFTU0VSVCAoRkFMU0UpOw0KPiArICB9DQo+ICsNCj4g KyAgLy8NCj4gKyAgLy8gSW5zdGFsbCBwcm90b2NvbCBub3RpZmljYXRpb24gaWYgSElJIHN0cmlu ZyBwcm90b2NvbCBpcyBpbnN0YWxsZWQuDQo+ICsgIC8vDQo+ICsgIG1SZWRmaXNoUGxhdGZvcm1D b25maWdQcml2YXRlLT5IaWlTdHJpbmdOb3RpZnkuUHJvdG9jb2xFdmVudCA9DQo+IEVmaUNyZWF0 ZVByb3RvY29sTm90aWZ5RXZlbnQgKA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSGlpU3RyaW5nUHJvdG9j b2xHdWlkLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFRQTF9DQUxMQkFDSywNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIaWlTdHJp bmdQcm90b2NvbEluc3RhbGxlZCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZt UmVkZmlzaFBsYXRmb3JtQ29uZmlnUHJpdmF0ZS0NCj4gPkhpaVN0cmluZ05vdGlmeS5SZWdpc3Ry YXRpb24NCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICApOw0KPiArICBpZiAobVJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1By aXZhdGUtPkhpaVN0cmluZ05vdGlmeS5Qcm90b2NvbEV2ZW50ID09IE5VTEwpDQo+IHsNCj4gKyAg ICBERUJVRyAoKERFQlVHX0VSUk9SLCAiJWEsIGZhaWxlZCB0byBjcmVhdGUgcHJvdG9jb2wgbm90 aWZpY2F0aW9uIGZvcg0KPiBnRWZpSGlpU3RyaW5nUHJvdG9jb2xHdWlkXG4iLCBfX0ZVTkNUSU9O X18pKTsNCj4gKyAgICBBU1NFUlQgKEZBTFNFKTsNCj4gKyAgfQ0KPiArDQo+ICsgIC8vDQo+ICsg IC8vIEluc3RhbGwgcHJvdG9jb2wgbm90aWZpY2F0aW9uIGlmIHJlZ3VsYXIgZXhwcmVzc2lvbiBw cm90b2NvbCBpcyBpbnN0YWxsZWQuDQo+ICsgIC8vDQo+ICsgIG1SZWRmaXNoUGxhdGZvcm1Db25m aWdQcml2YXRlLT5SZWdleE5vdGlmeS5Qcm90b2NvbEV2ZW50ID0NCj4gRWZpQ3JlYXRlUHJvdG9j b2xOb3RpZnlFdmVudCAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaVJlZ3VsYXJFeHByZXNzaW9uUHJvdG9jb2xH dWlkLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgVFBMX0NBTExCQUNLLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVnZXhQcm90b2NvbEluc3Rh bGxlZCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIE5VTEwsDQo+ICsgICAgICAgICAgIC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Q09ORklH X0ZPUk1fU0VUX1BSSVZBVEUgICpGb3Jtc2V0UHJpdmF0ZQ0KPiArICApDQo+ICt7DQo+ICsgIExJ U1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlpRm9ybUxpbms7DQo+ ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlpTmV4dEZv cm1MaW5rOw0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JNX1BSSVZBVEUgICAgICAg KkhpaUZvcm1Qcml2YXRlOw0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKkhpaVN0YXRlbWVudExpbms7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqSGlpTmV4dFN0YXRlbWVudExpbms7DQo+ICsgIFJFREZJU0hf UExBVEZPUk1fQ09ORklHX1NUQVRFTUVOVF9QUklWQVRFDQo+ICpIaWlTdGF0ZW1lbnRQcml2YXRl Ow0KPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7 DQo+ICsNCj4gKyAgaWYgKEZvcm1zZXRQcml2YXRlID09IE5VTEwpIHsNCj4gKyAgICByZXR1cm4g RUZJX0lOVkFMSURfUEFSQU1FVEVSOw0KPiArICB9DQo+ICsNCj4gKyAgSW5kZXggICAgICAgPSAw Ow0KPiArICBIaWlGb3JtTGluayA9IEdldEZpcnN0Tm9kZSAoJkZvcm1zZXRQcml2YXRlLT5IaWlG b3JtTGlzdCk7DQo+ICsgIHdoaWxlICghSXNOdWxsICgmRm9ybXNldFByaXZhdGUtPkhpaUZvcm1M aXN0LCBIaWlGb3JtTGluaykpIHsNCj4gKyAgICBIaWlGb3JtUHJpdmF0ZSAgPSBSRURGSVNIX1BM QVRGT1JNX0NPTkZJR19GT1JNX0ZST01fTElOSw0KPiAoSGlpRm9yb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oDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1SZWRmaXNoUGxhdGZvcm1Db25maWdQcml2YXRl LT5IaWlTdHJpbmcsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIExhbmd1YWdlLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIaWlIYW5kbGUsDQo+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0cmlu Z0lkLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmVGVtcFN0cmluZywNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN0cmluZ1NpemUsDQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwNCj4g KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKTsNCj4gKyAgLy8NCj4gKyAgLy8gSWYgR2V0U3RyaW5nKCkgcmV0dXJucyBFRklfU1VDQ0VT UyBmb3IgYSB6ZXJvIHNpemUsDQo+ICsgIC8vIHRoZW4gdGhlcmUgYXJlIG5vIHN1cHBvcnRlZCBs YW5ndWFnZXMgcmVnaXN0ZXJlZCBmb3IgSGlpSGFuZGxlLiAgSWYNCj4gR2V0U3RyaW5nKCkNCj4g KyAgLy8gcmV0dXJucyBhbiBlcnJvciBvdGhlciB0aGFuIEVGSV9CVUZGRVJfVE9PX1NNQUxMLCB0 aGVuIEhpaUhhbmRsZSBpcw0KPiBub3QgcHJlc2VudA0KPiArICAvLyBpbiB0aGUgSElJIERhdGFi YXNlDQo+ICsgIC8vDQo+ICsgIGlmIChTdGF0dXMgIT0gRUZJX0JVRkZFUl9UT09fU01BTEwpIHsN Cj4gKyAgICByZXR1cm4gTlVMTDsNCj4gKyAgfQ0KPiArDQo+ICsgIC8vDQo+ICsgIC8vIEFsbG9j YXRlIGEgYnVmZmVyIGZvciB0aGUgcmV0dXJuIHN0cmluZw0KPiArICAvLw0KPiArICBTdHJpbmcg PSBBbGxvY2F0ZVplcm9Qb29sIChTdHJpbmdTaXplKTsNCj4gKyAgaWYgKFN0cmluZyA9PSBOVUxM KSB7DQo+ICsgICAgcmV0dXJuIE5VTEw7DQo+ICsgIH0NCj4gKw0KPiArICAvLw0KPiArICAvLyBS ZXRyaWV2ZSB0aGUgc3RyaW5nIGZyb20gdGhlIHN0cmluZyBwYWNrYWdlDQo+ICsgIC8vDQo+ICsg IFN0YXR1cyA9IG1SZWRmaXNoUGxhdGZvcm1Db25maWdQcml2YXRlLT5IaWlTdHJpbmctPkdldFN0 cmluZyAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbVJlZGZpc2hQbGF0Zm9ybUNvbmZpZ1ByaXZhdGUtPkhpaVN0cmluZywNCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMYW5n dWFnZSwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBIaWlIYW5kbGUsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgU3RyaW5nSWQsDQo+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3RyaW5nLA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZTdHJpbmdTaXplLA0K PiArICAgICAg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1vcnkuDQo+ICsNCj4g KyoqLw0KPiArRUZJX1NUQVRVUw0KPiArR2V0U3RhdGVtZW50UHJpdmF0ZUJ5Q29uZmlndXJlTGFu Z1JlZ2V4ICgNCj4gKyAgSU4gIEVGSV9SRUdVTEFSX0VYUFJFU1NJT05fUFJPVE9DT0wNCj4gKlJl Z3VsYXJFeHByZXNzaW9uUHJvdG9jb2wsDQo+ICsgIElOICBMSVNUX0VOVFJZICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqRm9ybXNldExpc3QsDQo+ICsgIElOICBDSEFSOCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqU2NoZW1hLA0KPiArICBJ TiAgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGF0dGVy biwNCj4gKyAgT1VUIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX1NUQVRFTUVOVF9QUklWQVRFX0xJ U1QNCj4gKlN0YXRlbWVudExpc3QNCj4gKyAgKQ0KPiArew0KPiArICBMSVNUX0VOVFJZICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpIaWlGb3Jtc2V0TGluazsNCj4gKyAgTElT VF9FTlRSWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlpRm9ybXNldE5l eHRMaW5rOw0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JNX1NFVF9QUklWQVRFDQo+ ICpIaWlGb3Jtc2V0UHJpdmF0ZTsNCj4gKyAgTElTVF9FTlRSWSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAqSGlpRm9ybUxpbms7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhpaU5leHRGb3JtTGluazsNCj4gKyAgUkVERklT SF9QTEFURk9STV9DT05GSUdfRk9STV9QUklWQVRFICAgICAgICAgICAqSGlpRm9ybVByaXZhdGU7 DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhp aVN0YXRlbWVudExpbms7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKkhpaU5leHRTdGF0ZW1lbnRMaW5rOw0KPiArICBSRURGSVNIX1BMQVRGT1JN X0NPTkZJR19TVEFURU1FTlRfUFJJVkFURQ0KPiAqSGlpU3RhdGVtZW50UHJpdmF0ZTsNCj4gKyAg RUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUbXBTdHJpbmc7 DQo+ICsgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2Fw dHVyZUNvdW50Ow0KPiArICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIElzTWF0Y2g7DQo+ICsgIEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgU3RhdHVzOw0KPiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19TVEFURU1F TlRfUFJJVkFURV9SRUYgICpTdGF0ZW1lbnRSZWY7DQo+ICsNCj4gKyAgaWYgKChGb3Jtc2V0TGlz dCA9PSBOVUxMKSB8fCBJU19FTVBUWV9TVFJJTkcgKFNjaGVtYSkgfHwNCj4gSVNfRU1QVFlfU1RS SU5HIChQYXR0ZXJuKSB8fCAoU3RhdGVtZW50TGlzdCA9PSBOVUxMKSkgew0KPiArICAgIHJldHVy biBFRklfSU5WQUxJRF9QQVJBTUVURVI7DQo+ICsgIH0NCj4gKw0KPiArICBpZiAoUmVndWxhckV4 cHJlc3Npb25Qcm90b2NvbCA9PSBOVUxMKSB7DQo+ICsgICAgcmV0dXJuIEVGSV9OT1RfUkVBRFk7 DQo+ICsgIH0NCj4gKw0KPiArICBTdGF0ZW1lbnRMaXN0LT5Db3VudCA9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0aW9uKTsNCj4gKyAgICAgICAgICBpZiAoVG1wU3RyaW5nICE9IE5VTEwpIHsN Cj4gKyAgICAgICAgICAgIFN0YXR1cyA9IFJlZ3VsYXJFeHByZXNzaW9uUHJvdG9jb2wtPk1hdGNo U3RyaW5nICgNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgUmVndWxhckV4cHJlc3Npb25Qcm90b2NvbCwNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVG1wU3RyaW5nLA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYXR0ZXJuLA0KPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaVJlZ2V4U3lu dGF4VHlwZVBlcmxHdWlkLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmSXNNYXRjaCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJkNhcHR1cmVDb3VudA0KPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KPiArICAgICAgICAgICAgaWYg KEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KPiArICAgICAgICAgICAgICBERUJVRyAoKERFQlVHX0VS Uk9SLCAiJWEsIE1hdGNoU3RyaW5nIFwiJXNcIiBmYWlsZWQ6ICVyXG4iLA0KPiBfX0ZVTkNUSU9O X18sIFBhdHRlcm4sIFN0YXR1cykpOw0KPiArICAgICAgICAgICAgICBBU1NFUlQgKEZBTFNFKTsN Cj4gKyAgICAgICAgICAgICAgcmV0dXJuIFN0YXR1czsNCj4gKyAgICAgICAgICAgIH0NCj4gKw0K PiArICAgICAgICAgICAgLy8NCj4gKyAgICAgICAgICAgIC8vIEZvdW5kDQo+ICsgICAgICAgICAg ICAvLw0KPiArICAgICAgICAgICAgaWYgKElzTWF0Y2gpIHsNCj4gKyAgICAgICAgICAgICAgU3Rh dGVtZW50UmVmID0gQWxsb2NhdGVaZXJvUG9vbCAoc2l6ZW9mDQo+IChSRURGSVNIX1BMQVRGT1JN X0NPTkZJR19TVEFURU1FTlRfUFJJVkFURV9SRUYpKTsNCj4gKyAgICAgICAgICAgICAgaWYgKFN0 YXRlbWVudFJlZiA9PSBOVUxMKSB7DQo+ICsgICAgICAgICAgICAgICAgcmV0dXJuIEVGSV9PVVRf T0ZfUkVTT1VSQ0VTOw0KPiArICAgICAgICAgICAgICB9DQo+ICsNCj4gKyAgICAgICAgICAgICAg U3RhdGVtZW50UmVmLT5TdGF0ZW1lbnQgPSBIaWlTdGF0ZW1lbnRQcml2YXRlOw0KPiArICAgICAg ICAgICAgICBJbnNlcnRUYWlsTGlzdCAoJlN0YXRlbWVudExpc3QtPlN0YXRlbWVudExpc3QsICZT dGF0ZW1lbnRSZWYtDQo+ID5MaW5rKTsNCj4gKyAgICAgICAgICAgICAgKytTdGF0ZW1lbnRMaXN0 LT5Db3VudDsNCj4gKyAgICAgICAgICAgIH0NCj4gKw0KPiArICAgICAgICAgICAgRnJlZVBvb2wg KFRtcFN0cmluZyk7DQo+ICsgICAgICAgICAgfQ0KPiArICAgICAgICB9DQo+ICsNCj4gKyAgICAg ICAgSGlpU3RhdGVtZW50TGluayA9IEhpaU5leHRTdGF0ZW1lbnRMaW5rOw0KPiArICAgICAgfQ0K PiArDQo+ICsgICAgICBIaWlGb3JtTGluayA9IEhpaU5leHRGb3JtTGluazsNCj4gKyAgICB9DQo+ ICsNCj4gKyAgICBIaWlGb3Jtc2V0TGluayA9IEhpaUZvcm1zZXROZXh0TGluazsNCj4gKyAgfQ0K PiArDQo+ICsgIHJldHVybiBFRklfU1VDQ0VTUzsNCj4gK30NCj4gKw0KPiArLyoqDQo+ICsgIEdl dCBzdGF0ZW1lbnQgcHJpdmF0ZSBpbnN0YW5jZSBieSB0aGUgZ2l2ZW4gY29uZmlndXJlIGxhbmd1 YWdlLg0KPiArDQo+ICsgIEBwYXJhbVtpbl0gIEZvcm1zZXRMaXN0ICAgICAgICAgICAgICAgICBG b3JtLXNldCBsaXN0IHRvIHNlYXJjaC4NCj4gKyAgQHBhcmFtW2luXSAgU2NoZW1hICAgICAgICAg ICAgICAgICAgICAgIFNjaGVtYSB0byBiZSBtYXRjaGVkLg0KPiArICBAcGFyYW1baW5dICBDb25m aWd1cmVMYW5nICAgICAgICAgICAgICAgQ29uZmlndXJlIGxhbmd1YWdlLg0KPiArDQo+ICsgIEBy ZXR2YWwgUkVERklTSF9QTEFURk9STV9DT05GSUdfU1RBVEVNRU5UX1BSSVZBVEUgKiAgIFBvaW50 ZXINCj4gdG8gc3RhdGVtZW50IHByaXZhdGUgaW5zdGFuY2UuDQo+ICsNCj4gKyoqLw0KPiArUkVE RklTSF9QTEFURk9STV9DT05GSUdfU1RBVEVNRU5UX1BSSVZBVEUgKg0KPiArR2V0U3RhdGVtZW50 UHJpdmF0ZUJ5Q29uZmlndXJlTGFuZyAoDQo+ICsgIElOICBMSVNUX0VOVFJZICAqRm9ybXNldExp c3QsDQo+ICsgIElOICBDSEFSOCAgICAgICAqU2NoZW1hLA0KPiArICBJTiAgRUZJX1NUUklORyAg Q29uZmlndXJlTGFuZw0KPiArICApDQo+ICt7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqSGlpRm9ybXNldExpbms7DQo+ICsgIExJU1RfRU5UUlkgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSGlpRm9ybXNldE5leHRMaW5rOw0KPiArICBS RURGSVNIX1BMQVRGT1JNX0NPTkZJR19GT1JNX1NFVF9QUklWQVRFICAgKkhpaUZvcm1zZXRQcml2 YXRlOw0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhp aUZvcm1MaW5rOw0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKkhpaU5leHRGb3JtTGluazsNCj4gKyAgUkVERklTSF9QTEFURk9STV9DT05GSUdfRk9STV9Q UklWQVRFICAgICAgICpIaWlGb3JtUHJpdmF0ZTsNCj4gKyAgTElTVF9FTlRSWSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICpIaWlTdGF0ZW1lbnRMaW5rOw0KPiArICBMSVNUX0VOVFJZ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhpaU5leHRTdGF0ZW1lbnRMaW5rOw0K PiArICBSRURGSVNIX1BMQVRGT1JNX0NPTkZJR19TVEFURU1FTlRfUFJJVkFURQ0KPiAqSGlpU3Rh dGVtZW50UHJpdmF0ZTsNCj4gKyAgRUZJX1NUUklORyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFRtcFN0cmluZzsNCj4gKw0KPiArICBpZiAoKEZvcm1zZXRMaXN0ID09IE5VTEwpIHx8 IElTX0VNUFRZX1NUUklORyAoU2NoZW1hKSB8fA0KPiBJU19FTVBUWV9TVFJJTkcgKENvbmZpZ3Vy ZUxhbmcpKSB7DQo+ICsgICAgcmV0dXJuIE5VTEw7DQo+ICsgIH0NCj4gKw0KPiArICBpZiAoSXNM aXN0RW1wdHkgKEZvcm1zZXRMaXN0KSkgew0KPiArICAgIHJldHVybiBOVUxMOw0KPiArICB9DQo+ ICsNCj4gKyAgSGlpRm9ybXNldExpbmsgPSBHZXRGaXJzdE5vZGUgKEZvcm1zZXRMaXN0KTsNCj4g KyAgd2hpbGUgKCFJc051bGwgKEZvcm1zZXRMaXN0LCBIaWlGb3Jtc2V0TGluaykpIHsNCj4gKyAg ICBIaWlGb3Jtc2V0TmV4dExpbmsgPSBHZXROZXh0Tm9kZSAoRm9ybXNldExpc3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XRlLT5I aWlIYW5kbGUgPT0gSGlpSGFuZGxlKSB7DQo+ICsgICAgICByZXR1cm4gSGlpRm9ybXNldFByaXZh dGU7DQo+ICsgICAgfQ0KPiArDQo+ICsgICAgSGlpRm9ybXNldExpbmsgPSBIaWlGb3Jtc2V0TmV4 dExpbms7DQo+ICsgIH0NCj4gKw0KPiArICByZXR1cm4gTlVMTDsNCj4gK30NCj4gKw0KPiArLyoq DQo+ICsgIFJlbGVhc2UgZm9ybXNldCBhbmQgYWxsIHRoZSBmb3JtcyBhbmQgc3RhdGVtZW50cyB0 aGF0IGJlbG9uZyB0byB0aGlzDQo+IGZvcm1zZXQuDQo+ICsNCj4gKyAgQHBhcmFtW2luXSAgICAg IEZvcm1zZXRQcml2YXRlIFBvaW50ZXIgdG8gSFBfSElJX0ZPUk1fU0VUX1BSSVZBVEUNCj4gKw0K PiArICBAcmV0dmFsICAgICAgICAgRUZJX1NUQVRVUw0KPiArDQo+ICsqKi8NCj4gK0VGSV9TVEFU VVMNCj4gK1JlbGVhc2VGb3Jtc2V0ICgNCj4gKyAgSU4gUkVERklTSF9QTEFURk9STV9DT05GSUdf Rk9STV9TRVRfUFJJVkFURSAgKkZvcm1zZXRQcml2YXRlDQo+ICsgICkNCj4gK3sNCj4gKyAgTElT VF9FTlRSWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpIaWlGb3JtTGluazsNCj4g KyAgTElTVF9FTlRSWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpIaWlOZXh0Rm9y bUxpbms7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZPUk1fUFJJVkFURSAgICAgICAq SGlpRm9ybVByaXZhdGU7DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqSGlpU3RhdGVtZW50TGluazsNCj4gKyAgTElTVF9FTlRSWSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICpIaWlOZXh0U3RhdG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ArICBAcGFyYW1bb3V0XSBGb3Jtc2V0UHJpdmF0ZSAgVGhlIGZvcm1zZXQgcHJpdmF0ZSBk YXRhLg0KPiArDQo+ICsgIEByZXR2YWwgRUZJX1NUQVRVUw0KPiArDQo+ICsqKi8NCj4gK0VGSV9T VEFUVVMNCj4gK0xvYWRGb3Jtc2V0ICgNCj4gKyAgSU4gIEVGSV9ISUlfSEFORExFICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEhpaUhhbmRsZSwNCj4gKyAgT1VUIFJFREZJU0hfUExBVEZPUk1f Q09ORklHX0ZPUk1fU0VUX1BSSVZBVEUNCj4gKkZvcm1zZXRQcml2YXRlDQo+ICsgICkNCj4gK3sN Cj4gKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsN Cj4gKyAgSElJX0ZPUk1TRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpIaWlGb3Jt U2V0Ow0KPiArICBISUlfRk9STSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhp aUZvcm07DQo+ICsgIExJU1RfRU5UUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAq SGlpRm9ybUxpbms7DQo+ICsgIFJFREZJU0hfUExBVEZPUk1fQ09ORklHX0ZPUk1fUFJJVkFURSAg ICAgICAqSGlpRm9ybVByaXZhdGU7DQo+ICsgIEhJSV9TVEFURU1FTlQgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAqSGlpU3RhdGVtZW50Ow0KPiArICBMSVNUX0VOVFJZICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKkhpaVN0YXRlbWVudExpbms7DQo+ICsgIFJFREZJU0hfUExB VEZPUk1fQ09ORklHX1NUQVRFTUVOVF9QUklWQVRFDQo+ICpIaWlTdGF0ZW1lbnRQcml2YXRlOw0K PiArICBFRklfR1VJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWmVyb0d1aWQ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