From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0041.outbound.protection.outlook.com [104.47.1.41]) by dpdk.org (Postfix) with ESMTP id B52B1235 for ; Mon, 23 Jul 2018 19:51:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ekXE6UIs9oEaOGrnrbsorgT9eI5WiKhgRhgaAuiw/r0=; b=a2QGxWRIqUNwxCRh1Eg+WGI4KcXZ3D5VdWSI5GDet/jA2wWF6Vz1Q10BhMTXMZdqQS7LaJ6k1o2TOcIY/Sg9WHoAlRgDZjdy+YUi3gjJiExtdKsMvY5DZAUW/mWWFOxPXyMkppzxY6ILOX2herqD85a4FnEcMjMoKDvJmGfCCS8= Received: from HE1PR0801MB1930.eurprd08.prod.outlook.com (10.168.94.136) by HE1PR0801MB1979.eurprd08.prod.outlook.com (10.168.94.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Mon, 23 Jul 2018 17:51:39 +0000 Received: from HE1PR0801MB1930.eurprd08.prod.outlook.com ([fe80::91b6:6ee2:2a24:6222]) by HE1PR0801MB1930.eurprd08.prod.outlook.com ([fe80::91b6:6ee2:2a24:6222%4]) with mapi id 15.20.0973.022; Mon, 23 Jul 2018 17:51:39 +0000 From: Honnappa Nagarahalli To: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= , Olivier Matz CC: "dev@dpdk.org" Thread-Topic: rte_mbuf library likely()/unlikely() Thread-Index: AdQijJFADUW5GJG1Tt2Vvg9FS1SjPQAIQl3Q Date: Mon, 23 Jul 2018 17:51:38 +0000 Message-ID: References: <98CBD80474FA8B44BF855DF32C47DC35B421EE@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35B421EE@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0801MB1979; 6:xSlZ8xEtgz1COgeNiAeR/v/J/xq5RfnAIFQ7hc8d3yg+qjwQt7CO/G8vhC/YeUq1kDGEybuhbYpnY5ypANIlZ01VLqjI7lUZKubkvjBbbdOdUveEc+5MzqKNPqtbKEg0Ku/u49+BFstkMXtSu6tRrVkV2iUDBRmGnoJmbK0+Vq7nsYUVoagyNtkbJsrZy+vVGDT/xZcbJIVDSqEGDCDKZqhdnq+NKe+d+BD6TMWejPfupW5M6BUMCQG5Cb5QQC06Lz36LTmW10rBYuozOm2kqbP/W5/L6aYzmRfHRXBNli/THiBMyxigKqU+Vii8HZhf/1lfw/lkIEDElhj/ZyeiKgLdLpbin0/wKJaaujUZH1k4qBEBdK0hx/9VArqopWoqx7Ur7K+bhEv4X4N2BvLHsJ4a1/p5GeyNAc6kq5fl+IsbPu05gYQmaAXifRmJb2oq+eBluKlv9IykTUNwHU5+Gg==; 5:zWzuktSWgAjswZbGykefCHCSpmeBFuZZ0VFImKc5iEAqoAyu8r9hqhoOqVzL2x2JsGgNs/Ff59hXilhLsDkqP/9qlhWaJ2sD774gOKqNWJCx4AIdduGANk/idd9TsHvUV5XBNXP5dW//zo6D5iaWlxlCKxrMVQZbt7jlu0zPTgc=; 7:3jRyW985880TRP/t8mWbGDsHT6rudTXU1fS196LvbnT2AqGWHzk/UAyVNvTY8yHrrWmslLAdBkiqcWvKLh805CnsmLKuzydHWIAPAQ08As5IZ52Di8HWRLp2d9bjvqI3B0YXLa1XA0CrFDWSIzQ/PRTJodViuyWGZZVuUCWeT6VJDsmFK79p/4kxN7Ah3iKBjSzRJMLJCqYf3BCwZ7Z61VViRNmvgBUWhLVJKvwzCKPRl2VStYQvAunOnx9lP5Dz x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d7419af3-079f-40f0-9e4e-08d5f0c4f0fe x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0801MB1979; x-ms-traffictypediagnostic: HE1PR0801MB1979: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(223705240517415); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:HE1PR0801MB1979; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1979; x-forefront-prvs: 0742443479 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(366004)(13464003)(40434004)(199004)(189003)(14444005)(5024004)(68736007)(478600001)(5660300001)(6116002)(3846002)(229853002)(2906002)(14454004)(106356001)(2900100001)(5250100002)(97736004)(7736002)(66066001)(8936002)(81166006)(8676002)(81156014)(305945005)(74316002)(53936002)(476003)(186003)(11346002)(6246003)(26005)(486006)(4326008)(33656002)(15974865002)(25786009)(446003)(99286004)(316002)(256004)(55016002)(6436002)(105586002)(72206003)(7696005)(76176011)(6306002)(9686003)(53546011)(110136005)(86362001)(102836004)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1979; H:HE1PR0801MB1930.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-microsoft-antispam-message-info: PevCc+2kq3hoeYHaalZC0UTUURDENA7yQjMP1JejOnP4iYilc8W7xE7EpetbJ4mQP9nYfVd+xHhZy3y0m25pWDIoLkwN2q6uhICJUVGZ/22DpfXVOJKx3Tdvy5AoBLUBLV2y8oyFBp5wZ94lzy+0Mn5mVSpAxxaNU/+Ej4ksivhVGsQjDVjs3ryQQGNf3FH0bVE86wcki7uNdEn46r7KGdF6lMtXkF4D5MgTwoDnikACCP6Pkm8YEhAlH+tI+BtwtzQp5U5nDmB5xYdEwp3MFv/WDJPIY/F3L/HXfZyxYvqGOam4+0xgBU6dYqXsUDrOkfAQoa/urDsAm+tZxNNAFqgP0rFGvewGNBwygeN9kzE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7419af3-079f-40f0-9e4e-08d5f0c4f0fe X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2018 17:51:38.8236 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1979 Subject: Re: [dpdk-dev] rte_mbuf library likely()/unlikely() 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: , X-List-Received-Date: Mon, 23 Jul 2018 17:51:42 -0000 RG8geW91IHNlZSBhbnkgcGVyZm9ybWFuY2UgaW1wcm92ZW1lbnRzIHdpdGggdGhlc2UgY2hhbmdl cz8NCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IGRldiA8ZGV2LWJvdW5jZXNA ZHBkay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T0gTlVMTCkpDQoNCiAgICAgICAgICAgICAgICBydGVfcGFuaWMoImJhZCBtYnVm IHBvb2xcbiIpOw0KDQotICAgICAgIGlmIChtLT5idWZfaW92YSA9PSAwKQ0KDQorICAgICAgIGlm ICh1bmxpa2VseShtLT5idWZfaW92YSA9PSAwKSkNCg0KICAgICAgICAgICAgICAgIHJ0ZV9wYW5p YygiYmFkIElPIGFkZHJcbiIpOw0KDQotICAgICAgIGlmIChtLT5idWZfYWRkciA9PSBOVUxMKQ0K DQorICAgICAgIGlmICh1bmxpa2VseShtLT5idWZfYWRkciA9PSBOVUxMKSkNCg0KICAgICAgICAg ICAgICAgIHJ0ZV9wYW5pYygiYmFkIHZpcnQgYWRkclxuIik7DQoNCg0KDQogICAgICAgIHVpbnQx Nl90IGNudCA9IHJ0ZV9tYnVmX3JlZmNudF9yZWFkKG0pOw0KDQotICAgICAgIGlmICgoY250ID09 IDApIHx8IChjbnQgPT0gVUlOVDE2X01BWCkpDQoNCisgICAgICAgaWYgKHVubGlrZWx5KChjbnQg PT0gMCkgfHwgKGNudCA9PSBVSU5UMTZfTUFYKSkpDQoNCiAgICAgICAgICAgICAgICBydGVfcGFu aWMoImJhZCByZWYgY250XG4iKTsNCg0KDQoNCiAgICAgICAgLyogbm90aGluZyB0byBjaGVjayBm b3Igc3ViLXNlZ21lbnRzICovDQoNCkBAIC0xOTMsNyArMTkzLDcgQEANCg0KICAgICAgICAgICAg ICAgIHJldHVybjsNCg0KDQoNCiAgICAgICAgLyogZGF0YV9sZW4gaXMgc3VwcG9zZWQgdG8gYmUg bm90IG1vcmUgdGhhbiBwa3RfbGVuICovDQoNCi0gICAgICAgaWYgKG0tPmRhdGFfbGVuID4gbS0+ cGt0X2xlbikNCg0KKyAgICAgICBpZiAodW5saWtlbHkobS0+ZGF0YV9sZW4gPiBtLT5wa3RfbGVu KSkNCg0KICAgICAgICAgICAgICAgIHJ0ZV9wYW5pYygiYmFkIGRhdGFfbGVuXG4iKTsNCg0KDQoN C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x5KG9mZiArIGxlbiA8PSBydGVfcGt0bWJ1 Zl9kYXRhX2xlbihzZWcpKSkNCg0KICAgICAgICAgICAgICAgIHJldHVybiBydGVfcGt0bWJ1Zl9t dG9kX29mZnNldChzZWcsIGNoYXIgKiwgb2ZmKTsNCg0KDQoNCiAgICAgICAgLyogcmFyZSBjYXNl OiBoZWFkZXIgaXMgc3BsaXQgYW1vbmcgc2V2ZXJhbCBzZWdtZW50cyAqLw0KDQpAQCAtMzQ0LDcg KzM0NCw3IEBADQoNCiAgICAgICAgdW5zaWduZWQgaW50IGk7DQoNCiAgICAgICAgaW50IHJldDsN Cg0KDQoNCi0gICAgICAgaWYgKGJ1ZmxlbiA9PSAwKQ0KDQorICAgICAgIGlmICh1bmxpa2VseShi dWZsZW4gPT0gMCkpDQoNCiAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCg0KDQogICAgICAg IGJ1ZlswXSA9ICdcMCc7DQoNCkBAIC0zNTUsOSArMzU1LDkgQEANCg0KICAgICAgICAgICAgICAg IGlmIChuYW1lID09IE5VTEwpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPSByeF9m bGFnc1tpXS5kZWZhdWx0X25hbWU7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50Zihi dWYsIGJ1ZmxlbiwgIiVzICIsIG5hbWUpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDAp DQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAg ICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJl dCA+PSBidWZsZW4pDQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQg Pj0gYnVmbGVuKSkNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAg ICAgICAgICAgICAgYnVmICs9IHJldDsNCg0KICAgICAgICAgICAgICAgIGJ1ZmxlbiAtPSByZXQ7 DQoNCkBAIC00NDAsNyArNDQwLDcgQEANCg0KICAgICAgICB1bnNpZ25lZCBpbnQgaTsNCg0KICAg ICAgICBpbnQgcmV0Ow0KDQoNCg0KLSAgICAgICBpZiAoYnVmbGVuID09IDApDQoNCisgICAgICAg aWYgKHVubGlrZWx5KGJ1ZmxlbiA9PSAwKSkNCg0KICAgICAgICAgICAgICAgIHJldHVybiAtMTsN Cg0KDQoNCiAgICAgICAgYnVmWzBdID0gJ1wwJzsNCg0KQEAgLTQ1MSw5ICs0NTEsOSBAQA0KDQog ICAgICAgICAgICAgICAgaWYgKG5hbWUgPT0gTlVMTCkNCg0KICAgICAgICAgICAgICAgICAgICAg ICAgbmFtZSA9IHR4X2ZsYWdzW2ldLmRlZmF1bHRfbmFtZTsNCg0KICAgICAgICAgICAgICAgIHJl dCA9IHNucHJpbnRmKGJ1ZiwgYnVmbGVuLCAiJXMgIiwgbmFtZSk7DQoNCi0gICAgICAgICAgICAg ICBpZiAocmV0IDwgMCkNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkN Cg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAg aWYgKChzaXplX3QpcmV0ID49IGJ1ZmxlbikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2Vs eSgoc2l6ZV90KXJldCA+PSBidWZsZW4pKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1 cm4gLTE7DQoNCiAgICAgICAgICAgICAgICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAg YnVmbGVuIC09IHJldDsNCg0KDQoNCg0KDQpkaWZmIC1idSBydGVfbWJ1Zi5oLm9yaWcgcnRlX21i dWYuaA0KDQotLS0gcnRlX21idWYuaC5vcmlnICAgICAyMDE4LTA3LTIzIDE1OjEzOjI2LjAwMDAw MDAwMCArMDIwMA0KDQorK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WF9JUF9DS1NVTSkgJiYgKG9sX2ZsYWdzICYgUEtUX1RYX0lQVjYpKQ0KDQor ICAgICAgIGlmICh1bmxpa2VseSgob2xfZmxhZ3MgJiBQS1RfVFhfSVBfQ0tTVU0pICYmIChvbF9m bGFncyAmIFBLVF9UWF9JUFY2KSkpDQoNCiAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsN Cg0KDQoNCiAgICAgICAgLyogSVAgdHlwZSBub3Qgc2V0IHdoZW4gcmVxdWlyZWQgKi8NCg0KICAg ICAgICBpZiAob2xfZmxhZ3MgJiAoUEtUX1RYX0w0X01BU0sgfCBQS1RfVFhfVENQX1NFRykpDQoN Ci0gICAgICAgICAgICAgICBpZiAoIShvbF9mbGFncyAmIChQS1RfVFhfSVBWNCB8IFBLVF9UWF9J UFY2KSkpDQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoIShvbF9mbGFncyAmIChQS1Rf VFhfSVBWNCB8IFBLVF9UWF9JUFY2KSkpKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1 cm4gLUVJTlZBTDsNCg0KDQoNCiAgICAgICAgLyogQ2hlY2sgcmVxdWlyZW1lbnRzIGZvciBUU08g cGFja2V0ICovDQoNCiAgICAgICAgaWYgKG9sX2ZsYWdzICYgUEtUX1RYX1RDUF9TRUcpDQoNCi0g ICAgICAgICAgICAgICBpZiAoKG0tPnRzb19zZWdzeiA9PSAwKSB8fA0KDQorICAgICAgICAgICAg ICAgaWYgKHVubGlrZWx5KChtLT50c29fc2Vnc3ogPT0gMCkgfHwNCg0KICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoKG9sX2ZsYWdzICYgUEtUX1RYX0lQVjQpICYmDQoNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIShvbF9mbGFncyAmIFBLVF9UWF9JUF9DS1NVTSkpKQ0K DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEob2xfZmxhZ3MgJiBQS1RfVFhfS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9BTExfTUFTSykgPT0gUlRFX1BUWVBFX1VO S05PV04pIHsNCg0KICAgICAgICAgICAgICAgIHJldCA9IHNucHJpbnRmKGJ1ZiwgYnVmbGVuLCAi VU5LTk9XTiIpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDApDQoNCisgICAgICAgICAg ICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJl dHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJldCA+PSBidWZsZW4pDQoN CisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQgPj0gYnVmbGVuKSkNCg0K ICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiAgICAgICAgICAgICAgICByZXR1 cm4gMDsNCg0KICAgICAgICB9DQoNCkBAIC0xMzQsOSArMTM0LDkgQEANCg0KICAgICAgICBpZiAo KHB0eXBlICYgUlRFX1BUWVBFX0wyX01BU0spICE9IDApIHsNCg0KICAgICAgICAgICAgICAgIHJl dCA9IHNucHJpbnRmKGJ1ZiwgYnVmbGVuLCAiJXMgIiwNCg0KICAgICAgICAgICAgICAgICAgICAg ICAgcnRlX2dldF9wdHlwZV9sMl9uYW1lKHB0eXBlKSk7DQoNCi0gICAgICAgICAgICAgICBpZiAo cmV0IDwgMCkNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkNCg0KICAg ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAgaWYgKChz aXplX3QpcmV0ID49IGJ1ZmxlbikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseSgoc2l6 ZV90KXJldCA+PSBidWZsZW4pKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7 DQoNCiAgICAgICAgICAgICAgICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAgYnVmbGVu IC09IHJldDsNCg0KQEAgLTE0NCw5ICsxNDQsOSBAQA0KDQogICAgICAgIGlmICgocHR5cGUgJiBS VEVfUFRZUEVfTDNfTUFTSykgIT0gMCkgew0KDQogICAgICAgICAgICAgICAgcmV0ID0gc25wcmlu dGYoYnVmLCBidWZsZW4sICIlcyAiLA0KDQogICAgICAgICAgICAgICAgICAgICAgICBydGVfZ2V0 X3B0eXBlX2wzX25hbWUocHR5cGUpKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKQ0K DQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAgICAgICAgICAg ICAgICAgICAgICByZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNpemVfdClyZXQg Pj0gYnVmbGVuKQ0KDQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KChzaXplX3QpcmV0ID49 IGJ1ZmxlbikpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KICAgICAg ICAgICAgICAgIGJ1ZiArPSByZXQ7DQoNCiAgICAgICAgICAgICAgICBidWZsZW4gLT0gcmV0Ow0K DQpAQCAtMTU0LDkgKzE1NCw5IEBADQoNCiAgICAgICAgaWYgKChwdHlwZSAmIFJURV9QVFlQRV9M NF9NQVNLKSAhPSAwKSB7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50ZihidWYsIGJ1 ZmxlbiwgIiVzICIsDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJ0ZV9nZXRfcHR5cGVfbDRf bmFtZShwdHlwZSkpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDApDQoNCisgICAgICAg ICAgICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAgICAgICAgICAgICAg IHJldHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJldCA+PSBidWZsZW4p DQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQgPj0gYnVmbGVuKSkN Cg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAgICAgICAgICAgICAg YnVmICs9IHJldDsNCg0KICAgICAgICAgICAgICAgIGJ1ZmxlbiAtPSByZXQ7DQoNCkBAIC0xNjQs OSArMTY0LDkgQEANCg0KICAgICAgICBpZiAoKHB0eXBlICYgUlRFX1BUWVBFX1RVTk5FTF9NQVNL KSAhPSAwKSB7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50ZihidWYsIGJ1Zmxlbiwg IiVzICIsDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJ0ZV9nZXRfcHR5cGVfdHVubmVsX25h bWUocHR5cGUpKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKQ0KDQorICAgICAgICAg ICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICBy ZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNpemVfdClyZXQgPj0gYnVmbGVuKQ0K DQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KChzaXplX3QpcmV0ID49IGJ1ZmxlbikpDQoN CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KICAgICAgICAgICAgICAgIGJ1 ZiArPSByZXQ7DQoNCiAgICAgICAgICAgICAgICBidWZsZW4gLT0gcmV0Ow0KDQpAQCAtMTc0LDkg KzE3NCw5IEBADQoNCiAgICAgICAgaWYgKChwdHlwZSAmIFJURV9QVFlQRV9JTk5FUl9MMl9NQVNL KSAhPSAwKSB7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50ZihidWYsIGJ1Zmxlbiwg IiVzICIsDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJ0ZV9nZXRfcHR5cGVfaW5uZXJfbDJf bmFtZShwdHlwZSkpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDApDQoNCisgICAgICAg ICAgICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAgICAgICAgICAgICAg IHJldHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJldCA+PSBidWZsZW4p DQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQgPj0gYnVmbGVuKSkN Cg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAgICAgICAgICAgICAg YnVmICs9IHJldDsNCg0KICAgICAgICAgICAgICAgIGJ1ZmxlbiAtPSByZXQ7DQoNCkBAIC0xODQs OSArMTg0LDkgQEANCg0KICAgICAgICBpZiAoKHB0eXBlICYgUlRFX1BUWVBFX0lOTkVSX0wzX01B U0spICE9IDApIHsNCg0KICAgICAgICAgICAgICAgIHJldCA9IHNucHJpbnRmKGJ1ZiwgYnVmbGVu LCAiJXMgIiwNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcnRlX2dldF9wdHlwZV9pbm5lcl9s M19uYW1lKHB0eXBlKSk7DQoNCi0gICAgICAgICAgICAgICBpZiAocmV0IDwgMCkNCg0KKyAgICAg ICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkNCg0KICAgICAgICAgICAgICAgICAgICAg ICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAgaWYgKChzaXplX3QpcmV0ID49IGJ1Zmxl bikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseSgoc2l6ZV90KXJldCA+PSBidWZsZW4p KQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiAgICAgICAgICAgICAg ICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAgYnVmbGVuIC09IHJldDsNCg0KQEAgLTE5 NCw5ICsxOTQsOSBAQA0KDQogICAgICAgIGlm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