Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5267884rwb; Wed, 9 Aug 2023 01:02:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6/lCfjFcKHS5YyOplo+ZIwnjPe7WiroMDyy3C6wqMb3jG3w7GLDvORonZHLvK6f2b59A7 X-Received: by 2002:a05:6512:2209:b0:4fb:cab9:ddf with SMTP id h9-20020a056512220900b004fbcab90ddfmr1438313lfu.57.1691568148006; Wed, 09 Aug 2023 01:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691568147; cv=none; d=google.com; s=arc-20160816; b=z6v020vpudwzqeJyf7JHERyBPnX9JbuTC1zxUDEc9djPEczLOJ/Q5HgQj3PrzAvAqK mvKGQVW4wNKPXOa7EkpSJHKjTcfcZD8QcuiPuvzeI1wr97iqcw8hCYu5Lw6PFvfLH9V+ dlKbMi8iPWd+Q4Q/SyNGRn2OCKNTkNijIZkh+R6pLosK/upwGzPxyYH43ifXuJRcBWvb Dw2BKXUt7zPFRtFRlEwjZtJ0eIk0IoDdw/HB3JBd0Z8/xe87ReoVGcqRCTiFXJSJZ1rm 0ipSSFZKP81so/FinroeYMopp6SK08ewd9hxOnlZjxp2Qb9nIZkcR1RK5FoVnlRJw6gz VVUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=XuQV4kvngN1i4S1ieZZf6f0Fx4moZFeQbw/rnOKHePk=; fh=T9XGBtMKnxEmIujS2zzqwXyNDhH+24P8NJcYuaqeovk=; b=KU2lqEVZ2siy9VTq6b727w90nS2k+46AuXdUwIhGDysjejTfh7Oh7fo7RMv1o5BRhS 4JIUmwLB45p4+K9oIUSzeoFgRtUVQaEi3BgyGXNNQurME+xbojbNhhmA1h+iEtq64W2u PfX0KCCesxSIxcoZ5MBXKIGGzkghXRBZzfy3pzJ6FYeFe0iaNIFCAQmsU3vTzAhhTuwx bxNHKmxgz2S/WEAERjEmR6hlSZ+ZAAi3/5VrWVcnSWCHkmX4vA4d5iIwRJhfbAVLJVb8 QpuVXHMaXCq0EWXgd+brnxbKTz48KCrcim1kGRFh7GK7QKSIAA1Oo+OOKEqT7ZXwiYbV 2HOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w24-20020a50fa98000000b00523384d70eesi4266456edr.416.2023.08.09.01.02.02; Wed, 09 Aug 2023 01:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230018AbjHIHdA (ORCPT + 99 others); Wed, 9 Aug 2023 03:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjHIHc7 (ORCPT ); Wed, 9 Aug 2023 03:32:59 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C99F183; Wed, 9 Aug 2023 00:32:54 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3797W5dG4018489, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3797W5dG4018489 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Aug 2023 15:32:05 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.96) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Wed, 9 Aug 2023 15:31:29 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 9 Aug 2023 15:31:28 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Wed, 9 Aug 2023 15:31:28 +0800 From: Justin Lai To: Heiner Kallweit , "kuba@kernel.org" CC: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH] net/ethernet/realtek: Add Realtek automotive PCIe driver Thread-Topic: [PATCH] net/ethernet/realtek: Add Realtek automotive PCIe driver Thread-Index: AQHZxeQMA/4O5CExTkOPXZ48NozVXK/aDAKAgAeJu7A= Date: Wed, 9 Aug 2023 07:31:27 +0000 Message-ID: References: <20230803082513.6523-1-justinlai0215@realtek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.210.185] x-kse-serverinfo: RTEXMBS03.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBPbiAwMy4wOC4yMDIzIDEwOjI1LCBqdXN0aW5sYWkwMjE1IHdyb3RlOg0KPiA+IFRoaXMgcGF0 Y2ggaXMgdG8gYWRkIHRoZSBldGhlcm5ldCBkZXZpY2UgZHJpdmVyIGZvciB0aGUgUENJZSBpbnRl cmZhY2Ugb2YNCj4gUmVhbHRlayBBdXRvbW90aXZlIEV0aGVybmV0IFN3aXRjaCwNCj4gPiBhcHBs aWNhYmxlIHRvIFJUTDkwNTQsIFJUTDkwNjgsIFJUTDkwNzIsIFJUTDkwNzUsIFJUTDkwNjgsIFJU TDkwNzEuDQo+ID4NCj4gLSBBIHJlYWwgYXV0aG9yJ3MgbmFtZSB3b3VsZCBiZSBuaWNlLg0KPiAt IEEgbGluayB0byB0aGUgY2hpcCBkYXRhIHNoZWV0cyB3b3VsZCBiZSBoZWxwZnVsLg0KPiAtIFJl YWQgdGhlIG5ldGRldiBjb2RlIHJ1bGVzLg0KPiAgIC0gVGhlIG5ldC1uZXh0IHBhdGNoIGFubm90 YXRpb24gaXMgbWlzc2luZy4NCj4gICAtIFJldmVyc2UgY2hyaXN0bWFzIHRyZWUNCj4gICAtIC4u DQo+IC0gTm90IGFkZGluZyBhIE1BSU5UQUlORVJTIGVudHJ5Pw0KPiANCj4gSW4gZ2VuZXJhbCB0 aGUgY29kZSBxdWFsaXR5IGRvZXNuJ3QgbWVldCBtYWlubGluZSByZXF1aXJlbWVudHMsIGUuZy4g dGhlcmUncw0KPiBhIGxvdCBvZiB1bm5lY2Vzc2FyeSBjYXN0aW5nLg0KPiAN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bnQsIDApOw0KPiA+ICtNT0RVTEVfUEFSTV9ERVNDKGZ1bmNf cnhxX251bSwgIlJYIHF1ZXVlIG51bWJlciBmb3IgdGhpcw0KPiBmdW5jdGlvbi4iKTsNCj4gPiAr DQo+ID4gK21vZHVsZV9wYXJhbShpbnRlcnJ1cHRfbnVtLCB1aW50LCAwKTsNCj4gPiArTU9EVUxF X1BBUk1fREVTQyhpbnRlcnJ1cHRfbnVtLCAiSW50ZXJydXB0IFZlY3RvciBudW1iZXIgZm9yIHRo aXMNCj4gZnVuY3Rpb24uIik7DQo+ID4gKw0KPiA+ICttb2R1bGVfcGFyYW0ocnhfY29weWJyZWFr LCBpbnQsIDApOw0KPiA+ICtNT0RVTEVfUEFSTV9ERVNDKHJ4X2NvcHlicmVhaywgIkNvcHkgYnJl YWtwb2ludCBmb3INCj4gY29weS1vbmx5LXRpbnktZnJhbWVzIik7DQo+ID4gKw0KPiA+DQo+ICsv KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioNCj4gKioqKioqKioqKioqKioqKg0KPiA+ICsgKiBGdW5jdGlvbiBQcm90b3R5cGUNCj4g PiArDQo+ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioNCj4gKioqKioqKioqKioqKiovDQo+IA0KPiBObyBmb3J3YXJkIGRlY2xh cmF0aW9ucyBwbGVhc2UuDQo+IA0KPiA+ICtzdGF0aWMgaW50IHJ0YXNlX29wZW4oc3RydWN0IG5l dF9kZXZpY2UgKmRldik7DQo+ID4gK3N0YXRpYyBuZXRkZXZfdHhfdCBydGFzZV9zdGFydF94bWl0 KHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlDQo+ICpkZXYpOw0KPiA+ICtz dGF0aWMgdm9pZCBydGFzZV9zZXRfcnhfbW9kZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KTsNCj4g P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o+ID4gKyAqIFBST0NGUyBTVFVGRg0KPiA+ICsNCj4gKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKg0KPiAqKioqKioqKioqKioqKi8NCj4gPiArc3RhdGljIHN0cnVjdCBwcm9jX2Rpcl9lbnRy eSAqcnRhc2VfcHJvYzsNCj4gPiArc3RhdGljIHMzMiBwcm9jX2luaXRfbnVtOw0KPiA+ICsNCj4g PiArc3RhdGljIHZvaWQgcnRhc2VfZHVtcF90YWxseV9jb3VudGVyKGNvbnN0IHN0cnVjdCBydGFz ZV9wcml2YXRlICp0cCwNCj4gZG1hX2FkZHJfdCBwYWRkcikNCj4gPiArew0KPiA+ICsgICAgIHZv aWQgX19pb21lbSAqaW9hZGRyID0gdHAtPm1taW9fYWRkcjsNCj4gPiArICAgICB1MzIgY21kOw0K PiA+ICsgICAgIHUzMiB3YWl0X2NudDsNCj4gPiArDQo+ID4gKyAgICAgUlRMX1czMihEVENDUjQs ICh1MzIpKHBhZGRyID4+IDMyKSk7DQo+ID4gKyAgICAgY21kID0gKHUzMikocGFkZHIgJiBETUFf QklUX01BU0soMzIpKTsNCj4gPiArICAgICBSVExfVzMyKERUQ0NSMCwgY21kKTsNCj4gPiArICAg ICBSVExfVzMyKERUQ0NSMCwgKHUzMikoY21kIHwgQ09VTlRFUl9EVU1QKSk7DQo+ID4gKw0KPiA+ ICsgICAgIHdhaXRfY250ID0gMDsNCj4gPiArICAgICB3aGlsZSAoKFJUTF9SMzIoRFRDQ1IwKSAm IENPVU5URVJfRFVNUCkgIT0gMHUpIHsNCj4gPiArICAgICAgICAgICAgIHVzbGVlcF9yYW5nZSgx MCwgMjApOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIHdhaXRfY250Kys7DQo+ID4gKyAgICAg ICAgICAgICBpZiAod2FpdF9jbnQgPiAyMHUpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGJy ZWFrOw0KPiA+ICsgICA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faW5mbyhkZXYsICJV bmFibGUgdG8gaW5pdGlhbGl6ZQ0KPiAvcHJvYy9uZXQvJXMvJXNcbiIsIE1PRFVMRU5BTUUsDQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldi0+bmFtZSk7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIGdvdG8gb3V0Ow0KPiA+ICsgICAgICAgICAgICAgfQ0KPiA+ICsN Cj4gPiArICAgICAgICAgICAgIHRwLT5wcm9jX2RpciA9IGRpcjsNCj4gPiArICAgICAgICAgICAg IHByb2NfaW5pdF9udW0rKzsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICBmb3IgKGYgPSBydGFz ZV9wcm9jX2ZpbGVzOyBmLT5uYW1lWzBdICE9ICdcMCc7IGYrKykgew0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICBpZiAocHJvY19jcmVhdGVfZGF0YShmLT5uYW1lLCBTX0lGUkVHIHwNCj4gU19J UlVHTywgZGlyLCAmcnRhc2VfcHJvY19mb3BzLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBmLT5zaG93KQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gTlVMTCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldGRldl9p bmZvKGRldiwgIlVuYWJsZSB0byBpbml0aWFsaXplDQo+IC9wcm9jL25ldC8lcy8lcy8lc1xuIiwN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNT0RVTEVOQU1F LA0KPiBkZXYtPm5hbWUsIGYtPm5hbWUpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGdvdG8gb3V0Ow0KPiA+ICsgICAgICAgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAg ICAgICB9DQo+ID4gKyAgICAgfQ0KPiA+ICsNCj4gPiArb3V0Og0KPiA+ICs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AocmluZy0+ZHVwbGljYXRlX2RpcnR5X2NvdW50ID49DQo+IFRY X0RVUExJQ0FURV9ESVJUWUlEWF9DT1VOVCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHJ0YXNlX3N3X3Jlc2V0KHRwLT5kZXYpOw0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGVsc2UNCj4gPiArDQo+IHJpbmctPmR1cGxpY2F0ZV9kaXJ0eV9jb3Vu dCsrOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJpbmctPmR1cGxpY2F0ZV9kaXJ0eV9jb3VudCA9IDA7DQo+ID4g KyAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICAgIH0gZWxzZSB7DQo+ID4g KyAgICAgICAgICAgICAgICAgICAgIHJpbmctPmR1cGxpY2F0ZV9kaXJ0eV9jb3VudCA9IDA7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgIHJpbmctPnByaXZfZGlydHlfaWR4ID0gcmluZy0+ZGly dHlfaWR4Ow0KPiA+ICsgICAgICAgICAgICAgfQ0KPiA+ICsgICAgIH0gZWxzZSB7DQo+ID4gKyAg ICAgICAgICAgICByaW5nLT5kdXBsaWNhdGVfZGlydHlfY291bnQgPSAwOw0KPiA+ICsgICAgIH0N Cj4gPiArDQo+ID4gKyAgICAgLyogcmVzZXQgdGltZXIgKi8NCj4gPiArICAgICBSVExfVzMyKFRD VFIwLCAweDApOw0KPiA+ICt9DQo+ID4gKw0KPiA+ICtzdGF0aWMgdm9pZCBydGFzZV9pbml0X2lu dF92ZWN0b3Ioc3RydWN0IHJ0YXNlX3ByaXZhdGUgKnRwKQ0KPiA+ICt7DQo+ID4gKyAgICAgdTE2 IGkgPSAwdTsNCj4gPiArDQo+ID4gKyAgICAgLyogaW50ZXJydXB0IHZlY3RvciAwICovDQo+ID4g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1MTYpKExCS19BVExEIHwgTEJLX0NMUikpOw0KPiA+ICt9DQo+ID4gKw0K PiA+ICtzdGF0aWMgczMyIHJlZ19mdW4oY29uc3Qgc3RydWN0IGlmcmVxICppZnIsIGNvbnN0IHN0 cnVjdCBydGFzZV9wcml2YXRlICp0cCkNCj4gPiArew0KPiA+ICsgICAgIHZvaWQgX19pb21lbSAq aW9hZGRyID0gdHAtPm1taW9fYWRkcjsNCj4gPiArICAgICB2b2lkICp1c2VyYWRkciA9ICh2b2lk ICopaWZyLT5pZnJfZGF0YTsNCj4gPiArICAgICBzdHJ1Y3QgcmVnX3J3IHJlZzsNCj4gPiArICAg ICBzMzIgcmMgPSAwOw0KPiA+ICsNCj4gPiArICAgICBpZiAoY29weV9mcm9tX3VzZXIoJnJlZywg dXNlcmFkZHIsIHNpemVvZihzdHJ1Y3QgcmVnX3J3KSkgIT0gMHUpIHsNCj4gPiArICAgICAgICAg ICAgIHJjID0gLUVGQVVMVDsNCj4gPiArICAgICAgICAgICAgIGdvdG8gb3V0Ow0KPiA+ICsgICAg IH0NCj4gPiArDQo+ID4gKyAgICAgLyogZGVidWcgY2hhbm5lbCByZWFkICovDQo+ID4gKyAgICAg aWYgKHJlZy5jbWQgPT0gQ01EX0RCR19SRUFEKSB7DQo+ID4gKyAgICAgICAgICAgICByZWcudmFs ID0gbWFjX29jcF9yZWFkKHRwLCByZWcuYWRkcik7DQo+ID4gKyAgICAgICAgICAgICBpZiAoY29w eV90b191c2VyKHVzZXJhZGRyLCAmcmVnLCBzaXplb2Yoc3RydWN0IHJlZ19ydykpICE9IDB1KQ0K PiB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJjID0gLUVGQVVMVDsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgZ290byBvdXQ7DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAg ICAgICAgICBuZXRkZXZfaW5mbyh0cC0+ZGV2LCAiXHRyZWFkIHJlZyAweCUwNHggPSAweCUwN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19XUklURTE2KSB7DQo+ID4gKyAgICAgICAg ICAgICBSVExfVzE2KHJlZy5hZGRyLCAodTE2KXJlZy52YWwpOw0KPiA+ICsgICAgICAgICAgICAg bmV0ZGV2X2luZm8odHAtPmRldiwgIlx0d3JpdGUgTU1JTyAweCUwNHggPSAweCUwNHgiLA0KPiBy ZWcuYWRkciwgUlRMX1IxNihyZWcuYWRkcikpOw0KPiA+ICsgICAgIH0NCj4gPiArICAgICAvKiBt bWlvIHJlYWQzMiAqLw0KPiA+ICsgICAgIGVsc2UgaWYgKHJlZy5jbWQgPT0gQ01EX1JFR19SRUFE MzIpIHsNCj4gPiArICAgICAgICAgICAgIHJlZy52YWwgPSBSVExfUjMyKHJlZy5hZGRyKTsNCj4g PiArICAgICAgICAgICAgIGlmIChjb3B5X3RvX3VzZXIodXNlcmFkZHIsICZyZWcsIHNpemVvZihz dHJ1Y3QgcmVnX3J3KSkgIT0gMHUpDQo+IHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgcmMg PSAtRUZBVUxUOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBnb3RvIG91dDsNCj4gPiArICAg ICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICAgIG5ldGRldl9pbmZvKHRwLT5kZXYsICJcdHJl YWQgTU1JTyAweCUwNHggPSAweCUwOHgiLA0KPiByZWcuYWRkciwgcmVnLnZhbCk7DQo+ID4gKyAg ICAgfQ0KPiA+ICsgICAgIC8qIG1taW8gd3JpdGUzMiAqLw0KPiA+ICsgICAgIGVsc2UgaWYgKHJl Zy5jbWQgPT0gQ01EX1JFR19XUklURTMyKSB7DQo+ID4gKyAgICAgICAgICAgICBSVExfVzMyKHJl Zy5hZGRyLCByZWcudmFsKTsNCj4gPiArICAgICAgICAgICAgIG5ldGRldl9pbmZvKHRwLT5kZXYs ICJcdHdyaXRlIE1NSU8gMHglMDR4ID0gMHglMDh4IiwNCj4gcmVnLmFkZHIsIFJUTF9SMTYocmVn LmFkZHIpKTsNCj4gP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Fvc19jb25maWcu cGNwIC0gNHUpICogM3UpICsgMTZ1KTsNCj4gPiArICAgICBlbHNlDQo+ID4gKyAgICAgICAgICAg ICBvZmZzZXQgPSAyODsNCj4gPiArDQo+ID4gKyAgICAgaWYgKHFvc19jb25maWcuY21kID09IENN RF9HRVRfUlhRT1MpIHsNCj4gPiArICAgICAgICAgICAgIHJlZ1YgPSBSVExfUjMyKFJYX1BDUF9U QUJMRSk7DQo+ID4gKyAgICAgICAgICAgICBxb3NfY29uZmlnLnRjID0gKHU4KSgocmVnViA+PiBv ZmZzZXQpICYgMHg3dSk7DQo+ID4gKyAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKHVzZXJh ZGRyLCAmcW9zX2NvbmZpZywgc2l6ZW9mKHN0cnVjdA0KPiBydGtfcW9zKSkgIT0gMHUpIHsNCj4g PiArICAgICAgICAgICAgICAgICAgICAgcmMgPSAtRUZBVUxUOw0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICBnb3RvIG91dDsNCj4gPiArICAgICAgICAgICAgIH0NCj4gPiArICAgICB9IGVsc2Ug aWYgKHFvc19jb25maWcuY21kID09IENNRF9TRVRfUlhRT1MpIHsNCj4gPiArICAgICAgICAgICAg IHJlZ1YgPSBSVExfUjMyKFJYX1BDUF9UQUJMRSk7DQo+ID4gKyAgICAgICAgICAgICByZWdWICY9 IH4oKHUzMikweDd1IDw8IG9mZnNldCk7DQo+ID4gKyAgICAgICAgICAgICByZWdWIHw9ICgodTMy KXFvc19jb25maWcudGMgPDwgb2Zmc2V0KTsNCj4gPiArICAgICAgICAgICAgIFJUTF9XMzIoUlhf UENQX1RBQkxFLCByZWdWKTsNCj4gPiArICAgICB9IGVsc2Ugew0KPiA+ICsgICAgICAgICAgICAg bmV0ZGV2X2luZm8odHAtPmRldiwgInJ4cW9zIGNvbW1hbmQgZXJyb3IuXG4iKTsNCj4gPiArICAg ICB9DQo+ID4gKyAgICAgcHJfaW5mbygiXHRcbiIpOw0KPiA+ICsNCj4gPiArb3V0Og0KPiA+ICsg ICAgIHJldHVybiByYzsNCj4gPiArfQ0KPiA+ICsNCj4gPiArc3RhdGljIHMzMiB0aW1lb3V0X3Np Zyhjb25zdCBzdHJ1Y3QgaWZyZXEgKmlmciwgc3RydWN0IHJ0YXNlX3ByaXZhdGUgKnRwKQ0KPiA+ ICt7DQo+ID4gKyAgICAgdm9pZCAqdXNlcmFkZHIgPSAodm9pZCAqKWlmci0+aWZyX2RhdGE7DQo+ ID4gKyAgICAgc3RydWN0IHJ0a190aW1lb3V0X3NpZyBydGtfdGltZW91dF9zaWc7DQo+ID4gKyAg ICAgczMyIHJjID0gMDsNCj4gPiArDQo+ID4gKyAgICAgaWYgKGNvcHlfZnJvbV91c2VyKCZydGtf dGltZW91dF9zaWcsIHVzZXJhZGRyLCBzaXplb2Yoc3RydWN0DQo+IHJ0a190aW1lb3V0X3NpZykp ICE9IDB1KSB7DQo+ID4gKyAgICAgICAgICAgICByYyA9IC1FRkFVTFQ7DQo+ID4gKyAgICAgfSBl bHNlIHsNCj4gPiArICAgICAgICAgICAgIGlmIChydGtfdGltZW91dF9zaWcuY21kID09IENNRF9H RVRfVElNU0lHKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJ0a190aW1lb3V0X3NpZy5z dGF0ZSA9IHRwLT50aW1lb3V0X3N0YXRlOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgaWYgKGNvcHlfdG9fdXNlcih1c2VyYWRkciwgJnJ0a190aW1lb3V0X3NpZywNCj4gc2l6ZW9m KHN0cnVjdCBydGtfdGltZW91dF9zaWcpKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg IT0gMHUpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmMgPSAtRUZBVUxUOw0K PiA+ICsgICAgICAgICAgICAgfSBlbHNlIGlmIChydGtfdGltZW91dF9zaWcuY21kID09IENNRF9T RVRfVElNU0lHKSB7DQo+ID4gKyAgICAgICAg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ZGRyLCBzaXplb2Yoc3RydWN0DQo+IHJ0YXNlX3B0bV9jbWRfdCkpICE9IDB1KSB7DQo+ ID4gKyAgICAgICAgICAgICByZXQgPSAtRUZBVUxUOw0KPiA+ICsgICAgIH0gZWxzZSB7DQo+ID4g KyAgICAgICAgICAgICBwdG1fcG9zID0gKHMzMikocGNpX2ZpbmRfZXh0X2NhcGFiaWxpdHkocGRl diwNCj4gUENJX0VYVF9DQVBfSURfUFRNKSk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYg KHB0bV9wb3MgPT0gMCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBuZXRkZXZfaW5mbyh0 cC0+ZGV2LCAiY2FuJ3QgZmluZCBwdG0gcG9zaXRpb24uIik7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgIHJldCA9IC1FRkFVTFQ7DQo+ID4gKyAgICAgICAgICAgICB9IGVsc2Ugew0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICBpZiAoY21kLmVuYWJsZSA9PSAxdSkgew0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC8qIHB0bSBlbmFibGUgKi8NCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBwY2lfd3JpdGVfY29uZmlnX2J5dGUocGRldiwgcHRtX3BvcyArDQo+ IDgsIDB4MXUpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNtZC5lbmFi bGUgPT0gMHUpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwdG0gZGlz YWJsZSAqLw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBjaV93cml0ZV9jb25m aWdfYnl0ZShwZGV2LCBwdG1fcG9zICsNCj4gOCwgMHgwdSk7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZGV2 X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KHBkZXYsIHB0bV9wb3MgKw0KPiAyMCwgMHgxdSk7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgIGVsc2UNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBwY2lfd3JpdGVfY29uZmlnX2J5dGUocGRldiwgcHRtX3BvcyArDQo+IDIwLCAweDB1 KTsNCj4gPiArICAgICAgICAgICAgIH0NCj4gPiArICAgICB9DQo+ID4gKw0KPiA+ICsgICAgIHJl dHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4NCj4gKy8qKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KPiAqKioqKioqKioqKioq KioqDQo+ID4gKyAqIEV0aHRvb2wgT3BlcmF0aW9ucw0KPiA+ICsNCj4gKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KPiAqKioq KioqKioqKioqKi8NCj4gPiArc3RhdGljIHZvaWQgcnRhc2VfZ2V0X2RydmluZm8oc3RydWN0IG5l dF9kZXZpY2UgKmRldiwgc3RydWN0IGV0aHRvb2xfZHJ2aW5mbw0KPiAqZHJ2aW5mbykNCj4gPiAr ew0KPiA+ICsgICAgIGNvbnN0IHN0cnVjdCBydGFzZV9wcml2YXRlICp0cCA9IG5ldGRldl9wcml2 KGRldik7DQo+ID4gKw0KPiA+ICsgICAgIHN0cnNjcHkoZHJ2aW5mby0+ZHJpdmVyLCBNT0RVTEVO QU1FLCAzMik7DQo+ID4gKyAgICAgc3Ryc2NweShkcnZpbmZvLT52ZXJzaW9uLCBSVEFTRV9WRVJT SU9OLCAzMik7DQo+ID4gKyAgICAgc3Ryc2NweShkcnZpbmZvLT5idXNfaW5mbywgcGNpX25hbWUo dHAtPnBkZXYpLCAzMik7DQo+ID4gK30NCj4gPiArDQo+ID4gKyN1bmRlZiBldGh0b29sX29wX2dl dF9saW5rDQo+ID4gKyNkZWZpb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Qo+ID4gKyAgICAgLmdldF9zdHJpbmdzID0gcnRhc2VfZ2V0X3N0 cmluZ3MsDQo+ID4gKyAgICAgLmdldF9zc2V0X2NvdW50ID0gcnRhc2VfZ2V0X3NzZXRfY291bnQs DQo+ID4gKyAgICAgLmdldF9ldGh0b29sX3N0YXRzID0gcnRhc2VfZ2V0X2V0aHRvb2xfc3RhdHMs DQo+ID4gKyAgICAgLmdldF90c19pbmZvID0gZXRodG9vbF9vcF9nZXRfdHNfaW5mbywNCj4gPiAr fTsNCj4gPiArDQo+ID4NCj4gKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKg0KPiAqKioqKioqKioqKioqKioqDQo+ID4gKyAqIEV0 aHRvb2wgQ29tcGF0aWJpbGl0eQ0KPiA+ICsNCj4gKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KPiAqKioqKioqKioqKioqKi8N Cj4gPiArI2lmZGVmIEVUSFRPT0xfT1BTX0NPTVBBVA0KPiA+ICtzdGF0aWMgaW50IGV0aHRvb2xf Z2V0X3NldHRpbmdzKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIHZvaWQgKnVzZXJhZGRyKQ0KPiA+ ICt7DQo+ID4gKyAgICAgc3RydWN0IGV0aHRvb2xfY21kIGNtZCA9IHtFVEhUT09MX0dTRVR9Ow0K PiA+ICsgICAgIGludCBlcnI7DQo+ID4gKw0KPiA+ICsgICAgIGlmICghZXRodG9vbF9vcHMtPmdl dF9zZXR0aW5ncykNCj4gPiArICAgICAgICAgICAgIHJldHVybiAtRU9QTk9UU1VQUDsNCj4gPiAr DQo+ID4gKyAgICAgZXJyID0gZXRodG9vbF9vcHMtPmdldF9zZXR0aW5ncyhkZXYsICZjbWQpOw0K PiA+ICsgICAgIGlmIChlcnIgPCAwKQ0KPiA+ICsgICAgICAgICAgICAgcmV0dXJuIGVycjsNCj4g Pi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UT09MX0dUWENTVU06DQo+ID4gKyAgICAgICAgICAgICByZXR1cm4gZXRodG9vbF9nZXRfdHhf Y3N1bShkZXYsIHVzZXJhZGRyKTsNCj4gPiArICAgICBjYXNlIEVUSFRPT0xfU1RYQ1NVTToNCj4g PiArICAgICAgICAgICAgIHJldHVybiBldGh0b29sX3NldF90eF9jc3VtKGRldiwgdXNlcmFkZHIp Ow0KPiA+ICsgICAgIGNhc2UgRVRIVE9PTF9HU0c6DQo+ID4gKyAgICAgICAgICAgICByZXR1cm4g ZXRodG9vbF9nZXRfc2coZGV2LCB1c2VyYWRkcik7DQo+ID4gKyAgICAgY2FzZSBFVEhUT09MX1NT RzoNCj4gPiArICAgICAgICAgICAgIHJldHVybiBldGh0b29sX3NldF9zZyhkZXYsIHVzZXJhZGRy KTsNCj4gPiArICAgICBjYXNlIEVUSFRPT0xfR1RTTzoNCj4gPiArICAgICAgICAgICAgIHJldHVy biBldGh0b29sX2dldF90c28oZGV2LCB1c2VyYWRkcik7DQo+ID4gKyAgICAgY2FzZSBFVEhUT09M X1NUU086DQo+ID4gKyAgICAgICAgICAgICByZXR1cm4gZXRodG9vbF9zZXRfdHNvKGRldiwgdXNl cmFkZHIpOw0KPiA+ICsgICAgIGNhc2UgRVRIVE9PTF9URVNUOg0KPiA+ICsgICAgICAgICAgICAg cmV0dXJuIGV0aHRvb2xfc2VsZl90ZXN0KGRldiwgdXNlcmFkZHIpOw0KPiA+ICsgICAgIGNhc2Ug RVRIVE9PTF9HU1RSSU5HUzoNCj4gPiArICAgICAgICAgICAgIHJldHVybiBldGh0b29sX2dldF9z dHJpbmdzKGRldiwgdXNlcmFkZHIpOw0KPiA+ICsgICAgIGNhc2UgRVRIVE9PTF9QSFlTX0lEOg0K PiA+ICsgICAgICAgICAgICAgcmV0dXJuIGV0aHRvb2xfcGh5c19pZChkZXYsIHVzZXJhZGRyKTsN Cj4gPiArICAgICBjYXNlIEVUSFRPT0xfR1NUQVRTOg0KPiA+ICsgICAgICAgICA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ICsg ICAgICAgICAgICAgLyogcmVxdWVzdCBvdGhlciBpbnRlcnJ1cHRzIHRvIGhhbmRsZSBtdWx0aXF1 ZXVlICovDQo+ID4gKyAgICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDwgdHAtPmludF9udW1zOyBp KyspIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgaWYgKHJldHZhbCA9PSAwKSB7DQo+ID4g KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXZlYyA9ICZ0cC0+aW50X3ZlY3RvcltpXTsN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXZlYy0+c3RhdHVzID09IDF1 KSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcHJpbnRmKChj aGFyICopJml2ZWMtPm5hbWUsDQo+ICIlc19pbnQlaSIsIGRldi0+bmFtZSwgaSk7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR2YWwgPSByZXF1ZXN0X2lycShp dmVjLT5pcnEsDQo+IHJ0YXNlX3FfaW50ZXJydXB0LCAwLA0KPiA+ICsNCj4gKGNoYXIgKikmaXZl Yy0+bmFtZSwgaXZlYyk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAg fSBlbHNlIGlmICgodHAtPnN3X2ZsYWcgJiBTV0ZfTVNJX0VOQUJMRUQpICE9IDB1KSB7DQo+ID4g KyAgICAgICAgICAgICByZXR2YWwgPSByZXF1ZXN0X2lycShwZGV2LT5pcnEsIHJ0YXNlX2ludGVy cnVwdCwgMCwNCj4gZGV2LT5uYW1lLCBkZXYpOw0KPiA+ICsgICAgIH0gZWxzZSB7DQo+ID4gKyAg ICAgICAgICAgICByZXR2YWwgPSByZXF1ZXN0X2lycShwZGV2LT5pcnEsIHJ0Y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0KPiA+ICsgICAgIHJldHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4g K3N0YXRpYyB2b2lkIHJ0YXNlX3J4X3JpbmdfY2xlYXIoc3RydWN0IHJ0YXNlX3JpbmcgKnJpbmcp DQo+ID4gK3sNCj4gPiArICAgICB1MzIgaTsNCj4gPiArICAgICByeF9kZXNjICpkZXNjOw0KPiA+ ICsgICAgIGNvbnN0IHN0cnVjdCBydGFzZV9wcml2YXRlICp0cCA9IHJpbmctPml2ZWMtPnRwOw0K PiA+ICsNCj4gPiArICAgICBmb3IgKGkgPSAwdTsgaSA8IE5VTV9ERVNDOyBpKyspIHsNCj4gPiAr ICAgICAgICAgICAgIGRlc2MgPSByaW5nLT5kZXNjICsgKHNpemVvZihyeF9kZXNjKSAqIGkpOw0K PiA+ICsNCj4gPiArICAgICAgICAgICAgIGlmIChyaW5nLT5za2J1ZmZbaV0pIHsNCj4gPiArICAg ICAgICAgICAgICAgICAgICAgZG1hX3VubWFwX3NpbmdsZSgmdHAtPnBkZXYtPmRldiwNCj4gcmlu Zy0+bWlzLmRhdGFfcGh5X2FkZHJbaV0sIHRwLT5yeF9idWZfc3osDQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgRE1BX0ZST01fREVWSUNFKTsNCj4gPiArDQo+ID4g KyAgICAgICAgICAgICAgICAgICAgIGRldl9rZnJlZV9za2IocmluZy0+c2tidWZmW2ldKTsNCj4g PiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJpbmctPnNrYnVmZltpXSA9IE5VTEw7DQo+ ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFzZV9tYWtlX3VudXNhYmxlX2J5X2Fz aWMoZGVzYyk7DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAgfQ0KPiA+ICt9DQo+ID4g Kw0KPiA+ICt2b2lkIHJ0YXNlX3J4X2NsZWFyKHN0cnVjdCBydGFzZV9wcml2YXRlICp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4gKyAgICAgICAgICAgICBj bWQgPSBpIHwgKHUxNilUWF9ERVNDX0NNRF9XRSB8DQo+ICh1MTYpVFhfREVTQ19DTURfQ1M7DQo+ ID4gKyAgICAgICAgICAgICBSVExfVzE2KFRYX0RFU0NfQ09NTUFORCwgY21kKTsNCj4gPiArICAg ICAgICAgICAgIHVzbGVlcF9yYW5nZSgxMDAsIDExMCk7DQo+ID4gKyAgICAgfQ0KPiA+ICsNCj4g PiArICAgICBmb3IgKGkgPSAwdTsgaSA8IHRwLT5mdW5jX3J4X3F1ZXVlX251bTsgaSsrKSB7DQo+ ID4gKyAgICAgICAgICAgICByaW5nID0gJnRwLT5yeF9yaW5nW2ldOw0KPiA+ICsNCj4gPiArICAg ICAgICAgICAgIGlmIChpID09IDB1KSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIFJUTF9X MzIoUTBfUlhfREVTQ19BRERSMCwNCj4gKHUzMikoKHJpbmctPnBoeV9hZGRyICYgRE1BX0JJVF9N QVNLKDMyKSkpKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgUlRMX1czMihRMF9SWF9ERVND X0FERFI0LA0KPiAodTMyKShyaW5nLT5waHlfYWRkciA+PiAzMikpOw0KPiA+ICsgICAgICAgICAg ICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgUlRMX1czMigoUTFfUlhfREVT Q19BRERSMCArICgoaSAtIDF1KSAqIDh1KSksDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHUzMikocmluZy0+cGh5X2FkZHIgJg0KPiBETUFfQklUX01BU0soMzIpKSk7DQo+ID4g KyAgICAgICAgICAgICAgICAgICAgIFJUTF9XMzIoKFExX1JYX0RFU0NfQUREUjQgKyAoKGkgLSAx dSkgKiA4dSkpLA0KPiAodTMyKShyaW5nLT5waHlfYWRkciA+PiAzMikpOw0KPiA+ICsgICAgICAg ICAgICAgfQ0KPiA+ICsgICAgIH0NCj4gPiArfQ0KPiA+ICsN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MzIgc3RhcnQsIHUzMiBu KQ0KPiA+ICt7DQo+ID4gKyAgICAgdTMyIGk7DQo+ID4gKyAgICAgY29uc3Qgc3RydWN0IHJ0YXNl X3ByaXZhdGUgKnRwID0gcmluZy0+aXZlYy0+dHA7DQo+ID4gKyAgICAgc3RydWN0IG5ldF9kZXZp Y2UgKmRldiA9IHRwLT5kZXY7DQo+ID4gKw0KPiA+ICsgICAgIGZvciAoaSA9IDB1OyBpIDwgbjsg aSsrKSB7DQo+ID4gKyAgICAgICAgICAgICB1MzIgZW50cnkgPSAoc3RhcnQgKyBpKSAlIE5VTV9E RVNDOw0KPiA+ICsgICAgICAgICAgICAgdTMyIGxlbiA9IHJpbmctPm1pcy5sZW5bZW50cnldOw0K PiA+ICsNCj4gPiArICAgICAgICAgICAgIGlmIChsZW4gIT0gMHUpIHsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKnNrYiA9IHJpbmctPnNrYnVmZltlbnRyeV07DQo+ ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFzZV91bm1hcF90eF9za2IodHAtPnBk ZXYsIGxlbiwgcmluZy0+ZGVzYyArDQo+IChzaXplb2YodHhfZGVzYykgKiBlbnRyeSkpOw0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICByaW5nLT5taXMubGVuW2VudHJ5XSA9IDA7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIGlmIChza2IpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBkZXYtPnN0YXRzLnR4X2Ryb3BwZWQrKzsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBkZXZfa2ZyZWVfc2tiX2FueShza2IpOw0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHJpbmctPnNrYnVmZltlbnRyeV0gPSBOVUxMOw0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgICB9DQo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N1cl9mcmFnXTsNCj4gPiArICAgICAgICAgICAgIGRtYV9hZGRyX3Qg bWFwcGluZzsNCj4gPiArICAgICAgICAgICAgIHUzMiBzdGF0dXMsIGxlbjsNCj4gPiArICAgICAg ICAgICAgIHZvaWQgKmFkZHI7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgZW50cnkgPSAoZW50 cnkgKyAxdSkgJSBOVU1fREVTQzsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICB0eGQgPSByaW5n LT5kZXNjICsgKHNpemVvZih0eF9kZXNjKSAqIGVudHJ5KTsNCj4gPiArICAgICAgICAgICAgIGxl biA9IHNrYl9mcmFnX3NpemUoZnJhZyk7DQo+ID4gKyAgICAgICAgICAgICBhZGRyID0gc2tiX2Zy YWdfYWRkcmVzcyhmcmFnKTsNCj4gPiArICAgICAgICAgICAgIG1hcHBpbmcgPSBkbWFfbWFwX3Np bmdsZSgmdHAtPnBkZXYtPmRldiwgYWRkciwgbGVuLA0KPiBETUFfVE9fREVWSUNFKTsNCj4gPiAr DQo+ID4gKyAgICAgICAgICAgICBpZiAodW5saWtlbHkoZG1hX21hcHBpbmdfZXJyb3IoJnRwLT5w ZGV2LT5kZXYsDQo+IG1hcHBpbmcpKSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBpZiAo dW5saWtlbHkobmV0X3JhdGVsaW1pdCgpKSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBuZXRpZl9lcnIodHAsIGRydiwgdHAtPmRldiwgIkZhaWxlZCB0bw0KPiBtYXAgVFggZnJh Z21lbnRzIERNQSFcbiIpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgZ290byBl cnJfb3V0Ow0KPiA+ICsgICAgICAgICAgICAgfQ0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIGlm ICgoKGVudHJ5ICsgMXUpICUgTlVNX0RFU0MpID09IDB1KQ0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICBzdGF0dXMgPSAob3B0czEgfCBsZW4gfCAodTMyKVJJTkdfRU5EKTsNCj4gPiArICAgICAg ICAgICAgIGVsc2UNCj4gPiArICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gb3B0czEgfCBs ZW47DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKGN1cl9mcmFnID09ICgodTMyKW5yX2Zy YWdzIC0gMXUpKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJpbmctPnNrYnVmZltlbnRy eV0gPSBza2I7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyB8PSAodTMyKVRYX0xB U1RfRlJBRzsNCj4gPiArICAgICAgICAgICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICAgICAgICB0 eGQtPmFkZHIgPSBjcHVfdG9fbGU2NChtYXBwaW5nKTsNCj4gPiArICAgICAgICAgICAgIHJpbmct Pm1pcy5sZW5bZW50cnldID0gbGVuOw0KPiA+ICsgICAgICAgICAgICAgdHhkLT5vcHRzMiA9IGNw dV90b19sZTMyKG9wdHMyKTsNCj4gPiArICAgICAgICAgICAgIC8qIG1ha2Ugc3VyZSB0aGUgb3Bl cmF0aW5nIGZpZWxkcyBoYXZlIGJlZW4gdXBkYXRlZCAqLw0KPiA+ICsgICAgICAgICAgICAgd21i KCk7DQo+ID4gKyAgICAgICAgICAgICB0eGQtPm9wdHMxID0gY3B1X3RvX2xlMzIoc3RhdHVzKTsN Cj4gPiArICAgICAgICAgICAgIHBrdF9sZW5fY250ICs9IGxlbjsNCj4gPiArICAgICB9DQo+ID4g Kw0KPiA+ICsgICAgIHJjID0gKHMzMiljdXJfZnJhZzsNCj4gPiArICAgICBnb3RvIG91dDsNCj4g PiArDQo+ID4gK2Vycl9vdXQ6DQo+ID4gKyAgICAgcnRhc2VfdHhfY2xlYXJfcmFuZ2UocmluZywg cmluZy0+Y3VyX2lkeCArIDF1LCBjdXJfZnJhZyk7DQo+ID4gKyAgICAgcmMgPSAtRUl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ZmVhdHVyZXMgJiBORVRJRl9GX0lQX0NTVU0pICE9IDB1KSB7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaXBfcHJvdG9jb2wgPSBpcF9oZHIoc2tiKS0+cHJvdG9jb2w7 DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3N1bV9jbWQgPSAodTMyKVRYX0lQ Q1NfQzsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICBicmVhazsNCj4gPiArICAgICAgICAgICAgIGNhc2UgaHRvbnMoRVRIX1BfSVBWNik6DQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgIGlmICgoZGV2LT5mZWF0dXJlcyAmIE5FVElGX0ZfSVBW Nl9DU1VNKSAhPSAwdSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUzMiB0 cmFuc3BvcnRfb2Zmc2V0ID0NCj4gKHUzMilza2JfdHJhbnNwb3J0X29mZnNldChza2IpOw0KPiA+ ICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHRyYW5zcG9ydF9vZmZz ZXQgPiAwdSkgJiYNCj4gKHRyYW5zcG9ydF9vZmZzZXQgPD0gVENQSE9fTUFYKSkgew0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXBfcHJvdG9jb2wgPQ0KPiBpcHY2 X2hkcihza2IpLT5uZXh0aGRyOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY3N1bV9jbWQgPQ0KPiAodTMyKVRYX0lQVjZGX0M7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjc3VtX2NtZCB8PSB0cmFuc3BvcnRfb2Zmc2V0DQo+IDw8 IFRDUEhPX1NISUZUOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBicmVhazsN Cj4gPiArICAgICAgICAgICAgIGRlZmF1bHQ6DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGlm ICh1bmxpa2VseShuZXRfcmF0ZWxpbWl0KCkpKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGRwcmludGsoImNoZWNrc3VtX3BhcnRpYWwgcHJvdG89JXghXG4iLA0KPiBza2ItPnBy b3RvY29sKTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ICsg ICAgICAgICAgICAgfQ0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIGlmIChpcF9wcm90b2NvbCA9 PSAodTgpSVBQUk9UT19UQ1ApDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGNzdW1fY21kIHw9 ICh1MzIpVFhfVENQQ1NfQzsNCj4gPiArICAgICAgICAgICAgIGVsc2UgaWYgKGlwX3Byb3RvY29s ID09ICh1OClJUFBST1RPX1VEUCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgY3N1bV9jbWQg fD0gKHUzMilUWF9VRFBDU19DOw0KPiA+ICsgICAgICAgICAgICAgZWxzZQ0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICBuZXRkZXZfaW5mbyhkZXYsICIlcyBjb21tYW5kIGVycm9yLlxuIiwNCj4g X19mdW5jX18pOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIGlmIChjc3VtX2NtZCA9PSAwdSkg ew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBzd19jYWxjX2NzdW0gPSBUUlVFOw0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICBXQVJOX09OKDEpOyAvKiB3ZSBuZWVkIGEgV0FSTigpICovDQo+ ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAgfQ0KPiA+ICsNCj4gPiArICAgICBpZiAoc3df Y2FsY19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zID0gc2tiX2dzb19zZWdtZW50KHNrYiwgZmVhdHVyZXMpOw0KPiA+ICsgICAg ICAgICAgICAgaWYgKElTX0VSUihzZWdzKSB8fCAoIXNlZ3MpKQ0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICBnb3RvIGRyb3A7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgZG8gew0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICBuc2tiID0gc2VnczsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgc2VncyA9IHNlZ3MtPm5leHQ7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIG5za2ItPm5l eHQgPSBOVUxMOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFzZV9zdGFydF94bWl0KG5z a2IsIHRwLT5kZXYpOw0KPiA+ICsgICAgICAgICAgICAgfSB3aGlsZSAoc2Vncyk7DQo+ID4gKw0K PiA+ICsgICAgICAgICAgICAgZGV2X2NvbnN1bWVfc2tiX2FueShza2IpOw0KPiA+ICsgICAgICAg ICAgICAgZ290byBvdXQ7DQo+ID4gKyAgICAgfSBlbHNlIGlmIChza2ItPmlwX3N1bW1lZCA9PSAo dTgpQ0hFQ0tTVU1fUEFSVElBTCkgew0KPiA+ICsgICAgICAgICAgICAgaWYgKHNrYl9jaGVja3N1 bV9oZWxwKHNrYikgPCAwKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBnb3RvIGRyb3A7DQo+ ID4gKw0KPiA+ICsgICAgICAgICAgICAgcnRhc2Vfc3RhcnRfeG1pdChza2IsIHRwLT5kZXYpOw0K PiA+ICsgICAgICAgICAgICAgZ290byBvdXQ7DQo+ID4gKyAgICAgfSBlbHNlIHsNCj4gPiArICAg ICAgICAgICAgIGdvdG8gZHJvcDsNCj4gPiArICAgICB9DQo+ID4gKw0KPiA+ICtkcm9wOg0KPiA+ ICsgICAgIHN0YXRzID0gJnRwLT5kZXYtPnN0YXRzOw0KPiA+ICsgICAgIHN0YXRzLT50eF9kc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Qo+ID4gKw0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICBhc3NlcnQoKHRyYW5zcG9ydF9vZmZzZXQgJSAyKSA9PSAwKTsNCj4g PiArICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChnZXRfcHJvdG9jb2woc2tiKSkgew0KPiA+ ICsgICAgICAgICAgICAgICAgICAgICBjYXNlIGh0b25zKEVUSF9QX0lQKToNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNwb3J0X29mZnNldCA8PSAxMjh1KSB7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRzMSB8PQ0KPiAodTMy KUdJQU5UX1NFTkRfVjQ7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBvcHRzMSB8PSB0cmFuc3BvcnRfb2Zmc2V0IDw8DQo+IEdUVENQSE9fU0hJRlQ7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRzMiB8PSBtaW4obXNzLCBNU1Nf TUFYKQ0KPiA8PCAxODsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGxhcmdlX3NlbmRfZW4gPSAxOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0N Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgY2FzZSBodG9ucyhFVEhfUF9JUFY2KToNCj4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpZiAobXNkbl9naWFudF9zZW5kX2NoZWNrKHNrYikgIT0gMCkgew0KPiA+ ICsNCj4gc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmdHAtPmxvY2ssIGZsYWdzKTsNCj4gPiArICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ0YXNlX2NzdW1fd29ya2Fyb3VuZCh0 cCwNCj4gc2tiKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdv dG8gb3V0Ow0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiArDQo+ID4g KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRyYW5zcG9ydF9vZmZzZXQgPD0gMTI4 dSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0czEgfD0N Cj4gKHUzMilHSUFOVF9TRU5EX1Y2Ow0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgb3B0czEgfD0gdHJhbnNwb3J0X29mZnNldCA8PA0KPiBHVFRDUEhPX1NISUZUOw0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0czIgfD0gbWluKG1z cywgTVNTX01BWCkNCj4gPDwgMTg7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsYXJnZV9zZW5kX2VuID0gMTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB9DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgaWYgKHVubGlrZWx5KG5ldF9yYXRlbGltaXQoKSkpDQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkcHJpbnRrKCJ0c28gcHJvdG89JXghXG4iLA0KPiBza2It PnByb3RvY29sKTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJl YWs7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgIGlmIChsYXJnZV9zZW5kX2VuID09IDB1KQ0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGdvdG8gZXJyX2RtYV8wOw0KPiA+ICsgICAgICAgICAgICAgfQ0KPiA+ICsg ICAgIH0NCj4gPiArDQo+ID4gKyAgICAgaWYgKGxhcmdlX3NlbmRfZW4gPT0gMHUpIHsNCj4gPiAr ICAgICAgICAgICAgIGlmIChza2ItPmlwX3N1bW1lZCA9PSAodTgpQ0hFQ0tTVU1fUEFSVElBTCkN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgb3B0czIgfD0gcnRhc2VfdHhfY3N1bShza2IsIGRl dik7DQo+ID4gKyAgICAgfQ0KPiA+ICsNCj4gPiArICAgICBmcmFncyA9IHJ0YXNlX3htaXRfZnJh Z3MocmluZywgc2tiLCBvcHRzMSwgb3B0czIpOw0KPiA+ICsgICAgIGlmICh1bmxpa2VseShmcmFn cyA8IDApKQ0KPiA+ICsgICAgICAgICAgICAgZ290byBlcnJfZG1hXzA7DQo+ID4gKw0KPiA+ICsg ICAgIGlmIChmcmFncyAhPSAwKSB7DQo+ID4gKyAgICAgICAgICAgICBsZW4gPSBza2JfaGVhZGxl bihza2IpOw0KPiA+ICsgICAgICAgICAgICAgb3B0czEgfD0gKHUzMilUWF9GSVJTVF9GUkFHOw0K PiA+ICsgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAgICAgICBsZW4gPSBza2ItPmxlbjsNCj4g PiArICAgICAgICAgICAgIHJpbmctPnNrYnVmZltlbnRyeV0gPSBza2I7DQo+ID4gKyAgICAgICAg ICAgICBvcHRzMSB8PSAodTMyKShUWF9GSVJTVF9GUkFHIHwgVFhfTEFTVF9GUkFHKTsNCj4gPiAr ICAgICB9DQo+ID4gKw0KPiA+ICsgICAgIGlmICgoKChlbnRyeSArIDF1KSAlIE5VTV9ERVNDKSA9 PSAwdSkpDQo+ID4gKyAgICAgICAgICAgICBvcHRzMSB8PSAobGVuIHwgKHUzMilSSU5HX0VORCk7 DQo+ID4gKyAgICA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ZSBzdXJlIHRoZSBpbmRleCBoYXMgYmVlbiB1cGRhdGVkICovDQo+ID4gKyAgICAgc21wX3JtYigp Ow0KPiA+ICsgICAgIHR4X2xlZnQgPSByaW5nLT5jdXJfaWR4IC0gZGlydHlfdHg7DQo+ID4gKw0K PiA+ICsgICAgIHdoaWxlICh0eF9sZWZ0ID4gMHUpIHsNCj4gPiArICAgICAgICAgICAgIHUzMiBl bnRyeSA9IGRpcnR5X3R4ICUgTlVNX0RFU0M7DQo+ID4gKyAgICAgICAgICAgICB0eF9kZXNjICpk ZXNjID0gcmluZy0+ZGVzYyArIChzaXplb2YodHhfZGVzYykgKiBlbnRyeSk7DQo+ID4gKyAgICAg ICAgICAgICB1MzIgbGVuID0gcmluZy0+bWlzLmxlbltlbnRyeV07DQo+ID4gKyAgICAgICAgICAg ICB1MzIgc3RhdHVzOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIC8qIG1ha2Ugc3VyZSBkaXNj cmlwdG9yIGhhcyBiZWVuIHVwZGF0ZWQgKi8NCj4gPiArICAgICAgICAgICAgIHJtYigpOw0KPiA+ ICsgICAgICAgICAgICAgc3RhdHVzID0gbGUzMl90b19jcHUoZGVzYy0+b3B0czEpOw0KPiA+ICsN Cj4gPiArICAgICAgICAgICAgIGlmICgoc3RhdHVzICYgREVTQ19PV04pICE9IDB1KSB7DQo+ID4g KyAgICAgICAgICAgICAgICAgICAgIHR4X2xlZnQgPSAwOw0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICBjb250aW51ZTsNCj4gPiArICAgICAgICAgICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICAg ICAgICBkZXYtPnN0YXRzLnR4X2J5dGVzICs9IGxlbjsNCj4gPiArICAgICAgICAgICAgIGRldi0+ c3RhdHMudHhfcGFja2V0cysrOw0KPiA+ICsgICAgICAgICAgICAgcnRhc2VfdW5tYXBfdHhfc2ti KHRwLT5wZGV2LCBsZW4sIGRlc2MpOw0KPiA+ICsgICAgICAgICAgICAgcmluZy0+bWlzLmxlbltl bnRyeV0gPSAwOw0KPiA+ICsgICAgICAgICAgICAgaWYgKHJpbmctPnNrYnVmZltlbnRyeV0pIHsN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgZGV2X2NvbnN1bWVfc2tiX2FueShyaW5nLT5za2J1 ZmZbZW50cnldKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgcmluZy0+c2tidWZmW2VudHJ5 XSA9IE5VTEw7DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgICBkaXJ0eV90 eCsrOw0KPiA+ICsgICAgICAgICAgICAgdHhfbGVmdC0tOw0KPiA+ICsgICAgICAgICAgICAgd29y a2RvbmUrKzsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICBpZiAod29ya2RvbmUgPT0gYnVkZ2V0 KSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHR4X2xlZnQgPSAwOw0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICBjb250aW51ZTsNCj4gPiArICAgICAgICAgICAgIH0NCj4gPiArICAgICB9 DQo+ID4gKw0KPiA+ICsgICAgIGlmIChyaW5nLT5kaXJ0eV9pZHggIT0gZGlydHlfdHgpIHsNCj4g PiArICAgICAgICAgICAgIHJpbmctPmRpcnR5X2lkeCA9IGRpcnR5X3R4Ow0KPiA+ICsgICAgICAg ICAgICAgLyogbWFrZSBzdXJlIHRoZSBpbmRleCBoYXMgYmVlbiB1cGRhdGVkICovDQo+ID4gKyAg ICAgICAgICAgICBzbXBfd21iKCk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKG5ldGlm X3F1ZXVlX3N0b3BwZWQoZGV2KSAmJiAoVFhfQlVGRlNfQVZBSUwocmluZykgPj0NCj4gTUFYX1NL Ql9GUkFHUykpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIG5ldGlmX3dha2VfcXVldWUoZGV2 KTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAvKiBtYWtlI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0KPiA+ICsgICAgIHMzMiByZXQgPSAtMTsNCj4gPiAr DQo+ID4gKyAgICAgaWYgKChzMzIpcGt0X3NpemUgPCByeF9jb3B5YnJlYWspIHsNCj4gPiArICAg ICAgICAgICAgIHN0cnVjdCBza19idWZmICpza2I7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAg c2tiID0gUlRMX0FMTE9DX1NLQl9JTlRSKGl2ZWMtPm5hcGksICgodTMyKXBrdF9zaXplICsNCj4g KHUzMilSVEtfUlhfQUxJR04pKTsNCj4gPiArICAgICAgICAgICAgIGlmIChza2IpIHsNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKnBfc2tfYnVmZl9kYXRhOw0KPiA+ICsNCj4g PiArICAgICAgICAgICAgICAgICAgICAgcF9za19idWZmX2RhdGEgPSBwX3NrX2J1ZmZbMF0tPmRh dGE7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHNrYl9yZXNlcnZlKHNrYiwgKHMzMilSVEtf UlhfQUxJR04pOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBwcmVmZXRjaChwX3NrX2J1ZmZf ZGF0YSAtIFJUS19SWF9BTElHTik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIG1lbWNweShz a2ItPmRhdGEsIHBfc2tfYnVmZl9kYXRhLA0KPiAodTY0KXBrdF9zaXplKTsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgKnBfc2tfYnVmZiA9IHNrYjsNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgcnRhc2VfbWFya190b19hc2ljKGRlc2MsIHJ4X2J1Zl9zeik7DQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgIHJldCA9IDA7DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAgfQ0KPiA+ ICsgICAgIHJldHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4gK3N0YXRpYyBpbmxpbmUgdm9p ZCBydGFzZV9yeF9za2IoY29uc3Qgc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sgICAgICAgICAgICAgLyogbWFrZSBzdXJlIGRpc2NyaXB0 b3IgaGFzIGJlZW4gdXBkYXRlZCAqLw0KPiA+ICsgICAgICAgICAgICAgcm1iKCk7DQo+ID4gKyAg ICAgICAgICAgICBzdGF0dXMgPSBsZTMyX3RvX2NwdShkZXNjLT5kZXNjX3N0YXR1cy5vcHRzMSk7 DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKChzdGF0dXMgJiBERVNDX09XTikgIT0gMHUp DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ICsNCj4gPiArICAgICAgICAg ICAgIGlmICh1bmxpa2VseShzdGF0dXMgJiBSWF9SRVMpKSB7DQo+ID4gKyAgICAgICAgICAgICAg ICAgICAgIGlmIChuZXRpZl9tc2dfcnhfZXJyKHRwKSAhPSAwdSkNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBuZXRkZXZfaW5mbyhkZXYsICIlczogUnggRVJST1IuIHN0YXR1cw0K PiA9ICUwOHhcbiIsIGRldi0+bmFtZSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBzdGF0dXMpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ZGV2LT5zdGF0cy5yeF9lcnJvcnMrKzsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAg IGlmICgoc3RhdHVzICYgKFJYX1JXVCB8IFJYX1JVTlQpKSAhPSAwdSkNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBkZXYtPnN0YXRzLnJ4X2xlbmd0aF9lcnJvcnMrKzsNCj4gPiAr DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGlmICgoc3RhdHVzICYgUlhfQ1JDKSAhPSAwdSkN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXYtPnN0YXRzLnJ4X2NyY19lcnJv cnMrKzsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGlmICgoZGV2LT5mZWF0dXJl cyAmIE5FVElGX0ZfUlhBTEwpICE9IDB1KQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGdvdG8gcHJvY2Vzc19wa3Q7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBy dGFzZV9tYXJrX3RvX2FzaWMoZGVzYywgdHAtPnJ4X2J1Zl9zeik7DQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgIGdvdG8gb3V0Ow0KPiA+ICsgICAgICAgICAgICAgfQ0KPiA+ICsNCj4gPiArcHJv Y2Vzc19wa3Q6DQo+ID4gKyAgICAgICAgICAgICBpZiAobGlrZWx5KChkZXYtPmZlYXR1cmVzICYg TkVUSUZfRl9SWEZDUykgPT0gMHUpKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBwa3Rfc2l6 ZSA9IChzdGF0dXMgJiAweDAwMDAzRkZGdSkgLSA0dTsNCj4gPiArICAgICAgICAgICAgIGVsc2UN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgcGt0X3NpemUgPSAoc3RhdHVzICYgMHgwMDAwM0ZG RnUpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIC8qIFRoZSBkcml2ZXIgZG9lcyBub3Qgc3Vw cG9ydCBpbmNvbWluZyBmcmFnbWVudGVkDQo+ID4gKyAgICAgICAgICAgICAgKiBmcmFtZXMuIFRo ZXkgYXJlIHNlZW4gYXMgYSBzeW1wdG9tIG9mIG92ZXItbXR1DQo+ID4gKyAgICAgICAgICAgICAg KiBzaXplZCBmcmFtZXMuDQo+ID4gKyAgICAgICAgICAgICAgKi8NCj4gPiArICAgICAgICAgICAg IGlmICh1bmxpa2VseShydGFzZV9mcmFnbWVudGVkX2ZyYW1lKHN0YXR1cykpKSB7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIGRldi0+c3RhdHMucnhfZHJvcHBlZCsrOw0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICBkZXYtPnN0YXRzLnJ4X2xlbmd0aF9lcnJvcnMrKzsNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgcnRhc2VfbWFya190b19hc2ljKGRlc2MsIHRwLT5yeF9idWZfc3opOw0K PiA+ICsgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCj4gPiArICAgICAgICAgICAgIH0N Cj4gPiArDQo+ID4gKyAgICAgICAgICAgICBza2IgPSByaW5nLT5za2J1ZmZbZW50cnldOw0KPiA+ ICsgICAgICAgICAgICAgZG1hX3N5bmNfc2luZ2xlX2Zvcl9jcHUoJnRwLT5wZGV2LT5kZXYsDQo+ IHJpbmctPm1pcy5kYXRhX3BoeV9hZGRyW2VudHJ5XSwNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHRwLT5yeF9idWZfc3osDQo+IERNQV9GUk9NX0RFVklDRSk7DQo+ ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKHJ0YXNlX3RyeV9yeF9jb3B5KHJpbmcsICZza2Is IHBrdF9zaXplLCBkZXNjLA0KPiB0cC0+cnhfYnVmX3N6KSAhPSAwKSB7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgIGRtYV91bm1hcF9zaW5nbGUoJnRwLT5wZGV2LT5kZXYsDQo+IHJpbmctPm1p cy5kYXRhX3BoeV9hZGRyW2VudHJ5XSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB0cC0+cnhfYnVmX3N6LA0KPiBETUFfRlJPTV9ERVZJQ0UpOw0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICByaW5nLT5za2J1ZmZbZW50cnldID0gTlVMTDsNCj4gPiArICAgICAg ICAgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGRtYV9zeW5jX3Npbmds ZV9mb3JfZGV2aWNlKCZ0cC0+cGRldi0+ZGV2LA0KPiByaW5nLT5taXMuZGF0YV9waHlfYWRkcltl bnRyeV0sDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHRwLT5yeF9idWZfc3osDQo+IERNQV9GUk9NX0RFVklDRSk7DQo+ID4gKyAgICAgICAgICAg ICB9DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKChkZXYtPmZlYXR1cmVzICYgTkVUSUZf Rl9SWENTVU0pICE9IDB1KQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFzZV9yeF9jc3Vt KHRwLCBza2IsIGRlc2MpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIHNrYi0+ZGV2ID0gZGV2 Ow0KPiA+ICsgICAgICAgICAgICAgc2tiX3B1dChza2IsIHBrdF9zaXplKTsNCj4gPiArICAgICAg ICAgICAgIHNrYi0+cHJvdG9jb2wgPSBldGhfdHlwZV90cmFucyhza2IsIGRldik7DQo+ID4gKw0K PiA+ICsgICAgICAgICAgICAgaWYgKHNrYi0+cGt0X3R5cGUgPT0gKHU4KVBBQ0tFVF9NVUxUSUNB U1QpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGRldi0+c3RhdHMubXVsdGljYXN0Kys7DQo+ ID4gKw0KPiA+ICsgICAgICAgICAgICAgaWYgKHJ0YXNlX3J4X3ZsYW5fc2tiKGRlc2MsIHNrYikg PCAwKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFzZV9yeF9za2IocmluZywgc2tiKTsN Cj4gPiArDQo+ID4gKyAgICAgICAgICAgICBkZXYtPnN0YXRzLnJ4X2J5dGVzICs9ICh1NjQpcGt0 X3NpemU7DQo+ID4gKyAgICAgICAgICAgICBkZXYtPnN0YXRzLnJ4X3BhY2tldHMrKzsNCj4gPiAr b3V0Og0KPiA+ICsgICAgICAgICAgICAgd29ya2RvbmUrKzsNCj4gPiArICAgICAgICAgICAgIGN1 cl9yeCsrOw0KPiA+ICsgICAgICAgICAgICAgZW50cnkgPSBjd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JUTF9SMzIoaXZlYy0+aXNyX2FkZHIpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIGlmICgo c3RhdHVzICYgTUJYKSAhPSAwdSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgcXVldWVfd29y ayh3b3JrX3F1ZXVlLCAmdHAtPm1zZ193b3JrKTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICBp ZiAoKHN0YXR1cyAmIFRJTUVPVVQwKSAhPSAwdSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAg cXVldWVfd29yayh3b3JrX3F1ZXVlLCAmdHAtPndhdGNoZG9nX3dvcmspOw0KPiA+ICsNCj4gPiAr I2lmZGVmIFJUTERCRw0KPiA+ICsgICAgICAgICAgICAgaWYgKHN0YXR1cyAmIFJEVSkNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgbmV0ZGV2X2luZm8oZGV2LCAiUEYgcmVjZWl2ZSBSRFUgISEh ISEhISEhIik7DQo+ID4gKw0KPiA+ICsjZW5kaWYNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICBo YW5kbGVkID0gMTsNCj4gPiArICAgICAgICAgICAgIFJUTF9XMzIoaXZlYy0+aW1yX2FkZHIsIDB4 MCk7DQo+ID4gKyAgICAgICAgICAgICBSVExfVzMyKGl2ZWMtPmlzcl9hZGRyLCAodTMyKShzdGF0 dXMgJiB+Rk9WVykpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgIHN0YXR1cyAmPSAodTMyKSh+ TUJYKTsNCj4gPiArICAgICAgICAgICAgIGlmICgoc3RhdHVzICYgaXZlYy0+aW1yKSAhPSAwdSkg ew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBpZiAobGlrZWx5KFJUTF9ORVRJRl9SWF9TQ0hF RFVMRV9QUkVQKGRldiwNCj4gJml2ZWMtPm5hcGkpKSkNCj4gPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBfX1JUTF9ORVRJRl9SWF9TQ0hFRFVMRShkZXYsD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gICAgIGludCByZXQgPSAwOw0KPiA+ICsNCj4gPiArICAgICBpZiAoYmUxNl90b19jcHUocHJv dG9jb2wpICE9ICh1MTYpRVRIX1BfODAyMVEpIHsNCj4gPiArICAgICAgICAgICAgIHJldCA9IC1F SU5WQUw7DQo+ID4gKyAgICAgICAgICAgICBnb3RvIG91dDsNCj4gPiArICAgICB9DQo+ID4gKw0K PiA+ICsgICAgIC8qIHZsYW4gZmlsdGVyIHRhYmxlICovDQo+ID4gKyAgICAgZm9yIChpID0gMHU7 IGkgPCBWTEFOX0ZJTFRFUl9FTlRSWV9OVU07IGkrKykgew0KPiA+ICsgICAgICAgICAgICAgaWYg KCh0cC0+dmxhbl9maWx0ZXJfY3RybCAmIEJJVChpKSkgPT0gMHUpIHsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgdHAtPnZsYW5fZmlsdGVyX2N0cmwgfD0gKHUzMilCSVQoaSk7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIHRwLT52bGFuX2ZpbHRlcl92aWRbaV0gPSB2aWQ7DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIFJUTF9XMzIoKFZMQU5fRU5UUllfMCArIChpICogNHUpKSwgKHZp ZCB8DQo+IFZMQU5fRU5UUllfQ0FSRUJJVCkpOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAg ICAgICAgdG1wX21lbSA9IFJUTF9SMTYoKFZMQU5fRU5UUllfTUVNXzAgKw0KPiAoKGkgLyAydSkg KiAydSkpKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgdG1wX21lbSB8PSAoKHUxNikweDF1 IDw8ICgoaSAlIDJ1KSAqIDh1KSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIFJUTF9XMTYo KFZMQU5fRU5UUllfTUVNXzAgKyAoKGkgLyAydSkgKiAydSkpLA0KPiB0bXBfbWVtKTsNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAgICAgICAgICAgICB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DQo+ID4gKyAgICAgICAgICAgICBpZiAodHAtPnZsYW5fZmlsdGVyX3ZpZFtpXSA9PSB2aWQpIHsN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgdHAtPnZsYW5fZmlsdGVyX2N0cmwgJj0gKHUzMiko fkJJVChpKSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHRwLT52bGFuX2ZpbHRlcl92aWRb aV0gPSAwOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBSVExfVzMyKChWTEFOX0VOVFJZXzAg KyAoaSAqIDR1KSksIDApOw0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgdG1wX21l bSA9IFJUTF9SMTYoKFZMQU5fRU5UUllfTUVNXzAgKw0KPiAoKGkgLyAydSkgKiAydSkpKTsNCj4g PiArICAgICAgICAgICAgICAgICAgICAgdG1wX21lbSAmPSAofigodTE2KTB4MXUgPDwgKChpICUg MnUpICogOHUpKSk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIFJUTF9XMTYoKFZMQU5fRU5U UllfTUVNXzAgKyAoKGkgLyAydSkgKiAydSkpLA0KPiB0bXBfbWVtKTsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAgICAgICAgICAgICB9DQo+ID4gKyAgICAgfQ0KPiA+ ICsNCj4gPiArICAgICAvKiBjaGVjayB2bGFuIGZpbHRlciBlbmFibGVkICovDQo+ID4gKyAgICAg aWYgKHRwLT52bGFuX2ZpbHRlcl9jdHJsID09IDB1KSB7DQo+ID4gKyAgICAgICAgICAgICAvKiBk aXNhYmxlIHZsYW4gZmlsdGVyICovDQo+ID4gKyAgICAgICAgICAgICBydGFzZV92bGFuX2ZpbHRl cih0cCwgMHUpOw0KPiA+ICsgICAgIH0NCj4gPiArDQo+ID4gK291dDoNCj4gPiArICAgICByZXR1 cm4gcmM7DQo+ID4gK30NCj4gPiArDQo+ID4gK3N0YXRpYyB2b2lkIHJ0YXNlX3NldF9od19j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PSAwOw0KPiA+ICsgICAgIHN0cnVjdCBydGFzZV9zd2NfY21kX3Qgc3dfY21k Ow0KPiA+ICsNCj4gPiArICAgICAodm9pZClwX2ZpbGU7DQo+ID4gKw0KPiA+ICsgICAgIGlmIChy dGFzZV9zd2NfZGV2aWNlLmluaXRfZmxhZyA9PSAxdSkgew0KPiA+ICsgICAgICAgICAgICAgcmMg PSAtRU5YSU87DQo+ID4gKyAgICAgICAgICAgICBnb3RvIG91dDsNCj4gPiArICAgICB9DQo+ID4g Kw0KPiA+ICsgICAgIHJjID0gKHM2NCkoY29weV9mcm9tX3VzZXIoJnN3X2NtZCwgKHZvaWQgKilh cmcsIHNpemVvZihzdHJ1Y3QNCj4gcnRhc2Vfc3djX2NtZF90KSkpOw0KPiA+ICsNCj4gPiArICAg ICBpZiAocmMgIT0gMCkgew0KPiA+ICsgICAgICAgICAgICAgU1dDX0RSSVZFUl9JTkZPKCJydGFz ZV9zd2MgY29weV9mcm9tX3VzZXIgZmFpbGVkLiIpOw0KPiA+ICsgICAgIH0gZWxzZSB7DQo+ID4g KyAgICAgICAgICAgICBzd2l0Y2ggKGNtZCkgew0KPiA+ICsgICAgICAgICAgICAgY2FzZSBTV0Nf Q01EX1JFR19HRVQ6DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJ0YXNlX3N3Y19yZWdfZ2V0 KCZzd19jbWQpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICByYyA9IChzNjQpKGNvcHlfdG9f dXNlcigodm9pZCAqKWFyZywgJnN3X2NtZCwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKHN0cnVjdA0KPiBydGFzZV9zd2NfY21kX3QpKSk7 DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ICsNCj4gPiArICAgICAgICAg ICAgIGNhc2UgU1dDX0NNRF9SRUdfU0VUOg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBydGFz ZV9zd2NfcmVnX3NldCgmc3dfY21kKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgcmMgPSAo czY0KShjb3B5X3RvX3VzZXIoKHZvaWQgKilhcmcsICZzd19jbWQsDQo+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZihzdHJ1Y3QNCj4gcnRhc2Vf c3djX2NtZF90KSkpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gPiArDQo+ ID4gKyAgICAgICAgICAgICBkZWZhdWx0Og0KPiA+ICsgICAgICAgICAgICAgICAgICAgICByYyA9 IC1FTk9UVFk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ICsgICAgICAg ICAgICAgfQ0KPiA+ICsgICAgIH0NCj4gPiArDQo+ID4gK291dDoNCj4gPiArICAgICByZXR1cm4g cmM7DQo+ID4gK30NCj4gPiArDQo+ID4gK3N0YXRpYyBjb25zdCBzdHJ1Y3QgZmlsZV9vcGVyYXRp b25zIHJ0YXNlX3N3Y19mb3BzID0gew0KPiA+ICsgICAgIC5vd25lciA9IFRISVNfTU9EVUxFLA0K PiA+ICsgICAgIC5vcGVuID0gcnRhc2Vfc3djX29wZW4sDQo+ID4gKyAgICAgLnJlbGVhc2UgPSBy dGFzZV9zd2NfcmVsZWFzZSwNCj4gPiArICAgICAudW5sb2NrZWRfaW9jdGwgPSBydGFzZV9zd2Nf aW9jdGwsDQo+ID4gK307DQo+ID4gKw0KPiA+ICtzdGF0aWMgaW50IHJ0YXNlX3N3Y19pbml0X29u ZShzdHJ1Y3QgcGNpX2RldiAqcGRldiwgY29uc3Qgc3RydWN0DQo+IHBjaV9kZXZpY2VfaWQgKmVu dCkNCj4gPiArew0KPiA+ICsgICAgIGludCByYzsNCj4gPiArICAgICB2b2lkIF9faW9tZW0gKmlv YWRkciA9IE5VTEw7DQo+ID4gKyAgICAgZGV2X3QgZGV2bm8gPSBNS0RFVihTV0NfRFJJVkVSX01B Sk9SLCAwKTsNCj4gPiArDQo+ID4gKyAgICAgKHZvaWQpZW50Ow0KPiA+ICsNCj4gPiArICAgICBy dGFzZV9zd2NfZGV2aWNlLmluaXRfZmxhZyA9IDE7DQo+ID4gKyAgICAgcmMgPSBwY2lfZW5hYmxl X2RldmljZShwZGV2KTsNCj4gPiArDQo+ID4gKyAgICAgaWYgKHJjICE9IDApDQo+ID4gKyAgICAg ICAgICAgICBTV0NfRFJJVkVSX0lORk8oInJ0YXNlX3N3YyBlbmFibGUgZGV2aWNlIGZhaWxlZC4i KTsNCj4gPiArICAgICBlbHNlDQo+ID4gKyAgICAgICAgICAgICByYyA9IHBjaV9yZXF1ZXN0X3Jl Z2lvbnMocGRldiwgU1dDX0RSSVZFUl9OQU1FKTsNCj4gPiArDQo+ID4gKyAgICAgaWYgKHJjID09 IDApIHsNCj4gPiArICAgICAgICAgICAgIHJjID0gZG1hX3NldF9tYXNrX2FuZF9jb2hlcmVudCgm cGRldi0+ZGV2LA0KPiBETUFfQklUX01BU0soNjQpKTsNCj4gPiArICAgICAgICAgICAgIGlmIChy YyAhPSAwKQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICByYyA9IGRtYV9zZXRfbWFza19hbmRf Y29oZXJlbnQoJnBkZXYtPmRldiwNCj4gRE1BX0JJVF9NQVNLKDMyKSk7DQo+ID4gKyAgICAgfQ0K PiA+ICsNCj4gPiArICAgICBpZiAocmMgIT0gMCkgew0KPiA+ICsgICAgICAgICAgICAgU1dDX0RS SVZFUl9JTkZPKCJydGFzZV9zd2MgcmVxdWVzdCByZWdpb25zIGZhaWxlZC4iKTsNCj4gPiArICAg ICAgICAgICAgIHBjaV9kaXNhYmxlX2RldmljZShwZGV2KTsNCj4gPiArICAgICB9IGVsc2Ugew0K PiA+ICsgICAgICAgICAgICAgcGNpX3NldF9tYXN0ZXIocGRldik7DQo+ID4gKyAgICAgICAgICAg ICBpb2FkZHIgPSBpb3JlbWFwKH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4gUENJX0VYVF9DQVBfSURfU1JJT1YpOw0KPiA+ICsNCj4gPiArICAgICBpZiAoc3Jp b3ZfcG9zID09IDApIHsNCj4gPiArICAgICAgICAgICAgIHNyaW92X3dhcm4oIlx0Y2FuJ3QgZmlu ZCBzcmlvdiBwb3NpdGlvbi4iKTsNCj4gPiArICAgICB9IGVsc2Ugew0KPiA+ICsgICAgICAgICAg ICAgcGNpX3JlYWRfY29uZmlnX3dvcmQocGRldiwgc3Jpb3ZfcG9zICsgUENJX1NSSU9WX1ZGX0RJ RCwNCj4gJnZmX2lkKTsNCj4gPiArICAgICAgICAgICAgIHNyaW92X2luZm8oInJ0YXNlIFZGIERl dmljZSBJRCA9ICUwNHgiLCB2Zl9pZCk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgdmZfcGRl diA9IHBjaV9nZXRfZGV2aWNlKHZlbmRvciwgdmZfaWQsIE5VTEwpOw0KPiA+ICsNCj4gPiArICAg ICAgICAgICAgIGZvciAoOyB2Zl9wZGV2ICE9IE5VTEw7IHZmX3BkZXYgPSBwY2lfZ2V0X2Rldmlj ZSh2ZW5kb3IsDQo+IHZmX2lkLCB2Zl9wZGV2KSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAg ICBpZiAodmZfcGRldi0+aXNfdmlydGZuID09IDB1KQ0KPiA+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNvbnRpbnVlOw0KPiA+ICsNCj4gPiArI2lmZGVmIENPTkZJR19QQ0lfSU9WDQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgIGlmICh2Zl9wZGV2LT5waHlzZm4gIT0gcGRldikNCj4g PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCj4gPiArDQo+ID4gKyNl bmRpZg0KPiA+ICsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgcGNpX2Rldl9nZXQodmZfcGRl dik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgIHRwLT52Zl9pbmZvW2lu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