From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.pqgruber.com ([52.59.78.55]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hTqYQ-0005xL-Fb for ptxdist@pengutronix.de; Thu, 23 May 2019 18:26:57 +0200 From: Clemens Gruber Date: Thu, 23 May 2019 18:26:14 +0200 Message-Id: <20190523162614.6169-3-clemens.gruber@pqgruber.com> In-Reply-To: <20190523162614.6169-1-clemens.gruber@pqgruber.com> References: <20190523162614.6169-1-clemens.gruber@pqgruber.com> MIME-Version: 1.0 Subject: [ptxdist] [PATCH 3/3] mosh: add upstream patch to fix build error 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 Cc: Clemens Gruber V2l0aCByZWNlbnQgcHJvdG9idWYgdmVyc2lvbnMsIGEgYysrMTEgYnVpbGQgZXJyb3Igb2NjdXJz LgpUaGlzIGFkZHMgdGhlIHVwc3RyZWFtIHBhdGNoIHRvIGZpeCBpdC4KClNpZ25lZC1vZmYtYnk6 IENsZW1lbnMgR3J1YmVyIDxjbGVtZW5zLmdydWJlckBwcWdydWJlci5jb20+Ci0tLQogLi4uLXBy b3RvYnVmLXZlcnNpb24tMy42LjAtaXMtaW5zdGFsbGVkLnBhdGNoIHwgOTgzICsrKysrKysrKysr KysrKysrKwogcGF0Y2hlcy9tb3NoLTEuMy4yL2F1dG9nZW4uc2ggICAgICAgICAgICAgICAgIHwg ICAxICsKIHBhdGNoZXMvbW9zaC0xLjMuMi9zZXJpZXMgICAgICAgICAgICAgICAgICAgICB8ICAg NCArCiAzIGZpbGVzIGNoYW5nZWQsIDk4OCBpbnNlcnRpb25zKCspCiBjcmVhdGUgbW9kZ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AorbmV3IGZpbGUgbW9kZSAxMDA2NDQKK2luZGV4IDAwMDAwMDAwMDAw MC4uOWU5ZWFlZGFhYWQzCistLS0gL2Rldi9udWxsCisrKysgYi9tNC9heF9jeHhfY29tcGlsZV9z dGRjeHgubTQKK0BAIC0wLDAgKzEsOTQ4IEBACisrIyA9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKysjICBo dHRwczovL3d3dy5nbnUub3JnL3NvZnR3YXJlL2F1dG9jb25mLWFyY2hpdmUvYXhfY3h4X2NvbXBp bGVfc3RkY3h4Lmh0bWwKKysjID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKyMKKysjIFNZTk9QU0lTCisr IworKyMgICBBWF9DWFhfQ09NUElMRV9TVERDWFgoVkVSU0lPTiwgW2V4dHxub2V4dF0sIFttYW5k YXRvcnl8b3B0aW9uYWxdKQorKyMKKysjIERFU0NSSVBUSU9OCisrIworKyMgICBDaGVjayBmb3Ig YmFzZWxpbmUgbGFuZ3VhZ2UgY292ZXJhZ2UgaW4gdGhlIGNvbXBpbGVyIGZvciB0aGUgc3BlY2lm aWVkCisrIyAgIHZlcnNpb24gb2YgdGhlIEMrKyBzdGFuZGFyZC4gIElmIG5lY2Vzc2FyeSwgYWRk IHN3aXRjaGVzIHRvIENYWCBhbmQKKysjICAgQ1hYQ1BQIHRvIGVuYWJsZSBzdXBwb3J0LiAgVkVS U0lPTiBtYXkgYmUgJzExJyAoZm9yIHRoZSBDKysxMSBzdGFuZGFyZCkKKysjICAgb3IgJzE0JyAo Zm9yIHRoZSBDKysxNCBzdGFuZGFyZCkuCisrIworKyMgICBUaGUgc2Vjb25kIGFyZ3VtZW50LCBp ZiBzcGVjaWZpZWQsIGluZGljYXRlcyB3aGV0aGVyIHlvdSBpbnNpc3Qgb24gYW4KKysjICAgZXh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gICAgICAgIGFj X3N1Y2Nlc3M9eWVzCisrICAgICAgICAgIGJyZWFrCisrICAgICAgICBmaQorKyAgICAgIGRvbmUK KysgICAgICBpZiB0ZXN0IHgkYWNfc3VjY2VzcyA9IHh5ZXM7IHRoZW4KKysgICAgICAgIGJyZWFr CisrICAgICAgZmkKKysgICAgZG9uZQorKyAgZmldKQorKyAgQUNfTEFOR19QT1AoW0MrK10pCisr ICBpZiB0ZXN0IHgkYXhfY3h4X2NvbXBpbGVfY3h4JDFfcmVxdWlyZWQgPSB4dHJ1ZTsgdGhlbgor KyAgICBpZiB0ZXN0IHgkYWNfc3VjY2VzcyA9IHhubzsgdGhlbgorKyAgICAgIEFDX01TR19FUlJP UihbKioqIEEgY29tcGlsZXIgd2l0aCBzdXBwb3J0IGZvciBDKyskMSBsYW5ndWFnZSBmZWF0dXJl cyBpcyByZXF1aXJlZC5dKQorKyAgICBmaQorKyAgZmkKKysgIGlmIHRlc3QgeCRhY19zdWNjZXNz ID0geG5vOyB0aGVuCisrICAgIEhBVkVfQ1hYJDE9MAorKyAgICBBQ19NU0dfTk9USUNFKFtObyBj b21waWxlciB3aXRoIEMrKyQxIHN1cHBvcnQgd2FzIGZvdW5kXSkKKysgIGVsc2UKKysgICAgSEFW RV9DWFgkMT0xCisrICAgIEFDX0RFRklORShIQVZFX0NYWCQxLDEsCisrICAgICAgICAgICAgICBb ZGVmaW5lIGlmIHRoZSBjb21waWxlciBzdXBwb3J0cyBiYXNpYyBDKyskMSBzeW50YXhdKQorKyAg ZmkKKysgIEFDX1NVQlNUKEhBVkVfQ1hYJDEpCisrXSkKKysKKysKKytkbmwgIFRlc3QgYm9keSBm b3IgY2hlY2tpbmcgQysrMTEgc3VwcG9ydAorKworK200X2RlZmluZShbX0FYX0NYWF9DT01QSUxF X1NURENYWF90ZXN0Ym9keV8xMV0sCisrICBfQVhfQ1hYX0NPTVBJTEVfU1REQ1hYX3Rlc3Rib2R5 X25ld19pbl8xMQorKykKKysKKysKKytkbmw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NlcnQKKysg IHsKKysKKysgICAgdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CisrICAgIHN0cnVjdCBjaGVjaworKyAg ICB7CisrICAgICAgc3RhdGljX2Fzc2VydChzaXplb2YoaW50KSA8PSBzaXplb2YoVCksICJub3Qg YmlnIGVub3VnaCIpOworKyAgICB9OworKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3RfZmlu YWxfb3ZlcnJpZGUKKysgIHsKKysKKysgICAgc3RydWN0IEJhc2UKKysgICAgeworKyAgICAgIHZp cnR1YWwgdm9pZCBmKCkge30KKysgICAgfTsKKysKKysgICAgc3RydWN0IERlcml2ZWQgOiBwdWJs aWMgQmFzZQorKyAgICB7CisrICAgICAgdmlydHVhbCB2b2lkIGYoKSBvdmVycmlkZSB7fQorKyAg ICB9OworKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3RfZG91YmxlX3JpZ2h0X2FuZ2xlX2Jy YWNrZXRzCisrICB7CisrCisrICAgIHRlbXBsYXRlIDwgdHlwZW5hbWUgVCA+CisrICAgIHN0cnVj dCBjaGVjayB7fTsKKysKKysgICAgdHlwZWRlZiBjaGVjazx2b2lkPiBzaW5nbGVfdHlwZTsKKysg ICAgdHlwZWRlZiBjaGVjazxjaGVjazx2b2lkPj4gZG91YmxlX3R5cGU7CisrICAgIHR5cGVkZWYg Y2hlY2s8Y2hlY2s8Y2hlY2s8dm9pZD4+PiB0cmlwbGVfdHlwZTsKKysgICAgdHlwZWRlZiBjaGVj azxjaGVjazxjaGVjazxjaGVjazx2b2lkPj4+PiBxdWFkcnVwbGVfdHlwZTsKKysKKysgIH0KKysK KysgIG5hbWVzcGFjZSB0ZXN0X2RlY2x0eXBlCisrICB7CisrCisrICAgIGludAorKyAgICBmKCkK KysgICAgeworKyAgICAgIGludCBhID0gMTsKKysgICAgICBkZWNsdHlwZShhKSBiID0gMjsKKysg ICAgICByZXR1cm4gYSArIGI7CisrICAgIH0KKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0 X3R5cGVfZGVkdWN0aW9uCisrICB7CisrCisrICAgIHRlbXBsYXRlIDwgdHlwZW5hbWUgVDEsIHR5 cGVuYW1lIFQyID4KKysgICAgc3RydWN0IGlzX3NhbWUKKysgICAgeworKyAgICAgIHN0YXRpYyBj b25zdCBib29sIHZhbHVlID0gZmFsc2U7CisrICAgIH07CisrCisrICAgIHRlbXBsYXRlIDwgdHlw ZW5hbWUgVCA+CisrICAgIHN0cnVjdCBpc19zYW1lPFQsIFQ+CisrICAgIHsKKysgICAgICBzdGF0 aWMgY29uc3QgYm9vbCB2YWx1ZSA9IHRydWU7CisrICAgIH07CisrCisrICAgIHRlbXBsYXRlIDwg dHlwZW5hbWUgVDEsIHR5cGVuYW1lIFQyID4KKysgICAgYXV0bworKyAgICBhZGQoVDEgYTEsIFQy IGEyKSAtPiBkZWNsdHlwZShhMSArIGEyKQorKyAgICB7CisrICAgICAgcmV0dXJuIGExICsgYTI7 CisrICAgIH0KKysKKysgICAgaW50CisrICAgIHRlc3QoY29uc3QgaW50IGMsIHZvbGF0aWxlIGlu dCB2KQorKyAgICB7CisrICAgICAgc3RhdGljX2Fzc2VydChpc19zYW1lPGludCwgZGVjbHR5cGUo MCk+Ojp2YWx1ZSA9PSB0cnVlLCAiIik7CisrICAgICAgc3RhdGljX2Fzc2VydChpc19zYW1lPGlu dCwgZGVjbHR5cGUoYyk+Ojp2YWx1ZSA9PSBmYWxzZSwgIiIpOworKyAgICAgIHN0YXRpY19hc3Nl cnQoaXNfc2FtZTxpbnQsIGRlY2x0eXBlKHYpPjo6dmFsdWUgPT0gZmFsc2UsICIiKTsKKysgICAg ICBhdXRvIGFjID0gYzsKKysgICAgICBhdXRvIGF2ID0gdjsKKysgICAgICBhdXRvIHN1bWkgPSBh YyArIGF2ICsgJ3gnOworKyAgICAgIGF1dG8gc3VtZiA9IGFjICsgYXYgKyAxLjA7CisrICAgICAg c3RhdGljX2Fzc2VydChpc19zYW1lPGludCwgZGVjbHR5cGUoYWMpPjo6dmFsdWUgPT0gdHJ1ZSwg IiIpOworKyAgICAgIHN0YXRpY19hc3NlcnQoaXNfc2FtZTxpbnQsIGRlY2x0eXBlKGF2KT46OnZh bHVlID09IHRydWUsICIiKTsKKysgICAgICBzdGF0aWNfYXNzZXJ0KGlzX3NhbWU8aW50LCBkZWNs dHlwZShzdW1pKT46OnZhbHVlID09IHRydWUsICIiKTsKKysgICAgICBzdGF0aWNfYXNzZXJ0KGlz X3NhbWU8aW50LCBkZWNsdHlwZShzdW1mKT46OnZhbHVlID09IGZhbHNlLCAiIik7CisrICAgICAg c3RhdGljX2Fzc2VydChpc19zYW1lPGludCwgZGVjbHR5cGUoYWRkKGMsIHYpKT46OnZhbHVlID09 IHRydWUsICIiKTsKKysgICAgICByZXR1cm4gKHN1bWYgPiAwLjApID8gc3VtaSA6IGFkZChjLCB2 KTsKKysgICAgfQorKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3Rfbm9leGNlcHQKKysgIHsK KysKKysgICAgaW50IGYoKSB7IHJldHVybiAwOyB9CisrICAgIGludCBnKCkgbm9leGNlcHQgeyBy ZXR1cm4gMDsgfQorKworKyAgICBzdGF0aWNfYXNzZXJ0KG5vZXhjZXB0KGYoKSkgPT0gZmFsc2Us ICIiKTsKKysgICAgc3RhdGljX2Fzc2VydChub2V4Y2VwdChnKCkpID09IHRydWUsICIiKTsKKysK KysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0X2NvbnN0ZXhwcgorKyAgeworKworKyAgICB0ZW1w bGF0ZSA8IHR5cGVuYW1lIENoYXJUID4KKysgICAgdW5zaWduZWQgbG9uZyBjb25zdGV4cHIKKysg ICAgc3RybGVuX2Nfcihjb25zdCBDaGFyVCAqY29uc3QgcywgY29uc3QgdW5zaWduZWQgbG9uZyBh Y2MpIG5vZXhjZXB0CisrICAgIHsKKysgICAgICByZXR1cm4gKnMgPyBzdHJsZW5fY19yKHMgKyAx LCBhY2MgKyAxKSA6IGFjYzsKKysgICAgfQorKworKyAgICB0ZW1wbGF0ZSA8IHR5cGVuYW1lIENo YXJUID4KKysgICAgdW5zaWduZWQgbG9uZyBjb25zdGV4cHIKKysgICAgc3RybGVuX2MoY29uc3Qg Q2hhclQgKmNvbnN0IHMpIG5vZXhjZXB0CisrICAgIHsKKysgICAgICByZXR1cm4gc3RybGVuX2Nf cihzLCAwVUwpOworKyAgICB9CisrCisrICAgIHN0YXRpY19hc3NlcnQoc3RybGVuX2MoIiIpID09 IDBVTCwgIiIpOworKyAgICBzdGF0aWNfYXNzZXJ0KHN0cmxlbl9jKCIxIikgPT0gMVVMLCAiIik7 CisrICAgIHN0YXRpY19hc3NlcnQoc3RybGVuX2MoImV4YW1wbGUiKSA9PSA3VUwsICIiKTsKKysg ICAgc3RhdGljX2Fzc2VydChzdHJsZW5fYygiYW5vdGhlclwwZXhhbXBsZSIpID09IDdVTCwgIiIp OworKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3RfcnZhbHVlX3JlZmVyZW5jZXMKKysgIHsK KysKKysgICAgdGVtcGxhdGUgPCBpbnQgTiA+CisrICAgIHN0cnVjdCBhbnN3ZXIKKysgICAgewor KyAgICAgIHN0YXRpYyBjb25zdGV4cHIgaW50IHZhbHVlID0gTjsKKysgICAgfTsKKysKKysgICAg YW5zd2VyPDE+IGYoaW50JikgICAgICAgeyByZXR1cm4gYW5zd2VyPDE+KCk7IH0KKysgICAgYW5z d2VyPDI+IGYoY29uc3QgaW50JikgeyByZXR1cm4gYW5zd2VyPDI+KCk7IH0KKysgICAgYW5zd2Vy PDM+IGYoaW50JiYpICAgICAgeyByZXR1cm4gYW5zd2VyPDM+KCk7IH0KKysKKysgICAgdm9pZAor KyAgICB0ZXN0KCkKKysgICAgeworKyAgICAgIGludCBpID0gMDsKKysgICAgICBjb25zdCBpbnQg YyA9IDA7CisrICAgICAgc3RhdGljX2Fzc2VydChkZWNsdHlwZShmKGkpKTo6dmFsdWUgPT0gMSwg IiIpOworKyAgICAgIHN0YXRpY19hc3NlcnQoZGVjbHR5cGUoZihjKSk6OnZhbHVlID09IDIsICIi KTsKKysgICAgICBzdGF0aWNfYXNzZXJ0KGRlY2x0eXBlKGYoMCkpOjp2YWx1ZSA9PSAzLCAiIik7 CisrICAgIH0KKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0X3VuaWZvcm1faW5pdGlhbGl6 YXRpb24KKysgIHsKKysKKysgICAgc3RydWN0IHRlc3QKKysgICAgeworKyAgICAgIHN0YXRpYyBj b25zdCBpbnQgemVybyB7fTsKKysgICAgICBzdGF0aWMgY29uc3QgaW50IG9uZSB7MX07CisrICAg IH07CisrCisrICAgIHN0YXRpY19hc3NlcnQodGVzdDo6emVybyA9PSAwLCAiIik7CisrICAgIHN0 YXRpY19hc3NlcnQodGVzdDo6b25lID09IDEsICIiKTsKKysKKysgIH0KKysKKysgIG5hbWVzcGFj ZSB0ZXN0X2xhbWJkYXMKKysgIHsKKysKKysgICAgdm9pZAorKyAgICB0ZXN0MSgpCisrICAgIHsK KysgICAgICBhdXRvIGxhbWJkYTEgPSBbXSgpe307CisrICAgICAgYXV0byBsYW1iZGEyID0gbGFt YmRhMTsKKysgICAgICBsYW1iZGExKCk7CisrICAgICAgbGFtYmRhMigpOworKyAgICB9CisrCisr ICAgIGludAorKyAgICB0ZXN0MigpCisrICAgIHsKKysgICAgICBhdXRvIGEgPSBbXShpbnQgaSwg aW50IGopeyByZXR1cm4gaSArIGo7IH0oMSwgMik7CisrICAgICAgYXV0byBiID0gW10oKSAtPiBp bnQgeyByZXR1cm4gJzAnOyB9KCk7CisrICAgICAgYXV0byBjID0gWz1dKCl7IHJldHVybiBhICsg YjsgfSgpOworKyAgICAgIGF1dG8gZCA9IFsmXSgpeyByZXR1cm4gYzsgfSgpOworKyAgICAgIGF1 dG8gZSA9IFthLCAmYl0oaW50IHgpIG11dGFibGUgeworKyAgICAgICAgY29uc3QgYXV0byBpZGVu dGl0eSA9IFtdKGludCB5KXsgcmV0dXJuIHk7IH07CisrICAgICAgICBmb3IgKGF1dG8gaSA9IDA7 IGkgPCBhOyArK2kpCisrICAgICAgICAgIGEgKz0gYi0tOworKyAgICAgICAgcmV0dXJuIHggKyBp ZGVudGl0eShhICsgYik7CisrICAgICAgfSgwKTsKKysgICAgICByZXR1cm4gYSArIGIgKyBjICsg ZCArIGU7CisrICAgIH0KKysKKysgICAgaW50CisrICAgIHRlc3QzKCkKKysgICAgeworKyAgICAg IGNvbnN0IGF1dG8gbnVsbGFyeSA9IFtdKCl7IHJldHVybiAwOyB9OworKyAgICAgIGNvbnN0IGF1 dG8gdW5hcnkgPSBbXShpbnQgeCl7IHJldHVybiB4OyB9OworKyAgICAgIHVzaW5nIG51bGxhcnlf dCA9IGRlY2x0eXBlKG51bGxhcnkpOworKyAgICAgIHVzaW5nIHVuYXJ5X3QgPSBkZWNsdHlwZSh1 bmFyeSk7CisrICAgICAgY29uc3QgYXV0byBoaWdoZXIxc3QgPSBbXShudWxsYXJ5X3QgZil7IHJl dHVybiBmKCk7IH07CisrICAgICAgY29uc3QgYXV0byBoaWdoZXIybmQgPSBbdW5hcnldKG51bGxh cnlfdCBmMSl7CisrICAgICAgICByZXR1cm4gW3VuYXJ5LCBmMV0odW5hcnlfdCBmMil7IHJldHVy biBmMih1bmFyeShmMSgpKSk7IH07CisrICAgICAgfTsKKysgICAgICByZXR1cm4gaGlnaGVyMXN0 KG51bGxhcnkpICsgaGlnaGVyMm5kKG51bGxhcnkpKHVuYXJ5KTsKKysgICAgfQorKworKyAgfQor KworKyAgbmFtZXNwYWNlIHRlc3RfdmFyaWFkaWNfdGVtcGxhdGVzCisrICB7CisrCisrICAgIHRl bXBsYXRlIDxpbnQuLi4+CisrICAgIHN0cnVjdCBzdW07CisrCisrICAgIHRlbXBsYXRlIDxpbnQg TjAsIGludC4uLiBOMXRvTj4KKysgICAgc3RydWN0IHN1bTxOMCwgTjF0b04uLi4+CisrICAgIHsK KysgICAgICBzdGF0aWMgY29uc3RleHByIGF1dG8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gICAgdm9p ZCBmdW5jKC4uLikge30KKysKKysgICAgdGVtcGxhdGU8dHlwZW5hbWUgVD4KKysgICAgdm9pZCBm dW5jKG1lbWJlcjxUPiopIHt9CisrCisrICAgIHZvaWQgdGVzdCgpOworKworKyAgICB2b2lkIHRl c3QoKSB7IGZ1bmM8Zm9vPigwKTsgfQorKworKyAgfQorKworK30gIC8vIG5hbWVzcGFjZSBjeHgx MQorKworKyNlbmRpZiAgLy8gX19jcGx1c3BsdXMgPj0gMjAxMTAzTAorKworK11dKQorKworKwor K2RubCAgVGVzdHMgZm9yIG5ldyBmZWF0dXJlcyBpbiBDKysxNAorKworK200X2RlZmluZShbX0FY X0NYWF9DT01QSUxFX1NURENYWF90ZXN0Ym9keV9uZXdfaW5fMTRdLCBbWworKworKy8vIElmIHRo ZSBjb21waWxlciBhZG1pdHMgdGhhdCBpdCBpcyBub3QgcmVhZHkgZm9yIEMrKzE0LCB3aHkgdG9y dHVyZSBpdD8KKysvLyBIb3BlZnVsbHksIHRoaXMgd2lsbCBzcGVlZCB1cCB0aGUgdGVzdC4KKysK KysjaWZuZGVmIF9fY3BsdXNwbHVzCisrCisrI2Vycm9yICJUaGlzIGlzIG5vdCBhIEMrKyBjb21w aWxlciIKKysKKysjZWxpZiBfX2NwbHVzcGx1cyA8IDIwMTQwMkwKKysKKysjZXJyb3IgIlRoaXMg aXMgbm90IGEgQysrMTQgY29tcGlsZXIiCisrCisrI2Vsc2UKKysKKytuYW1lc3BhY2UgY3h4MTQK Kyt7CisrCisrICBuYW1lc3BhY2UgdGVzdF9wb2x5bW9ycGhpY19sYW1iZGFzCisrICB7CisrCisr ICAgIGludAorKyAgICB0ZXN0KCkKKysgICAgeworKyAgICAgIGNvbnN0IGF1dG8gbGFtYmRhID0g W10oYXV0byYmLi4uIGFyZ3MpeworKyAgICAgICAgY29uc3QgYXV0byBpc3RpbnkgPSBbXShhdXRv IHgpeworKyAgICAgICAgICByZXR1cm4gKHNpemVvZih4KSA9PSAxVUwpID8gMSA6IDA7CisrICAg ICAgICB9OworKyAgICAgICAgY29uc3QgaW50IGFyZXRpbnlbXSA9IHsgaXN0aW55KGFyZ3MpLi4u IH07CisrICAgICAgICByZXR1cm4gYXJldGlueVswXTsKKysgICAgICB9OworKyAgICAgIHJldHVy biBsYW1iZGEoMSwgMUwsIDEuMGYsICcxJyk7CisrICAgIH0KKysKKysgIH0KKysKKysgIG5hbWVz cGFjZSB0ZXN0X2JpbmFyeV9saXRlcmFscworKyAgeworKworKyAgICBjb25zdGV4cHIgYXV0byBp dmlpID0gMGIwMDAwMDAwMDAwMTAxMDEwOworKyAgICBzdGF0aWNfYXNzZXJ0KGl2aWkgPT0gNDIs ICJ3cm9uZyB2YWx1ZSIpOworKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3RfZ2VuZXJhbGl6 ZWRfY29uc3RleHByCisrICB7CisrCisrICAgIHRlbXBsYXRlIDwgdHlwZW5hbWUgQ2hhclQgPgor KyAgICBjb25zdGV4cHIgdW5zaWduZWQgbG9uZworKyAgICBzdHJsZW5fYyhjb25zdCBDaGFyVCAq Y29uc3Qgcykgbm9leGNlcHQKKysgICAgeworKyAgICAgIGF1dG8gbGVuZ3RoID0gMFVMOworKyAg ICAgIGZvciAoYXV0byBwID0gczsgKnA7ICsrcCkKKysgICAgICAgICsrbGVuZ3RoOworKyAgICAg IHJldHVybiBsZW5ndGg7CisrICAgIH0KKysKKysgICAgc3RhdGljX2Fzc2VydChzdHJsZW5fYygi IikgPT0gMFVMLCAiIik7CisrICAgIHN0YXRpY19hc3NlcnQoc3RybGVuX2MoIngiKSA9PSAxVUws ICIiKTsKKysgICAgc3RhdGljX2Fzc2VydChzdHJsZW5fYygidGVzdCIpID09IDRVTCwgIiIpOwor KyAgICBzdGF0aWNfYXNzZXJ0KHN0cmxlbl9jKCJhbm90aGVyXDB0ZXN0IikgPT0gN1VMLCAiIik7 CisrCisrICB9CisrCisrICBuYW1lc3BhY2UgdGVzdF9sYW1iZGFfaW5pdF9jYXB0dXJlCisrICB7 CisrCisrICAgIGludAorKyAgICB0ZXN0KCkKKysgICAgeworKyAgICAgIGF1dG8geCA9IDA7Cisr ICAgICAgY29uc3QgYXV0byBsYW1iZGExID0gW2EgPSB4XShpbnQgYil7IHJldHVybiBhICsgYjsg fTsKKysgICAgICBjb25zdCBhdXRvIGxhbWJkYTIgPSBbYSA9IGxhbWJkYTEoeCldKCl7IHJldHVy biBhOyB9OworKyAgICAgIHJldHVybiBsYW1iZGEyKCk7CisrICAgIH0KKysKKysgIH0KKysKKysg IG5hbWVzcGFjZSB0ZXN0X2RpZ2l0X3NlcGFyYXRvcnMKKysgIHsKKysKKysgICAgY29uc3RleHBy IGF1dG8gdGVuX21pbGxpb24gPSAxMDAnMDAwJzAwMDsKKysgICAgc3RhdGljX2Fzc2VydCh0ZW5f bWlsbGlvbiA9PSAxMDAwMDAwMDAsICIiKTsKKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0 X3JldHVybl90eXBlX2RlZHVjdGlvbgorKyAgeworKworKyAgICBhdXRvIGYoaW50JiB4KSB7IHJl dHVybiB4OyB9CisrICAgIGRlY2x0eXBlKGF1dG8pIGcoaW50JiB4KSB7IHJldHVybiB4OyB9Cisr CisrICAgIHRlbXBsYXRlIDwgdHlwZW5hbWUgVDEsIHR5cGVuYW1lIFQyID4KKysgICAgc3RydWN0 IGlzX3NhbWUKKysgICAgeworKyAgICAgIHN0YXRpYyBjb25zdGV4cHIgYXV0byB2YWx1ZSA9IGZh bHNlOworKyAgICB9OworKworKyAgICB0ZW1wbGF0ZSA8IHR5cGVuYW1lIFQgPgorKyAgICBzdHJ1 Y3QgaXNfc2FtZTxULCBUPgorKyAgICB7CisrICAgICAgc3RhdGljIGNvbnN0ZXhwciBhdXRvIHZh bHVlID0gdHJ1ZTsKKysgICAgfTsKKysKKysgICAgaW50CisrICAgIHRlc3QoKQorKyAgICB7Cisr ICAgICAgYXV0byB4ID0gMDsKKysgICAgICBzdGF0aWNfYXNzZXJ0KGlzX3NhbWU8aW50LCBkZWNs dHlwZShmKHgpKT46OnZhbHVlLCAiIik7CisrICAgICAgc3RhdGljX2Fzc2VydChpc19zYW1lPGlu dCYsIGRlY2x0eXBlKGcoeCkpPjo6dmFsdWUsICIiKTsKKysgICAgICByZXR1cm4geDsKKysgICAg fQorKworKyAgfQorKworK30gIC8vIG5hbWVzcGFjZSBjeHgxNAorKworKyNlbmRpZiAgLy8gX19j cGx1c3BsdXMgPj0gMjAxNDAyTAorKworK11dKQorKworKworK2RubCAgVGVzdHMgZm9yIG5ldyBm ZWF0dXJlcyBpbiBDKysxNworKworK200X2RlZmluZShbX0FYX0NYWF9DT01QSUxFX1NURENYWF90 ZXN0Ym9keV9uZXdfaW5fMTddLCBbWworKworKy8vIElmIHRoZSBjb21waWxlciBhZG1pdHMgdGhh dCBpdCBpcyBub3QgcmVhZHkgZm9yIEMrKzE3LCB3aHkgdG9ydHVyZSBpdD8KKysvLyBIb3BlZnVs bHksIHRoaXMgd2lsbCBzcGVlZCB1cCB0aGUgdGVzdC4KKysKKysjaWZuZGVmIF9fY3BsdXNwbHVz CisrCisrI2Vycm9yICJUaGlzIGlzIG5vdCBhIEMrKyBjb21waWxlciIKKysKKysjZWxpZiBfX2Nw bHVzcGx1cyA8IDIwMTcwM0wKKysKKysjZXJyb3IgIlRoaXMgaXMgbm90IGEgQysrMTcgY29tcGls ZXIiCisrCisrI2Vsc2UKKysKKysjaW5jbHVkZSA8aW5pdGlhbGl6ZXJfbGlzdD4KKysjaW5jbHVk ZSA8dXRpbGl0eT4KKysjaW5jbHVkZSA8dHlwZV90cmFpdHM+CisrCisrbmFtZXNwYWNlIGN4eDE3 CisreworKworKyAgbmFtZXNwYWNlIHRlc3RfY29uc3RleHByX2xhbWJkYXMKKysgIHsKKysKKysg ICAgY29uc3RleHByIGludCBmb28gPSBbXSgpe3JldHVybiA0Mjt9KCk7CisrCisrICB9CisrCisr ICBuYW1lc3BhY2UgdGVzdDo6bmVzdGVkX25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Wdo X25vZGlzY2FyZF9tYXliZV91bnVzZWRfYXR0cmlidXRlcworKyAgeworKworKyAgICBpbnQgZjEo KQorKyAgICB7CisrICAgICAgcmV0dXJuIDQyOworKyAgICB9CisrCisrICAgIFtbbm9kaXNjYXJk XV0gaW50IGYyKCkKKysgICAgeworKyAgICAgIFtbbWF5YmVfdW51c2VkXV0gYXV0byB1bnVzZWQg PSBmMSgpOworKworKyAgICAgIHN3aXRjaCAoZjEoKSkKKysgICAgICB7CisrICAgICAgY2FzZSAx NzoKKysgICAgICAgIGYxKCk7CisrICAgICAgICBbW2ZhbGx0aHJvdWdoXV07CisrICAgICAgY2Fz ZSA0MjoKKysgICAgICAgIGYxKCk7CisrICAgICAgfQorKyAgICAgIHJldHVybiBmMSgpOworKyAg ICB9CisrCisrICB9CisrCisrICBuYW1lc3BhY2UgdGVzdF9leHRlbmRlZF9hZ2dyZWdhdGVfaW5p dGlhbGl6YXRpb24KKysgIHsKKysKKysgICAgc3RydWN0IGJhc2UxCisrICAgIHsKKysgICAgICBp bnQgYjEsIGIyID0gNDI7CisrICAgIH07CisrCisrICAgIHN0cnVjdCBiYXNlMgorKyAgICB7Cisr ICAgICAgYmFzZTIoKSB7CisrICAgICAgICBiMyA9IDQyOworKyAgICAgIH0KKysgICAgICBpbnQg YjM7CisrICAgIH07CisrCisrICAgIHN0cnVjdCBkZXJpdmVkIDogYmFzZTEsIGJhc2UyCisrICAg IHsKKysgICAgICAgIGludCBkOworKyAgICB9OworKworKyAgICBkZXJpdmVkIGQxIHt7MSwgMn0s IHt9LCA0fTsgIC8vIGZ1bGwgaW5pdGlhbGl6YXRpb24KKysgICAgZGVyaXZlZCBkMiB7e30sIHt9 LCA0fTsgICAgICAvLyB2YWx1ZS1pbml0aWFsaXplZCBiYXNlcworKworKyAgfQorKworKyAgbmFt ZXNwYWNlIHRlc3RfZ2VuZXJhbF9yYW5nZV9iYXNlZF9mb3JfbG9vcAorKyAgeworKworKyAgICBz dHJ1Y3QgaXRlcgorKyAgICB7CisrICAgICAgaW50IGk7CisrCisrICAgICAgaW50JiBvcGVyYXRv ciogKCkKKysgICAgICB7CisrICAgICAgICByZXR1cm4gaTsKKysgICAgICB9CisrCisrICAgICAg Y29uc3QgaW50JiBvcGVyYXRvciogKCkgY29uc3QKKysgICAgICB7CisrICAgICAgICByZXR1cm4g aTsKKysgICAgICB9CisrCisrICAgICAgaXRlciYgb3BlcmF0b3IrKygpCisrICAgICAgeworKyAg ICAgICAgKytpOworKyAgICAgICAgcmV0dXJuICp0aGlzOworKyAgICAgIH0KKysgICAgfTsKKysK KysgICAgc3RydWN0IHNlbnRpbmVsCisrICAgIHsKKysgICAgICBpbnQgaTsKKysgICAgfTsKKysK KysgICAgYm9vbCBvcGVyYXRvcj09IChjb25zdCBpdGVyJiBpLCBjb25zdCBzZW50aW5lbCYgcykK KysgICAgeworKyAgICAgIHJldHVybiBpLmkgPT0gcy5pOworKyAgICB9CisrCisrICAgIGJvb2wg b3BlcmF0b3IhPSAoY29uc3QgaXRlciYgaSwgY29uc3Qgc2VudGluZWwmIHMpCisrICAgIHsKKysg ICAgICByZXR1cm4gIShpID09IHMpOworKyAgICB9CisrCisrICAgIHN0cnVjdCByYW5nZQorKyAg ICB7CisrICAgICAgaXRlciBiZWdpbigpIGNvbnN0CisrICAgICAgeworKyAgICAgICAgcmV0dXJu IHswfTsKKysgICAgICB9CisrCisrICAgICAgc2VudGluZWwgZW5kKCkgY29uc3QKKysgICAgICB7 CisrICAgICAgICByZXR1cm4gezV9OworKyAgICAgIH0KKysgICAgfTsKKysKKysgICAgdm9pZCBm KCkKKysgICAgeworKyAgICAgIHJhbmdlIHIge307CisrCisrICAgICAgZm9yIChhdXRvIGkgOiBy KQorKyAgICAgIHsKKysgICAgICAgIFtbbWF5YmVfdW51c2VkXV0gYXV0byB2ID0gaTsKKysgICAg ICB9CisrICAgIH0KKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0X2xhbWJkYV9jYXB0dXJl X2FzdGVyaXNrX3RoaXNfYnlfdmFsdWUKKysgIHsKKysKKysgICAgc3RydWN0IHQKKysgICAgewor KyAgICAgIGludCBpOworKyAgICAgIGludCBmb28oKQorKyAgICAgIHsKKysgICAgICAgIHJldHVy biBbKnRoaXNdKCkKKysgICAgICAgIHsKKysgICAgICAgICAgcmV0dXJuIGk7CisrICAgICAgICB9 KCk7CisrICAgICAgfQorKyAgICB9OworKworKyAgfQorKworKyAgbmFtZXNwYWNlIHRlc3RfZW51 bV9jbGFzc19jb25zdHJ1Y3Rpb24KKysgIHsKKysKKysgICAgZW51bSBjbGFzcyBieXRlIDogdW5z aWduZWQgY2hhcgorKyAgICB7fTsKKysKKysgICAgYnl0ZSBmb28gezQyfTsKKysKKysgIH0KKysK KysgIG5hbWVzcGFjZSB0ZXN0X2NvbnN0ZXhwcl9pZgorKyAgeworKworKyAgICB0ZW1wbGF0ZSA8 Ym9vbCBjb25kPgorKyAgICBpbnQgZiAoKQorKyAgICB7CisrICAgICAgaWYgY29uc3RleHByKGNv bmQpCisrICAgICAgeworKyAgICAgICAgcmV0dXJuIDEzOworKyAgICAgIH0KKysgICAgICBlbHNl CisrICAgICAgeworKyAgICAgICAgcmV0dXJuIDQyOworKyAgICAgIH0KKysgICAgfQorKworKyAg fQorKworKyAgbmFtZXNwYWNlIHRlc3Rfc2VsZWN0aW9uX3N0YXRlbWVudF93aXRoX2luaXRpYWxp emVyCisrICB7CisrCisrICAgIGludCBmKCkKKysgICAgeworKyAgICAgIHJldHVybiAxMzsKKysg ICAgfQorKworKyAgICBpbnQgZjIoKQorKyAgICB7CisrICAgICAgaWYgKGF1dG8gaSA9IGYoKTsg aSA+IDApCisrICAgICAgeworKyAgICAgICAgcmV0dXJuIDM7CisrICAgICAgfQorKworKyAgICAg IHN3aXRjaCAoYXV0byBpID0gZigpOyBpICsgNCkKKysgICAgICB7CisrICAgICAgY2FzZSAxNzoK KysgICAgICAgIHJldHVybiAyOworKworKyAgICAgIGRlZmF1bHQ6CisrICAgICAgICByZXR1cm4g MTsKKysgICAgICB9CisrICAgIH0KKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0X3RlbXBs YXRlX2FyZ3VtZW50X2RlZHVjdGlvbl9mb3JfY2xhc3NfdGVtcGxhdGVzCisrICB7CisrCisrICAg IHRlbXBsYXRlIDx0eXBlbmFtZSBUMSwgdHlwZW5hbWUgVDI+CisrICAgIHN0cnVjdCBwYWlyCisr ICAgIHsKKysgICAgICBwYWlyIChUMSBwMSwgVDIgcDIpCisrICAgICAgICA6IG0xIHtwMX0sCisr ICAgICAgICAgIG0yIHtwMn0KKysgICAgICB7fQorKworKyAgICAgIFQxIG0xOworKyAgICAgIFQy IG0yOworKyAgICB9OworKworKyAgICB2b2lkIGYoKQorKyAgICB7CisrICAgICAgW1ttYXliZV91 bnVzZWRdXSBhdXRvIHAgPSBwYWlyezEzLCA0MnV9OworKyAgICB9CisrCisrICB9CisrCisrICBu YW1lc3BhY2UgdGVzdF9ub25fdHlwZV9hdXRvX3RlbXBsYXRlX3BhcmFtZXRlcnMKKysgIHsKKysK KysgICAgdGVtcGxhdGUgPGF1dG8gbj4KKysgICAgc3RydWN0IEIKKysgICAge307CisrCisrICAg IEI8NT4gYjE7CisrICAgIEI8J2EnPiBiMjsKKysKKysgIH0KKysKKysgIG5hbWVzcGFjZSB0ZXN0 X3N0cnVjdHVyZWRfYmluZGluZ3MKKysgIHsKKysKKysgICAgaW50IGFyclsyXSA9IHsgMSwgMiB9 OworKyAgICBzdGQ6OnBhaXI8aW50LCBpbnQ+IHByID0geyAxLCAyIH07CisrCisrICAgIGF1dG8g ZjEoKSAtPiBpbnQoJilbMl0KKysgICAgeworKyAgICAgIHJldHVybiBhcnI7CisrICAgIH0KKysK KysgICAgYXV0byBmMigpIC0+IHN0ZDo6cGFpcjxpbnQsIGludD4mCisrICAgIHsKKysgICAgICBy ZXR1cm4gcHI7CisrICAgIH0KKysKKysgICAgc3RydWN0IFMKKysgICAgeworKyAgICAgIGludCB4 MSA6IDI7CisrICAgICAgdm9sYXRpbGUgZG91YmxlIHkxOworKyAgICB9OworKworKyAgICBTIGYz KCkKKysgICAgeworKyAgICAgIHJldHVybiB7fTsKKysgICAgfQorKworKyAgICBhdXRvIFsgeDEs IHkxIF0gPSBmMSgpOworKyAgICBhdXRvJiBbIHhyMSwgeXIxIF0gPSBmMSgpOworKyAgICBhdXRv IFsgeDIsIHkyIF0gPSBmMigpOworKyAgICBhdXRvJiBbIHhyMiwgeXIyIF0gPSBmMigpOworKyAg ICBjb25zdCBhdXRvIFsgeDMsIHkzIF0gPSBmMygpOworKworKyAgfQorKworKyAgbmFtZXNwYWNl IHRlc3RfZXhjZXB0aW9uX3NwZWNfdHlwZV9zeXN0ZW0KKysgIHsKKysKKysgICAgc3RydWN0IEdv b2Qge307CisrICAgIHN0cnVjdCBCYWQge307CisrCisrICAgIHZvaWQgZzEoKSBub2V4Y2VwdDsK KysgICAgdm9pZCBnMigpOworKworKyAgICB0ZW1wbGF0ZTx0eXBlbmFtZSBUPgorKyAgICBCYWQK KysgICAgZihUKiwgVCopOworKworKyAgICB0ZW1wbGF0ZTx0eXBlbmFtZSBUMSwgdHlwZW5hbWUg VDI+CisrICAgIEdvb2QKKysgICAgZihUMSosIFQyKik7CisrCisrICAgIHN0YXRpY19hc3NlcnQg KHN0ZDo6aXNfc2FtZV92PEdvb2QsIGRlY2x0eXBlKGYoZzEsIGcyKSk+KTsKKysKKysgIH0KKysK KysgIG5hbWVzcGFjZSB0ZXN0X2lubGluZV92YXJpYWJsZXMKKysgIHsKKysKKysgICAgdGVtcGxh dGU8Y2xhc3MgVD4gdm9pZCBmKFQpCisrICAgIHt9CisrCisrICAgIHRlbXBsYXRlPGNsYXNzIFQ+ IGlubGluZSBUIGcoVCkKKysgICAgeworKyAgICAgIHJldHVybiBUe307CisrICAgIH0KKysKKysg ICAgdGVtcGxhdGU8PiBpbmxpbmUgdm9pZCBmPD4oaW50KQorKyAgICB7fQorKworKyAgICB0ZW1w bGF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