From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuKMF-0001Dc-HI for ptxdist@pengutronix.de; Mon, 27 Aug 2018 18:27:15 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1fuKMF-0001D0-8c for ptxdist@pengutronix.de; Mon, 27 Aug 2018 18:27:15 +0200 Date: Mon, 27 Aug 2018 18:27:15 +0200 From: Michael Olbrich Message-ID: <20180827162715.yujjrkq5gews4q4e@pengutronix.de> References: <1533311096-14315-1-git-send-email-jon@ringle.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1533311096-14315-1-git-send-email-jon@ringle.org> Subject: Re: [ptxdist] [PATCH v4 1/2] Add libfaketime as a core component of ptxdist for patchin support List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de T24gRnJpLCBBdWcgMDMsIDIwMTggYXQgMTE6NDQ6NTVBTSAtMDQwMCwgam9uQHJpbmdsZS5vcmcg d3JvdGU6Cj4gRnJvbTogSm9uIFJpbmdsZSA8anJpbmdsZUBncmlkcG9pbnQuY29tPgo+IAo+IGxp YmZha2V0aW1lIHdpbGwgYmUgdXNlZCBkdXJpbmcgcGF0Y2hpbiBzbyB0aGF0IGNvbW1pdHRlciB0 aW1lc3RhbXBzIGFsd2F5cwo+IGhhdmUgYSBmaXhlZCB2YWx1ZSBhbmQgdGhlcmVmb3JlIG1ha2lu ZyB0aGUgJHtQS0d9X1NFUklFU19TSEEyNTYgdmFsdWUKPiByZXBlYXRhYmxlCj4gCj4gVGhlIG1p b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UoY2FsbCkgICAgICAgICAgXAo+ ICsgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICAgIGJvb2wgZG9u dF9mYWtlX29yaWcgPSBkb250X2Zha2U7ICBcCj4gKyAgICBpZiAoIWRvbnRfZmFrZSkgICAgICAg ICAgICAgICAgICAgXAo+ICsgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwK PiArICAgICAgZG9udF9mYWtlID0gdHJ1ZTsgICAgICAgICAgICAgICBcCj4gKyAgICB9ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgY2FsbDsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFwKPiArICAgIGRvbnRfZmFrZSA9IGRvbnRfZmFrZV9vcmlnOyAgICAgICBc Cj4gKyAgfSB3aGlsZSAoMCkKPiArCj4gKy8qIHBvaW50ZXJzIHRvIHJlYWwgKG5vdCBmYWtlZCkg ZnVuY3Rpb25zICovCj4gK3N0YXRpYyBpbnQgICAgICAgICAgKCpyZWFsX3N0YXQpICAgICAgICAg ICAgKGludCwgY29uc3QgY2hhciAqLCBzdHJ1Y3Qgc3RhdCAqKTsKPiArc3RhdGljIGludCAgICAg ICAgICAoKnJlYWxfZnN0YXQpICAgICAgICAgICAoaW50LCBpbnQsIHN0cnVjdCBzdGF0ICopOwo+ ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9mc3RhdGF0KSAgICAgICAgIChpbnQsIGludCwg Y29uc3QgY2hhciAqLCBzdHJ1Y3Qgc3RhdCAqLCBpbnQpOwo+ICtzdGF0aWMgaW50ICAgICAgICAg ICgqcmVhbF9sc3RhdCkgICAgICAgICAgIChpbnQsIGNvbnN0IGNoYXIgKiwgc3RydWN0IHN0YXQg Kik7Cj4gK3N0YXRpYyBpbnQgICAgICAgICAgKCpyZWFsX3N0YXQ2NCkgICAgICAgICAgKGludCwg Y29uc3QgY2hhciAqLCBzdHJ1Y3Qgc3RhdDY0IC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ZGVmIF9fQVBQTEVPU1hfXwo+ICsjaWZkZWYgRkFLRV9USU1FUlMKPiArc3RhdGljIGludCAg ICAgICAgICAoKnJlYWxfdGltZXJfc2V0dGltZV8yMikgICAoaW50IHRpbWVyaWQsIGludCBmbGFn cywgY29uc3Qgc3RydWN0IGl0aW1lcnNwZWMgKm5ld192YWx1ZSwKPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl0aW1lcnNwZWMgKiBvbGRf dmFsdWUpOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF90aW1lcl9zZXR0aW1lXzIzMykg ICh0aW1lcl90IHRpbWVyaWQsIGludCBmbGFncywKPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IGl0aW1lcnNwZWMgKm5ld192YWx1 ZSwKPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Ry dWN0IGl0aW1lcnNwZWMgKiBvbGRfdmFsdWUpOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVh bF90aW1lcl9nZXR0aW1lXzIyKSAgIChpbnQgdGltZXJpZCwKPiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl0aW1lcnNwZWMgKmN1cnJfdmFs dWUpOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF90aW1lcl9nZXR0aW1lXzIzMykgICh0 aW1lcl90IHRpbWVyaWQsCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHN0cnVjdCBpdGltZXJzcGVjICpjdXJyX3ZhbHVlKTsKPiArI2VuZGlmCj4gKyNl bmRpZgo+ICsjaWZkZWYgRkFLRV9TTEVFUAo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF9u YW5vc2xlZXApICAgICAgIChjb25zdCBzdHJ1Y3QgdGltZXNwZWMgKnJlcSwgc3RydWN0IHRpbWVz cGVjICpyZW0pOwo+ICtzdGF0aWMgaW50ICAgICAgICAgICgqcmVhbF91c2xlZXApICAgICAgICAg ICh1c2Vjb25kc190IHVzZWMpOwo+ICtzdGF0aWMgdW5zaWduZWQgaW50ICgqcmVhbF9zbGVlcCkg ICAgICAgICAgICh1bnNpZ25lZCBpbnQgc2Vjb25kcyk7Cj4gK3N0YXRpYyB1bnNpZ25lZCBpbnQg KCpyZWFsX2FsYXJtKSAgICAgICAgICAgKHVuc2lnbmVkIGludCBzZWNvbmRzKTsKPiArc3RhdGlj IGludCAgICAgICAgICAoKnJlYWxfcG9sbCkgICAgICAgICAgICAoc3RydWN0IHBvbGxmZCAqLCBu ZmRzX3QsIGludCk7Cj4gK3N0YXRpYyBpbnQgICAgICAgICAgKCpyZWFsX3Bwb2xsKSAgICAgICAg ICAgKHN0cnVjdCBwb2xsZmQgKiwgbmZkc190LCBjb25zdCBzdHJ1Y3QgdGltZXNwZWMgKiwgY29u c3Qgc2lnc2V0X3QgKik7Cj4gK3N0YXRpYyBpbnQgICAgICAgICAgKCpyZWFsX3NlbGVjdCkgICAg ICAgICAgKGludCBuZmRzLCBmZF9zZXQgKnJlc3RyaWN0IHJlYWRmZHMsCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZkX3NldCAqcmVzdHJpY3Qgd3JpdGVm ZHMsCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZkX3Nl dCAqcmVzdHJpY3QgZXJyb3JmZHMsCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCB0aW1ldmFsICpyZXN0cmljdCB0aW1lb3V0KTsKPiArc3RhdGlj IGludCAgICAgICAgICAoKnJlYWxfc2VtX3RpbWVkd2FpdCkgICAoc2VtX3QqLCBjb25zdCBzdHJ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lVTUikpKQo+ICsgICAgewo+ICsgICAgICBwZXJyb3IoInNobV9vcGVuIik7 Cj4gKyAgICAgIGV4aXQoMSk7Cj4gKyAgICB9Cj4gKwo+ICsgICAgaWYgKE1BUF9GQUlMRUQgPT0g KGZ0X3NoYXJlZCA9IG1tYXAoTlVMTCwgc2l6ZW9mKHN0cnVjdCBmdF9zaGFyZWRfcyksIFBST1Rf UkVBRHxQUk9UX1dSSVRFLAo+ICsgICAgICAgICAgICBNQVBfU0hBUkVELCB0aWNrc19zaG1fZmQs IDApKSkKPiArICAgIHsKPiArICAgICAgcGVycm9yKCJtbWFwIik7Cj4gKyAgICAgIGV4aXQoMSk7 Cj4gKyAgICB9Cj4gKyAgfQo+ICt9Cj4gKwo+ICt2b2lkIGZ0X2NsZWFudXAgKHZvaWQpCj4gK3sK PiArICAvKiBkZXRhY2ggZnJvbSBzaGFyZWQgbWVtb3J5ICovCj4gKyAgaWYgKGZ0X3NoYXJlZCAh PSBOVUxMKQo+ICsgIHsKPiArICAgIG11bm1hcChmdF9zaGFyZWQsIHNpemVvZih1aW50NjRfdCkp Owo+ICsgIH0KPiArICBpZiAoc3RzcyAhPSBOVUxMKQo+ICsgIHsKPiArICAgIG11bm1hcChzdHNz LCBpbmZpbGVfc2l6ZSk7Cj4gKyAgfQo+ICsgIGlmIChzaGFyZWRfc2VtICE9IE5VTEwpCj4gKyAg ewo+ICsgICAgc2VtX2Nsb3NlKHNoYXJlZF9zZW0pOwo+ICsgIH0KPiArfQo+ICsKPiArCj4gKy8q Cj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBJbnRlcm5hbCB0aW1lIHJldHJp ZXZhbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PT0gSU5UVElNRQo+ICsg KiAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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VkIHRpbWUgKi8K PiArICAgIHRpbWVzcGVjbXVsKHRpY2tsZW4sIGZ0X3NoYXJlZC0+dGlja3MsICZpbmMpOwo+ICsg ICAgdGltZXNwZWNhZGQoJnVzZXJfZmFrZWRfdGltZV90aW1lc3BlYywgJmluYywgdHApOwo+ICsg ICAgKGZ0X3NoYXJlZC0+dGlja3MpKys7Cj4gKyAgICAvKiB1bmxvY2sgKi8KPiArICAgIGlmIChz ZW1fcG9zdChzaGFyZWRfc2VtKSA9PSAtMSkKPiArICAgIHsKPiArICAgICAgcGVycm9yKCJzZW1f cG9zdCIpOwo+ICsgICAgICBleGl0KDEpOwo+ICsgICAgfQo+ICsgIH0KPiArfQo+ICsKPiArCj4g Ky8qCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBTYXZpbmcgJiBsb2FkaW5n IHRpbWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PT0gU0FWRQo+ ICsgKiAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArc3RhdGljIHZvaWQgc2F2ZV90 aW1lKHN0cnVjdCB0aW1lc3BlYyAqdHApCj4gK3sKPiArICBpZiAoKHNoYXJlZF9zZW0gIT0gTlVM TCkgJiYgKG91dGZpbGUgIT0gLTEpKQo+ICsgIHsKPiArICAgIHN0cnVjdCBzYXZlZF90aW1lc3Rh bXAgdGltZV93cml0ZTsKPiArICAgIHNzaXplX3Qgd3JpdHRlbjsKPiArICAgIHNpemVfdCBuID0g MDsKPiArCj4gKyAgICB0aW1lX3dyaXRlLnNlYyA9IGh0b2JlNjQodHAtPnR2X3NlYyk7Cj4gKyAg ICB0aW1lX3dyaXRlLm5zZWMgPSBodG9iZTY0KHRwLT50dl9uc2VjKTsK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KPiArICAgICAgICBmdHBsX3N0YXJ0dGltZSA9IGZ0X3NoYXJlZC0+c3Rh cnRfdGltZTsKPiArICAgICAgfQo+ICsKPiArICAgICAgbXVubWFwKHN0c3MsIGluZmlsZV9zaXpl KTsKPiArICAgICAgaW5maWxlX3NldCA9IGZhbHNlOwo+ICsgICAgfQo+ICsgICAgZWxzZQo+ICsg ICAgewo+ICsgICAgICB0aW1lc3BlY19mcm9tX3NhdmVkKHRwLCAmc3Rzc1tmdF9zaGFyZWQtPmZp bGVfaWR4XSk7Cj4gKyAgICAgIGZ0X3NoYXJlZC0+ZmlsZV9pZHgrKzsKPiArICAgICAgcmV0ID0g dHJ1ZTsKPiArICAgIH0KPiArCj4gKyAgICAvKiB1bmxvY2sgKi8KPiArICAgIGlmIChzZW1fcG9z dChzaGFyZWRfc2VtKSA9PSAtMSkKPiArICAgIHsKPiArICAgICAgcGVycm9yKCJzZW1fcG9zdCIp Owo+ICsgICAgICBleGl0KDEpOwo+ICsgICAgfQo+ICsgIH0KPiArICByZXR1cm4gcmV0Owo+ICt9 Cj4gKwo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIEZha2Vk IHN5c3RlbSBmdW5jdGlvbnM6IGZpbGUgcmVsYXRlZCAgICAgICAgICAgICAgICAgICAgID09PSBG QUtFKEZJTEUpCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICsjaWZkZWYg RkFLRV9TVEFUCj4gKwo+ICsjaWZuZGVmIE5PX0FURklMRQo+ICsjaWZuZGVmIF9BVEZJTEVfU09V UkNFCj4gKyNkZWZpbmUgX0FURklMRV9TT1VSQ0UKPiArI2VuZGlmCj4gKyNpbmNsdWRlIDxmY250 bC5oPiAvKiBE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xMID09IHJlYWxfbHN0YXQ2NCkKPiAr ICB7ICAvKiBkbHN5bSgpIGZhaWxlZCAqLwo+ICsjaWZkZWYgREVCVUcKPiArICAgICh2b2lkKSBm cHJpbnRmKHN0ZGVyciwgImZha2V0aW1lIHByb2JsZW06IG9yaWdpbmFsIGxzdGF0KCkgbm90IGZv dW5kLlxuIik7Cj4gKyNlbmRpZgo+ICsgICAgcmV0dXJuIC0xOyAvKiBwcm9wYWdhdGUgZXJyb3Ig dG8gY2FsbGVyICovCj4gKyAgfQo+ICsKPiArICBpbnQgcmVzdWx0Owo+ICsgIERPTlRfRkFLRV9U SU1FKHJlc3VsdCA9IHJlYWxfbHN0YXQ2NCh2ZXIsIHBhdGgsIGJ1ZikpOwo+ICsgIGlmIChyZXN1 bHQgPT0gLTEpCj4gKyAgewo+ICsgICAgcmV0dXJuIC0xOwo+ICsgIH0KPiArCj4gKyAgaWYgKGJ1 ZiAhPSBOVUxMKQo+ICsgIHsKPiArICAgIGlmICghZmFrZV9zdGF0X2Rpc2FibGVkKQo+ICsgICAg ewo+ICsgICAgICBmYWtlX3N0YXQ2NGJ1ZihidWYpOwo+ICsgICAgfQo+ICsgIH0KPiArICByZXR1 cm4gcmVzdWx0Owo+ICt9Cj4gKyNlbmRpZgo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQo+ICsgKiAgICAgIEZha2VkIHN5c3RlbSBmdW5jdGlvbnM6IHNsZWVwL2FsYXJtL3BvbGwv dGltZXIgcmVsYXRlZCAgPT09IEZBS0UoU0xFRVApCj4gKyAqICAgICAgPT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K PiArICogICAgICBDb250cmlidXRlZCBieSBCYWxpbnQgUmVjemV5IGluIHYwLjkuNQo+ICsgKi8K PiArCj4gKyNpZmRlZi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2V0dGltZV8yMzMsIHRp bWVyX2dldHRpbWVAQEdMSUJDXzIuMy4zIik7Cj4gK19fYXNtX18oIi5zeW12ZXIgdGltZXJfc2V0 dGltZV8yMiwgdGltZXJfc2V0dGltZUBHTElCQ18yLjIiKTsKPiArX19hc21fXygiLnN5bXZlciB0 aW1lcl9zZXR0aW1lXzIzMywgdGltZXJfc2V0dGltZUBAR0xJQkNfMi4zLjMiKTsKPiArCj4gKyNl bmRpZgo+ICsjZW5kaWYKPiArCj4gKwo+ICsvKgo+ICsgKiAgICAgID09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4g KyAqICAgICAgRmFrZWQgc3lzdGVtIGZ1bmN0aW9uczogYmFzaWMgdGltZSBmdW5jdGlvbnMgICAg ICAgICAgICAgPT09IEZBS0UoVElNRSkKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKi8K PiArCj4gKy8qCj4gKyAqIHRpbWUoKSBpbXBsZW1lbnRhdGlvbiB1c2luZyBjbG9ja19nZXR0aW1l KCkKPiArICogQG5vdGUgRG9lcyBub3QgY2hlY2sgZm9yIEVGQVVMVCwgc2VlIG1hbiAyIHRpbWUK PiArICovCj4gK3RpbWVfdCB0aW1lKHRpbWVfdCAqdGltZV90cHRyKQo+ICt7Cj4gKyAgc3RydWN0 IHRpbWVzcGVjIHRwOwo+ICsgIHRpbWVfdCByZXN1bHQ7Cj4gKwo+ICsgIGlmICghaW5pdGlhbGl6 ZWQpCj4gKyAgewo+ICsgICAgZnRwbF9pbml0KCk7Cj4gKyAgfQo+ICsgIERPTlRfRkFLRV9USU1F KHJlc3VsdCA9ICgqcmVhbF9jbG9ja19nZXR0aW1lKShDTE9DS19SRUFMVElNRSwgJnRwKSk7Cj4g KyAgaWYgKHJlc3VsdCA9PSAtMSkgcmV0dX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gY2FsbGVyICovCj4gKyAgcmV0dXJuIHJlc3VsdDsKPiArfQo+ICsKPiArCj4gKy8qCj4g KyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBQYXJzaW5nIHRoZSB1c2VyJ3MgZmFr ZXRpbWUgcmVxdWVzdHMgICAgICAgICAgICAgICAgICAgICAgICAgID09PSBQQVJTRQo+ICsgKiAg ICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArc3RhdGljIHZvaWQgcGFyc2VfZnRfc3Ry aW5nKGNvbnN0IGNoYXIgKnVzZXJfZmFrZWRfdGltZSkKPiArewo+ICsgIHN0cnVjdCB0bSB1c2Vy X2Zha2VkX3RpbWVfdG07Cj4gKyAgY2hhciAqIHRtcF90aW1lX2ZtdDsKPiArCj4gKyAgaWYgKCFz dHJuY21wKHVzZXJfZmFrZWRfdGltZSwgdXNlcl9mYWtlZF90aW1lX3NhdmVkLCBCVUZGRVJMRU4p KQo+ICsgIHsKPiArICAgICAgLyogTm8gY2hhbmdlICovCj4gKyAgICAgIHJldHVybjsKPiArICB9 Cj4gKwo+ICsgIC8qIGNoZWNrIHdoZXRoZXIgdGhlIHVzZXIgZ2F2ZSB1cyBhbiBhYnNvbHV0ZSB0 aW1lIHRvIGZha2UgKi8KPiArICBzd2l0Y2ggKHVzZXJfZmFrZWRfdGltZVswXSkKPiArICB7Cj4g Kwo+ICsgICAgZGVmYXVsdDogIC8qIFRyeSBhbmQgaW50ZXJwcmV0IHRoaXMgYXMgYSBzcGVjaWZp ZWQgdGltZSAqLwo+ICsgICAgICBpZiAoZnRfbW9kZSAhPSBGVF9OT09QKSBmdF9tb2RlID0gRlRf RlJFRVpFOwo+ICsgICAgICB1c2VyX2Zha2VkX3RpbWVfdG0udG1faXNkc3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wo+ICsgICAgICAgIC8qIGluY3JlbWVudCB0aW1l IHdpdGggZXZlcnkgdGltZSgpIGNhbGwqLwo+ICsgICAgICAgIHVzZXJfcGVyX3RpY2tfaW5jLnR2 X3NlYyA9IGZsb29yKHRpY2tfaW5jKTsKPiArICAgICAgICB1c2VyX3Blcl90aWNrX2luYy50dl9u c2VjID0gKHRpY2tfaW5jIC0gdXNlcl9wZXJfdGlja19pbmMudHZfc2VjKSAqIFNFQ19UT19uU0VD IDsKPiArICAgICAgICB1c2VyX3Blcl90aWNrX2luY19zZXQgPSB0cnVlOwo+ICsgICAgICB9Cj4g KyAgICAgIGJyZWFrOwo+ICsgIH0gLy8gZW5kIG9mIHN3aXRjaAo+ICsKPiArICBzdHJuY3B5KHVz ZXJfZmFrZWRfdGltZV9zYXZlZCwgdXNlcl9mYWtlZF90aW1lLCBCVUZGRVJMRU4tMSk7Cj4gKyAg dXNlcl9mYWtlZF90aW1lX3NhdmVkW0JVRkZFUkxFTi0xXSA9IDA7Cj4gKyNpZmRlZiBERUJVRwo+ ICsgIGZwcmludGYoc3RkZXJyLCAibmV3IEZBS0VUSU1FOiAlc1xuIiwgdXNlcl9mYWtlZF90aW1l X3NhdmVkKTsKPiArI2VuZGlmCj4gK30KPiArCj4gKwo+ICsvKgo+ICsgKiAgICAgID09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09Cj4gKyAqICAgICAgSW5pdGlhbGl6YXRpb24gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPT09IElOSVQKPiArICogICAgICA9PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PQo+ICsgKi8KPiArCj4gK3ZvaWQgZnRwbF9pbml0KHZvaWQpCj4gK3sKPiArICBjaGFyICp0bXBf ZW52Owo+ICsgIGJvb2wgZG9udF9mYWtlX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igiRkFLRVRJTUUiKSkpCj4gKyAgewo+ICsgICAgcGFyc2VfY29uZmlnX2Zp bGUgPSBmYWxzZTsKPiArICAgIHBhcnNlX2Z0X3N0cmluZyh0bXBfZW52KTsKPiArICB9Cj4gKwo+ ICsgIGRvbnRfZmFrZSA9IGRvbnRfZmFrZV9maW5hbDsKPiArfQo+ICsKPiArCj4gKy8qCj4gKyAq ICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBIZWxwZXIgZnVuY3Rpb25zICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT09IEhFTFBFUgo+ICsgKiAgICAg ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArc3RhdGljIHZvaWQgcmVtb3ZlX3RyYWlsaW5n X2VvbHMoY2hhciAqbGluZSkKPiArewo+ICsgIGNoYXIgKmVuZHAgPSBsaW5lICsgc3RybGVuKGxp bmUpOwo+ICsgIC8qCj4gKyAgICogZXJhc2UgdGhlIGxhc3QgY2hhciBpZiBpdCdzIGEgbmV3bGlu ZQo+ICsgICAqIG9yIGNhcnJpYWdlIHJldHVybiwgYW5kIGJhY2sgdXAuCj4gKyAgICoga2VlcCBk b2luZyB0aGlzLCBidXQgZG9uJ3QgYmFjayB1cAo+ICsgICAqIHBhc3QgdGhlIGJlZ2lubmluZyBv ZiB0aGUgc3RyaW5nLgo+ICsgICAqLwo+ICsjIGRlZmluZSBpc19lb2xjaGFyKGMpICgoYykgPT0g J1xuJyB8fCAoYykgPT0gJ1xyJykKPiArICB3aGlsZSAoZW5kcCA+IGxpbmUgJiYgaXNfZW9sY2hh cihlbmRwWy0xXSkpCj4gKyAgewo+ICsgICAgKi0tZW5kcCA9ICdcMCc7Cj4gKyAgfQo+ICt9Cj4g Kwo+ICsKPiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIEltcGxlbWVu dGF0aW9uIG9mIGZha2VkIGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgID09PSBGQUtF KEZBS0UpCj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICtpbnQgZmFrZV9j bG9ja19nZXR0aW1lKGNsb2NraWRfdCBjbGtfaWQsIHN0cnVjdCB0aW1lc3BlYyAqdHApCj4gK3sK PiArICAvKiB2YXJpYWJsZXMgdXNlZCBmb3IgY2FjaGluZywgaW50cm9kdWNlZCBpbiB2ZXJzaW9u IDAuNiAqLwo+ICsgIHN0YXRpYyB0aW1lX3QgbGFzdF9kYXRhX2ZldGNoID0gMDsgIC8qIG5vdCBm ZXRjaGVkIHByZXZpb3VzbHkgYXQgZmlyc3QgY2FsbCAqLwo+ICsgIHN0YXRpYyBpbnQgY2FjaGVf ZXhwaXJlZCA9IDE7ICAgICAgIC8qIGNvbnNpZGVyZWQgZXhwaXJlZCBhdCBmaXJzdCBjYWxsICov Cj4gKwo+ICsgIGlmIChkb250X2Zha2UpIHJldHVybiAwOwo+ICsgIC8qIFBlciBwcm9jZXNzIHRp bWVycyBhcmUgb25seSBzcGVkIHVwIG9yIHNsb3dlZCBkb3duICovCj4gKyAgaWYgKChjbGtfaWQg PT0gQ0xPQ0tfUFJPQ0VTU19DUFVUSU1FX0lEICkgfHwgKGNsa19pZCA9PSBDTE9DS19USFJFQURf Q1BVVElNRV9JRCkpCj4gKyAgewo+ICsgICAgaWYgKHVzZXJfcmF0ZV9zZXQpCj4gKyAgICB7Cj4g KyAgICAgIHRpbWVzcGVjbXVsKHRwLCB1c2VyX3JhdGUsIHRwKTsKPi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Ki8KPiArICAgICAgKHZvaWQpIHNucHJpbnRmKGN1c3RvbV9maWxlbmFtZSwgQlVG U0laLCAiJXMiLCBnZXRlbnYoIkZBS0VUSU1FX1RJTUVTVEFNUF9GSUxFIikpOwo+ICsgICAgICAo dm9pZCkgc25wcmludGYoZmlsZW5hbWUsIEJVRlNJWiwgIiVzLy5mYWtldGltZXJjIiwgZ2V0ZW52 KCJIT01FIikpOwo+ICsgICAgICBpZiAoKGZha2V0aW1lcmMgPSBmb3BlbihjdXN0b21fZmlsZW5h bWUsICJydCIpKSAhPSBOVUxMIHx8Cj4gKyAgICAgICAgICAoZmFrZXRpbWVyYyA9IGZvcGVuKGZp bGVuYW1lLCAicnQiKSkgIT0gTlVMTCB8fAo+ICsgICAgICAgICAgKGZha2V0aW1lcmMgPSBmb3Bl bigiL2V0Yy9mYWtldGltZXJjIiwgInJ0IikpICE9IE5VTEwpCj4gKyAgICAgIHsKPiArICAgICAg ICBjaGFyIGxpbmVbQlVGRkVSTEVOXTsKPiArICAgICAgICB3aGlsZShmZ2V0cyhsaW5lLCBCVUZG RVJMRU4sIGZha2V0aW1lcmMpICE9IE5VTEwpCj4gKyAgICAgICAgewo+ICsgICAgICAgICAgaWYg KChzdHJsZW4obGluZSkgPiAxKSAmJiAobGluZVswXSAhPSAnICcpICYmCj4gKyAgICAgICAgICAg ICAgKGxpbmVbMF0gIT0gJyMnKSAmJiAobGluZVswXSAhPSAnOycpKQo+ICsgICAgICAgICAgewo+ ICsgICAgICAgICAgICByZW1vdmVfdHJhaWxpbmdfZW9scyhsaW5lKTsKPiArICAgICAgICAgICAg c3RybmNweSh1c2VyX2Zha2VkX3RpbWUsIGxpbmUsIEJVRkZFUkxFTi0xKTsKPiArICAgICAgICAg ICAgdXNlcl9mYWtlZF90aW1lW0JVRkZFUkxFTi0xXSA9IDA7Cj4gKyAgICAgICAgICAgIGJyZWFr Owo+ICsgICAgICAgICAgfQo+ICsgICAgICAgIH0KPiArICAgICAgICBmY2xvc2UoZm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ShDTE9DS19SRUFMVElN RSwgJnRzKTsKPiArICB0di0+dHZfc2VjID0gdHMudHZfc2VjOwo+ICsgIHR2LT50dl91c2VjID10 cy50dl9uc2VjIC8gMTAwMDsKPiArCj4gKyAgcmV0dXJuIHJldDsKPiArfQo+ICsKPiArCj4gKy8q Cj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICogICAgICBGYWtlZCBzeXN0ZW0gZnVuY3Rp b25zOiBBcHBsZSBNYWMgT1MgWCBzcGVjaWZpYyAgICAgICAgICAgPT09IEZBS0UoT1NYKQo+ICsg KiAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09Cj4gKyAqLwo+ICsKPiArI2lmZGVmIF9fQVBQTEVPU1hfXwo+ ICsvKgo+ICsgKiBjbG9ja19nZXR0aW1lIGltcGxlbWVudGF0aW9uIGZvciBfX0FQUExFX18KPiAr ICogQG5vdGUgSXQgYWx3YXlzIGJlaGF2ZSBsaWtlIGJlaW5nIGNhbGxlZCB3aXRoIENMT0NLX1JF QUxUSU1FLgo+ICsgKi8KPiArc3RhdGljIGludCBhcHBsZV9jbG9ja19nZXR0aW1lKGNsb2NraWRf dCBjbGtfaWQsIHN0cnVjdCB0aW1lc3BlYyAqdHApCj4gK3sKPiArICBpbnQgcmVzdWx0Owo+ICsg IG1hY2hfdGltZXNwZWNfdCBjdXJfdGltZWNsb2NraWRfdDsKPiArICAodm9pZCkgY2xrX2lkOyAv KiB1bnVzZWQgKi8KPiArCj4gKyAgaWYgKE5VTEwgPT0gcmVhbF9jbG9ja19nZXRfdGltZSkKPiAr ICB7ICAvKiBkbHN5bSgpIGZhaWxlZCAqLwo+ICsjaWZkZWYgREVCVUcKPiArICAgICh2b2lkKSBm cHJpbnRmKHN0ZGVyciwgImZha2V0aW1lIHByb2JsZW06I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yB0aGUgcmVhbCBjdXJy ZW50IHRpbWUgdG8gb3VyIGZha2luZyB2ZXJzaW9uLCBvdmVyd3JpdGluZyBpdCAqLwo+ICsgIHJl c3VsdCA9IGZha2VfY2xvY2tfZ2V0dGltZShDTE9DS19SRUFMVElNRSwgJnRzKTsKPiArICBjdXJf dGltZWNsb2NraWRfdC0+dHZfc2VjID0gdHMudHZfc2VjOwo+ICsgIGN1cl90aW1lY2xvY2tpZF90 LT50dl9uc2VjID0gdHMudHZfbnNlYzsKPiArCj4gKyAgLyogcmV0dXJuIHRoZSByZXN1bHQgdG8g dGhlIGNhbGxlciAqLwo+ICsgIHJldHVybiByZXN1bHQ7Cj4gK30KPiArI2VuZGlmCj4gKwo+ICsK PiArLyoKPiArICogICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+ICsgKiAgICAgIEZha2VkIHN5c3RlbS1p bnRlcm5hbCBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICA9PT0gRkFLRShJTlQp Cj4gKyAqICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KPiArICovCj4gKwo+ICsjaWZkZWYgRkFLRV9JTlRF Uk5BTF9DQUxMUwo+ICtpbnQgX19nZXR0aW1lb2ZkYXkoc3RydWN0IHRpbWV2YWwgKnR2LCB2b2lk ICp0eikKPiArewo+ICsgIGludCByZXN1bHQ7Cj4gKwo+ICsgIC8qIHNhbml0eSBjaGVjayAqLwo+ ICsgIGlmICh0diA9PSBOVUxMKQo+ICsgIHsKPiArICAgIHJldHVybiAtMTsKPiArICB9Cj4gKwo+ ICsgIC8qIENoZWNrIHdoZXRoZXIgd2UndmUgZ290IGEgcG9pbnRlciB0byB0aGUgcmVhbCBmdGlt ZSgpIGZ1bmN0aW9uIHlldCAqLwo+ICsgIGlmIChOVUxMID09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KPiArCj4gKyNpZm5kZWYgVElNRV9PUFNfSAo+ICsjZGVmaW5lIFRJTUVfT1BTX0gKPiArI2lu Y2x1ZGUgPHRpbWUuaD4KPiArCj4gKyNkZWZpbmUgU0VDX1RPX3VTRUMgMTAwMDAwMAo+ICsjZGVm aW5lIFNFQ19UT19uU0VDIDEwMDAwMDAwMDAKPiArCj4gKy8qIENvbnZlbmllbmNlIG1hY3JvcyBm b3Igb3BlcmF0aW9ucyBvbiB0aW1ldmFscy4KPiArICAgTk9URTogYHRpbWVyY21wJyBkb2VzIG5v dCB3b3JrIGZvciA+PSBvciA8PS4gICovCj4gKyNkZWZpbmUgdGltZXJpc3NldDIodHZwLCBwcmVm aXgpICgodHZwKS0+dHZfc2VjIHx8ICh0dnApLT50dl8jI3ByZWZpeCMjc2VjKQo+ICsjZGVmaW5l IHRpbWVyY2xlYXIyKHR2cCwgcHJlZml4KSAoKHR2cCktPnR2X3NlYyA9ICh0dnApLT50dl8jI3By ZWZpeCMjc2VjID0gMCkKPiArI2RlZmluZSB0aW1lcmNtcDIoYSwgYiwgQ01QLCBwcmVmaXgpICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgKCgoYSktPnR2X3NlYyA9PSAoYikt PnR2X3NlYykgPyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAoKGEp LT50dl8jI3ByZWZpeCMjc2VjIENNUCAoYiktPnR2XyMjcHJlZml4IyNzZWMpIDogICAgICAgICAg ICAgIFwKPiArICAgKChhKS0+dHZfc2VjIENNUCAoYiktPnR2X3NlYykpCj4gKyNkZWZpbmUgdGlt ZXJhZGQyKGEsIGIsIHJlc3VsdCwgcHJlZml4KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg XAo+ICsgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFwKPiArICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICAocmVzdWx0KS0+dHZfc2Vj ID0gKGEpLT50dl9zZWMgKyAoYiktPnR2X3NlYzsgICAgICAgICAgICAgICAgICAgXAo+ICsgICAg KHJlc3VsdCktPnR2XyMjcHJlZml4IyNzZWMgPSAoYSktPnR2XyMjcHJlZml4IyNzZWMgKyAgICAg ICAgICAgIFwKPiArICAgICAgKGIpLT50dl8jI3ByZWZpeCMjc2VjOyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICBpZiAoKHJlc3VsdCktPnR2XyMjcHJlZml4 IyNzZWMgPj0gU0VDX1RPXyMjcHJlZml4IyNTRUMpICAgICAgICAgXAo+ICsgICAgICB7ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwK PiArICAgICAgICArKyhyZXN1bHQpLT50dl9zZWM7ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBcCj4gKyAgICAgICAgKHJlc3VsdCktPnR2XyMjcHJlZml4IyNzZWMgLT0g U0VDX1RPXyMjcHJlZml4IyNTRUM7ICAgICAgICAgXAo+ICsgICAgICB9ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKPiArICB9IHdo aWxlICgwKQo+ICsjZGVmaW5lIHRpbWVyc3ViMihhLCBiLCByZXN1bHQsIHByZWZpeCkgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFwKPiArICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgeyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ ICsgICAgKHJlc3VsdCktPnR2X3NlYyA9IChhKS0+dHZfc2VjIC0gKGIpLT50dl9zZWM7ICAgICAg ICAgICAgICAgICAgIFwKPiArICAgIChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjID0gKGEpLT50 dl8jI3ByZWZpeCMjc2VjIC0gICAgICAgICAgICBcCj4gKyAgICAgIChiKS0+dHZfIyNwcmVmaXgj I3NlYzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgaWYg KChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjIDwgMCkgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFwKPiArICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICAgIC0tKHJlc3VsdCktPnR2X3NlYzsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgICAocmVzdWx0KS0+ dHZfIyNwcmVmaXgjI3NlYyArPSBTRUNfVE9fIyNwcmVmaXgjI1NFQzsgICAgICAgICAgIFwKPiAr ICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBcCj4gKyAgfSB3aGlsZSAoMCkKPiArI2RlZmluZSB0aW1lcm11bDIodHZwLCBj LCByZXN1bHQsIHByZWZpeCkgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgZG8gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXAo+ICsgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFwKPiArICAgIGxvbmcgbG9uZyB0bXBfdGltZTsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCj4gKyAgICB0bXBfdGltZSA9IChj KSAqICgodHZwKS0+dHZfc2VjICogU0VDX1RPXyMjcHJlZml4IyNTRUMgKyAgICAgICAgXAo+ICsg ICAgICAgICAgICAgICAodHZwKS0+dHZfIyNwcmVmaXgjI3NlYyk7ICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFwKPiArICAgIChyZXN1bHQpLT50dl8jI3ByZWZpeCMjc2VjID0gdG1wX3RpbWUg JSBTRUNfVE9fIyNwcmVmaXgjI1NFQzsgICBcCj4gKyAgICAocmVzdWx0KS0+dHZfc2VjID0gKHRt cF90aW1lIC0gKHJlc3VsdCktPnR2XyMjcHJlZml4IyNzZWMpIC8gICAgXAo+ICsgICAgICBTRUNf VE9fIyNwcmVmaXgjI1NFQzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFwKPiArICAgIGlmICgocmVzdWx0KS0+dHZfIyNwcmVmaXgjI3NlYyA8IDApICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBcCj4gKyAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgICAgICAocmVzdWx0KS0+dHZf IyNwcmVmaXgjI3NlYyArPSAgU0VDX1RPXyMjcHJlZml4IyNTRUM7ICAgICAgICAgIFwKPiArICAg ICAgKHJlc3VsdCktPnR2X3NlYyAtPSAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBcCj4gKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXAo+ICsgIH0gd2hpbGUgKDApCj4gKwo+ICsvKiBvcHMg Zm9yIG1pY3Jvc2VjcyAqLwo+ICsjaWZuZGVmIHRpbWVyaXNzZXQKPiArI2RlZmluZSB0aW1lcmlz c2V0KHR2cCkgdGltZXJpc3NldDIodHZwLHUpCj4gKyNlbmRpZgo+ICsjaWZuZGVmIHRpbWVyY2xl YXIKPiArI2RlZmluZSB0aW1lcmNsZWFyKHR2cCkgdGltZXJjbGV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BfX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fXwo+IHB0eGRpc3QgbWFpbGluZyBsaXN0Cj4gcHR4ZGlz dEBwZW5ndXRyb25peC5kZQoKLS0gClBlbmd1dHJvbml4IGUuSy4gICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CkluZHVzdHJpYWwgTGludXgg U29sdXRpb25zICAgICAgICAgICAgICAgICB8IGh0dHA6Ly93d3cucGVuZ3V0cm9uaXguZGUvICB8 ClBlaW5lciBTdHIuIDYtOCwgMzExMzcgSGlsZGVzaGVpbSwgR2VybWFueSB8IFBob25lOiArNDkt NTEyMS0yMDY5MTctMCAgICB8CkFtdHNnZXJpY2h0IEhpbGRlc2hlaW0sIEhSQSAyNjg2ICAgICAg ICAgICB8IEZheDogICArNDktNTEyMS0yMDY5MTctNTU1NSB8CgpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpwdHhkaXN0IG1haWxpbmcgbGlzdApwdHhkaXN0 QHBlbmd1dHJvbml4LmRl