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hlIFBDSWUKKwkJc3BlY2lmaWNhdGlvbi4KKworCiAKIE1hc3RlciBjb250ZXh0cyAoZWcuIC9zeXMvY2xhc3MvY3hsL2FmdTAuMG0pCiAKQEAgLTEwNiw3ICsxNDgsNyBAQAogRGVzY3JpcHRpb246ICAgIHJlYWQgb25seQogICAgICAgICAgICAgICAgIElkZW50aWZpZXMgdGhlIENBSUEgVmVyc2lvbiB0aGUgY2FyZCBpbXBsZW1lbnRzLgogCi1XaGF0OiAgICAgICAgICAgL3N5cy9jbGFzcy9jeGwvPGNhcmQ+L3BzbF92ZXJzaW9uCitXaGF0OiAgICAgICAgICAgL3N5cy9jbGFzcy9jeGwvPGNhcmQ+L3BzbF9yZXZpc2lvbgogRGF0ZTogICAgICAgICAgIFNlcHRlbWJlciAyMDE0CiBDb250YWN0OiAgICAgICAgbGludXhwcGMtZGV2QGxpc3RzLm96bGFicy5vcmcKIERlc2NyaXB0aW9uOiAgICByZWFkIG9ubHkKQEAgLTEyNywzICsxNjksMjQgQEAKIERlc2NyaXB0aW9uOiAgICByZWFkIG9ubHkKICAgICAgICAgICAgICAgICBXaWxsIHJldHVybiAidXNlciIgb3IgImZhY3RvcnkiIGRlcGVuZGluZyBvbiB0aGUgaW1hZ2UgbG9hZGVkCiAgICAgICAgICAgICAgICAgb250byB0aGUgY2FyZC4KKworV2hhdDogICAgICAgICAgIC9zeXMvY2xhc3MvY3hsLzxjYXJkPi9sb2FkX2ltYWdlX29uX3BlcnN0CitEYXRlOiAgICAgICAgICAgRGVjZW1iZXIgMjAxNAorQ29udGFjdDogICAgICAgIGxpbnV4cHBjLWRldkBsaXN0cy5vemxhYnMub3JnCitEZXNjcmlwdGlvbjogICAgcmVhZC93cml0ZQorICAgICAgICAgICAgICAgIFZhbGlkIGVudHJpZXMgYXJlICJub25lIiwgInVzZXIiLCBhbmQgImZhY3RvcnkiLgorICAgICAgICAgICAgICAgICJub25lIiBtZWFucyBQRVJTVCB3aWxsIG5vdCBjYXVzZSBpbWFn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ltZW91dHMgYXJlIHN1cHBvcnRlZCBhbmQgdGhhdAotCQlzb21lIHN5c3RlbXMgbWlnaHQgZmFsbCBiYWNrIHRvIGEgc3BlY2lmaWMgdGltZW91dCBpbiBjYXNlCi0JCWFuIGludmFsaWQgdGltZW91dCBpcyB3cml0dGVuIHRvIHRoaXMgZmlsZS4KZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vQ2hhbmdlcyBiL0RvY3VtZW50YXRpb24vQ2hhbmdlcwppbmRleCA3NGJkZGE5Li42NDZjZGFhIDEwMDY0NAotLS0gYS9Eb2N1bWVudGF0aW9uL0NoYW5nZXMKKysrIGIvRG9jdW1lbnRhdGlvbi9DaGFuZ2VzCkBAIC0yMSw4ICsyMSw4IEBACiBzeXN0ZW1zOyBvYnZpb3VzbHksIGlmIHlvdSBkb24ndCBoYXZlIGFueSBJU0ROIGhhcmR3YXJlLCBmb3IgZXhhbXBsZSwKIHlvdSBwcm9iYWJseSBuZWVkbid0IGNvbmNlcm4geW91cnNlbGYgd2l0aCBpc2RuNGstdXRpbHMuCiAKLW8gIEdudSBDICAgICAgICAgICAgICAgICAgMy4yICAgICAgICAgICAgICAgICAgICAgIyBnY2MgLS12ZXJzaW9uCi1vICBHbnUgbWFrZSAgICAgICAgICAgICAgIDMuODAgICAgICAgICAgICAgICAgICAgICMgbWFrZSAtLXZlcnNpb24KK28gIEdOVSBDICAgICAgICAgICAgICAgICAgMy4yICAgICAgICAgICAgICAgICAgICAgIyBnY2MgLS12ZXJzaW9uCitvICBHTlUgbWFrZSAgICAgICAgICAgICAgIDMuODAgICAgICAgICAgICAgICAgICAgICMgbWFrZSAtLXZlcnNpb24KIG8gIGJpbnV0aWxzICAgICAgICAgICAgICAgMi4xMiAgICAgICAgICAgICAgICAgICAgIyBsZCAtdgogbyAgdXRpbC1saW51eCAgICAgICAgICAgICAyLjEwbyAgICAgICAgICAgICAgICAgICAjIGZkZm9ybWF0IC0tdmVyc2lvbgogbyAgbW9kdWxlLWluaX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ZWQgcmVhZC0KKyAgICAgICAgICAgICAgICAgICAgICAgb25seSAoaS5lLiwgLW8gcm8sZGlzYWJsZV9yb2xsX2ZvcndhcmQpCiBkaXNjYXJkICAgICAgICAgICAgICAgIElzc3VlIGRpc2NhcmQvVFJJTSBjb21tYW5kcyB3aGVuIGEgc2VnbWVudCBpcyBjbGVhbmVkLgogbm9faGVhcCAgICAgICAgICAgICAgICBEaXNhYmxlIGhlYXAtc3R5bGUgc2VnbWVudCBhbGxvY2F0aW9uIHdoaWNoIGZpbmRzIGZyZWUKICAgICAgICAgICAgICAgICAgICAgICAgc2VnbWVudHMgZm9yIGRhdGEgZnJvbSB0aGUgYmVnaW5uaW5nIG9mIG1haW4gYXJlYSwgd2hpbGUKQEAgLTE5Nyw2ICsxOTksMTAgQEAKIAkJCSAgICAgIGNoZWNrcG9pbnQgaXMgdHJpZ2dlcmVkLCBhbmQgaXNzdWVkIGR1cmluZyB0aGUKIAkJCSAgICAgIGNoZWNrcG9pbnQuIEJ5IGRlZmF1bHQsIGl0IGlzIGRpc2FibGVkIHdpdGggMC4KIAorIHRyaW1fc2VjdGlvbnMgICAgICAgICAgICAgICAgVGhpcyBwYXJhbWV0ZXIgY29udHJvbHMgdGhlIG51bWJlciBvZiBzZWN0aW9ucworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gYmUgdHJpbW1lZCBvdXQgaW4gYmF0Y2ggbW9kZSB3aGVuIEZJVFJJTQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZHVjdHMuIDMyIHNlY3Rpb25zIGlzIHNldCBieSBkZWZhdWx0LgorCiAgaXB1X3BvbGljeSAgICAgICAgICAgICAgICAgICBUaGlzIHBhcmFtZXRlciBjb250cm9scyB0aGUgcG9saWN5IG9mIGluLXBsYWNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVzIGluIGYyZnMuIFRoZXJlIGFyZSBmaXZlIHBvbGljaWVzOgogICAgICAgICAgICAgICAgICAgIC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E5GUyBmZWF0dXJlcyBpbXBsZW1lbnRlZCBvdXQgb2YgdHJlZS4KLQlQTlMJcE5GUyBmZWF0dXJlcyB0aGF0IGFyZSBub3Qgc3VwcG9ydGVkIHlldCAob3V0IG9mIHRyZWUpLgorCU5TKglVbmltcGxlbWVudGVkIG9wdGlvbmFsIGZlYXR1cmUuCiAKIE9wZXJhdGlvbnMKIApAQCAtNzAsMTMgKzYzLDEzIEBACiBJICB8IEVYQ0hBTkdFX0lEICAgICAgICAgIHwgUkVRICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguMzUgIHwKIEkgIHwgRlJFRV9TVEFURUlEICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4zOCAgfAogICAgfCBHRVRBVFRSICAgICAgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjcgICB8Ci1QICB8IEdFVERFVklDRUlORk8gICAgICAgIHwgT1BUICAgICAgICB8IHBORlMgKFJFUSkgICB8IFNlY3Rpb24gMTguNDAgIHwKLVAgIHwgR0VUREVWSUNFTElTVCAgICAgICAgfCBPUFQgICAgICAgIHwgcE5GUyAoT1BUKSAgIHwgU2VjdGlvbiAxOC40MSAgfAorSSAgfCBHRVRERVZJQ0VJTkZPICAgICAgICB8IE9QVCAgICAgICAgfCBwTkZTIChSRVEpICAgfCBTZWN0aW9uIDE4LjQwICB8CitOUyp8IEdFVERFVklDRUxJU1QgICAgICAgIHwgT1BUICAgICAgICB8IHBORlMgKE9QVCkgICB8IFNlY3Rpb24gMTguNDEgIHwKICAgIHwgR0VURkggICAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC44ICAgfAogTlMqfCBHRVRfRElSX0RFTEVHQVRJT04gICB8IE9QVCAgICAgICAgfCBEREVMRyAoUkVRKSAgfCBTZWN0aW9uIDE4LjM5ICB8Ci1QICB8IExBWU9VVENPTU1JVCAgICAgICAgIHwgT1BUICAgICAgICB8IHBORlMgKFJFUSkgICB8IFNlY3Rpb24gMTguNDIgIHwKLVAgIHwgTEFZT1VUR0VUICAgICAgICAgICAgfCBPUFQgICAgICAgIHwgcE5GUyAoUkVRKSAgIHwgU2VjdGlvbiAxOC40MyAgfAotUCAgfCBMQVlPVVRSRVRVUk4gICAgICAgICB8IE9QVCAgICAgICAgfCBwTkZTIChSRVEpICAgfCBTZWN0aW9uIDE4LjQ0ICB8CitJICB8IExBWU9VVENPTU1JVCAgICAgICAgIHwgT1BUICAgICAgICB8IHBORlMgKFJFUSkgICB8IFNlY3Rpb24gMTguNDIgIHwKK0kgIHwgTEFZT1VUR0VUICAgICAgICAgICAgfCBPUFQgICAgICAgIHwgcE5GUyAoUkVRKSAgIHwgU2VjdGlvbiAxOC40MyAgfAorSSAgfCBMQVlPVVRSRVRVUk4gICAgICAgICB8IE9QVCAgICAgICAgfCBwTkZTIChSRVEpICAgfCBTZWN0aW9uIDE4LjQ0ICB8CiAgICB8IExJTksgICAgICAgICAgICAgICAgIHwgT1BUICAgICAgICB8ICAgICAgICAgICAgICB8IFNlY3Rpb24gMTguOSAgIHwKICAgIHwgTE9DSyAgICAgICAgICAgICAgICAgfCBSRVEgICAgICAgIHwgICAgICAgICAgICAgIHwgU2VjdGlvbiAxOC4xMCAgfAogICAgfCBMT0NLVCAgICAgICAgICAgICAgICB8IFJFUSAgICAgICAgfCAgICAgICAgICAgICAgfCBTZWN0aW9uIDE4LjExICB8CkBAIC0xMjIsOSArMTE1LDkgQEAKICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgfCBNTkkgICAgICAgfCBvciBPUFQpICAgICB8ICAgICAgICAgICAgICAgfAogICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0rCiAgICB8IENCX0dFVEFUVFIgICAgICAgICAgICAgI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mgiLgorICBkZXNjcmliZWQgaW4gdGhlIExpbnV4IGhlYWRlciBmaWxlICJpbmNsdWRlL3VhcGkvbGludXgvY2FuL2Vycm9yLmgiLgogCiA0LiBIb3cgdG8gdXNlIFNvY2tldENBTgogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL25ldHdvcmtpbmcvZmlsdGVyLnR4dCBiL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0CmluZGV4IDU4ZDA4ZjguLjk5MzBlY2ZiIDEwMDY0NAotLS0gYS9Eb2N1bWVudGF0aW9uL25ldHdvcmtpbmcvZmlsdGVyLnR4dAorKysgYi9Eb2N1bWVudGF0aW9uL25ldHdvcmtpbmcvZmlsdGVyLnR4dApAQCAtMjc5LDggKzI3OSw4IEBACiAgIGhhdHlwZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLT5kZXYtPnR5cGUKICAgcnhoYXNoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmhhc2gKICAgY3B1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdfc21wX3Byb2Nlc3Nvcl9pZCgpCi0gIHZsYW5fdGNpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmxhbl90eF90YWdfZ2V0KHNrYikKLSAgdmxhbl9wciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2bGFuX3R4X3RhZ19wcmVzZW50KHNrYikKKyAgdmxhbl90Y2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2Jfdmxhbl90YWdfZ2V0KHNrYikKKyAgdmxhbl9wciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2Jfdmxhbl90YWdfcHJlc2VudChza2IpCiAgIHJhbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJhbmRvbV91MzIoKQogCiBUaGVzZSBleHRlbnNpb25zIGNhbiBhbHNv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b24gei9BcmNoaXRlY3R1cmUgY3VycmVudGx5IGJldHdlZW4gMHhjMDAgYW5kCisweDEwMDAsIHRvbywgd2hpY2ggaXMgdXNlZCBieSBMaW51eCkuCiBUaGUgY2xvc2VzdCB0aGluZyB0byB0aGlzIG9uIHRyYWRpdGlvbmFsIGFyY2hpdGVjdHVyZXMgaXMgdGhlIGludGVycnVwdAogdmVjdG9yIHRhYmxlLiBUaGlzIGlzIGEgZ29vZCB0aGluZyAmIGRvZXMgc2ltcGxpZnkgc29tZSBvZiB0aGUga2VybmVsIGNvZGluZwogaG93ZXZlciBpdCBtZWFucyB0aGF0IHdlIG5vdyBjYW5ub3QgY2F0Y2ggc3RyYXkgTlVMTCBwb2ludGVycyBpbiB0aGUKQEAgLTE5MiwyNiArMTk2LDI2IEBACiAKIFRoZSB0cmFkaXRpb25hbCBJbnRlbCBMaW51eCBpcyBhcHByb3hpbWF0ZWx5IG1hcHBlZCBhcyBmb2xsb3dzIGZvcmdpdmUKIHRoZSBhc2NpaSBhcnQuCi0weEZGRkZGRkZGIDRHQiBIaW1lbSAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICAgICAgICAgICAgICAqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogS2VybmVsIFNwYWNlICAqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICAgICAgICAgICAgICAqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqICAgICAgICAgICoqKioqKioqKioqKioqKioKLVVzZXIgU3BhY2UgSGltZW0gKHR5cGljYWxseSAweEMwMDAwMDAwIDNHQiApKiAgVXNlciBTdGFjayAgICogICAgICAgICAgKiAgICAgICAgICAgICAgKgotCQkJCSAgICAgICAgICAgICoqKioqKioqKioqKioqKioqICAgICAgICAgICogICAgICAgICAgICAgICoKLQkJCQkJICAgICogIFNoYXJlZCBMaWJzICAqICAgICAgICAgICogTmV4dCBQcm9jZXNzICogICAgICAgICAgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqICAgICAgICAgICogICAgIHRvICAgICAgICogIAotCQkJCQkgICAgKiAgICAgICAgICAgICAgICogICAgPD09ICAgKiAgICAgUnVuICAgICAgKiAgPD09Ci0JCQkJCSAgICAqICBVc2VyIFByb2dyYW0gKiAgICAgICAgICAqICAgICAgICAgICAgICAqCi0JCQkJCSAgICAqICAgRGF0YSBCU1MgICAgKiAgICAgICAgICAqICAgICAgICAgICAgICAqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoJIFRleHQgICAgICAgKiAgICAgICAgICAqICAgICAgICAgICAgICAqCi0gICAgICAgICAJCQkgICAgICAgICAgICAqICAgU2VjdGlvbnMgICAgKiAgICAgICAgICAqICAgICAgICAgICAgICAqCi0weDAwMDAwMDAwICAgICAgICAgCQkJICAgICoqKioqKioqKioqKioqKioqICAgICAgICAgICoqKioqKioqKioqKioqKioKKzB4RkZGRkZGRkYgNEdCIEhpbWVtCQkqKioqKioqKioqKioqKioqKgorCQkJCSoJCSoKKwkJCQkqIEtlcm5lbCBTcGFjZQkqCisJCQkJKgkJKgorCQkJCSoqKioqKioqKioqKioqKioqCSAgKioqKioqKioqKioqKioqKgorVXNlciBTcGFjZSBIaW1lbQkJKiAgVXNlciBTdGFjawkqCSAgKgkJICoKKyh0eXBpY2FsbHkgMHhDMDAwMDAwMCAzR0IgKQkqKioqKioqKioqKioqKioqKgkgICoJCSAqCisJCQkJKiAgU2hhcmVkIExpYnMJKgkgICogTmV4dCBQcm9jZXNzICoKKwkJCQkqKioqKioqKioqKioqKioqKgkgICoJdG8JICoKKwkJCQkqCQkqICAgPD09ICAgKglSdW4JICogIDw9PQorCQkJCSogIFVzZXIgUHJvZ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WNlIHlvdSBhcmUgbG9va2luZyBhdAogY291bGQgYmUgZnJvbSBhbnkgcHJvY2VzcyBpbiB0aGUgcnVuIHF1ZXVlLgpAQCAtMjQ3LDggKzI1MSw4IEBACiBIaW1lbSAweDdmZmZmZmZmIDJHQiBvbiBzLzM5MCAgICAqKioqKioqKioqKioqKioqKiAgICAgICAgICAqKioqKioqKioqKioqKioqCiBjdXJyZW50bHkgMHgzZmZmZmZmZmZmZiAoMl40MiktMSAqICBVc2VyIFN0YWNrICAgKiAgICAgICAgICAqICAgICAgICAgICAgICAqCiBvbiB6L0FyY2hpdGVjdHVyZS4JCSAqKioqKioqKioqKioqKioqKiAgICAgICAgICAqICAgICAgICAgICAgICAqCi0JCSAgICAgICAgICAgICAgICAgKiAgU2hhcmVkIExpYnMgICogICAgICAgICAgKiAgICAgICAgICAgICAgKiAgICAgIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKiogICAgICAgICAgKiAgICAgICAgICAgICAgKiAgCisJCQkJICogIFNoYXJlZCBMaWJzICAqCSAgICAqCQkgICAqCisJCQkJICoqKioqKioqKioqKioqKioqCSAgICAqCQkgICAqCiAJCQkgICAgICAgICAqICAgICAgICAgICAgICAgKiAgICAgICAgICAqICAgIEtlcm5lbCAgICAqICAKIAkJICAgICAgICAgICAgICAgICAqICBVc2VyIFByb2dyYW0gKiAgICAgICAgICAqICAgICAgICAgICAgICAqCiAJCSAgICAgICAgICAgICAgICAgKiAgIERhdGEgQlNTICAgICogICAgICAgICAgKiAgICAgICAgICAgICAgKgpAQCAtMzAxLDEwICszMDUsMTAgQEAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAogQSB2aXJ0dWFsIGFkZHJlc3Mgb24gcy8zOTAgaXMgbWFkZSB1cCBvZiAzIHBhcnRzCi1UaGUgU1ggKCBzZWdtZW50IGluZGV4LCByb3VnaGx5IGNvcnJlc3BvbmRpbmcgdG8gdGhlIFBHR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KyAyNDowICAgIE1JREkgR2FkZ2V0ICAgICAgICAgICAgICAgICAgICAgIE1JREkgR2FkZ2V0IE1JREkgMQorJCBhcmVjb3JkbWlkaSAtcCAyNDowIGZyb21fZ2FkZ2V0Lm1pZAorCitnYWRnZXQpCisKKyQgYXBsYXltaWRpIC1sCisgUG9ydCAgICBDbGllbnQgbmFtZSAgICAgICAgICAgICAgICAgICAgICBQb3J0IG5hbWUKKyAyMDowICAgIGZfbWlkaSAgICAgICAgICAgICAgICAgICAgICAgICAgIGZfbWlkaQorCiskIGFwbGF5bWlkaSAtcCAyMDowIHRvX2hvc3QubWlkCisKKzIpIFBsYXlpbmcgYSBtaWQgZnJvbSB0aGUgaG9zdCB0byB0aGUgZ2FkZ2V0CitnYWRnZXQpCisKKyQgYXJlY29yZG1pZGkgLWwKKyBQb3J0ICAgIENsaWVudCBuYW1lICAgICAgICAgICAgICAgICAgICAgIFBvcnQgbmFtZQorIDIwOjAgICAgZl9taWRpICAgICAgICAgICAgICAgICAgICAgICAgICAgZl9taWRpCisKKyQgYXJlY29yZG1pZGkgLXAgMjA6MCBmcm9tX2hvc3QubWlkCisKK2hvc3QpCisKKyQgYXBsYXltaWRpIC1sCisgUG9ydCAgICBDbGllbnQgbmFtZSAgICAgICAgICAgICAgICAgICAgICBQb3J0IG5hbWUKKyAxNDowICAgIE1pZGkgVGhyb3VnaCAgICAgICAgICAgICAgICAgICAgIE1pZGkgVGhyb3VnaCBQb3J0LTAKKyAyNDowICAgIE1JREkgR2FkZ2V0ICAgICAgICAgICAgICAgICAgICAgIE1JREkgR2FkZ2V0IE1JREkgMQorCiskIGFwbGF5bWlkaSAtcDI0OjAgdG9fZ2FkZ2V0Lm1pZAorCitUaGUgZnJvbV9nYWRnZXQubWlkIHNob3VsZCBzb3VuZCBpZGVudGljYWwgdG8gdGhlIHRvX2hvc3QubWlkLgorVGhlIGZyb21faG9zdC5pZCBzaG91bGQgc291bmQgaWRlbnRpY2FsIHRvIHRoZSB0b19nYWRn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cyBhcm1fY2hlY2tfc3RhY2socHJvYmVzX29wY29kZV90IGluc24sCisJCXN0cnVjdCBhcmNoX3Byb2Jlc19pbnNuICphc2ksCisJCWNvbnN0IHN0cnVjdCBkZWNvZGVfaGVhZGVyICpoKQoreworCS8qCisJICogUFJPQkVTX0xEUlNUUkQsIFBST0JFU19MRE1TVE0sIFBST0JFU19TVE9SRSwKKwkgKiBQUk9CRVNfU1RPUkVfRVhUUkEgbWF5IGdldCBoZXJlLiBTaW1wbHkgbWFyayBhbGwgbm9ybWFsCisJICogaW5zbnMgYXMgU1RBQ0tfVVNFX05PTkUuCisJICovCisJc3RhdGljIGNvbnN0IHVuaW9uIGRlY29kZV9pdGVtIHRhYmxlW10gPSB7CisJCS8qCisJCSAqICdTVFJ7LEQsQixIfSwgUnQsIFtSbiwgUm1dJyBzaG91bGQgYmUgbWFya2VkIGFzIFVOS05PV04KKwkJICogaWYgUm4gb3IgUm0gaXMgU1AuCisJCSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeAorCQkgKiBTVFIgKHJlZ2lzdGVyKQljY2NjIDAxMXggeDB4MCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgKKwkJICogU1RSQiAocmVnaXN0ZXIpCWNjY2MgMDExeCB4MXgwIHh4eHggeHh4eCB4eHh4IHh4eHggeHh4eAorCQkgKi8KKwkJREVDT0RFX09SCSgweDBlMTAwMDBmLCAweDA2MDAwMDBkKSwKKwkJREVDT0RFX09SCSgweDBlMWYwMDAwLCAweDA2MGQwMDAwKSwKKworCQkvKgorCQkgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeAorCQkgKiBTVFJEIChyZWdpc3RlcikJY2NjYyAwMDB4IHgweDAgeHh4eCB4eHh4IHh4eHggMTExMSB4eHh4CisJCSAqIFNUUkggKHJlZ2lzdGVyKQljY2NjIDAwMHggeDB4MCB4eHh4IHh4eHggeHh4eCAxMDExIHh4eHgKKwkJICovC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3B5X3VzZXJfZXJyb3JfaGFuZGxlcjsKIGV4dGVybiBzcGlubG9ja190IG1vZGxpc3RfbG9jazsKIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoKLSAqCi0gKi8KLXN0YXRpYyBpbmxpbmUgdW5zaWduZWQgbG9uZyBzZWFyY2hfb25lX3RhYmxlKGNvbnN0IHN0cnVjdCBleGNlcHRpb25fdGFibGVfZW50cnkgKmZpcnN0LAotCQkJCQkgICAgIGNvbnN0IHN0cnVjdCBleGNlcHRpb25fdGFibGVfZW50cnkgKmxhc3QsCi0JCQkJCSAgICAgdW5zaWduZWQgbG9uZyB2YWx1ZSkKLXsKLSAgICAgICAgd2hpbGUgKGZpcnN0IDw9IGxhc3QpIHsKLQkJY29uc3Qgc3RydWN0IGV4Y2VwdGlvbl90YWJsZV9lbnRyeSBfX2F0dHJpYnV0ZV9fKChhbGlnbmVkKDgpKSkgKm1pZDsKLQkJbG9uZyBkaWZmOwotCi0JCW1pZCA9IChsYXN0IC0gZmlyc3QpIC8gMiArIGZpcnN0OwotCQlkaWZmID0gbWlkLT5pbnNuIC0gdmFsdWU7Ci0gICAgICAgICAgICAgICAgaWYgKGRpZmYgPT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtaWQtPmZpeHVwOwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRpZmYgPCAwKQotICAgICAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBtaWQgKyAxOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIGxhc3QgPSBtaWQgLSAxOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybiAwOwotfSAvKiBlbmQgc2VhcmNoX29uZV90YWJsZSgpICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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JyY20sYmNtNTQ2MTZTIjsKKwkJCQlpbnRlcnJ1cHRzID0gPDYgMSAwIDA+OworCQkJCXJlZyA9IDwweDE+OworCQkJfTsKKworCQkJcGh5MjogZXRoZXJuZXQtcGh5QDIgeworCQkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY201NDYxNlMiOworCQkJCWludGVycnVwdHMgPSA8NiAxIDAgMD47CisJCQkJcmVnID0gPDB4Mj47CisJCQl9OworCisJCQlwaHkzOiBldGhlcm5ldC1waHlAMyB7CisJCQkJY29tcGF0aWJsZSA9ICJicmNtLGJjbTU0NjE2UyI7CisJCQkJaW50ZXJydXB0cyA9IDw1IDEgMCAwPjsKKwkJCQlyZWcgPSA8MHgzPjsKKwkJCX07CisKKwkJCXBoeTc6IGV0aGVybmV0LXBoeUA3IHsKKwkJCQljb21wYXRpYmxlID0gImJyY20sYmNtNTQ2MTZTIjsKKwkJCQlpbnRlcnJ1cHRzID0gPDcgMSAwIDA+OworCQkJCXJlZyA9IDwweDc+OworCQkJfTsKKworCQkJdGJpMDogdGJpLXBoeUAxMSB7CisJCQkJcmVnID0gPDB4MTE+OworCQkJCWRldmljZV90eXBlID0gInRiaS1waHkiOworCQkJfTsKKwkJfTsKKworCQllbmV0MTogZXRoZXJuZXRAMjUwMDAgeworCQkJdGJpLWhhbmRsZSA9IDwmdGJpMT47CisJCQlwaHktaGFuZGxlID0gPCZwaHk3PjsKKwkJCXBoeS1jb25uZWN0aW9uLXR5cGUgPSAicmdtaWktaWQiOworCQl9OworCisJCW1kaW9AMjU1MjAgeworCQkJdGJpMTogdGJpLXBoeUAxMSB7CisJCQkJcmVnID0gPDB4MTE+OworCQkJCWRldmljZV90eXBlID0gInRiaS1waHkiOworCQkJfTsKKwkJfTsKKworCQllbmV0MjogZXRoZXJuZXRAMjYwMDAgeworCQkJdGJpLWhhbmRsZSA9IDwmdGJpMj47CisJCQlwaHktaGFuZGxlID0gPCZwaHkzPjsKKwkJCXBoeS1jb25uZWN0aW9uLXR5c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BDT05GSUdfQ0NfT1BUSU1JWkVfRk9SX1NJWkUgaXMgbm90IHNldAogQ09ORklHX0VYUEVSVD15CiBDT05GSUdfS0FMTFNZTVNfQUxMPXkKLUNPTkZJR19LQUxMU1lNU19FWFRSQV9QQVNTPXkKIENPTkZJR19NT0RVTEVTPXkKIENPTkZJR19NT0RVTEVfVU5MT0FEPXkKICMgQ09ORklHX0JMS19ERVZfQlNHIGlzIG5vdCBzZXQKLUNPTkZJR19TUEFSU0VfSVJRPXkKIENPTkZJR19ORVQ9eQogQ09ORklHX1BBQ0tFVD15CiBDT05GSUdfVU5JWD15CkBAIC0yOCwxOSArMjQsMTQgQEAKIENPTkZJR19DT05ORUNUT1I9eQogQ09ORklHX01URD15CiBDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQotQ09ORklHX01URF9PRl9QQVJUUz15Ci1DT05GSUdfTVREX0NIQVI9eQogQ09ORklHX01URF9CTE9DSz1tCiBDT05GSUdfTVREX0NGST15CiBDT05GSUdfTVREX0pFREVDUFJPQkU9eQogQ09ORklHX01URF9DRklfQU1EU1REPXkKIENPTkZJR19NVERfUEhZU01BUF9PRj15Ci1DT05GSUdfUFJPQ19ERVZJQ0VUUkVFPXkKIENPTkZJR19CTEtfREVWX1JBTT15CiBDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zNTAwMAogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX0VUSEVSTkVUPXkKLUNPTkZJR19ORVRfVkVORE9SX0lCTT15CiBDT05GSUdfSUJNX0VNQUM9eQogIyBDT05GSUdfSU5QVVQgaXMgbm90IHNldAogIyBDT05GSUdfU0VSSU8gaXMgbm90IHNldApAQCAtNTMsMjIgKzQ0LDE1IEBACiAjIENPTkZJR19IV19SQU5ET00gaXMgbm90IHNldAogIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAogQ09ORklHX1RIRVJNQUw9eQotQ09ORklHX1ZJREVPX09VVFBVVF9DT05UUk9MPW0KIENPTkZJR19FWFQyX0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X0JPT0w9eQogQ09ORklHX0NNRExJTkU9IiIKIENPTkZJR19QQ0lFUE9SVEJVUz15CkBAIC0zMywyMCArMjksMTUgQEAKIENPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCiBDT05GSUdfQ09OTkVDVE9SPXkKIENPTkZJR19NVEQ9eQotQ09ORklHX01URF9DT05DQVQ9eQogQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKLUNPTkZJR19NVERfT0ZfUEFSVFM9eQotQ09ORklHX01URF9DSEFSPXkKIENPTkZJR19NVERfQkxPQ0s9eQogQ09ORklHX01URF9DRkk9eQogQ09ORklHX01URF9DRklfQU1EU1REPXkKIENPTkZJR19NVERfUEhZU01BUF9PRj15CiBDT05GSUdfTVREX05BTkQ9eQogQ09ORklHX01URF9OQU5EX05ERkM9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9SQU09eQogQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzUwMDAKLSMgQ09ORklHX01JU0NfREVWSUNFUyBpcyBub3Qgc2V0CiBDT05GSUdfU0NTST15CiBDT05GSUdfQkxLX0RFVl9TRD15CiBDT05GSUdfQ0hSX0RFVl9TRz15CkBAIC01NCwxMyArNDUsMTAgQEAKIENPTkZJR19GVVNJT05fU0FTPXkKIENPTkZJR19JMk89eQogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX0VUSEVSTkVUPXkKLUNPTkZJR19ORVRfVkVORE9SX0lCTT15CiBDT05GSUdfSUJNX0VNQUM9eQogQ09ORklHX0lCTV9FTUFDX1JYQj0yNTYKIENPTkZJR19JQk1fRU1BQ19UWEI9MjU2CiBDT05GSUdfRTEwMDBFPXkKLSMgQ09ORklHX05FVERFVl8xMDAwMCBpcyBub3Qgc2V0CiAjIENPTkZJR19JTlBVVCBpcyBub3Qgc2V0CiAjIENPTkZJR19TRVJJTyBpcyBub3Qgc2V0CiAjIENPTkZJR19WVCB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HX1BST0M9eQogQ09ORklHX0xPR19CVUZfU0hJRlQ9MTQKIENPTkZJR19CTEtfREVWX0lOSVRSRD15Ci0jIENPTkZJR19DQ19PUFRJTUlaRV9GT1JfU0laRSBpcyBub3Qgc2V0CiBDT05GSUdfRVhQRVJUPXkKIENPTkZJR19NT0RVTEVTPXkKIENPTkZJR19NT0RVTEVfVU5MT0FEPXkKQEAgLTE2LDcgKzE0LDYgQEAKIENPTkZJR19XQVJQPXkKIENPTkZJR19QUEM0eHhfR1BJTz15CiBDT05GSUdfSFpfMTAwMD15Ci1DT05GSUdfU1BBUlNFX0lSUT15CiBDT05GSUdfQ01ETElORV9CT09MPXkKIENPTkZJR19DTURMSU5FPSJpcD1vbiIKICMgQ09ORklHX1BDSSBpcyBub3Qgc2V0CkBAIC0zNSw4ICszMiw2IEBACiAjIENPTkZJR19GSVJNV0FSRV9JTl9LRVJORUwgaXMgbm90IHNldAogQ09ORklHX01URD15CiBDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQotQ09ORklHX01URF9PRl9QQVJUUz15Ci1DT05GSUdfTVREX0NIQVI9eQogQ09ORklHX01URF9CTE9DSz15CiBDT05GSUdfTVREX0NGST15CiBDT05GSUdfTVREX0NGSV9BTURTVEQ9eQpAQCAtNDQsMjEgKzM5LDE0IEBACiBDT05GSUdfTVREX05BTkQ9eQogQ09ORklHX01URF9OQU5EX05ERkM9eQogQ09ORklHX01URF9VQkk9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9SQU09eQotQ09ORklHX01JU0NfREVWSUNFUz15CiBDT05GSUdfRUVQUk9NX0FUMjQ9eQogQ09ORklHX1NDU0k9eQogQ09ORklHX0JMS19ERVZfU0Q9eQogQ09ORklHX1NDU0lfU1BJX0FUVFJTPXkKICMgQ09ORklHX1NDU0lfTE9XTEVWRUwgaXMgbm90IHNldAogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX0VUSEVSTkVUPXkKLUNPTkZJR19ORVRfVkVORE9SX0lCTT15Ci1DT05GSUdfTUlJPXkKIENPTkZJR19JQk1fRU1BQz15Ci0jIENPTkZJR19ORVRERVZfMTAwMCBpcyBub3Qgc2V0Ci0jIENPTkZJR19ORVRERVZfMTAwMDAgaXMgbm90IHNldAogIyBDT05GSUdfSU5QVVQgaXMgbm90IHNldAogIyBDT05GSUdfU0VSSU8gaXMgbm90IHNldAogIyBDT05GSUdfVlQgaXMgbm90IHNldApAQCAtNzIsNyArNjAsNiBAQAogQ09ORklHX0dQSU9fU1lTRlM9eQogQ09ORklHX1NFTlNPUlNfQUQ3NDE0PXkKIENPTkZJR19USEVSTUFMPXkKLUNPTkZJR19USEVSTUFMX0hXTU9OPXkKIENPTkZJR19XQVRDSERPRz15CiBDT05GSUdfVVNCPXkKIENPTkZJR19VU0JfTU9OPXkKQEAgLTgzLDE0ICs3MCwxMiBAQAogQ09ORklHX05FV19MRURTPXkKIENPTkZJR19MRURTX0NMQVNTPXkKIENPTkZJR19MRURTX0dQSU89eQotIyBDT05GSUdfTEVEU19HUElPX1BMQVRGT1JNIGlzIG5vdCBzZXQKIENPTkZJR19MRURTX1RSSUdHRVJTPXkKIENPTkZJR19MRURTX1RSSUdHRVJfREVGQVVMVF9PTj15CiBDT05GSUdfRVhUMl9GUz15CiBDT05GSUdfRVhUM19GUz15CiAjIENPTkZJR19FWFQzX0RFRkFVTFRTX1RPX09SREVSRUQgaXMgbm90IHNldAogIyBDT05GSUdfRVhUM19GU19YQVRUUiBpcyBub3Qgc2V0Ci1DT05GSUdfSU5PVElGWT15CiBDT05GSUdfTVNET1NfRlM9eQogQ09ORklHX1ZGQVRfRlM9eQogQ09ORklHX1BST0NfS0NPUkU9eQpAQCAtOTksNyArODQsNiBAQAogQ09ORklHX1VCSUZTX0ZTPXkKIENPTkZJR19DUkFNRlM9eQogQ09ORklHX05GU19GUz15Ci1DT05GSUdfTkZTX1YzPXkKIENPTkZJR19ST09UX05GUz15CiBDT05GSUdfTkxTX0NP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9eQotQ09ORklHX01URF9DSEFSPXkKIENPTkZJR19NVERfQkxPQ0s9eQogQ09ORklHX01URF9DRkk9eQogQ09ORklHX01URF9DRklfQU1EU1REPXkKIENPTkZJR19NVERfUEhZU01BUF9PRj15CiBDT05GSUdfTVREX05BTkQ9eQogQ09ORklHX01URF9OQU5EX0ZTTF9FTEJDPXkKLUNPTkZJR19QUk9DX0RFVklDRVRSRUU9eQogQ09ORklHX0JMS19ERVZfTE9PUD15CiBDT05GSUdfQkxLX0RFVl9SQU09eQogQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzI3NjgKQEAgLTUxLDEyICs0NiwxMCBAQAogQ09ORklHX01EX1JBSUQwPXkKIENPTkZJR19NRF9SQUlEMT15CiBDT05GSUdfTkVUREVWSUNFUz15CitDT05GSUdfR0lBTkZBUj15CitDT05GSUdfRTEwMD15CiBDT05GSUdfQ0lDQURBX1BIWT15CiBDT05GSUdfRklYRURfUEhZPXkKLUNPTkZJR19ORVRfRVRIRVJORVQ9eQotQ09ORklHX05FVF9QQ0k9eQotQ09ORklHX0UxMDA9eQotQ09ORklHX0dJQU5GQVI9eQogIyBDT05GSUdfSU5QVVRfTU9VU0VERVYgaXMgbm90IHNldAogIyBDT05GSUdfSU5QVVRfS0VZQk9BUkQgaXMgbm90IHNldAogIyBDT05GSUdfSU5QVVRfTU9VU0UgaXMgbm90IHNldApAQCAtNzEsNyArNjQsNiBAQAogQ09ORklHX1NQST15CiBDT05GSUdfU1BJX0JJVEJBTkc9eQogQ09ORklHX1dBVENIRE9HPXkKLUNPTkZJR19WSURFT19PVVRQVVRfQ09OVFJPTD1tCiAjIENPTkZJR19VU0JfSElEIGlzIG5vdCBzZXQKIENPTkZJR19VU0I9eQogQ09ORklHX1VTQl9NT049eQpAQCAtODIsNyArNzQsNiBAQAogQ09ORklHX1VTQl9VSENJX0hDRD15CiBDT05GSUdfVVNCX1NUT1JBR0U9eQogQ09ORklHX1VTQl9HQURHRVQ9eQotQ09ORklHX1VTQl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QogIyBDT05GSUdfQkxLX0RFVl9CU0cgaXMgbm90IHNldAorQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRD15CisjIENPTkZJR19NU0RPU19QQVJUSVRJT04gaXMgbm90IHNldAogIyBDT05GSUdfUFBDX0NIUlAgaXMgbm90IHNldAogIyBDT05GSUdfUFBDX1BNQUMgaXMgbm90IHNldAogQ09ORklHX1BQQ184M3h4PXkKIENPTkZJR19NUEM4MzZ4X01EUz15CiBDT05GSUdfUVVJQ0NfRU5HSU5FPXkKLUNPTkZJR19OT19IWj15Ci1DT05GSUdfSElHSF9SRVNfVElNRVJTPXkKLUNPTkZJR19TUEFSU0VfSVJRPXkKIENPTkZJR19QQ0k9eQogQ09ORklHX05FVD15CiBDT05GSUdfUEFDS0VUPXkKQEAgLTMyLDIxICszMSwxNyBAQAogIyBDT05GSUdfRldfTE9BREVSIGlzIG5vdCBzZXQKIENPTkZJR19NVEQ9eQogQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKLUNPTkZJR19NVERfQ0hBUj15CiBDT05GSUdfTVREX0JMT0NLPXkKIENPTkZJR19NVERfQ0ZJPXkKIENPTkZJR19NVERfQ0ZJX0FNRFNURD15CiBDT05GSUdfTVREX1BIWVNNQVBfT0Y9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9MT09QPXkKIENPTkZJR19CTEtfREVWX1JBTT15CiBDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zMjc2OAogQ09ORklHX1NDU0k9eQogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX01BUlZFTExfUEhZPXkKLUNPTkZJR19ORVRfRVRIRVJORVQ9eQotQ09ORklHX01JST15CiBDT05GSUdfVUNDX0dFVEg9eQorQ09ORklHX01BUlZFTExfUEhZPXkKICMgQ09ORklHX0lOUFVUX01PVVNFREVWIGlzIG5vdCBzZXQKICMgQ09ORklHX0lOUFVUX0tFWUJPQVJEIGlzIG5vdCBzZXQKICMgQ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MXzgyNTA9eQotQ09ORklHX1NFUklBTF84MjUwX0NPTlNPTEU9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15Ci0KLUNPTkZJR19NVEQ9eQotQ09ORklHX01URF9CTEtERVZTPXkKLUNPTkZJR19NVERfQkxPQ0s9eQotQ09ORklHX01URF9DRkk9eQotQ09ORklHX01URF9DRklfQU1EU1REPXkKLUNPTkZJR19NVERfQ0ZJX0lOVEVMRVhUPXkKLUNPTkZJR19NVERfQ0hBUj15Ci1DT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQotQ09ORklHX01URF9DT05DQVQ9eQotQ09ORklHX01URF9QSFlTTUFQX09GPXkKLQotQ09ORklHX0kyQz15Ci1DT05GSUdfSTJDX01QQz15Ci1DT05GSUdfSTJDX0NIQVJERVYKLUNPTkZJR19SVENfQ0xBU1M9eQotQ09ORklHX1JUQ19IQ1RPU1lTPXkKLUNPTkZJR19SVENfRFJWX0lTTDEyMDg9eQotCiBDT05GSUdfTkVUPXkKIENPTkZJR19JTkVUPXkKIENPTkZJR19JUF9QTlA9eQorQ09ORklHX01URD15CitDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQorQ09ORklHX01URF9CTE9DSz15CitDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9QSFlTTUFQX09GPXkKIENPTkZJR19ORVRERVZJQ0VTPXkKLUNPTkZJR19NSUk9eQogQ09ORklHX0dJQU5GQVI9eQogQ09ORklHX01BUlZFTExfUEhZPXkKK0NPTkZJR19TRVJJQUxfODI1MD15CitDT05GSUdfU0VSSUFMXzgyNTBfQ09OU09MRT15CitDT05GSUdfSTJDPXkKK0NPTkZJR19JMkNfTVBDPXkKKyMgQ09ORklHX1VTQl9TVVBQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19SVENfQ0xBU1M9eQorQ09ORklHX1JUQ19EUlZfSVNMMTIwOD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ZPUkNFX01BWF9aT05FT1JERVI9MTIKICMgQ09ORklHX1NFQ0NPTVAgaXMgbm90IHNldAogQ09ORklHX1BDST15CkBAIC00MiwxNCArNDAsMTIgQEAKIENPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCiBDT05GSUdfTVREPXkKIENPTkZJR19NVERfQ01ETElORV9QQVJUUz15Ci1DT05GSUdfTVREX0NIQVI9eQogQ09ORklHX01URF9CTE9DSz15CiBDT05GSUdfTVREX0NGST15CiBDT05GSUdfTVREX0NGSV9BTURTVEQ9eQogQ09ORklHX01URF9QSFlTTUFQX09GPXkKIENPTkZJR19NVERfTkFORD15CiBDT05GSUdfTVREX05BTkRfRlNMX0VMQkM9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9MT09QPXkKIENPTkZJR19CTEtfREVWX1JBTT15CiBDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0xMzEwNzIKQEAgLTYxLDE1ICs1NywxMyBAQAogQ09ORklHX1BBVEFfQUxJPXkKIENPTkZJR19ORVRERVZJQ0VTPXkKIENPTkZJR19EVU1NWT15Ci1DT05GSUdfTkVUX0VUSEVSTkVUPXkKIENPTkZJR19ORVRfVFVMSVA9eQogQ09ORklHX1VMSTUyNlg9eQotIyBDT05GSUdfTkVUREVWXzEwMDAgaXMgbm90IHNldAotIyBDT05GSUdfTkVUREVWXzEwMDAwIGlzIG5vdCBzZXQKICMgQ09ORklHX0lOUFVUX01PVVNFREVWIGlzIG5vdCBzZXQKICMgQ09ORklHX0lOUFVUX0tFWUJPQVJEIGlzIG5vdCBzZXQKICMgQ09ORklHX0lOUFVUX01PVVNFIGlzIG5vdCBzZXQKIENPTkZJR19TRVJJT19MSUJQUzI9eQorIyBDT05GSUdfTEVHQUNZX1BUWVMgaXMgbm90IHNldAogQ09ORklHX1NFUklBTF84MjUwPXkKIENPTkZJR19TRVJJQUxfODI1MF9DT05TT0xFPXkKIENP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VFM9eQotQ09ORklHX01URF9DSEFSPXkKIENPTkZJR19NVERfQkxPQ0s9eQogQ09ORklHX01URF9DRkk9eQogQ09ORklHX01URF9DRklfQU1EU1REPXkKQEAgLTQyLDcgKzM4LDYgQEAKIENPTkZJR19NVERfUEhZU01BUF9PRj15CiBDT05GSUdfTVREX1BMQVRSQU09eQogQ09ORklHX01URF9VQkk9bQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9MT09QPXkKIENPTkZJR19CTEtfREVWX1JBTT15CiBDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zMjc2OApAQCAtNzcsNyArNzIsNiBAQAogQ09ORklHX1dBVENIRE9HPXkKIENPTkZJR19NRkRfU001MDE9bQogQ09ORklHX0RSTT15Ci1DT05GSUdfVklERU9fT1VUUFVUX0NPTlRST0w9eQogQ09ORklHX0ZCPXkKIENPTkZJR19GQl9GT1JFSUdOX0VORElBTj15CiBDT05GSUdfRkJfUkFERU9OPXkKQEAgLTk0LDkgKzg4LDYgQEAKICMgQ09ORklHX1NORF9TUEkgaXMgbm90IHNldAogIyBDT05GSUdfU05EX1VTQiBpcyBub3Qgc2V0CiBDT05GSUdfU05EX1NPQz15Ci1DT05GSUdfU05EX1NPQ19NUEM1MjAwX0kyUz15Ci1DT05GSUdfU05EX01QQzUyeHhfU09DX1BDTTAzMD15Ci1DT05GSUdfU05EX01QQzUyeHhfU09DX0VGSUtBPXkKIENPTkZJR19ISURfRFJBR09OUklTRT15CiBDT05GSUdfSElEX0dZUkFUSU9OPXkKIENPTkZJR19ISURfVFdJTkhBTj15CkBAIC0xMDQsNyArOTUsNiBAQAogQ09ORklHX0hJRF9QQU5USEVSTE9SRD15CiBDT05GSUdfSElEX1BFVEFMWU5YPXkKIENPTkZJR19ISURfU0FNU1VORz15Ci1DT05GSUdfSElEX1NPTlk9eQogQ09ORklHX0hJRF9TVU5QTFVTPXkKIENPTkZJR19ISURfR1JFRU5BU0lBPXkKIENPTkZ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9DSEFSPXkKIENPTkZJR19NVERfQkxPQ0s9eQogQ09ORklHX01URF9DRkk9eQogQ09ORklHX01URF9DRklfQU1EU1REPXkKIENPTkZJR19NVERfUEhZU01BUF9PRj15CiBDT05GSUdfTVREX05BTkQ9eQogQ09ORklHX01URF9OQU5EX0ZTTF9FTEJDPXkKLUNPTkZJR19QUk9DX0RFVklDRVRSRUU9eQogQ09ORklHX0JMS19ERVZfTE9PUD15CiBDT05GSUdfQkxLX0RFVl9SQU09eQogQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzI3NjgKQEAgLTYyLDcgKzU5LDYgQEAKIENPTkZJR19TQVRBX0ZTTD15CiBDT05GSUdfU0FUQV9TSUw9eQogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX01JST15CiBDT05GSUdfVUNDX0dFVEg9eQogQ09ORklHX0dJQU5GQVI9eQogQ09ORklHX01BUlZFTExfUEhZPXkKQEAgLTgyLDcgKzc4LDYgQEAKIENPTkZJR19JMkNfQ0hBUkRFVj15CiBDT05GSUdfSTJDX01QQz15CiBDT05GSUdfV0FUQ0hET0c9eQotQ09ORklHX1ZJREVPX09VVFBVVF9DT05UUk9MPW0KIENPTkZJR19ISURfQTRURUNIPXkKIENPTkZJR19ISURfQVBQTEU9eQogQ09ORklHX0hJRF9CRUxLSU49eQpAQCAtOTcsNyArOTIsNiBAQAogQ09ORklHX0hJRF9QQU5USEVSTE9SRD15CiBDT05GSUdfSElEX1BFVEFMWU5YPXkKIENPTkZJR19ISURfU0FNU1VORz15Ci1DT05GSUdfSElEX1NPTlk9eQogQ09ORklHX0hJRF9TVU5QTFVTPXkKIENPTkZJR19VU0I9eQogQ09ORklHX1VTQl9NT049eQpAQCAtMTE5LDYgKzExMyw1IEBACiBDT05GSUdfQ1JZUFRPX1BDQkM9bQogQ09ORklHX0NSWVBUT19TSEEyNTY9eQogQ09ORklHX0NSWVBUT19TSEE1MTI9eQotQ09ORklHX0NSWVBUT19BRVM9eQogIyBDT05GSUdfQ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Qgc2V0CiAjIENPTkZJR19FTEZfQ09SRSBpcyBub3Qgc2V0CiAjIENPTkZJR19CQVNFX0ZVTEwgaXMgbm90IHNldAogIyBDT05GSUdfRlVURVggaXMgbm90IHNldAogIyBDT05GSUdfVk1fRVZFTlRfQ09VTlRFUlMgaXMgbm90IHNldAogIyBDT05GSUdfQkxLX0RFVl9CU0cgaXMgbm90IHNldAorQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRD15CiAjIENPTkZJR19JT1NDSEVEX0NGUSBpcyBub3Qgc2V0CiBDT05GSUdfOHh4X0NPUFlCQUNLPXkKLUNPTkZJR19OT19IWj15Ci1DT05GSUdfSElHSF9SRVNfVElNRVJTPXkKIENPTkZJR19IWl8xMDA9eQotQ09ORklHXzhYWF9NSU5JTUFMX0ZQRU1VPXkKLUNPTkZJR19TUEFSU0VfSVJRPXkKICMgQ09ORklHX1NFQ0NPTVAgaXMgbm90IHNldAogQ09ORklHX05FVD15CiBDT05GSUdfUEFDS0VUPXkKQEAgLTM0LDcgKzMwLDYgQEAKIENPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCiAjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAogQ09ORklHX01URD15Ci1DT05GSUdfTVREX0NIQVI9eQogQ09ORklHX01URF9CTE9DSz15CiBDT05GSUdfTVREX0pFREVDUFJPQkU9eQogQ09ORklHX01URF9DRklfQURWX09QVElPTlM9eQpAQCAtNDYsMjIgKzQxLDE3IEBACiBDT05GSUdfTVREX0NGSV9JND15CiBDT05GSUdfTVREX0NGSV9BTURTVEQ9eQogQ09ORklHX01URF9QSFlTTUFQX09GPXkKLUNPTkZJR19QUk9DX0RFVklDRVRSRUU9eQogIyBDT05GSUdfQkxLX0RFViBpcyBub3Qgc2V0Ci0jIENPTkZJR19NSVNDX0RFVklDRVMgaXMgbm90IHNldAogQ09ORklHX05FVERFVklDRVM9eQotQ09ORklHX0RBVklDT01fUEhZPXkKLUNPT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NAogQ09ORklHX0JMS19ERVZfSU5JVFJEPXkKIENPTkZJR19FWFBFUlQ9eQogQ09ORklHX0tBTExTWU1TX0FMTD15CitDT05GSUdfUEFSVElUSU9OX0FEVkFOQ0VEPXkKICMgQ09ORklHX1BQQ19DSFJQIGlzIG5vdCBzZXQKICMgQ09ORklHX1BQQ19QTUFDIGlzIG5vdCBzZXQKIENPTkZJR19QUENfODJ4eD15CiBDT05GSUdfUFEyRkFEUz15Ci1DT05GSUdfTk9fSFo9eQotQ09ORklHX0hJR0hfUkVTX1RJTUVSUz15CiBDT05GSUdfQklORk1UX01JU0M9eQotQ09ORklHX1NQQVJTRV9JUlE9eQogQ09ORklHX1BDST15Ci0jIENPTkZJR184MjYwX1BDSTkgaXMgbm90IHNldAogQ09ORklHX05FVD15CiBDT05GSUdfUEFDS0VUPXkKIENPTkZJR19VTklYPXkKQEAgLTI5LDcgKzI4LDYgQEAKIENPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCiAjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAogQ09ORklHX01URD15Ci1DT05GSUdfTVREX0NIQVI9eQogQ09ORklHX01URF9CTE9DSz15CiBDT05GSUdfTVREX0pFREVDUFJPQkU9eQogQ09ORklHX01URF9DRklfQURWX09QVElPTlM9eQpAQCAtNDEsNTUgKzM5LDQzIEBACiBDT05GSUdfTVREX0NGSV9JND15CiBDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CiBDT05GSUdfTVREX1BIWVNNQVBfT0Y9eQotQ09ORklHX1BST0NfREVWSUNFVFJFRT15CiBDT05GSUdfQkxLX0RFVl9MT09QPXkKIENPTkZJR19JREU9eQogQ09ORklHX05FVERFVklDRVM9eQogQ09ORklHX1RVTj15Ci1DT05GSUdfREFWSUNPTV9QSFk9eQotQ09ORklHX05FVF9FVEhFUk5FVD15CiBDT05GSUdfRlNfRU5FVD15CiAjIENPTkZJR19GU19FTkVUX0hBU19TQ0MgaXMgb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b3AgaWYgbGVuZ3RoIGlzIGxlc3MgdGhhbiAzMkIgKi8KKwljbXBkaQljcjYscjUsMzEKKworCWJlcQljcjEsLkx6ZXJvCisJYm5lCS5Mc2hvcnQKKwliZ3QJY3I2LC5MbG9uZworCisuTHNob3J0OgorCW10Y3RyCXI1CisKKzE6CWxieglyQSwwKHIzKQorCWxieglyQiwwKHI0KQorCXN1YmYuCXJDLHJCLHJBCisJYm5lCS5Mbm9uX3plcm8KKwliZHoJLkx6ZXJvCisKKwlsYnoJckEsMShyMykKKwlsYnoJckIsMShyNCkKKwlzdWJmLglyQyxyQixyQQorCWJuZQkuTG5vbl96ZXJvCisJYmR6CS5MemVybworCisJbGJ6CXJBLDIocjMpCisJbGJ6CXJCLDIocjQpCisJc3ViZi4JckMsckIsckEKKwlibmUJLkxub25femVybworCWJkegkuTHplcm8KKworCWxieglyQSwzKHIzKQorCWxieglyQiwzKHI0KQorCXN1YmYuCXJDLHJCLHJBCisJYm5lCS5Mbm9uX3plcm8KKworCWFkZGkJcjMscjMsNAorCWFkZGkJcjQscjQsNAorCisJYmRuegkxYgorCisuTHplcm86CisJbGkJcjMsMAorCWJscgorCisuTG5vbl96ZXJvOgorCW1yCXIzLHJDCisJYmxyCisKKy5MbG9uZzoKKwlsaQlvZmY4LDgKKwlsaQlvZmYxNiwxNgorCWxpCW9mZjI0LDI0CisKKwlzdGQJcjMxLC04KHIxKQorCXN0ZAlyMzAsLTE2KHIxKQorCXN0ZAlyMjksLTI0KHIxKQorCXN0ZAlyMjgsLTMyKHIxKQorCXN0ZAlyMjcsLTQwKHIxKQorCisJc3JkaQlyMCxyNSw1CisJbXRjdHIJcjAKKwlhbmRpLglyNSxyNSwzMQorCisJTEQJckEsMCxyMworCUxECXJCLDAscjQKKworCUxECXJDLG9mZjgscjMKKwlMRAlyRCxvZmY4LHI0CisKKwlMRAlyRSxvZmYxNixyMworCUxECXJGLG9mZjE2LHI0CisKKwlMRAlyRyxvZmYyNCxyMworCUxECXJILG9mZjI0LHI0CisJY21wbGQJY3IwLHJBLHJCCisKKwlhZGRpCXIzLHIzLDMyCisJYWRkaQlyNCxyNCwzMgorCisJYmR6CS5MZmlyc3QzMgorCisJTEQJckEsMCxyMworCUxECXJCLDAscjQKKwljbXBsZAljcjEsckMsckQKKworCUxECXJDLG9mZjgscjMKKwlMRAlyRCxvZmY4LHI0CisJY21wbGQJY3I2LHJFLHJGCisKKwlMRAlyRSxvZmYxNixyMworCUxECXJGLG9mZjE2LHI0CisJY21wbGQJY3I3LHJHLHJICisJYm5lCWNyMCwuTGNtcEFCCisKKwlMRAlyRyxvZmYyNCxyMworCUxECXJILG9mZjI0LHI0CisJY21wbGQJY3IwLHJBLHJCCisJYm5lCWNyMSwuTGNtcENECisKKwlhZGRpCXIzLHIzLDMyCisJYWRkaQlyNCxyNCwzMgorCisJYmR6CS5Mc2Vjb25kMzIKKworCS5iYWxpZ24JMTYKKworMToJTEQJckEsMCxyMworCUxECXJCLDAscjQKKwljbXBsZAljcjEsckMsckQKKwlibmUJY3I2LC5MY21wRUYKKworCUxECXJDLG9mZjgscjMKKwlMRAlyRCxvZmY4LHI0CisJY21wbGQJY3I2LHJFLHJGCisJYm5lCWNyNywuTGNtcEdICisKKwlMRAlyRSxvZmYxNixyMworCUxECXJGLG9mZjE2LHI0CisJY21wbGQJY3I3LHJHLHJICisJYm5lCWNyMCwuTGNtcEFCCisKKwlMRAlyRyxvZmYyNCxyMworCUxECXJILG9mZjI0LHI0CisJY21wbGQJY3IwLHJBLHJCCisJYm5lCWNyMSwuTGNtcENECisKKwlhZGRpCXIzLHIzLDMyCisJYWRkaQlyNCxyNCwzMgorCisJYmRuegkxYgorCisuTHNlY29uZDMyOgorCWNtcGxkCWNyMSxyQyxyRAorCWJuZQljcjYsLkxjbXBFRgorCisJY21wbGQJY3I2LHJFLHJGCisJYm5lCWNyNywuTGNtcEdICisKKwljbXBsZAljcjcsckcsckgKKwlibmUJY3IwLC5MY21wQUIKKworCWJuZQljcjEsLkxjb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geworICAgICAgICAgICAgICAgIC5jYWxsYmFjayA9IHNldF9zY2FuX2FsbCwKKyAgICAgICAgICAgICAgICAuaWRlbnQgPSAiU3RyYXR1cy9ORUMgZnRTZXJ2ZXIiLAorICAgICAgICAgICAgICAgIC5tYXRjaGVzID0geworICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9TWVNfVkVORE9SLCAiTkVDIiksCisgICAgICAgICAgICAgICAgICAgICAgICBETUlfTUFUQ0goRE1JX1BST0RVQ1RfTkFNRSwgIkV4cHJlc3M1ODAwL1IzMiIpLAorICAgICAgICAgICAgICAgIH0sCisgICAgICAgIH0sCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICAuY2FsbGJhY2sgPSBzZXRfc2Nhbl9hbGwsCisgICAgICAgICAgICAgICAgLmlkZW50ID0gIlN0cmF0dXMvTkVDIGZ0U2VydmVyIiwKKyAgICAgICAgICAgICAgICAubWF0Y2hlcyA9IHsKKyAgICAgICAgICAgICAgICAgICAgICAgIERNSV9NQVRDSChETUlfU1lTX1ZFTkRPUiwgIk5FQyIpLAorICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9QUk9EVUNUX05BTUUsICJFeHByZXNzNTgwMC9SMzEiKSwKKyAgICAgICAgICAgICAgICB9LAorICAgICAgICB9LAogCXt9CiB9OwogCkBAIC00OTcsNiArNTEzLDMxIEBACiAJfQogfQogCisvKgorICogU29tZSBkZXZpY2UgZHJpdmVycyBhc3N1bWUgZGV2LT5pcnEgd29uJ3QgY2hhbmdlIGFmdGVyIGNhbGxpbmcKKyAqIHBjaV9kaXNhYmxlX2RldmljZSgpLiBTbyBkZWxheSByZWxlYXNpbmcgb2YgSVJRIHJlc291cmNlIHRvIGRyaXZlcgorICogdW5iaW5kaW5nIHRpbWUuIE90aGVyd2lzZSBpdCB3aWxsIGJyZWFrIFBNIHN1YnN5c3RlbSBhbmQgZHJpdmVycworICogbGlrZSB4ZW4tcGNpYmFjayBldGMuCisgKi8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2FyZ3MuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2RzYXJncy5jCkBAIC02LDcgKzYsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9kc2NvbnRyb2wuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvZHNjb250cm9sLmMKaW5kZXggOGRhZjlkZS4uMzlkYTlkYSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9kc2NvbnRyb2wuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2RzY29udHJvbC5jCkBAIC02LDcgKzYsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9kc2ZpZWxkLmMgYi9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XRob3V0CkBAIC0xMDgsNTMgKzEwOCw2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfZXZfdmFsaWRfZ3BlX2V2ZW50Ci0gKgotICogUEFSQU1FVEVSUzogIGdwZV9ldmVudF9pbmZvICAgICAgICAgICAgICAtIEluZm8gZm9yIHRoaXMgR1BFCi0gKgotICogUkVUVVJOOiAgICAgIFRSVUUgaWYgdGhlIGdwZV9ldmVudCBpcyB2YWxpZAotICoKLSAqIERFU0NSSVBUSU9OOiBWYWxpZGF0ZSBhIEdQRSBldmVudC4gRE8gTk9UIENBTEwgRlJPTSBJTlRFUlJVUFQgTEVWRUwuCi0gKiAgICAgICAgICAgICAgU2hvdWxkIGJlIGNhbGxlZCBvbmx5IHdoZW4gdGhlIEdQRSBsaXN0cyBhcmUgc2VtYXBob3JlIGxvY2tlZAotICogICAgICAgICAgICAgIGFuZCBub3Qgc3ViamVjdCB0byBjaGFuZ2UuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdTggYWNwaV9ldl92YWxpZF9ncGVfZXZlbnQoc3RydWN0IGFjcGlfZ3BlX2V2ZW50X2luZm8gKmdwZV9ldmVudF9pbmZvKQotewotCXN0cnVjdCBhY3BpX2dwZV94cnVwdF9pbmZvICpncGVfeHJ1cHRfYmxvY2s7Ci0Jc3RydWN0IGFjcGlfZ3BlX2Jsb2NrX2luZm8gKmdwZV9ibG9jazsKLQotCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKLQotCS8qIE5vIG5lZWQgZm9yIHNwaW4gbG9jayBzaW5jZSB3ZSBhcmUgbm90IGNoYW5naW5nIGFueSBsaXN0IGVsZW1lbnRzICovCi0KLQkvKiBXYWxrIHRoZSBHU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ywzMiArNzI4LDM3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfaW5zdGFsbF9ncGVfaGFuZGxlcgorICogRlVOQ1RJT046ICAgIGFjcGlfZXZfaW5zdGFsbF9ncGVfaGFuZGxlcgogICoKICAqIFBBUkFNRVRFUlM6ICBncGVfZGV2aWNlICAgICAgLSBOYW1lc3BhY2Ugbm9kZSBmb3IgdGhlIEdQRSAoTlVMTCBmb3IgRkFEVAogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmluZWQgR1BFcykKICAqICAgICAgICAgICAgICBncGVfbnVtYmVyICAgICAgLSBUaGUgR1BFIG51bWJlciB3aXRoaW4gdGhlIEdQRSBibG9jawogICogICAgICAgICAgICAgIHR5cGUgICAgICAgICAgICAtIFdoZXRoZXIgdGhpcyBHUEUgc2hvdWxkIGJlIHRyZWF0ZWQgYXMgYW4KICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZGdlLSBvciBsZXZlbC10cmlnZ2VyZWQgaW50ZXJydXB0LgorICogICAgICAgICAgICAgIGlzX3Jhd19oYW5kbGVyICAtIFdoZXRoZXIgdGhpcyBHUEUgc2hvdWxkIGJlIGhhbmRsZWQgdXNpbmcKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgc3BlY2lhbCBHUEUgaGFuZGxlciBtb2RlLgogICogICAgICAgICAgICAgIGFkZHJlc3MgICAgICAgICAtIEFkZHJlc3Mgb2YgdGhlIGhhbmRsZXIKICAqICAgICAgICAgICAgICBjb250ZXh0ICAgICAgICAgLSBWYWx1ZSBwYXNzZWQgdG8gdGhlIGhhbmRsZXIgb24gZWFjaCBHUEUKICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgotICogREVTQ1JJUFRJT046IEluc3RhbGwgYSBoYW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VJTOiAgZ3BlX2RldmljZSAgICAgIC0gTmFtZXNwYWNlIG5vZGUgZm9yIHRoZSBHUEUgKE5VTEwgZm9yIEZBRFQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZpbmVkIEdQRXMpCisgKiAgICAgICAgICAgICAgZ3BlX251bWJlciAgICAgIC0gVGhlIEdQRSBudW1iZXIgd2l0aGluIHRoZSBHUEUgYmxvY2sKKyAqICAgICAgICAgICAgICB0eXBlICAgICAgICAgICAgLSBXaGV0aGVyIHRoaXMgR1BFIHNob3VsZCBiZSB0cmVhdGVkIGFzIGFuCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWRnZS0gb3IgbGV2ZWwtdHJpZ2dlcmVkIGludGVycnVwdC4KKyAqICAgICAgICAgICAgICBhZGRyZXNzICAgICAgICAgLSBBZGRyZXNzIG9mIHRoZSBoYW5kbGVyCisgKiAgICAgICAgICAgICAgY29udGV4dCAgICAgICAgIC0gVmFsdWUgcGFzc2VkIHRvIHRoZSBoYW5kbGVyIG9uIGVhY2ggR1BFCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBJbnN0YWxsIGEgaGFuZGxlciBmb3IgYSBHZW5lcmFsIFB1cnBvc2UgRXZlbnQuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMKK2FjcGlfaW5zdGFsbF9ncGVfaGFuZGxlcihhY3BpX2hhbmRsZSBncGVfZGV2aWNlLAorCQkJIHUzMiBncGVfbnVtYmVyLAorCQkJIHUzMiB0eXBlLCBhY3BpX2dwZV9oYW5kbGVyIGFkZHJlc3MsIHZvaWQgKmNvbnRleHQpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCisJQUNQSV9GVU5DVElPTl9UUkFDRShhY3BpX2luc3RhbGxfZ3BlX2hhbmRsZXIpOworCisJc3RhdHVzID0KKwkgICAgYWNwaV9ldl9pbnN0YWxsX2dwZV9oYW5kbGVyKGdwZV9kZXZpY2UsIGdwZV9udW1iZXIsIHR5cGUsIEZBTFNFLAorCQkJCQlhZGRyZXNzLCBjb250ZXh0KTsKKworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOworfQorCiBBQ1BJX0VYUE9SVF9TWU1CT0woYWNwaV9pbnN0YWxsX2dwZV9oYW5kbGVyKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2luc3RhbGxfZ3BlX3Jhd19oYW5kbGVyCisgKgorICogUEFSQU1FVEVSUzogIGdwZV9kZXZpY2UgICAgICAtIE5hbWVzcGFjZSBub2RlIGZvciB0aGUgR1BFIChOVUxMIGZvciBGQURUCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lZCBHUEVzKQorICogICAgICAgICAgICAgIGdwZV9udW1iZXIgICAgICAtIFRoZSBHUEUgbnVtYmVyIHdpdGhpbiB0aGUgR1BFIGJsb2NrCisgKiAgICAgICAgICAgICAgdHlwZSAgICAgICAgICAgIC0gV2hldGhlciB0aGlzIEdQRSBzaG91bGQgYmUgdHJlYXRlZCBhcyBhbgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2UtIG9yIGxldmVsLXRyaWdnZXJlZCBpbnRlcnJ1cHQuCisgKiAgICAgICAgICAgICAgYWRkcmVzcyAgICAgICAgIC0gQWRkcmVzcyBvZiB0aGUgaGFuZGxlcgorICogICAgICAgICAgICAgIGNvbnRleHQgICAgICAgICAtIFZhbHVlIHBhc3NlZCB0byB0aGUgaGFuZGxlciBvbiBlYWNoIEdQRQorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPT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Z3BlKQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3NldF9ncGUKKyAqCisgKiBQQVJBTUVURVJTOiAgZ3BlX2RldmljZSAgICAgICAgICAtIFBhcmVudCBHUEUgRGV2aWNlLiBOVUxMIGZvciBHUEUwL0dQRTEKKyAqICAgICAgICAgICAgICBncGVfbnVtYmVyICAgICAgICAgIC0gR1BFIGxldmVsIHdpdGhpbiB0aGUgR1BFIGJsb2NrCisgKiAgICAgICAgICAgICAgYWN0aW9uICAgICAgICAgICAgICAtIEFDUElfR1BFX0VOQUJMRSBvciBBQ1BJX0dQRV9ESVNBQkxFCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBFbmFibGUgb3IgZGlzYWJsZSBhbiBpbmRpdmlkdWFsIEdQRS4gVGhpcyBmdW5jdGlvbiBieXBhc3NlcworICogICAgICAgICAgICAgIHRoZSByZWZlcmVuY2UgY291bnQgbWVjaGFuaXNtIHVzZWQgaW4gdGhlIGFjcGlfZW5hYmxlX2dwZSgpLAorICogICAgICAgICAgICAgIGFjcGlfZGlzYWJsZV9ncGUoKSBpbnRlcmZhY2VzLgorICogICAgICAgICAgICAgIFRoaXMgQVBJIGlzIHR5cGljYWxseSB1c2VkIGJ5IHRoZSBHUEUgcmF3IGhhbmRsZXIgbW9kZSBkcml2ZXIKKyAqICAgICAgICAgICAgICB0byBzd2l0Y2ggYmV0d2VlbiB0aGUgcG9sbGluZyBtb2RlIGFuZCB0aGUgaW50ZXJydXB0IG1vZGUgYWZ0ZXIKKyAqICAgICAgICAgICAgICB0aGUgZHJpdmVyIGhhcyBlbmFibGVkIHRoZSBHUEUuCisgKiAgICAgICAgICAgICAgVGhlIEFQSXMgc2hvdWxkIGJlIGludm9rZWQgaW4gdGhpcyBvcmRlcjoKKyA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Ky8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZmluaXNoX2dwZQorICoKKyAqIFBBUkFNRVRFUlM6ICBncGVfZGV2aWNlICAgICAgICAgIC0gTmFtZXNwYWNlIG5vZGUgZm9yIHRoZSBHUEUgQmxvY2sKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKE5VTEwgZm9yIEZBRFQgZGVmaW5lZCBHUEVzKQorICogICAgICAgICAgICAgIGdwZV9udW1iZXIgICAgICAgICAgLSBHUEUgbGV2ZWwgd2l0aGluIHRoZSBHUEUgYmxvY2sKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IENsZWFyIGFuZCBjb25kaXRpb25hbGx5IHJlZW5hYmxlIGEgR1BFLiBUaGlzIGNvbXBsZXRlcyB0aGUgR1BFCisgKiAgICAgICAgICAgICAgcHJvY2Vzc2luZy4gSW50ZW5kZWQgZm9yIHVzZSBieSBhc3luY2hyb25vdXMgaG9zdC1pbnN0YWxsZWQKKyAqICAgICAgICAgICAgICBHUEUgaGFuZGxlcnMuIFRoZSBHUEUgaXMgb25seSByZWVuYWJsZWQgaWYgdGhlIGVuYWJsZV9mb3JfcnVuIGJpdAorICogICAgICAgICAgICAgIGlzIHNldCBpbiB0aGUgR1BFIGluZm8uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2FjcGlfc3RhdHVzIGFjcGlfZmluaXNoX2dwZShhY3BpX2hhbmRsZSBncGVfZGV2aWNlLCB1MzIgZ3BlX251bWJlcikKK3sKKwlzdHJ1Y3QgYWNwaV9ncGVfZXZlbnRfaW5mbyAqZ3BlX2V2ZW50X2luZm87CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCWFjcGlfY3B1X2ZsYWdzIGZsYWdzOworCisJQUNQSV9GVU5DVElPTl9UUkFDRShhY3BpX2ZpbmlzaF9ncGUpOworCisJZmxhZ3MgPSBhY3BpX29zX2FjcXVpcmVfbG9jayhhY3BpX2dibF9ncGVfbG9jayk7CisKKwkvKiBFbnN1cmUgdGhhdCB3ZSBoYXZlIGEgdmFsaWQgR1BFIG51bWJlciAqLworCisJZ3BlX2V2ZW50X2luZm8gPSBhY3BpX2V2X2dldF9ncGVfZXZlbnRfaW5mbyhncGVfZGV2aWNlLCBncGVfbnVtYmVyKTsKKwlpZiAoIWdwZV9ldmVudF9pbmZvKSB7CisJCXN0YXR1cyA9IEFFX0JBRF9QQVJBTUVURVI7CisJCWdvdG8gdW5sb2NrX2FuZF9leGl0OworCX0KKworCXN0YXR1cyA9IGFjcGlfZXZfZmluaXNoX2dwZShncGVfZXZlbnRfaW5mbyk7CisKK3VubG9ja19hbmRfZXhpdDoKKwlhY3BpX29zX3JlbGVhc2VfbG9jayhhY3BpX2dibF9ncGVfbG9jaywgZmxhZ3MpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOworfQorCitBQ1BJX0VYUE9SVF9TWU1CT0woYWNwaV9maW5pc2hfZ3BlKQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZGlzYWJsZV9hbGxfZ3BlcwpAQCAtNjA0LDcgKzcxOCw2IEBACiAgKiAgICAgICAgICAgICAgYWxsIEdQRSBibG9ja3MuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMgYWNwaV9lbmFibGVfYWxsX3dha2V1cF9ncGVzKHZvaWQpCiB7CiAJYWNwaV9zdGF0d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0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL25zYXJndW1lbnRzLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9uc2FyZ3VtZW50cy5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2NvbnZlcnQuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvbnNjb252ZXJ0LmMKaW5kZXggYjU1NjQyYy4uMWE4YjM5YyAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2NvbnZlcnQuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zY29udmVydC5jCkBAIC02LDcgKzYsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0t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cmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL25zZXZhbC5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9uc2V2YWwuYwppbmRleCBlNjM0YTA1Li43YmNjNjhmIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL25zZXZhbC5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvbnNldmFsLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2luaXQuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvbnNpbml0LmMKaW5kZXggYTNmYjdlNC4uNGE4NWM0NSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2luaXQuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zaW5pdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0g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RyaXZlcnMvYWNwaS9hY3BpY2EvbnN4Zm5hbWUuYwppbmRleCA4YzZjMTFjLi5kNjZjMzI2IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL25zeGZuYW1lLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9uc3hmbmFtZS5jCkBAIC02LDcgKzYsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc3hmb2JqLmMgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zeGZvYmouYwppbmRleCBkYWU5NDAxLi43OTMzODM1IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL25zeGZvYmouYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zeGZvYmouYwpAQCAtNiw3ICs2LDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDE0LCBJbnRlbCBDb3JwLgorICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNSwgSW50ZWwgQ29ycC4KICAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CkBAIC01Myw1MCArNTMsNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2dldF9pZAotICoKLSAqIFBBUkFNRVRFUlM6ICBIYW5kbGUgICAgICAgICAgLSBIYW5kbGUgb2Ygb2JqZWN0IHdob3NlIGlkIGlzIGRlc2lyZWQKLSAqICAgICAgICAgICAgICByZXRfaWQgICAgICAgICAgLSBXaGVyZSB0aGUgaWQgd2lsbCBiZSBwbGFjZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRoaXMgcm91dGluZSByZXR1cm5zIHRoZSBvd25lciBpZCBhc3NvY2lhdGVkIHdpdGggYSBoYW5kbGUKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotYWNwaV9zdGF0dXMgYWNwaV9nZXRfaWQoYWNwaV9oYW5kbGUgaGFuZGxlLCBhY3BpX293bmVyX2lkICogcmV0X2lkKQotewotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwotCWFjcGlfc3RhdHVzIHN0YXR1czsKLQotCS8qIFBhcmFtZXRlciBWYWxpZGF0aW9uICovCi0KLQlpZiAoIXJldF9pZCkgewotCQlyZXR1cm4gKEFFX0JBRF9QQVJBTUVURVIpOwotCX0KLQotCXN0YXR1cyA9IGFjcGlfdXRfYWNxdWlyZV9tdXRleChBQ1BJX01UWF9OQU1FU1BBQ0UpOwotCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgewotCQlyZXR1cm4gKHN0YXR1cyk7Ci0JfQotCi0JLyogQ29udmVydCBhbmQgd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S1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3RieGZhY2UuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdGJ4ZmFjZS5jCmluZGV4IDY0ODJiMGQuLjYwZTk0ZjggMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdGJ4ZmFjZS5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdGJ4ZmFjZS5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtMjY1LDQ1ICsyNjUsNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3VubG9hZF90YWJsZV9pZAotICoKLSAqIFBBUkFNRVRFUlM6ICBpZCAgICAgICAgICAgIC0gT3duZXIgSUQgb2YgdGhlIHRhYmxlIHRvIGJlIHJlbW92ZWQuCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBUaGlzIHJvdXRpbmUgaXMgdXNlZCB0byBmb3JjZSB0aGUgdW5sb2FkIG9mIGEgdGFibGUgKGJ5IGlkKQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3RieGZyb290LmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS90Ynhmcm9vdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGFkZHJlc3MuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRhZGRyZXNzLmMKaW5kZXggYTFhY2VjOS4uMTI3OWY1MCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGFkZHJlc3MuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0YWRkcmVzcy5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpd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xvd3MgY29tcGlsZXIgbWFjcm9zIHN1Y2ggYXMgX19GVU5DVElPTl9fIHRvIGJlIHVzZWQKLSAqICAgICAgICAgICAgICB3aXRoIG5vIGNoYW5nZSB0byB0aGUgZGVidWcgb3V0cHV0LgorICogICAgICAgICAgICAgIFRoaXMgYWxsb3dzIGNvbXBpbGVyIG1hY3JvcyBzdWNoIGFzIF9fZnVuY19fIHRvIGJlIHVzZWQgd2l0aCBubworICogICAgICAgICAgICAgIGNoYW5nZSB0byB0aGUgZGVidWcgb3V0cHV0LgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRkZWNvZGUuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRkZWNvZGUuYwppbmRleCA0MGU5MjNlLi45ODhlMjNiIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0ZGVjb2RlLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGRlY29kZS5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGRlbGV0ZS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS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bG9jay5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGxvY2suYwppbmRleCBkYzZlOTY1Li4wODlmNzhiIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bG9jay5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRsb2NrLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDE0LCBJbnRlbCBDb3JwLgorICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNSwgSW50ZWwgQ29ycC4KICAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bWF0aC5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dG1hdGguYwppbmRleCBkNDRkZWU2Li5mOWZmMTAwIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bWF0aC5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRtYXRoLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxNCwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTUsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2U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k7CiBzdGF0aWMgdm9pZCBzdGFydF9raHdybmdkKHZvaWQpOwogCiBzdGF0aWMgaW5saW5lIGludCBybmdfZ2V0X2RhdGEoc3RydWN0IGh3cm5nICpybmcsIHU4ICpidWZmZXIsIHNpemVfdCBzaXplLApAQCAtODEsMTMgKzg3LDgzIEBACiAJdW5zaWduZWQgY2hhciBieXRlc1sxNl07CiAJaW50IGJ5dGVzX3JlYWQ7CiAKKwltdXRleF9sb2NrKCZyZWFkaW5nX211dGV4KTsKIAlieXRlc19yZWFkID0gcm5nX2dldF9kYXRhKHJuZywgYnl0ZXMsIHNpemVvZihieXRlcyksIDEpOworCW11dGV4X3VubG9jaygmcmVhZGluZ19tdXRleCk7CiAJaWYgKGJ5dGVzX3JlYWQgPiAwKQogCQlhZGRfZGV2aWNlX3JhbmRvbW5lc3MoYnl0ZXMsIGJ5dGVzX3JlYWQpOwogfQogCi1zdGF0aWMgaW5saW5lIGludCBod3JuZ19pbml0KHN0cnVjdCBod3JuZyAqcm5nKQorc3RhdGljIGlubGluZSB2b2lkIGNsZWFudXBfcm5nKHN0cnVjdCBrcmVmICprcmVmKQogeworCXN0cnVjdCBod3JuZyAqcm5nID0gY29udGFpbmVyX29mKGtyZWYsIHN0cnVjdCBod3JuZywgcmVmKTsKKworCWlmIChybmctPmNsZWFudXApCisJCXJuZy0+Y2xlYW51cChybmcpOworCisJY29tcGxldGUoJnJuZy0+Y2xlYW51cF9kb25lKTsKK30KKworc3RhdGljIGludCBzZXRfY3VycmVudF9ybmcoc3RydWN0IGh3cm5nICpybmcpCit7CisJaW50IGVycjsKKworCUJVR19PTighbXV0ZXhfaXNfbG9ja2VkKCZybmdfbXV0ZXgpKTsKKworCWVyciA9IGh3cm5nX2luaXQocm5nKTsKKwlpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJZHJvcF9jdXJyZW50X3JuZygpOworCWN1cnJlbnRfcm5nID0gcm5nOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkIGRyb3BfY3VycmVudF9ybmcodm9pZCkKK3sKKwlCVUdfT04oIW11dGV4X2lzX2xvY2tlZCgmcm5nX211dGV4KSk7CisJaWYgKCFjdXJyZW50X3JuZykKKwkJcmV0dXJuOworCisJLyogZGVjcmVhc2UgbGFzdCByZWZlcmVuY2UgZm9yIHRyaWdnZXJpbmcgdGhlIGNsZWFudXAgKi8KKwlrcmVmX3B1dCgmY3VycmVudF9ybmctPnJlZiwgY2xlYW51cF9ybmcpOworCWN1cnJlbnRfcm5nID0gTlVMTDsKK30KKworLyogUmV0dXJucyBFUlJfUFRSKCksIE5VTEwgb3IgcmVmY291bnRlZCBod3JuZyAqLworc3RhdGljIHN0cnVjdCBod3JuZyAqZ2V0X2N1cnJlbnRfcm5nKHZvaWQpCit7CisJc3RydWN0IGh3cm5nICpybmc7CisKKwlpZiAobXV0ZXhfbG9ja19pbnRlcnJ1cHRpYmxlKCZybmdfbXV0ZXgpKQorCQlyZXR1cm4gRVJSX1BUUigtRVJFU1RBUlRTWVMpOworCisJcm5nID0gY3VycmVudF9ybmc7CisJaWYgKHJuZykKKwkJa3JlZl9nZXQoJnJuZy0+cmVmKTsKKworCW11dGV4X3VubG9jaygmcm5nX211dGV4KTsKKwlyZXR1cm4gcm5nOworfQorCitzdGF0aWMgdm9pZCBwdXRfcm5nKHN0cnVjdCBod3JuZyAqcm5nKQoreworCS8qCisJICogSG9sZCBybmdfbXV0ZXggaGVyZSBzbyB3ZSBzZXJpYWxpemUgaW4gY2FzZSB0aGV5IHNldF9jdXJyZW50X3JuZworCSAqIG9uIHJuZyBhZ2FpbiBpbW1lZGlhdGVseS4KKwkgKi8KKwltdXRleF9sb2NrKCZybmdfbXV0ZXgpOworCWlmIChybmcpCisJCWtyZWZfcHV0KCZybmctPnJlZiwgY2xlYW51cF9ybmcpOworCW11dGV4X3VubG9jaygmcm5nX211dGV4KTsKK30KKworc3RhdGljIGludCBod3JuZ19pbml0KHN0cnVjdCBod3JuZyAqcm5nKQoreworCWl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ELAkJLyogMTc0ICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE3NSAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxNzYgKi8KKwlUUE1fTE9ORywJCS8qIDE3NyAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxNzggKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMTc5ICovCisJVFBNX01FRElVTSwJCS8qIDE3YSAqLworCVRQTV9MT05HLAkJLyogMTdiICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE3YyAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxN2QgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMTdlICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE3ZiAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxODAgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMTgxICovCisJVFBNX01FRElVTSwJCS8qIDE4MiAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxODMgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMTg0ICovCisJVFBNX01FRElVTSwJCS8qIDE4NSAqLworCVRQTV9NRURJVU0sCQkvKiAxODYgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMTg3ICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE4OCAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxODkgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMThhICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE4YiAqLworCVRQTV9VTkRFRklORUQsCQkvKiAxOGMgKi8KKwlUUE1fVU5ERUZJTkVELAkJLyogMThkICovCisJVFBNX1VOREVGSU5FRCwJCS8qIDE4ZSAqLworCVRQTV9VTkRFRklORUQJCS8qIDE4ZiAqLworfTsKKworI2RlZmluZSBUUE0yX1BDUl9SRUFEX0lOX1NJWkUgXAorCShzaXplb2Yoc3RydWN0IHRwbV9pbnB1dF9oZWFkZXIpICsgXAorCSBzaXplb2Yoc3RydWN0IHRwbTJfc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RS4KLSAqICAgICAgICAgICAgICAgICAgICAgSW50ZXJydXB0IGFyZSBtYXNrZWQgYnkgRURHRV9NQVNLIHJlZ2lzdGVycy4KKyAqCQkgICAgICAgSW50ZXJydXB0IGFyZSBtYXNrZWQgYnkgRURHRV9NQVNLIHJlZ2lzdGVycy4KICAqIEJvdGgtZWRnZSBoYW5kbGVyczogU2ltaWxhciB0byByZWd1bGFyIEVkZ2UgaGFuZGxlcnMsIGJ1dCBhbHNvIHN3YXBzCi0gKiAgICAgICAgICAgICAgICAgICAgIHRoZSBwb2xhcml0eSB0byBjYXRjaCB0aGUgbmV4dCBsaW5lIHRyYW5zYWN0aW9uLgotICogICAgICAgICAgICAgICAgICAgICBUaGlzIGlzIGEgcmFjZSBjb25kaXRpb24gdGhhdCBtaWdodCBub3QgcGVyZmVjdGx5Ci0gKiAgICAgICAgICAgICAgICAgICAgIHdvcmsgb24gc29tZSB1c2UgY2FzZXMuCisgKgkJICAgICAgIHRoZSBwb2xhcml0eSB0byBjYXRjaCB0aGUgbmV4dCBsaW5lIHRyYW5zYWN0aW9uLgorICoJCSAgICAgICBUaGlzIGlzIGEgcmFjZSBjb25kaXRpb24gdGhhdCBtaWdodCBub3QgcGVyZmVjdGx5CisgKgkJICAgICAgIHdvcmsgb24gc29tZSB1c2UgY2FzZXMuCiAgKgogICogRXZlcnkgZWlnaHQgR1BJTyBsaW5lcyBhcmUgZ3JvdXBlZCAoT1InZWQpIGJlZm9yZSBnb2luZyB1cCB0byBtYWluCiAgKiBjYXVzZSByZWdpc3Rlci4KICAqCi0gKiAgICAgICAgICAgICAgICAgICAgRURHRSAgY2F1c2UgICAgbWFzawotICogICAgICAgIGRhdGEtaW4gICAvLS0tLS0tLS18IHwtLS0tLXwgfC0tLS1cCi0gKiAgICAgLS0tLS18IHwtLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tIHRvIG1haW4gY2F1c2UgcmVnCi0gKiAgICAgICAgICAgWCAgICAgIFwtLS0tLS0tLS0tLS0tLS0tfCB8LS0tLS8KLSAqICAgICAgICBwb2xhcml0eSAgICBMRVZFTCAgICAgICAgICBtYXNrCisgKgkJICAgICAgRURHRSAgY2F1c2UgICAgbWFzaworICoJICBkYXRhLWluICAgLy0tLS0tLS0tfCB8LS0tLS18IHwtLS0tXAorICogICAgIC0tLS0tfCB8LS0tLS0JCQkgICAgIC0tLS0gdG8gbWFpbiBjYXVzZSByZWcKKyAqCSAgICAgWAkgICAgXC0tLS0tLS0tLS0tLS0tLS18IHwtLS0tLworICoJICBwb2xhcml0eSAgICBMRVZFTAkgICAgIG1hc2sKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtMzk0LDkgKzQwMSw4IEBACiAJcGluID0gZC0+aHdpcnE7CiAKIAl1ID0gcmVhZGxfcmVsYXhlZChtdmVidV9ncGlvcmVnX2lvX2NvbmYobXZjaGlwKSkgJiAoMSA8PCBwaW4pOwotCWlmICghdSkgeworCWlmICghdSkKIAkJcmV0dXJuIC1FSU5WQUw7Ci0JfQogCiAJdHlwZSAmPSBJUlFfVFlQRV9TRU5TRV9NQVNLOwogCWlmICh0eXBlID09IElSUV9UWVBFX05PTkUpCkBAIC01MjksMTMgKzUzNSwxMyBAQAogCQkJICAgKGRhdGFfaW4gXiBpbl9wb2wpICYgbXNrICA/ICJoaSIgOiAibG8iLAogCQkJICAgaW5fcG9sICYgbXNrID8gImxvIiA6ICJoaSIpOwogCQlpZiAoISgoZWRnX21zayB8IGx2bF9tc2spICYgbXNrKSkgewotCQkJc2VxX3ByaW50ZihzLCAiIGRpc2FibGVkXG4iKTsKKwkJCXNlcV9wdXRzKHMsICIgZGlzYWJsZWRcbiIpOwogCQkJY29udGludWU7CiAJCX0KIAkJaWYgKGVkZ19tc2sgJiBtc2spCi0JCQlzZXFfcHJpbnRmKHMsICIgZWRnZSAiKTsKKwkJCXNlcV9wdXRzKHM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vY19wZ3RhYmxlX3MyKGNmZywgY29va2llKTsKKwlpZiAoaW9wKQorCQljZmctPmFybV9scGFlX3MyX2NmZy52dGNyICY9IDB4ZmZmZmZmZmY7CisKKwlyZXR1cm4gaW9wOworfQorCitzdHJ1Y3QgaW9fcGd0YWJsZV9pbml0X2ZucyBpb19wZ3RhYmxlX2FybV82NF9scGFlX3MxX2luaXRfZm5zID0geworCS5hbGxvYwk9IGFybV82NF9scGFlX2FsbG9jX3BndGFibGVfczEsCisJLmZyZWUJPSBhcm1fbHBhZV9mcmVlX3BndGFibGUsCit9OworCitzdHJ1Y3QgaW9fcGd0YWJsZV9pbml0X2ZucyBpb19wZ3RhYmxlX2FybV82NF9scGFlX3MyX2luaXRfZm5zID0geworCS5hbGxvYwk9IGFybV82NF9scGFlX2FsbG9jX3BndGFibGVfczIsCisJLmZyZWUJPSBhcm1fbHBhZV9mcmVlX3BndGFibGUsCit9OworCitzdHJ1Y3QgaW9fcGd0YWJsZV9pbml0X2ZucyBpb19wZ3RhYmxlX2FybV8zMl9scGFlX3MxX2luaXRfZm5zID0geworCS5hbGxvYwk9IGFybV8zMl9scGFlX2FsbG9jX3BndGFibGVfczEsCisJLmZyZWUJPSBhcm1fbHBhZV9mcmVlX3BndGFibGUsCit9OworCitzdHJ1Y3QgaW9fcGd0YWJsZV9pbml0X2ZucyBpb19wZ3RhYmxlX2FybV8zMl9scGFlX3MyX2luaXRfZm5zID0geworCS5hbGxvYwk9IGFybV8zMl9scGFlX2FsbG9jX3BndGFibGVfczIsCisJLmZyZWUJPSBhcm1fbHBhZV9mcmVlX3BndGFibGUsCit9OworCisjaWZkZWYgQ09ORklHX0lPTU1VX0lPX1BHVEFCTEVfTFBBRV9TRUxGVEVTVAorCitzdGF0aWMgc3RydWN0IGlvX3BndGFibGVfY2ZnICpjZmdfY29va2llOworCitzdGF0aWMgdm9pZCBkdW1teV90bGJfZmx1c2hfYWxsKHZvaWQgKmNvb2tpZSkKK3sKKwlXQVJOX09OKGNvb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cml0ZSh2b2lkICpjb250ZXh0LCBjb25zdCB2b2lkICpyZWcsCisJCQkJICAgICAgIHNpemVfdCByZWdfbGVuLCBjb25zdCB2b2lkICp2YWwsCisJCQkJICAgICAgIHNpemVfdCB2YWxfbGVuKQoreworCXN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQgPSBjb250ZXh0OworCWludCByZXQ7CisJdTggYnVmWzI1Nl07CisJc3RydWN0IGkyY19tc2cgbXNnWzFdID0geworCQl7CisJCQkuYWRkciA9IGNsaWVudC0+YWRkciwKKwkJCS5mbGFncyA9IDAsCisJCQkubGVuID0gMSArIHZhbF9sZW4sCisJCQkuYnVmID0gYnVmLAorCQl9CisJfTsKKworCWJ1ZlswXSA9ICoodTggY29uc3QgKilyZWc7CisJbWVtY3B5KCZidWZbMV0sIHZhbCwgdmFsX2xlbik7CisKKwlyZXQgPSBfX2kyY190cmFuc2ZlcihjbGllbnQtPmFkYXB0ZXIsIG1zZywgMSk7CisJaWYgKHJldCAhPSAxKSB7CisJCWRldl93YXJuKCZjbGllbnQtPmRldiwgImkyYyByZWcgd3JpdGUgZmFpbGVkICVkXG4iLCByZXQpOworCQlpZiAocmV0ID49IDApCisJCQlyZXQgPSAtRVJFTU9URUlPOworCQlyZXR1cm4gcmV0OworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBydGwyODMwX3Byb2JlKHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsCisJCQkgY29uc3Qgc3RydWN0IGkyY19kZXZpY2VfaWQgKmlkKQoreworCXN0cnVjdCBydGwyODMwX3BsYXRmb3JtX2RhdGEgKnBkYXRhID0gY2xpZW50LT5kZXYucGxhdGZvcm1fZGF0YTsKKwlzdHJ1Y3QgcnRsMjgzMF9kZXYgKmRldjsKKwlpbnQgcmV0OworCXU4IHU4dG1wOworCXN0YXRpYyBjb25zdCBzdHJ1Y3QgcmVnbWFwX2J1cyByZWdtYXBfYnVzID0geworCQkucmVhZCA9IHJ0bDI4MzBfc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CisJCQkgICAgICAgc2l6ZV90IHJlZ19zaXplLCB2b2lkICp2YWxfYnVmLCBzaXplX3QgdmFsX3NpemUpCit7CisJc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCA9IGNvbnRleHQ7CisJaW50IHJldDsKKwlzdHJ1Y3QgaTJjX21zZyBtc2dbMl0gPSB7CisJCXsKKwkJCS5hZGRyID0gY2xpZW50LT5hZGRyLAorCQkJLmZsYWdzID0gMCwKKwkJCS5sZW4gPSByZWdfc2l6ZSwKKwkJCS5idWYgPSAodTggKilyZWdfYnVmLAorCQl9LCB7CisJCQkuYWRkciA9IGNsaWVudC0+YWRkciwKKwkJCS5mbGFncyA9IEkyQ19NX1JELAorCQkJLmxlbiA9IHZhbF9zaXplLAorCQkJLmJ1ZiA9IHZhbF9idWYsCisJCX0KKwl9OworCisJcmV0ID0gX19pMmNfdHJhbnNmZXIoY2xpZW50LT5hZGFwdGVyLCBtc2csIDIpOworCWlmIChyZXQgIT0gMikgeworCQlkZXZfd2FybigmY2xpZW50LT5kZXYsICJpMmMgcmVnIHJlYWQgZmFpbGVkICVkXG4iLCByZXQpOworCQlpZiAocmV0ID49IDApCisJCQlyZXQgPSAtRVJFTU9URUlPOworCQlyZXR1cm4gcmV0OworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBydGwyODMyX3JlZ21hcF93cml0ZSh2b2lkICpjb250ZXh0LCBjb25zdCB2b2lkICpkYXRhLCBzaXplX3QgY291bnQpCit7CisJc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCA9IGNvbnRleHQ7CisJaW50IHJldDsKKwlzdHJ1Y3QgaTJjX21zZyBtc2dbMV0gPSB7CisJCXsKKwkJCS5hZGRyID0gY2xpZW50LT5hZGRyLAorCQkJLmZsYWdzID0gMCwKKwkJCS5sZW4gPSBjb3VudCwKKwkJCS5idWYgPSAodTggKilkYXRhLAorCQl9CisJfTsKKworCXJldCA9IF9faTJjX3RyYW5zZmVyKGNsaWVudC0+YWRhcHRlciwgbXNnLCAxKTsKKwlpZiAocmV0ICE9IDEpIHsKKwkJZGV2X3dhcm4oJmNsaWVudC0+ZGV2LCAiaTJjIHJlZyB3cml0ZSBmYWlsZWQgJWRcbiIsIHJldCk7CisJCWlmIChyZXQgPj0gMCkKKwkJCXJldCA9IC1FUkVNT1RFSU87CisJCXJldHVybiByZXQ7CisJfQorCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJ0bDI4MzJfcmVnbWFwX2dhdGhlcl93cml0ZSh2b2lkICpjb250ZXh0LCBjb25zdCB2b2lkICpyZWcsCisJCQkJICAgICAgIHNpemVfdCByZWdfbGVuLCBjb25zdCB2b2lkICp2YWwsCisJCQkJICAgICAgIHNpemVfdCB2YWxfbGVuKQoreworCXN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQgPSBjb250ZXh0OworCWludCByZXQ7CisJdTggYnVmWzI1Nl07CisJc3RydWN0IGkyY19tc2cgbXNnWzFdID0geworCQl7CisJCQkuYWRkciA9IGNsaWVudC0+YWRkciwKKwkJCS5mbGFncyA9IDAsCisJCQkubGVuID0gMSArIHZhbF9sZW4sCisJCQkuYnVmID0gYnVmLAorCQl9CisJfTsKKworCWJ1ZlswXSA9ICoodTggY29uc3QgKilyZWc7CisJbWVtY3B5KCZidWZbMV0sIHZhbCwgdmFsX2xlbik7CisKKwlyZXQgPSBfX2kyY190cmFuc2ZlcihjbGllbnQtPmFkYXB0ZXIsIG1zZywgMSk7CisJaWYgKHJldCAhPSAxKSB7CisJCWRldl93YXJuKCZjbGllbnQtPmRldiwgImkyYyByZWcgd3JpdGUgZmFpbGVkICVkXG4iLCByZXQpOworCQlpZiAocmV0ID49IDApCisJCQlyZXQgPSAtRVJFTU9URUlPOworCQlyZXR1cm4gcmV0OworCX0KKwlyZXR1cm4gMDsKK30KKworLyoKKyAqIEZJWE1FOiBIYWNrLiBJbXBsZW1lbnQgb3duIHJlZ21hcCBsb2NraW5nIGluIG9yZGVyIHRvIHNpbGVuY2UgbG9ja2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lNfRklMRShyc3NfY29uZmlnKTsKKworLyogUlNTIFNlY3JldCBLZXkuCisgKi8KKworc3RhdGljIGludCByc3Nfa2V5X3Nob3coc3RydWN0IHNlcV9maWxlICpzZXEsIHZvaWQgKnYpCit7CisJdTMyIGtleVsxMF07CisKKwl0NF9yZWFkX3Jzc19rZXkoc2VxLT5wcml2YXRlLCBrZXkpOworCXNlcV9wcmludGYoc2VxLCAiJTA4eCUwOHglMDh4JTA4eCUwOHglMDh4JTA4eCUwOHglMDh4JTA4eFxuIiwKKwkJICAga2V5WzldLCBrZXlbOF0sIGtleVs3XSwga2V5WzZdLCBrZXlbNV0sIGtleVs0XSwga2V5WzNdLAorCQkgICBrZXlbMl0sIGtleVsxXSwga2V5WzBdKTsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCByc3Nfa2V5X29wZW4oc3RydWN0IGlub2RlICppbm9kZSwgc3RydWN0IGZpbGUgKmZpbGUpCit7CisJcmV0dXJuIHNpbmdsZV9vcGVuKGZpbGUsIHJzc19rZXlfc2hvdywgaW5vZGUtPmlfcHJpdmF0ZSk7Cit9CisKK3N0YXRpYyBzc2l6ZV90IHJzc19rZXlfd3JpdGUoc3RydWN0IGZpbGUgKmZpbGUsIGNvbnN0IGNoYXIgX191c2VyICpidWYsCisJCQkgICAgIHNpemVfdCBjb3VudCwgbG9mZl90ICpwb3MpCit7CisJaW50IGksIGo7CisJdTMyIGtleVsxMF07CisJY2hhciBzWzEwMF0sICpwOworCXN0cnVjdCBhZGFwdGVyICphZGFwID0gRklMRV9EQVRBKGZpbGUpLT5pX3ByaXZhdGU7CisKKwlpZiAoY291bnQgPiBzaXplb2YocykgLSAxKQorCQlyZXR1cm4gLUVJTlZBTDsKKwlpZiAoY29weV9mcm9tX3VzZXIocywgYnVmLCBjb3VudCkpCisJCXJldHVybiAtRUZBVUxUOworCWZvciAoaSA9IGNvdW50OyBpID4gMCAmJiBpc3NwYWNlKHNbaSAtIDFdKTsgaS0tKQorCQk7CisJc1t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luZSAgRVJSX0RST1BQRURfREIgICAgICAgICAgICAweDAwMDQwMDAwVQotI2RlZmluZSAgRVJSX0RBVEFfQ1BMX09OX0hJR0hfUUlEMSAweDAwMDIwMDAwVQotI2RlZmluZSAgRVJSX0RBVEFfQ1BMX09OX0hJR0hfUUlEMCAweDAwMDEwMDAwVQotI2RlZmluZSAgRVJSX0JBRF9EQl9QSURYMyAgICAgICAgICAweDAwMDA4MDAwVQotI2RlZmluZSAgRVJSX0JBRF9EQl9QSURYMiAgICAgICAgICAweDAwMDA0MDAwVQotI2RlZmluZSAgRVJSX0JBRF9EQl9QSURYMSAgICAgICAgICAweDAwMDAyMDAwVQotI2RlZmluZSAgRVJSX0JBRF9EQl9QSURYMCAgICAgICAgICAweDAwMDAxMDAwVQotI2RlZmluZSAgRVJSX0lOR19QQ0lFX0NIQU4gICAgICAgICAweDAwMDAwODAwVQotI2RlZmluZSAgRVJSX0lOR19DVFhUX1BSSU8gICAgICAgICAweDAwMDAwNDAwVQotI2RlZmluZSAgRVJSX0VHUl9DVFhUX1BSSU8gICAgICAgICAweDAwMDAwMjAwVQotI2RlZmluZSAgREJGSUZPX0hQX0lOVCAgICAgICAgICAgICAweDAwMDAwMTAwVQotI2RlZmluZSAgREJGSUZPX0xQX0lOVCAgICAgICAgICAgICAweDAwMDAwMDgwVQotI2RlZmluZSAgUkVHX0FERFJFU1NfRVJSICAgICAgICAgICAweDAwMDAwMDQwVQotI2RlZmluZSAgSU5HUkVTU19TSVpFX0VSUiAgICAgICAgICAweDAwMDAwMDIwVQotI2RlZmluZSAgRUdSRVNTX1NJWkVfRVJSICAgICAgICAgICAweDAwMDAwMDEwVQotI2RlZmluZSAgRVJSX0lOVl9DVFhUMyAgICAgICAgICAgICAweDAwMDAwMDA4VQotI2RlZmluZSAgRVJSX0lOVl9DVFhUMiAgICAgICAgICAgICAweDAwMDAwMDA0VQotI2RlZmluZSAgRVJSX0lOVl9DVFhUMSAgICAgICAgICAgICAweDAwMDAwMDAyVQotI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9BIDB4NDAKKyNkZWZpbmUgVFBfUlNTX1BGMF9DT05GSUdfQSAweDMwCisjZGVmaW5lIFRQX1JTU19QRl9NQVBfQSAweDM4CisjZGVmaW5lIFRQX1JTU19QRl9NU0tfQSAweDM5CisKKyNkZWZpbmUgUEYxTEtQSURYX1MgICAgMworCisjZGVmaW5lIFBGMExLUElEWF9NICAgIDB4N1UKKworI2RlZmluZSBQRjFNU0tTSVpFX1MgICAgNAorI2RlZmluZSBQRjFNU0tTSVpFX00gICAgMHhmVQorCisjZGVmaW5lIENITkNPVU5UM19TICAgIDMxCisjZGVmaW5lIENITkNPVU5UM19WKHgpICgoeCkgPDwgQ0hOQ09VTlQzX1MpCisjZGVmaW5lIENITkNPVU5UM19GICAgIENITkNPVU5UM19WKDFVKQorCisjZGVmaW5lIENITkNPVU5UMl9TICAgIDMwCisjZGVmaW5lIENITkNPVU5UMl9WKHgpICgoeCkgPDwgQ0hOQ09VTlQyX1MpCisjZGVmaW5lIENITkNPVU5UMl9GICAgIENITkNPVU5UMl9WKDFVKQorCisjZGVmaW5lIENITkNPVU5UMV9TICAgIDI5CisjZGVmaW5lIENITkNPVU5UMV9WKHgpICgoeCkgPDwgQ0hOQ09VTlQxX1MpCisjZGVmaW5lIENITkNPVU5UMV9GICAgIENITkNPVU5UMV9WKDFVKQorCisjZGVmaW5lIENITkNPVU5UMF9TICAgIDI4CisjZGVmaW5lIENITkNPVU5UMF9WKHgpICgoeCkgPDwgQ0hOQ09VTlQwX1MpCisjZGVmaW5lIENITkNPVU5UMF9GICAgIENITkNPVU5UMF9WKDFVKQorCisjZGVmaW5lIENITlVOREZMT1czX1MgICAgMjcKKyNkZWZpbmUgQ0hOVU5ERkxPVzNfVih4KSAoKHgpIDw8IENITlVOREZMT1czX1MpCisjZGVmaW5lIENITlVOREZMT1czX0YgICAgQ0hOVU5ERkxPVzNfVigxVSkKKworI2RlZmluZSBDSE5VTkRGTE9XMl9TICAgIDI2CisjZGVmaW5lIENITlVOREZMT1cy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BkZWZpbmVkKENPTkZJR19BVEFSSSkKKworI2RlZmluZSBTTUNfQ0FOX1VTRV84QklUICAgICAgICAxCisjZGVmaW5lIFNNQ19DQU5fVVNFXzE2QklUICAgICAgIDEKKyNkZWZpbmUgU01DX0NBTl9VU0VfMzJCSVQgICAgICAgMQorI2RlZmluZSBTTUNfTk9XQUlUICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgU01DX2luYihhLCByKSAgICAgICAgICAgcmVhZGIoKGEpICsgKHIpKQorI2RlZmluZSBTTUNfaW53KGEsIHIpICAgICAgICAgICByZWFkdygoYSkgKyAocikpCisjZGVmaW5lIFNNQ19pbmwoYSwgcikgICAgICAgICAgIHJlYWRsKChhKSArIChyKSkKKyNkZWZpbmUgU01DX291dGIodiwgYSwgcikgICAgICAgd3JpdGViKHYsIChhKSArIChyKSkKKyNkZWZpbmUgU01DX291dHcodiwgYSwgcikgICAgICAgd3JpdGV3KHYsIChhKSArIChyKSkKKyNkZWZpbmUgU01DX291dGwodiwgYSwgcikgICAgICAgd3JpdGVsKHYsIChhKSArIChyKSkKKyNkZWZpbmUgU01DX2luc3coYSwgciwgcCwgbCkgICAgcmVhZHN3KChhKSArIChyKSwgcCwgbCkKKyNkZWZpbmUgU01DX291dHN3KGEsIHIsIHAsIGwpICAgd3JpdGVzdygoYSkgKyAociksIHAsIGwpCisjZGVmaW5lIFNNQ19pbnNsKGEsIHIsIHAsIGwpICAgIHJlYWRzbCgoYSkgKyAociksIHAsIGwpCisjZGVmaW5lIFNNQ19vdXRzbChhLCByLCBwLCBsKSAgIHdyaXRlc2woKGEpICsgKHIpLCBwLCBsKQorCisjZGVmaW5lIFJQQ19MU0FfREVGQVVMVCAgICAgICAgIFJQQ19MRURfMTAwXzEwCisjZGVmaW5lIFJQQ19MU0JfREVGQVVMVCAgICAgICAgIFJQQ19MRURfVFhfUlgKKwogI2VsaWYgZGVmaW5lZChDT05GSUdfQVJDSF9NU00pCiAKICNkZWZpbmUgU01DX0NBTl9VU0V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0KQoreworCXN0cnVjdCBza19idWZmICpza2I7CisKKwlpZiAoIWFyLT53bWkub3BzLT5nZW5fcGRldl9zdXNwZW5kKQorCQlyZXR1cm4gLUVPUE5PVFNVUFA7CisKKwlza2IgPSBhci0+d21pLm9wcy0+Z2VuX3BkZXZfc3VzcGVuZChhciwgc3VzcGVuZF9vcHQpOworCWlmIChJU19FUlIoc2tiKSkKKwkJcmV0dXJuIFBUUl9FUlIoc2tiKTsKKworCXJldHVybiBhdGgxMGtfd21pX2NtZF9zZW5kKGFyLCBza2IsIGFyLT53bWkuY21kLT5wZGV2X3N1c3BlbmRfY21kaWQpOworfQorCitzdGF0aWMgaW5saW5lIGludAorYXRoMTBrX3dtaV9wZGV2X3Jlc3VtZV90YXJnZXQoc3RydWN0IGF0aDEwayAqYXIpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKworCWlmICghYXItPndtaS5vcHMtPmdlbl9wZGV2X3Jlc3VtZSkKKwkJcmV0dXJuIC1FT1BOT1RTVVBQOworCisJc2tiID0gYXItPndtaS5vcHMtPmdlbl9wZGV2X3Jlc3VtZShhcik7CisJaWYgKElTX0VSUihza2IpKQorCQlyZXR1cm4gUFRSX0VSUihza2IpOworCisJcmV0dXJuIGF0aDEwa193bWlfY21kX3NlbmQoYXIsIHNrYiwgYXItPndtaS5jbWQtPnBkZXZfcmVzdW1lX2NtZGlkKTsKK30KKworc3RhdGljIGlubGluZSBpbnQKK2F0aDEwa193bWlfcGRldl9zZXRfcGFyYW0oc3RydWN0IGF0aDEwayAqYXIsIHUzMiBpZCwgdTMyIHZhbHVlKQoreworCXN0cnVjdCBza19idWZmICpza2I7CisKKwlpZiAoIWFyLT53bWkub3BzLT5nZW5fcGRldl9zZXRfcGFyYW0pCisJCXJldHVybiAtRU9QTk9UU1VQUDsKKworCXNrYiA9IGFyLT53bWkub3BzLT5nZW5fcGRldl9zZXRfcGFyYW0oYXIsIGlkLCB2YWx1ZSk7CisJaWYgKElTX0VSUihza2IpKQor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FtICphYzsKKwlzdHJ1Y3Qgd21pX3RsdiAqdGx2OworCXN0cnVjdCBza19idWZmICpza2I7CisJc2l6ZV90IGxlbjsKKwlzaXplX3QgYWNfdGx2X2xlbjsKKwl2b2lkICpwdHI7CisJaW50IGk7CisKKwlhY190bHZfbGVuID0gbnVtX2FjICogKHNpemVvZigqdGx2KSArIHNpemVvZigqYWMpKTsKKwlsZW4gPSBzaXplb2YoKnRsdikgKyBzaXplb2YoKmNtZCkgKworCSAgICAgIHNpemVvZigqdGx2KSArIGFjX3Rsdl9sZW47CisJc2tiID0gYXRoMTBrX3dtaV9hbGxvY19za2IoYXIsIGxlbik7CisJaWYgKCFza2IpCisJCXJldHVybiBFUlJfUFRSKC1FTk9NRU0pOworCisJcHRyID0gKHZvaWQgKilza2ItPmRhdGE7CisJdGx2ID0gcHRyOworCXRsdi0+dGFnID0gX19jcHVfdG9fbGUxNihXTUlfVExWX1RBR19TVFJVQ1RfU1RBX1VBUFNEX0FVVE9fVFJJR19DTUQpOworCXRsdi0+bGVuID0gX19jcHVfdG9fbGUxNihzaXplb2YoKmNtZCkpOworCWNtZCA9ICh2b2lkICopdGx2LT52YWx1ZTsKKwljbWQtPnZkZXZfaWQgPSBfX2NwdV90b19sZTMyKHZkZXZfaWQpOworCWNtZC0+bnVtX2FjID0gX19jcHVfdG9fbGUzMihudW1fYWMpOworCWV0aGVyX2FkZHJfY29weShjbWQtPnBlZXJfbWFjYWRkci5hZGRyLCBwZWVyX2FkZHIpOworCisJcHRyICs9IHNpemVvZigqdGx2KTsKKwlwdHIgKz0gc2l6ZW9mKCpjbWQpOworCisJdGx2ID0gcHRyOworCXRsdi0+dGFnID0gX19jcHVfdG9fbGUxNihXTUlfVExWX1RBR19BUlJBWV9TVFJVQ1QpOworCXRsdi0+bGVuID0gX19jcHVfdG9fbGUxNihhY190bHZfbGVuKTsKKwlhYyA9ICh2b2lkICopdGx2LT52YWx1ZTsKKworCXB0ciArPSBzaXplb2YoKnRsdik7CisJZm9y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X1NUUlVDVF9CQ05fUFJCX0lORk8pOworCXRsdi0+bGVuID0gX19jcHVfdG9fbGUxNihzaXplb2YoKmluZm8pKTsKKwlpbmZvID0gKHZvaWQgKil0bHYtPnZhbHVlOworCWluZm8tPmNhcHMgPSAwOworCWluZm8tPmVycCA9IDA7CisKKwlwdHIgKz0gc2l6ZW9mKCp0bHYpOworCXB0ciArPSBzaXplb2YoKmluZm8pOworCisJdGx2ID0gcHRyOworCXRsdi0+dGFnID0gX19jcHVfdG9fbGUxNihXTUlfVExWX1RBR19BUlJBWV9CWVRFKTsKKwl0bHYtPmxlbiA9IF9fY3B1X3RvX2xlMTYocm91bmR1cChwcmItPmxlbiwgNCkpOworCW1lbWNweSh0bHYtPnZhbHVlLCBwcmItPmRhdGEsIHByYi0+bGVuKTsKKworCWF0aDEwa19kYmcoYXIsIEFUSDEwS19EQkdfV01JLCAid21pIHRsdiBwcmIgdG1wbCB2ZGV2X2lkICVpXG4iLAorCQkgICB2ZGV2X2lkKTsKKwlyZXR1cm4gc2tiOworfQorCitzdGF0aWMgc3RydWN0IHNrX2J1ZmYgKgorYXRoMTBrX3dtaV90bHZfb3BfZ2VuX3AycF9nb19iY25faWUoc3RydWN0IGF0aDEwayAqYXIsIHUzMiB2ZGV2X2lkLAorCQkJCSAgICBjb25zdCB1OCAqcDJwX2llKQoreworCXN0cnVjdCB3bWlfdGx2X3AycF9nb19iY25faWUgKmNtZDsKKwlzdHJ1Y3Qgd21pX3RsdiAqdGx2OworCXN0cnVjdCBza19idWZmICpza2I7CisJdm9pZCAqcHRyOworCXNpemVfdCBsZW47CisKKwlsZW4gPSBzaXplb2YoKnRsdikgKyBzaXplb2YoKmNtZCkgKworCSAgICAgIHNpemVvZigqdGx2KSArIHJvdW5kdXAocDJwX2llWzFdICsgMiwgNCk7CisJc2tiID0gYXRoMTBrX3dtaV9hbGxvY19za2IoYXIsIGxlbik7CisJaWYgKCFza2IpCisJCXJldHVybiBFUlJfUFRSKC1FTk9NRU0pOworCisJcHRyID0gKHZvaWQgKilza2ItPmRhdGE7CisJdGx2ID0gcHRyOworCXRsdi0+dGFnID0gX19jcHVfdG9fbGUxNihXTUlfVExWX1RBR19TVFJVQ1RfUDJQX0dPX1NFVF9CRUFDT05fSUUpOworCXRsdi0+bGVuID0gX19jcHVfdG9fbGUxNihzaXplb2YoKmNtZCkpOworCWNtZCA9ICh2b2lkICopdGx2LT52YWx1ZTsKKwljbWQtPnZkZXZfaWQgPSBfX2NwdV90b19sZTMyKHZkZXZfaWQpOworCWNtZC0+aWVfbGVuID0gX19jcHVfdG9fbGUzMihwMnBfaWVbMV0gKyAyKTsKKworCXB0ciArPSBzaXplb2YoKnRsdik7CisJcHRyICs9IHNpemVvZigqY21kKTsKKworCXRsdiA9IHB0cjsKKwl0bHYtPnRhZyA9IF9fY3B1X3RvX2xlMTYoV01JX1RMVl9UQUdfQVJSQVlfQllURSk7CisJdGx2LT5sZW4gPSBfX2NwdV90b19sZTE2KHJvdW5kdXAocDJwX2llWzFdICsgMiwgNCkpOworCW1lbWNweSh0bHYtPnZhbHVlLCBwMnBfaWUsIHAycF9pZVsxXSArIDIpOworCisJcHRyICs9IHNpemVvZigqdGx2KTsKKwlwdHIgKz0gcm91bmR1cChwMnBfaWVbMV0gKyAyLCA0KTsKKworCWF0aDEwa19kYmcoYXIsIEFUSDEwS19EQkdfV01JLCAid21pIHRsdiBwMnAgZ28gYmNuIGllIGZvciB2ZGV2ICVpXG4iLAorCQkgICB2ZGV2X2lkKTsKKwlyZXR1cm4gc2tiOworfQorCisvKioqKioqKioqKioqKioqKi8KKy8qIFRMViBtYXBwaW5ncyAqLworLyoqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3Qgd21pX2NtZF9tYXAgd21pX3Rsdl9jbWRfbWFwID0geworCS5pbml0X2NtZGlkID0gV01JX1RMVl9JTklUX0NNRElELAorCS5zdGFydF9zY2FuX2NtZGlkID0gV01JX1RMVl9TVEFSVF9TQ0FOX0NNRElELAorCS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X0xFTkdUSDQKKyAqIGJpdCAzMToyNCBwYXR0ZXJuIDEyIGxlbmd0aAorICogYml0IDIzOjE2IHBhdHRlcm4gMTMgbGVuZ3RoCisgKiBiaXQgMTU6OCBwYXR0ZXJuIDE0IGxlbmd0aAorICogYml0IDc6MCBwYXR0ZXJuIDE1IGxlbmd0aAorICovCisjZGVmaW5lIEFSX1dPV19MRU5HVEgxICAgICAgICAgICAgICAgICAgMHg4MzYwCisjZGVmaW5lIEFSX1dPV19MRU5HVEgyICAgICAgICAgICAgICAgICAgMFg4MzY0CisjZGVmaW5lIEFSX1dPV19MRU5HVEgzICAgICAgICAgICAgICAgICAgMFg4MzgwCisjZGVmaW5lIEFSX1dPV19MRU5HVEg0ICAgICAgICAgICAgICAgICAgMFg4Mzg0CisKKyNkZWZpbmUgQVJfV09XX1BBVFRFUk5fTUFUQ0hfTFRfMjU2QiAgICAweDgzNjgKKyNkZWZpbmUgQVJfTUFDX1BDVV9XT1c0ICAgICAgICAgICAgICAgICAweDgzNzAKKworI2RlZmluZSBBUl9TV19XT1dfQ09OVFJPTCAgICAgICAgICAgICAgIDB4MjAwMTgKKyNkZWZpbmUgQVJfU1dfV09XX0VOQUJMRSAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgQVJfU1dJVENIX1RPX1JFRkNMSyAgICAgICAgICAgICAweDIKKyNkZWZpbmUgQVJfUkVTRVRfQ09OVFJPTCAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgQVJfUkVTRVRfVkFMVUVfTUFTSyAgICAgICAgICAgICAweDgKKyNkZWZpbmUgQVJfSFdfV09XX0RJU0FCTEUgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lIEFSX0NMUl9NQUNfSU5URVJSVVBUICAgICAgICAgICAgMHgyMAorI2RlZmluZSBBUl9DTFJfS0FfSU5URVJSVVBUICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSBBUl9XT1dfQkFDS19PRkZfU0hJRlQoeCkgICAgICAgICgoeCAmIDB4ZikgPDwgMjcpIC8qIGluIHVzZWNzICovCisjZGVmaW5lIEFSX1dPV19NQUNfSU5UUl9FTiAgICAgICAgICAgICAgMHgwMDA0MDAwMAorI2RlZmluZSBBUl9XT1dfTUFHSUNfRU4gICAgICAgICAgICAgICAgIDB4MDAwMTAwMDAKKyNkZWZpbmUgQVJfV09XX1BBVFRFUk5fRU4oeCkgICAgICAgICAgICAoeCAmIDB4ZmYpCisjZGVmaW5lIEFSX1dPV19QQVRfRk9VTkRfU0hJRlQgIDgKKyNkZWZpbmUgQVJfV09XX1BBVFRFUk5fRk9VTkQoeCkgICAgICAgICAoeCAmICgweGZmIDw8IEFSX1dPV19QQVRfRk9VTkRfU0hJRlQpKQorI2RlZmluZSBBUl9XT1dfUEFUVEVSTl9GT1VORF9NQVNLICAgICAgICgoMHhmZikgPDwgQVJfV09XX1BBVF9GT1VORF9TSElGVCkKKyNkZWZpbmUgQVJfV09XX01BR0lDX1BBVF9GT1VORCAgICAgICAgICAweDAwMDIwMDAwCisjZGVmaW5lIEFSX1dPV19NQUNfSU5UUiAgICAgICAgICAgICAgICAgMHgwMDA4MDAwMAorI2RlZmluZSBBUl9XT1dfS0VFUF9BTElWRV9GQUlMICAgICAgICAgIDB4MDAxMDAwMDAKKyNkZWZpbmUgQVJfV09XX0JFQUNPTl9GQUlMICAgICAgICAgICAgICAweDAwMjAwMDAwCisKKyNkZWZpbmUgQVJfV09XX1NUQVRVUyh4KSAgICAgICAgICAgICAgICAoeCAmIChBUl9XT1dfUEFUVEVSTl9GT1VORF9NQVNLIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX1dPV19NQUdJQ19QQVRfRk9VTkQgICAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVJfV09XX0tFRVBfQUxJVkVfRkFJTCAgICB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUl9XT1dfQkVBQ09OX0ZBSUwpKQorI2RlZmluZSBBUl9XT1dfQ0xFQVJfRVZFTlRTKHgpICAgICAgICAgICh4ICYgfihBUl9XT1dfUEFUVEVSTl9FTigweGZmKSB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVJfV09XX01BR0lDX0VOIHwJXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUl9XT1dfTUFDX0lOVFJfRU4gfAlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX1dPV19CRUFDT05fRkFJTCB8CVwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVJfV09XX0tFRVBfQUxJVkVfRkFJTCkpCisKKyNkZWZpbmUgQVJfV09XX0FJRlNfQ05UKHgpICAgICAgICAgICAgICAoeCAmIDB4ZmYpCisjZGVmaW5lIEFSX1dPV19TTE9UX0NOVCh4KSAgICAgICAgICAgICAgKCh4ICYgMHhmZikgPDwgOCkKKyNkZWZpbmUgQVJfV09XX0tFRVBfQUxJVkVfQ05UKHgpICAgICAgICAoKHggJiAweGZmKSA8PCAxNikKKworI2RlZmluZSBBUl9XT1dfQkVBQ09OX0ZBSUxfRU4gICAgICAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgQVJfV09XX0JFQUNPTl9USU1PICAgICAgICAgICAgICAweDQwMDAwMDAwCisjZGVmaW5lIEFSX1dPV19LRUVQX0FMSVZFX05FVkVSICAgICAgICAgMHhmZmZmZmZmZgorI2RlZmluZSBBUl9XT1dfS0VFUF9BTElWRV9BVVRPX0RJUyAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgQVJfV09XX0tFRVBfQUxJVkVfRkFJTF9ESVMgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIEFSX1dPV19LRUVQX0FMSVZFX0RFTEFZX1ZBTFVFICAgMHgwMDAwM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aW5nWzBdID0gJWRcbiIsCisJCQkgICAgIGF0b21pY19yZWFkKCZwcml2LT53bW1fdHhfcGVuZGluZ1swXSkpOworCQlwICs9IHNwcmludGYocCwgIndtbV90eF9wZW5kaW5nWzFdID0gJWRcbiIsCisJCQkgICAgIGF0b21pY19yZWFkKCZwcml2LT53bW1fdHhfcGVuZGluZ1sxXSkpOworCQlwICs9IHNwcmludGYocCwgIndtbV90eF9wZW5kaW5nWzJdID0gJWRcbiIsCisJCQkgICAgIGF0b21pY19yZWFkKCZwcml2LT53bW1fdHhfcGVuZGluZ1syXSkpOworCQlwICs9IHNwcmludGYocCwgIndtbV90eF9wZW5kaW5nWzNdID0gJWRcbiIsCisJCQkgICAgIGF0b21pY19yZWFkKCZwcml2LT53bW1fdHhfcGVuZGluZ1szXSkpOworCQlwICs9IHNwcmludGYocCwgIm1lZGlhX3N0YXRlPVwiJXNcIlxuIiwgIXByaXYtPm1lZGlhX2Nvbm5lY3RlZCA/CisJCQkgICAgICJEaXNjb25uZWN0ZWQiIDogIkNvbm5lY3RlZCIpOworCQlwICs9IHNwcmludGYocCwgImNhcnJpZXIgJXNcbiIsIChuZXRpZl9jYXJyaWVyX29rKHByaXYtPm5ldGRldikKKwkJCSAgICAgPyAib24iIDogIm9mZiIpKTsKKwkJZm9yIChpZHggPSAwOyBpZHggPCBwcml2LT5uZXRkZXYtPm51bV90eF9xdWV1ZXM7IGlkeCsrKSB7CisJCQl0eHEgPSBuZXRkZXZfZ2V0X3R4X3F1ZXVlKHByaXYtPm5ldGRldiwgaWR4KTsKKwkJCXAgKz0gc3ByaW50ZihwLCAidHggcXVldWUgJWQ6JXMgICIsIGlkeCwKKwkJCQkgICAgIG5ldGlmX3R4X3F1ZXVlX3N0b3BwZWQodHhxKSA/CisJCQkJICAgICAic3RvcHBlZCIgOiAic3RhcnRlZCIpOworCQl9CisJCXAgKz0gc3ByaW50ZihwLCAiXG4lczogbnVtX3R4X3RpbWVvdXQgPSAlZFxuIiwKKwkJCSA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aXRjaCAoc2l6ZSkgeworCQkJY2FzZSAxOgorCQkJCXZhbCA9ICooKHU4ICopYWRkcik7CisJCQkJYnJlYWs7CisJCQljYXNlIDI6CisJCQkJdmFsID0gKigodTE2ICopYWRkcik7CisJCQkJYnJlYWs7CisJCQljYXNlIDQ6CisJCQkJdmFsID0gKigodTMyICopYWRkcik7CisJCQkJYnJlYWs7CisJCQljYXNlIDg6CisJCQkJdmFsID0gKigobG9uZyBsb25nICopYWRkcik7CisJCQkJYnJlYWs7CisJCQlkZWZhdWx0OgorCQkJCXZhbCA9IC0xOworCQkJCWJyZWFrOworCQkJfQorCisJCQlwICs9IHNwcmludGYocCwgIiUjbHggIiwgdmFsKTsKKwkJCWFkZHIgKz0gc2l6ZTsKKwkJfQorCisJCXAgKz0gc3ByaW50ZihwLCAiXG4iKTsKKwl9CisKKwlpZiAoaW5mby0+dHhfdGJsX251bSkgeworCQlwICs9IHNwcmludGYocCwgIlR4IEJBIHN0cmVhbSB0YWJsZTpcbiIpOworCQlmb3IgKGkgPSAwOyBpIDwgaW5mby0+dHhfdGJsX251bTsgaSsrKQorCQkJcCArPSBzcHJpbnRmKHAsICJ0aWQgPSAlZCwgcmEgPSAlcE1cbiIsCisJCQkJICAgICBpbmZvLT50eF90YmxbaV0udGlkLCBpbmZvLT50eF90YmxbaV0ucmEpOworCX0KKworCWlmIChpbmZvLT5yeF90YmxfbnVtKSB7CisJCXAgKz0gc3ByaW50ZihwLCAiUnggcmVvcmRlciB0YWJsZTpcbiIpOworCQlmb3IgKGkgPSAwOyBpIDwgaW5mby0+cnhfdGJsX251bTsgaSsrKSB7CisJCQlwICs9IHNwcmludGYocCwgInRpZCA9ICVkLCB0YSA9ICVwTSwgIiwKKwkJCQkgICAgIGluZm8tPnJ4X3RibFtpXS50aWQsCisJCQkJICAgICBpbmZvLT5yeF90YmxbaV0udGEpOworCQkJcCArPSBzcHJpbnRmKHAsICJzdGFydF93aW4gPSAlZCwgIiwKKwkJCQkgICAgIGluZm8t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cmcgPSAxOworCQllbHNlCisJCQlyZXR1cm4gLUVJTlZBTDsKKwkJYnJlYWs7CisJZGVmYXVsdDoKKwkJcmV0dXJuIC1FTk9UU1VQUDsKKwl9CisKKwkqY29uZmlnID0gcGluY29uZl90b19jb25maWdfcGFja2VkKHBhcmFtLCBhcmcpOworCWRldl9kYmcocGMtPmRldiwgInBpbmNvbmYgZm9yIHBpbiAldSBpcyAlbHVcbiIsIHBpbiwgKmNvbmZpZyk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBtZXNvbl9waW5jb25mX2dyb3VwX3NldChzdHJ1Y3QgcGluY3RybF9kZXYgKnBjZGV2LAorCQkJCSAgIHVuc2lnbmVkIGludCBudW1fZ3JvdXAsCisJCQkJICAgdW5zaWduZWQgbG9uZyAqY29uZmlncywgdW5zaWduZWQgbnVtX2NvbmZpZ3MpCit7CisJc3RydWN0IG1lc29uX3BpbmN0cmwgKnBjID0gcGluY3RybF9kZXZfZ2V0X2RydmRhdGEocGNkZXYpOworCXN0cnVjdCBtZXNvbl9wbXhfZ3JvdXAgKmdyb3VwID0gJnBjLT5kYXRhLT5ncm91cHNbbnVtX2dyb3VwXTsKKwlpbnQgaTsKKworCWRldl9kYmcocGMtPmRldiwgInNldCBwaW5jb25mIGZvciBncm91cCAlc1xuIiwgZ3JvdXAtPm5hbWUpOworCisJZm9yIChpID0gMDsgaSA8IGdyb3VwLT5udW1fcGluczsgaSsrKSB7CisJCW1lc29uX3BpbmNvbmZfc2V0KHBjZGV2LCBncm91cC0+cGluc1tpXSwgY29uZmlncywKKwkJCQkgIG51bV9jb25maWdzKTsKKwl9CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBtZXNvbl9waW5jb25mX2dyb3VwX2dldChzdHJ1Y3QgcGluY3RybF9kZXYgKnBjZGV2LAorCQkJCSAgIHVuc2lnbmVkIGludCBncm91cCwgdW5zaWduZWQgbG9uZyAqY29uZmlnKQoreworCXJldHVybiAtRU5PU1lTOworfQor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25fZG9tYWluICpkb21haW4gPSB0b19tZXNvbl9kb21haW4oY2hpcCk7CisJdW5zaWduZWQgaW50IHJlZywgYml0LCBwaW47CisJc3RydWN0IG1lc29uX2JhbmsgKmJhbms7CisJaW50IHJldDsKKworCXBpbiA9IGRvbWFpbi0+ZGF0YS0+cGluX2Jhc2UgKyBncGlvOworCXJldCA9IG1lc29uX2dldF9iYW5rKGRvbWFpbiwgcGluLCAmYmFuayk7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKKworCW1lc29uX2NhbGNfcmVnX2FuZF9iaXQoYmFuaywgcGluLCBSRUdfRElSLCAmcmVnLCAmYml0KTsKKworCXJldHVybiByZWdtYXBfdXBkYXRlX2JpdHMoZG9tYWluLT5yZWdfZ3BpbywgcmVnLCBCSVQoYml0KSwgQklUKGJpdCkpOworfQorCitzdGF0aWMgaW50IG1lc29uX2dwaW9fZGlyZWN0aW9uX291dHB1dChzdHJ1Y3QgZ3Bpb19jaGlwICpjaGlwLCB1bnNpZ25lZCBncGlvLAorCQkJCSAgICAgICBpbnQgdmFsdWUpCit7CisJc3RydWN0IG1lc29uX2RvbWFpbiAqZG9tYWluID0gdG9fbWVzb25fZG9tYWluKGNoaXApOworCXVuc2lnbmVkIGludCByZWcsIGJpdCwgcGluOworCXN0cnVjdCBtZXNvbl9iYW5rICpiYW5rOworCWludCByZXQ7CisKKwlwaW4gPSBkb21haW4tPmRhdGEtPnBpbl9iYXNlICsgZ3BpbzsKKwlyZXQgPSBtZXNvbl9nZXRfYmFuayhkb21haW4sIHBpbiwgJmJhbmspOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisKKwltZXNvbl9jYWxjX3JlZ19hbmRfYml0KGJhbmssIHBpbiwgUkVHX0RJUiwgJnJlZywgJmJpdCk7CisJcmV0ID0gcmVnbWFwX3VwZGF0ZV9iaXRzKGRvbWFpbi0+cmVnX2dwaW8sIHJlZywgQklUKGJpdCksIDApOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7Cis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KKwlNRVNPTl9QSU4oQk9PVF82KSwKKwlNRVNPTl9QSU4oQk9PVF83KSwKKwlNRVNPTl9QSU4oQk9PVF84KSwKKwlNRVNPTl9QSU4oQk9PVF85KSwKKwlNRVNPTl9QSU4oQk9PVF8xMCksCisJTUVTT05fUElOKEJPT1RfMTEpLAorCU1FU09OX1BJTihCT09UXzEyKSwKKwlNRVNPTl9QSU4oQk9PVF8xMyksCisJTUVTT05fUElOKEJPT1RfMTQpLAorCU1FU09OX1BJTihCT09UXzE1KSwKKwlNRVNPTl9QSU4oQk9PVF8xNiksCisJTUVTT05fUElOKEJPT1RfMTcpLAorCU1FU09OX1BJTihCT09UXzE4KSwKKwlNRVNPTl9QSU4oR1BJT0FPXzApLAorCU1FU09OX1BJTihHUElPQU9fMSksCisJTUVTT05fUElOKEdQSU9BT18yKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzMpLAorCU1FU09OX1BJTihHUElPQU9fNCksCisJTUVTT05fUElOKEdQSU9BT181KSwKKwlNRVNPTl9QSU4oR1BJT0FPXzYpLAorCU1FU09OX1BJTihHUElPQU9fNyksCisJTUVTT05fUElOKEdQSU9BT184KSwKKwlNRVNPTl9QSU4oR1BJT0FPXzkpLAorCU1FU09OX1BJTihHUElPQU9fMTApLAorCU1FU09OX1BJTihHUElPQU9fMTEpLAorCU1FU09OX1BJTihHUElPQU9fMTIpLAorCU1FU09OX1BJTihHUElPQU9fMTMpLAorCU1FU09OX1BJTihHUElPX0JTRF9FTiksCisJTUVTT05fUElOKEdQSU9fVEVTVF9OKSwKK307CisKKy8qIGJhbmsgWCAqLworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZF9kMF9hX3BpbnNbXSA9IHsgUElOX0dQSU9YXzAgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RfZDFfYV9waW5zW10gPSB7IFBJTl9HUElPWF8xIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkX2QyX2FfcGluc1tdID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WXzIwLCBQSU5fR1BJT0RWXzIxLAorCQkJCQkgICAgICBQSU5fR1BJT0RWXzIyLCBQSU5fR1BJT0RWXzIzIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGR2aW5fdnNfcGluc1tdID0geyBQSU5fR1BJT0RWXzI0IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGR2aW5faHNfcGluc1tdID0geyBQSU5fR1BJT0RWXzI1IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGR2aW5fY2xrX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8yNiB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBkdmluX2RlX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8yNyB9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY18wX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8wIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY18xX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8xIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY18yX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8yIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY18zX3BpbnNbXSA9IHsgUElOX0dQSU9EVl8zIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY180X3BpbnNbXSA9IHsgUElOX0dQSU9EVl80IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY181X3BpbnNbXSA9IHsgUElOX0dQSU9EVl81IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY182X3BpbnNbXSA9IHsgUElOX0dQSU9EVl82IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY183X3BpbnNbXSA9IHsgUElOX0dQSU9EVl83IH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGVuY184X3BpbnNbXSA9IHsgUElO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szMCwgMzF9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MF82X3BpbnNbXSA9IHszNCwgMzV9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MF83X3BpbnNbXSA9IHszOCwgMzl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MF84X3BpbnNbXSA9IHs0MiwgNDN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MF85X3BpbnNbXSA9IHs0NiwgNDd9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MF8xMF9waW5zW10gPSB7NTAsIDUxfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydDFfMF9waW5zW10gPSB7OCwgOX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzFfcGluc1tdID0gezEyLCAxM307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzJfcGluc1tdID0gezE2LCAxN307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzNfcGluc1tdID0gezIwLCAyMX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzRfcGluc1tdID0gezI0LCAyNX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzVfcGluc1tdID0gezI4LCAyOX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzZfcGluc1tdID0gezMyLCAzM307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzdfcGluc1tdID0gezM2LCAzN307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzhfcGluc1tdID0gezQwLCA0MX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxXzlfcGluc1tdID0gezQ0LCA0NX07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcn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lvMF8xM19waW5zW10gPSB7MTN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xNF9waW5zW10gPSB7MTR9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xNV9waW5zW10gPSB7MTV9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xNl9waW5zW10gPSB7MTZ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xN19waW5zW10gPSB7MTd9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xOF9waW5zW10gPSB7MTh9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8xOV9waW5zW10gPSB7MTl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yMF9waW5zW10gPSB7MjB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yMV9waW5zW10gPSB7MjF9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yMl9waW5zW10gPSB7MjJ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yM19waW5zW10gPSB7MjN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yNF9waW5zW10gPSB7MjR9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yNV9waW5zW10gPSB7MjV9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yNl9waW5zW10gPSB7MjZ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yN19waW5zW10gPSB7Mjd9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yOF9waW5zW10gPSB7Mjh9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8yOV9waW5zW10gPSB7Mjl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zMF9waW5zW10gPSB7MzB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zMV9waW5zW10gPSB7MzF9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zMl9waW5zW10gPSB7MzJ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zM19waW5zW10gPSB7MzN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zNF9waW5zW10gPSB7MzR9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zNV9waW5zW10gPSB7MzV9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zNl9waW5zW10gPSB7MzZ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zN19waW5zW10gPSB7Mzd9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zOF9waW5zW10gPSB7Mzh9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF8zOV9waW5zW10gPSB7Mzl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80MF9waW5zW10gPSB7NDB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80MV9waW5zW10gPSB7NDF9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80Ml9waW5zW10gPSB7NDJ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80M19waW5zW10gPSB7NDN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80NF9waW5zW10gPSB7NDR9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80NV9waW5zW10gPSB7NDV9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80Nl9waW5zW10gPSB7NDZ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80N19waW5zW10gPSB7NDd9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80OF9waW5zW10gPSB7NDh9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF80OV9waW5zW10gPSB7NDl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF81MF9waW5zW10gPSB7NTB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF81MV9waW5zW10gPSB7NTF9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF81Ml9waW5zW10gPSB7NTJ9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBncGlvMF81M19waW5zW10gPSB7NTN9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1c2IwXzBfcGluc1tdID0gezI4LCAyOSwgMzAsIDMxLCAzMiwgMzMsIDM0LCAzNSwgMzYsCisJCQkJCSAgIDM3LCAzOCwgMzl9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1c2IxXzBfcGluc1tdID0gezQwLCA0MSwgNDIsIDQzLCA0NCwgNDUsIDQ2LCA0NywgNDgsCisJCQkJCSAgIDQ5LCA1MCwgNTF9OworCisjZGVmaW5lIERFRklORV9aWU5RX1BJTkNUUkxfR1JQKG5tKSBcCisJeyBcCisJCS5uYW1lID0gI25tICJfZ3JwIiwgXAorCQkucGlucyA9IG5tICMjIF9waW5zLCBcCisJCS5ucGlucyA9IEFSUkFZX1NJWkUobm0gIyMgX3BpbnMpLCBcCisJfQorCitzdHJ1Y3QgenlucV9wY3RybF9ncm91cCB6eW5xX3BjdHJsX2dyb3Vwc1tdID0geworCURFRklORV9aWU5RX1BJTkNUUkxfR1JQKGV0aGVybmV0MF8wKSwKKwlERUZJTkVfWllOUV9QSU5DVFJMX0dSUChldGhlcm5ldDFfMCksCisJREVGSU5FX1pZTlFfUElOQ1RSTF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oNCwgIkdQSU9fNCIpLAorCVBJTkNUUkxfUElOKDUsICJHUElPXzUiKSwKKwlQSU5DVFJMX1BJTig2LCAiR1BJT182IiksCisJUElOQ1RSTF9QSU4oNywgIkdQSU9fNyIpLAorCVBJTkNUUkxfUElOKDgsICJHUElPXzgiKSwKKwlQSU5DVFJMX1BJTig5LCAiR1BJT185IiksCisJUElOQ1RSTF9QSU4oMTAsICJHUElPXzEwIiksCisJUElOQ1RSTF9QSU4oMTEsICJHUElPXzExIiksCisJUElOQ1RSTF9QSU4oMTIsICJHUElPXzEyIiksCisJUElOQ1RSTF9QSU4oMTMsICJHUElPXzEzIiksCisJUElOQ1RSTF9QSU4oMTQsICJHUElPXzE0IiksCisJUElOQ1RSTF9QSU4oMTUsICJHUElPXzE1IiksCisJUElOQ1RSTF9QSU4oMTYsICJHUElPXzE2IiksCisJUElOQ1RSTF9QSU4oMTcsICJHUElPXzE3IiksCisJUElOQ1RSTF9QSU4oMTgsICJHUElPXzE4IiksCisJUElOQ1RSTF9QSU4oMTksICJHUElPXzE5IiksCisJUElOQ1RSTF9QSU4oMjAsICJHUElPXzIwIiksCisJUElOQ1RSTF9QSU4oMjEsICJHUElPXzIxIiksCisJUElOQ1RSTF9QSU4oMjIsICJHUElPXzIyIiksCisJUElOQ1RSTF9QSU4oMjMsICJHUElPXzIzIiksCisJUElOQ1RSTF9QSU4oMjQsICJHUElPXzI0IiksCisJUElOQ1RSTF9QSU4oMjUsICJHUElPXzI1IiksCisJUElOQ1RSTF9QSU4oMjYsICJHUElPXzI2IiksCisJUElOQ1RSTF9QSU4oMjcsICJHUElPXzI3IiksCisJUElOQ1RSTF9QSU4oMjgsICJHUElPXzI4IiksCisJUElOQ1RSTF9QSU4oMjksICJHUElPXzI5IiksCisJUElOQ1RSTF9QSU4oMzAsICJHUElPXzMwIiksCisJUElOQ1RSTF9QSU4oMzEsICJHUElPXzMxIiksCisJUElOQ1RSTF9QSU4oMzIsICJHUElPXzMyIiksCisJUElOQ1RSTF9QSU4oMzMsICJHUElPXzMzIiksCisJUElOQ1RSTF9QSU4oMzQsICJHUElPXzM0IiksCisJUElOQ1RSTF9QSU4oMzUsICJHUElPXzM1IiksCisJUElOQ1RSTF9QSU4oMzYsICJHUElPXzM2IiksCisJUElOQ1RSTF9QSU4oMzcsICJHUElPXzM3IiksCisJUElOQ1RSTF9QSU4oMzgsICJHUElPXzM4IiksCisJUElOQ1RSTF9QSU4oMzksICJHUElPXzM5IiksCisJUElOQ1RSTF9QSU4oNDAsICJHUElPXzQwIiksCisJUElOQ1RSTF9QSU4oNDEsICJHUElPXzQxIiksCisJUElOQ1RSTF9QSU4oNDIsICJHUElPXzQyIiksCisJUElOQ1RSTF9QSU4oNDMsICJHUElPXzQzIiksCisJUElOQ1RSTF9QSU4oNDQsICJHUElPXzQ0IiksCisJUElOQ1RSTF9QSU4oNDUsICJHUElPXzQ1IiksCisJUElOQ1RSTF9QSU4oNDYsICJHUElPXzQ2IiksCisJUElOQ1RSTF9QSU4oNDcsICJHUElPXzQ3IiksCisJUElOQ1RSTF9QSU4oNDgsICJHUElPXzQ4IiksCisJUElOQ1RSTF9QSU4oNDksICJHUElPXzQ5IiksCisJUElOQ1RSTF9QSU4oNTAsICJHUElPXzUwIiksCisJUElOQ1RSTF9QSU4oNTEsICJHUElPXzUxIiksCisJUElOQ1RSTF9QSU4oNTIsICJHUElPXzUyIiksCisJUElOQ1RSTF9QSU4oNTMsICJHUElPXzUzIiksCisJUElOQ1RSTF9QSU4oNTQsICJHUElPXzU0IiksCisJUElOQ1RSTF9QSU4oNTUsICJHUElPXzU1IiksCisJUElOQ1RSTF9QSU4oNTYsICJHUElPXzU2IiksCisJUElOQ1RSTF9QSU4oNTcsICJHUElPXzU3IiksCisJUElOQ1RSTF9QSU4oNTgsICJHUElPXzU4IiksCisJUElOQ1RSTF9QSU4oNTksICJHUElPXzU5IiksCisJUElOQ1RSTF9QSU4oNjAsICJHUElPXzYwIiksCisJUElOQ1RSTF9QSU4oNjEsICJHUElPXzYxIiksCisJUElOQ1RSTF9QSU4oNjIsICJHUElPXzYyIiksCisJUElOQ1RSTF9QSU4oNjMsICJHUElPXzYzIiksCisJUElOQ1RSTF9QSU4oNjQsICJHUElPXzY0IiksCisJUElOQ1RSTF9QSU4oNjUsICJHUElPXzY1IiksCisJUElOQ1RSTF9QSU4oNjYsICJHUElPXzY2IiksCisJUElOQ1RSTF9QSU4oNjcsICJHUElPXzY3IiksCisJUElOQ1RSTF9QSU4oNjgsICJHUElPXzY4IiksCisJUElOQ1RSTF9QSU4oNjksICJHUElPXzY5IiksCisJUElOQ1RSTF9QSU4oNzAsICJHUElPXzcwIiksCisJUElOQ1RSTF9QSU4oNzEsICJHUElPXzcxIiksCisJUElOQ1RSTF9QSU4oNzIsICJHUElPXzcyIiksCisJUElOQ1RSTF9QSU4oNzMsICJHUElPXzczIiksCisJUElOQ1RSTF9QSU4oNzQsICJHUElPXzc0IiksCisJUElOQ1RSTF9QSU4oNzUsICJHUElPXzc1IiksCisJUElOQ1RSTF9QSU4oNzYsICJHUElPXzc2IiksCisJUElOQ1RSTF9QSU4oNzcsICJHUElPXzc3IiksCisJUElOQ1RSTF9QSU4oNzgsICJHUElPXzc4IiksCisJUElOQ1RSTF9QSU4oNzksICJHUElPXzc5IiksCisJUElOQ1RSTF9QSU4oODAsICJHUElPXzgwIiksCisJUElOQ1RSTF9QSU4oODEsICJHUElPXzgxIiksCisJUElOQ1RSTF9QSU4oODIsICJHUElPXzgyIiksCisJUElOQ1RSTF9QSU4oODMsICJHUElPXzgzIiksCisJUElOQ1RSTF9QSU4oODQsICJHUElPXzg0IiksCisJUElOQ1RSTF9QSU4oODUsICJHUElPXzg1IiksCisJUElOQ1RSTF9QSU4oODYsICJHUElPXzg2IiksCisJUElOQ1RSTF9QSU4oODcsICJHUElPXzg3IiksCisJUElOQ1RSTF9QSU4oODgsICJHUElPXzg4IiksCisJUElOQ1RSTF9QSU4oODksICJHUElPXzg5IiksCisJUElOQ1RSTF9QSU4o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worREVDTEFSRV9NU01fR1BJT19QSU5TKDcpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDgpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDkpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDEwKTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygxMSk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMTIpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDEzKTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygxNCk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMTUpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDE2KTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygxNyk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMTgpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDE5KTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygyMCk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMjEpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDIyKTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygyMyk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMjQpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDI1KTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygyNik7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMjcpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDI4KTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygyOSk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMzApOworREVDTEFSRV9NU01fR1BJT19QSU5TKDMxKTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygzMik7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMzMpOworREVDTEFSRV9NU01fR1BJT19QSU5TKDM0KTsKK0RFQ0xBUkVfTVNNX0dQSU9fUElOUygzNSk7CitERUNMQVJFX01TTV9HUElPX1BJTlMoMzYpOworREVDTEFSRV9NU01fR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PT09PT09ICovCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGR0dl9hX3BpbnNbXSA9IHsKKwkvKiBCQ0xLLCBQU1lOQywgVkFMSUQsIERBVEEgKi8KKwk4NSwgODYsIDg3LCA4OCwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGR0dl9hX211eFtdID0geworCURUVl9CQ0xLX0FfTUFSSywgRFRWX1BTWU5DX0FfTUFSSywgRFRWX1ZBTElEX0FfTUFSSywgRFRWX0RBVEFfQV9NQVJLLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBkdHZfYl9waW5zW10gPSB7CisJLyogQkNMSywgUFNZTkMsIFZBTElELCBEQVRBICovCisJMTA5LCAxMTAsIDExMSwgMTEyLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgZHR2X2JfbXV4W10gPSB7CisJRFRWX0JDTEtfQl9NQVJLLCBEVFZfUFNZTkNfQl9NQVJLLCBEVFZfVkFMSURfQl9NQVJLLCBEVFZfREFUQV9CX01BUkssCit9OworCisvKiA9IFsgSUlDMCBdID09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaWljMF9waW5zW10gPSB7CisJLyogU0NMLCBTREEgKi8KKwk0NCwgNDUsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpaWMwX211eFtdID0geworCUlJQzBfU0NMX01BUkssIElJQzBfU0RBX01BUkssCit9OworCisvKiA9IFsgSUlDMSBdID09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaWljMV9waW5zW10gPSB7CisJLyogU0NMLCBTREEgKi8KKwk0NiwgNDcsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpaWMxX211eFtdID0geworCUlJQzFfU0NMX01BUkssIElJQzFfU0RBX01BUkssCit9OworCisvKiA9IFsgSlRBRyBdID09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQganRhZ19waW5zW10gPSB7CisJLyogU0VMLCBURE8sIFRET0VOICovCisJMiwgMTUxLCAxNTIsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBqdGFnX211eFtdID0geworCUpUX1NFTF9NQVJLLCBKVF9URE9fTUFSSywgSlRfVERPRU5fTUFSSywKK307CisKKy8qID0gWyBMQ0QvWVVWIF0gPT09PT09PT09PSAqLworRU1FVl9NVVhfUElOKGxjZDNfcHhjbGssIDE4LCBMQ0QzX1BYQ0xLKTsKK0VNRVZfTVVYX1BJTihsY2QzX3B4Y2xrYiwgMTksIExDRDNfUFhDTEtCKTsKK0VNRVZfTVVYX1BJTihsY2QzX2Nsa19pLCAyMCwgTENEM19DTEtfSSk7CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbGNkM19zeW5jX3BpbnNbXSA9IHsKKwkvKiBIUywgVlMsIERFICovCisJMjEsIDIyLCAyMywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGxjZDNfc3luY19tdXhbXSA9IHsKKwlMQ0QzX0hTX01BUkssIExDRDNfVlNfTUFSSywgTENEM19ERV9NQVJLLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBsY2QzX3JnYjg4OF9waW5zW10gPSB7CisJLyogUlswOjddLCBHWzA6N10sIEJbMDo3XSAqLworCTMyLCAzMywgMzQsIDM1LAorCTM2LCAzNywgMzgsIDM5LAorCTQwLCA0MSwgUElOX05VTUJFUigyLCAxNyksIFBJTl9OVU1CRVIoMywgMTcpLAorCVBJTl9OVU1CRVIoNCwgMTcpLCBQSU5fTlVNQkVSKDIsIDE2KSwgUElOX05VTUJFUigzLCAxNiksCisJUElOX05VTUJFUig0LCAxNiksCisJNDIsIDQzLCBQSU5fTlVNQkVSKDIsIDE1KSwgUElOX05VTUJFUigzLCAxNSksCisJUElOX05VTUJFUig0LCAxNSksIFBJTl9OVU1CRVIo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F0gPT09PT09PT09PT09PSAqLworRU1FVl9NVVhfUElOKHB3bTEsIDEyMSwgUFdNMSk7CisKKy8qID0gWyBTRCBdID09PT09PT09PT09PT09PSAqLworRU1FVl9NVVhfUElOKHNkX2NraSwgNDgsIFNEX0NLSSk7CisKKy8qID0gWyBTRElPMCBdID09PT09PT09PT09PSAqLworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkwX2N0cmxfcGluc1tdID0geworCS8qIENLTywgQ0tJLCBDTUQgKi8KKwk1MCwgNTEsIDUyLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMF9jdHJsX211eFtdID0geworCVNESTBfQ0tPX01BUkssIFNESTBfQ0tJX01BUkssIFNESTBfQ01EX01BUkssCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTBfZGF0YTFfcGluc1tdID0geworCS8qIFNESTBfREFUQVswXSAqLworCTUzLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMF9kYXRhMV9tdXhbXSA9IHsKKwlTREkwX0RBVEEwX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkwX2RhdGE0X3BpbnNbXSA9IHsKKwkvKiBTREkwX0RBVEFbMDozXSAqLworCTUzLCA1NCwgNTUsIDU2LAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMF9kYXRhNF9tdXhbXSA9IHsKKwlTREkwX0RBVEEwX01BUkssIFNESTBfREFUQTFfTUFSSywgU0RJMF9EQVRBMl9NQVJLLCBTREkwX0RBVEEzX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkwX2RhdGE4X3BpbnNbXSA9IHsKKwkvKiBTREkwX0RBVEFbMDo3XSAqLworCTUzLCA1NCwgNTUsIDU2LAorCTU3LCA1OCwgNTksIDYwCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkwX2RhdGE4X211eFtdID0geworCVNESTBfREFUQTBfTUFSSywgU0RJMF9EQVRBMV9NQVJLLCBTREkwX0RBVEEyX01BUkssIFNESTBfREFUQTNfTUFSSywKKwlTREkwX0RBVEE0X01BUkssIFNESTBfREFUQTVfTUFSSywgU0RJMF9EQVRBNl9NQVJLLCBTREkwX0RBVEE3X01BUkssCit9OworCisvKiA9IFsgU0RJTzEgXSA9PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMV9jdHJsX3BpbnNbXSA9IHsKKwkvKiBDS08sIENLSSwgQ01EICovCisJNjEsIDYyLCA2MywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTFfY3RybF9tdXhbXSA9IHsKKwlTREkxX0NLT19NQVJLLCBTREkxX0NLSV9NQVJLLCBTREkxX0NNRF9NQVJLLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkxX2RhdGExX3BpbnNbXSA9IHsKKwkvKiBTREkxX0RBVEFbMF0gKi8KKwk2NCwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTFfZGF0YTFfbXV4W10gPSB7CisJU0RJMV9EQVRBMF9NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMV9kYXRhNF9waW5zW10gPSB7CisJLyogU0RJMV9EQVRBWzA6M10gKi8KKwk2NCwgNjUsIDY2LCA2NywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTFfZGF0YTRfbXV4W10gPSB7CisJU0RJMV9EQVRBMF9NQVJLLCBTREkxX0RBVEExX01BUkssIFNESTFfREFUQTJfTUFSSywgU0RJMV9EQVRBM19NQVJLLAorfTsKKworLyogPSBbIFNESU8yIF0gPT09PT09PT09PT09ICovCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTJfY3RybF9waW5zW10gPSB7CisJLyogQ0tPLCBDS0ksIENNRCAqLworCTk3LCA5OCwgOTksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkyX2N0cmxfbXV4W10gPSB7CisJU0RJMl9DS09fTUFSSywgU0RJMl9DS0lfTUFSSywgU0RJMl9DTURfTUFSSywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RpMl9kYXRhMV9waW5zW10gPSB7CisJLyogU0RJMl9EQVRBWzBdICovCisJODksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkyX2RhdGExX211eFtdID0geworCVNESTJfREFUQTBfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkaTJfZGF0YTRfcGluc1tdID0geworCS8qIFNESTJfREFUQVswOjNdICovCisJODksIDkwLCA5MSwgOTIsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZGkyX2RhdGE0X211eFtdID0geworCVNESTJfREFUQTBfTUFSSywgU0RJMl9EQVRBMV9NQVJLLCBTREkyX0RBVEEyX01BUkssIFNESTJfREFUQTNfTUFSSywKK307CisKKy8qID0gWyBUUDMzIF0gPT09PT09PT09PT09PSAqLworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB0cDMzX3BpbnNbXSA9IHsKKwkvKiBDTEssIENUUkwgKi8KKwkzOCwgMzksCisJLyogVFAzM19EQVRBWzA6MTVdICovCisJNDAsIDQxLCBQSU5fTlVNQkVSKDIsIDE3KSwgUElOX05VTUJFUigzLCAxNyksCisJUElOX05VTUJFUig0LCAxNyksIFBJTl9OVU1CRVIoMiwgMTYpLCBQSU5fTlVNQkVSKDMsIDE2KSwKKwlQSU5fTlVNQkVSKDQsIDE2KSwKKwk0MiwgNDMsIFBJTl9OVU1CRVIoMiwgMTUpLCBQSU5fTlVNQkVSKDMsIDE1KSwKKwlQSU5fTlVNQkVSKDQsIDE1KSwgUElOX05VTUJFUigyLCAxNCksIFBJTl9OVU1CRVIoMywgMTQpLAorCVBJTl9OVU1CRVIoNCwgMTQpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdHAzM19tdXhbXSA9IHsKKwlUUDMzX0NMS19NQVJLLCBUUDMzX0NUUkxfTUFSSywKKwlUUDMzX0RBVEEwX01BUkssIFRQMzNfREFUQTFfTUFSSywgVFAzM19EQVRBMl9NQVJLLCBUUDMzX0RBVEEzX01BUkssCisJVFAzM19EQVRBNF9NQVJLLCBUUDMzX0RBVEE1X01BUkssIFRQMzNfREFUQTZfTUFSSywgVFAzM19EQVRBN19NQVJLLAorCVRQMzNfREFUQThfTUFSSywgVFAzM19EQVRBOV9NQVJLLCBUUDMzX0RBVEExMF9NQVJLLCBUUDMzX0RBVEExMV9NQVJLLAorCVRQMzNfREFUQTEyX01BUkssIFRQMzNfREFUQTEzX01BUkssIFRQMzNfREFUQTE0X01BUkssIFRQMzNfREFUQTE1X01BUkssCit9OworCisvKiA9IFsgVUFSVDEgXSA9PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydDFfZGF0YV9waW5zW10gPSB7CisJLyogUlgsIFRYICovCisJMTU1LCAxNTYsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0MV9kYXRhX211eFtdID0geworCVVBUlQxX1JYX01BUkssIFVBUlQxX1RYX01BUkssCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxX2N0cmxfcGluc1tdID0geworCS8qIENUU0IsIFJUU0IgKi8KKwkxNTcsIDE1OCwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnQxX2N0cmxfbXV4W10gPSB7CisJVUFSVDFfQ1RTQl9NQVJLLCBVQVJUMV9SVFNCX01BUkssCit9OworCisvKiA9IFsgVUFSVDIgXSA9PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydDJfZGF0YV9waW5zW10gPSB7CisJLyogUlgsIFRYICovCisJMTU3LCAxNTgsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0Ml9kYXRhX211eFtdID0geworCVVBUlQyX1JYX01BUkssIFVBUlQyX1RYX01BUkssCit9OworCisvKiA9IFsgVUFSVDMgXSA9PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydDNfZGF0YV9waW5zW10gPSB7CisJLyogUlgsIFRYICovCisJNDYsIDQ3LAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydDNfZGF0YV9tdXhbXSA9IHsKKwlVQVJUM19SWF9NQVJLLCBVQVJUM19UWF9NQVJLLAorfTsKKworLyogPSBbIFVTQiBdID09PT09PT09PT09PT09ICovCitFTUVWX01VWF9QSU4odXNiX3ZidXMsIDE1MywgVVNCX1ZCVVMpOworCisvKiA9IFsgVVNJMCBdID09PT09PT09PT09PT09ICovCitFTUVWX01VWF9QSU4odXNpMF9jczEsIDEwNSwgVVNJMF9DUzEpOworRU1FVl9NVVhfUElOKHVzaTBfY3MyLCAxMDYsIFVTSTBfQ1MyKTsKK0VNRVZfTVVYX1BJTih1c2kwX2NzMywgMTE1LCBVU0kwX0NTMyk7CitFTUVWX01VWF9QSU4odXNpMF9jczQsIDExNiwgVVNJMF9DUzQpOworRU1FVl9NVVhfUElOKHVzaTBfY3M1LCAxMTcsIFVTSTBfQ1M1KTsKK0VNRVZfTVVYX1BJTih1c2kwX2NzNiwgMTE4LCBVU0kwX0NTNik7CisKKy8qID0gWyBVU0kxIF0gPT09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdXNpMV9waW5zW10gPSB7CisJLyogREksIERPKi8KKwkxMDcsIDEwOCwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVzaTFfbXV4W10gPSB7CisJVVNJMV9ESV9NQVJLLCBVU0kxX0RPX01BUkssCit9OworCisvKiA9IFsgVVNJMiBdID09PT09PT09PT09PT09ICovCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVzaTJfcGluc1tdID0geworCS8qIENMSywgREksIERPKi8KKwkxMDksIDExMCwgMTExLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdXNpMl9tdXhbXSA9IHsKKwlVU0kyX0NMS19NQVJLLCBVU0kyX0RJX01BUkssIFVTSTJfRE9fTUFSSywKK307CitFTUVWX01VWF9QSU4odXNpMl9jczAsIDExMiwgVVNJMl9DUzApOworRU1FVl9NVVhfUElOKHVzaTJfY3MxLCAxMTMsIFVTSTJfQ1MxKTsKK0VNRVZfTVVYX1BJTih1c2kyX2NzMiwgMTE0LCBVU0kyX0NTMik7CisKKy8qID0gWyBVU0kzIF0gPT09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdXNpM19waW5zW10gPSB7CisJLyogQ0xLLCBESSwgRE8qLworCTExNSwgMTE2LCAxMTcsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1c2kzX211eFtdID0geworCVVTSTNfQ0xLX01BUkssIFVTSTNfRElfTUFSSywgVVNJM19ET19NQVJLLAorfTsKK0VNRVZfTVVYX1BJTih1c2kzX2NzMCwgMTE4LCBVU0kzX0NTMCk7CisKKy8qID0gWyBVU0k0IF0gPT09PT09PT09PT09PT0gKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdXNpNF9waW5zW10gPSB7CisJLyogQ0xLLCBESSwgRE8qLworCTExOSwgMTIwLCAxMjEsCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1c2k0X211eFtdID0geworCVVTSTRfQ0xLX01BUkssIFVTSTRfRElfTUFSSywgVVNJNF9ET19NQVJLLAorfTsKK0VNRVZfTVVYX1BJTih1c2k0X2NzMCwgMTEzLCBVU0k0X0NTMCk7CitFTUVWX01VWF9QSU4odXNpNF9jczEsIDExNCwgVVN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vwc1tdID0geworCSJpaWMwIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgaWljMV9ncm91cHNbXSA9IHsKKwkiaWljMSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGp0YWdfZ3JvdXBzW10gPSB7CisJImp0YWciLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBsY2RfZ3JvdXBzW10gPSB7CisJImxjZDNfcHhjbGsiLAorCSJsY2QzX3B4Y2xrYiIsCisJImxjZDNfY2xrX2kiLAorCSJsY2QzX3N5bmMiLAorCSJsY2QzX3JnYjg4OCIsCisJInl1djNfY2xrX2kiLAorCSJ5dXYzIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgbnRzY19ncm91cHNbXSA9IHsKKwkibnRzY19jbGsiLAorCSJudHNjX2RhdGEiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBwd20wX2dyb3Vwc1tdID0geworCSJwd20wIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcHdtMV9ncm91cHNbXSA9IHsKKwkicHdtMSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHNkX2dyb3Vwc1tdID0geworCSJzZF9ja2kiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBzZGkwX2dyb3Vwc1tdID0geworCSJzZGkwX2N0cmwiLAorCSJzZGkwX2RhdGExIiwKKwkic2RpMF9kYXRhNCIsCisJInNkaTBfZGF0YTgiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBzZGkxX2dyb3Vwc1tdID0geworCSJzZGkxX2N0cmwiLAorCSJzZGkxX2RhdGExIiwKKwkic2RpMV9kYXRhNCIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHNkaTJfZ3JvdXBzW10gPSB7CisJInNkaTJfY3RybCIsCisJInNkaTJfZGF0YTEiLAorCSJzZGkyX2RhdGE0IiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdHAzM19ncm91cHNbXSA9IHsKKwkidHAzMyIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHVhcnQxX2dyb3Vwc1tdID0geworCSJ1YXJ0MV9kYXRhIiwKKwkidWFydDFfY3RybCIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHVhcnQyX2dyb3Vwc1tdID0geworCSJ1YXJ0Ml9kYXRhIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdWFydDNfZ3JvdXBzW10gPSB7CisJInVhcnQzX2RhdGEiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCB1c2JfZ3JvdXBzW10gPSB7CisJInVzYl92YnVzIiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdXNpMF9ncm91cHNbXSA9IHsKKwkidXNpMF9jczEiLAorCSJ1c2kwX2NzMiIsCisJInVzaTBfY3MzIiwKKwkidXNpMF9jczQiLAorCSJ1c2kwX2NzNSIsCisJInVzaTBfY3M2IiwKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdXNpMV9ncm91cHNbXSA9IHsKKwkidXNpMSIsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHVzaTJfZ3JvdXBzW10gPSB7CisJInVzaTIiLAorCSJ1c2kyX2NzMCIsCisJInVzaTJfY3MxIiwKKwkidXNpMl9jczIiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCB1c2kzX2dyb3Vwc1tdID0geworCSJ1c2kzIiwKKwkidXNpM19jczAiLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCB1c2k0X2dyb3Vwc1tdID0geworCSJ1c2k0IiwKKwkidXNpNF9jczAiLAorCSJ1c2k0X2NzMSIsCit9OworCitzdGF0aWMgY29uc3QgY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U0RBNF9NQVJLLAotCi0JLyogSTJDNCgyKSAqLwotCUkyQ19TQ0w0U19NQVJLLAlJMkNfU0RBNFNfTUFSSywKLQotCS8qIEtFWVNDICovCi0JS0VZT1VUMF9NQVJLLAlLRVlJTjBfMTIxX01BUkssCUtFWUlOMF8xMzZfTUFSSywKLQlLRVlPVVQxX01BUkssCUtFWUlOMV8xMjJfTUFSSywJS0VZSU4xXzEzNV9NQVJLLAotCUtFWU9VVDJfTUFSSywJS0VZSU4yXzEyM19NQVJLLAlLRVlJTjJfMTM0X01BUkssCi0JS0VZT1VUM19NQVJLLAlLRVlJTjNfMTI0X01BUkssCUtFWUlOM18xMzNfTUFSSywKLQlLRVlPVVQ0X01BUkssCUtFWUlONF9NQVJLLAotCUtFWU9VVDVfTUFSSywJS0VZSU41X01BUkssCi0JS0VZT1VUNl9NQVJLLAlLRVlJTjZfTUFSSywKLQlLRVlPVVQ3X01BUkssCUtFWUlON19NQVJLLAotCi0JLyogTENEQyAqLwotCUxDREMwX1NFTEVDVF9NQVJLLAotCUxDREMxX1NFTEVDVF9NQVJLLAotCUxDREhTWU5fTUFSSywJTENEQ1NfTUFSSywJTENEVlNZTl9NQVJLLAlMQ0REQ0tfTUFSSywKLQlMQ0RXUl9NQVJLLAlMQ0RSRF9NQVJLLAlMQ0RESVNQX01BUkssCUxDRFJTX01BUkssCi0JTENETENMS19NQVJLLAlMQ0RET05fTUFSSywKLQotCUxDREQwX01BUkssCUxDREQxX01BUkssCUxDREQyX01BUkssCUxDREQzX01BUkssCi0JTENERDRfTUFSSywJTENERDVfTUFSSywJTENERDZfTUFSSywJTENERDdfTUFSSywKLQlMQ0REOF9NQVJLLAlMQ0REOV9NQVJLLAlMQ0REMTBfTUFSSywJTENERDExX01BUkssCi0JTENERDEyX01BUkssCUxDREQxM19NQVJLLAlMQ0REMTRfTUFSSywJTENERDE1X01BUkssCi0JTENERDE2X01BUkssCUxDREQxN19NQVJLLAlMQ0REMThfTUFSSywJTENERDE5X01BUkss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DEwX01BUkssIFZJT19EMTFfTUFSSywKLQlWSU9fRDEyX01BUkssIFZJT19EMTNfTUFSSywgVklPX0QxNF9NQVJLLCBWSU9fRDE1X01BUkssCi19Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBjZXVfY2xrXzBfcGluc1tdID0gewotCS8qIENLTyAqLwotCTEyMCwKLX07Ci1zdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGNldV9jbGtfMF9tdXhbXSA9IHsKLQlWSU9fQ0tPX01BUkssCi19Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBjZXVfY2xrXzFfcGluc1tdID0gewotCS8qIENLTyAqLwotCTE2LAotfTsKLXN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgY2V1X2Nsa18xX211eFtdID0gewotCVZJT19DS08xX01BUkssCi19Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBjZXVfY2xrXzJfcGluc1tdID0gewotCS8qIENLTyAqLwotCTE3LAotfTsKLXN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgY2V1X2Nsa18yX211eFtdID0gewotCVZJT19DS08yX01BUkssCi19Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBjZXVfc3luY19waW5zW10gPSB7Ci0JLyogQ0xLLCBWRCwgSEQgKi8KLQkxMTgsIDEwMCwgMTAxLAotfTsKLXN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgY2V1X3N5bmNfbXV4W10gPSB7Ci0JVklPX0NMS19NQVJLLCBWSU9fVkRfTUFSSywgVklPX0hEX01BUkssCi19Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBjZXVfZmllbGRfcGluc1tdID0gewotCS8qIEZJRUxEICovCi0JMTE5LAotfTsKLXN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgY2V1X2ZpZWxkX211eFtdID0gewotCVZJT19GSUVMRF9NQVJLLAotfTsKLS8qIC0gRkxDVEwgLS0tLS0tLS0tLS0tLS0t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KyNkZWZpbmUgRFNSX1dORiAgICgxIDw8IDkpICAgICAgIC8qIFdyaXRlIE5leHQgRmxhZyAoc3luY2hyb25vdXMpICovCisjZGVmaW5lIERTUl9XQ0YgICAoMSA8PCA4KSAgICAgICAvKiBXcml0ZSBDb21wbGV0ZSBGbGFnIChzeW5jaHJvbm91cykqLwogI2RlZmluZSBEU1JfV0VGICAgKDEgPDwgNykgICAgICAgLyogV3JpdGUgRXJyb3IgRmxhZyAqLwogI2RlZmluZSBEU1JfQ0FGICAgKDEgPDwgNCkgICAgICAgLyogQ2xvY2sgQWxhcm0gRmxhZyAqLworI2RlZmluZSBEU1JfTUNPICAgKDEgPDwgMykgICAgICAgLyogbW9ub3RvbmljIGNvdW50ZXIgb3ZlcmZsb3cgKi8KKyNkZWZpbmUgRFNSX1RDTyAgICgxIDw8IDIpICAgICAgIC8qIHRpbWUgY291bnRlciBvdmVyZmxvdyAqLwogI2RlZmluZSBEU1JfTlZGICAgKDEgPDwgMSkgICAgICAgLyogTm9uLVZhbGlkIEZsYWcgKi8KICNkZWZpbmUgRFNSX1NWRiAgICgxIDw8IDApICAgICAgIC8qIFNlY3VyaXR5IFZpb2xhdGlvbiBGbGFnICovCiAKLSNkZWZpbmUgRElFUiAgICAgIDB4MTggICAgICAgICAgIC8qIEludGVycnVwdCBFbmFibGUgUmVnICovCisjZGVmaW5lIERJRVIgICAgICAweDE4ICAgICAgICAgICAvKiBJbnRlcnJ1cHQgRW5hYmxlIFJlZyAoc3luY2hyb25vdXMpICovCiAjZGVmaW5lIERJRVJfV05JRSAoMSA8PCA5KSAgICAgICAvKiBXcml0ZSBOZXh0IEludGVycnVwdCBFbmFibGUgKi8KICNkZWZpbmUgRElFUl9XQ0lFICgxIDw8IDgpICAgICAgIC8qIFdyaXRlIENvbXBsZXRlIEludGVycnVwdCBFbmFibGUgKi8KICNkZWZpbmUgRElFUl9XRUlFICgxIDw8IDcpICAgICAgIC8qIFdyaXRlIEVycm9yIEludGVycnVwdCBFbmFibGUgKi8KICNkZWZpbmUgRElFUl9DQUlFICgxIDw8IDQpICAgICAgIC8qIENsb2NrIEFsYXJtIEludGVycnVwdCBFbmFibGUgKi8KKyNkZWZpbmUgRElFUl9TVklFICgxIDw8IDApICAgICAgIC8qIFNlY3VyaXR5LXZpb2xhdGlvbiBJbnRlcnJ1cHQgRW5hYmxlICovCisKKyNkZWZpbmUgRE1DUiAgICAgIDB4MWMgICAgICAgICAgIC8qIERyeUljZSBNb25vdG9uaWMgQ291bnRlciBSZWcgKi8KKworI2RlZmluZSBEVENSICAgICAgMHgyOCAgICAgICAgICAgLyogRHJ5SWNlIFRhbXBlciBDb25maWd1cmF0aW9uIFJlZyAqLworI2RlZmluZSBEVENSX01PRSAgKDEgPDwgOSkgICAgICAgLyogbW9ub3RvbmljIG92ZXJmbG93IGVuYWJsZWQgKi8KKyNkZWZpbmUgRFRDUl9UT0UgICgxIDw8IDgpICAgICAgIC8qIHRpbWUgb3ZlcmZsb3cgZW5hYmxlZCAqLworI2RlZmluZSBEVENSX1dURSAgKDEgPDwgNykgICAgICAgLyogd2lyZS1tZXNoIHRhbXBlciBlbmFibGVkICovCisjZGVmaW5lIERUQ1JfRVRCRSAoMSA8PCA2KSAgICAgICAvKiBleHRlcm5hbCBCIHRhbXBlciBlbmFibGVkICovCisjZGVmaW5lIERUQ1JfRVRBRSAoMSA8PCA1KSAgICAgICAvKiBleHRlcm5hbCBBIHRhbXBlciBlbmFibGVkICovCisjZGVmaW5lIERUQ1JfRUJFICAoMSA8PCA0KSAgICAgICAvKiBleHRlcm5hbCBib290IHRhbXBlciBlbmFibGVkICovCisjZGVmaW5lIERUQ1JfU0FJRSAoMSA8PCAzKSAgICAgICAvKiBTQ0MgZW5hYmxlZCAqLworI2RlZmluZSBEVENSX1RURSAgKDEgPDwgMikgICAgICAgLyogdGVtcGVyYXR1cmUgdGFtcGVyIGVuYWJsZWQgKi8KKyNkZWZpbmUgRFRDUl9DVEUgICgxIDw8IDEpICAgICAgIC8qIG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Agb25seSBzdXBwb3J0IGFsYXJtcyB1cCB0byBvbmUgbW9udGggaW4gdGhlIGZ1dHVyZS4gTGV0J3MKKwkJICogcmV0dXJuIGFuIGVycm9yIGlmIHdlIGdldCBzb21ldGhpbmcgYWZ0ZXIgdGhhdCBsaW1pdC4KKwkJICogQ29tcGFyaXNvbiBpcyBkb25lIGJ5IGluY3JlbWVudGluZyBydGNfdG0gbW9udGggZmllbGQgYnkgb25lCisJCSAqIGFuZCBjaGVja2luZyBhbGFybSB2YWx1ZSBpcyBzdGlsbCBiZWxvdy4KKwkJICovCisJCWlmIChydGNfdG0udG1fbW9uID09IDExKSB7IC8qIGhhbmRsZSB5ZWFyIHdyYXBwaW5nICovCisJCQlydGNfdG0udG1fbW9uID0gMDsKKwkJCXJ0Y190bS50bV95ZWFyICs9IDE7CisJCX0gZWxzZSB7CisJCQlydGNfdG0udG1fbW9uICs9IDE7CisJCX0KKworCQlyZXQgPSBydGNfdG1fdG9fdGltZSgmcnRjX3RtLCAmcnRjX3NlY3MpOworCQlpZiAocmV0KQorCQkJZ290byBlcnJfdW5sb2NrOworCisJCWlmIChhbGFybV9zZWNzID4gcnRjX3NlY3MpIHsKKwkJCWRldl9lcnIoZGV2LCAiJXM6IG1heCBmb3IgYWxhcm0gaXMgb25lIG1vbnRoICglZClcbiIsCisJCQkJX19mdW5jX18sIHJldCk7CisJCQlyZXQgPSAtRUlOVkFMOworCQkJZ290byBlcnJfdW5sb2NrOworCQl9CisJfQorCisJLyogRGlzYWJsZSB0aGUgYWxhcm0gYmVmb3JlIG1vZGlmeWluZyBpdCAqLworCXJldCA9IF9pc2wxMjA1N19ydGNfdXBkYXRlX2FsYXJtKGRldiwgMCk7CisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2VycihkZXYsICIlczogdW5hYmxlIHRvIGRpc2FibGUgdGhlIGFsYXJtICglZClcbiIsCisJCQlfX2Z1bmNfXywgcmV0KTsKKwkJZ290byBlcnJfdW5sb2NrOworCX0KKworCS8qIF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cnZlX2xpc3RbMF0gPT0gMHhmZikKICAgICAgICAgc3RyY3B5KGhyZWMsICItLSIpOwogICAgIGVsc2UgewpAQCAtMTkyLDcgKzE5Miw3IEBACiAgICAgICAgICAgICAgICAgICAgbWF4X2lkcywgaGRyX2NoYW5uZWwpOwogCiAgICAgLyogY29udHJvbGxlciBpbmZvcm1hdGlvbiAqLwotICAgIHNlcV9wcmludGYobSwiXG5EaXNrIEFycmF5IENvbnRyb2xsZXIgSW5mb3JtYXRpb246XG4iKTsKKyAgICBzZXFfcHV0cyhtLCAiXG5EaXNrIEFycmF5IENvbnRyb2xsZXIgSW5mb3JtYXRpb246XG4iKTsKICAgICBzZXFfcHJpbnRmKG0sCiAgICAgICAgICAgICAgICAgICAgIiBOdW1iZXI6ICAgICAgIFx0JWQgICAgICAgICBcdE5hbWU6ICAgICAgICAgIFx0JXNcbiIsCiAgICAgICAgICAgICAgICAgICAgaGEtPmhhbnVtLCBoYS0+YmluZm8udHlwZV9zdHJpbmcpOwpAQCAtMjE5LDcgKzIxOSw3IEBACiAKICNpZmRlZiBHRFRIX0RNQV9TVEFUSVNUSUNTCiAgICAgLyogY29udHJvbGxlciBzdGF0aXN0aWNzICovCi0gICAgc2VxX3ByaW50ZihtLCJcbkNvbnRyb2xsZXIgU3RhdGlzdGljczpcbiIpOworICAgIHNlcV9wdXRzKG0sICJcbkNvbnRyb2xsZXIgU3RhdGlzdGljczpcbiIpOwogICAgIHNlcV9wcmludGYobSwKICAgICAgICAgICAgICAgICAgICAiIDMyLWJpdCBETUEgYnVmZmVyOlx0JWx1XHQ2NC1iaXQgRE1BIGJ1ZmZlcjpcdCVsdVxuIiwKICAgICAgICAgICAgICAgICAgICBoYS0+ZG1hMzJfY250LCBoYS0+ZG1hNjRfY250KTsKQEAgLTIyNyw3ICsyMjcsNyBAQAogCiAgICAgaWYgKGhhLT5tb3JlX3Byb2MpIHsKICAgICAgICAgLyogbW9yZSBpbmZvcm1hdGlvbjogMi4gYWJvdXQgcGh5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TTE9UX0lORk8gICAgICAgICAgICAgICAgKDB4MDAwMDAwMDEpCiAKQEAgLTEyMjQsNyArMTIzOSw5IEBACiAJTVBJMl9DT05GSUdfUEFHRV9IRUFERVIgSGVhZGVyOyAgICAgICAgICAgICAgICAgICAgIC8qIDB4MDAgKi8KIAlVMzIgICAgICAgICAgICAgICAgICAgICBCaW9zT3B0aW9uczsgICAgICAgICAgICAgICAgLyogMHgwNCAqLwogCVUzMiAgICAgICAgICAgICAgICAgICAgIElPQ1NldHRpbmdzOyAgICAgICAgICAgICAgICAvKiAweDA4ICovCi0JVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgIC8qIDB4MEMgKi8KKwlVOAkJCVNTVVRpbWVvdXQ7CQkgICAgLyogMHgwQyAqLworCVU4CQkJUmVzZXJ2ZWQxOwkJICAgIC8qIDB4MEQgKi8KKwlVMTYJCQlSZXNlcnZlZDI7CQkgICAgLyogMHgwRSAqLwogCVUzMiAgICAgICAgICAgICAgICAgICAgIERldmljZVNldHRpbmdzOyAgICAgICAgICAgICAvKiAweDEwICovCiAJVTE2ICAgICAgICAgICAgICAgICAgICAgTnVtYmVyT2ZEZXZpY2VzOyAgICAgICAgICAgIC8qIDB4MTQgKi8KIAlVMTYgICAgICAgICAgICAgICAgICAgICBVRUZJVmVyc2lvbjsgICAgICAgICAgICAgICAgLyogMHgxNiAqLwpAQCAtMTIzNSw5ICsxMjUyLDI0IEBACiB9IE1QSTJfQ09ORklHX1BBR0VfQklPU18xLCBNUEkyX1BPSU5URVIgUFRSX01QSTJfQ09ORklHX1BBR0VfQklPU18xLAogICBNcGkyQmlvc1BhZ2UxX3QsIE1QSTJfUE9JTlRFUiBwTXBpMkJpb3NQYWdlMV90OwogCi0jZGVmaW5lIE1QSTJfQklPU1BBR0UxX1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgICAgICgweDA1KQorI2RlZmluZSBNUEkyX0JJT1NQQUdFMV9QQUdFV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yMDApCisjZGVmaW5lIE1QSTJfQklPU1BBR0UxX09QVElPTlNfRElTQUJMRV9SRUdJU1RSQVRJT05fVUVGSV9CU0QgICAgKDB4MDAwMDAzMDApCisKICNkZWZpbmUgTVBJMl9CSU9TUEFHRTFfT1BUSU9OU19NQVNLX09FTV9JRCAgICAgICAgICAgICAgICAgICgweDAwMDAwMEYwKQogI2RlZmluZSBNUEkyX0JJT1NQQUdFMV9PUFRJT05TX0xTSV9PRU1fSUQgICAgICAgICAgICAgICAgICAgKDB4MDAwMDAwMDApCiAKQEAgLTI0MjAsMTMgKzI0NTIsMTMgQEAKICAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQb3J0R3JvdXBzOyAgICAgICAgICAgICAvKiAweDJDICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRG1hR3JvdXA7ICAgICAgICAgICAgICAgLyogMHgyRCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xHcm91cDsgICAgICAgICAgIC8qIDB4MkUgKi8KLSAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDE7ICAgICAgICAgICAgICAvKiAweDJGICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQyOyAgICAgICAgICAgICAgLyogMHgzMCAqLworCVU4CQkJCSBFbmNsb3N1cmVMZXZlbDsJIC8qIDB4MkYgKi8KKwlVOAkJCQkgQ29ubmVjdG9yTmFtZVs0XTsJIC8qIDB4MzAgKi8KICAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDM7ICAgICAgICAgICAgICAvKiAweDM0ICovCiB9IE1QSTJfQ09ORklHX1BBR0VfU0FTX0RFVl8wLCBNUEkyX1BPSU5URVIgUFRSX01QSTJfQ09ORklHX1BBR0VfU0FTX0RFVl8wLAogICBNcGkyU2FzR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TggKi8KICAgICBVMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGFydFNsb3Q7ICAgICAgICAgICAgICAgICAgLyogMHgxQSAqLwotICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAvKiAweDFDICovCisJVTgJCQkJIFJlc2VydmVkMjsJCSAgICAgLyogMHgxQyAqLworCVU4CQkJCSBFbmNsb3N1cmVMZXZlbDsJICAgICAvKiAweDFEICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU0VQRGV2SGFuZGxlOyAgICAgICAgICAgICAgIC8qIDB4MUUgKi8KICAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDM7ICAgICAgICAgICAgICAgICAgLyogMHgyMCAqLwogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAvKiAweDI0ICovCkBAIC0yNzQwLDkgKzI3NzQsMTAgQEAKICAgTVBJMl9QT0lOVEVSIFBUUl9NUEkyX0NPTkZJR19QQUdFX1NBU19FTkNMT1NVUkVfMCwKICAgTXBpMlNhc0VuY2xvc3VyZVBhZ2UwX3QsIE1QSTJfUE9JTlRFUiBwTXBpMlNhc0VuY2xvc3VyZVBhZ2UwX3Q7CiAKLSNkZWZpbmUgTVBJMl9TQVNFTkNMT1NVUkUwX1BBR0VWRVJTSU9OICAgICAgKDB4MDMpCisjZGVmaW5lIE1QSTJfU0FTRU5DTE9TVVJFMF9QQUdFVkVSU0lPTiAgICAgICgweDA0KQogCiAvKiB2YWx1ZXMgZm9yIFNBUyBFbmNsb3N1cmUgUGFnZSAwIEZsYWdzIGZpZWxkICovCisjZGVmaW5lIE1QSTJfU0FTX0VOQ0xTMF9GTEFHU19FTkNMX0xFVkVMX1ZBTElEICAgICAgKDB4MDAxMCkKICNkZWZpbmUgTV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ubyk7Ci0JU1BSSU5URigiSVJROiAgICAgICAgICAgICAgICAgICAlZFxuIiwgICAgICAgICAgaG9zdC0+aXJxKTsKLQlTUFJJTlRGKCJJTzogICAgICAgICAgICAgICAgICAgIDB4JWx4LTB4JWx4XG4iLCBob3N0LT5pb19wb3J0LCBob3N0LT5pb19wb3J0ICsgaG9zdC0+bl9pb19wb3J0IC0gMSk7Ci0JU1BSSU5URigiTU1JTyh2aXJ0dWFsIGFkZHJlc3MpOiAweCVseC0weCVseFxuIiwgaG9zdC0+YmFzZSwgaG9zdC0+YmFzZSArIGRhdGEtPk1taW9MZW5ndGggLSAxKTsKLQlTUFJJTlRGKCJzZ190YWJsZXNpemU6ICAgICAgICAgICVkXG4iLCAgICAgICAgICBob3N0LT5zZ190YWJsZXNpemUpOworCXNlcV9wdXRzKG0sICJOaW5qYVNDU0kgc3RhdHVzXG5cbiIKKwkJIkRyaXZlciB2ZXJzaW9uOiAgICAgICAgJFJldmlzaW9uOiAxLjIzICRcbiIpOworCXNlcV9wcmludGYobSwgIlNDU0kgaG9zdCBOby46ICAgICAgICAgJWRcbiIsICAgICAgICAgIGhvc3Rubyk7CisJc2VxX3ByaW50ZihtLCAiSVJROiAgICAgICAgICAgICAgICAgICAlZFxuIiwgICAgICAgICAgaG9zdC0+aXJxKTsKKwlzZXFfcHJpbnRmKG0sICJJTzogICAgICAgICAgICAgICAgICAgIDB4JWx4LTB4JWx4XG4iLCBob3N0LT5pb19wb3J0LCBob3N0LT5pb19wb3J0ICsgaG9zdC0+bl9pb19wb3J0IC0gMSk7CisJc2VxX3ByaW50ZihtLCAiTU1JTyh2aXJ0dWFsIGFkZHJlc3MpOiAweCVseC0weCVseFxuIiwgaG9zdC0+YmFzZSwgaG9zdC0+YmFzZSArIGRhdGEtPk1taW9MZW5ndGggLSAxKTsKKwlzZXFfcHJpbnRmKG0sICJzZ190YWJsZXNpemU6ICAgICAgICAgICVkXG4iLCAgICAgICAgICBob3N0LT5zZ190YWJsZXNpemUpO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VVGU19IU19HMgorI2RlZmluZSBVRlNfUUNPTV9MSU1JVF9QV01HRUFSX1JYCVVGU19QV01fRzQKKyNkZWZpbmUgVUZTX1FDT01fTElNSVRfUFdNR0VBUl9UWAlVRlNfUFdNX0c0CisjZGVmaW5lIFVGU19RQ09NX0xJTUlUX1JYX1BXUl9QV00JU0xPV19NT0RFCisjZGVmaW5lIFVGU19RQ09NX0xJTUlUX1RYX1BXUl9QV00JU0xPV19NT0RFCisjZGVmaW5lIFVGU19RQ09NX0xJTUlUX1JYX1BXUl9IUwlGQVNUX01PREUKKyNkZWZpbmUgVUZTX1FDT01fTElNSVRfVFhfUFdSX0hTCUZBU1RfTU9ERQorI2RlZmluZSBVRlNfUUNPTV9MSU1JVF9IU19SQVRFCQlQQV9IU19NT0RFX0IKKyNkZWZpbmUgVUZTX1FDT01fTElNSVRfREVTSVJFRF9NT0RFCUZBU1QKKworLyogUUNPTSBVRlMgaG9zdCBjb250cm9sbGVyIHZlbmRvciBzcGVjaWZpYyByZWdpc3RlcnMgKi8KK2VudW0geworCVJFR19VRlNfU1lTMUNMS18xVVMgICAgICAgICAgICAgICAgID0gMHhDMCwKKwlSRUdfVUZTX1RYX1NZTUJPTF9DTEtfTlNfVVMgICAgICAgICA9IDB4QzQsCisJUkVHX1VGU19MT0NBTF9QT1JUX0lEX1JFRyAgICAgICAgICAgPSAweEM4LAorCVJFR19VRlNfUEFfRVJSX0NPREUgICAgICAgICAgICAgICAgID0gMHhDQywKKwlSRUdfVUZTX1JFVFJZX1RJTUVSX1JFRyAgICAgICAgICAgICA9IDB4RDAsCisJUkVHX1VGU19QQV9MSU5LX1NUQVJUVVBfVElNRVIgICAgICAgPSAweEQ4LAorCVJFR19VRlNfQ0ZHMSAgICAgICAgICAgICAgICAgICAgICAgID0gMHhEQywKKwlSRUdfVUZTX0NGRzIgICAgICAgICAgICAgICAgICAgICAgICA9IDB4RTAsCisJUkVHX1VGU19IV19WRVJTSU9OICAgICAgICAgICAgICAgICAgPSAwe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2aW5vX2dfc3RkLAotCS52aWRpb2Nfc19zdGQgCQkgICAgID0gdmlub19zX3N0ZCwKLQkudmlkaW9jX3F1ZXJ5c3RkICAgICAgICAgICAgID0gdmlub19xdWVyeXN0ZCwKLQkudmlkaW9jX2Nyb3BjYXAgICAgICAJICAgICA9IHZpbm9fY3JvcGNhcCwKLQkudmlkaW9jX3NfY3JvcCAgICAgICAJICAgICA9IHZpbm9fc19jcm9wLAotCS52aWRpb2NfZ19jcm9wICAgICAgIAkgICAgID0gdmlub19nX2Nyb3AsCi0JLnZpZGlvY19zX3Bhcm0gCQkgICAgID0gdmlub19zX3Bhcm0sCi0JLnZpZGlvY19nX3Bhcm0gCQkgICAgID0gdmlub19nX3Bhcm0sCi0JLnZpZGlvY19yZXFidWZzICAgICAgICAgICAgICA9IHZpbm9fcmVxYnVmcywKLQkudmlkaW9jX3F1ZXJ5YnVmICAgICAgICAgICAgID0gdmlub19xdWVyeWJ1ZiwKLQkudmlkaW9jX3FidWYgICAgICAgICAgICAgICAgID0gdmlub19xYnVmLAotCS52aWRpb2NfZHFidWYgICAgICAgICAgICAgICAgPSB2aW5vX2RxYnVmLAotCS52aWRpb2Nfc3RyZWFtb24gICAgICAgICAgICAgPSB2aW5vX3N0cmVhbW9uLAotCS52aWRpb2Nfc3RyZWFtb2ZmICAgICAgICAgICAgPSB2aW5vX3N0cmVhbW9mZiwKLQkudmlkaW9jX3F1ZXJ5Y3RybCAgICAgICAgICAgID0gdmlub19xdWVyeWN0cmwsCi0JLnZpZGlvY19nX2N0cmwgICAgICAgICAgICAgICA9IHZpbm9fZ19jdHJsLAotCS52aWRpb2Nfc19jdHJsICAgICAgICAgICAgICAgPSB2aW5vX3NfY3RybCwKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgdjRsMl9maWxlX29wZXJhdGlvbnMgdmlub19mb3BzID0gewotCS5vd25lcgkJPSBUSElTX01PRFVMRSwKLQkub3BlbgkJPSB2aW5vX29wZW4sCi0JLnJlbG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SBHUElPRFZfMjQJNjMKKyNkZWZpbmUgR1BJT0RWXzI1CTY0CisjZGVmaW5lIEdQSU9EVl8yNgk2NQorI2RlZmluZSBHUElPRFZfMjcJNjYKKyNkZWZpbmUgR1BJT0RWXzI4CTY3CisjZGVmaW5lIEdQSU9EVl8yOQk2OAorI2RlZmluZSBHUElPSF8wCQk2OQorI2RlZmluZSBHUElPSF8xCQk3MAorI2RlZmluZSBHUElPSF8yCQk3MQorI2RlZmluZSBHUElPSF8zCQk3MgorI2RlZmluZSBHUElPSF80CQk3MworI2RlZmluZSBHUElPSF81CQk3NAorI2RlZmluZSBHUElPSF82CQk3NQorI2RlZmluZSBHUElPSF83CQk3NgorI2RlZmluZSBHUElPSF84CQk3NworI2RlZmluZSBHUElPSF85CQk3OAorI2RlZmluZSBHUElPWl8wCQk3OQorI2RlZmluZSBHUElPWl8xCQk4MAorI2RlZmluZSBHUElPWl8yCQk4MQorI2RlZmluZSBHUElPWl8zCQk4MgorI2RlZmluZSBHUElPWl80CQk4MworI2RlZmluZSBHUElPWl81CQk4NAorI2RlZmluZSBHUElPWl82CQk4NQorI2RlZmluZSBHUElPWl83CQk4NgorI2RlZmluZSBHUElPWl84CQk4NworI2RlZmluZSBHUElPWl85CQk4OAorI2RlZmluZSBHUElPWl8xMAk4OQorI2RlZmluZSBHUElPWl8xMQk5MAorI2RlZmluZSBHUElPWl8xMgk5MQorI2RlZmluZSBHUElPWl8xMwk5MgorI2RlZmluZSBHUElPWl8xNAk5MworI2RlZmluZSBDQVJEXzAJCTk0CisjZGVmaW5lIENBUkRfMQkJOTUKKyNkZWZpbmUgQ0FSRF8yCQk5NgorI2RlZmluZSBDQVJEXzMJCTk3CisjZGVmaW5lIENBUkRfNAkJOTgKKyNkZWZpbmUgQ0FSRF81CQk5OQorI2RlZmluZSBDQVJEXzYJCTEwMAorI2RlZmluZSBCT09UXzAJCTEwMQorI2RlZmluZSBCT09UXzEJCTEwMgorI2RlZmluZSBCT09UXzIJCTEwMworI2R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nKCJcbioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiIpOworCXByX3dhcm5pbmcoIlxuIik7CisJcHJfd2FybmluZygiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuIik7CiAJcHJfd2FybmluZygiKiogICBOT1RJQ0UgTk9USUNFIE5PVElDRSBOT1RJQ0UgTk9USUNFIE5PVElDRSBOT1RJQ0UgICAqKlxuIik7CiAJcHJfd2FybmluZygiKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKlxuIik7CiAJcHJfd2FybmluZygiKiogdHJhY2VfcHJpbnRrKCkgYmVpbmcgdXNlZC4gQWxsb2NhdGluZyBleHRyYSBtZW1vcnkuICAqKlxuIik7CkBAIC0zMzUyLDEyICszMzUzLDEyIEBACiAKIAltdXRleF9sb2NrKCZ0cmFjaW5nX2NwdW1hc2tfdXBkYXRlX2xvY2spOwogCi0JbGVuID0gY3B1bWFza19zY25wcmludGYobWFza19zdHIsIGNvdW50LCB0ci0+dHJhY2luZ19jcHVtYXNrKTsKLQlpZiAoY291bnQgLSBsZW4gPCAyKSB7CisJbGVuID0gc25wcmludGYobWFza19zdHIsIGNvdW50LCAiJSpwYlxuIiwKKwkJICAgICAgIGNwdW1hc2tfcHJfYXJncyh0ci0+dHJhY2luZ19jcHVtYXNrKSk7CisJaWYgKGxlbiA+PSBjb3VudCkgewogCQljb3VudCA9IC1FSU5WQUw7CiAJCWdvdG8gb3V0X2VycjsKIAl9Ci0JbGVuICs9IHNwcmludGYobWFza19zdHIgKyBsZW4sICJcbiIpOwogCWNvdW50ID0gc2ltcGxlX3JlYWRfZnJvbV9idWZmZXIodWJ1ZiwgY291bnQsIHBwb3MsIG1hc2tfc3RyLCBOUl9DUFVTKzEpOwogCiBvdXRfZXJyOgpAQCAtNDE0MCw2ICs0MTQxLDEyIEBACiAJC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ZXQgYXJyYXkuCiAgKi8KLXZvaWQgcmhhc2h0YWJsZV9kZXN0cm95KGNvbnN0IHN0cnVjdCByaGFzaHRhYmxlICpodCkKK3ZvaWQgcmhhc2h0YWJsZV9kZXN0cm95KHN0cnVjdCByaGFzaHRhYmxlICpodCkKIHsKLQlidWNrZXRfdGFibGVfZnJlZShodC0+dGJsKTsKKwlodC0+YmVpbmdfZGVzdHJveWVkID0gdHJ1ZTsKKworCWlmIChodC0+cC5ncm93X2RlY2lzaW9uIHx8IGh0LT5wLnNocmlua19kZWNpc2lvbikKKwkJY2FuY2VsX3dvcmtfc3luYygmaHQtPnJ1bl93b3JrKTsKKworCW11dGV4X2xvY2soJmh0LT5tdXRleCk7CisJYnVja2V0X3RhYmxlX2ZyZWUocmh0X2RlcmVmZXJlbmNlKGh0LT50YmwsIGh0KSk7CisJbXV0ZXhfdW5sb2NrKCZodC0+bXV0ZXgpOwogfQogRVhQT1JUX1NZTUJPTF9HUEwocmhhc2h0YWJsZV9kZXN0cm95KTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBTZWxmIFRlc3QKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmZGVmIENPTkZJR19URVNUX1JIQVNIVEFCTEUKLQotI2RlZmluZSBURVNUX0hUX1NJWkUJOAotI2RlZmluZSBURVNUX0VOVFJJRVMJMjA0OAotI2RlZmluZSBURVNUX1BUUgkoKHZvaWQgKikgMHhkZWFkYmVlZikKLSNkZWZpbmUgVEVTVF9ORVhQQU5EUwk0Ci0KLSNpZmRlZiBDT05GSUdfUFJPVkVfTE9DS0lORwotc3RhdGljIGludCB0ZXN0X211dGV4X2lzX2hlbGQodm9pZCAqcGFyZW50KQotewotCXJldHVybiAxOwotfQotI2VuZGlmCi0KLXN0cnVjdC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h0XG4iKTsKKwlwdHIgPSBrbWFsbG9jKHNpemUsIEdGUF9LRVJORUwpOworCWlmICghcHRyKSB7CisJCXByX2VycigiQWxsb2NhdGlvbiBmYWlsZWRcbiIpOworCQlyZXR1cm47CisJfQorCisJcHRyW3NpemVdID0gJ3gnOworCWtmcmVlKHB0cik7Cit9CisKK3N0YXRpYyBub2lubGluZSB2b2lkIF9faW5pdCBrbWFsbG9jX29vYl9sZWZ0KHZvaWQpCit7CisJY2hhciAqcHRyOworCXNpemVfdCBzaXplID0gMTU7CisKKwlwcl9pbmZvKCJvdXQtb2YtYm91bmRzIHRvIGxlZnRcbiIpOworCXB0ciA9IGttYWxsb2Moc2l6ZSwgR0ZQX0tFUk5FTCk7CisJaWYgKCFwdHIpIHsKKwkJcHJfZXJyKCJBbGxvY2F0aW9uIGZhaWxlZFxuIik7CisJCXJldHVybjsKKwl9CisKKwkqcHRyID0gKihwdHIgLSAxKTsKKwlrZnJlZShwdHIpOworfQorCitzdGF0aWMgbm9pbmxpbmUgdm9pZCBfX2luaXQga21hbGxvY19ub2RlX29vYl9yaWdodCh2b2lkKQoreworCWNoYXIgKnB0cjsKKwlzaXplX3Qgc2l6ZSA9IDQwOTY7CisKKwlwcl9pbmZvKCJrbWFsbG9jX25vZGUoKTogb3V0LW9mLWJvdW5kcyB0byByaWdodFxuIik7CisJcHRyID0ga21hbGxvY19ub2RlKHNpemUsIEdGUF9LRVJORUwsIDApOworCWlmICghcHRyKSB7CisJCXByX2VycigiQWxsb2NhdGlvbiBmYWlsZWRcbiIpOworCQlyZXR1cm47CisJfQorCisJcHRyW3NpemVdID0gMDsKKwlrZnJlZShwdHIpOworfQorCitzdGF0aWMgbm9pbmxpbmUgdm9pZCBfX2luaXQga21hbGxvY19sYXJnZV9vb2JfcmlndGgodm9pZCkKK3sKKwljaGFyICpwdHI7CisJc2l6ZV90IHNpemUgPSBLTUFMTE9DX01BWF9DQUNIRV9TSVpFICsgMTA7CisKKwlwcl9pbmZvKCJrbWF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lZCBzbyBjb21waWxlciBjb3VsZAorICogcGVyZm9ybSBiZXR0ZXIgb3B0aW1pemF0aW9ucyBpbiBlYWNoIG9mIF9fYXNhbl9sb2FkWC9fX2Fzc25fc3RvcmVYCisgKiBkZXBlbmRpbmcgb24gbWVtb3J5IGFjY2VzcyBzaXplIFguCisgKi8KKworc3RhdGljIF9fYWx3YXlzX2lubGluZSBib29sIG1lbW9yeV9pc19wb2lzb25lZF8xKHVuc2lnbmVkIGxvbmcgYWRkcikKK3sKKwlzOCBzaGFkb3dfdmFsdWUgPSAqKHM4ICopa2FzYW5fbWVtX3RvX3NoYWRvdygodm9pZCAqKWFkZHIpOworCisJaWYgKHVubGlrZWx5KHNoYWRvd192YWx1ZSkpIHsKKwkJczggbGFzdF9hY2Nlc3NpYmxlX2J5dGUgPSBhZGRyICYgS0FTQU5fU0hBRE9XX01BU0s7CisJCXJldHVybiB1bmxpa2VseShsYXN0X2FjY2Vzc2libGVfYnl0ZSA+PSBzaGFkb3dfdmFsdWUpOworCX0KKworCXJldHVybiBmYWxzZTsKK30KKworc3RhdGljIF9fYWx3YXlzX2lubGluZSBib29sIG1lbW9yeV9pc19wb2lzb25lZF8yKHVuc2lnbmVkIGxvbmcgYWRkcikKK3sKKwl1MTYgKnNoYWRvd19hZGRyID0gKHUxNiAqKWthc2FuX21lbV90b19zaGFkb3coKHZvaWQgKilhZGRyKTsKKworCWlmICh1bmxpa2VseSgqc2hhZG93X2FkZHIpKSB7CisJCWlmIChtZW1vcnlfaXNfcG9pc29uZWRfMShhZGRyICsgMSkpCisJCQlyZXR1cm4gdHJ1ZTsKKworCQlpZiAobGlrZWx5KCgoYWRkciArIDEpICYgS0FTQU5fU0hBRE9XX01BU0spICE9IDApKQorCQkJcmV0dXJuIGZhbHNlOworCisJCXJldHVybiB1bmxpa2VseSgqKHU4ICopc2hhZG93X2FkZHIpOworCX0KKworCXJldHVybiBmYWxzZTsKK30KKworc3RhdGljIF9fYWx3YXlzX2lubGluZSBib29sIG1lbW9yeV9pc19wb2lzb25lZF80KHVuc2lnbmVkIGxvbmcgYWRkcikKK3sKKwl1MTYgKnNoYWRvd19hZGRyID0gKHUxNiAqKWthc2FuX21lbV90b19zaGFkb3coKHZvaWQgKilhZGRyKTsKKworCWlmICh1bmxpa2VseSgqc2hhZG93X2FkZHIpKSB7CisJCWlmIChtZW1vcnlfaXNfcG9pc29uZWRfMShhZGRyICsgMykpCisJCQlyZXR1cm4gdHJ1ZTsKKworCQlpZiAobGlrZWx5KCgoYWRkciArIDMpICYgS0FTQU5fU0hBRE9XX01BU0spID49IDMpKQorCQkJcmV0dXJuIGZhbHNlOworCisJCXJldHVybiB1bmxpa2VseSgqKHU4ICopc2hhZG93X2FkZHIpOworCX0KKworCXJldHVybiBmYWxzZTsKK30KKworc3RhdGljIF9fYWx3YXlzX2lubGluZSBib29sIG1lbW9yeV9pc19wb2lzb25lZF84KHVuc2lnbmVkIGxvbmcgYWRkcikKK3sKKwl1MTYgKnNoYWRvd19hZGRyID0gKHUxNiAqKWthc2FuX21lbV90b19zaGFkb3coKHZvaWQgKilhZGRyKTsKKworCWlmICh1bmxpa2VseSgqc2hhZG93X2FkZHIpKSB7CisJCWlmIChtZW1vcnlfaXNfcG9pc29uZWRfMShhZGRyICsgNykpCisJCQlyZXR1cm4gdHJ1ZTsKKworCQlpZiAobGlrZWx5KCgoYWRkciArIDcpICYgS0FTQU5fU0hBRE9XX01BU0spID49IDcpKQorCQkJcmV0dXJuIGZhbHNlOworCisJCXJldHVybiB1bmxpa2VseSgqKHU4ICopc2hhZG93X2FkZHIpOworCX0KKworCXJldHVybiBmYWxzZTsKK30KKworc3RhdGljIF9fYWx3YXlzX2lubGluZSBib29sIG1lbW9yeV9pc19wb2lzb25lZF8xNih1bnNpZ25lZCBsb25nIGFkZHIpCit7CisJdTMyICpzaGFkb3dfYWRkciA9ICh1MzIgKilrYXNhbl9tZW1fdG9fc2hhZG93KCh2b2lkICopYWRkcik7CisKKwlpZiAodW5saWtlbHkoK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PT09PT09PT09PT1cbiIpOworCXByaW50X2Vycm9yX2Rlc2NyaXB0aW9uKGluZm8pOworCXByaW50X2FkZHJlc3NfZGVzY3JpcHRpb24oaW5mbyk7CisJcHJpbnRfc2hhZG93X2Zvcl9hZGRyZXNzKGluZm8tPmZpcnN0X2JhZF9hZGRyKTsKKwlwcl9lcnIoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSIKKwkJIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIik7CisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcmVwb3J0X2xvY2ssIGZsYWdzKTsKK30KKwordm9pZCBrYXNhbl9yZXBvcnRfdXNlcl9hY2Nlc3Moc3RydWN0IGthc2FuX2FjY2Vzc19pbmZvICppbmZvKQoreworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmcmVwb3J0X2xvY2ssIGZsYWdzKTsKKwlwcl9lcnIoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSIKKwkJIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIik7CisJcHJfZXJyKCJCVUc6IEtBU2FuOiB1c2VyLW1lbW9yeS1hY2Nlc3Mgb24gYWRkcmVzcyAlcFxuIiwKKwkJaW5mby0+YWNjZXNzX2FkZHIpOworCXByX2VycigiJXMgb2Ygc2l6ZSAlenUgYnkgdGFzayAlcy8lZFxuIiwKKwkJaW5mby0+aXNfd3JpdGUgPyAiV3JpdGUiIDogIlJlYWQiLAorCQlpbmZvLT5hY2Nlc3Nfc2l6ZSwgY3VycmVudC0+Y29tbSwgdGFza19waWRfbnIoY3VycmVudCkpOworCWR1bXBfc3RhY2soKTsKKwlwcl9lcnIoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSIKKwkJIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIik7CisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcmVwb3J0X2xvY2ssIGZsYWdzKTsKK30KKwordm9pZCBrYXNhbl9yZXBvcnQodW5zaWduZWQgbG9uZyBhZGRyLCBzaXplX3Qgc2l6ZSwKKwkJYm9vbCBpc193cml0ZSwgdW5zaWduZWQgbG9uZyBpcCkKK3sKKwlzdHJ1Y3Qga2FzYW5fYWNjZXNzX2luZm8gaW5mbzsKKworCWlmIChsaWtlbHkoIWthc2FuX2VuYWJsZWQoKSkpCisJCXJldHVybjsKKworCWluZm8uYWNjZXNzX2FkZHIgPSAodm9pZCAqKWFkZHI7CisJaW5mby5hY2Nlc3Nfc2l6ZSA9IHNpemU7CisJaW5mby5pc193cml0ZSA9IGlzX3dyaXRlOworCWluZm8uaXAgPSBpcDsKKwlrYXNhbl9yZXBvcnRfZXJyb3IoJmluZm8pOworfQorCisKKyNkZWZpbmUgREVGSU5FX0FTQU5fUkVQT1JUX0xPQUQoc2l6ZSkgICAgICAgICAgICAgICAgICAgICBcCit2b2lkIF9fYXNhbl9yZXBvcnRfbG9hZCMjc2l6ZSMjX25vYWJvcnQodW5zaWduZWQgbG9uZyBhZGRyKSBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWthc2FuX3JlcG9ydChhZGRyLCBzaXplLCBmYWxzZSwgX1JFVF9JUF8pOwkgIFwKK30gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCitFWFBPUlRfU1lNQk9MKF9fYXNhbl9yZXBvcnRfbG9hZCMjc2l6ZSMjX25vYWJvcnQpCisKKyNkZWZpbmUgREVGSU5FX0FTQU5fUkVQT1JUX1NUT1JFKHNpemUpICAgICAgICAgICAgICAgICAgICAgXAordm9pZCBfX2FzYW5fcmVwb3J0X3N0b3JlIyNzaXplIyNfbm9hYm9ydCh1bnNpZ25lZCBsb25nIGFkZHIpIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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pbmZvX21pbl9hZ2UgPSB2YWw7CisJaGNpX2Rldl91bmxvY2soaGRldik7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBjb25uX2luZm9fbWluX2FnZV9nZXQodm9pZCAqZGF0YSwgdTY0ICp2YWwpCit7CisJc3RydWN0IGhjaV9kZXYgKmhkZXYgPSBkYXRhOworCisJaGNpX2Rldl9sb2NrKGhkZXYpOworCSp2YWwgPSBoZGV2LT5jb25uX2luZm9fbWluX2FnZTsKKwloY2lfZGV2X3VubG9jayhoZGV2KTsKKworCXJldHVybiAwOworfQorCitERUZJTkVfU0lNUExFX0FUVFJJQlVURShjb25uX2luZm9fbWluX2FnZV9mb3BzLCBjb25uX2luZm9fbWluX2FnZV9nZXQsCisJCQljb25uX2luZm9fbWluX2FnZV9zZXQsICIlbGx1XG4iKTsKKworc3RhdGljIGludCBjb25uX2luZm9fbWF4X2FnZV9zZXQodm9pZCAqZGF0YSwgdTY0IHZhbCkKK3sKKwlzdHJ1Y3QgaGNpX2RldiAqaGRldiA9IGRhdGE7CisKKwlpZiAodmFsID09IDAgfHwgdmFsIDwgaGRldi0+Y29ubl9pbmZvX21pbl9hZ2UpCisJCXJldHVybiAtRUlOVkFMOworCisJaGNpX2Rldl9sb2NrKGhkZXYpOworCWhkZXYtPmNvbm5faW5mb19tYXhfYWdlID0gdmFsOworCWhjaV9kZXZfdW5sb2NrKGhkZXYpOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgY29ubl9pbmZvX21heF9hZ2VfZ2V0KHZvaWQgKmRhdGEsIHU2NCAqdmFsKQoreworCXN0cnVjdCBoY2lfZGV2ICpoZGV2ID0gZGF0YTsKKworCWhjaV9kZXZfbG9jayhoZGV2KTsKKwkqdmFsID0gaGRldi0+Y29ubl9pbmZvX21heF9hZ2U7CisJaGNpX2Rldl91bmxvY2soaGRldik7CisKKwlyZXR1cm4gMDsKK30KKworREVGSU5FX1NJTVBMRV9BVFRSSUJVVEUoY29ubl9p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pbnRlcnZhbDsKKwloY2lfZGV2X3VubG9jayhoZGV2KTsKKworCXJldHVybiAwOworfQorCitERUZJTkVfU0lNUExFX0FUVFJJQlVURShjb25uX21pbl9pbnRlcnZhbF9mb3BzLCBjb25uX21pbl9pbnRlcnZhbF9nZXQsCisJCQljb25uX21pbl9pbnRlcnZhbF9zZXQsICIlbGx1XG4iKTsKKworc3RhdGljIGludCBjb25uX21heF9pbnRlcnZhbF9zZXQodm9pZCAqZGF0YSwgdTY0IHZhbCkKK3sKKwlzdHJ1Y3QgaGNpX2RldiAqaGRldiA9IGRhdGE7CisKKwlpZiAodmFsIDwgMHgwMDA2IHx8IHZhbCA+IDB4MGM4MCB8fCB2YWwgPCBoZGV2LT5sZV9jb25uX21pbl9pbnRlcnZhbCkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwloY2lfZGV2X2xvY2soaGRldik7CisJaGRldi0+bGVfY29ubl9tYXhfaW50ZXJ2YWwgPSB2YWw7CisJaGNpX2Rldl91bmxvY2soaGRldik7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBjb25uX21heF9pbnRlcnZhbF9nZXQodm9pZCAqZGF0YSwgdTY0ICp2YWwpCit7CisJc3RydWN0IGhjaV9kZXYgKmhkZXYgPSBkYXRhOworCisJaGNpX2Rldl9sb2NrKGhkZXYpOworCSp2YWwgPSBoZGV2LT5sZV9jb25uX21heF9pbnRlcnZhbDsKKwloY2lfZGV2X3VubG9jayhoZGV2KTsKKworCXJldHVybiAwOworfQorCitERUZJTkVfU0lNUExFX0FUVFJJQlVURShjb25uX21heF9pbnRlcnZhbF9mb3BzLCBjb25uX21heF9pbnRlcnZhbF9nZXQsCisJCQljb25uX21heF9pbnRlcnZhbF9zZXQsICIlbGx1XG4iKTsKKworc3RhdGljIGludCBjb25uX2xhdGVuY3lfc2V0KHZvaWQgKmRhdGEsIHU2NCB2YWwpCit7CisJc3RydWN0IGhjaV9kZXYgKmhkZXYgPSBkYXRhOworCisJaWYgKHZhb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WRlZF90YWlscm9vbTsKKwlza2IgPSBzb2NrX2FsbG9jX3NlbmRfc2tiKHNrLCBobGVuICsgdGxlbiArIHNpemUsCisJCQkJICBtc2ctPm1zZ19mbGFncyAmIE1TR19ET05UV0FJVCwgJmVycik7CisJaWYgKCFza2IpCisJCWdvdG8gb3V0X2RldjsKKworCXNrYl9yZXNlcnZlKHNrYiwgaGxlbik7CisKKwlza2JfcmVzZXRfbWFjX2hlYWRlcihza2IpOworCXNrYl9yZXNldF9uZXR3b3JrX2hlYWRlcihza2IpOworCisJZXJyID0gbWVtY3B5X2Zyb21fbXNnKHNrYl9wdXQoc2tiLCBzaXplKSwgbXNnLCBzaXplKTsKKwlpZiAoZXJyIDwgMCkKKwkJZ290byBvdXRfc2tiOworCisJc2tiLT5kZXYgPSBkZXY7CisJc2tiLT5zayAgPSBzazsKKwlza2ItPnByb3RvY29sID0gaHRvbnMoRVRIX1BfSUVFRTgwMjE1NCk7CisKKwlkZXZfcHV0KGRldik7CisKKwllcnIgPSBkZXZfcXVldWVfeG1pdChza2IpOworCWlmIChlcnIgPiAwKQorCQllcnIgPSBuZXRfeG1pdF9lcnJubyhlcnIpOworCisJcmV0dXJuIGVyciA/OiBzaXplOworCitvdXRfc2tiOgorCWtmcmVlX3NrYihza2IpOworb3V0X2RldjoKKwlkZXZfcHV0KGRldik7CitvdXQ6CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCByYXdfcmVjdm1zZyhzdHJ1Y3Qga2lvY2IgKmlvY2IsIHN0cnVjdCBzb2NrICpzaywgc3RydWN0IG1zZ2hkciAqbXNnLAorCQkgICAgICAgc2l6ZV90IGxlbiwgaW50IG5vYmxvY2ssIGludCBmbGFncywgaW50ICphZGRyX2xlbikKK3sKKwlzaXplX3QgY29waWVkID0gMDsKKwlpbnQgZXJyID0gLUVPUE5PVFNVUFA7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKworCXNrYiA9IHNrYl9yZWN2X2RhdGFncmFtKHNrLCBmb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KKworCWNiLT5zZWNlbiA9IHJvLT5zZWNlbjsKKwljYi0+c2VjZW5fb3ZlcnJpZGUgPSByby0+c2VjZW5fb3ZlcnJpZGU7CisJY2ItPnNlY2xldmVsID0gcm8tPnNlY2xldmVsOworCWNiLT5zZWNsZXZlbF9vdmVycmlkZSA9IHJvLT5zZWNsZXZlbF9vdmVycmlkZTsKKworCWVyciA9IGRldl9oYXJkX2hlYWRlcihza2IsIGRldiwgRVRIX1BfSUVFRTgwMjE1NCwgJmRzdF9hZGRyLAorCQkJICAgICAgcm8tPmJvdW5kID8gJnJvLT5zcmNfYWRkciA6IE5VTEwsIHNpemUpOworCWlmIChlcnIgPCAwKQorCQlnb3RvIG91dF9za2I7CisKKwllcnIgPSBtZW1jcHlfZnJvbV9tc2coc2tiX3B1dChza2IsIHNpemUpLCBtc2csIHNpemUpOworCWlmIChlcnIgPCAwKQorCQlnb3RvIG91dF9za2I7CisKKwlza2ItPmRldiA9IGRldjsKKwlza2ItPnNrICA9IHNrOworCXNrYi0+cHJvdG9jb2wgPSBodG9ucyhFVEhfUF9JRUVFODAyMTU0KTsKKworCWRldl9wdXQoZGV2KTsKKworCWVyciA9IGRldl9xdWV1ZV94bWl0KHNrYik7CisJaWYgKGVyciA+IDApCisJCWVyciA9IG5ldF94bWl0X2Vycm5vKGVycik7CisKKwlyZXR1cm4gZXJyID86IHNpemU7CisKK291dF9za2I6CisJa2ZyZWVfc2tiKHNrYik7CitvdXRfZGV2OgorCWRldl9wdXQoZGV2KTsKK291dDoKKwlyZXR1cm4gZXJyOworfQorCitzdGF0aWMgaW50IGRncmFtX3JlY3Ztc2coc3RydWN0IGtpb2NiICppb2NiLCBzdHJ1Y3Qgc29jayAqc2ssCisJCQkgc3RydWN0IG1zZ2hkciAqbXNnLCBzaXplX3QgbGVuLCBpbnQgbm9ibG9jaywKKwkJCSBpbnQgZmxhZ3MsIGludCAqYWRkcl9sZW4pCit7CisJc2l6ZV90IGNvcGllZCA9IDA7CisJaW50IGVyciA9IC1FT1BOT1RTVVBQOworCXN0cnVjdCBza19idWZmICpza2I7CisJREVDTEFSRV9TT0NLQUREUihzdHJ1Y3Qgc29ja2FkZHJfaWVlZTgwMjE1NCAqLCBzYWRkciwgbXNnLT5tc2dfbmFtZSk7CisKKwlza2IgPSBza2JfcmVjdl9kYXRhZ3JhbShzaywgZmxhZ3MsIG5vYmxvY2ssICZlcnIpOworCWlmICghc2tiKQorCQlnb3RvIG91dDsKKworCWNvcGllZCA9IHNrYi0+bGVuOworCWlmIChsZW4gPCBjb3BpZWQpIHsKKwkJbXNnLT5tc2dfZmxhZ3MgfD0gTVNHX1RSVU5DOworCQljb3BpZWQgPSBsZW47CisJfQorCisJLyogRklYTUU6IHNraXAgaGVhZGVycyBpZiBuZWNlc3NhcnkgPyEgKi8KKwllcnIgPSBza2JfY29weV9kYXRhZ3JhbV9tc2coc2tiLCAwLCBtc2csIGNvcGllZCk7CisJaWYgKGVycikKKwkJZ290byBkb25lOworCisJc29ja19yZWN2X3RzX2FuZF9kcm9wcyhtc2csIHNrLCBza2IpOworCisJaWYgKHNhZGRyKSB7CisJCXNhZGRyLT5mYW1pbHkgPSBBRl9JRUVFODAyMTU0OworCQlpZWVlODAyMTU0X2FkZHJfdG9fc2EoJnNhZGRyLT5hZGRyLCAmbWFjX2NiKHNrYiktPnNvdXJjZSk7CisJCSphZGRyX2xlbiA9IHNpemVvZigqc2FkZHIpOworCX0KKworCWlmIChmbGFncyAmIE1TR19UUlVOQykKKwkJY29waWVkID0gc2tiLT5sZW47Citkb25lOgorCXNrYl9mcmVlX2RhdGFncmFtKHNrLCBza2IpOworb3V0OgorCWlmIChlcnIpCisJCXJldHVybiBlcnI7CisJcmV0dXJuIGNvcGllZDsKK30KKworc3RhdGljIGludCBkZ3JhbV9yY3Zfc2tiKHN0cnVjdCBzb2NrICpzaywgc3RydWN0IHNrX2J1ZmYgKnNrYikKK3sKKwlza2IgPSBza2Jfc2hhcmVfY2hlY2soc2tiLCBHRlBfQVRPT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WllLT5taWMpKSAhPSAwKSB7CisJCQlrZXktPnUuYWVzX2NtYWMuaWN2ZXJyb3JzKys7CisJCQlyZXR1cm4gUlhfRFJPUF9VTlVTQUJMRTsKKwkJfQorCX0KKworCW1lbWNweShrZXktPnUuYWVzX2NtYWMucnhfcG4sIGlwbiwgNik7CisKKwkvKiBSZW1vdmUgTU1JRSAqLworCXNrYl90cmltKHNrYiwgc2tiLT5sZW4gLSBzaXplb2YoKm1taWUpKTsKKworCXJldHVybiBSWF9DT05USU5VRTsKK30KKworaWVlZTgwMjExX3R4X3Jlc3VsdAoraWVlZTgwMjExX2NyeXB0b19hZXNfZ21hY19lbmNyeXB0KHN0cnVjdCBpZWVlODAyMTFfdHhfZGF0YSAqdHgpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKwlzdHJ1Y3QgaWVlZTgwMjExX3R4X2luZm8gKmluZm87CisJc3RydWN0IGllZWU4MDIxMV9rZXkgKmtleSA9IHR4LT5rZXk7CisJc3RydWN0IGllZWU4MDIxMV9tbWllXzE2ICptbWllOworCXN0cnVjdCBpZWVlODAyMTFfaGRyICpoZHI7CisJdTggYWFkWzIwXTsKKwl1NjQgcG42NDsKKwl1OCBub25jZVsxMl07CisKKwlpZiAoV0FSTl9PTihza2JfcXVldWVfbGVuKCZ0eC0+c2ticykgIT0gMSkpCisJCXJldHVybiBUWF9EUk9QOworCisJc2tiID0gc2tiX3BlZWsoJnR4LT5za2JzKTsKKworCWluZm8gPSBJRUVFODAyMTFfU0tCX0NCKHNrYik7CisKKwlpZiAoaW5mby0+Y29udHJvbC5od19rZXkpCisJCXJldHVybiBUWF9DT05USU5VRTsKKworCWlmIChXQVJOX09OKHNrYl90YWlscm9vbShza2IpIDwgc2l6ZW9mKCptbWllKSkpCisJCXJldHVybiBUWF9EUk9QOworCisJbW1pZSA9IChzdHJ1Y3QgaWVlZTgwMjExX21taWVfMTYgKilza2JfcHV0KHNrYiwgc2l6ZW9mKCptbWllKSk7CisJbW1pZS0+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2h0YWJsZV93YWxrX3N0b3AoJml0ZXItPmh0aSk7CisJcmhhc2h0YWJsZV93YWxrX2V4aXQoJml0ZXItPmh0aSk7Cit9CisKK3N0YXRpYyB2b2lkICpfX25ldGxpbmtfc2VxX25leHQoc3RydWN0IHNlcV9maWxlICpzZXEpCit7CisJc3RydWN0IG5sX3NlcV9pdGVyICppdGVyID0gc2VxLT5wcml2YXRlOworCXN0cnVjdCBuZXRsaW5rX3NvY2sgKm5sazsKKworCWRvIHsKKwkJZm9yICg7OykgeworCQkJaW50IGVycjsKKworCQkJbmxrID0gcmhhc2h0YWJsZV93YWxrX25leHQoJml0ZXItPmh0aSk7CisKKwkJCWlmIChJU19FUlIobmxrKSkgeworCQkJCWlmIChQVFJfRVJSKG5saykgPT0gLUVBR0FJTikKKwkJCQkJY29udGludWU7CisKKwkJCQlyZXR1cm4gbmxrOworCQkJfQorCisJCQlpZiAobmxrKQorCQkJCWJyZWFrOworCisJCQluZXRsaW5rX3dhbGtfc3RvcChpdGVyKTsKKwkJCWlmICgrK2l0ZXItPmxpbmsgPj0gTUFYX0xJTktTKQorCQkJCXJldHVybiBOVUxMOworCisJCQllcnIgPSBuZXRsaW5rX3dhbGtfc3RhcnQoaXRlcik7CisJCQlpZiAoZXJyKQorCQkJCXJldHVybiBFUlJfUFRSKGVycik7CisJCX0KKwl9IHdoaWxlIChzb2NrX25ldCgmbmxrLT5zaykgIT0gc2VxX2ZpbGVfbmV0KHNlcSkpOworCisJcmV0dXJuIG5sazsKK30KKworc3RhdGljIHZvaWQgKm5ldGxpbmtfc2VxX3N0YXJ0KHN0cnVjdCBzZXFfZmlsZSAqc2VxLCBsb2ZmX3QgKnBvc3ApCit7CisJc3RydWN0IG5sX3NlcV9pdGVyICppdGVyID0gc2VxLT5wcml2YXRlOworCXZvaWQgKm9iaiA9IFNFUV9TVEFSVF9UT0tFTjsKKwlsb2ZmX3QgcG9zOworCWludCBlcnI7CisKKwlpdGVyLT5saW5rID0gMDsKKworCWVyciA9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U4pCisKKyNkZWZpbmUgUkVQTFlfVFJVTkNBVEVEICI8dHJ1bmNhdGVkPlxuIgorCitzdHJ1Y3QgdGlwY19ubF9jb21wYXRfbXNnIHsKKwl1MTYgY21kOworCWludCByZXBfdHlwZTsKKwlpbnQgcmVwX3NpemU7CisJaW50IHJlcV90eXBlOworCXN0cnVjdCBza19idWZmICpyZXA7CisJc3RydWN0IHRsdl9kZXNjICpyZXE7CisJc3RydWN0IHNvY2sgKmRzdF9zazsKK307CisKK3N0cnVjdCB0aXBjX25sX2NvbXBhdF9jbWRfZHVtcCB7CisJaW50ICgqaGVhZGVyKShzdHJ1Y3QgdGlwY19ubF9jb21wYXRfbXNnICopOworCWludCAoKmR1bXBpdCkoc3RydWN0IHNrX2J1ZmYgKiwgc3RydWN0IG5ldGxpbmtfY2FsbGJhY2sgKik7CisJaW50ICgqZm9ybWF0KShzdHJ1Y3QgdGlwY19ubF9jb21wYXRfbXNnICptc2csIHN0cnVjdCBubGF0dHIgKiphdHRycyk7Cit9OworCitzdHJ1Y3QgdGlwY19ubF9jb21wYXRfY21kX2RvaXQgeworCWludCAoKmRvaXQpKHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBnZW5sX2luZm8gKmluZm8pOworCWludCAoKnRyYW5zY29kZSkoc3RydWN0IHNrX2J1ZmYgKnNrYiwgc3RydWN0IHRpcGNfbmxfY29tcGF0X21zZyAqbXNnKTsKK307CisKK3N0YXRpYyBpbnQgdGlwY19za2JfdGFpbHJvb20oc3RydWN0IHNrX2J1ZmYgKnNrYikKK3sKKwlpbnQgdGFpbHJvb207CisJaW50IGxpbWl0OworCisJdGFpbHJvb20gPSBza2JfdGFpbHJvb20oc2tiKTsKKwlsaW1pdCA9IFRJUENfU0tCX01BWCAtIHNrYi0+bGVuOworCisJaWYgKHRhaWxyb29tIDwgbGltaXQpCisJCXJldHVybiB0YWlscm9vbTsKKworCXJldHVybiBsaW1pdDsKK30KKworc3RhdGljIGludCB0aXBjX2FkZF90bHYo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VF9MRU4odGx2KTsKKwlidWYgPSBUTFZfREFUQSh0bHYpICsgbGVuOworCisJdmFfc3RhcnQoYXJncywgZm10KTsKKwluID0gdnNjbnByaW50ZihidWYsIHJlbSwgZm10LCBhcmdzKTsKKwl2YV9lbmQoYXJncyk7CisKKwlUTFZfU0VUX0xFTih0bHYsIG4gKyBsZW4pOworCXNrYl9wdXQoc2tiLCBuKTsKKworCXJldHVybiBuOworfQorCitzdGF0aWMgc3RydWN0IHNrX2J1ZmYgKnRpcGNfdGx2X2FsbG9jKGludCBzaXplKQoreworCWludCBoZHJfbGVuOworCXN0cnVjdCBza19idWZmICpidWY7CisKKwlzaXplID0gVExWX1NQQUNFKHNpemUpOworCWhkcl9sZW4gPSBubG1zZ190b3RhbF9zaXplKEdFTkxfSERSTEVOICsgVElQQ19HRU5MX0hEUkxFTik7CisKKwlidWYgPSBhbGxvY19za2IoaGRyX2xlbiArIHNpemUsIEdGUF9LRVJORUwpOworCWlmICghYnVmKQorCQlyZXR1cm4gTlVMTDsKKworCXNrYl9yZXNlcnZlKGJ1ZiwgaGRyX2xlbik7CisKKwlyZXR1cm4gYnVmOworfQorCitzdGF0aWMgc3RydWN0IHNrX2J1ZmYgKnRpcGNfZ2V0X2Vycl90bHYoY2hhciAqc3RyKQoreworCWludCBzdHJfbGVuID0gc3RybGVuKHN0cikgKyAxOworCXN0cnVjdCBza19idWZmICpidWY7CisKKwlidWYgPSB0aXBjX3Rsdl9hbGxvYyhUTFZfU1BBQ0Uoc3RyX2xlbikpOworCWlmIChidWYpCisJCXRpcGNfYWRkX3RsdihidWYsIFRJUENfVExWX0VSUk9SX1NUUklORywgc3RyLCBzdHJfbGVuKTsKKworCXJldHVybiBidWY7Cit9CisKK3N0YXRpYyBpbnQgX190aXBjX25sX2NvbXBhdF9kdW1waXQoc3RydWN0IHRpcGNfbmxfY29tcGF0X2NtZF9kdW1wICpjbWQsCisJCQkJICAgc3RydWN0IHRpcGNfbmxfY29tcGF0X21zZyAqbXNnLA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KKwlsb3dib3VuZCA9IG50b2hsKG50cS0+bG93Ym91bmQpOworCXVwYm91bmQgPSBudG9obChudHEtPnVwYm91bmQpOworCisJaWYgKCEoZGVwdGggJiBUSVBDX05UUV9BTExUWVBFUykgJiYKKwkgICAgKHR5cGUgIT0gbmxhX2dldF91MzIocHVibFtUSVBDX05MQV9QVUJMX1RZUEVdKSkpCisJCXJldHVybiAwOworCWlmIChsb3dib3VuZCAmJiAobG93Ym91bmQgPiBubGFfZ2V0X3UzMihwdWJsW1RJUENfTkxBX1BVQkxfVVBQRVJdKSkpCisJCXJldHVybiAwOworCWlmICh1cGJvdW5kICYmICh1cGJvdW5kIDwgbmxhX2dldF91MzIocHVibFtUSVBDX05MQV9QVUJMX0xPV0VSXSkpKQorCQlyZXR1cm4gMDsKKworCXRpcGNfdGx2X3NwcmludGYobXNnLT5yZXAsICIlLTEwdSAiLAorCQkJIG5sYV9nZXRfdTMyKHB1YmxbVElQQ19OTEFfUFVCTF9UWVBFXSkpOworCisJaWYgKGRlcHRoID09IDEpCisJCWdvdG8gb3V0OworCisJdGlwY190bHZfc3ByaW50Zihtc2ctPnJlcCwgIiUtMTB1ICUtMTB1ICIsCisJCQkgbmxhX2dldF91MzIocHVibFtUSVBDX05MQV9QVUJMX0xPV0VSXSksCisJCQkgbmxhX2dldF91MzIocHVibFtUSVBDX05MQV9QVUJMX1VQUEVSXSkpOworCisJaWYgKGRlcHRoID09IDIpCisJCWdvdG8gb3V0OworCisJbm9kZSA9IG5sYV9nZXRfdTMyKHB1YmxbVElQQ19OTEFfUFVCTF9OT0RFXSk7CisJc3ByaW50Zihwb3J0X3N0ciwgIjwldS4ldS4ldToldT4iLCB0aXBjX3pvbmUobm9kZSksIHRpcGNfY2x1c3Rlcihub2RlKSwKKwkJdGlwY19ub2RlKG5vZGUpLCBubGFfZ2V0X3UzMihwdWJsW1RJUENfTkxBX1BVQkxfUkVGXSkpOworCXRpcGNfdGx2X3NwcmludGYobXNnLT5yZXAsICIlLTI2c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byBhY2Nlc3MgdGhlIGRhdGEgZnJvbSB0aGUgcmluZyBidWZmZXIuCisgKgorICogICAgTm90ZSwgX19keW5hbWljX2FycmF5LCBfX3N0cmluZywgYW5kIF9fYml0bWFzayByZXF1aXJlIHNwZWNpYWwgaGVscGVycworICogICAgICAgdG8gYWNjZXNzIHRoZSBkYXRhLgorICoKKyAqICAgICAgRm9yIF9fZHluYW1pY19hcnJheShpbnQsIGZvbywgYmFyKSB1c2UgX19nZXRfZHluYW1pY19hcnJheShmb28pCisgKiAgICAgICAgICAgIFVzZSBfX2dldF9keW5hbWljX2FycmF5X2xlbihmb28pIHRvIGdldCB0aGUgbGVuZ3RoIG9mIHRoZSBhcnJheQorICogICAgICAgICAgICBzYXZlZC4KKyAqCisgKiAgICAgIEZvciBfX3N0cmluZyhmb28sIGJhcikgdXNlIF9fZ2V0X3N0cihmb28pCisgKgorICogICAgICBGb3IgX19iaXRtYXNrKHRhcmdldF9jcHVzLCBucl9jcHVtYXNrX2JpdHMpIHVzZSBfX2dldF9iaXRtYXNrKHRhcmdldF9jcHVzKQorICoKICAqCiAgKiBOb3RlLCB0aGF0IGZvciBib3RoIHRoZSBhc3NpZ24gYW5kIHRoZSBwcmludGssIF9fZW50cnkgaXMgdGhlIGhhbmRsZXIKICAqIHRvIHRoZSBkYXRhIHN0cnVjdHVyZSBpbiB0aGUgcmluZyBidWZmZXIsIGFuZCBpcyBkZWZpbmVkIGJ5IHRoZQogICogVFBfU1RSVUNUX19lbnRyeS4KICAqLworCisvKgorICogSXQgaXMgT0sgdG8gaGF2ZSBoZWxwZXIgZnVuY3Rpb25zIGluIHRoZSBmaWxlLCBidXQgdGhleSBuZWVkIHRvIGJlIHByb3RlY3RlZAorICogZnJvbSBiZWluZyBkZWZpbmVkIG1vcmUgdGhhbiBvbmNlLiBSZW1lbWJlciwgdGhpcyBmaWxlIGdldHMgaW5jbHVkZWQgbW9yZQorICogdGhhbiBvbmNlLgorICovCisjaWZuZGVmIF9fVFJBQ0Vf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pYWxpemF0aW9uIGFuZCByZXBvcnQgc3VjY2VzcyAqLworCisJZXJyID0gc25kX2xpbmU2X25ld19wY20obGluZTYsICZwY20pOworCWlmIChlcnIgPCAwKQorCQlyZXR1cm4gZXJyOworCisJbGluZTZwY20gPSBremFsbG9jKHNpemVvZigqbGluZTZwY20pLCBHRlBfS0VSTkVMKTsKKwlpZiAoIWxpbmU2cGNtKQorCQlyZXR1cm4gLUVOT01FTTsKKworCW11dGV4X2luaXQoJmxpbmU2cGNtLT5zdGF0ZV9tdXRleCk7CisJbGluZTZwY20tPnBjbSA9IHBjbTsKKwlsaW5lNnBjbS0+cHJvcGVydGllcyA9IHByb3BlcnRpZXM7CisJbGluZTZwY20tPnZvbHVtZV9wbGF5YmFja1swXSA9IGxpbmU2cGNtLT52b2x1bWVfcGxheWJhY2tbMV0gPSAyNTU7CisJbGluZTZwY20tPnZvbHVtZV9tb25pdG9yID0gMjU1OworCWxpbmU2cGNtLT5saW5lNiA9IGxpbmU2OworCisJLyogUmVhZCBhbmQgd3JpdGUgYnVmZmVycyBhcmUgc2l6ZWQgaWRlbnRpY2FsbHksIHNvIGNob29zZSBtaW5pbXVtICovCisJbGluZTZwY20tPm1heF9wYWNrZXRfc2l6ZSA9IG1pbigKKwkJCXVzYl9tYXhwYWNrZXQobGluZTYtPnVzYmRldiwKKwkJCQl1c2JfcmN2aXNvY3BpcGUobGluZTYtPnVzYmRldiwgZXBfcmVhZCksIDApLAorCQkJdXNiX21heHBhY2tldChsaW5lNi0+dXNiZGV2LAorCQkJCXVzYl9zbmRpc29jcGlwZShsaW5lNi0+dXNiZGV2LCBlcF93cml0ZSksIDEpKTsKKworCXNwaW5fbG9ja19pbml0KCZsaW5lNnBjbS0+b3V0LmxvY2spOworCXNwaW5fbG9ja19pbml0KCZsaW5lNnBjbS0+aW4ubG9jayk7CisJbGluZTZwY20tPmltcHVsc2VfcGVyaW9kID0gTElORTZfSU1QVUxTRV9ERUZBVUxUX1BFUklPRDsKKworCWxpbm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50ICIkdGltZSBzZWNvbmQiOworICAgIGRvcHJpbnQgInMiIGlmICgkdGltZSAhPSAxKTsKK30KKworc3ViIHByaW50X3RpbWVzIHsKKyAgICBkb3ByaW50ICJcbiI7CisgICAgaWYgKCRidWlsZF90aW1lKSB7CisJZG9wcmludCAiQnVpbGQgdGltZTogICAiOworCXNob3dfdGltZSgkYnVpbGRfdGltZSk7CisJZG9wcmludCAiXG4iOworICAgIH0KKyAgICBpZiAoJGluc3RhbGxfdGltZSkgeworCWRvcHJpbnQgIkluc3RhbGwgdGltZTogIjsKKwlzaG93X3RpbWUoJGluc3RhbGxfdGltZSk7CisJZG9wcmludCAiXG4iOworICAgIH0KKyAgICBpZiAoJHJlYm9vdF90aW1lKSB7CisJZG9wcmludCAiUmVib290IHRpbWU6ICAiOworCXNob3dfdGltZSgkcmVib290X3RpbWUpOworCWRvcHJpbnQgIlxuIjsKKyAgICB9CisgICAgaWYgKCR0ZXN0X3RpbWUpIHsKKwlkb3ByaW50ICJUZXN0IHRpbWU6ICAgICI7CisJc2hvd190aW1lKCR0ZXN0X3RpbWUpOworCWRvcHJpbnQgIlxuIjsKKyAgICB9CisgICAgIyByZXNldCBmb3IgaXRlcmF0aW9ucyBsaWtlIGJpc2VjdAorICAgICRidWlsZF90aW1lID0gMDsKKyAgICAkaW5zdGFsbF90aW1lID0gMDsKKyAgICAkcmVib290X3RpbWUgPSAwOworICAgICR0ZXN0X3RpbWUgPSAwOworfQorCiBzdWIgZ2V0X21hbmRhdG9yeV9jb25maWdzIHsKICAgICBnZXRfbWFuZGF0b3J5X2NvbmZpZygiTUFDSElORSIpOwogICAgIGdldF9tYW5kYXRvcnlfY29uZmlnKCJCVUlMRF9ESVIiKTsKQEAgLTEzNDEsMjMgKzE0MDcsODMgQEAKIAlwcmludCAiIFNlZSAkb3B0e0xPR19GSUxFfSBmb3IgbW9yZSBpbmZvLlxuIjsKICAgICB9CiAKKyAgICBpZiAoJG1vbml0b3JfY250KSB7CisJICAgICMgcmVz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NlY3RzLCBkb24ndCBuZWVkIGNvbnNvbGUKQEAgLTIyMDgsNiArMjM4MSw4IEBACiAKICAgICB1bmxpbmsgJGJ1aWxkbG9nOwogCisgICAgbXkgJHN0YXJ0X3RpbWUgPSB0aW1lOworCiAgICAgIyBGYWlsZWQgYnVpbGRzIHNob3VsZCBub3QgcmVib290IHRoZSB0YXJnZXQKICAgICBteSAkc2F2ZV9ub19yZWJvb3QgPSAkbm9fcmVib290OwogICAgICRub19yZWJvb3QgPSAxOwpAQCAtMjI5Myw2ICsyNDY4LDkgQEAKIAogICAgICRub19yZWJvb3QgPSAkc2F2ZV9ub19yZWJvb3Q7CiAKKyAgICBteSAkZW5kX3RpbWUgPSB0aW1lOworICAgICRidWlsZF90aW1lID0gJGVuZF90aW1lIC0gJHN0YXJ0X3RpbWU7CisKICAgICByZXR1cm4gMTsKIH0KIApAQCAtMjMyMyw2ICsyNTAxLDggQEAKIAkkbmFtZSA9ICIgKCR0ZXN0X25hbWUpIjsKICAgICB9CiAKKyAgICBwcmludF90aW1lczsKKwogICAgIGRvcHJpbnQgIlxuXG4qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iOwogICAgIGRvcHJpbnQgICAgICIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iOwogICAgIGRvcHJpbnQgICAgICJLVEVTVCBSRVNVTFQ6IFRFU1QgJGkkbmFtZSBTVUNDRVNTISEhISAgICAgICAgICoqXG4iOwpAQCAtMjM4Myw2ICsyNTYzLDggQEAKICAgICBteSAkYnVnID0gMDsKICAgICBteSAkYnVnX2lnbm9yZWQgPSAwOwogCisgICAgbXkgJHN0YXJ0X3RpbWUgPSB0aW1lOworCiAgICAgd2FpdF9mb3JfbW9uaXRvciAxOwogCiAgICAgZG9wcmludCAicnVuIHRlc3QgJHJ1bl90ZXN0XG4iOwpAQCAtMjQ0OSw2ICsyNjMxLDkgQEAKICAgICB3YWl0cGlkICRjaGlsZF9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