From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8FAAA00B8; Mon, 28 Oct 2019 06:09:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABE621BEF9; Mon, 28 Oct 2019 06:09:00 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10043.outbound.protection.outlook.com [40.107.1.43]) by dpdk.org (Postfix) with ESMTP id 21E221BEF9 for ; Mon, 28 Oct 2019 06:08:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8z5HtAtIR5+WMY8b/4i875lNSruWlMHff5XB3T+og48=; b=x1h0Mflb9h1rF8Sq4RwXQqB6QH7F6Z8ouEVpiWFrzCR7TKfngQmp7kjI1shbOpc/AvljomoA0yYar6l9xQ49B1eC+hVdUdSOZ3xzduF/Wx+a+TYB7njawlsBEHRqDWC595et6oLkI67tfqCtkgedAjf09d2Ase72YAk46DwFIsU= Received: from VI1PR08CA0250.eurprd08.prod.outlook.com (2603:10a6:803:dc::23) by AM6PR08MB3285.eurprd08.prod.outlook.com (2603:10a6:209:4b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.24; Mon, 28 Oct 2019 05:08:57 +0000 Received: from AM5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by VI1PR08CA0250.outlook.office365.com (2603:10a6:803:dc::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2387.20 via Frontend Transport; Mon, 28 Oct 2019 05:08:57 +0000 Authentication-Results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=none action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT008.mail.protection.outlook.com (10.152.16.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2387.20 via Frontend Transport; Mon, 28 Oct 2019 05:08:57 +0000 Received: ("Tessian outbound 0cf06bf5c60e:v33"); Mon, 28 Oct 2019 05:08:55 +0000 X-CR-MTA-TID: 64aa7808 Received: from f887f4c0a2be.2 (cr-mta-lb-1.cr-mta-net [104.47.1.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id EA9266F3-ACB9-4D02-939D-7A0E253B1366.1; Mon, 28 Oct 2019 05:08:49 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2054.outbound.protection.outlook.com [104.47.1.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f887f4c0a2be.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Mon, 28 Oct 2019 05:08:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fS3jiTa1o5gTsA5gsBMzmP5YXbcQTXE3ZZFuvRDVvPZnhn+XDV/7jVrfIrWCpPoc4yxFgQYqwG9LVFWg4/DO99ckQbE/RI22LUh+I8URVKuHlU4cLEqYWzOHRSy3MK8mC39I4OcAFx2dH2XBgHmM43XnZ/I2mvcbQkx5yusBGZfloNH5HzNh2Gd3h+ftXl8r1iXvJBWcD1MrjbpygS/5sEA70TioYsZSSEqfLpCfodfrDedHFHAui2XFYmCedMYDJ8JMyJPSUlnVFwVOW6oTIovALdS/YMbzbjiZVnd3MJf7Crp7USZHSKsSS6iCFZOREmY3Lcw7CUdiitZjr9cuIg== 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=8z5HtAtIR5+WMY8b/4i875lNSruWlMHff5XB3T+og48=; b=e29j4dZrfMfcQdiJ6FBpli29VlcT8Vhnyo6mJ/Xcmq4OzUNCcCMy7CZnG7IzaodqoE2Owb4gLrXY0inTfCUeAIln+DLgHZ2zZNALjY+UGKvWzkWlRSQqNVT2vTghRm3nAw6vo5PdzleCmn/yN8+HvHRzvVN0hXTOP1wGm0eT24tj6v1kFwpYGR8zoRp4yNjrMRNTT1YCppwmgYNp1TquaO9aGke3iR1ggY/Wa0wDDL5liDHGjxxJKPk1ke5g1/AoMKFq2FrDj4wybWcvvUJiirUeLB+MG4EQ5oxQBy/+ro+n4QTMG47WErkfwWbl3tjfM9BM+G1T11Cgg4AmmceL5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8z5HtAtIR5+WMY8b/4i875lNSruWlMHff5XB3T+og48=; b=x1h0Mflb9h1rF8Sq4RwXQqB6QH7F6Z8ouEVpiWFrzCR7TKfngQmp7kjI1shbOpc/AvljomoA0yYar6l9xQ49B1eC+hVdUdSOZ3xzduF/Wx+a+TYB7njawlsBEHRqDWC595et6oLkI67tfqCtkgedAjf09d2Ase72YAk46DwFIsU= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (10.255.196.79) by VI1PR08MB4399.eurprd08.prod.outlook.com (20.179.28.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Mon, 28 Oct 2019 05:08:48 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::709e:c2c9:139d:9df3]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::709e:c2c9:139d:9df3%4]) with mapi id 15.20.2387.025; Mon, 28 Oct 2019 05:08:48 +0000 From: "Gavin Hu (Arm Technology China)" To: David Marchand CC: dev , nd , "Ananyev, Konstantin" , "thomas@monjalon.net" , Stephen Hemminger , "hemant.agrawal@nxp.com" , "jerinj@marvell.com" , Pavan Nikhilesh , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" , "Phil Yang (Arm Technology China)" , Steve Capper , nd Thread-Topic: [PATCH v11 2/5] eal: add the APIs to wait until equal Thread-Index: AQHVjQgXNkUQNLEsGECOKdShdn9MwqdvgFMg Date: Mon, 28 Oct 2019 05:08:47 +0000 Message-ID: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1572180765-49767-1-git-send-email-gavin.hu@arm.com> <1572180765-49767-3-git-send-email-gavin.hu@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 7eb4e773-e1aa-4598-889c-827e83b0a2b8.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f983683b-f256-4610-b5ed-08d75b64efc1 X-MS-TrafficTypeDiagnostic: VI1PR08MB4399:|VI1PR08MB4399:|AM6PR08MB3285: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:6790;OLM:6790; x-forefront-prvs: 0204F0BDE2 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(396003)(366004)(376002)(39850400004)(199004)(189003)(13464003)(229853002)(6116002)(3846002)(33656002)(6246003)(76176011)(14444005)(256004)(14454004)(102836004)(71200400001)(71190400001)(446003)(186003)(6506007)(55236004)(26005)(53546011)(305945005)(486006)(2906002)(11346002)(86362001)(7736002)(99286004)(476003)(5660300002)(66476007)(66446008)(64756008)(6436002)(4326008)(66556008)(66946007)(6916009)(52536014)(76116006)(7696005)(66066001)(81156014)(81166006)(8676002)(478600001)(54906003)(25786009)(316002)(8936002)(55016002)(9686003)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4399; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: DWMhMKKswHNKIFSFPAtR7v3IP1C68ONYtFVvC79Y6JQZlOjrTHbXTwPvHCnOVq//9NH4tPSRmwhnpr1HigUqXeTikiiVJA2dckOaRAYFUMpxAVD4g78OYVLK6U02zkfd0m5FVYdgQ5KdupHH/IEvfBdBP/5MKxtJwmRxYSvW40csI77q6pTI5VCH0DpwEbQ6dVXPAuxQTtaLMKJNsaU0WzeBcllq50RWTQJ0rzygeLp2Z1xEVlu9UX9/V/+pvjkpwwFhr2ztShK+FNYtJHewSCztbXvoUqoUsY0LIDk2e2NSfD3EX3uRxcQxszicvGtKLw1HpWTlIX+ck8SN5rsixHIbaB72Z2a5eFi7g0oxCPoTUekEW3OEfHoZ9MnDLfoSZ1agp/twmOYKVjFrNkDUyWHLH/hLJhRROOD3YnFKHcEwdgd3wxcbnGQSrFgHsFCB Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4399 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(39850400004)(376002)(346002)(396003)(1110001)(339900001)(189003)(199004)(13464003)(356004)(6246003)(6116002)(3846002)(99286004)(23676004)(2486003)(7696005)(36906005)(47776003)(6862004)(33656002)(14444005)(4326008)(105606002)(2906002)(229853002)(126002)(52536014)(76130400001)(5660300002)(86362001)(55016002)(9686003)(66066001)(50466002)(22756006)(486006)(446003)(53546011)(476003)(11346002)(6506007)(14454004)(7736002)(26826003)(186003)(8676002)(26005)(336012)(8936002)(436003)(102836004)(81156014)(81166006)(305945005)(25786009)(54906003)(316002)(76176011)(70206006)(478600001)(74316002)(70586007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3285; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Fail; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 5995444a-f697-4944-4149-08d75b64ea3e NoDisclaimer: True X-Forefront-PRVS: 0204F0BDE2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nG0urOrbhPxy1mUkPZFLKEKbh2XpdJOE8PxgGGPIPlq7iFEUuK852q+GqGoz/WcgPvt4kHRSLK6I3r69+49glBxyTfBTRlPJd792+J8xwBmYs+i6kqrF8IMaHkN2R6NEspKFAJRuiCtKYCOtGN1vUcE1gB4oYbqXzV6rzOXXB3JrUB5YbodlK4ONbCIi6nWqYqGSOoXVDJzhvq6/yDGpivbEuEOLNAihHV/me3W+TMtySml8oiUsKQ8sHo/tQqSSRogTBBn6sNon/DCkAvglwm0tN7s/279AXI7KByc0LxL2/MqwgY39H3+3gjKYS41931kVKOG89Ht6PBGdq+QUFrn/sS2utIfKSNPBKIM71ZN6q40SuhkYSzt/70T3K8RXfnE0xzMzqRsY3GoqBP7VwKQaeNqna73DzSLeUk3k1CT/GL00uAzt6iTjB7fEeOWM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2019 05:08:57.2700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f983683b-f256-4610-b5ed-08d75b64efc1 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3285 Subject: Re: [dpdk-dev] [PATCH v11 2/5] eal: add the APIs to wait until equal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGkgZGF2aWQsDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IERhdmlkIE1h cmNoYW5kIDxkYXZpZC5tYXJjaGFuZEByZWRoYXQuY29tPg0KPiBTZW50OiBNb25kYXksIE9jdG9i ZXIgMjgsIDIwMTkgNDo1MCBBTQ0KPiBUbzogR2F2aW4gSHUgKEFybSBUZWNobm9sb2d5IENoaW5h KSA8R2F2aW4uSHVAYXJtLmNvbT4NCj4gQ2M6IGRldiA8ZGV2QGRwZGsub3JnPjsgb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XhfMTYodm9sYXRpbGUgdWludDE2X3QgKmFkZHIsIGludCBtZW1vcmRlcikNCj4gPiArew0KPiA+ ICsgICAgICAgdWludDE2X3QgdG1wOw0KPiA+ICsgICAgICAgYXNzZXJ0KChtZW1vcmRlciA9PSBf X0FUT01JQ19BQ1FVSVJFKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHx8IChtZW1vcmRl ciA9PSBfX0FUT01JQ19SRUxBWEVEKSk7DQo+ID4gKyAgICAgICBpZiAobWVtb3JkZXIgPT0gX19B VE9NSUNfQUNRVUlSRSkNCj4gPiArICAgICAgICAgICAgICAgYXNtIHZvbGF0aWxlKCJsZGF4cmgg JXdbdG1wXSwgWyV4W2FkZHJdXSINCj4gPiArICAgICAgICAgICAgICAgICAgICAgICA6IFt0bXBd ICI9JnIiICh0bXApDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgOiBbYWRkcl0gInIiKGFk ZHIpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgOiAibWVtb3J5Iik7DQo+ID4gKyAgICAg ICBlbHNlIGlmIChtZW1vcmRlciA9PSBfX0FUT01JQ19SRUxBWEVEKQ0KPiA+ICsgICAgICAgICAg ICAgICBhc20gdm9sYXRpbGUoImxkeHJoICV3W3RtcF0sIFsleFthZGRyXV0iDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgOiBbdG1wXSAiPSZyIiAodG1wKQ0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgIDogW2FkZHJdICJyIihhZGRyKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IDogIm1lbW9yeSIpOw0KPiA+ICsgICAgICAgcmV0dXJuIHRtcDsNCj4gPiArfQ0KPiA+ICsNCj4g PiArc3RhdGljIF9fcnRlX2Fsd2F5c19pbmxpbmUgdWludDMyX3QNCj4gPiArcnRlX2F0b21pY19s b2FkX2V4XzMyKHZvbGF0aWxlIHVpbnQzMl90ICphZGRyLCBpbnQgbWVtb3JkZXIpDQo+ID4gK3sN Cj4gPiArICAgICAgIHVpbnQzMl90IHRtcDsNCj4gPiArICAgICAgIGFzc2VydCgobWVtb3JkZXIg PT0gX19BVE9NSUNfQUNRVUlSRSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICB8fCAobWVt b3JkZXIgPT0gX19BVE9NSUNfUkVMQVhFRCkpOw0KPiA+ICsgICAgICAgaWYgKG1lbW9yZGVyID09 IF9fQVRPTUlDX0FDUVVJUkUpDQo+ID4gKyAgICAgICAgICAgICAgIGFzbSB2b2xhdGlsZSgibGRh eHIgJXdbdG1wXSwgWyV4W2FkZHJdXSINCj4gPiArICAgICAgICAgICAgICAgICAgICAgICA6IFt0 bXBdICI9JnIiICh0bXApDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgOiBbYWRkcl0gInIi KGFkZHIpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgOiAibWVtb3J5Iik7DQo+ID4gKyAg ICAgICBlbHNlIGlmIChtZW1vcmRlciA9PSBfX0FUT01JQ19SRUxBWEVEKQ0KPiA+ICsgICAgICAg ICAgICAgICBhc20gdm9sYXRpbGUoImxkeHIgJXdbdG1wXSwgWyV4W2FkZHJdXSINCj4gPiArICAg ICAgICAgICAgICAgICAgICAgICA6IFt0bXBdICI9JnIiICh0bXApDQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgOiBbYWRkcl0gInIiKGFkZHIpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgOiAibWVtb3J5Iik7DQo+ID4gKyAgICAgICByZXR1cm4gdG1wOw0KPiA+ICt9DQo+ID4gKw0K PiA+ICtzdGF0aWMgX19ydGVfYWx3YXlzX2lubGluZSB1aW50NjRfdA0KPiA+ICtydGVfYXRvbWlj X2xvYWRfZXhfNjQodm9sYXRpbGUgdWludDY0X3QgKmFkZHIsIGludCBtZW1vcmRlcikNCj4gPiAr ew0KPiA+ICsgICAgICAgdWludDY0X3QgdG1wOw0KPiA+ICsgICAgICAgYXNzZXJ0KChtZW1vcmRl ciA9PSBfX0FUT01JQ19BQ1FVSVJFKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIHx8ICht ZW1vcmRlciA9PSBfX0FUT01JQ19SRUxBWEVEKSk7DQo+ID4gKyAgICAgICBpZiAobWVtb3JkZXIg PT0gX19BVE9NSUNfQUNRVUlSRSkNCj4gPiArICAgICAgICAgICAgICAgYXNtIHZvbGF0aWxlKCJs ZGF4ciAleFt0bXBdLCBbJXhbYWRkcl1dIg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIDog W3RtcF0gIj0mciIgKHRtcCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICA6IFthZGRyXSAi ciIoYWRkcikNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICA6ICJtZW1vcnkiKTsNCj4gPiAr ICAgICAgIGVsc2UgaWYgKG1lbW9yZGVyID09IF9fQVRPTUlDX1JFTEFYRUQpDQo+ID4gKyAgICAg ICAgICAgICAgIGFzbSB2b2xhdGlsZSgibGR4ciAleFt0bXBdLCBbJXhbYWRkcl1dIg0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgIDogW3RtcF0gIj0mciIgKHRtcCkNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgICA6IFthZGRyXSAiciIoYWRkcikNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICA6ICJtZW1vcnkiKTsNCj4gPiArICAgICAgIHJldHVybiB0bXA7DQo+ID4gK30NCj4gPiAr DQo+ID4gKyNpZmRlZiBSVEVfV0FJVF9VTlRJTF9FUVVBTF9BUkNIX0RFRklORUQNCj4gPiArc3Rh dGljIF9fcnRlX2Fsd2F5c19pbmxpbmUgdm9pZA0KPiA+ICtydGVfd2FpdF91bnRpbF9lcXVhbF8x Nih2b2xhdGlsZSB1aW50MTZfdCAqYWRkciwgdWludDE2X3QgZXhwZWN0ZWQsDQo+ID4gK2ludCBt ZW1vcmRlcikNCj4gPiArew0KPiA+ICsgICAgICAgaWYgK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