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tLS0tLS0tLS0tLS0tLSA4PCAtLS0tLS0tLS0tLS0tLS0tIDg8IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCkBAIC0yMDIsOCArMjAyLDggQEAKICAqICAgICAgVXNlIGFzOgogICogICAgICAgICAgICAgIHY0bGdyYWIgPmltYWdlLnBwbQogICoKLSAqCUNvcHlyaWdodCAoQykgMTk5OC0wNS0wMywgUGhpbCBCbHVuZGVsbCA8cGhpbGJAZ251Lm9yZz4gIAotICogICAgICBDb3BpZWQgZnJvbSBodHRwOi8vd3d3LnRhemVuZGEuZGVtb24uY28udWsvcGhpbC92Z3JhYmJlci5jIAorICoJQ29weXJpZ2h0IChDKSAxOTk4LTA1LTAzLCBQaGlsIEJsdW5kZWxsIDxwaGlsYkBnbnUub3JnPgorICogICAgICBDb3BpZWQgZnJvbSBodHRwOi8vd3d3LnRhemVuZGEuZGVtb24uY28udWsvcGhpbC92Z3JhYmJlci5jCiAgKiAgICAgIHdpdGggbWlub3IgbW9kaWZpY2F0aW9ucyAoRGF2ZSBGb3JyZXN0LCBkcmY1bkB2aXJnaW5pYS5lZHUpLgogICoKICAqLwpAQCAtMjI1LDU1ICsyMjUsNTUgQEAKIAogI2RlZmluZSBSRUFEX1ZJREVPX1BJWEVMKGJ1ZiwgZm9ybWF0LCBkZXB0aCwgciwgZywgYikgICAgICAgICAgICAgICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBzd2l0Y2ggKGZvcm1hdCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIGNhc2UgVklERU9fUEFMRVRURV9HUkVZOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChkZXB0aCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDY6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyKSA9IChnKSA9IChiKSA9ICgqYnVmKysgPDwgOCk7XAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDE2OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyKSA9IChnKSA9IChiKSA9ICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKigodW5zaWduZWQgc2hvcnQgKikgYnVmKTsgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmICs9IDI7ICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgY2FzZSBWSURFT19QQUxFVFRFX1JHQjU2NTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCB0bXAgPSAqKHVuc2lnbmVkIHNob3J0ICopYnVmOyAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAocikgPSB0bXAmMHhGODAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAoZykgPSAodG1wPDw1KSYweEZDMDA7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAoYikgPSAodG1wPDwxMSkmMHhGODAwOyAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBidWYgKz0gMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgY2FzZSBWSURFT19QQUxFVFRFX1JHQjU1NTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAocikgPSAoYnVmWzBdJjB4RjgpPDw4OyAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAoZykgPSAoKGJ1ZlswXSA8PCA1IHwgYnVmWzFdID4+IDMpJjB4RjgpPDw4OyAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAoYikgPSAoKGJ1ZlsxXSA8PCAyICkgJiAweEY4KTw8ODsgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBidWYgKz0gMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgY2FzZSBWSURFT19QQUxFVFRFX1JHQjI0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAocikgPSBidWZbMF0gPDwgODsgKGcpID0gYnVmWzFdIDw8IDg7ICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAoYikgPSBidWZbMl0gPDwgODsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBidWYgKz0gMzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGb3JtYXQgJWQgbm90IHlldCBzdXBwb3J0ZWRcbiIsICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKwlzd2l0Y2ggKGZvcm1hdCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWNhc2UgVklERU9fUEFMRVRURV9HUkVZOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJc3dpdGNoIChkZXB0aCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCWNhc2UgNDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJY2FzZSA2OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCQljYXNlIDg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCQkocikgPSAoZykgPSAoYikgPSAoKmJ1ZisrIDw8IDgpO1wKKwkJCQkJYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJCQkJCQlcCisJCQkJY2FzZSAxNjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCQkJKHIpID0gKGcpID0gKGIpID0gICAgICAgICAgICAgICBcCisJCQkJCQkqKCh1bnNpZ25lZCBzaG9ydCAqKSBidWYpOyAgICAgIFwKKwkJCQkJYnVmICs9IDI7ICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJCWJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCQkJCQkJXAorCQkJCQkJCQkJXAorCQljYXNlIFZJREVPX1BBTEVUVEVfUkdCNTY1OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQl1bnNpZ25lZCBzaG9ydCB0bXAgPSAqKHVuc2lnbmVkIHNob3J0ICopYnVmOyAgICBcCisJCQkocikgPSB0bXAmMHhGODAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkoZykgPSAodG1wPDw1KSYweEZDMDA7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkoYikgPSAodG1wPDwxMSkmMHhGODAwOyAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQlidWYgKz0gMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCQkJCQkJCVwKKwkJY2FzZSBWSURFT19QQUxFVFRFX1JHQjU1NTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkocikgPSAoYnVmWzBdJjB4RjgpPDw4OyAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkoZykgPSAoKGJ1ZlswXSA8PCA1IHwgYnVmWzFdID4+IDMpJjB4RjgpPDw4OyAgICBcCisJCQkoYikgPSAoKGJ1ZlsxXSA8PCAyICkgJiAweEY4KTw8ODsgICAgICAgICAgICAgICBcCisJCQlidWYgKz0gMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQlicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJCQkJCQlcCisJCWNhc2UgVklERU9fUEFMRVRURV9SR0IyNDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJKHIpID0gYnVmWzBdIDw8IDg7IChnKSA9IGJ1ZlsxXSA8PCA4OyAgICAgICAgICAgXAorCQkJKGIpID0gYnVmWzJdIDw8IDg7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJYnVmICs9IDM7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCQkJCQkJXAorCQlkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCWZwcmludGYoc3RkZXJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCQkiRm9ybWF0ICVkIG5vdCB5ZXQgc3VwcG9ydGVkXG4iLCAgICAgICAgXAorCQkJCWZvcm1hdCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJfSA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dvcmQobmZvcmNlMl9jaGlwc2V0X2RldiwgTkZPUkNFMl9QTExSRUcsIHBsbCk7CiAKIAlyZXR1cm47CiB9CiAKLS8qCisvKioKICAqIG5mb3JjZTJfZnNiX3JlYWQgLSBSZWFkIEZTQgogICoKICAqICAgUmVhZCBGU0IgZnJvbSBjaGlwc2V0CkBAIC0xNDAsMzkgKzEzOCwzMiBAQAogCXN0cnVjdCBwY2lfZGV2ICpuZm9yY2UyX3N1YjU7CiAJdTMyIGZzYiwgdGVtcCA9IDA7CiAKLQkKIAkvKiBHZXQgY2hpcHNldCBib290IEZTQiBmcm9tIHN1YmRldmljZSA1IChGU0IgYXQgYm9vdC10aW1lKSAqLwogCW5mb3JjZTJfc3ViNSA9IHBjaV9nZXRfc3Vic3lzKFBDSV9WRU5ET1JfSURfTlZJRElBLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxRUYsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBDSV9BTllfSUQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBDSV9BTllfSUQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotCQorCQkJCQkJMHgwMUVGLFBDSV9BTllfSUQsUENJX0FOWV9JRCxOVUxMKTsKIAlpZiAoIW5mb3JjZTJfc3ViNSkKIAkJcmV0dXJuIDA7CiAKIAlwY2lfcmVhZF9jb25maWdfZHdvcmQobmZvcmNlMl9zdWI1LCBORk9SQ0UyX0JPT1RGU0IsICZmc2IpOwogCWZzYiAvPSAxMDAwMDAwOwotCQorCiAJLyogQ2hlY2sgaWYgUExMIHJlZ2lzdGVyIGlzIGFscmVhZHkgc2V0ICovCi0JcGNpX3JlYWRfY29uZmlnX2J5dGUobmZvcmNlMl9jaGlwc2V0X2RldiwgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5GT1JDRTJfUExMRU5BQkxFLCAodTggKikmdGV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cmVkIHdoZW4gY29tcGxldGVkICovCkBAIC0xMjMsNyArMTIzLDcgQEAKICAqIE1vc3QgdmFsdWVzIG9mIGludGVyZXN0IGFyZSBlbm9jb2RlZCBpbiBhIHNpbmdsZSBmaWVsZCBvZiB0aGUgX1BTUwogICogZW50cmllczogdGhlICJjb250cm9sIiB2YWx1ZS4KICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCiAjZGVmaW5lIElSVF9TSElGVCAgICAgIDMwCiAjZGVmaW5lIFJWT19TSElGVCAgICAgIDI4CiAjZGVmaW5lIEVYVF9UWVBFX1NISUZUIDI3CkBAIC0xODUsNyArMTg1LDcgQEAKICNpZm5kZWYgZm9yX2VhY2hfY3B1X21hc2sKICNkZWZpbmUgZm9yX2VhY2hfY3B1X21hc2soaSxtYXNrKSBmb3IgKGk9MDtpPDE7aSsrKQogI2VuZGlmCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCiAjaWZkZWYgQ09ORklHX1NNUAogc3RhdGljIGlubGluZSB2b2lkIGRlZmluZV9zaWJsaW5ncyhpbnQgY3B1LCBjcHVtYXNrX3QgY3B1X3NoYXJlZGNvcmVfbWFza1tdKQogewpkaWZmIC0tZ2l0IGEvYXJjaC9pMzg2L2tlcm5lbC9jcHUvY3B1ZnJlcS9zcGVlZHN0ZXAtY2VudHJpbm8uYyBiL2FyY2gvaTM4Ni9rZXJuZWwvY3B1L2NwdWZyZXEvc3BlZWRzdGVwLWNlbnRyaW5vLmMKaW5kZXggYzE3M2MwZi4uYjBmZjkwNyAxMDA2NDQKLS0tIGEvYXJjaC9pMzg2L2tlcm5lbC9jcHUvY3B1ZnJlcS9zcGVlZHN0ZXAtY2VudHJpbm8uYworKysgYi9hcmNoL2kzODYva2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bmdlCisgKiAgdGhhdCBoYXMgYmVlbiB0YWdnZWQgYXMgcmVjb3ZlcmFibGUuCisgKgorICogIElucHV0cworICoJZmlyc3QJRmlyc3QgYWRkcmVzcyByYW5nZSB0byBjaGVjaworICoJbGFzdAlMYXN0IGFkZHJlc3MgcmFuZ2UgdG8gY2hlY2sKKyAqCWlwCUluc3RydWN0aW9uIHBvaW50ZXIsIGFkZHJlc3Mgd2UgYXJlIGxvb2tpbmcgZm9yCisgKgorICogUmV0dXJuIHZhbHVlOgorICogICAgICAxIG9uIFN1Y2Nlc3MgKGluIHRoZSB0YWJsZSkvIDAgb24gRmFpbHVyZSAobm90IGluIHRoZSAgdGFibGUpCisgKi8KK2ludAorc2VhcmNoX21jYV90YWJsZSAoY29uc3Qgc3RydWN0IG1jYV90YWJsZV9lbnRyeSAqZmlyc3QsCisgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG1jYV90YWJsZV9lbnRyeSAqbGFzdCwKKyAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGlwKQoreworICAgICAgICBjb25zdCBzdHJ1Y3QgbWNhX3RhYmxlX2VudHJ5ICpjdXJyOworICAgICAgICB1NjQgY3Vycl9zdGFydCwgY3Vycl9lbmQ7CisKKyAgICAgICAgY3VyciA9IGZpcnN0OworICAgICAgICB3aGlsZSAoY3VyciA8PSBsYXN0KSB7CisgICAgICAgICAgICAgICAgY3Vycl9zdGFydCA9ICh1NjQpICZjdXJyLT5zdGFydF9hZGRyICsgY3Vyci0+c3RhcnRfYWRkcjsKKyAgICAgICAgICAgICAgICBjdXJyX2VuZCA9ICh1NjQpICZjdXJyLT5lbmRfYWRkciArIGN1cnItPmVuZF9hZGRyOworCisgICAgICAgICAgICAgICAgaWYgKChpcCA+PSBjdXJyX3N0YXJ0KSAmJiAoaXAgPD0gY3Vycl9lbmQpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg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MpCisqKC50ZXh0LmZyZWVfcGd0YWJsZXMpCisqKC50ZXh0LmdlbmVyaWNfZmlsZV9kaXJlY3Rfd3JpdGUpCisqKC50ZXh0LmNvcHlfcHJvY2VzcykKKyooLnRleHQubmV0aWZfcmVjZWl2ZV9za2IpCisqKC50ZXh0LmRub3RpZnlfZmx1c2gpCisqKC50ZXh0LnByaW50X2JhZF9wdGUpCisqKC50ZXh0LmFub25fdm1hX3VubGluaykKKyooLnRleHQuc3lzX21wcm90ZWN0KQorKigudGV4dC5zeW5jX3NiX2lub2RlcykKKyooLnRleHQuZmluZF9pbm9kZV9mYXN0KQorKigudGV4dC5kdW1teV9pbm9kZV9yZWFkbGluaykKKyooLnRleHQucHV0bmFtZSkKKyooLnRleHQuaW5pdF9zbXBfZmx1c2gpCisqKC50ZXh0LmRiZ19yZWR6b25lMikKKyooLnRleHQuc2tfcnVuX2ZpbHRlcikKKyooLnRleHQubWF5X2V4cGFuZF92bSkKKyooLnRleHQuZ2VuZXJpY19maWxlX2Fpb193cml0ZSkKKyooLnRleHQuZmluZF9uZXh0X3plcm9fYml0KQorKigudGV4dC5maWxlX2tpbGwpCisqKC50ZXh0LmF1ZGl0X2dldG5hbWUpCisqKC50ZXh0LmFyY2hfdW5tYXBfYXJlYV90b3Bkb3duKQorKigudGV4dC5hbGxvY19wYWdlX3ZtYSkKKyooLnRleHQudGNwX3RyYW5zbWl0X3NrYikKKyooLnRleHQucmJfbmV4dCkKKyooLnRleHQuZGJnX3JlZHpvbmUxKQorKigudGV4dC5nZW5lcmljX2ZpbGVfbW1hcCkKKyooLnRleHQudmZzX2ZzdGF0KQorKigudGV4dC5zeXNfdGltZSkKKyooLnRleHQucGFnZV9sb2NrX2Fub25fdm1hKQorKigudGV4dC5nZXRfdW5tYXBwZWRfYXJlYSkKKyooLnRleHQucmVtb3RlX2xsc2VlaykKKyooLnRleHQuX191cF9yZWFkKQorKigudGV4dC5mZF9pbnN0YWxsKQorKigudGV4dC5ldmVudHBvbGxfa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V4dC5zZXFfZXNjYXBlKQorKigudGV4dC5fX3Bvc2l4X2xvY2tfZmlsZSkKKyooLnRleHQubW1fcmVsZWFzZSkKKyooLnRleHQua3JlZl9wdXQpCisqKC50ZXh0LmlwX3JjdikKKyooLnRleHQuX19pZ2V0KQorKigudGV4dC5mcmVlX3BhZ2VzKQorKigudGV4dC5maW5kX21lcmdlYWJsZV9hbm9uX3ZtYSkKKyooLnRleHQuZmluZF9leHRlbmRfdm1hKQorKigudGV4dC5kdW1teV9pbm9kZV9saXN0c2VjdXJpdHkpCisqKC50ZXh0LmJpb19hZGRfcGFnZSkKKyooLnRleHQuX192bV9lbm91Z2hfbWVtb3J5KQorKigudGV4dC52ZnNfc3RhdCkKKyooLnRleHQudHR5X3BhcmFub2lhX2NoZWNrKQorKigudGV4dC50Y3BfcmVhZF9zb2NrKQorKigudGV4dC50Y3BfZGF0YV9xdWV1ZSkKKyooLnRleHQuc3lzX3VuYW1lKQorKigudGV4dC5zeXNfcmVuYW1lYXQpCisqKC50ZXh0Ll9fc3RybmNweV9mcm9tX3VzZXIpCisqKC50ZXh0Ll9fbXV0ZXhfaW5pdCkKKyooLnRleHQuX19sb29rdXBfaGFzaCkKKyooLnRleHQua3JlZl9nZXQpCisqKC50ZXh0LmlwX3JvdXRlX2lucHV0KQorKigudGV4dC5fX2luc2VydF9pbm9kZV9oYXNoKQorKigudGV4dC5kb19zb2NrX3dyaXRlKQorKigudGV4dC5ibGtfZG9uZV9zb2Z0aXJxKQorKigudGV4dC5fX3dha2VfdXBfc3luYykKKyooLnRleHQuX192bWFfbGlua19yYikKKyooLnRleHQudHR5X2lvY3RsKQorKigudGV4dC50cmFjZXN5cykKKyooLnRleHQuc3lzX2dldGRlbnRzKQorKigudGV4dC5zeXNfZHVwKQorKigudGV4dC5zdHViX2V4ZWN2ZSkKKyooLnRleHQuc2hhX3RyYW5zZm9ybSkKKyooLnRleHQucmFkaXhfdHJlZV90YWdfY2xlYXIpCisqKC50ZXh0LnB1dF91bn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19pbm9kZSkKKyooLnRleHQud2FpdF9ub3JlYXBfY29weW91dCkKKyooLnRleHQudm1zdGF0X3N0YXJ0KQorKigudGV4dC52Z2Fjb25fZG9fZm9udF9vcCkKKyooLnRleHQudmZzX3JlYWR2KQorKigudGV4dC52ZnNfcXVvdGFfc3luYykKKyooLnRleHQudXBkYXRlX3F1ZXVlKQorKigudGV4dC51bnNoYXJlX2ZpbGVzKQorKigudGV4dC51bm1hcF92bV9hcmVhKQorKigudGV4dC51bml4X3NvY2tldHBhaXIpCisqKC50ZXh0LnVuaXhfcmVsZWFzZV9zb2NrKQorKigudGV4dC51bml4X2RldGFjaF9mZHMpCisqKC50ZXh0LnVuaXhfY3JlYXRlMSkKKyooLnRleHQudW5peF9iaW5kKQorKigudGV4dC51ZHBfc2VuZG1zZykKKyooLnRleHQudWRwX3JjdikKKyooLnRleHQudWRwX3F1ZXVlX3Jjdl9za2IpCisqKC50ZXh0LnVhcnRfd3JpdGUpCisqKC50ZXh0LnVhcnRfc3RhcnR1cCkKKyooLnRleHQudWFydF9vcGVuKQorKigudGV4dC50dHlfdmhhbmd1cCkKKyooLnRleHQudHR5X3Rlcm1pb3NfYmF1ZF9yYXRlKQorKigudGV4dC50dHlfcmVsZWFzZSkKKyooLnRleHQudHR5X2xkaXNjX3JlZikKKyooLnRleHQudGhyb3R0bGVfdm1fd3JpdGVvdXQpCisqKC50ZXh0LjA1OCkKKyooLnRleHQudGNwX3htaXRfcHJvYmVfc2tiKQorKigudGV4dC50Y3BfdjRfc2VuZF9jaGVjaykKKyooLnRleHQudGNwX3Y0X2Rlc3Ryb3lfc29jaykKKyooLnRleHQudGNwX3N5bmNfbXNzKQorKigudGV4dC50Y3Bfc25kX3Rlc3QpCisqKC50ZXh0LnRjcF9zbG93X3N0YXJ0KQorKigudGV4dC50Y3Bfc2VuZF9maW4pCisqKC50ZXh0LnRjcF9ydHRfZXN0aW1hdG9yKQorKigudGV4dC50Y3BfcGFyc2Vfb3B0aW9ucykKKyooLnRleHQudGNwX2lvY3RsKQorKigudGV4dC50Y3BfaW5pdF90c29fc2VncykKKyooLnRleHQudGNwX2luaXRfY3duZCkKKyooLnRleHQudGNwX2dldHNvY2tvcHQpCisqKC50ZXh0LnRjcF9maW4pCisqKC50ZXh0LnRjcF9jb25uZWN0KQorKigudGV4dC50Y3BfY29uZ19hdm9pZCkKKyooLnRleHQuX190Y3BfY2hlY2tzdW1fY29tcGxldGVfdXNlcikKKyooLnRleHQudGFza19kdW1wYWJsZSkKKyooLnRleHQuc3lzX3dhaXQ0KQorKigudGV4dC5zeXNfdXRpbWVzKQorKigudGV4dC5zeXNfc3ltbGlua2F0KQorKigudGV4dC5zeXNfc29ja2V0cGFpcikKKyooLnRleHQuc3lzX3JtZGlyKQorKigudGV4dC5zeXNfcmVhZGFoZWFkKQorKigudGV4dC5zeXNfbmFub3NsZWVwKQorKigudGV4dC5zeXNfbGlua2F0KQorKigudGV4dC5zeXNfZnN0YXQpCisqKC50ZXh0LnN5c2ZzX3JlYWRkaXIpCisqKC50ZXh0LnN5c19leGVjdmUpCisqKC50ZXh0LnN5c2VudGVyX3RyYWNlc3lzKQorKigudGV4dC5zeXNfY2hvd24pCisqKC50ZXh0LnN0dWJfY2xvbmUpCisqKC50ZXh0LnN0cnJjaHIpCisqKC50ZXh0LnN0cm5jcHkpCisqKC50ZXh0LnN0b3BtYWNoaW5lX3NldF9zdGF0ZSkKKyooLnRleHQuc29ja19zZW5kbXNnKQorKigudGV4dC5zb2NrX3JlbGVhc2UpCisqKC50ZXh0LnNvY2tfZmFzeW5jKQorKigudGV4dC5zb2NrX2Nsb3NlKQorKigudGV4dC5za19zdHJlYW1fd3JpdGVfc3BhY2UpCisqKC50ZXh0LnNrX3Jlc2V0X3RpbWVyKQorKigudGV4dC5za2Jfc3BsaXQpCisqKC50ZXh0LnNrYl9yZWN2X2RhdGFncmFtKQorKigudGV4dC5za2JfcXVldWVfdGFpbCkKKyooLnRleHQuc2tfYXR0YWNoX2ZpbHRlcikK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2k8Y291bnQvMjtpKyspICgodTE2ICopYnVmKVtpXSA9IHI0dygpOwogICAgICAgICAgICAgICAgIHcyKDQpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogCi0gICAgICAgIGNhc2UgNDogdzMoMHg2OCk7IHIxKCk7IHcyKDB4MjQpOworICAgICAgICBjYXNlIDQ6IHczKDB4NjgpOyAodm9pZClyMSgpOyB3MigweDI0KTsKICAgICAgICAgICAgICAgICBmb3IgKGk9MDtpPGNvdW50LzQ7aSsrKSAoKHUzMiAqKWJ1ZilbaV0gPSByNGwoKTsKICAgICAgICAgICAgICAgICB3Mig0KTsKICAgICAgICAgICAgICAgICBicmVhazsKQEAgLTE2MCwxNSArMTYwLDE1IEBACiAgICAgICAgICAgICAgICAgdzIoNSk7IHcyKDQpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogCi0gICAgICAgIGNhc2UgMjogdzMoMHg0OCk7IHIxKCk7CisgICAgICAgIGNhc2UgMjogdzMoMHg0OCk7ICh2b2lkKXIxKCk7CiAgICAgICAgICAgICAgICAgZm9yIChrPTA7azxjb3VudDtrKyspIHc0KGJ1ZltrXjFdKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAotICAgICAgICBjYXNlIDM6IHczKDB4NDgpOyByMSgpOworICAgICAgICBjYXNlIDM6IHczKDB4NDgpOyAodm9pZClyMSgpOwogICAgICAgICAgICAgICAgIGZvciAoaz0wO2s8Y291bnQvMjtrKyspIHc0dyhwaV9zd2FiMTYoYnVmLGspKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAotICAgICAgICBjYXNlIDQ6IHczKDB4NDgpOyByMSgpOworICAgICAgICBjYXNlIDQ6IHczKDB4NDgpOyAodm9pZClyMSgpOwogICAgICAgICAgICAgICAgIGZvciAoaz0wO2s8Y291bnQvNDtrKyspIHc0bChwaV9zd2FiMzIoYnVmLGspKTsKICAgICAgICAgICAgICAgICBicmVhazsKIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9ibG9jay9wYXJpZG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0kKENPTkZJR19USVBBUikgKz0gdGlwYXIubworb2JqLSQoQ09ORklHX1BSSU5URVIpCQkrPSBscC5vCitvYmotJChDT05GSUdfVElQQVIpCQkrPSB0aXBhci5vCiAKLW9iai0kKENPTkZJR19EVExLKSArPSBkdGxrLm8KLW9iai0kKENPTkZJR19SMzk2NCkgKz0gbl9yMzk2NC5vCi1vYmotJChDT05GSUdfQVBQTElDT00pICs9IGFwcGxpY29tLm8KLW9iai0kKENPTkZJR19TT05ZUEkpICs9IHNvbnlwaS5vCi1vYmotJChDT05GSUdfUlRDKSArPSBydGMubwotb2JqLSQoQ09ORklHX0hQRVQpICs9IGhwZXQubwotb2JqLSQoQ09ORklHX0dFTl9SVEMpICs9IGdlbnJ0Yy5vCi1vYmotJChDT05GSUdfRUZJX1JUQykgKz0gZWZpcnRjLm8KLW9iai0kKENPTkZJR19TR0lfRFMxMjg2KSArPSBkczEyODYubwotb2JqLSQoQ09ORklHX1NHSV9JUDI3X1JUQykgKz0gaXAyNy1ydGMubwotb2JqLSQoQ09ORklHX0RTMTMwMikgKz0gZHMxMzAyLm8KLW9iai0kKENPTkZJR19TM0MyNDEwX1JUQykgKz0gczNjMjQxMC1ydGMubwotb2JqLSQoQ09ORklHX1JUQ19WUjQxWFgpICs9IHZyNDF4eF9ydGMubworb2JqLSQoQ09ORklHX0RUTEspCQkrPSBkdGxrLm8KK29iai0kKENPTkZJR19SMzk2NCkJCSs9IG5fcjM5NjQubworb2JqLSQoQ09ORklHX0FQUExJQ09NKQkJKz0gYXBwbGljb20ubworb2JqLSQoQ09ORklHX1NPTllQSSkJCSs9IHNvbnlwaS5vCitvYmotJChDT05GSUdfUlRDKQkJKz0gcnRjLm8KK29iai0kKENPTkZJR19IUEVUKQkJKz0gaHBldC5vCitvYmotJChDT05GSUdfR0VOX1JUQykJCSs9IGdlbnJ0Yy5vCitvYmotJChDT05GSUdfRUZJX1JUQykJCSs9IGVmaXJ0Yy5vCitvYmotJChDT05GSUdfU0dJX0RTMT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MTkpICs9IHRiMDIxOS5vCi1vYmotJChDT05GSUdfVEVMQ0xPQ0spICs9IHRsY2xrLm8KK29iai0kKENPTkZJR19UT1NISUJBKQkJKz0gdG9zaGliYS5vCitvYmotJChDT05GSUdfSThLKQkJKz0gaThrLm8KK29iai0kKENPTkZJR19EUzE2MjApCQkrPSBkczE2MjAubworb2JqLSQoQ09ORklHX0hXX1JBTkRPTSkJCSs9IGh3X3JhbmRvbS5vCitvYmotJChDT05GSUdfRlRBUEUpCQkrPSBmdGFwZS8KK29iai0kKENPTkZJR19DT0JBTFRfTENEKQkrPSBsY2Qubworb2JqLSQoQ09ORklHX1BQREVWKQkJKz0gcHBkZXYubworb2JqLSQoQ09ORklHX05XQlVUVE9OKQkJKz0gbndidXR0b24ubworb2JqLSQoQ09ORklHX05XRkxBU0gpCQkrPSBud2ZsYXNoLm8KK29iai0kKENPTkZJR19TQ3gyMDBfR1BJTykJKz0gc2N4MjAwX2dwaW8ubworb2JqLSQoQ09ORklHX0NTNTUzNV9HUElPKQkrPSBjczU1MzVfZ3Bpby5vCitvYmotJChDT05GSUdfR1BJT19WUjQxWFgpCSs9IHZyNDF4eF9naXUubworb2JqLSQoQ09ORklHX1RBTkJBQ19UQjAyMTkpCSs9IHRiMDIxOS5vCitvYmotJChDT05GSUdfVEVMQ0xPQ0spCQkrPSB0bGNsay5vCiAKLW9iai0kKENPTkZJR19XQVRDSERPRykJKz0gd2F0Y2hkb2cvCi1vYmotJChDT05GSUdfTVdBVkUpICs9IG13YXZlLwotb2JqLSQoQ09ORklHX0FHUCkgKz0gYWdwLwotb2JqLSQoQ09ORklHX0RSTSkgKz0gZHJtLwotb2JqLSQoQ09ORklHX1BDTUNJQSkgKz0gcGNtY2lhLwotb2JqLSQoQ09ORklHX0lQTUlfSEFORExFUikgKz0gaXBtaS8KK29iai0kKENPTkZJR19XQVRDSERPRykJCSs9IHdhdGNoZG9nLworb2JqLSQoQ09ORklHX01XQVZFKQkJKz0gbXdhdmUvCitvYmotJ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gLSA3QkZGICovCisJdTggRHBTcmFtMVtEUF9TUkFNMV9TSVpFXTsJLyogMDAwMCAtIDdCRkYgKi8KIAl1bmlvbiB1X0N0cmxQcm9tIERwQ3RybFByb207CS8qIDdDMDAgLSA3REZGICovCiAJdW5pb24gdV9TcmFtMlBhcm1NYXAgRHBTcmFtMlBhcm1NYXA7CS8qIDdFMDAgLSA3RkZGICovCi0JQllURSBEcFNjcmF0Y2hbRFBfU0NSQVRDSF9TSVpFXTsJLyogODAwMCAtIDhGRkYgKi8KLQlCWVRFIERwU3JhbTNbRFBfU1JBTTNfU0laRV07CS8qIDkwMDAgLSBGRkZGICovCisJdTggRHBTY3JhdGNoW0RQX1NDUkFUQ0hfU0laRV07CS8qIDgwMDAgLSA4RkZGICovCisJdTggRHBTcmFtM1tEUF9TUkFNM19TSVpFXTsJLyogOTAwMCAtIEZGRkYgKi8KIH07CiAKICNkZWZpbmUJRHBDb250cm9sCURwQ3RybFByb20uRHBDdHJsLkRwQ3RsCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2Jvb3Rwa3QuaCBiL2RyaXZlcnMvY2hhci9yaW8vYm9vdHBrdC5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCA2MDIyNjZlLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvY2hhci9yaW8vYm9vdHBrdC5oCisrKyAvZGV2L251bGwKQEAgLTEsNjEgKzAsMCBAQAotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgIEIgTyBPIFQgICAgUCBBIEMgSyBFIFQgICBIIEUgQSBEIEUgUiAgIEYgSSBMIEUKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgIC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1Y3QgewotCQkJdXNob3J0IF9fY21kX2hkcl9fOworCQkJdTE2IF9fY21kX2hkcl9fOwogCQkJc3RydWN0IFRvcCBUb3BvbG9neVtMSU5LU19QRVJfVU5JVF07CiAJCX0gUzY7CiAJfSBVMTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vY29udHJvbC5oIGIvZHJpdmVycy9jaGFyL3Jpby9jb250cm9sLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDY4NTNkMDMuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9jb250cm9sLmgKKysrIC9kZXYvbnVsbApAQCAtMSw2MSArMCwwIEBACi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgQyBPIE4gVCBSIE8gTCAgIFAgQSBDIEsgRSBUICAgSCBFIEEgRCBFIFIgUwotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSBBdXRob3IgIDogSm9uIEJyYXduCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0ZC4sIEJ5ZmxlZXQsIFN1cnJleSwgVUsuCi0gKgotICogICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQotICogICA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BtYW55IHBvcnQgc2V0cyBhcmUgd2UgbWFwcGluZz8gKi8KKwl1bnNpZ25lZCBpbnQgTnVtRW50cmllczsJLyogSG93IG1hbnkgcG9ydCBzZXRzIGFyZSB3ZSBtYXBwaW5nPyAqLwogCXN0cnVjdCBNYXBJbmZvICpNYXBJbmZvUDsJLyogUG9pbnRlciB0byAodXNlciBzcGFjZSkgaW5mbyAqLwogfTsKIApAQCAtMTQ3LDEzICsxNDIsMTMgQEAKIH07CiAKIHN0cnVjdCBJZGVudGlmeVJ0YSB7Ci0JdWxvbmcgUnRhVW5pcXVlOwotCXVjaGFyIElEOworCXVuc2lnbmVkIGxvbmcgUnRhVW5pcXVlOworCXU4IElEOwogfTsKIAogc3RydWN0IEtpbGxOZWlnaGJvdXIgewotCXVsb25nIFVuaXF1ZU51bTsKLQl1Y2hhciBMaW5rOworCXVuc2lnbmVkIGxvbmcgVW5pcXVlTnVtOworCXU4IExpbms7CiB9OwogCiBzdHJ1Y3QgcmlvVmVyc2lvbiB7CmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2RlZmF1bHRzLmggYi9kcml2ZXJzL2NoYXIvcmlvL2RlZmF1bHRzLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGQ1NWMyZjYuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9kZWZhdWx0cy5oCisrKyAvZGV2L251bGwKQEAgLTEsNTEgKzAsMCBAQAotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgRCBFIEYgQSBVIEwgVCBTCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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qKioqKioqKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vZXJyb3IuaCBiL2RyaXZlcnMvY2hhci9yaW8vZXJyb3IuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZjIwZjA3OC4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL2Vycm9yLmgKKysrIC9kZXYvbnVsbApAQCAtMSw4MiArMCwwIEBACi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgIEUgUiBSIE8gUiAgSCBFIEEgRCBFIFIgICBGIEkgTCBFCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYQotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNp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LS0tLQotCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jaWZuZGVmIGxpbnQKLS8qIHN0YXRpYyBjaGFyICpfcmlvX2Vycm9yX2hfc2NjcyA9ICJAKCMpZXJyb3IuaAkxLjMiOyAqLwotI2VuZGlmCi0KLSNkZWZpbmUgRV9OT19FUlJPUiAgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDApCi0jZGVmaW5lIEVfUFJPQ0VTU19OT1RfSU5JVCAgICAgICAgICAgICAgICgodXNob3J0KSAxKQotI2RlZmluZSBFX0xJTktfVElNRU9VVCAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMikKLSNkZWZpbmUgRV9OT19ST1VURSAgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDMpCi0jZGVmaW5lIEVfQ09ORlVTRUQgICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSA0KQotI2RlZmluZSBFX0hPTUUgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgNSkKLSNkZWZpbmUgRV9DU1VNX0ZBSUwgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDYpCi0jZGVmaW5lIEVfRElTQ09OTkVDVEVEICAgICAgICAgICAgICAgICAgICgodXNob3J0KSA3KQotI2RlZmluZSBFX0JBRF9SVVAgICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgOCkKLSNkZWZpbmUgRV9OT19WSVJHSU4gICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDkpCi0jZGVmaW5lIEVfQk9PVF9SVVBfQlVTWSAgICAgICAgICAgICAgICAgICgodXNob3J0KSAxMCkKLQotCi0KLSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICAgICAqIFBhcnNlZCB0byBtZW1faGFsdCgpCi0gICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgRV9DSEFOQUxMT0MgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4ODApCi0jZGVmaW5lIEVfUE9MTF9BTExPQyAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDgxKQotI2RlZmluZSBFX0xUVFdBS0UgICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg4MikKLSNkZWZpbmUgRV9MVFRfQUxMT0MgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4ODMpCi0jZGVmaW5lIEVfTFJUX0FMTE9DICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDg0KQotI2RlZmluZSBFX0NJUlJVUyAgICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg4NSkKLSNkZWZpbmUgRV9NT05JVE9SICAgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4ODYpCi0jZGVmaW5lIEVfUEhCX0FMTE9DICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDg3KQotI2RlZmluZSBFX0FSUkFZX0FMTE9DICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg4OCkKLSNkZWZpbmUgRV9RQlVGX0FMTE9DICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4ODkpCi0jZGVmaW5lIEVfUEtUX0FMTE9DICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDhhKQotI2RlZmluZSBFX0dFVF9UWF9RX0JVRiAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg4YikKLSNkZWZpbmUgRV9HRVRfUlhfUV9CVUYgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4OGMpCi0jZGVmaW5lIEVfTUVNX09VVCAgICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDhkKQotI2RlZmluZSBFX01NVV9JTklUICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg4ZSkKLSNkZWZpbmUgRV9MVFRfSU5JVCAgICAgICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4OGYpCi0jZGVmaW5lIEVfTFJUX0lOSVQgICAgICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDkwKQotI2RlZmluZSBFX0xJTktfUlVOICAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg5MSkKLSNkZWZpbmUgRV9NT05JVE9SX0FMTE9DICAgICAgICAgICAgICAgICAgKCh1c2hvcnQpIDB4OTIpCi0jZGVmaW5lIEVfTU9OSVRPUl9JTklUICAgICAgICAgICAgICAgICAgICgodXNob3J0KSAweDkzKQotI2RlZmluZSBFX1BPTExfSU5JVCAgICAgICAgICAgICAgICAgICAgICAoKHVzaG9ydCkgMHg5NCkKLQotCi0vKioqKioqKioqKiogZW5kIG9mIGZpbGUgKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2Z1bmMuaCBiL2RyaXZlcnMvY2hhci9yaW8vZnVuYy5oCmluZGV4IGI0Nzc4NDEuLmU2NGZlOTkgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvY2hhci9yaW8vZnVuYy5oCisrKyBiL2RyaXZlcnMvY2hhci9yaW8vZnVuYy5oCkBAIC00MywzNSArNDMsMzMgQEAKIAogLyogcmlvYm9vdC5jICovCiBpbnQgUklPQm9vdENvZGVSVEEoc3RydWN0IHJpb19pbmZvICosIHN0cnVjdCBEb3duTG9hZCAqKTsKLWludCBSSU9Cb290Q29kZUhPU1Qoc3RydWN0IHJpb19pbmZvICosIHJlZ2lzdGVyIHN0cnVjdCBEb3duTG9hZCAqKTsKK2ludCBSSU9Cb290Q29kZUhPU1Qoc3RydWN0IHJpb19pbmZvICosIHN0cnVjdCBEb3duTG9hZCAqKTsKIGludCBSSU9Cb290Q29kZVVOS05PV04oc3RydWN0IHJpb19pbmZvICosIHN0cnVjdC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qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICBMIEkgUyBUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSBBdXRob3IgIDogSmVyZW15IFJvbGxzLgotIERhdGUgICAgOiAwNC1Ob3YtMTk5MAotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IKLSAqICAgICAgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAotICogICAgICBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgotICogICA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EvZHJpdmVycy9jaGFyL3Jpby9xYnVmLmggYi9kcml2ZXJzL2NoYXIvcmlvL3FidWYuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMzkxZmZjMy4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL3FidWYuaAorKysgL2Rldi9udWxsCkBAIC0xLDYyICswLDAgQEAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICBRIFUgRSBVIEUgICAgQiBVIEYgRiBFIFIgICBTIFQgUiBVIEMgVCBVIFIgRSBTCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYSAvIEplcmVteSBSb2xscwotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlc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zOwotCQkgICAgaWYgKFJ0YVR5cGUgPT0gVFlQRV9SVEExNikKLQkJICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoZW50cnkyID0gcnRhICsgMTsgZW50cnkyIDwgVE9UQUxfTUFQX0VOVFJJRVM7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgZW50cnkyKyspCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHAtPlJJT1NhdmVkVGFibGVbZW50cnkyXS5SdGFVbmlxdWVOdW0gPT0gUnRhVW5pcSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBNYXBQMiA9ICZwLT5SSU9TYXZlZFRhYmxlW2VudHJ5Ml07Ci0gICAgICAgICAgICAgICAgICAgICAgICByaW9fZHByaW50ayAoUklPX0RFQlVHX0JPT1QsICJUaGlzIFJUQSBpcyBmcm9tIHRhYmxlIGVudHJpZXMgJWQrJWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydGEsIGVudHJ5Mik7Ci0JCSAgICB9Ci0JCSAgICBlbHNlCi0JCQlyaW9fZHByaW50ayAoUklPX0RFQlVHX0JPT1QsICJUaGlzIFJUQSBpcyBmcm9tIHRhYmxlIGVudHJ5ICVkXG4iLCBydGEpOwotCQkgICAgYnJlYWs7Ci0JCX0KLQkgICAgfQotCX0KLQotCS8qCi0JKiogVGhlcmUgaXMgbm8gU0xPVF9JTl9VU0Ugb3IgU0xPVF9URU5UQVRJVkUgZW50cnkgZm9yIHRoaXMgUlRBCi0JKiogYXR0YWNoZWQgdG8gdGhlIGN1cnJlbnQgaG9zdCBjYXJkIGluIHRoZSBkcml2ZXIgdGFibGUuCi0JKioKLQkqKiBXZSBtYXkgaGF2ZSBmb3VuZCBhIFNMT1RfSU5fVVNFIGVudHJ5IG9u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B0aGUgYXJndW1lbnQgYnl0ZQogCSAqLwotCVdCWVRFKFBhY2tldFAtPmRhdGFbMF0sIGNvbW1hbmQpOworCXdyaXRlYihjb21tYW5kLCAmUGFja2V0UC0+ZGF0YVswXSk7CiAKIAlpZiAobGVuID09IDIpCi0JCVdCWVRFKFBhY2tldFAtPmRhdGFbMV0sIGFyZyk7CisJCXdyaXRlYihhcmcsICZQYWNrZXRQLT5kYXRhWzFdKTsKIAogCS8qCiAJICoqIHNldCB0aGUgbGVuZ3RoIG9mIHRoZSBwYWNrZXQgYW5kIHNldCB0aGUgY29tbWFuZCBiaXQuCiAJICovCi0JV0JZVEUoUGFja2V0UC0+bGVuLCBQS1RfQ01EX0JJVCB8IGxlbik7CisJd3JpdGViKFBLVF9DTURfQklUIHwgbGVuLCAmUGFja2V0UC0+bGVuKTsKIAogCWFkZF90cmFuc21pdChQb3J0UCk7CiAJLyoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vcmlvdHlwZXMuaCBiL2RyaXZlcnMvY2hhci9yaW8vcmlvdHlwZXMuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNDYwODRkNS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL3Jpb3R5cGVzLmgKKysrIC9kZXYvbnVsbApAQCAtMSw2OCArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgIFIgSSBPIFQgWSBQIEUgUwotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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iogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgIFIgTyBNCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYQotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IKLSAqICAgICAgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAotICogICAgICBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgotICogICAgICBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIF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ml2ZXJzL2NoYXIvcmlvL3NhbS5oCisrKyAvZGV2L251bGwKQEAgLTEsNjcgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgUyBBIE0gLiBICi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYQotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IKLSAqICAgICAgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZn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IGVycm9yOworICAgICAgICBfX3UzMiBtaXNjOworCisgICAgICAgIF9fdTMyIGdlbmVyYXRpb247CisgICAgICAgIF9fdTMyIGxlbmd0aDsKKworICAgICAgICBfX3U2NCBhZGRyZXNzOworCisgICAgICAgIF9fdTY0IHRhZzsKKworICAgICAgICBfX3U2NCBzZW5kYjsKKyAgICAgICAgX191NjQgcmVjdmI7Cit9ICBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKKworc3RhdGljIGNvbnN0IGNoYXIgX191c2VyICpyYXcxMzk0X2NvbXBhdF93cml0ZShjb25zdCBjaGFyIF9fdXNlciAqYnVmKQoreworCXN0cnVjdCBjb21wYXRfcmF3MTM5NF9yZXEgX191c2VyICpjciA9ICh0eXBlb2YoY3IpKSBidWY7IAorCXN0cnVjdCByYXcxMzk0X3JlcXVlc3QgX191c2VyICpyOworCXIgPSBjb21wYXRfYWxsb2NfdXNlcl9zcGFjZShzaXplb2Yoc3RydWN0IHJhdzEzOTRfcmVxdWVzdCkpOworCisjZGVmaW5lIEMoeCkgX19jb3B5X2luX3VzZXIoJnItPngsICZjci0+eCwgc2l6ZW9mKHItPngpKQorCisJaWYgKGNvcHlfaW5fdXNlcihyLCBjciwgc2l6ZW9mKHN0cnVjdCBjb21wYXRfcmF3MTM5NF9yZXEpKSB8fAorCQlDKGFkZHJlc3MpIHx8CisJCUModGFnKSB8fAorCQlDKHNlbmRiKSB8fAorCQlDKHJlY3ZiKSkKKwkJcmV0dXJuIEVSUl9QVFIoLUVGQVVMVCk7CisJcmV0dXJuIChjb25zdCBjaGFyIF9fdXNlciAqKXI7Cit9CisjdW5kZWYgQworCisjZGVmaW5lIFAoeCkgX19wdXRfdXNlcihyLT54LCAmY3ItPngpCisKK3N0YXRpYyBpbnQgCityYXcxMzk0X2NvbXBhdF9yZWFkKGNvbnN0IGNoYXIgX191c2VyICpidWYsIHN0cnVjdCByYXcxMzk0X3JlcXVlc3QgKnIpCit7CisJc3RydWN0IGNvbXBhdF9yYX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ZXcgbGVuZ3RoICovCiAJCQlicmVhazsKQEAgLTI2OCw3ICsyNjgsNyBAQAogLyogb2NjdXJyZWQuIEFkZGl0aW9uYWxseSB0aGUgcG9pbnRlciB0byB0aGUgYnVmZmVyIGRhdGEgYXJlYSBpcyBzZXQgb24gc3VjY2VzcyAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBpbnQKLXBvZl93cml0ZV9vcGVuKGh5c2RuX2NhcmQgKiBjYXJkLCB1Y2hhciAqKiBidWZwKQorcG9mX3dyaXRlX29wZW4oaHlzZG5fY2FyZCAqIGNhcmQsIHVuc2lnbmVkIGNoYXIgKipidWZwKQogewogCXN0cnVjdCBib290X2RhdGEgKmJvb3Q7CS8qIHBvaW50ZXIgdG8gYm9vdCBzcGVjaWZpYyBkYXRhICovCiAKQEAgLTMzNSw3ICszMzUsNyBAQAogLyogd2hlbiBQT0YgaGFzIGJlZW4gYm9vdGVkLiBBIHJldHVybiB2YWx1ZSBvZiAwIGlzIHVzZWQgaWYgbm8gZXJyb3Igb2NjdXJyZWQuICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogaW50Ci1FdmFsU3lzclRva0RhdGEoaHlzZG5fY2FyZCAqIGNhcmQsIHVjaGFyICogY3AsIGludCBsZW4pCitFdmFsU3lzclRva0RhdGEoaHlzZG5fY2FyZCAqY2FyZCwgdW5zaWduZWQgY2hhciAqY3AsIGludCBsZW4pCiB7CiAJdV9jaGFyICpwOwogCXVfY2hhciBjcmM7CmRpZmYgLS1naXQgYS9kcml2ZXJzL2lzZG4vaHlzZG4vaHlzZG5fZGVmcy5oIGIvZHJpdmVycy9pc2RuL2h5c2RuL2h5c2RuX2RlZnMuaAppbmRleCA0MzJmNmY5Li4zYTliMjliIDEwMDY0NAotLS0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KaW5kZXggNGZhM2IwMS4uMTMzMDMyOSAxMDA2NDQKLS0tIGEvZHJpdmVycy9pc2RuL2h5c2RuL2h5c2RuX3NjaGVkLmMKKysrIGIvZHJpdmVycy9pc2RuL2h5c2RuL2h5c2RuX3NjaGVkLmMKQEAgLTMwLDcgKzMwLDggQEAKIC8qIHRvIGtlZXAgdGhlIGRhdGEgdW50aWwgbGF0ZXIuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIGludAotaHlzZG5fc2NoZWRfcngoaHlzZG5fY2FyZCAqIGNhcmQsIHVjaGFyICogYnVmLCB3b3JkIGxlbiwgd29yZCBjaGFuKQoraHlzZG5fc2NoZWRfcngoaHlzZG5fY2FyZCAqY2FyZCwgdW5zaWduZWQgY2hhciAqYnVmLCB1bnNpZ25lZCBzaG9ydCBsZW4sCisJCQl1bnNpZ25lZCBzaG9ydCBjaGFuKQogewogCiAJc3dpdGNoIChjaGFuKSB7CkBAIC03Miw3ICs3Myw5IEBACiAvKiBzZW5kaW5nLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBpbnQKLWh5c2RuX3NjaGVkX3R4KGh5c2RuX2NhcmQgKiBjYXJkLCB1Y2hhciAqIGJ1Ziwgd29yZCB2b2xhdGlsZSAqbGVuLCB3b3JkIHZvbGF0aWxlICpjaGFuLCB3b3JkIG1heGxlbikKK2h5c2RuX3NjaGVkX3R4KGh5c2RuX2NhcmQgKmNhcmQsIHVuc2lnbmVkIGNoYXIgKmJ1ZiwKKwkJdW5zaWduZWQgc2hvcnQgdm9sYXRpbGUg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U5EX1RWTUlYRVIpICs9IHR2bWl4ZXIubwogCiBvYmotJChDT05GSUdfVklERU9fWlIzNjEyMCkgKz0gem9yYW4ubwpAQCAtNjgsNCArNjUsMjMgQEAKIG9iai0kKENPTkZJR19WSURFT19TQUE3MTFYKSArPSBzYWE3MTE1Lm8KIG9iai0kKENPTkZJR19WSURFT19TQUE3MTI3KSArPSBzYWE3MTI3Lm8KIAorZXQ2MXgyNTEtb2JqcyAgIDo9IGV0NjF4MjUxX2NvcmUubyBldDYxeDI1MV90YXM1MTMwZDFiLm8KK3pjMDMwMS1vYmpzICAgICA6PSB6YzAzMDFfY29yZS5vIHpjMDMwMV9wYXMyMDJiY2IubworCitvYmotJChDT05GSUdfVVNCX0RBQlVTQikgICAgICAgICs9IGRhYnVzYi5vCitvYmotJChDT05GSUdfVVNCX0RTQlIpICAgICAgICAgICs9IGRzYnIxMDAubworb2JqLSQoQ09ORklHX1VTQl9PVjUxMSkgICAgICAgICArPSBvdjUxMS5vCitvYmotJChDT05GSUdfVVNCX1NFNDAxKSAgICAgICAgICs9IHNlNDAxLm8KK29iai0kKENPTkZJR19VU0JfU1RWNjgwKSAgICAgICAgKz0gc3R2NjgwLm8KK29iai0kKENPTkZJR19VU0JfVzk5NjhDRikgICAgICAgKz0gdzk5NjhjZi5vCisKK29iai0kKENPTkZJR19VU0JfU045QzEwMikgICAgICAgKz0gc245YzEwMi8KK29iai0kKENPTkZJR19VU0JfRVQ2MVgyNTEpICAgICAgKz0gZXQ2MXgyNTEvCitvYmotJChDT05GSUdfVVNCX1BXQykgICAgICAgICAgICs9IHB3Yy8KK29iai0kKENPTkZJR19VU0JfWkMwMzAxKSAgICAgICAgKz0gemMwMzAxLworCitvYmotJChDT05GSUdfVVNCX0lCTUNBTSkgICAgICAgICs9IHVzYnZpZGVvLworb2JqLSQoQ09ORklHX1VTQl9LT05JQ0FXQykgICAgICArPSB1c2J2aWRlby8KK29iai0kKENPTkZJR19VU0JfVklDQU0pICAgICAgICAgKz0gd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gICAgIGNhbS0+cGFyYW1zLnZlcnNpb24udmNWZXJzaW9uLAorCQkgICAgICAgY2FtLT5wYXJhbXMudmVyc2lvbi52Y1JldmlzaW9uKTsKIAlvdXQgKz0gc3ByaW50ZihvdXQsICJDUElBIFBuUC1JRDogICAgICAgICAgICAgICUwNHg6JTA0eDolMDR4XG4iLAotCSAgICAgICAgICAgICAgIGNhbS0+cGFyYW1zLnBucElELnZlbmRvciwgY2FtLT5wYXJhbXMucG5wSUQucHJvZHVjdCwKLQkgICAgICAgICAgICAgICBjYW0tPnBhcmFtcy5wbnBJRC5kZXZpY2VSZXZpc2lvbik7CisJCSAgICAgICBjYW0tPnBhcmFtcy5wbnBJRC52ZW5kb3IsIGNhbS0+cGFyYW1zLnBucElELnByb2R1Y3QsCisJCSAgICAgICBjYW0tPnBhcmFtcy5wbnBJRC5kZXZpY2VSZXZpc2lvbik7CiAJb3V0ICs9IHNwcmludGYob3V0LCAiVlAtVmVyc2lvbjogICAgICAgICAgICAgICAlZC4lZCAlMDR4XG4iLAotCSAgICAgICAgICAgICAgIGNhbS0+cGFyYW1zLnZwVmVyc2lvbi52cFZlcnNpb24sCi0JICAgICAgICAgICAgICAgY2FtLT5wYXJhbXMudnBWZXJzaW9uLnZwUmV2aXNpb24sCi0JICAgICAgICAgICAgICAgY2FtLT5wYXJhbXMudnBWZXJzaW9uLmNhbWVyYUhlYWRJRCk7Ci0JCisJCSAgICAgICBjYW0tPnBhcmFtcy52cFZlcnNpb24udnBWZXJzaW9uLAorCQkgICAgICAgY2FtLT5wYXJhbXMudnBWZXJzaW9uLnZwUmV2aXNpb24sCisJCSAgICAgICBjYW0tPnBhcmFtcy52cFZlcnNpb24uY2FtZXJhSGVhZElEKTsKKwogCW91dCArPSBzcHJpbnRmKG91dCwgInN5c3RlbV9zdGF0ZTogICAgICAgICAgICAgJSMwNHhcbiIsCi0JICAgICAgICAgICAgICAgY2FtLT5wYXJhbXMuc3RhdHVzLnN5c3RlbVN0YXRlKTsKKwk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gICAgICAgICAgICUjMDR4XG4iLAotCSAgICAgICAgICAgICAgIGNhbS0+cGFyYW1zLnN0YXR1cy52cFN0YXR1cyk7CisJCSAgICAgICBjYW0tPnBhcmFtcy5zdGF0dXMudnBTdGF0dXMpOwogCW91dCArPSBzcHJpbnRmKG91dCwgImVycm9yX2NvZGU6ICAgICAgICAgICAgICAgJSMwNHhcbiIsCi0JICAgICAgICAgICAgICAgY2FtLT5wYXJhbXMuc3RhdHVzLmVycm9yQ29kZSk7CisJCSAgICAgICBjYW0tPnBhcmFtcy5zdGF0dXMuZXJyb3JDb2RlKTsKIAkvKiBRWDMgc3BlY2lmaWMgZW50cmllcyAqLwogCWlmIChjYW0tPnBhcmFtcy5xeDMucXgzX2RldGVjdGVkKSB7CiAJCW91dCArPSBzcHJpbnRmKG91dCwgImJ1dHRvbjogICAgICAgICAgICAgICAgICAgJTRkXG4iLAotCQkgICAgICAgICAgICAgICBjYW0tPnBhcmFtcy5xeDMuYnV0dG9uKTsKKwkJCSAgICAgICBjYW0tPnBhcmFtcy5xeDMuYnV0dG9uKTsKIAkJb3V0ICs9IHNwcmludGYob3V0LCAiY3JhZGxlZDogICAgICAgICAgICAgICAgICAlNGRcbiIsCi0JCSAgICAgICAgICAgICAgIGNhbS0+cGFyYW1zLnF4My5jcmFkbGVkKTsKKwkJCSAgICAgICBjYW0tPnBhcmFtcy5xeDMuY3JhZGxlZCk7CiAJfQogCW91dCArPSBzcHJpbnRmKG91dCwgInZpZGVvX3NpemU6ICAgICAgICAgICAgICAgJXNcbiIsCi0JICAgICAgICAgICAgICAgY2FtLT5wYXJhbXMuZm9ybWF0LnZpZGVvU2l6ZSA9PSBWSURFT1NJWkVfQ0lGID8KKwkJICAgICAgIGNhbS0+cGFyYW1zLmZvcm1hdC52aWRlb1NpemUgPT0gVklERU9TSVpFX0NJRiA/CiAJCSAgICAgICAiQ0lGICIgOiAiUUNJRiIpOwogCW91dCArPSBzcHJpbnRmKG91dCwgInJvaTogICAgICAgICAgIC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ZPcmRlciA9PSBZVVZPUkRFUl9ZVVlWID8KKwkJICAgICAgIGNhbS0+cGFyYW1zLmZvcm1hdC55dXZPcmRlciA9PSBZVVZPUkRFUl9ZVVlWID8KIAkJICAgICAgICJZVVlWIiA6ICJVWVZZIiwgIllVWVYiICwgIlVZVlkiLCAiWVVZViIpOwogCW91dCArPSBzcHJpbnRmKG91dCwgImVjcF90aW1pbmc6ICAgICAgICAgICAgICU4cyAgJThzICAlOHMgICU4c1xuIiwKLQkgICAgICAgICAgICAgICBjYW0tPnBhcmFtcy5lY3BUaW1pbmcgPyAic2xvdyIgOiAibm9ybWFsIiwgInNsb3ciLAorCQkgICAgICAgY2FtLT5wYXJhbXMuZWNwVGltaW5nID8gInNsb3ciIDogIm5vcm1hbCIsICJzbG93IiwKIAkJICAgICAgICJub3JtYWwiLCAibm9ybWFsIik7CiAKIAlpZiAoY2FtLT5wYXJhbXMuY29sb3VyQmFsYW5jZS5iYWxhbmNlTW9kZSA9PSAyKSB7CkBAIC0zNjYsMTEgKzM2NiwxMSBAQAogCW91dCArPSBzcHJpbnRmKG91dCwgImNvbG9yX2JhbGFuY2VfbW9kZTogICAgICU4cyAgJThzICAlOHMiCiAJCSAgICAgICAiICAlOHNcbiIsICB0bXBzdHIsICJtYW51YWwiLCAiYXV0byIsICJhdXRvIik7CiAJb3V0ICs9IHNwcmludGYob3V0LCAicmVkX2dhaW46ICAgICAgICAgICAgICAgJThkICAlOGQgICU4ZCAgJThkXG4iLAotCSAgICAgICAgICAgICAgIGNhbS0+cGFyYW1zLmNvbG91ckJhbGFuY2UucmVkR2FpbiwgMCwgMjEyLCAzMik7CisJCSAgICAgICBjYW0tPnBhcmFtcy5jb2xvdXJCYWxhbmNlLnJlZEdhaW4sIDAsIDIxMiwgMzIpOwogCW91dCArPSBzcHJpbnRmKG91dCwgImdyZWVuX2dhaW46ICAgICAgICAgICAgICU4ZCAgJThkICAlOGQgICU4ZFxuIiwKLQkgICAgICAgICAgICAgICBjYW0tPnBh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B4MDIpID09IDApOwogCQkJaWYgKGNhbS0+cGFyYW1zLnF4My5idXR0b24pIHsKIAkJCQkvKiBidXR0b24gcHJlc3NlZCAtIHVubG9jayB0aGUgbGF0Y2ggKi8KQEAgLTE3NzAsOSArMTc3MCw5IEBACiAKIC8qIHNlbmQgYSBjb21tYW5kICB0byB0aGUgY2FtZXJhIHdpdGggYW4gYWRkaXRpb25hbCBkYXRhIHRyYW5zYWN0aW9uICovCiBzdGF0aWMgaW50IGRvX2NvbW1hbmRfZXh0ZW5kZWQoc3RydWN0IGNhbV9kYXRhICpjYW0sIHUxNiBjb21tYW5kLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4IGEsIHU4IGIsIHU4IGMsIHU4IGQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTggZSwgdTggZiwgdTggZywgdTggaCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCBpLCB1OCBqLCB1OCBrLCB1OCBsKQorCQkJICAgICAgIHU4IGEsIHU4IGIsIHU4IGMsIHU4IGQsCisJCQkgICAgICAgdTggZSwgdTggZiwgdTggZywgdTggaCwKKwkJCSAgICAgICB1OCBpLCB1OCBqLCB1OCBrLCB1OCBsKQogewogCWludCByZXR2YWw7CiAJdTggY21kWzhdLCBkYXRhWzhdOwpAQCAtMTgwOSwxMCArMTgwOSwxMCBAQAogI2RlZmluZSBMSU1JVCh4KSAoKCgoeCk+MHhmZmZmZmYpPzB4ZmYwMDAwOigoKHgpPD0weGZmZmYpPzA6KHgpJjB4ZmYwMDAwKSk+PjE2KQogCiBzdGF0aWMgaW50IGNvbnZlcnQ0MjAodW5zaWduZWQgY2hhciAqeXV2LCB1bnNpZ25lZCBjaGFyICpyZ2IsIGludCBvdXRfZm10LAotICAgICAgICAgICAgICAgICAgICAgIGludCBsaW5lc2l6ZSwgaW50IG1tYXBfa2x1ZGdlKQorCQkgICAgICBpbnQgbGluZXNpemUsIGludCBtbWFwX2tsdWRnZSkKIHs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AjCWRlZmluZSBLREJHKGxldmVsLCBmbXQsIGFyZ3MuLi4pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0yMDksNyArMjA5LDcgQEAKIAkJCXByX2luZm8oImV0NjF4MjUxOiAiIGZtdCAiXG4iLCAjIyBhcmdzKTsgICAgICAgICAgICAgIFwKIAkJZWxzZSBpZiAoKGxldmVsKSA9PSAzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQlwcl9kZWJ1ZygiZXQ2MXgyNTE6IFslczolZF0gIiBmbXQgIlxuIiwgX19GVU5DVElPTl9fLCBcCi0JCQkgICAgICAgICBfX0xJTkVfXyAsICMjIGFyZ3MpOyAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJIF9fTElORV9fICwgIyMgYXJncyk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogfSB3aGlsZSAoMCkKICMJZGVmaW5lIFY0TERCRyhsZXZlbCwgbmFtZSwgY21kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTIyNiw3ICsyMjYsNyBAQAogI3VuZGVmIFBEQkcKICNkZWZpbmUgUERCRyhmbXQsIGFyZ3MuLi4pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIGRldl9pbmZvKCZjYW0tPnVzYmRldi0+ZGV2LCAiWyVzOiVkXSAiIGZtdCAiXG4iLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgIF9fRlVOQ1RJT05fXywgX19MSU5FX18gLCAjIyBhcmdzKQorCSBfX0ZVTkNUSU9OX18sIF9fTElORV9fICwgIyMgYXJncykKIAogI3VuZGVmIFBEQkdHCiAjZGVmaW5lIFBEQkdHKGZtdCwgYXJncy4uLik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Ni1jdHJsLT52YWx1ZSwgMCwgMCwgMCwKKwkJCQkJICAgICAgMCwgMCwgMCwgMCk7CiAJCWJyZWFrOwogCWNhc2UgVjRMMl9DSURfRVhQT1NVUkU6CiAJCWVyciArPSBldDYxeDI1MV9pMmNfcmF3X3dyaXRlKGNhbSwgMiwgMHg0MCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0Ny1jdHJsLT52YWx1ZSwgMCwgMCwgMCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMCwgMCwgMCk7CisJCQkJCSAgICAgIDB4NDctY3RybC0+dmFsdWUsIDAsIDAsIDAsCisJCQkJCSAgICAgIDAsIDAsIDAsIDApOwogCQlicmVhazsKIAlkZWZhdWx0OgogCQlyZXR1cm4gLUVJTlZBTDsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vZm9udC5oIGIvZHJpdmVycy9tZWRpYS92aWRlby9mb250LmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOGIxZmVjYwotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vZm9udC5oCkBAIC0wLDAgKzEsNDA3IEBACitzdGF0aWMgdW5zaWduZWQgY2hhciByb204eDE2X2JpdHNbXSA9IHsKKy8qIENoYXJhY3RlciAwICgweDMwKToKKyAgIGh0PTE2LCB3aWR0aD04CisgICArLS0tLS0tLS0rCisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICoqKioqICB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICoqKiB8CisgICB8KiogKioqKiB8CisgICB8KioqKiAqKiB8CisgICB8KioqICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8ICoqKioqICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICArLS0tLS0tLS0rICovCisweDAwLAorMHgwMCwKKzB4N2MsCisweGM2LAorMHhjNiwKKzB4Y2UsCisweGRlLAorMHhmNiwKKzB4ZTYsCisweGM2LAorMHhjNiwKKzB4N2MsCisweDAwLAorMHgwMCwKKzB4MDAsCisweDAwLAorCisvKiBDaGFyYWN0ZXIgMSAoMHgzMSk6CisgICBodD0xNiwgd2lkdGg9OAorICAgKy0tLS0tLS0tKworICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICoqICAgfAorICAgfCAqKioqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAgICoqICAgfAorICAgfCAqKioqKiogfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgKy0tLS0tLS0tKyAqLworMHgwMCwKKzB4MDAsCisweDE4LAorMHg3OCwKKzB4MTgsCisweDE4LAorMHgxOCwKKzB4MTgsCisweDE4LAorMHgxOCwKKzB4MTgsCisweDdlLAorMHgwMCwKKzB4MDAsCisweDAwLAorMHgwMCwKKworLyogQ2hhcmFjdGVyIDIgKDB4MzIpOgorICAgaHQ9MTYsIHdpZHRoPTgKKyAgICstLS0tLS0tLSsKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgKioqKiogIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwgICAgICoqIHwKKyAgIHwgICAgKiogIHwKKyAgIHwgICAqKiAgIHwKKyAgIHwgICoqICAgIHwKKyAgIHwgKiogICAgIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKioqKioqIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgICstLS0tLS0tLSsgKi8KKzB4MDAsCisweDAwLAorMHg3YywKKzB4YzYsCisweGM2LAorMHgwNiwKKzB4MGMsCisweDE4LAorMHgzMCwKKzB4NjAsCisweGM2LAorMHhmZSwKKzB4MDAsCisweDAwLAorMHgwMCwKKzB4MDAsCisKKy8qIENoYXJhY3RlciAzICgweDMzKToKKyAgIGh0PTE2LCB3aWR0aD04CisgICArLS0tLS0tLS0rCisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICoqKioqICB8CisgICB8KiogICAqKiB8CisgICB8ICAgICAqKiB8CisgICB8ICAgICAqKiB8CisgICB8ICAqKioqICB8CisgICB8ICAgICAqKiB8CisgICB8ICAgICAqKiB8CisgICB8ICAgICAqKiB8CisgICB8KiogICAqKiB8CisgICB8ICoqKioqICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICArLS0tLS0tLS0rICovCisweDAwLAorMHgwMCwKKzB4N2MsCisweGM2LAorMHgwNiwKKzB4MDYsCisweDNjLAorMHgwNiwKKzB4MDYsCisweDA2LAorMHhjNiwKKzB4N2MsCisweDAwLAorMHgwMCwKKzB4MDAsCisweDAwLAorCisvKiBDaGFyYWN0ZXIgNCAoMHgzNCk6CisgICBodD0xNiwgd2lkdGg9OAorICAgKy0tLS0tLS0tKworICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAqKiAgfAorICAgfCAgICoqKiAgfAorICAgfCAgKioqKiAgfAorICAgfCAqKiAqKiAgfAorICAgfCoqICAqKiAgfAorICAgfCoqICAqKiAgfAorICAgfCoqKioqKiogfAorICAgfCAgICAqKiAgfAorICAgfCAgICAqKiAgfAorICAgfCAgICoqKiogfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgKy0tLS0tLS0tKyAqLworMHgwMCwKKzB4MDAsCisweDBjLAorMHgxYywKKzB4M2MsCisweDZjLAorMHhjYywKKzB4Y2MsCisweGZlLAorMHgwYywKKzB4MGMsCisweDFlLAorMHgwMCwKKzB4MDAsCisweDAwLAorMHgwMCwKKworLyogQ2hhcmFjdGVyIDUgKDB4MzUpOgorICAgaHQ9MTYsIHdpZHRoPTgKKyAgICstLS0tLS0tLSsKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwqKioqKioqIHwKKyAgIHwqKiAgICAgIHwKKyAgIHwqKiAgICAgIHwKKyAgIHwqKiAgICAgIHwKKyAgIHwqKioqKiogIHwKKyAgIHwgICAgICoqIHwKKyAgIHwgICAgICoqIHwKKyAgIHwgICAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwgKioqKiogIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgICstLS0tLS0tLSsgKi8KKzB4MDAsCisweDAwLAorMHhmZSwKKzB4YzAsCisweGMwLAorMHhjMCwKKzB4ZmMsCisweDA2LAorMHgwNiwKKzB4MDYsCisweGM2LAorMHg3YywKKzB4MDAsCisweDAwLAorMHgwMCwKKzB4MDAsCisKKy8qIENoYXJhY3RlciA2ICgweDM2KToKKyAgIGh0PTE2LCB3aWR0aD04CisgICArLS0tLS0tLS0rCisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICoqKioqICB8CisgICB8KiogICAqKiB8CisgICB8KiogICAgICB8CisgICB8KiogICAgICB8CisgICB8KioqKioqICB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8ICoqKioqICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICArLS0tLS0tLS0rICovCisweDAwLAorMHgwMCwKKzB4N2MsCisweGM2LAorMHhjMCwKKzB4YzAsCisweGZjLAorMHhjNiwKKzB4YzYsCisweGM2LAorMHhjNiwKKzB4N2MsCisweDAwLAorMHgwMCwKKzB4MDAsCisweDAwLAorCisvKiBDaGFyYWN0ZXIgNyAoMHgzNyk6CisgICBodD0xNiwgd2lkdGg9OAorICAgKy0tLS0tLS0tKworICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCoqKioqKiogfAorICAgfCoqICAgKiogfAorICAgfCAgICAgKiogfAorICAgfCAgICAqKiAgfAorICAgfCAgICoqICAgfAorICAgfCAgKiogICAgfAorICAgfCAgKiogICAgfAorICAgfCAgKiogICAgfAorICAgfCAgKiogICAgfAorICAgfCAgKiogICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgfCAgICAgICAgfAorICAgKy0tLS0tLS0tKyAqLworMHgwMCwKKzB4MDAsCisweGZlLAorMHhjNiwKKzB4MDYsCisweDBjLAorMHgxOCwKKzB4MzAsCisweDMwLAorMHgzMCwKKzB4MzAsCisweDMwLAorMHgwMCwKKzB4MDAsCisweDAwLAorMHgwMCwKKworLyogQ2hhcmFjdGVyIDggKDB4MzgpOgorICAgaHQ9MTYsIHdpZHRoPTgKKyAgICstLS0tLS0tLSsKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgKioqKiogIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwgKioqKiogIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwqKiAgICoqIHwKKyAgIHwgKioqKiogIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgICstLS0tLS0tLSsgKi8KKzB4MDAsCisweDAwLAorMHg3YywKKzB4YzYsCisweGM2LAorMHhjNiwKKzB4N2MsCisweGM2LAorMHhjNiwKKzB4YzYsCisweGM2LAorMHg3YywKKzB4MDAsCisweDAwLAorMHgwMCwKKzB4MDAsCisKKy8qIENoYXJhY3RlciA5ICgweDM5KToKKyAgIGh0PTE2LCB3aWR0aD04CisgICArLS0tLS0tLS0rCisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICoqKioqICB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8KiogICAqKiB8CisgICB8ICoqKioqKiB8CisgICB8ICAgICAqKiB8CisgICB8ICAgICAqKiB8CisgICB8KiogICAqKiB8CisgICB8ICoqKioqICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICB8ICAgICAgICB8CisgICArLS0tLS0tLS0rICovCisweDAwLAorMHgwMCwKKzB4N2MsCisweGM2LAorMHhjNiwKKzB4YzYsCisweGM2LAorMHg3ZSwKKzB4MDYsCisweDA2LAorMHhjNiwKKzB4N2MsCisweDAwLAorMHgwMCwKKzB4MDAsCisweDAwLAorLyogQ2hhcmFjdGVyIDogKDB4M2EpOgorICAgaHQ9MTYsIHdpZHRoPTgKKyAgICstLS0tLS0tLSsKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgKiogIHwKKyAgIHwgICAgKiogIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgKiogIHwKKyAgIHwgICAgKiogIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgIHwgICAgICAgIHwKKyAgICstLS0tLS0tLSsgKi8KKzB4MDAsCisweDAwLAorMHgwMCwKKzB4MDAsCisweDAwLAorMHgwYywKKzB4MGMsCisweDAwLAorMHgwMCwKKzB4MGMsCisweDBjLAorMHgwMCwKKzB4MDAsCisweDAwLAorMHgwMCw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PQ0dDQVA6CiAJCXsKIAkJCXN0cnVjdCB2aWRlb19jYXBhYmlsaXR5IGI7CkBAIC0xNDQwLDI2ICsxNDQwLDI2IEBACiAJCQliLmNoYW5uZWxzID0gMjsJLyogY29tcG9zaXRlICYgc3ZocyAqLwogCQkJYi5hdWRpb3MgPSAwOwogCQkJYi5tYXh3aWR0aCA9IFBMQU5CX01BWFBJWEVMUzsKLSAgICAgICAgICAgICAgICAgICAgICAgIGIubWF4aGVpZ2h0ID0gUExBTkJfTUFYTElORVM7Ci0gICAgICAgICAgICAgICAgICAgICAgICBiLm1pbndpZHRoID0gMzI7IC8qIHdpbGQgZ3Vlc3MgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGIubWluaGVpZ2h0ID0gMzI7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKGFyZywmYixzaXplb2YoYikpKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKKwkJCWIubWF4aGVpZ2h0ID0gUExBTkJfTUFYTElORVM7CisJCQliLm1pbndpZHRoID0gMzI7IC8qIHdpbGQgZ3Vlc3MgKi8KKwkJCWIubWluaGVpZ2h0ID0gMzI7CisJCQlpZiAoY29weV90b191c2VyKGFyZywmYixzaXplb2YoYikpKQorCQkJCXJldHVybiAtRUZBVUxUOwogCQkJcmV0dXJuIDA7CiAJCX0KIAkJY2FzZSBWSURJT0NTRkJVRjoKIAkJewotICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHZpZGVvX2J1ZmZlciB2OworCQkJc3RydWN0IHZpZGVvX2J1ZmZlciB2OwogCQkJdW5zaWduZWQgc2hvcnQgYnBwOwogCQkJdW5zaWduZWQgaW50IGZtdDsKIAogCQkJREVCVUcoIlBsYW5COiBJT0NUTCBWSURJT0NTRkJVRlxuIik7CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2FwYWJsZShDQVBfU1lTX0FETUlOKQorCQkJaWYgKCF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CAoKyAlZClcbiIsIHYuYmFzZSwgdi53aWR0aCx2LmhlaWdodCwKIAkJCQlwYi0+d2luLmJwcCwgcGItPndpbi5icGwsIHBiLT53aW4ucGFkKTsKIApAQCAtMTUwNCwxMSArMTUwNCwxMSBAQAogCQkJCXJlc3VtZV9vdmVybGF5KHBiKTsKIAkJCX0KIAkJCXBsYW5iX3VubG9jayhwYik7Ci0JCQlyZXR1cm4gMDsJCQorCQkJcmV0dXJuIDA7CiAJCX0KIAkJY2FzZSBWSURJT0NHRkJVRjoKIAkJewotICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHZpZGVvX2J1ZmZlciB2OworCQkJc3RydWN0IHZpZGVvX2J1ZmZlciB2OwogCiAJCQlERUJVRygiUGxhbkI6IElPQ1RMIFZJRElPQ0dGQlVGXG4iKTsKIApAQCAtMTUxOCwxNSArMTUxOCwxNSBAQAogCQkJdi5kZXB0aCA9IHBiLT53aW4uZGVwdGg7CiAJCQl2LmJ5dGVzcGVybGluZSA9IHBiLT53aW4uYnBsICsgcGItPndpbi5wYWQ7CiAJCQlpZiAoY29weV90b191c2VyKGFyZywgJnYsIHNpemVvZih2KSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZBVUxUOworCQkJCXJldHVybiAtRUZBVUxUOwogCQkJcmV0dXJuIDA7CiAJCX0KIAkJY2FzZSBWSURJT0NDQVBUVVJFOgogCQl7CiAJCQlpbnQgaTsKIAotICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29weV9mcm9tX3VzZXIoJmksIGFyZywgc2l6ZW9mKGkpKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FRkFVTFQ7CisJCQlpZihjb3B5X2Zyb21fdXNlcigmaSwgYXJnLCBzaXplb2YoaSkpKQorCQkJCXJldHVybiAtRUZBVUxUOwogCQkJaWYoaT09MCkgewogCQkJCURFQlVHKCJQbGFuQjogSU9DVEwgVklESU9DQ0FQVFVS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KHNlZSBiZWxvdykuCisJCQkgICAgICAgL2Rldi92aWRlbzMsIHRoZSBzZWNvbmQgL2Rldi92aWRlbzUuIEFueQorCQkJICAgICAgIG90aGVyIGNhbWVyYXMgd2lsbCBnZXQgdGhlIGZpcnN0IGZyZWUKKwkJCSAgICAgICBhdmFpbGFibGUgc2xvdCAoc2VlIGJlbG93KS4KIAogICAgICBkZXZfaGludD02NDU6MSw2ODA6MiAgICAgIFRoZSBQQ0E2NDUgY2FtZXJhIHdpbGwgZ2V0IC9kZXYvdmlkZW8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCBhIFBDVkM2ODAgL2Rldi92aWRlbzIuCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi0gICAgIGRldl9oaW50PTY0NS4wMTIzOjMsNjQ1LjQ1Njc6MAlUaGUgUENBNjQ1IGNhbWVyYSB3aXRoIHNlcmlhbG51bWJlciAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMTIzIGdvZXMgdG8gL2Rldi92aWRlbzMsIHRoZSBzYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FtZXJhIG1vZGVsIHdpdGggdGhlIDQ1Njcgc2VyaWFsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0cyAvZGV2L3ZpZGVvMC4KKwkJCSAgICAgICBhbmQgYSBQQ1ZDNjgwIC9kZXYvdmlkZW8yLgogCi0gICAgIGRldl9oaW50PTc1MDoxLDQsNSw2ICAgICAgIFRoZSBQQ1ZDNzUwIGNhbWVyYSB3aWxsIGdldCAvZGV2L3ZpZGVvMSwgdGhlIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0IDMgUGhpbGlwcyBjYW1zIHdpbGwgdXNlIC9kZXYvdmlkZW80IAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdWdoIC9kZXYvdmlkZW82LgorIC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fX3VzZXIgKiBidWYsCkBAIC0xMTcxLDcgKzExNzEsNyBAQAogCXN0cnVjdCBwd2NfZGV2aWNlICpwZGV2OwogCWludCBub2Jsb2NrID0gZmlsZS0+Zl9mbGFncyAmIE9fTk9OQkxPQ0s7CiAJREVDTEFSRV9XQUlUUVVFVUUod2FpdCwgY3VycmVudCk7Ci0gICAgICAgIGludCBieXRlc190b19yZWFkOworCWludCBieXRlc190b19yZWFkOwogCiAJVHJhY2UoVFJBQ0VfUkVBRCwgInZpZGVvX3JlYWQoMHglcCwgJXAsICV6dSkgY2FsbGVkLlxuIiwgdmRldiwgYnVmLCBjb3VudCk7CiAJaWYgKHZkZXYgPT0gTlVMTCkKQEAgLTExOTMsMjIgKzExOTMsMjIgQEAKIAkJCQlzZXRfY3VycmVudF9zdGF0ZShUQVNLX1JVTk5JTkcpOwogCQkJCXJldHVybiAtcGRldi0+ZXJyb3Jfc3RhdHVzIDsKIAkJCX0KLQkgICAgICAgICAgICAgICAgaWYgKG5vYmxvY2spIHsKLQkgICAgICAgICAgICAgICAgCXJlbW92ZV93YWl0X3F1ZXVlKCZwZGV2LT5mcmFtZXEsICZ3YWl0KTsKLQkgICAgICAgICAgICAgICAgCXNldF9jdXJyZW50X3N0YXRlKFRBU0tfUlVOTklORyk7Ci0JICAgICAgICAgICAgICAgIAlyZXR1cm4gLUVXT1VMREJMT0NLOwotCSAgICAgICAgICAgICAgICB9Ci0JICAgICAgICAgICAgICAgIGlmIChzaWduYWxfcGVuZGluZyhjdXJyZW50KSkgewotCSAgICAgICAgICAgICAgICAJcmVtb3ZlX3dhaXRfcXVldWUoJnBkZXYtPmZyYW1lcSwgJndhaXQpOwotCSAgICAgICAgICAgICAgICAJc2V0X2N1cnJlbnRfc3RhdGUoVEFTS19SVU5OSU5HKTsKLQkgICAgICAgICAgICAgICAgCXJldHVybiAtRVJFU1RBUlRTWVM7Ci0JICAgICAgICAgICAgICAgIH0KLQkgICAgICAgICAgICAgICAgc2NoZWR1bGUoKTsKLQkgICAgICAgICAgICAgICAJc2V0X2N1cnJlbnRfc3RhdGUoVEFTS19JTlRFUlJVUFRJQkxFKTsKKwkJCWlmIChub2Jsb2NrKSB7CisJCQkJcmVtb3ZlX3dhaXRfcXVldWUoJnBkZXYtPmZyYW1lcSwgJndhaXQpOworCQkJCXNldF9jdXJyZW50X3N0YXRlKFRBU0tfUlVOTklORyk7CisJCQkJcmV0dXJuIC1FV09VTERCTE9DSzsKKwkJCX0KKwkJCWlmIChzaWduYWxfcGVuZGluZyhjdXJyZW50KSkgeworCQkJCXJlbW92ZV93YWl0X3F1ZXVlKCZwZGV2LT5mcmFtZXEsICZ3YWl0KTsKKwkJCQlzZXRfY3VycmVudF9zdGF0ZShUQVNLX1JVTk5JTkcpOworCQkJCXJldHVybiAtRVJFU1RBUlRTWVM7CisJCQl9CisJCQlzY2hlZHVsZSgpOworCQkJc2V0X2N1cnJlbnRfc3RhdGUoVEFTS19JTlRFUlJVUFRJQkxFKTsKIAkJfQogCQlyZW1vdmVfd2FpdF9xdWV1ZSgmcGRldi0+ZnJhbWVxLCAmd2FpdCk7CiAJCXNldF9jdXJyZW50X3N0YXRlKFRBU0tfUlVOTklORyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCiAJCS8qIERlY29tcHJlc3MgYW5kIHJlbGVhc2UgZnJhbWUgKi8KIAkJaWYgKHB3Y19oYW5kbGVfZnJhbWUocGRldikpCiAJCQlyZXR1cm4gLUVGQVVMVDsKQEAgLTEyMTgsNyArMTIxOCw3IEBACiAJaWYgKHBkZXYtPnZwYWxldHRlID09IFZJREVPX1BBTEVUVEVfUkFXKQogCQlieXRlc190b19yZWFkID0gcGRldi0+ZnJhbWVf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0aGUgZGVjb21wcmVzc29yIGlzIGFic2VudCkuIFNvbWV0aW1lcyB0aGVyZSBhcmUgb25seQorICAgMSBvciAyIGNvbXByZXNzZWQgbW9kZXMgYXZhaWxhYmxlOyBpbiB0aGF0IGNhc2UgZW50cmllcyBhcmUgZHVwbGljYXRlZC4KKyovCisKKworI2luY2x1ZGUgInB3Yy1raWFyYS5oIgorI2luY2x1ZGUgInB3Yy11bmNvbXByZXNzLmgiCisKK2NvbnN0IHN0cnVjdCBLaWFyYV90YWJsZV9lbnRyeSBLaWFyYV90YWJsZVtQU1pfTUFYXVs2XVs0XSA9Cit7CisgICAvKiBTUUNJRiAqLworICAgeworICAgICAgLyogNSBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMTAgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDE1IGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICAgICAvKiAyMCBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMjUgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDMwIGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICB9LAorICAgLyogUVNJRiAqLworICAgeworICAgICAgLyogNSBmcHMgKi8KKyAgICAgIHsKKwkgezEsIDE0NiwgICAgMCwgezB4MUQsIDB4RjQsIDB4MzAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDA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AgIH0sCisgICB9LAorICAgLyogUUNJRiAqLworICAgeworICAgICAgLyogNSBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMTAgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDE1IGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICAgICAvKiAyMCBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMjUgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDMwIGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICB9LAorICAgLyogU0lGICovCisgICB7CisgICAgICAvKiA1IGZwcyAqLworICAgICAgeworCSB7NCwgNTgyLCAgICAwLCB7MHgwRCwgMHhGNCwgMHgzMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwNCwgMHgwMCwgMHg0NiwgMHgwMiwgMHg4MH19LAorCSB7MywgMzg3LCAxMjc2LCB7MHgwNSwgMHhGNCwgMHgzMCwgMHgyNywgMHhEOCwgMHgyNiwgMHg0OCwgMHgwMywgMHgxMCwgMHg4MywgMHgwMSwgMHg4MH19LAorCSB7MiwgMjkxLCAgOTYwLCB7MHgwNSwgMHhGNCwgMHgzMCwgMHgxRCwgMHhGMiwgMHgxQywgMHg2MiwgMHgwNCwgMHgxMCwgMHgyMywgMHgwMSwgMHg4MH19LAorCSB7MSwgMTkxLCAgNjMwLCB7MHg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CAweDg4LCAweDBBLCAweDFDLCAweDA4LCAweEI0LCAweDBFLCAweDUwLCAweDRFLCAweDAyLCAweDgwfX0sCisgICAgICB9LAorICAgfSwKKyAgIC8qIENJRiAqLworICAgeworICAgICAgLyogNSBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMTAgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDE1IGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICAgICAvKiAyMCBmcHMgKi8KKyAgICAgIHsKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisgICAgICB9LAorICAgICAgLyogMjUgZnBzICovCisgICAgICB7CisJIHswLCB9LAorCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorICAgICAgfSwKKyAgICAgIC8qIDMwIGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezAsIH0sCisJIHswLCB9LAorCSB7MCwgfSwKKyAgICAgIH0sCisgICB9LAorICAgLyogVkdBICovCisgICB7CisgICAgICAvKiA1IGZwcyAqLworICAgICAgeworCSB7MCwgfSwKKwkgezYsIDc3MywgMTI3MiwgezB4MjUsIDB4RjQsIDB4MzAsIDB4MjcsIDB4QjYsIDB4MjQsIDB4OTYsIDB4MDIsIDB4MzAsIDB4MDUsIDB4MDMsIDB4ODB9fSwKKwkgezQsIDU5MiwgIDk3NiwgezB4MjUsIDB4RjQsIDB4NTAsIDB4MUUsIDB4NzgsIDB4MUIsIDB4NTgsIDB4MDMsIDB4MzAsIDB4NTAsIDB4MDIsIDB4ODB9fSwKKwkgezMsIDQ0OCwgIDczOCwgezB4MjUsIDB4RjQsIDB4OTAsIDB4MTc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m4gcmV0OwkKKwkJcmV0dXJuIHJldDsKIAlpZiAoY29weV90b191c2VyKGJ1Ziwgc2U0MDEtPmZyYW1lWzBdLmRhdGEsIHJlYWxjb3VudCkpCiAJCXJldHVybiAtRUZBVUxUOwogCkBAIC0xMTgzLDI0ICsxMTgzLDI0IEBACiAJfQogCW11dGV4X3VubG9jaygmc2U0MDEtPmxvY2spOwogCi0gICAgICAgIHJldHVybiAwOworCXJldHVybiAwOwogfQogCiBzdGF0aWMgc3RydWN0IGZpbGVfb3BlcmF0aW9ucyBzZTQwMV9mb3BzID0gewogCS5vd25lciA9CVRISVNfTU9EVUxFLAotICAgICAgICAub3BlbiA9ICAgICAgICAgc2U0MDFfb3BlbiwKLSAgICAgICAgLnJlbGVhc2UgPSAgICAgIHNlNDAxX2Nsb3NlLAotICAgICAgICAucmVhZCA9ICAgICAgICAgc2U0MDFfcmVhZCwKLSAgICAgICAgLm1tYXAgPSAgICAgICAgIHNlNDAxX21tYXAsCisJLm9wZW4gPSAgICAgICAgIHNlNDAxX29wZW4sCisJLnJlbGVhc2UgPSAgICAgIHNlNDAxX2Nsb3NlLAorCS5yZWFkID0gICAgICAgICBzZTQwMV9yZWFkLAorCS5tbWFwID0gICAgICAgICBzZTQwMV9tbWFwLAogCS5pb2N0bCA9ICAgICAgICBzZTQwMV9pb2N0bCwKIAkuY29tcGF0X2lvY3RsID0gdjRsX2NvbXBhdF9pb2N0bDMyLAogCS5sbHNlZWsgPSAgICAgICBub19sbHNlZWssCiB9Owogc3RhdGljIHN0cnVjdCB2aWRlb19kZXZpY2Ugc2U0MDFfdGVtcGxhdGUgPSB7CiAJLm93bmVyID0JVEhJU19NT0RVTEUsCi0gICAgICAgIC5uYW1lID0gICAgICAgICAic2U0MDEgVVNCIGNhbWVyYSIsCi0gICAgICAgIC50eXBlID0gICAgICAgICBWSURfVFlQRV9DQVBUVVJFLAotICAgICAgICAuaGFyZHdhcmUgPSAgICAgVklEX0hBUkRXQVJFX1NFNDAxLAorCS5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gICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCWRldl9pbmZvKCZjYW0tPnVzYmRldi0+ZGV2LCAiWyVzOiVkXSAiIGZtdCAiXG4iLCAgICAgIFwKLQkJCSAgICAgICAgIF9fRlVOQ1RJT05fXywgX19MSU5FX18gLCAjIyBhcmdzKTsgICAgICAgICAgIFwKKwkJCQkgX19GVU5DVElPTl9fLCBfX0xJTkVfXyAsICMjIGFyZ3MpOyAgICAgICAgICAgXAogCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9IHdoaWxlICgwKQogIwlkZWZpbmUgVjRMREJHKGxldmVsLCBuYW1lLCBjbWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMTk4LDcgKzE5OCw3IEBACiAJCQlwcl9pbmZvKCJzbjljMTAyOiAiIGZtdCAiXG4iLCAjIyBhcmdzKTsgICAgICAgICAgICAgICBcCiAJCWVsc2UgaWYgKChsZXZlbCkgPT0gMykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJcHJfZGVidWcoInNuOWMxMDI6IFslczolZF0gIiBmbXQgIlxuIiwgX19GVU5DVElPTl9fLCAgXAotCQkJICAgICAgICAgX19MSU5FX18gLCAjIyBhcmdzKTsgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCSBfX0xJTkVfXyAsICMjIGFyZ3MpOyAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIH0gd2hpbGUgKDApCiAjZWxzZQpAQCAtMjEwLDcgKzIxMCw3IEBACiAjdW5kZWYgUERCRwogI2RlZmluZSBQREJHKGZtdCwgYXJncy4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogZ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dWwgZm9yIHRlc3Rpbmcgb25seSwgd2hlbiBvbmx5ICIKLSAgICAgICAgICAgICAgICAgIm9uZSBkZXZpY2UgaXMgdXNlZC4iCi0gICAgICAgICAgICAgICAgICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhTTjlDMTAyX0RFQlVHX0xFVkVMKSIuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKKwkJICJcbjxuPiBEZWJ1Z2dpbmcgaW5mb3JtYXRpb24gbGV2ZWwsIGZyb20gMCB0byAzOiIKKwkJICJcbjAgPSBub25lICh1c2UgY2FyZWZ1bGx5KSIKKwkJICJcbjEgPSBjcml0aWNhbCBlcnJvcnMiCisJCSAiXG4yID0gc2lnbmlmaWNhbnQgaW5mb3JtYXRpb25zIgorCQkgIlxuMyA9IG1vcmUgdmVyYm9zZSBtZXNzYWdlcyIKKwkJICJcbkxldmVsIDMgaXMgdXNlZnVsIGZvciB0ZXN0aW5nIG9ubHksIHdoZW4gb25seSAiCisJCSAib25lIGRldmljZSBpcyB1c2VkLiIKKwkJICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhTTjlDMTAyX0RFQlVHX0xFVkVMKSIuIgorCQkgIlxuIik7CiAjZW5kaWYKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTMxLDE2ICsxMzEsMTYgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdTMyIAotc245YzEwMl9yZXF1ZXN0X2J1ZmZlcnMoc3RydWN0IHNuOWMxMDJfZGV2aWNlKiBjYW0sIHUzMiBjb3VudCwgCi0gICAgICAgICAgICAgICAgICAgICAgICBlbnVtIHNuOWMxMDJfaW9fbWV0aG9kIGlvKQorc3R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V4LCByZXMpOwpAQCAtMzE5LDggKzMxOSw4IEBACiAKIAogc3RhdGljIGludAotc245YzEwMl9pMmNfZGV0ZWN0X3JlYWRfZXJyb3Ioc3RydWN0IHNuOWMxMDJfZGV2aWNlKiBjYW0sIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNuOWMxMDJfc2Vuc29yKiBzZW5zb3IpCitzbjljMTAyX2kyY19kZXRlY3RfcmVhZF9lcnJvcihzdHJ1Y3Qgc245YzEwMl9kZXZpY2UqIGNhbSwKKwkJCSAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yKQogewogCWludCByOwogCXIgPSBzbjljMTAyX3JlYWRfcmVnKGNhbSwgMHgwOCk7CkBAIC0zMjksOCArMzI5LDggQEAKIAogCiBzdGF0aWMgaW50Ci1zbjljMTAyX2kyY19kZXRlY3Rfd3JpdGVfZXJyb3Ioc3RydWN0IHNuOWMxMDJfZGV2aWNlKiBjYW0sIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yKQorc245YzEwMl9pMmNfZGV0ZWN0X3dyaXRlX2Vycm9yKHN0cnVjdCBzbjljMTAyX2RldmljZSogY2FtLAorCQkJICAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yKQogewogCWludCByOwogCXIgPSBzbjljMTAyX3JlYWRfcmVnKGNhbSwgMHgwOCk7CkBAIC0zMzgsMTAgKzMzOCwxMCBAQAogfQogCiAKLWludCAKK2ludAogc245YzEwMl9pMmNfdHJ5X3Jhd19yZWFkKHN0cnVjdCBzbjljMTAyX2RldmljZSogY2FtLAotICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yLCB1OCBkYXRhMCwgdTggZGF0YTEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgdTggbiwgdTggYnVmZmVyW10pCisJCQkgc3RydWN0IH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i5ieXRlc3VzZWQpKTsKIAkJCQkJZ290byBzdGFydF9vZl9mcmFtZTsKQEAgLTcwMiwxOCArNzAyLDE4IEBACiAJc3RydWN0IHVzYl9kZXZpY2UgKnVkZXYgPSBjYW0tPnVzYmRldjsKIAlzdHJ1Y3QgdXJiKiB1cmI7CiAJY29uc3QgdW5zaWduZWQgaW50IHNuOWMxMDJfd01heFBhY2tldFNpemVbXSA9IHswLCAxMjgsIDI1NiwgMzg0LCA1MTIsCi0JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2ODAsIDgwMCwgOTAwLCAxMDIzfTsKKwkJCQkJCSAgICAgICA2ODAsIDgwMCwgOTAwLCAxMDIzfTsKIAljb25zdCB1bnNpZ25lZCBpbnQgc245YzEwM193TWF4UGFja2V0U2l6ZVtdID0gezAsIDEyOCwgMjU2LCAzODQsIDUxMiwKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY4MCwgODAwLCA5MDAsIDEwMDN9OworCQkJCQkJICAgICAgIDY4MCwgODAwLCA5MDAsIDEwMDN9OwogCWNvbnN0IHVuc2lnbmVkIGludCBwc3ogPSAoY2FtLT5icmlkZ2UgPT0gQlJJREdFX1NOOUMxMDMpID8KLQkgICAgICAgICAgICAgICAgICAgIHNuOWMxMDNfd01heFBhY2tldFNpemVbU045QzEwMl9BTFRFUk5BVEVfU0VUVElOR10gOgotCSAgICAgICAgICAgICAgICAgICAgc245YzEwMl93TWF4UGFja2V0U2l6ZVtTTjlDMTAyX0FMVEVSTkFURV9TRVRUSU5HXTsKKwkJCSAgICBzbjljMTAzX3dNYXhQYWNrZXRTaXplW1NOOUMxMDJfQUxURVJOQVRFX1NFVFRJTkddIDoKKwkJCSAgICBzbjljMTAyX3dNYXhQYWNrZXRTaXplW1NOOUMxMDJfQUxURVJOQVRFX1NFVFRJTkddOwogCXM4IGksIGo7CiAJaW50IGVyciA9IDA7CiAKIAlmb3IgKGkgPS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LCAwLCAwKTsKKwkJCQkJIDB4MDMsIDB4MDEsIDB4ZTEsIDAsIDApOwogCWVyciArPSBzbjljMTAyX2kyY190cnlfcmF3X3dyaXRlKGNhbSwgJm1pMDM0MywgNCwgbWkwMzQzLmkyY19zbGF2ZV9pZCwKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0LCAweDAyLCAweDgxLCAwLCAwKTsKKwkJCQkJIDB4MDQsIDB4MDIsIDB4ODEsIDAsIDApOwogCWVyciArPSBzbjljMTAyX2kyY190cnlfcmF3X3dyaXRlKGNhbSwgJm1pMDM0MywgNCwgbWkwMzQzLmkyY19zbGF2ZV9pZCwKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA1LCAweDAwLCAweDE3LCAwLCAwKTsKKwkJCQkJIDB4MDUsIDB4MDAsIDB4MTcsIDAsIDApOwogCWVyciArPSBzbjljMTAyX2kyY190cnlfcmF3X3dyaXRlKGNhbSwgJm1pMDM0MywgNCwgbWkwMzQzLmkyY19zbGF2ZV9pZCwKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA2LCAweDAwLCAweDExLCAwLCAwKTsKKwkJCQkJIDB4MDYsIDB4MDAsIDB4MTEsIDAsIDApOwogCWVyciArPSBzbjljMTAyX2kyY190cnlfcmF3X3dyaXRlKGNhbSwgJm1pMDM0MywgNCwgbWkwMzQzLmkyY19zbGF2ZV9pZCwKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYyLCAweDA0LCAweDlhLCAwLCAwKTsKKwkJCQkJIDB4NjIsIDB4MDQsIDB4OWEsIDAsIDApOwogCiAJcmV0dXJuIGVycjsKIH0KIAogCi1zdGF0aWMgaW50IG1pMDM0M19nZXRfY3RybChzdHJ1Y3Qgc245YzEwMl9kZXZpY2UqIGNhbSwgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgdjRsMl9jb250cm9sKiBjdHJsKQorc3RhdGljIGludCBt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T52YWx1ZSwgMHgwMCwKKwkJCQkJCSAwLCAwKTsKIAkJYnJlYWs7CiAJY2FzZSBWNEwyX0NJRF9HQUlOOgogCQllcnIgKz0gc245YzEwMl9pMmNfdHJ5X3Jhd193cml0ZShjYW0sICZtaTAzNDMsIDQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pMDM0My5pMmNfc2xhdmVfaWQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzUsIHJlZyA+PiA4LCByZWcgJiAweGZmLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLCAwKTsKKwkJCQkJCSBtaTAzNDMuaTJjX3NsYXZlX2lkLAorCQkJCQkJIDB4MzUsIHJlZyA+PiA4LCByZWcgJiAweGZmLAorCQkJCQkJIDAsIDApOwogCQlicmVhazsKIAljYXNlIFY0TDJfQ0lEX0hGTElQOgogCQllcnIgKz0gc245YzEwMl9pMmNfdHJ5X3Jhd193cml0ZShjYW0sICZtaTAzNDMsIDQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pMDM0My5pMmNfc2xhdmVfaWQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAsIGN0cmwtPnZhbHVlID8gMHg0MDoweDAwLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHJsLT52YWx1ZSA/IDB4MjA6MHgwMCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMCk7CisJCQkJCQkgbWkwMzQzLmkyY19zbGF2ZV9pZCwKKwkJCQkJCSAweDIwLCBjdHJsLT52YWx1ZSA/IDB4NDA6MHgwMCwKKwkJCQkJCSBjdHJsLT52YWx1ZSA/IDB4MjA6MHgwMCwKKwkJCQkJCSAwLCAwKTsKIAkJYnJlYWs7CiAJY2FzZSBWNEwyX0NJRF9WRkxJUDoKIAkJZXJyICs9IHNuOWMxMDJfaTJjX3RyeV9yYXdfd3JpdGUoY2FtLCAmbWkwMzQzLCA0LAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaTAzNDMuaTJjX3NsYXZlX2lkLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwLCBjdHJsLT52YWx1ZSA/IDB4ODA6MHgwMCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3RybC0+dmFsdWUgPyAweDgwOjB4MDAsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDApOworCQkJCQkJIG1pMDM0My5pMmNfc2xhdmVfaWQsCisJCQkJCQkgMHgyMCwgY3RybC0+dmFsdWUgPyAweDgwOjB4MDAsCisJCQkJCQkgY3RybC0+dmFsdWUgPyAweDgwOjB4MDAsCisJCQkJCQkgMCwgMCk7CiAJCWJyZWFrOwogCWNhc2UgVjRMMl9DSURfUkVEX0JBTEFOQ0U6CiAJCWVyciArPSBzbjljMTAyX2kyY190cnlfcmF3X3dyaXRlKGNhbSwgJm1pMDM0MywgNCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWkwMzQzLmkyY19zbGF2ZV9pZCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyZCwgcmVnID4+IDgsIHJlZyAmIDB4ZmYsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDApOworCQkJCQkJIG1pMDM0My5pMmNfc2xhdmVfaWQsCisJCQkJCQkgMHgyZCwgcmVnID4+IDgsIHJlZyAmIDB4ZmYsCisJCQkJCQkgMCwgMCk7CiAJCWJyZWFrOwogCWNhc2UgVjRMMl9DSURfQkxVRV9CQUxBTkNFOgogCQllcnIgKz0gc245YzEwMl9pMmNfdHJ5X3Jhd193cml0ZShjYW0sICZtaTAzNDMsIDQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pMDM0My5pMmNfc2xhdmVfaWQsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmMsIHJlZyA+PiA4LCByZWcgJiAweGZmLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLCAwKTsKKwkJCQkJCSBtaTAzNDMuaTJjX3NsYXZlX2lkLAorCQkJCQkJIDB4MmMsIHJlZyA+PiA4LCByZWcgJiAweGZmLAorCQkJCQkJIDAsIDApOwogCQlicmVhazsKIAljYXNlIFNOOUMxMDJfVjRMMl9DSURfR1JFRU5fQkFMQU5DRToKIAkJZXJyICs9IHNuOWMxMDJfaTJjX3RyeV9yYXdfd3JpdGUoY2FtLCAmbWkwMzQzLCA0LAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaTAzNDMuaTJjX3NsYXZlX2lkLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJiLCByZWcgPj4gOCwgcmVnICYgMHhmZiwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMCk7CisJCQkJCQkgbWkwMzQzLmkyY19zbGF2ZV9pZCwKKwkJCQkJCSAweDJiLCByZWcgPj4gOCwgcmVnICYgMHhmZiwKKwkJCQkJCSAwLCAwKTsKIAkJZXJyICs9IHNuOWMxMDJfaTJjX3RyeV9yYXdfd3JpdGUoY2FtLCAmbWkwMzQzLCA0LAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaTAzNDMuaTJjX3NsYXZlX2lkLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJlLCByZWcgPj4gOCwgcmVnICYgMHhmZiwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMCk7CisJCQkJCQkgbWkwMzQzLmkyY19zbGF2ZV9pZCwKKwkJCQkJCSAweDJlLCByZWcgPj4gOCwgcmVnICYgMHhmZiwKKwkJCQkJCSAwLCAwKTsKIAkJYnJlYWs7CiAJZGVmYXVsdDoKIAkJcmV0dXJuIC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KHN0cnVjdCBzbjljMTAyX2RldmljZSogY2FtLAotICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yKTsKKwkJICAgICAgc3RydWN0IHNuOWMxMDJfc2Vuc29yKiBzZW5zb3IpOwogCiAvKgogICAgRWFjaCBTTjlDMTB4IGNhbWVyYSBoYXMgcHJvcGVyIFBJRC9WSUQgaWRlbnRpZmllcnMuCkBAIC0xMDUsNyArMTA1LDcgQEAKICovCiAjZGVmaW5lIFNOOUMxMDJfVVNCX0RFVklDRSh2ZW5kLCBwcm9kLCBpbnRjbGFzcykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLm1hdGNoX2ZsYWdzID0gVVNCX0RFVklDRV9JRF9NQVRDSF9ERVZJQ0UgfCAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkgICAgICAgICAgICAgICBVU0JfREVWSUNFX0lEX01BVENIX0lOVF9DTEFTUywgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkgICAgICAgVVNCX0RFVklDRV9JRF9NQVRDSF9JTlRfQ0xBU1MsICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkuaWRWZW5kb3IgPSAodmVuZCksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5pZFByb2R1Y3QgPSAocHJvZCksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLmJJbnRlcmZhY2VDbGFzcyA9IChpbnRjbGFzcykKQEAgLTE2MiwxOSArMTYyLDE5IEBACiAgICBSZWFkL3dyaXRlIHJvdXRpbmVzOiB0aGV5IGFsd2F5cyByZXR1cm4gLTEgb24gZXJyb3IsIDAgb3IgdGhlIHJlYWQgdmFsdWUKICAgIG90aGVyd2lzZS4gTk9URSB0aGF0IGEgcmVhbCByZWFkIG9wZXJhdGlvbiBpcyBub3Qgc3VwcG9ydGVkIGJ5IHRoZSBTT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Glzb19lcnJfY291bnQ7CS8qIEhvdyBtYW55IGJhZCBJU08gcGFja2V0cyByZWNlaXZlZCAqLwogfTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvdXNiL21lZGlhL3ZpY2FtLmMgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3VzYnZpZGVvL3ZpY2FtLmMKc2ltaWxhcml0eSBpbmRleCA5OCUKcmVuYW1lIGZyb20gZHJpdmVycy91c2IvbWVkaWEvdmljYW0uYwpyZW5hbWUgdG8gZHJpdmVycy9tZWRpYS92aWRlby91c2J2aWRlby92aWNhbS5jCmluZGV4IDFkMDZlNTMuLjkwZDQ4ZTggMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvdXNiL21lZGlhL3ZpY2FtLmMKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby91c2J2aWRlby92aWNhbS5jCkBAIC02OSwxMCArNjksMTAgQEAKICNkZWZpbmUgVklDQU1fSEVBREVSX1NJWkUgICAgICAgNjQKIAogI2RlZmluZSBjbGFtcCggeCwgbCwgaCApICAgICAgICBtYXhfdCggX190eXBlb2ZfXyggeCApLCAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICggbCApLCAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fdCggX190eXBlb2ZfXyggeCApLCAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICggaCApLCAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoIHggKSApICkKKwkJCQkgICAgICAgKCBsICksICAgICAgICAgICAgICAgICAgIFwKKwkJCQkgICAgICAgbWluX3QoIF9fdHlwZW9mX18oIHggKSwgIFwKKwkJCQkJICAgICAgKCBoICksICAgICAgICAgICAgXAorCQkJCQkgICAgICAoIHggKSApICkKIAogLyogTm90IHN1cmUgd2hhdCB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BoYWNrIGZvciB0ZXN0aW5nIHB1cnBvc2VzICovCisvLyNkZWZpbmUgQlVGRkVSX1RJTUVPVVQgICAgIG1zZWNzX3RvX2ppZmZpZXMoNTAwMCkgIC8qIDUgc2Vjb25kcyAqLworCisjaW5jbHVkZSAiZm9udC5oIgorCisjaWZuZGVmIGt6YWxsb2MKKyNkZWZpbmUga3phbGxvYyhzaXplLCBmbGFncykgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJdm9pZCAqX19yZXQgPSBrbWFsbG9jKHNpemUsIGZsYWdzKTsgICAgICAgICAgICAgXAorCWlmIChfX3JldCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJbWVtc2V0KF9fcmV0LCAwLCBzaXplKTsgICAgICAgICAgICAgICAgIFwKKwlfX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9KQorI2VuZGlmCisKK01PRFVMRV9ERVNDUklQVElPTigiVmlkZW8gVGVjaG5vbG9neSBNYWdhemluZSBWaXJ0dWFsIFZpZGVvIENhcHR1cmUgQm9hcmQiKTsKK01PRFVMRV9BVVRIT1IoIk1hdXJvIENhcnZhbGhvIENoZWhhYiwgVGVkIFdhbHRoZXIgYW5kIEpvaG4gU29rb2wiKTsKK01PRFVMRV9MSUNFTlNFKCJEdWFsIEJTRC9HUEwiKTsKKworI2RlZmluZSBWSVZJX01BSk9SX1ZFUlNJT04gMAorI2RlZmluZSBWSVZJX01JTk9SX1ZFUlNJT04gNAorI2RlZmluZSBWSVZJX1JFTEVBU0UgMAorI2RlZmluZSBWSVZJX1ZFUlNJT04gS0VSTkVMX1ZFUlNJT04oVklWSV9NQUpPUl9WRVJTSU9OLCBWSVZJX01JTk9SX1ZFUlNJT04sIFZJVklfUkVMRUFTRSkKKworc3RhdGljIGludCB2aWRlb19uciA9IC0xOyAg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SAwLAorCX0sIHsKKwkJLmlkICAgICAgICAgICAgPSBWNEwyX0NJRF9DT05UUkFTVCwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJDb250cmFzdCIsCisJCS5taW5pbXVtICAgICAgID0gMCwKKwkJLm1heGltdW0gICAgICAgPSAyNTUsCisJCS5zdGVwICAgICAgICAgID0gMHgxLAorCQkuZGVmYXVsdF92YWx1ZSA9IDB4MTAsCisJCS5mbGFncyAgICAgICAgID0gMCwKKwl9LCB7CisJCS5pZCAgICAgICAgICAgID0gVjRMMl9DSURfU0FUVVJBVElPTiwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJTYXR1cmF0aW9uIiwKKwkJLm1pbmltdW0gICAgICAgPSAwLAorCQkubWF4aW11bSAgICAgICA9IDI1NSwKKwkJLnN0ZXAgICAgICAgICAgPSAweDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gMTI3LAorCQkuZmxhZ3MgICAgICAgICA9IDAsCisJfSwgeworCQkuaWQgICAgICAgICAgICA9IFY0TDJfQ0lEX0hVRSwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJIdWUiLAorCQkubWluaW11bSAgICAgICA9IC0xMjgsCisJCS5tYXhpbXVtICAgICAgID0gMTI3LAorCQkuc3RlcCAgICAgICAgICA9IDB4MSwKKwkJLmRlZmF1bHRfdmFsdWUgPSAwLAorCQkuZmxhZ3MgICAgICAgICA9IDAsCisJfQorfTsKKworc3RhdGljIGludCBxY3RsX3JlZ3NbQVJSQVlfU0laRSh2aXZpX3FjdHJsKV07CisKKyNkZWZpbmUgZHByaW50ayhsZXZlbCxmbXQsIGFyZy4uLikJCQkgICAgIFwKKwlkbyB7IAkJCQkJCSAgICAg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gICAgICBhY3RpdmU7CisJc3RydWN0IGxpc3RfaGVhZCAgICAgICBxdWV1ZWQ7CisJc3RydWN0IHRpbWVyX2xpc3QgICAgICB0aW1lb3V0OworCisJLyogdGhyZWFkIGZvciBnZW5lcmF0aW5nIHZpZGVvIHN0cmVhbSovCisJc3RydWN0IHRhc2tfc3RydWN0ICAgICAgICAgKmt0aHJlYWQ7CisJd2FpdF9xdWV1ZV9oZWFkX3QgICAgICAgICAgd3E7CisJLyogQ291bnRlcnMgdG8gY29udHJvbCBmcHMgcmF0ZSAqLworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGluaV9qaWZmaWVzOworfTsKKworc3RhdGljIExJU1RfSEVBRCh2aXZpX2Rldmxpc3QpOworCitzdHJ1Y3Qgdml2aV9kZXYgeworCXN0cnVjdCBsaXN0X2hlYWQgICAgICAgICAgIHZpdmlfZGV2bGlzdDsKKworCXN0cnVjdCBzZW1hcGhvcmUgICAgICAgICAgIGxvY2s7CisKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICB1c2VyczsKKworCS8qIHZhcmlvdXMgZGV2aWNlIGluZm8gKi8KKwl1bnNpZ25lZCBpbnQgICAgICAgICAgICAgICByZXNvdXJjZXM7CisJc3RydWN0IHZpZGVvX2RldmljZSAgICAgICAgdmlkZW9fZGV2OworCisJc3RydWN0IHZpdmlfZG1hcXVldWUgICAgICAgdmlkcTsKKworCS8qIFNldmVyYWwgY291bnRlcnMgKi8KKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBoLG0scyx1cyxqaWZmaWVzOworCWNoYXIgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdHJbMTNdOworfTsKKworc3RydWN0IHZpdmlfZmggeworCXN0cnVjdCB2aXZpX2RldiAgICAgICAgICAgICpkZXY7CisKKwkvKiB2aWRlbyBjYXB0dXJlICovCisJc3RydWN0IHZpdmlfZm10ICAgICAgICAgICAgKmZtdDsKKwl1b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ICAgICJcblRoZSBmaWx0ZXIgaXMgdXNlZCB0byByZWR1Y2Ugbm9pc2UgYW5kIGFsaWFzaW5nIGFydGlmYWN0cyIKLSAgICAgICAgICAgICAgICAgIlxucHJvZHVjZWQgYnkgdGhlIENDRCBvciBDTU9TIGltYWdlIHNlbnNvciwgYW5kIHRoZSBzY2FsaW5nIgotICAgICAgICAgICAgICAgICAiIHByb2Nlc3MuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKLU1PRFVMRV9QQVJNX0RFU0MobGFyZ2V2aWV3LCAKLSAgICAgICAgICAgICAgICAgIlxuPDB8MVssLi4uXT4gTGFyZ2UgdmlldzogMCBkaXNhYmxlZCwgMSBlbmFibGVkLiIKLSAgICAgICAgICAgICAgICAgIlxuRGVmYXVsdCB2YWx1ZSBpcyAiX19NT0RVTEVfU1RSSU5HKFc5OTY4Q0ZfTEFSR0VWSUVXKQotICAgICAgICAgICAgICAgICAiIGZvciBldmVyeSBkZXZpY2UuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKLU1PRFVMRV9QQVJNX0RFU0ModXBzY2FsaW5nLCAKLSAgICAgICAgICAgICAgICAgIlxuPDB8MVssLi4uXT4gU29mdHdhcmUgc2NhbGluZyAoZm9yIG5vbi1jb21wcmVzc2VkIHZpZGVvKToiCi0gICAgICAgICAgICAgICAgICJcbjAgZGlzYWJsZWQsIDEgZW5hYmxlZC4iCi0gICAgICAgICAgICAgICAgICJcbkRpc2FibGUgaXQgaWYgeW91IGhhdmUgYSBzbG93IENQVSBvciB5b3UgZG9uJ3QgaGF2ZSIKLSAgICAgICAgICAgICAgICAgIiBlbm91Z2ggbWVtb3J5LiIKLSAgICAgICAgICAgICAgICAgIlxuRGVmYXVsdCB2YWx1ZSBpcyAiX19NT0RVTEVfU1RSSU5HKFc5OTY4Q0ZfVVBTQ0FMSU5HKQotICAgICAgICAgICAgICAgICAiIGZvciBldmVyeSBkZXZpY2UuIgotICAgICAgICAgICAgICAgICAiXG5JZiAndzk5Njhj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FU1NJT04pCisJCSAiIGZvciBldmVyeSBkZXZpY2UuIgorCQkgIlxuSWYgJ3c5OTY4Y2YtdnBwJyBpcyBub3QgcHJlc2VudCwgZm9yY2luZyBkZWNvbXByZXNzaW9uIGlzICIKKwkJICJcbm5vdCBhbGxvd2VkOyBpbiB0aGlzIGNhc2UgdGhpcyBwYXJhbWV0ZXIgaXMgc2V0IHRvIDIuIgorCQkgIlxuIik7CiBNT0RVTEVfUEFSTV9ERVNDKGZvcmNlX3BhbGV0dGUsCi0gICAgICAgICAgICAgICAgICJcbjwwIgotICAgICAgICAgICAgICAgICAifCIgX19NT0RVTEVfU1RSSU5HKFZJREVPX1BBTEVUVEVfVVlWWSkKLSAgICAgICAgICAgICAgICAgInwiIF9fTU9EVUxFX1NUUklORyhWSURFT19QQUxFVFRFX1lVVjQyMCkKLSAgICAgICAgICAgICAgICAgInwiIF9fTU9EVUxFX1NUUklORyhWSURFT19QQUxFVFRFX1lVVjQyMlApCi0gICAgICAgICAgICAgICAgICJ8IiBfX01PRFVMRV9TVFJJTkcoVklERU9fUEFMRVRURV9ZVVY0MjBQKQotICAgICAgICAgICAgICAgICAifCIgX19NT0RVTEVfU1RSSU5HKFZJREVPX1BBTEVUVEVfWVVZVikKLSAgICAgICAgICAgICAgICAgInwiIF9fTU9EVUxFX1NUUklORyhWSURFT19QQUxFVFRFX1lVVjQyMikKLSAgICAgICAgICAgICAgICAgInwiIF9fTU9EVUxFX1NUUklORyhWSURFT19QQUxFVFRFX0dSRVkpCi0gICAgICAgICAgICAgICAgICJ8IiBfX01PRFVMRV9TVFJJTkcoVklERU9fUEFMRVRURV9SR0I1NTUpCi0gICAgICAgICAgICAgICAgICJ8IiBfX01PRFVMRV9TVFJJTkcoVklERU9fUEFMRVRURV9SR0I1NjUpCi0gICAgICAgICAgICAgICAgICJ8IiBfX01PRFVMRV9TVFJJTkcoVklERU9fUEFMRVRURV9SR0IyNCkKLSAgICAgICAgICAgICAgICAgInwiIF9fTU9EVUxFX1NUUklORyhWSURFT19QQUxFVFRFX1JHQjMyKQotICAgICAgICAgICAgICAgICAiWywuLi5dPiIKLSAgICAgICAgICAgICAgICAgIiBGb3JjZSBwaWN0dXJlIHBhbGV0dGUuIgotICAgICAgICAgICAgICAgICAiXG5JbiBvcmRlcjoiCi0gICAgICAgICAgICAgICAgICJcbi0gMCBhbGxvd3MgYW55IG9mIHRoZSBmb2xsb3dpbmcgZm9ybWF0czoiCi0gICAgICAgICAgICAgICAgICJcbi0gVVlWWSAgICAxNiBicHAgLSBPcmlnaW5hbCB2aWRlbywgY29tcHJlc3Npb24gZGlzYWJsZWQiCi0gICAgICAgICAgICAgICAgICJcbi0gWVVWNDIwICAxMiBicHAgLSBPcmlnaW5hbCB2aWRlbywgY29tcHJlc3Npb24gZW5hYmxlZCIKLSAgICAgICAgICAgICAgICAgIlxuLSBZVVY0MjJQIDE2IGJwcCAtIE9yaWdpbmFsIHZpZGVvLCBjb21wcmVzc2lvbiBlbmFibGVkIgotICAgICAgICAgICAgICAgICAiXG4tIFlVVjQyMFAgMTIgYnBwIC0gT3JpZ2luYWwgdmlkZW8sIGNvbXByZXNzaW9uIGVuYWJsZWQiCi0gICAgICAgICAgICAgICAgICJcbi0gWVVWWSAgICAxNiBicHAgLSBTb2Z0d2FyZSBjb252ZXJzaW9uIGZyb20gVVlWWSIKLSAgICAgICAgICAgICAgICAgIlxuLSBZVVY0MjIgIDE2IGJwcCAtIFNvZnR3YXJlIGNvbnZlcnNpb24gZnJvbSBVWVZZIgotICAgICAgICAgICAgICAgICAiXG4tIEdSRVkgICAgIDggYnBwIC0gU29mdHdhcmUgY29udmVyc2lvbiBmcm9tIFVZVlkiCi0gICAgICAgICAgICAgICAgICJcbi0gUkdCNTU1ICAxNiBicHAgLSBTb2Z0d2FyZSBjb252ZXJzaW9uIGZyb20gVVlWWSIKLSAgICAgICAgICAgICAgICAgIlxuLSBSR0I1NjUgIDE2IGJwcCAtIFNvZnR3YXJlIGNvbnZlcnNpb24gZnJvbSBVWVZZIgotICAgICAgICAgICAgICAgICAiXG4tIFJHQjI0ICAgMjQgYnBwIC0gU29mdHdhcmUgY29udmVyc2lvbiBmcm9tIFVZVlkiCi0gICAgICAgICAgICAgICAgICJcbi0gUkdCMzIgICAzMiBicHAgLSBTb2Z0d2FyZSBjb252ZXJzaW9uIGZyb20gVVlWWSIKLSAgICAgICAgICAgICAgICAgIlxuV2hlbiBub3QgMCwgdGhpcyBwYXJhbWV0ZXIgd2lsbCBvdmVycmlkZSAnZGVjb21wcmVzc2lvbicuIgotICAgICAgICAgICAgICAgICAiXG5EZWZhdWx0IHZhbHVlIGlzIDAgZm9yIGV2ZXJ5IGRldmljZS4iCi0gICAgICAgICAgICAgICAgICJcbkluaXRpYWwgcGFsZXR0ZSBpcyAiCi0gICAgICAgICAgICAgICAgIF9fTU9EVUxFX1NUUklORyhXOTk2OENGX1BBTEVUVEVfREVDT01QX09OKSIuIgotICAgICAgICAgICAgICAgICAiXG5JZiAndzk5NjhjZi12cHAnIGlzIG5vdCBwcmVzZW50LCB0aGlzIHBhcmFtZXRlciBpcyIKLSAgICAgICAgICAgICAgICAgIiBzZXQgdG8gOSAoVVlWWSkuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKLU1PRFVMRV9QQVJNX0RFU0MoZm9yY2VfcmdiLCAKLSAgICAgICAgICAgICAgICAgIlxuPDB8MVssLi4uXT4gUmVhZCBSR0IgdmlkZW8gZGF0YSBpbnN0ZWFkIG9mIEJHUjoiCi0gICAgICAgICAgICAgICAgICJcbiAxID0gdXNlIFJHQiBjb21wb25lbnQgb3JkZXJpbmcuIgotICAgICAgICAgICAgICAgICAiXG4gMCA9IHVzZSBCR1IgY29tcG9uZW50IG9yZGVyaW5nLiIKLSAgICAgICAgICAgICAgICAgIlxuVGhpcyBwYXJhbWV0ZXIgaGFzIGVmZmVjdCB3aGVuIHVzaW5nIFJHQlggcGFsZXR0ZXMgb25seS4iCi0gICAgICAgICAgICAgICAgICJcbkRlZmF1bHQgdm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ZW5hYmxlZC4iCi0gICAgICAgICAgICAgICAgICJcbiIpOwotTU9EVUxFX1BBUk1fREVTQyhodWUsIAotICAgICAgICAgICAgICAgICAiXG48blssLi4uXT4gU2V0IHBpY3R1cmUgaHVlICgwLTY1NTM1KS4iCi0gICAgICAgICAgICAgICAgICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhXOTk2OENGX0hVRSkKLSAgICAgICAgICAgICAgICAgIiBmb3IgZXZlcnkgZGV2aWNlLiIKLSAgICAgICAgICAgICAgICAgIlxuIik7Ci1NT0RVTEVfUEFSTV9ERVNDKGNvbG91ciwgCi0gICAgICAgICAgICAgICAgICJcbjxuWywuLi5dPiBTZXQgcGljdHVyZSBzYXR1cmF0aW9uICgwLTY1NTM1KS4iCi0gICAgICAgICAgICAgICAgICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhXOTk2OENGX0NPTE9VUikKLSAgICAgICAgICAgICAgICAgIiBmb3IgZXZlcnkgZGV2aWNlLiIKLSAgICAgICAgICAgICAgICAgIlxuIik7Ci1NT0RVTEVfUEFSTV9ERVNDKGNvbnRyYXN0LCAKLSAgICAgICAgICAgICAgICAgIlxuPG5bLC4uLl0+IFNldCBwaWN0dXJlIGNvbnRyYXN0ICgwLTY1NTM1KS4iCi0gICAgICAgICAgICAgICAgICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhXOTk2OENGX0NPTlRSQVNUKQotICAgICAgICAgICAgICAgICAiIGZvciBldmVyeSBkZXZpY2UuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKLU1PRFVMRV9QQVJNX0RFU0Mod2hpdGVuZXNzLCAKLSAgICAgICAgICAgICAgICAgIlxuPG5bLC4uLl0+IFNldCBwaWN0dXJlIHdoaXRlbmVzcyAoMC02NTUzNSkuIgotICAgICAgICAgICAgICAgICAiXG5EZWZhdWx0IHZhbHVlIGlzICJfX01PRFVMRV9TVFJJ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mNfYWRhcF93cml0ZV9ieXRlKHN0cnVjdCB3OTk2OGNmX2RldmljZSosCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MTYgYWRkcmVzcywgdTggc3ViYWRkcmVzcyk7CisJCQkJICAgICAgIHUxNiBhZGRyZXNzLCB1OCBzdWJhZGRyZXNzKTsKIHN0YXRpYyBpbnQgdzk5NjhjZl9pMmNfYWRhcF9mYXN0d3JpdGVfYnl0ZV9kYXRhKHN0cnVjdCB3OTk2OGNmX2RldmljZSosCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MTYgYWRkcmVzcywgdTggc3ViYWRkcmVzcywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4IHZhbHVlKTsKKwkJCQkJCXUxNiBhZGRyZXNzLCB1OCBzdWJhZGRyZXNzLAorCQkJCQkJdTggdmFsdWUpOwogCiAvKiBJMkMgaW50ZXJmYWNlIHRvIGtlcm5lbCAqLwogc3RhdGljIGludCB3OTk2OGNmX2kyY19pbml0KHN0cnVjdCB3OTk2OGNmX2RldmljZSopOwotc3RhdGljIGludCB3OTk2OGNmX2kyY19zbWJ1c194ZmVyKHN0cnVjdCBpMmNfYWRhcHRlciosIHUxNiBhZGRyLCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBmbGFncywgY2hhciByZWFkX3dyaXRlLCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCBjb21tYW5kLCBpbnQgc2l6ZSwgdW5pb24gaTJjX3NtYnVzX2RhdGEqKTsKK3N0YXRpYyBpbnQgdzk5NjhjZl9pMmNfc21idXNfeGZlcihzdHJ1Y3QgaTJjX2FkYXB0ZXIqLCB1MTYgYWRkciwKKwkJCQkgIHVuc2lnbmVkIHNob3J0IGZsYWdzLCBjaGFyIHJlYWRfd3JpdGUsCisJCQkJICB1OCBjb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gPT0gMSB8fAotCSAgICAgICAgICAgICAgICAgICAgZmlsdGVyX3R5cGVbZGV2X25yXSA9PSAyKQotCSAgICAgICAgICAgICAgICAgICA/ICh1OClmaWx0ZXJfdHlwZVtkZXZfbnJdIDogVzk5NjhDRl9GSUxURVJfVFlQRTsKKwkJCSAgICBmaWx0ZXJfdHlwZVtkZXZfbnJdID09IDEgfHwKKwkJCSAgICBmaWx0ZXJfdHlwZVtkZXZfbnJdID09IDIpCisJCQkgICA/ICh1OClmaWx0ZXJfdHlwZVtkZXZfbnJdIDogVzk5NjhDRl9GSUxURVJfVFlQRTsKIAogCWNhbS0+Y2FwdHVyZSA9IDE7CiAKIAljYW0tPmxhcmdldmlldyA9IChsYXJnZXZpZXdbZGV2X25yXSA9PSAwIHx8IGxhcmdldmlld1tkZXZfbnJdID09IDEpCi0JICAgICAgICAgICAgICAgICA/ICh1OClsYXJnZXZpZXdbZGV2X25yXSA6IFc5OTY4Q0ZfTEFSR0VWSUVXOworCQkJID8gKHU4KWxhcmdldmlld1tkZXZfbnJdIDogVzk5NjhDRl9MQVJHRVZJRVc7CiAKLQljYW0tPmRlY29tcHJlc3Npb24gPSAoZGVjb21wcmVzc2lvbltkZXZfbnJdID09IDAgfHwgCi0JICAgICAgICAgICAgICAgICAgICAgIGRlY29tcHJlc3Npb25bZGV2X25yXSA9PSAxIHx8Ci0JICAgICAgICAgICAgICAgICAgICAgIGRlY29tcHJlc3Npb25bZGV2X25yXSA9PSAyKQotCSAgICAgICAgICAgICAgICAgICAgID8gKHU4KWRlY29tcHJlc3Npb25bZGV2X25yXTpXOTk2OENGX0RFQ09NUFJFU1NJT047CisJY2FtLT5kZWNvbXByZXNzaW9uID0gKGRlY29tcHJlc3Npb25bZGV2X25yXSA9PSAwIHx8CisJCQkgICAgICBkZWNvbXByZXNzaW9uW2Rldl9ucl0gPT0gMSB8fAorCQkJICAgICAgZGVjb21wcmVzc2lvbltkZXZfbnJdID09IDIpCisJCQkgICAgID8gKHU4KWRlY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CAiXG4iLCAjIyBhcmdzKTsgICAgICAgICAgICAgICBcCiAJCWVsc2UgaWYgKChsZXZlbCkgPj0gNSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJZGV2X2luZm8oJmNhbS0+ZGV2LCAiWyVzOiVkXSAiIGZtdCAiXG4iLCAgICAgICAgICAgICAgXAotCQkJICAgICAgICAgX19GVU5DVElPTl9fLCBfX0xJTkVfXyAsICMjIGFyZ3MpOyAgICAgICAgICAgXAorCQkJCSBfX0ZVTkNUSU9OX18sIF9fTElORV9fICwgIyMgYXJncyk7ICAgICAgICAgICBcCiAJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIH0KIC8qIEZvciBnZW5lcmljIGtlcm5lbCAobm90IGRldmljZSBzcGVjaWZpYykgbWVzc2FnZXMgKi8KQEAgLTMxMSw3ICszMTEsNyBAQAogCQkJcHJfaW5mbygidzk5NjhjZjogIiBmbXQgIlxuIiwgIyMgYXJncyk7ICAgICAgICAgICAgICAgXAogCQllbHNlIGlmICgobGV2ZWwpID49IDUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCXByX2RlYnVnKCJ3OTk2OGNmOiBbJXM6JWRdICIgZm10ICJcbiIsIF9fRlVOQ1RJT05fXywgIFwKLQkJCSAgICAgICAgIF9fTElORV9fICwgIyMgYXJncyk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCQkgX19MSU5FX18gLCAjIyBhcmdzKTsgICAgICAgICAgICAgICAgICAgICAgICAgXAogCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9CiAjZWxzZQpkaWZmIC0tZ2l0IGEvZHJpdmVycy91c2IvbWVkaWEvdzk5NjhjZl9kZWNvZGVyLmggYi9kcml2ZXJzL21lZGlhL3ZpZGV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pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xNjcsNyArMTY3LDcgQEAKIAkJCXByX2luZm8oInpjMDMwMTogIiBmbXQgIlxuIiwgIyMgYXJncyk7ICAgICAgICAgICAgICAgIFwKIAkJZWxzZSBpZiAoKGxldmVsKSA9PSAzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQlwcl9kZWJ1ZygiemMwMzAxOiBbJXM6JWRdICIgZm10ICJcbiIsIF9fRlVOQ1RJT05fXywgICBcCi0JCQkgICAgICAgICBfX0xJTkVfXyAsICMjIGFyZ3MpOyAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJIF9fTElORV9fICwgIyMgYXJncyk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogfSB3aGlsZSAoMCkKICMJZGVmaW5lIFY0TERCRyhsZXZlbCwgbmFtZSwgY21kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTE4NCw3ICsxODQsNyBAQAogI3VuZGVmIFBEQkcKICNkZWZpbmUgUERCRyhmbXQsIGFyZ3MuLi4pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIGRldl9pbmZvKCZjYW0tPnVzYmRldi0+ZGV2LCAiWyVzOiVkXSAiIGZtdCAiXG4iLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgIF9fRlVOQ1RJT05fXywgX19MSU5FX18gLCAjIyBhcmdzKQorCSBfX0ZVTkNUSU9OX18sIF9fTElORV9fICwgIyMgYXJncykKIAogI3VuZGVmIFBEQkdHCiAjZGVmaW5lIFBEQkdHKGZtdCwgYXJncy4uLikgZG8gezt9IHdoaWxlKDApIC8qIHBsYWNlaG9sZGVyICovCmRpZ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ERVZJQ0VTLTFdID0gLTF9OwogbW9kdWxlX3BhcmFtX2FycmF5KHZpZGVvX25yLCBzaG9ydCwgTlVMTCwgMDQ0NCk7CiBNT0RVTEVfUEFSTV9ERVNDKHZpZGVvX25yLAotICAgICAgICAgICAgICAgICAiXG48LTF8blssLi4uXT4gU3BlY2lmeSBWNEwyIG1pbm9yIG1vZGUgbnVtYmVyLiIKLSAgICAgICAgICAgICAgICAgIlxuIC0xID0gdXNlIG5leHQgYXZhaWxhYmxlIChkZWZhdWx0KSIKLSAgICAgICAgICAgICAgICAgIlxuICBuID0gdXNlIG1pbm9yIG51bWJlciBuIChpbnRlZ2VyID49IDApIgotICAgICAgICAgICAgICAgICAiXG5Zb3UgY2FuIHNwZWNpZnkgdXAgdG8gIgotICAgICAgICAgICAgICAgICBfX01PRFVMRV9TVFJJTkcoWkMwMzAxX01BWF9ERVZJQ0VTKSAiIGNhbWVyYXMgdGhpcyB3YXkuIgotICAgICAgICAgICAgICAgICAiXG5Gb3IgZXhhbXBsZToiCi0gICAgICAgICAgICAgICAgICJcbnZpZGVvX25yPS0xLDIsLTEgd291bGQgYXNzaWduIG1pbm9yIG51bWJlciAyIHRvIgotICAgICAgICAgICAgICAgICAiXG50aGUgc2Vjb25kIHJlZ2lzdGVyZWQgY2FtZXJhIGFuZCB1c2UgYXV0byBmb3IgdGhlIGZpcnN0IgotICAgICAgICAgICAgICAgICAiXG5vbmUgYW5kIGZvciBldmVyeSBvdGhlciBjYW1lcmEuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKKwkJICJcbjwtMXxuWywuLi5dPiBTcGVjaWZ5IFY0TDIgbWlub3IgbW9kZSBudW1iZXIuIgorCQkgIlxuIC0xID0gdXNlIG5leHQgYXZhaWxhYmxlIChkZWZhdWx0KSIKKwkJICJcbiAgbiA9IHVzZSBtaW5vciBudW1iZXIgbiAoaW50ZWdlciA+PSAwKSIKKwkJICJcbllvdSBjYW4gc3BlY2lmeSB1cCB0byAiCisJCSBfX01PRF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bCBlcnJvcnMiCi0gICAgICAgICAgICAgICAgICJcbjIgPSBzaWduaWZpY2FudCBpbmZvcm1hdGlvbnMiCi0gICAgICAgICAgICAgICAgICJcbjMgPSBtb3JlIHZlcmJvc2UgbWVzc2FnZXMiCi0gICAgICAgICAgICAgICAgICJcbkxldmVsIDMgaXMgdXNlZnVsIGZvciB0ZXN0aW5nIG9ubHksIHdoZW4gb25seSAiCi0gICAgICAgICAgICAgICAgICJvbmUgZGV2aWNlIGlzIHVzZWQuIgotICAgICAgICAgICAgICAgICAiXG5EZWZhdWx0IHZhbHVlIGlzICJfX01PRFVMRV9TVFJJTkcoWkMwMzAxX0RFQlVHX0xFVkVMKSIuIgotICAgICAgICAgICAgICAgICAiXG4iKTsKKwkJICJcbjxuPiBEZWJ1Z2dpbmcgaW5mb3JtYXRpb24gbGV2ZWwsIGZyb20gMCB0byAzOiIKKwkJICJcbjAgPSBub25lICh1c2UgY2FyZWZ1bGx5KSIKKwkJICJcbjEgPSBjcml0aWNhbCBlcnJvcnMiCisJCSAiXG4yID0gc2lnbmlmaWNhbnQgaW5mb3JtYXRpb25zIgorCQkgIlxuMyA9IG1vcmUgdmVyYm9zZSBtZXNzYWdlcyIKKwkJICJcbkxldmVsIDMgaXMgdXNlZnVsIGZvciB0ZXN0aW5nIG9ubHksIHdoZW4gb25seSAiCisJCSAib25lIGRldmljZSBpcyB1c2VkLiIKKwkJICJcbkRlZmF1bHQgdmFsdWUgaXMgIl9fTU9EVUxFX1NUUklORyhaQzAzMDFfREVCVUdfTEVWRUwpIi4iCisJCSAiXG4iKTsKICNlbmRpZgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB1MzIKIHpjMDMwMV9yZXF1ZXN0X2J1ZmZlcnMoc3RydWN0IHpjMDMwMV9kZXZpY2UqIGNhbSwgdTMyIGNvdW50LAotICAgICAgICAgICAgICAgIC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Y2hfZmxhZ3MgPSBVU0JfREVWSUNFX0lEX01BVENIX0RFVklDRSB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCSAgICAgICAgICAgICAgIFVTQl9ERVZJQ0VfSURfTUFUQ0hfSU5UX0NMQVNTLCAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCSAgICAgICBVU0JfREVWSUNFX0lEX01BVENIX0lOVF9DTEFTUywgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5pZFZlbmRvciA9ICh2ZW5kKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLmlkUHJvZHVjdCA9IChwcm9kKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkuYkludGVyZmFjZUNsYXNzID0gKGludGNsYXNzKQpAQCAtOTIsNyArOTIsNyBAQAogCWludCAoKmluaXQpKHN0cnVjdCB6YzAzMDFfZGV2aWNlKik7CiAJaW50ICgqZ2V0X2N0cmwpKHN0cnVjdCB6YzAzMDFfZGV2aWNlKiwgc3RydWN0IHY0bDJfY29udHJvbCogY3RybCk7CiAJaW50ICgqc2V0X2N0cmwpKHN0cnVjdCB6YzAzMDFfZGV2aWNlKiwKLQkgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IHY0bDJfY29udHJvbCogY3RybCk7CisJCQljb25zdCBzdHJ1Y3QgdjRsMl9jb250cm9sKiBjdHJsKTsKIAlpbnQgKCpzZXRfY3JvcCkoc3RydWN0IHpjMDMwMV9kZXZpY2UqLCBjb25zdCBzdHJ1Y3QgdjRsMl9yZWN0KiByZWN0KTsKIAogCS8qIFByaXZhdGUgKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vem9yYW4uaCBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vem9yYW4uaAppbmRleCBhZDA0YTEyLi4wMTY2ZjU1IDEwMDY0NAotLS0gYS9kcml2ZXJzL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aSsrXSk7CisJfQogCi0gICAgICAgIHJldHVybiBpOworCXJldHVybiBpOwogfQogI2VuZGlmCiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8venIzNjA1MC5jIGIvZHJpdmVycy9tZWRpYS92aWRlby96cjM2MDUwLmMKaW5kZXggNjY5OTcyNS4uYTZiYmQxMiAxMDA2NDQKLS0tIGEvZHJpdmVycy9tZWRpYS92aWRlby96cjM2MDUwLmMKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby96cjM2MDUwLmMKQEAgLTM0LDcgKzM0LDcgQEAKICNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgogI2luY2x1ZGUgPGxpbnV4L3dhaXQuaD4KIAotLyogaW5jbHVkZXMgZm9yIHN0cnVjdHVyZXMgYW5kIGRlZmluZXMgcmVnYXJkaW5nIHZpZGVvIAorLyogaW5jbHVkZXMgZm9yIHN0cnVjdHVyZXMgYW5kIGRlZmluZXMgcmVnYXJkaW5nIHZpZGVvCiAgICAjaW5jbHVkZTxsaW51eC92aWRlb2Rldi5oPiAqLwogCiAvKiBJL08gY29tbWFuZHMsIGVycm9yIGNvZGVzICovCkBAIC0xNzEsNyArMTcxLDcgQEAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgIExvY2FsIGhlbHBlciBmdW5jdGlvbjoKIAotICAgYmFzaWMgdGVzdCBvZiAiY29ubmVjdGl2aXR5Iiwgd3JpdGVzL3JlYWRzIHRvL2Zyb20gbWVtb3J5IHRoZSBTT0YgbWFya2VyIAorICAgYmFzaWMgdGVzdCBvZiAiY29ubmVjdGl2aXR5Iiwgd3JpdGVzL3JlYWRzIHRvL2Zyb20gbWVtb3J5IHRoZSBTT0YgbWFya2VyCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICov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0cnVjdHVyZXMgYW5kIGRlZmluZXMgcmVnYXJkaW5nIHZpZGVvCiAgICAjaW5jbHVkZTxsaW51eC92aWRlb2Rldi5oPiAqLwogCiAvKiBJL08gY29tbWFuZHMsIGVycm9yIGNvZGVzICovCkBAIC0xNzMsNyArMTczLDcgQEAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgIExvY2FsIGhlbHBlciBmdW5jdGlvbjoKIAotICAgYmFzaWMgdGVzdCBvZiAiY29ubmVjdGl2aXR5Iiwgd3JpdGVzL3JlYWRzIHRvL2Zyb20gbWVtb3J5IHRoZSBTT0YgbWFya2VyIAorICAgYmFzaWMgdGVzdCBvZiAiY29ubmVjdGl2aXR5Iiwgd3JpdGVzL3JlYWRzIHRvL2Zyb20gbWVtb3J5IHRoZSBTT0YgbWFya2VyCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAKIHN0YXRpYyBpbnQKQEAgLTIwOCw5ICsyMDgsOSBAQAogCiBzdGF0aWMgaW50CiB6cjM2MDYwX3B1c2hpdCAoc3RydWN0IHpyMzYwNjAgKnB0ciwKLQkgICAgICAgIHUxNiAgICAgICAgICAgICBzdGFydHJlZywKLQkgICAgICAgIHUxNiAgICAgICAgICAgICBsZW4sCi0JICAgICAgICBjb25zdCBjaGFyICAgICAqZGF0YSkKKwkJdTE2ICAgICAgICAgICAgIHN0YXJ0cmVnLAorCQl1MTYgICAgICAgICAgICAgbGVuLAorCQljb25zdCBjaGFyICAgICAqZGF0YSkKIHsKIAlpbnQgaSA9IDA7CiAKQEAgLTMzNSw3ICszMzUsNyBAQAogLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqL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ob3N0LT5pb2FkZHIgKyBTREhDSV9JTlRfU1RBVFVTKSk7CisJcHJpbnRrKEtFUk5fREVCVUcgRFJJVkVSX05BTUUgIjogSW50IGVuYWI6IDB4JTA4eCB8IFNpZyBlbmFiOiAweCUwOHhcbiIsCisJCXJlYWRsKGhvc3QtPmlvYWRkciArIFNESENJX0lOVF9FTkFCTEUpLAorCQlyZWFkbChob3N0LT5pb2FkZHIgKyBTREhDSV9TSUdOQUxfRU5BQkxFKSk7CisJcHJpbnRrKEtFUk5fREVCVUcgRFJJVkVSX05BTUUgIjogQUMxMiBlcnI6IDB4JTA4eCB8IFNsb3QgaW50OiAweCUwOHhcbiIsCisJCXJlYWR3KGhvc3QtPmlvYWRkciArIFNESENJX0FDTUQxMl9FUlIpLAorCQlyZWFkdyhob3N0LT5pb2FkZHIgKyBTREhDSV9TTE9UX0lOVF9TVEFUVVMpKTsKKwlwcmludGsoS0VSTl9ERUJVRyBEUklWRVJfTkFNRSAiOiBDYXBzOiAgICAgMHglMDh4IHwgTWF4IGN1cnI6IDB4JTA4eFxuIiwKKwkJcmVhZGwoaG9zdC0+aW9hZGRyICsgU0RIQ0lfQ0FQQUJJTElUSUVTKSwKKwkJcmVhZGwoaG9zdC0+aW9hZGRyICsgU0RIQ0lfTUFYX0NVUlJFTlQpKTsKKworCXByaW50ayhLRVJOX0RFQlVHIERSSVZFUl9OQU1FICI6ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIExvdyBsZXZlbCBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCitcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIHNkaGNpX3Jlc2V0KHN0cnVjdCBzZGhjaV9ob3N0ICpob3N0LCB1OCBtYXNrKQoreworCXdyaXRlYihtYXNrLCBob3N0LT5pb2FkZHIgKyBTREhDSV9TT0ZUV0FSRV9SRVNFVCk7CisKKwlpZiAobWFzayAmIFNESENJX1JFU0VUX0FMTCkgeworCQlob3N0LT5jbG9jayA9IDA7CisKKwkJbWRlbGF5KDUwKTsKKwl9Cit9CisKK3N0YXRpYyB2b2lkIHNkaGNpX2luaXQoc3RydWN0IHNkaGNpX2hvc3QgKmhvc3QpCit7CisJdTMyIGludG1hc2s7CisKKwlzZGhjaV9yZXNldChob3N0LCBTREhDSV9SRVNFVF9BTEwpOworCisJaW50bWFzayA9IH4oU0RIQ0lfSU5UX0NBUkRfSU5UIHwgU0RIQ0lfSU5UX0JVRl9FTVBUWSB8IFNESENJX0lOVF9CVUZfRlVMTCk7CisKKwl3cml0ZWwoaW50bWFzaywgaG9zdC0+aW9hZGRyICsgU0RIQ0lfSU5UX0VOQUJMRSk7CisJd3JpdGVsKGludG1hc2ssIGhvc3QtPmlvYWRkciArIFNESENJX1NJR05BTF9FTkFCTEUpOworCisJLyogVGhpcyBpcyB1bmtub3duIG1hZ2ljLiAqLworCXdyaXRlYigweEUsIGhvc3QtPmlvYWRkciArIFNESENJX1RJTUVPVVRfQ09OVFJPTCk7Cit9CisKK3N0YXRpYyB2b2lkIHNkaGNpX2FjdGl2YXRlX2xlZChzdHJ1Y3Qgc2RoY2lfaG9zdCAqaG9zdCkKK3sKKwl1OCBjdHJsOworCisJY3RybCA9IHJlYWRiKGhvc3QtPmlvYWRkciArIFNESENJX0hPU1RfQ09OVFJPTCk7CisJY3RybCB8PSBTREhDSV9DVFJMX0xFRDsKKwl3cml0ZWIoY3RybCwgaG9zdC0+aW9hZGRyICsgU0RIQ0lfSE9TVF9DT05UUk9MKTsKK30KKworc3RhdGljIHZvaWQgc2RoY2lfZGVhY3RpdmF0ZV9sZWQoc3RydWN0IHNkaGNpX2hvc3QgKmhvc3QpCit7CisJdTggY3RybDsKKworCWN0cmwgPSByZWFkYihob3N0LT5pb2FkZHIgKyBTREhDSV9IT1NUX0NPTlRST0wpOworCWN0cmwgJj0gflNESENJX0NUUkxfTEVEOworCXdyaXRlYihjdHJsLCBob3N0LT5pb2FkZHIgKyBTREhDSV9IT1NUX0NPTlRST0wpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIENvcmUgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCitcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbmxpbmUgY2hhciogc2RoY2lfa21hcF9zZyhzdHJ1Y3Qgc2RoY2lfaG9zdCogaG9zdCkKK3sKKwlob3N0LT5tYXBwZWRfc2cgPSBrbWFwX2F0b21pYyhob3N0LT5jdXJfc2ctPnBhZ2UsIEtNX0JJT19TUkNfSVJRKTsKKwlyZXR1cm4gaG9zdC0+bWFwcGVkX3NnICsgaG9zdC0+Y3VyX3NnLT5vZmZzZXQ7Cit9CisKK3N0Y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XcoY2xrLCBob3N0LT5pb2FkZHIgKyBTREhDSV9DTE9DS19DT05UUk9MKTsKKworCS8qIFdhaXQgbWF4IDEwIG1zICovCisJbWF4X2ppZmZpZXMgPSBqaWZmaWVzICsgKEhaICsgOTkpLzEwMDsKKwlkbyB7CisJCWlmICh0aW1lX2FmdGVyKGppZmZpZXMsIG1heF9qaWZmaWVzKSkgeworCQkJcHJpbnRrKEtFUk5fRVJSICIlczogSW50ZXJuYWwgY2xvY2sgbmV2ZXIgc3RhYmlsaXNlZC4gIgorCQkJCSJQbGVhc2UgcmVwb3J0IHRoaXMgdG8gIiBCVUdNQUlMICIuXG4iLAorCQkJCW1tY19ob3N0bmFtZShob3N0LT5tbWMpKTsKKwkJCXNkaGNpX2R1bXByZWdzKGhvc3QpOworCQkJcmV0dXJuOworCQl9CisJCWNsayA9IHJlYWR3KGhvc3QtPmlvYWRkciArIFNESENJX0NMT0NLX0NPTlRST0wpOworCX0gd2hpbGUgKCEoY2xrICYgU0RIQ0lfQ0xPQ0tfSU5UX1NUQUJMRSkpOworCisJY2xrIHw9IFNESENJX0NMT0NLX0NBUkRfRU47CisJd3JpdGV3KGNsaywgaG9zdC0+aW9hZGRyICsgU0RIQ0lfQ0xPQ0tfQ09OVFJPTCk7CisKK291dDoKKwlob3N0LT5jbG9jayA9IGNsb2NrOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIE1NQyBjYWxsYmFja3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCitcKioqKioqK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TOworCXdyaXRlYihjdHJsLCBob3N0LT5pb2FkZHIgKyBTREhDSV9IT1NUX0NPTlRST0wpOworCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaG9zdC0+bG9jaywgZmxhZ3MpOworfQorCitzdGF0aWMgaW50IHNkaGNpX2dldF9ybyhzdHJ1Y3QgbW1jX2hvc3QgKm1tYykKK3sKKwlzdHJ1Y3Qgc2RoY2lfaG9zdCAqaG9zdDsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCWludCBwcmVzZW50OworCisJaG9zdCA9IG1tY19wcml2KG1tYyk7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmaG9zdC0+bG9jaywgZmxhZ3MpOworCisJcHJlc2VudCA9IHJlYWRsKGhvc3QtPmlvYWRkciArIFNESENJX1BSRVNFTlRfU1RBVEUpOworCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaG9zdC0+bG9jaywgZmxhZ3MpOworCisJcmV0dXJuICEocHJlc2VudCAmIFNESENJX1dSSVRFX1BST1RFQ1QpOworfQorCitzdGF0aWMgc3RydWN0IG1tY19ob3N0X29wcyBzZGhjaV9vcHMgPSB7CisJLnJlcXVlc3QJPSBzZGhjaV9yZXF1ZXN0LAorCS5zZXRfaW9zCT0gc2RoY2lfc2V0X2lvcywKKwkuZ2V0X3JvCQk9IHNkaGNpX2dldF9ybywKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogVGFza2xldHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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qKioqKioqKioqKioqXAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBJbnRlcnJ1cHQgaGFuZGxpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBzZGhjaV9jbWRfaXJxKHN0cnVjdCBzZGhjaV9ob3N0ICpob3N0LCB1MzIgaW50bWFzaykKK3sKKwlCVUdfT04oaW50bWFzayA9PSAwKTsKKworCWlmICghaG9zdC0+Y21kKSB7CisJCXByaW50ayhLRVJOX0VSUiAiJXM6IEdvdCBjb21tYW5kIGludGVycnVwdCBldmVuIHRob3VnaCBubyAiCisJCQkiY29tbWFuZCBvcGVyYXRpb24gd2FzIGluIHByb2dyZXNzLlxuIiwKKwkJCW1tY19ob3N0bmFtZShob3N0LT5tbWMpKTsKKwkJcHJpbnRrKEtFUk5fRVJSICIlczogUGxlYXNlIHJlcG9ydCB0aGlzIHRvICIgQlVHTUFJTCAiLlxuIiwKKwkJCW1tY19ob3N0bmFtZShob3N0LT5tbWMpKTsKKwkJc2RoY2lfZHVtcHJlZ3MoaG9zdCk7CisJCXJldHVybjsKKwl9CisKKwlpZiAoaW50bWFzayAmIFNESENJX0lOVF9SRVNQT05TRSkKKwkJc2RoY2lfZmluaXNoX2NvbW1hbmQoaG9zdCk7CisJZWxzZSB7CisJCWlmIChpbnRtYXNrICYgU0RIQ0lfSU5UX1RJTUVPVVQpCisJCQlob3N0LT5jbWQtPmVycm9yID0gTU1DX0VSUl9USU1FT1VUOworCQllbHNlIGlmIChp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ZXJydXB0LiBQbGVhc2UgIgorCQkJInJlcG9ydCB0aGlzIHRvICIgQlVHTUFJTCAiLlxuIiwKKwkJCW1tY19ob3N0bmFtZShob3N0LT5tbWMpKTsKKwkJc2RoY2lfZHVtcHJlZ3MoaG9zdCk7CisJfQorCisJaWYgKGludG1hc2sgJiBTREhDSV9JTlRfQUNNRDEyRVJSKSB7CisJCXByaW50ayhLRVJOX0VSUiAiJXM6IFVuZXhwZWN0ZWQgYXV0byBDTUQxMiBlcnJvci4gUGxlYXNlICIKKwkJCSJyZXBvcnQgdGhpcyB0byAiIEJVR01BSUwgIi5cbiIsCisJCQltbWNfaG9zdG5hbWUoaG9zdC0+bW1jKSk7CisJCXNkaGNpX2R1bXByZWdzKGhvc3QpOworCisJCXdyaXRldyh+MCwgaG9zdC0+aW9hZGRyICsgU0RIQ0lfQUNNRDEyX0VSUik7CisJfQorCisJaWYgKGludG1hc2spCisJCXdyaXRlbChpbnRtYXNrLCBob3N0LT5pb2FkZHIgKyBTREhDSV9JTlRfU1RBVFVTKTsKKworCXJlc3VsdCA9IElSUV9IQU5ETEVEOworCitvdXQ6CisJc3Bpbl91bmxvY2soJmhvc3QtPmxvY2spOworCisJcmV0dXJuIHJlc3VsdDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBTdXNwZW5kL3Jlc3VtZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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JcmV0dXJuIDA7CisKKwlEQkcoIlJlc3VtaW5nLi4uXG4iKTsKKworCXBjaV9zZXRfcG93ZXJfc3RhdGUocGRldiwgUENJX0QwKTsKKwlwY2lfcmVzdG9yZV9zdGF0ZShwZGV2KTsKKwlwY2lfZW5hYmxlX2RldmljZShwZGV2KTsKKworCWZvciAoaSA9IDA7aSA8IGNoaXAtPm51bV9zbG90cztpKyspIHsKKwkJaWYgKCFjaGlwLT5ob3N0c1tpXSkKKwkJCWNvbnRpbnVlOworCQlpZiAoY2hpcC0+aG9zdHNbaV0tPmZsYWdzICYgU0RIQ0lfVVNFX0RNQSkKKwkJCXBjaV9zZXRfbWFzdGVyKHBkZXYpOworCQlzZGhjaV9pbml0KGNoaXAtPmhvc3RzW2ldKTsKKwkJcmV0ID0gbW1jX3Jlc3VtZV9ob3N0KGNoaXAtPmhvc3RzW2ldLT5tbWMpOworCQlpZiAocmV0KQorCQkJcmV0dXJuIHJldDsKKwl9CisKKwlyZXR1cm4gMDsKK30KKworI2Vsc2UgLyogQ09ORklHX1BNICovCisKKyNkZWZpbmUgc2RoY2lfc3VzcGVuZCBOVUxMCisjZGVmaW5lIHNkaGNpX3Jlc3VtZSBOVUxMCisKKyNlbmRpZiAvKiBDT05GSUdfUE0gKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBEZXZpY2UgcHJvYmluZy9yZW1vdmFsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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2ZXhpdF9wKHNkaGNpX3JlbW92ZSksCisJLnN1c3BlbmQgPQlzZGhjaV9zdXNwZW5kLAorCS5yZXN1bWUJPQlzZGhjaV9yZXN1bWUsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIERyaXZlciBpbml0L2V4aXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCitcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0IHNkaGNpX2Rydl9pbml0KHZvaWQpCit7CisJcHJpbnRrKEtFUk5fSU5GTyBEUklWRVJfTkFNRQorCQkiOiBTZWN1cmUgRGlnaXRhbCBIb3N0IENvbnRyb2xsZXIgSW50ZXJmYWNlIGRyaXZlciwgIgorCQlEUklWRVJfVkVSU0lPTiAiXG4iKTsKKwlwcmludGsoS0VSTl9JTkZPIERSSVZFUl9OQU1FICI6IENvcHlyaWdodChjKSBQaWVycmUgT3NzbWFuXG4iKTsKKworCXJldHVybiBwY2lfcmVnaXN0ZXJfZHJpdmVyKCZzZGhjaV9kcml2ZXIpOworfQorCitzdGF0aWMgdm9pZCBfX2V4aXQgc2RoY2lfZHJ2X2V4aXQodm9pZCkKK3sKKwlEQkcoIkV4aXRpbmdcbiIpOworCisJcGNpX3VucmVnaXN0ZXJfZHJpdmVyKCZzZGhjaV9kcml2ZXIpOworfQorCittb2R1bGVfaW5pdChzZGhjaV9kcnZfaW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CXVuc2lnbmVkIGludCBpbnRlcnZfcmVxOjE7CisJdW5zaWduZWQgaW50IGJ1c19vdXRfY2hlY2s6MTsKKwl1bnNpZ25lZCBpbnQgZXFfY2hlY2s6MTsKKwl1bnNpZ25lZCBpbnQgZGF0YV9jaGVjazoxOworCXVuc2lnbmVkIGludCBvdmVycnVuOjE7CisJdW5zaWduZWQgaW50IGRlZl91bml0X2NoZWNrOjE7CisJdW5zaWduZWQgaW50IGFzc2duZF9lbHNldzoxOworCisJdW5zaWduZWQgaW50IGxvY2F0ZV9mYWlsOjE7CisJdW5zaWduZWQgaW50IGluc3Rfb25saW5lOjE7CisJdW5zaWduZWQgaW50IHJlc2VydmVkOjE7CisJdW5zaWduZWQgaW50IGJsa19zZXFfZXJyOjE7CisJdW5zaWduZWQgaW50IGJlZ2luX3BhcnQ6MTsKKwl1bnNpZ25lZCBpbnQgd3JfbW9kZToxOworCXVuc2lnbmVkIGludCB3cl9wcm90OjE7CisJdW5zaWduZWQgaW50IG5vdF9jYXA6MTsKKworCXVuc2lnbmVkIGludCBicmE6MjsKKwl1bnNpZ25lZCBpbnQgbGM6MzsKKwl1bnNpZ25lZCBpbnQgdmxmX2FjdGl2ZToxOworCXVuc2lnbmVkIGludCBzdG06MTsKKwl1bnNpZ25lZCBpbnQgbWVkX3BvczoxOworCisJdW5zaWduZWQgaW50IHJhYzo4OworCisJdW5zaWduZWQgaW50IHJjX3JxYzoxNjsKKworCXVuc2lnbmVkIGludCBtYzo4OworCisJdW5zaWduZWQgaW50IHNlbnNlX2ZtdDo4OworCisJdW5pb24geworCQlzdHJ1Y3QgeworCQkJdW5zaWduZWQgaW50IGVtYzo0OworCQkJdW5zaWduZWQgaW50IHNtYzo0OworCQkJdW5zaWduZWQgaW50IHNldjoyOworCQkJdW5zaWduZWQgaW50IHJlc2VydmVkOjY7CisJCQl1bnNpZ25lZCBpbnQgbWQ6ODsKKwkJCXVuc2lnbmVkIGludCByZWZjb2RlOjg7CisJCQl1bnNpZ25lZ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0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDEwIGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMTUgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICAgICAvKiAyMCBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDI1IGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMzAgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICB9LAotICAgLyogUVNJRiAqLwotICAgewotICAgICAgLyogNSBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHsxLCAxNDYsICAgIDAsIHsweDFELCAweEY0LCAweDMwLCAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDE4LCAweDAwLCAweDkyLCAweDAwLCAweDgwfX0sCi0gICAgICAgICB7MSwgMTQ2LCAgICAwLCB7MHgxRCwgMHhGNCwgMHgzMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgxOCwgMHgwMCwgMHg5MiwgMHgwMCwgMHg4MH19LAotICAgICAgICAgezEsIDE0NiwgICAgMCwgezB4MUQsIDB4RjQsIDB4MzAsIDB4MDAs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wcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMTUgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICAgICAvKiAyMCBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDI1IGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMzAgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICB9LAotICAgLyogU0lGICovCi0gICB7Ci0gICAgICAvKiA1IGZwcyAqLwotICAgICAgewotICAgICAgICAgezQsIDU4MiwgICAgMCwgezB4MEQsIDB4RjQsIDB4MzAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDQsIDB4MDAsIDB4NDYsIDB4MDIsIDB4ODB9fSwKLSAgICAgICAgIHszLCAzODcsIDEyNzYsIHsweDA1LCAweEY0LCAweDMwLCAweDI3LCAweEQ4LCAweDI2LCAweDQ4LCAweDAzLCAweDEwLCAweDgzLCAweDAxLCAweDgwfX0sCi0gICAgICAgICB7MiwgMjkxLCAgOTYwLCB7MHgwNSwgMHhGNCwgMHgzMCwgMHgxRCwgMHhGMiwgMHgxQywgMHg2MiwgMHgwNCwgMHgxMCwgMHgyMywgMHgwMSwgMHg4MH19LAotICAgIC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gwMywgMHg4MH19LAotICAgICAgICAgezYsIDc3NSwgIDQyNiwgezB4MDAsIDB4RjQsIDB4NzAsIDB4MEQsIDB4NDgsIDB4MEIsIDB4QjgsIDB4MEYsIDB4NTAsIDB4MDcsIDB4MDMsIDB4ODB9fSwKLSAgICAgICAgIHs0LCA1OTAsICAzMjQsIHsweDAwLCAweDdBLCAweDg4LCAweDBBLCAweDFDLCAweDA4LCAweEI0LCAweDBFLCAweDUwLCAweDRFLCAweDAyLCAweDgwfX0sCi0gICAgICB9LAotICAgfSwKLSAgIC8qIENJRiAqLwotICAgewotICAgICAgLyogNSBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDEwIGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMTUgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICAgICAvKiAyMCBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDI1IGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMzAgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sC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EQsIDB4OTgsIDB4MDYsIDB4NTgsIDB4QkQsIDB4MDMsIDB4ODB9fSwKLSAgICAgICAgIHs5LCA5NTcsICA1MjYsIHsweDIzLCAweDdBLCAweEU4LCAweDEwLCAweDY4LCAweDBELCAweDk4LCAweDA2LCAweDU4LCAweEJELCAweDAzLCAweDgwfX0sCi0gICAgICAgICB7OCwgODk1LCAgNDkyLCB7MHgyMywgMHg3QSwgMHhFOCwgMHgwRiwgMHg1RCwgMHgwQywgMHg4RCwgMHgwNiwgMHg1OCwgMHg3RiwgMHgwMywgMHg4MH19LAotICAgICAgfSwKLSAgICAgIC8qIDIwIGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMjUgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICAgICAvKiAzMCBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgIH0sCi19OwotCmRpZmYgLS1naXQgYS9kcml2ZXJzL3VzYi9tZWRpYS9wd2MvcHdjLXRpbW9uLmMgYi9kcml2ZXJzL3VzYi9tZWRpYS9wd2MvcHdjLXRpbW9uLmMKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGRlZTk2NzEuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy91c2IvbWVkaWEvcHdjL3B3Yy10aW1vbi5jCisrKyAvZGV2L251bGwKQEAgLTEsMzE2ICswLDAgQEAKLS8qIExpbnV4IGRyaXZlciBmb3IgUGhpbGlwcyB3ZWJjYW0KLSAgIChDKSAyMDA0ICAgICAgTHVjIF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2LCAweDQ4LCAweDUwLCAweDRFLCAweDEwLCAweDAyfX0sCi0gICAgICB9LAotICAgICAgLyogMTUgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHs5LCA5NTcsICA1MjYsIHsweDFCLCAweDdBLCAweDYzLCAweDEwLCAweDY4LCAweDBELCAweDk4LCAweDA2LCAweDU4LCAweEJELCAweDMzLCAweDgwLCAweDAyfX0sCi0gICAgICAgICB7OSwgOTU3LCAgNTI2LCB7MHgxQiwgMHg3QSwgMHg2MywgMHgxMCwgMHg2OCwgMHgwRCwgMHg5OCwgMHgwNiwgMHg1OCwgMHhCRCwgMHgzMywgMHg4MCwgMHgwMn19LAotICAgICAgICAgezgsIDg5NSwgIDQ5MiwgezB4MUIsIDB4N0EsIDB4NkIsIDB4MEYsIDB4NUQsIDB4MEMsIDB4OEQsIDB4MDYsIDB4NTgsIDB4N0YsIDB4MzcsIDB4ODAsIDB4MDJ9fSwKLSAgICAgIH0sCi0gICAgICAvKiAyMCBmcHMgKi8KLSAgICAgIHsKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgfSwKLSAgICAgIC8qIDI1IGZwcyAqLwotICAgICAgewotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICB9LAotICAgICAgLyogMzAgZnBzICovCi0gICAgICB7Ci0gICAgICAgICB7MCwgfSwKLSAgICAgICAgIHswLCB9LAotICAgICAgICAgezAsIH0sCi0gICAgICAgICB7MCwgfSwKLSAgICAgIH0sCi0gICB9LAotfTsKLQpkaWZmIC0tZ2l0IGEvZHJpdmVycy91c2IvbWVkaWEvc3R2NjgwLmggYi9kcml2ZXJzL3VzYi9tZWRpYS9zdHY2ODAuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZWE0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QgYnVmbGVuLCBzdHJ1Y3Qgdjlmc19xaWQgKnEpCit7CisJaW50IG47CisJY2hhciBiWzEwXTsKKworCW4gPSAwOworCWlmIChxLT50eXBlICYgVjlGU19RVERJUikKKwkJYltuKytdID0gJ2QnOworCWlmIChxLT50eXBlICYgVjlGU19RVEFQUEVORCkKKwkJYltuKytdID0gJ2EnOworCWlmIChxLT50eXBlICYgVjlGU19RVEFVVEgpCisJCWJbbisrXSA9ICdBJzsKKwlpZiAocS0+dHlwZSAmIFY5RlNfUVRFWENMKQorCQliW24rK10gPSAnbCc7CisJaWYgKHEtPnR5cGUgJiBWOUZTX1FUVE1QKQorCQliW24rK10gPSAndCc7CisJaWYgKHEtPnR5cGUgJiBWOUZTX1FUU1lNTElOSykKKwkJYltuKytdID0gJ0wnOworCWJbbl0gPSAnXDAnOworCisJcmV0dXJuIHNjbnByaW50ZihidWYsIGJ1ZmxlbiwgIiglLjE2bGx4ICV4ICVzKSIsIChsb25nIGxvbmcgaW50KSBxLT5wYXRoLAorCQlxLT52ZXJzaW9uLCBiKTsKK30KKworc3RhdGljIGludAordjlmc19wcmludHBlcm0oY2hhciAqYnVmLCBpbnQgYnVmbGVuLCBpbnQgcGVybSkKK3sKKwlpbnQgbjsKKwljaGFyIGJbMTVdOworCisJbiA9IDA7CisJaWYgKHBlcm0gJiBWOUZTX0RNRElSKQorCQliW24rK10gPSAnZCc7CisJaWYgKHBlcm0gJiBWOUZTX0RNQVBQRU5EKQorCQliW24rK10gPSAnYSc7CisJaWYgKHBlcm0gJiBWOUZTX0RNQVVUSCkKKwkJYltuKytdID0gJ0EnOworCWlmIChwZXJtICYgVjlGU19ETUVYQ0wpCisJCWJbbisrXSA9ICdsJzsKKwlpZiAocGVybSAmIFY5RlNfRE1UTVApCisJCWJbbisrXSA9ICd0JzsKKwlpZiAocGVybSAmIFY5RlNfRE1ERVZJQ0UpCisJCWJbbisrXSA9ICdEJzsKKwlpZiAocGVybSAmIFY5RlNfRE1TT0NLRVQpCis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5CisgICBtc3AzNHg1ZyAgeSAgIHkgICBuICAgbgorICAgbXNwMzR4N2cgIHkgICBuICAgbiAgIG4KKyAgIG1zcDQ0eDBnICB5ICAgeSAgIHkgICB5CisgICBtc3A0NHg4ZyAgeSAgIHkgICB5ICAgeQorICovCisKKy8qIERTUCBpbnB1dHMgdnMuIG1zcCB2ZXJzaW9uICh0dW5lciBhbmQgU0NBUlQgaW5wdXRzIGFyZSBhbHdheXMgYXZhaWxhYmxlKSAqLworLyogQ2hpcCAgICAgIEkyUzEgSTJTMiBJMlMzIE1BSU5fQVZDIE1BSU4gQVVYCisgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgIG1zcDM0eDBiICB5ICAgIG4gICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDBjICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDBkICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDVkICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDdkICBuICAgIG4gICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDBnICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDFnICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDJnICB5ICAgIHkgICAgbiAgICB5ICAgICAgICB5ICAgIHkKKyAgIG1zcDM0eDVnICB5ICAgIHkgICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDM0eDdnICBuICAgIG4gICAgbiAgICBuICAgICAgICBuICAgIG4KKyAgIG1zcDQ0eDBnICB5ICAgIHkgICAgeSAgICB5ICAgICAgICB5ICAgIHkKKyAgIG1zcDQ0eDhnICB5ICAgIHkgICAgeSAgICBuICAgICAgICBuICAgIG4KKyAqLworCisvKiBE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pbmsuYyBiL25ldC90aXBjL2xpbmsuYwppbmRleCA5MTBiMzdlLi43ODRiMjRiNiAxMDA2NDQKLS0tIGEvbmV0L3RpcGMvbGluay5jCisrKyBiL25ldC90aXBjL2xpbmsuYwpAQCAtMTYyOSw3ICsxNjI5LDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX21zZ19wcmludChUSVBDX0NPTlMsIGJ1Zl9tc2coYnVmKSwgIj5SRVRSPiIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm8oIi4uLlJldHJhbnNtaXR0ZWQgJXUgdGltZXNcbiIsCiAJCQkJCSAgICAgbF9wdHItPnN0YWxlX2NvdW50KTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rX3ByaW50KGxfcHRyLCBUSVBDX0NPTlMsICJSZXNldHRpbmcgTGlua1xuIik7OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtfcHJpbnQobF9wdHIsIFRJUENfQ09OUywgIlJlc2V0dGluZyBMaW5rXG4iKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX2xpbmtfcmVzZXQobF9wdHIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CmRpZmYgLS1naXQgYS9uZXQvdW5peC9hZl91bml4LmMgYi9uZXQvdW5peC9hZl91bml4LmMKaW5kZXggMmI0Y2MyZS4uZDkwMTQ2NSAxMDA2NDQKLS0tIGEvbmV0L3VuaXgvYWZfdW5peC5jCisrKyBiL25ldC91bml4L2FmX3VuaXguYwpAQCAtMTg3OCw2ICsxODc4LDggQEAKIAkJbWFzayB8PSBQT0xMRVJSOwogCWlmIChzay0+c2tfc2h1dGRvd24gPT0gU0hVVERPV05fTUFTSykKIAkJbWFzayB8PS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wZW4gdGhpcyBmaWxlLgotICAgIG9wZW4oRklMRSwgJGZpbGUpIHx8IGRpZSAiQ2FuJ3Qgb3BlbiAkZmlsZTogJCFcbiI7Ci0KLSAgICAjIEluaXRpYWxpemUgdmFyaWFibGVzLgotICAgIG15ICRmSW5Db21tZW50ICAgPSAwOwotICAgIG15ICRmSW5TdHJpbmcgICAgPSAwOwotICAgIG15ICRmVXNlQ29uZmlnICAgPSAwOwotICAgIG15ICRpTGludXhDb25maWcgPSAwOwotICAgIG15ICVjb25maWdMaXN0ICAgPSAoKTsKLQotICAgIExJTkU6IHdoaWxlICggPEZJTEU+ICkKLSAgICB7Ci0JIyBTdHJpcCBjb21tZW50cy4KLQkkZkluQ29tbWVudCAmJiAocyteLio/XCovKyArbyA/ICgkZkluQ29tbWVudCA9IDApIDogbmV4dCk7Ci0JbSsvXCorbyAmJiAocysvXCouKj9cKi8rICtnbywgKHMrL1wqLiokKyArbyAmJiAoJGZJbkNvbW1lbnQgPSAxKSkpOwotCi0JIyBQaWNrIHVwIGRlZmluaXRpb25zLgotCWlmICggbS9eXHMqIy9vICkKLQl7Ci0JICAgICRpTGludXhDb25maWcgICAgICA9ICQuIGlmIG0vXlxzKiNccyppbmNsdWRlXHMqImxpbnV4XC9jb25maWdcLmgiL287Ci0JICAgICRjb25maWdMaXN0e3VjICQxfSA9IDEgIGlmIG0vXlxzKiNccyppbmNsdWRlXHMqImNvbmZpZ1wvKFxTKilcLmgiL287Ci0JfQotCi0JIyBTdHJpcCBzdHJpbmdzLgotCSRmSW5TdHJpbmcgJiYgKHMrXi4qPyIrICtvID8gKCRmSW5TdHJpbmcgPSAwKSA6IG5leHQpOwotCW0rIitvICYmIChzKyIuKj8iKyArZ28sIChzKyIuKiQrICtvICYmICgkZkluU3RyaW5nID0gMSkpKTsKLQotCSMgUGljayB1cCBkZWZpbml0aW9ucy4KLQlpZiAoIG0vXlxzKiMvbyApCi0JewotCSAgICAkaUxpbnV4Q29uZmlnICAgICAgPSAkLiBp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UgdmVyc2lvblxuIgotI2Vsc2UgIC8qIF9fR05VX0xJQlJBUllfXyAqLwotICAgICAgICAgICAgICIgIC1kICAgICAgICAgICAgICAgICAgICBJbmNyZW1lbnQgdGhlIGRlYnVnIGxldmVsIChyZXBlYXRhYmxlKVxuIgotICAgICAgICAgICAgICIgIC1EICAgICAgICAgICAgICAgICAgICBEdW1wIGV4cGFuZGVkIHN5bWJvbCBkZWZzIChmb3IgZGVidWdnaW5nIG9ubHkpXG4iCi0gICAgICAgICAgICAgIiAgLXcgICAgICAgICAgICAgICAgICAgIEVuYWJsZSB3YXJuaW5nc1xuIgotICAgICAgICAgICAgICIgIC1xICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHdhcm5pbmdzIChkZWZhdWx0KVxuIgotICAgICAgICAgICAgICIgIC1oICAgICAgICAgICAgICAgICAgICBQcmludCB0aGlzIG1lc3NhZ2VcbiIKLSAgICAgICAgICAgICAiICAtViAgICAgICAgICAgICAgICAgICAgUHJpbnQgdGhlIHJlbGVhc2UgdmVyc2lvblxuIgotI2VuZGlmIC8qIF9fR05VX0xJQlJBUllfXyAqLworI2Vsc2UJCQkJLyogX19HTlVfTElCUkFSWV9fICovCisJICAgICAgIiAgLWQgICAgICAgICAgICAgICAgICAgIEluY3JlbWVudCB0aGUgZGVidWcgbGV2ZWwgKHJlcGVhdGFibGUpXG4iCisJICAgICAgIiAgLUQgICAgICAgICAgICAgICAgICAgIER1bXAgZXhwYW5kZWQgc3ltYm9sIGRlZnMgKGZvciBkZWJ1Z2dpbmcgb25seSlcbiIKKwkgICAgICAiICAtdyAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHdhcm5pbmdzXG4iCisJICAgICAgIiAgLXEgICAgICAgICAgICAgICAgICAgIERpc2FibGUgd2FybmluZ3MgKGRlZmF1bHQpXG4iCisJICAgICAgIiAgLWggICAgICAgICAgICAgICAgICAgIFByaW50IHRoaXMgbWVzc2FnZVxuIgorCSAgICAgICIgIC1WICAgICAgICAgICAgICA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