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S9iaW5kaW5ncy9zb3VuZC9mc2wsc3NpLnR4dApAQCAtMCwwICsxLDg1IEBACitGcmVlc2NhbGUgU3luY2hyb25vdXMgU2VyaWFsIEludGVyZmFjZQorCitUaGUgU1NJIGlzIGEgc2VyaWFsIGRldmljZSB0aGF0IGNvbW11bmljYXRlcyB3aXRoIGF1ZGlvIGNvZGVjcy4gIEl0IGNhbgorYmUgcHJvZ3JhbW1lZCBpbiBBQzk3LCBJMlMsIGxlZnQtanVzdGlmaWVkLCBvciByaWdodC1qdXN0aWZpZWQgbW9kZXMuCisKK1JlcXVpcmVkIHByb3BlcnRpZXM6CistIGNvbXBhdGlibGU6ICAgICAgIENvbXBhdGlibGUgbGlzdCwgY29udGFpbnMgImZzbCxzc2kiLgorLSBjZWxsLWluZGV4OiAgICAgICBUaGUgU1NJLCA8MD4gPSBTU0kxLCA8MT4gPSBTU0kyLCBhbmQgc28gb24uCistIHJlZzogICAgICAgICAgICAgIE9mZnNldCBhbmQgbGVuZ3RoIG9mIHRoZSByZWdpc3RlciBzZXQgZm9yIHRoZSBkZXZpY2UuCistIGludGVycnVwdHM6ICAgICAgIDxhIGI+IHdoZXJlIGEgaXMgdGhlIGludGVycnVwdCBudW1iZXIgYW5kIGIgaXMgYQorICAgICAgICAgICAgICAgICAgICBmaWVsZCB0aGF0IHJlcHJlc2VudHMgYW4gZW5jb2Rpbmcgb2YgdGhlIHNlbnNlIGFuZAorICAgICAgICAgICAgICAgICAgICBsZXZlbCBpbmZvcm1hdGlvbiBmb3IgdGhlIGludGVycnVwdC4gIFRoaXMgc2hvdWxkIGJlCisgICAgICAgICAgICAgICAgICAgIGVuY29kZWQgYmFzZWQgb24gdGhlIGluZm9ybWF0aW9uIGluIHNlY3Rpb24gMikKKyAgICAgICAgICAgICAgICAgICAgZGVwZW5kaW5nIG9uIHRoZSB0eXBlIG9mIGludGVycnVwdCBjb250cm9sbGVyIHlvdQorICAgICAgICAgICAgICAgICAgICBoYXZlLgorLSBpbnRlcnJ1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xCisgICogTUlDMk4KKyAgKiBNSUMyCisgICogTWljIEJpYXMKKwogRXhhbXBsZToKIAotY29kZWM6IHdtODczN0AxYSB7Citjb2RlYzogd204NzUzQDFhIHsKIAljb21wYXRpYmxlID0gIndsZix3bTg3NTMiOwogCXJlZyA9IDwweDFhPjsKIH07CmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3Mvc291bmQvd204OTAzLnR4dCBiL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zb3VuZC93bTg5MDMudHh0CmluZGV4IGYxMDJjYmMuLjk0ZWMzMmMgMTAwNjQ0Ci0tLSBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zb3VuZC93bTg5MDMudHh0CisrKyBiL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zb3VuZC93bTg5MDMudHh0CkBAIC0yOCw2ICsyOCwyNSBAQAogICAgIHBlcmZvcm1lZC4gSWYgYW55IGVudHJ5IGhhcyB0aGUgdmFsdWUgMHhmZmZmZmZmZiwgdGhhdCBHUElPJ3MKICAgICBjb25maWd1cmF0aW9uIHdpbGwgbm90IGJlIG1vZGlmaWVkLgogCitQaW5zIG9uIHRoZSBkZXZpY2UgKGZvciBsaW5raW5nIGludG8gYXVkaW8gcm91dGVzKToKKworICAqIElOMUwKKyAgKiBJTjFSCisgICogSU4yTAorICAqIElOMlIKKyAgKiBJTjNMCisgICogSU4zUgorICAqIERNSUNEQVQKKyAgKiBIUE9VVEwKKyAgKiBIUE9VVFIKKyAgKiBMSU5FT1VUTAorICAqIExJTkVPVVRSCisgICogTE9QCisgICogTE9OCisgICogUk9QCisgICogUk9OCisgICogTUlDQklBUworCiBFeGFtcGxlOgogCiBjb2RlYzogd204OTAzQDFhIHsKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zb3VuZC93bT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RwcmludCBjb25zdW1lZCBieSBmMmZzLgogCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorU1lTRlMgRU5UUklFUworPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworSW5mb3JtYXRpb24gYWJvdXQgbW91bnRlZCBmMmYyIGZpbGUgc3lzdGVtcyBjYW4gYmUgZm91bmQgaW4KKy9zeXMvZnMvZjJmcy4gIEVhY2ggbW91bnRlZCBmaWxlc3lzdGVtIHdpbGwgaGF2ZSBhIGRpcmVjdG9yeSBpbgorL3N5cy9mcy9mMmZzIGJhc2VkIG9uIGl0cyBkZXZpY2UgbmFtZSAoaS5lLiwgL3N5cy9mcy9mMmZzL3NkYSkuCitUaGUgZmlsZXMgaW4gZWFjaCBwZXItZGV2aWNlIGRpcmVjdG9yeSBhcmUgc2hvd24gaW4gdGFibGUgYmVsb3cuCisKK0ZpbGVzIGluIC9zeXMvZnMvZjJmcy88ZGV2bmFtZT4KKyhzZWUgYWxzbyBEb2N1bWVudGF0aW9uL0FCSS90ZXN0aW5nL3N5c2ZzLWZzLWYyZnMpCisuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4KKyBGaWxlICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRlbnQKKworIGdjX21heF9zbGVlcF90aW1lICAgICAgICAgICAgVGhpcyB0dW5pbmcgcGFyYW1ldGVyIGNvbnRyb2xzIHRoZSBtYXhpbXVtIHNsZWVwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lIGZvciB0aGUgZ2FyYmFnZSBjb2xsZWN0aW9uIHRocmVhZC4gVGltZSBpcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gbWlsbGlzZWNvbmRzLgorCisgZ2NfbWluX3NsZWVwX3RpbWUgICAgICAgICAgICBUaGlzIHR1bmluZyBwYXJhbWV0ZXIgY29udHJvbHMgdGhlIG1pbmltdW0gc2xlZXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWUgZm9yIHRoZSBnYXJiYWdlIGNvbGxlY3Rpb24gdGhyZWFkLiBUaW1lIGlzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBtaWxsaXNlY29uZHMuCisKKyBnY19ub19nY19zbGVlcF90aW1lICAgICAgICAgIFRoaXMgdHVuaW5nIHBhcmFtZXRlciBjb250cm9scyB0aGUgZGVmYXVsdCBzbGVlcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZSBmb3IgdGhlIGdhcmJhZ2UgY29sbGVjdGlvbiB0aHJlYWQuIFRpbWUgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIG1pbGxpc2Vjb25kcy4KKworIGdjX2lkbGUgICAgICAgICAgICAgICAgICAgICAgVGhpcyBwYXJhbWV0ZXIgY29udHJvbHMgdGhlIHNlbGVjdGlvbiBvZiB2aWN0aW0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvbGljeSBmb3IgZ2FyYmFnZSBjb2xsZWN0aW9uLiBTZXR0aW5nIGdjX2lkbGUgPSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZGVmYXVsdCkgd2lsbCBkaXNhYmxlIHRoaXMgb3B0aW9uLiBTZXR0aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnY19pZGxlID0gMSB3aWxsIHNlbGVjdCB0aGUgQ29zdCBCZW5lZml0IGFwcHJvYWNoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmIHNldHRpbmcgZ2NfaWRsZSA9IDIgd2lsbCBzZWxlY3QgdGhlIGdyZWVkeSBhcHJvYWNoLgorCis9PT09PT09PT09PT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rIGxpa2UgdGhpczoKKworICAgICAgICAgICAgX19fX19fX19fX19fX19fX19fX19fX19fX19fXyAgICAgICAgICAgICAgX18KKyAgICAgICAgICAgLyBbX19aTF9fXSAgICAgICAgICBbX19aUl9fXSBcICAgICAgICAgICAgICAgfAorICAgICAgICAgIC8gW19fIFRMIF9fXSAgICAgICAgW19fIFRSIF9fXSBcICAgICAgICAgICAgICB8IEZyb250IFRyaWdnZXJzCisgICAgICAgX18vX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19cX18gICAgICAgICBfX3wKKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXyAgIFwgICAgICAgICAgfAorICAgICAvICAgICAgL1wgICAgICAgICAgIF9fICAgICAgICAgICAgIChOKSAgIFwgICAgICAgICB8CisgICAgLyAgICAgICB8fCAgICAgIF9fICB8TU98ICBfXyAgICAgXyAgICAgICBfIFwgICAgICAgIHwgTWFpbiBQYWQKKyAgIHwgICAgPD09PURQPT09PiB8U0V8ICAgICAgfFNUfCAgIChXKSAtfC0gKEUpIHwgICAgICAgfAorICAgIFwgICAgICAgfHwgICAgX19fICAgICAgICAgIF9fXyAgICAgICBfICAgICAvICAgICAgICB8CisgICAgL1wgICAgICBcLyAgIC8gICBcICAgICAgICAvICAgXCAgICAgKFMpICAgL1wgICAgICBfX3wKKyAgIC8gIFxfX19fX19fXyB8IExTICB8IF9fX18gfCAgUlMgfCBfX19fX19fXy8gIFwgICAgICAgfAorICB8ICAgICAgICAgLyAgXCBcX19fLyAvICAgIFwgXF9fXy8gLyAgXCAgICAgICAgIHwgICAgICB8IENvbnRyb2wgU3RpY2tzCisgIHwgICAgICAgIC8gICAgXF9fX19fLyAgICAgIFxfX19fXy8gICAgXCAgICAgICAgfCAgICBfX3wKKyAgfCAgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCAgICAgICB8CisgICBcX19fX18vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcX19fX18vCisKKy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9+cWl5b25nL2x4ci8KKwlodHRwOi8vbHhyLmxpbnV4Lm5vLyt0cmVlcwogCiDplovnmbrjg5fjg63jgrvjgrkKIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCkBAIC0yNTMsMjQgKzI1MywyNCBAQAogTGludXgg44Kr44O844ON44Or44Gu6ZaL55m644OX44Ot44K744K544Gv54++5Zyo5bm+44Gk44GL44Gu55Ww44Gq44KL44Oh44Kk44Oz44Kr44O844ON44Or44CM44OW44Op44OzCiDjg4HjgI3jgajlpJrmlbDjga7jgrXjg5bjgrfjgrnjg4bjg6Dmr47jga7jgqvjg7zjg43jg6vjg5bjg6njg7Pjg4HjgYvjgonmp4vmiJDjgZXjgozjgb7jgZnjgIIKIOOBk+OCjOOCieOBruODluODqeODs+ODgeOBqOOBry0KLSAgLSDjg6HjgqTjg7Pjga4gMi42Lngg44Kr44O844ON44Or44OE44Oq44O8Ci0gIC0gMi42LngueSAtc3RhYmxlIOOCq+ODvOODjeODq+ODhOODquODvAotICAtIDIuNi54IC1naXQg44Kr44O844ON44Or44OR44OD44OBCisgIC0g44Oh44Kk44Oz44GuIDMueCDjgqvjg7zjg43jg6vjg4Tjg6rjg7wKKyAgLSAzLngueSAtc3RhYmxlIOOCq+ODvOODjeODq+ODhOODquODvAorICAtIDMueCAtZ2l0IOOCq+ODvOODjeODq+ODkeODg+ODgQogICAtIOOCteODluOCt+OCueODhuODoOavjuOBruOCq+ODvOODjeODq+ODhOODquODvOOBqOODkeODg+ODgQotICAtIOe1seWQiOODhuOCueODiOOBruOBn+OCgeOBriAyLjYueCAtbmV4dCDjgqvjg7zjg43jg6vjg4Tjg6rjg7wKKyAgLSDntbHlkIjjg4bjgrnjg4jjga7jgZ/jgoHjga4gMy54IC1uZXh0IOOCq+ODvOODjeODq+ODhOODquODvAogCi0yLjYueCDjgqvjg7zjg43jg6vjg4Tjg6rjg7wKKzMueCDjgqvjg7zjg43jg6vjg4Tjg6rjg7wKIC0tLS0tLS0tLS0tLS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M5aW944G+44GX44GE44KE44KK5pa544Gn44GZ44GM44CB44OR44ODCisgICAgaHR0cDovL2dpdC1zY20uY29tLyDlj4LnhacpIOOCkuS9v+OBo+OBpumAgeOCi+OBruOBjOWlveOBvuOBl+OBhOOChOOCiuaWueOBp+OBmeOBjOOAgeODkeODgwogICAgIOODgeODleOCoeOCpOODq+OBruW9ouW8j+OBruOBvuOBvumAgeOCi+OBruOBp+OCguWNgeWIhuOBp+OBmeOAggogCiAgIC0gMumAsemWk+W+jOOAgS1yYzEg44Kr44O844ON44Or44GM44Oq44Oq44O844K544GV44KM44CB44GT44Gu5b6M44Gr44Gv44Kr44O844ON44Or5YWo5L2T44Gu5a6J5a6aCkBAIC0zMDIsMjAgKzMwMiwyMCBAQAogICDlrp/jgavoqo3orZjjgZXjgozjgZ/jg5DjgrDjga7nirbms4Hjgavjgojjgorjg6rjg6rjg7zjgrnjgZXjgozjgovjga7jgafjgYLjgorjgIHliY3jgoLjgaPjgabmsbrjgoHjgokKICAg44KM44Gf6KiI55S744Gr44KI44Gj44Gm44Oq44Oq44O844K544GV44KM44KL44KC44Gu44Gn44Gv44Gq44GE44GL44KJ44Gn44GZ44CC44CNCiAKLTIuNi54LnkgLXN0YWJsZSDjgqvjg7zjg43jg6vjg4Tjg6rjg7wKKzMueC55IC1zdGFibGUg44Kr44O844ON44Or44OE44Oq44O8CiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KIAot44OQ44O844K444On44Oz55Wq5Y+344GMNOOBpOOBruaVsOWtl+OBq+WIhuOBi+OCjOOBpuOBhOOCi+OCq+ODvOODjeODq+OBryAtc3RhYmxlIOOCq+ODvOODjeODq+OBp+OBmeOAggot44GT44KM44Gr44Gv44CBMi42Lngg44Kr44O844ON44Or44Gn6KaL44Gk44GL44Gj44Gf44K744Kt44Ol44Oq44OG44Kj5ZWP6aGM44KE6YeN5aSn44Gq5b6M5oi744KK44Gr5a++Civjg5Djg7zjgrjjg6fjg7Pnlarlj7fjgYwz44Gk44Gu5pWw5a2X44Gr5YiG44GL44KM44Gm44GE44KL44Kr44O844ON44Or44GvIC1zdGFibGUg44Kr44O844ON44Or44Gn44GZ44CCCivjgZPjgozjgavjga/jgIEzLngg44Kr44O844ON44Or44Gn6KaL44Gk44GL44Gj44Gf44K744Kt44Ol44Oq44OG44Kj5ZWP6aGM44KE6YeN5aSn44Gq5b6M5oi744KK44Gr5a++CiDjgZnjgovmr5TovIPnmoTlsI/jgZXjgYTph43opoHjgarkv67mraPjgYzlkKvjgb7jgozjgb7jgZnjgIIKIAog44GT44KM44Gv44CB6ZaL55m6L+Wun+mok+eahOODkOODvOOCuOODp+ODs+OBruODhuOCueODiOOBq+WNlOWKm+OBmeOCi+OBk+OBqOOBq+iIiOWRs+OBjOeEoeOBj+OAgQog5pyA5paw44Gu5a6J5a6a44GX44Gf44Kr44O844ON44Or44KS5L2/44GE44Gf44GE44Om44O844K244Gr5o6o5aWo44GZ44KL44OW44Op44Oz44OB44Gn44GZ44CCCiAKLeOCguOBl+OAgTIuNi54Lnkg44Kr44O844ON44Or44GM5a2Y5Zyo44GX44Gq44GE5aC05ZCI44Gr44Gv44CB55Wq5Y+344GM5LiA55Wq5aSn44GN44GEIDIuNi54IOOBjAor44KC44GX44CBMy54Lnkg44Kr44O844ON44Or44GM5a2Y5Zyo44GX44Gq44GE5aC05ZCI44Gr44Gv44CB55Wq5Y+344GM5LiA55Wq5aSn44GN44GEIDMueCDjgYwKIOacgOaWsOOBruWuieWumueJiOOCq+ODvOODjeODq+OBp+OBmeOAggogCi0yLjYueC55IOOBryAic3RhYmxlIiDjg4Hjg7zjg6AgPHN0YWJsZUBrZXJuZWwub3JnPiDjgafjg6Hjg7Pjg4bjgZXjgozjgabjgYrjgorjgIHlv4UKKzMueC55IOOBryAic3RhYmxlIiDjg4Hjg7zjg6AgPHN0YWJsZUBrZXJuZWwub3JnPiDjgafjg6Hjg7Pjg4bjgZXjgozjgabjgYrjgorjgIHlv4UKIOimgeOBq+W/nOOBmOOBpuODquODquODvOOCueOBleOCjOOBvuOBmeOAgumAmuW4uOOBruODquODquODvOOCueacn+mWk+OBryAy6YCx6ZaT5q+O44Gn44GZ44GM44CB5beu44GX6L+r44GjCiDjgZ/llY/poYzjgYzjgarjgZHjgozjgbDjgoLjgYblsJHjgZfplbfjgY/jgarjgovjgZPjgajjgoLjgYLjgorjgb7jgZnjgILjgrvjgq3jg6Xjg6rjg4bjgqPplqLpgKPjga7llY/poYwKIOOBruWgtOWQiOOBr+OBk+OCjOOBq+WvvuOBl+OBpuOBoOOBhOOBn+OBhOOBruWgtOWQiOOAgeOBmeOBkOOBq+ODquODquODvOOCueOBjOOBleOCjOOBvuOBmeOAggpAQCAtMzI0LDcgKzMyNCw3IEBACiDjgqTjg6vjgavjga/jganjga7jgojjgYbjgarnqK7poZ7jga7lpInmm7TjgYwgLXN0YWJsZSDjg4Tjg6rjg7zjgavlj5fjgZHlhaXjgozlj6/og73jgYvjgIHjgb7jgZ/jg6oKIOODquODvOOCueODl+ODreOCu+OCueOBjOOBqeOBhuWLleOBj+OBi+OBjOiomOi/sOOBleOCjOOBpuOBhOOBvuOBmeOAggogCi0yLjYueCAtZ2l0IOODkeODg+ODgQorMy54IC1naXQg44OR44OD44OBCiAtLS0tLS0tLS0tLS0tLS0tLS0KIAogZ2l0IOODquODneOCuOODiOODquOBp+euoeeQhuOBleOCjOOBpuOBhOOCi0xpbnVzIOOBruOCq+ODvOODjeODq+ODhOODquODvOOBruavjuaXpeOBruOCueODiuODg+ODlwpAQCAtMzU4LDE0ICszNTgsMTQgQEAKIOOCkuOBpOOBkeOCi+OBk+OBqOOBjOOBp+OBjeOBvuOBmeOAguWkp+mDqOWIhuOBruOBk+OCjOOCieOBriBwYXRjaHdvcmsg44Gu44K144Kk44OI44GvCiBodHRwOi8vcGF0Y2h3b3JrLmtlcm5lbC5vcmcvIOOBp+ODquOCueODiOOBleOCjOOBpuOBhOOBvuOBmeOAggogCi3ntbHlkIjjg4bjgrnjg4jjga7jgZ/jgoHjga4gMi42LnggLW5leHQg44Kr44O844ON44Or44OE44Oq44O8CivntbHlkIjjg4bjgrnjg4jjga7jgZ/jgoHjga4gMy54IC1uZXh0IOOCq+ODvOODjeODq+ODhOODquODvAogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKLeOCteODluOCt+OCueODhuODoOODhOODquODvOOBruabtOaWsOWGheWuueOBjOODoeOCpOODs+ODqeOCpOODs+OBriAyLjYueCDjg4Tjg6rjg7zjgavjg57jg7zjgrjjgZXjgowKK+OCteODluOCt+OCueODhuODoOODhOODquODvOOBruabtOaWsOWGheWuueOBjOODoeOCpOODs+ODqeOCpOODs+OBriAzLngg44OE44Oq44O844Gr44Oe44O844K444GV44KMCiDjgovliY3jgavjgIHjgZ3jgozjgonjga/ntbHlkIjjg4bjgrnjg4jjgZXjgozjgovlv4XopoHjgYzjgYLjgorjgb7jgZnjgILjgZPjga7nm67nmoTjga7jgZ/jgoHjgIHlrp/os6rnmoQKIOOBq+WFqOOCteODluOCt+OCueODhuODoOODhOODquODvOOBi+OCieOBu+OBvOavjuaXpeODl+ODq+OBleOCjOOBpuOBp+OBjeOCi+eJueWIpeOBquODhuOCueODiOeUqOOBruODqgog44Od44K444OI44Oq44GM5a2Y5Zyo44GX44G+44GZLQotICAgICAgIGh0dHA6Ly9naXQua2VybmVsLm9yZy8/cD1saW51eC9rZXJuZWwvZ2l0L3Nmci9saW51eC1uZXh0LmdpdAorICAgICAgIGh0dHA6Ly9naXQua2VybmVsLm9yZy8/cD1saW51eC9rZXJuZWwvZ2l0L25leHQvbGludXgtbmV4dC5naXQKICAgICAgICBodHRwOi8vbGludXguZi1zZWlkZWwuZGUvbGludXgtbmV4dC9wbXdpa2kvCiAKIOOBk+OBruOChOOCiuaWueOBq+OCiOOBo+OBpuOAgS1uZXh0IOOCq+ODvOODjeODq+OBr+asoeOBruODnuODvOOCuOapn+S8muOBp+OBqeOCk+OBquOC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5DshJwg7J2065+s7ZWcIOuwqeuyleycvOuhnCDtlojri6QuIOq3uOufrOuvgOuhnCDqt7jqsoPsnYAg7KKL7J2AIOqyg+yehOyXkCDti4Drpr3sl4bri6QuLi4iCisgICAgLSAi7Jqw66as64qUIOq3uOqyg+ydhCBBSVgvcHR4L1NvbGFyaXPsl5DshJwg7J2065+s7ZWcIOuwqeuyleycvOuhnCDtlojri6QuIOq3uOufrOuvgOuhnCDqt7jqsoPsnYAg7KKL7J2AIOqyg+yehOyXkCDti4Drprzsl4bri6QuLi4iCiAgICAgLSAi64KY64qUIDIw64WE64+Z7JWIIOydtOqyg+ydhCDtlbTsmZTri6QuIOq3uOufrOuvgOuhnC4uLiIKICAgICAtICLsnbTqsoPsnYAg64+I7J2EIOuyjOq4sOychO2VtCDrgpjsnZgg7ZqM7IKs6rCAIO2VhOyalOuhnCDtlZjripQg6rKD7J2064ukLiIKICAgICAtICLsnbTqsoPsnYAg7Jqw66as7J2YIOyXlO2EsO2UhOudvOydtOymiCDsg4Htkogg65287J247J2EIOychO2VnCDqsoPsnbTri6QuIgogICAgIC0gIuyXrOq4sOyXkCDrgpjsnZgg7IOd6rCB7J2EIOunkO2VmOqzoCDsnojripQgMTAwMCDtjpjsnbTsp4Ag7ISk6rOEIOusuOyEnOqwgCDsnojri6QuIgogICAgIC0gIuuCmOuKlCA264us64+Z7JWIIOydtOqyg+ydhCDtlojsnLzri4guLi4iCi0gICAgLSAi7Jes6riw7JeQIDUwMDDrnbzsnbgg7Kec66asIO2MqOy5mOqwgCDsnojsnLzri4guLi4iCisgICAgLSAi7Jes6riw7JeQIDUwMDAg65287J24IOynnOumrCDtjKjsuZjqsIAg7J6I7Jy864uILi4uIgogICAgIC0gIuuCmOuKlCDtmITsnqwg65Kk7KO967CV7KO97J24IOqyg+ydhCDsnqzsnpHshLHtlojri6QuIOq3uOumrOqzoCDsl6zquLDsl5AuLi4iCiAgICAgLSAi64KY64qUIOuniOqwkOyLnO2VnOydhCDqsIDsp4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ZpbmcsIGFuZCB0aGUgcmVnaXN0ZXIKK3JhbmdlIGRlYWxpbmcgd2l0aCBwaW4gY29uZmlnIGFuZCBwaW4gbXVsdGlwbGV4aW5nIGdldCBwbGFjZWQgaW50byBhCitkaWZmZXJlbnQgbWVtb3J5IHJhbmdlIGFuZCBhIHNlcGFyYXRlIHNlY3Rpb24gb2YgdGhlIGRhdGEgc2hlZXQuCisKKyhCKQorCisgICAgICAgICAgICAgICAgICAgICAgIHBpbiBjb25maWcKKyAgICAgICAgICAgICAgICAgICAgICAgbG9naWMgcmVncworICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgKy0gU1BJCisgICAgIFBoeXNpY2FsIHBpbnMgLS0tIHBhZCAtLS0gcGlubXV4IC0rLSBJMkMKKyAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICB8ICAgICAgICstIG1tYworICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgR1BJTyAgICBwaW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aXBsZXgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dpYyByZWdzCisKK0luIHRoaXMgYXJyYW5nZW1lbnQsIHRoZSBHUElPIGZ1bmN0aW9uYWxpdHkgY2FuIGFsd2F5cyBiZSBlbmFibGVkLCBzdWNoIHRoYXQKK2UuZy4gYSBHUElPIGlucHV0IGNhbiBiZSB1c2VkIHRvICJzcHkiIG9uIHRoZSBTUEkvSTJDL01NQyBzaWduYWwgd2hpbGUgaXQgaXMKK3B1bHNlZCBvdXQuIEl0IGlzIGxpa2VseSBwb3NzaWJsZSB0byBkaXNydXB0IHRoZSB0cmFmZmljIG9uIHRoZSBwaW4gYnkgZG9pbmcKK3dyb25nIHRoaW5ncyBvbiB0aGUgR1BJTyBibG9jaywgYXMgaXQgaXMgbmV2ZXIgcmVhbGx5IGRpc2Nvbm5lY3RlZC4gSXQgaXMKK3Bv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mluZGV4IDk4NjZjZDcuLjg2NzhlMGMgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL2Jvb3QvZHRzL2F0bGFzNi5kdHNpCisrKyBiL2FyY2gvYXJtL2Jvb3QvZHRzL2F0bGFzNi5kdHNpCkBAIC0zMjksNiArMzI5LDEyIEBACiAJCQkJCQlzaXJmLGZ1bmN0aW9uID0gInVhcnQwIjsKIAkJCQkJfTsKIAkJCQl9OworCQkJCXVhcnQwX25vZmxvd19waW5zX2E6IHVhcnQwQDEgeworCQkJCQl1YXJ0IHsKKwkJCQkJCXNpcmYscGlucyA9ICJ1YXJ0MF9ub3N0cmVhbWN0cmxncnAiOworCQkJCQkJc2lyZixmdW5jdGlvbiA9ICJ1YXJ0MF9ub3N0cmVhbWN0cmwiOworCQkJCQl9OworCQkJCX07CiAJCQkJdWFydDFfcGluc19hOiB1YXJ0MUAwIHsKIAkJCQkJdWFydCB7CiAJCQkJCQlzaXJmLHBpbnMgPSAidWFydDFncnAiOwpAQCAtNDg1LDYgKzQ5MSwxMiBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJ1c3AwIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OworCQkJCXVzcDBfdWFydF9ub3N0cmVhbWN0cmxfcGluc19hOiB1c3AwQDEgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzcDAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixwaW5zID0gInVzcDBfdWFydF9ub3N0cmVhbWN0cmxfZ3JwIjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpcmYsZnVuY3Rpb24gPSAidXNwMF91YXJ0X25vc3RyZWFtY3RybCI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNwMV9waW5zX2E6IHVzcDFAMCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNwMSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLHBpbnMgPSAidXNwMWdycCI7CkBAIC01MTUsMTYgKzUyNywxNiBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJwdWxzZV9jb3VudCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMF9yc3RfcGluc19hOiBja28wX3JzdEAwIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBja28wX3JzdCB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLHBpbnMgPSAiY2tvMF9yc3RncnAiOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJja28wX3JzdCI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzBfcGluc19hOiBja28wQDAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixwaW5zID0gImNrbzBncnAiOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJja28wIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBja28xX3JzdF9waW5zX2E6IGNrbzFfcnN0QDAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzFfcnN0IHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpcmYscGlucyA9ICJja28xX3JzdGdycCI7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLGZ1bmN0aW9uID0gImNrbzFfcnN0IjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMV9waW5zX2E6IGNrbzFAMCB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLHBpbnMgPSAiY2tvMWdycCI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLGZ1bmN0aW9uID0gImNrbzEiOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAJCQl9OwpkaWZmIC0tZ2l0IGEvYXJjaC9hcm0vYm9vdC9kdHMvZXh5bm9zNTI1MC5kdHNpIGIvYXJjaC9hcm0vYm9vdC9kdHMvZXh5bm9zNTI1MC5kdHNpCmluZGV4IGVmNTcyNzcuLjM3NjA5MGYgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL2Jvb3QvZHRzL2V4eW5vczUyNTAuZHRzaQorKysgYi9hcmNoL2FybS9ib290L2R0cy9leHlub3M1MjUwLmR0c2kKQEAgLTQwNSw3ICs0MDUsNyBAQAogCX07CiAKIAlpMnMwOiBpMnNAMDM4MzA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hbmdlczsKIAkJCWR3YzNANGEwMzAwMDAgewotCQkJCWNvbXBhdGlibGUgPSAic3lub3BzeXMsZHdjMyI7CisJCQkJY29tcGF0aWJsZSA9ICJzbnBzLGR3YzMiOwogCQkJCXJlZyA9IDwweDRhMDMwMDAwIDB4MTAwMD47CiAJCQkJaW50ZXJydXB0cyA9IDxHSUNfU1BJIDkyIElSUV9UWVBFX0xFVkVMX0hJR0g+OwogCQkJCXVzYi1waHkgPSA8JnVzYjJfcGh5PiwgPCZ1c2IzX3BoeT47CmRpZmYgLS1naXQgYS9hcmNoL2FybS9ib290L2R0cy9wcmltYTIuZHRzaSBiL2FyY2gvYXJtL2Jvb3QvZHRzL3ByaW1hMi5kdHNpCmluZGV4IDA1ZTk0ODkuLmJiZWI2MjMgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL2Jvb3QvZHRzL3ByaW1hMi5kdHNpCisrKyBiL2FyY2gvYXJtL2Jvb3QvZHRzL3ByaW1hMi5kdHNpCkBAIC01MTUsMTYgKzUxNSwxNiBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJwdWxzZV9jb3VudCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMF9yc3RfcGluc19hOiBja28wX3JzdEAwIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBja28wX3JzdCB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLHBpbnMgPSAiY2tvMF9yc3RncnAiOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJja28wX3JzdCI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzBfcGluc19hOiBja28wQDAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixwaW5zID0gImNrbzBncnAiOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lyZixmdW5jdGlvbiA9ICJja28wIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBja28xX3JzdF9waW5zX2E6IGNrbzFfcnN0QDAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNrbzFfcnN0IHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpcmYscGlucyA9ICJja28xX3JzdGdycCI7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLGZ1bmN0aW9uID0gImNrbzFfcnN0IjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMV9waW5zX2E6IGNrbzFAMCB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2tvMSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLHBpbnMgPSAiY2tvMWdycCI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXJmLGZ1bmN0aW9uID0gImNrbzEiOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAJCQl9OwpkaWZmIC0tZ2l0IGEvYXJjaC9hcm0vYm9vdC9kdHMvc2FtYTVkM3htYi5kd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c3RydWN0IHBsYXRmb3JtX2RldmljZSBzZHAzNDMwX2R2aV9jb25uZWN0b3JfZGV2aWNlID0geworCS5uYW1lICAgICAgICAgICAgICAgICAgID0gImNvbm5lY3Rvci1kdmkiLAorCS5pZCAgICAgICAgICAgICAgICAgICAgID0gMCwKKwkuZGV2LnBsYXRmb3JtX2RhdGEgICAgICA9ICZzZHAzNDMwX2R2aV9jb25uZWN0b3JfcGRhdGEsCiB9OwogCi1zdGF0aWMgc3RydWN0IG9tYXBfZHNzX2RldmljZSBzZHAzNDMwX3R2X2RldmljZSA9IHsKLQkubmFtZQkJCT0gInR2IiwKLQkuZHJpdmVyX25hbWUJCT0gInZlbmMiLAotCS50eXBlCQkJPSBPTUFQX0RJU1BMQVlfVFlQRV9WRU5DLAotCS5waHkudmVuYy50eXBlCQk9IE9NQVBfRFNTX1ZFTkNfVFlQRV9TVklERU8sCitzdGF0aWMgc3RydWN0IGVuY29kZXJfdGZwNDEwX3BsYXRmb3JtX2RhdGEgc2RwMzQzMF90ZnA0MTBfcGRhdGEgPSB7CisJLm5hbWUgICAgICAgICAgICAgICAgICAgPSAidGZwNDEwLjAiLAorCS5zb3VyY2UgICAgICAgICAgICAgICAgID0gImRwaS4wIiwKKwkuZGF0YV9saW5lcyAgICAgICAgICAgICA9IDI0LAorCS5wb3dlcl9kb3duX2dwaW8gICAgICAgID0gLTEsCiB9OwogCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSBzZHAzNDMwX3RmcDQxMF9kZXZpY2UgPSB7CisJLm5hbWUgICAgICAgICAgICAgICAgICAgPSAidGZwNDEwIiwKKwkuaWQgICAgICAgICAgICAgICAgICAgICA9IDAsCisJLmRldi5wbGF0Zm9ybV9kYXRhICAgICAgPSAmc2RwMzQzMF90ZnA0MTBfcGRhdGEsCit9OwogCi1zdGF0aWMgc3RydWN0IG9tYXBfZHNzX2RldmljZSAqc2RwMzQzMF9kc3NfZGV2aWNlc1tdID0gewotCSZzZHAzNDMwX2xj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fY29ubmVjdG9yX3BkYXRhID0geworCS5uYW1lICAgICAgICAgICAgICAgICAgID0gImR2aSIsCisJLnNvdXJjZSAgICAgICAgICAgICAgICAgPSAidGZwNDEwLjAiLAorCS5pMmNfYnVzX251bSAgICAgICAgICAgID0gLTEsCiB9OwogCi1zdGF0aWMgc3RydWN0IG9tYXBfZHNzX2RldmljZSBjbV90MzVfdHZfZGV2aWNlID0gewotCS5uYW1lCQkJPSAidHYiLAotCS5kcml2ZXJfbmFtZQkJPSAidmVuYyIsCi0JLnR5cGUJCQk9IE9NQVBfRElTUExBWV9UWVBFX1ZFTkMsCi0JLnBoeS52ZW5jLnR5cGUJCT0gT01BUF9EU1NfVkVOQ19UWVBFX1NWSURFTywKK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIGNtX3QzNV9kdmlfY29ubmVjdG9yX2RldmljZSA9IHsKKwkubmFtZSAgICAgICAgICAgICAgICAgICA9ICJjb25uZWN0b3ItZHZpIiwKKwkuaWQgICAgICAgICAgICAgICAgICAgICA9IDAsCisJLmRldi5wbGF0Zm9ybV9kYXRhICAgICAgPSAmY21fdDM1X2R2aV9jb25uZWN0b3JfcGRhdGEsCiB9OwogCi1zdGF0aWMgc3RydWN0IG9tYXBfZHNzX2RldmljZSAqY21fdDM1X2Rzc19kZXZpY2VzW10gPSB7Ci0JJmNtX3QzNV9sY2RfZGV2aWNlLAotCSZjbV90MzVfZHZpX2RldmljZSwKLQkmY21fdDM1X3R2X2RldmljZSwKK3N0YXRpYyBzdHJ1Y3QgZW5jb2Rlcl90ZnA0MTBfcGxhdGZvcm1fZGF0YSBjbV90MzVfdGZwNDEwX3BkYXRhID0geworCS5uYW1lICAgICAgICAgICAgICAgICAgID0gInRmcDQxMC4wIiwKKwkuc291cmNlICAgICAgICAgICAgICAgICA9ICJkcGkuMCIsCisJLmRhdGFfbGluZXMgICAgICAgICAgICAgPSAyNCwKKwkucG93ZXJfZG93bl9ncGlvICAgICAgICA9IENNX1Qz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pY2UsCi0JJm9tYXAzX2V2bV90dl9kZXZpY2UsCi0JJm9tYXAzX2V2bV9kdmlfZGV2aWNlLAorc3RhdGljIHN0cnVjdCBlbmNvZGVyX3RmcDQxMF9wbGF0Zm9ybV9kYXRhIG9tYXAzX2V2bV90ZnA0MTBfcGRhdGEgPSB7CisJLm5hbWUgICAgICAgICAgICAgICAgICAgPSAidGZwNDEwLjAiLAorCS5zb3VyY2UgICAgICAgICAgICAgICAgID0gImRwaS4wIiwKKwkuZGF0YV9saW5lcyAgICAgICAgICAgICA9IDI0LAorCS5wb3dlcl9kb3duX2dwaW8gICAgICAgID0gT01BUDNFVk1fRFZJX1BBTkVMX0VOX0dQSU8sCit9OworCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSBvbWFwM19ldm1fdGZwNDEwX2RldmljZSA9IHsKKwkubmFtZSAgICAgICAgICAgICAgICAgICA9ICJ0ZnA0MTAiLAorCS5pZCAgICAgICAgICAgICAgICAgICAgID0gMCwKKwkuZGV2LnBsYXRmb3JtX2RhdGEgICAgICA9ICZvbWFwM19ldm1fdGZwNDEwX3BkYXRhLAorfTsKKworc3RhdGljIHN0cnVjdCBjb25uZWN0b3JfYXR2X3BsYXRmb3JtX2RhdGEgb21hcDNfZXZtX3R2X3BkYXRhID0geworCS5uYW1lID0gInR2IiwKKwkuc291cmNlID0gInZlbmMuMCIsCisJLmNvbm5lY3Rvcl90eXBlID0gT01BUF9EU1NfVkVOQ19UWVBFX1NWSURFTywKKwkuaW52ZXJ0X3BvbGFyaXR5ID0gZmFsc2UsCit9OworCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSBvbWFwM19ldm1fdHZfY29ubmVjdG9yX2RldmljZSA9IHsKKwkubmFtZSAgICAgICAgICAgICAgICAgICA9ICJjb25uZWN0b3ItYW5hbG9nLXR2IiwKKwkuaWQgICAgICAgICAgICAgICAgICAgICA9IDAsCisJLmRldi5wbGF0Zm9ybV9kYXRhICAgICAgPSAmb21h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xKQogCi0gICAgZXJldAorCWVyZXQKIAogX19rdm1fbWlwc19yZXR1cm5fdG9faG9zdDoKLSAgICAvKiBFQkFTRSBpcyBhbHJlYWR5IHBvaW50aW5nIHRvIExpbnV4ICovCi0gICAgTE9OR19MICBrMSwgVkNQVV9IT1NUX1NUQUNLKGsxKQotCWFkZGl1ICAJazEsazEsIC1QVF9TSVpFCisJLyogRUJBU0UgaXMgYWxyZWFkeSBwb2ludGluZyB0byBMaW51eCAqLworCUxPTkdfTAlrMSwgVkNQVV9IT1NUX1NUQUNLKGsxKQorCUlOVF9BRERJVSBrMSxrMSwgLVBUX1NJWkUKIAotICAgIC8qIFJlc3RvcmUgaG9zdCBEREFUQV9MTyAqLwotICAgIExPTkdfTCAgICAgIGswLCBQVF9IT1NUX1VTRVJMT0NBTChrMSkKLSAgICBtdGMwICAgICAgICBrMCwgQ1AwX0REQVRBX0xPCisJLyogUmVzdG9yZSBob3N0IEREQVRBX0xPICovCisJTE9OR19MCWswLCBQVF9IT1NUX1VTRVJMT0NBTChrMSkKKwltdGMwCWswLCBDUDBfRERBVEFfTE8KIAotICAgIC8qIFJlc3RvcmUgaG9zdCBBU0lEICovCi0gICAgTE9OR19MICAgICAgazAsIFBUX0hPU1RfQVNJRChzcCkKLSAgICBhbmRpICAgICAgICBrMCwgMHhmZgotICAgIG10YzAgICAgICAgIGswLENQMF9FTlRSWUhJCi0gICAgZWhiCisJLyogUmVzdG9yZSBob3N0IEFTSUQgKi8KKwlMT05HX0wJazAsIFBUX0hPU1RfQVNJRChzcCkKKwlhbmRpCWswLCAweGZmCisJbXRjMAlrMCxDUDBfRU5UUllISQorCWVoYgogCi0gICAgLyogTG9hZCBjb250ZXh0IHNhdmVkIG9uIHRoZSBob3N0IHN0YWNrICovCi0gICAgTE9OR19MICAkMCwgUFRfUjAoazEpCi0gICAgTE9OR19MICAkMSwgUFRfUjEoazEpCisJLyogTG9hZCBjb250ZXh0IHNhdmVkIG9uIHRoZSBob3N0IHN0YWNrICov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TkRfTDJfQlJfQUxMLCAgICAgICAgICAgICAgICAgMHgwNDg5OCkKK0VWRU5UKFBNX0dDVF9VVElMXzdfVE9fMTBfU0xPVFMsICAgICAgICAgICAgICAweDAyMGEwKQorRVZFTlQoUE1fUE1DMl9TQVZFRCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMjIpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9ERlUsICAgICAgICAgICAgICAgICAgICAgMHgyMDAzYykKK0VWRU5UKFBNX1ZTVTBfMTZGTE9QLCAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMGE0KQorRVZFTlQoUE1fTVJLX0xTVV9ERVJBVF9NSVNTLCAgICAgICAgICAgICAgICAgIDB4M2QwNWEpCitFVkVOVChQTV9NUktfU1RfQ01QTCwgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAzNCkKK0VWRU5UKFBNX05FU1RfUEFJUjNfQURELCAgICAgICAgICAgICAgICAgICAgICAweDQwODgxKQorRVZFTlQoUE1fTDJfU1RfRElTUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYxODApCitFVkVOVChQTV9MMl9DQVNUT1VUX01PRCwgICAgICAgICAgICAgICAgICAgICAgMHgxNjE4MCkKK0VWRU5UKFBNX0lTRUcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAyMGE0KQorRVZFTlQoUE1fTVJLX0lOU1RfVElNRU8sICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMzQpCitFVkVOVChQTV9MMl9SQ1NUX0RJU1BfRkFJTF9BRERSLCAgICAgICAgICAgICAgMHgzNjI4MikKK0VWRU5UKFBNX0xTVTFfRENfUFJFRl9TVFJFQU1fQ09ORklSTSwgICAgICAgICAweDBkMGI2KQorRVZFTlQoUE1fSUVSQVRfV1JfNjRLLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwYmUpCitFVkVOVChQTV9NUktfRFRMQl9NSVNTXzE2TSwgICAgICAgICAgICAgICAgICAgMHg0ZDA1ZSkKK0VWRU5UKFBNX0lFUkFUX01JU1MsICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMGY2KQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9MTUVNLCAgICAgICAgICAgICAgICAgIDB4NGQwNTIpCitFVkVOVChQTV9GTE9QLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDBmNCkKK0VWRU5UKFBNX1RIUkRfUFJJT180XzVfQ1lDLCAgICAgICAgICAgICAgICAgICAweDA0MGI0KQorRVZFTlQoUE1fQlJfUFJFRF9UQSwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwYWEpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9GWFUsICAgICAgICAgICAgICAgICAgICAgMHgyMDAxNCkKK0VWRU5UKFBNX0VYVF9JTlQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMGY4KQorRVZFTlQoUE1fVlNVX0ZTUVJUX0ZESVYsICAgICAgICAgICAgICAgICAgICAgIDB4MGE4ODgpCitFVkVOVChQTV9NUktfTERfTUlTU19FWFBPU0VEX0NZQywgICAgICAgICAgICAgMHgxMDAzZSkKK0VWRU5UKFBNX0xTVTFfTERGLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDg2KQorRVZFTlQoUE1fSUNfV1JJVEVfQUxMLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQ4OGMpCitFVkVOVChQTV9MU1UwX1NSUV9TVEZXRCwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBhMCkKK0VWRU5UKFBNX1BURUdfRlJPTV9STDJMM19NT0QsICAgICAgICAgICAgICAgICAweDFjMDUyKQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MMzFfU0hSLCAgICAgICAgICAgICAgIDB4MWQwNGUpCitFVkVOVChQTV9EQVRBX0ZST01fTDIxX01PRCwgICAgICAgICAgICAgICAgICAgMHgzYzA0NikKK0VWRU5UKFBNX1ZTVTFfU0NBTF9ET1VCTEVfSVNTVUVELCAgICAgICAgICAgICAweDBiMDhhKQorRVZFTlQoUE1fVlNVMF84RkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYTApCitFVkVOVChQTV9QT1dFUl9FVkVOVDEsICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDA2ZSkKK0VWRU5UKFBNX0RJU1BfQ0xCX0hFTERfQkFMLCAgICAgICAgICAgICAgICAgICAweDAyMDkyKQorRVZFTlQoUE1fVlNVMV8yRkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwOWEpCitFVkVOVChQTV9MV1NZTkNfSEVMRCwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjA5YSkKK0VWRU5UKFBNX1BURUdfRlJPTV9ETDJMM19TSFIsICAgICAgICAgICAgICAgICAweDNjMDU0KQorRVZFTlQoUE1fSU5TVF9GUk9NX0wyMV9NT0QsICAgICAgICAgICAgICAgICAgIDB4MzQwNDYpCitFVkVOVChQTV9JRVJBVF9YTEFURV9XUl8xNk1QTFVTLCAgICAgICAgICAgICAgMHgwNDBiYykKK0VWRU5UKFBNX0lDX1JFUV9BTEwsICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0ODg4KQorRVZFTlQoUE1fRFNMQl9NSVNTLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGQwOTApCitFVkVOVChQTV9MM19NSVNTLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxZjA4MikKK0VWRU5UKFBNX0xTVTBfTDFfUFJFRiwgICAgICAgICAgICAgICAgICAgICAgICAweDBkMGI4KQorRVZFTlQoUE1fVlNVX1NDQUxBUl9TSU5HTEVfSVNTVUVELCAgICAgICAgICAgIDB4MGI4ODQpCitFVkVOVChQTV9MU1UxX0RDX1BSRUZfU1RSRUFNX0NPTkZJUk1fU1RSSURFLCAgMHgwZDBiZSkKK0VWRU5UKFBNX0wyX0lOU1QsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MDgwKQorRVZFTlQoUE1fVlNVMF9GUlNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYjQpCitFVkVOVChQTV9GTFVTSF9ESVNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjA4MikKK0VWRU5UKFBNX1BURUdfRlJPTV9MMk1JU1MsICAgICAgICAgICAgICAgICAgICAweDRjMDU4KQorRVZFTlQoUE1fVlNVMV9EUV9JU1NVRUQsICAgICAgICAgICAgICAgICAgICAgIDB4MGIwOWEpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9MU1UsICAgICAgICAgICAgICAgICAgICAgMHgyMDAxMikKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fRE1FTSwgICAgICAgICAgICAgICAgICAweDFkMDRhKQorRVZFTlQoUE1fTFNVX0ZMVVNIX1VMRCwgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4YjApCitFVkVOVChQTV9QVEVHX0ZST01fTE1FTSwgICAgICAgICAgICAgICAgICAgICAgMHg0YzA1MikKK0VWRU5UKFBNX01SS19ERVJBVF9NSVNTXzE2TSwgICAgICAgICAgICAgICAgICAweDNkMDVjKQorRVZFTlQoUE1fVEhSRF9BTExfUlVOX0NZQywgICAgICAgICAgICAgICAgICAgIDB4MjAwMGMpCitFVkVOVChQTV9NRU0wX1BSRUZFVENIX0RJU1AsICAgICAgICAgICAgICAgICAgMHgyMDA4MykKK0VWRU5UKFBNX01SS19TVEFMTF9DTVBMVV9DWUNfQ09VTlQsICAgICAgICAgICAweDMwMDNmKQorRVZFTlQoUE1fREFUQV9GUk9NX0RMMkwzX01PRCwgICAgICAgICAgICAgICAgIDB4M2MwNGMpCitFVkVOVChQTV9WU1VfRlJTUCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYThiNCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTDIxX01PRCwgICAgICAgICAgICAgICAweDNkMDQ2KQorRVZFTlQoUE1fUE1DMV9PVkVSRkxPVywgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMTApCitFVkVOVChQTV9WU1UwX1NJTkdMRSwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTBhOCkKK0VWRU5UKFBNX01SS19QVEVHX0ZST01fTDNNSVNTLCAgICAgICAgICAgICAgICAweDJkMDU4KQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9MMzFfU0hSLCAgICAgICAgICAgICAgIDB4MmQwNTYpCitFVkVOVChQTV9WU1UwX1ZFQ1RPUl9TUF9JU1NVRUQsICAgICAgICAgICAgICAgMHgwYjA5MCkKK0VWRU5UKFBNX1ZTVTFfRkVTVCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMGJhKQorRVZFTlQoUE1fTVJLX0lOU1RfRElTUCwgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMzApCitFVkVOVChQTV9WU1UwX0NPTVBMRVhfSVNTVUVELCAgICAgICAgICAgICAgICAgMHgwYjA5NikKK0VWRU5UKFBNX0xTVTFfRkxVU0hfVVNULCAgICAgICAgICAgICAgICAgICAgICAweDBjMGI2KQorRVZFTlQoUE1fSU5TVF9DTVBMLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDIpCitFVkVOVChQTV9GWFVfSURMRSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwZSkKK0VWRU5UKFBNX0xTVTBfRkxVU0hfVUxELCAgICAgICAgICAgICAgICAgICAgICAweDBjMGIwKQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9ETDJMM19NT0QsICAgICAgICAgICAgIDB4M2QwNGMpCitFVkVOVChQTV9MU1VfTE1RX1NSUV9FTVBUWV9BTExfQ1lDLCAgICAgICAgICAgMHgzMDAxYykKK0VWRU5UKFBNX0xTVTFfUkVKRUNUX0xNUV9GVUxMLCAgICAgICAgICAgICAgICAweDBjMGE2KQorRVZFTlQoUE1fSU5TVF9QVEVHX0ZST01fTDIxX01PRCwgICAgICAgICAgICAgIDB4M2UwNTYpCitFVkVOVChQTV9JTlNUX0ZST01fUkwyTDNfTU9ELCAgICAgICAgICAgICAgICAgMHgxNDA0MikKK0VWRU5UKFBNX1NITF9DUkVBVEVELCAgICAgICAgICAgICAgICAgICAgICAgICAweDA1MDgyKQorRVZFTlQoUE1fTDJfU1RfSElULCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYxODIpCitFVkVOVChQTV9EQVRBX0ZST01fRE1FTSwgICAgICAgICAgICAgICAgICAgICAgMHgxYzA0YSkKK0VWRU5UKFBNX0wzX0xEX01JU1MsICAgICAgICAgICAgICAgICAgICAgICAgICAweDJmMDgyKQorRVZFTlQoUE1fRlhVMV9CVVNZX0ZYVTBfSURMRSwgICAgICAgICAgICAgICAgIDB4NDAwMGUpCitFVkVOVChQTV9ESVNQX0NMQl9IRUxEX1JFUywgICAgICAgICAgICAgICAgICAgMHgwMjA5NCkKK0VWRU5UKFBNX0wyX1NOX1NYX0lfRE9ORSwgICAgICAgICAgICAgICAgICAgICAweDM2MzgyKQorRVZFTlQoUE1fR1JQX0NNUEwsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMDQpCitFVkVOVChQTV9TVENYX0NNUEwsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYzA5OCkKK0VWRU5UKFBNX1ZTVTBfMkZMT1AsICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMDk4KQorRVZFTlQoUE1fTDNfUFJFRl9NSVNTLCAgICAgICAgICAgICAgICAgICAgICAgIDB4M2YwODIpCitFVkVOVChQTV9MU1VfU1JRX1NZTkNfQ1lDLCAgICAgICAgICAgICAgICAgICAgMHgwZDA5NikKK0VWRU5UKFBNX0xTVV9SRUpFQ1RfRVJBVF9NSVNTLCAgICAgICAgICAgICAgICAweDIwMDY0KQorRVZFTlQoUE1fTDFfSUNBQ0hFX01JU1MsICAgICAgICAgICAgICAgICAgICAgIDB4MjAwZmMpCitFVkVOVChQTV9MU1UxX0ZMVVNIX1NSUSwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiZSkKK0VWRU5UKFBNX0xEX1JFRl9MMV9MU1UwLCAgICAgICAgICAgICAgICAgICAgICAweDBjMDgwKQorRVZFTlQoUE1fVlNVMF9GRVNULCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYjgpCitFVkVOVChQTV9WU1VfVkVDVE9SX1NJTkdMRV9JU1NVRUQsICAgICAgICAgICAgMHgwYjg5MCkKK0VWRU5UKFBNX0ZSRVFfVVAsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDBjKQorRVZFTlQoUE1fREFUQV9GUk9NX0xNRU0sICAgICAgICAgICAgICAgICAgICAgIDB4M2MwNGEpCitFVkVOVChQTV9MU1UxX0xEWCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYzA4YSkKK0VWRU5UKFBNX1BNQzNfT1ZFUkZMT1csICAgICAgICAgICAgICAgICAgICAgICAweDQwMDEwKQorRVZFTlQoUE1fTVJLX0JSX01QUkVELCAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMzYpCitFVkVOVChQTV9TSExfTUFUQ0gsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNTA4NikKK0VWRU5UKFBNX01SS19CUl9UQUtFTiwgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDM2KQorRVZFTlQoUE1fQ01QTFVfU1RBTExfQlJVLCAgICAgICAgICAgICAgICAgICAgIDB4NDAwNGUpCitFVkVOVChQTV9JU0xCX01JU1MsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZDA5MikKK0VWRU5UKFBNX0NZQywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDFlKQorRVZFTlQoUE1fRElTUF9IRUxEX1RIRVJNQUwsICAgICAgICAgICAgICAgICAgIDB4MzAwMDYpCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9STDJMM19TSFIsICAgICAgICAgICAgMHgyZTA1NCkKK0VWRU5UKFBNX0xTVTFfU1JRX1NURldELCAgICAgICAgICAgICAgICAgICAgICAweDBjMGEyKQorRVZFTlQoUE1fR0NUX05PU0xPVF9CUl9NUFJFRCwgICAgICAgICAgICAgICAgIDB4NDAwMWEpCitFVkVOVChQTV8xUExVU19QUENfQ01QTCwgICAgICAgICAgICAgICAgICAgICAgMHgxMDBmMikKK0VWRU5UKFBNX1BURUdfRlJPTV9ETUVNLCAgICAgICAgICAgICAgICAgICAgICAweDJjMDUyKQorRVZFTlQoUE1fVlNVXzJGTE9QLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGE4OTgpCitFVkVOVChQTV9HQ1RfRlVMTF9DWUMsICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDA4NikKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTDNfQ1lDLCAgICAgICAgICAgICAgICAweDQwMDIwKQorRVZFTlQoUE1fTFNVX1NSUV9TMF9BTExPQywgICAgICAgICAgICAgICAgICAgIDB4MGQwOWQpCitFVkVOVChQTV9NUktfREVSQVRfTUlTU180SywgICAgICAgICAgICAgICAgICAgMHgxZDA1YykKK0VWRU5UKFBNX0JSX01QUkVEX1RBLCAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MGFlKQorRVZFTlQoUE1fSU5TVF9QVEVHX0ZST01fTDJNSVNTLCAgICAgICAgICAgICAgIDB4NGUwNTgpCitFVkVOVChQTV9EUFVfSEVMRF9QT1dFUiwgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwNikKK0VWRU5UKFBNX1JVTl9JTlNUX0NNUEwsICAgICAgICAgICAgICAgICAgICAgICAweDQwMGZhKQorRVZFTlQoUE1fTVJLX1ZTVV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMzIpCitFVkVOVChQTV9MU1VfU1JRX1MwX1ZBTElELCAgICAgICAgICAgICAgICAgICAgMHgwZDA5YykKK0VWRU5UKFBNX0dDVF9FTVBUWV9DWUMsICAgICAgICAgICAgICAgICAgICAgICAweDIwMDA4KQorRVZFTlQoUE1fSU9QU19ESVNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMTQpCitFVkVOVChQTV9SVU5fU1BVUlIsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwOCkKK0VWRU5UKFBNX1BURUdfRlJPTV9MMjFfTU9ELCAgICAgICAgICAgICAgICAgICAweDNjMDU2KQorRVZFTlQoUE1fVlNVMF8xRkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwODApCitFVkVOVChQTV9TTk9PUF9UTEJJRSwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZDBiMikKK0VWRU5UKFBNX0RBVEFfRlJPTV9MM01JU1MsICAgICAgICAgICAgICAgICAgICAweDJjMDQ4KQorRVZFTlQoUE1fVlNVX1NJTkdMRSwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGE4YTgpCitFVkVOVChQTV9EVExCX01JU1NfMTZHLCAgICAgICAgICAgICAgICAgICAgICAgMHgxYzA1ZSkKK0VWRU5UKFBNX0NNUExVX1NUQUxMX1ZFQ1RPUiwgICAgICAgICAgICAgICAgICAweDIwMDFjKQorRVZFTlQoUE1fRkxVU0gsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwZjgpCitFVkVOVChQTV9MMl9MRF9ISVQsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNjE4MikKK0VWRU5UKFBNX05FU1RfUEFJUjJfQU5ELCAgICAgICAgICAgICAgICAgICAgICAweDMwODgzKQorRVZFTlQoUE1fVlNVMV8xRkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwODIpCitFVkVOVChQTV9JQ19QUkVGX1JFUSwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDA4YSkKK0VWRU5UKFBNX0wzX0xEX0hJVCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJmMDgwKQorRVZFTlQoUE1fR0NUX05PU0xPVF9JQ19NSVNTLCAgICAgICAgICAgICAgICAgIDB4MjAwMWEpCitFVkVOVChQTV9ESVNQX0hFTEQsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNikKK0VWRU5UKFBNX0wyX0xELCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE2MDgwKQorRVZFTlQoUE1fTFNVX0ZMVVNIX1NSUSwgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4YmMpCitFVkVOVChQTV9CQ19QTFVTXzhfQ09OViwgICAgICAgICAgICAgICAgICAgICAgMHgwNDBiOCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTDMxX01PRF9DWUMsICAgICAgICAgICAweDQwMDI2KQorRVZFTlQoUE1fQ01QTFVfU1RBTExfVkVDVE9SX0xPTkcsICAgICAgICAgICAgIDB4NDAwNGEpCitFVkVOVChQTV9MMl9SQ1NUX0JVU1lfUkNfRlVMTCwgICAgICAgICAgICAgICAgMHgyNjI4MikKK0VWRU5UKFBNX1RCX0JJVF9UUkFOUywgICAgICAgICAgICAgICAgICAgICAgICAweDMwMGY4KQorRVZFTlQoUE1fVEhFUk1BTF9NQVgsICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDYpCitFVkVOVChQTV9MU1UxX0ZMVVNIX1VMRCwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiMikKK0VWRU5UKFBNX0xTVTFfUkVKRUNUX0xIUywgICAgICAgICAgICAgICAgICAgICAweDBjMGFlKQorRVZFTlQoUE1fTFNVX0xSUV9TMF9BTExPQywgICAgICAgICAgICAgICAgICAgIDB4MGQwOWYpCitFVkVOVChQTV9MM19DT19MMzEsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0ZjA4MCkKK0VWRU5UKFBNX1BPV0VSX0VWRU5UNCwgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDZlKQorRVZFTlQoUE1fREFUQV9GUk9NX0wzMV9TSFIsICAgICAgICAgICAgICAgICAgIDB4MWMwNGUpCitFVkVOVChQTV9CUl9VTkNPTkQsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDA5ZSkKK0VWRU5UKFBNX0xTVTFfRENfUFJFRl9TVFJFQU1fQUxMT0MsICAgICAgICAgICAweDBkMGFhKQorRVZFTlQoUE1fUE1DNF9SRVdJTkQsICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMjApCitFVkVOVChQTV9MMl9SQ0xEX0RJU1AsICAgICAgICAgICAgICAgICAgICAgICAgMHgxNjI4MCkKK0VWRU5UKFBNX1RIUkRfUFJJT18yXzNfQ1lDLCAgICAgICAgICAgICAgICAgICAweDA0MGIyKQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9MMk1JU1MsICAgICAgICAgICAgICAgIDB4NGQwNTgpCitFVkVOVChQTV9JQ19ERU1BTkRfTDJfQkhUX1JFRElSRUNULCAgICAgICAgICAgMHgwNDA5OCkKK0VWRU5UKFBNX0xTVV9ERVJBVF9NSVNTLCAgICAgICAgICAgICAgICAgICAgICAweDIwMGY2KQorRVZFTlQoUE1fSUNfUFJFRl9DQU5DRUxfTDIsICAgICAgICAgICAgICAgICAgIDB4MDQwOTQpCitFVkVOVChQTV9NUktfRklOX1NUQUxMX0NZQ19DT1VOVCwgICAgICAgICAgICAgMHgxMDAzZCkKK0VWRU5UKFBNX0JSX1BSRURfQ0NBQ0hFLCAgICAgICAgICAgICAgICAgICAgICAweDA0MGEwKQorRVZFTlQoUE1fR0NUX1VUSUxfMV9UT18yX1NMT1RTLCAgICAgICAgICAgICAgIDB4MDIwOWMpCitFVkVOVChQTV9NUktfU1RfQ01QTF9JTlQsICAgICAgICAgICAgICAgICAgICAgMHgzMDAzNCkKK0VWRU5UKFBNX0xTVV9UV09fVEFCTEVXQUxLX0NZQywgICAgICAgICAgICAgICAweDBkMGE2KQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MM01JU1MsICAgICAgICAgICAgICAgIDB4MmQwNDgpCitFVkVOVChQTV9HQ1RfTk9TTE9UX0NZQywgICAgICAgICAgICAgICAgICAgICAgMHgxMDBmOCkKK0VWRU5UKFBNX0xTVV9TRVRfTVBSRUQsICAgICAgICAgICAgICAgICAgICAgICAweDBjMGE4KQorRVZFTlQoUE1fRkxVU0hfRElTUF9UTEJJRSwgICAgICAgICAgICAgICAgICAgIDB4MDIwOGEpCitFVkVOVChQTV9WU1UxX0ZDT05WLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTBiMikKK0VWRU5UKFBNX0RFUkFUX01JU1NfMTZHLCAgICAgICAgICAgICAgICAgICAgICAweDRjMDVjKQorRVZFTlQoUE1fSU5TVF9GUk9NX0xNRU0sICAgICAgICAgICAgICAgICAgICAgIDB4MzQwNGEpCitFVkVOVChQTV9JQ19ERU1BTkRfTDJfQlJfUkVESVJFQ1QsICAgICAgICAgICAgMHgwNDA5YSkKK0VWRU5UKFBNX0NNUExVX1NUQUxMX1NDQUxBUl9MT05HLCAgICAgICAgICAgICAweDIwMDE4KQorRVZFTlQoUE1fSU5TVF9QVEVHX0ZST01fTDIsICAgICAgICAgICAgICAgICAgIDB4MWUwNTApCitFVkVOVChQTV9QVEVHX0ZST01fTDIsICAgICAgICAgICAgICAgICAgICAgICAgMHgxYzA1MCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTDIxX1NIUl9DWUMsICAgICAgICAgICAweDIwMDI0KQorRVZFTlQoUE1fTVJLX0RUTEJfTUlTU180SywgICAgICAgICAgICAgICAgICAgIDB4MmQwNWEpCitFVkVOVChQTV9WU1UwX0ZQU0NSLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYjA5YykKK0VWRU5UKFBNX1ZTVTFfVkVDVF9ET1VCTEVfSVNTVUVELCAgICAgICAgICAgICAweDBiMDgyKQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9STDJMM19NT0QsICAgICAgICAgICAgIDB4MWQwNTIpCitFVkVOVChQTV9NRU0wX1JRX0RJU1AsICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDA4MykKK0VWRU5UKFBNX0wyX0xEX01JU1MsICAgICAgICAgICAgICAgICAgICAgICAgICAweDI2MDgwKQorRVZFTlQoUE1fVk1YX1JFU1VMVF9TQVRfMSwgICAgICAgICAgICAgICAgICAgIDB4MGIwYTApCitFVkVOVChQTV9MMV9QUkVGLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZDhiOCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTE1FTV9DWUMsICAgICAgICAgICAgICAweDIwMDJjKQorRVZFTlQoUE1fR1JQX0lDX01JU1NfTk9OU1BFQywgICAgICAgICAgICAgICAgIDB4MTAwMGMpCitFVkVOVChQTV9QQl9OT0RFX1BVTVAsICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDA4MSkKK0VWRU5UKFBNX1NITF9NRVJHRUQsICAgICAgICAgICAgICAgICAgICAgICAgICAweDA1MDg0KQorRVZFTlQoUE1fTkVTVF9QQUlSMV9BREQsICAgICAgICAgICAgICAgICAgICAgIDB4MjA4ODEpCitFVkVOVChQTV9EQVRBX0ZST01fTDMsICAgICAgICAgICAgICAgICAgICAgICAgMHgxYzA0OCkKK0VWRU5UKFBNX0xTVV9GTFVTSCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAyMDhlKQorRVZFTlQoUE1fTFNVX1NSUV9TWU5DX0NPVU5ULCAgICAgICAgICAgICAgICAgIDB4MGQwOTcpCitFVkVOVChQTV9QTUMyX09WRVJGTE9XLCAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAxMCkKK0VWRU5UKFBNX0xTVV9MREYsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjODg0KQorRVZFTlQoUE1fUE9XRVJfRVZFTlQzLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwNmUpCitFVkVOVChQTV9ESVNQX1dULCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAwOCkKK0VWRU5UKFBNX0NNUExVX1NUQUxMX1JFSkVDVCwgICAgICAgICAgICAgICAgICAweDQwMDE2KQorRVZFTlQoUE1fSUNfQkFOS19DT05GTElDVCwgICAgICAgICAgICAgICAgICAgIDB4MDQwODIpCitFVkVOVChQTV9CUl9NUFJFRF9DUl9UQSwgICAgICAgICAgICAgICAgICAgICAgMHgwNDhhZSkKK0VWRU5UKFBNX0wyX0lOU1RfTUlTUywgICAgICAgICAgICAgICAgICAgICAgICAweDM2MDgyKQorRVZFTlQoUE1fQ01QTFVfU1RBTExfRVJBVF9NSVNTLCAgICAgICAgICAgICAgIDB4NDAwMTgpCitFVkVOVChQTV9ORVNUX1BBSVIyX0FERCwgICAgICAgICAgICAgICAgICAgICAgMHgzMDg4MSkKK0VWRU5UKFBNX01SS19MU1VfRkxVU0gsICAgICAgICAgICAgICAgICAgICAgICAweDBkMDhjKQorRVZFTlQoUE1fTDJfTERTVCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTY4ODApCitFVkVOVChQTV9JTlNUX0ZST01fTDMxX1NIUiwgICAgICAgICAgICAgICAgICAgMHgxNDA0ZSkKK0VWRU5UKFBNX1ZTVTBfRklOLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMGJjKQorRVZFTlQoUE1fTEFSWF9MU1UsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4OTQpCitFVkVOVChQTV9JTlNUX0ZST01fUk1FTSwgICAgICAgICAgICAgICAgICAgICAgMHgzNDA0MikKK0VWRU5UKFBNX0RJU1BfQ0xCX0hFTERfVExCSUUsICAgICAgICAgICAgICAgICAweDAyMDk2KQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9ETUVNX0NZQywgICAgICAgICAgICAgIDB4MjAwMmUpCitFVkVOVChQTV9CUl9QUkVEX0NSLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDBhOCkKK0VWRU5UKFBNX0xTVV9SRUpFQ1QsICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDY0KQorRVZFTlQoUE1fR0NUX1VUSUxfM19UT182X1NMT1RTLCAgICAgICAgICAgICAgIDB4MDIwOWUpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9FTkRfR0NUX05PU0xPVCwgICAgICAgICAgMHgxMDAyOCkKK0VWRU5UKFBNX0xTVTBfUkVKRUNUX0xNUV9GVUxMLCAgICAgICAgICAgICAgICAweDBjMGE0KQorRVZFTlQoUE1fVlNVX0ZFU1QsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGE4YjgpCitFVkVOVChQTV9ORVNUX1BBSVIwX0FORCwgICAgICAgICAgICAgICAgICAgICAgMHgxMDg4MykKK0VWRU5UKFBNX1BURUdfRlJPTV9MMywgICAgICAgICAgICAgICAgICAgICAgICAweDJjMDUwKQorRVZFTlQoUE1fUE9XRVJfRVZFTlQyLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwNmUpCitFVkVOVChQTV9JQ19QUkVGX0NBTkNFTF9QQUdFLCAgICAgICAgICAgICAgICAgMHgwNDA5MCkKK0VWRU5UKFBNX1ZTVTBfRlNRUlRfRkRJViwgICAgICAgICAgICAgICAgICAgICAweDBhMDg4KQorRVZFTlQoUE1fTVJLX0dSUF9DTVBMLCAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMzApCitFVkVOVChQTV9WU1UwX1NDQUxfRE9VQkxFX0lTU1VFRCwgICAgICAgICAgICAgMHgwYjA4OCkKK0VWRU5UKFBNX0dSUF9ESVNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwMDBhKQorRVZFTlQoUE1fTFNVMF9MRFgsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGMwODgpCitFVkVOVChQTV9EQVRBX0ZST01fTDIsICAgICAgICAgICAgICAgICAgICAgICAgMHgxYzA0MCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fUkwyTDNfTU9ELCAgICAgICAgICAgICAweDFkMDQyKQorRVZFTlQoUE1fTERfUkVGX0wxLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4ODApCitFVkVOVChQTV9WU1UwX1ZFQ1RfRE9VQkxFX0lTU1VFRCwgICAgICAgICAgICAgMHgwYjA4MCkKK0VWRU5UKFBNX1ZTVTFfMkZMT1BfRE9VQkxFLCAgICAgICAgICAgICAgICAgICAweDBhMDhlKQorRVZFTlQoUE1fVEhSRF9QUklPXzZfN19DWUMsICAgICAgICAgICAgICAgICAgIDB4MDQwYjYpCitFVkVOVChQTV9CQ19QTFVTXzhfUlNMVl9UQUtFTiwgICAgICAgICAgICAgICAgMHgwNDBiYSkKK0VWRU5UKFBNX0JSX01QUkVEX0NSLCAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MGFjKQorRVZFTlQoUE1fTDNfQ09fTUVNLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NGYwODIpCitFVkVOVChQTV9MRF9NSVNTX0wxLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDBmMCkKK0VWRU5UKFBNX0RBVEFfRlJPTV9STDJMM19NT0QsICAgICAgICAgICAgICAgICAweDFjMDQyKQorRVZFTlQoUE1fTFNVX1NSUV9GVUxMX0NZQywgICAgICAgICAgICAgICAgICAgIDB4MTAwMWEpCitFVkVOVChQTV9UQUJMRVdBTEtfQ1lDLCAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAyNikKK0VWRU5UKFBNX01SS19QVEVHX0ZST01fUk1FTSwgICAgICAgICAgICAgICAgICAweDNkMDUyKQorRVZFTlQoUE1fTFNVX1NSUV9TVEZXRCwgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4YTApCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9STUVNLCAgICAgICAgICAgICAgICAgMHgzZTA1MikKK0VWRU5UKFBNX0ZYVTBfRklOLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0KQorRVZFTlQoUE1fTFNVMV9MMV9TV19QUkVGLCAgICAgICAgICAgICAgICAgICAgIDB4MGMwOWUpCitFVkVOVChQTV9QVEVHX0ZST01fTDMxX01PRCwgICAgICAgICAgICAgICAgICAgMHgxYzA1NCkKK0VWRU5UKFBNX1BNQzVfT1ZFUkZMT1csICAgICAgICAgICAgICAgICAgICAgICAweDEwMDI0KQorRVZFTlQoUE1fTERfUkVGX0wxX0xTVTEsICAgICAgICAgICAgICAgICAgICAgIDB4MGMwODIpCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9MMjFfU0hSLCAgICAgICAgICAgICAgMHg0ZTA1NikKK0VWRU5UKFBNX0NNUExVX1NUQUxMX1RIUkQsICAgICAgICAgICAgICAgICAgICAweDEwMDFjKQorRVZFTlQoUE1fREFUQV9GUk9NX1JNRU0sICAgICAgICAgICAgICAgICAgICAgIDB4M2MwNDIpCitFVkVOVChQTV9WU1UwX1NDQUxfU0lOR0xFX0lTU1VFRCwgICAgICAgICAgICAgMHgwYjA4NCkKK0VWRU5UKFBNX0JSX01QUkVEX0xTVEFDSywgICAgICAgICAgICAgICAgICAgICAweDA0MGE2KQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9STDJMM19NT0RfQ1lDLCAgICAgICAgIDB4NDAwMjgpCitFVkVOVChQTV9MU1UwX0ZMVVNIX1VTVCwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiNCkKK0VWRU5UKFBNX0xTVV9OQ1NULCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDkwKQorRVZFTlQoUE1fQlJfVEFLRU4sICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMDQpCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9MTUVNLCAgICAgICAgICAgICAgICAgMHg0ZTA1MikKK0VWRU5UKFBNX0dDVF9OT1NMT1RfQlJfTVBSRURfSUNfTUlTUywgICAgICAgICAweDQwMDFjKQorRVZFTlQoUE1fRFRMQl9NSVNTXzRLLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MmMwNWEpCitFVkVOVChQTV9QTUM0X1NBVkVELCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAyMikKK0VWRU5UKFBNX1ZTVTFfUEVSTVVURV9JU1NVRUQsICAgICAgICAgICAgICAgICAweDBiMDkyKQorRVZFTlQoUE1fU0xCX01JU1MsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGQ4OTApCitFVkVOVChQTV9MU1UxX0ZMVVNIX0xSUSwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiYSkKK0VWRU5UKFBNX0RUTEJfTUlTUywgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwMGZjKQorRVZFTlQoUE1fVlNVMV9GUlNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYjYpCitFVkVOVChQTV9WU1VfVkVDVE9SX0RPVUJMRV9JU1NVRUQsICAgICAgICAgICAgMHgwYjg4MCkKK0VWRU5UKFBNX0wyX0NBU1RPVVRfU0hSLCAgICAgICAgICAgICAgICAgICAgICAweDE2MTgyKQorRVZFTlQoUE1fREFUQV9GUk9NX0RMMkwzX1NIUiwgICAgICAgICAgICAgICAgIDB4M2MwNDQpCitFVkVOVChQTV9WU1UxX1NURiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYjA4ZSkKK0VWRU5UKFBNX1NUX0ZJTiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMGYwKQorRVZFTlQoUE1fUFRFR19GUk9NX0wyMV9TSFIsICAgICAgICAgICAgICAgICAgIDB4NGMwNTYpCitFVkVOVChQTV9MMl9MT0NfR1VFU1NfV1JPTkcsICAgICAgICAgICAgICAgICAgMHgyNjQ4MCkKK0VWRU5UKFBNX01SS19TVENYX0ZBSUwsICAgICAgICAgICAgICAgICAgICAgICAweDBkMDhlKQorRVZFTlQoUE1fTFNVMF9SRUpFQ1RfTEhTLCAgICAgICAgICAgICAgICAgICAgIDB4MGMwYWMpCitFVkVOVChQTV9JQ19QUkVGX0NBTkNFTF9ISVQsICAgICAgICAgICAgICAgICAgMHgwNDA5MikKK0VWRU5UKFBNX0wzX1BSRUZfQlVTWSwgICAgICAgICAgICAgICAgICAgICAgICAweDRmMDgwKQorRVZFTlQoUE1fTVJLX0JSVV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwM2EpCitFVkVOVChQTV9MU1UxX05DTEQsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYzA4ZSkKK0VWRU5UKFBNX0lOU1RfUFRFR19GUk9NX0wzMV9NT0QsICAgICAgICAgICAgICAweDFlMDU0KQorRVZFTlQoUE1fTFNVX05DTEQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGM4OGMpCitFVkVOVChQTV9MU1VfTERYLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYzg4OCkKK0VWRU5UKFBNX0wyX0xPQ19HVUVTU19DT1JSRUNULCAgICAgICAgICAgICAgICAweDE2NDgwKQorRVZFTlQoUE1fVEhSRVNIX1RJTUVPLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMzgpCitFVkVOVChQTV9MM19QUkVGX1NULCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZDBhZSkKK0VWRU5UKFBNX0RJU1BfQ0xCX0hFTERfU1lOQywgICAgICAgICAgICAgICAgICAweDAyMDk4KQorRVZFTlQoUE1fVlNVX1NJTVBMRV9JU1NVRUQsICAgICAgICAgICAgICAgICAgIDB4MGI4OTQpCitFVkVOVChQTV9WU1UxX1NJTkdMRSwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTBhYSkKK0VWRU5UKFBNX0RBVEFfVEFCTEVXQUxLX0NZQywgICAgICAgICAgICAgICAgICAweDMwMDFhKQorRVZFTlQoUE1fTDJfUkNfU1RfRE9ORSwgICAgICAgICAgICAgICAgICAgICAgIDB4MzYzODApCitFVkVOVChQTV9NUktfUFRFR19GUk9NX0wyMV9NT0QsICAgICAgICAgICAgICAgMHgzZDA1NikKK0VWRU5UKFBNX0xBUlhfTFNVMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDk2KQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9STUVNLCAgICAgICAgICAgICAgICAgIDB4M2QwNDIpCitFVkVOVChQTV9ESVNQX0NMQl9IRUxELCAgICAgICAgICAgICAgICAgICAgICAgMHgwMjA5MCkKK0VWRU5UKFBNX0RFUkFUX01JU1NfNEssICAgICAgICAgICAgICAgICAgICAgICAweDFjMDVjKQorRVZFTlQoUE1fTDJfUkNMRF9ESVNQX0ZBSUxfQUREUiwgICAgICAgICAgICAgIDB4MTYyODIpCitFVkVOVChQTV9TRUdfRVhDRVBUSU9OLCAgICAgICAgICAgICAgICAgICAgICAgMHgwMjhhNCkKK0VWRU5UKFBNX0ZMVVNIX0RJU1BfU0IsICAgICAgICAgICAgICAgICAgICAgICAweDAyMDhjKQorRVZFTlQoUE1fTDJfRENfSU5WLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjYxODIpCitFVkVOVChQTV9QVEVHX0ZST01fREwyTDNfTU9ELCAgICAgICAgICAgICAgICAgMHg0YzA1NCkKK0VWRU5UKFBNX0RTRUcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAyMGE2KQorRVZFTlQoUE1fQlJfUFJFRF9MU1RBQ0ssICAgICAgICAgICAgICAgICAgICAgIDB4MDQwYTIpCitFVkVOVChQTV9WU1UwX1NURiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYjA4YykKK0VWRU5UKFBNX0xTVV9GWF9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDY2KQorRVZFTlQoUE1fREVSQVRfTUlTU18xNk0sICAgICAgICAgICAgICAgICAgICAgIDB4M2MwNWMpCitFVkVOVChQTV9NUktfUFRFR19GUk9NX0RMMkwzX01PRCwgICAgICAgICAgICAgMHg0ZDA1NCkKK0VWRU5UKFBNX0dDVF9VVElMXzExX1BMVVNfU0xPVFMsICAgICAgICAgICAgICAweDAyMGEyKQorRVZFTlQoUE1fSU5TVF9GUk9NX0wzLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQwNDgpCitFVkVOVChQTV9NUktfSUZVX0ZJTiwgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAzYSkKK0VWRU5UKFBNX0lUTEJfTUlTUywgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMGZjKQorRVZFTlQoUE1fVlNVX1NURiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGI4OGMpCitFVkVOVChQTV9MU1VfRkxVU0hfVVNULCAgICAgICAgICAgICAgICAgICAgICAgMHgwYzhiNCkKK0VWRU5UKFBNX0wyX0xEU1RfTUlTUywgICAgICAgICAgICAgICAgICAgICAgICAweDI2ODgwKQorRVZFTlQoUE1fRlhVMV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDQpCitFVkVOVChQTV9TSExfREVBTExPQ0FURUQsICAgICAgICAgICAgICAgICAgICAgMHgwNTA4MCkKK0VWRU5UKFBNX0wyX1NOX01fV1JfRE9ORSwgICAgICAgICAgICAgICAgICAgICAweDQ2MzgyKQorRVZFTlQoUE1fTFNVX1JFSkVDVF9TRVRfTVBSRUQsICAgICAgICAgICAgICAgIDB4MGM4YTgpCitFVkVOVChQTV9MM19QUkVGX0xELCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwZDBhYykKK0VWRU5UKFBNX0wyX1NOX01fUkRfRE9ORSwgICAgICAgICAgICAgICAgICAgICAweDQ2MzgwKQorRVZFTlQoUE1fTVJLX0RFUkFUX01JU1NfMTZHLCAgICAgICAgICAgICAgICAgIDB4NGQwNWMpCitFVkVOVChQTV9WU1VfRkNPTlYsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYThiMCkKK0VWRU5UKFBNX0FOWV9USFJEX1JVTl9DWUMsICAgICAgICAgICAgICAgICAgICAweDEwMGZhKQorRVZFTlQoUE1fTFNVX0xNUV9GVUxMX0NZQywgICAgICAgICAgICAgICAgICAgIDB4MGQwYTQpCitFVkVOVChQTV9NUktfTFNVX1JFSkVDVF9MSFMsICAgICAgICAgICAgICAgICAgMHgwZDA4MikKK0VWRU5UKFBNX01SS19MRF9NSVNTX0wxX0NZQywgICAgICAgICAgICAgICAgICAweDQwMDNlKQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MMl9DWUMsICAgICAgICAgICAgICAgIDB4MjAwMjApCitFVkVOVChQTV9JTlNUX0lNQ19NQVRDSF9ESVNQLCAgICAgICAgICAgICAgICAgMHgzMDAxNikKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fUk1FTV9DWUMsICAgICAgICAgICAgICAweDQwMDJjKQorRVZFTlQoUE1fVlNVMF9TSU1QTEVfSVNTVUVELCAgICAgICAgICAgICAgICAgIDB4MGIwOTQpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9ESVYsICAgICAgICAgICAgICAgICAgICAgMHg0MDAxNCkKK0VWRU5UKFBNX01SS19QVEVHX0ZST01fUkwyTDNfU0hSLCAgICAgICAgICAgICAweDJkMDU0KQorRVZFTlQoUE1fVlNVX0ZNQV9ET1VCTEUsICAgICAgICAgICAgICAgICAgICAgIDB4MGE4OTApCitFVkVOVChQTV9WU1VfNEZMT1AsICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTg5YykKK0VWRU5UKFBNX1ZTVTFfRklOLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMGJlKQorRVZFTlQoUE1fTkVTVF9QQUlSMV9BTkQsICAgICAgICAgICAgICAgICAgICAgIDB4MjA4ODMpCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9STDJMM19NT0QsICAgICAgICAgICAgMHgxZTA1MikKK0VWRU5UKFBNX1JVTl9DWUMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMGY0KQorRVZFTlQoUE1fUFRFR19GUk9NX1JNRU0sICAgICAgICAgICAgICAgICAgICAgIDB4M2MwNTIpCitFVkVOVChQTV9MU1VfTFJRX1MwX1ZBTElELCAgICAgICAgICAgICAgICAgICAgMHgwZDA5ZSkKK0VWRU5UKFBNX0xTVTBfTERGLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDg0KQorRVZFTlQoUE1fRkxVU0hfQ09NUExFVElPTiwgICAgICAgICAgICAgICAgICAgIDB4MzAwMTIpCitFVkVOVChQTV9TVF9NSVNTX0wxLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDBmMCkKK0VWRU5UKFBNX0wyX05PREVfUFVNUCwgICAgICAgICAgICAgICAgICAgICAgICAweDM2NDgwKQorRVZFTlQoUE1fSU5TVF9GUk9NX0RMMkwzX1NIUiwgICAgICAgICAgICAgICAgIDB4MzQwNDQpCitFVkVOVChQTV9NUktfU1RBTExfQ01QTFVfQ1lDLCAgICAgICAgICAgICAgICAgMHgzMDAzZSkKK0VWRU5UKFBNX1ZTVTFfREVOT1JNLCAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMGFlKQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MMzFfU0hSX0NZQywgICAgICAgICAgIDB4MjAwMjYpCitFVkVOVChQTV9ORVNUX1BBSVIwX0FERCwgICAgICAgICAgICAgICAgICAgICAgMHgxMDg4MSkKK0VWRU5UKFBNX0lOU1RfRlJPTV9MM01JU1MsICAgICAgICAgICAgICAgICAgICAweDI0MDQ4KQorRVZFTlQoUE1fRUVfT0ZGX0VYVF9JTlQsICAgICAgICAgICAgICAgICAgICAgIDB4MDIwODApCitFVkVOVChQTV9JTlNUX1BURUdfRlJPTV9ETUVNLCAgICAgICAgICAgICAgICAgMHgyZTA1MikKK0VWRU5UKFBNX0lOU1RfRlJPTV9ETDJMM19NT0QsICAgICAgICAgICAgICAgICAweDM0MDRjKQorRVZFTlQoUE1fUE1DNl9PVkVSRkxPVywgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMjQpCitFVkVOVChQTV9WU1VfMkZMT1BfRE9VQkxFLCAgICAgICAgICAgICAgICAgICAgMHgwYTg4YykKK0VWRU5UKFBNX1RMQl9NSVNTLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDY2KQorRVZFTlQoUE1fRlhVX0JVU1ksICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMGUpCitFVkVOVChQTV9MMl9SQ0xEX0RJU1BfRkFJTF9PVEhFUiwgICAgICAgICAgICAgMHgyNjI4MCkKK0VWRU5UKFBNX0xTVV9SRUpFQ1RfTE1RX0ZVTEwsICAgICAgICAgICAgICAgICAweDBjOGE0KQorRVZFTlQoUE1fSUNfUkVMT0FEX1NIUiwgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwOTYpCitFVkVOVChQTV9HUlBfTVJLLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAzMSkKK0VWRU5UKFBNX01SS19TVF9ORVNULCAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDM0KQorRVZFTlQoUE1fVlNVMV9GU1FSVF9GRElWLCAgICAgICAgICAgICAgICAgICAgIDB4MGEwOGEpCitFVkVOVChQTV9MU1UwX0ZMVVNIX0xSUSwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiOCkKK0VWRU5UKFBNX0xBUlhfTFNVMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDk0KQorRVZFTlQoUE1fSUJVRl9GVUxMX0NZQywgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwODQpCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0RMMkwzX1NIUl9DWUMsICAgICAgICAgMHgyMDAyYSkKK0VWRU5UKFBNX0xTVV9EQ19QUkVGX1NUUkVBTV9BTExPQywgICAgICAgICAgICAweDBkOGE4KQorRVZFTlQoUE1fR1JQX01SS19DWUMsICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMzApCitFVkVOVChQTV9NUktfREFUQV9GUk9NX1JMMkwzX1NIUl9DWUMsICAgICAgICAgMHgyMDAyOCkKK0VWRU5UKFBNX0wyX0dMT0JfR1VFU1NfQ09SUkVDVCwgICAgICAgICAgICAgICAweDE2NDgyKQorRVZFTlQoUE1fTFNVX1JFSkVDVF9MSFMsICAgICAgICAgICAgICAgICAgICAgIDB4MGM4YWMpCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0xNRU0sICAgICAgICAgICAgICAgICAgMHgzZDA0YSkKK0VWRU5UKFBNX0lOU1RfUFRFR19GUk9NX0wzLCAgICAgICAgICAgICAgICAgICAweDJlMDUwKQorRVZFTlQoUE1fRlJFUV9ET1dOLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMGMpCitFVkVOVChQTV9QQl9SRVRSWV9OT0RFX1BVTVAsICAgICAgICAgICAgICAgICAgMHgzMDA4MSkKK0VWRU5UKFBNX0lOU1RfRlJPTV9STDJMM19TSFIsICAgICAgICAgICAgICAgICAweDE0MDRjKQorRVZFTlQoUE1fTVJLX0lOU1RfSVNTVUVELCAgICAgICAgICAgICAgICAgICAgIDB4MTAwMzIpCitFVkVOVChQTV9QVEVHX0ZST01fTDNNSVNTLCAgICAgICAgICAgICAgICAgICAgMHgyYzA1OCkKK0VWRU5UKFBNX1JVTl9QVVJSLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMGY0KQorRVZFTlQoUE1fTVJLX0dSUF9JQ19NSVNTLCAgICAgICAgICAgICAgICAgICAgIDB4NDAwMzgpCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0wzLCAgICAgICAgICAgICAgICAgICAgMHgxZDA0OCkKK0VWRU5UKFBNX0NNUExVX1NUQUxMX0RDQUNIRV9NSVNTLCAgICAgICAgICAgICAweDIwMDE2KQorRVZFTlQoUE1fUFRFR19GUk9NX1JMMkwzX1NIUiwgICAgICAgICAgICAgICAgIDB4MmMwNTQpCitFVkVOVChQTV9MU1VfRkxVU0hfTFJRLCAgICAgICAgICAgICAgICAgICAgICAgMHgwYzhiOCkKK0VWRU5UKFBNX01SS19ERVJBVF9NSVNTXzY0SywgICAgICAgICAgICAgICAgICAweDJkMDVjKQorRVZFTlQoUE1fSU5TVF9QVEVHX0ZST01fREwyTDNfTU9ELCAgICAgICAgICAgIDB4NGUwNTQpCitFVkVOVChQTV9MMl9TVF9NSVNTLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNjA4MikKK0VWRU5UKFBNX01SS19QVEVHX0ZST01fTDIxX1NIUiwgICAgICAgICAgICAgICAweDRkMDU2KQorRVZFTlQoUE1fTFdTWU5DLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGQwOTQpCitFVkVOVChQTV9MU1UwX0RDX1BSRUZfU1RSRUFNX0NPTkZJUk1fU1RSSURFLCAgMHgwZDBiYykKK0VWRU5UKFBNX01SS19MU1VfRkxVU0hfTFJRLCAgICAgICAgICAgICAgICAgICAweDBkMDg4KQorRVZFTlQoUE1fSU5TVF9JTUNfTUFUQ0hfQ01QTCwgICAgICAgICAgICAgICAgIDB4MTAwZjApCitFVkVOVChQTV9ORVNUX1BBSVIzX0FORCwgICAgICAgICAgICAgICAgICAgICAgMHg0MDg4MykKK0VWRU5UKFBNX1BCX1JFVFJZX1NZU19QVU1QLCAgICAgICAgICAgICAgICAgICAweDQwMDgxKQorRVZFTlQoUE1fTVJLX0lOU1RfRklOLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMzApCitFVkVOVChQTV9NUktfUFRFR19GUk9NX0RMMkwzX1NIUiwgICAgICAgICAgICAgMHgzZDA1NCkKK0VWRU5UKFBNX0lOU1RfRlJPTV9MMzFfTU9ELCAgICAgICAgICAgICAgICAgICAweDE0MDQ0KQorRVZFTlQoUE1fTVJLX0RUTEJfTUlTU182NEssICAgICAgICAgICAgICAgICAgIDB4M2QwNWUpCitFVkVOVChQTV9MU1VfRklOLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDA2NikKK0VWRU5UKFBNX01SS19MU1VfUkVKRUNULCAgICAgICAgICAgICAgICAgICAgICAweDQwMDY0KQorRVZFTlQoUE1fTDJfQ09fRkFJTF9CVVNZLCAgICAgICAgICAgICAgICAgICAgIDB4MTYzODIpCitFVkVOVChQTV9NRU0wX1dRX0RJU1AsICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDA4MykKK0VWRU5UKFBNX0RBVEFfRlJPTV9MMzFfTU9ELCAgICAgICAgICAgICAgICAgICAweDFjMDQ0KQorRVZFTlQoUE1fVEhFUk1BTF9XQVJOLCAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTYpCitFVkVOVChQTV9WU1UwXzRGTE9QLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTA5YykKK0VWRU5UKFBNX0JSX01QUkVEX0NDQUNIRSwgICAgICAgICAgICAgICAgICAgICAweDA0MGE0KQorRVZFTlQoUE1fQ01QTFVfU1RBTExfSUZVLCAgICAgICAgICAgICAgICAgICAgIDB4NDAwNGMpCitFVkVOVChQTV9MMV9ERU1BTkRfV1JJVEUsICAgICAgICAgICAgICAgICAgICAgMHgwNDA4YykKK0VWRU5UKFBNX0ZMVVNIX0JSX01QUkVELCAgICAgICAgICAgICAgICAgICAgICAweDAyMDg0KQorRVZFTlQoUE1fTVJLX0RUTEJfTUlTU18xNkcsICAgICAgICAgICAgICAgICAgIDB4MWQwNWUpCitFVkVOVChQTV9NUktfUFRFR19GUk9NX0RNRU0sICAgICAgICAgICAgICAgICAgMHgyZDA1MikKK0VWRU5UKFBNX0wyX1JDU1RfRElTUCwgICAgICAgICAgICAgICAgICAgICAgICAweDM2MjgwKQorRVZFTlQoUE1fQ01QTFVfU1RBTEwsICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMGEpCitFVkVOVChQTV9MU1VfUEFSVElBTF9DREYsICAgICAgICAgICAgICAgICAgICAgMHgwYzBhYSkKK0VWRU5UKFBNX0RJU1BfQ0xCX0hFTERfU0IsICAgICAgICAgICAgICAgICAgICAweDAyMGE4KQorRVZFTlQoUE1fVlNVMF9GTUFfRE9VQkxFLCAgICAgICAgICAgICAgICAgICAgIDB4MGEwOTApCitFVkVOVChQTV9GWFUwX0JVU1lfRlhVMV9JRExFLCAgICAgICAgICAgICAgICAgMHgzMDAwZSkKK0VWRU5UKFBNX0lDX0RFTUFORF9DWUMsICAgICAgICAgICAgICAgICAgICAgICAweDEwMDE4KQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MMjFfU0hSLCAgICAgICAgICAgICAgIDB4M2QwNGUpCitFVkVOVChQTV9NUktfTFNVX0ZMVVNIX1VTVCwgICAgICAgICAgICAgICAgICAgMHgwZDA4NikKK0VWRU5UKFBNX0lOU1RfUFRFR19GUk9NX0wzTUlTUywgICAgICAgICAgICAgICAweDJlMDU4KQorRVZFTlQoUE1fVlNVX0RFTk9STSwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGE4YWMpCitFVkVOVChQTV9NUktfTFNVX1BBUlRJQUxfQ0RGLCAgICAgICAgICAgICAgICAgMHgwZDA4MCkKK0VWRU5UKFBNX0lOU1RfRlJPTV9MMjFfU0hSLCAgICAgICAgICAgICAgICAgICAweDM0MDRlKQorRVZFTlQoUE1fSUNfUFJFRl9XUklURSwgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwOGUpCitFVkVOVChQTV9CUl9QUkVELCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDA5YykKK0VWRU5UKFBNX0lOU1RfRlJPTV9ETUVNLCAgICAgICAgICAgICAgICAgICAgICAweDE0MDRhKQorRVZFTlQoUE1fSUNfUFJFRl9DQU5DRUxfQUxMLCAgICAgICAgICAgICAgICAgIDB4MDQ4OTApCitFVkVOVChQTV9MU1VfRENfUFJFRl9TVFJFQU1fQ09ORklSTSwgICAgICAgICAgMHgwZDhiNCkKK0VWRU5UKFBNX01SS19MU1VfRkxVU0hfU1JRLCAgICAgICAgICAgICAgICAgICAweDBkMDhhKQorRVZFTlQoUE1fTVJLX0ZJTl9TVEFMTF9DWUMsICAgICAgICAgICAgICAgICAgIDB4MTAwM2MpCitFVkVOVChQTV9MMl9SQ1NUX0RJU1BfRkFJTF9PVEhFUiwgICAgICAgICAgICAgMHg0NjI4MCkKK0VWRU5UKFBNX1ZTVTFfRERfSVNTVUVELCAgICAgICAgICAgICAgICAgICAgICAweDBiMDk4KQorRVZFTlQoUE1fUFRFR19GUk9NX0wzMV9TSFIsICAgICAgICAgICAgICAgICAgIDB4MmMwNTYpCitFVkVOVChQTV9EQVRBX0ZST01fTDIxX1NIUiwgICAgICAgICAgICAgICAgICAgMHgzYzA0ZSkKK0VWRU5UKFBNX0xTVTBfTkNMRCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBjMDhjKQorRVZFTlQoUE1fVlNVMV80RkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwOWUpCitFVkVOVChQTV9WU1UxXzhGTE9QLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTBhMikKK0VWRU5UKFBNX1ZTVV84RkxPUCwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhOGEwKQorRVZFTlQoUE1fTFNVX0xNUV9TUlFfRU1QVFlfQ1lDLCAgICAgICAgICAgICAgIDB4MjAwM2UpCitFVkVOVChQTV9EVExCX01JU1NfNjRLLCAgICAgICAgICAgICAgICAgICAgICAgMHgzYzA1ZSkKK0VWRU5UKFBNX1RIUkRfQ09OQ19SVU5fSU5TVCwgICAgICAgICAgICAgICAgICAweDMwMGY0KQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9MMiwgICAgICAgICAgICAgICAgICAgIDB4MWQwNTApCitFVkVOVChQTV9QQl9TWVNfUFVNUCwgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDA4MSkKK0VWRU5UKFBNX1ZTVV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhOGJjKQorRVZFTlQoUE1fTVJLX0RBVEFfRlJPTV9MMzFfTU9ELCAgICAgICAgICAgICAgIDB4MWQwNDQpCitFVkVOVChQTV9USFJEX1BSSU9fMF8xX0NZQywgICAgICAgICAgICAgICAgICAgMHgwNDBiMCkKK0VWRU5UKFBNX0RFUkFUX01JU1NfNjRLLCAgICAgICAgICAgICAgICAgICAgICAweDJjMDVjKQorRVZFTlQoUE1fUE1DMl9SRVdJTkQsICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMjApCitFVkVOVChQTV9JTlNUX0ZST01fTDIsICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDA0MCkKK0VWRU5UKFBNX0dSUF9CUl9NUFJFRF9OT05TUEVDLCAgICAgICAgICAgICAgICAweDEwMDBhKQorRVZFTlQoUE1fSU5TVF9ESVNQLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwZjIpCitFVkVOVChQTV9NRU0wX1JEX0NBTkNFTF9UT1RBTCwgICAgICAgICAgICAgICAgMHgzMDA4MykKK0VWRU5UKFBNX0xTVTBfRENfUFJFRl9TVFJFQU1fQ09ORklSTSwgICAgICAgICAweDBkMGI0KQorRVZFTlQoUE1fTDFfRENBQ0hFX1JFTE9BRF9WQUxJRCwgICAgICAgICAgICAgIDB4MzAwZjYpCitFVkVOVChQTV9WU1VfU0NBTEFSX0RPVUJMRV9JU1NVRUQsICAgICAgICAgICAgMHgwYjg4OCkKK0VWRU5UKFBNX0wzX1BSRUZfSElULCAgICAgICAgICAgICAgICAgICAgICAgICAweDNmMDgwKQorRVZFTlQoUE1fTVJLX1BURUdfRlJPTV9MMzFfTU9ELCAgICAgICAgICAgICAgIDB4MWQwNTQpCitFVkVOVChQTV9DTVBMVV9TVEFMTF9TVE9SRSwgICAgICAgICAgICAgICAgICAgMHgyMDA0YSkKK0VWRU5UKFBNX01SS19GWFVfRklOLCAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDM4KQorRVZFTlQoUE1fUE1DNF9PVkVSRkxPVywgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTApCitFVkVOVChQTV9NUktfUFRFR19GUk9NX0wzLCAgICAgICAgICAgICAgICAgICAgMHgyZDA1MCkKK0VWRU5UKFBNX0xTVTBfTE1RX0xIUl9NRVJHRSwgICAgICAgICAgICAgICAgICAweDBkMDk4KQorRVZFTlQoUE1fQlRBQ19ISVQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDUwOGEpCitFVkVOVChQTV9MM19SRF9CVVNZLCAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0ZjA4MikKK0VWRU5UKFBNX0xTVTBfTDFfU1dfUFJFRiwgICAgICAgICAgICAgICAgICAgICAweDBjMDljKQorRVZFTlQoUE1fSU5TVF9GUk9NX0wyTUlTUywgICAgICAgICAgICAgICAgICAgIDB4NDQwNDgpCitFVkVOVChQTV9MU1UwX0RDX1BSRUZfU1RSRUFNX0FMTE9DLCAgICAgICAgICAgMHgwZDBhOCkKK0VWRU5UKFBNX0wyX1NULCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE2MDgyKQorRVZFTlQoUE1fVlNVMF9ERU5PUk0sICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYWMpCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0RMMkwzX1NIUiwgICAgICAgICAgICAgMHgzZDA0NCkKK0VWRU5UKFBNX0JSX1BSRURfQ1JfVEEsICAgICAgICAgICAgICAgICAgICAgICAweDA0OGFhKQorRVZFTlQoUE1fVlNVMF9GQ09OViwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGEwYjApCitFVkVOVChQTV9NUktfTFNVX0ZMVVNIX1VMRCwgICAgICAgICAgICAgICAgICAgMHgwZDA4NCkKK0VWRU5UKFBNX0JUQUNfTUlTUywgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA1MDg4KQorRVZFTlQoUE1fTVJLX0xEX01JU1NfRVhQT1NFRF9DWUNfQ09VTlQsICAgICAgIDB4MTAwM2YpCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0wyLCAgICAgICAgICAgICAgICAgICAgMHgxZDA0MCkKK0VWRU5UKFBNX0xTVV9EQ0FDSEVfUkVMT0FEX1ZBTElELCAgICAgICAgICAgICAweDBkMGEyKQorRVZFTlQoUE1fVlNVX0ZNQSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGE4ODQpCitFVkVOVChQTV9MU1UwX0ZMVVNIX1NSUSwgICAgICAgICAgICAgICAgICAgICAgMHgwYzBiYykKK0VWRU5UKFBNX0xTVTFfTDFfUFJFRiwgICAgICAgICAgICAgICAgICAgICAgICAweDBkMGJhKQorRVZFTlQoUE1fSU9QU19DTVBMLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTQpCitFVkVOVChQTV9MMl9TWVNfUFVNUCwgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNjQ4MikKK0VWRU5UKFBNX0wyX1JDTERfQlVTWV9SQ19GVUxMLCAgICAgICAgICAgICAgICAweDQ2MjgyKQorRVZFTlQoUE1fTFNVX0xNUV9TMF9BTExPQywgICAgICAgICAgICAgICAgICAgIDB4MGQwYTEpCitFVkVOVChQTV9GTFVTSF9ESVNQX1NZTkMsICAgICAgICAgICAgICAgICAgICAgMHgwMjA4OCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fREwyTDNfTU9EX0NZQywgICAgICAgICAweDQwMDJhKQorRVZFTlQoUE1fTDJfSUNfSU5WLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjYxODApCitFVkVOVChQTV9NUktfREFUQV9GUk9NX0wyMV9NT0RfQ1lDLCAgICAgICAgICAgMHg0MDAyNCkKK0VWRU5UKFBNX0wzX1BSRUZfTERTVCwgICAgICAgICAgICAgICAgICAgICAgICAweDBkOGFjKQorRVZFTlQoUE1fTFNVX1NSUV9FTVBUWV9DWUMsICAgICAgICAgICAgICAgICAgIDB4NDAwMDgpCitFVkVOVChQTV9MU1VfTE1RX1MwX1ZBTElELCAgICAgICAgICAgICAgICAgICAgMHgwZDBhMCkKK0VWRU5UKFBNX0ZMVVNIX1BBUlRJQUwsICAgICAgICAgICAgICAgICAgICAgICAweDAyMDg2KQorRVZFTlQoUE1fVlNVMV9GTUFfRE9VQkxFLCAgICAgICAgICAgICAgICAgICAgIDB4MGEwOTIpCitFVkVOVChQTV8xUExVU19QUENfRElTUCwgICAgICAgICAgICAgICAgICAgICAgMHg0MDBmMikKK0VWRU5UKFBNX0RBVEFfRlJPTV9MMk1JU1MsICAgICAgICAgICAgICAgICAgICAweDIwMGZlKQorRVZFTlQoUE1fU1VTUEVOREVELCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDApCitFVkVOVChQTV9WU1UwX0ZNQSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYTA4NCkKK0VWRU5UKFBNX0NNUExVX1NUQUxMX1NDQUxBUiwgICAgICAgICAgICAgICAgICAweDQwMDEyKQorRVZFTlQoUE1fU1RDWF9GQUlMLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MGMwOWEpCitFVkVOVChQTV9WU1UwX0ZTUVJUX0ZESVZfRE9VQkxFLCAgICAgICAgICAgICAgMHgwYTA5NCkKK0VWRU5UKFBNX0RDX1BSRUZfRFNULCAgICAgICAgICAgICAgICAgICAgICAgICAweDBkMGIwKQorRVZFTlQoUE1fVlNVMV9TQ0FMX1NJTkdMRV9JU1NVRUQsICAgICAgICAgICAgIDB4MGIwODYpCitFVkVOVChQTV9MM19ISVQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxZjA4MCkKK0VWRU5UKFBNX0wyX0dMT0JfR1VFU1NfV1JPTkcsICAgICAgICAgICAgICAgICAweDI2NDgyKQorRVZFTlQoUE1fTVJLX0RGVV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMzIpCitFVkVOVChQTV9JTlNUX0ZST01fTDEsICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDA4MCkKK0VWRU5UKFBNX0JSVV9GSU4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDY4KQorRVZFTlQoUE1fSUNfREVNQU5EX1JFUSwgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwODgpCitFVkVOVChQTV9WU1UxX0ZTUVJUX0ZESVZfRE9VQkxFLCAgICAgICAgICAgICAgMHgwYTA5NikKK0VWRU5UKFBNX1ZTVTFfRk1BLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBhMDg2KQorRVZFTlQoUE1fTVJLX0xEX01JU1NfTDEsICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMzYpCitFVkVOVChQTV9WU1UwXzJGTE9QX0RPVUJMRSwgICAgICAgICAgICAgICAgICAgMHgwYTA4YykKK0VWRU5UKFBNX0xTVV9EQ19QUkVGX1NUUklERURfU1RSRUFNX0NPTkZJUk0sICAweDBkOGJjKQorRVZFTlQoUE1fSU5TVF9QVEVHX0ZST01fTDMxX1NIUiwgICAgICAgICAgICAgIDB4MmUwNTYpCitFVkVOVChQTV9NUktfTFNVX1JFSkVDVF9FUkFUX01JU1MsICAgICAgICAgICAgMHgzMDA2NCkKK0VWRU5UKFBNX01SS19EQVRBX0ZST01fTDJNSVNTLCAgICAgICAgICAgICAgICAweDRkMDQ4KQorRVZFTlQoUE1fREFUQV9GUk9NX1JMMkwzX1NIUiwgICAgICAgICAgICAgICAgIDB4MWMwNGMpCitFVkVOVChQTV9JTlNUX0ZST01fUFJFRiwgICAgICAgICAgICAgICAgICAgICAgMHgxNDA0NikKK0VWRU5UKFBNX1ZTVTFfU1EsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBiMDllKQorRVZFTlQoUE1fTDJfTERfRElTUCwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYxODApCitFVkVOVChQTV9MMl9ESVNQX0FMTCwgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjA4MCkKK0VWRU5UKFBNX1RIUkRfR1JQX0NNUExfQk9USF9DWUMsICAgICAgICAgICAgICAweDEwMDEyKQorRVZFTlQoUE1fVlNVX0ZTUVJUX0ZESVZfRE9VQkxFLCAgICAgICAgICAgICAgIDB4MGE4OTQpCitFVkVOVChQTV9CUl9NUFJFRCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDBmNikKK0VWRU5UKFBNX0lOU1RfUFRFR19GUk9NX0RMMkwzX1NIU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AiUSIgKF9vaV9iaXRtYXBbbnIgJiA3XSkgOiAiY2MiICk7CisJCTogIitRIiAoKihjaGFyICopIGFkZHIpIDogIlEiIChfb2lfYml0bWFwW25yICYgN10pIDogImNjIik7CiB9CiAKIHN0YXRpYyBpbmxpbmUgdm9pZCAKQEAgLTMwMSw3ICszMDEsNyBAQAogCWNoID0gKih1bnNpZ25lZCBjaGFyICopIGFkZHI7CiAJYXNtIHZvbGF0aWxlKAogCQkiCW9jCSVPMCgxLCVSMCksJTEiCi0JCTogIj1RIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfb2lfYml0bWFwW25yICYgN10pCisJCTogIitRIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfb2lfYml0bWFwW25yICYgN10pCiAJCTogImNjIiwgIm1lbW9yeSIpOwogCXJldHVybiAoY2ggPj4gKG5yICYgNykpICYgMTsKIH0KQEAgLTMyMCw3ICszMjAsNyBAQAogCWNoID0gKih1bnNpZ25lZCBjaGFyICopIGFkZHI7CiAJYXNtIHZvbGF0aWxlKAogCQkiCW5jCSVPMCgxLCVSMCksJTEiCi0JCTogIj1RIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfbmlfYml0bWFwW25yICYgN10pCisJCTogIitRIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfbmlfYml0bWFwW25yICYgN10pCiAJCTogImNjIiwgIm1lbW9yeSIpOwogCXJldHVybiAoY2ggPj4gKG5yICYgNykpICYgMTsKIH0KQEAgLTMzOSw3ICszMzksNyBAQAogCWNoID0gKih1bnNpZ25lZCBjaGFyICopIGFkZHI7CiAJYXNtIHZvbGF0aWxlKAogCQkiCXhjCSVPMCgxLCVSMCksJTEiCi0JCTogIj1RIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfb2lfYml0bWFwW25yICYgN10pCisJCTogIitRIiAoKihjaGFyICopIGFkZHIpCTogIlEiIChfb2lfYml0bWFwW25yICYgN10pCiAJCTogImNjIiwgIm1lbW9yeSIpOwogCXJldHVybi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VldWUgQW4gZWdyZXNzIHF1ZXVlIGluaXRpYWxpemVkIHZpYSBneGlvX21waXBlX2VxdWV1ZV9pbml0KCkuCisgKiBAcGFyYW0gc2l6ZSBUaGUgc25mIHNpemUsIGluIGJ5dGVzLgorICogQHJldHVybiBaZXJvIG9uIHN1Y2Nlc3MsIG5lZ2F0aXZlIGVycm9yIG90aGVyd2lzZS4KKyAqLworc3RhdGljIGlubGluZSBpbnQgZ3hpb19tcGlwZV9lcXVldWVfc2V0X3NuZl9zaXplKGd4aW9fbXBpcGVfZXF1ZXVlX3QgKmVxdWV1ZSwKKwkJCQkJCSBzaXplX3Qgc2l6ZSkKK3sKKwlpbnQgYmxrcyA9IChzaXplICsgMTI3KSAvIDEyODsKKwlyZXR1cm4gZ3hpb19tcGlwZV9jb25maWdfZWRtYV9yaW5nX2Jsa3MoZXF1ZXVlLT5jb250ZXh0LCBlcXVldWUtPmVyaW5nLAorCQkJCQkJYmxrcyArIDEsIGJsa3MsIDEpOworfQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqICAgICAgICAgICAgICAgICAgICAgICAgTGluayBNYW5hZ2VtZW50ICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xNjM0LDYgKzE3MjYsMjQgQEAKIAl1aW50OF90IG1hYzsKIH0gZ3hpb19tcGlwZV9saW5rX3Q7CiAKKy8qIFRyYW5zbGF0ZSBhIGxpbmsgbmFtZSB0byB0aGUgaW5zdGFuY2UgbnVtYmVyIG9mIHRoZSBtUElQRSBzaGltIHdoaWNoIGlzCisgKiAgY29ubmVjdGVkIHRvIHRoYXQgbGluay4gIFRoaXMgY2FsbCBkb2VzIG5vdCB2ZXJpZnkgd2hldGhlciB0aGUgbGluayBpcworICogIGN1cnJlbnRseSBhdmFpbGFib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JhY2sgcm91dGluZQotICogICAgICAgICAgICAgIHByZV9vcmRlcl92aXNpdCAgICAgLSBDYWxsZWQgZHVyaW5nIHRyZWUgcHJlLW9yZGVyIHZpc2l0CisgKiAgICAgICAgICAgICAgZGVzY2VuZGluZ19jYWxsYmFjayAtIENhbGxlZCBkdXJpbmcgdHJlZSBkZXNjZW50CiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gYW4gb2JqZWN0IG9mICJUeXBlIiBpcyBmb3VuZAotICogICAgICAgICAgICAgIHBvc3Rfb3JkZXJfdmlzaXQgICAgLSBDYWxsZWQgZHVyaW5nIHRyZWUgcG9zdC1vcmRlciB2aXNpdAorICogICAgICAgICAgICAgIGFzY2VuZGluZ19jYWxsYmFjayAgLSBDYWxsZWQgZHVyaW5nIHRyZWUgYXNjZW50CiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gYW4gb2JqZWN0IG9mICJUeXBlIiBpcyBmb3VuZAogICogICAgICAgICAgICAgIGNvbnRleHQgICAgICAgICAgICAgLSBQYXNzZWQgdG8gdXNlciBmdW5jdGlvbihzKSBhYm92ZQogICogICAgICAgICAgICAgIHJldHVybl92YWx1ZSAgICAgICAgLSBmcm9tIHRoZSB1c2VyX2Z1bmN0aW9uIGlmIHRlcm1pbmF0ZWQKQEAgLTE4NSw4ICsxODUsOCBAQAogCQkgICAgICAgYWNwaV9oYW5kbGUgc3RhcnRfbm9kZSwKIAkJICAgICAgIHUzMiBtYXhfZGVwdGgsCiAJCSAgICAgICB1MzIgZmxhZ3MsCi0JCSAgICAgICBhY3BpX3dhbGtfY2FsbGJhY2sgcHJlX29yZGVyX3Zpc2l0LAotCQkgICAgICAgYWNwaV93YWxrX2NhbGxiYWNrIHBvc3Rfb3JkZXJfdmlzaXQsCisJCSAgICAgICBhY3BpX3dhbGtfY2FsbGJhY2sgZGVzY2VuZGluZ19jYWxsYmFjaywKKwkJICAgICAgIGFjcGlfd2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QluZXh0X2ludGVyZmFjZS0+ZmxhZ3MgfD0gQUNQSV9PU0lfSU5WQUxJRDsKKwkJCX0gZWxzZSB7CisJCQkJbmV4dF9pbnRlcmZhY2UtPmZsYWdzICY9IH5BQ1BJX09TSV9JTlZBTElEOworCQkJfQogCQl9CiAKIAkJbmV4dF9pbnRlcmZhY2UgPSBhY3BpX2dibF9zdXBwb3J0ZWRfaW50ZXJmYWNlczsKQEAgLTI3OCw2ICsyODYsNDkgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF91cGRhdGVfaW50ZXJmYWNlcworICoKKyAqIFBBUkFNRVRFUlM6ICBhY3Rpb24gICAgICAgICAgICAgIC0gQWN0aW9ucyB0byBiZSBwZXJmb3JtZWQgZHVyaW5nIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IFVwZGF0ZSBfT1NJIGludGVyZmFjZSBzdHJpbmdzLCBkaXNhYmxpbmcgb3IgZW5hYmxpbmcgT1MgdmVuZG9yCisgKiAgICAgICAgICAgICAgc3RyaW5ncyBvci9hbmQgZmVhdHVyZSBncm91cCBzdHJpbmdzLgorICogICAgICAgICAgICAgIENhbGxlciBNVVNUIGhvbGQgYWNwaV9nYmxfb3NpX211dGV4CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV91dF91cGRhdGVfaW50ZXJmYWNlcyh1OCBhY3Rpb24pCit7CisJc3RydWN0IGFjcGlfaW50ZXJmYWNlX2luZm8gKm5leHRfaW50ZXJmYWNlOworCisJbmV4dF9pbnRlcmZ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FjcGkvYWNwaWNhL3V0c3RyaW5nLmMKaW5kZXggYzUzNzU5Yi4uY2IxZTljYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dHN0cmluZy5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRzdHJpbmcuYwpAQCAtMzMzLDcgKzMzMyw4IEBACiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9wcmludF9zdHJpbmcKICAqCiAgKiBQQVJBTUVURVJTOiAgc3RyaW5nICAgICAgICAgIC0gTnVsbCB0ZXJtaW5hdGVkIEFTQ0lJIHN0cmluZwotICogICAgICAgICAgICAgIG1heF9sZW5ndGggICAgICAtIE1heGltdW0gb3V0cHV0IGxlbmd0aAorICogICAgICAgICAgICAgIG1heF9sZW5ndGggICAgICAtIE1heGltdW0gb3V0cHV0IGxlbmd0aC4gVXNlZCB0byBjb25zdHJhaW4gdGhlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoIG9mIHN0cmluZ3MgZHVyaW5nIGRlYnVnIG91dHB1dCBvbmx5LgogICoKICAqIFJFVFVSTjogICAgICBOb25lCiAgKgpAQCAtMzQyLDcgKzM0Myw3IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCBhY3BpX3V0X3ByaW50X3N0cmluZyhjaGFyICpzdHJpbmcsIHU4IG1heF9sZW5ndGgpCit2b2lkIGFjcGlfdXRfcHJpbnRfc3RyaW5nKGNoYXIgKnN0cmluZywgdTE2IG1heF9sZW5ndGgpCiB7CiAJdTMyIGk7CiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXR4ZmFjZS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dHhmYWNlLmMKaW5kZXggNjUwNTc3NC4uMDNhMjExZSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dHhmYWNlLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dHhmYWNlLmMKQEAgLTM4OSw2ICszODksMzQgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXBkYXRlX2ludGVyZmFjZXMKKyAqCisgKiBQQVJBTUVURVJTOiAgYWN0aW9uICAgICAgICAgICAgICAtIEFjdGlvbnMgdG8gYmUgcGVyZm9ybWVkIGR1cmluZyB0aGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBVcGRhdGUgX09TSSBpbnRlcmZhY2Ugc3RyaW5ncywgZGlzYWJsaW5nIG9yIGVuYWJsaW5nIE9TIHZlbmRvcgorICogICAgICAgICAgICAgIHN0cmluZyBvci9hbmQgZmVhdHVyZSBncm91cCBzdHJpbmdzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworYWNwaV9zdGF0dXMgYWNwaV91cGRhdGVfaW50ZXJmYWNlcyh1OCBhY3Rpb24pCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCisJc3RhdHVzID0gYWNwaV9vc19hY3F1aXJlX211dGV4KGFjcGlfZ2JsX29zaV9tdXRleCwgQUNQSV9XQUlUX0ZPUkVWRVIpOworCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgeworCQlyZXR1cm4gKHN0YXR1cyk7CisJfQorCisJc3RhdHVzID0gYWNwaV91dF91cGRhdGVfaW50ZXJmYWNlcyhhY3Rpb24pOworCisJYWNwaV9vc19yZWxlYXNlX211dGV4KGFjcGlfZ2JsX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Vuc2lnbmVkIGxvbmcgbGFzdF9kb2NrX3RpbWU7CiAJdTMyIGZsYWdzOwotCXNwaW5sb2NrX3QgZGRfbG9jazsKLQlzdHJ1Y3QgbXV0ZXggaHBfbG9jazsKIAlzdHJ1Y3QgbGlzdF9oZWFkIGRlcGVuZGVudF9kZXZpY2VzOwogCiAJc3RydWN0IGxpc3RfaGVhZCBzaWJsaW5nOwpAQCAtOTEsNiArODcsMTIgQEAKICNkZWZpbmUgRE9DS19FVkVOVAkzCiAjZGVmaW5lIFVORE9DS19FVkVOVAkyCiAKK2VudW0gZG9ja19jYWxsYmFja190eXBlIHsKKwlET0NLX0NBTExfSEFORExFUiwKKwlET0NLX0NBTExfRklYVVAsCisJRE9DS19DQUxMX1VFVkVOVCwKK307CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICAgICAgRG9jayBEZXBlbmRlbnQgZGV2aWNlIGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xMDEsNyArMTAzLDcgQEAKICAqCiAgKiBBZGQgdGhlIGRlcGVuZGVudCBkZXZpY2UgdG8gdGhlIGRvY2sncyBkZXBlbmRlbnQgZGV2aWNlIGxpc3QuCiAgKi8KLXN0YXRpYyBpbnQKK3N0YXRpYyBpbnQgX19pbml0CiBhZGRfZG9ja19kZXBlbmRlbnRfZGV2aWNlKHN0cnVjdCBkb2NrX3N0YXRpb24gKmRzLCBhY3BpX2hhbmRsZSBoYW5kbGUpCiB7CiAJc3RydWN0IGRvY2tfZGVwZW5kZW50X2RldmljZSAqZGQ7CkBAIC0xMTIsMTQgKzExNCwyMSBAQAogCiAJZGQtPmhhbmRsZSA9IGhhbmRsZTsKIAlJTklUX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CiAJcmV0dXJuIE5VTEw7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICAgICAgRG9jayBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioKLSAqIGlzX2RvY2sgLSBzZWUgaWYgYSBkZXZpY2UgaXMgYSBkb2NrIHN0YXRpb24KLSAqIEBoYW5kbGU6IGFjcGkgaGFuZGxlIG9mIHRoZSBkZXZpY2UKLSAqCi0gKiBJZiBhbiBhY3BpIG9iamVjdCBoYXMgYSBfRENLIG1ldGhvZCwgdGhlbiBpdCBpcyBieSBkZWZpbml0aW9uIGEgZG9jawotICogc3RhdGlvbiwgc28gcmV0dXJuIHRydWUuCi0gKi8KLXN0YXRpYyBpbnQgaXNfZG9jayhhY3BpX2hhbmRsZSBoYW5kbGUpCi17Ci0JYWNwaV9zdGF0dXMgc3RhdHVzOwotCWFjcGlfaGFuZGxlIHRtcDsKLQotCXN0YXR1cyA9IGFjcGlfZ2V0X2hhbmRsZShoYW5kbGUsICJfRENLIiwgJnRtcCk7Ci0JaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKQotCQlyZXR1cm4gMDsKLQlyZXR1cm4gMTsKLX0KLQotc3RhdGljIGludCBpc19lamVjdGFibGUoYWNwaV9oYW5kbGUgaGFuZGxlKQotewotCWFjcGlfc3RhdHVzIHN0YXR1czsKLQlhY3BpX2hhbmRsZSB0bXA7Ci0KLQlzdGF0dXMgPSBhY3BpX2dldF9oYW5kbGUoaGFuZGxlLCAiX0VKMCIsICZ0bXApOwotCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkKLQkJcmV0dXJuIDA7Ci0JcmV0d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EhWRl9DTlRSTF8xX1BBRCh4KSAgICAgICAoKCh4KSAmIDMpIDw8IDQpCiAjIGRlZmluZSBIVkZfQ05UUkxfMV9TRU1JX1BMQU5BUiAgKDEgPDwgNikKICNkZWZpbmUgUkVHX1JQVF9DTlRSTCAgICAgICAgICAgICBSRUcoMHgwMCwgMHhmMCkgICAgIC8qIHdyaXRlICovCisjZGVmaW5lIFJFR19JMlNfRk9STUFUICAgICAgICAgICAgUkVHKDB4MDAsIDB4ZmMpICAgICAvKiByZWFkL3dyaXRlICovCisjIGRlZmluZSBJMlNfRk9STUFUKHgpICAgICAgICAgICAgKCgoeCkgJiAzKSA8PCAwKQorI2RlZmluZSBSRUdfQUlQX0NMS1NFTCAgICAgICAgICAgIFJFRygweDAwLCAweGZkKSAgICAgLyogd3JpdGUgKi8KKyMgZGVmaW5lIEFJUF9DTEtTRUxfRlMoeCkgICAgICAgICAoKCh4KSAmIDMpIDw8IDApCisjIGRlZmluZSBBSVBfQ0xLU0VMX0NMS19QT0woeCkgICAgKCgoeCkgJiAxKSA8PCAyKQorIyBkZWZpbmUgQUlQX0NMS1NFTF9BSVAoeCkgICAgICAgICgoKHgpICYgNykgPDwgMykKIAogCiAvKiBQYWdlIDAyaDogUExMIHNldHRpbmdzICovCkBAIC0xOTQsNiArMjIyLDEyIEBACiAjZGVmaW5lIFJFR19QTExfU0NHUjEgICAgICAgICAgICAgUkVHKDB4MDIsIDB4MDkpICAgICAvKiByZWFkL3dyaXRlICovCiAjZGVmaW5lIFJFR19QTExfU0NHUjIgICAgICAgICAgICAgUkVHKDB4MDIsIDB4MGEpICAgICAvKiByZWFkL3dyaXRlICovCiAjZGVmaW5lIFJFR19BVURJT19ESVYgICAgICAgICAgICAgUkVHKDB4MDIsIDB4MGUpICAgICAvKiByZWFkL3dyaXRlICovCisjIGRlZmluZSBBVURJT19ESVZfU0VSQ0xLXzEgICAgICAgMAorIyBkZWZpbmUgQVVESU9fRElWX1NFUkNMS18yICAgICAgIDEKKyMgZGVmaW5lIEFVRElPX0RJVl9TRVJDTEtfNCAgICAgICAyCisjIGRlZmluZSBBVURJT19ESVZfU0VSQ0xLXzggICAgICAgMworIyBkZWZpbmUgQVVESU9fRElWX1NFUkNMS18xNiAgICAgIDQKKyMgZGVmaW5lIEFVRElPX0RJVl9TRVJDTEtfMzIgICAgICA1CiAjZGVmaW5lIFJFR19TRUxfQ0xLICAgICAgICAgICAgICAgUkVHKDB4MDIsIDB4MTEpICAgICAvKiByZWFkL3dyaXRlICovCiAjIGRlZmluZSBTRUxfQ0xLX1NFTF9DTEsxICAgICAgICAgKDEgPDwgMCkKICMgZGVmaW5lIFNFTF9DTEtfU0VMX1ZSRl9DTEsoeCkgICAoKCh4KSAmIDMpIDw8IDEpCkBAIC0yMTIsNiArMjQ2LDExIEBACiAKIAogLyogUGFnZSAxMGg6IGluZm9ybWF0aW9uIGZyYW1lcyBhbmQgcGFja2V0cyAqLworI2RlZmluZSBSRUdfSUYxX0hCMCAgICAgICAgICAgICAgIFJFRygweDEwLCAweDIwKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfSUYyX0hCMCAgICAgICAgICAgICAgIFJFRygweDEwLCAweDQwKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfSUYzX0hCMCAgICAgICAgICAgICAgIFJFRygweDEwLCAweDYwKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfSUY0X0hCMCAgICAgICAgICAgICAgIFJFRygweDEwLCAweDgwKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfSUY1X0hCMCAgICAgICAgICAgICAgIFJFRygweDEwLCAweGEwKSAgICAgLyogcmVhZC93cml0ZSAqLwogCiAKIC8qIFBhZ2UgMTFoOiBhdWRpbyBzZXR0aW5ncyBhbmQgY29udGVudCBpbmZvIHBhY2tldHMgKi8KQEAgLTIyMSwxNCArMjYwLDM5IEBACiAjIGRlZmluZSBBSVBfQ05UUkxfMF9MQVlPVVQgICAgICAgKDEgPDwgMikKICMgZGVmaW5lIEFJUF9DTlRSTF8wX0FDUl9NQU4gICAgICAoMSA8PCA1KQogIyBkZWZpbmUgQUlQX0NOVFJMXzBfUlNUX0NUUyAgICAgICgxIDw8IDYpCisjZGVmaW5lIFJFR19DQV9JMlMgICAgICAgICAgICAgICAgUkVHKDB4MTEsIDB4MDEpICAgICAvKiByZWFkL3dyaXRlICovCisjIGRlZmluZSBDQV9JMlNfQ0FfSTJTKHgpICAgICAgICAgKCgoeCkgJiAzMSkgPDwgMCkKKyMgZGVmaW5lIENBX0kyU19IQlJfQ0hTVEFUICAgICAgICAoMSA8PCA2KQorI2RlZmluZSBSRUdfTEFURU5DWV9SRCAgICAgICAgICAgIFJFRygweDExLCAweDA0KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX0NUU18wICAgICAgICAgICAgIFJFRygweDExLCAweDA1KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX0NUU18xICAgICAgICAgICAgIFJFRygweDExLCAweDA2KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX0NUU18yICAgICAgICAgICAgIFJFRygweDExLCAweDA3KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX05fMCAgICAgICAgICAgICAgIFJFRygweDExLCAweDA4KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX05fMSAgICAgICAgICAgICAgIFJFRygweDExLCAweDA5KSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQUNSX05fMiAgICAgICAgICAgICAgIFJFRygweDExLCAweDBhKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfQ1RTX04gICAgICAgICAgICAgICAgIFJFRygweDExLCAweDBjKSAgICAgLyogcmVhZC93cml0ZSAqLworIyBkZWZpbmUgQ1RTX05fSyh4KSAgICAgIC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E9UUCAqLwogI2RlZmluZSBSRUdfVFgzICAgICAgICAgICAgICAgICAgIFJFRygweDEyLCAweDlhKSAgICAgLyogcmVhZC93cml0ZSAqLworI2RlZmluZSBSRUdfVFg0ICAgICAgICAgICAgICAgICAgIFJFRygweDEyLCAweDliKSAgICAgLyogcmVhZC93cml0ZSAqLworIyBkZWZpbmUgVFg0X1BEX1JBTSAgICAgICAgICAgICAgICgxIDw8IDEpCiAjZGVmaW5lIFJFR19UWDMzICAgICAgICAgICAgICAgICAgUkVHKDB4MTIsIDB4YjgpICAgICAvKiByZWFkL3dyaXRlICovCiAjIGRlZmluZSBUWDMzX0hETUkgICAgICAgICAgICAgICAgKDEgPDwgMSkKIApAQCAtMzM4LDYgKzQwMiwyMyBAQAogCXJldHVybiByZXQ7CiB9CiAKK3N0YXRpYyB2b2lkCityZWdfd3JpdGVfcmFuZ2Uoc3RydWN0IGRybV9lbmNvZGVyICplbmNvZGVyLCB1aW50MTZfdCByZWcsIHVpbnQ4X3QgKnAsIGludCBjbnQpCit7CisJc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCA9IGRybV9pMmNfZW5jb2Rlcl9nZXRfY2xpZW50KGVuY29kZXIpOworCXVpbnQ4X3QgYnVmW2NudCsxXTsKKwlpbnQgcmV0OworCisJYnVmWzBdID0gUkVHMkFERFIocmVnKTsKKwltZW1jcHkoJmJ1ZlsxXSwgcCwgY250KTsKKworCXNldF9wYWdlKGVuY29kZXIsIHJlZyk7CisKKwlyZXQgPSBpMmNfbWFzdGVyX3NlbmQoY2xpZW50LCBidWYsIGNudCArIDEpOworCWlmIChyZXQgPCAwKQorCQlkZXZfZXJyKCZjbGllbnQtPmRldiwgIkVycm9yICVkIHdyaXRpbmcgdG8gMHgleFxuIiwgcmV0LCByZWcpOworfQorCiBzdGF0aWMgdWludDhfdAogcmVnX3JlYWQoc3RydWN0IGRybV9lbmNvZGVyICplbmNvZGVyLCB1aW50MTZfdCByZWcpCiB7CkBAIC00MDYsMTMgKzQ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T1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSCisgKiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORworICogRlJPTSwgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUworICogSU4gVEhFIFNPRlRXQVJFLgorICoKKyAqIEF1dGhvcnM6CisgKiAgICBFcmljIEFuaG9sdCA8ZXJpY0BhbmhvbHQubmV0PgorICogICAgS2VpdGggUGFja2FyZCA8a2VpdGhwQGtlaXRocC5jb20+CisgKiAgICBNaWthIEt1b3BwYWxhIDxtaWthLmt1b3BwYWxhQGludGVsLmNvbT4KKyAqCisgKi8KKworI2luY2x1ZGUgPGdlbmVyYXRlZC91dHNyZWxlYXNlLmg+CisjaW5jbHVkZSAiaTkxNV9kcnYuaCIKKworc3RhdGljIGNvbnN0IGNoYXIgKnllc25vKGludCB2KQoreworCXJldHVybiB2ID8gInllcyIgOiAibm8iOworfQorCitzdGF0aWMgY29uc3QgY2hhciAqcmluZ19zdHIoaW50IHJpbmcpCit7CisJc3dpdGNoIChyaW5nKSB7CisJY2FzZSBSQ1M6IHJldHVybiAicmVuZGVyIjsKKwljYXNlIFZDUzogcmV0dXJuICJic2QiOworCWNhc2UgQkNTOiByZXR1cm4gImJsdCI7CisJY2FzZSBWRUNTOiByZXR1cm4gInZlYm94IjsKKwlkZWZhdWx0OiByZXR1cm4gIiI7CisJfQorfQorCitzdGF0aWMgY29uc3QgY2hhciAqcGluX2ZsYWcoaW50IHBpbm5lZCkKK3sKKwlpZiAocGlubmVkID4gMCkKKwkJcmV0dXJuICIgUCI7CisJZWxzZSBpZiAocGlubmVkIDwgMCkKKwkJcmV0dXJuICIgcCI7CisJ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QorCQlyZXR1cm4gbGV2ZWwgPT0gMCA/IDYzIDogMjU1OworCWVsc2UKKwkJcmV0dXJuIGxldmVsID09IDAgPyAzMSA6IDYzOworfQorCisvKiBDYWxjdWxhdGUgdGhlIG1heGltdW0gRkJDIHdhdGVybWFyayAqLworc3RhdGljIHVuc2lnbmVkIGludCBpbGtfZmJjX3dtX21heCh2b2lkKQoreworCS8qIG1heCB0aGF0IHJlZ2lzdGVycyBjYW4gaG9sZCAqLworCXJldHVybiAxNTsKK30KKworc3RhdGljIHZvaWQgaWxrX3dtX21heChzdHJ1Y3QgZHJtX2RldmljZSAqZGV2LAorCQkgICAgICAgaW50IGxldmVsLAorCQkgICAgICAgY29uc3Qgc3RydWN0IGludGVsX3dtX2NvbmZpZyAqY29uZmlnLAorCQkgICAgICAgZW51bSBpbnRlbF9kZGJfcGFydGl0aW9uaW5nIGRkYl9wYXJ0aXRpb25pbmcsCisJCSAgICAgICBzdHJ1Y3QgaHN3X3dtX21heGltdW1zICptYXgpCit7CisJbWF4LT5wcmkgPSBpbGtfcGxhbmVfd21fbWF4KGRldiwgbGV2ZWwsIGNvbmZpZywgZGRiX3BhcnRpdGlvbmluZywgZmFsc2UpOworCW1heC0+c3ByID0gaWxrX3BsYW5lX3dtX21heChkZXYsIGxldmVsLCBjb25maWcsIGRkYl9wYXJ0aXRpb25pbmcsIHRydWUpOworCW1heC0+Y3VyID0gaWxrX2N1cnNvcl93bV9tYXgoZGV2LCBsZXZlbCwgY29uZmlnKTsKKwltYXgtPmZiYyA9IGlsa19mYmNfd21fbWF4KCk7Cit9CisKK3N0YXRpYyBib29sIGlsa19jaGVja193bShpbnQgbGV2ZWwsCisJCQkgY29uc3Qgc3RydWN0IGhzd193bV9tYXhpbXVtcyAqbWF4LAorCQkJIHN0cnVjdCBpbnRlbF93bV9sZXZlbCAqcmVzdWx0KQoreworCWJvb2wgcmV0OworCisJLyogYWxyZWFkeSBkZXRlcm1pbmVkIHRvIGJlIGludmFsaWQ/ICovCisJ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JLnBvbGwgICAgICAgICAgICAgICA9IGRybV9wb2xsLAorCS5yZWFkICAgICAgICAgICAgICAgPSBkcm1fcmVhZCwKKwkubGxzZWVrICAgICAgICAgICAgID0gbm9fbGxzZWVrLAorCS5tbWFwICAgICAgICAgICAgICAgPSBtc21fZ2VtX21tYXAsCit9OworCitzdGF0aWMgc3RydWN0IGRybV9kcml2ZXIgbXNtX2RyaXZlciA9IHsKKwkuZHJpdmVyX2ZlYXR1cmVzICAgID0gRFJJVkVSX0hBVkVfSVJRIHwgRFJJVkVSX0dFTSB8IERSSVZFUl9NT0RFU0VULAorCS5sb2FkICAgICAgICAgICAgICAgPSBtc21fbG9hZCwKKwkudW5sb2FkICAgICAgICAgICAgID0gbXNtX3VubG9hZCwKKwkub3BlbiAgICAgICAgICAgICAgID0gbXNtX29wZW4sCisJLnByZWNsb3NlICAgICAgICAgICA9IG1zbV9wcmVjbG9zZSwKKwkubGFzdGNsb3NlICAgICAgICAgID0gbXNtX2xhc3RjbG9zZSwKKwkuaXJxX2hhbmRsZXIgICAgICAgID0gbXNtX2lycSwKKwkuaXJxX3ByZWluc3RhbGwgICAgID0gbXNtX2lycV9wcmVpbnN0YWxsLAorCS5pcnFfcG9zdGluc3RhbGwgICAgPSBtc21faXJxX3Bvc3RpbnN0YWxsLAorCS5pcnFfdW5pbnN0YWxsICAgICAgPSBtc21faXJxX3VuaW5zdGFsbCwKKwkuZ2V0X3ZibGFua19jb3VudGVyID0gZHJtX3ZibGFua19jb3VudCwKKwkuZW5hYmxlX3ZibGFuayAgICAgID0gbXNtX2VuYWJsZV92YmxhbmssCisJLmRpc2FibGVfdmJsYW5rICAgICA9IG1zbV9kaXNhYmxlX3ZibGFuaywKKwkuZ2VtX2ZyZWVfb2JqZWN0ICAgID0gbXNtX2dlbV9mcmVlX29iamVjdCwKKwkuZ2VtX3ZtX29wcyAgICAgICAgID0gJnZtX29wcywKKwkuZHVtYl9jcmVhdGUgICAgICAgID0gbXNtX2dlbV9kdW1iX2NyZWF0ZSwKKwkuZHVtYl9tYXBfb2Zmc2V0ICAgID0gbXNtX2dlbV9kdW1iX21hcF9vZmZzZXQsCisJLmR1bWJfZGVzdHJveSAgICAgICA9IG1zbV9nZW1fZHVtYl9kZXN0cm95LAorI2lmZGVmIENPTkZJR19ERUJVR19GUworCS5kZWJ1Z2ZzX2luaXQgICAgICAgPSBtc21fZGVidWdmc19pbml0LAorCS5kZWJ1Z2ZzX2NsZWFudXAgICAgPSBtc21fZGVidWdmc19jbGVhbnVwLAorI2VuZGlmCisJLmlvY3RscyAgICAgICAgICAgICA9IG1zbV9pb2N0bHMsCisJLm51bV9pb2N0bHMgICAgICAgICA9IERSTV9NU01fTlVNX0lPQ1RMUywKKwkuZm9wcyAgICAgICAgICAgICAgID0gJmZvcHMsCisJLm5hbWUgICAgICAgICAgICAgICA9ICJtc20iLAorCS5kZXNjICAgICAgICAgICAgICAgPSAiTVNNIFNuYXBkcmFnb24gRFJNIiwKKwkuZGF0ZSAgICAgICAgICAgICAgID0gIjIwMTMwNjI1IiwKKwkubWFqb3IgICAgICAgICAgICAgID0gMSwKKwkubWlub3IgICAgICAgICAgICAgID0gMCwKK307CisKKyNpZmRlZiBDT05GSUdfUE1fU0xFRVAKK3N0YXRpYyBpbnQgbXNtX3BtX3N1c3BlbmQoc3RydWN0IGRldmljZSAqZGV2KQoreworCXN0cnVjdCBkcm1fZGV2aWNlICpkZGV2ID0gZGV2X2dldF9kcnZkYXRhKGRldik7CisKKwlkcm1fa21zX2hlbHBlcl9wb2xsX2Rpc2FibGUoZGRldik7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBtc21fcG1fcmVzdW1lKHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgZHJtX2RldmljZSAqZGRldiA9IGRldl9nZXRfZHJ2ZGF0YShkZXYpOworCisJZHJtX2ttc19oZWxwZXJfcG9sbF9lbmFibGUoZGRldik7CisKKwlyZXR1cm4gMDsKK30KKyNlbmRpZ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pbmksCisJCS5yZDMyID0gX25vdXZlYXVfZmFsY29uX2NvbnRleHRfcmQzMiwKKwkJLndyMzIgPSBfbm91dmVhdV9mYWxjb25fY29udGV4dF93cjMyLAogCX0sCiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogQlNQIGVuZ2luZS9zdWJkZXYgZnVuY3Rpb25zCisgKiBQQlNQIGVuZ2luZS9zdWJkZXYgZnVuY3Rpb25zCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgaW50Citudjk4X2JzcF9pbml0KHN0cnVjdCBub3V2ZWF1X29iamVjdCAqb2JqZWN0KQoreworCXN0cnVjdCBudjk4X2JzcF9wcml2ICpwcml2ID0gKHZvaWQgKilvYmplY3Q7CisJaW50IHJldDsKKworCXJldCA9IG5vdXZlYXVfZmFsY29uX2luaXQoJnByaXYtPmJhc2UpOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisKKwludl93cjMyKHByaXYsIDB4MDg0MDEwLCAweDAwMDBmZmQyKTsKKwludl93cjMyKHByaXYsIDB4MDg0MDFjLCAweDAwMDBmZmYyKTsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludAogbnY5OF9ic3BfY3RvcihzdHJ1Y3Qgbm91dmVhdV9vYmplY3QgKnBhcmVudCwgc3RydWN0IG5vdXZlYXVfb2JqZWN0ICplbmdpbmUsCiAJICAgICAgc3RydWN0IG5vdXZlYXVfb2NsYXNzICpvY2xhc3MsIHZvaWQgKmRhdGEsIHUzMiBzaXplLAogCSAgICAgIHN0cnVjdCBub3V2ZWF1X29iamVjdCAqKnBvYmplY3QpCkBAIC02OSw3ICs4NSw3IEBACiAJc3RydWN0IG52OThfYnNwX3ByaXYgKnByaXY7CiAJaW50IHJldDsKIAotCXJldCA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hdGVfKChwKSwgKGUpLCAobyksIChpKSwgKGEpLCAgICAgICAgICAgICAgICAgICAgICBcCisjZGVmaW5lIG5vdXZlYXVfaTJjX3BvcnRfY3JlYXRlKHAsZSxvLGksYSxmLGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCW5vdXZlYXVfaTJjX3BvcnRfY3JlYXRlXygocCksIChlKSwgKG8pLCAoaSksIChhKSwgKGYpLCAgICAgICAgICAgICAgICAgXAogCQkJCSBzaXplb2YoKipkKSwgKHZvaWQgKiopZCkKICNkZWZpbmUgbm91dmVhdV9pMmNfcG9ydF9kZXN0cm95KHApICh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJc3RydWN0IG5vdXZlYXVfaTJjX3BvcnQgKnBvcnQgPSAocCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC01Myw3ICs1Myw5IEBACiAKIGludCBub3V2ZWF1X2kyY19wb3J0X2NyZWF0ZV8oc3RydWN0IG5vdXZlYXVfb2JqZWN0ICosIHN0cnVjdCBub3V2ZWF1X29iamVjdCAqLAogCQkJICAgICBzdHJ1Y3Qgbm91dmVhdV9vY2xhc3MgKiwgdTgsCi0JCQkgICAgIGNvbnN0IHN0cnVjdCBpMmNfYWxnb3JpdGhtICosIGludCwgdm9pZCAqKik7CisJCQkgICAgIGNvbnN0IHN0cnVjdCBpMmNfYWxnb3JpdGhtICosCisJCQkgICAgIGNvbnN0IHN0cnVjdCBub3V2ZWF1X2kyY19mdW5jICosCisJCQkgICAgIGludCwgdm9pZCAqKik7CiB2b2lkIF9ub3V2ZWF1X2kyY19wb3J0X2R0b3Ioc3RydWN0IG5vdXZlYXVfb2JqZWN0ICopOwogI2RlZmluZSBfbm91dmVhdV9pMmNfcG9ydF9pbml0IG5vdXZlYXVfb2JqZWN0X2luaXQKICNkZWZpbmUgX25vdXZlYXVfaTJjX3BvcnRfZmluaSBub3V2ZWF1X29iamVjdF9maW5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IGEvZHJpdmVycy9ncHUvZHJtL3JhZGVvbi9jaWtkLmggYi9kcml2ZXJzL2dwdS9kcm0vcmFkZW9uL2Npa2QuaAppbmRleCA3ZTkyNzVlLi4yMDNkMmEwIDEwMDY0NAotLS0gYS9kcml2ZXJzL2dwdS9kcm0vcmFkZW9uL2Npa2QuaAorKysgYi9kcml2ZXJzL2dwdS9kcm0vcmFkZW9uL2Npa2QuaApAQCAtMjgsMjEgKzI4LDM3NSBAQAogCiAjZGVmaW5lIENJS19SQl9CSVRNQVBfV0lEVEhfUEVSX1NIICAyCiAKLS8qIFNNQyBJTkQgcmVnaXN0ZXJzICovCi0jZGVmaW5lIEdFTkVSQUxfUFdSTUdUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDAwMAotIyAgICAgICBkZWZpbmUgR1BVX0NPVU5URVJfQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDE1KQorLyogRElEVCBJTkQgcmVnaXN0ZXJzICovCisjZGVmaW5lIERJRFRfU1FfQ1RSTDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjICAgICAgIGRlZmluZSBESURUX0NUUkxfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKKyNkZWZpbmUgRElEVF9EQl9DVFJMMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lIERJRFRfVERfQ1RSTDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSBESURUX1RDUF9DVFJMMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAKIAorLyogU01DIElORCByZWdpc3RlcnMgKi8KKyNkZWZpbmUgRFBNX1RBQkxFXzQ3NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGNzY4CisjICAgICAgIGRlZmluZSBTYW11Qm9vdExldmVsKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAwKQorIyAgICAgICBkZWZpbmUgU2FtdUJvb3RMZXZlbF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwZmYKKyMgICAgICAgZGVmaW5lIFNhbXVCb290TGV2ZWxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjICAgICAgIGRlZmluZSBBY3BCb290TGV2ZWwoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCA4KQorIyAgICAgICBkZWZpbmUgQWNwQm9vdExldmVsX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGZmMDAKKyMgICAgICAgZGVmaW5lIEFjcEJvb3RMZXZlbF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA4CisjICAgICAgIGRlZmluZSBWY2VCb290TGV2ZWwoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxNikKKyMgICAgICAgZGVmaW5lIFZjZUJvb3RMZXZlbF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwZmYwMDAwCisjICAgICAgIGRlZmluZSBWY2VCb290TGV2ZWxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyMgICAgICAgZGVmaW5lIFV2ZEJvb3RMZXZlbCh4KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDI0KQorIyAgICAgICBkZWZpbmUgVXZkQm9vdExldmVsX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZmYwMDAwMDAKKyMgICAgICAgZGVmaW5lIFV2ZEJvb3RMZXZlbF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAyNAorCisjZGVmaW5lIEZJUk1XQVJFX0ZMQUdTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRjgwMAorIyAgICAgICBkZWZpbmUgSU5URVJSVVBUU19FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisKKyNkZWZpbmUgTkJfRFBNX0NPTkZJR18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGOUU4CisjICAgICAgIGRlZmluZSBEcG0wUGdOYlBzTG8oeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAwKQorIyAgICAgICBkZWZpbmUgRHBtMFBnTmJQc0xvX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwZmYKKyMgICAgICAgZGVmaW5lIERwbTBQZ05iUHNMb19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjICAgICAgIGRlZmluZSBEcG0wUGdOYlBzSGkoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCA4KQorIyAgICAgICBkZWZpbmUgRHBtMFBnTmJQc0hpX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGZmMDAKKyMgICAgICAgZGVmaW5lIERwbTBQZ05iUHNIaV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA4CisjICAgICAgIGRlZmluZSBEcG1YTmJQc0xvKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxNikKKyMgICAgICAgZGVmaW5lIERwbVhOYlBzTG9fTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwZmYwMDAwCisjICAgICAgIGRlZmluZSBEcG1YTmJQc0xvX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyMgICAgICAgZGVmaW5lIERwbVhOYlBzSGkoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDI0KQorIyAgICAgICBkZWZpbmUgRHBtWE5iUHNIaV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZmYwMDAwMDAKKyMgICAgICAgZGVmaW5lIERwbVhOYlBzSGlfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorCisjZGVmaW5lCVNNQ19TWVNDT05fUkVTRVRfQ05UTAkJCQkweDgwMDAwMDAwCisjICAgICAgIGRlZmluZSBSU1RfUkVHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisjZGVmaW5lCVNNQ19TWVNDT05fQ0xPQ0tfQ05UTF8wCQkJCTB4ODAwMDAwMDQKKyMgICAgICAgZGVmaW5lIENLX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKKyMgICAgICAgZGVmaW5lIENLRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMjQpCisKKyNkZWZpbmUJU01DX1NZU0NPTl9NSVNDX0NOVEwJCQkJMHg4MDAwMDAxMAorCisjZGVmaW5lIFNNQ19TWVNDT05fTVNHX0FSR18wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwMDA2OAorCisjZGVmaW5lIFNNQ19QQ19DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwMDM3MAorCisjZGVmaW5lIFNNQ19TQ1JBVENIOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwMDQyNAorCisjZGVmaW5lIFJDVV9VQ19FVkVOVFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwMDAwNAorIyAgICAgICBkZWZpbmUgQk9PVF9TRVFfRE9ORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDcpCisKKyNkZWZpbmUgR0VORVJBTF9QV1JNR1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMDAwCisjICAgICAgIGRlZmluZSBHTE9CQUxfUFdSTUdUX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKKyMgICAgICAgZGVmaW5lIFNUQVRJQ19QTV9FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxKQorIyAgICAgICBkZWZpbmUgVEhFUk1BTF9QUk9URUNUSU9OX0RJUyAgICAgICAgICAgICAgICAgICAgICgxIDw8IDIpCisjICAgICAgIGRlZmluZSBUSEVSTUFMX1BST1RFQ1RJT05fVFlQRSAgICAgICAgICAgICAgICAgICAgKDEgPDwgMykKKyMgICAgICAgZGVmaW5lIFNXX1NNSU9fSU5ERVgoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDYpCisjICAgICAgIGRlZmluZSBTV19TTUlPX0lOREVYX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgNikKKyMgICAgICAgZGVmaW5lIFNXX1NNSU9fSU5ERVhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA2CisjICAgICAgIGRlZmluZSBWT0xUX1BXUk1HVF9FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTApCisjICAgICAgIGRlZmluZSBHUFVfQ09VTlRFUl9DTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTUpCisjICAgICAgIGRlZmluZSBEWU5fU1BSRUFEX1NQRUNUUlVNX0VOICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMjMpCisKKyNkZWZpbmUgQ05CX1BXUk1HVF9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMDA0CisjICAgICAgIGRlZmluZSBHTkJfU0xPV19NT0RFKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAwKQorIyAgICAgICBkZWZpbmUgR05CX1NMT1dfTU9ERV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICgzIDw8IDApCisjICAgICAgIGRlZmluZSBHTkJfU0xPV19NT0RFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMAorIyAgICAgICBkZWZpbmUgR05CX1NMT1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDIpCisjICAgICAgIGRlZmluZSBGT1JDRV9OQl9QUzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMykKKyMgICAgICAgZGVmaW5lIERQTV9FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA0KQorCisjZGVmaW5lIFNDTEtfUFdSTUdUX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDAwOAorIyAgICAgICBkZWZpbmUgU0NMS19QV1JNR1RfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisjICAgICAgIGRlZmluZSBSRVNFVF9CVVNZX0NOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgNCkKKyMgICAgICAgZGVmaW5lIFJFU0VUX1NDTEtfQ05UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA1KQorIyAgICAgICBkZWZpbmUgRFlOQU1JQ19QTV9FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDIxKQorCisjZGVmaW5lIFRBUkdFVF9BTkRfQ1VSUkVOVF9QUk9GSUxFX0lOREVYICAgICAgICAgICAgICAgICAgMHhDMDIwMDAxNAorIyAgICAgICBkZWZpbmUgQ1VSUkVOVF9TVEFURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICgweGYgPDwgNCkKKyMgICAgICAgZGVmaW5lIENVUlJFTlRfU1RBVEVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA0CisjICAgICAgIGRlZmluZSBDVVJSX01DTEtfSU5ERVhfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgKDB4ZiA8PCA4KQorIyAgICAgICBkZWZpbmUgQ1VSUl9NQ0xLX0lOREVYX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDgKKyMgICAgICAgZGVmaW5lIENVUlJfU0NMS19JTkRFWF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAoMHgxZiA8PCAxNikKKyMgICAgICAgZGVmaW5lIENVUlJfU0NMS19JTkRFWF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAxNgorCisjZGVmaW5lIENHX1NTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDA0NAorIyAgICAgICBkZWZpbmUgU1NUKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoeCkgPDwgMCkKKyMgICAgICAgZGVmaW5lIFNTVF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHhmZmZmIDw8IDApCisjICAgICAgIGRlZmluZSBTU1RVKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxNikKKyMgICAgICAgZGVmaW5lIFNTVFVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHhmIDw8IDE2KQorCisjZGVmaW5lIENHX0RJU1BMQVlfR0FQX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDA2MAorIyAgICAgICBkZWZpbmUgRElTUF9HQVAoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoeCkgPDwgMCkKKyMgICAgICAgZGVmaW5lIERJU1BfR0FQX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyA8PCAwKQorIyAgICAgICBkZWZpbmUgVkJJX1RJTUVSX0NPVU5UKHgpICAgICAgICAgICAgICAgICAgICAgICAgICgoeCkgPDwgNCkKKyMgICAgICAgZGVmaW5lIFZCSV9USU1FUl9DT1VOVF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAoMHgzZmZmIDw8IDQpCisjICAgICAgIGRlZmluZSBWQklfVElNRVJfVU5JVCh4KSAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAyMCkKKyMgICAgICAgZGVmaW5lIFZCSV9USU1FUl9VTklUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAoNyA8PCAyMCkKKyMgICAgICAgZGVmaW5lIERJU1BfR0FQX01DSEcoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDI0KQorIyAgICAgICBkZWZpbmUgRElTUF9HQVBfTUNIR19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICgzIDw8IDI0KQorCisjZGVmaW5lIFNNVV9WT0xUQUdFX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDA5NAorIyAgICAgICBkZWZpbmUgU01VX1ZPTFRBR0VfQ1VSUkVOVF9MRVZFTF9NQVNLICAgICAgICAgICAgICgweGZmIDw8IDEpCisjICAgICAgIGRlZmluZSBTTVVfVk9MVEFHRV9DVVJSRU5UX0xFVkVMX1NISUZUICAgICAgICAgICAgMQorCisjZGVmaW5lIFRBUkdFVF9BTkRfQ1VSUkVOVF9QUk9GSUxFX0lOREVYXzEgICAgICAgICAgICAgICAgMHhDMDIwMDBGMAorIyAgICAgICBkZWZpbmUgQ1VSUl9QQ0lFX0lOREVYX01BU0sgICAgICAgICAgICAgICAgICAgICAgICgweGYgPDwgMjQpCisjICAgICAgIGRlZmluZSBDVVJSX1BDSUVfSU5ERVhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgMjQKKworI2RlZmluZSBDR19VTFZfUEFSQU1FVEVSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAyMDAxNTgKKworI2RlZmluZSBDR19GVFZfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAyMDAxQTgKKyNkZWZpbmUgQ0dfRlRWXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMUFDCisjZGVmaW5lIENHX0ZUVl8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDFCMAorI2RlZmluZSBDR19GVFZfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAyMDAxQjQKKyNkZWZpbmUgQ0dfRlRWXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMUI4CisjZGVmaW5lIENHX0ZUVl81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDIwMDFCQworI2RlZmluZSBDR19GVFZfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAyMDAxQzAKKyNkZWZpbmUgQ0dfRlRWXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMUM0CisKKyNkZWZpbmUgQ0dfRElTUExBWV9HQVBfQ05UTDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMjAwMjMwCisKKyNkZWZpbmUgTENBQ19TWDBfT1ZSX1NFTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwNDAwRDA0CisjZGVmaW5lIExDQUNfU1gwX09WUl9WQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQwOAorCisjZGVmaW5lIExDQUNfTUMwX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQzMAorI2RlZmluZSBMQ0FDX01DMF9PVlJfU0VMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzA0MDBEMzQKKyNkZWZpbmUgTENBQ19NQzBfT1ZSX1ZBTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwNDAwRDM4CisjZGVmaW5lIExDQUNfTUMxX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQzQworI2RlZmluZSBMQ0FDX01DMV9PVlJfU0VMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzA0MDBENDAKKyNkZWZpbmUgTENBQ19NQzFfT1ZSX1ZBTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwNDAwRDQ0CisKKyNkZWZpbmUgTENBQ19NQzJfT1ZSX1NFTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwNDAwRDRDCisjZGVmaW5lIExDQUNfTUMyX09WUl9WQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQ1MAorCisjZGVmaW5lIExDQUNfTUMzX09WUl9TRUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQ1OAorI2RlZmluZSBMQ0FDX01DM19PVlJfVkFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzA0MDBENUMKKworI2RlZmluZSBMQ0FDX0NQTF9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzA0MDBEODAKKyNkZWZpbmUgTENBQ19DUExfT1ZSX1NFTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwNDAwRDg0CisjZGVmaW5lIExDQUNfQ1BMX09WUl9WQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDQwMEQ4OAorCisvKiBkR1BVICovCisjZGVmaW5lCUNHX1RIRVJNQUxfQ1RSTAkJCQkJMHhDMDMwMDAwNAorI2RlZmluZSAJRFBNX0VWRU5UX1NSQyh4KQkJCSgoeCkgPDwgMCkKKyNkZWZpbmUgCURQTV9FVkVOVF9TUkNfTUFTSwkJCSg3IDw8IDApCisjZGVmaW5lCQlESUdfVEhFUk1fRFBNKHgpCQkJKCh4KSA8PCAxNCkKKyNkZWZpbmUJCURJR19USEVSTV9EUE1fTUFTSwkJCTB4MDAzRkMwMDAKKyNkZWZpbmUJCURJR19USEVSTV9EUE1fU0hJRlQJCQkxNAorCisjZGVmaW5lCUNHX1RIRVJNQUxfSU5UCQkJCQkweEMwMzAwMDBDCisjZGVmaW5lCQlDSV9ESUdfVEhFUk1fSU5USCh4KQkJCSg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VmaW5lCU1QTExfQllQQVNTQ0xLX1NFTAkJCQkweEMwNTAwMTlDCisjCWRlZmluZSBNUExMX0NMS09VVF9TRUwoeCkJCQkoKHgpIDw8IDgpCisjCWRlZmluZSBNUExMX0NMS09VVF9TRUxfTUFTSwkJCTB4RkYwMAogI2RlZmluZSBDR19DTEtQSU5fQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzA1MDAxQTAKICMgICAgICAgZGVmaW5lIFhUQUxJTl9ESVZJREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxKQorIyAgICAgICBkZWZpbmUgQkNMS19BU19YQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDIpCisjZGVmaW5lIENHX0NMS1BJTl9DTlRMXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDUwMDFBNAorIyAgICAgICBkZWZpbmUgRk9SQ0VfQklGX1JFRkNMS19FTiAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDMpCisjICAgICAgIGRlZmluZSBNVVhfVENMS19UT19YQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgOCkKKyNkZWZpbmUJVEhNX0NMS19DTlRMCQkJCQkweEMwNTAwMUE4CisjCWRlZmluZSBDTU9OX0NMS19TRUwoeCkJCQkJKCh4KSA8PCAwKQorIwlkZWZpbmUgQ01PTl9DTEtfU0VMX01BU0sJCQkweEZGCisjCWRlZmluZSBUTU9OX0NMS19TRUwoeCkJCQkJKCh4KSA8PCA4KQorIwlkZWZpbmUgVE1PTl9DTEtfU0VMX01BU0sJCQkweEZGMDAKKyNkZWZpbmUJTUlTQ19DTEtfQ1RSTAkJCQkJMHhDMDUwMDFBQworIwlkZWZpbmUgREVFUF9TTEVFUF9DTEtfU0VMKHgpCQkJKCh4KSA8PCAwKQorIwlkZWZpbmUgREVFUF9TTEVFUF9DTEtfU0VMX01BU0sJCQkweEZGCisjCWRlZmluZ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KyMgICAgICAgZGVmaW5lIFBMTF9QT1dFUl9TVEFURV9JTl9PRkZfMF9NQVNLICAgICAgICAgICAgICAoMHg3IDw8IDEwKQorIyAgICAgICBkZWZpbmUgUExMX1BPV0VSX1NUQVRFX0lOX09GRl8wX1NISUZUICAgICAgICAgICAgIDEwCisjICAgICAgIGRlZmluZSBQTExfUkFNUF9VUF9USU1FXzAoeCkgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAyNCkKKyMgICAgICAgZGVmaW5lIFBMTF9SQU1QX1VQX1RJTUVfMF9NQVNLICAgICAgICAgICAgICAgICAgICAoMHg3IDw8IDI0KQorIyAgICAgICBkZWZpbmUgUExMX1JBTVBfVVBfVElNRV8wX1NISUZUICAgICAgICAgICAgICAgICAgIDI0CisjZGVmaW5lIFBCMF9QSUZfUFdSRE9XTl8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMTAwMDEzIC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIFBMTF9QT1dFUl9TVEFURV9JTl9UWFMyXzEoeCkgICAgICAgICAgICAgICAoKHgpIDw8IDcpCisjICAgICAgIGRlZmluZSBQTExfUE9XRVJfU1RBVEVfSU5fVFhTMl8xX01BU0sgICAgICAgICAgICAgKDB4NyA8PCA3KQorIyAgICAgICBkZWZpbmUgUExMX1BPV0VSX1NUQVRFX0lOX1RYUzJfMV9TSElGVCAgICAgICAgICAgIDcKKyMgICAgICAgZGVmaW5lIFBMTF9QT1dFUl9TVEFURV9JTl9PRkZfMSh4KSAgICAgICAgICAgICAgICAoKHgpIDw8IDEwKQorIyAgICAgICBkZWZpbmUgUExMX1BPV0VSX1NUQVRFX0lOX09GRl8xX01BU0sgICAgICAgICAgICAgICgweDcgPDwgMTApCisjICAgICAgIGRlZmluZSBQTExfUE9XRVJfU1RBVEVfSU5fT0ZGXzFfU0hJRlQgICAgICAgICAgICAgMTAKKyMgICAgICAgZGVmaW5lIFBMTF9SQU1QX1VQX1RJTUVfMSh4KSAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDI0KQorIyAgICAgICBkZWZpbmUgUExMX1JBTVBfVVBfVElNRV8xX01BU0sgICAgICAgICAgICAgICAgICAgICgweDcgPDwgMjQpCisjICAgICAgIGRlZmluZSBQTExfUkFNUF9VUF9USU1FXzFfU0hJRlQgICAgICAgICAgICAgICAgICAgMjQKKworI2RlZmluZSBQQ0lFX0NOVEwyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTAwMWMgLyogUENJRSAqLworIyAgICAgICBkZWZpbmUgU0xWX01FTV9MU19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDE2KQorIyAgICAgICBkZWZpbmUgU0xWX01FTV9BR0dSRVNTSVZFX0xTX0VOICAgICAgICAgICAgICAgICAgICgxIDw8IDE3KQorIyAgICAgICBkZWZpbmUgTVNUX01FTV9MU19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDE4KQorIyAgICAgICBkZWZpbmUgUkVQTEFZX01FTV9MU19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDE5KQorCisjZGVmaW5lIFBDSUVfTENfU1RBVFVTMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDAwMDI4IC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIExDX1JFVkVSU0VfUkNWUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorIyAgICAgICBkZWZpbmUgTENfUkVWRVJTRV9YTUlUICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDEpCisjICAgICAgIGRlZmluZSBMQ19PUEVSQVRJTkdfTElOS19XSURUSF9NQVNLICAgICAgICAgICAgICAgKDB4NyA8PCAyKQorIyAgICAgICBkZWZpbmUgTENfT1BFUkFUSU5HX0xJTktfV0lEVEhfU0hJRlQgICAgICAgICAgICAgIDIKKyMgICAgICAgZGVmaW5lIExDX0RFVEVDVEVEX0xJTktfV0lEVEhfTUFTSyAgICAgICAgICAgICAgICAoMHg3IDw8IDUpCisjICAgICAgIGRlZmluZSBMQ19ERVRFQ1RFRF9MSU5LX1dJRFRIX1NISUZUICAgICAgICAgICAgICAgNQorCisjZGVmaW5lIFBDSUVfUF9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDAwMDQwIC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIFBfSUdOT1JFX0VEQl9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA2KQorCisjZGVmaW5lIFBCMV9QSUZfUFdSRE9XTl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMTAwMDEyIC8qIFBDSUUgKi8KKyNkZWZpbmUgUEIxX1BJRl9QV1JET1dOXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMDAwMTMgLyogUENJRSAqLworCisjZGVmaW5lIFBDSUVfTENfQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAxMDBBMCAvKiBQQ0lFICovCisjICAgICAgIGRlZmluZSBMQ19MMFNfSU5BQ1RJVklUWSh4KSAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCA4KQorIyAgICAgICBkZWZpbmUgTENfTDBTX0lOQUNUSVZJVFlfTUFTSyAgICAgICAgICAgICAgICAgICAgICgweGYgPDwgOCkKKyMgICAgICAgZGVmaW5lIExDX0wwU19JTkFDVElWSVRZX1NISUZUICAgICAgICAgICAgICAgICAgICA4CisjICAgICAgIGRlZmluZSBMQ19MMV9JTkFDVElWSVRZKHgpICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxMikKKyMgICAgICAgZGVmaW5lIExDX0wxX0lOQUNUSVZJVFlfTUFTSyAgICAgICAgICAgICAgICAgICAgICAoMHhmIDw8IDEyKQorIyAgICAgICBkZWZpbmUgTENfTDFfSU5BQ1RJVklUWV9TSElGVCAgICAgICAgICAgICAgICAgICAgIDEyCisjICAgICAgIGRlZmluZSBMQ19QTUlfVE9fTDFfRElTICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTYpCisjICAgICAgIGRlZmluZSBMQ19BU1BNX1RPX0wxX0RJUyAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMjQpCisKKyNkZWZpbmUgUENJRV9MQ19MSU5LX1dJRFRIX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDEwMEEyIC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIExDX0xJTktfV0lEVEhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjICAgICAgIGRlZmluZSBMQ19MSU5LX1dJRFRIX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjICAgICAgIGRlZmluZSBMQ19MSU5LX1dJRFRIX1gwICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorIyAgICAgICBkZWZpbmUgTENfTElOS19XSURUSF9YMSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyMgICAgICAgZGVmaW5lIExDX0xJTktfV0lEVEhfWDIgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjICAgICAgIGRlZmluZSBMQ19MSU5LX1dJRFRIX1g0ICAgICAgICAgICAgICAgICAgICAgICAgICAgMworIyAgICAgICBkZWZpbmUgTENfTElOS19XSURUSF9YOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyMgICAgICAgZGVmaW5lIExDX0xJTktfV0lEVEhfWDE2ICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjICAgICAgIGRlZmluZSBMQ19MSU5LX1dJRFRIX1JEX1NISUZUICAgICAgICAgICAgICAgICAgICAgNAorIyAgICAgICBkZWZpbmUgTENfTElOS19XSURUSF9SRF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4NzAKKyMgICAgICAgZGVmaW5lIExDX1JFQ09ORklHX0FSQ19NSVNTSU5HX0VTQ0FQRSAgICAgICAgICAgICAoMSA8PCA3KQorIyAgICAgICBkZWZpbmUgTENfUkVDT05GSUdfTk9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDgpCisjICAgICAgIGRlZmluZSBMQ19SRU5FR09USUFUSU9OX1NVUFBPUlQgICAgICAgICAgICAgICAgICAgKDEgPDwgOSkKKyMgICAgICAgZGVmaW5lIExDX1JFTkVHT1RJQVRFX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxMCkKKyMgICAgICAgZGVmaW5lIExDX1NIT1JUX1JFQ09ORklHX0VOICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxMSkKKyMgICAgICAgZGVmaW5lIExDX1VQQ09ORklHVVJFX1NVUFBPUlQgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxMikKKyMgICAgICAgZGVmaW5lIExDX1VQQ09ORklHVVJFX0RJUyAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxMykKKyMgICAgICAgZGVmaW5lIExDX0RZTl9MQU5FU19QV1JfU1RBVEUoeCkgICAgICAgICAgICAgICAgICAoKHgpIDw8IDIxKQorIyAgICAgICBkZWZpbmUgTENfRFlOX0xBTkVTX1BXUl9TVEFURV9NQVNLICAgICAgICAgICAgICAgICgweDMgPDwgMjEpCisjICAgICAgIGRlZmluZSBMQ19EWU5fTEFORVNfUFdSX1NUQVRFX1NISUZUICAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgUENJRV9MQ19OX0ZUU19DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDEwMGEzIC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIExDX1hNSVRfTl9GVFMoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDApCisjICAgICAgIGRlZmluZSBMQ19YTUlUX05fRlRTX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ZmYgPDwgMCkKKyMgICAgICAgZGVmaW5lIExDX1hNSVRfTl9GVFNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjICAgICAgIGRlZmluZSBMQ19YTUlUX05fRlRTX09WRVJSSURFX0VOICAgICAgICAgICAgICAgICAgKDEgPDwgOCkKKyMgICAgICAgZGVmaW5lIExDX05fRlRTX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHhmZiA8PCAyNCkKKyNkZWZpbmUgUENJRV9MQ19TUEVFRF9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDEwMEE0IC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIExDX0dFTjJfRU5fU1RSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorIyAgICAgICBkZWZpbmUgTENfR0VOM19FTl9TVFJBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDEpCisjICAgICAgIGRlZmluZSBMQ19UQVJHRVRfTElOS19TUEVFRF9PVkVSUklERV9FTiAgICAgICAgICAgKDEgPDwgMikKKyMgICAgICAgZGVmaW5lIExDX1RBUkdFVF9MSU5LX1NQRUVEX09WRVJSSURFX01BU0sgICAgICAgICAoMHgzIDw8IDMpCisjICAgICAgIGRlZmluZSBMQ19UQVJHRVRfTElOS19TUEVFRF9PVkVSUklERV9TSElGVCAgICAgICAgMworIyAgICAgICBkZWZpbmUgTENfRk9SQ0VfRU5fU1dfU1BFRURfQ0hBTkdFICAgICAgICAgICAgICAgICgxIDw8IDUpCisjICAgICAgIGRlZmluZSBMQ19GT1JDRV9ESVNfU1dfU1BFRURfQ0hBTkdFICAgICAgICAgICAgICAgKDEgPDwgNikKKyMgICAgICAgZGVmaW5lIExDX0ZPUkNFX0VOX0hXX1NQRUVEX0NIQU5HRSAgICAgICAgICAgICAgICAoMSA8PCA3KQorIyAgICAgICBkZWZpbmUgTENfRk9SQ0VfRElTX0hXX1NQRUVEX0NIQU5HRSAgICAgICAgICAgICAgICgxIDw8IDgpCisjICAgICAgIGRlZmluZSBMQ19JTklUSUFURV9MSU5LX1NQRUVEX0NIQU5HRSAgICAgICAgICAgICAgKDEgPDwgOSkKKyMgICAgICAgZGVmaW5lIExDX1NQRUVEX0NIQU5HRV9BVFRFTVBUU19BTExPV0VEX01BU0sgICAgICAoMHgzIDw8IDEwKQorIyAgICAgICBkZWZpbmUgTENfU1BFRURfQ0hBTkdFX0FUVEVNUFRTX0FMTE9XRURfU0hJRlQgICAgIDEwCisjICAgICAgIGRlZmluZSBMQ19DVVJSRU5UX0RBVEFfUkFURV9NQVNLICAgICAgICAgICAgICAgICAgKDB4MyA8PCAxMykgLyogMC8xLzIgPSBnZW4xLzIvMyAqLworIyAgICAgICBkZWZpbmUgTENfQ1VSUkVOVF9EQVRBX1JBVEVfU0hJRlQgICAgICAgICAgICAgICAgIDEzCisjICAgICAgIGRlZmluZSBMQ19DTFJfRkFJTEVEX1NQRF9DSEFOR0VfQ05UICAgICAgICAgICAgICAgKDEgPDwgMTYpCisjICAgICAgIGRlZmluZSBMQ19PVEhFUl9TSURFX0VWRVJfU0VOVF9HRU4yICAgICAgICAgICAgICAgKDEgPDwgMTgpCisjICAgICAgIGRlZmluZSBMQ19PVEhFUl9TSURFX1NVUFBPUlRTX0dFTjIgICAgICAgICAgICAgICAgKDEgPDwgMTkpCisjICAgICAgIGRlZmluZSBMQ19PVEhFUl9TSURFX0VWRVJfU0VOVF9HRU4zICAgICAgICAgICAgICAgKDEgPDwgMjApCisjICAgICAgIGRlZmluZSBMQ19PVEhFUl9TSURFX1NVUFBPUlRTX0dFTjMgICAgICAgICAgICAgICAgKDEgPDwgMjEpCisKKyNkZWZpbmUgUENJRV9MQ19DTlRMMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDEwMEIxIC8qIFBDSUUgKi8KKyMgICAgICAgZGVmaW5lIExDX0FMTE9XX1BEV05fSU5fTDEgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxNykKKyMgICAgICAgZGVmaW5lIExDX0FMTE9XX1BEV05fSU5fTDIzICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxOCkKKworI2RlZmluZSBQQ0lFX0xDX0NOVEwzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTAwQjUgLyogUENJRSAqLworIyAgICAgICBkZWZpbmUgTENfR09fVE9fUkVDT1ZFUlkgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDMwKQorI2RlZmluZSBQQ0lFX0xDX0NOVEw0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMTAwQjYgLyogUENJRSAqLworIyAgICAgICBkZWZpbmUgTENfUkVET19FUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDUpCisjICAgICAgIGRlZmluZSBMQ19TRVRfUVVJRVNDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTMpCisKKy8qIGRpcmVjdCByZWdpc3RlcnMgKi8KICNkZWZpbmUgUENJRV9JTkRFWCAgCQkJCQkweDM4CiAjZGVmaW5lIFBDSUVfREFUQSAgCQkJCQkweDNDCiAKKyNkZWZpbmUgU01DX0lORF9JTkRFWF8wICAJCQkJMHgyMDAKKyNkZWZpbmUgU01DX0lORF9EQVRBXzAgIAkJCQkweDIwNAorCisjZGVmaW5lIFNNQ19JTkRfQUNDRVNTX0NOVEwgIAkJCQkweDI0MAorI2RlZmluZQkJQVVUT19JTkNSRU1FTlRfSU5EXzAJCQkoMSA8PCAwKQorCisjZGVmaW5lIFNNQ19NRVNTQUdFXzAgIAkJCQkJMHgyNTAKKyNkZWZpbmUJCVNNQ19NU0dfTUFTSwkJCQkweGZmZmYKKyNkZWZpbmUgU01DX1JFU1BfMCAgCQkJCQkweDI1NAorI2RlZmluZQkJU01DX1JFU1BfTUFTSwkJCQkweGZmZmYKKworI2RlZmluZSBTTUNfTVNHX0FSR18wICAJCQkJCTB4MjkwCisKICNkZWZpbmUgV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isjZGVmaW5lCQlTVEFURTFfTUFTSwkJCQkoMHgxZiA8PCA1KQorI2RlZmluZQkJU1RBVEUxX1NISUZUCQkJCTUKKyNkZWZpbmUJCVNUQVRFMih4KQkJCQkoKHgpIDw8IDEwKQorI2RlZmluZQkJU1RBVEUyX01BU0sJCQkJKDB4MWYgPDwgMTApCisjZGVmaW5lCQlTVEFURTJfU0hJRlQJCQkJMTAKKyNkZWZpbmUJCVNUQVRFMyh4KQkJCQkoKHgpIDw8IDE1KQorI2RlZmluZQkJU1RBVEUzX01BU0sJCQkJKDB4MWYgPDwgMTUpCisjZGVmaW5lCQlTVEFURTNfU0hJRlQJCQkJMTUKKworI2RlZmluZSBNQ19TRVFfUkFTX1RJTUlORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI4YTAKKyNkZWZpbmUgTUNfU0VRX0NBU19USU1JTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOGE0CisjZGVmaW5lIE1DX1NFUV9NSVNDX1RJTUlORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjhhOAorI2RlZmluZSBNQ19TRVFfTUlTQ19USU1JTkcyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI4YWMKKyNkZWZpbmUgTUNfU0VRX1BNR19USU1JTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOGIwCisjZGVmaW5lIE1DX1NFUV9SRF9DVExfRDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjhiNAorI2RlZmluZSBNQ19TRVFfUkRfQ1RMX0QxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI4YjgKKyNkZWZpbmUgTUNfU0VRX1dSX0NUTF9EMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOGJjCisjZGVmaW5lIE1DX1NFUV9XUl9DVExfRDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjhjMAorCiAjZGVmaW5lIE1DX1NFUV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ICAweGYwMDAwMDAwCisjZGVmaW5lIAlNQ19TRVFfTUlTQzBfR0REUjVfVkFMVUUgICAgICAgICAgICAgICAgNQorI2RlZmluZSBNQ19TRVFfTUlTQzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhMDQKKyNkZWZpbmUgTUNfU0VRX1JFU0VSVkVfTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYTA4CisjZGVmaW5lIE1DX1BNR19DTURfRU1SUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmEwYworCiAjZGVmaW5lIE1DX1NFUV9JT19ERUJVR19JTkRFWCAgICAgICAgICAgCQkweDJhNDQKICNkZWZpbmUgTUNfU0VRX0lPX0RFQlVHX0RBVEEgICAgICAgICAgIAkJCTB4MmE0OAogCisjZGVmaW5lIE1DX1NFUV9NSVNDNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmE1NAorI2RlZmluZSBNQ19TRVFfTUlTQzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhNTgKKworI2RlZmluZSBNQ19TRVFfTUlTQzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhNjQKKworI2RlZmluZSBNQ19TRVFfUkFTX1RJTUlOR19MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhNmMKKyNkZWZpbmUgTUNfU0VRX0NBU19USU1JTkdfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYTcwCisjZGVmaW5lIE1DX1NFUV9NSVNDX1RJTUlOR19MUCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmE3NAorI2RlZmluZSBNQ19TRVFfTUlTQ19USU1JTkcyX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhNzgKKyNkZWZpbmUgTUNfU0VRX1dSX0NUTF9EMF9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYTdjCisjZGVmaW5lIE1DX1NFUV9XUl9DVExfRDFfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmE4MAorI2RlZmluZSBNQ19TRVFfUE1HX0NNRF9FTVJTX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAweDJhODQKKyNkZWZpbmUgTUNfU0VRX1BNR19DTURfTVJTX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYTg4CisKKyNkZWZpbmUgTUNfUE1HX0NNRF9NUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYWFjCisKKyNkZWZpbmUgTUNfU0VRX1JEX0NUTF9EMF9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYjFjCisjZGVmaW5lIE1DX1NFUV9SRF9DVExfRDFfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmIyMAorCisjZGVmaW5lIE1DX1BNR19DTURfTVJTMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmI0NAorI2RlZmluZSBNQ19TRVFfUE1HX0NNRF9NUlMxX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAweDJiNDgKKyNkZWZpbmUgTUNfU0VRX1BNR19USU1JTkdfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYjRjCisKKyNkZWZpbmUgTUNfU0VRX1dSX0NUTF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYjU0CisjZGVmaW5lIE1DX1NFUV9XUl9DVExfMl9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MmI1OAorI2RlZmluZSBNQ19QTUdfQ01EX01SUzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJiNWMKKyNkZWZpbmUgTUNfU0VRX1BNR19DTURfTVJTMl9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYjYwCisKKyNkZWZpbmUJTUNMS19QV1JNR1RfQ05UTAkJCQkweDJiYTAKKyMgICAgICAgZGVmaW5lIERMTF9TUEVFRCh4KQkJCQkoKHgpIDw8IDApCisjICAgICAgIGRlZmluZSBETExfU1BFRURfTUFTSwkJCQkoMHgxZiA8PCAwKQorIyAgICAgICBkZWZpbmUgRExMX1JFQURZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA2KQorIyAgICAgICBkZWZpbmUgTUNfSU5UX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA3KQorIyAgICAgICBkZWZpbmUgTVJEQ0swX1BETkIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA4KQorIyAgICAgICBkZWZpbmUgTVJEQ0sxX1BETkIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCA5KQorIyAgICAgICBkZWZpbmUgTVJEQ0swX1JFU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxNikKKyMgICAgICAgZGVmaW5lIE1SRENLMV9SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTcpCisjICAgICAgIGRlZmluZSBETExfUkVBRFlfUkVBRCAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDI0KQorI2RlZmluZQlETExfQ05UTAkJCQkJMHgyYmE0CisjICAgICAgIGRlZmluZSBNUkRDSzBfQllQQVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDI0KQorIyAgICAgICBkZWZpbmUgTVJEQ0sxX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAyNSkKKworI2RlZmluZQlNUExMX0ZVTkNfQ05UTAkJCQkJMHgyYmI0CisjZGVmaW5lCQlCV0NUUkwoeCkJCQkJKCh4KSA8PCAyMCkKKyNkZWZpbmUJCUJXQ1RSTF9NQVNLCQkJCSgweGZmIDw8IDIwKQorI2RlZmluZQlNUExMX0ZVTkNfQ05UTF8xCQkJCTB4MmJiOAorI2RlZmluZQkJVkNPX01PREUoeCkJCQkJKCh4KSA8PCAw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CQkweDJDMDgKICNkZWZpbmUJSERQX05PTlNVUkZBQ0VfU0laRQkJCQkweDJDMEMKQEAgLTIzNyw2ICs3MTYsMjYgQEAKICNkZWZpbmUgSERQX0FERFJfQ09ORklHICAJCQkJMHgyRjQ4CiAjZGVmaW5lIEhEUF9NSVNDX0NOVEwJCQkJCTB4MkY0QwogI2RlZmluZSAJSERQX0ZMVVNIX0lOVkFMSURBVEVfQ0FDSEUJCQkoMSA8PCAwKQorI2RlZmluZSBIRFBfTUVNX1BPV0VSX0xTCQkJCTB4MkY1MAorI2RlZmluZSAJSERQX0xTX0VOQUJMRQkJCQkoMSA8PCAwKQorCisjZGVmaW5lIEFUQ19NSVNDX0NHICAgICAgICAgICAJCQkJMHgzMzUwCisKKyNkZWZpbmUgTUNfU0VRX0NOVExfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MDAKKyMgICAgICAgZGVmaW5lIENBQ19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAzMSkKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MDQKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NUUkxfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MDgKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NNRDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MGMKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NNRDBfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MTAKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NNRDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MTQKKyNkZWZpbmUgTUNfU0VRX0c1UERYX0NNRDFfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM2MTgKKworI2RlZmluZSBNQ19TRVFfUE1HX0RWU19DVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYyOAorI2RlZmluZSBNQ19TRVFfUE1HX0RWU19DVExfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYyYworI2RlZmluZSBNQ19TRVFfUE1HX0RWU19DTUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYzMAorI2RlZmluZSBNQ19TRVFfUE1HX0RWU19DTURfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYzNAorI2RlZmluZSBNQ19TRVFfRExMX1NUQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYzOAorI2RlZmluZSBNQ19TRVFfRExMX1NUQllfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzYzYwogCiAjZGVmaW5lIElIX1JCX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzZTAwCiAjICAgICAgIGRlZmluZSBJSF9SQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKQEAgLTI2NSw2ICs3NjQsOSBAQAogIyAgICAgICBkZWZpbmUgTUNfV1JfQ0xFQU5fQ05UKHgpICAgICAgICAgICAgICAgICAgICAgICAgICgoeCkgPDwgMjApCiAjICAgICAgIGRlZmluZSBNQ19WTUlEKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAyNSkKIAorI2RlZmluZQlCSUZfTE5DTlRfUkVTRVQJCQkJCTB4NTIyMAorIyAgICAgICBkZWZpbmUgUkVTRVRfTE5DTlRfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorCiAjZGVmaW5lCUNPTkZJR19NRU1TSVpFCQkJCQkweDU0MjgKIAogI2RlZmluZSBJTlRFUlJVUFRfQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTQ2OApAQCAtNDAxLDYgKzkwMyw5IEBACiAjICAgICAgIGRlZmluZSBEQ19IUER4X1JYX0lOVF9USU1FUih4KSAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxNikKICMgICAgICAgZGVmaW5lIERDX0hQRHhfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAyOCkKIAorI2RlZmluZSBEUEdfUElQRV9TVFVUVEVSX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NmNkNAorIyAgICAgICBkZWZpbmUgU1RVVFRFUl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisKICNkZWZpbmUJR1JCTV9DTlRMCQkJCQkweDgwMDAKICNkZWZpbmUJCUdSQk1fUkVBRF9USU1FT1VUKHgpCQkJCSgoeCkgPDwgMCkKIApAQCAtNTA0LDYgKzEwMDksOSBAQAogCiAjZGVmaW5lCUNQX1JCMF9SUFRSCQkJCQkweDg3MDAKICNkZWZpbmUJQ1BfUkJfV1BUUl9ERUxBWQkJCQkweDg3MDQKKyNkZWZpbmUJQ1BfUkJfV1BUUl9QT0xMX0NOVEwJCQkJMHg4NzA4CisjZGVmaW5lCQlJRExFX1BPTExfQ09VTlQoeCkJCQkoKHgpIDw8IDE2KQorI2RlZmluZQkJSURMRV9QT0xMX0NPVU5UX01BU0sJCQkoMHhmZmZmIDw8IDE2KQogCiAjZGVmaW5lIENQX01FUV9USFJFU0hPTERTCQkJCTB4ODc2NAogI2RlZmluZQkJTUVRMV9TVEFSVCh4KQkJCQkoKHgpIDw8IDApCkBAIC03MzAsNiArMTIzOCw5IEBACiAjICAgICAgIGRlZmluZSBDUF9SSU5HSUQxX0lOVF9TVEFUICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDMwKQogIyAgICAgICBkZWZpbmUgQ1BfUklOR0lEMF9JTlRfU1RBVCAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAzMSkKIAorI2RlZmluZSBDUF9NRU1fU0xQX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxRTQKKyMgICAgICAgZGVmaW5lIENQX01FTV9MU19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKKwogI2RlZmluZSBDUF9DUEZfREVCVUcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMyMDAKIAogI2RlZmluZSBDUF9QUV9XUFRSX1BPTExfQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMyMEMKQEAgLTc3NSwxNCArMTI4NiwyMCBAQAogCiAjZGVmaW5lIFJMQ19NQ19DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMzBDCiAKKyNkZWZpbmUgUkxDX01FTV9TTFBfQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzMTgKKyMgICAgICAgZGVmaW5lIFJMQ19NRU1fTFNfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorCiAjZGVmaW5lIFJMQ19MQl9DTlRSX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMzQ4CiAKICNkZWZpbmUgUkxDX0xCX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzNjQKKyMgICAgICAgZGVmaW5lIExPQURfQkFMQU5DRV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQogCiAjZGVmaW5lIFJMQ19MQl9DTlRSX0lOSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMzZDCiAKICNkZWZpbmUgUkxDX1NBVkVfQU5EX1JFU1RPUkVfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAweEMzNzQKLSNkZWZpbmUgUkxDX0RSSVZFUl9ETUFfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzNzgKKyNkZWZpbmUgUkxDX0RSSVZFUl9ETUFfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzNzggLyogZEdQVSAqLworI2RlZmluZSBSTENfQ1BfVEFCTEVfUkVTVE9SRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzM3OCAvKiBBUFUgKi8KKyNkZWZpbmUgUkxDX1BHX0RFTEFZXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzN0MKIAogI2RlZmluZSBSTENfR1BNX1VDT0RFX0FERFIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzM4OAogI2RlZmluZSBSTENfR1BNX1VDT0RFX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzM4QwpAQCAtNzkxLDEyICsxMzA4LDUyIEBACiAjZGVmaW5lIFJMQ19DQVBUVVJFX0dQVV9DTE9DS19DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgMHhDMzk4CiAjZGVmaW5lIFJMQ19VQ09ERV9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMzlDCiAKKyNkZWZpbmUgUkxDX0dQTV9TVEFUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0MDAKKyMgICAgICAgZGVmaW5lIFJMQ19HUE1fQlVTWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorIyAgICAgICBkZWZpbmUgR0ZYX1BPV0VSX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDEpCisjICAgICAgIGRlZmluZSBHRlhfQ0xPQ0tfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMikKKworI2RlZmluZSBSTENfUEdfQ05UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzQwQworIyAgICAgICBkZWZpbmUgR0ZYX1BHX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisjICAgICAgIGRlZmluZSBHRlhfUEdfU1JDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMSkKKyMgICAgICAgZGVmaW5lIERZTl9QRVJfQ1VfUEdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAyKQorIyAgICAgICBkZWZpbmUgU1RBVElDX1BFUl9DVV9QR19FTkFCTEUgICAgICAgICAgICAgICAgICAgICgxIDw8IDMpCisjICAgICAgIGRlZmluZSBESVNBQkxFX0dEU19QRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTMpCisjICAgICAgIGRlZmluZSBESVNBQkxFX0NQX1BHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTUpCisjICAgICAgIGRlZmluZSBTTVVfQ0xLX1NMT1dET1dOX09OX1BVX0VOQUJMRSAgICAgICAgICAgICAgKDEgPDwgMTcpCisjICAgICAgIGRlZmluZSBTTVVfQ0xLX1NMT1dET1dOX09OX1BEX0VOQUJMRSAgICAgICAgICAgICAgKDEgPDwgMTgpCisKKyNkZWZpbmUgUkxDX0NHVFRfTUdDR19PVkVSUklERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0MjAKICNkZWZpbmUgUkxDX0NHQ0dfQ0dMU19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0MjQKKyMgICAgICAgZGVmaW5lIENHQ0dfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQorIyAgICAgICBkZWZpbmUgQ0dMU19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDEpCisKKyNkZWZpbmUgUkxDX1BHX0RFTEFZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0MzQKIAogI2RlZmluZSBSTENfTEJfSU5JVF9DVV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzQzQwogCiAjZGVmaW5lIFJMQ19MQl9QQVJBTVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDNDQ0CiAKKyNkZWZpbmUgUkxDX1BHX0FPX0NVX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0NEMKKworI2RlZmluZQlSTENfTUFYX1BHX0NVCQkJCQkweEM0NTAKKyMJZGVmaW5lIE1BWF9QVV9DVSh4KQkJCQkoKHgpIDw8IDApCisjCWRlZmluZSBNQVhfUFVfQ1VfTUFTSwkJCQkoMHhmZiA8PCAwKQorI2RlZmluZSBSTENfQVVUT19QR19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzQ1NAorIyAgICAgICBkZWZpbmUgQVVUT19QR19FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCisjCWRlZmluZSBHUkJNX1JFR19TR0lUKHgpCQkJCSgoeCkgPDwgMykKKyMJZGVmaW5lIEdSQk1fUkVHX1NHSVRfTUFTSwkJCSgweGZmZmYgPDwgMykKKworI2RlZmluZSBSTENfU0VSREVTX1dSX0NVX01BU1RFUl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4QzQ3NAorI2RlZmluZSBSTENfU0VSREVTX1dSX05PTkNVX01BU1RFUl9NQVNLICAgICAgICAgICAgICAgICAgIDB4QzQ3OAorI2RlZmluZSBSTENfU0VSREVTX1dSX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzQ3QworI2RlZmluZQkJQlBNX0FERFIoeCkJCQkJKCh4KSA8PCAwKQorI2RlZmluZQkJQlBNX0FERFJfTUFTSyAgICAgIAkJCSgweGZmIDw8IDApCisjZGVmaW5lCQlDR0xTX0VOQUJMRQkJCQkoMSA8PCAxNikKKyNkZWZpbmUJCUNHQ0dfT1ZFUlJJREVfMAkJCQkoMSA8PCAyMCkKKyNkZWZpbmUJCU1HQ0dfT1ZFUlJJREVfMAkJCQkoMSA8PCAyMikKKyNkZWZpbmUJCU1HQ0dfT1ZFUlJJREVfMQkJCQkoMSA8PCAyMykKKwogI2RlZmluZSBSTENfU0VSREVTX0NVX01BU1RFUl9CVVNZICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzQ4NAogI2RlZmluZSBSTENfU0VSREVTX05PTkNVX01BU1RFUl9CVVNZICAgICAgICAgICAgICAgICAgICAgIDB4QzQ4OAogIyAgICAgICBkZWZpbmUgU0VfTUFTVEVSX0JVU1lfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGZmZmYKQEAgLTgwNyw2ICsxMzY0LDEzIEBACiAjZGVmaW5lIFJMQ19HUE1fU0NSQVRDSF9BRERSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDNEIwCiAjZGVmaW5lIFJMQ19HUE1fU0NSQVRDSF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDNEI0CiAKKyNkZWZpbmUgUkxDX0dQUl9SRUcyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEM0RTgKKyNkZWZpbmUJCVJFUSAgICAgIAkJCQkweDAwMDAwMDAxCisjZGVmaW5lCQlNRVNTQUdFKHgpICAgICAgCQkJKCh4KSA8PCAxKQorI2RlZmluZQkJTUVTU0FHRV9NQVNLICAgICAgCQkJMHgwMDAwMDAxZQorI2RlZmluZQkJTVNHX0VOVEVSX1JMQ19TQUZFX01PREUgICAgICAJCQkxCisjZGVmaW5lCQlNU0dfRVhJVF9STENfU0FGRV9NT0RFICAgICAgCQkJMAorCiAjZGVmaW5lIENQX0hQRF9FT1BfQkFTRV9BRERSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDOTA0CiAjZGVmaW5lIENQX0hQRF9FT1BfQkFTRV9BRERSX0hJICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDOTA4CiAjZGVmaW5lIENQX0hQRF9FT1BfVk1JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDOTBDCk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JCTB4M2MwMTAKICNkZWZpbmUJCVRDQ19ESVNBQkxFX01BU0sJCQkJMHhGRkZGMDAwMApAQCAtMTE3Niw2ICsxNzUyLDggQEAKIAogI2RlZmluZQlTRE1BMF9VQ09ERV9BRERSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RDAwMAogI2RlZmluZQlTRE1BMF9VQ09ERV9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RDAwNAorI2RlZmluZQlTRE1BMF9QT1dFUl9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RDAwOAorI2RlZmluZQlTRE1BMF9DTEtfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RDAwQwogCiAjZGVmaW5lIFNETUEwX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhEMDEwCiAjICAgICAgIGRlZmluZSBUUkFQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMCkKQEAgLTEzMDAsNiArMTg3OCwxMyBAQAogI2RlZmluZSBVVkRfUkJDX1JCX1JQVFIJCQkweGY2OTAKICNkZWZpbmUgVVZEX1JCQ19SQl9XUFRSCQkJMHhmNjk0CiAKKyNkZWZpbmUJVVZEX0NHQ19DVFJMCQkJCQkweEY0QjAKKyMJZGVmaW5lIERDTQkJCQkJKDEgPDwgMCkKKyMJZGVmaW5lIENHX0RUKHgpCQkJCQkoKHgpIDw8IDIpCisjCWRlZmluZSBDR19EVF9NQVNLCQkJCSgweGYgPDwgMikKKyMJZGVmaW5lIENMS19PRCh4KQkJCQkoKHgpIDw8IDYpCisjCWRlZmluZSBDTEtfT0RfTUFTSwkJCQkoMHgxZiA8PCA2KQorCiAvKiBVVkQgY2xvY2tzICovCiAKICNkZWZpbmUgQ0dfRENMS19DTlRMCQkJMHhDMDUwMDA5QwpAQCAtMTMxMCw0ICsxODk1LDcgQEAKICN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CiAjZGVmaW5lIEFaX0YwX0NPREVDX1BJTjBfQ09OVFJPTF9BVURJT19ERVNDUklQVE9SMiAgICAgICAgMHg1ZjhjIC8qIE1QRUcxICovCkBAIC0xMTUwLDYgKzExNjAsMTAgQEAKICMgICAgICAgZGVmaW5lIExBVEVOQ1lfTE9XX1dBVEVSTUFSSyh4KSAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDApCiAjICAgICAgIGRlZmluZSBMQVRFTkNZX0hJR0hfV0FURVJNQVJLKHgpICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxNikKIAorI2RlZmluZQlQSVBFMF9ETUlGX0JVRkZFUl9DT05UUk9MCQkJICAweDBjYTAKKyMgICAgICAgZGVmaW5lIERNSUZfQlVGRkVSU19BTExPQ0FURUQoeCkgICAgICAgICAgICAgICAgICAoKHgpIDw8IDApCisjICAgICAgIGRlZmluZSBETUlGX0JVRkZFUlNfQUxMT0NBVEVEX0NPTVBMRVRFRCAgICAgICAgICAgKDEgPDwgNCkKKwogI2RlZmluZSBJSF9SQl9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M2UwMAogIyAgICAgICBkZWZpbmUgSUhfUkJfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDApCiAjICAgICAgIGRlZmluZSBJSF9JQl9TSVpFKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxKSAvKiBsb2cyICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL2dwdS9kcm0vcmFkZW9uL2t2X2RwbS5jIGIvZHJpdmVycy9ncHUvZHJtL3JhZGVvbi9rdl9kcG0uYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lY2Q2MDgwCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9ncHUvZHJtL3JhZGVvbi9rdl9kcG0uYwpAQCAtMCwwICsxLDI2NDUgQEAKKy8qCisgKiBD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gICAxICAgIH0sCisJeyAgOSwgICAgICAgMiwgICAgICAgIDEgICAgfSwKKwl7ICAxMCwgICAgICAzLCAgICAgICAgMSAgICB9LAorCXsgIDExLCAgICAgIDYsICAgICAgICAxICAgIH0sCisJeyAgMTIsICAgICAgOCwgICAgICAgIDIgICAgfSwKKwl7ICAxMywgICAgICAxLCAgICAgICAgMSAgICB9LAorCXsgIDE0LCAgICAgIDIsICAgICAgICAxICAgIH0sCisJeyAgMTUsICAgICAgMywgICAgICAgIDEgICAgfSwKKwl7ICAxNiwgICAgICAxLCAgICAgICAgMSAgICB9LAorCXsgIDE3LCAgICAgIDQsICAgICAgICAxICAgIH0sCisJeyAgMTgsICAgICAgMywgICAgICAgIDEgICAgfSwKKwl7ICAxOSwgICAgICAxLCAgICAgICAgMSAgICB9LAorCXsgIDIwLCAgICAgIDgsICAgICAgICAxICAgIH0sCisJeyAgMjEsICAgICAgNSwgICAgICAgIDEgICAgfSwKKwl7ICAyMiwgICAgICAxLCAgICAgICAgMSAgICB9LAorCXsgIDIzLCAgICAgIDEsICAgICAgICAxICAgIH0sCisJeyAgMjQsICAgICAgNCwgICAgICAgIDEgICAgfSwKKwl7ICAyNywgICAgICA2LCAgICAgICAgMSAgICB9LAorCXsgIDI4LCAgICAgIDEsICAgICAgICAxICAgIH0sCisJeyAweGZmZmZmZmZmIH0KK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3Qga3ZfbGNhY19jb25maWdfcmVnIHN4MF9jYWNfY29uZmlnX3JlZ1tdID0KK3sKKwl7IDB4YzA0MDBkMDAsIDB4MDAzZTAwMDAsIDE3LCAweDNmYzAwMDAwLCAyMiwgMHgwMDAxZmZmZSwgMSwgMHgwMDAwMDAwMSwgMCB9Cit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IGt2X2xjYWNfY29uZmlnX3JlZyBtYzBfY2FjX2NvbmZpZ19yZWdbXSA9Cit7CisJeyAweGMwNDAwZDMwLCAweDAwM2UwMDAwLCAxNywgMHgzZ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diwgbWMwX2NhY19jb25maWdfcmVnKTsKKworCQlXUkVHMzJfU01DKExDQUNfTUMxX09WUl9TRUwsIDApOworCQlXUkVHMzJfU01DKExDQUNfTUMxX09WUl9WQUwsIDApOworCQlrdl9wcm9ncmFtX2xvY2FsX2NhY190YWJsZShyZGV2LCBtYzFfbG9jYWxfY2FjX2NmZ19rdiwgbWMxX2NhY19jb25maWdfcmVnKTsKKworCQlXUkVHMzJfU01DKExDQUNfTUMyX09WUl9TRUwsIDApOworCQlXUkVHMzJfU01DKExDQUNfTUMyX09WUl9WQUwsIDApOworCQlrdl9wcm9ncmFtX2xvY2FsX2NhY190YWJsZShyZGV2LCBtYzJfbG9jYWxfY2FjX2NmZ19rdiwgbWMyX2NhY19jb25maWdfcmVnKTsKKworCQlXUkVHMzJfU01DKExDQUNfTUMzX09WUl9TRUwsIDApOworCQlXUkVHMzJfU01DKExDQUNfTUMzX09WUl9WQUwsIDApOworCQlrdl9wcm9ncmFtX2xvY2FsX2NhY190YWJsZShyZGV2LCBtYzNfbG9jYWxfY2FjX2NmZ19rdiwgbWMzX2NhY19jb25maWdfcmVnKTsKKworCQlXUkVHMzJfU01DKExDQUNfQ1BMX09WUl9TRUwsIDApOworCQlXUkVHMzJfU01DKExDQUNfQ1BMX09WUl9WQUwsIDApOworCQlrdl9wcm9ncmFtX2xvY2FsX2NhY190YWJsZShyZGV2LCBjcGxfbG9jYWxfY2FjX2NmZ19rdiwgY3BsX2NhY19jb25maWdfcmVnKTsKKwl9Cit9CisjZW5kaWYKKworc3RhdGljIGludCBrdl9lbmFibGVfc21jX2NhYyhzdHJ1Y3QgcmFkZW9uX2RldmljZSAqcmRldiwgYm9vbCBlbmFibGUpCit7CisJc3RydWN0IGt2X3Bvd2VyX2luZm8gKnBpID0ga3ZfZ2V0X3BpKHJkZXYpOworCWludCByZXQgPSAwOworCisJaWYgKHBpLT5jYXBzX2NhYykgeworCQlpZiAoZW5hYmxlKSB7CisJCQlyZXQgPSBrdl9ub3RpZ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QTEFZVEFCTEUyLCAqTFBBVE9NX1BQTElCX1BPV0VSUExBWVRBQkxFMjsKKwordHlwZWRlZiBzdHJ1Y3QgX0FUT01fUFBMSUJfUE9XRVJQTEFZVEFCTEUzCit7CisgICAgQVRPTV9QUExJQl9QT1dFUlBMQVlUQUJMRTIgYmFzaWNUYWJsZTI7CisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNGb3JtYXRJRDsgICAgICAgICAgICAgICAgICAgICAgLy8gVG8gYmUgdXNlZCBPTkxZIGJ5IFBQR2VuLgorICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIHVzRmFuVGFibGVPZmZzZXQ7CisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNFeHRlbmRlbmRlZEhlYWRlck9mZnNldDsKK30gQVRPTV9QUExJQl9QT1dFUlBMQVlUQUJMRTMsICpMUEFUT01fUFBMSUJfUE9XRVJQTEFZVEFCTEUzOworCit0eXBlZGVmIHN0cnVjdCBfQVRPTV9QUExJQl9QT1dFUlBMQVlUQUJMRTQKK3sKKyAgICBBVE9NX1BQTElCX1BPV0VSUExBWVRBQkxFMyBiYXNpY1RhYmxlMzsKKyAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICB1bEdvbGRlblBQSUQ7ICAgICAgICAgICAgICAgICAgICAvLyBQUEdlbiB1c2Ugb25seSAgICAgCisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgdWxHb2xkZW5SZXZpc2lvbjsgICAgICAgICAgICAgICAgLy8gUFBHZW4gdXNlIG9ubHkKKyAgICBVU0hPUlQgICAgICAgICAgICAgICAgICAgICB1c1ZkZGNEZXBlbmRlbmN5T25TQ0xLT2Zmc2V0OworICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIHVzVmRkY2lEZXBlbmRlbmN5T25NQ0xLT2Zmc2V0OworICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIHVzVmRkY0RlcGVuZGVuY3lPbk1DTEtPZmZzZXQ7CisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNNYXhDbG9ja1ZvbHRhZ2VPbkRDT2Zmc2V0OworICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIHVzVmRkY1BoYXNlU2hlZExpbWl0c1RhYmxlT2Zmc2V0OyAgICAvLyBQb2ludHMgdG8gQVRPTV9QUExJQl9QaGFzZVNoZWRkaW5nTGltaXRzX1RhYmxlCisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNNdmRkRGVwZW5kZW5jeU9uTUNMS09mZnNldDsgIAorfSBBVE9NX1BQTElCX1BPV0VSUExBWVRBQkxFNCwgKkxQQVRPTV9QUExJQl9QT1dFUlBMQVlUQUJMRTQ7CisKK3R5cGVkZWYgc3RydWN0IF9BVE9NX1BQTElCX1BPV0VSUExBWVRBQkxFNQoreworICAgIEFUT01fUFBMSUJfUE9XRVJQTEFZVEFCTEU0IGJhc2ljVGFibGU0OworICAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgIHVsVERQTGltaXQ7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgdWxOZWFyVERQTGltaXQ7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgdWxTUVJhbXBpbmdUaHJlc2hvbGQ7CisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNDQUNMZWFrYWdlVGFibGVPZmZzZXQ7ICAgICAgICAgLy8gUG9pbnRzIHRvIEFUT01fUFBMSUJfQ0FDX0xlYWthZ2VfVGFibGUKKyAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICB1bENBQ0xlYWthZ2U7ICAgICAgICAgICAgICAgICAgICAvLyBUaGUgaUxlYWthZ2UgZm9yIGRyaXZlciBjYWxjdWxhdGVkIENBQyBsZWFrYWdlIHRhYmxlCisgICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgdXNURFBPRExpbWl0OworICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAg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QU5DSU5HICAgICAgICAweDAwMDAxMDAwCisjZGVmaW5lIEFUT01fUFBMSUJfU09GVFdBUkVfRU5BQkxFX1NMRUVQX0ZPUl9USU1FU1RBTVBTICAweDAwMDAyMDAwCisKKyNkZWZpbmUgQVRPTV9QUExJQl9ESVNBTExPV19PTl9EQyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDAwMAorCisjZGVmaW5lIEFUT01fUFBMSUJfRU5BQkxFX1ZBUklCUklHSFQgICAgICAgICAgICAgICAgICAgICAweDAwMDA4MDAwCisKKy8vbWVtb3J5IHJlbGF0ZWQgZmxhZ3MKKyNkZWZpbmUgQVRPTV9QUExJQl9TV1NUQVRFX01FTU9SWV9ETExfT0ZGICAgICAgICAgICAgICAgMHgwMDAwMTAwMDAKKworLy9NMyBBcmIgICAgLy8yYml0cywgY3VycmVudCAzIHNldHMgb2YgcGFyYW1ldGVycyBpbiB0b3RhbAorI2RlZmluZSBBVE9NX1BQTElCX00zQVJCX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwNjAwMDAKKyNkZWZpbmUgQVRPTV9QUExJQl9NM0FSQl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAxNworCisjZGVmaW5lIEFUT01fUFBMSUJfRU5BQkxFX0RSUiAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4MDAwMAorCisvLyByZW1haW5pbmcgMTYgYml0cyBhcmUgcmVzZXJ2ZWQKK3R5cGVkZWYgc3RydWN0IF9BVE9NX1BQTElCX1RIRVJNQUxfU1RBVEUKK3sKKyAgICBVQ0hBUiAgIHVjTWluVGVtcGVyYXR1cmU7CisgICAgVUNIQVIgICB1Y01heFRlbXBlcmF0dXJlOworICAgIFVDSEFSICAgdWNUaGVybWFsQWN0aW9uOworfUFUT01fUFBMSUJfVEhFUk1BTF9TVEFURSwgKkxQQVRPTV9QUExJQl9USEVSTUFMX1NUQVRFOworCisvLyBDb250YWluZWQgaW4gYW4gYXJyYXkgc3RhcnRpbmcgYX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aW5lIFNJX1BGUF9VQ09ERV9TSVpFICAgICAgICAgICAgMjE0NAogI2RlZmluZSBTSV9QTTRfVUNPREVfU0laRSAgICAgICAgICAgIDIxNDQKICNkZWZpbmUgU0lfQ0VfVUNPREVfU0laRSAgICAgICAgICAgICAyMTQ0CisjZGVmaW5lIENJS19QRlBfVUNPREVfU0laRSAgICAgICAgICAgMjE0NAorI2RlZmluZSBDSUtfTUVfVUNPREVfU0laRSAgICAgICAgICAgIDIxNDQKKyNkZWZpbmUgQ0lLX0NFX1VDT0RFX1NJWkUgICAgICAgICAgICAyMTQ0CisKKy8qIE1FQyAqLworI2RlZmluZSBDSUtfTUVDX1VDT0RFX1NJWkUgICAgICAgICAgIDQxOTIKIAogLyogUkxDICovCiAjZGVmaW5lIFI2MDBfUkxDX1VDT0RFX1NJWkUgICAgICAgICAgNzY4CkBAIC00MywxMiArNDksMjAgQEAKICNkZWZpbmUgQ0FZTUFOX1JMQ19VQ09ERV9TSVpFICAgICAgICAxMDI0CiAjZGVmaW5lIEFSVUJBX1JMQ19VQ09ERV9TSVpFICAgICAgICAgMTUzNgogI2RlZmluZSBTSV9STENfVUNPREVfU0laRSAgICAgICAgICAgIDIwNDgKKyNkZWZpbmUgQk9OQUlSRV9STENfVUNPREVfU0laRSAgICAgICAyMDQ4CisjZGVmaW5lIEtCX1JMQ19VQ09ERV9TSVpFICAgICAgICAgICAgMjU2MAorI2RlZmluZSBLVl9STENfVUNPREVfU0laRSAgICAgICAgICAgIDI1NjAKIAogLyogTUMgKi8KICNkZWZpbmUgQlRDX01DX1VDT0RFX1NJWkUgICAgICAgICAgICA2MDI0CiAjZGVmaW5lIENBWU1BTl9NQ19VQ09ERV9TSVpFICAgICAgICAgNjAzNwogI2RlZmluZSBTSV9NQ19VQ09ERV9TSVpFICAgICAgICAgICAgIDc3NjkKICNkZWZpbmUgT0xBTkRfTUNfVUNPREVfU0laRSAgICAgICAgICA3ODYzCisjZGVmaW5lIENJS19NQ19VQ09ERV9TSVpF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UVTX1NURVJFTyh4KSAgICAgICAgICAgICgoKHgpICYgMHhmZikgPDwgMjQpIC8qIExQQ00gb25seSAqLworLyogU1VQUE9SVEVEX0ZSRVFVRU5DSUVTLCBTVVBQT1JURURfRlJFUVVFTkNJRVNfU1RFUkVPCisgKiBiaXQwID0gMzIga0h6CisgKiBiaXQxID0gNDQuMSBrSHoKKyAqIGJpdDIgPSA0OCBrSHoKKyAqIGJpdDMgPSA4OC4yIGtIegorICogYml0NCA9IDk2IGtIegorICogYml0NSA9IDE3Ni40IGtIegorICogYml0NiA9IDE5MiBrSHoKKyAqLworI2RlZmluZSBBWl9GMF9DT0RFQ19QSU5fQ09OVFJPTF9IT1RQTFVHX0NPTlRST0wgICAgICAgICAgMHg1NAorIyAgICAgICBkZWZpbmUgQVVESU9fRU5BQkxFRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMzEpCisKKyNkZWZpbmUgQVpfRjBfQ09ERUNfUElOX0NPTlRST0xfUkVTUE9OU0VfQ09ORklHVVJBVElPTl9ERUZBVUxUICAweDU2CisjZGVmaW5lCQlQT1JUX0NPTk5FQ1RJVklUWV9NQVNLCQkJCSgzIDw8IDMwKQorI2RlZmluZQkJUE9SVF9DT05ORUNUSVZJVFlfU0hJRlQJCQkJMzAKKwogI2RlZmluZQlEQ19MQl9NRU1PUllfU1BMSVQJCQkJCTB4NmIwYwogI2RlZmluZQkJRENfTEJfTUVNT1JZX0NPTkZJRyh4KQkJCQkoKHgpIDw8IDIwKQogCkBAIC03NTUsNiArODEwLDE3IEBACiAvKiAweDZlOTgsIDB4N2E5OCwgMHgxMDY5OCwgMHgxMTI5OCwgMHgxMWU5OCwgMHgxMmE5OCAqLwogI2RlZmluZSBDUlRDX1NUQVRVU19GUkFNRV9DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAweDZlOTgKIAorI2RlZmluZSBBRk1UX0FVRElPX1NSQ19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDcxM2MKKyNkZWZpbmUJCUFGTVRfQVVESU9fU1JDX1NFTEVDVCh4KQkJKCgoeCkgJiA3KSA8PCAwKQorLyogQUZNVF9BVURJT19TUkNfU0VMRUNUCisgKiAwID0gc3RyZWFtMAorICogMSA9IHN0cmVhbTEKKyAqIDIgPSBzdHJlYW0yCisgKiAzID0gc3RyZWFtMworICogNCA9IHN0cmVhbTQKKyAqIDUgPSBzdHJlYW01CisgKi8KKwogI2RlZmluZQlHUkJNX0NOVEwJCQkJCTB4ODAwMAogI2RlZmluZQkJR1JCTV9SRUFEX1RJTUVPVVQoeCkJCQkJKCh4KSA8PCAwKQogCkBAIC0xMjk1LDYgKzEzNjEsNyBAQAogLyogUENJRSByZWdpc3RlcnMgaWR4L2RhdGEgMHgzMC8weDM0ICovCiAjZGVmaW5lIFBDSUVfQ05UTDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxYyAvKiBQQ0lFICovCiAjICAgICAgIGRlZmluZSBTTFZfTUVNX0xTX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTYpCisjICAgICAgIGRlZmluZSBTTFZfTUVNX0FHR1JFU1NJVkVfTFNfRU4gICAgICAgICAgICAgICAgICAgKDEgPDwgMTcpCiAjICAgICAgIGRlZmluZSBNU1RfTUVNX0xTX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTgpCiAjICAgICAgIGRlZmluZSBSRVBMQVlfTUVNX0xTX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgMTkpCiAjZGVmaW5lIFBDSUVfTENfU1RBVFVTMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOCAvKiBQQ0lFICovCkBAIC0xNjQ0LDYgKzE3MTEsMTAgQEAKICMgICAgICAgZGVmaW5lIERNQV9JRExFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAwKQogI2RlZmluZSBETUFfVElMSU5HX0NP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mluZSBTTVU3X1RIRVJNQUxfQ09OVFJPTExFUl9DT05GSUdfTUFTSyAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBTTVU3X01DTEtfRFBNX0NPTkZJR19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorI2RlZmluZSBTTVU3X1VWRF9EUE1fQ09ORklHX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSBTTVU3X1ZDRV9EUE1fQ09ORklHX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSBTTVU3X0FDUF9EUE1fQ09ORklHX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSBTTVU3X1NBTVVfRFBNX0NPTkZJR19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSBTTVU3X1BDSUVHRU5fRFBNX0NPTkZJR19NQVNLICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lIFNNVTdfQUNQX01DTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIFNNVTdfQUNQX1NDTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIFNNVTdfVVZEX01DTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDAwMTAwCisjZGVmaW5lIFNNVTdfVVZEX1NDTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDAwMjAwCisjZGVmaW5lIFNNVTdfVkNFX01DTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDEwMDAwCisjZGVmaW5lIFNNVTdfVkNFX1NDTEtfSEFORFNIQUtFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAweDAwMDIwMDAwCisKK3N0cnVjdCBTTVU3X0Zpcm13YXJlX0hlYWRlcgoreworICAgIHVpbnQzMl90IERpZ2VzdFs1XTsKKyAgICB1aW50MzJfdCBWZXJzaW9uOworICAgIHVpbnQzMl90IEhlYWRlclNpemU7CisgICAgdWludDMyX3QgRmxhZ3M7CisgICAgdWludDMyX3QgRW50cnlQb2ludDsKKyAgICB1aW50MzJfdCBDb2RlU2l6ZTsKKyAgICB1aW50MzJfdCBJbWFnZVNpemU7CisKKyAgICB1aW50MzJfdCBSdG9zOworICAgIHVpbnQzMl90IFNvZnRSZWdpc3RlcnM7CisgICAgdWludDMyX3QgRHBtVGFibGU7CisgICAgdWludDMyX3QgRmFuVGFibGU7CisgICAgdWludDMyX3QgQ2FjQ29uZmlnVGFibGU7CisgICAgdWludDMyX3QgQ2FjU3RhdHVzVGFibGU7CisKKyAgICB1aW50MzJfdCBtY1JlZ2lzdGVyVGFibGU7CisKKyAgICB1aW50MzJfdCBtY0FyYkRyYW1UaW1pbmdUYWJsZTsKKworICAgIHVpbnQzMl90IFBtRnVzZVRhYmxlOworICAgIHVpbnQzMl90IEdsb2JhbHM7CisgICAgdWludDMyX3QgUmVzZXJ2ZWRbNDJdOworICAgIHVpbnQzMl90IFNpZ25hdHVyZTsKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRmlybXdhcmVfSGVhZGVyIFNNVTdfRmlybXdhcmVfSGVhZGVyOworCisjZGVmaW5lIFNNVTdfRklSTVdBUkVfSEVBREVSX0xPQ0FUSU9OIDB4MjAwMDAKKworZW51bSAgRGlzcGxheUNvbmZpZyB7CisgICAgUG93ZXJEb3duID0gMSwKKyAgICBEUDU0eDQsCisgICAgRFA1NHgyLAorICAgIERQNTR4MSwKKyAgICBEUDI3eDQsCisgICAgRFAyN3gyLAorICAgIERQMjd4MSwKKyAgICBIRE1JMjk3LAorICAgIEhETUkxNjIsCisgICAgTFZEUywKKyAgICBEUDMyNHg0LAorICAgIERQMzI0eDIsCisgICAgRFAzMjR4MQorfTsKKworI3ByYWdtYSBwY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TTVU3X05VTV9HUFVfVEVTIDEKKyNkZWZpbmUgU01VN19OVU1fTk9OX1RFUyAyCisKK3N0cnVjdCBTTVU3X1NvZnRSZWdpc3RlcnMKK3sKKyAgICB1aW50MzJfdCAgICAgICAgUmVmQ2xvY2tGcmVxdWVuY3k7CisgICAgdWludDMyX3QgICAgICAgIFBtVGltZXJQOworICAgIHVpbnQzMl90ICAgICAgICBGZWF0dXJlRW5hYmxlczsKKyAgICB1aW50MzJfdCAgICAgICAgUHJlVkJsYW5rR2FwOworICAgIHVpbnQzMl90ICAgICAgICBWQmxhbmtUaW1lb3V0OworICAgIHVpbnQzMl90ICAgICAgICBUcmFpblRpbWVHYXA7CisKKyAgICB1aW50MzJfdCAgICAgICAgTXZkZFN3aXRjaFRpbWU7CisgICAgdWludDMyX3QgICAgICAgIExvbmdlc3RBY3BpVHJhaW5UaW1lOworICAgIHVpbnQzMl90ICAgICAgICBBY3BpRGVsYXk7CisgICAgdWludDMyX3QgICAgICAgIEc1VHJhaW5UaW1lOworICAgIHVpbnQzMl90ICAgICAgICBEZWxheU1wbGxQd3JvbjsKKyAgICB1aW50MzJfdCAgICAgICAgVm9sdGFnZUNoYW5nZVRpbWVvdXQ7CisgICAgdWludDMyX3QgICAgICAgIEhhbmRzaGFrZURpc2FibGVzOworCisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHkxQ29uZmlnOworICAgIHVpbnQ4X3QgICAgICAgICBEaXNwbGF5UGh5MkNvbmZpZzsKKyAgICB1aW50OF90ICAgICAgICAgRGlzcGxheVBoeTNDb25maWc7CisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk0Q29uZmlnOworCisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk1Q29uZmlnOworICAgIHVpbnQ4X3QgICAgICAgICBEaXNwbGF5UGh5NkNvbmZpZzsKKyAgICB1aW50OF90ICAgICAgICAgRGlzcGxheVBoeTdDb25maWc7CisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk4Q29uZmlnOworCisgICAgdWludDMyX3QgICAgICAgIEF2ZXJhZ2VHcmFwaGljc0E7CisgICAgdWludDMyX3QgICAgICAgIEF2ZXJhZ2VNZW1vcnlBOworICAgIHVpbnQzMl90ICAgICAgICBBdmVyYWdlR2lvQTsKKworICAgIHVpbnQ4X3QgICAgICAgICBTQ2xrRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgTUNsa0RwbUVuYWJsZWRMZXZlbHM7CisgICAgdWludDhfdCAgICAgICAgIExDbGtEcG1FbmFibGVkTGV2ZWxzOworICAgIHVpbnQ4X3QgICAgICAgICBQQ0llRHBtRW5hYmxlZExldmVsczsKKworICAgIHVpbnQ4X3QgICAgICAgICBVVkREcG1FbmFibGVkTGV2ZWxzOworICAgIHVpbnQ4X3QgICAgICAgICBTQU1VRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgQUNQRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgVkNFRHBtRW5hYmxlZExldmVsczsKKworICAgIHVpbnQzMl90ICAgICAgICBEUkFNX0xPR19BRERSX0g7CisgICAgdWludDMyX3QgICAgICAgIERSQU1fTE9HX0FERFJfTDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfUEhZX0FERFJfSDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfUEhZX0FERFJfTDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfQlVGRl9TSVpFOworICAgIHVpbnQzMl90ICAgICAgICBVbHZFbnRlckM7CisgICAgdWludDMyX3QgICAgICAgIFVsdlRpbWU7CisgICAgdWludDMyX3QgICAgICAgIFJlc2VydmVkWzNdOworCit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X1NvZnRSZWdpc3RlcnMgU01VN19Tb2Z0UmVnaXN0ZXJzOworCitzdHJ1Y3QgU01VN19EaXNjcmV0ZV9Wb2x0YWdlTGV2ZWwKK3sKKyAgICB1aW50MTZfdCAgICBWb2x0YWdlOworICAgIHVpbnQxNl90ICAgIFN0ZFZvbHRhZ2VIaVNpZGQ7CisgICAgdWludDE2X3QgICAgU3RkVm9sdGFnZUxvU2lkZDsKKyAgICB1aW50OF90ICAgICBTbWlvOworICAgIHVpbnQ4X3QgICAgIHBhZGRpbmc7Cit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X0Rpc2NyZXRlX1ZvbHRhZ2VMZXZlbCBTTVU3X0Rpc2NyZXRlX1ZvbHRhZ2VMZXZlbDsKKworc3RydWN0IFNNVTdfRGlzY3JldGVfR3JhcGhpY3NMZXZlbAoreworICAgIHVpbnQzMl90ICAgIEZsYWdzOworICAgIHVpbnQzMl90ICAgIE1pblZkZGM7CisgICAgdWludDMyX3QgICAgTWluVmRkY1BoYXNlczsKKworICAgIHVpbnQzMl90ICAgIFNjbGtGcmVxdWVuY3k7CisKKyAgICB1aW50OF90ICAgICBwYWRkaW5nMVsyXTsKKyAgICB1aW50MTZfdCAgICBBY3Rpdml0eUxldmVsOworCisgICAgdWludDMyX3QgICAgQ2dTcGxsRnVuY0NudGwzOworICAgIHVpbnQzMl90ICAgIENnU3BsbEZ1bmNDbnRsNDsKKyAgICB1aW50MzJfdCAgICBTcGxsU3ByZWFkU3BlY3RydW07CisgICAgdWludDMyX3QgICAgU3BsbFNwcmVhZFNwZWN0cnVtMjsKKyAgICB1aW50MzJfdCAgICBDY1B3ckR5blJtOworICAgIHVpbnQzMl90ICAgIENjUHdyRHluUm0xOworICAgIHVpbnQ4X3QgICAgIFNjbGtEaWQ7CisgICAgdWludDhfdCAgICAgRGlzcGxheVdhdGVybWFyazsKKyAgICB1aW50OF90ICAgICBFbmFibGVkRm9yQWN0aXZpdHk7CisgICAgdWludDhfdCAgICAgRW5hYmxlZEZvclRocm90dGxlOworICAgIHVpbnQ4X3QgICAgIFVwSDsKKyAgICB1aW50OF90ICAgICBEb3duSDsKKyAgICB1aW50OF90ICAgICBWb2x0YWdlRG93bkg7CisgICAgdWludDhfdCAgICAgUG93ZXJUaHJvdHRsZTsKKyAgICB1aW50OF90ICAgICBEZWVwU2xlZXBEaXZJZDsKKyAgICB1aW50OF90ICAgICBwYWRkaW5nWzNdOworfTsKKwordHlwZWRlZiBzdHJ1Y3QgU01VN19EaXNjcmV0ZV9HcmFwaGljc0xldmVsIFNNVTdfRGlzY3JldGVfR3JhcGhpY3NMZXZlbDsKKworc3RydWN0IFNNVTdfRGlzY3JldGVfQUNQSUxldmVsCit7CisgICAgdWludDMyX3QgICAgRmxhZ3M7CisgICAgdWludDMyX3QgICAgTWluVmRkYzsKKyAgICB1aW50MzJfdCAgICBNaW5WZGRjUGhhc2VzOworICAgIHVpbnQzMl90ICAgIFNjbGtGcmVxdWVuY3k7CisgICAgdWludDhfdCAgICAgU2Nsa0RpZDsKKyAgICB1aW50OF90ICAgICBEaXNwbGF5V2F0ZXJtYXJrOworICAgIHVpbnQ4X3QgICAgIERlZXBTbGVlcERpdklkOworICAgIHVpbnQ4X3QgICAgIHBhZGRpbmc7CisgICAgdWludDMyX3QgICAgQ2dTcGxsRnVuY0NudGw7CisgICAgdWludDMyX3QgICAgQ2dTcGxsRnVuY0NudGwyOworICAgIHVpbnQzMl90ICAgIENnU3BsbEZ1bmNDbnRsMzsKKyAgICB1aW50MzJfdCAgICBDZ1NwbGxGdW5jQ250bDQ7CisgICAgdWludDMyX3QgICAgU3BsbFNwcmVhZFNwZWN0cnVtOworICAgIHVpbnQzMl90ICAgIFNwbGxTcHJlYWRTcGVjdHJ1bTI7CisgICAgdWludDMyX3QgICAgQ2NQd3JEeW5SbTsKKyAgICB1aW50MzJfdCAgICBDY1B3ckR5blJtMTsKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRGlzY3JldGVfQUNQSUxldmVsIFNNVTdfRGlzY3JldGVfQUNQSUxldmVsOworCitzdHJ1Y3QgU01VN19EaXNjcmV0ZV9VbHYKK3sKKyAgICB1aW50MzJfdCAgICBDY1B3ckR5blJtOworICAgIHVpbnQzMl90ICAgIENjUHdyRHluUm0xOworICAgIHVpbnQxNl90ICAgIFZkZGNPZmZzZXQ7CisgICAgdWludDhfdCAgICAgVmRkY09mZnNldFZpZDsKKyAgICB1aW50OF90ICAgICBWZGRjUGhhc2U7CisgICAgdWludDMyX3QgICAgUmVzZXJ2ZWQ7Cit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X0Rpc2NyZXRlX1VsdiBTTVU3X0Rpc2NyZXRlX1VsdjsKKworc3RydWN0IFNNVTdfRGlzY3JldGVfTWVtb3J5TGV2ZWwKK3sKKyAgICB1aW50MzJfdCAgICBNaW5WZGRjOworICAgIHVpbnQzMl90ICAgIE1pblZkZGNQaGFzZXM7CisgICAgdWludDMyX3QgICAgTWluVmRkY2k7CisgICAgdWludDMyX3QgICAgTWluTXZkZDsKKworICAgIHVpbnQzMl90ICAgIE1jbGtGcmVxdWVuY3k7CisKKyAgICB1aW50OF90ICAgICBFZGNSZWFkRW5hYmxlOworICAgIHVpbnQ4X3QgICAgIEVkY1dyaXRlRW5hYmxlOworICAgIHVpbnQ4X3QgICAgIFJ0dEVuYWJsZTsKKyAgICB1aW50OF90ICAgICBTdHV0dGVyRW5hYmxlOworCisgICAgdWludDhfdCAgICAgU3Ryb2JlRW5hYmxlOworICAgIHVpbnQ4X3QgICAgIFN0cm9iZVJhdGlvOworICAgIHVpbnQ4X3QgICAgIEVuYWJsZWRGb3JUaHJvdHRsZTsKKyAgICB1aW50OF90ICAgICBFbmFibGVkRm9yQWN0aXZpdHk7CisKKyAgICB1aW50OF90ICAgICBVcEg7CisgICAgdWludDhfdCAgICAgRG93bkg7CisgICAgdWludDhfdCAgICAgVm9sdGFnZURvd25IOworICAgIHVpbnQ4X3QgICAgIHBhZGRpbmc7CisKKyAgICB1aW50MTZfdCAgICBBY3Rpdml0eUxldmVsOworICAgIHVpbnQ4X3QgICAgIERpc3BsYXlXYXRlcm1hcms7CisgICAgdWludDhfdCAgICAgcGFkZGluZzE7CisKKyAgICB1aW50MzJfdCAgICBNcGxsRnVuY0NudGw7CisgICAgdWludDMyX3QgICAgTXBsbEZ1bmNDbnRsXzE7CisgICAgdWludDMyX3QgICAgTXBsbEZ1bmNDbnRsXzI7CisgICAgdWludDMyX3QgICAgTXBsbEFkRnVuY0NudGw7CisgICAgdWludDMyX3QgICAgTXBsbERxRnVuY0NudGw7CisgICAgdWludDMyX3QgICAgTWNsa1B3cm1ndENudGw7CisgICAgdWludDMyX3QgICAgRGxsQ250bDsKKyAgICB1aW50MzJfdCAgICBNcGxsU3MxOworICAgIHVpbnQzMl90ICAgIE1wbGxTczI7Cit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X0Rpc2NyZXRlX01lbW9yeUxldmVsIFNNVTdfRGlzY3JldGVfTWVtb3J5TGV2ZWw7CisKK3N0cnVjdCBTTVU3X0Rpc2NyZXRlX0xpbmtMZXZlbAoreworICAgIHVpbnQ4X3QgICAgIFBjaWVHZW5TcGVlZDsKKyAgICB1aW50OF90ICAgICBQY2llTGFuZUNvdW50OworICAgIHVpbnQ4X3QgICAgIEVuYWJsZWRGb3JBY3Rpdml0eTsKKyAgICB1aW50OF90ICAgICBQYWRkaW5nOworICAgIHVpbnQzMl90ICAgIERvd25UOworICAgIHVpbnQzMl90ICAgIFVwVDsKKyAgICB1aW50MzJfdCAgICBSZXNlcnZlZDsKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRGlzY3JldGVfTGlua0xldmVsIFNNVTdfRGlzY3JldGVfTGlua0xldmVsOworCisKK3N0cnVjdCBTTVU3X0Rpc2NyZXRlX01DQXJiRHJhbVRpbWluZ1RhYmxlRW50cnkKK3sKKyAgICB1aW50MzJfdCBNY0FyYkRyYW1UaW1pbmc7CisgICAgdWludDMyX3QgTWNBcmJEcmFtVGltaW5nMjsKKyAgICB1aW50OF90ICBNY0FyYkJ1cnN0VGltZTsKKyAgICB1aW50OF90ICBwYWRkaW5nWzNdOworfTsKKwordHlwZW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GlzY3JldGVfRXh0Q2xrTGV2ZWw7CisKK3N0cnVjdCBTTVU3X0Rpc2NyZXRlX1N0YXRlSW5mbworeworICAgIHVpbnQzMl90IFNjbGtGcmVxdWVuY3k7CisgICAgdWludDMyX3QgTWNsa0ZyZXF1ZW5jeTsKKyAgICB1aW50MzJfdCBWY2xrRnJlcXVlbmN5OworICAgIHVpbnQzMl90IERjbGtGcmVxdWVuY3k7CisgICAgdWludDMyX3QgU2FtY2xrRnJlcXVlbmN5OworICAgIHVpbnQzMl90IEFjbGtGcmVxdWVuY3k7CisgICAgdWludDMyX3QgRWNsa0ZyZXF1ZW5jeTsKKyAgICB1aW50MTZfdCBNdmRkVm9sdGFnZTsKKyAgICB1aW50MTZfdCBwYWRkaW5nMTY7CisgICAgdWludDhfdCAgRGlzcGxheVdhdGVybWFyazsKKyAgICB1aW50OF90ICBNY0FyYkluZGV4OworICAgIHVpbnQ4X3QgIE1jUmVnSW5kZXg7CisgICAgdWludDhfdCAgU2VxSW5kZXg7CisgICAgdWludDhfdCAgU2Nsa0RpZDsKKyAgICBpbnQ4X3QgICBTY2xrSW5kZXg7CisgICAgaW50OF90ICAgTWNsa0luZGV4OworICAgIHVpbnQ4X3QgIFBDSWVHZW47CisKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRGlzY3JldGVfU3RhdGVJbmZvIFNNVTdfRGlzY3JldGVfU3RhdGVJbmZvOworCisKK3N0cnVjdCBTTVU3X0Rpc2NyZXRlX0RwbVRhYmxlCit7CisgICAgU01VN19QSURDb250cm9sbGVyICAgICAgICAgICAgICAgICAgR3JhcGhpY3NQSURDb250cm9sbGVyOworICAgIFNNVTdfUElEQ29udHJvbGxlciAgICAgICAgICAgICAgICAgIE1lbW9yeVBJRENvbnRyb2xsZXI7CisgICAgU01VN19QSURDb250cm9sbGVyICAgICAgICAgICAgICAgICAgTGlua1BJRENvbnRyb2xsZXI7CisKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBTeXN0ZW1GbGFnczsKKworCisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgU21pb01hc2tWZGRjVmlkOworICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNtaW9NYXNrVmRkY1BoYXNlOworICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNtaW9NYXNrVmRkY2lWaWQ7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgU21pb01hc2tNdmRkVmlkOworCisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmRkY0xldmVsQ291bnQ7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmRkY2lMZXZlbENvdW50OworICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE12ZGRMZXZlbENvdW50OworCisgICAgU01VN19EaXNjcmV0ZV9Wb2x0YWdlTGV2ZWwgICAgICAgICAgVmRkY0xldmVsICAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19WRERDXTsKKy8vICAgIFNNVTdfRGlzY3JldGVfVm9sdGFnZUxldmVsICAgICAgICAgIFZkZGNTdGFuZGFyZFJlZmVyZW5jZSAgIFtTTVU3X01BWF9MRVZFTFNfVkREQ107CisgICAgU01VN19EaXNjcmV0ZV9Wb2x0YWdlTGV2ZWwgICAgICAgICAgVmRkY2lMZXZlbCAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19WRERDSV07CisgICAgU01VN19EaXNjcmV0ZV9Wb2x0YWdlTGV2ZWwgICAgICAgICAgTXZkZExldmVsICAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19NVkREXTsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXBoaWNzRHBtTGV2ZWxDb3VudDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNZW1vcnlEcG1MZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExpbmtMZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV2ZExldmVsQ291bnQ7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmNlTGV2ZWxDb3VudDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY3BMZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhbXVMZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hc3RlckRlZXBTbGVlcENvbnRyb2w7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWRbNV07CisvLyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBTYW11RGVmYXVsdExldmVsOworCisgICAgU01VN19EaXNjcmV0ZV9HcmFwaGljc0xldmVsICAgICAgICAgR3JhcGhpY3NMZXZlbCAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19HUkFQSElDU107CisgICAgU01VN19EaXNjcmV0ZV9NZW1vcnlMZXZlbCAgICAgICAgICAgTWVtb3J5QUNQSUxldmVsOworICAgIFNNVTdfRGlzY3JldGVfTWVtb3J5TGV2ZWwgICAgICAgICAgIE1lbW9yeUxldmVsICAgICAgICAgICAgIFtTTVU3X01BWF9MRVZFTFNfTUVNT1JZXTsKKyAgICBTTVU3X0Rpc2NyZXRlX0xpbmtMZXZlbCAgICAgICAgICAgICBMaW5rTGV2ZWwgICAgICAgICAgICAgICBbU01VN19NQVhfTEVWRUxTX0xJTktdOworICAgIFNNVTdfRGlzY3JldGVfQUNQSUxldmVsICAgICAgICAgICAgIEFDUElMZXZlbDsKKyAgICBTTVU3X0Rpc2NyZXRlX1V2ZExldmVsICAgICAgICAgICAgICBVdmRMZXZlbCAgICAgICAgICAgICAgICBbU01VN19NQVhfTEVWRUxTX1VWRF07CisgICAgU01VN19EaXNjcmV0ZV9FeHRDbGtMZXZlbCAgICAgICAgICAgVmNlTGV2ZWwgICAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19WQ0VdOworICAgIFNNVTdfRGlzY3JldGVfRXh0Q2xrTGV2ZWwgICAgICAgICAgIEFjcExldmVsICAgICAgICAgICAgICAgIFtTTVU3X01BWF9MRVZFTFNfQUNQXTsKKyAgICBTTVU3X0Rpc2NyZXRlX0V4dENsa0xldmVsICAgICAgICAgICBTYW11TGV2ZWwgICAgICAgICAgICAgICBbU01VN19NQVhfTEVWRUxTX1NBTVVdOworICAgIFNNVTdfRGlzY3JldGVfVWx2ICAgICAgICAgICAgICAgICAgIFVsdjsKKworICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNjbGtTdGVwU2l6ZTsKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBTbWlvICAgICAgICAgICAgICAgICAgICBbU01VN19NQVhfRU5UUklFU19TTUlPXTsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV2ZEJvb3RMZXZlbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWY2VCb290TGV2ZWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNwQm9vdExldmVsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhbXVCb290TGV2ZWw7CisKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVVkRJbnRlcnZhbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQ0VJbnRlcnZhbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBQ1BJbnRlcnZhbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTQU1VSW50ZXJ2YWw7CisKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmFwaGljc0Jvb3RMZXZlbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmFwaGljc1ZvbHRhZ2VDaGFuZ2VFbmFibGU7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR3JhcGhpY3NUaGVybVRocm90dGxlRW5hYmxlOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXBoaWNzSW50ZXJ2YWw7CisKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x0YWdlSW50ZXJ2YWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlcm1hbEludGVydmFsOworICAgIHVpbnQxNl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRlbXBlcmF0dXJlTGltaXRIaWdoOworCisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGVtcGVyYXR1cmVMaW1pdExvdzsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNZW1vcnlCb290TGV2ZWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWVtb3J5Vm9sdGFnZUNoYW5nZUVuYWJsZTsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1lbW9yeUludGVydmFsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1lbW9yeVRoZXJtVGhyb3R0bGVFbmFibGU7CisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmRkY1ZkZGNpRGVsdGE7CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x0YWdlUmVzcG9uc2VUaW1lOworICAgIHVpbnQxNl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBoYXNlUmVzcG9uc2VUaW1lOworCisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUENJZUJvb3RMaW5rTGV2ZWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUENJZUdlbkludGVydmFsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERURUludGVydmFsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERURU1vZGU7CisKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVkkyRW5hYmxlOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZSSG90R3BpbzsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY0RjR3BpbzsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGVybUdwaW87CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBQUE1fUGtnUHdyTGltaXQ7CisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFBNX1RlbXBlcmF0dXJlTGltaXQ7CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWZhdWx0VGRwOworICAgIHVpbnQxNl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRhcmdldFRkcDsKKworICAgIHVpbnQxNl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZwc0hpZ2hUOworICAgIHVpbnQxNl90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZwc0xvd1Q7CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBCQVBNVElfUiAgW1NNVTdfRFRFX0lURVJBVElPTlNdW1NNVTdfRFRFX1NPVVJDRVNdW1NNVTdfRFRFX1NJTktTXTsKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBCQVBNVElfUkMgW1NNVTdfRFRFX0lURVJBVElPTlNdW1NNVTdfRFRFX1NPVVJDRVNdW1NNVTdfRFRFX1NJTktTXTsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERURUFtYmllbnRUZW1wQmFzZTsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEVEVUak9mZnNldDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHcHVUak1heDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHcHVUakh5c3Q7CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBCb290VmRkYzsKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBCb290VmRkY2k7CisKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBCb290TVZkZDsKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOworCisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkFQTV9URU1QX0dSQURJRU5UOworCisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgTG93U2Nsa0ludGVycnVwdFQ7Cit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X0Rpc2NyZXRlX0RwbVRhYmxlIFNNVTdfRGlzY3JldGVfRHBtVGFibGU7CisKKyNkZWZpbmUgU01VN19ESVNDUkVURV9NQ19SRUdJU1RFUl9BUlJBWV9TSVpFIDE2CisjZGVmaW5lIFNNVTdfRElTQ1JFVEVfTUNfUkVHSVNURVJfQVJSQVlfU0VUX0NPVU5UIFNNVTdfTUFYX0xFVkVMU19NRU1PU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WZpbmUgU01VN19OVU1fR1BVX1RFUyAxCisjZGVmaW5lIFNNVTdfTlVNX05PTl9URVMgMgorCisvLyBBbGwgJ3NvZnQgcmVnaXN0ZXJzJyBzaG91bGQgYmUgdWludDMyX3QuCitzdHJ1Y3QgU01VN19Tb2Z0UmVnaXN0ZXJzCit7CisgICAgdWludDMyX3QgICAgICAgIFJlZkNsb2NrRnJlcXVlbmN5OworICAgIHVpbnQzMl90ICAgICAgICBQbVRpbWVyUDsKKyAgICB1aW50MzJfdCAgICAgICAgRmVhdHVyZUVuYWJsZXM7CisgICAgdWludDMyX3QgICAgICAgIEhhbmRzaGFrZURpc2FibGVzOworCisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHkxQ29uZmlnOworICAgIHVpbnQ4X3QgICAgICAgICBEaXNwbGF5UGh5MkNvbmZpZzsKKyAgICB1aW50OF90ICAgICAgICAgRGlzcGxheVBoeTNDb25maWc7CisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk0Q29uZmlnOworCisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk1Q29uZmlnOworICAgIHVpbnQ4X3QgICAgICAgICBEaXNwbGF5UGh5NkNvbmZpZzsKKyAgICB1aW50OF90ICAgICAgICAgRGlzcGxheVBoeTdDb25maWc7CisgICAgdWludDhfdCAgICAgICAgIERpc3BsYXlQaHk4Q29uZmlnOworCisgICAgdWludDMyX3QgICAgICAgIEF2ZXJhZ2VHcmFwaGljc0E7CisgICAgdWludDMyX3QgICAgICAgIEF2ZXJhZ2VNZW1vcnlBOworICAgIHVpbnQzMl90ICAgICAgICBBdmVyYWdlR2lvQTsKKworICAgIHVpbnQ4X3QgICAgICAgICBTQ2xrRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgTUNsa0RwbUVuYWJsZWRMZXZlbHM7CisgICAgdWludDhfdCAgICAgICAgIExDbGtEcG1FbmFibGVkTGV2ZWxzOworICAgIHVpbnQ4X3QgICAgICAgICBQQ0llRHBtRW5hYmxlZExldmVsczsKKworICAgIHVpbnQ4X3QgICAgICAgICBVVkREcG1FbmFibGVkTGV2ZWxzOworICAgIHVpbnQ4X3QgICAgICAgICBTQU1VRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgQUNQRHBtRW5hYmxlZExldmVsczsKKyAgICB1aW50OF90ICAgICAgICAgVkNFRHBtRW5hYmxlZExldmVsczsKKworICAgIHVpbnQzMl90ICAgICAgICBEUkFNX0xPR19BRERSX0g7CisgICAgdWludDMyX3QgICAgICAgIERSQU1fTE9HX0FERFJfTDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfUEhZX0FERFJfSDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfUEhZX0FERFJfTDsKKyAgICB1aW50MzJfdCAgICAgICAgRFJBTV9MT0dfQlVGRl9TSVpFOworICAgIHVpbnQzMl90ICAgICAgICBVbHZFbnRlckM7CisgICAgdWludDMyX3QgICAgICAgIFVsdlRpbWU7CisgICAgdWludDMyX3QgICAgICAgIFJlc2VydmVkWzNdOworCit9OworCit0eXBlZGVmIHN0cnVjdCBTTVU3X1NvZnRSZWdpc3RlcnMgU01VN19Tb2Z0UmVnaXN0ZXJzOworCitzdHJ1Y3QgU01VN19GdXNpb25fR3JhcGhpY3NMZXZlbAoreworICAgIHVpbnQzMl90ICAgIE1pblZkZE5iOworCisgICAgdWludDMyX3QgICAgU2Nsa0ZyZXF1ZW5jeTsKKworICAgIHVpbnQ4X3QgICAgIFZpZDsKKyAgICB1aW50OF90ICAgICBWaWRPZmZzZXQ7CisgICAgdWludDE2X3QgICAgQVQ7CisKKyAgICB1aW50OF90ICAgICBQb3dlclRocm90dGxlOworICAgIHVpbnQ4X3QgICAgIEduYlNsb3c7CisgICAgdWludDhfdCAgICAgRm9yY2VOYlBzMTsKKyAgICB1aW50OF90ICAgICBTY2xrRGlkOworCisgICAgdWludDhfdCAgICAgRGlzcGxheVdhdGVybWFyazsKKyAgICB1aW50OF90ICAgICBFbmFibGVkRm9yQWN0aXZpdHk7CisgICAgdWludDhfdCAgICAgRW5hYmxlZEZvclRocm90dGxlOworICAgIHVpbnQ4X3QgICAgIFVwSDsKKworICAgIHVpbnQ4X3QgICAgIERvd25IOworICAgIHVpbnQ4X3QgICAgIFZvbHRhZ2VEb3duSDsKKyAgICB1aW50OF90ICAgICBEZWVwU2xlZXBEaXZJZDsKKworICAgIHVpbnQ4X3QgICAgIENsa0J5cGFzc0NudGw7CisKKyAgICB1aW50MzJfdCAgICByZXNlcnZlZDsKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRnVzaW9uX0dyYXBoaWNzTGV2ZWwgU01VN19GdXNpb25fR3JhcGhpY3NMZXZlbDsKKworc3RydWN0IFNNVTdfRnVzaW9uX0dJT0xldmVsCit7CisgICAgdWludDhfdCAgICAgRW5hYmxlZEZvckFjdGl2aXR5OworICAgIHVpbnQ4X3QgICAgIExjbGtEaWQ7CisgICAgdWludDhfdCAgICAgVmlkOworICAgIHVpbnQ4X3QgICAgIFZvbHRhZ2VEb3duSDsKKworICAgIHVpbnQzMl90ICAgIE1pblZkZE5iOworCisgICAgdWludDE2X3QgICAgUmVzaWRlbmN5Q291bnRlcjsKKyAgICB1aW50OF90ICAgICBVcEg7CisgICAgdWludDhfdCAgICAgRG93bkg7CisKKyAgICB1aW50MzJfdCAgICBMY2xrRnJlcXVlbmN5OworCisgICAgdWludDhfdCAgICAgQWN0aXZpdHlMZXZlbDsKKyAgICB1aW50OF90ICAgICBFbmFibGVkRm9yVGhyb3R0bGU7CisKKyAgICB1aW50OF90ICAgICBDbGtCeXBhc3NDbnRsOworCisgICAgdWludDhfdCAgICAgcGFkZGluZzsKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRnVzaW9uX0dJT0xldmVsIFNNVTdfRnVzaW9uX0dJT0xldmVsOworCisvLyBVVkQgVkNMSy9EQ0xLIHN0YXRlIChsZXZlbCkgZGVmaW5pd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WNsa0luZGV4OworfTsKKwordHlwZWRlZiBzdHJ1Y3QgU01VN19GdXNpb25fU3RhdGVJbmZvIFNNVTdfRnVzaW9uX1N0YXRlSW5mbzsKKworc3RydWN0IFNNVTdfRnVzaW9uX0RwbVRhYmxlCit7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3lzdGVtRmxhZ3M7CisKKyAgICBTTVU3X1BJRENvbnRyb2xsZXIgICAgICAgICAgICAgICAgICBHcmFwaGljc1BJRENvbnRyb2xsZXI7CisgICAgU01VN19QSURDb250cm9sbGVyICAgICAgICAgICAgICAgICAgR2lvUElEQ29udHJvbGxlcjsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgR3JhcGhpY3NEcG1MZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgR0lPTGV2ZWxDb3VudDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV2ZExldmVsQ291bnQ7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBWY2VMZXZlbENvdW50OworCisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY3BMZXZlbENvdW50OworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2FtdUxldmVsQ291bnQ7CisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBGcHNIaWdoVDsKKworICAgIFNNVTdfRnVzaW9uX0dyYXBoaWNzTGV2ZWwgICAgICAgICBHcmFwaGljc0xldmVsICAgICAgICAgICBbU01VX19OVU1fU0NMS19EUE1fU1RBVEVdOworICAgIFNNVTdfRnVzaW9uX0FDUElMZXZlbCAgICAgICAgICAgICBBQ1BJTGV2ZWw7CisgICAgU01VN19GdXNpb25fVXZkTGV2ZWwgICAgICAgICAgICAgIFV2ZExldmVsICAgICAgICAgICAgICAgIFtTTVU3X01BWF9MRVZFTFNfVVZEXTsKKyAgICBTTVU3X0Z1c2lvbl9FeHRDbGtMZXZlbCAgICAgICAgICAgVmNlTGV2ZWwgICAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19WQ0VdOworICAgIFNNVTdfRnVzaW9uX0V4dENsa0xldmVsICAgICAgICAgICBBY3BMZXZlbCAgICAgICAgICAgICAgICBbU01VN19NQVhfTEVWRUxTX0FDUF07CisgICAgU01VN19GdXNpb25fRXh0Q2xrTGV2ZWwgICAgICAgICAgIFNhbXVMZXZlbCAgICAgICAgICAgICAgIFtTTVU3X01BWF9MRVZFTFNfU0FNVV07CisKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgVXZkQm9vdExldmVsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBWY2VCb290TGV2ZWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEFjcEJvb3RMZXZlbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgU2FtdUJvb3RMZXZlbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgVVZESW50ZXJ2YWw7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIFZDRUludGVydmFsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBBQ1BJbnRlcnZhbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgU0FNVUludGVydmFsOworCisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXBoaWNzQm9vdExldmVsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmFwaGljc0ludGVydmFsOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmFwaGljc1RoZXJtVGhyb3R0bGVFbmFibGU7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXBoaWNzVm9sdGFnZUNoYW5nZUVuYWJsZTsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmFwaGljc0Nsa1Nsb3dFbmFibGU7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEdyYXBoaWNzQ2xrU2xvd0RpdmlkZXI7CisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgIEZwc0xvd1Q7CisKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgRGlzcGxheUNhYzsKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgTG93U2Nsa0ludGVycnVwdFQ7CisKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgRFJBTV9MT0dfQUREUl9IOworICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFNX0xPR19BRERSX0w7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgIERSQU1fTE9HX1BIWV9BRERSX0g7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgIERSQU1fTE9HX1BIWV9BRERSX0w7CisgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgICAgICAgIERSQU1fTE9HX0JVRkZfU0laRTsKKworfTsKKworc3RydWN0IFNNVTdfRnVzaW9uX0dJT0RwbVRhYmxlCit7CisKKyAgICBTTVU3X0Z1c2lvbl9HSU9MZXZlbCAgICAgICAgICAgICAgR0lPTGV2ZWwgICAgICAgICAgICAgICAgW1NNVTdfTUFYX0xFVkVMU19HSU9dOworCisgICAgU01VN19QSURDb250cm9sbGVyICAgICAgICAgICAgICAgIEdpb1BJRENvbnRyb2xsZXI7CisKKyAgICB1aW50MzJfdCAgICAgICAgICAgICAgICAgICAgICAgICAgR0lPTGV2ZWxDb3VudDsKKworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGU7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJT1ZvbHRhZ2VDaGFuZ2VFbmFibGU7CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJT0Jvb3RMZXZlbDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzFbMl07CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIFRhcmdldFN0YXRlOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBDdXJyZW50dFN0YXRlOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBUaHJvdHRsZU9uSHRjOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGVybVRocm90dGxlU3RhdHVzOworICAgIHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGVybVRocm90dGxlVGVtcFNlbGVjdDsKKyAgICB1aW50OF90ICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlcm1UaHJvdHRsZUVuYWJsZTsKKyAgICB1aW50MTZfdCAgICAgICAgICAgICAgICAgICAgICAgICAgVGVtcGVyYXR1cmVMaW1pdEhpZ2g7CisgICAgdWludDE2X3QgICAgICAgICAgICAgICAgICAgICAgICAgIFRlbXBlcmF0dXJlTGltaXRMb3c7CisKK307CisKK3R5cGVkZWYgc3RydWN0IFNNVTdfRnVzaW9uX0RwbVRhYmxlIFNNVTdfRnVzaW9uX0RwbVRhYmxlOwordHlwZWRlZiBzdHJ1Y3QgU01VN19GdXNpb25fR0lPRHBtVGFibGUgU01VN19GdXNpb25fR0lPRHBtVGFibGU7CisKKyNwcmFnbWEgcGFjayhwb3ApCisKKyNlbmRpZgorCmRpZmYgLS1naXQgYS9kcml2ZXJzL2dwdS9kcm0vcmFkZW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5nCisgKi8KK2ludCB1dmRfdjFfMF9pbml0KHN0cnVjdCByYWRlb25fZGV2aWNlICpyZGV2KQoreworCXN0cnVjdCByYWRlb25fcmluZyAqcmluZyA9ICZyZGV2LT5yaW5nW1I2MDBfUklOR19UWVBFX1VWRF9JTkRFWF07CisJdWludDMyX3QgdG1wOworCWludCByOworCisJLyogcmFpc2UgY2xvY2tzIHdoaWxlIGJvb3RpbmcgdXAgdGhlIFZDUFUgKi8KKwlyYWRlb25fc2V0X3V2ZF9jbG9ja3MocmRldiwgNTMzMDAsIDQwMDAwKTsKKworCXIgPSB1dmRfdjFfMF9zdGFydChyZGV2KTsKKwlpZiAocikKKwkJZ290byBkb25lOworCisJcmluZy0+cmVhZHkgPSB0cnVlOworCXIgPSByYWRlb25fcmluZ190ZXN0KHJkZXYsIFI2MDBfUklOR19UWVBFX1VWRF9JTkRFWCwgcmluZyk7CisJaWYgKHIpIHsKKwkJcmluZy0+cmVhZHkgPSBmYWxzZTsKKwkJZ290byBkb25lOworCX0KKworCXIgPSByYWRlb25fcmluZ19sb2NrKHJkZXYsIHJpbmcsIDEwKTsKKwlpZiAocikgeworCQlEUk1fRVJST1IoInJhZGVvbjogcmluZyBmYWlsZWQgdG8gbG9jayBVVkQgcmluZyAoJWQpLlxuIiwgcik7CisJCWdvdG8gZG9uZTsKKwl9CisKKwl0bXAgPSBQQUNLRVQwKFVWRF9TRU1BX1dBSVRfRkFVTFRfVElNRU9VVF9DTlRMLCAwKTsKKwlyYWRlb25fcmluZ193cml0ZShyaW5nLCB0bXApOworCXJhZGVvbl9yaW5nX3dyaXRlKHJpbmcsIDB4RkZGRkYpOworCisJdG1wID0gUEFDS0VUMChVVkRfU0VNQV9XQUlUX0lOQ09NUExFVEVfVElNRU9VVF9DTlRMLCAwKTsKKwlyYWRlb25fcmluZ193cml0ZShyaW5nLCB0bXApOworCXJhZGVvbl9yaW5nX3dyaXRlKHJpbmcsIDB4RkZGRkYpOworCisJdG1wID0gUEFDS0VUMChVV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YsIHNpemVvZihoZHJfZXgpKSkKKwkJCXJldHVybiAtRUZBVUxUOworCisJCWlmICgoKGhkcl9leC5pbl93b3JkcyArIGhkcl9leC5wcm92aWRlcl9pbl93b3JkcykgKiA0KSAhPSBjb3VudCkKKwkJCXJldHVybiAtRUlOVkFMOworCisJCXJldHVybiB1dmVyYnNfY21kX3RhYmxlW2hkci5jb21tYW5kXShmaWxlLAorCQkJCQkJICAgICBidWYgKyBzaXplb2YoaGRyX2V4KSwKKwkJCQkJCSAgICAgKGhkcl9leC5pbl93b3JkcyArCisJCQkJCQkgICAgICBoZHJfZXgucHJvdmlkZXJfaW5fd29yZHMpICogNCwKKwkJCQkJCSAgICAgKGhkcl9leC5vdXRfd29yZHMgKworCQkJCQkJICAgICAgaGRyX2V4LnByb3ZpZGVyX291dF93b3JkcykgKiA0KTsKKwl9IGVsc2UgeworCQlpZiAoaGRyLmluX3dvcmRzICogNCAhPSBjb3VudCkKKwkJCXJldHVybiAtRUlOVkFMOworCisJCXJldHVybiB1dmVyYnNfY21kX3RhYmxlW2hkci5jb21tYW5kXShmaWxlLAorCQkJCQkJICAgICBidWYgKyBzaXplb2YoaGRyKSwKKwkJCQkJCSAgICAgaGRyLmluX3dvcmRzICogNCwKKwkJCQkJCSAgICAgaGRyLm91dF93b3JkcyAqIDQpOworCX0KIH0KIAogc3RhdGljIGludCBpYl91dmVyYnNfbW1hcChzdHJ1Y3QgZmlsZSAqZmlscCwgc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEpCmRpZmYgLS1naXQgYS9kcml2ZXJzL2luZmluaWJhbmQvY29yZS92ZXJicy5jIGIvZHJpdmVycy9pbmZpbmliYW5kL2NvcmUvdmVyYnMuYwppbmRleCAyMjE5MmRlLi5hMzIxZGYyIDEwMDY0NAotLS0gYS9kcml2ZXJzL2luZmluaWJhbmQvY29yZS92ZXJicy5jCisrKyBiL2RyaXZlcnMvaW5maW5pYmFuZC9jb3JlL3ZlcmJzLmMKQEAgLTM0NiwxM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JCXJldHVybiAtRUlOVkFMOworCX0KKworCWlmIChkb21haW4gPj0gSUJfRkxPV19ET01BSU5fTlVNKSB7CisJCXByX2VycigiSW52YWxpZCBkb21haW4gdmFsdWUgJWRcbiIsIGRvbWFpbik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWlmIChtbHg0X21hcF9zd190b19od19zdGVlcmluZ19tb2RlKG1kZXYtPmRldiwgZmxvd190eXBlKSA8IDApCisJCXJldHVybiAtRUlOVkFMOworCisJbWFpbGJveCA9IG1seDRfYWxsb2NfY21kX21haWxib3gobWRldi0+ZGV2KTsKKwlpZiAoSVNfRVJSKG1haWxib3gpKQorCQlyZXR1cm4gUFRSX0VSUihtYWlsYm94KTsKKwltZW1zZXQobWFpbGJveC0+YnVmLCAwLCBydWxlX3NpemUpOworCWN0cmwgPSBtYWlsYm94LT5idWY7CisKKwljdHJsLT5wcmlvID0gY3B1X3RvX2JlMTYoX19tbHg0X2RvbWFpbltkb21haW5dIHwKKwkJCQkgZmxvd19hdHRyLT5wcmlvcml0eSk7CisJY3RybC0+dHlwZSA9IG1seDRfbWFwX3N3X3RvX2h3X3N0ZWVyaW5nX21vZGUobWRldi0+ZGV2LCBmbG93X3R5cGUpOworCWN0cmwtPnBvcnQgPSBmbG93X2F0dHItPnBvcnQ7CisJY3RybC0+cXBuID0gY3B1X3RvX2JlMzIocXAtPnFwX251bSk7CisKKwlpYl9mbG93ID0gZmxvd19hdHRyICsgMTsKKwlzaXplICs9IHNpemVvZihzdHJ1Y3QgbWx4NF9uZXRfdHJhbnNfcnVsZV9od19jdHJsKTsKKwlmb3IgKGkgPSAwOyBpIDwgZmxvd19hdHRyLT5udW1fb2Zfc3BlY3M7IGkrKykgeworCQlyZXQgPSBwYXJzZV9mbG93X2F0dHIobWRldi0+ZGV2LCBpYl9mbG93LCBtYWlsYm94LT5idWYgKyBzaXplKTsKKwkJaWYgKHJldCA8IDApIHsKKwkJCW1seDRfZnJlZV9jbWRfbWFpbGJveChtZGV2LT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ZSBEcml2ZXIiKTsKK01PRFVMRV9BVVRIT1IoIkhhbnMgVmVya3VpbCIpOworTU9EVUxFX0xJQ0VOU0UoIkdQTCIpOworCisjZGVmaW5lIE1BU0tfQURWNzUxMV9FRElEX1JEWV9JTlQgICAweDA0CisjZGVmaW5lIE1BU0tfQURWNzUxMV9NU0VOX0lOVCAgICAgICAweDQwCisjZGVmaW5lIE1BU0tfQURWNzUxMV9IUERfSU5UICAgICAgICAweDgwCisKKyNkZWZpbmUgTUFTS19BRFY3NTExX0hQRF9ERVRFQ1QgICAgIDB4NDAKKyNkZWZpbmUgTUFTS19BRFY3NTExX01TRU5fREVURUNUICAgIDB4MjAKKyNkZWZpbmUgTUFTS19BRFY3NTExX0VESURfUkRZICAgICAgIDB4MTAKKworI2RlZmluZSBFRElEX01BWF9SRVRSSUVTICg4KQorI2RlZmluZSBFRElEX0RFTEFZIDI1MAorI2RlZmluZSBFRElEX01BWF9TRUdNIDgKKworI2RlZmluZSBBRFY3NTExX01BWF9XSURUSCAxOTIwCisjZGVmaW5lIEFEVjc1MTFfTUFYX0hFSUdIVCAxMjAwCisjZGVmaW5lIEFEVjc1MTFfTUlOX1BJWEVMQ0xPQ0sgMjAwMDAwMDAKKyNkZWZpbmUgQURWNzUxMV9NQVhfUElYRUxDTE9DSyAyMjUwMDAwMDAKKworLyoKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoKKyogIEFycmF5cyB3aXRoIGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycyBmb3IgdGhlIEFEVjc1MTEKKyoKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyovCisKK3N0cnVjdCBpMmNfcmVnX3ZhbHVlIHsKKwl1bnNpZ25lZCBjaGFyIHJlZzsKKwl1bnNpZ25lZCBjaGFyIHZhbHVlOworfTsKKworc3RydWN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VEFUVVMgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0NAogI2RlZmluZSAgICAgIE1WTkVUQV9UWF9JTl9QUkdSUyAgICAgICAgICAgICAgICAgIEJJVCgxKQogI2RlZmluZSAgICAgIE1WTkVUQV9UWF9GSUZPX0VNUFRZICAgICAgICAgICAgICAgIEJJVCg4KQogI2RlZmluZSBNVk5FVEFfUlhfTUlOX0ZSQU1FX1NJWkUgICAgICAgICAgICAgICAgIDB4MjQ3YworI2RlZmluZSBNVk5FVEFfU0dNSUlfU0VSREVTX0NGRwkJCSAweDI0QTAKKyNkZWZpbmUgICAgICBNVk5FVEFfU0dNSUlfU0VSREVTX1BST1RPCQkgMHgwY2M3CiAjZGVmaW5lIE1WTkVUQV9UWVBFX1BSSU8gICAgICAgICAgICAgICAgICAgICAgICAgMHgyNGJjCiAjZGVmaW5lICAgICAgTVZORVRBX0ZPUkNFX1VOSSAgICAgICAgICAgICAgICAgICAgQklUKDIxKQogI2RlZmluZSBNVk5FVEFfVFhRX0NNRF8xICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjRlNApAQCAtMTM2LDcgKzEzOCw5IEBACiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfRk9SQ0VfTElOS19QQVNTICAgICAgICAgQklUKDEpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX01JSV9TUEVFRCAgICAgICAgQklUKDUpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX0dNSUlfU1BFRUQgICAgICAgQklUKDYpCisjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQU5fU1BFRURfRU4gICAgICAgICAgICAgQklUKDcpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX0ZVTExfRFVQTEVYICAgICAgQklUKDEyKQorI2RlZmluZSAgICAgIE1WTkVUQV9HTUFDX0FOX0RVUExFWF9FTiAgICAgICAgICAgIEJJVCgxMykKICNkZWZpbmUgTVZORVRBX01JQl9D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CisJCQkJIHByaXYtPnR4X2xlblt0eF90YWlsXSwgRE1BX1RPX0RFVklDRSk7CisKKwkJcHJpdi0+c3RhdHMudHhfcGFja2V0cysrOworCQlwcml2LT5zdGF0cy50eF9ieXRlcyArPSBwcml2LT50eF9za2JbdHhfdGFpbF0tPmxlbjsKKworCQlkZXZfa2ZyZWVfc2tiX2lycShwcml2LT50eF9za2JbdHhfdGFpbF0pOworCQlwcml2LT50eF9za2JbdHhfdGFpbF0gPSBOVUxMOworCisJCXR4X3RhaWwgPSBUWF9ORVhUKHR4X3RhaWwpOworCX0KKwlwcml2LT50eF90YWlsID0gdHhfdGFpbDsKK30KKworc3RhdGljIGlycXJldHVybl90IG1veGFydF9tYWNfaW50ZXJydXB0KGludCBpcnEsIHZvaWQgKmRldl9pZCkKK3sKKwlzdHJ1Y3QgbmV0X2RldmljZSAqbmRldiA9IChzdHJ1Y3QgbmV0X2RldmljZSAqKSBkZXZfaWQ7CisJc3RydWN0IG1veGFydF9tYWNfcHJpdl90ICpwcml2ID0gbmV0ZGV2X3ByaXYobmRldik7CisJdW5zaWduZWQgaW50IGlzdHMgPSByZWFkbChwcml2LT5iYXNlICsgUkVHX0lOVEVSUlVQVF9TVEFUVVMpOworCisJaWYgKGlzdHMgJiBYUEtUX09LX0lOVF9TVFMpCisJCW1veGFydF90eF9maW5pc2hlZChuZGV2KTsKKworCWlmIChpc3RzICYgUlBLVF9GSU5JU0gpIHsKKwkJaWYgKG5hcGlfc2NoZWR1bGVfcHJlcCgmcHJpdi0+bmFwaSkpIHsKKwkJCXByaXYtPnJlZ19pbXIgJj0gflJQS1RfRklOSVNIX007CisJCQl3cml0ZWwocHJpdi0+cmVnX2ltciwgcHJpdi0+YmFzZSArIFJFR19JTlRFUlJVUFRfTUFTSyk7CisJCQlfX25hcGlfc2NoZWR1bGUoJnByaXYtPm5hcGkpOworCQl9CisJfQorCisJcmV0dXJuIElSUV9IQU5ETEVEOworfQorCitzdGF0aWMgaW50IG1veGFydF9tYWN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gKi8KKyNkZWZpbmUgU1BJX1dSRU4gMHgwNgkJLyogU2V0IHdyaXRlIGVuYWJsZSBsYXRjaCAqLworI2RlZmluZSBTUElfU1NUX0VXU1IgMHg1MAkvKiBTU1Q6IEVuYWJsZSB3cml0ZSB0byBzdGF0dXMgcmVnaXN0ZXIgKi8KKworI2RlZmluZSBTUElfU1RBVFVTX1dQRU4gMHg4MAkvKiBXcml0ZS1wcm90ZWN0IHBpbiBlbmFibGVkICovCisjZGVmaW5lIFNQSV9TVEFUVVNfQlAyIDB4MTAJLyogQmxvY2sgcHJvdGVjdGlvbiBiaXQgMiAqLworI2RlZmluZSBTUElfU1RBVFVTX0JQMSAweDA4CS8qIEJsb2NrIHByb3RlY3Rpb24gYml0IDEgKi8KKyNkZWZpbmUgU1BJX1NUQVRVU19CUDAgMHgwNAkvKiBCbG9jayBwcm90ZWN0aW9uIGJpdCAwICovCisjZGVmaW5lIFNQSV9TVEFUVVNfV0VOIDB4MDIJLyogU3RhdGUgb2YgdGhlIHdyaXRlIGVuYWJsZSBsYXRjaCAqLworI2RlZmluZSBTUElfU1RBVFVTX05SRFkgMHgwMQkvKiBEZXZpY2UgYnVzeSBmbGFnICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE5vbi12b2xhdGlsZSBtZW1vcnkgbGF5b3V0CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKi8KKworLyogU0ZDNDAwMCBmbGFzaCBpcyBwYXJ0aXRpb25lZCBpbnRvOgorICogICAgIDAtMHg0MDAgICAgICAgY2hpcCBhbmQgYm9hcmQgY29uZmlnIChzZWUgc3RydWN0IGZhbGNvbl9udmNvbmZpZykKKyAqICAgICAweDQwMC0weDgwMDAgIHVudXNlZCAob3IgbWF5IGNvbnRhaW4gVlBEIGl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VBST01fQk9PVENPTkZJR19FTkQpIC0KKwkJCUZBTENPTl9FRVBST01fQk9PVENPTkZJR19TVEFSVDsKKwkJcGFydHNbbl9wYXJ0c10uY29tbW9uLm10ZC5lcmFzZXNpemUgPSBzcGktPmVyYXNlX3NpemU7CisJCW5fcGFydHMrKzsKKwl9CisKKwlyYyA9IGVmeF9tdGRfYWRkKGVmeCwgJnBhcnRzWzBdLmNvbW1vbiwgbl9wYXJ0cywgc2l6ZW9mKCpwYXJ0cykpOworCWlmIChyYykKKwkJa2ZyZWUocGFydHMpOworCXJldHVybiByYzsKK30KKworI2VuZGlmIC8qIENPTkZJR19TRkNfTVREICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFhNQUMgb3BlcmF0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICovCisKKy8qIENvbmZpZ3VyZSB0aGUgWEFVSSBkcml2ZXIgdGhhdCBpcyBhbiBvdXRwdXQgZnJvbSBGYWxjb24gKi8KK3N0YXRpYyB2b2lkIGZhbGNvbl9zZXR1cF94YXVpKHN0cnVjdCBlZnhfbmljICplZngpCit7CisJZWZ4X293b3JkX3Qgc2RjdGwsIHR4ZHJ2OworCisJLyogTW92ZSB0aGUgWEFVSSBpbnRvIGxvdyBwb3dlciwgdW5sZXNzIHRoZXJlIGlzIG5vIFBIWSwgaW4KKwkgKiB3aGljaCBjYXNlIHRoZSBYQVVJIHdpbGwgaGF2ZSB0byBkcml2ZSBhIGNhYmxlLiAqLworCWlmIChlZngtPnBoeV90eXBlID09IFBIWV9UWVBFX05PTkUpCisJCXJldHVybjsKKworCWVmeF9yZWFkbyhlZngsICZzZGN0bCwgRlJfQUJfWFhfU0RfQ1RMKTsKKwlFRlhfU0VUX09XT1JEX0ZJRUxEKHNkY3R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Ky8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFNwZWNpYWwgYnVmZmVyIGhhbmRsaW5nCisgKiBTcGVjaWFsIGJ1ZmZlcnMgYXJlIHVzZWQgZm9yIGV2ZW50IHF1ZXVlcyBhbmQgdGhlIFRYIGFuZCBSWAorICogZGVzY3JpcHRvciByaW5ncy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIEluaXRpYWxpc2UgYSBzcGVjaWFsIGJ1ZmZlcgorICoKKyAqIFRoaXMgd2lsbCBkZWZpbmUgYSBidWZmZXIgKHByZXZpb3VzbHkgYWxsb2NhdGVkIHZpYQorICogZWZ4X2FsbG9jX3NwZWNpYWxfYnVmZmVyKCkpIGluIHRoZSBidWZmZXIgdGFibGUsIGFsbG93aW5nCisgKiBpdCB0byBiZSB1c2VkIGZvciBldmVudCBxdWV1ZXMsIGRlc2NyaXB0b3IgcmluZ3MgZXRjLgorICovCitzdGF0aWMgdm9pZAorZWZ4X2luaXRfc3BlY2lhbF9idWZmZXIoc3RydWN0IGVmeF9uaWMgKmVmeCwgc3RydWN0IGVmeF9zcGVjaWFsX2J1ZmZlciAqYnVmZmVyKQoreworCWVmeF9xd29yZF90IGJ1Zl9kZXNjOworCXVuc2lnbmVkIGludCBpbmRleDsKKwlkbWFfYWRkcl90IGRtYV9hZGRyOworCWludCBpOworCisJRUZYX0JVR19PTl9QQVJBTk9JRCghYnVmZmVyLT5idWYuYWRkcik7CisKKwkvKiBXcml0ZSBidWZmZXIgZGVzY3JpcHRvcnMgdG8gTklDICovCisJZm9yIChpID0gMDsgaSA8IGJ1ZmZlci0+ZW50cmllczsgaSsrKSB7CisJCWluZGV4ID0gYnVmZmVyLT5pbmRleCArIGk7CisJCWRtYV9hZGRyID0gYnVmZmVy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fcXVldWUpLAorCQkJICAgICAgRUZYX0NIQU5ORUxfTUFHSUNfRklMTChyeF9xdWV1ZSkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBIYXJkd2FyZSBpbnRlcnJ1cHRzCisgKiBUaGUgaGFyZHdhcmUgaW50ZXJydXB0IGhhbmRsZXIgZG9lcyB2ZXJ5IGxpdHRsZSB3b3JrOyBhbGwgdGhlIGV2ZW50CisgKiBxdWV1ZSBwcm9jZXNzaW5nIGlzIGNhcnJpZWQgb3V0IGJ5IHBlci1jaGFubmVsIHRhc2tsZXRzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogRW5hYmxlL2Rpc2FibGUvZ2VuZXJhdGUgaW50ZXJydXB0cyAqLworc3RhdGljIGlubGluZSB2b2lkIGVmeF9mYXJjaF9pbnRlcnJ1cHRzKHN0cnVjdCBlZnhfbmljICplZngsCisJCQkJICAgICAgYm9vbCBlbmFibGVkLCBib29sIGZvcmNlKQoreworCWVmeF9vd29yZF90IGludF9lbl9yZWdfa2VyOworCisJRUZYX1BPUFVMQVRFX09XT1JEXzMoaW50X2VuX3JlZ19rZXIsCisJCQkgICAgIEZSRl9BWl9LRVJfSU5UX0xFVkVfU0VMLCBlZngtPmlycV9sZXZlbCwKKwkJCSAgICAgRlJGX0FaX0tFUl9JTlRfS0VSLCBmb3JjZSwKKwkJCSAgICAgRlJGX0FaX0RSVl9JTlRfRU5fS0VSLCBlbmFibGVkKTsKKwllZnhfd3JpdGVvKGVmeCwgJmludF9lbl9yZWdfa2VyLCBGUl9BWl9JTlRfRU5fS0VSKTsKK30KKwordm9pZCBlZnhfZmFyY2hfaXJxX2VuYWJsZV9tYXN0ZXIoc3RydWN0IGVmeF9uaWMgKmVmeCkKK3sKKwlFRl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aXMgdGhlIGZpcnN0IHJldmlzaW9uIHRvIHdoaWNoIHRoZSBkZWZpbml0aW9uIGFwcGxpZXM6CisgKgorICogICAgIEE6IEZhbGNvbiBBMSAoU0ZDNDAwMEFCKQorICogICAgIEI6IEZhbGNvbiBCMCAoU0ZDNDAwMEJBKQorICogICAgIEM6IFNpZW5hIEEwIChTRkw5MDIxQUEpCisgKgorICogSWYgdGhlIGRlZmluaXRpb24gaGFzIGJlZW4gY2hhbmdlZCBvciByZW1vdmVkIGluIGxhdGVyIHJldmlzaW9ucworICogdGhlbiA8bWF4LXJldj4gaXMgdGhlIGxhc3QgcmV2aXNpb24gdG8gd2hpY2ggdGhlIGRlZmluaXRpb24gYXBwbGllczsKKyAqIG90aGVyd2lzZSBpdCBpcyAiWiIuCisgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRmFsY29uL1NpZW5hIHJlZ2lzdGVycyBhbmQgZGVzY3JpcHRvcnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqLworCisvKiBBRFJfUkVHSU9OX1JFRzogQWRkcmVzcyByZWdpb24gcmVnaXN0ZXIgKi8KKyNkZWZpbmUJRlJfQVpfQURSX1JFR0lPTiAweDAwMDAwMDAwCisjZGVmaW5lCUZSRl9BWl9BRFJfUkVHSU9OM19MQk4gOTYKKyNkZWZpbmUJRlJGX0FaX0FEUl9SRUdJT04zX1dJRFRIIDE4CisjZGVmaW5lCUZSRl9BWl9BRFJfUkVHSU9OMl9MQk4gNjQKKyNkZWZpbmUJRlJGX0FaX0FEUl9SRUdJT04yX1dJRFRIIDE4CisjZGVmaW5lCUZSRl9BWl9BRFJfUkVHSU9OMV9MQk4gMzIKKyNkZWZpbmUJRlJGX0FaX0FEUl9SRUdJT04xX1dJRFRIIDE4Cisj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ZpbmUgICAgICAgICAgTUNESV9FVkVOVF9DT0RFX0xJTktDSEFOR0UgMHg0IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNESV9FVkVOVF9DT0RFX1NFTlNPUkVWVCAweDUgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfU0NIRURFUlIgMHg2IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNESV9FVkVOVF9DT0RFX1JFQk9PVCAweDcgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfTUFDX1NUQVRTX0RNQSAweDggLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfRldBTEVSVCAweDkgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfRkxSIDB4YSAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DRElfRVZFTlRfQ09ERV9UWF9FUlIgMHhiIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNESV9FVkVOVF9DT0RFX1RYX0ZMVVNIICAweGMgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfUFRQX1JYICAweGQgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfUFRQX0ZBVUxUICAweGUgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ0RJX0VWRU5UX0NPREVfUFRQX1BQUyAgMHhmIC8qIGVudW0gKi8KKy8qIGVudW06IEJhZCBhc3NlcnQuICovCisjZGVmaW5lICAgICAgICAgIE1DRElfRVZFTlRfQ09ERV9CQURTU0VSVCAweDEKKy8qIGVudW06IFBNIE5vdGljZS4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNESV9FVkVOVF9DT0RFX1BNTk9USUNFIDB4MgorLyogZW51bTogQ29tbWFu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UZfQUREUkVTU19XSURUSCAzMgorI2RlZmluZSAgICAgICBNQ19DTURfREJJUkRPUF9UWVBFREVGX1BBUk1TX09GU1QgNAorI2RlZmluZSAgICAgICAgTUNfQ01EX0RCSVJET1BfVFlQRURFRl9WRl9OVU1fTEJOIDE2CisjZGVmaW5lICAgICAgICBNQ19DTURfREJJUkRPUF9UWVBFREVGX1ZGX05VTV9XSURUSCAxNgorI2RlZmluZSAgICAgICAgTUNfQ01EX0RCSVJET1BfVFlQRURFRl9WRl9BQ1RJVkVfTEJOIDE1CisjZGVmaW5lICAgICAgICBNQ19DTURfREJJUkRPUF9UWVBFREVGX1ZGX0FDVElWRV9XSURUSCAxCisjZGVmaW5lICAgICAgICBNQ19DTURfREJJUkRPUF9UWVBFREVGX0NTMl9MQk4gMTQKKyNkZWZpbmUgICAgICAgIE1DX0NNRF9EQklSRE9QX1RZUEVERUZfQ1MyX1dJRFRIIDEKKyNkZWZpbmUgICAgICAgTUNfQ01EX0RCSVJET1BfVFlQRURFRl9QQVJNU19MQk4gMzIKKyNkZWZpbmUgICAgICAgTUNfQ01EX0RCSVJET1BfVFlQRURFRl9QQVJNU19XSURUSCAzMgorCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIE1DX0NNRF9TRVRfUkFORF9TRUVECkBAIC05NzcsNiArMTYyNSw3IEBACiAKIC8qIE1DX0NNRF9TRVRfUkFORF9TRUVEX0lOIG1zZ3JlcXVlc3QgKi8KICNkZWZpbmUgICAgTUNfQ01EX1NFVF9SQU5EX1NFRURfSU5fTEVOIDE2CisvKiBTZWVkIHZhbHVlLiAqLwogI2RlZmluZSAgICAgICBNQ19DTURfU0VUX1JBTkRfU0VFRF9JTl9TRUVEX09GU1QgMAogI2RlZmluZSAgICAgICBNQ19DTURfU0VUX1JBTkRfU0VFRF9JTl9TRUVEX0xFTiAxNgogCkBAIC05ODYsNyArMTYzNSw3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioq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F9NRURJQV9LWDQgMHgzIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX01FRElBX1hGUCAweDQgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTUVESUFfU0ZQX1BMVVMgMHg1IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX01FRElBX0JBU0VfVCAweDYgLyogZW51bSAqLworLyogZW51bTogWGF1aS4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX01FRElBX1hBVUkgMHgxCisvKiBlbnVtOiBDWDQuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NRURJQV9DWDQgMHgyCisvKiBlbnVtOiBLWDQuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NRURJQV9LWDQgMHgzCisvKiBlbnVtOiBYRlAgRmFyLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTUVESUFfWEZQIDB4NAorLyogZW51bTogU0ZQKy4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX01FRElBX1NGUF9QTFVTIDB4NQorLyogZW51bTogMTBHQmFzZVQuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NRURJQV9CQVNFX1QgMHg2CiAjZGVmaW5lICAgICAgIE1DX0NNRF9HRVRfUEhZX0NGR19PVVRfTU1EX01BU0tfT0ZTVCA0OAotI2RlZmluZSAgICAgICAgICBNQ19DTURfTU1EX0NMQVVTRTIyIDB4MCAvKiBlbnVtICovCisvKiBlbnVtOiBOYXRpdmUgY2xhdXNlIDIyICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NTURfQ0xBVVNFMjIgMHgwCiAjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NTURfQ0xBVVNFNDVfUE1BUE1EIDB4MSAvKiBlbnVtICovCiAjZGVmaW5lICAgICAgICAgIE1DX0NNRF9NTURfQ0xBVVNFNDVfV0lTIDB4MiAvKiBlbnVtICovCiAjZGVm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DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF8xMDBNX0xPX09GU1QgMAogI2RlZmluZSAgICAgICBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF8xMDBNX0hJX09GU1QgNAotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfTk9ORSAgMHgwIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX0RBVEEgIDB4MSAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19HTUFDICAweDIgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEdNSUkgMHgzIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hHWFMgIDB4NCAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YQVVJICAweDUgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfR01JSSAgMHg2IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1NHTUlJICAweDcgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEdCUiAgMHg4IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hGSSAgMHg5IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hBVUlfRkFSICAweGEgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfR01JSV9GQVIgIDB4YiAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19TR01JSV9GQVIgIDB4YyAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YRklfRkFSICAweGQgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfR1BIWSAgMHhlIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1BIWVhTICAweGYgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfUENTICAweDEwIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1BNQVBNRCAgMHgxMSAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YUE9SVCAgMHgxMiAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YR01JSV9XUyAgMHgxMyAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YQVVJX1dTICAweDE0IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hBVUlfV1NfRkFSICAweDE1IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hBVUlfV1NfTkVBUiAgMHgxNiAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19HTUlJX1dTICAweDE3IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hGSV9XUyAgMHgxOCAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YRklfV1NfRkFSICAweDE5IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1BIWVhTX1dTICAweDFhIC8qIGVudW0gKi8KKy8qIGVudW06IE5vbmUuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19OT05FICAweDAKKy8qIGVudW06IERhdGEuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19EQVRBICAweDEKKy8qIGVudW06IEdNQUMuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19HTUFDICAweDIKKy8qIGVudW06IFhHTUlJLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEdNSUkgMHgzCisvKiBlbnVtOiBYR1hTLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEdYUyAgMHg0CisvKiBlbnVtOiBYQVVJLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEFVSSAgMHg1CisvKiBlbnVtOiBHTUlJLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfR01JSSAgMHg2CisvKiBlbnVtOiBTR01JSS4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1NHTUlJICAweDcKKy8qIGVudW06IFhHQlIuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YR0JSICAweDgKKy8qIGVudW06IFhGSS4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hGSSAgMHg5CisvKiBlbnVtOiBYQVVJIEZhci4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hBVUlfRkFSICAweGEKKy8qIGVudW06IEdNSUkgRmFyLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfR01JSV9GQVIgIDB4YgorLyogZW51bTogU0dNSUkgRmFyLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfU0dNSUlfRkFSICAweGMKKy8qIGVudW06IFhGSSBGYXIuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YRklfRkFSICAweGQKKy8qIGVudW06IEdQaHkuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19HUEhZICAweGUKKy8qIGVudW06IFBoeVhTLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfUEhZWFMgIDB4ZgorLyogZW51bTogUENTLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfUENTICAweDEwCisvKiBlbnVtOiBQTUEtUE1ELiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfUE1BUE1EICAweDExCisvKiBlbnVtOiBDcm9zcy1Qb3J0LiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWFBPUlQgIDB4MTIKKy8qIGVudW06IFhHTUlJLVdpcmVzaWRlLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfTE9PUEJBQ0tfWEdNSUlfV1MgIDB4MTMKKy8qIGVudW06IFhBVUkgV2lyZXNpZGUuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YQVVJX1dTICAweDE0CisvKiBlbnVtOiBYQVVJIFdpcmVzaWRlIEZhci4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0xPT1BCQUNLX1hBVUlfV1NfRkFSICAweDE1CisvKiBlbnVtOiBYQVVJIFdpcmVzaWRlIG5lYXIuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YQVVJX1dTX05FQVIgIDB4MTYKKy8qIGVudW06IEdNSUkgV2lyZXNpZGUuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19HTUlJX1dTICAweDE3CisvKiBlbnVtOiBYRkkgV2lyZXNpZGUuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9MT09QQkFDS19YRklfV1MgIDB4MTgKKy8qIGVudW06IFhGSSBXaXJlc2lkZSBGYXIuICovCisjZ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GVmaW5lICAgICAgIE1DX0NNRF9HRVRfTE9PUEJBQ0tfTU9ERVNfT1VUX1NVR0dFU1RFRF9MRU4gOAogI2RlZmluZSAgICAgICBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF9TVUdHRVNURURfTE9fT0ZTVCAyNAogI2RlZmluZSAgICAgICBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF9TVUdHRVNURURfSElfT0ZTVCAyOAogLyogICAgICAgICAgICBFbnVtIHZhbHVlcywgc2VlIGZpZWxkKHMpOiAqLwogLyogICAgICAgICAgICAgICAxMDBNICovCisvKiBTdXBwb3J0ZWQgbG9vcGJhY2tzLiAqLworI2RlZmluZSAgICAgICBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF80MEdfT0ZTVCAzMgorI2RlZmluZSAgICAgICBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF80MEdfTEVOIDgKKyNkZWZpbmUgICAgICAgTUNfQ01EX0dFVF9MT09QQkFDS19NT0RFU19PVVRfNDBHX0xPX09GU1QgMzIKKyNkZWZpbmUgICAgICAgTUNfQ01EX0dFVF9MT09QQkFDS19NT0RFU19PVVRfNDBHX0hJX09GU1QgMzYKKy8qICAgICAgICAgICAgRW51bSB2YWx1ZXMsIHNlZSBmaWVsZChzKTogKi8KKy8qICAgICAgICAgICAgICAgMTAwTSAqLwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIE1DX0NNRF9HRVRfTElOSwotICogUmVhZCB0aGUgdW5pZmllZCBNQUMvUEhZIGxpbmsgc3RhdGUuCisgKiBSZWFkIHRoZSB1bmlmaWVkIE1BQy9QSFkgbGluayBzdGF0ZS4gTG9ja3MgcmVxdWlyZWQ6IE5vbmUgUmV0dXJuIGNvZGU6IDAsCisgKiBFVElNRS4KICAqLwogI2RlZmluZSBNQ19DTURfR0VUX0xJTksgMHgyOQogCkBAIC0xNDEyLDkgKzIyNjUsMTUgQEAK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AgIE1DX0NNRF9QQ1NfTElOS19VUCAgMHg5IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BDU19SWF9GQVVMVCAgMHhhIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BDU19UWF9GQVVMVCAgMHhiIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BDU19CRVIgIDB4YyAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9QQ1NfQkxPQ0tfRVJST1JTICAweGQgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZWFNfTElOS19VUCAgMHhlIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BIWVhTX1JYX0ZBVUxUICAweGYgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZWFNfVFhfRkFVTFQgIDB4MTAgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZWFNfQUxJR04gIDB4MTEgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZWFNfU1lOQyAgMHgxMiAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9BTl9MSU5LX1VQICAweDEzIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0FOX0NPTVBMRVRFICAweDE0IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX0FOXzEwR0JUX1NUQVRVUyAgMHgxNSAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9DTDIyX0xJTktfVVAgIDB4MTYgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZX05TVEFUUyAgMHgxNyAvKiBlbnVtICovCisvKiBlbnVtOiBPVUkuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9PV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gICAgTUNfQ01EX1BDU19CRVIgIDB4YworLyogZW51bTogUENTIEJsb2NrIEVycm9ycy4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BDU19CTE9DS19FUlJPUlMgIDB4ZAorLyogZW51bTogUGh5WFMgTGluayBVcC4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BIWVhTX0xJTktfVVAgIDB4ZQorLyogZW51bTogUGh5WFMgUlggRmF1bHQuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9QSFlYU19SWF9GQVVMVCAgMHhmCisvKiBlbnVtOiBQaHlYUyBUWCBGYXVsdC4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BIWVhTX1RYX0ZBVUxUICAweDEwCisvKiBlbnVtOiBQaHlYUyBBbGlnbi4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BIWVhTX0FMSUdOICAweDExCisvKiBlbnVtOiBQaHlYUyBTeW5jLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZWFNfU1lOQyAgMHgxMgorLyogZW51bTogQU4gbGluay11cC4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0FOX0xJTktfVVAgIDB4MTMKKy8qIGVudW06IEFOIENvbXBsZXRlLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfQU5fQ09NUExFVEUgIDB4MTQKKy8qIGVudW06IEFOIDEwR0Jhc2VUIFN0YXR1cy4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX0FOXzEwR0JUX1NUQVRVUyAgMHgxNQorLyogZW51bTogQ2xhdXNlIDIyIExpbmstVXAuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9DTDIyX0xJTktfVVAgIDB4MTYKKy8qIGVudW06IChMYXN0IGVudHJ5KSAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZX05TVEFUUyAgMHgxNwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioq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ICAgICAgIE1DX0NNRF9XT0xfVFlQRV9MSU5LICAgICAgIDB4NiAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9XT0xfVFlQRV9NQVggICAgICAgIDB4NyAvKiBlbnVtICovCisvKiBlbnVtOiBNYWdpYyAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfV09MX1RZUEVfTUFHSUMgICAgICAweDAKKy8qIGVudW06IE1TIFdpbmRvd3MgTWFnaWMgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1dPTF9UWVBFX1dJTl9NQUdJQyAweDIKKy8qIGVudW06IElQdjQgU3luICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9XT0xfVFlQRV9JUFY0X1NZTiAgIDB4MworLyogZW51bTogSVB2NiBTeW4gKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1dPTF9UWVBFX0lQVjZfU1lOICAgMHg0CisvKiBlbnVtOiBCaXRtYXAgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1dPTF9UWVBFX0JJVE1BUCAgICAgMHg1CisvKiBlbnVtOiBMaW5rICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9XT0xfVFlQRV9MSU5LICAgICAgIDB4NgorLyogZW51bTogKEFib3ZlIHRoaXMgZm9yIGZ1dHVyZSB1c2UpICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9XT0xfVFlQRV9NQVggICAgICAgIDB4NwogI2RlZmluZSAgICAgICBNQ19DTURfV09MX0ZJTFRFUl9TRVRfSU5fREFUQV9PRlNUIDgKICNkZWZpbmUgICAgICAgTUNfQ01EX1dPTF9GSUxURVJfU0VUX0lOX0RBVEFfTEVOIDQKICNkZWZpbmUgICAgICAgTUNfQ01EX1dPTF9GSUxURVJfU0VUX0lOX0RBVEFfTlVNIDQ2CkBAIC0xODE4LDcgKzI3NTksNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBNQ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qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8xVjAgIDB4NyAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfSU5fMVYyICAweDggLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOXzFWOCAgMHg5IC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8yVjUgIDB4YSAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfSU5fM1YzICAweGIgLyogZW51bSAqLwotI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOXzEyVjAgIDB4YyAvKiBlbnVtICovCi0jZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfSU5fMVYyQSAgMHhkIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl9WUkVGICAweGUgLyogZW51bSAqLworLyogZW51bTogQ29udHJvbGxlciB0ZW1wZXJhdHVyZTogZGVnQyAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0NPTlRST0xMRVJfVEVNUCAgMHgwCisvKiBlbnVtOiBQaHkgY29tbW9uIHRlbXBlcmF0dXJlOiBkZWdDICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfUEhZX0NPTU1PTl9URU1QICAweDEKKy8qIGVudW06IENvbnRyb2xsZXIgY29vbGluZzogYm9vbCAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0NPTlRST0xMRVJfQ09PTElORyAgMHgyCisvKiBlbnVtOiBQaHkgMCB0ZW1wZXJhdHVyZTogZGVnQyAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX1BIWTBfVEVNUCAgMHgzCisvKiBlbnVtOiBQaHkgMCBjb29saW5nOiBib29sICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfUEhZMF9DT09MSU5HICAweDQKKy8qIGVudW06IFBoeSAxIHRlbXBlcmF0dXJlOiBkZWdDICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfUEhZMV9URU1QICAweDUKKy8qIGVudW06IFBoeSAxIGNvb2xpbmc6IGJvb2wgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9QSFkxX0NPT0xJTkcgIDB4NgorLyogZW51bTogMS4wdiBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8xVjAgIDB4NworLyogZW51bTogMS4ydiBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8xVjIgIDB4OAorLyogZW51bTogMS44diBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8xVjggIDB4OQorLyogZW51bTogMi41diBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8yVjUgIDB4YQorLyogZW51bTogMy4zdiBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8zVjMgIDB4YgorLyogZW51bTogMTJ2IHBvd2VyOiBtViAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOXzEyVjAgIDB4YworLyogZW51bTogMS4ydiBhbmFsb2d1ZSBwb3dlcjogbVYgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl8xVjJBICAweGQKKy8qIGVudW06IHJlZmVyZW5jZSB2b2x0YWdlOiBtViAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOX1ZSRUYgIDB4ZQorLyogZW51bTogQU9FIEZQR0EgcG93ZXI6IG1WICovCisjZGVm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U9FICAweDE5CisvKiBlbnVtOiBBT0UgRlBHQSBpbnB1dCBjdXJyZW50OiBtQSAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOX0lBT0UgIDB4MWEKKy8qIGVudW06IE5JQyBwb3dlciBjb25zdW1wdGlvbjogVyAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX05JQ19QT1dFUiAgMHgxYgorLyogZW51bTogMC45diBwb3dlciB2b2x0YWdlOiBtViAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOXzBWOSAgMHgxYworLyogZW51bTogMC45diBwb3dlciBjdXJyZW50OiBtQSAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0VOU09SX0lOX0kwVjkgIDB4MWQKKy8qIGVudW06IDEuMnYgcG93ZXIgY3VycmVudDogbUEgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9JTl9JMVYyICAweDFlCisvKiBlbnVtOiBOb3QgYSBzZW5zb3I6IHJlc2VydmVkIGZvciB0aGUgbmV4dCBwYWdlIGZsYWcgKi8KKyNkZWZpbmUgICAgICAgICAgTUNfQ01EX1NFTlNPUl9QQUdFMF9ORVhUICAweDFmCisvKiBlbnVtOiAwLjl2IHBvd2VyIHZvbHRhZ2UgKGF0IEFEQyk6IG1WICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfSU5fMFY5X0FEQyAgMHgyMAorLyogZW51bTogQ29udHJvbGxlciB0ZW1wZXJhdHVyZSAyOiBkZWdDICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfQ09OVFJPTExFUl8yX1RFTVAgIDB4MjEKKy8qIGVudW06IFZvbHRhZ2UgcmVndWxhdG9yIGludGVybmFsIHRlbXBlcmF0dXJlOiBkZWdDICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TRU5TT1JfVlJFR19JTlRFUk5BTF9URU1QICAweDIyCisvKiBlbnVt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AgICAgIE1DX0NNRF9QSFlfU1RBVEVfT0sgMHgxIC8qIGVudW0gKi8KLSNkZWZpbmUgICAgICAgICAgTUNfQ01EX1BIWV9TVEFURV9aT01CSUUgMHgyIC8qIGVudW0gKi8KKy8qIGVudW06IE9rLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZX1NUQVRFX09LIDB4MQorLyogZW51bTogRmF1bHR5LiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfUEhZX1NUQVRFX1pPTUJJRSAweDIKIAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBNQ19DTURfU0VUVVBfODAyMVFCQgotICogODAyLjFRYmIgY29udHJvbC4KKyAqIDgwMi4xUWJiIGNvbnRyb2wuIDggVHggcXVldWVzIHRoYXQgbWFwIHRvIHByaW9yaXRpZXMgMCAtIDcuIFVzZSBhbGwgMXMgdG8KKyAqIGRpc2FibGUgODAyLlFiYiBmb3IgYSBnaXZlbiBwcmlvcml0eS4KICAqLwogI2RlZmluZSBNQ19DTURfU0VUVVBfODAyMVFCQiAweDQ0CiAKQEAgLTIxODcsNyArMzM3Myw3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIE1DX0NNRF9XT0xfRklMVEVSX0dFVAotICogUmV0cmlldmUgSUQgb2YgYW55IFdvTCBmaWx0ZXJzLgorICogUmV0cmlldmUgSUQgb2YgYW55IFdvTCBmaWx0ZXJzLiBMb2NrcyByZXF1aXJlZDogTm9uZS4gUmV0dXJuczogMCwgRU5PU1lTCiAgKi8KICNkZWZpbmUgTUNfQ01EX1dPTF9GSUxURVJfR0VUIDB4NDUKIApAQCAtMjIwMSw3ICszMzg3LDggQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogTUNfQ01EX0FERF9MSUdIVFNPVVRfT0ZGTE9BRAotICogQWRkIGEgcHJvdG9jb2wgb2ZmbG9hZCB0byBOSUMgZm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0aXRpb24gKi8KKyNkZWZpbmUgICAgICAgICAgTlZSQU1fUEFSVElUSU9OX1RZUEVfTUNfRklSTVdBUkUgICAgICAgICAgMHgxMDAKKy8qIGVudW06IFNlY29uZGFyeSBNQyBmaXJtd2FyZSBwYXJ0aXRpb24gKi8KKyNkZWZpbmUgICAgICAgICAgTlZSQU1fUEFSVElUSU9OX1RZUEVfTUNfRklSTVdBUkVfQkFDS1VQICAgMHgyMDAKKy8qIGVudW06IEV4cGFuc2lvbiBST00gcGFydGl0aW9uICovCisjZGVmaW5lICAgICAgICAgIE5WUkFNX1BBUlRJVElPTl9UWVBFX0VYUEFOU0lPTl9ST00gICAgICAgIDB4MzAwCisvKiBlbnVtOiBTdGF0aWMgY29uZmlndXJhdGlvbiBUTFYgcGFydGl0aW9uICovCisjZGVmaW5lICAgICAgICAgIE5WUkFNX1BBUlRJVElPTl9UWVBFX1NUQVRJQ19DT05GSUcgICAgICAgIDB4NDAwCisvKiBlbnVtOiBEeW5hbWljIGNvbmZpZ3VyYXRpb24gVExWIHBhcnRpdGlvbiAqLworI2RlZmluZSAgICAgICAgICBOVlJBTV9QQVJUSVRJT05fVFlQRV9EWU5BTUlDX0NPTkZJRyAgICAgICAweDUwMAorLyogZW51bTogRXhwYW5zaW9uIFJPTSBjb25maWd1cmF0aW9uIGRhdGEgZm9yIHBvcnQgMCAqLworI2RlZmluZSAgICAgICAgICBOVlJBTV9QQVJUSVRJT05fVFlQRV9FWFBST01fQ09ORklHX1BPUlQwICAweDYwMAorLyogZW51bTogRXhwYW5zaW9uIFJPTSBjb25maWd1cmF0aW9uIGRhdGEgZm9yIHBvcnQgMSAqLworI2RlZmluZSAgICAgICAgICBOVlJBTV9QQVJUSVRJT05fVFlQRV9FWFBST01fQ09ORklHX1BPUlQxICAweDYwMQorLyogZW51bTogRXhwYW5zaW9uIFJPTSBjb25maWd1cmF0aW9uIGRhdGEgZm9yIHBvcnQgMiAqLworI2RlZmluZSAgICAgICAgICBOVlJBTV9QQV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VNIDEKKyNkZWZpbmUgICAgICAgTUNfQ01EX1NBVEVMTElURV9ET1dOTE9BRF9JTl9DSFVOS19EQVRBX01BWE5VTSA1OQorCisvKiBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVCBtc2dyZXNwb25zZSAqLworI2RlZmluZSAgICBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVF9MRU4gOAorLyogU2FtZSBhcyBNQ19DTURfRVJSIGZpZWxkLCBidXQgaW5jbHVkZWQgYXMgMCBpbiBzdWNjZXNzIGNhc2VzICovCisjZGVmaW5lICAgICAgIE1DX0NNRF9TQVRFTExJVEVfRE9XTkxPQURfT1VUX1JFU1VMVF9PRlNUIDAKKy8qIEV4dHJhIHN0YXR1cyBpbmZvcm1hdGlvbiAqLworI2RlZmluZSAgICAgICBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVF9JTkZPX09GU1QgNAorLyogZW51bTogQ29kZSBkb3dubG9hZCBPSywgY29tcGxldGVkLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVF9PS19DT01QTEVURSAgMHgwCisvKiBlbnVtOiBDb2RlIGRvd25sb2FkIGFib3J0ZWQgYXMgcmVxdWVzdGVkLiAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVF9PS19BQk9SVEVEICAweDEKKy8qIGVudW06IENvZGUgZG93bmxvYWQgT0sgc28gZmFyLCBzZW5kIG5leHQgY2h1bmsuICovCisjZGVmaW5lICAgICAgICAgIE1DX0NNRF9TQVRFTExJVEVfRE9XTkxPQURfT1VUX09LX05FWFRfQ0hVTksgIDB4MgorLyogZW51bTogRG93bmxvYWQgcGhhc2VzIG91dCBvZiBzZXF1ZW5jZSAqLworI2RlZmluZSAgICAgICAgICBNQ19DTURfU0FURUxMSVRFX0RPV05MT0FEX09VVF9FUlJfQkFEX1BIQVNFICAweDEwMAorLyogZW51bTogQmFkI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CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogTUNfQ01EX0dFVF9SWERQX0NPTkZJRworICogR2V0IGdsb2JhbCBSWERQIGNvbmZpZ3VyYXRpb24gc2V0dGluZ3MKKyAqLworI2RlZmluZSBNQ19DTURfR0VUX1JYRFBfQ09ORklHIDB4YzIKKworLyogTUNfQ01EX0dFVF9SWERQX0NPTkZJR19JTiBtc2dyZXF1ZXN0ICovCisjZGVmaW5lICAgIE1DX0NNRF9HRVRfUlhEUF9DT05GSUdfSU5fTEVOIDAKKworLyogTUNfQ01EX0dFVF9SWERQX0NPTkZJR19PVVQgbXNncmVzcG9uc2UgKi8KKyNkZWZpbmUgICAgTUNfQ01EX0dFVF9SWERQX0NPTkZJR19PVVRfTEVOIDQKKyNkZWZpbmUgICAgICAgTUNfQ01EX0dFVF9SWERQX0NPTkZJR19PVVRfREFUQV9PRlNUIDAKKyNkZWZpbmUgICAgICAgIE1DX0NNRF9HRVRfUlhEUF9DT05GSUdfT1VUX1BBRF9IT1NUX0RNQV9MQk4gMAorI2RlZmluZSAgICAgICAgTUNfQ01EX0dFVF9SWERQX0NPTkZJR19PVVRfUEFEX0hPU1RfRE1BX1dJRFRIIDEKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBNQ19DTURfUk1PTl9SWF9DTEFTU19EUk9QU19TVEFUUworICogUmV0cmlldmUgcnggY2xhc3MgZHJvcCBzdGF0cworICovCisjZGVmaW5lIE1DX0NNRF9STU9OX1JYX0NMQVNTX0RST1BTX1NUQVRTIDB4ZDMKKworLyogTUNfQ01EX1JNT05fUlhfQ0xBU1NfRFJPUFNfU1RBVFNfSU4gbXNncmVxdWVzdCAqLworI2RlZmluZSAgICBNQ19DTURfUk1PTl9SWF9DTEFTU19EUk9QU19TVEFUU19JTl9MRU4gNAorLyogZmxhZ3MgKi8KKyNkZWZpbmUgICAgICAgTUNfQ01EX1JNT05fUlhfQ0xBU1NfRFJPU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E1DX0NNRF9TRVRfTElOS19JTl9MRU4pOworCWludCByYzsKKworCUJVSUxEX0JVR19PTihNQ19DTURfU0VUX0xJTktfT1VUX0xFTiAhPSAwKTsKKworCU1DRElfU0VUX0RXT1JEKGluYnVmLCBTRVRfTElOS19JTl9DQVAsIGNhcGFiaWxpdGllcyk7CisJTUNESV9TRVRfRFdPUkQoaW5idWYsIFNFVF9MSU5LX0lOX0ZMQUdTLCBmbGFncyk7CisJTUNESV9TRVRfRFdPUkQoaW5idWYsIFNFVF9MSU5LX0lOX0xPT1BCQUNLX01PREUsIGxvb3BiYWNrX21vZGUpOworCU1DRElfU0VUX0RXT1JEKGluYnVmLCBTRVRfTElOS19JTl9MT09QQkFDS19TUEVFRCwgbG9vcGJhY2tfc3BlZWQpOworCisJcmMgPSBlZnhfbWNkaV9ycGMoZWZ4LCBNQ19DTURfU0VUX0xJTkssIGluYnVmLCBzaXplb2YoaW5idWYpLAorCQkJICBOVUxMLCAwLCBOVUxMKTsKKwlpZiAocmMpCisJCWdvdG8gZmFpbDsKKworCXJldHVybiAwOworCitmYWlsOgorCW5ldGlmX2VycihlZngsIGh3LCBlZngtPm5ldF9kZXYsICIlczogZmFpbGVkIHJjPSVkXG4iLCBfX2Z1bmNfXywgcmMpOworCXJldHVybiByYzsKK30KKworc3RhdGljIGludCBlZnhfbWNkaV9sb29wYmFja19tb2RlcyhzdHJ1Y3QgZWZ4X25pYyAqZWZ4LCB1NjQgKmxvb3BiYWNrX21vZGVzKQoreworCU1DRElfREVDTEFSRV9CVUYob3V0YnVmLCBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTX09VVF9MRU4pOworCXNpemVfdCBvdXRsZW47CisJaW50IHJjOworCisJcmMgPSBlZnhfbWNkaV9ycGMoZWZ4LCBNQ19DTURfR0VUX0xPT1BCQUNLX01PREVTLCBOVUxMLCAwLAorCQkJICBvdXRidWYsIHNpemVvZihvdXRidWYpLCAmb3V0bGVuKTsKKwlpZiAocmMpCisJCWdvdG8gZ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qKioqKioqKioqKioqCkBAIC02NjksNiArNjEyLDI0MSBAQAogCX0KIH0KIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogTUNESQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICovCisKKyNkZWZpbmUgTUNESV9QRFUoZWZ4KQkJCQkJCQlcCisJKGVmeF9wb3J0X251bShlZngpID8gTUNfU01FTV9QMV9QRFVfT0ZTVCA6IE1DX1NNRU1fUDBfUERVX09GU1QpCisjZGVmaW5lIE1DRElfRE9PUkJFTEwoZWZ4KQkJCQkJCVwKKwkoZWZ4X3BvcnRfbnVtKGVmeCkgPyBNQ19TTUVNX1AxX0RPT1JCRUxMX09GU1QgOiBNQ19TTUVNX1AwX0RPT1JCRUxMX09GU1QpCisjZGVmaW5lIE1DRElfU1RBVFVTKGVmeCkJCQkJCQlcCisJKGVmeF9wb3J0X251bShlZngpID8gTUNfU01FTV9QMV9TVEFUVVNfT0ZTVCA6IE1DX1NNRU1fUDBfU1RBVFVTX09GU1QpCisKK3N0YXRpYyB2b2lkIHNpZW5hX21jZGlfcmVxdWVzdChzdHJ1Y3QgZWZ4X25pYyAqZWZ4LAorCQkJICAgICAgIGNvbnN0IGVmeF9kd29yZF90ICpoZHIsIHNpemVfdCBoZHJfbGVuLAorCQkJICAgICAgIGNvbnN0IGVmeF9kd29yZF90ICpzZHUsIHNpemVfdCBzZHVfbGVuKQoreworCXVuc2lnbmVkIHBkdSA9IEZSX0NaX01DX1RSRUdfU01FTSArIE1DRElfUERVKGVmeCk7CisJdW5zaWduZWQgZG9vcmJlbGwgPSBGUl9DWl9NQ19UUkVHX1NNRU0gKyBNQ0RJX0RPT1JCRUxMKGVmeCk7CisJdW5zaWduZWQgaW50IGk7CisJdW5zaWduZWQgaW50IGlubGVuX2R3ID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gpLgorCSAqLworCW5pY19kYXRhLT5zdGF0c1tTSUVOQV9TVEFUX3R4X2dvb2RfYnl0ZXNdID0gMDsKKwluaWNfZGF0YS0+c3RhdHNbU0lFTkFfU1RBVF9yeF9nb29kX2J5dGVzXSA9IDA7CisKKwlpZiAodmFsdWUgPT0gTUNfU1RBVFVTX0RXT1JEX0FTU0VSVCkKKwkJcmV0dXJuIC1FSU5UUjsKKwllbHNlCisJCXJldHVybiAtRUlPOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBNVEQKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqLworCisjaWZkZWYgQ09ORklHX1NGQ19NVEQKKworc3RydWN0IHNpZW5hX252cmFtX3R5cGVfaW5mbyB7CisJaW50IHBvcnQ7CisJY29uc3QgY2hhciAqbmFtZTsKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3Qgc2llbmFfbnZyYW1fdHlwZV9pbmZvIHNpZW5hX252cmFtX3R5cGVzW10gPSB7CisJW01DX0NNRF9OVlJBTV9UWVBFX0RJU0FCTEVEX0NBTExJU1RPXQk9IHsgMCwgInNmY19kdW1teV9waHkiIH0sCisJW01DX0NNRF9OVlJBTV9UWVBFX01DX0ZXXQkJPSB7IDAsICJzZmNfbWNmdyIgfSwKKwlbTUNfQ01EX05WUkFNX1RZUEVfTUNfRldfQkFDS1VQXQk9IHsgMCwgInNmY19tY2Z3X2JhY2t1cCIgfSwKKwlbTUNfQ01EX05WUkFNX1RZUEVfU1RBVElDX0NGR19QT1JUMF0JPSB7IDAsICJzZmNfc3RhdGljX2NmZyIgfSwKKwlbTUNfQ01EX05WUkFNX1RZUEVfU1RBVElDX0NGR19QT1JUMV0JPSB7IDEsICJzZmNfc3RhdGljX2NmZyIgfSwKKwlbTUN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X0KKworCXJjID0gc2llbmFfbXRkX2dldF9md19zdWJ0eXBlcyhlZngsIHBhcnRzLCBuX3BhcnRzKTsKKwlpZiAocmMpCisJCWdvdG8gZmFpbDsKKworCXJjID0gZWZ4X210ZF9hZGQoZWZ4LCAmcGFydHNbMF0uY29tbW9uLCBuX3BhcnRzLCBzaXplb2YoKnBhcnRzKSk7CitmYWlsOgorCWlmIChyYykKKwkJa2ZyZWUocGFydHMpOworCXJldHVybiByYzsKK30KKworI2VuZGlmIC8qIENPTkZJR19TRkNfTVREICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFBUUAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICovCisKK3N0YXRpYyB2b2lkIHNpZW5hX3B0cF93cml0ZV9ob3N0X3RpbWUoc3RydWN0IGVmeF9uaWMgKmVmeCwgdTMyIGhvc3RfdGltZSkKK3sKKwlfZWZ4X3dyaXRlZChlZngsIGNwdV90b19sZTMyKGhvc3RfdGltZSksCisJCSAgICBGUl9DWl9NQ19UUkVHX1NNRU0gKyBNQ19TTUVNX1AwX1BUUF9USU1FX09GU1QpOworfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02NzgsNiArODU2LDcgQEAKICAqLwogCiBjb25zdCBzdHJ1Y3QgZWZ4X25pY190eXBlIHNpZW5hX2EwX25pY190eXBlID0geworCS5tZW1fbWFwX3NpemUgPSBzaWVuYV9tZW1fbWFwX3NpemUsCiAJLnByb2JlID0gc2llbmFfcHJvYmVfbmljLAogCS5yZW1vdmUgPSBzaWVuYV9yZW1vdmVfbmljLAogCS5pbml0ID0gc2llbmFfaW5pdF9uaWMsCkBAIC02ODgsNDQg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isJCSAgICAgIEFEVkVSVElTRV9DU01BIHwgQURWRVJUSVNFX1BBVVNFX0NBUCk7CisJbWlpX253YXlfcmVzdGFydChtaWkpOworCitvdXQ6CisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBzcjk3MDBfcnhfZml4dXAoc3RydWN0IHVzYm5ldCAqZGV2LCBzdHJ1Y3Qgc2tfYnVmZiAqc2tiKQoreworCXN0cnVjdCBza19idWZmICpzcl9za2I7CisJaW50IGxlbjsKKworCS8qIHNrYiBjb250ZW50IChwYWNrZXRzKSBmb3JtYXQgOgorCSAqICAgICAgICAgICAgICAgICAgICBwMCAgICAgICAgICAgIHAxICAgICAgICAgICAgcDIgICAgLi4uLi4uICAgIHBtCisJICogICAgICAgICAgICAgICAgIC8gICAgICBcCisJICogICAgICAgICAgICAvICAgICAgICAgICAgICAgIFwKKwkgKiAgICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJICogIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCSAqIHAwYjAgcDBiMSBwMGIyIHAwYjMgLi4uLi4uIHAwYihuLTQpIHAwYihuLTMpLi4ucDBibgorCSAqCisJICogcDAgOiBwYWNrZXQgMAorCSAqIHAwYjAgOiBwYWNrZXQgMCBieXRlIDAKKwkgKgorCSAqIGIwOiByeCBzdGF0dXMKKwkgKiBiMTogcGFja2V0IGxlbmd0aCAoaW5jbCBjcmMpIGxvdworCSAqIGIyOiBwYWNrZXQgbGVuZ3RoIChpbmNsIGNyYykgaGlnaAorCSAqIGIzLi5uLTQ6IHBhY2tldCBkYXRhCisJICogYm4tMy4uYm46IGV0aGVybmV0IHBhY2tldCBjcmMKKwkgKi8KKwlpZiAodW5saWtlbHkoc2tiLT5sZW4gPCBTUl9SWF9PVkVSSEVBRCkpIHsKKwkJbmV0ZGV2X2VycihkZXYtPm5ldCwgInVuZXhwZWN0ZWQgdGlueSByeCBmcmFtZVxuIik7CisJCXJldHVybiAwOworCX0K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IgKmlwYSkKK3sKKyAgICAgICBpZiAoaXBhLT5zYS5zYV9mYW1pbHkgPT0gQUZfSU5FVDYpCisgICAgICAgICAgICAgICByZXR1cm4gaXB2Nl9hZGRyX2lzX211bHRpY2FzdCgmaXBhLT5zaW42LnNpbjZfYWRkcik7CisgICAgICAgZWxzZQorICAgICAgICAgICAgICAgcmV0dXJuIElOX01VTFRJQ0FTVChudG9obChpcGEtPnNpbi5zaW5fYWRkci5zX2FkZHIpKTsKK30KKworc3RhdGljIGludCB2eGxhbl9ubGFfZ2V0X2FkZHIodW5pb24gdnhsYW5fYWRkciAqaXAsIHN0cnVjdCBubGF0dHIgKm5sYSkKK3sKKyAgICAgICBpZiAobmxhX2xlbihubGEpID49IHNpemVvZihzdHJ1Y3QgaW42X2FkZHIpKSB7CisgICAgICAgICAgICAgICBubGFfbWVtY3B5KCZpcC0+c2luNi5zaW42X2FkZHIsIG5sYSwgc2l6ZW9mKHN0cnVjdCBpbjZfYWRkcikpOworICAgICAgICAgICAgICAgaXAtPnNhLnNhX2ZhbWlseSA9IEFGX0lORVQ2OworICAgICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgfSBlbHNlIGlmIChubGFfbGVuKG5sYSkgPj0gc2l6ZW9mKF9fYmUzMikpIHsKKyAgICAgICAgICAgICAgIGlwLT5zaW4uc2luX2FkZHIuc19hZGRyID0gbmxhX2dldF9iZTMyKG5sYSk7CisgICAgICAgICAgICAgICBpcC0+c2Euc2FfZmFtaWx5ID0gQUZfSU5FVDsKKyAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICByZXR1cm4gLUVBRk5PU1VQUE9SVDsKKyAgICAgICB9Cit9CisKK3N0YXRpYyBpbnQgdnhsYW5fbmxhX3B1dF9hZGRyKHN0cnVjdCBza19idWZmICpza2IsIGludCBhdHRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bmlvbiB2eGxhbl9hZGRyICppcCkKK3sKKyAgICAgICBpZiAoaXAtPnNhLnNhX2ZhbWlseSA9PSBBRl9JTkVUNikKKyAgICAgICAgICAgICAgIHJldHVybiBubGFfcHV0KHNrYiwgYXR0ciwgc2l6ZW9mKHN0cnVjdCBpbjZfYWRkciksICZpcC0+c2luNi5zaW42X2FkZHIpOworICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgIHJldHVybiBubGFfcHV0X2JlMzIoc2tiLCBhdHRyLCBpcC0+c2luLnNpbl9hZGRyLnNfYWRkcik7Cit9CisKKyNlbHNlIC8qICFDT05GSUdfSVBWNiAqLworCitzdGF0aWMgaW5saW5lCitib29sIHZ4bGFuX2FkZHJfZXF1YWwoY29uc3QgdW5pb24gdnhsYW5fYWRkciAqYSwgY29uc3QgdW5pb24gdnhsYW5fYWRkciAqYikKK3sKKyAgICAgICByZXR1cm4gYS0+c2luLnNpbl9hZGRyLnNfYWRkciA9PSBiLT5zaW4uc2luX2FkZHIuc19hZGRyOworfQorCitzdGF0aWMgaW5saW5lIGJvb2wgdnhsYW5fYWRkcl9hbnkoY29uc3QgdW5pb24gdnhsYW5fYWRkciAqaXBhKQoreworICAgICAgIHJldHVybiBpcGEtPnNpbi5zaW5fYWRkci5zX2FkZHIgPT0gaHRvbmwoSU5BRERSX0FOWSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgYm9vbCB2eGxhbl9hZGRyX211bHRpY2FzdChjb25zdCB1bmlvbiB2eGxhbl9hZGRyICppcGEpCit7CisgICAgICAgcmV0dXJuIElOX01VTFRJQ0FTVChudG9obChpcGEtPnNpbi5zaW5fYWRkci5zX2FkZHIpKTsKK30KKworc3RhdGljIGludCB2eGxhbl9ubGFfZ2V0X2FkZHIodW5pb24gdnhsYW5fYWRkciAqaXAsIHN0cnVjdCBubGF0dHIgKm5sYSkKK3sKKyAgICAgICBpZiAobmxhX2xlbihubGEpID49IHNpemVvZihzdHJ1Y3QgaW42X2FkZHIpKSB7CisgICAgICAgICAgICAgICByZXR1cm4gL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oKKyAqIGJiX2VuYWJsZV9hbnRfZGl2X2xuYWRpdiAgICAgIC0gRW5hYmxlIExOQSBwYXRoIHJ4IGFudGVubmEgZGl2ZXJzaXR5L2NvbWJpbmluZy4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2V0IGluIEFSX1BIWV9NVUxUSUNIQUlOX0dBSU5fQ1RMLgorICoKKyAqIGJiX2FudF9kaXZfW2FsdC9tYWluXV9nYWludGIgIC0gMCAtPiBBbnRlbm5hIGNvbmZpZyBBbHQvTWFpbiB1c2VzIGdhaW50YWJsZSAwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgLT4gQW50ZW5uYSBjb25maWcgQWx0L01haW4gdXNlcyBnYWludGFibGUgMQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXQgaW4gQVJfUEhZX01VTFRJQ0hBSU5fR0FJTl9DVEwuCisgKgorICogYmJfZW5hYmxlX2FudF9mYXN0X2RpdiAgICAgICAgLSBFbmFibGUgZmFzdCBhbnRlbm5hIGRpdmVyc2l0eS4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2V0IGluIEFSX1BIWV9DQ0tfREVURUNULgorICoKKyAqIGJiX2FudF9kaXZfW2FsdC9tYWluXV9sbmFjb25mIC0gQWx0L01haW4gTE5BIGRpdmVyc2l0eS9jb21iaW5pbmcgaW5wdXQgY29uZmlnLgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXQgaW4gQVJfUEhZX01VTFRJQ0hBSU5fR0FJTl9DVEwuCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwPUxOQTEKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDE9TE5BMgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMT1MTkExK0xOQTIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDA9TE5BMS1MTkEyCisgKgorICog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ICAgICAgIFwKIAkucmVhZCA9IGl3bF9kYmdmc18jI25hbWUjI19yZWFkLAkJCQlcCiAJLm9wZW4gPSBzaW1wbGVfb3BlbiwJCQkJCQlcCkBAIC04OSw3ICs3Nyw2IEBACiB9OwogCiAjZGVmaW5lIERFQlVHRlNfV1JJVEVfRklMRV9PUFMobmFtZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JREVCVUdGU19XUklURV9GVU5DKG5hbWUpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIHN0YXRpYyBjb25zdCBzdHJ1Y3QgZmlsZV9vcGVyYXRpb25zIGl3bF9kYmdmc18jI25hbWUjI19vcHMgPSB7ICAgICAgICAgIFwKIAkud3JpdGUgPSBpd2xfZGJnZnNfIyNuYW1lIyNfd3JpdGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5vcGVuID0gc2ltcGxlX29wZW4sCQkJCQkJXApAQCAtOTgsOCArODUsNiBAQAogCiAKICNkZWZpbmUgREVCVUdGU19SRUFEX1dSSVRFX0ZJTEVfT1BTKG5hbWUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlERUJVR0ZTX1JFQURfRlVOQyhuYW1lKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCURFQlVHRlNfV1JJVEVfRlVOQyhuYW1lKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiBzdGF0aWMgY29uc3Qgc3RydWN0IGZpbGVfb3BlcmF0aW9ucyBpd2xfZGJnZnNfIyNuYW1lIyNfb3BzID0geyAgICAgICAgICBcCiAJLndyaXRlID0gaXdsX2RiZ2ZzXyMjbmFtZSMjX3dyaXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkucmVhZCA9IGl3bF9kYmdmc18jI25hbWUjI19yZWFkLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmI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HlfcmVzZXQocHApOworCisJLyogZGUtYXNzZXJ0IHBoeSByZXNldCAqLworCWV4eW5vc19wY2llX2RlYXNzZXJ0X3BoeV9yZXNldChwcCk7CisKKwkvKiBpbml0aWFsaXplIHBoeSAqLworCWV4eW5vc19wY2llX2luaXRfcGh5KHBwKTsKKworCS8qIHB1bHNlIGZvciBjb21tb24gcmVzZXQgKi8KKwlleHlub3NfYmxrX3dyaXRlbChleHlub3NfcGNpZSwgMSwgUENJRV9QSFlfQ09NTU9OX1JFU0VUKTsKKwl1ZGVsYXkoNTAwKTsKKwlleHlub3NfYmxrX3dyaXRlbChleHlub3NfcGNpZSwgMCwgUENJRV9QSFlfQ09NTU9OX1JFU0VUKTsKKworCS8qIGRlLWFzc2VydCBjb3JlIHJlc2V0ICovCisJZXh5bm9zX3BjaWVfZGVhc3NlcnRfY29yZV9yZXNldChwcCk7CisKKwkvKiBzZXR1cCByb290IGNvbXBsZXggKi8KKwlkd19wY2llX3NldHVwX3JjKHBwKTsKKworCS8qIGFzc2VydCByZXNldCBzaWduYWwgKi8KKwlleHlub3NfcGNpZV9hc3NlcnRfcmVzZXQocHApOworCisJLyogYXNzZXJ0IExUU1NNIGVuYWJsZSAqLworCWV4eW5vc19lbGJfd3JpdGVsKGV4eW5vc19wY2llLCBQQ0lFX0VMQklfTFRTU01fRU5BQkxFLAorCQkJICBQQ0lFX0FQUF9MVFNTTV9FTkFCTEUpOworCisJLyogY2hlY2sgaWYgdGhlIGxpbmsgaXMgdXAgb3Igbm90ICovCisJd2hpbGUgKCFkd19wY2llX2xpbmtfdXAocHApKSB7CisJCW1kZWxheSgxMDApOworCQljb3VudCsrOworCQlpZiAoY291bnQgPT0gMTApIHsKKwkJCXdoaWxlIChleHlub3NfcGh5X3JlYWRsKGV4eW5vc19wY2llLAorCQkJCQkJUENJRV9QSFlfUExMX0xPQ0tFRCkgPT0gMCkgeworCQkJCXZhbCA9IGV4eW5vc19ibGtfcmVhZGwoZXh5bm9zX3BjaWUsCisJ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GlvMSIsCisJImdwaW8yIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcHdtX2dyb3Vwc1tdID0geworCSJncGlvMSIsCisJImdwaW8yIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcmVnZW5fZ3JvdXBzW10gPSB7CisJImdwaW8yIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3Qgc3lzZW5fZ3JvdXBzW10gPSB7CisJImdwaW80IiwKKwkiZ3BpbzYiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBjbGszMmtnYXVkaW9fZ3JvdXBzW10gPSB7CisJImdwaW81IiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgaWRfZ3JvdXBzW10gPSB7CisJImdwaW8wIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdmJ1c19kZXRfZ3JvdXBzW10gPSB7CisJImdwaW8xIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgY2hyZ19kZXRfZ3JvdXBzW10gPSB7CisJImdwaW8zIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdmFjX2dyb3Vwc1tdID0geworCSJ2YWMiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCB2YWNva19ncm91cHNbXSA9IHsKKwkidmFjIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcG93ZXJnb29kX2dyb3Vwc1tdID0geworCSJwb3dlcmdvb2QiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCB1c2JfcHNlbF9ncm91cHNbXSA9IHsKKwkiZ3BpbzUiLAorCSJwb3dlcmdvb2QiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBtc2VjdXJlX2dyb3Vwc1tdID0geworCSJncGlvNyIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHB3cmhvbGRfZ3JvdXBzW10gPSB7CisJImdwaW83IiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgaW50X2dyb3Vwc1tdID0geworCSJpbnQiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBucmVzd2FybV9ncm91cHNbXSA9IHsKKwkibnJlc3dhcm0iLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBzaW1yc3RvX2dyb3Vwc1tdID0geworCSJncGlvMTIiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBzaW1yc3RpX2dyb3Vwc1tdID0geworCSJncGlvOCIsCisJImdwaW8xNSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGxvd192YmF0X2dyb3Vwc1tdID0geworCSJncGlvOSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHdpcmVsZXNzX2NocmcxX2dyb3Vwc1tdID0geworCSJncGlvMTAiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCByY21fZ3JvdXBzW10gPSB7CisJImdwaW8xMSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHB3cmRvd25fZ3JvdXBzW10gPSB7CisJInB3cmRvd24iLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBncGFkY19zdGFydF9ncm91cHNbXSA9IHsKKwkiZ3BhZGNfc3RhcnQiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCByZXNldF9pbl9ncm91cHNbXSA9IHsKKwkicmVzZXRfaW4iLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBuc2xlZXBfZ3JvdXBzW10gPSB7CisJIm5zbGVlcCIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGVuYWJsZV9ncm91cHNbXSA9IHsKKwkiZW5hYmxlMSIsCisJImVuYWJs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SksCQkvKiBMUkNLICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BCMywKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJpMnMwIikpLAkJLyogRE8wICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BCNCwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJpMnMwIiksCQkvKiBETzEgKi8KKwkJICBTVU5YSV9GVU5DVElPTigweDMsICJ1YXJ0MyIpKSwJLyogUlRTICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BCNSwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJpMnMwIiksCQkvKiBETzIgKi8KKwkJICBTVU5YSV9GVU5DVElPTigweDMsICJ1YXJ0MyIpLAkJLyogVFggKi8KKwkJICBTVU5YSV9GVU5DVElPTigweDQsICJpMmMzIikpLAkJLyogU0NLICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BCNiwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJpMnMwIiksCQkvKiBETzMgKi8KKwkJICBTVU5YSV9GVU5DVElPTigweDMsICJ1YXJ0MyIpLAkJLyogUlggKi8KKwkJICBTVU5YSV9GVU5DVElPTigweDQsICJpMmMzIikpLAkJLy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EsgKi8KKwlTVU5YSV9QSU4oU1VOWElfUElOQ1RSTF9QSU5fUEUxLAorCQkgIFNVTlhJX0ZVTkNUSU9OKDB4MCwgImdwaW9faW4iKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDEsICJncGlvX291dCIpLAorCQkgIFNVTlhJX0ZVTkNUSU9OKDB4MiwgImNzaSIpLAkJLyogTUNMSyAqLworCQkgIFNVTlhJX0ZVTkNUSU9OKDB4MywgInRzIikpLAkJLyogRVJSICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BFMiwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJjc2kiKSwJCS8qIEhTWU5DICovCisJCSAgU1VOWElfRlVOQ1RJT04oMHgzLCAidHMiKSksCQkvKiBTWU5DICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BFMywKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJjc2kiKSwJCS8qIFZTWU5DICovCisJCSAgU1VOWElfRlVOQ1RJT04oMHgzLCAidHMiKSksCQkvKiBEVkxEICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BFNCwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJjc2kiKSwJCS8qIEQwICovCisJCSAgU1VOWElfRlVOQ1RJT04oMHgzLCAidWFydDUiKSksCS8qIFRYICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BFNSwKKwkJICBTVU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isJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BGNSwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJtbWMwIiksCQkvKiBEMiAqLworCQkgIFNVTlhJX0ZVTkNUSU9OKDB4NCwgImp0YWciKSksCQkvKiBDSzEgKi8KKwkvKiBIb2xlICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BHMCwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJtbWMxIikpLAkJLyogQ0xLICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BHMSwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJtbWMxIikpLAkJLyogQ01EICovCisJU1VOWElfUElOKFNVTlhJX1BJTkNUUkxfUElOX1BHMiwKKwkJICBTVU5YSV9GVU5DVElPTigweDAsICJncGlvX2luIiksCisJCSAgU1VOWElfRlVOQ1RJT04oMHgxLCAiZ3Bpb19vdXQiKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDIsICJtbWMxIikpLAkJLyogRDAgKi8KKwlTVU5YSV9QSU4oU1VOWElfUElOQ1RSTF9QSU5fUEczLAorCQkgIFNVTlhJX0ZVTkNUSU9OKDB4MCwgImdwaW9faW4iKSwKKwkJICBTVU5YSV9GVU5DVElPTigweDEsICJncGlvX291dCIpLAorCQkgIFNVTlhJX0ZVTkNUSU9OKDB4MiwgIm1tYzEiKSksCQkvKiBEMSAqLworCVNVTlhJX1BJ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ApWypudW1fbWFwc10uZGF0YS5jb25maWdzLmdyb3VwX29yX3BpbiA9IGdyb3VwOworCSgqbWFwKVsqbnVtX21hcHNdLmRhdGEuY29uZmlncy5jb25maWdzID0gZHVwX2NvbmZpZ3M7CisJKCptYXApWypudW1fbWFwc10uZGF0YS5jb25maWdzLm51bV9jb25maWdzID0gbnVtX2NvbmZpZ3M7CisJKCpudW1fbWFwcykrKzsKKworCXJldHVybiAwOworfQorRVhQT1JUX1NZTUJPTF9HUEwocGluY3RybF91dGlsc19hZGRfbWFwX2NvbmZpZ3MpOworCitpbnQgcGluY3RybF91dGlsc19hZGRfY29uZmlnKHN0cnVjdCBwaW5jdHJsX2RldiAqcGN0bGRldiwKKwkJdW5zaWduZWQgbG9uZyAqKmNvbmZpZ3MsIHVuc2lnbmVkICpudW1fY29uZmlncywKKwkJdW5zaWduZWQgbG9uZyBjb25maWcpCit7CisJdW5zaWduZWQgb2xkX251bSA9ICpudW1fY29uZmlnczsKKwl1bnNpZ25lZCBuZXdfbnVtID0gb2xkX251bSArIDE7CisJdW5zaWduZWQgbG9uZyAqbmV3X2NvbmZpZ3M7CisKKwluZXdfY29uZmlncyA9IGtyZWFsbG9jKCpjb25maWdzLCBzaXplb2YoKm5ld19jb25maWdzKSAqIG5ld19udW0sCisJCQkgICAgICAgR0ZQX0tFUk5FTCk7CisJaWYgKCFuZXdfY29uZmlncykgeworCQlkZXZfZXJyKHBjdGxkZXYtPmRldiwgImtyZWFsbG9jKGNvbmZpZ3MpIGZhaWxlZFxuIik7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCW5ld19jb25maWdzW29sZF9udW1dID0gY29uZmlnOworCisJKmNvbmZpZ3MgPSBuZXdfY29uZmlnczsKKwkqbnVtX2NvbmZpZ3MgPSBuZXdfbnVtOworCisJcmV0dXJuIDA7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChwaW5jdHJsX3V0aWxzX2FkZF9jb25maWcpOworCit2b2lkIHBpbmN0cmxfdXRpbHNfZ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2VfbXV4W10gPSB7Ci0JU0NLMV9FX01BUkssCi19OwogLyogLSBIU0NJRjAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaHNjaWYwX2RhdGFfcGluc1tdID0gewogCS8qIFJYLCBUWCAqLwpAQCAtMjExNCw2ICsxOTkwLDM5MCBAQAogc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBoc2NpZjFfY3RybF9iX211eFtdID0gewogCUhSVFMxX05fQl9NQVJLLCBIQ1RTMV9OX0JfTUFSSywKIH07CisvKiAtIElOVEMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpbnRjX2lycTBfcGluc1tdID0geworCS8qIElSUSAqLworCVJDQVJfR1BfUElOKDEsIDI1KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGludGNfaXJxMF9tdXhbXSA9IHsKKwlJUlEwX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpbnRjX2lycTFfcGluc1tdID0geworCS8qIElSUSAqLworCVJDQVJfR1BfUElOKDEsIDI3KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGludGNfaXJxMV9tdXhbXSA9IHsKKwlJUlExX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpbnRjX2lycTJfcGluc1tdID0geworCS8qIElSUSAqLworCVJDQVJfR1BfUElOKDEsIDI5KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGludGNfaXJxMl9tdXhbXSA9IHsKKwlJUlEyX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkI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XRhX211eFtdID0geworCVJYMF9NQVJLLCBUWDBfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNjaWYwX2Nsa19waW5zW10gPSB7CisJLyogU0NLICovCisJUkNBUl9HUF9QSU4oNCwgMjcpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2NpZjBfY2xrX211eFtdID0geworCVNDSzBfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNjaWYwX2N0cmxfcGluc1tdID0geworCS8qIFJUUywgQ1RTICovCisJUkNBUl9HUF9QSU4oNCwgMzEpLCBSQ0FSX0dQX1BJTig0LCAzMCksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzY2lmMF9jdHJsX211eFtdID0geworCVJUUzBfTl9NQVJLLCBDVFMwX05fTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNjaWYwX2RhdGFfYl9waW5zW10gPSB7CisJLyogUlgsIFRYICovCisJUkNBUl9HUF9QSU4oMCwgNCksIFJDQVJfR1BfUElOKDAsIDUpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2NpZjBfZGF0YV9iX211eFtdID0geworCVJYMF9CX01BUkssIFRYMF9CX01BUkssCit9OworLyogLSBTQ0lGMSAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2NpZjFfZGF0YV9waW5zW10gPSB7CisJLyogUlgsIFRYICovCisJUkNBUl9HUF9QSU4oNSwgMCksIFJDQVJfR1BfUElOKDUsIDEpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2NpZjFfZGF0YV9tdXhbXSA9IHsKKwlSWDFfTUFSSywgVFgxX01BUkssCit9Oworc3RhdGljIGNvbn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XS5pbml0ZGF0YTsKKwl9CisKKwlyZXR1cm4gTlVMTDsKK30KKworI2lmZGVmIENPTkZJR19PRgorc3RhdGljIHN0cnVjdCBvZl9yZWd1bGF0b3JfbWF0Y2ggZGE5MDYzX21hdGNoZXNbXSA9IHsKKwlbREE5MDYzX0lEX0JDT1JFMV0gICAgICAgICAgID0geyAubmFtZSA9ICJiY29yZTEiICAgICAgICAgICB9LAorCVtEQTkwNjNfSURfQkNPUkUyXSAgICAgICAgICAgPSB7IC5uYW1lID0gImJjb3JlMiIgICAgICAgICAgIH0sCisJW0RBOTA2M19JRF9CUFJPXSAgICAgICAgICAgICA9IHsgLm5hbWUgPSAiYnBybyIsICAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0JNRU1dICAgICAgICAgICAgID0geyAubmFtZSA9ICJibWVtIiwgICAgICAgICAgICB9LAorCVtEQTkwNjNfSURfQklPXSAgICAgICAgICAgICAgPSB7IC5uYW1lID0gImJpbyIsICAgICAgICAgICAgIH0sCisJW0RBOTA2M19JRF9CUEVSSV0gICAgICAgICAgICA9IHsgLm5hbWUgPSAiYnBlcmkiLCAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0JDT1JFU19NRVJHRURdICAgID0geyAubmFtZSA9ICJiY29yZXMtbWVyZ2VkIiAgICB9LAorCVtEQTkwNjNfSURfQk1FTV9CSU9fTUVSR0VEXSAgPSB7IC5uYW1lID0gImJtZW0tYmlvLW1lcmdlZCIsIH0sCisJW0RBOTA2M19JRF9MRE8xXSAgICAgICAgICAgICA9IHsgLm5hbWUgPSAibGRvMSIsICAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0xETzJdICAgICAgICAgICAgID0geyAubmFtZSA9ICJsZG8yIiwgICAgICAgICAgICB9LAorCVtEQTkwNjNfSURfTERPM10gICAgICAgICAgICAgPSB7IC5uYW1lID0gImxkbzMiLCAgICAgICAgICAgIH0sCisJW0RBOTA2M19JRF9MRE80XSAgICAgICAgICAgICA9IHsgLm5hbWUgPSAibGRvNCIsICAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0xETzVdICAgICAgICAgICAgID0geyAubmFtZSA9ICJsZG81IiwgICAgICAgICAgICB9LAorCVtEQTkwNjNfSURfTERPNl0gICAgICAgICAgICAgPSB7IC5uYW1lID0gImxkbzYiLCAgICAgICAgICAgIH0sCisJW0RBOTA2M19JRF9MRE83XSAgICAgICAgICAgICA9IHsgLm5hbWUgPSAibGRvNyIsICAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0xETzhdICAgICAgICAgICAgID0geyAubmFtZSA9ICJsZG84IiwgICAgICAgICAgICB9LAorCVtEQTkwNjNfSURfTERPOV0gICAgICAgICAgICAgPSB7IC5uYW1lID0gImxkbzkiLCAgICAgICAgICAgIH0sCisJW0RBOTA2M19JRF9MRE8xMF0gICAgICAgICAgICA9IHsgLm5hbWUgPSAibGRvMTAiLCAgICAgICAgICAgfSwKKwlbREE5MDYzX0lEX0xETzExXSAgICAgICAgICAgID0geyAubmFtZSA9ICJsZG8xMSIsICAgICAgICAgICB9LAorfTsKKworc3RhdGljIHN0cnVjdCBkYTkwNjNfcmVndWxhdG9yc19wZGF0YSAqZGE5MDYzX3BhcnNlX3JlZ3VsYXRvcnNfZHQoCisJCXN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgKnBkZXYsCisJCXN0cnVjdCBvZl9yZWd1bGF0b3JfbWF0Y2ggKipkYTkwNjNfcmVnX21hdGNoZXMpCit7CisJc3RydWN0IGRhOTA2M19yZWd1bGF0b3JzX3BkYXRhICpwZGF0YTsKKwlzdHJ1Y3QgZGE5MDYzX3JlZ3VsYXRvcl9kYXRhICpyZGF0YTsKKwlzdHJ1Y3QgZGV2aWNlX25vZGUgKm5vZGU7CisJaW50IGksIG4sIG51bTsKKworCW5vZGUgPSBvZl9maW5kX25vZGVfYnlfbmFtZShwZGV2LT5kZXYucGFyZW50LT5vZl9ub2RlLCAicmVndWxhdG9ycyIpOworCWlmICghbm9kZSkgeworCQlk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xCisJI2RlZmluZSBGV19JTUdfQklPUyAgICAgICAgICAgICAweDAyCisJI2RlZmluZSBGV19JTUdfTlZSICAgICAgICAgICAgICAweDAzCisJI2RlZmluZSBGV19JTUdfUkFXICAgICAgICAgICAgICAweDA0CisJI2RlZmluZSBGV19JTUdfRk1fQVBJICAgICAgICAgICAweDA1CisJI2RlZmluZSBGV19JTUdfRlNfQVBJICAgICAgICAgICAweDA2CisKKwl1OCBwYWRbMl07CisJdTMyIGltZ19vZmZzZXQ7CisJdTMyIGltZ19zaXplOworCXU4IGltYWdlWzB4ODAwMDBdOworfTsKKworc3RydWN0IF9fcGFja2VkIGF0dG9fcGFyYW1fcndfcmVxdWVzdCB7CisJdTE2IGNvZGU7CisJY2hhciBkYXRhX2J1ZmZlcls1MTJdOworfTsKKworI2RlZmluZSBNQVhfQ0hBTk5FTCAyNTYKKworc3RydWN0IF9fcGFja2VkIGF0dG9fY2hhbm5lbF9saXN0IHsKKwl1MzIgbnVtX2NoYW5uZWxzOworCXU4IGNoYW5uZWxbTUFYX0NIQU5ORUxdOworfTsKKworc3RydWN0IF9fcGFja2VkIGF0dG9fY2hhbm5lbF9pbmZvIHsKKwl1OCBtYWpvcl9yZXY7CisJdTggbWlub3JfcmV2OworCXU4IElSUTsKKwl1OCByZXZpc2lvbl9pZDsKKwl1OCBwY2lfYnVzOworCXU4IHBjaV9kZXZfZnVuYzsKKwl1OCBjb3JlX3JldjsKKwl1OCBob3N0X25vOworCXUxNiBkZXZpY2VfaWQ7CisJdTE2IHZlbmRvcl9pZDsKKwl1MTYgdmVuX2Rldl9pZDsKKwl1OCBwYWRbM107CisJdTMyIGhiYWFwaV9yZXY7Cit9OworCisvKgorICogQ1NNSSBjb250cm9sIGNvZGVzCisgKiBjbGFzcyBpbmRlcGVuZGVudAorICovCisjZGVmaW5lIENTTUlfQ0NfR0VUX0RSVlJfSU5GTyAgICAgICAgMQorI2RlZmluZSBDU01JX0NDX0dFVF9DTlRMUl9DRkcgICAgICAgIDI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VNT1JZICAgICAgICAgICAgIDB4NDUwOCAgICAgICAgICAgIC8qIE1FTVJXICAgICAgICAgKi8KKyNkZWZpbmUgRVhQUkVTU19UU0RLX0RVTVAgICAgICAgICAgICAgMHg0NTA5ICAgICAgICAgICAgLyogVFNES0RVTVAgICAgICAqLworI2RlZmluZSBFWFBSRVNTX0lPQ1RMX1NNUCAgICAgICAgICAgICAweDQ1MEEgICAgICAgICAgICAvKiBJT0NUTF9TTVAgICAgICovCisjZGVmaW5lIEVYUFJFU1NfQ1NNSSAgICAgICAgICAgICAgICAgIDB4NDUwQiAgICAgICAgICAgIC8qIENTTUkgICAgICAgICAgKi8KKyNkZWZpbmUgRVhQUkVTU19JT0NUTF9IQkEgICAgICAgICAgICAgMHg0NTBDICAgICAgICAgICAgLyogSU9DVExfSEJBICAgICAqLworI2RlZmluZSBFWFBSRVNTX0lPQ1RMX1ZEQSAgICAgICAgICAgICAweDQ1MEQgICAgICAgICAgICAvKiBJT0NUTF9WREEgICAgICovCisjZGVmaW5lIEVYUFJFU1NfSU9DVExfR0VUX0lEICAgICAgICAgIDB4NDUwRSAgICAgICAgICAgIC8qIEdFVF9JRCAgICAgICAgKi8KKyNkZWZpbmUgRVhQUkVTU19JT0NUTF9HRVRfTU9EX0lORk8gICAgMHg0NTBGICAgICAgICAgICAgLyogTU9EVUxFX0lORk8gICAqLworI2RlZmluZSBFWFBSRVNTX0lPQ1RMX01BWCAgICAgICAgICAgICAweDQ1MEYKKworI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvZXNhczJyL2F0dmRhLmggYi9kcml2ZXJzL3Njc2kvZXNhczJyL2F0dmRhLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNWZjMWY5OQotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvc2NzaS9lc2FzMnIvYXR2ZGEuaApAQCAtMCwwICsxLDEzMTkgQEAKKy8qICBsaW51eC9kcml2ZXJzL3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AgICAgICAweDAwICAgICAgICAvKiEgc3VjY2Vzc2Z1bCBjb21wbGV0aW9uICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfSU5WX0ZVTkMgICAgICAgICAweDAxICAgICAgICAvKiEgaW52YWxpZCBjb21tYW5kIGZ1bmN0aW9uICAgICAgICAgKi8KKyNkZWZpbmUgUlNfQlVTWSAgICAgICAgICAgICAweDAyICAgICAgICAvKiEgaW5zdWZmaWNpZW50IHJlc291cmNlcyAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfU0VMICAgICAgICAgICAgICAweDAzICAgICAgICAvKiEgbm8gdGFyZ2V0IGF0IHRhcmdldF9pZCAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfTk9fTFVOICAgICAgICAgICAweDA0ICAgICAgICAvKiEgaW52YWxpZCBMVU4gICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfVElNRU9VVCAgICAgICAgICAweDA1ICAgICAgICAvKiEgcmVxdWVzdCB0aW1lb3V0ICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfT1ZFUlJVTiAgICAgICAgICAweDA2ICAgICAgICAvKiEgZGF0YSBvdmVycnVuICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfVU5ERVJSVU4gICAgICAgICAweDA3ICAgICAgICAvKiEgZGF0YSB1bmRlcnJ1biAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfU0NTSV9FUlJPUiAgICAgICAweDA4ICAgICAgICAvKiEgU0NTSSBlcnJvciBvY2N1cnJlZCAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfQUJPUlRFRCAgICAgICAgICAweDBBICAgICAgICAvKiEgY29tbWFuZCBhYm9ydGVkICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgUlNfUkVTSURfTUlTTSAgICAgICAweDBCICAgICAgICAvKiEgcmVzaWR1YWwgbGVuZ3RoIGluY29ycmVjdCAgICAgICAgK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SBWREFTRVNESV9JTlZBTElEICAgICAweEZGRkYKKworCXU4IHNlcmlhbF9ub1szMl07CisKKwl1bmlvbiB7CisJCXUxNiB0YXJnZXRfaWQ7CisJI2RlZmluZSBWREFUR1RJRF9JTlZBTElEICAgICAweEZGRkYKKworCQl1MTYgZmVhdHVyZXNfbWFzazsKKwl9OworCisJdTE2IGx1bjsKKwl1MTYgZmVhdHVyZXM7CisJI2RlZmluZSBWREFERVZGRUFUX0VOQ19TRVJWICAweDAwMDEKKwkjZGVmaW5lIFZEQURFVkZFQVRfSURFTlQgICAgIDB4MDAwMgorCSNkZWZpbmUgVkRBREVWRkVBVF9ESF9TVVBQICAgMHgwMDA0CisJI2RlZmluZSBWREFERVZGRUFUX1BIWVNfSUQgICAweDAwMDgKKworCXU4IHNlc19lbGVtZW50X2lkOworCXU4IGxpbmtfc3BlZWQ7CisJI2RlZmluZSBWREFMSU5LU1BFRURfVU5LTk9XTiAweDAwCisJI2RlZmluZSBWREFMSU5LU1BFRURfMUdCICAgICAweDAxCisJI2RlZmluZSBWREFMSU5LU1BFRURfMV81R0IgICAweDAyCisJI2RlZmluZSBWREFMSU5LU1BFRURfMkdCICAgICAweDAzCisJI2RlZmluZSBWREFMSU5LU1BFRURfM0dCICAgICAweDA0CisJI2RlZmluZSBWREFMSU5LU1BFRURfNEdCICAgICAweDA1CisJI2RlZmluZSBWREFMSU5LU1BFRURfNkdCICAgICAweDA2CisJI2RlZmluZSBWREFMSU5LU1BFRURfOEdCICAgICAweDA3CisKKwl1MTYgcGh5c190YXJnZXRfaWQ7CisJdTggcmVzZXJ2ZWRbMl07Cit9OworCisKKy8qISBzdHJ1Y3QgYXR0b192ZGFfZGV2aW5mbzIgaXMgYSByZXBsYWNlbWVudCBmb3IgYXR0b192ZGFfZGV2aW5mby4gIGl0CisgKiBleHRlbmRzIGJleW9uZCB0aGUgMHg3MCBieXRlcyBhbGxvd2VkIGluIGF0dG9fdmRhX21nbXRfcmVxOyB0aGVyZWZvcmUsCis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ZGVmaW5lIE1VX09MQ19XUlRfUFRSICAgICAgKHUzMikoMHgwMDAwM0ZGRikKKworI2RlZmluZSBNVV9PVVRfTElTVF9JRkNfQ09ORklHICAodTMyKSgweDAwMDA0MDc4KQorICAgICNkZWZpbmUgTVVfT0xJQ19MSVNUICAgICAgICAodTMyKSgweDAwMDAwMDBGKQorICAgICNkZWZpbmUgTVVfT0xJQ19MSVNUX0YwICAgICAodTMyKSgweDAwMDAwMDAwKQorICAgICNkZWZpbmUgTVVfT0xJQ19TT1VSQ0UgICAgICAodTMyKSgweDAwMDAwRjAwKQorICAgICNkZWZpbmUgTVVfT0xJQ19TT1VSQ0VfRERSICAodTMyKSgweDAwMDAwMjAwKQorCisjZGVmaW5lIE1VX09VVF9MSVNUX0NPTkZJRyAgICAgICh1MzIpKDB4MDAwMDQwN0MpCisgICAgI2RlZmluZSBNVV9PTENfRU5BQkxFICAgICAgICh1MzIpKDB4MDAwMDAwMDEpCisgICAgI2RlZmluZSBNVV9PTENfRU5UUllfTUFTSyAgICh1MzIpKDB4MDAwMDAwRjApCisgICAgI2RlZmluZSBNVV9PTENfRU5UUllfNF9EVyAgICh1MzIpKDB4MDAwMDAwMjApCisgICAgI2RlZmluZSBNVV9PTENfTlVNQkVSX01BU0sgICh1MzIpKDB4N0ZGRjAwMDApCisgICAgI2RlZmluZSBNVV9PTENfTlVNQkVSX1NISUZUICAgICAgICAgICAgMTYKKworI2RlZmluZSBNVV9PVVRfTElTVF9JTlRfU1RBVCAgICAodTMyKSgweDAwMDA0MDg4KQorICAgICNkZWZpbmUgTVVfT0xJU19JTlQgICAgICAgICAodTMyKSgweDAwMDAwMDAxKQorCisjZGVmaW5lIE1VX09VVF9MSVNUX0lOVF9NQVNLICAgICh1MzIpKDB4MDAwMDQwOEMpCisgICAgI2RlZmluZSBNVV9PTElTX01BU0sgICAgICAgICh1MzIpKDB4MDAwMDAwMDEpCisKKy8qCisgKiB0aGUgbWF4aW11bSBzaXplIG9mIHRoZSBjb21tdW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fc2FzX252cmFtKSwgXAorCQkJCVNBU05WUl9DS1NVTV9TRUVEKSkKKyNkZWZpbmUgZXNhczJyX252cmFtY2FsY194b3JfY2tzdW0obikgIFwKKwkoZXNhczJyX2NhbGNfYnl0ZV94b3JfY2tzdW0oKHU4ICopKG4pLCBcCisJCQkJICAgIHNpemVvZihzdHJ1Y3QgZXNhczJyX3Nhc19udnJhbSksIDApKQorCisjZGVmaW5lIEVTQVMyUl9GU19EUlZSX1ZFUiAyCisKK3N0YXRpYyBzdHJ1Y3QgZXNhczJyX3Nhc19udnJhbSBkZWZhdWx0X3Nhc19udnJhbSA9IHsKKwl7ICdFJywJJ1MnLCAgJ0EnLCAgJ1MnCQkJICAgICB9LCAvKiBzaWduYXR1cmUgICAgICAgICAgKi8KKwlTQVNOVlJfVkVSU0lPTiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB2ZXJzaW9uICAgICAgICAgICAgKi8KKwkwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjaGVja3N1bSAgICAgICAgICAgKi8KKwkzMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBtYXhfbHVuX2Zvcl90YXJnZXQgKi8KKwlTQVNOVlJfUENJTEFUX01BWCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwY2lfbGF0ZW5jeSAgICAgICAgKi8KKwlTQVNOVlIxX0JPT1RfRFJWUiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvcHRpb25zMSAgICAgICAgICAgKi8KKwlTQVNOVlIyX0hFQVJUQkVBVCAgIHwgU0FTTlZSMl9TSU5HTEVfQlVTICAgICAgICAvKiBvcHRpb25zMiAgICAgICAgICAgKi8KKwl8IFNBU05WUjJfU1dfTVVYX0NUUkwsCisJU0FTTlZSX0NPQUxfRElTLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogaW50X2NvYWxlc2NpbmcgICAgICovCisJU0FTTlZSX0NNRFRIUl9OT05FLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY21kX3Rocm90dGxlICAgICAgICovCisJMywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZGV2X3dhaXRfdGltZSAgICAgICovCisJMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZGV2X3dhaXRfY291bnQgICAgICovCisJMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc3Bpbl91cF9kZWxheSAgICAgICovCisJMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc3NwX2FsaWduX3JhdGUgICAgICovCisJeyAweDUwLCAweDAxLCAweDA4LCAweDYwLCAgICAgICAgICAgICAgICAgICAgICAgLyogc2FzX2FkZHIgICAgICAgICAgICovCisJICAweDAwLCAweDAwLCAweDAwLCAweDAwIH0sCisJeyBTQVNOVlJfU1BFRURfQVVUTyB9LCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcGh5X3NwZWVkICAgICAgICAgICovCisJeyBTQVNOVlJfTVVYX0RJU0FCTEVEIH0sICAgICAgICAgICAgICAgICAgICAgICAgLyogU0FTIG11bHRpcGxleGluZyAgICovCisJeyAwIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcGh5X2ZsYWdzICAgICAgICAgICovCisJU0FTTlZSX1NPUlRfU0FTX0FERFIsICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc29ydF90eXBlICAgICAgICAgICovCisJMywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZHBtX3JlcWNtZF9sbXQgICAgICovCisJMywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZHBtX3N0bmRieV90aW1lICAgICovCisJMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZHBtX2FjdGl2ZV90aW1lICAgICovCisJeyAwIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcGh5X3RhcmdldF9pZCAgICAgICovCisJU0FTTlZSX1ZTTUhfRElTQUJMRUQsICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdmlydF9zZXNfbW9kZSAgICAgICovCisJU0FTTlZSX1JXTV9ERUZBVUxULCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmVhZF93cml0ZV9tb2RlICAgICovCisJMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbGluayBkb3duIHRpbWVvdXQgICovCisJeyAwIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmVzZXJ2ZWQgICAgICAgICAgICovCit9OworCitzdGF0aWMgdTggY21kX3RvX2Zsc19mdW5jW10gPSB7CisJMHhGRiwKKwlWREFfRkxBU0hfUkVBRCwKKwlWREFfRkxBU0hfQkVHSU5XLAorCVZEQV9GTEFTSF9XUklURSwKKwlWREFfRkxBU0hfQ09NTUlULAorCVZEQV9GTEFTSF9DQU5DRUwKK307CisKK3N0YXRpYyB1OCBlc2FzMnJfY2FsY19ieXRlX3hvcl9ja3N1bSh1OCAqYWRkciwgdTMyIGxlbiwgdTggc2VlZCkKK3sKKwl1MzIgY2tzdW0gPSBzZWVkOworCXU4ICpwID0gKHU4ICopJmNrc3VtOworCisJd2hpbGUgKGxlbikgeworCQlpZiAoKCh1aW50cHRyX3QpYWRkciAmIDMpID09IDApCisJCQlicmVhazsKKworCQlja3N1bSA9IGNrc3VtIF4gKmFkZHI7CisJCWFkZHIrKzsKKwkJbGVuLS07CisJfQorCXdoaWxlIChsZW4gPj0gc2l6ZW9mKHUzMikpIHsKKwkJY2tzdW0gPSBja3N1bSBeICoodTMyICopYWRkcjsKKwkJYWRkciArPSA0OworC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NhczJyX2FkYXB0ZXIgKmEgPQorCQkoc3RydWN0IGVzYXMycl9hZGFwdGVyICopY21kLT5kZXZpY2UtPmhvc3QtPmhvc3RkYXRhOworCisJaWYgKGEtPmZsYWdzICYgQUZfREVHUkFERURfTU9ERSkKKwkJcmV0dXJuIEZBSUxFRDsKKworCWlmIChob3N0X3Jlc2V0KQorCQllc2FzMnJfcmVzZXRfYWRhcHRlcihhKTsKKwllbHNlCisJCWVzYXMycl9yZXNldF9idXMoYSk7CisKKwkvKiBhYm92ZSBjYWxsIHNldHMgdGhlIEFGX09TX1JFU0VUIGZsYWcuICB3YWl0IGZvciBpdCB0byBjbGVhci4gKi8KKworCXdoaWxlIChhLT5mbGFncyAmIEFGX09TX1JFU0VUKSB7CisJCW1zbGVlcCgxMCk7CisKKwkJaWYgKGEtPmZsYWdzICYgQUZfREVHUkFERURfTU9ERSkKKwkJCXJldHVybiBGQUlMRUQ7CisJfQorCisJaWYgKGEtPmZsYWdzICYgQUZfREVHUkFERURfTU9ERSkKKwkJcmV0dXJuIEZBSUxFRDsKKworCXJldHVybiBTVUNDRVNTOworfQorCitpbnQgZXNhczJyX2hvc3RfcmVzZXQoc3RydWN0IHNjc2lfY21uZCAqY21kKQoreworCWVzYXMycl9sb2coRVNBUzJSX0xPR19JTkZPLCAiaG9zdF9yZXNldCAoJXApIiwgY21kKTsKKworCXJldHVybiBlc2FzMnJfaG9zdF9idXNfcmVzZXQoY21kLCB0cnVlKTsKK30KKworaW50IGVzYXMycl9idXNfcmVzZXQoc3RydWN0IHNjc2lfY21uZCAqY21kKQoreworCWVzYXMycl9sb2coRVNBUzJSX0xPR19JTkZPLCAiYnVzX3Jlc2V0ICglcCkiLCBjbWQpOworCisJcmV0dXJuIGVzYXMycl9ob3N0X2J1c19yZXNldChjbWQsIGZhbHNlKTsKK30KKworc3RhdGljIGludCBlc2FzMnJfZGV2X3RhcmdfcmVzZXQoc3RydWN0IHNjc2lfY21uZCAqY21kLCBib29sIHRhcmdldF9yZ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NzaS9scGZjL2xwZmNfc2xpLmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTMgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTYwLDcgKzYwLDggQEAKIAl1aW50OF90IHJldHJ5OwkJLyogcmV0cnkgY291bnRlciBmb3IgSU9DQiBjbWQgLSBpZiBuZWVkZWQgKi8KIAl1aW50MTZfdCBpb2NiX2ZsYWc7CiAjZGVmaW5lIExQRkNfSU9fTElCREZDCQkxCS8qIGxpYmRmYyBpb2NiICovCi0jZGVmaW5lIExQRkNfSU9fV0FLRQkJMgkvKiBIaWdoIFByaW9yaXR5IFF1ZXVlIHNpZ25hbCBmbGFnICovCisjZGVmaW5lIExQRkNfSU9fV0FLRQkJMgkvKiBTeW5jaHJvbm91cyBJL08gY29tcGxldGVkICovCisjZGVmaW5l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hL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdmVyc2lvbi5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdmVyc2lvbi5oCkBAIC0xOCw3ICsxOCw3IEBACiAgKiBpbmNsdWRlZCB3aXRoIHRoaXMgcGFja2FnZS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNkZWZpbmUgTFBGQ19EUklWRVJfVkVSU0lPTiAiOC4zLjQwIgorI2RlZmluZSBMUEZDX0RSSVZFUl9WRVJTSU9OICI4LjMuNDEiCiAjZGVmaW5lIExQRkNfRFJJVkVSX05BTUUJCSJscGZjIgogCiAvKiBVc2VkIGZvciBTTEkgMi8zICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Zwb3J0LmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Zwb3J0LmMKaW5kZXggZTI4ZTQzMS4uYTg3ZWUzMyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY192cG9ydC5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdnBvcnQuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA4IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKi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iB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExNTUtMHgxMTU4ICB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDEwMTgtMHgxMDE5ICB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExMTUtMHgxMTE2ICB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDEwY2EJCXwKICAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjA5NSAgICAgICB8IDB4MjAyMC0weDIwMjIsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MjAxMS0weDIwMTIsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MjAxNiAgICAgICAgIHwKQEAgLTI0LDExICsyNywxMiBAQAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgzMDM2LDB4MzAzOCAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgzMDNhCQl8CiAgKiB8IERQQyBUaHJlYWQgICAgICAgICAgICAgICAgICAgfCAgICAgICAweDQwMjIgICAgICAgfCAweDQwMDIsMHg0MDEzICB8Ci0gKiB8IEFzeW5jIEV2ZW50cyAgICAgICAgICAgICAgICAgfCAgICAgICAweDUwODEgICAgICAgfCAweDUwMmItMHg1MDJmICB8CisgKiB8IEFzeW5jIEV2ZW50cyAgICAgICAgICAgICAgICAgfCAgICAgICAweDUwODcgICAgICAgfCAweDUwMmItMHg1MDJmICB8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwNDcsMHg1MDUyICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwNDAsMHg1MDc1ICB8Ci0gKiB8IFRpbWVyIFJvdXRpbmVzICAgICAgICAgICAgICAgfCAgICAgICAweDYwMTEgICAgICAgfCAgICAgICAgICAgICAgICB8Ci0gKiB8IFVzZXIgU3BhY2UgSW50ZXJhY3Rpb25zICAgICAgfCAgICAgICAweDcwZGQgICAgICAgfCAweDcwMTgsMHg3MDJlLCB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwODQsMHg1MDc1CXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NTAzZCwweDUwNDQgIHwKKyAqIHwgVGltZXIgUm91dGluZXMgICAgICAgICAgICAgICB8ICAgICAgIDB4NjAxMiAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAqIHwgVXNlciBTcGFjZSBJbnRlcmFjdGlvbnMgICAgICB8ICAgICAgIDB4NzBlMSAgICAgICB8IDB4NzAxOCwweDcwMmUsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzAyMCwweDcwMjQsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzAzOSwweDcwNDUsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzA3My0weDcwNzUsIHwKQEAgLTM2LDE3ICs0MCwyOCBAQAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGE1LDB4NzBhNiwgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGE4LDB4NzBhYiwgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGFkLTB4NzBhZSwgfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGQxLTB4NzBkYSwgfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGQxLTB4NzBkYiwgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MDQ3LDB4NzAzYgl8Ci0gKiB8IFRhc2sgTWFuYWdlbWVudCAgICAgICAgICAgICAgfCAgICAgICAweDgwM2MgICAgICAgfCAweDgwMjUtMHg4MDI2ICB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDcwZGUtMHg3MGRmLCB8CisgKiB8IFRhc2sgTWFuYWdlbWVudCAgICAgICAgICAgICAgfCAgICAgICAweDgwM2QgICAgICAgfCAweDgwMjUtMHg4MDI2ICB8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDgwMGIsMHg4MDM5ICB8CiAgKiB8IEFFUi9FRUggICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAweDkwMTEgICAgICAgfAkJfAogICogfCBWaXJ0dWFsIFBvcnQgICAgICAgICAgICAgICAgIHwgICAgICAgMHhhMDA3ICAgICAgIHwJCXwKLSAqIHwgSVNQODJYWCBTcGVjaWZpYyAgICAgICAgICAgICB8ICAgICAgIDB4YjA4NiAgICAgICB8IDB4YjAwMiwweGIwMjQgIHwKKyAqIHwgSVNQODJYWCBTcGVjaWZpYyAgICAgICAgICAgICB8ICAgICAgIDB4YjE0YyAgICAgICB8IDB4YjAwMiwweGIwMjQgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjA5ZSwweGIwYWUgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjBlMC0weGIwZWYgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjA4NSwweGIwZGMgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEwNywweGIxMDggIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjExMSwweGIxMWUgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEyYywweGIxMmQgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEzYSwweGIxNDIgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEzYy0weGIxNDAgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjE0OQkJfAogICogfCBNdWx0aVEgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhjMDBjICAgICAgIHwJCXwKICAqIHwgTWlzYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4ZDAxMCAgICAgICB8CQl8Ci0gKiB8IFRhcmdldCBNb2RlCQkgIHwJICAweGUwNzAgICAgICAgfAkJfAotICogfCBUYXJnZXQgTW9kZSBNYW5hZ2VtZW50CSAgfAkgI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AgMTAwMDAwCi0wMDAwMDAwMSAgIDExMTExMTExMTExICAgIDEwMDAwMAotMDAwMDAwMDEgIDExMTExMTExMTExMSAgICAgMTAwMDAKLTAwMDAwMDEgICAxMTExMTExMTExMTEgICAgIDEwMDAwCi0wMDAwMDAxICAgMTExMTExMTExMTExICAgICAxMDAwMAotMDAwMDAwMSAgIDExMTExMTExMTExMSAgICAgMTAwMDAKLTAwMDAwMDEgICAxMTExMTExMTExMTEgICAgIDEwMDAwCi0wMDAwMDAwMTEgMTExMTExMTExMTEgICAgICAxMDAwMAotMDAwMDExIDExICAxMTExMTExMTExMSAgICAxMDAwMDAKLTAwMDEgIDExMTEgIDExMTExMTExMTExMTExMSAxMDAwCi0wMDEgMTExMTExMSAgMTExMTExMTExMTExMTEgMTAwMAotMDAxIDExMTExMTEgIDExMTExMTEgIDExMTExMSAxMDAKLTAwMSAxMTExMTExMSAxMTExMTEgICAxMTExMTExIDEwCi0wMDEgMTExMTExMTEgICAgICAgICAgMTExMTEgIDEwMAotMDAxICAxMTExMTExICAgICAgICAgIDExMSAgMTExMDAKLTAwMDExMSAgIDExMSAgIDExMTExICAxMSAgMTAwMDAwCi0wMDAwMDAxMTEgICAxMTExMTExMTEgICAgMTAwMDAwMApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL2FzdXNfb2xlZC90dXhfci50eHQgYi9kcml2ZXJzL3N0YWdpbmcvYXN1c19vbGVkL3R1eF9yLnR4dApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZmQ4MWEzZS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvYXN1c19vbGVkL3R1eF9yLnR4dAorKysgL2Rldi9udWxsCkBAIC0xLDMzICswLDAgQEAKLTxyOjMyeDMyPgotMDAwMDAwMDAwMDAwMDExMTExMTEwMDAwMDAwMDAwMDAKLTAwMDAwMDAwMDAwMDEgICAgICAgMTAwMDAwMDAwMDAwCi0wMDAwMDAwMDAwMDEgICAgICAgICAxMDAwMDAwMDAwMAotMDAwMDAwMDAwMDAxICAgICAgICAgMTAwMDAwMDAwMDAKLTAwMDAwMDAwMDAwMSAgICAgICAgIDEwMDAwMDAwMDAwCi0wMDAwMDAwMDAwMDEgMSAgMTExICAxMDAwMDAwMDAwMAotMDAwMDAwMDAwMDAxICAgIDEgMSAgIDEwMDAwMDAwMDAKLTAwMDAwMDAwMDAwMSAgMTExICAgICAxMDAwMDAwMDAwCi0wMDAwMDAwMDAwMDEgMTExMTExICAgMTAwMDAwMDAwMAotMDAwMDAwMDAwMDAxIDExMTExMSAgIDEwMDAwMDAwMDAKLTAwMDAwMDAwMDAwMSAgICAxIDEgICAgMTAwMDAwMDAwCi0wMDAwMDAwMDAwMSAgICAgIDExICAgIDEwMDAwMDAwMAotMDAwMDAwMDAwMDEgMTExMTExMTEgICAgMTAwMDAwMDAKLTAwMDAwMDAwMDEgIDExMTExMTExICAgICAxMDAwMDAwCi0wMDAwMDAwMDEgICAxMTExMTExMTEgICAgMTAwMDAwMAotMDAwMDAwMDAxICAxMTExMTExMTExICAgICAxMDAwMDAKLTAwMDAwMDAxICAgMTExMTExMTExMTEgICAgMTAwMDAwCi0wMDAwMDAwMSAgMTExMTExMTExMTExICAgICAxMDAwMAotMDAwMDAwMSAgIDExMTExMTExMTExMSAgICAgMTAwMDAKLTAwMDAwMDEgICAxMTExMTExMTExMTEgICAgIDEwMDAwCi0wMDAwMDAxICAgMTExMTExMTExMTExICAgICAxMDAwMAotMDAwMDAwMSAgIDExMTExMTExMTExMSAgICAgMTAwMDAKLTAwMDAwMDAxMSAxMTExMTExMTExMSAgICAgIDEwMDAwCi0wMDAwMTEgMTEgIDExMTExMTExMTExICAgIDEwMDAwMAotMDAwMSAgMTExMSAgMTExMTExMTExMTExMTExIDEwMDAKLTAwMSAxMTExMTExICAxMTExMTExMTExMTExMSAxMDAwCi0wMDEgMTExMTExMSAgMTExMTExMSAgMTExMTExIDEwMAotMDAxIDExMTExMTExIDExMTExMS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TVEFUVVMJMgotI2RlZmluZSBBUENJMTcxMF9USU1FUl9XUklURVZBTFVFCQkzCi0KLSNkZWZpbmUgQVBDSTE3MTBfVElNRVJfUkVBRElOVEVSUlVQVAkJMQotI2RlZmluZSBBUENJMTcxMF9USU1FUl9SRUFEQUxMVElNRVIJCTIKLQotI2lmbmRlZiBBUENJMTcxMF8xME1IWgotI2RlZmluZSBBUENJMTcxMF8xME1IWgkJCQkxMAotI2VuZGlmCi0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyAgICAgaV9BUENJMTcxMF9Jbml0VGltZXIgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTW9kZSwgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gdWxfUmVsb2FkVmFsdWUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnB1dENsb2NrU2VsZWN0aW9uLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0lucHV0Q2xvY2tMZXZlbCwgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfT3V0cHV0TGV2ZWwsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9IYXJkd2FyZUdhdGVMZXZlbCkKLWludCBpX0luc25Db25maWdfSW5pdFRpbWVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCi0Jc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkKLXwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZSB0aGUgVGltZXIgKGJfVGltZXJOYnIpIG9wZXJhdGluZyBtb2RlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgKGJfVGltZXJNb2RlKSBmcm9tIHNlbGVjdGVkIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBZb3UgbXVzdCBjYWxsaW5nIHRoaXMgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsIGFueSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiB0aGUgdGltZXIuICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgVGltZXIgbW9kZSBkZXNjcmlwdGlvbiB0YWJsZSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwrLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0rfAotfHxTZWxlY3RlZCsgICAgICBNb2RlIGRlc2NyaXB0aW9uICAgICAgICt1X1JlbG9hZFZhbHVlIHwgSGFyZHdhcmUgZ2F0ZSBpbnB1dHx8Ci18fCAgbW9kZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgZGVzY3JpcHRpb24gfCAgICAgIGFjdGlvbiAgICAgICAgfHwKLXwrLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0rfAotfHwgICAgICAgIHxNb2RlIDAgaXMgdHlwaWNhbGx5IHVzZWQgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGZvciBldmVudCBjb3VudGluZy4gQWZ0ZXIgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8dGhlIGluaXRpYWxpc2F0aW9uLCBPVVQgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxpcyBpbml0aWFsbHkgbG93LCBhbmQgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgIDAgICAgfHdpbGwgcmVtYWluIGxvdyB1bnRpbCB0aGUgICAgfFN0YXJ0IGNvdW50aW5nfCAgIEhhcmR3YXJlIGdhdGUgICAgfHwKLXx8ICAgICAgICB8Y291bnRlciByZWFjaGVzIHplcm8uICAgICAgICB8ICAgdmFsdWUgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxPVVQgdGhlbiBnb2VzIGhpZ2ggYW5kICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHJlbWFpbnMgaGlnaCB1bnRpbCBhIG5ldyAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8Y291bnQgaXMgd3JpdHRlbi4gU2VlICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHwiaV9BUENJMTcxMF9Xcml0ZVRpbWVyVmFsdWUiIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGZ1bmN0aW9uLiAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXwrLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0rfAotfHwgICAgICAgIHxNb2RlIDEgaXMgc2ltaWxhciB0byBtb2RlIDAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGV4Y2VwdCBmb3IgdGhlIGdhdGUgaW5wdXQgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgMSAgICB8YWN0aW9uLiBUaGUgZ2F0ZSBpbnB1dCBpcyBub3R8U3RhcnQgY291bnRpbmd8ICBIYXJkd2FyZSB0cmlnZ2VyICB8fAotfHwgICAgICAgIHx1c2VkIGZvciBlbmFibGVkIG9yIGRpc2FibGVkIHwgICB2YWx1ZSAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHRoZSB0aW1lci4gICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8VGhlIGdhdGUgaW5wdXQgaXMgdXNlZCBmb3IgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHx0cmlnZ2VyZWQgdGhlIHRpbWVyLiAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18Ky0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tK3wKLXx8ICAgICAgICB8VGhpcyBtb2RlIGZ1bmN0aW9ucyBsaWtlIGEgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxkaXZpZGUtYnktdWxfUmVsb2FkVmFsdWUgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGNvdW50ZXIuIEl0IGlzIHR5cGljYWxseSB1c2VkfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8dG8gZ2VuZXJhdGUgYSByZWFsIHRpbWUgY2xvY2t8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxpbnRlcnJ1cHQuIE9VVCB3aWxsIGluaXRpYWxseXwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgIDIgICAgfGJlIGhpZ2ggYWZ0ZXIgdGhlICAgICAgICAgICAgfCAgIERpdmlzaW9uICAgfCAgSGFyZHdhcmUgZ2F0ZSAgICAgfHwKLXx8ICAgICAgICB8aW5pdGlhbGlzYXRpb24uIFdoZW4gdGhlICAgICB8ICAgIGZhY3RvciAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxpbml0aWFsIGNvdW50IGhhcyBkZWNyZW1lbnRlZHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHRvIDEsIE9VVCBnb2VzIGxvdyBmb3Igb25lICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8Q0xLIHB1bGUuIE9VVCB0aGVuIGdvZXMgaGlnaCB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxhZ2FpbiwgdGhlIGNvdW50ZXIgcmVsb2FkcyAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHRoZSBpbml0aWFsIGNvdW50ICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8KHVsX1JlbG9hZFZhbHVlKSBhbmQgdGhlICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxwcm9jZXNzIGlzIHJlcGVhdGVkLiAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfFRoaXMgYWN0aW9uIGNhbiBnZW5lcmF0ZWQgYSAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8aW50ZXJydXB0LiBTZWUgZnVuY3Rpb24gICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHwiaV9BUENJMTcxMF9TZXRCb2FyZEludC0gICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfFJvdXRpbmVYIiAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8YW5kICJpX0FQQ0kxNzEwX0VuYWJsZVRpbWVyIiB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfCstLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLSt8Ci18fCAgICAgICAgfE1vZGUgMyBpcyB0eXBpY2FsbHkgdXNlZCBmb3IgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8YmF1ZCByYXRlIGdlbmVyYXRpb24uIFRoaXMgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxtb2RlIGlzIHNpbWlsYXIgdG8gbW9kZSAyICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGV4Y2VwdCBmb3IgdGhlIGR1dHkgY3ljbGUgb2YgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgMyAgICB8T1VULiBPVVQgd2lsbCBpbml0aWFsbHkgYmUgICB8ICBEaXZpc2lvbiAgICB8ICAgSGFyZHdhcmUgZ2F0ZSAgICB8fAotfHwgICAgICAgIHxoaWdoIGFmdGVyIHRoZSBpbml0aWFsaXNhdGlvbnwgICBmYWN0b3IgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfFdoZW4gaGFsZiB0aGUgaW5pdGlhbCBjb3VudCAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8KHVsX1JlbG9hZFZhbHVlKSBoYXMgZXhwaXJlZCx8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxPVVQgZ29lcyBsb3cgZm9yIHRoZSAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHJlbWFpbmRlciBvZiB0aGUgY291bnQuIFRoZSAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8bW9kZSBpcyBwZXJpb2RpYzsgdGhlICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxzZXF1ZW5jZSBhYm92ZSBpcyByZXBlYXRlZCAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGluZGVmaW5pdGVseS4gICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXwrLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0rfAotfHwgICAgICAgIHxPVVQgd2lsbCBiZSBpbml0aWFsbHkgaGlnaCAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGFmdGVyIHRoZSBpbml0aWFsaXNhdGlvbi4gICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8V2hlbiB0aGUgaW5pdGlhbCBjb3VudCAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICA0ICAgIHxleHBpcmVzIE9VVCB3aWxsIGdvIGxvdyBmb3IgIHxTdGFydCBjb3VudGluZ3wgIEhhcmR3YXJlIGdhdGUgICAgIHx8Ci18fCAgICAgICAgfG9uZSBDTEsgcHVsc2UgYW5kIHRoZW4gZ28gICAgfCAgICB2YWx1ZSAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8aGlnaCBhZ2Fpbi4gICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxUaGUgY291bnRpbmcgc2VxdWVuY2VzIGlzICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfHRyaWdnZXJlZCBieSB3cml0aW5nIGEgbmV3ICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8dmFsdWUuIFNlZSAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHwiaV9BUENJMTcxMF9Xcml0ZVRpbWVyVmFsdWUiIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGZ1bmN0aW9uLiBJZiBhIG5ldyBjb3VudCBpcyAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8d3JpdHRlbiBkdXJpbmcgY291bnRpbmcsICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICAgICAgIHxpdCB3aWxsIGJlIGxvYWRlZCBvbiB0aGUgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfG5leHQgQ0xLIHB1bHNlICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXwrLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0rfAotfHwgICAgICAgIHxNb2RlIDUgaXMgc2ltaWxhciB0byBtb2RlIDQgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHx8Ci18fCAgICAgICAgfGV4Y2VwdCBmb3IgdGhlIGdhdGUgaW5wdXQgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8YWN0aW9uLiBUaGUgZ2F0ZSBpbnB1dCBpcyBub3R8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfHwgICA1ICAgIHx1c2VkIGZvciBlbmFibGVkIG9yIGRpc2FibGVkIHxTdGFydCBjb3VudGluZ3wgIEhhcmR3YXJlIHRyaWdnZXIgIHx8Ci18fCAgICAgICAgfHRoZSB0aW1lci4gVGhlIGdhdGUgaW5wdXQgaXMgfCAgICB2YWx1ZSAgICAgfCAgICAgICAgICAgICAgICAgICAgfHwKLXx8ICAgICAgICB8dXNlZCBmb3IgdHJpZ2dlcmVkIHRoZSB0aW1lci58ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8fAotfCstLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLSt8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgIElucHV0IGNsb2NrIHNlbGVjdGlvbiB0YWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICB8Ci18ICB8ICAgICAgIGJfSW5wdXRDbG9ja1NlbGVjdGlvbiAgICB8ICAgICAgICAgICBEZXNjcmlwdGlvbiAgICAgICAgICAgICAgfCAgIHwKLXwgIHwgICAgICAgICAgIHBhcmFtZXRlciAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgfAotfCAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICB8Ci18ICB8ICAgIEFQQ0kxNzEwX1BDSV9CVVNfQ0xPQ0sgICAgICB8IEZvciB0aGUgdGltZXIgaW5wdXQgY2xvY2ssIHRoZSBQQ0kgfCAgIHwKLXwgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgYnVzIGNsb2NrIC8gNCBpcyB1c2VkLiBUaGlzIFBDSSBidXN8ICAgfAotfCAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBjbG9jayBjYW4gYmUgMzBNSHogb3IgMzNNSHouIEZvciAgIHwgICB8Ci18ICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRpbWVyIDAgb25seSB0aGlzIHNlbGVjdGlvbiBhcmUgICAgfCAgIHwKLXwgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgYXZhaWxhYmxlLiAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgfAotfCAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICB8Ci18ICB8IEFQQ0kxNzEwXyBGUk9OVF9DT05ORUNUT1JfSU5QVVR8IE9mIHRoZSBmcm9udCBjb25uZWN0b3IgeW91IGhhdmUgdGhlfCAgIHwKLXwgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgcG9zc2liaWxpdHkgdG8gaW5qZWN0IGEgaW5wdXQgY2xvY2t8ICAgfAotfCAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBmb3IgVGltZXIgMSBvciBUaW1lciAyLiBUaGUgc291cmNlIHwgICB8Ci18ICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IGZyb20gdGhpcyBjbG9jayBjYW4gZWF0IHRoZSBvdXRwdXQgfCAgIHwKLXwgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgY2xvY2sgZnJvbSBUaW1lciAwIG9yIGFueSBvdGhlciAgICB8ICAgfAotfCAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBjbG9jayBzb3VyY2UuICAgICAgICAgICAgICAgICAgICAgIHwgICB8Ci18ICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSS0xNzEwICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyZSAoMCB0byAzKSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfVGltZXJOYnIgICAgICAgICAgIDogVGltZXIgbnVtYmVyIHRvICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMikgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTW9kZSAgICAgICAgICA6IFRpbWVyIG1vZGUgc2VsZWN0aW9uICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gNSkgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOiBJbnRlcnJ1cHQgb24gdGVybWluYWx8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTogSGFyZHdhcmUgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXRyaWdnZXJhYmxlIG9uZS0gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3QgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjogUmF0ZSBnZW5lcmF0b3IgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOiBTcXVhcmUgd2F2ZSBtb2RlICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6IFNvZnR3YXJlIHRyaWdnZXJlZCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Ryb2JlICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OiBIYXJkd2FyZSB0cmlnZ2VyZWQgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cm9iZSAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIHRpbWVyIG1vZGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiB0YWJsZS4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUxPTkdfIHVsX1JlbG9hZFZhbHVlICAgICAgICAgOiBTdGFydCBjb3VudGluZyB2YWx1ZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yIGRpdmlzaW9uIGZhY3RvciAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIHRpbWVyIG1vZGUgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiB0YWJsZS4gICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfSW5wdXRDbG9ja1NlbGVjdGlvbiA6IFNlbGVjdGlvbiBmcm9tIGlucHV0ICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXIgY2xvY2suICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZWUgaW5wdXQgY2xvY2sgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbiB0YWJsZS4gICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnB1dENsb2NrTGV2ZWwgICAgIDogU2VsZWN0aW9uIGZyb20gaW5wdXQgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayBsZXZlbC4gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBMb3cgYWN0aXZlICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChJbnB1dCBpbnZlcnRlZCkgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogSGlnaCBhY3RpdmUgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfT3V0cHV0TGV2ZWwsICAgICAgICA6IFNlbGVjdGlvbiBmcm9tIG91dHB1dCAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2sgbGV2ZWwuICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogTG93IGFjdGl2ZSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBIaWdoIGFjdGl2ZSAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChPdXRwdXQgaW52ZXJ0ZWQpICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0hhcmR3YXJlR2F0ZUxldmVsICAgOiBTZWxlY3Rpb24gZnJvbSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhcmR3YXJlIGdhdGUgbGV2ZWwuICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IExvdyBhY3RpdmUgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKElucHV0IGludmVydGVkKSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBIaWdoIGFjdGl2ZSAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgeW91IHdpbGwgbm90IHVzZWQgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgaGFyZHdhcmUgZ2F0ZSBzZXQgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgdmFsdWUgdG8gMC4KLXxiX01vZHVsTmJyICAg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sZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRpbWVyIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogVGhlIG1vZHVsZSBpcyBub3QgYSBUSU1FUiBtb2R1bGUgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC01OiBUaW1lciBtb2RlIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTY6IElucHV0IHRpbWVyIGNsb2NrIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNzogU2VsZWN0aW9uIGZyb20gaW5wdXQgY2xvY2sgbGV2ZWwgaXMgd3JvbmcgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC04OiBTZWxlY3Rpb24gZnJvbSBvdXRwdXQgY2xvY2sgbGV2ZWwgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTk6IFNlbGVjdGlvbiBmcm9tIGhhcmR3YXJlIGdhdGUgbGV2ZWwgaXMgd3JvbmcgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5zbkNvbmZpZ0luaXRUaW1lcihzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotCQkJCQkgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwKLQkJCQkJICB1bnNpZ25lZCBpbnQ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MCkgJiYgKGJfVGltZXJOYnIgPD0gMikpICovCi0JCX0gZWxzZSB7Ci0JCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAqLwotCQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSBUSU1FUiBtb2R1bGVcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQl9Ci0JfSBlbHNlIHsKLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gICAgIGlfQVBDSTE3MTBfRW5hYmxlVGltZXIgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlKQotaW50IGlfQVBDSTE3MTBfSW5zbldyaXRlRW5hYmxlRGlzYWJsZVRpbWVyKHN0cnVj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YgYm9hcmQgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0ktMTcxMCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTmJyICAgICAgICA6IFRpbWVyIG51bWJlciB0byBlbmFibGUgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMikgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyIGludGVycnVwdC4gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFIDogICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIHRpbWVyIGludGVycnVwdCB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEUgOiAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGlzYWJsZSB0aGUgdGltZXIgaW50ZXJydXB0fAotaV9SZXR1cm5WYWx1ZT1pbnNuLT5uOwotCWJfTW9kdWxOYnIgICAgICAgID0gKHVuc2lnbmVkIGNoYXIpIENSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOwotCWJfVGltZXJOYnIJCSAgPSAodW5zaWduZWQgY2hhcikgQ1JfQ0hBTihpbnNuLT5jaGFuc3BlYyk7Ci0JYl9BY3Rpb25UeXBlICAgICAgPSAodW5zaWduZWQgY2hhcikgZGF0YVswXTsgLyogIGVuYWJsZSBkaXNhYmxlICovCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGltZXIgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRpbWVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBJbnRlcnJ1cHQgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTc6IEludGVycnVwdCBmdW5jdGlvbiBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9JbnNuV3JpdGVFbmFibGVEaXNhYmxlVGltZXIoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJCSBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLQkJCQkJCSBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0JCQkJCQkgdW5zaWduZWQgaW50ICpkYXRhKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCXVuc2lnbmVkIGludCBkd19EdW1teVJlYWQ7Ci0JdW5zaWduZWQgY2hhciBiX01vZHVsTmJyOwotCXVuc2lnbmVkIGNoYXIgYl9UaW1lck5icjsKLQl1bnNpZ25lZCBjaGFyIGJf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gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1RpbWVyVmFsdWVBcnJheSkKLWludCBpX0FQQ0kxNzEwX0luc25SZWFkQWxsVGltZXJWYWx1ZShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbix1bnNpZ25lZCBpbnQgKmRhdGEpICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGFsbCB0aW1lciB2YWx1ZXMgZnJvbSBzZWxlY3RlZCB0aW1lciAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJLTE3MTAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUFVMT05HXyBwdWxfVGltZXJWYWx1ZUFycmF5IDogVGltZXIgdmFsdWUgYXJyYXkuICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICBFbGVtZW50IDAgY29udGFpbiB0aGUgdGltZXIgMCB2YWx1ZS4gICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgIEVsZW1lbnQgMSBjb250YWluIHRoZSB0aW1lciAxIHZhbHVlLiAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgRWxlbWVudCAyIGNvbnRhaW4gdGhlIHRpbWVyIDIgdmFsdWUuICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgVElNRVIgbW9kdWxlICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogVGltZXIgMCBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0VGltZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVyIDEgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRpbWVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBUaW1lciAyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRUaW1lciIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5zblJlYWRBbGxUaW1lclZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLQkJCQkJICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwKLQkJCQkJICAgIHVuc2lnbmVkIGludCAqZGF0YSkKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQ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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfVGltZXJWYWx1ZSkgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSB0aW1lciB2YWx1ZSBmcm9tIHNlbGVjdGVkIGRpZ2l0YWwgdGltZXIgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9UaW1lck5icikgZnJvbSBzZWxlY3RlZCB0aW1lciAgbW9kdWxlIChiX01vZHVsTmJyKS4gfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSS0xNzEwICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfVGltZXJOYnIgICAgICAgIDogVGltZXIgbnVtYmVyIHRvIHJlYWQgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAyKSAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQVUxPTkdfIHB1bF9UaW1lclZhbHVlICAgIDogVGltZXIgdmFsdWUgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGltZXIgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRpbWVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0JLyoKLQkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gICAgIGlfQVBDSTE3MTBfR2V0VGltZXJPdXRwdXRMZXZlbCAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9PdXRwdXRMZXZlbCkgICAgICAgICAgICB8Ci0JICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgb3V0cHV0IHNpZ25hbCBsZXZlbCAocGJfT3V0cHV0TGV2ZWwpIGZyb20gICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIGRpZ2l0YWwgdGltZXIgKGJfVGltZXJOYnIpIGZyb20gc2VsZWN0ZWQgdGltZXJ8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0JICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJLTE3MTAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gdGVzdCAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAyKSAgICAgICAgICAgICAgICAgICB8Ci0JICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfT3V0cHV0TGV2ZWwgICAgIDogT3V0cHV0IHNpZ25hbCBsZXZlbCAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBvdXRwdXQgaXMgbG93ICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRoZSBvdXRwdXQgaXMgaGlnaCAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgIC0zOiBUaW1lciBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgIC01OiBUaW1lciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0VGltZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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AgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIGRpZ2l0YWwgdGltZXIgKGJfVGltZXJOYnIpIGZyb20gc2VsZWN0ZWQgdGltZXJ8Ci18ICAgICAgICAgICAgICAgICAgICAgbW9kdWxlIChiX01vZHVsTmJyKS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0ktMTcxMCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTmJyICAgICAgICA6IFRpbWVyIG51bWJlciB0byB0ZXN0ICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMikgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9UaW1lclN0YXR1cyAgICAgOiBPdXRwdXQgc2lnbmFsIGxldmVsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBUaW1lciBub3QgaW4gcHJvZ3Jlc3MgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRpbWVyIGluIHByb2dyZXNzICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGltZXIgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRpbWVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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LS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gICAgIGlfQVBDSTE3MTBfV3JpdGVUaW1lclZhbHVlICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfIHVsX1dyaXRlVmFsdWUpICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogV3JpdGUgdGhlIHZhbHVlICh1bF9Xcml0ZVZhbHVlKSBpbnRvIHRoZSBzZWxlY3RlZCB0aW1lcnwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9UaW1lck5icikgZnJvbSBzZWxlY3RlZCB0aW1lciBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSBhY3Rpb24gaW4gZGVwZW5kIG9mIHRoZSB0aW1lIG1vZGUgc2VsZWN0aW9uLiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgU2VlIHRpbWVyIG1vZGUgZGVzY3JpcHRpb24gdGFibGUuICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0ktMTcxMCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTmJyICAgICAgICA6IFRpbWVyIG51bWJlciB0byB3cml0ZSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMikgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9Xcml0ZVZhbHVlICAgICAgOiBWYWx1ZSB0byB3cml0ZSAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGltZXIgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRpbWVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9Xcml0ZVRpbWVyVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkgICAgICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJICAgICAgdW5zaWduZWQgY2hhciBiX1RpbWVyTmJyLAotCQkJCSAgICAgIHVuc2lnbmVkIGludCB1bF9Xcml0ZVZhbHVlKQotewotCXN0cnVjdCBhZG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S0tLS0tLS0tKwotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVUERBVEVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgIERhdGUgICB8ICAgQXV0aG9yICB8ICAgICAgICAgIERlc2NyaXB0aW9uIG9mIHVwZGF0ZXMgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgMjkvMDYvOTggfCBTLiBXZWJlciAgfCBEaWdpdGFsIGlucHV0IC8gb3V0cHV0IGltcGxlbWVudGF0aW9uICAgICAgICAgIHwKLSAgfC0tLS0tLS0tLS18LS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfAotICB8IDA4LzA1LzAwIHwgR3Vpbm90IEMgIHwgLSAwNDAwLzAyMjggQWxsIEZ1bmN0aW9uIGluIFJJTkcgMCAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgIGF2YWlsYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI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ICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9DaHJvbm9Nb2RlLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9UaW1pbmdJbnRlcnZhbCwgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1JlYWxUaW1pbmdJbnRlcnZhbCkKLQotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlIHRoZSBjaHJvbm9tZXRlciBvcGVyYXRpbmcgbW9kZSAoYl9DaHJvbm9Nb2RlKXwKLXwgICAgICAgICAgICAgICAgICAgICBmcm9tIHNlbGVjdGVkIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSB1bF9UaW1pbmdJbnRlcnZhbCBhbmQgdWxfVGltaW5nVW5pdCBkZXRlcm1pbmUgdGhlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGltaW5nIGJhc2UgZm9yIHRoZSBtZWFzdXJlbWVudC4gICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBUaGUgcHVsX1JlYWxUaW1pbmdJbnRlcnZhbCByZXR1cm4gdGhlIHJlYWwgdGltaW5nICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHZhbHVlLiBZb3UgbXVzdCBjYWxsaW5nIHRoaXMgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsICB8Ci18ICAgICAgICAgICAgICAgICAgICAgYW55IG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiB0aGUgY2hyb25vbWV0ZXIuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFdpdGNoIHRoaXMgZnVuY3Rpb25hbGl0eSBmcm9tIHRoZSBBUENJLTE3MTAgeW91IGhhdmUgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGhlIHBvc3NpYmlsaXR5IHRvIG1lYXN1cmUgdGhlIHRpbWluZyB3aXRjaCB0d28gZXZlbnQuIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSBtb2RlIDAgYW5kIDEgaXMgYXBwcm9wcmlhdGUgZm9yIHBlcmlvZCBtZWFzdXJlbWVudC58Ci18ICAgICAgICAgICAgICAgICAgICAgVGhlIG1vZGUgMiBhbmQgMyBpcyBhcHByb3ByaWF0ZSBmb3IgZnJlcXVlbnQgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBtZWFzdXJlbWVudC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSBtb2RlIDQgdG8gNyBpcyBhcHByb3ByaWF0ZSBmb3IgbWVhc3VyaW5nIHRoZSB0aW1pbmd8Ci18ICAgICAgICAgICAgICAgICAgICAgYmV0d2VlbiAgdHdvIGV2ZW50LiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICB8Ci18IHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYykgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgfAotfCB1bnNpZ25lZCBjaGFyXyAgIGJfQ2hyb25vTW9kZQkJCQlkYXRhWzBdICAgIDogQ2hyb25vbWV0ZXIgYWN0aW9uIG1vZGUgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byA3KS4gICAgICAgICAgICAgICAgICAgfAotfCB1bnNpZ25lZCBjaGFyXyAgIGJfUENJSW5wdXRDbG9jawkJCWRhdGFbMV0gOiBTZWxlY3Rpb24gZnJvbSBQQ0kgYnVzIGNsb2NrfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfMzBNSFogOiAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgUEMgaGF2ZSBhIFBDSSBidXMgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrIGZyb20gMzAgTUh6ICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfMzNNSFogOiAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgUEMgaGF2ZSBhIFBDSSBidXMgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrIGZyb20gMzMgTUh6ICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfNDBNSFogICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgQVBDSS0xNzEwIGhhdmUgYSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVncmF0ZWQgNDBNaHogICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhcnR6LiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWluZ1VuaXQJZGF0YVsyXSAgICA6IEJhc2UgdGltaW5nIHVuaXR5ICgwIHRvIDQpIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogwrVzICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBzICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCA6IG1uICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgIFVMT05HXyB1bF9UaW1pbmdJbnRlcnZhbCA6IGRhdGFbM10JIEJhc2UgdGltaW5nIHZhbHVlLiAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQVUxPTkdfICBwdWxfUmVhbFRpbWluZ0ludGVydmFsIDogUmVhbCAgYmFzZSB0aW1pbmcgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS4KLXwgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSBDaHJvbm9tZXRlciBtb2R1bGUgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBDaHJvbm9tZXRlciBtb2RlIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IFRoZSBzZWxlY3RlZCBQQ0kgaW5wdXQgY2xvY2sgaXMgd3JvbmcgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNjogVGltaW5nIHVuaXR5IHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC03OiBCYXNlIHRpbWluZyBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTg6IFlvdSBjYW4gbm90IHVzZWQgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aXRoICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyBib2FyZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC05OiBZb3UgY2FuIG5vdCB1c2VkIHRoZSA0ME1IeiBjbG9jayBzZWxlY3Rpb24gd2l0aCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgQ0hST05PUyB2ZXJzaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9JbnNuQ29uZmlnSW5pdENocm9ubyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkgICBzdHJ1Y3QgY29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dWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNocm9ub21ldGVyICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0NIUk9OT01FVEVSKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCB0aGUgY2hyb25vbWV0ZXIgbW9kZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGJfQ2hyb25vTW9kZSA8PSA3KSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCB0aGUgUENJIGJ1cyBjbG9jayAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKChiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzBNSFopIHx8Ci0JCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzNNSFopIHx8Ci0JCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfNDBNSFopKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGVzdCB0aGUgdGltaW5nIHVuaXR5ICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlpZiAoYl9UaW1pbmdVbml0IDw9IDQpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCB0aGUgYmFzZSB0aW1pbmcgc2VsZWN0aW9uICovCi0JCSAgICAgICAvKioqKioqKio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wTUh6IGNsb2NrIHNlbGVjdGlvbiAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJRFBSSU5USygiVE9SIHZlcnNpb24gZXJyb3IgZm9yIDQwTUh6IGNsb2NrIHNlbGVjdGlvblxuIik7Ci0JCQkJCQkJCQlpX1JldHVyblZhbHVlCi0JCQkJCQkJCQkJPQotCQkJCQkJCQkJCS05OwotCQkJCQkJCQl9Ci0JCQkJCQkJfSBlbHNlIHsKLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBZb3UgY2FuIG5vdCB1c2UgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aXRoIHRoaXMgYm9hcmQgKi8KLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCURQUklOVEsoIllvdSBjYW4gbm90IHVzZWQgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aXRoIHRoaXMgYm9hcmRcbiIpOwotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCS04OwotCQkJCQkJCX0KLQkJCQkJCX0gZWxzZSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIEJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCURQUklOVEsoIkJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC03OwotCQkJCQkJfQotCQkJCQl9CS8qICBpZiAoKGJfVGltaW5nVW5pdCA+PSAwKSAmJiAoYl9UaW1pbmdVbml0IDw9IDQpKSAqLwotCQkJCQllbHNlIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRpbWluZyB1bml0eSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJRFBSSU5USygiVGltaW5nIHVuaXR5IHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLyogIGlmICgoYl9UaW1pbmdVbml0ID49IDApICYmIChiX1RpbWluZ1VuaXQgPD0gNCkpICovCi0JCQkJfQkvKiAgaWYgKChiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzBNSFopIHx8IChiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzNNSFopKSAqLwotCQkJCWVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUaGUgc2VsZWN0ZWQgUENJIGlucHV0IGNsb2NrIGlzIHdyb25nICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIFBDSSBpbnB1dCBjbG9jayBpcyB3cm9uZ1xuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9CS8qICBpZiAoKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF8zME1IWikgfHwgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF8zM01IWikpICovCi0JCQl9CS8qICBpZiAoYl9DaHJvbm9Nb2RlID49IDAgJiYgYl9DaHJvbm9Nb2RlIDw9IDcpICovCi0JCQllbHNlIHsKLQkJIC8qKioq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LSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0VuYWJsZUNocm9ubyAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0N5Y2xlTW9kZSwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlKQotaW50IGlfQVBDSTE3MTBfSW5zbldyaXRlRW5hYmxlRGlzYWJsZUNocm9ubyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogRW5hYmxlIHRoZSBjaHJvbm9tZXRlciBmcm9tIHNlbGVjdGVkIG1vZHVsZSAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iIGZ1bmN0aW9uIGJlIGZvciB5b3UgY2FsbCB0aGlzICB8Ci18ICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJZiB5b3UgZW5hYmxlIHRoZSBjaHJvbm9tZXRlciBpbnRlcnJ1cHQsIHRoZSAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGNocm9ub21ldGVyIGdlbmVyYXRlIGEgaW50ZXJydXB0IGFmdGVyIHRoZSBzdG9wIHNpZ25hbC58Ci18ICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiIGFuZCB0aGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJbnRlcnJ1cHQgbWFzayBkZXNjcmlwdGlvbiBjaGFwdGVyIGZyb20gdGhpcyBtYW51YWwuICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSBiX0N5Y2xlTW9kZSBwYXJhbWV0ZXIgZGV0ZXJtaW5lIGlmIHlvdSB3aWxsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgbWVhc3VyZWQgYSBzaW5nbGUgb3IgbW9yZSBjeWNsZS4KLQotfAkJCQkJICBEaXNhYmxlIHRoZSBjaHJvbm9tZXRlciBmcm9tIHNlbGVjdGVkIG1vZHVsZSAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsTmJyKS4gSWYgeW91IGRpc2FibGUgdGhlIGNocm9ub21ldGVyIGFmdGVyIGEgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgc3RhcnQgc2lnbmFsIG9jY3VyIGFuZCB5b3UgcmVzdGFydCB0aGUgY2hyb25vbWV0ZXIgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB3aXRjaCB0aGUgIiBpX0FQQ0kxNzEwX0VuYWJsZUNocm9ubyIgZnVuY3Rpb24sIGlmIG5vICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHN0b3Agc2lnbmFsIG9jY3VyIHRoaXMgc3RhcnQgc2lnbmFsIGlzIGlnbm9yZWQuCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICBDUl9BUkVGKGNoYW5zcGVjKSAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICgwIHRvIDMpIHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICBFTkFCbGUvRGlzYWJsZSBjaHJvbm8KLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0N5Y2xlTW9kZSAgICA6IFNlbGVjdGVkIHRoZSBjaHJvbm9tZXRlciAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICBhY3F1aXNpdGlvbiBtb2RlICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSAgICAgICAgICAgIGNocm9ub21ldGVyIGludGVycnVwdC4gICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFOiAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIGNocm9ub21ldGVyICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRElTQUJMRTogICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHRoZSBjaHJvbm9tZXRlciAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIENocm9ub21ldGVyIG1vZHVsZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IENocm9ub21ldGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENocm9ubyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBDaHJvbm9tZXRlciBhY3F1aXNpdGlvbiBtb2RlIGN5Y2xlIGlzIHdyb25nICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTY6IEludGVycnVwdCBwYXJhbWV0ZXIgaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNzogSW50ZXJydXB0IGZ1bmN0aW9uIG5vdCBpbml0aWFsaXNlZC4gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICBTZWUgZnVuY3Rpb24gImlfQVBDSTE3MTBfU2V0Qm9hcmRJbnRSb3V0aW5lWCIKLSAgICAgICAgICAgICAgICAgICAgICAtODogZGF0YVswXSB3cm9uZyBpbnB1dCAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5zbldyaXRlRW5hYmxlRGlzYWJsZUNocm9ubyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkJICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCi0JCQkJCQkgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0JCQkJCQkgIC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LQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiQ2hyb25vbWV0ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSBDaHJvbm9tZXRlciBtb2R1bGVcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIE1vZHVsZSBudW1iZXIgZXJyb3IgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiTW9kdWxlIG51bWJlciBlcnJvclxuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0Q2hyb25vUHJvZ3Jlc3NTdGF0dXMgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICA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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMuICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBNZWFzdXJlbWVudCBub3Qgc3RhcnRlZC58Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vIHN0YXJ0IHNpZ25hbCBvY2N1ci4gIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogTWVhc3VyZW1lbnQgc3RhcnRlZC4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBIHN0YXJ0IHNpZ25hbCBvY2N1ci4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IE1lYXN1cmVtZW50IHN0b3BwZWQuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQSBzdG9wIHNpZ25hbCBvY2N1ci4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgbWVhc3VyZW1lbnQgaXMgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlcm1pbmF0ZS4gICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOiBBIG92ZXJmbG93IG9jY3VyLiBZb3UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11c3QgY2hhbmdlIHRoZSBiYXNlICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltaW5nIHdpdGNoIHRoZSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSBDaHJvbm9tZXRlciBtb2R1bGUgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9HZXRDaHJvbm9Qcm9ncmVzc1N0YXR1cy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yAoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJIC8qKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IGlmIG92ZXJmbG93ICovCi0JCSAvKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoKGR3X1N0YXR1cyAmIDgpID09IDgpIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIE92ZXJmbG93IG9jY3VyICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCSpwYl9DaHJvbm9TdGF0dXMgPSAzOwotCQkJCX0JLyogIGlmICgoZHdfU3RhdHVzICYgOCkgPT0gOCkgKi8KLQkJCQllbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IGlmIG1lYXN1cmVtZW50IHN0b3BwZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmICgoZHdfU3RhdHVzICYgMikgPT0gMikgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogQSBzdG9wIHNpZ25hbCBvY2N1ciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkqcGJfQ2hyb25vU3RhdHVzID0gMjsKLQkJCQkJfQkvKiAgaWYgKChkd19TdGF0dXMgJiAyKSA9PSAyKSAqLwotCQkJCQllbHNlIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCBpZiBtZWFzdXJlbWVudCBzdGFydGVkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJaWYgKChkd19TdGF0dXMgJiAxKSA9PSAxKSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogQSBzdGFydCBzaWduYWwgb2NjdXIgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCSpwYl9DaHJvbm9TdGF0dXMgPSAxOwotCQkJCQkJfQkvKiAgaWYgKChkd19TdGF0dXMgJiAxKSA9PSAxKSAqLwotCQkJCQkJZWxzZSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogTWVhc3VyZW1lbnQgbm90IHN0YXJ0ZWQgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCSpwYl9DaHJvbm9TdGF0dXMgPSAwOwotCQkJCQkJfQkvKiAgaWYgKChkd19TdGF0dXMgJiAxKSA9PSAxKSAqLwotCQkJCQl9CS8qICBpZiAoKGR3X1N0YXR1cyAmIDIpID09IDIpICovCi0JCQkJfQkvKiAgaWYgKChkd19TdGF0dXMgJiA4KSA9PSA4KSAqLwotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIENocm9ub21ldGVyIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJRFBSSU5USygiQ2hyb25vbWV0ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkQ2hyb25vVmFsdWUgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnRfICAgIHVpX1RpbWVPdXQsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX0Nocm9ub1N0YXR1cywgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfQ2hyb25vVmFsdWUpICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGNocm9ub21ldGVyIHN0YXR1cyAocGJfQ2hyb25vU3RhdHVzKSBhbmQgdGhlfAotfCAgICAgICAgICAgICAgICAgICAgIHRpbWluZyB2YWx1ZSAocHVsX0Nocm9ub1ZhbHVlKSBhZnRlciBhIHN0b3Agc2lnbmFsICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgb2NjdXIgZnJvbSBzZWxlY3RlZCBjaHJvbm9tZXRlciBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBUaGlzIGZ1bmN0aW9uIGFyZSBvbmx5IGF2YWlibGUgaWYgeW91IGhhdmUgZGlzYWJsZWQgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHRoZSBpbnRlcnJ1cHQgZnVuY3Rpb25hbGl0eS4gU2VlIGZ1bmN0aW9uICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRW5hYmxlQ2hyb25vIiBhbmQgdGhlIEludGVycnVwdCBtYXNrICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiBjaGFwdGVyLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFlvdSBjYW4gdGVzdCB0aGUgY2hyb25vbWV0ZXIgc3RhdHVzIHdpdGNoIHRoZSAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfR2V0Q2hyb25vUHJvZ3Jlc3NTdGF0dXMiIGZ1bmN0aW9uLiAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRoZSByZXR1cm5lZCB2YWx1ZSBmcm9tIHB1bF9DaHJvbm9WYWx1ZSBwYXJhbWV0ZXIgaXMgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgbm90IHJlYWwgbWVhc3VyZWQgdGltaW5nLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBZb3UgbXVzdCB1c2VkIHRoZSAiaV9BUENJMTcxMF9Db252ZXJ0Q2hyb25vVmFsdWUiICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9yIG1ha2UgdGhpcyBvcGVyYXRpb24gZm9yIGNhbGN1bGF0ZSB0aGUgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGltaW5nOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFRpbWluZyA9IHB1bF9DaHJvbm9WYWx1ZSAqIHB1bF9SZWFsVGltaW5nSW50ZXJ2YWwuICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBwdWxfUmVhbFRpbWluZ0ludGVydmFsIGlzIHRoZSByZXR1cm5lZCBwYXJhbWV0ZXIgZnJvbSAgfAotfCAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iIGZ1bmN0aW9uIGFuZCB0aGUgdGltZSB1bml0eSBpcyB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGhlIGJfVGltaW5nVW5pdCBmcm9tICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iIGZ1bmN0aW9ufAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUFVMT05HXyAgcGJfQ2hyb25vU3RhdHVzIDogUmV0dXJuIHRoZSBjaHJvbm9tZXRlciAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMuICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBNZWFzdXJlbWVudCBub3Qgc3RhcnRlZC58Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vIHN0YXJ0IHNpZ25hbCBvY2N1ci4gIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogTWVhc3VyZW1lbnQgc3RhcnRlZC4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBIHN0YXJ0IHNpZ25hbCBvY2N1ci4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IE1lYXN1cmVtZW50IHN0b3BwZWQuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQSBzdG9wIHNpZ25hbCBvY2N1ci4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgbWVhc3VyZW1lbnQgaXMgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlcm1pbmF0ZS4gICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOiBBIG92ZXJmbG93IG9jY3VyLiBZb3UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11c3QgY2hhbmdlIHRoZSBiYXNlICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltaW5nIHdpdGNoIHRoZSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICogIHB1bF9DaHJvbm9WYWx1ZSAgOiBDaHJvbm9tZXRlciB0aW1pbmcgdmFsdWUuICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogQ2hyb25vbWV0ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q2hyb25vIiAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWVvdXQgcGFyYW1ldGVyIGlzIHdyb25nICgwIHRvIDY1NTM1KSAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNjogSW50ZXJydXB0IHJvdXRpbmUgaW5zdGFsbGVkLiBZb3UgY2FuIG5vdCByZWFkICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RseSB0aGUgY2hyb25vbWV0ZXIgbWVhc3VyZWQgdGltaW5nLiAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfUmVhZENocm9ub1ZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJICAgICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCSAgICAgIHVuc2lnbmVkIGludCB1aV9UaW1lT3V0LAotCQkJCSAgICAgIHVuc2lnbmVkIGNoYXIgKnBiX0Nocm9ub1N0YXR1cywKLQkJCQkgICAgICB1bnNpZ25lZCBpbnQgKnB1bF9DaHJvbm9WYWx1ZSkKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQl1bnNpZ25lZCBpbnQgZHdfU3RhdHVzOwotCXVuc2lnbmVkIGludCBkd19UaW1lT3V0ID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNocm9ub21ldGVyICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0NIUk9OT01FVEVSKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBjaHJvbm9tZXRlciBpbml0aWFsaXNlZCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGRldnByaXYtPgotCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX0Nocm9ub01vZHVsZUluZm8uYl9DaHJvbm9Jbml0ID09IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IHRoZSB0aW1vdXQgcGFyYW1ldGVyICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAodWlfVGltZU91dCA8PSA2NTUzNVVMKSB7Ci0KLQkJCQkJZm9yICg7OykgewotCQkJICAvKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFJlYWQgdGhlIHN0YXR1cyAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJZHdfU3RhdHVzID0KLQkJCQkJCQlpbmwoZGV2cHJpdi0+Ci0JCQkJCQkJc19Cb2FyZEluZm9zLgotCQkJCQkJCXVpX0FkZHJlc3MgKyA4ICsKLQkJCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCBpZiBvdmVyZmxvdyAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmICgoZHdfU3RhdHVzICYgOCkgPT0gOCkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIE92ZXJmbG93IG9jY3VyICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkqcGJfQ2hyb25vU3RhdHVzID0gMzsKLQotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgaWYgY29udGludW91cyBtb2RlICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlpZiAoZGV2cHJpdi0+Ci0JCQkJCQkJCXNfTW9kdWxlSW5mbwotCQkJCQkJCQlbYl9Nb2R1bE5icl0uCi0JCQkJCQkJCXNfQ2hyb25vTW9kdWxlSW5mby4KLQkJCQkJCQkJYl9DeWNsZU1vZGUgPT0KLQkJCQkJCQkJQVBDSTE3MTBfQ09OVElOVU9VUykKLQkJCQkJCQl7Ci0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIENsZWFyI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AxKSAqLwotCQkJCQkJCX0JLyogIGlmICgoZHdfU3RhdHVzICYgMikgPT0gMikgKi8KLQkJCQkJCX0JLyogIGlmICgoZHdfU3RhdHVzICYgOCkgPT0gOCkgKi8KLQotCQkJCQkJaWYgKGR3X1RpbWVPdXQgPT0gdWlfVGltZU91dCkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogVGltZW91dCBvY2N1ciAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlicmVhazsKLQkJCQkJCX0gZWxzZSB7Ci0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIEluY3JlbWVudCB0aGUgdGltZW91dCAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCWR3X1RpbWVPdXQgPQotCQkJCQkJCQlkd19UaW1lT3V0ICsgMTsKLQkJCQkJCQltZGVsYXkoMTAwMCk7Ci0KLQkJCQkJCX0KLQkJCQkJfQkvKiAgZm9yICg7OykgKi8KLQotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IGlmIHN0b3Agc2lnbmFsIG9jY3VyICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJaWYgKCpwYl9DaHJvbm9TdGF0dXMgPT0gMikgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFJlYWQgdGhlIG1lYXN1cmVkIHRpbWluZyB2YWx1ZSAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJKnB1bF9DaHJvbm9WYWx1ZSA9Ci0JCQkJCQkJaW5sKGRldnByaXYtPgotCQkJCQkJCXNfQm9hcmRJbmZvcy4KLQkJCQkJCQl1aV9BZGRyZXNzICsgNCArCi0JCQkJCQkJKDY0ICogYl9Nb2R1bE5icikpOwotCi0JCQkJCQlpZiAoKnB1bF9DaHJvbm9WYWx1ZSAhPSAwKSB7Ci0JCQkJCQkJKnB1bF9DaHJvbm9WYWx1ZSA9Ci0JCQkJCQkJCSpwdWxfQ2hyb25vVmFsdWUKLQkJCQkJCQkJLSAxOwotCQkJCQkJfQotCQkJCQl9IGVsc2UgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgaWYgdGltZW91dCBvY2N1ciAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJaWYgKCgqcGJfQ2hyb25vU3RhdHVzICE9IDMpCi0JCQkJCQkJJiYgKGR3X1RpbWVPdXQgPT0KLQkJCQkJCQkJdWlfVGltZU91dCkKLQkJCQkJCQkmJiAodWlfVGltZU91dCAhPSAwKSkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogVGltZW91dCBvY2N1ciAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkqcGJfQ2hyb25vU3RhdHVzID0gNDsKLQkJCQkJCX0KLQkJCQkJfQotCi0JCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRpbWVvdXQgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQlEUFJJTlRLKCJUaW1lb3V0IHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogQ2hyb25vbWV0ZXIgbm90IGluaXRpYWxpc2VkICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQlEUFJJTlRLKCJDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBDaHJvbm9tZXRlciBtb2R1bGUgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSBDaHJvbm9tZXRlciBtb2R1bGVcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIE1vZHVsZSBudW1iZXIgZXJyb3IgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3JcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0NvbnZlcnRDaHJvbm9WYWx1ZSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgIHVsX0Nocm9ub1ZhbHVlLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfSG91ciwgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfTWludXRlLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfU2Vjb25kLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKl8gIHB1aV9NaWxsaVNlY29uZCwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqXyAgcHVpX01pY3JvU2Vjb25kLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpfICBwdWlfTmFub1NlY29uZCkgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBDb252ZXJ0IHRoZSBjaHJvbm9tZXRlciBtZWFzdXJlZCB0aW1pbmcgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICh1bF9DaHJvbm9WYWx1ZSkgaW4gdG8gaCwgbW4sIHMsIG1zLCDCtXMsIG5zLiAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICgwIHRvIDMpfAotfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9DaHJvbm9WYWx1ZSA6IE1lYXN1cmVkIGNocm9ub21ldGVyIHRpbWluZyAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUuICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZWUiaV9BUENJMTcxMF9SZWFkQ2hyb25vVmFsdWUifAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUFVMT05HXyAgIHB1bF9Ib3VyICAgICAgICA6IENocm9ub21ldGVyIHRpbWluZyBob3VyICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgICBwYl9NaW51dGUgICAgICA6IENocm9ub21ldGVyIHRpbWluZyBtaW51dGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgICBwYl9TZWNvbmQgICAgICA6IENocm9ub21ldGVyIHRpbWluZyBzZWNvbmQgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKl8gICAgcHVpX01pbGxpU2Vjb25kICA6IENocm9ub21ldGVyIHRpbWluZyBtaW5pICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWNvbmQgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpfICAgIHB1aV9NaWNyb1NlY29uZCA6IENocm9ub21ldGVyIHRpbWluZyBtaWNybyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2Vjb25kICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqXyAgICBwdWlfTmFub1NlY29uZCAgOiBDaHJvbm9tZXRlciB0aW1pbmcgbmFubyAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZCAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIENocm9ub21ldGVyIG1vZHVsZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IENocm9ub21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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCURQUklOVEsoIkNocm9ub21ldGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIENocm9ub21ldGVyIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIENocm9ub21ldGVyIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJRFBSSU5USygiTW9kdWxlIG51bWJlciBlcnJvclxuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6SU5UCWlfQVBDSTE3MTBfSW5zblJlYWRDaHJvbm8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldixzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLXN0cnVjdCBjb21lZGlfaW5zbiAq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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX091dHB1dENoYW5uZWwgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIG91dHB1dCAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgIENSX0NIQU4oKSAgICAgICAgICAgICAgICAgIGNoYW5uZWwgKDAgdG8gMikgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEggICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgQSAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogQ2hhbm5lbCBCICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogVGhlIHNlbGVjdGVkIGRpZ2l0YWwgb3V0cHV0IGlzIHdyb25nICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfU2V0Q2hyb25vQ2hsT2ZmICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfT3V0cHV0Q2hhbm5lbCkgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXNldHMgdGhlIG91dHB1dCB3aXRjaCBoYXMgYmVlbiBwYXNzZWQgd2l0aCB0aGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlciBiX0NoYW5uZWwuIFJlc2V0dGluZyBhbiBvdXRwdXQgbWVhbnMgc2V0dGluZyB8Ci18ICAgICAgICAgICAgICAgICAgICAgYW4gb3V0cHV0IGxvdy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAKLSAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gOiBDaGwgT04sIENobCBPRkYgLCBDaGwgUmVhZCAsIFBvcnQgUmVhZAotCi18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgQ1JfQVJFRiAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMyl8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9PdXRwdXRDaGFubmVsIENSX0NIQU4gOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIG91dHB1dCAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5uZWwgKDAgdG8gMikgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEggICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgQSAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogQ2hhbm5lbCBCICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogVGhlIHNlbGVjdGVkIGRpZ2l0YWwgb3V0cHV0IGlzIHdyb25nICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfUmVhZENocm9ub0NobFZhbHVlICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0lucHV0Q2hhbm5lbCwgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0NoYW5uZWxTdGF0dXMpICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIHN0YXR1cyBmcm9tIHNlbGVjdGVkIGRpZ2l0YWwgaW5wdXQgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX0lucHV0Q2hhbm5lbCkgZnJvbSBzZWxlY3RlZCBjaHJvbm9tZXRlciAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgbW9kdWxlIChiX01vZHVsTmJyKS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0lucHV0Q2hhbm5lbCAgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIGlucHV0ICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5uZWwgKDAgdG8gMikgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDUl9DSEFOKCkgICAgICAgICAgICAgMCA6IENoYW5uZWwgRSAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5lbCBGICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBDaGFubmVsIEcgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfIHBiX0NoYW5uZWxTdGF0dXMgOiBEaWdpdGFsIGlucHV0IGNoYW5uZWwgc3RhdHVzLnwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgaXMgbm90IGFjdGl2ZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5lbCBpcyBhY3RpdmUgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgQ2hyb25vbWV0ZXIgbW9kdWxlICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogVGhlIHNlbGVjdGVkIGRpZ2l0YWwgaW5wdXQgaXMgd3JvbmcgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBDaHJvbm9tZXRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDaHJvbm8iICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfUmVhZENocm9ub1BvcnRWYWx1ZSAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgIC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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIENocm9ub21ldGVyIG1vZHVsZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IENocm9ub21ldGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENocm9ubyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0luc25CaXRzQ2hyb25vRGlnaXRhbElPKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotCQkJCQkgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0JCQkJCSAgICAgIHVuc2lnbmVkIGludCAqZGF0YSkKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZ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0ICAgICA6IEFQSSBBUENJMTcxMCAgICB8IENvbXBpbGVyIDogZ2NjICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8IE1vZHVsZSBuYW1lIDogRElHX0lPLkMgICAgICAgIHwgVmVyc2lvbiAgOiAyLjk2ICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBQcm9qZWN0IG1hbmFnZXI6IEVyaWMgU3RvbHogICB8IERhdGUgICAgIDogIDAyLzEyLzIwMDIgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgRGVzY3JpcHRpb24gOiAgIEFQQ0ktMTcxMCBkaWdpdGFsIEkvTyBtb2R1bGUgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICBEYXRlICAgfCAgIEF1dGhv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Ky0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDoJCQkJCQkJCQkJCQkJICAgICB8Ci18ICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgIGRhdGFbMF06IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0NoYW5uZWxBTW9kZSBkYXRhWzFdICA6IENoYW5uZWwgQSBtb2RlIHNlbGVjdGlvbiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgdXNlZCBmb3IgZGlnaXRhbCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDaGFubmVsIHVzZWQgZm9yIGRpZ2l0YWwgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0NoYW5uZWxCTW9kZSBkYXRhWzJdIDogQ2hhbm5lbCBCIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ2hhbm5lbCB1c2VkIGZvciBkaWdpdGFsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgdXNlZCBmb3IgZGlnaXRhbCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0CQkJCQkgfAotCQkJCQkJZGF0YVswXQkgIG1lbW9yeSBvbi9vZmYKLUFjdGl2YXRlcyBhbmQgZGVhY3RpdmF0ZXMgdGhlIGRpZ2l0YWwgb3V0cHV0IG1lbW9yeS4KLQkJCQkJCUFmdGVyIGhhdmluZyAgICAgIHwKLXwgICAgICAgICAgICAgICAgIGNhbGxlZCB1cCB0aGlzIGZ1bmN0aW9uIHdpdGggbWVtb3J5IG9uLHRoZSBvdXRwdXQgeW91IGhhdmUgcHJldmlvdXNseXwKLXwgICAgICAgICAgICAgICAgICAgICBhY3RpdmF0ZWQgd2l0aCB0aGUgZnVuY3Rpb24gYXJlIG5vdCByZXNldAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhb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dE1lbW9yeUVuYWJsZWQgPSAxOwotCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ2xlYXIgdGhlIG91dHB1dCBtZW1vcnkgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQlkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19EaWdpdGFsSU9JbmZvLmR3X091dHB1dE1lbW9yeSA9IDA7Ci0JCX0gZWxzZQkJLyogIElmIG1lbW9yeSBvZmYgKi8KLQkJewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogU2V0IHRoZSBvdXRwdXQgbWVtb3J5IG9mZiAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19EaWdpdGFsSU9JbmZvLmJfT3V0cHV0TWVtb3J5RW5hYmxlZCA9IDA7Ci0JCX0KLQkJYnJlYWs7Ci0KLQljYXNlIEFQQ0kxNzEwX0RJR0lPX0lOSVQ6Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBkaWdpdGFsIEkvTyBjb3VudGVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgotCQkJCTB4RkZGRjAwMDBVTCkgPT0gQVBDSTE3MTBfRElHSVRBTF9JTykgewotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIGJpLWRpcmVjdGlvbmFsIGNoYW5uZWwgQSBjb25maWd1cmF0aW9uICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKChiX0NoYW5uZWxBTW9kZSA9PSAwKSB8fCAoYl9DaGFubmVsQU1vZGUgPT0gMSkpIHsKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgdGhlIGJpLWRpcmVjdGlvbmFsIGNoYW5uZWwgQiBjb25maWd1cmF0aW9uICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCWlmICgoYl9DaGFubmVsQk1vZGUgPT0gMCkKLQkJCQkJfHwgKGJfQ2hhbm5lbEJNb2RlID09IDEpKSB7Ci0JCQkJCWRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJCXNfRGlnaXRhbElPSW5mby5iX0RpZ2l0YWxJbml0ID0KLQkJCQkJCTE7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFNhdmUgY2hhbm5lbCBBIGNvbmZpZ3VyYXRpb24gKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQkJc19EaWdpdGFsSU9JbmZvLgotCQkJCQkJYl9DaGFubmVsQU1vZGUgPSBiX0NoYW5uZWxBTW9kZTsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogU2F2ZSBjaGFubmVsIEIgY29uZmlndXJhdGlvbiAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJCQlzX0RpZ2l0YWxJT0luZm8uCi0JCQkJCQliX0NoYW5uZWxCTW9kZSA9IGJfQ2hhbm5lbEJNb2RlOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBTZXQgdGhlIGNoYW5uZWwgQSBhbmQgQiBjb25maWd1cmF0aW9uICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWR3X1dyaXRlQ29uZmlnID0KLQkJCQkJCSh1bnNpZ25lZCBpbnQpIChiX0NoYW5uZWxBTW9kZSB8Ci0JCQkJCQkoYl9DaGFubmVsQk1vZGUgKiAyKSk7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBXcml0ZSB0aGUgY29uZmlndXJhdGlvbiAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJb3V0bChkd19Xcml0ZUNvbmZpZywKLQkJCQkJCWRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQkJCXVpX0FkZHJlc3MgKyA0ICsKLQkJCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKLQotCQkJCX0gZWxzZSB7Ci0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogQmktZGlyZWN0aW9uYWwgY2hhbm5lbCBCIGNvbmZpZ3VyYXRpb24gZXJyb3IgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQlEUFJJTlRLKCJCaS1kaXJlY3Rpb25hbCBjaGFubmVsIEIgY29uZmlndXJhdGlvbiBlcnJvclxuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9Ci0KLQkJCX0gZWxzZSB7Ci0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBCaS1kaXJlY3Rpb25hbCBjaGFubmVsIEEgY29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LS0tLS0tLS0tLS0tLSsKLQotfElOVCBpX0FQQ0kxNzEwX0luc25SZWFkRGlnaXRhbElPQ2hsVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldixjb21lZGlfc3ViZGV2aWNlCi0qcywJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkKLQotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogUmVhZCB0aGUgc3RhdHVzIGZyb20gc2VsZWN0ZWQgZGlnaXRhbCBJL08gZGlnaXRhbCBpbnB1dHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9JbnB1dENoYW5uZWwpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18Ci0KLQotfAotfCAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgQ1JfQVJFRihjaGFuc3BlYykgICAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICB8Ci18ICB1bnNpZ25lZCBjaGFyXyBiX0lucHV0Q2hhbm5lbCBDUl9DSEFOKGNoYW5zcGVjKSAgICAgICAgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0ICggMCB0byA2KSAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgQyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5lbCBEICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBDaGFubmVsIEUgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyA6IENoYW5uZWwgRiAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0IDogQ2hhbm5lbCBHICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgOiBDaGFubmVsIEEgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiA6IENoYW5uZWwgQgotCi0KLQl8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgkJCQkJIGRhdGFbMF0gICA6IERpZ2l0YWwgaW5wdXQgY2hhbm5lbCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ2hhbm5sZSBpcyBub3QgYWN0aXZlfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDaGFubmxlIGlzIGFjdGl2ZSAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogVGhlIG1vZHVsZSBwYXJhbWV0ZXIgaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIGRpZ2l0YWwgSS9PIG1vZHVsZSAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTQ6IFRoZSBzZWxlY3RlZCBkaWdpdGFsIEkvTyBkaWdpdGFsIGlucHV0IGlzIHdyb25nICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNTogRGlnaXRhbCBJL08gbm90IGluaXRpYWxpc2VkICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBUaGUgZGlnaXRhbCBjaGFubmVsIEEgaXMgdXNlZCBmb3Igb3V0cHV0ICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTc6IFRoZSBkaWdpdGFsIGNoYW5uZWwgQiBpcyB1c2VkIGZvciBvdXRwdXQgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi0KLS8qIF9JTlRfICAgaV9BUENJMTcxMF9SZWFkRGlnaXRhbElPQ2hsVmFs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l9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBkaWdpdGFsIEkvTyBjb3VudGVyICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgotCQkJCTB4RkZGRjAwMDBVTCkgPT0gQVBDSTE3MTBfRElHSVRBTF9JTykgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IHRoZSBkaWdpdGFsIGltbnB1dCBjaGFubmVsIG51bWJlciAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChiX0lucHV0Q2hhbm5lbCA8PSA2KSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IGlmIHRoZSBkaWdpdGFsIEkvTyBtb2R1bGUgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJc19EaWdpdGFsSU9JbmZvLmJfRGlnaXRhbEluaXQgPT0gMSkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRlc3QgaWYgY2hhbm5lbCBBIG9yIGNoYW5uZWwgQiAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJaWYgKGJfSW5wdXRDaGFubmVsID4gNCkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgaWYgY2hhbm5lbCBBICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoYl9JbnB1dENoYW5uZWwgPT0gNSkgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgdGhlIGNoYW5uZWwgQSBtb2RlICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlpZiAoZGV2cHJpdi0+Ci0JCQkJCQkJCXNfTW9kdWxlSW5mbwotCQkJCQkJCQlbYl9Nb2R1bE5icl0uCi0JCQkJCQkJCXNfRGlnaXRhbElPSW5mby4KLQkJCQkJCQkJYl9DaGFubmVsQU1vZGUKLQkJCQkJCQkJIT0gMCkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFRoZSBkaWdpdGFsIGNoYW5uZWwgQSBpcyB1c2VkIGZvciBvdXRwdXQgKi8KLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQotCQkJCQkJCQkJLTY7Ci0JCQkJCQkJfQotCQkJCQkJfQkvKiAgaWYgKGJfSW5wdXRDaGFubmVsID09IDUpICovCi0JCQkJCQllbHNlIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBUZXN0IHRoZSBjaGFubmVsIEIgbW9kZSAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJaWYgKGRldnByaXYtPgotCQkJCQkJCQlzX01vZHVsZUluZm8KLQkJCQkJCQkJW2JfTW9kdWxOYnJdLgotCQkJCQkJCQlzX0RpZ2l0YWxJT0luZm8uCi0JCQkJCQkJCW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GFzc2VkIHdpdGggdGhlICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlciBiX0NoYW5uZWwuIFNldHRpbmcgYW4gb3V0cHV0IG1lYW5zIHNldHRpbmcgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgYW4gb3VwdXQgaGlnaC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAoYXJlZiApICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX091dHB1dENoYW5uZWwgKENSX0NIQU4pIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsICgwIHRvIDIpICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEggICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgQSAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogQ2hhbm5lbCBCICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0yOiBUaGUgbW9kdWxlIHBhcmFtZXRlciBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgZGlnaXRhbCBJL08gbW9kdWxlICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogVGhlIHNlbGVjdGVkIGRpZ2l0YWwgb3V0cHV0IGlzIHdyb25nICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC01OiBkaWdpdGFsIEkvTyBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICIgaV9BUENJMTcxMF9Jbml0RGlnaXRhbElPIiAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNjogVGhlIGRpZ2l0YWwgY2hhbm5lbCBBIGlzIHVzZWQgZm9yIGlucHV0ICAgICAgICAgICAgIHw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E5iciwgYl9PdXRwdXRDaGFubmVsOwotCWlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOwotCWJfTW9kdWxOYnIgPSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX091dHB1dENoYW5uZWwgPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgZGlnaXRhbCBJL08gY291bnRlciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0RJR0lUQUxfSU8pIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgaWYgdGhlIGRpZ2l0YWwgSS9PIG1vZHVsZSBpbml0aWFsaXNlZCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCXNfRGlnaXRhbElPSW5mby5iX0RpZ2l0YWxJbml0ID09IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCB0aGUgZGlnaXRhbCBvdXRwdXQgY2hhbm5lbCBudW1iZXIgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlzd2l0Y2ggKGJfT3V0cHV0Q2hhbm5lbCkgewotCQkgICAgLyoqKioqKioqKioqKiovCi0JCQkJCS8qIENoYW5uZWwgSCAqLwotCQkgICAgLyoqKioqKioqKioqKiovCi0KLQkJCQljYXNlIDA6Ci0JCQkJCWJyZWFrOwotCi0JCSAgICAvKioqKioqKioqKioqKi8KLQkJCQkJLyogQ2hhbm5lbCBBICovCi0JCSAgICAvKioqKioqKioqKioqKi8KLQotCQkJCWNhc2UgMToKLQkJCQkJaWYgKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJCXNfRGlnaXRhbElPSW5mby4KLQkJCQkJCWJfQ2hhbm5lbEFNb2RlICE9IDEpIHsKLQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRoZSBkaWdpdGFsIGNoYW5uZWwgQSBpcyB1c2VkIGZvciBpbnB1dCAqLwotCQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0KLQkJCQkJYnJlYWs7Ci0KLQkJICAgIC8qKioqKioqKioqKioqLwotCQkJCQkvKiBDaGFubmVsIEIgKi8KLQkJICAgIC8qKioqKioqKioqKioqLwotCi0JCQkJY2FzZSAyOgotCQkJCQlpZiAoZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQkJc19EaWdpdGFsSU9JbmZvLgotCQkJCQkJYl9DaGFubmVsQk1vZGUgIT0gMSkgewotCQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGhlIGRpZ2l0YWwgY2hhbm5lbCBCIGlzIHVzZWQgZm9yIGlucHV0ICovCi0JCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNzsKLQkJCQkJfQotCQkJCQlicmVhazsKLQotCQkJCWRlZmF1bHQ6Ci0JCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRoZSBzZWxlY3RlZCBkaWdpdGFsIG91dHB1dCBpcyB3cm9uZyAqLwotCQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCQkJYnJlYWs7Ci0JCQkJfQotCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCBpZiBlcnJvciBvY2N1ciAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKGlfUmV0dXJuVmFsdWUgPj0gMCkgewotCi0JCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IGlmIHNldCBjaGFubmVsIE9OICAgICAgICAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJaWYgKGRhdGFbMF0pIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IGlmIG91dHB1dCBtZW1vcnkgZW5hYmxlZCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJaWYgKGRldnByaXYtPgotCQkJCQkJCXNfTW9kdWxlSW5mbwotCQkJCQkJCVtiX01vZHVsTmJyXS4KLQkJCQkJCQlzX0RpZ2l0YWxJT0luZm8uCi0JCQkJCQkJYl9PdXRwdXRNZW1vcnlFbmFibGVkID09Ci0JCQkJCQkJMSkgewotCQkJCQkJCWR3X1dyaXRlVmFs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AgICAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICBpZiB3cml0ZSB0aGVuIGluZGljYXRlIE9OIG9yIE9GRgotCi18ICAgICAgICAgICAgICAgICAgICAgICBpZiByZWFkIDogZGF0YVsxXSB3aWxsIHJldHVybiBwb3J0IHN0YXR1cy4KLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOgotCi18ICAgICAgICAgICAgICAgIElOUFVUIDoKLQotCQkJCQkgIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0yOiBUaGUgbW9kdWxlIHBhcmFtZXRlciBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgZGlnaXRhbCBJL08gbW9kdWxlICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogRGlnaXRhbCBJL08gbm90IGluaXRpYWxpc2VkCi0KLQkJCQlPVVRQVVQ6CSAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IFRoZSBtb2R1bGUgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSBkaWdpdGFsIEkvTyBtb2R1bGUgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBPdXRwdXQgdmFsdWUgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IGRpZ2l0YWwgSS9PIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgIiBpX0FQQ0kxNzEwX0luaXREaWdpdGFsSU8iICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBUaGUgZGlnaXRhbCBjaGFubmVsIEEgaXMgdXNlZCBmb3IgaW5wdXQgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTc6IFRoZSBkaWdpdGFsIGNoYW5uZWwgQiBpcyB1c2VkIGZvciBpbnB1dAotCQkJCQktODogRGlnaXRhbCBPdXRwdXQgTWVtb3J5IE9GRi4gICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICBVc2UgcHJldmlvdXNseSB0aGUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX1NldERpZ2l0YWxJT01lbW9yeU9uIi4gICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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ci0JCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCQl9Ci0KLQkJYnJlYWs7Ci0KLQljYXNlIEFQQ0kxNzEwX09VVFBVVDoKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIGRpZ2l0YWwgSS9PIGNvdW50ZXIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkJMHhGRkZGMDAwMFVMKSA9PSBBUENJMTcxMF9ESUdJVEFMX0lPKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCBpZiB0aGUgZGlnaXRhbCBJL08gbW9kdWxlIGluaXRpYWxpc2VkICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX0RpZ2l0YWxJT0luZm8uYl9EaWdpdGFsSW5pdCA9PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRlc3QgdGhlIHBvcnQgdmFsdWUgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlpZiAoYl9Qb3J0VmFsdWUgPD0gNykgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCB0aGUgZGlnaXRhbCBvdXRwdXQgY2hhbm5lbCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IGlmIGNoYW5uZWwgQSB1c2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmICgoYl9Qb3J0VmFsdWUgJiAyKSA9PSAyKSB7Ci0JCQkJCQkJaWYgKGRldnByaXYtPgotCQkJCQkJCQlzX01vZHVsZUluZm8KLQkJCQkJCQkJW2JfTW9kdWxOYnJdLgotCQkJCQkJCQlzX0RpZ2l0YWxJT0luZm8uCi0JCQkJCQkJCWJfQ2hhbm5lbEFNb2RlCi0JCQkJCQkJCSE9IDEpIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFRoZSBkaWdpdGFsIGNoYW5uZWwgQSBpcyB1c2VkIGZvciBpbnB1dCAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCS02OwotCQkJCQkJCX0KLQkJCQkJCX0JLyogIGlmICgoYl9Qb3J0VmFsdWUgJiAyKSA9PSAyKSAqLwotCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IGlmIGNoYW5uZWwgQiB1c2VkICovCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmICgoYl9Qb3J0VmFsdWUgJiA0KSA9PSA0KSB7Ci0JCQkJCQkJaWYgKGRldnByaXYtPgotCQkJCQkJCQlzX01vZHVsZUluZm8KLQkJCQkJCQkJW2JfTW9kdWxOYnJdLgotCQkJCQkJCQlzX0RpZ2l0YWxJT0luZm8uCi0JCQkJCQkJCWJfQ2hhbm5lbEJNb2RlCi0JCQkJCQkJCSE9IDEpIHsKLQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFRoZSBkaWdpdGFsIGNoYW5uZWwgQiBpcyB1c2VkIGZvciBpbnB1dCAqLwotCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCS03OwotCQkJCQkJCX0KLQkJCQkJCX0JLyogIGlmICgoYl9Qb3J0VmFsdWUgJiA0KSA9PSA0KSAqLwotCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IGlmIGVycm9yIG9jY3VyICovCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmIChpX1JldHVyblZhbHVlID49IDApIHsKLQotCQkJCQkJCS8qIGlmKGRhdGFbMV0pIHsgKi8KLQotCQkJCQkJCXN3aXRjaCAoYl9Qb3J0T25PRkYpIHsKLQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJLyogVGVzdCBpZiBzZXQgUG9ydCBPTiAgICAgICAgICAgICAgICAgICAqLwotCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJY2FzZSBBUENJMTcxMF9PTjoKLQotCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBUZXN0I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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVUERBVEVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgIERhdGUgICB8ICAgQXV0aG9yICB8ICAgICAgICAgIERlc2NyaXB0aW9uIG9mIHVwZGF0ZXMgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfC0tLS0tLS0tLS18LS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfAotICB8IDA4LzA1LzAwIHwgR3Vpbm90IEMgIHwgLSAwNDAwLzAyMjggQWxsIEZ1bmN0aW9uIGluIFJJTkcgMCAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgIGF2YWlsYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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DUFRfRElTQUJMRUNPTVBBUkVMT0dJQwkJNDA3Ci0jZGVmaW5lIEFQQ0kxNzEwX0lOQ0NQVF9FTkFCTEVGUkVRVUVOQ1lNRUFTVVJFTUVOVAk0MDgKLSNkZWZpbmUgQVBDSTE3MTBfSU5DQ1BUX0RJU0FCTEVGUkVRVUVOQ1lNRUFTVVJFTUVOVAk0MDkKLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfSW5pdENvdW50ZXIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9Db3VudGVyUmFuZ2UsICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX0ZpcnN0Q291bnRlck1vZHVzLCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgIGJfRmlyc3RDb3VudGVyT3B0aW9uLCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9TZWNvbmRDb3VudGVyTW9kdXMsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX1NlY29uZENvdW50ZXJPcHRpb24pICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZSB0aGUgY291bnRlciBvcGVyYXRpbmcgbW9kZSBmcm9tIHNlbGVjdGVkICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgbW9kdWxlIChiX01vZHVsTmJyKS4gWW91IG11c3QgY2FsbGluZyB0aGlzIGZ1bmN0aW9uIGJlIHwKLXwgICAgICAgICAgICAgICAgICAgICBmb3IgeW91IGNhbGwgYW55IG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgIENvdW50ZXIgcmFuZ2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rIHwKLXwgfCBQYXJhbWV0ZXIgICAgICAgUGFzc2VkIHZhbHVlICAgICAgIHwgICAgICAgIERlc2NyaXB0aW9uICAgICAgICAgICAgICAgIHwgfAotfCB8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCB8Ci18IHxiX01vZHVsTmJyICAgQVBDSTE3MTBfMTZCSVRfQ09VTlRFUiB8ICBUaGUgbW9kdWxlIGlzIGNvbmZpZ3VyZWQgZm9yICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIHR3byAxNi1iaXQgY291bnRlci4gICAgICAgICAgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgLSBiX0ZpcnN0Q291bnRlck1vZHVzIGFuZCAgICAgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgIGJfRmlyc3RDb3VudGVyT3B0aW9uICAgICAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgY29uZmlndXJlIHRoZSBmaXJzdCAxNiBiaXQgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBjb3VudGVyLiAgICAgICAgICAgICAgICAgICAgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAtIGJfU2Vjb25kQ291bnRlck1vZHVzIGFuZCAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgYl9TZWNvbmRDb3VudGVyT3B0aW9uICAgICAgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBjb25maWd1cmUgdGhlIHNlY29uZCAxNiBiaXQgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgIGNvdW50ZXIuICAgICAgICAgICAgICAgICAgICAgICB8IHwKLXwgfC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwgfAotfCB8Yl9Nb2R1bE5iciAgIEFQQ0kxNzEwXzMyQklUX0NPVU5URVIgfCAgVGhlIG1vZHVsZSBpcyBjb25maWd1cmVkIGZvciBvbmUgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAzMi1iaXQgY291bnRlci4gICAgICAgICAgICAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIC0gYl9GaXJzdENvdW50ZXJNb2R1cyBhbmQgICAgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBiX0ZpcnN0Q291bnRlck9wdGlvbiAgICAgICAgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgIGNvbmZpZ3VyZSB0aGUgMzIgYml0IGNvdW50ZXIuICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIC0gYl9TZWNvbmRDb3VudGVyTW9kdXMgYW5kICAgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBiX1NlY29uZENvdW50ZXJPcHRpb24gICAgICAgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgIGFyZSBub3QgdXNlZCBhbmQgaGF2ZSBubyAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgaW1wb3J0YW5jZS4gICAgICAgICAgICAgICAgICAgIHwgfAotfCArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgQ291bnRlciBvcGVyYXRpbmcgbW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgKy0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgfAotfCB8ICAgIFBhcmFtZXRlciAgICAgICB8ICAgICBQYXNzZWQgdmFsdWUgICAgICAgIHwgICAgRGVzY3JpcHRpb24gICAgICAgICAgfCB8Ci18IHwtLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18IHwKLXwgfGJfRmlyc3RDb3VudGVyTW9kdXMgfCBBUENJMTcxMF9RVUFEUlVQTEVfTU9ERSB8IEluIHRoZSBxdWFkcnVwbGUgbW9kZSwgIHwgfAotfCB8ICAgICAgIG9yICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgdGhlIGVkZ2UgYW5hbHlzaXMgICAgICAgfCB8Ci18IHxiX1NlY29uZENvdW50ZXJNb2R1c3wgICAgICAgICAgICAgICAgICAgICAgICAgfCBjaXJjdWl0IGdlbmVyYXRlcyBhICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IGNvdW50aW5nIHB1bHNlIGZyb20gICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgZWFjaCBlZGdlIG9mIDIgc2lnbmFscyAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCB3aGljaCBhcmUgcGhhc2Ugc2hpZnRlZCB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IGluIHJlbGF0aW9uIHRvIGVhY2ggICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgb3RoZXIuICAgICAgICAgICAgICAgICAgfCB8Ci18IHwtLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18IHwKLXwgfGJfRmlyc3RDb3VudGVyTW9kdXMgfCAgIEFQQ0kxNzEwX0RPVUJMRV9NT0RFICB8IEZ1bmN0aW9ucyBpbiB0aGUgc2FtZSAgIHwgfAotfCB8ICAgICAgIG9yICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgd2F5IGFzIHRoZSBxdWFkcnVwbGUgICAgfCB8Ci18IHxiX1NlY29uZENvdW50ZXJNb2R1c3wgICAgICAgICAgICAgICAgICAgICAgICAgfCBtb2RlLCBleGNlcHQgdGhhdCBvbmx5ICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IHR3byBvZiB0aGUgZm91ciBlZGdlcyAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgYXJlIGFuYWx5c2VkIHBlciAgICAgICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBwZXJpb2QgICAgICAgICAgICAgICAgICB8IHwKLXwgfC0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwgfAotfCB8Yl9GaXJzdENvdW50ZXJNb2R1cyB8ICAgQVBDSTE3MTBfU0lNUExFX01PREUgIHwgRnVuY3Rpb25zIGluIHRoZSBzYW1lICAgfCB8Ci18IHwgICAgICAgb3IgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCB3YXkgYXMgdGhlIHF1YWRydXBsZSAgICB8IHwKLXwgfGJfU2Vjb25kQ291bnRlck1vZHVzfCAgICAgICAgICAgICAgICAgICAgICAgICB8IG1vZGUsIGV4Y2VwdCB0aGF0IG9ubHkgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgb25lIG9mIHRoZSBmb3VyIGVkZ2VzICAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBpcyBhbmFseXNlZCBwZXIgICAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IHBlcmlvZC4gICAgICAgICAgICAgICAgIHwgfAotfCB8LS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCB8Ci18IHxiX0ZpcnN0Q291bnRlck1vZHVzIHwgICBBUENJMTcxMF9ESVJFQ1RfTU9ERSAgfCBJbiB0aGUgZGlyZWN0IG1vZGUgdGhlICB8IHwKLXwgfCAgICAgICBvciAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IGJvdGggZWRnZSBhbmFseXNpcyAgICAgIHwgfAotfCB8Yl9TZWNvbmRDb3VudGVyTW9kdXN8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgY2lyY3VpdHMgYXJlIGluYWN0aXZlLiAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBUaGUgaW5wdXRzIEEsIEIgaW4gdGhlICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IDMyLWJpdCBtb2RlIG9yIEEsIEIgYW5kIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgQywgRCBpbiB0aGUgMTYtYml0IG1vZGUgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCByZXByZXNlbnQsIGVhY2gsIG9uZSAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IGNsb2NrIHB1bHNlIGdhdGUgY2lyY3VpdHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgVGhlcmUgYnkgZnJlcXVlbmN5IGFuZCAgfCB8Ci18IHwgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBwdWxzZSBkdXJhdGlvbiAgICAgICAgICB8IHwKLXwgfCAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IG1lYXN1cmVtZW50cyBjYW4gYmUgICAgIHwgfAotfCB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgcGVyZm9ybWVkLiAgICAgICAgICAgICAgfCB8Ci18ICstLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgIElNUE9SVEFOVCEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgSWYgeW91IGhhdmUgY29uZmlndXJlZCB0aGUgbW9kdWxlIGZvciB0d28gMTYtYml0IGNvdW50ZXIsIGEgbWl4ZWQgICAgfAotfCAgICAgICBtb2RlIHdpdGggYSBjb3VudGVyIGluIHF1YWRydXBsZS9kb3VibGUvc2luZ2xlIG1vZGUgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgIGFuZCB0aGUgb3RoZXIgY291bnRlciBpbiBkaXJlY3QgbW9kZSBpcyBub3QgcG9zc2libGUhICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgQ291bnRlciBvcGVyYXRpbmcgb3B0aW9uIGZvciBxdWFkcnVwbGUvZG91YmxlL3NpbXBsZSBtb2RlICAgICAgICAgIHwKLXwgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tK3wKLXwgfCAgICAgICBQYXJhbWV0ZXIgICAgICB8ICAgICBQYXNzZWQgdmFsdWUgICAgICAgIHwgIERlc2NyaXB0aW9uICAgICAgICAgICB8fAotfCB8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXx8Ci18IHxiX0ZpcnN0Q291bnRlck9wdGlvbiAgfCBBUENJMTcxMF9IWVNURVJFU0lTX09OICB8IEluIGJvdGggZWRnZSBhbmFseXNpcyAgfHwKLXwgfCAgICAgICAgb3IgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgY2lyY3VpdHMgaXMgYXZhaWxhYmxlICB8fAotfCB8Yl9TZWNvbmRDb3VudGVyT3B0aW9uIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBvbmUgaHlzdGVyZXNpcyBjaXJjdWl0Lnx8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IEl0IHN1cHByZXNzZXMgZWFjaCAgICAgfHwKLXwgfCAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgdGltZSB0aGUgZmlyc3QgY291bnRpbmd8fAotfCB8ICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBwdWxzZSBhZnRlciBhIGNoYW5nZSAgIHx8Ci18IHwgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IG9mIHJvdGF0aW9uLiAgICAgICAgICAgfHwKLXwgfC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18fAotfCB8Yl9GaXJzdENvdW50ZXJPcHRpb24gIHwgQVBDSTE3MTBfSFlTVEVSRVNJU19PRkYgfCBUaGUgZmlyc3QgY291bnRpbmcgICAgIHx8Ci18IHwgICAgICAgb3IgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8IHB1bHNlIGlzIG5vdCBzdXBwcmVzcyAgfHwKLXwgfGJfU2Vjb25kQ291bnRlck9wdGlvbiB8ICAgICAgICAgICAgICAgICAgICAgICAgIHwgYWZ0ZXIgYSBjaGFuZ2Ugb2YgICAgICB8fAotfCB8ICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCByb3RhdGlvbi4gICAgICAgICAgICAgIHx8Ci18ICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tK3wKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgIElNUE9SVEFOVCEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgVGhpcyBvcHRpb24gYXJlIG9ubHkgYXZhaWJsZSBpZiB5b3UgaGF2ZSBzZWxlY3RlZCB0aGUgZGlyZWN0IG1vZGUuICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICBDb3VudGVyIG9wZXJhdGluZyBvcHRpb24gZm9yIGRpcmVjdCBtb2RlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgIC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YWNoIGNvdW50aW5nIHB1bHNlICAgICAgICB8IHwKLXwgfGJfU2Vjb25kQ291bnRlck9wdGlvbiB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgfAotfCArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfQ291bnRlclJhbmdlICAgICAgICA6IFNlbGVjdGlvbiBmb3JtIGNvdW50ZXIgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ZpcnN0Q291bnRlck1vZHVzICAgOiBGaXJzdCBjb3VudGVyIG9wZXJhdGluZyAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGUuICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9GaXJzdENvdW50ZXJPcHRpb24gIDogRmlyc3QgY291bnRlciAgb3B0aW9uLiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1NlY29uZENvdW50ZXJNb2R1cyAgOiBTZWNvbmQgY291bnRlciBvcGVyYXRpbmcgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGUuICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TZWNvbmRDb3VudGVyT3B0aW9uIDogU2Vjb25kIGNvdW50ZXIgIG9wdGlvbi4gIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogVGhlIG1vZHVsZSBpcyBub3QgYSBjb3VudG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dW50ZXJPcHRpb24gPT0gQVBDSTE3MTBfREVDUkVNRU5UKSkgfHwgKGJfU2Vjb25kQ291bnRlck1vZHVzICE9IEFQQ0kxNzEwX0RJUkVDVF9NT0RFICYmIChiX1NlY29uZENvdW50ZXJPcHRpb24gPT0gQVBDSTE3MTBfSFlTVEVSRVNJU19PTiB8fCBiX1NlY29uZENvdW50ZXJPcHRpb24gPT0gQVBDSTE3MTBfSFlTVEVSRVNJU19PRkYpKSkgewotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCTA7Ci0JCQkJCQkJfSBlbHNlIHsKLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJLyogVGhlIHNlbGVjdGVkIHNlY29uZCBjb3VudGVyIG9wZXJhdGluZyBvcHRpb24gaXMgd3JvbmcgKi8KLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgc2Vjb25kIGNvdW50ZXIgb3BlcmF0aW5nIG9wdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQotCQkJCQkJCQkJLTc7Ci0JCQkJCQkJfQotCQkJCQkJfSBlbHNlIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogVGhlIHNlbGVjdGVkIHNlY29uZCBjb3VudGVyIG9wZXJhdGluZyBtb2RlIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIHNlY29uZCBjb3VudGVyIG9wZXJhdGluZyBtb2RlIGlzIHdyb25nXG4iKTsKLQkJCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCQl9Ci0JCQkJCX0KLQkJCQl9IGVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUaGUgc2VsZWN0ZWQgZmlyc3QgY291bnRlciBvcGVyYXRpbmcgb3B0aW9uIGlzIHdyb25nICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIGZpcnN0IGNvdW50ZXIgb3BlcmF0aW5nIG9wdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUaGUgc2VsZWN0ZWQgZmlyc3QgY291bnRlciBvcGVyYXRpbmcgbW9kZSBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgZmlyc3QgY291bnRlciBvcGVyYXRpbmcgbW9kZSBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUaGUgc2VsZWN0ZWQgY291bnRlciByYW5nZSBpcyB3cm9uZyAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBzZWxlY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S0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogQSB0ZXN0IG1vZGUgaXMgaW50ZW5kZWQgZm9yIHRlc3RpbmcgdGhlIGNvbXBvbmVudCBhbmQgIHwKLXwgICAgICAgICAgICAgICAgICAgICB0aGUgY29ubmVjdGVkIHBlcmlwaGVyeS4gQWxsIHRoZSA4LWJpdCBjb3VudGVyIGNoYWlucyAgfAotfCAgICAgICAgICAgICAgICAgICAgIGFyZSBvcGVyYXRlZCBpbnRlcm5hbGx5IGFzIGRvd24gY291bnRlcnMuICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgSW5kZXBlbmRlbnRseSBmcm9tIHRoZSBleHRlcm5hbCBzaWduYWxzLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBhbGwgdGhlIGZvdXIgOC1iaXQgY291bnRlciBjaGFpbnMgYXJlIGRlY3JlbWVudGVkIGluICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHBhcmFsbGVsIGJ5IGVhY2ggbmVnYXRpdmUgY2xvY2sgcHVsc2UgZWRnZSBvZiBDTEtYLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgIENvdW50ZXIgYXV0byB0ZXN0IGNvbmNsdXNpb24gICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgIHwgcGJfVGVzdFN0YXR1cyAgIHwgICAgRXJyb3IgZGVzY3JpcHRpb24gICAgICAgIHwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgfCAgICAgbWFzayAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICB8LS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18ICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgIHwgICAgMDAwMCAgICAgICAgIHwgICAgIE5vIGVycm9yIGRldGVjdGVkICAgICAgIHwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgfC0tLS0tLS0tLS0tLS0tLS0tfC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICB8ICAgIDAwMDEgICAgICAgICB8IEVycm9yIGRldGVjdGVkIG9mIGNvdW50ZXIgMCB8ICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgIHwtLS0tLS0tLS0tLS0tLS0tLXwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgfCAgICAwMDEwICAgICAgICAgfCBFcnJvciBkZXRlY3RlZCBvZiBjb3VudGVyIDEgfCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICB8LS0tLS0tLS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18ICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgIHwgICAgMDEwMCAgICAgICAgIHwgRXJyb3IgZGV0ZWN0ZWQgb2YgY291bnRlciAyIHwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgfC0tLS0tLS0tLS0tLS0tLS0tfC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICB8ICAgIDEwMDAgICAgICAgICB8IEVycm9yIGRldGVj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S0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Jbml0SW5kZXggKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1JlZmVyZW5jZUFjdGlvbiwgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW5kZXhPcGVyYXRpb24sICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9BdXRvTW9kZSwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSkgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBJbml0aWFsaXNlIHRoZSBpbmRleCBjb3JyZXNwb25kaW5nIHRvIHRoZSBzZWxlY3RlZCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuIElmIGEgSU5ERVggZmxhZyBvY2N1ciwgeW91IGhhdmUgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGhlIHBvc3NpYmlsaXR5IHRvIGNsZWFyIHRoZSAzMi1CaXQgY291bnRlciBvciB0byBsYXRjaHwKLXwgICAgICAgICAgICAgICAgICAgICB0aGUgY3VycmVudCAzMi1CaXQgdmFsdWUgaW4gdG8gdGhlIGZpcnN0IGxhdGNoICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyLiBUaGUgYl9JbmRleE9wZXJhdGlvbiBwYXJhbWV0ZXIgZ2l2ZSB0aGUgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgcG9zc2liaWxpdHkgdG8gY2hvaWNlIHRoZSBJTkRFWCBhY3Rpb24uICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJZiB5b3UgaGF2ZSBlbmFibGVkIHRoZSBhdXRvbWF0aWMgbW9kZSwgZWFjaCBJTkRFWCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiBpcyBjbGVhcmVkIGF1dG9tYXRpY2FsbHksIGVsc2UgeW91IG11c3QgcmVhZCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGhlIGluZGV4IHN0YXR1cyAoImlfQVBDSTE3MTBfUmVhZEluZGV4U3RhdHVzIikgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBhZnRlciBlYWNoIElOREVYIGFjdGlvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXggYWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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fAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9SZWZlcmVuY2VBY3Rpb24gOiBEZXRlcm1pbmUgaWYgdGhlIHJlZmVyZW5jZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11c3Qgc2V0IG9yIG5vIGZvciB0aGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXB0YW5jZSBmcm9tIGluZGV4ICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9FTkFCTEUgOiAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlZmVyZW5jZSBtdXN0IGJlIHNldCBmb3IgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXB0ZWQgdGhlIGluZGV4ICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9ESVNBQkxFIDogICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlZmVyZW5jZSBoYXZlIG5vdCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1wb3J0YW5jZSAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9JbmRleE9wZXJhdGlvbiAgOiBJbmRleCBvcGVyYXRpbmcgbW9kZS4gICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlZSB0YWJsZS4gICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfQXV0b01vZGUgICAgICAgIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRvbWF0aWMgaW5kZXggcmVzZXQuICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0VOQUJMRSA6ICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIGF1dG9tYXRpYyBtb2RlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9ESVNBQkxFIDogICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGlzYWJsZSB0aGUgYXV0b21hdGljIG1vZGUgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQuICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0VOQUJMRSA6ICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHRoZSBpbnRlcnJ1cHQgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9ESVNBQkxFIDogICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERpc2FibGUgdGhlIGludGVycnVwdCAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNCAgVGhlIHJlZmVyZW5jZSBhY3Rpb24gcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBUaGUgaW5kZXggb3BlcmF0aW5nIG1vZGUgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTY6IFRoZSBhdXRvIG1vZGUgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNzogSW50ZXJydXB0IHBhcmFtZXRlciBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC04OiBJbnRlcnJ1cHQgZnVuY3Rpb24gbm90IGluaXRpYWxpc2VkLiAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgIFNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9TZXRCb2FyZEludFJvdXRpbmVYIiAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9Jbml0SW5kZXgoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQl1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJdW5zaWduZWQgY2hhciBiX1JlZmVyZW5jZUFjdGlvbiwKLQkJCQl1bnNpZ25lZCBjaGFyIGJfSW5kZXhPcGVyYXRpb24sCi0JCQkJdW5zaWduZWQgY2hhciBiX0F1dG9Nb2RlLAotCQkJCXVuc2lnbmVkIGNoYXIgYl9JbnRlcnJ1cHRFbmFibGUpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIHJlZmVyZW5jZSBwYXJhbWV0ZXIgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChiX1JlZmVyZW5jZUFjdGlvbiA9PSBBUENJMTcxMF9FTkFCTEUgfHwKLQkJCQliX1JlZmVyZW5jZUFjdGlvbiA9PSBBUENJMTcxMF9ESVNBQkxFKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IHRoZSBpbmRleCBwYXJhbWV0ZXIgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqL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ioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIEludGVycnVwdCBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCURQUklOVEsoIkludGVycnVwdCBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNzsKLQkJCQkJCX0KLQkJCQkJfSBlbHNlIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUaGUgYXV0byBtb2RlIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJRFBSSU5USygiVGhlIGF1dG8gbW9kZSBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC02OwotCQkJCQl9Ci0JCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGhlIGluZGV4IG9wZXJhdGluZyBtb2RlIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCURQUklOVEsoIlRoZSBpbmRleCBvcGVyYXRpbmcgbW9kZSBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQkJCQlpX1JldHVyblZhbHVlID0gLTU7Ci0JCQkJfQotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRoZSByZWZlcmVuY2UgYWN0aW9uIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKio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gICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1JlZmVyZW5jZUxldmVsKSAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBJbml0aWFsaXNlIHRoZSByZWZlcmVuY2UgY29ycmVzcG9uZGluZyB0byB0aGUgc2VsZWN0ZWQgfAotfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVmZXJlbmNlIGxldmVsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgfCBiX1JlZmVyZW5jZUxldmVsICAgfCAgICAgICAgIE9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sLiAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBSZWZlcmVuY2UgbGV2ZWwgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5pdFJlZmVyZW5jZShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCSAgICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJICAgIHVuc2lnbmVkIGNoYXIgYl9SZWZlcmVuY2VMZXZlbCkKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgY291bnRlciBpbml0aWFsaXNlZCAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmIChkZXZwcml2LT4KLQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9Db3VudGVySW5pdCA9PSAxKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCB0aGUgcmVmZXJlbmNlIGxldmVsIHBhcmFtZXRlciAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGJfUmVmZXJlbmNlTGV2ZWwgPT0gMCB8fCBiX1JlZmVyZW5jZUxldmVsID09IDEpIHsKLQkJCQlpZiAoYl9SZWZlcmVuY2VMZXZlbCA9PSAxKSB7Ci0JCQkJCWRldnByaXYtPgotCQkJCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JC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Nb2R1bE5icikpOwotCi0JCQkJZGV2cHJpdi0+Ci0JCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JCQkJCXNfSW5pdEZsYWcuYl9SZWZlcmVuY2VJbml0ID0gMTsKLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogUmVmZXJlbmNlIGxldmVsIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiUmVmZXJlbmNlIGxldmVsIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFy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gPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IHRoZSBleHRlcm5hbCBzdHJvYmUgc2VsZWN0aW9uICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoYl9FeHRlcm5hbFN0cm9iZSA9PSAwIHx8IGJfRXh0ZXJuYWxTdHJvYmUgPT0gMSkgewotCQkgLyoqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IHRoZSBsZXZlbCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKi8KLQotCQkJCWlmICgoYl9FeHRlcm5hbFN0cm9iZUxldmVsID09IEFQQ0kxNzEwX0hJR0gpIHx8Ci0JCQkJCSgoYl9FeHRlcm5hbFN0cm9iZUxldmVsID09IEFQQ0kxNzEwX0xPVwotCQkJCQkJCSYmIChkZXZwcml2LT4KLQkJCQkJCQkJc19Cb2FyZEluZm9zLgotCQkJCQkJCQlkd19Nb2xkdWxlQ29uZmlndXJhdGlvbgotCQkJCQkJCQlbYl9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aWYgKGJfRXh0ZXJuYWxTdHJvYmUgPT0gMCB8fCBiX0V4dGVybmFsU3Ryb2JlID09IDEpICovCi0JCQllbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBFeHRlcm5hbCBzdHJvYmUgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJFeHRlcm5hbCBzdHJvYmUgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9CS8qICBpZiAoYl9FeHRlcm5hbFN0cm9iZSA9PSAwIHx8IGJfRXh0ZXJuYWxTdHJvYmUgPT0gMSkgKi8KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXR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fCAgICAgICAgICAgICAgICAgICAgIC0yOiBObyBjb3VudGVyIG1vZHVsZSBmb3VuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0JICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5pdENvbXBhcmVMb2dpYyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCSAgICAgICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJICAgICAgIHVuc2lnbmVkIGludCB1aV9Db21wYXJlVmFsdWUpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1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AgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfAkJCSAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgc2VsZWN0ZWQgUENJIGlucHV0IGNsb2NrIGlzIHdyb25nICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IFRpbWluZyB1bml0eSBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNjogQmFzZSB0aW1pbmcgc2VsZWN0aW9uIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgfAotfAkJICAgICAgLTc6IDQwTUh6IHF1YXJ0eiBub3Qgb24gYm9hcmQgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9Jbml0RnJlcXVlbmN5TWVhc3VyZW1lbnQoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJICAgICAgIHVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5iciwKLQkJCQkJICAgICAgIHVuc2lnbmVkIGNoYXIgYl9QQ0lJbnB1dENsb2NrLAotCQkJCQkgICAgICAgdW5zaWduZWQgY2hhciBiX1RpbWluZ1VuaXR5LAotCQkJCQkgICAgICAgdW5zaWduZWQgaW50IHVsX1RpbWluZ0ludGVydmFsLAotCQkJCQkgICAgICAgdW5zaWduZWQgaW50ICpwdWxfUmVhbFRpbWluZ0ludGVydmFsKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCXVuc2lnbmVkIGludCB1bF9UaW1lclZhbHVlID0gMDsKLQlkb3VibGUgZF9SZWFsVGltaW5nSW50ZXJ2YWw7Ci0JdW5zaWduZWQgaW50IGR3X1N0YXR1cyA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIFBDSSBidXMgY2xvY2sgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmICgoYl9QQ0lJbnB1dENsb2NrID09IEFQQ0kxNzEwXzMwTUhaKSB8fAotCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzNNSFopIHx8Ci0JCQkJKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF80ME1IWikpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCB0aGUgdGltaW5nIHVuaXQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoYl9UaW1pbmdVbml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1NTNVTCkpCi0JCQkJCQl8fCAoKGJfUENJSW5wdXRDbG9jayA9PQotCQkJCQkJCQlBUENJMTcxMF80ME1IWikKLQkJCQkJCQkmJiAoYl9UaW1pbmdVbml0eSA9PSAyKQotCQkJCQkJCSYmICh1bF9UaW1pbmdJbnRlcnZhbCA+PQotCQkJCQkJCQkxKQotCQkJCQkJCSYmICh1bF9UaW1pbmdJbnRlcnZhbCA8PQotCQkJCQkJCQk2VUwpKSkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IGlmIDQwTUh6IHVzZWQgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoYl9QQ0lJbnB1dENsb2NrID09Ci0JCQkJCQkJQVBDSTE3MTBfNDBNSFopIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBUZXN0IGlmIGZpcm13YXJlID49IFJldjEuNSAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJiAweEZGRkYpID49IDB4MzEzNSkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBUZXN0IGlmIDQwTUh6IHF1YXJ0eiBvbiBib2FyZCAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCS8qSU5QRFcgKHBzX0FQQ0kxNzEwVmFyaWFibGUtPgotCQkJCQkJCQkgICBzX0JvYXJkIFtiX0JvYXJkSGFuZGxlXS4KLQkJCQkJCQkJICAgc19Cb2FyZEluZm9zLgotCQkJCQkJCQkgICB1aV9BZGRyZXNzICsgMzYgKyAoNjQgKiBiX01vZ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A9PSBBUENJMTcxMF80ME1IWikgKi8KLQotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgaWYgbm90IGVycm9yIG9jY3VyICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoaV9SZXR1cm5WYWx1ZSA9PSAwKSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgdGhlIElOQ19DUFQgdmVyc2lvbiAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLmR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYgMHhGRkZGKSA+PSAweDMxMzEpIHsKLQotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBUZXN0IGlmIDQwTUh6IHVzZWQgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlpZiAoYl9QQ0lJbnB1dENsb2NrID09IEFQQ0kxNzEwXzQwTUhaKSB7Ci0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJCS8qIEVuYWJsZSB0aGUgNDBNSHogcXVhcnogKERRMzApICovCi0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJZGV2cHJpdi0+Ci0JCQkJCQkJCQkJc19Nb2R1bGVJbmZvCi0JCQkJCQkJCQkJW2JfTW9kdWxOYnJdLgotCQkJCQkJCQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLgotCQkJCQkJCQkJCXNfTW9kZVJlZ2lzdGVyLgotCQkJCQkJCQkJCXNfQnl0ZU1vZGVSZWdpc3Rlci4KLQkJCQkJCQkJCQliX01vZGVSZ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JCQkJCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9Ci0JCQkJCQkJCQktMzsKLQkJCQkJCQl9Ci0JCQkJCQl9CS8qICBpZiAoaV9SZXR1cm5WYWx1ZSA9PSAwKSAqLwotCQkJCQl9IGVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBCYXNlIHRpbWluZyBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlEUFJJTlRLKCJCYXNlIHRpbWluZyBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC02OwotCQkJCQl9Ci0JCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGltaW5nIHVuaXR5IHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCURQUklOVEsoIlRpbWluZyB1bml0eSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQlpX1JldHVyblZhbHVlID0gLTU7Ci0JCQkJfQotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUaGUgc2VsZWN0ZWQgUENJIGlucHV0IGNsb2NrIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlE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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9DbGVhckNvdW50ZXJWYWx1ZShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQl1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDbGVhciB0aGUgY291bnRlciAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCW91dGwoMSwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCXVpX0FkZHJlc3MgKyAxNiArICg2NCAqIGJfTW9kdWxOYnIpKTsKLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfQ2xlYXJBbGxDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICA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ICB8Ci18CQkgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9QQ0lJbnB1dENsb2NrICA6CVNlbGVjdGlvbiBvZiB0aGUgUENJIGJ1cyAgICAgfAotfAkJCQkJCWNsb2NrICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCQkJCS0gQVBDSTE3MTBfMzBNSFogOiAgICAgICAgICAgfAotfAkJCQkJCSAgVGhlIFBDIGhhcyBhIFBDSSBidXMgY2xvY2sgfAotfAkJCQkJCSAgb2YgMzAgTUh6ICAgICAgICAgICAgICAgICAgfAotfAkJCQkJCS0gQVBDSTE3MTBfMzNNSFogOiAgICAgICAgICAgfAotfAkJCQkJCSAgVGhlIFBDIGhhcyBhIFBDSSBidXMgY2xvY2sgfAotfAkJCQkJCSAgb2YgMzMgTUh6ICAgICAgICAgICAgICAgICAgfAotfAkJCQkJCS0gQVBDSTE3MTBfNDBNSFogOiAgICAgICAgICAgfAotfAkJCQkJCSAgVGhlIEFQQ0kxNzEwIGhhcyBhIDQwTUh6ICAgIHwKLXwJCQkJCQkgIHF1YXJ0egkJICAgICB8Ci18CQkgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9GaWx0ZXIJICAgICAgOiBGaWx0ZXIgc2VsZWN0aW9uICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCQkzMCBNSHogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJCTA6ICBTb2Z0d2FyZSBmaWx0ZXIgbm90IHVzZWQgICAgICAgICB8Ci18CQkJCQkxOiAgRmlsdGVyIGZyb20gMjY2bnMgICgzLjc1MDAwME1IeikgfAotfAkJCQkJMjogIEZpbHRlciBmcm9tIDQwMG5zICAoMi41MDAwMDBNSHopIHwKL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sb2NrLAotCQkJCSAgICAgdW5zaWduZWQgY2hhciBiX0ZpbHRlcikKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQl1bnNpZ25lZCBpbnQgZHdfU3RhdHVzID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgaW5jcmVtZW50YWwgY291bnRlciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0lOQ1JFTUVOVEFMX0NPVU5URVIpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBmaXJtd2FyZSA+PSBSZXYxLjUgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgotCQkJCQkweEZGRkYpID49IDB4MzEzNSkgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgdGhlIFBDSSBidXMgY2xvY2sgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCWlmICgoYl9QQ0lJbnB1dENsb2NrID09IEFQQ0kxNzEwXzMwTUhaKSB8fAotCQkJCQkoYl9QQ0lJbnB1dENsb2NrID09IEFQQ0kxNzEwXzMzTUhaKSB8fAotCQkJCQkoYl9QQ0lJbnB1dENsb2NrID09IEFQQ0kxNzEwXzQwTUhaKSkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRlc3QgdGhlIGZpbHRlciB2YWx1ZSAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJaWYgKGJfRmlsdGVyIDwgMTYpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCBpZiA0ME1IeiB1c2VkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJaWYgKGJfUENJSW5wdXRDbG9jayA9PQotCQkJCQkJCUFQQ0kxNzEwXzQwTUhaKSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogVGVzdCBpZiA0ME1IeiBxdWFydHogb24gYm9hcmQgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCWR3X1N0YXR1cyA9Ci0JCQkJCQkJCWlubChkZXZwcml2LT4KLQkJCQkJCQkJc19Cb2FyZEluZm9zLgotCQkJCQkJCQl1aV9BZGRyZXNzICsKLQkJCQkJCQkJMzYgKwotCQkJCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBUZXN0IHRoZSBxdWFydHogZmxhZyAoRFEwKSAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJaWYgKChkd19TdGF0dXMgJiAxKSAhPQotCQkJCQkJCQkxKSB7Ci0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJLyogNDBNSHogcXVhcnR6IG5vdCBvbiBib2FyZCAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJRFBSSU5USygiNDBNSHogcXVhcnR6IG5vdCBvbiBib2FyZFxuIik7Ci0JCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQotCQkJCQkJCQkJLTY7Ci0JCQkJCQkJfQotCQkJCQkJfQkvKiAgaWYgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF80ME1IWikgKi8KLQotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgaWYgZXJyb3Igbm90IG9jY3VyICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoaV9SZXR1cm5WYWx1ZSA9PSAwKSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgaWYgNDBNSHogdXNlZCAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCWlmIChiX1BDSUlucHV0Q2xvY2sgPT0KLQkJCQkJCQkJQVBDSTE3MTBfNDBNSFopCi0JCQkJCQkJewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBFbmFibGUgdGhlIDQwTUh6IHF1YXJ6IChEUTMxKSAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCWRldnByaXYtPgotCQkJCQkJCQkJc19Nb2R1bGVJbmZvCi0JCQkJCQkJCQlbYl9Nb2R1bE5icl0uCi0JCQkJCQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQkJCQkJCXNfTW9kZVJlZ2lzdGVyLgotCQkJCQkJCQkJc19CeX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AgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0xhdGNoQ291bnRlciAodW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSwgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyLCAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTGF0Y2hSZWcpICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IExhdGNoIHRoZSBjb3VyYW50IHZhbHVlIGZyb20gc2VsZWN0ZWQgbW9kdWxlICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgKGJfTW9kdWxOYnIpIGluIHRvIHRoZSBzZWxlY3RlZCBsYXRjaCByZWdpc3RlciAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9MYXRjaFJlZykuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9MYXRjaFJlZyAgICA6IFNlbGVjdGVkIGxhdGNoIHJlZ2lzdGVyICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IGZvciB0aGUgZmlyc3QgbGF0Y2ggcmVnaXN0ZXIgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogZm9yIHRoZSBzZWNvbmQgbGF0Y2ggcmVnaXN0ZXIgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBObyBjb3VudGVyIG1vZHVsZSBmb3VuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgc2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgcGFyYW1ldGVyIGlzIHdyb25nICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfTGF0Y2hDb3VudGVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCSAgIHVuc2lnbmVkIGNoYXIgYl9MYXRjaFJlZykKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgY291bnRlciBpbml0aWFsaXNlZCAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmIChkZXZwcml2LT4KLQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9Db3VudGVySW5pdCA9PSAxKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IHRoZSBsYXRjaCByZWdpc3RlciBwYXJhbWV0ZXIgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGJfTGF0Y2hSZWcgPCAyKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRhdGNoIHRoZSBjb3VudGVyICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJb3V0bCgxIDw8IChiX0xhdGNoUmVnICogNCksCi0JCQkJCWRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsKLQkJCQkJKDY0ICogYl9Nb2R1bE5icikpOwotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUaGUgc2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQ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RV8xIDogICAgICAgICAgfAotfAkJCQkJCVRoZSByZWZlcmVuY2UgbG9naWMgaXMgICAgICAgfAotfAkJCQkJCWNvbm5lY3RlZCB0byB0aGUgZGlmZmVyZW5jZSAgfAotfAkJCQkJCWlucHV0IEMgYW5kIHRoZSBpbmRleCBsb2dpYyAgfAotfAkJCQkJCWlzIGNvbm5lY3RlZCB0byB0aGUgMjRWICAgICAgfAotfAkJCQkJCWlucHV0IEUgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwJCSAgICAgIC0yOiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBpcyB3cm9uZyAgICAgICAgICAgICAgICB8Ci18CQkgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSBjb3VudGVyIG1vZHVsZS4gICAgICAgICAgICAgICAgfAotfAkJICAgICAgLTQ6IFRoZSBzb3VyY2Ugc2VsZWN0aW9uIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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0JCQkJCTB4RkZGRikgPj0gMHgzMTM1KSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCB0aGUgc291cmNlIHNlbGVjdGlvbiAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKGJfU291cmNlU2VsZWN0aW9uID09IEFQQ0kxNzEwX1NPVVJDRV8wIHx8Ci0JCQkJCWJfU291cmNlU2VsZWN0aW9uID09IEFQQ0kxNzEwX1NPVVJDRV8xKQotCQkJCXsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRlc3QgaWYgaW52ZXJ0IHRoZSBpbmRleCBhbmQgcmVmZXJlbmNlICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmIChiX1NvdXJjZVNlbGVjdGlvbiA9PQotCQkJCQkJQVBDSTE3MTBfU09VUkNFXzEpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIEludmVydCBpbmRleCBhbmQgcmVmZXJlbmNlIHNvdXJjZSAoRFEyNSkgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJZGV2cHJpdi0+Ci0JCQkJCQkJc19Nb2R1bGVJbmZvCi0JCQkJCQkJW2JfTW9kdWxOYnJdLgotCQkJCQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLgotCQkJCQkJCXNfTW9kZVJlZ2lzdGVyLgotCQkJCQkJCXNfQnl0ZU1vZGVSZWdpc3Rlci4KLQkJCQkJCQliX01vZGVSZWdpc3RlcjQgPQotCQkJCQkJCWRldnByaXYtPgotCQkJCQkJCXNfTW9kdWxlSW5mbwotCQkJCQkJCVtiX01vZHVsTm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qLwotCQkJCWVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGhlIHNvdXJjZSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJRFBSSU5USygiVGhlIHNvdXJjZSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQkJfQkvKiAgaWYgKGJfU291cmNlU2VsZWN0aW9uID09IEFQQ0kxNzEwX1NPVVJDRV8wIHx8Yl9Tb3VyY2VTZWxlY3Rpb24gPT0gQVBDSTE3MTBfU09VUkNFXzEpICovCi0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgY291bnRlciBtb2R1bGUgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgY291bnRlciBtb2R1bGVcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIGNvdW50ZXIgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIGNvdW50ZXIgbW9kdWxlXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLy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Ci0KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogU2V0IHRoZSBvdXRwdXQgT24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlvdXRsKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQlzX01vZGVSZWdpc3Rlci4KLQkJCQlkd19Nb2RlUmVnaXN0ZXIxXzJfM180LCBkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJdWlfQWRkcmVzcyArIDIwICsgKDY0ICogYl9Nb2R1bE5icikpOwotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0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HVsTmJyICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBObyBjb3VudGVyIG1vZHVsZSBmb3VuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBJbnRlcnJ1cHQgcm91dGluZSBub3QgaW5zdGFsbGVkIHNlZSBmdW5jdGlvbiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0k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LgotCQkJCWJfTW9kZVJlZ2lzdGVyMiA9IGRldnByaXYtPgotCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQlzX01vZGVSZWdpc3Rlci4KLQkJCQlzX0J5dGVNb2RlUmVnaXN0ZXIuCi0JCQkJYl9Nb2RlUmVnaXN0ZXIyIHwgQVBDSTE3MTBfRU5BQkxFX0xBVENIX0lOVDsKLQotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFdyaXRlIHRoZSBjb25maWd1cmF0aW9uICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlvdXRsKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQlzX01vZGVSZWdpc3Rlci4KLQkJCQlkd19Nb2RlUmVnaXN0ZXIxXzJfM180LCBkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJdWlfQWRkcmVzcyArIDIwICsgKDY0ICogYl9Nb2R1bE5icikpOwotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9EaXNhYmxlTGF0Y2hJbnRlcnJ1cHQgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5icikgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBEaXNhYmxlIHRoZSBsYXRjaCBpbnRlcnJ1cHQgZnJvbSBzZWxlY3RlZCBtb2R1bGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsTmJyKS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IEludGVycnVwdCByb3V0aW5lIG5vdCBpbnN0YWxsZWQgc2VlIGZ1bmN0aW9uICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfU2V0Qm9hcmRJbnRSb3V0aW5lIiAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0Rpc2FibGVMYXRjaEludGVycnVwdChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkgICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQotCQkgLyoqKioqKioqKioq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IG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1dyaXRlMTZCaXRDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfTW9kdWxOYnIsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9TZWxlY3RlZENvdW50ZXIsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludF8gdWlfV3JpdGVWYWx1ZSkgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFdyaXRlIGEgMTYtQml0IHZhbHVlICh1aV9Xcml0ZVZhbHVlKSBpbiB0byB0aGUgc2VsZWN0ZWR8Ci18ICAgICAgICAgICAgICAgICAgICAgMTYtQml0IGNvdW50ZXIgKGJfU2VsZWN0ZWRDb3VudGVyKSBmcm9tIHNlbGVjdGVkIG1vZHVsZXwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TZWxlY3RlZENvdW50ZXIgOiBTZWxlY3RlZCAxNi1CaXQgY291bnRlciAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIG9yIDEpICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludF8gdWlfV3JpdGVWYWx1ZSAgICAgOiAxNi1CaXQgd3JpdGUgdmFsdWUgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICA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VjdGlvbiAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChiX1NlbGVjdGVkQ291bnRlciA8IDIpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFdyaXRlIHRoZSB2YWx1ZSAqLwotCQkgLyoqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlvdXRsKCh1bnNpZ25lZCBpbnQpICgodW5zaWduZWQgaW50KSAodWlfV3JpdGVWYWx1ZSkgPDwgKDE2ICoKLQkJCQkJCQliX1NlbGVjdGVkQ291bnRlcikpLAotCQkJCQlkZXZwcml2LT5zX0JvYXJkSW5mb3MudWlfQWRkcmVzcyArIDggKwotCQkJCQkoYl9TZWxlY3RlZENvdW50ZXIgKiA0KSArCi0JCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGhlIHNlbGVjdGVkIDE2LUJpdCBjb3VudGVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIDE2LUJpdCBjb3VudGVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Xcml0ZTMyQml0Q291bnRlclZhbHVlICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfIHVsX1dyaXRlVmFsdWUpICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBObyBjb3VudGVyIG1vZHVsZSBmb3VuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX1dyaXRlMzJCaXRDb3VudGVyVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJICAgICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJCSAgICAgdW5zaWduZWQgaW50IHVsX1dyaXRlVmFsdWUpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqLwotCQkJLyogV3JpdGUgdGhlIHZhbHVlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKiovCi0KLQkJCW91dGwodWxfV3JpdGVWYWx1ZSwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCXVpX0FkZHJlc3MgKyA0ICsgKDY0ICogYl9Nb2R1bE5icikpOwotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogSW5kZXggbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0SW5kZXgiICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfRW5hYmxlSW5kZXgoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkgIHVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5icikKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQl1bnNpZ25lZCBpbnQgdWxfSW50ZXJydXB0TGF0Y2hSZWc7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgaWYgaW5kZXggaW5pdGlhbGlzZWQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChkZXZwcml2LT4KLQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0luZGV4SW5pdCkgewotCQkJCWRldnByaXYtPgotCQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLgotCQkJ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kJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfRGlzYWJsZUluZGV4ICh1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSwgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyKSAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IERpc2FibGUgdGhlIElOREVYIGFjdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IEluZGV4IG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdEluZGV4IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0Rpc2FibGVJbmRleChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCSAgIHVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5icikKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0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kZVJlZ2lzdGVyMV8yXzNfNCwKLQkJCQkJZGV2cHJpdi0+c19Cb2FyZEluZm9zLnVpX0FkZHJlc3MgKyAyMCArCi0JCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBJbmRleCBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRJbmRleCIgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiSW5kZXggbm90IGluaXRpYWxpc2VkICBcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3R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LS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0KLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogQ29tcGFyZSBsb2dpYyBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICBTZWUgZnVuY3Rpb24gImlfQVBDSTE3MTBfSW5pdENvbXBhcmVMb2dpYyIgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IEludGVycnVwdCBmdW5jdGlvbiBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0VuYWJsZUNvbXBhcmVMb2dpYyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19Ta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JCQkJc19Nb2RlUmVnaXN0ZXIuCi0JCQkJCWR3X01vZGVSZWdpc3RlcjFfMl8zXzQsCi0JCQkJCWRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsgMjAgKwotCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBDb21wYXJlIGxvZ2ljIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCURQUklOVEsoIkNvbXBhcmUgbG9naWMgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd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gICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IENvbXBhcmUgbG9naWMgbm90IGluaXRpYWxpc2VkLiAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRDb21wYXJlTG9naWMiICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0Rpc2FibGVDb21wYXJlTG9naWMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBjb21wYXJlIGxvZ2ljIGluaXRpYWxpc2VkICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChkZXZwcml2LT4KLQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JCQkJc19Jbml0RmxhZy5iX0NvbXBhcmVMb2dpY0luaXQgPT0gMSkgewotCQkJCWRldnByaXYtPgotCQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JC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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLQkvKgotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0VuYWJsZUZyZXF1ZW5jeU1lYXN1cmVtZW50ICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnRlcnJ1cHRFbmFibGUpICAgICAgICAgICAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgVGFzayAgICAgICAgICAgICAgOiBFbmFibGVzIHRoZSBmcmVxdWVuY3kgbWVhc3VyZW1lbnQgZnVuY3Rpb24gICAgICAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9Nb2R1bE5iciAgICAgICA6IE51bWJlciBvZiB0aGUgbW9kdWxlIHRvIGJlICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyZWQgKDAgdG8gMykgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9JbnRlcnJ1cHRFbmFibGU6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdC4gICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0VOQUJMRTogICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuYWJsZSB0aGUgaW50ZXJydXB0ICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEU6ICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERpc2FibGUgdGhlIGludGVycnVwdCAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAgIHwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtMjogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgaXMgd3JvbmcgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtNDogRnJlcXVlbmN5IG1lYXN1cmVtZW50IGxvZ2ljIG5vdCBpbml0aWFsaXNlZC4gICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRGcmVxdWVuY3lNZWFzdXJlbWVudCIgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtNTogSW50ZXJydXB0IHBhcmFtZXRlciBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAtNjogSW50ZXJydXB0IGZ1bmN0aW9uIG5vdCBpbml0aWFsaXNlZC4gICAgICAgICAgICAgICAgfAotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotCSAqLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0VuYWJsZUZyZXF1ZW5jeU1lYXN1cmVtZW50KHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCQkgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCQkJIHVuc2lnbmVkIGNoYXIgYl9JbnRlcnJ1cHRFbmFibGUpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgaWYgZnJlcXVlbmN5IG1lYXN1cmVtZW50IGluaXRpYWxpc2VkICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoZGV2cHJpdi0+Ci0JCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLgotCQkJCXNfSW5pdEZsYWcuYl9GcmVxdWVuY3lNZWFzdXJlbWVudEluaXQgPT0gMSkgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IHRoZSBpbnRlcnJ1cHQgbW9kZSAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCWlmICgoYl9JbnRlcnJ1cHRFbmFibGUgPT0gQVBDSTE3MTBfRElTQUJMRSkgfHwKLQkJCQkJKGJfSW50ZXJydXB0RW5hYmxlID09IEFQQ0kxNzEwX0VOQUJMRSkpCi0JCQkJewotCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBFbmFibGUgdGhlIGZyZXF1ZW5jeSBtZWFzdXJlbWVudCAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioq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KioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBGcmVxdWVuY3kgbWVhc3VyZW1lbnQgbG9naWMgbm90IGluaXRpYWxpc2VkICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJGcmVxdWVuY3kgbWVhc3VyZW1lbnQgbG9naWMgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLQkvKgotCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTI6IFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIGlzIHdyb25nICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTQ6IEZyZXF1ZW5jeSBtZWFzdXJlbWVudCBsb2dpYyBub3QgaW5pdGlhbGlzZWQuICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgIFNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9Jbml0RnJlcXVlbmN5TWVhc3VyZW1lbnQiIHwKLQkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9EaXNhYmxlRnJlcXVlbmN5TWVhc3VyZW1lbnQoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJCSAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIGZyZXF1ZW5jeSBtZWFzdXJlbWVudCBpbml0aWFsaXNlZCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGRldnByaXYtPgotCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQlzX0luaXRGbGFnLmJfRnJlcXV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ioqKioqKioqKi8KLQotCQkJCW91dGwoZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQkJc19Nb2RlUmVnaXN0ZXIuCi0JCQkJCWR3X01vZGVSZWdpc3RlcjFfMl8zXzQsCi0JCQkJCWRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsgMjAgKwotCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIERpc2FibGUgdGhlIGZyZXF1ZW5jeSBtZWFzdXJlbWVudCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlkZXZwcml2LT4KLQkJCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQkJc19Jbml0RmxhZy4KLQkJCQkJYl9GcmVxdWVuY3lNZWFzdXJlbWVudEVuYWJsZSA9IDA7Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIEZyZXF1ZW5jeSBtZWFzdXJlbWVudCBsb2dpYyBub3QgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCURQUklOVEsoIkZyZXF1ZW5jeSBtZWFzdXJlbWVudCBsb2dpYyBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIH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dGhlIHNlY29uZCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfTGF0Y2hTdGF0dXMgOiAgIExhdGNoIHJlZ2lzdGVyIHN0YXR1cy4gICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IE5vIGxhdGNoIG9jY3VyICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQSBzb2Z0d2FyZSBsYXRjaCBvY2N1ciAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBBIGhhcmR3YXJlIGxhdGNoIG9jY3VyICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyA6IEEgc29mdHdhcmUgYW5kIGhhcmR3YXJlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF0Y2ggb2NjdXIgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogVGhlIHNlbGVjdGVkIGxhdGNoIHJlZ2lzdGVyIHBhcmFtZXRlciBpcyB3cm9uZyAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX1JlYWRMYXRjaFJlZ2lzdGVyU3RhdHVzKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSAgICAgIHVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5iciwKLQkJCQkJICAgICAgdW5zaWduZWQgY2hhciBiX0xhdGNoUmVnLAotCQkJCQkgICAgICB1bnNpZ25lZCBjaGFyICpwYl9MYXRjaFN0YXR1cykKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQl1bnNpZ25lZCBpbnQgZHdfTGF0Y2hSZWc7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IG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KioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1JlYWRMYXRjaFJlZ2lzdGVyVmFsdWUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSx8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH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sZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogZm9yIHRoZSBmaXJzdCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBmb3IgdGhlIHNlY29uZCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBVTE9OR18gcHVsX0xhdGNoVmFsdWUgOiBMYXRjaCByZWdpc3RlciB2YWx1ZSAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFR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gIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoYl9MYXRjaFJlZyA8IDIpIHsKLQkJCQkqcHVsX0xhdGNoVmFsdWUgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgKChiX0xhdGNoUmVnICsgMSkgKiA0KSArCi0JCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKLQotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUaGUgc2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gKi8KLQkJCS8qICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1JlYWQxNkJpdENvdW50ZXJWYWx1ZSAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfU2VsZWN0ZWRDb3VudGVyLCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKl8gICBwdWlfQ291bnRlclZhbHVlKSAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBMYXRjaCB0aGUgc2VsZWN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ICB1bnNpZ25lZCBpbnQgKnB1aV9Db3VudGVyVmFsdWUpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0JdW5zaWduZWQgaW50IGR3X0xhdGhjaFZhbHVlID0gMDsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgY291bnRlciBpbml0aWFsaXNlZCAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmIChkZXZwcml2LT4KLQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9Db3VudGVySW5pdCA9PSAxKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIGNvdW50ZXIgc2VsZWN0aW9uICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGJfU2VsZWN0ZWRDb3VudGVyIDwgMikgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBMYXRjaCB0aGUgY291bnRlciAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCW91dGwoMSwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgKDY0ICogYl9Nb2R1bE5icikpOwotCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFJlYWQgdGhlIGxhdGNoIHZhbHVlICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZHdfTGF0aGNoVmFsdWUgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgNCArICg2NCAqIGJfTW9kdWxOYnIpKTsKLQotCQkJCSpwdWlfQ291bnRlclZhbHVlID0KLQkJCQkJKHVuc2lnbmVkIGludCkgKChkd19MYXRoY2hWYWx1ZSA+PiAoMTYgKgotCQkJCQkJCWJfU2VsZWN0ZWRDb3VudGVyKSkgJgotCQkJCQkweEZGRkZVKTsKLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGhlIHNlbGVjdGVkIDE2LUJpdCBjb3VudGVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIDE2LUJpdCBjb3VudGVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkMzJCaXRDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX0NvdW50ZXJWYWx1ZSkgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IExhdGNoIHRoZSAzMi1CaXQgY291bnRlciBmcm9tIHNlbGVjdGVkIG1vZHVsZSAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgKGJfTW9kdWxOYnIpIGluIHRvIHRoZSBmaXJzdCBsYXRjaCByZWdpc3RlciBhbmQgcmV0dXJuIHwKLXwgICAgICAgICAgICAgICAgICAgICB0aGUgbGF0Y2hlZCB2YWx1ZS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQVUxPTkdfICBwdWxfQ291bnRlclZhbHVlIDogMzItQml0IGNvdW50ZXIgdmFsdWUgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBObyBjb3VudGVyIG1vZHVsZSBmb3VuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX1JlYWQzMkJpdENvdW50ZXJWYWx1ZShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkgICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCQkgICAgdW5zaWduZWQgaW50ICpwdWxfQ291bnRlclZhbHVlKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGF0Y2ggdGhlIGNvdW50ZXIgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlvdXRsKDEsIGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQl1aV9BZGRyZXNzICsgKDY0ICogYl9Nb2R1bE5icikpOwotCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFJlYWQgdGhlIGxhdGNoIHZhbHVlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJKnB1bF9Db3VudGVyVmFsdWUgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCXVpX0FkZHJlc3MgKyA0ICsgKDY0ICogYl9Nb2R1bE5icikpOwotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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ICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9JbmRleFN0YXR1cyAgIDogMCA6IE5vIElOREVYIG9jY3VyICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQSBJTkRFWCBvY2N1ciAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogSW5kZXggbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0SW5kZXgiICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfR2V0SW5kZXhTdGF0dXMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkgICAgIHVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5iciwKLQkJCQkgICAgIHVuc2lnbmVkIGNoYXIgKnBiX0luZGV4U3RhdHVzKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCXVuc2lnbmVkIGludCBkd19TdGF0dXNSZWcgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIGluZGV4IGluaXRpYWxpc2VkICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoZGV2cHJpdi0+Ci0JCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCXNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9JbmRleEluaXQpIHsKLQkJCQlkd19TdGF0dXNSZWcgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgMTIgKyAoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCQkqcGJfSW5kZXhTdGF0dXMgPSAodW5zaWduZWQgY2hhcikgKGR3X1N0YXR1c1JlZyAmIDEpOwotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIEluZGV4IG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gImlfQVBDSTE3MTBfSW5pdEluZGV4IiAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJJbmRleCBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0UmVmZXJlbmNlU3RhdHVzICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1JlZmVyZW5jZVN0YXR1cykgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogUmVmZXJlbmNlIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0UmVmZXJlbmNlIiAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfR2V0UmVmZXJlbmNlU3RhdHVzKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJCSB1bnNpZ25lZCBjaGFyICpwYl9SZWZlcmVuY2VTdGF0dXMpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0JdW5zaWduZWQgaW50IGR3X1N0YXR1c1JlZyA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIHJlZmVyZW5jZSBpbml0aWFsaXNlZCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChkZXZwcml2LT4KLQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JCQkJc19Jbml0RmxhZy5iX1JlZmVyZW5jZUluaXQpIHsKLQkJCQlkd19TdGF0dXNSZWcgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgMjQgKyAoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCQkqcGJfUmVmZXJlbmNlU3RhdHVzID0KLQkJCQkJKHVuc2lnbmVkIGNoYXIpICh+ZHdfU3RhdHVzUmVnICYgMSk7Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBSZWZlcmVuY2Ugbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9Jbml0UmVmZXJlbmNlIiAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCURQUklOVEsoIlJlZmVyZW5jZSBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIlRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZ1xuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0VUFTU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9VQVNTdGF0dXMpICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBlcnJvciBzaWduYWwgKFVBUykgc3RhdHVzICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9VQVNTdGF0dXMgICAgICA6IDAgOiBVQVMgaXMgbG93ICIwIiAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFVBUyBpcyBoaWdoICIxIiAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTc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xNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJDb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0KLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0Q0JTdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9DQlN0Y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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTm8gY291bnRlciBtb2R1bGUgZm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBDb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9HZXRDQlN0YXR1cyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCSAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCSAgdW5zaWduZWQgY2hhciAqcGJfQ0JTdGF0dXMpCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0JdW5zaWduZWQgaW50IGR3X1N0YXR1c1JlZyA9IDA7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoZGV2cHJpdi0+Ci0JCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQlzX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgewotCQkJZHdfU3RhdHVzUmVnID0gaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQl1aV9BZGRyZXNzICsgMTYgKyAoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCSpwYl9DQlN0YXR1cyA9ICh1bnNpZ25lZCBjaGFyKSAoZHdfU3RhdHVzUmVnICYgMSk7Ci0KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIl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ICAgICAgIHNlY29uZCAxNi1iaXQgY291bnRlciB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHRvIDIqMTYtYml0IG1vZGUuICAgICAgICAgIHwKLXwJCQkgIFNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNTogRmlybXdhcmUgcmV2aXNpb24gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0dldDE2Qml0Q0JTdGF0dXMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkgICAgICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCSAgICAgICB1bnNpZ25lZCBjaGFyICpwYl9DQlN0YXR1c0NvdW50ZXIwLAotCQkJCSAgICAgICB1bnNpZ25lZCBjaGFyICpwYl9DQlN0YXR1c0NvdW50ZXIxKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCXVuc2lnbmVkIGludCBkd19TdGF0dXNSZWcgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgaWYgMioxNi1CaXQgbW9kZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JCQkJCXNfTW9kZVJlZ2lzdGVyLgotCQkJCQlzX0J5dGVNb2RlUmVnaXN0ZXIuCi0JCQkJCWJfTW9kZVJlZ2lzdGVy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UluZm8gW2JfTW9kdWxOYnJdLnNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9Db3VudGVySW5pdCA9PSAxKSAqLwotCQllbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAqLwotCQkJLyogImlfQVBDSTE3MTBfSW5pdENvdW50ZXIiICAgICAgICAgICAgICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIkNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQkJLyogIGlmIChwc19BUENJMTcxMFZhcmlhYmxlLT5zX0JvYXJkIFtiX0JvYXJkSGFuZGxlXS5zX01vZHVsZUluZm8gW2JfTW9kdWxOYnJdLnNfU2llbWVuc0NvdW50ZXJJbmZvLnNfSW5pdEZsYWcuYl9Db3VudGVySW5pdCA9PSAxKSAqLwotCX0JCQkvKiAgaWYgKGJfTW9kdWxOYnIgPCA0KSAqLwotCWVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmcgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgbW9kdWxlIG51bWJlciBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQkJCS8qICBpZiAoYl9Nb2R1bE5iciA8IDQpICovCi0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0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Z3VyZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9VRFN0YXR1cyAgICAgIDogMCA6IENvdW50ZXIgcHJvZ3Jlc3MgaW4gdGhlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgbW9kZSBkb3duICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDb3VudGVyIHByb2dyZXNzIGluIHRoZSAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIG1vZGUgdXAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2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0ICogYl9Nb2R1bE5icikpOwotCi0JCQkqcGJfVURTdGF0dXMgPSAodW5zaWduZWQgY2hhcikgKChkd19TdGF0dXNSZWcgPj4gMikgJiAxKTsKLQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRJbnRlcnJ1cHRVRExhdGNoZWRTdGF0dXMgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1VEU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGNvdW50ZXIgcHJvZ3Jlc3MgbGF0Y2hlZCBzdGF0dXMgYWZ0ZXIgYSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGluZGV4IGludGVycnVwdCBvY2N1ci4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfVURTdGF0dXMgICAgICA6IDAgOiBDb3VudGVyIHByb2dyZXNzIGluIHRoZSAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIG1vZGUgZG93biAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCBtb2RlIHVwICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IE5vIGluZGV4IGludGVycnVwdCBvY2N1ciB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE5vIGNvdW50ZXIgbW9kdWxlIGZvdW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IEludGVycnVwdCBmdW5jdGlvbiBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0dldEludGVycnVwdFVETGF0Y2hlZFN0YXR1cyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCQkJICB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJCQkgIHVuc2lnbmVkIGNoYXIgKnBiX1VEU3RhdHVzKQotewotCXN0cnVjdCBhZGRpX3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7Ci0JaW50IGlfUmV0dXJuVmFsdWUgPSAwOwotCXVuc2lnbmVkIGludCBkd19TdGF0dXNSZWcgPSAwOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCBpZiBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKGRldnByaXYtPgotCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJc19TaWVtZW5zQ291bnRlckluZm8uc19Jbml0RmxhZy5iX0NvdW50ZXJJbml0ID09IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIGluZGV4IGludGVycnVwdCBvY2N1ciAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGRldnByaXYtPgotCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1NpZW1lbnNDb3VudGVySW5mby4KLQkJCQlzX0luaXRGbGFnLmJfSW5kZXhJbnRlcnJ1cHRPY2N1ciA9PSAxKSB7Ci0JCQkJZGV2cHJpdi0+Ci0JCQkJCXNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQkJc19TaWVtZW5zQ291bnRlckluZm8uCi0JCQkJCXNfSW5pdEZsYWcuYl9JbmRleEludGVycnVwdE9jY3VyID0gMDsKLQotCQkJCWR3X1N0YXR1c1JlZyA9IGlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJCXVpX0FkZHJlc3MgKyAxMiArICg2NCAqIGJfTW9kdWxOYnIpKTsKLQotCQkJCSpwYl9VRFN0YXR1cyA9ICh1bnNpZ25lZCBjaGFyKSAoKGR3X1N0YXR1c1JlZyA+PiAxKSAmIDEpOwotCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIE5vIGluZGV4IGludGVycnVwdCBvY2N1ciAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkqcGJfVURTdGF0dXMgPSAyOwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0JLyoKLQkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkRnJlcXVlbmN5TWVhc3VyZW1lbnQgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgICAgICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgICAgICAgIHBiX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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfU3RhdHVzICAgICA6IFJldHVybnMgdGhlIGZyZXF1ZW5jeSAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmVtZW50IHN0YXR1cyAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDb3VudGluZyBjeWNsZSBub3QgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydGVkLiAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDb3VudGluZyBjeWNsZSBzdGFydGVkLiAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBDb3VudGluZyBjeWNsZSBzdG9wcGVkLiAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgbWVhc3VyZW1lbnQgY3ljbGUgaXMgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQuICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1VEU3RhdHVzICAgICAgOiAwIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgbW9kZSBkb3duICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgbW9kZSB1cCAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfUmVhZFZhbHVlICAgOiBSZXR1cm4gdGhlIG51bWJlciBvZiAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmNyZW1lbnRzIGluIHRoZSBkZWZpbmVkICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lIGJhc2UuICAgICAgICAgICAgICAgICAgIHwKLQkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTI6IFRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyIGlzIHdyb25nICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgLTM6IENvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICA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kJCX0KLQkJCQkJfSBlbHNlIHsKLQkJCQkJCSpwYl9TdGF0dXMgPSAxOwotCQkJCQkJKnBiX1VEU3RhdHVzID0gMDsKLQkJCQkJfQotCQkJCX0gZWxzZSB7Ci0JCQkJCSpwYl9TdGF0dXMgPSAwOwotCQkJCQkqcGJfVURTdGF0dXMgPSAwOwotCQkJCX0KLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogRnJlcXVlbmN5IG1lYXN1cmVtZW50IGxvZ2ljIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiRnJlcXVlbmN5IG1lYXN1cmVtZW50IGxvZ2ljIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCi0JCQkvKiAiaV9BUENJMTcxMF9Jbml0Q291bnRlciIgICAgICAgICAgICAgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiQ291bnRlciBub3QgaW5pdGlhbGlzZWRcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8IFByb2plY3QgbWFuYWdlcjogRXJpYyBTdG9seiAgIHwgRGF0ZSAgICAgOiAgMDIvMTIvMjAwMiAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBEZXNjcmlwdGlvbiA6ICAgQVBDSS0xNzEwIHB1bHNlIGVuY29kZXIgbW9kdWxlICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVUERBVEVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgIERhdGUgICB8ICAgQXV0aG9yICB8ICAgICAgICAgIERlc2NyaXB0aW9uIG9mIHVwZGF0ZXMgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICAgICAgIC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sTmJyLCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgIGJfUHVsc2VFbmNvZGVyTmJyLCAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9JbnB1dExldmVsU2VsZWN0aW9uLCAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX1RyaWdnZXJPdXRwdXRBY3Rpb24sICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgICAgICAgdWxfU3RhcnRWYWx1ZSkgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlIHRoZSBwdWxzZSBlbmNvZGVyIG9wZXJhdGluZyBtb2RlIHNlbGVjdGVkIHZpYXwKLXwgICAgICAgICAgICAgICAgICAgICBiX01vZHVsTmJyIGFuZCBiX1B1bHNlRW5jb2Rlck5ici4gVGhlIHB1bHNlIGVuY29kZXIgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGFmdGVyIGVhY2ggcHVsc2UgZGVjcmVtZW50IHRoZSBjb3VudGVyIHZhbHVlIGZyb20gMS4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBZb3UgbXVzdCBjYWxsaW5nIHRoaXMgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsIGFueSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiBwdWxzZSBlbmNvZGVycy4gICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1B1bHNlRW5jb2Rlck5iciAgICAgOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9JbnB1dExldmVsU2VsZWN0aW9uIDogSW5wdXQgbGV2ZWwgc2VsZWN0aW9uICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCBvciAxKSAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogU2V0IHB1bHNlIGVuY29kZXJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCB0aGUgdGhlIGxvd3wKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsIHB1bHNlLiAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogU2V0IHB1bHNlIGVuY29kZXJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCB0aGUgdGhlICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2ggbGV2ZWwgcHVsc2UufAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfVHJpZ2dlck91dHB1dEFjdGlvbiA6IERpZ2l0YWwgVFJJR0dFUiBvdXRwdXQgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IE5vIGFjdGlvbiAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogU2V0IHRoZSB0cmlnZ2VyICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgdG8gIjEiICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoKSBhZnRlciB0aGUgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc2FnZSBmcm9tIDEgdG98Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIGZyb20gcHVsc2UgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIuICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogU2V0IHRoZSB0cmlnZ2VyICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgdG8gIjAiICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsb3cpIGFmdGVyIHRoZSAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc2FnZSBmcm9tIDEgdG98Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIGZyb20gcHVsc2UgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9TdGFydFZhbHVlICAgICAgICA6IFB1bHNlIGVuY29kZXIgc3RhcnQgdmFsdWV8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgdG8gNDI5NDk2NzI5NSkKLQliX01vZHVsTmJyCQkJCT0odW5zaWduZWQgY2hhcikgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7Ci0JYl9QdWxzZUVuY29kZXJOYnIJCT0odW5zaWduZWQgY2hhcikgZGF0YVswXTsKLQliX0lucHV0TGV2ZWxTZWxlY3Rpb24JPSh1bnNpZ25lZCBjaGFyKSBkYXRhWzFdOwotCWJfVHJpZ2dlck91dHB1dEFjdGlvbgk9KHVuc2lnbmVkIGNoYXIpIGRhdGFbMl07Ci0JdWxfU3RhcnRWYWx1ZQkJCT0odW5zaWduZWQgaW50KSBkYXRhWzNdOwotICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogVGhlIG1vZHVsZSBpcyBub3QgYSBwdWxzZSBlbmNvZGVyIG1vZHVsZSAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0zOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTQ6IElucHV0IGxldmVsIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNTogRGlnaXRhbCBUUklHR0VSIG91dHB1dCBhY3Rpb24gc2VsZWN0aW9uIGlzIHdyb25nICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBQdWxzZSBlb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HVlID0gKHVuc2lnbmVkIGludCkgZGF0YVszXTsKLQotCWlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8PSAzKSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgcHVsc2UgZW5jb2RlciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQlBUENJMTcxMF9QVUxTRV9FTkNPREVSKSA9PQotCQkJQVBDSTE3MTBfUFVMU0VfRU5DT0RFUikgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IHRoZSBzZWxlY3RlZCBwdWxzZSBlbmNvZGVyIG51bWJlciAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChiX1B1bHNlRW5jb2Rlck5iciA8PSAzKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgdGhlIGlucHV0IGxldmVsICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKChiX0lucHV0TGV2ZWxTZWxlY3Rpb24gPT0gMCkKLQkJCQkJfHwgKGJfSW5wdXRMZXZlbFNlbGVjdGlvbiA9PSAxKSkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIF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JCQkJCQlzX1B1bHNlRW5jb2RlckluZm8KLQkJCQkJCQkJW2JfUHVsc2VFbmNvZGVyTmJyXS4KLQkJCQkJCQkJYl9QdWxzZUVuY29kZXJJbml0Ci0JCQkJCQkJCT0gMTsKLQkJCQkJCX0gZWxzZSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBQdWxzZSBlbmNvZGVyIHN0YXJ0IHZhbHVlIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCURQUklOVEsoIlB1bHNlIGVuY29kZXIgc3RhcnQgdmFsdWUgaXMgd3JvbmdcbiIpOwotCQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNjsKLQkJCQkJCX0KLQkJCQkJfSBlbHNlIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogRGlnaXRhbCBUUklHR0VSIG91dHB1dCBhY3Rpb24gc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJRFBSSU5USygiRGlnaXRhbCBUUklHR0VSIG91dHB1dCBhY3Rpb24gc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKLQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQkJfQotCQkJCX0gZWxzZSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogSW5wdXQgbGV2ZWwgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlEUFJJTlRLKCJJbnB1dCBsZXZlbCBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQkJfQotCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogUHVsc2UgZW5jb2RlciBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlEUFJJTlRLKCJQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgcHVsc2UgZW5jb2RlciBtb2R1bGUgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgcHVsc2UgZW5jb2RlciBtb2R1bGVcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCQl9Ci0JfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgcHVsc2UgZW5jb2RlciBtb2R1bGUgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSBwdWxzZSBlbmNvZGVyIG1vZHVsZVxuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfRW5hYmxlUHVsc2VFbmNvZGVyICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9QdWxzZUVuY29kZXJOYnIsICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX0N5Y2xlU2VsZWN0aW9uLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfSW50ZXJydXB0SGFuZGxpbmcpICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogRW5hYmxlb3IgZGlzYWJsZSAgdGhlIHNlbGVjdGVkIHB1bHNlIGVuY29kZXIgKGJfUHVsc2VFbmNvZGVyTmJyKSAgfAotfCAgICAgICAgICAgICAgICAgICAgIGZyb20gc2VsZWN0ZWQgbW9kdWxlIChiX01vZHVsTmJyKS4gRWFjaCBpbnB1dCBwdWxzZSAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgZGVjcmVtZW50IHRoZSBwdWxzZSBlbmNvZGVyIGNvdW50ZXIgdmFsdWUgZnJvbSAxLiAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJZiB5b3UgZW5hYmxlZCB0aGUgaW50ZXJydXB0IChiX0ludGVycnVwdEhhbmRsaW5nKSwgYSAgfAotfCAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCBpcyBnZW5lcmF0ZWQgd2hlbiB0aGUgcHVsc2UgZW5jb2RlciBoYXMgcnVuICB8Ci18ICAgICAgICAgICAgICAgICAgICAgZG93bi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9QdWxzZUVuY29kZXJOYnIgICA6IFB1bHNlIGVuY29kZXIgc2VsZWN0aW9uICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfQ3ljbGVTZWxlY3Rpb24gICAgOiBBUENJMTcxMF9DT05USU5VT1VTOiAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFYWNoIHRpbWUgdGhlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50aW5nIHZhbHVlIGlzIHNldHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24gIjAiLCB0aGUgcHVsc2UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVyIGxvYWQgdGhlICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IHZhbHVlIGFmdGVyICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIG5leHQgcHVsc2UuICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX1NJTkdMRTogICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIHRoZSBjb3VudGVyIGlzIHNldHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24gIjAiLCB0aGUgcHVsc2UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVyIGlzIHN0b3BwZWQuICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0ludGVycnVwdEhhbmRsaW5nIDogSW50ZXJydXB0cyBjYW4gYmUgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmF0ZWQsIHdoZW4gdGhlIHB1bHNlfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIgaGFzIHJ1biBkb3duLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV2l0aCB0aGlzIHBhcmFtZXRlciB0aGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VyIGRlY2lkZXMgaWYgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdHMgYXJlIHVzZWQgb3IgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90LiAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0VOQUJMRTogICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW50ZXJydXB0cyBhcmUgZW5hYmxlZCB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9ESVNBQkxFOiAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEludGVycnVwdHMgYXJlIGRpc2FibGVkCi0KLQliX01vZHVsTmJyCQkJPSh1bnNpZ25lZCBjaGFyKSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX0FjdGlvbgkJCT0odW5zaWduZWQgY2hhcikgZGF0YVswXTsKLQliX1B1bHNlRW5jb2Rlck5icgk9KHVuc2lnbmVkIGNoYXIpIGRhdGFbMV07Ci0JYl9DeWNsZVNlbGVjdGlvbgk9KHVuc2lnbmVkIGNoYXIpIGRhdGFbMl07Ci0JYl9JbnRlcnJ1cHRIYW5kbGluZwk9KHVuc2lnbmVkIGNoYXIpIGRhdGFbM107fAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFB1bHNlIGVuY29kZXIgbm90IGluaXRpYWxpc2VkLiAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRQdWxzZUVuY29kZXIiICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBDeWNsZSBzZWxlY3Rpb24g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c2lnbmVkIGNoYXIpIENSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOwotCWJfQWN0aW9uID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMF07Ci0JYl9QdWxzZUVuY29kZXJOYnIgPSAodW5zaWduZWQgY2hhcikgZGF0YVsxXTsKLQliX0N5Y2xlU2VsZWN0aW9uID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMl07Ci0JYl9JbnRlcnJ1cHRIYW5kbGluZyA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzNdOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8PSAzKSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogVGVzdCB0aGUgc2VsZWN0ZWQgcHVsc2UgZW5jb2RlciBudW1iZXIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmIChiX1B1bHNlRW5jb2Rlck5iciA8PSAzKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIHB1bHNlIGVuY29kZXIgaW5pdGlhbGlzZWQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS4KLQkJCQlzX1B1bHNlRW5jb2Rlck1vZHVsZUluZm8uCi0JCQkJc19QdWxzZUVuY29kZXJJbmZvW2JfUHVsc2VFbmNvZGVyTmJyXS4KLQkJCQliX1B1bHNlRW5jb2RlckluaXQgPT0gMSkgewotCQkJCX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kJLyogUHVsc2UgZW5jb2RlciBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJNb2R1bGUgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkUHVsc2VFbmNvZGVyU3RhdHVzICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX1B1bHNlRW5jb2Rlck5iciwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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kxNzEwX1BVTFNFRU5DT0RFUl9SRUFECi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlICAgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMHwKLXwgICAgICAgICAgICBDUkFSRUYoKSAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1B1bHNlRW5jb2Rlck5iciAgIDogUHVsc2UgZW5jb2RlciBzZWxlY3Rpb24gIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKQotICAgQVBDSTE3MTBfUFVMU0VFTkNPREVSX1dSSVRFCi0JCQkJZGF0YVsyXQkJVUxPTkdfIHVsX1dyaXRlVmFsdWUgICAgICAgIDogMzItYml0IHZhbHVlIHRvIGJlICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0dGVuICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfU3RhdHVzICAgICAgICAgICAgOiBQdWxzZSBlbmNvZGVyIHN0YXR1cy4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogTm8gb3ZlcmZsb3cgb2NjdXJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBPdmVyZmxvdyBvY2N1cgotCQkJCQkJUFVMT05HXyBwdWxfUmVhZFZhbHVlICAgICAgIDogUHVsc2UgZW5jb2RlciB2YWx1ZSAgICAgIHwgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFB1bHNlIGVuY29kZXIgbm90IGluaXRpYWxpc2VkLiAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRQdWxzZUVuY29kZXIiICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotCi0vKl9JTlRfICAgaV9BUENJMTcxMF9SZWFkUHVsc2VFbmNvZGVyU3RhdHVzICAgICAgICh1bnN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TdGF0dXMgPSAodW5zaWduZWQgY2hhciAqKSAmZGF0YVswXTsKLQlwdWxfUmVhZFZhbHVlID0gKHVuc2lnbmVkIGludCAqKSAmZGF0YVsxXTsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBzZWxlY3RlZCBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPD0gMykgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgdGhlIHNlbGVjdGVkIHB1bHNlIGVuY29kZXIgbnVtYmVyICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlpZiAoYl9QdWxzZUVuY29kZXJOYnIgPD0gMykgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBwdWxzZSBlbmNvZGVyIGluaXRpYWxpc2VkICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19QdWxzZUVuY29kZXJNb2R1bGVJbmZvLgotCQkJCXNfUHVsc2VFbmNvZGVySW5mb1tiX1B1bHNlRW5jb2Rlck5icl0uCi0JCQkJYl9QdWxzZUVuY29kZXJJbml0ID09IDEpIHsKLQotCQkJCXN3aXRjaCAoYl9UeXBlKSB7Ci0JCQkJY2FzZSBBUENJMTcxMF9QVUxTRUVOQ09ERVJfUkVBRDoKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBSZWFkIHRoZSBzdGF0dXMgcmVnaXN0ZXIgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioq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kdWxlICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICBEYXRlICAgfCAgIEF1dGhvciAgfCAgICAgICAgICBEZXNjcmlwdGlvbiBvZiB1cGRhdGVzICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8IDA4LzA1LzAwIHwgR3Vpbm90IEMgIHwgLSAwNDAwLzAyMjggQWxsIEZ1bmN0aW9uIGluIFJJTkcgMCAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgIGF2YWlsYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotI2RlZmluZSBBUENJMTcxMF8zME1IWgkJCTMwCi0jZGVmaW5lIEFQQ0kxNzEwXzMzTUhaCQkJMzMKLSNkZWZpbmUgQVBDSTE3MTBfNDBNSFoJCQk0MAotCi0jZGVmaW5lIEFQQ0kxNzEwX1BXTV9JTklUCQkwCi0jZGVmaW5lIEFQQ0kxNzEwX1BXTV9HRVRJTklUREFUQQkxCi0KLSNkZWZpbmUgQVBDSTE3MTBfUFdNX0RJU0FCTEUJCTAKLSNkZWZpbmUgQVBDSTE3MTBfUFdNX0VOQUJMRQkJMQotI2RlZmluZSBBUENJMTcxMF9QV01fTkVXVElNSU5HCQkyCi0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0luaXRQV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfUFdNLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9DbG9ja1NlbGVjdGlvbiwgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1RpbWluZ1VuaXQsICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfICAgdWxfTG93VGltaW5nLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9IaWdoVGltaW5nLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1JlYWxMb3dUaW1pbmcsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfUmVhbEhpZ2hUaW1pbmcpICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlIHRoZSBzZWxlY3RlZCBQV00gKGJfUFdNKSBmcm9tIHNlbGVjdGVkIG1vZHVsZXwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikuIFRoZSB1bF9Mb3dUaW1pbmcsIHVsX0hpZ2hUaW1pbmcgYW5kICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVsX1RpbWluZ1VuaXQgZGV0ZXJtaW5lIHRoZSBsb3cvaGlnaCB0aW1pbmcgYmFzZSBmb3IgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdGhlIHBlcmlvZC4gcHVsX1JlYWxMb3dUaW1pbmcsIHB1bF9SZWFsSGlnaFRpbWluZyAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhlIHJlYWwgdGltaW5nIHZhbHVlLiAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFlvdSBtdXN0IGNhbGxpbmcgdGhpcyBmdW5jdGlvbiBiZSBmb3IgeW91IGNhbGwgYW55ICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgb3RoZXIgZnVuY3Rpb24gd2l0Y2ggYWNjZXNzIG9mIHRoZSBQV00uICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZXwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BXTSAgICAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfQ2xvY2tTZWxlY3Rpb24gOiBTZWxlY3Rpb24gZnJvbSBQQ0kgYnVzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfMzBNSFogOiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgUEMgaGF2ZSBhIDMwIE1IeiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBDSSBidXMgY2xvY2sgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfMzNNSFogOiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgUEMgaGF2ZSBhIDMzIE1IeiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBDSSBidXMgY2xvY2sgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfNDBNSFogICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgQVBDSS0xNzEwIGhhdmUgYSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVncmF0ZWQgNDBNaHogICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhcnR6LiAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogw6ZzICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBzICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCA6IG1uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgICB1bF9Mb3dUaW1pbmcgICAgIDogTG93IGJhc2UgdGltaW5nIHZhbHVlLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUxPTkdfICAgIHVsX0hpZ2hUaW1pbmcgICAgOiBIaWdoIGJhc2UgdGltaW5nIHZhbHVlLiAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBVTE9OR18gIHB1bF9SZWFsTG93VGltaW5nICA6IFJlYWwgbG93IGJhc2UgdGltaW5nICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUuICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQVUxPTkdfICBwdWxfUmVhbEhpZ2hUaW1pbmcgOiBSZWFsIGhpZ2ggYmFzZSB0aW1pbmcgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLiAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIFBXTSBtb2R1bGUgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTQ6IFBXTSBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNTogVGhlIHNlbGVjdGVkIGlucHV0IGNsb2NrIGlzIHdyb25nICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBUaW1pbmcgVW5pdCBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTc6IExvdyBiYXNlIHRpbWluZyBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtODogSGlnaCBiYXNlIHRpbWluZyBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC05OiBZb3UgY2FuIG5vdCB1c2VkIHRoZSA0ME1IeiBjbG9jayBzZWxlY3Rpb24gd2l0aCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgYm9hcmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5pdFBX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V00gbW9kdWxlICovCi0JCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCQkvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIE1vZHVsZSBudW1iZXIgZXJyb3IgKi8KLQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRQV01Jbml0aWFsaXNhdGlvbiAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BXTSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX1RpbWluZ1VuaXQsICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfTG93VGltaW5nLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQVUxPTkdfIHB1bF9IaWdoVGltaW5nLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9TdGFydExldmVsLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9TdG9wTW9kZSwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9TdG9wTGV2ZWwsICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9FeHRlcm5HYXRlLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9JbnRlcnJ1cHRFbmFibGUsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9FbmFibGUpICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIFBXTSAoYl9QV00pIGluaXRpYWxpc2F0aW9uIGZyb20gc2VsZWN0ZWQgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhlICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFBXTSIgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsIHRoaXMgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKSAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfUFdNICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfICBwYl9UaW1pbmdVbml0ICAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogw6ZzICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBzICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCA6IG1uICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX0xvd1RpbWluZyAgICAgIDogTG93IGJhc2UgdGltaW5nIHZhbHVlLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfSGlnaFRpbWluZyAgICAgOiBIaWdoIGJhc2UgdGltaW5nIHZhbHVlLiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9TdGFydExldmVsICAgICAgOiBTdGFydCBwZXJpb2QgbGV2ZWwgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIHBlcmlvZCBzdGFydCB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoIGEgbG93IGxldmVsIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRoZSBwZXJpb2Qgc3RhcnQgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aCBhIGhpZ2ggbGV2ZWx8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgcGJfU3RvcE1vZGUgICAgICAgIDogU3RvcCBtb2RlIHNlbGVjdGlvbiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIFBXTSBpcyBzdG9wcGVkICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RseSBhZnRlciB0aGUgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYW5kIGJyZWFrIHRoZXwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0IHBlcmlvZCAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IEFmdGVyIHRoZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9EaXNhYmxlUFdNInwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0aGUgUFdNIGlzICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3BwZWQgYXQgdGhlIGVuZCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSBsYXN0IHBlcmlvZCBjeWNsZXwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9TdG9wTGV2ZWwgICAgICAgIDogU3RvcCBQV00gbGV2ZWwgc2VsZWN0aW9uIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBvdXRwdXQgc2lnbmFsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2VlcCB0aGUgbGV2ZWwgYWZ0ZXJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00ifAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBUaGUgb3V0cHV0IHNpZ25hbCBpc3wKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldCB0byBsb3cgYWZ0ZXIgdGhlfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSJ8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IFRoZSBvdXRwdXQgc2lnbmFsIGlzfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0IHRvIGhpZ2ggYWZ0ZXIgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00ifAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgcGJfRXh0ZXJuR2F0ZSAgICAgIDogRXh0ZXJuIGdhdGUgYWN0aW9uICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24gICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRXh0ZXJuIGdhdGUgc2lnbmFsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3QgdXNlZC4gICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IEV4dGVybiBnYXRlIHNpZ25hbCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlZC4gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSBQV00gfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0LiAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwX0VOQUJMRSA6ICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHRoZSBQV00gaW50ZXJydXB0fAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBIGludGVycnVwdCBvY2N1ciBhZnRlciB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVhY2ggcGVyaW9kICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfRElTQUJMRSA6ICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHRoZSBQV00gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9FbmFibGUgICAgICAgICAgOiBJbmRpY2F0ZSBpZiB0aGUgUFdNIGlzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZWQgb3Igbm8gICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogUFdNIG5vdCBlbmFibGVkICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBQV00gZW5hYmxlZCAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIFBXTSBtb2R1bGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFBXTSBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNTogUFdNIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0UFdNIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfR2V0UFdNSW5pdGlhbGlzYXRpb24oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKLQkJCQkJICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAotCQkJCQkgICB1bnNpZ25lZCBjaGFyIGJfUFdNLAotCQkJCQkgICB1bnNpZ25lZCBjaGFyICpwYl9UaW1pbmdVbml0LAotCQkJCQkgICB1bnNpZ25lZCBpbnQgKnB1bF9Mb3dUaW1pbmcsCi0JCQkJCSAg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KioqKiovCi0JCQkJLyogVGVzdCBpZiBQV00gaW5pdGlhbGlzZWQgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZHdfU3RhdHVzID0gaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQkJdWlfQWRkcmVzcyArIDEyICsgKDIwICogYl9QV00pICsKLQkJCQkJKDY0ICogYl9Nb2R1bE5icikpOwotCi0JCQkJaWYgKGR3X1N0YXR1cyAmIDB4MTApIHsKLQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBSZWFkIHRoZSBsb3cgdGltaW5nICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkqcHVsX0xvd1RpbWluZyA9Ci0JCQkJCQlpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQkJdWlfQWRkcmVzcyArIDAgKyAoMjAgKiBiX1BXTSkgKwotCQkJCQkJKDY0ICogYl9Nb2R1bE5icikpOwotCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFJlYWQgdGhlIGhpZ2ggdGltaW5nICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJKnB1bF9IaWdoVGltaW5nID0KLQkJCQkJCWlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJCQl1aV9BZGRyZXNzICsgNCArICgyMCAqIGJfUFdNKSArCi0JCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCQkJLyoqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBSZWFkIHRoZSBjb21tYW5kICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlkd19Db21tYW5kID0gaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQkJCXVpX0FkZHJlc3MgKyA4ICsgKDIwICogYl9QV00pICsKLQkJCQ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Ci0JCQkodW5zaWduZWQgY2hhciAqKSAmZGF0YVs4XQkvKiAgcGJfRW5hYmxlICovCi0JCQkpOwotCQlicmVhazsKLQotCWRlZmF1bHQ6Ci0JCXByaW50aygiIENvbmZpZyBQYXJhbWV0ZXIgV3JvbmdcbiIpOwotCX0KLQotCWlmIChpX1JldHVyblZhbHVlID49IDApCi0JCWlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOwotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gICAgIGlfQVBDSTE3MTBfRW5hYmxlUFdNICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX1BXTSwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfU3RhcnRMZXZlbCwgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9TdG9wTW9kZSwgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX1N0b3BMZXZlbCwgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfRXh0ZXJuR2F0ZSwgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9JbnRlcnJ1cHRFbmFibGUpICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBFbmFibGUgdGhlIHNlbGVjdGVkIFBXTSAoYl9QV00pIGZyb20gc2VsZWN0ZWQgbW9kdWxlICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsTmJyKS4gWW91IG11c3QgY2FsbGluZyB0aGUgImlfQVBDSTE3MTBfSW5pdFBXTSJ8Ci18ICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsIHRoaXMgZnVuY3Rpb24uICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJZiB5b3UgZW5hYmxlIHRoZSBQV00gaW50ZXJydXB0LCB0aGUgUFdNIGdlbmVyYXRlIGEgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCBhZnRlciBlYWNoIHBlcmlvZC4gICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiIGFuZCB0aGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICBJbnRlcnJ1cHQgbWFzayBkZXNjcmlwdGlvbiBjaGFwdGVyLiAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9QV00gICAgICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1N0YXJ0TGV2ZWwgICAgICA6IFN0YXJ0IHBlcmlvZCBsZXZlbCBzZWxlY3Rpb24gfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBUaGUgcGVyaW9kIHN0YXJ0IHdpdGggYSB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvdyBsZXZlbCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogVGhlIHBlcmlvZCBzdGFydCB3aXRoIGEgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaWdoIGxldmVsICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TdG9wTW9kZSAgICAgICAgOiBTdG9wIG1vZGUgc2VsZWN0aW9uICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIFBXTSBpcyBzdG9wcGVkICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RseSBhZnRlciB0aGUgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00iIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYW5kIGJyZWFrIHRoZSAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0IHBlcmlvZCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IEFmdGVyIHRoZSAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSIgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdGhlIFBXTSBpcyAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdG9wcGVkIGF0IHRoZSBlbmQgZnJvbXwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3QgcGVyaW9kIGN5Y2xlLiAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfU3RvcExldmVsICAgICAgIDogU3RvcCBQV00gbGV2ZWwgc2VsZWN0aW9uICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBvdXRwdXQgc2lnbmFsIGtlZXAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGxldmVsIGFmdGVyIHRoZSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9EaXNhYmxlUFdNIiB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogVGhlIG91dHB1dCBzaWduYWwgaXMgc2V0fAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBsb3cgYWZ0ZXIgdGhlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00iIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBUaGUgb3V0cHV0IHNpZ25hbCBpcyBzZXR8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIGhpZ2ggYWZ0ZXIgdGhlICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSIgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9FeHRlcm5HYXRlICAgICAgOiBFeHRlcm4gZ2F0ZSBhY3Rpb24gc2VsZWN0aW9uIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRXh0ZXJuIGdhdGUgc2lnbmFsIG5vdCAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VkLiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IEV4dGVybiBnYXRlIHNpZ25hbCB1c2VkLnwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSBQV00gICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0LiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwX0VOQUJMRSA6ICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHRoZSBQV00gaW50ZXJydXB0ICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBIGludGVycnVwdCBvY2N1ciBhZnRlciAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVhY2ggcGVyaW9kICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfRElTQUJMRSA6ICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHRoZSBQV00gaW50ZXJydXB0ICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogIE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiAgVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6ICBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiAgUFdNIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6ICBQV00gbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRQV00iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiAgUFdNIHN0YXJ0IGxldmVsIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTc6ICBQV00gc3RvcCBtb2RlIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtODogIFBXTSBzdG9wIGxldmVsIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC05OiAgRXh0ZXJuIGdhdGUgc2lnbmFsIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTEwOiBJbnRlcnJ1cHQgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTE6IEludGVycnVwdCBmdW5jdGlvbiBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0VuYWJsZVBXTShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCXVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5iciwKLQkJCQl1bnNpZ25lZCBjaGFyIGJfUFdNLAotCQkJCXVuc2lnbmVkIGNoYXIgYl9TdGFydExldmVsLAotCQkJCXVuc2lnbmVkIGNoYXIgYl9TdG9wTW9kZSwKLQkJCQl1bnNpZ25lZCBja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dGF0dXMgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgMTIgKyAoMjAgKiBiX1BXTSkgKwotCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCQlpZiAoZHdfU3RhdHVzICYgMHgxMCkgewotCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGVzdCB0aGUgc3RhcnQgbGV2ZWwgc2VsZWN0aW9uICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmIChiX1N0YXJ0TGV2ZWwgPD0gMSkgewotCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IHRoZSBzdG9wIG1vZGUgKi8KLQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoYl9TdG9wTW9kZSA8PSAxKSB7Ci0JCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgdGhlIHN0b3AgbGV2ZWwgKi8KLQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlpZiAoYl9TdG9wTGV2ZWwgPD0gMikgewotCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFRlc3QgdGhlIGV4dGVybiBnYXRlIG1vZGUgKi8KLQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCWlmIChiX0V4dGVybkdhdGUKLQkJCQkJCQkJCTw9IDEpIHsKLQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJCS8qIFRlc3QgdGhlIGludGVycnVwdCBhY3Rpb24gKi8KLQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioq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0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDpCWVRFXyBiX0JvYXJkSGFuZGxlIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICgwIHRvIDMpICAgfAotfCAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9QV00gICAgICAgICA6IFNlbGVjdGVkIFBXTSAoMCBvciAxKSAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogUFdNIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBQV00gbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRQV00iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNjogUFdNIG5vdCBlbmFibGVkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9FbmFibGVQV00iICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfRGlzYWJsZVBXTShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotCQkJCSB1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCi0JCQkJIHVuc2lnbmVkIGNoYXIgYl9QV00pCi17Ci0Jc3RydWN0IGFkZGlfcHJpdmF0ZSAqZGV2cHJpdiA9IGRldi0+cHJpdmF0ZTsKLQlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7Ci0JdW5zaWduZWQgaW50IGR3X1N0YXR1czsKLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JCS8qKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgUFdNICovCi0JCS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sZSAqLwotCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIFBXTSBtb2R1bGVcbiIpOwotCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwotCQl9Ci0JfSBlbHNlIHsKLQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JCS8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJRFBSSU5USygiTW9kdWxlIG51bWJlciBlcnJvclxuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKLX0KLQotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfU2V0TmV3UFdNVGltaW5nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9QV00sICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX0Nsb2NrU2VsZWN0aW9uLCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9Mb3dUaW1pbmcsICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgIHVsX0hpZ2hUaW1pbmcpICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFNldCBhIG5ldyB0aW1pbmcuIFRoZSB1bF9Mb3dUaW1pbmcsIHVsX0hpZ2hUaW1pbmcgYW5kICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdWxfVGltaW5nVW5pdCBkZXRlcm1pbmUgdGhlIGxvdy9oaWdoIHRpbWluZyBiYXNlIGZvciAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB0aGUgcGVyaW9kLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfUFdNICAgICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9UaW1pbmdVbml0ICAgICA6IEJhc2UgdGltaW5nIFVuaXQgKDAgdG8gNCkgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogbnMgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiDDpnMgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBtcyAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyA6IHMgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0IDogbW4gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUxPTkdfICAgIHVsX0xvd1RpbWluZyAgICAgOiBMb3cgYmFzZSB0aW1pbmcgdmFsdWUuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICAgdWxfSGlnaFRpbWluZyAgICA6IEhpZ2ggYmFzZSB0aW1pbmcgdmFsdWUuICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogUFdNIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC01OiBQV00gbm90IGluaXRpYWxpc2VkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTY6IFRpbWluZyBVbml0IHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNzogTG93IGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC04OiBIaWdoIGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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FsdWUgPSBpbnNuLT5uOwotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRQV01TdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX1BXTSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX1BXTU91dHB1dFN0YXR1cywgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0V4dGVybkdhdGVTdGF0dXMpICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgc3RhdHVzIGZyb20gc2VsZWN0ZWQgUFdNIChiX1BXTSkgZnJvbSAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgbW9kdWxlIChiX01vZHVsTmJyK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ICAgICAgICAgICAgICAgICAgICAgICAgIGlzIGxvdy4gICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogVGhlIFBXTSBvdXRwdXQgbGV2ZWx8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcyBoaWdoLiAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9FeHRlcm5HYXRlU3RhdHVzIDogUmV0dXJuIHRoZSBleHRlcm4gZ2F0ZSAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCBzdGF0dXMuICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIGV4dGVybiBnYXRlIGlzICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb3cuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRoZSBleHRlcm4gZ2F0ZSBpcyAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlnaC4KLSAgICBwYl9QV01PdXRwdXRTdGF0dXMJPSh1bnNpZ25lZCBjaGFyICopIGRhdGFbMF07Ci0JcGJfRXh0ZXJuR2F0ZVN0YXR1cyA9KHVuc2lnbmVkIGNoYXIgKikgZGF0YVsxXTsgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogUFdNIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBQV00gbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRQV00iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNjogUFdNIG5vdCBlbmFibGVkIHNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9FbmFibGVQV00ifAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNzEwX0luc25SZWFkR2V0UFdNU3RhdHVzKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotCQkJCQkgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0JCQkJCSAgIHVuc2lnbmVkIGludCAqZGF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JCQl9CS8qICBpZiAoZHdfU3RhdHVzICYgMHgxMCkgKi8KLQkJCQllbHNlIHsKLQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBQV00gbm90IGluaXRpYWxpc2VkICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlEUFJJTlRLKCJQV00gbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEwKSAqLwotCQkJfQkvKiAgaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkgKi8KLQkJCWVsc2UgewotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCi0JCX0gZWxzZSB7Ci0JCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAqLwotCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCQkvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIE1vZHVsZSBudW1iZXIgZXJyb3IgKi8KLQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEso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AgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgIGJfVHVybkNwdExlbmd0aCwgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgYl9QQ0lJbnB1dENsb2NrLCAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gIHVsX1NTSU91dHB1dENsb2NrLCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgIGJfU1NJQ291bnRpbmdNb2RlKSAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlIHRoZSBTU0kgb3BlcmF0aW5nIG1vZGUgZnJvbSBzZWxlY3RlZCBtb2R1bGUgIHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhpcyBmdW5jdGlvbiBiZSBmb3IgeW91fAotfCAgICAgICAgICAgICAgICAgICAgIGNhbGwgYW55IG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiBTU0kuICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9TU0lQcm9maWxlICAgICAgICAgOiBTZWxlY3Rpb24gZnJvbSBTU0kgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2ZpbGUgbGVuZ3RoICgyIHRvIDMyKS58Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfUG9zaXRpb25UdXJuTGVuZ3RoIDogU2VsZWN0aW9uIGZyb20gU1NJICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiBkYXRhIGxlbmd0aCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIHRvIDMxKS4gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfVHVybkNwdExlbmd0aCAgICAgIDogU2VsZWN0aW9uIGZyb20gU1NJIHR1cm4gIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudGVyIGRhdGEgbGVuZ3RoICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIHRvIDMxKS4gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAgIGJfUENJSW5wdXRDbG9jayAgICAgIDogU2VsZWN0aW9uIGZyb20gUENJIGJ1cyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwXzMwTUhaIDogICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIFBDIGhhdmUgYSBQQ0kgYnVzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayBmcm9tIDMwIE1IeiAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwXzMzTUhaIDogICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIFBDIGhhdmUgYSBQQ0kgYnVzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayBmcm9tIDMzIE1IeiAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9TU0lPdXRwdXRDbG9jayAgICA6IFNlbGVjdGlvbiBmcm9tIFNTSSBvdXRwdXR8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2suICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGcm9tICAyMjkgdG8gNSAwMDAgMDAwIEh6fAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAzMCBNSHogc2VsZWN0aW9uLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJvbSAgMjUyIHRvIDUgMDAwIDAwMCBIenwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgMzMgTUh6IHNlbGVjdGlvbi4gICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgICBiX1NTSUNvdW50aW5nTW9kZSAgICA6IFNTSSBjb3VudGluZyBtb2RlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBBUENJMTcxMF9CSU5BUllfTU9ERSA6ICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCaW5hcnkgY291bnRpbmcgbW9kZS4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfR1JBWV9NT0RFIDogICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR3JheSBjb3VudGluZyBtb2RlLgotCi0JYl9Nb2R1bE5icgkJCT0gQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7Ci0JYl9TU0lQcm9maWxlCQk9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzBdOwotCWJfUG9zaXRpb25UdXJuTGVuZ3RoPSAodW5zaWduZWQgY2hhcikgZGF0YVsxXTsKLQliX1R1cm5DcHRMZW5ndGgJCT0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMl07Ci0JYl9QQ0lJbnB1dENsb2NrCQk9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzNdOwotCXVsX1NTSU91dHB1dENsb2NrCT0gKHVuc2lnbmVkIGludCkgZGF0YVs0XTsKLQliX1NTSUNvdW50aW5nTW9kZQk9ICh1bnNpZ25lZCBjaGFyKSAgZGF0YVs1XTsgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogVGhlIG1vZHVsZSBwYXJhbWV0ZXIgaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIFNTSSBtb2R1bGUgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTQ6IFRoZSBzZWxlY3RlZCBTU0kgcHJvZmlsZSBsZW5ndGggaXMgd3JvbmcgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNTogVGhlIHNlbGVjdGVkIFNTSSBwb3NpdGlvbiBkYXRhIGxlbmd0aCBpcyB3cm9uZyAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC02OiBUaGUgc2VsZWN0ZWQgU1NJIHR1cm4gY291bnRlciBkYXRhIGxlbmd0aCBpcyB3c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Qcm9maWxlIDwgMzMpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgdGhlIFNTSSBwb3NpdGlvbiBkYXRhIGxlbmd0aCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoYl9Qb3NpdGlvblR1cm5MZW5ndGggPiAwCi0JCQkJCSYmIGJfUG9zaXRpb25UdXJuTGVuZ3RoIDwgMzIpIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGVzdCB0aGUgU1NJIHR1cm4gY291bnRlciBkYXRhIGxlbmd0aCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmIChiX1R1cm5DcHRMZW5ndGggPiAwCi0JCQkJCQkmJiBiX1R1cm5DcHRMZW5ndGggPCAzMikgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgdGhlIHByb2ZpbGUgbGVuZ3RoICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlpZiAoKGJfVHVybkNwdExlbmd0aCArCi0JCQkJCQkJCWJfUG9zaXRpb25UdXJuTGVuZ3RoKQotCQkJCQkJCTw9IGJfU1NJUHJvZmlsZSkgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBUZXN0IHRoZSBQQ0kgaW5wdXQgY2xvY2sgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlpZiAoYl9QQ0lJbnB1dENsb2NrID09Ci0JCQkJCQkJCUFQQ0kxNzEwXzMwTUhaCi0JCQkJCQkJCXx8Ci0JCQkJCQkJCWJfUENJSW5wdXRDbG9jawot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qKioqKioqKiovCi0JCQkJCQkJCQkJLyogVGhlIHNlbGVjdGVkIFNTSSBjb3VudGluZyBtb2RlIHBhcmFtZXRlciBpcyB3cm9uZyAqLwotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJCURQUklOVEsoIlRoZSBzZWxlY3RlZCBTU0kgY291bnRpbmcgbW9kZSBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQkJCQkJCQkJCWlfUmV0dXJuVmFsdWUKLQkJCQkJCQkJCQkJPQotCQkJCQkJCQkJCQktOTsKLQkJCQkJCQkJCX0KLQkJCQkJCQkJfSBlbHNlIHsKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJLyogVGhlIHNlbGVjdGVkIFNTSSBvdXRwdXQgY2xvY2sgaXMgd3JvbmcgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgU1NJIG91dHB1dCBjbG9jayBpcyB3cm9uZ1xuIik7Ci0JCQkJCQkJCQlpX1JldHVyblZhbHVlCi0JCQkJCQkJCQkJPQotCQkJCQkJCQkJCS04OwotCQkJCQkJCQl9Ci0JCQkJCQkJfSBlbHNlIHsKLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBUaGUgc2VsZWN0ZWQgUENJIGlucHV0IGNsb2NrIGlzIHdyb25nICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgUENJIGlucHV0IGNsb2NrIGlzIHdyb25nXG4iKTsKLQkJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9Ci0JCQkJCQkJCQktNzsKLQkJCQkJCQl9Ci0JCQkJCQl9IGVsc2UgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogVGhlIHNlbGVjdGVkIFNTSSBwcm9maWxlIGxlbmd0aCBpcyB3cm9uZyAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgU1NJIHByb2ZpbGUgbGVuZ3RoIGlzIHdyb25nXG4iKTsKLQkJCQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQkJCQl9Ci0JCQkJCX0gZWxzZSB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGhlIHNlbGVjdGVkIFNTSSB0dXJuIGNvdW50ZXIgZGF0YSBsZW5ndGggaXMgd3JvbmcgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCURQUklOVEsoIlRoZSBzZWxlY3RlZCBTU0kgdHVybiBjb3VudGVyIGRhdGEgbGVuZ3RoIGlzIHdyb25nXG4iKTsKLQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNjsKLQkJCQkJfQotCQkJCX0gZWxzZSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRoZSBzZWxlY3RlZCBTU0kgcG9zaXRpb24gZGF0YSBsZW5ndGggaXMgd3JvbmcgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgU1NJIHBvc2l0aW9uIGRhdGEgbGVuZ3RoIGlzIHdyb25nXG4iKTsKLQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCX0KLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGhlIHNlbGVjdGVkIFNTSSBwcm9maWxlIGxlbmd0aCBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVGhlIHNlbGVjdGVkIFNTSSBwcm9maWxlIGxlbmd0aCBpcyB3cm9uZ1xuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBTU0kgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgU1NJIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gIGlfQVBDSTE3MTBfUmVhZDFTU0lWYWx1ZSAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9TZWxlY3RlZFNTSSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1Bvc2l0aW9uLCAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfVHVybkNwdCkKLSBpbnQgaV9BUENJMTcxMF9SZWFkU1NJVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldixzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDoKLQotCi0JCQkJCQlSZWFkIHRoZSBzZWxlY3RlZCBTU0kgY291bnRlciAoYl9TZWxlY3RlZFNTSSkgZnJvbSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIG1vZHVsZSAoYl9Nb2R1bE5icikuCi0JCQkJCQlvciBSZWFkIGFsbCBTU0kgY291bnRlciAoYl9TZWxlY3RlZFNTSSkgZnJvbSAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfU2VsZWN0ZWRTU0kgICAgICAgICA6IFNlbGVjdGlvbiBmcm9tIFNTSSAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRlciAoMCB0byAyKQotCi0gICAgYl9Nb2R1bE5icgkJPSAgICh1bnNpZ25lZCBjaGFyKSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX1NlbGVjdGVkU1NJCT0JKHVuc2lnbmVkIGNoYXIpIENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOyAoaW4gY2FzZSBvZiBzaW5nbGUgc3NpKQotCWJfUmVhZFR5cGUJCT0JKHVuc2lnbmVkIGNoYXIpIENSX1JBTkdFKGluc24tPmNoYW5zcGVjKTsKLXwKLSstLS0tLS0tLS0tLS0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VTCkgPT0gQVBDSTE3MTBfU1NJX0NPVU5URVIpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBTU0kgaW5pdGlhbGlzZWQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCXNfU1NJQ291bnRlckluZm8uYl9TU0lJbml0ID09IDEpIHsKLQotCQkJCXN3aXRjaCAoYl9SZWFkVHlwZSkgewotCi0JCQkJY2FzZSBBUENJMTcxMF9TU0lfUkVBRDFWQUxVRToKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IHRoZSBzZWxlY3RlZCBTU0kgY291bnRlciBudW1iZXIgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmIChiX1NlbGVjdGVkU1NJIDwgMykgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFN0YXJ0IHRoZSBjb252ZXJzaW9uICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlvdXRsKDAsIGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQkJCQl1aV9BZGRyZXNzICsgOCArCi0JCQkJCQkJKDY0ICogYl9Nb2R1bE5icikpOwotCi0JCQkJCQlkbyB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkvKiBSZWFkIHRoZSBzdGF0dXMgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJZHdfU3RhdHVzUmVnID0KLQkJCQkJCQkJaW5sKGRldnByaXYtPgotCQkJCQkJCQlzX0JvYXJkSW5mb3MuCi0JCQkJCQkJCXVpX0FkZHJ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KioqKioqKioqLwotCi0JCQkJRFBSSU5USygiU1NJIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBTU0kgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgU1NJIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0KLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3JcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyAgIGlfQVBDSTE3MTBfUmVhZFNTSTFEaWdpdGFsSW5wdXQgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfSW5wdXRDaGFubmVsLCAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfQ2hhbm5lbFN0YXR1cykgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDoKLQkJCQkJKDApIFNldCB0aGUgZGlnaXRhbCBvdXRwdXQgZnJvbSBzZWxlY3RlZCBTU0kgbW9kdWxlICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsZU5icikgT04KLSAgICAgICAgICAgICAgICAgICAgKDEpIFNldCB0aGUgZGlnaXRhbCBvdXRwdXQgZnJvbSBzZWxlY3RlZCBTU0kgbW9kdWxlICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsZU5icikgT0ZGCi0JCQkJCSgyKVJlYWQgdGhlIHN0YXR1cyBmcm9tIHNlbGVjdGVkIFNTSSBkaWdpdGFsIGlucHV0ICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgKGJfSW5wdXRDaGFubmVsKQotICAgICAgICAgICAgICAgICAgICAoMylSZWFkIHRoZSBzdGF0dXMgZnJvbSBhbGwgU1NJIGRpZ2l0YWwgaW5wdXRzIGZyb20gICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIFNTSSBtb2R1bGUgKGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICBDUl9BUkVGICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0lucHV0Q2hhbm5lbCBDUl9DSEFOICAgICAgIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdIHdoaWNoIElPVFlQRSAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0ICggMCB0byAyKSAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfICBwYl9DaGFubmVsU3RhdHVzICAgIDogRGlnaXRhbCBpbnB1dCBjaGFubmVsICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICAgc3RhdHVzICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ2hhbm5sZSBpcyBub3QgYWN0aXZlfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDaGFubmxlIGlzIGFjdGl2ZSAgICB8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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBUZWwgOiArNDkgKDApIDcyMjMvOTQ5My0wICAgICB8IGVtYWlsICAgIDogaW5mb0BhZGRpLWRhdGEuY29tICAgICAgICAgfAotICB8IEZheCA6ICs0OSAoMCkgNzIyMy85NDkzLTkyICAgIHwgSW50ZXJuZXQgOiBodHRwOi8vd3d3LmFkZGktZGF0YS5jb20gICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBQcm9qZWN0ICAgICA6IEFQSSBBUENJMTcxMCAgICB8IENvbXBpbGVyIDogZ2NjICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8IE1vZHVsZSBuYW1lIDogVE9SLkMgICAgICAgICAgIHwgVmVyc2lvbiAgOiAyLjk2ICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBQcm9qZWN0IG1hbmFnZXI6IEVyaWMgU3RvbHogICB8IERhdGUgICAgIDogIDAyLzEyLzIwMDIgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgRGVzY3JpcHRpb24gOiAgIEFQQ0ktMTcxMCB0b3IgY291bnRlciBtb2R1bGUgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Ub3JDb3VudGVyLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9UaW1pbmdJbnRlcnZhbCwgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1JlYWxUaW1pbmdJbnRlcnZhbCkgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZSB0aGUgc2VsZWN0ZWQgdG9yIGNvdW50ZXIgKGJfVG9yQ291bnRlcikgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgZnJvbSBzZWxlY3RlZCBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBUaGUgdWxfVGltaW5nSW50ZXJ2YWwgYW5kIHVsX1RpbWluZ1VuaXQgZGV0ZXJtaW5lIHRoZSAgfAotfCAgICAgICAgICAgICAgICAgICAgIHRpbWluZyBiYXNlIGZvciB0aGUgbWVhc3VyZW1lbnQuICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVGhlIHB1bF9SZWFsVGltaW5nSW50ZXJ2YWwgcmV0dXJuIHRoZSByZWFsIHRpbWluZyAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB2YWx1ZS4gWW91IG11c3QgY2FsbGluZyB0aGlzIGZ1bmN0aW9uIGJlIGZvciB5b3UgY2FsbCAgfAotfCAgICAgICAgICAgICAgICAgICAgIGFueSBvdGhlciBmdW5jdGlvbiB3aXRjaCBhY2Nlc3Mgb2YgdGhlIHRvciBjb3VudGVyLiAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6ICAgIHwKLXwKLQkJQ1JfQVJFRgl1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICBkYXRhWzBdIHVuc2lnbmVkIGNoYXJfICAgYl9Ub3JDb3VudGVyICAgICA6IFRvciBjb3VudGVyIHNlbGVjdGlvbiAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgb3IgMSkuICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgIGRhdGFbMV0gdW5zaWduZWQgY2hhcl8gICBiX1BDSUlucHV0Q2xvY2sgIDogU2VsZWN0aW9uIGZyb20gUENJIGJ1cyBjbG9ja3wKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwXzMwTUhaIDogICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIFBDIGhhdmUgYSBQQ0kgYnVzICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayBmcm9tIDMwIE1IeiAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwXzMzTUhaIDogICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIFBDIGhhdmUgYSBQQ0kgYnVzICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9jayBmcm9tIDMzIE1IeiAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwXzQwTUhaICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIEFQQ0ktMTcxMCBoYXZlIGEgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ3JhdGVkIDQwTWh6ICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YXJ0ei4gICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfR0FURV9JTlBVVCAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2VkIHRoZSBnYXRlIGlucHV0IGZvciAgIHwKLXwJCQkJCQkgICB0aGUgYmFzZSBjbG9jay4gSWYgeW91ICAgIHwKLXwJCQkJCQkgICBoYXZlIHNlbGVjdGVkIHRoaXMgb3B0aW9uLHwKLXwJCQkJCQkgICB0aGFuIGl0IGlzIG5vdCBwb3NzaWJsIHRvIHwKLXwJCQkJCQkgICB1c2VkIHRoZSBnYXRlIGlucHV0IGZvciAgIHwKLXwJCQkJCQkgICBlbmFibGVkIHRoZSBhY3F1aXNpdGlvbiAgIHwKLXwgICAgICAgICAgIGRhdGFbMl0gdW5zaWduZWQgY2hhcl8gICBiX1RpbWluZ1VuaXQgICAgOiBCYXNlIHRpbWluZyB1bml0ICgwIHRvIDQpICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogwrVzICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBzICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCA6IG1uICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgZGF0YVszXSAgICAgICAgICBVTE9OR18gdWxfVGltaW5nSW50ZXJ2YWwgOiBCYXNlIHRpbWluZyB2YWx1ZS4gICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUFVMT05HXyAgcHVsX1JlYWxUaW1pbmdJbnRlcnZhbCA6IFJlYWwgIGJhc2UgdGltaW5nICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLiAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIHRvciBjb3VudGVyIG1vZHVsZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFRvciBjb3VudGVyIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNTogVGhlIHNlbGVjdGVkIFBDSSBpbnB1dCBjbG9jayBpcyB3cm9uZyAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC02OiBUaW1pbmcgdW5pdCBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTc6IEJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtODogWW91IGNhbiBub3QgdXNlZCB0aGUgNDBNSHogY2xvY2sgc2VsZWN0aW9uIHdpY2ggICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIGJvYXJkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTk6IFlvdSBjYW4gbm90IHVzZWQgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aWNoICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyBUT1IgdmVyc2lvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotCi1zdGF0aWMgaW50IGlfQVBDSTE3MTBfSW5zbkNvbmZpZ0luaXRUb3JDb3VudGVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJCSAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLQkJCQkJICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwKLQkJCQkJICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSkKLXsKLQlzdHJ1Y3QgYWRkaV9wcml2YXRlICpkZXZwcml2ID0gZGV2LT5wcml2YXRlOwotCWludCBpX1JldHVyblZhbHVlID0gMDsKLQl1bnNpZ25lZCBpbnQgdWxfVGltZXJWYWx1ZSA9IDA7Ci0JdW5zaWduZWQgaW50IGR3X0NvbW1hbmQ7Ci0JZG91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RkYwMDAwVUwpID09IEFQQ0kxNzEwX1RPUl9DT1VOVEVSKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IHRoZSB0b3IgY291bnRlciBzZWxlY3Rpb24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJaWYgKGJfVG9yQ291bnRlciA8PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCB0aGUgUENJIGJ1cyBjbG9jayAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKChiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzBNSFopIHx8Ci0JCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfMzNNSFopIHx8Ci0JCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0gQVBDSTE3MTBfNDBNSFopIHx8Ci0JCQkJCShiX1BDSUlucHV0Q2xvY2sgPT0KLQkJCQkJCUFQQ0kxNzEwX0dBVEVfSU5QVVQpKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IHRoZSB0aW1pbmcgdW5pdCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlpZiAoKGJfVGltaW5nVW5pdCA8PSA0KQotCQkJCQkJfHwgKGJfUENJSW5wdXRDbG9jayA9PQotCQkJCQkJCUFQQ0kxNzEwX0dBVEVfSU5QVVQpKSB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRlc3QgdGhlIGJhc2UgdGltaW5nIHNlbGVjdGlvbiAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmICgoKGJfUEN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gMHhGRkZGKSA+PSAweDMxMzEpKSB8fCAoKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF9HQVRFX0lOUFVUKSAmJiAoKGRldnByaXYtPnNfQm9hcmRJbmZvcy5kd19Nb2xkdWxlQ29uZmlndXJhdGlvbltiX01vZHVsTmJyXSAmIDB4RkZGRikgPj0gMHgzMTMyKSkgfHwgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF8zME1IWikgfHwgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF8zM01IWikpIHsKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJLyogVGVzdCBpZiBub3QgZXh0ZXJuIGNsb2NrIHVzZWQgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQlpZiAoYl9QQ0lJbnB1dENsb2NrICE9IEFQQ0kxNzEwX0dBVEVfSU5QVVQpIHsKLQkJCQkJCQkJCQlmcHVfYmVnaW4KLQkJCQkJCQkJCQkJKCk7Ci0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCQkJLyogQ2FsY3VsYXRlIHRoZSB0aW1lciAwIGRpdmlzaW9uIGZhdG9yICovCi0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJCQlzd2l0Y2ggKGJfVGltaW5nVW5pdCkgewotCQkJCSAgICAgIC8qKioqKiovCi0JCQkJCQkJCQkJCS8qIG5zICovCi0JCQkJICAgICAgLyoqKioqKi8KLQotCQkJCQkJCQkJCWNhc2UgMDoKLQotCQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJCQkvKiBUaW1lciAwIGZhY3RvciAqLwotCQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQkJCXVsX1R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ioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJaWYgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF80ME1IWikgewotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJCS8qIFNldCB0aGUgNDAgTUh6IHNlbGVjdGlvbiAqLwotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQkJZHdfQ29tbWFuZAotCQkJCQkJCQkJCQk9Ci0JCQkJCQkJCQkJCWR3X0NvbW1hbmQKLQkJCQkJCQkJCQkJfAotCQkJCQkJCQkJCQkweDEwOwotCQkJCQkJCQkJfQotCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJLyogVGVzdCBpZiBleHRlcm4gY2xvY2sgdXNlZCAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJaWYgKGJfUENJSW5wdXRDbG9jayA9PSBBUENJMTcxMF9HQVRFX0lOUFVUKSB7Ci0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCQkJLyogU2V0IHRoZSA0MCBNSHogc2VsZWN0aW9uICovCi0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJCQlkd19Db21tYW5kCi0JCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkJZHdfQ29tbWFuZAotCQkJCQkJCQkJCQl8Ci0JCQkJCQkJCQkJCTB4MjA7Ci0JCQkJCQkJCQl9Ci0KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJCS8qIFdyaXRlIHRoZSBuZXcgY29tbWFuZCAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQlvdXRsKGR3X0NvbW1hbmQsIGRldnByaXYtPnNfQm9hcmRJbm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KioqKioqKiovCi0JCQkJCQkJCQkvKiBUT1IgdmVyc2lvbiBlcnJvciBmb3IgNDBNSHogY2xvY2sgc2VsZWN0aW9uICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQlEUFJJTlRLKCJUT1IgdmVyc2lvbiBlcnJvciBmb3IgNDBNSHogY2xvY2sgc2VsZWN0aW9uXG4iKTsKLQkJCQkJCQkJCWlfUmV0dXJuVmFsdWUKLQkJCQkJCQkJCQk9Ci0JCQkJCQkJCQkJLTk7Ci0JCQkJCQkJCX0KLQkJCQkJCQl9IGVsc2UgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFlvdSBjYW4gbm90IHVzZWQgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aWNoIHRoaXMgYm9hcmQgKi8KLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCURQUklOVEsoIllvdSBjYW4gbm90IHVzZWQgdGhlIDQwTUh6IGNsb2NrIHNlbGVjdGlvbiB3aWNoIHRoaXMgYm9hcmRcbiIpOwotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCS04OwotCQkJCQkJCX0KLQkJCQkJCX0gZWxzZSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIEJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCURQUklOVEsoIkJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCQkJaV9SZXR1cm5WY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JNb2RlID49IDAgJiYgYl9Ub3JDb3VudGVyTW9kZSA8PSA3KSAqLwotCQkJZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUb3IgQ291bnRlciBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVG9yIENvdW50ZXIgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9CS8qICBpZiAoYl9Ub3JDb3VudGVyTW9kZSA+PSAwICYmIGJfVG9yQ291bnRlck1vZGUgPD0gNykgKi8KLQkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSB0b3IgY291bnRlciBtb2R1bGUgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIHRvciBjb3VudGVyIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQlkYXRhWzBdID0gKHVuc2lnbmVkIGludCkgdWxfUmVhbFRpbWluZ0ludGVydmFsOwotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9FbmFibGVUb3JDb3VudGVyICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlLCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIsICAgICAgICAgICB8Ci18CQkJCQkJIHVuc2lnbmVkIGNoYXJfIGJfVG9yQ291bnRlciwgICAgICAgICB8Ci18CQkJCQkJIHVuc2lnbmVkIGNoYXJfIGJfSW5wdXRNb2RlLCAgICAgICAgICB8Ci18CQkJCQkJIHVuc2lnbmVkIGNoYXJfIGJfRXh0ZXJuR2F0ZSwgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9DeWNsZU1vZGUsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSkgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogRW5hYmxlIHRoZSB0b3IgY291bnRlciAoYl9Ub3JDb3VudGVyKSBmcm9tIHNlbGVjdGVkICAgIHwKLXwJCSAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhlICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRvckNvdW50ZXIiIGZ1bmN0aW9uIGJlIGZvciB5b3UgY2FsbCAgIHwKLXwJCSAgICAgIHRoaXMgZnVuY3Rpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgSWYgeW91IGVuYWJsZSB0aGUgdG9yIGNvdW50ZXIgaW50ZXJydXB0LCB0aGUgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB0b3IgY291bnRlciBnZW5lcmF0ZSBhIGludGVycnVwdCBhZnRlciB0aGUgdGltaW5nIGN5Y2xlfAotfCAgICAgICAgICAgICAgICAgICAgIFNlZSBmdW5jdGlvbiAiaV9BUENJMTcxMF9TZXRCb2FyZEludFJvdXRpbmVYIiBhbmQgdGhlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgSW50ZXJydXB0IG1hc2sgZGVzY3JpcHRpb24gY2hhcHRlciBmcm9tIHRoaXMgbWFudWFsLiAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBUaGUgYl9DeWNsZU1vZGUgcGFyYW1ldGVyIGRldGVybWluZSBpZiB5b3Ugd2lsbCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmVkIGEgc2luZ2xlIG9yIG1vcmUgY3ljbGUuICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAg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lIHNhbWUgd2F5IGFzICAgfAotfAkJCQkJICAgICAgdGhlIHF1YWRydXBsZSBtb2RlLCBleGNlcHQgdGhhdHwKLXwJCQkJCSAgICAgIG9ubHkgb25lIG9mIHRoZSBmb3VyIGVkZ2VzIGlzICB8Ci18CQkJCQkgICAgICBhbmFseXNlZCBwZXIgcGVyaW9kLiAgICAgICAgICAgfAotfAkJCQkJICAgICAgVGhlIGdhdGUgaW5wdXQgaXMgdXNlZCBmb3IgdGhlIHwKLXwJCQkJCSAgICAgIHNpZ25hbCBCICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCQkJCQkJICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9DeWNsZU1vZGUgICAgOiBTZWxlY3RlZCB0aGUgdG9yIGNvdW50ZXIgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcXVpc2l0aW9uIG1vZGUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3IgY291bnRlciBpbnRlcnJ1cHQuICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0VOQUJMRTogICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHRoZSB0b3IgY291bnRlciAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEU6ICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGlzYWJsZSB0aGUgdG9yIGNvdW50ZXIgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSB0b3IgY291bnRlciBtb2R1bGUgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBUb3IgY291bnRlciBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IFRvciBjb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY3Rpb24gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfSW5pdFRvckNvdW50ZXIiICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC02OiBUb3IgaW5wdXQgc2lnbmFsIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTc6IEV4dGVybiBnYXRlIHNpZ25hbCBtb2RlIGlzIHdyb25nICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtODogVG9yIGNvdW50ZXIgYWNxdWlzaXRpb24gbW9kZSBjeWNsZSBpcyB3cm9uZyAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC05OiBJbnRlcnJ1cHQgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTEwOkludGVycnVwdCBmdW5jdGlvbiBub3QgaW5pdGlhbGlzZWQuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgU2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldEJvYXJkSW50Um91dGluZVgiICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotLyoKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfRGlzYWJsZVRvckNvdW50ZXIgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICA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IHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKSB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Ub3JDb3VudGVyICAgOiBUb3IgY291bnRlciBzZWxlY3Rpb24gKDAgb3IgMSkuIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAgMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTI6IE1vZHVsZSBzZWxlY3Rpb24gd3JvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSB0b3IgY291bnRlciBtb2R1bGUgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC00OiBUb3IgY291bnRlciBzZWxlY3Rpb24gaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTU6IFRvciBjb3VudGVyIG5vdCBpbml0aWFsaXNlZCBzZWUgZnVuY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UikgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCB0aGUgdG9yIGNvdW50ZXIgc2VsZWN0aW9uICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChiX1RvckNvdW50ZXIgPD0gMSkgewotCQkJCXN3aXRjaCAoYl9BY3Rpb24pCS8qICBFbmFibGUgb3IgRGlzYWJsZSAqLwotCQkJCXsKLQkJCQljYXNlIEFQQ0kxNzEwX0VOQUJMRToKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGVzdCBpZiB0b3IgY291bnRlciBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWR3X1N0YXR1cyA9Ci0JCQkJCQlpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQkJdWlfQWRkcmVzcyArIDggKwotCQkJCQkJKDE2ICogYl9Ub3JDb3VudGVyKSArCi0JCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJCQkJaWYgKGR3X1N0YXR1cyAmIDB4MTApIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBUZXN0IHRoZSBpbnB1dCBzaWduYWwgbW9kZSAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJaWYgKGJfSW5wdXRNb2RlID09IDAgfHwKLQkJCQkJCQliX0lucHV0TW9kZSA9PSAxIHx8Ci0JCQkJCQkJYl9JbnB1dE1vZGUgPT0KLQkJCQkJCQlBUENJMTcxMF9UT1JfU0lNUExFX01PREUKLQkJCQkJCQl8fCBiX0lucHV0TW9kZSA9PQotCQkJCQkJCUFQQ0kxNzEwX1RPUl9ET1VCTEVfTU9ERQotCQkJCQkJCXx8I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KioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJCQlpZiAoYl9JbnB1dE1vZGUgPiAxKSB7Ci0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCQkJCS8qIEV4dGVybiBnYXRlIGNhbiBub3QgYmUgdXNlZCAqLwotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQkJCWJfRXh0ZXJuR2F0ZQotCQkJCQkJCQkJCQkJPQotCQkJCQkJCQkJCQkJMDsKLQotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJCQkvKiBFbmFibGUgdGhlIGV4dGVybiBnYXRlIGZvciB0aGUgU2lnbmFsIEIgKi8KLQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJCQlkd19Db25maWdSZWcKLQkJCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkJCWR3X0NvbmZpZ1JlZwotCQkJCQkJCQkJCQkJfAotCQkJCQkJCQkJCQkJMHg0MDsKLQotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJCQkJLyogVGVzdCBpZiBzaW1wbGUgbW9kZSAqLwotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJCQlpZiAoYl9JbnB1dE1vZGUgPT0gQVBDSTE3MTBfVE9SX1NJTVBMRV9NT0RFKSB7Ci0JCQkJCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCQkJCQkvKiBFbmFibGUgdGhlIHNpbnBsZSBtb2RlICovCi0JCQkJCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJCQkJCWR3X0NvbmZpZ1JlZwotC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oqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBFeHRlcm4gZ2F0ZSBpbnB1dCBtb2RlIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQlEUFJJTlRLKCJFeHRlcm4gZ2F0ZSBpbnB1dCBtb2RlIGlzIHdyb25nXG4iKTsKLQkJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9Ci0JCQkJCQkJCQktNzsKLQkJCQkJCQl9CS8qICBpZiAoYl9FeHRlcm5HYXRlID49IDAgJiYgYl9FeHRlcm5HYXRlIDw9IDEpICovCi0JCQkJCQl9CS8qICBpZiAoYl9JbnB1dE1vZGUgPj0gMCAmJiBiX0lucHV0TW9kZSA8PSAxKSAqLwotCQkJCQkJZWxzZSB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRvciBpbnB1dCBzaWduYWwgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJRFBSSU5USygiVG9yIGlucHV0IHNpZ25hbCBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNjsKLQkJCQkJCX0KLQkJCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVG9yIGNvdW50ZXIgbm90IGluaXRpYWxpc2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJRFBSSU5USygiVG9yIGNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQkJfQotCQkJCQlicmVhazsKLQotCQkJCWNhc2UgQVBDSTE3MTBfRElTQUJMRToKLQkJCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRlc3QgaWYgdG9yIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlkd19TdGF0dXMgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQkJdWlfQWRkcmVzcyArIDggKwotCQkJCQkJKDE2ICogYl9Ub3JDb3VudGVyKSArCi0JCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUZXN0IGlmIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCWlmIChkd19TdGF0dXMgJiAweDEwKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCBpZiBjb3VudGVyIGVuYWJsZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmIChkd19TdGF0dXMgJiAweDEpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIENsZWFyIHRoZSBpbnRlcnJ1cHQgbW9kZSAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJZGV2cHJpdi0+Ci0JCQkJCQkJCXNfTW9kdWxlSW5mbwotCQkJCQkJCQlbYl9Nb2R1bE5icl0uCi0JCQkJCQkJCXNfVG9yQ291bnRlck1vZHVsZUluZm8uCi0JCQkJCQkJCXNfVG9yQ291bnRlckluZm8KLQkJCQkJCQkJW2JfVG9yQ291bnRlcl0uCi0JCQkJCQkJCWJfS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CkgKi8KLQotCQkJCX0JLyogIHN3aXRjaCAqLwotCQkJfQkvKiAgaWYgKGJfVG9yQ291bnRlciA8PSAxKSAqLwotCQkJZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUb3IgY291bnRlciBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVG9yIGNvdW50ZXIgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTQ7Ci0JCQl9CS8qICBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpICovCi0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgdG9yIGNvdW50ZXIgbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSB0b3IgY291bnRlciBtb2R1bGUgXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3IgXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQotCi0vKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRUb3JDb3VudGVySW5pdGlhbGlzYXRpb24gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICB8Ci18CQkJCQkJIHVuc2lnbmVkIGNoYXJfICAgICBiX1RvckNvdW50ZXIsICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgdW5zaWduZWQgY2hhciAqXyAgIHBiX1RpbWluZ1VuaXQsICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgUFVMT05HXyBwdWxfVGltaW5nSW50ZXJ2YWwsIHwKLXwJCQkJCQkgdW5zaWduZWQgY2hhciAqXyAgIHBiX0lucHV0TW9kZSwgICAgICB8Ci18CQkJCQkJIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9FeHRlcm5HYXRlLCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9DeWNsZU1vZGUsICAgICAgfAotfAkJCQkJCSB1bnNpZ25lZCBjaGFyICpfICAgcGJfRW5hYmxlLCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfSW50ZXJydXB0RW5hYmxlKXwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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LS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfVG9yQ291bnRlciAgIDogVG9yIGNvdW50ZXIgc2VsZWN0aW9uICgwIG9yIDEpCi0KLQliX01vZHVsTmJyCQkJPQlDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX1RvckNvdW50ZXIJCT0JQ1JfQ0hBTihpbnNuLT5jaGFuc3BlYyk7Ci0uIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gIHBiX1RpbWluZ1VuaXQgICAgOiBCYXNlIHRpbWluZyB1bml0ICgwIHRvIDQpICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogbnMgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiDCtXMgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBtcyAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyA6IHMgICAgICAgICAgICAgICAgICAgICAgfAotfCAg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AgIHwKLXwJCQkJCQkgIDEgOiBUb3IgY291bnRlciBlbmFibGVkICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9yIGNvdW50ZXIgaW50ZXJydXB0LiAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9FTkFCTEU6ICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuYWJsZSB0aGUgdG9yIGNvdW50ZXIgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0ICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9ESVNBQkxFOiAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERpc2FibGUgdGhlIHRvciBjb3VudGVyICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0Ci0JcGJfVGltaW5nVW5pdAkJPQkodW5zaWduZWQgY2hhciAqKSAmZGF0YVswXTsKLQlwdWxfVGltaW5nSW50ZXJ2YWwJPSAgKHVuc2lnbmVkIGludCAqKSAmZGF0YVsxXTsKLQlwYl9JbnB1dE1vZGUJCT0JKHVuc2lnbmVkIGNoYXIgKikgJmRhdGFbMl07Ci0JcGJfRXh0ZXJuR2F0ZQkJPQkodW5zaWduZWQgY2hhciAqKSAmZGF0YVszXTsKLQlwYl9DeWNsZU1vZGUJCT0JKHVuc2lnbmVkIGNoYXIgKikgJmRhdGFbNF07Ci0JcGJfRW5hYmxlCQkJPQkodW5zaWduZWQgY2hhciAqKSAmZGF0YVs1XTsKLQlwYl9JbnRlcnJ1cHRFbmFibGUJPQkodW5zaWduZWQgY2hhciAqKSAmZGF0YVs2XTsKLSAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0yOiBNb2R1bGUgc2VsZWN0aW9uIHdyb25nICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgdG9yIGNvdW50ZXIgbW9kdWxlICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNDogVG9yIGNvdW50ZXIgc2VsZWN0aW9uIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC01OiBUb3IgY291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRUb3JDb3VudGVyIiAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwot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HVuc2lnbmVkIGNoYXIgKikgJmRhdGFbMl07Ci0JcGJfRXh0ZXJuR2F0ZSA9ICh1bnNpZ25lZCBjaGFyICopICZkYXRhWzNdOwotCXBiX0N5Y2xlTW9kZSA9ICh1bnNpZ25lZCBjaGFyICopICZkYXRhWzRdOwotCXBiX0VuYWJsZSA9ICh1bnNpZ25lZCBjaGFyICopICZkYXRhWzVdOwotCXBiX0ludGVycnVwdEVuYWJsZSA9ICh1bnNpZ25lZCBjaGFyICopICZkYXRhWzZdOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQlpZiAoYl9Nb2R1bE5iciA8IDQpIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgdG9yIGNvdW50ZXIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgotCQkJCTB4RkZGRjAwMDBVTCkgPT0gQVBDSTE3MTBfVE9SX0NPVU5URVIpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIHRvciBjb3VudGVyIHNlbGVjdGlvbiAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoYl9Ub3JDb3VudGVyIDw9IDEpIHsKLQotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgaWYgdG9yIGNvdW50ZXIgaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCWR3X1N0YXR1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nZhbDsKLQkJCQl9IGVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIFRvciBjb3VudGVyIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJRFBSSU5USygiVG9yIGNvdW50ZXIgbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCX0KLQotCQkJfQkvKiAgaWYgKGJfVG9yQ291bnRlciA8PSAxKSAqLwotCQkJZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUb3IgY291bnRlciBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJRFBSSU5USygiVG9yIGNvdW50ZXIgc2VsZWN0aW9uIGlzIHdyb25nIFxuIik7Ci0JCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQkvKiAgaWYgKGJfVG9yQ291bnRlciA8PSAxKSAqLwotCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIHRvciBjb3VudGVyIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgdG9yIGNvdW50ZXIgbW9kdWxlXG4iKTsKLQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKLQkJfQotCX0gZWxzZSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3JcbiIpOwotCQlpX1JldHVyblZhbHVlID0gLTI7Ci0JfQotCi0JcmV0dXJuIGlfUmV0dXJuVmFsdWU7Ci19Ci0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1JlYWRUb3JDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJIHVuc2lnbmVkIGNoYXJfICAgICBiX1RvckNvdW50ZXIsICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50XyAgICB1aV9UaW1lT3V0LCAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9Ub3JDb3VudGVyU3RhdHVzLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1RvckNvdW50ZXJWYWx1ZSkgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICA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IDEpLgotCWJfTW9kdWxOYnIgICAgPSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX1JlYWRUeXBlICAgID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMF07Ci0JYl9Ub3JDb3VudGVyICA9CSh1bnNpZ25lZCBjaGFyKSBkYXRhWzFdOwotCXVpX1RpbWVPdXQJICA9ICh1bnNpZ25lZCBpbnQpIGRhdGFbMl07IHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gIHBiX1RvckNvdW50ZXJTdGF0dXMgOiBSZXR1cm4gdGhlIHRvciBjb3VudGVyICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMuICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ29udGluZyBjeWNsZSBub3Qgc3RhcnRlZHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTb2Z0d2FyZSBnYXRlIG5vdCBzZXQuICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENvbnRpbmcgY3ljbGUgc3RhcnRlZC4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU29mdHdhcmUgZ2F0ZSBzZXQuICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgOiBDb250aW5nIGN5Y2xlIHN0b3BwZWQuICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBjb250aW5nIGN5Y2xlIGlzICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVybWluYXRlLiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBBIG92ZXJmbG93IG9jY3VyLiBZb3UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11c3QgY2hhbmdlIHRoZSBiYXNlICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltaW5nIHdpdGNoIHRoZSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0VG9yQ291bnRlciJ8Ci18CQkJCQkJNCA6IFRpbWVlb3V0IG9jY3VyICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICogIHB1bF9Ub3JDb3VudGVyVmFsdWUgIDogVG9yIGNvdW50ZXIgdmFsdWUuCi0JcGJfVG9yQ291bnRlclN0YXR1cz0odW5zaWduZWQgY2hhciAqKSAmZGF0YVswXTsKLQlwdWxfVG9yQ291bnRlclZhbHVlPSh1bnNpZ25lZCBpbnQgKikgJmRhdGFbMV07ICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtMjogTW9kdWxlIHNlbGVjdGlvbiB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIHRvciBjb3VudGVyIG1vZHVsZSAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTQ6IFRvciBjb3VudGVyIHNlbGVjdGlvbiBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAtNTogVG9yIGNvdW50ZXIgbm90IGluaXRpYWxpc2VkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0VG9yQ291bnRlciIgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgLTY6IFRvciBjb3VudGVyIG5vdCBlbmFibGVkIHNlZSBmdW5jdGlvbiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRW5hYmxlVG9yQ291bnRlciIgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIC03OiBUaW1lb3V0IHBhcmFtZXRlciBpcyB3cm9uZyAoMCB0byA2NTUzNSkgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi0KLXN0YXRpYyBpbnQgaV9BUENJMTcxMF9JbnNuQml0c0dldFRvckNvdW50ZXJQcm9ncmVzc1N0YXR1c0FuZF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qKioqKioqKioqKioqKiovCi0JCS8qIFRlc3QgaWYgdG9yIGNvdW50ZXIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgotCQkJCTB4RkZGRjAwMDBVTCkgPT0gQVBDSTE3MTBfVE9SX0NPVU5URVIpIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFRlc3QgdGhlIHRvciBjb3VudGVyIHNlbGVjdGlvbiAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQlpZiAoYl9Ub3JDb3VudGVyIDw9IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IGlmIHRvciBjb3VudGVyIGluaXRpYWxpc2VkICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlkd19TdGF0dXMgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgOCArICgxNiAqIGJfVG9yQ291bnRlcikgKwotCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgaWYgY291bnRlciBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoZHdfU3RhdHVzICYgMHgxMCkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVGVzdCBpZiBjb3VudGVyIGVuYWJsZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJC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gdWlfVGltZU91dCkgewotCQkJCS8qKioqKioqKioqKioqKioqKi8KLQkJCQkJCQkJCQkvKiBUaW1lb3V0IG9jY3VyICovCi0JCQkJLyoqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQkJYnJlYWs7Ci0JCQkJCQkJCQl9IGVsc2UgewotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkJCS8qIEluY3JlbWVudCB0aGUgdGltZW91dCAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQkJCQkJZHdfVGltZU91dAotCQkJCQkJCQkJCQk9Ci0JCQkJCQkJCQkJCWR3X1RpbWVPdXQKLQkJCQkJCQkJCQkJKwotCQkJCQkJCQkJCQkxOwotCi0JCQkJCQkJCQkJbWRlbGF5KDEwMDApOwotCQkJCQkJCQkJfQotCQkJCQkJCQl9CS8qICBmb3IgKDs7KSAqLwotCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCQkvKiBUZXN0IGlmIHRpbWVvdXQgb2NjdXIgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJaWYgKCgqcGJfVG9yQ291bnRlclN0YXR1cyAhPSAzKSAmJiAoZHdfVGltZU91dCA9PSB1aV9UaW1lT3V0KSAmJiAodWlfVGltZU91dCAhPSAwKSkgewotCQkJICAgICAvKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCQkvKiBUaW1lb3V0IG9jY3VyICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCQkJKnBiX1RvckNvdW50ZXJTdGF0dXMKLQkJCQkJCQkJCQk9Ci0JCQkJCQkJCQkJNDsKLQkJCQkJCQkJfQotCQkJCQkJCX0gZWxzZSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJCS8qIFRpbWVvdXQgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCQkJRFBSSU5USygiVGltZW91dCBwYXJhbWV0ZXIgaXMgd3JvbmdcbiIpOwotCQkJCQkJCQlpX1JldHVyblZhbHVlID0KLQkJCQkJCQkJCS03OwotCQkJCQkJCX0KLQkJCQkJCQlicmVhazsKLQotCQkJCQkJZGVmYXVsdDoKLQkJCQkJCQlwcmludGsoIklucHV0cyB3cm9uZ1xuIik7Ci0JCQkJCQl9CS8qICBzd2l0Y2ggZW5kICovCi0JCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEpICovCi0JCQkJCWVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJCS8qIFRvciBjb3VudGVyIG5vdCBlbmFibGVkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlEUFJJTlRLKCJUb3IgY291bnRlciBub3QgZW5hYmxlZFxuIik7Ci0JCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEpICovCi0JCQkJfSBlbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUb3IgY291bnRlciBub3QgaW5pdGlhbGlzZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCURQUklOVEsoIlRvciBjb3VudGVyIG5vdCBpbml0aWFsaXNlZFxuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9Ci0JCQl9CS8qICBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpICovCi0JCQllbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRvciBjb3VudGVyIHNlbGVjdGlvbiBpcyB3c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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCBEZXNjcmlwdGlvbiA6ICAgQVBDSS0xNzEwIFRUTCBJL08gbW9kdWxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVUERBVEVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgIERhdGUgICB8ICAgQXV0aG9yICB8ICAgICAgICAgIERlc2NyaXB0aW9uIG9mIHVwZGF0ZXMgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgMTMvMDUvOTggfCBTLiBXZWJlciAgfCBUVEwgZGlnaXRhbCBpbnB1dCAvIG91dHB1dCBpbXBsZW1lbnRhdGlvbiAgICAgIHwKLSAgfC0tLS0tLS0tLS18LS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfAotICB8IDA4LzA1LzAwIHwgR3Vpbm90IEMgIHwgLSAwNDAwLzAyMjggQWxsIEZ1bmN0aW9uIGluIFJJTkcgMCAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgIGF2YWlsYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotI2RlZmluZSBBUENJMTcxMF9UVExfSU5JVAkJMAotI2RlZmluZSBBUENJMTcxMF9UVExfSU5JVERJUkVDVElPTgkxCi0KLSNkZWZpbmUgQVBDSTE3MTBfVFRMX1JFQURDSEFOTkVMCTAKLSNkZWZpbmUgQVBDSTE3MTBfVFRMX1JFQURQT1JUCQkxCi0KLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0luaXRUVExJT0RpcmVjdGlvbiAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCSB1bnNpZ25lZCBjaGFyXyAg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LyogU2V0IFRUTCBwb3J0IEEgdG8gaW5wdXQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1RUTElPSW5mby5iX1BvcnRDb25maWd1cmF0aW9uWzBdID0gMDsKLQotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogU2V0IFRUTCBwb3J0IEIgdG8gaW5wdXQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1RUTElPSW5mby5iX1BvcnRDb25maWd1cmF0aW9uWzFdID0gMDsKLQotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogU2V0IFRUTCBwb3J0IEMgdG8gaW5wdXQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1RUTElPSW5mby5iX1BvcnRDb25maWd1cmF0aW9uWzJdID0gMDsKLQotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFNldCBUVEwgcG9ydCBEIHRvIG91dHB1dCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJZGV2cHJpdi0+c19Nb2R1bGVJbmZvW2JfTW9kdWxOYnJdLgotCQkJCQlzX1RUTElPSW5mby5iX1BvcnRDb25maWd1cmF0aW9uWzNdID0gMTsKLQotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFNldCB0aGUgY29uZmlndXJhdGlvbiAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwot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ioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkJLyogUG9ydCBCIG1vZGUgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCURQUklOVEsoIlBvcnQgQiBtb2RlIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7Ci0JCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC02OwotCQkJCQkJfQotCQkJCQl9IGVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCQkvKiBQb3J0IEEgbW9kZSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCQlEUFJJTlRLKCJQb3J0IEEgbW9kZSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwotCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCQl9Ci0JCQkJfSBlbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBGdW5jdGlvbiBub3QgYXZhaWxhYmxlIGZvciB0aGlzIHZlcnNpb24gKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCURQUklOVEsoIkZ1bmN0aW9uIG5vdCBhdmFpbGFibGUgZm9yIHRoaXMgdmVyc2lvblxuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCQl9Ci0JCQkJYnJlYWs7Ci0KLQkJCQlEUFJJTlRLKCJcbiIpOwotCQkJZGVmYXVsdDoKLQkJCQlwcmludGsoIkJhZCBDb25maWcgVHlwZVxuIik7Ci0JCQl9CS8qICBzd2l0Y2ggZW5kICovCi0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioq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gICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1NlbGVjdGVkUG9ydCwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfSW5wdXRDaGFubmVsLCAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfQ2hhbm5lbFN0YXR1cykgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFRhc2sgICAgICAgICAgICAgIDogUmVhZCB0aGUgc3RhdHVzIGZyb20gc2VsZWN0ZWQgVFRMIGRpZ2l0YWwgaW5wdXQgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAoYl9JbnB1dENoYW5uZWwpCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBSZWFkIHRoZSBzdGF0dXMgZnJvbSBkaWdpdGFsIGlucHV0IHBvcnQgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChiX1NlbGVjdGVkUG9ydCkgZnJvbSBzZWxlY3RlZCBUVEwgbW9kdWxlIChiX01vZHVsTmJyKSB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyZSAoMCB0byA3KSAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TZWxlY3RlZFBvcnQsICAgICAgIDogU2VsZWN0aW9uIGZyb20gVFRMIEkvTyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3J0ICgwIHRvIDIpICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBQb3J0IEEgc2VsZWN0aW9uICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFBvcnQgQiBzZWxlY3Rpb24gIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogUG9ydCBDIHNlbGVjdGlvbiAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IENoYW5ubGUgaXMgbm90IGFjdGl2ZXwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5sZSBpcyBhY3RpdmUgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogMDogTm8gZXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0xOiBUaGUgaGFuZGxlIHBhcmFtZXRlciBvZiB0aGUgYm9hcmQgaXMgd3JvbmcgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTI6IFRoZSBtb2R1bGUgcGFyYW1ldGVyIGlzIHdyb25nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMzogVGhlIG1vZHVsZSBpcyBub3QgYSBUVEwgbW9kdWxlICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC00OiBUaGUgc2VsZWN0ZWQgVFRMIGlucHV0IHBvcnQgaXMgd3JvbmcgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTU6IFRoZSBzZWxlY3RlZCBUVEwgZGlnaXRhbCBpbnB1dCBpcyB3cm9uZyAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNjogVFRMIEkvTyBub3QgaW5pdGlhbGlzZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotc3RhdG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8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJaWYgKCgoYl9JbnB1dENoYW5uZWwgPD0gNykKLQkJCQkJCQkmJiAoYl9TZWxlY3RlZFBvcnQgPCAzKSkKLQkJCQkJCXx8ICgoYl9JbnB1dENoYW5uZWwgPD0gMSkKLQkJCQkJCQkmJiAoYl9TZWxlY3RlZFBvcnQgPT0KLQkJCQkJCQkJMykpKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJLyogVGVzdCBpZiB0aGUgVFRMIEkvTyBtb2R1bGUgaW5pdGlhbGlzZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQkJCWlmIChkZXZwcml2LT4KLQkJCQkJCQlzX01vZHVsZUluZm8KLQkJCQkJCQlbYl9Nb2R1bE5icl0uCi0JCQkJCQkJc19UVExJT0luZm8uYl9UVExJbml0ID09Ci0JCQkJCQkJMSkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8qIFRlc3QgaWYgVFRMIHBvcnQgdXNlZCBmb3IgaW5wdXQgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQkJCWlmICgoKGRldnByaXYtPnNfQm9hcmRJbmZvcy5kd19Nb2xkdWxlQ29uZmlndXJhdGlvbltiX01vZHVsTmJyXSAmIDB4RkZGRikgPT0gMHgzMTMwKSB8fCAoKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJiAweEZGRkYpID49IDB4MzIzMCkgJiYgKGRldnByaXYtPnNfTW9kdWxlSW5mb1tiX01vZHVsTmJyXS5zX1RUTElPSW5mby5iX1BvcnRDb25ma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KLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBVTE9OR18gIHB1bF9Qb3J0VmFsdWUgICAgICA6IERpZ2l0YWwgVFRMIGlucHV0cyBwb3J0ICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0yOiBUaGUgbW9kdWxlIHBhcmFtZXRlciBpcyB3cm9uZyAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTM6IFRoZSBtb2R1bGUgaXMgbm90IGEgVFRMIG1vZHVsZSAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtNDogVFRMIEkvTyBub3QgaW5pdGlhbGlzZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotc3RhdGljIGludCBpX0FQQ0kxNzEwX0luc25SZWFkVFRMSU9BbGxQb3J0Vm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EIG5vdCB1c2VkIGZvciBvdXRwdXQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlpZiAoZGV2cHJpdi0+Ci0JCQkJCQlzX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJCQlzX1RUTElPSW5mby4KLQkJCQkJCWJfUG9ydENvbmZpZ3VyYXRpb25bM10gPT0gMSkgewotCQkJCQkJKnB1bF9Qb3J0VmFsdWUgPQotCQkJCQkJCWR3X1N0YXR1c1JlZyAmCi0JCQkJCQkJMHhGRkZGRkZVTDsKLQkJCQkJfQotCQkJCX0KLQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRUTCBJL08gbm90IGluaXRpYWxpc2VkICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCURQUklOVEsoIlRUTCBJL08gbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTU7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRUTCBtb2R1bGUgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgVFRMIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJRFBSSU5USygiTW9kdWxlIG51bWJlciBlcnJvclxuIik7Ci0JCWlfUmV0dXJuVmFsdWUgPSAtMjsKLQl9Ci0KLQl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AgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFNldHMgb3IgcmVzZXRzICB0aGUgb3V0cHV0IHdpdGNoIGhhcyBiZWVuIHBhc3NlZCB3aXRoIHRoZSAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXIgYl9DaGFubmVsLiBTZXR0aW5nIGFuIG91dHB1dCBtZWFucyBzZXR0aW5nICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGFuIG91cHV0IGhpZ2guICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMyl8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9PdXRwdXRDaGFubmVsIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsICgwIG9yIDEpICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgICAgICA6IFBEMCAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgIDogUEQxICAgICAgICAgICAgICAgIHwKLXwJCQkJCQkgMiB0byA5IDogUEEgICAgICAgICAgICAgICAgIHwKLXwJCQkJCQkxMCB0byAxNzogUEIgICAgICAgICAgICAgICAgIHwKLXwJCQkJCQkxOCB0byAyNTogUEMgICAgICAgICAgICAgICAgIHwKLQotICBiX01vZHVsTmJyCSAgID0gQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7Ci0JYl9PdXRwdXRDaGFubmVsPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKLQl1aV9TdGF0ZQkgICA9IGRhdGFbMF07IC8qICBPTiBvciBPRkYgKi8KLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgLTE6IFRoZSBoYW5kbGUgcGFyYW1ldGVyIG9mIHRoZSBib2FyZCBpcyB3cm9uZyAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAtMjogVGhlIG1vZHVsZSBwYXJhbWV0ZXIgaXMgd3JvbmcgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIC0zOiBUaGUgbW9kdWxlIGlzIG5vdCBhIFRUTCBJL08gbW9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bMF07CS8qICBPTiBvciBPRkYgKi8KLQotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIFRUTCBJL08gbW9kdWxlICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1RUTF9JTykgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBUZXN0IGlmIHRoZSBUVEwgSS9PIG1vZHVsZSBpbml0aWFsaXNlZCAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmIChkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCi0JCQkJc19UVExJT0luZm8uYl9UVExJbml0ID09IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IHRoZSBUVEwgSS9PIGNoYW5uZWwgbnVtYmVyICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCQlpZiAoKChiX091dHB1dENoYW5uZWwgPD0gMSkKLQkJCQkJCSYmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQkJCQlkd19Nb2xkdWxlQ29uZmlndXJhdGlvbgotCQkJCQkJCQlbYl9Nb2R1bE5icl0gJgotCQkJCQkJCQkweEZGRkYpID09Ci0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CSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBUaGUgc2VsZWN0ZWQgVFRMIG91dHB1dCBpcyB3cm9uZyAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQlEUFJJTlRLKCJUaGUgc2VsZWN0ZWQgVFRMIG91dHB1dCBpcyB3cm9uZ1xuIik7Ci0JCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCQl9Ci0JCQl9IGVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUVEwgSS9PIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCURQUklOVEsoIlRUTCBJL08gbm90IGluaXRpYWxpc2VkXG4iKTsKLQkJCQlpX1JldHVyblZhbHVlID0gLTU7Ci0JCQl9Ci0JCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBUVEwgSS9PIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJRFBSSU5USygiVGhlIG1vZHVsZSBpcyBub3QgYSBUVEwgSS9PIG1vZHVsZVxuIik7Ci0JCQlpX1JldHVyblZhbHVlID0gLTM7Ci0JCX0KLQl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKLQkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0KLQotCXJldHVybiBpX1JldHVyblZhbHVlOwotfQpkaWZmIC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0ktMTcxMCAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICBEYXRlICAgfCAgIEF1dGhvciAgfCAgICAgICAgICBEZXNjcmlwdGlvbiBvZiB1cGRhdGVzICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICB8ICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotCi0jZGVmaW5lIENPTUVESV9TVUJEX1RUTElPCQkxMQkvKiBEaWdpdGFsIElucHV0IE91dHB1dCBCdXQgVFRMICovCi0jZGVmaW5lIENPTUVESV9TVUJEX1BXTQkJCTEyCS8qIFB1bHNlIHdpZHRoIE1lYXN1cmVtZW50ICovCi0jZGVmaW5lIEN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ga2VybmVsIHRvIHVzZXIgc3BhY2UgKi8KLQkJCQkJc2VuZF9zaWcoU0lHSU8sIGRldnByaXYtPnRza19DdXJyZW50LAotCQkJCQkJMCk7Ci0KLQkJCQl9CS8qICBpZiAodWxfU3RhdHVzUmVnaXN0ZXIgJiAxKSAqLwotCi0JCQl9Ci0JCX0JCS8qICBDREEgKi8KLQotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIFBXTSBjb3VudGVyICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bGVDcHRdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1BXTSkgewotCQkJZm9yIChiX1BXTUNwdCA9IDA7IGJfUFdNQ3B0IDwgMjsgYl9QV01DcHQrKykgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVGVzdCBpZiBQV00gaW50ZXJydXB0IGluaXRpYWxpc2VkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCWlmIChkZXZwcml2LT4KLQkJCQkJc19Nb2R1bGVJbmZvW2JfTW9kdWxlQ3B0XS4KLQkJCQkJc19QV01Nb2R1bGVJbmZvLgotCQkJCQlzX1BXTUluZm9bYl9QV01DcHRdLgotCQkJCQliX0ludGVycnVwdEVuYWJsZSA9PSBBUENJMTcxMF9FTkFCTEUpIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkvKiBSZWFkIHRoZSBpbnRlcnJ1cHQgc3RhdHVzICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCQl1bF9TdGF0dXNSZWdpc3RlciA9Ci0JCQkJ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kgKi8KLQkJCQl9CS8qICBpZiAoQVBDSTE3MTBfRU5BQkxFKSAqLwotCQkJfQkvKiAgZm9yIChiX1RvckNvdW50ZXJDcHQgPT0gMDsgYl9Ub3JDb3VudGVyQ3B0IDwgMDsgYl9Ub3JDb3VudGVyQ3B0ICsrKSAqLwotCQl9CQkvKiAgVG9yIGNvdW50ZXIgKi8KLQotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBUZXN0IGlmIGNocm9ub21ldGVyICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJaWYgKChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCi0JCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bGVDcHRdICYKLQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0NIUk9OT01FVEVSKSB7Ci0KLQkJCS8qIHByaW50aygiQVBDSTE3MTAgQ2hyb25vIEludGVycnVwdFxuIik7ICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkvKiBSZWFkIHRoZSBpbnRlcnJ1cHQgc3RhdHVzICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCXVsX0ludGVycnVwdExhdGNoUmVnID0gaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KLQkJCQl1aV9BZGRyZXNzICsgMTIgKyAoNjQgKiBiX01vZHVsZUNwdCkpOwotCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJLyogVGVzdCBpZiBpbnRlcnJ1cHQgb2NjdXIgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQkJCWlmICgodWxfSW50ZXJydXB0TGF0Y2hSZWcgJiAweDgpID09IDB4OCkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogQ2xlYXIgdGhlIGludGVycnVwdCBmbGFnICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCQkJCW91dGwoMCwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQl1aV9BZGRyZXNzICsgMzIgKyAoNjQgKiBiX01vZHVsZUNwdCkpOwotCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCS8qIFRlc3QgaWYgY29udGludW91cyBtb2RlICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJaWYgKHBzX01vZHVsZUluZm8tPgotCQkJCQlzX0Nocm9ub01vZHVsZUluZm8uCi0JCQkJCWJfQ3ljbGVNb2RlID09IEFQQ0kxNzEwX0VOQUJMRSkgewotCQkJICAvKioqKioqKioqKioqKioqKioqKiovCi0JCQkJCS8qIENsZWFyIHRoZSBzdGF0dXMgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJCW91dGwoMCwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgotCQkJCQkJdWlfQWRkcmVzcyArIDM2ICsKLQkJCQkJCSg2NCAqIGJfTW9kdWxlQ3B0KSk7Ci0JCQkJfQotCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBSZWFkIHRoZSB0aW1pbmcgdmFsdWUgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0JCQkJdWxfTGF0Y2hSZWdpc3RlclZhbHVlID0KLQkJCQkJaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsKLQkJCQkJNCArICg2NCAqIGJfTW9kdWxlQ3B0KSk7Ci0KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvKiBUZXN0IGlmIGludGVycnVwdCBlbmFibGVkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKio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wgMHgyMDAwMDApOworCQlpb3VubWFwKGJyZC0+cmVfbWFwX3BvcnQpOworCQlicmQtPnJlX21hcF9wb3J0ID0gTlVMTDsKKwl9CisKKwlpZiAoYnJkLT5yZV9tYXBfbWVtYmFzZSkgeworCQlyZWxlYXNlX21lbV9yZWdpb24oYnJkLT5tZW1iYXNlLCAweDIwMDAwMCk7CisJCWlvdW5tYXAoYnJkLT5yZV9tYXBfbWVtYmFzZSk7CisJCWJyZC0+cmVfbWFwX21lbWJhc2UgPSBOVUxMOworCX0KKworICAgICAgICBpZiAoYnJkLT5tc2didWZfaGVhZCkgeworICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKyAgICAgICAgICAgICAgICBER0FQX0xPQ0soZGdhcF9nbG9iYWxfbG9jaywgZmxhZ3MpOworICAgICAgICAgICAgICAgIGJyZC0+bXNnYnVmID0gTlVMTDsKKyAgICAgICAgICAgICAgICBwcmludGsoYnJkLT5tc2didWZfaGVhZCk7CisgICAgICAgICAgICAgICAga2ZyZWUoYnJkLT5tc2didWZfaGVhZCk7CisgICAgICAgICAgICAgICAgYnJkLT5tc2didWZfaGVhZCA9IE5VTEw7CisgICAgICAgICAgICAgICAgREdBUF9VTkxPQ0soZGdhcF9nbG9iYWxfbG9jaywgZmxhZ3MpOworICAgICAgICB9CisKKwkvKiBGcmVlIGFsbCBhbGxvY2F0ZWQgY2hhbm5lbHMgc3RydWN0cyAqLworCWZvciAoaSA9IDA7IGkgPCBNQVhQT1JUUyA7IGkrKykgeworCQlpZiAoYnJkLT5jaGFubmVsc1tpXSkgeworCQkJa2ZyZWUoYnJkLT5jaGFubmVsc1tpXSk7CisJCQlicmQtPmNoYW5uZWxzW2ldID0gTlVMTDsKKwkJfQorCX0KKworCWlmIChicmQtPmZsaXBidWYpCisJCWtmcmVlKGJyZC0+ZmxpcGJ1Zik7CisJaWYgKGJyZC0+ZmxpcGZsYWdidWYpCisJCWtmcmVlKGJyZC0+ZmxpcGZsY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UkVTRVQ7CisKKyAgICAgICAgcmV0dXJuKDApOworfQorCisKK2ludCBkZ2FwX2ZpbmFsaXplX2JvYXJkX2luaXQoc3RydWN0IGJvYXJkX3QgKmJyZCkgeworCisgICAgICAgIGludCByYzsKKworICAgICAgICBEUFJfSU5JVCgoImRnYXBfZmluYWxpemVfYm9hcmRfaW5pdCgpIC0gc3RhcnRcbiIpKTsKKworCWlmICghYnJkIHx8IGJyZC0+bWFnaWMgIT0gREdBUF9CT0FSRF9NQUdJQykKKyAgICAgICAgICAgICAgICByZXR1cm4oLUVOT0RFVik7CisKKyAgICAgICAgRFBSX0lOSVQoKCJkZ2FwX2ZpbmFsaXplX2JvYXJkX2luaXQoKSAtIHN0YXJ0ICMyXG4iKSk7CisKKwlicmQtPnVzZV9pbnRlcnJ1cHRzID0gZGdhcF9jb25maWdfZ2V0X3VzZWludHIoYnJkKTsKKworCS8qCisJICogU2V0IHVwIG91ciBpbnRlcnJ1cHQgaGFuZGxlciBpZiB3ZSBhcmUgc2V0IHRvIGRvIGludGVycnVwdHMuCisJICovCisJaWYgKGJyZC0+dXNlX2ludGVycnVwdHMgJiYgYnJkLT5pcnEpIHsKKworCQlyYyA9IHJlcXVlc3RfaXJxKGJyZC0+aXJxLCBkZ2FwX2ludHIsIElSUUZfU0hBUkVELCAiREdBUCIsIGJyZCk7CisKKwkJaWYgKHJjKSB7CisJCQlkZ2FwX21idWYoYnJkLCBEUlZTVFIiOiBGYWlsZWQgdG8gaG9vayBJUlEgJWQuIEJvYXJkIHdpbGwgd29yayBpbiBwb2xsIG1vZGUuXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZC0+aXJxKTsKKwkJCWJyZC0+aW50cl91c2VkID0gMDsKKwkJfQorCQllbHNlCisJCQlicmQtPmludHJfdXNlZCA9IDE7CisJfSBlbHNlIHsKKwkJYnJkLT5pbnRyX3VzZWQgPSAwOworCX0KKworCXJldHVybigwKTsKK30KKworCisvKgorICogUmVtYXAgUEN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KKwlicmQtPnJlX21hcF9wb3J0ID0gaW9yZW1hcCgoYnJkLT5tZW1iYXNlICsgUENJX0lPX09GRlNFVCksIDB4MjAwMDAwKTsKKwlpZiAoIWJyZC0+cmVfbWFwX3BvcnQpIHsKKwkJcmVsZWFzZV9tZW1fcmVnaW9uKGJyZC0+bWVtYmFzZSwgMHgyMDAwMDApOworCQlyZWxlYXNlX21lbV9yZWdpb24oYnJkLT5tZW1iYXNlICsgUENJX0lPX09GRlNFVCwgMHgyMDAwMDApOworCQlpb3VubWFwKGJyZC0+cmVfbWFwX21lbWJhc2UpOworCQlBUFIoKCJkZ2FwOiBpb3JlbWFwIElPIG1lbSAlbHggY2Fubm90IGJlIG1hcHBlZC5cbiIsCisJCQlicmQtPm1lbWJhc2UgKyBQQ0lfSU9fT0ZGU0VUKSk7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCURQUl9JTklUKCgicmVtYXBwZWQgaW86IDB4JXAgIHJlbWFwcGVkIG1lbTogMHglcFxuIiwKKwkJYnJkLT5yZV9tYXBfcG9ydCwgYnJkLT5yZV9tYXBfbWVtYmFzZSkpOworCXJldHVybiAwOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKgorKiBGdW5jdGlvbjoKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyogICAgZGdhcF9wb2xsX2hhbmRsZXIKKyoKKyogQXV0aG9yOgorKgorKiAgICBTY290dCBIIEtpbGF1CisqICAgICAgIAorKiBQYXJhbWV0ZXJzOgorKgorKiAgICBkdW1teSAtLSBpZ25vcmVkICAgICAgICAgICAgICAgICAgICAKKyoKKyogUmV0dXJuIFZhbHVlczoKKyoKKyogICAgbm9uZQorKgorKiBEZXNjcmlwdGlvbjogICAKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyogICAgQXMgZWFjaCB0aW1lciB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CisJZGdhcF9kZWJ1ZwkJPSBkZWJ1ZzsKKworCWZvciAoaSA9IDA7IGkgPCBNQVhCT0FSRFM7IGkrKykgeworCQlkZ2FwX0JvYXJkW2ldID0gTlVMTDsKKwl9CisKKwlpbml0X3RpbWVyKCAmZGdhcF9wb2xsX3RpbWVyICk7IAorCisJaW5pdF93YWl0cXVldWVfaGVhZCgmZGdhcF9kbF93YWl0KTsKKwlkZ2FwX2RsX2FjdGlvbiA9IDA7Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFV0aWxpdHkgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCisvKgorICogZGdhcF9kcml2ZXJfa3ptYWxsb2MoKQorICoKKyAqIE1hbGxvYyBhbmQgY2xlYXIgbWVtb3J5LAorICovCit2b2lkICpkZ2FwX2RyaXZlcl9rem1hbGxvYyhzaXplX3Qgc2l6ZSwgaW50IHByaW9yaXR5KQoreworIAl2b2lkICpwID0ga21hbGxvYyhzaXplLCBwcmlvcml0eSk7CisJaWYocCkKKwkJbWVtc2V0KHAsIDAsIHNpemUpOworCXJldHVybihwKTsKK30KKworCisvKgorICogZGdhcF9tYnVmKCkKKyAqCisgKiBVc2VkIHRvIHByaW50IHRvIHRoZSBtZXNzYWdlIGJ1ZmZlciBkdXJpbmcgYm9hcmQgaW5pdC4KKyAqLworc3RhdGljIHZvaWQgZGdhcF9tYnVmKHN0cnVjdCBib2FyZF90ICpicmQsIGNvbnN0IGNoYXIgKmZtdCwgLi4uKSB7CisJdmFfbGlzdAkJYXA7CisJY2hhcgkJYnVmWzEwMjRdOworCWludAkJaTsKKwl1bnNpZ25lZCBsb25nCWZsYWdzOworCisJREdBUF9MT0NLKGRnYXBfZ2xvYmFsX2xvY2ssIGZsYWd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gKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4KKyAqCisgKglOT1RFOiBUSElTIElTIEEgU0hBUkVEIEhFQURFUi4gRE8gTk9UIENIQU5HRSBDT0RJTkcgU1RZTEUhISEKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIERyaXZlciBpbmNsdWRlcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fREdBUF9EUklWRVJfSAorI2RlZmluZSBfX0RHQVBfRFJJVkVSX0gKKworI2luY2x1ZGUgPGxpbnV4L3ZlcnNpb24uaD4JLyogVG8gZ2V0IHRoZSBjdXJyZW50IExpbnV4IHZlcnNpb24gKi8KKyNpbmNsdWRlIDxsaW51eC90eXBlcy5oPiAgICAgICAgLyogVG8gcGljayB1cCB0aGUgdmFyaW9ucyBMaW51eCB0eXBlcyAqLworI2luY2x1ZGUgPGxpbnV4L3R0eS5oPiAgICAgICAgICAvKiBUbyBwaWNrIHVwIHRoZSB2YXJpb3VzIHR0eSBzdHJ1Y3RzL2RlZmluZXMgKi8KKyNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4gICAgLyogRm9yIGlycXJldHVybl90IHR5cGUgKi8KKworI2luY2x1ZGUgImRnYXBfdHlwZXMuaCIgICAgICAgICAvKiBBZGRpdGlvbmFsIHR5cGVzIG5lZWRlZCBieSB0aGUgRGlnaSBoZWFkZXIgZmlsZXMgKi8KKyNpbmNsdWRlICJkaWdpLmgiICAgICAgICAgICAgICAgLyogRGlnaSBzcGVjaWZpYyBpb2N0bCBoZWFkZXIgKi8KKyNpbmNsdWRlICJkZ2FwX2tjb21wYXQuaCIgICAgICAgLyogS2VybmVsIDIuNC8yLjYgY29tcGF0IGluY2x1ZGVzICovCisjaW5jbHVkZSAiZGdhcF9zeXNmcy5oIgkJLyogU3VwcG9ydCBmb3IgU1lTRlMgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBEcml2ZXIgZGVmaW5lcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogRHJpdmVyIGlkZW50aWZpY2F0aW9uLCBlcnJvciBhbmQgZGVidWdnaW5nIHN0YXRtZW50cworICoKKyAqIEluIHRoZW9yeSwgeW91IGNhbiBjaGFuZ2UgYWxsIG9jY3VyYW5jZXMgb2YgImRpZ2kiIGluIHRoZSBuZXh0CisgKiB0aHJlZSBsaW5lcywgYW5kIHRoZSBkcml2ZXIgcHJpbnRrJ3Mgd2lsbCBhbGwgYXV0b21hZ2ljYWxseSBjaGFuZ2UuCisgKgorICogQVBSKChmbXQsIGFyZ3MsIC4uLikpOwlBbHdheXMgcHJpbnRzIG1lc3NhZ2UKKyAqIERQUigoZm10LCBhcmdzLCAuLi4pKTsJT25seSBwcmludHMgaWYgREdBUF9UUkFDRVIgaXMgZGVmaW5lZCBhdAorICoJCQkJICBjb21waWxlIHRpbWUgYW5kIGRnYXBfZGVidWchPTAKKyAqLworI2RlZmluZQlQUk9DU1RSCQkiZGdhcCIJCQkvKiAvcHJvYyBlbnRyaWVzCSAqLworI2RlZmluZQlERVZTVFIJCSIvZGV2L2RnL2RnYXAiCQkvKiAvZGV2IGVudHJpZXMJCSAqLworI2RlZmluZQlEUlZTVFIJCSJkZ2FwIgkJCS8qIERyaXZlciBuYW1lIHN0cmluZyAKKwkJCQkJCSAqIGRpc3BsYXllZCBieSBBUFIJICovCisjZGVmaW5lCUFQUihhcmdzKQlkbyB7IFBSSU5URl9UT19LTUVNKGFyZ3M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kZWZpbmUgRF9DVFMoY2gpICAgICAgIERNX0NUUyAgICAgICAgICAvKiBDbGVhciB0byBzZW5kICAgICAgICAqLworI2RlZmluZSBEX1JJKGNoKSAgICAgICAgRE1fUkkgICAgICAgICAgIC8qIFJpbmcgaW5kaWNhdG9yICAgICAgICovCisjZGVmaW5lIERfRFRSKGNoKSAgICAgICBETV9EVFIgICAgICAgICAgLyogRGF0YSB0ZXJtaW5hbCByZWFkeSAgKi8KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFN0cnVjdHVyZXMgYW5kIGNsb3NlbHkgcmVsYXRlZCBkZWZpbmVzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisKKy8qCisgKiBBIHN0cnVjdHVyZSB0byBob2xkIGEgc3RhdGlzdGljcyBjb3VudGVyLiAgV2UgYWxzbworICogY29tcHV0ZSBtb3ZpbmcgYXZlcmFnZXMgZm9yIHRoaXMgY291bnRlci4KKyAqLworc3RydWN0IG1hY291bnRlcgoreworCXUzMgkJY250OwkvKiBUb3RhbCBjb3VudCAqLworCXVsb25nCQlhY2N1bTsJLyogQWN1dW11bGF0b3IgcGVyIHBlcmlvZCAqLworCXVsb25nCQlzbWE7CS8qIFNpbXBsZSBtb3ZpbmcgYXZlcmFnZSAqLworCXVsb25nCQllbWE7CS8qIEV4cG9uZW50aWFsIG1vdmluZyBhdmVyYWdlICovCit9OworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKiBEZXZpY2UgZmxhZyBkZWZpbml0aW9ucyBmb3IgYmRfZmxhZ3MuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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VjdCBic190CSpiZF9iczsJCQkvKiBCYXNlIHN0cnVjdHVyZSBwb2ludGVyICAgICAgICovCisKKwljaGFyCSpmbGlwYnVmOwkJLyogT3VyIGZsaXAgYnVmZmVyLCBhbGxvY2VkIGlmIGJvYXJkIGlzIGZvdW5kICovCisJY2hhcgkqZmxpcGZsYWdidWY7CQkvKiBPdXIgZmxpcCBmbGFnIGJ1ZmZlciwgYWxsb2NlZCBpZiBib2FyZCBpcyBmb3VuZCAqLworCisJdTE2CQlkcGF0eXBlOwkvKiBUaGUgYm9hcmQgInR5cGUiLCBhcyBkZWZpbmVkIGJ5IERQQSAqLworCXUxNgkJZHBhc3RhdHVzOwkvKiBUaGUgYm9hcmQgInN0YXR1cyIsIGFzIGRlZmluZWQgYnkgRFBBICovCisJd2FpdF9xdWV1ZV9oZWFkX3Qga21lX3dhaXQ7CS8qIE5lZWRlZCBmb3IgRFBBIHN1cHBvcnQgKi8KKworCXUzMgkJY29uY19kbF9zdGF0dXM7CS8qIFN0YXR1cyBvZiBhbnkgcGVuZGluZyBjb25jIGRvd25sb2FkICovCisJLyoKKwkgKglNZ210IGRhdGEuCisJICovCisgICAgICAgIGNoYXIJCSptc2didWZfaGVhZDsKKyAgICAgICAgY2hhcgkJKm1zZ2J1ZjsKK307CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICogVW5pdCBmbGFnIGRlZmluaXRpb25zIGZvciB1bl9mbGFncy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFVOX0lTT1BFTgkweDAwMDEJCS8qIERldmljZSBpcyBvcGVuCQkqLworI2RlZmluZSBVTl9DTE9TSU5HCTB4MDAwMgkJLyogTGluZSBpcyBiZWluZyBjbG9zZWQJCSovCisjZGVmaW5lIFVOX0lNTQkJMHgwMDA0CQk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2ljIE51bWJlci4JCQkqLworCXN0cnVjdAljaGFubmVsX3QgKnVuX2NoOworCXUzMgl1bl90aW1lOworCXUzMgl1bl90eXBlOworCXUzMgl1bl9vcGVuX2NvdW50OwkvKiBDb3VudGVyIG9mIG9wZW5zIHRvIHBvcnQJCSovCisJc3RydWN0IHR0eV9zdHJ1Y3QgKnVuX3R0eTsvKiBQb2ludGVyIHRvIHVuaXQgdHR5IHN0cnVjdHVyZQkqLworCXUzMgl1bl9mbGFnczsJLyogVW5pdCBmbGFncwkJCQkqLworCXdhaXRfcXVldWVfaGVhZF90IHVuX2ZsYWdzX3dhaXQ7IC8qIFBsYWNlIHRvIHNsZWVwIHRvIHdhaXQgb24gdW5pdCAqLworCXUzMgl1bl9kZXY7CQkvKiBNaW5vciBkZXZpY2UgbnVtYmVyCQkJKi8KKwl0Y2ZsYWdfdCB1bl9vZmxhZzsJLyogb2ZsYWdzIGJlaW5nIGRvbmUgb24gYm9hcmQJCSovCisJdGNmbGFnX3QgdW5fbGZsYWc7CS8qIGxmbGFncyBiZWluZyBkb25lIG9uIGJvYXJkCQkqLworCXN0cnVjdCBkZXZpY2UgKnVuX3N5c2ZzOworfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICogRGV2aWNlIGZsYWcgZGVmaW5pdGlvbnMgZm9yIGNoX2ZsYWdzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgQ0hfUFJPTiAgICAgICAgIDB4MDAwMSAgICAgICAgICAvKiBQcmludGVyIG9uIHN0cmluZyAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDSF9PVVQgICAgICAgICAgMHgwMDAyICAgICAgICAgIC8qIERpYWwtb3V0IGRldmljZSBvcGVuICAgICAgICAgICAgICovCisjZGVmaW5lIENIX1NUT1AgICAgICAgICAweDAwMDQgICAgICAgICAgLyogT3V0cHV0IGlzIHN0b3BwZWQgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfU1RPUEkgICAgICAgIDB4MDAwOCAgICAgICAgICAvKiBJbnB1dCBpcyBzdG9wcGVkICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDSF9DRCAgICAgICAgICAgMHgwMDEwICAgICAgICAgIC8qIENhcnJpZXIgaXMgcHJlc2VudCAgICAgICAgICAgICAgICovCisjZGVmaW5lIENIX0ZDQVIgICAgICAgICAweDAwMjAgICAgICAgICAgLyogQ2FycmllciBmb3JjZWQgb24gICAgICAgICAgICAgICAgKi8KKworI2RlZmluZSBDSF9SWEJMT0NLICAgICAgMHgwMDgwICAgICAgICAgIC8qIEVuYWJsZSByeCBibG9ja2VkIGZsYWcgICAgICAgICAgICovCisjZGVmaW5lIENIX1dMT1cgICAgICAgICAweDAxMDAgICAgICAgICAgLyogVGVybSB3YWl0aW5nIGxvdyBldmVudCAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfV0VNUFRZICAgICAgIDB4MDIwMCAgICAgICAgICAvKiBUZXJtIHdhaXRpbmcgZW1wdHkgZXZlbnQgICAgICAgICAqLworI2RlZmluZSBDSF9SRU5BQkxFICAgICAgMHgwNDAwICAgICAgICAgIC8qIEJ1ZmZlciBqdXN0IGVtcHRpZWQgICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfUkFDVElWRSAgICAgIDB4MDgwMCAgICAgICAgICAvKiBQcm9jZXNzIGFjdGl2ZSBpbiB4eHJlYWQoKSAgICovCisjZGVmaW5lIENIX1JXQUlUICAgICAgICAweDEwMDAgICAgICAgICAgLyogUHJvY2VzcyB3YWl0aW5nIGluIHh4cmVhZCgpICAqLworI2RlZmluZSBDSF9CQVVEMAkweDIwMDAJCS8qIFVzZWQgZm9yIGNoZWNraW5nIEIwIHRyYW5zaXRpb25zICovCisjZGVmaW5lIENIX0hBTkdVUCAgICAgICAweDgwMDAJCS8qIEhhbmd1cCByZWNlaXZlZCAgICAgICAgICAgICAgICAgICovCisKKy8qCisgKiBEZWZpbml0aW9ucyBmb3IgY2hfc25pZmZfZmxhZ3MKKyAqLworI2RlZmluZSBTTklGRl9PUEVOCTB4MQorI2RlZmluZSBTTklGRl9XQUlUX0RBVEEJMHgyCisjZGVmaW5lIFNOSUZGX1dBSVRfU1BBQ0UgMHg0CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKKyAqIENoYW5uZWwgaW5mb3JtYXRpb24gc3RydWN0dXJlLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBjaGFubmVsX3QgeworCWludCBtYWdpYzsJCQkvKiBDaGFubmVsIE1hZ2ljIE51bWJlcgkJKi8KKwlzdHJ1Y3QgYnNfdAkqY2hfYnM7CQkvKiBCYXNlIHN0cnVjdHVyZSBwb2ludGVyICAgICAgICovCisJc3RydWN0IGNtX3QJKmNoX2NtOwkJLyogQ29tbWFuZCBxdWV1ZSBwb2ludGVyICAgICAgICAqLworCXN0cnVjdCBib2FyZF90ICpjaF9iZDsJCS8qIEJvYXJkIHN0cnVjdHVyZSBwb2ludGVyICAgICAgKi8KKwl1bnNpZ25lZCBjaGFyICpjaF92YWRkcjsJLyogRkVQIG1lbW9yeSBvcmlnaW4gICAgICAgICAgICAqLworCXVuc2lnbmVkIGNoYXIgKmNoX3RhZGRyOwkvKiBXcml0ZSBidWZmZXIgb3JpZ2luICAgICAgICAgICovCisJdW5zaWduZWQgY2hhciAqY2hfcmFkZHI7CS8qIFJlYWQgYnVmZmVyIG9yaWdpbiAgICAgICAgICAgKi8KKwlzdHJ1Y3QgZGlnaV90ICBjaF9kaWdpOwkJLyogVHJhbnNwYXJlbnQgUHJpbnQgc3RydWN0dXJlICAqLworCXN0cnVjdCB1b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3IgL3Byb2Mgb3V0cHV0CSovCisJdWxvbmcJY2hfcnhjb3VudDsJCS8qIHRvdGFsIG9mIGRhdGEgcmVjZWl2ZWQgc28gZmFyCSovCisJdWxvbmcJY2hfdHhjb3VudDsJCS8qIHRvdGFsIG9mIGRhdGEgdHJhbnNtaXR0ZWQgc28gZmFyCSovCisJdWxvbmcJY2hfZXJyX3Bhcml0eTsJCS8qIENvdW50IG9mIHBhcml0eSBlcnJvcnMgb24gY2hhbm5lbAkqLworCXVsb25nCWNoX2Vycl9mcmFtZTsJCS8qIENvdW50IG9mIGZyYW1pbmcgZXJyb3JzIG9uIGNoYW5uZWwJKi8KKwl1bG9uZwljaF9lcnJfYnJlYWs7CQkvKiBDb3VudCBvZiBicmVha3Mgb24gY2hhbm5lbAkqLworCXVsb25nCWNoX2Vycl9vdmVycnVuOwkJLyogQ291bnQgb2Ygb3ZlcnJ1bnMgb24gY2hhbm5lbAkqLworCisJdWludCBjaF9zbmlmZl9pbjsKKwl1aW50IGNoX3NuaWZmX291dDsKKwljaGFyICpjaF9zbmlmZl9idWY7CQkvKiBTbmlmZiBidWZmZXIgZm9yIHByb2MgKi8KKwl1bG9uZyBjaF9zbmlmZl9mbGFnczsJCS8qIENoYW5uZWwgZmxhZ3MgICAgICAgICAgICAgICAgKi8KKwl3YWl0X3F1ZXVlX2hlYWRfdCBjaF9zbmlmZl93YWl0OworfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFByb3RvdHlwZXMgZm9yIG5vbi1zdGF0aWMgZnVuY3Rpb25zIHVzZWQgaW4gbW9yZSB0aGFuIG9uZSBtb2R1bGUKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworZXh0ZXJuIGludAkJZGdhcF9tc19zbGVlcCh1bG9uZyBtcyk7C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k7CisJCWRnYXBfQm9hcmRbaV0tPmZsaXBmbGFnYnVmID0gZGdhcF9kcml2ZXJfa3ptYWxsb2MoTVlGTElQTEVOLCBHRlBfQVRPTUlDKTsKKwl9CisKKwlyZXR1cm4gKHJjKTsKK30KKworCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqCisgKiAgICAgIHVzZXJ0b2JvYXJkIC0gY29weSBmcm9tIHVzZXIgc3BhY2UgdG8gYm9hcmQgc3BhY2UuCisgKgorICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCitzdGF0aWMgaW50IGRnYXBfdXNlcnRvYm9hcmQoc3RydWN0IGJvYXJkX3QgKmJyZCwgY2hhciAqdG9fYWRkciwgY2hhciBfX3VzZXIgKmZyb21fYWRkciwgaW50IGxlbikKK3sKKwljaGFyIGJ1ZltVMkJTSVpFXTsKKwlpbnQgbiA9IFUyQlNJWkU7CisKKwlpZiAoIWJyZCB8fCBicmQtPm1hZ2ljICE9IERHQVBfQk9BUkRfTUFHSUMpCisJCXJldHVybigtRUZBVUxUKTsKKworCXdoaWxlIChsZW4pIHsKKwkJaWYgKG4gPiBsZW4pCisJCQluID0gbGVuOworCisJCWlmIChjb3B5X2Zyb21fdXNlcigoY2hhciAqKSAmYnVmLCBmcm9tX2FkZHIsIG4pID09IC0xICkgeworCQkJcmV0dXJuKC1FRkFVTFQpOworCQl9CisKKwkJLyogQ29weSBkYXRhIGZyb20gYnVmZmVyIHRvIGNhcmQgbWVtb3J5ICovCisJCW1lbWNweV90b2lvKHRvX2FkZHIsIGJ1Ziwgbik7CisKKwkJLyogaW5jcmVtZW50IGNvdW50cyAqLworCQlsZW4gLT0gbjsKKwkJdG9fYWRkciArPSBuOworCQlmcm9tX2FkZHIgKz0gbjsgICAKKwkJbiA9IFUyQlNJWkU7CisgICA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0ZTEgICAtIEludGVnZXIgY29udGFpbmluZyBmaXJzdCBieXRlIHRvIGJlIHNlbnQuCisgKiAgICAgICAgICAgICAgYnl0ZTIgICAtIEludGVnZXIgY29udGFpbmluZyBzZWNvbmQgYnl0ZSB0byBiZSBzZW50LgorICogICAgICAgICAgICAgIG5jbWRzICAgLSBXYWl0IHVudGlsIG5jbWRzIG9yIGZld2VyIGNtZHMgYXJlIGxlZnQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIGNtZCBidWZmZXIgYmVmb3JlIHJldHVybmluZy4KKyAqCisgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KK3ZvaWQgZGdhcF9jbWRiKHN0cnVjdCBjaGFubmVsX3QgKmNoLCB1Y2hhciBjbWQsIHVjaGFyIGJ5dGUxLCB1Y2hhciBieXRlMiwgdWludCBuY21kcykKK3sgICAgICAgICAgICAgICAgICAgICAgIAorCWNoYXIJCSp2YWRkciA9IE5VTEw7CisJc3RydWN0IGNtX3QJKmNtX2FkZHIgPSBOVUxMOworCXVpbnQJCWNvdW50OworCXVpbnQJCW47CisJdTE2CQloZWFkOworICAgICAgICB1MTYJCXRhaWw7CisKKwlpZiAoIWNoIHx8IGNoLT5tYWdpYyAhPSBER0FQX0NIQU5ORUxfTUFHSUMpCisJCXJldHVybjsKKworCS8qCisJICogQ2hlY2sgaWYgYm9hcmQgaXMgc3RpbGwgYWxpdmUuCisJICovCisJaWYgKGNoLT5jaF9iZC0+c3RhdGUgPT0gQk9BUkRfRkFJTEVEKSB7CisJCURQUl9DT1JFKCgiJXM6JWQgYm9hcmQgaXMgaW4gZmFpbGVkIHN0YXRlLlxuIiwgX19GSUxFX18sIF9fTElORV9fKSk7CisJCXJldHVybjsKKyAgICAgICAgfSAgICAgICAgICAgICAgIAorCisJLyoKKwkgKiBNYWtlIHN1cmUgdGhlIHBvaW50ZXJzIGFyZSBpbiByY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Ugc2VudC4KKyAqICAgICAgICAgICAgICB3b3JkICAgIC0gSW50ZWdlciBjb250YWluaW5nIHdvcmQgdG8gYmUgc2VudC4KKyAqICAgICAgICAgICAgICBuY21kcyAgIC0gV2FpdCB1bnRpbCBuY21kcyBvciBmZXdlciBjbWRzIGFyZSBsZWZ0CisgKiAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBjbWQgYnVmZmVyIGJlZm9yZSByZXR1cm5pbmcuCisgKgorICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCit2b2lkIGRnYXBfY21kdyhzdHJ1Y3QgY2hhbm5lbF90ICpjaCwgdWNoYXIgY21kLCB1MTYgd29yZCwgdWludCBuY21kcykKK3sKKwljaGFyCQkqdmFkZHIgPSBOVUxMOworCXN0cnVjdCBjbV90CSpjbV9hZGRyID0gTlVMTDsKKwl1aW50CQljb3VudDsKKwl1aW50CQluOworCXUxNgkJaGVhZDsKKwl1MTYJCXRhaWw7CisKKwlpZiAoIWNoIHx8IGNoLT5tYWdpYyAhPSBER0FQX0NIQU5ORUxfTUFHSUMpCisJCXJldHVybjsKKworCS8qCisJICogQ2hlY2sgaWYgYm9hcmQgaXMgc3RpbGwgYWxpdmUuCisJICovCisJaWYgKGNoLT5jaF9iZC0+c3RhdGUgPT0gQk9BUkRfRkFJTEVEKSB7CisJCURQUl9DT1JFKCgiJXM6JWQgYm9hcmQgaXMgZmFpbGVkIVxuIiwgX19GSUxFX18sIF9fTElORV9fKSk7CisJCXJldHVybjsKKwl9CisKKwkvKgorCSAqIE1ha2Ugc3VyZSB0aGUgcG9pbnRlcnMgYXJlIGluIHJhbmdlIGJlZm9yZQorCSAqIHdyaXRpbmcgdG8gdGhlIEZFUCBtZW1vcnkuCisJICovCisJdmFkZHIgPSBjaC0+Y2hfYmQtPnJlX21hcF9tZW1iYXNlOworCWlmICghdmFkZHIpCisJCXJldHVybjsKKworCWNtX2Fk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dXRsYW5kaXNoLCBkZWNsYXJlIHRoZSBGRVAgZGVhZC4KKwkgKi8KKwlmb3IgKGNvdW50ID0gZGdhcF9jb3VudCA7OykgeworCisJCWhlYWQgPSByZWFkdygmKGNtX2FkZHItPmNtX2hlYWQpKTsKKwkJdGFpbCA9IHJlYWR3KCYoY21fYWRkci0+Y21fdGFpbCkpOworCisJCW4gPSAoaGVhZCAtIHRhaWwpICYgKENNRE1BWCAtIENNRFNUQVJUIC0gNCk7CisKKwkJaWYgKG4gPD0gbmNtZHMgKiBzaXplb2Yoc3RydWN0IGNtX3QpKQorCQkJYnJlYWs7CisKKwkJaWYgKC0tY291bnQgPT0gMCkgeworCQkJRFBSX0NPUkUoKCIlczolZCBGYWlsaW5nIGJvYXJkLlxuIixfX0ZJTEVfXywgX19MSU5FX18pKTsKKwkJCWNoLT5jaF9iZC0+c3RhdGUgPSBCT0FSRF9GQUlMRUQ7CisJCQlyZXR1cm47CisJCX0KKwkJdWRlbGF5KDEwKTsKKwl9ICAKK30KKworCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqCisgKiAgICAgIGRnYXBfY21kd19leHQgLSBTZW5kcyBhIGV4dGVuZGVkIHdvcmQgY29tbWFuZCB0byB0aGUgRkVQLgorICogICAgICAKKyAqICAgICAgICAgICAgICBjaCAgICAgIC0gUG9pbnRlciB0byBjaGFubmVsIHN0cnVjdHVyZS4KKyAqICAgICAgICAgICAgICBjbWQgICAgIC0gQ29tbWFuZCB0byBiZSBzZW50LgorICogICAgICAgICAgICAgIHdvcmQgICAgLSBJbnRlZ2VyIGNvbnRhaW5pbmcgd29yZCB0byBiZSBzZW50LgorICogICAgICAgICAgICAgIG5jbWRzICAgLSBXYWl0IHVudGlsIG5jbWRzIG9yIGZld2VyIGNtZHMgYXJlIGxlZnQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIGNtZCBidWZmZ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Y2gtPmNoX2ZlcGFzdGFydGMgPSAwOworCWNoLT5jaF9mZXBhc3RvcGMgPSAwOworCWNoLT5jaF9tb3N0YXQgPSAwOworCWNoLT5jaF9oZmxvdyA9IDA7Cit9CisKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogICAgICAKKyAqICAgICAgZGdhcF9wYXJhbSAtIFNldCBEaWdpIHBhcmFtZXRlcnMuCisgKgorICogICAgICAgICAgICAgIHN0cnVjdCB0dHlfc3RydWN0ICogICAgIC0gVFRZIGZvciBwb3J0LgorICoKKyAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworaW50IGRnYXBfcGFyYW0oc3RydWN0IHR0eV9zdHJ1Y3QgKnR0eSkKK3sKKwlzdHJ1Y3Qga3Rlcm1pb3MgKnRzOworCXN0cnVjdCBib2FyZF90ICpiZDsKKwlzdHJ1Y3QgY2hhbm5lbF90ICpjaDsKKwlzdHJ1Y3QgYnNfdCAgICpiczsKKwlzdHJ1Y3QgdW5fdCAgICp1bjsKKwl1MTYJaGVhZDsKKwl1MTYJY2ZsYWc7CisJdTE2CWlmbGFnOworCXVjaGFyCW12YWw7CisJdWNoYXIJaGZsb3c7CisKKwlpZiAoIXR0eSB8fCB0dHktPm1hZ2ljICE9IFRUWV9NQUdJQykgeworCQlyZXR1cm4gKC1FTlhJTyk7CisJfQorCisJdW4gPSAoc3RydWN0IHVuX3QgKikgdHR5LT5kcml2ZXJfZGF0YTsKKwlpZiAoIXVuIHx8IHVuLT5tYWdpYyAhPSBER0FQX1VOSVRfTUFHSUMpIHsKKwkJcmV0dXJuICgtRU5YSU8pOworCX0KKworCWNoID0gdW4tPnVuX2NoOworCWlmICghY2ggfHwgY2gtPm1hZ2ljICE9IERHQVBfQ0hBTk5FTF9NQUdJQykgeworCQlyZXR1cm4gKC1FTl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LlxuIiwgX19GSUxFX18sIF9fTElORV9fKSk7CisJCQl9CisKKwkJCWNvdW50ICs9IDE7CisJCQljaC0+cHNjYW5fc3RhdGUgPSAwOworCQl9ICAgICAgIAorCX0KKwkqbGVuID0gY291bnQ7CisJRFBSX1BTQ0FOKCgiZGdhcF9wYXJpdHlfc2NhbiBmaW5pc2hcbiIpKTsKK30KKworCisKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICoKKyAqICAgICAgZGdhcF9ldmVudCAtIEZFUCB0byBob3N0IGV2ZW50IHByb2Nlc3Npbmcgcm91dGluZS4KKyAqCisgKiAgICAgICAgICAgICAgYmQgICAgIC0gQm9hcmQgb2YgY3VycmVudCBldmVudC4KKyAqCisgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KK3N0YXRpYyBpbnQgZGdhcF9ldmVudChzdHJ1Y3QgYm9hcmRfdCAqYmQpCit7CisJc3RydWN0IGNoYW5uZWxfdCAqY2g7CisJdWxvbmcJCWxvY2tfZmxhZ3M7CisJdWxvbmcJCWxvY2tfZmxhZ3MyOworCXN0cnVjdCBic190CSpiczsKKwl1Y2hhcgkJKmV2ZW50OworCXVjaGFyCQkqdmFkZHIgPSBOVUxMOworCXN0cnVjdCBldl90CSplYWRkciA9IE5VTEw7CisJdWludAkJaGVhZDsKKwl1aW50CQl0YWlsOworCWludAkJcG9ydDsKKwlpbnQJCXJlYXNvbjsKKwlpbnQJCW1vZGVtOworCWludAkJYjE7CisKKwlpZiAoIWJkIHx8IGJkLT5tYWdpYyAhPSBER0FQX0JPQVJEX01BR0lDKQorCQlyZXR1cm4gKC1FTlhJTyk7CisKKwlER0FQX0xPQ0soYmQtPmJkX2xvY2ssIGxvY2tfZmxhZ3MpOworCisJdmFkZHIgPSBiZC0+cmVfbWFwX21lbWJhc2U7CisKK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isgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKKyAqKioJRkVQIFZlcnNpb24gNSBkZXBlbmRlbnQgZGVmaW5pdGlvbnMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZm5kZWYgX19ER0FQX0ZFUDVfSAorI2RlZmluZSBfX0RHQVBfRkVQNV9ICisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgRkVQIG1lbW9yeSBvZmZzZXRzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBTVEFSVCAgICAgICAgICAgMHgwMDA0TCAgICAgICAgIC8qIEV4ZWN1dGlvbiBzdGFydCBhZGRyZXNzICAgICAgKi8KKworI2RlZmluZSBDTURCVUYgICAgICAgICAgMHgwZDEwTCAgICAgICAgIC8qIENvbW1hbmQgKGNtX3QpIHN0cnVjdHVyZSBvZmZzZXQgKi8KKyNkZWZpbmUgQ01EU1RBUlQgICAgICAgIDB4MDQwMEwgICAgICAgICAvKiBTdGFydCBvZiBjb21tYW5kIGJ1ZmZlciAgICAgICovICAgCisjZGVmaW5lIENNRE1BWCAgICAgICAgICAweDA4MDBMICAgICAgICAgLyogRW5kIG9mIGNvbW1hbmQgYnVmZmVyICAgICAgICAqLworCisjZGVmaW5lIEVWQlVGICAgICAgICAgICAweDBkMThMICAgICAgICAgLyogRXZlbnQgKGV2X3QpIHN0cnVjdHVyZSAgICAgICAqLworI2RlZmluZSBFVlNUQVJUICAgICAgICAgMHgwODAwTCAgICAgICAgIC8qIFN0YXJ0IG9mIGV2ZW50IGJ1ZmZlciAgICAgICAgKi8KKyNkZWZpbmUgRVZNQVggICAgICAgICAgIDB4MGMwMEwgICAgICAgICAvKiBFbmQgb2YgZXZlbnQgYnVmZmVyICAgICAgICAgICovCisjZGVmaW5lIEZFUDVfUExVUyAgICAgICAweDBFNDAgICAgICAgICAgLyogQVNDSUkgJzUnIGFuZCBBU0NJSSAnQScgaXMgaGVyZSAgKi8KKyNkZWZpbmUgRUNTX1NFRyAgICAgICAgIDB4MEU0NCAgICAgICAgICAvKiBTZWdtZW50IG9mIHRoZSBleHRlbmRlZCBjaGFubmVsIHN0cnVjdHVyZSAqLworI2RlZmluZSBMSU5FX1NQRUVEICAgICAgMHgxMCAgICAgICAgICAgIC8qIE9mZnNldCBpbnRvIEVDU19TRUcgZm9yIGxpbmUgc3BlZWQgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGlmIHRoZSBmZXAgaGFzIGV4dGVuZGVkIGNhcGFiaWxpdGllcyAqLworCisvKiBCSU9TIE1BR0lDIFNQT1RTICovCisjZGVmaW5lIEVSUk9SICAgICAgICAgICAweDBDMTRMCQkvKiBCSU9TIGVycm9yIGNvZGUgICAgICAgICAgICAgICovCisjZGVmaW5lIFNFUVVFTkNFCTB4MEMxMkwJCS8qIEJJT1Mgc2VxdWVuY2UgaW5kaWNhdG9yICAgICAgKi8KKyNkZWZpbmUgUE9TVEFSRUEJMHgwQzAwTAkJLyogUE9TVCBjb21wbGV0ZSBtZXNzYWdlIGFyZWEgICAqLworCisvKiBGRVAgTUFHSUMgU1BPVFMgKi8KKyNkZWZpbmUgRkVQU1RBVCAgICAgICAgIFBPU1RBUkVBICAgICAgICAvKiBPUyBoZXJlIHdoZW4gRkVQIGNvbWVzIHVwICAgICovCisjZGVmaW5lIE5DSEFOICAgICAgICAgICAweDBDMDJMICAgICAgICAgLyogbnVtYmVyIG9mIHBvcnRzIEZFUCBzZWVzICAgICAqLworI2RlZmluZSBQQU5JQyAgICAgICAgICAgMHgwQzEwTCAgICAgICAgIC8qIFBBT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bmUgRkVQTUFTSyAgICAgMHgwZQorI2RlZmluZSBGRVBXSU4gICAgICAweDgwCisKKyNkZWZpbmUgTE9XTUVNICAgICAgMHgwMTAwCisjZGVmaW5lIEhJR0hNRU0gICAgIDB4N2YwMAorCisjZGVmaW5lIEZFUFRJTUVPVVQgMjAwMDAwCisKKyNkZWZpbmUgRU5BQkxFX0lOVFIJCTB4MGUwNAkJLyogRW5hYmxlIGludGVycnVwdHMgZmxhZyAqLworI2RlZmluZSBGRVBQT0xMX01JTgkJMQkJLyogbWluaW11bSBvZiAxIG1pbGxpc2Vjb25kICovICAKKyNkZWZpbmUgRkVQUE9MTF9NQVgJCTIwCQkvKiBtYXhpbXVtIG9mIDIwIG1pbGxpc2Vjb25kcyAqLworI2RlZmluZSBGRVBQT0xMCQkJMHgwYzI2CQkvKiBGZXAgZXZlbnQgcG9sbCBpbnRlcnZhbCAqLyAgIAorCisjZGVmaW5lCUlBTFRQSU4JCQkweDAwODAJCS8qIElucHV0IGZsYWcgdG8gc3dhcCBEU1IgPC0+IERDRCAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICogQ29tbWFuZCBzdHJ1Y3R1cmUgZGVmaW5pdGlvbi4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgY21fdCB7CisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgY21faGVhZDsJLyogQ29tbWFuZCBidWZmZXIgaGVhZCBvZmZzZXQJKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBjbV90YWlsOwkvKiBDb21tYW5kIGJ1ZmZlciB0YWlsIG9mZnNldAkqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGNtX3N0YXJ0OwkvKiBzdGFydCBvZmZzZXQgb2YgYnVmZmVyCSovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgY21fbWF4OwkJLyogbGFzdCBvZmZzZXQgb2YgYnVmZmVyCSovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBFdmVudCBzdHJ1Y3R1cmUgZGVmaW5pdGlvbi4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgZXZfdCB7CisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgZXZfaGVhZDsJLyogQ29tbWFuZCBidWZmZXIgaGVhZCBvZmZzZXQJKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBldl90YWlsOwkvKiBDb21tYW5kIGJ1ZmZlciB0YWlsIG9mZnNldAkqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGV2X3N0YXJ0OwkvKiBzdGFydCBvZmZzZXQgb2YgYnVmZmVyCSovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgZXZfbWF4OwkJLyogbGFzdCBvZmZzZXQgb2YgYnVmZmVyCSovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBEb3dubG9hZCBidWZmZXIgc3RydWN0dXJlLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkb3dubGRfdCB7CisJdWNoYXIJZGxfdHlwZTsJCS8qIEhlYWRlciAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1Y2hhcglkbF9zZXE7CQkJLyogRG93bmxvYWQgc2VxdWVuY2UgICAgICAgICAgICAqLworCXVzaG9ydAlkbF9zcmV2OwkJLyogU29mdHdhcmUgcmV2aXNpb24gbnVtYmVyICAgICAqLworCXVzaG9ydAlkbF9scmV2OwkJLyogTG93IHJldmlzaW9uIG51bWJlciAgICAgICAgICAqLworCXVzaG9ydAlkbF9ocmV2OwkJLyogSGlnaCByZXZpc2lvbiBudW1iZXIgICAgICAgICAqLworCXVzaG9ydAlkbF9zZWc7CQkJLyogU3RhcnQgc2VnbWVudCBhZGRyZXNzICAgICAgICAqLworCXVzaG9ydAlkbF9zaXplOwkJLyogTnVtYmVyIG9mIGJ5dGVzIHRvIGRvd25sb2FkICAqLworCXVjaGFyCWRsX2RhdGFbMTAyNF07CQkvKiBEb3dubG9hZCBkYXRhICAgICAgICAgICAgICAgICovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICogUGVyIGNoYW5uZWwgYnVmZmVyIHN0cnVjdHVyZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgIEJhc2UgU3RydWN0dXJlIEVudHJpZXMgVXNhZ2UgTWVhbmluZ3MgdG8gSG9zdCAgICAgICAgICAgKiAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogCisgKiAgICAgICAgVyA9IHJlYWQgd3JpdGUgICAgICAgIFIgPSByZWFkIG9ubHkgICAgICAgICAgICAgICAgICAgICAgICAgICAqIAorICogICAgICAgIEMgPSBjaGFuZ2VkIGJ5IGNvbW1hbmRzIG9ubHkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAKKyAqICAgICAgICBVID0gdW5rbm93biAobWF5IGJlIGNoYW5nZWQgdy9vIG5vdGljZSkgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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CisJdm9sYXRpbGUgdW5zaWduZWQgY2hhciAgIGhmbG93OwkJLyogQyAgIFNvZnR3YXJlIGZsb3cgY29udHJvbCAgICAqLworCisJdm9sYXRpbGUgdW5zaWduZWQgY2hhciAgIGZpbGxjOwkJLyogVSAgIERlbGF5IEZpbGwgY2hhcmFjdGVyICAgICAqLworCXZvbGF0aWxlIHVuc2lnbmVkIGNoYXIgICBvY2hhcjsJCS8qIFUgICBTYXZlZCBvdXRwdXQgY2hhcmFjdGVyICAgKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBjaGFyICAgb21hc2s7CQkvKiBVICAgT3V0cHV0IGNoYXJhY3RlciBtYXNrICAgICovCisKKwl2b2xhdGlsZSB1bnNpZ25lZCBjaGFyICAgYmZpbGxbMTNdOwkvKiBVICAgUmVzZXJ2ZWQgZm9yIGV4cGFuc2lvbiAgICovICAKKworCXZvbGF0aWxlIHVuc2lnbmVkIGNoYXIgICBzY2NbMTZdOwkvKiBVICAgU0NDIHJlZ2lzdGVycyAgICAgICAgICAgICovCit9OworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAKKyAqIEZFUCBzdXBwb3J0ZWQgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBTUkxPVwkJMHhlMAkJLyogU2V0IHJlY2VpdmUgbG93IHdhdGVyCSovCisjZGVmaW5lIFNSSElHSAkJMHhlMQkJLyogU2V0IHJlY2VpdmUgaGlnaCB3YXRlcgkqLworI2RlZmluZSBGTFVTSFRYCQkweGUyCQkvKiBGbHVzaCB0cmFuc21pdCBidWZmZXIJKi8KKyNkZWZpbmUgUEFVU0VUWAkJMHhlMwkJLyogUGF1c2UgZGF0YSB0cmFuc21pc3Npb24JKi8KKyNkZWZpbmUgUkVTVU1FVFgJMHhlN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TB4ZmMJCS8qIFJlc2VydmVkCQkJKi8KKyNkZWZpbmUgU0NPTU1PREUJMHhmZAkJLyogU2V0IFJTMjMyLzQyMiBtb2RlCQkqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKglNb2RlcyBmb3IgU0NPTU1PREUKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIE1PREVfMjMyCTB4MDAKKyNkZWZpbmUgTU9ERV80MjIJMHgwMQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKiAgICAgIEV2ZW50IGZsYWdzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgSUZCUkVBSyAgICAgICAgIDB4MDEgICAgICAgICAgICAvKiBCcmVhayByZWNlaXZlZCAgICAgICAgICAgICAgICovICAKKyNkZWZpbmUgSUZUTFcgICAgICAgICAgIDB4MDIgICAgICAgICAgICAvKiBUcmFuc21pdCBsb3cgd2F0ZXIgICAgICAgICAgICovCisjZGVmaW5lIElGVEVNICAgICAgICAgICAweDA0ICAgICAgICAgICAgLyogVHJhbnNtaXR0ZXIgZW1wdHkgICAgICAgICAgICAqLworI2RlZmluZSBJRkRBVEEgICAgICAgICAgMHgwOCAgICAgICAgICAgIC8qIFJlY2VpdmUgZGF0YSBwcmVzZW50ICAgICAgICAgKi8KKyNkZWZpbmUgSUZNT0RFTSAgICAgICAgIDB4MjAgICAgICAgICAgICAvKiBNb2RlbSBzdGF0dXMgY2hhbmdlICAgICAgICAgICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAKKyAqICAgICAgTW9kZW0gZmxhZ3MKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjICAgICAgIGRlZmluZSAgRE1fUlRTICAgICAgICAgIDB4MDIgICAgLyogUmVxdWVzdCB0byBzZW5kICAgICAgICAgICAgICAqLworIyAgICAgICBkZWZpbmUgIERNX0NEICAgICAgICAgICAweDgwICAgIC8qIENhcnJpZXIgZGV0ZWN0ICAgICAgICAgICAgICAgKi8KKyMgICAgICAgZGVmaW5lICBETV9EU1IgICAgICAgICAgMHgyMCAgICAvKiBEYXRhIHNldCByZWFkeSAgICAgICAgICAgICAgICovCisjICAgICAgIGRlZmluZSAgRE1fQ1RTICAgICAgICAgIDB4MTAgICAgLyogQ2xlYXIgdG8gc2VuZCAgICAgICAgICAgICAgICAqLworIyAgICAgICBkZWZpbmUgIERNX1JJICAgICAgICAgICAweDQwICAgIC8qIFJpbmcgaW5kaWNhdG9yICAgICAgICAgICAgICAgKi8KKyMgICAgICAgZGVmaW5lICBETV9EVFIgICAgICAgICAgMHgwMSAgICAvKiBEYXRhIHRlcm1pbmFsIHJlYWR5ICAgICAgICAgICovCisKKworI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvZGdhcC9kZ2FwX2tjb21wYXQuaCBiL2RyaXZlcnMvc3RhZ2luZy9kZ2FwL2RnYXBfa2NvbXBhdC5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjhlYmY0YjcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvZGdhcC9kZ2FwX2tjb21wYXQuaApAQCAtMCwwICsxLDkzIEBACisvKgorICogQ29weXJpZ2h0IDIwMDQgRGlnaSBJbnRlcm5hdGlvbmFsICh3d3cuZGlnaS5jb20pCisgKiAgICAgIFNjb3R0IEggS2l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QgQ0hBTkdFIENPRElORyBTVFlMRSEhIQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVGhpcyBmaWxlIGlzIGludGVuZGVkIHRvIGNvbnRhaW4gYWxsIHRoZSBrZXJuZWwgImRpZmZlcmVuY2VzIiBiZXR3ZWVuIHRoZQorICogdmFyaW91cyBrZXJuZWxzIHRoYXQgd2Ugc3VwcG9ydC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfX0RHQVBfS0NPTVBBVF9ICisjZGVmaW5lIF9fREdBUF9LQ09NUEFUX0gKKworIyBpZm5kZWYgS0VSTkVMX1ZFUlNJT04KKyMgIGRlZmluZSBLRVJORUxfVkVSU0lPTihhLGIsYykgICgoKGEpIDw8IDE2KSArICgoYikgPDwgOCkgKyAoYykpCisjIGVuZGlmCisKKworI2lmICFkZWZpbmVkKFRUWV9GTElQQlVGX1NJWkUpCisjIGRlZmluZSBUVFlfRkxJUEJVRl9TSVpFIDUxMgorI2VuZGlmCisKKworLyogU3BhcnNlIHN0dWZmICovCisjIGlmbmRlZiBfX3VzZXIKKyMgIGRlZmluZSBfX3VzZXIKKyMgIGRlZmluZSBfX2tlcm5lbAorIyAgZGVmaW5lIF9fc2FmZQorIyAgZGVmaW5lIF9fZm9yY2UKKyMgIGRlZmluZSBfX2Noa191c2VyX3B0cih4KSAodm9pZCkwCisjIGVuZGlmCisKKworIyAgZGVmaW5lIFBBUk1fU1RSKFZBUiwgSU5JVCwgUEVSTSwgREVTQykgXAorCQlzdGF0aWMgY2hhciAqVkFSID0gSU5JVDsgXAorCQljaGFyICpkZ2FwXyMjVkFSOyBcCisJCW1vZHVsZV9wYXJhbShWQVIsIGNoYXJwLCBQRVJNKTsgXAorCQlNT0RVTEVfUEFSTV9ERV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GRnYXBfdHR5X3dyaXRlX3Jvb20sCisJLmZsdXNoX2J1ZmZlciA9IGRnYXBfdHR5X2ZsdXNoX2J1ZmZlciwKKwkuY2hhcnNfaW5fYnVmZmVyID0gZGdhcF90dHlfY2hhcnNfaW5fYnVmZmVyLAorCS5mbHVzaF9jaGFycyA9IGRnYXBfdHR5X2ZsdXNoX2NoYXJzLAorCS5pb2N0bCA9IGRnYXBfdHR5X2lvY3RsLAorCS5zZXRfdGVybWlvcyA9IGRnYXBfdHR5X3NldF90ZXJtaW9zLAorCS5zdG9wID0gZGdhcF90dHlfc3RvcCwgCisJLnN0YXJ0ID0gZGdhcF90dHlfc3RhcnQsCisJLnRocm90dGxlID0gZGdhcF90dHlfdGhyb3R0bGUsCisJLnVudGhyb3R0bGUgPSBkZ2FwX3R0eV91bnRocm90dGxlLAorCS5oYW5ndXAgPSBkZ2FwX3R0eV9oYW5ndXAsCisJLnB1dF9jaGFyID0gZGdhcF90dHlfcHV0X2NoYXIsCisJLnRpb2NtZ2V0ID0gZGdhcF90dHlfdGlvY21nZXQsCisJLnRpb2Ntc2V0ID0gZGdhcF90dHlfdGlvY21zZXQsCisJLmJyZWFrX2N0bCA9IGRnYXBfdHR5X3NlbmRfYnJlYWssCisJLndhaXRfdW50aWxfc2VudCA9IGRnYXBfdHR5X3dhaXRfdW50aWxfc2VudCwKKwkuc2VuZF94Y2hhciA9IGRnYXBfdHR5X3NlbmRfeGNoYXIKK307CisKKworCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgCisgKiBUVFkgSW5pdGlhbGl6YXRpb24vQ2xlYW51cCBGdW5jdGlvbnMKKyAqICAgICAgCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICAgICAgICAgCisvKgorICogZGdhcF90dHlfc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NoLT5jaF9zbmlmZl9mbGFncyAmPSB+U05JRkZfV0FJVF9EQVRBOworCQkJCXdha2VfdXBfaW50ZXJydXB0aWJsZSgmY2gtPmNoX3NuaWZmX3dhaXQpOworCQkJfQorCQl9CisKKwkJLyoKKwkJICogSWYgdGhlIHVzZXIgc2VudCB1cyB0b28gbXVjaCBkYXRhIHRvIHB1c2ggaW50byBvdXIgdG1wYnVmLAorCQkgKiB3ZSBuZWVkIHRvIGtlZXAgbG9vcGluZyBhcm91bmQgb24gYWxsIHRoZSBkYXRhLgorCQkgKi8KKwkJaWYgKHRvb19tdWNoX2RhdGEpIHsKKwkJCXAgPSB0bXBidWY7CisJCQl0bXBidWZsZW4gPSAwOworCQl9CisKKwl9IHdoaWxlICh0b29fbXVjaF9kYXRhKTsKK30KKworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ2FwX2lucHV0IC0gUHJvY2VzcyByZWNlaXZlZCBkYXRhLgorICogCisgKiAgICAgICAgICAgICAgY2ggICAgICAtIFBvaW50ZXIgdG8gY2hhbm5lbCBzdHJ1Y3R1cmUuCisgKiAKKyAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCit2b2lkIGRnYXBfaW5wdXQoc3RydWN0IGNoYW5uZWxfdCAqY2gpCit7CisJc3RydWN0IGJvYXJkX3QgKmJkOworCXN0cnVjdCBic190CSpiczsKKwlzdHJ1Y3QgdHR5X3N0cnVjdCAqdHA7CisJc3RydWN0IHR0eV9sZGlzYyAqbGQ7CisJdWludAlybWFzazsKKwl1aW50CWhlYWQ7CisJdWludAl0YWlsOworCWludAlkYXRhX2xlbjsKKwl1bG9uZwlsb2NrX2ZsYWdzOworCXVsb25nICAgbG9ja19mbGFnczI7CisJaW50IGZsaXBfbGVuOworCWludCBsZW4gPSAwOworCWlud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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUaGUgSU9DVEwgZnVuY3Rpb24gYW5kIGFsbCBvZiBpdHMgaGVscGVycworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIAorLyoKKyAqIGRnYXBfdHR5X2lvY3RsKCkKKyAqCisgKiBUaGUgdXN1YWwgYXNzb3J0bWVudCBvZiBpb2N0bCdzCisgKi8KK3N0YXRpYyBpbnQgZGdhcF90dHlfaW9jdGwoc3RydWN0IHR0eV9zdHJ1Y3QgKnR0eSwgdW5zaWduZWQgaW50IGNtZCwKKwkJdW5zaWduZWQgbG9uZyBhcmcpCit7CisJc3RydWN0IGJvYXJkX3QgKmJkOworCXN0cnVjdCBjaGFubmVsX3QgKmNoOworCXN0cnVjdCB1bl90ICp1bjsKKwlpbnQgcmM7CisJdTE2CWhlYWQgPSAwOworCXVsb25nICAgbG9ja19mbGFncyA9IDA7CisJdWxvbmcgICBsb2NrX2ZsYWdzMiA9IDA7CisJdm9pZCBfX3VzZXIgKnVhcmcgPSAodm9pZCBfX3VzZXIgKikgYXJnOworCisJaWYgKCF0dHkgfHwgdHR5LT5tYWdpYyAhPSBUVFlfTUFHSUMpCisJCXJldHVybiAoLUVOT0RFVik7CisKKwl1biA9IHR0eS0+ZHJpdmVyX2RhdGE7CisJaWYgKCF1biB8fCB1bi0+bWFnaWMgIT0gREdBUF9VTklUX01BR0lDKQorCQlyZXR1cm4gKC1FTk9ERVYpOworCisJY2ggPSB1bi0+dW5fY2g7CisJaWYgKCFjaCB8fCBjaC0+bWFnaWMgIT0gREdBUF9DSEFOTkVMX01BR0lDKQorCQlyZXR1cm4gKC1FTk9ERVYpOworCisJYmQgPSBjaC0+Y2hfYmQ7CisJaWY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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoqKglEZWZpbml0aW9ucyBmb3IgRGlnaSBkaXR0eSgxKSBjb21tYW5kLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCisvKgorICogQ29weXJpZ2h0IChjKSAxOTg4LTk2IERpZ2kgSW50ZXJuYXRpb25hbCBJbmMuLCBBbGwgUmlnaHRzIFJlc2VydmVkLgorICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFRoaXMgbW9kdWxlIHByb3ZpZGVzIGFwcGxpY2F0aW9uIGFjY2VzcyB0byBzcGVjaWFsIERpZ2kKKyAqIHNlcmlhbCBsaW5lIGVuaGFuY2VtZW50cyB3aGljaCBhcmUgbm90IHN0YW5kYXJkIFVOSVgodG0pIGZlYXR1cmVzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmICFkZWZpbmVkKFRJT0NNT0RHKQorCisjZGVmaW5lCVRJT0NNT0RHCSgnZCc8PDgpIHwgMjUwCQkvKiBnZXQgbW9kZW0gY3RybCBzdGF0ZQkqLworI2RlZmluZQlUSU9DTU9EUwkoJ2QnPDw4KSB8IDI1MQkJLyogc2V0IG1vZGVtIGN0cmwgc3RhdGUJKi8KKworI2lmbmRlZiBUSU9DTV9MRSAKKyNkZWZpbmUJCVRJT0NNX0xFCTB4MDEJCS8qIGxpbmUgZW5hYmxlCQkqLworI2RlZmluZQkJVElPQ01fRFRSCTB4MDIJCS8qIGRhdGEgdGVybWluYWwgcmVhZHkJKi8KKyNkZWZpbmUJCVRJT0NNX1JUUwkweDA0CQkvKiByZXF1ZXN0IHRvIHNlbmQJKi8KKyNkZ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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIERJR0kgcGFyYW1ldGVycy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgZGlnaV90IHsKKwl1bnNpZ25lZCBzaG9ydAlkaWdpX2ZsYWdzOwkJLyogRmxhZ3MgKHNlZSBhYm92ZSkJKi8KKwl1bnNpZ25lZCBzaG9ydAlkaWdpX21heGNwczsJCS8qIE1heCBwcmludGVyIENQUwkqLworCXVuc2lnbmVkIHNob3J0CWRpZ2lfbWF4Y2hhcjsJCS8qIE1heCBjaGFycyBpbiBwcmludCBxdWV1ZSAqLworCXVuc2lnbmVkIHNob3J0CWRpZ2lfYnVmc2l6ZTsJCS8qIEJ1ZmZlciBzaXplCQkqLworCXVuc2lnbmVkIGNoYXIJZGlnaV9vbmxlbjsJCS8qIExlbmd0aCBvZiBPTiBzdHJpbmcJKi8KKwl1bnNpZ25lZCBjaGFyCWRpZ2lfb2ZmbGVuOwkJLyogTGVuZ3RoIG9mIE9GRiBzdHJpbmcJKi8KKwljaGFyCQlkaWdpX29uc3RyW0RJR0lfUExFTl07CS8qIFByaW50ZXIgb24gc3RyaW5nCSovCisJY2hhcgkJZGlnaV9vZmZzdHJbRElHSV9QTEVOXTsJLyogUHJpbnRlciBvZmYgc3RyaW5nCSovCisJY2hhcgkJZGlnaV90ZXJtW0RJR0lfVFNJWl07CS8qIHRlcm1pbmFsIHN0cmluZwkqLworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogS01FIGRlZmluaXRpb25zIGFuZCBzdHJ1Y3R1cmVzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUJUldfSURMRQkJMAkvKiBPcGVyYXRpb24gY29tcGxldGUJCQkqLworI2RlZmluZQlSV19SRUFECQkxCS8qIFJlYWQgQ29uY2VudHJhdG9yIE1lbW9yeQkJKi8KKyNkZWZpbmUJUldfV1JJVEUJMgkvKiBXcml0ZSBDb25jZW50cmF0b3IgTWVtb3J5CQkqLworCitzdHJ1Y3QgcndfdCB7CisJdW5zaWduZWQgY2hhcglyd19yZXE7CQkvKiBSZXF1ZXN0IHR5cGUJCQkqLworCXVuc2lnbmVkIGNoYXIJcndfYm9hcmQ7CS8qIEhvc3QgQWRhcHRlciBib2FyZCBudW1iZXIJKi8KKwl1bnNpZ25lZCBjaGFyCXJ3X2NvbmM7CS8qIENvbmNlbnRyYXRvciBudW1iZXIJCSovCisJdW5zaWduZWQgY2hhcglyd19yZXNlcnZlZDsJLyogUmVzZXJ2ZWQgZm9yIGV4cGFuc2lvbgkqLworCXVuc2lnbmVkIGxvbmcJcndfYWRkcjsJLyogQWRkcmVzcyBpbiBjb25jZW50cmF0b3IJKi8KKwl1bnNpZ25lZCBzaG9ydAlyd19zaXplOwkvKiBSZWFkL3dyaXRlIHJlcXVlc3QgbGVuZ3RoCSovCisJdW5zaWduZWQgY2hhcglyd19kYXRhWzEyOF07CS8qIERhdGEgdG8gcmVhZC93cml0ZQkJKi8KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU2hyaW5rIEJ1ZmZlciBhbmQgQm9hcmQgSW5mb3JtYXRpb24gZGVmaW5pdGlvbnMgYW5kIHN0cnVjdHVyZXMuCisKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKiBCb2FyZCB0eXBlIHJldHVybiBjb2RlcyAqLworI2RlZmluZ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Zl9yZXN1bHQ7CS8qIFJlYXNvbiBmb3IgY2FsbCBmYWlsaW5nCisJCQkJCQkgICBaZXJvIGlzIEdvb2QgcmV0dXJuICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX2luaXQ7CS8qIE5vbi1aZXJvIGlmIGl0IGNhdXNlZCBhbiAgICAgCisJCQkJCQkgICB4eGluaXQgY2FsbC4gKi8KKworCXVuc2lnbmVkIGNoYXIJc2hyaW5rX2J1Zl9hbnBvcnRzOwkvKiBOdW1iZXIgb2YgYXN5bmMgcG9ydHMgICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX3NucG9ydHM7IAkvKiBOdW1iZXIgb2Ygc3luYyAgcG9ydHMgKi8KKwl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfdHlwZTsJLyogQm9hcmQgdHlwZSAxID0gUEMvWGksCisJCQkJCQkJICAgICAgMiA9IFBDL1htLAorCQkJCQkJCSAgICAgIDMgPSBQQy9YZSAgCisJCQkJCQkJICAgICAgNCA9IE1DL1hpICAKKwkJCQkJCQkgICAgICA1ID0gQ09NWC9pICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX2NhcmQ7CS8qIENhcmQgbnVtYmVyICovCisJCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTdHJ1Y3R1cmUgdG8gZ2V0IGRyaXZlciBzdGF0dXMgaW5mb3JtYXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgZGlnaV9kaW5mbyB7CisJdW5zaWduZWQgbG9uZwlkaW5mb19uYm9hcmRzOwkJLyogIyBib2FyZHMgY29uZmlndXJlZAkqLworCWNoYXIJCWRpbmZvX3Jlc2VydmVkWzEyXTsJLyogZm9yIGZ1dHVyZSBleHBhbnNpb24gKi8KKwljaGFyCQlkaW5mb192ZXJzaW9uWzE2XTsJLyogZHJpdmVyIHZlcnNpb24gICAgICAgKi8KK307CisKKyNkZWZpbmUJRElHSV9HRVRERAkoJ2QnPDw4KSB8IDI0OAkJLyogZ2V0IGRyaXZlciBpbmZvICAgICAgKi8KKyAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1ib2FyZCBpbmZvcm1hdGlvbgorICoKKyAqIHBoeXNzaXplIGFuZCBtZW1zaXplIGRpZmZlciB3aGVuIGJvYXJkIGhhcyAid2luZG93ZWQiIG1lbW9yeQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2luZm8geworCXVuc2lnbmVkIGxvbmcJaW5mb19iZG51bTsJCS8qIEJvYXJkIG51bWJlciAoMCBiYXNlZCkgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX2lvcG9ydDsJCS8qIGlvIHBvcnQgYWRkcmVzcyAgICAgICAgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX3BoeXNhZGRyOwkJLyogbWVtb3J5IGFkZHJlc3MgICAgICAgICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fcGh5c3NpemU7CQkvKiBTaXplIG9mIGhvc3QgbWVtIHdpbmRvdyAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19tZW1zaXplOwkJLyogQW1vdW50IG9mIGR1YWwtcG9ydCBtZW0gKi8KKwkJCQkJCS8qIG9uIGJvYXJkICAgICAgICAgICAgICAgICovCisJdW5zaWduZWQgc2hvcnQJaW5mb19iZHR5cGU7CQkvKiBCb2FyZCB0eXBlICAgICAgICAgICAgICAqLworCXVuc2lnbmVkIHNob3J0CWluZm9fbnBv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BhbnNpb24gICAgKi8KK307CisKKyNkZWZpbmUJRElHSV9HRVRTVEFUCSgnZCc8PDgpIHwgMjQ0CQkvKiBnZXQgYm9hcmQgaW5mbyAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1jaGFubmVsIGluZm9ybWF0aW9uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2NoIHsKKwl1bnNpZ25lZCBsb25nCWluZm9fYmRudW07CQkvKiBCb2FyZCBudW1iZXIgKDAgYmFzZWQpICAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19jaGFubmVsOwkJLyogQ2hhbm5lbCBpbmRleCBudW1iZXIgICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fY2hfY2ZsYWc7CQkvKiBDaGFubmVsIGNmbGFnICAgCSAgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX2NoX2lmbGFnOwkJLyogQ2hhbm5lbCBpZmxhZyAgIAkgICAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19jaF9vZmxhZzsJCS8qIENoYW5uZWwgb2ZsYWcgICAJICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fY2hzaXplOwkJLyogQ2hhbm5lbCBzdHJ1Y3R1cmUgc2l6ZSAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fc2xlZXBfc3RhdDsJLyogc2xlZXAgc3RhdHVzCQkgICAqLworCWRldl90CQlpbmZvX2RldjsJCS8qIGRldmljZSBudW1iZXIJICAgKi8KKwl1bnNpZ25lZCBjaGFyCWluZm9faW5pdHN0YXRlOwkJLyogQ2hhbm5lbCBpbml0IHN0YXRlCSAgICovCisJdW5za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fSAorCisjaW5jbHVkZSAiZGduY190eXBlcy5oIgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFBlciBjaGFubmVsL3BvcnQgQ2xhc3NpYyBVQVJUIHN0cnVjdHVyZQkJCQkqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgkJQmFzZSBTdHJ1Y3R1cmUgRW50cmllcyBVc2FnZSBNZWFuaW5ncyB0byBIb3N0CQkqCisgKgkJCQkJCQkJCSoKKyAqCVcgPSByZWFkIHdyaXRlCQlSID0gcmVhZCBvbmx5CQkJCSoKKyAqCQkJVSA9IFVudXNlZC4JCQkJCSoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBjbHNfdWFydF9zdHJ1Y3QgeworCXU4IHR4cng7CQkvKiBXUiAgUkhSL1RIUiAtIEhvbGRpbmcgUmVnICovCisJdTggaWVyOwkJLyogV1IgIElFUiAtIEludGVycnVwdCBFbmFibGUgUmVnICovCisJdTggaXNyX2ZjcjsJCS8qIFdSICBJU1IvRkNSIC0gSW50ZXJydXB0IFN0YXR1cyBSZWcvRmlmbyBDb250cm9sIFJlZyAqLworCXU4IGxjcjsJCS8qIFdSICBMQ1IgLSBMaW5lIENvbnRyb2wgUmVnICovCisJdTggbWNyOwkJLyogV1IgIE1DUiAtIE1vZGVtIENvbnRyb2wgUmVnICovCisJdTggbHNyOwkJLyogV1IgIExTUiAtIExpbmUgU3RhdHVzIFJlZyAqLworCXU4IG1zcjsJCS8qIFdSICBNU1IgLSBNb2RlbSBTdGF0dXMgUmVnICovCisJdTggc3ByOwkJLyogV1IgIFNQUiAtIFNjcmF0Y2ggUGFkIFJlZyAqLworfTsKKworLyogV2hlcmUgdG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kVTU180X1BDSV9OQU1FLAk0LAkxCX0sCisJewlQQ0lfREVWSUNFX05FT19FWFBSRVNTXzRSSjQ1X1BDSV9OQU1FLAk0LAkxCX0sCisJewlQQ0lfREVWSUNFX05FT19FWFBSRVNTXzhSSjQ1X1BDSV9OQU1FLAk4LAkxCX0sCisJewlOVUxMLAkJCQkJMCwJMAl9Cit9OworCitzdGF0aWMgc3RydWN0IHBjaV9kcml2ZXIgZGduY19kcml2ZXIgPSB7CisJLm5hbWUJCT0gImRnbmMiLAorCS5wcm9iZQkJPSBkZ25jX2luaXRfb25lLAorCS5pZF90YWJsZSAgICAgICA9IGRnbmNfcGNpX3RibCwKKwkucmVtb3ZlCQk9IGRnbmNfcmVtb3ZlX29uZSwKK307CisKKworY2hhciAqZGduY19zdGF0ZV90ZXh0W10gPSB7CisJIkJvYXJkIEZhaWxlZCIsCisJIkJvYXJkIEZvdW5kIiwKKwkiQm9hcmQgUkVBRFkiLAorfTsKKworY2hhciAqZGduY19kcml2ZXJfc3RhdGVfdGV4dFtdID0geworCSJEcml2ZXIgSW5pdGlhbGl6ZWQiLAorCSJEcml2ZXIgUmVhZHkuIgorfTsKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBEcml2ZXIgbG9hZC91bmxvYWQgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCisvKgorICogaW5pdF9tb2R1bGUoKQorICoKKyAqIE1vZHVsZSBsb2FkLiAgVGhpcyBpcyB3aGVyZSBpdCBhbGwgc3RhcnRzLgorICovCitpbnQgZGduY19pbml0X21vZHVsZSh2b2lkKQoreworCWludCByYyA9IDA7CisKKwlBUFIoKCIlcywgRGlnaSBJbnRlcm5hdGlvbmFsIFBhcnQgTnVtYmVyICVzXG4iLCBER19OQU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IHVzYWdlIG9mIElSUSAlZFxuIiwgYnJkLT5pcnEpKTsKKwkJfQorCX0KKwlyZXR1cm4ocmMpOworfQorCisvKgorICogUmVtYXAgUENJIG1lbW9yeS4KKyAqLworc3RhdGljIHZvaWQgZGduY19kb19yZW1hcChzdHJ1Y3QgYm9hcmRfdCAqYnJkKQoreworCisJaWYgKCFicmQgfHwgYnJkLT5tYWdpYyAhPSBER05DX0JPQVJEX01BR0lDKQorCQlyZXR1cm47CisKKwlicmQtPnJlX21hcF9tZW1iYXNlID0gaW9yZW1hcChicmQtPm1lbWJhc2UsIDB4MTAwMCk7CisKKwlEUFJfSU5JVCgoInJlbWFwcGVkIG1lbTogMHglcFxuIiwgYnJkLT5yZV9tYXBfbWVtYmFzZSkpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKgorKiBGdW5jdGlvbjoKKyoKKyogICAgZGduY19wb2xsX2hhbmRsZXIKKyoKKyogQXV0aG9yOgorKgorKiAgICBTY290dCBIIEtpbGF1CisqCisqIFBhcmFtZXRlcnM6CisqCisqICAgIGR1bW15IC0tIGlnbm9yZWQKKyoKKyogUmV0dXJuIFZhbHVlczoKKyoKKyogICAgbm9uZQorKgorKiBEZXNjcmlwdGlvbjoKKyoKKyogICAgQXMgZWFjaCB0aW1lciBleHBpcmVzLCBpdCBkZXRlcm1pbmVzIChhKSB3aGV0aGVyIHRoZSAidHJhbnNtaXQiCisqICAgIHdhaXRlciBuZWVkcyB0byBiZSB3b2tlbiB1cCwgYW5kIChiKSB3aGV0aGVyIHRoZSBwb2xsZXIgbmVlZHMgdG8KKyogICAgYmUgcmVzY2hlZHVsZWQuCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIGRnbmNfcG9sbF9oYW5kbG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worCWRnbmNfcmF3cmVhZG9rCQk9IHJhd3JlYWRvazsKKwlkZ25jX3RyY2J1Zl9zaXplCT0gdHJjYnVmX3NpemU7CisJZGduY19kZWJ1ZwkJPSBkZWJ1ZzsKKworCWZvciAoaSA9IDA7IGkgPCBNQVhCT0FSRFM7IGkrKykgeworCQlkZ25jX0JvYXJkW2ldID0gTlVMTDsKKwl9CisKKwlpbml0X3RpbWVyKCZkZ25jX3BvbGxfdGltZXIpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBVdGlsaXR5IGZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBkZ25jX21zX3NsZWVwKCkKKyAqCisgKiBQdXQgdGhlIGRyaXZlciB0byBzbGVlcCBmb3IgeCBtcydzCisgKgorICogUmV0dXJucyAwIGlmIHRpbWVkIG91dCwgITAgKHNob3dpbmcgc2lnbmFsKSBpZiBpbnRlcnJ1cHRlZCBieSBhIHNpZ25hbC4KKyAqLworaW50IGRnbmNfbXNfc2xlZXAodWxvbmcgbXMpCit7CisJY3VycmVudC0+c3RhdGUgPSBUQVNLX0lOVEVSUlVQVElCTEU7CisJc2NoZWR1bGVfdGltZW91dCgobXMgKiBIWikgLyAxMDAwKTsKKwlyZXR1cm4gKHNpZ25hbF9wZW5kaW5nKGN1cnJlbnQpKTsKK30KKworCisKKy8qCisgKiAgICAgIGRnbmNfaW9jdGxfbmFtZSgpIDogUmV0dXJucyBhIHRleHQgdmVyc2lvbiBvZiBlYWNoIGlvY3RsIHZhbHVlLgorICovCitjaGFyICpkZ25jX2lvY3RsX25hbWUoaW50IGNtZCkKK3sKKwlzd2l0Y2goY21kKSB7CisKKwljYXNlIFRDR0VUQToJCXJldHVybigiVENHRVRBIik7CisJY2Fz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ldHVybigiRElHSV9TRVRBRiIpOworCWNhc2UgRElHSV9TRVRGTE9XOglyZXR1cm4oIkRJR0lfU0VURkxPVyIpOworCWNhc2UgRElHSV9TRVRBRkxPVzoJcmV0dXJuKCJESUdJX1NFVEFGTE9XIik7CisJY2FzZSBESUdJX0dFVEZMT1c6CXJldHVybigiRElHSV9HRVRGTE9XIik7CisJY2FzZSBESUdJX0dFVEFGTE9XOglyZXR1cm4oIkRJR0lfR0VUQUZMT1ciKTsKKwljYXNlIERJR0lfR0VUQToJCXJldHVybigiRElHSV9HRVRBIik7CisJY2FzZSBESUdJX0dFREVMQVk6CXJldHVybigiRElHSV9HRURFTEFZIik7CisJY2FzZSBESUdJX1NFREVMQVk6CXJldHVybigiRElHSV9TRURFTEFZIik7CisJY2FzZSBESUdJX0dFVENVU1RPTUJBVUQ6IHJldHVybigiRElHSV9HRVRDVVNUT01CQVVEIik7CisJY2FzZSBESUdJX1NFVENVU1RPTUJBVUQ6IHJldHVybigiRElHSV9TRVRDVVNUT01CQVVEIik7CisJY2FzZSBUSU9DTU9ERzoJCXJldHVybigiVElPQ01PREciKTsKKwljYXNlIFRJT0NNT0RTOgkJcmV0dXJuKCJUSU9DTU9EUyIpOworCWNhc2UgVElPQ1NEVFI6CQlyZXR1cm4oIlRJT0NTRFRSIik7CisJY2FzZSBUSU9DQ0RUUjoJCXJldHVybigiVElPQ0NEVFIiKTsKKworCWRlZmF1bHQ6CQlyZXR1cm4oInVua25vd24iKTsKKwl9Cit9CmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvZGduYy9kZ25jX2RyaXZlci5oIGIvZHJpdmVycy9zdGFnaW5nL2RnbmMvZGduY19kcml2ZXIuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yMThiMTVkCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL2RnbmMvZGduY19kcml2ZXIuaApAQCAtMCwwICsxLDU2MyBAQAorLyo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JyaWRnZSwgTUEgMDIxMzksIFVTQS4KKyAqCisgKglOT1RFOiBUSElTIElTIEEgU0hBUkVEIEhFQURFUi4gRE8gTk9UIENIQU5HRSBDT0RJTkcgU1RZTEUhISEKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIERyaXZlciBpbmNsdWRlcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fREdOQ19EUklWRVJfSAorI2RlZmluZSBfX0RHTkNfRFJJVkVSX0gKKworI2luY2x1ZGUgPGxpbnV4L3R5cGVzLmg+CS8qIFRvIHBpY2sgdXAgdGhlIHZhcmlvbnMgTGludXggdHlwZXMgKi8KKyNpbmNsdWRlIDxsaW51eC90dHkuaD4JICAvKiBUbyBwaWNrIHVwIHRoZSB2YXJpb3VzIHR0eSBzdHJ1Y3RzL2RlZmluZXMgKi8KKyNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4JLyogRm9yIGlycXJldHVybl90IHR5cGUgKi8KKworI2luY2x1ZGUgImRnbmNfdHlwZXMuaCIJCS8qIEFkZGl0aW9uYWwgdHlwZXMgbmVlZGVkIGJ5IHRoZSBEaWdpIGhlYWRlciBmaWxlcyAqLworI2luY2x1ZGUgImRpZ2kuaCIJCS8qIERpZ2kgc3BlY2lmaWMgaW9jdGwgaGVhZGVyICovCisjaW5jbHVkZSAiZGduY19rY29tcGF0LmgiCS8qIEtlcm5lbCAyLjQvMi42IGNvbXBhdCBpbmNsdWRlcyAqLworI2luY2x1ZGUgImRnbmNfc3lzZnMuaCIJCS8qIFN1cHBvcnQgZm9yIFNZU0ZTICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgor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IGNhbiBiZSB3aGlsZSBiZWluZyBsb2FkZWQuCisgKi8KK2VudW0geworCURSSVZFUl9JTklUSUFMSVpFRCA9IDAsCisJRFJJVkVSX1JFQURZCit9OworCisvKgorICogQWxsIHRoZSBwb3NzaWJsZSBzdGF0ZXMgdGhlIGJvYXJkIGNhbiBiZSB3aGlsZSBib290aW5nIHVwLgorICovCitlbnVtIHsKKwlCT0FSRF9GQUlMRUQgPSAwLAorCUJPQVJEX0ZPVU5ELAorCUJPQVJEX1JFQURZCit9OworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogU3RydWN0dXJlcyBhbmQgY2xvc2VseSByZWxhdGVkIGRlZmluZXMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBib2FyZF90Oworc3RydWN0IGNoYW5uZWxfdDsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUGVyIGJvYXJkIG9wZXJhdGlvbnMgc3RydWN0dXJlCQkJCSAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IGJvYXJkX29wcyB7CisJdm9pZCAoKnRhc2tsZXQpICh1bnNpZ25lZCBsb25nIGRhdGEpOworCWlycXJldHVybl90ICgqaW50cikgKGludCBpcnEsIHZvaWQgKnZvaWRicmQpOworCXZvaWQgKCp1YXJ0X2luaXQpIChzdHJ1Y3QgY2hhbm5lbF90ICpjaCk7CisJdm9pZCAoKnVhcnRfb2ZmKSAoc3RydWN0IGNoYW5uZWxfdCAqY2gpOworCWludCAgKCpkcmFpbikgKHN0cnVjdCB0dHlfc3RydWN0ICp0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JLyogVGhlIGJvYXJkICJzdGF0dXMiLCBhcyBkZWZpbmVkIGJ5IERQQSAqLworCisJLyoKKwkgKglNZ210IGRhdGEuCisJICovCisJY2hhcgkJKm1zZ2J1Zl9oZWFkOworCWNoYXIJCSptc2didWY7CisKKwl1aW50CQliZF9kaXZpZGVuZDsJLyogQm9hcmQvVUFSVHMgc3BlY2lmaWMgZGl2aWRlbmQgKi8KKworCXN0cnVjdCBib2FyZF9vcHMgKmJkX29wczsKKworCS8qIC9wcm9jLzxib2FyZD4gZW50cmllcyAqLworCXN0cnVjdCBwcm9jX2Rpcl9lbnRyeSAqcHJvY19lbnRyeV9wb2ludGVyOworCXN0cnVjdCBkZ25jX3Byb2NfZW50cnkgKmRnbmNfYm9hcmRfdGFibGU7CisKK307CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVW5pdCBmbGFnIGRlZmluaXRpb25zIGZvciB1bl9mbGFncy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFVOX0lTT1BFTgkweDAwMDEJCS8qIERldmljZSBpcyBvcGVuCQkqLworI2RlZmluZSBVTl9DTE9TSU5HCTB4MDAwMgkJLyogTGluZSBpcyBiZWluZyBjbG9zZWQJCSovCisjZGVmaW5lIFVOX0lNTQkJMHgwMDA0CQkvKiBTZXJ2aWNlIGltbWVkaWF0ZWx5CQkqLworI2RlZmluZSBVTl9CVVNZCQkweDAwMDgJCS8qIFNvbWUgd29yayB0aGlzIGNoYW5uZWwJKi8KKyNkZWZpbmUgVU5fQlJFQUtJCTB4MDAxMAkJLyogSW5wdXQgYnJlYWsgcmVjZWl2ZWQJCSovCisjZGVmaW5lIFVOX1BXQUlUCTB4MDAyMAkJLyogUHJpbnRlciB3YWl0aW5nIGZvciB0ZXJtaW5hbAkqLworI2RlZmluZSBVTl9USU1FCQkweDAwNDAJCS8qIFdhaXRpbmcgb24gdGltZQkJKi8KKyNkZWZpbmUgVU5fRU1QVFkJMHgwMDgwCQkvKiBXYWl0aW5nIG91dHB1dCBxdWV1ZSBlbXB0eQkqLworI2RlZmluZSBVTl9MT1cJCTB4MDEwMAkJLyogV2FpdGluZyBvdXRwdXQgbG93IHdhdGVyIG1hcmsqLworI2RlZmluZSBVTl9FWENMX09QRU4JMHgwMjAwCQkvKiBPcGVuIGZvciBleGNsdXNpdmUgdXNlCSovCisjZGVmaW5lIFVOX1dPUEVOCTB4MDQwMAkJLyogRGV2aWNlIHdhaXRpbmcgZm9yIG9wZW4JKi8KKyNkZWZpbmUgVU5fV0lPQ1RMCTB4MDgwMAkJLyogRGV2aWNlIHdhaXRpbmcgZm9yIG9wZW4JKi8KKyNkZWZpbmUgVU5fSEFOR1VQCTB4ODAwMAkJLyogQ2FycmllciBsb3N0CQkJKi8KKworc3RydWN0IGRldmljZTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU3RydWN0dXJlIGZvciB0ZXJtaW5hbCBvciBwcmludGVyIHVuaXQuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IHVuX3QgeworCWludAltYWdpYzsJCS8qIFVuaXQgTWFnaWMgTnVtYmVyLgkJCSovCisJc3RydWN0CWNoYW5uZWxfdCAqdW5fY2g7CisJdWxvbmcJdW5fdGltZTsKKwl1aW50CXVuX3R5cGU7CisJdWludAl1bl9vcGVuX2NvdW50OwkvKiBDb3VudGVyIG9mIG9wZW5zIHRvIHBvcnQJCSovCisJc3RydWN0IHR0eV9zdHJ1Y3QgKnVuX3R0eTsvKiBQb2ludGVyIHRvIHVuaXQgdHR5IHN0cnVjdHVyZQkqLworCXVpbnQJdW5fZmxhZ3M7CS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vdW50IG9mIGludGVycnVwdHMgKi8KKwl1bG9uZwkJY2hfaW50cl9yeDsJLyogQ291bnQgb2YgaW50ZXJydXB0cyAqLworCisKKwkvKiAvcHJvYy88Ym9hcmQ+LzxjaGFubmVsPiBlbnRyaWVzICovCisJc3RydWN0IHByb2NfZGlyX2VudHJ5ICpwcm9jX2VudHJ5X3BvaW50ZXI7CisJc3RydWN0IGRnbmNfcHJvY19lbnRyeSAqZGduY19jaGFubmVsX3RhYmxlOworCisJdWludCBjaF9zbmlmZl9pbjsKKwl1aW50IGNoX3NuaWZmX291dDsKKwljaGFyICpjaF9zbmlmZl9idWY7CQkvKiBTbmlmZiBidWZmZXIgZm9yIHByb2MgKi8KKwl1bG9uZyBjaF9zbmlmZl9mbGFnczsJCS8qIENoYW5uZWwgZmxhZ3MJCSovCisJd2FpdF9xdWV1ZV9oZWFkX3QgY2hfc25pZmZfd2FpdDsKK307CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBQcm90b3R5cGVzIGZvciBub24tc3RhdGljIGZ1bmN0aW9ucyB1c2VkIGluIG1vcmUgdGhhbiBvbmUgbW9kdWxlCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2V4dGVybiBpbnQJCWRnbmNfbXNfc2xlZXAodWxvbmcgbXMpOworZXh0ZXJuIGNoYXIJCSpkZ25jX2lvY3RsX25hbWUoaW50IGNtZCk7CisKKy8qCisgKiBPdXIgR2xvYmFsIFZhcmlhYmxlcy4KKyAqLworZXh0ZXJuIGludAkJZGduY19kcml2ZXJfc3RhdGU7CS8qIFRoZSBzdGF0ZSBvZiB0aGUgZHJpdmVyCSovCitleHRlcm4gdWludAkJZGduY19NYWpvcjsJCS8qIE91ciBkcml2ZXIvbWdtdCBtYWpvcgkqLworZXh0ZXJu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wgSW5jLiwgNjc1IE1hc3MgQXZlLCBDYW1icmlkZ2UsIE1BIDAyMTM5LCBVU0EuCisgKgorICoJTk9URTogVEhJUyBJUyBBIFNIQVJFRCBIRUFERVIuIERPIE5PVCBDSEFOR0UgQ09ESU5HIFNUWUxFISEhCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUaGlzIGZpbGUgaXMgaW50ZW5kZWQgdG8gY29udGFpbiBhbGwgdGhlIGtlcm5lbCAiZGlmZmVyZW5jZXMiIGJldHdlZW4gdGhlCisgKiB2YXJpb3VzIGtlcm5lbHMgdGhhdCB3ZSBzdXBwb3J0LgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fREdOQ19LQ09NUEFUX0gKKyNkZWZpbmUgX19ER05DX0tDT01QQVRfSAorCisjaW5jbHVkZSA8bGludXgvdmVyc2lvbi5oPgorCisjIGlmbmRlZiBLRVJORUxfVkVSU0lPTgorIyAgZGVmaW5lIEtFUk5FTF9WRVJTSU9OKGEsYixjKSAgKCgoYSkgPDwgMTYpICsgKChiKSA8PCA4KSArIChjKSkKKyMgZW5kaWYKKworCisjaWYgIWRlZmluZWQoVFRZX0ZMSVBCVUZfU0laRSkKKyMgZGVmaW5lIFRUWV9GTElQQlVGX1NJWkUgNTEyCisjZW5kaWYKKworCisvKiBTcGFyc2Ugc3R1ZmYgKi8KKyMgaWZuZGVmIF9fdXNlcgorIyAgZGVmaW5lIF9fdXNlcgorIyAgZGVmaW5lIF9fa2VybmVsCisjICBkZWZpbmUgX19zYWZlCisjICBkZWZpbmUgX19mb3JjZQorIyAgZGVmaW5lIF9fY2hrX3VzZXJfcHRyKHgpICh2b2lkKTAKKyMgZW5kaWYKKworCisjICBkZWZpbmUgUEFSTV9TVFIoVkFSL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gZGduY190dHlfc2VuZF9icmVhaywKKwkud2FpdF91bnRpbF9zZW50ID0gZGduY190dHlfd2FpdF91bnRpbF9zZW50LAorCS5zZW5kX3hjaGFyID0gZGduY190dHlfc2VuZF94Y2hhcgorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFRUWSBJbml0aWFsaXphdGlvbi9DbGVhbnVwIEZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBkZ25jX3R0eV9wcmVpbml0KCkKKyAqCisgKiBJbml0aWFsaXplIGFueSBnbG9iYWwgdHR5IHJlbGF0ZWQgZGF0YSBiZWZvcmUgd2UgZG93bmxvYWQgYW55IGJvYXJkcy4KKyAqLworaW50IGRnbmNfdHR5X3ByZWluaXQodm9pZCkKK3sKKwkvKgorCSAqIEFsbG9jYXRlIGEgYnVmZmVyIGZvciBkb2luZyB0aGUgY29weSBmcm9tIHVzZXIgc3BhY2UgdG8KKwkgKiBrZXJuZWwgc3BhY2UgaW4gZGduY193cml0ZSgpLiAgV2Ugb25seSB1c2Ugb25lIGJ1ZmZlciBhbmQKKwkgKiBjb250cm9sIGFjY2VzcyB0byBpdCB3aXRoIGEgc2VtYXBob3JlLiAgSWYgd2UgYXJlIHBhZ2luZywgd2UKKwkgKiBhcmUgYWxyZWFkeSBpbiB0cm91YmxlIHNvIG9uZSBidWZmZXIgd29uJ3QgaHVydCBtdWNoIGFueXdheS4KKwkgKgorCSAqIFdlIGFyZSBva2F5IHRvIHNsZWVwIGluIHRoZSBtYWxsb2MsIGFzIHRoaXMgcm91dGluZQorCSAqIGlzIG9ubHkgY2FsbGVkIGR1cmluZyBtb2R1bGUgbG9hZCwgKG5vdCBpbiBpbnRlcnJ1cHQgY29udGV4dCksCisJICogYW5kIHdp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zbmlmZl93YWl0KTsKKwkJCX0KKwkJfQorCisJCS8qCisJCSAqIElmIHRoZSB1c2VyIHNlbnQgdXMgdG9vIG11Y2ggZGF0YSB0byBwdXNoIGludG8gb3VyIHRtcGJ1ZiwKKwkJICogd2UgbmVlZCB0byBrZWVwIGxvb3BpbmcgYXJvdW5kIG9uIGFsbCB0aGUgZGF0YS4KKwkJICovCisJCWlmICh0b29fbXVjaF9kYXRhKSB7CisJCQlwID0gdG1wYnVmOworCQkJdG1wYnVmbGVuID0gMDsKKwkJfQorCisJfSB3aGlsZSAodG9vX211Y2hfZGF0YSk7Cit9CisKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICoKKyAqCWRnbmNfd21vdmUgLSBXcml0ZSBkYXRhIHRvIHRyYW5zbWl0IHF1ZXVlLgorICoKKyAqCQljaAktIFBvaW50ZXIgdG8gY2hhbm5lbCBzdHJ1Y3R1cmUuCisgKgkJYnVmCS0gUG9pdGVyIHRvIGNoYXJhY3RlcnMgdG8gYmUgbW92ZWQuCisgKgkJbgktIE51bWJlciBvZiBjaGFyYWN0ZXJzIHRvIG1vdmUuCisgKgorICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCitzdGF0aWMgdm9pZCBkZ25jX3dtb3ZlKHN0cnVjdCBjaGFubmVsX3QgKmNoLCBjaGFyICpidWYsIHVpbnQgbikKK3sKKwlpbnQJcmVtYWluOworCXVpbnQJaGVhZDsKKworCWlmICghY2ggfHwgY2gtPm1hZ2ljICE9IERHTkNfQ0hBTk5FTF9NQUdJQykKKwkJcmV0dXJuOworCisJaGVhZCA9IGNoLT5jaF93X2hlYWQgJiBXUVVFVUVNQVNLOworCisJLyoKKwkgKiBJZiB0aGUgd3JpdGUgd3JhcHMgb3ZlciB0aGUgdG9wIG9mIHRoZSBjaXJjdWxhciBidWZmZXIsCisJICogbW92ZSB0aGUgcG9ydGlvbiB1cCB0byB0aGUgd3JhcCBwb2ludCwgYW5kIHJlc2V0IHRoZQorCSAqIHBvaW50ZXJzIHRvIHRoZSBib3R0b20uCisJICovCisJcmVtYWluID0gV1FVRVVFU0laRSAtIGhlYWQ7CisKKwlpZiAobiA+PSByZW1haW4pIHsKKwkJbiAtPSByZW1haW47CisJCW1lbWNweShjaC0+Y2hfd3F1ZXVlICsgaGVhZCwgYnVmLCByZW1haW4pOworCQloZWFkID0gMDsKKwkJYnVmICs9IHJlbWFpbjsKKwl9CisKKwlpZiAobiA+IDApIHsKKwkJLyoKKwkJICogTW92ZSByZXN0IG9mIGRhdGEuCisJCSAqLworCQlyZW1haW4gPSBuOworCQltZW1jcHkoY2gtPmNoX3dxdWV1ZSArIGhlYWQsIGJ1ZiwgcmVtYWluKTsKKwkJaGVhZCArPSByZW1haW47CisJfQorCisJaGVhZCAmPSBXUVVFVUVNQVNLOworCWNoLT5jaF93X2hlYWQgPSBoZWFkOworfQorCisKKworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ25jX2lucHV0IC0gUHJvY2VzcyByZWNlaXZlZCBkYXRhLgorICoKKyAqCSAgICAgIGNoICAgICAgLSBQb2ludGVyIHRvIGNoYW5uZWwgc3RydWN0dXJlLgorICoKKyAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwordm9pZCBkZ25jX2lucHV0KHN0cnVjdCBjaGFubmVsX3QgKmNoKQoreworCXN0cnVjdCBib2FyZF90ICpiZDsKKwlzdHJ1Y3QgdHR5X3N0cnVjdCAqdHA7CisJc3RydWN0IHR0eV9sZGlzYyAqbGQ7CisJdWludAlybWFzazsKKwl1c2hvcnQJaGVhZDsKKwl1c2hvcnQJdGFpbDsKKwlpbnQJ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5fRU1QVFkpOworCQkJfQorCQl9CisKKwkJd2FrZV91cF9pbnRlcnJ1cHRpYmxlKCZjaC0+Y2hfcHVuLnVuX2ZsYWdzX3dhaXQpOworCX0KKworCURHTkNfVU5MT0NLKGNoLT5jaF9sb2NrLCBsb2NrX2ZsYWdzKTsKK30KKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUVFkgRW50cnkgcG9pbnRzIGFuZCBoZWxwZXIgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIGRnbmNfdHR5X29wZW4oKQorICoKKyAqLworc3RhdGljIGludCBkZ25jX3R0eV9vcGVuKHN0cnVjdCB0dHlfc3RydWN0ICp0dHksIHN0cnVjdCBmaWxlICpmaWxlKQoreworCXN0cnVjdCBib2FyZF90CSpicmQ7CisJc3RydWN0IGNoYW5uZWxfdCAqY2g7CisJc3RydWN0IHVuX3QJKnVuOworCXVpbnQJCW1ham9yID0gMDsKKwl1aW50CQltaW5vciA9IDA7CisJaW50CQlyYyA9IDA7CisJdWxvbmcJCWxvY2tfZmxhZ3M7CisKKwlyYyA9IDA7CisKKwltYWpvciA9IE1BSk9SKHR0eV9kZXZudW0odHR5KSk7CisJbWlub3IgPSBNSU5PUih0dHlfZGV2bnVtKHR0eSkpOworCisJaWYgKG1ham9yID4gMjU1KSB7CisJCXJldHVybiAtRU5YSU87CisJfQorCisJLyogR2V0IGJvYXJkIHBvaW50ZXIgZnJvbSBvdXIgYXJyYXkgb2YgbWFqb3JzIHdlIGhhdmUgYWxsb2NhdGVkICovCisJYnJkID0gZGduY19Cb2FyZHNCeU1ham9yW21ham9yXTsKKwlpZiAoIWJyZCkgeworCQlyZXR1cm4gLUVOWElPOworCX0KKworCS8qCisJICogSWYgYm9hcmQ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1d8VU5fRU1QVFkpKSB7CisJCWNoLT5jaF90dW4udW5fZmxhZ3MgJj0gfihVTl9MT1d8VU5fRU1QVFkpOworCQl3YWtlX3VwX2ludGVycnVwdGlibGUoJmNoLT5jaF90dW4udW5fZmxhZ3Nfd2FpdCk7CisJfQorCWlmIChjaC0+Y2hfcHVuLnVuX2ZsYWdzICYgKFVOX0xPV3xVTl9FTVBUWSkpIHsKKwkJY2gtPmNoX3B1bi51bl9mbGFncyAmPSB+KFVOX0xPV3xVTl9FTVBUWSk7CisJCXdha2VfdXBfaW50ZXJydXB0aWJsZSgmY2gtPmNoX3B1bi51bl9mbGFnc193YWl0KTsKKwl9CisKKwlER05DX1VOTE9DSyhjaC0+Y2hfbG9jaywgbG9ja19mbGFncyk7CisKKwlEUFJfSU9DVEwoKCJkZ25jX3R0eV9mbHVzaF9idWZmZXIgZmluaXNoXG4iKSk7Cit9CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUaGUgSU9DVEwgZnVuY3Rpb24gYW5kIGFsbCBvZiBpdHMgaGVscGVycworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIGRnbmNfdHR5X2lvY3RsKCkKKyAqCisgKiBUaGUgdXN1YWwgYXNzb3J0bWVudCBvZiBpb2N0bCdzCisgKi8KK3N0YXRpYyBpbnQgZGduY190dHlfaW9jdGwoc3RydWN0IHR0eV9zdHJ1Y3QgKnR0eSwgdW5zaWduZWQgaW50IGNtZCwKKwkJdW5zaWduZWQgbG9uZyBhcmcpCit7CisJc3RydWN0IGJvYXJkX3QgKmJkOworCXN0cnVjdCBjaGFubmVsX3QgKmNoOworCXN0cnVjdCB1bl90ICp1bjsKKwlpbnQgcmM7CisJdWxvbmcgbG9ja19mbGFnczsKKw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dGhlIEZyZWUgU29mdHdhcmUKKyAqIEZvdW5kYXRpb24sIEluYy4sIDY3NSBNYXNzIEF2ZSwgQ2FtYnJpZGdlLCBNQSAwMjEzOSwgVVNBLgorICoKKyAqCU5PVEU6IFRISVMgSVMgQSBTSEFSRUQgSEVBREVSLiBETyBOT1QgQ0hBTkdFIENPRElORyBTVFlMRSEhIQorICovCisKKyNpZm5kZWYgX19ESUdJX0gKKyNkZWZpbmUgX19ESUdJX0gKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoqKglEZWZpbml0aW9ucyBmb3IgRGlnaSBkaXR0eSgxKSBjb21tYW5kLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCisvKgorICogQ29weXJpZ2h0IChjKSAxOTg4LTk2IERpZ2kgSW50ZXJuYXRpb25hbCBJbmMuLCBBbGwgUmlnaHRzIFJlc2VydmVkLgorICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFRoaXMgbW9kdWxlIHByb3ZpZGVzIGFwcGxpY2F0aW9uIGFjY2VzcyB0byBzcGVjaWFsIERpZ2kKKyAqIHNlcmlhbCBsaW5lIGVuaGFuY2VtZW50cyB3aGljaCBhcmUgbm90IHN0YW5kYXJkIFVOSVgodG0pIGZlYXR1cmVzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmICFkZWZpbmVkKFRJT0NNT0RHKQorCisjZGVmaW5lCVRJT0NNT0RHCSgnZCc8PDgpIHwgMjUwCQkvKiBnZXQgbW9kZW0gY3RybCBzdGF0ZQkqLworI2RlZmluZQlUSU9DTU9EUwkoJ2QnPDw4KSB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JKCdkJzw8OCkgfCAyNTQJCS8qIHNldCBtb2RlbSBjdHJsIHN0YXRlICovCisjZGVmaW5lCVRJT0NNQklTCSgnZCc8PDgpIHwgMjU1CQkvKiBzZXQgbW9kZW0gY3RybCBzdGF0ZSAqLworI2VuZGlmCisKKworI2lmICFkZWZpbmVkKFRJT0NTRFRSKQorI2RlZmluZQlUSU9DU0RUUgkoJ2UnPDw4KSB8IDAJCS8qIHNldCBEVFIJCSovCisjZGVmaW5lCVRJT0NDRFRSCSgnZSc8PDgpIHwgMQkJLyogY2xlYXIgRFRSCQkqLworI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIElvY3RsIGNvbW1hbmQgYXJndW1lbnRzIGZvciBESUdJIHBhcmFtZXRlcnMuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBESUdJX0dFVEEJKCdlJzw8OCkgfCA5NAkJLyogUmVhZCBwYXJhbXMJCSovCisKKyNkZWZpbmUgRElHSV9TRVRBCSgnZSc8PDgpIHwgOTUJCS8qIFNldCBwYXJhbXMJCSovCisjZGVmaW5lIERJR0lfU0VUQVcJKCdlJzw8OCkgfCA5NgkJLyogRHJhaW4gJiBzZXQgcGFyYW1zCSovCisjZGVmaW5lIERJR0lfU0VUQUYJKCdlJzw8OCkgfCA5NwkJLyogRHJhaW4sIGZsdXNoICYgc2V0IHBhcmFtcyAqLworCisjZGVmaW5lIERJR0lfS01FCSgnZSc8PDgpIHwgOTgJCS8qIFJlYWQvV3JpdGUgSG9zdAkqLworCQkJCQkJLyogQWRhcHRlciBNZW1vcnkJKi8KKworI2RlZmluZQlESUdJX0dFVEZMT1cJKCdlJzw8OCkgfCA5OQkJLyogR2V0IHN0YXJ0Yy9zdG9wYyBmbG93ICovCisJCQkJCQkvKiBjb250cm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HB1dCBmbG93IGNvbnRyb2wJKi8KKyNkZWZpbmUgRFRSUEFDRQkJMHgwMDQwCQkvKiBEVFIgaW5wdXQgZmxvdyBjb250cm9sCSovCisjZGVmaW5lIERJR0lfQ09PSwkweDAwODAJCS8qIENvb2tlZCBwcm9jZXNzaW5nIGRvbmUgaW4gRkVQICovCisjZGVmaW5lIERJR0lfRk9SQ0VEQ0QJMHgwMTAwCQkvKiBGb3JjZSBjYXJyaWVyCQkqLworI2RlZmluZQlESUdJX0FMVFBJTgkweDAyMDAJCS8qIEFsdGVybmF0ZSBSSi00NSBwaW4gY29uZmlnCSovCisjZGVmaW5lCURJR0lfQUlYT04JMHgwNDAwCQkvKiBBdXggZmxvdyBjb250cm9sIGluIGZlcAkqLworI2RlZmluZQlESUdJX1BSSU5URVIJMHgwODAwCQkvKiBIb2xkIHBvcnQgb3BlbiBmb3IgZmxvdyBjbnRybCovCisjZGVmaW5lIERJR0lfUFBfSU5QVVQJMHgxMDAwCQkvKiBDaGFuZ2UgcGFyYWxsZWwgcG9ydCB0byBpbnB1dCovCisjZGVmaW5lIERJR0lfRFRSX1RPR0dMRQkweDIwMDAJCS8qIFN1cHBvcnQgRFRSIFRvZ2dsZSAgICAgICAgICAgKi8KKyNkZWZpbmUgRElHSV80MjIJMHg0MDAwCQkvKiBmb3IgNDIyLzIzMiBzZWxlY3RhYmxlIHBhbmVsICovCisjZGVmaW5lIERJR0lfUlRTX1RPR0dMRQkweDgwMDAJCS8qIFN1cHBvcnQgUlRTIFRvZ2dsZQkJKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVGhlc2Ugb3B0aW9ucyBhcmUgbm90IHN1cHBvcnRlZCBvbiB0aGUgY29teGkuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZQlESUdJX0NP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X1RTSVpdOwkvKiB0ZXJtaW5hbCBzdHJpbmcJKi8KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEtNRSBkZWZpbml0aW9ucyBhbmQgc3RydWN0dXJlcy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lCVJXX0lETEUJCTAJLyogT3BlcmF0aW9uIGNvbXBsZXRlCQkJKi8KKyNkZWZpbmUJUldfUkVBRAkJMQkvKiBSZWFkIENvbmNlbnRyYXRvciBNZW1vcnkJCSovCisjZGVmaW5lCVJXX1dSSVRFCTIJLyogV3JpdGUgQ29uY2VudHJhdG9yIE1lbW9yeQkJKi8KKworc3RydWN0IHJ3X3QgeworCXVuc2lnbmVkIGNoYXIJcndfcmVxOwkJLyogUmVxdWVzdCB0eXBlCQkJKi8KKwl1bnNpZ25lZCBjaGFyCXJ3X2JvYXJkOwkvKiBIb3N0IEFkYXB0ZXIgYm9hcmQgbnVtYmVyCSovCisJdW5zaWduZWQgY2hhcglyd19jb25jOwkvKiBDb25jZW50cmF0b3IgbnVtYmVyCQkqLworCXVuc2lnbmVkIGNoYXIJcndfcmVzZXJ2ZWQ7CS8qIFJlc2VydmVkIGZvciBleHBhbnNpb24JKi8KKwl1bnNpZ25lZCBpbnQJcndfYWRkcjsJLyogQWRkcmVzcyBpbiBjb25jZW50cmF0b3IJKi8KKwl1bnNpZ25lZCBzaG9ydAlyd19zaXplOwkvKiBSZWFkL3dyaXRlIHJlcXVlc3QgbGVuZ3RoCSovCisJdW5zaWduZWQgY2hhcglyd19kYXRhWzEyOF07CS8qIERhdGEgdG8gcmVhZC93cml0ZQkJKi8KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICog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AlzaHJpbmtfYnVmX3Jlc2VydmI7CS8qIFJlc2VydmVkICovCisJdW5zaWduZWQgaW50CXNocmlua19idWZfcmVzZXJ2YzsJLyogUmVzZXJ2ZWQgKi8KKwl1bnNpZ25lZCBpbnQJc2hyaW5rX2J1Zl9yZXNlcnZkOwkvKiBSZXNlcnZlZCAqLworCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX3Jlc3VsdDsJLyogUmVhc29uIGZvciBjYWxsIGZhaWxpbmcKKwkJCQkJCSAgIFplcm8gaXMgR29vZCByZXR1cm4gKi8KKwl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfaW5pdDsJLyogTm9uLVplcm8gaWYgaXQgY2F1c2VkIGFuCisJCQkJCQkgICB4eGluaXQgY2FsbC4gKi8KKworCXVuc2lnbmVkIGNoYXIJc2hyaW5rX2J1Zl9hbnBvcnRzOwkvKiBOdW1iZXIgb2YgYXN5bmMgcG9ydHMgICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX3NucG9ydHM7IAkvKiBOdW1iZXIgb2Ygc3luYyAgcG9ydHMgKi8KKwl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfdHlwZTsJLyogQm9hcmQgdHlwZSAxID0gUEMvWGksCisJCQkJCQkJICAgICAgMiA9IFBDL1htLAorCQkJCQkJCSAgICAgIDMgPSBQQy9YZQorCQkJCQkJCSAgICAgIDQgPSBNQy9YaQorCQkJCQkJCSAgICAgIDUgPSBDT01YL2kgKi8KKwl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfY2FyZDsJLyogQ2FyZCBudW1iZXIgKi8KKworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU3RydWN0dXJlIHRvIGdldCBkcml2ZXIgc3RhdHVzIGluZm9ybWF0aW9uCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IGRpZ2lfZGluZm8geworCXVuc2lnbmVkIGludAlkaW5mb19uYm9hcmRzOwkJLyogIyBib2FyZHMgY29uZmlndXJlZAkqLworCWNoYXIJCWRpbmZvX3Jlc2VydmVkWzEyXTsJLyogZm9yIGZ1dHVyZSBleHBhbnNpb24gKi8KKwljaGFyCQlkaW5mb192ZXJzaW9uWzE2XTsJLyogZHJpdmVyIHZlcnNpb24gICAgICAgKi8KK307CisKKyNkZWZpbmUJRElHSV9HRVRERAkoJ2QnPDw4KSB8IDI0OAkJLyogZ2V0IGRyaXZlciBpbmZvICAgICAgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU3RydWN0dXJlIHVzZWQgd2l0aCBpb2N0bCBjb21tYW5kcyBmb3IgcGVyLWJvYXJkIGluZm9ybWF0aW9uCisgKgorICogcGh5c3NpemUgYW5kIG1lbXNpemUgZGlmZmVyIHdoZW4gYm9hcmQgaGFzICJ3aW5kb3dlZCIgbWVtb3J5CisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IGRpZ2lfaW5mbyB7CisJdW5zaWduZWQgaW50CWluZm9fYmRudW07CQkvKiBCb2FyZCBudW1iZXIgKDAgYmFzZWQpICAqLworCXVuc2lnbmVkIGludAlpbmZvX2lvcG9ydDsJCS8qIGlvIHBvcnQgYWRkcmVzcyAgICAgICAgICovCisJdW5zaWduZWQgaW50CWluZm9fcGh5c2FkZHI7CQkvKiBtZW1vcnkgYWRkcmVzcyAgICAgICAgICAqLworCXVuc2lnbmVkIGludAlpbmZvX3BoeXNzaXplOwkJLyogU2l6ZSBvZiBob3N0IG1lbSB3aW5kb3cgKi8KKwl1bnNpZ25lZCBpbnQJaW5mb19tZW1zaXplOwkJLyogQW1vdW50IG9mIGR1YW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qLworCXVuc2lnbmVkIGludAlpbmZvX2hmbG93OwkJLyogaGZsb3cgZm9yIGNoYW5uZWwgICAgICAgKi8KKwl1bnNpZ25lZCBpbnQJaW5mb19yZXNlcnZlZFs4XTsJLyogZm9yIGZ1dHVyZSBleHBhbnNpb24gICAgKi8KK307CisKKyNkZWZpbmUJRElHSV9HRVRTVEFUCSgnZCc8PDgpIHwgMjQ0CQkvKiBnZXQgYm9hcmQgaW5mbyAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1jaGFubmVsIGluZm9ybWF0aW9uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2NoIHsKKwl1bnNpZ25lZCBpbnQJaW5mb19iZG51bTsJCS8qIEJvYXJkIG51bWJlciAoMCBiYXNlZCkgICovCisJdW5zaWduZWQgaW50CWluZm9fY2hhbm5lbDsJCS8qIENoYW5uZWwgaW5kZXggbnVtYmVyICAgICovCisJdW5zaWduZWQgaW50CWluZm9fY2hfY2ZsYWc7CQkvKiBDaGFubmVsIGNmbGFnICAgCSAgICovCisJdW5zaWduZWQgaW50CWluZm9fY2hfaWZsYWc7CQkvKiBDaGFubmVsIGlmbGFnICAgCSAgICovCisJdW5zaWduZWQgaW50CWluZm9fY2hfb2ZsYWc7CQkvKiBDaGFubmVsIG9mbGFnICAgCSAgICovCisJdW5zaWduZWQgaW50CWluZm9fY2hzaXplOwkJLyogQ2hhbm5lbCBzdHJ1Y3R1cmUgc2l6ZSAgKi8KKwl1bnNpZ25lZCBpbnQJaW5mb19zbGVlcF9zdGF0OwkvKiBzbGVlcCBzdGF0dXMJCSAgICovCisJZGV2X3QJCWluZm9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KQorICogQG90Z192ZXI6ICAgICAgICAgICAgT1RHIHZlcnNpb24gc3VwcG9ydGVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIDEuMyAoZGVmYXVsdCkKKyAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gMi4wCiAgKiBAZG1hX2VuYWJsZTogICAgICAgICBTcGVjaWZpZXMgd2hldGhlciB0byB1c2Ugc2xhdmUgb3IgRE1BIG1vZGUgZm9yIGFjY2Vzc2luZwogICogICAgICAgICAgICAgICAgICAgICAgdGhlIGRhdGEgRklGT3MuIFRoZSBkcml2ZXIgd2lsbCBhdXRvbWF0aWNhbGx5IGRldGVjdCB0aGUKICAqICAgICAgICAgICAgICAgICAgICAgIHZhbHVlIGZvciB0aGlzIHBhcmFtZXRlciBpZiBub25lIGlzIHNwZWNpZmllZC4KLSAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gU2xhdmUKKyAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gU2xhdmUgKGFsd2F5cyBhdmFpbGFibGUpCiAgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIERNQSAoZGVmYXVsdCwgaWYgYXZhaWxhYmxlKQogICogQGRtYV9kZXNjX2VuYWJsZTogICAgV2hlbiBETUEgbW9kZSBpcyBlbmFibGVkLCBzcGVjaWZpZXMgd2hldGhlciB0byB1c2UKICAqICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3MgRE1BIG1vZGUgb3IgZGVzY3JpcHRvciBETUEgbW9kZSBmb3IgYWNjZXNzaW5nCkBAIC04OCwzOSArOTAsNDcgQEAKICAqIEBzcGVlZDogICAgICAgICAgICAgIFNwZWNpZmllcyB0aGUgbWF4aW11bSBzcGVlZCBvZiBvcGVyYXRpb24gaW4gaG9zdCBhbmQKICAqICAgICAgICAgICAgICAgICAgICAgIGRldmljZSBtb2RlLiBUaGUgYWN0dWFsIHNwZWVkIGRlcGVuZHMgb24gdGhlIHNwZWVkIG9mCiAgKiAgICAgICAgICAgICAgICAgICAgICB0aGUgYXR0YWNoZWQgZGV2aWNlIGFuZCB0aGUgdmFsdWUgb2YgcGh5X3R5cGUuCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIEhpZ2ggU3BlZWQgKGRlZmF1bHQpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIEhpZ2ggU3BlZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRlZmF1bHQgd2hlbiBwaHlfdHlwZSBpcyBVVE1JKyBvciBVTFBJKQogICogICAgICAgICAgICAgICAgICAgICAgIDEgLSBGdWxsIFNwZWVkCi0gKiBAaG9zdF9zdXBwb3J0X2ZzX2xzX2xvd19wb3dlcjogU3BlY2lmaWVzIHdoZXRoZXIgbG93IHBvd2VyIG1vZGUgaXMgc3VwcG9ydGVkCi0gKiAgICAgICAgICAgICAgICAgICAgICB3aGVuIGF0dGFjaGVkIHRvIGEgRnVsbCBTcGVlZCBvciBMb3cgU3BlZWQgZGV2aWNlIGluCi0gKiAgICAgICAgICAgICAgICAgICAgICBob3N0IG1vZGUuCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIERvbid0IHN1cHBvcnQgbG93IHBvd2VyIG1vZGUgKGRlZmF1bHQpCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIFN1cHBvcnQgbG93IHBvd2VyIG1vZGUKLSAqIEBob3N0X2xzX2xvd19wb3dlcl9waHlfY2xrOiBTcGVjaWZpZXMgdGhlIFBIWSBjbG9jayByYXRlIGluIGxvdyBwb3dlciBtb2RlCi0gKiAgICAgICAgICAgICAgICAgICAgICB3aGVuIGNvbm5lY3RlZCB0byBhIExvdyBTcGVlZCBkZXZpY2UgaW4gaG9zdCBtb2RlLiBUaGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXIgaXMgYXBwbGljYWJsZSBvbmx5IGlmCi0gKiAgICAgICAgICAgICAgICAgICAgICBob3N0X3N1cHBvcnRfZnNfbHNfbG93X3Bvd2VyIGlzIGVuYWJsZWQuIElmIHBoeV90eXBlIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICBzZXQgdG8gRlMgdGhlbiBkZWZhdWx0cyB0byA2IE1IWiBvdGhlcndpc2UgNDggTUhaLgotICogICAgICAgICAgICAgICAgICAgICAgIDAgLSA0OCBNSHoKLSAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gNiBNSHoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRlZmF1bHQgd2hlbiBwaHlfdHlwZSBpcyBGdWxsIFNwZWVkKQogICogQGVuYWJsZV9keW5hbWljX2ZpZm86IDAgLSBVc2UgY29yZUNvbnN1bHRhbnQtc3BlY2lmaWVkIEZJRk8gc2l6ZSBwYXJhbWV0ZXJzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIEFsbG93IGR5bmFtaWMgRklGTyBzaXppbmcgKGRlZmF1bHQpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIEFsbG93IGR5bmFtaWMgRklGTyBzaXppbmcgKGRlZmF1bHQsIGlmIGF2YWlsYWJsZSkKKyAqIEBlbl9tdWx0aXBsZV90eF9maWZvOiBTcGVjaWZpZXMgd2hldGhlciBkZWRpY2F0ZWQgcGVyLWVuZHBvaW50IHRyYW5zbWl0IEZJRk9zCisgKiAgICAgICAgICAgICAgICAgICAgICBhcmUgZW5hYmxlZAogICogQGhvc3RfcnhfZmlmb19zaXplOiAgTnVtYmVyIG9mIDQtYnl0ZSB3b3JkcyBpbiB0aGUgUnggRklGTyBpbiBob3N0IG1vZGUgd2hlbgogICogICAgICAgICAgICAgICAgICAgICAgZHluYW1pYyBGSUZPIHNpemluZyBpcyBlbmFibGVkCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMTYgdG8gMzI3NjggKGRlZmF1bHQgMTAyNCkKKyAqICAgICAgICAgICAgICAgICAgICAgICAxNiB0byAzMjc2OAorICogICAgICAgICAgICAgICAgICAgICAgQWN0dWFsIG1heGltdW0gdmFsdWUgaXMgYXV0b2RldGVjdGVkIGFuZCBhbHNvCisgKiAgICAgICAgICAgICAgICAgICAgICB0aGUgZGVmYXVsdC4KICAqIEBob3N0X25wZXJpb190eF9maWZvX3NpemU6IE51bWJlciBvZiA0LWJ5dGUgd29yZHMgaW4gdGhlIG5vbi1wZXJpb2RpYyBUeCBGSUZPCiAgKiAgICAgICAgICAgICAgICAgICAgICBpbiBob3N0IG1vZGUgd2hlbiBkeW5hbWljIEZJRk8gc2l6aW5nIGlzIGVuYWJsZWQKLSAqICAgICAgICAgICAgICAgICAgICAgICAxNiB0byAzMjc2OCAoZGVmYXVsdCAxMDI0KQorICogICAgICAgICAgICAgICAgICAgICAgIDE2IHRvIDMyNzY4CisgKiAgICAgICAgICAgICAgICAgICAgICBBY3R1YWwgbWF4aW11bSB2YWx1ZSBpcyBhdXRvZGV0ZWN0ZWQgYW5kIGFsc28KKyAqICAgICAgICAgICAgICAgICAgICAgIHRoZSBkZWZhdWx0LgogICogQGhvc3RfcGVyaW9fdHhfZmlmb19zaXplOiBOdW1iZXIgb2YgNC1ieXRlIHdvcmRzIGluIHRoZSBwZXJpb2RpYyBUeCBGSUZPIGluCiAgKiAgICAgICAgICAgICAgICAgICAgICBob3N0IG1vZGUgd2hlbiBkeW5hbWljIEZJRk8gc2l6aW5nIGlzIGVuYWJsZWQKLSAqICAgICAgICAgICAgICAgICAgICAgICAxNiB0byAzMjc2OCAoZGVmYXVsdCAxMDI0KQorICogICAgICAgICAgICAgICAgICAgICAgIDE2IHRvIDMyNzY4CisgKiAgICAgICAgICAgICAgICAgICAgICBBY3R1YWwgbWF4aW11bSB2YWx1ZSBpcyBhdXRvZGV0ZWN0ZWQgYW5kIGFsc28KKyAqICAgICAgICAgICAgICAgICAgICAgIHRoZSBkZWZhdWx0LgogICogQG1heF90cmFuc2Zlcl9zaXplOiAgVGhlIG1heGltdW0gdHJhbnNmZXIgc2l6ZSBzdXBwb3J0ZWQsIGluIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMjA0NyB0byA2NSw1MzUgKGRlZmF1bHQgNjUsNTM1KQorICogICAgICAgICAgICAgICAgICAgICAgIDIwNDcgdG8gNjUsNTM1CisgKiAgICAgICAgICAgICAgICAgICAgICBBY3R1YWwgbWF4aW11bSB2YWx1ZSBpcyBhdXRvZGV0ZWN0ZWQgYW5kIGFsc28KKyAqICAgICAgICAgICAgICAgICAgICAgIHRoZSBkZWZhdWx0LgogICogQG1heF9wYWNrZXRfY291bnQ6ICAgVGhlIG1heGltdW0gbnVtYmVyIG9mIHBhY2tldHMgaW4gYSB0cmFuc2ZlcgotICogICAgICAgICAgICAgICAgICAgICAgIDE1IHRvIDUxMSAoZGVmYXVsdCA1MTEpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMTUgdG8gNTExCisgKiAgICAgICAgICAgICAgICAgICAgICBBY3R1YWwgbWF4aW11bSB2YWx1ZSBpcyBhdXRvZGV0ZWN0ZWQgYW5kIGFsc28KKyAqICAgICAgICAgICAgICAgICAgICAgIHRoZSBkZWZhdWx0LgogICogQGhvc3RfY2hhbm5lbHM6ICAgICAgVGhlIG51bWJlciBvZiBob3N0IGNoYW5uZWwgcmVnaXN0ZXJzIHRvIHVzZQotICogICAgICAgICAgICAgICAgICAgICAgIDEgdG8gMTYgKGRlZmF1bHQgMTIpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMSB0byAxNgorICogICAgICAgICAgICAgICAgICAgICAgQWN0dWFsIG1heGltdW0gdmFsdWUgaXMgYXV0b2RldGVjdGVkIGFuZCBhbHNvCisgKiAgICAgICAgICAgICAgICAgICAgICB0aGUgZGVmYXVsdC4KICAqIEBwaHlfdHlwZTogICAgICAgICAgIFNwZWNpZmllcyB0aGUgdHlwZSBvZiBQSFkgaW50ZXJmYWNlIHRvIHVzZS4gQnkgZGVmYXVsdCwKICAqICAgICAgICAgICAgICAgICAgICAgIHRoZSBkcml2ZXIgd2lsbCBhdXRvbWF0aWNhbGx5IGRldGVjdCB0aGUgcGh5X3R5cGUuCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIEZ1bGwgU3BlZWQgUGh5CisgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIFVUTUkrIFBoeQorICogICAgICAgICAgICAgICAgICAgICAgIDIgLSBVTFBJIFBoeQorICogICAgICAgICAgICAgICAgICAgICAgRGVmYXVsdHMgdG8gYmVzdCBhdmFpbGFibGUgb3B0aW9uICgyLCAxLCB0aGVuIDApCiAgKiBAcGh5X3V0bWlfd2lkdGg6ICAgICBTcGVjaWZpZXMgdGhlIFVUTUkrIERhdGEgV2lkdGggKGluIGJpdHMpLiBUaGlzIHBhcmFtZXRlcgogICogICAgICAgICAgICAgICAgICAgICAgaXMgYXBwbGljYWJsZSBmb3IgYSBwaHlfdHlwZSBvZiBVVE1JKyBvciBVTFBJLiAoRm9yIGEKICAqICAgICAgICAgICAgICAgICAgICAgIFVMUEkgcGh5X3R5cGUsIHRoaXMgcGFyYW1ldGVyIGluZGljYXRlcyB0aGUgZGF0YSB3aWR0aApAQCAtMTI5LDcgKzEzOSw3IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXIgd2FzIHNldCB0byAiOCBhbmQgMTYgYml0cyIsIG1lYW5pbmcgdGhhdCB0aGUKICAqICAgICAgICAgICAgICAgICAgICAgIGNvcmUgaGFzIGJlZW4gY29uZmlndXJlZCB0byB3b3JrIGF0IGVpdGhlciBkYXRhIHBhdGgKICAqICAgICAgICAgICAgICAgICAgICAgIHdpZHRoLgotICogICAgICAgICAgICAgICAgICAgICAgIDggb3IgMTYgKGRlZmF1bHQgMTYpCisgKiAgICAgICAgICAgICAgICAgICAgICAgOCBvciAxNiAoZGVmYXVsdCAxNiBpZiBhdmFpbGFibGUpCiAgKiBAcGh5X3VscGlfZGRyOiAgICAgICBTcGVjaWZpZXMgd2hldGhlciB0aGUgVUxQSSBvcGVyYXRlcyBhdCBkb3VibGUgb3Igc2luZ2xlCiAgKiAgICAgICAgICAgICAgICAgICAgICBkYXRhIHJhdGUuIFRoaXMgcGFyYW1ldGVyIGlzIG9ubHkgYXBwbGljYWJsZSBpZiBwaHlfdHlwZQogICogICAgICAgICAgICAgICAgICAgICAgaXMgVUxQSS4KQEAgLTEzOSwyNyArMTQ5LDUxIEBACiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgYnVzCiAgKiBAcGh5X3VscGlfZXh0X3ZidXM6ICBGb3IgYSBVTFBJIHBoeSwgc3BlY2lmaWVzIHdoZXRoZXIgdG8gdXNlIHRoZSBpbnRlcm5hbCBvcgogICogICAgICAgICAgICAgICAgICAgICAgZXh0ZXJuYWwgc3VwcGx5IHRvIGRyaXZlIHRoZSBWQnVzCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIEludGVybmFsIHN1cHBseSAoZGVmYXVsdCkKKyAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gRXh0ZXJuYWwgc3VwcGx5CiAgKiBAaTJjX2VuYWJsZTogICAgICAgICBTcGVjaWZpZXMgd2hldGhlciB0byB1c2UgdGhlIEkyQ2ludGVyZmFjZSBmb3IgYSBmdWxsCiAgKiAgICAgICAgICAgICAgICAgICAgICBzcGVlZCBQSFkuIFRoaXMgcGFyYW1ldGVyIGlzIG9ubHkgYXBwbGljYWJsZSBpZiBwaHlfdHlwZQogICogICAgICAgICAgICAgICAgICAgICAgaXMgRlMuCiAgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIE5vIChkZWZhdWx0KQogICogICAgICAgICAgICAgICAgICAgICAgIDEgLSBZZXMKLSAqIEB1bHBpX2ZzX2xzOiAgICAgICAgIFRydWUgdG8gbWFrZSBVTFBJIHBoeSBvcGVyYXRlIGluIEZTL0xTIG1vZGUgb25seQotICogQHRzX2RsaW5lOiAgICAgICAgICAgVHJ1ZSB0byBlbmFibGUgVGVybSBTZWxlY3QgRGxpbmUgcHVsc2luZwotICogQGVuX211bHRpcGxlX3R4X2ZpZm86IFNwZWNpZmllcyB3aGV0aGVyIGRlZGljYXRlZCBwZXItZW5kcG9pbnQgdHJhbnNtaXQgRklGT3MKLSAqICAgICAgICAgICAgICAgICAgICAgIGFyZSBlbmFibGVkCi0gKiBAcmVsb2FkX2N0bDogICAgICAgICBUcnVlIHRvIGFsbG93IGR5bmFtaWMgcmVsb2FkaW5nIG9mIEhGSVIgcmVnaXN0ZXIgZHVyaW5nCi0gKiAgICAgICAgICAgICAgICAgICAgICBydW50aW1lCi0gKiBAYWhiX3NpbmdsZTogICAgICAgICBUaGlzIGJpdCBlbmFibGVzIFNJTkdMRSB0cmFuc2ZlcnMgZm9yIHJlbWFpbmRlciBkYXRhIGluCi0gKiAgICAgICAgICAgICAgICAgICAgICBhIHRyYW5zZmVyIGZvciBETUEgbW9kZSBvZiBvcGVyYXRpb24uCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIHJlbWFpbmRlciBkYXRhIHdpbGwgYmUgc2VudCB1c2luZyBJTkNSIGJ1cnN0IHNpemUKLSAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gcmVtYWluZGVyIGRhdGEgd2lsbCBiZSBzZW50IHVzaW5nIFNJTkdMRSBidXJzdCBzaXplCi0gKiBAb3RnX3ZlcjogICAgICAgICAgICBPVEcgdmVyc2lvbiBzdXBwb3J0ZWQKLSAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gMS4zCi0gKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIDIuMAorICogQHVscGlfZnNfbHM6ICAgICAgICAgTWFrZSBVTFBJIHBoeSBvcGVyYXRlIGluIEZTL0xTIG1vZGUgb25seQorICogICAgICAgICAgICAgICAgICAgICAgIDAgLSBObyAoZGVmYXVsdCkKKyAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gWWVzCisgKiBAaG9zdF9zdXBwb3J0X2ZzX2xzX2xvd19wb3dlcjogU3BlY2lmaWVzIHdoZXRoZXIgbG93IHBvd2VyIG1vZGUgaXMgc3VwcG9ydGVkCisgKiAgICAgICAgICAgICAgICAgICAgICB3aGVuIGF0dGFjaGVkIHRvIGEgRnVsbCBTcGVlZCBvciBMb3cgU3BlZWQgZGV2aWNlIGluCisgKiAgICAgICAgICAgICAgICAgICAgICBob3N0IG1vZGUuCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIERvbid0IHN1cHBvcnQgbG93IHBvd2VyIG1vZGUgKGRlZmF1bHQpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIFN1cHBvcnQgbG93IHBvd2VyIG1vZGUKKyAqIEBob3N0X2xzX2xvd19wb3dlcl9waHlfY2xrOiBTcGVjaWZpZXMgdGhlIFBIWSBjbG9jayByYXRlIGluIGxvdyBwb3dlciBtb2RlCisgKiAgICAgICAgICAgICAgICAgICAgICB3aGVuIGNvbm5lY3RlZCB0byBhIExvdyBTcGVlZCBkZXZpY2UgaW4gaG9zdAorICogICAgICAgICAgICAgICAgICAgICAgbW9kZS4gVGhpcyBwYXJhbWV0ZXIgaXMgYXBwbGljYWJsZSBvbmx5IGlmCisgKiAgICAgICAgICAgICAgICAgICAgICBob3N0X3N1cHBvcnRfZnNfbHNfbG93X3Bvd2VyIGlzIGVuYWJsZWQuCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIDQ4IE1IegorICogICAgICAgICAgICAgICAgICAgICAgICAgICAoZGVmYXVsdCB3aGVuIHBoeV90eXBlIGlzIFVUTUkrIG9yIFVMUEkpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIDYgTUh6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIChkZWZhdWx0IHdoZW4gcGh5X3R5cGUgaXMgRnVsbCBTcGVlZCkKKyAqIEB0c19kbGluZTogICAgICAgICAgIEVuYWJsZSBUZXJtIFNlbGVjdCBEbGluZSBwdWxzaW5nCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIE5vIChkZWZhdWx0KQorICogICAgICAgICAgICAgICAgICAgICAgIDEgLSBZZXMKKyAqIEByZWxvYWRfY3RsOiAgICAgICAgIEFsbG93IGR5bmFtaWMgcmVsb2FkaW5nIG9mIEhGSVIgcmVnaXN0ZXIgZHVyaW5nIHJ1bnRpbWUKKyAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gTm8gKGRlZmF1bHQgZm9yIGNvcmUgPCAyLjkyYSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gWWVzIChkZWZhdWx0IGZvciBjb3JlID49IDIuOTJhKQorICogQGFoYmNmZzogICAgICAgICAgICAgVGhpcyBmaWVsZCBhbGxvd3MgdGhlIGRlZmF1bHQgdmFsdWUgb2YgdGhlIEdBSEJDRkcKKyAqICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyIHRvIGJlIG92ZXJyaWRkZW4KKyAqICAgICAgICAgICAgICAgICAgICAgICAtMSAgICAgICAgIC0gR0FIQkNGRyB2YWx1ZSB3aWxsIGJlIHNldCB0byAweDA2CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChJTkNSNCwgZGVmYXVsdCkKKyAqICAgICAgICAgICAgICAgICAgICAgICBhbGwgb3RoZXJzIC0gR0FIQkNGRyB2YWx1ZSB3aWxsIGJlIG92ZXJyaWRkZW4gd2l0aAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIHZhbHVlCisgKiAgICAgICAgICAgICAgICAgICAgICBOb3QgYWxsIGJpdHMgY2FuIGJlIGNvbnRyb2xsZWQgbGlrZSB0aGlzLCB0aGUKKyAqICAgICAgICAgICAgICAgICAgICAgIGJpdHMgZGVmaW5lZCBieSBHQUhCQ0ZHX0NUUkxfTUFTSyBhcmUgY29udHJvbGxlZAorICogICAgICAgICAgICAgICAgICAgICAgYnkgdGhlIGRyaXZlciBhbmQgYXJlIGlnbm9yZWQgaW4gdGhpcworICogICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiB2YWx1ZS4KICAqCiAgKiBUaGUgZm9sbG93aW5nIHBhcmFtZXRlcnMgbWF5IGJlIHNwZW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ZV9wYXJhbXMgdmFsdWUuCisgKgorICogVGhlIHZhbHVlcyB0aGF0IGFyZSBub3QgaW4gZHdjMl9jb3JlX3BhcmFtcyBhcmUgZG9jdW1lbnRlZCBiZWxvdy4KKyAqCisgKiBAb3BfbW9kZSAgICAgICAgICAgICBNb2RlIG9mIE9wZXJhdGlvbgorICogICAgICAgICAgICAgICAgICAgICAgIDAgLSBITlAtIGFuZCBTUlAtQ2FwYWJsZSBPVEcgKEhvc3QgJiBEZXZpY2UpCisgKiAgICAgICAgICAgICAgICAgICAgICAgMSAtIFNSUC1DYXBhYmxlIE9URyAoSG9zdCAmIERldmljZSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAyIC0gTm9uLUhOUCBhbmQgTm9uLVNSUCBDYXBhYmxlIE9URyAoSG9zdCAmIERldmljZSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAzIC0gU1JQLUNhcGFibGUgRGV2aWNlCisgKiAgICAgICAgICAgICAgICAgICAgICAgNCAtIE5vbi1PVEcgRGV2aWNlCisgKiAgICAgICAgICAgICAgICAgICAgICAgNSAtIFNSUC1DYXBhYmxlIEhvc3QKKyAqICAgICAgICAgICAgICAgICAgICAgICA2IC0gTm9uLU9URyBIb3N0CisgKiBAYXJjaCAgICAgICAgICAgICAgICBBcmNoaXRlY3R1cmUKKyAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gU2xhdmUgb25seQorICogICAgICAgICAgICAgICAgICAgICAgIDEgLSBFeHRlcm5hbCBETUEKKyAqICAgICAgICAgICAgICAgICAgICAgICAyIC0gSW50ZXJuYWwgRE1BCisgKiBAcG93ZXJfb3B0aW1pemVkICAgICBBcmUgcG93ZXIgb3B0aW1pemF0aW9ucyBlbmFibGVkPworICogQG51bV9kZXZfZXAgICAgICAgICAgTnVtYmVyIG9mIGRldmljZSBlbmRwb2ludHMgYXZhaWxhYmxlCisgKiBAbnVtX2Rldl9wZXJpb19pbl9lcCBOdW1iZXIgb2YgZGV2aWNlIHBlcmlvZGljIElOIGVuZHBvaW50cworICogICAgICAgICAgICAgICAgICAgICAgYXZhaWFsYWJsZQorICogQGRldl90b2tlbl9xX2RlcHRoICAgRGV2aWNlIE1vZGUgSU4gVG9rZW4gU2VxdWVuY2UgTGVhcm5pbmcgUXVldWUKKyAqICAgICAgICAgICAgICAgICAgICAgIERlcHRoCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCB0byAzMAorICogQGhvc3RfcGVyaW9fdHhfcV9kZXB0aAorICogICAgICAgICAgICAgICAgICAgICAgSG9zdCBNb2RlIFBlcmlvZGljIFJlcXVlc3QgUXVldWUgRGVwdGgKKyAqICAgICAgICAgICAgICAgICAgICAgICAyLCA0IG9yIDgKKyAqIEBucGVyaW9fdHhfcV9kZXB0aAorICogICAgICAgICAgICAgICAgICAgICAgTm9uLVBlcmlvZGljIFJlcXVlc3QgUXVldWUgRGVwdGgKKyAqICAgICAgICAgICAgICAgICAgICAgICAyLCA0IG9yIDgKKyAqIEBoc19waHlfdHlwZSAgICAgICAgIEhpZ2gtc3BlZWQgUEhZIGludGVyZmFjZSB0eXBlCisgKiAgICAgICAgICAgICAgICAgICAgICAgMCAtIEhpZ2gtc3BlZWQgaW50ZXJmYWNlIG5vdCBzdXBwb3J0ZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAxIC0gVVRNSSsKKyAqICAgICAgICAgICAgICAgICAgICAgICAyIC0gVUxQSQorICogICAgICAgICAgICAgICAgICAgICAgIDMgLSBVVE1JKyBhbmQgVUxQSQorICogQGZzX3BoeV90eXBlICAgICAgICAgRnVsbC1zcGVlZCBQSFkgaW50ZXJmYWNlIHR5cGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAwIC0gRnVsbCBzcGVlZCBpbnRlcmZhY2Ugbm90IHN1cHBvcnRlZAorICogICAgICAgICAgICAgICAgICAgICAgIDEgLSBEZWRpY2F0ZWQgZnVsbCBzcGVlZCBpbnRlcmZhY2UKKyAqICAgICAgICAgICAgICAgICAgICAgICAyIC0gRlMgcGl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yAge0xETE1fRkxfU0tJUFBFRCwgICAgICAgICAgICAgIkxETE1fRkxfU0tJUFBFRCJ9LAorICB7TERMTV9GTF9DQlBFTkRJTkcsICAgICAgICAgICAiTERMTV9GTF9DQlBFTkRJTkcifSwKKyAge0xETE1fRkxfV0FJVF9OT1JFUFJPQywgICAgICAgIkxETE1fRkxfV0FJVF9OT1JFUFJPQyJ9LAorICB7TERMTV9GTF9DQU5DRUwsICAgICAgICAgICAgICAiTERMTV9GTF9DQU5DRUwifSwKKyAge0xETE1fRkxfTE9DQUxfT05MWSwgICAgICAgICAgIkxETE1fRkxfTE9DQUxfT05MWSJ9LAorICB7TERMTV9GTF9GQUlMRUQsICAgICAgICAgICAgICAiTERMTV9GTF9GQUlMRUQifSwKKyAge0xETE1fRkxfQ0FOQ0VMSU5HLCAgICAgICAgICAgIkxETE1fRkxfQ0FOQ0VMSU5HIn0sCisgIHtMRExNX0ZMX0xPQ0FMLCAgICAgICAgICAgICAgICJMRExNX0ZMX0xPQ0FMIn0sCisgIHtMRExNX0ZMX0xWQl9SRUFEWSwgICAgICAgICAgICJMRExNX0ZMX0xWQl9SRUFEWSJ9LAorICB7TERMTV9GTF9LTVNfSUdOT1JFLCAgICAgICAgICAiTERMTV9GTF9LTVNfSUdOT1JFIn0sCisgIHtMRExNX0ZMX0NQX1JFUUQsICAgICAgICAgICAgICJMRExNX0ZMX0NQX1JFUUQifSwKKyAge0xETE1fRkxfQ0xFQU5FRCwgICAgICAgICAgICAgIkxETE1fRkxfQ0xFQU5FRCJ9LAorICB7TERMTV9GTF9BVE9NSUNfQ0IsICAgICAgICAgICAiTERMTV9GTF9BVE9NSUNfQ0IifSwKKyAge0xETE1fRkxfQkxfQVNULCAgICAgICAgICAgICAgIkxETE1fRkxfQkxfQVNUIn0sCisgIHtMRExNX0ZMX0JMX0RPTkUsICAgICAgICAgICAgICJMRExNX0ZMX0JMX0RPTkUifSwKKyAge0xETE1fRkxfTk9fTFJVLCAgICAgICAgICAgICAgIkxET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pZiAoY29uZi0+dS5jb2NfbWQgIT0gTlVMTCAmJiBjb25mLT51LmNvY19tZC0+bHNtICE9IE5VTEwpCi0JCWxsdCA9IExMVF9SQUlEMDsgLyogb25seSByYWlkMCBpcyBzdXBwb3J0ZWQuICovCisJaWYgKGNvbmYtPnUuY29jX21kICE9IE5VTEwpCisJCWxsdCA9IGxvdl90eXBlKGNvbmYtPnUuY29jX21kLT5sc20pOwogCUxBU1NFUlQoMCA8PSBsbHQgJiYgbGx0IDwgQVJSQVlfU0laRShsb3ZfZGlzcGF0Y2gpKTsKIAogCWNvb2tpZSA9IGNsX2Vudl9yZWVudGVyKCk7CiAJZW52ID0gY2xfZW52X2dldCgmcmVmY2hlY2spOwogCWlmIChJU19FUlIoZW52KSkgewogCQljbF9lbnZfcmVleGl0KGNvb2tpZSk7Ci0JCVJFVFVSTihQVFJfRVJSKGVudikpOworCQlyZXR1cm4gUFRSX0VSUihlbnYpOwogCX0KIAogCW9sZF9vcHMgPSAmbG92X2Rpc3BhdGNoW2xvdi0+bG9fdHlwZV07CkBAIC02NTAsNyArNjg5LDcgQEAKIAogCWNsX2Vudl9wdXQoZW52LCAmcmVmY2hlY2spOwogCWNsX2Vudl9yZWV4aXQoY29va2llKTsKLQlSRVRVUk4ocmVzdWx0KTsKKwlyZXR1cm4gcmVzdWx0OwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTY1OCw3ICs2OTcsNiBAQAogICogTG92IG9iamVjdCBvcGVyYXRpb25zLgogICoKICAqLwotCiBpbnQgbG92X29iamVjdF9pbml0KGNvbnN0IHN0cnVjdCBsdV9lbnYgKmVudiwgc3RydWN0IGx1X29iamVjdCAqb2JqLAogCQkgICAgY29uc3Qgc3RydWN0IGx1X29iamVjdF9jb25mICpjb25mKQogewpAQCAtNjY5LDcgKzcwNyw2IEBACiAJY29uc3Qgc3RydWN0IGxvdl9sY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LAorCXsgODAsIDU0LCAxLCAgMX0sCisJeyA4MSwgNTUsIDEsICAxfSwKKwl7IDgyLCA1NiwgMSwgIDF9LAorCXsgODMsIDU3LCAxLCAgMX0sCisJeyA4NCwgNTgsIDEsICAxfSwKKwl7IDg1LCA1OSwgMSwgIDF9LAorfTsKKworLyoKKyAqICAgaUNvbmZpZ3VyYXRpb24gICAgICAgICAgMAorICogICAgIGJJbnRlcmZhY2VOdW1iZXIgICAgICAgIDAKKyAqICAgICBiQWx0ZXJuYXRlU2V0dGluZyAgICAgICAxCisgKiAgICAgYk51bUVuZHBvaW50cyAgICAgICAgICAgMQorICogICAgICAgYkVuZHBvaW50QWRkcmVzcyAgICAgMHg4MSAgRVAgMSBJTgorICogICAgICAgYm1BdHRyaWJ1dGVzICAgICAgICAgICAgMQorICogICAgICAgICBUcmFuc2ZlciBUeXBlICAgICAgICAgICAgSXNvY2hyb25vdXMKKyAqICAgICAgIHdNYXhQYWNrZXRTaXplICAgICAweDE0MDAgIDN4IDEwMjQgYnl0ZXMKKyAqICAgICAgIGJJbnRlcnZhbCAgICAgICAgICAgICAgIDEKKyAqLworI2RlZmluZSBNQVhfSVNPX0JVRlMgICAgICAgICAgICAoOCkKKyNkZWZpbmUgSVNPX0ZSQU1FU19QRVJfREVTQyAgICAgKDgpCisjZGVmaW5lIElTT19NQVhfRlJBTUVfU0laRSAgICAgICgzICogMTAyNCkKKyNkZWZpbmUgSVNPX0JVRkZFUl9TSVpFICAgICAgICAgKElTT19GUkFNRVNfUEVSX0RFU0MgKiBJU09fTUFYX0ZSQU1FX1NJWkUpCisjZGVmaW5lIE1BWF9JU09DX0VSUk9SUyAgICAgICAgIDIwCisKKy8qIFRPRE86IFRoZXNlIHNob3VsZCBiZSBtb3ZlZCB0byBWNEwyIEFQSSAqLworI2RlZmluZSBNU0kzMTAxX0NJRF9TQU1QTElOR19NT0RFICAgICAgICAgKChWNEwyX0NJRF9VU0VSX0JBU0UgfCAweGYwMDApICsgMCkKKyNkZW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y4uLgorCSAqCisJICogWzc6MF0gICAweDAzLCByZWdpc3RlciBhZGRyZXNzCisJICogWzhdICAgICAxLCBhbHdheXMKKwkgKiBbOV0gICAgID8KKwkgKiBbMTI6MTBdIG91dHB1dCBkaXZpZGVyCisJICogWzEzXSAgICAwID8KKwkgKiBbMTRdICAgIDAgPworCSAqIFsxNV0gICAgZnJhY3Rpb25hbCBNU0IsIGJpdCAyMAorCSAqIFsxNjoxOV0gTgorCSAqIFsyMzoyMF0gPworCSAqIFsyNDozMV0gMHgwMQorCSAqCisJICogb3V0cHV0IGRpdmlkZXIKKwkgKiB2YWwgICBkaXYKKwkgKiAgIDAgICAgIC0gKGludmFsaWQpCisJICogICAxICAgICA0CisJICogICAyICAgICA2CisJICogICAzICAgICA4CisJICogICA0ICAgIDEwCisJICogICA1ICAgIDEyCisJICogICA2ICAgIDE0CisJICogICA3ICAgIDE2CisJICoKKwkgKiBWQ08gMjAyMDAwMDAwIC0gNzIwMDAwMDAwKysKKwkgKi8KKwlyZWczID0gMHgwMTAwMDMwMzsKKwlyZWc0ID0gMHgwMDAwMDAwNDsKKworCS8qIFhYWDogRmlsdGVycz8gQUdDPyAqLworCWlmIChmX3NyIDwgNjAwMDAwMCkKKwkJcmVnMyB8PSAweDEgPDwgMjA7CisJZWxzZSBpZiAoZl9zciA8IDcwMDAwMDApCisJCXJlZzMgfD0gMHg1IDw8IDIwOworCWVsc2UgaWYgKGZfc3IgPCA4NTAwMDAwKQorCQlyZWczIHw9IDB4OSA8PCAyMDsKKwllbHNlCisJCXJlZzMgfD0gMHhkIDw8IDIwOworCisJZm9yIChkaXZfcl9vdXQgPSA0OyBkaXZfcl9vdXQgPCAxNjsgZGl2X3Jfb3V0ICs9IDIpIHsKKwkJZl92Y28gPSBmX3NyICogZGl2X3Jfb3V0ICogMTI7CisJCWRldl9kYmcoJnMtPnVkZXYtPmRldiwgIiVzOiBkaXZfcl9vdXQ9JWQgZl92Y289JWRcbiIsCisJCQkJX19mdW5jX18sIG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AgY3ZteF9kcHJpbnRmKCIlKnMlczogY2FsbGVkXG4iLCAyKnVzYi0+aW5kZW50KyssICIiLCBfX0ZVTkNUSU9OX18pOworc3RydWN0IGN2bXhfdXNiX3R4X2ZpZm8geworCXN0cnVjdCB7CisJCWludCBjaGFubmVsOworCQlpbnQgc2l6ZTsKKwkJdWludDY0X3QgYWRkcmVzczsKKwl9IGVudHJ5W01BWF9DSEFOTkVMUysxXTsKKwlpbnQgaGVhZDsKKwlpbnQgdGFpbDsKK307CiAKLS8qIFRoaXMgbWFjcm8gbG9ncyBvdXQgZWFjaCBmdW5jdGlvbiBwYXJhbWV0ZXIgaWYgZGVidWdnaW5nIGlzIG9uICovCi0jZGVmaW5lIENWTVhfVVNCX0xPR19QQVJBTShmb3JtYXQsIHBhcmFtKSBcCi0gICAgaWYgKGN2bXhfdW5saWtlbHkodXNiLT5pbml0X2ZsYWdzICYgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19ERUJVR19DQUxMUykpIFwKLSAgICAgICAgY3ZteF9kcHJpbnRmKCIlKnMlczogcGFyYW0gJXMgPSAiIGZvcm1hdCAiXG4iLCAyKnVzYi0+aW5kZW50LCAiIiwgX19GVU5DVElPTl9fLCAjcGFyYW0sIHBhcmFtKTsKLQotLyogVGhpcyBtYWNybyBsb2dzIG91dCB3aGVuIGEgZnVuY3Rpb24gcmV0dXJucyBhIHZhbHVlICovCi0jZGVmaW5lIENWTVhfVVNCX1JFVFVSTih2KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHR5cGVvZih2KSByID0gdjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChjdm14X3VubGlrZWx5KHVzYi0+aW5pdF9mbGFncyAmIENWTVhfVVNCX0lOSVRJQUxJWkVfRkxBR1NfREVCVUdfQ0FMTFMpKSAgICBcCi0gICAgICAgICAgICBjdm14X2RwcmludGYoIiUqcyVzOiByZXR1cm5lZCAlcyglZClcbiIsIDIqLS11c2ItPmluZGVudCwgIiIsIF9fRlVOQ1RJT05fXywgI3YsIHIpOyBcCi0gICAgICAgIHJldHVybiByOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSB3aGlsZSAoMCk7Ci0KLS8qIFRoaXMgbWFjcm8gbG9ncyBvdXQgd2hlbiBhIGZ1bmN0aW9uIGRvZXNuJ3QgcmV0dXJuIGEgdmFsdWUgKi8KLSNkZWZpbmUgQ1ZNWF9VU0JfUkVUVVJOX05PVEhJTkcoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgaWYgKGN2bXhfdW5saWtlbHkodXNiLT5pbml0X2ZsYWdzICYgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19ERUJVR19DQUxMUykpICAgIFwKLSAgICAgICAgICAgIGN2bXhfZHByaW50ZigiJSpzJXM6IHJldHVybmVkXG4iLCAyKi0tdXNiLT5pbmRlbnQsICIiLCBfX0ZVTkNUSU9OX18pOyBcCi0gICAgICAgIHJldHVybjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSB3aGlsZSAoMCk7CisvKioKKyAqIHN0cnVjdCBjdm14X3VzYl9pbnRlcm5hbF9zdGF0ZSAtIHRoZSBzdGF0ZSBvZiB0aGUgVVNCIGJsb2NrCisgKgorICogaW5pdF9mbGFnczoJCSAgIEZsYWdzIHBhc3NlZCB0byBpbml0aWFsaXplLgorICogaW5kZXg6CQkgICBXaGljaCBVU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m14X3VzYl9waXBlX2xpc3QgaWRsZV9waXBlczsKKwlzdHJ1Y3QgY3ZteF91c2JfcGlwZV9saXN0IGFjdGl2ZV9waXBlc1s0XTsKKwl1aW50NjRfdCBmcmFtZV9udW1iZXI7CisJc3RydWN0IGN2bXhfdXNiX3RyYW5zYWN0aW9uICphY3RpdmVfc3BsaXQ7CisJc3RydWN0IGN2bXhfdXNiX3R4X2ZpZm8gcGVyaW9kaWM7CisJc3RydWN0IGN2bXhfdXNiX3R4X2ZpZm8gbm9ucGVyaW9kaWM7Cit9OwogCiAvKiBUaGlzIG1hY3JvIHNwaW5zIG9uIGEgZmllbGQgd2FpdGluZyBmb3IgaXQgdG8gcmVhY2ggYSB2YWx1ZSAqLwogI2RlZmluZSBDVk1YX1dBSVRfRk9SX0ZJRUxEMzIoYWRkcmVzcywgdHlwZSwgZmllbGQsIG9wLCB2YWx1ZSwgdGltZW91dF91c2VjKVwKLSAgICAoe2ludCByZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdWludDY0X3QgZG9uZSA9IGN2bXhfZ2V0X2N5Y2xlKCkgKyAodWludDY0X3QpdGltZW91dF91c2VjICogICAgIFwKLQkJCW9jdGVvbl9nZXRfY2xvY2tfcmF0ZSgpIC8gMTAwMDAwMDsJCVwKLSAgICAgICAgdHlwZSBjOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgd2hpbGUgKDEpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIGMudTMyID0gX19jdm14X3VzYl9yZWFkX2NzcjMyKHVzYiwgYWRkcmVzcyk7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIGlmIChjLnMuZmllbGQgb3AgKHZhbHVlKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICByZXN1bHQgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIH0gZWxzZSBpZiAoY3ZteF9nZXRfY3ljbGUoKSA+IGRvbmUpIHsgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICByZXN1bHQgPSAtMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIH0gZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBjdm14X3dhaXQoMTAwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB9IHdoaWxlICgwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICByZXN1bHQ7fSkKKwkoe2ludCByZXN1bHQ7CQkJCQkJCSAgICBcCisJZG8gewkJCQkJCQkJICAgIFwKKwkJdWludDY0X3QgZG9uZSA9IGN2bXhfZ2V0X2N5Y2xlKCkgKyAod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azsKLSAgICAgICAgICAgIGNhc2UgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19DTE9DS180OE1IWjoKLSAgICAgICAgICAgICAgICB1c2JuX2Nsa19jdGwucy5wX2Nfc2VsID0gMjsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlIHsKLSAgICAgICAgLyogVGhlIFVTQiBwb3J0IHVzZXMgYSAxMk1IeiBjcnlzdGFsIGFzIGNsb2NrIHNvdXJjZQotICAgICAgICAgICAgYXQgVVNCX1hPIGFuZCBVU0JfWEkgKi8KLSAgICAgICAgaWYgKE9DVEVPTl9JU19NT0RFTChPQ1RFT05fQ04zWFhYKSkgewotICAgICAgICAgICAgdXNibl9jbGtfY3RsLmNuMzF4eC5wX3JjbGsgID0gMTsgLyogRnJvbSBDTjMxWFgsQ04zMFhYIG1hbnVhbCAqLwotICAgICAgICAgICAgdXNibl9jbGtfY3RsLmNuMzF4eC5wX3hlbmJuID0gMTsKLSAgICAgICAgfQotICAgICAgICBlbHNlIGlmIChPQ1RFT05fSVNfTU9ERUwoT0NURU9OX0NONTZYWCkgfHwgT0NURU9OX0lTX01PREVMKE9DVEVPTl9DTjUwWFgpKQotICAgICAgICAgICAgdXNibl9jbGtfY3RsLmNuNTZ4eC5wX3J0eXBlID0gMDsgLyogRnJvbSBDTjU2WFgsQ041MFhYIG1hbnVhbCAqLwotICAgICAgICBlbHNlCi0gICAgICAgICAgICB1c2JuX2Nsa19jdGwuY241Mnh4LnBfcnR5cGUgPSAwOyAvKiBGcm9tIENONTJYWCBtYW51YWwgKi8KKwkJdXNibl9jbGtfY3RsLnMucF9jX3NlbCA9IDA7CisJfQorCS8qCisJICogMmMuIFNlbGVjdCB0aGUgSENMSyB2aWEgd3JpdGluZyBVU0JOMC8xX0NMS19DVExbRElWSURFLCBESVZJREUyXSBhbmQKKwkgKiAgICAgc2V0dGluZyBVU0JOMC8xX0NMS19DVExbRU5BQkxFXSA9IDEu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dXNiLT5waXBlKSAvIHNpemVvZigqcGlwZSk7CisJcmV0dXJuICgodW5zaWduZWQgbG9uZylwaXBlIC0gKHVuc2lnbmVkIGxvbmcpdXNiLT5waXBlKSAvIHNpemVvZigqcGlwZSk7CiB9CiAKIApAQCAtMTEyNywxOTcgKzExMTcsMTgyIEBACiAgKiBtdXN0IGJlIG9wZW5lZCBiZWZvcmUgZGF0YSBjYW4gYmUgdHJhbnNmZXJyZWQgYmV0d2VlbiBhIGRldmljZQogICogYW5kIE9jdGVvbi4KICAqCi0gKiBAcGFyYW0gc3RhdGUgICAgICBVU0IgZGV2aWNlIHN0YXRlIHBvcHVsYXRlZCBieQotICogICAgICAgICAgICAgICAgICAgY3ZteF91c2JfaW5pdGlhbGl6ZSgpLgotICogQHBhcmFtIGZsYWdzICAgICAgT3B0aW9uYWwgcGlwZSBmbGFncyBkZWZpbmVkIGluCi0gKiAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9waXBlX2ZsYWdzX3QuCi0gKiBAcGFyYW0gZGV2aWNlX2FkZHIKLSAqICAgICAgICAgICAgICAgICAgIFVTQiBkZXZpY2UgYWRkcmVzcyB0byBvcGVuIHRoZSBwaXBlIHRvCi0gKiAgICAgICAgICAgICAgICAgICAoMC0xMjcpLgotICogQHBhcmFtIGVuZHBvaW50X251bQotICogICAgICAgICAgICAgICAgICAgVVNCIGVuZHBvaW50IG51bWJlciB0byBvcGVuIHRoZSBwaXBlIHRvCi0gKiAgICAgICAgICAgICAgICAgICAoMC0xNSkuCi0gKiBAcGFyYW0gZGV2aWNlX3NwZWVkCi0gKiAgICAgICAgICAgICAgICAgICBUaGUgc3BlZWQgb2YgdGhlIGRldmljZSB0aGUgcGlwZSBpcyBnb2luZwotICogICAgICAgICAgICAgICAgICAgdG8uIFRoaXMgbXVzdCBtYXRjaCB0aGUgZGV2aWNlJ3Mgc3BlZWQsCi0gKiAgICAgICAgICAgICAgICAgICB3aGljaCBtYXkgYmUgZGlmZmVyZW50IHRoYW4gd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SBub24gbmVnYXRpdmUgdmFsdWUgaXMgYSBwaXBlIGhhbmRsZS4gTmVnYXRpdmUKKyAqCSAgICB2YWx1ZXMgYXJlIGVycm9yIGNvZGVzLgogICovCi1pbnQgY3ZteF91c2Jfb3Blbl9waXBlKGN2bXhfdXNiX3N0YXRlX3QgKnN0YXRlLCBjdm14X3VzYl9waXBlX2ZsYWdzX3QgZmxhZ3MsCi0gICAgICAgICAgICAgICAgICAgICAgIGludCBkZXZpY2VfYWRkciwgaW50IGVuZHBvaW50X251bSwKLSAgICAgICAgICAgICAgICAgICAgICAgY3ZteF91c2Jfc3BlZWRfdCBkZXZpY2Vfc3BlZWQsIGludCBtYXhfcGFja2V0LAotICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl90cmFuc2Zlcl90IHRyYW5zZmVyX3R5cGUsCi0gICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2RpcmVjdGlvbl90IHRyYW5zZmVyX2RpciwgaW50IGludGVydmFsLAotICAgICAgICAgICAgICAgICAgICAgICBpbnQgbXVsdGlfY291bnQsIGludCBodWJfZGV2aWNlX2FkZHIsIGludCBodWJfcG9ydCkKK2ludCBjdm14X3VzYl9vcGVuX3BpcGUoc3RydWN0IGN2bXhfdXNiX3N0YXRlICpzdGF0ZSwgZW51bSBjdm14X3VzYl9waXBlX2ZsYWdzIGZsYWdzLAorCQkgICAgICAgaW50IGRldmljZV9hZGRyLCBpbnQgZW5kcG9pbnRfbnVtLAorCQkgICAgICAgZW51bSBjdm14X3VzYl9zcGVlZCBkZXZpY2Vfc3BlZWQsIGludCBtYXhfcGFja2V0LAorCQkgICAgICAgZW51bSBjdm14X3VzYl90cmFuc2ZlciB0cmFuc2Zlcl90eXBlLAorCQkgICAgICAgZW51bSBjdm14X3VzYl9kaXJlY3Rpb24gdHJhbnNmZXJfZGlyLCBpbnQgaW50ZXJ2YWwsCisJCSAgICAgICBpbnQgbXVsdGlfY291bnQsIGludCBodWJfZGV2aWNlX2FkZHIs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GFuZCBjb3VudHMgKi8KLSAgICAgICAgYXZhaWxhYmxlIC09IHdvcmRzOwotICAgICAgICBmaWZvLT5lbnRyeVtpXS5hZGRyZXNzICs9IHdvcmRzICogNDsKLSAgICAgICAgZmlmby0+ZW50cnlbaV0uc2l6ZSAtPSB3b3JkczsKLQotICAgICAgICAvKiBXcml0ZSB0aGUgSFcgZmlmbyBkYXRhLiBUaGUgcmVhZCBldmVyeSB0aHJlZSB3cml0ZXMgaXMgZHVlCi0gICAgICAgICAgICB0byBhbiBlcnJhdGEgb24gQ04zWFhYIGNoaXBzICovCi0gICAgICAgIHdoaWxlICh3b3JkcyA+IDMpIHsKLSAgICAgICAgICAgIGN2bXhfd3JpdGU2NF91aW50MzIoY3NyX2FkZHJlc3MsICpwdHIrKyk7Ci0gICAgICAgICAgICBjdm14X3dyaXRlNjRfdWludDMyKGNzcl9hZGRyZXNzLCAqcHRyKyspOwotICAgICAgICAgICAgY3ZteF93cml0ZTY0X3VpbnQzMihjc3JfYWRkcmVzcywgKnB0cisrKTsKLSAgICAgICAgICAgIGN2bXhfcmVhZDY0X3VpbnQ2NChDVk1YX1VTQk5YX0RNQTBfSU5CX0NITjAodXNiLT5pbmRleCkpOwotICAgICAgICAgICAgd29yZHMgLT0gMzsKLSAgICAgICAgfQotICAgICAgICBjdm14X3dyaXRlNjRfdWludDMyKGNzcl9hZGRyZXNzLCAqcHRyKyspOwotICAgICAgICBpZiAoLS13b3JkcykgewotICAgICAgICAgICAgY3ZteF93cml0ZTY0X3VpbnQzMihjc3JfYWRkcmVzcywgKnB0cisrKTsKLSAgICAgICAgICAgIGlmICgtLXdvcmRzKQotICAgICAgICAgICAgICAgIGN2bXhfd3JpdGU2NF91aW50MzIoY3NyX2FkZHJlc3MsICpwdHIrKyk7Ci0gICAgICAgIH0KLSAgICAgICAgY3ZteF9yZWFkNjRfdWludDY0KENWTVhfVVNCTlhfRE1BMF9JTkJfQ0hOMCh1c2ItPmluZGV4KSk7Ci0gICAgfQotICAg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pbmRleCksIGN2bXhfdXNiY3hfaGNjaGFyeF90LCBlcGRpciwgQ1ZNWF9VU0JfRElSRUNUSU9OX09VVCk7Ci0gICAgICAgICAgICBVU0JfU0VUX0ZJRUxEMzIoQ1ZNWF9VU0JDWF9IQ1NQTFRYKGNoYW5uZWwsIHVzYi0+aW5kZXgpLCBjdm14X3VzYmN4X2hjc3BsdHhfdCwgY29tcHNwbHQsIDEpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQ1ZNWF9VU0JfU1RBR0VfREFUQToKLSAgICAgICAgICAgIHVzYmNfaGN0c2l6LnMucGlkID0gX19jdm14X3VzYl9nZXRfZGF0YV9waWQocGlwZSk7Ci0gICAgICAgICAgICBpZiAoX19jdm14X3VzYl9waXBlX25lZWRzX3NwbGl0KHVzYiwgcGlwZSkpIHsKLSAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLT5zLnJlcXVlc3RfdHlwZSAmIDB4ODApCi0gICAgICAgICAgICAgICAgICAgIGJ5dGVzX3RvX3RyYW5zZmVyID0gMDsKLSAgICAgICAgICAgICAgICBlbHNlIGlmIChieXRlc190b190cmFuc2ZlciA+IHBpcGUtPm1heF9wYWNrZXQpCi0gICAgICAgICAgICAgICAgICAgIGJ5dGVzX3RvX3RyYW5zZmVyID0gcGlwZS0+bWF4X3BhY2tldDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIFVTQl9TRVRfRklFTEQzMihDVk1YX1VTQkNYX0hDQ0hBUlgoY2hhbm5lbCwgdXNiLT5pbmRleCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3ZteF91c2JjeF9oY2NoYXJ4X3QsIGVwZGlyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoaGVhZGVyLT5zLnJlcXVlc3RfdHlwZSAmIDB4ODApID8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfRElSRUNUSU9OX0lOIDoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfRElSRUNUSU9OX09VVCkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQ1ZNWF9VU0JfU1RBR0VfREFUQV9TUExJVF9DT01QTEVURToKLSAgICAgICAgICAgIHVzYmNfaGN0c2l6LnMucGlkID0gX19jdm14X3VzYl9nZXRfZGF0YV9waWQocGlwZSk7Ci0gICAgICAgICAgICBpZiAoIShoZWFkZXItPnMucmVxdWVzdF90eXBlICYgMHg4MCkpCi0gICAgICAgICAgICAgICAgYnl0ZXNfdG9fdHJhbnNmZXIgPSAwOwotICAgICAgICAgICAgVVNCX1NFVF9GSUVMRDMyKENWTVhfVVNCQ1hfSENDSEFSWChjaGFubmVsLCB1c2ItPmluZGV4KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYmN4X2hjY2hhcnhfdCwgZXBkaXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChoZWFkZXItPnMucmVxdWVzdF90eXBlICYgMHg4MCkgPwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9ESVJFQ1RJT05fSU4gOgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9ESVJFQ1RJT05fT1VUKSk7Ci0gICAgICAgICAgICBVU0JfU0VUX0ZJRUxEMzIoQ1ZNWF9VU0JDWF9IQ1NQTFRYKGNoYW5uZWwsIHVzYi0+aW5kZXgpLCBjdm14X3VzYmN4X2hjc3BsdHhfdCwgY29tcHNwbHQsIDEpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQ1ZNWF9VU0JfU1RBR0VfU1RBVFVTOgotICAgICAgICAgICAgdXNiY19oY3RzaXoucy5waWQgPSBfX2N2bXhfdXNiX2dldF9kYXRhX3BpZChwaXBlKTsKLSAgICAgICAgICAgIGJ5dGVzX3RvX3RyYW5zZmVyID0gMDsKLSAgICAgICAgICAgIFVTQl9TRVRfRklFTEQzMihDVk1YX1VTQkNYX0hDQ0hBUlgoY2hhbm5lbCwgdXNiLT5pbmRleCksIGN2bXhfdXNiY3hfaGNjaGFyeF90LCBlcGRpciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGhlYWRlci0+cy5yZXF1ZXN0X3R5cGUgJiAweDgwKSA/Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIENWTVhfVVNCX0RJUkVDVElPTl9PVVQgOgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9ESVJFQ1RJT05fSU4pKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIENWTVhfVVNCX1NUQUdFX1NUQVRVU19TUExJVF9DT01QTEVURToKLSAgICAgICAgICAgIHVzYmNfaGN0c2l6LnMucGlkID0gX19jdm14X3VzYl9nZXRfZGF0YV9waWQocGlwZSk7Ci0gICAgICAgICAgICBieXRlc190b190cmFuc2ZlciA9IDA7Ci0gICAgICAgICAgICBVU0JfU0VUX0ZJRUxEMzIoQ1ZNWF9VU0JDWF9IQ0NIQVJYKGNoYW5uZWwsIHVzYi0+aW5kZXgpLCBjdm14X3VzYmN4X2hjY2hhcnhfdCwgZXBkaXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChoZWFkZXItPnMucmVxdWVzdF90eXBlICYgMHg4MCkgPwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9ESVJFQ1RJT05fT1VUIDoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfRElSRUNUSU9OX0lOKSk7Ci0gICAgICAgICAgICBVU0JfU0VUX0ZJRUxEMzIoQ1ZNWF9VU0JDWF9IQ1NQTFRYKGNoYW5uZWwsIHVzYi0+aW5kZXgpLCBjdm14X3VzYmN4X2hjc3BsdHhfdCwgY29tcHNwbHQsIDEpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgfQorCS8qCisJICogTWFrZSBzdXJlIHRo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0gICAgICAgICAgICBpZiAoIXVzYmNfaGNzcGx0LnMuY29tcHNwbHQgJiYKLSAgICAgICAgICAgICAgICAocGlwZS0+dHJhbnNmZXJfZGlyID09IENWTVhfVVNCX0RJUkVDVElPTl9PVVQpICYmCi0gICAgICAgICAgICAgICAgKHBpcGUtPnRyYW5zZmVyX3R5cGUgPT0gQ1ZNWF9VU0JfVFJBTlNGRVJfSVNPQ0hST05PVVMpKSB7Ci0gICAgICAgICAgICAgICAgLyogQ2xlYXIgdGhlIHNwbGl0IGNvbXBsZXRlIGZyYW1lIG51bWJlciBhcyB0aGVyZSBpc24ndCBnb2luZwotICAgICAgICAgICAgICAgICAgICB0byBiZSBhIHNwbGl0IGNvbXBsZXRlICovCi0gICAgICAgICAgICAgICAgcGlwZS0+c3BsaXRfc2NfZnJhbWUgPSAtMTsKLSAgICAgICAgICAgICAgICAvKiBTZWUgaWYgd2UndmUgc3RhcnRlZCB0aGlzIHRyYW5zZmVyIGFuZCBzZW50IGRhdGEgKi8KLSAgICAgICAgICAgICAgICBpZiAodHJhbnNhY3Rpb24tPmFjdHVhbF9ieXRlcyA9PSAwKSB7Ci0gICAgICAgICAgICAgICAgICAgIC8qIE5vdGhpbmcgc2VudCB5ZXQsIHRoaXMgaXMgZWl0aGVyIGEgYmVnaW4gb3IgdGhlCi0gICAgICAgICAgICAgICAgICAgICAgICBlbnRpcmUgcGF5bG9hZCAqLwotICAgICAgICAgICAgICAgICAgICBpZiAoYnl0ZXNfdG9fdHJhbnNmZXIgPD0gMTg4KQotICAgICAgICAgICAgICAgICAgICAgICAgdXNiY19oY3NwbHQucy54YWN0cG9zID0gMzsgLyogRW50aXJlIHBheWxvYWQgaW4gb25lIGdvICovCi0gICAgICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIHVzYmNfaGNzcGx0LnMueGFjdHBvcyA9IDI7IC8qIEZpcnN0IHBhcnQgb2YgcGF5bG9hZCAqLwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgLyogQ29udGludWluZyB0aGUgcHJldmlvdXMgZGF0YSwgd2UgbXVzdCBlaXRoZXIgYmUKLSAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBtaWRkbGUgb3IgYXQgdGhlIGVuZCAqLwotICAgICAgICAgICAgICAgICAgICBpZiAoYnl0ZXNfdG9fdHJhbnNmZXIgPD0gMTg4KQotICAgICAgICAgICAgICAgICAgICAgICAgdXNiY19oY3NwbHQucy54YWN0cG9zID0gMTsgLyogRW5kIG9mIHBheWxvYWQgKi8KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgdXNiY19oY3NwbHQucy54YWN0cG9zID0gMDsgLyogTWlkZGxlIG9mIHBheWxvYWQgKi8KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgLyogQWdhaW4sIHRoZSB0cmFuc2ZlciBzaXplIGlzIGxpbWl0ZWQgdG8gMTg4IGJ5dGVzICovCi0gICAgICAgICAgICAgICAgaWYgKGJ5dGVzX3RvX3RyYW5zZmVyID4gMTg4KQotICAgICAgICAgICAgICAgICAgICBieXRlc190b190cmFuc2ZlciA9IDE4ODsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQorCQkvKgorCQkgKiBDYWxjdWxhdGUgdGhlIG51bWJlciBvZiBwYWNrZXRzIHRvIHRyYW5zZmVyLiBJZiB0aGUgbGVuZ3RoIGlzCisJCSAqIHplcm8gd2Ugc3RpbGwgbmVlZCB0byB0cmFuc2ZlciBvbmUgcGFja2V0CisJCSAqLworCQlwYWNrZXRzX3RvX3RyYW5zZmVyID0gKGJ5dGVzX3RvX3RyYW5zZmVyICsgcGlwZS0+bWF4X3BhY2tldCAtIDEpIC8gcGlwZS0+bWF4X3BhY2tldDsKKwkJaWYgKHBhY2tldHNfdG9fdHJhbnNmZXIgPT0gMCkKKwkJCXBhY2tldHNfdG9fdH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ZXN0X3R5cGUgJiAweDgwKSA/ICJJTiIgOiAiT1VUIjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSBDVk1YX1VTQl9UUkFOU0ZFUl9JU09DSFJPTk9VUzoKLSAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICJJU09DSFJPTk9VUyI7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgQ1ZNWF9VU0JfVFJBTlNGRVJfQlVMSzoKLSAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICJCVUxLIjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgZGVmYXVsdDogLyogQ1ZNWF9VU0JfVFJBTlNGRVJfSU5URVJSVVBUICovCi0gICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiSU5URVJSVVBUIjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBjdm14X2RwcmludGYoIiVzOiBTdGFydGluZyBwaXBlICVkLCB0cmFuc2FjdGlvbiAlZCBvbiBjaGFubmVsICVkLiAlcyAlcyBsZW49JWQgaGVhZGVyPTB4JWxseFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICBfX0ZVTkNUSU9OX18sIF9fY3ZteF91c2JfZ2V0X3BpcGVfaGFuZGxlKHVzYiwgcGlwZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgX19jdm14X3VzYl9nZXRfc3VibWl0X2hhbmRsZSh1c2IsIHRyYW5zYWN0aW9uKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsLCB0eXBlLCBkaXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPmJ1ZmZlcl9sZW5ndGgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgKGhlYWRlcikgPyAodW5zaWduZWQgbG9uZyBsb25nK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gKiBAdXNlcl9kYXRhOgkgICAgVXNlcidzIGRhdGEgZm9yIHRoZSBjYWxsYmFjawogICoKLSAqIEByZXR1cm4gU3VibWl0IGhhbmRsZSBvciBuZWdhdGl2ZSBvbiBmYWlsdXJlLiBNYXRjaGVzIHRoZSByZXN1bHQKLSAqICAgICAgICAgaW4gdGhlIGV4dGVybmFsIEFQSS4KKyAqIFJldHVybnM6IFN1Ym1pdCBoYW5kbGUgb3IgbmVnYXRpdmUgb24gZmFpbHVyZS4gTWF0Y2hlcyB0aGUgcmVzdWx0CisgKgkgICAgaW4gdGhlIGV4dGVybmFsIEFQSS4KICAqLwotc3RhdGljIGludCBfX2N2bXhfdXNiX3N1Ym1pdF90cmFuc2FjdGlvbihjdm14X3VzYl9pbnRlcm5hbF9zdGF0ZV90ICp1c2IsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBwaXBlX2hhbmRsZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3ZteF91c2JfdHJhbnNmZXJfdCB0eXBlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgZmxhZ3MsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQ2NF90IGJ1ZmZlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGJ1ZmZlcl9sZW5ndGgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQ2NF90IGNvbnRyb2xfaGVhZGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaXNvX3N0YXJ0X2ZyYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaXNvX251bWJlcl9wYWNrZXRzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9p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ZXIgaW4gYSBjb21tb24gcGxhY2UgKi8KKwlpZiAodW5saWtlbHkoIWJ1ZmZlcikpCisJCXJldHVybiAtRUlOVkFMOworCWlmICh1bmxpa2VseShidWZmZXJfbGVuZ3RoIDwgMCkpCisJCXJldHVybiAtRUlOVkFMOwogCi0gICAgLyogUGlwZSBoYW5kbGUgY2hlY2tpbmcgaXMgZG9uZSBsYXRlciBpbiBhIGNvbW1vbiBwbGFjZSAqLwotICAgIGlmIChjdm14X3VubGlrZWx5KCFidWZmZXIpKQotICAgICAgICBDVk1YX1VTQl9SRVRVUk4oQ1ZNWF9VU0JfSU5WQUxJRF9QQVJBTSk7Ci0gICAgaWYgKGN2bXhfdW5saWtlbHkoYnVmZmVyX2xlbmd0aCA8IDApKQotICAgICAgICBDVk1YX1VTQl9SRVRVUk4oQ1ZNWF9VU0JfSU5WQUxJRF9QQVJBTSk7Ci0KLSAgICBzdWJtaXRfaGFuZGxlID0gX19jdm14X3VzYl9zdWJtaXRfdHJhbnNhY3Rpb24odXNiLCBwaXBlX2hhbmRsZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfVFJBTlNGRVJfQlVMSywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogZmxhZ3MgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJfbGVuZ3RoLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLCAvKiBjb250cm9sX2hlYWRlciAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLCAvKiBpc29fc3RhcnRfZnJhbWUgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogaXNvX251bWJlcl9wYWNrZXRzICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIC8qIGlzb19wYWNrZXRzICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VyX2RhdGEpOwotICAgIENWTVhfVVNCX1JFVFVSTihzdWJtaXRfaGFuZGxlKTsKKwlzdWJtaXRfaGFuZGxlID0gX19jdm14X3VzYl9zdWJtaXRfdHJhbnNhY3Rpb24odXNiLCBwaXBlX2hhbmRsZSwKKwkJCQkJCSAgICAgIENWTVhfVVNCX1RSQU5TRkVSX0JVTEssCisJCQkJCQkgICAgICAwLCAvKiBmbGFncyAqLworCQkJCQkJICAgICAgYnVmZmVyLAorCQkJCQkJICAgICAgYnVmZmVyX2xlbmd0aCwKKwkJCQkJCSAgICAgIDAsIC8qIGNvbnRyb2xfaGVhZGVyICovCisJCQkJCQkgICAgICAwLCAvKiBpc29fc3RhcnRfZnJhbWUgKi8KKwkJCQkJCSAgICAgIDAsIC8qIGlzb19udW1iZXJfcGFja2V0cyAqLworCQkJCQkJICAgICAgTlVMTCwgLyogaXNvX3BhY2tldHMgKi8KKwkJCQkJCSAgICAgIGNhbGxiYWNrLAorCQkJCQkJICAgICAgdXNlcl9kYXRhKTsKKwlyZXR1cm4gc3VibWl0X2hhbmRsZTsKIH0KIAogCiAvKioKICAqIENhbGwgdG8gc3VibWl0IGEgVVNCIEludGVycnVwdCB0cmFuc2ZlciB0byBhIHBpcGUuCiAgKgotICogQHBhcmFtIHN0YXRlICAgICBVU0IgZGV2aWNlIHN0YXRlIHBvcHVsYXRlZCBieQotICogICAgICAgICAgICAgICAgICBjdm14X3VzYl9pbml0aWFsaXplKCkuCi0gKiBAcGFyYW0gcGlwZV9oYW5kbGUKLSAqICAgICAgICAgICAgICAgICAgSGFuZGxlIHRvIHRoZSBwaXBlIGZvciB0aGUgdHJhbnNmZXIuCi0g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biBhIGNvbW1vbiBwbGFjZSAqLworCWlmICh1bmxpa2VseSghYnVmZmVyKSkKKwkJcmV0dXJuIC1FSU5WQUw7CisJaWYgKHVubGlrZWx5KGJ1ZmZlcl9sZW5ndGggPCAwKSkKKwkJcmV0dXJuIC1FSU5WQUw7CiAKLSAgICAvKiBQaXBlIGhhbmRsZSBjaGVja2luZyBpcyBkb25lIGxhdGVyIGluIGEgY29tbW9uIHBsYWNlICovCi0gICAgaWYgKGN2bXhfdW5saWtlbHkoIWJ1ZmZlcikpCi0gICAgICAgIENWTVhfVVNCX1JFVFVSTihDVk1YX1VTQl9JTlZBTElEX1BBUkFNKTsKLSAgICBpZiAoY3ZteF91bmxpa2VseShidWZmZXJfbGVuZ3RoIDwgMCkpCi0gICAgICAgIENWTVhfVVNCX1JFVFVSTihDVk1YX1VTQl9JTlZBTElEX1BBUkFNKTsKLQotICAgIHN1Ym1pdF9oYW5kbGUgPSBfX2N2bXhfdXNiX3N1Ym1pdF90cmFuc2FjdGlvbih1c2IsIHBpcGVfaGFuZGxlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9UUkFOU0ZFUl9JTlRFUlJVUFQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIC8qIGZsYWdzICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyX2xlbmd0aCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogY29udHJvbF9oZWFkZXIgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogaXNvX3N0YXJ0X2ZyYW1lICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIC8qIGlzb19udW1iZXJfcGFja2V0cyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCAvKiBpc29fcGFja2V0cyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlcl9kYXRhKTsKLSAgICBDVk1YX1VTQl9SRVRVUk4oc3VibWl0X2hhbmRsZSk7CisJc3VibWl0X2hhbmRsZSA9IF9fY3ZteF91c2Jfc3VibWl0X3RyYW5zYWN0aW9uKHVzYiwgcGlwZV9oYW5kbGUsCisJCQkJCQkgICAgICBDVk1YX1VTQl9UUkFOU0ZFUl9JTlRFUlJVUFQsCisJCQkJCQkgICAgICAwLCAvKiBmbGFncyAqLworCQkJCQkJICAgICAgYnVmZmVyLAorCQkJCQkJICAgICAgYnVmZmVyX2xlbmd0aCwKKwkJCQkJCSAgICAgIDAsIC8qIGNvbnRyb2xfaGVhZGVyICovCisJCQkJCQkgICAgICAwLCAvKiBpc29fc3RhcnRfZnJhbWUgKi8KKwkJCQkJCSAgICAgIDAsIC8qIGlzb19udW1iZXJfcGFja2V0cyAqLworCQkJCQkJICAgICAgTlVMTCwgLyogaXNvX3BhY2tldHMgKi8KKwkJCQkJCSAgICAgIGNhbGxiYWNrLAorCQkJCQkJICAgICAgdXNlcl9kYXRhKTsKKwlyZXR1cm4gc3VibWl0X2hhbmRsZTsKIH0KIAogCiAvKioKICAqIENhbGwgdG8gc3VibWl0IGEgVVNCIENvbnRyb2wgdHJhbnNmZXIgdG8gYSBwaXBlLgogICoKLSAqIEBwYXJhbSBzdGF0ZSAgICAgVVNCIGRldmljZSBzdGF0ZSBwb3B1bGF0ZWQgYnkKLSAqICAgICAgICAgICAgICAgICAgY3ZteF91c2JfaW5pdGlhbGl6ZSgpLgotICogQHBhcmFtIHBpcGVfaGFuZGxlCi0gKiAgICAgICAgICAgICAgICAgIEhhbmRsZSB0byB0aGUgcGlwZSBm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XRfaGFuZGxlID0gX19jdm14X3VzYl9zdWJtaXRfdHJhbnNhY3Rpb24odXNiLCBwaXBlX2hhbmRsZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfVFJBTlNGRVJfQ09OVFJPTCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogZmxhZ3MgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJfbGVuZ3RoLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sX2hlYWRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLyogaXNvX3N0YXJ0X2ZyYW1lICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIC8qIGlzb19udW1iZXJfcGFja2V0cyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCAvKiBpc29fcGFja2V0cyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlcl9kYXRhKTsKLSAgICBDVk1YX1VTQl9SRVRVUk4oc3VibWl0X2hhbmRsZSk7CisJc3VibWl0X2hhbmRsZSA9IF9fY3ZteF91c2Jfc3VibWl0X3RyYW5zYWN0aW9uKHVzYiwgcGlwZV9oYW5kbGUsCisJCQkJCQkgICAgICBDVk1YX1VTQl9UUkFOU0ZFUl9DT05UUk9MLAorCQkJCQkJICAgICAgMCwgLyogZmxhZ3MgKi8KKwkJCQkJCSAgICAgIGJ1ZmZlciwKKwkJCQkJCSAgICAgIGJ1ZmZlcl9sZW5ndGgsCisJCQkJCQkgICA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Yl9zdWJtaXRfdHJhbnNhY3Rpb24odXNiLCBwaXBlX2hhbmRsZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1ZNWF9VU0JfVFJBTlNGRVJfSVNPQ0hST05PVVMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcl9sZW5ndGgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIC8qIGNvbnRyb2xfaGVhZGVyICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0X2ZyYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1iZXJfcGFja2V0cywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0cywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2ssCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJfZGF0YSk7Ci0gICAgQ1ZNWF9VU0JfUkVUVVJOKHN1Ym1pdF9oYW5kbGUpOworCXN1Ym1pdF9oYW5kbGUgPSBfX2N2bXhfdXNiX3N1Ym1pdF90cmFuc2FjdGlvbih1c2IsIHBpcGVfaGFuZGxlLAorCQkJCQkJICAgICAgQ1ZNWF9VU0JfVFJBTlNGRVJfSVNPQ0hST05PVVMsCisJCQkJCQkgICAgICBmbGFncywKKwkJCQkJCSAgICAgIGJ1ZmZlciwKKwkJCQkJCSAgICAgIGJ1ZmZlcl9sZW5ndGgsCisJCQkJCQkgICAgICAwLCAvKiBjb250cm9sX2hlYWRlciAqLworCQkJCQkJICAgICAgc3RhcnRfZnJhbWUsC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WxzIGRvbid0IGhhbHQgdGhlbXNlbHZlcy4gV2UgbmVlZCB0bwotICAgICAgICAgICAgbWFudWFsbHkgZGlzYWJsZSBjaGFubmVscyB0aGF0IGFyZSBsZWZ0IHJ1bm5pbmcgKi8KLSAgICAgICAgaWYgKCF1c2JjX2hjaW50LnMuY2hobHRkKSB7Ci0gICAgICAgICAgICBpZiAodXNiY19oY2NoYXIucy5jaGVuYSkgewotICAgICAgICAgICAgICAgIGN2bXhfdXNiY3hfaGNpbnRtc2t4X3QgaGNpbnRtc2s7Ci0gICAgICAgICAgICAgICAgLyogRGlzYWJsZSBhbGwgaW50ZXJydXB0cyBleGNlcHQgQ0hITFREICovCi0gICAgICAgICAgICAgICAgaGNpbnRtc2sudTMyID0gMDsKLSAgICAgICAgICAgICAgICBoY2ludG1zay5zLmNoaGx0ZG1zayA9IDE7Ci0gICAgICAgICAgICAgICAgX19jdm14X3VzYl93cml0ZV9jc3IzMih1c2IsIENWTVhfVVNCQ1hfSENJTlRNU0tYKGNoYW5uZWwsIHVzYi0+aW5kZXgpLCBoY2ludG1zay51MzIpOwotICAgICAgICAgICAgICAgIHVzYmNfaGNjaGFyLnMuY2hkaXMgPSAxOwotICAgICAgICAgICAgICAgIF9fY3ZteF91c2Jfd3JpdGVfY3NyMzIodXNiLCBDVk1YX1VTQkNYX0hDQ0hBUlgoY2hhbm5lbCwgdXNiLT5pbmRleCksIHVzYmNfaGNjaGFyLnUzMik7Ci0gICAgICAgICAgICAgICAgQ1ZNWF9VU0JfUkVUVVJOKDApOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSBpZiAodXNiY19oY2ludC5zLnhmZXJjb21wbCkgewotICAgICAgICAgICAgICAgIC8qIFN1Y2Nlc3NmdWwgSU4vT1VUIHdpdGggdHJhbnNmZXIgY29tcGxldGUuIENoYW5uZWwgaGFsdCBpc24ndCBuZWVkZWQgKi8KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICA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gICAgICAgICAgICAgICAgICBwaXBlLT5waWRfdG9nZ2xlID0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfX2N2bXhfdXNiX3BpcGVfbmVlZHNfc3BsaXQodXNiLCBwaXBlKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbi0+c3RhZ2UgPSBDVk1YX1VTQl9TVEFHRV9TRVRVUF9TUExJVF9DT01QTEVURTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2NvbnRyb2xfaGVhZGVyX3QgKmhlYWRlciA9IGN2bXhfcGh5c190b19wdHIodHJhbnNhY3Rpb24tPmNvbnRyb2xfaGVhZGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLT5zLmxlbmd0aCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPnN0YWdlID0gQ1ZNWF9VU0JfU1RBR0VfREFUQTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9uLT5zdGFnZSA9IENWTVhfVVNCX1NUQUdFX1NUQVRVUzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBjYXNlIENWTVhfVVNCX1NUQUdFX1NFVFVQX1NQTElUX0NPTVBMRVRFOgotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2NvbnRyb2xfaGVhZGVyX3QgKmhlYWRlciA9IGN2bXhfcGh5c190b19wdHIodHJhbnNhY3Rpb24tPmNvbnRyb2xfaGVhZGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLT5zLmxlbmd0aCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPnN0YWdlID0gQ1ZNWF9VU0JfU1RBR0VfREFUQTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9uLT5zdGFnZSA9IENWTVhfVVNCX1NUQUdFX1NUQVRVUzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBjYXNlIENWTVhfVVNCX1NUQUdFX0RBVEE6Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoX19jdm14X3VzYl9waXBlX25lZWRzX3NwbGl0KHVzYiwgcGlwZSkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbi0+c3RhZ2UgPSBDVk1YX1VTQl9TVEFHRV9EQVRBX1NQTElUX0NPTVBMRVRFOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEZvciBzZXR1cCBPVVQgZGF0YSB0aGF0IGFyZSBzcGxpdHMsIHRoZSBoYXJkd2FyZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2Vzbid0IGFwcGVhciB0byBjb3VudCB0cmFuc2ZlcnJlZCBkYXRhLiBIZXJlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdlIG1hbnVhbGx5IHVwZGF0ZSB0aGUgZGF0YSB0cmFuc2ZlcnJlZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdXNiY19oY2NoYXIucy5lcGRpcikgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYnVmZmVyX3NwYWNlX2xlZnQgPCBwaXBlLT5tYXhfcGFja2V0KQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPmFjdHVhbF9ieXRlcyArPSBidWZmZXJfc3BhY2VfbGVmdDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPmFjdHVhbF9ieXRlcyArPSBwaXBlLT5tYXhfcGFja2V0OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKChidWZmZXJfc3BhY2VfbGVmdCA9PSAwKSB8fCAoYnl0ZXNfaW5fbGFzdF9wYWNrZXQgPCBwaXBlLT5tYXhfcGFja2V0KSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpcGUtPnBpZF90b2dnbGUgPSAxOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9uLT5zdGFnZSA9IENWTVhfVVNCX1NUQUdFX1NUQVRVUzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBjYXNlIENWTVhfVVNCX1NUQUdFX0RBVEFfU1BMSVRfQ09NUExFVEU6Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGJ1ZmZlcl9zcGFjZV9sZWZ0ID09IDApIHx8IChieXRlc19pbl9sYXN0X3BhY2tldCA8IHBpcGUtPm1heF9wYWNrZXQpKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGlwZS0+cGlkX3RvZ2dsZSA9IDE7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPnN0YWdlID0gQ1ZNWF9VU0JfU1RBR0VfU1RBVFVTOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNhY3Rpb24tPnN0YWdlID0gQ1ZNWF9VU0JfU1RBR0VfREFUQTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBjYXNlIENWTVhfVVNCX1NUQUdFX1NUQVRVUzoKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfX2N2bXhfdXNiX3BpcGVfbmVlZHNfc3BsaXQodXNiLCBwaXBlKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbi0+c3RhZ2UgPSBDVk1YX1VTQl9TVEFHRV9TVEFUVVNfU1BMSVRfQ09NUExFVEU7Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgX19jdm14X3VzYl9wZXJmb3JtX2NvbXBsZXRlKHVzYiwgcGlwZSwgdHJhbnNhY3Rpb24sIENWTVhfVVNCX0NPTVBMRVRFX1NVQ0NFU1MpOwotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgIGNhc2UgQ1ZNWF9VU0JfU1RBR0VfU1RBVFVTX1NQTElUX0NPTVBMRVRFOgotICAgICAgICAgICAgICAgICAgICAgICAgX19jdm14X3VzYl9wZXJmb3JtX2NvbXBsZXRlKHVzYiwgcGlwZSwgdHJhbnNhY3Rpb24sIENWTVhfVVNCX0NPTVBMRVRFX1NVQ0NFU1MpOwotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgY2FzZSBDVk1YX1VTQl9UUkFOU0ZFUl9CVUxLOgotICAgICAgICAgICAgY2FzZSBDVk1YX1VTQl9UUkFOU0ZFUl9JTlRFUlJVUFQ6Ci0gICAgICAgICAgICAgICAgLyogVGhlIG9ubHkgdGltZSBhIGJ1bGsgdHJhbnNmZXIgaXNuJ3QgY29tcGxldGUgd2hlbgotICAgICAgICAgICAgICAgICAgICBpdCBmaW5pc2hlcyB3aXRoIGFuIEFDSyBpcyBkdXJpbmcgYSBzcGxpdCB0cmFuc2FjdGlvbi4gRm9yCi0gICAgICAgICAgICAgICAgICAgIHNwbGl0cyB3ZSBuZWVkIHRvIGNvbnRpbnVlIHRoZSB0cmFuc2ZlciBpZiBtb3JlIGRhdGEgaXMKLSAgICAgICAgICAgICAgICAgICAgbmVlZGVkICovCi0gICAgICAgICAgICAgICAgaWYgKF9fY3ZteF91c2JfcGlwZV9uZWVkc19zcGxpdCh1c2IsIHBpcGUpKSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc2FjdGlvbi0+c3RhZ2UgPT0gQ1ZNWF9VU0JfU1RBR0VfTk9OX0NPTlRST0wpCi0gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbi0+c3RhZ2UgPSBDVk1YX1VTQl9TVEFHRV9OT05fQ09OVFJPTF9TUExJVF9DT01QTEVURTsKLSAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYnVmZmVyX3NwYWNlX2xlZnQgJiYgKGJ5dGVzX2luX2xhc3RfcGFja2V0ID09IHBpcGUtPm1heF9wYWNrZXQpKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9uLT5zdGFnZSA9IENWTVhfVVNCX1NUQUdFX05PTl9DT05UUk9MOwotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRyYW5zYWN0aW9uLT50eXBlID09IENWTVhfVVNCX1RSQU5TRkVSX0lOVEVSUlVQVCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGlwZS0+bmV4dF90eF9mcmFtZSArPSBwaXBlLT5pbnRlcnZhbDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2N2bXhfdXNiX3BlcmZvcm1fY29tcGxldGUodXNiLCBwaXBlLCB0cmFuc2FjdGlvbiwgQ1ZNWF9VU0JfQ09NUExFVEVfU1VDQ0VTUyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmICgocGlwZS0+ZGV2aWNlX3NwZWVkID09IENWTVhfVVNCX1NQRUVEX0hJR0gpICYmCi0gICAgICAgICAgICAgICAgICAgICAgICAocGlwZS0+dHJhbnNmZXJfdHlwZSA9PSBDVk1YX1VTQl9UUkFOU0ZFUl9CVUxLKSAmJgotICAgICAgICAgICAgICAgICAgICAgICAgKHBpcGUtPnRyYW5zZmVyX2RpciA9PSBDVk1YX1VTQl9ESVJFQ1RJT05fT1VUKSAmJgotICAgICAgICAgICAgICAgICAgICAgICAgKHVzYmNfaGNpbnQucy5uYWspKQotICAgICAgICAgICAgICAgICAgICAgICAgcGlwZS0+ZmxhZ3MgfD0gX19DVk1YX1VTQl9QSVBFX0ZMQUdTX05FRURfUElORzsKLSAgICAgICAgICAgICAgICAgICAgaWYgKCFidWZmZXJfc3BhY2VfbGVmdCB8fCAoYnl0ZXNfaW5fbGFzdF9wYWNrZXQgPCBwaXBlLT5tYXhfcGFja2V0KSkgewotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRyYW5zYWN0aW9uLT50eXBlID09IENWTVhfVVNCX1RSQU5TRkVSX0lOVEVSUlVQVCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXBlLT5uZXh0X3R4X2ZyYW1lICs9IHBpcGUtPmludGVydmFsOwotICAgICAgICAgICAgICAgICAgICAgICAgX19jdm14X3VzYl9wZXJmb3JtX2NvbXBsZXRlKHVzYiwgcGlwZSwgdHJhbnNhY3Rpb24sIENWTVhfVVNCX0NPTVBMRVRFX1NVQ0NFU1MpOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgY2FzZSBDVk1YX1VTQl9UUkFOU0ZFUl9JU09DSFJPTk9VUzoKLSAgICAgICAgICAgICAgICBpZiAoX19jdm14X3VzYl9waXBlX25lZWRzX3NwbGl0KHVzYiwgcGlwZSkpIHsKLSAgICAgICAgICAgICAgICAgICAgLyogSVNPQ0hST05PVVMgT1VUIHNwbGl0cyBkb24ndCByZXF1aXJlIGEgY29tcGxldGUgc3BsaXQgc3RhZ2UuCi0gICAgICAgICAgICAgICAgICAgICAgICBJbnN0ZWFkIHRoZXkgdXNlIGEgc2VxdWVuY2Ugb2YgYmVnaW4gT1VUIHNwbGl0cyB0byB0cmFuc2ZlcgotICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGRhdGEgMTg4IGJ5dGVzIGF0IGEgdGltZS4gT25jZSB0aGUgdHJhbnNmZXIgaXMgY29tcGxldGUsCi0gICAgICAgICAgICAgICAgICAgICAgICB0aGUgcGlwZSBzbGVlcHMgdW50aWwgdGhlIG5leHQgc2NoZWR1bGUgaW50ZXJ2YWwgKi8KLSAgICAgICAgICAgICAgICAgICAgaWYgKHBpcGUtPnRyYW5zZmVyX2RpciA9PSBDVk1YX1VTQl9ESVJFQ1RJT05fT1VUKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvKiBJZiBubyBzcGFjZSBsZWZ0IG9yIHRoaXMgd2Fzbid0IGEgbWF4IHNpemUgcGFja2V0IHRoZW4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIHRyYW5zZmVyIGlzIGNvbXBsZXRlLiBPdGhlcndpc2Ugc3RhcnQgaXQgYWdhaW4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBzZW5kIHRoZSBuZXh0IDE4OCBieXRlcyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFidWZmZXJfc3BhY2VfbGVmdCB8fCAoYnl0ZXNfdGhpc190cmFuc2ZlciA8IDE4OCkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXBlLT5uZXh0X3R4X2ZyYW1lICs9IHBpcGUtPmludGVydmFsOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fY3ZteF91c2JfcGVyZm9ybV9jb21wbGV0ZSh1c2IsIHBpcGUsIHRyYW5zYWN0aW9uLCBDVk1YX1VTQl9DT01QTEVURV9TVUNDRVNTKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc2FjdGlvbi0+c3RhZ2UgPT0gQ1ZNWF9VU0JfU1RBR0VfTk9OX0NPTlRST0xfU1BMSVRfQ09NUExFVEUpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXZSBhcmUgaW4gdGhlIGluY29taW5nIGRhdGEgcGhhc2UuIEtlZXAgZ2V0dGluZwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhIHVudGlsIHdlIHJ1biBvdXQgb2Ygc3BhY2Ugb3IgZ2V0IGEgc21hbGwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0ICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChidWZmZXJfc3BhY2VfbGVmdCA9PSAwKSB8fCAoYnl0ZXNfaW5fbGFzdF9wYWNrZXQgPCBwaXBlLT5tYXhfcGFja2V0KSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXBlLT5uZXh0X3R4X2ZyYW1lICs9IHBpcGUtPmludGVydmFsOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2N2bXhfdXNiX3BlcmZvcm1fY29tcGxldGUodXNiLCBwaXBlLCB0cmFuc2FjdGlvbiwgQ1ZNWF9VU0JfQ09NUExFVEVfU1VDQ0VTUyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9uLT5zdGFnZSA9IENWTVhfVVNCX1NUQUdFX05PTl9DT05UUk9MX1NQTElUX0NPTVBMRVRFOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICBwaXBlLT5uZXh0X3R4X2ZyYW1lICs9IHBpcGUtPmludGVydmFsOwotICAgICAgICAgICAgICAgICAgICBfX2N2bXhfdXNiX3BlcmZvcm1fY29tcGxldGUodXNiLCBwaXBlLCB0cmFuc2FjdGlvbiwgQ1ZNWF9VU0JfQ09NUExFVEVfU1VDQ0VTUyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgfQotICAgIGVsc2UgaWYgKHVzYmNfaGNpbnQucy5uYWspIHsKLSAgICAgICAgLyogSWYgdGhpcyB3YXMgYSBzcGxpdCB0aGVuIGNsZWFyIG91ciBzcGxpdCBpbiBwcm9ncmVzcyBtYXJrZXIgKi8KLSAgICAgICAgaWYgKHVzYi0+YWN0aXZlX3NwbGl0ID09IHRyYW5zYWN0aW9uKQotICAgICAgICAgICAgdXNiLT5hY3RpdmVfc3BsaXQgPSBOVUxMOwotICAgICAgICAvKiBOQUsgYXMgYSByZXNwb25zZSBtZWFucyB0aGUgZGV2aWNlIGNvdWxkbid0IGFjY2VwdCB0aGUgdHJhbnNhY3Rpb24sCi0gICAgICAgICAgICBidXQgaXQgc2hvdWxkIGJlIHJldHJpZWQgaW4gdGhlIGZ1dHVyZS4gUmV3aW5kIHRvIHRoZSBiZWdpbm5pbmcgb2YKLSAgICAgICAgICAgIHRoZSB0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RvdHlwZSBuZWVkcyB0byBsb29rIGFzIGZvbGxvd3M6CiAgKgotICogdm9pZCBjb21wbGV0ZV9jYWxsYmFjayhjdm14X3VzYl9zdGF0ZV90ICp1c2IsCi0gKiAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2NhbGxiYWNrX3QgcmVhc29uLAotICogICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9jb21wbGV0ZV90IHN0YXR1cywKKyAqIHZvaWQgY29tcGxldGVfY2FsbGJhY2soc3RydWN0IGN2bXhfdXNiX3N0YXRlICp1c2IsCisgKiAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gY3ZteF91c2JfY2FsbGJhY2sgcmVhc29uLAorICogICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGN2bXhfdXNiX2NvbXBsZXRlIHN0YXR1cywKICAqICAgICAgICAgICAgICAgICAgICAgICAgaW50IHBpcGVfaGFuZGxlLAogICogICAgICAgICAgICAgICAgICAgICAgICBpbnQgc3VibWl0X2hhbmRsZSwKICAqICAgICAgICAgICAgICAgICAgICAgICAgaW50IGJ5dGVzX3RyYW5zZmVycmVkLAogICogICAgICAgICAgICAgICAgICAgICAgICB2b2lkICp1c2VyX2RhdGEpOwotICogLSBAYiB1c2IgaXMgdGhlIGN2bXhfdXNiX3N0YXRlX3QgZm9yIHRoZSBwb3J0LgotICogLSBAYiByZWFzb24gd2lsbCBhbHdheXMgYmUKLSAqICAgQ1ZNWF9VU0JfQ0FMTEJBQ0tfVFJBTlNGRVJfQ09NUExFVEUuCi0gKiAtIEBiIHN0YXR1cyB3aWxsIGJlIG9uZSBvZiB0aGUgY3ZteF91c2JfY29tcGxldGVfdAotICogICBlbnVtZXJhdGlvbnMuCi0gKiAtIEBiIHBpcGVfaGFuZGxlIGlzIHRoZSBoYW5kbGUgdG8gdGhlIHBpcGUgdGhlIHRyYW5zYWN0aW9uCisgKiAtICJ1c2IiIGlzIHRoZSBzdHJ1Y3QgY3ZteF91c2Jfc3Rh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VyZToKLSAqICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCJPY3Rlb25VU0I6IENsZWFyUG9ydEZlYXR1cmUiKTsKLSAqICAgICAgICAgICAgIGlmICh3SW5kZXggIT0gMSkKLSAqICAgICAgICAgICAgIHsKLSAqICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIElOVkFMSURcbiIpOwotICogICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIHN3aXRjaCAod1ZhbHVlKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIGNhc2UgVVNCX1BPUlRfRkVBVF9FTkFCTEU6Ci0gKiAgICAgICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgRU5BQkxFIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIGxvY2FsX2lycV9zYXZlKGZsYWdzKTsKLSAqICAgICAgICAgICAgICAgICAgICAgY3ZteF91c2JfZGlzYWJsZSh1c2IpOwotICogICAgICAgICAgICAgICAgICAgICBsb2NhbF9pcnFfcmVzdG9yZShmbGFncyk7Ci0gKiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICogICAgICAgICAgICAgICAgIGNhc2UgVVNCX1BPUlRfRkVBVF9TVVNQRU5EOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIFNVU1BFTkQiKTsKLSAqICAgICAgICAgICAgICAgICAgICAgLy8gTm90IHN1cHBvcnRlZCBvbiBPY3Rlb24KLSAqICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgICAgICAgICAgY2FzZSBVU0JfUE9SVF9GRUFUX1BPV0VSOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIFBPV0VSIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIE5vdCBzdXBwb3J0ZWQgb24gT2N0ZW9uCi0gKiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICogICAgICAgICAgICAgICAgIGNhc2UgVVNCX1BPUlRfRkVBVF9JTkRJQ0FUT1I6Ci0gKiAgICAgICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgSU5ESUNBVE9SIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIFBvcnQgaW5pZGljYXRvciBub3Qgc3VwcG9ydGVkCi0gKiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICogICAgICAgICAgICAgICAgIGNhc2UgVVNCX1BPUlRfRkVBVF9DX0NPTk5FQ1RJT046Ci0gKiAgICAgICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgQ19DT05ORUNUSU9OIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIENsZWFycyBkcml2ZXJzIGludGVybmFsIGNvbm5lY3Qgc3RhdHVzIGNoYW5nZSBmbGFnCi0gKiAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX3NldF9zdGF0dXModXNiLCBjdm14X3VzYl9nZXRfc3RhdHVzKHVzYikpOwotICogICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAqICAgICAgICAgICAgICAgICBjYXNlIFVTQl9QT1JUX0ZFQVRfQ19SRVNFVDoKLSAqICAgICAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBDX1JFU0VUIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIENsZWFycyB0aGUgZHJpdmVyJ3MgaW50ZXJuYWwgUG9ydCBSZXNldCBDaGFuZ2UgZmxhZwotICogICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9zZXRfc3RhdHVzKHVzYiwgY3ZteF91c2JfZ2V0X3N0YXR1cyh1c2IpKTsKLSAqICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgICAgICAgICAgY2FzZSBVU0JfUE9SVF9GRUFUX0NfRU5BQkxFOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIENfRU5BQkxFIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIENsZWFycyB0aGUgZHJpdmVyJ3MgaW50ZXJuYWwgUG9ydCBFbmFibGUvRGlzYWJsZSBDaGFuZ2UgZmxhZwotICogICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9zZXRfc3RhdHVzKHVzYiwgY3ZteF91c2JfZ2V0X3N0YXR1cyh1c2IpKTsKLSAqICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgICAgICAgICAgY2FzZSBVU0JfUE9SVF9GRUFUX0NfU1VTUEVORDoKLSAqICAgICAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBDX1NVU1BFTkQiKTsKLSAqICAgICAgICAgICAgICAgICAgICAgLy8gQ2xlYXJzIHRoZSBkcml2ZXIncyBpbnRlcm5hbCBQb3J0IFN1c3BlbmQgQ2hhbmdlIGZsYWcsCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICB3aGljaCBpcyBzZXQgd2hlbiByZXN1bWUgc2lnbmFsaW5nIG9uIHRoZSBob3N0IHBvcnQgaXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlCi0gKiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICogICAgICAgICAgICAgICAgIGNhc2UgVVNCX1BPUlRfRkVBVF9DX09WRVJfQ1VSUkVOVDoKLSAqICAgICAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBDX09WRVJfQ1VSUkVOVCIpOwotICogICAgICAgICAgICAgICAgICAgICAvLyBDbGVhcnMgdGhlIGRyaXZlcidzIG92ZXJjdXJyZW50IENoYW5nZSBmbGFnCi0gKiAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX3NldF9zdGF0dXModXNiLCBjdm14X3VzYl9nZXRfc3RhdHVzKHVzYikpOwotICogICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAqICAgICAgICAgICAgICAgICBkZWZhdWx0OgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIFVOS05PV05cbiIpOwotICogICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAqICAgICAgICAgICAgIH0KLSAqICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCJcbiIpOwotICogICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgIGNhc2UgR2V0SHViRGVzY3JpcHRvcjoKLSAqICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCJPY3Rlb25VU0I6IEdldEh1YkRlc2NyaXB0b3JcbiIpOwotICogICAgICAgICAgICAgZGVzYyA9IChzdHJ1Y3QgdXNiX2h1Yl9kZXNjcmlwdG9yICopYnVmOwotICogICAgICAgICAgICAgZGVzYy0+YkRlc2NMZW5ndGggPSA5OwotICogICAgICAgICAgICAgZGVzYy0+YkRlc2NyaXB0b3JUeXBlID0gMHgyOTsKLSAqICAgICAgICAgICAgIGRlc2MtPmJOYnJQb3J0cyA9IDE7Ci0gKiAgICAgICAgICAgICBkZXNjLT53SHViQ2hhcmFjdGVyaXN0aWNzID0gMHgwODsKLSAqICAgICAgICAgICAgIGRlc2MtPmJQd3JPbjJQd3JHb29kID0gMTsKLSAqICAgICAgICAgICAgIGRlc2MtPmJIdWJDb250ckN1cnJlbnQgPSAwOwotICogICAgICAgICAgICAgZGVzYy0+Yml0bWFwWzBdID0gMDsKLSAqICAgICAgICAgICAgIGRlc2MtPmJpdG1hcFsxXSA9IDB4ZmY7Ci0gKiAgICAgICAgICAgICBicmVhazsKLSAqICAgICAgICAgY2FzZSBHZXRIdWJTdGF0dXM6Ci0gKiAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiT2N0ZW9uVVNCOiBHZXRIdWJTdGF0dXNcbiIpOwotICogICAgICAgICAgICAgKihfX2xlMzIgKilidWYgPSAwOwotICogICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgIGNhc2UgR2V0UG9ydFN0YXR1czoKLSAqICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCJPY3Rlb25VU0I6IEdldFBvcnRTdGF0dXMiKTsKLSAqICAgICAgICAgICAgIGlmICh3SW5kZXggIT0gMSkKLSAqICAgICAgICAgICAgIHsKLSAqICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIElOVkFMSURcbiIpOwotICogICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIHVzYl9wb3J0X3N0YXR1cyA9IGN2bXhfdXNiX2dldF9zdGF0dXModXNiKTsKLSAqICAgICAgICAgICAgIHBvcnRfc3RhdHVzID0gMDsKLSAqCi0gKiAgICAgICAgICAgICBpZiAodXNiX3BvcnRfc3RhdHVzLmNvbm5lY3RfY2hhbmdlKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIHBvcnRfc3RhdHVzIHw9ICgxIDw8IFVTQl9QT1JUX0ZFQVRfQ19DT05ORUNUSU9OKTsKLSAqICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIENfQ09OTkVDVElPTiIpOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIGlmICh1c2JfcG9ydF9zdGF0dXMucG9ydF9lbmFibGVkKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIHBvcnRfc3RhdHVzIHw9ICgxIDw8IFVTQl9QT1JUX0ZFQVRfQ19FTkFCTEUpOwotICogICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgQ19FTkFCTEUiKTsKLSAqICAgICAgICAgICAgIH0KLSAqCi0gKiAgICAgICAgICAgICBpZiAodXNiX3BvcnRfc3RhdHVzLmNvbm5lY3RlZCkKLSAqICAgICAgICAgICAgIHsKLSAqICAgICAgICAgICAgICAgICBwb3J0X3N0YXR1cyB8PSAoMSA8PCBVU0JfUE9SVF9GRUFUX0NPTk5FQ1RJT04pOwotICogICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgQ09OTkVDVElPTiIpOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIGlmICh1c2JfcG9ydF9zdGF0dXMucG9ydF9lbmFibGVkKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIHBvcnRfc3RhdHVzIHw9ICgxIDw8IFVTQl9QT1JUX0ZFQVRfRU5BQkxFKTsKLSAqICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIEVOQUJMRSIpOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIGlmICh1c2JfcG9ydF9zdGF0dXMucG9ydF9vdmVyX2N1cnJlbnQpCi0gKiAgICAgICAgICAgICB7Ci0gKiAgICAgICAgICAgICAgICAgcG9ydF9zdGF0dXMgfD0gKDEgPDwgVVNCX1BPUlRfRkVBVF9PVkVSX0NVUlJFTlQpOwotICogICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgT1ZFUl9DVVJSRU5UIik7Ci0gKiAgICAgICAgICAgICB9Ci0gKgotICogICAgICAgICAgICAgaWYgKHVzYl9wb3J0X3N0YXR1cy5wb3J0X3Bvd2VyZWQpCi0gKiAgICAgICAgICAgICB7Ci0gKiAgICAgICAgICAgICAgICAgcG9ydF9zdGF0dXMgfD0gKDEgPDwgVVNCX1BPUlRfRkVBVF9QT1dFUik7Ci0gKiAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBQT1dFUiIpOwotICogICAgICAgICAgICAgfQotICoKLSAqICAgICAgICAgICAgIGlmICh1c2JfcG9ydF9zdGF0dXMucG9ydF9zcGVlZCA9PSBDVk1YX1VTQl9TUEVFRF9ISUdIKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIHBvcnRfc3RhdHVzIHw9ICgxIDw8IFVTQl9QT1JUX0ZFQVRfSElHSFNQRUVEKTsKLSAqICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIEhJR0hTUEVFRCIpOwotICogICAgICAgICAgICAgfQotICogICAgICAgICAgICAgZWxzZSBpZiAodXNiX3BvcnRfc3RhdHVzLnBvcnRfc3BlZWQgPT0gQ1ZNWF9VU0JfU1BFRURfTE9XKQotICogICAgICAgICAgICAgewotICogICAgICAgICAgICAgICAgIHBvcnRfc3RhdHVzIHw9ICgxIDw8IFVTQl9QT1JUX0ZFQVRfTE9XU1BFRUQpOwotICogICAgICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCIgTE9XU1BFRUQiKTsKLSAqICAgICAgICAgICAgIH0KLSAqCi0gKiAgICAgICAgICAgICAqKChfX2xlMzIgKilidWYpID0gY3B1X3RvX2xlMzIocG9ydF9zdGF0dXMpOwotICogICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIlxuIik7Ci0gKiAgICAgICAgICAgICBicmVhazsKLSAqICAgICAgICAgY2FzZSBTZXRIdWJGZWF0dXJlOgotICogICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIk9jdGVvblVTQjogU2V0SHViRmVhdHVyZVxuIik7Ci0gKiAgICAgICAgICAgICAvLyBObyBIVUIgZmVhdHVyZXMgc3VwcG9ydGVkCi0gKiAgICAgICAgICAgICBicmVhazsKLSAqICAgICAgICAgY2FzZSBTZXRQb3J0RmVhdHVyZToKLSAqICAgICAgICAgICAgIERFQlVHX1JPT1RfSFVCKCJPY3Rlb25VU0I6IFNldFBvcnRGZWF0dXJlIik7Ci0gKiAgICAgICAgICAgICBpZiAod0luZGV4ICE9IDEpCi0gKiAgICAgICAgICAgICB7Ci0gKiAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBJTlZBTElEXG4iKTsKLSAqICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAqICAgICAgICAgICAgIH0KLSAqCi0gKiAgICAgICAgICAgICBzd2l0Y2ggKHdWYWx1ZSkKLSAqICAgICAgICAgICAgIHsKLSAqICAgICAgICAgICAgICAgICBjYXNlIFVTQl9QT1JUX0ZFQVRfU1VTUEVORDoKLSAqICAgICAgICAgICAgICAgICAgICAgREVCVUdfUk9PVF9IVUIoIiBTVVNQRU5EXG4iKTsKLSAqICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gKiAgICAgICAgICAgICAgICAgY2FzZSBVU0JfUE9SVF9GRUFUX1BPV0VSOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIFBPV0VSXG4iKTsKLSAqICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gKiAgICAgICAgICAgICAgICAgY2FzZSBVU0JfUE9SVF9GRUFUX1JFU0VUOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIFJFU0VUXG4iKTsKLSAqICAgICAgICAgICAgICAgICAgICAgbG9jYWxfaXJxX3NhdmUoZmxhZ3MpOwotICogICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9kaXNhYmxlKHVzYik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIGlmIChjdm14X3VzYl9lbmFibGUodXNiKSkKLSAqICAgICAgICAgICAgICAgICAgICAgICAgIERFQlVHX0VSUk9SKCJGYWlsZWQgdG8gZW5hYmxlIHRoZSBwb3J0XG4iKTsKLSAqICAgICAgICAgICAgICAgICAgICAgbG9jYWxfaXJxX3Jlc3RvcmUoZmxhZ3MpOwotICogICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKLSAqICAgICAgICAgICAgICAgICBjYXNlIFVTQl9QT1JUX0ZFQVRfSU5ESUNBVE9SOgotICogICAgICAgICAgICAgICAgICAgICBERUJVR19ST09UX0hVQigiIElORElDQVRPUlxuIik7Ci0gKiAgICAgICAgICAgICAgICAgICAgIC8vIE5vdCBzdXBwb3J0ZWQKLSAqICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gKiAgICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAqICAgICAgICAgICAgICAgICAg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RhdHVzIHBhcmFtZXRlciB3aWxsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbiBkZXRhaWxzIG9mIHdoeSBoZSBjYWxsYmFjayB3YXMgY2FsbGVkLiAqLwotICAgIENWTVhfVVNCX0NBTExCQUNLX1BPUlRfQ0hBTkdFRCwgLyoqPCBUaGUgc3RhdHVzIG9mIHRoZSBwb3J0IGNoYW5nZWQuIEZvciBleGFtcGxlLCBzb21lb25lIG1heSBoYXZlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGx1Z2dlZCBhIGRldmljZSBpbi4gVGhlIHN0YXR1cyBwYXJhbWV0ZXIgY29udGFpbnMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDVk1YX1VTQl9DT01QTEVURV9TVUNDRVNTLiBVc2UgY3ZteF91c2JfZ2V0X3N0YXR1cygpIHRvIGdldAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBuZXcgcG9ydCBzdGF0dXMuICovCi0gICAgX19DVk1YX1VTQl9DQUxMQkFDS19FTkQgICAgICAgICAvKio8IERvIG5vdCB1c2UuIFVzZWQgaW50ZXJuYWxseSBmb3IgYXJyYXkgYm91bmRzICovCi19IGN2bXhfdXNiX2NhbGxiYWNrX3Q7CitlbnVtIGN2bXhfdXNiX2NhbGxiYWNrIHsKKwlDVk1YX1VTQl9DQUxMQkFDS19UUkFOU0ZFUl9DT01QTEVURSwKKwlDVk1YX1VTQl9DQUxMQkFDS19QT1JUX0NIQU5HRUQsCisJX19DVk1YX1VTQl9DQUxMQkFDS19FTkQKK307CiAKIC8qKgogICogVVNCIHN0YXRlIGludGVybmFsIGRhdGEuIFRoZSBjb250ZW50cyBvZiB0aGlzIHN0cnVjdHVyZQogICogbWF5IGNoYW5nZSBpbiBmdXR1cmUgU0RLcy4gTm8gZGF0YSBpbiBpdCBzaG91bGQgYmUgcmVmZXJlbmNl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GEgPSBUaGUgdXNlciBwb2ludGVyIHN1cHBsaWVkIHRvIHRoZQogICogICAgICAgIGZ1bmN0aW9uIGN2bXhfdXNiX3N1Ym1pdCgpIG9yCiAgKiAgICAgICAgY3ZteF91c2JfcmVnaXN0ZXJfY2FsbGJhY2soKSAqLwotdHlwZWRlZiB2b2lkICgqY3ZteF91c2JfY2FsbGJhY2tfZnVuY190KShjdm14X3VzYl9zdGF0ZV90ICpzdGF0ZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3ZteF91c2JfY2FsbGJhY2tfdCByZWFzb24sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2NvbXBsZXRlX3Qgc3RhdHVzLAordHlwZWRlZiB2b2lkICgqY3ZteF91c2JfY2FsbGJhY2tfZnVuY190KShzdHJ1Y3QgY3ZteF91c2Jfc3RhdGUgKnN0YXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGN2bXhfdXNiX2NhbGxiYWNrIHJlYXNvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBjdm14X3VzYl9jb21wbGV0ZSBzdGF0dXMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBwaXBlX2hhbmRsZSwgaW50IHN1Ym1pdF9oYW5kbGUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBieXRlc190cmFuc2ZlcnJlZCwgdm9pZCAqdXNlcl9kYXRhKTsKIAogLyoqCi0gKiBGbGFncyB0byBwYXNzIHRoZSBpbml0aWFsaXphdGlvbiBmdW5jdGlvbi4KLSAqLwotdHlwZWRlZiBlbnVtCi17Ci0gICAgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19DTE9DS19YT19YSSA9IDE8PDAsICAgICAgIC8qKjwgVGhlIFVTQiBwb3J0IHVzZXMgYSAxMk1IeiBjcnlzdGFsIGFzIGNsb2NrIHNvdXJjZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXQgVVNCX1hPIGFuZCBVU0JfWEkuICovCi0gICAgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19DTE9DS19YT19HTkQgPSAxPDwxLCAgICAgIC8qKjwgVGhlIFVTQiBwb3J0IHVzZXMgMTIvMjQvNDhNSHogMi41ViBib2FyZCBjbG9jawotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlIGF0IFVTQl9YTy4gVVNCX1hJIHNob3VsZCBiZSB0aWVkIHRvIEdORC4qLwotICAgIENWTVhfVVNCX0lOSVRJQUxJWkVfRkxBR1NfQ0xPQ0tfQVVUTyA9IDAsICAgICAgICAgICAvKio8IEF1dG9tYXRpY2FsbHkgZGV0ZXJtaW5lIGNsb2NrIHR5cGUgYmFzZWQgb24gZnVuY3Rpb24KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBjdm14LWhlbHBlci1ib2FyZC5jLiAqLwotICAgIENWTVhfVVNCX0lOSVRJQUxJWkVfRkxBR1NfQ0xPQ0tfTUhaX01BU0sgID0gMzw8MywgICAgICAgLyoqPCBNYXNrIGZvciBjbG9jayBzcGVlZCBmaWVsZCAqLwotICAgIENWTVhfVVNCX0lOSVRJQUxJWkVfRkxBR1NfQ0xPQ0tfMTJNSFogPSAxPDwzLCAgICAgICAvKio8IFNwZWVkIG9mIHJlZmVyZW5jZSBjbG9jayBvciBjcnlzdGFsICovCi0gICAgQ1ZNWF9VU0JfSU5JVElBTElaRV9GTEFHU19DTE9DS18yNE1IWiA9IDI8PDMsICAgICAgIC8qKjwgU3BlZWQgb2YgcmVmZXJlbmNlIGNsb2NrICovCi0gICAgQ1ZNWF9VU0JfSU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Gl6YXRpb24uIFNlZQotICogICAgICAgICAgICAgICBjdm14X3VzYl9pbml0aWFsaXplX2ZsYWdzX3QgZm9yIHRoZSBmbGFnCi0gKiAgICAgICAgICAgICAgIGRlZmluaXRpb25zLiBTb21lIGZsYWdzIGFyZSBtYW5kYXRvcnkuCi0gKgotICogQHJldHVybiBDVk1YX1VTQl9TVUNDRVNTIG9yIGEgbmVnYXRpdmUgZXJyb3IgY29kZSBkZWZpbmVkIGluCi0gKiAgICAgICAgIGN2bXhfdXNiX3N0YXR1c190LgotICovCi1leHRlcm4gY3ZteF91c2Jfc3RhdHVzX3QgY3ZteF91c2JfaW5pdGlhbGl6ZShjdm14X3VzYl9zdGF0ZV90ICpzdGF0ZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB1c2JfcG9ydF9udW1iZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9pbml0aWFsaXplX2ZsYWdzX3QgZmxhZ3MpOwotCi0vKioKLSAqIFNodXRkb3duIGEgVVNCIHBvcnQgYWZ0ZXIgYSBjYWxsIHRvIGN2bXhfdXNiX2luaXRpYWxpemUoKS4KLSAqIFRoZSBwb3J0IHNob3VsZCBiZSBkaXNhYmxlZCB3aXRoIGFsbCBwaXBlcyBjbG9zZWQgd2hlbiB0aGlzCi0gKiBmdW5jdGlvbiBpcyBjYWxsZWQuCi0gKgotICogQHBhcmFtIHN0YXRlICBVU0IgZGV2aWNlIHN0YXRlIHBvcHVsYXRlZCBieQotICogICAgICAgICAgICAgICBjdm14X3VzYl9pbml0aWFsaXplKCkuCi0gKgotICogQHJldHVybiBDVk1YX1VTQl9TVUNDRVNTIG9yIGEgbmVnYXRpdmUgZXJyb3IgY29kZSBkZWZpbmVkIGluCi0gKiAgICAgICAgIGN2bXhfdXNiX3N0YXR1c190LgotICovCi1leHRlcm4gY3ZteF91c2Jfc3RhdHVzX3QgY3ZteF91c2Jf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B0aW9uYWwgcGlwZSBmbGFncyBkZWZpbmVkIGluCi0gKiAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9waXBlX2ZsYWdzX3QuCi0gKiBAcGFyYW0gZGV2aWNlX2FkZHIKLSAqICAgICAgICAgICAgICAgICAgIFVTQiBkZXZpY2UgYWRkcmVzcyB0byBvcGVuIHRoZSBwaXBlIHRvCi0gKiAgICAgICAgICAgICAgICAgICAoMC0xMjcpLgotICogQHBhcmFtIGVuZHBvaW50X251bQotICogICAgICAgICAgICAgICAgICAgVVNCIGVuZHBvaW50IG51bWJlciB0byBvcGVuIHRoZSBwaXBlIHRvCi0gKiAgICAgICAgICAgICAgICAgICAoMC0xNSkuCi0gKiBAcGFyYW0gZGV2aWNlX3NwZWVkCi0gKiAgICAgICAgICAgICAgICAgICBUaGUgc3BlZWQgb2YgdGhlIGRldmljZSB0aGUgcGlwZSBpcyBnb2luZwotICogICAgICAgICAgICAgICAgICAgdG8uIFRoaXMgbXVzdCBtYXRjaCB0aGUgZGV2aWNlJ3Mgc3BlZWQsCi0gKiAgICAgICAgICAgICAgICAgICB3aGljaCBtYXkgYmUgZGlmZmVyZW50IHRoYW4gdGhlIHBvcnQgc3BlZWQuCi0gKiBAcGFyYW0gbWF4X3BhY2tldCBUaGUgbWF4aW11bSBwYWNrZXQgbGVuZ3RoIHRoZSBkZXZpY2UgY2FuCi0gKiAgICAgICAgICAgICAgICAgICB0cmFuc21pdC9yZWNlaXZlIChsb3cgc3BlZWQ9MC04LCBmdWxsCi0gKiAgICAgICAgICAgICAgICAgICBzcGVlZD0wLTEwMjMsIGhpZ2ggc3BlZWQ9MC0xMDI0KS4gVGhpcyB2YWx1ZQotICogICAgICAgICAgICAgICAgICAgY29tZXMgZnJvbSB0aGUgc3RhbmRhcmQgZW5kcG9pbnQgZGVzY3JpcHRvcgotICogICAgICAgICAgICAgICAgICAgZmllbGQgd01heFBhY2tldFNpemUgYml0cyA8MTA6MD4uCi0gKiBAcGFyYW0gdHJhbnNmZXJfdHlwZQotICogICAgICAgICAgICAgICAgICAgVGhlIHR5cGUgb2YgdHJhbnNmZXIgdGhpcyBwaXBlIGlzIGZvci4KLSAqIEBwYXJhbSB0cmFuc2Zlcl9kaXIKLSAqICAgICAgICAgICAgICAgICAgIFRoZSBkaXJlY3Rpb24gdGhlIHBpcGUgaXMgaW4uIFRoaXMgaXMgbm90Ci0gKiAgICAgICAgICAgICAgICAgICB1c2VkIGZvciBjb250cm9sIHBpcGVzLgotICogQHBhcmFtIGludGVydmFsICAgRm9yIElTT0NIUk9OT1VTIGFuZCBJTlRFUlJVUFQgdHJhbnNmZXJzLAotICogICAgICAgICAgICAgICAgICAgdGhpcyBpcyBob3cgb2Z0ZW4gdGhlIHRyYW5zZmVyIGlzIHNjaGVkdWxlZAotICogICAgICAgICAgICAgICAgICAgZm9yLiBBbGwgb3RoZXIgdHJhbnNmZXJzIHNob3VsZCBzcGVjaWZ5Ci0gKiAgICAgICAgICAgICAgICAgICB6ZXJvLiBUaGUgdW5pdHMgYXJlIGluIGZyYW1lcyAoODAwMC9zZWMgYXQKLSAqICAgICAgICAgICAgICAgICAgIGhpZ2ggc3BlZWQsIDEwMDAvc2VjIGZvciBmdWxsIHNwZWVkKS4KLSAqIEBwYXJhbSBtdWx0aV9jb3VudAotICogICAgICAgICAgICAgICAgICAgRm9yIGhpZ2ggc3BlZWQgZGV2aWNlcywgdGhpcyBpcyB0aGUgbWF4aW11bQotICogICAgICAgICAgICAgICAgICAgYWxsb3dlZCBudW1iZXIgb2YgcGFja2V0IHBlciBtaWNyb2ZyYW1lLgotICogICAgICAgICAgICAgICAgICAgU3BlY2lmeSB6ZXJvIGZvciBub24gaGlnaCBzcGVlZCBkZXZpY2VzLiBUaGlzCi0gKiAgICAgICAgICAgICAgICAgICB2YWx1ZSBjb21lcyBmcm9tIHRoZSBzdGFuZGFyZCBlbmRwb2ludCBkZXNjcmlwdG9yCi0gKiAgICAgICAgICAgICAgICAgICBmaWVsZCB3TWF4UGFja2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GVuZHBvaW50X251bSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX3NwZWVkX3QgZGV2aWNlX3NwZWVkLCBpbnQgbWF4X3BhY2tldCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX3RyYW5zZmVyX3QgdHJhbnNmZXJfdHlwZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2RpcmVjdGlvbl90IHRyYW5zZmVyX2RpciwgaW50IGludGVydmFsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBjdm14X3VzYl9zcGVlZCBkZXZpY2Vfc3BlZWQsIGludCBtYXhfcGFja2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBjdm14X3VzYl90cmFuc2ZlciB0cmFuc2Zlcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBjdm14X3VzYl9kaXJlY3Rpb24gdHJhbnNmZXJfZGlyLCBpbnQgaW50ZXJ2YWwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbXVsdGlfY291bnQsIGludCBodWJfZGV2aWNlX2FkZHIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHViX3BvcnQpOwotCi0vKioKLSAqIENhbGwgdG8gc3VibWl0IGEgVVNCIEJ1bGsgdHJhbnNmZXIgdG8gYSBwaXBlLgotICoKLSAqIEBwYXJhbSBzdGF0ZSAgICAgVVNCIGRldmljZSBzdGF0ZSBwb3B1bGF0ZWQgYnkKLSAqICAgICAgICAgICAgICAgICAgY3ZteF91c2JfaW5pdGlhbGl6ZSgpLgotICogQHBhcmFtIHBpcGVfaGFuZGxlCi0gKiAgICAgICAgICAgICAgICAgIEhhbmRsZSB0byB0aGUgcGlwZSBmb3IgdGhlIHRyYW5zZmVyLgotICogQHBhcmFtIGJ1ZmZlciAgICBQaHlzaWNhbCBhZGRyZXNzIG9mIHRoZSBkYXRhIGJ1ZmZlciBpbgotICogICAgICAgICAgICAgICAgICBtZW1vcnkuIE5vdGUgdGhhdCB0aGlzIGlzIE5PVCBBIFBPSU5URVIsIGJ1dAotICogICAgICAgICAgICAgICAgICB0aGUgZnVsbCA2NGJpdCBwaHlzaWNhbCBhZGRyZXNzIG9mIHRoZQotICogICAgICAgICAgICAgICAgICBidWZmZXIuIFRoaXMgbWF5IGJlIHplcm8gaWYgYnVmZmVyX2xlbmd0aCBpcwotICogICAgICAgICAgICAgICAgICB6ZXJvLgotICogQHBhcmFtIGJ1ZmZlcl9sZW5ndGgKLSAqICAgICAgICAgICAgICAgICAgTGVuZ3RoIG9mIGJ1ZmZlciBpbiBieXRlcy4KLSAqIEBwYXJhbSBjYWxsYmFjayAgRnVuY3Rpb24gdG8gY2FsbCB3aGVuIHRoaXMgdHJhbnNhY3Rpb24KLSAqICAgICAgICAgICAgICAgICAgY29tcGxldGVzLiBJZiB0aGUgcmV0dXJuIHZhbHVlIG9mIHRoaXMKLSAqICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gaXNuJ3QgYW4gZXJyb3IsIHRoZW4gdGhpcyBmdW5jdGlvbgotICogICAgICAgICAgICAgICAgICBpcyBndWFyYW50ZWVkIHRvIGJlIGNhbGxlZCB3aGVuIHRoZQotICogICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbiBjb21wbGV0ZXMuIElmIHRoaXMgcGFyYW1ldGVyIGlzCi0gKiAgICAgICAgICAgICAgICAgIE5VTEwsIHRoZW4gdGhlIGdlbmVyaWMgY2FsbGJhY2sgcmVnaXN0ZXJlZAotICogICAgICAgICAgICAgICAgICB0aHJvdWdoIGN2bXhfdXNiX3JlZ2lzdGVyX2NhbGxiYWNrIGlzCi0gKiAgICAgICAgICAgICAgICAgIGNhbGxlZC4gSWYgYm90aCBhcmUgTlVMTCwgdGhlbiB0aGVyZSBpcyBubwotICogICAgICAgICAgICAgICAgICB3YXkgdG8ga25vdyB3aGVuIGEgd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R1bGUKLSAqICAgICAgICAgICAgICAgICAgdGhpcyB0cmFuc2FjdGlvbi4KLSAqIEBwYXJhbSBmbGFncyAgICAgRmxhZ3MgdG8gY29udHJvbCB0aGUgdHJhbnNmZXIuIFNlZQotICogICAgICAgICAgICAgICAgICBjdm14X3VzYl9pc29jaHJvbm91c19mbGFnc190IGZvciB0aGUgZmxhZwotICogICAgICAgICAgICAgICAgICBkZWZpbml0aW9ucy4KLSAqIEBwYXJhbSBudW1iZXJfcGFja2V0cwotICogICAgICAgICAgICAgICAgICBOdW1iZXIgb2Ygc2VxdWVudGlhbCBwYWNrZXRzIHRvIHRyYW5zZmVyLgotICogICAgICAgICAgICAgICAgICAicGFja2V0cyIgaXMgYSBwb2ludGVyIHRvIGFuIGFycmF5IG9mIHRoaXMKLSAqICAgICAgICAgICAgICAgICAgbWFueSBwYWNrZXQgc3RydWN0dXJlcy4KLSAqIEBwYXJhbSBwYWNrZXRzICAgRGVzY3JpcHRpb24gb2YgZWFjaCB0cmFuc2ZlciBwYWNrZXQgYXMKLSAqICAgICAgICAgICAgICAgICAgZGVmaW5lZCBieSBjdm14X3VzYl9pc29fcGFja2V0X3QuIFRoZSBhcnJheQotICogICAgICAgICAgICAgICAgICBwb2ludGVkIHRvIGhlcmUgbXVzdCBzdGF5IHZhbGlkIHVudGlsIHRoZQotICogICAgICAgICAgICAgICAgICBjb21wbGV0ZSBjYWxsYmFjayBpcyBjYWxsZWQuCi0gKiBAcGFyYW0gYnVmZmVyICAgIFBoeXNpY2FsIGFkZHJlc3Mgb2YgdGhlIGRhdGEgYnVmZmVyIGluCi0gKiAgICAgICAgICAgICAgICAgIG1lbW9yeS4gTm90ZSB0aGF0IHRoaXMgaXMgTk9UIEEgUE9JTlRFUiwgYnV0Ci0gKiAgICAgICAgICAgICAgICAgIHRoZSBmdWxsIDY0Yml0IHBoeXNpY2FsIGFkZHJlc3Mgb2YgdGhlCi0gKiAgICAgICAgICAgICAgICAgIGJ1ZmZlci4gVGhpcyBt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dCBOVUxMLgotICoKLSAqIEByZXR1cm4gQSBzdWJtaXR0ZWQgdHJhbnNhY3Rpb24gaGFuZGxlIG9yIG5lZ2F0aXZlIG9uCi0gKiAgICAgICAgIGZhaWx1cmUuIE5lZ2F0aXZlIHZhbHVlcyBhcmUgZmFpbHVyZSBjb2RlcyBmcm9tCi0gKiAgICAgICAgIGN2bXhfdXNiX3N0YXR1c190LgotICovCi1leHRlcm4gaW50IGN2bXhfdXNiX3N1Ym1pdF9pc29jaHJvbm91cyhjdm14X3VzYl9zdGF0ZV90ICpzdGF0ZSwgaW50IHBpcGVfaGFuZGxlLAorZXh0ZXJuIGludCBjdm14X3VzYl9zdWJtaXRfaXNvY2hyb25vdXMoc3RydWN0IGN2bXhfdXNiX3N0YXRlICpzdGF0ZSwgaW50IHBpcGVfaGFuZGxlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHN0YXJ0X2ZyYW1lLCBpbnQgZmxhZ3MsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbnVtYmVyX3BhY2tldHMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdm14X3VzYl9pc29fcGFja2V0X3QgcGFja2V0c1tdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGN2bXhfdXNiX2lzb19wYWNrZXQgcGFja2V0c1tdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWludDY0X3QgYnVmZmVyLCBpbnQgYnVmZmVyX2xlbmd0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN2bXhfdXNiX2NhbGxiYWNrX2Z1bmNfdCBjYWxsYmFjaywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvaWQgKnVzZXJfZGF0YSk7Ci0KLS8qKgotICogQ2FuY2VsIG9uZSBvdXRzdGFuZGluZyByZXF1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IGNvdW50IC0gbGVuLCAiIDB4JTA4eCAiLCBydHdfcmVhZDMyKHBhZGFwdGVyLCBpKSk7CisJCWlmICgoaisrKSU0ID09IDApCisJCQlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sICJcbiIpOworCX0KKworCSplb2YgPSAxOworCXJldHVybiBsZW47Cit9CisKK2ludCBwcm9jX2dldF9tYWNfcmVnX2R1bXAyKGNoYXIgKnBhZ2UsIGNoYXIgKipzdGFydCwKKwkJCSAgb2ZmX3Qgb2Zmc2V0LCBpbnQgY291bnQsCisJCQkgIGludCAqZW9mLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBkYXRhOworCXN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciA9IChzdHJ1Y3QgYWRhcHRlciAqKXJ0d19uZXRkZXZfcHJpdihkZXYpOworCWludCBsZW4gPSAwOworCWludCBpLCBqID0gMTsKKworCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuPT09PT09PSBNQUMgUkVHID09PT09PT1cbiIpOworCW1lbXNldChwYWdlLCAwLCBjb3VudCk7CisJZm9yIChpID0gMHgzMDA7IGkgPCAweDYwMDsgaSArPSA0KSB7CisJCWlmIChqJTQgPT0gMSkKKwkJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIjB4JTAyeCIsIGkpOworCQlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sICIgMHglMDh4ICIsIHJ0d19yZWFkMzIocGFkYXB0ZXIsIGkpKTsKKwkJaWYgKChqKyspJTQgPT0gMCkKKwkJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuIik7CisJfQorCisJKmVvZiA9IDE7CisJcmV0dXJuIGxlbjsKK30KKworaW50IHByb2NfZ2V0X21hY19yZWdfZHVtcDMoY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gPSAwOworCWludCBpLCBqID0gMTsKKworCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuPT09PT09PSBCQiBSRUcgPT09PT09PVxuIik7CisJZm9yIChpID0gMHg4MDA7IGkgPCAweEIwMDsgaSArPSA0KSB7CisJCWlmIChqJTQgPT0gMSkKKwkJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIjB4JTAyeCIsIGkpOworCQlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sICIgMHglMDh4ICIsIHJ0d19yZWFkMzIocGFkYXB0ZXIsIGkpKTsKKwkJaWYgKChqKyspJTQgPT0gMCkKKwkJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuIik7CisJfQorCSplb2YgPSAxOworCXJldHVybiBsZW47Cit9CisKK2ludCBwcm9jX2dldF9iYl9yZWdfZHVtcDIoY2hhciAqcGFnZSwgY2hhciAqKnN0YXJ0LAorCQkJICBvZmZfdCBvZmZzZXQsIGludCBjb3VudCwKKwkJCSAgaW50ICplb2YsIHZvaWQgKmRhdGEpCit7CisJc3RydWN0IG5ldF9kZXZpY2UgKmRldiA9IGRhdGE7CisJc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyID0gKHN0cnVjdCBhZGFwdGVyICopcnR3X25ldGRldl9wcml2KGRldik7CisJaW50IGxlbiA9IDA7CisJaW50IGksIGogPSAxOworCisJbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLCAiXG49PT09PT09IEJCIFJFRyA9PT09PT09XG4iKTsKKwlmb3IgKGkgPSAweEIwMDsgaSA8IDB4RTAwOyBpICs9IDQpIHsKKwkJaWYgKGolNCA9PSAxKQorCQkJbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLCAiMHglMDJ4IiwgaSk7CisJCW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dHJ1Y3QgYWRhcHRlciAqKXJ0d19uZXRkZXZfcHJpdihkZXYpOworCWludCBsZW4gPSAwOworCWludCBpLCBqID0gMSwgcGF0aDsKKwl1MzIgdmFsdWU7CisKKwlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sICJcbj09PT09PT0gUkYgUkVHID09PT09PT1cbiIpOworCXBhdGggPSAyOworCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuUkZfUGF0aCgleClcbiIsIHBhdGgpOworCWZvciAoaSA9IDB4QzA7IGkgPCAweDEwMDsgaSsrKSB7CisJCXZhbHVlID0gcnR3X2hhbF9yZWFkX3JmcmVnKHBhZGFwdGVyLCBwYXRoLCBpLCAweGZmZmZmZmZmKTsKKwkJaWYgKGolNCA9PSAxKQorCQkJbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLCAiMHglMDJ4ICIsIGkpOworCQlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sICIgMHglMDh4ICIsIHZhbHVlKTsKKwkJaWYgKChqKyspJTQgPT0gMCkKKwkJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwgIlxuIik7CisJfQorCSplb2YgPSAxOworCXJldHVybiBsZW47Cit9CisKKworCitpbnQgcHJvY19nZXRfcnhfc2lnbmFsKGNoYXIgKnBhZ2UsIGNoYXIgKipzdGFydCwKKwkJCSAgb2ZmX3Qgb2Zmc2V0LCBpbnQgY291bnQsCisJCQkgIGludCAqZW9mLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBkYXRhOworCXN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciA9IChzdHJ1Y3QgYWRhcHRlciAqKXJ0d19uZXRkZXZfcHJpdihkZXYpOworCWludCBsZW4gPSAwOworCisJbGVuID0gc25wcmludGYocGF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pbl9pZVtjbnQrMV0rMik7IGkgKz0gOCkgeworCQkJCQkJUlRfVFJBQ0UoX21vZHVsZV9ydGw4NzF4X21sbWVfY18sIF9kcnZfaW5mb18sCisJCQkJCQkJICgiXG4gJTJ4LCUyeCwlMngsJTJ4LCUyeCwlMngsJTJ4LCUyeFxuIiwKKwkJCQkJCQkgcnNuX2llW2ldLCByc25faWVbaSsxXSwgcnNuX2llW2krMl0sIHJzbl9pZVtpKzNdLCByc25faWVbaSs0XSwKKwkJCQkJCQkgcnNuX2llW2krNV0sIHJzbl9pZVtpKzZdLCByc25faWVbaSs3XSkpOworCQkJCQkJfQorCQkJCX0KKworCQkJCSpyc25fbGVuID0gaW5faWVbY250KzFdKzI7CisJCQkJY250ICs9IGluX2llW2NudCsxXSsyOyAgLyogZ2V0IG5leHQgKi8KKwkJCX0gZWxzZSB7CisJCQkJY250ICs9IGluX2llW2NudCsxXSsyOyAgIC8qIGdldCBuZXh0ICovCisJCQl9CisJCX0KKwl9CisKK19mdW5jX2V4aXRfOworCisJcmV0dXJuICpyc25fbGVuICsgKndwYV9sZW47Cit9CisKK3U4IHJ0d19pc193cHNfaWUodTggKmllX3B0ciwgdWludCAqd3BzX2llbGVuKQoreworCXU4IG1hdGNoID0gZmFsc2U7CisJdTggZWlkLCB3cHNfb3VpWzRdID0gezB4MCwgMHg1MCwgMHhmMiwgMHgwNH07CisKKwlpZiAoaWVfcHRyID09IE5VTEwpCisJCXJldHVybiBtYXRjaDsKKworCWVpZCA9IGllX3B0clswXTsKKworCWlmICgoZWlkID09IF9XUEFfSUVfSURfKSAmJiAoX3J0d19tZW1jbXAoJmllX3B0clsyXSwgd3BzX291aSwgNCkpKSB7CisJCSp3cHNfaWVsZW4gPSBpZV9wdHJbMV0rMjsKKwkJbWF0Y2ggPSB0cnVlOworCX0KKwlyZXR1cm4gbWF0Y2g7Cit9CisKKy8qKgorICogcnR3X2dldF93cHNfaWUgLSBTZWFyY2ggV1BTIElFIGZyb20gYSBzZXJpZXMgb2YgSUVzCisgKiBAaW5faWU6IEFkZHJlc3Mgb2YgSUVzIHRvIHNlYXJjaAorICogQGluX2xlbjogTGVuZ3RoIGxpbWl0IGZyb20gaW5faWUKKyAqIEB3cHNfaWU6IElmIG5vdCBOVUxMIGFuZCBXUFMgSUUgaXMgZm91bmQsIFdQUyBJRSB3aWxsIGJlIGNvcGllZCB0byB0aGUgYnVmIHN0YXJ0aW5nIGZyb20gd3BzX2llCisgKiBAd3BzX2llbGVuOiBJZiBub3QgTlVMTCBhbmQgV1BTIElFIGlzIGZvdW5kLCB3aWxsIHNldCB0byB0aGUgbGVuZ3RoIG9mIHRoZSBlbnRpcmUgV1BTIElFCisgKgorICogUmV0dXJuczogVGhlIGFkZHJlc3Mgb2YgdGhlIFdQUyBJRSBmb3VuZCwgb3IgTlVMTAorICovCit1OCAqcnR3X2dldF93cHNfaWUodTggKmluX2llLCB1aW50IGluX2xlbiwgdTggKndwc19pZSwgdWludCAqd3BzX2llbGVuKQoreworCXVpbnQgY250OworCXU4ICp3cHNpZV9wdHIgPSBOVUxMOworCXU4IGVpZCwgd3BzX291aVs0XSA9IHsweDAsIDB4NTAsIDB4ZjIsIDB4MDR9OworCisJaWYgKHdwc19pZWxlbikKKwkJKndwc19pZWxlbiA9IDA7CisKKwlpZiAoIWluX2llIHx8IGluX2xlbiA8PSAwKQorCQlyZXR1cm4gd3BzaWVfcHRyOworCisJY250ID0gMDsKKworCXdoaWxlIChjbnQgPCBpbl9sZW4pIHsKKwkJZWlkID0gaW5faWVbY250XTsKKworCQlpZiAoKGVpZCA9PSBfV1BBX0lFX0lEXykgJiYgKF9ydHdfbWVtY21wKCZpbl9pZVtjbnQrMl0sIHdwc19vdWksIDQpKSkgeworCQkJd3BzaWVfcHRyID0gJmluX2llW2NudF07CisKKwkJCWlmICh3cHNfaWUpCisJCQkJbWVtY3B5KHdwc19pZSwgJmluX2llW2NudF0sIGluX2llW2NudCsxXSsyKTsKKworCQkJaWYgKHdwc19pZWxlbikKK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llLCB1MzIgaWVfbGVuKQoreworCXU4ICpwb3MgPSAodTggKilpZTsKKwl1MTYgaWQ7CisJdTE2IGxlbjsKKwl1OCAqd3BzX2llOworCXVpbnQgd3BzX2llbGVuOworCisJd3BzX2llID0gcnR3X2dldF93cHNfaWUoaWUsIGllX2xlbiwgTlVMTCwgJndwc19pZWxlbik7CisJaWYgKHdwc19pZSAhPSBpZSB8fCB3cHNfaWVsZW4gPT0gMCkKKwkJcmV0dXJuOworCisJcG9zICs9IDY7CisJd2hpbGUgKHBvcy1pZSA8IGllX2xlbikgeworCQlpZCA9IFJUV19HRVRfQkUxNihwb3MpOworCQlsZW4gPSBSVFdfR0VUX0JFMTYocG9zICsgMik7CisJCURCR184OEUoIiVzIElEOjB4JTA0eCwgTEVOOiV1XG4iLCBfX2Z1bmNfXywgaWQsIGxlbik7CisJCXBvcyArPSAoNCtsZW4pOworCX0KK30KKworI2lmZGVmIENPTkZJR184OEVVX1AyUAordm9pZCBkdW1wX3AycF9pZSh1OCAqaWUsIHUzMiBpZV9sZW4pCit7CisJdTggKnBvcyA9ICh1OCAqKWllOworCXU4IGlkOworCXUxNiBsZW47CisJdTggKnAycF9pZTsKKwl1aW50IHAycF9pZWxlbjsKKworCXAycF9pZSA9IHJ0d19nZXRfcDJwX2llKGllLCBpZV9sZW4sIE5VTEwsICZwMnBfaWVsZW4pOworCWlmIChwMnBfaWUgIT0gaWUgfHwgcDJwX2llbGVuID09IDApCisJCXJldHVybjsKKworCXBvcyArPSA2OworCXdoaWxlIChwb3MtaWUgPCBpZV9sZW4pIHsKKwkJaWQgPSAqcG9zOworCQlsZW4gPSBSVFdfR0VUX0xFMTYocG9zKzEpOworCQlEQkdfODhFKCIlcyBJRDoldSwgTEVOOiV1XG4iLCBfX2Z1bmNfXywgaWQsIGxlbik7CisJCXBvcyArPSAoMytsZW4pOworCX0KK30KKworLyoqCisgKiBydHdfZ2V0X3AycF9pZSAtIFNlYXJjaCBQMlAgSUUgZnJvbSBhIHNlcmll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NfZXhpdF87CisJcmV0dXJuOworfQorCit1OCAqcnR3X2dldF9jYXBhYmlsaXR5X2Zyb21faWUodTggKmllKQoreworCXJldHVybiBpZSArIDggKyAyOworfQorCisKK3UxNiBydHdfZ2V0X2NhcGFiaWxpdHkoc3RydWN0IHdsYW5fYnNzaWRfZXggKmJzcykKK3sKKwlfX2xlMTYJdmFsOworX2Z1bmNfZW50ZXJfOworCisJbWVtY3B5KCh1OCAqKSZ2YWwsIHJ0d19nZXRfY2FwYWJpbGl0eV9mcm9tX2llKGJzcy0+SUVzKSwgMik7CisKK19mdW5jX2V4aXRfOworCXJldHVybiBsZTE2X3RvX2NwdSh2YWwpOworfQorCit1OCAqcnR3X2dldF90aW1lc3RhbXBlX2Zyb21faWUodTggKmllKQoreworCXJldHVybiBpZSArIDA7Cit9CisKK3U4ICpydHdfZ2V0X2JlYWNvbl9pbnRlcnZhbF9mcm9tX2llKHU4ICppZSkKK3sKKwlyZXR1cm4gaWUgKyA4OworfQorCitpbnQJcnR3X2luaXRfbWxtZV9wcml2IChzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIpLyogc3RydWN0CW1sbWVfcHJpdiAqcG1sbWVwcml2KSAqLworeworCWludAlyZXM7CitfZnVuY19lbnRlcl87CisJcmVzID0gX3J0d19pbml0X21sbWVfcHJpdihwYWRhcHRlcik7LyogIChwbWxtZXByaXYpOyAqLworX2Z1bmNfZXhpdF87CisJcmV0dXJuIHJlczsKK30KKwordm9pZCBydHdfZnJlZV9tbG1lX3ByaXYgKHN0cnVjdCBtbG1lX3ByaXYgKnBtbG1lcHJpdikKK3sKK19mdW5jX2VudGVyXzsKKwlSVF9UUkFDRShfbW9kdWxlX3J0bDg3MXhfbWxtZV9jXywgX2Rydl9lcnJfLCAoInJ0d19mcmVlX21sbWVfcHJpdlxuIikpOworCV9ydHdfZnJlZV9tbG1lX3ByaXYgKHBtbG1lcHJpdik7CitfZnVuY19leGl0XzsKK30KKworc3RhdGljIHN0cnVjdCB3bG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7MHgwMCwgMHg1MCwgMHhmMiwgMHgwMn07Cit1bnNpZ25lZCBjaGFyIFJTTl9US0lQX0NJUEhFUls0XSA9IHsweDAwLCAweDBmLCAweGFjLCAweDAyfTsKKworZXh0ZXJuIHVuc2lnbmVkIGNoYXIgUkVBTFRFS185NkJfSUVbXTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCitNQ1MgcmF0ZSBkZWZpbml0aW9ucworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgY2hhcglNQ1NfcmF0ZV8yUlsxNl0gPSB7MHhmZiwgMHhmZiwgMHgwLCAweDAsIDB4MDEsIDB4MCwgMHgwLCAweDAsIDB4MCwgMHgwLCAweDAsIDB4MCwgMHgwLCAweDAsIDB4MCwgMHgwfTsKK3Vuc2lnbmVkIGNoYXIJTUNTX3JhdGVfMVJbMTZdID0gezB4ZmYsIDB4MDAsIDB4MCwgMHgwLCAweDAxLCAweDAsIDB4MCwgMHgwLCAweDAsIDB4MCwgMHgwLCAweDAsIDB4MCwgMHgwLCAweDAsIDB4MH07CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorQ2hhbm5lbFBsYW4gZGVmaW5pdGlvbnMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcnRfY2hhbm5lbF9wbGFuXzJnIFJUV19DaGFubmVsUGxhbjJHW1JUX0NIQU5ORUxfRE9NQUlOXzJHX01BWF0gPSB7CisJe3sxLCAyLCAzLCA0LCA1LCA2LCA3LCA4LCA5LCAxMCwgMTEsIDEyLCAxM30sIDEzfSwJCS8qICAweDAwLCBSVF9DSEFOTkVMX0RPTUFJTl8yR19XT1JMRCAsIFBhc3NpdmUgc2NhbiBDSCAxM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iwgV0lGSV9BUF9TVEFURSkpCisJCQlydHdfaG9zdGFwZF9tbG1lX3J4KHBhZGFwdGVyLCBwcmVjdl9mcmFtZSk7CisJCWJyZWFrOworCX0KKyNlbHNlCisJX21ndF9kaXNwYXRjaGVyKHBhZGFwdGVyLCBwdGFibGUsIHByZWN2X2ZyYW1lKTsKKyNlbmRpZgorfQorCisjaWZkZWYgQ09ORklHXzg4RVVfUDJQCitzdGF0aWMgdTMyIHAycF9saXN0ZW5fc3RhdGVfcHJvY2VzcyhzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIsIHVuc2lnbmVkIGNoYXIgKmRhKQoreworCWJvb2wgcmVzcG9uc2UgPSB0cnVlOworCisJLyoJZG8gbm90aGluZyBpZiB0aGUgZGV2aWNlIG5hbWUgaXMgZW1wdHkgKi8KKwlpZiAoIXBhZGFwdGVyLT53ZGluZm8uZGV2aWNlX25hbWVfbGVuKQorCQlyZXNwb25zZSA9IGZhbHNlOworCisJaWYgKHJlc3BvbnNlKQorCQlpc3N1ZV9wcm9iZXJzcF9wMnAocGFkYXB0ZXIsIGRhKTsKKworCXJldHVybiBfU1VDQ0VTUzsKK30KKyNlbmRpZiAvKiBDT05GSUdfODhFVV9QMlAgKi8KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCitGb2xsb3dpbmcgYXJlIHRoZSBjYWxsYmFjayBmdW5jdGlvbnMgZm9yIGVhY2ggc3VidHlwZSBvZiB0aGUgbWFuYWdlbWVudCBmcmFtZXMKKworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3Vuc2lnbmVkIGludCBPblByb2JlUmVxKHN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciwgdW5pb24gcmVjdl9mcmFtZSAqcHJlY3ZfZnJhbWUpCit7CisJdW5zaWduZ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cgQ2hhbm5lbCBBdHRyaWJ1dGUiIHNlY3Rpb24uICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSAweDA0OworCisJLyoJT3BlcmF0aW5nIENsYXNzICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSAweDUxOwkvKglDb3B5IGZyb20gU0Q3ICovCisKKwkvKglDaGFubmVsIE51bWJlciAqLworCXAycGllW3AycGllbGVuKytdID0gcHdkaW5mby0+bGlzdGVuX2NoYW5uZWw7CS8qCWxpc3RlbmluZyBjaGFubmVsIG51bWJlciAqLworCisKKwkvKglFeHRlbmRlZCBMaXN0ZW4gVGltaW5nIEFUVFIgKi8KKwkvKglUeXBlOiAqLworCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfRVhfTElTVEVOX1RJTUlORzsKKworCS8qCUxlbmd0aDogKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KDB4MDAwNCk7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCVZhbHVlOiAqLworCS8qCUF2YWlsYWJpbGl0eSBQZXJpb2QgKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KDB4RkZGRik7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCUF2YWlsYWJpbGl0eSBJbnRlcnZhbCAqLworCSooX19sZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2xlMTYoMHhGRkZGKTsKKwlwMnBpZWxlbiArPSAyOworCisKKwkvKglJbnRlbmRlZCBQMlAgSW50ZXJmYWNlIEFkZHJlc3MgKi8KKwkvKglUeXBlOiAqLworCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfSU5URU5URURfSUZfQUREUjsKKworCS8qCUxlbmd0aDogKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KEVUSF9BTEVOKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJbWVtY3B5KHAycGllICsgcDJwaWVsZW4sIG15aWQoJnBhZGFwdGVyLT5lZXByb21wcml2KSwgRVRIX0FMRU4pOworCXAycGllbGVuICs9IEVUSF9BTEVOOworCisKKwkvKglDaGFubmVsIExpc3QgKi8KKwkvKglUeXBlOiAqLworCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfQ0hfTElTVDsKKworCS8qICBMZW5ndGg6ICovCisJLyogIENvdW50cnkgU3RyaW5nKDMpICovCisJLyogICsgKE9wZXJhdGluZyBDbGFzcyAoMSkgKyBOdW1iZXIgb2YgQ2hhbm5lbHMoMSkpICogT3BlcmF0aW9uIENsYXNzZXMgKD8pICovCisJLyogICsgbnVtYmVyIG9mIGNoYW5uZWxzIGluIGFsbCBjbGFzc2VzICovCisJbGVuX2NoYW5uZWxsaXN0X2F0dHIgPSAzCisJICAgKyAoMSArIDEpICogKHUxNikocG1sbWVleHQtPmNoYW5uZWxfbGlzdC5yZWdfY2xhc3NlcykKKwkgICArIGdldF9yZWdfY2xhc3Nlc19mdWxsX2NvdW50KHBtbG1lZXh0LT5jaGFubmVsX2xpc3QpOworCisJKihfX2xlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fbGUxNihsZW5fY2hhbm5lbGxpc3RfYXR0cik7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCVZhbHVlOiAqLworCS8qCUNvdW50cnkgU3RyaW5nICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSAnWCc7CisJcDJwaWVbcDJwaWVsZW4rK10gPSAnWCc7CisKKwkvKglUaGUgdGhpcmQgYnl0ZSBzaG91bGQgYmUgc2V0IHRvIDB4MDQuICovCisJLyoJRGVzY3JpYmVkIGluIHRoZSAiT3BlcmF0aW5nIENoYW5uZWwgQXR0cmlidXRlIiBzZWN0aW9uLiAqLworCXAycGllW3AycGllbGVuKytdID0gMHgwNDsKKworCS8qCUNoYW5uZWwgRW50cnkgTGlzd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ZGV2aWNlX25hbWVfbGVuKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJLyoJUDJQIERldmljZSBBZGRyZXNzICovCisJbWVtY3B5KHAycGllICsgcDJwaWVsZW4sIG15aWQoJnBhZGFwdGVyLT5lZXByb21wcml2KSwgRVRIX0FMRU4pOworCXAycGllbGVuICs9IEVUSF9BTEVOOworCisJLyoJQ29uZmlnIE1ldGhvZCAqLworCS8qCVRoaXMgZmllbGQgc2hvdWxkIGJlIGJpZyBlbmRpYW4uIE5vdGVkIGJ5IFAyUCBzcGVjaWZpY2F0aW9uLiAqLworCisJKihfX2JlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fYmUxNihwd2RpbmZvLT5zdXBwb3J0ZWRfd3BzX2NtKTsKKworCXAycGllbGVuICs9IDI7CisKKwkvKglQcmltYXJ5IERldmljZSBUeXBlICovCisJLyoJQ2F0ZWdvcnkgSUQgKi8KKwkqKF9fYmUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19QRFRfQ0lEX01VTElUX01FRElBKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJT1VJICovCisJKihfX2JlMzIgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fYmUzMihXUFNPVUkpOworCXAycGllbGVuICs9IDQ7CisKKwkvKglTdWIgQ2F0ZWdvcnkgSUQgKi8KKwkqKF9fYmUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19QRFRfU0NJRF9NRURJQV9TRVJWRVIpOworCXAycGllbGVuICs9IDI7CisKKwkvKglOdW1iZXIgb2YgU2Vjb25kYXJ5IERldmljZSBUeXBlcyAqLworCXAycGllW3AycGllbGVuKytdID0gMHgwMDsJLyoJTm8gU2Vjb25kYXJ5IERldmljZSBUeXBlIExpc3QgKi8KKworCS8qCURldmljZSBOYW1lICovCisJLyoJVHlwZTogKi8KKwkqKF9fYmUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19BVFRSX0RFVklDRV9OQU1FKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJTGVuZ3RoOiAqLworCSooX19iZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYocHdkaW5mby0+ZGV2aWNlX25hbWVfbGVuKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJbWVtY3B5KHAycGllICsgcDJwaWVsZW4sIHB3ZGluZm8tPmRldmljZV9uYW1lICwgcHdkaW5mby0+ZGV2aWNlX25hbWVfbGVuKTsKKwlwMnBpZWxlbiArPSBwd2RpbmZvLT5kZXZpY2VfbmFtZV9sZW47CisKKworCS8qCU9wZXJhdGluZyBDaGFubmVsICovCisJLyoJVHlwZTogKi8KKwlwMnBpZVtwMnBpZWxlbisrXSA9IFAyUF9BVFRSX09QRVJBVElOR19DSDsKKworCS8qCUxlbmd0aDogKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KDB4MDAwNSk7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCVZhbHVlOiAqLworCS8qCUNvdW50cnkgU3RyaW5nICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSAnWCc7CisJcDJwaWVbcDJwaWVsZW4rK10gPSAnWCc7CisKKwkvKglUaGUgdGhpcmQgYnl0ZSBzaG91bGQgYmUgc2V0IHRvIDB4MDQuICovCisJLyoJRGVzY3JpYmVkIGluIHRoZSAiT3BlcmF0aW5nIENoYW5uZWwgQXR0cmlidXRlIiBzZWN0aW9uLiAqLworCXAycGllW3AycGllbGVuKytdID0gMHgwNDsKKworCS8qCU9wZXJhdGluZyBDbGFzcyAqLworCXAycGllW3AycGllbGVuKytdID0gMHg1MTsKKworCS8qCUNoYW5uZWwgTnVtYmVyICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSBwd2RpbmZvLT5vcGV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5IEFsYmVydCAyMDEwMDkwOCAqLworCS8qCUFjY29yZGluZyB0byB0aGUgUDJQIFNwZWNpZmljYXRpb24sIHRoZSBncm91cCBuZWdvaXRhdGlvbiByZXNwb25zZSBmcmFtZSBzaG91bGQgY29udGFpbiA5IFAyUCBhdHRyaWJ1dGVzICovCisJLyoJMS4gU3RhdHVzICovCisJLyoJMi4gUDJQIENhcGFiaWxpdHkgKi8KKwkvKgkzLiBHcm91cCBPd25lciBJbnRlbnQgKi8KKwkvKgk0LiBDb25maWd1cmF0aW9uIFRpbWVvdXQgKi8KKwkvKgk1LiBPcGVyYXRpbmcgQ2hhbm5lbCAqLworCS8qCTYuIEludGVuZGVkIFAyUCBJbnRlcmZhY2UgQWRkcmVzcyAqLworCS8qCTcuIENoYW5uZWwgTGlzdCAqLworCS8qCTguIERldmljZSBJbmZvICovCisJLyoJOS4gR3JvdXAgSUQJKE9ubHkgR08pICovCisKKworCS8qCVRvRG86ICovCisKKwkvKglQMlAgU3RhdHVzICovCisJLyoJVHlwZTogKi8KKwlwMnBpZVtwMnBpZWxlbisrXSA9IFAyUF9BVFRSX1NUQVRVUzsKKworCS8qCUxlbmd0aDogKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KDB4MDAwMSk7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCVZhbHVlOiAqLworCXAycGllW3AycGllbGVuKytdID0gcmVzdWx0OworCisJLyoJUDJQIENhcGFiaWxpdHkgKi8KKwkvKglUeXBlOiAqLworCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfQ0FQQUJJTElUWTsKKworCS8qCUxlbmd0aDogKi8KKwkqKF9fbGUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19sZTE2KDB4MDAwMik7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCVZhbHVlOiAqLworCS8qCURldmljZSBDYXBhYmlsaXR5IEJpdG1hcCwgMSBieXRlICovCisKKwlpZiAocnR3X3AycF9jaGtfcm9sZShwd2RpbmZvLCBQMlBfUk9MRV9DTElFTlQpKSB7CisJCS8qCUNvbW1lbnRlZCBieSBBbGJlcnQgMjAxMS8wMy8wOCAqLworCQkvKglBY2NvcmRpbmcgdG8gdGhlIFAyUCBzcGVjaWZpY2F0aW9uICovCisJCS8qCWlmIHRoZSBzZW5kaW5nIGRldmljZSB3aWxsIGJlIGNsaWVudCwgdGhlIFAyUCBDYXBhYmlsaXR5IHNob3VsZCBiZSByZXNlcnZlZCBvZiBncm91cCBuZWdvdGF0aW9uIHJlc3BvbnNlIGZyYW1lICovCisJCXAycGllW3AycGllbGVuKytdID0gMDsKKwl9IGVsc2UgeworCQkvKglCZSBncm91cCBvd25lciBvciBtZWV0IHRoZSBlcnJvciBjYXNlICovCisJCXAycGllW3AycGllbGVuKytdID0gRE1QX1AyUF9ERVZDQVBfU1VQUE9SVDsKKwl9CisKKwkvKglHcm91cCBDYXBhYmlsaXR5IEJpdG1hcCwgMSBieXRlICovCisJaWYgKHB3ZGluZm8tPnBlcnNpc3RlbnRfc3VwcG9ydGVkKSB7CisJCXAycGllW3AycGllbGVuKytdID0gUDJQX0dSUENBUF9DUk9TU19DT05OIHwgUDJQX0dSUENBUF9QRVJTSVNURU5UX0dST1VQOworCX0gZWxzZSB7CisJCXAycGllW3AycGllbGVuKytdID0gUDJQX0dSUENBUF9DUk9TU19DT05OOworCX0KKworCS8qCUdyb3VwIE93bmVyIEludGVudCAqLworCS8qCVR5cGU6ICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSBQMlBfQVRUUl9HT19JTlRFTlQ7CisKKwkvKglMZW5ndGg6ICovCisJKihfX2xlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fbGUxNigweDAwMDEpOworCXAycGllbGVuICs9IDI7CisKKwkvKglWYWx1ZTogKi8KKwlpZiAocHdkaW5mby0+cGVlcl9pbnRlbnQgJiAweDAxKSB7CisJCS8qCVBlZXIncyB0aW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BlICovCisJLyoJVHlwZTogKi8KKwkqKF9fYmUxNiAqKSh3cHNpZSArIHdwc2llbGVuKSA9IGNwdV90b19iZTE2KFdQU19BVFRSX1BSSU1BUllfREVWX1RZUEUpOworCXdwc2llbGVuICs9IDI7CisKKwkvKglMZW5ndGg6ICovCisJKihfX2JlMTYgKikod3BzaWUgKyB3cHNpZWxlbikgPSBjcHVfdG9fYmUxNigweDAwMDgpOworCXdwc2llbGVuICs9IDI7CisKKwkvKglWYWx1ZTogKi8KKwkvKglDYXRlZ29yeSBJRCAqLworCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX1BEVF9DSURfTVVMSVRfTUVESUEpOworCXdwc2llbGVuICs9IDI7CisKKwkvKglPVUkgKi8KKwkqKF9fYmUzMiAqKSh3cHNpZSArIHdwc2llbGVuKSA9IGNwdV90b19iZTMyKFdQU09VSSk7CisJd3BzaWVsZW4gKz0gNDsKKworCS8qCVN1YiBDYXRlZ29yeSBJRCAqLworCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX1BEVF9TQ0lEX01FRElBX1NFUlZFUik7CisJd3BzaWVsZW4gKz0gMjsKKworCS8qCURldmljZSBOYW1lICovCisJLyoJVHlwZTogKi8KKwkqKF9fYmUxNiAqKSh3cHNpZSArIHdwc2llbGVuKSA9IGNwdV90b19iZTE2KFdQU19BVFRSX0RFVklDRV9OQU1FKTsKKwl3cHNpZWxlbiArPSAyOworCisJLyoJTGVuZ3RoOiAqLworCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYocHdkaW5mby0+ZGV2aWNlX25hbWVfbGVuKTsKKwl3cHNpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJaWYgKHB3ZGluZm8tPmRldmljZV9uYW1lX2xlbikgeworCQltZW1jcHkod3BzaWUgKyB3cHNpZWxlbiwgcHdkaW5mby0+ZG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gMHgxMDsKKworCQkvKglDb25maWcgTWV0aG9kICovCisJCS8qCVR5cGU6ICovCisJCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX0FUVFJfQ09ORl9NRVRIT0QpOworCQl3cHNpZWxlbiArPSAyOworCisJCS8qCUxlbmd0aDogKi8KKwkJKihfX2JlMTYgKikod3BzaWUgKyB3cHNpZWxlbikgPSBjcHVfdG9fYmUxNigweDAwMDIpOworCQl3cHNpZWxlbiArPSAyOworCisJCS8qCVZhbHVlOiAqLworCQkqKF9fYmUxNiAqKSh3cHNpZSArIHdwc2llbGVuKSA9IGNwdV90b19iZTE2KHB3ZGluZm8tPnN1cHBvcnRlZF93cHNfY20pOworCQl3cHNpZWxlbiArPSAyOworCX0KKworCS8qCURldmljZSBOYW1lICovCisJLyoJVHlwZTogKi8KKwkqKF9fYmUxNiAqKSh3cHNpZSArIHdwc2llbGVuKSA9IGNwdV90b19iZTE2KFdQU19BVFRSX0RFVklDRV9OQU1FKTsKKwl3cHNpZWxlbiArPSAyOworCisJLyoJTGVuZ3RoOiAqLworCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYocHdkaW5mby0+ZGV2aWNlX25hbWVfbGVuKTsKKwl3cHNpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJbWVtY3B5KHdwc2llICsgd3BzaWVsZW4sIHB3ZGluZm8tPmRldmljZV9uYW1lLCBwd2RpbmZvLT5kZXZpY2VfbmFtZV9sZW4pOworCXdwc2llbGVuICs9IHB3ZGluZm8tPmRldmljZV9uYW1lX2xlbjsKKworCS8qCVByaW1hcnkgRGV2aWNlIFR5cGUgKi8KKwkvKglUeXBlOiAqLworCSooX19iZTE2ICopKHdwc2llICsgd3BzaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX0FUVFJfUFJJTUFSWV9ERVZfVFlQRSk7CisJd3BzaWVsZW4gKz0gMjsKKworCS8qCU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0ZW5kZWQgTGlzdGVuIFRpbWluZyAqLworCS8qCVR5cGU6ICovCisJcDJwaWVbcDJwaWVsZW4rK10gPSBQMlBfQVRUUl9FWF9MSVNURU5fVElNSU5HOworCisJLyoJTGVuZ3RoOiAqLworCSooX19sZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2xlMTYoMHgwMDA0KTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJVmFsdWU6ICovCisJLyoJQXZhaWxhYmlsaXR5IFBlcmlvZCAqLworCSooX19sZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2xlMTYoMHhGRkZGKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJQXZhaWxhYmlsaXR5IEludGVydmFsICovCisJKihfX2xlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fbGUxNigweEZGRkYpOworCXAycGllbGVuICs9IDI7CisKKwlpZiAocnR3X3AycF9jaGtfcm9sZShwd2RpbmZvLCBQMlBfUk9MRV9HTykpIHsKKwkJLyoJT3BlcmF0aW5nIENoYW5uZWwgKGlmIHRoaXMgV2lGaSBpcyB3b3JraW5nIGFzIHRoZSBncm91cCBvd25lciBub3cpICovCisJCS8qCVR5cGU6ICovCisJCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfT1BFUkFUSU5HX0NIOworCisJCS8qCUxlbmd0aDogKi8KKwkJKihfX2xlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fbGUxNigweDAwMDUpOworCQlwMnBpZWxlbiArPSAyOworCisJCS8qCVZhbHVlOiAqLworCQkvKglDb3VudHJ5IFN0cmluZyAqLworCQlwMnBpZVtwMnBpZWxlbisrXSA9ICdYJzsKKwkJcDJwaWVbcDJwaWVsZW4rK10gPSAnWCc7CisKKwkJLyoJVGhlIHRoaXJkIGJ5dGUgc2hvdWxkIGJlIHNldCB0byAweDA0LiAqLworCQkvKglEZXNjcmliZWQgaW4gdGhlICJP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mZvID09IFAyUF9HT1RfV1BTSU5GT19QRUVSX0RJU1BMQVlfUElOKSB8fAorCQkgICAgKHB3ZGluZm8tPnVpX2dvdF93cHNfaW5mbyA9PSBQMlBfR09UX1dQU0lORk9fU0VMRl9ESVNQTEFZX1BJTikpCisJCQkqKF9fYmUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19DT05GSUdfTUVUSE9EX0RJU1BMQVkpOworCQllbHNlCisJCQkqKF9fYmUxNiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19DT05GSUdfTUVUSE9EX1BCQyk7CisKKwkJcDJwaWVsZW4gKz0gMjsKKworCQkvKglQcmltYXJ5IERldmljZSBUeXBlICovCisJCS8qCUNhdGVnb3J5IElEICovCisJCSooX19iZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX1BEVF9DSURfTVVMSVRfTUVESUEpOworCQlwMnBpZWxlbiArPSAyOworCisJCS8qCU9VSSAqLworCQkqKF9fYmUzMiAqKShwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTMyKFdQU09VSSk7CisJCXAycGllbGVuICs9IDQ7CisKKwkJLyoJU3ViIENhdGVnb3J5IElEICovCisJCSooX19iZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX1BEVF9TQ0lEX01FRElBX1NFUlZFUik7CisJCXAycGllbGVuICs9IDI7CisKKwkJLyoJTnVtYmVyIG9mIFNlY29uZGFyeSBEZXZpY2UgVHlwZXMgKi8KKwkJcDJwaWVbcDJwaWVsZW4rK10gPSAweDAwOwkvKglObyBTZWNvbmRhcnkgRGV2aWNlIFR5cGUgTGlzdCAqLworCisJCS8qCURldmljZSBOYW1lICovCisJCS8qCVR5cGU6ICovCisJCSooX19iZTE2ICopKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX0FUVFJfREVWSUNFX05BTUUpOworCQlwMnBpZWxlbiArPSAyOworCisJCS8qCUxlbmd0aDogKi8KKwkJKihfX2JlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fYmUxNihwd2RpbmZvLT5kZXZpY2VfbmFtZV9sZW4pOworCQlwMnBpZWxlbiArPSAyOworCisJCS8qCVZhbHVlOiAqLworCQltZW1jcHkocDJwaWUgKyBwMnBpZWxlbiwgcHdkaW5mby0+ZGV2aWNlX25hbWUsIHB3ZGluZm8tPmRldmljZV9uYW1lX2xlbik7CisJCXAycGllbGVuICs9IHB3ZGluZm8tPmRldmljZV9uYW1lX2xlbjsKKworCQkvKglQMlAgSW50ZXJmYWNlICovCisJCS8qCVR5cGU6ICovCisJCXAycGllW3AycGllbGVuKytdID0gUDJQX0FUVFJfSU5URVJGQUNFOworCisJCS8qCUxlbmd0aDogKi8KKwkJKihfX2xlMTYgKikocDJwaWUgKyBwMnBpZWxlbikgPSBjcHVfdG9fbGUxNigweDAwMEQpOworCQlwMnBpZWxlbiArPSAyOworCisJCS8qCVZhbHVlOiAqLworCQltZW1jcHkocDJwaWUgKyBwMnBpZWxlbiwgcHdkaW5mby0+ZGV2aWNlX2FkZHIsIEVUSF9BTEVOKTsJLyoJUDJQIERldmljZSBBZGRyZXNzICovCisJCXAycGllbGVuICs9IEVUSF9BTEVOOworCisJCXAycGllW3AycGllbGVuKytdID0gMTsJLyoJUDJQIEludGVyZmFjZSBBZGRyZXNzIENvdW50ICovCisKKwkJbWVtY3B5KHAycGllICsgcDJwaWVsZW4sIHB3ZGluZm8tPmRldmljZV9hZGRyLCBFVEhfQUxFTik7CS8qCVAyUCBJbnRlcmZhY2UgQWRkcmVzcyBMaXN0ICovCisJCXAycGllbGVuICs9IEVUSF9BTEVOOworCisJCXBmcmFtZSA9IHJ0d19zZXRfaWUocGZyYW1lLCBfVkVORE9SX1NQRUNJRklDX0lFXywgcDJwaWVsZW4sICh1bnNpZ25lZCBjaGFyICopcDJwaWUsICZwYXR0cmli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bWQpOworCXBjMmhfZXZ0X2hkci0+bGVuID0gc2l6ZW9mKHN0cnVjdCBzdGFzc29jX2V2ZW50KTsKKwlwYzJoX2V2dF9oZHItPklEID0gR0VOX0VWVF9DT0RFKF9BZGRTVEEpOworCXBjMmhfZXZ0X2hkci0+c2VxID0gQVRPTUlDX0lOQ19SRVRVUk4oJnBtbG1lZXh0LT5ldmVudF9zZXEpOworCisJcGFkZF9zdGFfZXZ0ID0gKHN0cnVjdCBzdGFzc29jX2V2ZW50ICopKHBldnRjbWQgKyBzaXplb2Yoc3RydWN0IEMySEV2ZW50X0hlYWRlcikpOworCW1lbWNweSgodW5zaWduZWQgY2hhciAqKSgmKHBhZGRfc3RhX2V2dC0+bWFjYWRkcikpLCBNYWNBZGRyLCBFVEhfQUxFTik7CisJcGFkZF9zdGFfZXZ0LT5jYW1faWQgPSBjYW1faWR4OworCisJREJHXzg4RSgicmVwb3J0X2FkZF9zdGFfZXZlbnQ6IGFkZCBTVEFcbiIpOworCisJcnR3X2VucXVldWVfY21kKHBjbWRwcml2LCBwY21kX29iaik7CisKKwlyZXR1cm47Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworRm9sbG93aW5nIGFyZSB0aGUgZXZlbnQgY2FsbGJhY2sgZnVuY3Rpb25zCisKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBmb3Igc3RhL2FkaG9jIG1vZGUgKi8KK3ZvaWQgdXBkYXRlX3N0YV9pbmZvKHN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciwgc3RydWN0IHN0YV9pbmZvICpwc3RhKQoreworCXN0cnVjdCBtbG1lX3ByaXYgKnBtbG1lcHJpdiA9ICYocGFkYXB0ZXItPm1sbWVwcml2KTsKKwlzdHJ1Y3QgbWxtZV9leHRfcHJ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FdQU19DT05GSUdfTUVUSE9EX1BCQyk7CisJfSBlbHNlIHsKKwkJLyogdTE2KikgKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX0NPTkZJR19NRVRIT0RfRElTUExBWSk7ICovCisJCVJUV19QVVRfQkUxNihwMnBpZSArIHAycGllbGVuLCBXUFNfQ09ORklHX01FVEhPRF9ESVNQTEFZKTsKKwl9CisKKwlwMnBpZWxlbiArPSAyOworCisJLyoJUHJpbWFyeSBEZXZpY2UgVHlwZSAqLworCS8qCUNhdGVnb3J5IElEICovCisJLyogdTE2KikgKHAycGllICsgcDJwaWVsZW4pID0gY3B1X3RvX2JlMTYoV1BTX1BEVF9DSURfTVVMSVRfTUVESUEpOyAqLworCVJUV19QVVRfQkUxNihwMnBpZSArIHAycGllbGVuLCBXUFNfUERUX0NJRF9NVUxJVF9NRURJQSk7CisJcDJwaWVsZW4gKz0gMjsKKworCS8qCU9VSSAqLworCS8qIHUzMiopIChwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTMyKFdQU09VSSk7ICovCisJUlRXX1BVVF9CRTMyKHAycGllICsgcDJwaWVsZW4sIFdQU09VSSk7CisJcDJwaWVsZW4gKz0gNDsKKworCS8qCVN1YiBDYXRlZ29yeSBJRCAqLworCS8qIHUxNiopIChwMnBpZSArIHAycGllbGVuKSA9IGNwdV90b19iZTE2KFdQU19QRFRfU0NJRF9NRURJQV9TRVJWRVIpOyAqLworCVJUV19QVVRfQkUxNihwMnBpZSArIHAycGllbGVuLCBXUFNfUERUX1NDSURfTUVESUFfU0VSVkVSKTsKKwlwMnBpZWxlbiArPSAyOworCisJLyoJTnVtYmVyIG9mIFNlY29uZGFyeSBEZXZpY2UgVHlwZXMgKi8KKwlwMnBpZVtwMnBpZWxlbisrXSA9IDB4MDA7CS8qCU5vIFNlY29uZGFyeSBEZXZpY2UgVHlwZSBMaXN0ICovCisKKwkvKglEZXZpY2UgTmFtZSAqLworCS8qCVR5cGU6ICovCis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Mlg6XG4iLCAqKHB0citpKSwKKwkJCQkqKHB0citpKzEpLCAqKHB0citpKzIpLCAqKHB0citpKzMpLCAqKHB0citpKzQpLCAqKHB0citpKzUpLCAqKHB0citpKzYpLCAqKHB0citpKzcpKTsKKwkJREJHXzg4RSgiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyNcbiIpOworCX0gZWxzZSBpZiAoYkR1bXBSeFBrdCA9PSAyKSB7CisJCWlmICh0eXBlID09IFdJRklfTUdUX1RZUEUpIHsKKwkJCWludCBpOworCQkJREJHXzg4RSgiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyNcbiIpOworCisJCQlmb3IgKGkgPSAwOyBpIDwgNjQ7IGkgPSBpKzgpCisJCQkJREJHXzg4RSgiJTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOlxuIiwgKihwdHIraSksCisJCQkJCSoocHRyK2krMSksICoocHRyK2krMiksICoocHRyK2krMyksICoocHRyK2krNCksICoocHRyK2krNSksICoocHRyK2krNiksICoocHRyK2krNykpOworCQkJREJHXzg4RSgiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyNcbiIpOworCQl9CisJfSBlbHNlIGlmIChiRHVtcFJ4UGt0ID09IDMpIHsKKwkJaWYgKHR5cGUgPT0gV0lGSV9EQVRBX1RZUEUpIHsKKwkJCWludCBpOworCQkJREJHXzg4RSgiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyNcbiIpOworCisJCQlmb3IgKGkgPSAwOyBpIDwgNjQ7IGkgPSBpKzgpCisJCQkJREJHXzg4RSgiJTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOlxuIiwgKihwdHIraSksCisJCQkJCSoocHRyK2krMSksICoocHRyK2krMiksICoocHRyK2krMyksICoocHRyK2krNCksICoocHRyK2krNSksICoocHRyK2krNiksICoocHRyK2krNykpOworCQkJREJHXzg4RSgi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fQorCitzdGF0aWMgdm9pZCBjcmMzMl9pbml0KHZvaWQpCit7CitfZnVuY19lbnRlcl87CisJaWYgKGJjcmMzMmluaXRpYWxpemVkID09IDEpIHsKKwkJZ290byBleGl0OworCX0gZWxzZSB7CisJCWludCBpLCBqOworCQl1MzIgYzsKKwkJdTggKnAgPSAodTggKikmYywgKnAxOworCQl1OCBrOworCisJCWMgPSAweDEyMzQwMDAwOworCisJCWZvciAoaSA9IDA7IGkgPCAyNTY7ICsraSkgeworCQkJayA9IGNyYzMyX3JldmVyc2VCaXQoKHU4KWkpOworCQkJZm9yIChjID0gKCh1MzIpaykgPDwgMjQsIGogPSA4OyBqID4gMDsgLS1qKQorCQkJCWMgPSBjICYgMHg4MDAwMDAwMCA/IChjIDw8IDEpIF4gQ1JDMzJfUE9MWSA6IChjIDw8IDEpOworCQkJcDEgPSAodTggKikmY3JjMzJfdGFibGVbaV07CisKKwkJCXAxWzBdID0gY3JjMzJfcmV2ZXJzZUJpdChwWzNdKTsKKwkJCXAxWzFdID0gY3JjMzJfcmV2ZXJzZUJpdChwWzJdKTsKKwkJCXAxWzJdID0gY3JjMzJfcmV2ZXJzZUJpdChwWzFdKTsKKwkJCXAxWzNdID0gY3JjMzJfcmV2ZXJzZUJpdChwWzBdKTsKKwkJfQorCQliY3JjMzJpbml0aWFsaXplZCA9IDE7CisJfQorZXhpdDoKK19mdW5jX2V4aXRfOworfQorCitzdGF0aWMgX19sZTMyIGdldGNyYzMyKHU4ICpidWYsIGludCBsZW4pCit7CisJdTggKnA7CisJdTMyICBjcmM7CitfZnVuY19lbnRlcl87CisJaWYgKGJjcmMzMmluaXRpYWxpemVkID09IDApCisJCWNyYzMyX2luaXQoKTsKKworCWNyYyA9IDB4ZmZmZmZmZmY7ICAgICAgIC8qIHByZWxvYWQgc2hpZnQgcmVnaXN0ZXIsIHBlciBDUkMtMzIgc3BlYyAqLworCisJZm9yIChwID0gYnVmOyBsZW4gPiAwOyArK3AsIC0tbGVuKQorCQljcmM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TggKm1pY19oZWFkZXIyLCB1OCAqbXBkdSwgaW50IGE0X2V4aXN0cywgaW50IHFjX2V4aXN0cyk7CitzdGF0aWMgdm9pZCBjb25zdHJ1Y3RfY3RyX3ByZWxvYWQodTggKmN0cl9wcmVsb2FkLCBpbnQgYTRfZXhpc3RzLCBpbnQgcWNfZXhpc3RzLCB1OCAqbXBkdSwgdTggKnBuX3ZlY3RvciwgaW50IGMpOworc3RhdGljIHZvaWQgeG9yXzEyOCh1OCAqYSwgdTggKmIsIHU4ICpvdXQpOworc3RhdGljIHZvaWQgeG9yXzMyKHU4ICphLCB1OCAqYiwgdTggKm91dCk7CitzdGF0aWMgdTggc2JveCh1OCBhKTsKK3N0YXRpYyB2b2lkIG5leHRfa2V5KHU4ICprZXksIGludCByb3VuZCk7CitzdGF0aWMgdm9pZCBieXRlX3N1Yih1OCAqaW4sIHU4ICpvdXQpOworc3RhdGljIHZvaWQgc2hpZnRfcm93KHU4ICppbiwgdTggKm91dCk7CitzdGF0aWMgdm9pZCBtaXhfY29sdW1uKHU4ICppbiwgdTggKm91dCk7CitzdGF0aWMgdm9pZCBhZXMxMjhrMTI4ZCh1OCAqa2V5LCB1OCAqZGF0YSwgdTggKmNpcGhlcnRleHQpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIGFlczEyOGsxMjhkKCkJCQkqLworLyogUGVyZm9ybXMgYSAxMjggYml0IEFFUyBlbmNyeXB0IHdpdGggICovCisvKiAxMjggYml0IGRhdGEuCQkJKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgeG9yXzEyOCh1OCAqYSwgdTggKmIsIHU4ICpvdXQpCit7CisJaW50IGk7CitfZnVuY19lbnRlcl87CisJZm9yIChpID0gMDsgaSA8IDE2OyBpKyspCisJCW91dFtpXSA9IGFbaV0gXiBiW2ldOworX2Z1bmNfZXhpdF87Cit9CisKK3N0YXRpYyB2b2lkIHhvcl8zMih1OCAqYSwgdTggKmIsIHU4ICpvdXQpCit7CisJaW50IGk7CitfZnVuY19lbnRlcl87CisJZm9yIChpID0gMDsgaSA8IDQ7IGkrKykKKwkJb3V0W2ldID0gYVtpXSBeIGJbaV07CitfZnVuY19leGl0XzsKK30KKworc3RhdGljIHU4IHNib3godTggYSkKK3sKKwlyZXR1cm4gc2JveF90YWJsZVsoaW50KWFdOworfQorCitzdGF0aWMgdm9pZCBuZXh0X2tleSh1OCAqa2V5LCBpbnQgcm91bmQpCit7CisJdTggcmNvbjsKKwl1OCBzYm94X2tleVs0XTsKKwl1OCByY29uX3RhYmxlWzEyXSA9IHsKKwkJMHgwMSwgMHgwMiwgMHgwNCwgMHgwOCwgMHgxMCwgMHgyMCwgMHg0MCwgMHg4MCwKKwkJMHgxYiwgMHgzNiwgMHgzNiwgMHgzNgorCX07CitfZnVuY19lbnRlcl87CisJc2JveF9rZXlbMF0gPSBzYm94KGtleVsxM10pOworCXNib3hfa2V5WzFdID0gc2JveChrZXlbMTRdKTsKKwlzYm94X2tleVsyXSA9IHNib3goa2V5WzE1XSk7CisJc2JveF9rZXlbM10gPSBzYm94KGtleVsxMl0pOworCisJcmNvbiA9IHJjb25fdGFibGVbcm91bmRdOworCisJeG9yXzMyKCZrZXlbMF0sIHNib3hfa2V5LCAma2V5WzBdKTsKKwlrZXlbMF0gPSBrZXlbMF0gXiByY29uOworCisJeG9yXzMyKCZrZXlbNF0sICZrZXlbMF0sICZrZXlbNF0pOworCXhvcl8zMigma2V5WzhdLCAma2V5WzRdLCAma2V5WzhdKTsKKwl4b3JfMzIoJmtleVsxMl0sICZrZXlbOF0sICZrZXlbMTJdKTsKK19mdW5jX2V4aXRfOworfQorCitzdGF0aWMgdm9pZCBieXRlX3N1Yih1OCAqaW4sIHU4ICpvdXQpCit7CisJaW50IGk7CitfZnVuY19lbnRlcl87CisJZm9yIChpID0gMDsgaSA8IDE2OyBpKyspCisJCW91dFtpXSA9IHNib3goaW5baV0pOworX2Z1bmNfZXhpdF87Cit9CisKK3N0YXRpYyB2b2lkIHNoaWZ0X3Jvdyh1OCAqaW4sIHU4ICpvdXQpCit7CitfZnVuY19lbnRlcl87CisJb3V0WzBdID0gIGluWzBdOworCW91dFsxXSA9ICBpbls1XTsKKwlvdXRbMl0gPSAgaW5bMTBdOworCW91dFszXSA9ICBpblsxNV07CisJb3V0WzRdID0gIGluWzRdOworCW91dFs1XSA9ICBpbls5XTsKKwlvdXRbNl0gPSAgaW5bMTRdOworCW91dFs3XSA9ICBpblszXTsKKwlvdXRbOF0gPSAgaW5bOF07CisJb3V0WzldID0gIGluWzEzXTsKKwlvdXRbMTBdID0gaW5bMl07CisJb3V0WzExXSA9IGluWzddOworCW91dFsxMl0gPSBpblsxMl07CisJb3V0WzEzXSA9IGluWzFdOworCW91dFsxNF0gPSBpbls2XTsKKwlvdXRbMTVdID0gaW5bMTFdOworX2Z1bmNfZXhpdF87Cit9CisKK3N0YXRpYyB2b2lkIG1peF9jb2x1bW4odTggKmluLCB1OCAqb3V0KQoreworCWludCBpOworCXU4IGFkZDFiWzRdOworCXU4IGFkZDFiZjdbNF07CisJdTggcm90bFs0XTsKKwl1OCBzd2FwX2hhbGZzWzRdOworCXU4IGFuZGY3WzRdOworCXU4IHJvdHJbNF07CisJdTggdGVtcFs0XTsKKwl1OCB0ZW1wYls0XTsKK19mdW5jX2VudGVyXzsKKwlmb3IgKGkgPSAwIDsgaSA8IDQ7IGkrKykgeworCQlpZiAoKGluW2ldICYgMHg4MCkgPT0gMHg4MCkKKwkJCWFkZDFiW2ldID0gMHgxYjsKKwkJZWxzZQorCQkJYWRkMWJbaV0gPSAweDAwOworCX0KKworCXN3YXBfaGFsZnNbMF0gPSBpblsyXTsgICAgLyogU3dhcCBoYWxmcyAqLworCXN3YXBfaGFsZnNbMV0gPSBpblszXTsKKwlzd2FwX2hhbGZzWzJdID0gaW5bMF07CisJc3dhcF9oYWxmc1szXSA9IGluWzFdOworCisJcm90bFswXSA9IGluW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3VuZF9rZXksIHJvdW5kKTsKKwkJfQorCX0KK19mdW5jX2V4aXRfOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogY29uc3RydWN0X21pY19pdigpCQkJICAgKi8KKy8qIEJ1aWxkcyB0aGUgTUlDIElWIGZyb20gaGVhZGVyIGZpZWxkcyBhbmQgUE4gICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgY29uc3RydWN0X21pY19pdih1OCAqbWljX2l2LCBpbnQgcWNfZXhpc3RzLCBpbnQgYTRfZXhpc3RzLCB1OCAqbXBkdSwKKwkJCSAgICAgdWludCBwYXlsb2FkX2xlbmd0aCwgdTggKnBuX3ZlY3RvcikKK3sKKwlpbnQgaTsKK19mdW5jX2VudGVyXzsKKwltaWNfaXZbMF0gPSAweDU5OworCWlmIChxY19leGlzdHMgJiYgYTRfZXhpc3RzKQorCQltaWNfaXZbMV0gPSBtcGR1WzMwXSAmIDB4MGY7ICAgIC8qIFFvU19UQwkgICAqLworCWlmIChxY19leGlzdHMgJiYgIWE0X2V4aXN0cykKKwkJbWljX2l2WzFdID0gbXBkdVsyNF0gJiAweDBmOwkvKiBtdXRlIGJpdHMgNy00ICAgICovCisJaWYgKCFxY19leGlzdHMpCisJCW1pY19pdlsxXSA9IDB4MDA7CisJZm9yIChpID0gMjsgaSA8IDg7IGkrKykKKwkJbWljX2l2W2ldID0gbXBkdVtpICsgOF07CS8qIG1pY19pdlsyOjddID0gQTJbMDo1XSA9IG1wZHVbMTA6MTVdICovCisJZm9yIChpID0gODsgaSA8IDE0OyBpKyspCisJCW1pY19pdltpXSA9IHBuX3ZlY3RvclsxMyAtIGldOwkvKiBtaWNfaXZbODoxM10gPSBQTls1OjBdICovCisJbWljX2l2WzE0XSA9ICh1bnNpZ25lZCBjaGFyKSAocGF5bG9hZF9sZW5ndGggLyAyNTYpOworCW1pY19pdlsxNV0gPSAodW5zaWduZWQgY2hhcikgKHBheWxvYWRfbGVuZ3RoICUgMjU2KTsKK19mdW5jX2V4aXRfOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogY29uc3RydWN0X21pY19oZWFkZXIxKCkJCSAgICAgICovCisvKiBCdWlsZHMgdGhlIGZpcnN0IE1JQyBoZWFkZXIgYmxvY2sgZnJvbSAgICAgICAqLworLyogaGVhZGVyIGZpZWxkcy4JCQkgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBjb25zdHJ1Y3RfbWljX2hlYWRlcjEodTggKm1pY19oZWFkZXIxLCBpbnQgaGVhZGVyX2xlbmd0aCwgdTggKm1wZHUpCit7CitfZnVuY19lbnRlcl87CisJbWljX2hlYWRlcjFbMF0gPSAodTgpKChoZWFkZXJfbGVuZ3RoIC0gMikgLyAyNTYpOworCW1pY19oZWFkZXIxWzFdID0gKHU4KSgoaGVhZGVyX2xlbmd0aCAtIDIpICUgMjU2KTsKKwltaWNfaGVhZGVyMVsyXSA9IG1wZHVbMF0gJiAweGNmOyAgICAvKiBNdXRlIENGIHBvbGwgJiBDRiBhY2sgYml0cyAqLworCW1pY19oZWFkZXIxWzNdID0gbXBkdVsxXSAmIDB4Yzc7ICAgIC8qIE11dGUgcmV0cnksIG1vcmUgZGF0YSBhbmQgcHdyIG1ndCBiaXRzICovCisJbWljX2hlYWRlcjFbNF0gPSBtcGR1WzRdOyAgICAgICAvKiBBMSAqLworCW1pY19oZWFkZXIxWzVdID0gbXBkdVs1XTsKKwltaWNfaGVhZGVyMVs2XSA9IG1wZHVbNl07CisJbWljX2hlYWRlcjFbN10gPSBtcGR1WzddOworCW1pY19oZWFkZXIxWzhdID0gbXBkdVs4XTsKKwltaWNfaGVhZGVyMVs5XSA9IG1wZHVbOV07CisJbWljX2hlYWRlcjFbMTBdID0gbXBkdVsxMF07ICAgICAvKiBBMiAqLworCW1pY19oZWFkZXIxWzExXSA9IG1wZHVbMTFdOworCW1pY19oZWFkZXIxWzEyXSA9IG1wZHVbMTJdOworCW1pY19oZWFkZXIxWzEzXSA9IG1wZHVbMTNdOworCW1pY19oZWFkZXIxWzE0XSA9IG1wZHVbMTRdOworCW1pY19oZWFkZXIxWzE1XSA9IG1wZHVbMTVdOworX2Z1bmNfZXhpdF87Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKQkJICAgICAgKi8KKy8qIEJ1aWxkcyB0aGUgbGFzdCBNSUMgaGVhZGVyIGJsb2NrIGZyb20JKi8KKy8qIGhlYWRlciBmaWVsZHMuCQkJICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgY29uc3RydWN0X21pY19oZWFkZXIyKHU4ICptaWNfaGVhZGVyMiwgdTggKm1wZHUsIGludCBhNF9leGlzdHMsIGludCBxY19leGlzdHMpCit7CisJaW50IGk7CitfZnVuY19lbnRlcl87CisJZm9yIChpID0gMDsgaSA8IDE2OyBpKyspCisJCW1pY19oZWFkZXIyW2ldID0gMHgwMDsKKworCW1pY19oZWFkZXIyWzBdID0gbXBkdVsxNl07ICAgIC8qIEEzICovCisJbWljX2hlYWRlcjJbMV0gPSBtcGR1WzE3XTsKKwltaWNfaGVhZGVyMlsyXSA9IG1wZHVbMThdOworCW1pY19oZWFkZXIyWzNdID0gbXBkdVsxOV07CisJbWljX2hlYWRlcjJbNF0gPSBtcGR1WzIwXTsKKwltaWNfaGVhZGVyMls1XSA9IG1wZHVbMjFdOworCisJbWljX2hlYWRlcjJbNl0gPSAweDAwOworCW1pY19oZWFkZXIyWzddID0gMHgwMDsgLyogbXBkdVsyM107ICovCisKKwlpZiAoIXFjX2V4aXN0cyAmJiBhNF9leGlzdHMpIHsKKwkJZm9yIChpID0gMDsgaSA8IDY7IGkrKykKKwkJCW1pY19oZWFkZXIyWzgraV0gPSBtcGR1WzI0K2ldOyAgIC8qIEE0ICovCisJfQorCisJaWYgKHFjX2V4aXN0cyAmJiAhYTRfZXhpc3RzKSB7CisJCW1pY19oZWFkZXIyWzhdID0gbXBkdVsyNF0gJiAweDBmOyAvKiBtdXRlIGJpdHMgMTUgLSA0ICovCisJCW1pY19oZWFkZXIyWzldID0gbXBkdVsyNV0gJiAweDAwOworCX0KKworCWlmIChxY19leGlzdHMgJiYgYTRfZXhpc3RzKSB7CisJCWZvciAoaSA9IDA7IGkgPCA2OyBpKyspCisJCQltaWNfaGVhZGVyMls4K2ldID0gbXBkdVsyNCtpXTsgICAvKiBBNCAqLworCisJCW1pY19oZWFkZXIyWzE0XSA9IG1wZHVbMzBdICYgMHgwZjsKKwkJbWljX2hlYWRlcjJbMTVdID0gbXBkdVszMV0gJiAweDAwOworCX0KKworX2Z1bmNfZXhpdF87Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKQkJICAgICAgKi8KKy8qIEJ1aWxkcyB0aGUgbGFzdCBNSUMgaGVhZGVyIGJsb2NrIGZyb20JKi8KKy8qIGhlYWRlciBmaWVsZHMuCQkJICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgY29uc3RydWN0X2N0cl9wcmVsb2FkKHU4ICpjdHJfcHJlbG9hZCwgaW50IGE0X2V4aXN0cywgaW50IHFjX2V4aXN0cywgdTggKm1wZHUsIHU4ICpwbl92ZWN0b3IsIGludCBjKQoreworCWludCBpOworX2Z1bmNfZW50ZXJfOworCWZvciAoaSA9IDA7IGkgPCAxNjsgaSsrKQorCQljdHJfcHJlbG9hZFtpXSA9IDB4MDA7CisJaSA9IDA7CisKKwlj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mV0dXJuIGZhbHNlOworCQkJCWJyZWFrOworCQkJY2FzZSBfUlNOX0lFXzJfOgorCQkJCXJldHVybiBmYWxzZTsKKwkJCWRlZmF1bHQ6CisJCQkJYnJlYWs7CisJCQl9CisJCQlpICs9IChwSUUtPkxlbmd0aCArIDIpOworCQl9CisJCXJldHVybiB0cnVlOworCX0gZWxzZSB7CisJCXJldHVybiBmYWxzZTsKKwl9Cit9CisKK2ludCB3aWZpcmF0ZTJfcmF0ZXRibF9pbngodW5zaWduZWQgY2hhciByYXRlKQoreworCWludAlpbnggPSAwOworCXJhdGUgPSByYXRlICYgMHg3ZjsKKworCXN3aXRjaCAocmF0ZSkgeworCWNhc2UgNTQqMjoKKwkJaW54ID0gMTE7CisJCWJyZWFrOworCWNhc2UgNDgqMjoKKwkJaW54ID0gMTA7CisJCWJyZWFrOworCWNhc2UgMzYqMjoKKwkJaW54ID0gOTsKKwkJYnJlYWs7CisJY2FzZSAyNCoyOgorCQlpbnggPSA4OworCQlicmVhazsKKwljYXNlIDE4KjI6CisJCWlueCA9IDc7CisJCWJyZWFrOworCWNhc2UgMTIqMjoKKwkJaW54ID0gNjsKKwkJYnJlYWs7CisJY2FzZSA5KjI6CisJCWlueCA9IDU7CisJCWJyZWFrOworCWNhc2UgNioyOgorCQlpbnggPSA0OworCQlicmVhazsKKwljYXNlIDExKjI6CisJCWlueCA9IDM7CisJCWJyZWFrOworCWNhc2UgMTE6CisJCWlueCA9IDI7CisJCWJyZWFrOworCWNhc2UgMioyOgorCQlpbnggPSAxOworCQlicmVhazsKKwljYXNlIDEqMjoKKwkJaW54ID0gMDsKKwkJYnJlYWs7CisJfQorCXJldHVybiBpbng7Cit9CisKK3Vuc2lnbmVkIGludCB1cGRhdGVfYmFzaWNfcmF0ZSh1bnNpZ25lZCBjaGFyICpwdG4sIHVuc2lnbmVkIGludCBwdG5fc3opCit7CisJdW5zaWduZWQgaW50IGksIG51bV9vZl9yYXRlOworCXVuc2lnbmVkIGludCBtYXNrID0g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wgVVNBCisqCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpbmNsdWRlICJvZG1fcHJlY29tcC5oIgorCisjaW5jbHVkZSA8cnR3X2lvbC5oPgorCisjZGVmaW5lIHJlYWRfbmV4dF9wYWlyKGFycmF5LCB2MSwgdjIsIGkpCQlcCisJIGRvIHsJCQkJCQlcCisJCSBpICs9IDI7CQkJCVwKKwkJIHYxID0gYXJyYXlbaV07CQkJCVwKKwkJIHYyID0gYXJyYXlbaSsxXTsJCQlcCisJIH0gd2hpbGUgKDApCisKK3N0YXRpYyBib29sIENoZWNrQ29uZGl0aW9uKGNvbnN0IHUzMiAgY29uZGl0aW9uLCBjb25zdCB1MzIgIGhleCkKK3sKKwl1MzIgX2JvYXJkICAgICA9IChoZXggJiAweDAwMDAwMEZGKTsKKwl1MzIgX2ludGVyZmFjZSA9IChoZXggJiAweDAwMDBGRjAwKSA+PiA4OworCXUzMiBfcGxhdGZvcm0gID0gKGhleCAmIDB4MDBGRjAwMDApID4+IDE2OworCXUzMiBjb25kID0gY29uZGl0aW9uOworCisJaWYgKGNvbmRpdGlvbiA9PSAweENEQ0RDRENEKQorCQlyZXR1cm4gdHJ1ZTsKKworCWNvbmQgPSBjb25kaXRpb24gJiAweDAwMDAwMEZGOworCWlmICgoX2JvYXJkID09IGNvbmQpICYmIGNvbmQgIT0gMHgwMCkKKwkJcmV0dXJuIGZhbHNlOworCisJY29uZCA9IGNvbmRpdGlvbiAmIDB4MDAwMEZGMDA7CisJY29uZCA9IGNvbmQgPj4gODsKKwlpZiAoKF9pbnRlcmZhY2UgJiBjb25kKSA9PSAwICYmIGNvbmQgIT0gMHgwNykKKwkJcmV0dXJuIGZhbHNlOworCisJY29uZCA9IGNvbmRpdGlvbiAmIDB4MDBGRjAwMDA7CisJY29uZCA9IGNvbmQgPj4gMTY7CisJaWYgKChfcGxhdGZvcm0gJiBjb25kKSA9PSAwICYmIGNvbmQgIT0gMHgwRikKKwkJcmV0dXJuIGZhbHNlOworCXJldHVybiB0cnVlOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBBR0NfVEFCXzFULlRYVAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdTMyIGFycmF5X2FnY190YWJfMXRfODE4OGVbXSA9IHsKKwkJMHhDNzgsIDB4RkIwMDAwMDEsCisJCTB4Qzc4LCAweEZCMDEwMDAxLAorCQkweEM3OCwgMHhGQjAyMDAwMSwKKwkJMHhDNzgsIDB4RkIwMzAwMDEsCisJCTB4Qzc4LCAweEZCMDQwMDAxLAorCQkweEM3OCwgMHhGQjA1MDAwMSwKKwkJMHhDNzgsIDB4RkEwNjAwMDEsCisJCTB4Qzc4LCAweEY5MDcwMDAxLAorCQkweEM3OCwgMHhGODA4MDAwMSwKKwkJMHhDNzgsIDB4RjcwOTAwMDEsCisJCTB4Qzc4LCAweEY2MEEwMDAxLAorCQkweEM3OCwgMHhGNTBCMDAwMSwKKwkJMHhDNzgsIDB4RjQwQzAwMDEsCisJCTB4Qzc4LCAweEYzMEQwMDAxLAorCQkweEM3OCwgMHhGMjBFMDAwMSwKKwkJMHhDNzgsIDB4RjEwRjAwMDEsCisJCTB4Qzc4LCAweEYwMTAwMDAxLAorCQkweEM3OCwgMHhFRjExMDAwMSwKKwkJMHhDNzgsIDB4RUUxMjAwMDEsCisJCTB4Qzc4LCAweEVEMTMwMDAxLAorCQkweEM3OCwgMHhFQzE0MDAwMSwKKwkJMHhDNzgsIDB4RUIxNTAwMDEsCisJCTB4Qzc4LCAweEVBMTYwMDAxLAorCQkweEM3OCwgMHhFOTE3MDAwMSwKKwkJMHh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pZiAoKF9ib2FyZCA9PSBjb25kKSAmJiBjb25kICE9IDB4MDApCisJCXJldHVybiBmYWxzZTsKKworCWNvbmQgPSBjb25kaXRpb24gJiAweDAwMDBGRjAwOworCWNvbmQgPSBjb25kID4+IDg7CisJaWYgKChfaW50ZXJmYWNlICYgY29uZCkgPT0gMCAmJiBjb25kICE9IDB4MDcpCisJCXJldHVybiBmYWxzZTsKKworCWNvbmQgPSBjb25kaXRpb24gJiAweDAwRkYwMDAwOworCWNvbmQgPSBjb25kID4+IDE2OworCWlmICgoX3BsYXRmb3JtICYgY29uZCkgPT0gMCAmJiBjb25kICE9IDB4MEYpCisJCXJldHVybiBmYWxzZTsKKwlyZXR1cm4gdHJ1ZTsKK30KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgTUFDX1JFRy5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHUzMiBhcnJheV9NQUNfUkVHXzgxODhFW10gPSB7CisJCTB4MDI2LCAweDAwMDAwMDQxLAorCQkweDAyNywgMHgwMDAwMDAzNSwKKwkJMHg0MjgsIDB4MDAwMDAwMEEsCisJCTB4NDI5LCAweDAwMDAwMDEwLAorCQkweDQzMCwgMHgwMDAwMDAwMCwKKwkJMHg0MzEsIDB4MDAwMDAwMDEsCisJCTB4NDMyLCAweDAwMDAwMDAyLAorCQkweDQzMywgMHgwMDAwMDAwNCwKKwkJMHg0MzQsIDB4MDAwMDAwMDUsCisJCTB4NDM1LCAweDAwMDAwMDA2LAorCQkweDQzNiwgMHgwMDAwMDAwNywKKwkJMHg0MzcsIDB4MDAwMDAwMDgsCisJCTB4NDM4LCAweDAwMDAwMDAwLAorCQkweDQzOSwgMHgwMDAwMDAwMCwKKwk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V0dXJuIGZhbHNlOworCisJY29uZCA9IENvbmRpdGlvbiAmIDB4MDAwMEZGMDA7CisJY29uZCA9IGNvbmQgPj4gODsKKwlpZiAoKF9pbnRlcmZhY2UgJiBjb25kKSA9PSAwICYmIGNvbmQgIT0gMHgwNykKKwkJcmV0dXJuIGZhbHNlOworCisJY29uZCA9IENvbmRpdGlvbiAmIDB4MDBGRjAwMDA7CisJY29uZCA9IGNvbmQgPj4gMTY7CisJaWYgKChfcGxhdGZvcm0gJiBjb25kKSA9PSAwICYmIGNvbmQgIT0gMHgwRikKKwkJcmV0dXJuIGZhbHNlOworCXJldHVybiB0cnVlOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBSYWRpb0FfMVQuVFhUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB1MzIgQXJyYXlfUmFkaW9BXzFUXzgxODhFW10gPSB7CisJCTB4MDAwLCAweDAwMDMwMDAwLAorCQkweDAwOCwgMHgwMDA4NDAwMCwKKwkJMHgwMTgsIDB4MDAwMDA0MDcsCisJCTB4MDE5LCAweDAwMDAwMDEyLAorCQkweDAxRSwgMHgwMDA4MDAwOSwKKwkJMHgwMUYsIDB4MDAwMDA4ODAsCisJCTB4MDJGLCAweDAwMDFBMDYwLAorCQkweDAzRiwgMHgwMDAwMDAwMCwKKwkJMHgwNDIsIDB4MDAwMDYwQzAsCisJCTB4MDU3LCAweDAwMEQwMDAwLAorCQkweDA1OCwgMHgwMDBCRTE4MCwKKwkJMHgwNjcsIDB4MDAwMDE1NTIsCisJCTB4MDgzLCAweDAwMDAwMDAwLAorCQkweDBCMCwgMHgwMDBGRjhGQywKKwkJMHgwQjEsIDB4MDAwNTQ0MDAsCisJCTB4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UgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyB3aXRoCisgKiB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwKKyAqIDUxIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAsIFVTQQorICoKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaW5jbHVkZSAib2RtX3ByZWNvbXAuaCIKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1EZWZpbmUgTG9jYWwgQ29uc3RhbnQtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogIDIwMTAvMDQvMjUgTUggRGVmaW5lIHRoZSBtYXggdHggcG93ZXIgdHJhY2tpbmcgdHggYWdjIHBvd2VyLiAqLworI2RlZmluZQkJT0RNX1RYUFdSVFJBQ0tfTUFYX0lEWF84OEUJCTYKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1EZWZpbmUgTG9jYWwgQ29uc3RhbnQtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFR4IFBvd2VyIFRyYWNraW5nICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKiBGdW5jdGlvbjoJT0R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Y250KSwgIiVzXyIsIElTX0NISVBfVkVORE9SX1RTTUMoY2hpcF92ZXJzKSA/CisJCSAgICAgICAiVFNNQyIgOiAiVU1DIik7CisJaWYgKElTX0FfQ1VUKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIkFfQ1VUXyIpOworCWVsc2UgaWYgKElTX0JfQ1VUKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIkJfQ1VUXyIpOworCWVsc2UgaWYgKElTX0NfQ1VUKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIkNfQ1VUXyIpOworCWVsc2UgaWYgKElTX0RfQ1VUKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIkRfQ1VUXyIpOworCWVsc2UgaWYgKElTX0VfQ1VUKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIkVfQ1VUXyIpOworCWVsc2UKKwkJY250ICs9IHNwcmludGYoKGJ1ZitjbnQpLCAiVU5LTk9XTl9DVVQoJWQpXyIsCisJCQkgICAgICAgY2hpcF92ZXJzLkNVVFZlcnNpb24pOworCisJaWYgKElTXzFUMVIoY2hpcF92ZXJzKSkKKwkJY250ICs9IHNwcmludGYoKGJ1ZitjbnQpLCAiMVQxUl8iKTsKKwllbHNlIGlmIChJU18xVDJSKGNoaXBfdmVycykpCisJCWNudCArPSBzcHJpbnRmKChidWYrY250KSwgIjFUMlJfIik7CisJZWxzZSBpZiAoSVNfMlQyUihjaGlwX3ZlcnMpKQorCQljbnQgKz0gc3ByaW50ZigoYnVmK2NudCksICIyVDJSXyIpOworCWVsc2UKKwkJY250ICs9IHNwcmludGYoKGJ1ZitjbnQpLCAiVU5LTk9XTl9SRlRZUEUoJWQpXyIsCisJCQkgICAgICAgY2hpcF92ZXJzLlJGVHlwZSk7CisKKwljbnQgKz0gc3ByaW50ZigoYnVmK2NudCksICJSb21WZ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TUI6CisJCXJldCA9IERFU0NfUkFURTFNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9DQ0tfUkFURV8yTUI6CisJCXJldCA9IERFU0NfUkFURTJNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9DQ0tfUkFURV81TUI6CisJCXJldCA9IERFU0NfUkFURTVfNU07CisJCWJyZWFrOworCWNhc2UgSUVFRTgwMjExX0NDS19SQVRFXzExTUI6CisJCXJldCA9IERFU0NfUkFURTExTTsKKwkJYnJlYWs7CisJY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzZNQjoKKwkJcmV0ID0gREVTQ19SQVRFNk07CisJCWJyZWFrOworCWNhc2UgSUVFRTgwMjExX09GRE1fUkFURV85TUI6CisJCXJldCA9IERFU0NfUkFURTlNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMTJNQjoKKwkJcmV0ID0gREVTQ19SQVRFMTJNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMThNQjoKKwkJcmV0ID0gREVTQ19SQVRFMThNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMjRNQjoKKwkJcmV0ID0gREVTQ19SQVRFMjRNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMzZNQjoKKwkJcmV0ID0gREVTQ19SQVRFMzZNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfNDhNQjoKKwkJcmV0ID0gREVTQ19SQVRFNDhNOworCQlicmVhazsKKwljYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfNTRNQjoKKwkJcmV0ID0gREVTQ19SQVRFNTRNOworCQlicmVhazsKKwlkZWZhdWx0OgorCQlicmVhazsKKwl9CisJcmV0dXJuIHJldDsKK30KKwordm9pZCBIYWxTZXRCcmF0ZUNmZyhzdHJ1Y3QgYWRhcHRlciAqYWRhcHQsIHU4ICpicmF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MCwvKiAgNDEsIC0xNC41ZEIgKi8KKwkweDBiNDAwMDJkLC8qICA0MiwgLTE1LjBkQiAqLworfTsKKwordTggQ0NLU3dpbmdUYWJsZV9DaDFfQ2gxM1tDQ0tfVEFCTEVfU0laRV1bOF0gPSB7CisJezB4MzYsIDB4MzUsIDB4MmUsIDB4MjUsIDB4MWMsIDB4MTIsIDB4MDksIDB4MDR9LCAvKiAgMCwgKzBkQiAqLworCXsweDMzLCAweDMyLCAweDJiLCAweDIzLCAweDFhLCAweDExLCAweDA4LCAweDA0fSwgLyogIDEsIC0wLjVkQiAqLworCXsweDMwLCAweDJmLCAweDI5LCAweDIxLCAweDE5LCAweDEwLCAweDA4LCAweDAzfSwgLyogIDIsIC0xLjBkQiAqLworCXsweDJkLCAweDJkLCAweDI3LCAweDFmLCAweDE4LCAweDBmLCAweDA4LCAweDAzfSwgLyogIDMsIC0xLjVkQiAqLworCXsweDJiLCAweDJhLCAweDI1LCAweDFlLCAweDE2LCAweDBlLCAweDA3LCAweDAzfSwgLyogIDQsIC0yLjBkQiAqLworCXsweDI4LCAweDI4LCAweDIyLCAweDFjLCAweDE1LCAweDBkLCAweDA3LCAweDAzfSwgLyogIDUsIC0yLjVkQiAqLworCXsweDI2LCAweDI1LCAweDIxLCAweDFiLCAweDE0LCAweDBkLCAweDA2LCAweDAzfSwgLyogIDYsIC0zLjBkQiAqLworCXsweDI0LCAweDIzLCAweDFmLCAweDE5LCAweDEzLCAweDBjLCAweDA2LCAweDAzfSwgLyogIDcsIC0zLjVkQiAqLworCXsweDIyLCAweDIxLCAweDFkLCAweDE4LCAweDExLCAweDBiLCAweDA2LCAweDAyfSwgLyogIDgsIC00LjBkQiAqLworCXsweDIwLCAweDIwLCAweDFiLCAweDE2LCAweDExLCAweDA4LCAweDA1LCAweDAyfSwgLyogIDksIC00LjVkQiAqLworCXsweDFmLCAweDFlLCAweDFhLCAweDE1LCAweDEwLCAweDBhLCAweDA1LCAweDAyfSwgLyogIDEwLCAtNS4w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ZWdBNzQpOworCQkJT0RNX1NldEJCUmVnKHBETV9PZG0sIDB4ODE4LCBCSVQyOCwgMHgwKTsKKworCQkJaWYgKHBETV9PZG0tPlN1cHBvcnRJQ1R5cGUgPT0gT0RNX1JUTDg3MjNBKQorCQkJCU9ETV9TZXRCQlJlZyhwRE1fT2RtLCAweDg3NCwgQklUNSwgMHgwKTsgLyogUmVnODc0WzVdPTFiJzAgKi8KKwkJfQorCQlwRE1fUFNUYWJsZS0+UHJlUkZTdGF0ZSA9IHBETV9QU1RhYmxlLT5DdXJSRlN0YXRlOworCX0KK30KKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBSQVRSIE1BU0sgKi8KKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIDMgUmF0ZSBBZGFwdGl2ZSAqLworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCit2b2lkIG9kbV9SYXRlQWRhcHRpdmVNYXNrSW5pdChzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqcERNX09kbSkKK3sKKwlzdHJ1Y3Qgb2RtX3JhdGVfYWRhcHQgKnBPZG1SQSA9ICZwRE1fT2RtLT5SYXRlQWRhcHRpdmU7CisKKwlwT2RtUkEtPlR5cGUgPSBETV9UeXBlX0J5RHJpdmVyOworCWlmIChwT2RtUkEtPlR5cGUgPT0gRE1fVHlwZV9CeURyaXZlcikKKwkJcERNX09kbS0+YlVzZVJBTWFzayA9IHRydWU7CisJZWxzZQorCQlwRE1fT2RtLT5iVXNlUkFNYXNrID0gZmFsc2U7CisKKwlwT2RtUkEtPlJBVFJTdGF0ZSA9IER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G1vZGlmeSBpdCBhcyBuZWVkZWQgKi8KKy8qICAqLworCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFNXIEFudGVubmEgRGl2ZXJzaXR5ICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCit2b2lkIG9kbV9Td0FudERpdkluaXQoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKnBETV9PZG0pCit7Cit9CisKK3ZvaWQgT0RNX1N3QW50RGl2Q2hrUGVyUGt0UnNzaShzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqcERNX09kbSwgdTggU3RhdGlvbklELCBzdHJ1Y3Qgb2RtX3BoeV9zdGF0dXNfaW5mbyAqcFBoeUluZm8pCit7Cit9CisKK3ZvaWQgb2RtX1N3QW50RGl2Q2hrQW50U3dpdGNoKHN0cnVjdCBvZG1fZG1fc3RydWN0ICpwRE1fT2RtLCB1OCBTdGVwKQoreworfQorCit2b2lkIE9ETV9Td0FudERpdlJlc3RBZnRlckxpbmsoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKnBETV9PZG0pCit7Cit9CisKK3ZvaWQgb2RtX1N3QW50RGl2Q2hrQW50U3dpdGNoQ2FsbGJhY2sodm9pZCAqRnVuY3Rpb25Db250ZXh0KQoreworfQorCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFNXIEFudGVubmEgRGl2ZXJzaXR5ICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKK3ZvaWQgb2RtX0luaXRIeWJyaWRBbnREaXYoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKnBETV9PZG0pCit7CisJaWYgKCEocERNX09kbS0+U3VwcG9ydEFia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gbGluayAqLworCQkJT0RNX1NldEJCUmVnKGRtX29kbSwgT0RNX1JFR19JR0lfQV8xMU4sIEJJVDcsIDEpOwkvKiBSZWdDNTBbN109MSdiMQkJZW5hYmxlIEhXIEFudERpdiAqLworCQkJT0RNX1NldEJCUmVnKGRtX29kbSwgT0RNX1JFR19DQ0tfQU5URElWX1BBUkExXzExTiwgQklUMTUsIDEpOyAvKiBFbmFibGUgQ0NLIEFudERpdiAqLworCQkJaWYgKGRtX29kbS0+QW50RGl2VHlwZSA9PSBDR19UUlhfSFdfQU5URElWKQorCQkJCU9ETV9TZXRCQlJlZyhkbV9vZG0sIE9ETV9SRUdfVFhfQU5UX0NUUkxfMTFOLCBCSVQyMSwgMSk7IC8qIFJlZzgwY1syMV09MSdiMQkJZnJvbSBUWCBJbmZvICovCisJCQlkbV9mYXRfdGJsLT5iQmVjb21lTGlua2VkID0gZG1fb2RtLT5iTGlua2VkOworCQl9CisJfQorCWlmICgoZG1fb2RtLT5BbnREaXZUeXBlID09IENHX1RSWF9IV19BTlRESVYpIHx8IChkbV9vZG0tPkFudERpdlR5cGUgPT0gQ0dDU19SWF9IV19BTlRESVYpKQorCQlvZG1fSFdBbnREaXYoZG1fb2RtKTsKK30KKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBEeW5hbWljIFByaW1hcnkgQ0NBICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKK3ZvaWQgb2RtX1ByaW1hcnlDQ0FfSW5pdChzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqZG1fb2RtKQoreworCXN0cnVjdCBkeW5fcHJpbWFyeV9jY2EgKlByaW1hcnlDQ0EgPSAmKGRtX29kbS0+RE1fUHJpQ0NBKTsKKworCVByaW1hcnlDQ0EtPkR1cFJUU19mbGFnID0gMDsKKwlQcmltYXJ5Q0N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aW9uIDIgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzCisgKiBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbi4KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQKKyAqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcgd2l0aAorICogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sCisgKiA1MSBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLCBVU0EKKyAqCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKgorICogTW9kdWxlOglydGw4MTkyY19yZjYwNTIuYwkoIFNvdXJjZSBDIEZpbGUpCisgKgorICogTm90ZToJUHJvdmlkZSBSRiA2MDUyIHNlcmllcyByZWxhdGl2ZSBBUEkuCisgKgorICogRnVuY3Rpb246CisgKgorICogRXhwb3J0OgorICoKKyAqIEFiYnJldjoKKyAqCisgKiBIaXN0b3J5OgorICogRGF0YQkJCVdobwkJUmVtYXJrCisgKgorICogMDkvMjUvMjAwOAlNSEMJCUNyZWF0ZSBpbml0aWFsIHZlcnNpb24uCisgKiAxMS8wNS8yMDA4CU1IQwkJQWRkIEFQSSBmb3IgdHcgcG93ZXIgc2V0dGluZy4KKyAqCisgKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZGVmaW5lIF9SVEw4MTg4RV9SRjYwNTJfQ18KKworI2luY2x1ZGUgPG9zZGVwX3NlcnZpY2UuaD4KKyNpbmNsdWRlIDxkcnZfdHlwZXMuaD4KKworI2luY2x1ZGUgPHJ0bDgxODhlX2hhbC5oPgorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLURlZmluZSBMb2NhbCBDb25zdGFudC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiAgRGVmaW5lIGxvY2FsIHN0cnVjdHVyZSBmb3IgZGVidWchISEhISAqLworc3RydWN0IHJmX3NoYWRvdyB7CisJLyogIFNoYWRvdyByZWdpc3RlciB2YWx1ZSAqLworCXUzMiBWYWx1ZTsKKwkvKiAgQ29tcGFyZSBvciBub3QgZmxhZyAqLworCXU4IENvbXBhcmU7CisJLyogIFJlY29yZCBJZiBpdCBoYWQgZXZlciBtb2RpZmllZCB1bnByZWRpY3RlZCAqLworCXU4IEVycm9yT3JOb3Q7CisJLyogIFJlY29ydmVyIEZsYWcgKi8KKwl1OCBSZWNvcnZlcjsKKwkvKiAgKi8KKwl1OCBEcml2ZXJfV3JpdGU7Cit9OworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLURlZmluZSBMb2NhbCBDb25zdGFudC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyotL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3N0b24sIE1BIDAyMTEwLCBVU0EKKyAqCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAqLworLyogIEZpbGUgTmFtZTogSGFsODE4OEVSZWcuaCAqLworLyogICovCisvKiAgRGVzY3JpcHRpb246ICovCisvKiAgKi8KKy8qICBUaGlzIGZpbGUgaXMgZm9yIFJUTDgxODhFIHJlZ2lzdGVyIGRlZmluaXRpb24uICovCisvKiAgKi8KKy8qICAqLworLyogICovCisjaWZuZGVmCV9fSEFMXzgxODhFX1JFR19IX18KKyNkZWZpbmUgX19IQUxfODE4OEVfUkVHX0hfXworCisvKiAgKi8KKy8qICBSZWdpc3RlciBEZWZpbml0aW9uICovCisvKiAgKi8KKyNkZWZpbmUgVFJYX0FOVERJVl9QQVRIICAgICAgICAgICAgIDB4ODYwCisjZGVmaW5lIFJYX0FOVERJVl9QQVRIICAgICAgICAgICAgICAweGIyYworI2RlZmluZQlPRE1fUl9BX0FHQ19DT1JFMV84MTg4RQkJMHhjNTAKKworCisvKiAgKi8KKy8qICBCaXRtYXAgRGVmaW5pdGlvbiAqLworLyogICovCisjZGVmaW5lCUJJVF9GQV9SRVNFVF84MTg4RQkJCUJJVDAKKworCisjZW5kaWYKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTg4ZXUvaW5jbHVkZS9IYWxIV0ltZzgxODhFX0JCLmggYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsSFdJbWc4MTg4RV9CQi5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmU1NzQ1MjEKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsSFdJbWc4MTg4RV9CQi5oCkBAIC0wLDAgKzEsNDQgQEAKKy8q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orKgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fSU5DX0JCXzgxODhFX0hXX0lNR19ICisjZGVmaW5lIF9fSU5DX0JCXzgxODhFX0hXX0lNR19ICisKKy8qIHN0YXRpYyBib29sIENoZWNrQ29uZGl0aW9uKGNvbnN0IHUzMiBDb25kaXRpb24sIGNvbnN0IHUzMiBIZXgpOyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgQUdDX1RBQl8xVC5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworZW51bSBIQUxfU1RBVFVTIE9ETV9SZWFkQW5kQ29uZmlnX0FHQ19UQUJfMVRfODE4OEUoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKm9kbSk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBQSFlfUkVHXzFULlRYVAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitlbnVtIEhBTF9TVEFUVVMgT0RNX1JlYWRBbmRDb25maWdfUEhZX1JFR18xVF84MTg4RShzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqb2RtKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFBIWV9SRUdfUE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IGJ1dCBXSVRIT1VUCisqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyogbW9yZSBkZXRhaWxzLgorKgorKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyB3aXRoCisqIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLAorKiA1MSBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLCBVU0EKKyoKKyoKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfX0lOQ19GV184MTg4RV9IV19JTUdfSAorI2RlZmluZSBfX0lOQ19GV184MTg4RV9IV19JTUdfSAorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBGV19BUC5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBGV19Xb1dMQU4uVFhUCisqKioqK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XMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQKKyogQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yCisqIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvcgorKiBtb3JlIGRldGFpbHMuCisqCisqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFsb25nIHdpdGgKKyogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sCisqIDUxIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAsIFVTQQorKgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fSU5DX01BQ184MTg4RV9IV19JTUdfSAorI2RlZmluZSBfX0lOQ19NQUNfODE4OEVfSFdfSU1HX0gKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIE1BQ19SRUcuVFhUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2VudW0gSEFMX1NUQVRVUyBPRE1fUmVhZEFuZENvbmZpZ19NQUNfUkVHXzgxODhFKHN0cnVjdCB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UxJVFkgb3IKKyogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisqIG1vcmUgZGV0YWlscy4KKyoKKyogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcgd2l0aAorKiB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwKKyogNTEgRnJhbmtsaW4gU3RyZWV0LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQSAwMjExMCwgVVNBCisqCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZm5kZWYgX19JTkNfUkZfODE4OEVfSFdfSU1HX0gKKyNkZWZpbmUgX19JTkNfUkZfODE4OEVfSFdfSU1HX0gKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICBSYWRpb0FfMVQuVFhUCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitlbnVtIEhBTF9TVEFUVVMgT0RNX1JlYWRBbmRDb25maWdfUmFkaW9BXzFUXzgxODhFKHN0cnVjdCBvZG1fZG1fc3RydWN0ICpvZG0pOworCisjZW5kaWYgLyogIGVuZCBvZiBIV0lNR19TVVBQT1JUICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsUGh5UmYuaCBiL2RyaXZlcnMvc3RhZ2luZy9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gQVguMjUgRXRoZXJuZXQgUGFja2V0ICAqLworI2RlZmluZSBFVEhfUF9JRUVFUFVQCTB4MGEwMAkJLyogWGVyb3ggSUVFRTgwMi4zIFBVUCBwYWNrZXQgICAqLworI2RlZmluZSBFVEhfUF9JRUVFUFVQQVQJMHgwYTAxCQkvKiBYZXJveCBJRUVFODAyLjMgUFVQCQkqLworI2RlZmluZSBFVEhfUF9ERUMgICAgICAgMHg2MDAwICAgICAgICAgIC8qIERFQyBBc3NpZ25lZCBwcm90byAgICAgICAgICAgKi8KKyNkZWZpbmUgRVRIX1BfRE5BX0RMICAgIDB4NjAwMSAgICAgICAgICAvKiBERUMgRE5BIER1bXAvTG9hZCAgICAgICAgICAgICovCisjZGVmaW5lIEVUSF9QX0ROQV9SQyAgICAweDYwMDIgICAgICAgICAgLyogREVDIEROQSBSZW1vdGUgQ29uc29sZSAgICAgICAqLworI2RlZmluZSBFVEhfUF9ETkFfUlQgICAgMHg2MDAzICAgICAgICAgIC8qIERFQyBETkEgUm91dGluZyAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgRVRIX1BfTEFUICAgICAgIDB4NjAwNCAgICAgICAgICAvKiBERUMgTEFUICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEVUSF9QX0RJQUcgICAgICAweDYwMDUgICAgICAgICAgLyogREVDIERpYWdub3N0aWNzICAgICAgICAgICAgICAqLworI2RlZmluZSBFVEhfUF9DVVNUICAgICAgMHg2MDA2ICAgICAgICAgIC8qIERFQyBDdXN0b21lciB1c2UgICAgICAgICAgICAgKi8KKyNkZWZpbmUgRVRIX1BfU0NBICAgICAgIDB4NjAwNyAgICAgICAgICAvKiBERUMgU3lzdGVtcyBDb21tcyBBcmNoICAgICAgICovCisjZGVmaW5lIEVUSF9QX1JBUlAgICAgICAweDgwMzUJCS8qIFJldmVyc2UgQWRkciBSZXMgcGFja2V0CSovCisjZGVmaW5lIEVUSF9QX0FUQUxLCTB4ODA5QgkJLyogQXBwbGV0YWxrI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oKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmbmRlZiBfX0lPQ1RMX0NGRzgwMjExX0hfXworI2RlZmluZSBfX0lPQ1RMX0NGRzgwMjExX0hfXworCitzdHJ1Y3QgcnR3X3dkZXZfaW52aXRfaW5mbyB7CisJdTggdG9rZW47CisJdTggZmxhZ3M7CisJdTggc3RhdHVzOworCXU4IHJlcV9vcF9jaDsKKwl1OCByc3Bfb3BfY2g7Cit9OworCisjZGVmaW5lIHJ0d193ZGV2X2ludml0X2luZm9faW5pdChpbnZpdF9pbmZvKSBcCisJZG8geyBcCisJCShpbnZpdF9pbmZvKS0+dG9rZW4gPSAwOyBcCisJCShpbnZpdF9pbmZvKS0+ZmxhZ3MgPSAweDAwOyBcCisJCShpbnZpdF9pbmZvKS0+c3RhdHVzID0gMHhmZjsgXAorCQkoaW52aXRfaW5mbyktPnJlcV9vcF9jaCA9IDA7IFwKKwkJKGludml0X2luZm8pLT5yc3Bfb3BfY2ggPSAwOyBcCisJfSB3aGlsZSAoMCkKKworc3RydWN0IHJ0d193ZGV2X3ByaXYgeworCXN0cnVjdCB3aXJlbGVzc19kZXYgKnJ0d193ZGV2OworCisJc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyOworCisJc3RydWN0IGNmZzgwMjExX3NjYW5fcmVxdWVzdCAqc2Nhbl9yZXF1ZXN0OworCXNwaW5sb2NrX3Qgc2Nhbl9yZXFfbG9jazsKKworCXN0cnVjdCBuZXRfZGV2aWNlICpwbW9uX25kZXY7LyogZm9yIG1vbml0b3IgaW50ZXJmYWNlICovCisJY2hhciBpZm5hbWVfbW9uW0lGTkFNU0laICsgMV07IC8qIG5hbWUgb2YgbW9uaXRvciBpbnRlcmZhY2UgKi8KKworCXU4IHAycF9lbmFibGVkOworCisJdTggcHJvdmRpc2NfcmVxX2lzc3VlZDsKKworCXN0cnVjdCBydHdfd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U9ETV9SRl9QQVRIX0IgPSAxLCAgIC8qIFJhZGlvIFBhdGggQiAqLworCU9ETV9SRl9QQVRIX0MgPSAyLCAgIC8qIFJhZGlvIFBhdGggQyAqLworCU9ETV9SRl9QQVRIX0QgPSAzLCAgIC8qIFJhZGlvIFBhdGggRCAqLworfTsKKworZW51bSBPRE1fUkZfQ09OVEVOVCB7CisJb2RtX3JhZGlvYV90eHQgPSAweDEwMDAsCisJb2RtX3JhZGlvYl90eHQgPSAweDEwMDEsCisJb2RtX3JhZGlvY190eHQgPSAweDEwMDIsCisJb2RtX3JhZGlvZF90eHQgPSAweDEwMDMKK307CisKK2VudW0gb2RtX2JiX2NvbmZpZ190eXBlIHsKKyAgICBDT05GSUdfQkJfUEhZX1JFRywKKyAgICBDT05GSUdfQkJfQUdDX1RBQiwKKyAgICBDT05GSUdfQkJfQUdDX1RBQl8yRywKKyAgICBDT05GSUdfQkJfQUdDX1RBQl81RywKKyAgICBDT05GSUdfQkJfUEhZX1JFR19QRywKK307CisKKy8qICBTdGF0dXMgY29kZSAqLworZW51bSBydF9zdGF0dXMgeworCVJUX1NUQVRVU19TVUNDRVNTLAorCVJUX1NUQVRVU19GQUlMVVJFLAorCVJUX1NUQVRVU19QRU5ESU5HLAorCVJUX1NUQVRVU19SRVNPVVJDRSwKKwlSVF9TVEFUVVNfSU5WQUxJRF9DT05URVhULAorCVJUX1NUQVRVU19JTlZBTElEX1BBUkFNRVRFUiwKKwlSVF9TVEFUVVNfTk9UX1NVUFBPUlQsCisJUlRfU1RBVFVTX09TX0FQSV9GQUlMRUQsCit9OworCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIDMgRElHICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworZW51bSBkbV9kaWdfb3AgeworCVJUX1RZUEVfVEhSRVNIX0hJR0gJ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MQkJCTB4MzAwLyogMHgxMDAgKi8KKyNkZWZpbmUJCURNX0RJR19GQV9USDIJCQkweDQwMC8qIDB4MjAwICovCisvKiB0aGlzIGlzIGZvciA5MmQgKi8KKyNkZWZpbmUJCURNX0RJR19GQV9USDBfOTJECQkweDEwMAorI2RlZmluZQkJRE1fRElHX0ZBX1RIMV85MkQJCTB4NDAwCisjZGVmaW5lCQlETV9ESUdfRkFfVEgyXzkyRAkJMHg2MDAKKworI2RlZmluZQkJRE1fRElHX0JBQ0tPRkZfTUFYCQkxMgorI2RlZmluZQkJRE1fRElHX0JBQ0tPRkZfTUlOCQktNAorI2RlZmluZQkJRE1fRElHX0JBQ0tPRkZfREVGQVVMVAkJMTAKKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIEFHQyBSWCBIaWdoIFBvd2VyIE1vZGUgKi8KKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworI2RlZmluZQkgIExOQV9Mb3dfR2Fpbl8xCQkweDY0CisjZGVmaW5lCSAgTE5BX0xvd19HYWluXzIJCTB4NUEKKyNkZWZpbmUJICBMTkFfTG93X0dhaW5fMwkJMHg1OAorCisjZGVmaW5lCSAgRkFfUlhIUF9USDEJCQk1MDAwCisjZGVmaW5lCSAgRkFfUlhIUF9USDIJCQkxNTAwCisjZGVmaW5lCSAgRkFfUlhIUF9USDMJCQk4MDAKKyNkZWZpbmUJICBGQV9SWEhQX1RINAkJCTYwMAorI2RlZmluZQkgIEZBX1JYSFBfVEg1CQkJNTAwCisKKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBFRENBICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIER5bmFtaWMgVHggUG93ZXIgKi8KKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogRHluYW1pYyBUeCBQb3dlciBDb250cm9sIFRocmVzaG9sZCAqLworI2RlZmluZQkJVFhfUE9XRVJfTkVBUl9GSUVMRF9USFJFU0hfTFZMMgk3NAorI2RlZmluZQkJVFhfUE9XRVJfTkVBUl9GSUVMRF9USFJFU0hfTFZMMQk2NworI2RlZmluZQkJVFhfUE9XRVJfTkVBUl9GSUVMRF9USFJFU0hfQVAJCTB4M0YKKworI2RlZmluZQkJVHhIaWdoUHdyTGV2ZWxfTm9ybWFsCQkwCisjZGVmaW5lCQlUeEhpZ2hQd3JMZXZlbF9MZXZlbDEJCTEKKyNkZWZpbmUJCVR4SGlnaFB3ckxldmVsX0xldmVsMgkJMgorI2RlZmluZQkJVHhIaWdoUHdyTGV2ZWxfQlQxCQkzCisjZGVmaW5lCQlUeEhpZ2hQd3JMZXZlbF9CVDIJCTQKKyNkZWZpbmUJCVR4SGlnaFB3ckxldmVsXzE1CQk1CisjZGVmaW5lCQlUeEhpZ2hQd3JMZXZlbF8zNQkJNgorI2RlZmluZQkJVHhIaWdoUHdyTGV2ZWxfNTAJCTcKKyNkZWZpbmUJCVR4SGlnaFB3ckxldmVsXzcwCQk4CisjZGVmaW5lCQlUeEhpZ2hQd3JMZXZlbF8xMDAJCTkKKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFJhdGUgQWRhcHRpdmUgKi8KKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworI2RlZmluZQkJRE1fUkFUUl9TVEFfSU5JVAkJMAorI2RlZmluZQkJRE1fUkFUUl9TVEFfSElHSAkJMQorI2RlZmluZQkJRE1fUkFUUl9TVEFfTUlERExFCQkyCisjZGVmaW5lCQlETV9SQVRSX1NUQV9MT1cJCQkzCisKKy8qIDM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBCQiBQb3dlciBTYXZlICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworCitlbnVtIGRtXzFyX2NjYSB7CisJQ0NBXzFSID0gMCwKKwlDQ0FfMlIgPSAxLAorCUNDQV9NQVggPSAyLAorfTsKKworZW51bSBkbV9yZiB7CisJUkZfU2F2ZSA9IDAsCisJUkZfTm9ybWFsID0gMSwKKwlSRl9NQVggPSAyLAorfTsKKworLyogMz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIEFudGVubmEgRGl2ZXJzaXR5ICovCisvKiAzPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KK2VudW0gZG1fc3dhcyB7CisJQW50ZW5uYV9BID0gMSwKKwlBbnRlbm5hX0IgPSAyLAorCUFudGVubmFfTUFYID0gMywKK307CisKKy8qICBNYXhpbWFsIG51bWJlciBvZiBhbnRlbm5hIGRldGVjdGlvbiBtZWNoYW5pc20gbmVlZHMgdG8gcGVyZm9ybS4gKi8KKyNkZWZpbmUJTUFYX0FOVEVOTkFfREVURUNUSU9OX0NOVAkxMAorCisvKiAgRXh0ZXJuIEdsb2JhbCBWYXJpYWJsZXMuICovCisjZGVmaW5lCU9GRE1fVEFCTEVfU0laRV85MkMJMzcKKyNkZWZpbmUJT0ZETV9UQUJMRV9TSVpFXzkyRAk0MworI2RlZmluZQlDQ0tfVEFCTEVfU0laRQkJMzMKKworZXh0ZXJuCXUzMiBP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IyNfaWMKKyNkZWZpbmUgX2JpdF9hbGwoX25hbWUpCQkJQklUXyMjX25hbWUKKyNkZWZpbmUgX2JpdF9pYyhfbmFtZSwgX2ljKQkJQklUXyMjX25hbWUjI19pYworCisvKiAgX2NhdDogaW1wbGVtZW50ZWQgYnkgVG9rZW4tUGFzdGluZyBPcGVyYXRvci4gKi8KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisjZGVmaW5lIE9ETV9SRUdfRElHXzExTgkJMHhDNTAKKyNkZWZpbmUgT0RNX1JFR19ESUdfMTFBQwkweERERAorCitPRE1fUkVHKERJRyxfcERNX09kbSkKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisjZGVmaW5lIF9yZWdfMTFOKF9uYW1lKQkJCU9ETV9SRUdfIyNfbmFtZSMjXzExTgorI2RlZmluZSBfcmVnXzExQUMoX25hbWUpCQlPRE1fUkVHXyMjX25hbWUjI18xMUFDCisjZGVmaW5lIF9iaXRfMTFOKF9uYW1lKQkJCU9ETV9CSVRfIyNfbmFtZSMjXzExTgorI2RlZmluZSBfYml0XzExQUMoX25hbWUpCQlPRE1fQklUXyMjX25hbWUjI18xMUFDCisKKyNkZWZpbmUgX2NhdChfbmFtZSwgX2ljX3R5cGUsIF9mdW5jKQkJCQkJXAorCSgJCQkJCQkJCVwKKwkJKChfaWNfdHlwZSkgJiBPRE1fSUNfMTFOX1NFUklFUykgPyBfZnVuYyMjXzExTihfbmFtZSkgOglcCisJCV9mdW5jIyNfMTFBQyhfbmFtZSkJCQkJCVwKKwkpCisKKy8qICBfbmFtZTogbmFtZSBvZiByZWdpc3RlciBvciBiaXQuICovCisvKiAgRXhhbXBsZTogIk9ETV9SRUcoUl9BX0FHQ19DT1JFMSwgcERNX09kbSkiICovCisvKiAgICAgICAgIGdldHMgIk9ETV9SX0FfQUdDX0NPUkUxIiBvciAiT0RNX1JfQV9BR0NfQ09SRTFfODE5MkMiLAorICoJICAgZGVwZW5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VVJUkVfR0xPQkFMX01VVEVYKF9NdXRleENvdW50ZXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl3aGlsZSAoYXRvbWljX2luY19yZXR1cm4oKGF0b21pY190ICopJihfTXV0ZXhDb3VudGVyKSkgIT0gMSlcCisJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlhdG9taWNfZGVjKChhdG9taWNfdCAqKSYoX011dGV4Q291bnRlcikpOyAgICAgICAgXAorCQltc2xlZXAoMTApOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBSRUxFQVNFX0dMT0JBTF9NVVRFWChfTXV0ZXhDb3VudGVyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJYXRvbWljX2RlYygoYXRvbWljX3QgKikmKF9NdXRleENvdW50ZXIpKTsgICAgICAgIFwKK30KKworc3RhdGljIGlubGluZSBpbnQgcnR3X25ldGlmX3F1ZXVlX3N0b3BwZWQoc3RydWN0IG5ldF9kZXZpY2UgKnBuZXRkZXYpCit7CisJcmV0dXJuICBuZXRpZl90eF9xdWV1ZV9zdG9wcGVkKG5ldGRldl9nZXRfdHhfcXVldWUocG5ldGRldiwgMCkpICYmCisJCW5ldGlmX3R4X3F1ZXVlX3N0b3BwZWQobmV0ZGV2X2dldF90eF9xdWV1ZShwbmV0ZGV2LCAxKSkgJiYKKwkJbmV0aWZfdHhfcXVldWVfc3RvcHBlZChuZXRkZXZfZ2V0X3R4X3F1ZXVlKHBuZXRkZXYsIDIpKSAm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uIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcgd2l0aAorICogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sCisgKiA1MSBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLCBVU0EKKyAqCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZm5kZWYgX19SVEw4MTg4RV9ETV9IX18KKyNkZWZpbmUgX19SVEw4MTg4RV9ETV9IX18KK2VudW17CisJVVBfTElOSywKKwlET1dOX0xJTkssCit9OworLyogIGR1cGxpY2F0ZSBjb2RlLHdpbGwgbW92ZSB0byBPRE0gIyMjIyMjIyMjICovCisjZGVmaW5lIElRS19NQUNfUkVHX05VTQkJNAorI2RlZmluZSBJUUtfQUREQV9SRUdfTlVNCQkxNgorI2RlZmluZSBJUUtfQkJfUkVHX05VTQkJCTkKKyNkZWZpbmUgSFBfVEhFUk1BTF9OVU0JCTgKKy8qICBkdXBsaWNhdGUgY29kZSx3aWxsIG1vdmUgdG8gT0RNICMjIyMjIyMjIyAqLworc3RydWN0CWRtX3ByaXYgeworCXU4CURNX1R5cGU7CisJdTgJRE1GbGFnOworCXU4CUluaXRETUZsYWc7CisJdTMyCUluaXRPRE1GbGFnOworCisJLyogIFVwcGVyIGFuZCBMb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EZGRkZGRkZGCS8qICBUaGUgdmFsdWUgd2hlbiB0aGUgTklDIGlzIHVucGx1Z2dlZCBmb3IgUENJLiAqLworCisvKiAgODE5MkMgRUZVU0UgKi8KKyNkZWZpbmUJCUhXU0VUX01BWF9TSVpFCQkJMjU2CisjZGVmaW5lCQlIV1NFVF9NQVhfU0laRV84OEUJCTUxMgorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorSGVyZSB0aGUgcmVnaXN0ZXIgZGVmaW5lcyBhcmUgZm9yIDkyQy4gV2hlbiB0aGUgZGVmaW5lIGlzIGFzIHNhbWUgd2l0aCA5MkMsCit3ZSB3aWxsIHVzZSB0aGUgOTJDJ3MgZGVmaW5lIGZvciB0aGUgY29uc2lzdGVuY3kKK1NvIHRoZSBmb2xsb3dpbmcgZGVmaW5lcyBmb3IgOTJDIGlzIG5vdCBlbnRpcmUhISEhISEKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qCitCYXNlZCBvbiBEYXRhc2hlZXQgVjMzLS0tMDkwNDAxCitSZWdpc3RlciBTdW1tYXJ5CitDdXJyZW50IElPUkVHIE1BUAorMHgwMDAwaCB+IDB4MDBGRmggICBTeXN0ZW0gQ29uZmlndXJhdGlvbiAoMjU2IEJ5dGVzKQorMHgwMTAwaCB+IDB4MDFGRmggICBNQUNUT1AgR2VuZXJhbCBDb25maWd1cmF0aW9uICgyNTYgQnl0ZXMpCisweDAyMDBoIH4gMHgwMjdGaCAgIFRYRE1BIENvbmZpZ3VyYXRpb24gKDEyOCBCeXRlcykK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ibGljIExpY2Vuc2UgYWxvbmcgd2l0aAorICogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sCisgKiA1MSBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLCBVU0EKKyAqCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE1vZHVsZToJX19SVFdfTVBfUEhZX1JFR0RFRl9IXworICoKKyAqCisgKiBOb3RlOgkxLiBEZWZpbmUgUE1BQy9CQiByZWdpc3RlciBtYXAKKyAqCQkJMi4gRGVmaW5lIFJGIHJlZ2lzdGVyIG1hcAorICoJCQkzLiBQTUFDL0JCIHJlZ2lzdGVyIGJpdCBtYXNrLgorICoJCQk0LiBSRiByZWcgYml0IG1hc2suCisgKgkJCTUuIE90aGVyIEJCL1JGIHJlbGF0aXZlIGRlZmluaXRpb24uCisgKgorICoKKyAqIEV4cG9ydDoJQ29uc3RhbnRzLCBtYWNybywgZnVuY3Rpb25zKEFQSSksIGdsb2JhbCB2YXJpYWJsZXMoTm9uZSkuCisgKgorICogQWJicmV2OgorICoKKyAqIEhpc3Rvcnk6CisgKglEYXRhCQkJV2hvCQlSZW1hcmsKKyAqCTA4LzA3LzIwMDcJTUhDCQkxLiBQb3J0aW5nIGZyb20gOXggc2VyaWVzIFBIWUNGRy5oLgorICoJCQkJCQkyLiBSZW9yZ2FuaXplIGNvZGUgYXJjaGl0ZWN0dXJlLgorICoJMDkvMjUvMjAwOAlNSAkJMS4gQWRkIFJMNjA1MiByZWdpc3RlciBkZWZpbml0aW9uCisgKgorICoqKioqKioqKioqKioq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HwgXAorCQkJY3B1X3RvX2xlMTYoKHVuc2lnbmVkIHNob3J0KSgweGZmZjAgJiAobnVtIDw8IDQpKSk7IFwKKwl9IHdoaWxlICgwKQorCisjZGVmaW5lIFNldER1cmF0aW9uKHBidWYsIGR1cikgXAorCSooX19sZTE2ICopKChzaXplX3QpKHBidWYpICsgMikgPSBjcHVfdG9fbGUxNigweGZmZmYgJiAoZHVyKSkKKworCisjZGVmaW5lIFNldFByaW9yaXR5KHBidWYsIHRpZCkJXAorCSooX19sZTE2ICopKHBidWYpIHw9IGNwdV90b19sZTE2KHRpZCAmIDB4ZikKKworI2RlZmluZSBHZXRQcmlvcml0eShwYnVmKQkoKGxlMTZfdG9fY3B1KCooX19sZTE2ICopKHBidWYpKSkgJiAweGYpCisKKyNkZWZpbmUgU2V0RU9TUChwYnVmLCBlb3NwKQlcCisJCSooX19sZTE2ICopKHBidWYpIHw9IGNwdV90b19sZTE2KChlb3NwICYgMSkgPDwgNCkKKworI2RlZmluZSBTZXRBY2twb2xpY3kocGJ1ZiwgYWNrKQlcCisJKihfX2xlMTYgKikocGJ1ZikgfD0gY3B1X3RvX2xlMTYoKGFjayAmIDMpIDw8IDUpCisKKyNkZWZpbmUgR2V0QWNrcG9saWN5KHBidWYpICgoKGxlMTZfdG9fY3B1KCooX19sZTE2ICopcGJ1ZikpID4+IDUpICYgMHgzKQorCisjZGVmaW5lIEdldEFNc2R1KHBidWYpICgoKGxlMTZfdG9fY3B1KCooX19sZTE2ICopcGJ1ZikpID4+IDcpICYgMHgxKQorCisjZGVmaW5lIFNldEFNc2R1KHBidWYsIGFtc2R1KQlcCisJKihfX2xlMTYgKikocGJ1ZikgfD0gY3B1X3RvX2xlMTYoKGFtc2R1ICYgMSkgPDwgNykKKworI2RlZmluZSBHZXRBaWQocGJ1ZikJKGxlMTZfdG9fY3B1KCooX19sZTE2ICopKChzaXplX3QpKHBidWYpICsgMikpICYgMHgzZmZmKQorCisjZGVmaW5lIEdldFRpZChwYnVmKQkobG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mluZSBORElTXzgwMl8xMV9SU1NJIGxvbmcgICAgICAgICAgIC8qICBpbiBkQm0gKi8KKworc3RydWN0IG5kaXNfODAyXzExX3NzaWQgeworCXUzMiAgU3NpZExlbmd0aDsKKwl1OCAgU3NpZFszMl07Cit9OworCitlbnVtIE5ESVNfODAyXzExX05FVFdPUktfVFlQRSB7CisJTmRpczgwMl8xMUZILAorCU5kaXM4MDJfMTFEUywKKwlOZGlzODAyXzExT0ZETTUsCisJTmRpczgwMl8xMU9GRE0yNCwKKwlOZGlzODAyXzExTmV0d29ya1R5cGVNYXggICAgLyogIGR1bW15IHVwcGVyIGJvdW5kICovCit9OworCitzdHJ1Y3QgbmRpc184MDJfMTFfY29uZmlnX2ZoIHsKKwl1MzIgICAgICAgICAgIExlbmd0aDsJCS8qICBMZW5ndGggb2Ygc3RydWN0dXJlICovCisJdTMyICAgICAgICAgICBIb3BQYXR0ZXJuOwkvKiAgQXMgZGVmaW5lZCBieSA4MDIuMTEsIE1TQiBzZXQgKi8KKwl1MzIgICAgICAgICAgIEhvcFNldDsJCS8qICB0byBvbmUgaWYgbm9uLTgwMi4xMSAqLworCXUzMiAgICAgICAgICAgRHdlbGxUaW1lOwkvKiAgdW5pdHMgYXJlIEt1c2VjICovCit9OworCisvKgorICoJRlcgd2lsbCBvbmx5IHNhdmUgdGhlIGNoYW5uZWwgbnVtYmVyIGluIERTQ29uZmlnLgorICoJT0RJIEhhbmRsZXIgd2lsbCBjb252ZXJ0IHRoZSBjaGFubmVsIG51bWJlciB0byBmcmVxLiBudW1iZXIuCisgKi8KK3N0cnVjdCBuZGlzXzgwMl8xMV9jb25maWcgeworCXUzMiAgICAgICAgICAgTGVuZ3RoOyAgICAgICAgICAgICAvKiAgTGVuZ3RoIG9mIHN0cnVjdHVyZSAqLworCXUzMiAgICAgICAgICAgQmVhY29uUGVyaW9kOyAgICAgICAvKiAgdW5pdHMgYXJlIEt1c2VjICovCisJdTMyICAgICAgICAgICBBVElNV2luZG93OyAgICAgIC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CAqKSZtYXhfYXZhaWxhYmxlX3NpemUsIGZhbHNlKTsKKwkJaWYgKChhZGRyK2NudHMpID4gbWF4X2F2YWlsYWJsZV9zaXplKSB7CisJCQlEQkdfODhFKCIlczogYWRkcigweCVYKStjbnRzKCVkKSBwYXJhbWV0ZXIgZXJyb3IhXG4iLCBfX2Z1bmNfXywgYWRkciwgY250cyk7CisJCQllcnIgPSAtRUZBVUxUOworCQkJZ290byBleGl0OworCQl9CisKKwkJaWYgKHJ0d19lZnVzZV9tYXBfd3JpdGUocGFkYXB0ZXIsIGFkZHIsIGNudHMsIHNldGRhdGEpID09IF9GQUlMKSB7CisJCQlEQkdfODhFKCIlczogcnR3X2VmdXNlX21hcF93cml0ZSBlcnJvciEhXG4iLCBfX2Z1bmNfXyk7CisJCQllcnIgPSAtRUZBVUxUOworCQkJZ290byBleGl0OworCQl9CisJfSBlbHNlIGlmIChzdHJjbXAodG1wWzBdLCAidmlkcGlkIikgPT0gMCkgeworCQlpZiAodG1wWzFdID09IE5VTEwpIHsKKwkJCWVyciA9IC1FSU5WQUw7CisJCQlnb3RvIGV4aXQ7CisJCX0KKworCQkvKiAgcGlkdmlkLCBkYTBiNzg4MSAqLworCQlhZGRyID0gRUVQUk9NX1ZJRF84OEVFOworCQljbnRzID0gc3RybGVuKHRtcFsxXSk7CisJCWlmIChjbnRzJTIpIHsKKwkJCWVyciA9IC1FSU5WQUw7CisJCQlnb3RvIGV4aXQ7CisJCX0KKwkJY250cyAvPSAyOworCQlpZiAoY250cyA9PSAwKSB7CisJCQllcnIgPSAtRUlOVkFMOworCQkJZ290byBleGl0OworCQl9CisKKwkJREJHXzg4RSgiJXM6IGFkZHIgPSAweCVYXG4iLCBfX2Z1bmNfXywgYWRkcik7CisJCURCR184OEUoIiVzOiBjbnRzID0lZFxuIiwgX19mdW5jX18sIGNudHMpOworCQlEQkdfODhFKCIlczogVklEL1BJRCA9JXNcbiIsIF9fZnVuY19fLCB0bXBbMV0pOworCisJCWZvciAoamogPS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CQkvKiAweDAzICovCisKKy8qICBmb3IgTU0gRFRWIHBsYXRmb3JtICovCisJcnR3X2dldF9hcF9pbmZvLAkJLyogMHgwNCAqLworCisJcnR3X3NldF9waWQsCQkJLyogMHgwNSAqLworCXJ0d193cHNfc3RhcnQsCQkJLyogMHgwNiAqLworCisJcnR3X3d4X2dldF9zZW5zaXRpdml0eSwJCS8qIDB4MDcgKi8KKwlydHdfd3hfc2V0X210a193cHNfcHJvYmVfaWUsCS8qIDB4MDggKi8KKwlydHdfd3hfc2V0X210a193cHNfaWUsCQkvKiAweDA5ICovCisKKy8qICBTZXQgQ2hhbm5lbCBkZXBlbmQgb24gdGhlIGNvdW50cnkgY29kZSAqLworCXJ0d193eF9zZXRfY2hhbm5lbF9wbGFuLAkvKiAweDBBICovCisKKwlydHdfZGJnX3BvcnQsCQkJLyogMHgwQiAqLworCXJ0d193eF93cml0ZV9yZiwJCS8qIDB4MEMgKi8KKwlydHdfd3hfcmVhZF9yZiwJCQkvKiAweDBEICovCisKKwlydHdfbXBfc2V0LAkJCS8qIDB4MEUgKi8KKwlydHdfbXBfZ2V0LAkJCS8qIDB4MEYgKi8KKwlydHdfcDJwX3NldCwJCQkvKiAweDEwICovCisJcnR3X3AycF9nZXQsCQkJLyogMHgxMSAqLworCXJ0d19wMnBfZ2V0MiwJCQkvKiAweDEyICovCisKKwlOVUxMLAkJCQkvKiAweDEzICovCisJcnR3X3RkbHMsCQkJLyogMHgxNCAqLworCXJ0d190ZGxzX2dldCwJCQkvKiAweDE1ICovCisKKwlydHdfcG1fc2V0LAkJCS8qIDB4MTYgKi8KKwlydHdfd3hfcHJpdl9udWxsLAkJLyogMHgxNyAqLworCXJ0d19yZXJlZ19uZF9uYW1lLAkJLyogMHgxOCAqLworCXJ0d193eF9wcml2X251bGwsCQkvKiAweDE5ICovCisKKwlydHdfbXBfZWZ1c2Vfc2V0LAkJLyogMHgxQSAqLworCXJ0d19tcF9lZnVzZV9nZXQsCQkvKiAweDFCICovCisJTlV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SAwMjExMCwgVVNBCisgKgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworI2RlZmluZSBfT1NERVBfU0VSVklDRV9DXworCisjaW5jbHVkZSA8b3NkZXBfc2VydmljZS5oPgorI2luY2x1ZGUgPGRydl90eXBlcy5oPgorI2luY2x1ZGUgPHJlY3Zfb3NkZXAuaD4KKyNpbmNsdWRlIDxsaW51eC92bWFsbG9jLmg+CisjaW5jbHVkZSA8cnR3X2lvY3RsX3NldC5oPgorCisvKgorKiBUcmFuc2xhdGUgdGhlIE9TIGRlcGVuZGVudCBAcGFyYW0gZXJyb3JfY29kZSB0byBPUyBpbmRlcGVuZGVudCBSVFdfU1RBVFVTX0NPREUKKyogQHJldHVybjogb25lIG9mIFJUV19TVEFUVVNfQ09ERQorKi8KK2lubGluZSBpbnQgUlRXX1NUQVRVU19DT0RFKGludCBlcnJvcl9jb2RlKQoreworCWlmIChlcnJvcl9jb2RlID49IDApCisJCXJldHVybiBfU1VDQ0VTUzsKKwlyZXR1cm4gX0ZBSUw7Cit9CisKK3UzMiBydHdfYXRvaSh1OCAqcykKK3sKKwlpbnQgbnVtID0gMCwgZmxhZyA9IDA7CisJaW50IGk7CisJZm9yIChpID0gMDsgaSA8PSBzdHJsZW4ocyk7IGkrKykgeworCQlpZiAoc1tpXSA+PSAnMCcgJiYgc1tpXSA8PSAnOScpCisJCQludW0gPSBudW0gKiAxMCArIHNbaV0gLSAnMCc7CisJCWVsc2UgaWYgKHNbMF0gPT0gJy0nICYmIGkgPT0gMCkKKwkJCWZsYWcgPSAxOworCQllbHNlCisJCQlicmVhazsKKwl9CisJaWYgKGZsYWcgPT0gMSkKKwkJbnVtID0gbnVtICogLTE7CisJIHJldHVybiBudW07Cit9CisKK2lubGluZSB1OCAqX3J0d192bWFsbG9jKHUzMiBzeikKK3sKKwl1OAkqcGJ1ZjsKKwlwYnVmID0gd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ZCBydHdfc2xlZXBfc2NoZWR1bGFibGUoaW50IG1zKQoreworCXUzMiBkZWx0YTsKKworCWRlbHRhID0gKG1zICogSFopLzEwMDA7LyogbXMpICovCisJaWYgKGRlbHRhID09IDApCisJCWRlbHRhID0gMTsvKiAgMSBtcyAqLworCXNldF9jdXJyZW50X3N0YXRlKFRBU0tfSU5URVJSVVBUSUJMRSk7CisJaWYgKHNjaGVkdWxlX3RpbWVvdXQoZGVsdGEpICE9IDApCisJCXJldHVybjsKK30KKwordm9pZCBydHdfbXNsZWVwX29zKGludCBtcykKK3sKKwltc2xlZXAoKHVuc2lnbmVkIGludCltcyk7Cit9CisKK3ZvaWQgcnR3X3VzbGVlcF9vcyhpbnQgdXMpCit7CisJaWYgKDEgPCAodXMvMTAwMCkpCisJCW1zbGVlcCgxKTsKKwllbHNlCisJCW1zbGVlcCgodXMvMTAwMCkgKyAxKTsKK30KKwordm9pZCBydHdfbWRlbGF5X29zKGludCBtcykKK3sKKwltZGVsYXkoKHVuc2lnbmVkIGxvbmcpbXMpOworfQorCit2b2lkIHJ0d191ZGVsYXlfb3MoaW50IHVzKQoreworCXVkZWxheSgodW5zaWduZWQgbG9uZyl1cyk7Cit9CisKK3ZvaWQgcnR3X3lpZWxkX29zKHZvaWQpCit7CisJeWllbGQoKTsKK30KKworI2RlZmluZSBSVFdfU1VTUEVORF9MT0NLX05BTUUgInJ0d193aWZpIgorCitpbmxpbmUgdm9pZCBydHdfc3VzcGVuZF9sb2NrX2luaXQodm9pZCkKK3sKK30KKworaW5saW5lIHZvaWQgcnR3X3N1c3BlbmRfbG9ja191bmluaXQodm9pZCkKK3sKK30KKworaW5saW5lIHZvaWQgcnR3X2xvY2tfc3VzcGVuZCh2b2lkKQoreworfQorCitpbmxpbmUgdm9pZCBydHdfdW5sb2NrX3N1c3BlbmQodm9pZCkKK3sKK30KKworaW5saW5lIHZvaWQgQVRPTUlDX1NFVChBVE9NSUNfVCAqdiwgaW50IGkpCit7CisJYXRvbWljX3Nld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WJicmV2OgotCi0gSGlzdG9yeToKLQlEYXRhCQlXaG8JCVJlbWFyawotCi0JMDUvMDYvMjAwOCAgYW15CQlDcmVhdGUgaW5pdGlhbCB2ZXJzaW9uIHBvcnRpbmcgZnJvbSB3aW5kb3dzIGRyaXZlci4KLQotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoKKyAqICAoYykgQ29weXJpZ2h0IDIwMDgsIFJlYWxURUsgVGVjaG5vbG9naWVzIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KKyAqCisgKiAgTW9kdWxlOglyODE5eHVzYl9jbWRwa3QuYworICoJCShSVEw4MTkwIFRYL1JYIGNvbW1hbmQgcGFja2V0IGhhbmRsZXIgU291cmNlIEMgRmlsZSkKKyAqCisgKiAgTm90ZToJVGhlIG1vZHVsZSBpcyByZXNwb25zaWJsZSBmb3IgaGFuZGxpbmcgVFggYW5kIFJYIGNvbW1hbmQgcGFja2V0LgorICoJCTEuIFRYIDogU2VuZCBzZXQgYW5kIHF1ZXJ5IGNvbmZpZ3VyYXRpb24gY29tbWFuZCBwYWNrZXQuCisgKgkJMi4gUlggOiBSZWNlaXZlIHR4IGZlZWRiYWNrLCBiZWFjb24gc3RhdGUsIHF1ZXJ5IGNvbmZpZ3VyYXRpb24KKyAqCQkJY29tbWFuZCBwYWNrZXQuCisgKgorICogIEZ1bmN0aW9uOgorICoKKyAqICBFeHBvcnQ6CisgKgorICogIEFiYnJldjoKKyAqCisgKiAgSGlzdG9yeToKKyAqCisgKglEYXRlCQlXaG8JCVJlbWFyaworICoJMDUvMDYvMjAwOAlhbXkJCUNyZWF0ZSBpbml0aWFsIHZlcnNpb24gcG9ydGluZyBmcm9tCisgKgkJCQkJd2luZG93cyBkcml2ZXIuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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X2Rldik7CiAJaWYgKCFwYnBjdGxfZGV2X2IpCkBAIC0zOTI3LDcgKzM5MjcsNyBAQAogfQogCiAKLWludCBicF93YWl0X2F0X3B3dXBfc3RhdHVzKGJwY3RsX2Rldl90ICpwYnBjdGxfZGV2KQoraW50IGJwX3dhaXRfYXRfcHd1cF9zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAlpZiAocGJwY3RsX2Rldi0+YnBfY2FwcyAmIFNXX0NUTF9DQVApIHsKIAkJaWYgKHBicGN0bF9kZXYtPmJwX2V4dF92ZXIgPj0gMHg4KQpAQCAtMzkzOCw3ICszOTM4LDcgQEAKIAlyZXR1cm4gQlBfTk9UX0NBUDsKIH0KIAotaW50IGJwX2h3X3Jlc2V0X3N0YXR1cyhicGN0bF9kZXZfdCAqcGJwY3RsX2RldikKK2ludCBicF9od19yZXNldF9zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAogCWlmIChwYnBjdGxfZGV2LT5icF9jYXBzICYgU1dfQ1RMX0NBUCkgewpAQCAtMzk1Miw3ICszOTUyLDcgQEAKIH0KIAogCi1pbnQgc3RkX25pY19zdGF0dXMoYnBjdGxfZGV2X3QgKnBicGN0bF9kZXYpCitpbnQgc3RkX25pY19zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAlpbnQgc3RhdHVzX3ZhbCA9IDA7CiAKQEAgLTQwMDAsMTAgKzQwMDAsMTAgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKioqKioqKioqKioqKipTV19JTklUKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgYnlwYXNzX2NhcHNfaW5pdChicGN0bF9kZXZfdCAqcGJwY3RsX2RldikK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SA9PSAxKQotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4MGE7CisJCXBoeS0+c2lnbmFsID0gMHgwYTsKICAgICAgICAgZWxzZSAvLyBsb25nIHByZWFtYmxlCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwMjsKKwkJcGh5LT5zaWduYWwgPSAweDAyOwogICAgICAgICBicmVhazsKIAogICAgIGNhc2UgUkFURV8xMU0gOgpAQCAtNzg0LDEwMyArNzgzLDEwMiBAQAogICAgICAgICAgICAgICAgIGJFeHRCaXQgPSB0cnVlOwogICAgICAgICB9CiAgICAgICAgIGlmIChieVByZWFtYmxlVHlwZSA9PSAxKQotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4MGI7CisJCXBoeS0+c2lnbmFsID0gMHgwYjsKICAgICAgICAgZWxzZSAvLyBsb25nIHByZWFtYmxlCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwMzsKKwkJcGh5LT5zaWduYWwgPSAweDAzOwogICAgICAgICBicmVhazsKIAogICAgIGNhc2UgUkFURV82TSA6CiAgICAgICAgIGlmKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5QjsgLy8xMDAxIDEwMTEKKwkJcGh5LT5zaWduYWwgPSAweDliOwogICAgICAgICB9CiAgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhCOyAvLzEwMDAgMTAxMQorCQlwaHktPnNpZ25hbCA9IDB4OGI7CiAgICAgICAgIH0KICAgICAgICAgYnJlYWs7CiAKICAgICBjYXNlIFJBVEVfOU0gOgogICAgICAgICBpZihieVBhY2tldFR5cGUgPT0gUEtfVFlQRV8xMUEpIHsvLzExYSwgNUdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OUY7IC8vMTAwMSAxMTExCisJCXBoeS0+c2lnbmFsID0gMHg5ZjsKICAgICAgICAgfQogICAgICAgICBlbHNlIHsvLzExZywgMi40R0haCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg4RjsgLy8xMDAwIDExMTEKKwkJcGh5LT5zaWduYWwgPSAweDhmOwogICAgICAgICB9CiAgICAgICAgIGJyZWFrOwogCiAgICAgY2FzZSBSQVRFXzEyTSA6CiAgICAgICAgIGlmKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5QTsgLy8xMDAxIDEwMTAKKwkJcGh5LT5zaWduYWwgPSAweDlhOwogICAgICAgICB9CiAgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhBOyAvLzEwMDAgMTAxMAorCQlwaHktPnNpZ25hbCA9IDB4OGE7CiAgICAgICAgIH0KICAgICAgICAgYnJlYWs7CiAKICAgICBjYXNlIFJBVEVfMThNIDoKICAgICAgICAgaWYoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlFOyAvLzEwMDEgMTExMAorCQlwaHktPnNpZ25hbCA9IDB4OWU7CiAgICAgICAgIH0KICAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OEU7IC8vMTAwMCAxMTEwCisJCXBoeS0+c2lnbmFsID0gMHg4ZTsKICAgICAgICAgfQogICAgICAgICBicmVhazsKIAogICAgIGNhc2UgUkFURV8yNE0gOgogICAgICAgICBpZihieVBhY2tldFR5cGUgPT0gUEtfVFlQRV8xMUEpIHsvLzExYSwgNUdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OTk7IC8vMTAwMSAxMDAxCisJCXBoeS0+c2lnbmFsID0gMHg5OTsKICAgICAgICAgfQogICAgICAgICBlbHNlIHsvLzExZywgMi40R0haCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg4OTsgLy8xMDAwIDEwMDEKKwkJcGh5LT5zaWduYWwgPSAweDg5OwogICAgICAgICB9CiAgICAgICAgIGJyZWFrOwogCiAgICAgY2FzZSBSQVRFXzM2TSA6CiAgICAgICAgIGlmKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCi0gICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5RDsgLy8xMDAxIDExMDEKKwkJcGh5LT5zaWduYWwgPSAweDlkOwogICAgICAgICB9CiAgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhEOyAvLzEwMDAgMTEwMQorCQlwaHktPnNpZ25hbCA9IDB4OGQ7CiAgICAgICAgIH0KICAgICAgICAgYnJlYWs7CiAKICAgICBjYXNlIFJBVEVfNDhNIDoKICAgICAgICAgaWYoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDk4OyAvLzEwMDEgMTAwMAorCQlwaHktPnNpZ25hbCA9IDB4OTg7CiAgICAgICAgIH0KICAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4ODg7IC8vMTAwMCAxMDAwCisJCXBoeS0+c2lnbmFsID0gMHg4ODsKICAgICAgICAgfQogICAgICAgICBicmVhazsKIAogICAgIGNhc2UgUkFURV81NE0gOgogICAgICAgICBpZiAoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlDOyAvLzEwMDEgMTEwMAorCQlwaHktPnNpZ25hbCA9IDB4OWM7CiAgICAgICAgIH0KICAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OEM7IC8vMTAwMCAxMTAwCisJCXBoeS0+c2lnbmFsID0gMHg4YzsKICAgICAgICAgfQogICAgICAgICBicmVhazsKIAogICAgIGRlZmF1bHQgOgogICAgICAgICBpZiAoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKLSAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlDOyAvLzEwMDEgMTEwMAorCQlwaHktPnNpZ25hbCA9IDB4OWM7CiAgICAgICAgIH0KICAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgotICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OEM7IC8vMTAwMCAxMTAwCisJCXBoeS0+c2lnbmFsID0gMHg4YzsKICAgICAgICAgfQogICAgICAgICBicmVhazsKICAgICB9CiAKLSAgICBpZiAoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFCKSB7Ci0gICAgICAgICpwYnlQaHlTcnYgPSAweDAwOwotICAgICAgICBpZiAoYkV4dEJpdCkKLSAgICAgICAgICAgICpwYnlQaHlTcnYgPSAqcGJ5UGh5U3J2IHwgMHg4MDsKLSAgICAgICAgKnB3UGh5TGVuID0gKHUxNikgY2JVc0NvdW50OwotICAgIH0KLSAgICBlbHNlIHsKLSAgICAgICAgKnBieVBoeVNydiA9IDB4MDA7Ci0gICAgICAgICpwd1BoeUxlbiA9ICh1MTYpY2JGcmFtZUxlbmd0aDsKLSAgICB9CisJaWYgKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQikgeworCQlwaHktPnNlcnZpY2UgPSAweDAwOworCQlpZiAoYkV4dEJpdCkKKwkJCXBoeS0+c2VydmljZSB8PSAweDgwOworCQlwaHktPmxlbiA9IGNwdV90b19sZTE2KCh1MTYpY2JVc0NvdW50KTsKKwl9IGVsc2UgeworCQlwaHktPnNlcnZpY2UgPSAweDAwOworCQlwaHktPmxlbiA9I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ICAgICAgICAgICAgICAgICAmYWJ5U2lnbmFsWzBdCi0gICAgKTsKKwlCQnZDYWxjdWxhdGVQYXJhbWV0ZXIocERldmljZSwgMTQsCisJCXN3R2V0Q0NLQ29udHJvbFJhdGUocERldmljZSwgUkFURV8xTSksIFBLX1RZUEVfMTFCLCAmcGh5WzBdKTsKIAogICAgIC8vL1JTUElORl9iXzIKLSAgICBCQnZDYWxjdWxhdGVQYXJhbWV0ZXIocERldmljZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAxNCwKLSAgICAgICAgICAgICAgICAgICAgICAgICBzd0dldENDS0NvbnRyb2xSYXRlKHBEZXZpY2UsIFJBVEVfMk0pLAotICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLAotICAgICAgICAgICAgICAgICAgICAgICAgICZhd0xlblsxXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAmYWJ5U2VydlsxXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAmYWJ5U2lnbmFsWzFdCi0gICAgKTsKKwlCQnZDYWxjdWxhdGVQYXJhbWV0ZXIocERldmljZSwgMTQsCisJCXN3R2V0Q0NLQ29udHJvbFJhdGUocERldmljZSwgUkFURV8yTSksIFBLX1RZUEVfMTFCLCAmcGh5WzFdKTsKIAogICAgIC8vUlNQSU5GX2JfNQotICAgIEJCdkNhbGN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAotICAgICAgICAgICAgICAgICAgICAgICAgIHN3R2V0Q0NLQ29udHJvbFJhdGUocERldmljZSwgUkFURV81TSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgUEtfVFlQRV8xMUIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgJmF3TGVuWzJdLAotICAgICAgICAgICAgICAgICAgICAgICAgICZhYnlTZXJ2WzJdLAotICAgICAgICAgICAgICAgICAgICAgICAgICZhYnlTaWduYWxbMl0KLSAgICApOworCUJCdkNhbGN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLCAxNCwKKwkJc3dHZXRDQ0tDb250cm9sUmF0ZShwRGV2aWNlLCBSQVRFXzVNKSwgUEtfVFlQRV8xMUIsICZwaHlbMl0pOwogCiAgICAgLy9SU1BJTkZfYl8xMQotICAgIEJCdkNhbGN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAotICAgICAgICAgICAgICAgICAgICAgICAgIHN3R2V0Q0NLQ29udHJvbFJhdGUocERldmljZSwgUkFURV8xMU0pLAotICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLAotICAgICAgICAgICAgICAgICAgICAgICAgICZhd0xlblszXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAmYWJ5U2VydlszXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAmYWJ5U2lnbmFsWzNdCi0gICAgKTsKKwlCQnZDYWxjdWxhdGVQYXJhbWV0ZXIocERldmljZSwgMTQsCisJCXN3R2V0Q0NLQ29udHJvbFJhdGUocERldmljZSwgUkFURV8xMU0pLCBQS19UWVBFXzExQiwgJnBoeVszXSk7CiAKICAgICAvL1JTUElORl9hXzYKICAgICBDQVJEdkNhbGN1bGF0ZU9GRE1SUGFyYW1ldGVyIChSQVRFXzZNLApAQCAtNDIxLDI1ICszOTUsMjEgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZhYnlUeFJhdGVbOF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYWJ5UnN2VGltZVs4XSk7CiAKLSAgICBhYnlEYXRhWzBdID0gKHU4KShhd0xlblswXSYweEZGKTsKLSAgICBhYnlEYXRhWzFdID0gKHU4KShhd0xlblswXT4+OCk7Ci0gICAgYWJ5RGF0YVsyXSA9IGFieVNpZ25hbFswXTsKLSAgICBhYnlEYXRhWzNdID0gYWJ5U2VydlswXTsKKwlwdXRfdW5hbGlnbmVkKHBoeVswXS5sZW4sICh1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vdGVjdE1vZGU7CiAJaW50IGJOb25FUlBQcmVzZW50OwpAQCAtNzgxLDcgKzc3Miw3IEBACiAKICNkZWZpbmUgRGVxdWV1ZVJDQihIZWFkLCBUYWlsKSAgICAgICAgICAgICAgICAgICAgICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgUFJDQiAgIFJDQiA9IEhlYWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBzdHJ1Y3Qgdm50X3JjYiAqUkNCID0gSGVhZDsgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIGlmICghUkNCLT5OZXh0KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgIFRhaWwgPSBOVUxMOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3Z0NjY1Ni9kZXZpY2VfY2ZnLmggYi9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU2L2RldmljZV9jZmcuaAppbmRleCBlYTY2Yjk3Li5hOTdmN2JiIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU2L2RldmljZV9jZmcuaAorKysgYi9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU2L2RldmljZV9jZmcuaApAQCAtODIsMTggKzgyLDQgQEAKICAgICBWVDMxODQgPSAxCiB9IENISVBfVFlQRSwgKlBDSElQX1RZUEU7CiAKLSNpZmRlZiBWSUFXRVRfREVCVUcKLSNkZWZpbmUgQVNTRVJUKHgpIHsgXAotICAgIGlmICghKHgpKSB7IFwKLQlwcmludGsoS0VSTl9FUlIgImFzc2VydGlvbiAlcyBmYWlsZWQ6IGZpbGUgJXMgbGluZSAlZFxuIiwgI3g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tJUDoKKwkJcFRyYW5zbWl0S2V5LT53VFNDMTVfMCsrOworCQlpZiAocFRyYW5zbWl0S2V5LT53VFNDMTVfMCA9PSAwKQorCQkJcFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2Kys7CiAKLSAgICAgICAgLy9GaWxsIE1JQ0hEUjAKLSAgICAgICAgKnBNSUNIRFIgPSAweDU5OwotICAgICAgICAqKCh1OCAqKShwTUlDSERSKzEpKSA9IDA7IC8vIFR4UHJpb3JpdHkKLSAgICAgICAgbWVtY3B5KHBNSUNIRFIrMiwgJihwTUFDSGVhZGVyLT5hZGRyMlswXSksIDYpOwotICAgICAgICAqKCh1OCAqKShwTUlDSERSKzgpKSA9IEhJQllURShISVdPUkQocFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2KSk7Ci0gICAgICAgICooKHU4ICopKHBNSUNIRFIrOSkpID0gTE9CWVRFKEhJV09SRChwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYpKTsKLSAgICAgICAgKigodTggKikocE1JQ0hEUisxMCkpID0gSElCWVRFKExPV09SRChwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYpKTsKLSAgICAgICAgKigodTggKikocE1JQ0hEUisxMSkpID0gTE9CWVRFKExPV09SRChwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYpKTsKLSAgICAgICAgKigodTggKikocE1JQ0hEUisxMikpID0gSElCWVRFKHBUcmFuc21pdEtleS0+d1RTQzE1XzApOwotICAgICAgICAqKCh1OCAqKShwTUlDSERSKzEzKSkgPSBMT0JZVEUocFRyYW5zbWl0S2V5LT53VFNDMTVfMCk7Ci0gICAgICAgICooKHU4ICopKHBNSUNIRFIrMTQpKSA9IEhJQllURSh3UGF5bG9hZExlbik7Ci0gICAgICAgICooKHU4ICopKHBNSUNIRFIrMTUpKSA9IExPQllURSh3UGF5bG9hZExlbik7CisJCVRLSVB2TWl4S2V5KHBUcmFuc21pdEtleS0+YWJ5S2V5LCBwRGV2aWNlLT5hYnlDd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JCdUdldEZyYW1lVGltZShwRGV2aWNlLT5ieVByZWFtYmxlVHlwZSwgYnlQa3RUeXBlLCAxNCwgcERldmljZS0+YnlUb3BPRkRNQmFzaWNSYXRlKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gKHBEZXZpY2UtPnVTSUZTICsgdUFja1RpbWUpOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICByZXR1cm4gMDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgICBlbHNlIHsvL0ZpcnN0IEZyYWcgb3IgTWlkIEZyYWcKLSAgICAgICAgICAgIGlmKHVGcmFnSWR4ID09ICh1TUFDZnJhZ051bS0yKSl7Ci0gICAgICAgICAgICAJdU5leHRQa3RUaW1lID0gc191R2V0VHhSc3ZUaW1lKHBEZXZpY2UsIGJ5UGt0VHlwZSwgY2JMYXN0RnJhZ21lbnRTaXplLCB3UmF0ZSwgYk5lZWRBY2spOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3UmF0ZSwgYk5lZWRBY2spOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYoYk5lZWRBY2spewotICAgICAgICAgICAgCXVBY2tUaW1lID0gQkJ1R2V0RnJhbWVUaW1lKHBEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlLCBieVBrdFR5cGUsIDE0LCBwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUpOwotICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1QWNrVGltZSArIHVOZXh0UGt0VGltZSk7Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1TmV4dFBrdFRpbWUpOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAgIGJyZWFrOwotCi0gICAgY2FzZSBEQVRBRFVSX0FfRjA6ICAgIC8vREFUQURVUl9BX0YwCi0JICAgIGlmICgoKHVNQUNmcmFnTnVtPT0xKSkgfHwgKGJMYXN0RnJhZz09MSkpIHsvL05vbiBGcmFnIG9yIExhc3QgRnJhZwotICAgICAgICAgICAgaWYoYk5lZWRBY2spewotICAgICAgICAgICAgCXVBY2tUaW1lID0gQkJ1R2V0RnJhbWVUaW1lKHBEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlLCBieVBrdFR5cGUsIDE0LCBwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUpOwotICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1QWNrVGltZSk7Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgIHJldHVybiAwOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0JICAgIGVsc2UgeyAvL0ZpcnN0IEZyYWcgb3IgTWlkIEZyYWcKLQkgICAgICAgIGlmIChieUZCT3B0aW9uID09IEFVVE9fRkJfMCkgewotICAgICAgICAgICAgICAgIGlmICh3UmF0ZSA8IFJBVEVfMThNKQotICAgICAgICAgICAgICAgICAgICB3UmF0ZSA9IFJBVEVfMThNOwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKHdSYXRlID4gUkFURV81NE0pCi0gICAgICAgICAgICAgICAgICAgIHdSYXRlID0gUkFURV81NE07Ci0KLQkgICAgICAgICAgICBpZih1RnJhZ0lkeCA9PSAodU1BQ2ZyYWdOdW0tMikpewotICAgICAgICAgICAgCSAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkxhc3RGcmFnbWVudFNpemUsIHdGQl9PcHQwW0ZCX1JBVEUwXVt3UmF0ZS1SQVRFXzE4TV0sIGJOZWVkQWNrKTsKLSAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgIC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mLT5ieVNpZ25hbEZpZWxkKQotICAgICAgICAgICAgKTsKLSAgICAgICAgICAgIC8vR2V0IER1cmF0aW9uIGFuZCBUaW1lU3RhbXBPZmYKLSAgICAgICAgICAgIHBCdWYtPndEdXJhdGlvbiA9ICh1MTYpc191R2V0RGF0YUR1cmF0aW9uKHBEZXZpY2UsIERBVEFEVVJfQSwgY2JGcmFtZUxlbmd0aCwgYnlQa3RUeXBlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdDdXJyZW50UmF0ZSwgYk5lZWRBY2ssIHVGcmFnSWR4LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNiTGFzdEZyYWdtZW50U2l6ZSwgdU1BQ2ZyYWdOdW0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnlGQk9wdGlvbik7IC8vMTogMi40R0h6Ci0gICAgICAgICAgICBpZih1RE1BSWR4IT1UWVBFX0FUSU1ETUEpIHsKLSAgICAgICAgICAgICAgICBwQnVmLT53VGltZVN0YW1wT2ZmID0gd1RpbWVTdGFtcE9mZltwRGV2aWNlLT5ieVByZWFtYmxlVHlwZSUyXVt3Q3VycmVudFJhdGUlTUFYX1JBVEVdOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcmV0dXJuIChwQnVmLT53RHVyYXRpb24pOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgeyAvLyBEQVRBICYgTUFOQUdFIEZyYW1lCiAgICAgICAgICAgICBpZiAoYnlGQk9wdGlvbiA9PSBBVVRPX0ZCX05PTkUpIHsKLSAgICAgICAgICAgICAgICBQU1R4RGF0YUhlYWRfZyBwQnVmID0gKFBTVHhEYXRhSGVhZF9nKXBUeERhdGFIZWFkOworCQlzdHJ1Y3Qgdm50X3R4X2RhdGFoZWFkX2cgKnBCdWYgPQorCQkJCShzdHJ1Y3Qgdm50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EdXJhdGlvbl9hID0gKHUxNilzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9BLCBjYkZyYW1lTGVuZ3RoLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5UGt0VHlwZSwgd0N1cnJlbnRSYXRlLCBiTmVlZEFjaywgdUZyYWdJZHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JMYXN0RnJhZ21lbnRTaXplLCB1TUFDZnJhZ051bSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUZCT3B0aW9uKTsgLy8xOiAyLjRHSHoKLSAgICAgICAgICAgICAgICBwQnVmLT53RHVyYXRpb25fYiA9ICh1MTYpc191R2V0RGF0YUR1cmF0aW9uKHBEZXZpY2UsIERBVEFEVVJfQiwgY2JGcmFtZUxlbmd0aCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQS19UWVBFXzExQiwgcERldmljZS0+YnlUb3BDQ0tCYXNpY1JhdGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYk5lZWRBY2ssIHVGcmFnSWR4LCBjYkxhc3RGcmFnbWVudFNpemUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdU1BQ2ZyYWdOdW0sIGJ5RkJPcHRpb24pOyAvLzE6IDIuNEdIegorCQlwQnVmLT53RHVyYXRpb25fYSA9IHNfdUdldERhdGFEdXJhdGlvbihwRGV2aWNlLAorCQkJCQkJCWJ5UGt0VHlwZSwgYk5lZWRBY2spOworCQlwQnVmLT53RHVyYXRpb25fYiA9IHNfdUdldERhdGFEdXJhdGlvbihwRGV2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BlLCAmcEJ1Zi0+YWIpOwogICAgICAgICAgICAgLy9HZXQgRHVyYXRpb24gYW5kIFRpbWVTdGFtcE9mZgotICAgICAgICAgICAgcEJ1Zi0+d0R1cmF0aW9uID0gKHUxNilzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9BLCBjYkZyYW1lTGVuZ3RoLCBieVBrdFR5cGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0N1cnJlbnRSYXRlLCBiTmVlZEFjaywgdUZyYWdJZHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JMYXN0RnJhZ21lbnRTaXplLCB1TUFDZnJhZ051bSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUZCT3B0aW9uKTsKLQotICAgICAgICAgICAgaWYodURNQUlkeCE9VFlQRV9BVElNRE1BKSB7Ci0gICAgICAgICAgICAgICAgcEJ1Zi0+d1RpbWVTdGFtcE9mZiA9IHdUaW1lU3RhbXBPZmZbcERldmljZS0+YnlQcmVhbWJsZVR5cGUlMl1bd0N1cnJlbnRSYXRlJU1BWF9SQVRFXTsKLSAgICAgICAgICAgIH0KKwkJcEJ1Zi0+d0R1cmF0aW9uID0gc191R2V0RGF0YUR1cmF0aW9uKHBEZXZpY2UsCisJCQkJYnlQa3RUeXBlLCBiTmVlZEFjayk7CisJCXBCdWYtPndUaW1lU3RhbXBPZmYgPSB2bnRfdGltZV9zdGFtcF9vZmYocERldmljZSwKKwkJCQkJCQkJd0N1cnJlbnRSYXRlKTsKICAgICAgICAgICAgIHJldHVybiAocEJ1Zi0+d0R1cmF0aW9uKTsKICAgICAgICAgfQogICAgIH0KICAgICBlbHNlIGlmIChieVBrdFR5cGUgPT0gUEtfVFlQRV8xMUIpIHsKLSAgICAgICAgICAgIFBTVHhEYXRhSGVhZF9hYiBwQnVmID0gKFBTVHhEYXRhSGVhZF9hYilwVHhEYXRhSGVhZDsKKwkJc3RydWN0IHZudF90eF9kYXRhaGVhZF9hYiAqcEJ1ZiA9CisJCQkoc3RydWN0IHZudF90eF9kYXRhaGVhZF9hYiAqKXBUeERhdGFIZWFkOwogICAgICAgICAgICAgLy9HZXQgU2lnbmFsRmllbGQsU2VydmljZUZpZWxkLExlbmd0aAotICAgICAgICAgICAgQkJ2Q2FsY3VsYXRlUGFyYW1ldGVyKHBEZXZpY2UsIGNiRnJhbWVMZW5ndGgsIHdDdXJyZW50UmF0ZSwgYnlQa3RUeXBlLAotICAgICAgICAgICAgICAgICh1MTYgKikmKHBCdWYtPndUcmFuc21pdExlbmd0aCksICh1OCAqKSYocEJ1Zi0+YnlTZXJ2aWNlRmllbGQpLCAodTggKikmKHBCdWYtPmJ5U2lnbmFsRmllbGQpCi0gICAgICAgICAgICApOworCQlCQnZDYWxjdWxhdGVQYXJhbWV0ZXIocERldmljZSwgY2JGcmFtZUxlbmd0aCwgd0N1cnJlbnRSYXRlLAorCQkJYnlQa3RUeXBlLCAmcEJ1Zi0+YWIpOwogICAgICAgICAgICAgLy9HZXQgRHVyYXRpb24gYW5kIFRpbWVTdGFtcE9mZgotICAgICAgICAgICAgcEJ1Zi0+d0R1cmF0aW9uID0gKHUxNilzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9CLCBjYkZyYW1lTGVuZ3RoLCBieVBrdFR5cGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0N1cnJlbnRSYXRlLCBiTmVlZEFjaywgdUZyYWdJZHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JMYXN0RnJhZ21lbnRTaXplLCB1TUFDZnJhZ051bSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUZCT3B0aW9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0YTsKKwl1MTYgcmVzZXJ2ZWQyOworfSBfX3BhY2tlZDsKIAotICAgIC8vQ1RTCi0gICAgdTggICAgICAgICAgICBieUNUU1NpZ25hbEZpZWxkX2I7Ci0gICAgdTggICAgICAgICAgICBieUNUU1NlcnZpY2VGaWVsZF9iOwotICAgIHUxNiAgICAgICAgICAgIHdDVFNUcmFuc21pdExlbmd0aF9iOwotICAgIHUxNiAgICAgICAgICAgIHdDVFNEdXJhdGlvbl9iYTsKLSAgICB1MTYgICAgICAgICAgICB3UmVzZXJ2ZWQzOwotICAgIFNDVFNEYXRhRiAgICAgICBzQ1RTOworc3RydWN0IHZudF9jdHNfZmIgeworCXN0cnVjdCB2bnRfcGh5X2ZpZWxkIGI7CisJdTE2IHdEdXJhdGlvbl9iYTsKKwl1MTYgd1Jlc2VydmVkOworCXUxNiB3Q1RTRHVyYXRpb25fYmFfZjA7CisJdTE2IHdDVFNEdXJhdGlvbl9iYV9mMTsKKwlzdHJ1Y3QgaWVlZTgwMjExX2N0cyBkYXRhOworCXUxNiByZXNlcnZlZDI7Cit9IF9fcGFja2VkOwogCi0gICAgLy9EYXRhCi0gICAgdTggICAgICAgICAgICBieVNpZ25hbEZpZWxkX2I7Ci0gICAgdTggICAgICAgICAgICBieVNlcnZpY2VGaWVsZF9iOwotICAgIHUxNiAgICAgICAgICAgIHdUcmFuc21pdExlbmd0aF9iOwotICAgIHU4ICAgICAgICAgICAgYnlTaWduYWxGaWVsZF9hOwotICAgIHU4ICAgICAgICAgICAgYnlTZXJ2aWNlRmllbGRfYTsKLSAgICB1MTYgICAgICAgICAgICB3VHJhbnNtaXRMZW5ndGhfYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYjsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYTsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1RpbWVTdGFtcE9mZl9hOwordW5pb24gdm50X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Fuc21pdExlbmd0aF9iOwotICAgIHU4ICAgICAgICAgICAgYnlTaWduYWxGaWVsZF9hOwotICAgIHU4ICAgICAgICAgICAgYnlTZXJ2aWNlRmllbGRfYTsKLSAgICB1MTYgICAgICAgICAgICB3VHJhbnNtaXRMZW5ndGhfYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYjsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYTsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1RpbWVTdGFtcE9mZl9hOwotCi19IFRYX05BRl9HX0NUU19NSUMsICpQVFhfTkFGX0dfQ1RTX01JQzsKLQotdHlwZWRlZiBzdHJ1Y3QgdGFnU1RYX05BRl9HX0JFQUNPTgotewotICAgIHUxNiAgICAgICAgICAgIHdGSUZPQ3RsOwotICAgIHUxNiAgICAgICAgICAgIHdUaW1lU3RhbXA7Ci0KLSAgICAvL0NUUwotICAgIHU4ICAgICAgICAgICAgYnlDVFNTaWduYWxGaWVsZF9iOwotICAgIHU4ICAgICAgICAgICAgYnlDVFNTZXJ2aWNlRmllbGRfYjsKLSAgICB1MTYgICAgICAgICAgICB3Q1RTVHJhbnNtaXRMZW5ndGhfYjsKLSAgICB1MTYgICAgICAgICAgICB3Q1RTRHVyYXRpb25fYmE7Ci0gICAgdTE2ICAgICAgICAgICAgd1Jlc2VydmVkMTsKLSAgICBTQ1RTRGF0YUYgICAgICAgc0NUUzsKLQotICAgIC8vRGF0YQotICAgIHU4ICAgICAgICAgICAgYnlTaWduYWxGaWVsZF9hOwotICAgIHU4ICAgICAgICAgICAgYnlTZXJ2aWNlRmllbGRfYTsKLSAgICB1MTYgICAgICAgICAgICB3VHJhbnNtaXRMZW5ndGhfYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYTsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX2E7Ci0KLX0gVFhfT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lX2FhOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNUeFJydlRpbWVfYmI7Ci0gICAgdTE2ICAgICAgICAgICAgd1Jlc2VydmVkMjsKLSAgICB1MTYgICAgICAgICAgICB3VHhScnZUaW1lX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1R4UnJ2VGltZV9hOwotCi0gICAgLy9SVFMKLSAgICB1OCAgICAgICAgICAgIGJ5UlRTU2lnbmFsRmllbGRfYjsKLSAgICB1OCAgICAgICAgICAgIGJ5UlRTU2VydmljZUZpZWxkX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU1RyYW5zbWl0TGVuZ3RoX2I7Ci0gICAgdTggICAgICAgICAgICBieVJUU1NpZ25hbEZpZWxkX2E7Ci0gICAgdTggICAgICAgICAgICBieVJUU1NlcnZpY2VGaWVsZF9hOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNUcmFuc21pdExlbmd0aF9hOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNEdXJhdGlvbl9iYTsKLSAgICB1MTYgICAgICAgICAgICB3UlRTRHVyYXRpb25fYWE7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU0R1cmF0aW9uX2JiOwotICAgIHUxNiAgICAgICAgICAgIHdSZXNlcnZlZDM7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU0R1cmF0aW9uX2JhX2YwOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNEdXJhdGlvbl9hYV9mMDsKLSAgICB1MTYgICAgICAgICAgICB3UlRTRHVyYXRpb25fYmFfZjE7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU0R1cmF0aW9uX2FhX2YxOwotICAgIFNSVFNEYXRhRiAgICAgICBzUlRTOwotCi0gICAgLy9EYXRhCi0gICAgdTggICAgICAgICAgICBieVNpZ25hbEZpZWxkX2I7Ci0gICAgdTggICAgICAgICAgICBieVNlcnZpY2VGaWVsZF9iOwotICAgIHUxNiAgICAgICAgICAgIHdUcmFuc21pdExlbmd0aF9iOwotICAgIHU4ICAgICAgICAgICAgYnlTaWduYWxGaWVsZF9hOwotICAgIHU4ICAgICAgICAgICAgYnlTZXJ2aWNlRmllbGRfYTsKLSAgICB1MTYgICAgICAgICAgICB3VHJhbnNtaXRMZW5ndGhfYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYjsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYV9mMDsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYV9mMTsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1RpbWVTdGFtcE9mZl9hOwotCi19IFRYX0FGX0dfUlRTLCAqUFRYX0FGX0dfUlRTOwotCi10eXBlZGVmIHN0cnVjdCB0YWdTVFhfQUZfR19SVFNfTUlDCi17Ci0gICAgLy9Sc3ZUaW1lCi0gICAgdTE2ICAgICAgICAgICAgd1JUU1R4UnJ2VGltZV9iYTsKLSAgICB1MTYgICAgICAgICAgICB3UlRTVHhScnZUaW1lX2FhOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNUeFJydlRpbWVfYmI7Ci0gICAgdTE2ICAgICAgICAgICAgd1Jlc2VydmVkMjsKLSAgICB1MTYgICAgICAgICAgICB3VHhScnZUaW1lX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1R4UnJ2VGltZV9hOwotCi0gICAgU01JQ0hEUiAgICAgICAgIHNNSUNIRFI7Ci0KLSAgICAvL1JUUwotICAgIHU4ICAgICAgICAgICAgYnlSVFNTaWduYWxGaWVsZF9iOwotICAgIHU4ICAgICAgICAgICAgYnlSVFNTZXJ2aWNlRmllbGRfYjsKLSAgICB1MTYgICAgICAgICAgICB3UlRTVHJhbnNtaXRMZW5ndGhfYjsKLSAgICB1OCAgICAgICAgICAgIGJ5UlRTU2lnbmFsRmllbGRfYTsKLSAgICB1OCAgICAgICAgICAgIGJ5UlRTU2VydmljZUZpZWxkX2E7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU1RyYW5zbWl0TGVuZ3RoX2E7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU0R1cmF0aW9uX2JhOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNEdXJhdGlvbl9hYTsKLSAgICB1MTYgICAgICAgICAgICB3UlRTRHVyYXRpb25fYmI7Ci0gICAgdTE2ICAgICAgICAgICAgd1Jlc2VydmVkMzsKLSAgICB1MTYgICAgICAgICAgICB3UlRTRHVyYXRpb25fYmFfZjA7Ci0gICAgdTE2ICAgICAgICAgICAgd1JUU0R1cmF0aW9uX2FhX2YwOwotICAgIHUxNiAgICAgICAgICAgIHdSVFNEdXJhdGlvbl9iYV9mMTsKLSAgICB1MTYgICAgICAgICAgICB3UlRTRHVyYXRpb25fYWFfZjE7Ci0gICAgU1JUU0RhdGFGICAgICAgIHNSVFM7Ci0KLSAgICAvL0RhdGEKLSAgICB1OCAgICAgICAgICAgIGJ5U2lnbmFsRmllbGRfYjsKLSAgICB1OCAgICAgICAgICAgIGJ5U2VydmljZUZpZWxkX2I7Ci0gICAgdTE2ICAgICAgICAgICAgd1RyYW5zbWl0TGVuZ3RoX2I7Ci0gICAgdTggICAgICAgICAgICBieVNpZ25hbEZpZWxkX2E7Ci0gICAgdTggICAgICAgICAgICBieVNlcnZpY2VGaWVsZF9hOwotICAgIHUxNiAgICAgICAgICAgIHdUcmFuc21pdExlbmd0aF9hOwotICAgIHUxNiAgICAgICAgICAgIHdEdXJhdGlvbl9iOwotICAgIHUxNiAgICAgICAgICAgIHdEdXJhdGlvbl9hOwotICAgIHUxNiAgICAgICAgICAgIHdEdXJhdGlvbl9hX2YwOwotICAgIHUxNiAgICAgICAgICAgIHdEdXJhdGlvbl9hX2YxOwotICAgIHUxNiAgICAgICAgICAgIHdUaW1lU3RhbXBPZmZfYjsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX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AgICAgICAgICAgYnlTZXJ2aWNlRmllbGRfYTsKLSAgICB1MTYgICAgICAgICAgICB3VHJhbnNtaXRMZW5ndGhfYTsKLSAgICB1MTYgICAgICAgICAgICB3RHVyYXRpb25fYTsKLSAgICB1MTYgICAgICAgICAgICB3VGltZVN0YW1wT2ZmX2E7Ci0gICAgdTE2ICAgICAgICAgICAgd0R1cmF0aW9uX2FfZjA7Ci0gICAgdTE2ICAgICAgICAgICAgd0R1cmF0aW9uX2FfZjE7Ci0KLX0gVFhfQUZfQV9DVFNfTUlDLCAqUFRYX0FGX0FfQ1RTX01JQzsKLQotLy8KLS8vIHVuaW9uIHdpdGggYWxsIG9mIHRoZSBUWCBCdWZmZXIgVHlwZQotLy8KLXR5cGVkZWYgdW5pb24gdGFnVVRYX0JVRkZFUl9DT05UQUlORVIKLXsKLSAgICBUWF9OQUZfR19SVFMgICAgICAgICAgICAgICAgICAgIFJUU19HOwotICAgIFRYX05BRl9HX1JUU19NSUMgICAgICAgICAgICAgICAgUlRTX0dfTUlDOwotICAgIFRYX05BRl9HX0NUUyAgICAgICAgICAgICAgICAgICAgQ1RTX0c7Ci0gICAgVFhfTkFGX0dfQ1RTX01JQyAgICAgICAgICAgICAgICBDVFNfR19NSUM7Ci0gICAgLy9UWF9OQUZfR19CRUFDT04gICAgICAgICAgICAgICAgIEJlYWNvbl9HOwotICAgIFRYX05BRl9BQl9SVFMgICAgICAgICAgICAgICAgICAgUlRTX0FCOwotICAgIFRYX05BRl9BQl9SVFNfTUlDICAgICAgICAgICAgICAgUlRTX0FCX01JQzsKLSAgICBUWF9OQUZfQUJfQ1RTICAgICAgICAgICAgICAgICAgIENUU19BQjsKLSAgICBUWF9OQUZfQUJfQ1RTX01JQyAgICAgICAgICAgICAgIENUU19BQl9NSUM7Ci0gICAgLy9UWF9OQUZfQUJfQkVBQ09OICAgICAgICAgICAgICAgIEJlYWNvbl9BQjsKLSAgICBUWF9BRl9HX1JUUyAgICAgICAgICAgICAgICAgICAgIFJUU19HX0F1dG9GQjsKLSAgICBUWF9BRl9HX1JUU19NSUMgICAgICAgICAgICAgICAgIFJUU19HX0F1dG9GQl9NSUM7Ci0gICAgVFhfQUZfR19DVFMgICAgICAgICAgICAgICAgICAgICBDVFNfR19BdXRvRkI7Ci0gICAgVFhfQUZfR19DVFNfTUlDICAgICAgICAgICAgICAgICBDVFNfR19BdXRvRkJfTUlDOwotICAgIFRYX0FGX0FfUlRTICAgICAgICAgICAgICAgICAgICAgUlRTX0FfQXV0b0ZCOwotICAgIFRYX0FGX0FfUlRTX01JQyAgICAgICAgICAgICAgICAgUlRTX0FfQXV0b0ZCX01JQzsKLSAgICBUWF9BRl9BX0NUUyAgICAgICAgICAgICAgICAgICAgIENUU19BX0F1dG9GQjsKLSAgICBUWF9BRl9BX0NUU19NSUMgICAgICAgICAgICAgICAgIENUU19BX0F1dG9GQl9NSUM7Ci0KLX0gVFhfQlVGRkVSX0NPTlRBSU5FUiwgKlBUWF9CVUZGRVJfQ09OVEFJTkVSOwotCi0vLwotLy8gUmVtb3RlIE5ESVMgbWVzc2FnZSBmb3JtYXQKLS8vCi10eXBlZGVmIHN0cnVjdCB0YWdTVFhfQlVGRkVSCi17Ci0gICAgdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgYnlUeXBlOwotICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5UEtUTk87Ci0gICAgdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdUeEJ5dGVDb3VudDsKLQorc3RydWN0IHZudF90eF9idWZmZXIgeworCXU4IGJ5VHlwZTsKKwl1OCBieVBLVE5POworCXUxNiB3VHhCeXRlQ291bnQ7CiAJdTMyIGFkd1R4S2V5WzRdOwotICAgIHUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RklGT0N0bDsKLSAgICB1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgd1RpbWVTdGFtcDsKLSAgICB1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgd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VsdGlwbGVSZXRyeUZyYW1lczogICAgICV1XG4iCi0JCSAgICAiVHhSZXRyeUxpbWl0RXhjZWVkZWQ6ICAgICAgJXVcbiIKLQkJICAgICJUeERpc2NhcmRzOiAgICAgICAgICAgICAgICAldVxuIgotCQkgICAgIlJ4VW5pY2FzdEZyYW1lczogICAgICAgICAgICV1XG4iCi0JCSAgICAiUnhNdWx0aWNhc3RGcmFtZXM6ICAgICAgICAgJXVcbiIKLQkJICAgICJSeEZyYWdtZW50czogICAgICAgICAgICAgICAldVxuIgotCQkgICAgIlJ4VW5pY2FzdE9jdGV0czogICAgICAgICAgICV1XG4iCi0JCSAgICAiUnhNdWx0aWNhc3RPY3RldHM6ICAgICAgICAgJXVcbiIKLQkJICAgICJSeEZDU0Vycm9yczogICAgICAgICAgICAgICAldVxuIgotCQkgICAgIlJ4RGlzY2FyZHNOb0J1ZmZlcjogICAgICAgICV1XG4iCi0JCSAgICAiVHhEaXNjYXJkc1dyb25nU0E6ICAgICAgICAgJXVcbiIKLQkJICAgICJSeFdFUFVuZGVjcnlwdGFibGU6ICAgICAgICAldVxuIgotCQkgICAgIlJ4TXNnSW5Nc2dGcmFnbWVudHM6ICAgICAgICV1XG4iCi0JCSAgICAiUnhNc2dJbkJhZE1zZ0ZyYWdtZW50czogICAgJXVcbiIKLQkJICAgICJSeERpc2NhcmRzV0VQSUNWRXJyb3I6ICAgICAldVxuIgotCQkgICAgIlJ4RGlzY2FyZHNXRVBFeGNsdWRlZDogICAgICV1XG4iCi0JCSAgICAsCi0JCSAgICAodW5zaWduZWQgaW50KXRhbGxpZXMuVHhVbmljYXN0RnJhbWVzLAotCQkgICAgKHVuc2lnbmVkIGludCl0YWxsaWVzLlR4TXVsdGljYXN0RnJhbWVzLAotCQkgICAgKHVuc2lnbmVkIGludCl0YWxsaWVzLlR4RnJhZ21lbnRzLAotCQkgICAgKHVuc2lnbmVkIGludCl0YWxsaWVzLlR4VW5pY2FzdE9jdGV0cywKLQkJICAgICh1bnNpZ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WdpbmcveGlsbHlidXMvUkVBRE1FCkBAIC0wLDAgKzEsNDAzIEBACisKKyAgICAgICAgICAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAgICAgICAgICAgWGlsbHlidXMgZHJpdmVyIGZvciBnZW5lcmljIEZQR0EgaW50ZXJmYWNlCisgICAgICAgICAgICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworQXV0aG9yOiBFbGkgQmlsbGF1ZXIsIFhpbGx5YnVzIEx0ZC4gKGh0dHA6Ly94aWxseWJ1cy5jb20pCitFbWFpbDogIGVsaS5iaWxsYXVlckBnbWFpbC5jb20gb3IgYXMgYWR2ZXJ0aXNlZCBvbiBYaWxseWJ1cycgc2l0ZS4KKworQ29udGVudHM6CisKKyAtIEludHJvZHVjdGlvbgorICAtLSBCYWNrZ3JvdW5kCisgIC0tIFhpbGx5YnVzIE92ZXJ2aWV3CisKKyAtIFVzYWdlCisgIC0tIFVzZXIgaW50ZXJmYWNlCisgIC0tIFN5bmNocm9uaXphdGlvbgorICAtLSBTZWVrYWJsZSBwaXBlcworCistIEludGVybmFscworICAtLSBTb3VyY2UgY29kZSBvcmdhbml6YXRpb24KKyAgLS0gUGlwZSBhdHRyaWJ1dGVzCisgIC0tIEhvc3QgbmV2ZXIgcmVhZHMgZnJvbSB0aGUgRlBHQQorICAtLSBDaGFubmVscywgcGlwZXMsIGFuZCB0aGUgbWVzc2FnZSBjaGFubmVsCisgIC0tIERhdGEgc3RyZWFtaW5nCisgIC0tIERhdGEgZ3JhbnVsYXJpdHkKKyAgLS0gUHJvYmluZworICAtLSBCdWZmZXIgYWxsb2NhdGlvbgorICAtLSBNZW1vcnkgbWFuYWdlbWVudAorICAtLSBUaGUgIm5vbmVtcHR5IiBtZXNzYWdlIChzdXBwb3J0aW5nIHBvbGwpCisKKworSU5UUk9EVUNUSU9OCis9PT09PT09PT09PT0KKworQmFja2dyb3VuZAorLS0tL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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogSW50ZXJydXB0IGhhbmRsZXJzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLS8qCi0gKiBDYWxsZWQgd2hlbiB0aW1lciBleHBpcmVzLgotICogVGltZXIgaXMgc3RhcnRlZCB3aGVuIENGR19DSEcgaXMgcmVjZWl2ZWQuCi0gKi8KLXN0YXRpYyB2b2lkIGhhbmRsZV9jb25maWcodW5zaWduZWQgbG9uZyBkYXRhKQotewotCXN0cnVjdCBpbXhfdWRjX3N0cnVjdCAqaW14X3VzYiA9ICh2b2lkICopZGF0YTsKLQlzdHJ1Y3QgdXNiX2N0cmxyZXF1ZXN0IHU7Ci0JaW50IHRlbXAsIGNmZywgaW50ZiwgYWx0OwotCi0JbG9jYWxfaXJxX2Rpc2FibGUoKTsKLQotCXRlbXAgPSBfX3Jhd19yZWFkbChpbXhfdXNiLT5iYXNlICsgVVNCX1NUQVQpOwotCWNmZyAgPSAodGVtcCAmIFNUQVRfQ0ZHKSA+PiA1OwotCWludGYgPSAodGVtcCAmIFNUQVRfSU5URikgPj4gMzsKLQlhbHQgID0gIHRlbXAgJiBTVEFUX0FMVFNFVDsKLQotCURfUkVRKGlteF91c2ItPmRldiwKLQkJIjwlcz4gb3JpZyBjb25maWcgQz0lZCwgST0lZCwgQT0lZCAvICIKLQkJInJlcSBjb25maWcgQz0lZCwgST0lZCwgQT0lZFxuIiwKLQkJX19mdW5jX18sIGlteF91c2ItPmNmZywgaW14X3VzYi0+aW50ZiwgaW14X3VzYi0+YWx0LAotCQljZmcsIGludGYsIGFsdCk7Ci0KLQlpZiAoY2ZnID09IDEgfHwgY2ZnID09IDIpIHsKLQotCQlpZiAoaW14X3VzYi0+Y2ZnICE9IGNmZykgewotCQkJdS5iUmVxdWVzdCA9IFVTQl9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wYQotI2RlZmluZSBCTElaWkFSRF9QTExfTU9ERSAgICAgICAgICAgICAgICAgICAgICAweDBjCi0jZGVmaW5lIEJMSVpaQVJEX0NMS19TUkMgICAgICAgICAgICAgICAgICAgICAgIDB4MGUKLSNkZWZpbmUgQkxJWlpBUkRfTUVNX0JBTkswX0FDVElWQVRFICAgICAgICAgICAgMHgxMAotI2RlZmluZSBCTElaWkFSRF9NRU1fQkFOSzBfU1RBVFVTICAgICAgICAgICAgICAweDE0Ci0jZGVmaW5lIEJMSVpaQVJEX1BBTkVMX0NPTkZJR1VSQVRJT04gICAgICAgICAgIDB4MjgKLSNkZWZpbmUgQkxJWlpBUkRfSERJU1AgICAgICAgICAgICAgICAgICAgICAgICAgMHgyYQotI2RlZmluZSBCTElaWkFSRF9ITkRQICAgICAgICAgICAgICAgICAgICAgICAgICAweDJjCi0jZGVmaW5lIEJMSVpaQVJEX1ZESVNQMCAgICAgICAgICAgICAgICAgICAgICAgIDB4MmUKLSNkZWZpbmUgQkxJWlpBUkRfVkRJU1AxICAgICAgICAgICAgICAgICAgICAgICAgMHgzMAotI2RlZmluZSBCTElaWkFSRF9WTkRQICAgICAgICAgICAgICAgICAgICAgICAgICAweDMyCi0jZGVmaW5lIEJMSVpaQVJEX0hTVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzQKLSNkZWZpbmUgQkxJWlpBUkRfVlNXICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAotI2RlZmluZSBCTElaWkFSRF9ESVNQTEFZX01PREUgICAgICAgICAgICAgICAgICAweDY4Ci0jZGVmaW5lIEJMSVpaQVJEX0lOUFVUX1dJTl9YX1NUQVJUXzAgICAgICAgICAgIDB4NmMKLSNkZWZpbmUgQkxJWlpBUkRfREFUQV9TT1VSQ0VfU0VMRUNUICAgICAgICAgICAgMHg4ZQotI2RlZmluZSBCTElaWkFSRF9ESVNQX01FTV9EQVRBX1BPUlQgICAgICAgICAgICAweDkwCi0jZGVmaW5lIEJMSVpaQV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pZXIuaD4KLSNpbmNsdWRlIDxsaW51eC90aHJlYWRzLmg+Ci0jaW5jbHVkZSA8bGludXgva29iamVjdC5oPgotI2luY2x1ZGUgPGxpbnV4L3N5c2ZzLmg+Ci0jaW5jbHVkZSA8bGludXgvY29tcGxldGlvbi5oPgotI2luY2x1ZGUgPGxpbnV4L3dvcmtxdWV1ZS5oPgogI2luY2x1ZGUgPGxpbnV4L2NwdW1hc2suaD4KLSNpbmNsdWRlIDxhc20vZGl2NjQuaD4KLQotI2RlZmluZSBDUFVGUkVRX05BTUVfTEVOIDE2Ci0vKiBQcmludCBsZW5ndGggZm9yIG5hbWVzLiBFeHRyYSAxIHNwYWNlIGZvciBhY2NvbW9kYXRpbmcgJ1xuJyBpbiBwcmludHMgKi8KLSNkZWZpbmUgQ1BVRlJFUV9OQU1FX1BMRU4gKENQVUZSRVFfTkFNRV9MRU4gKyAxKQorI2luY2x1ZGUgPGxpbnV4L2NvbXBsZXRpb24uaD4KKyNpbmNsdWRlIDxsaW51eC9rb2JqZWN0Lmg+CisjaW5jbHVkZSA8bGludXgvbm90aWZpZXIuaD4KKyNpbmNsdWRlIDxsaW51eC9zeXNmcy5oPgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAgICAgICAgICAgICAgICAgIENQVUZSRVEgTk9USUZJRVIgSU5URVJGQUNFICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgIENQVUZSRVEgSU5URVJGQUNFICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIENQVUZSRVFfVFJBTlNJVElPTl9OT1RJRklFUgkoMCkKLSNkZWZpbmUgQ1BVRlJFUV9QT0xJQ1lfTk9USUZJRVIJCSgxKQotCi0jaWZ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otICovCi0jaWZkZWYgQ09ORklHX0NQVV9GUkVRCi11bnNpZ25lZCBpbnQgY3B1ZnJlcV9xdWlja19nZXQodW5zaWduZWQgaW50IGNwdSk7Ci11bnNpZ25lZCBpbnQgY3B1ZnJlcV9xdWlja19nZXRfbWF4KHVuc2lnbmVkIGludCBjcHUpOwotI2Vsc2UKLXN0YXRpYyBpbmxpbmUgdW5zaWduZWQgaW50IGNwdWZyZXFfcXVpY2tfZ2V0KHVuc2lnbmVkIGludCBjcHUpCi17Ci0JcmV0dXJuIDA7Ci19Ci1zdGF0aWMgaW5saW5lIHVuc2lnbmVkIGludCBjcHVmcmVxX3F1aWNrX2dldF9tYXgodW5zaWduZWQgaW50IGNwdSkKLXsKLQlyZXR1cm4gMDsKLX0KLSNlbmRpZgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgQ1BVRlJFUSBERUZBVUxUIEdPVkVSTk9SICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgIENQVUZSRVEgTk9USUZJRVIgSU5URVJGQUNFICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisjZGVmaW5lIENQVUZSRVFfVFJBTlNJVElPTl9OT1RJRklFUgkoMCkKKyNkZWZpbmUgQ1BVRlJFUV9QT0xJQ1lfTk9USUZJRVIJCSgxKQorCisvKiBUcmFuc2l0aW9uIG5vdGlmaWVycyAqLworI2RlZmluZSBDUFVGUkVRX1BSRUNIQU5HRQkJKDApCisjZGVmaW5lIENQVUZSRVFfUE9TVENIQU5HRQkJKDEpCisjZGVmaW5lIENQVUZSRVFfUkVTVU1FQ0hBTkdFCQkoOCkKKyNkZWZpbmUgQ1BVRlJFUV9TVVNQRU5EQ0hBTkdFCQ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hbGUgLSAib2xkICogbXVsdCAvIGRpdiIgY2FsY3VsYXRpb24gZm9yIGxhcmdlIHZhbHVlcyAoMzItYml0LWFyY2gKKyAqIHNhZmUpCisgKiBAb2xkOiAgIG9sZCB2YWx1ZQorICogQGRpdjogICBkaXZpc29yCisgKiBAbXVsdDogIG11bHRpcGxpZXIKKyAqCisgKgorICogbmV3ID0gb2xkICogbXVsdCAvIGRpdgorICovCitzdGF0aWMgaW5saW5lIHVuc2lnbmVkIGxvbmcgY3B1ZnJlcV9zY2FsZSh1bnNpZ25lZCBsb25nIG9sZCwgdV9pbnQgZGl2LAorCQl1X2ludCBtdWx0KQoreworI2lmIEJJVFNfUEVSX0xPTkcgPT0gMzIKKwl1NjQgcmVzdWx0ID0gKCh1NjQpIG9sZCkgKiAoKHU2NCkgbXVsdCk7CisJZG9fZGl2KHJlc3VsdCwgZGl2KTsKKwlyZXR1cm4gKHVuc2lnbmVkIGxvbmcpIHJlc3VsdDsKKworI2VsaWYgQklUU19QRVJfTE9ORyA9PSA2NAorCXVuc2lnbmVkIGxvbmcgcmVzdWx0ID0gb2xkICogKCh1NjQpIG11bHQpOworCXJlc3VsdCAvPSBkaXY7CisJcmV0dXJuIHJlc3VsdDsKKyNlbmRpZgorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgQ1BVRlJFUSBHT1ZFUk5PUlMgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogSWYgKGNwdWZyZXFfZHJpdmVyLT50YXJnZXQpIGV4aXN0cywgdGhlIC0+Z292ZXJub3IgZGVjaWRlcyB3aGF0IGZyZXF1ZW5jeQorICogd2l0aGluIHRoZSBsaW1pdHMgaXMgdXNlZC4gSWYgKGNwdWZ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9VTkRFUkNMT0NLRUQgICAgICAgICAgICAgICAweDJECisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fT1ZFUkNMT0NLRUQgICAgICAgICAgICAgICAgMHgyRQorI2RlZmluZSBBUklaT05BX0dQX0ZOX0RTUF9JUlExICAgICAgICAgICAgICAgICAgIDB4MzUKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9EU1BfSVJRMiAgICAgICAgICAgICAgICAgICAweDM2CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fQVNZTkNfT1BDTEsgICAgICAgICAgICAgICAgMHgzRAorI2RlZmluZSBBUklaT05BX0dQX0ZOX0JPT1RfRE9ORSAgICAgICAgICAgICAgICAgIDB4NDQKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9EU1AxX1JBTV9SRUFEWSAgICAgICAgICAgICAweDQ1CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fU1lTQ0xLX0VOQV9TVEFUVVMgICAgICAgICAgMHg0QgorI2RlZmluZSBBUklaT05BX0dQX0ZOX0FTWU5DQ0xLX0VOQV9TVEFUVVMgICAgICAgIDB4NEMKKworI2RlZmluZSBBUklaT05BX0dQTl9ESVIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLworI2RlZmluZSBBUklaT05BX0dQTl9ESVJfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLworI2RlZmluZSBBUklaT05BX0dQTl9ESVJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxNSAgLyogR1BOX0RJUiAqLworI2RlZmluZSBBUklaT05BX0dQTl9ESVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RJUiAqLworI2RlZmluZSBBUklaT05BX0dQTl9QVSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BVX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTQgIC8qIEdQTl9QVSAqLworI2RlZmluZSBBUklaT05BX0dQTl9QVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BVICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUERfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLworI2RlZmluZSBBUklaT05BX0dQTl9QRF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgLyogR1BOX1BEICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUEQgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX01BU0sgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTEgIC8qIEdQTl9MVkwgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9MVkwgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MDAgIC8qIEdQTl9QT0wgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDA0MDAgIC8qIEdQTl9QT0wgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTAgIC8qIEdQTl9QT0wgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QT0wgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHICAgICAgICAgICAgICAgICAgICAgICAweDAyMDAgIC8qIEdQTl9PUF9DRkcgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX01BU0sgICAgICAgICAgICAgICAgICAweDAyMDAgIC8qIEdQTl9PUF9DRkcgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDkgIC8qIEdQTl9PUF9DRkcgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9PUF9DRkcgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fREIgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEdQTl9EQiAqLworI2RlZmluZSBBUklaT05BX0dQTl9EQl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogR1BOX0RCICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX0RCX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBHUE5fREIgKi8KKyNkZWZpbmUgQVJJWk9OQV9HUE5fREJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9EQiAqLworI2RlZmluZSBBUklaT05BX0dQTl9GTl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDA3RiAgLyogR1BOX0RCICovCisjZGVmaW5lIEFSSVpPTkFfR1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gICAgMHgwMDBmMDAwMAorLyogY2FjaGUgbW9kZXMgKi8KKyNkZWZpbmUgTVNNX0JPX0NBQ0hFRCAgICAgICAgMHgwMDAxMDAwMAorI2RlZmluZSBNU01fQk9fV0MgICAgICAgICAgICAweDAwMDIwMDAwCisjZGVmaW5lIE1TTV9CT19VTkNBQ0hFRCAgICAgIDB4MDAwNDAwMDAKKworc3RydWN0IGRybV9tc21fZ2VtX25ldyB7CisJdWludDY0X3Qgc2l6ZTsgICAgICAgICAgIC8qIGluICovCisJdWludDMyX3QgZmxhZ3M7ICAgICAgICAgIC8qIGluLCBtYXNrIG9mIE1TTV9CT194ICovCisJdWludDMyX3QgaGFuZGxlOyAgICAgICAgIC8qIG91dCAqLworfTsKKworc3RydWN0IGRybV9tc21fZ2VtX2luZm8geworCXVpbnQzMl90IGhhbmRsZTsgICAgICAgICAvKiBpbiAqLworCXVpbnQzMl90IHBhZDsKKwl1aW50NjRfdCBvZmZzZXQ7ICAgICAgICAgLyogb3V0LCBvZmZzZXQgdG8gcGFzcyB0byBtbWFwKCkgKi8KK307CisKKyNkZWZpbmUgTVNNX1BSRVBfUkVBRCAgICAgICAgMHgwMQorI2RlZmluZSBNU01fUFJFUF9XUklURSAgICAgICAweDAyCisjZGVmaW5lIE1TTV9QUkVQX05PU1lOQyAgICAgIDB4MDQKKworc3RydWN0IGRybV9tc21fZ2VtX2NwdV9wcmVwIHsKKwl1aW50MzJfdCBoYW5kbGU7ICAgICAgICAgLyogaW4gKi8KKwl1aW50MzJfdCBvcDsgICAgICAgICAgICAgLyogaW4sIG1hc2sgb2YgTVNNX1BSRVBfeCAqLworCXN0cnVjdCBkcm1fbXNtX3RpbWVzcGVjIHRpbWVvdXQ7ICAgLyogaW4gKi8KK307CisKK3N0cnVjdCBkcm1fbXNtX2dlbV9jcHVfZmluaSB7CisJdWludDMyX3QgaGFuZGxlOyAgICAgICAgIC8qIGluICovCit9OworCisvKgorICogQ21kc3RyZWFtIFN1Ym1pc3Npb246CisgK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MsNyArNjA0LDcgQEAKIHN0YXRpYyBzc2l6ZV90IHNob3dfbW9kaW5mb18jI2ZpZWxkKHN0cnVjdCBtb2R1bGVfYXR0cmlidXRlICptYXR0ciwgICBcCiAJCQlzdHJ1Y3QgbW9kdWxlX2tvYmplY3QgKm1rLCBjaGFyICpidWZmZXIpICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlyZXR1cm4gc3ByaW50ZihidWZmZXIsICIlc1xuIiwgbWstPm1vZC0+ZmllbGQpOyAgICAgICAgICAgICAgIFwKKwlyZXR1cm4gc2NucHJpbnRmKGJ1ZmZlciwgUEFHRV9TSVpFLCAiJXNcbiIsIG1rLT5tb2QtPmZpZWxkKTsgIFwKIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiBzdGF0aWMgaW50IG1vZGluZm9fIyNmaWVsZCMjX2V4aXN0cyhzdHJ1Y3QgbW9kdWxlICptb2QpICAgICAgICAgICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTE2MTEsNiArMTYxMiwxNCBAQAogCWtmcmVlKG1vZC0+bW9kaW5mb19hdHRycyk7CiB9CiAKK3N0YXRpYyB2b2lkIG1vZF9rb2JqZWN0X3B1dChzdHJ1Y3QgbW9kdWxlICptb2QpCit7CisJREVDTEFSRV9DT01QTEVUSU9OX09OU1RBQ0soYyk7CisJbW9kLT5ta29iai5rb2JqX2NvbXBsZXRpb24gPSAmYzsKKwlrb2JqZWN0X3B1dCgmbW9kLT5ta29iai5rb2JqKTsKKwl3YWl0X2Zvcl9jb21wbGV0aW9uKCZjKTsKK30KKwogc3RhdGljIGludCBtb2Rfc3lzZnNfaW5pdChzdHJ1Y3QgbW9kdWxlICptb2QpCiB7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cm92aWRlIHVzZXJzcGFjZSB3aXRoIGEgbWFjaGluZS1yZWFkYWJsZSBtZXNzYWdlIGNvbnRleHQuCi0gKgotICogRXhhbXBsZXMgZm9yIHdlbGwtZGVmaW5lZCwgY29tbW9ubHkgdXNlZCBwcm9wZXJ0eSBuYW1lcyBhcmU6Ci0gKiAgIERFVklDRT1iMTI6OCAgICAgICAgICAgICAgIGRldmljZSBpZGVudGlmaWVyCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYjEyOjggICAgICAgICBibG9jayBkZXZfdAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMxMjc6MyAgICAgICAgY2hhciBkZXZfdAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG44ICAgICAgICAgICAgbmV0ZGV2IGlmaW5kZXgKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArc291bmQ6Y2FyZDAgIHN1YnN5c3RlbTpkZXZuYW1lCi0gKiAgIFNVQlNZU1RFTT1wY2kgICAgICAgICAgICAgIGRyaXZlci1jb3JlIHN1YnN5c3RlbSBuYW1lCi0gKgotICogVmFsaWQgY2hhcmFjdGVycyBpbiBwcm9wZXJ0eSBuYW1lcyBhcmUgW2EtekEtWjAtOS4tX10uIFRoZSBwbGFpbiB0ZXh0IHZhbHVlCi0gKiBmb2xsb3dzIGRpcmVjdGx5IGFmdGVyIGEgJz0nIGNoYXJhY3Rlci4gRXZlcnkgcHJvcGVydHkgaXMgdGVybWluYXRlZCBieQotICogYSAnXDAnIGNoYXJhY3Rlci4gVGhlIGxhc3QgcHJvcGVydHkgaXMgbm90IHRlcm1pbmF0ZWQuCi0gKgotICogRXhhbXBsZSBvZiBhIG1lc3NhZ2Ugc3RydWN0dXJlOgotICogICAwMDAwICBmZiA4ZiAwMCAwMCAwMCAwMCAwMCAwMCAgICAgIG1vbm90b25pYyB0aW1lIGluIG5zZWMKLSAqICAgMDAwOCAgMzQgMDAgICAgICAgICAgICAgICAgICAgICAgICByZWNvcmQgaXMgNTIgYnl0ZXMgbG9uZwotICogICAwMDBhICAgICAgICAwYiAwMCAgICAgICAgICAgICAgICAgIHRleHQgaXMgMTEgYnl0ZXMgbG9uZwotICogICAwMDBjICAgICAgICAgICAgICAxZiAwMCAgICAgICAgICAgIGRpY3Rpb25hcnkgaXMgMjMgYnl0ZXMgbG9uZwotICogICAwMDBlICAgICAgICAgICAgICAgICAgICAwMyAwMCAgICAgIExPR19LRVJOIChmYWNpbGl0eSkgTE9HX0VSUiAobGV2ZWwpCi0gKiAgIDAwMTAgIDY5IDc0IDI3IDczIDIwIDYxIDIwIDZjICAgICAgIml0J3MgYSBsIgotICogICAgICAgICA2OSA2ZSA2NSAgICAgICAgICAgICAgICAgICAgICJpbmUiCi0gKiAgIDAwMWIgICAgICAgICAgIDQ0IDQ1IDU2IDQ5IDQzICAgICAgIkRFVklDIgotICogICAgICAgICA0NSAzZCA2MiAzOCAzYSAzMiAwMCA0NCAgICAgICJFPWI4OjJcMEQiCi0gKiAgICAgICAgIDUyIDQ5IDU2IDQ1IDUyIDNkIDYyIDc1ICAgICAgIlJJVkVSPWJ1IgotICogICAgICAgICA2NyAgICAgICAgICAgICAgICAgICAgICAgICAgICJnIgotICogICAwMDMyICAgICAwMCAwMCAwMCAgICAgICAgICAgICAgICAgIHBhZGRpbmcgdG8gbmV4dCBtZXNzYWdlIGhlYWRlcgotICoKLSAqIFRoZSAnc3RydWN0IGxvZycgYnVmZmVyIGhlYWRlciBtdXN0IG5ldmVyIGJlIGRpcmVjdGx5IGV4cG9ydGVkIHRvCi0gKiB1c2Vyc3BhY2UsIGl0IGlzIGEga2VybmVsLXByaXZhdGUgaW1wbGVtZW50YXRpb24gZGV0YWlsIHRoYXQgbWlnaHQKLSAqIG5lZWQgdG8gYmUgY2hhbmdlZCBpbiB0aGUgZnV0dXJlLCB3aGVuIHRoZSByZXF1aXJlbWVudHMgY2hhbmdlLgotICoKLSAqIC9kZXYva21zZyBleHBvcnRzIHRoZ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hcmU6CisgKiAgIERFVklDRT1iMTI6OCAgICAgICAgICAgICAgIGRldmljZSBpZGVudGlmaWVyCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYjEyOjggICAgICAgICBibG9jayBkZXZfdAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMxMjc6MyAgICAgICAgY2hhciBkZXZfdAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG44ICAgICAgICAgICAgbmV0ZGV2IGlmaW5kZXgKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArc291bmQ6Y2FyZDAgIHN1YnN5c3RlbTpkZXZuYW1lCisgKiAgIFNVQlNZU1RFTT1wY2kgICAgICAgICAgICAgIGRyaXZlci1jb3JlIHN1YnN5c3RlbSBuYW1lCisgKgorICogVmFsaWQgY2hhcmFjdGVycyBpbiBwcm9wZXJ0eSBuYW1lcyBhcmUgW2EtekEtWjAtOS4tX10uIFRoZSBwbGFpbiB0ZXh0IHZhbHVlCisgKiBmb2xsb3dzIGRpcmVjdGx5IGFmdGVyIGEgJz0nIGNoYXJhY3Rlci4gRXZlcnkgcHJvcGVydHkgaXMgdGVybWluYXRlZCBieQorICogYSAnXDAnIGNoYXJhY3Rlci4gVGhlIGxhc3QgcHJvcGVydHkgaXMgbm90IHRlcm1pbmF0ZWQuCisgKgorICogRXhhbXBsZSBvZiBhIG1lc3NhZ2Ugc3RydWN0dXJlOgorICogICAwMDAwICBmZiA4ZiAwMCAwMCAwMCAwMCAwMCAwMCAgICAgIG1vbm90b25pYyB0aW1lIGluIG5zZWMKKyAqICAgMDAwOCAgMzQgMDAgICAgICAgICAgICAgICAgICAgICAgICByZWNvcmQgaXMgNTIgYnl0ZXMgbG9uZworICogICAwMDBhICAgICAgICAwYiAwMCAgICAgICAgICAgICAgICAgIHRleHQgaXMgMTEgYnl0ZXMgbG9uZworICogICAwMDBjICAgICAgICAgICAgICAxZiAwMCAgICAgICAgICAgIGRpY3Rpb25hcnkg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CSAgY29udC50c19uc2VjLCBOVUxMLCAwLCBjb250LmJ1ZiwgY29udC5sZW4pOworCQljb250LmZsYWdzID0gZmxhZ3M7CisJCWNvbnQuZmx1c2hlZCA9IHRydWU7CisJfSBlbHNlIHsKKwkJLyoKKwkJICogSWYgbm8gZnJhZ21lbnQgb2YgdGhpcyBsaW5lIGV2ZXIgcmVhY2hlZCB0aGUgY29uc29sZSwKKwkJICoganVzdCBzdWJtaXQgaXQgdG8gdGhlIHN0b3JlIGFuZCBmcmVlIHRoZSBidWZmZXIuCisJCSAqLworCQlsb2dfc3RvcmUoY29udC5mYWNpbGl0eSwgY29udC5sZXZlbCwgZmxhZ3MsIDAsCisJCQkgIE5VTEwsIDAsIGNvbnQuYnVmLCBjb250Lmxlbik7CisJCWNvbnQubGVuID0gMDsKKwl9Cit9CisKK3N0YXRpYyBib29sIGNvbnRfYWRkKGludCBmYWNpbGl0eSwgaW50IGxldmVsLCBjb25zdCBjaGFyICp0ZXh0LCBzaXplX3QgbGVuKQoreworCWlmIChjb250LmxlbiAmJiBjb250LmZsdXNoZWQpCisJCXJldHVybiBmYWxzZTsKKworCWlmIChjb250LmxlbiArIGxlbiA+IHNpemVvZihjb250LmJ1ZikpIHsKKwkJLyogdGhlIGxpbmUgZ2V0cyB0b28gbG9uZywgc3BsaXQgaXQgdXAgaW4gc2VwYXJhdGUgcmVjb3JkcyAqLworCQljb250X2ZsdXNoKExPR19DT05UKTsKKwkJcmV0dXJuIGZhbHNlOworCX0KKworCWlmICghY29udC5sZW4pIHsKKwkJY29udC5mYWNpbGl0eSA9IGZhY2lsaXR5OworCQljb250LmxldmVsID0gbGV2ZWw7CisJCWNvbnQub3duZXIgPSBjdXJyZW50OworCQljb250LnRzX25zZWMgPSBsb2NhbF9jbG9jaygpOworCQljb250LmZsYWdzID0gMDsKKwkJY29udC5jb25zID0gMDsKKwkJY29udC5mbHVzaGVkID0gZmFsc2U7CisJfQorCisJbWVtY3B5KGNvbnQuYnVmICsgY29udC5sZW4sIHRleHQsIGxlbik7CisJY29udC5sZW4gKz0gbGVuOworCisJaWYgKGNvbnQubGVuID4gKHNpemVvZihjb250LmJ1ZikgKiA4MCkgLyAxMDApCisJCWNvbnRfZmx1c2goTE9HX0NPTlQpOworCisJcmV0dXJuIHRydWU7Cit9CisKK3N0YXRpYyBzaXplX3QgY29udF9wcmludF90ZXh0KGNoYXIgKnRleHQsIHNpemVfdCBzaXplKQoreworCXNpemVfdCB0ZXh0bGVuID0gMDsKKwlzaXplX3QgbGVuOworCisJaWYgKGNvbnQuY29ucyA9PSAwICYmIChjb25zb2xlX3ByZXYgJiBMT0dfTkVXTElORSkpIHsKKwkJdGV4dGxlbiArPSBwcmludF90aW1lKGNvbnQudHNfbnNlYywgdGV4dCk7CisJCXNpemUgLT0gdGV4dGxlbjsKKwl9CisKKwlsZW4gPSBjb250LmxlbiAtIGNvbnQuY29uczsKKwlpZiAobGVuID4gMCkgeworCQlpZiAobGVuKzEgPiBzaXplKQorCQkJbGVuID0gc2l6ZS0xOworCQltZW1jcHkodGV4dCArIHRleHRsZW4sIGNvbnQuYnVmICsgY29udC5jb25zLCBsZW4pOworCQl0ZXh0bGVuICs9IGxlbjsKKwkJY29udC5jb25zID0gY29udC5sZW47CisJfQorCisJaWYgKGNvbnQuZmx1c2hlZCkgeworCQlpZiAoY29udC5mbGFncyAmIExPR19ORVdMSU5FKQorCQkJdGV4dFt0ZXh0bGVuKytdID0gJ1xuJzsKKwkJLyogZ290IGV2ZXJ5dGhpbmcsIHJlbGVhc2UgYnVmZmVyICovCisJCWNvbnQubGVuID0gMDsKKwl9CisJcmV0dXJuIHRleHRsZW47Cit9CisKK2FzbWxpbmthZ2UgaW50IHZwcmludGtfZW1pdChpbnQgZmFjaWxpdHksIGludCBsZXZlbCwKKwkJCSAgICBjb25zdCBjaGFyICpkaWN0LCBzaXplX3QgZGljdGxlbiwKKwkJCSAgICBjb25zdCBjaGFyICpmbXQsIHZhX2xpc3QgYXJncykKK3sKKwlzdGF0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b2cgbGV2ZWwgb3IgY29udHJvbCBmbGFncyAqLworCWlmIChmYWNpbGl0eSA9PSAwKSB7CisJCWludCBrZXJuX2xldmVsID0gcHJpbnRrX2dldF9sZXZlbCh0ZXh0KTsKKworCQlpZiAoa2Vybl9sZXZlbCkgeworCQkJY29uc3QgY2hhciAqZW5kX29mX2hlYWRlciA9IHByaW50a19za2lwX2xldmVsKHRleHQpOworCQkJc3dpdGNoIChrZXJuX2xldmVsKSB7CisJCQljYXNlICcwJyAuLi4gJzcnOgorCQkJCWlmIChsZXZlbCA9PSAtMSkKKwkJCQkJbGV2ZWwgPSBrZXJuX2xldmVsIC0gJzAnOworCQkJY2FzZSAnZCc6CS8qIEtFUk5fREVGQVVMVCAqLworCQkJCWxmbGFncyB8PSBMT0dfUFJFRklYOworCQkJY2FzZSAnYyc6CS8qIEtFUk5fQ09OVCAqLworCQkJCWJyZWFrOworCQkJfQorCQkJdGV4dF9sZW4gLT0gZW5kX29mX2hlYWRlciAtIHRleHQ7CisJCQl0ZXh0ID0gKGNoYXIgKillbmRfb2ZfaGVhZGVyOworCQl9CisJfQorCisJaWYgKGxldmVsID09IC0xKQorCQlsZXZlbCA9IGRlZmF1bHRfbWVzc2FnZV9sb2dsZXZlbDsKKworCWlmIChkaWN0KQorCQlsZmxhZ3MgfD0gTE9HX1BSRUZJWHxMT0dfTkVXTElORTsKKworCWlmICghKGxmbGFncyAmIExPR19ORVdMSU5FKSkgeworCQkvKgorCQkgKiBGbHVzaCB0aGUgY29uZmxpY3RpbmcgYnVmZmVyLiBBbiBlYXJsaWVyIG5ld2xpbmUgd2FzIG1pc3NpbmcsCisJCSAqIG9yIGFub3RoZXIgdGFzayBhbHNvIHByaW50cyBjb250aW51YXRpb24gbGluZXMuCisJCSAqLworCQlpZiAoY29udC5sZW4gJiYgKGxmbGFncyAmIExPR19QUkVGSVggfHwgY29udC5vd25lciAhPSBjdXJyZW50KSkKKwkJCWNvbnRfZmx1c2goTE9HX05FV0xJTkUpOworCisJ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QkgICAgIHNpemVvZigobWF0Y2gpLT5rZXktPmZpZWxkKSwgaXNfbWFzayk7IFwKKwkJaWYgKGlzX21hc2spIHsJCQkJCQkgICAgXAorCQkJaWYgKChtYXRjaCktPm1hc2spCQkJCSAgICBcCisJCQkJKG1hdGNoKS0+bWFzay0+a2V5LmZpZWxkID0gdmFsdWU7CSAgICBcCisJCX0gZWxzZSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCShtYXRjaCktPmtleS0+ZmllbGQgPSB2YWx1ZTsJCSAgICAgICAgICAgIFwKKwkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCX0gd2hpbGUgKDApCisKKyNkZWZpbmUgU1dfRkxPV19LRVlfTUVNQ1BZKG1hdGNoLCBmaWVsZCwgdmFsdWVfcCwgbGVuLCBpc19tYXNrKSBcCisJZG8geyBcCisJCXVwZGF0ZV9yYW5nZV9fKG1hdGNoLCBvZmZzZXRvZihzdHJ1Y3Qgc3dfZmxvd19rZXksIGZpZWxkKSwgIFwKKwkJCQlsZW4sIGlzX21hc2spOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKGlzX21hc2spIHsJCQkJCQkgICAgXAorCQkJaWYgKChtYXRjaCktPm1hc2spCQkJCSAgICBcCisJCQkJbWVtY3B5KCYobWF0Y2gpLT5tYXNrLT5rZXkuZmllbGQsIHZhbHVlX3AsIGxlbik7XAorCQl9IGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQltZW1jcHkoJihtYXRjaCktPmtleS0+ZmllbGQsIHZhbHVlX3AsIGxlbik7ICAgICAgICAgXAorCQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJfSB3aGlsZSAoMCkKKworc3RhdGljIHUxN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luZyBib3RoIGJpdHMKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgIHg6ICBIRFNQTV9TdGFydCAgICAgICAgICAgICAgICAvICBlbmFibGVzIGF1ZGlvIElPCisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgeC4gICAgOiAgSERTUE1fQ2xvY2tNb2RlTWFzdGVyIC0gMTogTWFzdGVyLCAwOiBTbGF2ZQorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuMjEwIDogIEhEU1BNX0xhdGVuY3lNYXNrIC0gMyBCaXQgdmFsdWUgZm9yIGxhdGVuY3kKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgICAgMDo2NCwgMToxMjgsIDI6MjU2LCAzOjUxMiwKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgICAgNDoxMDI0LCA1OjIwNDgsIDY6NDA5NiwgNzo4MTkyCisgKiA6eCAgIC4gICAgOiAgICAuICAgIDogICAgLiAgIHg6eHggIC4gICAgOiAgSERTUE1fRnJlcXVlbmN5TWFzaworICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOjEwICAuICAgIDogIEhEU1BNX0ZyZXF1ZW5jeTF8SERTUE1fRnJlcXVlbmN5MDogMT0zMkssMj00NC4xSywzPTQ4SywwPT8/CisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgIHg6ICAgIC4gICAgOiAgPE1BREk+IEhEU1BNX0RvdWJsZVNwZWVkCisgKiA6eCAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgPE1BREk+IEhEU1BNX1F1YWRTcGVlZAorICogOiAgICAuICAzIDogICAgLiAgMTA6ICAyIC4gICAgOiAgICAuICAgIDogIEhEU1BNX1N5bmNSZWZNYXNrIDoKKyAqIDogICAgLiAgICA6ICAgIC4gICB4OiAgICAuICAgIDogICAgLiAgICA6ICBIRFNQTV9TeW5jUmVmMAorICogOiAgICAuICAgIDogICAgLiAgeCA6ICAgIC4gICAgOiAgICAuICAgIDogIEhEU1BNX1N5bmNSZWYxCisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogIHggLiAgICA6ICAgIC4gICAgOiAgPEFFUzMyPiBIRFNQTV9TeW5jUmVmMgorICogOiAgICAuICB4IDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxBRVMzMj4gSERTUE1fU3luY1JlZjMKKyAqIDogICAgLiAgICA6ICAgIC4gIDEwOiAgICAuICAgIDogICAgLiAgICA6ICA8TUFEST4gc3luYyByZWY6IDA6V0MsIDE6TWFkaSwgMjpUQ08sIDM6U3luY0luCisgKiA6ICAgIC4gIDMgOiAgICAuICAxMDogIDIgLiAgICA6ICAgIC4gICAgOiAgPEFFUzMyPiAgMDpXQywgMTpBRVMxIC4uLiA4OkFFUzgsIDk6IFRDTywgMTA6U3luY0luPworICogOiAgICAuICB4IDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxNQURJZT4gSERTUGVfRkxPQVRfRk9STUFUCisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogeCAgLiAgICA6ICAgIC4gICAgOiAgPE1BREk+IEhEU1BNX0lucHV0U2VsZWN0MCA6IDA9b3B0aWNhbCwxPWNvYXgKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOnggICAuICAgIDogICAgLiAgICA6ICA8TUFEST4gSERTUE1fSW5wdXRTZWxlY3QxCisgKiA6ICAgIC4gICAgOiAgICAueCAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgPE1BREk+IEhEU1BNX2Nscl90bXMKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuIHggIDogICAgLiAgICA6ICA8TUFEST4gSERTUE1fVFhfNjRjaAorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4geCAgOiAgICAuICAgIDogIDxBRVMzMj4gSERTUE1fRW1waGFzaXMKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAueCAgIDogICAgLiAgICA6ICA8TUFEST4gSERTUE1fQXV0b0lucAorICogOiAgICAuICAgIDogICAgLiB4ICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxNQURJPiBIRFNQTV9TTVVYCisgKiA6ICAgIC4gICAgOiAgICAueCAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgPE1BREk+IEhEU1BNX2Nscl90bXMKKyAqIDogICAgLiAgICA6ICAgeC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICA8TUFEST4gSERTUE1fdGF4aV9yZXNldAorICogOiAgICAuICAgeDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxNQURJPiBIRFNQTV9MaW5lT3V0CisgKiA6ICAgIC4gICB4OiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgPEFFUzMyPiA/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8KKyAqIDogICAgLiAgICA6ICAgeC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICA8QUVTMzI+IEhEU1BNX1dDSzQ4CisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLnggICA6ICAgIC4gICAgOiAgPEFFUzMyPiBIRFNQTV9Eb2xieQorICogOiAgICAuICAgIDogeCAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIEhEU1BNX01pZGkwSW50ZXJydXB0RW5hYmxlCisgKiA6ICAgIC4gICAgOnggICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgSERTUE1fTWlkaTFJbnRlcnJ1cHRFbmFibGUKKyAqIDogICAgLiAgICA6ICB4IC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICBIRFNQTV9NaWRpMkludGVycnVwdEVuYWJsZQorICogOiAgICAuIHggIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxNQURJPiBIRFNQTV9NaWRpM0ludGVycnVwdEVuYWJsZQorICogOiAgICAuIHggIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxBRVMzMj4gSERTUE1fRFNfRG91YmxlV2lyZQorICogOiAgICAueCAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxBRVMzMj4gSERTUE1fUVNfRG91YmxlV2lyZQorICogOiAgIHguICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIDxBRVMzMj4gSERTUE1fUVNfUXVhZFdpcmUKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICB4IDogICAgLiAgICA6ICA8QUVTMzI+IEhEU1BNX1Byb2Zlc3Npb25hbAorICogOiB4ICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIEhEU1BNX3djbGtfc2VsCisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOgorICogOjc2NTQuMzIxMDo3NjU0LjMyMTA6NzY1NC4zMjEwOjc2NTQuMzIxMDogYml0IG51bWJlciBwZXIgYnl0ZQorICogOnx8fHwufHx8fDp8fHx8Lnx8fHw6fHx8fC58fHx8Onx8fHwufHx8fDoKKyAqIDozMzIyLjIyMjI6MjIyMi4xMTExOjExMTEuMTEwMDowMDAwLjAwMDA6IGJpdCBudW1iZXIKKyAqIDoxMDk4Ljc2NTQ6MzIxMC45ODc2OjU0MzIuMTA5ODo3NjU0LjMyMTA6IDAuLjMxCisgKiA6fHx8fC58fHx8Onx8fHwufHx8fDp8fHx8Lnx8fHw6fHx8fC58fHx8OgorICogOjg0MjEuODQyMTo4NDIxLjg0MjE6ODQyMS44NDIxOjg0MjEuODQyMTpoZXggZGlnaXQKKyAqCisgKgorICoKKyAqIEFJTyAvIFJheURBVCBvbmx5CisgKgorICogLS0tLS0tLS0tLS0tIEhEU1BNX1dSX1NFVFRJTkdTIC0tLS0tLS0tLS0KKyAqIDozMzIyLjIyMjI6MjIyMi4xMTExOjExMTEuMTEwMDowMDAwLjAwMDA6IGJpdCBudW1iZXIgcGVyIGJ5dGUKKyAqIDoxMDk4Ljc2NTQ6MzIxMC45ODc2OjU0MzIuMTA5ODo3NjU0LjMyMTA6CisgKiA6fHx8fC58fHx8Onx8fHwufHx8fDp8fHx8Lnx8fHw6fHx8fC58fHx8OiBiaXQgbnVtYmVyCisgKiA6NzY1NC4zMjEwOjc2NTQuMzIxMDo3NjU0LjMyMTA6NzY1NC4zMjEwOiAwLi4zMQorICogOnx8fHwufHx8fDp8fHx8Lnx8fHw6fHx8fC58fHx8Onx8fHwufHx8fDoKKyAqIDo4NDIxLjg0MjE6ODQyMS44NDIxOjg0MjEuODQyMTo4NDIxLjg0MjE6IGhleCBkaWdpdAorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgeDogSERTUE1fYzBNYXN0ZXIgMTogTWFzdGVyLCAwOiBTbGF2ZQorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICB4IDogSERTUE1fYzBfU3luY1JlZjAKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiB4ICA6IEhEU1BNX2MwX1N5bmNSZWYxCisgKiA6ICAgIC4gICAgOiAgICAuICAgIDogICAgLiAgICA6ICAgIC54ICAgOiBIRFNQTV9jMF9TeW5jUmVmMgorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgIHguICAgIDogSERTUE1fYzBfU3luY1JlZjMKKyAqIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAzLjIxMCA6IEhEU1BNX2MwX1N5bmNSZWZNYXNrOgorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogIFJheURhdDogMDpXQywgMTpBRVMsIDI6U1BESUYsIDMuLjY6IEFEQVQxLi40LAorICogOiAgICAuICAgIDogICAgLiAgICA6ICAgIC4gICAgOiAgICAuICAgIDogICAgICAgICAgOTpUQ08sIDEwOl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iA9IHJzbmRfcHJpdl90b19kZXYocHJpdik7CisJdTMyIHZhbDsKKworCUJVR19PTighYmFzZSk7CisKKwl2YWwgPSBpb3JlYWQzMihiYXNlKTsKKwl2YWwgJj0gfm1hc2s7CisJdmFsIHw9IGRhdGEgJiBtYXNrOworCWlvd3JpdGUzMih2YWwsIGJhc2UpOworCisJZGV2X2RiZyhkZXYsICJzICVwIDogJTA4eFxuIiwgYmFzZSwgdmFsKTsKK30KKworLyoKKyAqCXJzbmRfbW9kIGZ1bmN0aW9ucworICovCitjaGFyICpyc25kX21vZF9uYW1lKHN0cnVjdCByc25kX21vZCAqbW9kKQoreworCWlmICghbW9kIHx8ICFtb2QtPm9wcykKKwkJcmV0dXJuICJ1bmtub3duIjsKKworCXJldHVybiBtb2QtPm9wcy0+bmFtZTsKK30KKwordm9pZCByc25kX21vZF9pbml0KHN0cnVjdCByc25kX3ByaXYgKnByaXYsCisJCSAgIHN0cnVjdCByc25kX21vZCAqbW9kLAorCQkgICBzdHJ1Y3QgcnNuZF9tb2Rfb3BzICpvcHMsCisJCSAgIGludCBpZCkKK3sKKwltb2QtPnByaXYJPSBwcml2OworCW1vZC0+aWQJCT0gaWQ7CisJbW9kLT5vcHMJPSBvcHM7CisJSU5JVF9MSVNUX0hFQUQoJm1vZC0+bGlzdCk7Cit9CisKKy8qCisgKglyc25kX2RtYSBmdW5jdGlvbnMKKyAqLworc3RhdGljIHZvaWQgcnNuZF9kbWFfY29udGludWUoc3RydWN0IHJzbmRfZG1hICpkbWEpCit7CisJLyogcHVzaCBuZXh0IEEgb3IgQiBwbGFuZSAqLworCWRtYS0+c3VibWl0X2xvb3AgPSAxOworCXNjaGVkdWxlX3dvcmsoJmRtYS0+d29yayk7Cit9CisKK3ZvaWQgcnNuZF9kbWFfc3RhcnQoc3RydWN0IHJzbmRfZG1hICpkbWEpCit7CisJLyogcHVzaCBib3RoIEEgYW5kIEIgcGxhbmUqLworCWRtYS0+c3VibWl0X2xvb3AgPSAyOworCXNja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ICpyc25kX2dlbl9yZWdfZ2V0KHN0cnVjdCByc25kX3ByaXYgKnByaXYsCisJCQkgICAgICAgc3RydWN0IHJzbmRfbW9kICptb2QsCisJCQkgICAgICAgZW51bSByc25kX3JlZyByZWcpOworI2RlZmluZSByc25kX2lzX2dlbjEocykJCSgocyktPmluZm8tPmZsYWdzICYgUlNORF9HRU4xKQorI2RlZmluZSByc25kX2lzX2dlbjIocykJCSgocyktPmluZm8tPmZsYWdzICYgUlNORF9HRU4yKQorCisvKgorICoJUi1DYXIgQURHCisgKi8KK2ludCByc25kX2FkZ19zc2lfY2xrX3N0b3Aoc3RydWN0IHJzbmRfbW9kICptb2QpOworaW50IHJzbmRfYWRnX3NzaV9jbGtfdHJ5X3N0YXJ0KHN0cnVjdCByc25kX21vZCAqbW9kLCB1bnNpZ25lZCBpbnQgcmF0ZSk7CitpbnQgcnNuZF9hZGdfcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldiwKKwkJICAgc3RydWN0IHJjYXJfc25kX2luZm8gKmluZm8sCisJCSAgIHN0cnVjdCByc25kX3ByaXYgKnByaXYpOwordm9pZCByc25kX2FkZ19yZW1vdmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldiwKKwkJICAgc3RydWN0IHJzbmRfcHJpdiAqcHJpdik7CisKKy8qCisgKglSLUNhciBzb3VuZCBwcml2CisgKi8KK3N0cnVjdCByc25kX3ByaXYgeworCisJc3RydWN0IGRldmljZSAqZGV2OworCXN0cnVjdCByY2FyX3NuZF9pbmZvICppbmZvOworCXNwaW5sb2NrX3QgbG9jazsKKworCS8qCisJICogYmVsb3cgdmFsdWUgd2lsbCBiZSBmaWxsZWQgb24gcnNuZF9nZW5fcHJvYmUoKQorCSAqLworCXZvaWQgKmdlbjsKKworCS8qCisJICogYmVsb3cgdmFsdWUgd2lsbCBiZSBmaWxsZWQgb24gcnNuZF9zY3VfcHJvYmUoKQorCSAqLworCXZvaWQgKnNjdTsKKwlpbnQgc2N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bW9kICptb2QsCisJCQkJICB1MzIgYml0KQoreworCXN0cnVjdCByc25kX3ByaXYgKnByaXYgPSByc25kX21vZF90b19wcml2KG1vZCk7CisJc3RydWN0IGRldmljZSAqZGV2ID0gcnNuZF9wcml2X3RvX2Rldihwcml2KTsKKwl1MzIgc3RhdHVzOworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IDEwMjQ7IGkrKykgeworCQlzdGF0dXMgPSByc25kX21vZF9yZWFkKG1vZCwgU1NJU1IpOworCQlpZiAoc3RhdHVzICYgYml0KQorCQkJcmV0dXJuOworCisJCXVkZWxheSg1MCk7CisJfQorCisJZGV2X3dhcm4oZGV2LCAic3RhdHVzIGNoZWNrIGZhaWxlZFxuIik7Cit9CisKK3N0YXRpYyBpbnQgcnNuZF9zc2lfbWFzdGVyX2Nsa19zdGFydChzdHJ1Y3QgcnNuZF9zc2kgKnNzaSwKKwkJCQkgICAgIHVuc2lnbmVkIGludCByYXRlKQoreworCXN0cnVjdCByc25kX3ByaXYgKnByaXYgPSByc25kX21vZF90b19wcml2KCZzc2ktPm1vZCk7CisJc3RydWN0IGRldmljZSAqZGV2ID0gcnNuZF9wcml2X3RvX2Rldihwcml2KTsKKwlpbnQgaSwgaiwgcmV0OworCWludCBhZGdfY2xrX2Rpdl90YWJsZVtdID0geworCQkxLCA2LCAvKiBzZWUgYWRnLmMgKi8KKwl9OworCWludCBzc2lfY2xrX211bF90YWJsZVtdID0geworCQkxLCAyLCA0LCA4LCAxNiwgNiwgMTIsCisJfTsKKwl1bnNpZ25lZCBpbnQgbWFpbl9yYXRlOworCisJLyoKKwkgKiBGaW5kIGJlc3QgY2xvY2ssIGFuZCB0cnkgdG8gc3RhcnQgQURHCisJICovCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUoYWRnX2Nsa19kaXZfdGFibGUpOyBpKyspIHsKKwkJZm9yIChqID0gMDsgaiA8IEFSUkFZX1NJWkUoc3NpX2Nsa19tdWxfdGFibGUpOyBqKyspIHsK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ZGFpX2lzX2Nsa19tYXN0ZXIocmRhaSkpCisJCXJzbmRfbW9kX3dyaXRlKCZzc2ktPm1vZCwgU1NJV1NSLCBDT05UKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJzbmRfc3NpX2RtYV9zdG9wKHN0cnVjdCByc25kX21vZCAqbW9kLAorCQkJICAgICBzdHJ1Y3QgcnNuZF9kYWkgKnJkYWksCisJCQkgICAgIHN0cnVjdCByc25kX2RhaV9zdHJlYW0gKmlvKQoreworCXN0cnVjdCByc25kX3NzaSAqc3NpID0gcnNuZF9tb2RfdG9fc3NpKG1vZCk7CisJc3RydWN0IHJzbmRfZG1hICpkbWEgPSByc25kX21vZF90b19kbWEoJnNzaS0+bW9kKTsKKworCXNzaS0+Y3JfZXRjID0gMDsKKworCXJzbmRfc3NpX2h3X3N0b3Aoc3NpLCByZGFpKTsKKworCXJzbmRfZG1hX3N0b3AoZG1hKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IHJzbmRfbW9kX29wcyByc25kX3NzaV9kbWFfb3BzID0geworCS5uYW1lCT0gInNzaSAoZG1hKSIsCisJLmluaXQJPSByc25kX3NzaV9pbml0LAorCS5xdWl0CT0gcnNuZF9zc2lfcXVpdCwKKwkuc3RhcnQJPSByc25kX3NzaV9kbWFfc3RhcnQsCisJLnN0b3AJPSByc25kX3NzaV9kbWFfc3RvcCwKK307CisKKy8qCisgKgkJTm9uIFNTSQorICovCitzdGF0aWMgaW50IHJzbmRfc3NpX25vbihzdHJ1Y3QgcnNuZF9tb2QgKm1vZCwKKwkJCXN0cnVjdCByc25kX2RhaSAqcmRhaSwKKwkJCXN0cnVjdCByc25kX2RhaV9zdHJlYW0gKmlvKQoreworCXN0cnVjdCByc25kX3ByaXYgKnByaXYgPSByc25kX21vZF90b19wcml2KG1vZCk7CisJc3RydWN0IGRldmljZSAqZGV2ID0gcnNuZF9wcml2X3RvX2Rldihwcml2KTsKKworCWRldl9kYmcoZGV2LCAiJXN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cGFpcgorICBiIC0gYmFzZWxpbmUgc2FtcGxlIHBlcmNlbnRhZ2UKKworLSBwZXJmIGRpZmYgQSBCIEMKKworICBiYXNlbGluZS9BIGNvbXB1dGUvQiBjb21wdXRlL0MgIHNhbXBsZXMKKyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgIGIgICAgICAgICAgICAgICAgICAgIHggICAgICAgICAgZjEKKyAgYiAgICAgICAgICB4ICAgICAgICAgeCAgICAgICAgICBmMgorICBiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYzCisgIGIgICAgICAgICAgeCAgICAgICAgICAgICAgICAgICAgZjQKKyAgYiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmNgorICAgICAgICAgICAgIHggICAgICAgICB4ICAgICAgICAgIGY1CisKKy0gcGVyZiBkaWZmIEIgQSBDCisKKyAgYmFzZWxpbmUvQiBjb21wdXRlL0EgY29tcHV0ZS9DICBzYW1wbGVzCisgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICBiICAgICAgICAgIHggICAgICAgICB4ICAgICAgICAgIGYyCisgIGIgICAgICAgICAgeCAgICAgICAgICAgICAgICAgICAgZjQKKyAgYiAgICAgICAgICAgICAgICAgICAgeCAgICAgICAgICBmNQorICAgICAgICAgICAgIHggICAgICAgICB4ICAgICAgICAgIGYxCisgICAgICAgICAgICAgeCAgICAgICAgICAgICAgICAgICAgZjMKKyAgICAgICAgICAgICB4ICAgICAgICAgICAgICAgICAgICBmNgorCistIHBlcmYgZGlmZiBDIEIgQQorCisgIGJhc2VsaW5lL0MgY29tcHV0ZS9CIGNvbXB1dGUvQSAgc2FtcGxlcworICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgYiAgICAgICAgICAgICAgICAgICAgeCAgICAgICAgICBmMQorICBiICAgICAgICAgIHggICAgICAgICB4ICAgICAg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N0YXRlKTsKKwkJCWlmIChyZXQgPCAwKQorCQkJCXJldHVybiByZXQ7CisJCX0KKwl9CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgY29tcChjb25zdCB2b2lkICphLCBjb25zdCB2b2lkICpiKQoreworCXJldHVybiAqKGludCAqKWEgLSAqKGludCAqKWI7Cit9CisKK3N0YXRpYyB2b2lkIGRvX3NvcnRfc29tZXRoaW5nKHZvaWQpCit7CisJaW50IGJ1Zls0MDk2MF0sIGk7CisKKwlmb3IgKGkgPSAwOyBpIDwgKGludClBUlJBWV9TSVpFKGJ1Zik7IGkrKykKKwkJYnVmW2ldID0gQVJSQVlfU0laRShidWYpIC0gaSAtIDE7CisKKwlxc29ydChidWYsIEFSUkFZX1NJWkUoYnVmKSwgc2l6ZW9mKGludCksIGNvbXApOworCisJZm9yIChpID0gMDsgaSA8IChpbnQpQVJSQVlfU0laRShidWYpOyBpKyspIHsKKwkJaWYgKGJ1ZltpXSAhPSBpKSB7CisJCQlwcl9kZWJ1ZygicXNvcnQgZmFpbGVkXG4iKTsKKwkJCWJyZWFrOworCQl9CisJfQorfQorCitzdGF0aWMgdm9pZCBzb3J0X3NvbWV0aGluZyh2b2lkKQoreworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IDEwOyBpKyspCisJCWRvX3NvcnRfc29tZXRoaW5nKCk7Cit9CisKK3N0YXRpYyB2b2lkIHN5c2NhbGxfc29tZXRoaW5nKHZvaWQpCit7CisJaW50IHBpcGVmZFsyXTsKKwlpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCAxMDAwOyBpKyspIHsKKwkJaWYgKHBpcGUocGlwZWZkKSA8IDApIHsKKwkJCXByX2RlYnVnKCJwaXBlIGZhaWxlZFxuIik7CisJCQlicmVhazsKKwkJfQorCQljbG9zZShwaXBlZmRbMV0pOworCQljbG9zZShwaXBlZmRbMF0pOworCX0KK30KKworc3RhdGljIHZvaWQgZnNfc29tZXRoaW5nKHZvaWQpCit7CisJY29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