Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AA71C433FE for ; Mon, 10 Jan 2022 18:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238895AbiAJSRC (ORCPT ); Mon, 10 Jan 2022 13:17:02 -0500 Received: from mswedge1.sunplus.com ([60.248.182.113]:50366 "EHLO mg.sunplus.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238848AbiAJSQ7 (ORCPT ); Mon, 10 Jan 2022 13:16:59 -0500 X-MailGates: (flag:3,DYNAMIC,RELAY,NOHOST:PASS)(compute_score:DELIVER,40 ,3) Received: from 172.17.9.112 by mg01.sunplus.com with MailGates ESMTP Server V5.0(27583:0:AUTH_RELAY) (envelope-from ); Tue, 11 Jan 2022 02:17:09 +0800 (CST) Received: from sphcmbx02.sunplus.com.tw (172.17.9.112) by sphcmbx02.sunplus.com.tw (172.17.9.112) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 11 Jan 2022 02:17:09 +0800 Received: from sphcmbx02.sunplus.com.tw ([fe80::fd3d:ad1a:de2a:18bd]) by sphcmbx02.sunplus.com.tw ([fe80::fd3d:ad1a:de2a:18bd%14]) with mapi id 15.00.1497.026; Tue, 11 Jan 2022 02:17:09 +0800 From: =?utf-8?B?V2VsbHMgTHUg5ZGC6Iqz6aiw?= To: Andy Shevchenko , Wells Lu CC: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Rob Herring , devicetree , linux-arm Mailing List , "dvorkin@tibbo.com" Subject: RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021 Thread-Topic: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021 Thread-Index: AQHX+JsJQRl6kRXEwk+dQHdfPj/+4axC0feAgAMwBYCAFqTKYA== Date: Mon, 10 Jan 2022 18:17:09 +0000 Message-ID: <0f6a382cd66d4d5d84201da0a29145a3@sphcmbx02.sunplus.com.tw> References: <1640331779-18277-1-git-send-email-wellslutw@gmail.com> <1640331779-18277-3-git-send-email-wellslutw@gmail.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.25.108.39] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQW5keSwNCg0KQ291bGQgeW91IHBsZWFzZSBhbnN3ZXIgbXkgcXVlc3Rpb25zIGluIHByZXZp b3VzIG1haWw/DQpJIG5lZWQgeW91ciBhbnN3ZXJzIHRvIHByb2NlZWQgc3VibWlzc2lvbi4NCg0K U29ycnksIEkgYW0gbm90IHN1cmUgaWYgbXkgcHJldmlvdXMgbWFpbCBpcyBsb3N0IG9yIHlvdSBh cmUgYnVzeS4NCg0KDQpCZXN0IHJlZ2FyZHMsDQoNCldlbGxzIEx1DQoNClNtYXJ0IENvbXB1dGlu ZyBQcm9ncmFtDQpIb21lIEVudGVydGFpbm1lbnQgQnVzaW5lc3MgVW5pdA0KU3VucGx1cyBUZWNo bm9sb2d5IENvLiwgTHRkLg0KMTksIElubm92YXRpb24gMXN0IFJvYWQsDQpTY2llbmNlLWJhc2Vk IEluZHVzdHJpYWwgUGFyaw0KSHNpbi1DaHUsIFRhaXdhbiAzMDANClRFTO+8mjg4Ni0zLTU3ODYw MDUgZXh0LiAyNTgwDQoNCg0KPiANCj4gSGkgQW5keSwNCj4gDQo+IFRoYW5rcyBhIGxvdCBmb3Ig eW91ciByZXZpZXcuDQo+IA0KPiANCj4gUGxlYXNlIHNlZSBteSBhbnN3ZXJzIGJlbG93Og0KPiAN Cj4gDQo+ID4gPg0KPiA+ID4gQWRkIGRyaXZlciBmb3IgU3VucGx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AgICAgICAgICAgICpudW1fZ3JvdXBzID0gZi0+Z251bTsNCj4gPiA+ICsg ICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGN0bC0+dW5xX2dycHNfc3o7IGkrKykNCj4g PiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmIChwY3RsLT5nMmZwX21hcHNbaV0uZl9pZHgg PT0gc2VsZWN0b3IpDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFr Ow0KPiA+ID4gKyAgICAgICAgICAgICAgICpncm91cHMgPSAmcGN0bC0+dW5xX2dycHNbaV07DQo+ ID4gPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4NCj4gPiA+ICsgICAgICAgfQ0KPiA+DQo+ ID4gPiArLyoqIHNwcGN0bF9mdWxseV9waW5tdXhfY29udiAtIENvbnZlcnQgR1BJTyMgdG8gZnVs bHktcGlubXV4DQo+ID4gPiArY29udHJvbC1maWVsZCBzZXR0aW5nDQo+ID4gPiArICoNCj4gPiA+ ICsgKiBFYWNoIGZ1bGx5LXBpbm11eCBmdW5jdGlvbiBjYW4gYmUgbWFwcGVkIHRvIGFueSBvZiBH UElPIDggfiA3MQ0KPiA+ID4gK2J5DQo+ID4gPiArICogc2V0dGluZ3MgaXRzIGNvbnRyb2wtZmll bGQuIFJlZmVyIHRvIGZvbGxvd2luZyB0YWJsZToNCj4gPiA+ICsgKg0KPiA+ID4gKyAqIGNvbnRy b2wtZmllbGQgfCAgR1BJTw0KPiA+ID4gKyAqIC0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tDQo+ID4g PiArICogICAgICAgIDAgICAgICB8ICBObyBtYXANCj4gPiA+ICsgKiAgICAgICAgMSAgICAgIHwg ICAgOA0KPiA+ID4gKyAqICAgICAgICAyICAgICAgfCAgICA5DQo+ID4gPiArICogICAgICAgIDMg ICAgICB8ICAgMTANCj4gPiA+ICsgKiAgICAgICAgOiAgICAgIHwgICAgOg0KPiA+ID4gKyAqICA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AqLw0KPiA+ID4gKyAgICAgICBmb3IgKGkgPSAwOyBpIDwgKCpudW1fbWFwcyk7IGkr Kykgew0KPiA+ID4gKyAgICAgICAgICAgICAgIGR0X3BpbiA9IGJlMzJfdG9fY3B1KGxpc3RbaV0p Ow0KPiA+ID4gKyAgICAgICAgICAgICAgIHBpbl9udW0gPSBGSUVMRF9HRVQoR0VOTUFTSygzMSwg MjQpLCBkdF9waW4pOw0KPiA+ID4gKw0KPiA+ID4gKyAgICAgICAgICAgICAgIC8qIENoZWNrIGlm IG91dCBvZiByYW5nZT8gKi8NCj4gPiA+ICsgICAgICAgICAgICAgICBpZiAocGluX251bSA+PSBz cHBjdGxfcGluc19hbGxfc3opIHsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGRldl9l cnIocGN0bGRldi0+ZGV2LCAiSW52YWxpZCBwaW4gcHJvcGVydHkNCj4gPiA+ICsgYXQgaW5kZXgg JWQNCj4gPiAoMHglMDh4KVxuIiwNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgaSwgZHRfcGluKTsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUlO VkFMOw0KPiA+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiA+ICsgICAgICAgfQ0KPiA+ID4gKw0K PiA+ID4gKyAgICAgICAqbWFwID0ga2NhbGxvYygqbnVtX21hcHMgKyBubUcsIHNpemVvZigqKm1h cCksIEdGUF9LRVJORUwpOw0KPiA+ID4gKyAgICAgICBmb3IgKGkgPSAwOyBpIDwgKCpudW1fbWFw cyk7IGkrKykgew0KPiA+ID4gKyAgICAgICAgICAgICAgIGR0X3BpbiA9IGJlMzJfdG9fY3B1KGxp c3RbaV0pOw0KPiA+ID4gKyAgICAgICAgICAgICAgIHBpbl9udW0gPSBGSUVMRF9HRVQoR0VOTUFT SygzMSwgMjQpLCBkdF9waW4pOw0KPiA+ID4gKyAgICAgICAgICAgICAgIHBpbl90eXBlID0gRklF TERfR0VUKEdFTk1BU0soMjMsIDE2KSwgZHRfcGluKTsNCj4gPiA+ICsgICAgICAgICAgICAgICBw aW5fZnVuYyA9IEZJRUxEX0dFVChHRU5NQVNLKDE1LCA4KSwgZHRfcGluKTsNCj4gPiA+ICsgICAg ICAgICAgICAgICAoKm1hcClbaV0ubmFtZSA9IHBhcmVudC0+bmFtZTsNCj4gPiA+ICsNCj4gPiA+ ICsgICAgICAgICAgICAgICBpZiAocGluX3R5cGUgPT0gU1BQQ1RMX1BDVExfR19HUElPKSB7DQo+ ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAvKiBBIGRpZ2l0YWwgR1BJTyBwaW4gKi8NCj4g PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVtpXS50eXBlID0gUElOX01BUF9UWVBF X0NPTkZJR1NfUElOOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgKCptYXApW2ldLmRh dGEuY29uZmlncy5udW1fY29uZmlncyA9IDE7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAg ICAoKm1hcClbaV0uZGF0YS5jb25maWdzLmdyb3VwX29yX3BpbiA9DQo+ID4gPiArIHBpbl9nZXRf bmFtZShwY3RsZGV2LA0KPiA+IHBpbl9udW0pOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgY29uZmlncyA9IGttYWxsb2Moc2l6ZW9mKCpjb25maWdzKSwgR0ZQX0tFUk5FTCk7DQo+ID4g PiArICAgICAgICAgICAgICAgICAgICAgICAqY29uZmlncyA9IEZJRUxEX0dFVChHRU5NQVNLKDcs IDApLCBkdF9waW4pOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgKCptYXApW2ldLmRh dGEuY29uZmlncy5jb25maWdzID0gY29uZmlnczsNCj4gPiA+ICsNCj4gPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgIGRldl9kYmcocGN0bGRldi0+ZGV2LCAiJXM6IEdQSU8gKCVzKVxuIiwNCj4g PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCptYXApW2ldLmRhdGEuY29uZmln cy5ncm91cF9vcl9waW4sDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgq Y29uZmlncyAmIChTUFBDVExfUENUTF9MX09VVCB8IFNQUENUTF9QQ1RMX0xfT1UxKSkgPw0KPiA+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiT1VUIiA6ICJJTiIpOw0KPiA+ID4g KyAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGluX3R5cGUgPT0gU1BQQ1RMX1BDVExfR19JT1BQ KSB7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAvKiBBIElPIFByb2Nlc3NvciAoSU9Q KSBwaW4gKi8NCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVtpXS50eXBlID0g UElOX01BUF9UWVBFX0NPTkZJR1NfUElOOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg KCptYXApW2ldLmRhdGEuY29uZmlncy5udW1fY29uZmlncyA9IDE7DQo+ID4gPiArICAgICAgICAg ICAgICAgICAgICAgICAoKm1hcClbaV0uZGF0YS5jb25maWdzLmdyb3VwX29yX3BpbiA9DQo+ID4g PiArIHBpbl9nZXRfbmFtZShwY3RsZGV2LA0KPiA+IHBpbl9udW0pOw0KPiA+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgY29uZmlncyA9IGttYWxsb2Moc2l6ZW9mKCpjb25maWdzKSwgR0ZQX0tF Uk5FTCk7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAqY29uZmlncyA9IFNQUENUTF9J T1BfQ09ORklHUzsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVtpXS5kYXRh LmNvbmZpZ3MuY29uZmlncyA9IGNvbmZpZ3M7DQo+ID4gPiArDQo+ID4gPiArICAgICAgICAgICAg ICAgICAgICAgICBkZXZfZGJnKHBjdGxkZXYtPmRldiwgIiVzOiBJT1BcbiIsDQo+ID4gPiArICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVtpXS5kYXRhLmNvbmZpZ3MuZ3JvdXBf b3JfcGluKTsNCj4gPiA+ICsgICAgICAgICAgICAgICB9IGVsc2Ugew0KPiA+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgLyogQSBmdWxseS1waW5tdXggcGluICovDQo+ID4gPiArICAgICAgICAg ICAgICAgICAgICAgICAoKm1hcClbaV0udHlwZSA9IFBJTl9NQVBfVFlQRV9NVVhfR1JPVVA7DQo+ ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAoKm1hcClbaV0uZGF0YS5tdXguZnVuY3Rpb24g PQ0KPiBzcHBjdGxfbGlzdF9mdW5jc1twaW5fZnVuY10ubmFtZTsNCj4gPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgICgqbWFwKVtpXS5kYXRhLm11eC5ncm91cCA9DQo+ID4gPiArIHBpbl9nZXRf bmFtZShwY3RsZGV2LCBwaW5fbnVtKTsNCj4gPiA+ICsNCj4gPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgIGRldl9kYmcocGN0bGRldi0+ZGV2LCAiJXM6ICVzXG4iLCAoKm1hcClbaV0uZGF0YS5t dXguZ3JvdXAsDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVtp XS5kYXRhLm11eC5mdW5jdGlvbik7DQo+ID4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ID4gKyAg ICAgICB9DQo+ID4gPiArDQo+ID4gPiArICAgICAgIC8qDQo+ID4gPiArICAgICAgICAqIFByb2Nl c3MgcHJvcGVydGllczoNCj4gPiA+ICsgICAgICAgICogICAgIGZ1bmN0aW9uID0gInh4eCI7DQo+ ID4gPiArICAgICAgICAqICAgICBncm91cHMgPSAieXl5IjsNCj4gPiA+ICsgICAgICAgICovDQo+ ID4gPiArICAgICAgIGlmIChubUcgPiAwICYmIG9mX3Byb3BlcnR5X3JlYWRfc3RyaW5nKG5wX2Nv bmZpZywgImZ1bmN0aW9uIiwgJnNfZikgPT0gMCkNCj4gew0KPiA+ID4gKyAgICAgICAgICAgICAg IG9mX3Byb3BlcnR5X2Zvcl9lYWNoX3N0cmluZyhucF9jb25maWcsICJncm91cHMiLCBwcm9wLCBz X2cpIHsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICgqbWFwKVsqbnVtX21hcHNdLnR5 cGUgPSBQSU5fTUFQX1RZUEVfTVVYX0dST1VQOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgKCptYXApWypudW1fbWFwc10uZGF0YS5tdXguZnVuY3Rpb24gPSBzX2Y7DQo+ID4gPiArICAg ICAgICAgICAgICAgICAgICAgICAoKm1hcClbKm51bV9tYXBzXS5kYXRhLm11eC5ncm91cCA9IHNf ZzsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICgqbnVtX21hcHMpKys7DQo+ID4gPiAr DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICBkZXZfZGJnKHBjdGxkZXYtPmRldiwgIiVz OiAlc1xuIiwgc19mLCBzX2cpOw0KPiA+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiA+ICsgICAg ICAgfQ0KPiA+ID4gKw0KPiA+ID4gKyAgICAgICAvKg0KPiA+ID4gKyAgICAgICAgKiBQcm9jZXNz IHByb3BlcnR5Og0KPiA+ID4gKyAgICAgICAgKiAgICAgc3VucGx1cyx6ZXJvX2Z1bmMgPSA8IHUz MiB1MzIgdTMyIC4uLj4NCj4gPiA+ICsgICAgICAgICovDQo+ID4gPiArICAgICAgIGxpc3QgPSBv Zl9nZXRfcHJvcGVydHkobnBfY29uZmlnLCAic3VucGx1cyx6ZXJvX2Z1bmMiLCAmc2l6ZSk7DQo+ ID4gPiArICAgICAgIGlmIChsaXN0KSB7DQo+ID4gPiArICAgICAgICAgICAgICAgZm9yIChpID0g MDsgaSA8IChzaXplIC8gc2l6ZW9mKCpsaXN0KSk7IGkrKykgew0KPiA+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgZHRfZnVuID0gYmUzMl90b19jcHUobGlzdFtpXSk7DQo+ID4gPiArICAgICAg ICAgICAgICAgICAgICAgICBpZiAoZHRfZnVuID49IHNwcGN0bF9saXN0X2Z1bmNzX3N6KSB7DQo+ ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldl9lcnIocGN0bGRldi0+ZGV2 LCAiWmVyby1mdW5jICVkIG91dCBvZiByYW5nZSFcbiIsDQo+ID4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZHRfZnVuKTsNCj4gPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY29udGludWU7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICB9 DQo+ID4gPiArDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICBmID0gJnNwcGN0bF9saXN0 X2Z1bmNzW2R0X2Z1bl07DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGYt PnR5cGUpIHsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgcGlubXV4X3R5cGVf ZnBteDoNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BwY3RsX2Z1bmNf c2V0KHBjdGwsIGR0X2Z1biwgMCk7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGRldl9kYmcocGN0bGRldi0+ZGV2LCAiJXM6IE5vIG1hcFxuIiwgZi0+bmFtZSk7DQo+ID4g PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ID4gKw0KPiA+ID4g KyAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBwaW5tdXhfdHlwZV9ncnA6DQo+ID4gPiArICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwcGN0bF9nbXhfc2V0KHBjdGwsIGYtPnJvZmYs IGYtPmJvZmYsIGYtPmJsZW4sIDApOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBkZXZfZGJnKHBjdGxkZXYtPmRldiwgIiVzOiBObyBtYXBcbiIsIGYtPm5hbWUpOw0KPiA+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gPiA+ICsNCj4gPiA+ ICsgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6DQo+ID4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRldl9lcnIocGN0bGRldi0+ZGV2LCAiV3JvbmcgemVyby1ncm91cDog JWQgKCVzKVxuIiwNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBkdF9mdW4sIGYtPm5hbWUpOw0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBicmVhazsNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiA+ICsgICAgICAg ICAgICAgICB9DQo+ID4gPiArICAgICAgIH0NCj4gPiA+ICsNCj4gPiA+ICsgICAgICAgb2Zfbm9k ZV9wdXQocGFyZW50KTsNCj4gPiA+ICsgICAgICAgZGV2X2RiZyhwY3RsZGV2LT5kZXYsICIlZCBw aW5zIG1hcHBlZFxuIiwgKm51bV9tYXBzKTsNCj4gPiA+ICsgICAgICAgcmV0dXJuIDA7DQo+ID4g PiArfQ0KPiA+DQo+ID4gLi4uDQo+ID4NCj4gPiA+ICsgICAgICAgc3BwY3RsLT5nMmZwX21hcHMg PSBkZXZtX2tjYWxsb2MoJnBkZXYtPmRldiwgc3BwY3RsLT51bnFfZ3Jwc19zeiArIDEsDQo+ID4g PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZigqc3BwY3Rs LT5nMmZwX21hcHMpLCBHRlBfS0VSTkVMK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