From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by dpdk.org (Postfix) with ESMTP id 2942F98 for ; Mon, 23 Jul 2018 15:53:45 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 23 Jul 2018 15:53:42 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35B421EE@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rte_mbuf library likely()/unlikely() Thread-Index: AdQijJFADUW5GJG1Tt2Vvg9FS1SjPQ== From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Olivier Matz" Cc: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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 13:53:45 -0000 SGkgT2xpdmllciwNCg0KIA0KDQpJIG5vdGljZWQgdGhhdCBfX3J0ZV9wa3RtYnVmX3JlYWQoKSBj b3VsZCBkbyB3aXRoIGFuIHVubGlrZWx5KCksIHNvIEkgd2VudCB0aHJvdWdoIHRoZSBlbnRpcmUg bGlicmFyeS4gSGVyZSBhcmUgbXkgc3VnZ2VzdGVkIG1vZGlmaWNhdGlvbnMuDQoNCiANCg0KIA0K DQpkaWZmIC1idSBydGVfbWJ1Zi5jLm9yaWcgcnRlX21idWYuYw0KDQotLS0gcnRlX21idWYuYy5v cmlnICAgICAyMDE4LTA3LTIzIDE1OjEzOjIyLjAwMDAwMDAwMCArMDIwMA0KDQorKysgcnRlX21i dWYuYyAgMjAxOC0wNy0yMyAxNTozMjo1My4wMDAwMDAwMDAgKzAyMDANCg0KQEAgLTE3MywxOSAr MTczLDE5IEBADQoNCnsNCg0KICAgICAgICB1bnNpZ25lZCBpbnQgbmJfc2VncywgcGt0X2xlbjsN Cg0KIA0KDQotICAgICAgIGlmIChtID09IE5VTEwpDQoNCisgICAgICAgaWYgKHVubGlrZWx5KG0g PT0gTlVMTCkpDQoNCiAgICAgICAgICAgICAgICBydGVfcGFuaWMoIm1idWYgaXMgTlVMTFxuIik7 DQoNCiANCg0KICAgICAgICAvKiBnZW5lcmljIGNoZWNrcyAqLw0KDQotICAgICAgIGlmIChtLT5w b29sID09IE5VTEwpDQoNCisgICAgICAgaWYgKHVubGlrZWx5KG0tPnBvb2wgPT0gTlVMTCkpDQoN CiAgICAgICAgICAgICAgICBydGVfcGFuaWMoImJhZCBtYnVmIHBvb2xcbiIpOw0KDQotICAgICAg IGlmIChtLT5idWZfaW92YSA9PSAwKQ0KDQorICAgICAgIGlmICh1bmxpa2VseShtLT5idWZfaW92 YSA9PSAwKSkNCg0KICAgICAgICAgICAgICAgIHJ0ZV9wYW5pYygiYmFkIElPIGFkZHJcbiIpOw0K DQotICAgICAgIGlmIChtLT5idWZfYWRkciA9PSBOVUxMKQ0KDQorICAgICAgIGlmICh1bmxpa2Vs eShtLT5idWZfYWRkciA9PSBOVUxMKSkNCg0KICAgICAgICAgICAgICAgIHJ0ZV9wYW5pYygiYmFk IHZpcnQgYWRkclxuIik7DQoNCiANCg0KICAgICAgICB1aW50MTZfdCBjbnQgPSBydGVfbWJ1Zl9y ZWZjbnRfcmVhZChtKTsNCg0KLSAgICAgICBpZiAoKGNudCA9PSAwKSB8fCAoY250ID09IFVJTlQx Nl9NQVgpKQ0KDQorICAgICAgIGlmICh1bmxpa2VseSgoY250ID09IDApIHx8IChjbnQgPT0gVUlO VDE2X01BWCkpKQ0KDQogICAgICAgICAgICAgICAgcnRlX3BhbmljKCJiYWQgcmVmIGNudFxuIik7 DQoNCiANCg0KICAgICAgICAvKiBub3RoaW5nIHRvIGNoZWNrIGZvciBzdWItc2VnbWVudHMgKi8N Cg0KQEAgLTE5Myw3ICsxOTMsNyBAQA0KDQogICAgICAgICAgICAgICAgcmV0dXJuOw0KDQogDQoN CiAgICAgICAgLyogZGF0YV9sZW4gaXMgc3VwcG9zZWQgdG8gYmUgbm90IG1vcmUgdGhhbiBwa3Rf bGVuICovDQoNCi0gICAgICAgaWYgKG0tPmRhdGFfbGVuID4gbS0+cGt0X2xlbikNCg0KKyAgICAg ICBpZiAodW5saWtlbHkobS0+ZGF0YV9sZW4gPiBtLT5wa3RfbGVuKSkNCg0KICAgICAgICAgICAg ICAgIHJ0ZV9wYW5pYygiYmFkIGRhdGFfbGVuXG4iKTsNCg0KIA0KDQogICAgICAgIG5iX3NlZ3Mg PSBtLT5uYl9zZWdzOw0KDQpAQCAtMjA0LDkgKzIwNCw5IEBADQoNCiAgICAgICAgICAgICAgICBw a3RfbGVuIC09IG0tPmRhdGFfbGVuOw0KDQogICAgICAgIH0gd2hpbGUgKChtID0gbS0+bmV4dCkg IT0gTlVMTCk7DQoNCiANCg0KLSAgICAgICBpZiAobmJfc2VncykNCg0KKyAgICAgICBpZiAodW5s aWtlbHkobmJfc2VncykpDQoNCiAgICAgICAgICAgICAgICBydGVfcGFuaWMoImJhZCBuYl9zZWdz XG4iKTsNCg0KLSAgICAgICBpZiAocGt0X2xlbikNCg0KKyAgICAgICBpZiAodW5saWtlbHkocGt0 X2xlbikpDQoNCiAgICAgICAgICAgICAgICBydGVfcGFuaWMoImJhZCBwa3RfbGVuXG4iKTsNCg0K fQ0KDQogDQoNCkBAIC0yNDksNyArMjQ5LDcgQEANCg0KICAgICAgICBjb25zdCBzdHJ1Y3QgcnRl X21idWYgKnNlZyA9IG07DQoNCiAgICAgICAgdWludDMyX3QgYnVmX29mZiA9IDAsIGNvcHlfbGVu Ow0KDQogDQoNCi0gICAgICAgaWYgKG9mZiArIGxlbiA+IHJ0ZV9wa3RtYnVmX3BrdF9sZW4obSkp DQoNCisgICAgICAgaWYgKHVubGlrZWx5KG9mZiArIGxlbiA+IHJ0ZV9wa3RtYnVmX3BrdF9sZW4o bSkpKQ0KDQogICAgICAgICAgICAgICAgcmV0dXJuIE5VTEw7DQoNCiANCg0KICAgICAgICB3aGls ZSAob2ZmID49IHJ0ZV9wa3RtYnVmX2RhdGFfbGVuKHNlZykpIHsNCg0KQEAgLTI1Nyw3ICsyNTcs NyBAQA0KDQogICAgICAgICAgICAgICAgc2VnID0gc2VnLT5uZXh0Ow0KDQogICAgICAgIH0NCg0K IA0KDQotICAgICAgIGlmIChvZmYgKyBsZW4gPD0gcnRlX3BrdG1idWZfZGF0YV9sZW4oc2VnKSkN Cg0KKyAgICAgICBpZiAobGlrZWx5KG9mZiArIGxlbiA8PSBydGVfcGt0bWJ1Zl9kYXRhX2xlbihz ZWcpKSkNCg0KICAgICAgICAgICAgICAgIHJldHVybiBydGVfcGt0bWJ1Zl9tdG9kX29mZnNldChz ZWcsIGNoYXIgKiwgb2ZmKTsNCg0KIA0KDQogICAgICAgIC8qIHJhcmUgY2FzZTogaGVhZGVyIGlz IHNwbGl0IGFtb25nIHNldmVyYWwgc2VnbWVudHMgKi8NCg0KQEAgLTM0NCw3ICszNDQsNyBAQA0K DQogICAgICAgIHVuc2lnbmVkIGludCBpOw0KDQogICAgICAgIGludCByZXQ7DQoNCiANCg0KLSAg ICAgICBpZiAoYnVmbGVuID09IDApDQoNCisgICAgICAgaWYgKHVubGlrZWx5KGJ1ZmxlbiA9PSAw KSkNCg0KICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KIA0KDQogICAgICAgIGJ1ZlswXSA9 ICdcMCc7DQoNCkBAIC0zNTUsOSArMzU1LDkgQEANCg0KICAgICAgICAgICAgICAgIGlmIChuYW1l ID09IE5VTEwpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPSByeF9mbGFnc1tpXS5k ZWZhdWx0X25hbWU7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50ZihidWYsIGJ1Zmxl biwgIiVzICIsIG5hbWUpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDApDQoNCisgICAg ICAgICAgICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAgICAgICAgICAg ICAgIHJldHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJldCA+PSBidWZs ZW4pDQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQgPj0gYnVmbGVu KSkNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAgICAgICAgICAg ICAgYnVmICs9IHJldDsNCg0KICAgICAgICAgICAgICAgIGJ1ZmxlbiAtPSByZXQ7DQoNCkBAIC00 NDAsNyArNDQwLDcgQEANCg0KICAgICAgICB1bnNpZ25lZCBpbnQgaTsNCg0KICAgICAgICBpbnQg cmV0Ow0KDQogDQoNCi0gICAgICAgaWYgKGJ1ZmxlbiA9PSAwKQ0KDQorICAgICAgIGlmICh1bmxp a2VseShidWZsZW4gPT0gMCkpDQoNCiAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiANCg0K ICAgICAgICBidWZbMF0gPSAnXDAnOw0KDQpAQCAtNDUxLDkgKzQ1MSw5IEBADQoNCiAgICAgICAg ICAgICAgICBpZiAobmFtZSA9PSBOVUxMKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICBuYW1l ID0gdHhfZmxhZ3NbaV0uZGVmYXVsdF9uYW1lOw0KDQogICAgICAgICAgICAgICAgcmV0ID0gc25w cmludGYoYnVmLCBidWZsZW4sICIlcyAiLCBuYW1lKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChy ZXQgPCAwKQ0KDQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAg ICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNp emVfdCl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mbGFncyAmIFBLVF9UWF9UQ1BfU0VHKQ0K DQotICAgICAgICAgICAgICAgaWYgKChtLT50c29fc2Vnc3ogPT0gMCkgfHwNCg0KKyAgICAgICAg ICAgICAgIGlmICh1bmxpa2VseSgobS0+dHNvX3NlZ3N6ID09IDApIHx8DQoNCiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKChvbF9mbGFncyAmIFBLVF9UWF9JUFY0KSAmJg0KDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICEob2xfZmxhZ3MgJiBQS1RfVFhfSVBfQ0tTVU0p KSkNCg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhKG9sX2ZsYWdzICYgUEtUX1RY X0lQX0NLU1VNKSkpKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsN Cg0KIA0KDQogICAgICAgIC8qIFBLVF9UWF9PVVRFUl9JUF9DS1NVTSBzZXQgZm9yIG5vbiBvdXRl ciBJUHY0IHBhY2tldC4gKi8NCg0KLSAgICAgICBpZiAoKG9sX2ZsYWdzICYgUEtUX1RYX09VVEVS X0lQX0NLU1VNKSAmJg0KDQotICAgICAgICAgICAgICAgICAgICAgICAhKG9sX2ZsYWdzICYgUEtU X1RYX09VVEVSX0lQVjQpKQ0KDQorICAgICAgIGlmICh1bmxpa2VseSgob2xfZmxhZ3MgJiBQS1Rf VFhfT1VURVJfSVBfQ0tTVU0pICYmDQoNCisgICAgICAgICAgICAgICAgICAgICAgICEob2xfZmxh Z3MgJiBQS1RfVFhfT1VURVJfSVBWNCkpKQ0KDQogICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5W QUw7DQoNCiANCg0KICAgICAgICByZXR1cm4gMDsNCg0KIA0KDQogDQoNCmRpZmYgLWJ1IHJ0ZV9t YnVmX3B0eXBlLmMub3JpZyBydGVfbWJ1Zl9wdHlwZS5jDQoNCi0tLSBydGVfbWJ1Zl9wdHlwZS5j Lm9yaWcgICAgICAgMjAxOC0wNy0yMyAxNTo0NTo0OS4wMDAwMDAwMDAgKzAyMDANCg0KKysrIHJ0 ZV9tYnVmX3B0eXBlLmMgICAgMjAxOC0wNy0yMyAxNTo0NDo1OS4wMDAwMDAwMDAgKzAyMDANCg0K QEAgLTExOCwxNSArMTE4LDE1IEBADQoNCnsNCg0KICAgICAgICBpbnQgcmV0Ow0KDQogDQoNCi0g ICAgICAgaWYgKGJ1ZmxlbiA9PSAwKQ0KDQorICAgICAgIGlmICh1bmxpa2VseShidWZsZW4gPT0g MCkpDQoNCiAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiANCg0KICAgICAgICBidWZbMF0g PSAnXDAnOw0KDQogICAgICAgIGlmICgocHR5cGUgJiBSVEVfUFRZUEVfQUxMX01BU0spID09IFJU RV9QVFlQRV9VTktOT1dOKSB7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50ZihidWYs IGJ1ZmxlbiwgIlVOS05PV04iKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKQ0KDQor ICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAgICAgICAgICAgICAg ICAgICAgICByZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNpemVfdClyZXQgPj0g YnVmbGVuKQ0KDQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KChzaXplX3QpcmV0ID49IGJ1 ZmxlbikpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAgICAgICAg ICAgICAgcmV0dXJuIDA7DQoNCiAgICAgICAgfQ0KDQpAQCAtMTM0LDkgKzEzNCw5IEBADQoNCiAg ICAgICAgaWYgKChwdHlwZSAmIFJURV9QVFlQRV9MMl9NQVNLKSAhPSAwKSB7DQoNCiAgICAgICAg ICAgICAgICByZXQgPSBzbnByaW50ZihidWYsIGJ1ZmxlbiwgIiVzICIsDQoNCiAgICAgICAgICAg ICAgICAgICAgICAgIHJ0ZV9nZXRfcHR5cGVfbDJfbmFtZShwdHlwZSkpOw0KDQotICAgICAgICAg ICAgICAgaWYgKHJldCA8IDApDQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkocmV0IDwg MCkpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KLSAgICAgICAgICAg ICAgIGlmICgoc2l6ZV90KXJldCA+PSBidWZsZW4pDQoNCisgICAgICAgICAgICAgICBpZiAodW5s aWtlbHkoKHNpemVfdClyZXQgPj0gYnVmbGVuKSkNCg0KICAgICAgICAgICAgICAgICAgICAgICAg cmV0dXJuIC0xOw0KDQogICAgICAgICAgICAgICAgYnVmICs9IHJldDsNCg0KICAgICAgICAgICAg ICAgIGJ1ZmxlbiAtPSByZXQ7DQoNCkBAIC0xNDQsOSArMTQ0LDkgQEANCg0KICAgICAgICBpZiAo KHB0eXBlICYgUlRFX1BUWVBFX0wzX01BU0spICE9IDApIHsNCg0KICAgICAgICAgICAgICAgIHJl dCA9IHNucHJpbnRmKGJ1ZiwgYnVmbGVuLCAiJXMgIiwNCg0KICAgICAgICAgICAgICAgICAgICAg ICAgcnRlX2dldF9wdHlwZV9sM19uYW1lKHB0eXBlKSk7DQoNCi0gICAgICAgICAgICAgICBpZiAo cmV0IDwgMCkNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkNCg0KICAg ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAgaWYgKChz aXplX3QpcmV0ID49IGJ1ZmxlbikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseSgoc2l6 ZV90KXJldCA+PSBidWZsZW4pKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7 DQoNCiAgICAgICAgICAgICAgICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAgYnVmbGVu IC09IHJldDsNCg0KQEAgLTE1NCw5ICsxNTQsOSBAQA0KDQogICAgICAgIGlmICgocHR5cGUgJiBS VEVfUFRZUEVfTDRfTUFTSykgIT0gMCkgew0KDQogICAgICAgICAgICAgICAgcmV0ID0gc25wcmlu dGYoYnVmLCBidWZsZW4sICIlcyAiLA0KDQogICAgICAgICAgICAgICAgICAgICAgICBydGVfZ2V0 X3B0eXBlX2w0X25hbWUocHR5cGUpKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKQ0K DQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAgICAgICAgICAg ICAgICAgICAgICByZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNpemVfdClyZXQg Pj0gYnVmbGVuKQ0KDQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KChzaXplX3QpcmV0ID49 IGJ1ZmxlbikpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KICAgICAg ICAgICAgICAgIGJ1ZiArPSByZXQ7DQoNCiAgICAgICAgICAgICAgICBidWZsZW4gLT0gcmV0Ow0K DQpAQCAtMTY0LDkgKzE2NCw5IEBADQoNCiAgICAgICAgaWYgKChwdHlwZSAmIFJURV9QVFlQRV9U VU5ORUxfTUFTSykgIT0gMCkgew0KDQogICAgICAgICAgICAgICAgcmV0ID0gc25wcmludGYoYnVm LCBidWZsZW4sICIlcyAiLA0KDQogICAgICAgICAgICAgICAgICAgICAgICBydGVfZ2V0X3B0eXBl X3R1bm5lbF9uYW1lKHB0eXBlKSk7DQoNCi0gICAgICAgICAgICAgICBpZiAocmV0IDwgMCkNCg0K KyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkNCg0KICAgICAgICAgICAgICAg ICAgICAgICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAgaWYgKChzaXplX3QpcmV0ID49 IGJ1ZmxlbikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseSgoc2l6ZV90KXJldCA+PSBi dWZsZW4pKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiAgICAgICAg ICAgICAgICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAgYnVmbGVuIC09IHJldDsNCg0K QEAgLTE3NCw5ICsxNzQsOSBAQA0KDQogICAgICAgIGlmICgocHR5cGUgJiBSVEVfUFRZUEVfSU5O RVJfTDJfTUFTSykgIT0gMCkgew0KDQogICAgICAgICAgICAgICAgcmV0ID0gc25wcmludGYoYnVm LCBidWZsZW4sICIlcyAiLA0KDQogICAgICAgICAgICAgICAgICAgICAgICBydGVfZ2V0X3B0eXBl X2lubmVyX2wyX25hbWUocHR5cGUpKTsNCg0KLSAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKQ0K DQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KHJldCA8IDApKQ0KDQogICAgICAgICAgICAg ICAgICAgICAgICByZXR1cm4gLTE7DQoNCi0gICAgICAgICAgICAgICBpZiAoKHNpemVfdClyZXQg Pj0gYnVmbGVuKQ0KDQorICAgICAgICAgICAgICAgaWYgKHVubGlrZWx5KChzaXplX3QpcmV0ID49 IGJ1ZmxlbikpDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KICAgICAg ICAgICAgICAgIGJ1ZiArPSByZXQ7DQoNCiAgICAgICAgICAgICAgICBidWZsZW4gLT0gcmV0Ow0K DQpAQCAtMTg0LDkgKzE4NCw5IEBADQoNCiAgICAgICAgaWYgKChwdHlwZSAmIFJURV9QVFlQRV9J Tk5FUl9MM19NQVNLKSAhPSAwKSB7DQoNCiAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50Zihi dWYsIGJ1ZmxlbiwgIiVzICIsDQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHJ0ZV9nZXRfcHR5 cGVfaW5uZXJfbDNfbmFtZShwdHlwZSkpOw0KDQotICAgICAgICAgICAgICAgaWYgKHJldCA8IDAp DQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkocmV0IDwgMCkpDQoNCiAgICAgICAgICAg ICAgICAgICAgICAgIHJldHVybiAtMTsNCg0KLSAgICAgICAgICAgICAgIGlmICgoc2l6ZV90KXJl dCA+PSBidWZsZW4pDQoNCisgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoKHNpemVfdClyZXQg Pj0gYnVmbGVuKSkNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQogICAg ICAgICAgICAgICAgYnVmICs9IHJldDsNCg0KICAgICAgICAgICAgICAgIGJ1ZmxlbiAtPSByZXQ7 DQoNCkBAIC0xOTQsOSArMTk0LDkgQEANCg0KICAgICAgICBpZiAoKHB0eXBlICYgUlRFX1BUWVBF X0lOTkVSX0w0X01BU0spICE9IDApIHsNCg0KICAgICAgICAgICAgICAgIHJldCA9IHNucHJpbnRm KGJ1ZiwgYnVmbGVuLCAiJXMgIiwNCg0KICAgICAgICAgICAgICAgICAgICAgICAgcnRlX2dldF9w dHlwZV9pbm5lcl9sNF9uYW1lKHB0eXBlKSk7DQoNCi0gICAgICAgICAgICAgICBpZiAocmV0IDwg MCkNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseShyZXQgPCAwKSkNCg0KICAgICAgICAg ICAgICAgICAgICAgICAgcmV0dXJuIC0xOw0KDQotICAgICAgICAgICAgICAgaWYgKChzaXplX3Qp cmV0ID49IGJ1ZmxlbikNCg0KKyAgICAgICAgICAgICAgIGlmICh1bmxpa2VseSgoc2l6ZV90KXJl dCA+PSBidWZsZW4pKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7DQoNCiAg ICAgICAgICAgICAgICBidWYgKz0gcmV0Ow0KDQogICAgICAgICAgICAgICAgYnVmbGVuIC09IHJl dDsNCg0KIA0KDQogDQoNCiANCg0KTWVkIHZlbmxpZyBoaWxzZW4gLyBraW5kIHJlZ2FyZHMN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