Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp75769pxa; Mon, 3 Aug 2020 23:22:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy84885UKHKgI3MN3EMEc+Y/FdHrCV/rnFkuQ4i/9IWjF2m1LD0FksnQ3n1kih6kVRteT5G X-Received: by 2002:a17:906:c29a:: with SMTP id r26mr19576910ejz.153.1596522122472; Mon, 03 Aug 2020 23:22:02 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x23si9234061eju.37.2020.08.03.23.21.38; Mon, 03 Aug 2020 23:22:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=MisVQ595; dkim=fail header.i=@Dell.onmicrosoft.com header.s=selector1-Dell-onmicrosoft-com header.b=Rft2GmdH; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728661AbgHDGVa (ORCPT + 99 others); Tue, 4 Aug 2020 02:21:30 -0400 Received: from mx0b-00154904.pphosted.com ([148.163.137.20]:27510 "EHLO mx0b-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbgHDGV3 (ORCPT ); Tue, 4 Aug 2020 02:21:29 -0400 Received: from pps.filterd (m0170398.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0746Jmsn029297; Tue, 4 Aug 2020 02:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=smtpout1; bh=R28oTWlMJATEMZ5MfuyaraanHqDrIvssL/JFMNWCHXU=; b=MisVQ595wMP9KjpvoJqe5S0JN5VmiCE40Rl7H+A7ms8+SvE7s4Jg/x7MwD5zOXytbxqI oF3YrRhNujSlihuIt8QAUA0cLmnWnjBM0Q+6K9Bb/kgfrbslGNqJ5Uo9wCYBJ0IXCKJ6 KoWGfCO/Op4faLGKIgjzg8VhBp+DAeWhKMUa/DK5M/HJYraING+DGYGuWuRZ+oWrE1Kr Je3AnPrp2wIHoI/C/S3z/8hA5nVyhgjGpDw7Q+fqx3Lw6F/jXCzgI4ur6wkqngCR8yug yiJ8oc8qUF4E51LTeSW4nfTyP42aturz7WYLr7tPaEaHGZtr8arxQz9ukDTJzggpbn2/ /Q== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0b-00154904.pphosted.com with ESMTP id 32n8177ejn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Aug 2020 02:21:17 -0400 Received: from pps.filterd (m0133268.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0746L81o113838; Tue, 4 Aug 2020 02:21:16 -0400 Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by mx0a-00154901.pphosted.com with ESMTP id 32q25184cx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Aug 2020 02:21:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQ/kgsmbVC1P9kyXtmAGrS8bVwZUlkAJF55eJYm/ABGXR5kmYWnT5qgKvlq3q5U5n0GOoNeNOKvXX2PrN8obpVluW0FoumNcViJk8XxNAobEpCK9+C9X+KxmL/E0458kJfcq+3pNStOr6LRJGWgmlJyGHAl0JvEYdCS3cqmu3MPG4J4DWNNI63ljMoffOLw09xrICJDb/lHiGZpbFDKn1YP6bmduMWmICwo6qcZLKr0MzAG3/+Pjidy8kcOc4NBQ8zsmOcmGTBCEOcxWV5sa5uzTg2MtfEj6Ma/1xSSyLIMk3V5nHZyauBHLlOitSBc+BG709wbuyZH/nE5qq/2PKw== 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-SenderADCheck; bh=R28oTWlMJATEMZ5MfuyaraanHqDrIvssL/JFMNWCHXU=; b=GEli21zbYYS0BgI9j1GhgXLY7xHqIzUm2wazl8Y4SD3G7upPWFDZmgL3cQ2bwzbUH4DNWHVFpVbMFgVqb7xThlbg260kKuBcYKZRQ9OKQ3RyxVX52L1hI2OZTj7rk6qtwsZ9E8hcPCTFJGOATwvUeTyhR9akoV6QFU4yF5GxxRsPP9g01H18spw2u4fD7e54E22S1nn2fudujiOdThjncO92zfzPtbHnuB+ItojfKpZmTrNZ8TROZGvkwaQHNcFJQnK+krBhWJt8YnKhxdHyGsCVc3nVviB0y9/qe/ljSb8uyY/qpjWGHNL0Hl3fRlwZG7lxrNqhkACvcFafG31CVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dell.com; dmarc=pass action=none header.from=dell.com; dkim=pass header.d=dell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Dell.onmicrosoft.com; s=selector1-Dell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R28oTWlMJATEMZ5MfuyaraanHqDrIvssL/JFMNWCHXU=; b=Rft2GmdHJipR7cycGtaeFoCQ99NuDaNDjUEetirh6fGggnpGFeIQezIFU6SXvGv45QW39gx1GQsImtKexO9j8OpXhXBZ0JPlhOpTOd0VfDmxLtVBrJA54OwTC5ucdqGkctoZ8zaLGasNipaYy3TrTaYEBZxWyebGiOjTDayre4U= Received: from SJ0PR19MB4528.namprd19.prod.outlook.com (2603:10b6:a03:28a::6) by BYAPR19MB3014.namprd19.prod.outlook.com (2603:10b6:a03:b4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.21; Tue, 4 Aug 2020 06:19:23 +0000 Received: from SJ0PR19MB4528.namprd19.prod.outlook.com ([fe80::35ee:af12:500e:9f13]) by SJ0PR19MB4528.namprd19.prod.outlook.com ([fe80::35ee:af12:500e:9f13%3]) with mapi id 15.20.3239.021; Tue, 4 Aug 2020 06:19:23 +0000 From: "Yuan, Perry" To: Andy Shevchenko CC: Sebastian Reichel , Matthew Garrett , =?utf-8?B?UGFsaSBSb2jDoXI=?= , Darren Hart , Andy Shevchenko , "Limonciello, Mario" , Linux PM , Linux Kernel Mailing List , Platform Driver Subject: RE: [PATCH] platform/x86:dell-laptop:Add battery charging thresholds and charging mode switch. Thread-Topic: [PATCH] platform/x86:dell-laptop:Add battery charging thresholds and charging mode switch. Thread-Index: AQHWZXUdJDuKgVR3CEC9cdT9c1KUKakeKdOAgAlT+MA= Date: Tue, 4 Aug 2020 06:19:23 +0000 Message-ID: References: <20200729065424.12851-1-Perry_Yuan@Dell.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=Dell.com; x-originating-ip: [101.80.141.212] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aa12c0a2-f7aa-4218-4efc-08d8383e54f7 x-ms-traffictypediagnostic: BYAPR19MB3014: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-exotenant: 2khUwGVqB6N9v58KS13ncyUmMJd8q4 x-ms-oob-tlc-oobclassifiers: OLM:1332; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pAZby47rgUuCTu1zsFTkKLRdPQ31pfsPT3Gk9L6UeKDMphfWkx44ICv7G+Hdhc0V01A1JZYKsMIp284tKpOnWSJVn7QzAQSG8F7kaCspBi4r6qLOj663uEpf/K4A3V42nO3a6MbM9+qUiWljHRTKxmiHDksR2nD6Kew3jwhvxN+L4hsd6gNgQlgaX7SczcLnqaFe3kAKb5V5hW2eEd4lqdrR1nfjJ6snGt6bI156oRsDKcHSQ/D9O8qHdQgLcDfAxYQS6HwUJUvXarjvkhxhtD1rCiMPcbnRF4Ecfn702NRqgi51/WYa37/kAYiMBjvutwOscU2megflWu3q47n5d0AN+M080W+HnNDwdXfENwBC3vkd/8Kgp1wEa5CCLs/RKbt+ZYrOBImjQf4e+gwgwg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR19MB4528.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(39860400002)(396003)(136003)(376002)(346002)(6506007)(786003)(54906003)(66476007)(7696005)(66946007)(8936002)(66574015)(53546011)(8676002)(76116006)(316002)(26005)(478600001)(9686003)(86362001)(83380400001)(5660300002)(33656002)(966005)(2906002)(55016002)(71200400001)(186003)(4326008)(6916009)(66556008)(64756008)(52536014)(66446008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: OG8Z5D9EWxnuOEesniDjZ1ni66iYasGAlJnNbgCZaamuo/uSMuICB6G5LAjDKg5NTt+RWnsTDXjL8AnJR3LdOiLwU1SAkakurR+EaQesv59bgJo3OvCa3L2IMDoHHu+gNAWypiACUbWhnnVAMf0BMvqRizs6qRppc+OQrEG8xXZk2ghUNoaL78yjHNzF8p5x2yFGBkX0rUzAqPhTI1dACbkO/uWlHt4SLZ6Ze2yALEQmKrHwBi+Srl9gx61shNYE4FDJPEmRgyZjU9YCyJXtgQipjbQKZyHN9EEVe1NDZmrFCGOSwwjUPa9OdJ4+VtjSYkdJPeekJlJ3kpwUny9iV2E+X26dFVO8AfSWg7yW2wlHPpmJ+A186xKJcsRnZngD9FX/qXm6FXyO4Qp1d+WU1mFFiRDiuAwYMr8OKsXNfhIe6/ObLTulPlwjSnCqItt5x4ODFfiFE1xiqKn+rJDD2W8111Cu1I2h5WugOk9XberCiY3N85Efk7GiOpn4o6lmoIzQVESlxhF+FA6R5F3lj8i8y2pkGZIVlHOc05JoSilpJsi66UJVzovTmdF5qAPVvWNaxSc7vzsXkGGDqQ3PAUeq+wt/fq9EkM0puZ99awxOPBHlzoaLQBsDSSHNSdQBcAxxobdIZg0bEIo29iGddQ== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Dell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR19MB4528.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa12c0a2-f7aa-4218-4efc-08d8383e54f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2020 06:19:23.6083 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 945c199a-83a2-4e80-9f8c-5a91be5752dd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tEdidrb+X4MFlRXOrCEgBEccrrIIxFPJ5H1Jclvd0yilOODTs2vltLq4O7MwyFE5Go57fPXz9mkfe0jU9QhgOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR19MB3014 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-04_02:2020-08-03,2020-08-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxscore=0 impostorscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040047 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040047 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBBbmR5IFNoZXZjaGVua28gPGFuZHkuc2hldmNoZW5rb0BnbWFpbC5jb20+DQo+IFNl bnQ6IFdlZG5lc2RheSwgSnVseSAyOSwgMjAyMCAzOjMyIFBNDQo+IFRvOiBZdWFuLCBQZXJyeQ0K PiBDYzogU2ViYXN0aWFuIFJlaWNoZWw7IE1hdHRoZXcgR2FycmV0dDsgUGFsaSBSb2jDoXI7IERh cnJlbiBIYXJ0OyBBbmR5DQo+IFNoZXZjaGVua287IExpbW9uY2llbGxvLCBNYXJpbzsgTGludXgg UE07IExpbnV4IEtlcm5lbCBNYWlsaW5nIExpc3Q7IFBsYXRmb3JtDQo+IERyaXZlcg0KPiBTdWJq ZWN0OiBSZTogW1BBVENIXSBwbGF0Zm9ybS94ODY6ZGVsbC1sYXB0b3A6QWRkIGJhdHRlcnkgY2hh cmdpbmcgdGhyZXNob2xkcw0KPiBhbmQgY2hhcmdpbmcgbW9kZSBzd2l0Y2guDQo+IA0KPiANCj4g W0VYVEVSTkFMIEVNQUlMXQ0KPiANCj4gT24gV2VkLCBKdWwgMjksIDIwMjAgYXQgOTo1NCBBTSBQ ZXJyeSBZdWFuIDxQZXJyeS5ZdWFuQGRlbGwuY29tPiB3cm90ZToNCj4gPg0KPiA+IEZyb206IHBl cnJ5X3l1YW4gPHBlcnJ5X3l1YW5AZGVsbC5jb20+DQo+IA0KPiBGaXggeW91ciBuYW1lLCBwbGVh c2UuIE9yIGRvIHl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iArICAgICAgICAgICAgICAgdG9rZW4gPSBkZWxsX3NtYmlvc19maW5kX3Rva2Vu KEJBVFRFUllfQ1VTVE9NX0NIQVJHRV9FTkQpOw0KPiA+ICsgICAgICAgICAgICAgICBpZiAoIXRv a2VuKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PREVWOw0KPiA+ICsg ICAgICAgICAgICAgICBkZWxsX2ZpbGxfcmVxdWVzdCgmYnVmZmVyLCB0b2tlbi0+bG9jYXRpb24s IDAsIDAsIDApOw0KPiA+ICsgICAgICAgICAgICAgICByZXQgPSBkZWxsX3NlbmRfcmVxdWVzdCgm YnVmZmVyLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDTEFT U19UT0tFTl9SRUFELCBTRUxFQ1RfVE9LRU5fU1REKTsNCj4gPiArICAgICAgICAgICAgICAgaWYg KHJldCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTzsNCj4gPiArICAg ICAgICAgICAgICAgKmVuZCA9IGJ1ZmZlci5vdXRwdXRbMV07DQo+ID4gKyAgICAgICB9DQo+IA0K PiAoMikNCj4gDQo+ICgxKSBhbmQgKDIpIGxvb2sgbGlrZSB0d2lucy4gQ2FyZSB0byBwcm92aWRl IGEgaGVscGVyIHRvIHNpbXBsaWZ5Pw0KPiANCj4gPiArICAgICAgIHJldHVybiAwOw0KPiA+ICt9 DQo+IA0KPiAuLi4NCj4gDQo+ID4gKyAgICAgICByZXQgPSBkZWxsX3NlbmRfcmVxdWVzdCgmYnVm ZmVyLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ0xBU1NfVE9LRU5fV1JJ VEUsIFNFTEVDVF9UT0tFTl9TVEQpOw0KPiA+ICsgICAgICAgaWYgKHJldCkNCj4gDQo+ID4gKyAg ICAgICAgICAgICAgIHJldHVybiAtRUlPOw0KPiANCj4gV2h5IHNoYWRvd2luZyBlcnJvciBjb2Rl Pw0KPiANCj4gLi4uDQo+IA0KPiA+ICsgICAgICAgcmV0ID0gZGVsbF9zZW5kX3JlcXVlc3QoJmJ1 ZmZlciwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENMQVNTX1RPS0VOX1dS SVRFLCBTRUxFQ1RfVE9LRU5fU1REKTsNCj4gPiArICAgICAgIGlmIChyZXQpDQo+ID4gKyAgICAg ICAgICAgICAgIHJldHVybiAtRUlPOw0KPiANCj4gRGl0dG8uDQo+IA0KPiA+ICsgICAgICAgcmV0 dXJuIHJldDsNCj4gDQo+IEFuZCBoZXJlIHBlcmhhcHMgc2ltcGxlICdyZXR1cm4gZGVsbF9zZW5k X3JlcXVlc3QoKTsnPw0KPiANCj4gLi4uDQo+IA0KPiA+ICsgICAgICAgc3dpdGNoIChtb2RlKSB7 DQo+ID4gKyAgICAgICBjYXNlIEJBVF9TVEFOREFSRF9NT0RFOg0KPiA+ICsgICAgICAgICAgICAg ICB0b2tlbiA9DQo+ID4gKyBkZWxsX3NtYmlvc19maW5kX3Rva2VuKEJBVF9TVEFOREFSRF9NT0RF X1RPS0VOKTsNCj4gDQo+ID4gKyAgICAgICAgICAgICAgIGlmICghdG9rZW4pDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9ERVY7DQo+IA0KPiA+ICsgICAgICAgICAgICAg ICBicmVhazsNCj4gPiArICAgICAgIGNhc2UgQkFUX0VYUFJFU1NfTU9ERToNCj4gPiArICAgICAg ICAgICAgICAgdG9rZW4gPQ0KPiA+ICsgZGVsbF9zbWJpb3NfZmluZF90b2tlbihCQVRfRVhQUkVT U19NT0RFX1RPS0VOKTsNCj4gDQo+ID4gKyAgICAgICAgICAgICAgIGlmICghdG9rZW4pDQo+ID4g KyAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9ERVY7DQo+IA0KPiA+ICsgICAgICAg ICAgICAgICBicmVhazsNCj4gPiArICAgICAgIGNhc2UgQkFUX1BSSU1BUklMWV9BQ19NT0RFOg0K PiA+ICsgICAgICAgICAgICAgICB0b2tlbiA9DQo+ID4gKyBkZWxsX3NtYmlvc19maW5kX3Rva2Vu KEJBVF9QUklNQVJJTFlfQUNfTU9ERV9UT0tFTik7DQo+IA0KPiA+ICsgICAgICAgICAgICAgICBp ZiAoIXRva2VuKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PREVWOw0K PiANCj4gPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAgICAgICBjYXNlIEJBVF9DVVNU T01fTU9ERToNCj4gPiArICAgICAgICAgICAgICAgdG9rZW4gPSBkZWxsX3NtYmlvc19maW5kX3Rv a2VuKEJBVF9DVVNUT01fTU9ERV9UT0tFTik7DQo+IA0KPiA+ICsgICAgICAgICAgICAgICBpZiAo IXRva2VuKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PREVWOw0KPiAN Cj4gPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAgICAgICBjYXNlIEJBVF9BREFQVElW RV9NT0RFOg0KPiA+ICsgICAgICAgICAgICAgICB0b2tlbiA9DQo+ID4gKyBkZWxsX3NtYmlvc19m aW5kX3Rva2VuKEJBVF9BREFQVElWRV9NT0RFX1RPS0VOKTsNCj4gDQo+ID4gKyAgICAgICAgICAg ICAgIGlmICghdG9rZW4pDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9E RVY7DQo+IA0KPiBGaXZlIHRpbWVzIHRoZSBzYW1lIGxpbmVzLiBQbGVhc2UgZGVkdXBsaWNhdGUg dGhlbS4gT25lIGlzIGVub3VnaC4NCj4gDQo+ID4gKyAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ ICsgICAgICAgZGVmYXVsdDoNCj4gDQo+ID4gKyAgICAgICAgICAgICAgIHByX3dhcm4oInVuc3Bw b3J0ZWQgY2hhcmdpbmcgbW9kZSF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sDQo+ID4gKyAgICAgICAgICAgICAgIHN0cnVjdCBk ZXZpY2VfYXR0cmlidXRlICphdHRyLA0KPiA+ICsgICAgICAgICAgICAgICBjaGFyICpidWYpDQo+ ID4gK3sNCj4gPiArICAgICAgIGVudW0gYmF0dGVyeV9jaGFyZ2luZ19tb2RlIG1vZGU7DQo+ID4g KyAgICAgICBjaGFyICpzID0gYnVmOw0KPiA+ICsNCj4gPiArICAgICAgIGZvciAobW9kZSA9IEJB VF9TVEFOREFSRF9NT0RFOyBtb2RlIDwgQkFUX01BWF9NT0RFOyBtb2RlKyspDQo+IHsNCj4gPiAr ICAgICAgICAgICAgICAgaWYgKGJhdHRlcnlfc3RhdGVbbW9kZV0pIHsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgICBpZiAobW9kZSA9PSBiYXRfY2hnX2N1cnJlbnQpDQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBzICs9IHNwcmludGYocywgIlslc10gIiwgYmF0dGVyeV9z dGF0ZVttb2RlXSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcyArPSBzcHJpbnRmKHMsICIlcyAiLA0KPiA+ICsg YmF0dGVyeV9zdGF0ZVttb2RlXSk7DQo+IA0KPiBZb3UgaGF2ZSB0byBjb250cm9sIGJ1ZmZlciBi b3VuZGFyaWVzLg0KPiANCj4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgfQ0KPiAN Cj4gPiArICAgICAgIGlmIChzICE9IGJ1ZikNCj4gDQo+IGlmIChzID09IGJ1ZikNCj4gICByZXR1 cm4gMDsNCj4gDQo+ID4gKyAgICAgICAgICAgICAgIC8qIGNvbnZlcnQgdGhlIGxhc3Qgc3BhY2Ug dG8gYSBuZXdsaW5lICovDQo+ID4gKyAgICAgICAgICAgICAgICoocy0xKSA9ICdcbic7DQo+ID4g KyAgICAgICByZXR1cm4gK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