From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: bob.c.feng@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Wed, 31 Jul 2019 05:46:52 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2019 05:46:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="191236284" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 31 Jul 2019 05:46:52 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 31 Jul 2019 05:46:51 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 31 Jul 2019 05:46:51 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.15]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Wed, 31 Jul 2019 20:46:49 +0800 From: "Bob Feng" To: "devel@edk2.groups.io" , "philmd@redhat.com" CC: "Gao, Liming" Subject: Re: [edk2-devel] [Patch 02/10 V5] BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions Thread-Topic: [edk2-devel] [Patch 02/10 V5] BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions Thread-Index: AQHVR2RS9pk91xHVVkiDLFejvdJWjKbkEsaAgACSllA= Date: Wed, 31 Jul 2019 12:46:48 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160B508C4@SHSMSX105.ccr.corp.intel.com> References: <20190731055244.19872-1-bob.c.feng@intel.com> <20190731055244.19872-3-bob.c.feng@intel.com> <888a51e2-97e7-b95d-359e-122406327810@redhat.com> In-Reply-To: <888a51e2-97e7-b95d-359e-122406327810@redhat.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGI5ZjUyNzUtNDQ4NC00MDQzLWE2ZTEtMmZhZTA5MzMzOWZhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidUZ6QnF1QlVndzlpQTNxZUZkazU5K2hpbTFnXC9iWmV5SnFZZHBZOGtydGdsNG5SR0FEWGEzdzRvWWdab2hRNysifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgUGhpbCwNCg0KSSBkb3VibGUgY2hlY2tlZCB5b3VyIHByZXZpb3VzIG1haWwuIEkgbWlzc2Vk IHlvdXIgY29tbWVudHMgaW5zaWRlIHRoZSBwYXRjaCBjb250ZW50IHRoZW4uIFNvcnJ5Lg0KDQpQ bGF0Zm9ybS5QY2RzIA0KDQpZZXMsIHRoaXMgc3RhdGVtZW50IGxvb2tzIG9kZCwgYnV0IGl0J3Mg bm90IGFuIGluY29ycmVjdCBjb3B5L3Bhc3RlLiBJIHRoa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Y2hlW0FyY2hdOg0K PiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaw0KPiAgICAgICAgICAgICAg ICAgICAgICAgICAgZWxzZToNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb2R1bGVE YXRhID0gc2VsZi5CdWlsZERhdGFiYXNlW01vZHVsZUZpbGUsIEFyY2gsIFRhcmdldCwgVG9vbGNo YWluXQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vZHVsZURhdGEgPSANCj4gKyBz ZWxmLkJ1aWxkRGF0YWJhc2VbTW9kdWxlRmlsZSwgQXJjaCwgc2VsZi5CdWlsZFRhcmdldCwgDQo+ ICsgc2VsZi5Ub29sQ2hhaW5dDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgbm90 IE1vZHVsZURhdGEuSXNCaW5hcnlNb2R1bGU6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEVka0xvZ2dlci5lcnJvcignYnVpbGQnLCANCj4gUEFSU0VSX0VSUk9SLCAiTW9kdWxl ICVzIE5PVCBmb3VuZCBpbiBEU0MgZmlsZTsgSXMgaXQgcmVhbGx5IGEgYmluYXJ5IA0KPiBtb2R1 bGU/IiAlIE1vZHVsZUZpbGUpDQo+ICANCj4gICAgICAgICAgICAgICAgICBlbHNlOg0KPiAgICAg ICAgICAgICAgICAgICAgICBmb3IgQXJjaCBpbiBzZWxmLkFyY2hMaXN0Og0KPiAgICAgICAgICAg ICAgICAgICAgICAgICAgaWYgQXJjaCA9PSBrZXk6DQo+IC0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgUGxhdGZvcm0gPSBzZWxmLkJ1aWxkRGF0YWJhc2Vbc2VsZi5NZXRhRmlsZSwgQXJjaCwg VGFyZ2V0LCBUb29sY2hhaW5dDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGxhdGZv cm0gPSANCj4gKyBzZWxmLkJ1aWxkRGF0YWJhc2Vbc2VsZi5NZXRhRmlsZSwgQXJjaCwgc2VsZi5C dWlsZFRhcmdldCwgDQo+ICsgc2VsZi5Ub29sQ2hhaW5dDQo+ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgTWV0YUZpbGVMaXN0ID0gc2V0KCkNCj4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBmb3IgUGtleSBpbiBQbGF0Zm9ybS5Nb2R1bGVzOg0KPiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBNZXRhRmlsZUxpc3QuYWRkKFBsYXRmb3JtLk1vZHVsZXNbUGtleV0uTWV0 YUZpbGUpDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIEluZiBpbiBzZWxmLkZk ZlByb2ZpbGUuSW5mRGljdFtrZXldOg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBNb2R1bGVGaWxlID0gUGF0aENsYXNzKE5vcm1QYXRoKEluZiksIEdsb2JhbERhdGEuZ1dvcmtz cGFjZSwgQXJjaCkNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgTW9kdWxl RmlsZSBpbiBNZXRhRmlsZUxpc3Q6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjb250aW51ZQ0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb2R1bGVE YXRhID0gc2VsZi5CdWlsZERhdGFiYXNlW01vZHVsZUZpbGUsIEFyY2gsIFRhcmdldCwgVG9vbGNo YWluXQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb2R1bGVEYXRhID0gDQo+ ICsgc2VsZi5CdWlsZERhdGFiYXNlW01vZHVsZUZpbGUsIEFyY2gsIHNlbGYuQnVpbGRUYXJnZXQs IA0KPiArIHNlbGYuVG9vbENoYWluXQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpZiBub3QgTW9kdWxlRGF0YS5Jc0JpbmFyeU1v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mLCBzZWxmLk1ldGFGaWxlLCBU YXJnZXQsIFRvb2xjaGFpbiwgQXJjaCkNCj4gKyAgICAgICAgICAgIFBHZW4gPSBQbGF0Zm9ybUF1 dG9HZW4oc2VsZiwgc2VsZi5NZXRhRmlsZSwgDQo+ICsgc2VsZi5CdWlsZFRhcmdldCwgc2VsZi5U b29sQ2hhaW4sIEFyY2gpDQo+ICAgICAgICAgICAgICBmb3IgQnVpbGREYXRhIGluIGxpc3QoUEdl bi5CdWlsZERhdGFiYXNlLl9DQUNIRV8udmFsdWVzKCkpOg0KPiAgICAgICAgICAgICAgICAgIGlm IEJ1aWxkRGF0YS5BcmNoICE9IEFyY2g6DQo+ICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVl DQo+ICAgICAgICAgICAgICAgICAgaWYgQnVpbGREYXRhLk1ldGFGaWxlLkV4dCA9PSAnLmluZic6 DQo+ICAgICAgICAgICAgICAgICAgICAgIGZvciBrZXkgaW4gQnVpbGREYXRhLlBjZHM6DQo+IEBA IC00ODMsMTEgKzUxNiwxMSBAQCBjbGFzcyBXb3Jrc3BhY2VBdXRvR2VuKEF1dG9HZW4pOg0KPiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkRGF0YS5QY2RzW2tl eV0uVHlwZSA9IFBjZEluUGxhdGZvcm0uVHlwZQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEJ1aWxkRGF0YS5QY2RzW2tleV0uUGVuZGluZyA9IEZhbHNlDQo+ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZToNCj4gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgI1BjZCB1c2VkIGluIExpYnJhcnksIFBjZCBUeXBlIGZyb20gcmVmZXJlbmNl IG1vZHVsZSBpZiBQY2QgVHlwZSBpcyBQZW5kaW5nDQo+ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGlmIEJ1aWxkRGF0YS5QY2RzW2tleV0uUGVuZGluZzoNCj4gLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE1HZW4gPSBNb2R1bGVBdXRvR2VuKHNlbGYsIEJ1aWxk RGF0YS5NZXRhRmlsZSwgVGFyZ2V0LCBUb29sY2hhaW4sIEFyY2gsIHNlbGYuTWV0YUZpbGUpDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNR2VuID0gTW9kdWxlQXV0b0dl bihzZWxmLCANCj4gKyBCdWlsZERhdGEuTWV0YUZpbGUsIHNlbGYuQnVpbGRUYXJnZXQsIHNlbGYu VG9vbENoYWluLCBBcmNoLCANCj4gKyBzZWxmLk1ldGFGaWxlKQ0KPiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaWYgTUdlbiBhbmQgTUdlbi5Jc0xpYnJhcnk6DQo+ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgTUdlbiBpbiBQR2VuLkxpYnJh cnlBdXRvR2VuTGlzdDoNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgUmVmZXJlbmNlTW9kdWxlcyA9IE1HZW4uUmVmZXJlbmNlTW9kdWxlcw0KPiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgUmVmZXJlbmNlTW9kdWxl IGluIFJlZmVyZW5jZU1vZHVsZXM6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpZiBSZWZlcmVuY2VNb2R1bGUuTWV0YUZpbGUgaW4gUGxhdGZvcm0u TW9kdWxlczoNCj4gQEAgLTQ5NywxMCArNTMwLDI0IEBAIGNsYXNzIFdvcmtzcGFjZUF1dG9HZW4o QXV0b0dlbik6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGlmIFBjZEluUmVmZXJlbmNlTW9kdWxlLlR5cGU6DQo+ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWlsZERh dGEuUGNkc1trZXldLlR5cGUgPSBQY2RJblJlZmVyZW5jZU1vZHVsZS5UeXBlDQo+ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWls ZERhdGEuUGNkc1trZXldLlBlbmRpbmcgPSBGYWxzZQ0KPiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsNCj4gIA0KPiArICAg IGRlZiBQcm9jZXNzTWl4ZWRQY2Qoc2VsZik6DQo+ICsgICAgICAgIGZvciBBcmNoIGluIHNlbGYu QXJjaExpc3Q6DQo+ICsgICAgICAgICAgICBTb3VyY2VQY2REaWN0ID0ge1RBQl9QQ0RTX0RZTkFN SUNfRVg6c2V0KCksIFRBQl9QQ0RTX1BBVENIQUJMRV9JTl9NT0RVTEU6c2V0KCksVEFCX1BDRFNf RFlOQU1JQzpzZXQoKSxUQUJfUENEU19GSVhFRF9BVF9CVUlMRDpzZXQoKX0NCj4gKyAgICAgICAg ICAgIEJpbmFyeVBjZERpY3QgPSB7VEFCX1BDRFNfRFlOQU1JQ19FWDpzZXQoKSwgVEFCX1BDRFNf UEFUQ0hBQkxFX0lOX01PRFVMRTpzZXQoKX0NCj4gKyAgICAgICAgICAgIFNvdXJjZVBjZERpY3Rf S2V5cyA9IFNvdXJjZVBjZERpY3Qua2V5cygpDQo+ICsgICAgICAgICAgICBCaW5hcnlQY2REaWN0 X0tleXMgPSBCaW5hcnlQY2REaWN0LmtleXMoKQ0KPiArDQo+ICsgICAgICAgICAgICAjIGdlbmVy YXRlIHRoZSBTb3VyY2VQY2REaWN0IGFuZCBCaW5hcnlQY2REaWN0DQo+ICsgICAgICAgICAgICBQ R2VuID0gUG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LTUxNCwxMiArNTYxLDEx IEBAIGNsYXNzIFdvcmtzcGFjZUF1dG9HZW4oQXV0b0dlbik6DQo+ICANCj4gICAgICAgICAgICAg ICAgICAgICAgICAgIGVsaWYgVEFCX1BDRFNfRFlOQU1JQyBpbiBCdWlsZERhdGEuUGNkc1trZXld LlR5cGU6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU291cmNlUGNkRGljdFtUQUJf UENEU19EWU5BTUlDXS5hZGQoKEJ1aWxkRGF0YS5QY2RzW2tleV0uVG9rZW5DTmFtZSwgQnVpbGRE YXRhLlBjZHNba2V5XS5Ub2tlblNwYWNlR3VpZENOYW1lKSkNCj4gICAgICAgICAgICAgICAgICAg ICAgICAgIGVsaWYgVEFCX1BDRFNfRklYRURfQVRfQlVJTEQgaW4gQnVpbGREYXRhLlBjZHNba2V5 XS5UeXBlOg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvdXJjZVBjZERpY3RbVEFC X1BDRFNfRklYRURfQVRfQlVJTERdLmFkZCgoQnVpbGREYXRhLlBjZHNba2V5XS5Ub2tlbkNOYW1l LCBCdWlsZERhdGEuUGNkc1trZXldLlRva2VuU3BhY2VHdWlkQ05hbWUpKQ0KPiAtICAgICAgICAg ICAgICAgIGVsc2U6DQo+IC0gICAgICAgICAgICAgICAgICAgIHBhc3MNCj4gKw0KPiAgICAgICAg ICAgICAgIw0KPiAgICAgICAgICAgICAgIyBBIFBDRCBjYW4gb25seSB1c2Ugb25lIHR5cGUgZm9y IGFsbCBzb3VyY2UgbW9kdWxlcw0KPiAgICAgICAgICAgICAgIw0KPiAgICAgICAgICAgICAgZm9y IGkgaW4gU291cmNlUGNkRGljdF9LZXlzOg0KPiAgICAgICAgICAgICAgICAgIGZvciBqIGluIFNv dXJjZVBjZERpY3RfS2V5czoNCj4gQEAgLTU4OCwyNyArNjM0LDM4IEBAIGNsYXNzIFdvcmtzcGFj ZUF1dG9HZW4oQXV0b0dlbik6DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBkZWwgQnVpbGREYXRhLlBjZHNba2V5XQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgQnVpbGREYXRhLlBjZHNbbmV3a2V5XSA9IFZhbHVlDQo+ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBicmVhaw0KPiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGJyZWFrDQo+ICANCj4gLSAgICAgICAgICAgICMgaGFuZGxlIHRoZSBtaXhlZCBwY2QgaW4g RkRGIGZpbGUNCj4gLSAgICAgICAgICAgIGZvciBrZXkgaW4gUGNkU2V0Og0KPiAtICAgICAgICAg ICAgICAgIGlmIGtleSBpbiBHbG9iYWxEYXRhLk1peGVkUGNkOg0KPiAtICAgICAgICAgICAgICAg ICAgICBWYWx1ZSA9IFBjZFNldFtrZXldDQo+IC0gICAgICAgICAgICAgICAgICAgIGRlbCBQY2RT ZXRba2V5XQ0KPiAtICAgICAgICAgICAgICAgICAgICBmb3IgaXRlbSBpbiBHbG9iYWxEYXRhLk1p eGVkUGNkW2tleV06DQo+IC0gICAgICAgICAgICAgICAgICAgICAgICBQY2RTZXRbaXRlbV0gPSBW YWx1ZQ0KPiArICAgICNDb2xsZWN0IHBhY2thZ2Ugc2V0IGluZm9ybWF0aW9uIGZyb20gSU5GIG9m IEZERg0KPiArICAgIEBjYWNoZWRfcHJvcGVydHkNCj4gKyAgICBkZWYgUGtnU2V0KHNlbGYpOg0K PiArICAgICAgICBpZiBub3Qgc2VsZi5GZGZGaWxlOg0KPiArICAgICAgICAgICAgc2VsZi5GZGZG aWxlID0gc2VsZi5QbGF0Zm9ybS5GbGFzaERlZmluaXRpb24NCj4gIA0KPiAtICAgICAgICAgICAg I0NvbGxlY3QgcGFja2FnZSBzZXQgaW5mb3JtYXRpb24gZnJvbSBJTkYgb2YgRkRGDQo+ICsgICAg ICAgIGlmIHNlbGYuRmRmRmlsZToNCj4gKyA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HRoZSBBY3RpdmUgUGxhdGZvcm0gYW5kIEZERiBmaWxlLg0KPiAgICAgICAg ICAjDQo+ICAgICAgICAgIGNvbnRlbnQgPSAnZ0NvbW1hbmRMaW5lRGVmaW5lczogJw0KPiAgICAg ICAgICBjb250ZW50ICs9IHN0cihHbG9iYWxEYXRhLmdDb21tYW5kTGluZURlZmluZXMpDQo+IEBA IC02ODEsMjcgKzczNCwzMSBAQCBjbGFzcyBXb3Jrc3BhY2VBdXRvR2VuKEF1dG9HZW4pOg0KPiAg ICAgICAgICAgICAgY29udGVudCArPSAnRmxhc2ggSW1hZ2UgRGVmaW5pdGlvbjogJw0KPiAgICAg ICAgICAgICAgY29udGVudCArPSBzdHIoc2VsZi5GZGZGaWxlKQ0KPiAgICAgICAgICAgICAgY29u dGVudCArPSBUQUJfTElORV9CUkVBSw0KPiAgICAgICAgICBTYXZlRmlsZU9uQ2hhbmdlKG9zLnBh dGguam9pbihzZWxmLkJ1aWxkRGlyLCAnQnVpbGRPcHRpb25zJyksIA0KPiBjb250ZW50LCBGYWxz ZSkNCj4gIA0KPiArICAgIGRlZiBDcmVhdGVQY2RUb2tlbk51bWJlckZpbGUoc2VsZik6DQo+ICAg ICAgICAgICMNCj4gICAgICAgICAgIyBDcmVhdGUgUGNkVG9rZW4gTnVtYmVyIGZpbGUgZm9yIER5 bmFtaWMvRHluYW1pY0V4IFBjZC4NCj4gICAgICAgICAgIw0KPiAgICAgICAgICBQY2RUb2tlbk51 bWJlciA9ICdQY2RUb2tlbk51bWJlcjogJw0KPiAtICAgICAgICBpZiBQYS5QY2RUb2tlbk51bWJl cjoNCj4gLSAgICAgICAgICAgIGlmIFBhLkR5bmFtaWNQY2RMaXN0Og0KPiAtICAgICAgICAgICAg ICAgIGZvciBQY2QgaW4gUGEuRHluYW1pY1BjZExpc3Q6DQo+IC0gICAgICAgICAgICAgICAgICAg IFBjZFRva2VuTnVtYmVyICs9IFRBQl9MSU5FX0JSRUFLDQo+IC0gICAgICAgICAgICA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