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gICAgICAgIC5uYW1lID0gIk15IE93biBDaGlwIiwKKyAgICAgICAgICAubmFtZSA9IEtCVUlMRF9NT0ROQU1FLAogICAgICAgICAgIC5pZF90YWJsZSA9IHNuZF9teWNoaXBfaWRzLAogICAgICAgICAgIC5wcm9iZSA9IHNuZF9teWNoaXBfcHJvYmUsCiAgICAgICAgICAgLnJlbW92ZSA9IF9fZGV2ZXhpdF9wKHNuZF9teWNoaXBfcmVtb3ZlKSwKQEAgLTEzNDAsNyArMTM0MCw3IEBACiAgICAgICAgICAgPHByb2dyYW1saXN0aW5nPgogPCFbQ0RBVEFbCiAgIGlmIChyZXF1ZXN0X2lycShwY2ktPmlycSwgc25kX215Y2hpcF9pbnRlcnJ1cHQsCi0gICAgICAgICAgICAgICAgICBJUlFGX1NIQVJFRCwgIk15IENoaXAiLCBjaGlwKSkgeworICAgICAgICAgICAgICAgICAgSVJRRl9TSEFSRUQsIEtCVUlMRF9NT0ROQU1FLCBjaGlwKSkgewogICAgICAgICAgIHByaW50ayhLRVJOX0VSUiAiY2Fubm90IGdyYWIgaXJxICVkXG4iLCBwY2ktPmlycSk7CiAgICAgICAgICAgc25kX215Y2hpcF9mcmVlKGNoaXApOwogICAgICAgICAgIHJldHVybiAtRUJVU1k7CkBAIC0xNjE2LDcgKzE2MTYsNyBAQAogICAgICAgICAgIDxwcm9ncmFtbGlzdGluZz4KIDwhW0NEQVRBWwogICBzdGF0aWMgc3RydWN0IHBjaV9kcml2ZXIgZHJpdmVyID0gewotICAgICAgICAgIC5uYW1lID0gIk15IE93biBDaGlwIiwKKyAgICAgICAgICAubmFtZSA9IEtCVUlMRF9NT0ROQU1FLAogICAgICAgICAgIC5pZF90YWJsZSA9IHNuZF9teWNoaXBfaWRzLAogICAgICAgICAgIC5wcm9iZSA9IHNuZF9teWNoaXBfcHJvYmUsCiAgICAgICAgICAgLnJlbW92ZSA9IF9fZGV2ZXhpdF9wKHNuZF9teWNoaXBfcmVtb3ZlKSwKQEAgLTU4MTYsNy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S0tLS0rCiAgICB8IEFDQ0VTUyAgICAgICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMSAgIHwKIE5TIHwgQkFDS0NIQU5ORUxfQ1RMICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4zMyAgfAotTlMgfCBCSU5EX0NPTk5fVE9fU0VTU0lPTiB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjM0ICB8CitJICB8IEJJTkRfQ09OTl9UT19TRVNTSU9OIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMzQgIHwKICAgIHwgQ0xPU0UgICAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4yICAgfAogICAgfCBDT01NSVQgICAgICAgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjMgICB8CiAgICB8IENSRUFURSAgICAgICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguNCAgIHwKQEAgLTExMSw3ICsxMDIsNyBAQAogTlMgfCBERVNUUk9ZX0NMSUVOVElEICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjUwICB8CiBJICB8IERFU1RST1lfU0VTU0lPTiAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMzcgIHwKIEkgIHwgRVhDSEFOR0VfSUQgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4zNSAgfAotTlMgfCBGUkVFX1NUQVRFSUQgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjM4ICB8CitJICB8IEZSRUVfU1RBVEVJRCAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMzggIHwKICAgIHwgR0VUQVRUUiAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC43ICAgfAogUCAgfCBHRVRERVZJQ0VJTkZPICAgICAgICB8IE9QVCAgICAgICAgfCBwTkZTIChSRVEpICAgfCBTZWN0aW9uIDE4LjQwICB8CiBQICB8IEdFVERFVklDRUxJU1QgICAgICAgIHwgT1BUICAgICAgICB8IHBORlMgKE9QVCkgICB8IFNlY3Rpb24gMTguNDEgIHwKQEAgLTE0NSwxNCArMTM2LDE0IEBACiAgICB8IFJFU1RPUkVGSCAgICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMjcgIHwKICAgIHwgU0FWRUZIICAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4yOCAgfAogICAgfCBTRUNJTkZPICAgICAgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjI5ICB8Ci1OUyB8IFNFQ0lORk9fTk9fTkFNRSAgICAgIHwgUkVDICAgICAgICB8IHBORlMgZmlsZXMgICB8IFNlY3Rpb24gMTguNDUsIHwKK0kgIHwgU0VDSU5GT19OT19OQU1FICAgICAgfCBSRUMgICAgICAgIHwgcE5GUyBmaWxlcyAgIHwgU2VjdGlvbiAxOC40NSwgfAogICAgfCAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgfCBsYXlvdXQgKFJFUSkgfCBTZWN0aW9uIDEzLjEyICB8CiBJICB8IFNFUVVFTkNFICAgICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguNDYgIHwKICAgIHwgU0VUQVRUUiAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4zMCAgfAogICAgfCBTRVRDTElFTlRJRCAgICAgICAgICB8IE1OSSAgICAgICAgfCAgICAgICAgICAgICAgfCBOL0EgICAgICAgICAgICB8CiAgICB8IFNFVENMSUVOVElEX0NPTkZJUk0gIHwgTU5JICAgICAgICB8ICAgICAgICAgICAgICB8IE4vQSAgICAgICAgICAgIHwKIE5TIHwgU0VUX1NTViAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC40NyAgfAotTlMgfCBURVNUX1NUQVRFSUQgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjQ4ICB8CitJICB8IFRFU1RfU1RBVEVJRCAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguNDggIHwKICAgIHwgVkVSSUZZICAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4zMSAgfAogTlMqfCBXQU5UX0RFTEVHQVRJT04gICAgICB8IE9QVCAgICAgICAgfCBGREVMRyAoT1BUKSAgfCBTZWN0aW9uIDE4LjQ5ICB8CiAgICB8IFdSSVRFICAgICAgICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMzIgIHwKQEAgLTIwNiwxMiArMTk3LDYgQEAKIFNFUVVFTkNFOgogKiBubyBzdXBwb3J0IGZvciBkeW5hbWljIHNsb3QgdGFibGUgcmVuZWdvdGlhdGlvbiAob3B0aW9uYWwpCiAKLW5mc3Y0LjEgQ09NUE9VTkQgcnVsZXM6Ci1UaGUgZm9sbG93aW5nIGNhc2VzIGFyZW4ndCBzdXBwb3J0ZWQgeWV0OgotKiBFbmZvcmNpbmcgb2YgTkZTNEVSUl9OT1RfT05MWV9PUCBmb3I6IEJJTkRfQ09OTl9UT19TRVNTSU9OLCBDUkVBV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uZ2UuCisKK1RoZSBjb250cm9sIG9wZXJhdGlvbnMgYXJlIGF2YWlsYWJsZSB0byB1c2Vyc3BhY2UgdmlhIGdlbmVyaWMgbmV0bGluay4KKworVGhlIGxvdy1sZXZlbCBkYXRhIGV4Y2hhbmdlIGludGVyZmFjZSBpcyBwcm92aWRlZCBieSB0aGUgbmV3IHNvY2tldCBmYW1pbHkKK1BGX05GQy4gVGhlIE5GQ19TT0NLUFJPVE9fUkFXIHBlcmZvcm1zIHJhdyBjb21tdW5pY2F0aW9uIHdpdGggTkZDIHRhcmdldHMuCisKKworICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICB8ICAgICAgICAgICAgICBVU0VSIFNQQUNFICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworICAgICAgICAgICAgICAgICBeICAgICAgICAgICAgICAgICAgICAgICBeCisgICAgICAgICAgICAgICAgIHwgbG93LWxldmVsICAgICAgICAgICAgIHwgY29udHJvbAorICAgICAgICAgICAgICAgICB8IGRhdGEgZXhjaGFuZ2UgICAgICAgICB8IG9wZXJhdGlvbnMKKyAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICAgIHwgQUZfTkZDICAgICAgICAgICB8ICBuZXRsaW5rICB8CisgICAgICAgICAgICAgICAgIHwgc29ja2V0ICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICAgIHwgcmF3ICAgICAgICAgICAgICAgICAgIF4KKyAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICB2ICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgICAgICAgICAgKy0tLS0tLS0tLSsgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgfCByYXdzb2NrIHwgPC0tLS0tLS0tPiB8ICAgY29yZSAgICB8CisgICAgICAgICAgICAgKy0tLS0tLS0tLSsgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICBkcml2ZXIgICB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisKK0RldmljZSBEcml2ZXIgSW50ZXJmYWNlCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCitXaGVuIHJlZ2lzdGVyaW5nIG9uIHRoZSBORkMgc3Vic3lzdGVtLCB0aGUgZGV2aWNlIGRyaXZlciBtdXN0IGluZm9ybSB0aGUgY29yZQorb2YgdGhlIHNldCBvZiBzdXBwb3J0ZWQgTkZDIHByb3RvY29scyBhbmQgdGhlIHNldCBvZiBvcHMgY2FsbGJhY2tzLiBUaGUgb3BzCitjYWxsYmFja3MgdGhhdCBtdXN0IGJlIGltcGxlbWVudGVkIGFyZSB0aGUgZm9sbG93aW5nOgorCisqIHN0YXJ0X3BvbGwgLSBzZXR1cCB0aGUgZGV2aWNlIHRvIHBvbGwgZm9yIHRhcmdldHMKKyogc3RvcF9wb2xsIC0gc3RvcCBvbiBwcm9ncmVzcyBwb2xsaW5nIG9wZXJhdGlvbgorKiBhY3RpdmF0ZV90YXJnZXQgLSBzZWxlY3QgYW5kIGluaXRpYW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AgWyBTUEFSQyBvbmx5IF0KQEAgLTYyLDYgKzY0LDcgQEAKIC0gc2htYWxsCiAtIHNobW1heCAgICAgICAgICAgICAgICAgICAgICBbIHN5c3YgaXBjIF0KIC0gc2htbW5pCistIHNvZnRsb2NrdXBfdGhyZXNoCiAtIHN0b3AtYSAgICAgICAgICAgICAgICAgICAgICBbIFNQQVJDIG9ubHkgXQogLSBzeXNycSAgICAgICAgICAgICAgICAgICAgICAgPT0+IERvY3VtZW50YXRpb24vc3lzcnEudHh0CiAtIHRhaW50ZWQKQEAgLTcxLDE1ICs3NCw2IEBACiAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKLWFjcGlfdmlkZW9fZmxhZ3M6Ci0KLWZsYWdzCi0KLVNlZSBEb2MqL2tlcm5lbC9wb3dlci92aWRlby50eHQsIGl0IGFsbG93cyBtb2RlIG9mIHZpZGVvIGJvb3QgdG8gYmUKLXNldCBkdXJpbmcgcnVuIHRpbWUuCi0KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KIGFjY3Q6CiAKIGhpZ2h3YXRlciBsb3d3YXRlciBmcmVxdWVuY3kKQEAgLTk3LDYgKzkxLDI1IEBACiAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKK2FjcGlfdmlkZW9fZmxhZ3M6CisKK2ZsYWdzCisKK1NlZSBEb2MqL2tlcm5lbC9wb3dlci92aWRlby50eHQsIGl0IGFsbG93cyBtb2RlIG9mIHZpZGVvIGJvb3QgdG8gYmUKK3NldCBkdXJpbmcgcnVuIHRpbWUuCisKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK2F1dG9fbXNnbW5pOgorCitFbmFibGVzL0Rpc2FibGVzIGF1dG9tYXRpY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ZWwncyBsb2cgYnVmZmVyLgorV2hlbiBkbWVzZ19yZXN0cmljdCBpcyBzZXQgdG8gKDApIHRoZXJlIGFyZSBubyByZXN0cmljdGlvbnMuIFdoZW4KIGRtZXNnX3Jlc3RyaWN0IGlzIHNldCBzZXQgdG8gKDEpLCB1c2VycyBtdXN0IGhhdmUgQ0FQX1NZU0xPRyB0byB1c2UKIGRtZXNnKDgpLgogCi1UaGUga2VybmVsIGNvbmZpZyBvcHRpb24gQ09ORklHX1NFQ1VSSVRZX0RNRVNHX1JFU1RSSUNUIHNldHMgdGhlIGRlZmF1bHQKLXZhbHVlIG9mIGRtZXNnX3Jlc3RyaWN0LgorVGhlIGtlcm5lbCBjb25maWcgb3B0aW9uIENPTkZJR19TRUNVUklUWV9ETUVTR19SRVNUUklDVCBzZXRzIHRoZQorZGVmYXVsdCB2YWx1ZSBvZiBkbWVzZ19yZXN0cmljdC4KIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIApAQCAtMjU2LDEzICsyNzEsNiBAQAogCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCi1sMmNyOiAoUFBDIG9ubHkpCi0KLVRoaXMgZmxhZyBjb250cm9scyB0aGUgTDIgY2FjaGUgb2YgRzMgcHJvY2Vzc29yIGJvYXJkcy4gSWYKLTAsIHRoZSBjYWNoZSBpcyBkaXNhYmxlZC4gRW5hYmxlZCBpZiBub256ZXJvLgotCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCiBrcHRyX3Jlc3RyaWN0OgogCiBUaGlzIHRvZ2dsZSBpbmRpY2F0ZXMgd2hldGhlciByZXN0cmljdGlvbnMgYXJlIHBsYWNlZCBvbgpAQCAtMjgzLDYgKzI5MSwxMyBAQAogCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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0ZW1zIGRvIGdlbmVyYXRlIE5NSSdzIGZvciBiaXphcnJlIHJhbmRvbSByZWFzb25zCitzdWNoIGFzIHBvd2VyIG1hbmFnZW1lbnQgc28gdGhlIGRlZmF1bHQgaXMgb2ZmLiBUaGF0IHN5c2N0bCB3b3JrcyBsaWtlCit0aGUgZXhpc3RpbmcgcGFuaWMgY29udHJvbHMgYWxyZWFkeSBpbiB0aGF0IGRpcmVjdG9yeS4KIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIApAQCAtMzc2LDYgKzQxOSwxNCBAQAogCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCitwcmludGtfZGVsYXk6CisKK0RlbGF5IGVhY2ggcHJpbnRrIG1lc3NhZ2UgaW4gcHJpbnRrX2RlbGF5IG1pbGxpc2Vjb25kcworCitWYWx1ZSBmcm9tIDAgLSAxMDAwMCBpcyBhbGxvd2VkLgorCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCiBwcmludGtfcmF0ZWxpbWl0OgogCiBTb21lIHdhcm5pbmcgbWVzc2FnZXMgYXJlIHJhdGUgbGltaXRlZC4gcHJpbnRrX3JhdGVsaW1pdCBzcGVjaWZpZXMKQEAgLTM5NSwxNSArNDQ2LDcgQEAKIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotcHJpbnRrX2RlbGF5OgotCi1EZWxheSBlYWNoIHByaW50ayBtZXNzYWdlIGluIHByaW50a19kZWxheSBtaWxsaXNlY29uZHMKLQotVmFsdWUgZnJvbSAwIC0gMTAwMDAgaXMgYWxsb3dlZC4KLQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotcmFuZG9taXplLXZhLXNwYWNlOgorcmFuZG9taXplX3ZhX3NwYWNlOgogCiBUaGlzIG9wdGlvbiBjYW4gYmUgdXNlZCB0byBzZWxlY3QgdGhlIHR5cGUgb2YgcHJvY2VzcyBhZGRyZXNzCiBzcGFjZSByYW5kb21pemF0aW9uIHRoYXQgaXMgdXNlZCBpbiB0aGUgc3lzdGVtLCBmb3IgYXJjaGl0ZWN0dXJlcwpAQCAtNDY2LDExICs1MDksMTEgQEAKIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotc2htbWF4OiAKK3NobW1heDoKIAogVGhpcyB2YWx1ZSBjYW4gYmUgdXNlZCB0byBxdWVyeSBhbmQgc2V0IHRoZSBydW4gdGltZSBsaW1pdAogb24gdGhlIG1heGltdW0gc2hhcmVkIG1lbW9yeSBzZWdtZW50IHNpemUgdGhhdCBjYW4gYmUgY3JlYXRlZC4KLVNoYXJlZCBtZW1vcnkgc2VnbWVudHMgdXAgdG8gMUdiIGFyZSBub3cgc3VwcG9ydGVkIGluIHRoZSAKK1NoYXJlZCBtZW1vcnkgc2VnbWVudHMgdXAgdG8gMUdiIGFyZSBub3cgc3VwcG9ydGVkIGluIHRoZQoga2VybmVsLiAgVGhpcyB2YWx1ZSBkZWZhdWx0cyB0byBTSE1NQVguCiAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CkBAIC00ODQsNyArNTI3LDcgQEAKIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotdGFpbnRlZDogCit0YWludGVkOgogCiBOb24temVybyBpZiB0aGUga2VybmVsIGhhcyBiZWVuIHRhaW50ZWQuICBOdW1lcmljIHZhbHVlcywgd2hpY2gKIGNhbiBiZSBPUmVkIHRvZ2V0aGVyOgpAQCAtNTA5LDQ5ICs1NTIsMTEgQEAKI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NNjQ2WF9MUFNDX1RQQ0MgICAgICAgICAgIDQKLSNkZWZpbmUgRE02NDZYX0xQU0NfVFBUQzAgICAgICAgICAgNQotI2RlZmluZSBETTY0NlhfTFBTQ19UUFRDMSAgICAgICAgICA2Ci0jZGVmaW5lIERNNjQ2WF9MUFNDX1RQVEMyICAgICAgICAgIDcKLSNkZWZpbmUgRE02NDZYX0xQU0NfVFBUQzMgICAgICAgICAgOAotI2RlZmluZSBETTY0NlhfTFBTQ19QQ0kgICAgICAgICAgICAxMwotI2RlZmluZSBETTY0NlhfTFBTQ19FTUFDICAgICAgICAgICAxNAotI2RlZmluZSBETTY0NlhfTFBTQ19WRENFICAgICAgICAgICAxNQotI2RlZmluZSBETTY0NlhfTFBTQ19WUFNTTVNUUiAgICAgICAxNgotI2RlZmluZSBETTY0NlhfTFBTQ19WUFNTU0xWICAgICAgICAxNwotI2RlZmluZSBETTY0NlhfTFBTQ19UU0lGMCAgICAgICAgICAxOAotI2RlZmluZSBETTY0NlhfTFBTQ19UU0lGMSAgICAgICAgICAxOQotI2RlZmluZSBETTY0NlhfTFBTQ19ERFJfRU1JRiAgICAgICAyMAotI2RlZmluZSBETTY0NlhfTFBTQ19BRU1JRiAgICAgICAgICAyMQotI2RlZmluZSBETTY0NlhfTFBTQ19NY0FTUDAgICAgICAgICAyMgotI2RlZmluZSBETTY0NlhfTFBTQ19NY0FTUDEgICAgICAgICAyMwotI2RlZmluZSBETTY0NlhfTFBTQ19DUkdFTjAgICAgICAgICAyNAotI2RlZmluZSBETTY0NlhfTFBTQ19DUkdFTjEgICAgICAgICAyNQotI2RlZmluZSBETTY0NlhfTFBTQ19VQVJUMCAgICAgICAgICAyNgotI2RlZmluZSBETTY0NlhfTFBTQ19VQVJUMSAgICAgICAgICAyNwotI2RlZmluZSBETTY0NlhfTFBTQ19VQVJUMiAgICAgICAgICAyOAotI2RlZmluZSBETTY0NlhfTFBTQ19QV00wICAgICAgICAgICAyOQotI2RlZmluZSBETTY0NlhfTFBT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WEubworCiBvYmotJChDT05GSUdfTUFDSF9BRFNTUEhFUkUpCSs9IGFkc3NwaGVyZS5vCiBvYmotJChDT05GSUdfTUFDSF9FREI5M1hYKQkrPSBlZGI5M3h4Lm8KIG9iai0kKENPTkZJR19NQUNIX0dFU0JDOTMxMikJKz0gZ2VzYmM5MzEyLm8KZGlmZiAtLWdpdCBhL2FyY2gvYXJtL21hY2gtZXA5M3h4L2NvcmUuYyBiL2FyY2gvYXJtL21hY2gtZXA5M3h4L2NvcmUuYwppbmRleCAxZDRiNjVmLi5jNjBmMDgxIDEwMDY0NAotLS0gYS9hcmNoL2FybS9tYWNoLWVwOTN4eC9jb3JlLmMKKysrIGIvYXJjaC9hcm0vbWFjaC1lcDkzeHgvY29yZS5jCkBAIC0xNzQsMTQgKzE3NCwxMCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIEVQOTN4eCBJUlEgaGFuZGxpbmcKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotZXh0ZXJuIHZvaWQgZXA5M3h4X2dwaW9faW5pdF9pcnEodm9pZCk7Ci0KIHZvaWQgX19pbml0IGVwOTN4eF9pbml0X2lycSh2b2lkKQogewogCXZpY19pbml0KEVQOTNYWF9WSUMxX0JBU0UsIDAsIEVQOTNYWF9WSUMxX1ZBTElEX0lSUV9NQVNLLCAwKTsKIAl2aWNfaW5pdChFUDkzWFhfVklDMl9CQVNFLCAzMiwgRVA5M1hYX1ZJQzJfVkFMSURfSVJRX01BU0ssIDApOwotCi0JZXA5M3h4X2dwaW9faW5pdF9pcnEoKTsKIH0KIAogCkBAIC0yNDEsNiArMjM3LDI0IEBACiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBFUDkzeHggR1BJTworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgc3RydWN0IHJlc291cmNlIGVwOTN4eF9ncGlvX3Jlc291cmNlW10gPSB7CisJeworCQkuc3RhcnQJCT0gRVA5M1hYX0dQSU9fUEhZU19CQVNFLAorCQkuZW5kCQk9IEVQOTNYWF9HUElPX1BIWVNfQkFTRSArIDB4Y2MgLSAxLAorCQkuZmxhZ3MJCT0gSU9SRVNPVVJDRV9NRU0sCisJfSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIGVwOTN4eF9ncGlvX2RldmljZSA9IHsKKwkubmFtZQkJPSAiZ3Bpby1lcDkzeHgiLAorCS5pZAkJPSAtMSwKKwkubnVtX3Jlc291cmNlcwk9IEFSUkFZX1NJWkUoZXA5M3h4X2dwaW9fcmVzb3VyY2UpLAorCS5yZXNvdXJjZQk9IGVwOTN4eF9ncGlvX3Jlc291cmNlLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIEVQOTN4eCBwZXJpcGhlcmFsIGhhbmRsaW5nCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNkZWZpbmUgRVA5M1hYX1VBUlRfTUNSX09GRlNFVAkJKDB4MDEwMCkKQEAgLTI1MSw5ICsyNjUsOSBAQAogCXVuc2lnbmVkIGludCBtY3I7CiAKIAltY3IgPSAwOwotCWlmICghKG1jdHJsICYgVElPQ01fUlRTKSkKKwlpZiAobWN0cmwgJiBUSU9DTV9SVFMpCiAJCW1jciB8PSAyOwotCWlmICghKG1jdHJsICYgVElPQ01fRFRSKSkKKwlpZiAobWN0cmwgJiBUSU9DTV9EVFIpCiAJCW1j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AgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwOAotI2RlZmluZSBCSVQ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTAKLSNkZWZpbmUgQklUNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDIwCi0jZGVmaW5lIEJJVDYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA0MAotI2RlZmluZSBCSVQ3ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwODAKLSNkZWZpbmUgQklUOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMTAwCi0jZGVmaW5lIEJJVDkgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDIwMAotI2RlZmluZSBCSVQxMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDA0MDAKLSNkZWZpbmUgQklUMTEgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwODAwCi0jZGVmaW5lIEJJVDEyICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAotI2RlZmluZSBCSVQxMyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDIwMDAKLSNkZWZpbmUgQklUMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0MDAwCi0jZGVmaW5lIEJJVDE1ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwODAwMAotI2RlZmluZSBCSVQxNiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwMDAKLSNkZWZpbmUgQklUMTcgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIwMDAwCi0jZGVmaW5lIEJJVDE4ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0MDAwMAotI2RlZmluZSBCSVQxOSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwODAwMDAKLSNkZWZpbmUgQklUMjAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAwMDAwCi0jZGVmaW5lIEJJVDIxICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwMDAwMAotI2RlZmluZSBCSVQyMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDAwMDAKLSNkZWZpbmUgQklUMjMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwODAwMDAwCi0jZGVmaW5lIEJJVDI0ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwMDAwMAotI2RlZmluZSBCSVQyNSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDIwMDAwMDAKLSNkZWZpbmUgQklUMjYgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MDAwMDAwCi0jZGVmaW5lIEJJVDI3ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMDAwMAotI2RlZmluZSBCSVQyOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwMDAKLSNkZWZpbmUgQklUMjkgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAwMDAwCi0jZGVmaW5lIEJJVDMwICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwMDAwMAotI2RlZmluZSBCSVQzMSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMDAwMDAKLQotI2VuZGlmCi0KLS8qICAgICAgICAgRU5EICovCmRpZmYgLS1naXQgYS9hcmNoL2FybS9tYWNoLWlvcDEzeHgvc2V0dXAuYyBiL2FyY2gvYXJtL21hY2gtaW9wMTN4eC9zZXR1cC5jCmluZGV4IDVjMTQ3ZmIuLmE1Yjk4OTcgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL21hY2gtaW9wMTN4eC9zZXR1cC5jCisrKyBiL2FyY2gvYXJtL21hY2gtaW9wMTN4eC9zZXR1cC5jCkBAIC0xNyw2ICsxNyw3IEBACiAgKgogICovCiAKKyNpbmNsdWRlIDxsaW51eC9kbWEtbWFwcGluZy5oPgogI2luY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GgJCT0gTE9LSV9SRUdTX1NJWkUsCi0JCS50eXBlCQk9IE1UX0RFVklDRSwKLQl9LAotfTsKLQotdm9pZCBfX2luaXQgbG9raV9tYXBfaW8odm9pZCkKLXsKLQlpb3RhYmxlX2luaXQobG9raV9pb19kZXNjLCBBUlJBWV9TSVpFKGxva2lfaW9fZGVzYykpOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogR0UwMAotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIF9faW5pdCBsb2tpX2dlMF9pbml0KHN0cnVjdCBtdjY0M3h4X2V0aF9wbGF0Zm9ybV9kYXRhICpldGhfZGF0YSkKLXsKLQl3cml0ZWwoMHgwMDA3OTIyMCwgR0UwX1ZJUlRfQkFTRSArIDB4MjBiMCk7Ci0KLQlvcmlvbl9nZTAwX2luaXQoZXRoX2RhdGEsICZsb2tpX21idXNfZHJhbV9pbmZvLAotCQkJR0UwX1BIWVNfQkFTRSwgSVJRX0xPS0lfR0JFX0FfSU5ULAotCQkJMCwgTE9LSV9UQ0xLKTsKLX0KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEdFMDEKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCBfX2luaXQgbG9raV9nZTFfaW5pdChzdHJ1Y3QgbXY2NDN4eF9ldGhfcGxhdGZvcm1fZGF0YSAqZXRoX2RhdGEpCi17Ci0Jd3JpdGVsKDB4MDAwNzkyMjAsIEdFMV9WSVJUX0JBU0UgKyAweDIwYjApOwotCi0Jb3Jpb25fZ2UwMV9pbml0KG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KLQkubmFtZQkJPSAibXZzYXMiLAotCS5pZAkJPSAwLAotCS5kZXYJCT0gewotCQkuY29oZXJlbnRfZG1hX21hc2sJPSBETUFfQklUX01BU0soMzIpLAotCX0sCi0JLm51bV9yZXNvdXJjZXMJPSBBUlJBWV9TSVpFKGxva2lfc2FzX3Jlc291cmNlcyksCi0JLnJlc291cmNlCT0gbG9raV9zYXNfcmVzb3VyY2VzLAotfTsKLQotdm9pZCBfX2luaXQgbG9raV9zYXNfaW5pdCh2b2lkKQotewotCXdyaXRlbCgweDgzMDBmNzA3LCBERFJfUkVHKDB4MTQyNCkpOwotCXBsYXRmb3JtX2RldmljZV9yZWdpc3RlcigmbG9raV9zYXMpOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVUFSVDAKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCBfX2luaXQgbG9raV91YXJ0MF9pbml0KHZvaWQpCi17Ci0Jb3Jpb25fdWFydDBfaW5pdChVQVJUMF9WSVJUX0JBU0UsIFVBUlQwX1BIWVNfQkFTRSwKLQkJCSBJUlFfTE9LSV9VQVJUMCwgTE9LSV9UQ0xLKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBVQVJUMQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIF9faW5pdCBsb2tpX3VhcnQxX2luaXQodm9pZCkKLXsKLQlvcmlvbl91YXJ0MV9pbml0KFVBUlQxX1ZJUlRfQkFTRSwgVUFSVDFfUEhZU19CQVNFLAotCQkJIElSUV9MT0tJX1VBUlQxLCBMT0tJX1RDTEspOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVGltZSBoYW5kbGluZwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIF9faW5pdCBsb2tpX2luaXRfZWFybHkodm9pZCkKLXsKLQlvcmlvbl90aW1lX3NldF9iYXNlKFRJTUVSX1ZJUlRfQkFTRSk7Ci19Ci0KLXN0YXRpYyB2b2lkIGxva2lfdGltZXJfaW5pdCh2b2lkKQotewotCW9yaW9uX3RpbWVfaW5pdChCUklER0VfVklSVF9CQVNFLCBCUklER0VfSU5UX1RJTUVSMV9DTFIsCi0JCQlJUlFfTE9LSV9CUklER0UsIExPS0lfVENMSyk7Ci19Ci0KLXN0cnVjdCBzeXNfdGltZXIgbG9raV90aW1lciA9IHsKLQkuaW5pdCA9IGxva2lfdGltZXJfaW5pdCwKLX07Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBHZW5lcmFsCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgX19pbml0IGxva2lfaW5pdCh2b2lkKQotewotCXByaW50ayhLRVJOX0lORk8gIkxva2kgSUQ6IDg4UkM4NDgwLiBUQ0xLPSVkLlxuIiwgTE9LSV9UQ0xLKTsKLQotCWxva2lfc2V0dXBfY3B1X21idXMoKTsKLX0KZGlmZiAtLWdpdCBhL2FyY2gvYXJtL21hY2gtbG9raS9jb21tb24uaCBiL2FyY2gvYXJtL21hY2gtbG9raS9jb21tb24uaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggYT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zJfbGF0ZV9kZXZpY2VzKSk7CisKKwlzaDczNzJfYWRkX2RldmljZV90b19kb21haW4oJnNoNzM3Ml9hM3J2LCAmdnB1X2RldmljZSk7CisJc2g3MzcyX2FkZF9kZXZpY2VfdG9fZG9tYWluKCZzaDczNzJfYTRtcCwgJnNwdTBfZGV2aWNlKTsKKwlzaDczNzJfYWRkX2RldmljZV90b19kb21haW4oJnNoNzM3Ml9hNG1wLCAmc3B1MV9kZXZpY2UpOwogfQogCiB2b2lkIF9faW5pdCBzaDczNzJfYWRkX2Vhcmx5X2RldmljZXModm9pZCkKZGlmZiAtLWdpdCBhL2FyY2gvYXJtL21hY2gtdGVncmEvTWFrZWZpbGUgYi9hcmNoL2FybS9tYWNoLXRlZ3JhL01ha2VmaWxlCmluZGV4IDgyM2M3MDMuLmVkNThlZjkgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL21hY2gtdGVncmEvTWFrZWZpbGUKKysrIGIvYXJjaC9hcm0vbWFjaC10ZWdyYS9NYWtlZmlsZQpAQCAtNCw3ICs0LDYgQEAKIG9iai15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArPSBpcnEubwogb2JqLXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICs9IGNsb2NrLm8KIG9iai15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArPSB0aW1lci5vCi1vYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gZ3Bpby5vCiBvYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gcGlubXV4Lm8KIG9iai15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArPSBwb3dlcmdhdGUubwogb2JqLXkJCQkJCSs9IGZ1c2UubwpkaWZmIC0tZ2l0IGEvYXJjaC9hcm0vbWFjaC10ZWdyYS9ib2FyZC1zZWFib2FyZC5jIGIvYXJjaC9hcm0vbWFjaC10ZWdyYS9ib2FyZC1zZWFib2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BMQl9BRERSMykKLQlQTV9QVVNIKERDUExCX0FERFI0KQotCVBNX1BVU0goRENQTEJfQUREUjUpCi0JUE1fUFVTSChEQ1BMQl9BRERSNikKLQlQTV9QVVNIKERDUExCX0FERFI3KQotCVBNX1BVU0goRENQTEJfQUREUjgpCi0JUE1fUFVTSChEQ1BMQl9BRERSOSkKLQlQTV9QVVNIKERDUExCX0FERFIxMCkKLQlQTV9QVVNIKERDUExCX0FERFIxMSkKLQlQTV9QVVNIKERDUExCX0FERFIxMikKLQlQTV9QVVNIKERDUExCX0FERFIxMykKLQlQTV9QVVNIKERDUExCX0FERFIxNCkKLQlQTV9QVVNIKERDUExCX0FERFIxNSkKLQlQTV9QVVNIKERDUExCX0RBVEEwKQotCVBNX1BVU0goRENQTEJfREFUQTEpCi0JUE1fUFVTSChEQ1BMQl9EQVRBMikKLQlQTV9QVVNIKERDUExCX0RBVEEzKQotCVBNX1BVU0goRENQTEJfREFUQTQpCi0JUE1fUFVTSChEQ1BMQl9EQVRBNSkKLQlQTV9QVVNIKERDUExCX0RBVEE2KQotCVBNX1BVU0goRENQTEJfREFUQTcpCi0JUE1fUFVTSChEQ1BMQl9EQVRBOCkKLQlQTV9QVVNIKERDUExCX0RBVEE5KQotCVBNX1BVU0goRENQTEJfREFUQTEwKQotCVBNX1BVU0goRENQTEJfREFUQTExKQotCVBNX1BVU0goRENQTEJfREFUQTEyKQotCVBNX1BVU0goRENQTEJfREFUQTEzKQotCVBNX1BVU0goRENQTEJfREFUQTE0KQotCVBNX1BVU0goRENQTEJfREFUQTE1KQotCVBNX1BVU0goSU1FTV9DT05UUk9MKQotCVBNX1BVU0goSUNQTEJfQUREUjApCi0JUE1fUFVTSChJQ1BMQl9BRERSMSkKLQlQTV9QVVNIKElDUExCX0FERFIyKQotCVBNX1BVU0goSUNQTEJfQUREUjMpCi0JUE1fUFVTSChJQ1BMQl9BRERSNCkKLQlQTV9QVVNIKElDUExCX0FERFI1KQotCVBNX1BVU0goSUNQTEJfQURE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Bic2V0X3JlZ19zZXRfYml0KGludCBuciwgdm9sYXRpbGUgdW5zaWduZWQgbG9uZyAqdmFkZHIpCit7CisJY2hhciAqcCA9IChjaGFyICopdmFkZHIgKyAobnIgXiAzMSkgLyA4OworCisJX19hc21fXyBfX3ZvbGF0aWxlX18gKCJic2V0ICUxLCglMCkiCisJCToKKwkJOiAiYSIgKHApLCAiZGkiIChuciAmIDcpCisJCTogIm1lbW9yeSIpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgYnNldF9tZW1fc2V0X2JpdChpbnQgbnIsIHZvbGF0aWxlIHVuc2lnbmVkIGxvbmcgKnZhZGRyKQoreworCWNoYXIgKnAgPSAoY2hhciAqKXZhZGRyICsgKG5yIF4gMzEpIC8gODsKKworCV9fYXNtX18gX192b2xhdGlsZV9fICgiYnNldCAlMSwlMCIKKwkJOiAiK20iICgqcCkKKwkJOiAiZGkiIChuciAmIDcpKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGJmc2V0X21lbV9zZXRfYml0KGludCBuciwgdm9sYXRpbGUgdW5zaWduZWQgbG9uZyAqdmFkZHIpCit7CisJX19hc21fXyBfX3ZvbGF0aWxlX18gKCJiZnNldCAlMXslMDojMX0iCisJCToKKwkJOiAiZCIgKG5yIF4gMzEpLCAibyIgKCp2YWRkcikKKwkJOiAibWVtb3J5Iik7Cit9CisKKyNpZiBkZWZpbmVkKENPTkZJR19DT0xERklSRSkKKyNkZWZpbmUJc2V0X2JpdChuciwgdmFkZHIpCWJzZXRfcmVnX3NldF9iaXQobnIsIHZhZGRyKQorI2VsaWYgZGVmaW5lZChDT05GSUdfQ1BVX0hBU19OT19CSVRGSUVMRFMpCisjZGVmaW5lCXNldF9iaXQobnIsIHZhZGRyKQlic2V0X21lbV9zZXRfYml0KG5yLCB2YWRkcikKKyNlbHNlCisjZGVmaW5lIHNldF9iaXQobnIsIHZhZGRyKQkoX19idWlsdGluX2NvbnN0YW50X3AobnIpID8gXAorCQkJCWJzZXRfbWVtX3N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bGUgdW5zaWduZWQgbG9uZyAqdmFkZHIpCit7CisJY2hhciAqcCA9IChjaGFyICopdmFkZHIgKyAobnIgXiAzMSkgLyA4OworCWNoYXIgcmV0dmFsOworCisJX19hc21fXyBfX3ZvbGF0aWxlX18gKCJic2V0ICUyLCglMSk7IHNuZSAlMCIKKwkJOiAiPWQiIChyZXR2YWwpCisJCTogImEiIChwKSwgImRpIiAobnIgJiA3KQorCQk6ICJtZW1vcnkiKTsKKwlyZXR1cm4gcmV0dmFsOworfQorCitzdGF0aWMgaW5saW5lIGludCBic2V0X21lbV90ZXN0X2FuZF9zZXRfYml0KGludCBuciwKKwkJCQkJICAgIHZvbGF0aWxlIHVuc2lnbmVkIGxvbmcgKnZhZGRyKQoreworCWNoYXIgKnAgPSAoY2hhciAqKXZhZGRyICsgKG5yIF4gMzEpIC8gODsKKwljaGFyIHJldHZhbDsKKworCV9fYXNtX18gX192b2xhdGlsZV9fICgiYnNldCAlMiwlMTsgc25lICUwIgorCQk6ICI9ZCIgKHJldHZhbCksICIrbSIgKCpwKQorCQk6ICJkaSIgKG5yICYgNykpOworCXJldHVybiByZXR2YWw7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGJmc2V0X21lbV90ZXN0X2FuZF9zZXRfYml0KGludCBuciwKKwkJCQkJICAgICB2b2xhdGlsZSB1bnNpZ25lZCBsb25nICp2YWRkcikKK3sKKwljaGFyIHJldHZhbDsKKworCV9fYXNtX18gX192b2xhdGlsZV9fICgiYmZzZXQgJTJ7JTE6IzF9OyBzbmUgJTAiCisJCTogIj1kIiAocmV0dmFsKQorCQk6ICJkIiAobnIgXiAzMSksICJvIiAoKnZhZGRyKQorCQk6ICJtZW1vcnkiKTsKKwlyZXR1cm4gcmV0dmFsOworfQorCisjaWYgZGVmaW5lZChDT05GSUdfQ09MREZJUkUpCisjZGVmaW5lCXRlc3RfYW5kX3NldF9iaXQobnIsIHZhZGRyKQlic2V0X3JlZ190ZXN0X2FuZF9zZXRfYml0KG5yLC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oPgorI2luY2x1ZGUgPGFzbS1nZW5lcmljL2JpdG9wcy9mZnouaD4KKyNlbHNlCisKK3N0YXRpYyBpbmxpbmUgaW50IGZpbmRfZmlyc3RfemVyb19iaXQoY29uc3QgdW5zaWduZWQgbG9uZyAqdmFkZHIsCisJCQkJICAgICAgdW5zaWduZWQgc2l6ZSkKK3sKKwljb25zdCB1bnNpZ25lZCBsb25nICpwID0gdmFkZHI7CisJaW50IHJlcyA9IDMyOworCXVuc2lnbmVkIGludCB3b3JkczsKKwl1bnNpZ25lZCBsb25nIG51bTsKKworCWlmICghc2l6ZSkKKwkJcmV0dXJuIDA7CisKKwl3b3JkcyA9IChzaXplICsgMzEpID4+IDU7CisJd2hpbGUgKCEobnVtID0gfipwKyspKSB7CisJCWlmICghLS13b3JkcykKKwkJCWdvdG8gb3V0OworCX0KKworCV9fYXNtX18gX192b2xhdGlsZV9fICgiYmZmZm8gJTF7IzAsIzB9LCUwIgorCQkJICAgICAgOiAiPWQiIChyZXMpIDogImQiIChudW0gJiAtbnVtKSk7CisJcmVzIF49IDMxOworb3V0OgorCXJlcyArPSAoKGxvbmcpcCAtIChsb25nKXZhZGRyIC0gNCkgKiA4OworCXJldHVybiByZXMgPCBzaXplID8gcmVzIDogc2l6ZTsKK30KKyNkZWZpbmUgZmluZF9maXJzdF96ZXJvX2JpdCBmaW5kX2ZpcnN0X3plcm9fYml0CisKK3N0YXRpYyBpbmxpbmUgaW50IGZpbmRfbmV4dF96ZXJvX2JpdChjb25zdCB1bnNpZ25lZCBsb25nICp2YWRkciwgaW50IHNpemUsCisJCQkJICAgICBpbnQgb2Zmc2V0KQoreworCWNvbnN0IHVuc2lnbmVkIGxvbmcgKnAgPSB2YWRkciArIChvZmZzZXQgPj4gNSk7CisJaW50IGJpdCA9IG9mZnNldCAmIDMxVUwsIHJlczsKKworCWlmIChvZmZzZXQgPj0gc2l6ZSkKKwkJcmV0dXJuIHNpemU7CisKKwlpZiAoYml0KSB7CisJCXVuc2lnbmVkIGxvbmcgbnVtID0gfipwKysgJiAofjBVTCA8PCBiaXQpOworCQlvZmZzZXQgLT0gYml0OworCisJCS8qIExvb2sgZm9yIHplcm8gaW4gZmlyc3QgbG9uZ3dvcmQgKi8KKwkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCJiZmZmbyAlMXsjMCwjMH0sJTAiCisJCQkJICAgICAgOiAiPWQiIChyZXMpIDogImQiIChudW0gJiAtbnVtKSk7CisJCWlmIChyZXMgPCAzMikgeworCQkJb2Zmc2V0ICs9IHJlcyBeIDMxOworCQkJcmV0dXJuIG9mZnNldCA8IHNpemUgPyBvZmZzZXQgOiBzaXplOworCQl9CisJCW9mZnNldCArPSAzMjsKKworCQlpZiAob2Zmc2V0ID49IHNpemUpCisJCQlyZXR1cm4gc2l6ZTsKKwl9CisJLyogTm8gemVybyB5ZXQsIHNlYXJjaCByZW1haW5pbmcgZnVsbCBieXRlcyBmb3IgYSB6ZXJvICovCisJcmV0dXJuIG9mZnNldCArIGZpbmRfZmlyc3RfemVyb19iaXQocCwgc2l6ZSAtIG9mZnNldCk7Cit9CisjZGVmaW5lIGZpbmRfbmV4dF96ZXJvX2JpdCBmaW5kX25leHRfemVyb19iaXQKKworc3RhdGljIGlubGluZSBpbnQgZmluZF9maXJzdF9iaXQoY29uc3QgdW5zaWduZWQgbG9uZyAqdmFkZHIsIHVuc2lnbmVkIHNpemUpCit7CisJY29uc3QgdW5zaWduZWQgbG9uZyAqcCA9IHZhZGRyOworCWludCByZXMgPSAzMjsKKwl1bnNpZ25lZCBpbnQgd29yZHM7CisJdW5zaWduZWQgbG9uZyBudW07CisKKwlpZiAoIXNpemUpCisJCXJldHVybiAwOworCisJd29yZHMgPSAoc2l6ZSArIDMxKSA+PiA1OworCXdoaWxlICghKG51bSA9ICpwKyspKSB7CisJCWlmICghLS13b3JkcykKKwkJCWdvdG8gb3V0OworCX0KKworCV9fYXNtX18gX192b2xhdGlsZV9fICgiYmZmZm8gJTF7IzAsIzB9LCUwIgorCQk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gICAgICAgICAgICAgICJiaXRyZXYgJTBcblx0IgotICAgICAgICAgICAgICAgICAgICAgICAgImZmMSAlMFxuXHQiCi0gICAgICAgICAgICAgICAgICAgICAgICA6ICI9ZCIgKHZhbCkKLSAgICAgICAgICAgICAgICAgICAgICAgIDogIjAiICh2YWwpCi0JCSAgICApOwotICAgICAgICB2YWwrKzsKLSAgICAgICAgcmV0dXJuIHZhbDsKLX0KLQotc3RhdGljIGlubGluZSBpbnQgX19mZnModW5zaWduZWQgaW50IHZhbCkKLXsKLSAgICAgICAgYXNtIHZvbGF0aWxlKAotICAgICAgICAgICAgICAgICAgICAgICAgImJpdHJldiAlMFxuXHQiCi0gICAgICAgICAgICAgICAgICAgICAgICAiZmYxICUwXG5cdCIKLSAgICAgICAgICAgICAgICAgICAgICAgIDogIj1kIiAodmFsKQotICAgICAgICAgICAgICAgICAgICAgICAgOiAiMCIgKHZhbCkKLQkJICAgICk7Ci0gICAgICAgIHJldHVybiB2YWw7Ci19Ci0KLSNlbHNlCi0jaW5jbHVkZSA8YXNtLWdlbmVyaWMvYml0b3BzL2Zmcy5oPgotI2luY2x1ZGUgPGFzbS1nZW5lcmljL2JpdG9wcy9fX2Zmcy5oPgotI2VuZGlmCi0KLSNpbmNsdWRlIDxhc20tZ2VuZXJpYy9iaXRvcHMvc2NoZWQuaD4KLSNpbmNsdWRlIDxhc20tZ2VuZXJpYy9iaXRvcHMvZmZ6Lmg+Ci0KLXN0YXRpYyBfX2lubGluZV9fIHZvaWQgc2V0X2JpdChpbnQgbnIsIHZvbGF0aWxlIHVuc2lnbmVkIGxvbmcgKiBhZGRyKQotewotI2lmZGVmIENPTkZJR19DT0xERklSRQotCV9fYXNtX18gX192b2xhdGlsZV9fICgibGVhICUwLCUlYTA7IGJzZXQgJTEsKCUlYTApIgotCSAgICAgOiAiK20iICgoKHZvbGF0aWxlIGNoYXIgKilhZGRyKVsobnJeMzEpID4+IDNdKQotCSAgICAgOiAiZCIgKG5yKQotCSAgICAgOiAi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KQEAgLTEsMTI3ICswLDAgQEAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKglsaW51eC9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81MjA2ZS9jb25maWcuYwotICoKLSAqCUNvcHlyaWdodCAoQykgMTk5OS0yMDAyLCBHcmVnIFVuZ2VyZXIgKGdlcmdAc25hcGdlYXIuY29tKQotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KLSNpbmNsdWRlIDxsaW51eC9wYXJhbS5oPgotI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4KLSNpbmNsdWRlIDxsaW51eC9pby5oPgotI2luY2x1ZGUgPGFzbS9tYWNoZGVwLmg+Ci0jaW5jbHVkZSA8YXNtL2NvbGRmaXJlLmg+Ci0jaW5jbHVkZSA8YXNtL21jZnNpbS5oPgotI2luY2x1ZGUgPGFzbS9tY2Z1YXJ0Lmg+Ci0jaW5jbHVkZSA8YXNtL21jZmRtYS5oPgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1zdGF0aWMgc3RydWN0IG1jZl9wbGF0Zm9ybV91YXJ0IG01MjA2ZV91YXJ0X3BsYXRmb3JtW10gPSB7Ci0JewotCQkubWFwYmFzZQk9IE1DRl9NQkFSICsgTUNGVUFSVF9CQVNFMSwKLQkJLmlycQkJPSA3MywKLQl9LAotCXsKLQkJLm1hcGJhc2UgCT0gTUNGX01CQVIgKyBNQ0ZVQVJUX0JBU0UyLAotCQkuaXJxCQk9IDc0LAotCX0sCi0JeyB9LAotfTsKLQotc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZX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IGluIHRoZSBDT05GSUdfR1VBUkRfUFJPVEVDVEVEX0NPUkUgcGFydAorCSAqLworI2lmZGVmIENPTkZJR19PUEVOUklTQ19OT19TUFJfU1JfRFNYCisJbC5sd3ogICByNixQVF9QQyhyMykgICAgICAgICAgICAgICAgICAvLyBhZGRyZXNzIG9mIGFuIG9mZmVuZGluZyBpbnNuCisJbC5sd3ogICByNiwwKHI2KSAgICAgICAgICAgICAgICAgICAvLyBpbnN0cnVjdGlvbiB0aGF0IGNhdXNlZCBwZgorCisJbC5zcmxpICByNixyNiwyNiAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBvcGNvZGUgZm9yIGp1bXAgaW5zbgorCWwuc2ZlcWkgcjYsMCAgICAgICAgICAgICAgICAgICAgICAgLy8gbC5qCisJbC5iZiAgICA4ZgorCWwuc2ZlcWkgcjYsMSAgICAgICAgICAgICAgICAgICAgICAgLy8gbC5qYWwKKwlsLmJmICAgIDhmCisJbC5zZmVxaSByNiwzICAgICAgICAgICAgICAgICAgICAgICAvLyBsLmJuZgorCWwuYmYgICAgOGYKKwlsLnNmZXFpIHI2LDQgICAgICAgICAgICAgICAgICAgICAgIC8vIGwuYmYKKwlsLmJmICAgIDhmCisJbC5zZmVxaSByNiwweDExICAgICAgICAgICAgICAgICAgICAvLyBsLmpyCisJbC5iZiAgICA4ZgorCWwuc2ZlcWkgcjYsMHgxMiAgICAgICAgICAgICAgICAgICAgLy8gbC5qYWxyCisJbC5iZiAgICA4ZgorCisJbC5ub3AKKworCWwuaiAgICAgOWYKKwlsLm5vcAorODoKKworCWwubHd6ICAgcjYsUFRfUEMocjMpICAgICAgICAgICAgICAgICAgLy8gYWRkcmVzcyBvZiBhbiBvZmZlbmRpbmcgaW5zbgorCWwuYWRkaSAgcjYscjYsNAorCWwubHd6ICAgcjYsMChyNikgICAgICAgICAgICAgICAgICAgLy8gaW5zdHJ1Y3Rpb24gdGhhdCBjYXVzZWQgcGYKKwlsLnNybGkgIHI2LHI2LDI2ICAgICA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WYKKwlsLmFkZGkgIHI1LHI1LDQgICAgICAgICAgICAgICAgIC8qIEluY3JlbWVudCBQQyB0byBnZXQgcmV0dXJuIGluc24gYWRkcmVzcyAqLworCitqbXA6CisJbC5zbGxpICByNCxyMyw2ICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHNpZ25lZCBleHRlbmRlZCBqdW1wIGxlbmd0aCAqLworCWwuc3JhaSAgcjQscjQsNAorCisJbC5sd3ogICByMyw0KHI1KSAgICAgICAgICAgICAgICAvKiBMb2FkIHRoZSByZWFsIGxvYWQvc3RvcmUgaW5zbiAqLworCisJbC5hZGQgICByNSxyNSxyNCAgICAgICAgICAgICAgICAvKiBDYWxjdWxhdGUganVtcCB0YXJnZXQgYWRkcmVzcyAqLworCisJbC5qICAgICAxZgorCWwuc3JsaSAgcjQscjMsMjYgICAgICAgICAgICAgICAgLyogU2hpZnQgbGVmdCB0byBnZXQgdGhlIGluc24gb3Bjb2RlICovCisKK2pyOgorCWwuc2xsaSAgcjQscjMsOSAgICAgICAgICAgICAgICAgLyogU2hpZnQgdG8gZ2V0IHRoZSByZWcgbmIgKi8KKwlsLmFuZGkgIHI0LHI0LDB4N2MKKworCWwubHd6ICAgcjMsNChyNSkgICAgICAgICAgICAgICAgLyogTG9hZCB0aGUgcmVhbCBsb2FkL3N0b3JlIGluc24gKi8KKworCWwuYWRkICAgcjQscjQscjEgICAgICAgICAgICAgICAgLyogTG9hZCB0aGUganVtcCByZWdpc3RlciB2YWx1ZSBmcm9tIHRoZSBzdGFjayAqLworCWwubHd6ICAgcjUsMChyNCkKKworCWwuc3JsaSAgcjQscjMsMjYgICAgICAgICAgICAgICAgLyogU2hpZnQgbGVmdCB0byBnZXQgdGhlIGluc24gb3Bjb2RlICovCisKKworMToKKy8vCSAgbC5tdHNwciByMCxyNSxTUFJfRVBDUl9CQVNFCisJbC5zdwlQVF9QQyhyMSkscjUKKworCWwuc2ZlcWkgcjQsMHgyNgorCWwuYmYgICAgbGhzCisJbC5zZmVxaSByNCwweDI1CisJbC5iZiAgICBsaHoKKwlsLnNmZXFpIHI0LDB4MjIKKwlsLmJmICAgIGx3cworCWwuc2ZlcWkgcjQsMHgyMQorCWwuYmYgICAgbHd6CisJbC5zZmVxaSByNCwweDM3CisJbC5iZiAgICBzaAorCWwuc2ZlcWkgcjQsMHgzNQorCWwuYmYgICAgc3cKKwlsLm5vcAorCisxOiAgICAgIGwuaiAgICAgMWIgICAgICAgICAgICAgICAgICAgICAgLyogSSBkb24ndCBrbm93IHdoYXQgdG8gZG8gKi8KKwlsLm5vcAorCitsaHM6ICAgIGwubGJzICAgcjUsMChyMikKKwlsLnNsbGkgIHI1LHI1LDgKKwlsLmxieiAgIHI2LDEocjIpCisJbC5vciAgICByNSxyNSxyNgorCWwuc3JsaSAgcjQscjMsMTkKKwlsLmFuZGkgIHI0LHI0LDB4N2MKKwlsLmFkZCAgIHI0LHI0LHIxCisJbC5qICAgICBhbGlnbl9lbmQKKwlsLnN3ICAgIDAocjQpLHI1CisKK2xoejogICAgbC5sYnogICByNSwwKHIyKQorCWwuc2xsaSAgcjUscjUsOAorCWwubGJ6ICAgcjYsMShyMikKKwlsLm9yICAgIHI1LHI1LHI2CisJbC5zcmxpICByNCxyMywxOQorCWwuYW5kaSAgcjQscjQsMHg3YworCWwuYWRkICAgcjQscjQscjEKKwlsLmogICAgIGFsaWduX2VuZAorCWwuc3cgICAgMChyNCkscjUKKworbHdzOiAgICBsLmxicyAgIHI1LDAocjIpCisJbC5zbGxpICByNSxyNSwyNAorCWwubGJ6ICAgcjYsMShyMikKKwlsLnNsbGkgIHI2LHI2LDE2CisJbC5vciAgICByNSxyNSxyNgorCWwubGJ6ICAgcjYsMihyMikKKwlsLnNsbGkgIHI2LHI2LDgKKwlsLm9yICAgIHI1LHI1LHI2CisJbC5sYnogICByNiwzKHIyKQorCWwub3IgICAgcjUscjUscjYKKwlsLnNybGkgIHI0LHIzLDE5CisJbC5hbmRpICByNCxyNCwweDdjCisJbC5hZGQgICBy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TEJNUgorCisJLyogc2V0IHVwIERUTEIgd2l0aCBubyB0cmFuc2xhdGlvbiBmb3IgRUEgPD0gMHhiZmZmZmZmZiAqLworCUxPQURfU1lNQk9MXzJfR1BSKHI2LDB4YmZmZmZmZmYpCisJbC5zZmdldSAgcjYscjQgICAgICAgICAgICAgICAgICAgICAvLyBmbGFnIGlmIHI2ID49IHI0IChpZiAweGJmZmZmZmZmID49IEVBKQorCWwuYmYgICAgIDFmICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ290byBvdXQKKwlsLmFuZCAgICByMyxyNCxyNCAgICAgICAgICAgICAgICAgIC8vIGRlbGF5IHNsb3QgOjogMjQgPC0gcjQgKGlmIGZsYWc9PTEpCisKKwl0b3BoeXMocjMscjQpICAgICAgICAgICAgICAgICAgICAgIC8vIHIzIDwtIFBBCisxOgorCWwub3JpICAgcjMscjMsfihQUE5fTUFTSykgICAgICAgICAgLy8gcjMgPC0gUFBOIDpQUE4gLnhmZmYgLSBjbGVhciB1cCBsbyhyNikgdG8gMHgqKioqICpmZmYKKwlsLm1vdmhpIHI1LGhpKERUTEJfVFJfTUFTSykgICAgICAgIC8vIHI1IDwtIGZmZmY6MDAwMC54MDAwCisJbC5vcmkgICByNSxyNSxsbyhEVExCX1RSX01BU0spICAgICAvLyByNSA8LSBmZmZmOjExMTEueDMzMCAtIGFwcGx5IERUTEJfTVJfTUFTSworCWwuYW5kICAgcjUscjUscjMgICAgICAgICAgICAgICAgICAgLy8gcjUgPC0gUFBOIDpQUE4gLngzMzAgLSB3ZSBoYXZlIERUTEJUUiBlbnRyeQorCWwubXRzcHIgcjIscjUsU1BSX0RUTEJUUl9CQVNFKDApICAgLy8gc2V0IERUTEJUUgorCisJRVhDRVBUSU9OX0xPQURfR1BSNgorCUVYQ0VQVElPTl9MT0FEX0dQUjUKKwlFWENFUFRJT05fTE9BRF9HUFI0CisJRVhDRVBUSU9OX0xPQURfR1BSMworCUVYQ0VQVElPTl9MT0FEX0dQUjIKKworCWwucmZ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AgICAgICAgICAgICAgICAgICAgLy8gcjMgPC0gUEEKKzE6CisJbC5vcmkgICByMyxyMyx+KFBQTl9NQVNLKSAgICAgICAgICAvLyByMyA8LSBQUE4gOlBQTiAueGZmZiAtIGNsZWFyIHVwIGxvKHI2KSB0byAweCoqKiogKmZmZgorCWwubW92aGkgcjUsaGkoSVRMQl9UUl9NQVNLKSAgICAgICAgLy8gcjUgPC0gZmZmZjowMDAwLngwMDAKKwlsLm9yaSAgIHI1LHI1LGxvKElUTEJfVFJfTUFTSykgICAgIC8vIHI1IDwtIGZmZmY6MTExMS54MDUwIC0gYXBwbHkgSVRMQl9NUl9NQVNLCisJbC5hbmQgICByNSxyNSxyMyAgICAgICAgICAgICAgICAgICAvLyByNSA8LSBQUE4gOlBQTiAueDA1MCAtIHdlIGhhdmUgSVRMQlRSIGVudHJ5CisJbC5tdHNwciByMixyNSxTUFJfSVRMQlRSX0JBU0UoMCkgICAvLyBzZXQgSVRMQlRSCisKKwlFWENFUFRJT05fTE9BRF9HUFI2CisJRVhDRVBUSU9OX0xPQURfR1BSNQorCUVYQ0VQVElPTl9MT0FEX0dQUjQKKwlFWENFUFRJT05fTE9BRF9HUFIzCisJRVhDRVBUSU9OX0xPQURfR1BSMgorCisJbC5yZmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTUiA8LSBFU1IsIFBDIDwtIEVQQworCitleGl0X3dpdGhfbm9faXRyYW5zbGF0aW9uOgorCUVYQ0VQVElPTl9MT0FEX0dQUjQKKwlFWENFUFRJT05fTE9BRF9HUFI2CisJbC5qICAgIF9kaXNwYXRjaF9idXNfZmF1bHQKKwlsLm5vcAorCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKgorICogU3R1ZmYgYmVsb3cgaGVyZSBzaG91bGRuJ3QgZ28gaW50byAuaGVhZCBzZWN0aW9uLi4uIG1heWJlIHRoaXMgc3R1ZmY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C5ub3AJMQorCUVYQ0VQVElPTl9MT0FEX0dQUjIKKwlFWENFUFRJT05fTE9BRF9HUFIzCisJRVhDRVBUSU9OX0xPQURfR1BSNAorCUVYQ0VQVElPTl9MT0FEX0dQUjUKKwlFWENFUFRJT05fTE9BRF9HUFI2CisJbC5yZmUKK2lfcG1kX25vbmU6CitpX3B0ZV9ub3RfcHJlc2VudDoKKwlFWENFUFRJT05fTE9BRF9HUFIyCisJRVhDRVBUSU9OX0xPQURfR1BSMworCUVYQ0VQVElPTl9MT0FEX0dQUjQKKwlFWENFUFRJT05fTE9BRF9HUFI1CisJRVhDRVBUSU9OX0xPQURfR1BSNgorCWwuaglfZGlzcGF0Y2hfZG9faXBhZ2VfZmF1bHQKKwlsLm5vcAorCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09WyBib290IHRsYiBoYW5kbGVycyBdPT09ICovCisKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVsgZGVidWdnaW5nIGFpZHMgXT09PSAqLworCisJLmFsaWduIDY0CitfaW1tdV90cmFtcG9saW5lOgorCS5zcGFjZSA2NAorX2ltbXVfdHJhbXBvbGluZV90b3A6CisKKyNkZWZpbmUgVFJBTVBfU0xPVF8wCQkoMHgwKQorI2RlZmluZSBUUkFNUF9TTE9UXzEJCSgweDQpCisjZGVmaW5lIFRSQU1QX1NMT1RfMgkJKDB4OCkKKyNkZWZpbmUgVFJBTVBfU0xPVF8zCQkoMHhjKQorI2RlZmluZSBUUkFNUF9TTE9UXzQJCSgweDEwKQorI2RlZmluZSBUUkFNUF9TTE9UXzUJCSgweDE0KQorI2RlZmluZSBUUkFNUF9GUkFNRV9TSVpFCSgweDE4KQorCitFTlRSWShfaW1tdV90cmFtcG9saW5lX3dvcmthcm91bmQpCisJLy8gcjIgRUVBCisJLy8gcjYgaXMgcGh5c2ljYWwgRUVBCisJdG9waHlzKHI2LHIyKQorCisJTE9BRF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KKwlpbml0X21tLmVuZF9kYXRhID0gKHVuc2lnbmVkIGxvbmcpJl9lZGF0YTsKKwlpbml0X21tLmJyayA9ICh1bnNpZ25lZCBsb25nKSZfZW5kOworCisjaWZkZWYgQ09ORklHX0JMS19ERVZfSU5JVFJECisJaW5pdHJkX3N0YXJ0ID0gKHVuc2lnbmVkIGxvbmcpJl9faW5pdHJkX3N0YXJ0OworCWluaXRyZF9lbmQgPSAodW5zaWduZWQgbG9uZykmX19pbml0cmRfZW5kOworCWlmIChpbml0cmRfc3RhcnQgPT0gaW5pdHJkX2VuZCkgeworCQlpbml0cmRfc3RhcnQgPSAwOworCQlpbml0cmRfZW5kID0gMDsKKwl9CisJaW5pdHJkX2JlbG93X3N0YXJ0X29rID0gMTsKKyNlbmRpZgorCisJLyogc2V0dXAgYm9vdG1lbSBhbGxvY2F0b3IgKi8KKwltYXhfbG93X3BmbiA9IHNldHVwX21lbW9yeSgpOworCisJLyogcGFnaW5nX2luaXQoKSBzZXRzIHVwIHRoZSBNTVUgYW5kIG1hcmtzIGFsbCBwYWdlcyBhcyByZXNlcnZlZCAqLworCXBhZ2luZ19pbml0KCk7CisKKyNpZiBkZWZpbmVkKENPTkZJR19WVCkgJiYgZGVmaW5lZChDT05GSUdfRFVNTVlfQ09OU09MRSkKKwlpZiAoIWNvbnN3aXRjaHApCisJCWNvbnN3aXRjaHAgPSAmZHVtbXlfY29uOworI2VuZGlmCisKKwkqY21kbGluZV9wID0gY21kX2xpbmU7CisKKwlwcmludGsoS0VSTl9JTkZPICJPcGVuUklTQyBMaW51eCAtLSBodHRwOi8vb3BlbnJpc2MubmV0XG4iKTsKK30KKworc3RhdGljIGludCBzaG93X2NwdWluZm8oc3RydWN0IHNlcV9maWxlICptLCB2b2lkICp2KQoreworCXVuc2lnbmVkIGxvbmcgdnI7CisJaW50IHZlcnNpb24sIHJldmlzaW9uOworCisJdnIgPSBtZnNwcihTUFJfVlIpOworCXZlcnNpb24gPSAodnIgJiBTUFJfVlJfVk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ZWFkX2luZm8gKmNvbnRleHQ7CisJdW5zaWduZWQgbG9uZyBhZGRyOworCisJY29udGV4dCA9IChzdHJ1Y3QgdGhyZWFkX2luZm8gKikKKwkgICAgKCh1bnNpZ25lZCBsb25nKXN0YWNrICYgKH4oVEhSRUFEX1NJWkUgLSAxKSkpOworCisJd2hpbGUgKHZhbGlkX3N0YWNrX3B0cihjb250ZXh0LCBzdGFjaykpIHsKKwkJYWRkciA9ICpzdGFjaysrOworCQlpZiAoX19rZXJuZWxfdGV4dF9hZGRyZXNzKGFkZHIpKSB7CisJCQlwcmludGsoIiBbPCUwOGx4Pl0iLCBhZGRyKTsKKwkJCXByaW50X3N5bWJvbCgiICVzIiwgYWRkcik7CisJCQlwcmludGsoIlxuIik7CisJCX0KKwl9CisJcHJpbnRrKCIgPT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworfQorCisvKiBkaXNwbGF5cyBhIHNob3J0IHN0YWNrIHRyYWNlICovCit2b2lkIHNob3dfc3RhY2soc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrLCB1bnNpZ25lZCBsb25nICplc3ApCit7CisJdW5zaWduZWQgbG9uZyBhZGRyLCAqc3RhY2s7CisJaW50IGk7CisKKwlpZiAoZXNwID09IE5VTEwpCisJCWVzcCA9ICh1bnNpZ25lZCBsb25nICopJmVzcDsKKworCXN0YWNrID0gZXNwOworCisJcHJpbnRrKCJTdGFjayBkdW1wIFsweCUwOGx4XTpcbiIsICh1bnNpZ25lZCBsb25nKWVzcCk7CisJZm9yIChpID0gMDsgaSA8IGtzdGFja19kZXB0aF90b19wcmludDsgaSsrKSB7CisJCWlmIChrc3RhY2tfZW5kKHN0YWNrKSkKKwkJCWJyZWFrOworCQlpZiAoX19nZXRfdXNlcihhZGRyLCBzdGFjaykpIHsKKwkJCS8qIFRoaXMgbWVzc2FnZSBtYXRjaGVzICJmYWlsaW5nIGFkZHJlc3MiIG1hcmtlZAorCQkJICAgczM5MCBpbiBrc3ltb29wcywgc28gbGluZXMgY29udGFpbmluZyBpdCB3aWxsCisJCQkgICBub3QgYmUgZmlsdGVyZWQgb3V0IGJ5IGtzeW1vb3BzLiAgKi8KKwkJCXByaW50aygiRmFpbGluZyBhZGRyZXNzIDB4JWx4XG4iLCAodW5zaWduZWQgbG9uZylzdGFjayk7CisJCQlicmVhazsKKwkJfQorCQlzdGFjaysrOworCisJCXByaW50aygic3AgKyAlMDJkOiAweCUwOGx4XG4iLCBpICogNCwgYWRkcik7CisJfQorCXByaW50aygiXG4iKTsKKworCXNob3dfdHJhY2UodGFzaywgZXNwKTsKKworCXJldHVybjsKK30KKwordm9pZCBzaG93X3RyYWNlX3Rhc2soc3RydWN0IHRhc2tfc3RydWN0ICp0c2spCit7CisJLyoKKwkgKiBUT0RPOiBTeXNScS1UIHRyYWNlIGR1bXAuLi4KKwkgKi8KK30KKworLyoKKyAqIFRoZSBhcmNoaXRlY3R1cmUtaW5kZXBlbmRlbnQgYmFja3RyYWNlIGdlbmVyYXRvcgorICovCit2b2lkIGR1bXBfc3RhY2sodm9pZCkKK3sKKwl1bnNpZ25lZCBsb25nIHN0YWNrOworCisJc2hvd19zdGFjayhjdXJyZW50LCAmc3RhY2spOworfQorCit2b2lkIHNob3dfcmVnaXN0ZXJzKHN0cnVjdCBwdF9yZWdzICpyZWdzKQoreworCWludCBpOworCWludCBpbl9rZXJuZWwgPSAxOworCXVuc2lnbmVkIGxvbmcgZXNwOworCisJZXNwID0gKHVuc2lnbmVkIGxvbmcpKCZyZWdzLT5zcCk7CisJaWYgKHVzZXJfbW9kZShyZWdzKSkKKwkJaW5fa2VybmVsID0gMDsKKworCXByaW50aygiQ1BVICM6ICVkXG4iCisJICAgICAgICIgICBQQzogJTA4bHggICAgU1I6ICUwOGx4ICAgIFNQOiAlMDhseFxuIiwKKwkgICAgICAgc21wX3Byb2Nlc3Nvcl9pZCgpLCByZWdzLT5wYywgcmVncy0+c3IsIHJlZ3MtPnNwKTsKKwlwcmludGsoIkdQUjAwOiAlMDhseCBHU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ICByZWdzLT5ncHJbMTFdLCByZWdzLT5vcmlnX2dwcjExLCByZWdzLT5zeXNjYWxsbm8pOworCisJcHJpbnRrKCJQcm9jZXNzICVzIChwaWQ6ICVkLCBzdGFja3BhZ2U9JTA4bHgpXG4iLAorCSAgICAgICAoKHN0cnVjdCB0YXNrX3N0cnVjdCAqKShfX3BhKGN1cnJlbnQpKSktPmNvbW0sCisJICAgICAgICgoc3RydWN0IHRhc2tfc3RydWN0ICopKF9fcGEoY3VycmVudCkpKS0+cGlkLAorCSAgICAgICAodW5zaWduZWQgbG9uZyljdXJyZW50KTsKKworCXByaW50aygiXG5TdGFjazogIik7CisJcHJpbnRrKCJTdGFjayBkdW1wIFsweCUwOGx4XTpcbiIsICh1bnNpZ25lZCBsb25nKXN0YWNrKTsKKwlmb3IgKGkgPSAwOyBpIDwga3N0YWNrX2RlcHRoX3RvX3ByaW50OyBpKyspIHsKKwkJaWYgKCgobG9uZylzdGFjayAmIChUSFJFQURfU0laRSAtIDEpKSA9PSAwKQorCQkJYnJlYWs7CisJCXN0YWNrKys7CisKKwkJcHJpbnRrKCIlbHggOjogc3AgKyAlMDJkOiAweCUwOGx4XG4iLCBzdGFjaywgaSAqIDQsCisJCSAgICAgICAqKCh1bnNpZ25lZCBsb25nICopKF9fcGEoc3RhY2spKSkpOworCX0KKwlwcmludGsoIlxuIik7CisKKwlwcmludGsoIkNhbGwgVHJhY2U6ICAgIik7CisJaSA9IDE7CisJd2hpbGUgKCgobG9uZylzdGFjayAmIChUSFJFQURfU0laRSAtIDEpKSAhPSAwKSB7CisJCWFkZHIgPSAqKCh1bnNpZ25lZCBsb25nICopX19wYShzdGFjaykpOworCQlzdGFjaysrOworCisJCWlmIChrZXJuZWxfdGV4dF9hZGRyZXNzKGFkZHIpKSB7CisJCQlpZiAoaSAmJiAoKGkgJSA2KSA9PSAwKSkKKwkJCQlwcmludGsoIlxuICIpOworCQkJcHJpbnRrKCIgWzwlMDhseD5dIiwgYWRkcik7CisJCQlpKys7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19jb3B5X3RvZnJvbV91c2VyKHZvaWQgKnRvLCBjb25zdCB2b2lkICpmcm9tLCB1bnNpZ25lZCBsb25nIHNpemUpOworICoKKyAqIE5PVEU6IGl0IHJldHVybnMgbnVtYmVyIG9mIGJ5dGVzIE5PVCBjb3BpZWQgISEhCisgKgorICovCisJLmdsb2JhbAlfX2NvcHlfdG9mcm9tX3VzZXIKK19fY29weV90b2Zyb21fdXNlcjoKKwlsLmFkZGkgIHIxLHIxLC0xMgorCWwuc3cgICAgMChyMSkscjYKKwlsLnN3ICAgIDQocjEpLHI0CisJbC5zdyAgICA4KHIxKSxyMworCisJbC5hZGRpICByMTEscjUsMAorMjogIAlsLnNmZXEgIHIxMSxyMAorCWwuYmYgICAgMWYKKwlsLmFkZGkgIHIxMSxyMTEsLTEKKzg6ICAgIAlsLmxieiAgIHI2LDAocjQpCis5OiAgICAJbC5zYiAgICAwKHIzKSxyNgorCWwuYWRkaSAgcjMscjMsMQorCWwuaiAgICAgMmIKKwlsLmFkZGkgIHI0LHI0LDEKKzE6CisJbC5hZGRpICByMTEscjExLDEgICAgICAgICAgICAgICAvLyByMTEgaG9sZHMgdGhlIHJldHVybiB2YWx1ZQorCisJbC5sd3ogICByNiwwKHIxKQorCWwubHd6ICAgcjQsNChyMSkKKwlsLmx3eiAgIHIzLDgocjEpCisJbC5qciAgICByOQorCWwuYWRkaSAgcjEscjEsMTIKKworCS5zZWN0aW9uIC5maXh1cCwgImF4IgorOTk6CisJCWwuaiAgICAgMWIKKwkJbC5ub3AKKwkucHJldmlvdXMKKworCS5zZWN0aW9uIF9fZXhfdGFibGUsICJhIgorCQkubG9uZyA4YiwgOTliCQkvLyByZWFkIGZhdWx0CisJCS5sb25nIDliLCA5OWIJCS8vIHdyaXRlIGZhdWx0CisJLnByZXZpb3VzCisKKy8qCisgKiB1bnNpZ25lZCBsb25nIGNsZWFyX3VzZXIodm9pZCAqYWRkciwgdW5zaWduZWQgbG9uZyBzaXplKSA7CisgKgorICogTk9URTogaXQgcmV0dXJucyBudW1iZXIgb2YgYnl0ZXMgTk9UIGNsZWFyZWQgISEhCisgKi8KKwkuZ2xvYmFsCV9fY2xlYXJfdXNlcgorX19jbGVhcl91c2VyOgorCWwuYWRkaSAgcjEscjEsLTgKKwlsLnN3ICAgIDAocjEpLHI0CisJbC5zdyAgICA0KHIxKSxyMworCisyOglsLnNmZXEJcjQscjAKKwlsLmJmCTFmCisJbC5hZGRpCXI0LHI0LC0xCis5OglsLnNiCTAocjMpLHIwCisJbC5qCTJiCisJbC5hZGRpICByMyxyMywxCisKKzE6CisJbC5hZGRpICByMTEscjQsMQorCisJbC5sd3oJcjQsMChyMSkKKwlsLmx3eglyMyw0KHIxKQorCWwuanIJcjkKKwlsLmFkZGkJcjEscjEsOAorCisJLnNlY3Rpb24gLmZpeHVwLCAiYXgiCis5OToKKwkJbC5qICAgICAxYgorCQlsLm5vcAorCS5wcmV2aW91cworCisJLnNlY3Rpb24gX19leF90YWJsZSwgImEiCisJCS5sb25nIDliLCA5OWIJCS8vIHdyaXRlIGZhdWx0CisJLnByZXZpb3VzCisKKy8qCisgKiBsb25nIHN0cm5jcHlfZnJvbV91c2VyKGNoYXIgKmRzdCwgY29uc3QgY2hhciAqc3JjLCBsb25nIGNvdW50KQorICoKKyAqCisgKi8KKwkuZ2xvYmFsCV9fc3RybmNweV9mcm9tX3VzZXIKK19fc3RybmNweV9mcm9tX3VzZXI6CisJbC5hZGRpICByMSxyMSwtMTYKKwlsLnN3ICAgIDAocjEpLHI2CisJbC5zdyAgICA0KHIxKSxyNQorCWwuc3cgICAgOChyMSkscjQKKwlsLnN3ICAgIDEyKHIxKSxyMworCisJbC5hZGRpICByMTEscjUsMAorMjogIAlsLnNmZXEgIHI1LHIwCisJbC5iZiAgICAxZgorCWwuYWRkaSAgcjUscjUsLTEKKzg6ICAgIAlsLmxieiAgIHI2LDAocjQpCisJbC5zZmVxICByNixyMAorCWwuYmYgICAgMWYKKzk6ICAgIAlsLnNiICAgIDAocjMp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qLworCisjaW5jbHVkZSA8YXNtL3BwY19hc20uaD4KKyNpbmNsdWRlIDxhc20va3ZtX2FzbS5oPgorI2luY2x1ZGUgPGFzbS9yZWcuaD4KKyNpbmNsdWRlIDxhc20vcGFnZS5oPgorI2luY2x1ZGUgPGFzbS9hc20tb2Zmc2V0cy5oPgorI2luY2x1ZGUgPGFzbS9leGNlcHRpb24tNjRzLmg+CisjaW5jbHVkZSA8YXNtL3BwYy1vcGNvZGUuaD4KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICBHdWVzdCBlbnRyeSAvIGV4aXQgY29kZSB0aGF0IGlzIGluIGtlcm5lbCBtb2R1bGUgbWVtb3J5ICh2bWFsbG9jKSAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogUmVnaXN0ZXJzOgorICogIHI0OiB2Y3B1IHBvaW50ZXIKKyAqLworX0dMT0JBTChfX2t2bXBwY192Y29yZV9lbnRyeSkKKworCS8qIFdyaXRlIGNvcnJlY3Qgc3RhY2sgZnJhbWUgKi8KKwltZmxyCXIwCisJc3RkCXIwLFBQQ19MUl9TVEtPRkYocjEpCisKKwkvKiBTYXZlIGhvc3Qgc3RhdGUgdG8gdGhlIHN0YWNrICovCisJc3RkdQlyMSwgLVNXSVRDSF9GUkFNRV9TSVpFKHIxKQorCisJLyogU2F2ZSBub24tdm9sYXRpbGUgcmVnaXN0ZXJzIChyMTQgLSByMzEpICovCisJU0FWRV9OVkdQUlMoc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ioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICBSZWFsIE1vZGUgaGFuZGxlcnMgdGhhdCBuZWVkIHRvIGJlIGluIHRoZSBsaW5lYXIgbWFwcGluZyAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCS5nbG9ibAlrdm1wcGNfc2tpcF9pbnRlcnJ1cHQKK2t2bXBwY19za2lwX2ludGVycnVwdDoKKwltZnNwcglyMTMsU1BSTl9TUlIwCisJYWRkaQlyMTMscjEzLDQKKwltdHNwcglTUFJOX1NSUjAscjEzCisJR0VUX1NDUkFUQ0gwKHIxMykKKwlyZmlkCisJYgkuCisKKwkuZ2xvYmwJa3ZtcHBjX3NraXBfSGludGVycnVwdAora3ZtcHBjX3NraXBfSGludGVycnVwdDoKKwltZnNwcglyMTMsU1BSTl9IU1JSMAorCWFkZGkJcjEzLHIxMyw0CisJbXRzcHIJU1BSTl9IU1JSMCxyMTMKKwlHRVRfU0NSQVRDSDAocjEzKQorCWhyZmlkCisJYgkuCisKKy8qCisgKiBDYWxsIGt2bXBwY19oYW5kbGVyX3RyYW1wb2xpbmVfZW50ZXIgaW4gcmVhbCBtb2RlLgorICogTXVzdCBiZSBjYWxsZWQgd2l0aCBpbnRlcnJ1cHRzIGhhcmQtZGlzYWJsZWQuCisgKgorICogSW5wdXQgUmVnaXN0ZXJzOgorICoKKyAqIExSID0gcmV0dXJuIGFkZHJlc3MgdG8gY29udGludWUgYXQgYWZ0ZXIgZXZlbnR1YWxseSByZS1lbmFibGluZyBNTVUKKyAqLworX0dMT0JBTChrdm1wcGNfaHZfZW50cnlfdHJhbXBvbGluZSkKKwltZm1zcglyMTAKKwlMT0FEX1JFR19BRERSKHI1LCBrdm1wcGNfaHZfZW50cnkpCisJbGkJcjAsTVNSX1JJCisJYW5kYwlyMCxyMTAscjAKKwlsaQlyNixNU1JfSVIgfCBNU1JfRFIKKwlhbmRjCXI2LHIxMCxyNgorCW10bXNyZAlyMCwxCQkvKiBjbGVhciBSSSBpbiBNU1IgKi8KKwltdHNycjAJcjUKKwltdHNycjEJcjYKKwlSRkkKKworI2RlZmluZSBVTE9OR19TSVpFIAkJOAorI2RlZmluZSBWQ1BVX0dQUihuKQkJKFZDUFVfR1BSUyArIChuICogVUxPTkdfU0laRSkpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudHJ5IGNvZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBYSUNTX1hJUlIJCTQKKyNkZWZpbmUgWElDU19RSVJSCQkweGMKKworLyoKKyAqIFdlIGNvbWUgaW4gaGVyZSB3aGVuIHdha2VuZWQgZnJvbSBuYXAgbW9kZSBvbiBhIHNlY29uZGFyeSBodyB0aHJlYWQuCisgKiBSZWxvY2F0aW9uIGlzIG9mZiBhbmQgbW9zdCByZWdpc3RlciB2YWx1ZXMgYXJlIGxvc3QuCisgKiByMTMgcG9pbnRzIH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KKwlsd3oJcjYsIFZDUFVfQ1IocjQpCisJbXRscglyNQorCW10Y3IJcjYKKworCWxkCXIwLCBWQ1BVX0dQUihyMCkocjQpCisJbGQJcjEsIFZDUFVfR1BSKHIxKShyNCkKKwlsZAlyMiwgVkNQVV9HUFIocjIpKHI0KQorCWxkCXIzLCBWQ1BVX0dQUihyMykocjQpCisJbGQJcjUsIFZDUFVfR1BSKHI1KShyNCkKKwlsZAlyNiwgVkNQVV9HUFIocjYpKHI0KQorCWxkCXI3LCBWQ1BVX0dQUihyNykocjQpCisJbGQJcjgsIFZDUFVfR1BSKHI4KShyNCkKKwlsZAlyOSwgVkNQVV9HUFIocjkpKHI0KQorCWxkCXIxMCwgVkNQVV9HUFIocjEwKShyNCkKKwlsZAlyMTEsIFZDUFVfR1BSKHIxMSkocjQpCisJbGQJcjEyLCBWQ1BVX0dQUihyMTIpKHI0KQorCWxkCXIxMywgVkNQVV9HUFIocjEzKShyNCkKKworCWxkCXI0LCBWQ1BVX0dQUihyNCkocjQpCisKKwlocmZpZAorCWIJLgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFeGl0IGNvZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBXZSBjb21lIGhlcmUgZnJvbSB0aGUgZmlyc3QtbGV2ZWwgaW50ZXJydXB0I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b25nCTAJCS8qIDB4NzAgKi8KKwkubG9uZwkwCQkvKiAweDc0ICovCisJLmxvbmcJMAkJLyogMHg3OCAqLworCS5sb25nCTAJCS8qIDB4N2MgKi8KKwkubG9uZwkwCQkvKiAweDgwICovCisJLmxvbmcJMAkJLyogMHg4NCAqLworCS5sb25nCTAJCS8qIDB4ODggKi8KKwkubG9uZwkwCQkvKiAweDhjICovCisJLmxvbmcJMAkJLyogMHg5MCAqLworCS5sb25nCTAJCS8qIDB4OTQgKi8KKwkubG9uZwkwCQkvKiAweDk4ICovCisJLmxvbmcJMAkJLyogMHg5YyAqLworCS5sb25nCTAJCS8qIDB4YTAgKi8KKwkubG9uZwkwCQkvKiAweGE0ICovCisJLmxvbmcJMAkJLyogMHhhOCAqLworCS5sb25nCTAJCS8qIDB4YWMgKi8KKwkubG9uZwkwCQkvKiAweGIwICovCisJLmxvbmcJMAkJLyogMHhiNCAqLworCS5sb25nCTAJCS8qIDB4YjggKi8KKwkubG9uZwkwCQkvKiAweGJjICovCisJLmxvbmcJMAkJLyogMHhjMCAqLworCS5sb25nCTAJCS8qIDB4YzQgKi8KKwkubG9uZwkwCQkvKiAweGM4ICovCisJLmxvbmcJMAkJLyogMHhjYyAqLworCS5sb25nCTAJCS8qIDB4ZDAgKi8KKwkubG9uZwkwCQkvKiAweGQ0ICovCisJLmxvbmcJMAkJLyogMHhkOCAqLworCS5sb25nCTAJCS8qIDB4ZGMgKi8KKwkubG9uZwkwCQkvKiAweGUwICovCisJLmxvbmcJMAkJLyogMHhlNCAqLworCS5sb25nCTAJCS8qIDB4ZTggKi8KKwkubG9uZwkwCQkvKiAweGVjICovCisJLmxvbmcJMAkJLyogMHhmMCAqLworCS5sb25nCTAJCS8qIDB4ZjQgKi8KKwkubG9uZwkwCQkvKiAweGY4ICovCisJLmxvbmcJMAkJLyogMHhmYyAqLworCS5sb25nCTAJCS8qIDB4MTAwICovCisJLmxvbmcJMAkJLyogMHgxMDQgKi8KKwkubG9uZwkwCQkvKi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pZiAocikKKwkJCXIgPSAtRUZBVUxUOworCisJCWdvdG8gb3V0OworCX0KKworCS8qIGNvcHkgZmlyc3Qgc2VnbWVudCAqLworCXVwdHIgPSAodm9pZCBfX3VzZXIgKilnbWFwX2ZhdWx0KGd1ZXN0c3JjLCB2Y3B1LT5hcmNoLmdtYXApOworCisJaWYgKElTX0VSUigodm9pZCBfX2ZvcmNlICopIHVwdHIpKQorCQlyZXR1cm4gUFRSX0VSUigodm9pZCBfX2ZvcmNlICopIHVwdHIpOworCisJc2l6ZSA9IFBNRF9TSVpFIC0gKGd1ZXN0c3JjICYgflBNRF9NQVNLKTsKKworCXIgPSBjb3B5X2Zyb21fdXNlcih0bywgdXB0ciwgc2l6ZSk7CisKKwlpZiAocikgeworCQlyID0gLUVGQVVMVDsKKwkJZ290byBvdXQ7CisJfQorCXRvICs9IHNpemU7CisJbiAtPSBzaXplOworCWd1ZXN0c3JjICs9IHNpemU7CisKKwkvKiBjb3B5IGZ1bGwgc2VnbWVudHMgKi8KKwl3aGlsZSAobiA+PSBQTURfU0laRSkgeworCQl1cHRyID0gKHZvaWQgX191c2VyICopZ21hcF9mYXVsdChndWVzdHNyYywgdmNwdS0+YXJjaC5nbWFwKTsKKworCQlpZiAoSVNfRVJSKCh2b2lkIF9fZm9yY2UgKikgdXB0cikpCisJCQlyZXR1cm4gUFRSX0VSUigodm9pZCBfX2ZvcmNlICopIHVwdHIpOworCisJCXIgPSBjb3B5X2Zyb21fdXNlcih0bywgdXB0ciwgUE1EX1NJWkUpOworCisJCWlmIChyKSB7CisJCQlyID0gLUVGQVVMVDsKKwkJCWdvdG8gb3V0OworCQl9CisJCXRvICs9IFBNRF9TSVpFOworCQluIC09IFBNRF9TSVpFOworCQlndWVzdHNyYyArPSBQTURfU0laRTsKKwl9CisKKwkvKiBjb3B5IHRoZSB0YWlsIHNlZ21lbnQgKi8KKwlpZiAobikgeworCQl1cHRyID0gKHZvaWQgX191c2VyICopZ21hcF9mYXVsdChndWVzdHNyYyw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IAogc3RhdGljIGlubGluZSB2b2lkIGFyY2hfd3JpdGVfbG9jayhhcmNoX3J3bG9ja190ICpydykKIHsKLQlhc20gdm9sYXRpbGUoTE9DS19QUkVGSVggIiBzdWJsICUxLCglMClcblx0IgorCWFzbSB2b2xhdGlsZShMT0NLX1BSRUZJWCBXUklURV9MT0NLX1NVQiglMSkgIiglMClcblx0IgogCQkgICAgICJqeiAxZlxuIgogCQkgICAgICJjYWxsIF9fd3JpdGVfbG9ja19mYWlsZWRcblx0IgogCQkgICAgICIxOlxuIgotCQkgICAgIDo6TE9DS19QVFJfUkVHIChydyksICJpIiAoUldfTE9DS19CSUFTKSA6ICJtZW1vcnkiKTsKKwkJICAgICA6OkxPQ0tfUFRSX1JFRyAoJnJ3LT53cml0ZSksICJpIiAoUldfTE9DS19CSUFTKQorCQkgICAgIDogIm1lbW9yeSIpOwogfQogCiBzdGF0aWMgaW5saW5lIGludCBhcmNoX3JlYWRfdHJ5bG9jayhhcmNoX3J3bG9ja190ICpsb2NrKQogewotCWF0b21pY190ICpjb3VudCA9IChhdG9taWNfdCAqKWxvY2s7CisJUkVBRF9MT0NLX0FUT01JQyh0KSAqY291bnQgPSAoUkVBRF9MT0NLX0FUT01JQyh0KSAqKWxvY2s7CiAKLQlpZiAoYXRvbWljX2RlY19yZXR1cm4oY291bnQpID49IDApCisJaWYgKFJFQURfTE9DS19BVE9NSUMoZGVjX3JldHVybikoY291bnQpID49IDApCiAJCXJldHVybiAxOwotCWF0b21pY19pbmMoY291bnQpOworCVJFQURfTE9DS19BVE9NSUMoaW5jKShjb3VudCk7CiAJcmV0dXJuIDA7CiB9CiAKIHN0YXRpYyBpbmxpbmUgaW50IGFyY2hfd3JpdGVfdHJ5bG9jayhhcmNoX3J3bG9ja190ICpsb2NrKQogewotCWF0b21pY190ICpjb3VudCA9IChhdG9taWNfdCAqKWxvY2s7CisJYXRvbWljX3QgKmNvdW50ID0gKGF0b21pY190ICopJmxvY2stPndyaXRlOwogCi0JaWYgKG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tLWdpdCBhL2FyY2gveDg2L2luY2x1ZGUvYXNtL3V2L3V2X21tcnMuaCBiL2FyY2gveDg2L2luY2x1ZGUvYXNtL3V2L3V2X21tcnMuaAppbmRleCA0YmU1MmM4Li4xMDQ3NGZiIDEwMDY0NAotLS0gYS9hcmNoL3g4Ni9pbmNsdWRlL2FzbS91di91dl9tbXJzLmgKKysrIGIvYXJjaC94ODYvaW5jbHVkZS9hc20vdXYvdXZfbW1ycy5oCkBAIC02MSwxNjg5ICs2MSwyMDE2IEBACiAvKiBDb21wYXQ6IGlmIHRoaXMgI2RlZmluZSBpcyBwcmVzZW50LCBVViBoZWFkZXJzIHN1cHBvcnQgVVYyICovCiAjZGVmaW5lIFVWMl9IVUJfSVNfU1VQUE9SVEVECTEKIAotLyogS0FCSSBjb21wYXQ6IGlmIHRoaXMgI2RlZmluZSBpcyBwcmVzZW50LCBLQUJJIGhhY2tzIGFyZSBwcmVzZW50ICovCi0jZGVmaW5lIFVWMl9IVUJfS0FCSV9IQUNLUwkxCi0KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfQkFVX0RBVEFfQlJPQURDQVNUICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLSNkZWZpbmUgVVZIX0JBVV9EQVRBX0JST0FEQ0FTVCAweDYxNjg4VUwKLSNkZWZpbmUgVVZIX0JBVV9EQVRBX0JST0FEQ0FTVF8zMiAweDQ0MAorI2RlZmluZSBVVkhfQkFVX0RBVEFfQlJPQURDQVNUCQkJCTB4NjE2ODhVTAorI2RlZmluZSBVVkhfQkFVX0RBVEFfQlJPQURDQVNUXzMyCQkJMHg0NDAKIAotI2RlZmluZSBVVkhfQk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JCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJc3RhdHVzOjE7CQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwlwOjE7CQkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8xNDoxOworCQl1bnNpZ25lZCBsb25nCXQ6MTsJCQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwltOjE7CQkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8xN18zMToxNTsKKwkJdW5zaWduZWQgbG9uZwlhcGljX2lkOjMyOwkJCS8qIFJXICovCisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfRVZFTlRfT0NDVVJSRUQwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfRVZFTlRfT0NDVVJSRUQwIDB4NzAwMDBVTAotI2RlZmluZSBVVkhfRVZFTlRfT0NDVVJSRUQwXzMyIDB4NWU4CisjZGVmaW5lIFVWSF9FVkVOVF9PQ0NVUlJFRDAJCQkJMHg3MDAwMFVMCisjZGVmaW5lIFVWSF9FVkVOVF9PQ0NVUlJFRDBfMzIJCQkJMHg1ZTgKIAotI2RlZmluZSBVVjFIX0VWRU5UX09DQ1VSUkVEMF9MQl9IQ0VSUl9TSEZUIDAKLSNkZWZpbmUgVVYxSF9FVkVOVF9PQ0NVUlJFRDBfTEJfSENFUlJfTUFTSyAweDAwMDAwMDAwMDAwMDAwMDFVTAotI2RlZmluZSBVVjFIX0VWRU5UX09DQ1VSUkVEMF9HUjBfSENFUlJfU0hGVCAxCi0jZGVmaW5lIFVWMUhfRVZFTl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aWduZWQgbG9uZwlleHRpb19pbnQyOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlleHRpb19pbnQzOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlwcm9maWxlX2ludDoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF81OV82Mzo1OworCX0gczI7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9FVkVOVF9PQ0NVUlJFRDBfQUxJQVMgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9FVkVOVF9PQ0NVUlJFRDBfQUxJQVMgMHgwMDAwMDAwMDAwMDcwMDA4VUwKLSNkZWZpbmUgVVZIX0VWRU5UX09DQ1VSUkVEMF9BTElBU18zMiAweDVmMAorI2RlZmluZSBVVkhfRVZFTlRfT0NDVVJSRUQwX0FMSUFTCQkJMHgwMDAwMDAwMDAwMDcwMDA4VUwKKyNkZWZpbmUgVVZIX0VWRU5UX09DQ1VSUkVEMF9BTElBU18zMgkJCTB4NWYwCiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9HUjBfVExCX0lOVDBfQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLSNkZWZpbmUgVVZIX0dSMF9UTEJfSU5UMF9DT05G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ludDBfY29uZmlnX3MgeworCQl1bnNpZ25lZCBsb25nCXZlY3Rvcl86ODsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCWRtOjM7CQkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJZGVzdG1vZGU6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXN0YXR1czoxOwkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJcDoxOwkJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfMTQ6MTsKKwkJdW5zaWduZWQgbG9uZwl0OjE7CQkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJbToxOwkJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfMTdfMzE6MTU7CisJCXVuc2lnbmVkIGxvbmcJYXBpY19pZDozMjsJCQkvKiBSVyAqLworCX0gczsKIH07CiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9HUjBfVExCX0lOVDFfQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLSNkZWZpbmUgVVZIX0dSMF9UTEJfSU5UMV9DT05GSUcgMHg2MWI0MFVMCisjZGVmaW5lIFVWSF9HUjBfVExCX0lOVDFfQ09ORklHCQkJCTB4NjFiNDBVTAogCi0jZGVmaW5lIFVWSF9HUjBfVExCX0lOVDFfQ09ORklHX1ZFQ1RPUl9TSEZUIDAKLSNkZWZpbmUgVVZIX0dSMF9UTEJfSU5UMV9DT05GSUdfVkVDVE9SX01BU0sgMHgwMDAwMDAwMDAwMDAwMGZmVUwKLSNkZWZpbmUgVVZIX0dSMF9UTEJfSU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pZ25lZCBsb25nCXJzdmRfMTQ6MTsKKwkJdW5zaWduZWQgbG9uZwl0OjE7CQkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJbToxOwkJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfMTdfMzE6MTU7CisJCXVuc2lnbmVkIGxvbmcJYXBpY19pZDozMjsJCQkvKiBSVyAqLworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9HUjBfVExCX01NUl9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKyNkZWZpbmUgVVYxSF9HUjBfVExCX01NUl9DT05UUk9MIDB4NDAxMDgwVUwKKyNkZWZpbmUgVVYySF9HUjBfVExCX01NUl9DT05UUk9MIDB4YzAxMDgwVUwKKyNkZWZpbmUgVVZIX0dSMF9UTEJfTU1SX0NPTlRST0wgKGlzX3V2MV9odWIoKSA/CQkJCVwKKwkJCVVWMUhfR1IwX1RMQl9NTVJfQ09OVFJPTCA6CQkJXAorCQkJVVYySF9HUjBfVExCX01NUl9DT05UUk9MKQorCisjZGVmaW5lIFVWSF9HUjBfVExCX01NUl9DT05UUk9MX0lOREVYX1NIRlQJCTAKKyNkZWZpbmUgVVZIX0dSMF9UTEJfTU1SX0NPTlRST0xfTUVNX1NFTF9TSEZUCQkxMgorI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfQ09OVFJPTF9BVVRPX1ZBTElEX0VOX1NIRlQJMTYKKyNkZWZpbmUgVVZIX0dSMF9UTEJfTU1SX0NPTlRST0xfTU1SX0hBU0hfSU5ERVhfRU5fU0hGVAkyMAorI2RlZmluZSBVVkhf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LworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDlfNTE6MzsKKwkJdW5zaWduZWQgbG9uZwltbXJfaW5qX3RsYnJhbToxOwkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzUzXzYzOjExOworCX0gczI7Cit9OworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgVVZIX0dSMF9UTEJfTU1SX1JFQURfREFUQV9ISSAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisjZGVmaW5lIFVWMUhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJIDB4NDAxMGEwVUwKKyNkZWZpbmUgVVYySF9HUjBfVExCX01NUl9SRUFEX0RBVEFfSEkgMHhjMDEwYTBVTAorI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJIChpc191djFfaHViKCkgPwkJCVwKKwkJCVVWMUhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJIDoJCQlcCisJCQlVVjJIX0dSMF9UTEJfTU1SX1JFQURfREFUQV9ISSkKKworI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJX1BGTl9TSEZUCQkwCisjZGVmaW5lIFVWSF9HUjBfVExCX01NUl9SRUFEX0RBVEFfSElfR0FBX1NIRlQJCTQxCisjZGVmaW5lIFVWSF9HUjBfVExCX01NUl9SRUFEX0RBVEFfSElfRElSVFlfU0hGVAkJNDMKKyNkZWZpbmUgVVZIX0dSMF9UTEJfTU1SX1JFQURfREFUQV9ISV9MQVJHRVJfU0hGVAk0NAorI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJX1BGTl9NQVNLCQkweDAwMDAwMWZmZmZmZmZmZmZVTAorI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJX0dBQV9NQVNLCQkweDAwMDAwNjAwMDAwMDAwMDBVTAorI2RlZmluZSBVVkhfR1IwX1RMQl9NTVJfUkVBRF9EQVRBX0hJX0RJUlRZX01BU0sJCTB4MDAwMDA4MDAwMDAwMDAwMFVMCisjZGVmaW5lIFVWSF9HUjBfVExCX01NUl9SRUFEX0RBVEFfSElfTEFSR0VSX01BU0sJMHgwMDAwMTAwMDAwMDAwMDAwVUwKKwordW5pb24gdXZoX2dyMF90bGJfbW1yX3JlYWRfZGF0YV9oaV91IHsKKwl1bnNpZ25lZCBsb25nCXY7CisJc3RydWN0IHV2aF9ncjBfdGxiX21tcl9yZWFkX2RhdGFfaGlfcyB7CisJCXVuc2lnbmVkIGxvbmcJcGZuOjQxOwkJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCWdhYToyOwkJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCWRpcnR5OjE7CQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwlsYXJnZXI6MTsJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDVfNjM6MTk7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIFVWSF9HUjBfVExCX01NUl9SRUFEX0RBVEFfTE8gICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworI2RlZmluZSBVVjFIX0dSMF9UTEJfTU1SX1JFQURfREFUQV9MTyAweDQwMTBhOFVMCisjZGVmaW5lIFVWMkhfR1IwX1RMQl9NTVJfUkVBRF9E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c2lnbmVkIGxvbmcJbSAgICAgICAgOiAgMTsgIC8qIFJXICovCi0JdW5zaWduZWQgbG9uZwlyc3ZkXzE3XzMxOiAxNTsgIC8qICAgICovCi0JdW5zaWduZWQgbG9uZwlhcGljX2lkICA6IDMyOyAgLyogUlcgKi8KLSAgICB9IHM7CisJdW5zaWduZWQgbG9uZwl2OworCXN0cnVjdCB1dmhfZ3IxX3RsYl9pbnQwX2NvbmZpZ19zIHsKKwkJdW5zaWduZWQgbG9uZwl2ZWN0b3JfOjg7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlkbTozOwkJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCWRlc3Rtb2RlOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlzdGF0dXM6MTsJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCXA6MTsJCQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzE0OjE7CisJCXVuc2lnbmVkIGxvbmcJdDoxOwkJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCW06MTsJCQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzE3XzMxOjE1OworCQl1bnNpZ25lZCBsb25nCWFwaWNfaWQ6MzI7CQkJLyogUlcgKi8KKwl9IHM7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfR1IxX1RMQl9JTlQxX0NPTkZJRyAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9HUjFfVExCX0lOVDFfQ09ORklHIDB4NjFmNDBVTAorI2RlZmluZSBV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9uZwl2ZWN0b3JfOjg7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlkbTozOwkJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCWRlc3Rtb2RlOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlzdGF0dXM6MTsJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCXA6MTsJCQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzE0OjE7CisJCXVuc2lnbmVkIGxvbmcJdDoxOwkJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCW06MTsJCQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzE3XzMxOjE1OworCQl1bnNpZ25lZCBsb25nCWFwaWNfaWQ6MzI7CQkJLyogUlcgKi8KKwl9IHM7Cit9OworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfR1IxX1RMQl9NTVJfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisjZGVmaW5lIFVWMUhfR1IxX1RMQl9NTVJfQ09OVFJPTCAweDgwMTA4MFVMCisjZGVmaW5lIFVWMkhfR1IxX1RMQl9NTVJfQ09OVFJPTCAweDEwMDEwODBVTAorI2RlZmluZSBVVkhfR1IxX1RMQl9NTVJfQ09OVFJPTCAoaXNfdXYxX2h1YigpID8JCQkJXAorCQkJVVYxSF9HUjFfVExCX01NUl9DT05UUk9MIDoJCQlcCisJCQlVVjJIX0dSMV9UTEJfTU1SX0NPTlRST0wpCisKKyNkZWZpbmUgVVZIX0dSMV9UTEJfTU1SX0NPTlRST0xfSU5ERVhfU0h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bnNpZ25lZCBsb25nCW1tcl9yZWFkOjE7CQkJLyogV1AgKi8KKwkJdW5zaWduZWQgbG9uZwltbXJfb3BfZG9uZToxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8zM180NzoxNTsKKwkJdW5zaWduZWQgbG9uZwltbXJfaW5qX2NvbjoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF80OV81MTozOworCQl1bnNpZ25lZCBsb25nCW1tcl9pbmpfdGxicmFtOjE7CQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNTNfNjM6MTE7CisJfSBzMjsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBVVkhfR1IxX1RMQl9NTVJfUkVBRF9EQVRBX0hJICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKyNkZWZpbmUgVVYxSF9HUjFfVExCX01NUl9SRUFEX0RBVEFfSEkgMHg4MDEwYTBVTAorI2RlZmluZSBVVjJIX0dSMV9UTEJfTU1SX1JFQURfREFUQV9ISSAweDEwMDEwYTBVTAorI2RlZmluZSBVVkhfR1IxX1RMQl9NTVJfUkVBRF9EQVRBX0hJIChpc191djFfaHViKCkgPwkJCVwKKwkJCVVWMUhfR1IxX1RMQl9NTVJfUkVBRF9EQVRBX0hJIDoJCQlcCisJCQlVVjJIX0dSMV9UTEJfTU1SX1JFQURfREFUQV9ISSkKKworI2RlZmluZSBVVkhfR1IxX1RMQl9NTVJfUkVBRF9EQVRBX0hJX1BGTl9TSEZUCQkwCisjZGVmaW5lIFVWSF9HUjFfVExCX01NUl9SRUFEX0RBVEFfSElfR0FBX1NIRlQJCTQxC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STyAqLworCQl1bnNpZ25lZCBsb25nCWFzaWQ6MjQ7CQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwl2YWxpZDoxOwkJCS8qIFJPICovCisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVZIX0lOVF9DTVBCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfSU5UX0NNUEIgMHgyMjA4MFVMCisjZGVmaW5lIFVWSF9JTlRfQ01QQgkJCQkJMHgyMjA4MFVMCiAKLSNkZWZpbmUgVVZIX0lOVF9DTVBCX1JFQUxfVElNRV9DTVBCX1NIRlQgMAotI2RlZmluZSBVVkhfSU5UX0NNUEJfUkVBTF9USU1FX0NNUEJfTUFTSyAweDAwZmZmZmZmZmZmZmZmZmZVTAorI2RlZmluZSBVVkhfSU5UX0NNUEJfUkVBTF9USU1FX0NNUEJfU0hGVAkJMAorI2RlZmluZSBVVkhfSU5UX0NNUEJfUkVBTF9USU1FX0NNUEJfTUFTSwkJMHgwMGZmZmZmZmZmZmZmZmZmVUwKIAogdW5pb24gdXZoX2ludF9jbXBiX3UgewotICAgIHVuc2lnbmVkIGxvbmcJdjsKLSAgICBzdHJ1Y3QgdXZoX2ludF9jbXBiX3MgewotCXVuc2lnbmVkIGxvbmcJcmVhbF90aW1lX2NtcGIgOiA1NjsgIC8qIFJXICovCi0JdW5zaWduZWQgbG9uZwlyc3ZkXzU2XzYzICAgICA6ICA4OyAgLyogICAgKi8KLSAgICB9IHM7CisJdW5zaWduZWQgbG9uZwl2OworCXN0cnVjdCB1dmhfaW50X2NtcGJfcyB7CisJCXVuc2lnbmVkIGxvbmcJcmVhbF90aW1lX2NtcGI6NTY7CQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNTZfNjM6ODsKKwl9IHM7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfSU5UX0NNUEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9JTlRfQ01QQyAweDIyMTAwVUwKKyNkZWZpbmUgVVZIX0lOVF9DTVBDCQkJCQkweDIyMTAwVUwKIAotI2RlZmluZSBVVjFIX0lOVF9DTVBDX1JFQUxfVElNRV9DTVBDX1NIRlQJMAotI2RlZmluZSBVVjJIX0lOVF9DTVBDX1JFQUxfVElNRV9DTVBDX1NIRlQJMAotI2RlZmluZSBVVkhfSU5UX0NNUENfUkVBTF9USU1FX0NNUENfU0hGVAkoaXNfdXYxX2h1YigpID8JCVwKLQkJCVVWMUhfSU5UX0NNUENfUkVBTF9USU1FX0NNUENfU0hGVCA6CVwKLQkJCVVWMkhfSU5UX0NNUENfUkVBTF9USU1FX0NNUENfU0hGVCkKLSNkZWZpbmUgVVYxSF9JTlRfQ01QQ19SRUFMX1RJTUVfQ01QQ19NQVNLCTB4ZmZmZmZmZmZmZmZmZmZVTAotI2RlZmluZSBVVjJIX0lOVF9DTVBDX1JFQUxfVElNRV9DTVBDX01BU0sJMHhmZmZmZmZmZmZmZmZmZlVMCi0jZGVmaW5lIFVWSF9JTlRfQ01QQ19SRUFMX1RJTUVfQ01QQ19NQVNLCShpc191djFfaHViKCkgPwkJXAotCQkJVVYxSF9JTlRfQ01QQ19SRUFMX1RJTUVfQ01QQ19NQVNLIDoJXAotCQkJVVYySF9JTlRfQ01QQ19SRUFMX1RJTUVfQ01QQ19NQVNLKQorI2RlZmluZSBVVkhfSU5UX0NNUENfUkVBTF9USU1FX0NNUENfU0hGVAkJMAorI2RlZmluZSBVVkhfSU5UX0NNUENfUkVBTF9USU1FX0NNUENfTUFTSwkJMHhmZmZmZmZmZmZmZmZmZlVMCiAKIHVuaW9uIHV2aF9pbnRfY21wY191IHsKLSAgICB1bnNpZ25lZCBsb25nCXY7Ci0gICAgc3RydWN0IHV2aF9pbnRfY21wY19zIHsKLQl1bnNpZ25lZCBsb25nCXJlYWxfdGltZV9jbXBjIDogNTY7ICAvKiBSVyAqLwotCXVuc2lnbmVkIGxvbmcJcnN2ZF81Nl82MyAgICAgOiAgODsgIC8qICAgICovCi0gICAgfSBzOworCXVuc2lnbmVkIGxvbmcJdjsKKwlzdHJ1Y3QgdXZoX2ludF9jbXBjX3MgeworCQl1bnNpZ25lZCBsb25nCXJlYWxfdGltZV9jbXBjOjU2OwkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzU2XzYzOjg7CisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVZIX0lOVF9DTVBEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfSU5UX0NNUEQgMHgyMjE4MFVMCisjZGVmaW5lIFVWSF9JTlRfQ01QRAkJCQkJMHgyMjE4MFVMCiAKLSNkZWZpbmUgVVYxSF9JTlRfQ01QRF9SRUFMX1RJTUVfQ01QRF9TSEZUCTAKLSNkZWZpbmUgVVYySF9JTlRfQ01QRF9SRUFMX1RJT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bmcJYXBpY19pZCAgICAgICA6IDMyOyAgLyogUlcgKi8KLQl1bnNpZ25lZCBsb25nCXJzdmRfNDhfNjIgICAgOiAxNTsgIC8qICAgICovCi0JdW5zaWduZWQgbG9uZwlzZW5kICAgICAgICAgIDogIDE7ICAvKiBXUCAqLwotICAgIH0gczsKKwl1bnNpZ25lZCBsb25nCXY7CisJc3RydWN0IHV2aF9pcGlfaW50X3MgeworCQl1bnNpZ25lZCBsb25nCXZlY3Rvcl86ODsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCWRlbGl2ZXJ5X21vZGU6MzsJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJZGVzdG1vZGU6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfMTJfMTU6NDsKKwkJdW5zaWduZWQgbG9uZwlhcGljX2lkOjMyOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF80OF82MjoxNTsKKwkJdW5zaWduZWQgbG9uZwlzZW5kOjE7CQkJCS8qIFdQICovCisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgVVZIX0xCX0JBVV9JTlREX1BBWUxPQURfUVVFVUVfRklSU1QgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfTEJfQkFVX0lOVERfUEFZTE9BRF9RVUVVRV9GSVJTVCAweDMyMDA1MFVMCi0jZGVmaW5lIFVWSF9MQl9CQVVfSU5URF9QQVlMT0FEX1FVRVVFX0ZJUlNUXzMyIDB4OWMwCisjZGVmaW5lIFVWSF9MQl9CQVVfSU5URF9QQVlMT0FEX1FVRVVFX0ZJUlNUCQkweDM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9QQVlMT0FEX1FVRVVFX0xBU1RfQUREUkVTU19TSEZUCTQKKyNkZWZpbmUgVVZIX0xCX0JBVV9JTlREX1BBWUxPQURfUVVFVUVfTEFTVF9BRERSRVNTX01BU0sJMHgwMDAwMDdmZmZmZmZmZmYwVUwKIAogdW5pb24gdXZoX2xiX2JhdV9pbnRkX3BheWxvYWRfcXVldWVfbGFzdF91IHsKLSAgICB1bnNpZ25lZCBsb25nCXY7Ci0gICAgc3RydWN0IHV2aF9sYl9iYXVfaW50ZF9wYXlsb2FkX3F1ZXVlX2xhc3RfcyB7Ci0JdW5zaWduZWQgbG9uZwlyc3ZkXzBfMzogIDQ7ICAvKiAgICAqLwotCXVuc2lnbmVkIGxvbmcJYWRkcmVzcyA6IDM5OyAgLyogUlcgKi8KLQl1bnNpZ25lZCBsb25nCXJzdmRfNDNfNjM6IDIxOyAgLyogICAgKi8KLSAgICB9IHM7CisJdW5zaWduZWQgbG9uZwl2OworCXN0cnVjdCB1dmhfbGJfYmF1X2ludGRfcGF5bG9hZF9xdWV1ZV9sYXN0X3MgeworCQl1bnNpZ25lZCBsb25nCXJzdmRfMF8zOjQ7CisJCXVuc2lnbmVkIGxvbmcJYWRkcmVzczozOTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDNfNjM6MjE7CisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgIFVWSF9MQl9CQVVfSU5URF9QQVlMT0FEX1FVRVVFX1RBSUwgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfTEJfQkFVX0lOVERfUEFZTE9BRF9RVUVVRV9UQUlMIDB4MzIwMDcwVUwKLS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3V0XzQ6MTsJCQkvKiBSVywgVzFDICovCisJCXVuc2lnbmVkIGxvbmcJdGltZW91dF81OjE7CQkJLyogUlcsIFcxQyAqLworCQl1bnNpZ25lZCBsb25nCXRpbWVvdXRfNjoxOwkJCS8qIFJXLCBXMUMgKi8KKwkJdW5zaWduZWQgbG9uZwl0aW1lb3V0Xzc6MTsJCQkvKiBSVywgVzFDICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8xNl82Mzo0ODsKKwl9IHM7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICBVVkhfTEJfQkFVX0lOVERfU09GVFdBUkVfQUNLTk9XTEVER0VfQUxJQVMgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9MQl9CQVVfSU5URF9TT0ZUV0FSRV9BQ0tOT1dMRURHRV9BTElBUyAweDAwMDAwMDAwMDAzMjAwODhVTAotI2RlZmluZSBVVkhfTEJfQkFVX0lOVERfU09GVFdBUkVfQUNLTk9XTEVER0VfQUxJQVNfMzIgMHhhNzAKKyNkZWZpbmUgVVZIX0xCX0JBVV9JTlREX1NPRlRXQVJFX0FDS05PV0xFREdFX0FMSUFTCTB4MDAwMDAwMDAwMDMyMDA4OFVMCisjZGVmaW5lIFVWSF9MQl9CQVVfSU5URF9TT0ZUV0FSRV9BQ0tOT1dMRURHRV9BTElBU18zMgkweGE3MAogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICBVVkhfTEJfQkFVX01JU0NfQ09OVFJPTCAgICAgICAgICAgICAgICA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3lzdGVtX2ZsdXNoOjE7LyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwllbmFibGVfZXh0ZW5kZWRfc2Jfc3RhdHVzOjE7CS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJc3VwcHJlc3NfaW50X3ByaW9fdWR0X3RvX3NlbGY6MTsvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXVzZV9sZWdhY3lfZGVzY3JpcHRvcl9mb3JtYXRzOjE7LyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzM2XzQ3OjEyOworCQl1bnNpZ25lZCBsb25nCWZ1bjoxNjsJCQkJLyogUlcgKi8KKwl9IHMyOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICBVVkhfTEJfQkFVX1NCX0FDVElWQVRJT05fQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfTEJfQkFVX1NCX0FDVElWQVRJT05fQ09OVFJPTCAweDMyMDAyMFVMCi0jZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9DT05UUk9MXzMyIDB4OWE4CisjZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9DT05UUk9MCQkweDMyMDAyMFVMCisjZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9DT05UUk9MXzMyCQkweDlhOAogCi0jZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9DT05UUk9MX0lOREVYX1NIRlQgMAotI2RlZmluZSBVVkhfTEJfQkFVX1NCX0FDVElWQVRJT05fQ09OVFJPTF9JTkRFWF9NQVNLIDB4MDAwMD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ICAvKiBSVyAqLwotCXVuc2lnbmVkIGxvbmcJcnN2ZF82XzYxOiA1NjsgIC8qICAgICovCi0JdW5zaWduZWQgbG9uZwlwdXNoICA6ICAxOyAgLyogV1AgKi8KLQl1bnNpZ25lZCBsb25nCWluaXQgIDogIDE7ICAvKiBXUCAqLwotICAgIH0gczsKKwl1bnNpZ25lZCBsb25nCXY7CisJc3RydWN0IHV2aF9sYl9iYXVfc2JfYWN0aXZhdGlvbl9jb250cm9sX3MgeworCQl1bnNpZ25lZCBsb25nCWluZGV4OjY7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzZfNjE6NTY7CisJCXVuc2lnbmVkIGxvbmcJcHVzaDoxOwkJCQkvKiBXUCAqLworCQl1bnNpZ25lZCBsb25nCWluaXQ6MTsJCQkJLyogV1AgKi8KKwl9IHM7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgVVZIX0xCX0JBVV9TQl9BQ1RJVkFUSU9OX1NUQVRVU18wICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9TVEFUVVNfMCAweDMyMDAzMFVMCi0jZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElPTl9TVEFUVVNfMF8zMiAweDliMAorI2RlZmluZSBVVkhfTEJfQkFVX1NCX0FDVElWQVRJT05fU1RBVFVTXzAJCTB4MzIwMDMwVUwKKyNkZWZpbmUgVVZIX0xCX0JBVV9TQl9BQ1RJVkFUSU9OX1NUQVRVU18wXzMyCQkweDliMAogCi0jZGVmaW5lIFVWSF9MQl9CQVVfU0JfQUNUSVZBVElP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l9CQVNFX05PREVfSURfTUFTSwkweDdmZmUwMDAwMDAwMDAwMDBVTAogCiB1bmlvbiB1dmhfbGJfYmF1X3NiX2Rlc2NyaXB0b3JfYmFzZV91IHsKLSAgICB1bnNpZ25lZCBsb25nCXY7Ci0gICAgc3RydWN0IHV2aF9sYl9iYXVfc2JfZGVzY3JpcHRvcl9iYXNlX3MgewotCXVuc2lnbmVkIGxvbmcJcnN2ZF8wXzExICAgIDogMTI7ICAvKiAgICAqLwotCXVuc2lnbmVkIGxvbmcJcGFnZV9hZGRyZXNzIDogMzE7ICAvKiBSVyAqLwotCXVuc2lnbmVkIGxvbmcJcnN2ZF80M180OCAgIDogIDY7ICAvKiAgICAqLwotCXVuc2lnbmVkIGxvbmcJbm9kZV9pZCAgICAgIDogMTQ7ICAvKiBSVyAqLwotCXVuc2lnbmVkIGxvbmcJcnN2ZF82MyAgICAgIDogIDE7ICAvKiAgICAqLwotICAgIH0gczsKKwl1bnNpZ25lZCBsb25nCXY7CisJc3RydWN0IHV2aF9sYl9iYXVfc2JfZGVzY3JpcHRvcl9iYXNlX3MgeworCQl1bnNpZ25lZCBsb25nCXJzdmRfMF8xMToxMjsKKwkJdW5zaWduZWQgbG9uZwlwYWdlX2FkZHJlc3M6MzE7CQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDNfNDg6NjsKKwkJdW5zaWduZWQgbG9uZwlub2RlX2lkOjE0OwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF82MzoxOworCX0gczsKIH07CiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9OT0RFX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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TyAqLworCQl1bnNpZ25lZCBsb25nCW5vZGVfaWQ6MTU7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzQ3OjE7CisJCXVuc2lnbmVkIGxvbmcJbm9kZXNfcGVyX2JpdDo3OwkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzU1OjE7CisJCXVuc2lnbmVkIGxvbmcJbmlfcG9ydDo0OwkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF82MF82Mzo0OworCX0gczE7CisJc3RydWN0IHV2Mmhfbm9kZV9pZF9zIHsKKwkJdW5zaWduZWQgbG9uZwlmb3JjZTE6MTsJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCW1hbnVmYWN0dXJlcjoxMTsJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJcGFydF9udW1iZXI6MTY7CQkJLyogUk8gKi8KKwkJdW5zaWduZWQgbG9uZwlyZXZpc2lvbjo0OwkJCS8qIFJPICovCisJCXVuc2lnbmVkIGxvbmcJbm9kZV9pZDoxNTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDdfNDk6MzsKKwkJdW5zaWduZWQgbG9uZwlub2Rlc19wZXJfYml0Ojc7CQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCW5pX3BvcnQ6NTsJCQkvKiBSTyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNjJfNjM6MjsKKwl9IHMyOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9OT0RFX1BSRVNFTlRfVEFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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fMjMgOiAyNDsgIC8qICAgICovCi0JdW5zaWduZWQgbG9uZwlkZXN0X2Jhc2UgOiAyMjsgIC8qIFJXICovCi0JdW5zaWduZWQgbG9uZwlyc3ZkXzQ2XzYzOiAxODsgIC8qICAgICovCi0gICAgfSBzOworCXVuc2lnbmVkIGxvbmcJdjsKKwlzdHJ1Y3QgdXZoX3JoX2dhbV9hbGlhczIxMF9yZWRpcmVjdF9jb25maWdfMl9tbXJfcyB7CisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8wXzIzOjI0OworCQl1bnNpZ25lZCBsb25nCWRlc3RfYmFzZToyMjsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDZfNjM6MTg7CisJfSBzOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9SSF9HQU1fQ09ORklHX01NUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfUkhfR0FNX0NPTkZJR19NTVIgMHgxNjAwMDAwVUwKKyNkZWZpbmUgVVZIX1JIX0dBTV9DT05GSUdfTU1SCQkJCTB4MTYwMDAwMFVMCiAKLSNkZWZpbmUgVVZIX1JIX0dBTV9DT05GSUdfTU1SX01fU0tUX1NIRlQgMAotI2RlZmluZSBVVkhfUkhfR0FNX0NPTkZJR19NTVJfTV9TS1RfTUFTSyAweDAwMDAwMDAwMDAwMDAwM2ZVTAotI2RlZmluZSBVVkhfUkhfR0FNX0NPTkZJR19NTVJfTl9TS1RfU0hGVCA2Ci0jZGVmaW5lIFVWSF9SSF9HQU1fQ09ORklHX01NUl9OX1NLVF9NQVNLIDB4MDAwMDAwMDAwMDAwMD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CW5fZ3J1OjQ7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzU2XzYyOjc7CisJCXVuc2lnbmVkIGxvbmcJZW5hYmxlOjE7CQkJLyogUlcgKi8KKwl9IHMxOworCXN0cnVjdCB1djJoX3JoX2dhbV9ncnVfb3ZlcmxheV9jb25maWdfbW1yX3MgeworCQl1bnNpZ25lZCBsb25nCXJzdmRfMF8yNzoyODsKKwkJdW5zaWduZWQgbG9uZwliYXNlOjE4OwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF80Nl81MTo2OworCQl1bnNpZ25lZCBsb25nCW5fZ3J1OjQ7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzU2XzYyOjc7CisJCXVuc2lnbmVkIGxvbmcJZW5hYmxlOjE7CQkJLyogUlcgKi8KKwl9IHMyOwogfTsKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogICAgICAgICAgICAgICAgICAgVVZIX1JIX0dBTV9NTUlPSF9PVkVSTEFZX0NPTkZJR19NTVIgICAgICAgICAgICAgICAgICAgICAqLwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotI2RlZmluZSBVVkhfUkhfR0FNX01NSU9IX09WRVJMQVlfQ09ORklHX01NUiAweDE2MDAwMzBVTAorI2RlZmluZSBVVkhfUkhfR0FNX01NSU9IX09WRVJMQVlfQ09ORklHX01NUgkJMHgxNjAwMDMwVUwKIAotI2RlZmluZSBVVjFIX1JIX0dBTV9NTUlPSF9PVkVSTEFZX0NPTkZJR19NTVJfQkFTRV9TSEZUIDMwCi0jZGVmaW5lIFVWMUhfUkhfR0FNX01NSU9IX09WRVJMQVlfQ09ORklHX01NUl9CQVNFX01BU0sgMHgwMDAwM2Zm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MjogIDc7ICAvKiAgICAqLwotCXVuc2lnbmVkIGxvbmcJZW5hYmxlIDogIDE7ICAvKiBSVyAqLwotICAgIH0gczI7CisJdW5zaWduZWQgbG9uZwl2OworCXN0cnVjdCB1djFoX3JoX2dhbV9tbWlvaF9vdmVybGF5X2NvbmZpZ19tbXJfcyB7CisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8wXzI5OjMwOworCQl1bnNpZ25lZCBsb25nCWJhc2U6MTY7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwltX2lvOjY7CQkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJbl9pbzo0OwkJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNTZfNjI6NzsKKwkJdW5zaWduZWQgbG9uZwllbmFibGU6MTsJCQkvKiBSVyAqLworCX0gczE7CisJc3RydWN0IHV2MmhfcmhfZ2FtX21taW9oX292ZXJsYXlfY29uZmlnX21tcl9zIHsKKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzBfMjY6Mjc7CisJCXVuc2lnbmVkIGxvbmcJYmFzZToxOTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCW1faW86NjsJCQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwluX2lvOjQ7CQkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF81Nl82Mjo3OworCQl1bnNpZ25lZCBsb25nCWVuYWJsZToxOwkJCS8qIFJXICovCisJfSBzMjsKIH07CiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICBVVkhfUkhfR0FNX01NUl9PVkVSTEFZX0NPTkZJR19NTVIgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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nVjdCB1dmhfcmhfZ2FtX21tcl9vdmVybGF5X2NvbmZpZ19tbXJfcyB7CisJCXVuc2lnbmVkIGxvbmcJcnN2ZF8wXzI1OjI2OworCQl1bnNpZ25lZCBsb25nCWJhc2U6MjA7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzQ2XzYyOjE3OworCQl1bnNpZ25lZCBsb25nCWVuYWJsZToxOwkJCS8qIFJXICovCisJfSBzOworCXN0cnVjdCB1djFoX3JoX2dhbV9tbXJfb3ZlcmxheV9jb25maWdfbW1yX3MgeworCQl1bnNpZ25lZCBsb25nCXJzdmRfMF8yNToyNjsKKwkJdW5zaWduZWQgbG9uZwliYXNlOjIwOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJZHVhbF9odWI6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJzdmRfNDdfNjI6MTY7CisJCXVuc2lnbmVkIGxvbmcJZW5hYmxlOjE7CQkJLyogUlcgKi8KKwl9IHMxOworCXN0cnVjdCB1djJoX3JoX2dhbV9tbXJfb3ZlcmxheV9jb25maWdfbW1yX3MgeworCQl1bnNpZ25lZCBsb25nCXJzdmRfMF8yNToyNjsKKwkJdW5zaWduZWQgbG9uZwliYXNlOjIwOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF80Nl82MjoxNzsKKwkJdW5zaWduZWQgbG9uZwllbmFibGU6MTsJCQkvKiBSVyAqLworCX0gczI7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVWSF9SVEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0jZGVmaW5lIFVWSF9SVEMgMHgzNDAwMDBVTAorI2RlZmluZSBVVkhfUlRDCQkJCQkJMHgzNDAwMDBVTAogCi0jZGVmaW5lIFVWSF9SVENfUkVBTF9USU1FX0NMT0NLX1NIRlQgMAotI2RlZmluZSBVVkhfUlRDX1JFQUxfVElNRV9DTE9DS19NQVNLIDB4MDBmZmZmZmZmZmZmZmZmZlVMCisjZGVmaW5lIFVWSF9SVENfUkVBTF9USU1FX0NMT0NLX1NIRlQJCQkwCisjZGVmaW5lIFVWSF9SVENfUkVBTF9USU1FX0NMT0NLX01BU0sJCQkweDAwZmZmZmZmZmZmZmZmZmZVTAogCiB1bmlvbiB1dmhfcnRjX3UgewotICAgIHVuc2lnbmVkIGxvbmcJdjsKLSAgICBzdHJ1Y3QgdXZoX3J0Y19zIHsKLQl1bnNpZ25lZCBsb25nCXJlYWxfdGltZV9jbG9jayA6IDU2OyAgLyogUlcgKi8KLQl1bnNpZ25lZCBsb25nCXJzdmRfNTZfNjMgICAgICA6ICA4OyAgLyogICAgKi8KLSAgICB9IHM7CisJdW5zaWduZWQgbG9uZwl2OworCXN0cnVjdCB1dmhfcnRjX3MgeworCQl1bnNpZ25lZCBsb25nCXJlYWxfdGltZV9jbG9jazo1NjsJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnN2ZF81Nl82Mzo4OworCX0gczsKIH07CiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgVVZIX1JUQzFfSU5UX0NPTkZJRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLSNkZWZpbmUgVVZIX1JUQzFfSU5UX0NPTkZJRyAweDYxNWMwVUwK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duZWQgbG9uZwlydGNfMTc6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJ0Y18xODoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnRjXzE5OjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlydGNfMjA6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJ0Y18yMToxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnRjXzIyOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlydGNfMjM6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJ0Y18yNDoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnRjXzI1OjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlydGNfMjY6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJ0Y18yNzoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnRjXzI4OjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlydGNfMjk6MTsJCQkvKiBSVyAqLworCQl1bnNpZ25lZCBsb25nCXJ0Y18zMDoxOwkJCS8qIFJXICovCisJCXVuc2lnbmVkIGxvbmcJcnRjXzMxOjE7CQkJLyogUlcgKi8KKwkJdW5zaWduZWQgbG9uZwlyc3ZkXzMyXzYzOjMyOworCX0gczE7CiB9OwogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgIFVWMkhfRVZFTlRfT0NDVVJSRUQyX0FMSUFTICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0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VhazsKLQljYXNlIEJVU19OT1RJRllfREVMX0RFVklDRToKLQotCQlpb21tdV91bmluaXRfZGV2aWNlKGRldik7Ci0KLQlkZWZhdWx0OgotCQlnb3RvIG91dDsKLQl9Ci0KLQlkZXZpY2VfZmx1c2hfZHRlKGRldik7Ci0JaW9tbXVfY29tcGxldGlvbl93YWl0KGlvbW11KTsKLQotb3V0OgotCXJldHVybiAwOwotfQotCi1zdGF0aWMgc3RydWN0IG5vdGlmaWVyX2Jsb2NrIGRldmljZV9uYiA9IHsKLQkubm90aWZpZXJfY2FsbCA9IGRldmljZV9jaGFuZ2Vfbm90aWZpZXIsCi19OwotCi12b2lkIGFtZF9pb21tdV9pbml0X25vdGlmaWVyKHZvaWQpCi17Ci0JYnVzX3JlZ2lzdGVyX25vdGlmaWVyKCZwY2lfYnVzX3R5cGUsICZkZXZpY2VfbmIpOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBUaGUgbmV4dCBmdW5jdGlvbnMgYmVsb25nIHRvIHRoZSBkbWFfb3BzIG1hcHBpbmcvdW5tYXBwaW5nIGNvZGUuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICogSW4gdGhlIGRtYV9vcHMgcGF0aCB3ZSBvbmx5IGhhdmUgdGhlIHN0cnVjdCBkZXZpY2UuIFRoaXMgZnVuY3Rpb24KLSAqIGZpbmRzIHRoZSBjb3JyZXNwb25kaW5nIElPTU1VLCB0aGUgcHJvdGVjdGlvbiBkb21haW4gYW5kIHRoZQotICogcmVxdWVzdG9yIGlkIGZvciBhIGdpdmVuIGRldmljZS4KLSAqIElmIHRoZSBkZXZpY2UgaXMgbm90IHlldCBhc3NvY2lhdGVkIHdpdGggYSBkb21haW4gdGhpcyBpcyBhbHNvI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CWFtZF9pb21tdV9pbml0X2VyciA9IHJldDsKLQkJCQlyZXR1cm4gMDsKLQkJCX0KLQkJCWJyZWFrOwotCQlkZWZhdWx0OgotCQkJYnJlYWs7Ci0JCX0KLQkJcCArPSBoLT5sZW5ndGg7Ci0KLQl9Ci0JV0FSTl9PTihwICE9IGVuZCk7Ci0KLQlyZXR1cm4gMDsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBUaGUgZm9sbG93aW5nIGZ1bmN0aW9ucyBpbml0aWFsaXplIHRoZSBNU0kgaW50ZXJydXB0cyBmb3IgYWxsIElPTU1VcwotICogaW4gdGhlIHN5c3RlbS4gSXRzIGEgYml0IGNoYWxsZW5naW5nIGJlY2F1c2UgdGhlcmUgY291bGQgYmUgbXVsdGlwbGUKLSAqIElPTU1VcyBwZXIgUENJIEJERiBidXQgd2UgY2FuIGNhbGwgcGNpX2VuYWJsZV9tc2koeCkgb25seSBvbmNlIHBlcgotICogcGNpX2Rldi4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGludCBpb21tdV9zZXR1cF9tc2koc3RydWN0IGFtZF9pb21tdSAqaW9tbXUpCi17Ci0JaW50IHI7Ci0KLQlpZiAocGNpX2VuYWJsZV9tc2koaW9tbXUtPmRldikpCi0JCXJldHVybiAxOwotCi0JciA9IHJlcXVlc3RfdGhyZWFkZWRfaXJxKGlvbW11LT5kZXYtPmlycSwKLQkJCQkgYW1kX2lvbW11X2ludF9oYW5kbGVyLAotCQkJCSBhbWRfaW9tbXVfaW50X3RocmVhZCwKLQkJCQkgMCwgIkFNRC1WaSIsCi0JCQkJIGlvbW11LT5kZXYpOwotCi0JaWYgKHIpIHsKLQkJcGNpX2Rpc2FibGVfbXNpKGlvbW11LT5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ioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGludCBfX2luaXQgZWFybHlfYW1kX2lvbW11X2RldGVjdChzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgKnRhYmxlKQotewotCXJldHVybiAwOwotfQotCi1pbnQgX19pbml0IGFtZF9pb21tdV9kZXRlY3Qodm9pZCkKLXsKLQlpZiAobm9faW9tbXUgfHwgKGlvbW11X2RldGVjdGVkICYmICFnYXJ0X2lvbW11X2FwZXJ0dXJlKSkKLQkJcmV0dXJuIC1FTk9ERVY7Ci0KLQlpZiAoYW1kX2lvbW11X2Rpc2FibGVkKQotCQlyZXR1cm4gLUVOT0RFVjsKLQotCWlmIChhY3BpX3RhYmxlX3BhcnNlKCJJVlJTIiwgZWFybHlfYW1kX2lvbW11X2RldGVjdCkgPT0gMCkgewotCQlpb21tdV9kZXRlY3RlZCA9IDE7Ci0JCWFtZF9pb21tdV9kZXRlY3RlZCA9IDE7Ci0JCXg4Nl9pbml0LmlvbW11LmlvbW11X2luaXQgPSBhbWRfaW9tbXVfaW5pdDsKLQotCQkvKiBNYWtlIHN1cmUgQUNTIHdpbGwgYmUgZW5hYmxlZCAqLwotCQlwY2lfcmVxdWVzdF9hY3MoKTsKLQkJcmV0dXJuIDE7Ci0JfQotCXJldHVybiAtRU5PREVWOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIFBhcnNpbmcgZnVuY3Rpb25zIGZvciB0aGUgQU1EIElPTU1VIHNwZWNpZmljIGtlcm5lbCBjb21tYW5kIGxpbmUKLSAqIG9wdGlvbnMuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyBpbnQgX19pbml0IHBhcnNlX2FtZF9pb21tdV9kdW1wKGNoYXIgKnN0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gICAgICAgICAgPSBoYW5kbGVfdm14X2luc24sCi0JW0VYSVRfUkVBU09OX1ZNUFRSTERdICAgICAgICAgICAgICAgICA9IGhhbmRsZV92bXhfaW5zbiwKLQlbRVhJVF9SRUFTT05fVk1QVFJTVF0gICAgICAgICAgICAgICAgID0gaGFuZGxlX3ZteF9pbnNuLAotCVtFWElUX1JFQVNPTl9WTVJFQURdICAgICAgICAgICAgICAgICAgPSBoYW5kbGVfdm14X2luc24sCi0JW0VYSVRfUkVBU09OX1ZNUkVTVU1FXSAgICAgICAgICAgICAgICA9IGhhbmRsZV92bXhfaW5zbiwKLQlbRVhJVF9SRUFTT05fVk1XUklURV0gICAgICAgICAgICAgICAgID0gaGFuZGxlX3ZteF9pbnNuLAotCVtFWElUX1JFQVNPTl9WTU9GRl0gICAgICAgICAgICAgICAgICAgPSBoYW5kbGVfdm14X2luc24sCi0JW0VYSVRfUkVBU09OX1ZNT05dICAgICAgICAgICAgICAgICAgICA9IGhhbmRsZV92bXhfaW5zbiwKKwlbRVhJVF9SRUFTT05fVk1DTEVBUl0JICAgICAgICAgICAgICA9IGhhbmRsZV92bWNsZWFyLAorCVtFWElUX1JFQVNPTl9WTUxBVU5DSF0gICAgICAgICAgICAgICAgPSBoYW5kbGVfdm1sYXVuY2gsCisJW0VYSVRfUkVBU09OX1ZNUFRSTERdICAgICAgICAgICAgICAgICA9IGhhbmRsZV92bXB0cmxkLAorCVtFWElUX1JFQVNPTl9WTVBUUlNUXSAgICAgICAgICAgICAgICAgPSBoYW5kbGVfdm1wdHJzdCwKKwlbRVhJVF9SRUFTT05fVk1SRUFEXSAgICAgICAgICAgICAgICAgID0gaGFuZGxlX3ZtcmVhZCwKKwlbRVhJVF9SRUFTT05fVk1SRVNVTUVdICAgICAgICAgICAgICAgID0gaGFuZGxlX3ZtcmVzdW1lLAorCVtFWElUX1JFQVNPTl9WTVdSSVRFXSAgICAgICAgICAgICAgICAgPSBoYW5kbGVfdm13cml0ZSwKKwlbRVhJVF9SR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VzZXIubyBwdXR1c2VyLm8KIGxpYi15ICs9IG1lbWNweV8kKEJJVFMpLm8KK2xpYi0kKENPTkZJR19TTVApICs9IHJ3bG9jay5vCitsaWItJChDT05GSUdfUldTRU1fWENIR0FERF9BTEdPUklUSE0pICs9IHJ3c2VtLm8KIGxpYi0kKENPTkZJR19JTlNUUlVDVElPTl9ERUNPREVSKSArPSBpbnNuLm8gaW5hdC5vCiAKIG9iai15ICs9IG1zci5vIG1zci1yZWcubyBtc3ItcmVnLWV4cG9ydC5vCkBAIC0yOSw3ICszMSw3IEBACiAgICAgICAgIGxpYi15ICs9IGF0b21pYzY0X2N4OF8zMi5vCiAgICAgICAgIGxpYi15ICs9IGNoZWNrc3VtXzMyLm8KICAgICAgICAgbGliLXkgKz0gc3Ryc3RyXzMyLm8KLSAgICAgICAgbGliLXkgKz0gc2VtYXBob3JlXzMyLm8gc3RyaW5nXzMyLm8KKyAgICAgICAgbGliLXkgKz0gc3RyaW5nXzMyLm8KICAgICAgICAgbGliLXkgKz0gY21weGNoZy5vCiBpZm5lcSAoJChDT05GSUdfWDg2X0NNUFhDSEc2NCkseSkKICAgICAgICAgbGliLXkgKz0gY21weGNoZzhiX2VtdS5vIGF0b21pYzY0XzM4Nl8zMi5vCkBAIC00MCw3ICs0Miw2IEBACiAgICAgICAgIGxpYi15ICs9IGNzdW0tcGFydGlhbF82NC5vIGNzdW0tY29weV82NC5vIGNzdW0td3JhcHBlcnNfNjQubwogICAgICAgICBsaWIteSArPSB0aHVua182NC5vIGNsZWFyX3BhZ2VfNjQubyBjb3B5X3BhZ2VfNjQubwogICAgICAgICBsaWIteSArPSBtZW1tb3ZlXzY0Lm8gbWVtc2V0XzY0Lm8KLSAgICAgICAgbGliLXkgKz0gY29weV91c2VyXzY0Lm8gcndsb2NrXzY0Lm8gY29weV91c2VyX25vY2FjaGVfNjQubwotCWxpYi0kKENPTkZJR19SV1NFTV9YQ0hHQUREX0FMR09SSVRITSkgKz0gcndzZW1fNjQubworICAgIC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V9XT1JEU19SNCAtIDFdICYgU1NCX1NQUk9NX1JFVklTSU9OX0NSQzsKKwlleHBlY3RlZF9jcmMgPSB0bXAgPj4gU1NCX1NQUk9NX1JFVklTSU9OX0NSQ19TSElGVDsKKwlpZiAoY3JjICE9IGV4cGVjdGVkX2NyYykKKwkJcmV0dXJuIC1FUFJPVE87CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBiY21hX3Nwcm9tX3ZhbGlkKGNvbnN0IHUxNiAqc3Byb20pCit7CisJdTE2IHJldmlzaW9uOworCWludCBlcnI7CisKKwllcnIgPSBiY21hX3Nwcm9tX2NoZWNrX2NyYyhzcHJvbSk7CisJaWYgKGVycikKKwkJcmV0dXJuIGVycjsKKworCXJldmlzaW9uID0gc3Byb21bU1NCX1NQUk9NU0laRV9XT1JEU19SNCAtIDFdICYgU1NCX1NQUk9NX1JFVklTSU9OX1JFVjsKKwlpZiAocmV2aXNpb24gIT0gOCAmJiByZXZpc2lvbiAhPSA5KSB7CisJCXByX2VycigiVW5zdXBwb3J0ZWQgU1BST00gcmV2aXNpb246ICVkXG4iLCByZXZpc2lvbik7CisJCXJldHVybiAtRU5PRU5UOworCX0KKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFNQUk9NIGV4dHJhY3Rpb24uCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIGJjbWFfc3Byb21fZXh0cmFjdF9yOChzdHJ1Y3QgYmNtYV9idXMgKmJ1cywgY29uc3QgdTE2ICpzcHJvbSkKK3sKKwl1MTYgdjsKKwlpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCAzOyBpKyspIHsKKwkJdiA9IHNwcm9tW1NQT0ZGKFNTQl9TUFJPTThfSUwwTUFDKSArIGldOworCQkqKCgoX19iZTE2ICopYnVzLT5zcHJvbS5pbDBtYWMp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gMHgwMDA0CisjZGVmaW5lIFBQQzRYWF9UUk5HX1NUQVRfQiAweDEKKyNkZWZpbmUgUFBDNFhYX1RSTkdfREFUQSAweDAwMDAKKworI2RlZmluZSBNT0RVTEVfTkFNRSAicHBjNHh4X3JuZyIKKworc3RhdGljIGludCBwcGM0eHhfcm5nX2RhdGFfcHJlc2VudChzdHJ1Y3QgaHdybmcgKnJuZywgaW50IHdhaXQpCit7CisJdm9pZCBfX2lvbWVtICpybmdfcmVncyA9ICh2b2lkIF9faW9tZW0gKikgcm5nLT5wcml2OworCWludCBidXN5LCBpLCBwcmVzZW50ID0gMDsKKworCWZvciAoaSA9IDA7IGkgPCAyMDsgaSsrKSB7CisJCWJ1c3kgPSAoaW5fbGUzMihybmdfcmVncyArIFBQQzRYWF9UUk5HX1NUQVQpICYgUFBDNFhYX1RSTkdfU1RBVF9CKTsKKwkJaWYgKCFidXN5IHx8ICF3YWl0KSB7CisJCQlwcmVzZW50ID0gMTsKKwkJCWJyZWFrOworCQl9CisJCXVkZWxheSgxMCk7CisJfQorCXJldHVybiBwcmVzZW50OworfQorCitzdGF0aWMgaW50IHBwYzR4eF9ybmdfZGF0YV9yZWFkKHN0cnVjdCBod3JuZyAqcm5nLCB1MzIgKmRhdGEpCit7CisJdm9pZCBfX2lvbWVtICpybmdfcmVncyA9ICh2b2lkIF9faW9tZW0gKikgcm5nLT5wcml2OworCSpkYXRhID0gaW5fbGUzMihybmdfcmVncyArIFBQQzRYWF9UUk5HX0RBVEEpOworCXJldHVybiA0OworfQorCitzdGF0aWMgaW50IHBwYzR4eF9ybmdfZW5hYmxlKGludCBlbmFibGUpCit7CisJc3RydWN0IGRldmljZV9ub2RlICpjdHJsOworCXZvaWQgX19pb21lbSAqY3RybF9yZWc7CisJaW50IGVyciA9IDA7CisJdTMyIHZhbDsKKworCS8qIEZpbmQgdGhlIG1haW4gY3J5cHRvIGRldmljZSBub2RlIGFuZCBtYXAgaXQgdG8gdHVybiB0aGUgVFJORyBvbiAqL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ai0kKENPTkZJR19HUElPX0lUODc2MUUpCSs9IGdwaW8taXQ4NzYxZS5vCitvYmotJChDT05GSUdfR1BJT19KQU5aX1RUTCkJKz0gZ3Bpby1qYW56LXR0bC5vCitvYmotJChDT05GSUdfR1BJT19MQU5HV0VMTCkJKz0gZ3Bpby1sYW5nd2VsbC5vCitvYmotJChDT05GSUdfR1BJT19NQVg3MzBYKQkrPSBncGlvLW1heDczMHgubworb2JqLSQoQ09ORklHX0dQSU9fTUFYNzMwMCkJKz0gZ3Bpby1tYXg3MzAwLm8KK29iai0kKENPTkZJR19HUElPX01BWDczMDEpCSs9IGdwaW8tbWF4NzMwMS5vCitvYmotJChDT05GSUdfR1BJT19NQVg3MzJYKQkrPSBncGlvLW1heDczMngubworb2JqLSQoQ09ORklHX0dQSU9fTUMzMzg4MCkJKz0gZ3Bpby1tYzMzODgwLm8KK29iai0kKENPTkZJR19HUElPX01DUDIzUzA4KQkrPSBncGlvLW1jcDIzczA4Lm8KK29iai0kKENPTkZJR19HUElPX01MX0lPSCkJKz0gZ3Bpby1tbC1pb2gubworb2JqLSQoQ09ORklHX0dQSU9fTVBDNTIwMCkJKz0gZ3Bpby1tcGM1MjAwLm8KK29iai0kKENPTkZJR19HUElPX01YQykJCSs9IGdwaW8tbXhjLm8KK29iai0kKENPTkZJR19HUElPX01YUykJCSs9IGdwaW8tbXhzLm8KK29iai0kKENPTkZJR19QTEFUX05PTUFESUspCSs9IGdwaW8tbm9tYWRpay5vCitvYmotJChDT05GSUdfQVJDSF9PTUFQKQkJKz0gZ3Bpby1vbWFwLm8KK29iai0kKENPTkZJR19HUElPX1BDQTk1M1gpCSs9IGdwaW8tcGNhOTUzeC5vCitvYmotJChDT05GSUdfR1BJT19QQ0Y4NTdYKQkrPSBncGlvLXBjZjg1N3gubworb2JqLSQoQ09ORklHX0dQSU9fUENIKQkJKz0gZ3Bpby1wY2gubworb2JqLSQoQ09ORklHX0dQSU9fUEwwNjEpCSs9IGdwaW8tcGwwNjEubworb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gICAgICBgICAgICAgICAgICAgICAgICAgICAgfn5+flxfX18vfn5+fiAgICBgIGNvbnRyb2xsZXIgaW4gRlBHQSBpcyAsLmAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgLi4uLnRyaXZpYWwuLid+YC5gYGAuYGBgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgYGBgYGBgCi0gKiAgLmBgYGBgYGB+fn5+YC4uYC5gYC5gYC4KLSAqIC4gIFRoZSBkcml2ZXIgc3VwcG9ydHMgIGAuLi4gICAgICAgLC4uYGBgLmB+fn5gYGBgYGBgYGBgYGBgYGAuLi4uYGBgYC5gYCwsCi0gKiAuICAgYmlnLWVuZGlhbiBub3RhdGlvbiwganVzdGAuICAuLiBBIGJpdCBtb3JlIHNvcGhpc3RpY2F0ZWQgY29udHJvbGxlcnMgLAotICogIC4gcmVnaXN0ZXIgdGhlIGRldmljZSB3aXRoIC1iZWAuIC53aXRoIGEgcGFpciBvZiBzZXQvY2xlYXItYml0IHJlZ2lzdGVycyAsCi0gKiAgIGAuLiBzdWZmaXguICBgYGB+fmBgYGBgLi4uLmAuYCAgIC4gYWZmZWN0aW5nIHRoZSBkYXRhIHJlZ2lzdGVyIGFuZCB0aGUgLmAKLSAqICAgICBgYC5gLmBgLi4uYGBgICAgICAgICAgICAgICAgICAgYGBgLi4gb3V0cHV0IHBpbnMgYXJlIGFsc28gc3VwcG9ydGVkLmAKLSAqICAgICAgICAgICAgICAgICAgICAgICAgXl4gICAgICAgICAgICAgYGBgYGAuYGBgYGBgYGBgLixgYH5gYH5gYH5+YGBgYGBgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4gICAgICAgICAgICAgICAgICBeXgotICogICAsLi5gLmAuYC4uLmBgYGBgYGBgYGBgYC4uLi4uLmAuYC5gLmAuYC5gLi5gLmAuYC4uCi0gKiAuLi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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBJbnRlcnJ1cHQgaGFuZGxpbmcgZm9yIEVQOTN4eCBvbi1jaGlwIEdQSU9zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB1bnNpZ25lZCBjaGFyIGdwaW9faW50X3VubWFza2VkWzNdOworc3RhdGljIHVuc2lnbmVkIGNoYXIgZ3Bpb19pbnRfZW5hYmxlZFszXTsKK3N0YXRpYyB1bnNpZ25lZCBjaGFyIGdwaW9faW50X3R5cGUxWzNdOworc3RhdGljIHVuc2lnbmVkIGNoYXIgZ3Bpb19pbnRfdHlwZTJbM107CitzdGF0aWMgdW5zaWduZWQgY2hhciBncGlvX2ludF9kZWJvdW5jZVszXTsKKworLyogUG9ydCBvcmRlcmluZyBpczogQSBCIEYgKi8KK3N0YXRpYyBjb25zdCB1OCBpbnRfdHlwZTFfcmVnaXN0ZXJfb2Zmc2V0WzNdCT0geyAweDkwLCAweGFjLCAweDRjIH07CitzdGF0aWMgY29uc3QgdTggaW50X3R5cGUyX3JlZ2lzdGVyX29mZnNldFszXQk9IHsgMHg5NCwgMHhiMCwgMHg1MCB9Oworc3RhdGljIGNvbnN0IHU4IGVvaV9yZWdpc3Rlcl9vZmZzZXRbM10JCT0geyAweDk4LCAweGI0LCAweDU0IH07CitzdGF0aWMgY29uc3QgdTggaW50X2VuX3JlZ2lzdGVyX29mZnNldFszXQk9IHsgMHg5YywgMHhiOCwgMHg1OCB9Oworc3RhdGljIGNvbnN0IHU4IGludF9kZWJvdW5jZV9yZWdpc3Rlcl9vZmZzZXRbM10JPSB7IDB4YTgsIDB4YzQsIDB4NjQgfTsKKworc3RhdGljIHZvaWQgZXA5M3h4X2dwaW9fdXBkYXRlX2ludF9wYXJhbXModW5zaWduZWQgcG9ydCkKK3sKKwlCVUdfT04ocG9ydCA+IDIpOworCisJX19y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GEgR1BJTyAuCitvICAgICAgICBgICAgICAgICAgICAgICAgICAgICAgfn5+flxfX18vfn5+fiAgICBgIGNvbnRyb2xsZXIgaW4gRlBHQSBpcyAsLmAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgLi4uLnRyaXZpYWwuLid+YC5gYGAuYGBgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgYGBgYGBgCisgKiAgLmBgYGBgYGB+fn5+YC4uYC5gYC5gYC4KKyAqIC4gIFRoZSBkcml2ZXIgc3VwcG9ydHMgIGAuLi4gICAgICAgLC4uYGBgLmB+fn5gYGBgYGBgYGBgYGBgYGAuLi4uYGBgYC5gYCwsCisgKiAuICAgYmlnLWVuZGlhbiBub3RhdGlvbiwganVzdGAuICAuLiBBIGJpdCBtb3JlIHNvcGhpc3RpY2F0ZWQgY29udHJvbGxlcnMgLAorICogIC4gcmVnaXN0ZXIgdGhlIGRldmljZSB3aXRoIC1iZWAuIC53aXRoIGEgcGFpciBvZiBzZXQvY2xlYXItYml0IHJlZ2lzdGVycyAsCisgKiAgIGAuLiBzdWZmaXguICBgYGB+fmBgYGBgLi4uLmAuYCAgIC4gYWZmZWN0aW5nIHRoZSBkYXRhIHJlZ2lzdGVyIGFuZCB0aGUgLmAKKyAqICAgICBgYC5gLmBgLi4uYGBgICAgICAgICAgICAgICAgICAgYGBgLi4gb3V0cHV0IHBpbnMgYXJlIGFsc28gc3VwcG9ydGVkLmAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgXl4gICAgICAgICAgICAgYGBgYGAuYGBgYGBgYGBgLixgYH5gYH5gYH5+YGBgYGBgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4gICAgICAgICAgICAgICAgICBeXgorICogICAsLi5gLmAuYC4uLmBgYGBgYGBgYGBgYC4uLi4uLmAuYC5gLmAuYC5gLi5gLmAuYC4uCisgKiAuLiBUaGUgZXhwZWN0YXRpb24gaXMgdGhhdCBpbiBhdCBsZWFzdCBzb21lIGNhc2VzIC4gICAgLC1+fn4tLAorICogIC50aGlzIHdpbGwgYmUgdXNlZCB3aXRoIHJvbGwteW91ci1vd24gQVNJQy9GUEdBIC5gICAgICBcICAgLworICogIC5sb2dpYyBpbiBWZXJpbG9nIG9yIFZIREwuIH5+fmBgYGBgYGBgYC4uYGBgYGB+fmAgICAgICAgXCAvCisgKiAgLi5gYGBgYGBgYC4uLi4uLmBgYGBgYGBgYGBgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcb18KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF5eICAgICAgICAgICAgICAgICAgICAgICAgICAvIFwKKyAqCisgKiAgICAgICAgICAgLi4uYGBgYGB+fmAuLi4uLmBgLmAuLi4uLi4uLi4uYGBgYGBgLmAuYGAuYGBgLi4uLi4uLi5gYC4KKyAqICAgICAgICAgICAgYCAgOCwgMTYsIDMyIGFuZCA2NCBiaXRzIHJlZ2lzdGVycyBhcmUgc3VwcG9ydGVkLCBhbmRgYC4KKyAqICAgICAgICAgICAgLiB0aGUgbnVtYmVyIG9mIEdQSU9zIGlzIGRldGVybWluZWQgYnkgdGhlIHdpZHRoIG9mICAgfgorICogICAgICAgICAgICAgLi4gdGhlIHJlZ2lzdGVycy4gLC4uLi4uLi4uLi4uLmBgYC5gLmAuLmAuYC5+fn4uYC5gLmB+CisgKiAgICAgICAgICAgICAgIGAuLi4uLi4uYGBgYC5gYGAKKyAqLworCisjaW5jbHVkZSA8bGludXgvaW5pdC5oPgorI2luY2x1ZGUgPGxpbnV4L2Vyci5oPgorI2luY2x1ZGUgPGxpbnV4L2J1Zy5oPgorI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5o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DEgPDwgMCkKLSMgICAgICAgZGVmaW5lIElIX01DX1NXQVAoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHgpIDw8IDIpCisjICAgICAgIGRlZmluZSBJSF9NQ19TV0FQKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh4KSA8PCAxKQogIyAgICAgICBkZWZpbmUgSUhfTUNfU1dBUF9OT05FICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKICMgICAgICAgZGVmaW5lIElIX01DX1NXQVBfMTZCSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAxCiAjICAgICAgIGRlZmluZSBJSF9NQ19TV0FQXzMyQklUICAgICAgICAgICAgICAgICAgICAgICAgICAgMgpAQCAtNTQ3LDcgKzU0Nyw3IEBACiAjICAgICAgIGRlZmluZSBMQl9ENV9WQkxBTktfSU5URVJSVVBUICAgICAgICAgICAgICAgICAgICgxIDw8IDMpCiAjICAgICAgIGRlZmluZSBEQ19IUEQ1X0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IDE3KQogIyAgICAgICBkZWZpbmUgRENfSFBENV9SWF9JTlRFUlJVUFQgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxOCkKLSNkZWZpbmUgRElTUF9JTlRFUlJVUFRfU1RBVFVTX0NPTlRJTlVFNSAgICAgICAgICAgICAgICAgMHg2MDUwCisjZGVmaW5lIERJU1BfSU5URVJSVVBUX1NUQVRVU19DT05USU5VRTUgICAgICAgICAgICAgICAgIDB4NjE1MAogIyAgICAgICBkZWZpbmUgTEJfRDZfVkxJTkVfSU5URVJSVVBUICAgICAgICAgICAgICAgICAgICAoMSA8PCAyKQogIyAgICAgICBkZWZpbmUgTEJfRDZfVkJMQU5LX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAoMSA8PCAzKQogIyAgICAgICBkZWZpbmUgRENfSFBENl9JTlRFUlJVUFQgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PCAxNykKZGlmZ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5lIERGUF9SREVTQ19PUklHX1NJWkUJOTcKKworLyogRml4ZWQgcmVwb3J0IGRlc2NyaXB0b3IgZm9yIExvZ2l0ZWNoIERyaXZpbmcgRm9yY2UgUHJvIHdoZWVsIGNvbnRyb2xsZXIKKyAqCisgKiBUaGUgb3JpZ2luYWwgZGVzY3JpcHRvciBoaWRlcyB0aGUgc2VwYXJhdGUgdGhyb3R0bGUgYW5kIGJyYWtlIGF4ZXMgaW4KKyAqIGEgY3VzdG9tIHZlbmRvciB1c2FnZSBwYWdlLCBwcm92aWRpbmcgb25seSBhIGNvbWJpbmVkIHZhbHVlIGFzCisgKiBHZW5lcmljRGVza3RvcC5ZLgorICogVGhpcyBkZXNjcmlwdG9yIHJlbW92ZXMgdGhlIGNvbWJpbmVkIFkgYXhpcyBhbmQgaW5zdGVhZCByZXBvcnRzCisgKiBzZXBhcmF0ZSB0aHJvdHRsZSAoWSkgYW5kIGJyYWtlIChSWikuCisgKi8KK3N0YXRpYyBfX3U4IGRmcF9yZGVzY19maXhlZFtdID0geworMHgwNSwgMHgwMSwgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAgICAgICAgICovCisweDA5LCAweDA0LCAgICAgICAgIC8qICBVc2FnZSAoSm95c3RpayksICAgICAgICAgICAgICAgICAgICAgICAgKi8KKzB4QTEsIDB4MDEsICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgICAgICAgICAqLworMHhBMSwgMHgwMiwgICAgICAgICAvKiAgICAgIENvbGxlY3Rpb24gKExvZ2ljYWwpLCAgICAgICAgICAgICAgICovCisweDk1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KKzB4NzUsIDB4MEUsICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDE0KSwgICAgICAgICAgICAgICAqLworMHgxNCwgICAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCisweDI2LCAweEZGLCAweDNGLCAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTYzODMpLCAgICAgICAgKi8KKzB4MzQsICAgICAgICAgICAgICAgLyogICAgICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAqLworMHg0NiwgMHhGRiwgMHgzRiwgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtICgxNjM4MyksICAgICAgICovCisweDA5LCAweDMwLCAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAgICAgKi8KKzB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworMHg5NSwgMHgwRSwgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDE0KSwgICAgICAgICAgICAgICovCisweDc1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAgICAgKi8KKzB4MjUsIDB4MDEsICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICAgICAqLworMHg0NSwgMHgwMSwgICAgICAgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtICgxKSwgICAgICAgICAgICovCisweDA1LCAweDA5LCAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIFBhZ2UgKEJ1dHRvbiksICAgICAgICAgICAgKi8KKzB4MTksIDB4MDEsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgTWluaW11bSAoMDFoKSwgICAgICAgICAgICAqLworMHgyOSwgMHgwRSwgICAgICAgICAvKiAgICAgICAgICBVc2FnZSBNYXhpbXVtICgwRWgpLCAgICAgICAgICAgICovCisweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKzB4MDUsIDB4MDEsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLworMHg5NSwgMHgwMSwgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisweDc1LCAweDA0LCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICg0KSwgICAgICAgICAgICAgICAgKi8KKzB4MjUsIDB4MDcsICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICg3KSwgICAgICAgICAgICAqLworMHg0NiwgMHgzQiwgMHgwMSwgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtICgzMTUpLCAgICAgICAgICovCisweDY1LCAweDE0LCAgICAgICAgIC8qICAgICAgICAgIFVuaXQgKERlZ3JlZXMpLCAgICAgICAgICAgICAgICAgKi8KKzB4MDksIDB4MzksICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKEhhdCBTd2l0Y2gpLCAgICAgICAgICAgICAqLworMHg4MSwgMHg0MiwgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUsIE51bGxzdGF0ZSksICAgICovCisweDY1LCAweDAwLCAgICAgICAgIC8qICAgICAgICAgIFVuaXQsICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKzB4MjYsIDB4RkYsIDB4MDAsICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICgyNTUpLCAgICAgICAgICAqLworMHg0NiwgMHhGRiwgMHgwMCwgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtICgyNTUpLCAgICAgICAgICovCisweDc1LCAweDA4LCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICg4KSwgICAgICAgICAgICAgICAgKi8KKzB4ODEsIDB4MDEsICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50KSwgICAgICAgICAgICAgICAqLworMHgwOSwgMHgzMSwgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgICAgICovCisweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKzB4MDksIDB4MzUsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFJ6KSwgICAgICAgICAgICAgICAgICAgICAqLworMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisweDgxLCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIElucHV0IChDb25zdGFudCksICAgICAgICAgICAgICAgKi8KKzB4QzAsICAgICAgICAgICAgICAgLyogICAgICBFbmQgQ29sbGVjdGlvbiwgICAgICAgICAgICAgICAgICAgICAqLworMHhBMSwgMHgwMiwgICAgICAgICAvKiAgICAgIENvbGxlY3Rpb24gKExvZ2ljYWwpLCAgICAgICAgICAgICAgICovCisweDA5LCAweDAyLCAgICAgICAgIC8qICAgICAgICAgIFVzYWdlICgwMmgpLCAgICAgICAgICAgICAgICAgICAgKi8KKzB4OTUsIDB4MDcsICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICg3KSwgICAgICAgICAgICAgICAqLworMHg5MSwgMHgwMiwgICAgICAgICAvKiAgICAgICAgICBPdXRwdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICovCisweEMwLCAgICAgICAgICAgICAgIC8qICAgICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAgICAgKi8KKzB4QzAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAqLworfTsKKworCiAvKgogICogQ2VydGFpbiBMb2dpdGVjaCBrZXlib2FyZHMgc2VuZCBpbiByZXBvcnQgIzMga2V5cyB3aGljaCBhcmUgZmFyCiAgKiBhYm92ZSB0a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aXRjaCksICAgICAgICAgOyBUaXAgc3dpdGNoICg0MmgsIG1vbWVudGFyeSBjb250cm9sKQorICogICAgICBVc2FnZSAoQmFycmVsIFN3aXRjaCksICAgICAgOyBCYXJyZWwgc3dpdGNoICg0NGgsIG1vbWVudGFyeSBjb250cm9sKQorICogICAgICBVc2FnZSAoRXJhc2VyKSwgICAgICAgICAgICAgOyBFcmFzZXIgKDQ1aCwgbW9tZW50YXJ5IGNvbnRyb2wpCisgKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksCisgKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksCisgKiAgICAgIFJlcG9ydCBTaXplICgxKSwKKyAqICAgICAgUmVwb3J0IENvdW50ICgzKSwKKyAqICAgICAgSW5wdXQgKFZhcmlhYmxlKSwKKyAqICAgICAgUmVwb3J0IENvdW50ICgzKSwKKyAqICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksCisgKiAgICAgIFVzYWdlIChJbiBSYW5nZSksICAgICAgICAgICA7IEluIHJhbmdlICgzMmgsIG1vbWVudGFyeSBjb250cm9sKQorICogICAgICBSZXBvcnQgQ291bnQgKDEpLAorICogICAgICBJbnB1dCAoVmFyaWFibGUpLAorICogICAgICBSZXBvcnQgQ291bnQgKDEpLAorICogICAgICBJbnB1dCAoQ29uc3RhbnQsIFZhcmlhYmxlKSwKKyAqICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgIDsgR2VuZXJpYyBkZXNrdG9wIGNvbnRyb2xzICgwMWgpCisgKiAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICA7IFggKDMwaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgUmVwb3J0IFNpemUgKDE2KSwKKyAqICAgICAgUmVwb3J0IENvdW50ICgxKSwKKyAqICAgICAgUHVzaCwKKyAqICAgICAgVW5pdCBFeHBvbmVudCAoMTMpLAorICogICAgICBVbml0IChJbmNoKSwKKyAqICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksCisgKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDEwMDAwKSwKKyAqICAgICAgTG9naWNhbCBNYXhpbXVtICgyMDAwMCksCisgKiAgICAgIElucHV0IChWYXJpYWJsZSksCisgKiAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICA7IFkgKDMxaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgUGh5c2ljYWwgTWF4aW11bSAoNjU4MyksCisgKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTMxNjYpLAorICogICAgICBJbnB1dCAoVmFyaWFibGUpLAorICogICAgICBQb3AsCisgKiAgICAgIFVzYWdlIFBhZ2UgKERpZ2l0aXplciksICAgICA7IERpZ2l0aXplciAoMERoKQorICogICAgICBVc2FnZSAoVGlwIFByZXNzdXJlKSwgICAgICAgOyBUaXAgcHJlc3N1cmUgKDMwaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgTG9naWNhbCBNYXhpbXVtICgxMDIzKSwKKyAqICAgICAgSW5wdXQgKFZhcmlhYmxlKSwKKyAqICAgICAgUmVwb3J0IFNpemUgKDE2KSwKKyAqICAgIEVuZCBDb2xsZWN0aW9uLAorICogIEVuZCBDb2xsZWN0aW9uLAorICogIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAgICAgOyBHZW5lcmljIGRlc2t0b3AgY29udHJvbHMgKDAxaCkKKyAqICBVc2FnZSAoTW91c2UpLCAgICAgICAgICAgICAgICAgIDsgTW91c2UgKDAyaCwgYXBwbGljYXRpb24gY29sbGVjdGlvbikKKyAqICBDb2xsZWN0aW9uIChBcHBsaWNhdGlvbiksCisgKiAgICBSZXBvcnQgSUQgKDgpLAorICogICAgVXNhZ2UgKFBvaW50ZXIpLCAgICAgICAgICAgICAgOyBQb2ludGVyICgwMWgsIHBoeXNpY2FsIGNvbGxlY3Rpb24pCisgKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksCisgKiAgICAgIFVzYWdlIFBhZ2UgKEJ1dHRvbiksICAgICAgICA7IEJ1dHRvbiAoMDloKQorICogICAgICBVc2FnZSBNaW5pbXVtICgwMWgpLAorICogICAgICBVc2FnZSBNYXhpbXVtICgwM2gpLAorICogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLAorICogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLAorICogICAgICBSZXBvcnQgQ291bnQgKDMpLAorICogICAgICBSZXBvcnQgU2l6ZSAoMSksCisgKiAgICAgIElucHV0IChWYXJpYWJsZSksCisgKiAgICAgIFJlcG9ydCBDb3VudCAoNSksCisgKiAgICAgIElucHV0IChDb25zdGFudCksCisgKiAgICAgIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICA7IEdlbmVyaWMgZGVza3RvcCBjb250cm9scyAoMDFoKQorICogICAgICBVc2FnZSAoWCksICAgICAgICAgICAgICAgICAgOyBYICgzMGgsIGR5bmFtaWMgdmFsdWUpCisgKiAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICA7IFkgKDMxaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgVXNhZ2UgKFdoZWVsKSwgICAgICAgICAgICAgIDsgV2hlZWwgKDM4aCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgVXNhZ2UgKDAwaCksCisgKiAgICAgIExvZ2ljYWwgTWluaW11bSAoLTEyNyksCisgKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTI3KSwKKyAqICAgICAgUmVwb3J0IFNpemUgKDgpLAorICogICAgICBSZXBvcnQgQ291bnQgKDQpLAorICogICAgICBJbnB1dCAoVmFyaWFibGUsIFJlbGF0aXZlKSwKKyAqICAgIEVuZCBDb2xsZWN0aW9uLAorICogIEVuZCBDb2xsZWN0aW9uLAorICogIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAgICAgOyBHZW5lcmljIGRlc2t0b3AgY29udHJvbHMgKDAxaCkKKyAqICBVc2FnZSAoTW91c2UpLCAgICAgICAgICAgICAgICAgIDsgTW91c2UgKDAyaCwgYXBwbGljYXRpb24gY29sbGVjdGlvbikKKyAqICBDb2xsZWN0aW9uIChBcHBsaWNhdGlvbiksCisgKiAgICBSZXBvcnQgSUQgKDkpLAorICogICAgVXNhZ2UgKFBvaW50ZXIpLCAgICAgICAgICAgICAgOyBQb2ludGVyICgwMWgsIHBoeXNpY2FsIGNvbGxlY3Rpb24pCisgKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksCisgKiAgICAgIFVzYWdlIFBhZ2UgKEJ1dHRvbiksICAgICAgICA7IEJ1dHRvbiAoMDloKQorICogICAgICBVc2FnZSBNaW5pbXVtICgwMWgpLAorICogICAgICBVc2FnZSBNYXhpbXVtICgwM2gpLAorICogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLAorICogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLAorICogICAgICBSZXBvcnQgQ291bnQgKDMpLAorICogICAgICBSZXBvcnQgU2l6ZSAoMSksCisgKiAgICAgIElucHV0IChWYXJpYWJsZSksCisgKiAgICAgIFJlcG9ydCBDb3VudCAoNCksCisgKiAgICAgIElucHV0IChDb25zdGFudCksCisgKiAgICAgIFVzYWdlIFBhZ2UgKERpZ2l0aXplciksICAgICA7IERpZ2l0aXplciAoMERoKQorICogICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgOyBJbiByYW5nZSAoMzJoLCBtb21lbnRhcnkgY29udHJvbCkKKyAqICAgICAgUmVwb3J0IENvdW50ICgxKSwKKyAqICAgICAgSW5wdXQgKFZhcmlhYmxlKSwKKyAqICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgIDsgR2VuZXJpYyBkZXNrdG9wIGNvbnRyb2xzICgwMWgpCisgKiAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICA7IFggKDMwaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgUmVwb3J0IFNpemUgKDE2KSwKKyAqICAgICAgUmVwb3J0IENvdW50ICgxKSwKKyAqICAgICAgUHVzaCwKKyAqICAgICAgVW5pdCBFeHBvbmVudCAoMTMpLAorICogICAgICBVbml0IChJbmNoKSwKKyAqICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksCisgKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDEwMDAwKSwKKyAqICAgICAgTG9naWNhbCBNYXhpbXVtICgyMDAwMCksCisgKiAgICAgIElucHV0IChWYXJpYWJsZSksCisgKiAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICA7IFkgKDMxaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgUGh5c2ljYWwgTWF4aW11bSAoNjU4MyksCisgKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTMxNjYpLAorICogICAgICBJbnB1dCAoVmFyaWFibGUpLAorICogICAgICBQb3AsCisgKiAgICAgIFVzYWdlIFBhZ2UgKERpZ2l0aXplciksICAgICA7IERpZ2l0aXplciAoMERoKQorICogICAgICBVc2FnZSAoVGlwIFByZXNzdXJlKSwgICAgICAgOyBUaXAgcHJlc3N1cmUgKDMwaCwgZHluYW1pYyB2YWx1ZSkKKyAqICAgICAgTG9naWNhbCBNYXhpbXVtICgxMDIzKSwKKyAqICAgICAgUmVwb3J0IENvdW50ICgxKSwKKyAqICAgICAgUmVwb3J0IFNpemUgKDE2KSwKKyAqICAgICAgSW5wdXQgKFZhcmlhYmxlKSwKKyAqICAgIEVuZCBDb2xsZWN0aW9uLAorICogIEVuZCBDb2xsZWN0aW9uLAorICogIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAgICAgOyBHZW5lcmljIGRlc2t0b3AgY29udHJvbHMgKDAxaCkKKyAqICBVc2FnZSAoMDBoKSwKKyAqICBDb2xsZWN0aW9uIChBcHBsaWNhdGlvbiksCisgKiAgICBSZXBvcnQgSUQgKDQpLAorICogICAgTG9naWNhbCBNaW5pbXVtICgwKSwKKyAqICAgIExvZ2ljYWwgTWF4aW11bSAoMjU1KSwKKyAqICAgIFVzYWdlICgwMGgpLAorICogICAgUmVwb3J0IFNpemUgKDgpLAorICogICAgUmVwb3J0IENvdW50ICgzKSwKKyAqICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwKKyAqICBFbmQgQ29sbGVjdGlvbgorICovCisKKy8qIFNpemUgb2YgdGhlIG9yaWdpbmFsIGRlc2NyaXB0b3Igb2YgV1AxMDYyIHRhYmxldCAqLworI2RlZmluZSBXUDEwNjJfUkRFU0NfT1JJR19TSVpFCTI1NAorCisvKgorICogRml4ZWQgV1AxMDYyIHJlcG9ydCBkZXNjcmlwdG9yLgorICoKKyAqIFJlbW92ZWQgdW51c2VkIHJlcG9ydHMsIGNvcnJlY3RlZCBzZWNvbmQgYmFycmVsIGJ1dHRvbiB1c2FnZSBjb2RlLCBwaHlzaWNhbAorICogdW5pdHMuCisgKi8KK3N0YXRpYyBfX3U4IHdwMTA2Ml9yZGVzY19maXhlZFtdID0geworCTB4MDUsIDB4MEQsICAgICAgICAgLyogIFVzYWdlIFBhZ2UgKERpZ2l0aXplciksICAgICAgICAgICAgICovCisJMHgwOSwgMHgwMiwgICAgICAgICAvKiAgVXNhZ2UgKFBlbiksICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgIC8qICBDb2xsZWN0aW9uIChBcHBsaWNhdGlvbiksICAgICAgICAgICAqLworCTB4ODUsIDB4MDksICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDkpLCAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMCwgICAgICAgICAvKiAgICAgIFVzYWdlIChTdHlsdXMpLCAgICAgICAgICAgICAgICAgKi8KKwkweEEwLCAgICAgICAgICAgICAgIC8qICAgICAgQ29sbGVjdGlvbiAoUGh5c2ljYWwpLCAgICAgICAgICAqLworCTB4NzUsIDB4MDEsICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDEpLCAgICAgICAgICAgICovCisJMHgwOSwgMHg0MiwgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGlwIFN3aXRjaCksICAgICAgICAgKi8KKwkweDA5LCAweDQ0LCAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChCYXJyZWwgU3dpdGNoKSwgICAgICAqLworCTB4MDksIDB4NDYsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRhYmxldCBQaWNrKSwgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDA0LCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAqLworCTB4ODEsIDB4MDEsICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50KSwgICAgICAgICAgICovCisJMHgwOSwgMHgzMiwgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHg3NSwgMHgxMCwgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHhBNCwgICAgICAgICAgICAgICAvKiAgICAgICAgICBQdXNoLCAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDAxLCAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAqLworCTB4NTUsIDB4RkQsICAgICAgICAgLyogICAgICAgICAgVW5pdCBFeHBvbmVudCAoLTMpLCAgICAgICAgICovCisJMHg2NSwgMHgxMywgICAgICAgICAvKiAgICAgICAgICBVbml0IChJbmNoKSwgICAgICAgICAgICAgICAgKi8KKwkweDM0LCAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFgpLCAgICAgICAgICAgICAgICAgICovCisJMHg0NiwgMHgxMCwgMHgyNywgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtICgxMDAwMCksICAgKi8KKwkweDI2LCAweDIwLCAweDRFLCAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoMjAwMDApLCAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgKi8KKwkweDQ2LCAweEI3LCAweDE5LCAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1heGltdW0gKDY1ODMpLCAgICAqLworCTB4MjYsIDB4NkUsIDB4MzMsICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICgxMzE2NiksICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEI0LCAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRpcCBQcmVzc3VyZSksICAgICAgICovCisJMHgyNiwgMHhGRiwgMHgwMywgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKDEwMjMpLCAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4QzAsICAgICAgICAgICAgICAgLyogICAgICBFbmQgQ29sbGVjdGlvbiwgICAgICAgICAgICAgICAgICovCisJMHhDMCAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24gICAgICAgICAgICAgICAgICAgICAgKi8KK307CisKKy8qCiAgKiBPcmlnaW5hbCBQRjEyMDkgcmVwb3J0IGRlc2NyaXB0b3IuCiAgKgogICogVGhlIGRlc2NyaXB0b3IgaXMgc2ltaWxhciB0byBXUFhYWFhVIGRlc2NyaXB0b3JzLCB3aXRoIGFuIGFkZGl0aW9uIG9mIGEKQEAgLTU4NCw2ICs3NzEsMTIgQEAKIAkJCSpyc2l6ZSA9IHNpemVvZih3cDgwNjB1X3JkZXNjX2ZpeGVkKTsKIAkJfQogCQlicmVhazsKKwljYXNlIFVTQl9ERVZJQ0VfSURfVUNMT0dJQ19UQUJMRVRfV1AxMDYyOgorCQlpZiAoKnJzaXplID09IFdQMTA2Ml9SREVTQ19PUklHX1NJWkUpIHsKKwkJCXJkZXNjID0gd3AxMDYyX3JkZXNjX2ZpeGVkOworCQkJKnJzaXplID0gc2l6ZW9mKHdwMTA2Ml9yZGVzY19maXhlZCk7CisJCX0KKwkJYnJlYWs7CiAJfQogCiAJcmV0dXJuIHJkZXNjOwpAQCAtNTk4LDYgKzc5MSw4IEBACiAJCQkJVVNCX0RFVklDRV9JRF9VQ0x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MzYuYwpAQCAtMCwwICsxLDUzOSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICBDb3B5cmlnaHQgKEMpIDIwMTEgSGFucyBkZSBHb2VkZSA8aGRlZ29lZGVAcmVkaGF0LmNvbT4gICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgorICogICBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgorICogICB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgorICogICAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgorICogICBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgorICogICBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgorICogICBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgorICogICBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBwcl9mbXQoZm10KSBLQlVJTERfTU9ETkFNRSAiOiAiIGZtdAorCisjaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+CisjaW5jbHVkZSA8bGludXgvaW5pdC5oPgorI2luY2x1ZGUgPGxpbnV4L3NsYWIuaD4KKyNpbmNsdWRlIDxsaW51eC9qaWZmaWVzLmg+CisjaW5jbHVkZSA8bGludXgvcGxhdGZvcm1fZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvaHdtb24uaD4KKyNpbmNsdWRlIDxsaW51eC9od21vbi1zeXNmcy5oPgorI2luY2x1ZGUgPGxpbnV4L2Vyci5oPgorI2luY2x1ZGUgPGxpbnV4L211dGV4Lmg+CisjaW5jbHVkZSAic2NoNTZ4eC1jb21tb24u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gKiAgIENvcHlyaWdodCAoQykgMjAxMC0yMDExIEhhbnMgZGUgR29lZGUgPGhkZWdvZWRlQHJlZGhhdC5jb20+ICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAqCisgKiAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCisgKiAgIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCisgKiAgIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCisgKiAgIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCisgKiAgIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCisgKiAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCisgKiAgIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZGVmaW5lIHByX2ZtdChmbXQpIEtCVUlMRF9NT0ROQU1FICI6ICIgZm10CisKKyNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KKyNpbmNsdWRlIDxsaW51eC9pbml0Lmg+CisjaW5jbHVkZSA8bGludXgvcGxhdGZvcm1fZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvZXJyLmg+CisjaW5jbHVkZSA8bGludXgvaW8uaD4KKyNpbmNsdWRlIDxsaW51eC9hY3BpLmg+CisjaW5jbHVkZSA8bGludXgvZGVsYXkuaD4KKyNpbmNsdWRlICJzY2g1Nnh4LWNvbW1vbi5oIgorCisjZGVmaW5lIFNJT19TQ0g1NlhYX0xEX0VNCTB4MEMJLyogRW1iZWRkZWQgdUNvbnRyb2xsZXIgTG9naWNhbCBEZXYgKi8KKyNkZWZpbmUgU0lPX1VOTE9DS19LRVkJCTB4NTUJLyogS2V5IHRvIGVu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vaHdtb24vc2NoNTZ4eC1jb21tb24uaCBiL2RyaXZlcnMvaHdtb24vc2NoNTZ4eC1jb21tb24uaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5kNWVhZjNiOQotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvaHdtb24vc2NoNTZ4eC1jb21tb24uaApAQCAtMCwwICsxLDI0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgIENvcHlyaWdodCAoQykgMjAxMC0yMDExIEhhbnMgZGUgR29lZGUgPGhkZWdvZWRlQHJlZGhhdC5jb20+ICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAqCisgKiAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCisgKiAgIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCisgKiAgIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCisgKiAgIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCisgKiAgIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCisgKiAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCisgKiAgIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitpbnQgc2NoNTZ4eF9yZWFkX3ZpcnR1YWxfcmVnKHUxNiBhZGRyLCB1MTYgcmVnKTsKK2ludCBzY2g1Nnh4X3dyaXRlX3ZpcnR1YWxfcmVnKHUxNiBhZGRyLCB1MTYgcmVnLCB1OCB2YWwpOworaW50IHNjaDU2eHhfcmVhZF92aXJ0dWFsX3JlZzE2K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9jbWQgeworCXUzMiBkYXRhWzRdOworfTsKKworc3RhdGljIHZvaWQgdXBkYXRlX2RvbWFpbihzdHJ1Y3QgcHJvdGVjdGlvbl9kb21haW4gKmRvbWFpbik7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogSGVscGVyIGZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgc3RydWN0IGlvbW11X2Rldl9kYXRhICphbGxvY19kZXZfZGF0YSh1MTYgZGV2aWQpCit7CisJc3RydWN0IGlvbW11X2Rldl9kYXRhICpkZXZfZGF0YTsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCisJZGV2X2RhdGEgPSBremFsbG9jKHNpemVvZigqZGV2X2RhdGEpLCBHRlBfS0VSTkVMKTsKKwlpZiAoIWRldl9kYXRhKQorCQlyZXR1cm4gTlVMTDsKKworCWRldl9kYXRhLT5kZXZpZCA9IGRldmlkOworCWF0b21pY19zZXQoJmRldl9kYXRhLT5iaW5kLCAwKTsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZkZXZfZGF0YV9saXN0X2xvY2ssIGZsYWdzKTsKKwlsaXN0X2FkZF90YWlsKCZkZXZfZGF0YS0+ZGV2X2RhdGFfbGlzdCwgJmRldl9kYXRhX2xpc3QpOworCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJmRldl9kYXRhX2xpc3RfbG9jaywgZmxhZ3MpOworCisJcmV0dXJuIGRldl9kYXRhOworfQorCitzdGF0aWMgdm9pZCBmcmVlX2Rldl9kYXRhKHN0cnVjdCBpb21tdV9kZXZfZGF0YSAqZGV2X2RhdGEpCit7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZkZXZfZGF0YV9saXN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F9yZXF1ZXN0cyk7Cit9CisKKyNlbmRpZgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEludGVycnVwdCBoYW5kbGluZyBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgZHVtcF9kdGVfZW50cnkodTE2IGRldmlkKQoreworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IDg7ICsraSkKKwkJcHJfZXJyKCJBTUQtVmk6IERURVslZF06ICUwOHhcbiIsIGksCisJCQlhbWRfaW9tbXVfZGV2X3RhYmxlW2RldmlkXS5kYXRhW2ldKTsKK30KKworc3RhdGljIHZvaWQgZHVtcF9jb21tYW5kKHVuc2lnbmVkIGxvbmcgcGh5c19hZGRyKQoreworCXN0cnVjdCBpb21tdV9jbWQgKmNtZCA9IHBoeXNfdG9fdmlydChwaHlzX2FkZHIpOworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IDQ7ICsraSkKKwkJcHJfZXJyKCJBTUQtVmk6IENNRFslZF06ICUwOHhcbiIsIGksIGNtZC0+ZGF0YVtpXSk7Cit9CisKK3N0YXRpYyB2b2lkIGlvbW11X3ByaW50X2V2ZW50KHN0cnVjdCBhbWRfaW9tbXUgKmlvbW11LCB2b2lkICpfX2V2dCkKK3sKKwl1MzIgKmV2ZW50ID0gX19ldnQ7CisJaW50IHR5cGUgID0gKGV2ZW50WzFdID4+IEVWRU5UX1RZUEVfU0hJRlQpICAmIEVWRU5UX1RZUEVfTUFTSzsKKwlpbnQgZGV2aWQgPSAoZXZlbnRbMF0gPj4gRVZFTlRfREVWSURfU0hJRlQpICYgRVZFTlRfREVWSURfTUFTSzsKKwlpbnQgZG9taWQgPSAoZXZlbnRbMV0gPj4gRVZFTlRfRE9NSURfU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30KKworaXJxcmV0dXJuX3QgYW1kX2lvbW11X2ludF90aHJlYWQoaW50IGlycSwgdm9pZCAqZGF0YSkKK3sKKwlzdHJ1Y3QgYW1kX2lvbW11ICppb21tdTsKKworCWZvcl9lYWNoX2lvbW11KGlvbW11KQorCQlpb21tdV9wb2xsX2V2ZW50cyhpb21tdSk7CisKKwlyZXR1cm4gSVJRX0hBTkRMRUQ7Cit9CisKK2lycXJldHVybl90IGFtZF9pb21tdV9pbnRfaGFuZGxlcihpbnQgaXJxLCB2b2lkICpkYXRhKQoreworCXJldHVybiBJUlFfV0FLRV9USFJFQUQ7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogSU9NTVUgY29tbWFuZCBxdWV1aW5nIGZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IHdhaXRfb25fc2VtKHZvbGF0aWxlIHU2NCAqc2VtKQoreworCWludCBpID0gMDsKKworCXdoaWxlICgqc2VtID09IDAgJiYgaSA8IExPT1BfVElNRU9VVCkgeworCQl1ZGVsYXkoMSk7CisJCWkgKz0gMTsKKwl9CisKKwlpZiAoaSA9PSBMT09QX1RJTUVPVVQpIHsKKwkJcHJfYWxlcnQoIkFNRC1WaTogQ29tcGxldGlvbi1XYWl0IGxvb3AgdGltZWQgb3V0XG4iKTsKKwkJcmV0dXJuIC1FSU87CisJfQorCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkIGNvcHlfY21kX3RvX2J1ZmZlcihzdHJ1Y3QgYW1kX2lvbW11ICppb21tdSwKKwkJCSAgICAgICBzdHJ1Y3QgaW9tbXVfY21kICpjbWQsCisJCQkgICAgICAgdTMyIHRhaWwpCit7CisJdTggKnRhcmdldDsKKworCXRhcmdldCA9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tdSkKK3sKKwlzdHJ1Y3QgdW5pdHlfbWFwX2VudHJ5ICplbnRyeTsKKwlpbnQgcmV0OworCisJbGlzdF9mb3JfZWFjaF9lbnRyeShlbnRyeSwgJmFtZF9pb21tdV91bml0eV9tYXAsIGxpc3QpIHsKKwkJaWYgKCFpb21tdV9mb3JfdW5pdHlfbWFwKGlvbW11LCBlbnRyeSkpCisJCQljb250aW51ZTsKKwkJcmV0ID0gZG1hX29wc191bml0eV9tYXAoaW9tbXUtPmRlZmF1bHRfZG9tLCBlbnRyeSk7CisJCWlmIChyZXQpCisJCQlyZXR1cm4gcmV0OworCX0KKworCXJldHVybiAwOworfQorCisvKgorICogSW5pdHMgdGhlIHVuaXR5IG1hcHBpbmdzIHJlcXVpcmVkIGZvciBhIHNwZWNpZmljIGRldmljZQorICovCitzdGF0aWMgaW50IGluaXRfdW5pdHlfbWFwcGluZ3NfZm9yX2RldmljZShzdHJ1Y3QgZG1hX29wc19kb21haW4gKmRtYV9kb20sCisJCQkJCSAgdTE2IGRldmlkKQoreworCXN0cnVjdCB1bml0eV9tYXBfZW50cnkgKmU7CisJaW50IHJldDsKKworCWxpc3RfZm9yX2VhY2hfZW50cnkoZSwgJmFtZF9pb21tdV91bml0eV9tYXAsIGxpc3QpIHsKKwkJaWYgKCEoZGV2aWQgPj0gZS0+ZGV2aWRfc3RhcnQgJiYgZGV2aWQgPD0gZS0+ZGV2aWRfZW5kKSkKKwkJCWNvbnRpbnVlOworCQlyZXQgPSBkbWFfb3BzX3VuaXR5X21hcChkbWFfZG9tLCBlKTsKKwkJaWYgKHJldCkKKwkJCXJldHVybiByZXQ7CisJfQorCisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVGhlIG5leHQgZnVuY3Rpb25zIGJlbG9uZyB0byB0aGUgYWRkcmVzcyBhbGxvY2F0b3IgZm9yIHR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ZCBhbWRfaW9tbXVfaW5pdF9ub3RpZmllcih2b2lkKQoreworCWJ1c19yZWdpc3Rlcl9ub3RpZmllcigmcGNpX2J1c190eXBlLCAmZGV2aWNlX25iKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVGhlIG5leHQgZnVuY3Rpb25zIGJlbG9uZyB0byB0aGUgZG1hX29wcyBtYXBwaW5nL3VubWFwcGluZyBjb2RlLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIEluIHRoZSBkbWFfb3BzIHBhdGggd2Ugb25seSBoYXZlIHRoZSBzdHJ1Y3QgZGV2aWNlLiBUaGlzIGZ1bmN0aW9uCisgKiBmaW5kcyB0aGUgY29ycmVzcG9uZGluZyBJT01NVSwgdGhlIHByb3RlY3Rpb24gZG9tYWluIGFuZCB0aGUKKyAqIHJlcXVlc3RvciBpZCBmb3IgYSBnaXZlbiBkZXZpY2UuCisgKiBJZiB0aGUgZGV2aWNlIGlzIG5vdCB5ZXQgYXNzb2NpYXRlZCB3aXRoIGEgZG9tYWluIHRoaXMgaXMgYWxzbyBkb25lCisgKiBpbiB0aGlzIGZ1bmN0aW9uLgorICovCitzdGF0aWMgc3RydWN0IHByb3RlY3Rpb25fZG9tYWluICpnZXRfZG9tYWluKHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgcHJvdGVjdGlvbl9kb21haW4gKmRvbWFpbjsKKwlzdHJ1Y3QgZG1hX29wc19kb21haW4gKmRtYV9kb207CisJdTE2IGRldmlkID0gZ2V0X2RldmljZV9pZChkZXYpOworCisJaWYgKCFjaGVja19kZXZpY2UoZGV2KSkKKwkJcmV0dXJuIEVSUl9QVFIoLUVJTlZBTCk7CisKKwlkb21haW4gPSBkb21haW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lOworCisJZG9tLT5wcml2ID0gZG9tYWluOworCisJcmV0dXJuIDA7CisKK291dF9mcmVlOgorCXByb3RlY3Rpb25fZG9tYWluX2ZyZWUoZG9tYWluKTsKKworCXJldHVybiAtRU5PTUVNOworfQorCitzdGF0aWMgdm9pZCBhbWRfaW9tbXVfZG9tYWluX2Rlc3Ryb3koc3RydWN0IGlvbW11X2RvbWFpbiAqZG9tKQoreworCXN0cnVjdCBwcm90ZWN0aW9uX2RvbWFpbiAqZG9tYWluID0gZG9tLT5wcml2OworCisJaWYgKCFkb21haW4pCisJCXJldHVybjsKKworCWlmIChkb21haW4tPmRldl9jbnQgPiAwKQorCQljbGVhbnVwX2RvbWFpbihkb21haW4pOworCisJQlVHX09OKGRvbWFpbi0+ZGV2X2NudCAhPSAwKTsKKworCWZyZWVfcGFnZXRhYmxlKGRvbWFpbik7CisKKwlwcm90ZWN0aW9uX2RvbWFpbl9mcmVlKGRvbWFpbik7CisKKwlkb20tPnByaXYgPSBOVUxMOworfQorCitzdGF0aWMgdm9pZCBhbWRfaW9tbXVfZGV0YWNoX2RldmljZShzdHJ1Y3QgaW9tbXVfZG9tYWluICpkb20sCisJCQkJICAgIHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgaW9tbXVfZGV2X2RhdGEgKmRldl9kYXRhID0gZGV2LT5hcmNoZGF0YS5pb21tdTsKKwlzdHJ1Y3QgYW1kX2lvbW11ICppb21tdTsKKwl1MTYgZGV2aWQ7CisKKwlpZiAoIWNoZWNrX2RldmljZShkZXYpKQorCQlyZXR1cm47CisKKwlkZXZpZCA9IGdldF9kZXZpY2VfaWQoZGV2KTsKKworCWlmIChkZXZfZGF0YS0+ZG9tYWluICE9IE5VTEwpCisJCWRldGFjaF9kZXZpY2UoZGV2KTsKKworCWlvbW11ID0gYW1kX2lvbW11X3Jsb29rdXBfdGFibGVbZGV2aWRdOworCWlmICghaW9tbXUpCisJCXJldHVybjsKKworCWlvbW11X2NvbXBsZXRpb25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2lvbW11X2lvdmFfdG9fcGh5cywKKwkuZG9tYWluX2hhc19jYXAgPSBhbWRfaW9tbXVfZG9tYWluX2hhc19jYXAsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUaGUgbmV4dCBmdW5jdGlvbnMgZG8gYSBiYXNpYyBpbml0aWFsaXphdGlvbiBvZiBJT01NVSBmb3IgcGFzcyB0aHJvdWdoCisgKiBtb2RlCisgKgorICogSW4gcGFzc3Rocm91Z2ggbW9kZSB0aGUgSU9NTVUgaXMgaW5pdGlhbGl6ZWQgYW5kIGVuYWJsZWQgYnV0IG5vdCB1c2VkIGZvcgorICogRE1BLUFQSSB0cmFuc2xhdGlvbi4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2ludCBfX2luaXQgYW1kX2lvbW11X2luaXRfcGFzc3Rocm91Z2godm9pZCkKK3sKKwlzdHJ1Y3QgYW1kX2lvbW11ICppb21tdTsKKwlzdHJ1Y3QgcGNpX2RldiAqZGV2ID0gTlVMTDsKKwl1MTYgZGV2aWQ7CisKKwkvKiBhbGxvY2F0ZSBwYXNzdGhyb3VnaCBkb21haW4gKi8KKwlwdF9kb21haW4gPSBwcm90ZWN0aW9uX2RvbWFpbl9hbGxvYygpOworCWlmICghcHRfZG9tYWluKQorCQlyZXR1cm4gLUVOT01FTTsKKworCXB0X2RvbWFpbi0+bW9kZSB8PSBQQUdFX01PREVfTk9ORTsKKworCWZvcl9lYWNoX3BjaV9kZXYoZGV2KSB7CisJCWlmICghY2hlY2tfZGV2aWNlKCZkZXYtPmRldikpCisJCQljb250aW51ZTsKKworCQlkZXZpZCA9IGdldF9kZXZpY2VfaWQoJmRldi0+ZGV2KTsKKworCQlpb21tdSA9IGFtZF9pb21tdV9ybG9va3VwX3Rh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EFDUEkgc2Nhbm5pbmcgY29kZQorICovCisjZGVmaW5lIElWUlNfSEVBREVSX0xFTkdUSCA0OAorCisjZGVmaW5lIEFDUElfSVZIRF9UWVBFICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSBBQ1BJX0lWTURfVFlQRV9BTEwgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgQUNQSV9JVk1EX1RZUEUgICAgICAgICAgICAgICAgICAweDIxCisjZGVmaW5lIEFDUElfSVZNRF9UWVBFX1JBTkdFICAgICAgICAgICAgMHgyMgorCisjZGVmaW5lIElWSERfREVWX0FMTCAgICAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBJVkhEX0RFVl9TRUxFQ1QgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgSVZIRF9ERVZfU0VMRUNUX1JBTkdFX1NUQVJUICAgICAweDAzCisjZGVmaW5lIElWSERfREVWX1JBTkdFX0VORCAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBJVkhEX0RFVl9BTElBUyAgICAgICAgICAgICAgICAgIDB4NDIKKyNkZWZpbmUgSVZIRF9ERVZfQUxJQVNfUkFOR0UgICAgICAgICAgICAweDQzCisjZGVmaW5lIElWSERfREVWX0VYVF9TRUxFQ1QgICAgICAgICAgICAgMHg0NgorI2RlZmluZSBJVkhEX0RFVl9FWFRfU0VMRUNUX1JBTkdFICAgICAgIDB4NDcKKworI2RlZmluZSBJVkhEX0ZMQUdfSFRfVFVOX0VOX01BU0sgICAgICAgIDB4MDEKKyNkZWZpbmUgSVZIRF9GTEFHX1BBU1NQV19FTl9NQVNLICAgICAgICAweDAyCisjZGVmaW5lIElWSERfRkxBR19SRVNQQVNTUFdfRU5fTUFTSyAgICAgMHgwNAorI2RlZmluZSBJVkhEX0ZMQUdfSVNPQ19FTl9NQVNLICAgICAgICAgIDB4MDgKKworI2RlZmluZSBJVk1EX0ZMQUdfRVhDTF9SQU5HRSAgICAgICAgICAgIDB4MDgKKyNkZWZpbmUgSVZNRF9GTEFHX1VOSVRZX01BUCAgICAgICAgICAgICAweDAxCisKKyNkZWZpbmUgQUNQSV9ERVZGTEFHX0lOSVRQQVNTICAgICAgICAgICAweDAxCisjZGVmaW5lIEFDUElfREVWRkxBR19FWFRJTlQgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBBQ1BJX0RFVkZMQUdfTk1JICAgICAgICAgICAgICAgIDB4MDQKKyNkZWZpbmUgQUNQSV9ERVZGTEFHX1NZU01HVDEgICAgICAgICAgICAweDEwCisjZGVmaW5lIEFDUElfREVWRkxBR19TWVNNR1QyICAgICAgICAgICAgMHgyMAorI2RlZmluZSBBQ1BJX0RFVkZMQUdfTElOVDAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgQUNQSV9ERVZGTEFHX0xJTlQxICAgICAgICAgICAgICAweDgwCisjZGVmaW5lIEFDUElfREVWRkxBR19BVFNESVMgICAgICAgICAgICAgMHgxMDAwMDAwMAorCisvKgorICogQUNQSSB0YWJsZSBkZWZpbml0aW9ucworICoKKyAqIFRoZXNlIGRhdGEgc3RydWN0dXJlcyBhcmUgbGFpZCBvdmVyIHRoZSB0YWJsZSB0byBwYXJzZSB0aGUgaW1wb3J0YW50IHZhbHVlcworICogb3V0IG9mIGl0LgorICovCisKKy8qCisgKiBzdHJ1Y3R1cmUgZGVzY3JpYmluZyBvbmUgSU9NTVUgaW4gdGhlIEFDUEkgdGFibGUuIFR5cGljYWxseSBmb2xsb3dlZCBieSBvbmUKKyAqIG9yIG1vcmUgaXZoZF9lbnRyeXMuCisgKi8KK3N0cnVjdCBpdmhkX2hlYWRlciB7CisJdTggdHlwZTsKKwl1OCBmbGFnczsKKwl1MTYgbGVuZ3RoOworCXUxNiBkZXZpZDsKKwl1MTYgY2FwX3B0cjsKKwl1NjQgbW1pb19waHlzOworCXUxNiBwY2lfc2VnOworCXUxNiBpbmZvOworCXUzMiByZXNlcnZlZDsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSk7CisKK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c28KKyAqIGJhc2ljYWxseSBpbml0aWFsaXplIHRoZSBoYXJkd2FyZS4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIEFsbG9jYXRlcyB0aGUgY29tbWFuZCBidWZmZXIuIFRoaXMgYnVmZmVyIGlzIHBlciBBTUQgSU9NTVUuIFdlIGNhbgorICogd3JpdGUgY29tbWFuZHMgdG8gdGhhdCBidWZmZXIgbGF0ZXIgYW5kIHRoZSBJT01NVSB3aWxsIGV4ZWN1dGUgdGhlbQorICogYXN5bmNocm9ub3VzbHkKKyAqLworc3RhdGljIHU4ICogX19pbml0IGFsbG9jX2NvbW1hbmRfYnVmZmVyKHN0cnVjdCBhbWRfaW9tbXUgKmlvbW11KQoreworCXU4ICpjbWRfYnVmID0gKHU4ICopX19nZXRfZnJlZV9wYWdlcyhHRlBfS0VSTkVMIHwgX19HRlBfWkVSTywKKwkJCWdldF9vcmRlcihDTURfQlVGRkVSX1NJWkUpKTsKKworCWlmIChjbWRfYnVmID09IE5VTEwpCisJCXJldHVybiBOVUxMOworCisJaW9tbXUtPmNtZF9idWZfc2l6ZSA9IENNRF9CVUZGRVJfU0laRSB8IENNRF9CVUZGRVJfVU5JTklUSUFMSVpFRDsKKworCXJldHVybiBjbWRfYnVmOworfQorCisvKgorICogVGhpcyBmdW5jdGlvbiByZXNldHMgdGhlIGNvbW1hbmQgYnVmZmVyIGlmIHRoZSBJT01NVSBzdG9wcGVkIGZldGNoaW5nCisgKiBjb21tYW5kcyBmcm9tIGl0LgorICovCit2b2lkIGFtZF9pb21tdV9yZXNldF9jbWRfYnVmZmVyKHN0cnVjdCBhbWRfaW9tbXUgKmlvbW11KQoreworCWlvbW11X2ZlYXR1cmVfZGlzYWJsZShpb21tdSwgQ09OVFJPTF9DTURCVUZfRU4pOworCisJd3JpdGVsKDB4MDAsIGlvbW11LT5tbWlvX2Jhc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TkVMKTsKKwkJCWlmIChpb21tdSA9PSBOVUxMKSB7CisJCQkJYW1kX2lvbW11X2luaXRfZXJyID0gLUVOT01FTTsKKwkJCQlyZXR1cm4gMDsKKwkJCX0KKworCQkJcmV0ID0gaW5pdF9pb21tdV9vbmUoaW9tbXUsIGgpOworCQkJaWYgKHJldCkgeworCQkJCWFtZF9pb21tdV9pbml0X2VyciA9IHJldDsKKwkJCQlyZXR1cm4gMDsKKwkJCX0KKwkJCWJyZWFrOworCQlkZWZhdWx0OgorCQkJYnJlYWs7CisJCX0KKwkJcCArPSBoLT5sZW5ndGg7CisKKwl9CisJV0FSTl9PTihwICE9IGVuZCk7CisKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUaGUgZm9sbG93aW5nIGZ1bmN0aW9ucyBpbml0aWFsaXplIHRoZSBNU0kgaW50ZXJydXB0cyBmb3IgYWxsIElPTU1VcworICogaW4gdGhlIHN5c3RlbS4gSXRzIGEgYml0IGNoYWxsZW5naW5nIGJlY2F1c2UgdGhlcmUgY291bGQgYmUgbXVsdGlwbGUKKyAqIElPTU1VcyBwZXIgUENJIEJERiBidXQgd2UgY2FuIGNhbGwgcGNpX2VuYWJsZV9tc2koeCkgb25seSBvbmNlIHBlcgorICogcGNpX2Rldi4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGludCBpb21tdV9zZXR1cF9tc2koc3RydWN0IGFtZF9pb21tdSAqaW9tbXUpCit7CisJaW50IHI7CisKKwlpZiAocGNpX2VuYWJsZV9tc2koaW9tbXUtPmRldikpCisJCXJldHVybiAxOworCisJciA9IHJlcXVlc3RfdGhyZWFkZWRfaXJxKGlvbW11LT5kZXYtPmlycSwKKwkJCQkgYW1kX2lvbW11X2ludF9oYW5kbGVyLAorCQkJCSBhbWRfaW9tbXVfaW50X3RocmVhZCwKKwkJCQkgMCwgIkFNRC1WaSIsCisJCQkJIGlvbW11LT5kZXYpOworCisJaWYgKHIpIHsKKwkJcGNpX2Rpc2FibGVfbXNpKGlvbW11LT5kZXYpOworCQlyZXR1cm4gMTsKKwl9CisKKwlpb21tdS0+aW50X2VuYWJsZWQgPSB0cnVlOworCWlvbW11X2ZlYXR1cmVfZW5hYmxlKGlvbW11LCBDT05UUk9MX0VWVF9JTlRfRU4pOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgaW9tbXVfaW5pdF9tc2koc3RydWN0IGFtZF9pb21tdSAqaW9tbXUpCit7CisJaWYgKGlvbW11LT5pbnRfZW5hYmxlZCkKKwkJcmV0dXJuIDA7CisKKwlpZiAocGNpX2ZpbmRfY2FwYWJpbGl0eShpb21tdS0+ZGV2LCBQQ0lfQ0FQX0lEX01TSSkpCisJCXJldHVybiBpb21tdV9zZXR1cF9tc2koaW9tbXUpOworCisJcmV0dXJuIDE7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVGhlIG5leHQgZnVuY3Rpb25zIGJlbG9uZyB0byB0aGUgdGhpcmQgcGFzcyBvZiBwYXJzaW5nIHRoZSBBQ1BJCisgKiB0YWJsZS4gSW4gdGhpcyBsYXN0IHBhc3MgdGhlIG1lbW9yeSBtYXBwaW5nIHJlcXVpcmVtZW50cyBhcmUKKyAqIGdhdGhlcmVkIChsaWtlIGV4Y2x1c2lvbiBhbmQgdW5pdHkgbWFwcGluZyByZWFuZ2VzKS4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgX19pbml0IGZyZWVfdW5pdHlfbWFwcyh2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cihybG9va3VwX3RhYmxlX3NpemUpKTsKKworCWZyZWVfcGFnZXMoKHVuc2lnbmVkIGxvbmcpYW1kX2lvbW11X2FsaWFzX3RhYmxlLAorCQkgICBnZXRfb3JkZXIoYWxpYXNfdGFibGVfc2l6ZSkpOworCisJZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylhbWRfaW9tbXVfZGV2X3RhYmxlLAorCQkgICBnZXRfb3JkZXIoZGV2X3RhYmxlX3NpemUpKTsKKworCWZyZWVfaW9tbXVfYWxsKCk7CisKKwlmcmVlX3VuaXR5X21hcHMoKTsKKworI2lmZGVmIENPTkZJR19HQVJUX0lPTU1VCisJLyoKKwkgKiBXZSBmYWlsZWQgdG8gaW5pdGlhbGl6ZSB0aGUgQU1EIElPTU1VIC0gdHJ5IGZhbGxiYWNrIHRvIEdBUlQKKwkgKiBpZiBwb3NzaWJsZS4KKwkgKi8KKwlnYXJ0X2lvbW11X2luaXQoKTsKKworI2VuZGlmCisKKwlnb3RvIG91dDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBFYXJseSBkZXRlY3QgY29kZS4gVGhpcyBjb2RlIHJ1bnMgYXQgSU9NTVUgZGV0ZWN0aW9uIHRpbWUgaW4gdGhlIERNQQorICogbGF5ZXIuIEl0IGp1c3QgbG9va3MgaWYgdGhlcmUgaXMgYW4gSVZSUyBBQ1BJIHRhYmxlIHRvIGRldGVjdCBBTUQKKyAqIElPTU1VcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBfX2luaXQgZWFybHlfYW1kX2lvbW11X2RldGVjdChzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgKnRhYmxlKQoreworCXJldHVybiAwOworfQorCitpbnQgX19pbml0IGFtZF9pb21tdV9kZXRlY3Qodm9pZCkKK3sKKwlpZiAobm9faW9tbXUgfHwgKGlvbW11X2RldGVjdGVkICYmICFnYXJ0X2lvbW11X2FwZXJ0dXJlKSkKKwkJcmV0dXJuIC1FTk9ERVY7CisKKwlpZiAoYW1kX2lvbW11X2Rpc2FibGVkKQorCQlyZXR1cm4gLUVOT0RFVjsKKworCWlmIChhY3BpX3RhYmxlX3BhcnNlKCJJVlJTIiwgZWFybHlfYW1kX2lvbW11X2RldGVjdCkgPT0gMCkgeworCQlpb21tdV9kZXRlY3RlZCA9IDE7CisJCWFtZF9pb21tdV9kZXRlY3RlZCA9IDE7CisJCXg4Nl9pbml0LmlvbW11LmlvbW11X2luaXQgPSBhbWRfaW9tbXVfaW5pdDsKKworCQkvKiBNYWtlIHN1cmUgQUNTIHdpbGwgYmUgZW5hYmxlZCAqLworCQlwY2lfcmVxdWVzdF9hY3MoKTsKKwkJcmV0dXJuIDE7CisJfQorCXJldHVybiAtRU5PREVWOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFBhcnNpbmcgZnVuY3Rpb25zIGZvciB0aGUgQU1EIElPTU1VIHNwZWNpZmljIGtlcm5lbCBjb21tYW5kIGxpbmUKKyAqIG9wdGlvbnMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0IHBhcnNlX2FtZF9pb21tdV9kdW1wKGNoYXIgKnN0cikKK3sKKwlhbWRfaW9tbXVfZHVtcCA9IHRydWU7CisKKwlyZXR1cm4gMTsKK30KKworc3RhdGljIGludCBfX2luaXQgcGFyc2VfYW1kX2lvbW11X29wdGlvbnMoY2hhciAqc3RyKQoreworCWZvciAoOyAqc3RyOyArK3N0cikgeworCQlpZiAoc3RybmNtcChzdHIsICJmdW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25lZCBsb25nKS0xKSkKKyNkZWZpbmUgRE9NQUlOX01BWF9BRERSKGdhdykJKCgodWludDY0X3QpX19ET01BSU5fTUFYX1BGTihnYXcpKSA8PCBWVERfUEFHRV9TSElGVCkKKworI2RlZmluZSBJT1ZBX1BGTihhZGRyKQkJKChhZGRyKSA+PiBQQUdFX1NISUZUKQorI2RlZmluZSBETUFfMzJCSVRfUEZOCQlJT1ZBX1BGTihETUFfQklUX01BU0soMzIpKQorI2RlZmluZSBETUFfNjRCSVRfUEZOCQlJT1ZBX1BGTihETUFfQklUX01BU0soNjQpKQorCisvKiBwYWdlIHRhYmxlIGhhbmRsaW5nICovCisjZGVmaW5lIExFVkVMX1NUUklERQkJKDkpCisjZGVmaW5lIExFVkVMX01BU0sJCSgoKHU2NCkxIDw8IExFVkVMX1NUUklERSkgLSAxKQorCitzdGF0aWMgaW5saW5lIGludCBhZ2F3X3RvX2xldmVsKGludCBhZ2F3KQoreworCXJldHVybiBhZ2F3ICsgMjsKK30KKworc3RhdGljIGlubGluZSBpbnQgYWdhd190b193aWR0aChpbnQgYWdhdykKK3sKKwlyZXR1cm4gMzAgKyBhZ2F3ICogTEVWRUxfU1RSSURFOworfQorCitzdGF0aWMgaW5saW5lIGludCB3aWR0aF90b19hZ2F3KGludCB3aWR0aCkKK3sKKwlyZXR1cm4gKHdpZHRoIC0gMzApIC8gTEVWRUxfU1RSSURFOworfQorCitzdGF0aWMgaW5saW5lIHVuc2lnbmVkIGludCBsZXZlbF90b19vZmZzZXRfYml0cyhpbnQgbGV2ZWwpCit7CisJcmV0dXJuIChsZXZlbCAtIDEpICogTEVWRUxfU1RSSURFOworfQorCitzdGF0aWMgaW5saW5lIGludCBwZm5fbGV2ZWxfb2Zmc2V0KHVuc2lnbmVkIGxvbmcgcGZuLCBpbnQgbGV2ZWwpCit7CisJcmV0dXJuIChwZm4gPj4gbGV2ZWxfdG9fb2Zmc2V0X2JpdHMobGV2ZWwpKSAmIExFVkVMX01BU0s7Cit9CisKK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9tbXVzIGFyZSBmcmVlZCwgZnJlZSBnX2lvbW11cyAqLworCWZvciAoaSA9IDA7IGkgPCBnX251bV9vZl9pb21tdXM7IGkrKykgeworCQlpZiAoZ19pb21tdXNbaV0pCisJCQlicmVhazsKKwl9CisKKwlpZiAoaSA9PSBnX251bV9vZl9pb21tdXMpCisJCWtmcmVlKGdfaW9tbXVzKTsKKworCS8qIGZyZWUgY29udGV4dCBtYXBwaW5nICovCisJZnJlZV9jb250ZXh0X3RhYmxlKGlvbW11KTsKK30KKworc3RhdGljIHN0cnVjdCBkbWFyX2RvbWFpbiAqYWxsb2NfZG9tYWluKHZvaWQpCit7CisJc3RydWN0IGRtYXJfZG9tYWluICpkb21haW47CisKKwlkb21haW4gPSBhbGxvY19kb21haW5fbWVtKCk7CisJaWYgKCFkb21haW4pCisJCXJldHVybiBOVUxMOworCisJZG9tYWluLT5uaWQgPSAtMTsKKwltZW1zZXQoJmRvbWFpbi0+aW9tbXVfYm1wLCAwLCBzaXplb2YodW5zaWduZWQgbG9uZykpOworCWRvbWFpbi0+ZmxhZ3MgPSAwOworCisJcmV0dXJuIGRvbWFpbjsKK30KKworc3RhdGljIGludCBpb21tdV9hdHRhY2hfZG9tYWluKHN0cnVjdCBkbWFyX2RvbWFpbiAqZG9tYWluLAorCQkJICAgICAgIHN0cnVjdCBpbnRlbF9pb21tdSAqaW9tbXUpCit7CisJaW50IG51bTsKKwl1bnNpZ25lZCBsb25nIG5kb21haW5zOworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwluZG9tYWlucyA9IGNhcF9uZG9tcyhpb21tdS0+Y2FwKTsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZpb21tdS0+bG9jaywgZmxhZ3MpOworCisJbnVtID0gZmluZF9maXJzdF96ZXJvX2JpdChpb21tdS0+ZG9tYWluX2lkcywgbmRvbWFpbnMpOworCWlmIChudW0gPj0gbmRvbWFpbnMpIHsKKwkJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgm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fZG9tYWluOworCQl9CisJfQorCisJZG9tYWluID0gYWxsb2NfZG9tYWluKCk7CisJaWYgKCFkb21haW4pCisJCWdvdG8gZXJyb3I7CisKKwkvKiBBbGxvY2F0ZSBuZXcgZG9tYWluIGZvciB0aGUgZGV2aWNlICovCisJZHJoZCA9IGRtYXJfZmluZF9tYXRjaGVkX2RyaGRfdW5pdChwZGV2KTsKKwlpZiAoIWRyaGQpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICJJT01NVTogY2FuJ3QgZmluZCBETUFSIGZvciBkZXZpY2UgJXNcbiIsCisJCQlwY2lfbmFtZShwZGV2KSk7CisJCXJldHVybiBOVUxMOworCX0KKwlpb21tdSA9IGRyaGQtPmlvbW11OworCisJcmV0ID0gaW9tbXVfYXR0YWNoX2RvbWFpbihkb21haW4sIGlvbW11KTsKKwlpZiAocmV0KSB7CisJCWZyZWVfZG9tYWluX21lbShkb21haW4pOworCQlnb3RvIGVycm9yOworCX0KKworCWlmIChkb21haW5faW5pdChkb21haW4sIGdhdykpIHsKKwkJZG9tYWluX2V4aXQoZG9tYWluKTsKKwkJZ290byBlcnJvcjsKKwl9CisKKwkvKiByZWdpc3RlciBwY2llLXRvLXBjaSBkZXZpY2UgKi8KKwlpZiAoZGV2X3RtcCkgeworCQlpbmZvID0gYWxsb2NfZGV2aW5mb19tZW0oKTsKKwkJaWYgKCFpbmZvKSB7CisJCQlkb21haW5fZXhpdChkb21haW4pOworCQkJZ290byBlcnJvcjsKKwkJfQorCQlpbmZvLT5zZWdtZW50ID0gc2VnbWVudDsKKwkJaW5mby0+YnVzID0gYnVzOworCQlpbmZvLT5kZXZmbiA9IGRldmZuOworCQlpbmZvLT5kZXYgPSBOVUxMOworCQlpbmZvLT5kb21haW4gPSBkb21haW47CisJCS8qIFRoaXMgZG9tYWluIGlzIHNoYXJlZCBieSBkZXZpY2VzIHVuZGVyIHAycCBicmlkZ2UgKi8KKwkJZG9tYWluLT5mbGFncyB8PSBET01BSU5fRkxBR19QMl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b2hlcmVudF9kbWFfbWFzazsKKworCQlyZXR1cm4gZG1hX21hc2sgPj0gZG1hX2dldF9yZXF1aXJlZF9tYXNrKCZwZGV2LT5kZXYpOworCX0KKworCXJldHVybiAxOworfQorCitzdGF0aWMgaW50IF9faW5pdCBpb21tdV9wcmVwYXJlX3N0YXRpY19pZGVudGl0eV9tYXBwaW5nKGludCBodykKK3sKKwlzdHJ1Y3QgcGNpX2RldiAqcGRldiA9IE5VTEw7CisJaW50IHJldDsKKworCXJldCA9IHNpX2RvbWFpbl9pbml0KGh3KTsKKwlpZiAocmV0KQorCQlyZXR1cm4gLUVGQVVMVDsKKworCWZvcl9lYWNoX3BjaV9kZXYocGRldikgeworCQkvKiBTa2lwIEhvc3QvUENJIEJyaWRnZSBkZXZpY2VzICovCisJCWlmIChJU19CUklER0VfSE9TVF9ERVZJQ0UocGRldikpCisJCQljb250aW51ZTsKKwkJaWYgKGlvbW11X3Nob3VsZF9pZGVudGl0eV9tYXAocGRldiwgMSkpIHsKKwkJCXByaW50ayhLRVJOX0lORk8gIklPTU1VOiAlcyBpZGVudGl0eSBtYXBwaW5nIGZvciBkZXZpY2UgJXNcbiIsCisJCQkgICAgICAgaHcgPyAiaGFyZHdhcmUiIDogInNvZnR3YXJlIiwgcGNpX25hbWUocGRldikpOworCisJCQlyZXQgPSBkb21haW5fYWRkX2Rldl9pbmZvKHNpX2RvbWFpbiwgcGRldiwKKwkJCQkJCSAgICAgaHcgPyBDT05URVhUX1RUX1BBU1NfVEhST1VHSCA6CisJCQkJCQkgICAgIENPTlRFWFRfVFRfTVVMVElfTEVWRUwpOworCQkJaWYgKHJldCkKKwkJCQlyZXR1cm4gcmV0OworCQl9CisJfQorCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgX19pbml0IGluaXRfZG1hcnModm9pZCkKK3sKKwlzdHJ1Y3QgZG1hcl9kcmhkX3VuaXQgKmRyaGQ7CisJc3RydWN0IGRtYXJfcm1ycl91bml0ICpybXJyOworCX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ybiAxOworCQkJfQorCQl9CisJfQorCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBkbWFfYWRkcl90IF9faW50ZWxfbWFwX3NpbmdsZShzdHJ1Y3QgZGV2aWNlICpod2RldiwgcGh5c19hZGRyX3QgcGFkZHIsCisJCQkJICAgICBzaXplX3Qgc2l6ZSwgaW50IGRpciwgdTY0IGRtYV9tYXNrKQoreworCXN0cnVjdCBwY2lfZGV2ICpwZGV2ID0gdG9fcGNpX2Rldihod2Rldik7CisJc3RydWN0IGRtYXJfZG9tYWluICpkb21haW47CisJcGh5c19hZGRyX3Qgc3RhcnRfcGFkZHI7CisJc3RydWN0IGlvdmEgKmlvdmE7CisJaW50IHByb3QgPSAwOworCWludCByZXQ7CisJc3RydWN0IGludGVsX2lvbW11ICppb21tdTsKKwl1bnNpZ25lZCBsb25nIHBhZGRyX3BmbiA9IHBhZGRyID4+IFBBR0VfU0hJRlQ7CisKKwlCVUdfT04oZGlyID09IERNQV9OT05FKTsKKworCWlmIChpb21tdV9ub19tYXBwaW5nKGh3ZGV2KSkKKwkJcmV0dXJuIHBhZGRyOworCisJZG9tYWluID0gZ2V0X3ZhbGlkX2RvbWFpbl9mb3JfZGV2KHBkZXYpOworCWlmICghZG9tYWluKQorCQlyZXR1cm4gMDsKKworCWlvbW11ID0gZG9tYWluX2dldF9pb21tdShkb21haW4pOworCXNpemUgPSBhbGlnbmVkX25ycGFnZXMocGFkZHIsIHNpemUpOworCisJaW92YSA9IGludGVsX2FsbG9jX2lvdmEoaHdkZXYsIGRvbWFpbiwgZG1hX3RvX21tX3BmbihzaXplKSwgZG1hX21hc2spOworCWlmICghaW92YSkKKwkJZ290byBlcnJvcjsKKworCS8qCisJICogQ2hlY2sgaWYgRE1BUiBzdXBwb3J0cyB6ZXJvLWxlbmd0aCByZWFkcyBvbiB3cml0ZSBvbmx5CisJICogbWFwcGluZ3MuLgorCSAqLworCWlmIChkaXIgPT0gRE1BX1RPX0RFVklDRSB8fCBkaXIgPT0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zdGF0aWMgdm9pZCBpbnRlbF9pb21tdV9kb21haW5fZGVzdHJveShzdHJ1Y3QgaW9tbXVfZG9tYWluICpkb21haW4pCit7CisJc3RydWN0IGRtYXJfZG9tYWluICpkbWFyX2RvbWFpbiA9IGRvbWFpbi0+cHJpdjsKKworCWRvbWFpbi0+cHJpdiA9IE5VTEw7CisJdm1fZG9tYWluX2V4aXQoZG1hcl9kb21haW4pOworfQorCitzdGF0aWMgaW50IGludGVsX2lvbW11X2F0dGFjaF9kZXZpY2Uoc3RydWN0IGlvbW11X2RvbWFpbiAqZG9tYWluLAorCQkJCSAgICAgc3RydWN0IGRldmljZSAqZGV2KQoreworCXN0cnVjdCBkbWFyX2RvbWFpbiAqZG1hcl9kb21haW4gPSBkb21haW4tPnByaXY7CisJc3RydWN0IHBjaV9kZXYgKnBkZXYgPSB0b19wY2lfZGV2KGRldik7CisJc3RydWN0IGludGVsX2lvbW11ICppb21tdTsKKwlpbnQgYWRkcl93aWR0aDsKKworCS8qIG5vcm1hbGx5IHBkZXYgaXMgbm90IG1hcHBlZCAqLworCWlmICh1bmxpa2VseShkb21haW5fY29udGV4dF9tYXBwZWQocGRldikpKSB7CisJCXN0cnVjdCBkbWFyX2RvbWFpbiAqb2xkX2RvbWFpbjsKKworCQlvbGRfZG9tYWluID0gZmluZF9kb21haW4ocGRldik7CisJCWlmIChvbGRfZG9tYWluKSB7CisJCQlpZiAoZG1hcl9kb21haW4tPmZsYWdzICYgRE9NQUlOX0ZMQUdfVklSVFVBTF9NQUNISU5FIHx8CisJCQkgICAgZG1hcl9kb21haW4tPmZsYWdzICYgRE9NQUlOX0ZMQUdfU1RBVElDX0lERU5USVRZKQorCQkJCWRvbWFpbl9yZW1vdmVfb25lX2Rldl9pbmZvKG9sZF9kb21haW4sIHBkZXYpOworCQkJZWxzZQorCQkJCWRvbWFpbl9yZW1vdmVfZGV2X2luZm8ob2xkX2RvbWFpbik7CisJCX0KKwl9CisKKwlpb21tdSA9IGRldmljZV90b19pb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wlpZiAoSVNfRVJSKG9tYXAtPnVzYmhvc3RfaWNrKSkgeworCQlyZXQgPSAgUFRSX0VSUihvbWFwLT51c2Job3N0X2ljayk7CisJCWRldl9lcnIoZGV2LCAidXNiaG9zdF9pY2sgZmFpbGVkIGVycm9yOiVkXG4iLCByZXQpOworCQlnb3RvIGVycl9lbmQ7CisJfQorCisJb21hcC0+dXNiaG9zdF9oc19mY2sgPSBjbGtfZ2V0KGRldiwgImhzX2ZjayIpOworCWlmIChJU19FUlIob21hcC0+dXNiaG9zdF9oc19mY2spKSB7CisJCXJldCA9IFBUUl9FUlIob21hcC0+dXNiaG9zdF9oc19mY2spOworCQlkZXZfZXJyKGRldiwgInVzYmhvc3RfaHNfZmNrIGZhaWxlZCBlcnJvcjolZFxuIiwgcmV0KTsKKwkJZ290byBlcnJfdXNiaG9zdF9pY2s7CisJfQorCisJb21hcC0+dXNiaG9zdF9mc19mY2sgPSBjbGtfZ2V0KGRldiwgImZzX2ZjayIpOworCWlmIChJU19FUlIob21hcC0+dXNiaG9zdF9mc19mY2spKSB7CisJCXJldCA9IFBUUl9FUlIob21hcC0+dXNiaG9zdF9mc19mY2spOworCQlkZXZfZXJyKGRldiwgInVzYmhvc3RfZnNfZmNrIGZhaWxlZCBlcnJvcjolZFxuIiwgcmV0KTsKKwkJZ290byBlcnJfdXNiaG9zdF9oc19mY2s7CisJfQorCisJb21hcC0+dXNidGxsX2ZjayA9IGNsa19nZXQoZGV2LCAidXNidGxsX2ZjayIpOworCWlmIChJU19FUlIob21hcC0+dXNidGxsX2ZjaykpIHsKKwkJcmV0ID0gUFRSX0VSUihvbWFwLT51c2J0bGxfZmNrKTsKKwkJZGV2X2VycihkZXYsICJ1c2J0bGxfZmNrIGZhaWxlZCBlcnJvcjolZFxuIiwgcmV0KTsKKwkJZ290byBlcnJfdXNiaG9zdF9mc19mY2s7CisJfQorCisJb21hcC0+dXNidGxsX2ljayA9IGNsa19nZXQoZGV2LCAidXNidGxsX2ljayIpOworCWlm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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICBHZW5lcmFsIGhlbHBlciBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0zNjcsMjEgKzM4OCwyNiBAQAogICogTWFwIG1lbW9yeSBpbnRvIGEgc2NhdHRlcmxpc3QuICBPcHRpb25hbGx5IGFsbG93IHRoZSBzYW1lIG1lbW9yeSB0byBiZQogICogbWFwcGVkIG1vcmUgdGhhbiBvbmNlLgogICovCi1zdGF0aWMgaW50IG1tY190ZXN0X21hcF9zZyhzdHJ1Y3QgbW1jX3Rlc3RfbWVtICptZW0sIHVuc2lnbmVkIGxvbmcgc3osCitzdGF0aWMgaW50IG1tY190ZXN0X21hcF9zZyhzdHJ1Y3QgbW1jX3Rlc3RfbWVtICptZW0sIHVuc2lnbmVkIGxvbmcgc2l6ZSwKIAkJCSAgIHN0cnVjdCBzY2F0dGVybGlzdCAqc2dsaXN0LCBpbnQgcmVwZWF0LAogCQkJICAgdW5zaWduZWQgaW50IG1heF9zZWdzLCB1bnNpZ25lZCBpbnQgbWF4X3NlZ19zeiwKLQkJCSAgIHVuc2lnbmVkIGludCAqc2dfbGVuKQorCQkJICAgdW5zaWduZWQgaW50ICpzZ19sZW4sIGludCBtaW5fc2dfbGVuKQogewogCXN0cnVjdCBzY2F0dGVybGlzdCAqc2cgPSBOVUxMOwogCXVuc2lnbmVkIGludCBpOworCXVuc2lnbmVkIGxvbmcgc3ogPSBzaXplOwogCiAJc2dfaW5pdF90YWJsZShzZ2xpc3QsIG1heF9zZWdzKTsKKwlpZiAobWluX3NnX2xlbiA+IG1heF9zZWdzKQorCQltaW5fc2dfbGVuID0gbWF4X3NlZ3M7CiAKIAkqc2dfbGVuID0gMDsKIAlkbyB7CiAJCWZvciAoaSA9I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IHZlcnNpb24gMiBhcwogICogcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24uCkBAIC0yMiw0OCArMjgsNjYgQEAKICAqIEluc3BpcmVkIGJ5IHNkaGNpLXBjaS5jLCBieSBQaWVycmUgT3NzbWFuCiAgKi8KIAotI2luY2x1ZGUgPGxpbnV4L2RlbGF5Lmg+Ci0jaW5jbHVkZSA8bGludXgvaGlnaG1lbS5oPgotI2luY2x1ZGUgPGxpbnV4L21vZF9kZXZpY2V0YWJsZS5oPgotI2luY2x1ZGUgPGxpbnV4L3BsYXRmb3JtX2RldmljZS5oPgotCi0jaW5jbHVkZSA8bGludXgvbW1jL2hvc3QuaD4KLQotI2luY2x1ZGUgPGxpbnV4L2lvLmg+Ci0jaW5jbHVkZSA8bGludXgvbW1jL3NkaGNpLXBsdGZtLmg+Ci0KLSNpbmNsdWRlICJzZGhjaS5oIgorI2luY2x1ZGUgPGxpbnV4L2Vyci5oPgorI2luY2x1ZGUgPGxpbnV4L29mLmg+CisjaWZkZWYgQ09ORklHX1BQQworI2luY2x1ZGUgPGFzbS9tYWNoZGVwLmg+CisjZW5kaWYKICNpbmNsdWRlICJzZGhjaS1wbHRmbS5oIgogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFNESENJIGNvcmUgY2FsbGJhY2tzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi1cKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KIHN0YXRpYyBzdHJ1Y3Qgc2RoY2lfb3BzIHNkaGNpX3BsdGZtX29wcyA9IHsKIH07CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRGV2aWNlIHByb2JpbmcvcmVtb3ZhbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLVwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGludCBfX2RldmluaXQgc2RoY2lfcGx0Zm1fcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldikKKyNpZmRlZiBDT05GSUdfT0YKK3N0YXRpYyBib29sIHNkaGNpX29mX3dwX2ludmVydGVkKHN0cnVjdCBkZXZpY2Vfbm9kZSAqbnApCiB7Ci0JY29uc3Qgc3RydWN0IHBsYXRmb3JtX2RldmljZV9pZCAqcGxhdGlkID0gcGxhdGZvcm1fZ2V0X2RldmljZV9pZChwZGV2KTsKLQlzdHJ1Y3Qgc2RoY2lfcGx0Zm1fZGF0YSAqcGRhdGE7CisJaWYgKG9mX2dldF9wcm9wZXJ0eShucCwgInNkaGNpLHdwLWludmVydGVkIiwgTlVMTCkpCisJCXJldHVybiB0cnVlOworCisJLyogT2xkIGRldmljZSB0cmVlcyBkb24ndCBoYXZlIHRoZSB3cC1pbnZlcnRlZCBwcm9wZXJ0eS4gKi8KKyNpZmRlZiBDT05GSUdfU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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBEcml2ZXIgaW5pdC9leGl0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1zdGF0aWMgaW50IF9faW5pdCBzZGhjaV9kcnZfaW5pdCh2b2lkKQorc3RhdGljIGludCBfX2luaXQgc2RoY2lfcGx0Zm1fZHJ2X2luaXQodm9pZCkKIHsKLQlyZXR1cm4gcGxhdGZvcm1fZHJpdmVyX3JlZ2lzdGVyKCZzZGhjaV9wbHRmbV9kcml2ZXIpOwotfQorCXByX2luZm8oInNkaGNpLXBsdGZtOiBTREhDSSBwbGF0Zm9ybSBhbmQgT0YgZHJpdmVyIGhlbHBlclxuIik7CiAKLXN0YXRpYyB2b2lkIF9fZXhpdCBzZGhjaV9kcnZfZXhpdCh2b2lkKQorCXJldHVybiAwOworfQorbW9kdWxlX2luaXQoc2RoY2lfcGx0Zm1fZHJ2X2luaXQpOworCitzdGF0aWMgdm9pZCBfX2V4aXQgc2RoY2lfcGx0Zm1fZHJ2X2V4aXQodm9pZCkKIHsKLQlwbGF0Zm9ybV9kcml2ZXJfdW5yZWdpc3Rlcigmc2RoY2lfcGx0Zm1fZHJpdmVyKTsKIH0KK21vZHVsZV9leGl0KHNkaGNpX3BsdGZtX2Rydl9leGl0KTsKIAotbW9kdWxlX2luaXQoc2RoY2lfZHJ2X2luaXQpOwotbW9kdWxlX2V4aXQoc2RoY2lfZHJ2X2V4aXQp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m1tYyksIHVocywgY3RybF8yKTsKLQotCXJldHVybiAwOwotfQotCi1zdGF0aWMgc3RydWN0IHNkaGNpX29wcyBzZGhjaV9weGFfb3BzID0gewotCS5zZXRfdWhzX3NpZ25hbGluZyA9IHNldF91aHNfc2lnbmFsaW5nLAotCS5zZXRfY2xvY2sgPSBzZXRfY2xvY2ssCi19OwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIERldmljZSBwcm9iaW5nL3JlbW92YWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi1cKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyBpbnQgX19kZXZpbml0IHNkaGNpX3B4YV9wcm9iZShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQotewotCXN0cnVjdCBzZGhjaV9weGFfcGxhdGRhdGEgKnBkYXRhID0gcGRldi0+ZGV2LnBsYXRmb3JtX2RhdGE7Ci0Jc3RydWN0IGRldmljZSAqZGV2ID0gJnBkZXYtPmRldjsKLQlzdHJ1Y3Qgc2RoY2lfaG9zdCAqaG9zdCA9IE5VTEw7Ci0Jc3RydWN0IHJlc291cmNlICppb21lbSA9IE5VTEw7Ci0Jc3RydWN0IHNkaGNpX3B4YSAqcHhhID0gTlVMTDsKLQlpbnQgcmV0LCBpcnE7Ci0KLQlpcnEgPSBwbGF0Zm9ybV9nZXRfaXJxKHBkZXYsIDApOwotCWlmICh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dGF0aWMgc3RydWN0IHBsYXRmb3JtX2RyaXZlciBzZGhjaV9weGFfZHJpdmVyID0gewotCS5wcm9iZQkJPSBzZGhjaV9weGFfcHJvYmUsCi0JLnJlbW92ZQkJPSBfX2RldmV4aXRfcChzZGhjaV9weGFfcmVtb3ZlKSwKLQkuc3VzcGVuZAk9IHNkaGNpX3B4YV9zdXNwZW5kLAotCS5yZXN1bWUJCT0gc2RoY2lfcHhhX3Jlc3VtZSwKLQkuZHJpdmVyCQk9IHsKLQkJLm5hbWUJPSBEUklWRVJfTkFNRSwKLQkJLm93bmVyCT0gVEhJU19NT0RVTEUsCi0JfSwKLX07Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRHJpdmVyIGluaXQvZXhpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLVwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGludCBfX2luaXQgc2RoY2lfcHhhX2luaXQodm9pZCkKLXsKLQlyZXR1cm4gcGxhdGZvcm1fZHJpdmVyX3JlZ2lzdGVyKCZzZGhjaV9weGFfZHJpdmVyKTsKLX0KLQotc3RhdGljIHZvaWQgX19leGl0IHNkaGNpX3B4YV9leGl0KHZvaWQpCi17Ci0JcGxhdGZvcm1fZHJpdmVyX3VucmVnaXN0ZXIoJnNkaGNpX3B4YV9kcml2ZXIpOwotfQotCi1tb2R1bGVfaW5pdChzZG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2ludGVyIHRvIE1BQyBhZGRyZXNzCisgKi8KK3N0YXRpYyBpbmxpbmUgdm9pZCBibngyeF9zZXRfZndfbWFjX2FkZHIodTE2ICpmd19oaSwgdTE2ICpmd19taWQsIHUxNiAqZndfbG8sCisJCQkJCSB1OCAqbWFjKQoreworCSgodTggKilmd19oaSlbMF0gID0gbWFjWzFdOworCSgodTggKilmd19oaSlbMV0gID0gbWFjWzBdOworCSgodTggKilmd19taWQpWzBdID0gbWFjWzNdOworCSgodTggKilmd19taWQpWzFdID0gbWFjWzJdOworCSgodTggKilmd19sbylbMF0gID0gbWFjWzVdOworCSgodTggKilmd19sbylbMV0gID0gbWFjWzRdOworfQorCiBzdGF0aWMgaW5saW5lIHZvaWQgYm54MnhfZnJlZV9yeF9zZ2VfcmFuZ2Uoc3RydWN0IGJueDJ4ICpicCwKIAkJCQkJICAgc3RydWN0IGJueDJ4X2Zhc3RwYXRoICpmcCwgaW50IGxhc3QpCiB7CkBAIC04OTUsNTcgKzEwMjgsNTggQEAKIAlpbnQgaTsKIAogCWZvciAoaSA9IDA7IGkgPCBsYXN0OyBpKyspIHsKLQkJc3RydWN0IHN3X3J4X2JkICpyeF9idWYgPSAmKGZwLT50cGFfcG9vbFtpXSk7Ci0JCXN0cnVjdCBza19idWZmICpza2IgPSByeF9idWYtPnNrYjsKKwkJc3RydWN0IGJueDJ4X2FnZ19pbmZvICp0cGFfaW5mbyA9ICZmcC0+dHBhX2luZm9baV07CisJCXN0cnVjdCBzd19yeF9iZCAqZmlyc3RfYnVmID0gJnRwYV9pbmZvLT5maXJzdF9idWY7CisJCXN0cnVjdCBza19idWZmICpza2IgPSBmaXJzdF9idWYtPnNrYjsKIAogCQlpZiAoc2tiID09IE5VTEwpIHsKIAkJCURQKE5FVElGX01TR19JRkRPV04sICJ0cGEgYmluICVkIGVtcHR5IG9uIGZyZWVcbiIsIGkpOwogCQkJY29udGludWU7CiAJCX0KLQotCQlpZiAoZnAtPnRwYV9zdGF0ZVtpXSA9P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JYX0ZXX0RFRlNfSCAqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvYm54MngvYm54MnhfaHNpLmggYi9kcml2ZXJzL25ldC9ibngyeC9ibngyeF9oc2kuaAppbmRleCBjZGYxOWZlLi4wNjcyN2YzIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC9ibngyeC9ibngyeF9oc2kuaAorKysgYi9kcml2ZXJzL25ldC9ibngyeC9ibngyeF9oc2kuaApAQCAtMTEsNyArMTEsNyBAQAogCiAjaW5jbHVkZSAiYm54MnhfZndfZGVmcy5oIgogCi0jZGVmaW5lIEZXX0VOQ09ERV8zMkJJVF9QQVRURVJOCQkweDFlMWUxZTFlCisjZGVmaW5lIEZXX0VOQ09ERV8zMkJJVF9QQVRURVJOICAgICAgICAgMHgxZTFlMWUxZQogCiBzdHJ1Y3QgbGljZW5zZV9rZXkgewogCXUzMiByZXNlcnZlZFs2XTsKQEAgLTMzLDIwMSArMzMsMzY2IEBACiAJdTMyIHJlc2VydmVkX2JbNF07CiB9OwogCi0jZGVmaW5lIFBPUlRfMAkJCQkwCi0jZGVmaW5lIFBPUlRfMQkJCQkxCi0jZGVmaW5lIFBPUlRfTUFYCQkJMgorCisjZGVmaW5lIFBPUlRfMCAgICAgICAgICAgICAgMAorI2RlZmluZSBQT1JUXzEgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUE9SVF9NQVggICAgICAgICAgICAyCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBTaGFyZWQgSFcgY29uZmlndXJhdGlvbgkJCQkJCSAgICAqCisgKiBTaGFyZWQgSFcgY29uZmlndXJhdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdHJ1Y3Qgc2hhcmVkX2h3X2NmZyB7CQkJCQkgLyogTlZSQU0gT2Zmc2V0ICovCisjZGVmaW5lIFBJTl9DRkdfTkEgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAKKyNkZWZpbmUgUElOX0NGR19HUElPMF9QMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBQSU5fQ0ZHX0dQSU8xX1AwICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIFBJTl9DRkdfR1BJTzJfUDAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDMKKyNkZWZpbmUgUElOX0NGR19HUElPM19QMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNAorI2RlZmluZSBQSU5fQ0ZHX0dQSU8wX1AxICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA1CisjZGVmaW5lIFBJTl9DRkdfR1BJTzFfUDEgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDYKKyNkZWZpbmUgUElOX0NGR19HUElPMl9QMSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNworI2RlZmluZSBQSU5fQ0ZHX0dQSU8zX1AxICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA4CisjZGVmaW5lIFBJTl9DRkdfRVBJTzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDkKKyNkZWZpbmUgUElOX0NGR19FUElPMSAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwYQorI2RlZmluZSBQSU5fQ0ZHX0VQSU8yICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBiCisjZGVmaW5lIFBJTl9DRkdfRVBJTzMgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGMKKyNkZWZpbmUgUElOX0NGR19FUElPNCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwZAorI2RlZmluZSBQSU5fQ0ZHX0VQSU81ICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBlCisjZGVmaW5lIFBJTl9DRkdfRVBJTzYgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGYKKyNkZWZpbmUgUElOX0NGR19FUElPNyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMAorI2RlZmluZSBQSU5fQ0ZHX0VQSU84ICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDExCisjZGVmaW5lIFBJTl9DRkdfRVBJTzkgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTIKKyNkZWZpbmUgUElOX0NGR19FUElPMTAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMworI2RlZmluZSBQSU5fQ0ZHX0VQSU8xMSAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDE0CisjZGVmaW5lIFBJTl9DRkdfRVBJTzEyICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTUKKyNkZWZpbmUgUElOX0NGR19FUElPMTMgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxNgorI2RlZmluZSBQSU5fQ0ZHX0VQSU8xNCAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDE3CisjZGVmaW5lIFBJTl9DRkdfRVBJTzE1ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTgKKyNkZWZpbmUgUElOX0NGR19FUElPMTYgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxOQorI2RlZmluZSBQSU5fQ0ZHX0VQSU8xNyAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDFhCisjZGVmaW5lIFBJTl9DRkdfRVBJTzE4ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMWIKKyNkZWZpbmUgUElOX0NGR19FUElPMTkgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxYworI2RlZmluZSBQSU5fQ0ZHX0VQSU8yMCAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDFkCisjZGVmaW5lIFBJTl9DRkdfRVBJTzIxICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMWUKKyNkZWZpbmUgUElOX0NGR19FUElPMjIgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxZgorI2RlZmluZSBQSU5fQ0ZHX0VQSU8yMyAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDIwCisjZGVmaW5lIFBJTl9DRkdfRVBJTzI0ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMjEKKyNkZWZpbmUgUElOX0NGR19FUElPMjUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyMgorI2RlZmluZSBQSU5fQ0ZHX0VQSU8yNiAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDIzCisjZGVmaW5lIFBJTl9DRkdfRVBJTzI3ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMjQKKyNkZWZpbmUgUElOX0NGR19FUElPMjggICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyNQorI2RlZmluZSBQSU5fQ0ZHX0VQSU8yOSAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDI2CisjZGVmaW5lIFBJTl9DRkdfRVBJTzMwICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMjcKKyNkZWZpbmUgUElOX0NGR19FUElPMzEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyOAorCisvKiBFUElPIGRlZmluaXRpb24gKi8KKyNkZWZpbmUgRVBJT19DRkdfTkEgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMAorI2RlZmluZSBFUElPX0NGR19FUElPMCAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8xICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzIgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMworI2RlZmluZSBFUElPX0NGR19FUElPMyAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA0CisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU80ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDUKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNgorI2RlZmluZSBFUElPX0NGR19FUElPNiAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA3CisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU83ICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDgKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzggICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwOQorI2RlZmluZSBFUElPX0NGR19FUElPOSAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBhCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8xMCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGIKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzExICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwYworI2RlZmluZSBFUElPX0NGR19FUElPMTIgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBkCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8xMyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGUKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzE0ICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwZgorI2RlZmluZSBFUElPX0NGR19FUElPMTUgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEwCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8xNiAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTEKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzE3ICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMgorI2RlZmluZSBFUElPX0NGR19FUElPMTggICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEzCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8xOSAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTQKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzIwICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxNQorI2RlZmluZSBFUElPX0NGR19FUElPMjEgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDE2CisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8yMiAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTcKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzIzICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxOAorI2RlZmluZSBFUElPX0NGR19FUElPMjQgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDE5CisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8yNSAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMWEKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzI2ICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxYgorI2RlZmluZSBFUElPX0NGR19FUElPMjcgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDFjCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8yOCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMWQKKyNkZWZpbmUgRVBJT19DRkdfRVBJTzI5ICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxZQorI2RlZmluZSBFUElPX0NGR19FUElPMzAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDFmCisjZGVmaW5lIEVQSU9fQ0ZHX0VQSU8zMSAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMjAKKworCitzdHJ1Y3Qgc2hhcmVkX2h3X2NmZyB7CQkJIC8qIE5WUkFNIE9mZnNldCAqLwogCS8qIFVwIHRvIDE2IGJ5dGVzIG9mIE5VTEwtdGVybWluYXRlZCBzdHJpbmcgKi8KLQl1OCAgcGFydF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kdfRTNfUE9SVF9MQVlPVVRfTUFTSyAgICAgICAgICAgMHgwRjAwMDAwMAorCQkjZGVmaW5lIFNIQVJFRF9IV19DRkdfRTNfUE9SVF9MQVlPVVRfU0hJRlQgICAgICAgICAgIDI0CisJCSNkZWZpbmUgU0hBUkVEX0hXX0NGR19FM19QT1JUX0xBWU9VVF8yUF8wMSAgICAgICAgICAgMHgwMDAwMDAwMAorCQkjZGVmaW5lIFNIQVJFRF9IV19DRkdfRTNfUE9SVF9MQVlPVVRfMlBfMTAgICAgICAgICAgIDB4MDEwMDAwMDAKKwkJI2RlZmluZSBTSEFSRURfSFdfQ0ZHX0UzX1BPUlRfTEFZT1VUXzRQXzAxMjMgICAgICAgICAweDAyMDAwMDAwCisJCSNkZWZpbmUgU0hBUkVEX0hXX0NGR19FM19QT1JUX0xBWU9VVF80UF8xMDMyICAgICAgICAgMHgwMzAwMDAwMAorCQkjZGVmaW5lIFNIQVJFRF9IV19DRkdfRTNfUE9SVF9MQVlPVVRfNFBfMjMwMSAgICAgICAgIDB4MDQwMDAwMDAKKwkJI2RlZmluZSBTSEFSRURfSFdfQ0ZHX0UzX1BPUlRfTEFZT1VUXzRQXzMyMTAgICAgICAgICAweDA1MDAwMDAwCiB9OwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQb3J0IEhXIGNvbmZpZ3VyYXRpb24JCQkJCQkgICAgKgorICogUG9ydCBIVyBjb25maWd1cmF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0IHBvcnRfaHdfY2ZnIHsJCQkgICAgLyogcG9ydCAwOiAweDEyYyAgcG9ydCAxOiAweDJiYyAqLworc3RydWN0IHB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T0RFX1NXSVRDSF9JTkRFUFQgIDB4MDAwMDAzMDAKKworCS8qIFRoZSBpbnRlcnZhbCBpbiBzZWNvbmRzIGJldHdlZW4gc2VuZGluZyBMTERQIHBhY2tldHMuIFNldCB0byB6ZXJvCisJICAgdG8gZGlzYWJsZSB0aGUgZmVhdHVyZSAqLworCSNkZWZpbmUgU0hBUkVEX0ZFQVRfQ0ZHX0xMRFBfWE1JVF9JTlRFUlZBTF9NQVNLICAgICAweDAwZmYwMDAwCisJI2RlZmluZSBTSEFSRURfRkVBVF9DRkdfTExEUF9YTUlUX0lOVEVSVkFMX1NISUZUICAgICAgICAgICAgIDE2CisKKwkvKiBUaGUgYXNzaWduZWQgZGV2aWNlIHR5cGUgSUQgZm9yIExMRFAgdXNhZ2UgKi8KKwkjZGVmaW5lIFNIQVJFRF9GRUFUX0NGR19MTERQX0RFVklDRV9UWVBFX0lEX01BU0sgICAgMHhmZjAwMDAwMAorCSNkZWZpbmUgU0hBUkVEX0ZFQVRfQ0ZHX0xMRFBfREVWSUNFX1RZUEVfSURfU0hJRlQgICAgICAgICAgICAyNAogCiB9OwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQb3J0IEZlYXR1cmUgY29uZmlndXJhdGlvbgkJCQkJCSAgICAqCisgKiBQb3J0IEZlYXR1cmUgY29uZmlndXJhdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdHJ1Y3QgcG9ydF9mZWF0X2NmZyB7CQkJICAgIC8qIHBvcnQgMDogMHg0NTQgIHBvcnQgMTogMHg0YzggKi8KK3N0cnVjdCBwb3J0X2ZlYXRfY2ZnIHsJCSAgICAvKiBwb3J0IDA6IDB4NDU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bmZpZyAqLwotCXUzMiBsaW5rX2NvbmZpZzI7CQkJCQkvKiAweDQ3QyAqLworCSAgIHVzZXMgdGhlIHNhbWUgZGVmaW5lcyBhcyBsaW5rX2NvbmZpZyAqLworCXUzMiBsaW5rX2NvbmZpZzI7CQkJCSAgICAvKiAweDQ3QyAqLwogCiAJLyogVGhlIGRlZmF1bHQgZm9yIE1DUCBvZiB0aGUgc2Vjb25kIGV4dGVybmFsIHBoeSwKLQl1c2VzIHRoZSBzYW1lIGRlZmluZXMgYXMgbGlua19jb25maWcgKi8KLQl1MzIgbWZ3X3dvbF9saW5rX2NmZzI7CQkJCS8qIDB4NDgwICovCisJICAgdXNlcyB0aGUgc2FtZSBkZWZpbmVzIGFzIGxpbmtfY29uZmlnICovCisJdTMyIG1md193b2xfbGlua19jZmcyOwkJCQkgICAgLyogMHg0ODAgKi8KIAotCXUzMiBSZXNlcnZlZDJbMTddOwkJCQkJLyogMHg0ODQgKi8KKwl1MzIgUmVzZXJ2ZWQyWzE3XTsJCQkJICAgIC8qIDB4NDg0ICovCiAKIH07CiAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIERldmljZSBJbmZvcm1hdGlvbgkJCQkJCQkgICAgKgorICogRGV2aWNlIEluZm9ybWF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0IHNobV9kZXZfaW5mbyB7CQkJCQkJICAgIC8qIHNpemUgKi8KK3N0cnVjdCBzaG1fZGV2X2luZm8gewkJCQkvKiBzaXplICovCiAKIAl1MzIgICAgYmNfcmV2OyAvKiA4IGJpdHMgZWFjaDogbWFqb3IsIG1pbm9yLCBidWlsZCAqLwkgICAgICAgLyog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GggKi8KKyNpZiAhZGVmaW5lZChfX0xJVFRMRV9FTkRJQU4pICYmICFkZWZpbmVkKF9fQklHX0VORElBTikKKwkjZXJyb3IgIk1pc3NpbmcgZWl0aGVyIExJVFRMRV9FTkRJQU4gb3IgQklHX0VORElBTiBkZWZpbml0aW9uLiIKKyNlbmRpZgogCi0jZGVmaW5lIFZOXzAJCQkJMAotI2RlZmluZSBWTl8xCQkJCTEKLSNkZWZpbmUgVk5fMgkJCQkyCi0jZGVmaW5lIFZOXzMJCQkJMwotI2RlZmluZSBFMVZOX01BWAkJCTEKLSNkZWZpbmUgRTFIVk5fTUFYCQkJNAorI2RlZmluZSBGVU5DXzAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRlVOQ18xICAgICAgICAgICAgICAxCisjZGVmaW5lIEZVTkNfMiAgICAgICAgICAgICAgMgorI2RlZmluZSBGVU5DXzMgICAgICAgICAgICAgIDMKKyNkZWZpbmUgRlVOQ180ICAgICAgICAgICAgICA0CisjZGVmaW5lIEZVTkNfNSAgICAgICAgICAgICAgNQorI2RlZmluZSBGVU5DXzYgICAgICAgICAgICAgIDYKKyNkZWZpbmUgRlVOQ183ICAgICAgICAgICAgICA3CisjZGVmaW5lIEUxX0ZVTkNfTUFYICAgICAgICAgMgorI2RlZmluZSBFMUhfRlVOQ19NQVggICAgICAgICAgICA4CisjZGVmaW5lIEUyX0ZVTkNfTUFYICAgICAgICAgNCAgIC8qIHBlciBwYXRoICovCiAKLSNkZWZpbmUgRTJfVkZfTUFYCQkJNjQKKyNkZWZpbmUgVk5fMCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZOXzEgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWTl8yICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVk5fMyAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEUxVk5fTUFYICAgICAgICAgICAgMQorI2RlZmluZSBFMUhWTl9NQVggICAgICAgICAgIDQKKworI2RlZmluZSBFMl9WRl9NQVggIC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0xMCShGV19BQ0tfVElNRV9PVVRfTVMvRldfQUNLX1BPTExfVElNRV9NUykKKyNkZWZpbmUgRldfQUNLX05VTV9PRl9QT0xMICAoRldfQUNLX1RJTUVfT1VUX01TL0ZXX0FDS19QT0xMX1RJTUVfTVMpCiAKIC8qIExFRCBCbGluayByYXRlIHRoYXQgd2lsbCBhY2hpZXZlIH4xNS45SHogKi8KLSNkZWZpbmUgTEVEX0JMSU5LX1JBVEVfVkFMCQk0ODAKKyNkZWZpbmUgTEVEX0JMSU5LX1JBVEVfVkFMICAgICAgNDgwCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBEcml2ZXIgPC0+IEZXIE1haWxib3gJCQkJCQkgICAgKgorICogRHJpdmVyIDwtPiBGVyBNYWlsYm94ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RydWN0IGRydl9wb3J0X21iIHsKIAogCXUzMiBsaW5rX3N0YXR1czsKIAkvKiBEcml2ZXIgc2hvdWxkIHVwZGF0ZSB0aGlzIGZpZWxkIG9uIGFueSBsaW5rIGNoYW5nZSBldmVudCAqLwogCi0jZGVmaW5lIExJTktfU1RBVFVTX0xJTktfRkxBR19NQVNLCQkJMHgwMDAwMDAwMQotI2RlZmluZSBMSU5LX1NUQVRVU19MSU5LX1VQCQkJCTB4MDAwMDAwMDEKLSNkZWZpbmUgTElOS19TVEFUVVNfU1BFRURfQU5EX0RVUExFWF9NQVNLCQkweDAwMDAwMDFFCi0jZGVmaW5lIExJTktfU1RBVFVTX1NQRUVEX0FORF9EVVBMRVhfQU5fTk9UX0NPTVBMRVRFCSgwPDwxKQotI2RlZmluZSBMSU5LX1NUQVRVU19TUEVFRF9BTk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MkJfUFJBTQkJCTB4OTAwMDAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAweGZmZmYwMDAwCisJI2RlZmluZSBEUlZfTVNHX0NPREVfTE9BRF9SRVEgICAgICAgICAgICAgICAgICAgMHgxMDAwMDAwMAorCSNkZWZpbmUgRFJWX01TR19DT0RFX0xPQURfRE9ORSAgICAgICAgICAgICAgICAgIDB4MTEwMDAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9VTkxPQURfUkVRX1dPTF9FTiAgICAgICAgICAweDIwMDAwMDAwCisJI2RlZmluZSBEUlZfTVNHX0NPREVfVU5MT0FEX1JFUV9XT0xfRElTICAgICAgICAgMHgyMDAxMDAwMAorCSNkZWZpbmUgRFJWX01TR19DT0RFX1VOTE9BRF9SRVFfV09MX01DUCAgICAgICAgIDB4MjAwMjAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9VTkxPQURfRE9ORSAgICAgICAgICAgICAgICAweDIxMDAwMDAwCisJI2RlZmluZSBEUlZfTVNHX0NPREVfRENDX09LICAgICAgICAgICAgICAgICAgICAgMHgzMDAwMDAwMAorCSNkZWZpbmUgRFJWX01TR19DT0RFX0RDQ19GQUlMVVJFICAgICAgICAgICAgICAgIDB4MzEwMDAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9ESUFHX0VOVEVSX1JFUSAgICAgICAgICAgICAweDUwMDAwMDAwCisJI2RlZmluZSBEUlZfTVNHX0NPREVfRElBR19FWElUX1JFUSAgICAgICAgICAgICAgMHg2MDAwMDAwMAorCSNkZWZpbmUgRFJWX01TR19DT0RFX1ZBTElEQVRFX0tFWSAgICAgICAgICAgICAgIDB4NzAwMDAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9HRVRfQ1VSUl9LRVkgICAgICAgICAgICAgICAweDgwMDAwMDAwCisJI2RlZmluZSBEUlZfTVNHX0NPREVfR0VUX1VQR1JBREVfS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otI2RlZmluZSBEUlZfTVNHX1NFUV9OVU1CRVJfTUFTSyAJCQkweDAwMDBmZmZmCisJI2RlZmluZSBEUlZfTVNHX0NPREVfVkZfRElTQUJMRURfRE9ORSAgICAgICAgICAgMHhjMDAwMDAwMAorCisJI2RlZmluZSBEUlZfTVNHX0NPREVfU0VUX01GX0JXICAgICAgICAgICAgICAgICAgMHhlMDAwMDAwMAorCSNkZWZpbmUgUkVRX0JDX1ZFUl80X1NFVF9NRl9CVyAgICAgICAgICAgICAgICAgIDB4MDAwNjAyMDIKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9TRVRfTUZfQldfQUNLICAgICAgICAgICAgICAweGUxMDAwMDAwCisKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9MSU5LX1NUQVRVU19DSEFOR0VEICAgICAgICAweDAxMDAwMDAwCisKKwkjZGVmaW5lIEJJT1NfTVNHX0NPREVfTElDX0NIQUxMRU5HRSAgICAgICAgICAgICAweGZmMDEwMDAwCisJI2RlZmluZSBCSU9TX01TR19DT0RFX0xJQ19SRVNQT05TRSAgICAgICAgICAgICAgMHhmZjAyMDAwMAorCSNkZWZpbmUgQklPU19NU0dfQ09ERV9WSVJUX01BQ19QUklNICAgICAgICAgICAgIDB4ZmYwMzAwMDAKKwkjZGVmaW5lIEJJT1NfTVNHX0NPREVfVklSVF9NQUNfSVNDU0kgICAgICAgICAgICAweGZmMDQwMDAwCisKKwkjZGVmaW5lIERSVl9NU0dfU0VRX05VTUJFUl9NQVNLICAgICAgICAgICAgICAgICAweDAwMDBmZmZmCiAKIAl1MzIgZHJ2X21iX3BhcmFtOworCSNkZWZpbmUgRFJWX01TR19DT0RFX1NFVF9NRl9CV19NSU5fTUFTSyAgICAgICAgIDB4MDBmZjAwMDAKKwkjZGVmaW5lIERSVl9NU0dfQ09ERV9TRVRfTUZfQldfTUFYX01BU0sgICAgICAgICAweGZmMDAwMDAwCiAKIAl1MzIgZndfbWJfaGVhZGVyOwotI2RlZmluZSBGV19NU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yMDAwMAorCSNkZWZpbmUgRldfTVNHX0NPREVfRFJWX1VOTE9BRF9ET05FICAgICAgICAgICAgIDB4MjExMDAwMDAKKwkjZGVmaW5lIEZXX01TR19DT0RFX0RDQ19ET05FICAgICAgICAgICAgICAgICAgICAweDMwMTAwMDAwCisJI2RlZmluZSBGV19NU0dfQ09ERV9MTERQX0RPTkUgICAgICAgICAgICAgICAgICAgMHg0MDEwMDAwMAorCSNkZWZpbmUgRldfTVNHX0NPREVfRElBR19FTlRFUl9ET05FICAgICAgICAgICAgIDB4NTAxMDAwMDAKKwkjZGVmaW5lIEZXX01TR19DT0RFX0RJQUdfUkVGVVNFICAgICAgICAgICAgICAgICAweDUwMjAwMDAwCisJI2RlZmluZSBGV19NU0dfQ09ERV9ESUFHX0VYSVRfRE9ORSAgICAgICAgICAgICAgMHg2MDEwMDAwMAorCSNkZWZpbmUgRldfTVNHX0NPREVfVkFMSURBVEVfS0VZX1NVQ0NFU1MgICAgICAgIDB4NzAxMDAwMDAKKwkjZGVmaW5lIEZXX01TR19DT0RFX1ZBTElEQVRFX0tFWV9GQUlMVVJFICAgICAgICAweDcwMjAwMDAwCisJI2RlZmluZSBGV19NU0dfQ09ERV9HRVRfS0VZX0RPTkUgICAgICAgICAgICAgICAgMHg4MDEwMDAwMAorCSNkZWZpbmUgRldfTVNHX0NPREVfTk9fS0VZICAgICAgICAgICAgICAgICAgICAgIDB4ODBmMDAwMDAKKwkjZGVmaW5lIEZXX01TR19DT0RFX0xJQ19JTkZPX05PVF9SRUFEWSAgICAgICAgICAweDgwZjgwMDAwCisJI2RlZmluZSBGV19NU0dfQ09ERV9MMkJfUFJBTV9MT0FERUQgICAgICAgICAgICAgMHg5MDEwMDAwMAorCSNkZWZpbmUgRldfTVNHX0NPREVfTDJCX1BSQU1fVF9MT0FEX0ZBSUxVUkUgICAgIDB4OTAyMTAwMDAKKwkjZGVmaW5lIEZXX01TR19DT0RFX0wyQl9QUkFNX0NfTE9BRF9GQUlMVVJFICAgIC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DQ19CQU5EV0lEVEhfQUxMT0NBVElPTiAgICAgMHgwMDAwMDIwMAorCSNkZWZpbmUgRFJWX1NUQVRVU19EQ0NfQ0hBTkdFX01BQ19BRERSRVNTICAgICAgIDB4MDAwMDA0MDAKKwkjZGVmaW5lIERSVl9TVEFUVVNfRENDX1JFU0VSVkVEMSAgICAgICAgICAgICAgICAweDAwMDAwODAwCisJI2RlZmluZSBEUlZfU1RBVFVTX0RDQ19TRVRfUFJPVE9DT0wgICAgICAgICAgICAgMHgwMDAwMTAwMAorCSNkZWZpbmUgRFJWX1NUQVRVU19EQ0NfU0VUX1BSSU9SSVRZICAgICAgICAgICAgIDB4MDAwMDIwMDAKKworCSNkZWZpbmUgRFJWX1NUQVRVU19EQ0JYX0VWRU5UX01BU0sgICAgICAgICAgICAgIDB4MDAwZjAwMDAKKwkjZGVmaW5lIERSVl9TVEFUVVNfRENCWF9ORUdPVElBVElPTl9SRVNVTFRTICAgICAweDAwMDEwMDAwCiAKIAl1MzIgdmlydF9tYWNfdXBwZXI7Ci0jZGVmaW5lIFZJUlRfTUFDX1NJR05fTUFTSwkJCQkweGZmZmYwMDAwCi0jZGVmaW5lIFZJUlRfTUFDX1NJR05BVFVSRQkJCQkweDU2NGQwMDAwCisJI2RlZmluZSBWSVJUX01BQ19TSUdOX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHhmZmZmMDAwMAorCSNkZWZpbmUgVklSVF9NQUNfU0lHTkFUVVJFICAgICAgICAgICAgICAgICAgICAgIDB4NTY0ZDAwMDAKIAl1MzIgdmlydF9tYWNfbG93ZXI7CiAKIH07CiAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIE1hbmFnZW1lbnQgZmlybXdhcmUgc3RhdGUJCQkJCQkgICAgKgorICogTWFuYWdlbWVudCBmaXJtd2FyZSBzdGF0ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogQWxsb2NhdGUgNDQwIGJ5dGVzIGZvciBtYW5hZ2VtZW50IGZpcm13YXJlICovCi0jZGVmaW5lIE1HTVRGV19TVEFURV9XT1JEX1NJWkUJCQkJICAgIDExMAorI2RlZmluZSBNR01URldfU1RBVEVfV09SRF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAxMTAKIAogc3RydWN0IG1nbXRmd19zdGF0ZSB7CiAJdTMyIG9wYXF1ZVtNR01URldfU1RBVEVfV09SRF9TSVpFXTsKQEAgLTEwMjYsMjUgKzEzNzcsMjUgQEAKIAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogTXVsdGktRnVuY3Rpb24gY29uZmlndXJhdGlvbiAJCQkJCSAgICAqCisgKiBNdWx0aS1GdW5jdGlvbiBjb25maWd1cmF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdHJ1Y3Qgc2hhcmVkX21mX2NmZyB7CiAKIAl1MzIgY2xwX21iOwotI2RlZmluZSBTSEFSRURfTUZfQ0xQX1NFVF9ERUZBVUxUCQkgICAgMHgwMDAwMDAwMAorCSNkZWZpbmUgU0hBUkVEX01GX0NMUF9TRVRfREVGQVVMVCAgICAgICAgICAgICAgIDB4MDAwMDAwMDAKIAkvKiBzZXQgYnkgQ0xQICovCi0jZGVmaW5lIFNIQVJFRF9NRl9DTFBfRVhJVAkJCSAgICAweDAwMDAwMDAxCisJI2RlZmluZSBTSEFSRURfTUZfQ0xQX0VYSVQgICAgICAgICAgICAgICA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iAweDQgKi8KKwlzdHJ1Y3QgcG9ydF9tZl9jZmcgIHBvcnRfbWZfY29uZmlnW1BPUlRfTUFYXTsgICAvKiAweDEwICogMiA9IDB4MjAgKi8KKwkvKiBmb3IgYWxsIGNoaXBzLCB0aGVyZSBhcmUgOCBtZiBmdW5jdGlvbnMgKi8KKwlzdHJ1Y3QgZnVuY19tZl9jZmcgIGZ1bmNfbWZfY29uZmlnW0UxSF9GVU5DX01BWF07IC8qIDB4MTggKiA4ID0gMHhjMCAqLworCS8qCisJICogRXh0ZW5kZWQgY29uZmlndXJhdGlvbiBwZXIgZnVuY3Rpb24gIC0gdGhpcyBhcnJheSBkb2VzIG5vdCBleGlzdCBhbmQKKwkgKiBzaG91bGQgbm90IGJlIGFjY2Vzc2VkIG9uIDU3NzExCisJICovCisJc3RydWN0IGZ1bmNfZXh0X2NmZyBmdW5jX2V4dF9jb25maWdbRTFIX0ZVTkNfTUFYXTsgLyogMHgyOCAqIDggPSAweDE0MCovCit9OyAvKiAweDIyNCAqLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogU2hhcmVkIE1lbW9yeSBSZWdpb24gCQkJCQkJICAgICoKKyAqIFNoYXJlZCBNZW1vcnkgUmVnaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBzaG1lbV9yZWdpb24gewkJCSAgICAgICAvKiAgIFNoYXJlZE1lbSBPZmZzZXQgKHNpemUpICovCitzdHJ1Y3Qgc2htZW1fcmVnaW9uIHsJCSAgICAgICAvKiAgIFNoYXJlZE1lbSBPZmZzZXQgKHNpemUpICovCiAKLQl1MzIJCQl2YWxpZGl0eV9tYXBbUE9SVF9NQVhdOy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IAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFNoYXJlZCBNZW1vcnkgMiBSZWdpb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIFRoZSBmd19mbHJfYWNrIGlzIGFjdHVhbGx5IGJ1aWx0IGluIHRoZSBmb2xsb3dpbmcgd2F5OiAgICAgICAgICAgICAgICAgICAqLworLyogOCBiaXQ6ICBQRiBhY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA2NCBiaXQ6IFZGIGFjayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIDggYml0OiAgaW9zX2Rpc19hY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogSW4gb3JkZXIgdG8gbWFpbnRhaW4gZW5kaWFuaXR5IGluIHRoZSBtYWlsYm94IGhzaSwgd2Ugd2FudCB0byBrZWVwIHVzaW5nICovCisvKiB1MzIuIFRoZSBmdyBtdXN0IGhhdmUgdGhlIFZGIHJpZ2h0IGFmdGVyIHRoZSBQRiBzaW5jZSB0aGlzIGlzIGhvdyBpdCAgICAgKi8KKy8qIGFjY2VzcyBhcnJheXMoaXQgZXhwZWN0cyBhbHdheXMgdGhlIFZGIHRvIHJlc2lkZSBhZnRlciB0aGUgUEYsIGFuZCB0aGF0ICAqLworLyogbWFrZXMgdGhlIGNhbGN1bGF0aW9uIG11Y2ggZWFzaWVyIGZvciBpdC4gKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBJbiBvcmRlciB0by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gICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgfAorICogICAwICAgIHwgICAxICAgfCAgIDIgICAgfCAgIDMgICB8ICAgNCAgICB8ICAgNSAgIHwgICA2ICAgfCAgIDcgICB8CisgKiAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgIHwKICAqCiAgKiBTSE1FTV9BUlJBWV9CSVRQT1MoaSwgNCwgOCkgZGVmaW5lcyBhIGZsaXAgb3JkZXJpbmcgcGVyIGJ5dGU6CiAgKgotICoJCXwJCXwJCXwJCXwKLSAqICAgMQl8ICAgMAl8ICAgMwl8ICAgMgl8ICAgNQl8ICAgNAl8ICAgNwl8ICAgNgl8Ci0gKgkJfAkJfAkJfAkJfAorICogICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICB8CisgKiAgIDEgICB8ICAgMCAgICB8ICAgMyAgICB8ICAgMiAgIHwgICA1ICAgIHwgICA0ICAgfCAgIDcgICB8ICAgNiAgIHwKKyAqICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgfAogICoKICAqIFNITUVNX0FSUkFZX0JJVFBPUyhpLCA0LCAxNikgZGVmaW5lcyBhIGZsaXAgb3JkZXJpbmcgcGVyIHdvcmQ6CiAgKgotICoJCXwJCXwJCXwJCXwKLSAqICAgMwl8ICAgMgl8ICAgMQl8ICAgMAl8ICAgNwl8ICAgNgl8ICAgNQl8ICAgNAl8Ci0gKgkJfAkJfAkJfAkJfAorICogICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICB8CisgKiAgIDMgICB8ICAgMiAgICB8ICAgMSAgIHwgICAwICAgIHwgICA3ICAgfCAgIDYgICAgfCAgIDUgICB8ICAg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TU9OLAorCVBIQVNFX1BPUlQwLAorCVBIQVNFX1BPUlQxLAorCVBIQVNFX1BGMCwKKwlQSEFTRV9QRjEsCisJUEhBU0VfUEYyLAorCVBIQVNFX1BGMywKKwlQSEFTRV9QRjQsCisJUEhBU0VfUEY1LAorCVBIQVNFX1BGNiwKKwlQSEFTRV9QRjcsCisJTlVNX09GX0lOSVRfUEhBU0VTCit9OworCisvKiBJbml0IE1vZGVzICovCitlbnVtIHsKKwlNT0RFX0FTSUMgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAwMDAxLAorCU1PREVfRlBHQSAgICAgICAgICAgICAgICAgICAgICA9IDB4MDAwMDAwMDIsCisJTU9ERV9FTVVMICAgICAgICAgICAgICAgICAgICAgID0gMHgwMDAwMDAwNCwKKwlNT0RFX0UyICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAwMDA4LAorCU1PREVfRTMgICAgICAgICAgICAgICAgICAgICAgICA9IDB4MDAwMDAwMTAsCisJTU9ERV9QT1JUMiAgICAgICAgICAgICAgICAgICAgID0gMHgwMDAwMDAyMCwKKwlNT0RFX1BPUlQ0ICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAwMDQwLAorCU1PREVfU0YgICAgICAgICAgICAgICAgICAgICAgICA9IDB4MDAwMDAwODAsCisJTU9ERV9NRiAgICAgICAgICAgICAgICAgICAgICAgID0gMHgwMDAwMDEwMCwKKwlNT0RFX01GX1NEICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAwMjAwLAorCU1PREVfTUZfU0kgICAgICAgICAgICAgICAgICAgICA9IDB4MDAwMDA0MDAsCisJTU9ERV9NRl9OSVYgICAgICAgICAgICAgICAgICAgID0gMHgwMDAwMDgwMCwKKwlNT0RFX0UzX0EwICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAxMDAwLAorCU1PREVfRTNfQjAgICAgICAgICAgICAgICAgICAgICA9IDB4MDAwMDIwMDAsCisJTU9ERV9DT1MzICAgICAgICAgICAgICAgICA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lBTCQkoMTM2MCkKKyNkZWZpbmUgRVRTX0UzQjBfTklHX01JTl9XX1ZBTF8yMEdCUFMJCQkoMjcyMCkKKyNkZWZpbmUgRVRTX0UzQjBfUEJGX01JTl9XX1ZBTAkJCQkoMTAwMDApCisKKyNkZWZpbmUgTUFYX1BBQ0tFVF9TSVpFCQkJCQkoOTcwMCkKKyNkZWZpbmUgV0NfVUNfVElNRU9VVAkJCQkJMTAwCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgICAgICAgICAgICAgICBJTlRFUkZBQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTIwMiwxNCArMjk0LDg2IEBACiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKgkJCUVQSU8vR1BJTyBzZWN0aW9uCQkJICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkIGJueDJ4X2dldF9lcGlvKHN0cnVjdCBibngyeCAqYnAsIHUzMiBlcGlvX3BpbiwgdTMyICplbikKK3sKKwl1MzIgZXBpb19tYXNrLCBncF9vZW5hYmxlOworCSplbiA9IDA7CisJLyogU2FuaXR5IGNoZWNrICovCisJaWYgKGVwaW9fcGluID4gMzEpIHsKKwkJRFAoTkVUSUZfTVNHX0xJTkssICJJbnZhbGlkIEVQSU8gcGluICVkIHRvIGdldFxuIiwgZXBpb19waW4pOworCQlyZXR1cm47CisJfQorCisJZXBpb19tYXNrID0gMSA8PCBlcGlvX3BpbjsKKwkvKiBTZXQgdGhpcyBFUElPIHRvIG91dHB1dCAqLworCWdwX29lbmFibGUgPSBSRUdfUkQoY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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoJCQkJRVRTIHNlY3Rpb24JCQkgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCBibngyeF9ldHNfZGlzYWJsZWQoc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMpCitzdGF0aWMgdm9pZCBibngyeF9ldHNfZTJlM2EwX2Rpc2FibGVkKHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zKQogewogCS8qIEVUUyBkaXNhYmxlZCBjb25maWd1cmF0aW9uKi8KIAlzdHJ1Y3QgYm54MnggKmJwID0gcGFyYW1zLT5icDsKIAotCURQKE5FVElGX01TR19MSU5LLCAiRVRTIGRpc2FibGVkIGNvbmZpZ3VyYXRpb25cbiIpOworCURQKE5FVElGX01TR19MSU5LLCAiRVRTIEUyRTMgZGlzYWJsZWQgY29uZmlndXJhdGlvblxuIik7CiAKIAkvKgogCSAqIG1hcHBpbmcgYmV0d2VlbiBlbnRyeSAgcHJpb3JpdHkgdG8gY2xpZW50IG51bWJlciAoMCwxLDIgLWRlYnVnIGFuZApAQCAtMjYyLDcgKzQyNiw3NTYgQEAKIAkvKiBEZWZpbmVzIHRoZSBudW1iZXIgb2YgY29uc2VjdXRpdmUgc2xvdHMgZm9yIHRoZSBzdHJpY3QgcHJpb3JpdHkgKi8KIAlSRUdfV1IoYnAsIFBCRl9SRUdfTlVNX1NUUklDVF9BUkJfU0xPVFMsIDApOwogfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJR2V0dGluZyBtaW5fd192YWwgd2lsbCBiZSBzZXQgYWNjb3JkaW5nIHRvIGxpbmUgc3BlZWQgLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB1MzIgYm54MnhfZXRzX2dldF9taW5fd192YWxfbmlnKGNvbnN0IHN0cnVjdCBsaW5rX3ZhcnMgKnZhcnMpCit7CisJdTMyIG1pbl93X3ZhbCA9IDA7CisJLyogQ2FsY3VsYXRlIG1pbl93X3ZhbC4qLworCWlmICh2YXJzLT5saW5rX3VwKSB7CisJCWlmIChTUEVFRF8yMDAwMCA9PSB2YXJzLT5saW5lX3NwZWVkKQorCQkJbWluX3dfdmFsID0gRVRTX0UzQjBfTklHX01JTl9XX1ZBTF8yMEdCUFM7CisJCWVsc2UKKwkJCW1pbl93X3ZhbCA9IEVUU19FM0IwX05JR19NSU5fV19WQUxfVVBfVE9fMTBHQlBTOworCX0gZWxzZQorCQltaW5fd192YWwgPSBFVFNfRTNCMF9OSUdfTUlOX1dfVkFMXzIwR0JQUzsKKwkvKioKKwkgKiAgSWYgdGhlIGxpbmsgaXNuJ3QgdXAgKHN0YXRpYyBjb25maWd1cmF0aW9uIGZvciBleGFtcGxlICkgVGhlCisJICogIGxpbmsgd2lsbCBiZSBhY2NvcmRpbmcgdG8gMjBHQlBTLgorCSovCisJcmV0dXJuIG1pbl93X3ZhbDsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCUdldHRpbmcgY3JlZGl0IHVwcGVyIGJvdW5kIGZvcm0gbWluX3dfdmFsLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB1MzIgYm54MnhfZXRzX2dldF9jcmVkaXRfdXBwZXJfYm91bmQoY29uc3QgdTMyIG1pbl93X3ZhbCkKK3sKKwljb25zdCB1MzIgY3JlZGl0X3VwcGVyX2JvdW5kID0gKHUzMilNQVhWQUwoKDE1MCAqIG1pbl93X3ZhbCksCisJCQkJCQlNQVhfUEFDS0VUX1NJWkUpOworCXJldHVybiBjcmVkaXRfdXBwZXJfYm91bmQ7Cit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIERlc2NyaXB0aW9uOgorKglTZXQgY3JlZGl0IHVwcGVyIGJvdW5kIGZvciBOSUcuCisqLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgYm54MnhfZXRzX2UzYjBfc2V0X2NyZWRpdF91cHBlcl9ib3VuZF9uaWcoCisJY29uc3Qgc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCisJY29uc3QgdTMyIG1pbl93X3ZhbCkKK3sKKwlzdHJ1Y3QgYm54MnggKmJwID0gcGFyYW1zLT5icDsKKwljb25zdCB1OCBwb3J0ID0gcGFyYW1zLT5wb3J0OworCWNvbnN0IHUzMiBjcmVkaXRfdXBwZXJfYm91bmQgPQorCSAgICBibngyeF9ldHNfZ2V0X2NyZWRpdF91cHBlcl9ib3VuZChtaW5fd192YWwpOwogCisJUkVHX1dSKGJwLCAocG9ydCkgPyBOSUdfUkVHX1AxX1RYX0FSQl9DUkVESVRfVVBQRVJfQk9VTkRfMCA6CisJCU5JR19SRUdfUDBfVFhfQVJCX0NSRURJVF9VUFBFUl9CT1VORF8wLCBjcmVkaXRfdXBwZXJfYm91bmQpOworCVJFR19XUihicCwgKHBvcnQpID8gTklHX1JFR19QMV9UWF9BUkJfQ1JFRElUX1VQUEVSX0JPVU5EXzEgOgorCQkgICBOSUdfUkVHX1AwX1RYX0FSQl9DUkVESVRfVVBQRVJfQk9VTkRfMSwgY3JlZGl0X3VwcGVyX2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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJV2lsbCByZXR1cm4gdGhlIE5JRyBFVFMgcmVnaXN0ZXJzIHRvIGluaXQgdmFsdWVzLkV4Y2VwdAorKgljcmVkaXRfdXBwZXJfYm91bmQuCisqCVRoYXQgaXNuJ3QgdXNlZCBpbiB0aGlzIGNvbmZpZ3VyYXRpb24gKE5vIFdGUSBpcyBlbmFibGVkKSBhbmQgd2lsbCBiZQorKgljb25maWd1cmVkIGFjb3JkaW5nIHRvIHNwZWMKKyouCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBibngyeF9ldHNfZTNiMF9uaWdfZGlzYWJsZWQoY29uc3Qgc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCisJCQkJCWNvbnN0IHN0cnVjdCBsaW5rX3ZhcnMgKnZhcnMpCit7CisJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CisJY29uc3QgdTggcG9ydCA9IHBhcmFtcy0+cG9ydDsKKwljb25zdCB1MzIgbWluX3dfdmFsID0gYm54MnhfZXRzX2dldF9taW5fd192YWxfbmlnKHZhcnMpOworCS8qKgorCSAqIG1hcHBpbmcgYmV0d2VlbiBlbnRyeSAgcHJpb3JpdHkgdG8gY2xpZW50IG51bWJlciAoMCwxLDIgLWRlYnVnIGFuZAorCSAqIG1hbmFnZW1lbnQgY2xpZW50cywgMyAtIENPUzAgY2xpZW50LCA0IC0gQ09TMSwgLi4uIDggLQorCSAqIENPUzUpKEhJR0hFU1QpIDRiaXRzIGNsaWVudCBudW0uVE9ET19FVFMgLSBTaG91bGQgYmUgZG9uZSBieQorCSAqIHJlc2V0IHZhbHVlIG9yIGluaXQgdG9vbAorCSAqLworCWlmIChwb3J0KSB7CisJCVJFR19XUih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orCQkgICBOSUdfUkVHX1AwX1RYX0FSQl9DUkVESVRfV0VJR0hUXzQsIDB4MCk7CisJUkVHX1dSKGJwLCAocG9ydCkgPyBOSUdfUkVHX1AxX1RYX0FSQl9DUkVESVRfV0VJR0hUXzUgOgorCQkgICBOSUdfUkVHX1AwX1RYX0FSQl9DUkVESVRfV0VJR0hUXzUsIDB4MCk7CisJaWYgKDAgPT0gcG9ydCkgeworCQlSRUdfV1IoYnAsIE5JR19SRUdfUDBfVFhfQVJCX0NSRURJVF9XRUlHSFRfNiwgMHgwKTsKKwkJUkVHX1dSKGJwLCBOSUdfUkVHX1AwX1RYX0FSQl9DUkVESVRfV0VJR0hUXzcsIDB4MCk7CisJCVJFR19XUihicCwgTklHX1JFR19QMF9UWF9BUkJfQ1JFRElUX1dFSUdIVF84LCAweDApOworCX0KKworCWJueDJ4X2V0c19lM2IwX3NldF9jcmVkaXRfdXBwZXJfYm91bmRfbmlnKHBhcmFtcywgbWluX3dfdmFsKTsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCVNldCBjcmVkaXQgdXBwZXIgYm91bmQgZm9yIFBCRi4KKyouCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBibngyeF9ldHNfZTNiMF9zZXRfY3JlZGl0X3VwcGVyX2JvdW5kX3BiZigKKwljb25zdCBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKKwljb25zdCB1MzIgbWluX3dfdmFsKQoreworCXN0cnVjdCBibngyeCAqYnAgPSBwYXJhbXMtPmJwOworCWNvbnN0IHUzMiBjcmVkaXRfdXBwZXJfYm91bmQgPQorCSAgICBibngyeF9ldHNfZ2V0X2NyZWRpdF91cHBlcl9ib3VuZChtaW5fd192Y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A9IFBCRl9SRUdfQ09TMF9XRUlHSFRfUDE7CisJCW1heF9jb3MgPSBEQ0JYX0UzQjBfTUFYX05VTV9DT1NfUE9SVDE7CisJfQorCisJZm9yIChpID0gMDsgaSA8IG1heF9jb3M7IGkrKykKKwkJUkVHX1dSKGJwLCBiYXNlX3dlaWdodCArICgweDQgKiBpKSwgMCk7CisKKwlibngyeF9ldHNfZTNiMF9zZXRfY3JlZGl0X3VwcGVyX2JvdW5kX3BiZihwYXJhbXMsIG1pbl93X3ZhbF9wYmYpOworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJRTNCMCBkaXNhYmxlIHdpbGwgcmV0dXJuIGJhc2ljbHkgdGhlIHZhbHVlcyB0byBpbml0IHZhbHVlcy4KKyouCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGJueDJ4X2V0c19lM2IwX2Rpc2FibGVkKGNvbnN0IHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAorCQkJCSAgIGNvbnN0IHN0cnVjdCBsaW5rX3ZhcnMgKnZhcnMpCit7CisJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CisKKwlpZiAoIUNISVBfSVNfRTNCMChicCkpIHsKKwkJRFAoTkVUSUZfTVNHX0xJTkssICJibngyeF9ldHNfZTNiMF9kaXNhYmxlZCB0aGUgY2hpcCBpc24ndCBFM0IwIgorCQkJCSAgICJcbiIpOworCQlyZXR1cm4gLUVJTlZBTDsKKwl9CisKKwlibngyeF9ldHNfZTNiMF9uaWdfZGlzYWJsZWQocGFyYW1zLCB2YXJzKTsKKworCWJueDJ4X2V0c19lM2IwX3BiZl9kaXNhYmxlZChwYXJhbXMpOworCisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCURpc2FibGUgd2lsbCByZXR1cm4gYmFzaWNseSB0aGUgdmFsdWVzIHRvIGluaXQgdmFsdWVzLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBibngyeF9ldHNfZGlzYWJsZWQoc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCisJCSAgICAgIHN0cnVjdCBsaW5rX3ZhcnMgKnZhcnMpCit7CisJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CisJaW50IGJueDJ4X3N0YXR1cyA9IDA7CisKKwlpZiAoKENISVBfSVNfRTIoYnApKSB8fCAoQ0hJUF9JU19FM0EwKGJwKSkpCisJCWJueDJ4X2V0c19lMmUzYTBfZGlzYWJsZWQocGFyYW1zKTsKKwllbHNlIGlmIChDSElQX0lTX0UzQjAoYnApKQorCQlibngyeF9zdGF0dXMgPSBibngyeF9ldHNfZTNiMF9kaXNhYmxlZChwYXJhbXMsIHZhcnMpOworCWVsc2UgeworCQlEUChORVRJRl9NU0dfTElOSywgImJueDJ4X2V0c19kaXNhYmxlZCAtIGNoaXAgbm90IHN1cHBvcnRlZFxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCXJldHVybiBibngyeF9zdGF0dXM7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb24KKyoJU2V0IHRoZSBDT1MgbWFwcGltZyB0byBTUCBhbmQgQlcgdW50aWwgdGhpcyBwb2ludCBhbGwgdGhlIENPUyBhcmUgbm90CisqCXNldCBhcyBTUCBvciBCVy4KK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5JR19SRUdfUDFfVFhfQVJCX0NMSUVOVF9JU19TVUJKRUNUMldGUSA6CisJICAgICAgIE5JR19SRUdfUDBfVFhfQVJCX0NMSUVOVF9JU19TVUJKRUNUMldGUSwKKwkgICAgICAgbmlnX2NsaV9zdWJqZWN0MndmcV9iaXRtYXApOworCisJUkVHX1dSKGJwLCAocG9ydCkgPyBQQkZfUkVHX0VUU19BUkJfQ0xJRU5UX0lTX1NVQkpFQ1QyV0ZRX1AxIDoKKwkgICAgICAgUEJGX1JFR19FVFNfQVJCX0NMSUVOVF9JU19TVUJKRUNUMldGUV9QMCwKKwkgICAgICAgcGJmX2NsaV9zdWJqZWN0MndmcV9iaXRtYXApOworCisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCVRoaXMgZnVuY3Rpb24gaXMgbmVlZGVkIGJlY2F1c2UgTklHIEFSQl9DUkVESVRfV0VJR0hUX1ggYXJlCisqCW5vdCBjb250aW51ZXMgYW5kIEFSQl9DUkVESVRfV0VJR0hUXzAgKyBvZmZzZXQgaXMgc3VpdGFibGUuCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGJueDJ4X2V0c19lM2IwX3NldF9jb3NfYncoc3RydWN0IGJueDJ4ICpicCwKKwkJCQkgICAgIGNvbnN0IHU4IGNvc19lbnRyeSwKKwkJCQkgICAgIGNvbnN0IHUzMiBtaW5fd192YWxfbmlnLAorCQkJCSAgICAgY29uc3QgdTMyIG1pbl93X3ZhbF9wYmYsCisJCQkJICAgICBjb25zdCB1MTYgdG90YWxfYncsCisJCQkJICAgICBjb25zdCB1OCBidywKKwkJCQkgICAgIGNvbnN0IHU4IHBvcnQpCit7CisJdTMyIG5pZ19yZWdf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XUihicCwgcGJmX3JlZ19hZHJlc3NfY3JkX3dlaWdodCwgY29zX2J3X3BiZik7CisKKwlyZXR1cm4gMDsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCUNhbGN1bGF0ZSB0aGUgdG90YWwgQlcuQSB2YWx1ZSBvZiAwIGlzbid0IGxlZ2FsLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgYm54MnhfZXRzX2UzYjBfZ2V0X3RvdGFsX2J3KAorCWNvbnN0IHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAorCWNvbnN0IHN0cnVjdCBibngyeF9ldHNfcGFyYW1zICpldHNfcGFyYW1zLAorCXUxNiAqdG90YWxfYncpCit7CisJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CisJdTggY29zX2lkeCA9IDA7CisKKwkqdG90YWxfYncgPSAwIDsKKwkvKiBDYWxjdWxhdGUgdG90YWwgQlcgcmVxdWVzdGVkICovCisJZm9yIChjb3NfaWR4ID0gMDsgY29zX2lkeCA8IGV0c19wYXJhbXMtPm51bV9vZl9jb3M7IGNvc19pZHgrKykgeworCQlpZiAoYm54MnhfY29zX3N0YXRlX2J3ID09IGV0c19wYXJhbXMtPmNvc1tjb3NfaWR4XS5zdGF0ZSkgeworCisJCQlpZiAoMCA9PSBldHNfcGFyYW1zLT5jb3NbY29zX2lkeF0ucGFyYW1zLmJ3X3BhcmFtcy5idykgeworCQkJCURQKE5FVElGX01TR19MSU5LLCAiYm54MnhfZXRzX0UzQjBfY29uZmlnIEJXIgorCQkJCQkJICAgIndhcyBzZXQgdG8gMFxuIik7CisJCQlyZXR1cm4gLUVJTlZBTDsKKwkJfQorCQkqdG90YWxfYncgKz0KKwkJICAgIGV0c19wYXJhbXMtPmNvc1tjb3NfaWR4XS5wYXJhbXMuYndfcGFyYW1zLmJ3OworCSAgICB9CisJfQorCisJLypDaGVjayB0YW90bCBCVyBpcyB2YWxpZCAqLworCWlmICgoMTAwICE9ICp0b3RhbF9idykgfHwgKDAgPT0gKnRvdGFsX2J3KSkgeworCQlpZiAoMCA9PSAqdG90YWxfYncpIHsKKwkJCURQKE5FVElGX01TR19MSU5LLCAiYm54MnhfZXRzX0UzQjBfY29uZmlnIHRvYXRsIEJXIgorCQkJCQkgICAic2hvdWxkbid0IGJlIDBcbiIpOworCQkJcmV0dXJuIC1FSU5WQUw7CisJCX0KKwkJRFAoTkVUSUZfTVNHX0xJTkssICJibngyeF9ldHNfRTNCMF9jb25maWcgdG9hdGwgQlcgc2hvdWxkIGJlIgorCQkJCSAgICIxMDBcbiIpOworCQkvKioKKwkJKiAgIFdlIGNhbiBoYW5kbGUgYSBjYXNlIHdocmUgdGhlIEJXIGlzbid0IDEwMCB0aGlzIGNhbiBoYXBwZW4KKwkJKiAgIGlmIHRoZSBUQyBhcmUgam9pbmVkLgorCQkqLworCX0KKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJSW52YWxpZGF0ZSBhbGwgdGhlIHNwX3ByaV90b19jb3MuCisqLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgYm54MnhfZXRzX2UzYjBfc3BfcHJpX3RvX2Nvc19pbml0KHU4ICpzcF9wcmlfdG9fY29zKQoreworCXU4IHByaSA9IDA7CisJZm9yIChwcmkgPSAwOyBwcmkgPCBEQ0JYX01BWF9OVU1fQ09TOyBwcmkrKykKKwkJc3BfcHJpX3RvX2Nvc1twcmldID0gRENCWF9JTlZBTElEX0NPUzsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCUNhbGN1bGF0ZSBhbmQgc2V0IHRoZSBTUCAoQVJCX1BSSU9SSVRZX0NMSUVOVCkgTklHIGFuZCBQQkYgcmVnaXN0ZXJzCisqCWFjY29yZGluZyB0byBzcF9wcmlfdG9fY29zLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgYm54MnhfZXRzX2UzYjBfc3BfcHJpX3RvX2Nvc19zZXQoY29uc3Qgc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCisJCQkJCSAgICB1OCAqc3BfcHJpX3RvX2NvcywgY29uc3QgdTggcHJpLAorCQkJCQkgICAgY29uc3QgdTggY29zX2VudHJ5KQoreworCXN0cnVjdCBibngyeCAqYnAgPSBwYXJhbXMtPmJwOworCWNvbnN0IHU4IHBvcnQgPSBwYXJhbXMtPnBvcnQ7CisJY29uc3QgdTggbWF4X251bV9vZl9jb3MgPSAocG9ydCkgPyBEQ0JYX0UzQjBfTUFYX05VTV9DT1NfUE9SVDEgOgorCQlEQ0JYX0UzQjBfTUFYX05VTV9DT1NfUE9SVDA7CisKKwlpZiAoRENCWF9JTlZBTElEX0NPUyAhPSBzcF9wcmlfdG9fY29zW3ByaV0pIHsKKwkJRFAoTkVUSUZfTVNHX0xJTkssICJibngyeF9ldHNfZTNiMF9zcF9wcmlfdG9fY29zX3NldCBpbnZhbGlkICIKKwkJCQkgICAicGFyYW1ldGVyIFRoZXJlIGNhbid0IGJlIHR3byBDT1MncyB3aXRoIgorCQkJCSAgICJ0aGUgc2FtZSBzdHJpY3QgcHJpXG4iKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJaWYgKHByaSA+IG1heF9udW1fb2ZfY29zKSB7CisJCURQKE5FVElGX01TR19MSU5LLCAiYm54MnhfZXRzX2UzYjBfc3BfcHJpX3RvX2Nvc19zZXQgaW52YWxpZCIKKwkJCSAgICAgICAicGFyYW1ldGVyIElsbGVnYWwgc3RyaWN0IHByaW9yaXR5XG4iKTsKKwkgICAgcmV0dXJuIC1FSU5WQUw7CisJfQorCisJc3BfcHJpX3RvX2Nvc1twcmldID0gY29zX2VudHJ5OworCXJldHVybiAwOworCit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCVJldHVybnMgdGhlIGNvcnJlY3QgdmFsdWUgYWNjb3JkaW5nIHRvIENPUyBhbmQgcHJpb3JpdHkgaW4KKyoJdGhlIHNwX3ByaV9jbGkgcmVnaXN0ZXIuCisqLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHU2NCBibngyeF9lM2IwX3NwX2dldF9wcmlfY2xpX3JlZyhjb25zdCB1OCBjb3MsIGNvbnN0IHU4IGNvc19vZmZzZXQsCisJCQkJCSBjb25zdCB1OCBwcmlfc2V0LAorCQkJCQkgY29uc3QgdTggcHJpX29mZnNldCwKKwkJCQkJIGNvbnN0IHU4IGVudHJ5X3NpemUpCit7CisJdTY0IHByaV9jbGlfbmlnID0gMDsKKwlwcmlfY2xpX25pZyA9ICgodTY0KShjb3MgKyBjb3Nfb2Zmc2V0KSkgPDwgKGVudHJ5X3NpemUgKgorCQkJCQkJICAgIChwcmlfc2V0ICsgcHJpX29mZnNldCkpOworCisJcmV0dXJuIHByaV9jbGlfbmlnOworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJUmV0dXJucyB0aGUgY29ycmVjdCB2YWx1ZSBhY2NvcmRpbmcgdG8gQ09TIGFuZCBwcmlvcml0eSBpbiB0aGUKKyoJc3BfcHJpX2NsaSByZWdpc3RlciBmb3IgTklHLgorKi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB1NjQgYm54MnhfZTNiMF9zcF9nZXRfcHJpX2NsaV9yZWdfbmlnKGNvbnN0IHU4IGNvcywgY29uc3QgdTggcHJpX3NldCkKK3sKKwkvKiBNQ1AgRGJnMCBhbmQgZGJnMSBhcmUgYWx3YXlzIHdpdGggaGlnaGVyIHN0cmljdCBwcmkqLworCWNvbnN0IHU4IG5pZ19jb3Nfb2Zmc2V0ID0gMzsKKwljb25zdCB1OCBuaWdfcHJpX29mZnNldCA9IDM7CisKKwlyZXR1cm4gYm54MnhfZTNiMF9zcF9nZXRfcHJpX2NsaV9yZWcoY29zLCBuaWdfY29zX29mZnNldCwgcHJpX3NldCwKKwkJbmlnX3ByaV9vZmZzZXQsIDQpOworCit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIERlc2NyaXB0aW9uOgorKglSZXR1cm5zIHRoZSBjb3JyZWN0IHZhbHVlIGFjY29yZGluZyB0byBDT1MgYW5kIHByaW9yaXR5IGluIHRoZQorKglzcF9wcmlfY2xpIHJlZ2lzdGVyIGZvciBQQkYuCisqLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHU2NCBibngyeF9lM2IwX3NwX2dldF9wcmlfY2xpX3JlZ19wYmYoY29uc3QgdTggY29zLCBjb25zdCB1OCBwcmlfc2V0KQoreworCWNvbnN0IHU4IHBiZl9jb3Nfb2Zmc2V0ID0gMDsKKwljb25zdCB1OCBwYmZfcHJpX29mZnNldCA9IDA7CisKKwlyZXR1cm4gYm54MnhfZTNiMF9zcF9nZXRfcHJpX2NsaV9yZWcoY29zLCBwYmZfY29zX29mZnNldCwgcHJpX3NldCwKKwkJcGJmX3ByaV9vZmZzZXQsIDMpOworCit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVzY3JpcHRpb246CisqCUNhbGN1bGF0ZSBhbmQgc2V0IHRoZSBTUCAoQVJCX1BSSU9SSVRZX0NMSUVOVCkgTklHIGFuZCBQQkYgcmVnaXN0ZXJzCisqCWFjY29yZGluZyB0byBzcF9wcmlfdG9fY29zLih3aGljaCBDT1MgaGFzIGhpZ2hlciBwcmlvcml0eSkKKyouCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGJueDJ4X2V0c19lM2IwX3NwX3NldF9wcmlfY2xpX3JlZyhjb25zdCBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKKwkJCQkJICAgICB1OCAqc3BfcHJpX3RvX2NvcykKK3sKKwlzdHJ1Y3QgYm54MnggKmJwID0gcGFyYW1zLT5icDsKKwl1OCBpID0gMDsKKwljb25zdCB1OCBwb3J0ID0gcGFyYW1zLT5wb3J0OworCS8qIE1DUCBEYmcwIGFuZCBkYmcxIGFyZSBhbHdheXMgd2l0aCBoaWdoZXIgc3RyaWN0IHByaSovCisJdTY0IHByaV9jbGlfbmlnID0gMHgyMTA7CisJdTMyIHByaV9jbGlfcGJmID0gMHgwOworCXU4IHByaV9zZXQgPSAwOworCXU4IHByaV9iaXRtYXNrID0gMDsKKwljb25zdCB1OCBtYXhfbnVtX29m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JLyogT25seSA2IHVzYWJsZSBjbGllbnRzKi8KKwkJUkVHX1dSKGJwLCBOSUdfUkVHX1AxX1RYX0FSQl9QUklPUklUWV9DTElFTlQyX0xTQiwKKwkJICAgICAgICh1MzIpcHJpX2NsaV9uaWcpOworCisJCVJFR19XUihicCwgUEJGX1JFR19FVFNfQVJCX1BSSU9SSVRZX0NMSUVOVF9QMSAsIHByaV9jbGlfcGJmKTsKKwl9IGVsc2UgeworCQkvKiBPbmx5IDkgdXNhYmxlIGNsaWVudHMqLworCQljb25zdCB1MzIgcHJpX2NsaV9uaWdfbHNiID0gKHUzMikgKHByaV9jbGlfbmlnKTsKKwkJY29uc3QgdTMyIHByaV9jbGlfbmlnX21zYiA9ICh1MzIpICgocHJpX2NsaV9uaWcgPj4gMzIpICYgMHhGKTsKKworCQlSRUdfV1IoYnAsIE5JR19SRUdfUDBfVFhfQVJCX1BSSU9SSVRZX0NMSUVOVDJfTFNCLAorCQkgICAgICAgcHJpX2NsaV9uaWdfbHNiKTsKKwkJUkVHX1dSKGJwLCBOSUdfUkVHX1AwX1RYX0FSQl9QUklPUklUWV9DTElFTlQyX01TQiwKKwkJICAgICAgIHByaV9jbGlfbmlnX21zYik7CisKKwkJUkVHX1dSKGJwLCBQQkZfUkVHX0VUU19BUkJfUFJJT1JJVFlfQ0xJRU5UX1AwICwgcHJpX2NsaV9wYmYpOworCX0KKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyoJQ29uZmlndXJlIHRoZSBDT1MgdG8gRVRTIGFjY29yZGluZyB0byBCVyBhbmQgU1Agc2V0dGluZ3MuCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgYm54MnhfZXRzX2UzYjBfY29uZml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XIgc3BhY2UgZm9yIGNsYXNzICN0CisJCQkqIGluIE1BQzEuICB0PTAsMQorCQkJKi8KKwkJCVJFR19XUihicCwgQlJCMV9SRUdfTUFDXzFfQ0xBU1NfMF9HVUFSQU5USUVEX0hZU1QsCisJCQkgICAgICAgZTNiMF92YWwubWFjXzFfY2xhc3NfdF9ndWFyYW50aWVkX2h5c3QpOworCQkJUkVHX1dSKGJwLCBCUkIxX1JFR19NQUNfMV9DTEFTU18xX0dVQVJBTlRJRURfSFlTVCwKKwkJCSAgICAgICBlM2IwX3ZhbC5tYWNfMV9jbGFzc190X2d1YXJhbnRpZWRfaHlzdCk7CisKKwkgICAgfQorCiAJfQorCisJcmV0dXJuIGJueDJ4X3N0YXR1czsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBEZXNjcmlwdGlvbjoKKyogIFRoaXMgZnVuY3Rpb24gaXMgbmVlZGVkIGJlY2F1c2UgTklHIEFSQl9DUkVESVRfV0VJR0hUX1ggYXJlCisqICBub3QgY29udGludWVzIGFuZCBBUkJfQ1JFRElUX1dFSUdIVF8wICsgb2Zmc2V0IGlzIHN1aXRhYmxlLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGJueDJ4X3BmY19uaWdfcnhfcHJpb3JpdHlfbWFzayhzdHJ1Y3QgYm54MnggKmJwLAorCQkJCQkgICAgICB1OCBjb3NfZW50cnksCisJCQkJCSAgICAgIHUzMiBwcmlvcml0eV9tYXNrLCB1OCBwb3J0KQoreworCXUzMiBuaWdfcmVnX3J4X3ByaW9yaXR5X21hc2tfYWRkID0gMDsKKworCXN3aXRjaCAoY29zX2VudHJ5KSB7CisJY2FzZSAwOgorCSAgICAgbmlnX3JlZ19yeF9wcmlvcml0eV9tYXNrX2FkZCA9IChwb3J0K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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoJCQlDTDQ1IGFjY2VzcyBmdW5jdGlvbnMJCQkgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBibngyeF9jbDQ1X3JlYWQoc3RydWN0IGJueDJ4ICpicCwgc3RydWN0IGJueDJ4X3BoeSAqcGh5LAorCQkJICAgdTggZGV2YWQsIHUxNiByZWcsIHUxNiAqcmV0X3ZhbCkKK3sKKwl1MzIgdmFsOworCXUxNiBpOworCWludCByYyA9IDA7CiAKIAkvKiBhZGRyZXNzICovCiAJdmFsID0gKChwaHktPmFkZHIgPDwgMjEpIHwgKGRldmFkIDw8IDE2KSB8IHJlZyB8CkBAIC0xNDYwLDcgKzI5NzAsNiBAQAogCQluZXRkZXZfZXJyKGJwLT5kZXYsICAiTURDL01ESU8gYWNjZXNzIHRpbWVvdXRcbiIpOwogCQkqcmV0X3ZhbCA9IDA7CiAJCXJjID0gLUVGQVVMVDsKLQogCX0gZWxzZSB7CiAJCS8qIGRhdGEgKi8KIAkJdmFsID0gKChwaHktPmFkZHIgPDwgMjEpIHwgKGRldmFkIDw8IDE2KSB8CkBAIC0xNDg1LDE1ICsyOTk0LDIxNCBAQAogCQkJcmMgPSAtRUZBVUxUOwogCQl9CiAJfQotCi0JLyogUmVzdG9yZSB0aGUgc2F2ZWQgbW9kZSAqLwotCVJFR19XUihicCwgcGh5LT5tZGlvX2N0cmwgKyBFTUFDX1JFR19FTUFDX01ESU9fTU9ERSwgc2F2ZWRfbW9kZSk7CisJLyogV29yayBhcm91bmQgZm9yIEUzIEEwICovCisJaWYgKHBoeS0+ZmxhZ3MgJiBGTEFHU19NRENfTURJT19XQSkgeworCQlwaHktPmZsYWdzIF49IEZMQUdTX0RVTU1ZX1JFQUQ7CisJCWlmIChwaHktPmZsYWdzICYgRk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ioqKioqKioqKioqKioqKioqKioqKi8KIC8qCQkJQkNNODcwNSBQSFkgU0VDVElPTgkJCSAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgdTggYm54MnhfODcwNV9jb25maWdfaW5pdChzdHJ1Y3QgYm54MnhfcGh5ICpwaHksCi0JCQkJIHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAotCQkJCSBzdHJ1Y3QgbGlua192YXJzICp2YXJzKQorc3RhdGljIGludCBibngyeF84NzA1X2NvbmZpZ19pbml0KHN0cnVjdCBibngyeF9waHkgKnBoeSwKKwkJCQkgIHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAorCQkJCSAgc3RydWN0IGxpbmtfdmFycyAqdmFycykKIHsKIAlzdHJ1Y3QgYm54MnggKmJwID0gcGFyYW1zLT5icDsKIAlEUChORVRJRl9NU0dfTElOSywgImluaXQgODcwNVxuIik7CkBAIC00NDMwLDYgKzcxOTUsMzAgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKgkJCVNGUCsgbW9kdWxlIFNlY3Rpb24JCQkgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgYm54Mnhfc2V0X2Rpc2FibGVfcG1kX3RyYW5zbWl0KHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAorCQkJCQkgICBzdHJ1Y3QgYm54MnhfcGh5ICpwaHksCisJCQkJCSAgIHU4IHBtZF9kaXMpCit7CisJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CisJLyoKKwkgKiBEaXNhYmxlIHRyYW5zbWl0dGVyIG9ubHkgZm9yIGJvb3Rjb2RlcyB3aGljaCBjYW4gZ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B8PSAoMTw8MCk7CisJYm54MnhfY2w0NV93cml0ZShicCwgcGh5LCBNRElPX1BNQV9ERVZBRCwgYWxhcm1fY3RybF9vZmZzZXQsIHZhbCk7Cit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoJCWNvbW1vbiBCQ004NzA2L0JDTTg3MjYgUEhZIFNFQ1RJT04JCSAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgdTggYm54MnhfODcwNl84NzI2X3JlYWRfc3RhdHVzKHN0cnVjdCBibngyeF9waHkgKnBoeSwKQEAgLTUxNDEsMTIgKzgxNjcsMTYgQEAKIAlEUChORVRJRl9NU0dfTElOSywgIlhHWFMgODcwNi84NzI2XG4iKTsKIAkvKiBDbGVhciBSWCBBbGFybSovCiAJYm54MnhfY2w0NV9yZWFkKGJwLCBwaHksCi0JCQlNRElPX1BNQV9ERVZBRCwgTURJT19QTUFfUkVHX1JYX0FMQVJNLCAmdmFsMik7CisJCQlNRElPX1BNQV9ERVZBRCwgTURJT19QTUFfTEFTSV9SWFNUQVQsICZ2YWwyKTsKKworCWJueDJ4X3NmcF9tYXNrX2ZhdWx0KGJwLCBwaHksIE1ESU9fUE1BX0xBU0lfVFhTVEFULAorCQkJICAgICBNRElPX1BNQV9MQVNJX1RYQ1RSTCk7CisKIAkvKiBjbGVhciBMQVNJIGluZGljYXRpb24qLwogCWJueDJ4X2NsNDVfcmVhZChicCwgcGh5LAotCQkJTURJT19QTUFfREVWQUQsIE1ESU9fUE1BX1JFR19MQVNJX1NUQVRVUywgJnZhbDEpOworCQkJTURJT19QTUFfREVWQUQsIE1ESU9fUE1BX0xBU0lfU1RBVCwgJnZhbDEpOwogCWJueDJ4X2NsNDVfcmVhZChicCwgcGh5LAotCQkJTURJT19QTUFfREVWQUQsIE1ESU9fUE1BX1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kdfTEVEX01PREVfU0hJRlQpID09CiAJCSAgICBTSEFSRURfSFdfQ0ZHX0xFRF9FWFRQSFkxKSB7CkBAIC02NTcxLDcgKzk4OTcsNyBAQAogCiAJY2FzZSBMRURfTU9ERV9PUEVSOgogCi0JCURQKE5FVElGX01TR19MSU5LLCAiUG9ydCAweCV4OiBMRUQgTU9ERSBPUEVSXG4iLCBwYXJhbXMtPnBvcnQpOworCQlEUChORVRJRl9NU0dfTElOSywgIlBvcnQgMHgleDogTEVEIE1PREUgT1BFUlxuIiwgcG9ydCk7CiAKIAkJaWYgKChwYXJhbXMtPmh3X2xlZF9tb2RlIDw8IFNIQVJFRF9IV19DRkdfTEVEX01PREVfU0hJRlQpID09CiAJCSAgICBTSEFSRURfSFdfQ0ZHX0xFRF9FWFRQSFkxKSB7CkBAIC02NjMzLDcgKzk5NTksMzg4IEBACiAJCX0KIAkJYnJlYWs7CiAJfQorCisJLyoKKwkgKiBUaGlzIGlzIGEgd29ya2Fyb3VuZCBmb3IgRTMrODQ4MzMgdW50aWwgYXV0b25lZworCSAqIHJlc3RhcnQgaXMgZml4ZWQgaW4gZi93CisJICovCisJaWYgKENISVBfSVNfRTMoYnApKSB7CisJCWJueDJ4X2NsNDVfcmVhZChicCwgcGh5LCBNRElPX1dDX0RFVkFELAorCQkJCU1ESU9fV0NfUkVHX0dQMl9TVEFUVVNfR1BfMl8xLCAmdmFsKTsKKwl9CiB9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKgkJCTU0NjE4U0UgUEhZIFNFQ1RJT04JCQkgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBibngyeF81NDYxOHNlX2NvbmZpZ19pbml0KHN0cnVjdCBibngyeF9waHkgKnBoeSwKKwkJCQkJICAgICAgIHN0cnVjdCBsaW5rX3BhcmF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ua191cDsgLyogaW50ZXJuYWwgcGh5IGxpbmsgaW5kaWNhdGlvbiAqLwogCXU4IGxpbmtfdXA7CkBAIC0yNzQsNDUgKzI5Niw1MiBAQAogCiAJLyogVGhlIHNhbWUgZGVmaW5pdGlvbnMgYXMgdGhlIHNobWVtIHBhcmFtZXRlciAqLwogCXUzMiBsaW5rX3N0YXR1czsKKwl1OCBmYXVsdF9kZXRlY3RlZDsKKwl1OCByc3J2MTsKKwl1MTYgcGVyaW9kaWNfZmxhZ3M7CisjZGVmaW5lIFBFUklPRElDX0ZMQUdTX0xJTktfRVZFTlQJMHgwMDAxCisKKwl1MzIgYWV1X2ludF9tYXNrOwogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgRnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdTggYm54MnhfcGh5X2luaXQoc3RydWN0IGxpbmtfcGFyYW1zICppbnB1dCwgc3RydWN0IGxpbmtfdmFycyAqb3V0cHV0KTsKK2ludCBibngyeF9waHlfaW5pdChzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywgc3RydWN0IGxpbmtfdmFycyAqdmFycyk7CiAKIC8qIFJlc2V0IHRoZSBsaW5rLiBTaG91bGQgYmUgY2FsbGVkIHdoZW4gZHJpdmVyIG9yIGludGVyZmFjZSBnb2VzIGRvd24KICAgIEJlZm9yZSBjYWxsaW5nIHBoeSBmaXJtd2FyZSB1cGdyYWRlLCB0aGUgcmVzZXRfZXh0X3BoeSBzaG91bGQgYmUgc2V0CiAgICB0byAwICovCi11OCBibngyeF9saW5rX3Jlc2V0KHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLCBzdHJ1Y3QgbGlua192YXJzICp2YXJzLAotCQkgIHU4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otPnB1dF9jYW1fb2Zmc2V0ID0gYm54MnhfcHV0X2NhbV9vZmZzZXRfbWFjOworCisJaWYgKENISVBfSVNfRTEoYnApKSB7CisJCUJOWDJYX0VSUigiRG8gbm90IHN1cHBvcnQgY2hpcHMgb3RoZXJzIHRoYW4gRTJcbiIpOworCQlCVUcoKTsKKwl9IGVsc2UgaWYgKENISVBfSVNfRTFIKGJwKSkgeworCQl2bGFuX21hY19vYmotPnNldF9vbmVfcnVsZSAgICAgID0gYm54Mnhfc2V0X29uZV92bGFuX21hY19lMWg7CisJCXZsYW5fbWFjX29iai0+Y2hlY2tfZGVsICAgICAgICAgPSBibngyeF9jaGVja192bGFuX21hY19kZWw7CisJCXZsYW5fbWFjX29iai0+Y2hlY2tfYWRkICAgICAgICAgPSBibngyeF9jaGVja192bGFuX21hY19hZGQ7CisJCXZsYW5fbWFjX29iai0+Y2hlY2tfbW92ZSAgICAgICAgPSBibngyeF9jaGVja19tb3ZlX2Fsd2F5c19lcnI7CisJCXZsYW5fbWFjX29iai0+cmFtcm9kX2NtZCAgICAgICAgPSBSQU1ST0RfQ01EX0lEX0VUSF9TRVRfTUFDOworCisJCS8qIEV4ZSBRdWV1ZSAqLworCQlibngyeF9leGVfcXVldWVfaW5pdChicCwKKwkJCQkgICAgICZ2bGFuX21hY19vYmotPmV4ZV9xdWV1ZSwgMSwgcWFibGVfb2JqLAorCQkJCSAgICAgYm54MnhfdmFsaWRhdGVfdmxhbl9tYWMsCisJCQkJICAgICBibngyeF9vcHRpbWl6ZV92bGFuX21hYywKKwkJCQkgICAgIGJueDJ4X2V4ZWN1dGVfdmxhbl9tYWMsCisJCQkJICAgICBibngyeF9leGVxX2dldF92bGFuX21hYyk7CisJfSBlbHNlIHsKKwkJdmxhbl9tYWNfb2JqLT5zZXRfb25lX3J1bGUgICAgICA9IGJueDJ4X3NldF9vbmVfdmxhbl9tYWNfZTI7CisJCXZsYW5fbWFjX29iai0+Y2hlY2tfZGVsICAgICAgICAgPSBibngyeF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fY21kX2UyOworCQltY2FzdF9vYmotPmNoZWNrX3BlbmRpbmcgICAgID0gYm54MnhfbWNhc3RfY2hlY2tfcGVuZGluZzsKKwkJLyogVE9ETzogVGhlcmUgc2hvdWxkIGJlIGEgcHJvcGVyIEhTSSBkZWZpbmUgZm9yIHRoaXMgbnVtYmVyISEhCisJCSAqLworCQltY2FzdF9vYmotPm1heF9jbWRfbGVuICAgICAgID0gMTY7CisJCW1jYXN0X29iai0+d2FpdF9jb21wICAgICAgICAgPSBibngyeF9tY2FzdF93YWl0OworCQltY2FzdF9vYmotPnNldF9vbmVfcnVsZSAgICAgID0gYm54MnhfbWNhc3Rfc2V0X29uZV9ydWxlX2UyOworCQltY2FzdF9vYmotPnZhbGlkYXRlICAgICAgICAgID0gYm54MnhfbWNhc3RfdmFsaWRhdGVfZTI7CisJCW1jYXN0X29iai0+cmV2ZXJ0ICAgICAgICAgICAgPSBibngyeF9tY2FzdF9yZXZlcnRfZTI7CisJCW1jYXN0X29iai0+Z2V0X3JlZ2lzdHJ5X3NpemUgPQorCQkJYm54MnhfbWNhc3RfZ2V0X3JlZ2lzdHJ5X3NpemVfYXByb3g7CisJCW1jYXN0X29iai0+c2V0X3JlZ2lzdHJ5X3NpemUgPQorCQkJYm54MnhfbWNhc3Rfc2V0X3JlZ2lzdHJ5X3NpemVfYXByb3g7CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqIENyZWRpdCBoYW5kbGluZyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKioKKyAqIGF0b21pY19hZGRfaWZsZXNzIC0gYWRkIGlmIHRoZSByZXN1bHQgaXMgbGVzcyB0aGFuIGEgZ2l2ZW4gdmFsdWUuCisgKgorICogQHY6CXBvaW50ZXIgb2YgdHlwZSBhdG9taWNfdAorICogQGE6CXRoZSBhbW91bnQgdG8gYWRkIHRvIHYuLi4KKyAqIEB1OgkuLi5pZiAodiArIGEpIGlzIGxlc3MgdGhhbiB1LgorICoKKyAqIHJldHVybnMgdHJ1ZSBpZiAodiArIGEpIHdhcyBsZXNzIHRoYW4gdSwgYW5kIGZhbHNlIG90aGVyd2lzZS4KKyAqCisgKi8KK3N0YXRpYyBpbmxpbmUgYm9vbCBfX2F0b21pY19hZGRfaWZsZXNzKGF0b21pY190ICp2LCBpbnQgYSwgaW50IHUpCit7CisJaW50IGMsIG9sZDsKKworCWMgPSBhdG9taWNfcmVhZCh2KTsKKwlmb3IgKDs7KSB7CisJCWlmICh1bmxpa2VseShjICsgYSA+PSB1KSkKKwkJCXJldHVybiBmYWxzZTsKKworCQlvbGQgPSBhdG9taWNfY21weGNoZygodiksIGMsIGMgKyBhKTsKKwkJaWYgKGxpa2VseShvbGQgPT0gYykpCisJCQlicmVhazsKKwkJYyA9IG9sZDsKKwl9CisKKwlyZXR1cm4gdHJ1ZTsKK30KKworLyoqCisgKiBhdG9taWNfZGVjX2lmbW9lIC0gZGVjIGlmIHRoZSByZXN1bHQgaXMgbW9yZSBvciBlcXVhbCB0aGFuIGEgZ2l2ZW4gdmFsdWUuCisgKgorICogQHY6CXBvaW50ZXIgb2YgdHlwZSBhdG9taWNfdAorICogQGE6CXRoZSBhbW91bnQgdG8gZGVjIGZyb20gdi4uLgorICogQHU6CS4uLmlmICh2IC0gYSkgaXMgbW9yZSBvciBlcXVhbCB0aGFuIHUuCisgKgorICogcmV0dXJucyB0cnVlIGlmICh2IC0gYSkgd2FzIG1vcmUgb3IgZXF1YWwgdGhhbiB1LCBhbmQgZmFsc2UKKyAqIG90aGVyd2lzZS4KKyAqLworc3RhdGljIGlubGluZSBib29sIF9fYXRvbWljX2RlY19pZm1vZShhdG9taWNfdCAqdiwgaW50IGEsIGludCB1KQoreworCWludCBjLCBvbGQ7CisKKwljID0gYXRvbWljX3JlYWQodik7CisJZm9yICg7OykgeworCQlpZiAodW5saWtlbHkoYyAtIGEgPCB1KSkKKwkJCXJldHVybiBmYWxzZTsKKworCQlvbGQgPSBhdG9taWNfY21weGNoZygodiksIG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G9vbCArIHJ1bnRpbWUgaW5pdGlhbGl6YXRpb246CisJICogICAgICAtIENvbW1vbiBDaGlwCisJICogICAgICAtIENvbW1vbiAocGVyIFBhdGgpCisJICogICAgICAtIFBvcnQKKwkgKiAgICAgIC0gRnVuY3Rpb24gcGhhc2VzCisJICovCisJaW50ICgqaW5pdF9od19jbW5fY2hpcCkoc3RydWN0IGJueDJ4ICpicCk7CisJaW50ICgqaW5pdF9od19jbW4pKHN0cnVjdCBibngyeCAqYnApOworCWludCAoKmluaXRfaHdfcG9ydCkoc3RydWN0IGJueDJ4ICpicCk7CisJaW50ICgqaW5pdF9od19mdW5jKShzdHJ1Y3QgYm54MnggKmJwKTsKKworCS8qIFJlc2V0IEZ1bmN0aW9uIEhXOiBDb21tb24sIFBvcnQsIEZ1bmN0aW9uIHBoYXNlcy4gKi8KKwl2b2lkICgqcmVzZXRfaHdfY21uKShzdHJ1Y3QgYm54MnggKmJwKTsKKwl2b2lkICgqcmVzZXRfaHdfcG9ydCkoc3RydWN0IGJueDJ4ICpicCk7CisJdm9pZCAoKnJlc2V0X2h3X2Z1bmMpKHN0cnVjdCBibngyeCAqYnApOworCisJLyogSW5pdC9GcmVlIEdVTlpJUCByZXNvdXJjZXMgKi8KKwlpbnQgKCpndW56aXBfaW5pdCkoc3RydWN0IGJueDJ4ICpicCk7CisJdm9pZCAoKmd1bnppcF9lbmQpKHN0cnVjdCBibngyeCAqYnApOworCisJLyogUHJlcGFyZS9SZWxlYXNlIEZXIHJlc291cmNlcyAqLworCWludCAoKmluaXRfZncpKHN0cnVjdCBibngyeCAqYnApOworCXZvaWQgKCpyZWxlYXNlX2Z3KShzdHJ1Y3QgYm54MnggKmJwKTsKK307CisKK3N0cnVjdCBibngyeF9mdW5jX3NwX29iaiB7CisJZW51bSBibngyeF9mdW5jX3N0YXRlCXN0YXRlLCBuZXh0X3N0YXRlOworCisJLyogQk5YMlhfRlVOQ19DTURfWFggYml0cy4gVGhpcyBvYmplY3QgaW1wbGVtZW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ICovCisJaW50ICgqY2hlY2tfdHJhbnNpdGlvbikoc3RydWN0IGJueDJ4ICpicCwKKwkJCQlzdHJ1Y3QgYm54MnhfZnVuY19zcF9vYmogKm8sCisJCQkJc3RydWN0IGJueDJ4X2Z1bmNfc3RhdGVfcGFyYW1zICpwYXJhbXMpOworCisJLyoqCisJICogQ29tcGxldGVzIHRoZSBwZW5kaW5nIGNvbW1hbmQuCisJICovCisJaW50ICgqY29tcGxldGVfY21kKShzdHJ1Y3QgYm54MnggKmJwLAorCQkJICAgIHN0cnVjdCBibngyeF9mdW5jX3NwX29iaiAqbywKKwkJCSAgICBlbnVtIGJueDJ4X2Z1bmNfY21kIGNtZCk7CisKKwlpbnQgKCp3YWl0X2NvbXApKHN0cnVjdCBibngyeCAqYnAsIHN0cnVjdCBibngyeF9mdW5jX3NwX29iaiAqbywKKwkJCSBlbnVtIGJueDJ4X2Z1bmNfY21kIGNtZCk7Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKiBJbnRlcmZhY2VzICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogUXVldWVhYmxlIG9iamVjdHMgc2V0ICovCit1bmlvbiBibngyeF9xYWJsZV9vYmogeworCXN0cnVjdCBibngyeF92bGFuX21hY19vYmogdmxhbl9tYWM7Cit9OworLyoqKioqKioqKioqKioqIEZ1bmN0aW9uIHN0YXRlIHVwZGF0ZSAqKioqKioqKiovCit2b2lkIGJueDJ4X2luaXRfZnVuY19vYmooc3RydWN0IGJueDJ4ICpicCwKKwkJCSBzdHJ1Y3QgYm54MnhfZnVuY19zcF9vYmogKm9iaiwKKwkJCSB2b2lkICpyZGF0YSwgZG1hX2FkZHJfdCByZGF0YV9tYXBwaW5nLAorCQkJIHN0cnVjdCBibngyeF9mdW5jX3NwX2Rydl9vcHMgKmRydl9pZmFjZSk7CisKK2ludCBibngyeF9mdW5jX3N0YXRlX2NoYW5nZShzdHJ1Y3QgYm54MnggKmJwLAorCQkJICAgIHN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K30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogaW50ZXJuYWwgZnVuY3Rpb25zICh0cmFuc21pdCBkZXNjcmlwdG9yKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgZnRnbWFjMTAwX3R4ZGVzX3Jlc2V0KHN0cnVjdCBmdGdtYWMxMDBfdHhkZXMgKnR4ZGVzKQoreworCS8qIGNsZWFyIGFsbCBleGNlcHQgZW5kIG9mIHJpbmcgYml0ICovCisJdHhkZXMtPnR4ZGVzMCAmPSBjcHVfdG9fbGUzMihGVEdNQUMxMDBfVFhERVMwX0VET1RSKTsKKwl0eGRlcy0+dHhkZXMxID0gMDsKKwl0eGRlcy0+dHhkZXMyID0gMDsKKwl0eGRlcy0+dHhkZXMzID0gMDsKK30KKworc3RhdGljIGJvb2wgZnRnbWFjMTAwX3R4ZGVzX293bmVkX2J5X2RtYShzdHJ1Y3QgZnRnbWFjMTAwX3R4ZGVzICp0eGRlcykKK3sKKwlyZXR1cm4gdHhkZXMtPnR4ZGVzMCAmIGNwdV90b19sZTMyKEZUR01BQzEwMF9UWERFUzBfVFhETUFfT1dOKTsKK30KKworc3RhdGljIHZvaWQgZnRnbWFjMTAwX3R4ZGVzX3NldF9kbWFfb3duKHN0cnVjdCBmdGdtYWMxMDBfdHhkZXMgKnR4ZGVzKQoreworCS8qCisJICogTWFrZSBzdXJlIGRtYSBvd24gYml0IHdpbGwgbm90IGJlIHNldCBiZWZvcmUgYW55IG90aGVyCisJICogZGVzY3JpcHRvciBmaWVsZHMuCisJICovCisJd21iKCk7CisJdHhkZXMtPnR4ZGVzMCB8PSBjcHVfdG9fbGUzMihGVEdNQUMxMDBfVFhERVMwX1RYRE1BX09XTik7Cit9CisKK3N0YXRpYyB2b2lkIGZ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GZ0Z21hYzEwMF90eGRlcyAqdHhkZXMsCisJCQkJICAgIHN0cnVjdCBza19idWZmICpza2IpCit7CisJdHhkZXMtPnR4ZGVzMiA9ICh1bnNpZ25lZCBpbnQpc2tiOworfQorCitzdGF0aWMgc3RydWN0IHNrX2J1ZmYgKmZ0Z21hYzEwMF90eGRlc19nZXRfc2tiKHN0cnVjdCBmdGdtYWMxMDBfdHhkZXMgKnR4ZGVzKQoreworCXJldHVybiAoc3RydWN0IHNrX2J1ZmYgKil0eGRlcy0+dHhkZXMyOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBpbnRlcm5hbCBmdW5jdGlvbnMgKHRyYW5zbWl0KQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBmdGdtYWMxMDBfbmV4dF90eF9wb2ludGVyKGludCBwb2ludGVyKQoreworCXJldHVybiAocG9pbnRlciArIDEpICYgKFRYX1FVRVVFX0VOVFJJRVMgLSAxKTsKK30KKworc3RhdGljIHZvaWQgZnRnbWFjMTAwX3R4X3BvaW50ZXJfYWR2YW5jZShzdHJ1Y3QgZnRnbWFjMTAwICpwcml2KQoreworCXByaXYtPnR4X3BvaW50ZXIgPSBmdGdtYWMxMDBfbmV4dF90eF9wb2ludGVyKHByaXYtPnR4X3BvaW50ZXIpOworfQorCitzdGF0aWMgdm9pZCBmdGdtYWMxMDBfdHhfY2xlYW5fcG9pbnRlcl9hZHZhbmNlKHN0cnVjdCBmdGdtYWMxMDAgKnByaXYpCit7CisJcHJpdi0+dHhfY2xlYW5fcG9pbnRlciA9IGZ0Z21hYzEwMF9uZXh0X3R4X3BvaW50ZXIocHJpdi0+dHhfY2xlYW5fcG9pbnRlcik7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgZnRnbWFjMTAw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zLT50eGRlc1tUWF9RVUVVRV9FTlRSSUVTIC0gMV0pOworCXJldHVybiAwOworCitlcnI6CisJZnRnbWFjMTAwX2ZyZWVfYnVmZmVycyhwcml2KTsKKwlyZXR1cm4gLUVOT01FTTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogaW50ZXJuYWwgZnVuY3Rpb25zIChtZGlvKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgZnRnbWFjMTAwX2FkanVzdF9saW5rKHN0cnVjdCBuZXRfZGV2aWNlICpuZXRkZXYpCit7CisJc3RydWN0IGZ0Z21hYzEwMCAqcHJpdiA9IG5ldGRldl9wcml2KG5ldGRldik7CisJc3RydWN0IHBoeV9kZXZpY2UgKnBoeWRldiA9IHByaXYtPnBoeWRldjsKKwlpbnQgaWVyOworCisJaWYgKHBoeWRldi0+c3BlZWQgPT0gcHJpdi0+b2xkX3NwZWVkKQorCQlyZXR1cm47CisKKwlwcml2LT5vbGRfc3BlZWQgPSBwaHlkZXYtPnNwZWVkOworCisJaWVyID0gaW9yZWFkMzIocHJpdi0+YmFzZSArIEZUR01BQzEwMF9PRkZTRVRfSUVSKTsKKworCS8qIGRpc2FibGUgYWxsIGludGVycnVwdHMgKi8KKwlpb3dyaXRlMzIoMCwgcHJpdi0+YmFzZSArIEZUR01BQzEwMF9PRkZTRVRfSUVSKTsKKworCW5ldGlmX3N0b3BfcXVldWUobmV0ZGV2KTsKKwlmdGdtYWMxMDBfc3RvcF9odyhwcml2KTsKKworCW5ldGlmX3N0YXJ0X3F1ZXVlKG5ldGRldik7CisJZnRnbWFjMTAwX2luaXRfaHcocHJpdik7CisJZnRnbWFjMTAwX3N0YXJ0X2h3KHByaXYsIHBoeWRldi0+c3BlZWQpOworCisJLyogcm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XJuIFBUUl9FUlIocGh5ZGV2KTsKKwl9CisKKwlwcml2LT5waHlkZXYgPSBwaHlkZXY7CisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIHN0cnVjdCBtaWlfYnVzIGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBmdGdtYWMxMDBfbWRpb2J1c19yZWFkKHN0cnVjdCBtaWlfYnVzICpidXMsIGludCBwaHlfYWRkciwgaW50IHJlZ251bSkKK3sKKwlzdHJ1Y3QgbmV0X2RldmljZSAqbmV0ZGV2ID0gYnVzLT5wcml2OworCXN0cnVjdCBmdGdtYWMxMDAgKnByaXYgPSBuZXRkZXZfcHJpdihuZXRkZXYpOworCXVuc2lnbmVkIGludCBwaHljcjsKKwlpbnQgaTsKKworCXBoeWNyID0gaW9yZWFkMzIocHJpdi0+YmFzZSArIEZUR01BQzEwMF9PRkZTRVRfUEhZQ1IpOworCisJLyogcHJlc2VydmUgTURDIGN5Y2xlIHRocmVzaG9sZCAqLworCXBoeWNyICY9IEZUR01BQzEwMF9QSFlDUl9NRENfQ1lDVEhSX01BU0s7CisKKwlwaHljciB8PSBGVEdNQUMxMDBfUEhZQ1JfUEhZQUQocGh5X2FkZHIpIHwKKwkJIEZUR01BQzEwMF9QSFlDUl9SRUdBRChyZWdudW0pIHwKKwkJIEZUR01BQzEwMF9QSFlDUl9NSUlSRDsKKworCWlvd3JpdGUzMihwaHljciwgcHJpdi0+YmFzZSArIEZUR01BQzEwMF9PRkZTRVRfUEhZQ1IpOworCisJZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKKwkJcGh5Y3IgPSBpb3JlYWQzMihwcml2LT5iYXNlICsgRlRHTUFDMTAwX09GRlNFVF9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cHJpdi0+YmFzZSArIEZUR01BQzEwMF9PRkZTRVRfUEhZREFUQSk7CisJaW93cml0ZTMyKHBoeWNyLCBwcml2LT5iYXNlICsgRlRHTUFDMTAwX09GRlNFVF9QSFlDUik7CisKKwlmb3IgKGkgPSAwOyBpIDwgMTA7IGkrKykgeworCQlwaHljciA9IGlvcmVhZDMyKHByaXYtPmJhc2UgKyBGVEdNQUMxMDBfT0ZGU0VUX1BIWUNSKTsKKworCQlpZiAoKHBoeWNyICYgRlRHTUFDMTAwX1BIWUNSX01JSVdSKSA9PSAwKQorCQkJcmV0dXJuIDA7CisKKwkJdWRlbGF5KDEwMCk7CisJfQorCisJbmV0ZGV2X2VycihuZXRkZXYsICJtZGlvIHdyaXRlIHRpbWVkIG91dFxuIik7CisJcmV0dXJuIC1FSU87Cit9CisKK3N0YXRpYyBpbnQgZnRnbWFjMTAwX21kaW9idXNfcmVzZXQoc3RydWN0IG1paV9idXMgKmJ1cykKK3sKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogc3RydWN0IGV0aHRvb2xfb3BzIGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgZnRnbWFjMTAwX2dldF9kcnZpbmZvKHN0cnVjdCBuZXRfZGV2aWNlICpuZXRkZXYsCisJCQkJICBzdHJ1Y3QgZXRodG9vbF9kcnZpbmZvICppbmZvKQoreworCXN0cmNweShpbmZvLT5kcml2ZXIsIERSVl9OQU1FKTsKKwlzdHJjcHkoaW5mby0+dmVyc2lvbiwgRFJWX1ZFUlNJT04pOworCXN0cmNweShpbmZvLT5idXNfaW5mbywgZGV2X25hbWUoJm5ldGRldi0+ZGV2KSk7Cit9CisKK3N0YXRpYyBpbnQgZnRnbW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ICpkZXZfaWQpCit7CisJc3RydWN0IG5ldF9kZXZpY2UgKm5ldGRldiA9IGRldl9pZDsKKwlzdHJ1Y3QgZnRnbWFjMTAwICpwcml2ID0gbmV0ZGV2X3ByaXYobmV0ZGV2KTsKKworCWlmIChsaWtlbHkobmV0aWZfcnVubmluZyhuZXRkZXYpKSkgeworCQkvKiBEaXNhYmxlIGludGVycnVwdHMgZm9yIHBvbGxpbmcgKi8KKwkJaW93cml0ZTMyKDAsIHByaXYtPmJhc2UgKyBGVEdNQUMxMDBfT0ZGU0VUX0lFUik7CisJCW5hcGlfc2NoZWR1bGUoJnByaXYtPm5hcGkpOworCX0KKworCXJldHVybiBJUlFfSEFORExFRDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogc3RydWN0IG5hcGlfc3RydWN0IGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBmdGdtYWMxMDBfcG9sbChzdHJ1Y3QgbmFwaV9zdHJ1Y3QgKm5hcGksIGludCBidWRnZXQpCit7CisJc3RydWN0IGZ0Z21hYzEwMCAqcHJpdiA9IGNvbnRhaW5lcl9vZihuYXBpLCBzdHJ1Y3QgZnRnbWFjMTAwLCBuYXBpKTsKKwlzdHJ1Y3QgbmV0X2RldmljZSAqbmV0ZGV2ID0gcHJpdi0+bmV0ZGV2OworCXVuc2lnbmVkIGludCBzdGF0dXM7CisJYm9vbCBjb21wbGV0ZWQgPSB0cnVlOworCWludCByeCA9IDA7CisKKwlzdGF0dXMgPSBpb3JlYWQzMihwcml2LT5iYXNlICsgRlRHTUFDMTAwX09GRlNFVF9JU1IpOworCWlvd3JpdGUzMihzdGF0dXMsIHByaXYtPmJhc2UgKyBGVEdNQUMxMDBfT0ZGU0VUX0lTUik7CisKK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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBzdHJ1Y3QgbmV0X2RldmljZV9vcHMgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGZ0Z21hYzEwMF9vcGVuKHN0cnVjdCBuZXRfZGV2aWNlICpuZXRkZXYpCit7CisJc3RydWN0IGZ0Z21hYzEwMCAqcHJpdiA9IG5ldGRldl9wcml2KG5ldGRldik7CisJaW50IGVycjsKKworCWVyciA9IGZ0Z21hYzEwMF9hbGxvY19idWZmZXJzKHByaXYpOworCWlmIChlcnIpIHsKKwkJbmV0ZGV2X2VycihuZXRkZXYsICJmYWlsZWQgdG8gYWxsb2NhdGUgYnVmZmVyc1xuIik7CisJCWdvdG8gZXJyX2FsbG9jOworCX0KKworCWVyciA9IHJlcXVlc3RfaXJxKHByaXYtPmlycSwgZnRnbWFjMTAwX2ludGVycnVwdCwgMCwgbmV0ZGV2LT5uYW1lLCBuZXRkZXYpOworCWlmIChlcnIpIHsKKwkJbmV0ZGV2X2VycihuZXRkZXYsICJmYWlsZWQgdG8gcmVxdWVzdCBpcnEgJWRcbiIsIHByaXYtPmlycSk7CisJCWdvdG8gZXJyX2lycTsKKwl9CisKKwlwcml2LT5yeF9wb2ludGVyID0gMDsKKwlwcml2LT50eF9jbGVhbl9wb2ludGVyID0gMDsKKwlwcml2LT50eF9wb2ludGVyID0gMDsKKwlwcml2LT50eF9wZW5kaW5nID0gMDsKKworCWVyciA9IGZ0Z21hYzEwMF9yZXNldF9odyhwcml2KTsKKwlpZiAoZXJyKQorCQlnb3RvIGVycl9odzsKKworCWZ0Z21hYzEwMF9pbml0X2h3KHByaXYpOworCWZ0Z21hYzEwMF9zdGFydF9odyhwcml2LCAxMCk7CisKKwlwaHlfc3RhcnQoc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ljZV9vcHMgZnRnbWFjMTAwX25ldGRldl9vcHMgPSB7CisJLm5kb19vcGVuCQk9IGZ0Z21hYzEwMF9vcGVuLAorCS5uZG9fc3RvcAkJPSBmdGdtYWMxMDBfc3RvcCwKKwkubmRvX3N0YXJ0X3htaXQJCT0gZnRnbWFjMTAwX2hhcmRfc3RhcnRfeG1pdCwKKwkubmRvX3NldF9tYWNfYWRkcmVzcwk9IGV0aF9tYWNfYWRkciwKKwkubmRvX3ZhbGlkYXRlX2FkZHIJPSBldGhfdmFsaWRhdGVfYWRkciwKKwkubmRvX2RvX2lvY3RsCQk9IGZ0Z21hYzEwMF9kb19pb2N0bCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIHN0cnVjdCBwbGF0Zm9ybV9kcml2ZXIgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGZ0Z21hYzEwMF9wcm9iZShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQoreworCXN0cnVjdCByZXNvdXJjZSAqcmVzOworCWludCBpcnE7CisJc3RydWN0IG5ldF9kZXZpY2UgKm5ldGRldjsKKwlzdHJ1Y3QgZnRnbWFjMTAwICpwcml2OworCWludCBlcnI7CisJaW50IGk7CisKKwlpZiAoIXBkZXYpCisJCXJldHVybiAtRU5PREVWOworCisJcmVzID0gcGxhdGZvcm1fZ2V0X3Jlc291cmNlKHBkZXYsIElPUkVTT1VSQ0VfTUVNLCAwKTsKKwlpZiAoIXJlcykKKwkJcmV0dXJuIC1FTlhJTzsKKworCWlycSA9IHBsYXRmb3JtX2dldF9pcnEocGRldiwgMCk7CisJaWYgKGlycSA8IDApCisJCXJldHVybiBpcnE7CisKKwkvKiBzZXR1cCBuZXRfZGV2aW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KKwl9CisKKwlwcml2LT5iYXNlID0gaW9yZW1hcChyZXMtPnN0YXJ0LCByZXNvdXJjZV9zaXplKHJlcykpOworCWlmICghcHJpdi0+YmFzZSkgeworCQlkZXZfZXJyKCZwZGV2LT5kZXYsICJGYWlsZWQgdG8gaW9yZW1hcCBldGhlcm5ldCByZWdpc3RlcnNcbiIpOworCQllcnIgPSAtRUlPOworCQlnb3RvIGVycl9pb3JlbWFwOworCX0KKworCXByaXYtPmlycSA9IGlycTsKKworCS8qIGluaXRpYWxpemUgbWRpbyBidXMgKi8KKwlwcml2LT5taWlfYnVzID0gbWRpb2J1c19hbGxvYygpOworCWlmICghcHJpdi0+bWlpX2J1cykgeworCQllcnIgPSAtRUlPOworCQlnb3RvIGVycl9hbGxvY19tZGlvYnVzOworCX0KKworCXByaXYtPm1paV9idXMtPm5hbWUgPSAiZnRnbWFjMTAwX21kaW8iOworCXNucHJpbnRmKHByaXYtPm1paV9idXMtPmlkLCBNSUlfQlVTX0lEX1NJWkUsICJmdGdtYWMxMDBfbWlpIik7CisKKwlwcml2LT5taWlfYnVzLT5wcml2ID0gbmV0ZGV2OworCXByaXYtPm1paV9idXMtPnJlYWQgPSBmdGdtYWMxMDBfbWRpb2J1c19yZWFkOworCXByaXYtPm1paV9idXMtPndyaXRlID0gZnRnbWFjMTAwX21kaW9idXNfd3JpdGU7CisJcHJpdi0+bWlpX2J1cy0+cmVzZXQgPSBmdGdtYWMxMDBfbWRpb2J1c19yZXNldDsKKwlwcml2LT5taWlfYnVzLT5pcnEgPSBwcml2LT5waHlfaXJxOworCisJZm9yIChpID0gMDsgaSA8IFBIWV9NQVhfQUREUjsgaSsrKQorCQlwcml2LT5taWlfYnVzLT5pcnFbaV0gPSBQSFlfUE9MTDsKKworCWVyciA9IG1kaW9idXNfcmVnaXN0ZXIocHJpdi0+bWlpX2J1cyk7CisJaWYgKGVycikgeworCQlkZXZfZXJyKCZwZGV2LT5kZXYsICJDYW5ub3QgcmVnaXN0ZXIgTURJT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lCT0gRFJWX05BTUUsCisJCS5vd25lcgk9IFRISVNfTU9EVUxFLAorCX0sCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBpbml0aWFsaXphdGlvbiAvIGZpbmFsaXphdGlvbgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBfX2luaXQgZnRnbWFjMTAwX2luaXQodm9pZCkKK3sKKwlwcl9pbmZvKCJMb2FkaW5nIHZlcnNpb24gIiBEUlZfVkVSU0lPTiAiIC4uLlxuIik7CisJcmV0dXJuIHBsYXRmb3JtX2RyaXZlcl9yZWdpc3RlcigmZnRnbWFjMTAwX2RyaXZlcik7Cit9CisKK3N0YXRpYyB2b2lkIF9fZXhpdCBmdGdtYWMxMDBfZXhpdCh2b2lkKQoreworCXBsYXRmb3JtX2RyaXZlcl91bnJlZ2lzdGVyKCZmdGdtYWMxMDBfZHJpdmVyKTsKK30KKworbW9kdWxlX2luaXQoZnRnbWFjMTAwX2luaXQpOworbW9kdWxlX2V4aXQoZnRnbWFjMTAwX2V4aXQpOworCitNT0RVTEVfQVVUSE9SKCJQby1ZdSBDaHVhbmcgPHJhdGJlcnRAZmFyYWRheS10ZWNoLmNvbT4iKTsKK01PRFVMRV9ERVNDUklQVElPTigiRlRHTUFDMTAwIGRyaXZlciIpOworTU9EVUxFX0xJQ0VOU0UoIkdQTCIpOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvZnRnbWFjMTAwLmggYi9kcml2ZXJzL25ldC9mdGdtYWMxMDAuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4xMzQwOGQ0Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9uZXQvZnRnbWFjMTAwLmgKQEAgLTAsMCArMSwyNDY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BfbWFjLmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogCiAgIEludGVsKFIpIEdpZ2FiaXQgRXRoZXJuZXQgTGludXggZHJpdmVyCi0gIENvcHlyaWdodChjKSAyMDA3LTIwMDkgSW50ZWwgQ29ycG9yYXRpb24uCisgIENvcHlyaWdodChjKSAyMDA3LTIwMTEgSW50ZWwgQ29ycG9yYXRpb24uCiAKICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQKICAgdW5kZXIgdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbmV0L2lnYi9lMTAwMF9tYnguYyBiL2RyaXZlcnMvbmV0L2lnYi9lMTAwMF9tYnguYwppbmRleCA3OGQ0OGM3Li43NGYyZjExIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC9pZ2IvZTEwMDBfbWJ4LmMKKysrIGIvZHJpdmVycy9uZXQvaWdiL2UxMDAwX21ieC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAogICBJbnRlbChSKSBHaWdhYml0IEV0aGVybmV0IExpbnV4IGRyaXZlcgotICBDb3B5cmlnaHQoYykgMjAwNy0yMDA5IEludGVsIENvcnBvcmF0aW9uLgorICBDb3B5cmlnaHQoYykgMjAwNy0yMDExIEludGVsIENvcnBvcmF0aW9uLgogCiAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpd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3JhZGlvX3dyaXRlKGRldiwgMHgxM0MsIDB4NTUpOworCisJCQlmb3IgKGogPSAwOyBqIDwgMTAwMDA7IGorKykgeworCQkJCWlmIChiNDNfcmFkaW9fcmVhZChkZXYsIDB4MTQwKSAmIDIpIHsKKwkJCQkJaiA9IDA7CisJCQkJCWJyZWFrOworCQkJCX0KKwkJCQl1ZGVsYXkoNTAwKTsKKwkJCX0KKwkJCWlmIChqKQorCQkJCWI0M2VycihkZXYtPndsLCAicmFkaW8gMHgxNDAgdGltZW91dFxuIik7CisKKwkJCWI0M19yYWRpb193cml0ZShkZXYsIDB4MTNDLCAweDE1KTsKKwkJfQorCisJCWI0M19yYWRpb19tYXNrKGRldiwgMHgxN0YsIH4weDEpOworCX0KKworCWI0M19yYWRpb19tYXNrKGRldiwgMHgxMSwgfjB4MDAwOCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogQ2hhbm5lbCBzd2l0Y2hpbmcgb3BzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBiNDNfcGh5X2h0X2NoYW5uZWxfc2V0dXAoc3RydWN0IGI0M193bGRldiAqZGV2LAorCQkJCWNvbnN0IHN0cnVjdCBiNDNfcGh5X2h0X2NoYW5uZWx0YWJfZV9waHkgKmUsCisJCQkJc3RydWN0IGllZWU4MDIxMV9jaGFubmVsICpuZXdfY2hhbm5lbCkKK3sKKwlib29sIG9sZF9iYW5kXzVnaHo7CisJdTggaTsKKworCW9sZF9iYW5kXzVnaHogPSBiNDNfcGh5X3JlYWQoZGV2LCBCNDNfUEhZX0hUX0JBTkRDVEwpICYgMDsgLyogRklYTUUgKi8KKwlpZiAobmV3X2NoYW5uZWwtPmJhbmQgPT0gSUVFRTgwMjExX0JBTkRfNUdIWiAmJiAhb2xkX2JhbmRfNWdoeikgeworCQkvKiBUT0RPICovCisJfSBlbHNlIG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otfTsKLQotc3RhdGljIHN0cnVjdCBpd2xfbmljX29wcyBpd2w2MTUwX25pY19vcHMgPSB7Ci0JLmFkZGl0aW9uYWxfbmljX2NvbmZpZyA9ICZpd2w2MTUwX2FkZGl0aW9uYWxfbmljX2NvbmZpZywKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaXdsX29wcyBpd2w2MDAwX29wcyA9IHsKLQkubGliID0gJml3bDYwMDBfbGliLAotCS5oY21kID0gJml3bGFnbl9oY21kLAotCS51dGlscyA9ICZpd2xhZ25faGNtZF91dGlscywKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaXdsX29wcyBpd2w2MDUwX29wcyA9IHsKLQkubGliID0gJml3bDYwMDBfbGliLAotCS5oY21kID0gJml3bGFnbl9oY21kLAotCS51dGlscyA9ICZpd2xhZ25faGNtZF91dGlscywKLQkubmljID0gJml3bDYwNTBfbmljX29wcywKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaXdsX29wcyBpd2w2MTUwX29wcyA9IHsKLQkubGliID0gJml3bDYwMDBfbGliLAotCS5oY21kID0gJml3bGFnbl9oY21kLAotCS51dGlscyA9ICZpd2xhZ25faGNtZF91dGlscywKLQkubmljID0gJml3bDYxNTBfbmljX29wcywKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaXdsX29wcyBpd2w2MDMwX29wcyA9IHsKLQkubGliID0gJml3bDYwMzBfbGliLAotCS5oY21kID0gJml3bGFnbl9idF9oY21kLAotCS51dGlscyA9ICZpd2xhZ25faGNtZF91dGlscywKKwkudGVtcGVyYXR1cmUgPSBpd2xhZ25fdGVtcGVyYXR1cmUsCiB9OwogCiBzdGF0aWMgc3RydWN0IGl3bF9iYXNlX3BhcmFtcyBpd2w2MDAwX2Jhc2VfcGFyYW1zID0gewpAQCAtNDQ2LDcgKzM3MCw3IEBACiAJLnVjb2RlX2FwaV9taW4gPSBJV0w2MDAwRzJfVUNPREVfQVBJX01JT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zY2FuX2NhbmNlbF90aW1lb3V0KHByaXYsIDIwMCk7CiAJaWYgKHJldCkKQEAgLTI0MjAsNiArMjA0OSw3NyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAorc3RhdGljIGNvbnN0IHN0cnVjdCBpZWVlODAyMTFfaWZhY2VfbGltaXQgaXdsYWduX3N0YV9hcF9saW1pdHNbXSA9IHsKKwl7CisJCS5tYXggPSAxLAorCQkudHlwZXMgPSBCSVQoTkw4MDIxMV9JRlRZUEVfU1RBVElPTiksCisJfSwKKwl7CisJCS5tYXggPSAxLAorCQkudHlwZXMgPSBCSVQoTkw4MDIxMV9JRlRZUEVfQVApLAorCX0sCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IGllZWU4MDIxMV9pZmFjZV9saW1pdCBpd2xhZ25fMnN0YV9saW1pdHNbXSA9IHsKKwl7CisJCS5tYXggPSAyLAorCQkudHlwZXMgPSBCSVQoTkw4MDIxMV9JRlRZUEVfU1RBVElPTiksCisJfSwKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgaWVlZTgwMjExX2lmYWNlX2xpbWl0IGl3bGFnbl9wMnBfc3RhX2dvX2xpbWl0c1tdID0geworCXsKKwkJLm1heCA9IDEsCisJCS50eXBlcyA9IEJJVChOTDgwMjExX0lGVFlQRV9TVEFUSU9OKSwKKwl9LAorCXsKKwkJLm1heCA9IDEsCisJCS50eXBlcyA9IEJJVChOTDgwMjExX0lGVFlQRV9QMlBfR08pIHwKKwkJCSBCSVQoTkw4MDIxMV9JRlRZUEVfQVApLAorCX0sCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IGllZWU4MDIxMV9pZmFjZV9saW1pdCBpd2xhZ25fcDJwXzJzdGFfbGltaXRzW10gPSB7CisJeworCQkubWF4ID0gMiwKKwkJLnR5cGVzID0gQklUKE5MODAyMTFfSUZUWVBFX1NUQV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cmFuczsKIAl9CiAKIAkvKioqKioqKioqKioqKioqKioKQEAgLTM1MjAsNyArMzcwMSw3IEBACiAJZXJyID0gaXdsX2VlcHJvbV9pbml0KHByaXYsIGh3X3Jldik7CiAJaWYgKGVycikgewogCQlJV0xfRVJSKHByaXYsICJVbmFibGUgdG8gaW5pdCBFRVBST01cbiIpOwotCQlnb3RvIG91dF9pb3VubWFwOworCQlnb3RvIG91dF9mcmVlX3RyYW5zOwogCX0KIAllcnIgPSBpd2xfZWVwcm9tX2NoZWNrX3ZlcnNpb24ocHJpdik7CiAJaWYgKGVycikKQEAgLTM1NDMsMTAgKzM3MjQsMTQgQEAKIAkJcHJpdi0+aHctPndpcGh5LT5uX2FkZHJlc3NlcysrOwogCX0KIAorCS8qIGluaXRpYWxpemUgYWxsIHZhbGlkIGNvbnRleHRzICovCisJaXdsX2luaXRfY29udGV4dChwcml2KTsKKwogCS8qKioqKioqKioqKioqKioqKioqKioqKioKIAkgKiA1LiBTZXR1cCBIVyBjb25zdGFudHMKIAkgKioqKioqKioqKioqKioqKioqKioqKioqLwogCWlmIChpd2xfc2V0X2h3X3BhcmFtcyhwcml2KSkgeworCQllcnIgPSAtRU5PRU5UOwogCQlJV0xfRVJSKHByaXYsICJmYWlsZWQgdG8gc2V0IGh3IHBhcmFtZXRlcnNcbiIpOwogCQlnb3RvIG91dF9mcmVlX2VlcHJvbTsKIAl9CkBAIC0zNTYzLDM2ICszNzQ4LDE0IEBACiAJLyoqKioqKioqKioqKioqKioqKioqCiAJICogNy4gU2V0dXAgc2VydmljZXMKIAkgKioqKioqKioqKioqKioqKioqKiovCi0Jc3Bpbl9sb2NrX2lycXNhdmUoJnByaXYtPmxvY2ssIGZsYWdzKTsKLQlpd2xfZGlzYWJsZV9pbnRlcnJ1cHRzKHByaXYpOwotCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJnByaXYtPmxvY2ssIGZsYWdzKTsKLQotCXBjaV9lbmFibGVfbXNpKHByaXYtPnBjaV9kZXY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19JV0xXSUZJX0RFQlVHRlMKIGludCBpd2xfYWxsb2NfdHJhZmZpY19tZW0oc3RydWN0IGl3bF9wcml2ICpwcml2KTsKIHZvaWQgaXdsX2ZyZWVfdHJhZmZpY19tZW0oc3RydWN0IGl3bF9wcml2ICpwcml2KTsKQEAgLTM5MCwyOCArMzM0LDggQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiBSWAogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCBpd2xfY21kX3F1ZXVlX2ZyZWUoc3RydWN0IGl3bF9wcml2ICpwcml2KTsKLXZvaWQgaXdsX2NtZF9xdWV1ZV91bm1hcChzdHJ1Y3QgaXdsX3ByaXYgKnByaXYpOwotaW50IGl3bF9yeF9xdWV1ZV9hbGxvYyhzdHJ1Y3QgaXdsX3ByaXYgKnByaXYpOwotdm9pZCBpd2xfcnhfcXVldWVfdXBkYXRlX3dyaXRlX3B0cihzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsCi0JCQkJICBzdHJ1Y3QgaXdsX3J4X3F1ZXVlICpxKTsKLWludCBpd2xfcnhfcXVldWVfc3BhY2UoY29uc3Qgc3RydWN0IGl3bF9yeF9xdWV1ZSAqcSk7Ci12b2lkIGl3bF90eF9jbWRfY29tcGxldGUoc3RydWN0IGl3bF9wcml2ICpwcml2LCBzdHJ1Y3QgaXdsX3J4X21lbV9idWZmZXIgKnJ4Yik7Ci0KIHZvaWQgaXdsX2Noc3dpdGNoX2RvbmUoc3RydWN0IGl3bF9wcml2ICpwcml2LCBib29sIGlzX3N1Y2Nlc3MpOwogCi0vKiBUWCBoZWxwZXJzICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBUWAotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZ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AqcHJpdiwKLQkJCSAgICBzdHJ1Y3QgaXdsX3J4b25fY29udGV4dCAqY3R4KTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFNjYW5uaW5nCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogdm9pZCBpd2xfaW5pdF9zY2FuX3BhcmFtcyhzdHJ1Y3QgaXdsX3ByaXYgKnByaXYpOwpAQCAtNDY5LDUxICszODYsMTkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogY29uc3QgY2hhciAqZ2V0X2NtZF9zdHJpbmcodTggY21kKTsKLWludCBfX211c3RfY2hlY2sgaXdsX3NlbmRfY21kX3N5bmMoc3RydWN0IGl3bF9wcml2ICpwcml2LAotCQkJCSAgIHN0cnVjdCBpd2xfaG9zdF9jbWQgKmNtZCk7Ci1pbnQgaXdsX3NlbmRfY21kKHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwgc3RydWN0IGl3bF9ob3N0X2NtZCAqY21kKTsKLWludCBfX211c3RfY2hlY2sgaXdsX3NlbmRfY21kX3BkdShzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsIHU4IGlkLAotCQkJCSAgdTE2IGxlbiwgY29uc3Qgdm9pZCAqZGF0YSk7Ci1pbnQgaXdsX3NlbmRfY21kX3BkdV9hc3luYyhzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsIHU4IGlkLCB1MTYgbGVuLAotCQkJICAgY29uc3Qgdm9pZCAqZGF0YSwKLQkJCSAgIHZvaWQgKCpjYWxsYmFjaykoc3RydWN0IGl3bF9wcml2ICpwcml2LAotCQkJCQkgICAgc3RydWN0IGl3bF9kZXZpY2VfY21kICpjbWQsCi0JCQkJCSAgICBzdHJ1Y3Q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aXNoZXMgcnhfZnJlZSBsaXN0IGZyb20gcnhfdXNlZCwgYW5kIGNhbGxzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpd2xfcnhfcXVldWVfcmVzdG9jawotICogaXdsX3J4X3F1ZXVlX3Jlc3RvY2soKSBNb3ZlcyBhdmFpbGFibGUgYnVmZmVycyBmcm9tIHJ4X2ZyZWUgaW50byBSeAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWUsIHVwZGF0ZXMgZmlybXdhcmUgcG9pbnRlcnMsIGFuZCB1cGRhdGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgV1JJVEUgaW5kZXguICBJZiBpbnN1ZmZpY2llbnQgcnhfZnJlZSBidWZmZXJzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmUgYXZhaWxhYmxlLCBzY2hlZHVsZXMgaXdsX3J4X3JlcGxlbmlzaAotICoKLSAqIC0tIGVuYWJsZSBpbnRlcnJ1cHRzIC0tCi0gKiBJU1IgLSBpd2xfcngoKSAgICAgICAgIERldGFjaCBpd2xfcnhfbWVtX2J1ZmZlcnMgZnJvbSBwb29sIHVwIHRvIHRoZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgUkVBRCBJTkRFWCwgZGV0YWNoaW5nIHRoZSBTS0IgZnJvbSB0aGUgcG9vbC4KLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vdmVzIHRoZSBwYWNrZXQgYnVmZmVyIGZyb20gcXVldWUgdG8gcnhfdXNlZC4KLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIENhbGxzIGl3bF9yeF9xdWV1ZV9yZXN0b2NrIHRvIHJlZmlsbCBhbnkgZW1wdHkKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3RzLgotICogLi4uCi0gKgotICovCi0KLS8qKgotICogaXdsX3J4X3F1ZXVlX3NwYWNlIC0gUmV0dXJuIG51bWJlciBvZiBmcmVlIHNsb3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U0EKKyAqCisgKiBUaGUgZnVsbCBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCBpbiB0aGlzIGRpc3RyaWJ1dGlvbiBpbiB0aGUKKyAqIGZpbGUgY2FsbGVkIExJQ0VOU0UuCisgKgorICogQ29udGFjdCBJbmZvcm1hdGlvbjoKKyAqICBJbnRlbCBMaW51eCBXaXJlbGVzcyA8aWx3QGxpbnV4LmludGVsLmNvbT4KKyAqIEludGVsIENvcnBvcmF0aW9uLCA1MjAwIE4uRS4gRWxhbSBZb3VuZyBQYXJrd2F5LCBIaWxsc2Jvcm8sIE9SIDk3MTI0LTY0OTcKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWZuZGVmIF9faXdsX3RyYW5zX2ludF9wY2llX2hfXworI2RlZmluZSBfX2l3bF90cmFuc19pbnRfcGNpZV9oX18KKworLypUaGlzIGZpbGUgaW5jbHVkZXMgdGhlIGRlY2xhcmF0aW9uIHRoYXQgYXJlIGludGVybmFsIHRvIHRoZQorICogdHJhbnNfcGNpZSBsYXllciAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogUlgKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgaXdsX2JnX3J4X3JlcGxlbmlzaChzdHJ1Y3Qgd29ya19zdHJ1Y3QgKmRhdGEpOwordm9pZCBpd2xfaXJxX3Rhc2tsZXQoc3RydWN0IGl3bF9wcml2ICpwcml2KTsKK3ZvaWQgaXdsYWduX3J4X3JlcGxlbmlzaChzdHJ1Y3QgaXdsX3ByaXYgKnByaXYpOwordm9pZCBpd2xfcnhfcXVldWVfdXBkYXRlX3dyaXRlX3B0cihzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsCisJCQlzdHJ1Y3QgaXdsX3J4X3F1ZXVlICpxKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIElDVAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGl3bF9yZXNldF9pY3Qoc3RydWN0IGl3bF9wcml2ICpwcml2KTsKK3ZvaWQgaXdsX2Rpc2FibGVfaWN0KHN0cnVjdCBpd2xfcHJpdiAqcHJpdik7CitpbnQgaXdsX2FsbG9jX2lzcl9pY3Qoc3RydWN0IGl3bF9wcml2ICpwcml2KTsKK3ZvaWQgaXdsX2ZyZWVfaXNyX2ljdChzdHJ1Y3QgaXdsX3ByaXYgKnByaXYpOworaXJxcmV0dXJuX3QgaXdsX2lzcl9pY3QoaW50IGlycSwgdm9pZCAqZGF0YSk7CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIFRYIC8gSENNRAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBpd2xfdHhxX3VwZGF0ZV93cml0ZV9wdHIoc3RydWN0IGl3bF9wcml2ICpwcml2LCBzdHJ1Y3QgaXdsX3R4X3F1ZXVlICp0eHEpOwordm9pZCBpd2xhZ25fdHhxX2ZyZWVfdGZkKHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwgc3RydWN0IGl3bF90eF9xdWV1ZSAqdHhxLAorCQkJCWludCBpbmRleCk7CitpbnQgaXdsYWduX3R4cV9hdHRhY2hfYnVmX3RvX3RmZChzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsCisJCQkJIHN0cnVjdCBpd2xfdHhfcXVldWUgKnR4cSwKKwkJCQkgZG1hX2FkZHJfdCBhZGRyLCB1MTYgbGVuLCB1OCByZXNldCk7CitpbnQgaXdsX3F1ZXVlX2luaXQoc3RydWN0IGl3bF9wcml2ICpwcml2L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LWVuYWJsZSBSRl9LSUxMIGlmIGl0IG9jY3VycmVkICovCisJZWxzZSBpZiAoaGFuZGxlZCAmIENTUl9JTlRfQklUX1JGX0tJTEwpCisJCWl3bF9lbmFibGVfcmZraWxsX2ludChwcml2KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIElDVCBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBJQ1RfQ09VTlQgKFBBR0VfU0laRS9zaXplb2YodTMyKSkKKworLyogRnJlZSBkcmFtIHRhYmxlICovCit2b2lkIGl3bF9mcmVlX2lzcl9pY3Qoc3RydWN0IGl3bF9wcml2ICpwcml2KQoreworCWlmIChwcml2LT5pY3RfdGJsX3ZpcikgeworCQlkbWFfZnJlZV9jb2hlcmVudChwcml2LT5idXMtPmRldiwKKwkJCQkgIChzaXplb2YodTMyKSAqIElDVF9DT1VOVCkgKyBQQUdFX1NJWkUsCisJCQkJICBwcml2LT5pY3RfdGJsX3ZpciwKKwkJCQkgIHByaXYtPmljdF90YmxfZG1hKTsKKwkJcHJpdi0+aWN0X3RibF92aXIgPSBOVUxMOworCQltZW1zZXQoJnByaXYtPmljdF90YmxfZG1hLCAwLAorCQkJc2l6ZW9mKHByaXYtPmljdF90YmxfZG1hKSk7CisJCW1lbXNldCgmcHJpdi0+YWxpZ25lZF9pY3RfdGJsX2RtYSwgMCwKKwkJCXNpemVvZihwcml2LT5hbGlnbmVkX2ljdF90YmxfZG1hKSk7CisJfQorfQorCisKKy8qIGFsbG9jYXRlIGRyYW0gc2hhcmVkIHRhYmxlIGl0IGlzIGEgUEFHRV9TSVpFIGFsaWduZWQKKyAqIGFsc28gcmVzZXQgYWxsIGRhdGEgcmVsYXRlZCB0byBJQ1Qg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Qgd2lsbCBlbmFibGUgaXQuCisJCSAqLworCQlpd2xfZW5hYmxlX2ludGVycnVwdHMocHJpdik7CisJfQorCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcHJpdi0+bG9jaywgZmxhZ3MpOworCXJldHVybiBJUlFfSEFORExFRDsKKworIG5vbmU6CisJLyogcmUtZW5hYmxlIGludGVycnVwdHMgaGVyZSBzaW5jZSB3ZSBkb24ndCBoYXZlIGFueXRoaW5nIHRvIHNlcnZpY2UuCisJICogb25seSBSZS1lbmFibGUgaWYgZGlzYWJsZWQgYnkgaXJxLgorCSAqLworCWlmICh0ZXN0X2JpdChTVEFUVVNfSU5UX0VOQUJMRUQsICZwcml2LT5zdGF0dXMpICYmICFwcml2LT5pbnRhKQorCQlpd2xfZW5hYmxlX2ludGVycnVwdHMocHJpdik7CisKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZwcml2LT5sb2NrLCBmbGFncyk7CisJcmV0dXJuIElSUV9OT05FOworfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvd2lyZWxlc3MvaXdsd2lmaS9pd2wtdHJhbnMtdHgtcGNpZS5jIGIvZHJpdmVycy9uZXQvd2lyZWxlc3MvaXdsd2lmaS9pd2wtdHJhbnMtdHgtcGNpZS5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmE2YjJiMWQKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL25ldC93aXJlbGVzcy9pd2x3aWZpL2l3bC10cmFucy10eC1wY2llLmMKQEAgLTAsMCArMSwxMDM2IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDMgLSAyMDExIEludGVsIENvcnBvcmF0aW9uLiBBbGwgcmlnaHRzIHJlc2VydmVkLgorICoKKyAqIFBvcnRpb25zIG9mIHRo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W5kX2NtZCwKKwkuc2VuZF9jbWRfcGR1ID0gaXdsX3NlbmRfY21kX3BkdSwKKworCS5nZXRfdHhfY21kID0gaXdsX3RyYW5zX2dldF90eF9jbWQsCisJLnR4ID0gaXdsX3RyYW5zX3R4LAorCisJLnR4cV9hZ2dfZGlzYWJsZSA9IGl3bF90cmFuc190eHFfYWdnX2Rpc2FibGUsCisJLnR4cV9hZ2dfc2V0dXAgPSBpd2xfdHJhbnNfdHhxX2FnZ19zZXR1cCwKKworCS5raWNrX25pYyA9IGl3bF90cmFuc19raWNrX25pYywKKworCS5zeW5jX2lycSA9IGl3bF90cmFuc19zeW5jX2lycSwKKwkuZnJlZSA9IGl3bF90cmFuc19mcmVlLAorfTsKKworaW50IGl3bF90cmFuc19yZWdpc3RlcihzdHJ1Y3QgaXdsX3RyYW5zICp0cmFucywgc3RydWN0IGl3bF9wcml2ICpwcml2KQoreworCWludCBlcnI7CisKKwlwcml2LT50cmFucy5vcHMgPSAmdHJhbnNfb3BzOworCXByaXYtPnRyYW5zLnByaXYgPSBwcml2OworCisJdGFza2xldF9pbml0KCZwcml2LT5pcnFfdGFza2xldCwgKHZvaWQgKCopKHVuc2lnbmVkIGxvbmcpKQorCQlpd2xfaXJxX3Rhc2tsZXQsICh1bnNpZ25lZCBsb25nKXByaXYpOworCisJaXdsX2FsbG9jX2lzcl9pY3QocHJpdik7CisKKwllcnIgPSByZXF1ZXN0X2lycShwcml2LT5idXMtPmlycSwgaXdsX2lzcl9pY3QsIElSUUZfU0hBUkVELAorCQlEUlZfTkFNRSwgcHJpdik7CisJaWYgKGVycikgeworCQlJV0xfRVJSKHByaXYsICJFcnJvciBhbGxvY2F0aW5nIElSUSAlZFxuIiwgcHJpdi0+YnVzLT5pcnEpOworCQlpd2xfZnJlZV9pc3JfaWN0KHByaXYpOworCQlyZXR1cm4gZXJyOworCX0KKworCUlOSVRfV09SSygmcHJpdi0+cnhfcmVwbGVuaXNoLCBpd2xfYmdfcnhfcmVwbGVuaXNo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3aWxsIGNhdXNlIHRoZSBkZXZpY2UgdG8gYmUgaW5zdGFudGx5CisJICogZGVzdHJveWVkLCBhbmQgdGhlIGxpYmVydGFzIGRyaXZlciB0aGVuIG5lZWRzIHRvIGVuZCBsYnNfdGhyZWFkLAorCSAqIGxlYWRpbmcgdG8gYSBkZWFkbG9jay4KKwkgKgorCSAqIFdlIHJ1biBpdCBpbiBhIHdvcmtxdWV1ZSB0b3RhbGx5IGluZGVwZW5kZW50IGZyb20gdGhlIGlmX3NkaW9fY2FyZAorCSAqIGluc3RhbmNlIGZvciB0aGF0IHJlYXNvbi4KKwkgKi8KKworCXByX2luZm8oIlJlc2V0dGluZyBjYXJkLi4uIik7CisJbW1jX3JlbW92ZV9ob3N0KHJlc2V0X2hvc3QpOworCW1tY19hZGRfaG9zdChyZXNldF9ob3N0KTsKK30KK3N0YXRpYyBERUNMQVJFX1dPUksoY2FyZF9yZXNldF93b3JrLCBpZl9zZGlvX3Jlc2V0X2NhcmRfd29ya2VyKTsKKworc3RhdGljIHZvaWQgaWZfc2Rpb19yZXNldF9jYXJkKHN0cnVjdCBsYnNfcHJpdmF0ZSAqcHJpdikKK3sKKwlzdHJ1Y3QgaWZfc2Rpb19jYXJkICpjYXJkID0gcHJpdi0+Y2FyZDsKKworCWlmICh3b3JrX3BlbmRpbmcoJmNhcmRfcmVzZXRfd29yaykpCisJCXJldHVybjsKKworCXJlc2V0X2hvc3QgPSBjYXJkLT5mdW5jLT5jYXJkLT5ob3N0OworCXNjaGVkdWxlX3dvcmsoJmNhcmRfcmVzZXRfd29yayk7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogU0RJTyBjYWxsYmFja3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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2luaXQobWVzaF9kZXYpOworCisJLyogRXZlcnl0aGluZyBzdWNjZXNzZnVsICovCisJcmV0ID0gMDsKKwlnb3RvIGRvbmU7CisKK2Vycl91bnJlZ2lzdGVyOgorCXVucmVnaXN0ZXJfbmV0ZGV2KG1lc2hfZGV2KTsKKworZXJyX2ZyZWU6CisJZnJlZV9uZXRkZXYobWVzaF9kZXYpOworCitkb25lOgorCWxic19kZWJfbGVhdmVfYXJncyhMQlNfREVCX01FU0gsICJyZXQgJWQiLCByZXQpOworCXJldHVybiByZXQ7Cit9CisKK3ZvaWQgbGJzX3JlbW92ZV9tZXNoKHN0cnVjdCBsYnNfcHJpdmF0ZSAqcHJpdikKK3sKKwlzdHJ1Y3QgbmV0X2RldmljZSAqbWVzaF9kZXY7CisKKwltZXNoX2RldiA9IHByaXYtPm1lc2hfZGV2OworCWlmICghbWVzaF9kZXYpCisJCXJldHVybjsKKworCWxic19kZWJfZW50ZXIoTEJTX0RFQl9NRVNIKTsKKwluZXRpZl9zdG9wX3F1ZXVlKG1lc2hfZGV2KTsKKwluZXRpZl9jYXJyaWVyX29mZihtZXNoX2Rldik7CisJc3lzZnNfcmVtb3ZlX2dyb3VwKCYobWVzaF9kZXYtPmRldi5rb2JqKSwgJmxic19tZXNoX2F0dHJfZ3JvdXApOworCWxic19wZXJzaXN0X2NvbmZpZ19yZW1vdmUobWVzaF9kZXYpOworCXVucmVnaXN0ZXJfbmV0ZGV2KG1lc2hfZGV2KTsKKwlwcml2LT5tZXNoX2RldiA9IE5VTEw7CisJZnJlZV9uZXRkZXYobWVzaF9kZXYpOworCWxic19kZWJfbGVhdmUoTEJTX0RFQl9NRVNIKTsKK30KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTZW5kaW5nIGFuZCByZWNlaXZpbmcKKyAqLworc3RydWN0IG5ldF9kZXZpY2UgKmxic19tZXNoX3NldF9kZXYoc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hLT5ncm91cCA9IDE7CiAJCW11dGV4X2luaXQoJmRhdGEtPm11dGV4KTsKIAorCQkvKiBFbmFibGUgZnJhbWUgcmV0cmFuc21pc3Npb25zIGZvciBsb3NzeSBjaGFubmVscyAqLworCQlody0+bWF4X3JhdGVzID0gNDsKKwkJaHctPm1heF9yYXRlX3RyaWVzID0gMTE7CisKIAkJLyogV29yayB0byBiZSBkb25lIHByaW9yIHRvIGllZWU4MDIxMV9yZWdpc3Rlcl9odygpICovCiAJCXN3aXRjaCAocmVndGVzdCkgewogCQljYXNlIEhXU0lNX1JFR1RFU1RfRElTQUJMRUQ6CkBAIC0xNTE1LDEyICsxOTMwLDI5IEBACiAJaWYgKGh3c2ltX21vbiA9PSBOVUxMKQogCQlnb3RvIGZhaWxlZDsKIAotCWVyciA9IHJlZ2lzdGVyX25ldGRldihod3NpbV9tb24pOworCXJ0bmxfbG9jaygpOworCisJZXJyID0gZGV2X2FsbG9jX25hbWUoaHdzaW1fbW9uLCBod3NpbV9tb24tPm5hbWUpOwogCWlmIChlcnIgPCAwKQogCQlnb3RvIGZhaWxlZF9tb247CiAKKworCWVyciA9IHJlZ2lzdGVyX25ldGRldmljZShod3NpbV9tb24pOworCWlmIChlcnIgPCAwKQorCQlnb3RvIGZhaWxlZF9tb247CisKKwlydG5sX3VubG9jaygpOworCisJZXJyID0gaHdzaW1faW5pdF9uZXRsaW5rKCk7CisJaWYgKGVyciA8IDApCisJCWdvdG8gZmFpbGVkX25sOworCiAJcmV0dXJuIDA7CiAKK2ZhaWxlZF9ubDoKKwlwcmludGsoS0VSTl9ERUJVRyAibWFjXzgwMjExX2h3c2ltOiBmYWlsZWQgaW5pdGlhbGl6aW5nIG5ldGxpbmtcbiIpOworCXJldHVybiBlcnI7CisKIGZhaWxlZF9tb246CiAJcnRubF91bmxvY2soKTsKIAlmcmVlX25ldGRldihod3NpbV9tb24pOwpAQCAtMTU0MSw2ICsxOTczLDggQEAKIHsKIAlwcmludGsoS0VSTl9ERUJVRy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vbmV0L3dpcmVsZXNzL29yaW5vY28vb3Jpbm9jb19jcy5jIGIvZHJpdmVycy9uZXQvd2lyZWxlc3Mvb3Jpbm9jby9vcmlub2NvX2NzLmMKaW5kZXggODhlM2MwZS4uM2Y3ZmM0YSAxMDA2NDQKLS0tIGEvZHJpdmVycy9uZXQvd2lyZWxlc3Mvb3Jpbm9jby9vcmlub2NvX2NzLmMKKysrIGIvZHJpdmVycy9uZXQvd2lyZWxlc3Mvb3Jpbm9jby9vcmlub2NvX2NzLmMKQEAgLTY1LDcgKzY1LDcgQEAKIHN0YXRpYyB2b2lkIG9yaW5vY29fY3NfZGV0YWNoKHN0cnVjdCBwY21jaWFfZGV2aWNlICpwX2Rldik7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIERldmljZSBtZXRob2RzICAgICAJCQkJCQkgICAgKi8KKy8qIERldmljZSBtZXRob2RzCQkJCQkJICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBpbnQKQEAgLTg5LDcgKzg5LDcgQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogUENNQ0lBIHN0dWZmICAgICAJCQkJCQkgICAgKi8KKy8qIFBDTUNJQSBzdHVmZgkJCQkJCQkgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGludApAQCAtMTM0LDcgKzEzNCw3IEBACiBvcmlub2NvX2NzX2NvbmZpZyhzdHJ1Y3QgcGNtY2lhX2RldmljZSAqbGluaykKIHsKIAlzdHJ1Y3Qgb3Jpbm9jb19wcml2YXRlICpwcml2ID0gbGluay0+cH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CBvbiBvcmlub2NvX2NzLmM6Ci0gKiAJQ29weXJpZ2h0IChDKSBEYXZpZCBHaWJzb24sIExpbnV4Y2FyZSBBdXN0cmFsaWEKKyAqCUNvcHlyaWdodCAoQykgRGF2aWQgR2lic29uLCBMaW51eGNhcmUgQXVzdHJhbGlhCiAgKiBQb3J0aW9ucyBiYXNlZCBvbiBTcGVjdHJ1bTI0dERubGQuYyBmcm9tIG9yaWdpbmFsIHNwZWN0cnVtMjQgZHJpdmVyOgotICogCUNvcHlyaWdodCAoQykgU3ltYm9sIFRlY2hub2xvZ2llcy4KKyAqCUNvcHlyaWdodCAoQykgU3ltYm9sIFRlY2hub2xvZ2llcy4KICAqCiAgKiBTZWUgY29weXJpZ2h0IG5vdGljZSBpbiBmaWxlIG1haW4uYy4KICAqLwpAQCAtMTI1LDcgKzEyNSw3IEBACiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIERldmljZSBtZXRob2RzICAgICAJCQkJCQkgICAgKi8KKy8qIERldmljZSBtZXRob2RzCQkJCQkJICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBpbnQKQEAgLTE1MCw3ICsxNTAsNyBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiBQQ01DSUEgc3R1ZmYgICAgIAkJCQkJCSAgICAqLworLyogUENNQ0lBIHN0dWZmCQkJCQkJCSAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgaW50CkBAIC0xOTcsNyArMTk3LDcgQEAKIHNwZWN0cnVtX2NzX2NvbmZpZyhzdHJ1Y3Qgc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VkQiAqLworCXsweDJiLCAweDJhLCAweDI1LCAweDE1LCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogNCwgLTIuMGRCICovCisJezB4MjgsIDB4MjgsIDB4MjQsIDB4MTQsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9LCAgICAvKiA1LCAtMi41ZEIgKi8KKwl7MHgyNiwgMHgyNSwgMHgyMSwgMHgxMywgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH0sICAgIC8qIDYsIC0zLjBkQiAqLworCXsweDI0LCAweDIzLCAweDFmLCAweDEyLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogNywgLTMuNWRCICovCisJezB4MjIsIDB4MjEsIDB4MWQsIDB4MTEsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9LCAgICAvKiA4LCAtNC4wZEIgKi8KKwl7MHgyMCwgMHgyMCwgMHgxYiwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH0sICAgIC8qIDksIC00LjVkQiAqLworCXsweDFmLCAweDFlLCAweDFhLCAweDBmLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTAsIC01LjBkQiAqLworCXsweDFkLCAweDFjLCAweDE4LCAweDBlLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTEsIC01LjVkQiAqLworCXsweDFiLCAweDFhLCAweDE3LCAweDBlLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTIsIC02LjBkQiAqLworCXsweDFhLCAweDE5LCAweDE2LCAweDBkLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTMsIC02LjVkQiAqLworCXsweDE4LCAweDE3LCAweDE1LCAweDBjLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTQsIC03LjBkQiAqLworCXsweDE3LCAweDE2LCAweDEzLCAweDBiLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTUsIC03LjVkQiAqLworCXsweDE2LCAweDE1LCAweDEyLCAweDBiLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTYsIC04LjBkQiAqLworCXsweDE0LCAweDE0LCAweDExLCAweDBhLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTcsIC04LjVkQiAqLworCXsweDEzLCAweDEzLCAweDEwLCAweDBhLCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTgsIC05LjBkQiAqLworCXsweDEyLCAweDEyLCAweDBmLCAweDA5LCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMTksIC05LjVkQiAqLworCXsweDExLCAweDExLCAweDBmLCAweDA5LCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMjAsIC0xMC4wZEIgKi8KKwl7MHgxMCwgMHgxMCwgMHgwZSwgMHgwOCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH0sICAgIC8qIDIxLCAtMTAuNWRCICovCisJezB4MGYsIDB4MGYsIDB4MGQsIDB4MDgsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9LCAgICAvKiAyMiwgLTExLjBkQiAqLworCXsweDBlLCAweDBlLCAweDBjLCAweDA3LCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMjMsIC0xMS41ZEIgKi8KKwl7MHgwZCwgMHgwZCwgMHgwYywgMHgwNywgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH0sICAgIC8qIDI0LCAtMTIuMGRCICovCisJezB4MGQsIDB4MGMsIDB4MGIsIDB4MDYsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9LCAgICAvKiAyNSwgLTEyLjVkQiAqLworCXsweDBjLCAweDBjLCAweDBhLCAweDA2LCAweDAwLCAweDAwLCAweDAwLCAweDAwfSwgICAgLyogMjYsIC0xMy4wZEIgKi8KKwl7MHgwYiwgMHgwYiwgMHgwYSwgMHgwNiwgMHgwMCwgMHgwMCwgMHg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AweGZmLCAgICAgICAvKiBkZWZhdWx0ICovCiAJCS5zd2FsbG93X2Nsa19kaWZmICAgICAgICAgICAgID0gMHhmZiwgICAgICAgLyogZGVmYXVsdCAqLwogCX0sCisJLnJ4X3N0cmVhbWluZyA9IHsKKwkJLmR1cmF0aW9uICAgICAgICAgICAgICAgICAgICAgID0gMTUwLAorCQkucXVldWVzICAgICAgICAgICAgICAgICAgICAgICAgPSAweDEsCisJCS5pbnRlcnZhbCAgICAgICAgICAgICAgICAgICAgICA9IDIwLAorCQkuYWx3YXlzICAgICAgICAgICAgICAgICAgICAgICAgPSAwLAorCX0sCisJLmZ3bG9nID0geworCQkubW9kZSAgICAgICAgICAgICAgICAgICAgICAgICA9IFdMMTJYWF9GV0xPR19PTl9ERU1BTkQsCisJCS5tZW1fYmxvY2tzICAgICAgICAgICAgICAgICAgID0gMiwKKwkJLnNldmVyaXR5ICAgICAgICAgICAgICAgICAgICAgPSAwLAorCQkudGltZXN0YW1wICAgICAgICAgICAgICAgICAgICA9IFdMMTJYWF9GV0xPR19USU1FU1RBTVBfRElTQUJMRUQsCisJCS5vdXRwdXQgICAgICAgICAgICAgICAgICAgICAgID0gV0wxMlhYX0ZXTE9HX09VVFBVVF9IT1NULAorCQkudGhyZXNob2xkICAgICAgICAgICAgICAgICAgICA9IDAsCisJfSwKIAkuaGNpX2lvX2RzID0gSENJX0lPX0RTXzZNQSwKIH07CiAKK3N0YXRpYyBjaGFyICpmd2xvZ19wYXJhbTsKKwogc3RhdGljIHZvaWQgX193bDEyNzFfb3BfcmVtb3ZlX2ludGVyZmFjZShzdHJ1Y3Qgd2wxMjcxICp3bCwKIAkJCQkJIGJvb2wgcmVzZXRfdHhfcXVldWVzKTsKIHN0YXRpYyB2b2lkIHdsMTI3MV9mcmVlX2FwX2tleXMoc3RydWN0IHdsMTI3MSAqd2wpOwpAQCAtMzg4LDYgKzQwNiwyMiBAQAogc3RhdGljIERFRklORV9NVVRFWCh3bF9saXN0X211dGV4KTsKIHN0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TjBfUlhDUn0sCS8qIDB4MjAgIFNldCB0byBtb25pdG9yICovCi0JICAgIHtFODM5MF9UWE9GRiwgTkVfRU4wX1RYQ1J9LAkvKiAweDAyICBhbmQgbG9vcGJhY2sgbW9kZS4gKi8KLQkgICAgezMyLAlORV9FTjBfUkNOVExPfSwKLQkgICAgezB4MDAsCU5FX0VOMF9SQ05USEl9LAotCSAgICB7MHgwMCwJTkVfRU4wX1JTQVJMT30sCS8qIERNQSBzdGFydGluZyBhdCAweDAwMDAuICovCi0JICAgIHsweDAwLAlORV9FTjBfUlNBUkhJfSwKLQkgICAge0U4MzkwX1JSRUFEK0U4MzkwX1NUQVJULCBORV9DTUR9LAorCWludCBpOworCWludCBlcnI7CisJdW5zaWduZWQgY2hhciBTQV9wcm9tWzMyXTsKKwlpbnQgc3RhcnRfcGFnZSwgc3RvcF9wYWdlOworCXN0YXRpYyB1MzIgem9ycm84MzkwX29mZnNldHNbMTZdID0geworCQkweDAwLCAweDAyLCAweDA0LCAweDA2LCAweDA4LCAweDBhLCAweDBjLCAweDBlLAorCQkweDEwLCAweDEyLCAweDE0LCAweDE2LCAweDE4LCAweDFhLCAweDFjLCAweDFlLAogCX07Ci0JZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUocHJvZ3JhbV9zZXEpOyBpKyspIHsKLQkgICAgel93cml0ZWIocHJvZ3JhbV9zZXFbaV0udmFsdWUsIGlvYWRkciArIHByb2dyYW1fc2VxW2ldLm9mZnNldCk7Ci0JfQotICAgIH0KLSAgICBmb3IgKGkgPSAwOyBpIDwgMTY7IGkrKykgewotCVNBX3Byb21baV0gPSB6X3JlYWRiKGlvYWRkciArIE5FX0RBVEFQT1JUKTsKLQkodm9pZCl6X3JlYWRiKGlvYWRkciArIE5FX0RBVEFQT1JUKTsKLSAgICB9CiAKLSAgICAvKiBXZSBtdXN0IHNldCB0aGUgODM5MCBmb3Igd29yZCBtb2RlLiAqLwotICAgIHpfd3JpdGViKDB4NDksIGlvYWRkciArIE5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WlkKTsKKwlpZiAoIWxpc3RfZW1wdHkod2FpdHEpKQorCQliZmFfcmVxcV9yZXN1bWUoYmZhLCBxaWQpOworfQorCit2b2lkCitiZmFfbXNpeF9hbGwoc3RydWN0IGJmYV9zICpiZmEsIGludCB2ZWMpCit7CisJdTMyCWludHIsIHFpbnRyOworCWludAlxdWV1ZTsKKworCWludHIgPSByZWFkbChiZmEtPmlvY2ZjLmJmYV9yZWdzLmludHJfc3RhdHVzKTsKKwlpZiAoIWludHIpCisJCXJldHVybjsKKworCS8qCisJICogUk1FIGNvbXBsZXRpb24gcXVldWUgaW50ZXJydXB0CisJICovCisJcWludHIgPSBpbnRyICYgX19IRk5fSU5UX1JNRV9NQVNLOworCWlmIChxaW50ciAmJiBiZmEtPnF1ZXVlX3Byb2Nlc3MpIHsKKwkJZm9yIChxdWV1ZSA9IDA7IHF1ZXVlIDwgQkZJX0lPQ19NQVhfQ1FTOyBxdWV1ZSsrKQorCQkJYmZhX2lzcl9yc3BxKGJmYSwgcXVldWUpOworCX0KKworCWludHIgJj0gfnFpbnRyOworCWlmICghaW50cikKKwkJcmV0dXJuOworCisJLyoKKwkgKiBDUEUgY29tcGxldGlvbiBxdWV1ZSBpbnRlcnJ1cHQKKwkgKi8KKwlxaW50ciA9IGludHIgJiBfX0hGTl9JTlRfQ1BFX01BU0s7CisJaWYgKHFpbnRyICYmIGJmYS0+cXVldWVfcHJvY2VzcykgeworCQlmb3IgKHF1ZXVlID0gMDsgcXVldWUgPCBCRklfSU9DX01BWF9DUVM7IHF1ZXVlKyspCisJCQliZmFfaXNyX3JlcXEoYmZhLCBxdWV1ZSk7CisJfQorCWludHIgJj0gfnFpbnRyOworCWlmICghaW50cikKKwkJcmV0dXJuOworCisJYmZhX21zaXhfbHB1X2VycihiZmEsIGludHIpOworfQorCitiZmFfYm9vbGVhbl90CitiZmFfaW50eChzdHJ1Y3QgYmZhX3MgKmJmYSkKK3sKKwl1MzIgaW50ciwgcWludHI7CisJaW50IHF1ZXVl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KiAgbWFjIGFkZHJlc3MgKi8KLQl1OAkJbnVtX21hYzsJLyogIG51bWJlciBvZiBtYWMgYWRkcmVzc2VzICovCi0JdTgJCXJzdjI7Ci0JdTMyCW1mZ190eXBlOwkvKiAgY2FyZCB0eXBlICovCi0JdTgJCXJzdjNbMTA4XTsKLQl1OAkJbWQ1X2Noa3N1bVtCRkFfTUZHX0NIS1NVTV9TSVpFXTsgLyogIG1kNSBjaGVja3N1bSAqLworCXU4CXZlcnNpb247ICAgIC8qITwgbWFudWZhY3R1cmluZyBibG9jayB2ZXJzaW9uICovCisJdTggICAgIG1mZ19zaWdbM107IC8qITwgY2hhcmFjdGVycyAnTScsICdGJywgJ0cnICovCisJdTE2ICAgIG1mZ3NpemU7ICAgIC8qITwgbWZnIGJsb2NrIHNpemUgKi8KKwl1MTYgICAgdTE2X2Noa3N1bTsgLyohPCBvbGQgdTE2IGNoZWNrc3VtICovCisJY2hhciAgICAgICAgYnJjZF9zZXJpYWxudW1bU1RSU1ooQkZBX01GR19TRVJJQUxOVU1fU0laRSldOworCWNoYXIgICAgICAgIGJyY2RfcGFydG51bVtTVFJTWihCRkFfTUZHX1BBUlROVU1fU0laRSldOworCXU4ICAgICBtZmdfZGF5OyAgICAvKiE8IG1hbnVmYWN0dXJpbmcgZGF5ICovCisJdTggICAgIG1mZ19tb250aDsgIC8qITwgbWFudWZhY3R1cmluZyBtb250aCAqLworCXUxNiAgICBtZmdfeWVhcjsgICAvKiE8IG1hbnVmYWN0dXJpbmcgeWVhciAqLworCXd3bl90ICAgICAgIG1mZ193d247ICAgIC8qITwgd3duIGJhc2UgZm9yIHRoaXMgYWRhcHRlciAqLworCXU4ICAgICBudW1fd3duOyAgICAvKiE8IG51bWJlciBvZiB3d25zIGFzc2lnbmVkICovCisJdTggICAgIG1mZ19zcGVlZHM7IC8qITwgc3BlZWRzIGFsbG93ZWQgZm9yIHRoaXMgYWRhcHRlciAqLworCXU4ICAgICByc3ZbMl07CisJY2hhciAgICBzdXBwb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dXJlIHNlbnNvciBxdWVyeSByZXN1bHRzCisgKi8KK3N0cnVjdCBiZmFfZGlhZ19yZXN1bHRzX3RlbXBzZW5zb3JfcyB7CisJdTMyICAgICBzdGF0dXM7CisJdTE2ICAgICB0ZW1wOyAgICAgICAgICAgLyogMTAtYml0IEEvRCB2YWx1ZSAqLworCXUxNiAgICAgYnJkX3RlbXA7ICAgICAgIC8qIDktYml0IGJvYXJkIHRlbXAgKi8KKwl1OCAgICAgIHRzX2p1bmM7ICAgICAgICAvKiBzaG93IGp1bmN0aW9uIHRlbXBzZW5zb3IgICAqLworCXU4ICAgICAgdHNfYnJkOyAgICAgICAgIC8qIHNob3cgYm9hcmQgdGVtcHNlbnNvciAgICAgICovCisJdTggICAgICByc3ZkWzZdOyAgICAgICAgLyoga2VlcCA4IGJ5dGVzIGFsaWdubWVudCAgICAgKi8KK307CisKK3N0cnVjdCBiZmFfZGlhZ190c2Vuc29yX3MgeworCWJmYV9jYl9kaWFnX3QgICBjYmZuOworCXZvaWQgICAgICAgICAgICAqY2Jhcmc7CisJc3RydWN0IGJmYV9kaWFnX3Jlc3VsdHNfdGVtcHNlbnNvcl9zICp0ZW1wOworCXU4ICAgICAgICAgICAgICBsb2NrOworCXU4ICAgICAgICAgICAgICByc3ZbM107CisJdTMyICAgICAgICAgICAgIHN0YXR1czsKKwlzdHJ1Y3QgYmZhX21ib3hfY21kX3MgICBtYmNtZDsKK307CisKK3N0cnVjdCBiZmFfZGlhZ19zZnBzaG93X3MgeworCXN0cnVjdCBzZnBfbWVtX3MgICAgICAgICpzZnBtZW07CisJYmZhX2NiX2RpYWdfdCAgICAgICAgICAgY2JmbjsKKwl2b2lkICAgICAgICAgICAgICAgICAgICAqY2Jhcmc7CisJdTggICAgICBsb2NrOworCXU4ICAgICAgc3RhdGljX2RhdGE7CisJdTggICAgICByc3ZbMl07CisJdTMyICAgICBzdGF0dXM7CisJc3RydWN0IGJmYV9tYm94X2NtZF9zICAgIG1iY21kOworCXU4ICAgICA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01EX1NUQVRVUyAgIDB4MDAwMDAwMDEKLSNkZWZpbmUgTFBVMV9IT1NURk4xX0NNRF9TVEFUICAgICAgICAgICAgMHgwMDAxOTAxYwotI2RlZmluZSBfX0xQVTFfSE9TVEZOMV9NQk9YX0lORk9fTUsgICAgICAweGZmZmZmZmZlCi0jZGVmaW5lIF9fTFBVMV9IT1NURk4xX01CT1hfSU5GT19TSCAgICAgIDEKLSNkZWZpbmUgX19MUFUxX0hPU1RGTjFfTUJPWF9JTkZPKF92KSAgICAgKChfdikgPDwgX19MUFUxX0hPU1RGTjFfTUJPWF9JTkZPX1NIKQotI2RlZmluZSBfX0xQVTFfSE9TVEZOMV9NQk9YX0NNRF9TVEFUVVMgICAweDAwMDAwMDAxCi0jZGVmaW5lIENQRV9RMF9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwMTQKLSNkZWZpbmUgQ1BFX1EwX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDAxYwotI2RlZmluZSBDUEVfUTBfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMDIwCi0jZGVmaW5lIENQRV9RMV9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwMzQKLSNkZWZpbmUgQ1BFX1ExX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDAzYwotI2RlZmluZSBDUEVfUTFfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMDQwCi0jZGVmaW5lIENQRV9RMl9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwNTQKLSNkZWZpbmUgQ1BFX1EyX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDA1YwotI2RlZmluZSBDUEVfUTJfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMDYwCi0jZGVmaW5lIENQRV9RM19ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwNzQKLSNkZWZpbmUgQ1BFX1EzX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDA3YwotI2RlZmluZSBDUEVfUTNfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMDgwCi0jZGVmaW5lIENQRV9RNF9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwOTQKLSNkZWZpbmUgQ1BFX1E0X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDA5YwotI2RlZmluZSBDUEVfUTRfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMGEwCi0jZGVmaW5lIENQRV9RNV9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwYjQKLSNkZWZpbmUgQ1BFX1E1X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDBiYwotI2RlZmluZSBDUEVfUTVfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMGMwCi0jZGVmaW5lIENQRV9RNl9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwZDQKLSNkZWZpbmUgQ1BFX1E2X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDBkYwotI2RlZmluZSBDUEVfUTZfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMGUwCi0jZGVmaW5lIENQRV9RN19ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwZjQKLSNkZWZpbmUgQ1BFX1E3X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDBmYwotI2RlZmluZSBDUEVfUTdfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEwMTAwCi0jZGVmaW5lIFJNRV9RMF9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwMTQKLSNkZWZpbmUgUk1FX1EwX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTAxYwotI2RlZmluZSBSTUVfUTBfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMDIwCi0jZGVmaW5lIFJNRV9RMV9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwMzQKLSNkZWZpbmUgUk1FX1ExX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTAzYwotI2RlZmluZSBSTUVfUTFfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMDQwCi0jZGVmaW5lIFJNRV9RMl9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwNTQKLSNkZWZpbmUgUk1FX1EyX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTA1YwotI2RlZmluZSBSTUVfUTJfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMDYwCi0jZGVmaW5lIFJNRV9RM19ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwNzQKLSNkZWZpbmUgUk1FX1EzX1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTA3YwotI2RlZmluZSBSTUVfUTNfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMDgwCi0jZGVmaW5lIFJNRV9RNF9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwOTQKLSNkZWZpbmUgUk1FX1E0X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTA5YwotI2RlZmluZSBSTUVfUTRfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMGEwCi0jZGVmaW5lIFJNRV9RNV9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwYjQKLSNkZWZpbmUgUk1FX1E1X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTBiYwotI2RlZmluZSBSTUVfUTVfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMGMwCi0jZGVmaW5lIFJNRV9RNl9ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwZDQKLSNkZWZpbmUgUk1FX1E2X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTBkYwotI2RlZmluZSBSTUVfUTZfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMGUwCi0jZGVmaW5lIFJNRV9RN19ERVBUSCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTEwZjQKLSNkZWZpbmUgUk1FX1E3X1BJICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMTBmYwotI2RlZmluZSBSTUVfUTdfQ0kgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDExMTAwCi0jZGVmaW5lIFBTU19DVExfUkVHICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTg4MDAKLSNkZWZpbmUgX19QU1NfSTJDX0NMS19ESVZfTUsgICAgICAgICAgICAgMHgwMDAzMDAwMAotI2RlZmluZSBfX1BTU19JMkNfQ0xLX0RJVl9TSCAgICAgICAgICAgICAxNgotI2RlZmluZSBfX1BTU19JMkNfQ0xLX0RJVihfdikgICAgICAgICAgICAoKF92KSA8PCBfX1BTU19JMkNfQ0xLX0RJVl9TSCkKLSNkZWZpbmUgX19QU1NfTE1FTV9JTklUX0RPTkUgICAgICAgICAgICAgMHgwMDAwMTAwMAotI2RlZmluZSBfX1BTU19MTUVNX1JFU0VUICAgICAgICAgICAgICAgICAweDAwMDAwMjAwCi0jZGVmaW5lIF9fUFNTX0xNRU1fSU5JVF9FTiAgICAgICAgICAgICAgIDB4MDAwMDAxMDAKLSNkZWZpbmUgX19QU1NfTFBVMV9SRVNFVCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMgotI2RlZmluZSBfX1BTU19MUFUwX1JFU0VUICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCi0jZGVmaW5lIFBTU19FUlJfU1RBVFVTX1JFRyAgICAgICAgICAgICAgIDB4MDAwMTg4MTAKLSNkZWZpbmUgX19QU1NfTE1FTTFfQ09SUl9FUlIgICAgICAgICAgICAgMHgwMDAwMDgwMA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BFX1EwICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDFVCi0jZGVmaW5lIF9fSEZOX0lOVF9DUEVfUTEgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMlUKLSNkZWZpbmUgX19IRk5fSU5UX0NQRV9RMiAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA0VQotI2RlZmluZSBfX0hGTl9JTlRfQ1BFX1EzICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDhVCi0jZGVmaW5lIF9fSEZOX0lOVF9DUEVfUTQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMFUKLSNkZWZpbmUgX19IRk5fSU5UX0NQRV9RNSAgICAgICAgICAgICAgICAgICAweDAwMDAwMDIwVQotI2RlZmluZSBfX0hGTl9JTlRfQ1BFX1E2ICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwNDBVCi0jZGVmaW5lIF9fSEZOX0lOVF9DUEVfUTcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA4MFUKLSNkZWZpbmUgX19IRk5fSU5UX1JNRV9RMCAgICAgICAgICAgICAgICAgICAweDAwMDAwMTAwVQotI2RlZmluZSBfX0hGTl9JTlRfUk1FX1ExICAgICAgICAgICAgICAgICAgIDB4MDAwMDAyMDBVCi0jZGVmaW5lIF9fSEZOX0lOVF9STUVfUTIgICAgICAgICAgICAgICAgICAgMHgwMDAwMDQwMFUKLSNkZWZpbmUgX19IRk5fSU5UX1JNRV9RMyAgICAgICAgICAgICAgICAgICAweDAwMDAwODAwVQotI2RlZmluZSBfX0hGTl9JTlRfUk1FX1E0ICAgICAgICAgICAgICAgICAgIDB4MDAwMDEwMDBVCi0jZGVmaW5lIF9fSEZOX0lOVF9STUVfUTUgICAgICAgICAgICAgICAgICAgMHgwMDAwMjAwMFUKLSNkZWZpbmUgX19IRk5fSU5UX1JNRV9RNiAgICAgICAgICAgICAgICAgICAweDAwMDA0MDAwVQotI2RlZmluZSBfX0hGTl9JTlRfUk1FX1E3ICAgICAg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VEVSUlVQVF9DT0FMRVNDRV9OVU1CRVJfTUFYKQorCQlyZXR1cm4gU0NJX0ZBSUxVUkVfSU5WQUxJRF9QQVJBTUVURVJfVkFMVUU7CisKKwkvKgorCSAqICBEZWZpbmVkIGVuY29kaW5nIGZvciBpbnRlcnJ1cHQgY29hbGVzY2luZyB0aW1lb3V0OgorCSAqICAgICAgICAgICAgICBWYWx1ZSAgIE1pbiAgICAgIE1heCAgICAgVW5pdHMKKwkgKiAgICAgICAgICAgICAgLS0tLS0gICAtLS0gICAgICAtLS0gICAgIC0tLS0tCisJICogICAgICAgICAgICAgIDAgICAgICAgLSAgICAgICAgLSAgICAgICBEaXNhYmxlZAorCSAqICAgICAgICAgICAgICAxICAgICAgIDEzLjMgICAgIDIwLjAgICAgbnMKKwkgKiAgICAgICAgICAgICAgMiAgICAgICAyNi43ICAgICA0MC4wCisJICogICAgICAgICAgICAgIDMgICAgICAgNTMuMyAgICAgODAuMAorCSAqICAgICAgICAgICAgICA0ICAgICAgIDEwNi43ICAgIDE2MC4wCisJICogICAgICAgICAgICAgIDUgICAgICAgMjEzLjMgICAgMzIwLjAKKwkgKiAgICAgICAgICAgICAgNiAgICAgICA0MjYuNyAgICA2NDAuMAorCSAqICAgICAgICAgICAgICA3ICAgICAgIDg1My4zICAgIDEyODAuMAorCSAqICAgICAgICAgICAgICA4ICAgICAgIDEuNyAgICAgIDIuNiAgICAgdXMKKwkgKiAgICAgICAgICAgICAgOSAgICAgICAzLjQgICAgICA1LjEKKwkgKiAgICAgICAgICAgICAgMTAgICAgICA2LjggICAgICAxMC4yCisJICogICAgICAgICAgICAgIDExICAgICAgMTMuNyAgICAgMjAuNQorCSAqICAgICAgICAgICAgICAxMiAgICAgIDI3LjMgICAgIDQxLjAKKwkgKiAgICAgICAgICAgICAgMTMgICAgICA1NC42ICAgICA4MS45CisJICogICAgICAgICAgICAgIDE0ICAgICAgMTA5LjIgICAgMTYzLjgKKwkgKiAgICAgICAgICAgICAgMTUgICAgICAyMTguNSAgICAzMjcuNworCSAqICAgICAgICAgICAgICAxNiAgICAgIDQzNi45ICAgIDY1NS40CisJICogICAgICAgICAgICAgIDE3ICAgICAgODczLjggICAgMTMxMC43CisJICogICAgICAgICAgICAgIDE4ICAgICAgMS43ICAgICAgMi42ICAgICBtcworCSAqICAgICAgICAgICAgICAxOSAgICAgIDMuNSAgICAgIDUuMgorCSAqICAgICAgICAgICAgICAyMCAgICAgIDcuMCAgICAgIDEwLjUKKwkgKiAgICAgICAgICAgICAgMjEgICAgICAxNC4wICAgICAyMS4wCisJICogICAgICAgICAgICAgIDIyICAgICAgMjguMCAgICAgNDEuOQorCSAqICAgICAgICAgICAgICAyMyAgICAgIDU1LjkgICAgIDgzLjkKKwkgKiAgICAgICAgICAgICAgMjQgICAgICAxMTEuOCAgICAxNjcuOAorCSAqICAgICAgICAgICAgICAyNSAgICAgIDIyMy43ICAgIDMzNS41CisJICogICAgICAgICAgICAgIDI2ICAgICAgNDQ3LjQgICAgNjcxLjEKKwkgKiAgICAgICAgICAgICAgMjcgICAgICA4OTQuOCAgICAxMzQyLjIKKwkgKiAgICAgICAgICAgICAgMjggICAgICAxLjggICAgICAyLjcgICAgIHMKKwkgKiAgICAgICAgICAgICAgT3RoZXJzIFVuZGVmaW5lZCAqLworCisJLyoKKwkgKiBVc2UgdGhlIHRhYmxlIGFib3ZlIHRvIGRlY2lkZSB0aGUgZW5jb2RlIG9mIGludGVycnVwdCBjb2FsZXNjaW5nIHRpbWVvdXQKKwkgKiB2YWx1ZSBmb3IgcmVnaXN0ZXIgd3JpdGluZy4gKi8KKwlpZiAoY29hbGVzY2VfdGltZW91dCA9PSAwKQorCQl0aW1lb3V0X2VuY29kZSA9IDA7CisJZWxzZXsKKwkJLyogbWFrZSB0aGUgdGltZW91dCB2YWx1ZSBpbiB1bml0IG9mICgxMCBucykuICovCisJCWNvYWxlc2NlX3RpbWVvdXQgPSBjb2FsZXNjZV90aW1lb3V0ICogMTAwOworCQltaW4gPSBJTlRFU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zaG9zdCk7Cit9CisKK3N0YXRpYyBpbnQgX19kZXZpbml0IGlzY2lfcGNpX2luaXQoc3RydWN0IHBjaV9kZXYgKnBkZXYpCit7CisJaW50IGVyciwgYmFyX251bSwgYmFyX21hc2sgPSAwOworCXZvaWQgX19pb21lbSAqIGNvbnN0ICppb21hcDsKKworCWVyciA9IHBjaW1fZW5hYmxlX2RldmljZShwZGV2KTsKKwlpZiAoZXJyKSB7CisJCWRldl9lcnIoJnBkZXYtPmRldiwKKwkJCSJmYWlsZWQgZW5hYmxlIFBDSSBkZXZpY2UgJXMhXG4iLAorCQkJcGNpX25hbWUocGRldikpOworCQlyZXR1cm4gZXJyOworCX0KKworCWZvciAoYmFyX251bSA9IDA7IGJhcl9udW0gPCBTQ0lfUENJX0JBUl9DT1VOVDsgYmFyX251bSsrKQorCQliYXJfbWFzayB8PSAxIDw8IChiYXJfbnVtICogMik7CisKKwllcnIgPSBwY2ltX2lvbWFwX3JlZ2lvbnMocGRldiwgYmFyX21hc2ssIERSVl9OQU1FKTsKKwlpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJaW9tYXAgPSBwY2ltX2lvbWFwX3RhYmxlKHBkZXYpOworCWlmICghaW9tYXApCisJCXJldHVybiAtRU5PTUVNOworCisJcGNpX3NldF9tYXN0ZXIocGRldik7CisKKwllcnIgPSBwY2lfc2V0X2RtYV9tYXNrKHBkZXYsIERNQV9CSVRfTUFTSyg2NCkpOworCWlmIChlcnIpIHsKKwkJZXJyID0gcGNpX3NldF9kbWFfbWFzayhwZGV2LCBETUFfQklUX01BU0soMzIpKTsKKwkJaWYgKGVycikKKwkJCXJldHVybiBlcnI7CisJfQorCisJZXJyID0gcGNpX3NldF9jb25zaXN0ZW50X2RtYV9tYXNrKHBkZXYsIERNQV9CSVRfTUFTSyg2NCkpOworCWlmIChlcnIpIHsKKwkJZXJyID0gcGNpX3NldF9jb25zaXN0ZW50X2RtYV9tYXNrKHBkZXYsIERNQV9CSVRfTUFTSygzMikpOwor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iBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFLgorICovCisKKyNpbmNsdWRlICJob3N0LmgiCisKKyNkZWZpbmUgU0NJQ19TRFNfTVBDX1JFQ09ORklHVVJBVElPTl9USU1FT1VUICAgICgxMCkKKyNkZWZpbmUgU0NJQ19TRFNfQVBDX1JFQ09ORklHVVJBVElPTl9USU1FT1VUICAgICgxMCkKKyNkZWZpbmUgU0NJQ19TRFNfQVBDX1dBSVRfTElOS19VUF9OT1RJRklDQVRJT04gICgxMDApCisKK2VudW0gU0NJQ19TRFNfQVBDX0FDVElWSVRZIHsKKwlTQ0lDX1NEU19BUENfU0tJUF9QSFksCisJU0NJQ19TRFNfQVBDX0FERF9QSFksCisJU0NJQ19TRFNfQVBDX1NUQVJUX1RJTUVSLAorCisJU0NJQ19TRFNfQVBDX0FDVElWSVRZX01BWAorfTsKKworLyoKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogR2VuZXJhbCBwb3J0IGNvbmZpZ3VyYXRpb24gYWdlbnQgcm91dGluZXMKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisvKioKKyAqCisgKiBAYWRkcmVzc19vbmU6IEEgU0FTIEFkZHJlc3MgdG8gYmUgY29tcGFyZWQuCisgKiBAYWRkcmVzc190d286IEEgU0FTIEFkZHJlc3MgdG8gYmUgY29tcGFyZWQuCisgKgorICogQ29tcGFyZSB0aGUgdHdvIFNBUyBBZGRyZXNzIGFuZCBpZiBTQVMgQWRkcmVzcyBPbmUgaXMgZ3JlYXRlciB0aGFuIFNBUworICogQWRkcmVzcyBUd28gdGhlbiByZXR1cm4gPiAwIGVsc2UgaWYgU0FTIEFkZHJl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ZSBTTVVfSU5URVJSVVBUX1NUQVRVU19RVUVVRV9TVVNQRU5EX1NISUZUICAgICgxKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX1NUQVRVU19RVUVVRV9TVVNQRU5EX01BU0sgICAgICgweDAwMDAwMDAyKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX1NUQVRVU19RVUVVRV9FUlJPUl9TSElGVCAgICAgICgwKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX1NUQVRVU19RVUVVRV9FUlJPUl9NQVNLICAgICAgICgweDAwMDAwMDAxKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX1NUQVRVU19SRVNFUlZFRF9NQVNLICAgICAgICAgICgweDdGRkZGRkZDKQorCisjZGVmaW5lIFNNVV9JU1JfR0VOX0JJVChuYW1lKSBcCisJU0NVX0dFTl9CSVQoU01VX0lOVEVSUlVQVF9TVEFUVVNfICMjIG5hbWUpCisKKyNkZWZpbmUgU01VX0lTUl9RVUVVRV9FUlJPUiAgIFNNVV9JU1JfR0VOX0JJVChRVUVVRV9FUlJPUikKKyNkZWZpbmUgU01VX0lTUl9RVUVVRV9TVVNQRU5EIFNNVV9JU1JfR0VOX0JJVChRVUVVRV9TVVNQRU5EKQorI2RlZmluZSBTTVVfSVNSX0NPTVBMRVRJT04gICAgU01VX0lTUl9HRU5fQklUKENPTVBMRVRJT04pCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIFNNVV9JTlRFUlJVUFRfTUFTS19DT01QTEVUSU9OX1NISUZUICAgICAgICAgKDMxKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX01BU0tfQ09NUExFVElPTl9NQVNLICAgICAgICAgICgweDgwMDAwMDAwKQorI2RlZmluZSBTTVVfSU5URVJSVVBUX01BU0tfUVVFVUVfU1VTUEVORF9TSElGVCAgICAgICgxKQorI2RlZmluZSBTTVVfSU5URVJ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cyAqLworI2RlZmluZSBTTVVfUkVTRVRfUFJPVE9DT0xfRU5HSU5FX0dST1VQKHBlZykgXAorCShcCisJCSgxIDw8ICgocGVnKSArIDIwKSkgXAorCQl8IFNNVV9SRVNFVF9XSURFX1BPUlRfUVVFVUUocGVnLCAwKSBcCisJCXwgU01VX1JFU0VUX1dJREVfUE9SVF9RVUVVRShwZWcsIDEpIFwKKwkJfCBTTVVfUkVTRVRfUEVHX1BST1RPQ09MX0VOR0lORVMocGVnKSBcCisJKQorCisjZGVmaW5lIFNNVV9SRVNFVF9BTExfUFJPVE9DT0xfRU5HSU5FX0dST1VQUygpIFwKKwkoXAorCQlTTVVfUkVTRVRfUFJPVE9DT0xfRU5HSU5FX0dST1VQKDApIFwKKwkJfCBTTVVfUkVTRVRfUFJPVE9DT0xfRU5HSU5FX0dST1VQKDEpIFwKKwkpCisKKyNkZWZpbmUgU01VX1JFU0VUX1NDVSgpICAoMHhGRkZGRkZGRikKKworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIFNNVV9UQVNLX0NPTlRFWFRfQVNTSUdOTUVOVF9TVEFSVElOR19TSElGVCAgICAgICAgICAgICAgKDApCisjZGVmaW5lIFNNVV9UQVNLX0NPTlRFWFRfQVNTSUdOTUVOVF9TVEFSVElOR19NQVNLICAgICAgICAgICAgICAgKDB4MDAwMDBGRkYpCisjZGVmaW5lIFNNVV9UQVNLX0NPTlRFWFRfQVNTSUdOTUVOVF9FTkRJTkdfU0hJRlQgICAgICAgICAgICAgICAgKDE2KQorI2RlZmluZSBTTVVfVEFTS19DT05URVhUX0FTU0lHTk1FTlRfRU5ESU5HX01BU0sgICAgICAgICAgICAgICAgICgweDBGRkYwMDAwKQorI2RlZmluZSBTTVVfVEFTS19DT05URVhUX0FTU0lHTk1FTlRfUkFOR0VfQ0hFQ0tfRU5BQkxFX1NISUZUICAgICg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19GRVRDSF9TSElGVCAgICAgICAgKDIxKQorI2RlZmluZSBTQ1VfUERNQV9DT05GSUdVUkFUSU9OX0JJR19FTkRJQU5fQ09OVFJPTF9YUElfVUZfQUREUkVTU19GRVRDSF9NQVNLICAgICAgICAgKDB4MDAyMDAwMDApCisjZGVmaW5lIFNDVV9QRE1BX0NPTkZJR1VSQVRJT05fQUREUkVTU19NT0RJRklFUl9TRUxFQ1RfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAoMjIpCisjZGVmaW5lIFNDVV9QRE1BX0NPTkZJR1VSQVRJT05fQUREUkVTU19NT0RJRklFUl9TRUxFQ1RfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDQwMDAwMCkKKyNkZWZpbmUgU0NVX1BETUFfQ09ORklHVVJBVElPTl9SRVNFUlZFRF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweEZGODAwMDAwKQorCisjZGVmaW5lIFNDVV9QRE1BQ1JfR0VOX1ZBTFVFKG5hbWUsIHZhbHVlKSBcCisJU0NVX0dFTl9WQUxVRShTQ1VfUERNQV9DT05GSUdVUkFUSU9OXyAjIyBuYW1lLCB2YWx1ZSkKKworI2RlZmluZSBTQ1VfUERNQUNSX0dFTl9CSVQobmFtZSkgXAorCVNDVV9HRU5fQklUKFNDVV9QRE1BX0NPTkZJR1VSQVRJT05fICMjIG5hbWUpCisKKyNkZWZpbmUgU0NVX1BETUFDUl9CRV9HRU5fQklUKG5hbWUpIFwKKwlTQ1VfUENNQUNSX0dFTl9CSVQoQklHX0VORElBTl9DT05UUk9MXyAjIyBuYW1lKQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworI2RlZmluZSBTQ1VfQ0RNQV9DT05GSUdVUkFUSU9OX1BDSV9SRUxBWEVEX09SREVSSU5HX0VOQUJMRV9TSElGVCAgICAgICAgICAgICAgICAgICAgKDgpCisjZGVmaW5lIFNDVV9DRE1BX0NPTkZJR1VSQVRJT05fUENJX1JFTEFYRURfT1JERVJJTkdfRU5BQkxFX01BU0sgICAgICAgICAgICAgICAgICAgICAoMHgwMDAwMDEwMCkKKworI2RlZmluZSBTQ1VfQ0RNQUNSX0dFTl9CSVQobmFtZSkgXAorCVNDVV9HRU5fQklUKFNDVV9DRE1BX0NPTkZJR1VSQVRJT05fICMjIG5hbWUpCisKKy8qCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogKiBTQ1UgTGluayBMYXllciBSZWdpc3RlcnMKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIFNDVV9MSU5LX0xBWUVSX1NQRUVEX05FR09USUFUSU9OX1RJTUVSX1ZBTFVFU19USU1FT1VUX1NISUZUICAgICAgICAgICAgICgwKQorI2RlZmluZSBTQ1VfTElOS19MQVlFUl9TUEVFRF9ORUdPVElBVElPTl9USU1FUl9WQUxVRVNfVElNRU9VVF9NQVNLICAgICAgICAgICAgICAoMHgwMDAwMDBGRikKKyNkZWZpbmUgU0NVX0xJTktfTEFZRVJfU1BFRURfTkVHT1RJQVRJT05fVElNRVJfVkFMVUVTX0xPQ0tfVElNRV9TSElGVCAgICAgICAgICAgKDgpCisjZGVmaW5lIFNDVV9MSU5LX0xBWUVSX1NQRUVEX05FR09USUFUSU9OX1RJTUVSX1ZBTFVFU19MT0NLX1RJTUVfTUFTSyAgICAgICAgICAgICgweDAwMDBGRjAwKQorI2RlZmluZSBTQ1VfTElOS19MQVlFUl9TUEVFRF9ORUdPVElBVElPTl9USU1FUl9WQUxVRVNfUkFURV9DSEFOR0VfREVMQVlfU0hJRlQgICAoMTYpCisjZGVmaW5lIFNDVV9MSU5LX0xBWUVSX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VEFUVVNfVFJBTlNNSVRfUE9SVF9TRUxFQ1RJT05fRE9ORV9TSElGVCAgKDQpCisjZGVmaW5lIFNDVV9MSU5LX1NUQVRVU19UUkFOU01JVF9QT1JUX1NFTEVDVElPTl9ET05FX01BU0sgICAoMHgwMDAwMDAxMCkKKyNkZWZpbmUgU0NVX0xJTktfU1RBVFVTX1JFQ0VJVkVSX0NSRURJVF9FWEhBVVNURURfU0hJRlQgICAgICg1KQorI2RlZmluZSBTQ1VfTElOS19TVEFUVVNfUkVDRUlWRVJfQ1JFRElUX0VYSEFVU1RFRF9NQVNLICAgICAgKDB4MDAwMDAwMjApCisjZGVmaW5lIFNDVV9MSU5LX1NUQVRVU19SRVNFUlZFRF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAoMHhGRkZGRkZDRCkKKworI2RlZmluZSBTQ1VfU0FTX0xMU1RBX0dFTl9CSVQobmFtZSkgXAorCVNDVV9HRU5fQklUKFNDVV9MSU5LX1NUQVRVU18gIyMgbmFtZSkKKworCisvKiBUT0RPOiBXaGVyZSBpcyB0aGUgU0FUQV9QU0VMVE9WIHJlZ2lzdGVyPyAqLworCisvKgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICogU0NVIFNBUyBNYXhpbXVtIEFyYml0cmF0aW9uIFdhaXQgVGltZSBUaW1lb3V0IFJlZ2lzdGVyCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworI2RlZmluZSBTQ1VfU0FTX01BWF9BUkJJVFJBVElPTl9XQUlUX1RJTUVfVElNRU9VVF9WQUxVRV9TSElGVCAgICAgICAoMCkKKyNkZWZpbmUgU0NVX1NBU19NQVhfQVJCSVRSQVRJT05fV0FJVF9USU1FX1RJTUVPVVRfVkFMVUVfTUFTSyAgICAgICAgKDB4MDAwMDd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HVVJBVElPTl9PT0JfUkVTRVRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDAwMDAwMCkKKyNkZWZpbmUgU0NVX1NBU19QSFlfQ09ORklHVVJBVElPTl9USFJFRV9JQUZfRU5BQkxFX1NISUZUICAgICAgICAgICAgICAgICAgICAoMzApCisjZGVmaW5lIFNDVV9TQVNfUEhZX0NPTkZJR1VSQVRJT05fVEhSRUVfSUFGX0VOQUJMRV9NQVNLICAgICAgICAgICAgICAgICAgICAgKDB4NDAwMDAwMDApCisjZGVmaW5lIFNDVV9TQVNfUEhZX0NPTkZJR1VSQVRJT05fT09CX0FMSUdOMF9FTkFCTEVfU0hJRlQgICAgICAgICAgICAgICAgICAgKDMxKQorI2RlZmluZSBTQ1VfU0FTX1BIWV9DT05GSUdVUkFUSU9OX09PQl9BTElHTjBfRU5BQkxFX01BU0sgICAgICAgICAgICAgICAgICAgICgweDgwMDAwMDAwKQorI2RlZmluZSBTQ1VfU0FTX1BIWV9DT05GSUdVUkFUSU9OX1JFUVVJUkVEX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAxMDAwMDBGKQorI2RlZmluZSBTQ1VfU0FTX1BIWV9DT05GSUdVUkFUSU9OX0RFRkFVTFRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQxODAxMDBGKQorI2RlZmluZSBTQ1VfU0FTX1BIWV9DT05GSUdVUkFUSU9OX1JFU0VSVkVEX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDAwMDAwKQorCisjZGVmaW5lIFNDVV9TQVNfUENGR19HRU5fQklUKG5hbWUpIFwKKwlTQ1VfR0VOX0JJVChTQ1VfU0FTX1BIWV9DT05GSUdVUkFUSU9OXyAjIyBuYW1lKQorCisjZGVmaW5lIFNDVV9MSU5LX0xBWUVSX0FMSUdOX0lOU0VSVElPTl9GUkVRVUVOQ1lfR0VORVJBTF9TSElGVCAgICAgICgwKQorI2RlZmluZ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U0VSVkVEX01BU0sgICAgICAgICAgICAgICAgICAgKDB4RkZGRkZGRjgpCisKKyNkZWZpbmUgU0NVX1BUU3hTUl9HRU5fQklUKG5hbWUpIFwKKwlTQ1VfR0VOX0JJVChTQ1VfUFRTR19QT1JUX1RBU0tfU0NIRURVTEVSX1NUQVRVU18gIyMgbmFtZSkKKworCisvKgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICogU0dQSU8gUmVnaXN0ZXIgc2hpZnQgYW5kIG1hc2sgdmFsdWVzCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19FTkFCTEVfU0hJRlQgICAgICAgICAgICAgICAgICAgICgwKQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19FTkFCTEVfTUFTSyAgICAgICAgICAgICAgICAgICAgICgweDAwMDAwMDAxKQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19TRVJJQUxfQ0xPQ0tfU0VMRUNUX1NISUZUICAgICAgICgxKQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19TRVJJQUxfQ0xPQ0tfU0VMRUNUX01BU0sgICAgICAgICgweDAwMDAwMDAyKQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19TRVJJQUxfU0hJRlRfV0lEVEhfU0VMRUNUX1NISUZUICgyKQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19TRVJJQUxfU0hJRlRfV0lEVEhfU0VMRUNUX01BU0sgICgweDAwMDAwMDA0KQorI2RlZmluZSBTQ1VfU0dQSU9fQ09OVFJPTF9TR1BJT19URVNUX0JJVF9TSElGVCAgICAgIC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LworCXUzMiBkZXZpY2VfY29udGV4dF9jYXBhY2l0eTsKKy8qIDB4MDA5NCBERkMgKi8KKwl1MzIgZGV2aWNlX2Z1bmN0aW9uX2NhcGFjaXR5OworLyogMHgwMDk4IFNNVUNTUiAqLworCXUzMiBjb250cm9sX3N0YXR1czsKKy8qIDB4MDA5QyBTQ1VTUkNSICovCisJdTMyIHNvZnRfcmVzZXRfY29udHJvbDsKKy8qIDB4MDBBMCBTTUFXICovCisJdTMyIG1tcl9hZGRyZXNzX3dpbmRvdzsKKy8qIDB4MDBBNCBTTURXICovCisJdTMyIG1tcl9kYXRhX3dpbmRvdzsKKwl1MzIgcmVzZXJ2ZWRfQTg7CisJdTMyIHJlc2VydmVkX0FDOworLyogQSB3aG9sZSBidW5jaCBvZiByZXNlcnZlZCBzcGFjZSAqLworCXUzMiByZXNlcnZlZF9CeFs0XTsKKwl1MzIgcmVzZXJ2ZWRfQ3hbNF07CisJdTMyIHJlc2VydmVkX0R4WzRdOworCXUzMiByZXNlcnZlZF9FeFs0XTsKKwl1MzIgcmVzZXJ2ZWRfRnhbNF07CisJdTMyIHJlc2VydmVkXzF4eFs2NF07CisJdTMyIHJlc2VydmVkXzJ4eFs2NF07CisJdTMyIHJlc2VydmVkXzN4eFs2NF07CisvKgorICogQWNjZXNzYWJsZSB0byBGTiMwIG9ubHkKKyAqIDB4MDQwMCBUQ0EgKi8KKwl1MzIgdGFza19jb250ZXh0X2Fzc2lnbm1lbnRbMjU2XTsKKy8qIE1TSS1YIHJlZ2lzdGVycyBub3QgaW5jbHVkZWQgKi8KK307CisKKy8qCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU0RNQSBSZWdpc3RlcnMKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIFNDV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fZnJhbWVfcXVldWVfY29udHJvbDsKKy8qIDB4MDAxNCBVRlFQUCAqLworCXUzMiB1bnNvbGljaXRlZF9mcmFtZV9wdXRfcG9pbnRlcjsKKy8qIDB4MDAxOCBVRlFHUCAqLworCXUzMiB1bnNvbGljaXRlZF9mcmFtZV9nZXRfcG9pbnRlcjsKKy8qIDB4MDAxQyBQRE1BQ1IgKi8KKwl1MzIgcGRtYV9jb25maWd1cmF0aW9uOworLyogUmVzZXJ2ZWQgdW50aWwgb2Zmc2V0IDB4ODAgKi8KKwl1MzIgcmVzZXJ2ZWRfMDAyMF8wMDdDWzB4MThdOworLyogMHgwMDgwIENETUFDUiAqLworCXUzMiBjZG1hX2NvbmZpZ3VyYXRpb247CisvKiBSZW1haW5kZXIgU0RNQSByZWdpc3RlciBzcGFjZSAqLworCXUzMiByZXNlcnZlZF8wMDg0XzA0MDBbMHhERl07CisKK307CisKKy8qCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogKiBTQ1UgTGluayBSZWdpc3RlcnMKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIFNDVV9QRUcwX09GRlNFVCAgICAweDAwMDAKKyNkZWZpbmUgU0NVX1BFRzFfT0ZGU0VUICAgIDB4ODAwMAorCisjZGVmaW5lIFNDVV9UTDBfT0ZGU0VUICAgICAweDAwMDAKKyNkZWZpbmUgU0NVX1RMMV9PRkZTRVQgICAgIDB4MDQwMAorI2RlZmluZSBTQ1VfVEwyX09GRlNFVCAgICAgMHgwODAwCisjZGVmaW5lIFNDVV9UTDNfT0ZGU0VUICAgICAweDBDMDAKKworI2RlZmluZSBTQ1VfTExfT0ZGU0VUICAgICAgMHgwMDgwCisjZGVmaW5lIFNDVV9MTDBfT0ZGU0VUICAgICAoU0NVX1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UElPX1NHSUNSICovCisJdTMyIGludGVyZmFjZV9jb250cm9sOworLyogMHgwMDA0IFNHUElPX1NHUEJSICovCisJdTMyIGJsaW5rX3JhdGU7CisvKiAweDAwMDggU0dQSU9fU0dTRExSICovCisJdTMyIHN0YXJ0X2RyaXZlX2xvd2VyOworLyogMHgwMDBDIFNHUElPX1NHU0RVUiAqLworCXUzMiBzdGFydF9kcml2ZV91cHBlcjsKKy8qIDB4MDAxMCBTR1BJT19TR1NJRExSICovCisJdTMyIHNlcmlhbF9pbnB1dF9sb3dlcjsKKy8qIDB4MDAxNCBTR1BJT19TR1NJRFVSICovCisJdTMyIHNlcmlhbF9pbnB1dF91cHBlcjsKKy8qIDB4MDAxOCBTR1BJT19TR1ZTQ1IgKi8KKwl1MzIgdmVuZG9yX3NwZWNpZmljX2NvZGU7CisvKiAweDAwMjAgU0dQSU9fU0dPRFNSICovCisJdTMyIG91cHV0X2RhdGFfc2VsZWN0WzhdOworLyogUmVtYWluZGVyIG9mIG1lbW9yeSBzcGFjZSAyNTYgYnl0ZXMgKi8KKwl1MzIgcmVzZXJ2ZWRfMTQ0NF8xNGZmWzB4MzFdOworCit9OworCisvKgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICogRGVmaW5lcyBmb3IgVklJVCBlbnRyeSBvZmZzZXRzCisgKiAqIEFjY2VzcyBhZGRpdGlvbmFsIGVudHJpZXMgYnkgU0NVX1ZJSVRfQkFTRSArIGluZGV4ICogMHgxMAorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyNkZWZpbmUgICAgIFNDVV9WSUlUX0JBU0UgICAgIDB4MWMwMAorCitzdHJ1Y3Qgc2N1X3ZpaXRfcmVnaXN0ZXJzIHsKKwl1MzIgcmVnaXN0ZXJzWzI1Nl07Cit9Owor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DAyNCBQVFMyU1IKKyAqIDB4MDAyOCBQVFMzQ1IKKyAqIDB4MDAyQyBQVFMzU1IgKi8KKwlzdHJ1Y3Qgc2N1X3BvcnRfdGFza19zY2hlZHVsZXJfcmVnaXN0ZXJzIHBvcnRbNF07CisvKgorICogMHgwMDMwIFBDU1BFMENSCisgKiAweDAwMzQgUENTUEUxQ1IKKyAqIDB4MDAzOCBQQ1NQRTJDUgorICogMHgwMDNDIFBDU1BFM0NSICovCisJdTMyIHByb3RvY29sX2VuZ2luZVs0XTsKKy8qIDB4MDA0MCBFVE1UU0NDUiAqLworCXUzMiB0Y19zY2FubmluZ19pbnRlcnZhbF9jb250cm9sOworLyogMHgwMDQ0IEVUTVJOU0NDUiAqLworCXUzMiBybmNfc2Nhbm5pbmdfaW50ZXJ2YWxfY29udHJvbDsKKy8qIFJlbWFpbmRlciBvZiBtZW1vcnkgc3BhY2UgMTI4IGJ5dGVzICovCisJdTMyIHJlc2VydmVkXzEwNDhfMTA3ZlsweDBFXTsKKworfTsKKworI2RlZmluZSBTQ1VfUFRTR19TQ1VWWkVDUl9PRkZTRVQgICAgICAgIDB4MDAzQworCisvKgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICogQUZFIFJFR0lTVEVSUworICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyNkZWZpbmUgU0NVX0FGRV9NTVJfQkFTRSAgICAgICAgICAgICAgICAgIDB4RTAwMAorCisvKgorICogQUZFIDAgaXMgYXQgb2Zmc2V0IDB4MDgwMAorICogQUZFIDEgaXMgYXQgb2Zmc2V0IDB4MDkwMAorICogQUZFIDIgaXMgYXQgb2Zmc2V0IDB4MGEwMAorICogQUZFIDMgaXMgYXQgb2Zmc2V0IDB4MGIwMCAqLworc3RydWN0IHNjdV9hZmVf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ZWYgX1NDSV9TQVNfSF8KKyNkZWZpbmUgX1NDSV9TQVNfSF8KKworI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorCisvKgorICogU0FUQSBGSVMgVHlwZXMgVGhlc2UgY29uc3RhbnRzIGRlcGljdCB0aGUgdmFyaW91cyBTQVRBIEZJUyB0eXBlcyBkZXZpbmVkIGluCisgKiB0aGUgc2VyaWFsIEFUQSBzcGVjaWZpY2F0aW9uLgorICogWFhYOiBUaGlzIG5lZWRzIHRvIGdvIGludG8gPHNjc2kvc2FzLmg+CisgKi8KKyNkZWZpbmUgRklTX1JFR0gyRCAgICAgICAgICAweDI3CisjZGVmaW5lIEZJU19SRUdEMkggICAgICAgICAgMHgzNAorI2RlZmluZSBGSVNfU0VUREVWQklUUyAgICAgIDB4QTEKKyNkZWZpbmUgRklTX0RNQV9BQ1RJVkFURSAgICAweDM5CisjZGVmaW5lIEZJU19ETUFfU0VUVVAgICAgICAgMHg0MQorI2RlZmluZSBGSVNfQklTVF9BQ1RJVkFURSAgIDB4NTgKKyNkZWZpbmUgRklTX1BJT19TRVRVUCAgICAgICAweDVGCisjZGVmaW5lIEZJU19EQVRBICAgICAgICAgICAgMHg0NgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFNTUF9SRVNQX0lVX01BWF9TSVpFCTI4MAorCisvKgorICogY29udGVudHMgb2YgdGhlIFNTUCBDT01NQU5EIElORk9STUFUSU9OIFVOSVQuCisgKiBGb3Igc3BlY2lmaWMgaW5mb3JtYXRpb24gb24gZWFjaCBvZiB0aGVzZSBpbmRpdmlkdWFsIGZpZWxkcyBwbGVhc2UKKyAqIHJlZmVyZW5jZSB0aGUgU0FTIHNwZWNpZmljYXRpb24gU1NQIHRyYW5zcG9ydCBsYXllciBzZWN0aW9uLgorICogWFhYOiBUaGlzIG5lZWRzIHRvIGdvIGludG8gPHNjc2kv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2NvZGUpIFwKKwkoKGNvbXBsZXRpb25fY29kZSkgJiBTQ1VfVU5TT0xJQ0lURURfRlJBTUVfRVJST1JfTUFTSykKKworLyoqCisgKgorICoKKyAqIFRoZXNlIGNvbnN0YW50cyByZXByZXNlbnQgbm9ybWFsaXplZCBjb21wbGV0aW9uIGNvZGVzIHdoaWNoIG11c3QgYmUgc2hpZnRlZAorICogMTggYml0cyB0byBtYXRjaCBpdCB3aXRoIHRoZSBoYXJkd2FyZSBjb21wbGV0aW9uIGNvZGUuIEluIGEgMTYtYml0IGNvbXBpbGVyLAorICogaW1tZWRpYXRlIGNvbnN0YW50cyBhcmUgMTYtYml0IHZhbHVlcyAodGhlIHNpemUgb2YgYW4gaW50KS4gSWYgd2Ugc2hpZnQKKyAqIHRob3NlIGJ5IDE4IGJpdHMsIHdlIGNvbXBsZXRlbHkgbG9zZSB0aGUgdmFsdWUuIFRvIGVuc3VyZSB0aGUgdmFsdWUgaXMgYQorICogMzItYml0IHZhbHVlIGxpa2Ugd2Ugd2FudCwgZWFjaCBpbW1lZGlhdGUgdmFsdWUgbXVzdCBiZSBjYXN0IHRvIGEgdTMyLgorICovCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfR09PRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDAwKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0NSQ19FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxNCkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9DSEVDS19SRVNQT05TRSAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MTQpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfR0VOX1JFU1BPTlNFICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDE1KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX05BS19DTURfRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxNikKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9DTURfTExfUl9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MTYpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfTExfUl9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDE3KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0FDS19OQUtfVE8gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxNykKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9MTF9QRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MTgpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfTExfU1lfVEVSTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDE5KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX05BS19FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxOSkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9MTF9MRl9URVJNICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MUEpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfREFUQV9MRU5fRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDFBKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0xMX0NMX1RFUk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxQikKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9MTF9BQk9SVF9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MUIpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfU0VRX0lOVl9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDFDKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX1VORVhQX1hSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxQykKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9JTlZfRklTX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MUQpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfWFJfSVVfTEVOX0VSUiAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDFEKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0lOVl9GSVNfTEVOICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgxRSkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9YUl9XRF9MRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MUUpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfU0RNQV9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDFGKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX09GRlNFVF9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyMCkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9NQVhfUExEX0VSUiAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MjEpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfRVhDRVNTX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDIyKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0xGX0VSUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyMykKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9VTkVYUF9GSVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MjQpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfVU5FWFBfUkVTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDI0KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0VBUkxZX1JFU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyNSkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9TTVBfUkVTUF9UT19FUlIgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MjYpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfRE1BU0VUVVBfRElSRVJSICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDI3KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX1NNUF9VRklfRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyNykKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9YRkVSQ05UX0VSUiAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MjgpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfU01QX0ZSTV9UWVBFX0VSUiAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDI4KQorI2RlZmluZSBTQ1VfVEFTS19ET05FX1NNUF9MTF9SWF9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyOSkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9SRVNQX0xFTl9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MkEpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfVU5FWFBfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDJCKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX09QRU5fRkFJTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyQykKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9VTkVYUF9TREJGSVMgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MkQpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfUkVHX0VSUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDJFKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX1NEQl9FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgyRikKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9UQVNLX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4MzApCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfQ01EX1NETUFfRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAoKFUzMikweDMyKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX0NNRF9MTF9BQk9SVF9FUlIgICAgICAgICAgICAgICAgICAgICAgKChVMzIpMHgzMykKKyNkZWZpbmUgU0NVX1RBU0tfT1BFTl9SRUpFQ1RfV1JPTkdfREVTVElOQVRJT04gICAgICAgICAgICAgICgodTMyKTB4MzQpCisjZGVmaW5lIFNDVV9UQVNLX09QRU5fUkVKRUNUX1JFU0VSVkVEX0FCQU5ET05fMSAgICAgICAgICAgICAoKHUzMikweDM1KQorI2RlZmluZSBTQ1VfVEFTS19PUEVOX1JFSkVDVF9SRVNFUlZFRF9BQkFORE9OXzIgICAgICAgICAgICAgKCh1MzIpMHgzNikKKyNkZWZpbmUgU0NVX1RBU0tfT1BFTl9SRUpFQ1RfUkVTRVJWRURfQUJBTkRPTl8zICAgICAgICAgICAgICgodTMyKTB4MzcpCisjZGVmaW5lIFNDVV9UQVNLX09QRU5fUkVKRUNUX0JBRF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAoKHUzMikweDM4KQorI2RlZmluZSBTQ1VfVEFTS19PUEVOX1JFSkVDVF9aT05FX1ZJT0xBVElPTiAgICAgICAgICAgICAgICAgKCh1MzIpMHgzOSkKKyNkZWZpbmUgU0NVX1RBU0tfRE9ORV9WSUlUX0VOVFJZX05WICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKTB4M0EpCisjZGVmaW5lIFNDVV9UQVNLX0RPTkVfSUlUX0VOVFJZX05WICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikweDNCKQorI2RlZmluZSBTQ1VfVEFTS19ET05FX1JOQ05WX09VVEJPVU5EICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpMHgz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oMHgxOCkKICNkZWZpbmUgTVBJMl9DT05GSUdfRVhUUEFHRVRZUEVfRVRIRVJORVQgICAgICAgICAgICAoMHgxOSkKKyNkZWZpbmUgTVBJMl9DT05GSUdfRVhUUEFHRVRZUEVfRVhUX01BTlVGQUNUVVJJTkcgICAoMHgxQSkKIAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTYxMiwyMyArNjIwLDMxIEBACiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFBpbm91dDsgICAgICAgICAgICAgICAgIC8qIDB4MDAgKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgQ29ubmVjdG9yWzE2XTsgICAgICAgICAgLyogMHgwNCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbjsgICAgICAgICAgICAgICAvKiAweDE0ICovCi0gICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDB4MTUgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICAgICAgUmVjZXB0YWNsZUlEOyAgICAgICAgICAgLyogMHgxNSAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICBTbG90OyAgICAgICAgICAgICAgICAgICAvKiAweDE2ICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgIC8qIDB4MTggKi8KIH0gTVBJMl9NQU5QQUdFN19DT05ORUNUT1JfSU5GTywgTVBJMl9QT0lOVEVSIFBUUl9NUEkyX01BTlBBR0U3X0NPTk5FQ1RPUl9JTkZPLAogICBNcGkyTWFuUGFnZTdDb25uZWN0b3JJbmZvX3QsIE1QSTJfUE9JTlRFUiBwTXBpMk1hblBhZ2U3Q29ubmVjdG9ySW5mb190OwogCiAvKiBkZWZpbmVzIGZvciB0aGUgUGl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ICAgKDgpCisKKyNkZWZpbmUgTVBJMl9NQU5QQUdFN19QSU5PVVRfVFlQRV9NQVNLICAgICAgICAgICAgICAgICAgKDB4MDAwMDAwRkYpCisjZGVmaW5lIE1QSTJfTUFOUEFHRTdfUElOT1VUX1RZUEVfVU5LTk9XTiAgICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUEkyX01BTlBBR0U3X1BJTk9VVF9TQVRBX1NJTkdMRSAgICAgICAgICAgICAgICAoMHgwMSkKKyNkZWZpbmUgTVBJMl9NQU5QQUdFN19QSU5PVVRfU0ZGXzg0ODIgICAgICAgICAgICAgICAgICAgKDB4MDIpCisjZGVmaW5lIE1QSTJfTUFOUEFHRTdfUElOT1VUX1NGRl84NDg2ICAgICAgICAgICAgICAgICAgICgweDAzKQorI2RlZmluZSBNUEkyX01BTlBBR0U3X1BJTk9VVF9TRkZfODQ4NCAgICAgICAgICAgICAgICAgICAoMHgwNCkKKyNkZWZpbmUgTVBJMl9NQU5QQUdFN19QSU5PVVRfU0ZGXzgwODcgICAgICAgICAgICAgICAgICAgKDB4MDUpCisjZGVmaW5lIE1QSTJfTUFOUEFHRTdfUElOT1VUX1NGRl84NjQzXzRJICAgICAgICAgICAgICAgICgweDA2KQorI2RlZmluZSBNUEkyX01BTlBBR0U3X1BJTk9VVF9TRkZfODY0M184SSAgICAgICAgICAgICAgICAoMHgwNykKKyNkZWZpbmUgTVBJMl9NQU5QQUdFN19QSU5PVVRfU0ZGXzg0NzAgICAgICAgICAgICAgICAgICAgKDB4MDgpCisjZGVmaW5lIE1QSTJfTUFOUEFHRTdfUElOT1VUX1NGRl84MDg4ICAgICAgICAgICAgICAgICAgICgweDA5KQorI2RlZmluZSBNUEkyX01BTlBBR0U3X1BJTk9VVF9TRkZfODY0NF80WCAgICAgICAgICAgICAgICAoMHgwQSkKKyNkZWZpbmUgTVBJMl9NQU5QQUdFN19QSU5PVVRfU0ZGXzg2NDRfOFggICAgICAgICAgICAgICAgKDB4MEIpCisjZGVmaW5lIE1QSTJfTUFOUEFHRTdfUElOT1VUX1NGRl84NjQ0XzE2WCAgICAgICAgICAgICAgICgweDBDKQorI2RlZmluZSBNUEkyX01BTlBBR0U3X1BJTk9VVF9TRkZfODQzNiAgICAgICAgICAgICAgICAgICAoMHgwRCkKIAogLyogZGVmaW5lcyBmb3IgdGhlIExvY2F0aW9uIGZpZWxkICovCiAjZGVmaW5lIE1QSTJfTUFOUEFHRTdfTE9DQVRJT05fVU5LTk9XTiAgICAgICAgICAgICAgICAgICgweDAxKQpAQCAtNjYyLDcgKzY3OCw3IEBACiAgIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9DT05GSUdfUEFHRV9NQU5fNywKICAgTXBpMk1hbnVmYWN0dXJpbmdQYWdlN190LCBNUEkyX1BPSU5URVIgcE1waTJNYW51ZmFjdHVyaW5nUGFnZTdfdDsKIAotI2RlZmluZSBNUEkyX01BTlVGQUNUVVJJTkc3X1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAoMHgwMCkKKyNkZWZpbmUgTVBJMl9NQU5VRkFDVFVSSU5HN19QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgKDB4MDEpCiAKIC8qIGRlZmluZXMgZm9yIHRoZSBGbGFncyBmaWVsZCAqLwogI2RlZmluZSBNUEkyX01BTlBBR0U3X0ZMQUdfVVNFX1NMT1RfSU5GTyAgICAgICAgICAgICAgICAoMHgwMDAwMDAwMSkKQEAgLTg0OSwxMSArODY1LDEzIEBACiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgSU9DVGVtcGVyYXR1cmU7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTAgKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBJT0NUZW1wZXJhdHVyZVVuaXRzOyAgICAgICAgICAgICAgICAgICAgLyogMHgxMiAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIElPQ1NwZWVkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDEzICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTQgKi8KKwlVMTYgICAgICAgICAgICAgICAgICAgICBCb2FyZFRlbXBlcmF0dXJlOyAgICAgICAgICAgICAgLyogMHgxNCAqLworCVU4ICAgICAgICAgICAgICAgICAgICAgIEJvYXJkVGVtcGVyYXR1cmVVbml0czsgICAgICAgICAvKiAweDE2ICovCisJVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTcgKi8KIH0gTVBJMl9DT05GSUdfUEFHRV9JT19VTklUXzcsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9DT05GSUdfUEFHRV9JT19VTklUXzcsCiAgIE1waTJJT1VuaXRQYWdlN190LCBNUEkyX1BPSU5URVIgcE1waTJJT1VuaXRQYWdlN190OwogCi0jZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfUEFHRVZFUlNJT04gICAgICAgICAgICAgICAgICAgICgweDAxKQorI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U3X1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgICAoMHgwMikKIAogLyogZGVmaW5lcyBmb3IgSU8gVW5pdCBQYWdlIDcgUENJZVdpZHRoIGZpZWxkICovCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfUENJRV9XSURUSF9YMSAgICAgICAgICAgICAgKDB4MDEpCkBAIC04ODEsNyArODk5LDYgQEAKICNkZWZpbmUgTVBJMl9JT1VOSVRQQUdFN19QTUNBUF9QQ0lFX1dJRFRIX0NIQU5HRSAgICAoMHgwMDAwMDAwOCkKICNkZWZpbmUgTVBJMl9JT1VOSVRQQUdFN19QTUNBUF9QQ0lFX1NQRUVEX0NIQU5HRSAgICAoMHgwMDAwMDAwNCkKIAotCiAvKiBkZWZpbmVzIGZvciBJTyBVbml0IFBhZ2UgNyBJT0NUZW1wZXJhdHVyZVVuaXRzIGZpZWxkICovCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfSU9DX1RFTVBfTk9UX1BSRVNFTlQgICAgICAgKDB4MDApCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfSU9DX1RFTVBfRkFIUkVOSEVJVCAgICAgICAgKDB4MDEpCkBAIC04OTMsNiArOTEwLDExIEBACiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfSU9DX1NQRUVEX1FVQVJURVIgICAgICAgICAgKDB4MDQpCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfSU9DX1NQRUVEX0VJR0hUSCAgICAgICAgICAgKDB4MDgpCiAKKy8qIGRlZmluZXMgZm9yIElPIFVuaXQgUGFnZSA3IEJvYXJkVGVtcGVyYXR1cmVVbml0cyBmaWVsZCAqLworI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U3X0JPQVJEX1RFTVBfTk9UX1BSRVNFTlQgICAgICgweDAwKQorI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U3X0JPQVJEX1RFTVBfRkFIUkVOSEVJVCAgICAgICgweDAxKQorI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U3X0JPQVJEX1RFTVBfQ0VMU0lVUyAgICAgICAgICgweDAyKQorCiAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTI3OTksNSArMjgyMSwyNSBAQAogI2RlZmluZSBNUEkyX0VUSFBHMV9NU19EQVRBX1JBVEVfMUdCSVQgICAgICAgICAgICAgICgweDAzKQogCiAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgRXh0ZW5kZWQgTWFudWZhY3R1cmluZyBDb25maWcgUGFnZXMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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pb24gICBKUDIgSGVhZGVyCisgKiAgLS0tLS0tLS0tLS0gIC0tLS0tLS0tLSAgLS0tLS0tLS0tLS0tCisgKiAgICAgIEQwICAgIDIgICAgICAtICAgICAgICAgLQorICogICAgICBEMSAgICAzICAgICAtLT4gICAgICBWKyAgIDUKKyAqICAgICAgRDIgICAgNCAgICAgLS0+ICAgICAgVisgICA1CisgKiAgICAgIEQzICAgIDUgICAgIC0tPiAgICAgIFYrICAgNQorICogICAgICBENCAgICA2ICAgICAtLT4gICAgICBWKyAgIDUKKyAqICAgICAgRDUgICAgNyAgICAgLS0+ICAgICAgbkNTICA4CisgKiAgICAgIEQ2ICAgIDggICAgIC0tPiAgICAgIFNDTEsgMworICogICAgICBENyAgICA5ICAgICAtLT4gICAgICBTSS9PIDUKKyAqICAgICBHTkQgICAyNSAgICAgIC0gICAgICAgR05EICA3CisgKiAgICBTZWxlY3QgMTMgICAgIDwtLSAgICAgIFNJL08gMQorICoKKyAqIE5vdGUgdGhhdCBwYXJwb3J0IHBpbiAxMyBhY3R1YWxseSBnZXRzIGludmVydGVkIGJ5IHRoZSB0cmFuc2lzdG9yCisgKiBhcnJhbmdlbWVudCB3aGljaCBsZXRzIGVpdGhlciB0aGUgcGFycG9ydCBvciB0aGUgTE03MCBkcml2ZSB0aGUKKyAqIFNJL1NPIHNpZ25hbCAoc2VlIHRoZSBzY2hlbWF0aWMgZm9yIGRldGFpbHMpLgorICovCisKKyNkZWZpbmUgRFJWTkFNRQkJInNwaS1sbTcwbGxwIgorCisjZGVmaW5lIGxtNzBfSU5JVAkweEJFCisjZGVmaW5lIFNJTwkJMHgxMAorI2RlZmluZSBuQ1MJCTB4MjAKKyNkZWZpbmUgU0NMSwkJMHg0MAorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCitzdHJ1Y3Qgc3BpX2xtNzBsbHAgewor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ZyBmbGFnczsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZody0+bG9jaywgZmxhZ3MpOworCisJdmFsID0gX19yYXdfcmVhZGwoaHctPnJlZ3MgKyBVU0lfQ05UKTsKKworCXZhbCB8PSAodHhiaXRsZW4gPDwgMHgwMyk7CisKKwlfX3Jhd193cml0ZWwodmFsLCBody0+cmVncyArIFVTSV9DTlQpOworCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaHctPmxvY2ssIGZsYWdzKTsKK30KKworc3RhdGljIHZvaWQgbnVjOTAwX3NwaV9nb2J1c3koc3RydWN0IG51YzkwMF9zcGkgKmh3KQoreworCXVuc2lnbmVkIGludCB2YWw7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZody0+bG9jaywgZmxhZ3MpOworCisJdmFsID0gX19yYXdfcmVhZGwoaHctPnJlZ3MgKyBVU0lfQ05UKTsKKworCXZhbCB8PSBHT0JVU1k7CisKKwlfX3Jhd193cml0ZWwodmFsLCBody0+cmVncyArIFVTSV9DTlQpOworCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaHctPmxvY2ssIGZsYWdzKTsKK30KKworc3RhdGljIGludCBudWM5MDBfc3BpX3NldHVweGZlcihzdHJ1Y3Qgc3BpX2RldmljZSAqc3BpLAorCQkJCSBzdHJ1Y3Qgc3BpX3RyYW5zZmVyICp0KQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG51YzkwMF9zcGlfc2V0dXAoc3RydWN0IHNwaV9kZXZpY2UgKnNwaSkKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBpbnQgaHdfdHhieXRlKHN0cnVjdCBudWM5MDBfc3BpICpodywgaW50IGNvdW50KQoreworCXJldHVybiBody0+dHggPyBody0+dHhbY291bnRdIDogMDsKK30KKworc3RhdGljIGludCBudWM5MDBfc3BpX3R4cngoc3RydWN0IHNwaV9kZXZpY2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y3QgY2xrICAgICAgICAgICAgICAgICAgICAgICpzcmNfY2xrOworCXN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgICAgICAgICAgKnBkZXY7CisJc3RydWN0IHNwaV9tYXN0ZXIgICAgICAgICAgICAgICAqbWFzdGVyOworCXN0cnVjdCB3b3JrcXVldWVfc3RydWN0CSAgICAgICAgKndvcmtxdWV1ZTsKKwlzdHJ1Y3QgczNjNjR4eF9zcGlfaW5mbyAgKmNudHJscl9pbmZvOworCXN0cnVjdCBzcGlfZGV2aWNlICAgICAgICAgICAgICAgKnRnbF9zcGk7CisJc3RydWN0IHdvcmtfc3RydWN0ICAgICAgICAgICAgICB3b3JrOworCXN0cnVjdCBsaXN0X2hlYWQgICAgICAgICAgICAgICAgcXVldWU7CisJc3BpbmxvY2tfdCAgICAgICAgICAgICAgICAgICAgICBsb2NrOworCWVudW0gZG1hX2NoICAgICAgICAgICAgICAgICAgICAgcnhfZG1hY2g7CisJZW51bSBkbWFfY2ggICAgICAgICAgICAgICAgICAgICB0eF9kbWFjaDsKKwl1bnNpZ25lZCBsb25nICAgICAgICAgICAgICAgICAgIHNmcl9zdGFydDsKKwlzdHJ1Y3QgY29tcGxldGlvbiAgICAgICAgICAgICAgIHhmZXJfY29tcGxldGlvbjsKKwl1bnNpZ25lZCAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOworCXVuc2lnbmVkICAgICAgICAgICAgICAgICAgICAgICAgY3VyX21vZGUsIGN1cl9icHc7CisJdW5zaWduZWQgICAgICAgICAgICAgICAgICAgICAgICBjdXJfc3BlZWQ7Cit9OworCitzdGF0aWMgc3RydWN0IHMzYzI0MTBfZG1hX2NsaWVudCBzM2M2NHh4X3NwaV9kbWFfY2xpZW50ID0geworCS5uYW1lID0gInNhbXN1bmctc3BpLWRtYSIsCit9OworCitzdGF0aWMgdm9pZCBmbHVzaF9maWZvKHN0cnVjdCBzM2M2NHh4X3NwaV9kcml2ZXJfZGF0YSAqc2RkKQoreworCXN0cnVj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c2dsIHNpemUgYnkgdXNpbmcgY21kIHNnbCBzaXplLgorCQkgKiBJdCdzIHNvIG11Y2ggZWFzaWVyIGFuZCBvbmx5IGEgd2FzdGUgd2hlbiB0YXNrX2NvdW50ID4gMS4KKwkJICogVGhhdCBpcyBleHRyZW1lbHkgcmFyZS4KKwkJICovCisJCXRhc2stPnRhc2tfc2dfbmVudHMgPSBzZ2xfbmVudHM7CisJCWlmIChjbWQtPnNlX3Rmby0+dGFza19zZ19jaGFpbmluZykgeworCQkJdGFzay0+dGFza19zZ19uZW50cysrOworCQkJdGFzay0+dGFza19wYWRkZWRfc2cgPSAxOworCQl9CisKKwkJdGFzay0+dGFza19zZyA9IGttYWxsb2Moc2l6ZW9mKHN0cnVjdCBzY2F0dGVybGlzdCkgKgorCQkJCQl0YXNrLT50YXNrX3NnX25lbnRzLCBHRlBfS0VSTkVMKTsKKwkJaWYgKCF0YXNrLT50YXNrX3NnKSB7CisJCQljbWQtPnNlX2Rldi0+dHJhbnNwb3J0LT5mcmVlX3Rhc2sodGFzayk7CisJCQlyZXR1cm4gLUVOT01FTTsKKwkJfQorCisJCXNnX2luaXRfdGFibGUodGFzay0+dGFza19zZywgdGFzay0+dGFza19zZ19uZW50cyk7CisKKwkJdGFza19zaXplID0gdGFzay0+dGFza19zaXplOworCisJCS8qIEJ1aWxkIG5ldyBzZ2wsIG9ubHkgdXAgdG8gdGFza19zaXplICovCisJCWZvcl9lYWNoX3NnKHRhc2stPnRhc2tfc2csIHNnLCB0YXNrLT50YXNrX3NnX25lbnRzLCBjb3VudCkgeworCQkJaWYgKGNtZF9zZy0+bGVuZ3RoID4gdGFza19zaXplKQorCQkJCWJyZWFrOworCisJCQkqc2cgPSAqY21kX3NnOworCQkJdGFza19zaXplIC09IGNtZF9zZy0+bGVuZ3RoOworCQkJY21kX3NnID0gc2dfbmV4dChjbWRfc2cpOworCQl9CisKIAkJbGJhICs9IHRhc2stPnRhc2tfc2VjdG9yczsKIAkJc2VjdG9ycyAtPSB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ZGktPnUxMzJfbG9jayk7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpX2VsYW5fZG9fY2FsbGJhY2soZnRkaSwgdGFyZ2V0LCA0ICsgZnRkaS0+cmVzcG9uc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBheWxvYWQpOwotICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+cmVjaWV2ZWQgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+cmVjZWl2ZWQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+ZXhwZWN0ZWQgPSA0OwogICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+ZWRfZm91bmQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ0ZGktPnJlc3BvbnNlOwpAQCAtODkwLDcgKzg5MCw3IEBACiAgICAgICAgICAgICAgICAgICAgICAgICBtdXRleF91bmxvY2soJmZ0ZGktPnUxMzJfbG9jayk7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpX2VsYW5fZG9fY2FsbGJhY2soZnRkaSwgdGFyZ2V0LCA0ICsgZnRkaS0+cmVzcG9uc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBheWxvYWQpOwotICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+cmVjaWV2ZWQgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+cmVjZWl2ZWQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+ZXhwZWN0ZWQgPSA0OwogICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+ZWRfZm91bmQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ0ZGktPnJlc3BvbnNlOwpAQCAtOTA1LDcgKzkwNSw3IEBACiAgICAgICAgICAgICAgICAgbXV0ZXhfdW5sb2NrKCZmdGRpLT51MTMyX2xvY2spOwogICAgICAgICAgICAgICAgIGZ0ZGlfZWxhbl9kb19jYWxsYmFjayhmdGRpLCB0YXJnZXQsIDQgKyBmdGRpLT5yZXNwb25zZSwKICAgICAgICAgICAgICAgICAgICAgICAgIHBheWxvYWQpOwotICAgICAgICAgICAgICAgIGZ0ZGktPnJlY2lldmVkID0gMDsKKyAgICAgICAgICAgICAgICBmdGRpLT5yZWNlaXZlZCA9IDA7CiAgICAgICAgICAgICAgICAgZnRkaS0+ZXhwZWN0ZWQgPSA0OwogICAgICAgICAgICAgICAgIGZ0ZGktPmVkX2ZvdW5kID0gMDsKICAgICAgICAgICAgICAgICByZXR1cm4gZnRkaS0+cmVzcG9uc2U7CkBAIC05MTQsNyArOTE0LDcgQEAKICAgICAgICAgICAgICAgICBtdXRleF91bmxvY2soJmZ0ZGktPnUxMzJfbG9jayk7CiAgICAgICAgICAgICAgICAgZnRkaV9lbGFuX2RvX2NhbGxiYWNrKGZ0ZGksIHRhcmdldCwgNCArIGZ0ZGktPnJlc3BvbnNlLAogICAgICAgICAgICAgICAgICAgICAgICAgcGF5bG9hZCk7Ci0gICAgICAgICAgICAgICAgZnRkaS0+cmVjaWV2ZWQgPSAwOworICAgICAgICAgICAgICAgIGZ0ZGktPnJlY2VpdmVkID0gMDsKICAgICAgICAgICAgICAgICBmdGRpLT5leHBlY3RlZCA9IDQ7CiAgICAgICAgICAgICAgICAgZnRkaS0+ZWRfZm91bmQgPSAwOwogICAgICAgICAgICAgICAgIHJldHVybiBmdGRpLT5yZXNwb25zZTsKQEAgLTkzNCw3ICs5MzQsNyBAQAogICAgICAgICBpZiAodGFyZ2V0LT5hY3RpdmUpCiAgICAgICAgICAgICAgICAgZnRkaV9lbGFuX2RvX2NhbGxiYWNrKGZ0ZGksIHRhcmdldCwgTlVMTCwgMCk7CiAgICAgICAgIHRhcmdldC0+YWJhbmRvbmluZyA9IDA7Ci0gICAgICAgIGZ0ZGktPnJlY2lldmVkID0gMDsKKyAgICAgICAgZnRkaS0+cmVjZWl2ZWQgPSAwOwogICAgICAgICBmdGRpLT5leHBlY3RlZCA9IDQ7CiAgICAgICAgIGZ0ZGktPmVkX2ZvdW5kID0gMDsKICAgICAgICAgcmV0dXJuIGZ0ZGktPnJlc3BvbnNlOwpAQCAtOTUxLDcgKzk1MSw3IEBACiAqLwogc3RhdGljIGludCBmdGRpX2VsYW5fcmVzcG9uZF9lbmdpbmUoc3RydWN0IHVzYl9mdGRpICpmdGRpKQogewotICAgICAgICB1OCAqYiA9IGZ0ZGktPnJlc3BvbnNlICsgZnRkaS0+cmVjaWV2ZWQ7CisgICAgICAgIHU4ICpiID0gZnRkaS0+cmVzcG9uc2UgKyBmdGRpLT5yZWNlaXZlZDsKICAgICAgICAgaW50IGJ5dGVzX3JlYWQgPSAwOwogICAgICAgICBpbnQgcmV0cnlfb25fZW1wdHkgPSAxOwogICAgICAgICBpbnQgcmV0cnlfb25fdGltZW91dCA9IDM7CkBAIC0xMDQzLDExICsxMDQzLDExIEBACiAgICAgICAgICAgICAgICAgdTggYyA9IGZ0ZGktPmJ1bGtfaW5fYnVmZmVyWysrZnRkaS0+YnVsa19pbl9sYXN0XTsKICAgICAgICAgICAgICAgICBieXRlc19yZWFkICs9IDE7CiAgICAgICAgICAgICAgICAgZnRkaS0+YnVsa19pbl9sZWZ0IC09IDE7Ci0gICAgICAgICAgICAgICAgaWYgKGZ0ZGktPnJlY2lldmVkID09IDAgJiYgYyA9PSAweEZGKSB7CisgICAgICAgICAgICAgICAgaWYgKGZ0ZGktPnJlY2VpdmVkID09IDAgJiYgYyA9PSAweEZGKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGhhdmU7CiAgICAgICAgICAgICAgICAgfSBlbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICAqYisrID0gYzsKLSAgICAgICAgICAgICAgICBpZiAoKytmdGRpLT5yZWNpZXZlZCA8IGZ0ZGktPmV4cGVjdGVkKSB7CisgICAgICAgICAgICAgICAgaWYgKCsrZnRkaS0+cmVjZWl2ZWQgPCBmdGRpLT5leHBlY3RlZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgZ290byBoYXZlOwogICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZnRkaS0+ZWRfZm91bmQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgIGludCBlZF9udW1iZXIgPSAoZnRkaS0+cmVzcG9uc2VbMF0gPj4gNSkgJiAweDAzOwpAQCAtMTA2OSw3ICsxMDY5LDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgIGZ0ZGlfZWxhbl9kb19jYWxsYmFjayhmdGRpLCB0YXJnZXQsIDQgKyBmdGRpLT5yZXNwb25zZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF5bG9hZCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5yZWNpZXZlZCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5yZWNlaXZlZCA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5leHBlY3RlZCA9IDQ7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5lZF9mb3VuZCA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBiID0gZnRkaS0+cmVzcG9uc2U7CkBAIC0xMDg5LDcgKzEwODksNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgKnJlc3BvbmQtPnZhbHVlID0gZGF0YTsKICAgICAgICAgICAgICAgICAgICAgICAgICpyZXNwb25kLT5yZXN1bHQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGUoJnJlc3BvbmQtPndhaXRfY29tcGxldGlvbik7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5yZWNpZXZlZCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5yZWNlaXZlZCA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5leHBlY3RlZCA9IDQ7Ci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IGhhdmVuJ3QgYWxyZWFkeSBwdWJsaXNoZWQgdGhpcyBwY2kgcm9vdCAqLworCWZvciAoaSA9IDA7IGkgPCByb290X251bTsgaSsrKSB7CisJCWxlbiA9IHNucHJpbnRmKHN0ciwgc2l6ZW9mKHN0ciksICJyb290LSVkIiwgaSk7CisJCWlmICh1bmxpa2VseShsZW4gPj0gKHNpemVvZihzdHIpIC0gMSkpKSB7CisJCQllcnIgPSAtRU5PTUVNOworCQkJZ290byBvdXQ7CisJCX0KKworCQllcnIgPSB4ZW5idXNfc2NhbmYoWEJUX05JTCwgcGRldi0+eGRldi0+bm9kZW5hbWUsCisJCQkJICAgc3RyLCAiJXg6JXgiLCAmZCwgJmIpOworCQlpZiAoZXJyIDwgMCkKKwkJCWdvdG8gb3V0OworCQlpZiAoZXJyICE9IDIpIHsKKwkJCWVyciA9IC1FSU5WQUw7CisJCQlnb3RvIG91dDsKKwkJfQorCisJCWlmIChkID09IGRvbWFpbiAmJiBiID09IGJ1cykgeworCQkJZXJyID0gMDsKKwkJCWdvdG8gb3V0OworCQl9CisJfQorCisJbGVuID0gc25wcmludGYoc3RyLCBzaXplb2Yoc3RyKSwgInJvb3QtJWQiLCByb290X251bSk7CisJaWYgKHVubGlrZWx5KGxlbiA+PSAoc2l6ZW9mKHN0cikgLSAxKSkpIHsKKwkJZXJyID0gLUVOT01FTTsKKwkJZ290byBvdXQ7CisJfQorCisJZGV2X2RiZygmcGRldi0+eGRldi0+ZGV2LCAid3JpdGluZyByb290ICVkIGF0ICUwNHg6JTAyeFxuIiwKKwkJcm9vdF9udW0sIGRvbWFpbiwgYnVzKTsKKworCWVyciA9IHhlbmJ1c19wcmludGYoWEJUX05JTCwgcGRldi0+eGRldi0+bm9kZW5hbWUsIHN0ciwKKwkJCSAgICAiJTA0eDolMDJ4IiwgZG9tYWluLCBidXMpOworCWlmIChlcnIpCisJCWdvdG8gb3V0OworCisJZXJyID0geGVuYnVzX3ByaW50ZihYQlRfTklMLCBwZGV2LT54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UoZGVzYywgbG51bSwgYnVmLCBsZW4sIFVCSV9VTktOT1dOKTsKLX0KK2ludCBkYmdfbGViX3dyaXRlKHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgbG51bSwgY29uc3Qgdm9pZCAqYnVmLCBpbnQgb2ZmcywKKwkJICBpbnQgbGVuLCBpbnQgZHR5cGUpOworaW50IGRiZ19sZWJfY2hhbmdlKHN0cnVjdCB1Ymlmc19pbmZvICpjLCBpbnQgbG51bSwgY29uc3Qgdm9pZCAqYnVmLCBpbnQgbGVuLAorCQkgICBpbnQgZHR5cGUpOworaW50IGRiZ19sZWJfdW5tYXAoc3RydWN0IHViaWZzX2luZm8gKmMsIGludCBsbnVtKTsKK2ludCBkYmdfbGViX21hcChzdHJ1Y3QgdWJpZnNfaW5mbyAqYywgaW50IGxudW0sIGludCBkdHlwZSk7CiAKIC8qIERlYnVnZnMtcmVsYXRlZCBzdHVmZiAqLwogaW50IGRiZ19kZWJ1Z2ZzX2luaXQodm9pZCk7CkBAIC0zMTMsNyArMzIyLDcgQEAKIAogLyogVXNlICJpZiAoMCkiIHRvIG1ha2UgY29tcGlsZXIgY2hlY2sgYXJndW1lbnRzIGV2ZW4gaWYgZGVidWdnaW5nIGlzIG9mZiAqLwogI2RlZmluZSB1Ymlmc19hc3NlcnQoZXhwcikgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlpZiAoMCAmJiAoZXhwcikpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoMCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJcHJpbnRrKEtFUk5fQ1JJVCAiVUJJRlMgYXNzZXJ0IGZhaWxlZCBpbiAlcyBhdCAldSAocGlkICVkKVxuIiwgXAogCQkgICAgICAgX19mdW5jX18sIF9fTElORV9fLCBjdX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LiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworICogICAgfCB1bnVzZWQgc3BhY2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKKyAqICAgIHwgLi4uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICogICAgfCB4ZnNfZGlyMl9sZWFmX2VudHJ5X3QgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICB8IHhmc19kaXIyX2xlYWZfZW50cnlfdCAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworICogICAgfCB4ZnNfZGlyMl9ibG9ja190YWlsX3QgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKKyAqCisgKiBBcyBhbGwgdGhlIGVudHJpZXMgYXJlIHZhcmlhYmxlIHNpemUgc3RydWN0dXJlcyB0aGUgYWNjZXNzb3JzIGJlbG93IHNob3VsZAorICogYmUgdXNlZCB0byBpdGVyYXRlIG92ZXIgdGhlbS4KKyAqLworCit0eXBlZGVmIHN0cnVjdCB4ZnNfZGlyMl9ibG9ja190YWlsIHsKKwlfX2JlMzIJCWNvdW50OwkJCS8qIGNvdW50IG9mIGxlYWYgZW50cmllcyAqLworCV9fYmUzMgkJc3RhbGU7CQkJLyogY291bnQgb2Ygc3RhbGUgbGYgZW50cmllcyAqLworfSB4ZnNfZGlyMl9ibG9ja190YWlsX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lrZWx5KCFkZWJ1Z19sb2NrcyB8fCBjdXJyZW50LT5sb2NrZGVwX3JlY3Vyc2lvbikpCiAJCXJldHVybjsKIAogCWlmIChERUJVR19MT0NLU19XQVJOX09OKCFpcnFzX2Rpc2FibGVkKCkpKQpkaWZmIC0tZ2l0IGEva2VybmVsL21vZHVsZS5jIGIva2VybmVsL21vZHVsZS5jCmluZGV4IDc5NWJkYzcuLjA0Mzc5ZjkyIDEwMDY0NAotLS0gYS9rZXJuZWwvbW9kdWxlLmMKKysrIGIva2VybmVsL21vZHVsZS5jCkBAIC01NDUsOSArNTQ1LDkgQEAKIAltb2QtPmZpZWxkID0ga3N0cmR1cChzLCBHRlBfS0VSTkVMKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiBzdGF0aWMgc3NpemVfdCBzaG93X21vZGluZm9fIyNmaWVsZChzdHJ1Y3QgbW9kdWxlX2F0dHJpYnV0ZSAqbWF0dHIsICAgXAotCSAgICAgICAgICAgICAgICBzdHJ1Y3QgbW9kdWxlICptb2QsIGNoYXIgKmJ1ZmZlcikgICAgICAgICAgICAgXAorCQkJc3RydWN0IG1vZHVsZV9rb2JqZWN0ICptaywgY2hhciAqYnVmZmVyKSAgICAgIFwKIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JcmV0dXJuIHNwcmludGYoYnVmZmVyLCAiJXNcbiIsIG1vZC0+ZmllbGQpOyAgICAgICAgICAgICAgICAgICBcCisJcmV0dXJuIHNwcmludGYoYnVmZmVyLCAiJXNcbiIsIG1rLT5tb2QtPmZpZWxkKTsgICAgICAgICAgICAgICBcCiB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogc3RhdGljIGlud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gc2tiKTsKKwkJYnJlYWs7CisKKwljYXNlIFNNUF9DTURfU0VDVVJJVFlfUkVROgorCQlyZWFzb24gPSBzbXBfY21kX3NlY3VyaXR5X3JlcShjb25uLCBza2IpOworCQlicmVhazsKKworCWNhc2UgU01QX0NNRF9QQUlSSU5HX0NPTkZJUk06CisJCXJlYXNvbiA9IHNtcF9jbWRfcGFpcmluZ19jb25maXJtKGNvbm4sIHNrYik7CisJCWJyZWFrOworCisJY2FzZSBTTVBfQ01EX1BBSVJJTkdfUkFORE9NOgorCQlyZWFzb24gPSBzbXBfY21kX3BhaXJpbmdfcmFuZG9tKGNvbm4sIHNrYik7CisJCWJyZWFrOworCisJY2FzZSBTTVBfQ01EX0VOQ1JZUFRfSU5GTzoKKwkJcmVhc29uID0gc21wX2NtZF9lbmNyeXB0X2luZm8oY29ubiwgc2tiKTsKKwkJYnJlYWs7CisKKwljYXNlIFNNUF9DTURfTUFTVEVSX0lERU5UOgorCQlyZWFzb24gPSBzbXBfY21kX21hc3Rlcl9pZGVudChjb25uLCBza2IpOworCQlicmVhazsKKworCWNhc2UgU01QX0NNRF9JREVOVF9JTkZPOgorCWNhc2UgU01QX0NNRF9JREVOVF9BRERSX0lORk86CisJY2FzZSBTTVBfQ01EX1NJR05fSU5GTzoKKwkJLyogSnVzdCBpZ25vcmVkICovCisJCXJlYXNvbiA9IDA7CisJCWJyZWFrOworCisJZGVmYXVsdDoKKwkJQlRfREJHKCJVbmtub3duIGNvbW1hbmQgY29kZSAweCUyLjJ4IiwgY29kZSk7CisKKwkJcmVhc29uID0gU01QX0NNRF9OT1RTVVBQOworCQllcnIgPSAtRU9QTk9UU1VQUDsKKwkJZ290byBkb25lOworCX0KKworZG9uZToKKwlpZiAocmVhc29uKQorCQlzbXBfc2VuZF9jbWQoY29ubiwgU01QX0NNRF9QQUlSSU5HX0ZBSUwsIHNpemVvZihyZWFzb24pLAorCQkJCQkJCQkmcmVhc29uKTsKKworCWtmcmVlX3NrYihza2IpOworCXJldH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oIWRldikKKwkJcmV0dXJuIC1FTk9ERVY7CisKKwltc2cgPSBubG1zZ19uZXcoTkxNU0dfR09PRFNJWkUsIEdGUF9LRVJORUwpOworCWlmICghbXNnKSB7CisJCXJjID0gLUVOT01FTTsKKwkJZ290byBvdXRfcHV0ZGV2OworCX0KKworCXJjID0gbmZjX2dlbmxfc2VuZF9kZXZpY2UobXNnLCBkZXYsIGluZm8tPnNuZF9waWQsIGluZm8tPnNuZF9zZXEsCisJCQkJCQkJCU5VTEwsIDApOworCWlmIChyYyA8IDApCisJCWdvdG8gb3V0X2ZyZWU7CisKKwluZmNfcHV0X2RldmljZShkZXYpOworCisJcmV0dXJuIGdlbmxtc2dfcmVwbHkobXNnLCBpbmZvKTsKKworb3V0X2ZyZWU6CisJbmxtc2dfZnJlZShtc2cpOworb3V0X3B1dGRldjoKKwluZmNfcHV0X2RldmljZShkZXYpOworCXJldHVybiByYzsKK30KKworc3RhdGljIGludCBuZmNfZ2VubF9zdGFydF9wb2xsKHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBnZW5sX2luZm8gKmluZm8pCit7CisJc3RydWN0IG5mY19kZXYgKmRldjsKKwlpbnQgcmM7CisJdTMyIGlkeDsKKwl1MzIgcHJvdG9jb2xzOworCisJbmZjX2RiZygiZW50cnkiKTsKKworCWlmICghaW5mby0+YXR0cnNbTkZDX0FUVFJfREVWSUNFX0lOREVYXSB8fAorCQkhaW5mby0+YXR0cnNbTkZDX0FUVFJfUFJPVE9DT0xTXSkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlpZHggPSBubGFfZ2V0X3UzMihpbmZvLT5hdHRyc1tORkNfQVRUUl9ERVZJQ0VfSU5ERVhdKTsKKwlwcm90b2NvbHMgPSBubGFfZ2V0X3UzMihpbmZvLT5hdHRyc1tORkNfQVRUUl9QUk9UT0NPTFNdKTsKKworCWRldiA9IG5mY19nZXRfZGV2aWNlKGlkeCk7CisJaWYgKCFkZXYpCisJCXJldHVybiAtRU5PREVWOwor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c2l6ZV90IGxlbiwgaW50IGZsYWdzKQoreworCWludCBub2Jsb2NrID0gZmxhZ3MgJiBNU0dfRE9OVFdBSVQ7CisJc3RydWN0IHNvY2sgKnNrID0gc29jay0+c2s7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKwlpbnQgY29waWVkOworCWludCByYzsKKworCW5mY19kYmcoInNvY2s9JXAgc2s9JXAgbGVuPSV6dSBmbGFncz0lZCIsIHNvY2ssIHNrLCBsZW4sIGZsYWdzKTsKKworCXNrYiA9IHNrYl9yZWN2X2RhdGFncmFtKHNrLCBmbGFncywgbm9ibG9jaywgJnJjKTsKKwlpZiAoIXNrYikKKwkJcmV0dXJuIHJjOworCisJbXNnLT5tc2dfbmFtZWxlbiA9IDA7CisKKwljb3BpZWQgPSBza2ItPmxlbjsKKwlpZiAobGVuIDwgY29waWVkKSB7CisJCW1zZy0+bXNnX2ZsYWdzIHw9IE1TR19UUlVOQzsKKwkJY29waWVkID0gbGVuOworCX0KKworCXJjID0gc2tiX2NvcHlfZGF0YWdyYW1faW92ZWMoc2tiLCAwLCBtc2ctPm1zZ19pb3YsIGNvcGllZCk7CisKKwlza2JfZnJlZV9kYXRhZ3JhbShzaywgc2tiKTsKKworCXJldHVybiByYyA/IDogY29waWVkOworfQorCisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgcHJvdG9fb3BzIHJhd3NvY2tfb3BzID0geworCS5mYW1pbHkgICAgICAgICA9IFBGX05GQywKKwkub3duZXIgICAgICAgICAgPSBUSElTX01PRFVMRSwKKwkucmVsZWFzZSAgICAgICAgPSByYXdzb2NrX3JlbGVhc2UsCisJLmJpbmQgICAgICAgICAgID0gc29ja19ub19iaW5kLAorCS5jb25uZWN0ICAgICAgICA9IHJhd3NvY2tfY29ubmVjdCwKKwkuc29ja2V0cGFpciAgICAgPSBzb2NrX25vX3NvY2tldHBhaXIsCisJLmFjY2VwdCAgICAgICAgID0gc29ja19ub19hY2NlcHQsCisJLmdldG5hbWUgICAgICAgID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90b2NvbCAqbmZjX3Byb3RvKQoreworCXN0cnVjdCBzb2NrICpzazsKKworCW5mY19kYmcoInNvY2s9JXAiLCBzb2NrKTsKKworCWlmIChzb2NrLT50eXBlICE9IFNPQ0tfU0VRUEFDS0VUKQorCQlyZXR1cm4gLUVTT0NLVE5PU1VQUE9SVDsKKworCXNvY2stPm9wcyA9ICZyYXdzb2NrX29wczsKKworCXNrID0gc2tfYWxsb2MobmV0LCBQRl9ORkMsIEdGUF9LRVJORUwsIG5mY19wcm90by0+cHJvdG8pOworCWlmICghc2spCisJCXJldHVybiAtRU5PTUVNOworCisJc29ja19pbml0X2RhdGEoc29jaywgc2spOworCXNrLT5za19wcm90b2NvbCA9IG5mY19wcm90by0+aWQ7CisJc2stPnNrX2Rlc3RydWN0ID0gcmF3c29ja19kZXN0cnVjdDsKKwlzb2NrLT5zdGF0ZSA9IFNTX1VOQ09OTkVDVEVEOworCisJSU5JVF9XT1JLKCZuZmNfcmF3c29jayhzayktPnR4X3dvcmssIHJhd3NvY2tfdHhfd29yayk7CisJbmZjX3Jhd3NvY2soc2spLT50eF93b3JrX3NjaGVkdWxlZCA9IGZhbHNlOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcHJvdG8gcmF3c29ja19wcm90byA9IHsKKwkubmFtZSAgICAgPSAiTkZDX1JBVyIsCisJLm93bmVyICAgID0gVEhJU19NT0RVTEUsCisJLm9ial9zaXplID0gc2l6ZW9mKHN0cnVjdCBuZmNfcmF3c29jayksCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IG5mY19wcm90b2NvbCByYXdzb2NrX25mY19wcm90byA9IHsKKwkuaWQJICA9IE5GQ19TT0NLUFJPVE9fUkFXLAorCS5wcm90byAgICA9ICZyYXdzb2NrX3Byb3RvLAorCS5vd25lciAgICA9IFRISVNfTU9EVUxFLAorCS5jcmVhdGUgICA9IHJhd3NvY2tfY3JlYXRlCit9OworCitpbnQgX19pbml0IHJhd3NvY2tfaW5p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8qIEFOU0ktQyBjb2RlIHByb2R1Y2VkIGJ5IGdwZXJmIHZlcnNpb24gMy4wLjQgKi8KLS8qIENvbW1hbmQtbGluZTogZ3BlcmYgLUwgQU5TSS1DIC1hIC1DIC1FIC1nIC1IIGlzX3Jlc2VydmVkX2hhc2ggLWsgJzEsMywkJyAtTiBpc19yZXNlcnZlZF93b3JkIC1wIC10IHNjcmlwdHMvZ2Vua3N5bXMva2V5d29yZHMuZ3BlcmYgICovCi0KLSNpZiAhKCgnICcgPT0gMzIpICYmICgnIScgPT0gMzMpICYmICgnIicgPT0gMzQpICYmICgnIycgPT0gMzUpIFwKLSAgICAgICYmICgnJScgPT0gMzcpICYmICgnJicgPT0gMzgpICYmICgnXCcnID09IDM5KSAmJiAoJygnID09IDQwKSBcCi0gICAgICAmJiAoJyknID09IDQxKSAmJiAoJyonID09IDQyKSAmJiAoJysnID09IDQzKSAmJiAoJywnID09IDQ0KSBcCi0gICAgICAmJiAoJy0nID09IDQ1KSAmJiAoJy4nID09IDQ2KSAmJiAoJy8nID09IDQ3KSAmJiAoJzAnID09IDQ4KSBcCi0gICAgICAmJiAoJzEnID09IDQ5KSAmJiAoJzInID09IDUwKSAmJiAoJzMnID09IDUxKSAmJiAoJzQnID09IDUyKSBcCi0gICAgICAmJiAoJzUnID09IDUzKSAmJiAoJzYnID09IDU0KSAmJiAoJzcnID09IDU1KSAmJiAoJzgnID09IDU2KSBcCi0gICAgICAmJiAoJzknID09IDU3KSAmJiAoJzonID09IDU4KSAmJiAoJzsnID09IDU5KSAmJiAoJzwnID09IDYwKSBcCi0gICAgICAmJiAoJz0nID09IDYxKSAmJiAoJz4nID09IDYyKSAmJiAoJz8nID09IDYzKSAmJiAoJ0EnID09IDY1KSBcCi0gICAgICAmJiAoJ0InID09IDY2KSAmJiAoJ0MnID09IDY3KSAmJiAoJ0QnID09IDY4KSAmJiAoJ0UnID09IDY5KSBcCi0gICAgICAmJiAoJ0YnID09IDcwKSAmJiAoJ0cnID09IDcxK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EpICYmICgnPicgPT0gNjIpICYmICgnPycgPT0gNjMpICYmICgnQScgPT0gNjUpIFwKKyAgICAgICYmICgnQicgPT0gNjYpICYmICgnQycgPT0gNjcpICYmICgnRCcgPT0gNjgpICYmICgnRScgPT0gNjkpIFwKKyAgICAgICYmICgnRicgPT0gNzApICYmICgnRycgPT0gNzEpICYmICgnSCcgPT0gNzIpICYmICgnSScgPT0gNzMpIFwKKyAgICAgICYmICgnSicgPT0gNzQpICYmICgnSycgPT0gNzUpICYmICgnTCcgPT0gNzYpICYmICgnTScgPT0gNzcpIFwKKyAgICAgICYmICgnTicgPT0gNzgpICYmICgnTycgPT0gNzkpICYmICgnUCcgPT0gODApICYmICgnUScgPT0gODEpIFwKKyAgICAgICYmICgnUicgPT0gODIpICYmICgnUycgPT0gODMpICYmICgnVCcgPT0gODQpICYmICgnVScgPT0gODUpIFwKKyAgICAgICYmICgnVicgPT0gODYpICYmICgnVycgPT0gODcpICYmICgnWCcgPT0gODgpICYmICgnWScgPT0gODkpIFwKKyAgICAgICYmICgnWicgPT0gOTApICYmICgnWycgPT0gOTEpICYmICgnXFwnID09IDkyKSAmJiAoJ10nID09IDkzKSBcCisgICAgICAmJiAoJ14nID09IDk0KSAmJiAoJ18nID09IDk1KSAmJiAoJ2EnID09IDk3KSAmJiAoJ2InID09IDk4KSBcCisgICAgICAmJiAoJ2MnID09IDk5KSAmJiAoJ2QnID09IDEwMCkgJiYgKCdlJyA9PSAxMDEpICYmICgnZicgPT0gMTAyKSBcCisgICAgICAmJiAoJ2cnID09IDEwMykgJiYgKCdoJyA9PSAxMDQpICYmICgnaScgPT0gMTA1KSAmJiAoJ2onID09IDEwNikgXAorICAgICAgJiYgKCdrJyA9PSAxMDcpICYmICgnbCcgPT0gMTA4KSAmJiAoJ20nID09IDEwOSkgJiYgKCduJyA9PSAxMTApIFwKKyAgICAgICYmICgnbycgPT0gMTExKSAmJiAoJ3AnID09IDExMikgJiYgKCdxJyA9PSAxMTMpICYmICgncicgPT0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gICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwKLSAgICAgICAgMSwgICAgMAotICAgIH0gOwotCi1zdGF0aWMgeXljb25zdCBmbGV4X2ludDMyX3QgeXlfZWNbMjU2XSA9Ci0gICAgeyAgIDAsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDIsICAgIDMsCi0gICAgICAgIDQsICAgIDQsICAgIDQsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDEsICAgIDIsICAgIDEsICAgIDUsICAgIDYsICAgIDcsICAgIDgsICAgIDksICAgMTAsICAgIDEsCi0gICAgICAgIDEsICAgIDgsICAgMTEsICAgIDEsICAgMTIsICAgMTMsICAgIDgsICAgMTQsICAgMTUsICAgMTUsCi0gICAgICAgMTUsICAgMTUsICAgMTUsICAgMTUsICAgMTUsICAgMTYsICAgMTYsICAgIDEsICAgIDEsICAgMTcsCi0gICAgICAgMTgsICAgMTksICAgIDEsICAgIDEsICAgMjAsICAgMjAsICAgMjAsICAgMjAsICAgMjEsICAgMjIsCi0gICAgICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgMjMsICAgIDcsICAgIDcsICAgIDcsICAgIDcsCi0gICAgICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgMjQsICAgIDcsICAgIDcsICAgMjUsICAgIDcsICAgIDcsCi0gICAgICAgIDEsICAgMjYsICAgIDEsICAgIDgsICAgIDcsICAgIDEsICAgMjAsICAgMjAsICAgMjAsICAgMjAsCi0KLSAgICAgICAyMSwgICAyMiwgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAyNywgICAgNywgICAgNywKLSAgICAgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAyNCwgICAgNywgICAgNywgICAyNSwKLSAgICAgICAgNywgICAgNywgICAgMSwgICAyOCwgICAgMSwgICAgOCwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLQotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxCi0gICAgfSA7Ci0KLXN0YXRpYyB5eWNvbnN0IGZsZXhfaW50MzJfdCB5eV9tZXRhWzI5XSA9Ci0gICAgeyAgIDAsCi0gICAgICAgIDEsICAgIDEsICAgIDIsICAgIDEsICAgIDEsICAgIDEsICAgIDMsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDQsICAgIDQsICAgIDUsICAgIDYsICAgIDYsICAgIDYsICAgIDEsICAgIDEsICAgIDEsICAgIDcsCi0gICAgICAgIDgsICAgIDcsICAgIDMsICAgIDMsICAgIDMsICAgIDEsICAgIDMsICAgIDEKLSAgICB9IDsKLQotc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X2Jhc2VbODVdID0KLSAgICB7ICAgMCwKLSAgICAgICAgMCwgIDE0NSwgIDE1MCwgIDI2NiwgICAyNywgIDI2NiwgICAyNSwgICAgMCwgIDEzMSwgICAyMywKLSAgICAgICAyMywgICAxNiwgICAyMywgICAzOSwgICAzMSwgICAyNSwgICAzOSwgICA2MCwgICAyMiwgICA2NSwKLSAgICAgICA1NywgICA0MywgIDI2NiwgICAgMCwgICAgMCwgIDI2NiwgICA2MSwgIDI2NiwgICAgMCwgIDEyOCwKLSAgICAgICA3NCwgICAgMCwgIDExMywgICA1OSwgICA2MiwgIDExMywgICA1MiwgICAgMCwgICAgMCwgICA3MiwKLSAgICAgICA2NiwgIDExMCwgIDEwMCwgIDI2NiwgICA3MywgICA3NCwgIDI2NiwgICA3MCwgIDI2NiwgICA5MCwKLSAgICAgIDEwMywgIDI2NiwgICA4NCwgIDEyOSwgIDEwOCwgIDExMywgIDE0MywgIDI2NiwgIDEwNywgICA2NiwKLSAgICAgIDExOCwgIDEzNywgIDE2OCwgIDEyMCwgICA4MCwgICA5MSwgIDE0NSwgIDE0MywgICA4MywgICA0MSwKLSAgICAgIDI2NiwgIDI2NiwgIDE5MCwgIDE5NiwgIDIwNCwgIDIxMiwgIDIyMCwgIDIyOCwgIDIzMiwgIDIzNywKLSAgICAgIDIzOCwgIDI0MywgIDI0OSwgIDI1NwotICAgIH0gOwotCi1zdGF0aWMgeXljb25zdCBmbGV4X2ludDE2X3QgeXlfZGVmWzg1XSA9Ci0gICAgeyAgIDAsCi0gICAgICAgNzIsICAgIDEsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzMsICAgNzQsICAgNzIsICAgNzIsCi0gICAgICAgNzUsICAgNzIsICAgNzIsICAgNzIsICAgMTQsICAgNzIsICAgNzIsICAgNzQsICAgNzIsICAgNzYsCi0gICAgICAgNzIsICAgNzMsICAgNzIsICAgNzcsICAgNzQsICAgNzIsICAgNzUsICAgNzIsICAgNzgsICAgNzIsCi0gICAgICAgNzIsICAgMzEsICAgMTQsICAgNzksICAgODAsICAgNzIsICAgNzIsICAgODEsICAgMTUsICAgNzMsCi0gICAgICAgNzUsICAgNzYsICAgNzYsICAgNzIsICAgNzMsICAgNzUsICAgNzIsICAgODIsICAgNzIsICAgNzIsCi0gICAgICAgNzIsICAgNzIsICAgODEsICAgNzYsICAgNTQsICAgNzIsICAgNzIsICAgNzIsICAgNzYsICAgNTQsCi0gICAgICAgNzYsICAgNzYsICAgNzYsICAgNTQsICAgODMsICAgNzYsICAgNjMsICAgODMsICAgODQsICAgODQsCi0gICAgICAgNzIsICAgIDAsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsCi0gICAgICAgNzIsICAgNzIsICAgNzIsICAgNzIKLSAgICB9IDsKLQotc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X254dFsyOTVdID0KLSAgICB7ICAgMCwKLSAgICAgICAgNCwgICAgNSwgICAgNiwgICAgNSwgICAgNywgICAgNCwgICAgOCwgICAgOSwgICAxMCwgICAxMSwKLSAgICAgICAgOSwgICAxMiwgICAxMywgICAxNCwgICAxNSwgICAxNSwgICAxNiwgICAgOSwgICAxNywgICAgOCwKLSAgICAgICAgOCwgIC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AgIDQ1LCAgIDQ2LAotCi0gICAgICAgMzEsICAgNDMsICAgNDMsICAgNTAsICAgNTAsICAgNTAsICAgNTMsICAgNTMsICAgNTksICAgNTksCi0gICAgICAgNTMsICAgNTksICAgNDIsICAgNDMsICAgNDMsICAgNDMsICAgNTEsICAgNTEsICAgNTEsICAgNjEsCi0gICAgICAgNjEsICAgNTUsICAgNTUsICAgNTUsICAgNTEsICAgNTEsICAgNTYsICAgNTYsICAgNTYsICAgNTEsCi0gICAgICAgNTQsICAgNTQsICAgNTUsICAgNjQsICAgNjQsICAgNjQsICAgMzYsICAgMzMsICAgNjIsICAgNjIsCi0gICAgICAgMzAsICAgNjEsICAgNTQsICAgNTQsICAgNjQsICAgNjgsICAgNjcsICAgNjgsICAgIDksICAgIDMsCi0gICAgICAgIDIsICAgNTQsICAgNTQsICAgNTQsICAgIDAsICAgNTQsICAgNTcsICAgNTcsICAgNTcsICAgNjIsCi0gICAgICAgIDAsICAgIDAsICAgIDAsICAgNjIsICAgNTcsICAgNTcsICAgIDAsICAgNjcsICAgNjcsICAgNTcsCi0gICAgICAgNjMsICAgNjcsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsCi0gICAgICAgIDAsICAgNjMsICAgNjMsICAgNjMsICAgIDAsICAgIDAsICAgIDAsICAgNjMsICAgNjMsICAgNjMsCi0gICAgICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzQsICAgIDAsCi0KLSAgICAgICAgMCwgICA3NCwgICA3NCwgICA3NCwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwKLSAgICAgICA3NSwgICA3NSwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwKLSAgICAgICA3NywgICAgMCwgICA3NywgICA3NywgICA3NywgICA3NywgICA3NywgICA3NywgICA3OCwgICAgMCwKLSAgICAgICA3O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wgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwKKyAgICAgICAgMSwgICAgMAorICAgIH0gOworCitzdGF0aWMgeXljb25zdCBmbGV4X2ludDMyX3QgeXlfZWNbMjU2XSA9CisgICAgeyAgIDAsCisgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDIsICAgIDMsCisgICAgICAgIDQsICAgIDQsICAgIDQsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCisgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCisgICAgICAgIDEsICAgIDIsICAgIDEsICAgIDUsICAgIDYsICAgIDcsICAgIDgsICAgIDksICAgMTAsICAgIDEsCisgICAgICAgIDEsICAgIDgsICAgMTEsICAgIDEsICAgMTIsICAgMTMsICAgIDgsICAgMTQsICAgMTUsICAgMTUsCisgICAgICAgMTUsICAgMTUsICAgMTUsICAgMTUsICAgMTUsICAgMTYsICAgMTYsICAgIDEsICAgIDEsICAgMTcsCisgICAgICAgMTgsICAgMTksICAgIDEsICAgIDEsICAgMjAsICAgMjAsICAgMjAsICAgMjAsICAgMjEsICAgMjIsCisgICAgICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgMjMsICAgIDcsICAgIDcsICAgIDcsICAgIDcsCisgICAgICAgIDcsICAgIDcsICAgIDcsICAgIDcsICAgMjQsICAgIDcsICAgIDcsICAgMjUsICAgIDcsICAgIDcsCisgICAgICAgIDEsICAgMjYsICAgIDEsICAgIDgsICAgIDcsICAgIDEsICAgMjAsICAgMjAsICAgMjAsICAgMjAsCisKKyAgICAgICAyMSwgICAyMiwgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAyNywgICAgNywgICAgNywKKyAgICAgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAgNywgICAyNCwgICAgNywgICAgNywgICAyNSwKKyAgICAgICAgNywgICAgNywgICAgMSwgICAyOCwgICAgMSwgICAgOCwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKworICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxCisgICAgfSA7CisKK3N0YXRpYyB5eWNvbnN0IGZsZXhfaW50MzJfdCB5eV9tZXRhWzI5XSA9CisgICAgeyAgIDAsCisgICAgICAgIDEsICAgIDEsICAgIDIsICAgIDEsICAgIDEsICAgIDEsICAgIDMsICAgIDEsICAgIDEsICAgIDEsCisgICAgICAgIDQsICAgIDQsICAgIDUsICAgIDYsICAgIDYsICAgIDYsICAgIDEsICAgIDEsICAgIDEsICAgIDcsCisgICAgICAgIDgsICAgIDcsICAgIDMsICAgIDMsICAgIDMsICAgIDEsICAgIDMsICAgIDEKKyAgICB9IDsKKworc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X2Jhc2VbODVdID0KKyAgICB7ICAgMCwKKyAgICAgICAgMCwgIDE0NSwgIDE1MCwgIDI2NiwgICAyNywgIDI2NiwgICAyNSwgICAgMCwgIDEzMSwgICAyMywKKyAgICAgICAyMywgICAxNiwgICAyMywgICAzOSwgICAzMSwgICAyNSwgICAzOSwgICA2MCwgICAyMiwgICA2NSwKKyAgICAgICA1NywgICA0MywgIDI2NiwgICAgMCwgICAgMCwgIDI2NiwgICA2MSwgIDI2NiwgICAgMCwgIDEyOCwKKyAgICAgICA3NCwgICAgMCwgIDExMywgICA1OSwgICA2MiwgIDExMywgICA1MiwgICAgMCwgICAgMCwgICA3MiwKKyAgICAgICA2NiwgIDExMCwgIDEwMCwgIDI2NiwgICA3MywgICA3NCwgIDI2NiwgICA3MCwgIDI2NiwgICA5MCwKKyAgICAgIDEwMywgIDI2NiwgICA4NCwgIDEyOSwgIDEwOCwgIDExMywgIDE0MywgIDI2NiwgIDEwNywgICA2NiwKKyAgICAgIDExOCwgIDEzNywgIDE2OCwgIDEyMCwgICA4MCwgICA5MSwgIDE0NSwgIDE0MywgICA4MywgICA0MSwKKyAgICAgIDI2NiwgIDI2NiwgIDE5MCwgIDE5NiwgIDIwNCwgIDIxMiwgIDIyMCwgIDIyOCwgIDIzMiwgIDIzNywKKyAgICAgIDIzOCwgIDI0MywgIDI0OSwgIDI1NworICAgIH0gOworCitzdGF0aWMgeXljb25zdCBmbGV4X2ludDE2X3QgeXlfZGVmWzg1XSA9CisgICAgeyAgIDAsCisgICAgICAgNzIsICAgIDEsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzMsICAgNzQsICAgNzIsICAgNzIsCisgICAgICAgNzUsICAgNzIsICAgNzIsICAgNzIsICAgMTQsICAgNzIsICAgNzIsICAgNzQsICAgNzIsICAgNzYsCisgICAgICAgNzIsICAgNzMsICAgNzIsICAgNzcsICAgNzQsICAgNzIsICAgNzUsICAgNzIsICAgNzgsICAgNzIsCisgICAgICAgNzIsICAgMzEsICAgMTQsICAgNzksICAgODAsICAgNzIsICAgNzIsICAgODEsICAgMTUsICAgNzMsCisgICAgICAgNzUsICAgNzYsICAgNzYsICAgNzIsICAgNzMsICAgNzUsICAgNzIsICAgODIsICAgNzIsICAgNzIsCisgICAgICAgNzIsICAgNzIsICAgODEsICAgNzYsICAgNTQsICAgNzIsICAgNzIsICAgNzIsICAgNzYsICAgNTQsCisgICAgICAgNzYsICAgNzYsICAgNzYsICAgNTQsICAgODMsICAgNzYsICAgNjMsICAgODMsICAgODQsICAgODQsCisgICAgICAgNzIsICAgIDAsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsCisgICAgICAgNzIsICAgNzIsICAgNzIsICAgNzIKKyAgICB9IDsKKworc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X254dFsyOTVdID0KKyAgICB7ICAgMCwKKyAgICAgICAgNCwgICAgNSwgICAgNiwgICAgNSwgICAgNywgICAgNCwgICAgOCwgICAgOSwgICAxMCwgICAxMSwKKyAgICAgICAgOSwgICAxMiwgICAxMywgICAxNCwgICAxNSwgICAxNSwgICAxNiwgICAgOSwgICAxNywgICAgOCwKKyAgICAgICAgOCwgICAgOCwgICAxOCwgICAgOCwgICAgOCwgICAgNCwgICAgOC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LCAgIDcyLCAgIDYxLCAgIDU3LCAgIDU3LCAgIDU3LCAgIDY2LAorICAgICAgIDcyLCAgIDcyLCAgIDcyLCAgIDY2LCAgIDQ5LCAgIDQ5LCAgIDcyLCAgIDYxLCAgIDYyLCAgIDQ5LAorICAgICAgIDQ0LCAgIDYxLCAgIDcyLCAgIDcyLCAgIDcyLCAgIDcyLCAgIDcyLCAgIDcyLCAgIDcyLCAgIDcyLAorICAgICAgIDcyLCAgIDY3LCAgIDY3LCAgIDY3LCAgIDcyLCAgIDcyLCAgIDcyLCAgIDY3LCAgIDY3LCAgIDY3LAorICAgICAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDI1LCAgIDcyLAorCisgICAgICAgNzIsICAgMjUsICAgMjUsICAgMjUsICAgMjcsICAgMjcsICAgMjcsICAgMjcsICAgMjcsICAgMjcsCisgICAgICAgMjcsICAgMjcsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsCisgICAgICAgNDUsICAgNzIsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDYsICAgNzIsCisgICAgICAgNDYsICAgNDYsICAgNDYsICAgNDYsICAgNDYsICAgNDYsICAgMzQsICAgMzQsICAgNzIsICAgMzQsCisgICAgICAgNTEsICAgNzIsICAgNTEsICAgNTMsICAgNTMsICAgNTMsICAgNTcsICAgNzIsICAgNTcsICAgNjgsCisgICAgICAgNjgsICAgNjgsICAgNjgsICAgNjgsICAgNjgsICAgNjgsICAgNjgsICAgNzAsICAgNzAsICAgNzAsCisgICAgICAgNzAsICAgNzAsICAgNzAsICAgNzAsICAgNzAsICAgIDMsICAgNzIsICAgNzIsICAgNzIsICAgNzIsCisgICAgICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsCisgICAgICAgNzIsICAgNzIsIC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ICAgNTAsICAgNTAsICAgNTMsICAgNTMsICAgNTksICAgNTksCisgICAgICAgNTMsICAgNTksICAgNDIsICAgNDMsICAgNDMsICAgNDMsICAgNTEsICAgNTEsICAgNTEsICAgNjEsCisgICAgICAgNjEsICAgNTUsICAgNTUsICAgNTUsICAgNTEsICAgNTEsICAgNTYsICAgNTYsICAgNTYsICAgNTEsCisgICAgICAgNTQsICAgNTQsICAgNTUsICAgNjQsICAgNjQsICAgNjQsICAgMzYsICAgMzMsICAgNjIsICAgNjIsCisgICAgICAgMzAsICAgNjEsICAgNTQsICAgNTQsICAgNjQsICAgNjgsICAgNjcsICAgNjgsICAgIDksICAgIDMsCisgICAgICAgIDIsICAgNTQsICAgNTQsICAgNTQsICAgIDAsICAgNTQsICAgNTcsICAgNTcsICAgNTcsICAgNjIsCisgICAgICAgIDAsICAgIDAsICAgIDAsICAgNjIsICAgNTcsICAgNTcsICAgIDAsICAgNjcsICAgNjcsICAgNTcsCisgICAgICAgNjMsICAgNjcsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsICAgIDAsCisgICAgICAgIDAsICAgNjMsICAgNjMsICAgNjMsICAgIDAsICAgIDAsICAgIDAsICAgNjMsICAgNjMsICAgNjMsCisgICAgICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzMsICAgNzQsICAgIDAsCisKKyAgICAgICAgMCwgICA3NCwgICA3NCwgICA3NCwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwKKyAgICAgICA3NSwgICA3NSwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwgICA3NiwKKyAgICAgICA3NywgICAgMCwgICA3NywgICA3NywgICA3NywgICA3NywgICA3NywgICA3NywgICA3OCwgICAgMCwKKyAgICAgICA3OCwgICA3OCwgICA3OCwgICA3OCwgICA3OCwgICA3OCwgICA3OSwgICA3OSwgICAgMCwgICA3OS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nVmX3ApID0geXl0ZXh0ICsgeXlsZXNzX21hY3JvX2FyZzsgXAorCQkoeXlfaG9sZF9jaGFyKSA9ICooeXlfY19idWZfcCk7IFwKKwkJKih5eV9jX2J1Zl9wKSA9ICdcMCc7IFwKKwkJeXlsZW5nID0geXlsZXNzX21hY3JvX2FyZzsgXAorCQl9IFwKKwl3aGlsZSAoIDAgKQorCisvKiBBY2Nlc3NvciAgbWV0aG9kcyAoZ2V0L3NldCBmdW5jdGlvbnMpIHRvIHN0cnVjdCBtZW1iZXJzLiAqLworCisvKiogR2V0IHRoZSBjdXJyZW50IGxpbmUgbnVtYmVyLgorICogCisgKi8KK2ludCB5eWdldF9saW5lbm8gICh2b2lkKQoreworICAgICAgICAKKyAgICByZXR1cm4geXlsaW5lbm87Cit9CisKKy8qKiBHZXQgdGhlIGlucHV0IHN0cmVhbS4KKyAqIAorICovCitGSUxFICp5eWdldF9pbiAgKHZvaWQpCit7CisgICAgICAgIHJldHVybiB5eWluOworfQorCisvKiogR2V0IHRoZSBvdXRwdXQgc3RyZWFtLgorICogCisgKi8KK0ZJTEUgKnl5Z2V0X291dCAgKHZvaWQpCit7CisgICAgICAgIHJldHVybiB5eW91dDsKK30KKworLyoqIEdldCB0aGUgbGVuZ3RoIG9mIHRoZSBjdXJyZW50IHRva2VuLgorICogCisgKi8KK2ludCB5eWdldF9sZW5nICAodm9pZCkKK3sKKyAgICAgICAgcmV0dXJuIHl5bGVuZzsKK30KKworLyoqIEdldCB0aGUgY3VycmVudCB0b2tlbi4KKyAqIAorICovCisKK2NoYXIgKnl5Z2V0X3RleHQgICh2b2lkKQoreworICAgICAgICByZXR1cm4geXl0ZXh0OworfQorCisvKiogU2V0IHRoZSBjdXJyZW50IGxpbmUgbnVtYmVyLgorICogQHBhcmFtIGxpbmVfbnVtYmVyCisgKiAKKyAqLwordm9pZCB5eXNldF9saW5lbm8gKGludCAgbGluZV9udW1iZXIgKQoreworICAgIAorICAgIHl5bGluZW5vID0gbGluZV9udW1iZXI7Cit9CisKKy8qKiBTZXQgdGhlIGlucHV0IHN0cmVhbS4gVGhpcyBkb2VzIG5vdCBkaXNjYXJkIHRoZSBjdXJyZW50CisgKiBpbnB1dCBidWZmZXIuCisgKiBAcGFyYW0gaW5fc3RyIEEgcmVhZGFibGUgc3RyZWFtLgorICogCisgKiBAc2VlIHl5X3N3aXRjaF90b19idWZmZXIKKyAqLwordm9pZCB5eXNldF9pbiAoRklMRSAqICBpbl9zdHIgKQoreworICAgICAgICB5eWluID0gaW5fc3RyIDsKK30KKwordm9pZCB5eXNldF9vdXQgKEZJTEUgKiAgb3V0X3N0ciApCit7CisgICAgICAgIHl5b3V0ID0gb3V0X3N0ciA7Cit9CisKK2ludCB5eWdldF9kZWJ1ZyAgKHZvaWQpCit7CisgICAgICAgIHJldHVybiB5eV9mbGV4X2RlYnVnOworfQorCit2b2lkIHl5c2V0X2RlYnVnIChpbnQgIGJkZWJ1ZyApCit7CisgICAgICAgIHl5X2ZsZXhfZGVidWcgPSBiZGVidWcgOworfQorCitzdGF0aWMgaW50IHl5X2luaXRfZ2xvYmFscyAodm9pZCkKK3sKKyAgICAgICAgLyogSW5pdGlhbGl6YXRpb24gaXMgdGhlIHNhbWUgYXMgZm9yIHRoZSBub24tcmVlbnRyYW50IHNjYW5uZXIuCisgICAgICogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB5eWxleF9kZXN0cm95KCksIHNvIGRvbid0IGFsbG9jYXRlIGhlcmUuCisgICAgICovCisKKyAgICAoeXlfYnVmZmVyX3N0YWNrKSA9IDA7CisgICAgKHl5X2J1ZmZlcl9zdGFja190b3ApID0gMDsKKyAgICAoeXlfYnVmZmVyX3N0YWNrX21heCkgPSAwOworICAgICh5eV9jX2J1Zl9wKSA9IChjaGFyICopIDA7CisgICAgKHl5X2luaXQpID0gMDsKKyAgICAoeXlfc3RhcnQpID0gMDsKKworLyogRGVmaW5lZCBpbiBtYWluLmMgKi8KKyNpZmRlZiBZWV9TVERJT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XAsIGRvbnRfd2FudF9icmFjZV9waHJhc2U7CisgIHN0YXRpYyBzdHJ1Y3Qgc3RyaW5nX2xpc3QgKm5leHRfbm9kZTsKKworICBpbnQgdG9rZW4sIGNvdW50ID0gMDsKKyAgc3RydWN0IHN0cmluZ19saXN0ICpjdXJfbm9kZTsKKworICBpZiAobGV4c3RhdGUgPT0gU1RfTk9UU1RBUlRFRCkKKyAgICB7CisgICAgICBuZXh0X25vZGUgPSB4bWFsbG9jKHNpemVvZigqbmV4dF9ub2RlKSk7CisgICAgICBuZXh0X25vZGUtPm5leHQgPSBOVUxMOworICAgICAgbGV4c3RhdGUgPSBTVF9OT1JNQUw7CisgICAgfQorCityZXBlYXQ6CisgIHRva2VuID0geXlsZXgxKCk7CisKKyAgaWYgKHRva2VuID09IDApCisgICAgcmV0dXJuIDA7CisgIGVsc2UgaWYgKHRva2VuID09IEZJTEVOQU1FKQorICAgIHsKKyAgICAgIGNoYXIgKmZpbGUsICplOworCisgICAgICAvKiBTYXZlIHRoZSBmaWxlbmFtZSBhbmQgbGluZSBudW1iZXIgZm9yIGxhdGVyIGVycm9yIG1lc3NhZ2VzLiAgKi8KKworICAgICAgaWYgKGN1cl9maWxlbmFtZSkKKwlmcmVlKGN1cl9maWxlbmFtZSk7CisKKyAgICAgIGZpbGUgPSBzdHJjaHIoeXl0ZXh0LCAnXCInKSsxOworICAgICAgZSA9IHN0cmNocihmaWxlLCAnXCInKTsKKyAgICAgICplID0gJ1wwJzsKKyAgICAgIGN1cl9maWxlbmFtZSA9IG1lbWNweSh4bWFsbG9jKGUtZmlsZSsxKSwgZmlsZSwgZS1maWxlKzEpOworICAgICAgY3VyX2xpbmUgPSBhdG9pKHl5dGV4dCsyKTsKKworICAgICAgZ290byByZXBlYXQ7CisgICAgfQorCisgIHN3aXRjaCAobGV4c3RhdGUpCisgICAgeworICAgIGNhc2UgU1RfTk9STUFMOgorICAgICAgc3dpdGNoICh0b2tlbikKKwl7CisJY2FzZSBJREVOVDoKKwk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dGF0ZSA9IFNUX0JSQUNFOworCSAgY291bnQgPSAxOworCSAgZ290byByZXBlYXQ7CisKKwljYXNlICc9JzogY2FzZSAnOic6CisJICBBUFA7CisJICBsZXhzdGF0ZSA9IFNUX0VYUFJFU1NJT047CisJICBicmVhazsKKworCWNhc2UgRE9UUzoKKwlkZWZhdWx0OgorCSAgQVBQOworCSAgYnJlYWs7CisJfQorICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFNUX0FUVFJJQlVURToKKyAgICAgIEFQUDsKKyAgICAgIHN3aXRjaCAodG9rZW4pCisJeworCWNhc2UgJygnOgorCSAgKytjb3VudDsKKwkgIGdvdG8gcmVwZWF0OworCWNhc2UgJyknOgorCSAgaWYgKC0tY291bnQgPT0gMCkKKwkgICAgeworCSAgICAgIGxleHN0YXRlID0gU1RfTk9STUFMOworCSAgICAgIHRva2VuID0gQVRUUklCVVRFX1BIUkFTRTsKKwkgICAgICBicmVhazsKKwkgICAgfQorCSAgZ290byByZXBlYXQ7CisJZGVmYXVsdDoKKwkgIGdvdG8gcmVwZWF0OworCX0KKyAgICAgIGJyZWFrOworCisgICAgY2FzZSBTVF9BU006CisgICAgICBBUFA7CisgICAgICBzd2l0Y2ggKHRva2VuKQorCXsKKwljYXNlICcoJzoKKwkgICsrY291bnQ7CisJICBnb3RvIHJlcGVhdDsKKwljYXNlICcpJzoKKwkgIGlmICgtLWNvdW50ID09IDApCisJICAgIHsKKwkgICAgICBsZXhzdGF0ZSA9IFNUX05PUk1BTDsKKwkgICAgICB0b2tlbiA9IEFTTV9QSFJBU0U7CisJICAgICAgYnJlYWs7CisJICAgIH0KKwkgIGdvdG8gcmVwZWF0OworCWRlZmF1bHQ6CisJICBnb3RvIHJlcGVhdDsKKwl9CisgICAgICBicmVhazsKKworICAgIGNhc2UgU1RfQlJBQ0tFVDoKKyAgICAgIEFQUDsKKyAgICAgIHN3aXRjaCAodG9rZW4pCisJeworCWNhc2UgJ1snOgorCSAgKytjb3VudDsKKwkgIGdvdG8gcmVwZWF0OworCWNhc2UgJ10nOgorCSAgaWYgKC0tY291bnQgPT0gMCkKKwkgICAgeworCSAgICAgIGxleHN0YXRlID0gU1RfTk9STUFMOworCSAgICAgIHRva2VuID0gQlJBQ0tFVF9QSFJBU0U7CisJICAgICAgYnJlYWs7CisJICAgIH0KKwkgIGdvdG8gcmVwZWF0OworCWRlZmF1bHQ6CisJICBnb3RvIHJlcGVhdDsKKwl9CisgICAgICBicmVhazsKKworICAgIGNhc2UgU1RfQlJBQ0U6CisgICAgICBBUFA7CisgICAgICBzd2l0Y2ggKHRva2VuKQorCXsKKwljYXNlICd7JzoKKwkgICsrY291bnQ7CisJICBnb3RvIHJlcGVhdDsKKwljYXNlICd9JzoKKwkgIGlmICgtLWNvdW50ID09IDApCisJICAgIHsKKwkgICAgICBsZXhzdGF0ZSA9IFNUX05PUk1BTDsKKwkgICAgICB0b2tlbiA9IEJSQUNFX1BIUkFTRTsKKwkgICAgICBicmVhazsKKwkgICAgfQorCSAgZ290byByZXBlYXQ7CisJZGVmYXVsdDoKKwkgIGdvdG8gcmVwZWF0OworCX0KKyAgICAgIGJyZWFrOworCisgICAgY2FzZSBTVF9FWFBSRVNTSU9OOgorICAgICAgc3dpdGNoICh0b2tlbikKKwl7CisJY2FzZSAnKCc6IGNhc2UgJ1snOiBjYXNlICd7JzoKKwkgICsrY291bnQ7CisJICBBUFA7CisJICBnb3RvIHJlcGVhdDsKKwljYXNlICd9JzoKKwkgIC8qIGlzIHRoaXMgdGhlIGxhc3QgbGluZSBvZiBhbiBlbnVtIGRlY2xhcmF0aW9uPyAqLworCSAgaWYgKGNvdW50ID09IDApCisJICAgIHsKKwkgICAgICAvKiBQdXQgYmFjayB0aGUgdG9rZW4gd2UganVzdCByZWFkIHNvJ3Mgd2UgY2FuIGZpbmQgaXQgYWdhaW4KKwkJIGFmdGVyIHJlZ2lzdGVyaW5nIHRoZSBleHByZXNzaW9uLiAgKi8KKwkgICAgICB1bnB1dCh0b2tlbik7CisKKwkgICAgICBsZXhzdGF0ZSA9IFNUX05PUk1BTDsKKwkgICAgICB0b2tlbiA9IEVYUFJFU1NJT05fUEhSQVNFOworCSAgICAgIGJyZWFrOworCSAgICB9CisJICAvKiBGQUxMVEhSVSAqLworCWNhc2UgJyknOiBjYXNlICddJzoKKwkgIC0tY291bnQ7CisJICBBUFA7CisJICBnb3RvIHJlcGVhdDsKKwljYXNlICcsJzogY2FzZSAnOyc6CisJICBpZiAoY291bnQgPT0gMCkKKwkgICAgeworCSAgICAgIC8qIFB1dCBiYWNrIHRoZSB0b2tlbiB3ZSBqdXN0IHJlYWQgc28ncyB3ZSBjYW4gZmluZCBpdCBhZ2FpbgorCQkgYWZ0ZXIgcmVnaXN0ZXJpbmcgdGhlIGV4cHJlc3Npb24uICAqLworCSAgICAgIHVucHV0KHRva2VuKTsKKworCSAgICAgIGxleHN0YXRlID0gU1RfTk9STUFMOworCSAgICAgIHRva2VuID0gRVhQUkVTU0lPTl9QSFJBU0U7CisJICAgICAgYnJlYWs7CisJICAgIH0KKwkgIEFQUDsKKwkgIGdvdG8gcmVwZWF0OworCWRlZmF1bHQ6CisJICBBUFA7CisJICBnb3RvIHJlcGVhdDsKKwl9CisgICAgICBicmVhazsKKworICAgIGNhc2UgU1RfVEFCTEVfMToKKyAgICAgIGdvdG8gcmVwZWF0OworCisgICAgY2FzZSBTVF9UQUJMRV8yOgorICAgICAgaWYgKHRva2VuID09IElERU5UICYmIHl5bGVuZyA9PSAxICYmIHl5dGV4dFswXSA9PSAnWCcpCisJeworCSAgdG9rZW4gPSBFWFBPUlRfU1lNQk9MX0tFWVc7CisJICBsZXhzdGF0ZSA9IFNUX1RBQkxFXzU7CisJICBBUFA7CisJICBicmVhazsKKwl9CisgICAgICBsZXhzdGF0ZSA9IFNUX1RBQkxFXzY7CisgICAgICAvKiBGQUxMVEhSVSAqLworCisgICAgY2FzZSBTVF9UQUJMRV82OgorICAgICAgc3dpdGNoICh0b2tlbikKKwl7CisJY2FzZSAneyc6IGNhc2UgJ1snOiBjYXNlICcoJzoKKwkgICsrY291bnQ7CisJICBicmVhazsKKwljYXNlICd9JzogY2FzZSAnXSc6IGNhc2UgJyknOgorCSAgLS1jb3VudDsKKwkgIGJyZWFrOworCWNhc2UgJywnOgorCSAgaWYgKGNvdW50ID09IDApCisJICAgIGxleHN0YXRlID0gU1RfVEFCTEVfMjsKKwkgIGJyZWFrOworCX07CisgICAgICBnb3RvIHJlcGVhdDsKKworICAgIGNhc2UgU1RfVEFCTEVfMzoKKyAgICAgIGdvdG8gcmVwZWF0OworCisgICAgY2FzZSBTVF9UQUJMRV80OgorICAgICAgaWYgKHRva2VuID09ICc7JykKKwlsZXhzdGF0ZSA9IFNUX05PUk1BTDsKKyAgICAgIGdvdG8gcmVwZWF0OworCisgICAgY2FzZSBTVF9UQUJMRV81OgorICAgICAgc3dpdGNoICh0b2tlbikKKwl7CisJY2FzZSAnLCc6CisJICB0b2tlbiA9ICc7JzsKKwkgIGxleHN0YXRlID0gU1RfVEFCTEVfMjsKKwkgIEFQUDsKKwkgIGJyZWFrOworCWRlZmF1bHQ6CisJICBBUFA7CisJICBicmVhazsKKwl9CisgICAgICBicmVhazsKKworICAgIGRlZmF1bHQ6CisgICAgICBleGl0KDEpOworICAgIH0KK2Zpbmk6CisKKyAgaWYgKHN1cHByZXNzX3R5cGVfbG9va3VwID4gMCkKKyAgICAtLXN1cHByZXNzX3R5cGVfbG9va3VwOworICBpZiAoZG9udF93YW50X2JyYWNlX3BocmFzZSA+IDApCisgICAgLS1kb250X3dhbnRfYnJhY2VfcGhyYXNlOworCisgIHl5bHZhbCA9ICZuZXh0X25vZGUtPm5leHQ7CisKKyAgcmV0dXJuIHRva2VuOworfQorCmRpZmYgLS1naXQgYS9zY3JpcHRzL2dlbmtzeW1zL3BhcnNlLmNfc2hpcHBlZCBiL3NjcmlwdHMvZ2Vua3N5bXMvcGFyc2UuY19zaGlwcGVkCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRle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wgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgNDcsICAgIDQ5LCAgICA0OCwgICAgIDIsICAgIDQ2LCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgIDUyLCAgICA0NCwKLSAgICAgICAyLCAgICA1MCwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgIDUxLCAgICAgMiwgICAgNDUsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0gICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKLSAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDEsICAgICAyLCAgICAgMywgICAgIDQsCi0gICAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwKLSAgICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LAotICAgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgMzEsICAgIDMyLCAgICAzMywgICAgMzQsCi0gICAgICAzNSwgICAgMzYsICAgIDM3LCAgICAzOCwgICAgMzksICAgIDQwLCAgICA0MSwgICAgNDIsICAgIDQzCi19OwotCi0jaWYgWVlERUJVRwotLyogWVlQUkhTW1lZTl0gLS0gSW5kZXggb2YgdGhlIGZpcnN0IFJIUyBzeW1ib2wgb2YgcnVsZSBudW1iZXIgWVlOIGluCi0gICBZWVJIUy4gICovCi1zdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQxNiB5eXByaHNbXSA9Ci17Ci0gICAgICAgMCwgICAgIDAsICAgICAzLCAgICAgNSwgICAgIDgsICAgICA5LCAgICAxMiwgICAgMTMsICAgIDE4LCAgICAxOSwKLSAgICAgIDIzLCAgICAyNSwgICAgMjcsICAgIDI5LCAgICAzMSwgICAgMzQsICAgIDM3LCAgICA0MSwgICAgNDIsICAgIDQ0LAotICAgICAgNDYsICAgIDUwLCAgICA1NSwgICAgNTYsICAgIDU4LCAgICA2MCwgICAgNjMsICAgIDY1LCAgICA2NywgICAgNjksCi0gICAgICA3MSwgICAgNzMsICAgIDc1LCAgICA3NywgICAgNzksICAgIDgxLCAgICA4NywgICAgOTIsICAgIDk1LCAgICA5OCwKLSAgICAgMTAxLCAgIDEwNSwgICAxMDksICAgMTEzLCAgIDExNiwgICAxMTksICAgMTIyLCAgIDEyNCwgICAxMjYsICAgMTI4LAotICAgICAxMzAsICAgMTMyLCAgIDEzNCwgICAxMzYsICAgMTM4LCAgIDE0MCwgICAxNDIsICAgMTQ0LCAgIDE0NywgICAxNDgsCi0gICAgIDE1MCwgICAxNTIsICAgMTU1LCAgIDE1NywgICAxNTksICAgMTYxLCAgIDE2MywgICAxNjYsICAgMTY4LCAgIDE3MCwKLSAgICAgMTc1LCAg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gIDYxLCAgICA0NCwKLSAgICAgIC0xLCAgICAtMSwgICAgNjIsICAgIC0xLCAgICA2MywgICAgLTEsICAgIDYyLCAgICA0NiwgICAgNjMsICAgIC0xLAotICAgICAgNzQsICAgMTAwLCAgICA5NSwgICAgODUsICAgIC0xLCAgICAtMSwgICAgNjUsICAgIC0xLCAgICA2NiwgICAgLTEsCi0gICAgICA2NSwgICAgNjYsICAgIC0xLCAgICA2NywgICAgLTEsICAgIDY4LCAgICAtMSwgICAgIDUsICAgIC0xLCAgICAxNywKLSAgICAgIC0xLCAgICAyMSwgICAgLTEsICAgIDExLCAgICAtMSwgICAgMTQsICAgIC0xLCAgICA2OSwgICAgLTEsICAgIDczLAotICAgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsICAgIDQ4LCAgICA0OSwgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsCi0gICAgICA0OSwgICAgLTEsICAgIDIyLCAgICAzNywgICAgLTEsICAgIDI0LCAgICAzNywgICAgLTEsICAgIDEwLCAgICAzNywKLSAgICAgIC0xLCAgICAyMiwgICAgMzcsICAgIDg3LCAgICAtMSwgICAgMjQsICAgIDM3LCAgICA4NywgICAgLTEsICAgIDEwLAotICAgICAgMzcsICAgIDk2LCAgICAtMSwgICAgMTAsICAgIDk2LCAgICAtMSwgICAgMjIsICAgIDg3LCAgICAtMSwgICAgMjQsCi0gICAgICA4NywgICAgLTEsICAgICA3LCAgICAtMSwgICAgMTksICAgIC0xLCAgICAxNSwgICAgLTEsICAgIDE2LCAgICAtMSwKLSAgICAgIDIwLCAgICAtMSwgICAgMjUsICAgIC0xLCAgICAxMywgICAgLTEsICAgICA5LCAgICAtMSwgICAgMjYsICAgIC0xLAotICAgICAgIDYsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIDQ4LCAgICA3MSwgICAgLTEsICAgIC0xLCAgICA3MiwgICAgLTEsCi0gICAgICA3MywgICAgLTEsICAgIDcyLCAgICA3MywgICAgLTEsICAgICA4LCAgICAtMSwgICAgMjcsICAgIC0xLCAgICAzMSwKLSAgICAgIC0xLCAgICAxOCwgICAgLTEsICAgIDcwLCAgICA3NCwgICAgLTEsICAgIDc1LCAgICAtMSwgICAgMzcsICAgIC0xLAotICAgICAgNzUsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA3NSwgICAgNDcsICAgICAxLCAgICA0OSwgICAgLTEsCi0gICAgICA3NSwgICAgMzMsICAgIC0xLCAgICA0NywgICAgNzQsICAgIDQ5LCAgICAtMSwgICAgNDcsICAgICAxLCAgICA0OSwKLSAgICAgIC0xLCAgICA3MCwgICAgNzYsICAgIC0xLCAgICA3NywgICAgLTEsICAgIDM3LCAgICAtMSwgICAgNDEsICAgIC0xLAotICAgICAgNzcsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA3NywgICAgNDcsICAgICAxLCAgICA0OSwgICAgLTEsCi0gICAgICA3NywgICAgMzMsICAgIC0xLCAgICA0NywgICAgNzYsICAgIDQ5LCAgICAtMSwgICAgNDcsICAgICAxLCAgICA0OSwKLSAgICAgIC0xLCAgICA3OSwgICAgMzYsICAgIC0xLCAgICA3OSwgICAgLTEsICAgIDgwLCAgICA0NiwgICAgMzYsICAgIC0xLAotICAgICAgLTEsICAgIDgwLCAgICAtMSwgICAgODEsICAgIC0xLCAgICA4MCwgICAgNDYsICAgIDgxLCAgICAtMSwgICAgNjUsCi0gICAgICA4MiwgICAgLTEsICAgIDcwLCAgICA4MiwgICAgLTEsICAgIDgzLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwKLSAgICAgIDQxLCAgICAtMSwgICAgODMsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA4MywgICAgNDcsICAgICAxLAotICAgICAgNDksICAgIC0xLCAgICA4MywgICAgMzMsICAgIC0xLCAgICA0NywgICAgODIsICAgIDQ5LCAgICAtMSwgICAgNDcsCi0gICAgICAgMSwgICAgNDksICAgIC0xLCAgICA2NCwgICAgNzQsICAgIDMyLCAgICAtMSwgICAgLTEsICAgIDg2LCAgICAtMSwKLSAgICAgIDUwLCAgICAzNCwgICAgLTEsICAgIDUxLCAgICA4OCwgICAgNDUsICAgIC0xLCAgICA1MSwgICAgIDEsICAgIDQ1LAotICAgICAgLTEsICAgIC0xLCAgICA4OSwgICAgLTEsICAgIDkwLCAgICAtMSwgICAgODksICAgIDkwLCAgICAtMSwgICAgNjQsCi0gICAgICA5MSwgICAgNDQsICAgIC0xLCAgICAgMSwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgOTIsICAgIC0xLCAgICA5MywKLSAgICAgIC0xLCAgICA5MiwgICAgNDYsICAgIDkzLCAgICAtMSwgICAgNzYsICAgIDk1LCAgICAtMSwgICAgMzcsICAgIDk0LAotICAgICAgLTEsICAgIDk0LCAgICAtMSwgICAgNTIsICAgIDM0LCAgICAtMSwgICAgLTEsICAgIDk1LCAgICAzMSwgICAgLTEsCi0gICAgICA1MSwgICAgOTcsICAgIDQ1LCAgICAtMSwgICAgNTEsICAgIDk3LCAgICA0NiwgICAgNDUsICAgIC0xLCAgICA5OCwKLSAgICAgIC0xLCAgICA5NywgICAgNDYsICAgIDk4LCAgICAtMSwgICAgMzcsICAgIC0xLCAgICAzNywgICAgNTAsICAgIDM0LAotICAgICAgLTEsICAgIDMwLCAgICA0NCwgICAgLTEsICAgIC0xLCAgICAzMCwgICAgLTEsICAgIDI5LCAgICA0NywgICAgMzcsCi0gICAgICA0OSwgICAgNDQsICAgIC0xCi19OwotCi0vKiBZWVJMSU5FW1lZTl0gLS0gc291cmNlIGxpbmUgd2hlcmUgcnVsZSBudW1iZXIgWVlOIHdhcyBkZWZpbmVkLiAgKi8KLXN0YXRpYyBjb25zdCB5eXR5cGVfdWludDE2IHl5cmxpbmVbXSA9Ci17Ci0gICAgICAgMCwgICAxMDQsICAgMTA0LCAgIDEwNSwgICAxMDksICAgMTA5LCAgIDExNSwgICAxMTUsICAgMTE3LCAgIDExNywKLSAgICAgMTE5LCAgIDEyMCwgICAxMjEsICAgMTIyLCAgIDEyMywgICAxMjQsICAgMTI4LCAgIDE0MiwgICAxNDMsICAgMTQ3LAotICAgICAxNTUsICAgMTY4LCAgIDE3NCwgICAxNzUsICAgMTc5LCAgIDE4MCwgICAxODQsICAgMTkwLCAgIDE5NCwgICAxOTUsCi0gICAgIDE5NiwgICAxOTcsICAgMTk4LCAgIDIwMiwgICAyMDMsICAgMjA0LCAgIDIwNSwgICAyMDksICAgMjExLCAgIDIxMywKLSAgICAgMjE3LCAgIDIyNCwgICAyMzEsICAgMjQxLCAgIDI0NCwgICAyNDUsICAgMjQ5LCAgIDI1MCwgICAyNTEsICAgMjUyLAotICAgICAyNTMsICAgMjU0LCAgIDI1NSwgICAyNTYsICAgMjU3LCAgIDI1OCwgICAyNTksICAgMjYzLCAgIDI2OCwgICAyNjksCi0gICAgIDI3MywgICAyNzQsICAgMjc4LCAgIDI3OCwgICAyNzgsICAgMjc5LCAgIDI4NywgICAyODgsICAgMjkyLCAgIDMwMSwKLSAgICAgMzAzLCAgIDMwNSwgICAzMDcsICAgMzA5LCAgIDMxNiwgICAzMTcsICAgMzIxLCAgIDMyMiwgICAzMjMsICAgMzI1LAotICAgICAzMjcsICAgMzI5LCAgIDMzMSwgICAzMzYsICAgMzM3LCAgIDMzOCwgICAzNDIsICAgMzQzLCAgIDM0NywgICAzNDgsCi0gICAgIDM1MywgICAzNTgsICAgMzYwLCAgIDM2NCwgICAzNjUsICAgMzczLCAgIDM3NywgICAzNzksICAgMzgxLCAgIDM4MywKLSAgICAgMzg1LCAgIDM5MCwgICAzOTksICAgNDAwLCAgIDQwNSwgICA0MTAsICAgNDExLCAgIDQxNSwgICA0MTYsICAgNDIwLAotICAgICA0MjEsICAgNDI1LCAgIDQyNywgICA0MzIsICAgNDMzLCAgIDQzNywgICA0MzgsICAgNDQyLCAgIDQ0MywgICA0NDQsCi0gICAgIDQ0OCwgICA0NTIsICAgNDUzLCAgIDQ1NywgICA0NTgsICAgNDYyLCAgIDQ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AyODQsCi0gICAgIDI4NSwgICAyODYsICAgMjg3LCAgIDI4OCwgICAyODksICAgMjkwLCAgIDI5MSwgICAyOTIsICAgMjkzLCAgIDI5NCwKLSAgICAgMjk1LCAgIDI5NiwgICAyOTcsICAgMjk4LCAgICA1OSwgICAxMjUsICAgIDQ0LCAgICA0MCwgICAgNDIsICAgIDQxLAotICAgICAgNjEsICAgMTIzLCAgICA1OAotfTsKLSMgZW5kaWYKLQotLyogWVlSMVtZWU5dIC0tIFN5bWJvbCBudW1iZXIgb2Ygc3ltYm9sIHRoYXQgcnVsZSBZWU4gZGVyaXZlcy4gICovCi1zdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQ4IHl5cjFbXSA9Ci17Ci0gICAgICAgMCwgICAgNTMsICAgIDU0LCAgICA1NCwgICAgNTYsICAgIDU1LCAgICA1OCwgICAgNTcsICAgIDU5LCAgICA1NywKLSAgICAgIDU3LCAgICA1NywgICAgNTcsICAgIDU3LCAgICA1NywgICAgNTcsICAgIDYwLCAgICA2MSwgICAgNjEsICAgIDYyLAotICAgICAgNjIsICAgIDYzLCAgICA2NCwgICAgNjQsICAgIDY1LCAgICA2NSwgICAgNjYsICAgIDY2LCAgICA2NywgICAgNjcsCi0gICAgICA2NywgICAgNjcsICAgIDY3LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwKLSAgICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LAotICAgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDcwLCAgICA3MSwgICAgNzEsCi0gICAgICA3MiwgICAgNzIsICAgIDczLCAgICA3MywgICAgNzMsICAgIDczLCAgICA3NCwgICAgNzQsICAgIDc1LCAgICA3NSwKLSAgICAgIDc1LCAgICA3NSwgICAgNzUsICAgIDc1LCAgICA3NiwgICAgNzYsICAgIDc3LCAgICA3NywgICAgNzcsICAgIDc3LAotICAgICAgNzcsICAgIDc3LCAgICA3NywgICAgNzgsICAgIDc4LCAgICA3OCwgICAgNzksICAgIDc5LCAgICA4MCwgICAgODAsCi0gICAgICA4MSwgICAgODIsICAgIDgyLCAgICA4MywgICAgODMsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLCAgICA4MywKLSAgICAgIDgzLCAgICA4NCwgICAgODUsICAgIDg1LCAgICA4NiwgICAgODcsICAgIDg3LCAgICA4OCwgICAgODgsICAgIDg5LAotICAgICAgODksICAgIDkwLCAgICA5MCwgICAgOTEsICAgIDkxLCAgICA5MiwgICAgOTIsICAgIDkzLCAgICA5MywgICAgOTMsCi0gICAgICA5NCwgICAgOTUsICAgIDk1LCAgICA5NiwgICAgOTYsICAgIDk3LCAgICA5NywgICAgOTgsICAgIDk4LCAgICA5OSwKLSAgICAgMTAwLCAgIDEwMCwgICAxMDEKLX07Ci0KLS8qIFlZUjJbWVlOXSAtLSBOdW1iZXIgb2Ygc3ltYm9scyBjb21wb3NpbmcgcmlnaHQgaGFuZCBzaWRlIG9mIHJ1bGUgWVlOLiAgKi8KLXN0YXRpYyBjb25zdCB5eXR5cGVfdWludDggeXlyMltdID0KLXsKLSAgICAgICAwLCAgICAgMiwgICAgIDEsICAgICAyLCAgICAgMCwgICAgIDIsICAgICAwLCAgICAgNCwgICAgIDAsICAgICAzLAotICAgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAyLCAgICAgMiwgICAgIDMsICAgICAwLCAgICAgMSwgICAgIDEsCi0gICAgICAgMywgICAgIDQsICAgICAwLCAgICAgMSwgICAgIDEsICAgICAyLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwKLSAgICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDUsICAgICA0LCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDMsICAgICAzLCAgICAgMywgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsCi0gICAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAwLCAgICAgMSwKLSAgICAgICAxLCAgICAgMiwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAyLCAgICAgMSwgICAgIDEsICAgICA0LAotICAgICAgIDQsICAgICAyLCAgICAgMywgICAgIDMsICAgICAyLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgNCwgICAgIDQsCi0gICAgICAgMiwgICAgIDMsICAgICAzLCAgICAgMiwgICAgIDEsICAgICAzLCAgICAgMCwgICAgIDEsICAgICAxLCAgICAgMywKLSAgICAgICAyLCAgICAgMiwgICAgIDEsICAgICAwLCAgICAgMSwgICAgIDEsICAgICA0LCAgICAgNCwgICAgIDIsICAgICAzLAotICAgICAgIDMsICAgICAzLCAgICAgMCwgICAgIDEsICAgICAyLCAgICAgMywgICAgIDMsICAgICAwLCAgICAgMSwgICAgIDEsCi0gICAgICAgMiwgICAgIDMsICAgICAyLCAgICAgMCwgICAgIDEsICAgICAxLCAgICAgMywgICAgIDIsICAgICAyLCAgICAgMSwKLSAgICAgICAyLCAgICAgMCwgICAgIDIsICAgICAzLCAgICAgNCwgICAgIDEsICAgICAzLCAgICAgMSwgICAgIDMsICAgICAyLAotICAgICAgIDAsICAgICAxLCAgICAgNQotfTsKLQotLyogWVlERUZBQ1RbU1RBVEUtTkFNRV0gLS0gRGVmYXVsdCBydWxlIHRvIHJlZHVjZSB3aXRoIGluIHN0YXRlCi0gICBTVEFURS1OVU0gd2hlbiBZWVRBQkxFIGRvZXNuJ3Qgc3BlY2lmeSBzb21ldGhpbmcgZWxzZSB0byBkby4gIFplcm8KLSAgIG1lYW5zIHRoZSBkZWZhdWx0IGlzIGFuIGVycm9yLiAgKi8KLXN0YXRpYyBjb25zdCB5eXR5cGVfdWludDggeXlkZWZhY3RbXSA9Ci17Ci0gICAgICAgNCwgICAgIDQsICAgICAyLCAgICAgMCwgICAgIDEsICAgICAzLCAgICAgMCwgICAgMjgsICAgIDU1LCAgICA0NiwKLSAgICAgIDYyLCAgICA1MywgICAgIDAsICAgIDMxLCAgICAgMCwgICAgNTIsICAgIDMyLCAgICA0OCwgICAgNDksICAgIDI5LAotICAgICAgNjUsICAgIDQ3LCAgICA1MCwgICAgMzAsICAgICAwLCAgICAgOCwgICAgIDAsICAgIDUxLCAgICA1NCwgICAgNjMsCi0gICAgICAgMCwgICAgIDAsICAgICAwLCAgICA2NCwgICAgNTYsICAgICA1LCAgICAxMCwgICAgMTcsICAgIDIzLCAgICAyNCwKLSAgICAgIDI2LCAgICAyNywgICAgMzMsICAgIDM0LCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDM5LAotICAgICAgIDAsICAgIDQzLCAgICAgNiwgICAgMzcsICAgICAwLCAgICA0NCwgICAgMjIsICAgIDM4LCAgICA0NSwgICAgIDAsCi0gICAgICAgMCwgICAxMjksICAgIDY4LCAgICAgMCwgICAgNTgsICAgICAwLCAgICAxOCwgICAgMTksICAgICAwLCAgIDEzMCwKLSAgICAgIDY3LCAgICAyNSwgICAgNDIsICAgMTI3LCAgICAgMCwgICAxMjUsICAgIDIyLCAgICA0MCwgICAgIDAsICAgMTEzLAotICAgICAgIDAsICAgICAwLCAgIDEwOSwgICAgIDksICAgIDE3LCAgICA0MSwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICA1NywgICAgNTksICAgIDYwLCAgICAxNiwgICAgIDAsICAgIDY2LCAgIDEzMSwgICAxMDEsICAgMTIxLCAgICA3MSwKLSAgICAgICAwLCAgICAgMCwgICAxMjMsICAgICAwLCAgICAgNywgICAxMTIsICAgMTA2LCAgICA3NiwgICAgNzcsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgIDEyMSwgICAgNzUsICAgICAwLCAgIDExNCwgICAxMTUsICAgMTE5LCAgIDEwNSwgICAgIDAsCi0gICAgIDExMCwgICAxMzAsICAgICAwLCAgICAzNiwgICAgIDAsICAgIDczLCAgICA3MiwgICAgNjEsICAgIDIwLCAgIDEwMiwKLSAgICAgICAwLCAgICA5MywgICAgIDAsICAgIDg0LCAgICA4NywgICAgODgsICAgMTI4LCAgIDEyNCwgICAxMjYsICAgMTE4LAotICAgICAgIDAsICAgIDc2LCAgICAgMCwgICAxMjAsICAgIDc0LCAgIDExNywgICAgODAsICAgICAwLCAgIDExMSwgICAgIDAsCi0gICAgICAzNSwgICAxMzIsICAgMTIyLCAgICAgMCwgICAgMjEsICAgMTAzLCAgICA3MCwgICAgOTQsICAgIDU2LCAgICAgMCwKLSAgICAgIDkzLCAgICA5MCwgICAgOTIsICAgIDY5LCAgICA4MywgICAgIDAsICAgIDgyLCAgICA4MSwgICAgIDAsICAgICAwLAotICAgICAxMTYsICAgMTA0LCAgICAgMCwgICAgOTUsICAgICAwLCAgICA5MSwgICAgOTgsICAgICAwLCAgICA4NSwgICAgODksCi0gICAgICA3OSwgICAgNzgsICAgMTAwLCAgICA5OSwgICAgIDAsICAgICAwLCAgICA5NywgICAgOTYKLX07Ci0KLS8qIFlZREVGR09UT1tOVEVSTS1OVU1dLiAgKi8KLXN0YXRpYyBjb25zdCB5eXR5cGVfaW50MTYgeXlkZWZnb3RvW10gPQotewotICAgICAgLTEsICAgICAxLCAgICAgMiwgICAgIDMsICAgIDM1LCAgICA3NiwgICAgNTYsICAgIDM2LCAgICA2NSwgICAgNjYsCi0gICAgICA2NywgICAgNzksICAgIDM4LCAgICAzOSwgICAgNDAsICAgIDQxLCAgICA0MiwgICAgNjgsICAgIDkwLCAgICA5MSwKLSAgICAgIDQzLCAgIDEyMSwgICAgNzAsICAgMTEyLCAgIDExMywgICAxMzIsICAgMTMzLCAgIDEzNCwgICAxMzUsICAgMTYxLAotICAgICAxNjIsICAgIDQ0LCAgIDE1NCwgICAxNTUsICAgIDU1LCAgICA4MCwgICAgODEsICAgIDgyLCAg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AgOTIsICAgMTUyLCAgICA4OCwgICAxNjksICAgIDczLCAgICAyMCwgICAgOTYsICAgMTQwLCAgICA5NywgICAxNDIsCi0gICAgICAgNCwgICAxNDQsICAgMTM3LCAgICA1MCwgICAgMjksICAgIDUyLCAgIDEwNCwgICAgNjEsICAgIDMzLCAgICA1MCwKLSAgICAgMTUzLCAgICA1MywgICAxMTEsICAgIDg5LCAgIDExMSwgICAgNzcsICAgLTkzLCAgIDEyNywgICAgOTUsICAgIDg1LAotICAgICAxNTcsICAgMTMxLCAgICA1OSwgICAxODUsICAgMTczLCAgICA1NCwgICAgNTcsICAgIDk5LCAgICA2MiwgICAgNzEsCi0gICAgIDE1OSwgICAgNjQsICAgLTkzLCAgIDE0MSwgICAxNjAsICAgIDYyLCAgICA4NCwgICAxMDgsICAgIDYzLCAgICA2NCwKLSAgICAgIDU0LCAgIDEwMCwgICAgNjAsICAgMTA5LCAgICA2NCwgICAgNjMsICAgIDY0LCAgIDE0NiwgICAgNzMsICAgMTA3LAotICAgICAgNTQsICAgMTc2LCAgIDExMSwgICAxMDgsICAgIDQ3LCAgICA0OCwgICAgODQsICAgMTA1LCAgIDEwNiwgICAxMDksCi0gICAgICA2NCwgICAxNDcsICAgMTYwLCAgIDE2MCwgICAxMTAsICAgMTc3LCAgIDE0MSwgICAgODcsICAgMTMxLCAgIDE1NywKLSAgICAgMTA4LCAgIDEwMiwgICAxMDMsICAgMTczLCAgICA3MSwgICAgOTMsICAgMTA5LCAgICA2NCwgICAxMDEsICAgMTU5LAotICAgICAgNjQsICAgMTc0LCAgIDE3NSwgICAgOTQsICAgMTE4LCAgIDEyNCwgICAxMzEsICAgIDc4LCAgIDEzNiwgICAxMjUsCi0gICAgIDEyNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgMTMxLCAgICAxNSwKLSAgICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgMTEwLAotICAgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgIDE0MywgICAxNDgsICAgIDMzLCAgIDEwNSwgICAxNDksCi0gICAgICA5NiwgICAxNTEsICAgMTUyLCAgIC0yMiwgICAxNTAsICAgMTU2LCAgIDE2NSwgICAgMzQsICAgMTYzLCAgIDE2NCwKLSAgICAgLTIyLCAgLTEwNywgICAxNjYsICAgLTIyLCAgIC0yMiwgICAxMTksICAgMTY3LCAgIDE3MSwgICAtMjIsICAgICA3LAotICAgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAxODAsICAgIDE1LCAgICAxNiwgICAgMTcsCi0gICAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAxODEsICAgIDI2LCAgICAyNywKLSAgICAgIDI4LCAgICAyOSwgICAgMzAsICAgMTgyLCAgIDE4MywgICAgMzMsICAgMTg2LCAgIDE4NywgICAgIDUsICAgMTc5LAotICAgICAxMjAsICAgLTIyLCAgIDEyOCwgICAxNzAsICAgMTM5LCAgICAzNCwgICAxNDUsICAgIDcyLCAgIC0yMiwgIC0xMDgsCi0gICAgICAgMCwgICAtMjIsICAgLTIyLCAgIDEzMCwgICAgIDAsICAgMTM4LCAgIC0yMiwgICAgIDcsICAgICA4LCAgICAgOSwKLSAgICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LAotICAgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksCi0gICAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwKLSAgICAgMTY4LCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLAotICAgICAgMTMsICAgLTg2LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsCi0gICAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwKLSAgICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAtODYsICAgICAwLCAgIDE4NCwgICAgIDAsICAgICAwLAotICAgICAgMzQsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgIC04NiwgICAgMTUsCi0gICAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwKLSAgICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgICA2LCAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwKLSAgICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLAotICAgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsCi0gICAgICAzMSwgICAgMzIsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTIyLCAgICAgMCwKLSAgICAgICAwLCAgICAgMCwgICAgMzQsICAgICAwLCAgICAgMCwgICAtMjIsICAgICAwLCAgICAgMCwgICAtMjIsICAgLTIyLAotICAgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsCi0gICAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwKLSAgICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgMzQsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgICAwLCAgIDEyMiwgICAxMjMsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwKLSAgICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLAotICAgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsCi0gICAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAxNTcsICAgICAwLCAgICAgMCwKLSAgICAgICAwLCAgIDE1OCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIDE1OSwgICAgNjQsICAgICA3LAotICAgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsCi0gICAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywKLSAgICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAotICAgICAxNzgsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsCi0gICAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwKLSAgICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLAotICAgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgIDM0Ci19OwotCi1zdGF0aWMgY29uc3QgeXl0eXBlX2ludDE2IHl5Y2hlY2tbXSA9Ci17Ci0gICAgICA1OSwgICAgMzgsICAgIDc5LCAgICAgMywgICAgIDEsICAgICA4LCAgICA1NiwgICAgMzcsICAgIDI2LCAgICAzNywKLSAgICAgIDY0LCAgICAzMSwgICAgIDEsICAgMTQ3LCAgICAzNywgICAgMTgsICAgIDMwLCAgICAgMSwgICAgMzIsICAgMTA5LAotICAgICAgIDAsICAgMTExLCAgICA0NSwgICAgNTEsICAgIDI3LCAgICAyMywgICAgNzYsICAgIDQ0LCAgICAzMSwgICAgNTEsCi0gICAgICA1MCwgICAgMzcsICAgMTA5LCAgICA2MywgICAxMTEsICAgIDUzLCAgICAzMywgICAgOTEsICAgIDY4LCAgICA1NywKLSAgICAgIDM3LCAgIDEwMCwgICAgNDcsICAgMTc3LCAgICA0MSwgICAgNTEsICAgIDM3LCAgICAzMywgICAgMzcsICAgIDg2LAotICAgICAgNDcsICAgIDQ4LCAgICA0OSwgICAgMzcsICAgMTMxLCAgICAzNywgICAgNTYsICAgIDQxLCAgICA0NywgICAgNDgsCi0gICAgICA1MSwgICAgNDcsICAgIDQ3LCAgICA0NywgICAgNDgsICAgIDQ3LCAgICA0OCwgICAgMzMsICAgIDM3LCAgICAzNywKLSAgICAgIDUxLCAgICAzMywgICAxNDksICAgIDQxLCAgICA0NCwgICAgNDUsICAgIDc2LCAgICA0NCwgICAgNDUsICAgIDQ3LAotICAgICAgNDgsICAgIDQ3LCAgIDE1OSwgICAxNjAsICAgIDUyLCAgICA0NywgICAgMzcsICAgIDM3LCAgIDE0NywgICAgMzcsCi0gICAgICA0MSwgICAgNDUsICAgIDQ2LCAgICA0MSwgICAxMzEsICAgIDQ0LCAgICA0NywgICAgNDgsICAgIDUwLCAgICA0NywKLSAgICAgIDQ4LCAgIDE1OSwgICAxNjAsICAgIDQ2LCAgICA0NSwgICAgNDksICAgMTY1LCAgICAgMSwgICAgMzQsICAgIDQ5LAotICAgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgIDE3NywgICAgMTMsCi0gICAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICA1MiwKLSAgICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMzQsICAgIDQ0LCAgICAzMSwgICAgNDQsICAgIDQ2LAotICAgICAgMzAsICAgIDQ0LCAgICAzMSwgICAgMzcsICAgIDQ5LCAgICA0OSwgICAgNDYsICAgIDQxLCAgICA0OSwgICAgMzYsCi0gICAgICA0NCwgICAgNDUsICAgIDQ5LCAgICA0NywgICAgNDgsICAgICAxLCAgICA0OSwgICAgMzQsICAgIDUyLCAgICAgNSwKLSAgICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDQ5LCAgICAxMywgICAgMTQsICAgIDE1LAotICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDQ5LCAgICAyNCwgICAgMjUsCi0gICAgICAyNiwgICAgMjcsICAgIDI4LCAgICA0OSwgICAgNDksICAgIDMxLCAgICA0OSwgICAgNDksICAgICAxLCAgIDE2NSwKLSAgICAgIDgxLCAgICAzNywgICAgOTQsICAgMTQ5LCAgIDEwNywgICAgNDEsICAgMTEyLCAgICA0OSwgICAgNDQsICAgIDQ1LAotICAgICAgLTEsICAgIDQ3LCAgICA0OCwgICAgIDEsICAgIC0xLCAgIDEwMywgICAgNTIsICAgICA1LCAgICAgNiwgICAgIDcsCi0gICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywKLSAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LAotICAgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNiwgICAgLTEsCi0gICAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwKLSAgICAgIDExLCAgICA0OSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLAotICAgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsCi0gICAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM2LCAgICAtMSwgICAgIDEsICAgIC0xLCAgICAtMSwKLSAgICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksICAgIDEzLAotICAgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsCi0gICAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgMzYsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsCi0gICAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwKLSAgICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LAotICAgICAgMjksICAgIDMwLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNywgICAgLTEsCi0gICAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIDQ0LCAgICAtMSwgICAgLTEsICAgIDQ3LCAgICA0OCwKLSAgICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LAotICAgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsCi0gICAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDgsICAgIDQ5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksCi0gICAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwKLSAgICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLAotICAgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwgICAgLTEsCi0gICAgICAtMSwgICAgNDEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDcsICAgIDQ4LCAgICAgNSwKLSAgICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LAotICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsCi0gICAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwKLSAgICAgIDM2LCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDEsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LAotICAgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsCi0gICAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwKLSAgICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICA0MQotfTsKLQotLyogWVlTVE9TW1NUQVRFLU5VTV0gLS0gVGhlIChpbnRlcm5hbCBudW1iZXIgb2YgdGhlKSBhY2Nlc3NpbmcKLSAgIHN5bWJvbCBvZiBzdGF0ZSBTVEFURS1OVU0uICAqLwotc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXN0b3NbXSA9Ci17Ci0gICAgICAgMCwgICAgNTQsICAgIDU1LCAgICA1NiwgICAgIDAsICAgIDU1LCAgICAgMSwgICAgIDUsICAgICA2LCAgICAgNywKLSAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LAotICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsCi0gICAgICAyOCwgICAgMjksICAgIDMwLCAgICAzMSwgICAgNDEsICAgIDU3LCAgICA2MCwgICAgNjQsICAgIDY1LCAgICA2NiwKLSAgICAgIDY3LCAgICA2OCwgICAgNjksICAgIDczLCAgICA4NCwgICAgOTksICAgMTAxLCAgICA0NCwgICAgNDUsICAgIDM3LAotICAgICAgNTEsICAgIDk2LCAgICAyMywgICAgMzcsICAgIDUxLCAgICA4NywgICAgNTksICAgIDM3LCAgICA4NywgICAgNDcsCi0gICAgICA0NywgICAgNDQsICAgIDM3LCAgICA0NywgICAgNDgsICAgIDYxLCAgICA2MiwgICAgNjMsICAgIDcwLCAgICA3NCwKLSAgICAgIDc1LCAgICA2NiwgICAgOTYsICAgIDM3LCAgICA5NywgICAgOTgsICAgIDU4LCAgICA4NywgICAgIDEsICAgIDY0LAotICAgICAgODgsICAgIDg5LCAgICA5MCwgICAgNjAsICAgIDY0LCAgICA4NywgICAgNjUsICAgIDM3LCAgICAgMSwgICAgNzQsCi0gICAgICA3MSwgICAgNzIsICAgIDczLCAgICA0NCwgICAgNDYsICAgIDc0LCAgICAzMCwgICAgMzIsICAgMTAwLCAgICAzMywKLSAgICAgIDQ3LCAgICA1MCwgICAgNDUsICAgIDQ2LCAgICA2MCwgICAgNDQsICAgIDQ1LCAgICAzNywgICAgNDEsICAgIDQ3LAotICAgICAgNTIsICAgIDcwLCAgICA3NiwgICAgNzcsICAgIDkxLCAgICA5MiwgICAgOTMsICAgIDk0LCAgICA0NSwgICAgIDEsCi0gICAgICA5MCwgICAgNzQsICAgIDQ4LCAgICA0OSwgICAgNDksICAgIDQ5LCAgICA0OSwgICAgNzMsICAgIDYzLCAgICA5NSwKLSAgICAgICAxLCAgICA2NSwgICAgNzgsICAgIDc5LCAgICA4MCwgICAgODEsICAgIDM0LCAgICA0NSwgICAgOTgsICAgIDk0LAotICAgICAgIDEsICAgIDM3LCAgICA3NiwgICAgMzQsICAgIDc2LCAgICA5NSwgICAgMzMsICAgIDQ3LCAgICA0NCwgICAgNDYsCi0gICAgICA0OSwgICAgNDQsICAgIDMxLCAgICA1MCwgICAgODUsICAgIDg2LCAgICA0OSwgICAgMzcsICAgIDQxLCAgICA0NywKLSAgICAgIDcwLCAgICA4MiwgICAgODMsICAgIDQ5LCAgICAzNiwgICAgNDYsICAgIDQ5LCAgICA0OSwgICAgIDEsICAgIDc4LAotICAgICAgOTMsICAgIDM0LCAgICAgMSwgICAgNDEsICAgIDgyLCAgICA4MiwgICAgMzMsICAgIDQ3LCAgICAzNiwgICAgODEsCi0gICAgICA0OSwgICAgNDksICAgIDQ5LCAgICA0OSwgICAgIDEsICAgIDc4LCAgICA0OSwgICAgNDkKLX07Ci0KLSNkZWZpbmUgeXllcnJvawkJKHl5ZXJyc3RhdHVzID0gMCkKLSNkZWZpbmUgeXljbGVhcmluCSh5eWNoYXIgPSBZWUVNUFRZKQotI2RlZmluZSBZWUVNUFRZCQkoLTIpCi0jZGVmaW5lIFlZRU9GCQkwCi0KLSNkZWZpbmUgWVlBQ0NFUFQJZ290byB5eWFjY2VwdGxhYgotI2RlZmluZSBZWUFCT1JUCQlnb3RvIHl5YWJvc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lVMRVMgLS0gTnVtYmVyIG9mIHJ1bGVzLiAgKi8KKyNkZWZpbmUgWVlOUlVMRVMgIDEzMgorLyogWVlOUlVMRVMgLS0gTnVtYmVyIG9mIHN0YXRlcy4gICovCisjZGVmaW5lIFlZTlNUQVRFUyAgMTg4CisKKy8qIFlZVFJBTlNMQVRFKFlZTEVYKSAtLSBCaXNvbiBzeW1ib2wgbnVtYmVyIGNvcnJlc3BvbmRpbmcgdG8gWVlMRVguICAqLworI2RlZmluZSBZWVVOREVGVE9LICAyCisjZGVmaW5lIFlZTUFYVVRPSyAgIDI5OAorCisjZGVmaW5lIFlZVFJBTlNMQVRFKFlZWCkJCQkJCQlcCisgICgodW5zaWduZWQgaW50KSAoWVlYKSA8PSBZWU1BWFVUT0sgPyB5eXRyYW5zbGF0ZVtZWVhdIDogWVlVTkRFRlRPSykKKworLyogWVlUUkFOU0xBVEVbWVlMRVhdIC0tIEJpc29uIHN5bWJvbCBudW1iZXIgY29ycmVzcG9uZGluZyB0byBZWUxFWC4gICovCitzdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQ4IHl5dHJhbnNsYXRlW10gPQoreworICAgICAgIDAsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICA0NywgICAgNDksICAgIDQ4LCAgICAgMiwgICAgNDYsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgNTIsICAgIDQ0LAorICAgICAgIDIsICAgIDUwLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgNTEsICAgICAyLCAgICA0NSwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAorICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMSwgICAgIDIsICAgICAzLCAgICAgNCwKKyAgICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LAorICAgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsCisgICAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAzMSwgICAgMzIsICAgIDMzLCAgICAzNCwKKyAgICAgIDM1LCAgICAzNiwgICAgMzcsICAgIDM4LCAgICAzOSwgICAgNDAsICAgIDQxLCAgICA0MiwgICAgNDMKK307CisKKyNpZiBZWURFQlVHCisvKiBZWVBSSFNbWVlOXSAtLSBJbmRleCBvZiB0aGUgZmlyc3QgUkhTIHN5bWJvbCBvZiBydWxlIG51bWJlciBZWU4gaW4KKyAgIFlZUkhTLiAgKi8KK3N0YXRpYyBjb25zdCB5eXR5cGVfdWludDE2IHl5cHJoc1tdID0KK3sKKyAgICAgICAwLCAgICAgMCwgICAgIDMsICAgICA1LCAgICAgOCwgICAgIDksICAgIDEyLCAgICAxMywgICAgMTgsICAgIDE5LAorICAgICAgMjMsICAgIDI1LCAgICAyNywgICAgMjksICAgIDMxLCAgICAzNCwgICAgMzcsICAgIDQxLCAgICA0MiwgICAgNDQsCisgICAgICA0NiwgICAgNTAsICAgIDU1LCAgICA1NiwgICAgNTgsICAgIDYwLCAgICA2MywgICAgNjUsICAgIDY3LCAgICA2OSwKKyAgICAgIDcxLCAgICA3MywgICAgNzUsICAgIDc3LCAgICA3OSwgICAgODEsICAgIDg3LCAgICA5MiwgICAgOTUsICAgIDk4LAorICAgICAxMDEsICAgMTA1LCAgIDEwOSwgICAxMTMsICAgMTE2LCAgIDExOSwgICAxMjIsICAgMTI0LCAgIDEyNiwgICAxMjgsCisgICAgIDEzMCwgICAxMzIsICAgMTM0LCAgIDEzNiwgICAxMzgsICAgMTQwLCAgIDE0MiwgICAxNDQsICAgMTQ3LCAgIDE0OCwKKyAgICAgMTUwLCAgIDE1MiwgICAxNTUsICAgMTU3LCAgIDE1OSwgICAxNjEsICAgMTYzLCAgIDE2NiwgICAxNjgsICAgMTcwLAorICAgICAxNzUsICAgMTgwLCAgIDE4MywgICAxODcsICAgMTkxLCAgIDE5NCwgICAxOTYsICAgMTk4LCAgIDIwMCwgICAyMDUsCisgICAgIDIxMCwgICAyMTMsICAgMjE3LCAgIDIyMSwgICAyMjQsICAgMjI2LCAgIDIzMCwgICAyMzEsICAgMjMzLCAgIDIzNSwKKyAgICAgMjM5LCAgIDI0MiwgICAyNDUsICAgMjQ3LCAgIDI0OCwgICAyNTAsICAgMjUyLCAgIDI1NywgICAyNjIsICAgMjY1LAorICAgICAyNjksICAgMjczLCAgIDI3NywgICAyNzgsICAgMjgwLCAgIDI4MywgICAyODcsICAgMjkxLCAgIDI5MiwgICAyOTQsCisgICAgIDI5NiwgICAyOTksICAgMzAzLCAgIDMwNiwgICAzMDcsICAgMzA5LCAgIDMxMSwgICAzMTUsICAgMzE4LCAgIDMyMSwKKyAgICAgMzIzLCAgIDMyNiwgICAzMjcsICAgMzMwLCAgIDMzNCwgICAzMzksICAgMzQxLCAgIDM0NSwgICAzNDcsICAgMzUxLAorICAgICAzNTQsICAgMzU1LCAgIDM1NworfTsKKworLyogWVlSSFMgLS0gQSBgLTEnLXNlcGFyYXRlZCBsaXN0IG9mIHRoZSBydWxlcycgUkhTLiAgKi8KK3N0YXRpYyBjb25zdCB5eXR5cGVfaW50OCB5eXJoc1tdID0KK3sKKyAgICAgIDU0LCAgICAgMCwgICAgLTEsICAgIDU1LCAgICAtMSwgICAgNTQsICAgIDU1LCAgICAtMSwgICAgLTEsICAgIDU2LAorICAgICAgNTcsICAgIC0xLCAgICAtMSwgICAgMTIsICAgIDIzLCAgICA1OCwgICAgNjAsICAgIC0xLCAgICAtMSwgICAgMjMsCisgICAgICA1OSwgICAgNjAsICAgIC0xLCAgICA2MCwgICAgLTEsICAgIDg0LCAgICAtMSwgICAgOTksICAgIC0xLCAgIDEwMSwKKyAgICAgIC0xLCAgICAgMSwgICAgNDQsICAgIC0xLCAgICAgMSwgICAgNDUsICAgIC0xLCAgICA2NCwgICAgNjEsICAgIDQ0LAorICAgICAgLTEsICAgIC0xLCAgICA2MiwgICAgLTEsICAgIDYzLCAgICAtMSwgICAgNjIsICAgIDQ2LCAgICA2MywgICAgLTEsCisgICAgICA3NCwgICAxMDAsICAgIDk1LCAgICA4NSwgICAgLTEsICAgIC0xLCAgICA2NSwgICAgLTEsICAgIDY2LCAgICAtMSwKKyAgICAgIDY1LCAgICA2NiwgICAgLTEsICAgIDY3LCAgICAtMSwgICAgNjgsICAgIC0xLCAgICAgNSwgICAgLTEsICAgIDE3LAorICAgICAgLTEsICAgIDIxLCAgICAtMSwgICAgMTEsICAgIC0xLCAgICAxNCwgICAgLTEsICAgIDY5LCAgICAtMSwgICAgNzMsCisgICAgICAtMSwgICAgMjgsICAgIDQ3LCAgICA2NSwgICAgNDgsICAgIDQ5LCAgICAtMSwgICAgMjgsICAgIDQ3LCAgICA2NSwKKyAgICAgIDQ5LCAgICAtMSwgICAgMjIsICAgIDM3LCAgICAtMSwgICAgMjQsICAgIDM3LCAgICAtMSwgICAgMTAsICAgIDM3LAorICAgICAgLTEsICAgIDIyLCAgICAzNywgICAgODcsICAgIC0xLCAgICAyNCwgICAgMzcsICAgIDg3LCAgICAtMSwgICAgMTAsCisgICAgICAzNywgICAgOTYsICAgIC0xLCAgICAxMCwgICAgOTYsICAgIC0xLCAgICAyMiwgICAgODcsICAgIC0xLCAgICAyNCwKKyAgICAgIDg3LCAgICAtMSwgICAgIDcsICAgIC0xLCAgICAxOSwgICAgLTEsICAgIDE1LCAgICAtMSwgICAgMTYsICAgIC0xLAorICAgICAgMjAsICAgIC0xLCAgICAyNSwgICAgLTEsICAgIDEzLCAgICAtMSwgICAgIDksICAgIC0xLCAgICAyNiwgICAgLTEsCisgICAgICAgNiwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgNDgsICAgIDcxLCAgICAtMSwgICAgLTEsICAgIDcyLCAgICAtMSwKKyAgICAgIDczLCAgICAtMSwgICAgNzIsICAgIDczLCAgICAtMSwgICAgIDgsICAgIC0xLCAgICAyNywgICAgLTEsICAgIDMxLAorICAgICAgLTEsICAgIDE4LCAgICAtMSwgICAgNzAsICAgIDc0LCAgICAtMSwgICAgNzUsICAgIC0xLCAgICAzNywgICAgLTEsCisgICAgICA3NSwgICAgNDcsICAgIDc4LCAgICA0OSwgICAgLTEsICAgIDc1LCAgICA0NywgICAgIDEsICAgIDQ5LCAgICAtMSwKKyAgICAgIDc1LCAgICAzMywgICAgLTEsICAgIDQ3LCAgICA3NCwgICAgNDksICAgIC0xLCAgICA0NywgICAgIDEsICAgIDQ5LAorICAgICAgLTEsICAgIDcwLCAgICA3NiwgICAgLTEsICAgIDc3LCAgICAtMSwgICAgMzcsICAgIC0xLCAgICA0MSwgICAgLTEsCisgICAgICA3NywgICAgNDcsICAgIDc4LCAgICA0OSwgICAgLTEsICAgIDc3LCAgICA0NywgICAgIDEsICAgIDQ5LCAgICAtMSwKKyAgICAgIDc3LCAgICAzMywgICAgLTEsICAgIDQ3LCAgICA3NiwgICAgNDksICAgIC0xLCAgICA0NywgICAgIDEsICAgIDQ5LAorICAgICAgLTEsICAgIDc5LCAgICAzNiwgICAgLTEsICAgIDc5LCAgICAtMSwgICAgODAsICAgIDQ2LCAgICAzNiwgICAgLTEsCisgICAgICAtMSwgICAgODAsICAgIC0xLCAgICA4MSwgICAgLTEsICAgIDgwLCAgICA0NiwgICAgODEsICAgIC0xLCAgICA2NSwKKyAgICAgIDgyLCAgICAtMSwgICAgNzAsICAgIDgyLCAgICAtMSwgICAgODMsICAgIC0xLCAgICAtMSwgICAgMzcsICAgIC0xLAorICAgICAgNDEsICAgIC0xLCAgICA4MywgICAgNDcsICAgIDc4LCAgICA0OSwgICAgLTEsICAgIDgzLCAgICA0NywgICAgIDEsCisgICAgICA0OSwgICAgLTEsICAgIDgzLCAgICAzMywgICAgLTEsICAgIDQ3LCAgICA4MiwgICAgNDksICAgIC0xLCAgICA0NywKKyAgICAgICAxLCAgICA0OSwgICAgLTEsICAgIDY0LCAgICA3NCwgICAgMzIsICAgIC0xLCAgICAtMSwgICAgODYsICAgIC0xLAorICAgICAgNTAsICAgIDM0LCAgICAtMSwgICAgNTEsICAgIDg4LCAgICA0NSwgICAgLTEsICAgIDUxLCAgICAgMSwgICAgNDUsCisgICAgICAtMSwgICAgLTEsICAgIDg5LCAgICAtMSwgICAgOTAsICAgIC0xLCAgICA4OSwgICAgOTAsICAgIC0xLCAgICA2NCwKKyAgICAgIDkxLCAgICA0NCwgICAgLTEsICAgICAxLCAgICA0NCwgICAgLTEsICAgIC0xLCAgICA5MiwgICAgLTEsICAgIDkzLAorICAgICAgLTEsICAgIDkyLCAgICA0NiwgICAgOTMsICAgIC0xLCAgICA3NiwgICAgOTUsICAgIC0xLCAgICAzNywgICAgOTQsCisgICAgICAtMSwgICAgOTQsICAgIC0xLCAgICA1MiwgICAgMzQsICAgIC0xLCAgICAtMSwgICAgOTUsICAgIDMxLCAgICAtMSwKKyAgICAgIDUxLCAgICA5NywgICAgNDUsICAgIC0xLCAgICA1MSwgICAgOTcsICAgIDQ2LCAgICA0NSwgICAgLTEsICAgIDk4LAorICAgICAgLTEsICAgIDk3LCAgICA0NiwgICAgOTgsICAgIC0xLCAgICAzNywgICAgLTEsICAgIDM3LCAgICA1MCwgICAgMzQsCisgICAgICAtMSwgICAgMzAsICAgIDQ0LCAgICAtMSwgICAgLTEsICAgIDMwLCAgICAtMSwgICAgMjksICAgIDQ3LCAgICAzNywKKyAgICAgIDQ5LCAgICA0NCwgICAgLTEKK307CisKKy8qIFlZUkxJTkVbWVlOXSAtLSBzb3VyY2UgbGluZSB3aGVyZSBydWxlIG51bWJlciBZWU4gd2FzIGRlZmluZWQuICAqLworc3RhdGljIGNvbnN0IHl5dHlwZV91aW50MTYgeXlybGluZVtdID0KK3sKKyAgICAgICAwLCAgIDEwNCwgICAxMDQsICAgMTA1LCAgIDEwOSwgICAxMDksICAgMTE1LCAgIDExNSwgICAxMTcsICAgMTE3LAorICAgICAxMTksICAgMTIwLCAgIDEyMSwgICAxMjIsICAgMTIzLCAgIDEyNCwgICAxMjgsICAgMTQyLCAgIDE0MywgICAxNDcsCisgICAgIDE1NSwgICAxNjgsICAgMTc0LCAgIDE3NSwgICAxNzksICAgMTgwLCAgIDE4NCwgICAxOTAsICAgMTk0LCAgIDE5NSwKKyAgICAgMTk2LCAgIDE5NywgICAxOTgsICAgM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CisgICAgICA2MSwgICAxMjMsICAgIDU4Cit9OworIyBlbmRpZgorCisvKiBZWVIxW1lZTl0gLS0gU3ltYm9sIG51bWJlciBvZiBzeW1ib2wgdGhhdCBydWxlIFlZTiBkZXJpdmVzLiAgKi8KK3N0YXRpYyBjb25zdCB5eXR5cGVfdWludDggeXlyMVtdID0KK3sKKyAgICAgICAwLCAgICA1MywgICAgNTQsICAgIDU0LCAgICA1NiwgICAgNTUsICAgIDU4LCAgICA1NywgICAgNTksICAgIDU3LAorICAgICAgNTcsICAgIDU3LCAgICA1NywgICAgNTcsICAgIDU3LCAgICA1NywgICAgNjAsICAgIDYxLCAgICA2MSwgICAgNjIsCisgICAgICA2MiwgICAgNjMsICAgIDY0LCAgICA2NCwgICAgNjUsICAgIDY1LCAgICA2NiwgICAgNjYsICAgIDY3LCAgICA2NywKKyAgICAgIDY3LCAgICA2NywgICAgNjcsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LAorICAgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksCisgICAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNzAsICAgIDcxLCAgICA3MSwKKyAgICAgIDcyLCAgICA3MiwgICAgNzMsICAgIDczLCAgICA3MywgICAgNzMsICAgIDc0LCAgICA3NCwgICAgNzUsICAgIDc1LAorICAgICAgNzUsICAgIDc1LCAgICA3NSwgICAgNzUsICAgIDc2LCAgICA3NiwgICAgNzcsICAgIDc3LCAgICA3NywgICAgNzcsCisgICAgICA3NywgICAgNzcsICAgIDc3LCAgICA3OCwgICAgNzgsICAgIDc4LCAgICA3OSwgICAgNzksICAgIDgwLCAgICA4MCwKKyAgICAgIDgxLCAgICA4MiwgICAgODIsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLAorICAgICAgODMsICAgIDg0LCAgICA4NSwgICAgODUsICAgIDg2LCAgICA4NywgICAgODcsICAgIDg4LCAgICA4OCwgICAgODksCisgICAgICA4OSwgICAgOTAsICAgIDkwLCAgICA5MSwgICAgOTEsICAgIDkyLCAgICA5MiwgICAgOTMsICAgIDkzLCAgICA5MywKKyAgICAgIDk0LCAgICA5NSwgICAgOTUsICAgIDk2LCAgICA5NiwgICAgOTcsICAgIDk3LCAgICA5OCwgICAgOTgsICAgIDk5LAorICAgICAxMDAsICAgMTAwLCAgIDEwMQorfTsKKworLyogWVlSMltZWU5dIC0tIE51bWJlciBvZiBzeW1ib2xzIGNvbXBvc2luZyByaWdodCBoYW5kIHNpZGUgb2YgcnVsZSBZWU4uICAqLworc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXIyW10gPQoreworICAgICAgIDAsICAgICAyLCAgICAgMSwgICAgIDIsICAgICAwLCAgICAgMiwgICAgIDAsICAgICA0LCAgICAgMCwgICAgIDMsCisgICAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAyLCAgICAgMywgICAgIDAsICAgICAxLCAgICAgMSwKKyAgICAgICAzLCAgICAgNCwgICAgIDAsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLAorICAgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgNSwgICAgIDQsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMywgICAgIDMsICAgICAzLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwKKyAgICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMiwgICAgIDAsICAgICAxLAorICAgICAgIDEsICAgICAyLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDQsCisgICAgICAgNCwgICAgIDIsICAgICAzLCAgICAgMywgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDEsICAgICA0LCAgICAgNCwKKyAgICAgICAyLCAgICAgMywgICAgIDMsICAgICAyLCAgICAgMSwgICAgIDMsICAgICAwLCAgICAgMSwgICAgIDEsICAgICAzLAorICAgICAgIDIsICAgICAyLCAgICAgMSwgICAgIDAsICAgICAxLCAgICAgMSwgICAgIDQsICAgICA0LCAgICAgMiwgICAgIDMsCisgICAgICAgMywgICAgIDMsICAgICAwLCAgICAgMSwgICAgIDIsICAgICAzLCAgICAgMywgICAgIDAsICAgICAxLCAgICAgMSwKKyAgICAgICAyLCAgICAgMywgICAgIDIsICAgICAwLCAgICAgMSwgICAgIDEsICAgICAzLCAgICAgMiwgICAgIDIsICAgICAxLAorICAgICAgIDIsICAgICAwLCAgICAgMiwgICAgIDMsICAgICA0LCAgICAgMSwgICAgIDMsICAgICAxLCAgICAgMywgICAgIDIsCisgICAgICAgMCwgICAgIDEsICAgICA1Cit9OworCisvKiBZWURFRkFDVFtTVEFURS1OQU1FXSAtLSBEZWZhdWx0IHJ1bGUgdG8gcmVkdWNlIHdpdGggaW4gc3RhdGUKKyAgIFNUQVRFLU5VTSB3aGVuIFlZVEFCTEUgZG9lc24ndCBzcGVjaWZ5IHNvbWV0aGluZyBlbHNlIHRvIGRvLiAgWmVybworICAgbWVhbnMgdGhlIGRlZmF1bHQgaXMgYW4gZXJyb3IuICAqLworc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eWRlZmFjdFtdID0KK3sKKyAgICAgICA0LCAgICAgNCwgICAgIDIsICAgICAwLCAgICAgMSwgICAgIDMsICAgICAwLCAgICAyOCwgICAgNTUsICAgIDQ2LAorICAgICAgNjIsICAgIDUzLCAgICAgMCwgICAgMzEsICAgICAwLCAgICA1MiwgICAgMzIsICAgIDQ4LCAgICA0OSwgICAgMjksCisgICAgICA2NSwgICAgNDcsICAgIDUwLCAgICAzMCwgICAgIDAsICAgICA4LCAgICAgMCwgICAgNTEsICAgIDU0LCAgICA2MywKKyAgICAgICAwLCAgICAgMCwgICAgIDAsICAgIDY0LCAgICA1NiwgICAgIDUsICAgIDEwLCAgICAxNywgICAgMjMsICAgIDI0LAorICAgICAgMjYsICAgIDI3LCAgICAzMywgICAgMzQsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMzksCisgICAgICAgMCwgICAgNDMsICAgICA2LCAgICAzNywgICAgIDAsICAgIDQ0LCAgICAyMiwgICAgMzgsICAgIDQ1LCAgICAgMCwKKyAgICAgICAwLCAgIDEyOSwgICAgNjgsICAgICAwLCAgICA1OCwgICAgIDAsICAgIDE4LCAgICAxOSwgICAgIDAsICAgMTMwLAorICAgICAgNjcsICAgIDI1LCAgICA0MiwgICAxMjcsICAgICAwLCAgIDEyNSwgICAgMjIsICAgIDQwLCAgICAgMCwgICAxMTMsCisgICAgICAgMCwgICAgIDAsICAgMTA5LCAgICAgOSwgICAgMTcsICAgIDQxLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgIDU3LCAgICA1OSwgICAgNjAsICAgIDE2LCAgICAgMCwgICAgNjYsICAgMTMxLCAgIDEwMSwgICAxMjEsICAgIDcxLAorICAgICAgIDAsICAgICAwLCAgIDEyMywgICAgIDAsICAgICA3LCAgIDExMiwgICAxMDYsICAgIDc2LCAgICA3NywgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgMTIxLCAgICA3NSwgICAgIDAsICAgMTE0LCAgIDExNSwgICAxMTksICAgMTA1LCAgICAgMCwKKyAgICAgMTEwLCAgIDEzMCwgICAgIDAsICAgIDM2LCAgICAgMCwgICAgNzMsICAgIDcyLCAgICA2MSwgICAgMjAsICAgMTAyLAorICAgICAgIDAsICAgIDkzLCAgICAgMCwgICAgODQsICAgIDg3LCAgICA4OCwgICAxMjgsICAgMTI0LCAgIDEyNiwgICAxMTgsCisgICAgICAgMCwgICAgNzYsICAgICAwLCAgIDEyMCwgICAgNzQsICAgMTE3LCAgICA4MCwgICAgIDAsICAgMTExLCAgICAgMCwKKyAgICAgIDM1LCAgIDEzMiwgICAxMjIsICAgICAwLCAgICAyMSwgICAxMDMsICAgIDcwLCAgICA5NCwgICAgNTYsICAgICAwLAorICAgICAgOTMsICAgIDkwLCAgICA5MiwgICAgNjksICAgIDgzLCAgICAgMCwgICAgODIsICAgIDgxLCAgICAgMCwgICAgIDAsCisgICAgIDExNiwgICAxMDQsICAgICAwLCAgICA5NSwgICAgIDAsICAgIDkxLCAgICA5OCwgICAgIDAsICAgIDg1LCAgICA4OSwKKyAgICAgIDc5LCAgICA3OCwgICAxMDAsICAgIDk5LCAgICAgMCwgICAgIDAsICAgIDk3LCAgICA5NgorfTsKKworLyogWVlERUZHT1RPW05URVJNLU5VTV0uICAqLworc3RhdGljIGNvbnN0IHl5dHlwZV9pbnQxNiB5eWRlZmdvdG9bXSA9Cit7CisgICAgICAtMSwgICAgIDEsICAgICAyLCAgICAgMywgICAgMzUsICAgIDc2LCAgICA1NiwgICAgMzYsICAgIDY1LCAgICA2NiwKKyAgICAgIDY3LCAgICA3OSwgICAgMzgsICAgIDM5LCAgICA0MCwgICAgNDEsICAgIDQyLCAgICA2OCwgICAgOTAsICAgIDkxLAorICAgICAgNDMsICAgMTIxLCAgICA3MCwgICAxMTIsICAgMTEzLCAgIDEzMiwgICAxMzMsICAgMTM0LCAgIDEzNSwgICAxNjEsCisgICAgIDE2MiwgICAgNDQsICAgMTU0LCAgIDE1NSwgICAgNTUsICAgIDgwLCAgICA4MSwgICAgODIsICAgMTE0LCAgIDExNSwKKyAgICAgMTE2LCAgIDExNywgICAxMjksICAgIDUxLCAgICA3NCwgICAgNzUsICAgIDQ1LCAgICA5OCwgICAgNDYKK307CisKKy8qIFlZUEFDVFtTVEFURS1OVU1dIC0tIEluZGV4IGluIFlZVEFCTEUgb2YgdGhlIHBvcnRpb24gZGVzY3JpYmluZworICAgU1RBVEUtTlVNLiAgKi8KKyNkZWZpb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03NywgIC0xMzUsICAtMTM1LAorICAgICAtNTQsICAgLTMwLCAgLTEzNSwgICAtOTAsICAtMTM1LCAgLTEzNCwgIC0xMzUsICAtMTM1LCAgICAyNCwgICAtNTgsCisgICAgLTEzNSwgIC0xMzUsICAtMTM1LCAgLTEzNSwgICAtMTgsICAtMTM1LCAgLTEzNSwgICAxMDksICAtMTM1LCAgLTEzNSwKKyAgICAgIDQ0LCAgICA4NywgICAgODQsICAgMTQ4LCAgLTEzNSwgICAxMDIsICAtMTM1LCAgLTEzNSwgIC0xMzUKK307CisKKy8qIFlZVEFCTEVbWVlQQUNUW1NUQVRFLU5VTV1dLiAgV2hhdCB0byBkbyBpbiBzdGF0ZSBTVEFURS1OVU0uICBJZgorICAgcG9zaXRpdmUsIHNoaWZ0IHRoYXQgdG9rZW4uICBJZiBuZWdhdGl2ZSwgcmVkdWNlIHRoZSBydWxlIHdoaWNoCisgICBudW1iZXIgaXMgdGhlIG9wcG9zaXRlLiAgSWYgemVybywgZG8gd2hhdCBZWURFRkFDVCBzYXlzLgorICAgSWYgWVlUQUJMRV9OSU5GLCBzeW50YXggZXJyb3IuICAqLworI2RlZmluZSBZWVRBQkxFX05JTkYgLTEwOQorc3RhdGljIGNvbnN0IHl5dHlwZV9pbnQxNiB5eXRhYmxlW10gPQoreworICAgICAgODYsICAgIDcxLCAgIDExMSwgICAgMzcsICAgMTcyLCAgICAxMCwgICAgODMsICAgIDY5LCAgICA1OCwgICAgNDksCisgICAgICA5MiwgICAxNTIsICAgIDg4LCAgIDE2OSwgICAgNzMsICAgIDIwLCAgICA5NiwgICAxNDAsICAgIDk3LCAgIDE0MiwKKyAgICAgICA0LCAgIDE0NCwgICAxMzcsICAgIDUwLCAgICAyOSwgICAgNTIsICAgMTA0LCAgICA2MSwgICAgMzMsICAgIDUwLAorICAgICAxNTMsICAgIDUzLCAgIDExMSwgICAgODksICAgMTExLCAgICA3NywgICAtOTMsICAgMTI3LCAgICA5NSwgICAgODUsCisgICAgIDE1NywgICAxMzEsICAgIDU5LCAgIDE4NSwgICAxNzMsICAgIDU0LCAgICA1NywgICAgOTksICAgIDYyLCAgICA3MSwKKyAgICAgMTU5LCAgICA2NCwgICAtOTMsICAgMTQxLCAgIDE2MCwgICAgNjIsICAgIDg0LCAgIDEwOCwgICAgNjMsICAgIDY0LAorICAgICAgNTQsICAgMTAwLCAgICA2MCwgICAxMDksICAgIDY0LCAgICA2MywgICAgNjQsICAgMTQ2LCAgICA3MywgICAxMDcsCisgICAgICA1NCwgICAxNzYsICAgMTExLCAgIDEwOCwgICAgNDcsICAgIDQ4LCAgICA4NCwgICAxMDUsICAgMTA2LCAgIDEwOSwKKyAgICAgIDY0LCAgIDE0NywgICAxNjAsICAgMTYwLCAgIDExMCwgICAxNzcsICAgMTQxLCAgICA4NywgICAxMzEsICAgMTU3LAorICAgICAxMDgsICAgMTAyLCAgIDEwMywgICAxNzMsICAgIDcxLCAgICA5MywgICAxMDksICAgIDY0LCAgIDEwMSwgICAxNTksCisgICAgICA2NCwgICAxNzQsICAgMTc1LCAgICA5NCwgICAxMTgsICAgMTI0LCAgIDEzMSwgICAgNzgsICAgMTM2LCAgIDEyNSwKKyAgICAgMTI2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAxMzEsICAgIDE1LAorICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAxMTAsCisgICAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgMTQzLCAgIDE0OCwgICAgMzMsICAgMTA1LCAgIDE0OSwKKyAgICAgIDk2LCAgIDE1MSwgICAxNTIsICAgLTIyLCAgIDE1MCwgICAxNTYsICAgMTY1LCAgICAzNCwgICAxNjMsICAgMTY0LAorICAgICAtMjIsICAtMTA3LCAgIDE2NiwgICAtMjIsICAgLTIyLCAgIDExOSwgICAxNjcsICAgMTcxLCAgIC0yMiwgICAgIDcsCisgICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgIDE4MCwgICAgMTUsICAgIDE2LCAgICAxNywKKyAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgIDE4MSwgICAgMjYsICAgIDI3LAorICAgICAgMjgsICAgIDI5LCAgICAzMCwgICAxODIsICAgMTgzLCAgICAzMywgICAxODYsICAgMTg3LCAgICAgNSwgICAxNzksCisgICAgIDEyMCwgICAtMjIsICAgMTI4LCAgIDE3MCwgICAxMzksICAgIDM0LCAgIDE0NSwgICAgNzIsICAgLTIyLCAgLTEwOCwKKyAgICAgICAwLCAgIC0yMiwgICAtMjIsICAgMTMwLCAgICAgMCwgICAxMzgsICAgLTIyLCAgICAgNywgICAgIDgsICAgICA5LAorICAgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksCisgICAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwKKyAgICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAtODYsICAgICAwLAorICAgICAxNjgsICAgICAwLCAgICAgMCwgICAgMzQsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsCisgICAgICAxMywgICAtODYsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwKKyAgICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLAorICAgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDAsICAgMTg0LCAgICAgMCwgICAgIDAsCisgICAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgLTg2LCAgICAxNSwKKyAgICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLAorICAgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgMzQsICAgICAwLCAgICAgMCwKKyAgICAgICAwLCAgICAgMCwgICAgIDYsICAgICAwLCAgICAgMCwgICAtODYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLAorICAgICAgMTEsICAgIDEyLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsCisgICAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwKKyAgICAgIDMxLCAgICAzMiwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAtMjIsICAgICAwLAorICAgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLCAgIC0yMiwgICAgIDAsICAgICAwLCAgIC0yMiwgICAtMjIsCisgICAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwKKyAgICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LAorICAgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgICAwLCAgICAgMCwgICAgIDAsICAgMTIyLCAgIDEyMywgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLAorICAgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsCisgICAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwKKyAgICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIDE1NywgICAgIDAsICAgICAwLAorICAgICAgIDAsICAgMTU4LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTU5LCAgICA2NCwgICAgIDcsCisgICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywKKyAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LAorICAgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCisgICAgIDE3OCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwKKyAgICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLAorICAgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsCisgICAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgICAwLCAgICAgMCwgICAgMzQKK307CisKK3N0YXRpYyBjb25zdCB5eXR5cGVfaW50MTYgeXljaGVja1tdID0KK3sKKyAgICAgIDU5LCAgICAzOCwgICAgNzksICAgICAzLCAgICAgMSwgICAgIDgsICAgIDU2LCAgICAzNywgICAgMjYsICAgIDM3LAorICAgICAgNjQsICAgIDMxLCAgICAgMSwgICAxNDcsICAgIDM3LCAgICAxOCwgICAgMzAsICAgICAxLCAgICAzMiwgICAxMDksCisgICAgICAgMCwgICAxMTEsICAgIDQ1LCAgICA1MSwgICAgMjcsICAgIDIzLCAgICA3NiwgICAgNDQsICAgIDMxLCAgICA1MSwKKyAgICAgIDUwLCAgICAzNywgICAxMDksICAgIDYzLCAgIDExMSwgICAgNTMsICAgIDMzLCAgICA5MSwgICAgNjgsICAgIDU3LAorICAgICAgMzcsICAgMTAwLCAgICA0NywgICAxNzcsICAgIDQxLCAgICA1MSwgICAgMzcsICAgIDMzLCAgICAzNywgICAgODYsCisgICAgICA0NywgICAgNDgsICAgIDQ5LCAgICAzNywgICAxMzEsICAgIDM3LCAgICA1NiwgICAgNDEsICAgIDQ3LCAgICA0OCwKKyAgICAgIDUxLCAgICA0NywgICAgNDcsICAgIDQ3LCAgICA0OCwgICAgNDcsICAgIDQ4LCAgICAzMywgICAgMzcsICAgIDM3LAorICAgICAgNTEsICAgIDMzLCAgIDE0OSwgICAgNDEsICAgIDQ0LCAgICA0NSwgICAgNzYsICAgIDQ0LCAgICA0NSwgICAgNDcsCisgICAgICA0OCwgICAgNDcsICAgMTU5LCAgIDE2MCwgICAgNTIsICAgIDQ3LCAgICAzNywgICAgMzcsICAgMTQ3LCAgICAzNywKKyAgICAgIDQxLCAgICA0NSwgICAgNDYsICAgIDQxLCAgIDEzMSwgICAgNDQsICAgIDQ3LCAgICA0OCwgICAgNTAsICAgIDQ3LAorICAgICAgNDgsICAgMTU5LCAgIDE2MCwgICAgNDYsICAgIDQ1LCAgICA0OSwgICAxNjUsICAgICAxLCAgICAzNCwgICAgNDksCisgICAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgMTc3LCAgICAxMywKKyAgICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDUyLAorICAgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAzNCwgICAgNDQsICAgIDMxLCAgICA0NCwgICAgNDYsCisgICAgICAzMCwgICAgNDQsICAgIDMxLCAgICAzNywgICAgNDksICAgIDQ5LCAgICA0NiwgICAgNDEsICAgIDQ5LCAgICAzNiwKKyAgICAgIDQ0LCAgICA0NSwgICAgNDksICAgIDQ3LCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAzNCwgICAgNTIsICAgICA1LAorICAgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksICAgIDEzLCAgICAxNCwgICAgMTUsCisgICAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgNDksICAgIDI0LCAgICAyNSwKKyAgICAgIDI2LCAgICAyNywgICAgMjgsICAgIDQ5LCAgICA0OSwgICAgMzEsICAgIDQ5LCAgICA0OSwgICAgIDEsICAgMTY1LAorICAgICAgODEsICAgIDM3LCAgICA5NCwgICAxNDksICAgMTA3LCAgICA0MSwgICAxMTIsICAgIDQ5LCAgICA0NCwgICAgNDUsCisgICAgICAtMSwgICAgNDcsICAgIDQ4LCAgICAgMSwgICAgLTEsICAgMTAzLCAgICA1MiwgICAgIDUsICAgICA2LCAgICAgNywKKyAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LAorICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsCisgICAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM2LCAgICAtMSwKKyAgICAgICAxLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLAorICAgICAgMTEsICAgIDQ5LCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsCisgICAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwKKyAgICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgMzYsICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLAorICAgICAgNDEsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICA0OSwgICAgMTMsCisgICAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwKKyAgICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIC0xLCAgICAzNiwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsCisgICAgICAtMSwgICAgLTEsICAgICAxLCAgICAtMSwgICAgLTEsICAgIDQ5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwKKyAgICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LAorICAgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsCisgICAgICAyOSwgICAgMzAsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwKKyAgICAgIC0xLCAgICAtMSwgICAgNDEsICAgIC0xLCAgICAtMSwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgNDcsICAgIDQ4LAorICAgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsCisgICAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwKKyAgICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDEsICAgIC0xLCAgICAtMSwgICAgLTEsCisgICAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0OCwgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwKKyAgICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LAorICAgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsCisgICAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgMzcsICAgIC0xLCAgICAtMSwKKyAgICAgIC0xLCAgICA0MSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0NywgICAgNDgsICAgICA1LAorICAgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsCisgICAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwKKyAgICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgMzYsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsCisgICAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwKKyAgICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LAorICAgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsCisgICAgICAtMSwgICAgLTEsICAgIDQxCit9OworCisvKiBZWVNUT1NbU1RBVEUtTlVNXSAtLSBUaGUgKGludGVybmFsIG51bWJlciBvZiB0aGUpIGFjY2Vzc2luZworICAgc3ltYm9sIG9mIHN0YXRlIFNUQVRFLU5VTS4gICovCitzdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQ4IHl5c3Rvc1tdID0KK3sKKyAgICAgICAwLCAgICA1NCwgICAgNTUsICAgIDU2LCAgICAgMCwgICAgNTUsICAgICAxLCAgICAgNSwgICAgIDYsICAgICA3LAorICAgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsCisgICAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywKKyAgICAgIDI4LCAgICAyOSwgICAgMzAsICAgIDMxLCAgICA0MSwgICAgNTcsICAgIDYwLCAgICA2NCwgICAgNjUsICAgIDY2LAorICAgICAgNjcsICAgIDY4LCAgICA2OSwgICAgNzMsICAgIDg0LCAgICA5OSwgICAxMDEsICAgIDQ0LCAgICA0NSwgICAgMzcsCisgICAgICA1MSwgICAgOTYsICAgIDIzLCAgICAzNywgICAgNTEsICAgIDg3LCAgICA1OSwgICAgMzcsICAgIDg3LCAgICA0NywKKyAgICAgIDQ3LCAgICA0NCwgICAgMzcsICAgIDQ3LCAgICA0OCwgICAgNjEsICAgIDYyLCAgICA2MywgICAgNzAsICAgIDc0LAorICAgICAgNzUsICAgIDY2LCAgICA5NiwgICAgMzcsICAgIDk3LCAgICA5OCwgICAgNTgsICAgIDg3LCAgICAgMSwgICAgNjQsCisgICAgICA4OCwgICAgODksICAgIDkwLCAgICA2MCwgICAgNjQsICAgIDg3LCAgICA2NSwgICAgMzcsICAgICAxLCAgICA3NCwKKyAgICAgIDcxLCAgICA3MiwgICAgNzMsICAgIDQ0LCAgICA0NiwgICAgNzQsICAgIDMwLCAgICAzMiwgICAxMDAsICAgIDMzLAorICAgICAgNDcsICAgIDUwLCAgICA0NSwgICAgNDYsICAgIDYwLCAgICA0NCwgICAgNDUsICAgIDM3LCAgICA0MSwgICAgNDcsCisgICAgICA1MiwgICAgNzAsICAgIDc2LCAgICA3NywgICAgOTEsICAgIDkyLCAgICA5MywgICAgOTQsICAgIDQ1LCAgICAgMSwKKyAgICAgIDkwLCAgICA3NCwgICAgNDgsICAgIDQ5LCAgICA0OSwgICAgNDksICAgIDQ5LCAgICA3MywgICAgNjMsICAgIDk1LAorICAgICAgIDEsICAgIDY1LCAgICA3OCwgICAgNzksICAgI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ICAgIFlZXygic3ludGF4IGVycm9yLCB1bmV4cGVjdGVkICVzIik7CisgICAgICBZWV8oInN5bnRheCBlcnJvciwgdW5leHBlY3RlZCAlcywgZXhwZWN0aW5nICVzIik7CisgICAgICBZWV8oInN5bnRheCBlcnJvciwgdW5leHBlY3RlZCAlcywgZXhwZWN0aW5nICVzIG9yICVzIik7CisgICAgICBZWV8oInN5bnRheCBlcnJvciwgdW5leHBlY3RlZCAlcywgZXhwZWN0aW5nICVzIG9yICVzIG9yICVzIik7CisgICAgICBZWV8oInN5bnRheCBlcnJvciwgdW5leHBlY3RlZCAlcywgZXhwZWN0aW5nICVzIG9yICVzIG9yICVzIG9yICVzIik7CisjIGVuZGlmCisgICAgICBjaGFyICp5eWZtdDsKKyAgICAgIGNoYXIgY29uc3QgKnl5ZjsKKyAgICAgIHN0YXRpYyBjaGFyIGNvbnN0IHl5dW5leHBlY3RlZFtdID0gInN5bnRheCBlcnJvciwgdW5leHBlY3RlZCAlcyI7CisgICAgICBzdGF0aWMgY2hhciBjb25zdCB5eWV4cGVjdGluZ1tdID0gIiwgZXhwZWN0aW5nICVzIjsKKyAgICAgIHN0YXRpYyBjaGFyIGNvbnN0IHl5b3JbXSA9ICIgb3IgJXMiOworICAgICAgY2hhciB5eWZvcm1hdFtzaXplb2YgeXl1bmV4cGVjdGVkCisJCSAgICArIHNpemVvZiB5eWV4cGVjdGluZyAtIDEKKwkJICAgICsgKChZWUVSUk9SX1ZFUkJPU0VfQVJHU19NQVhJTVVNIC0gMikKKwkJICAgICAgICogKHNpemVvZiB5eW9yIC0gMSkpXTsKKyAgICAgIGNoYXIgY29uc3QgKnl5cHJlZml4ID0geXlleHBlY3Rpbmc7CisKKyAgICAgIC8qIFN0YXJ0IFlZWCBhdCAtWVlOIGlmIG5lZ2F0aXZlIHRvIGF2b2lkIG5lZ2F0aXZlIGluZGV4ZXMgaW4KKwkgWVlDSEVDSy4gICovCisgICAgICBpbnQgeXl4YmVnaW4gPSB5eW4gPCAwID8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MikgLSAoMildKSwgTlVMTCk7ICooeXl2c3BbKDIpIC0gKDIpXSkgPSBOVUxMOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgNjoKKworICAgIHsgaXNfdHlwZWRlZiA9IDE7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA3OgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWyg0KSAtICg0KV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgODoKKworICAgIHsgaXNfdHlwZWRlZiA9IDE7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA5OgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygzKSAtICgzKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgMTQ6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDIpIC0gKDIpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSAxNToKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMikgLSAoMildKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDE2OgorCisgICAgeyBpZiAoY3VycmVudF9uYW1lKSB7CisJCSAgICBzdHJ1Y3Qgc3RyaW5nX2xpc3QgKmRlY2wgPSAoKih5eXZzcFsoMykgLSAoMyldKSktPm5leHQ7CisJCSAgICAoKih5eXZzcFsoMykgLSAoMyldKSktPm5leHQgPSBOVUxMOworCQkgICAgYWRkX3N5bWJvbChjdXJyZW50X25hbWUsCisJCQkgICAgICAgaXNfdHlwZWRlZiA/IFNZTV9UWVBFREVGIDogU1lNX05PUk1BTCwKKwkJCSAgICAgICBkZWNsLCBpc19leHRlcm4pOworCQkgICAgY3VycmVudF9uYW1lID0gTlVMTDsKKwkJICB9CisJCSAgKHl5dmFsKSA9ICh5eXZzcFsoMykgLSAoMyldKTsKKwkJO30KKyAgICBicmVhazsKKworICBjYXNlIDE3OgorCisgICAgeyAoeXl2YWwpID0gTlVMTDsgO30KKyAgICBicmVhazsKKworICBjYXNlIDE5OgorCisgICA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pID0gTlVMTDsgO30KKyAgICBicmVhazsKKworICBjYXNlIDYxOgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgNjU6CisKKyAgICB7IC8qIHJlc3RyaWN0IGhhcyBubyBlZmZlY3QgaW4gcHJvdG90eXBlcyBzbyBpZ25vcmUgaXQgKi8KKwkJICByZW1vdmVfbm9kZSgoeXl2c3BbKDEpIC0gKDEpXSkpOworCQkgICh5eXZhbCkgPSAoeXl2c3BbKDEpIC0gKDEpXSk7CisJCTt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA2NjoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMikgLSAoMildKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDY4OgorCisgICAgeyBpZiAoY3VycmVudF9uYW1lICE9IE5VTEwpIHsKKwkJICAgIGVycm9yX3dpdGhfcG9zKCJ1bmV4cGVjdGVkIHNlY29uZCBkZWNsYXJhdGlvbiBuYW1lIik7CisJCSAgICBZWUVSUk9SOworCQkgIH0gZWxzZSB7CisJCSAgICBjdXJyZW50X25hbWUgPSAoKih5eXZzcFsoMSkgLSAoMSldKSktPnN0cmluZzsKKwkJICAgICh5eXZhbCkgPSAoeXl2c3BbKDEpIC0gKDEpXSk7CisJCSAgfQorCQk7fQorICAgIGJyZWFrOworCisgIGNhc2UgNjk6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDQpIC0gKDQpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA3MDoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoNCkgLSAoNCldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDcxOgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgNzI6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDMpIC0gKDMpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA3MzoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMykgLSAoMyldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDc0OgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgNzg6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDQpIC0gKDQpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA3OToKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoNCkgLSAoNCldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDgwOgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgODE6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDMpIC0gKDMpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA4MjoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMykgLSAoMyldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDgzOgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgODU6CisKKyAgICB7ICh5eXZhbCkgPSAoeXl2c3BbKDMpIC0gKDMpXSk7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA4NjoKKworICAgIHsgKHl5dmFsKSA9IE5VTEw7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSA4OToKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMykgLSAoMyldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDkwOgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pID8gKHl5dnNwWygyKSAtICgyKV0pIDogKHl5dnNwWygxKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisg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3Qgc3RyaW5nX2xpc3QgKmRlY2wgPSAqKHl5dnNwWygyKSAtICgzKV0pOworCQkgICooeXl2c3BbKDIpIC0gKDMpXSkgPSBOVUxMOworCQkgIGFkZF9zeW1ib2woY3VycmVudF9uYW1lLCBTWU1fTk9STUFMLCBkZWNsLCBpc19leHRlcm4pOworCQkgICh5eXZhbCkgPSAoeXl2c3BbKDMpIC0gKDMpXSk7CisJCTt9CisgICAgYnJlYWs7CisKKyAgY2FzZSAxMDI6CisKKyAgICB7ICh5eXZhbCkgPSBOVUxMOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgMTA0OgorCisgICAgeyByZW1vdmVfbGlzdCgoeXl2c3BbKDIpIC0gKDIpXSksICYoKih5eXZzcFsoMSkgLSAoMildKSktPm5leHQpOyAoeXl2YWwpID0gKHl5dnNwWygyKSAtICgyKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgMTA1OgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygzKSAtICgzKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgMTA2OgorCisgICAgeyAoeXl2YWwpID0gKHl5dnNwWygzKSAtICgzKV0pOyA7fQorICAgIGJyZWFrOworCisgIGNhc2UgMTA3OgorCisgICAgeyAoeXl2YWwpID0gTlVMTDsgO30KKyAgICBicmVhazsKKworICBjYXNlIDExMDoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMikgLSAoMildKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDExMToKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMykgLSAoMyldKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDExMjoKKworICAgIHsgKHl5dmFsKSA9ICh5eXZzcFsoMikgLSAoMildKTsgO30KKyAgICBicmVhazsKKworICBjYXNlIDExMzoKKworICAgIHsgKHl5dmFsKSA9IE5VTEw7IDt9CisgICAgYnJlYWs7CisKKyAgY2FzZSAxMTY6CisKKyAgICB7ICh5eXZhbCkgPSA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CSAgICBlbHNlCisJICAgICAgeworCQl5eW1zZyA9IHl5bXNnYnVmOworCQl5eW1zZ19hbGxvYyA9IHNpemVvZiB5eW1zZ2J1ZjsKKwkgICAgICB9CisJICB9CisKKwlpZiAoMCA8IHl5c2l6ZSAmJiB5eXNpemUgPD0geXltc2dfYWxsb2MpCisJICB7CisJICAgICh2b2lkKSB5eXN5bnRheF9lcnJvciAoeXltc2csIHl5c3RhdGUsIHl5Y2hhcik7CisJICAgIHl5ZXJyb3IgKHl5bXNnKTsKKwkgIH0KKwllbHNlCisJICB7CisJICAgIHl5ZXJyb3IgKFlZXygic3ludGF4IGVycm9yIikpOworCSAgICBpZiAoeXlzaXplICE9IDApCisJICAgICAgZ290byB5eWV4aGF1c3RlZGxhYjsKKwkgIH0KKyAgICAgIH0KKyNlbmRpZgorICAgIH0KKworCisKKyAgaWYgKHl5ZXJyc3RhdHVzID09IDMpCisgICAgeworICAgICAgLyogSWYganVzdCB0cmllZCBhbmQgZmFpbGVkIHRvIHJldXNlIGxvb2thaGVhZCB0b2tlbiBhZnRlciBhbgorCSBlcnJvciwgZGlzY2FyZCBpdC4gICovCisKKyAgICAgIGlmICh5eWNoYXIgPD0gWVlFT0YpCisJeworCSAgLyogUmV0dXJuIGZhaWx1cmUgaWYgYXQgZW5kIG9mIGlucHV0LiAgKi8KKwkgIGlmICh5eWNoYXIgPT0gWVlFT0YpCisJICAgIFlZQUJPUlQ7CisJfQorICAgICAgZWxzZQorCXsKKwkgIHl5ZGVzdHJ1Y3QgKCJFcnJvcjogZGlzY2FyZGluZyIsCisJCSAgICAgIHl5dG9rZW4sICZ5eWx2YWwpOworCSAgeXljaGFyID0gWVlFTVBUWTsKKwl9CisgICAgfQorCisgIC8qIEVsc2Ugd2lsbCB0cnkgdG8gcmV1c2UgbG9va2FoZWFkIHRva2VuIGFmdGVyIHNoaWZ0aW5nIHRoZSBlcnJvcgorICAgICB0b2tlbi4gICovCisgIGdvdG8geXllcnJsYWIxOworCisKKy8qLS0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sICAgMTUsICAgMTIsICAgMTIsICAgMTIsCi0gICAgICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgIDEyLCAgIDEzLCAgIDE0LCAgIDEyLCAgIDEyLCAgIDE1LCAgIDEyLCAgIDEyLCAgIDEyLAotICAgICAgIDEyLCAgIDEyLCAgIDEyLCAgIDEyLCAgIDEyLCAgIDEyLCAgIDEyCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgICAxNiwgICAxNiwgICAxNywgICAxNiwgICAxNiwgICAxNiwgICAxNiwgICAxNiwgICAxNiwKLSAgICAgICAxNiwgICAxNiwgICAxNiwgICAxOCwgICAxNiwgICAxNiwgICAxNgotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAgMTYsICAgMTYsICAgMTcsICAgMTYsICAgMTYsICAgMTYsICAgMTYsICAgMTYsICAgMTYsCi0gICAgICAgMTYsICAgMTYsICAgMTYsICAgMTgsICAgMTYsICAgMTYsICAgMTYKLQotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAgMTksICAgMjAsICAgMjEsICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksCi0gICAgICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTkKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgIDE5LCAgIDIwLCAgIDIxLCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LAotICAgICAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5LCAgIDE5Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgICAyMiwgICAyMiwgICAyMywgICAyMiwgICAyNCwgICAyMiwgICAyMiwgICAyNCwgICAyMiwKLSAgICAgICAyMiwgICAyMiwgICAyMiwgICAyMiwgICAyMiwgICAyNSwgICAyMgotICAgIH0sCi0KLSAgICB7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NCwgIC0xNCwgIC0xNCwgIC0xNCwKLSAgICAgIC0xNCwgIC0xNCwgIC0xNCwgIC0xNCwgIC0xNCwgIC0xNCwgIC0xNAotCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgICA0MiwgICA0MiwgICA0MywgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwKLSAgICAgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MgotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsCi0gICAgICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYsICAtMTYKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LAotICAgICAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3LCAgLTE3Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwgIC0xOCwKLSAgICAgIC0xOCwgIC0xOCwgIC0xOCwgICA0NCwgIC0xOCwgIC0xOCwgIC0xOAotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAgNDUsICAgNDUsICAtMTksICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsCi0gICAgICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUsICAgNDUKLQotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtMjAsICAgNDYsICAgNDcsICAtMjAsICAtMjAsICAtMjAsICAtMjAsICAtMjAsICAtMjAsCi0gICAgICAtMjAsICAtMjAsICAtMjAsICAtMjAsICAtMjAsICAtMjAsIC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IC0zMywgIC0zMywgIC0zMywgIC0zMywgIC0zMywgIC0zMwotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtMzQsICAtMzQsICAtMzQsICAtMzQsICAtMzQsICAtMzQsICAtMzQsICAtMzQsICAtMzQsCi0gICAgICAtMzQsICAgNTYsICAgNTcsICAgNTcsICAtMzQsICAtMzQsICAtMzQKLQotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtMzUsICAtMzUsICAtMzUsICAtMzUsICAtMzUsICAtMzUsICAtMzUsICAtMzUsICAtMzUsCi0gICAgICAtMzUsICAgNTcsICAgNTcsICAgNTcsICAtMzUsICAtMzUsICAtMzUKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LAotICAgICAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2LCAgLTM2Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC0zNywgIC0zNywgICA1OCwgIC0zNywgIC0zNywgIC0zNywgIC0zNywgIC0zNywgIC0zNywKLSAgICAgIC0zNywgIC0zNywgIC0zNywgIC0zNywgIC0zNywgIC0zNywgIC0zNwotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsCi0gICAgICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAtMzgsICAgNTkKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTM5LCAgIDM5LCAgIDQwLCAgLTM5LCAgLTM5LCAgIDQxLCAgLTM5LCAgLTM5LCAgLTM5LAotICAgICAgLTM5LCAgLTM5LCAgLTM5LCAgLTM5LCAgLTM5LCAgLTM5LCAgLTM5Ci0KLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLAotICAgICAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwLCAgLTQwCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgICA0MiwgICA0MiwgICA0MywgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwKLSAgICAgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MgotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAgNDIsICAgNDIsICAgNDMsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsCi0gICAgICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIsICAgNDIKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLAotICAgICAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzLCAgLTQzCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC00NCwgIC00NCwgIC00NCwgIC00NCwgIC00NCwgIC00NCwgIC00NCwgIC00NCwgIC00NCwKLSAgICAgIC00NCwgIC00NCwgIC00NCwgICA0NCwgIC00NCwgIC00NCwgIC00NAotCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgICA0NSwgICA0NSwgIC00NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwKLSAgICAgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NQotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtNDYsICAgNDYsICAgNDcsICAtNDYsICAtNDYsICAtNDYsICAtNDYsICAtNDYsICAtNDYsCi0gICAgICAtNDYsICAtNDYsICAtNDYsICAtNDYsICAtNDYsICAtNDYsICAtNDYKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgIDQ4LCAgLTQ3LCAgLTQ3LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LAotICAgICAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4LCAgIDQ4Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwKLSAgICAgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OCwgIC00OAotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAgNDksICAgNDksICAgNTAsICAgNDksICAtNDksICAgNDksICAgNDksICAtNDksICAgNDksCi0gICAgICAgNDksICAgNDksICAgNDksICAgNDksICAgNDksICAtNDksICAgNDkKLQotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsCi0gICAgICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAsICAtNTAKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTUxLCAgLTUxLCAgIDUyLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLAotICAgICAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxLCAgLTUxCi0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwKLSAgICAgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MiwgIC01MgotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsCi0gICAgICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMsICAtNTMKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgIDU0LCAgIDU0LCAgLTU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LAotICAgICAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0LCAgIDU0Ci0KLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LAotICAgICAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1LCAgLTU1Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC01NiwgIC01NiwgIC01NiwgIC01NiwgIC01NiwgIC01NiwgIC01NiwgIC01NiwgIC01NiwKLSAgICAgIC01NiwgICA2MCwgICA1NywgICA1NywgIC01NiwgIC01NiwgIC01NgotICAgIH0sCi0KLSAgICB7Ci0gICAgICAgMTEsICAtNTcsICAtNTcsICAtNTcsICAtNTcsICAtNTcsICAtNTcsICAtNTcsICAtNTcsICAtNTcsCi0gICAgICAtNTcsICAgNTcsICAgNTcsICAgNTcsICAtNTcsICAtNTcsICAtNTcKLSAgICB9LAotCi0gICAgewotICAgICAgIDExLCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LAotICAgICAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4LCAgLTU4Ci0gICAgfSwKLQotICAgIHsKLSAgICAgICAxMSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwKLSAgICAgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSwgIC01OSw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geXlfdHJhbnNfaW5mbwotCXsKLQlmbGV4X2ludDMyX3QgeXlfdmVyaWZ5OwotCWZsZXhfaW50MzJfdCB5eV9ueHQ7Ci0JfTsKLXN0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9hY2NlcHRbNjFdID0KLSAgICB7ICAgMCwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwKLSAgICAgICAzNCwgICAgNSwgICAgNCwgICAgMiwgICAgMywgICAgNywgICAgOCwgICAgNiwgICAzMiwgICAyOSwKLSAgICAgICAzMSwgICAyNCwgICAyOCwgICAyNywgICAyNiwgICAyMiwgICAxNywgICAxMywgICAxNiwgICAyMCwKLSAgICAgICAyMiwgICAxMSwgICAxMiwgICAxOSwgICAxOSwgICAxNCwgICAyMiwgICAyMiwgICAgNCwgICAgMiwKLSAgICAgICAgMywgICAgMywgICAgMSwgICAgNiwgICAzMiwgICAyOSwgICAzMSwgICAzMCwgICAyNCwgICAyMywKLSAgICAgICAyNiwgICAyNSwgICAxNSwgICAyMCwgICAgOSwgICAxOSwgICAxOSwgICAyMSwgICAxMCwgICAxOAotICAgIH0gOwotCi1zdGF0aWMgeXljb25zdCBmbGV4X2ludDMyX3QgeXlfZWNbMjU2XSA9Ci0gICAgeyAgIDAsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDIsICAgIDMsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDEsICAgIDIsICAgIDQsICAgIDUsICAgIDYsICAgIDEsICAgIDEsICAgIDcsICAgIDgsICAgIDksCi0gICAgICAgMTAsICAgIDEsICAgIDEsICAgIDEsICAgMTEsICAgMTIsICAgMTIsICAgMTMsICAgMTMsICAgMTMsCi0gICAgICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgMTQsICAgIDEsICAgIDEsICAgIDEsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsCi0gICAgICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsCi0gICAgICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTMsCi0gICAgICAgIDEsICAgMTUsICAgIDEsICAgIDEsICAgMTMsICAgIDEsICAgMTMsICAgMTMsICAgMTMsICAgMTMsCi0KLSAgICAgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywKLSAgICAgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywKLSAgICAgICAxMywgICAxMywgICAgMSwgICAxNiwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLSAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKLQotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAotICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxCi0gICAgfSA7Ci0KLWV4dGVybiBpbnQgemNvbmZfZmxleF9kZWJ1ZzsKLWludCB6Y29uZl9mbGV4X2RlYnVnID0gMDsKLQotLyogVGhlIGludGVudCBiZWhpbmQgdGhpcyBkZWZpbml0aW9uIGlzIHRoYXQgaXQnbGwgY2F0Y2gKLSAqIGFueSB1c2VzIG9mIFJFSkVDVCB3aGljaCBmbGV4IG1pc3NlZC4KLSAqLwotI2RlZmluZSBSRUpFQ1QgcmVqZWN0X3VzZWRfYnV0X25vdF9kZXRlY3RlZAotI2RlZmluZSB5eW1vcmUoKSB5eW1vcmVfdXNlZF9idXRfbm90X2RldGVjdGVkCi0jZGVmaW5lIFlZX01PUkVfQURKIDAKLSNkZWZpbmUgWVlfUkVTVE9SRV9ZWV9NT1JFX09GRlNFVAotY2hhciAqemNvbmZ0ZXh0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MsIDczLAorICAgICAgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsCisgICAgICA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDI1LCAyNSwKKyAgICAgICAwLCAgMCwgIDAsICA1LCAgMCwgIDAsIDczLCA3MywgIDUsICAwLAorICAgICAgMTAsICA1LCA0NSwgNzMsIDIwLCAyMCwgIDAsIDE1LCAxNSwgNzMsCisgICAgICAyMCwgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywKKyAgICAgIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLAorICAgICAgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsCisgICAgICA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywKKyAgICAgIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLAorICAgICAgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsCisgICAgICA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywKKyAgICAgIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLAorICAgICAgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsCisgICAgICA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywKKyAgICAgIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLAorICAgICAgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsCisgICAgICA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywgNzMsIDczLCA3MywKKyAgICAgIDczLCA3MywgNzMsIDczLCA3MywgNzMKICAgICB9OwogICByZWdpc3RlciBpbnQgaHZhbCA9IGxlbjsKIApAQCAtODUsODcgKzg1L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NpemVvZigicmFuZ2UiKV07CisgICAgY2hhciBrY29uZl9pZF9zdHJpbmdzX3N0cjM2W3NpemVvZigiY2hvaWNlIildOworICAgIGNoYXIga2NvbmZfaWRfc3RyaW5nc19zdHIzOVtzaXplb2YoImJvb2wiKV07CisgICAgY2hhciBrY29uZl9pZF9zdHJpbmdzX3N0cjQxW3NpemVvZigic291cmNlIildOworICAgIGNoYXIga2NvbmZfaWRfc3RyaW5nc19zdHI0MltzaXplb2YoInZpc2libGUiKV07CisgICAgY2hhciBrY29uZl9pZF9zdHJpbmdzX3N0cjQzW3NpemVvZigiaGV4IildOworICAgIGNoYXIga2NvbmZfaWRfc3RyaW5nc19zdHI0NltzaXplb2YoImNvbmZpZyIpXTsKICAgICBjaGFyIGtjb25mX2lkX3N0cmluZ3Nfc3RyNDdbc2l6ZW9mKCJib29sZWFuIildOwotICAgIGNoYXIga2NvbmZfaWRfc3RyaW5nc19zdHI0OFtzaXplb2YoIm1haW5tZW51IildOwotICAgIGNoYXIga2NvbmZfaWRfc3RyaW5nc19zdHI1MVtzaXplb2YoInNvdXJjZSIpXTsKKyAgICBjaGFyIGtjb25mX2lkX3N0cmluZ3Nfc3RyNTFbc2l6ZW9mKCJzdHJpbmciKV07CisgICAgY2hhciBrY29uZl9pZF9zdHJpbmdzX3N0cjU0W3NpemVvZigiaGVscCIpXTsKKyAgICBjaGFyIGtjb25mX2lkX3N0cmluZ3Nfc3RyNTZbc2l6ZW9mKCJwcm9tcHQiKV07CisgICAgY2hhciBrY29uZl9pZF9zdHJpbmdzX3N0cjcyW3NpemVvZigiZGVwZW5kcyIpXTsKICAgfTsKLXN0YXRpYyBzdHJ1Y3Qga2NvbmZfaWRfc3RyaW5nc190IGtjb25mX2lkX3N0cmluZ3NfY29udGVudHMgPQorc3RhdGljIGNvbnN0IHN0cnVjdCBrY29uZl9pZF9zdHJpbmdzX3Qga2NvbmZfaWRfc3RyaW5nc19jb250ZW50cyA9CiAgIHsKLSAgICAib24iLAotICAgICJlbnYiLAotICAgICJlbmRpZiIsCi0gICAgIm9wdGlvbiIsCi0gICAgImVuZG1lbnUiLAotICAgICJvcHRpb25hbCIsCi0gICAgImVuZGNob2ljZSIsCi0gICAgInJhbmdlIiwKLSAgICAiY2hvaWNlIiwKLSAgICAiZGVmYXVsdCIsCi0gICAgImRlZl9ib29sIiwKLSAgICAiaGVscCIsCi0gICAgImNvbmZpZyIsCi0gICAgImRlZl90cmlzdGF0ZSIsCi0gICAgImhleCIsCi0gICAgImRlZmNvbmZpZ19saXN0IiwKICAgICAiaWYiLAogICAgICJpbnQiLAotICAgICJtb2R1bGVzIiwKKyAgICAiZW5kaWYiLAorICAgICJkZWZhdWx0IiwKICAgICAidHJpc3RhdGUiLAotICAgICJtZW51IiwKLSAgICAiY29tbWVudCIsCi0gICAgIm1lbnVjb25maWciLAotICAgICJzdHJpbmciLAotICAgICJ2aXNpYmxlIiwKLSAgICAicHJvbXB0IiwKLSAgICAiZGVwZW5kcyIsCi0gICAgImJvb2wiLAotICAgICJzZWxlY3QiLAotICAgICJib29sZWFuIiwKKyAgICAiZW5kY2hvaWNlIiwKKyAgICAiZGVmX3RyaXN0YXRlIiwKKyAgICAiZGVmX2Jvb2wiLAorICAgICJkZWZjb25maWdfbGlzdCIsCisgICAgIm9uIiwKKyAgICAib3B0aW9uYWwiLAorICAgICJvcHRpb24iLAorICAgICJlbmRtZW51IiwKICAgICAibWFpbm1lbnUiLAotICAgICJzb3VyY2UiCisgICAgIm1lbnVjb25maWciLAorICAgICJtb2R1bGVzIiwKKyAgICAibWVudSIsCisgICAgInNlbGVjdCIsCisgICAgImNvbW1lbnQiLAorICAgICJlbnYiLAorICAgICJyYW5nZSIsCisgICAgImNob2ljZSIsCisgICAgImJvb2wiLAorICAgICJzb3VyY2UiLAorICAgICJ2aXNpYmxlIiwKKyAgICAiaGV4IiwKKyAgICAiY29uZmlnIiwKKyAgICAiYm9vbGVhbiIsCisgICAgInN0cmluZyIsCisgICAgImhlbHAiLAorICAgICJ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JfTFZBTFVFID0gICAgXAorICAgICAgICAgICAgemNvbmZfY3JlYXRlX2J1ZmZlcih6Y29uZmluLFlZX0JVRl9TSVpFICk7IFwKKwl9IFwKKwlZWV9DVVJSRU5UX0JVRkZFUl9MVkFMVUUtPnl5X2F0X2JvbCA9IGF0X2JvbDsgXAorCX0KKworI2RlZmluZSBZWV9BVF9CT0woKSAoWVlfQ1VSUkVOVF9CVUZGRVJfTFZBTFVFLT55eV9hdF9ib2wpCisKKy8qIEJlZ2luIHVzZXIgc2VjdDMgKi8KKworI2RlZmluZSB6Y29uZndyYXAobikgMQorI2RlZmluZSBZWV9TS0lQX1lZV1JBUAorCit0eXBlZGVmIHVuc2lnbmVkIGNoYXIgWVlfQ0hBUjsKKworRklMRSAqemNvbmZpbiA9IChGSUxFICopIDAsICp6Y29uZm91dCA9IChGSUxFICopIDA7CisKK3R5cGVkZWYgaW50IHl5X3N0YXRlX3R5cGU7CisKK2V4dGVybiBpbnQgemNvbmZsaW5lbm87CisKK2ludCB6Y29uZmxpbmVubyA9IDE7CisKK2V4dGVybiBjaGFyICp6Y29uZnRleHQ7CisjZGVmaW5lIHl5dGV4dF9wdHIgemNvbmZ0ZXh0CitzdGF0aWMgeXljb25zdCBmbGV4X2ludDE2X3QgeXlfbnh0W11bMTddID0KKyAgICB7CisgICAgeworICAgICAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLAorICAgICAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICAxMiwgICAxMywgICAxNCwgICAxMiwgICAxMiwgICAxNSwgICAxMiwgICAxMiwgICAxMiwKKyAgICAgICAxMiwgICAxMiwgICAxMiwgICAxMiwgICAxMiwgICAxMiwgICAxMgorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgMTIsICAgMTMsICAgMTQsICAgMTIsICAgMTIsICAgMTUsICAgMTIsICAgMTIsICAgMTIsCisgICAgICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIsICAgMTIKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgIDE2LCAgIDE2LCAgIDE3LCAgIDE2LCAgIDE2LCAgIDE2LCAgIDE2LCAgIDE2LCAgIDE2LAorICAgICAgIDE2LCAgIDE2LCAgIDE2LCAgIDE4LCAgIDE2LCAgIDE2LCAgIDE2CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICAxNiwgICAxNiwgICAxNywgICAxNiwgICAxNiwgICAxNiwgICAxNiwgICAxNiwgICAxNiwKKyAgICAgICAxNiwgICAxNiwgICAxNiwgICAxOCwgICAxNiwgICAxNiwgICAxNgorCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICAxOSwgICAyMCwgICAyMSwgICAxOSwgICAxOSwgICAxOSwgICAxOSwgICAxOSwgICAxOSwKKyAgICAgICAxOSwgICAxOSwgICAxOSwgICAxOSwgICAxOSwgICAxOSwgICAxOQorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgMTksICAgMjAsICAgMjEsICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksCisgICAgICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTksICAgMTkKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgIDIyLCAgIDIyLCAgIDIzLCAgIDIyLCAgIDI0LCAgIDIyLCAgIDIyLCAgIDI0LCAgIDIyLAorICAgICAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDIyLCAgIDI1LCAgIDIyCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICAyMiwgICAyMiwgICAyMywgICAyMiwgICAyNCwgICAyMiwgICAyMiwgICAyNCwgICAyMiwKKyAgICAgICAyMiwgICAyMiwgICAyMiwgICAyMiwgICAyMiwgICAyNSwgICAyMgorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgMjYsICAgMjYsICAgMjcsICAgMjgsICAgMjksICAgMzAsICAgMzEsICAgMjksICAgMzIsCisgICAgICAgMzMsICAgMzQsICAgMzUsICAgMzUsICAgMzYsICAgMzcsICAgMzgKKworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgMjYsICAgMjYsICAgMjcsICAgMjgsICAgMjksICAgMzAsICAgMzEsICAgMjksICAgMzIsCisgICAgICAgMzMsICAgMzQsICAgMzUsICAgMzUsICAgMzYsICAgMzcsICAgMzgKKyAgICB9LAorCisgICAgeworICAgICAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLAorICAgICAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExLCAgLTExCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwKKyAgICAgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMiwgIC0xMgorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMTMsICAgMzksICAgNDAsICAtMTMsICAtMTMsICAgNDEsICAtMTMsICAtMTMsICAtMTMsCisgICAgICAtMTMsICAtMTMsICAtMTMsICAtMTMsICAtMTMsICAtMTMsICAtMTMKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LAorICAgICAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0LCAgLTE0CisKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgIDQyLCAgIDQyLCAgIDQzLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLAorICAgICAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwKKyAgICAgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNiwgIC0xNgorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsCisgICAgICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcsICAtMTcKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LCAgLTE4LAorICAgICAgLTE4LCAgLTE4LCAgLTE4LCAgIDQ0LCAgLTE4LCAgLTE4LCAgLTE4CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICA0NSwgICA0NSwgIC0xOSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwKKyAgICAgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NQorCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0yMCwgICA0NiwgICA0NywgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwKKyAgICAgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMCwgIC0yMAorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgNDgsICAtMjEsICAtMjEsICAgNDgsICAgNDgsICAgNDgsICAgNDgsICAgNDgsICAgNDgsCisgICAgICAgNDgsICAgNDgsICAgNDgsICAgNDgsICAgNDgsICAgNDgsICAgNDgKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgIDQ5LCAgIDQ5LCAgIDUwLCAgIDQ5LCAgLTIyLCAgIDQ5LCAgIDQ5LCAgLTIyLCAgIDQ5LAorICAgICAgIDQ5LCAgIDQ5LCAgIDQ5LCAgIDQ5LCAgIDQ5LCAgLTIyLCAgIDQ5CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywKKyAgICAgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMywgIC0yMworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsCisgICAgICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQsICAtMjQKKworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgNTEsICAgNTEsICAgNTIsICAgNTEsICAgNTEsICAgNTEsICAgNTEsICAgNTEsICAgNTEsCisgICAgICAgNTEsICAgNTEsICAgNTEsICAgNTEsICAgNTEsICAgNTEsICAgNTEKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LAorICAgICAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2LCAgLTI2CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywKKyAgICAgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNywgIC0yNworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAtMjgsCisgICAgICAtMjgsICAtMjgsICAtMjgsICAtMjgsICAgNTMsICAtMjgsICAtMjgKKyAgICB9LAorCisgIC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wgIC0zNSwgIC0zNSwgIC0zNSwKKyAgICAgIC0zNSwgICA1NywgICA1NywgICA1NywgIC0zNSwgIC0zNSwgIC0zNQorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsCisgICAgICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYsICAtMzYKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTM3LCAgLTM3LCAgIDU4LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LAorICAgICAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3LCAgLTM3CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwKKyAgICAgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgIC0zOCwgICA1OQorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtMzksICAgMzksICAgNDAsICAtMzksICAtMzksICAgNDEsICAtMzksICAtMzksICAtMzksCisgICAgICAtMzksICAtMzksICAtMzksICAtMzksICAtMzksICAtMzksICAtMzkKKworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsCisgICAgICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAsICAtNDAKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgIDQyLCAgIDQyLCAgIDQzLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLAorICAgICAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyLCAgIDQyCisgICAgfSwKKworICAgIHsKKyAg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Q4LCAgLTQ4LAorICAgICAgLTQ4LCAgLTQ4LCAgLTQ4LCAgLTQ4LCAgLTQ4LCAgLTQ4LCAgLTQ4CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgICA0OSwgICA0OSwgICA1MCwgICA0OSwgIC00OSwgICA0OSwgICA0OSwgIC00OSwgICA0OSwKKyAgICAgICA0OSwgICA0OSwgICA0OSwgICA0OSwgICA0OSwgIC00OSwgICA0OQorCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwKKyAgICAgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MCwgIC01MAorICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtNTEsICAtNTEsICAgNTIsICAtNTEsICAtNTEsICAtNTEsICAtNTEsICAtNTEsICAtNTEsCisgICAgICAtNTEsICAtNTEsICAtNTEsICAtNTEsICAtNTEsICAtNTEsICAtNTEKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLAorICAgICAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyLCAgLTUyCisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywKKyAgICAgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MywgIC01MworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAgNTQsICAgNTQsICAtNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQsCisgICAgICAgNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQsICAgNTQKKworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsCisgICAgICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUsICAtNTUKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LCAgLTU2LAorICAgICAgLTU2LCAgIDYwLCAgIDU3LCAgIDU3LCAgLTU2LCAgLTU2LCAgLTU2CisgICAgfSwKKworICAgIHsKKyAgICAgICAxMSwgIC01NywgIC01NywgIC01NywgIC01NywgIC01NywgIC01NywgIC01NywgIC01NywgIC01NywKKyAgICAgIC01NywgICA1NywgICA1NywgICA1NywgIC01NywgIC01NywgIC01NworICAgIH0sCisKKyAgICB7CisgICAgICAgMTEsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsCisgICAgICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgsICAtNTgKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LAorICAgICAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5LCAgLTU5CisKKyAgICB9LAorCisgICAgeworICAgICAgIDExLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLCAgLTYwLAorICAgICAgLTYwLCAgIDU3LCAgIDU3LCAgIDU3LCAgLTYwLCAgLTYwLCAgLTYwCisgICAgfSwKKworICAgIH0gOworCitzdGF0aWMgeXlfc3RhdGVfdHlwZSB5eV9nZXRfcHJldmlvdXNfc3RhdGUgKHZvaWQgKTsKK3N0YXRpYyB5eV9zdGF0ZV90eXBlIHl5X3RyeV9OVUxfdHJhbnMgKHl5X3N0YXRlX3R5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4LCAgIDI3LCAgIDI2LCAgIDIyLCAgIDE3LCAgIDEzLCAgIDE2LCAgIDIwLAorICAgICAgIDIyLCAgIDExLCAgIDEyLCAgIDE5LCAgIDE5LCAgIDE0LCAgIDIyLCAgIDIyLCAgICA0LCAgICAyLAorICAgICAgICAzLCAgICAzLCAgICAxLCAgICA2LCAgIDMyLCAgIDI5LCAgIDMxLCAgIDMwLCAgIDI0LCAgIDIzLAorICAgICAgIDI2LCAgIDI1LCAgIDE1LCAgIDIwLCAgICA5LCAgIDE5LCAgIDE5LCAgIDIxLCAgIDEwLCAgIDE4CisgICAgfSA7CisKK3N0YXRpYyB5eWNvbnN0IGZsZXhfaW50MzJfdCB5eV9lY1syNTZdID0KKyAgICB7ICAgMCwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMiwgICAgMywKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAgMSwgICAgMiwgICAgNCwgICAgNSwgICAgNiwgICAgMSwgICAgMSwgICAgNywgICAgOCwgICAgOSwKKyAgICAgICAxMCwgICAgMSwgICAgMSwgICAgMSwgICAxMSwgICAxMiwgICAxMiwgICAxMywgICAxMywgICAxMywKKyAgICAgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAgMSwgICAgMSwgICAgMSwKKyAgICAgICAxNCwgICAgMSwgICAgMSwgICAgMSwgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywKKyAgICAgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywKKyAgICAgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywgICAxMywKKyAgICAgICAgMSwgICAxNSwgICAgMSwgICAgMSwgICAxMywgICAgMSwgICAxMywgICAxMywgICAxMywgICAxMywKKworICAgICAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLAorICAgICAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLCAgIDEzLAorICAgICAgIDEzLCAgIDEzLCAgICAxLCAgIDE2LCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorICAgICAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLCAgICAxLAorCisgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCisgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCisgICAgICAg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ovCitGSUxFICp6Y29uZmdldF9vdXQgICh2b2lkKQoreworICAgICAgICByZXR1cm4gemNvbmZvdXQ7Cit9CisKKy8qKiBHZXQgdGhlIGxlbmd0aCBvZiB0aGUgY3VycmVudCB0b2tlbi4KKyAqIAorICovCitpbnQgemNvbmZnZXRfbGVuZyAgKHZvaWQpCit7CisgICAgICAgIHJldHVybiB6Y29uZmxlbmc7Cit9CisKKy8qKiBHZXQgdGhlIGN1cnJlbnQgdG9rZW4uCisgKiAKKyAqLworCitjaGFyICp6Y29uZmdldF90ZXh0ICAodm9pZCkKK3sKKyAgICAgICAgcmV0dXJuIHpjb25mdGV4dDsKK30KKworLyoqIFNldCB0aGUgY3VycmVudCBsaW5lIG51bWJlci4KKyAqIEBwYXJhbSBsaW5lX251bWJlcgorICogCisgKi8KK3ZvaWQgemNvbmZzZXRfbGluZW5vIChpbnQgIGxpbmVfbnVtYmVyICkKK3sKKyAgICAKKyAgICB6Y29uZmxpbmVubyA9IGxpbmVfbnVtYmVyOworfQorCisvKiogU2V0IHRoZSBpbnB1dCBzdHJlYW0uIFRoaXMgZG9lcyBub3QgZGlzY2FyZCB0aGUgY3VycmVudAorICogaW5wdXQgYnVmZmVyLgorICogQHBhcmFtIGluX3N0ciBBIHJlYWRhYmxlIHN0cmVhbS4KKyAqIAorICogQHNlZSB6Y29uZl9zd2l0Y2hfdG9fYnVmZmVyCisgKi8KK3ZvaWQgemNvbmZzZXRfaW4gKEZJTEUgKiAgaW5fc3RyICkKK3sKKyAgICAgICAgemNvbmZpbiA9IGluX3N0ciA7Cit9CisKK3ZvaWQgemNvbmZzZXRfb3V0IChGSUxFICogIG91dF9zdHIgKQoreworICAgICAgICB6Y29uZm91dCA9IG91dF9zdHIgOworfQorCitpbnQgemNvbmZnZXRfZGVidWcgICh2b2lkKQoreworICAgICAgICByZXR1cm4gemNvbmZfZmxleF9kZWJ1ZzsKK30KKwordm9pZCB6Y29uZnNldF9kZWJ1ZyAoaW50ICBiZGVidWcgKQoreworICAgICAgICB6Y29uZl9mbGV4X2RlYnVnID0gYmRlYnVnIDsKK30KKworc3RhdGljIGludCB5eV9pbml0X2dsb2JhbHMgKHZvaWQpCit7CisgICAgICAgIC8qIEluaXRpYWxpemF0aW9uIGlzIHRoZSBzYW1lIGFzIGZvciB0aGUgbm9uLXJlZW50cmFudCBzY2FubmVyLgorICAgICAqIFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIGZyb20gemNvbmZsZXhfZGVzdHJveSgpLCBzbyBkb24ndCBhbGxvY2F0ZSBoZXJlLgorICAgICAqLworCisgICAgKHl5X2J1ZmZlcl9zdGFjaykgPSAwOworICAgICh5eV9idWZmZXJfc3RhY2tfdG9wKSA9IDA7CisgICAgKHl5X2J1ZmZlcl9zdGFja19tYXgpID0gMDsKKyAgICAoeXlfY19idWZfcCkgPSAoY2hhciAqKSAwOworICAgICh5eV9pbml0KSA9IDA7CisgICAgKHl5X3N0YXJ0KSA9IDA7CisKKy8qIERlZmluZWQgaW4gbWFpbi5jICovCisjaWZkZWYgWVlfU1RESU5JVAorICAgIHpjb25maW4gPSBzdGRpbjsKKyAgICB6Y29uZm91dCA9IHN0ZG91dDsKKyNlbHNlCisgICAgemNvbmZpbiA9IChGSUxFICopIDA7CisgICAgemNvbmZvdXQgPSAoRklMRSAqKSAwOworI2VuZGlmCisKKyAgICAvKiBGb3IgZnV0dXJlIHJlZmVyZW5jZTogU2V0IGVycm5vIG9uIGVycm9yLCBzaW5jZSB3ZSBhcmUgY2FsbGVkIGJ5CisgICAgICogemNvbmZsZXhfaW5pdCgpCisgICAgICovCisgICAgcmV0dXJuIDA7Cit9CisKKy8qIHpjb25mbGV4X2Rlc3Ryb3kgaXMgZm9yIGJvdGggcmVlbnRyYW50IGFuZCBub24tcmVlbnRyYW50IHNjYW5uZXJzLiAqLworaW50IHpjb25mbGV4X2Rlc3Ryb3kgICh2b2lkKQoreworICAgIAorICAgIC8qIFBvcCB0aGUgYnVmZmVyIHN0YWNrLCBkZXN0cm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5JVElBTCk7Cit9CisKKy8qCisgKiBUcnkgdG8gb3BlbiBzcGVjaWZpZWQgZmlsZSB3aXRoIGZvbGxvd2luZyBuYW1lczoKKyAqIC4vbmFtZQorICogJChzcmN0cmVlKS9uYW1lCisgKiBUaGUgbGF0dGVyIGlzIHVzZWQgd2hlbiBzcmN0cmVlIGlzIHNlcGFyYXRlIGZyb20gb2JqdHJlZQorICogd2hlbiBjb21waWxpbmcgdGhlIGtlcm5lbC4KKyAqIFJldHVybiBOVUxMIGlmIGZpbGUgaXMgbm90IGZvdW5kLgorICovCitGSUxFICp6Y29uZl9mb3Blbihjb25zdCBjaGFyICpuYW1lKQoreworCWNoYXIgKmVudiwgZnVsbG5hbWVbUEFUSF9NQVgrMV07CisJRklMRSAqZjsKKworCWYgPSBmb3BlbihuYW1lLCAiciIpOworCWlmICghZiAmJiBuYW1lICE9IE5VTEwgJiYgbmFtZVswXSAhPSAnLycpIHsKKwkJZW52ID0gZ2V0ZW52KFNSQ1RSRUUpOworCQlpZiAoZW52KSB7CisJCQlzcHJpbnRmKGZ1bGxuYW1lLCAiJXMvJXMiLCBlbnYsIG5hbWUpOworCQkJZiA9IGZvcGVuKGZ1bGxuYW1lLCAiciIpOworCQl9CisJfQorCXJldHVybiBmOworfQorCit2b2lkIHpjb25mX2luaXRzY2FuKGNvbnN0IGNoYXIgKm5hbWUpCit7CisJemNvbmZpbiA9IHpjb25mX2ZvcGVuKG5hbWUpOworCWlmICghemNvbmZpbikgeworCQlwcmludGYoImNhbid0IGZpbmQgZmlsZSAlc1xuIiwgbmFtZSk7CisJCWV4aXQoMSk7CisJfQorCisJY3VycmVudF9idWYgPSBtYWxsb2Moc2l6ZW9mKCpjdXJyZW50X2J1ZikpOworCW1lbXNldChjdXJyZW50X2J1ZiwgMCwgc2l6ZW9mKCpjdXJyZW50X2J1ZikpOworCisJY3VycmVudF9maWxlID0gZmlsZV9sb29rdXAobmFtZSk7CisJY3VycmVudF9maWxlLT5saW5lbm8gPSAxOworf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yZW50X2ZpbGUtPnBhcmVudDsKKwkJCXdoaWxlIChpdGVyICYmIFwKKwkJCSAgICAgICBzdHJjbXAoaXRlci0+bmFtZSxjdXJyZW50X2ZpbGUtPm5hbWUpKSB7CisJCQkJcHJpbnRmKCIgIGluY2x1ZGVkIGZyb206ICclczolZCdcbiIsCisJCQkJICAgICAgIGl0ZXItPm5hbWUsIGl0ZXItPmxpbmVuby0xKTsKKwkJCQlpdGVyID0gaXRlci0+cGFyZW50OworCQkJfQorCQkJaWYgKGl0ZXIpCisJCQkJcHJpbnRmKCIgIGluY2x1ZGVkIGZyb206ICclczolZCdcbiIsCisJCQkJICAgICAgIGl0ZXItPm5hbWUsIGl0ZXItPmxpbmVubysxKTsKKwkJCWV4aXQoMSk7CisJCX0KKwl9CisJZmlsZS0+bGluZW5vID0gMTsKKwlmaWxlLT5wYXJlbnQgPSBjdXJyZW50X2ZpbGU7CisJY3VycmVudF9maWxlID0gZmlsZTsKK30KKworc3RhdGljIHZvaWQgemNvbmZfZW5kZmlsZSh2b2lkKQoreworCXN0cnVjdCBidWZmZXIgKnBhcmVudDsKKworCWN1cnJlbnRfZmlsZSA9IGN1cnJlbnRfZmlsZS0+cGFyZW50OworCisJcGFyZW50ID0gY3VycmVudF9idWYtPnBhcmVudDsKKwlpZiAocGFyZW50KSB7CisJCWZjbG9zZSh6Y29uZmluKTsKKwkJemNvbmZfZGVsZXRlX2J1ZmZlcihZWV9DVVJSRU5UX0JVRkZFUik7CisJCXpjb25mX3N3aXRjaF90b19idWZmZXIocGFyZW50LT5zdGF0ZSk7CisJfQorCWZyZWUoY3VycmVudF9idWYpOworCWN1cnJlbnRfYnVmID0gcGFyZW50OworfQorCitpbnQgemNvbmZfbGluZW5vKHZvaWQpCit7CisJcmV0dXJuIGN1cnJlbnRfcG9zLmxpbmVubzsKK30KKworY29uc3QgY2hhciAqemNvbmZfY3VybmFtZSh2b2lkKQoreworCXJldHVybiBjdXJyZW50X3Bvcy5maWxlID8gY3VycmVudF9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gIDE4MywgICAxODQsICAgMTg1LAotICAgICAxODYsICAgMTg5LCAgIDE5NywgICAyMDMsICAgMjEzLCAgIDIxOSwgICAyMjUsICAgMjI4LCAgIDIzMCwgICAyNDEsCi0gICAgIDI0MiwgICAyNDcsICAgMjU2LCAgIDI2MSwgICAyNjksICAgMjcyLCAgIDI3NCwgICAyNzUsICAgMjc2LCAgIDI3NywKLSAgICAgMjc4LCAgIDI4MSwgICAyODcsICAgMjk4LCAgIDMwNCwgICAzMTQsICAgMzE2LCAgIDMyMSwgICAzMjksICAgMzM3LAotICAgICAzNDAsICAgMzQyLCAgIDM0MywgICAzNDQsICAgMzQ5LCAgIDM1NiwgICAzNjMsICAgMzY4LCAgIDM3NiwgICAzNzksCi0gICAgIDM4MSwgICAzODIsICAgMzgzLCAgIDM4NiwgICAzOTQsICAgNDAxLCAgIDQwOCwgICA0MTQsICAgNDIxLCAgIDQyMywKLSAgICAgNDI0LCAgIDQyNSwgICA0MjgsICAgNDM2LCAgIDQzOCwgICA0MzksICAgNDQyLCAgIDQ0OSwgICA0NTEsICAgNDU2LAotICAgICA0NTcsICAgNDYwLCAgIDQ2MSwgICA0NjIsICAgNDY2LCAgIDQ2NywgICA0NzAsICAgNDcxLCAgIDQ3NCwgICA0NzUsCi0gICAgIDQ3NiwgICA0NzcsICAgNDc4LCAgIDQ3OSwgICA0ODAsICAgNDgzLCAgIDQ4NCwgICA0ODcsICAgNDg4CisgICAgICAgMCwgICAxMDQsICAgMTA0LCAgIDEwNCwgICAxMDYsICAgMTA2LCAgIDEwOCwgICAxMTAsICAgMTExLCAgIDExMiwKKyAgICAgMTEzLCAgIDExNCwgICAxMTUsICAgMTE5LCAgIDEyMywgICAxMjMsICAgMTIzLCAgIDEyMywgICAxMjMsICAgMTIzLAorICAgICAxMjMsICAgMTIzLCAgIDEyNywgICAxMjgsICAgMTI5LCAgIDEzMCwgICAxMzEsICAgMTMyLCAgIDEzNiwgICAxMzcsCisgICAgIDE0MywgICAxNTEsICAgM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WFrZWZpbGUKQEAgLTExOCwxMCArMTE4LDEyIEBACiAKIHF1aWV0X2NtZF9wZXJmX3RhciA9IFRBUgogICAgICAgY21kX3BlcmZfdGFyID0gXAotZ2l0IGFyY2hpdmUgLS1wcmVmaXg9JChwZXJmLXRhcikvIEhFQURee3RyZWV9ICAgICAgICAgICAgICAgICAgICAgICBcCi0JJCQoY2F0ICQoc3JjdHJlZSkvdG9vbHMvcGVyZi9NQU5JRkVTVCkgLW8gJChwZXJmLXRhcikudGFyOyAgXAorZ2l0IC0tZ2l0LWRpcj0kKHNyY3RyZWUpLy5naXQgYXJjaGl2ZSAtLXByZWZpeD0kKHBlcmYtdGFyKS8gICAgICAgICBcCisJSEVBRF57dHJlZX0gJCQoY2QgJChzcmN0cmVlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkgICAgICAgZWNobyAkJChjYXQgJChzcmN0cmVlKS90b29scy9wZXJmL01BTklGRVNUKSkgXAorCS1vICQocGVyZi10YXIpLnRhcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIG1rZGlyIC1wICQocGVyZi10YXIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotZ2l0IHJldi1wYXJzZSBIRUFEID4gJChwZXJmLXRhcikvSEVBRDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCitnaXQgLS1naXQtZGlyPSQoc3JjdHJlZSkvLmdpdCByZXYtcGFyc2UgSEVBRCA+ICQocGVyZi10YXIpL0hFQUQ7ICAgIFwKIHRhciByZiAkKHBlcmYtdGFyKS50YXIgJChwZXJmLXRhcikvSEVBRDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogcm0gLXIgJChwZXJmLXRhcik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAkKGlmICQoZmluZHN0cmluZyB0YXItc3JjLCRAKSwsICAgICAgICAgICAgICAgICA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30KKworLyogKioqKioqKioqKioqKioqKiogTW9kZTEgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgYWxjNjYzX21vZGUxX3NldHVwKHN0cnVjdCBoZGFfY29kZWMgKmNvZGVjKQoreworCXN0cnVjdCBhbGNfc3BlYyAqc3BlYyA9IGNvZGVjLT5zcGVjOworCXNwZWMtPmF1dG9jZmcuaHBfcGluc1swXSA9IDB4MjE7CisJc3BlYy0+YXV0b2NmZy5zcGVha2VyX3BpbnNbMF0gPSAweDE0OworCXNwZWMtPmF1dG9tdXRlX21peGVyX25pZFswXSA9IDB4MGM7CisJc3BlYy0+YXV0b211dGUgPSAxOworCXNwZWMtPmF1dG9tdXRlX21vZGUgPSBBTENfQVVUT01VVEVfTUlYRVI7CisJc3BlYy0+ZXh0X21pY19waW4gPSAweDE4OworCXNwZWMtPmludF9taWNfcGluID0gMHgxOTsKKwlzcGVjLT5hdXRvX21pYyA9IDE7Cit9CisKKy8qICoqKioqKioqKioqKioqKioqIE1vZGUyICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkIGFsYzY2Ml9tb2RlMl9zZXR1cChzdHJ1Y3QgaGRhX2NvZGVjICpjb2RlYykKK3sKKwlzdHJ1Y3QgYWxjX3NwZWMgKnNwZWMgPSBjb2RlYy0+c3BlYzsKKwlzcGVjLT5hdXRvY2ZnLmhwX3BpbnNbMF0gPSAweDFiOworCXNwZWMtPmF1dG9jZmcuc3BlYWtlcl9waW5zWzBdID0gMHgxNDsKKwlzcGVjLT5hdXRvbXV0ZSA9IDE7CisJc3BlYy0+YXV0b211dGVfbW9kZSA9IEFMQ19BVVRPTVVURV9QSU47CisJc3BlYy0+ZXh0X21pY19waW4gPSAweDE4OworCXNwZWMtPmludF9taWNfcGluID0gMHgxOTsKKwlzcGVjLT5hdXRvX21pYyA9IDE7Cit9CisKKy8qICoqKioqKioqKioqKioqKioqIE1vZGUzICoqKioqKioqKioqKioqKio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9uaWRbMF0gPSAweDBjOworCXNwZWMtPmF1dG9tdXRlID0gMTsKKwlzcGVjLT5hdXRvbXV0ZV9tb2RlID0gQUxDX0FVVE9NVVRFX01JWEVSOworCXNwZWMtPmV4dF9taWNfcGluID0gMHgxODsKKwlzcGVjLT5pbnRfbWljX3BpbiA9IDB4MTk7CisJc3BlYy0+YXV0b19taWMgPSAxOworfQorCisvKiAqKioqKioqKioqKioqKioqKiBNb2RlNyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBhbGM2NjNfbW9kZTdfc2V0dXAoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMpCit7CisJc3RydWN0IGFsY19zcGVjICpzcGVjID0gY29kZWMtPnNwZWM7CisJc3BlYy0+YXV0b2NmZy5ocF9waW5zWzBdID0gMHgxYjsKKwlzcGVjLT5hdXRvY2ZnLmhwX3BpbnNbMF0gPSAweDIxOworCXNwZWMtPmF1dG9jZmcuc3BlYWtlcl9waW5zWzBdID0gMHgxNDsKKwlzcGVjLT5hdXRvY2ZnLnNwZWFrZXJfcGluc1swXSA9IDB4MTc7CisJc3BlYy0+YXV0b211dGUgPSAxOworCXNwZWMtPmF1dG9tdXRlX21vZGUgPSBBTENfQVVUT01VVEVfUElOOworCXNwZWMtPmV4dF9taWNfcGluID0gMHgxODsKKwlzcGVjLT5pbnRfbWljX3BpbiA9IDB4MTk7CisJc3BlYy0+YXV0b19taWMgPSAxOworfQorCisvKiAqKioqKioqKioqKioqKioqKiBNb2RlOCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBhbGM2NjNfbW9kZThfc2V0dXAoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMpCit7CisJc3RydWN0IGFsY19zcGVjICpzcGVjID0gY29kZWMtPnNwZWM7CisJc3BlYy0+YXV0b2NmZy5ocF9waW5zWzBdID0gMHgyMTsKKwlzcGVjLT5hdXRvY2ZnLmhwX3BpbnNbMV0gPSAweD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gorCitlbnVtIGhkYV9jbWRfdmVuZG9yX2lvIHsKKwkvKiBmb3IgRHNwSU8gbm9kZSAqLworCVZFTkRPUl9EU1BJT19TQ1BfV1JJVEVfREFUQV9MT1cgICAgICA9IDB4MDAwLAorCVZFTkRPUl9EU1BJT19TQ1BfV1JJVEVfREFUQV9ISUdIICAgICA9IDB4MTAwLAorCisJVkVORE9SX0RTUElPX1NUQVRVUyAgICAgICAgICAgICAgICAgID0gMHhGMDEsCisJVkVORE9SX0RTUElPX1NDUF9QT1NUX1JFQURfREFUQSAgICAgID0gMHg3MDIsCisJVkVORE9SX0RTUElPX1NDUF9SRUFEX0RBVEEgICAgICAgICAgID0gMHhGMDIsCisJVkVORE9SX0RTUElPX0RTUF9JTklUICAgICAgICAgICAgICAgID0gMHg3MDMsCisJVkVORE9SX0RTUElPX1NDUF9QT1NUX0NPVU5UX1FVRVJZICAgID0gMHg3MDQsCisJVkVORE9SX0RTUElPX1NDUF9SRUFEX0NPVU5UICAgICAgICAgID0gMHhGMDQsCisKKwkvKiBmb3IgQ2hpcElPIG5vZGUgKi8KKwlWRU5ET1JfQ0hJUElPX0FERFJFU1NfTE9XICAgICAgICAgICAgPSAweDAwMCwKKwlWRU5ET1JfQ0hJUElPX0FERFJFU1NfSElHSCAgICAgICAgICAgPSAweDEwMCwKKwlWRU5ET1JfQ0hJUElPX1NUUkVBTV9GT1JNQVQgICAgICAgICAgPSAweDIwMCwKKwlWRU5ET1JfQ0hJUElPX0RBVEFfTE9XICAgICAgICAgICAgICAgPSAweDMwMCwKKwlWRU5ET1JfQ0hJUElPX0RBVEFfSElHSCAgICAgICAgICAgICAgPSAweDQwMCwKKworCVZFTkRPUl9DSElQSU9fR0VUX1BBUkFNRVRFUiAgICAgICAgICA9IDB4RjAwLAorCVZFTkRPUl9DSElQSU9fU1RBVFVTICAgICAgICAgICAgICAgICA9IDB4RjAxLAorCVZFTkRPUl9DSElQSU9fSElDX1BPU1RfUkVBRCAgICAgICAgICA9IDB4NzAyLAorCVZFTkRPUl9DSElQSU9fSElDX1JFQURfREFUQSAgICAgICAgICA9IDB4RjAzLAorCisJVkVORE9SX0NISVBJT19DVF9FWFRFTlNJT05TX0VOQUJMRSAgID0gMHg3MEEsCisKKwlWRU5ET1JfQ0hJUElPX1BMTF9QTVVfV1JJVEUgICAgICAgICAgPSAweDcwQywKKwlWRU5ET1JfQ0hJUElPX1BMTF9QTVVfUkVBRCAgICAgICAgICAgPSAweEYwQywKKwlWRU5ET1JfQ0hJUElPXzgwNTFfQUREUkVTU19MT1cgICAgICAgPSAweDcwRCwKKwlWRU5ET1JfQ0hJUElPXzgwNTFfQUREUkVTU19ISUdIICAgICAgPSAweDcwRSwKKwlWRU5ET1JfQ0hJUElPX0ZMQUdfU0VUICAgICAgICAgICAgICAgPSAweDcwRiwKKwlWRU5ET1JfQ0hJUElPX0ZMQUdTX0dFVCAgICAgICAgICAgICAgPSAweEYwRiwKKwlWRU5ET1JfQ0hJUElPX1BBUkFNRVRFUl9TRVQgICAgICAgICAgPSAweDcxMCwKKwlWRU5ET1JfQ0hJUElPX1BBUkFNRVRFUl9HRVQgICAgICAgICAgPSAweEYxMCwKKworCVZFTkRPUl9DSElQSU9fUE9SVF9BTExPQ19DT05GSUdfU0VUICA9IDB4NzExLAorCVZFTkRPUl9DSElQSU9fUE9SVF9BTExPQ19TRVQgICAgICAgICA9IDB4NzEyLAorCVZFTkRPUl9DSElQSU9fUE9SVF9BTExPQ19HRVQgICAgICAgICA9IDB4RjEyLAorCVZFTkRPUl9DSElQSU9fUE9SVF9GUkVFX1NFVCAgICAgICAgICA9IDB4NzEzLAorCisJVkVORE9SX0NISVBJT19QQVJBTUVURVJfRVhfSURfR0VUICAgID0gMHhGMTcsCisJVkVORE9SX0NISVBJT19QQVJBTUVURVJfRVhfSURfU0VUICAgID0gMHg3MTcsCisJVkVORE9SX0NISVBJT19QQVJBTUVURVJfRVhfVkFMVUVfR0VUID0gMHhGMTgsCisJVkVORE9SX0NISVBJT19QQVJBTUVURVJfRVhfVkFMVUVfU0VUID0gMHg3MTgKK307CisKKy8qCisgKiAgQ29udHJvbCBmbGFnIElEcworICovCitlbnVtIGNvbnRyb2xfZmxhZ19pZCB7CisJLyogQ29ubmVjdGlvbiBtYW5hZ2VyIHN0cmVhbSBzZXR1cCBpcyBieXBhc3NlZC9lbmFibGVkICovCisJQ09OVFJPTF9GTEFHX0NfTUdSICAgICAgICAgICAgICAgICAgPSAwLAorCS8qIERTUCBETUEgaXMgYnlwYXNzZWQvZW5hYmxlZCAqLworCUNPTlRST0xfRkxBR19ETUEgICAgICAgICAgICAgICAgICAgID0gMSwKKwkvKiA4MDUxICdpZGxlJyBtb2RlIGlzIGRpc2FibGVkL2VuYWJsZWQgKi8KKwlDT05UUk9MX0ZMQUdfSURMRV9FTkFCTEUgICAgICAgICAgICA9IDIsCisJLyogVHJhY2tlciBmb3IgdGhlIFNQRElGLWluIHBhdGggaXMgYnlwYXNzZWQvZW5hYmxlZCAqLworCUNPTlRST0xfRkxBR19UUkFDS0VSICAgICAgICAgICAgICAgID0gMywKKwkvKiBEaWdpdGFsT3V0IHRvIFNwZGlmMk91dCBjb25uZWN0aW9uIGlzIGRpc2FibGVkL2VuYWJsZWQgKi8KKwlDT05UUk9MX0ZMQUdfU1BESUYyT1VUICAgICAgICAgICAgICA9IDQsCisJLyogRGlnaXRhbCBNaWNyb3Bob25lIGlzIGRpc2FibGVkL2VuYWJsZWQgKi8KKwlDT05UUk9MX0ZMQUdfRE1JQyAgICAgICAgICAgICAgICAgICA9IDUsCisJLyogQURDX0IgcmF0ZSBpcyA0OCBrSHovOTYga0h6ICovCisJQ09OVFJPTF9GTEFHX0FEQ19CXzk2S0haICAgICAgICAgICAgPSA2LAorCS8qIEFEQ19DIHJhdGUgaXMgNDgga0h6Lzk2IGtIeiAqLworCUNPTlRST0xfRkxBR19BRENfQ185NktIWiAgICAgICAgICAgID0gNywKKwkvKiBEQUMgcmF0ZSBpcyA0OCBrSHovOTYga0h6IChhZmZ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CS8qIEJ1c3ksIHVuYWJsZSB0byBhY2NlcHQgbmV3IGNvbW1hbmQsIHRoZSBob3N0IG11c3QgcmV0cnkgKi8KKwlWRU5ET1JfU1RBVFVTX0NISVBJT19CVVNZID0gMHgwMQorfTsKKworLyoKKyAqICBDQTAxMzIgc2FtcGxlIHJhdGUKKyAqLworZW51bSBjYTAxMzJfc2FtcGxlX3JhdGUgeworCVNSXzZfMDAwICAgICAgICA9IDB4MDAsCisJU1JfOF8wMDAgICAgICAgID0gMHgwMSwKKwlTUl85XzYwMCAgICAgICAgPSAweDAyLAorCVNSXzExXzAyNSAgICAgICA9IDB4MDMsCisJU1JfMTZfMDAwICAgICAgID0gMHgwNCwKKwlTUl8yMl8wNTAgICAgICAgPSAweDA1LAorCVNSXzI0XzAwMCAgICAgICA9IDB4MDYsCisJU1JfMzJfMDAwICAgICAgID0gMHgwNywKKwlTUl80NF8xMDAgICAgICAgPSAweDA4LAorCVNSXzQ4XzAwMCAgICAgICA9IDB4MDksCisJU1JfODhfMjAwICAgICAgID0gMHgwQSwKKwlTUl85Nl8wMDAgICAgICAgPSAweDBCLAorCVNSXzE0NF8wMDAgICAgICA9IDB4MEMsCisJU1JfMTc2XzQwMCAgICAgID0gMHgwRCwKKwlTUl8xOTJfMDAwICAgICAgPSAweDBFLAorCVNSXzM4NF8wMDAgICAgICA9IDB4MEYsCisKKwlTUl9DT1VOVCAgICAgICAgPSAweDEwLAorCisJU1JfUkFURV9VTktOT1dOID0gMHgxRgorfTsKKworLyoKKyAqICBTY3AgSGVscGVyIGZ1bmN0aW9uCisgKi8KK2VudW0gZ2V0X3NldCB7CisJSVNfU0VUID0gMCwKKwlJU19HRVQgPSAxLAorfTsKKworLyoKKyAqIER1cGxpY2F0ZWQgZnJvbSBjYTAxMTAgY29kZWMKKyAqLworCitzdGF0aWMgdm9pZCBpbml0X291dHB1dChzdHJ1Y3QgaGRhX2NvZGVjICpjb2RlYywgaGRhX25pZF90IHBpbiwgaGRhX25pZF90IGRh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4MTBjNywgIkZTQyBBbWlsbyBQaTE1MDUiLCBQSU5GSVhfRlNDX0FNSUxPX1BJMTUwNSksCisJe30KK307CisKKy8qCisgKi8KKyNpZmRlZiBDT05GSUdfU05EX0hEQV9FTkFCTEVfUkVBTFRFS19RVUlSS1MKKyNpbmNsdWRlICJhbGM4NjFfcXVpcmtzLmMiCisjZW5kaWYKKworc3RhdGljIGludCBwYXRjaF9hbGM4NjEoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMpCit7CisJc3RydWN0IGFsY19zcGVjICpzcGVjOworCWludCBib2FyZF9jb25maWc7CisJaW50IGVycjsKKworCXNwZWMgPSBremFsbG9jKHNpemVvZigqc3BlYyksIEdGUF9LRVJORUwpOworCWlmIChzcGVjID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJY29kZWMtPnNwZWMgPSBzcGVjOworCisJc3BlYy0+bWl4ZXJfbmlkID0gMHgxNTsKKworICAgICAgICBib2FyZF9jb25maWcgPSBhbGNfYm9hcmRfY29uZmlnKGNvZGVjLCBBTEM4NjFfTU9ERUxfTEFTVCwKKwkJCQkJYWxjODYxX21vZGVscywgYWxjODYxX2NmZ190YmwpOworCisJaWYgKGJvYXJkX2NvbmZpZyA8IDApIHsKKwkJcHJpbnRrKEtFUk5fSU5GTyAiaGRhX2NvZGVjOiAlczogQklPUyBhdXRvLXByb2JpbmcuXG4iLAorCQkgICAgICAgY29kZWMtPmNoaXBfbmFtZSk7CisJCWJvYXJkX2NvbmZpZyA9IEFMQ19NT0RFTF9BVVRPOworCX0KKworCWlmIChib2FyZF9jb25maWcgPT0gQUxDX01PREVMX0FVVE8pIHsKKwkJYWxjX3BpY2tfZml4dXAoY29kZWMsIE5VTEwsIGFsYzg2MV9maXh1cF90YmwsIGFsYzg2MV9maXh1cHMpOworCQlhbGNfYXBwbHlfZml4dXAoY29kZWMsIEFMQ19GSVhVUF9BQ1RfUFJFX1BST0JFKTsKKwl9CisKKwlpZiAoYm9hcmRfY29uZmlnID09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UFVUX1BJTl9BVFRSX1JFQVI7IGF0dHIgPj0gSU5QVVRfUElOX0FUVFJfTk9STUFMOyBhdHRyLS0pIHsKKwkJbnVtcyA9IDA7CisJCWZvciAoaSA9IDA7IGkgPCBjZmctPm51bV9pbnB1dHM7IGkrKykgeworCQkJdW5zaWduZWQgaW50IGRlZjsKKwkJCWlmIChpbnNbaV0udHlwZSA+IEFVVE9fUElOX0xJTkVfSU4pCisJCQkJY29udGludWU7CisJCQlkZWYgPSBzbmRfaGRhX2NvZGVjX2dldF9waW5jZmcoY29kZWMsIGluc1tpXS5waW4pOworCQkJaWYgKHNuZF9oZGFfZ2V0X2lucHV0X3Bpbl9hdHRyKGRlZikgIT0gYXR0cikKKwkJCQljb250aW51ZTsKKwkJCWZvciAoaiA9IDA7IGogPCBudW1zOyBqKyspCisJCQkJaWYgKGluc1twaW5zW2pdXS50eXBlIDwgaW5zW2ldLnR5cGUpIHsKKwkJCQkJbWVtbW92ZShwaW5zICsgaiArIDEsIHBpbnMgKyBqLAorCQkJCQkJKG51bXMgLSBqKSAqIHNpemVvZihpbnQpKTsKKwkJCQkJYnJlYWs7CisJCQkJfQorCQkJcGluc1tqXSA9IGk7CisJCQludW1zKys7CisJCX0KKwkJaWYgKGNmZy0+bGluZV9vdXRzICsgbnVtcyA8IDMpCisJCQljb250aW51ZTsKKwkJZm9yIChpID0gMDsgaSA8IG51bXM7IGkrKykgeworCQkJaGRhX25pZF90IHBpbiA9IGluc1twaW5zW2ldXS5waW47CisJCQlzcGVjLT5zbWFydDUxX3BpbnNbc3BlYy0+c21hcnQ1MV9udW1zKytdID0gcGluOworCQkJY2ZnLT5saW5lX291dF9waW5zW2NmZy0+bGluZV9vdXRzKytdID0gcGluOworCQkJaWYgKGNmZy0+bGluZV9vdXRzID09IDMpCisJCQkJYnJlYWs7CisJCX0KKwkJcmV0dXJuOworCX0KK30KKworc3RhdGljIHZvaWQgY29weV9wYXRoX21peGVyX2N0bHMoc3RydWN0IG5pZF9wYXRoIC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2hpcC0+bWl4ZXIuZGVzdF9waHlzX291dF9vZnMgPSBjaGlwLT5taXhlci5kZXN0X3N0cmVhbV9pbnMgKwotCQlMT0xBX01JWEVSX0RFU1RfUkVDX09VVFBVVF9TRVBBVEFUSU9OKHZhbCk7CisJCUxPTEFfTUlYRVJfREVTVF9SRUNfT1VUUFVUX1NFUEFSQVRJT04odmFsKTsKIAotCS8qIGV4YW1wbGUgOiBNaXhlck1hdHJpeCBvZiBMb0xhODgxCi0JICogMC0tLS0tLS04LS0tLS0tMTYtLS0tLS0tOC0tLS0tLTE2Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCBJTlBVVCB8ICAgICAgIHwgSU5QVVQgfCAgICAgICB8Ci0JICogfCAtPiAgICB8dW51c2VkIHwgLT4gICAgfHVudXNlZCB8Ci0JICogfCBSRUNPUkR8ICAgICAgIHwgT1VUUFVUfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogOC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfHVudXNlZCB8dW51c2VkIHx1bnVzZWQgfHVudXNlZCB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogMTYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCBQTEFZICB8ICAgICAgIHwgUExBWSAgfCAgICAgICB8Ci0JICogfCAgLT4gICB8dW51c2VkIHwgLT4gICAgfHVudXNlZCB8Ci0JICogfCBSRUNPUkR8ICAgICAgIHwgT1VUUFVUfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogOC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfHVudXNlZCB8dW51c2VkIHx1bnVzZWQgfHVudXNlZCB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8Ci0JICogMTYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisJLyogZXhhbXBsZSA6IE1peGVyTWF0cml4IG9mIExvTGE4ODEgKExvTGExNjE2MSB1c2VzIHVudXNlZCB6b25lcykKKwkgKiArLSsgIDAtLS0tLS0tOC0tLS0tLTE2LS0tLS0tLTgtLS0tLS0xNgorCSAqIHwgfCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfHN8ICB8IElOUFVUIHwgICAgICAgfCBJTlBVVCB8ICAgICAgIHwKKwkgKiB8IHwtPnwgIC0+ICAgfHVudXNlZCB8ICAtPiAgIHx1bnVzZWQgfAorCSAqIHxyfCAgfENBUFRVUkV8ICAgICAgIHwgT1VUUFVUfCAgICAgICB8CisJICogfCB8ICB8ICBNSVggIHwgICAgICAgfCAgTUlYICB8ICAgICAgIHwKKwkgKiB8Y3wgIDgtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCSAqIHwgfCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfCB8ICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8ICAgICAgIHwKKwkgKiB8Z3wgIHx1bnVzZWQgfHVudXNlZCB8dW51c2VkIHx1bnVzZWQgfAorCSAqIHwgfCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfGF8ICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8ICAgICAgIHwKKwkgKiB8IHwgIDE2LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCSAqIHxpfCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfCB8ICB8IFBMQVlCS3wgICAgICAgfCBQTEFZQkt8ICAgICAgIHwKKwkgKiB8bnwtPnwgIC0+ICAgfHVudXNlZCB8ICAtPiAgIHx1bnVzZWQgfAorCSAqIHwgfCAgfENBUFRVUkV8ICAgICAgIHwgT1VUUFVUfCAgICAgICB8CisJICogfCB8ICB8ICBNSVggIHwgICAgICAgfCAgTUlYICB8ICAgICAgIHwKKwkgKiB8YXwgIDgtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCSAqIHxyfCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfHJ8ICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8ICAgICAgIHwKKwkgKiB8YXwgIHx1bnVzZWQgfHVudXNlZCB8dW51c2VkIHx1bnVzZWQgfAorCSAqIHx5fCAgfCAgICAgICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8CisJICogfCB8ICB8ICAgICAgIHwgICAgICAgfCAgICAgICB8ICAgICAgIHwKKwkgKiArKysgIDE2LS18LS0tLS0tLS0tLS0tLS0tfC0tLS0tLS0tLS0tLQorCSAqICAgICAgKy0tLVYtLS0tLS0tLS0tLS0tLS1WLS0tLS0tLS0tLS0rCisJICogICAgICB8ICBkZXN0X21peF9nYWluX2VuYWJsZSBhcnJheSAgIHwKKwkgKiAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworCSAqLworCS8qIGV4YW1wbGUgOiBNaXhlck1hdHJpeCBvZiBMb0xhMjgwCisJICogKy0rICAwLS0tLS0tLTgtMgorCSAqIHwgfC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YmxlIGFudGktcG9wIGZlYXR1cmVzICovCisJCQlzbmRfc29jX3VwZGF0ZV9iaXRzKGNvZGVjLCBXTTg5ODNfT1VUNF9UT19BREMsCisJCQkJCSAgICBXTTg5ODNfUE9CQ1RSTF9NQVNLIHwgV004OTgzX0RFTEVOX01BU0ssCisJCQkJCSAgICBXTTg5ODNfUE9CQ1RSTCB8IFdNODk4M19ERUxFTik7CisJCQkvKiBlbmFibGUgdGhlcm1hbCBzaHV0ZG93biAqLworCQkJc25kX3NvY191cGRhdGVfYml0cyhjb2RlYywgV004OTgzX09VVFBVVF9DVFJMLAorCQkJCQkgICAgV004OTgzX1RTREVOX01BU0ssIFdNODk4M19UU0RFTik7CisJCQkvKiBlbmFibGUgQklBU0VOICovCisJCQlzbmRfc29jX3VwZGF0ZV9iaXRzKGNvZGVjLCBXTTg5ODNfUE9XRVJfTUFOQUdFTUVOVF8xLAorCQkJCQkgICAgV004OTgzX0JJQVNFTl9NQVNLLCBXTTg5ODNfQklBU0VOKTsKKwkJCS8qIFZNSUQgYXQgMTAwayAqLworCQkJc25kX3NvY191cGRhdGVfYml0cyhjb2RlYywgV004OTgzX1BPV0VSX01BTkFHRU1FTlRfMSwKKwkJCQkJICAgIFdNODk4M19WTUlEU0VMX01BU0ssCisJCQkJCSAgICAxIDw8IFdNODk4M19WTUlEU0VMX1NISUZUKTsKKwkJCW1zbGVlcCgyNTApOworCQkJLyogZGlzYWJsZSBhbnRpLXBvcCBmZWF0dXJlcyAqLworCQkJc25kX3NvY191cGRhdGVfYml0cyhjb2RlYywgV004OTgzX09VVDRfVE9fQURDLAorCQkJCQkgICAgV004OTgzX1BPQkNUUkxfTUFTSyB8CisJCQkJCSAgICBXTTg5ODNfREVMRU5fTUFTSywgMCk7CisJCX0KKworCQkvKiBWTUlEIGF0IDUwMGsgKi8KKwkJc25kX3NvY191cGRhdGVfYml0cyhjb2RlYywgV004OTgzX1BPV0VSX01BTkFHRU1FTlRfMSwKKwkJCQkgICAgV004OTgzX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AgICAgIDB4MDgKKyNkZWZpbmUgV004OTgzX0pBQ0tfREVURUNUX0NPTlRST0xfMSAgICAgICAgICAgIDB4MDkKKyNkZWZpbmUgV004OTgzX0RBQ19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgIDB4MEEKKyNkZWZpbmUgV004OTgzX0xFRlRfREFDX0RJR0lUQUxfVk9MICAgICAgICAgICAgIDB4MEIKKyNkZWZpbmUgV004OTgzX1JJR0hUX0RBQ19ESUdJVEFMX1ZPTCAgICAgICAgICAgIDB4MEMKKyNkZWZpbmUgV004OTgzX0pBQ0tfREVURUNUX0NPTlRST0xfMiAgICAgICAgICAgIDB4MEQKKyNkZWZpbmUgV004OTgzX0FEQ19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgIDB4MEUKKyNkZWZpbmUgV004OTgzX0xFRlRfQURDX0RJR0lUQUxfVk9MICAgICAgICAgICAgIDB4MEYKKyNkZWZpbmUgV004OTgzX1JJR0hUX0FEQ19ESUdJVEFMX1ZPTCAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgV004OTgzX0VRMV9MT1dfU0hFTEYgICAgICAgICAgICAgICAgICAgIDB4MTIKKyNkZWZpbmUgV004OTgzX0VRMl9QRUFLXzEgICAgICAgICAgICAgICAgICAgICAgIDB4MTMKKyNkZWZpbmUgV004OTgzX0VRM19QRUFLXzIgICAgICAgICAgICAgICAgICAgICAgIDB4MTQKKyNkZWZpbmUgV004OTgzX0VRNF9QRUFLXzMgICAgICAgICAgICAgICAgICAgICAgIDB4MTUKKyNkZWZpbmUgV004OTgzX0VRNV9ISUdIX1NIRUxGICAgICAgICAgICAgICAgICAgIDB4MTYKKyNkZWZpbmUgV004OTgzX0RBQ19MSU1JVEVSXzEgICAgICAgICAgICAgICAgICAgIDB4MTgKKyNkZWZpbmUgV004OTgzX0RBQ19MSU1JVEVSXzIgICAgICAgICAgICAgICAgICAgIDB4MTkKKyNkZWZpbmUgV004OTgzX05PVENIX0ZJTFRFUl8xICAgICAgICAgICAgICAgICAgIDB4MUIKKyNkZWZpbmUgV004OTgzX05PVENIX0ZJTFRFUl8yICAgICAgICAgICAgICAgICAgIDB4MUMKKyNkZWZpbmUgV004OTgzX05PVENIX0ZJTFRFUl8zICAgICAgICAgICAgICAgICAgIDB4MUQKKyNkZWZpbmUgV004OTgzX05PVENIX0ZJTFRFUl80ICAgICAgICAgICAgICAgICAgIDB4MUUKKyNkZWZpbmUgV004OTgzX0FMQ19DT05UUk9MXzEgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgV004OTgzX0FMQ19DT05UUk9MXzIgICAgICAgICAgICAgICAgICAgIDB4MjEKKyNkZWZpbmUgV004OTgzX0FMQ19DT05UUk9MXzMgICAgICAgICAgICAgICAgICAgIDB4MjIKKyNkZWZpbmUgV004OTgzX05PSVNFX0dBVEUgICAgICAgICAgICAgICAgICAgICAgIDB4MjMKKyNkZWZpbmUgV004OTgzX1BMTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQKKyNkZWZpbmUgV004OTgzX1BMTF9LXzEgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjUKKyNkZWZpbmUgV004OTgzX1BMTF9LXzIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjYKKyNkZWZpbmUgV004OTgzX1BMTF9LXzMgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjcKKyNkZWZpbmUgV004OTgzXzNEX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgIDB4MjkKKyNkZWZpbmUgV004OTgzX09VVDRfVE9fQURDICAgICAgICAgICAgICAgICAgICAgIDB4MkEKKyNkZWZpbmUgV004OTgzX0JFRVBfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgIDB4MkIKKyNkZWZpbmUgV004OTgzX0lOUFVUX0NUUkwgICAgICAgICAgICAgICAgICAgICAgIDB4MkMKKyNkZWZpbmUgV004OTgzX0xFRlRfSU5QX1BHQV9HQUlOX0NUUkwgICAgICAgICAgIDB4MkQKKyNkZWZpbmUgV004OTgzX1JJR0hUX0lOUF9QR0FfR0FJTl9DVFJMICAgICAgICAgIDB4MkUKKyNkZWZpbmUgV004OTgzX0xFRlRfQURDX0JPT1NUX0NUUkwgICAgICAgICAgICAgIDB4MkYKKyNkZWZpbmUgV004OTgzX1JJR0hUX0FEQ19CT09TVF9DVFJMICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgV004OTgzX09VVFBVVF9DVFJMICAgICAgICAgICAgICAgICAgICAgIDB4MzEKKyNkZWZpbmUgV004OTgzX0xFRlRfTUlYRVJfQ1RSTCAgICAgICAgICAgICAgICAgIDB4MzIKKyNkZWZpbmUgV004OTgzX1JJR0hUX01JWEVSX0NUUkwgICAgICAgICAgICAgICAgIDB4MzMKKyNkZWZpbmUgV004OTgzX0xPVVQxX0hQX1ZPTFVNRV9DVFJMICAgICAgICAgICAgIDB4MzQKKyNkZWZpbmUgV004OTgzX1JPVVQxX0hQX1ZPTFVNRV9DVFJMICAgICAgICAgICAgIDB4MzUKKyNkZWZpbmUgV004OTgzX0xPVVQyX1NQS19WT0xVTUVfQ1RSTCAgICAgICAgICAgIDB4MzYKKyNkZWZpbmUgV004OTgzX1JPVVQyX1NQS19WT0xVTUVfQ1RSTCAgICAgICAgICAgIDB4MzcKKyNkZWZpbmUgV004OTgzX09VVDNfTUlYRVJfQ1RSTCAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgV004OTgzX09VVDRfTU9OT19NSVhfQ1RSTCAgICAgICAgICAgICAgIDB4MzkKKyNkZWZpbmUgV004OTgzX0JJQVNfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgIDB4M0QKKworI2RlZmluZSBXTTg5ODNfUkVHSVNURVJfQ09VTlQgICAgICAgICAgICAgICAgICAgNTkKKyNkZWZpbmUgV004OTgzX01BWF9SRUdJU1RFUiAgICAgICAgICAgICAgICAgICAgIDB4M0YKKworLyoKKyAqIEZpZWxkIERlZmluaXRpb25zLgorICovCisKKy8qCisgKiBSMCAoMHgwMCkgLSBTb2Z0d2FyZSBSZXNldAorICovCisjZGVmaW5lIFdNODk4M19TT0ZUV0FSRV9SRVNFVF9NQVNLICAgICAgICAgICAgICAweDAxRkYgIC8qIFNPRlRXQVJFX1JFU0VUIC0gWzg6MF0gKi8KKyNkZWZpbmUgV004OTgzX1NPRlRXQVJFX1JFU0VUX1NISUZUICAgICAgICAgICAgICAgICAgMCAgLyogU09GVFdBUkVfUkVTRVQgLSBbODowXSAqLworI2RlZmluZSBXTTg5ODNfU09GVFdBUkVfUkVTRVRfV0lEVEggICAgICAgICAgICAgICAgICA5ICAvKiBTT0ZUV0FSRV9SRVNFVCAtIFs4OjBdICovCisKKy8qCisgKiBSMSAoMHgwMSkgLSBQb3dlciBtYW5hZ2VtZW50IDEKKyAqLworI2RlZmluZSBXTTg5ODNfQlVGRENPUEVOICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBCVUZEQ09QRU4gKi8KKyNkZWZpbmUgV004OTgzX0JVRkRDT1BFTl9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQlVGRENPUEVOICovCisjZGVmaW5lIFdNODk4M19CVUZEQ09QRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEJVRkRDT1BFTiAqLworI2RlZmluZSBXTTg5ODNfQlVGRENPUEVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCVUZEQ09QRU4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRNSVhFTiAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogT1VUNE1JWEVOICovCisjZGVmaW5lIFdNODk4M19PVVQ0TUlYRU5fTUFTSyAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIE9VVDRNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfT1VUNE1JWEVOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBPVVQ0TUlYRU4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRNSVhFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUNE1JWEVOICovCisjZGVmaW5lIFdNODk4M19PVVQzTUlYRU4gICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIE9VVDNNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfT1VUM01JWEVOX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBPVVQzTUlYRU4gKi8KKyNkZWZpbmUgV004OTgzX09VVDNNSVhFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogT1VUM01JWEVOICovCisjZGVmaW5lIFdNODk4M19PVVQzTUlYRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDNNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfUExMRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBQTExFTiAqLworI2RlZmluZSBXTTg5ODNfUExMRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBQTExFTiAqLworI2RlZmluZSBXTTg5ODNfUExMRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBQTExFTiAqLworI2RlZmluZSBXTTg5ODNfUExMRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBQTExFTiAqLworI2RlZmluZSBXTTg5ODNfTUlDQkVOICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBNSUNCRU4gKi8KKyNkZWZpbmUgV004OTgzX01JQ0JFTl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAxMCAgLyogTUlDQkVOICovCisjZGVmaW5lIFdNODk4M19NSUNCRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDQgIC8qIE1JQ0JFTiAqLworI2RlZmluZSBXTTg5ODNfTUlDQkVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBNSUNCRU4gKi8KKyNkZWZpbmUgV004OTgzX0JJQVNFTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwOCAgLyogQklBU0VOICovCisjZGVmaW5lIFdNODk4M19CSUFTRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIEJJQVNFTiAqLworI2RlZmluZSBXTTg5ODNfQklBU0VOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBCSUFTRU4gKi8KKyNkZWZpbmUgV004OTgzX0JJQVNFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQklBU0VOICovCisjZGVmaW5lIFdNODk4M19CVUZJT0VOICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIEJVRklPRU4gKi8KKyNkZWZpbmUgV004OTgzX0JVRklPRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogQlVGSU9FTiAqLworI2RlZmluZSBXTTg5ODNfQlVGSU9FTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBCVUZJT0VOICovCisjZGVmaW5lIFdNODk4M19CVUZJT0VOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEJVRklPRU4gKi8KKyNkZWZpbmUgV004OTgzX1ZNSURTRUxfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMyAgLyogVk1JRFNFTCAtIFsxOjBdICovCisjZGVmaW5lIFdNODk4M19WTUlEU0VMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIFZNSURTRUwgLSBbMTowXSAqLworI2RlZmluZSBXTTg5ODNfVk1JRFNFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBWTUlEU0VMIC0gWzE6MF0gKi8KKworLyoKKyAqIFIyICgweDAyKSAtIFBvd2VyIG1hbmFnZW1lbnQgMgorICovCisjZGVmaW5lIFdNODk4M19ST1VUMUVOICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIFJPVVQxRU4gKi8KKyNkZWZpbmUgV004OTgzX1JPVVQxRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogUk9VVDFFTiAqLworI2RlZmluZSBXTTg5ODNfUk9VVDFFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBST1VUMUVOICovCisjZGVmaW5lIFdNODk4M19ST1VUMUVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFJPVVQxRU4gKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxRU4gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogTE9VVDFFTiAqLworI2RlZmluZSBXTTg5ODNfTE9VVDFFTl9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBMT1VUMUVOICovCisjZGVmaW5lIFdNODk4M19MT1VUMUVOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIExPVVQxRU4gKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTE9VVDFFTiAqLworI2RlZmluZSBXTTg5ODNfU0xFRVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBTTEVFUCAqLworI2RlZmluZSBXTTg5ODNfU0xFRVBfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBTTEVFUCAqLworI2RlZmluZSBXTTg5ODNfU0xFRVBfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICA2ICAvKiBTTEVFUCAqLworI2RlZmluZSBXTTg5ODNfU0xFRVBfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBTTEVFUCAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTlIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBCT09TVEVOUiAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTlJfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBCT09TVEVOUiAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTlJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBCT09TVEVOUiAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTlJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCT09TVEVOUiAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTkwgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBCT09TVEVOTCAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTkxfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBCT09TVEVOTCAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBCT09TVEVOTCAqLworI2RlZmluZSBXTTg5ODNfQk9PU1RFTkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCT09TVEVOTCAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FFTlIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBJTlBHQUVOUiAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FFTlJfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBJTlBHQUVOUiAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FFTlJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBJTlBHQUVOUiAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FFTlJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBJTlBHQUVOUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBRU5MICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBJTlBQR0FFTkwgKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQUVOTF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogSU5QUEdBRU5MICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FFTkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIElOUFBHQUVOTCAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBRU5MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBJTlBQR0FFTkwgKi8KKyNkZWZpbmUgV004OTgzX0FEQ0VOUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogQURDRU5SICovCisjZGVmaW5lIFdNODk4M19BRENFTlJfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEFEQ0VOUiAqLworI2RlZmluZSBXTTg5ODNfQURDRU5SX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBRENFTlIgKi8KKyNkZWZpbmUgV004OTgzX0FEQ0VOUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQURDRU5SICovCisjZGVmaW5lIFdNODk4M19BRENFTkwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIEFEQ0VOTCAqLworI2RlZmluZSBXTTg5ODNfQURDRU5MX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBBRENFTkwgKi8KKyNkZWZpbmUgV004OTgzX0FEQ0VOTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogQURDRU5MICovCisjZGVmaW5lIFdNODk4M19BRENFTkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEFEQ0VOTCAqLworCisvKgorICogUjMgKDB4MDMpIC0gUG93ZXIgbWFuYWdlbWVudCAzCisgKi8KKyNkZWZpbmUgV004OTgzX09VVDRFTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogT1VUNEVOICovCisjZGVmaW5lIFdNODk4M19PVVQ0RU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE9VVDRFTiAqLworI2RlZmluZSBXTTg5ODNfT1VUNEVOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBPVVQ0RU4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUNEVOICovCisjZGVmaW5lIFdNODk4M19PVVQzRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIE9VVDNFTiAqLworI2RlZmluZSBXTTg5ODNfT1VUM0VOX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBPVVQzRU4gKi8KKyNkZWZpbmUgV004OTgzX09VVDNFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogT1VUM0VOICovCisjZGVmaW5lIFdNODk4M19PVVQzRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDNFTiAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJFTiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBMT1VUMkVOICovCisjZGVmaW5lIFdNODk4M19MT1VUMkVOX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIExPVVQyRU4gKi8KKyNkZWZpbmUgV004OTgzX0xPVVQyRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogTE9VVDJFTiAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMT1VUMkVOICovCisjZGVmaW5lIFdNODk4M19ST1VUMkVOICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMjAgIC8qIFJPVVQyRU4gKi8KKyNkZWZpbmUgV004OTgzX1JPVVQyRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogUk9VVDJFTiAqLworI2RlZmluZSBXTTg5ODNfUk9VVDJFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBST1VUMkVOICovCisjZGVmaW5lIFdNODk4M19ST1VUMkVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFJPVVQyRU4gKi8KKyNkZWZpbmUgV004OTgzX1JNSVhFTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwOCAgLyogUk1JWEVOICovCisjZGVmaW5lIFdNODk4M19STUlYRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIFJNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfUk1JWEVOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBSTUlYRU4gKi8KKyNkZWZpbmUgV004OTgzX1JNSVhFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogUk1JWEVOICovCisjZGVmaW5lIFdNODk4M19MTUlYRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIExNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfTE1JWEVOX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBMTUlYRU4gKi8KKyNkZWZpbmUgV004OTgzX0xNSVhFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogTE1JWEVOICovCisjZGVmaW5lIFdNODk4M19MTUlYRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIExNSVhFTiAqLworI2RlZmluZSBXTTg5ODNfREFDRU5SICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAyICAvKiBEQUNFTlIgKi8KKyNkZWZpbmUgV004OTgzX0RBQ0VOUl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogREFDRU5SICovCisjZGVmaW5lIFdNODk4M19EQUNFTlJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ0VOUiAqLworI2RlZmluZSBXTTg5ODNfREFDRU5SX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBEQUNFTlIgKi8KKyNkZWZpbmUgV004OTgzX0RBQ0VOTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogREFDRU5MICovCisjZGVmaW5lIFdNODk4M19EQUNFTkxfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIERBQ0VOTCAqLworI2RlZmluZSBXTTg5ODNfREFDRU5MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBEQUNFTkwgKi8KKyNkZWZpbmUgV004OTgzX0RBQ0VOTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogREFDRU5MICovCisKKy8qCisgKiBSNCAoMHgwNCkgLSBBdWRpbyBJbnRlcmZhY2UKKyAqLworI2RlZmluZSBXTTg5ODNfQkNQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBCQ1AgKi8KKyNkZWZpbmUgV004OTgzX0JDUF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQkNQICovCisjZGVmaW5lIFdNODk4M19CQ1BfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEJDUCAqLworI2RlZmluZSBXTTg5ODNfQkNQX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCQ1AgKi8KKyNkZWZpbmUgV004OTgzX0xSQ1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogTFJDUCAqLworI2RlZmluZSBXTTg5ODNfTFJDUF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBMUkNQICovCisjZGVmaW5lIFdNODk4M19MUkNQX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIExSQ1AgKi8KKyNkZWZpbmUgV004OTgzX0xSQ1BfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTFJDUCAqLworI2RlZmluZSBXTTg5ODNfV0xfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDYwICAvKiBXTCAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19XTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIFdMIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX1dMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogV0wgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRk1UX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDE4ICAvKiBGTVQgLSBbNDozXSAqLworI2RlZmluZSBXTTg5ODNfRk1UX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBGTVQgLSBbNDozXSAqLworI2RlZmluZSBXTTg5ODNfRk1UX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBGTVQgLSBbNDozXSAqLworI2RlZmluZSBXTTg5ODNfRExSU1dBUCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBETFJTV0FQICovCisjZGVmaW5lIFdNODk4M19ETFJTV0FQX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIERMUlNXQVAgKi8KKyNkZWZpbmUgV004OTgzX0RMUlNXQVBfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogRExSU1dBUCAqLworI2RlZmluZSBXTTg5ODNfRExSU1dBUF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBETFJTV0FQICovCisjZGVmaW5lIFdNODk4M19BTFJTV0FQICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEFMUlNXQVAgKi8KKyNkZWZpbmUgV004OTgzX0FMUlNXQVBfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogQUxSU1dBUCAqLworI2RlZmluZSBXTTg5ODNfQUxSU1dBUF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBTFJTV0FQICovCisjZGVmaW5lIFdNODk4M19BTFJTV0FQX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEFMUlNXQVAgKi8KKyNkZWZpbmUgV004OTgzX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogTU9OTyAqLworI2RlZmluZSBXTTg5ODNfTU9OT19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBNT05PICovCisjZGVmaW5lIFdNODk4M19NT05PX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIE1PTk8gKi8KKyNkZWZpbmUgV004OTgzX01PTk9fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTU9OTyAqLworCisvKgorICogUjUgKDB4MDUpIC0gQ29tcGFuZGluZyBjb250cm9sCisgKi8KKyNkZWZpbmUgV004OTgzX1dMOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogV0w4ICovCisjZGVmaW5lIFdNODk4M19XTDhfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMjAgIC8qIFdMOCAqLworI2RlZmluZSBXTTg5ODNfV0w4X1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBXTDggKi8KKyNkZWZpbmUgV004OTgzX1dMOF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogV0w4ICovCisjZGVmaW5lIFdNODk4M19EQUNfQ09NUF9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwMTggIC8qIERBQ19DT01QIC0gWzQ6M10gKi8KKyNkZWZpbmUgV004OTgzX0RBQ19DT01QX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogREFDX0NPTVAgLSBbNDozXSAqLworI2RlZmluZSBXTTg5ODNfREFDX0NPTVBfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBEQUNfQ09NUCAtIFs0OjNdICovCisjZGVmaW5lIFdNODk4M19BRENfQ09NUF9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwMDYgIC8qIEFEQ19DT01QIC0gWzI6MV0gKi8KKyNkZWZpbmUgV004OTgzX0FEQ19DT01QX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQURDX0NPTVAgLSBbMjoxXSAqLworI2RlZmluZSBXTTg5ODNfQURDX0NPTVBfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBBRENfQ09NUCAtIFsyOjFdICovCisjZGVmaW5lIFdNODk4M19MT09QQkFDSyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIExPT1BCQUNLICovCisjZGVmaW5lIFdNODk4M19MT09QQkFDS19NQVNLICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIExPT1BCQUNLICovCisjZGVmaW5lIFdNODk4M19MT09QQkFDS19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIExPT1BCQUNLICovCisjZGVmaW5lIFdNODk4M19MT09QQkFDS19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIExPT1BCQUNLICovCisKKy8qCisgKiBSNiAoMHgwNikgLSBDbG9jayBHZW4gY29udHJvbAorICovCisjZGVmaW5lIFdNODk4M19DTEtTRUwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIENMS1NFTCAqLworI2RlZmluZSBXTTg5ODNfQ0xLU0VMX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBDTEtTRUwgKi8KKyNkZWZpbmUgV004OTgzX0NMS1NFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogQ0xLU0VMICovCisjZGVmaW5lIFdNODk4M19DTEtTRUxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIENMS1NFTCAqLworI2RlZmluZSBXTTg5ODNfTUNMS0RJVl9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMEUwICAvKiBNQ0xLRElWIC0gWzc6NV0gKi8KKyNkZWZpbmUgV004OTgzX01DTEtESVZfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogTUNMS0RJViAtIFs3OjVdICovCisjZGVmaW5lIFdNODk4M19NQ0xLRElWX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIE1DTEtESVYgLSBbNzo1XSAqLworI2RlZmluZSBXTTg5ODNfQkNMS0RJVl9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDFDICAvKiBCQ0xLRElWIC0gWzQ6Ml0gKi8KKyNkZWZpbmUgV004OTgzX0JDTEtESVZfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogQkNMS0RJViAtIFs0OjJdICovCisjZGVmaW5lIFdNODk4M19CQ0xLRElWX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIEJDTEtESVYgLSBbNDoyXSAqLworI2RlZmluZSBXTTg5ODNfTVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBNUyAqLworI2RlZmluZSBXTTg5ODNfTVNfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBNUyAqLworI2RlZmluZSBXTTg5ODNfTVNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBNUyAqLworI2RlZmluZSBXTTg5ODNfTVNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBNUyAqLworCisvKgorICogUjcgKDB4MDcpIC0gQWRkaXRpb25hbCBjb250cm9sCisgKi8KKyNkZWZpbmUgV004OTgzX1NSX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwRSAgLyogU1IgLSBbMzoxXSAqLworI2RlZmluZSBXTTg5ODNfU1JfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBTUiAtIFszOjFdICovCisjZGVmaW5lIFdNODk4M19TUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIFNSIC0gWzM6MV0gKi8KKyNkZWZpbmUgV004OTgzX1NMT1dDTEtFTiAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogU0xPV0NMS0VOICovCisjZGVmaW5lIFdNODk4M19TTE9XQ0xLRU5fTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIFNMT1dDTEtFTiAqLworI2RlZmluZSBXTTg5ODNfU0xPV0NMS0VOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBTTE9XQ0xLRU4gKi8KKyNkZWZpbmUgV004OTgzX1NMT1dDTEtFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogU0xPV0NMS0VOICovCisKKy8qCisgKiBSOCAoMHgwOCkgLSBHUElPIENvbnRyb2wKKyAqLworI2RlZmluZSBXTTg5ODNfT1BDTEtESVZfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDMwICAvKiBPUENMS0RJViAtIFs1OjRdICovCisjZGVmaW5lIFdNODk4M19PUENMS0RJVl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDQgIC8qIE9QQ0xLRElWIC0gWzU6NF0gKi8KKyNkZWZpbmUgV004OTgzX09QQ0xLRElWX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogT1BDTEtESVYgLSBbNTo0XSAqLworI2RlZmluZSBXTTg5ODNfR1BJTzFQT0wgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBHUElPMVBPTCAqLworI2RlZmluZSBXTTg5ODNfR1BJTzFQT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBHUElPMVBPTCAqLworI2RlZmluZSBXTTg5ODNfR1BJTzFQT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBHUElPMVBPTCAqLworI2RlZmluZSBXTTg5ODNfR1BJTzFQT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUElPMVBPTCAqLworI2RlZmluZSBXTTg5ODNfR1BJTzFTRUxfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDA3ICAvKiBHUElPMVNFTCAtIFsyOjBdICovCisjZGVmaW5lIFdNODk4M19HUElPMVNFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIEdQSU8xU0VMIC0gWzI6MF0gKi8KKyNkZWZpbmUgV004OTgzX0dQSU8xU0VMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogR1BJTzFTRUwgLSBbMjowXSAqLworCisvKgorICogUjkgKDB4MDkpIC0gSmFjayBEZXRlY3QgQ29udHJvbCAxCisgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQxICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSkRfVk1JRDEgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQxX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSkRfVk1JRDEgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQxX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogSkRfVk1JRDEgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQxX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSkRfVk1JRDEgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQwICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogSkRfVk1JRDAgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQwX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogSkRfVk1JRDAgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQwX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogSkRfVk1JRDAgKi8KKyNkZWZpbmUgV004OTgzX0pEX1ZNSUQwX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSkRfVk1JRDAgKi8KKyNkZWZpbmUgV004OTgzX0pEX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogSkRfRU4gKi8KKyNkZWZpbmUgV004OTgzX0pEX0VOX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogSkRfRU4gKi8KKyNkZWZpbmUgV004OTgzX0pEX0VOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogSkRfRU4gKi8KKyNkZWZpbmUgV004OTgzX0pEX0VOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSkRfRU4gKi8KKyNkZWZpbmUgV004OTgzX0pEX1NFTF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAzMCAgLyogSkRfU0VMIC0gWzU6NF0gKi8KKyNkZWZpbmUgV004OTgzX0pEX1NFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgLyogSkRfU0VMIC0gWzU6NF0gKi8KKyNkZWZpbmUgV004OTgzX0pEX1NFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogSkRfU0VMIC0gWzU6NF0gKi8KKworLyoKKyAqIFIxMCAoMHgwQSkgLSBEQUMgQ29udHJvbAorICovCisjZGVmaW5lIFdNODk4M19TT0ZUTVVURSAgICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIFNPRlRNVVRFICovCisjZGVmaW5lIFdNODk4M19TT0ZUTVVURV9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIFNPRlRNVVRFICovCisjZGVmaW5lIFdNODk4M19TT0ZUTVVURV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIFNPRlRNVVRFICovCisjZGVmaW5lIFdNODk4M19TT0ZUTVVURV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFNPRlRNVVRFICovCisjZGVmaW5lIFdNODk4M19EQUNPU1IxMjggICAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIERBQ09TUjEyOCAqLworI2RlZmluZSBXTTg5ODNfREFDT1NSMTI4X01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBEQUNPU1IxMjggKi8KKyNkZWZpbmUgV004OTgzX0RBQ09TUjEyOF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogREFDT1NSMTI4ICovCisjZGVmaW5lIFdNODk4M19EQUNPU1IxMjhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ09TUjEyOCAqLworI2RlZmluZSBXTTg5ODNfQU1VVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBBTVVURSAqLworI2RlZmluZSBXTTg5ODNfQU1VVEVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBBTVVURSAqLworI2RlZmluZSBXTTg5ODNfQU1VVEVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBBTVVURSAqLworI2RlZmluZSBXTTg5ODNfQU1VVEVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBTVVURSAqLworI2RlZmluZSBXTTg5ODNfREFDUlBPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAyICAvKiBEQUNSUE9MICovCisjZGVmaW5lIFdNODk4M19EQUNSUE9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIERBQ1JQT0wgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1JQT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogREFDUlBPTCAqLworI2RlZmluZSBXTTg5ODNfREFDUlBPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBEQUNSUE9MICovCisjZGVmaW5lIFdNODk4M19EQUNMUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIERBQ0xQT0wgKi8KKyNkZWZpbmUgV004OTgzX0RBQ0xQT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogREFDTFBPTCAqLworI2RlZmluZSBXTTg5ODNfREFDTFBPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBEQUNMUE9MICovCisjZGVmaW5lIFdNODk4M19EQUNMUE9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ0xQT0wgKi8KKworLyoKKyAqIFIxMSAoMHgwQikgLSBMZWZ0IERBQyBkaWdpdGFsIFZvbAorICovCisjZGVmaW5lIFdNODk4M19EQUNWVSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIERBQ1ZVICovCisjZGVmaW5lIFdNODk4M19EQUNWVV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIERBQ1ZVICovCisjZGVmaW5lIFdNODk4M19EQUNWVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIERBQ1ZVICovCisjZGVmaW5lIFdNODk4M19EQUNWVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ1ZVICovCisjZGVmaW5lIFdNODk4M19EQUNMVk9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwRkYgIC8qIERBQ0xWT0wgLSBbNzowXSAqLworI2RlZmluZSBXTTg5ODNfREFDTFZPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBEQUNMVk9MIC0gWzc6MF0gKi8KKyNkZWZpbmUgV004OTgzX0RBQ0xWT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogREFDTFZPTCAtIFs3OjBdICovCisKKy8qCisgKiBSMTIgKDB4MEMpIC0gUmlnaHQgREFDIGRpZ2l0YWwgdm9sCisgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1ZVICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogREFDVlUgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1ZVX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogREFDVlUgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1ZVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogREFDVlUgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1ZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogREFDVlUgKi8KKyNkZWZpbmUgV004OTgzX0RBQ1JWT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDBGRiAgLyogREFDUlZPTCAtIFs3OjBdICovCisjZGVmaW5lIFdNODk4M19EQUNSVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIERBQ1JWT0wgLSBbNzowXSAqLworI2RlZmluZSBXTTg5ODNfREFDUlZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBEQUNSVk9MIC0gWzc6MF0gKi8KKworLyoKKyAqIFIxMyAoMHgwRCkgLSBKYWNrIERldGVjdCBDb250cm9sIDIKKyAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4xX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMEYwICAvKiBKRF9FTjEgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4xX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBKRF9FTjEgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4xX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBKRF9FTjEgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4wX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDBGICAvKiBKRF9FTjAgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4wX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBKRF9FTjAgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfSkRfRU4wX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBKRF9FTjAgLSBbMzowXSAqLworCisvKgorICogUjE0ICgweDBFKSAtIEFEQyBDb250cm9sCisgKi8KKyNkZWZpbmUgV004OTgzX0hQRkVOICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSFBGRU4gKi8KKyNkZWZpbmUgV004OTgzX0hQRkVOX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSFBGRU4gKi8KKyNkZWZpbmUgV004OTgzX0hQRkVOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogSFBGRU4gKi8KKyNkZWZpbmUgV004OTgzX0hQRkVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSFBGRU4gKi8KKyNkZWZpbmUgV004OTgzX0hQRkFQUCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogSFBGQVBQICovCisjZGVmaW5lIFdNODk4M19IUEZBUFBfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIEhQRkFQUCAqLworI2RlZmluZSBXTTg5ODNfSFBGQVBQX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBIUEZBUFAgKi8KKyNkZWZpbmUgV004OTgzX0hQRkFQUF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSFBGQVBQICovCisjZGVmaW5lIFdNODk4M19IUEZDVVRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwNzAgIC8qIEhQRkNVVCAtIFs2OjRdICovCisjZGVmaW5lIFdNODk4M19IUEZDVVRfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDQgIC8qIEhQRkNVVCAtIFs2OjRdICovCisjZGVmaW5lIFdNODk4M19IUEZDVVRfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIEhQRkNVVCAtIFs2OjRdICovCisjZGVmaW5lIFdNODk4M19BRENPU1IxMjggICAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIEFEQ09TUjEyOCAqLworI2RlZmluZSBXTTg5ODNfQURDT1NSMTI4X01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBBRENPU1IxMjggKi8KKyNkZWZpbmUgV004OTgzX0FEQ09TUjEyOF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogQURDT1NSMTI4ICovCisjZGVmaW5lIFdNODk4M19BRENPU1IxMjhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEFEQ09TUjEyOCAqLworI2RlZmluZSBXTTg5ODNfQURDUlBPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAyICAvKiBBRENSUE9MICovCisjZGVmaW5lIFdNODk4M19BRENSUE9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEFEQ1JQT0wgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1JQT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQURDUlBPTCAqLworI2RlZmluZSBXTTg5ODNfQURDUlBPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBRENSUE9MICovCisjZGVmaW5lIFdNODk4M19BRENMUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIEFEQ0xQT0wgKi8KKyNkZWZpbmUgV004OTgzX0FEQ0xQT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogQURDTFBPTCAqLworI2RlZmluZSBXTTg5ODNfQURDTFBPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBBRENMUE9MICovCisjZGVmaW5lIFdNODk4M19BRENMUE9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEFEQ0xQT0wgKi8KKworLyoKKyAqIFIxNSAoMHgwRikgLSBMZWZ0IEFEQyBEaWdpdGFsIFZvbAorICovCisjZGVmaW5lIFdNODk4M19BRENWVSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEFEQ1ZVICovCisjZGVmaW5lIFdNODk4M19BRENWVV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEFEQ1ZVICovCisjZGVmaW5lIFdNODk4M19BRENWVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEFEQ1ZVICovCisjZGVmaW5lIFdNODk4M19BRENWVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEFEQ1ZVICovCisjZGVmaW5lIFdNODk4M19BRENMVk9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwRkYgIC8qIEFEQ0xWT0wgLSBbNzowXSAqLworI2RlZmluZSBXTTg5ODNfQURDTFZPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBBRENMVk9MIC0gWzc6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FEQ0xWT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogQURDTFZPTCAtIFs3OjBdICovCisKKy8qCisgKiBSMTYgKDB4MTApIC0gUmlnaHQgQURDIERpZ2l0YWwgVm9sCisgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1ZVICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQURDVlUgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1ZVX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQURDVlUgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1ZVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogQURDVlUgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1ZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQURDVlUgKi8KKyNkZWZpbmUgV004OTgzX0FEQ1JWT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDBGRiAgLyogQURDUlZPTCAtIFs3OjBdICovCisjZGVmaW5lIFdNODk4M19BRENSVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIEFEQ1JWT0wgLSBbNzowXSAqLworI2RlZmluZSBXTTg5ODNfQURDUlZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBBRENSVk9MIC0gWzc6MF0gKi8KKworLyoKKyAqIFIxOCAoMHgxMikgLSBFUTEgLSBsb3cgc2hlbGYKKyAqLworI2RlZmluZSBXTTg5ODNfRVEzRE1PREUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBFUTNETU9ERSAqLworI2RlZmluZSBXTTg5ODNfRVEzRE1PREVfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBFUTNETU9ERSAqLworI2RlZmluZSBXTTg5ODNfRVEzRE1PREVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBFUTNETU9ERSAqLworI2RlZmluZSBXTTg5ODNfRVEzRE1PREVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBFUTNETU9ERSAqLworI2RlZmluZSBXTTg5ODNfRVExQ19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDYwICAvKiBFUTFDIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX0VRMUNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogRVExQyAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19FUTFDX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEVRMUMgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRVExR19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDFGICAvKiBFUTFHIC0gWzQ6MF0gKi8KKyNkZWZpbmUgV004OTgzX0VRMUdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogRVExRyAtIFs0OjBdICovCisjZGVmaW5lIFdNODk4M19FUTFHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEVRMUcgLSBbNDowXSAqLworCisvKgorICogUjE5ICgweDEzKSAtIEVRMiAtIHBlYWsgMQorICovCisjZGVmaW5lIFdNODk4M19FUTJCVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEVRMkJXICovCisjZGVmaW5lIFdNODk4M19FUTJCV19NQVNLICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEVRMkJXICovCisjZGVmaW5lIFdNODk4M19FUTJCV19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEVRMkJXICovCisjZGVmaW5lIFdNODk4M19FUTJCV19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEVRMkJXICovCisjZGVmaW5lIFdNODk4M19FUTJDX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAweDAwNjAgIC8qIEVRMkMgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRVEyQ19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBFUTJDIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX0VRMkNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogRVEyQyAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19FUTJHX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAweDAwMUYgIC8qIEVRMkcgLSBbNDowXSAqLworI2RlZmluZSBXTTg5ODNfRVEyR19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBFUTJHIC0gWzQ6MF0gKi8KKyNkZWZpbmUgV004OTgzX0VRMkdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogRVEyRyAtIFs0OjBdICovCisKKy8qCisgKiBSMjAgKDB4MTQpIC0gRVEzIC0gcGVhayAyCisgKi8KKyNkZWZpbmUgV004OTgzX0VRM0JXICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogRVEzQlcgKi8KKyNkZWZpbmUgV004OTgzX0VRM0JXX01BU0sgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogRVEzQlcgKi8KKyNkZWZpbmUgV004OTgzX0VRM0JXX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogRVEzQlcgKi8KKyNkZWZpbmUgV004OTgzX0VRM0JXX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogRVEzQlcgKi8KKyNkZWZpbmUgV004OTgzX0VRM0NfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA2MCAgLyogRVEzQyAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19FUTNDX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEVRM0MgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRVEzQ19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBFUTNDIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX0VRM0dfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxRiAgLyogRVEzRyAtIFs0OjBdICovCisjZGVmaW5lIFdNODk4M19FUTNHX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIEVRM0cgLSBbNDowXSAqLworI2RlZmluZSBXTTg5ODNfRVEzR19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBFUTNHIC0gWzQ6MF0gKi8KKworLyoKKyAqIFIyMSAoMHgxNSkgLSBFUTQgLSBwZWFrIDMKKyAqLworI2RlZmluZSBXTTg5ODNfRVE0QlcgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBFUTRCVyAqLworI2RlZmluZSBXTTg5ODNfRVE0QldfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBFUTRCVyAqLworI2RlZmluZSBXTTg5ODNfRVE0QldfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBFUTRCVyAqLworI2RlZmluZSBXTTg5ODNfRVE0QldfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBFUTRCVyAqLworI2RlZmluZSBXTTg5ODNfRVE0Q19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDYwICAvKiBFUTRDIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX0VRNENfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogRVE0QyAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19FUTRDX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEVRNEMgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRVE0R19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDFGICAvKiBFUTRHIC0gWzQ6MF0gKi8KKyNkZWZpbmUgV004OTgzX0VRNEdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogRVE0RyAtIFs0OjBdICovCisjZGVmaW5lIFdNODk4M19FUTRHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEVRNEcgLSBbNDowXSAqLworCisvKgorICogUjIyICgweDE2KSAtIEVRNSAtIGhpZ2ggc2hlbGYKKyAqLworI2RlZmluZSBXTTg5ODNfRVE1Q19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDYwICAvKiBFUTVDIC0gWzY6NV0gKi8KKyNkZWZpbmUgV004OTgzX0VRNUNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogRVE1QyAtIFs2OjVdICovCisjZGVmaW5lIFdNODk4M19FUTVDX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEVRNUMgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfRVE1R19NQVNLICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDFGICAvKiBFUTVHIC0gWzQ6MF0gKi8KKyNkZWZpbmUgV004OTgzX0VRNUdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogRVE1RyAtIFs0OjBdICovCisjZGVmaW5lIFdNODk4M19FUTVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEVRNUcgLSBbNDowXSAqLworCisvKgorICogUjI0ICgweDE4KSAtIERBQyBMaW1pdGVyIDEKKyAqLworI2RlZmluZSBXTTg5ODNfTElNRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBMSU1FTiAqLworI2RlZmluZSBXTTg5ODNfTElNRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBMSU1FTiAqLworI2RlZmluZSBXTTg5ODNfTElNRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBMSU1FTiAqLworI2RlZmluZSBXTTg5ODNfTElNRU5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMSU1FTiAqLworI2RlZmluZSBXTTg5ODNfTElNRENZX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMEYwICAvKiBMSU1EQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNRENZX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBMSU1EQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNRENZX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBMSU1EQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNQVRLX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDBGICAvKiBMSU1BVEsgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfTElNQVRLX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBMSU1BVEsgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfTElNQVRLX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBMSU1BVEsgLSBbMzowXSAqLworCisvKgorICogUjI1ICgweDE5KSAtIERBQyBMaW1pdGVyIDIKKyAqLworI2RlZmluZSBXTTg5ODNfTElNTFZMX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDcwICAvKiBMSU1MVkwgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNTFZMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBMSU1MVkwgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNTFZMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBMSU1MVkwgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfTElNQk9PU1RfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDBGICAvKiBMSU1CT09TVCAtIFszOjBdICovCisjZGVmaW5lIFdNODk4M19MSU1CT09TVF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIExJTUJPT1NUIC0gWzM6MF0gKi8KKyNkZWZpbmUgV004OTgzX0xJTUJPT1NUX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgNCAgLyogTElNQk9PU1QgLSBbMzowXSAqLworCisvKgorICogUjI3ICgweDFCKSAtIE5vdGNoIEZpbHRlciAxCisgKi8KKyNkZWZpbmUgV004OTgzX05GVSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORlVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE5GVSAqLworI2RlZmluZSBXTTg5ODNfTkZVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBORlUgKi8KKyNkZWZpbmUgV004OTgzX05GVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORkVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIE5GRU4gKi8KKyNkZWZpbmUgV004OTgzX05GRU5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogTkZFTiAqLworI2RlZmluZSBXTTg5ODNfTkZFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBORkVOICovCisjZGVmaW5lIFdNODk4M19ORkVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE5GRU4gKi8KKyNkZWZpbmUgV004OTgzX05GQTBfMTNfN19NQVNLICAgICAgICAgICAgICAgICAgIDB4MDA3RiAgLyogTkZBMCgxMzo3KSAtIFs2OjBdICovCisjZGVmaW5lIFdNODk4M19ORkEwXzEzXzdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIE5GQTAoMTM6NykgLSBbNjowXSAqLworI2RlZmluZSBXTTg5ODNfTkZBMF8xM183X1dJRFRIICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBORkEwKDEzOjcpIC0gWzY6MF0gKi8KKworLyoKKyAqIFIyOCAoMHgxQykgLSBOb3RjaCBGaWx0ZXIgMgorICovCisjZGVmaW5lIFdNODk4M19ORlUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE5GVSAqLworI2RlZmluZSBXTTg5ODNfTkZVX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBORlUgKi8KKyNkZWZpbmUgV004OTgzX05GVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORlVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE5GVSAqLworI2RlZmluZSBXTTg5ODNfTkZBMF82XzBfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDdGICAvKiBORkEwKDY6MCkgLSBbNjowXSAqLworI2RlZmluZSBXTTg5ODNfTkZBMF82XzBfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBORkEwKDY6MCkgLSBbNjowXSAqLworI2RlZmluZSBXTTg5ODNfTkZBMF82XzBfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBORkEwKDY6MCkgLSBbNjowXSAqLworCisvKgorICogUjI5ICgweDFEKSAtIE5vdGNoIEZpbHRlciAzCisgKi8KKyNkZWZpbmUgV004OTgzX05GVSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORlVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE5GVSAqLworI2RlZmluZSBXTTg5ODNfTkZVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBORlUgKi8KKyNkZWZpbmUgV004OTgzX05GVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORkExXzEzXzdfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwN0YgIC8qIE5GQTEoMTM6NykgLSBbNjowXSAqLworI2RlZmluZSBXTTg5ODNfTkZBMV8xM183X1NISUZUICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBORkExKDEzOjcpIC0gWzY6MF0gKi8KKyNkZWZpbmUgV004OTgzX05GQTFfMTNfN19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogTkZBMSgxMzo3KSAtIFs2OjBdICovCisKKy8qCisgKiBSMzAgKDB4MUUpIC0gTm90Y2ggRmlsdGVyIDQKKyAqLworI2RlZmluZSBXTTg5ODNfTkZVICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBORlUgKi8KKyNkZWZpbmUgV004OTgzX05GVV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTkZVICovCisjZGVmaW5lIFdNODk4M19ORlVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIE5GVSAqLworI2RlZmluZSBXTTg5ODNfTkZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBORlUgKi8KKyNkZWZpbmUgV004OTgzX05GQTFfNl8wX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDA3RiAgLyogTkZBMSg2OjApIC0gWzY6MF0gKi8KKyNkZWZpbmUgV004OTgzX05GQTFfNl8wX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogTkZBMSg2OjApIC0gWzY6MF0gKi8KKyNkZWZpbmUgV004OTgzX05GQTFfNl8wX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogTkZBMSg2OjApIC0gWzY6MF0gKi8KKworLyoKKyAqIFIzMiAoMHgyMCkgLSBBTEMgY29udHJvbCAxCisgKi8KKyNkZWZpbmUgV004OTgzX0FMQ1NFTF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDE4MCAgLyogQUxDU0VMIC0gWzg6N10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ1NFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogQUxDU0VMIC0gWzg6N10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ1NFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogQUxDU0VMIC0gWzg6N10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01BWF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAzOCAgLyogQUxDTUFYIC0gWzU6M10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01BWF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogQUxDTUFYIC0gWzU6M10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01BWF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogQUxDTUFYIC0gWzU6M10gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01JTl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAwNyAgLyogQUxDTUlOIC0gWzI6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01JTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogQUxDTUlOIC0gWzI6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ01JTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogQUxDTUlOIC0gWzI6MF0gKi8KKworLyoKKyAqIFIzMyAoMHgyMSkgLSBBTEMgY29udHJvbCAyCisgKi8KKyNkZWZpbmUgV004OTgzX0FMQ0hMRF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDBGMCAgLyogQUxDSExEIC0gWzc6NF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ0hMRF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgLyogQUxDSExEIC0gWzc6NF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ0hMRF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgLyogQUxDSExEIC0gWzc6NF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ0xWTF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAwRiAgLyogQUxDTFZMIC0gWzM6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ0xWTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogQUxDTFZMIC0gWzM6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FMQ0xWTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgLyogQUxDTFZMIC0gWzM6MF0gKi8KKworLyoKKyAqIFIzNCAoMHgyMikgLSBBTEMgY29udHJvbCAzCisgKi8KKyNkZWZpbmUgV004OTgzX0FMQ01PREUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQUxDTU9ERSAqLworI2RlZmluZSBXTTg5ODNfQUxDTU9ERV9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBBTENNT0RFICovCisjZGVmaW5lIFdNODk4M19BTENNT0RFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEFMQ01PREUgKi8KKyNkZWZpbmUgV004OTgzX0FMQ01PREVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQUxDTU9ERSAqLworI2RlZmluZSBXTTg5ODNfQUxDRENZX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMEYwICAvKiBBTENEQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfQUxDRENZX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBBTENEQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfQUxDRENZX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBBTENEQ1kgLSBbNzo0XSAqLworI2RlZmluZSBXTTg5ODNfQUxDQVRLX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDBGICAvKiBBTENBVEsgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfQUxDQVRLX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBBTENBVEsgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfQUxDQVRLX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBBTENBVEsgLSBbMzowXSAqLworCisvKgorICogUjM1ICgweDIzKSAtIE5vaXNlIEdhdGUKKyAqLworI2RlZmluZSBXTTg5ODNfTkdFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBOR0VOICovCisjZGVmaW5lIFdNODk4M19OR0VOX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIE5HRU4gKi8KKyNkZWZpbmUgV004OTgzX05HRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogTkdFTiAqLworI2RlZmluZSBXTTg5ODNfTkdFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBOR0VOICovCisjZGVmaW5lIFdNODk4M19OR1RIX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDcgIC8qIE5HVEggLSBbMjowXSAqLworI2RlZmluZSBXTTg5ODNfTkdUSF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBOR1RIIC0gWzI6MF0gKi8KKyNkZWZpbmUgV004OTgzX05HVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogTkdUSCAtIFsyOjBdICovCisKKy8qCisgKiBSMzYgKDB4MjQpIC0gUExMIE4KKyAqLworI2RlZmluZSBXTTg5ODNfUExMX1BSRVNDQUxFICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBQTExfUFJFU0NBTEUgKi8KKyNkZWZpbmUgV004OTgzX1BMTF9QUkVTQ0FMRV9NQVNLICAgICAgICAgICAgICAgIDB4MDAxMCAgLyogUExMX1BSRVNDQUxFICovCisjZGVmaW5lIFdNODk4M19QTExfUFJFU0NBTEVfU0hJRlQgICAgICAgICAgICAgICAgICAgIDQgIC8qIFBMTF9QUkVTQ0FMRSAqLworI2RlZmluZSBXTTg5ODNfUExMX1BSRVNDQUxFX1dJRFRIICAgICAgICAgICAgICAgICAgICAxICAvKiBQTExfUFJFU0NBTEUgKi8KKyNkZWZpbmUgV004OTgzX1BMTE5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwRiAgLyogUExMTiAtIFszOjBdICovCisjZGVmaW5lIFdNODk4M19QTExOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIFBMTE4gLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfUExMTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBQTExOIC0gWzM6MF0gKi8KKworLyoKKyAqIFIzNyAoMHgyNSkgLSBQTEwgSyAxCisgKi8KKyNkZWZpbmUgV004OTgzX1BMTEtfMjNfMThfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDAzRiAgLyogUExMSygyMzoxOCkgLSBbNTowXSAqLworI2RlZmluZSBXTTg5ODNfUExMS18yM18xOF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAwICAvKiBQTExLKDIzOjE4KSAtIFs1OjBdICovCisjZGVmaW5lIFdNODk4M19QTExLXzIzXzE4X1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIFBMTEsoMjM6MTgpIC0gWzU6MF0gKi8KKworLyoKKyAqIFIzOCAoMHgyNikgLSBQTEwgSyAyCisgKi8KKyNkZWZpbmUgV004OTgzX1BMTEtfMTdfOV9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDFGRiAgLyogUExMSygxNzo5KSAtIFs4OjBdICovCisjZGVmaW5lIFdNODk4M19QTExLXzE3XzlfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIFBMTEsoMTc6OSkgLSBbODowXSAqLworI2RlZmluZSBXTTg5ODNfUExMS18xN185X1dJRFRIICAgICAgICAgICAgICAgICAgICAgICA5ICAvKiBQTExLKDE3OjkpIC0gWzg6MF0gKi8KKworLyoKKyAqIFIzOSAoMHgyNykgLSBQTEwgSyAzCisgKi8KKyNkZWZpbmUgV004OTgzX1BMTEtfOF8wX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDFGRiAgLyogUExMSyg4OjApIC0gWzg6MF0gKi8KKyNkZWZpbmUgV004OTgzX1BMTEtfOF8wX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogUExMSyg4OjApIC0gWzg6MF0gKi8KKyNkZWZpbmUgV004OTgzX1BMTEtfOF8wX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgOSAgLyogUExMSyg4OjApIC0gWzg6MF0gKi8KKworLyoKKyAqIFI0MSAoMHgyOSkgLSAzRCBjb250cm9sCisgKi8KKyNkZWZpbmUgV004OTgzX0RFUFRIM0RfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwRiAgLyogREVQVEgzRCAtIFszOjBdICovCisjZGVmaW5lIFdNODk4M19ERVBUSDNEX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIERFUFRIM0QgLSBbMzowXSAqLworI2RlZmluZSBXTTg5ODNfREVQVEgzRF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBERVBUSDNEIC0gWzM6MF0gKi8KKworLyoKKyAqIFI0MiAoMHgyQSkgLSBPVVQ0IHRvIEFEQworICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJBRENWT0xfTUFTSyAgICAgICAgICAgICAgICAweDAxQzAgIC8qIE9VVDRfMkFEQ1ZPTCAtIFs4OjZdICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJBRENWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgIDYgIC8qIE9VVDRfMkFEQ1ZPTCAtIFs4OjZdICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJBRENWT0xfV0lEVEggICAgICAgICAgICAgICAgICAgIDMgIC8qIE9VVDRfMkFEQ1ZPTCAtIFs4OjZdICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJMTlIgICAgICAgICAgICAgICAgICAgICAgICAweDAwMjAgIC8qIE9VVDRfMkxOUiAqLworI2RlZmluZSBXTTg5ODNfT1VUNF8yTE5SX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBPVVQ0XzJMTlIgKi8KKyNkZWZpbmUgV004OTgzX09VVDRfMkxOUl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogT1VUNF8yTE5SICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJMTlJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDRfMkxOUiAqLworI2RlZmluZSBXTTg5ODNfUE9CQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBQT0JDVFJMICovCisjZGVmaW5lIFdNODk4M19QT0JDVFJMX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIFBPQkNUUkwgKi8KKyNkZWZpbmUgV004OTgzX1BPQkNUUkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLyogUE9CQ1RSTCAqLworI2RlZmluZSBXTTg5ODNfUE9CQ1RSTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBQT0JDVFJMICovCisjZGVmaW5lIFdNODk4M19ERUxFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIERFTEVOICovCisjZGVmaW5lIFdNODk4M19ERUxFTl9NQVNLICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIERFTEVOICovCisjZGVmaW5lIFdNODk4M19ERUxFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERFTEVOICovCisjZGVmaW5lIFdNODk4M19ERUxFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERFTEVOICovCisjZGVmaW5lIFdNODk4M19PVVQxREVMICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIE9VVDFERUwgKi8KKyNkZWZpbmUgV004OTgzX09VVDFERUxfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogT1VUMURFTCAqLworI2RlZmluZSBXTTg5ODNfT1VUMURFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBPVVQxREVMICovCisjZGVmaW5lIFdNODk4M19PVVQxREVMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDFERUwgKi8KKworLyoKKyAqIFI0MyAoMHgyQikgLSBCZWVwIGNvbnRyb2wKKyAqLworI2RlZmluZSBXTTg5ODNfQllQTDJSTUlYICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBCWVBMMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUEwyUk1JWF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQllQTDJSTUlYICovCisjZGVmaW5lIFdNODk4M19CWVBMMlJNSVhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEJZUEwyUk1JWCAqLworI2RlZmluZSBXTTg5ODNfQllQTDJSTUlYX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCWVBMMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUFIyTE1JWCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogQllQUjJMTUlYICovCisjZGVmaW5lIFdNODk4M19CWVBSMkxNSVhfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIEJZUFIyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfQllQUjJMTUlYX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBCWVBSMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUFIyTE1JWF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQllQUjJMTUlYICovCisjZGVmaW5lIFdNODk4M19NVVRFUlBHQTJJTlYgICAgICAgICAgICAgICAgICAgICAweDAwMjAgIC8qIE1VVEVSUEdBMklOViAqLworI2RlZmluZSBXTTg5ODNfTVVURVJQR0EySU5WX01BU0sgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBNVVRFUlBHQTJJTlYgKi8KKyNkZWZpbmUgV004OTgzX01VVEVSUEdBMklOVl9TSElGVCAgICAgICAgICAgICAgICAgICAgNSAgLyogTVVURVJQR0EySU5WICovCisjZGVmaW5lIFdNODk4M19NVVRFUlBHQTJJTlZfV0lEVEggICAgICAgICAgICAgICAgICAgIDEgIC8qIE1VVEVSUEdBMklOViAqLworI2RlZmluZSBXTTg5ODNfSU5WUk9VVDIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBJTlZST1VUMiAqLworI2RlZmluZSBXTTg5ODNfSU5WUk9VVDJfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBJTlZST1VUMiAqLworI2RlZmluZSBXTTg5ODNfSU5WUk9VVDJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBJTlZST1VUMiAqLworI2RlZmluZSBXTTg5ODNfSU5WUk9VVDJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBJTlZST1VUMiAqLworI2RlZmluZSBXTTg5ODNfQkVFUFZPTF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDBFICAvKiBCRUVQVk9MIC0gWzM6MV0gKi8KKyNkZWZpbmUgV004OTgzX0JFRVBWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQkVFUFZPTCAtIFszOjFdICovCisjZGVmaW5lIFdNODk4M19CRUVQVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIEJFRVBWT0wgLSBbMzoxXSAqLworI2RlZmluZSBXTTg5ODNfQkVFUEVOICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBCRUVQRU4gKi8KKyNkZWZpbmUgV004OTgzX0JFRVBFTl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogQkVFUEVOICovCisjZGVmaW5lIFdNODk4M19CRUVQRU5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIEJFRVBFTiAqLworI2RlZmluZSBXTTg5ODNfQkVFUEVOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCRUVQRU4gKi8KKworLyoKKyAqIFI0NCAoMHgyQykgLSBJbnB1dCBjdHJsCisgKi8KKyNkZWZpbmUgV004OTgzX01CVlNFTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTUJWU0VMICovCisjZGVmaW5lIFdNODk4M19NQlZTRUxfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE1CVlNFTCAqLworI2RlZmluZSBXTTg5ODNfTUJWU0VMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBNQlZTRUwgKi8KKyNkZWZpbmUgV004OTgzX01CVlNFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTUJWU0VMICovCisjZGVmaW5lIFdNODk4M19SMl8ySU5QUEdBICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIFIyXzJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX1IyXzJJTlBQR0FfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogUjJfMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfUjJfMklOUFBHQV9TSElGVCAgICAgICAgICAgICAgICAgICAgICA2ICAvKiBSMl8ySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19SMl8ySU5QUEdBX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFIyXzJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX1JJTjJJTlBQR0EgICAgICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogUklOMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfUklOMklOUFBHQV9NQVNLICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBSSU4ySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19SSU4ySU5QUEdBX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIFJJTjJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX1JJTjJJTlBQR0FfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogUklOMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfUklQMklOUFBHQSAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBSSVAySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19SSVAySU5QUEdBX01BU0sgICAgICAgICAgICAgICAgICAweDAwMTAgIC8qIFJJUDJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX1JJUDJJTlBQR0FfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgNCAgLyogUklQMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfUklQMklOUFBHQV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAxICAvKiBSSVAySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19MMl8ySU5QUEdBICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIEwyXzJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX0wyXzJJTlBQR0FfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogTDJfMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfTDJfMklOUFBHQV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAyICAvKiBMMl8ySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19MMl8ySU5QUEdBX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEwyXzJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX0xJTjJJTlBQR0EgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogTElOMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfTElOMklOUFBHQV9NQVNLICAgICAgICAgICAgICAgICAgMHgwMDAyICAvKiBMSU4ySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19MSU4ySU5QUEdBX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIExJTjJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX0xJTjJJTlBQR0FfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogTElOMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfTElQMklOUFBHQSAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBMSVAySU5QUEdBICovCisjZGVmaW5lIFdNODk4M19MSVAySU5QUEdBX01BU0sgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIExJUDJJTlBQR0EgKi8KKyNkZWZpbmUgV004OTgzX0xJUDJJTlBQR0FfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgMCAgLyogTElQMklOUFBHQSAqLworI2RlZmluZSBXTTg5ODNfTElQMklOUFBHQV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMSVAySU5QUEdBICovCisKKy8qCisgKiBSNDUgKDB4MkQpIC0gTGVmdCBJTlAgUEdBIGdhaW4gY3RybAorICovCisjZGVmaW5lIFdNODk4M19JTlBHQVZVICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIElOUEdBVlUgKi8KKyNkZWZpbmUgV004OTgzX0lOUEdBVlVfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSU5QR0FWVSAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FWVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBJTlBHQVZVICovCisjZGVmaW5lIFdNODk4M19JTlBHQVZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIElOUEdBVlUgKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQVpDTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogSU5QUEdBWkNMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FaQ0xfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIElOUFBHQVpDTCAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBWkNMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBJTlBQR0FaQ0wgKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQVpDTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogSU5QUEdBWkNMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FNVVRFTCAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIElOUFBHQU1VVEVMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FNVVRFTF9NQVNLICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIElOUFBHQU1VVEVMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FNVVRFTF9TSElGVCAgICAgICAgICAgICAgICAgICAgIDYgIC8qIElOUFBHQU1VVEVMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FNVVRFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgIDEgIC8qIElOUFBHQU1VVEVMICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FWT0xMX01BU0sgICAgICAgICAgICAgICAgICAweDAwM0YgIC8qIElOUFBHQVZPTEwgLSBbNTowXSAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBVk9MTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAwICAvKiBJTlBQR0FWT0xMIC0gWzU6MF0gKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQVZPTExfV0lEVEggICAgICAgICAgICAgICAgICAgICAgNiAgLyogSU5QUEdBVk9MTCAtIFs1OjBdICovCisKKy8qCisgKiBSNDYgKDB4MkUpIC0gUmlnaHQgSU5QIFBHQSBnYWluIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FWVSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBJTlBHQVZVICovCisjZGVmaW5lIFdNODk4M19JTlBHQVZVX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIElOUEdBVlUgKi8KKyNkZWZpbmUgV004OTgzX0lOUEdBVlVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogSU5QR0FWVSAqLworI2RlZmluZSBXTTg5ODNfSU5QR0FWVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBJTlBHQVZVICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FaQ1IgICAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIElOUFBHQVpDUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBWkNSX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBJTlBQR0FaQ1IgKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQVpDUl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogSU5QUEdBWkNSICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FaQ1JfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIElOUFBHQVpDUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBTVVURVIgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBJTlBQR0FNVVRFUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBTVVURVJfTUFTSyAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBJTlBQR0FNVVRFUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBTVVURVJfU0hJRlQgICAgICAgICAgICAgICAgICAgICA2ICAvKiBJTlBQR0FNVVRFUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBTVVURVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAxICAvKiBJTlBQR0FNVVRFUiAqLworI2RlZmluZSBXTTg5ODNfSU5QUEdBVk9MUl9NQVNLICAgICAgICAgICAgICAgICAgMHgwMDNGICAvKiBJTlBQR0FWT0xSIC0gWzU6MF0gKi8KKyNkZWZpbmUgV004OTgzX0lOUFBHQVZPTFJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgMCAgLyogSU5QUEdBVk9MUiAtIFs1OjBdICovCisjZGVmaW5lIFdNODk4M19JTlBQR0FWT0xSX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIElOUFBHQVZPTFIgLSBbNTowXSAqLworCisvKgorICogUjQ3ICgweDJGKSAtIExlZnQgQURDIEJPT1NUIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfUEdBQk9PU1RMICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBQR0FCT09TVEwgKi8KKyNkZWZpbmUgV004OTgzX1BHQUJPT1NUTF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogUEdBQk9PU1RMICovCisjZGVmaW5lIFdNODk4M19QR0FCT09TVExfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIFBHQUJPT1NUTCAqLworI2RlZmluZSBXTTg5ODNfUEdBQk9PU1RMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBQR0FCT09TVEwgKi8KKyNkZWZpbmUgV004OTgzX0wyXzJCT09TVFZPTF9NQVNLICAgICAgICAgICAgICAgIDB4MDA3MCAgLyogTDJfMkJPT1NUVk9MIC0gWzY6NF0gKi8KKyNkZWZpbmUgV004OTgzX0wyXzJCT09TVFZPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgNCAgLyogTDJfMkJPT1NUVk9MIC0gWzY6NF0gKi8KKyNkZWZpbmUgV004OTgzX0wyXzJCT09TVFZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgMyAgLyogTDJfMkJPT1NUVk9MIC0gWzY6NF0gKi8KKyNkZWZpbmUgV004OTgzX0FVWEwyQk9PU1RWT0xfTUFTSyAgICAgICAgICAgICAgIDB4MDAwNyAgLyogQVVYTDJCT09TVFZPTCAtIFsyOjBdICovCisjZGVmaW5lIFdNODk4M19BVVhMMkJPT1NUVk9MX1NISUZUICAgICAgICAgICAgICAgICAgIDAgIC8qIEFVWEwyQk9PU1RWT0wgLSBbMjowXSAqLworI2RlZmluZSBXTTg5ODNfQVVYTDJCT09TVFZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAzICAvKiBBVVhMMkJPT1NUVk9MIC0gWzI6MF0gKi8KKworLyoKKyAqIFI0OCAoMHgzMCkgLSBSaWdodCBBREMgQk9PU1QgY3RybAorICovCisjZGVmaW5lIFdNODk4M19QR0FCT09TVFIgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIFBHQUJPT1NUUiAqLworI2RlZmluZSBXTTg5ODNfUEdBQk9PU1RSX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBQR0FCT09TVFIgKi8KKyNkZWZpbmUgV004OTgzX1BHQUJPT1NUUl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogUEdBQk9PU1RSICovCisjZGVmaW5lIFdNODk4M19QR0FCT09TVFJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFBHQUJPT1NUUiAqLworI2RlZmluZSBXTTg5ODNfUjJfMkJPT1NUVk9MX01BU0sgICAgICAgICAgICAgICAgMHgwMDcwICAvKiBSMl8yQk9PU1RWT0wgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfUjJfMkJPT1NUVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICA0ICAvKiBSMl8yQk9PU1RWT0wgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfUjJfMkJPT1NUVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAzICAvKiBSMl8yQk9PU1RWT0wgLSBbNjo0XSAqLworI2RlZmluZSBXTTg5ODNfQVVYUjJCT09TVFZPTF9NQVNLICAgICAgICAgICAgICAgMHgwMDA3ICAvKiBBVVhSMkJPT1NUVk9MIC0gWzI6MF0gKi8KKyNkZWZpbmUgV004OTgzX0FVWFIyQk9PU1RWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgMCAgLyogQVVYUjJCT09TVFZPTCAtIFsyOjBdICovCisjZGVmaW5lIFdNODk4M19BVVhSMkJPT1NUVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgIDMgIC8qIEFVWFIyQk9PU1RWT0wgLSBbMjowXSAqLworCisvKgorICogUjQ5ICgweDMxKSAtIE91dHB1dCBjdHJsCisgKi8KKyNkZWZpbmUgV004OTgzX0RBQ0wyUk1JWCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogREFDTDJSTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNMMlJNSVhfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIERBQ0wyUk1JWCAqLworI2RlZmluZSBXTTg5ODNfREFDTDJSTUlYX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA2ICAvKiBEQUNMMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0RBQ0wyUk1JWF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogREFDTDJSTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNSMkxNSVggICAgICAgICAgICAgICAgICAgICAgICAweDAwMjAgIC8qIERBQ1IyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfREFDUjJMTUlYX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBEQUNSMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0RBQ1IyTE1JWF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogREFDUjJMTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNSMkxNSVhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ1IyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfT1VUNEJPT1NUICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwICAvKiBPVVQ0Qk9PU1QgKi8KKyNkZWZpbmUgV004OTgzX09VVDRCT09TVF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAxMCAgLyogT1VUNEJPT1NUICovCisjZGVmaW5lIFdNODk4M19PVVQ0Qk9PU1RfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDQgIC8qIE9VVDRCT09TVCAqLworI2RlZmluZSBXTTg5ODNfT1VUNEJPT1NUX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBPVVQ0Qk9PU1QgKi8KKyNkZWZpbmUgV004OTgzX09VVDNCT09TVCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwOCAgLyogT1VUM0JPT1NUICovCisjZGVmaW5lIFdNODk4M19PVVQzQk9PU1RfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIE9VVDNCT09TVCAqLworI2RlZmluZSBXTTg5ODNfT1VUM0JPT1NUX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAzICAvKiBPVVQzQk9PU1QgKi8KKyNkZWZpbmUgV004OTgzX09VVDNCT09TVF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUM0JPT1NUICovCisjZGVmaW5lIFdNODk4M19TUEtCT09TVCAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIFNQS0JPT1NUICovCisjZGVmaW5lIFdNODk4M19TUEtCT09TVF9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIFNQS0JPT1NUICovCisjZGVmaW5lIFdNODk4M19TUEtCT09TVF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIFNQS0JPT1NUICovCisjZGVmaW5lIFdNODk4M19TUEtCT09TVF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFNQS0JPT1NUICovCisjZGVmaW5lIFdNODk4M19UU0RFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIFRTREVOICovCisjZGVmaW5lIFdNODk4M19UU0RFTl9NQVNLICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIFRTREVOICovCisjZGVmaW5lIFdNODk4M19UU0RFTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFRTREVOICovCisjZGVmaW5lIFdNODk4M19UU0RFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFRTREVOICovCisjZGVmaW5lIFdNODk4M19WUk9JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIFZST0kgKi8KKyNkZWZpbmUgV004OTgzX1ZST0lfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogVlJPSSAqLworI2RlZmluZSBXTTg5ODNfVlJPSV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBWUk9JICovCisjZGVmaW5lIFdNODk4M19WUk9JX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFZST0kgKi8KKworLyoKKyAqIFI1MCAoMHgzMikgLSBMZWZ0IG1peGVyIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfQVVYTE1JWFZPTF9NQVNLICAgICAgICAgICAgICAgICAgMHgwMUMwICAvKiBBVVhMTUlYVk9MIC0gWzg6Nl0gKi8KKyNkZWZpbmUgV004OTgzX0FVWExNSVhWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgNiAgLyogQVVYTE1JWFZPTCAtIFs4OjZdICovCisjZGVmaW5lIFdNODk4M19BVVhMTUlYVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIEFVWExNSVhWT0wgLSBbODo2XSAqLworI2RlZmluZSBXTTg5ODNfQVVYTDJMTUlYICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBBVVhMMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0FVWEwyTE1JWF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogQVVYTDJMTUlYICovCisjZGVmaW5lIFdNODk4M19BVVhMMkxNSVhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEFVWEwyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfQVVYTDJMTUlYX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBVVhMMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUExNSVhWT0xfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDAxQyAgLyogQllQTE1JWFZPTCAtIFs0OjJdICovCisjZGVmaW5lIFdNODk4M19CWVBMTUlYVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEJZUExNSVhWT0wgLSBbNDoyXSAqLworI2RlZmluZSBXTTg5ODNfQllQTE1JWFZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAzICAvKiBCWVBMTUlYVk9MIC0gWzQ6Ml0gKi8KKyNkZWZpbmUgV004OTgzX0JZUEwyTE1JWCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogQllQTDJMTUlYICovCisjZGVmaW5lIFdNODk4M19CWVBMMkxNSVhfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEJZUEwyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfQllQTDJMTUlYX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCWVBMMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUEwyTE1JWF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQllQTDJMTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNMMkxNSVggICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIERBQ0wyTE1JWCAqLworI2RlZmluZSBXTTg5ODNfREFDTDJMTUlYX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBEQUNMMkxNSVggKi8KKyNkZWZpbmUgV004OTgzX0RBQ0wyTE1JWF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogREFDTDJMTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNMMkxNSVhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ0wyTE1JWCAqLworCisvKgorICogUjUxICgweDMzKSAtIFJpZ2h0IG1peGVyIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfQVVYUk1JWFZPTF9NQVNLICAgICAgICAgICAgICAgICAgMHgwMUMwICAvKiBBVVhSTUlYVk9MIC0gWzg6Nl0gKi8KKyNkZWZpbmUgV004OTgzX0FVWFJNSVhWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgNiAgLyogQVVYUk1JWFZPTCAtIFs4OjZdICovCisjZGVmaW5lIFdNODk4M19BVVhSTUlYVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDMgIC8qIEFVWFJNSVhWT0wgLSBbODo2XSAqLworI2RlZmluZSBXTTg5ODNfQVVYUjJSTUlYICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwICAvKiBBVVhSMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0FVWFIyUk1JWF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogQVVYUjJSTUlYICovCisjZGVmaW5lIFdNODk4M19BVVhSMlJNSVhfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDUgIC8qIEFVWFIyUk1JWCAqLworI2RlZmluZSBXTTg5ODNfQVVYUjJSTUlYX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBBVVhSMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUFJNSVhWT0xfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDAxQyAgLyogQllQUk1JWFZPTCAtIFs0OjJdICovCisjZGVmaW5lIFdNODk4M19CWVBSTUlYVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEJZUFJNSVhWT0wgLSBbNDoyXSAqLworI2RlZmluZSBXTTg5ODNfQllQUk1JWFZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAzICAvKiBCWVBSTUlYVk9MIC0gWzQ6Ml0gKi8KKyNkZWZpbmUgV004OTgzX0JZUFIyUk1JWCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogQllQUjJSTUlYICovCisjZGVmaW5lIFdNODk4M19CWVBSMlJNSVhfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEJZUFIyUk1JWCAqLworI2RlZmluZSBXTTg5ODNfQllQUjJSTUlYX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCWVBSMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0JZUFIyUk1JWF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQllQUjJSTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNSMlJNSVggICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIERBQ1IyUk1JWCAqLworI2RlZmluZSBXTTg5ODNfREFDUjJSTUlYX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBEQUNSMlJNSVggKi8KKyNkZWZpbmUgV004OTgzX0RBQ1IyUk1JWF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogREFDUjJSTUlYICovCisjZGVmaW5lIFdNODk4M19EQUNSMlJNSVhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIERBQ1IyUk1JWCAqLworCisvKgorICogUjUyICgweDM0KSAtIExPVVQxIChIUCkgdm9sdW1lIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfT1VUMVZVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBPVVQxVlUgKi8KKyNkZWZpbmUgV004OTgzX09VVDFWVV9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogT1VUMVZVICovCisjZGVmaW5lIFdNODk4M19PVVQxVlVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIE9VVDFWVSAqLworI2RlZmluZSBXTTg5ODNfT1VUMVZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBPVVQxVlUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxWkMgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogTE9VVDFaQyAqLworI2RlZmluZSBXTTg5ODNfTE9VVDFaQ19NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBMT1VUMVpDICovCisjZGVmaW5lIFdNODk4M19MT1VUMVpDX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIExPVVQxWkMgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxWkNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTE9VVDFaQyAqLworI2RlZmluZSBXTTg5ODNfTE9VVDFNVVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBMT1VUMU1VVEUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxTVVURV9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogTE9VVDFNVVRFICovCisjZGVmaW5lIFdNODk4M19MT1VUMU1VVEVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIExPVVQxTVVURSAqLworI2RlZmluZSBXTTg5ODNfTE9VVDFNVVRFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMT1VUMU1VVEUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQxVk9MX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDAzRiAgLyogTE9VVDFWT0wgLSBbNTowXSAqLworI2RlZmluZSBXTTg5ODNfTE9VVDFWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBMT1VUMVZPTCAtIFs1OjBdICovCisjZGVmaW5lIFdNODk4M19MT1VUMVZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIExPVVQxVk9MIC0gWzU6MF0gKi8KKworLyoKKyAqIFI1MyAoMHgzNSkgLSBST1VUMSAoSFApIHZvbHVtZSBjdHJsCisgKi8KKyNkZWZpbmUgV004OTgzX09VVDFWVSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogT1VUMVZVICovCisjZGVmaW5lIFdNODk4M19PVVQxVlVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE9VVDFWVSAqLworI2RlZmluZSBXTTg5ODNfT1VUMVZVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBPVVQxVlUgKi8KKyNkZWZpbmUgV004OTgzX09VVDFWVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUMVZVICovCisjZGVmaW5lIFdNODk4M19ST1VUMVpDICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIFJPVVQxWkMgKi8KKyNkZWZpbmUgV004OTgzX1JPVVQxWkNfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogUk9VVDFaQyAqLworI2RlZmluZSBXTTg5ODNfUk9VVDFaQ19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBST1VUMVpDICovCisjZGVmaW5lIFdNODk4M19ST1VUMVpDX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFJPVVQxWkMgKi8KKyNkZWZpbmUgV004OTgzX1JPVVQxTVVURSAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogUk9VVDFNVVRFICovCisjZGVmaW5lIFdNODk4M19ST1VUMU1VVEVfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIFJPVVQxTVVURSAqLworI2RlZmluZSBXTTg5ODNfUk9VVDFNVVRFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA2ICAvKiBST1VUMU1VVEUgKi8KKyNkZWZpbmUgV004OTgzX1JPVVQxTVVURV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogUk9VVDFNVVRFICovCisjZGVmaW5lIFdNODk4M19ST1VUMVZPTF9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwM0YgIC8qIFJPVVQxVk9MIC0gWzU6MF0gKi8KKyNkZWZpbmUgV004OTgzX1JPVVQxVk9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogUk9VVDFWT0wgLSBbNTowXSAqLworI2RlZmluZSBXTTg5ODNfUk9VVDFWT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICA2ICAvKiBST1VUMVZPTCAtIFs1OjBdICovCisKKy8qCisgKiBSNTQgKDB4MzYpIC0gTE9VVDIgKFNQSykgdm9sdW1lIGN0cmwKKyAqLworI2RlZmluZSBXTTg5ODNfT1VUMlZVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBPVVQyVlUgKi8KKyNkZWZpbmUgV004OTgzX09VVDJWVV9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogT1VUMlZVICovCisjZGVmaW5lIFdNODk4M19PVVQyVlVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIE9VVDJWVSAqLworI2RlZmluZSBXTTg5ODNfT1VUMlZVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBPVVQyVlUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQyWkMgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogTE9VVDJaQyAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJaQ19NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBMT1VUMlpDICovCisjZGVmaW5lIFdNODk4M19MT1VUMlpDX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIExPVVQyWkMgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQyWkNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTE9VVDJaQyAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJNVVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBMT1VUMk1VVEUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQyTVVURV9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogTE9VVDJNVVRFICovCisjZGVmaW5lIFdNODk4M19MT1VUMk1VVEVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIExPVVQyTVVURSAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJNVVRFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMT1VUMk1VVEUgKi8KKyNkZWZpbmUgV004OTgzX0xPVVQyVk9MX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDAzRiAgLyogTE9VVDJWT0wgLSBbNTowXSAqLworI2RlZmluZSBXTTg5ODNfTE9VVDJWT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBMT1VUMlZPTCAtIFs1OjBdICovCisjZGVmaW5lIFdNODk4M19MT1VUMlZPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIExPVVQyVk9MIC0gWzU6MF0gKi8KKworLyoKKyAqIFI1NSAoMHgzNykgLSBST1VUMiAoU1BLKSB2b2x1bWUgY3RybAorICovCisjZGVmaW5lIFdNODk4M19PVVQyVlUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIE9VVDJWVSAqLworI2RlZmluZSBXTTg5ODNfT1VUMlZVX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBPVVQyVlUgKi8KKyNkZWZpbmUgV004OTgzX09VVDJWVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogT1VUMlZVICovCisjZGVmaW5lIFdNODk4M19PVVQyVlVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDJWVSAqLworI2RlZmluZSBXTTg5ODNfUk9VVDJaQyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBST1VUMlpDICovCisjZGVmaW5lIFdNODk4M19ST1VUMlpDX01BU0sgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIFJPVVQyWkMgKi8KKyNkZWZpbmUgV004OTgzX1JPVVQyWkNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogUk9VVDJaQyAqLworI2RlZmluZSBXTTg5ODNfUk9VVDJaQ19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBST1VUMlpDICovCisjZGVmaW5lIFdNODk4M19ST1VUMk1VVEUgICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIFJPVVQyTVVURSAqLworI2RlZmluZSBXTTg5ODNfUk9VVDJNVVRFX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBST1VUMk1VVEUgKi8KKyNkZWZpbmUgV004OTgzX1JPVVQyTVVURV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogUk9VVDJNVVRFICovCisjZGVmaW5lIFdNODk4M19ST1VUMk1VVEVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFJPVVQyTVVURSAqLworI2RlZmluZSBXTTg5ODNfUk9VVDJWT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgMHgwMDNGICAvKiBST1VUMlZPTCAtIFs1OjBdICovCisjZGVmaW5lIFdNODk4M19ST1VUMlZPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIFJPVVQyVk9MIC0gWzU6MF0gKi8KKyNkZWZpbmUgV004OTgzX1JPVVQyVk9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogUk9VVDJWT0wgLSBbNTowXSAqLworCisvKgorICogUjU2ICgweDM4KSAtIE9VVDMgbWl4ZXIgY3RybAorICovCisjZGVmaW5lIFdNODk4M19PVVQzTVVURSAgICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIE9VVDNNVVRFICovCisjZGVmaW5lIFdNODk4M19PVVQzTVVURV9NQVNLICAgICAgICAgICAgICAgICAgICAweDAwNDAgIC8qIE9VVDNNVVRFICovCisjZGVmaW5lIFdNODk4M19PVVQzTVVURV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDYgIC8qIE9VVDNNVVRFICovCisjZGVmaW5lIFdNODk4M19PVVQzTVVURV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDNNVVRFICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJPVVQzICAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIE9VVDRfMk9VVDMgKi8KKyNkZWZpbmUgV004OTgzX09VVDRfMk9VVDNfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDAwOCAgLyogT1VUNF8yT1VUMyAqLworI2RlZmluZSBXTTg5ODNfT1VUNF8yT1VUM19TSElGVCAgICAgICAgICAgICAgICAgICAgICAzICAvKiBPVVQ0XzJPVVQzICovCisjZGVmaW5lIFdNODk4M19PVVQ0XzJPVVQzX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDRfMk9VVDMgKi8KKyNkZWZpbmUgV004OTgzX0JZUEwyT1VUMyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogQllQTDJPVVQzICovCisjZGVmaW5lIFdNODk4M19CWVBMMk9VVDNfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDQgIC8qIEJZUEwyT1VUMyAqLworI2RlZmluZSBXTTg5ODNfQllQTDJPVVQzX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBCWVBMMk9VVDMgKi8KKyNkZWZpbmUgV004OTgzX0JZUEwyT1VUM19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQllQTDJPVVQzICovCisjZGVmaW5lIFdNODk4M19MTUlYMk9VVDMgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIExNSVgyT1VUMyAqLworI2RlZmluZSBXTTg5ODNfTE1JWDJPVVQzX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDAyICAvKiBMTUlYMk9VVDMgKi8KKyNkZWZpbmUgV004OTgzX0xNSVgyT1VUM19TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTE1JWDJPVVQzICovCisjZGVmaW5lIFdNODk4M19MTUlYMk9VVDNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIExNSVgyT1VUMyAqLworI2RlZmluZSBXTTg5ODNfTERBQzJPVVQzICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBMREFDMk9VVDMgKi8KKyNkZWZpbmUgV004OTgzX0xEQUMyT1VUM19NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAwMSAgLyogTERBQzJPVVQzICovCisjZGVmaW5lIFdNODk4M19MREFDMk9VVDNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIExEQUMyT1VUMyAqLworI2RlZmluZSBXTTg5ODNfTERBQzJPVVQzX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBMREFDMk9VVDMgKi8KKworLyoKKyAqIFI1NyAoMHgzOSkgLSBPVVQ0IChNT05PKSBtaXggY3RybAorICovCisjZGVmaW5lIFdNODk4M19PVVQzXzJPVVQ0ICAgICAgICAgICAgICAgICAgICAgICAweDAwODAgIC8qIE9VVDNfMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX09VVDNfMk9VVDRfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogT1VUM18yT1VUNCAqLworI2RlZmluZSBXTTg5ODNfT1VUM18yT1VUNF9TSElGVCAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBPVVQzXzJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19PVVQzXzJPVVQ0X1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIE9VVDNfMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX09VVDRNVVRFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogT1VUNE1VVEUgKi8KKyNkZWZpbmUgV004OTgzX09VVDRNVVRFX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDA0MCAgLyogT1VUNE1VVEUgKi8KKyNkZWZpbmUgV004OTgzX09VVDRNVVRFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgNiAgLyogT1VUNE1VVEUgKi8KKyNkZWZpbmUgV004OTgzX09VVDRNVVRFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUNE1VVEUgKi8KKyNkZWZpbmUgV004OTgzX09VVDRBVFROICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogT1VUNEFUVE4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRBVFROX01BU0sgICAgICAgICAgICAgICAgICAgIDB4MDAyMCAgLyogT1VUNEFUVE4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRBVFROX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgNSAgLyogT1VUNEFUVE4gKi8KKyNkZWZpbmUgV004OTgzX09VVDRBVFROX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogT1VUNEFUVE4gKi8KKyNkZWZpbmUgV004OTgzX0xNSVgyT1VUNCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxMCAgLyogTE1JWDJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19MTUlYMk9VVDRfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMTAgIC8qIExNSVgyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfTE1JWDJPVVQ0X1NISUZUICAgICAgICAgICAgICAgICAgICAgICA0ICAvKiBMTUlYMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX0xNSVgyT1VUNF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogTE1JWDJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19MREFDMk9VVDQgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDggIC8qIExEQUMyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfTERBQzJPVVQ0X01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDA4ICAvKiBMREFDMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX0xEQUMyT1VUNF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogTERBQzJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19MREFDMk9VVDRfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIExEQUMyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfQllQUjJPVVQ0ICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0ICAvKiBCWVBSMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX0JZUFIyT1VUNF9NQVNLICAgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogQllQUjJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19CWVBSMk9VVDRfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEJZUFIyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfQllQUjJPVVQ0X1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBCWVBSMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX1JNSVgyT1VUNCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMiAgLyogUk1JWDJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19STUlYMk9VVDRfTUFTSyAgICAgICAgICAgICAgICAgICAweDAwMDIgIC8qIFJNSVgyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfUk1JWDJPVVQ0X1NISUZUICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBSTUlYMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX1JNSVgyT1VUNF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogUk1JWDJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19SREFDMk9VVDQgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEgIC8qIFJEQUMyT1VUNCAqLworI2RlZmluZSBXTTg5ODNfUkRBQzJPVVQ0X01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDAxICAvKiBSREFDMk9VVDQgKi8KKyNkZWZpbmUgV004OTgzX1JEQUMyT1VUNF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogUkRBQzJPVVQ0ICovCisjZGVmaW5lIFdNODk4M19SREFDMk9VVDRfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIFJEQUMyT1VUNCAqLworCisvKgorICogUjYxICgweDNEKSAtIEJJQVMgQ1RSTAorICovCisjZGVmaW5lIFdNODk4M19CSUFTQ1VUICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEJJQVNDVVQgKi8KKyNkZWZpbmUgV004OTgzX0JJQVNDVVRfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogQklBU0NVVCAqLworI2RlZmluZSBXTTg5ODNfQklBU0NVVF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBCSUFTQ1VUICovCisjZGVmaW5lIFdNODk4M19CSUFTQ1VUX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEJJQVNDVVQgKi8KKyNkZWZpbmUgV004OTgzX0hBTEZJUEJJQVMgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MCAgLyogSEFMRklQQklBUyAqLworI2RlZmluZSBXTTg5ODNfSEFMRklQQklBU19NQVNLICAgICAgICAgICAgICAgICAgMHgwMDgwICAvKiBIQUxGSVBCSUFTICovCisjZGVmaW5lIFdNODk4M19IQUxGSVBCSUFTX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIEhBTEZJUEJJQVMgKi8KKyNkZWZpbmUgV004OTgzX0hBTEZJUEJJQVNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogSEFMRklQQklBUyAqLworI2RlZmluZSBXTTg5ODNfVkJCSUFTVFNUX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDYwICAvKiBWQkJJQVNUU1QgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfVkJCSUFTVFNUX1NISUZUICAgICAgICAgICAgICAgICAgICAgICA1ICAvKiBWQkJJQVNUU1QgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfVkJCSUFTVFNUX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAyICAvKiBWQkJJQVNUU1QgLSBbNjo1XSAqLworI2RlZmluZSBXTTg5ODNfQlVGQklBU19NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDE4ICAvKiBCVUZCSUFTIC0gWzQ6M10gKi8KKyNkZWZpbmUgV004OTgzX0JVRkJJQVNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMyAgLyogQlVGQklBUyAtIFs0OjNdICovCisjZGVmaW5lIFdNODk4M19CVUZCSUFTX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8qIEJVRkJJQVMgLSBbNDozXSAqLworI2RlZmluZSBXTTg5ODNfQURDQklBU19NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwMDA2ICAvKiBBRENCSUFTIC0gWzI6MV0gKi8KKyNkZWZpbmUgV004OTgzX0FEQ0JJQVNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogQURDQklBUyAtIFsyOjFdICovCisjZGVmaW5lIFdNODk4M19BRENCSUFTX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAg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