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9uCisJcHJpbWl0aXZlcywgc3VjaCBhcyBsaXN0X2Zvcl9lYWNoX2VudHJ5X3JjdSgpLgorCitUaGUgZm9sbG93aW5nIGRpYWdyYW0gc2hvd3MgaG93IGVhY2ggQVBJIGNvbW11bmljYXRlcyBhbW9uZyB0aGUKK3JlYWRlciwgdXBkYXRlciwgYW5kIHJlY2xhaW1lci4KKworCisJICAgIHJjdV9hc3NpZ25fcG9pbnRlcigpCisJICAgIAkJCSAgICArLS0tLS0tLS0rCisJICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tPnwgcmVhZGVyIHwtLS0tLS0tLS0rCisJICAgIHwgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLSsgICAgICAgICB8CisJICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8CisJICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8IFByb3RlY3Q6CisJICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8IHJjdV9yZWFkX2xvY2soKQorCSAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCByY3VfcmVhZF91bmxvY2soKQorCSAgICB8ICAgICAgICByY3VfZGVyZWZlcmVuY2UoKSAgfCAgICAgICAgICAgICAgfAorICAgICAgICstLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIHwKKyAgICAgICB8IHVwZGF0ZXIgfDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0rICAgICAgICAgICAgICB8CisgICAgICAgKy0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVgorCSAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tKworCSAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0+fCByZWNsYWltZXI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gc3RydWN0IGxpc3RfaGVhZCBsaXN0OworIDMgICBsb25nIGtleTsgICAgICAgICAgICAgICAgICAgICAgICAgIDMgICBsb25nIGtleTsKKyA0ICAgc3BpbmxvY2tfdCBtdXRleDsgICAgICAgICAgICAgICAgICA0ICAgc3BpbmxvY2tfdCBtdXRleDsKKyA1ICAgaW50IGRhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICA1ICAgaW50IGRhdGE7CisgNiAgIC8qIE90aGVyIGRhdGEgZmllbGRzICovICAgICAgICAgICAgNiAgIC8qIE90aGVyIGRhdGEgZmllbGRzICovCisgNyB9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNyB9OworIDggc3BpbmxvY2tfdCBsaXN0bXV0ZXg7ICAgICAgICAgICAgICAgIDggc3BpbmxvY2tfdCBsaXN0bXV0ZXg7CisgOSBzdHJ1Y3QgZWwgaGVhZDsgICAgICAgICAgICAgICAgICAgICAgOSBzdHJ1Y3QgZWwgaGVhZDsKKworIDEgaW50IHNlYXJjaChsb25nIGtleSwgaW50ICpyZXN1bHQpICAgIDEgaW50IHNlYXJjaChsb25nIGtleSwgaW50ICpyZXN1bHQpCisgMiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiB7CisgMyAgIHN0cnVjdCBsaXN0X2hlYWQgKmxwOyAgICAgICAgICAgICAgMyAgIHN0cnVjdCBsaXN0X2hlYWQgKmxwOworIDQgICBzdHJ1Y3QgZWwgKnA7ICAgICAgICAgICAgICAgICAgICAgIDQgICBzdHJ1Y3QgZWwgKnA7CisgNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorIDYgICByZWFkX2xvY2soKTsgICAgICAgICAgICAgICAgICAgICAgIDYgICByY3VfcmVhZF9sb2NrKCk7CisgNyAgIGxpc3RfZm9yX2VhY2hfZW50cnkocCwgaGVhZCwgbHApIHsgNyAgIGxpc3RfZm9yX2VhY2hfZW50cnlfcmN1KHAsIGhlYWQsIGxwKSB7CisgOCAgICAgaWYgKHAtPmtleSA9PSBrZXkpIHsgICAgICAgICAgICAgOCAgICAgaWYgKHAtPmtleSA9PSBrZXkpIHsKKyA5ICAgICAgICpyZXN1bHQgPSBwLT5kYXRhOyAgICAgICAgICAgICA5ICAgICAgICpyZXN1bHQgPSBwLT5kYXRhOworMTAgICAgICAgcmVhZF91bmxvY2soKTsgICAgICAgICAgICAgICAgMTAgICAgICAgcmN1X3JlYWRfdW5sb2NrKCk7CisxMSAgICAgICByZXR1cm4gMTsgICAgICAgICAgICAgICAgICAgICAxMSAgICAgICByZXR1cm4gMTsKKzEyICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyICAgICB9CisxMyAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgIH0KKzE0ICAgcmVhZF91bmxvY2soKTsgICAgICAgICAgICAgICAgICAgIDE0ICAgcmN1X3JlYWRfdW5sb2NrKCk7CisxNSAgIHJldHVybiAwOyAgICAgICAgICAgICAgICAgICAgICAgICAxNSAgIHJldHVybiAwOworMTYgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYgfQorCisgMSBpbnQgZGVsZXRlKGxvbmcga2V5KSAgICAgICAgICAgICAgICAgMSBpbnQgZGVsZXRlKGxvbmcga2V5KQorIDIgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgeworIDMgICBzdHJ1Y3QgZWwgKnA7ICAgICAgICAgICAgICAgICAgICAgIDMgICBzdHJ1Y3QgZWwgKnA7CisgNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorIDUgICB3cml0ZV9sb2NrKCZsaXN0bXV0ZXgpOyAgICAgICAgICAgIDUgICBzcGluX2xvY2soJmxpc3RtdXRleCk7CisgNiAgIGxpc3RfZm9yX2VhY2hfZW50cnkocCwgaGVhZCwgbHApIHsgNiAgIGxpc3RfZm9yX2VhY2hfZW50cnkocCwgaGVhZCwgbHApIHsKKyA3ICAgICBpZiAocC0+a2V5ID09IGtleSkgeyAgICAgICAgICAgICA3ICAgICBpZiAocC0+a2V5ID09IGtleSkgeworIDggICAgICAgbGlzdF9kZWwoJnAtPmxpc3QpOyAgICAgICAgICAgIDggICAgICAgbGlzdF9kZWwoJnAtPmxpc3QpOworIDkgICAgICAgd3JpdGVfdW5sb2NrKCZsaXN0bXV0ZXgpOyAgICAgIDkgICAgICAgc3Bpbl91bmxvY2soJmxpc3RtdXRleCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMCAgICAgICBzeW5jaHJvbml6ZV9yY3UoKTsKKzEwICAgICAgIGtmcmVlKHApOyAgICAgICAgICAgICAgICAgICAgIDExICAgICAgIGtmcmVlKHApOworMTEgICAgICAgcmV0dXJuIDE7ICAgICAgICAgICAgICAgICAgICAgMTIgICAgICAgcmV0dXJuIDE7CisxMiAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgICAgfQorMTMgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQgICB9CisxNCAgIHdyaXRlX3VubG9jaygmbGlzdG11dGV4KTsgICAgICAgICAxNSAgIHNwaW5fdW5sb2NrKCZsaXN0bXV0ZXgpOworMTUgICByZXR1cm4gMDsgICAgICAgICAgICAgICAgICAgICAgICAgMTYgICByZXR1cm4gMDsKKzE2IH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3IH0KKworRWl0aGVyIHdheSwgdGhlIGRpZmZlcmVuY2VzIGFyZSBxdWl0ZSBzbWFsbC4gIFJlYWQtc2lkZSBsb2NraW5nIG1vdmVzCit0byByY3VfcmVhZF9sb2NrKCkgYW5kIHJjdV9yZWFkX3VubG9jaywgdXBkYXRlLXNpZGUgbG9ja2luZyBtb3ZlcyBmcm9tCitmcm9tIGEgcmVhZGVyLXdyaXRlciBsb2NrIHRvIGEgc2ltcGxlIHNwaW5sb2NrLCBhbmQgYSBzeW5jaHJvb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gc2h1dGRvd24uCisgICAoRHJpdmVyIHdpbGwgcGVyZm9ybSBob3N0IGNvbnRyb2wgU01JIHdoZW4gaXQgaXMgbm90aWZpZWQgdGhhdCB0aGUgT1MKKyAgIGhhcyBmaW5pc2hlZCBzaHV0dGluZyBkb3duLikKKworCitIb3N0IENvbnRyb2wgU01JIFR5cGUKKworVGhlIGZvbGxvd2luZyB0YWJsZSBzaG93cyB0aGUgdmFsdWUgdG8gd3JpdGUgdG8gaG9zdF9jb250cm9sX3NtaV90eXBlIHRvCitwZXJmb3JtIGEgcG93ZXIgY3ljbGUgb3IgcG93ZXIgb2ZmIGhvc3QgY29udHJvbCBhY3Rpb246CisKK1Bvd2VyRWRnZSBTeXN0ZW0gICAgSG9zdCBDb250cm9sIFNNSSBUeXBlCistLS0tLS0tLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgMzAwICAgICAgICAgICAgIEhDX1NNSVRZUEVfVFlQRTEKKyAgICAgMTMwMCAgICAgICAgICAgICBIQ19TTUlUWVBFX1RZUEUxCisgICAgIDE0MDAgICAgICAgICAgICAgSENfU01JVFlQRV9UWVBFMgorICAgICAgNTAwU0MgICAgICAgICAgIEhDX1NNSVRZUEVfVFlQRTIKKyAgICAgMTUwMFNDICAgICAgICAgICBIQ19TTUlUWVBFX1RZUEUyCisgICAgIDE1NTAgICAgICAgICAgICAgSENfU01JVFlQRV9UWVBFMgorICAgICAgNjAwU0MgICAgICAgICAgIEhDX1NNSVRZUEVfVFlQRTIKKyAgICAgMTYwMFNDICAgICAgICAgICBIQ19TTUlUWVBFX1RZUEUyCisgICAgICA2NTAgICAgICAgICAgICAgSENfU01JVFlQRV9UWVBFMgorICAgICAxNjU1TUMgICAgICAgICAgIEhDX1NNSVRZUEVfVFlQRTIKKyAgICAgIDcwMCAgICAgICAgICAgICBIQ19TTUlUWVBFX1RZUEUzCisgICAgICA3NTAgICAgICAgICAgICAgSENfU01JVFlQRV9UWVBFMworCisKZG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C50eHQKQEAgLTEsNTUgKzEsNzQgQEAKLUhvdyB0byBnZXQgdGhlIE5lYnVsYSBFbGVjdHJvbmljcyBEaWdpVFYsIFBpbm5hY2xlIFBDVFYgU2F0LCBUd2luaGFuIERTVCArIGNsb25lcyB3b3JraW5nCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorSG93IHRvIGdldCB0aGUgTmVidWxhLCBQQ1RWIGFuZCBUd2luaGFuIERTVCBjYXJkcyB3b3JraW5nCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotMSkgR2VuZXJhbCBpbmZvcm1hdGlvbgotPT09PT09PT09PT09PT09PT09PT09PQorVGhpcyBjbGFzcyBvZiBjYXJkcyBoYXMgYSBidDg3OGEgYXMgdGhlIFBDSSBpbnRlcmZhY2UsIGFuZAorcmVxdWlyZSB0aGUgYnR0diBkcml2ZXIuCiAKLVRoaXMgY2xhc3Mgb2YgY2FyZHMgaGFzIGEgYnQ4NzhhIGNoaXAgYXMgdGhlIFBDSSBpbnRlcmZhY2UuCi1UaGUgZGlmZmVyZW50IGNhcmQgZHJpdmVycyByZXF1aXJlIHRoZSBidHR2IGRyaXZlciB0byBwcm92aWRlIHRoZSBtZWFucwotdG8gYWNjZXNzIHRoZSBpMmMgYnVzIGFuZCB0aGUgZ3BpbyBwaW5zIG9mIHRoZSBidDh4eCBjaGlwc2V0LgorUGxlYXNlIHBheSBjbG9zZSBhdHRlbnRpb24gdG8gdGhlIHdhcm5pbmcgYWJvdXQgdGhlIGJ0dHYgbW9kdWxlCitvcHRpb25zIGJlbG93IGZvciB0aGUgRFNUIGNhcmQuCiAKLTIpIENvbXBpbGF0aW9uIHJ1bGVzIGZvciBLZXJuZWwgPj0gMi42LjEyCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorMSk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ZXMgd2lsbCBuZXZlciBlbnRlciBub24tcHJpdmlsZWdlZAorbW91bnRzLCBpdCBjYW4gcmVsYXggdGhlIGxhc3QgbGltaXRhdGlvbiB3aXRoIGEgInVzZXJfYWxsb3dfb3RoZXIiCitjb25maWcgb3B0aW9uLiAgSWYgdGhpcyBjb25maWcgb3B0aW9uIGlzIHNldCwgdGhlIG1vdW50aW5nIHVzZXIgY2FuCithZGQgdGhlICJhbGxvd19vdGhlciIgbW91bnQgb3B0aW9uIHdoaWNoIGRpc2FibGVzIHRoZSBjaGVjayBmb3Igb3RoZXIKK3VzZXJzJyBwcm9jZXNzZXMuCisKK0tlcm5lbCAtIHVzZXJzcGFjZSBpbnRlcmZhY2UKK35+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn4KKworVGhlIGZvbGxvd2luZyBkaWFncmFtIHNob3dzIGhvdyBhIGZpbGVzeXN0ZW0gb3BlcmF0aW9uIChpbiB0aGlzCitleGFtcGxlIHVubGluaykgaXMgcGVyZm9ybWVkIGluIEZVU0UuCisKK05PVEU6IGV2ZXJ5dGhpbmcgaW4gdGhpcyBkZXNjcmlwdGlvbiBpcyBncmVhdGx5IHNpbXBsaWZpZWQKKworIHwgICJybSAvbW50L2Z1c2UvZmlsZSIgICAgICAgICAgICAgICB8ICBGVVNFIGZpbGVzeXN0ZW0gZGFlbW9uCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgPnN5c19yZWFkKCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICA+ZnVzZV9kZXZfcmVhZCgpCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICA+cmVxdWVzdF93YWl0KCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgW3NsZWVwIG9uIGZjLT53YWl0cV0KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorIHwgID5zeXNfdW5saW5rKCkgICAgICAgICAgICAgICAgICAgICB8CisgfCAgICA+ZnVzZV91bmxpbmsoKSAgICAgICAgICAgICAgICAgIHwKKyB8ICAgICAgW2dldCByZXF1ZXN0IGZyb20gICAgICAgICAgICAgfAorIHwgICAgICAgZmMtPnVudXNlZF9saXN0XSAgICAgICAgICAgICB8CisgfCAgICAgID5yZXF1ZXN0X3NlbmQoKSAgICAgICAgICAgICAgIHwKKyB8ICAgICAgICBbcXVldWUgcmVxIG9uIGZjLT5wZW5kaW5nXSAgfAorIHwgICAgICAgIFt3YWtlIHVwIGZjLT53YWl0cV0gICAgICAgICB8ICAgICAgICBbd29rZW4gdXBdCisgfCAgICAgICAgPnJlcXVlc3Rfd2FpdF9hbnN3ZXIoKSAgICAgIHwKKyB8ICAgICAgICAgIFtzbGVlcCBvbiByZXEtPndhaXRxXSAgICAgfAorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgPHJlcXVlc3Rfd2FpdCgpCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICBbcmVtb3ZlIHJlcSBmcm9tIGZjLT5wZW5kaW5nXQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgW2NvcHkgcmVxIHRvIHJlYWQgYnVmZmVyXQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgW2FkZCByZXEgdG8gZmMtPnByb2Nlc3NpbmddCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgPGZ1c2VfZGV2X3JlYWQoKQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA8c3lzX3JlYWQoKQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIFtwZXJmb3JtIHVubGlua10KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA+c3lzX3dyaXRlKCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICA+ZnVzZV9kZXZfd3JpdGUoKQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgW2xvb2sgdXAgcmVxIGluIGZjLT5wcm9jZXNzaW5nXQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgW3JlbW92ZSBmcm9tIGZjLT5wcm9jZXNzaW5nXQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgW2NvcHkgd3JpdGUgYnVmZmVyIHRvIHJlcV0KKyB8ICAgICAgICAgIFt3b2tlbiB1cF0gICAgICAgICAgICAgICAgfCAgICAgIFt3YWtlIHVwIHJlcS0+d2FpdHFdCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgPGZ1c2VfZGV2X3dyaXRlKCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgPHN5c193cml0ZSgpCisgfCAgICAgICAgPHJlcXVlc3Rfd2FpdF9hbnN3ZXIoKSAgICAgIHwKKyB8ICAgICAgPHJlcXVlc3Rfc2VuZCgpICAgICAgICAgICAgICAgfAorIHwgICAgICBbYWRkIHJlcXVlc3QgdG8gICAgICAgICAgICAgICB8CisgfCAgICAgICBmYy0+dW51c2VkX2xpc3RdICAgICAgICAgICAgIHwKKyB8ICAgIDxmdXNlX3VubGluaygpICAgICAgICAgICAgICAgICAgfAorIHwgIDxzeXNfdW5saW5rKCkgICAgICAgICAgICAgICAgICAgICB8CisKK1RoZXJlIGFyZSBhIGNvdXBsZSBvZiB3YXlzIGluIHdoaWNoIHRvIGRlYWRsb2NrIGEgRlVTRSBmaWxlc3lzdGVtLgorU2luY2Ugd2UgYXJlIHRhbGtpbmcgYWJvdXQgdW5wcml2aWxlZ2VkIHVzZXJzcGFjZSBwcm9ncmFtcywKK3NvbWV0aGluZyBtdXN0IGJlIGRvbmUgYWJvdXQgdGhlc2UuCisKK1NjZW5hcmlvIDEgLSAgU2ltcGxlIGRlYWRsb2NrCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCisgfCAgInJtIC9tbnQvZnVzZS9maWxlIiAgICAgICAgICAgICAgIHwgIEZVU0UgZmlsZXN5c3RlbSBkYWVtb24KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorIHwgID5zeXNfdW5saW5rKCIvbW50L2Z1c2UvZmlsZSIpICAgICB8CisgfCAgICBbYWNxdWlyZSBpbm9kZSBzZW1hcGhvcmUgICAgICAgIHwKKyB8ICAgICBmb3IgImZpbGUiXSAgICAgICAgICAgICAgICAgICAgfAorIHwgICAgPmZ1c2VfdW5saW5rKCkgICAgICAgICAgICAgICAgICB8CisgfCAgICAgIFtzbGVlcCBvbiByZXEtPndhaXRxXSAgICAgICAgIHwKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgPHN5c19yZWFkKCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgPnN5c191bmxpbmsoIi9tbnQvZnVzZS9maWxlIikKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBbYWNxdWlyZSBpbm9kZSBzZW1hcGhvcmUKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgZm9yICJmaWxlIl0KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAqREVBRExPQ0sqCisKK1RoZSBzb2x1dGlvbiBmb3IgdGhpcyBpcyB0byBhbGxvdyByZXF1ZXN0cyB0byBiZSBpbnRlcnJ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gICAgICAgICAgICAgICAgICAgICAgICAgfCAgW3JlYWQgcmVxdWVzdCB0byBidWZmZXJdCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIFtjcmVhdGUgcmVwbHkgaGVhZGVyIGJlZm9yZSBhZGRyXQorIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA+c3lzX3dyaXRlKGFkZHIgLSBoZWFkZXJsZW5ndGgpCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgPmZ1c2VfZGV2X3dyaXRlKCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgIFtsb29rIHVwIHJlcSBpbiBmYy0+cHJvY2Vzc2luZ10KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgIFtyZW1vdmUgZnJvbSBmYy0+cHJvY2Vzc2luZ10KKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgIFtjb3B5IHdyaXRlIGJ1ZmZlciB0byByZXFdCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgID5kb19wYWdlX2ZhdWx0KCkKKyB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgW2ZpbmQgb3IgY3JlYXRlIHBhZ2VdCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgIFtsb2NrIHBhZ2VdCisgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICogREVBRExPQ0sgKgorCitTb2x1dGlvbiBpcyBhZ2FpbiB0byBsZXQgdGhlIHRoZSByZXF1ZXN0IGJlIGludGVycnVwdGVkIChub3QKK2VsYWJvcmF0ZWQgZnVydGhlcikuCisKK0FuIGFkZGl0aW9uYWwgcHJvYmxlbSBpcyB0aGF0IHdoaWxlIHRo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MDAsCisJLmNydGNfc3MgICAgICAgICA9IDB4ODIzNjAwNTYsCisJLmNydGNfbHMgICAgICAgICA9IDB4QTAyODAwMDAsCisJLmNydGNfZ3MgICAgICAgICA9IDB4ODAyODAwMjgsCisJLmNydGNfdnBvc19ncyAgICA9IDB4MDI4MzAwMDIsCisJLmNydGNfcmV2ICAgICAgICA9IDB4MDA0MDAwMDgsCisJLmNydGNfZGNsayAgICAgICA9IDB4QTAwMDAwMDAsCisJLmNydGNfZ2NsayAgICAgICA9IDB4ODAxNTAxMEYsCisJLmNydGNfZ29lICAgICAgICA9IDB4ODAxMDAxMTAsCisJLmNydGNfcHMxX2FjdGl2ZSA9IDB4NDEwNjAwMTAsCisJLnBsbF9mcmVxICAgICAgICA9IDc1LAorCS5mYXN0X3BsbF9mcmVxICAgPSAxMDAsCisJLnN5c2Nsa19zcmMgICAgICA9IENMS19TUkNfUExMLAorCS5zeXNjbGtfZGl2aWRlciAgPSAwLAorCS5waXhjbGtfc3JjICAgICAgPSBDTEtfU1JDX1BMTCwKKwkucGl4Y2xrX2RpdmlkZXIgID0gMiwKKwkucGl4Y2xrX2RpdmlkZXJfcm90YXRlZCA9IDYsCit9LHsKKwkueHJlcyAgICAgICAgICAgID0gMjQwLAorCS55cmVzICAgICAgICAgICAgPSAzMjAsCisJLmxlZnRfbWFyZ2luICAgICA9IDB4MjcsCisJLnJpZ2h0X21hcmdpbiAgICA9IDB4MmUsCisJLnVwcGVyX21hcmdpbiAgICA9IDB4MDEsCisJLmxvd2VyX21hcmdpbiAgICA9IDB4MDAsCisJLmNydGNfc3MgICAgICAgICA9IDB4ODExNzAwMjcsCisJLmNydGNfbHMgICAgICAgICA9IDB4QTAxNDAwMDAsCisJLmNydGNfZ3MgICAgICAgICA9IDB4QzAxNDAwMTQsCisJLmNydGNfdnBvc19ncyAgICA9IDB4MDAwMTAxNDEsCisJLmNydGNfcmV2ICAgICAgICA9IDB4MDA0MDAwMDgsCisJLmNydGNfZGNsayAgICAgICA9ID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Jhd193cml0ZWIodG1wLCBBTlVCSVNfVkFfQ1RSTDEpOworfQorCitzdGF0aWMgc3RydWN0IHMzYzI0MTBfcGxhdGZvcm1fbmFuZCBhbnViaXNfbmFuZF9pbmZvID0geworCS50YWNscwkJPSAyNSwKKwkudHdycGgwCQk9IDgwLAorCS50d3JwaDEJCT0gODAsCisJLm5yX3NldHMJPSBBUlJBWV9TSVpFKGFudWJpc19uYW5kX3NldHMpLAorCS5zZXRzCQk9IGFudWJpc19uYW5kX3NldHMsCisJLnNlbGVjdF9jaGlwCT0gYW51YmlzX25hbmRfc2VsZWN0LAorfTsKKworCisvKiBTdGFuZGFyZCBBbnViaXMgZGV2aWNlcyAqLworCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSAqYW51YmlzX2RldmljZXNbXSBfX2luaXRkYXRhID0geworCSZzM2NfZGV2aWNlX3VzYiwKKwkmczNjX2RldmljZV93ZHQsCisJJnMzY19kZXZpY2VfYWRjLAorCSZzM2NfZGV2aWNlX2kyYywKKyAJJnMzY19kZXZpY2VfcnRjLAorCSZzM2NfZGV2aWNlX25hbmQsCit9OworCitzdGF0aWMgc3RydWN0IGNsayAqYW51YmlzX2Nsb2Nrc1tdID0geworCSZzM2MyNHh4X2RjbGswLAorCSZzM2MyNHh4X2RjbGsxLAorCSZzM2MyNHh4X2Nsa291dDAsCisJJnMzYzI0eHhfY2xrb3V0MSwKKwkmczNjMjR4eF91Y2xrLAorfTsKKworc3RhdGljIHN0cnVjdCBzM2MyNHh4X2JvYXJkIGFudWJpc19ib2FyZCBfX2luaXRkYXRhID0geworCS5kZXZpY2VzICAgICAgID0gYW51YmlzX2RldmljZXMsCisJLmRldmljZXNfY291bnQgPSBBUlJBWV9TSVpFKGFudWJpc19kZXZpY2VzKSwKKwkuY2xvY2tzCSAgICAgICA9IGFudWJpc19jbG9ja3MsCisJLmNsb2Nrc19jb3VudCAgPSBBUlJBWV9TSVpFKGFudWJpc19jbG9ja3MpCit9OworCit2b2lk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krPSBwaXQubwogb2JqLSQoQ09ORklHX001MjQ5KQkrPSB0aW1lcnMubwogb2JqLSQoQ09ORklHX001Mjd4KSAgICAgKz0gcGl0Lm8KIG9iai0kKENPTkZJR19NNTI3MikJKz0gdGltZXJzLm8KZGlmZiAtLWdpdCBhL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4MzI4L2NvbmZpZy5jIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjgzMjgvY29uZmlnLmMKaW5kZXggZmQ3YzkzZi4uYmNmYTVkN2YgMTAwNjQ0Ci0tLSBhL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4MzI4L2NvbmZpZy5jCisrKyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4MzI4L2NvbmZpZy5jCkBAIC0xLDUgKzEsNyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwogLyoKLSAqICBsaW51eC9hcmNoLyQoQVJDSCkvcGxhdGZvcm0vJChQTEFURk9STSkvY29uZmlnLmMKKyAqICBsaW51eC9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODMyOC9jb25maWcuYwogICoKICAqICBDb3B5cmlnaHQgKEMpIDE5OTMgSGFtaXNoIE1hY2RvbmFsZAogICogIENvcHlyaWdodCAoQykgMTk5OSBELiBKZWZmIERpb25uZQpAQCAtMTEsNiArMTMsOCBAQAogICogVlogU3VwcG9ydC9GaXhlcyAgICAgICAgICAgICBFdmFuIFN0YXdueWN6eSA8ZUBsaW5lby5jYT4KICAqLwogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCiAjaW5jbHVkZSA8YXNtL2RiZy5oPgogI2luY2x1ZGUgPHN0ZGFyZy5oPgogI2luY2x1ZGUgPGxpbnV4L2NvbmZpZy5oPgpAQCAtMjksNzYgKzMzLDE2IEBACiAjaW5jbHVkZSA8YXNtL21hY2hkZXAuaD4KICNpbmNsdWRlIDxhc20vTUM2ODMyOC5oPgogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkIEJTUF9zY2hlZF9pbml0KGlycXJldHVybl90ICgqdGltZXJfcm91dGluZSkoaW50LCB2b2lkICosIHN0cnVjdCBwdF9yZWdzICopKQotewordm9pZCBtNjgzMjhfdGltZXJfaW5pdChpcnFyZXR1cm5fdCAoKnRpbWVyX3JvdXRpbmUpIChpbnQsIHZvaWQgKiwgc3RydWN0IHB0X3JlZ3MgKikpOwordm9pZCBtNjgzMjhfdGltZXJfdGljayh2b2lkKTsKK3Vuc2lnbmVkIGxvbmcgbTY4MzI4X3RpbWVyX2dldHRpbWVvZmZzZXQodm9pZCk7Cit2b2lkIG02ODMyOF90aW1lcl9nZXR0b2QoaW50ICp5ZWFyLCBpbnQgKm1vbiwgaW50ICpkYXksIGludCAqaG91ciwgaW50ICptaW4sIGludCAqc2VjKTsKIAotI2lmZGVmIENPTkZJR19YQ09QSUxPVF9CVUdTCi0gIC8qCi0gICAqIFRoZSBvbmx5IHRoaW5nIEkga25vdyBpcyB0aGF0IENMSzMyIGlzIG5vdCBhdmFpbGFibGUgb24gWGNvcGlsb3QKLSAgICogSSBoYXZlIGxpdHRsZSBpZGVhIGFib3V0IHdoYXQgZnJlcXVlbmN5IFNZU0NMSyBoYXMgb24gWGNvcGlsb3QuIAotICAgKiBUaGUgdmFsdWVzIGZvciBwcmVzY2FsZXIgYW5kIGNvbXBhcmUgcmVnaXN0ZXJzIHdlcmUgc2ltcGx5IAotICAgKiB0YWtlbiBmcm9tIHRoZSBvcmlnaW5hbCBzb3VyY2UKLSAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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cnAsIGludCAqbWlucCwgaW50ICpzZWNwKQotewotfQotCi1pbnQgQlNQX2h3Y2xrKGludCBvcCwgc3RydWN0IGh3Y2xrX3RpbWUgKnQpCi17Ci0gIGlmICghb3ApIHsKLSAgICAvKiByZWFkICovCi0gIH0gZWxzZSB7Ci0gICAgLyogd3JpdGUgKi8KLSAgfQotICByZXR1cm4gMDsKLX0KLQotaW50IEJTUF9zZXRfY2xvY2tfbW1zcyAodW5zaWduZWQgbG9uZyBub3d0aW1lKQotewotI2lmIDAKLSAgc2hvcnQgcmVhbF9zZWNvbmRzID0gbm93dGltZSAlIDYwLCByZWFsX21pbnV0ZXMgPSAobm93dGltZSAvIDYwKSAlIDYwOwotCi0gIHRvZC0+c2Vjb25kMSA9IHJlYWxfc2Vjb25kcyAvIDEwOwotICB0b2QtPnNlY29uZDIgPSByZWFsX3NlY29uZHMgJSAxMDsKLSAgdG9kLT5taW51dGUxID0gcmVhbF9taW51dGVzIC8gMTA7Ci0gIHRvZC0+bWludXRlMiA9IHJlYWxfbWludXRlcyAlIDEwOwotI2VuZGlmCi0gIHJldHVybiAwOwotfQotCi12b2lkIEJTUF9yZXNldCAodm9pZCkKK3ZvaWQgbTY4MzI4X3Jlc2V0ICh2b2lkKQogewogICBsb2NhbF9pcnFfZGlzYWJsZSgpOwogICBhc20gdm9sYXRpbGUgKCJtb3ZlYWwgIzB4MTBjMDAwMDAsICVhMDtcblx0IgpAQCAtMTA4LDE4ICs1MiwyMiBAQAogCQkiam1wICglYTApOyIpOwogfQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCiB2b2lkIGNvbmZpZ19CU1AoY2hhciAqY29tbWFuZCwgaW50IGxlbikKIHsKICAgcHJpbnRrKEtFUk5fSU5GTyAiXG42ODMyOCBzdXBwb3J0IEQuIEplZmYgRGlvbm5lIDxqZWZmQHVjbGludXgub3JnPlxuIik7CiAgIHByaW50ay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YXRmb3JtLzY4MzI4L3RpbWVycy5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjY4YzJjZDYKLS0tIC9kZXYvbnVsbAorKysgYi9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODMyOC90aW1lcnMuYwpAQCAtMCwwICsxLDEwNiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqICBsaW51eC9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODMyOC90aW1lcnMuYworICoKKyAqICBDb3B5cmlnaHQgKEMpIDE5OTMgSGFtaXNoIE1hY2RvbmFsZAorICogIENvcHlyaWdodCAoQykgMTk5OSBELiBKZWZmIERpb25uZQorICogIENvcHlyaWdodCAoQykgMjAwMSBHZW9yZ2VzIE1lbmllLCBLZW4gRGVzbWV0CisgKgorICogVGhpcyBmaWxlIGlzIHN1YmplY3QgdG8gdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMKKyAqIExpY2Vuc2UuICBTZWUgdGhlIGZpbGUgQ09QWUlORyBpbiB0aGUgbWFpbiBkaXJlY3Rvcnkgb2YgdGhpcyBhcmNoaXZlCisgKiBmb3IgbW9yZSBkZXRhaWxzLgorICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpbmNsdWRlIDxsaW51eC9jb25maWcuaD4KKyNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgorI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbnV4L21tLmg+CisjaW5jbHVkZSA8YXNtL3NldHVwLmg+CisjaW5jbHVkZSA8YXNtL3N5c3RlbS5oPgorI2luY2x1ZGUgPGFzbS9wZ3RhYmxl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0xLU09VUkNFXzMyS0haCisjZGVmaW5lIENMT0NLX1BSRQkzMQorI2RlZmluZSBUSUNLU19QRVJfSklGRlkJMTAKKyNlbmRpZgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkIG02ODMyOF90aW1lcl9pbml0KGlycXJldHVybl90ICgqdGltZXJfcm91dGluZSkgKGludCwgdm9pZCAqLCBzdHJ1Y3QgcHRfcmVncyAqKSkKK3sKKwkvKiBkaXNhYmxlIHRpbWVyIDEgKi8KKwlUQ1RMID0gMDsKKworCS8qIHNldCBJU1IgKi8KKwlpZiAocmVxdWVzdF9pcnEoVE1SX0lSUV9OVU0sIHRpbWVyX3JvdXRpbmUsIElSUV9GTEdfTE9DSywgInRpbWVyIiwgTlVMTCkpIAorCQlwYW5pYygiVW5hYmxlIHRvIGF0dGFjaCB0aW1lciBpbnRlcnJ1cHRcbiIpOworCisJLyogUmVzdGFydCBtb2RlLCBFbmFibGUgaW50LCBTZXQgY2xvY2sgc291cmNlICovCisJVENUTCA9IFRDVExfT00gfCBUQ1RMX0lSUUVOIHwgQ0xPQ0tfU09VUkNFOworCVRQUkVSID0gQ0xPQ0tfUFJFOworCVRDTVAgPSBUSUNLU19QRVJfSklGRlk7CisKKwkvKiBFbmFibGUgdGltZXIgMSAqLworCVRDVEwgfD0gVENUTF9URU47Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQgbTY4MzI4X3RpbWVyX3RpY2sodm9pZCkKK3sKKwkvKiBSZXNldCBUaW1lcjEgKi8KKwlUU1RBVCAmPSAwOworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordW5zaWduZWQgbG9uZyBtNjgzMjhfdGltZXJfZ2V0dGltZW9mZnNldCh2b2lkKQoreworCXVuc2lnbmVkIGxvbmcgdGlja3MgPSBUQ04sIG9mZnNldCA9IDA7CisKKwkvKiBjaGVjayBmb3IgcGVuZGluZyBpbnRlcnJ1cHQgKi8KKwlpZiAodGlja3MgPCAoVElDS1NfUEVSX0pJRkZZID4+IDEpICYmIChJU1IgJiAoMSA8PCBUTVJfSVJRX05VTSkpKQorCQlvZmZzZXQgPSAxMDAwMDAwIC8gSFo7CisJdGlja3MgPSAodGlja3MgKiAxMDAwMDAwIC8gSFopIC8gVElDS1NfUEVSX0pJRkZZOworCXJldHVybiB0aWNrcyArIG9mZnNldDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBtNjgzMjhfdGltZXJfZ2V0dG9kKGludCAqeWVhciwgaW50ICptb24sIGludCAqZGF5LCBpbnQgKmhvdXIsIGludCAqbWluLCBpbnQgKnNlYykKK3sKKwlsb25nIG5vdyA9IFJUQ1RJTUU7CisKKwkqeWVhciA9ICptb24gPSAqZGF5ID0gMTsKKwkqaG91ciA9IChub3cgPj4gMjQpICUgMjQ7CisJKm1pbiA9IChub3cgPj4gMTYpICUgNjA7CisJKnNlYyA9IG5vdyAlIDYwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpkaWZmIC0tZ2l0IGEvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjhFWjMyOC9jb25maWcuYyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4RVozMjgvY29uZmlnLmMKaW5kZXggYzIxOTcxOS4uZDhkNTZlNSAxMDA2NDQKLS0tIGEvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjhFWjMyOC9jb25maWcuYworKysgYi9hcmNoL202OGtub21tdS9wb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GludCwgdm9pZCAqLCBzdHJ1Y3QgcHRfcmVncyAqKSkKLXsKLSAgLyogUmVzdGFydCBtb2RlLCBFbmFibGUgaW50LCAzMktIeiwgRW5hYmxlIHRpbWVyICovCi0gIFRDVEwgPSBUQ1RMX09NIHwgVENUTF9JUlFFTiB8IFRDVExfQ0xLU09VUkNFXzMyS0haIHwgVENUTF9URU47Ci0gIC8qIFNldCBwcmVzY2FsZXIgKERpdmlkZSAzMktIeiBieSAzMikqLwotICBUUFJFUiA9IDMxOwotICAvKiBTZXQgY29tcGFyZSByZWdpc3RlciAgMzJLaHogLyAzMiAvIDEwID0gMTAwICovCi0gIFRDTVAgPSAxMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotICByZXF1ZXN0X2lycShUTVJfSVJRX05VTSwgdGltZXJfcm91dGluZSwgSVJRX0ZMR19MT0NLLCAidGltZXIiLCBOVUxMKTsKLX0KK3ZvaWQgbTY4MzI4X3RpbWVyX2luaXQoaXJxcmV0dXJuX3QgKCp0aW1lcl9yb3V0aW5lKSAoaW50LCB2b2lkICosIHN0cnVjdCBwdF9yZWdzICopKTsKK3ZvaWQgbTY4MzI4X3RpbWVyX3RpY2sodm9pZCk7Cit1bnNpZ25lZCBsb25nIG02ODMyOF90aW1lcl9nZXR0aW1lb2Zmc2V0KHZvaWQpOwordm9pZCBtNjgzMjhfdGltZXJfZ2V0dG9kKGludCAqeWVhciwgaW50ICptb24sIGludCAqZGF5LCBpbnQgKmhvdXIsIGludCAqbWluLCBpbnQgKnNlYyk7CiAKLXZvaWQgQlNQX3RpY2sodm9pZCkKLXsKLSAgCS8qIFJlc2V0IFRpbWVyMSAqLwotCVRTVEFUICY9IDA7Ci19CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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qKioqKioqKi8KKwogdW5zaWduZWQgY2hhciAqY3M4OTAwYV9od2FkZHI7CiBzdGF0aWMgaW50IGVycm5vOwogCkBAIC0xMTksMTEgKzc5LDEzIEBACiAgIGVsc2UgY29tbWFuZFswXSA9IDA7CiAjZW5kaWYKICAKLSAgbWFjaF9zY2hlZF9pbml0ICAgICAgPSBCU1Bfc2NoZWRfaW5pdDsKLSAgbWFjaF90aWNrICAgICAgICAgICAgPSBCU1BfdGljazsKLSAgbWFjaF9nZXR0aW1lb2Zmc2V0ICAgPSBCU1BfZ2V0dGltZW9mZnNldDsKLSAgbWFjaF9nZXR0b2QgICAgICAgICAgPSBCU1BfZ2V0dG9kOworICBtYWNoX3NjaGVkX2luaXQgICAgICA9IG02ODMyOF90aW1lcl9pbml0OworICBtYWNoX3RpY2sgICAgICAgICAgICA9IG02ODMyOF90aW1lcl90aWNrOworICBtYWNoX2dldHRpbWVvZmZzZXQgICA9IG02ODMyOF90aW1lcl9nZXR0aW1lb2Zmc2V0OworICBtYWNoX2dldHRvZCAgICAgICAgICA9IG02ODMyOF90aW1lcl9nZXR0b2Q7CiAgIG1hY2hfaHdjbGsgICAgICAgICAgID0gTlVMTDsKICAgbWFjaF9zZXRfY2xvY2tfbW1zcyAgPSBOVUxMOwotICBtYWNoX3Jlc2V0ICAgICAgICAgICA9IEJTUF9yZXNldDsKKyAgbWFjaF9yZXNldCAgICAgICAgICAgPSBtNjhlejMyOF9yZXNldDsKIH0KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KZGlmZiAtLWdpdCBhL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4VlozMjgvY29uZmlnLmMgYi9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82OFZaMzI4L2NvbmZpZy5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmQ5MjY1MjQKLS0tIC9kZXYvbnVsbAorKysgYi9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82OFZaMzI4L2NvbmZpZy5jCkBAIC0wLDAgKzEsMjEwIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogIGxpbnV4L2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4VlozMjgvY29uZmlnLmMKKyAqCisgKiAgQ29weXJpZ2h0IChDKSAxOTkzIEhhbWlzaCBNYWNkb25hbGQKKyAqICBDb3B5cmlnaHQgKEMpIDE5OTkgRC4gSmVmZiBEaW9ubmUKKyAqICBDb3B5cmlnaHQgKEMpIDIwMDEgR2VvcmdlcyBNZW5pZSwgS2VuIERlc21ldAorICoKKyAqIFRoaXMgZmlsZSBpcyBzdWJqZWN0IHRvIHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCisgKiBMaWNlbnNlLiAgU2VlIHRoZSBmaWxlIENPUFlJTkcgaW4gdGhlIG1haW4gZGlyZWN0b3J5IG9mIHRoaXMgYXJjaGl2ZQorICogZm9yIG1vcmUgZGV0YWlscy4KKyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaW5jbHVkZSA8bGludXgvY29uZmlnLmg+CisjaW5jbHVkZSA8bGludXgvdHlwZXMuaD4KKyNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KKyNpbmNsdWRlIDxsaW51eC9tbS5oPgorI2luY2x1ZGUgPGxpbnV4L3R0eS5oPgorI2luY2x1ZGUgPGxpbnV4L2NvbnNvbGUuaD4KKyNpbmNsdWRlIDxsaW51eC9rZC5oPgorI2luY2x1ZGUgPGxpbnV4L25ldGRldmljZS5oPgorCisjaW5jbHVkZSA8YXNtL3NldHVwLmg+CisjaW5jbHVkZSA8YXNtL3N5c3RlbS5oPgorI2luY2x1ZGUgPGFzbS9wZ3RhYmxlLmg+CisjaW5jbHVkZSA8YXNtL2lycS5oPgorI2luY2x1ZGUgPGFzbS9tYWNoZGVwLmg+CisjaW5jbHVkZSA8YXNtL01DNjhWWjMyOC5oPgorI2luY2x1ZGUgPGFzbS9ib290c3RkLmg+CisKKyNpZmRlZiBDT05GSUdfSU5JVF9MQ0QKKyNpbmNsdWRlICJib290bG9nby5oIgorI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQgbTY4MzI4X3RpbWVyX2luaXQoaXJxcmV0dXJuX3QgKCp0aW1lcl9yb3V0aW5lKSAoaW50LCB2b2lkICosIHN0cnVjdCBwdF9yZWdzICopKTsKK3ZvaWQgbTY4MzI4X3RpbWVyX3RpY2sodm9pZCk7Cit1bnNpZ25lZCBsb25nIG02ODMyOF90aW1lcl9nZXR0aW1lb2Zmc2V0KHZvaWQpOwordm9pZCBtNjgzMjhfdGltZXJfZ2V0dG9kKGludCAqeWVhciwgaW50ICptb24sIGludCAqZGF5LCBpbnQgKmhvdXIsIGludCAqbWluLCBpbnQgKnNlYyk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIEluaXQgRHJhbmdvbiBFbmdpbmUgaGFyZHdhcmUgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiBkZWZpbmVkKENPTkZJR19EUkFHRU4yKQorCitzdGF0aWMgdm9pZCBtNjh2ejMyOF9yZXNldCh2b2lkKQoreworCWxvY2FsX2lycV9kaXNhYmxlKCk7CisK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HgyMDsKKwlQQlNFTCB8PSAweDIwOworCVBCREFUQSAmPSB+MHgyMDsKKworCS8qIGNvbnRyYXN0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KKwlQRkRJUiB8PSAweDE7CisJUEZTRUwgJj0gfjB4MTsKKwlQV01SID0gMHgwMzdGOworI2VuZGlmCit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICAgICAgICAgICBJbml0IFJULUNvbnRyb2wgdUNkaW1tIGhhcmR3YXJlICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNlbGlmIGRlZmluZWQoQ09ORklHX1VDRElNTSkKKworc3RhdGljIHZvaWQgbTY4dnozMjhfcmVzZXQodm9pZCkKK3sKKwlsb2NhbF9pcnFfZGlzYWJsZSgpOworCWFzbSB2b2xhdGlsZSAoIgorCQltb3ZlYWwgIzB4MTBjMDAwMDAsICVhMDsKKwkJbW92ZWIgIzAsIDB4RkZGRkYzMDA7CisJCW1vdmVhbCAwKCVhMCksICVzcDsKKwkJbW92ZWFsIDQoJWEwKSwgJWEwOworCQlqbXAgKCVhMCk7CisJIik7Cit9CisKK3Vuc2lnbmVkIGNoYXIgKmNzODkwMGFfaHdhZGRyOworc3RhdGljIGludCBlcnJubzsKKworX2JzYzAoY2hhciAqLCBnZXRzZXJpYWxudW0pCitfYnNjMSh1bnNpZ25lZCBjaGFyICosIGdldGh3YWRkciwgaW50LCBhKQorX2JzYzEoY2hhciAqLCBnZXRiZW52LCBjaGFyICosIGEpCisKK3N0YXRpYyB2b2lkIGluaXRfaGFyZHdhcmUoY2hhciAqY29tbWFuZCwgaW50IHNpemUpCit7CisJY2hhciAqcDsKKworCXByaW50ayhLRVJOX0lORk8gInVDZGltbSBzZXJpYWwgc3RyaW5nIFslc11cbiIsIGdldHNlcmlhbG51bSgpKTsKKwlwID0gY3M4OTAwYV9od2FkZHIgPSBnZXRod2FkZHIoMCk7CisJcHJpbnRrKEtFUk5fSU5GTyAidUNkaW1tIGh3YWRkciAlLjJ4OiUuMng6JS4yeDolLjJ4OiUuMng6JS4yeFxuIiwKKwkJcFswXSwgcFsxXSwgcFsyXSwgcFszXSwgcFs0XSwgcFs1XSk7CisJcCA9IGdldGJlbnYoIkFQUEVORCIpOworCWlmIChwKQorCQlzdHJjcHkocCwgY29tbWFuZCk7CisJZWxzZQorCQljb21tYW5kWzBdID0gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNlbHNlCisKK3N0YXRpYyB2b2lkIG02OHZ6MzI4X3Jlc2V0KHZvaWQpCit7Cit9CisKK3N0YXRpYyB2b2lkIGluaXRfaGFyZHdhcmUoY2hhciAqY29tbWFuZCwgaW50IHNpemUpCit7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZW5kaWYKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQgY29uZmlnX0JTUChjaGFyICpjb21tYW5kLCBpbnQgc2l6ZSkKK3sKKwlwcmludGsoS0VSTl9JTkZPICI2OFZaMzI4IERyYWdvbkJhbGxWWiBzdXBwb3J0IChjKSAyMDAxIExpbmVvLCBJbmMuXG4iKTsKKworI2lmIGRlZmluZWQoQ09ORklHX0JPT1RQQVJBTSkKKwlzdHJuY3B5KGNvbW1hbmQsIENPTkZJR19CT09UUEFSQU1fU1RSSU5HLCBzaXplKTsKKwljb21tYW5kW3NpemUtMV0gPSAwOworI2Vsc2UKKwltZW1zZXQ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TkFQSSBpcyBub3Qgc2V0CisjIENPTkZJR19TSVMxOTAgaXMgbm90IHNldAorIyBDT05GSUdfU0tHRSBpcyBub3Qgc2V0CisjIENPTkZJR19TS1kyIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NLOThMSU4gaXMgbm90IHNldAorIyBDT05GSUdfVElHT04zIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JOWDIgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworIyBDT05GSUdfQ0hFTFNJT19UMSBpcyBub3Qgc2V0CisjIENPTkZJR19JWEdCIGlzIG5vdCBzZXQKKyMgQ09ORklHX1MySU8gaXMgbm90IHNldAorCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworIyBDT05GSUdfVFIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNldAorIyBDT05GSUdfUFBQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NMSVAgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX0ZDIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NIQVBFUiBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRDT05TT0xFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0tHREJPRSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRQT0xMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVFBPTExfUlggaXMgbm90IHNldAorIyBDT05GSUdfTkVUUE9MTF9UUkFQIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF9QT0xMX0NPTlRST0xMRVIgaXMgbm90IHNldAorCisjCisjIElTRE4gc3Vic3lzdGVt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1cHBvcnQKKyMKK0NPTkZJR19TRVJJQUxfQ09SRT15CitDT05GSUdfU0VSSUFMX0NPUkVfQ09OU09MRT15CitDT05GSUdfU0VSSUFMX1ZSNDFYWD15CitDT05GSUdfU0VSSUFMX1ZSNDFYWF9DT05TT0xFPXkKKyMgQ09ORklHX1NFUklBTF9KU00gaXMgbm90IHNldAorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisjIENPTkZJR19SVEMgaXMgbm90IHNldAorIyBDT05GSUdfR0VOX1JUQyBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfVlI0MVhYIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RUTEsgaXMgbm90IHNldAorIyBDT05GSUdfUjM5NjQgaXMgbm90IHNldAorIyBDT05GSUdfQVBQTElDT00gaXMgbm90IHNldAorIyBDT05GSUdfVEFOQkFDX1RCMDIxOSBpcyBub3Qgc2V0CisKKyMKKyMgRnRhcGUsIHRoZSBmbG9wcHkgdGFwZSBkZXZpY2UgZHJpdmVyCisjCisjIENPTkZJR19EUk0gaXMgbm90IHNldAorQ09ORklHX0dQSU9fVlI0MVhYPXkKKyMgQ09ORklHX1JBV19EUklWRVIgaXMgbm90IHNldAorCisjCisjIFRQTSBkZXZpY2VzCisjCisjIENPTkZJR19UQ0dfVFBNIGlzIG5vdCBzZXQKKworIworIyBJMkMgc3VwcG9ydAorIworIyBDT05GSUdfSTJDIGlzIG5vdCBzZXQKKworIworIyBEYWxsYXMncyAxLXdpcmUgYnVzCisjCisjIENPTkZJR19XMSBpcyBub3Qgc2V0CisKKyMKKyMgSGFyZHdhcmUgTW9uaXRvcmluZyBzdXBwb3J0CisjCisjIENPTkZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgQ2FwYWJpbGl0aWVzIFBvcnQgZHJpdmVycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBDb25zb2xlIGRpc3BsYXkgZHJpdmVyIHN1cHBvcnQKKyMKKyMgQ09ORklHX1ZHQV9DT05TT0xFIGlzIG5vdCBzZXQKK0NPTkZJR19EVU1NWV9DT05TT0xFPXkKKworIworIyBTcGVha3VwIGNvbnNvbGUgc3BlZWNoCisjCisjIENPTkZJR19TUEVBS1VQIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CitDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0k9eQorQ09ORklHX1VTQj1tCisjIENPTkZJR19VU0JfREVCVUcgaXMgbm90IHNldAorCisjCisjIE1pc2NlbGxhbmVvdXMgVVNCIG9wdGlvbnMKKyMKKyMgQ09ORklHX1VTQl9ERVZJQ0VGUyBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfQkFORFdJRFRIIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9EWU5BTUlDX01JTk9SUyBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfT1RHIGlzIG5vdCBzZXQKKworIworIyBVU0IgSG9zdCBDb250cm9sbG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2V0CisjIENPTkZJR19VU0JfR09URU1QIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9QSElER0VUS0lUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9QSElER0VUU0VSVk8gaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0lETU9VU0UgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX1NJU1VTQlZHQSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfTEQgaXMgbm90IHNldAorCisjCisjIFVTQiBEU0wgbW9kZW0gc3VwcG9ydAorIworCisjCisjIFVTQiBHYWRnZXQgU3VwcG9ydAorIworIyBDT05GSUdfVVNCX0dBREdFVCBpcyBub3Qgc2V0CisKKyMKKyMgTU1DL1NEIENhcmQgc3VwcG9ydAorIworIyBDT05GSUdfTU1DIGlzIG5vdCBzZXQKKworIworIyBJbmZpbmlCYW5kIHN1cHBvcnQKKyMKKyMgQ09ORklHX0lORklOSUJBTkQgaXMgbm90IHNldAorCisjCisjIFNOIERldmljZXMKKyMKKworIworIyBEaXN0cmlidXRlZCBMb2NrIE1hbmFnZXIKKyMKKyMgQ09ORklHX0RMTSBpcyBub3Qgc2V0CisKKyMKKyMgRmlsZSBzeXN0ZW1zCisjCitDT05GSUdfRVhUMl9GUz15CisjIENPTkZJR19FWFQyX0ZTX1hBVFRSIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VYVDJfRlNfWElQIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VYVDNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfUkVJU0VSNF9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19SRUlTRVJGU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19KRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfRlNfUE9TSVhfQUNMIGlzIG5vdCBzZXQKKworIworIyBYRlMgc3VwcG9ydAorIworQ09ORklHX1hGU19GUz15CisjIENPTkZJR19YRlNfUlQgaXMgbm90IHNldAorQ09ORklHX1hGU19R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0YXR1cyA9IGFjcGlfZHNfZ2V0X2ZpZWxkX25hbWVzICgmaW5mbywgd2Fsa19zdGF0ZSwgYXJnLT5jb21tb24ubmV4dCk7CisJc3RhdHVzID0gYWNwaV9kc19nZXRfZmllbGRfbmFtZXMoJmluZm8sIHdhbGtfc3RhdGUsIGFyZy0+Y29tbW9uLm5leHQpOwogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfY3JlYXRlX2luZGV4X2ZpZWxkCkBAIC01NjQsMzkgKzU0MSw0MCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZHNfY3JlYXRlX2luZGV4X2ZpZWxkICgKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcCwKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpyZWdpb25fbm9kZSwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKQorYWNwaV9kc19jcmVhdGVfaW5kZXhfZmllbGQodW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKm9wLAorCQkJICAgc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKnJlZ2lvbl9ub2RlLAorCQkJICAgc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdC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VzcC5oPgogCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9ESVNQQVRDSEVSCi0JIEFDUElfTU9EVUxFX05BTUUgICAgKCJkc2luaXQiKQorQUNQSV9NT0RVTEVfTkFNRSgiZHNpbml0IikKIAogLyogTG9jYWwgcHJvdG90eXBlcyAqLwotCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZHNfaW5pdF9vbmVfb2JqZWN0ICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpOwotCithY3BpX2RzX2luaXRfb25lX29iamVjdChhY3BpX2hhbmRsZSBvYmpfaGFuZGxlLAorCQkJdTMyIGxldmVsLCB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC04MCwyNiArNzQsMjMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9kc19pbml0X29uZV9vYmplY3QgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgb2JqX2hhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSk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CAtNDEsNyArNDEsNiBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogI2luY2x1ZGUgPGFjcGkvYWNwYXJzZXIuaD4KICNpbmNsdWRlIDxhY3BpL2FtbGNvZGUuaD4KQEAgLTQ5LDY3ICs0OCw1NyBAQAogI2luY2x1ZGUgPGFjcGkvYWNpbnRlcnAuaD4KICNpbmNsdWRlIDxhY3BpL2FjbmFtZXNwLmg+CiAKLQogI2RlZmluZSBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfRElTUEFUQ0hFUgotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgiZHNtZXRob2QiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJkc21ldGhvZCIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfcGFyc2VfbWV0aG9kCiAgKgotICogUEFSQU1FVEVSUzogIG9ial9oYW5kbGUgICAgICAtIE1ldGhvZCBub2RlCisgKiBQQVJBTUVURVJTOiAgTm9kZSAgICAgICAgLSBNZXRob2Qgbm9kZQogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCi0gKiBERVNDUklQVElPTjogQ2FsbCB0aGUgcGFyc2VyIGFuZCBwYXJzZSB0aGUgQU1MIHRoYXQgaXMgYXNzb2NpYXRlZCB3aXRoIHRoZQotICogICAgICAgICAgICAgIG1ldGhvZC4KKyAqIERFU0NSSVBUSU9OOiBQYXJzZSB0aGUgQU1MIHRoYXQgaXMgYXNzb2NpYXRlZCB3aXRoIHRoZSBtZXRob2QuCiAgKgogICogTVVURVg6ICAgICAgIEFzc3VtZXMgcGFyc2VyIGlzIGxvY2tlZAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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RhdGUpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlhY3BpX2RzX3Rlcm1pbmF0ZV9jb250cm9sX21ldGhvZChuZXh0X3dhbGtfc3RhdGUpOworCWFjcGlfZHNfZGVsZXRlX3dhbGtfc3RhdGUobmV4dF93YWxrX3N0YXRlKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX3Jlc3RhcnRfY29udHJvbF9tZXRob2QKQEAgLTQwNywyNSArNDI2LDIyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9kc19yZXN0YXJ0X2NvbnRyb2xfbWV0aG9kICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnJldHVybl9kZXNjKQorYWNwaV9kc19yZXN0YXJ0X2NvbnRyb2xfbWV0aG9kKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUsCisJCQkgICAgICAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqcmV0dXJuX2Rlc2MpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIoImRzX3Jlc3RhcnRfY29udHJvbF9tZXRob2QiLCB3YWxrX3N0YXRlKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0VfUFRSICgiZHNfcm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ldGUgdGhlIHJldHVybiB2YWx1ZSBpZiBpdCB3aWxsIG5vdCBiZSB1c2VkIGJ5IHRoZQogCQkJICogY2FsbGluZyBtZXRob2QKIAkJCSAqLwotCQkJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlIChyZXR1cm5fZGVzYyk7CisJCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UocmV0dXJuX2Rlc2MpOwogCQl9CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX3Rlcm1pbmF0ZV9jb250cm9sX21ldGhvZAogICoKICAqIFBBUkFNRVRFUlM6ICB3YWxrX3N0YXRlICAgICAgICAgIC0gU3RhdGUgb2YgdGhlIG1ldGhvZAogICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqIFJFVFVSTjogICAgICBOb25lCiAgKgogICogREVTQ1JJUFRJT046IFRlcm1pbmF0ZSBhIGNvbnRyb2wgbWV0aG9kLiAgRGVsZXRlIGV2ZXJ5dGhpbmcgdGhhdCB0aGUgbWV0aG9kCiAgKiAgICAgICAgICAgICAgY3JlYXRlZCwgZGVsZXRlIGFsbCBsb2NhbHMgYW5kIGFyZ3VtZW50cywgYW5kIGRlbGV0ZSB0aGUgcGFyc2UKQEAgLTQ4Myw2MyArNDk5LDU5IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZHNfdGVybWluYXRlX2NvbnRyb2xfbWV0aG9kICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgIC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EFDUElfREJfRVhFQywgIiVkIGFyZ3MgcGFzc2VkIHRvIG1ldGhvZFxuIiwgaW5kZXgpKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbWV0aG9kX2RhdGFfZ2V0X25vZGUKQEAgLTI2MywxNCArMjQ2LDEyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9kc19tZXRob2RfZGF0YV9nZXRfbm9kZSAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleCwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKipub2RlKQorYWNwaV9kc19tZXRob2RfZGF0YV9nZXRfbm9kZSh1MTYgb3Bjb2RlLAorCQkJICAgICB1MzIgaW5kZXgsCisJCQkgICAgIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUsCisJCQkgICAgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICoqbm9kZSkKIHsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZHNfbWV0aG9kX2RhdGFfZ2V0X25vZGUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImRzX21ldGhvZF9kYXRhX2dldF9ub2RlIik7CiAKIAkvKgogCSAqIE1ldGhvZCBMb2NhbHMgYW5kIEFyZ3VtZW50cyBhcmUgc3VwcG9ydG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luZGV4LCBBQ1BJX01FVEhPRF9NQVhfQVJHKSk7CisJCQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfQU1MX0lOVkFMSURfSU5ERVgpOwogCQl9CiAKIAkJLyogUmV0dXJuIGEgcG9pbnRlciB0byB0aGUgcHNldWRvLW5vZGUgKi8KQEAgLTMwNSwxNCArMjg2LDE0IEBACiAJCWJyZWFrOwogCiAJZGVmYXVsdDoKLQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfRVJST1IsICJPcGNvZGUgJWQgaXMgaW52YWxpZFxuIiwgb3Bjb2RlKSk7Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfQU1MX0JBRF9PUENPREUpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0VSUk9SLCAiT3Bjb2RlICVkIGlzIGludmFsaWRcbiIsCisJCQkJICBvcGNvZGUpKTsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX0FNTF9CQURfT1BDT0RFKTsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbWV0aG9kX2RhdGFfc2V0X3ZhbHVlCkBAIC0zMzAsMjkgKzMxMSwyNiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX2RzX21ldGhvZF9kYXRhX3NldF92YWx1ZSAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB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09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbWV0aG9kX2RhdGFfZGVsZXRlX3ZhbHVlCkBAIC00OTQsMjkgKzQ3MSwyNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHZvaWQKLWFjcGlfZHNfbWV0aG9kX2RhdGFfZGVsZXRlX3ZhbHVlICgKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wY29kZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4LAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2RzX21ldGhvZF9kYXRhX2RlbGV0ZV92YWx1ZSh1MTYgb3Bjb2RlLAorCQkJCSB1MzIgaW5kZXgsIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZTsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmplY3Q7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9iamVjdDsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImRzX21ldGhvZF9kYXRhX2RlbGV0ZV92YWx1ZSIpOwotCisJQUNQSV9GV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J5IG9uZSB0byBiYWxhbmNlIHRoZQogCQkgKiBpbmNyZW1lbnQgd2hlbiB0aGUgb2JqZWN0IHdhcyBzdG9yZWQuCiAJCSAqLwotCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UgKG9iamVjdCk7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShvYmplY3QpOwogCX0KIAogCXJldHVybl9WT0lEOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfc3RvcmVfb2JqZWN0X3RvX2xvY2FsCkBAIC01NTcsNDAgKzUyOSwzOCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZHNfc3RvcmVfb2JqZWN0X3RvX2xvY2FsICgKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wY29kZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4LAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2RzX3N0b3JlX29iamVjdF90b19sb2NhbCh1MTYgb3Bjb2RlLAorCQkJICAgICAgdTMyIGluZGV4LAorCQkJICAgICAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCQkgICAgICBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2Rl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MRVRFX0ZVTkNUSU9OUwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03MTIsMzkgKzY4MiwzMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9vYmplY3RfdHlwZQotYWNwaV9kc19tZXRob2RfZGF0YV9nZXRfdHlwZSAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleCwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKQorYWNwaV9kc19tZXRob2RfZGF0YV9nZXRfdHlwZSh1MTYgb3Bjb2RlLAorCQkJICAgICB1MzIgaW5kZXgsIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZTsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmplY3Q7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9iamVjdDsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImRzX21ldGhvZF9kYXRhX2dldF90eXBlIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJkc19tZXRob2RfZGF0YV9nZXRfdHlwZSIpOwogCiAJLyogR2V0IHRoZSBuYW1lc3BhY2Ugbm9kZSBmb3IgdGhlIGFy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uLmFtbF9vcGNvZGUsCisJCQkJCSZvYmpfZGVzYyk7CisJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShvYmpfZGVzYyk7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogCX0KIAogCSpvYmpfZGVzY19wdHIgPSBvYmpfZGVzYzsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfYnVpbGRfaW50ZXJuYWxfYnVmZmVyX29iagpAQCAtMTQ3LDIwICsxNDUsMTcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX2J1aWxkX2ludGVybmFsX2J1ZmZlcl9vYmogKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqb3AsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJfbGVuZ3RoLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipvYmpfZGVzY19wdHIpCithY3BpX2RzX2J1aWxkX2ludGVybmFsX2J1ZmZlcl9vYmooc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSwKKwkJCQkgIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICpvcCwKKwkJCQkgIHUzMiBidWZmZXJfbGVuZ3RoLAorCQk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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2NyZWF0ZV9ub2RlCkBAIC0zNzQsNTcgKzM2NSw1MyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZHNfY3JlYXRlX25vZGUgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcCkKK2FjcGlfZHNfY3JlYXRlX25vZGUoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSwKKwkJICAgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlLAorCQkgICAgdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKm9wKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYzsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIgKCJkc19jcmVhdGVfbm9kZSIsIG9wKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0VfUFRSKCJkc19jcmVhdGVfbm9kZSIsIG9wKTsKIAogCS8qCiAJICogQmVjYXVzZSBvZiB0aGUgZXhlY3V0aW9uIHBhc3MgdGhyb3VnaCB0aGUgbm9uLWNvbnRyb2wtbWV0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dHJhX2Rlc2MtPmV4dHJhLmFtbF9zdGFydCk7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXN0YXR1cyA9IGFjcGlfZHNfZXhlY3V0ZV9hcmd1bWVudHMobm9kZSwgYWNwaV9uc19nZXRfcGFyZW50X25vZGUobm9kZSksCisJCQkJCSAgIGV4dHJhX2Rlc2MtPmV4dHJhLmFtbF9sZW5ndGgsCisJCQkJCSAgIGV4dHJhX2Rlc2MtPmV4dHJhLmFtbF9zdGFydCk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9kc19nZXRfYnVmZmVyX2FyZ3VtZW50cwpAQCAtMjQwLDQwICsyMzAsMzUgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9kc19nZXRfYnVmZmVyX2FyZ3VtZW50cyAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MpCithY3BpX3N0YXR1cyBhY3BpX2RzX2dldF9idWZmZXJfYXJndW1lbnRzKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjKQogewotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGU7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1BUUiAoImRzX2dldF9idWZm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ioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9kc19pbml0aWFsaXplX3JlZ2lvbiAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBvYmpfaGFuZGxlKQorYWNwaV9zdGF0dXMgYWNwaV9kc19pbml0aWFsaXplX3JlZ2lvbihhY3BpX2hhbmRsZSBvYmpfaGFuZGxlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0Jb2JqX2Rlc2MgPSBhY3BpX25zX2dldF9hdHRhY2hlZF9vYmplY3QgKG9ial9oYW5kbGUpOworCW9ial9kZXNjID0gYWNwaV9uc19nZXRfYXR0YWNoZWRfb2JqZWN0KG9ial9oYW5kbGUpOwogCiAJLyogTmFtZXNwYWNlIGlzIE5PVCBsb2NrZWQgKi8KIAotCXN0YXR1cyA9IGFjcGlfZXZfaW5pdGlhbGl6ZV9yZWdpb24gKG9ial9kZXNjLCBGQUxTRSk7CisJc3RhdHVzID0gYWNwaV9ldl9pbml0aWFsaXplX3JlZ2lvbihvYmpfZGVzYywgRkFMU0UpOwogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2luaXRfYnVmZmVyX2ZpZWxkCkBAIC00MTksMzAgKzM5NSwyNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc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BUl9QQUNLQUdFX09QKSAmJgotCQkJIChvcC0+Y29tbW9uLnBhcmVudC0+Y29tbW9uLmFtbF9vcGNvZGUgIT0gQU1MX05BTUVfT1ApKSkgeworCQkgICAgKChvcC0+Y29tbW9uLnBhcmVudC0+Y29tbW9uLmFtbF9vcGNvZGUgIT0gQU1MX1BBQ0tBR0VfT1ApICYmCisJCSAgICAgKG9wLT5jb21tb24ucGFyZW50LT5jb21tb24uYW1sX29wY29kZSAhPQorCQkgICAgICBBTUxfVkFSX1BBQ0tBR0VfT1ApCisJCSAgICAgJiYgKG9wLT5jb21tb24ucGFyZW50LT5jb21tb24uYW1sX29wY29kZSAhPQorCQkJIEFNTF9OQU1FX09QKSkpIHsKIAkJCXdhbGtfc3RhdGUtPnJlc3VsdF9vYmogPSBvYmpfZGVzYzsKIAkJfQogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2V4ZWNfYmVnaW5fY29udHJvbF9vcApAQCAtODk1LDE5ICs4NjcsMTYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX2V4ZWNfYmVnaW5fY29udHJvbF9vcCAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcCkKK2FjcGlfZHNfZXhlY19iZWdpbl9jb250cm9sX29wKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtf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AvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTY4LDEzICs2Niw5IEBACiAgKiAgICAgICAgICAgICAgcGFyZW50IG1ldGhvZCBleGl0cy4pCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV9kc19jbGVhcl9pbXBsaWNpdF9yZXR1cm4gKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCit2b2lkIGFjcGlfZHNfY2xlYXJfaW1wbGljaXRfcmV0dXJuKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JQUNQSV9GVU5DVElPTl9OQU1FICgiZHNfY2xlYXJfaW1wbGljaXRfcmV0dXJuIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX05BTUUoImRzX2NsZWFyX2ltcGxpY2l0X3JldHVybiIpOwogCiAJLyoKIAkgKiBTbGFjayBtdXN0IGJlIGVuYWJsZWQgZm9yIHRoaXMgZmVhdHVyZQpAQCAtODksMTYgKzgzLDE1IEBACiAJCSAqIGNvbXBsZXggc3RhdGVtZW50cywgdGhlIGltcGxpY2l0IHJldHVybiB2YWx1ZSBjYW4gYmUKIAkJICogYnViYmxlZCB1cCBzZXZlcmFsIGxldmVscy4KIAkJICovCi0JCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0RJU1BBVENILAotCQkJIlJlbW92aW5nIHJlZmVyZW5jZSBvbiBzdGFsZSBpbXBsaWNpdCByZXR1cm4gb2JqICVwXG4iLAotCQkJd2Fsa19zdGF0ZS0+aW1wbGljaXRfcmV0dXJuX29iaikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0RJU1BBVENILAorCQkJCSAgIlJlbW92aW5nIHJlZmVyZW5jZSBvbiBzdGFsZSBpbXBsaWNpdCByZXR1cm4gb2JqICVwXG4iLAorCQkJCSAgd2Fsa19zdGF0ZS0+aW1wbGljaXRfcmV0dXJuX29iaikpOwogCi0JCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSAod2Fsa19zdGF0ZS0+aW1wbGljaXRfcmV0dXJuX29iaik7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSh3YWxrX3N0YXRlLT5pbXBsaWNpdF9yZXR1cm5fb2JqKTsKIAkJd2Fsa19zdGF0ZS0+aW1wbGljaXRfcmV0dXJuX29iaiA9IE5VTEw7CiAJfQogfQogCi0KICNpZm5kZWYgQUNQSV9OT19NRVRIT0RfRVhFQ1VUSU9OCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTExOSwyNyArMTEyLDIyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB1OAotYWNwaV9kc19kb19pbXBsaWNpdF9yZXR1cm4gKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnJldHVybl9kZXNjLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRfcmVmZXJlbmNlKQorYWNwaV9kc19kb19pbXBsaWNpdF9yZXR1cm4odW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqcmV0dXJuX2Rlc2MsCisJCQkgICBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlLCB1OCBhZGRfcmVmZXJlbmNlKQogewotCUFDUElfRlVOQ1RJT05fTkFNRSAoImRzX2RvX2ltcGxpY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RzIiBhbmQgIlRhcmdldHMiLgogCQkgKi8KLQkJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlICh3YWxrX3N0YXRlLT5vcGVyYW5kc1tpXSk7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSh3YWxrX3N0YXRlLT5vcGVyYW5kc1tpXSk7CiAJCXdhbGtfc3RhdGUtPm9wZXJhbmRzW2ldID0gTlVMTDsKIAl9CiAKQEAgLTQ1OSw3ICs0MzYsNiBAQAogfQogI2VuZGlmCiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9kc19jcmVhdGVfb3BlcmFuZApAQCAtNDc4LDM3ICs0NTQsMzYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX2NyZWF0ZV9vcGVyYW5kICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKmFyZywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ19pbmRleCkKK2FjcGlfZHNfY3JlYXRlX29wZXJhbmQoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSwKKwkJICAgICAgIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICphcmcsIHUzMiBhcmdfaW5kZXgpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lX3N0cmluZzsKLQl1MzIgICAgICAgICAgICAg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RUMgKGFjcGlfZGJfZGlzcGxheV9hcmd1bWVudF9vYmplY3QgKG9ial9kZXNjLCB3YWxrX3N0YXRlKSk7CisJCUFDUElfREVCVUdHRVJfRVhFQyhhY3BpX2RiX2Rpc3BsYXlfYXJndW1lbnRfb2JqZWN0CisJCQkJICAgKG9ial9kZXNjLCB3YWxrX3N0YXRlKSk7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2NyZWF0ZV9vcGVyYW5kcwpAQCAtNzAyLDI5ICs2OTIsMjcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX2NyZWF0ZV9vcGVyYW5kcyAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpmaXJzdF9hcmcpCithY3BpX2RzX2NyZWF0ZV9vcGVyYW5kcyhzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlLAorCQkJdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKmZpcnN0X2FyZykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKmFyZzsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ19jb3VudCA9IDA7CisJYWNwaV9zdGF0dXMgc3R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dXJpbmcgbWV0aG9kIGV4ZWN1dGlvbiAqLwogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2V4ZWNfZW5kX29wCkBAIC0zNTAsMjggKzM0NSwyNSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9kc19leGVjX2VuZF9vcCAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfc3RhdHVzIGFjcGlfZHNfZXhlY19lbmRfb3Aoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSkKIHsKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcDsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BfdHlwZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wX2NsYXNzOwotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKm5leHRfb3A7Ci0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqZmlyc3RfYXJnOworCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICpvcDsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKKwl1MzIgb3BfdHlwZTsKKwl1MzIgb3BfY2xhc3M7CisJdW5pb24gYWNwaV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HsKIAkJCW9wLT5uYW1lZC5uYW1lID0gbm9kZS0+bmFtZS5pbnRlZ2VyOwogCQl9Ci0JCWlmIChvdXRfb3ApIHsKLQkJCSpvdXRfb3AgPSBvcDsKLQkJfQorCQkqb3V0X29wID0gb3A7CiAJfQogCiAJLyoKQEAgLTY4NywxMCArNjk2LDkgQEAKIAkgKi8KIAlvcC0+Y29tbW9uLm5vZGUgPSBub2RlOwogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbG9hZDJfZW5kX29wCkBAIC03MDQsMzkgKzcxMiw1NCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2RzX2xvYWQyX2VuZF9vcCAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfc3RhdHVzIGFjcGlfZHNfbG9hZDJfZW5kX29wKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqb3A7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIG9iamVjdF90eXBlOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqYXJnOwotCX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wcGVkIG9iamVjdCB0eXBlICglcylcbiIsCisJCQkJICBhY3BpX3V0X2dldF90eXBlX25hbWUoc2NvcGVfaW5mby0+Y29tbW9uLgorCQkJCQkJCXZhbHVlKSkpOworCQlhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX3N0YXRlKHNjb3BlX2luZm8pOwogCX0KIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX3Njb3BlX3N0YWNrX3B1c2gKQEAgLTEwMiw3NCArOTUsNzAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX3Njb3BlX3N0YWNrX3B1c2ggKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUsCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2RzX3Njb3BlX3N0YWNrX3B1c2goc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsCisJCQkgYWNwaV9vYmplY3RfdHlwZSB0eXBlLAorCQkJIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc2NvcGVfaW5mbzsKLQl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgICAgICAgICpvbGRfc2NvcGVfaW5mbzsKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnNjb3BlX2luZm87CisJdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICpvbGRfc2Nv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KwkJCSAgIlJlc3VsdD0lcCByZW1haW5pbmdfcmVzdWx0cz0lWCBTdGF0ZT0lcFxuIiwKKwkJCSAgc3RhdGUsIHN0YXRlLT5yZXN1bHRzLm51bV9yZXN1bHRzLCB3YWxrX3N0YXRlKSk7CiAKLQlhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX3N0YXRlIChzdGF0ZSk7CisJYWNwaV91dF9kZWxldGVfZ2VuZXJpY19zdGF0ZShzdGF0ZSk7CiAKIAlyZXR1cm4gKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX29ial9zdGFja19wdXNoCkBAIC00MjAsMzUgKzQwNiwzNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZHNfb2JqX3N0YWNrX3B1c2ggKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm9iamVjdCwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKQorYWNwaV9kc19vYmpfc3RhY2tfcHVzaCh2b2lkICpvYmplY3QsIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKiB3YWxrX3N0YXRlKQogewotCUFDUElfRlVOQ1RJT05fTkFNRSAoImRzX29ial9zdGFja19wdXNoIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX05BTUUoImRzX29ial9zdGFja19wdXNoIik7CiAKIAkvKiBDaGVjayBmb3Igc3RhY2sgb3ZlcmZsb3cgKi8KIAogCWlmICh3YWxrX3N0YXRlLT5udW1fb3BlcmFuZHMgPj0gQUNQSV9PQkpfTlVNX09QRVJBTkRTKSB7Ci0JCUFDUElfRE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lwZV9uYW1lKCh1bmlvbgorCQkJCQkJCWFjcGlfb3BlcmFuZF9vYmplY3QgKikKKwkJCQkJCSAgICAgICBvYmplY3QpLCB3YWxrX3N0YXRlLAorCQkJICB3YWxrX3N0YXRlLT5udW1fb3BlcmFuZHMpKTsKIAogCXJldHVybiAoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfb2JqX3N0YWNrX3BvcApAQCAtNDY0LDM4ICs0NTAsMzUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX29ial9zdGFja19wb3AgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9wX2NvdW50LAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2RzX29ial9zdGFja19wb3AodTMyIHBvcF9jb3VudCwgc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqIHdhbGtfc3RhdGUpCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOworCXUzMiBpOwogCi0JQUNQSV9GVU5DVElPTl9OQU1FICgiZHNfb2JqX3N0YWNrX3BvcCIpOwotCisJQUNQSV9GVU5DVElPTl9OQU1FKCJkc19vYmpfc3RhY2tfcG9wIik7CiAKIAlmb3IgKGkgPSAwOyBpIDwgcG9wX2NvdW50OyBpKyspIHsKIAkJLyogQ2hlY2sgZm9yIHN0YWNrIHVuZGVyZmxvdyAqLwogCiAJCWlmICh3YWxrX3N0YXRlLT5udW1fb3BlcmFuZHMgPT0gMCkgewotCQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfRVJST1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sKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2NyZWF0ZV93YWxrX3N0YXRlCkBAIC02NjcsNTcgKzYzNyw1NSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKgotYWNwaV9kc19jcmVhdGVfd2Fsa19zdGF0ZSAoCi0JYWNwaV9vd25lcl9pZCAgICAgICAgICAgICAgICAgICBvd25lcl9pZCwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcmlnaW4sCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqbXRoX2Rlc2MsCi0Jc3RydWN0IGFjcGlfdGhyZWFkX3N0YXRlICAgICAgICAqdGhyZWFkKQorc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqYWNwaV9kc19jcmVhdGVfd2Fsa19zdGF0ZShhY3BpX293bmVyX2lkIG93bmVyX2lkLAorCQkJCQkJICB1bmlvbiBhY3BpX3BhcnNlX29iamVjdAorCQkJCQkJICAqb3JpZ2luLAorCQkJCQkJICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0CisJCQkJCQkgICptdGhfZGVzYywKKwkJCQkJCSAgc3RydWN0IGFjcGlfdGhyZWFkX3N0YXRlCisJCQkJCQkgICp0aHJlYWQpCiB7Ci0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlOworCWFjcGlfc3RhdH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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZHNfaW5pdF9hbWxfd2FsawpAQCAtNzM3LDcwICs3MDUsNzAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2RzX2luaXRfYW1sX3dhbGsgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqb3AsCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbWV0aG9kX25vZGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYW1sX3N0YXJ0LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW1sX2xlbmd0aCwKLQlzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAgICAgICppbmZvLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc19udW1iZXIpCithY3BpX2RzX2luaXRfYW1sX3dhbGsoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSwKKwkJICAgICAgdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKm9wLAorCQkgICAgICBzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbWV0aG9kX25vZGUsCisJCSAgICAgIHU4ICogYW1sX3N0YXJ0LAorCQkgICAgICB1MzIgYW1sX2xlbmd0aCwKKwkJICAgICAgc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gKmluZm8sIHU4IHBhc3NfbnVtYmVyKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXN0cnVjdCBhY3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RlKTsKIAl9CiAKLQlhY3BpX3V0X3JlbGVhc2VfdG9fY2FjaGUgKEFDUElfTUVNX0xJU1RfV0FMSywgd2Fsa19zdGF0ZSk7CisJQUNQSV9NRU1fRlJFRSh3YWxrX3N0YXRlKTsKIAlyZXR1cm5fVk9JRDsKIH0KIAotCi0jaWZkZWYgQUNQSV9FTkFCTEVfT0JKRUNUX0NBQ0hFCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfZHNfZGVsZXRlX3dhbGtfc3RhdGVfY2FjaGUKLSAqCi0gKiBQQVJBTUVURVJTOiAgTm9uZQotICoKLSAqIFJFVFVSTjogICAgICBOb25lCi0gKgotICogREVTQ1JJUFRJT046IFB1cmdlIHRoZSBnbG9iYWwgc3RhdGUgb2JqZWN0IGNhY2hlLiAgVXNlZCBkdXJpbmcgc3Vic3lzdGVtCi0gKiAgICAgICAgICAgICAgdGVybWluYXRpb24uCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV9kc19kZWxldGVfd2Fsa19zdGF0ZV9jYWNoZSAoCi0Jdm9pZCkKLXsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZHNfZGVsZXRlX3dhbGtfc3RhdGVfY2FjaGUiKTsKLQotCi0JYWNwaV91dF9kZWxldGVfZ2VuZXJpY19jYWNoZSAoQUNQSV9NRU1fTElTVF9XQUxLKTsKLQlyZXR1cm5fVk9JRDsKLX0KLSNlbmRpZgotCi0KICNpZmRlZiBBQ1BJX09CU09MRVRFX0ZVTkNUSU9OUwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkB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ogCiAJCWlmIChhY3BpX2dibF9maXhlZF9ldmVudF9pbmZvW2ldLmVuYWJsZV9yZWdpc3Rlcl9pZCAhPSAweEZGKSB7Ci0JCQlzdGF0dXMgPSBhY3BpX3NldF9yZWdpc3RlciAoCi0JCQkJCSBhY3BpX2dibF9maXhlZF9ldmVudF9pbmZvW2ldLmVuYWJsZV9yZWdpc3Rlcl9pZCwKLQkJCQkJIDAsIEFDUElfTVRYX0xPQ0spOwotCQkJaWYgKEFDUElfRkFJTFVSRSAoc3RhdHVzKSkgeworCQkJc3RhdHVzID0KKwkJCSAgICBhY3BpX3NldF9yZWdpc3RlcihhY3BpX2dibF9maXhlZF9ldmVudF9pbmZvW2ldLgorCQkJCQkgICAgICBlbmFibGVfcmVnaXN0ZXJfaWQsIDAsCisJCQkJCSAgICAgIEFDUElfTVRYX0xPQ0spOworCQkJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CiAJCQkJcmV0dXJuIChzdGF0dXMpOwogCQkJfQogCQl9CkBAIC0yMDIsNyArMTc3LDYgQEAKIAlyZXR1cm4gKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V2X2ZpeGVkX2V2ZW50X2RldGVjdApAQCAtMjE1LDMxICsxODksMjcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11MzIKLWFjcGlfZXZfZml4ZWRfZXZlbnRfZGV0ZWN0ICgKLQl2b2lkKQordTMyIGFjcGlfZXZfZml4ZWRfZXZlbnRfZGV0ZWN0KHZvaWQpCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRfc3RhdHVzID0gQUNQSV9JTlRFUlJVUFRfTk9UX0h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mFibGUgJiBhY3BpX2dibF9maXhlZF9ldmVudF9pbmZvW2ldLgorCQkJZW5hYmxlX2JpdF9tYXNrKSkgewogCQkJLyogRm91bmQgYW4gYWN0aXZlIChzaWduYWxsZWQpIGV2ZW50ICovCiAKLQkJCWludF9zdGF0dXMgfD0gYWNwaV9ldl9maXhlZF9ldmVudF9kaXNwYXRjaCAoKHUzMikgaSk7CisJCQlpbnRfc3RhdHVzIHw9IGFjcGlfZXZfZml4ZWRfZXZlbnRfZGlzcGF0Y2goKHUzMikgaSk7CiAJCX0KIAl9CiAKIAlyZXR1cm4gKGludF9zdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfZml4ZWRfZXZlbnRfZGlzcGF0Y2gKQEAgLTI3MiwzOSArMjQzLDMyIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHUzMgotYWNwaV9ldl9maXhlZF9ldmVudF9kaXNwYXRjaCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudCkKK3N0YXRpYyB1MzIgYWNwaV9ldl9maXhlZF9ldmVudF9kaXNwYXRjaCh1MzIgZXZlbnQpCiB7CiAKLQotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CiAKIAkvKiBDbGVhciB0aGUgc3RhdHVzIGJpdCAqLwogCi0JKHZvaWQpIGFjcGlfc2V0X3JlZ2lzdGVyIChhY3BpX2dibF9maXhlZF9ldmVudF9pbmZvW2V2ZW50XS5zdGF0dXNfcmVnaXN0ZXJfaWQsCi0JCQkgMSwgQUNQSV9NVFhfRE9fTk9UX0xPQ0sp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BlKGdwZV9ldmVudF9pbmZvKTsKIAogCS8qIFR5cGUgd2FzIHZhbGlkYXRlZCBhYm92ZSAqLwogCi0JZ3BlX2V2ZW50X2luZm8tPmZsYWdzICY9IH5BQ1BJX0dQRV9UWVBFX01BU0s7IC8qIENsZWFyIHR5cGUgYml0cyAqLwotCWdwZV9ldmVudF9pbmZvLT5mbGFncyB8PSB0eXBlOyAgICAgICAgICAgICAgLyogSW5zZXJ0IHR5cGUgKi8KLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJZ3BlX2V2ZW50X2luZm8tPmZsYWdzICY9IH5BQ1BJX0dQRV9UWVBFX01BU0s7CS8qIENsZWFyIHR5cGUgYml0cyAqLworCWdwZV9ldmVudF9pbmZvLT5mbGFncyB8PSB0eXBlOwkvKiBJbnNlcnQgdHlwZSAqLworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfdXBkYXRlX2dwZV9lbmFibGVfbWFza3MKQEAgLTExOCw1NyArMTA5LDU1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl91cGRhdGVfZ3BlX2VuYWJsZV9tYXNrcyAoCi0Jc3RydWN0IGFjcGlfZ3BlX2V2ZW50X2luZm8gICAgICAqZ3BlX2V2ZW50X2luZm8sCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlKQorYWNwaV9ldl91cGRhdGVfZ3BlX2VuYWJsZV9tYXNrcyhzdHJ1Y3QgYWNwaV9ncGVfZXZlbnRfaW5mbyAqZ3BlX2V2ZW50X2luZm8sCisJCQkJdTggd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otCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V2X2dldF9ncGVfZXZlbnRfaW5mbwpAQCAtMzE5LDE4ICszMDEsMTQgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdHJ1Y3QgYWNwaV9ncGVfZXZlbnRfaW5mbyAqCi1hY3BpX2V2X2dldF9ncGVfZXZlbnRfaW5mbyAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlcikKK3N0cnVjdCBhY3BpX2dwZV9ldmVudF9pbmZvICphY3BpX2V2X2dldF9ncGVfZXZlbnRfaW5mbyhhY3BpX2hhbmRsZSBncGVfZGV2aWNlLAorCQkJCQkJICAgICAgIHUzMiBncGVfbnVtYmVyKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICAgICAgKmdwZV9ibG9jazsKLQlhY3BpX25hdGl2ZV91aW50ICAgICAgICAgICAgICAgIGk7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2M7CisJc3RydWN0IGFjcGlfZ3BlX2Jsb2NrX2luZm8gKmdwZV9ibG9jazsKKwlhY3BpX25hdGl2ZV91aW50IGk7CiAKLQotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CiAKIAkvKiBBIE5VTEwgZ3BlX2Jsb2NrIG1lYW5zIHVzZSB0aGUgRkFEVC1kZWZpbmVkIEdQRSBibG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hY3BpX2V2X2dwZV9kZXRlY3QKQEAgLTM4NywyMiArMzcwLDIwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTMyCi1hY3BpX2V2X2dwZV9kZXRlY3QgKAotCXN0cnVjdCBhY3BpX2dwZV94cnVwdF9pbmZvICAgICAgKmdwZV94cnVwdF9saXN0KQordTMyIGFjcGlfZXZfZ3BlX2RldGVjdChzdHJ1Y3QgYWNwaV9ncGVfeHJ1cHRfaW5mbyAqIGdwZV94cnVwdF9saXN0KQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50X3N0YXR1cyA9IEFDUElfSU5URVJSVVBUX05PVF9IQU5ETEVEOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZF9zdGF0dXNfYnl0ZTsKLQlzdHJ1Y3QgYWNwaV9ncGVfcmVnaXN0ZXJfaW5mbyAgICpncGVfcmVnaXN0ZXJfaW5mbzsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c19yZWc7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVfcmVnOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICAgICAgKmdwZV9ibG9jazsKLQlhY3BpX25hdGl2ZV91aW50ICAgICAgICAgICAgICAgIGk7Ci0JYWNwaV9uYXRpdmVfdWludCAgICAgICAgICAgICAgICBqOworCXUzMiBpbnRfc3RhdHVzID0gQUNQSV9JTlRFUlJVUFRfTk9UX0hBTkRMRUQ7CisJdTggZW5hYmxlZF9zdGF0dXNfYnl0ZTsKKwlzdHJ1Y3QgYWNwaV9ncGVfcmVnaXN0ZXJfaW5mbyAqZ3BlX3JlZ2lzdGVyX2luZm87CisJdTMyIHN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IEdQRSBibG9jawotICogICAgICAgICAgICAgIEZsYWdzICAgICAgICAgICAgICAgLSBBQ1BJX05PVF9JU1Igb3IgQUNQSV9JU1IKICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgpAQCAtMTQ2LDIwICsxMzEsMTYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9ldl93YWxrX2dwZV9saXN0ICgKLQlBQ1BJX0dQRV9DQUxMQkFDSyAgICAgICBncGVfd2Fsa19jYWxsYmFjaywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9zdGF0dXMgYWNwaV9ldl93YWxrX2dwZV9saXN0KEFDUElfR1BFX0NBTExCQUNLIGdwZV93YWxrX2NhbGxiYWNrKQogewotCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICAgICAgKmdwZV9ibG9jazsKLQlzdHJ1Y3QgYWNwaV9ncGVfeHJ1cHRfaW5mbyAgICAgICpncGVfeHJ1cHRfaW5mbzsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOworCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICpncGVfYmxvY2s7CisJc3RydWN0IGFjcGlfZ3BlX3hydXB0X2luZm8gKmdwZV94cnVwdF9pbmZvOworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOworCXUzMiBmbGFnczsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV2X3dhbGtfZ3BlX2xpc3QiKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJldl93YWxrX2dwZV9saXN0Iik7Ci0KLQotCWFjcGlfb3NfYWNxdWlyZV9sb2NrIChhY3BpX2dibF9ncGVfbG9jaywgZmxhZ3MpOworCWZsYWd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lfZXZfc2F2ZV9tZXRob2RfaW5mbwpAQCAtMjU5LDMwICsyMzgsMjYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9ldl9zYXZlX21ldGhvZF9pbmZvICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmpfZGVzYywKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmV0dXJuX3ZhbHVlKQorYWNwaV9ldl9zYXZlX21ldGhvZF9pbmZvKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQkgdTMyIGxldmVsLCB2b2lkICpvYmpfZGVzYywgdm9pZCAqKnJldHVybl92YWx1ZSkKIHsKLQlzdHJ1Y3QgYWNwaV9ncGVfYmxvY2tfaW5mbyAgICAgICpncGVfYmxvY2sgPSAodm9pZCAqKSBvYmpfZGVzYzsKLQlzdHJ1Y3QgYWNwaV9ncGVfZXZlbnRfaW5mbyAgICAgICpncGVfZXZlbnRfaW5mbzsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdwZV9udW1iZXI7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lW0FDUElfTkFNRV9TSVpFICsgMV07Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICpncGVfYmxvY2sgPSAodm9pZCAqKW9ial9kZXNjOworCXN0cnVjdCBhY3BpX2dwZV9ldmVudF9pbmZvICpncGVfZXZlbn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dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfbWF0Y2hfcHJ3X2FuZF9ncGUKQEAgLTM3MywzNCArMzUxLDI5IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXZfbWF0Y2hfcHJ3X2FuZF9ncGUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgb2JqX2hhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmluZm8sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSkKK2FjcGlfZXZfbWF0Y2hfcHJ3X2FuZF9ncGUoYWNwaV9oYW5kbGUgb2JqX2hhbmRsZSwKKwkJCSAgdTMyIGxldmVsLCB2b2lkICppbmZvLCB2b2lkICoqcmV0dXJuX3ZhbHVlKQogewotCXN0cnVjdCBhY3BpX2dwZV93YWxrX2luZm8gICAgICAgKmdwZV9pbmZvID0gKHZvaWQgKikgaW5mbzsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpncGVfZGV2aWNlOwotCXN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICAgICAgKmdwZV9ibG9jazsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICp0YXJnZXRfZ3BlX2RldmljZTsKLQlzdHJ1Y3QgYWNwaV9ncGVfZXZlbnRfaW5mbyAgICAgICpncGVfZXZlbnRfaW5mbzsKLQl1bmlvbiBhY3BpX29wZX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BQ1BJX1NUQVRVUyAoQUVfT0spOworCUFDUElfTUVNX0ZSRUUoZ3BlX3hydXB0KTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfaW5zdGFsbF9ncGVfYmxvY2sKICAqCiAgKiBQQVJBTUVURVJTOiAgZ3BlX2Jsb2NrICAgICAgIC0gTmV3IEdQRSBibG9jawotICogICAgICAgICAgICAgIGludGVycnVwdF9sZXZlbCAtIExldmVsIHRvIGJlIGFzc29jaWF0ZWQgd2l0aCB0aGlzIEdQRSBibG9jaworICogICAgICAgICAgICAgIGludGVycnVwdF9udW1iZXIgLSBYcnVwdCB0byBiZSBhc3NvY2lhdGVkIHdpdGggdGhpcyBHUEUgYmxvY2sKICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgpAQCAtNjMwLDI0ICs2MDQsMjIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9ldl9pbnN0YWxsX2dwZV9ibG9jayAoCi0Jc3RydWN0IGFjcGlfZ3BlX2Jsb2NrX2luZm8gICAgICAqZ3BlX2Jsb2NrLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0X2xldmVsKQorYWNwaV9ldl9pbnN0YWxsX2dwZV9ibG9jayhzdHJ1Y3QgYWNwaV9ncGVfYmxvY2tfaW5mbyAqZ3BlX2Jsb2NrLAorCQkJICB1MzIgaW50ZXJydXB0X251bWJlcikKIHsKLQlzdHJ1Y3QgYWNwaV9ncGVfYmxvY2tfaW5mbyAgICAgICpuZXh0X2dwZV9ibG9j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lzdGVyX2NvdW50ICAgICAgLSBOdW1iZXIgb2YgR1BFIHJlZ2lzdGVyIHBhaXJzIGluIHRoZSBibG9jawogICogICAgICAgICAgICAgIGdwZV9ibG9ja19iYXNlX251bWJlciAtIFN0YXJ0aW5nIEdQRSBudW1iZXIgZm9yIHRoZSBibG9jawotICogICAgICAgICAgICAgIGludGVycnVwdF9sZXZlbCAgICAgLSBIL1cgaW50ZXJydXB0IGZvciB0aGUgYmxvY2sKKyAqICAgICAgICAgICAgICBpbnRlcnJ1cHRfbnVtYmVyICAgIC0gSC9XIGludGVycnVwdCBmb3IgdGhlIGJsb2NrCiAgKiAgICAgICAgICAgICAgcmV0dXJuX2dwZV9ibG9jayAgICAtIFdoZXJlIHRoZSBuZXcgYmxvY2sgZGVzY3JpcHRvciBpcyByZXR1cm5lZAogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKQEAgLTg5Nyw2OCArODY1LDY2IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9jcmVhdGVfZ3BlX2Jsb2NrICgKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpncGVfZGV2aWNlLAotCXN0cnVjdCBhY3BpX2dlbmVyaWNfYWRkcmVzcyAgICAgKmdwZV9ibG9ja19hZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJfY291bnQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncGVfYmxvY2tfYmFzZV9udW1iZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHRfbGV2ZWwsCi0Jc3RydWN0IGFjcGlfZ3BlX2Jsb2NrX2luZm8gICAgICAqKnJldHVybl9ncGVfYmxvY2spCithY3BpX2V2X2NyZWF0ZV9ncGV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9ncGVfYmxvY2sgKE5VTEwsIGdwZV9ibG9jayk7CisJc3RhdHVzID0gYWNwaV9od19lbmFibGVfcnVudGltZV9ncGVfYmxvY2soTlVMTCwgZ3BlX2Jsb2NrKTsKIAotCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lOSVQsCi0JCQkiRm91bmQgJXUgV2FrZSwgRW5hYmxlZCAldSBSdW50aW1lIEdQRXMgaW4gdGhpcyBibG9ja1xuIiwKLQkJCXdha2VfZ3BlX2NvdW50LCBncGVfZW5hYmxlZF9jb3VudCkpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfSU5JVCwKKwkJCSAgIkZvdW5kICV1IFdha2UsIEVuYWJsZWQgJXUgUnVudGltZSBHUEVzIGluIHRoaXMgYmxvY2tcbiIsCisJCQkgIHdha2VfZ3BlX2NvdW50LCBncGVfZW5hYmxlZF9jb3VudCkpOwogCiAJLyogUmV0dXJuIHRoZSBuZXcgYmxvY2sgKi8KIApAQCAtMTAyOSwxMCArMTAwMSw5IEBACiAJCSgqcmV0dXJuX2dwZV9ibG9jaykgPSBncGVfYmxvY2s7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V2X2dwZV9pbml0aWFsaXplCkBAIC0xMDQ1LDIyICsxMDE2LDE4IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZXZfZ3BlX2luaXRpYWxpemUgKAotCXZvaWQpCithY3BpX3N0YXR1cyBhY3BpX2V2X2dwZV9pbml0aW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ICAgICAgICAgICAgICAgICAgKmNvbnRleHQpOworc3RhdGljIHZvaWQgQUNQSV9TWVNURU1fWEZBQ0UgYWNwaV9ldl9ub3RpZnlfZGlzcGF0Y2godm9pZCAqY29udGV4dCk7CiAKLXN0YXRpYyB2b2lkIEFDUElfU1lTVEVNX1hGQUNFCi1hY3BpX2V2X2dsb2JhbF9sb2NrX3RocmVhZCAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCk7CitzdGF0aWMgdm9pZCBBQ1BJX1NZU1RFTV9YRkFDRSBhY3BpX2V2X2dsb2JhbF9sb2NrX3RocmVhZCh2b2lkICpjb250ZXh0KTsKIAotc3RhdGljIHUzMgotYWNwaV9ldl9nbG9iYWxfbG9ja19oYW5kbGVyICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0KTsKLQorc3RhdGljIHUzMiBhY3BpX2V2X2dsb2JhbF9sb2NrX2hhbmRsZXIodm9pZCAqY29udGV4dCk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtOTMsOSArODQsNyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXU4Ci1hY3BpX2V2X2lzX25vdGlmeV9vYmplY3QgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUpCit1OCBhY3BpX2V2X2lzX25vdGlmeV9vYmplY3Qoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUpCiB7CiAJc3dpdGNoIChub2RlLT50eXBlKSB7CiAJY2FzZSBBQ1BJX1RZUEVfREVWSUNFOgpAQCAtMTEyLDcgKzEwMSw2IEBACiAJfQogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfcXVldWVfbm90aWZ5X3JlcXVlc3QKQEAgLTEyOCwxOCArMTE2LDE1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9xdWV1ZV9ub3RpZnlfcmVxdWVzdCAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeV92YWx1ZSkKK2FjcGlfZXZfcXVldWVfbm90aWZ5X3JlcXVlc3Qoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKiBub2RlLAorCQkJICAgICB1MzIgbm90aWZ5X3ZhbHVlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmhhbmRsZXJfb2JqID0gTlVMTDsKLQl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgICAgICAgICpub3RpZnlfaW5mbzsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmhhbmRsZXJfb2JqID0gTlVMTDsKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKm5vdGlmeV9pbmZvOworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX05BTUUgKCJldl9xdWV1ZV9ub3RpZnlf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CgoQUNQSV9EQl9JTkZPLAorCQkJCSAgIk5vIG5vdGlmeSBoYW5kbGVyIGZvciBOb3RpZnkoJTQuNHMsICVYKSBub2RlICVwXG4iLAorCQkJCSAgYWNwaV91dF9nZXRfbm9kZV9uYW1lKG5vZGUpLCBub3RpZnlfdmFsdWUsCisJCQkJICBub2RlKSk7CiAJfQogCiAJcmV0dXJuIChzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfbm90aWZ5X2Rpc3BhdGNoCkBAIC0yMzYsMTggKzIyNCwxNSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIEFDUElfU1lTVEVNX1hGQUNFCi1hY3BpX2V2X25vdGlmeV9kaXNwYXRjaCAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCkKK3N0YXRpYyB2b2lkIEFDUElfU1lTVEVNX1hGQUNFIGFjcGlfZXZfbm90aWZ5X2Rpc3BhdGNoKHZvaWQgKmNvbnRleHQpCiB7Ci0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqbm90aWZ5X2luZm8gPSAodW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICopIGNvbnRleHQ7Ci0JYWNwaV9ub3RpZnlfaGFuZGxlciAgICAgICAgICAgICBnbG9iYWxfaGFuZGxlciA9IE5VTEw7Ci0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZ2xvYmFsX2NvbnRleHQgPSBOVUxMOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmhhbmRsZXJfb2JqOworCXVuaW9uIGFjcGlfZ2VuZXJ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vdGlmeV9pbmZvLT5ub3RpZnkudmFsdWUsIGdsb2JhbF9jb250ZXh0KTsKIAl9CiAKIAkvKiBOb3cgaW52b2tlIHRoZSBwZXItZGV2aWNlIGhhbmRsZXIsIGlmIHByZXNlbnQgKi8KIAogCWhhbmRsZXJfb2JqID0gbm90aWZ5X2luZm8tPm5vdGlmeS5oYW5kbGVyX29iajsKIAlpZiAoaGFuZGxlcl9vYmopIHsKLQkJaGFuZGxlcl9vYmotPm5vdGlmeS5oYW5kbGVyIChub3RpZnlfaW5mby0+bm90aWZ5Lm5vZGUsCi0JCQlub3RpZnlfaW5mby0+bm90aWZ5LnZhbHVlLAotCQkJaGFuZGxlcl9vYmotPm5vdGlmeS5jb250ZXh0KTsKKwkJaGFuZGxlcl9vYmotPm5vdGlmeS5oYW5kbGVyKG5vdGlmeV9pbmZvLT5ub3RpZnkubm9kZSwKKwkJCQkJICAgIG5vdGlmeV9pbmZvLT5ub3RpZnkudmFsdWUsCisJCQkJCSAgICBoYW5kbGVyX29iai0+bm90aWZ5LmNvbnRleHQpOwogCX0KIAogCS8qIEFsbCBkb25lIHdpdGggdGhlIGluZm8gb2JqZWN0ICovCiAKLQlhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX3N0YXRlIChub3RpZnlfaW5mbyk7CisJYWNwaV91dF9kZWxldGVfZ2VuZXJpY19zdGF0ZShub3RpZnlfaW5mbyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9nbG9iYWxfbG9ja190aHJlYWQKQEAgLTMwNywyNyArMjkwLDI0IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgQUNQSV9TWVNURU1fWEZBQ0UK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ogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfZ2xvYmFsX2xvY2tfaGFuZGxlcgpAQCAtMzQyLDIwICszMjIsMTcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdTMyCi1hY3BpX2V2X2dsb2JhbF9sb2NrX2hhbmRsZXIgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCitzdGF0aWMgdTMyIGFjcGlfZXZfZ2xvYmFsX2xvY2tfaGFuZGxlcih2b2lkICpjb250ZXh0KQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNxdWlyZWQgPSBGQUxTRTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQorCXU4IGFjcXVpcmVkID0gRkFMU0U7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCiAJLyoKIAkgKiBBdHRlbXB0IHRvIGdldCB0aGUgbG9jawogCSAqIElmIHdlIGRvbid0IGdldCBpdCBub3csIGl0IHdpbGwgYmUgbWFya2VkIHBlbmRpbmcgYW5kIHdlIHdpbGwKIAkgKiB0YWtlIGFub3RoZXIgaW50ZXJydXB0IHdoZW4gaXQgYmVjb21lcyBmcmVlLgogCSAqLwotCUFDUElfQUNRVUlSRV9HTE9CQUxfTE9DSyAoYWNwaV9nYmxfY29tbW9uX2ZBQ1MuZ2xvYmFsX2xvY2ssIGFjcXVpcmVkKTsKKwlBQ1BJX0FDUVVJUkVfR0xPQkFMX0xPQ0soYWNwaV9nYmxfY29tbW9uX2ZBQ1MuZ2xvYmFsX2xvY2ssIGFjcXVpcmVkKTsKIAlpZiAoYWNxdWlyZ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UgYXR0ZW1wdApAQCAtNDExLDE0ICszODQsMTUgQEAKIAkgKiB3aXRoIGFuIGVycm9yLgogCSAqLwogCWlmIChzdGF0dXMgPT0gQUVfTk9fSEFSRFdBUkVfUkVTUE9OU0UpIHsKKwkJQUNQSV9SRVBPUlRfRVJST1IoKCJObyByZXNwb25zZSBmcm9tIEdsb2JhbCBMb2NrIGhhcmR3YXJlLCBkaXNhYmxpbmcgbG9ja1xuIikpOworCiAJCWFjcGlfZ2JsX2dsb2JhbF9sb2NrX3ByZXNlbnQgPSBGQUxTRTsKIAkJc3RhdHVzID0gQUVfT0s7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9hY3F1aXJlX2dsb2JhbF9sb2NrCkBAIC00MzEsMjIgKzQwNSwxOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZXZfYWNxdWlyZV9nbG9iYWxfbG9jayAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0KQorYWNwaV9zdGF0dXMgYWNwaV9ldl9hY3F1aXJlX2dsb2JhbF9sb2NrKHUxNiB0aW1lb3V0KQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3F1aXJlZCA9IEZBTFNFOworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOworCXU4IGFjcXVpcmVkID0gRkFMU0U7Ci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R19HTE9CQUxfTE9DS19SRUxFQVNFLAotCQkJCSAxLCBBQ1BJX01UWF9MT0NLKTsKKwkJc3RhdHVzID0gYWNwaV9zZXRfcmVnaXN0ZXIoQUNQSV9CSVRSRUdfR0xPQkFMX0xPQ0tfUkVMRUFTRSwKKwkJCQkJICAgMSwgQUNQSV9NVFhfTE9DSyk7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl90ZXJtaW5hdGUKQEAgLTU2MCwxNiArNTI0LDEyIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9ldl90ZXJtaW5hdGUgKAotCXZvaWQpCit2b2lkIGFjcGlfZXZfdGVybWluYXRlKHZvaWQpCiB7Ci0JYWNwaV9uYXRpdmVfdWludCAgICAgICAgICAgICAgICBpOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfbmF0aXZlX3VpbnQgaTsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJldl90ZXJtaW5hdGUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV2X3Rlcm1pbmF0ZSIpOwogCiAJaWYgKGFjcGlfZ2JsX2V2ZW50c19pbml0aWFsaXplZCkgewogCQkvKgpAQCAtNTgwLDM4ICs1NDAsMzkgQEAKIAkJLyogRGlzYWJsZSBhbGwgZml4ZWQgZXZlbnRzICovCiAKIAkJZm9yIChpID0gMDsgaSA8IEFDUElfT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BJX0FEUl9TUEFDRV9EQVRBX1RBQkxFCit9OwogCiAvKiBMb2NhbCBwcm90b3R5cGVzICovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9ldl9yZWdfcnVuICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpOworYWNwaV9ldl9yZWdfcnVuKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCXUzMiBsZXZlbCwgdm9pZCAqY29udGV4dCwgdm9pZCAqKnJldHVybl92YWx1ZSk7CiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9ldl9pbnN0YWxsX2hhbmRsZXIgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgb2JqX2hhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSk7Ci0KK2FjcGlfZXZfaW5zdGFsbF9oYW5kbGVyKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbGV2ZWwsIHZvaWQgKmNvbnRleHQsIHZvaWQgKipyZXR1cm5fdmFsdWUpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTg3LDE5ICs3OCwxNiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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bMV0pOwogCi1jbGVhbnVwOgotCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSAocGFyYW1zWzBdKTsKKyAgICAgIGNsZWFudXA6CisJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlKHBhcmFtc1swXSk7CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9hZGRyZXNzX3NwYWNlX2Rpc3BhdGNoCkBAIC0yOTEsNDAgKzI3MSwzOCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfYWRkcmVzc19zcGFjZV9kaXNwYXRjaCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmVnaW9uX29iaiwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICp2YWx1ZSkKK2FjcGlfZXZfYWRkcmVzc19zcGFjZV9kaXNwYXRjaCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpyZWdpb25fb2JqLAorCQkJICAgICAgIHUzMiBmdW5jdGlvbiwKKwkJCSAgICAgICBhY3BpX3BoeXNpY2FsX2FkZHJlc3MgYWRkcmVzcywKKwkJCSAgICAgICB1MzIgYml0X3dpZHRoLCB2b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0dXJuX1ZPSUQ7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9hdHRhY2hfcmVnaW9uCkBAIC01ODksMjAgKzU4NSwxOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfYXR0YWNoX3JlZ2lvbiAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqaGFuZGxlcl9vYmosCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmVnaW9uX29iaiwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfbnNfaXNfbG9ja2VkKQorYWNwaV9ldl9hdHRhY2hfcmVnaW9uKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmhhbmRsZXJfb2JqLAorCQkgICAgICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpyZWdpb25fb2JqLAorCQkgICAgICB1OCBhY3BpX25zX2lzX2xvY2tlZCkKIHsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJldl9hdHRhY2hfcmVnaW9uIik7CisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXZfYXR0YWNoX3JlZ2lvbiIpOwogCi0KLQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9PUFJFR0lPTiwKLQkJIkFkZGluZyBSZWdpb24gWyU0LjRzXSAlcCB0byBhZGRyZXNzIGhhbmRsZXIgJXAgWyVzXVxuIiwKLQkJYWNwaV91dF9nZXRfbm9kZV9uYW1lIChyZWdpb25fb2JqLT5yZWdpb24ubm9kZSksCi0JCXJlZ2lvbl9vYmosIGhhbmRsZX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KioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9pbnN0YWxsX2hhbmRsZXIKQEAgLTY0MCwyMyArNjM0LDE4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXZfaW5zdGFsbF9oYW5kbGVyICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpCithY3BpX2V2X2luc3RhbGxfaGFuZGxlcihhY3BpX2hhbmRsZSBvYmpfaGFuZGxlLAorCQkJdTMyIGxldmVsLCB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmhhbmRsZXJfb2JqOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm5leHRfaGFuZGxlcl9vYmo7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpoYW5kbGVyX29iajsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpuZXh0X2hhbmRsZXJfb2JqOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOwor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X2V2X3JlZ19ydW4sCi0JCQkgICZzcGFjZV9pZCwgTlVMTCk7CisJc3RhdHVzID0gYWNwaV9uc193YWxrX25hbWVzcGFjZShBQ1BJX1RZUEVfQU5ZLCBub2RlLCBBQ1BJX1VJTlQzMl9NQVgsCisJCQkJCUFDUElfTlNfV0FMS19VTkxPQ0ssIGFjcGlfZXZfcmVnX3J1biwKKwkJCQkJJnNwYWNlX2lkLCBOVUxMKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V2X3JlZ19ydW4KQEAgLTEwMzEsMjMgKzEwMTMsMTkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9ldl9yZWdfcnVuICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpCithY3BpX2V2X3JlZ19ydW4oYWNwaV9oYW5kbGUgb2JqX2hhbmRsZSwKKwkJdTMyIGxldmVsLCB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2R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CJldnJnbmluaSIpCi0KK0FDUElfTU9EVUxFX05BTUUoImV2cmduaW5pIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02NCwzNCArNjIsMzEgQEAKICAqIERFU0NSSVBUSU9OOiBTZXR1cCBhIHN5c3RlbV9tZW1vcnkgb3BlcmF0aW9uIHJlZ2lvbgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KIGFjcGlfc3RhdHVzCi1hY3BpX2V2X3N5c3RlbV9tZW1vcnlfcmVnaW9uX3NldHVwICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmVnaW9uX2NvbnRleHQpCithY3BpX2V2X3N5c3RlbV9tZW1vcnlfcmVnaW9uX3NldHVwKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkJCQkgICB1MzIgZnVuY3Rpb24sCisJCQkJICAgdm9pZCAqaGFuZGxlcl9jb250ZXh0LCB2b2lkICoqcmVnaW9uX2NvbnRleHQpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmVnaW9uX2Rlc2MgPSAodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKSBoYW5kbGU7Ci0Jc3RydWN0IGFjcGlfbWVtX3NwYWNlX2NvbnRleHQgICAqbG9jYWxfcmVnaW9uX2NvbnRleHQ7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqcmVnaW9uX2Rlc2MgPQorCSAg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YW5kIGFkZHJlc3MgZm9yIHVzZSBpbiB0aGUgaGFuZGxlciAqLwpAQCAtMTAwLDEwICs5NSw5IEBACiAJbG9jYWxfcmVnaW9uX2NvbnRleHQtPmFkZHJlc3MgPSByZWdpb25fZGVzYy0+cmVnaW9uLmFkZHJlc3M7CiAKIAkqcmVnaW9uX2NvbnRleHQgPSBsb2NhbF9yZWdpb25fY29udGV4dDsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfaW9fc3BhY2VfcmVnaW9uX3NldHVwCkBAIC0xMjAsMjYgKzExNCwyMSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfaW9fc3BhY2VfcmVnaW9uX3NldHVwICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmVnaW9uX2NvbnRleHQpCithY3BpX2V2X2lvX3NwYWNlX3JlZ2lvbl9zZXR1cChhY3BpX2hhbmRsZSBoYW5kbGUsCisJCQkgICAgICB1MzIgZnVuY3Rpb24sCisJCQkgICAgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKipyZWdpb25fY29udGV4dCkKIHsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZXZfaW9fc3BhY2VfcmVnaW9uX3NldHVwIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJldl9pb19zcGFjZV9yZWdpb25fc2V0dXAiKTsKIAogCWlmIChmdW5jdGlvbiA9PSBBQ1BJX1JFR0lPTl9ERUFDVElWQVRFKSB7CiAJCSpyZWdpb25fY29udGV4dCA9IE5VTEw7Ci0JfQotCWVsc2UgeworCX0gZWxzZSB7CiAJCSpyZWdpb25fY29udGV4dCA9IGhhbmRsZXJfY29udGV4dDsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfcGNpX2NvbmZpZ19yZWdpb25fc2V0dXAKQEAgLTE1OCwyNCArMTQ3LDIxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9wY2lfY29uZmlnX3JlZ2lvbl9zZXR1cCAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJlZ2lvbl9jb250ZXh0KQorYWNwaV9ldl9wY2lfY29uZmlnX3JlZ2lvbl9zZXR1cChhY3BpX2hhbmRsZSBoYW5kbGUsCisJCQkJdTMyIGZ1bmN0aW9uLAorCQkJCXZvaWQgKmhhbmR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iai0+cmVnaW9uLm5vZGUsICZwY2lfaWQpOwogCiAJKnJlZ2lvbl9jb250ZXh0ID0gcGNpX2lkOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9wY2lfYmFyX3JlZ2lvbl9zZXR1cApAQCAtMzMxLDE5ICszMjksMTUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V2X3BjaV9iYXJfcmVnaW9uX3NldHVwICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmVnaW9uX2NvbnRleHQpCithY3BpX2V2X3BjaV9iYXJfcmVnaW9uX3NldHVwKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkJCSAgICAgdTMyIGZ1bmN0aW9uLAorCQkJICAgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKipyZWdpb25fY29udGV4dCkKIHsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZXZfcGNpX2Jhcl9yZWdpb25fc2V0dXAiKTsKKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJldl9wY2lfYmFyX3JlZ2lvbl9zZXR1cCIpOwogCi0KLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfY21vc19yZWdpb25fc2V0dXAKQEAgLTM2MiwxOSArMzU2LDE1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9jbW9zX3JlZ2lvbl9zZXR1cCAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJlZ2lvbl9jb250ZXh0KQorYWNwaV9ldl9jbW9zX3JlZ2lvbl9zZXR1cChhY3BpX2hhbmRsZSBoYW5kbGUsCisJCQkgIHUzMiBmdW5jdGlvbiwKKwkJCSAgdm9pZCAqaGFuZGxlcl9jb250ZXh0LCB2b2lkICoqcmVnaW9uX2NvbnRleHQpCiB7Ci0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImV2X2Ntb3NfcmVnaW9uX3NldHVwIik7CisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXZfY21vc19yZWdpb25fc2V0dXAiKTsKIAotCi0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V2X2RlZmF1bHRfcmVnaW9uX3NldHVwCkBAIC0zOTEsMjYgKzM4MSwyMSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfZGVmYXVsdF9yZWdpb25fc2V0dXAgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZWdpb25fY29udGV4dCkKK2FjcGlfZXZfZGVmYXVsdF9yZWdpb25fc2V0dXAoYWNwaV9oYW5kbGUgaGFuZGxlLAorCQkJICAgICB1MzIgZnVuY3Rpb24sCisJCQkgICAgIHZvaWQgKmhhbmRsZXJfY29udGV4dCwgdm9pZCAqKnJlZ2lvbl9jb250ZXh0KQogewotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJldl9kZWZhdWx0X3JlZ2lvbl9zZXR1cCIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXZfZGVmYXVsdF9yZWdpb25fc2V0dXAiKTsKIAogCWlmIChmdW5jdGlvbiA9PSBBQ1BJX1JFR0lPTl9ERUFDVElWQVRFKSB7CiAJCSpyZWdpb25fY29udGV4dCA9IE5VTEw7Ci0JfQotCWVsc2UgeworCX0gZWxzZSB7CiAJCSpyZWdpb25fY29udGV4dCA9IGhhbmRsZXJfY29udGV4dDsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfaW5pdGlhbGl6ZV9yZWdpb24KQEAgLTQzNCwzNyArNDE5LDM0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9pbml0aWFsaXplX3JlZ2lvbiAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmVnaW9uX29iaiwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfbnNfbG9ja2VkKQorYWNwaV9ldl9pbml0aWFsaXplX3JlZ2lvbih1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpyZWdpb25fb2JqLAorCQkJICB1OCBhY3BpX25zX2xvY2tlZCkKIHsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpoYW5kbGVyX29iajsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYzsKLQlhY3BpX2Fkcl9zcGFjZV90eXBlICAgICAgICAgICAgIHNwYWNlX2lkOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbWV0aG9kX25vZGU7Ci0JYWNwaV9uYW1lICAgICAgICAgICAgICAgICAgICAgICAqcmVnX25hbWVfcHRyID0gKGFjcGlfbmFtZSAqKSBNRVRIT0RfTkFNRV9fUkVHOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnJlZ2lvbl9vYmoyOworCXVuaW9uIGFjc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GljIHUzMiBBQ1BJX1NZU1RFTV9YRkFDRSBhY3BpX2V2X3NjaV94cnVwdF9oYW5kbGVyKHZvaWQgKmNvbnRleHQpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTY5LDE3ICs2NCwxMyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB1MzIgQUNQSV9TWVNURU1fWEZBQ0UKLWFjcGlfZXZfc2NpX3hydXB0X2hhbmRsZXIgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCitzdGF0aWMgdTMyIEFDUElfU1lTVEVNX1hGQUNFIGFjcGlfZXZfc2NpX3hydXB0X2hhbmRsZXIodm9pZCAqY29udGV4dCkKIHsKLQlzdHJ1Y3QgYWNwaV9ncGVfeHJ1cHRfaW5mbyAgICAgICpncGVfeHJ1cHRfbGlzdCA9IGNvbnRleHQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHRfaGFuZGxlZCA9IEFDUElfSU5URVJSVVBUX05PVF9IQU5ETEVEOwotCisJc3RydWN0IGFjcGlfZ3BlX3hydXB0X2luZm8gKmdwZV94cnVwdF9saXN0ID0gY29udGV4dDsKKwl1MzIgaW50ZXJydXB0X2hhbmRsZWQgPSBBQ1BJX0lOVEVSUlVQVF9OT1RfSEFORExFRDsKIAogCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV2X3NjaV94cnVwdF9oYW5kbGVyIik7CiAKLQogCS8qCiAJICogV2UgYXJlIGd1YXJhbnRlZWQgYnkgdGhlIEFDUEkgQ0EgaW5pdGlhbGl6YXRpb24vc2h1dGRvd24gY29kZSB0aGF0CiAJICogaWYgdGhpcyBpbnRlcnJ1cHQgaGFuZGxlciBpcyBpbnN0YWxsZWQsIEFDUEkgaXMgZW5hYmxlZC4KQEAgLTg5LDE4ICs4MCwxNyBAQAogCSAqIEZpeGVkIEV2ZW50czoKIAkgKiBDaGVjayBmb3IgYW5kIGRpc3BhdGNoIGFueSBGaXhlZCBFdmVudHMgdGhhdCBoYXZlIG9jY3VycmVkCiAJICovCi0JaW50ZXJydXB0X2hhbmRsZWQgfD0gYWNwaV9ldl9maXhlZF9ldmVudF9kZXRlY3QgKCk7CisJaW50ZXJydXB0X2hhbmRsZWQgfD0gYWNwaV9ldl9maXhlZF9ldmVudF9kZXRlY3QoKTsKIAogCS8qCiAJICogR2VuZXJhbCBQdXJwb3NlIEV2ZW50czoKIAkgKiBDaGVjayBmb3IgYW5kIGRpc3BhdGNoIGFueSBHUEVzIHRoYXQgaGF2ZSBvY2N1cnJlZAogCSAqLwotCWludGVycnVwdF9oYW5kbGVkIHw9IGFjcGlfZXZfZ3BlX2RldGVjdCAoZ3BlX3hydXB0X2xpc3QpOworCWludGVycnVwdF9oYW5kbGVkIHw9IGFjcGlfZXZfZ3BlX2RldGVjdChncGVfeHJ1cHRfbGlzdCk7CiAKLQlyZXR1cm5fVkFMVUUgKGludGVycnVwdF9oYW5kbGVkKTsKKwlyZXR1cm5fVkFMVUUoaW50ZXJydXB0X2hhbmRsZWQpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXZfZ3BlX3hydXB0X2hhbmRsZXIKQEAgLTExMywxNyArMTAzLDEzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTMyIEFDUElfU1lTVEVNX1hGQUNFCi1hY3BpX2V2X2dwZV94cnVwdF9oYW5kbGVyICgKLQl2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UoaW50ZXJydXB0X2hhbmRsZWQpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9ldl9pbnN0YWxsX3NjaV9oYW5kbGVyCkBAIC0xNTEsMjIgKzEzNiwxOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXUzMgotYWNwaV9ldl9pbnN0YWxsX3NjaV9oYW5kbGVyICgKLQl2b2lkKQordTMyIGFjcGlfZXZfaW5zdGFsbF9zY2lfaGFuZGxlcih2b2lkKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7CisJdTMyIHN0YXR1cyA9IEFFX09LOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXZfaW5zdGFsbF9zY2lfaGFuZGxlciIpOwogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImV2X2luc3RhbGxfc2NpX2hhbmRsZXIiKTsKLQotCi0Jc3RhdHVzID0gYWNwaV9vc19pbnN0YWxsX2ludGVycnVwdF9oYW5kbGVyICgodTMyKSBhY3BpX2dibF9GQURULT5zY2lfaW50LAotCQkJICAgYWNwaV9ldl9zY2lfeHJ1cHRfaGFuZGxlciwgYWNwaV9nYmxfZ3BlX3hydXB0X2xpc3RfaGVhZCk7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXN0YXR1cyA9IGFjcGlfb3NfaW5zdGFsbF9pbnRlcnJ1cHRfaGFuZGxlcigodTMyKSBhY3BpX2dibF9GQURULT5zY2lfaW50LAorCQkJCQkJICAgYWNwaV9ldl9zY2lfeHJ1cHRfaGFuZGxlciwKKwkJCQkJCSAgIGFjcGlfZ2JsX2dwZV94cnVwdF9saXN0X2h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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTExNiwyNiArMTA5LDIyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9pbnN0YWxsX2ZpeGVkX2V2ZW50X2hhbmRsZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQsCi0JYWNwaV9ldmVudF9oYW5kbGVyICAgICAgICAgICAgICBoYW5kbGVyLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCithY3BpX2luc3RhbGxfZml4ZWRfZXZlbnRfaGFuZGxlcih1MzIgZXZlbnQsCisJCQkJIGFjcGlfZXZlbnRfaGFuZGxlciBoYW5kbGVyLCB2b2lkICpjb250ZXh0KQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfaW5zdGFsbF9maXhlZF9ldmVudF9oYW5kbGVyIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJhY3BpX2luc3RhbGxfZml4ZWRfZXZlbnRfaGFuZGxlciIpOwogCiAJLyogUGFyYW1ldGVyIHZhbGlkYXRpb24gKi8KIAogCWlmIChldmVudCA+IEFDUElfRVZFTlRfTUFYKSB7Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfQkFEX1BBUkFNRVRFUik7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9CQURfUEFSQU1FVEVSKTsKIAl9CiAKLQlzdGF0dXMgPSBhY3BpX3V0X2FjcXVpcmVfbXV0ZXggKEFDUElfTVRYX0VWRU5UUyk7Ci0JaWYgKEFDUElfRkFJTFVSRSA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1BJX1NUQVRVUyhzdGF0dXMpOwogfQotRVhQT1JUX1NZTUJPTChhY3BpX3JlbW92ZV9maXhlZF9ldmVudF9oYW5kbGVyKTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX3JlbW92ZV9maXhlZF9ldmVudF9oYW5kbGVyKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yNTEsMzcgKzIzNiwzMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfaW5zdGFsbF9ub3RpZnlfaGFuZGxlciAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBkZXZpY2UsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVyX3R5cGUsCi0JYWNwaV9ub3RpZnlfaGFuZGxlciAgICAgICAgICAgICBoYW5kbGVyLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCithY3BpX2luc3RhbGxfbm90aWZ5X2hhbmRsZXIoYWNwaV9oYW5kbGUgZGV2aWNlLAorCQkJICAgIHUzMiBoYW5kbGVyX3R5cGUsCisJCQkgICAgYWNwaV9ub3RpZnlfaGFuZGxlciBoYW5kbGVyLCB2b2lkICpjb250ZXh0KQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm5vdGlmeV9vYmo7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2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hbmRfZXhpdDoKLQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9OQU1FU1BBQ0UpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKyAgICAgIHVubG9ja19hbmRfZXhpdDoKKwkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfTkFNRVNQQUNFKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV9pbnN0YWxsX25vdGlmeV9oYW5kbGVyKTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX2luc3RhbGxfbm90aWZ5X2hhbmRsZXIpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTQyMCwzNiArNDAwLDMxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yZW1vdmVfbm90aWZ5X2hhbmRsZXIgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlcl90eXBlLAotCWFjcGlfbm90aWZ5X2hhbmRsZXIgICAgICAgICAgICAgaGFuZGxlcikKK2FjcGlfcmVtb3ZlX25vdGlmeV9oYW5kbGVyKGFjcGlfaGFuZGxlIGRldmljZSwKKwkJCSAgIHUzMiBoYW5kbGVyX3R5cGUsIGFjcGlfbm90aWZ5X2hhbmRsZXIgaGFuZGxlcikKIHsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpub3RpZnlfb2JqOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgK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aWZ5ID0gTlVMTDsKLQkJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSAobm90aWZ5X29iaik7CisJCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2Uobm90aWZ5X29iaik7CiAJCX0KIAl9CiAKLQotdW5sb2NrX2FuZF9leGl0OgotCSh2b2lkKSBhY3BpX3V0X3JlbGVhc2VfbXV0ZXggKEFDUElfTVRYX05BTUVTUEFDRSk7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworICAgICAgdW5sb2NrX2FuZF9leGl0OgorCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9OQU1FU1BBQ0UpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQotRVhQT1JUX1NZTUJPTChhY3BpX3JlbW92ZV9ub3RpZnlfaGFuZGxlcik7CiAKK0VYUE9SVF9TWU1CT0woYWNwaV9yZW1vdmVfbm90aWZ5X2hhbmRsZXIpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTU4MSwzNSArNTU1LDMxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9pbnN0YWxsX2dwZV9oYW5kbGVyICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGdwZV9kZXZpY2UsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncGVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSwKLQlhY3BpX2V2ZW50X2hhbmRsZXIgICAgICAgICAgICAgIGFkZHJlc3MsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dC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IHVubG9ja19hbmRfZXhpdDoKKwkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfRVZFTlRTKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV9yZW1vdmVfZ3BlX2hhbmRsZXIpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfcmVtb3ZlX2dwZV9oYW5kbGVyKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03NzksMzUgKzc0NiwzMSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2FjcXVpcmVfZ2xvYmFsX2xvY2sgKAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGUpCithY3BpX3N0YXR1cyBhY3BpX2FjcXVpcmVfZ2xvYmFsX2xvY2sodTE2IHRpbWVvdXQsIHUzMiAqIGhhbmRsZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQorCWFjcGlfc3RhdHVzIHN0YXR1czsKIAogCWlmICghaGFuZGxlKSB7CiAJCXJldHVybiAoQUVfQkFEX1BBUkFNRVRFUik7CiAJfQogCi0Jc3RhdHVzID0gYWNwaV9leF9lbnRlcl9pbnRlcnByZXRlciAoKTsKLQlpZiAoQUNQSV9GQUlMVVJFIChzdGF0dXMpKSB7CisJc3RhdHVzID0gYWNwaV9leF9lbnRlcl9pbnRlcnByZXRlcigpOworCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgewogCQlyZXR1cm4gKHN0YX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JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfTk9fSEFSRFdBUkVfUkVTUE9OU0UpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0VSUk9SLAorCQkJCSAgIkNvdWxkIG5vdCBlbmFibGUgJXMgZXZlbnRcbiIsCisJCQkJICBhY3BpX3V0X2dldF9ldmVudF9uYW1lKGV2ZW50KSkpOworCQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfTk9fSEFSRFdBUkVfUkVTUE9OU0UpOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV9lbmFibGVfZXZlbnQpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfZW5hYmxlX2V2ZW50KTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yMjMsNDAgKzIxMCwzNCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX3NldF9ncGVfdHlwZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlciwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUpCithY3BpX3N0YXR1cyBhY3BpX3NldF9ncGVfdHlwZShhY3BpX2hhbmRsZSBncGVfZGV2aWNlLCB1MzIgZ3BlX251bWJlciwgdTggdHlwZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXN0cnVjdCB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hbmRfZXhpdDoKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisgICAgICB1bmxvY2tfYW5kX2V4aXQ6CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfc2V0X2dwZV90eXBlKTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX3NldF9ncGVfdHlwZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjczLDMxICsyNTQsMjUgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9lbmFibGVfZ3BlICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGdwZV9kZXZpY2UsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncGVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MpCithY3BpX3N0YXR1cyBhY3BpX2VuYWJsZV9ncGUoYWNwaV9oYW5kbGUgZ3BlX2RldmljZSwgdTMyIGdwZV9udW1iZXIsIHUzMiBmbGFncykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXN0cnVjdCBhY3BpX2dwZV9ldmVudF9pbmZvICAgICAgKmdwZV9ldmVudF9pbmZvOworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOworCXN0cnVjdCBhY3BpX2dwZV9ldmVudF9pbmZvICpncGVfZXZlbnRfaW5mbzsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfZW5hYmxlX2dwZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUk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IAotdW5sb2NrX2FuZF9leGl0OgorICAgICAgdW5sb2NrX2FuZF9leGl0OgogCWlmIChmbGFncyAmIEFDUElfTk9UX0lTUikgewotCQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9FVkVOVFMpOworCQkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfRVZFTlRTKTsKIAl9Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQotRVhQT1JUX1NZTUJPTChhY3BpX2VuYWJsZV9ncGUpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfZW5hYmxlX2dwZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMzMxLDQ2ICszMDYsMzkgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9kaXNhYmxlX2dwZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9zdGF0dXMgYWNwaV9kaXNhYmxlX2dwZShhY3BpX2hhbmRsZSBncGVfZGV2aWNlLCB1MzIgZ3BlX251bWJlciwgdTMyIGZsYWdzKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7Ci0Jc3RydWN0IGFjcGlfZ3BlX2V2ZW50X2luZm8gICAgICAqZ3BlX2V2ZW50X2luZm87CisJYWNwaV9zd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GVfZ3BlIChncGVfZXZlbnRfaW5mbyk7CisJc3RhdHVzID0gYWNwaV9ldl9kaXNhYmxlX2dwZShncGVfZXZlbnRfaW5mbyk7CiAKLXVubG9ja19hbmRfZXhpdDoKKyAgICAgIHVubG9ja19hbmRfZXhpdDoKIAlpZiAoZmxhZ3MgJiBBQ1BJX05PVF9JU1IpIHsKLQkJKHZvaWQpIGFjcGlfdXRfcmVsZWFzZV9tdXRleCAoQUNQSV9NVFhfRVZFTlRTKTsKKwkJKHZvaWQpYWNwaV91dF9yZWxlYXNlX211dGV4KEFDUElfTVRYX0VWRU5UUyk7CiAJfQotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2Rpc2FibGVfZXZlbnQKQEAgLTM4NCw1MCArMzUyLDQ4IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZGlzYWJsZV9ldmVudCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9zdGF0dXMgYWNwaV9kaXNhYmxlX2V2ZW50KHUzMiBldmVudCwgdTMyIGZsYWdzKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKKwl1MzIgdmFsdWU7C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mbyk7CiAKLXVubG9ja19hbmRfZXhpdDoKKyAgICAgIHVubG9ja19hbmRfZXhpdDoKIAlpZiAoZmxhZ3MgJiBBQ1BJX05PVF9JU1IpIHsKLQkJKHZvaWQpIGFjcGlfdXRfcmVsZWFzZV9tdXRleCAoQUNQSV9NVFhfRVZFTlRTKTsKKwkJKHZvaWQpYWNwaV91dF9yZWxlYXNlX211dGV4KEFDUElfTVRYX0VWRU5UUyk7CiAJfQotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAjaWZkZWYgQUNQSV9GVVRVUkVfVVNBR0UKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNTM4LDM2ICs0OTQsMzEgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9nZXRfZXZlbnRfc3RhdHVzICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LAotCWFjcGlfZXZlbnRfc3RhdHVzICAgICAgICAgICAgICAgKmV2ZW50X3N0YXR1cykKK2FjcGlfc3RhdHVzIGFjcGlfZ2V0X2V2ZW50X3N0YXR1cyh1MzIgZXZlbnQsIGFjcGlfZXZlbnRfc3RhdHVzICogZXZlbnRfc3RhdHVzKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7CisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJhY3BpX2dldF9ldmVudF9zdGF0dXMiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImFjcG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NQSV9NVFhfRVZFTlRTKTsKIAl9Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQotI2VuZGlmICAvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCi0KKyNlbmRpZgkJCQkvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjM1LDcgKzU4MCw3IEBACiAgKiBQQVJBTUVURVJTOiAgZ3BlX2RldmljZSAgICAgICAgICAtIEhhbmRsZSB0byB0aGUgcGFyZW50IEdQRSBCbG9jayBEZXZpY2UKICAqICAgICAgICAgICAgICBncGVfYmxvY2tfYWRkcmVzcyAgIC0gQWRkcmVzcyBhbmQgc3BhY2VfaUQKICAqICAgICAgICAgICAgICByZWdpc3Rlcl9jb3VudCAgICAgIC0gTnVtYmVyIG9mIEdQRSByZWdpc3RlciBwYWlycyBpbiB0aGUgYmxvY2sKLSAqICAgICAgICAgICAgICBpbnRlcnJ1cHRfbGV2ZWwgICAgIC0gSC9XIGludGVycnVwdCBmb3IgdGhlIGJsb2NrCisgKiAgICAgICAgICAgICAgaW50ZXJydXB0X251bWJlciAgICAtIEgvVyBpbnRlcnJ1cHQgZm9yIHRoZSBibG9jawogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCkBAIC02NDQsMzMgKzU4OSwyNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfaW5zdGFsbF9ncGVfYmxvY2sgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZ3BlX2RldmljZSwKLQlzdHJ1Y3QgYWNwaV9nZW5lcmlj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SBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfRVhFQ1VURVIKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoImV4Y29uZmlnIikKK0FDUElfTU9EVUxFX05BTUUoImV4Y29uZmlnIikKIAogLyogTG9jYWwgcHJvdG90eXBlcyAqLwotCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXhfYWRkX3RhYmxlICgKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICp0YWJsZSwKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpwYXJlbnRfbm9kZSwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqZGRiX2hhbmRsZSk7Ci0KK2FjcGlfZXhfYWRkX3RhYmxlKHN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAqdGFibGUsCisJCSAgc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKnBhcmVudF9ub2RlLAorCQkgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipkZGJfaGFuZGxlKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03OSw2NCArNzQsNjcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9leF9hZGRfdGFibGUgKAotCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAgICAgICAgKnRhYmxlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKnBhcmVudF9ub2RlLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipkZGJfaGFuZGxlKQorYWNwaV9leF9hZGRfdGFibGUoc3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IHRhYmxlIG9uIGVycm9yICovCisKKwkJKHZvaWQpYWNwaV90Yl91bmluc3RhbGxfdGFibGUodGFibGVfaW5mby5pbnN0YWxsZWRfZGVzYyk7CisJCWdvdG8gY2xlYW51cDsKKwl9CisKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOworCisgICAgICBjbGVhbnVwOgorCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShvYmpfZGVzYyk7CisJKmRkYl9oYW5kbGUgPSBOVUxMOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfbG9hZF90YWJsZV9vcApAQCAtMTUxLDU2ICsxNDksNTMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2xvYWRfdGFibGVfb3AgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKnJldHVybl9kZXNjKQorYWNwaV9leF9sb2FkX3RhYmxlX29wKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUsCisJCSAgICAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipyZXR1cm5fZGVzYykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqb3BlcmFuZCA9ICZ3YWxrX3N0YXRlLT5vcGVyYW5kc1swXTsKLQlzdHJ1Y3QgYWNwaV90Y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ICAgICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfbGVuZ3RoKTsKLQorYWNwaV9leF9jb252ZXJ0X3RvX2FzY2lpKGFjcGlfaW50ZWdlciBpbnRlZ2VyLAorCQkJIHUxNiBiYXNlLCB1OCAqIHN0cmluZywgdTggbWF4X2xlbmd0aCk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzYsMjkgKzY5LDI1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9jb252ZXJ0X3RvX2ludGVnZXIgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipyZXN1bHRfZGVzYywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9leF9jb252ZXJ0X3RvX2ludGVnZXIodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCQkgICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICoqcmVzdWx0X2Rlc2MsIHUzMiBmbGFncykKIHsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpyZXR1cm5fZGVzYzsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwb2ludGVyOwotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgcmVzdWx0OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50Ow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KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2NvbnZlcnRfdG9fYnVmZmVyCkBAIC0yMDcsMjUgKzE5MywyMSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfY29udmVydF90b19idWZmZXIgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipyZXN1bHRfZGVzYykKK2FjcGlfZXhfY29udmVydF90b19idWZmZXIodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCQkgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipyZXN1bHRfZGVzYykKIHsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpyZXR1cm5fZGVzYzsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZXdfYnVmOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnJldHVybl9kZXNjOworCXU4ICpuZXdfYnVmOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIoImV4X2NvbnZlcnRfdG9fYnVmZmVyIiwgb2JqX2Rlc2MpOwogCi0JQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIgKCJleF9jb252ZXJ0X3RvX2J1ZmZlciIsIG9ial9kZXNjKTsKLQotCi0Jc3dpdGNoIChBQ1BJX0dFVF9PQkpFQ1RfVFlQRSAob2JqX2Rlc2MpKSB7CisJc3dpdGNoIChBQ1BJX0dFVF9PQkpFQ1RfVFlQRShvYmpfZGVzYykpI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QogCWRlZmF1bHQ6Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfVFlQRSk7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9UWVBFKTsKIAl9CiAKIAkvKiBNYXJrIGJ1ZmZlciBpbml0aWFsaXplZCAqLwogCiAJcmV0dXJuX2Rlc2MtPmNvbW1vbi5mbGFncyB8PSBBT1BPQkpfREFUQV9WQUxJRDsKIAkqcmVzdWx0X2Rlc2MgPSByZXR1cm5fZGVzYzsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfY29udmVydF90b19hc2NpaQpAQCAtMzAwLDI0ICsyODEsMTkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB1MzIKLWFjcGlfZXhfY29udmVydF90b19hc2NpaSAoCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyLAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFzZSwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhX3dpZHRoKQorYWNwaV9leF9jb252ZXJ0X3RvX2FzY2lpKGFjcGlfaW50ZWdlciBpbnRlZ2VyLAorCQkJIHUxNiBiYXNlLCB1OCAqIHN0cmluZywgdTggZGF0YV93aWR0aCkKIHsKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGRpZ2l0OwotCWFjcGlfbmF0aXZlX3VpbnQg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V0dXJuIHRoZSBsZW5ndGgKIAkgKi8KIAlpZiAoIWspIHsKLQkJc3RyaW5nIFswXSA9IEFDUElfQVNDSUlfWkVSTzsKKwkJc3RyaW5nWzBdID0gQUNQSV9BU0NJSV9aRVJPOwogCQlrID0gMTsKIAl9CiAKLQlzdHJpbmcgW2tdID0gMDsKKwlzdHJpbmdba10gPSAwOwogCXJldHVybiAoKHUzMikgayk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9jb252ZXJ0X3RvX3N0cmluZwpAQCAtNDEyLDMwICszOTAsMjUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2NvbnZlcnRfdG9fc3RyaW5nICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYywKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqcmVzdWx0X2Rlc2MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlKQorYWNwaV9leF9jb252ZXJ0X3RvX3N0cmluZyh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICogb2JqX2Rlc2MsCisJCQkgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKiogcmVzdWx0X2Rlc2MsIHUzMiB0eXBlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnJldHVybl9kZXNjOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5ld19idWY7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotCXUzMiAgICAgICAgICAgICAgICAgICAgIC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2V0X25vZGUpLCB0YXJnZXRfbm9kZS0+dHlwZSk7CisJCXN0YXR1cyA9IGFjcGlfbnNfYXR0YWNoX29iamVjdChhbGlhc19ub2RlLAorCQkJCQkgICAgICAgYWNwaV9uc19nZXRfYXR0YWNoZWRfb2JqZWN0CisJCQkJCSAgICAgICAodGFyZ2V0X25vZGUpLAorCQkJCQkgICAgICAgdGFyZ2V0X25vZGUtPnR5cGUpOwogCQlicmVhazsKIAl9CiAKIAkvKiBTaW5jZSBib3RoIG9wZXJhbmRzIGFyZSBOb2Rlcywgd2UgZG9uJ3QgbmVlZCB0byBkZWxldGUgdGhlbSAqLwogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfY3JlYXRlX2V2ZW50CkBAIC0xNjIsMTggKzE1OSwxNCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2V4X2NyZWF0ZV9ldmVudCAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfc3RhdHVzIGFjcGlfZXhfY3JlYXRlX2V2ZW50KHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXVuaW9uIGFjcGlf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HdpbGwgY2F1c2UgZGVsZXRpb24KIAkgKiBvZiBib3RoIG9iamVjdCBhbmQgc2VtYXBob3JlIGlmIHByZXNlbnQuKQogCSAqLwotCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZSAob2JqX2Rlc2MpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2Uob2JqX2Rlc2MpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfY3JlYXRlX3JlZ2lvbgpAQCAtMjgyLDIwICsyNzEsMTYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2NyZWF0ZV9yZWdpb24gKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmFtbF9zdGFydCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFtbF9sZW5ndGgsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb25fc3BhY2UsCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfZXhfY3JlYXRlX3JlZ2lvbih1OCAqIGFtbF9zdGFydCwKKwkJICAgICAgdTMyIGFtbF9sZW5ndGgsCisJCSAgICAgIHU4IHJlZ2lvbl9zcGFjZSwgc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl1bmlvbi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W92ZV9yZWZlcmVuY2UgKG9ial9kZXNjKTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlKG9ial9kZXNjKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2NyZWF0ZV90YWJsZV9yZWdpb24KQEAgLTM3MSwyMCArMzU1LDE2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZXhfY3JlYXRlX3RhYmxlX3JlZ2lvbiAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfc3RhdHVzIGFjcGlfZXhfY3JlYXRlX3RhYmxlX3JlZ2lvbihzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipvcGVyYW5kID0gJndhbGtfc3RhdGUtPm9wZXJhbmRzWzBdOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAqdGFibGU7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmVnaW9uX29iajI7CisJYWNwaV9zdGF0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lvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywgdTMyIGxldmVsLCB1MzIgaW5kZXgpOworI2VuZGlmCQkJCS8qIEFDUElfRlVUVVJFX1VTQUdFICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtOTQsMTQzICs4MywxNDAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX2V4X2R1bXBfb3BlcmFuZCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aCkKK3ZvaWQgYWNwaV9leF9kdW1wX29wZXJhbmQodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsIHUzMiBkZXB0aCkKIHsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OworCXUzMiBsZW5ndGg7CisJdTMyIGluZGV4OwogCisJQUNQSV9GVU5DVElPTl9OQU1FKCJleF9kdW1wX29wZXJhbmQiKQogCi0JQUNQSV9GVU5DVElPTl9OQU1FICgiZXhfZHVtcF9vcGVyYW5kIikKLQotCi0JaWYgKCEoKEFDUElfTFZfRVhFQyAmIGFjcGlfZGJnX2xldmVsKSAmJiAoX0NPTVBPTkVOVCAmIGFjcGlfZGJnX2xheWVyKSkpIHsKKwkgICAgaWYgKCEKKwkJKChBQ1BJX0xWX0VYRUMgJiBhY3BpX2RiZ19sZXZlbCkKKwkJICYmIChfQ09NUE9ORU5UICYgYWNwaV9kYmdfbGF5ZXIpKSkgewogCQlyZXR1cm47CiA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F9kdW1wX29wZXJhbmRzCkBAIC00MjksMjAgKzQwMywxNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV9leF9kdW1wX29wZXJhbmRzICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqb3BlcmFuZHMsCi0JYWNwaV9pbnRlcnByZXRlcl9tb2RlICAgICAgICAgICBpbnRlcnByZXRlcl9tb2RlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmlkZW50LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtX2xldmVscywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpub3RlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZV9uYW1lLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIpCithY3BpX2V4X2R1bXBfb3BlcmFuZHModW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKm9wZXJhbmRzLAorCQkgICAgICBhY3BpX2ludGVycHJldGVyX21vZGUgaW50ZXJwcmV0ZXJfbW9kZSwKKwkJICAgICAgY2hhciAqaWRlbnQsCisJCSAgICAgIHUzMiBudW1fbGV2ZWxzLAorCQkgICAgICBjaGFyICpub3RlLCBjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyKQogewotCWFjcGlfbmF0aXZlX3VpbnQgICAgICAgICAgICAgICAgaTsKKwlhY3BpX25hdGl2ZV91aW50IGk7CiAKLQotCUFDUElfRlVOQ1RJT05fTkFNRSAoImV4X2R1bXBfb3BlcmFuZHMiKTsKLQorCUFDUElfRlVOQ1RJT05fTkFNRSgiZXhfZHVtcF9vcGVyYW5kcyIpOwogCiAJaWYgKCFpZGVudCkgewogCQlpZGVudCA9ICI/IjsKQEAgL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sKIH0KIAotCiAjaWZkZWYgQUNQSV9GVVRVUkVfVVNBR0UKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNDg3LDQ0ICs0NTUsMzEgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZAotYWNwaV9leF9vdXRfc3RyaW5nICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0aXRsZSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp2YWx1ZSkKK3N0YXRpYyB2b2lkIGFjcGlfZXhfb3V0X3N0cmluZyhjaGFyICp0aXRsZSwgY2hhciAqdmFsdWUpCiB7Ci0JYWNwaV9vc19wcmludGYgKCIlMjBzIDogJXNcbiIsIHRpdGxlLCB2YWx1ZSk7CisJYWNwaV9vc19wcmludGYoIiUyMHMgOiAlc1xuIiwgdGl0bGUsIHZhbHVlKTsKIH0KIAotc3RhdGljIHZvaWQKLWFjcGlfZXhfb3V0X3BvaW50ZXIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRpdGxlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnZhbHVlKQorc3RhdGljIHZvaWQgYWNwaV9leF9vdXRfcG9pbnRlcihjaGFyICp0aXRsZSwgdm9pZCAqdmFsdWUpCiB7Ci0JYWNwaV9vc19wcmludGYgKCIlMjBzIDogJXBcbiIsIHRpdGxlLCB2YWx1ZSk7CisJYWNwaV9vc19wcmludGYoIiUyMHMgOiAlcFxuIiwgdGl0bGUsIHZhbHVlKTsKIH0KIAotc3RhdGljIHZvaWQKLWFjcGlfZXhfb3V0X2ludGVnZXIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRpdGx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TM2LDM4ICs0OTEsMTYxIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9leF9kdW1wX25vZGUgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFncykKK3ZvaWQgYWNwaV9leF9kdW1wX25vZGUoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsIHUzMiBmbGFncykKIHsKIAotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CiAKIAlpZiAoIWZsYWdzKSB7Ci0JCWlmICghKChBQ1BJX0xWX09CSkVDVFMgJiBhY3BpX2RiZ19sZXZlbCkgJiYgKF9DT01QT05FTlQgJiBhY3BpX2RiZ19sYXllcikpKSB7CisJCWlmICghCisJCSAgICAoKEFDUElfTFZfT0JKRUNUUyAmIGFjcGlfZGJnX2xldmVsKQorCQkgICAgICYmIChfQ09NUE9ORU5UICYgYWNwaV9kYmdfbGF5ZXIpKSkgewogCQkJcmV0dXJuOwogCQl9CiAJfQogCi0JYWNwaV9vc19wcmludGYgKCIlMjBzIDogJTQuNHNcbiIsICAgICAiTmFtZSIsIGFjcGlfdXRfZ2V0X25vZGVfbmFtZSAobm9kZSkpOwotCWFjcGlfZXhfb3V0X3N0cmluZyAoIlR5cGUiLCAgICAgICAgICAgYWNwaV91dF9nZXRfdHlwZV9uYW1lIChub2RlLT50eXBlKSk7Ci0JYWNwaV9leF9vdXRfaW50ZWdlciAoIkZsYWdzIiwgICAgICAgICBub2RlLT5mbGFncyk7Ci0JYWNwaV9leF9vdXRfaW50ZWdlciAoIk93bmVyIElkIiwgICAgICBub2RlLT5vd25lcl9pZCk7Ci0JYWNwaV9leF9vdXRfaW50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GFyZW50IiwgYWNwaV9uc19nZXRfcGFyZW50X25vZGUobm9kZSkpOwogfQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2R1bXBfcmVmZXJlbmNlCisgKgorICogUEFSQU1FVEVSUzogIE9iamVjdCAgICAgICAgICAgICAgLSBEZXNjcmlwdG9yIHRvIGR1bXAKKyAqCisgKiBERVNDUklQVElPTjogRHVtcHMgYSByZWZlcmVuY2Ugb2JqZWN0CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgYWNwaV9leF9kdW1wX3JlZmVyZW5jZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYykKK3sKKwlzdHJ1Y3QgYWNwaV9idWZmZXIgcmV0X2J1ZjsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisKKwlpZiAob2JqX2Rlc2MtPnJlZmVyZW5jZS5vcGNvZGUgPT0gQU1MX0lOVF9OQU1FUEFUSF9PUCkgeworCQlhY3BpX29zX3ByaW50ZigiTmFtZWQgT2JqZWN0ICVwICIsIG9ial9kZXNjLT5yZWZlcmVuY2Uubm9kZSk7CisJCXJldF9idWYubGVuZ3RoID0gQUNQSV9BTExPQ0FURV9MT0NBTF9CVUZGRVI7CisJCXN0YXR1cyA9CisJCSAgICBhY3BpX25zX2hhbmRsZV90b19wYXRobmFtZShvYmpfZGVzYy0+cmVmZXJlbmNlLm5vZGUsCisJCQkJCSAgICAgICAmcmV0X2J1Zik7CisJCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgeworCQkJYWNwaV9vc19wcmludGYoIkNvdWxkIG5vdCBjb252ZXJ0IG5hbWUgdG8gcGF0aG5hbWVcbiIpOworCQl9IGVsc2UgeworCQkJYWNwaV9vc19wcmludGYoIiVzXG4iLCAoY2hhciAqKXJldF9idWYucG9pbnRlcik7CisJCQlBQ1BJX01FTV9GUkVFKHJldF9idWYucG9pbnRlcik7CisJCX0KKwl9IGVsc2UgaWYgKG9ial9kZXNjLT5yZWZlcmVuY2Uub2JqZWN0KSB7CisJCWFjcGlfb3NfcHJpbnRmKCJcblJlZmVyZW5jZWQgT2JqZWN0OiAlcFxuIiwKKwkJCSAgICAgICBvYmpfZGVzYy0+cmVmZXJlbmNlLm9iamVjdCk7CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2R1bXBfcGFja2FnZQorICoKKyAqIFBBUkFNRVRFUlM6ICBPYmplY3QgICAgICAgICAgICAgIC0gRGVzY3JpcHRvciB0byBkdW1wCisgKiAgICAgICAgICAgICAgTGV2ZWwgICAgICAgICAgICAgICAtIEluZGVudGF0aW9uIExldmVsCisgKiAgICAgICAgICAgICAgSW5kZXggICAgICAgICAgICAgICAtIFBhY2thZ2UgaW5kZXggZm9yIHRoaXMgb2JqZWN0CisgKgorICogREVTQ1JJUFRJT046IER1bXBzIHRoZSBlbGVtZW50cyBvZiB0aGUgcGFja2FnZQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCithY3BpX2V4X2R1bXBfcGFja2FnZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywgdTMyIGxldmVsLCB1MzIgaW5kZXgpCit7CisJdTMyIGk7CisKKwkvKiBJbmRlbnRhdGlvbiBhbmQgaW5kZXggb3V0cHV0ICovCisKKwlpZiAobGV2ZWwgPiAwKSB7CisJCWZv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mVyLmxlbmd0aCkgeworCQkJYWNwaV91dF9kdW1wX2J1ZmZlcigodTggKikgb2JqX2Rlc2MtPmJ1ZmZlci5wb2ludGVyLAorCQkJCQkgICAgb2JqX2Rlc2MtPmJ1ZmZlci5sZW5ndGgsCisJCQkJCSAgICBEQl9EV09SRF9ESVNQTEFZLCBfQ09NUE9ORU5UKTsKKwkJfSBlbHNlIHsKKwkJCWFjcGlfb3NfcHJpbnRmKCJcbiIpOworCQl9CisJCWJyZWFrOworCisJY2FzZSBBQ1BJX1RZUEVfUEFDS0FHRToKKworCQlhY3BpX29zX3ByaW50ZigiW1BhY2thZ2VdIENvbnRhaW5zICVkIEVsZW1lbnRzOiBcbiIsCisJCQkgICAgICAgb2JqX2Rlc2MtPnBhY2thZ2UuY291bnQpOworCisJCWZvciAoaSA9IDA7IGkgPCBvYmpfZGVzYy0+cGFja2FnZS5jb3VudDsgaSsrKSB7CisJCQlhY3BpX2V4X2R1bXBfcGFja2FnZShvYmpfZGVzYy0+cGFja2FnZS5lbGVtZW50c1tpXSwKKwkJCQkJICAgICBsZXZlbCArIDEsIGkpOworCQl9CisJCWJyZWFrOworCisJY2FzZSBBQ1BJX1RZUEVfTE9DQUxfUkVGRVJFTkNFOgorCisJCWFjcGlfb3NfcHJpbnRmKCJbT2JqZWN0IFJlZmVyZW5jZV0gIik7CisJCWFjcGlfZXhfZHVtcF9yZWZlcmVuY2Uob2JqX2Rlc2MpOworCQlicmVhazsKKworCWRlZmF1bHQ6CisKKwkJYWNwaV9vc19wcmludGYoIltVbmtub3duIFR5cGVdICVYXG4iLAorCQkJICAgICAgIEFDUElfR0VUX09CSkVDVF9UWVBFKG9ial9kZXNjKSk7CisJCWJyZWFrOworCX0KK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9kdW1wX29iamVjdF9kZXNj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dHVzKSkgeworCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UoYnVmZmVyX2Rlc2MpOworCX0gZWxzZSB7CiAJCSpyZXRfYnVmZmVyX2Rlc2MgPSBidWZmZXJfZGVzYzsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF93cml0ZV9kYXRhX3RvX2ZpZWxkCkBAIC0yMDUsOTcgKzIwNyw5NiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfd3JpdGVfZGF0YV90b19maWVsZCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc291cmNlX2Rlc2MsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKnJlc3VsdF9kZXNjKQorYWNwaV9leF93cml0ZV9kYXRhX3RvX2ZpZWxkKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnNvdXJjZV9kZXNjLAorCQkJICAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjLAorCQkJICAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipyZXN1bHRfZGVzYykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1MzIgICAg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AgICAgICAgcmVhZF93cml0ZSk7CithY3BpX2V4X2ZpZWxkX2RhdHVtX2lvKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjLAorCQkgICAgICAgdTMyIGZpZWxkX2RhdHVtX2J5dGVfb2Zmc2V0LAorCQkgICAgICAgYWNwaV9pbnRlZ2VyICogdmFsdWUsIHUzMiByZWFkX3dyaXRlKTsKIAogc3RhdGljIHU4Ci1hY3BpX2V4X3JlZ2lzdGVyX292ZXJmbG93ICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYywKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIHZhbHVlKTsKK2FjcGlfZXhfcmVnaXN0ZXJfb3ZlcmZsb3codW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCQkgIGFjcGlfaW50ZWdlciB2YWx1ZSk7CiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9leF9zZXR1cF9yZWdpb24gKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRfZGF0dW1fYnl0ZV9vZmZzZXQpOwotCithY3BpX2V4X3NldHVwX3JlZ2lvbih1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJICAgICB1MzIgZmllbGRfZGF0dW1fYnl0ZV9vZmZzZXQpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTg5LDI3ICs4MSwyNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1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QSV9EQl9FUlJPUiwKKwkJCQkJICAiUmVnaW9uICVzKCVYKSBub3QgaW1wbGVtZW50ZWRcbiIsCisJCQkJCSAgYWNwaV91dF9nZXRfcmVnaW9uX25hbWUocmduX2Rlc2MtPgorCQkJCQkJCQkgIHJlZ2lvbi4KKwkJCQkJCQkJICBzcGFjZV9pZCksCisJCQkJCSAgcmduX2Rlc2MtPnJlZ2lvbi5zcGFjZV9pZCkpOworCQl9IGVsc2UgaWYgKHN0YXR1cyA9PSBBRV9OT1RfRVhJU1QpIHsKKwkJCUFDUElfUkVQT1JUX0VSUk9SKCgiUmVnaW9uICVzKCVYKSBoYXMgbm8gaGFuZGxlclxuIiwKKwkJCQkJICAgYWNwaV91dF9nZXRfcmVnaW9uX25hbWUocmduX2Rlc2MtPgorCQkJCQkJCQkgICByZWdpb24uCisJCQkJCQkJCSAgIHNwYWNlX2lkKSwKKwkJCQkJICAgcmduX2Rlc2MtPnJlZ2lvbi5zcGFjZV9pZCkpOwogCQl9CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfcmVnaXN0ZXJfb3ZlcmZsb3cKQEAgLTMxMCw5ICszMDYsOCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHU4Ci1hY3BpX2V4X3JlZ2lzdGVyX292ZXJmbG93ICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYywKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIHZhbHVlKQorYWNwaV9leF9yZWdpc3Rlcl9vdmVyZmxvdyh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJCSAgYWNwaV9pbnRlZ2VyIHZhbHVlKQogewogCiAJaWYgKG9ial9kZXNjLT5jb21tb25fZmllbGQuYml0X2xlbmd0aCA+PSBBQ1BJX0lOVEVHRVJfQklUX1NJWkUpIHsKQEAgLTMzNiw3ICszMzEsNiBAQAogCXJldHVybiAoRkFMU0UpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfZmllbGRfZGF0dW1faW8KQEAgLTM1NiwxOCArMzUwLDE0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXhfZmllbGRfZGF0dW1faW8gKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRfZGF0dW1fYnl0ZV9vZmZzZXQsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkX3dyaXRlKQorYWNwaV9leF9maWVsZF9kYXR1bV9pbyh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJICAgICAgIHUzMiBmaWVsZF9kYXR1bV9ieXRlX29mZnNldCwKKwkJICAgICAgIGFjcGlfaW50ZWdlciAqIHZhbHVlLCB1MzIgcmVhZF93cml0ZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl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ZW5ndGggLSBidWZmZXJfb2Zmc2V0KSk7CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfaW5zZXJ0X2ludG9fZmllbGQKQEAgLTc3NCw1MyArNzcyLDU0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9pbnNlcnRfaW50b19maWVsZCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyX2xlbmd0aCkKK2FjcGlfZXhfaW5zZXJ0X2ludG9fZmllbGQodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCQkgIHZvaWQgKmJ1ZmZlciwgdTMyIGJ1ZmZlcl9sZW5ndGgpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBtYXNrOwotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgbWVyZ2VkX2RhdHVtOwotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgcmF3X2RhdHVtID0gMDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX29mZnNldCA9IDA7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICA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jKSwKKwkJCSAgKnJldHVybl9kZXNjKSk7CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfY29uY2F0X3RlbXBsYXRlCkBAIC0xNjMsNjMgKzE1Miw1OCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfY29uY2F0X3RlbXBsYXRlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvcGVyYW5kMCwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvcGVyYW5kMSwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqYWN0dWFsX3JldHVybl9kZXNjLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2V4X2NvbmNhdF90ZW1wbGF0ZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvcGVyYW5kMCwKKwkJCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9wZXJhbmQxLAorCQkJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKmFjdHVhbF9yZXR1cm5fZGVzYywKKwkJCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcmV0dXJuX2Rlc2M7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmV3X2J1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kMCkpKTsKLQkJc3RhdHVzID1BRV9BTUxfSU5URVJOQUw7CisJCUFDUElfUkVQT1JUX0VSUk9SKCgiQ29uY2F0ZW5hdGUgLSBJbnZhbGlkIG9iamVjdCB0eXBlOiAlWFxuIiwKKwkJCQkgICBBQ1BJX0dFVF9PQkpFQ1RfVFlQRShvcGVyYW5kMCkpKTsKKwkJc3RhdHVzID0gQUVfQU1MX0lOVEVSTkFMOwogCQlnb3RvIGNsZWFudXA7CiAJfQogCiAJKmFjdHVhbF9yZXR1cm5fZGVzYyA9IHJldHVybl9kZXNjOwogCi1jbGVhbnVwOgorICAgICAgY2xlYW51cDoKIAlpZiAobG9jYWxfb3BlcmFuZDEgIT0gb3BlcmFuZDEpIHsKLQkJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlIChsb2NhbF9vcGVyYW5kMSk7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShsb2NhbF9vcGVyYW5kMSk7CiAJfQotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2RvX21hdGhfb3AKQEAgLTQxMiw2MiArMzk1LDQ5IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX2ludGVnZXIKLWFjcGlfZXhfZG9fbWF0aF9vcCAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyMCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGludGVn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nRfcmlnaHQgKE9wZXJhbmQsIHNoaWZ0X2NvdW50LCBSZXN1bHQpICovCisJY2FzZSBBTUxfU0hJRlRfUklHSFRfT1A6CS8qIHNoaWZ0X3JpZ2h0IChPcGVyYW5kLCBzaGlmdF9jb3VudCwgUmVzdWx0KSAqLwogCiAJCXJldHVybiAoaW50ZWdlcjAgPj4gaW50ZWdlcjEpOwogCi0KLQljYXNlIEFNTF9TVUJUUkFDVF9PUDogICAgICAgICAgIC8qIFN1YnRyYWN0IChJbnRlZ2VyMCwgSW50ZWdlcjEsIFJlc3VsdCkgKi8KKwljYXNlIEFNTF9TVUJUUkFDVF9PUDoJLyogU3VidHJhY3QgKEludGVnZXIwLCBJbnRlZ2VyMSwgUmVzdWx0KSAqLwogCiAJCXJldHVybiAoaW50ZWdlcjAgLSBpbnRlZ2VyMSk7CiAKQEAgLTQ3Nyw3ICs0NDcsNiBAQAogCX0KIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2RvX2xvZ2ljYWxfbnVtZXJpY19vcApAQCAtNDk5LDI4ICs0NjgsMjQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2RvX2xvZ2ljYWxfbnVtZXJpY19vcCAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyMCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGludGVnZXIxLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmxvZ2ljYWxfcmVzdWx0KQorYWNwaV9leF9kb19sb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ljYWwgcmVzdWx0IGFuZCBzdGF0dXMgKi8KIAogCSpsb2dpY2FsX3Jlc3VsdCA9IGxvY2FsX3Jlc3VsdDsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9kb19sb2dpY2FsX29wCkBAIC01NjYsMjQgKzUzMCwyMCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfZG9fbG9naWNhbF9vcCAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb3BlcmFuZDAsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb3BlcmFuZDEsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbG9naWNhbF9yZXN1bHQpCithY3BpX2V4X2RvX2xvZ2ljYWxfb3AodTE2IG9wY29kZSwKKwkJICAgICAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb3BlcmFuZDAsCisJCSAgICAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9wZXJhbmQxLCB1OCAqIGxvZ2ljYWxfcmVzdWx0KQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmxvY2FsX29wZXJhbmQxID0gb3BlcmFuZDE7Ci0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyMDsKLQlhY3BpX2ludGVnZXIgICAgICA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KioqLwogCi12b2lkCi1hY3BpX2V4X3VubGlua19tdXRleCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MpCit2b2lkIGFjcGlfZXhfdW5saW5rX211dGV4KHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjKQogewotCXN0cnVjdCBhY3BpX3RocmVhZF9zdGF0ZSAgICAgICAgKnRocmVhZCA9IG9ial9kZXNjLT5tdXRleC5vd25lcl90aHJlYWQ7Ci0KKwlzdHJ1Y3QgYWNwaV90aHJlYWRfc3RhdGUgKnRocmVhZCA9IG9ial9kZXNjLT5tdXRleC5vd25lcl90aHJlYWQ7CiAKIAlpZiAoIXRocmVhZCkgewogCQlyZXR1cm47CkBAIC04OCwxMyArODEsMTEgQEAKIAogCWlmIChvYmpfZGVzYy0+bXV0ZXgucHJldikgewogCQkob2JqX2Rlc2MtPm11dGV4LnByZXYpLT5tdXRleC5uZXh0ID0gb2JqX2Rlc2MtPm11dGV4Lm5leHQ7Ci0JfQotCWVsc2UgeworCX0gZWxzZSB7CiAJCXRocmVhZC0+YWNxdWlyZWRfbXV0ZXhfbGlzdCA9IG9ial9kZXNjLT5tdXRleC5uZXh0OwogCX0KIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2xpbmtfbXV0ZXgKQEAgLTEwOSwxMiArMTAwLDEwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgdm9pZAotYWNwaV9leF9saW5rX211dGV4ICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYywKLQlzdHJ1Y3QgYWNwaV90aHJlYWRfc3RhdGUgICAgICAgICp0aHJlYWQpCithY3BpX2V4X2xpbmtfbXV0ZXgodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MsCisJCSAgIHN0cnVjdCBhY3BpX3RocmVhZF9zdGF0ZSAqdGhyZWFkKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmxpc3RfaGVhZDsKLQorCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmxpc3RfaGVhZDsKIAogCWxpc3RfaGVhZCA9IHRocmVhZC0+YWNxdWlyZWRfbXV0ZXhfbGlzdDsKIApAQCAtMTM0LDcgKzEyMyw2IEBACiAJdGhyZWFkLT5hY3F1aXJlZF9tdXRleF9saXN0ID0gb2JqX2Rlc2M7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9hY3F1aXJlX211dGV4CkBAIC0xNTAsMjcgKzEzOCwyMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfYWNxdWlyZV9tdXRleCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqdGltZV9kZXNjLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2V4X2FjcXVpcmVfbXV0ZXgodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqdGltZV9kZXNjLAorCQkgICAgICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJICAgICAgc3R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3N0cmluZyh1MzIgcHJlZml4X2NvdW50LCB1MzIgbnVtX25hbWVfc2Vncyk7CiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9leF9uYW1lX3NlZ21lbnQgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKippbl9hbWxfYWRkcmVzcywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lX3N0cmluZyk7Ci0KK2FjcGlfZXhfbmFtZV9zZWdtZW50KHU4ICoqIGluX2FtbF9hZGRyZXNzLCBjaGFyICpuYW1lX3N0cmluZyk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzksMTcgKzcxLDEzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIGNoYXIgKgotYWNwaV9leF9hbGxvY2F0ZV9uYW1lX3N0cmluZyAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVmaXhfY291bnQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fbmFtZV9zZWdzKQorc3RhdGljIGNoYXIgKmFjcGlfZXhfYWxsb2NhdGVfbmFtZV9zdHJpbmcodTMyIHByZWZpeF9jb3VudCwgdTMyIG51bV9uYW1lX3NlZ3MpCiB7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGVtcF9wdHI7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmFtZV9zdHJpbmc7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZV9uZWVkZWQ7CisJY2hhciAqdGVtcF9wdHI7CisJY2hhciAqbmFtZV9zdHJpbmc7CisJdTMyIHNpemVfbmVlZGVkOwogCi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bWVfc3RyaW5nKTsKKwlyZXR1cm5fUFRSKG5hbWVfc3RyaW5nKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE2NywxOSArMTUxLDE0IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX2V4X25hbWVfc2VnbWVudCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKmluX2FtbF9hZGRyZXNzLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWVfc3RyaW5nKQorc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfZXhfbmFtZV9zZWdtZW50KHU4ICoqIGluX2FtbF9hZGRyZXNzLCBjaGFyICpuYW1lX3N0cmluZykKIHsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICphbWxfYWRkcmVzcyA9ICh2b2lkICopICppbl9hbWxfYWRkcmVzczsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyX2J1Zls1XTsKKwljaGFyICphbWxfYWRkcmVzcyA9ICh2b2lkICopKmluX2FtbF9hZGRyZXNzOworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOworCXUzMiBpbmRleDsKKwljaGFyIGNoYXJfYnVmWzVdOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZXhfbmFtZV9zZWdtZW50Iik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJleF9uYW1lX3NlZ21lbnQiK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EFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2dldF9uYW1lX3N0cmluZwpAQCAtMjYzLDM3ICsyMzgsMzIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2dldF9uYW1lX3N0cmluZyAoCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICBkYXRhX3R5cGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaW5fYW1sX2FkZHJlc3MsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dF9uYW1lX3N0cmluZywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvdXRfbmFtZV9sZW5ndGgpCithY3BpX2V4X2dldF9uYW1lX3N0cmluZyhhY3BpX29iamVjdF90eXBlIGRhdGFfdHlwZSwKKwkJCXU4ICogaW5fYW1sX2FkZHJlc3MsCisJCQljaGFyICoqb3V0X25hbWVfc3RyaW5nLCB1MzIgKiBvdXRfbmFtZV9sZW5ndGgpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICphbWxfYWRkcmVzcyA9IGluX2FtbF9hZGRyZXNzOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWVfc3RyaW5nID0gTlVMTDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bV9zZWdtZW50czsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWZpeF9jb3VudCA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NwYXJzZXIuaD4KICNpbmNsdWRlIDxhY3BpL2FjZGlzcGF0Lmg+CkBAIC01MCwxMCArNDksOCBAQAogI2luY2x1ZGUgPGFjcGkvYW1sY29kZS5oPgogI2luY2x1ZGUgPGFjcGkvYWNuYW1lc3AuaD4KIAotCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9FWEVDVVRFUgotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgiZXhvcGFyZzEiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJleG9wYXJnMSIpCiAKIC8qIQogICogTmFtaW5nIGNvbnZlbnRpb24gZm9yIEFNTCBpbnRlcnByZXRlciBleGVjdXRpb24gcm91dGluZXMuCkBAIC03Niw3ICs3Myw2IEBACiAgKiBUaGUgQWNwaUV4T3Bjb2RlKiBmdW5jdGlvbnMgYXJlIGNhbGxlZCB2aWEgdGhlIERpc3BhdGNoZXIgY29tcG9uZW50IHdpdGgKICAqIGZ1bGx5IHJlc29sdmVkIG9wZXJhbmRzLgogISovCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfb3Bjb2RlXzBBXzBUXzFSCkBAIC04OCw1OSArODQsNTMgQEAKICAqIERFU0NSSVBUSU9OOiBFeGVjdXRlIG9wZXJhdG9yIHdpdGggbm8gb3BlcmFuZHMsIG9uZSByZXR1cm4gdmFsdWUKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9leF9vcGNvZGVfMEFfMFRfMVIgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX3N0YXR1cyBhY3BpX2V4X29wY29kZV8wQV8wV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CWJyZWFrOwogCisJZGVmYXVsdDoJCS8qICBVbmtub3duIG9wY29kZSAgKi8KIAotCWRlZmF1bHQ6ICAgICAgICAgICAgICAgIC8qICBVbmtub3duIG9wY29kZSAgKi8KLQotCQlBQ1BJX1JFUE9SVF9FUlJPUiAoKCJhY3BpX2V4X29wY29kZV8xQV8wVF8wUjogVW5rbm93biBvcGNvZGUgJVhcbiIsCi0JCQl3YWxrX3N0YXRlLT5vcGNvZGUpKTsKKwkJQUNQSV9SRVBPUlRfRVJST1IoKCJhY3BpX2V4X29wY29kZV8xQV8wVF8wUjogVW5rbm93biBvcGNvZGUgJVhcbiIsIHdhbGtfc3RhdGUtPm9wY29kZSkpOwogCQlzdGF0dXMgPSBBRV9BTUxfQkFEX09QQ09ERTsKIAkJYnJlYWs7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfb3Bjb2RlXzFBXzFUXzBSCkBAIC0yMzAsNDEgKzIwOSwzNCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2V4X29wY29kZV8xQV8xVF8wUiAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSkKK2FjcGlfc3RhdHVzIGFjcGlfZXhfb3Bjb2RlXzFBXzFUXzBSKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSB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GkvZXhlY3V0ZXIvZXhvcGFyZzMuYwpAQCAtNDIsMTYgKzQyLDEzIEBACiAgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCiAgKi8KIAotCiAjaW5jbHVkZSA8YWNwaS9hY3BpLmg+CiAjaW5jbHVkZSA8YWNwaS9hY2ludGVycC5oPgogI2luY2x1ZGUgPGFjcGkvYWNwYXJzZXIuaD4KICNpbmNsdWRlIDxhY3BpL2FtbGNvZGUuaD4KIAotCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9FWEVDVVRFUgotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgiZXhvcGFyZzMiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJleG9wYXJnMyIpCiAKIC8qIQogICogTmFtaW5nIGNvbnZlbnRpb24gZm9yIEFNTCBpbnRlcnByZXRlciBleGVjdXRpb24gcm91dGluZXMuCkBAIC03NCw4ICs3MSw2IEBACiAgKiBUaGUgQWNwaUV4T3Bjb2RlKiBmdW5jdGlvbnMgYXJlIGNhbGxlZCB2aWEgdGhlIERpc3BhdGNoZXIgY29tcG9uZW50IHdpdGgKICAqIGZ1bGx5IHJlc29sdmVkIG9wZXJhbmRzLgogISovCi0KLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9vcGNvZGVfM0FfMFRfMFIKQEAgLTg3LDYxICs4Miw1MyBAQAogICogREVTQ1JJUFRJT046IEV4ZWN1dGUgVHJpYWRpYyBvcGVyYXRvciAoMyBvcGVyYW5kcykKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9leF9vcGNvZGVfM0FfMFRfMFIgKAotCXN0cnVjdCBh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lc3ModTMyIGZpZWxkX2JpdF9vZmZzZXQsCisJCQl1MzIgZmllbGRfYml0X2xlbmd0aCwgdTMyIHJlZ2lvbl9sZW5ndGgpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTkyLDM5ICs4NCwzNiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHUzMgotYWNwaV9leF9nZW5lcmF0ZV9hY2Nlc3MgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRfYml0X29mZnNldCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2JpdF9sZW5ndGgsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb25fbGVuZ3RoKQorYWNwaV9leF9nZW5lcmF0ZV9hY2Nlc3ModTMyIGZpZWxkX2JpdF9vZmZzZXQsCisJCQl1MzIgZmllbGRfYml0X2xlbmd0aCwgdTMyIHJlZ2lvbl9sZW5ndGgpCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZF9ieXRlX2xlbmd0aDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2J5dGVfb2Zmc2V0OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRfYnl0ZV9lbmRfb2Zmc2V0OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXNzX2J5dGVfd2lkdGg7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZF9zdGFydF9vZmZzZXQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZF9lbmRfb2Zmc2V0OwotCXUzMiAgICAg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GlmCQkJCS8qIEFDUElfVU5ERVJfREVWRUxPUE1FTlQgKi8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yMjYsMTggKzIyMSwxNCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHUzMgotYWNwaV9leF9kZWNvZGVfZmllbGRfYWNjZXNzICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYywKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2ZsYWdzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnJldHVybl9ieXRlX2FsaWdubWVudCkKK2FjcGlfZXhfZGVjb2RlX2ZpZWxkX2FjY2Vzcyh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJCSAgICB1OCBmaWVsZF9mbGFncywgdTMyICogcmV0dXJuX2J5dGVfYWxpZ25tZW50KQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXNzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZV9hbGlnbm1lbnQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaXRfbGVuZ3RoOworCXUzMiBhY2Nlc3M7CisJdTMyIGJ5dGVfYWxpZ25tZW50OworCXUzMiBiaXRfbGVuZ3RoOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZXhfZGVjb2RlX2ZpZWxkX2FjY2VzcyIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXhfZGVjb2RlX2ZpZWxkX2FjY2VzcyIpOwogCiAJYWNjZXNzID0gKGZpZWxkX2ZsYW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BQ1BJX1RZUEVfQlVGRkVSX0ZJRUxEKSB7CiAJCS8qCiAJCSAqIGJ1ZmZlcl9maWVsZCBhY2Nlc3MgY2FuIGJlIG9uIGFueSBieXRlIGJvdW5kYXJ5LCBzbyB0aGUKIAkJICogYnl0ZV9hbGlnbm1lbnQgaXMgYWx3YXlzIDEgYnl0ZSAtLSByZWdhcmRsZXNzIG9mIGFueSBieXRlX2FsaWdubWVudApAQCAtMjk2LDEwICsyODksOSBAQAogCX0KIAogCSpyZXR1cm5fYnl0ZV9hbGlnbm1lbnQgPSBieXRlX2FsaWdubWVudDsKLQlyZXR1cm5fVkFMVUUgKGJpdF9sZW5ndGgpOworCXJldHVybl9WQUxVRShiaXRfbGVuZ3RoKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X3ByZXBfY29tbW9uX2ZpZWxkX29iamVjdApAQCAtMzIyLDIwICszMTQsMTYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X3ByZXBfY29tbW9uX2ZpZWxkX29iamVjdCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZF9mbGFncywKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2F0dHJpYnV0ZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2JpdF9wb3NpdGlvbiwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2JpdF9sZW5ndGgpCithY3BpX2V4X3ByZXBfY29tbW9u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OR0xFX0RBVFVNOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9wcmVwX2ZpZWxkX3ZhbHVlCkBAIC00MjIsNTEgKzQxMCw0OSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2V4X3ByZXBfZmllbGRfdmFsdWUgKAotCXN0cnVjdCBhY3BpX2NyZWF0ZV9maWVsZF9pbmZvICAgKmluZm8pCithY3BpX3N0YXR1cyBhY3BpX2V4X3ByZXBfZmllbGRfdmFsdWUoc3RydWN0IGFjcGlfY3JlYXRlX2ZpZWxkX2luZm8gKmluZm8pCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCXUzMiB0eXBlOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImV4X3ByZXBfZmllbGRfdmFsdWUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV4X3ByZXBfZmllbGRfdmFsdWUiKTsKIAogCS8qIFBhcmFtZXRlciB2YWxpZGF0aW9uICovCiAKIAlpZiAoaW5mby0+ZmllbGRfdHlwZSAhPSBBQ1BJX1RZUEVfTE9DQUx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zKTsKIH0KLQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2V4ZWN1dGVyL2V4cmVnaW9uLmMgYi9kcml2ZXJzL2FjcGkvZXhlY3V0ZXIvZXhyZWdpb24uYwppbmRleCA3MjNhYWVmLi45YTJmNWJlIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvZXhlY3V0ZXIvZXhyZWdpb24uYworKysgYi9kcml2ZXJzL2FjcGkvZXhlY3V0ZXIvZXhyZWdpb24uYwpAQCAtNDIsMTQgKzQyLDExIEBACiAgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCiAgKi8KIAotCiAjaW5jbHVkZSA8YWNwaS9hY3BpLmg+CiAjaW5jbHVkZSA8YWNwaS9hY2ludGVycC5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX0VYRUNVVEVSCi0JIEFDUElfTU9EVUxFX05BTUUgICAgKCJleHJlZ2lvbiIpCi0KK0FDUElfTU9EVUxFX05BTUUoImV4cmVnaW9uIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02OCwyNyArNjUsMjMgQEAKICAqIERFU0NSSVBUSU9OOiBIYW5kbGVyIGZvciB0aGUgU3lzdGVtIE1lbW9yeSBhZGRyZXNzIHNwYWNlIChPcCBSZWdpb24pCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfZXhfc3lzdGVtX21lbW9yeV9zcGFjZV9oYW5kbGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICA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Moc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X3N5c3RlbV9pb19zcGFjZV9oYW5kbGVyCkBAIC0yNzksMzkgKzI3NSwzNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfc3lzdGVtX2lvX3NwYWNlX2hhbmRsZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0JYWNwaV9waHlzaWNhbF9hZGRyZXNzICAgICAgICAgICBhZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0X3dpZHRoLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKnZhbHVlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpyZWdpb25fY29udGV4dCkKK2FjcGlfZXhfc3lzdGVtX2lvX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyBhZGRyZXNzLAorCQkJCXUzMiBiaXRfd2lkdGgsCisJCQkJYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkJdm9pZCAqaGFuZGxlcl9jb250ZXh0LCB2b2lkICpyZWdpb25fY29udGV4dCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUzMjsKKwlhY3BpX3N0YXR1cyBzdGF0d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GRyZXNzLAotCQkJCSAodTMyKSAqdmFsdWUsIGJpdF93aWR0aCk7CisJCXN0YXR1cyA9IGFjcGlfb3Nfd3JpdGVfcG9ydCgoYWNwaV9pb19hZGRyZXNzKSBhZGRyZXNzLAorCQkJCQkgICAgKHUzMikgKiB2YWx1ZSwgYml0X3dpZHRoKTsKIAkJYnJlYWs7CiAKIAlkZWZhdWx0OgpAQCAtMzE5LDEwICszMTEsOSBAQAogCQlicmVhazsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9wY2lfY29uZmlnX3NwYWNlX2hhbmRsZXIKQEAgLTM0MiwyMSArMzMzLDE3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9wY2lfY29uZmlnX3NwYWNlX2hhbmRsZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0JYWNwaV9waHlzaWNhbF9hZGRyZXNzICAgICAgICAgICBhZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0X3dpZHRoLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKnZhbHVlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpyZWdpb25fY29udGV4dCkKK2FjcGlfZXhfcGNpX2NvbmZpZ19zcGFjZV9oYW5kbGVyKHUzMiBmdW5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KTsKKwkJc3RhdHVzID0gYWNwaV9vc193cml0ZV9wY2lfY29uZmlndXJhdGlvbihwY2lfaWQsIHBjaV9yZWdpc3RlciwKKwkJCQkJCQkgKnZhbHVlLCBiaXRfd2lkdGgpOwogCQlicmVhazsKIAogCWRlZmF1bHQ6CkBAIC0zOTgsMTAgKzM4NSw5IEBACiAJCWJyZWFrOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X2Ntb3Nfc3BhY2VfaGFuZGxlcgpAQCAtNDIxLDI0ICs0MDcsMTkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2Ntb3Nfc3BhY2VfaGFuZGxlciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgICAgICAgICAgIGFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaXRfd2lkdGgsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnJlZ2lvbl9jb250ZXh0KQorYWNwaV9leF9jbW9zX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJICAgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkgICB1MzIgYml0X3dpZHRoLAorCQkJICAgYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKnJlZ2lvbl9jb250ZXh0KQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7CisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CiAKKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJleF9jbW9zX3NwYWNlX2hhbmRsZXIiKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJleF9jbW9zX3NwYWNlX2hhbmRsZXIiKTsKLQotCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfcGNpX2Jhcl9zcGFjZV9oYW5kbGVyCkBAIC00NTgsMjQgKzQzOSwxOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfcGNpX2Jhcl9zcGFjZV9oYW5kbGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICp2YWx1ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpCithY3BpX2V4X3BjaV9iYXJfc3BhY2VfaGFuZGxlcih1MzIgZnVuY3Rpb24sCisJCQkgICAgICBhY3BpX3BoeXNpY2FsX2FkZHJlc3MgYWRkcmVzcywKKwkJCSAgICAgIHUzMiBiaXRfd2lkdGgsCisJCQkgICAgICBhY3BpX2ludGVnZXIgKiB2YWx1ZSwKKwkJCSAgICAgIHZvaWQgKmhhbmRsZXJfY29udGV4dCwgdm9pZCAqcmVnaW9uX2NvbnRleHQpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV4X3BjaV9iYXJfc3BhY2VfaGFuZGxlciIpOwogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImV4X3BjaV9iYXJfc3BhY2VfaGFuZGxlciIpOwotCi0KLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9kYXRhX3RhYmxlX3NwYWNlX2hhbmRsZXIKQEAgLTQ5NSwyNCArNDcxLDIwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9kYXRhX3RhYmxlX3NwYWNlX2hhbmRsZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0JYWNwaV9waHlzaWNhbF9hZGRyZXNzICAgICAgICAgICBhZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0X3dpZHRoLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKnZhbHVlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpyZWdpb25fY29udGV4dCkKK2FjcGlfZXhfZGF0YV90YWJsZV9zcGFjZV9oYW5kbGVyKHUzMiBmdW5jdGlvbiwKKwkJCQkgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkJIHUzMiBiaXRfd2lkdGgsCisJCQkJIGFjcGlfaW50ZWdlciAqIHZhbHVlLAorCQkJCSB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKnJlZ2lvbl9jb250ZXh0KQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlX3dpZHRoID0gQUNQSV9ESVZfOCAoYml0X3dpZHRoKTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbG9naWNhbF9hZGRyX3B0cjsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKKwl1MzIgYnl0ZV93aWR0aCA9IEFDUElfRElWXzgoYml0X3dpZHRoKTsKKwl1MzIgaTsKKwljaGFyICpsb2dpY2FsX2FkZHJfcHRyOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXhfZGF0YV90YWJsZV9zcGFjZV9oYW5kbGVyIik7CiAKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiZXhfZGF0YV90YWJsZV9zcGFjZV9oYW5kbGVyIik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mg+CiAjaW5jbHVkZSA8YWNwaS9hY2Rpc3BhdC5oPgogI2luY2x1ZGUgPGFjcGkvYWNpbnRlcnAuaD4KQEAgLTUwLDEwICs0OSw4IEBACiAjaW5jbHVkZSA8YWNwaS9hY3BhcnNlci5oPgogI2luY2x1ZGUgPGFjcGkvYW1sY29kZS5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX0VYRUNVVEVSCi0JIEFDUElfTU9EVUxFX05BTUUgICAgKCJleHJlc250ZSIpCi0KK0FDUElfTU9EVUxFX05BTUUoImV4cmVzbnRlIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC04MCw0MSArNzcsMzcgQEAKICAqICAgICAgQUNQSV9UWVBFX1BBQ0tBR0UKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiBhY3BpX3N0YXR1cwotYWNwaV9leF9yZXNvbHZlX25vZGVfdG9fdmFsdWUgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKipvYmplY3RfcHRyLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCi0KK2FjcGlfZXhfcmVzb2x2ZV9ub2RlX3RvX3ZhbHVlKHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICoqb2JqZWN0X3B0ciwKKwkJCSAgICAgIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2VfZGVzYzsKLQl1bmlvbiBhY3Bp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RV9OQU1FKCJleHJlc29sdiIpCiAKIC8qIExvY2FsIHByb3RvdHlwZXMgKi8KLQogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX2V4X3Jlc29sdmVfb2JqZWN0X3RvX3ZhbHVlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqc3RhY2tfcHRyLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpOwotCithY3BpX2V4X3Jlc29sdmVfb2JqZWN0X3RvX3ZhbHVlKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipzdGFja19wdHIsCisJCQkJc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzgsMTkgKzczLDE2IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9yZXNvbHZlX3RvX3ZhbHVlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqc3RhY2tfcHRyLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2V4X3Jlc29sdmVfdG9fdmFsdWUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKnN0YWNrX3B0ciwKKwkJCSBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIgKCJleF9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NRSAgICAoImV4cmVzb3AiKQorQUNQSV9NT0RVTEVfTkFNRSgiZXhyZXNvcCIpCiAKIC8qIExvY2FsIHByb3RvdHlwZXMgKi8KLQogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX2V4X2NoZWNrX29iamVjdF90eXBlICgKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIHR5cGVfbmVlZGVkLAotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgdGhpc190eXBlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm9iamVjdCk7Ci0KK2FjcGlfZXhfY2hlY2tfb2JqZWN0X3R5cGUoYWNwaV9vYmplY3RfdHlwZSB0eXBlX25lZWRlZCwKKwkJCSAgYWNwaV9vYmplY3RfdHlwZSB0aGlzX3R5cGUsIHZvaWQgKm9iamVjdCk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzYsMTMgKzcwLDEwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXhfY2hlY2tfb2JqZWN0X3R5cGUgKAotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgdHlwZV9uZWVkZWQsCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0aGlzX3R5cGUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqb2JqZWN0KQorYWNwaV9leF9jaGVja19vYmplY3RfdHlwZShhY3BpX29iamVjdF90eXBlIHR5cGVfbmVlZGVkLAorCQkJICBhY3BpX29iamVjdF90eXBlIHRoaXNfdHlwZSwgdm9pZCAqb2JqZWN0KQogewotCUFDUElfRlVOQ1RJT05f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SAgYWNwaV91dF9nZXRfdHlwZV9uYW1lKHRoaXNfdHlwZSksIG9iamVjdCkpOwogCiAJCXJldHVybiAoQUVfQU1MX09QRVJBTkRfVFlQRSk7CiAJfQpAQCAtMTE0LDcgKzEwNiw2IEBACiAJcmV0dXJuIChBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9yZXNvbHZlX29wZXJhbmRzCkBAIC0xMzcsNDEgKzEyOCwzNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfcmVzb2x2ZV9vcGVyYW5kcyAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKnN0YWNrX3B0ciwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKQorYWNwaV9leF9yZXNvbHZlX29wZXJhbmRzKHUxNiBvcGNvZGUsCisJCQkgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKiBzdGFja19wdHIsCisJCQkgc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqIHdhbGtfc3RhdGUpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdF90eXBlOwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRlbXBfbm9kZTsKLQl1MzI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AotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmRlc3RfZGVzYywKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKTsKLQorYWNwaV9leF9zdG9yZV9vYmplY3RfdG9faW5kZXgodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqdmFsX2Rlc2MsCisJCQkgICAgICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpkZXN0X2Rlc2MsCisJCQkgICAgICBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC04NCwxMzYgKzc3LDE0NiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHZvaWQKLWFjcGlfZXhfZG9fZGVidWdfb2JqZWN0ICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2VfZGVzYywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXgpCithY3BpX2V4X2RvX2RlYnVnX29iamVjdCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpzb3VyY2VfZGVzYywKKwkJCXUzMiBsZXZlbCwgdTMyIGluZGV4KQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKKwl1MzIgaTsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0VfUFRSKCJleF9kb19kZWJ1Z19vYmplY3QiLCBzb3VyY2VfZGVzYyk7CiAKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1BUUiAoImV4X2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G4iLAorCQkJCSAgIHJlZl9kZXNjLT5yZWZlcmVuY2Uub3Bjb2RlKSk7CisJCUFDUElfRFVNUF9FTlRSWShyZWZfZGVzYywgQUNQSV9MVl9FUlJPUik7CiAKIAkJc3RhdHVzID0gQUVfQU1MX0lOVEVSTkFMOwogCQlicmVhazsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9zdG9yZV9vYmplY3RfdG9faW5kZXgKQEAgLTM4MSwyMCArMzg2LDE3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZXhfc3RvcmVfb2JqZWN0X3RvX2luZGV4ICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2VfZGVzYywKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICppbmRleF9kZXNjLAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX2V4X3N0b3JlX29iamVjdF90b19pbmRleCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpzb3VyY2VfZGVzYywKKwkJCSAgICAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmluZGV4X2Rlc2MsCisJCQkgICAgICBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s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UlJPUiwKLQkJCSJUYXJnZXQgaXMgbm90IGEgUGFja2FnZSBvciBidWZmZXJfZmllbGRcbiIpKTsKKwkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9FUlJPUiwKKwkJCQkgICJUYXJnZXQgaXMgbm90IGEgUGFja2FnZSBvciBidWZmZXJfZmllbGRcbiIpKTsKIAkJc3RhdHVzID0gQUVfQU1MX09QRVJBTkRfVFlQRTsKIAkJYnJlYWs7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfc3RvcmVfb2JqZWN0X3RvX25vZGUKQEAgLTUzOSw0MiArNTM5LDQwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9zdG9yZV9vYmplY3RfdG9fbm9kZSAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc291cmNlX2Rlc2MsCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1wbGljaXRfY29udmVyc2lvbikKK2FjcGlfZXhfc3RvcmVfb2JqZWN0X3RvX25vZGUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqc291cmNlX2Rlc2MsCisJCQkgICAgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlLAorCQkJICAgICBzdH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LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQotCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9leGVjdXRlci9leHN5c3RlbS5jIGIvZHJpdmVycy9hY3BpL2V4ZWN1dGVyL2V4c3lzdGVtLmMKaW5kZXggY2FmYTcwMi4uOGE4OGI4NCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2V4ZWN1dGVyL2V4c3lzdGVtLmMKKysrIGIvZHJpdmVycy9hY3BpL2V4ZWN1dGVyL2V4c3lzdGVtLmMKQEAgLTQyLDE0ICs0MiwxMiBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogI2luY2x1ZGUgPGFjcGkvYWNpbnRlcnAuaD4KICNpbmNsdWRlIDxhY3BpL2FjZXZlbnRzLmg+CiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX0VYRUNVVEVSCi0JIEFDUElfTU9EVUxFX05BTUUgICAgKCJleHN5c3RlbSIpCi0KK0FDUElfTU9EVUxFX05BTUUoImV4c3lzdGVtIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02NSw0OSArNjMsNDIgQEAKICAqICAgICAgICAgICAgICBpbnRlcnByZXRlciBpcyByZWxlYXNlZC4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9leF9zeXN0ZW1fd2FpdF9zZW1hcGhvcmUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc2VtYXBob3JlLAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dCkK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bGwgKGhvd19sb25nKTsKKwl9IGVsc2UgeworCQlhY3BpX29zX3N0YWxsKGhvd19sb25nKTsKIAl9CiAKIAlyZXR1cm4gKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9zeXN0ZW1fZG9fc3VzcGVuZApAQCAtMTY3LDI5ICsxNTIsMjQgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9leF9zeXN0ZW1fZG9fc3VzcGVuZCAoCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBob3dfbG9uZykKK2FjcGlfc3RhdHVzIGFjcGlfZXhfc3lzdGVtX2RvX3N1c3BlbmQoYWNwaV9pbnRlZ2VyIGhvd19sb25nKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKLQorCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKIAogCS8qIFNpbmNlIHRoaXMgdGhyZWFkIHdpbGwgc2xlZXAsIHdlIG11c3QgcmVsZWFzZSB0aGUgaW50ZXJwcmV0ZXIgKi8KIAotCWFjcGlfZXhfZXhpdF9pbnRlcnByZXRlciAoKTsKKwlhY3BpX2V4X2V4aXRfaW50ZXJwcmV0ZXIoKTsKIAotCWFjcGlfb3Nfc2xlZXAgKGhvd19sb25nKTsKKwlhY3BpX29zX3NsZWVwKGhvd19sb25nKTsKIAogCS8qIEFuZCBub3cgd2UgbXVzdCBnZXQgdGhlIGludGVycHJldGVyIGFnYWluICovCiAKLQlzdGF0dXM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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZXhfZW50ZXJfaW50ZXJwcmV0ZXIgKAotCXZvaWQpCithY3BpX3N0YXR1cyBhY3BpX2V4X2VudGVyX2ludGVycHJldGVyKHZvaWQpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImV4X2VudGVyX2ludGVycHJldGVyIik7CisJQUNQSV9GVU5DVElPTl9UUkFDRSgiZXhfZW50ZXJfaW50ZXJwcmV0ZXIiKTsKIAotCi0Jc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4IChBQ1BJX01UWF9FWEVDVVRFKTsKLQlpZiAoQUNQSV9GQUlMVVJFIChzdGF0dXMpKSB7Ci0JCUFDUElfUkVQT1JUX0VSUk9SICgoIkNvdWxkIG5vdCBhY3F1aXJlIGludGVycHJldGVyIG11dGV4XG4iKSk7CisJc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4KEFDUElfTVRYX0VYRUNVVEUpOworCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgeworCQlBQ1BJX1JFUE9SVF9FUlJPUigoIkNvdWxkIG5vdCBhY3F1aXJlIGludGVycHJldGVyIG11dGV4XG4iKSk7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfZXhpdF9pbnRlcnByZXRlcgpAQCAtMTI5LDI1ICsxMTksMjAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX2V4X2V4aXRfaW50ZXJwcmV0ZXIgKAotCXZvaWQpCit2b2lkIGFjcGlfZXhfZXhpdF9pbnRlcnByZXRlcih2b2lkKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImV4X2V4aXRfaW50ZXJwcmV0ZXIiKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJleF9leGl0X2ludGVycHJldGVyIik7Ci0KLQotCXN0YXR1cyA9IGFjcGlfdXRfcmVsZWFzZV9tdXRleCAoQUNQSV9NVFhfRVhFQ1VURSk7Ci0JaWYgKEFDUElfRkFJTFVSRSAoc3RhdHVzKSkgewotCQlBQ1BJX1JFUE9SVF9FUlJPUiAoKCJDb3VsZCBub3QgcmVsZWFzZSBpbnRlcnByZXRlciBtdXRleFxuIikpOworCXN0YXR1cyA9IGFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9FWEVDVVRFKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJQUNQSV9SRVBPUlRfRVJST1IoKCJDb3VsZCBub3QgcmVsZWFzZSBpbnRlcnByZXRlciBtdXRleFxuIikpOwogCX0KIAogCXJldHVybl9WT0lEOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfdHJ1bmNhdGVfZm9yMzJiaXRfdGFibGUKQEAgLTE2MSwyMCArMTQ2LDE3IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9leF90cnVuY2F0ZV9mb3IzMmJpdF90YWJsZSAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MpCit2b2lkIGFjcGlfZXhfdHJ1bmNhdGVfZm9yMzJiaXRfdGFibGUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MpCiB7CiAKLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJLyoKIAkgKiBPYmplY3QgbXVzdCBiZSBhIHZhbGlkIG51bWJlciBhbmQgd2UgbXVzdCBiZSBleGVjdXRpbmcKIAkgKiBhIGNvbnRyb2wgbWV0aG9kCiAJICovCiAJaWYgKCghb2JqX2Rlc2MpIHx8Ci0JCShBQ1BJX0dFVF9PQkpFQ1RfVFlQRSAob2JqX2Rlc2MpICE9IEFDUElfVFlQRV9JTlRFR0VSKSkgeworCSAgICAoQUNQSV9HRVRfT0JKRUNUX1RZUEUob2JqX2Rlc2MpICE9IEFDUElfVFlQRV9JTlRFR0VSKSkgewogCQlyZXR1cm47CiAJfQogCkBAIC0xODcsNyArMTY5LDYgQEAKIAl9CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9leF9hY3F1aXJlX2dsb2JhbF9sb2NrCkBAIC0yMDMsMzcgKzE4NCwzMSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXU4Ci1hY3BpX2V4X2FjcXVpcmVfZ2xvYmFsX2xvY2sgKAotCXUzMiAgICAgICAg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dHMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfZWlzYV9pZF90b19zdHJpbmcKQEAgLTMzNCwzMiArMjk4LDI2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9leF9laXNhX2lkX3RvX3N0cmluZyAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1lcmljX2lkLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm91dF9zdHJpbmcpCit2b2lkIGFjcGlfZXhfZWlzYV9pZF90b19zdHJpbmcodTMyIG51bWVyaWNfaWQsIGNoYXIgKm91dF9zdHJpbmcpCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlaXNhX2lkOworCXUzMiBlaXNhX2lkOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJLyogU3dhcCBJRCB0byBiaWctZW5kaWFuIHRvIGdldCBjb250aWd1b3VzIGJpdHMgKi8KIAotCWVpc2FfaWQgPSBhY3BpX3V0X2R3b3JkX2J5dGVfc3dhcCAobnVtZXJpY19pZCk7CisJZWlzYV9pZCA9IGFjcGlfdXRfZHdvcmRfYnl0ZV9zd2FwKG51bWVyaWNfaWQpOwogCi0Jb3V0X3N0cmluZ1swXSA9IChjaGFyKSAoJ0AnICsgKCgodW5zaWduZWQgbG9uZykgZWlzYV9pZCA+PiAyNikgJiAweDFmKSk7Ci0Jb3V0X3N0cmluZ1sxXSA9IChjaGFyKSAoJ0AnICsgKChlaXNhX2lkID4+IDIxKSAmIDB4MWYpKTsKLQlvdXRfc3RyaW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ApOwogCW91dF9zdHJpbmdbN10gPSAwOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZXhfdW5zaWduZWRfaW50ZWdlcl90b19zdHJpbmcKQEAgLTM2OSwzMCArMzI3LDI1IEBACiAgKgogICogUkVUVVJOOiAgICAgIE5vbmUsIHN0cmluZwogICoKLSAqIERFU0NSSVBUT0lOOiBDb252ZXJ0IGEgbnVtYmVyIHRvIHN0cmluZyByZXByZXNlbnRhdGlvbi4gQXNzdW1lcyBzdHJpbmcKKyAqIERFU0NSSVBUSU9OOiBDb252ZXJ0IGEgbnVtYmVyIHRvIHN0cmluZyByZXByZXNlbnRhdGlvbi4gQXNzdW1lcyBzdHJpbmcKICAqICAgICAgICAgICAgICBidWZmZXIgaXMgbGFyZ2UgZW5vdWdoIHRvIGhvbGQgdGhlIHN0cmluZy4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX2V4X3Vuc2lnbmVkX2ludGVnZXJfdG9fc3RyaW5nICgKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIHZhbHVlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm91dF9zdHJpbmcpCit2b2lkIGFjcGlfZXhfdW5zaWduZWRfaW50ZWdlcl90b19zdHJpbmcoYWNwaV9pbnRlZ2VyIHZhbHVlLCBjaGFyICpvdXRfc3RyaW5nKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaWdpdHNfbmVlZGVkOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtYWluZGVyOworCXUz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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02MiwzNiArNTksMzAgQEAKICAqICAgICAgICAgICAgICB0aGUgRkFEVC4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9od19pbml0aWFsaXplICgKLQl2b2lkKQorYWNwaV9zdGF0dXMgYWNwaV9od19pbml0aWFsaXplKHZvaWQpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiaHdfaW5pdGlhbGl6ZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiaHdfaW5pdGlhbGl6ZSIpOwogCiAJLyogV2UgbXVzdCBoYXZlIHRoZSBBQ1BJIHRhYmxlcyBieSB0aGUgdGltZSB3ZSBnZXQgaGVyZSAqLwogCiAJaWYgKCFhY3BpX2dibF9GQURUKSB7Ci0JCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0VSUk9SLCAiTm8gRkFEVCBpcyBwcmVzZW50XG4iKSk7CisJCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfRVJST1IsICJObyBGQURUIGlzIHByZXNlbnRcbiIpKTsKIAotCQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX05PX0FDUElfVEFCTEVTKTsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX05PX0FDUElfVEFCTEVTKTsKIAl9CiAKIAkvKiBTYW5pdHkgY2hlY2sgdGhlIEZBRFQgZm9yIHZhbGlkIHZhbHVlcyAqLwogCi0Jc3RhdHVzID0gYWNwaV91dF92YWxpZGF0ZV9mYWR0ICgpOwotCWlmIChBQ1BJX0ZBSUxVUkUgKHN0YXR1cykpIHsKLQkJcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXN0YXR1cyA9IGFjcGlfdXRfdmFsaWRhdGVfZmFkdCgpOworCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgeworCQlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9od19zZXRfbW9kZQpAQCAtMTA0LDI0ICs5NSwyMSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2h3X3NldF9tb2RlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGUpCithY3BpX3N0YXR1cyBhY3BpX2h3X3NldF9tb2RlKHUzMiBtb2RlKQogewogCi0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXRyeTsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJdTMyIHJldHJ5OwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiaHdfc2V0X21vZGUiKTsKKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJod19zZXRfbW9kZSIpOwogCiAJLyoKIAkgKiBBQ1BJIDIuMCBjbGFyaWZpZWQgdGhhdCBpZiBTTUlfQ01EIGluIEZBRFQgaXMgemVybywKIAkgKiBzeXN0ZW0gZG9lcyBub3Q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7Ci0JCQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwkJCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfSU5GTywKKwkJCQkJICAiTW9kZSAlWCBzdWNjZXNzZnVsbHkgZW5hYmxlZFxuIiwKKwkJCQkJICBtb2RlKSk7CisJCQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogCQl9CiAJCWFjcGlfb3Nfc3RhbGwoMTAwMCk7CiAJCXJldHJ5LS07CiAJfQogCi0JQUNQSV9SRVBPUlRfRVJST1IgKCgiSGFyZHdhcmUgbmV2ZXIgY2hhbmdlZCBtb2Rlc1xuIikpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfTk9fSEFSRFdBUkVfUkVTUE9OU0UpOworCUFDUElfUkVQT1JUX0VSUk9SKCgiSGFyZHdhcmUgbmV2ZXIgY2hhbmdlZCBtb2Rlc1xuIikpOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9OT19IQVJEV0FSRV9SRVNQT05TRSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9od19nZXRfbW9kZQpAQCAtMjAyLDM0ICsxOTIsMzAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11MzIKLWFjcGlfaHdfZ2V0X21vZGUgKAotCXZvaWQpCit1MzIgYWNwaV9od19nZXRfbW9kZSh2b2lkKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXUzMiB2YWx1ZTsKIAotCi0JQUNQSV9GVU5D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0ZXJfaW5mb1tpXS5lbmFibGVfYWRkcmVzcyk7Ci0JCWlmIChBQ1BJX0ZBSUxVUkUgKHN0YXR1cykpIHsKKwkJc3RhdHVzID0gYWNwaV9od19sb3dfbGV2ZWxfd3JpdGUoOCwKKwkJCQkJCSBncGVfYmxvY2stPnJlZ2lzdGVyX2luZm9baV0uCisJCQkJCQkgZW5hYmxlX2Zvcl93YWtlLAorCQkJCQkJICZncGVfYmxvY2stPnJlZ2lzdGVyX2luZm9baV0uCisJCQkJCQkgZW5hYmxlX2FkZHJlc3MpOworCQlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKIAkJCXJldHVybiAoc3RhdHVzKTsKIAkJfQogCX0KQEAgLTM2OSwxMiArMzUyLDExIEBACiAJcmV0dXJuIChBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2h3X2Rpc2FibGVfYWxsX2dwZXMKICAqCi0gKiBQQVJBTUVURVJTOiAgRmxhZ3MgICAgICAgICAgIC0gQUNQSV9OT1RfSVNSIG9yIEFDUElfSVNSCisgKiBQQVJBTUVURVJTOiAgTm9uZQogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCkBAIC0zODIsMjcgKzM2NCwyMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2h3X2Rpc2FibGVfYWxsX2dwZXMgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MpCithY3BpX3N0YXR1cyBhY3BpX2h3X2Rpc2FibGVfYWxsX2dwZXModm9pZCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0Y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ORU5UICAgICAgICAgIEFDUElfSEFSRFdBUkUKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoImh3cmVncyIpCi0KK0FDUElfTU9EVUxFX05BTUUoImh3cmVncyIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjUsNTcgKzY0LDUyIEBACiAgKiAgICAgICAgICAgICAgVEhJUyBGVU5DVElPTiBNVVNUIEJFIENBTExFRCBXSVRIIElOVEVSUlVQVFMgRElTQUJMRUQKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9od19jbGVhcl9hY3BpX3N0YXR1cyAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFncykKK2FjcGlfc3RhdHVzIGFjcGlfaHdfY2xlYXJfYWNwaV9zdGF0dXModTMyIGZsYWdzKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImh3X2NsZWFyX2FjcGlfc3RhdHVzIik7CiAKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiaHdfY2xlYXJfYWNwaV9zdGF0dXMiKTsKLQotCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfSU8sICJBYm91dCB0byB3cml0ZSAlMDRYIHRvICUwNFhcbiIsCi0JCUFDUElfQklUTUFTS19BTExfRklYRURfU1RBVFVTLAotCQkodTE2KSBhY3BpX2dibF9GQURULT54cG0xYV9ldnRfYmxrLmFkZHJlc3MpKTsKKwlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0lPLCAiQWJvdXQgdG8gd3JpdGUgJTA0WCB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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZ2V0X3NsZWVwX3R5cGVfZGF0YQpAQCAtMTMyLDUzICsxMjYsNDggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9zbGVlcF90eXBlX2RhdGEgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xlZXBfc3RhdGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc2xlZXBfdHlwZV9hLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNsZWVwX3R5cGVfYikKK2FjcGlfZ2V0X3NsZWVwX3R5cGVfZGF0YSh1OCBzbGVlcF9zdGF0ZSwgdTggKiBzbGVlcF90eXBlX2EsIHU4ICogc2xlZXBfdHlwZV9iKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gQUVfT0s7Ci0Jc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gICAgICBpbmZvOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNsZWVwX3N0YXRlX25hbWU7CisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CisJc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gaW5mbzsKKwljaGFyICpzbGVlcF9zdGF0ZV9uYW1lOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiYWNwaV9nZXRfc2xlZXBfdHlwZV9kYXRhIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJhY3BpX2dldF9zbGVlcF90eXBlX2RhdGEiKTsKIAogCS8qIFZhbGlkYXRlIHBhcmFtZ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ybl9vYmplY3QpKSk7CiAJfQogCi0JYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlIChpbmZvLnJldHVybl9vYmplY3QpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UoaW5mby5yZXR1cm5fb2JqZWN0KTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV9nZXRfc2xlZXBfdHlwZV9kYXRhKTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX2dldF9zbGVlcF90eXBlX2RhdGEpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTI0MiwyMiArMjI3LDIwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gKgotYWNwaV9od19nZXRfYml0X3JlZ2lzdGVyX2luZm8gKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJfaWQpCitzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbyAqYWNwaV9od19nZXRfYml0X3JlZ2lzdGVyX2luZm8odTMyIHJlZ2lzdGVyX2lkKQogewotCUFDUElfRlVOQ1RJT05fTkFNRSAoImh3X2dldF9iaXRfcmVnaXN0ZXJfaW5mbyIpOwotCisJQUNQSV9GVU5DVElPTl9OQU1FKCJod19nZXRfYml0X3JlZ2lzdGVyX2luZm8iKTsKIAogCWlmIChyZWdpc3Rlcl9pZCA+IEFDUElfQklUUkVHX01BWCkgewotCQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9FUlJPUiwgIkludmFsaWQgYml0X3JlZ2lzdGVyIElEOiAlWFxuIiwgcmVnaXN0ZXJfaWQpKTsKKwkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9FUlJPUiwKKwkJCQkgICJJbnZhbGlkIGJpdF9yZWdpc3RlciBJRDogJVhcbiIsCisJCQkJICByZWdpc3Rlcl9pZCkpOwogCQlyZXR1cm4gKE5VTEwpOwogCX0KIAogCXJldHVybiAoJmFjcGlfZ2JsX2JpdF9yZWdpc3Rlcl9pbmZvW3JlZ2lzdGVyX2lkXSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfcmVnaXN0ZXIKQEAgLTI3Myw1OSArMjU2LDU2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfZ2V0X3JlZ2lzdGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyX2lkLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnJldHVybl92YWx1ZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9zdGF0dXMgYWNwaV9nZXRfcmVnaXN0ZXIodTMyIHJlZ2lzdGVyX2lkLCB1MzIgKiByZXR1cm5fdmFsdWUsIHUzMiBmbGFncykKIHsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyX3ZhbHVlID0gMDsKLQlzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbyAgICpiaXRfcmVnX2luZm87Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJdTMy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VR19QUklOVCAoKEFDUElfREJfSU8sICJSZWFkIHZhbHVlICU4LjhYIHJlZ2lzdGVyICVYXG4iLAotCQkJCXJlZ2lzdGVyX3ZhbHVlLCBiaXRfcmVnX2luZm8tPnBhcmVudF9yZWdpc3RlcikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0lPLCAiUmVhZCB2YWx1ZSAlOC44WCByZWdpc3RlciAlWFxuIiwKKwkJCQkgIHJlZ2lzdGVyX3ZhbHVlLAorCQkJCSAgYml0X3JlZ19pbmZvLT5wYXJlbnRfcmVnaXN0ZXIpKTsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X3JlZ2lzdGVyKTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX2dldF9yZWdpc3Rlcik7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMzQyLDQwICszMjIsMzYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9zZXRfcmVnaXN0ZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJfaWQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV9zdGF0dXMgYWNwaV9zZXRfcmVnaXN0ZXIodTMyIHJlZ2lzdGVyX2lkLCB1MzIgdmFsdWUsIHUzMiBmbGFncykKIHsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAg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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9od19yZWdpc3Rlcl93cml0ZQpAQCAtNjEwLDEwOSArNjAyLDExMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2h3X3JlZ2lzdGVyX3dyaXRlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZV9sb2NrLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJfaWQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSkKK2FjcGlfc3RhdHVzIGFjcGlfaHdfcmVnaXN0ZXJfd3JpdGUodTggdXNlX2xvY2ssIHUzMiByZWdpc3Rlcl9pZCwgdTMyIHZhbHVlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImh3X3JlZ2lzdGVyX3dyaXRlIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJod19yZWdpc3Rlcl93cml0ZSIpOwogCiAJaWYgKEFDUElfTVRYX0xPQ0sgPT0gdXNlX2xvY2spIHsKLQkJc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4IChBQ1BJX01UWF9IQVJEV0FSRSk7Ci0JCWlmIChBQ1BJX0ZBSUxVUkUgKHN0YXR1cykpIHsKLQkJCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwkJc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4KEFDUElfTVRYX0hBUkRXQVJFKTsKKwkJaWYgKEFDUElfRkFJ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ZV9wb3J0IChhY3BpX2dibF9GQURULT5zbWlfY21kLCB2YWx1ZSwgOCk7CisJCXN0YXR1cyA9IGFjcGlfb3Nfd3JpdGVfcG9ydChhY3BpX2dibF9GQURULT5zbWlfY21kLCB2YWx1ZSwgOCk7CiAJCWJyZWFrOwogCi0KIAlkZWZhdWx0OgogCQlzdGF0dXMgPSBBRV9CQURfUEFSQU1FVEVSOwogCQlicmVhazsKIAl9CiAKLXVubG9ja19hbmRfZXhpdDoKKyAgICAgIHVubG9ja19hbmRfZXhpdDoKIAlpZiAoQUNQSV9NVFhfTE9DSyA9PSB1c2VfbG9jaykgewotCQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9IQVJEV0FSRSk7CisJCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9IQVJEV0FSRSk7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9od19sb3dfbGV2ZWxfcmVhZApAQCAtNzI4LDE3ICs3MjMsMTIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2h3X2xvd19sZXZlbF9yZWFkICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnZhbHVlLAotCXN0cnVjdCBhY3BpX2dlbmVyaWNfYWRkcmVzcyAgICAgKnJlZykKK2FjcGlfaHdfbG93X2xldmVsX3JlYWQodTMyIHdpZHR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HRoLAorCQkJICBBQ1BJX0ZPUk1BVF9VSU5UNjQoYWRkcmVzcyksCisJCQkgIGFjcGlfdXRfZ2V0X3JlZ2lvbl9uYW1lKHJlZy0+YWRkcmVzc19zcGFjZV9pZCkpKTsKIAogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfaHdfbG93X2xldmVsX3dyaXRlCkBAIC04MDgsMTcgKzc5NSwxMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfaHdfbG93X2xldmVsX3dyaXRlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUsCi0Jc3RydWN0IGFjcGlfZ2VuZXJpY19hZGRyZXNzICAgICAqcmVnKQorYWNwaV9od19sb3dfbGV2ZWxfd3JpdGUodTMyIHdpZHRoLCB1MzIgdmFsdWUsIHN0cnVjdCBhY3BpX2dlbmVyaWNfYWRkcmVzcyAqIHJlZykKIHsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3M7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJdTY0IGFkZHJlc3M7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX05BTUUgKCJod19sb3dfbGV2ZWxfd3JpdGUiKTsKLQorCUFDUElfRlVOQ1RJT05fTkFNRSgiaHdfbG93X2xldmVsX3dyaXRlIik7CiAKIAkvKgogCSAqIE11c3QgaGF2ZSBhIHZhbGlkIHBvaW50ZXI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05PVF9GT1VORCkgeworCQlBQ1BJX1JFUE9SVF9FUlJPUigoIk1ldGhvZCBfU1NUIGZhaWxlZCwgJXNcbiIsCisJCQkJICAgYWNwaV9mb3JtYXRfZXhjZXB0aW9uKHN0YXR1cykpKTsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZW50ZXJfc2xlZXBfc3RhdGUKQEAgLTIzMSw4MCArMjE5LDgyIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMgYXNtbGlua2FnZQotYWNwaV9lbnRlcl9zbGVlcF9zdGF0ZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGVlcF9zdGF0ZSkKK2FjcGlfc3RhdHVzIGFzbWxpbmthZ2UgYWNwaV9lbnRlcl9zbGVlcF9zdGF0ZSh1OCBzbGVlcF9zdGF0ZSkKIHsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBNMUFjb250cm9sOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE0xQmNvbnRyb2w7Ci0Jc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gICAqc2xlZXBfdHlwZV9yZWdfaW5mbzsKLQlzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbyAgICpzbGVlcF9lbmFibGVfcmVnX2luZm87Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbl92YWx1ZTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgIC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YUE9SVF9TWU1CT0woYWNwaV9lbnRlcl9zbGVlcF9zdGF0ZV9zNGJpb3MpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTQ2Nyw1NSArNDU5LDYyIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfbGVhdmVfc2xlZXBfc3RhdGUgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xlZXBfc3RhdGUpCithY3BpX3N0YXR1cyBhY3BpX2xlYXZlX3NsZWVwX3N0YXRlKHU4IHNsZWVwX3N0YXRlKQogewotCXN0cnVjdCBhY3BpX29iamVjdF9saXN0ICAgICAgICAgYXJnX2xpc3Q7Ci0JdW5pb24gYWNwaV9vYmplY3QgICAgICAgICAgICAgICBhcmc7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gICAqc2xlZXBfdHlwZV9yZWdfaW5mbzsKLQlzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbyAgICpzbGVlcF9lbmFibGVfcmVnX2luZm87Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQTTFBY29udHJvbDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBNMUJjb250cm9sOworCXN0cnVjdCBhY3BpX29iamVjdF9saXN0IGFyZ19saXN0OworCXVuaW9uIGFjcGlfb2JqZWN0IGFyZzsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gKnNsZWVwX3R5cGVfcmVnX2luZm87CisJc3RydWN0IG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Jlc29sdXRpb24pCithY3BpX3N0YXR1cyBhY3BpX2dldF90aW1lcl9yZXNvbHV0aW9uKHUzMiAqIHJlc29sdXRpb24pCiB7Ci0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfZ2V0X3RpbWVyX3Jlc29sdXRpb24iKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImFjcGlfZ2V0X3RpbWVyX3Jlc29sdXRpb24iKTsKIAogCWlmICghcmVzb2x1dGlvbikgewotCQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX0JBRF9QQVJBTUVURVIpOworCQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfQkFEX1BBUkFNRVRFUik7CiAJfQogCiAJaWYgKDAgPT0gYWNwaV9nYmxfRkFEVC0+dG1yX3ZhbF9leHQpIHsKIAkJKnJlc29sdXRpb24gPSAyNDsKLQl9Ci0JZWxzZSB7CisJfSBlbHNlIHsKIAkJKnJlc29sdXRpb24gPSAzMjsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfdGltZXIKQEAgLTk1LDI2ICs4OCwyMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2dldF90aW1lciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGlja3MpCithY3BpX3N0YXR1cyBhY3BpX2dldF90aW1lcih1MzIgKiB0aWNrcykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJhY3BpX2dldF90aW1lciIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiYWNwaV9nZXRfdGltZXIiKTsKIAogCWlmICghdGlja3MpIHsKLQkJcmV0dXJuX0FDUElfU1RBVFVTIChBRV9CQURfUEFSQU1FVEVSKTsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX0JBRF9QQVJBTUVURVIpOwogCX0KIAotCXN0YXR1cyA9IGFjcGlfaHdfbG93X2xldmVsX3JlYWQgKDMyLCB0aWNrcywgJmFjcGlfZ2JsX0ZBRFQtPnhwbV90bXJfYmxrKTsKKwlzdGF0dXMgPSBhY3BpX2h3X2xvd19sZXZlbF9yZWFkKDMyLCB0aWNrcywgJmFjcGlfZ2JsX0ZBRFQtPnhwbV90bXJfYmxrKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV9nZXRfdGltZXIpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X3RpbWVyKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTE0NiwyMSArMTM1LDE2IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9nZXRfdGltZXJfZHVyYXRpb24gKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRfdGlja3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRfdGlja3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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geworCQkJdG1waVszXSA9ICcwJyArIGk7CisJCQlpZiAoIWFjcGlfZXZhbGYoZWNfaGFuZGxlLCAmdCwgdG1waSwgImQiKSkKKwkJCQlyZXR1cm4gLUVJTzsKKwkJCWlmICh0aGVybWFsX3VwZHRfc3VwcG9ydGVkKQorCQkJCXRtcFtpXSA9ICh0IC0gMjczMiArIDUpIC8gMTA7CisJCQllbHNlCisJCQkJdG1wW2ldID0gdDsKKwkJfQorCisJCWxlbiArPSBzcHJpbnRmKHAgKyBsZW4sCisJCQkgICAgICAgInRlbXBlcmF0dXJlczpcdCVkICVkICVkICVkICVkICVkICVkICVkXG4iLAorCQkJICAgICAgIHRtcFswXSwgdG1wWzFdLCB0bXBbMl0sIHRtcFszXSwKKwkJCSAgICAgICB0bXBbNF0sIHRtcFs1XSwgdG1wWzZdLCB0bXBbN10pOworCX0KKworCXJldHVybiBsZW47Cit9CisKK3N0YXRpYyB1OCBlY2R1bXBfcmVnc1syNTZdOworCitzdGF0aWMgaW50IGVjZHVtcF9yZWFkKGNoYXIgKnApCit7CisJaW50IGxlbiA9IDA7CisJaW50IGksIGo7CisJdTggdjsKKworCWxlbiArPSBzcHJpbnRmKHAgKyBsZW4sICJFQyAgICAgICIKKwkJICAgICAgICIgKzAwICswMSArMDIgKzAzICswNCArMDUgKzA2ICswNyIKKwkJICAgICAgICIgKzA4ICswOSArMGEgKzBiICswYyArMGQgKzBlICswZlxuIik7CisJZm9yIChpID0gMDsgaSA8IDI1NjsgaSArPSAxNikgeworCQlsZW4gKz0gc3ByaW50ZihwICsgbGVuLCAiRUMgMHglMDJ4OiIsIGkpOworCQlmb3IgKGogPSAwOyBqIDwgMTY7IGorKykgeworCQkJaWYgKCFhY3BpX2VjX3JlYWQoaSArIGosICZ2KSkKKwkJCQlicmVhazsKKwkJCWlmICh2ICE9IGVjZHVtcF9yZWdzW2kgKyBqXSkKKwkJCQlsZW4gKz0gc3ByaW50ZihwICsgbGVuLCAiIColMDJ4Iiwgdik7CisJC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BlY2U3YTlkLi5lZGZiZTM0IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvbmFtZXNwYWNlL25zYWNjZXNzLmMKKysrIGIvZHJpdmVycy9hY3BpL25hbWVzcGFjZS9uc2FjY2Vzcy5jCkBAIC00MSwxNiArNDEsMTMgQEAKICAqIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFUy4KICAqLwogCi0KICNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KICNpbmNsdWRlIDxhY3BpL2FtbGNvZGUuaD4KICNpbmNsdWRlIDxhY3BpL2FjbmFtZXNwLmg+CiAjaW5jbHVkZSA8YWNwaS9hY2Rpc3BhdC5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX05BTUVTUEFDRQotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgibnNhY2Nlc3MiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJuc2FjY2VzcyIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjUsMjQgKzYyLDE5IEBACiAgKiBNVVRFWDogICAgICAgTG9ja3MgbmFtZXNwYWNlIGZvciBlbnRpcmUgZXhlY3V0aW9uCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfbnNfcm9vdF9pbml0aWFsaXplICgKLQl2b2lkKQorYWNwaV9zdGF0dXMgYWNwaV9uc19yb290X2luaXRpYWxpemUodm9pZCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCWNvbnN0IHN0cnVjdCBhY3BpX3ByZWRlZmluZWRfbmFtZXMgKmluaXRfd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qKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2xvb2t1cApAQCAtMjg2LDYyICsyOTAsNTcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX25zX2xvb2t1cCAoCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc2NvcGVfaW5mbywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwYXRobmFtZSwKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIHR5cGUsCi0JYWNwaV9pbnRlcnByZXRlcl9tb2RlICAgICAgICAgICBpbnRlcnByZXRlcl9tb2RlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MsCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSwKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICoqcmV0dXJuX25vZGUpCithY3BpX25zX2xvb2t1cCh1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnNjb3BlX2luZm8sCisJICAgICAgIGNoYXIgKnBhdGhuYW1lLAorCSAgICAgICBhY3BpX29iamVjdF90eXBlIHR5cGUsCisJICAgICAgIGFjcGlfaW50ZXJwcmV0ZXJfbW9kZSBpbnRlcnByZXRlcl9tb2RlLAorCSAgICAgICB1MzIgZmxhZ3MsCisJICAgICAgIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUsCisJICAgICAgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICoqcmV0dXJuX25vZGUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JY2hhciAgICAgICAgICAgIC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Y3VycmVudF9ub2RlKSk7CiAJCQl9CiAKIAkJCSpyZXR1cm5fbm9kZSA9IHRoaXNfbm9kZTsKLQkJCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwkJCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogCQl9CiAKIAkJLyoKQEAgLTU4NiwxOSArNTkxLDE2IEBACiAJCSAqCiAJCSAqIFRoZW4gd2UgaGF2ZSBhIHR5cGUgbWlzbWF0Y2guICBKdXN0IHdhcm4gYW5kIGlnbm9yZSBpdC4KIAkJICovCi0JCWlmICgobnVtX3NlZ21lbnRzICAgICAgID09IDApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmCi0JCQkodHlwZV90b19jaGVja19mb3IgICE9IEFDUElfVFlQRV9BTlkpICAgICAgICAgICAgICAgICAgICYmCi0JCQkodHlwZV90b19jaGVja19mb3IgICE9IEFDUElfVFlQRV9MT0NBTF9BTElBUykgICAgICAgICAgICYmCi0JCQkodHlwZV90b19jaGVja19mb3IgICE9IEFDUElfVFlQRV9MT0NBTF9NRVRIT0RfQUxJQVMpICAgICYmCi0JCQkodHlwZV90b19jaGVja19mb3IgICE9IEFDUElfVFlQRV9MT0NBTF9TQ09QRSkgICAgICAgICAgICYmCi0JCQkodGhpc19ub2RlLT50eXBlICAgICE9IEFDUElfVFlQRV9BTlkpICAgICAgICAgICAgICAgICAgICYmCi0JCQkodGhpc19ub2RlLT50eXBlICAgICE9IHR5cGVfdG9fY2hlY2tfZm9yKSkgeworCQlpZiAoKG51bV9zZWdtZW50cyA9PSAwKSAmJgorCQkgICAgKHR5cGVfdG9fY2hlY2tfZm9yICE9IEFDUElfVFlQRV9BTlkpICYmCisJCSAgICAodHlwZV90b19jaGVja19mb3IgIT0gQUNQSV9UWVBFX0xPQ0FMX0FMSUFTKSAmJgorCQkgICAgKHR5cGVfdG9fY2hlY2tfZm9yICE9IEFDUElfVFlQRV9MT0NBTF9NRVRIT0RfQUxJQVMpICYm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guICBIb3dldmVyLCB0aGUKLSAqICAgICAgICAgICAgICBub2RlcyBhcmUgbGlua2VkIGluIGFscGhhYmV0aWNhbCBvcmRlciB0byAxKSBwdXQgYWxsIHJlc2VydmVkCi0gKiAgICAgICAgICAgICAgbmFtZXMgKHN0YXJ0IHdpdGggdW5kZXJzY29yZSkgZmlyc3QsIGFuZCB0byAyKSBtYWtlIGEgcmVhZGFibGUKLSAqICAgICAgICAgICAgICBuYW1lc3BhY2UgZHVtcC4KKyAqICAgICAgICAgICAgICBOb3RlOiBDdXJyZW50IG5hbWVzcGFjZSBsb29rdXAgaXMgbGluZWFyIHNlYXJjaC4gVGhpcyBhcHBlYXJzCisgKiAgICAgICAgICAgICAgdG8gYmUgc3VmZmljaWVudCBhcyBuYW1lc3BhY2Ugc2VhcmNoZXMgY29uc3VtZSBvbmx5IGEgc21hbGwKKyAqICAgICAgICAgICAgICBmcmFjdGlvbiBvZiB0aGUgZXhlY3V0aW9uIHRpbWUgb2YgdGhlIEFDUEkgc3Vic3lzdGVtLgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfbnNfaW5zdGFsbF9ub2RlICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKnBhcmVudF9ub2RlLCAgIC8qIFBhcmVudCAqLwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUsICAgICAgICAgIC8qIE5ldyBDaGlsZCovCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlKQordm9pZCBhY3BpX25zX2luc3RhbGxfbm9kZShzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlLCBzdHJ1Y3QgYWNwaV9uYW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jMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX25zX2RlbGV0ZV9uYW1lc3BhY2VfYnlfb3duZXIgKAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3duZXJfaWQpCit2b2lkIGFjcGlfbnNfZGVsZXRlX25hbWVzcGFjZV9ieV9vd25lcihhY3BpX293bmVyX2lkIG93bmVyX2lkKQogewotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKmNoaWxkX25vZGU7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqZGVsZXRpb25fbm9kZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKnBhcmVudF9ub2RlOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpjaGlsZF9ub2RlOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpkZWxldGlvbl9ub2RlOworCXUzMiBsZXZlbDsKKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqcGFyZW50X25vZGU7CiAKKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMigibnNfZGVsZXRlX25hbWVzcGFjZV9ieV9vd25lciIsIG93bmVyX2lkKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyICgibnNfZGVsZXRlX25hbWVzcGFjZV9ieV9vd25lciIsIG93bmVyX2lkKTsKKwlpZiAob3duZXJfaWQgPT0gMCkgeworCQlyZXR1cm5fVk9JRDsKKwl9CiAKLQotCXBhcmVudF9ub2RlICAgPSBhY3BpX2dibF9yb290X25vZGU7Ci0JY2hpbGRfbm9kZSAgICA9IE5VTEw7CisJcGFyZW50X25vZGUgPSBhY3BpX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GUgPSBhY3BpX25zX2dldF9wYXJlbnRfbm9kZShwYXJlbnRfbm9kZSk7CiAJCX0KIAl9CiAKIAlyZXR1cm5fVk9JRDsKIH0KLQotCi0jaWZkZWYgQUNQSV9BTFBIQUJFVElDX05BTUVTUEFDRQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9uc19jb21wYXJlX25hbWVzCi0gKgotICogUEFSQU1FVEVSUzogIE5hbWUxICAgICAgICAgICAtIEZpcnN0IG5hbWUgdG8gY29tcGFyZQotICogICAgICAgICAgICAgIE5hbWUyICAgICAgICAgICAtIFNlY29uZCBuYW1lIHRvIGNvbXBhcmUKLSAqCi0gKiBSRVRVUk46ICAgICAgdmFsdWUgZnJvbSBzdHJuY21wCi0gKgotICogREVTQ1JJUFRJT046IENvbXBhcmUgdHdvIEFDUEkgbmFtZXMuICBOYW1lcyB0aGF0IGFyZSBwcmVmaXhlZCB3aXRoIGFuCi0gKiAgICAgICAgICAgICAgdW5kZXJzY29yZSBhcmUgZm9yY2VkIHRvIGJlIGFscGhhYmV0aWNhbGx5IGZpcnN0LgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWludAotYWNwaV9uc19jb21wYXJlX25hbWVzICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lMSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lMikKLXsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldmVyc2VkX25hbWUxW0FDUElfTkFNRV9TSVpFXTsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldmVyc2VkX25hbWUyW0FDUElfTkFNRV9TSVpFXTsKLQl1MzIgICAgICAgICAg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oQUNQSV9ERUJVR0dFUikKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtODAsMzYgKzcxLDM4IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9uc19wcmludF9wYXRobmFtZSAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fc2VnbWVudHMsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aG5hbWUpCit2b2lkIGFjcGlfbnNfcHJpbnRfcGF0aG5hbWUodTMyIG51bV9zZWdtZW50cywgY2hhciAqcGF0aG5hbWUpCiB7Ci0JQUNQSV9GVU5DVElPTl9OQU1FICgibnNfcHJpbnRfcGF0aG5hbWUiKTsKKwlhY3BpX25hdGl2ZV91aW50IGk7CiAKKwlBQ1BJX0ZVTkNUSU9OX05BTUUoIm5zX3ByaW50X3BhdGhuYW1lIik7CiAKLQlpZiAoIShhY3BpX2RiZ19sZXZlbCAmIEFDUElfTFZfTkFNRVMpIHx8ICEoYWNwaV9kYmdfbGF5ZXIgJiBBQ1BJX05BTUVTUEFDRSkpIHsKKwlpZiAoIShhY3BpX2RiZ19sZXZlbCAmIEFDUElfTFZfTkFNRVMpCisJICAgIHx8ICEoYWNwaV9kYmdfbGF5ZXIgJiBBQ1BJX05BTUVTUEFDRSkpIHsKIAkJcmV0dXJuOwogCX0KIAogCS8qIFByaW50IHRoZSBlbnRpcmUgbmFtZSAqLwogCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfTkFNRVMsICJbIikpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfTkFNRVMsICJbIikpOwogCiAJd2hpbGUgKG51bV9zZWdtZW50cykgewotCQlhY3BpX29zX3ByaW50ZiAoIiU0LjRzIiwgcGF0aG5hbWUpOwotCQlwYXRobmFtZSArPSBBQ1BJX05BTUVfU0laRTsKKwkJZm9yIChpID0gMDsgaSA8IDQ7IGkrKykgeworCQkJQUNQSV9JU19QUklOVChwYXRobmFtZVtpXSkgPworCQkJICAgIGFjcGlfb3NfcHJpbnRmKCIlYyIsIHBhdGhuYW1lW2ldKSA6CisJCQkgICAgYWNwaV9vc19wcmludGYoIj8iKTsKKwkJfQogCisJCXBhdGhuYW1lICs9IEFDUElfTkFNRV9TSVpFOwogCQludW1fc2VnbWVudHMtLTsKIAkJaWYgKG51bV9zZWdtZW50cykgewotCQkJYWNwaV9vc19wcmludGYgKCIuIik7CisJCQlhY3BpX29zX3ByaW50ZigiLiIpOwogCQl9CiAJfQogCi0JYWNwaV9vc19wcmludGYgKCJdXG4iKTsKKwlhY3BpX29zX3ByaW50ZigiXVxuIik7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19kdW1wX3BhdGhuYW1lCkBAIC0xMjcsMTUgKzEyMCwxMCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV9uc19kdW1wX3BhdGhuYW1lICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptc2csCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCkKK2FjcGlfbnNfZHVtcF9wYXRobmFtZShhY3BpX2hhbmRsZSBoYW5kbGUsIGNoYXIgKm1zZywgdTMyIGxldmVsLCB1MzIgY29tcG9uZW50KQogewogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoIm5zX2R1bXBfcGF0aG5hbWUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoIm5zX2R1bXBfcGF0aG5hbWUiKTsKIAogCS8qIERvIHRoaXMgb25seSBpZiB0aGUgcmVxdWVzdGVkIGRlYnVnIGxldmVsIGFuZCBjb21wb25lbnQgYXJlIGVuYWJsZWQgKi8KIApAQCAtMTQ1LDEyICsxMzMsMTEgQEAKIAogCS8qIENvbnZlcnQgaGFuZGxlIHRvIGEgZnVsbCBwYXRobmFtZSBhbmQgcHJpbnQgaXQgKHdpdGggc3VwcGxpZWQgbWVzc2FnZSkgKi8KIAotCWFjcGlfbnNfcHJpbnRfbm9kZV9wYXRobmFtZSAoaGFuZGxlLCBtc2cpOwotCWFjcGlfb3NfcHJpbnRmICgiXG4iKTsKKwlhY3BpX25zX3ByaW50X25vZGVfcGF0aG5hbWUoaGFuZGxlLCBtc2cpOworCWFjcGlfb3NfcHJpbnRmKCJcbiIpOwogCXJldHVybl9WT0lEOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfZHVtcF9vbmVfb2JqZWN0CkBAIC0xNjgsMjQgKzE1NSwxOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfbnNfZHVtcF9vbmVfb2JqZWN0ICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpCithY3BpX25zX2R1bXBfb25lX29iamVjdChhY3BpX2hhbmRsZSBvYmpfaGFuZGxlLAorCQkJdTMyIGxldmVsLCB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKQogewotCXN0cnVjdCBhY3BpX3dhbGtfaW5mbyAgICAgICAgICAgKmluZm8gPSAoc3RydWN0IGFjcGlfd2Fsa19pbmZvICopIGNvbnRleHQ7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqdGhpc19ub2RlOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjID0gTlVMTDsKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIG9ial90eXBlOwotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgdHlwZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzX3RvX2R1bXA7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYmdfbGV2ZWw7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOworCXN0cnVjdCBhY3BpX3dhbGtfaW5mbyAqaW5mbyA9IChzdHJ1Y3QgYWNwaV93YWxrX2luZm8gKiljb250ZXh0OworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICp0aGlzX25vZGU7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2MgPSBOVUxMOworCWFjcGlfb2JqZWN0X3R5cGUgb2JqX3R5cGU7CisJYWNwaV9vYmplY3RfdHlwZSB0eXBlOworCXUzMiBieXRlc190b19kdW1wOworCXUzMiBkYmdfbGV2ZWw7CisJdTMyIGk7CiAKLQotCUFDUElfRlVOQ1RJT05fTkFNRSAoIm5zX2R1bXBfb25lX29iamVjdCIpOwotCisJQUNQSV9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iAJCWNhc2UgQUNQSV9UWVBFX0xPQ0FMX0lOREVYX0ZJRUxEOgotCQkJb2JqX2Rlc2MgPSAodm9pZCAqKSBvYmpfZGVzYy0+aW5kZXhfZmllbGQuaW5kZXhfb2JqOworCQkJb2JqX2Rlc2MgPSAodm9pZCAqKW9ial9kZXNjLT5pbmRleF9maWVsZC5pbmRleF9vYmo7CiAJCQlicmVhazsKIAogCQlkZWZhdWx0OgogCQkJZ290byBjbGVhbnVwOwogCQl9CiAKLQkJb2JqX3R5cGUgPSBBQ1BJX1RZUEVfSU5WQUxJRDsgIC8qIFRlcm1pbmF0ZSBsb29wIGFmdGVyIG5leHQgcGFzcyAqLworCQlvYmpfdHlwZSA9IEFDUElfVFlQRV9JTlZBTElEOwkvKiBUZXJtaW5hdGUgbG9vcCBhZnRlciBuZXh0IHBhc3MgKi8KIAl9CiAKLWNsZWFudXA6Ci0JYWNwaV9vc19wcmludGYgKCJcbiIpOworICAgICAgY2xlYW51cDoKKwlhY3BpX29zX3ByaW50ZigiXG4iKTsKIAlyZXR1cm4gKEFFX09LKTsKIH0KIAotCiAjaWZkZWYgQUNQSV9GVVRVUkVfVVNBR0UKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNTkxLDI5ICs2MDAsMjUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHZvaWQKLWFjcGlfbnNfZHVtcF9vYmplY3RzICgKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIHR5cGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5X3R5cGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfZGVwdGgsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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VU0FHRSAqLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTYyOCwyNiArNjMzLDIwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9uc19kdW1wX2VudHJ5ICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlYnVnX2xldmVsKQordm9pZCBhY3BpX25zX2R1bXBfZW50cnkoYWNwaV9oYW5kbGUgaGFuZGxlLCB1MzIgZGVidWdfbGV2ZWwpCiB7Ci0Jc3RydWN0IGFjcGlfd2Fsa19pbmZvICAgICAgICAgICBpbmZvOworCXN0cnVjdCBhY3BpX3dhbGtfaW5mbyBpbmZvOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJaW5mby5kZWJ1Z19sZXZlbCA9IGRlYnVnX2xldmVsOwotCWluZm8ub3duZXJfaWQgPSBBQ1BJX1VJTlQzMl9NQVg7CisJaW5mby5vd25lcl9pZCA9IEFDUElfT1dORVJfSURfTUFYOwogCWluZm8uZGlzcGxheV90eXBlID0gQUNQSV9ESVNQTEFZX1NVTU1BUlk7CiAKLQkodm9pZCkgYWNwaV9uc19kdW1wX29uZV9vYmplY3QgKGhhbmRsZSwgMSwgJmluZm8sIE5VTEwpOworCSh2b2lkKWFjcGlfbnNfZHVtcF9vbmVfb2JqZWN0KGhhbmRsZSwgMSwgJmluZm8sIE5VTEwpOwogfQogCi0KLSNpZmRlZiBfQUNQSV9BU0xfQ09NUElMRVIKKyNpZmRlZiBBQ1BJX0FTTF9DT01QSUxFUgogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19kdW1wX3RhYmxlcwpAQCAtNjYzLDIzICs2NjIsMTkgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX25zX2R1bXBfdGFibGVzICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIHNlYXJjaF9iYXNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2RlcHRoKQordm9pZCBhY3BpX25zX2R1bXBfdGFibGVzKGFjcGlfaGFuZGxlIHNlYXJjaF9iYXNlLCB1MzIgbWF4X2RlcHRoKQogewotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc2VhcmNoX2hhbmRsZSA9IHNlYXJjaF9iYXNlOworCWFjcGlfaGFuZGxlIHNlYXJjaF9oYW5kbGUgPSBzZWFyY2hfYmFzZTsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoIm5zX2R1bXBfdGFibGVzIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJuc19kdW1wX3RhYmxlcyIpOwogCiAJaWYgKCFhY3BpX2dibF9yb290X25vZGUpIHsKIAkJLyoKIAkJICogSWYgdGhlIG5hbWUgc3BhY2UgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLAogCQkgKiB0aGVyZSBpcyBub3RoaW5nIHRvIGR1bXAuCiAJCSAqLwotCQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9UQUJMRVMsICJuYW1lc3BhY2Ugbm90IGluaXRpYWxpemVkIVxuIikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX1RBQkxFUywKKwkJCQkgICJuYW1l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BhL2RyaXZlcnMvYWNwaS9uYW1lc3BhY2UvbnNkdW1wZHYuYworKysgYi9kcml2ZXJzL2FjcGkvbmFtZXNwYWNlL25zZHVtcGR2LmMKQEAgLTQxLDIwICs0MSwxNSBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogCi0KIC8qIFRCRDogVGhpcyBlbnRpcmUgbW9kdWxlIGlzIGFwcGFyZW50bHkgb2Jzb2xldGUgYW5kIHNob3VsZCBiZSByZW1vdmVkICovCiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX05BTUVTUEFDRQotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgibnNkdW1wZHYiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJuc2R1bXBkdiIpCiAjaWZkZWYgQUNQSV9PQlNPTEVURV9GVU5DVElPTlMKICNpZiBkZWZpbmVkKEFDUElfREVCVUdfT1VUUFVUKSB8fCBkZWZpbmVkKEFDUElfREVCVUdHRVIpCi0KICNpbmNsdWRlIDxhY3BpL2FjbmFtZXNwLmg+Ci0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfZHVtcF9vbmVfZGV2aWNlCkBAIC03MCw0NCArNjUsMzkgQEAKICAqICAgICAgICAgICAgICBUaGlzIHByb2NlZHVyZSBpcyBhIHVzZXJfZnVuY3Rpb24gY2FsbGVkIGJ5IGFjcGlfbnNfd2Fsa19uYW1lc3BhY2UuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX25zX2R1bXBfb25lX2RldmljZSAoCi0JY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2FjaW50ZXJwLmg+CiAjaW5jbHVkZSA8YWNwaS9hY25hbWVzcC5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX05BTUVTUEFDRQotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgibnNldmFsIikKK0FDUElfTU9EVUxFX05BTUUoIm5zZXZhbCIpCiAKIC8qIExvY2FsIHByb3RvdHlwZXMgKi8KLQogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX25zX2V4ZWN1dGVfY29udHJvbF9tZXRob2QgKAotCXN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICAgICAgKmluZm8pOworYWNwaV9uc19leGVjdXRlX2NvbnRyb2xfbWV0aG9kKHN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICppbmZvKTsKIAotc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX25zX2dldF9vYmplY3RfdmFsdWUgKAotCXN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICAgICAgKmluZm8pOwotCitzdGF0aWMgYWNwaV9zdGF0dXMgYWNwaV9uc19nZXRfb2JqZWN0X3ZhbHVlKHN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICppbmZvKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC04NSw0OCArNzgsNDQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX25zX2V2YWx1YXRlX3JlbGF0aXZlICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwYXRobmFtZSwKLQlzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAgICAgICppbmZvKQorYWNwaV9uc19ldmFsdWF0ZV9yZ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BVFVTIChzdGF0dXMpOworICAgICAgY2xlYW51cDE6CisJQUNQSV9NRU1fRlJFRShpbnRlcm5hbF9wYXRoKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2V2YWx1YXRlX2J5X25hbWUKQEAgLTE4OSw2OCArMTc3LDYzIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9uc19ldmFsdWF0ZV9ieV9uYW1lICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwYXRobmFtZSwKLQlzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAgICAgICppbmZvKQorYWNwaV9uc19ldmFsdWF0ZV9ieV9uYW1lKGNoYXIgKnBhdGhuYW1lLCBzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAqaW5mbykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbnRlcm5hbF9wYXRoID0gTlVMTDsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJY2hhciAqaW50ZXJuYWxfcGF0aCA9IE5VTEw7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJuc19ldmFsdWF0ZV9ieV9uYW1lIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJuc19ldmFsdWF0ZV9ieV9uYW1lIik7CiAKIAkvKiBCdWlsZCBhbiBpbnRlcm5hbCBuYW1lIHN0cmluZyBmb3IgdGhlIG1ldGhvZCAqLwogCi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GUoaW5mbyk7CiAKLQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9OQU1FUywgIioqKiBDb21wbGV0ZWQgZXZhbCBvZiBvYmplY3QgJXMgKioqXG4iLAotCQlwYXRobmFtZSkpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfTkFNRVMsCisJCQkgICIqKiogQ29tcGxldGVkIGV2YWwgb2Ygb2JqZWN0ICVzICoqKlxuIiwgcGF0aG5hbWUpKTsKIAotCi1jbGVhbnVwOgorICAgICAgY2xlYW51cDoKIAogCS8qIENsZWFudXAgKi8KIAogCWlmIChpbnRlcm5hbF9wYXRoKSB7Ci0JCUFDUElfTUVNX0ZSRUUgKGludGVybmFsX3BhdGgpOworCQlBQ1BJX01FTV9GUkVFKGludGVybmFsX3BhdGgpOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2V2YWx1YXRlX2J5X2hhbmRsZQpAQCAtMjc1LDI2ICsyNTgsMjIgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9uc19ldmFsdWF0ZV9ieV9oYW5kbGUgKAotCXN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICAgICAgKmluZm8pCithY3BpX3N0YXR1cyBhY3BpX25zX2V2YWx1YXRlX2J5X2hhbmRsZShzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAqaW5mbykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YX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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2V4ZWN1dGVfY29udHJvbF9tZXRob2QKICAqCiAgKiBQQVJBTUVURVJTOiAgSW5mbyAgICAgICAgICAgIC0gTWV0aG9kIGluZm8gYmxvY2ssIGNvbnRhaW5zOgogICogICAgICAgICAgICAgICAgICBOb2RlICAgICAgICAgICAgLSBNZXRob2QgTm9kZSB0byBleGVjdXRlCisgKiAgICAgICAgICAgICAgICAgIG9ial9kZXNjICAgICAgICAtIE1ldGhvZCBvYmplY3QKICAqICAgICAgICAgICAgICAgICAgUGFyYW1ldGVycyAgICAgIC0gTGlzdCBvZiBwYXJhbWV0ZXJzIHRvIHBhc3MgdG8gdGhlIG1ldGhvZCwKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVybWluYXRlZCBieSBOVUxMLiBQYXJhbXMgaXRzZWxmIG1heSBiZQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMIGlmIG5vIHBhcmFtZXRlcnMgYXJlIGJlaW5nIHBhc3NlZC4KQEAgLTM4MywzMSArMzYzLDI5IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfZXhlY3V0ZV9jb250cm9sX21ldGhvZCAoCi0Jc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gICAgICAqaW5mbykKK2FjcGlfbnNfZXhlY3V0ZV9jb250cm9sX21ldGhvZChzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAqaW5mbykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYzsKKwlhY3BpX3N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UKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoIm5zaW5pdCIpCitBQ1BJX01PRFVMRV9OQU1FKCJuc2luaXQiKQogCiAvKiBMb2NhbCBwcm90b3R5cGVzICovCitzdGF0aWMgYWNwaV9zdGF0dXMKK2FjcGlfbnNfaW5pdF9vbmVfb2JqZWN0KGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbGV2ZWwsIHZvaWQgKmNvbnRleHQsIHZvaWQgKipyZXR1cm5fdmFsdWUpOwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfaW5pdF9vbmVfb2JqZWN0ICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpOwotCi1zdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfaW5pdF9vbmVfZGV2aWNlICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXN0aW5nX2xldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSk7Ci0KK2FjcGlfbnNfaW5pdF9vbmVfZGV2aWNlKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbmVzdGluZ19sZXZlbCwgdm9pZCAqY29udGV4dCwgdm9pZCAqKnJldHVybl92YWx1ZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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m51bV9JTkkpKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2luaXRfb25lX29iamVjdApAQCAtMjA4LDI4ICsxOTEsMjUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9uc19pbml0X29uZV9vYmplY3QgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgb2JqX2hhbmRsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSkKK2FjcGlfbnNfaW5pdF9vbmVfb2JqZWN0KGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbGV2ZWwsIHZvaWQgKmNvbnRleHQsIHZvaWQgKipyZXR1cm5fdmFsdWUpCiB7Ci0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXN0cnVjdCBhY3BpX2luaXRfd2Fsa19pbmZvICAgICAgKmluZm8gPSAoc3RydWN0IGFjcGlfaW5pdF93YWxrX2luZm8gKikgY29udGV4dDsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpub2RlID0gKHN0cnVjdCBhY3BpX25hbWVzcGFjZ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REVCVUdfUFJJTlRfUkFXICgoQUNQSV9EQl9JTklULCAiLiIpKTsKKwkJQUNQSV9ERUJVR19QUklOVF9SQVcoKEFDUElfREJfSU5JVCwgIi4iKSk7CiAJfQogCiAJLyoKIAkgKiBXZSBpZ25vcmUgZXJyb3JzIGZyb20gYWJvdmUsIGFuZCBhbHdheXMgcmV0dXJuIE9LLCBzaW5jZSB3ZSBkb24ndCB3YW50CiAJICogdG8gYWJvcnQgdGhlIHdhbGsgb24gYW55IHNpbmdsZSBlcnJvci4KIAkgKi8KLQlhY3BpX2V4X2V4aXRfaW50ZXJwcmV0ZXIgKCk7CisJYWNwaV9leF9leGl0X2ludGVycHJldGVyKCk7CiAJcmV0dXJuIChBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19pbml0X29uZV9kZXZpY2UKQEAgLTM0OCw0MSArMzI4LDM3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfaW5pdF9vbmVfZGV2aWNlICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXN0aW5nX2xldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSkKK2FjcGlfbnNfaW5pdF9vbmVfZGV2aWNlKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbmVzdGluZ19sZXZlbCwgdm9pZCAqY29udGV4dCwgdm9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RsZSk7CiAKLXN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9uc19kZWxldGVfc3VidHJlZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBzdGFydF9oYW5kbGUpOworc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfbnNfZGVsZXRlX3N1YnRyZWUoYWNwaV9oYW5kbGUgc3RhcnRfaGFuZGxlKTsKICNlbmRpZgogCi0KICNpZm5kZWYgQUNQSV9OT19NRVRIT0RfRVhFQ1VUSU9OCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTgyLDQwICs3MiwzOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfbnNfbG9hZF90YWJsZSAoCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfZGVzYywKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpub2RlKQorYWNwaV9uc19sb2FkX3RhYmxlKHN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgKnRhYmxlX2Rlc2MsCisJCSAgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoIm5zX2xvYWRfdGFibGUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoIm5zX2xvYWRfdGFibGUiKTsKIAogCS8qIENoZWNrIGlmIHRhYmxlIGNvbnRhaW5zIHZhbGlkIEFNTCAobXVzdCBiZSBEU0RULCBQU0RULCBTU0RULCBld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BhY3BpX2RzX2luaXRpYWxpemVfb2JqZWN0cyh0YWJsZV9kZXNjLCBub2RlKTsKIAotCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lORk8sCi0JCSIqKioqIENvbXBsZXRlZCBUYWJsZSBNZXRob2QgUGFyc2luZyBhbmQgT2JqZWN0IEluaXRpYWxpemF0aW9uICoqKipcbiIpKTsKKwlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0lORk8sCisJCQkgICIqKioqIENvbXBsZXRlZCBUYWJsZSBNZXRob2QgUGFyc2luZyBhbmQgT2JqZWN0IEluaXRpYWxpemF0aW9uICoqKipcbiIpKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2xvYWRfdGFibGVfYnlfdHlwZQpAQCAtMTc0LDIxICsxNjIsMTcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfbG9hZF90YWJsZV9ieV90eXBlICgKLQlhY3BpX3RhYmxlX3R5cGUgICAgICAgICAgICAgICAgIHRhYmxlX3R5cGUpCitzdGF0aWMgYWNwaV9zdGF0dXMgYWNwaV9uc19sb2FkX3RhYmxlX2J5X3R5cGUoYWNwaV90YWJsZV90eXBlIHRhYmxlX3R5cGUpCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCXN0cnVjdCBhY3BpX3RhYmxlX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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMzUzLDI0ICszMDUsMjAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfbnNfZGVsZXRlX3N1YnRyZWUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc3RhcnRfaGFuZGxlKQorc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfbnNfZGVsZXRlX3N1YnRyZWUoYWNwaV9oYW5kbGUgc3RhcnRfaGFuZGxlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgY2hpbGRfaGFuZGxlOwotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgcGFyZW50X2hhbmRsZTsKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG5leHRfY2hpbGRfaGFuZGxlOwotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZHVtbXk7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbDsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJYWNwaV9oYW5kbGUgY2hpbGRfaGFuZGxlOworCWFjcGlfaGFuZGxlIHBhcmVudF9oYW5kbGU7CisJYWNwaV9oYW5kbGUgbmV4dF9jaGlsZF9oYW5kbGU7CisJYWNwaV9oYW5kbGUgZHVtbXk7CisJdTMyIGxldmVsOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgibnNfZGVsZXRlX3N1YnRyZWUiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoIm5zX2RlbGV0ZV9zdWJ0cmVlIik7CiAKIAlwYXJlbnRfaGFuZG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ZWxldGUgdGhlIHN0YXJ0aW5nIG9iamVjdCwgYW5kIHdlIGFyZSBkb25lICovCiAKLQlhY3BpX25zX2RlbGV0ZV9ub2RlIChjaGlsZF9oYW5kbGUpOworCWFjcGlfbnNfZGVsZXRlX25vZGUoY2hpbGRfaGFuZGxlKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiAgRlVOQ1RJT046ICAgICAgIGFjcGlfbnNfdW5sb2FkX25hbWVfc3BhY2UKQEAgLTQ0MSwzMiArMzg4LDI3IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfbnNfdW5sb2FkX25hbWVzcGFjZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUpCithY3BpX3N0YXR1cyBhY3BpX25zX3VubG9hZF9uYW1lc3BhY2UoYWNwaV9oYW5kbGUgaGFuZGxlKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoIm5zX3VubG9hZF9uYW1lX3NwYWNlIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJuc191bmxvYWRfbmFtZV9zcGFjZSIpOwogCiAJLyogUGFyYW1ldGVyIHZhbGlkYXRpb24gKi8KIAogCWlmICghYWNwaV9nYmxfcm9vdF9ub2RlKSB7Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfTk9fTkFNRVNQQUNFKTsKKwkJ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iAKIC8qIExvY2FsIHByb3RvdHlwZXMgKi8KLQogc3RhdGljIHZvaWQKLWFjcGlfbnNfYnVpbGRfZXh0ZXJuYWxfcGF0aCAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmFtZV9idWZmZXIpOwotCithY3BpX25zX2J1aWxkX2V4dGVybmFsX3BhdGgoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsCisJCQkgICAgYWNwaV9zaXplIHNpemUsIGNoYXIgKm5hbWVfYnVmZmVyKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03NSwxNyArNjksMTMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB2b2lkCi1hY3BpX25zX2J1aWxkX2V4dGVybmFsX3BhdGggKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWVfYnVmZmVyKQorYWNwaV9uc19idWlsZF9leHRlcm5hbF9wYXRoKHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlLAorCQkJICAgIGFjcGlfc2l6ZSBzaXplLCBjaGFyICpuYW1lX2J1ZmZlcikKIHsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKnBhcmVudF9ub2RlOworCWFjc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isJCQkJICAiQ291bGQgbm90IGNvbnN0cnVjdCBwYXRobmFtZTsgaW5kZXg9JVgsIHNpemU9JVgsIFBhdGg9JXNcbiIsCisJCQkJICAodTMyKSBpbmRleCwgKHUzMikgc2l6ZSwgJm5hbWVfYnVmZmVyW3NpemVdKSk7CiAJfQogCiAJcmV0dXJuOwogfQogCi0KICNpZmRlZiBBQ1BJX0RFQlVHX09VVFBVVAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0xNDQsMzcgKzEzMywzMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWNoYXIgKgotYWNwaV9uc19nZXRfZXh0ZXJuYWxfcGF0aG5hbWUgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUpCitjaGFyICphY3BpX25zX2dldF9leHRlcm5hbF9wYXRobmFtZShzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZSkKIHsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lX2J1ZmZlcjsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemU7CisJY2hhciAqbmFtZV9idWZmZXI7CisJYWNwaV9zaXplIHNpemU7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0VfUFRSICgibnNfZ2V0X2V4dGVybmFsX3BhdGhuYW1lIiwgbm9kZSk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1BUUigibnNfZ2V0X2V4dGVybmFsX3BhdGhuYW1lIiwgbm9kZSk7CiAKIAkvKiBDYWxjdWxhdGUgcmVxdWlyZWQgYnVmZmVyIHNpemUgYmFzZWQgb24gZGVwdGggYmVsb3cgcm9vdCAqLwogCi0Jc2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SAqLwogCX0KIAotCXJldHVybiAoc2l6ZSArIDEpOyAgLyogKzEgZm9yIG51bGwgc3RyaW5nIHRlcm1pbmF0b3IgKi8KKwlyZXR1cm4gKHNpemUgKyAxKTsJLyogKzEgZm9yIG51bGwgc3RyaW5nIHRlcm1pbmF0b3IgKi8KIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2hhbmRsZV90b19wYXRobmFtZQpAQCAtMjMzLDQxICsyMTIsMzYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX25zX2hhbmRsZV90b19wYXRobmFtZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICB0YXJnZXRfaGFuZGxlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKmJ1ZmZlcikKK2FjcGlfbnNfaGFuZGxlX3RvX3BhdGhuYW1lKGFjcGlfaGFuZGxlIHRhcmdldF9oYW5kbGUsCisJCQkgICBzdHJ1Y3QgYWNwaV9idWZmZXIgKiBidWZmZXIpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZTsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkX3NpemU7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOworCWFjcGlfc2l6ZSByZXF1aXJlZF9zaXplOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIoIm5zX2hhbmRsZV90b19wYX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QiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJuc29iamVjdCIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzEsMjAgKzY4LDE1IEBACiAgKiBNVVRFWDogICAgICAgQXNzdW1lcyBuYW1lc3BhY2UgaXMgbG9ja2VkCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfbnNfYXR0YWNoX29iamVjdCAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmplY3QsCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlKQorYWNwaV9uc19hdHRhY2hfb2JqZWN0KHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlLAorCQkgICAgICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmplY3QsIGFjcGlfb2JqZWN0X3R5cGUgdHlwZSkKIHsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmpfZGVzYzsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpsYXN0X29ial9kZXNjOwotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgb2JqZWN0X3R5cGUgPSBBQ1BJX1RZUEVfQU5ZOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmxhc3Rfb2JqX2Rlc2M7CisJYWNwaV9vYmplY3RfdHlwZSBvYmplY3RfdHlwZSA9IEFDUElfVFlQRV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dmFsdWUncyByZWZlcmVuY2UgY291bnQKIAkJICogKGlmIGl0IGlzIGFuIGludGVybmFsIG9iamVjdCkKIAkJICovCi0JCWFjcGlfdXRfYWRkX3JlZmVyZW5jZSAob2JqX2Rlc2MpOworCQlhY3BpX3V0X2FkZF9yZWZlcmVuY2Uob2JqX2Rlc2MpOwogCiAJCS8qCiAJCSAqIEhhbmRsZSBvYmplY3RzIHdpdGggbXVsdGlwbGUgZGVzY3JpcHRvcnMgLSB3YWxrCkBAIC0xODUsMTMgKzE3NiwxMiBAQAogCQlsYXN0X29ial9kZXNjLT5jb21tb24ubmV4dF9vYmplY3QgPSBub2RlLT5vYmplY3Q7CiAJfQogCi0Jbm9kZS0+dHlwZSAgICAgPSAodTgpIG9iamVjdF90eXBlOwotCW5vZGUtPm9iamVjdCAgID0gb2JqX2Rlc2M7CisJbm9kZS0+dHlwZSA9ICh1OCkgb2JqZWN0X3R5cGU7CisJbm9kZS0+b2JqZWN0ID0gb2JqX2Rlc2M7CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfZGV0YWNoX29iamVjdApAQCAtMjA2LDMwICsxOTYsMjcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX25zX2RldGFjaF9vYmplY3QgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUpCit2b2lkIGFjcGlfbnNfZGV0YWNoX29iamVjdChzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZSkKIH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JqX2Rlc2MpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fAotCQkoQUNQSV9HRVRfT0JKRUNUX1RZUEUgKG9ial9kZXNjKSA9PSBBQ1BJX1RZUEVfTE9DQUxfREFUQSkgfHwKLQkJKCFvYmpfZGVzYy0+Y29tbW9uLm5leHRfb2JqZWN0KSAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8Ci0JCShBQ1BJX0dFVF9PQkpFQ1RfVFlQRSAob2JqX2Rlc2MtPmNvbW1vbi5uZXh0X29iamVjdCkgPT0gQUNQSV9UWVBFX0xPQ0FMX0RBVEEpKSB7Ci0JCXJldHVybl9QVFIgKE5VTEwpOworCWlmICgoIW9ial9kZXNjKSB8fAorCSAgICAoQUNQSV9HRVRfT0JKRUNUX1RZUEUob2JqX2Rlc2MpID09IEFDUElfVFlQRV9MT0NBTF9EQVRBKSB8fAorCSAgICAoIW9ial9kZXNjLT5jb21tb24ubmV4dF9vYmplY3QpIHx8CisJICAgIChBQ1BJX0dFVF9PQkpFQ1RfVFlQRShvYmpfZGVzYy0+Y29tbW9uLm5leHRfb2JqZWN0KSA9PQorCSAgICAgQUNQSV9UWVBFX0xPQ0FMX0RBVEEpKSB7CisJCXJldHVybl9QVFIoTlVMTCk7CiAJfQogCi0JcmV0dXJuX1BUUiAob2JqX2Rlc2MtPmNvbW1vbi5uZXh0X29iamVjdCk7CisJcmV0dXJuX1BUUihvYmpfZGVzYy0+Y29tbW9uLm5leHRfb2JqZWN0KTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2F0dGFjaF9kYXRhCkBAIC0zMzAsMjMgKzMxNCwyMCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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OworCQkJfSBlbHNlIHsKIAkJCQlub2RlLT5vYmplY3QgPSBvYmpfZGVzYy0+Y29tbW9uLm5leHRfb2JqZWN0OwogCQkJfQogCi0JCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UgKG9ial9kZXNjKTsKKwkJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShvYmpfZGVzYyk7CiAJCQlyZXR1cm4gKEFFX09LKTsKIAkJfQogCkBAIC00MjMsNyArNDAwLDYgQEAKIAlyZXR1cm4gKEFFX05PVF9GT1VORCk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19nZXRfYXR0YWNoZWRfZGF0YQpAQCAtNDQwLDE4ICs0MTYsMTUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX25zX2dldF9hdHRhY2hlZF9kYXRhICgKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpub2RlLAotCWFjcGlfb2JqZWN0X2hhbmRsZXIgICAgICAgICAgICAgaGFuZGxlciwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqZGF0YSkKK2FjcGlfbnNfZ2V0X2F0dGFjaGVkX2RhdGEoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKiBub2RlLAorCQkJICBhY3BpX29iamVjdF9oYW5kbGVyIGhhbmRsZXIsIHZvaWQgKipkYXRhKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2M7CiAKIAlvYmpfZGVzYyA9IG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U1FICAgICgibnNwYXJzZSIpCi0KK0FDUElfTU9EVUxFX05BTUUoIm5zcGFyc2UiKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTY0LDU0ICs2MSw1MCBAQAogICogREVTQ1JJUFRJT046IFBlcmZvcm0gb25lIGNvbXBsZXRlIHBhcnNlIG9mIGFuIEFDUEkvQU1MIHRhYmxlLgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KIGFjcGlfc3RhdHVzCi1hY3BpX25zX29uZV9jb21wbGV0ZV9wYXJzZSAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXNzX251bWJlciwKLQlzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICAgICAgICAgICp0YWJsZV9kZXNjKQorYWNwaV9uc19vbmVfY29tcGxldGVfcGFyc2UodTggcGFzc19udW1iZXIsIHN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgKiB0YWJsZV9kZXNjKQogewotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKnBhcnNlX3Jvb3Q7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZTsKKwl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqcGFyc2Vfcm9vdDsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZTsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoIm5zX29uZV9jb21wbGV0ZV9wYXJzZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgibnNfb25l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AogCQkvKgpAQCAtMTU5LDE1ICsxNTgsMTQgQEAKIAogCS8qIFNlYXJjaGVkIGVudGlyZSBuYW1lc3BhY2UgbGV2ZWwsIG5vdCBmb3VuZCAqLwogCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfTkFNRVMsCi0JCSJOYW1lIFslNC40c10gKCVzKSBub3QgZm91bmQgaW4gc2VhcmNoIGluIHNjb3BlIFslNC40c10gJXAgZmlyc3QgY2hpbGQgJXBcbiIsCi0JCShjaGFyICopICZ0YXJnZXRfbmFtZSwgYWNwaV91dF9nZXRfdHlwZV9uYW1lICh0eXBlKSwKLQkJYWNwaV91dF9nZXRfbm9kZV9uYW1lIChub2RlKSwgbm9kZSwgbm9kZS0+Y2hpbGQpKTsKKwlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX05BTUVTLAorCQkJICAiTmFtZSBbJTQuNHNdICglcykgbm90IGZvdW5kIGluIHNlYXJjaCBpbiBzY29wZSBbJTQuNHNdICVwIGZpcnN0IGNoaWxkICVwXG4iLAorCQkJICAoY2hhciAqKSZ0YXJnZXRfbmFtZSwgYWNwaV91dF9nZXRfdHlwZV9uYW1lKHR5cGUpLAorCQkJICBhY3BpX3V0X2dldF9ub2RlX25hbWUobm9kZSksIG5vZGUsIG5vZGUtPmNoaWxkKSk7CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX05PVF9GT1VORCk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX05PVF9GT1VORCk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19zZWFyY2hfcGFyZW50X3RyZWUKQEAgLTE5NCw0MyArMTkyLDQyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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25vZGUodGFyZ2V0X25hbWUsIHBhcmVudF9ub2RlLAorCQkJCQkgICAgIEFDUElfVFlQRV9BTlksIHJldHVybl9ub2RlKTsKKwkJaWYgKEFDUElfU1VDQ0VTUyhzdGF0dXMpKSB7CisJCQlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIAkJfQogCiAJCS8qCiAJCSAqIE5vdCBmb3VuZCBoZXJlLCBnbyB1cCBhbm90aGVyIGxldmVsCiAJCSAqICh1bnRpbCB3ZSByZWFjaCB0aGUgcm9vdCkKIAkJICovCi0JCXBhcmVudF9ub2RlID0gYWNwaV9uc19nZXRfcGFyZW50X25vZGUgKHBhcmVudF9ub2RlKTsKKwkJcGFyZW50X25vZGUgPSBhY3BpX25zX2dldF9wYXJlbnRfbm9kZShwYXJlbnRfbm9kZSk7CiAJfQogCiAJLyogTm90IGZvdW5kIGluIHBhcmVudCB0cmVlICovCiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX05PVF9GT1VORCk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX05PVF9GT1VORCk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19zZWFyY2hfYW5kX2VudGVyCkBAIC0yODYsNTIgKzI4Miw0NiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfbnNfc2VhcmNoX2FuZF9lbnRlciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRfbmFtZSwKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2R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ZgogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfcmVwb3J0X2Vycm9yCkBAIC04MSw1MSArNzQsNDUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHZvaWQKLWFjcGlfbnNfcmVwb3J0X2Vycm9yICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmludGVybmFsX25hbWUsCi0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBsb29rdXBfc3RhdHVzKQorYWNwaV9uc19yZXBvcnRfZXJyb3IoY2hhciAqbW9kdWxlX25hbWUsCisJCSAgICAgdTMyIGxpbmVfbnVtYmVyLAorCQkgICAgIHUzMiBjb21wb25lbnRfaWQsCisJCSAgICAgY2hhciAqaW50ZXJuYWxfbmFtZSwgYWNwaV9zdGF0dXMgbG9va3VwX3N0YXR1cykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lID0gTlVMTDsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJY2hhciAqbmFtZSA9IE5VTEw7CiAKLQotCWFjcGlfb3NfcHJpbnRmICgiJThzLSUwNGQ6ICoqKiBFcnJvcjogTG9va2luZyB1cCAiLAotCQltb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOworCWFjcGlfb3NfcHJ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kJCWFjcGlfb3NfcHJpbnRmKCJbJXNdIiwgbmFtZSk7CisJCX0gZWxzZSB7CisJCQlhY3BpX29zX3ByaW50ZigiW0NPVUxEIE5PVCBFWFRFUk5BTElaRSBOQU1FXSIpOwogCQl9CiAKIAkJaWYgKG5hbWUpIHsKLQkJCUFDUElfTUVNX0ZSRUUgKG5hbWUpOworCQkJQUNQSV9NRU1fRlJFRShuYW1lKTsKIAkJfQogCX0KIAotCWFjcGlfb3NfcHJpbnRmICgiIGluIG5hbWVzcGFjZSwgJXNcbiIsCi0JCWFjcGlfZm9ybWF0X2V4Y2VwdGlvbiAobG9va3VwX3N0YXR1cykpOworCWFjcGlfb3NfcHJpbnRmKCIgaW4gbmFtZXNwYWNlLCAlc1xuIiwKKwkJICAgICAgIGFjcGlfZm9ybWF0X2V4Y2VwdGlvbihsb29rdXBfc3RhdHVzKSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19yZXBvcnRfbWV0aG9kX2Vycm9yCkBAIC0xNDUsMzQgKzEzMiwzMSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV9uc19yZXBvcnRfbWV0aG9kX2Vycm9yICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1lc3NhZ2UsCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqcHJlZml4X25v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Y3BpX29zX3ByaW50ZgorCQkJICAgICgicmVwb3J0X21ldGhvZF9lcnJvcjogQ291bGQgbm90IGdldCBub2RlXG4iKTsKIAkJCXJldHVybjsKIAkJfQogCX0KIAotCWFjcGlfb3NfcHJpbnRmICgiJThzLSUwNGQ6ICoqKiBFcnJvcjogIiwgbW9kdWxlX25hbWUsIGxpbmVfbnVtYmVyKTsKLQlhY3BpX25zX3ByaW50X25vZGVfcGF0aG5hbWUgKG5vZGUsIG1lc3NhZ2UpOwotCWFjcGlfb3NfcHJpbnRmICgiLCAlc1xuIiwgYWNwaV9mb3JtYXRfZXhjZXB0aW9uIChtZXRob2Rfc3RhdHVzKSk7CisJYWNwaV9vc19wcmludGYoIiU4cy0lMDRkOiAqKiogRXJyb3I6ICIsIG1vZHVsZV9uYW1lLCBsaW5lX251bWJlcik7CisJYWNwaV9uc19wcmludF9ub2RlX3BhdGhuYW1lKG5vZGUsIG1lc3NhZ2UpOworCWFjcGlfb3NfcHJpbnRmKCIsICVzXG4iLCBhY3BpX2Zvcm1hdF9leGNlcHRpb24obWV0aG9kX3N0YXR1cykpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfcHJpbnRfbm9kZV9wYXRobmFtZQpAQCAtMTg2LDE2ICsxNzAsMTMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHZvaWQKLWFjcGlfbnNfcHJpbnRfbm9kZV9wYXRobmFtZSAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqbm9kZSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptZXNzYWdlKQorYWNwaV9uc19wcmludF9ub2RlX3BhdGhuYW1lKHN0cnVj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ShidWZmZXIucG9pbnRlcik7CiAJfQogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfdmFsaWRfcm9vdF9wcmVmaXgKQEAgLTIyNywxNSArMjA3LDEyIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTgKLWFjcGlfbnNfdmFsaWRfcm9vdF9wcmVmaXggKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4KQordTggYWNwaV9uc192YWxpZF9yb290X3ByZWZpeChjaGFyIHByZWZpeCkKIHsKIAogCXJldHVybiAoKHU4KSAocHJlZml4ID09ICdcXCcpKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX3ZhbGlkX3BhdGhfc2VwYXJhdG9yCkBAIC0yNDgsMTUgKzIyNSwxMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB1OAotYWNwaV9uc192YWxpZF9wYXRoX3NlcGFyYXRvciAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXApCitzdGF0aWMgdTggYWNwaV9uc192YWxpZF9wYXRoX3NlcGFyYXRvcihjaGFyIHNlcCkKIHsKIAogCXJldHVybiAoKHU4KSAoc2VwID09ICcuJykpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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xfY2hhcisrOwotCX0KLQllbHNlIHsKKwl9IGVsc2UgewogCQkvKgogCQkgKiBIYW5kbGUgQ2FyYXQgcHJlZml4ZXMKIAkJICovCkBAIC0zNzUsMTkgKzMzNiwxOCBAQAogCWlmICgqbmV4dF9leHRlcm5hbF9jaGFyKSB7CiAJCWluZm8tPm51bV9zZWdtZW50cyA9IDE7CiAJCWZvciAoaSA9IDA7IG5leHRfZXh0ZXJuYWxfY2hhcltpXTsgaSsrKSB7Ci0JCQlpZiAoYWNwaV9uc192YWxpZF9wYXRoX3NlcGFyYXRvciAobmV4dF9leHRlcm5hbF9jaGFyW2ldKSkgeworCQkJaWYgKGFjcGlfbnNfdmFsaWRfcGF0aF9zZXBhcmF0b3IobmV4dF9leHRlcm5hbF9jaGFyW2ldKSkgewogCQkJCWluZm8tPm51bV9zZWdtZW50cysrOwogCQkJfQogCQl9CiAJfQogCiAJaW5mby0+bGVuZ3RoID0gKEFDUElfTkFNRV9TSVpFICogaW5mby0+bnVtX3NlZ21lbnRzKSArCi0JCQkgIDQgKyBpbmZvLT5udW1fY2FyYXRzOworCSAgICA0ICsgaW5mby0+bnVtX2NhcmF0czsKIAogCWluZm8tPm5leHRfZXh0ZXJuYWxfY2hhciA9IG5leHRfZXh0ZXJuYWxfY2hhcjsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2J1aWxkX2ludGVybmFsX25hbWUKQEAgLTQwMSwxOSArMzYxLDE1IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfbnNfYnVpbGRfaW50ZXJuYWxfbmFtZSAoCi0Jc3RydWN0IGFjcGlfbmFtZXN0cmluZ19pbmZ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X0RCX0VYRUMsCisJCQkJICAiUmV0dXJuaW5nIFslcF0gKGFicykgXCJcXCVzXCJcbiIsCisJCQkJICBpbnRlcm5hbF9uYW1lLCBpbnRlcm5hbF9uYW1lKSk7CisJfSBlbHNlIHsKKwkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9FWEVDLCAiUmV0dXJuaW5nIFslcF0gKHJlbCkgXCIlc1wiXG4iLAorCQkJCSAgaW50ZXJuYWxfbmFtZSwgaW50ZXJuYWxfbmFtZSkpOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19pbnRlcm5hbGl6ZV9uYW1lCkBAIC01MjIsNTEgKzQ3Myw0MyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9uc19pbnRlcm5hbGl6ZV9uYW1lICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpleHRlcm5hbF9uYW1lLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipjb252ZXJ0ZWRfbmFtZSkKK2FjcGlfc3RhdHVzIGFjcGlfbnNfaW50ZXJuYWxpemVfbmFtZShjaGFyICpleHRlcm5hbF9uYW1lLCBjaGFyICoqY29udmVydGVkX25hbWUpCiB7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaW50ZXJuYWxfbmFtZTsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3RyaW5nX2luZm8gICAgIGluZm87Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICA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CQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX05PX01FTU9SWSk7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9OT19NRU1PUlkpOwogCX0KIAogCWogPSAwOwpAQCAtNzI1LDEwICs2NjIsOSBAQAogCQkqY29udmVydGVkX25hbWVfbGVuZ3RoID0gKHUzMikgcmVxdWlyZWRfbGVuZ3RoOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19tYXBfaGFuZGxlX3RvX25vZGUKQEAgLTc0NSwxMyArNjgxLDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKgotYWNwaV9uc19tYXBfaGFuZGxlX3RvX25vZGUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlKQorc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKmFjcGlfbnNfbWFwX2hhbmRsZV90b19ub2RlKGFjcGlfaGFuZGxlIGhhbmRsZSkKIHsKIAotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CiAKIAkvKgogCSAqIFNpbXBsZSBpbXBsZW1lbnRhdGlvbi4KQEAgLTc2NiwxNCArNjk5LDEzIEBACiAKIAkvKiBXZSBjYW4gYXQgbGVhc3QgYXR0ZW1wdCB0byB2ZXJpZnkgdGhlIGhhbmRsZSAqLwogCi0JaWYgKEFDUElfR0VUX0RFU0NSSVBUT1JfVFlQRSAoaGFuZGxlKSAhPSBBQ1BJX0RFU0NfVFlQRV9OQU1FRCkgeworCWlmIChBQ1BJX0dFVF9ERVNDUklQVE9SX1RZUEUoaGFuZGxlKSAhPSBBQ1BJX0RFU0NfVFlQRV9OQU1FRCkgewogCQlyZXR1cm4gKE5VTEwpOwogCX0KIAotCXJldHVybiAoKHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICopIGhhbmRsZSk7CisJcmV0dXJuICgoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKiloYW5kbGUpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfY29udmVydF9lbnRyeV90b19oYW5kbGUKQEAgLTc4NiwxOCArNzE4LDE0IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9oYW5kbGUKLWFjcGlfbnNfY29udmVydF9lbnRyeV90b19oYW5kbGUgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgICAgICpub2RlKQorYWNwaV9oYW5kbGUgYWNwaV9uc19jb252ZXJ0X2VudHJ5X3RvX2hhbmRsZShzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZSkKIHsKIAotCiAJLyoKIAkgKiBTaW1wbGUgaW1wbGVtZW50YXRpb24gZm9yIG5vdzsKIAkgKi8KIAlyZXR1cm4gKChhY3BpX2hhbmRsZSkgbm9kZSk7CiAKLQogLyogRXhhbXBsZSBmdXR1cmUgaW1wbGVtZW50YXRpb24gLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKIAlpZiAoIU5vZGUpCkBAIC04MTAsMTIgKzczOCwxMCBAQAogCQlyZXR1cm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HlwZV0pICYgQUNQSV9OU19ORVdTQ09QRSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19nZXRfbm9kZV9ieV9wYXRoCkBAIC05MTYsMzMgKzgzNCwyOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfbnNfZ2V0X25vZGVfYnlfcGF0aCAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aG5hbWUsCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqc3RhcnRfbm9kZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKipyZXR1cm5fbm9kZSkKK2FjcGlfbnNfZ2V0X25vZGVfYnlfcGF0aChjaGFyICpwYXRobmFtZSwKKwkJCSBzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqc3RhcnRfbm9kZSwKKwkJCSB1MzIgZmxhZ3MsIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICoqcmV0dXJuX25vZGUpCiB7Ci0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICBzY29wZV9pbmZvOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmludGVybmFsX3BhdGggPSBOVUxMOworCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSBzY29wZV9pbmZvOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKwljaGFyICppbnRlcm5hbF9w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YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9uc19nZXRfcGFyZW50X25vZGUKQEAgLTk4MywxMiArODk3LDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKgotYWNwaV9uc19nZXRfcGFyZW50X25vZGUgKAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUpCitzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqYWNwaV9uc19nZXRfcGFyZW50X25vZGUoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUKKwkJCQkJCSAgICAqbm9kZSkKIHsKLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJaWYgKCFub2RlKSB7CiAJCXJldHVybiAoTlVMTCk7CkBAIC0xMDA2LDcgKzkxOCw2IEBACiAJcmV0dXJuIChub2RlLT5wZWVyKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX25zX2dldF9uZXh0X3ZhbGlkX25vZGUKQEAgLTEwMjEsOSArOTMyLDkgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdHJ1Y3QgYWNwaV9uYW1lc3BhY2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Ki8KQEAgLTkyLDcgKzg2LDcgQEAKIAllbHNlIHsKIAkJLyogU3RhcnQgc2VhcmNoIGF0IHRoZSBORVhUIG5vZGUgKi8KIAotCQluZXh0X25vZGUgPSBhY3BpX25zX2dldF9uZXh0X3ZhbGlkX25vZGUgKGNoaWxkX25vZGUpOworCQluZXh0X25vZGUgPSBhY3BpX25zX2dldF9uZXh0X3ZhbGlkX25vZGUoY2hpbGRfbm9kZSk7CiAJfQogCiAJLyogSWYgYW55IHR5cGUgaXMgT0ssIHdlIGFyZSBkb25lICovCkBAIC0xMTQsNyArMTA4LDcgQEAKIAogCQkvKiBPdGhlcndpc2UsIG1vdmUgb24gdG8gdGhlIG5leHQgbm9kZSAqLwogCi0JCW5leHRfbm9kZSA9IGFjcGlfbnNfZ2V0X25leHRfdmFsaWRfbm9kZSAobmV4dF9ub2RlKTsKKwkJbmV4dF9ub2RlID0gYWNwaV9uc19nZXRfbmV4dF92YWxpZF9ub2RlKG5leHRfbm9kZSk7CiAJfQogCiAJLyogTm90IGZvdW5kICovCkBAIC0xMjIsNyArMTE2LDYgQEAKIAlyZXR1cm4gKE5VTEwpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfbnNfd2Fsa19uYW1lc3BhY2UKQEAgLTE1NCwyNSArMTQ3LDIxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9uc193YWxrX25hbWVzcGFjZSAoCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlLAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc3RhcnRfbm9kZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgIC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dWRlIDxhY3BpL2FjbmFtZXNwLmg+CiAjaW5jbHVkZSA8YWNwaS9hY2ludGVycC5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX05BTUVTUEFDRQotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgibnN4ZmV2YWwiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJuc3hmZXZhbCIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzMsMjcgKzcxLDIzIEBACiAgKiAgICAgICAgICAgICAgYmUgdmFsaWQgKG5vbi1udWxsKQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KICNpZmRlZiBBQ1BJX0ZVVFVSRV9VU0FHRQogYWNwaV9zdGF0dXMKLWFjcGlfZXZhbHVhdGVfb2JqZWN0X3R5cGVkICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQlhY3BpX3N0cmluZyAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lLAotCXN0cnVjdCBhY3BpX29iamVjdF9saXN0ICAgICAgICAgKmV4dGVybmFsX3BhcmFtcywKLQlzdHJ1Y3QgYWNwaV9idWZmZXIgICAgICAgICAgICAgICpyZXR1cm5fYnVmZmVyLAotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgcmV0dXJuX3R5cGUpCithY3BpX2V2YWx1YXRlX29iamVjdF90eXBlZChhY3BpX2hhbmRsZSBoYW5kbGUsCisJCQkgICBhY3BpX3N0cmluZyBwYXRobmFtZSwKKwkJCSAgIHN0cnVjdCBhY3BpX29iamVjdF9saXN0ICpleHRlcm5hbF9wYXJhbXMsCisJCQkgICBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJld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VJFX1VTQUdFICAqLwotCisjZW5kaWYJCQkJLyogIEFDUElfRlVUVVJFX1VTQUdFICAqLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTE2OSwyMSArMTY0LDE4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldmFsdWF0ZV9vYmplY3QgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCWFjcGlfc3RyaW5nICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsCi0Jc3RydWN0IGFjcGlfb2JqZWN0X2xpc3QgICAgICAgICAqZXh0ZXJuYWxfcGFyYW1zLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldHVybl9idWZmZXIpCithY3BpX2V2YWx1YXRlX29iamVjdChhY3BpX2hhbmRsZSBoYW5kbGUsCisJCSAgICAgYWNwaV9zdHJpbmcgcGF0aG5hbWUsCisJCSAgICAgc3RydWN0IGFjcGlfb2JqZWN0X2xpc3QgKmV4dGVybmFsX3BhcmFtcywKKwkJICAgICBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJldHVybl9idWZmZXIpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMyOwotCXN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICAgICAgaW5mbzsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcl9zcGFjZV9uZWVkZWQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOworCWFjcGlfc3RhdHVzIHN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NZTUJPTChhY3BpX2V2YWx1YXRlX29iamVjdCk7CiAKK0VYUE9SVF9TWU1CT0woYWNwaV9ldmFsdWF0ZV9vYmplY3QpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTM5MiwyNiArMzg3LDIwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV93YWxrX25hbWVzcGFjZSAoCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlLAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc3RhcnRfb2JqZWN0LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2RlcHRoLAotCWFjcGlfd2Fsa19jYWxsYmFjayAgICAgICAgICAgICAgdXNlcl9mdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpCithY3BpX3dhbGtfbmFtZXNwYWNlKGFjcGlfb2JqZWN0X3R5cGUgdHlwZSwKKwkJICAgIGFjcGlfaGFuZGxlIHN0YXJ0X29iamVjdCwKKwkJICAgIHUzMiBtYXhfZGVwdGgsCisJCSAgICBhY3BpX3dhbGtfY2FsbGJhY2sgdXNlcl9mdW5jdGlvbiwKKwkJICAgIHZvaWQgKmNvbnRleHQsIHZvaWQgKipyZXR1cm5fdmFsdWUpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiYWNwaV93YWxrX25hbWVzcG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VU5MT0NLLAotCQkJICB1c2VyX2Z1bmN0aW9uLCBjb250ZXh0LCByZXR1cm5fdmFsdWUpOworCXN0YXR1cyA9IGFjcGlfbnNfd2Fsa19uYW1lc3BhY2UodHlwZSwgc3RhcnRfb2JqZWN0LCBtYXhfZGVwdGgsCisJCQkJCUFDUElfTlNfV0FMS19VTkxPQ0ssCisJCQkJCXVzZXJfZnVuY3Rpb24sIGNvbnRleHQsIHJldHVybl92YWx1ZSk7CiAKLQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9OQU1FU1BBQ0UpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfTkFNRVNQQUNFKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV93YWxrX25hbWVzcGFjZSk7CiAKK0VYUE9SVF9TWU1CT0woYWNwaV93YWxrX25hbWVzcGFjZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNDUwLDI5ICs0MzksMjYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9uc19nZXRfZGV2aWNlX2NhbGxiYWNrICgKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIG9ial9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXN0aW5nX2xldmVsLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJ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kJCQkJCSBzaXplb2Yoc3RydWN0CisJCQkJCQkJYWNwaV9jb21wYXRpYmxlX2lkKSkgIT0KKwkJCQkgICAgMCkgeworCQkJCQlBQ1BJX01FTV9GUkVFKGNpZCk7CiAJCQkJCXJldHVybiAoQUVfT0spOwogCQkJCX0KIAkJCX0KLQkJCUFDUElfTUVNX0ZSRUUgKGNpZCk7CisJCQlBQ1BJX01FTV9GUkVFKGNpZCk7CiAJCX0KIAl9CiAKLQlzdGF0dXMgPSBpbmZvLT51c2VyX2Z1bmN0aW9uIChvYmpfaGFuZGxlLCBuZXN0aW5nX2xldmVsLCBpbmZvLT5jb250ZXh0LAotCQkJIHJldHVybl92YWx1ZSk7CisJc3RhdHVzID0gaW5mby0+dXNlcl9mdW5jdGlvbihvYmpfaGFuZGxlLCBuZXN0aW5nX2xldmVsLCBpbmZvLT5jb250ZXh0LAorCQkJCSAgICAgcmV0dXJuX3ZhbHVlKTsKIAlyZXR1cm4gKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfZGV2aWNlcwpAQCAtNTYwLDMyICs1NDUsMjggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9kZXZpY2VzICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpISUQsCi0JYWNwaV93YWxrX2NhbGxiYWNrICAgICAgICAgICAgICB1c2VyX2Z1bmN0aW9uLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJldHVybl92YWx1ZSkKK2FjcGlfZ2V0X2Rldm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WQpYWNwaV91dF9yZWxlYXNlX211dGV4KEFDUElfTVRYX05BTUVTUEFDRSk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X2RldmljZXMpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X2RldmljZXMpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTYyNSw0NCArNjA2LDM4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9hdHRhY2hfZGF0YSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBvYmpfaGFuZGxlLAotCWFjcGlfb2JqZWN0X2hhbmRsZXIgICAgICAgICAgICAgaGFuZGxlciwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkYXRhKQorYWNwaV9hdHRhY2hfZGF0YShhY3BpX2hhbmRsZSBvYmpfaGFuZGxlLAorCQkgYWNwaV9vYmplY3RfaGFuZGxlciBoYW5kbGVyLCB2b2lkICpkYXRhKQogewotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0KKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZTsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CiAKIAkvKiBQYXJhbWV0ZXIgdmFsaWRhdGlvbiAqLwogCi0JaWYgKCFvYmpfaGFuZGxlIHx8Ci0JCSFoYW5kbGVyICAgIHx8Ci0JCSFkYXRhKSB7CisJaWYgKCFvYmpfaGFuZGxlIHx8ICFoYW5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LyogQ29udmVydCBhbmQgdmFsaWRhdGUgdGhlIGhhbmRsZSAqLwogCi0Jbm9kZSA9IGFjcGlfbnNfbWFwX2hhbmRsZV90b19ub2RlIChvYmpfaGFuZGxlKTsKKwlub2RlID0gYWNwaV9uc19tYXBfaGFuZGxlX3RvX25vZGUob2JqX2hhbmRsZSk7CiAJaWYgKCFub2RlKSB7CiAJCXN0YXR1cyA9IEFFX0JBRF9QQVJBTUVURVI7CiAJCWdvdG8gdW5sb2NrX2FuZF9leGl0OwogCX0KIAotCXN0YXR1cyA9IGFjcGlfbnNfZGV0YWNoX2RhdGEgKG5vZGUsIGhhbmRsZXIpOworCXN0YXR1cyA9IGFjcGlfbnNfZGV0YWNoX2RhdGEobm9kZSwgaGFuZGxlcik7CiAKLXVubG9ja19hbmRfZXhpdDoKLQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9OQU1FU1BBQ0UpOworICAgICAgdW5sb2NrX2FuZF9leGl0OgorCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9OQU1FU1BBQ0UpOwogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2dldF9kYXRhCkBAIC03MjgsNDEgKzY5OCwzMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfZ2V0X2RhdGEgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgb2JqX2hhbmRsZSwKLQlhY3BpX29iamVjdF9oYW5kbGVyICAgICAgICAgICAgIGhhbmRsZXIsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAg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mVycy9hY3BpL25hbWVzcGFjZS9uc3hmb2JqLmMKKysrIGIvZHJpdmVycy9hY3BpL25hbWVzcGFjZS9uc3hmb2JqLmMKQEAgLTQ3LDkgKzQ3LDggQEAKICNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KICNpbmNsdWRlIDxhY3BpL2FjbmFtZXNwLmg+CiAKLQogI2RlZmluZSBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfTkFNRVNQQUNFCi0JIEFDUElfTU9EVUxFX05BTUUgICAgKCJuc3hmb2JqIikKK0FDUElfTU9EVUxFX05BTUUoIm5zeGZvYmoiKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTYzLDE1ICs2MiwxMCBAQAogICogREVTQ1JJUFRJT046IFRoaXMgcm91dGluZSByZXR1cm5zIHRoZSB0eXBlIGFzc29jaWF0ZCB3aXRoIGEgcGFydGljdWxhciBoYW5kbGUKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9nZXRfdHlwZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICAqcmV0X3R5cGUpCithY3BpX3N0YXR1cyBhY3BpX2dldF90eXBlKGFjcGlfaGFuZGxlIGhhbmRsZSwgYWNwaV9vYmplY3RfdHlwZSAqIHJldF90eXBlKQogewotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGU7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0KKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZTsKKwlhY3BpX3N0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Ck7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMTk1LDE3ICsxODMsMTQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9uZXh0X29iamVjdCAoCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlLAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgcGFyZW50LAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgY2hpbGQsCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICAqcmV0X2hhbmRsZSkKK2FjcGlfZ2V0X25leHRfb2JqZWN0KGFjcGlfb2JqZWN0X3R5cGUgdHlwZSwKKwkJICAgICBhY3BpX2hhbmRsZSBwYXJlbnQsCisJCSAgICAgYWNwaV9oYW5kbGUgY2hpbGQsIGFjcGlfaGFuZGxlICogcmV0X2hhbmRsZSkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpub2RlOwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKnBhcmVudF9ub2RlID0gTlVMTDsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpjaGlsZF9ub2RlID0gTlVMTDsKLQorCWFjcGlfc3RhdHVzIHN0YXR1czsKKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZTsKKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqcGFyZW50X25vZGUgPSBOVUxMOworCXN0cnVjdCBhY3Bp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lzcGluX2xvY2tfaXJxc2F2ZSgoc3BpbmxvY2tfdCAqKSBoYW5kbGUsIGZsYWdzKTsKKwlyZXR1cm4gZmxhZ3M7Cit9CisKKy8qCisgKiBSZWxlYXNlIGEgc3BpbmxvY2suIFNlZSBhYm92ZS4KKyAqLworCit2b2lkIGFjcGlfb3NfcmVsZWFzZV9sb2NrKGFjcGlfaGFuZGxlIGhhbmRsZSwgdW5zaWduZWQgbG9uZyBmbGFncykKK3sKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKChzcGlubG9ja190ICopIGhhbmRsZSwgZmxhZ3MpOworfQorCisjaWZuZGVmIEFDUElfVVNFX0xPQ0FMX0NBQ0hFCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfb3NfY3JlYXRlX2NhY2hlCisgKgorICogUEFSQU1FVEVSUzogIENhY2hlTmFtZSAgICAgICAtIEFzY2lpIG5hbWUgZm9yIHRoZSBjYWNoZQorICogICAgICAgICAgICAgIE9iamVjdFNpemUgICAgICAtIFNpemUgb2YgZWFjaCBjYWNoZWQgb2JqZWN0CisgKiAgICAgICAgICAgICAgTWF4RGVwdGggICAgICAgIC0gTWF4aW11bSBkZXB0aCBvZiB0aGUgY2FjaGUgKGluIG9iamVjdHMpCisgKiAgICAgICAgICAgICAgUmV0dXJuQ2FjaGUgICAgIC0gV2hlcmUgdGhlIG5ldyBjYWNoZSBvYmplY3QgaXMgcmV0dXJuZWQKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IENyZWF0ZSBhIGNhY2hlIG9iamVjdAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzCithY3BpX29zX2NyZWF0ZV9jYWNoZShjaGFyICpuYW1lLCB1MTYgc2l6ZSwgdTE2IGRlcHRoLCBhY3BpX2NhY2hlX3QgKiogY2FjaGUpCit7CisJKmNhY2hlID0ga21lbV9jYWNoZV9jcmVhdGUobmFtZSwgc2l6ZSwgMCwgMCwgTlVMTCwgTlVMTCk7CisJcmV0dXJuIEFFX09LOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX29zX3B1cmdlX2NhY2hlCisgKgorICogUEFSQU1FVEVSUzogIENhY2hlICAgICAgICAgICAtIEhhbmRsZSB0byBjYWNoZSBvYmplY3QKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IEZyZWUgYWxsIG9iamVjdHMgd2l0aGluIHRoZSByZXF1ZXN0ZWQgY2FjaGUuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV9vc19wdXJnZV9jYWNoZShhY3BpX2NhY2hlX3QgKiBjYWNoZSkKK3sKKwkodm9pZClrbWVtX2NhY2hlX3NocmluayhjYWNoZSk7CisJcmV0dXJuIChBRV9PSyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfb3NfZGVsZXRlX2NhY2hlCisgKgorICogUEFSQU1FVEVSUzogIENhY2hlICAgICAgICAgICAtIEhhbmRsZSB0byBjYWNoZSBvYmplY3QKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IEZyZWUgYWxsIG9iamVjdHMgd2l0aGluIHRoZSByZXF1ZXN0ZWQgY2FjaGUgYW5kIGRlbGV0ZSB0aGUKKyAqICAgICAgICAgICAgICBjYWNoZSBvYmplY3QuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV9vc19kZWxldGVfY2FjaGUoYWNwaV9jYWNoZV90ICogY2FjaGUpCit7CisJKHZvaWQpa21lbV9jYWNoZV9kZXN0cm95KGNhY2hlKTsKKwlyZXR1cm4gKEFFX09LKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9vc19yZWxlYXNlX29iamVjdAorICoKKyAqIFBBUkFNRVRFUlM6ICBDYWNoZSAgICAgICAtIEhhbmRsZSB0byBjYWNoZSBvYmplY3QKKyAqICAgICAgICAgICAgICBPYmplY3QgICAgICAtIFRoZSBvYmplY3QgdG8gYmUgcmVsZWFzZWQKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBSZWxlYXNlIGFuIG9iamVjdCB0byB0aGUgc3BlY2lmaWVkIGNhY2hlLiAgSWYgY2FjaGUgaXMgZnVsbCwKKyAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGlzIGRlbGV0ZWQuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV9vc19yZWxlYXNlX29iamVjdChhY3BpX2NhY2hlX3QgKiBjYWNoZSwgdm9pZCAqb2JqZWN0KQoreworCWttZW1fY2FjaGVfZnJlZShjYWNoZSwgb2JqZWN0KTsKKwlyZXR1cm4gKEFFX09LKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9vc19hY3F1aXJlX29iamVjdAorICoKKyAqIFBBUkFNRVRFUlM6ICBDYWNoZSAgICAgICAgICAgLSBIYW5kbGUgdG8gY2FjaGUgb2JqZWN0CisgKiAgICAgICAgICAgICAgUmV0dXJuT2JqZWN0ICAgIC0gV2hlcmUgdGhlIG9iamVjdCBpcyByZXR1cm5lZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogR2V0IGFuIG9iamVjdCBmcm9tIHRoZSBzcGVjaWZpZWQgY2FjaGUuICBJZiBjYWNoZSBpcyBlbXB0eSwKKyAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGlzIGFsbG9jYXRlZC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkICphY3BpX29zX2FjcXVpcmVfb2JqZWN0KGFjcGlfY2FjaGVfdCAqIGNhY2hlKQoreworCXZvaWQgKm9iamVjdCA9IGttZW1fY2FjaGVfYWxsb2MoY2FjaGUsIEdGUF9LRVJORUwpOworCVdBUk5fT04oIW9iamVjdCk7CisJcmV0dXJuIG9iamVjdDsKK30KKworI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvcGFyc2VyL01ha2VmaWxlIGIvZHJpdmVycy9hY3BpL3BhcnNlci9NYWtlZmlsZQppbmRleCBiYmRkMjg2Li5kYjI0ZWUwIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvcGFyc2VyL01ha2VmaWxlCisrKyBiL2RyaXZlcnMvYWNwaS9wYXJzZXIvTWFrZWZpbGUKQEAgLTIsNyArMiw3IEBACiAjIE1ha2VmaWxlIGZvci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YW1sICsgMikgPDwgMjApIHwKKwkJCSAgKEFDUElfR0VUOChwYXJzZXJfc3RhdGUtPmFtbCArIDEpIDw8IDEyKSB8CisJCQkgIChBQ1BJX0dFVDgocGFyc2VyX3N0YXRlLT5hbWwpIDw8IDA0KSB8CisJCQkgIChlbmNvZGVkX2xlbmd0aCAmIDB4MEYpKTsKIAkJcGFyc2VyX3N0YXRlLT5hbWwgKz0gMzsKIAkJYnJlYWs7CiAKQEAgLTEyNywxMCArMTE2LDkgQEAKIAkJYnJlYWs7CiAJfQogCi0JcmV0dXJuX1ZBTFVFIChsZW5ndGgpOworCXJldHVybl9WQUxVRShsZW5ndGgpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcHNfZ2V0X25leHRfcGFja2FnZV9lbmQKQEAgLTE0NCwyNSArMTMyLDIxIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTggKgotYWNwaV9wc19nZXRfbmV4dF9wYWNrYWdlX2VuZCAoCi0Jc3RydWN0IGFjcGlfcGFyc2Vfc3RhdGUgICAgICAgICAqcGFyc2VyX3N0YXRlKQordTggKmFjcGlfcHNfZ2V0X25leHRfcGFja2FnZV9lbmQoc3RydWN0IGFjcGlfcGFyc2Vfc3RhdGUgKnBhcnNlcl9zdGF0ZSkKIHsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzdGFydCA9IHBhcnNlcl9zdGF0ZS0+YW1sOwotCWFjcGlfbmF0aXZlX3VpbnQgICAgICAgICAgICAgICAgbGVuZ3RoOworCXU4ICpzdGFydCA9IHBhcnNlcl9zdGF0ZS0+YW1sOworCWFjcGlfbmF0aXZlX3VpbnQgbGVuZ3RoOwogCi0KLQ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OQU1FX1NJWkUpOwogCQlicmVhazsKIAogCWRlZmF1bHQ6CkBAIC0yMzIsMTEgKzIxMiwxMCBAQAogCQlicmVhazsKIAl9CiAKLQlwYXJzZXJfc3RhdGUtPmFtbCA9ICh1OCopIGVuZDsKLQlyZXR1cm5fUFRSICgoY2hhciAqKSBzdGFydCk7CisJcGFyc2VyX3N0YXRlLT5hbWwgPSAodTggKikgZW5kOworCXJldHVybl9QVFIoKGNoYXIgKilzdGFydCk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19nZXRfbmV4dF9uYW1lcGF0aApAQCAtMjU5LDI0ICsyMzgsMjAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3BzX2dldF9uZXh0X25hbWVwYXRoICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXN0cnVjdCBhY3BpX3BhcnNlX3N0YXRlICAgICAgICAgKnBhcnNlcl9zdGF0ZSwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICphcmcsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2RfY2FsbCkKK2FjcGlfcHNfZ2V0X25leHRfbmFtZXBhdGgoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSwKKwkJCSAgc3RydWN0IGFjcGlfcGFyc2Vfc3RhdGUgKnBhcnNlcl9zdGF0ZSwKKwkJCSAgdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKmFyZywgdTggbWV0aG9kX2NhbGwpCiB7Ci0JY2hhciAgICAgICAgICAgICAgICAgICA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wZS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiAvKgogICogU3VtbWFyeSBvZiBvcGNvZGUgdHlwZXMvZmxhZ3MKICAqCkBAIC0xODAsMTU2ICsxNzYsNDY4IEBACiAJQU1MX0NSRUFURV9RV09SRF9GSUVMRF9PUAogCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KIC8qCiAgKiBNYXN0ZXIgT3Bjb2RlIGluZm9ybWF0aW9uIHRhYmxlLiAgQSBzdW1tYXJ5IG9mIGV2ZXJ5dGhpbmcgd2Uga25vdyBhYm91dCBlYWNoCiAgKiBvcGNvZGUsIGFsbCBpbiBvbmUgcGxhY2UuCiAgKi8KLWNvbnN0IHN0cnVjdCBhY3BpX29wY29kZV9pbmZvICAgICBhY3BpX2dibF9hbWxfb3BfaW5mb1tBTUxfTlVNX09QQ09ERVNdID0KLXsKK2NvbnN0IHN0cnVjdCBhY3BpX29wY29kZV9pbmZvIGFjcGlfZ2JsX2FtbF9vcF9pbmZvW0FNTF9OVU1fT1BDT0RFU10gPSB7CiAvKiEgW0JlZ2luXSBubyBzb3VyY2UgY29kZSB0cmFuc2xhdGlvbiAqLwogLyogSW5kZXggICAgICAgICAgIE5hbWUgICAgICAgICAgICAgICAgIFBhcnNlciBBcmdzICAgICAgICAgICAgICAgSW50ZXJwcmV0ZXIgQXJncyAgICAgICAgICAgICAgICBPYmplY3RUeXBlICAgICAgICAgICAgICAgICAgICBDbGFzcyAgICAgICAgICAgICAgICAgICAgICBUeXBlICAgICAgICAgICAgICAgICAgRmxhZ3MgKi8KIAotLyogMDAgKi8gQUNQSV9PUCAoIlplcm8iLCAgICAgICAgICAgICAgIEFSR1BfWkVST19PUCwgICAgICAgICAgICAgIEFSR0lfWkVST19PUCwgICAgICAgICAgICAgICBBQ1BJX1RZUEVfSU5URUdFUiwgICAgICAgICAgIEFNTF9DTEFTU19BUkdVTUVOVCwgICAgICAgIEFNTF9UWVBFX0NPTlNUQU5ULCAgICAgICAgQU1MX0NPTlNUQU5UKSwKLS8qIDAxICovIEFDUElfT1AgKCJPbmUiLCAgICAgICAgICAgICAgICBBUkdQX09ORV9PUCwgICAgICAgICAgICAgICBBUkdJX09ORV9PUCwgICAgICAgICAgICAgICAgQUNQSV9UWVBFX0lOVEVHRVIsICAgICAgICAgICBBTUxfQ0xBU1NfQVJHVU1FTlQsICAgICAgICBBTUxfVFlQRV9DT05TVEFOVCwgICAgICAgIEFNTF9DT05TVEFOVCksCi0vKiAwMiAqLyBBQ1BJX09QICgiQWxpYXMiLCAgICAgICAgICAgICAgQVJHUF9BTElBU19PUCwgICAgICAgICAgICAgQVJHSV9BTElBU19PUCwgICAgICAgICAgICAgIEFDUElfVFlQRV9MT0NBTF9BTElBUywgICAgICAgQU1MX0NMQVNTX05BTUVEX09CSkVDVCwgICAgQU1MX1RZUEVfTkFNRURfU0lNUExFLCAgICBBTUxfSEFTX0FSR1MgfCBBTUxfTlNPQkpFQ1QgfCBBTUxfTlNPUENPREUgfCBBTUxfTlNOT0RFIHwgQU1MX05BTUVEKSwKLS8qIDAzICovIEFDUElfT1AgKCJOYW1lIiwgICAgICAgICAgICAgICBBUkdQX05BTUVfT1AsICAgICAgICAgICAgICBBUkdJX05BTUVfT1AsICAgICAgICAgICAgICAgQUNQSV9UWVBFX0FOWSwgICAgICAgICAgICAgICBBTUxfQ0xBU1NfTkFNRURfT0JKRUNULCAgICBBTUxfVFlQRV9OQU1FRF9DT01QTEVYLCAgIEFNTF9IQVNfQVJHUyB8IEFNTF9OU09CSkVDVCB8IEFNTF9OU09QQ09ERSB8IEFNTF9OU05PREUgfCBBTUxfTkFNRUQpLAotLyogMDQgKi8gQUNQSV9PUCAoIkJ5dGVDb25zdCIsICAgICAgICAgIEFSR1BfQllURV9PUCwgICAgICAgICAgICAgIEFSR0lfQllURV9PUCwgICAgICAgICAgICAgICBBQ1BJX1RZUEVfSU5URUdFUiwgICAgICAgICAgIEFNTF9DTEFTU19BUkdVTUVOVCwgICAgICAgIEFNTF9UWVBFX0xJVEVSQUwsICAgICAgICAgQU1MX0NPTlNUQU5UKSwKLS8qIDA1ICovIEFDUElfT1AgKCJXb3JkQ29uc3QiLCAgICAgICAgICBBUkdQX1dPUkRfT1AsICAgICAgICAgICAgICBBUkdJX1dPUkRfT1AsICAgICAgICAgICAgICAgQUNQSV9UWVBFX0lOVEVHRVIsICAgICAgICAgICBBTUxfQ0xBU1NfQVJHVU1FTlQsICAgICAgICBBTUxfVFlQRV9MSVRFUkFMLCAgICAgICAgIEFNTF9DT05TVEFOVCksCi0vKiAwNiAqLyBBQ1BJX09QICgiRHdvcmRDb25zdCIsICAgICAgICAgQVJHUF9EV09SRF9PUCwgICAgICAgICAgICAgQVJHSV9EV09SRF9PUCwgICAgICAgICAgICAgIEFDUElfVFlQRV9JTlRFR0VSLCAgICAgICAgICAgQU1MX0NMQVNTX0FSR1VNRU5ULCAgICAgICAgQU1MX1RZUEVfTElURVJBTCwgICAgICAgICBBTUxfQ09OU1RBTlQpLAotLyogMDcgKi8gQUNQSV9PUCAoIlN0cmluZyIsICAgICAgICAgICAgIEFSR1BfU1RSSU5HX09QLCAgICAgICAgICAgIEFSR0lfU1RSSU5HX09QLCAgICAgICAgICAgICBBQ1BJX1RZUEVfU1RSSU5HLCAgICAgICAgICAgIEFNTF9DTEFTU19BUkdVTUVOVCwgICAgICAgIEFNTF9UWVBFX0xJVEVSQUwsICAgICAgICAgQU1MX0NPTlNUQU5UKSwKLS8qIDA4ICovIEFDUElfT1AgKCJTY29wZSIsICAgICAgICAgICAgICBBUkdQX1NDT1BFX09QLCAgICAgICAgICAgICBBUkdJX1NDT1BFX09QLCAgICAgICAgICAgICAgQUNQSV9UWVBFX0xPQ0FMX1NDT1BFLCAgICAgICBBTUxfQ0xBU1NfTkFNRUR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KiAzRiAqLyBBQ1BJX09QICgiRWxzZSIsICAgICAgICAgICAgICAgQVJHUF9FTFNFX09QLCAgICAgICAgICAgICAgQVJHSV9FTFNFX09QLCAgICAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0NPTlRST0wsICAgICAgICAgQU1MX1RZUEVfQ09OVFJPTCwgICAgICAgICBBTUxfSEFTX0FSR1MpLAotLyogNDAgKi8gQUNQSV9PUCAoIldoaWxlIiwgICAgICAgICAgICAgIEFSR1BfV0hJTEVfT1AsICAgICAgICAgICAgIEFSR0lfV0hJTEVfT1AsICAgICAgICAgICAgICBBQ1BJX1RZUEVfQU5ZLCAgICAgICAgICAgICAgIEFNTF9DTEFTU19DT05UUk9MLCAgICAgICAgIEFNTF9UWVBFX0NPTlRST0wsICAgICAgICAgQU1MX0hBU19BUkdTKSwKLS8qIDQxICovIEFDUElfT1AgKCJOb29wIiwgICAgICAgICAgICAgICBBUkdQX05PT1BfT1AsICAgICAgICAgICAgICBBUkdJX05PT1BfT1AsICAgICAgICAgICAgICAgQUNQSV9UWVBFX0FOWSwgICAgICAgICAgICAgICBBTUxfQ0xBU1NfQ09OVFJPTCwgICAgICAgICBBTUxfVFlQRV9DT05UUk9MLCAgICAgICAgIDApLAotLyogNDIgKi8gQUNQSV9PUCAoIlJldHVybiIsICAgICAgICAgICAgIEFSR1BfUkVUVVJOX09QLCAgICAgICAgICAgIEFSR0lfUkVUVVJOX09QLCAgICAgICAgICAgICBBQ1BJX1RZUEVfQU5ZLCAgICAgICAgICAgICAgIEFNTF9DTEFTU19DT05UUk9MLCAgICAgICAgIEFNTF9UWVBFX0NPTlRST0wsICAgICAgICAgQU1MX0hBU19BUkdTKSwKLS8qIDQzICovIEFDUElfT1AgKCJCcmVhayIsICAgICAgICAgICAgICBBUkdQX0JSRUFLX09QLCAgICAgICAgICAgICBBUkdJX0JSRUFLX09QLCAgICAgICAgICAgICAgQUNQSV9UWVBFX0FOWSwg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A0QyAqLyBBQ1BJX09QICgiU2xlZXAiLCAgICAgICAgICAgICAgQVJHUF9TTEVFUF9PUCwgICAgICAgICAgICAgQVJHSV9TTEVFUF9PUCwgICAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0VYRUNVVEUsICAgICAgICAgQU1MX1RZUEVfRVhFQ18xQV8wVF8wUiwgICBBTUxfRkxBR1NfRVhFQ18xQV8wVF8wUiksCi0vKiA0RCAqLyBBQ1BJX09QICgiQWNxdWlyZSIsICAgICAgICAgICAgQVJHUF9BQ1FVSVJFX09QLCAgICAgICAgICAgQVJHSV9BQ1FVSVJFX09QLCAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0VYRUNVVEUsICAgICAgICAgQU1MX1RZUEVfRVhFQ18yQV8wVF8xUiwgICBBTUxfRkxBR1NfRVhFQ18yQV8wVF8xUiksCi0vKiA0RSAqLyBBQ1BJX09QICgiU2lnbmFsIiwgICAgICAgICAgICAgQVJHUF9TSUdOQUxfT1AsICAgICAgICAgICAgQVJHSV9TSUdOQUxfT1AsICAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0VYRUNVVEUsICAgICAgICAgQU1MX1RZUEVfRVhFQ18xQV8wVF8wUiwgICBBTUxfRkxBR1NfRVhFQ18xQV8wVF8wUiksCi0vKiA0RiAqLyBBQ1BJX09QICgiV2FpdCIsICAgICAgICAgICAgICAgQVJHUF9XQUlUX09QLCAgICAgICAgICAgICAgQVJHSV9XQUlUX09QLCAgICAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0VYRUNVVEUsICAgICAgICAgQU1MX1RZUEVfRVhFQ18yQV8wVF8xUiwgICBBTUxfRkxBR1NfRVhFQ18yQV8wVF8xUiksCi0vKiA1MCAqLyBBQ1BJX09QICgiUmVzZXQiLCAgICAgIC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VBhdGgtIiwgICAgICAgICBBUkdQX05BTUVQQVRIX09QLCAgICAgICAgICBBUkdJX05BTUVQQVRIX09QLCAgICAgICAgICAgQUNQSV9UWVBFX0xPQ0FMX1JFRkVSRU5DRSwgICBBTUxfQ0xBU1NfQVJHVU1FTlQsICAgICAgICBBTUxfVFlQRV9MSVRFUkFMLCAgICAgICAgIEFNTF9OU09CSkVDVCB8IEFNTF9OU05PREUgKSwKLS8qIDY0ICovIEFDUElfT1AgKCItTWV0aG9kQ2FsbC0iLCAgICAgICBBUkdQX01FVEhPRENBTExfT1AsICAgICAgICBBUkdJX01FVEhPRENBTExfT1AsICAgICAgICAgQUNQSV9UWVBFX01FVEhPRCwgICAgICAgICAgICBBTUxfQ0xBU1NfTUVUSE9EX0NBTEwsICAgICBBTUxfVFlQRV9NRVRIT0RfQ0FMTCwgICAgIEFNTF9IQVNfQVJHUyB8IEFNTF9OU09CSkVDVCB8IEFNTF9OU05PREUpLAotLyogNjUgKi8gQUNQSV9PUCAoIi1CeXRlTGlzdC0iLCAgICAgICAgIEFSR1BfQllURUxJU1RfT1AsICAgICAgICAgIEFSR0lfQllURUxJU1RfT1AsICAgICAgICAgICBBQ1BJX1RZUEVfQU5ZLCAgICAgICAgICAgICAgIEFNTF9DTEFTU19BUkdVTUVOVCwgICAgICAgIEFNTF9UWVBFX0xJVEVSQUwsICAgICAgICAgMCksCi0vKiA2NiAqLyBBQ1BJX09QICgiLVJlc2VydmVkRmllbGQtIiwgICAgQVJHUF9SRVNFUlZFREZJRUxEX09QLCAgICAgQVJHSV9SRVNFUlZFREZJRUxEX09QLCAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX0lOVEVSTkFMLCAgICAgICAgQU1MX1RZUEVfQk9HVVMsICAgICAgICAgICAwKSwKLS8qIDY3ICovIEFDUElfT1AgKCItTmFtZWRGaWVsZC0iLCAgICAgICBBUkdQX05BTUVERklFTERfT1AsICAgICAgICBBUkdJX05BTUVERklFTERfT1AsICAgICAgICAgQUNQSV9UWVBFX0FOWSwgICAgICAgICAgICAgICBBTUxfQ0xBU1NfSU5URVJOQUwsICAgICAgICBBTUxfVFlQRV9CT0dVUywgICAgICAgICAgIEFNTF9OU09CSkVDVCB8IEFNTF9OU09QQ09ERSB8IEFNTF9OU05PREUgfCBBTUxfTkFNRUQgKSwKLS8qIDY4ICovIEFDUElfT1AgKCItQWNjZXNzRmllbGQtIiwgICAgICBBUkdQX0FDQ0VTU0ZJRUxEX09QLCAgICAgICBBUkdJX0FDQ0VTU0ZJRUxEX09QLCAgICAgICAgQUNQSV9UWVBFX0FOWSwgICAgICAgICAgICAgICBBTUxfQ0xBU1NfSU5URVJOQUwsICAgICAgICBBTUxfVFlQRV9CT0dVUywgICAgICAgICAgIDApLAotLyogNjkgKi8gQUNQSV9PUCAoIi1TdGF0aWNTdHJpbmciLCAgICAgIEFSR1BfU1RBVElDU1RSSU5HX09QLCAgICAgIEFSR0lfU1RBVElDU1RSSU5HX09QLCAgICAgICBBQ1BJX1RZUEVfQU5ZLCAgICAgICAgICAgICAgIEFNTF9DTEFTU19JTlRFUk5BTCwgICAgICAgIEFNTF9UWVBFX0JPR1VTLCAgICAgICAgICAgMCksCi0vKiA2QSAqLyBBQ1BJX09QICgiLVJldHVybiBWYWx1ZS0iLCAgICAgQVJHX05PTkUsICAgICAgICAgICAgICAgICAgQVJHX05PTkUsICAgICAgICAgICAgICAgICAgIEFDUElfVFlQRV9BTlksICAgICAgICAgICAgICAgQU1MX0NMQVNTX1JFVFVSTl9WQUxVRSwgICAgQU1MX1RZUEVfUkVUVVJOLCAgICAgICAgICBBTUxfSEFTX0FSR1MgfCBBTUxfSEFTX1JFVFZBTCksCi0vKiA2QiAqLyBBQ1BJX09QICgiLVVOS05PV05fT1AtIiwgICAgICAgQVJHX05PTkUsICAgICAgICAgICAgICAgICAgQVJHX05PTkUsICAgICAgICAgICAgICAgICAgIEFDUElfVFlQRV9JTlZBTElELCAgICAgICAgICAgQU1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VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCi0vKiAweEQ4ICovCV9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCi0vKiAweEUwICovCV9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCi0vKiAweEU4ICovCV9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCi0vKiAweEYwICovCV9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCi0vKiAweEY4ICovCV9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIDB4NDUsCisvKiAweDAwICovIDB4MDAsIDB4MDEsIF9VTkssIF9VTkssIF9VTkssIF9VTkssIDB4MDIsIF9VTkssCisvKiAweDA4ICovIDB4MDMsIF9VTkssIDB4MDQsIDB4MDUsIDB4MDYsIDB4MDcsIDB4NkUsIF9VTkssCisvKiAweDEwICovIDB4MDgsIDB4MDksIDB4MGEsIDB4NkYsIDB4MGIsIF9VTkssIF9VTkssIF9VTkssCisvKiAweDE4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweDIwICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweDI4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIDB4NjMsIF9QRlgsIF9QRlgsCisvKiAweDMwICovIDB4NjcsIDB4NjYsIDB4NjgsIDB4NjUsIDB4NjksIDB4NjQsIDB4NkEsIDB4N0QsCisvKiAweDM4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweDQwICovIF9VTkssIF9BU0MsIF9BU0MsIF9BU0MsIF9BU0MsIF9BU0MsIF9BU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IF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEI4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEMwICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEM4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIDB4NDQsIF9VTkssIF9VTkssIF9VTkssCisvKiAweEQwICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEQ4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEUwICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEU4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEYwICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssCisvKiAweEY4ICovIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIF9VTkssIDB4NDUsCiB9OwogCiAvKgogICogVGhpcyB0YWJsZSBpcyBpbmRleGVkIGJ5IHRoZSBzZWNvbmQgb3Bjb2RlIG9mIHRoZSBleHRlbmRlZCBvcGNvZGUKICAqIHBhaXIuICBJdCByZXR1cm5zIGFuIGluZGV4IGludG8gdGhlIG9wY29kZSB0YWJsZSAoYWNwaV9nYmxfYW1sX29wX2luZm8pCiAgKi8KLXN0YXRpYyBjb25zdCB1OCBhY3BpX2dibF9sb25nX29wX2luZGV4W05VTV9FWFRFTkRFRF9PUENPREVdID0KLXsKK3N0YXRpYyBjb25zdCB1OCBhY3BpX2dibF9sb25nX29wX2luZGV4W05VTV9FWFRFTkRFRF9PUENPREVdID0gewogLyogICAgICAgICAgICAgIDAgICAgIDEgICAgIDIgICAgIDMgICAgIDQgICAgIDUgICAgIDYgICAgIDcgICovCiAvKiAgICAgICAgICAgICAgOCAgICAgOSAgICAgQSAgICAgQiAgICAgQyAgICAgRCAgICAgRSAgICAgRiAgKi8KLS8qIDB4MDAgKi8JX1VOSywgMHg0NiwgMHg0NywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4MDggKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4MTAgKi8JX1VOSywgX1VOSywgMHg0OCwgMHg0OSwgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4MTggKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgMHg3QiwKLS8qIDB4MjAgKi8JMHg0YSwgMHg0YiwgMHg0YywgMHg0ZCwgMHg0ZSwgMHg0ZiwgMHg1MCwgMHg1MSwKLS8qIDB4MjggKi8JMHg1MiwgMHg1MywgMHg1NCwgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4MzAgKi8JMHg1NSwgMHg1NiwgMHg1NywgMHg3ZSwgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4MzggKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4NDAgKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4NDggKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4NTAgKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4NTggKi8JX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKLS8qIDB4N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X1VOSywgX1VOSywgX1VOSywKKy8qIDB4NDggKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NTAgKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NTggKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NjAgKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NjggKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NzAgKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4NzggKi8gX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywgX1VOSywKKy8qIDB4ODAgKi8gMHg1OCwgMHg1OSwgMHg1YSwgMHg1YiwgMHg1YywgMHg1ZCwgMHg1ZSwgMHg1ZiwKKy8qIDB4ODggKi8gMHg3QywKIH07CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19nZXRfb3Bjb2RlX2luZm8KQEAgLTQxOCw0OCArNzIzLDM2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotY29uc3Qgc3RydWN0IGFjcGlfb3Bjb2RlX2luZm8gKgotYWNwaV9wc19nZXRfb3Bjb2RlX2luZm8gKAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bjb2RlKQorY29uc3Qgc3R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vZGUpKTsKLQkJYnJlYWs7CisJCXJldHVybiAoJmFjcGlfZ2JsX2FtbF9vcF9pbmZvCisJCQlbYWNwaV9nYmxfc2hvcnRfb3BfaW5kZXhbKHU4KSBvcGNvZGVdXSk7CiAJfQogCisJaWYgKCgob3Bjb2RlICYgMHhGRjAwKSA9PSBBTUxfRVhURU5ERURfT1BDT0RFKSAmJgorCSAgICAoKCh1OCkgb3Bjb2RlKSA8PSBNQVhfRVhURU5ERURfT1BDT0RFKSkgeworCQkvKiBWYWxpZCBleHRlbmRlZCAoMTYtYml0KSBvcGNvZGUgKi8KIAotCS8qIERlZmF1bHQgaXMgInVua25vd24gb3Bjb2RlIiAqLworCQlyZXR1cm4gKCZhY3BpX2dibF9hbWxfb3BfaW5mbworCQkJW2FjcGlfZ2JsX2xvbmdfb3BfaW5kZXhbKHU4KSBvcGNvZGVdXSk7CisJfQogCi0JcmV0dXJuICgmYWNwaV9nYmxfYW1sX29wX2luZm8gW19VTktdKTsKKwkvKiBVbmtub3duIEFNTCBvcGNvZGUgKi8KKworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfRVJST1IsCisJCQkgICJVbmtub3duIEFNTCBvcGNvZGUgWyU0LjRYXVxuIiwgb3Bjb2RlKSk7CisKKwlyZXR1cm4gKCZhY3BpX2dibF9hbWxfb3BfaW5mb1tfVU5LXSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19nZXRfb3Bjb2RlX25hbWUKQEAgLTQ3MywxNiArNzY2LDEzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotY2hhciAqCi1hY3BpX3BzX2dldF9vcGNvZGVfbmFtZSAoCi0JdTE2ICAgICAgICAgICA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ludGVycC5oPgogCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9QQVJTRVIKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoInBzcGFyc2UiKQotCi0KLXN0YXRpYyB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RlcHRoID0gMDsKLQotLyogTG9jYWwgcHJvdG90eXBlcyAqLwotCi1zdGF0aWMgdm9pZAotYWNwaV9wc19jb21wbGV0ZV90aGlzX29wICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKm9wKTsKLQotc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3BzX25leHRfcGFyc2Vfc3RhdGUgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqb3AsCi0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja19zdGF0dXMpOwotCi1zdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfcHNfcGFyc2VfbG9vcCAoCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSk7Ci0KK0FDUElfTU9EVUxFX05BTUUoInBzcGFyc2UiKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTkzLDEwICs3MSw3IEBACiAgKiBERVNDUklQVElPTjogR2V0IHRoZSBzaXplIG9mIHRoZSBjdXJyZW50IG9wY29kZS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi11MzIKLWFjcGlfcHNfZ2V0X29wY29kZV9zaXplICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wY29kZSkKK3UzMiBhY3BpX3BzX2dldF9vcGNvZGVfc2l6ZSh1MzIgb3Bjb2RlKQogewogCiAJLyogRXh0ZW5kZWQgKDItYnl0ZSkgb3Bjb2RlIGlmID4gMjU1ICovCkBAIC0xMTAsNyArODUsNiBAQAogCXJldHVybiAoMSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19wZWVrX29wY29kZQpAQCAtMTIzLDI4ICs5NywyNCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXUxNgotYWNwaV9wc19wZWVrX29wY29kZSAoCi0Jc3RydWN0IGFjcGlfcGFyc2Vfc3RhdGUgICAgICAgICAqcGFyc2VyX3N0YXRlKQordTE2IGFjcGlfcHNfcGVla19vcGNvZGUoc3RydWN0IGFjcGlfcGFyc2Vfc3RhdGUgKiBwYXJzZXJfc3RhdGUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYW1sOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bjb2RlOwotCisJdTggKmFtbDsKKwl1MTYgb3Bjb2RlOwogCiAJYW1sID0gcGFyc2VyX3N0YXRlLT5hbWw7Ci0Jb3Bjb2RlID0gKHUxNikgQUNQSV9HRVQ4IChhbWwpOworCW9wY29kZSA9ICh1MTYpIEFDUElfR0VUOChhbWwpOwogCi0JaWYgKG9wY29kZSA9PSBBTUxfRVhUT1ApIHsKLQkJLyogRXh0ZW5kZWQgb3Bjb2RlICovCisJaWYgKG9wY29kZSA9PSBBTUxfRVhURU5ERURfT1BfUFJFRklYKSB7CisJCS8qIEV4dGVuZGVkIG9wY29kZSwgZ2V0IHRoZSBzZWNvbmQgb3Bjb2RlIGJ5dGUgKi8KIAogCQlhbWwrKzsKLQkJb3Bjb2RlID0gKHUxNikgKChvcGNvZGUgPDwgOCkgfCBBQ1BJX0dFVDggKGFtbCkpOworCQlvcGNvZGUgPSAodTE2KSAoKG9wY29kZSA8PCA4KSB8IEFDUElfR0VUOChhbWwpKTsKIAl9CiAKIAlyZXR1cm4gKG9wY29kZSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19jb21wbGV0ZV90aGlzX29wCkBAIC0xNTIsNDcgKzEyMiw1NCBAQAogICogUEFSQU1FVEVSUzogIHdhbGtfc3RhdGUgICAgICAtIEN1cnJlbnQgU3RhdGUKICAqICAgICAgICAgICAgICBPcCAgICAgICAgICAgICAgLSBPcCB0byBjb21wbGV0ZQogICoKLSAqIFJFVFVSTjogICAgICBOb25lLgorICogUkVUVVJOOiAgICAgIFN0YXR1cwogICoKICAqIERFU0NSSVBUSU9OOiBQZXJmb3JtIGFueSBjbGVhbnVwIGF0IHRoZSBjb21wbGV0aW9uIG9mIGFuIE9wLgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkCi1hY3BpX3BzX2NvbXBsZXRlX3RoaXNfb3AgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUsCi0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAqb3ApCithY3BpX3N0YXR1cworYWNwaV9wc19jb21wbGV0ZV90aGlzX29wKHN0cnVjdCBhY3BpX3dhbGtf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JCQllbHNlIHsKLQkJCQkJcHJldi0+Y29tbW9uLm5leHQgPSBvcC0+Y29tbW9uLm5leHQ7Ci0JCQkJCW5leHQgPSBOVUxMOwotCQkJCX0KKwkJCQlwcmV2ID0gbmV4dDsKIAkJCX0KLQkJCXByZXYgPSBuZXh0OwotCQl9CiAJfQogCi0KLWNsZWFudXA6CisgICAgICBjbGVhbnVwOgogCiAJLyogTm93IHdlIGNhbiBhY3R1YWxseSBkZWxldGUgdGhlIHN1YnRyZWUgcm9vdGVkIGF0IE9wICovCiAKLQlhY3BpX3BzX2RlbGV0ZV9wYXJzZV90cmVlIChvcCk7Ci0JcmV0dXJuX1ZPSUQ7Ci19CisJYWNwaV9wc19kZWxldGVfcGFyc2VfdHJlZShvcCk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIAorICAgICAgYWxsb2NhdGVfZXJyb3I6CisKKwkvKiBBbHdheXMgZGVsZXRlIHRoZSBzdWJ0cmVlLCBldmVuIG9uIGVycm9yICovCisKKwlhY3BpX3BzX2RlbGV0ZV9wYXJzZV90cmVlKG9wKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfTk9fTUVNT1JZKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0zMTcsMTggKzMyMSwxNSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV9wc19uZXh0X3BhcnNlX3N0YXRlICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlLAotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKm9wLAotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAg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bjb2RlICovCiAKLQlvcF9pbmZvID0gYWNwaV9wc19nZXRfb3Bjb2RlX2luZm8gKG9wLT5jb21tb24uYW1sX29wY29kZSk7CisJb3BfaW5mbyA9IGFjcGlfcHNfZ2V0X29wY29kZV9pbmZvKG9wLT5jb21tb24uYW1sX29wY29kZSk7CiAJaWYgKG9wX2luZm8tPmNsYXNzID09IEFNTF9DTEFTU19VTktOT1dOKSB7CiAJCS8qIEludmFsaWQgb3Bjb2RlIG9yIEFTQ0lJIGNoYXJhY3RlciAqLwogCkBAIC0xMTEsNyArMTAxLDYgQEAKIAlyZXR1cm4gKGFyZyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9wc19hcHBlbmRfYXJnCkBAIC0xMjYsMTYgKzExNSwxMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV9wc19hcHBlbmRfYXJnICgKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcCwKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICphcmcpCithY3BpX3BzX2FwcGVuZF9hcmcodW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKm9wLCB1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqYXJnKQogewotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKnByZXZfYXJnOwotCWNvbnN0IHN0cnVjdCBhY3BpX29wY29kZV9pbmZvICAgKm9wX2luZm87CisJdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKnByZXZfYXJnOworCWNvbnN0IHN0cnVjdCBhY3BpX29wY29kZV9pbmZvICpvcF9pbmZvOwogCi0KLQlBQ1BJX0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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKgotYWNwaV9wc19jcmVhdGVfc2NvcGVfb3AgKAotCXZvaWQpCit1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqYWNwaV9wc19jcmVhdGVfc2NvcGVfb3Aodm9pZCkKIHsKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpzY29wZV9vcDsKKwl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqc2NvcGVfb3A7CiAKLQotCXNjb3BlX29wID0gYWNwaV9wc19hbGxvY19vcCAoQU1MX1NDT1BFX09QKTsKKwlzY29wZV9vcCA9IGFjcGlfcHNfYWxsb2Nfb3AoQU1MX1NDT1BFX09QKTsKIAlpZiAoIXNjb3BlX29wKSB7CiAJCXJldHVybiAoTlVMTCk7CiAJfQpAQCAtNzgsNyArNzIsNiBAQAogCXJldHVybiAoc2NvcGVfb3ApOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcHNfaW5pdF9vcApAQCAtOTIsMjMgKzg1LDE5IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV9wc19pbml0X29wICgKLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICpvcCwKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wY29kZSkKK3ZvaWQgYWNwaV9wc19pbml0X29wKHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICpvcCwgdTE2IG9wY29kZSkKIHsKLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJb3AtPmNvbW1vbi5kYXRhX3R5cGUgPSBBQ1BJX0RFU0NfVFlQRV9QQVJTRVI7CiAJb3AtPmNvbW1vbi5hbWxfb3Bjb2RlID0gb3Bjb2RlOwogCi0JQUNQSV9ESVNBU01fT05MWV9NRU1CRVJTIChBQ1BJX1NUUk5DUFkgKG9wLT5jb21tb24uYW1sX29wX25hbWUsCi0JCQkoYWNwaV9wc19nZXRfb3Bjb2RlX2luZm8gKG9wY29kZSkpLT5uYW1lLAotCQkJCXNpemVvZiAob3AtPmNvbW1vbi5hbWxfb3BfbmFtZSkpKTsKKwlBQ1BJX0RJU0FTTV9PTkxZX01FTUJFUlMoQUNQSV9TVFJOQ1BZKG9wLT5jb21tb24uYW1sX29wX25hbWUsCisJCQkJCSAgICAgIChhY3BpX3BzX2dldF9vcGNvZGVfaW5mbworCQkJCQkgICAgICAgKG9wY29kZSkpLT5uYW1lLAorCQkJCQkgICAgICBzaXplb2Yob3AtPmNvbW1vbi5hbWxfb3BfbmFtZSkpKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3BzX2FsbG9jX29wCkBAIC0xMjMsMjkgKzExMiwyMyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0KgotYWNwaV9wc19hbGxvY19vcCAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUpCit1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqYWNwaV9wc19hbGxvY19vcCh1MTYgb3Bjb2RlKQogewotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKm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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3BzX2RlbGV0ZV9wYXJzZV9jYWNoZQotICoKLSAqIFBBUkFNRVRFUlM6ICBOb25lCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUKLSAqCi0gKiBERVNDUklQVElPTjogRnJlZSBhbGwgb2JqZWN0cyB0aGF0IGFyZSBvbiB0aGUgcGFyc2UgY2FjaGUgbGlzdC4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkCi1hY3BpX3BzX2RlbGV0ZV9wYXJzZV9jYWNoZSAoCi0Jdm9pZCkKLXsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgicHNfZGVsZXRlX3BhcnNlX2NhY2hlIik7Ci0KLQotCWFjcGlfdXRfZGVsZXRlX2dlbmVyaWNfY2FjaGUgKEFDUElfTUVNX0xJU1RfUFNOT0RFKTsKLQlhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX2NhY2hlIChBQ1BJX01FTV9MSVNUX1BTTk9ERV9FWFQpOwotCXJldHVybl9WT0lEOwotfQotI2VuZGlmCi0KLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgVXRpbGl0eSBmdW5jdGlvbnMKQEAgLTI0MSwzNiArMTkzLDI3IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotCiAvKgogICogSXMgImMiIGEgbmFtZXN0cmluZyBsZWFkIGNoYXJhY3Rlcj8KICAqLwotdTgKLWFjcGlfcHNfaXNfbGVhZGluZ19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AgICAgICAgICBBQ1BJX1BBUlNFUgotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgicHN4ZmFjZSIpCitBQ1BJX01PRFVMRV9OQU1FKCJwc3hmYWNlIikKIAorLyogTG9jYWwgUHJvdG90eXBlcyAqLworc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfcHNfZXhlY3V0ZV9wYXNzKHN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICppbmZvKTsKKworc3RhdGljIHZvaWQKK2FjcGlfcHNfdXBkYXRlX3BhcmFtZXRlcl9saXN0KHN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvICppbmZvLCB1MTYgYWN0aW9uKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9wc3hfZXhlY3V0ZQorICogRlVOQ1RJT046ICAgIGFjcGlfcHNfZXhlY3V0ZV9tZXRob2QKICAqCiAgKiBQQVJBTUVURVJTOiAgSW5mbyAgICAgICAgICAgIC0gTWV0aG9kIGluZm8gYmxvY2ssIGNvbnRhaW5zOgogICogICAgICAgICAgICAgICAgICBOb2RlICAgICAgICAgICAgLSBNZXRob2QgTm9kZSB0byBleGVjdXRlCisgKiAgICAgICAgICAgICAgICAgIG9ial9kZXNjICAgICAgICAtIE1ldGhvZCBvYmplY3QKICAqICAgICAgICAgICAgICAgICAgUGFyYW1ldGVycyAgICAgIC0gTGlzdCBvZiBwYXJhbWV0ZXJzIHRvIHBhc3MgdG8gdGhlIG1ldGhvZCwKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVybWluYXRlZCBieSBOVUxMLiBQYXJhbXMgaXRzZWxmIG1heSBiZQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMIGlmIG5vIHBhcmFtZXRlcnMgYXJlIGJlaW5nIHBhc3NlZC4KQEAgLTY3LDYgKzcwLDcgQEAKICAqICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyX3R5cGUgIC0gVHlwZSBvZiBQYXJhbWV0ZXIgbGlzdAogICogICAgICAgICAgICAgICAgICByZXR1cm5fb2JqZWN0ICAgLSBXaGVyZSB0byBwdXQgbWV0aG9kJ3MgcmV0dXJuIHZhbHVlIChpZgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbnkpLiBJZiBOVUxMLCBubyB2YWx1ZSBpcyByZXR1cm5lZC4KKyAqICAgICAgICAgICAgICAgICAgcGFzc19udW1iZXIgICAgIC0gUGFyc2Ugb3IgZXhlY3V0ZSBwYXNzCiAgKgogICogUkVUVVJOOiAgICAgIFN0YXR1cwogICoKQEAgLTc0LDE1OCArNzgsNjUgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9wc3hfZXhlY3V0ZSAoCi0Jc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gICAgICAqaW5mbykKK2FjcGlfc3RhdHVzIGFjcGlfcHNfZXhlY3V0ZV9tZXRob2Qoc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gKmluZm8pCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotCXVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgKm9wOwotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGU7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRSgicHNfZXhlY3V0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SSVBUSU9OOiBVcGRhdGUgcmVmZXJlbmNlIGNvdW50IG9uIGFsbCBtZXRob2QgcGFyYW1ldGVyIG9iamVjdHMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCitzdGF0aWMgdm9pZAorYWNwaV9wc191cGRhdGVfcGFyYW1ldGVyX2xpc3Qoc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gKmluZm8sIHUxNiBhY3Rpb24pCit7CisJYWNwaV9uYXRpdmVfdWludCBpOworCisJaWYgKChpbmZvLT5wYXJhbWV0ZXJfdHlwZSA9PSBBQ1BJX1BBUkFNX0FSR1MpICYmIChpbmZvLT5wYXJhbWV0ZXJzKSkgeworCQkvKiBVcGRhdGUgcmVmZXJlbmNlIGNvdW50IGZvciBlYWNoIHBhcmFtZXRlciAqLworCisJCWZvciAoaSA9IDA7IGluZm8tPnBhcmFtZXRlcnNbaV07IGkrKykgeworCQkJLyogSWdub3JlIGVycm9ycywganVzdCBkbyB0aGVtIGFsbCAqLworCisJCQkodm9pZClhY3BpX3V0X3VwZGF0ZV9vYmplY3RfcmVmZXJlbmNlKGluZm8tPgorCQkJCQkJCSAgICAgIHBhcmFtZXRlcnNbaV0sCisJCQkJCQkJICAgICAgYWN0aW9uKTsKKwkJfQorCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9wc19leGVjdXRlX3Bhc3MKKyAqCisgKiBQQVJBTUVURVJTOiAgSW5mbyAgICAgICAgICAgIC0gU2VlIHN0cnVjdCBhY3BpX3BhcmFtZXRlcl9pbmZvCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFVzZWQ6IHBhc3NfbnVtYmVyLCBOb2RlLCBhbmQgb2JqX2R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lc3NvciAqcHIgPSAoc3RydWN0IGFjcGlfcHJvY2Vzc29yICopc2VxLT5wcml2YXRlOwogCiAJQUNQSV9GVU5DVElPTl9UUkFDRSgiYWNwaV9wcm9jZXNzb3JfaW5mb19zZXFfc2hvdyIpOwogCkBAIC0zMDgsNDAgKzI5OCwzNyBAQAogCQlnb3RvIGVuZDsKIAogCXNlcV9wcmludGYoc2VxLCAicHJvY2Vzc29yIGlkOiAgICAgICAgICAgICVkXG4iCi0JCQkiYWNwaSBpZDogICAgICAgICAgICAgICAgICVkXG4iCi0JCQkiYnVzIG1hc3RlcmluZyBjb250cm9sOiAgICVzXG4iCi0JCQkicG93ZXIgbWFuYWdlbWVudDogICAgICAgICVzXG4iCi0JCQkidGhyb3R0bGluZyBjb250cm9sOiAgICAgICVzXG4iCi0JCQkibGltaXQgaW50ZXJmYWNlOiAgICAgICAgICVzXG4iLAotCQkJcHItPmlkLAotCQkJcHItPmFjcGlfaWQsCi0JCQlwci0+ZmxhZ3MuYm1fY29udHJvbCA/ICJ5ZXMiIDogIm5vIiwKLQkJCXByLT5mbGFncy5wb3dlciA/ICJ5ZXMiIDogIm5vIiwKLQkJCXByLT5mbGFncy50aHJvdHRsaW5nID8gInllcyIgOiAibm8iLAotCQkJcHItPmZsYWdzLmxpbWl0ID8gInllcyIgOiAibm8iKTsKKwkJICAgImFjcGkgaWQ6ICAgICAgICAgICAgICAgICAlZFxuIgorCQkgICAiYnVzIG1hc3RlcmluZyBjb250cm9sOiAgICVzXG4iCisJCSAgICJwb3dlciBtYW5hZ2VtZW50OiAgICAgICAgJXNcbiIKKwkJICAgInRocm90dGxpbmcgY29udHJvbDogICAgICAlc1xuIgorCQkgICAibGltaXQgaW50ZXJmYWNlOiAgICAgICAgICVzXG4iLAorCQkgICBwci0+aWQsCisJCSAgIHByLT5hY3BpX2lkLAorCQkgICBwci0+ZmxhZ3MuYm1fY29udHJvbCA/ICJ5ZXMiIDogIm5vIiwKKwkJICAgcHItPmZsYWdzLnBvd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BTUUgICAgKCJyc2FkZHIiKQorQUNQSV9NT0RVTEVfTkFNRSgicnNhZGRyIikKIAorLyogTG9jYWwgcHJvdG90eXBlcyAqLworc3RhdGljIHZvaWQKK2FjcGlfcnNfZGVjb2RlX2dlbmVyYWxfZmxhZ3ModW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpyZXNvdXJjZSwgdTggZmxhZ3MpOworCitzdGF0aWMgdTggYWNwaV9yc19lbmNvZGVfZ2VuZXJhbF9mbGFncyh1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgKnJlc291cmNlKTsKKworc3RhdGljIHZvaWQKK2FjcGlfcnNfZGVjb2RlX3NwZWNpZmljX2ZsYWdzKHVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSAqcmVzb3VyY2UsIHU4IGZsYWdzKTsKKworc3RhdGljIHU4IGFjcGlfcnNfZW5jb2RlX3NwZWNpZmljX2ZsYWdzKHVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSAqcmVzb3VyY2UpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2RlY29kZV9nZW5lcmFsX2ZsYWdzCisgKgorICogUEFSQU1FVEVSUzogIFJlc291cmNlICAgICAgICAgICAgLSBBZGRyZXNzIHJlc291cmNlIGRhdGEgc3RydWN0CisgKiAgICAgICAgICAgICAgRmxhZ3MgICAgICAgICAgICAgICAtIEFjdHVhbCBmbGFnIGJ5dGUKKyAqCisgKiBSRVRVUk46ICAgICAgRGVjb2RlZCBmbGFnIGJpdHMgaW4gcmVzb3VyY2Ugc3RydWN0CisgKgorICogREVTQ1JJUFRJT046IERlY29kZSBhIGdlbmVyYWwgZmxhZyBieXRlIHRvIGFuIGFkZHJlc3MgcmVzb3VyY2Ugc3RydWN0CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK2FjcGlfcnNfZGVjb2RlX2dlbmVyYWxfZmxhZ3ModW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpyZXNvdXJjZSwgdTggZmxhZ3MpCit7CisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogUHJvZHVjZXIgLyBDb25zdW1lciAtIGZsYWcgYml0WzBdICovCisKKwlyZXNvdXJjZS0+YWRkcmVzcy5wcm9kdWNlcl9jb25zdW1lciA9ICh1MzIpIChmbGFncyAmIDB4MDEpOworCisJLyogRGVjb2RlIChfREVDKSAtIGZsYWcgYml0WzFdICovCisKKwlyZXNvdXJjZS0+YWRkcmVzcy5kZWNvZGUgPSAodTMyKSAoKGZsYWdzID4+IDEpICYgMHgwMSk7CisKKwkvKiBNaW4gQWRkcmVzcyBGaXhlZCAoX01JRikgLSBmbGFnIGJpdFsyXSAqLworCisJcmVzb3VyY2UtPmFkZHJlc3MubWluX2FkZHJlc3NfZml4ZWQgPSAodTMyKSAoKGZsYWdzID4+IDIpICYgMHgwMSk7CisKKwkvKiBNYXggQWRkcmVzcyBGaXhlZCAoX01BRikgLSBmbGFnIGJpdFszXSAqLworCisJcmVzb3VyY2UtPmFkZHJlc3MubWF4X2FkZHJlc3NfZml4ZWQgPSAodTMyKSAoKGZsYWdzID4+IDMpICYgMHgwMSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZW5jb2RlX2dlbmVyYWxfZmxhZ3MKKyAqCisgKiBQQVJBTUVURVJTOiAgUmVzb3VyY2UgICAgICAgICAgICAtIEFkZHJlc3MgcmVzb3VyY2UgZGF0YSBzdHJ1Y3QKKyAqCisgKiBSRVRVUk46ICAgICAgRW5jb2RlZCBnZW5lcmFsIGZsYWcgYnl0ZQorICoKKyAqIERFU0NSSVBUSU9OOiBDb25zdHJ1Y3QgYSBnZW5lcmFsIGZsYWcgYnl0ZSBmcm9tIGFuIGFkZHJlc3MgcmVzb3VyY2Ugc3RydWN0CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHU4IGFjcGlfcnNfZW5jb2RlX2dlbmVyYWxfZmxhZ3ModW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpyZXNvdXJjZSkKK3sKKwl1OCBmbGFnczsKKworCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKKworCS8qIFByb2R1Y2VyIC8gQ29uc3VtZXIgLSBmbGFnIGJpdFswXSAqLworCisJZmxhZ3MgPSAodTgpIChyZXNvdXJjZS0+YWRkcmVzcy5wcm9kdWNlcl9jb25zdW1lciAmIDB4MDEpOworCisJLyogRGVjb2RlIChfREVDKSAtIGZsYWcgYml0WzFdICovCisKKwlmbGFncyB8PSAodTgpICgocmVzb3VyY2UtPmFkZHJlc3MuZGVjb2RlICYgMHgwMSkgPDwgMSk7CisKKwkvKiBNaW4gQWRkcmVzcyBGaXhlZCAoX01JRikgLSBmbGFnIGJpdFsyXSAqLworCisJZmxhZ3MgfD0gKHU4KSAoKHJlc291cmNlLT5hZGRyZXNzLm1pbl9hZGRyZXNzX2ZpeGVkICYgMHgwMSkgPDwgMik7CisKKwkvKiBNYXggQWRkcmVzcyBGaXhlZCAoX01BRikgLSBmbGFnIGJpdFszXSAqLworCisJZmxhZ3MgfD0gKHU4KSAoKHJlc291cmNlLT5hZGRyZXNzLm1heF9hZGRyZXNzX2ZpeGVkICYgMHgwMSkgPDwgMyk7CisKKwlyZXR1cm4gKGZsYWdzKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19kZWNvZGVfc3BlY2lmaWNfZmxhZ3MKKyAqCisgKiBQQVJBTUVURVJTOiAgUmVzb3VyY2UgICAgICAgICAgICAtIEFkZHJlc3MgcmVzb3VyY2UgZGF0YSBzdHJ1Y3QKKyAqICAgICAgICAgICAgICBGbGFncyAgICAgICAgICAgICAgIC0gQWN0dWFsIGZsYWcgYnl0ZQorICoKKyAqIFJFVFVSTjogICAgICBEZWNvZGVkIGZsYWcgYml0cyBpbiBhdHRyaWJ1dGUgc3RydWN0CisgKgorICogREVTQ1JJUFRJT046IERlY29kZSBhIHR5cGUtc3BlY2lmaWMgZmxhZyBieXRlIHRvIGFuIGF0dHJpYnV0ZSBzdHJ1Y3QuCisgKiAgICAgICAgICAgICAgVHlwZS1zcGVjaWZpYyBmbGFncyBhcmUgb25seSBkZWZpbmVkIGZvciB0aGUgTWVtb3J5IGFuZCBJTworICogICAgICAgICAgICAgIHJlc291cmNlIHR5cGVzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCithY3BpX3JzX2RlY29kZV9zcGVjaWZpY19mbGFncyh1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgKnJlc291cmNlLCB1OCBmbGFncykKK3sKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CisKKwlpZiAocmVzb3VyY2UtPmFkZHJlc3MucmVzb3VyY2VfdHlwZSA9PSBBQ1BJX01FTU9SWV9SQU5HRSkgeworCQkvKiBXcml0ZSBTdGF0dXMgKF9SVykgLSBmbGFnIGJpdFswXSAqLworCisJCXJlc291cmNlLT5hZGRyZXNzLmF0dHJpYnV0ZS5tZW1vcnkucmVhZF93cml0ZV9hdHRyaWJ1dGUgPQorCQkgICAgKHUxNikgKGZsYWdzICYgMHgwMSk7CisKKw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mlidXRlLmlvLnJhbmdlX2F0dHJpYnV0ZSAmIDB4MDMpOworCisJCS8qIFRyYW5zbGF0aW9ucyAoX1RUUCBhbmQgX1RSUykgLSBmbGFnIGJpdHNbNTo0XSAqLworCisJCWZsYWdzIHw9ICh1OCkKKwkJICAgICgocmVzb3VyY2UtPmFkZHJlc3MuYXR0cmlidXRlLmlvLgorCQkgICAgICB0cmFuc2xhdGlvbl9hdHRyaWJ1dGUgJiAweDAzKSA8PCA0KTsKKwl9CisKKwlyZXR1cm4gKGZsYWdzKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03MSwzNCArMjQzLDMwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19hZGRyZXNzMTZfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfYWRkcmVzczE2X3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJICAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQkgICB1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBzdHJ1Y3R1cmVfc2l6ZSkKIHsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCXUxNiAgICAgIC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ZWxzZSB7CisJCW91dHB1dF9zdHJ1Y3QtPmRhdGEuYWRkcmVzczE2LnJlc291cmNlX3NvdXJjZS5pbmRleCA9IDA7CiAJCW91dHB1dF9zdHJ1Y3QtPmRhdGEuYWRkcmVzczE2LnJlc291cmNlX3NvdXJjZS5zdHJpbmdfbGVuZ3RoID0gMDsKIAkJb3V0cHV0X3N0cnVjdC0+ZGF0YS5hZGRyZXNzMTYucmVzb3VyY2Vfc291cmNlLnN0cmluZ19wdHIgPSBOVUxMOwogCX0KQEAgLTI1OSwxMCArMzkzLDkgQEAKIAkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwogCiAJKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2FkZHJlc3MxNl9zdHJlYW0KQEAgLTI4MCwyNCArNDEzLDE4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19hZGRyZXNzMTZfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCkKK2FjcGlfcnNfYWRkcmVzczE2X3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSA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qKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfYWRkcmVzczMyX3Jlc291cmNlCkBAIC00MzMsMzYgKzUzNSwzMCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfYWRkcmVzczMyX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpCithY3BpX3JzX2FkZHJlc3MzMl9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyOwotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3Q9ICh2b2lkICopICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDE2OwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGVtcF9wdHI7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Rfc2l6ZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICA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Wwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlICovCiAKIAkqc3RydWN0dXJlX3NpemUgPSBzdHJ1Y3Rfc2l6ZTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfYWRkcmVzczMyX3N0cmVhbQpAQCAtNjQyLDEzNiArNzAzLDEwNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfYWRkcmVzczMyX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX2FkZHJlc3MzMl9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpsZW5ndGhfZmllbGQ7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wODsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0ZW1wX3BvaW50ZXI7CisJdTggKmJ1ZmZlcjsKKw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AgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpCithY3BpX3JzX2FkZHJlc3M2NF9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyOwotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSAqb3V0cHV0X2J1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXAxNjsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4OwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VfdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0ZW1wX3B0cjsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdF9zaXplOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg7CisJdTE2IHRlbXAxNjsKKwl1OCB0ZW1wODsKKwl1OCByZXNvdXJjZV90eXBlOworCXU4ICp0ZW1wX3B0cjsKKwl1MzIgaW5kZXg7CisJdTggKmJ1ZmZlciA9IGJ5dGVfc3RyZWFtX2J1ZmZlcjsKKwlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqb3V0cH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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2FkZHJlc3M2NF9zdHJlYW0KQEAgLTEwMjYsMTMyICsxMDE4LDEwMSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfYWRkcmVzczY0X3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX2FkZHJlc3M2NF9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpsZW5ndGhfZmllbGQ7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wODsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0ZW1wX3BvaW50ZXI7CisJdTggKmJ1ZmZlcjsKKwl1MTYgKmxlbmd0aF9maWVsZDsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInJzX2FkZHJlc3M2NF9zdHJlYW0iKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoInJzX2FkZHJlc3M2NF9zdHJlYW0iKTsKIAogCWJ1ZmZlciA9ICpvdXRwdXRfYnVmZmVyOwogCi0J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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTY2LDE5ICs2NCwxNSBAQAogICogICAgICAgICAgICAgIHRoZSByZXNvdXJjZSBkYXRhLgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9ieXRlX3N0cmVhbV9sZW5ndGggKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnNpemVfbmVlZGVkKQorYWNwaV9yc19nZXRfYnl0ZV9zdHJlYW1fbGVuZ3RoKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdCwKKwkJCSAgICAgICBhY3BpX3NpemUgKiBzaXplX25lZWRlZCkKIHsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVfc3RyZWFtX3NpemVfbmVlZGVkID0gMDsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNlZ21lbnRfc2l6ZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSBGQUxTRTsKKwlhY3BpX3NpemUgYnl0ZV9zdHJlYW1fc2l6ZV9uZWVkZWQgPSAwOworCWFjcGlfc2l6ZSBzZWdtZW50X3NpemU7CisJdTggZG9uZSA9IEZBTFNFOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgicnNfZ2V0X2J5dGVfc3RyZWFtX2xlbmd0aCIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgicnNfZ2V0X2J5dGVfc3RyZWFtX2xlbmd0aCIpOwogCiAJd2hpbGUgKCFkb25lKSB7CiAJCS8qIEluaXQgdGhlIHZhcmlhYmx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obGlua2VkX2xpc3QtPklkKSAqLworCQl9CQkvKiBzd2l0Y2ggKGxpbmtlZF9saXN0LT5JZCkgKi8KIAogCQkvKiBVcGRhdGUgdGhlIHRvdGFsICovCiAKQEAgLTI2NywxNyArMjcwLDE2IEBACiAKIAkJLyogUG9pbnQgdG8gdGhlIG5leHQgb2JqZWN0ICovCiAKLQkJbGlua2VkX2xpc3QgPSBBQ1BJX1BUUl9BREQgKHN0cnVjdCBhY3BpX3Jlc291cmNlLAotCQkJCSAgbGlua2VkX2xpc3QsIGxpbmtlZF9saXN0LT5sZW5ndGgpOworCQlsaW5rZWRfbGlzdCA9IEFDUElfUFRSX0FERChzdHJ1Y3QgYWNwaV9yZXNvdXJjZSwKKwkJCQkJICAgbGlua2VkX2xpc3QsIGxpbmtlZF9saXN0LT5sZW5ndGgpOwogCX0KIAogCS8qIFRoaXMgaXMgdGhlIGRhdGEgdGhlIGNhbGxlciBuZWVkcyAqLwogCiAJKnNpemVfbmVlZGVkID0gYnl0ZV9zdHJlYW1fc2l6ZV9uZWVkZWQ7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2dldF9saXN0X2xlbmd0aApAQCAtMjk3LDMyICsyOTksMjggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9saXN0X2xlbmd0aCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZV9zdHJlYW1fYnVmZmVyX2xlbmd0aCwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzaXplX25lZWRlZCkKK2FjcGlfcnNfZ2V0X2xpc3RfbGVuZ3RoKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJdTMyIGJ5dGVfc3RyZWFtX2J1ZmZlcl9sZW5ndGgsIGFjcGlfc2l6ZSAqIHNpemVfbmVlZGVkKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyX3NpemUgPSAwOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNfcGFyc2VkID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlcl9vZl9pbnRlcnJ1cHRzID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlcl9vZl9jaGFubmVscyA9IDA7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZV90eXBlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc19jb25zdW1lZDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXI7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wODsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXAxNjsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkaXRpb25hbF9ieXRlczsKKwl1MzIgYnVmZmVyX3NpemUgPSAwOworCXUzMiBieXRlc19wYXJzZWQgPSAwOworCXU4IG51bWJlcl9vZl9pbnRlcnJ1cHRzID0gMDsKKwl1OCBudW1iZXJfb2ZfY2hhbm5lb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1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19nZXRfcGNpX3JvdXRpbmdfdGFibGVfbGVuZ3RoCkBAIC03MjMsMjIgKzcxNSwxOSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZ2V0X3BjaV9yb3V0aW5nX3RhYmxlX2xlbmd0aCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqcGFja2FnZV9vYmplY3QsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyX3NpemVfbmVlZGVkKQorYWNwaV9yc19nZXRfcGNpX3JvdXRpbmdfdGFibGVfbGVuZ3RoKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnBhY2thZ2Vfb2JqZWN0LAorCQkJCSAgICAgYWNwaV9zaXplICogYnVmZmVyX3NpemVfbmVlZGVkKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyX29mX2VsZW1lbnRzOwotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgdGVtcF9zaXplX25lZWRlZCA9IDA7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKnRvcF9vYmplY3RfbGlzdDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnBhY2thZ2VfZWxlbWVudDsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0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9GIFNVQ0ggREFNQUdFUy4KICAqLwogCi0KICNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KICNpbmNsdWRlIDxhY3BpL2FjcmVzcmMuaD4KICNpbmNsdWRlIDxhY3BpL2FtbGNvZGUuaD4KICNpbmNsdWRlIDxhY3BpL2FjbmFtZXNwLmg+CiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1JFU09VUkNFUwotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgicnNjcmVhdGUiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJyc2NyZWF0ZSIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjgsMjQgKzY2LDIwIEBACiAgKiAgICAgICAgICAgICAgb2YgZGV2aWNlIHJlc291cmNlcy4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiBhY3BpX3N0YXR1cwotYWNwaV9yc19jcmVhdGVfcmVzb3VyY2VfbGlzdCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKm91dHB1dF9idWZmZXIpCithY3BpX3JzX2NyZWF0ZV9yZXNvdXJjZV9saXN0KHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgICAgc3RydWN0IGFjcGlfYnVmZmVyICpvdXRwdXRfYnVmZmVyKQogewogCi0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fc3RhcnQ7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ioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19jcmVhdGVfcGNpX3JvdXRpbmdfdGFibGUKQEAgLTE0OCw0NCArMTQ1LDQxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19jcmVhdGVfcGNpX3JvdXRpbmdfdGFibGUgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnBhY2thZ2Vfb2JqZWN0LAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKm91dHB1dF9idWZmZXIpCithY3BpX3JzX2NyZWF0ZV9wY2lfcm91dGluZ190YWJsZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpwYWNrYWdlX29iamVjdCwKKwkJCQkgc3RydWN0IGFjcGlfYnVmZmVyICpvdXRwdXRfYnVmZmVyKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcjsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqdG9wX29iamVjdF9saXN0OwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKipzdWJfb2JqZWN0X2xpc3Q7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJfc2l6ZV9uZWVkZWQgPSAwOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyX29mX2VsZW1lbnRzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg7Ci0Jc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUgICAqdXNlcl9wcnQ7Ci0Jc3RydWN0IGFjcGlfbmFt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ZmZXItPmxlbmd0aCkpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfSU5GTywgIm91dHB1dF9idWZmZXIgJXAgTGVuZ3RoICVYXG4iLAorCQkJICBvdXRwdXRfYnVmZmVyLT5wb2ludGVyLCAodTMyKSBvdXRwdXRfYnVmZmVyLT5sZW5ndGgpKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfY3JlYXRlX2J5dGVfc3RyZWFtCkBAIC0zNzQsMTkgKzM3NywxNiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfY3JlYXRlX2J5dGVfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdF9idWZmZXIsCi0Jc3RydWN0IGFjcGlfYnVmZmVyICAgICAgICAgICAgICAqb3V0cHV0X2J1ZmZlcikKK2FjcGlfcnNfY3JlYXRlX2J5dGVfc3RyZWFtKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdF9idWZmZXIsCisJCQkgICBzdHJ1Y3QgYWNwaV9idWZmZXIgKm91dHB1dF9idWZmZXIpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBieXRlX3N0cmVhbV9zaXplX25lZWRlZCA9IDA7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCWFjcGlfc2l6ZSBieXRlX3N0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C8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9kbWEKQEAgLTE2MSw3NSArMTMwLDY5IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQKLWFjcGlfcnNfZHVtcF9kbWEgKAotCXVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSAgICAgICAgKmRhdGEpCitzdGF0aWMgdm9pZCBhY3BpX3JzX2R1bXBfZG1hKHVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSAqZGF0YSkKIHsKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEgICAgICAgICpkbWFfZGF0YSA9IChzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEgKikgZGF0YTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gMDsKKwlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEgKmRtYV9kYXRhID0gKHN0cnVjdCBhY3BpX3Jlc291cmNlX2RtYSAqKWRhdGE7CisJdTggaW5kZXggPSAwOwogCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKLQotCi0JYWNwaV9vc19wcmludGYgKCJETUEgUmVzb3VyY2VcbiIpOworCWFjcGlfb3NfcHJpbnRmKCJETUEgUmVzb3VyY2VcbiIpOwogCiAJc3dpdGNoIChkbWFfZGF0YS0+dHlwZSkgewogCWNhc2UgQUNQSV9DT01QQVRJQklMSVRZOgotCQlhY3BpX29zX3ByaW50ZiAoIiAgQ29tcGF0aWJpbGl0eSBtb2RlXG4iKTsKKwkJYWNwaV9vc19wcmludGYoIiAgQ29tcGF0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gpOwogCiAJcmV0dXJuOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9tZW1vcnkzMgpAQCAtNDU1LDM3ICs0MDAsMzMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZAotYWNwaV9yc19kdW1wX21lbW9yeTMyICgKLQl1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgICAgICAgICpkYXRhKQorc3RhdGljIHZvaWQgYWNwaV9yc19kdW1wX21lbW9yeTMyKHVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSAqZGF0YSkKIHsKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9tZW0zMiAgICAgICptZW1vcnkzMl9kYXRhID0gKHN0cnVjdCBhY3BpX3Jlc291cmNlX21lbTMyICopIGRhdGE7CisJc3RydWN0IGFjcGlfcmVzb3VyY2VfbWVtMzIgKm1lbW9yeTMyX2RhdGEgPQorCSAgICAoc3RydWN0IGFjcGlfcmVzb3VyY2VfbWVtMzIgKilkYXRhOwogCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKKwlhY3BpX29zX3ByaW50ZigiMzItQml0IE1lbW9yeSBSYW5nZSBSZXNvdXJjZVxuIik7CiAKKwlhY3BpX29zX3ByaW50ZigiICBSZWFkJXNcbiIsCisJCSAgICAgICBBQ1BJX1JFQURfV1JJVEVfTUVNT1JZID09CisJCSAgICAgICBtZW1vcnkzMl9kYXRhLT5yZWFkX3dyaXRlX2F0dHJpYnV0ZSA/CisJCSAgICAgICAiL1dyaXRlIiA6ICIgb25seSIpOwogCi0JYWNwaV9vc19wcm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GF0YS0+cmFuZ2VfbGVuZ3RoKTsKIAogCXJldHVybjsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXBfZml4ZWRfbWVtb3J5MzIKQEAgLTQ5OCwzMyArNDM5LDI5IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQKLWFjcGlfcnNfZHVtcF9maXhlZF9tZW1vcnkzMiAoCi0JdW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICAgICAgICAgICAgKmRhdGEpCitzdGF0aWMgdm9pZCBhY3BpX3JzX2R1bXBfZml4ZWRfbWVtb3J5MzIodW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpkYXRhKQogewotCXN0cnVjdCBhY3BpX3Jlc291cmNlX2ZpeGVkX21lbTMyICAgICpmaXhlZF9tZW1vcnkzMl9kYXRhID0KLQkJCSAgIChzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9maXhlZF9tZW0zMiAqKSBkYXRhOworCXN0cnVjdCBhY3BpX3Jlc291cmNlX2ZpeGVkX21lbTMyICpmaXhlZF9tZW1vcnkzMl9kYXRhID0KKwkgICAgKHN0cnVjdCBhY3BpX3Jlc291cmNlX2ZpeGVkX21lbTMyICopZGF0YTsKIAorCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKIAotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7CisJYWNwaV9vc19wcmludGYoIjMyLUJpdCBGaXhlZCBMb2NhdGlvbiBNZW1vcnkgUmFuZ2UgUmVzb3VyY2VcbiIpOwogCisJYWNwaV9vc19wcmludGYoIiAgUmVhZCVzXG4iLAorCQkgICAgICAgQUNQSV9SRUFEX1dSSVRFX01FT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kJYWNwaV9vc19wcmludGYgKCIgIFJlc291cmNlIFNvdXJjZSBJbmRleDogJVhcbiIsCi0JCQlhZGRyZXNzMTZfZGF0YS0+cmVzb3VyY2Vfc291cmNlLmluZGV4KTsKKwkJYWNwaV9vc19wcmludGYoIiAgUmVzb3VyY2UgU291cmNlIEluZGV4OiAlWFxuIiwKKwkJCSAgICAgICBhZGRyZXNzMTZfZGF0YS0+cmVzb3VyY2Vfc291cmNlLmluZGV4KTsKIAotCQlhY3BpX29zX3ByaW50ZiAoIiAgUmVzb3VyY2UgU291cmNlOiAlc1xuIiwKLQkJCWFkZHJlc3MxNl9kYXRhLT5yZXNvdXJjZV9zb3VyY2Uuc3RyaW5nX3B0cik7CisJCWFjcGlfb3NfcHJpbnRmKCIgIFJlc291cmNlIFNvdXJjZTogJXNcbiIsCisJCQkgICAgICAgYWRkcmVzczE2X2RhdGEtPnJlc291cmNlX3NvdXJjZS5zdHJpbmdfcHRyKTsKIAl9CiAKIAlyZXR1cm47CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX2FkZHJlc3MzMgpAQCAtNjc3LDEzNCArNjE2LDEzNiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkCi1hY3BpX3JzX2R1bXBfYWRkcmVzczMyICgKLQl1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgICAgICAgICpkYXRhKQorc3RhdGljIHZvaWQgYWNwaV9yc19kdW1wX2FkZHJlc3MzMih1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgKmRhdGEpCiB7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2VfYWRkcmVzczMyICphZGRyZXNzMzJ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UNQSV9QVFJfQUREIChzdHJ1Y3QgYWNwaV9yZXNvdXJjZSwgcmVzb3VyY2UsIHJlc291cmNlLT5sZW5ndGgpOworCQkJcmVzb3VyY2UgPQorCQkJICAgIEFDUElfUFRSX0FERChzdHJ1Y3QgYWNwaV9yZXNvdXJjZSwgcmVzb3VyY2UsCisJCQkJCSByZXNvdXJjZS0+bGVuZ3RoKTsKIAkJfQogCX0KIApAQCAtMTEyNSwzNiArMTA2NywzOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfcnNfZHVtcF9pcnFfbGlzdCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcm91dGVfdGFibGUpCit2b2lkIGFjcGlfcnNfZHVtcF9pcnFfbGlzdCh1OCAqIHJvdXRlX3RhYmxlKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9IHJvdXRlX3RhYmxlOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnQgPSAwOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IEZBTFNFOwotCXN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlICAgKnBydF9lbGVtZW50OworCXU4ICpidWZmZXIgPSByb3V0ZV90YWJsZTsKKwl1OCBjb3VudCA9IDA7CisJdTggZG9uZSA9IEZBTFNFOworCXN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlICpwcnRfZWxlbWVudDsKIAotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKLQorCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKIAogCWlmIChhY3BpX2RiZ19sZXZlbCAmIEFDUElfTFZfUkVTT1VSQ0VTICYmIF9DT01QT05FTlQgJiBhY3BpX2RiZ19sYXllcikgewotCQlwc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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02OSwyNCArNjcsMTggQEAKICAqICAgICAgICAgICAgICBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgZnJvbSB0aGUgYnl0ZSBzdHJlYW0uCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfcnNfaW9fcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfaW9fcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCSAgICBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCwKKwkJICAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9IGJ5dGVfc3RyZWFtX2J1ZmZlcjsKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpvdXRwdXRfc3RydWN0ID0gKHZvaWQgKikgKm91dHB1dF9idWZmZXI7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wMTYgPSAwOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDggPSAwOwotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAg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zID0gdGVtcDE2OwogCkBAIC0xMzYsMTAgKzEyOCw5IEBACiAJLyogUmV0dXJuIHRoZSBmaW5hbCBzaXplIG9mIHRoZSBzdHJ1Y3R1cmUgKi8KIAogCSpzdHJ1Y3R1cmVfc2l6ZSA9IHN0cnVjdF9zaXplOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19maXhlZF9pb19yZXNvdXJjZQpAQCAtMTYyLDIyICsxNTMsMTggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2ZpeGVkX2lvX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpCithY3BpX3JzX2ZpeGVkX2lvX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJICBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCwKKwkJCSAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gYnl0ZV9zdHJlYW1fYnVmZmVyO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GF0YS5maXhlZF9pby5iYXNlX2FkZHJlc3MgPSB0ZW1wMTY7CiAKQEAgLTIwNiwxMCArMTkzLDkgQEAKIAkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwogCiAJKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2lvX3N0cmVhbQpAQCAtMjI3LDE4ICsyMTMsMTQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2lvX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX2lvX3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCSAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gKm91dHB1dF9idWZmZXI7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wMTYgPSAwOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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vbnN1bWVkID0gQUNQSV9QVFJfRElGRihidWZmZXIsICpvdXRwdXRfYnVmZmVyKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZml4ZWRfaW9fc3RyZWFtCkBAIC0zMDQsMTggKzI4NSwxNCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZml4ZWRfaW9fc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCkKK2FjcGlfcnNfZml4ZWRfaW9fc3RyZWFtKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdCwKKwkJCXU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9ICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDE2ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKKwl1OCAqYnVmZmVyID0gKm91dHB1dF9idWZmZXI7CisJdTE2IHRlbXAxNiA9IDA7CisJdTggdGVtcDggPSAwOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFIC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X3JzX2RtYV9yZXNvdXJjZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnN0cnVjdHVyZV9zaXplKQorYWNwaV9yc19kbWFfcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCSAgICAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCSAgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gYnl0ZV9zdHJlYW1fYnVmZmVyOwotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSAqb3V0cHV0X2J1ZmZlcjsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdF9zaXplID0gQUNQSV9TSVpFT0ZfUkVTT1VSQ0UgKAotCQkJICBzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEpOworCXU4ICpidWZmZXIgPSBieXRlX3N0cmVhbV9idWZmZXI7CisJc3RydWN0IGFjcGlfcmVzb3VyY2UgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSpvdXRwdXRfYnVmZmVyOworCXU4IHRlbXA4ID0gMDsKKwl1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BVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2RtYV9zdHJlYW0KQEAgLTQ2MywxOSArNDMzLDE1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19kbWFfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCkKK2FjcGlfcnNfZG1hX3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCSAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9ICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDE2ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OworCXU4ICpidWZmZXIgPSAqb3V0cHV0X2J1ZmZlcjsKKwl1MTYgdGVtcDE2ID0gMDsKKwl1OCB0ZW1wOCA9IDA7CisJdTggaW5kZXg7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJyc19kbWFfc3RyZWFtIik7Ci0KKwlBQ1BJ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ZXMvcnNpcnEuYworKysgYi9kcml2ZXJzL2FjcGkvcmVzb3VyY2VzL3JzaXJxLmMKQEAgLTQxLDEzICs0MSwxMSBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogI2luY2x1ZGUgPGFjcGkvYWNyZXNyYy5oPgogCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9SRVNPVVJDRVMKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoInJzaXJxIikKLQorQUNQSV9NT0RVTEVfTkFNRSgicnNpcnEiKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTY5LDI2ICs2NywyMCBAQAogICogICAgICAgICAgICAgIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBmcm9tIHRoZSBieXRlIHN0cmVhbS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiBhY3BpX3N0YXR1cwotYWNwaV9yc19pcnFfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfaXJxX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkgICAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkgICAgIHU4ICo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IFNlbnNpdGl2ZSwgQWN0aXZlIEhpZ2gsIE5vbi1TaGFyYWJsZQogCQkgKiBwZXIgQUNQSSBTcGVjaWZpY2F0aW9uCkBAIC0xNzUsMTAgKzE3MCw5IEBACiAJLyogUmV0dXJuIHRoZSBmaW5hbCBzaXplIG9mIHRoZSBzdHJ1Y3R1cmUgKi8KIAogCSpzdHJ1Y3R1cmVfc2l6ZSA9IHN0cnVjdF9zaXplOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19pcnFfc3RyZWFtCkBAIC0xOTYsMzIgKzE5MCwyNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfaXJxX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX2lycV9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkgICB1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCkKIHsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIgPSAqb3V0cHV0X2J1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbX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YWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpCithY3BpX3JzX2V4dGVuZGVkX2lycV9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgICAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJICAgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gYnl0ZV9zdHJlYW1fYnVmZmVyOwotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSAqb3V0cHV0X2J1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXAxNiA9IDA7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wOCA9IDA7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGVtcF9wdHI7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdF9zaXplID0gQUNQSV9TSVpFT0ZfUkVTT1VSQ0UgKAotCQkJICBzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9leHRfaXJxKTsKKwl1OCAqYnVmZmVyID0gYnl0ZV9zdHJlYW1fYnVmZmVyOworCXN0cnVjdCBhY3BpX3Jlc291cmNlICpvdXRwdXRfc3RydWN0ID0gKHZvaWQgKikqb3V0cHV0X2J1ZmZlcjsKKwl1MTYgdGVtcDE2ID0gMDsKKwl1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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZXh0ZW5kZWRfaXJxX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX2V4dGVuZGVkX2lycV9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJICAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9ICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmxlbmd0aF9maWVsZDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRlbXBfcG9pbnRlciA9IE5VTEw7CisJdTggKmJ1ZmZlciA9ICpvdXRwdXRfYnVmZmVyOworCXUxNiAqbGVuZ3RoX2ZpZWxkOworCXU4IHRlbXA4ID0gMDsKKwl1OCBpbmRleDsKIAorCUFDUElfRlVOQ1RJT05fVFJBQ0UoInJzX2V4dGVuZGVkX2lycV9zdHJlYW0iKTsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJyc19leHRlbmRlZF9pcnFfc3RyZWFtIik7CisJLyogU2V0IHRoZSBEZXNjcmlwdG9yIFR5cGUgZmllbGQgKi8KIAotCi0JLyogVGhlIGRlc2Ny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90eXBlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3N0YXJ0X2J5dGUpCit1OCBhY3BpX3JzX2dldF9yZXNvdXJjZV90eXBlKHU4IHJlc291cmNlX3N0YXJ0X2J5dGUpCiB7CiAKLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJLyogRGV0ZXJtaW5lIGlmIHRoaXMgaXMgYSBzbWFsbCBvciBsYXJnZSByZXNvdXJjZSAqLwogCkBAIC03OSwxNCArNzMsMTIgQEAKIAogCQlyZXR1cm4gKCh1OCkgKHJlc291cmNlX3N0YXJ0X2J5dGUgJiBBQ1BJX1JERVNDX1NNQUxMX01BU0spKTsKIAotCiAJY2FzZSBBQ1BJX1JERVNDX1RZUEVfTEFSR0U6CiAKIAkJLyogTGFyZ2UgUmVzb3VyY2UgVHlwZSAtLSBBbGwgYml0cyBhcmUgdmFsaWQgKi8KIAogCQlyZXR1cm4gKHJlc291cmNlX3N0YXJ0X2J5dGUpOwogCi0KIAlkZWZhdWx0OgogCQkvKiBJbnZhbGlkIHR5cGUgKi8KIAkJYnJlYWs7CkBAIC05NSw3ICs4Nyw2IEBACiAJcmV0dXJuICgweEZGKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2J5dGVfc3RyZWFtX3RvX2xpc3QKQEAgLTExMywxNzYgKzEwNCwxODkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2J5dGVfc3RyZWFtX3RvX2xpc3QgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm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KICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2xpc3RfdG9fYnl0ZV9zdHJlYW0KQEAgLTM0MiwxOSArMzQ2LDE2IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19saXN0X3RvX2J5dGVfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVfc3RyZWFtX3NpemVfbmVlZGVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm91dHB1dF9idWZmZXIpCithY3BpX3JzX2xpc3RfdG9fYnl0ZV9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJICAgIGFjcGlfc2l6ZSBieXRlX3N0cmVhbV9zaXplX25lZWRlZCwKKwkJCSAgICB1OCAqIG91dHB1dF9idWZmZXIpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gb3V0cHV0X2J1ZmZlcjsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSBGQUxTRTsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJdTggKmJ1ZmZlciA9IG91dHB1dF9idWZmZXI7CisJYWNwaV9zaXplIGJ5dGVzX2NvbnN1bWVkID0gMDsKKwl1OCBkb25lID0gRkFMU0U7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJyc19saXN0X3RvX2J5dGVfc3RyZWFtIik7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ZSBzdHJlYW0uCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfcnNfbWVtb3J5MjRfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfbWVtb3J5MjRfcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCQkgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJICB1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBzdHJ1Y3R1cmVfc2l6ZSkKIHsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIgPSBieXRlX3N0cmVhbV9idWZmZXI7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqb3V0cHV0X3N0cnVjdCA9ICh2b2lkICopICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDE2ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdF9zaXplID0gQUNQSV9TSVpFT0ZfUkVTT1VSQ0UgKAotCQkJICBzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9tZW0yNCk7CisJdTggKmJ1ZmZlciA9IGJ5dGVfc3RyZ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qKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19tZW1vcnkyNF9zdHJlYW0KQEAgLTE1NCwxOCArMTQ2LDE0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19tZW1vcnkyNF9zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKQorYWNwaV9yc19tZW1vcnkyNF9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gKm91dHB1dF9idWZmZXI7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wMTYgPSAwOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDggPSAwOworCXU4ICpidWZmZXIgPSAqb3V0cHV0X2J1ZmZlcjsKKwl1MTYgdGVtcDE2ID0gMDsKKwl1OCB0ZW1wOCA9IDA7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJyc19tZW1vcnkyNF9zdHJlYW0iKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoInJzX21lbW9yeTI0X3N0cmVhbSIpOwogCiAJLyogVGhlIGRlc2NyaXB0b3IgZmllbGQgaXMgc3RhdGljICovCiAKQEAgLTE3NSw3ICsxNjMsNyBAQAog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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZml4ZWRfbWVtb3J5MzJfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfZml4ZWRfbWVtb3J5MzJfcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCQkJYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQkJdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gYnl0ZV9zdHJlYW1fYnVmZmVyOwotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSAqb3V0cHV0X2J1ZmZlcjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXAxNiA9IDA7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wOCA9IDA7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Rfc2l6ZSA9IEFDUElfU0laRU9GX1JFU09VUkNFICgKLQkJCSAgc3RydWN0IGFjcGlfcmVzb3VyY2VfZml4ZWRfbWVtMzIpOworCXU4ICpidWZmZXIgPSBieXRlX3N0cmVhbV9idWZmZXI7CisJc3RydWN0IGFjcGlfcmVzb3VyY2UgKm91dH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0ZXMgOC0xMSkgKi8KIAotCUFDUElfTU9WRV8zMl9UT18zMiAoJm91dHB1dF9zdHJ1Y3QtPmRhdGEuZml4ZWRfbWVtb3J5MzIucmFuZ2VfbGVuZ3RoLCBidWZmZXIpOworCUFDUElfTU9WRV8zMl9UT18zMigmb3V0cHV0X3N0cnVjdC0+ZGF0YS5maXhlZF9tZW1vcnkzMi5yYW5nZV9sZW5ndGgsCisJCQkgICBidWZmZXIpOwogCiAJLyogU2V0IHRoZSBMZW5ndGggcGFyYW1ldGVyICovCiAKQEAgLTM3OSwxMCArMzYyLDkgQEAKIAkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwogCiAJKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX21lbW9yeTMyX3JhbmdlX3N0cmVhbQpAQCAtNDAwLDE4ICszODIsMTQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX21lbW9yeTMyX3JhbmdlX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpCithY3BpX3JzX21lbW9yeTMyX3JhbmdlX3N0cmVhbShzd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NQSV9TVEFUVVMgKEFFX09LKTsKKwkqYnl0ZXNfY29uc3VtZWQgPSBBQ1BJX1BUUl9ESUZGKGJ1ZmZlciwgKm91dHB1dF9idWZmZXIpOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19maXhlZF9tZW1vcnkzMl9zdHJlYW0KQEAgLTQ3NSwxOCArNDU0LDE0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19maXhlZF9tZW1vcnkzMl9zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKQorYWNwaV9yc19maXhlZF9tZW1vcnkzMl9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJICAgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gKm91dHB1dF9idWZmZXI7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wMTYgPSAwOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDggPSAwOworCXU4ICpidWZmZXIgPSAqb3V0cHV0X2J1ZmZlcjsKKwl1MTYgdGVtcDE2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U09VUkNFUwotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgicnNtaXNjIikKLQorQUNQSV9NT0RVTEVfTkFNRSgicnNtaXNjIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02OSwyMCArNjcsMTUgQEAKICAqICAgICAgICAgICAgICBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgZnJvbSB0aGUgYnl0ZSBzdHJlYW0uCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZW5kX3RhZ19yZXNvdXJjZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnN0cnVjdHVyZV9zaXplKQorYWNwaV9yc19lbmRfdGFnX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKQogewotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSAqb3V0cHV0X2J1ZmZlcjsKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdF9zaXplID0gQUNQSV9SRVNPVVJDRV9MRU5HVEg7CisJc3RydWN0IGFjcGlfcmVzb3VyY2UgKm91dHB1dF9zdHJ1Y3QgPSAodm9pZCAqKSpvdXRwdXRfYnVmZmVyOworCWFjcGlfc2l6ZSBzdHJ1Y3Rfc2l6ZSA9IEFDUElfUkVTT1VSQ0VfTEVOR1RIOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgicnNfZW5kX3RhZ19yZXNvdXJjZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgicnNfZW5kX3RhZ19yZXNvdXJjZSIpOwogCiAJLyogVGhlIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBpcyBzdGF0aWMgKi8KIApAQCAtOTksMTAgKzkyLDkgQEAKIAkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwogCiAJKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2VuZF90YWdfc3RyZWFtCkBAIC0xMjAsMTcgKzExMiwxMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZW5kX3RhZ19zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1b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5IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc192ZW5kb3JfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfdmVuZG9yX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQl1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBzdHJ1Y3R1cmVfc2l6ZSkKIHsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIgPSBieXRlX3N0cmVhbV9idWZmZXI7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqb3V0cHV0X3N0cnVjdCA9ICh2b2lkICopICpvdXRwdXRfYnVmZmVyOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcDE2ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXA4ID0gMDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OwotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0X3NpemUgPSBBQ1BJX1NJWkVPRl9SRVNPVVJDRSAoCi0JCQkgIHN0cnVjdCBhY3BpX3Jlc291cmNlX3ZlbmRvcik7CisJdTggKmJ1ZmZ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yZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfc3RhcnRfZGVwZW5kX2Zuc19yZXNvdXJjZQpAQCAtMzQ2LDIxICszMjIsMTggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX3N0YXJ0X2RlcGVuZF9mbnNfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSkKK2FjcGlfcnNfc3RhcnRfZGVwZW5kX2Zuc19yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCQkgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJCSAgdTggKiogb3V0cHV0X2J1ZmZlciwKKwkJCQkgIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciA9IGJ5dGVfc3RyZWFtX2J1ZmZlcjsKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpvdXRwdXRfc3RydWN0ID0gKHZvaWQgKikgKm91dHB1dF9idWZmZXI7Ci0JdTggICAgICAgICAgICAgICAgIC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MRV9DT05GSUdVUkFUSU9OOwogCX0KIAogCS8qIFNldCB0aGUgTGVuZ3RoIHBhcmFtZXRlciAqLwpAQCAtNDA3LDEwICszODEsOSBAQAogCS8qIFJldHVybiB0aGUgZmluYWwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlICovCiAKIAkqc3RydWN0dXJlX3NpemUgPSBzdHJ1Y3Rfc2l6ZTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZW5kX2RlcGVuZF9mbnNfcmVzb3VyY2UKQEAgLTQzMywxOCArNDA2LDE0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19yZXNvdXJjZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnN0cnVjdHVyZV9zaXplKQorYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCQlhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCwKKwkJCQl1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBzdHJ1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dGVzIGNvbnN1bWVkIGluIHRoaXMgb3BlcmF0aW9uICovCiAKLQkqYnl0ZXNfY29uc3VtZWQgPSBBQ1BJX1BUUl9ESUZGIChidWZmZXIsICpvdXRwdXRfYnVmZmVyKTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwkqYnl0ZXNfY29uc3VtZWQgPSBBQ1BJX1BUUl9ESUZGKGJ1ZmZlciwgKm91dHB1dF9idWZmZXIpOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19zdHJlYW0KQEAgLTU0NSwxNiArNTA4LDEyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKQorYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJICAgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gKm91dHB1dF9idWZmZXI7CisJdTggKmJ1ZmZlciA9IC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VUyAoc3RhdHVzKTsKKwlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2Uob2JqX2Rlc2MpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZ2V0X2Nyc19tZXRob2RfZGF0YQpAQCAtMTIzLDI1ICsxMTQsMjEgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9jcnNfbWV0aG9kX2RhdGEgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldF9idWZmZXIpCithY3BpX3JzX2dldF9jcnNfbWV0aG9kX2RhdGEoYWNwaV9oYW5kbGUgaGFuZGxlLCBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJldF9idWZmZXIpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqX2Rlc2M7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgicnNfZ2V0X2Nyc19tZXRob2RfZGF0YSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgicnNfZ2V0X2Nyc19tZXRob2RfZGF0YSIpOwogCiAJLyogUGFyYW1ldGVycyBndWFyYW50ZWVkIHZhbGlkIGJ5IGNhbGxlciAqLwogCiA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kVfVVNBR0UgICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjM0LDI1ICsyMTUsMjIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9tZXRob2RfZGF0YSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aCwKLQlzdHJ1Y3QgYWNwaV9idWZmZXIgICAgICAgICAgICAgICpyZXRfYnVmZmVyKQorYWNwaV9yc19nZXRfbWV0aG9kX2RhdGEoYWNwaV9oYW5kbGUgaGFuZGxlLAorCQkJY2hhciAqcGF0aCwgc3RydWN0IGFjcGlfYnVmZmVyICpyZXRfYnVmZmVyKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjOwotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInJzX2dldF9tZXRob2RfZGF0YSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgicnNfZ2V0X21ldGhvZF9kYXRhIik7CiAKIAkvKiBQYXJhbWV0ZXJzIGd1YXJhbnRlZWQgdmFsaWQgYnkgY2FsbGVyICovCiAKIAkvKiBFeGVjdXRlIHRoZSBtZXRob2QsIG5vIHBhcmFtZXRlcnMgKi8KIAotCXN0YXR1cyA9IGFjcGlfdXRfZXZhbHVhdGVfb2JqZWN0IChoYW5kbGUsIHBhd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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX2dldF9pcnFfcm91dGluZ190YWJsZQpAQCAtODksMTcgKzg2LDEzIEBACiAgKiAgICAgICAgICAgICAgdGhlIG9iamVjdCBpbmRpY2F0ZWQgYnkgdGhlIHBhc3NlZCBkZXZpY2VfaGFuZGxlLgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9pcnFfcm91dGluZ190YWJsZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBkZXZpY2VfaGFuZGxlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldF9idWZmZXIpCithY3BpX2dldF9pcnFfcm91dGluZ190YWJsZShhY3BpX2hhbmRsZSBkZXZpY2VfaGFuZGxlLAorCQkJICAgc3RydWN0IGFjcGlfYnVmZmVyICpyZXRfYnVmZmVyKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfZ2V0X2lycV9yb3V0aW5nX3RhYmxlICIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiYWNwaV9nZXRfaXJxX3JvdXRpbmdfdGFibGUgIik7CiAKIAkvKgogCSAqIE11c3QgaGF2ZSBhIHZhbGlkIGhhbmRsZSBhbmQgYnVmZmVyLCBTbyB3ZSBoYXZlIHRvIGhhdmUgYSBoYW5kbGUKQEAgLTEwOCwxOSArMTAxLDE4IEBACiAJICogd2UnbGwgYmUgcmV0dXJuaW5nIHRoZSBuZWVkZWQgYnVmZmVyIHNpemUsIH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cmNlcyAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBkZXZpY2VfaGFuZGxlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldF9idWZmZXIpCithY3BpX2dldF9jdXJyZW50X3Jlc291cmNlcyhhY3BpX2hhbmRsZSBkZXZpY2VfaGFuZGxlLAorCQkJICAgc3RydWN0IGFjcGlfYnVmZmVyICpyZXRfYnVmZmVyKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOworCWFjcGlfc3RhdHVzIHN0YXR1czsKIAot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X0FDUElfU1RBVFVTIChzdGF0dXMpOworCWFjcGlfb3NfZnJlZShidWZmZXIucG9pbnRlcik7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfd2Fsa19yZXNvdXJjZXMpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfd2Fsa19yZXNvdXJjZXMpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTM1NCwzMCArMzM2LDI1IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9zZXRfY3VycmVudF9yZXNvdXJjZXMgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZGV2aWNlX2hhbmRsZSwKLQlzdHJ1Y3QgYWNwaV9idWZmZXIgICAgICAgICAgICAgICppbl9idWZmZXIpCithY3BpX3NldF9jdXJyZW50X3Jlc291cmNlcyhhY3BpX2hhbmRsZSBkZXZpY2VfaGFuZGxlLAorCQkJICAgc3RydWN0IGFjcGlfYnVmZmVyICppbl9idWZmZXIpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgiYWNwaV9zZXRfY3VycmVudF9yZXNvdXJjZXMiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoImFjcGlfc2V0X2N1cnJlbnRfcmVzb3VyY2VzIik7CiAKIAkvKiBNdXN0IGhhdmUgYSB2YWxpZCBoYW5kbGUgYW5kIGJ1ZmZlciAqLwogCi0JaWYgKCghZGV2aWNlX2hhbmRsZSkgICAgICB8fAotCQkoI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Y3BpX3RhYmxlX2hlYWRlciAqaGVhZGVyLAorCQkgICAgICAgc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfaW5mbyk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzgsMzcgKzcyLDM0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV90Yl9nZXRfdGFibGUgKAotCXN0cnVjdCBhY3BpX3BvaW50ZXIgICAgICAgICAgICAgKmFkZHJlc3MsCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbykKK2FjcGlfdGJfZ2V0X3RhYmxlKHN0cnVjdCBhY3BpX3BvaW50ZXIgKmFkZHJlc3MsCisJCSAgc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfaW5mbykKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgIGhlYWRlcjsKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyIGhlYWRlcjsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInRiX2dldF90YWJsZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidGJfZ2V0X3RhYmxlIik7CiAKIAkvKiBHZXQgdGhlIGhlYWRlciBpbiBvcmRlciB0byBnZXQgc2lnbmF0dXJlIGFuZCB0YWJsZSBzaXplICovCiAKLQlzdGF0dXMgPSBhY3BpX3RiX2dldF90YWJsZV9oZWFkZXIgKGFkZHJlc3MsICZoZWFkZXIpOwotCWlmIChBQ1BJX0ZBSUx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UNQSV9SRVBPUlRfRVJST1IoKCJJbnZhbGlkIGFkZHJlc3MgZmxhZ3MgJVhcbiIsCisJCQkJICAgYWRkcmVzcy0+cG9pbnRlcl90eXBlKSk7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9CQURfUEFSQU1FVEVSKTsKIAl9CiAKLQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9UQUJMRVMsICJUYWJsZSBTaWduYXR1cmU6IFslNC40c11cbiIsCi0JCXJldHVybl9oZWFkZXItPnNpZ25hdHVyZSkpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfVEFCTEVTLCAiVGFibGUgU2lnbmF0dXJlOiBbJTQuNHNdXG4iLAorCQkJICByZXR1cm5faGVhZGVyLT5zaWduYXR1cmUpKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfdGFibGVfYm9keQpAQCAtMjA5LDM3ICsxOTMsMzMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3RiX2dldF90YWJsZV9ib2R5ICgKLQlzdHJ1Y3QgYWNwaV9wb2ludGVyICAgICAgICAgICAgICphZGRyZXNzLAotCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAgICAgICAgKmhlYWRlciwKLQlzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICAgICAgICAgICp0YWJsZV9pbmZvKQorYWNwaV90Yl9nZXRfdGFibGVfYm9keShzdHJ1Y3QgYWNwaV9wb2ludGVyICphZGRyZXNzL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byk7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXN0YXR1cyA9IGFjcGlfdGJfZ2V0X3RoaXNfdGFibGUoYWRkcmVzcywgaGVhZGVyLCB0YWJsZV9pbmZvKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3RiX3RhYmxlX292ZXJyaWRlCkBAIC0yNTUsNjEgKzIzNSw1NyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3RiX3RhYmxlX292ZXJyaWRlICgKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICpoZWFkZXIsCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbykKK2FjcGlfdGJfdGFibGVfb3ZlcnJpZGUoc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICpoZWFkZXIsCisJCSAgICAgICBzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICp0YWJsZV9pbmZvKQogewotCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAgICAgICAgKm5ld190YWJsZTsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQlzdHJ1Y3QgYWNwaV9wb2ludGVyICAgICAgICAgICAgIGFkZHJlc3M7CisJc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICpuZXdfdGFibGU7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXN0cnVjdCBhY3BpX3BvaW50ZXIgYWRkcmVzczsKIAotCi0JQUNQSV9GVU5DV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eworCQlBQ1BJX1JFUE9SVF9FUlJPUigoIkNvdWxkIG5vdCBjb3B5IG92ZXJyaWRlIEFDUEkgdGFibGUsICVzXG4iLAorCQkJCSAgIGFjcGlfZm9ybWF0X2V4Y2VwdGlvbihzdGF0dXMpKSk7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogCX0KIAogCS8qIENvcHkgdGhlIHRhYmxlIGluZm8gKi8KIAotCUFDUElfUkVQT1JUX0lORk8gKCgiVGFibGUgWyU0LjRzXSByZXBsYWNlZCBieSBob3N0IE9TXG4iLAotCQl0YWJsZV9pbmZvLT5wb2ludGVyLT5zaWduYXR1cmUpKTsKKwlBQ1BJX1JFUE9SVF9JTkZPKCgiVGFibGUgWyU0LjRzXSByZXBsYWNlZCBieSBob3N0IE9TXG4iLAorCQkJICB0YWJsZV9pbmZvLT5wb2ludGVyLT5zaWduYXR1cmUpKTsKIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfdGhpc190YWJsZQpAQCAtMzI5LDE4ICszMDUsMTUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV90Yl9nZXRfdGhpc190YWJsZSAoCi0Jc3RydWN0IGFjcGlfcG9pbnRlciAgICAgICAgICAgICAqYWRkcmVzcywKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICpoZWFkZXIsCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbykK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dWxsX3RhYmxlOworCXRhYmxlX2luZm8tPmxlbmd0aCA9IChhY3BpX3NpemUpIGhlYWRlci0+bGVuZ3RoOworCXRhYmxlX2luZm8tPmFsbG9jYXRpb24gPSBhbGxvY2F0aW9uOwogCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfSU5GTywKLQkJIkZvdW5kIHRhYmxlIFslNC40c10gYXQgJTguOFglOC44WCwgbWFwcGVkL2NvcGllZCB0byAlcFxuIiwKLQkJZnVsbF90YWJsZS0+c2lnbmF0dXJlLAotCQlBQ1BJX0ZPUk1BVF9VSU5UNjQgKGFkZHJlc3MtPnBvaW50ZXIucGh5c2ljYWwpLCBmdWxsX3RhYmxlKSk7CisJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9JTkZPLAorCQkJICAiRm91bmQgdGFibGUgWyU0LjRzXSBhdCAlOC44WCU4LjhYLCBtYXBwZWQvY29waWVkIHRvICVwXG4iLAorCQkJICBmdWxsX3RhYmxlLT5zaWduYXR1cmUsCisJCQkgIEFDUElfRk9STUFUX1VJTlQ2NChhZGRyZXNzLT5wb2ludGVyLnBoeXNpY2FsKSwKKwkJCSAgZnVsbF90YWJsZSkpOwogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdGJfZ2V0X3RhYmxlX3B0cgpAQCAtNDQ3LDI0ICs0MTQsMjAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3RiX2dldF90YWJsZV9wdHIgKAotCWFjcGlfdGFibGVfdHlwZS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waV90YWJsZV9kZXNjICp0YWJsZV9pbmZvLCB1OCBzZWFyY2hfdHlwZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNzQsMTYgKzY4LDEyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdGJfbWF0Y2hfc2lnbmF0dXJlICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzaWduYXR1cmUsCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbywKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaF90eXBlKQorYWNwaV90Yl9tYXRjaF9zaWduYXR1cmUoY2hhciAqc2lnbmF0dXJlLAorCQkJc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfaW5mbywgdTggc2VhcmNoX3R5cGUpCiB7Ci0JYWNwaV9uYXRpdmVfdWludCAgICAgICAgICAgICAgICBpOworCWFjcGlfbmF0aXZlX3VpbnQgaTsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInRiX21hdGNoX3NpZ25hdHVyZSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidGJfbWF0Y2hfc2lnbmF0dXJlIik7CiAKIAkvKiBTZWFyY2ggZm9yIGEgc2lnbmF0dXJlIG1hdGNoIGFtb25nIHRoZSBrbm93biB0YWJsZSB0eXBlcyAqLwogCkBAIC05MiwzMCArODIsMzAgQEAKIAkJCWNvbnRpbnVlOwogCQl9CiAKLQkJaWYgKCFBQ1BJX1NUUk5DTVAgKHNpZ25hdHVyZSwgYWNwaV9nYmxfdGFibGVfZGF0YVtpXS5zaWduYXR1cmUsC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IAl9CiAKLQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9JTkZPLCAiJXMgbG9jYXRlZCBhdCAlcFxuIiwKLQkJYWNwaV9nYmxfdGFibGVfZGF0YVt0YWJsZV9pbmZvLT50eXBlXS5uYW1lLCB0YWJsZV9pbmZvLT5wb2ludGVyKSk7CisJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9JTkZPLCAiJXMgbG9jYXRlZCBhdCAlcFxuIiwKKwkJCSAgYWNwaV9nYmxfdGFibGVfZGF0YVt0YWJsZV9pbmZvLT50eXBlXS5uYW1lLAorCQkJICB0YWJsZV9pbmZvLT5wb2ludGVyKSk7CiAKLQkodm9pZCkgYWNwaV91dF9yZWxlYXNlX211dGV4IChBQ1BJX01UWF9UQUJMRVMpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKyAgICAgIHVubG9ja19hbmRfZXhpdDoKKwkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfVEFCTEVTKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3RiX3JlY29nbml6ZV90YWJsZQpAQCAtMTg2LDIyICsxODIsMTggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3RiX3JlY29nbml6ZV90YWJsZSAoCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbywKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaF90eXBlKQorYWNwaV90Yl9yZWNvZ25pemVfd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V90Yl9kZWxldGVfYWxsX3RhYmxlcyh2b2lkKQogewotCWFjcGlfdGFibGVfdHlwZSAgICAgICAgICAgICAgICAgdHlwZTsKLQorCWFjcGlfdGFibGVfdHlwZSB0eXBlOwogCiAJLyoKIAkgKiBGcmVlIG1lbW9yeSBhbGxvY2F0ZWQgZm9yIEFDUEkgdGFibGVzCiAJICogTWVtb3J5IGNhbiBlaXRoZXIgYmUgbWFwcGVkIG9yIGFsbG9jYXRlZAogCSAqLwogCWZvciAodHlwZSA9IDA7IHR5cGUgPCBOVU1fQUNQSV9UQUJMRV9UWVBFUzsgdHlwZSsrKSB7Ci0JCWFjcGlfdGJfZGVsZXRlX3RhYmxlc19ieV90eXBlICh0eXBlKTsKKwkJYWNwaV90Yl9kZWxldGVfdGFibGVzX2J5X3R5cGUodHlwZSk7CiAJfQogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdGJfZGVsZXRlX3RhYmxlc19ieV90eXBlCkBAIC0zODgsMjMgKzM3NywxOSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfdGJfZGVsZXRlX3RhYmxlc19ieV90eXBlICgKLQlhY3BpX3RhYmxlX3R5cGUgICAgICAgICAgICAgICAgIHR5cGUpCit2b2lkIGFjcGlfdGJfZGVsZXRlX3RhYmxlc19ieV90eXBlKGFjcGlfdGFibGVfdHlwZSB0eXBlKQogewotCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgICAgICAgICAgKnRhYmxlX2Rlc2M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7CisJc3RydWN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ml2ZXJzL2FjcGkvdGFibGVzL3RicnNkdC5jIGIvZHJpdmVycy9hY3BpL3RhYmxlcy90YnJzZHQuYwppbmRleCBiN2ZmZTM5Li5hZDAyNTJjIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvdGFibGVzL3RicnNkdC5jCisrKyBiL2RyaXZlcnMvYWNwaS90YWJsZXMvdGJyc2R0LmMKQEAgLTQxLDE0ICs0MSwxMSBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogI2luY2x1ZGUgPGFjcGkvYWN0YWJsZXMuaD4KIAotCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9UQUJMRVMKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoInRicnNkdCIpCi0KK0FDUElfTU9EVUxFX05BTUUoInRicnNkdCIpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjEsMTggKzU4LDEzIEBACiAgKiBERVNDUklQVElPTjogTG9hZCBhbmQgdmFsaWRhdGUgdGhlIFJTRFAgKHB0cikgYW5kIFJTRFQgKHRhYmxlKQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWFjcGlfc3RhdHVzCi1hY3BpX3RiX3ZlcmlmeV9yc2RwICgKLQlzdHJ1Y3QgYWNwaV9wb2ludGVyICAgICAgICAgICAgICphZGRyZXNzKQorYWNwaV9zdGF0dXMgYWNwaV90Yl92ZXJpZnlfcnNkcChzdHJ1Y3QgYWNwaV9wb2ludGVyICphZGRyZXNzKQogewotCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgICAgICAgICAgdGFibGVfaW5mbzsKLQlhY3BpX3N0YXR1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SAmJgorCSAgICBhY3BpX2dibF9SU0RQLT54c2R0X3BoeXNpY2FsX2FkZHJlc3MpIHsKIAkJb3V0X2FkZHJlc3MtPnBvaW50ZXIudmFsdWUgPQotCQkJYWNwaV9nYmxfUlNEUC0+eHNkdF9waHlzaWNhbF9hZGRyZXNzOworCQkgICAgYWNwaV9nYmxfUlNEUC0+eHNkdF9waHlzaWNhbF9hZGRyZXNzOworCQlhY3BpX2dibF9yb290X3RhYmxlX3R5cGUgPSBBQ1BJX1RBQkxFX1RZUEVfWFNEVDsKKwl9IGVsc2UgeworCQkvKiBObyBYU0RULCB1c2UgdGhlIFJTRFQgKi8KKworCQlvdXRfYWRkcmVzcy0+cG9pbnRlci52YWx1ZSA9CisJCSAgICBhY3BpX2dibF9SU0RQLT5yc2R0X3BoeXNpY2FsX2FkZHJlc3M7CisJCWFjcGlfZ2JsX3Jvb3RfdGFibGVfdHlwZSA9IEFDUElfVEFCTEVfVFlQRV9SU0RUOwogCX0KIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3RiX3ZhbGlkYXRlX3JzZHQKQEAgLTIwMCw1MCArMTcyLDQzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfdGJfdmFsaWRhdGVfcnNkdCAoCi0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAqdGFibGVfcHRyKQorYWNwaV9zdGF0dXMgYWNwaV90Yl92YWxpZGF0ZV9yc2R0KHN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAqdGFibGVfcHRyKQogewotCWludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9fbWF0Y2g7CisJaW50IG5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0RUIChSU0RQLT5SZXYgPCAyKVxuIikpCi0JCX0KLQkJZWxzZSB7Ci0JCQlBQ1BJX1JFUE9SVF9FUlJPUiAoKCJMb29raW5nIGZvciBYU0RUIChSU0RQLT5SZXYgPj0gMilcbiIpKQorCQlpZiAoYWNwaV9nYmxfcm9vdF90YWJsZV90eXBlID09IEFDUElfVEFCTEVfVFlQRV9SU0RUKSB7CisJCQlBQ1BJX1JFUE9SVF9FUlJPUigoIkxvb2tpbmcgZm9yIFJTRFRcbiIpKQorCQl9IGVsc2UgeworCQkJQUNQSV9SRVBPUlRfRVJST1IoKCJMb29raW5nIGZvciBYU0RUXG4iKSkKIAkJfQogCi0JCUFDUElfRFVNUF9CVUZGRVIgKChjaGFyICopIHRhYmxlX3B0ciwgNDgpOworCQlBQ1BJX0RVTVBfQlVGRkVSKChjaGFyICopdGFibGVfcHRyLCA0OCk7CiAKIAkJcmV0dXJuIChBRV9CQURfU0lHTkFUVVJFKTsKIAl9CkBAIC0yNTEsNyArMjE2LDYgQEAKIAlyZXR1cm4gKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3RiX2dldF90YWJsZV9yc2R0CkBAIC0yNjQsNjYgKzIyOCw2MSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX3RiX2dldF90YWJsZV9yc2R0ICgKLQl2b2lkKQorYWNwaV9zdGF0dXMgYWNwaV90Yl9nZXRfdGFibGVfcnNkdCh2b2lkKQogewotCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgICAgICAgICAgdGFibGVfaW5mbzsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAg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xlX3RvX29iamVjdCAoCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWJsZV9pZCwKLQlzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICAgICAgICAgICoqdGFibGVfZGVzYyk7CithY3BpX3RiX2hhbmRsZV90b19vYmplY3QodTE2IHRhYmxlX2lkLCBzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICoqdGFibGVfZGVzYyk7CiAjZW5kaWYKIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV90Yl9pc190YWJsZV9pbnN0YWxsZWQKKyAqCisgKiBQQVJBTUVURVJTOiAgbmV3X3RhYmxlX2Rlc2MgICAgICAtIERlc2NyaXB0b3IgZm9yIG5ldyB0YWJsZSBiZWluZyBpbnN0YWxsZWQKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzIC0gQUVfQUxSRUFEWV9FWElTVFMgaWYgdGhlIHRhYmxlIGlzIGFscmVhZHkgaW5zdGFsbGVkCisgKgorICogREVTQ1JJUFRJT046IERldGVybWluZSBpZiBhbiBBQ1BJIHRhYmxlIGlzIGFscmVhZHkgaW5zdGFsbGVkCisgKgorICogTVVURVg6ICAgICAgIFRhYmxlIGRhdGEgc3RydWN0dXJlcyBzaG91bGQgYmUgbG9ja2VkCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV90Yl9pc190YWJsZV9pbnN0YWxsZWQoc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqbmV3X3RhYmxlX2Rlc2MpCit7CisJc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfZGVzYzsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0UoInRiX2lzX3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9mIChzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIpKTsKKwkJQUNQSV9EVU1QX0JVRkZFUih0YWJsZV9oZWFkZXIsCisJCQkJIHNpemVvZihzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIpKTsKIAkJcmV0dXJuIChBRV9CQURfSEVBREVSKTsKIAl9CiAKIAlyZXR1cm4gKEFFX09LKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3RiX3ZlcmlmeV90YWJsZV9jaGVja3N1bQpAQCAtMTQ1LDM3ICsyMDQsMzEgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3RiX3ZlcmlmeV90YWJsZV9jaGVja3N1bSAoCi0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAqdGFibGVfaGVhZGVyKQorYWNwaV90Yl92ZXJpZnlfdGFibGVfY2hlY2tzdW0oc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICogdGFibGVfaGVhZGVyKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tzdW07Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKKwl1OCBjaGVja3N1bTsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInRiX3ZlcmlmeV90YWJsZV9jaGVja3N1bSIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidGJfdmVyaWZ5X3RhYmxlX2NoZWNrc3VtIik7CiAKIAkvKiBDb21wdXRlIHRoZSBjaGVja3N1bS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hdGVfY2hlY2tzdW0KICAqCiAgKiBQQVJBTUVURVJTOiAgQnVmZmVyICAgICAgICAgICAgICAtIEJ1ZmZlciB0byBjaGVja3N1bQogICogICAgICAgICAgICAgIExlbmd0aCAgICAgICAgICAgICAgLSBTaXplIG9mIHRoZSBidWZmZXIKQEAgLTE4NiwxNSArMjM5LDExIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTgKLWFjcGlfdGJfY2hlY2tzdW0gKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCkKK3U4IGFjcGlfdGJfZ2VuZXJhdGVfY2hlY2tzdW0odm9pZCAqYnVmZmVyLCB1MzIgbGVuZ3RoKQogewotCWNvbnN0IHU4ICAgICAgICAgICAgICAgICAgICAgICAgKmxpbWl0OwotCWNvbnN0IHU4ICAgICAgICAgICAgICAgICAgICAgICAgKnJvdmVyOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VtID0gMDsKLQorCWNvbnN0IHU4ICpsaW1pdDsKKwljb25zdCB1OCAqcm92ZXI7CisJdTggc3VtID0gMDsKIAogCWlmIChidWZmZXIgJiYgbGVuZ3RoKSB7CiAJCS8qICBCdWZmZXIgYW5kIExlbmd0aCBhcmUgdmFsaWQgICAqLwpAQCAtMjA4LDcgKzI1Nyw2IEBACiAJcmV0dXJuIChzdW0pOwogfQogCi0KICNpZmRlZiBBQ1BJX09CU09MRVRFX0ZVTkNUSU9OUwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yMjQsMTYgKzI3MiwxMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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RpZgotCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS90YWJsZXMvdGJ4ZmFjZS5jIGIvZHJpdmVycy9hY3BpL3RhYmxlcy90YnhmYWNlLmMKaW5kZXggMGMwYjkwOC4uM2Y5NmE0OSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL3RhYmxlcy90YnhmYWNlLmMKKysrIGIvZHJpdmVycy9hY3BpL3RhYmxlcy90YnhmYWNlLmMKQEAgLTQ4LDEwICs0OCw4IEBACiAjaW5jbHVkZSA8YWNwaS9hY25hbWVzcC5oPgogI2luY2x1ZGUgPGFjcGkvYWN0YWJsZXMuaD4KIAotCiAjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9UQUJMRVMKLQkgQUNQSV9NT0RVTEVfTkFNRSAgICAoInRieGZhY2UiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJ0YnhmYWNlIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02NSwyNSArNjMsMjAgQEAKICAqICAgICAgICAgICAgICBwcm92aWRlZCBSU0RUCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfbG9hZF90YWJsZXMgKAotCXZvaWQpCithY3BpX3N0YXR1cyBhY3BpX2xvYWRfdGFibGVzKHZvaWQpCiB7Ci0Jc3RydWN0IGFjcGlfcG9pbnRlciAgICAgICAgICAgICByc2RwX2FkZHJlc3M7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJc3RydWN0IGFjcGlfcG9pbnRlciByc2RwX2FkZHJlc3M7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RS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k7CithY3BpX3RiX2ZpbmRfcnNkcChzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICp0YWJsZV9pbmZvLCB1MzIgZmxhZ3MpOwogCi1zdGF0aWMgdTggKgotYWNwaV90Yl9zY2FuX21lbW9yeV9mb3JfcnNkcCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RhcnRfYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCk7CitzdGF0aWMgdTggKmFjcGlfdGJfc2Nhbl9tZW1vcnlfZm9yX3JzZHAodTggKiBzdGFydF9hZGRyZXNzLCB1MzIgbGVuZ3RoKTsKIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV90Yl92YWxpZGF0ZV9yc2RwCisgKgorICogUEFSQU1FVEVSUzogIFJzZHAgICAgICAgIC0gUG9pbnRlciB0byB1bnZhbGlkYXRlZCBSU0RQCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBWYWxpZGF0ZSB0aGUgUlNEUCAocHRyKQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzIGFjcGlfdGJfdmFsaWRhdGVfcnNkcChzdHJ1Y3QgcnNkcF9kZXNjcmlwdG9yICpyc2RwKQoreworCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKKworCS8qCisJICogIFRoZSBzaWduYXR1cmUgYW5kIGNoZWNrc3VtIG11c3QgYm90aCBiZSBjb3JyZWN0CisJICovCisJaWYgKEFDUElfU1RSTkNNUCgoY2hhciAqKXJzZHAsIFJTRFBfU0lHLCBzaXplb2YoUlNEUF9TSUcpIC0gMSkgIT0gMCkgeworCQkvKiBOb3BlLCBCQUQgU2lnbmF0dXJlICovCisKKwkJcmV0dXJuIChBRV9CQURfU0lHTkFUVVJFKTsKKwl9CisKKwkvKiBDaGVjayB0aGUgc3RhbmRhcmQgY2hlY2tzdW0gKi8KKworCWlmIChhY3BpX3RiX2dlbmVyYXRlX2NoZWNrc3VtKHJzZHAsIEFDUElfUlNEUF9DSEVDS1NVTV9MRU5HVEgpICE9IDApIHsKKwkJcmV0dXJuIChBRV9CQURfQ0hFQ0tTVU0pOworCX0KKworCS8qIENoZWNrIGV4dGVuZGVkIGNoZWNrc3VtIGlmIHRhYmxlIHZlcnNpb24gPj0gMiAqLworCisJaWYgKChyc2RwLT5yZXZpc2lvbiA+PSAyKSAmJgorCSAgICAoYWNwaV90Yl9nZW5lcmF0ZV9jaGVja3N1bShyc2RwLCBBQ1BJX1JTRFBfWENIRUNLU1VNX0xFTkdUSCkgIT0KKwkgICAgIDApKSB7CisJCXJldHVybiAoQUVfQkFEX0NIRUNLU1VNKTsKKwl9CisKKwlyZXR1cm4gKEFFX09LKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC04MCwyOCArMTE0LDI0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV90Yl9maW5kX3RhYmxlICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzaWduYXR1cmUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqb2VtX2lkLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm9lbV90YWJsZV9pZCwKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICoqdGFibGVfcHRyKQorYWNwaV90Yl9maW5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GUgWyU0LjRzXVxuIiwKKwkJCSAgdGFibGUtPnNpZ25hdHVyZSkpOwogCiAJKnRhYmxlX3B0ciA9IHRhYmxlOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfZmlybXdhcmVfdGFibGUKQEAgLTE2NCwzNCArMTkwLDI4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV9nZXRfZmlybXdhcmVfdGFibGUgKAotCWFjcGlfc3RyaW5nICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFncywKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICoqdGFibGVfcG9pbnRlcikKK2FjcGlfZ2V0X2Zpcm13YXJlX3RhYmxlKGFjcGlfc3RyaW5nIHNpZ25hdHVyZSwKKwkJCXUzMiBpbnN0YW5jZSwKKwkJCXUzMiBmbGFncywgc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICoqdGFibGVfcG9pbnRlcikKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLQlzdHJ1Y3QgYWNwaV9wb2ludGVyICAgICAgICAgICAgIGFkZHJlc3M7Ci0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAqaGVhZGVyID0gTlVMTDsKLQlzdHJ1Y3QgYWNwaV90YWJ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Q0FMX1BPSU5URVI7CiAJcnNkcF9hZGRyZXNzLT5wb2ludGVyLnBoeXNpY2FsID0gdGFibGVfaW5mby5waHlzaWNhbF9hZGRyZXNzOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV90Yl9zY2FuX21lbW9yeV9mb3JfcnNkcApAQCAtNDA1LDY4ICs0MjEsNDUgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdTggKgotYWNwaV90Yl9zY2FuX21lbW9yeV9mb3JfcnNkcCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RhcnRfYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCkKK3N0YXRpYyB1OCAqYWNwaV90Yl9zY2FuX21lbW9yeV9mb3JfcnNkcCh1OCAqIHN0YXJ0X2FkZHJlc3MsIHUzMiBsZW5ndGgpCiB7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbWVtX3JvdmVyOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmVuZF9hZGRyZXNzOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tzdW07CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXU4ICptZW1fcm92ZXI7CisJdTggKmVuZF9hZGRyZXNzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgidGJfc2Nhbl9tZW1vcnlfZm9yX3JzZHAiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJ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JCW1lbV9yb3ZlcikpOworCQkvKiBObyBzaWcgbWF0Y2ggb3IgYmFkIGNoZWNrc3VtLCBrZWVwIHNlYXJjaGluZyAqLwogCX0KIAogCS8qIFNlYXJjaGVkIGVudGlyZSBibG9jaywgbm8gUlNEUCB3YXMgZm91bmQgKi8KIAotCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lORk8sCi0JCSJTZWFyY2hlZCBlbnRpcmUgYmxvY2ssIG5vIHZhbGlkIFJTRFAgd2FzIGZvdW5kLlxuIikpOwotCXJldHVybl9QVFIgKE5VTEwpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfSU5GTywKKwkJCSAgIlNlYXJjaGVkIGVudGlyZSBibG9jayBmcm9tICVwLCB2YWxpZCBSU0RQIHdhcyBub3QgZm91bmRcbiIsCisJCQkgIHN0YXJ0X2FkZHJlc3MpKTsKKwlyZXR1cm5fUFRSKE5VTEwpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdGJfZmluZF9yc2RwCkBAIC00OTAsMTggKzQ4MywxNCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3RiX2ZpbmRfcnNkcCAoCi0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAgICAgICAgICAqdGFibGVfaW5mbywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKQorYWNwaV90Yl9maW5kX3JzZHAoc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfaW5mbywgdTMyIGZsYWdzKQogewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRhYmxlX3B0cjsKL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YWNwaV91dF9maW5kX2FsbG9jYXRpb24gKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdF9pZCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICphbGxvY2F0aW9uKTsKK3N0YXRpYyBzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgKmFjcGlfdXRfZmluZF9hbGxvY2F0aW9uKHZvaWQgKmFsbG9jYXRpb24pOwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfdHJhY2tfYWxsb2NhdGlvbiAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0X2lkLAotCXN0cnVjdCBhY3BpX2RlYnVnX21lbV9ibG9jayAgICAgKmFkZHJlc3MsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsb2NfdHlwZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lKTsKK2FjcGlfdXRfdHJhY2tfYWxsb2NhdGlvbihzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgKmFkZHJlc3MsCisJCQkgYWNwaV9zaXplIHNpemUsCisJCQkgdTggYWxsb2NfdHlwZSwgdTMyIGNvbXBvbmVudCwgY2hhciAqbW9kdWxlLCB1MzIgbGluZSk7CiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9yZW1vdmVfYWxsb2NhdGlvbiAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0X2lkLAotCXN0cnVjdCBhY3BpX2RlYnVnX21lbV9ibG9jayAgICAgKmFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZSk7Ci0jZW5kaWYJLyogQUNQSV9EQkdfVFJBQ0tfQUxMT0NBVElPTlMgKi8KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3JlbGVhc2VfdG9fY2FjaGUKLSAqCi0gKiBQQVJBTUVURVJTOiAgbGlzdF9pZCAgICAgICAgICAgICAtIE1lbW9yeSBsaXN0L2NhY2hlIElECi0gKiAgICAgICAgICAgICAgT2JqZWN0ICAgICAgICAgICAgICAtIFRoZSBvYmplY3QgdG8gYmUgcmVsZWFzZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgTm9uZQotICoKLSAqIERFU0NSSVBUSU9OOiBSZWxlYXNlIGFuIG9iamVjdCB0byB0aGUgc3BlY2lmaWVkIGNhY2hlLiAgSWYgY2FjaGUgaXMgZnVsbCwKLSAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGlzIGRlbGV0ZWQuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV91dF9yZWxlYXNlX3RvX2NhY2hlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RfaWQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqb2JqZWN0KQotewotCXN0cnVjdCBhY3BpX21lbW9yeV9saXN0ICAgICAgICAgKmNhY2hlX2luZm87Ci0KLQotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KLQotCWNhY2hlX2luZm8gPSAmYWNwaV9nYmxfbWVtb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ZvLT5jYWNoZV9kZXB0aCsrOwotCi0JCSh2b2lkKSBhY3BpX3V0X3JlbGVhc2VfbXV0ZXggKEFDUElfTVRYX0NBQ0hFUyk7Ci0JfQotCi0jZWxzZQotCi0JLyogT2JqZWN0IGNhY2hlIGlzIGRpc2FibGVkOyBqdXN0IGZyZWUgdGhlIG9iamVjdCAqLwotCi0JQUNQSV9NRU1fRlJFRSAob2JqZWN0KTsKLQlBQ1BJX01FTV9UUkFDS0lORyAoY2FjaGVfaW5mby0+dG90YWxfZnJlZWQrKyk7Ci0jZW5kaWYKLX0KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2FjcXVpcmVfZnJvbV9jYWNoZQotICoKLSAqIFBBUkFNRVRFUlM6ICBsaXN0X2lkICAgICAgICAgICAgIC0gTWVtb3J5IGxpc3QgSUQKLSAqCi0gKiBSRVRVUk46ICAgICAgQSByZXF1ZXN0ZWQgb2JqZWN0LiAgTlVMTCBpZiB0aGUgb2JqZWN0IGNvdWxkIG5vdCBiZQotICogICAgICAgICAgICAgIGFsbG9jYXRlZC4KLSAqCi0gKiBERVNDUklQVElPTjogR2V0IGFuIG9iamVjdCBmcm9tIHRoZSBzcGVjaWZpZWQgY2FjaGUuICBJZiBjYWNoZSBpcyBlbXB0eSwKLSAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGlzIGFsbG9jYXRlZC4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkICoKLWFjcGlfdXRfYWNxdWlyZV9mcm9tX2NhY2hlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RfaWQpCi17Ci0Jc3RydWN0IGFjcGlfbWVtb3J5X2xpc3QgIC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V9pbmZvLT50b3RhbF9hbGxvY2F0ZWQrKyk7Ci0JfQotCi0jZWxzZQotCi0JLyogT2JqZWN0IGNhY2hlIGlzIGRpc2FibGVkOyBqdXN0IGFsbG9jYXRlIHRoZSBvYmplY3QgKi8KLQotCW9iamVjdCA9IEFDUElfTUVNX0NBTExPQ0FURSAoY2FjaGVfaW5mby0+b2JqZWN0X3NpemUpOwotCUFDUElfTUVNX1RSQUNLSU5HIChjYWNoZV9pbmZvLT50b3RhbF9hbGxvY2F0ZWQrKyk7Ci0jZW5kaWYKLQotCXJldHVybiAob2JqZWN0KTsKLX0KLQotCi0jaWZkZWYgQUNQSV9FTkFCTEVfT0JKRUNUX0NBQ0hFCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX2NhY2hlCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfY2FjaGVzCiAgKgotICogUEFSQU1FVEVSUzogIGxpc3RfaWQgICAgICAgICAtIE1lbW9yeSBsaXN0IElECisgKiBQQVJBTUVURVJTOiAgTm9uZQogICoKLSAqIFJFVFVSTjogICAgICBOb25lCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgotICogREVTQ1JJUFRJT046IEZyZWUgYWxsIG9iamVjdHMgd2l0aGluIHRoZSByZXF1ZXN0ZWQgY2FjaGUuCisgKiBERVNDUklQVElPTjogQ3JlYXRlIGFsbCBsb2NhbCBjYWNoZXMKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X2RlbGV0ZV9nZW5lcmljX2NhY2hlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RfaWQpCithY3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TsKKwl9CisKKwlzdGF0dXMgPQorCSAgICBhY3BpX29zX2NyZWF0ZV9jYWNoZSgiYWNwaV9vcGVyYW5kIiwKKwkJCQkgc2l6ZW9mKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QpLAorCQkJCSBBQ1BJX01BWF9PQkpFQ1RfQ0FDSEVfREVQVEgsCisJCQkJICZhY3BpX2dibF9vcGVyYW5kX2NhY2hlKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJcmV0dXJuIChzdGF0dXMpOworCX0KKworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9jYWNoZXMKKyAqCisgKiBQQVJBTUVURVJTOiAgTm9uZQorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogUHVyZ2UgYW5kIGRlbGV0ZSBhbGwgbG9jYWwgY2FjaGVzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV91dF9kZWxldGVfY2FjaGVzKHZvaWQpCit7CisKKwkodm9pZClhY3BpX29zX2RlbGV0ZV9jYWNoZShhY3BpX2dibF9zdGF0ZV9jYWNoZSk7CisJYWNwaV9nYmxfc3RhdGVfY2FjaGUgPSBOVUxMOworCisJKHZvaWQpYWNwaV9vc19kZWxldGVfY2FjaGUoYWNwaV9nYmxfb3BlcmFuZF9jYWNoZSk7CisJYWNwaV9nYmxfb3BlcmFuZF9jYWNoZSA9IE5VTEw7CisKKwkodm9pZClhY3BpX29zX2RlbGV0ZV9jYWNoZShhY3BpX2dibF9wc19ub2RlX2NhY2hlKTsKKwlhY3BpX2dibF9wc19ub2RlX2NhY2hlID0gTlVMTDsKKworCSh2b2lkKWFjcGlfb3NfZGVsZXRlX2NhY2hlKGFjcGlfZ2JsX3BzX25vZGVfZXh0X2NhY2hlKTsKKwlhY3BpX2dibF9wc19ub2RlX2V4dF9jYWNoZSA9IE5VTEw7CisKKwlyZXR1cm4gKEFFX09LKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yODAsOSArMTgyLDcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV91dF92YWxpZGF0ZV9idWZmZXIgKAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKmJ1ZmZlcikKK2FjcGlfc3RhdHVzIGFjcGlfdXRfdmFsaWRhdGVfYnVmZmVyKHN0cnVjdCBhY3BpX2J1ZmZlciAqIGJ1ZmZlcikKIHsKIAogCS8qIE9idmlvdXNseSwgdGhlIHN0cnVjdHVyZSBwb2ludGVyIG11c3QgYmUgdmFsaWQgKi8KQEAgLTI5Myw5ICsxOTMsOSBAQAogCiAJLyogU3BlY2lhbCBzZW1hbnRpY3MgZm9yIHRoZSBsZW5ndGggKi8KIAotCWlmICgoYnVmZmVyLT5sZW5ndGggPT0gQUNQSV9OT19CVUZGRVIpICAgICAgICAgICAgICB8fAotCQkoYnVmZmVyLT5sZW5ndGggPT0gQUNQSV9BTExPQ0FURV9CVUZGRVIpICAgICAgICB8fAotCQkoYnVmZmVyLT5sZW5ndGggPT0gQUNQSV9BTExPQ0FURV9MT0NBTF9CVUZGRVIpKSB7CisJaWYgKChidWZmZXItPmxlbmd0aCA9PSBBQ1BJX05PX0JVRkZFUikgfHwKKwkgICAgKGJ1ZmZlci0+bGVuZ3RoID09IEFDUElfQUxMT0NBVEVfQlVGRkVSKSB8fAorCSAgICAoYnVmZmVyLT5sZW5ndGggPT0gQUNQSV9BTExPQ0FURV9MT0NBTF9CVUZGRVIpKSB7CiAJCXJldHVybiAoQUVfT0spOwogCX0KIApAQCAtMzA4LDcgKzIwOCw2IEBACiAJcmV0dXJuIChBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9pbml0aWFsaXplX2J1ZmZlcgpAQCAtMzI0LDEyICsyMjMsMTAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2luaXRpYWxpemVfYnVmZmVyICgKLQlzdHJ1Y3QgYWNwaV9idWZmZXIgICAgICAgICAgICAgICpidWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlZF9sZW5ndGgpCithY3BpX3V0X2luaXRpYWxpemVfYnVmZmVyKHN0cnVjdCBhY3BpX2J1ZmZlciAqIGJ1ZmZlciwKKwkJCSAgYWNwaV9zaXplIHJlcXVpcmVkX2xlbmd0aCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CiAKIAlzd2l0Y2ggKGJ1ZmZlci0+bGVuZ3RoKSB7CiAJY2FzZSBBQ1BJX05PX0JVRkZFUjoKQEAgLTMzOSwzMyArMjM2LDMwIEBACiAJCXN0YXR1cyA9IEFFX0JVRkZFUl9PVkVSRkxPVzsKIAkJYnJlYWs7CiAKLQogCWNhc2UgQUNQSV9BTExPQ0FURV9CVUZG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T5wb2ludGVyLCAwLCByZXF1aXJlZF9sZW5ndGgpOworCQlBQ1BJX01FTVNFVChidWZmZXItPnBvaW50ZXIsIDAsIHJlcXVpcmVkX2xlbmd0aCk7CiAJCWJyZWFrOwogCX0KIApAQCAtMzg1LDcgKzI3OSw2IEBACiAJcmV0dXJuIChzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfYWxsb2NhdGUKQEAgLTQwMSw0MSArMjk0LDM0IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCAqCi1hY3BpX3V0X2FsbG9jYXRlICgKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZSkKK3ZvaWQgKmFjcGlfdXRfYWxsb2NhdGUoYWNwaV9zaXplIHNpemUsIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpCiB7Ci0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYWxsb2NhdGlvbjsKKwl2b2lkICphbGxvY2F0aW9uOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMiAoInV0X2FsbG9jYXRlIiwgc2l6ZSk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMigidXRfYWxsb2NhdGUiLCBzaXplKTsKIAogCS8qIENoZWNrIGZvciBhbiBpbmFkdmVydGVudCBzaXplIG9mIHplcm8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VElPTjogICAgYWNwaV91dF9jYWxsb2NhdGUKQEAgLTQ1MSw0MyArMzM3LDM2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCAqCi1hY3BpX3V0X2NhbGxvY2F0ZSAoCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUpCit2b2lkICphY3BpX3V0X2NhbGxvY2F0ZShhY3BpX3NpemUgc2l6ZSwgdTMyIGNvbXBvbmVudCwgY2hhciAqbW9kdWxlLCB1MzIgbGluZSkKIHsKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICphbGxvY2F0aW9uOworCXZvaWQgKmFsbG9jYXRpb247CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyICgidXRfY2FsbG9jYXRlIiwgc2l6ZSk7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMigidXRfY2FsbG9jYXRlIiwgc2l6ZSk7CiAKIAkvKiBDaGVjayBmb3IgYW4gaW5hZHZlcnRlbnQgc2l6ZSBvZiB6ZXJvIGJ5dGVzICovCiAKIAlpZiAoIXNpemUpIHsKLQkJX0FDUElfUkVQT1JUX0VSUk9SIChtb2R1bGUsIGxpbmUsIGNvbXBvbmVudCwKLQkJCQkoInV0X2NhbGxvY2F0ZTogQXR0ZW1wdCB0byBhbGxvY2F0ZSB6ZXJvIGJ5dGVzXG4iKSk7Ci0JCXJldHVybl9QVFIgKE5VTEwpOworCQlfQUNQSV9SRVBPUlRfRVJST1IobW9kdWxlLCBsaW5lLCBjb21wb25lbnQsCisJCQkJICAgKCJ1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ycyBpbiB0aGUgYm9keSBvZiBhY3BpX3V0X2ZyZWUuCiAgKi8KIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfbGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICBjYWNoZV9uYW1lICAgICAgLSBBc2NpaSBuYW1lIGZvciB0aGUgY2FjaGUKKyAqICAgICAgICAgICAgICBvYmplY3Rfc2l6ZSAgICAgLSBTaXplIG9mIGVhY2ggY2FjaGVkIG9iamVjdAorICogICAgICAgICAgICAgIHJldHVybl9jYWNoZSAgICAtIFdoZXJlIHRoZSBuZXcgY2FjaGUgb2JqZWN0IGlzIHJldHVybmVkCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBDcmVhdGUgYSBsb2NhbCBtZW1vcnkgbGlzdCBmb3IgdHJhY2tpbmcgcHVycG9zZWQKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgYWNwaV9zdGF0dXMKK2FjcGlfdXRfY3JlYXRlX2xpc3QoY2hhciAqbGlzdF9uYW1lLAorCQkgICAgdTE2IG9iamVjdF9zaXplLCBzdHJ1Y3QgYWNwaV9tZW1vcnlfbGlzdCAqKnJldHVybl9jYWNoZSkKK3sKKwlzdHJ1Y3QgYWNwaV9tZW1vcnlfbGlzdCAqY2FjaGU7CisKKwljYWNoZSA9IGFjcGlfb3NfYWxsb2NhdGUoc2l6ZW9mKHN0cnVjdCBhY3BpX21lbW9yeV9saXN0KSk7CisJaWYgKCFjYWNoZSkgeworCQlyZXR1cm4gKEFFX05PX01FTU9SWSk7CisJfQorCisJQUNQSV9NRU1TRVQoY2FjaGUsIDAsIHNpemVvZihzdHJ1Y3QgYWNwaV9tZW1vcnlfbGlzdCkpOworCisJY2FjaGUtPmxpc3RfbmFtZSA9IGxpc3RfbmFtZTsKKwljYWNoZS0+b2JqZWN0X3NpemUgPSBvYmplY3Rfc2l6ZTsKKworCSpyZXR1cm5fY2FjaGUgPSBjYWNoZTsKKwlyZXR1cm4gKEFFX09LKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC01MTYsMzcgKzQyOCwzMyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQgKgotYWNwaV91dF9hbGxvY2F0ZV9hbmRfdHJhY2sgKAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lKQordm9pZCAqYWNwaV91dF9hbGxvY2F0ZV9hbmRfdHJhY2soYWNwaV9zaXplIHNpemUsCisJCQkJIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpCiB7Ci0Jc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrICAgICAqYWxsb2NhdGlvbjsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwlzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgKmFsbG9jYXRpb247CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlhbGxvY2F0aW9uID0gYWNwaV91dF9hbGxvY2F0ZSAoc2l6ZSArIHNpemVvZiAoc3RydWN0IGFjcGl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JyZW50X3RvdGFsX3NpemUgKz0gKHUzMikgc2l6ZTsKIAotCXJldHVybiAoKHZvaWQgKikgJmFsbG9jYXRpb24tPnVzZXJfc3BhY2UpOworCXJldHVybiAoKHZvaWQgKikmYWxsb2NhdGlvbi0+dXNlcl9zcGFjZSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9jYWxsb2NhdGVfYW5kX3RyYWNrCkBAIC01NjIsNDEgKzQ3MCwzOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQgKgotYWNwaV91dF9jYWxsb2NhdGVfYW5kX3RyYWNrICgKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZSkKK3ZvaWQgKmFjcGlfdXRfY2FsbG9jYXRlX2FuZF90cmFjayhhY3BpX3NpemUgc2l6ZSwKKwkJCQkgIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpCiB7Ci0Jc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrICAgICAqYWxsb2NhdGlvbjsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwlzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgKmFsbG9jYXRpb247CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlhbGxvY2F0aW9uID0gYWNwaV91dF9jYWxsb2NhdG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aW5lKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJYWNwaV9vc19mcmVlKGFsbG9jYXRpb24pOwogCQlyZXR1cm4gKE5VTEwpOwogCX0KIAotCWFjcGlfZ2JsX21lbW9yeV9saXN0c1tBQ1BJX01FTV9MSVNUX0dMT0JBTF0udG90YWxfYWxsb2NhdGVkKys7Ci0JYWNwaV9nYmxfbWVtb3J5X2xpc3RzW0FDUElfTUVNX0xJU1RfR0xPQkFMXS5jdXJyZW50X3RvdGFsX3NpemUgKz0gKHUzMikgc2l6ZTsKKwlhY3BpX2dibF9nbG9iYWxfbGlzdC0+dG90YWxfYWxsb2NhdGVkKys7CisJYWNwaV9nYmxfZ2xvYmFsX2xpc3QtPmN1cnJlbnRfdG90YWxfc2l6ZSArPSAodTMyKSBzaXplOwogCi0JcmV0dXJuICgodm9pZCAqKSAmYWxsb2NhdGlvbi0+dXNlcl9zcGFjZSk7CisJcmV0dXJuICgodm9pZCAqKSZhbGxvY2F0aW9uLT51c2VyX3NwYWNlKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2ZyZWVfYW5kX3RyYWNrCkBAIC02MTMsNTMgKzUxOCw0NiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV91dF9mcmVlX2FuZF90cmFjayAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYWxsb2NhdGlvbiwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICA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XR1cykpKTsKIAl9CiAKLQlhY3BpX29zX2ZyZWUgKGRlYnVnX2Jsb2NrKTsKKwlhY3BpX29zX2ZyZWUoZGVidWdfYmxvY2spOwogCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfQUxMT0NBVElPTlMsICIlcCBmcmVlZFxuIiwgYWxsb2NhdGlvbikpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfQUxMT0NBVElPTlMsICIlcCBmcmVlZFxuIiwgYWxsb2NhdGlvbikpOwogCiAJcmV0dXJuX1ZPSUQ7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9maW5kX2FsbG9jYXRpb24KICAqCi0gKiBQQVJBTUVURVJTOiAgbGlzdF9pZCAgICAgICAgICAgICAgICAgLSBNZW1vcnkgbGlzdCB0byBzZWFyY2gKLSAqICAgICAgICAgICAgICBBbGxvY2F0aW9uICAgICAgICAgICAgICAtIEFkZHJlc3Mgb2YgYWxsb2NhdGVkIG1lbW9yeQorICogUEFSQU1FVEVSUzogIEFsbG9jYXRpb24gICAgICAgICAgICAgIC0gQWRkcmVzcyBvZiBhbGxvY2F0ZWQgbWVtb3J5CiAgKgogICogUkVUVVJOOiAgICAgIEEgbGlzdCBlbGVtZW50IGlmIGZvdW5kOyBOVUxMIG90aGVyd2lzZS4KICAqCkBAIC02NjcsMjIgKzU2NSwxMyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyBzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgKgotYWNwaV91dF9maW5kX2FsbG9jYXRpb24gKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdF9pZCwKLQ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iAgKiAgICAgICAgICAgICAgU2l6ZSAgICAgICAgICAgICAgICAtIFNpemUgb2YgdGhlIGFsbG9jYXRpb24KICAqICAgICAgICAgICAgICBhbGxvY190eXBlICAgICAgICAgIC0gTUVNX01BTExPQyBvciBNRU1fQ0FMTE9DCiAgKiAgICAgICAgICAgICAgQ29tcG9uZW50ICAgICAgICAgICAtIENvbXBvbmVudCB0eXBlIG9mIGNhbGxlcgpAQCAtNzE3LDY0ICs2MDQsNTEgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF90cmFja19hbGxvY2F0aW9uICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RfaWQsCi0Jc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrICAgICAqYWxsb2NhdGlvbiwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxvY190eXBlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUpCithY3BpX3V0X3RyYWNrX2FsbG9jYXRpb24oc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrICphbGxvY2F0aW9uLAorCQkJIGFjcGlfc2l6ZSBzaXplLAorCQkJIHU4IGFsbG9jX3R5cGUsIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpCiB7Ci0Jc3RydWN0IGFjcGlfbWVtb3J5X2xpc3QgICAgICAgICAqbWVtX2xpc3Q7Ci0Jc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrIC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QogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9yZW1vdmVfYWxsb2NhdGlvbgogICoKLSAqIFBBUkFNRVRFUlM6ICBsaXN0X2lkICAgICAgICAgICAgIC0gTWVtb3J5IGxpc3QgdG8gc2VhcmNoCi0gKiAgICAgICAgICAgICAgQWxsb2NhdGlvbiAgICAgICAgICAtIEFkZHJlc3Mgb2YgYWxsb2NhdGVkIG1lbW9yeQorICogUEFSQU1FVEVSUzogIEFsbG9jYXRpb24gICAgICAgICAgLSBBZGRyZXNzIG9mIGFsbG9jYXRlZCBtZW1vcnkKICAqICAgICAgICAgICAgICBDb21wb25lbnQgICAgICAgICAgIC0gQ29tcG9uZW50IHR5cGUgb2YgY2FsbGVyCiAgKiAgICAgICAgICAgICAgTW9kdWxlICAgICAgICAgICAgICAtIFNvdXJjZSBmaWxlIG5hbWUgb2YgY2FsbGVyCiAgKiAgICAgICAgICAgICAgTGluZSAgICAgICAgICAgICAgICAtIExpbmUgbnVtYmVyIG9mIGNhbGxlcgpAQCAtODA2LDQ1ICs2NzcsMzQgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9yZW1vdmVfYWxsb2NhdGlvbiAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0X2lkLAotCXN0cnVjdCBhY3BpX2RlYnVnX21lbV9ibG9jayAgICAgKmFsbG9jYXRpb24sCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb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NyArNzU1LDYgQEAKIAkJCSAgbWVtX2xpc3QtPm1heF9jb25jdXJyZW50X2NvdW50LAogCQkJICBST1VORF9VUF9UT18xSyAobWVtX2xpc3QtPm1heF9jb25jdXJyZW50X3NpemUpKSk7CiAKLQogCUFDUElfREVCVUdfUFJJTlQgKFRSQUNFX0FMTE9DQVRJT05TIHwgVFJBQ0VfVEFCTEVTLAogCQkJICAoIiUzMHM6ICU0ZCAoJTNkIEtiKVxuIiwgIlRvdGFsIChhbGwpIGludGVybmFsIG9iamVjdHMiLAogCQkJICBydW5uaW5nX29iamVjdF9jb3VudCwKQEAgLTkwOSw3ICs3NjUsNiBAQAogCQkJICBydW5uaW5nX2FsbG9jX2NvdW50LAogCQkJICBST1VORF9VUF9UT18xSyAocnVubmluZ19hbGxvY19zaXplKSkpOwogCi0KIAlBQ1BJX0RFQlVHX1BSSU5UIChUUkFDRV9BTExPQ0FUSU9OUyB8IFRSQUNFX1RBQkxFUywKIAkJCSAgKCIlMzBzOiAlNGQgKCUzZCBLYilcbiIsICJDdXJyZW50IE5vZGVzIiwKIAkJCSAgYWNwaV9nYmxfY3VycmVudF9ub2RlX2NvdW50LApAQCAtOTIzLDggKzc3OCw3IEBACiAqLwogCXJldHVybl9WT0lEOwogfQotI2VuZGlmICAvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCi0KKyNlbmRpZgkJCQkvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtOTM5LDg0ICs3OTMsODcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X2R1bXBfYWxsb2NhdGlvbnMgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgIC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5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HCisgKiBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUKKyAqIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFUy4KKyAqLworCisjaW5jbHVkZSA8YWNwaS9hY3BpLmg+CisKKyNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUworQUNQSV9NT0RVTEVfTkFNRSgidXRjYWNoZSIpCisKKyNpZmRlZiBBQ1BJX1VTRV9MT0NBTF9DQUNIRQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9vc19jcmVhdGVfY2FjaGUKKyAqCisgKiBQQVJBTUVURVJTOiAgY2FjaGVfbmFtZSAgICAgIC0gQXNjaWkgbmFtZSBmb3IgdGhlIGNhY2hlCisgKiAgICAgICAgICAgICAgb2JqZWN0X3NpemUgICAgIC0gU2l6ZSBvZiBlYWNoIGNhY2hlZCBvYmplY3QKKyAqICAgICAgICAgICAgICBtYXhfZGVwdGggICAgICAgLSBNYXhpbXVtIGRlcHRoIG9mIHRoZSBjYWNoZSAoaW4gb2JqZWN0cykKKyAqICAgICAgICAgICAgICByZXR1cm5fY2FjaGUgICAgLSBXaGVyZSB0aGUgbmV3IGNhY2hlIG9iamVjdCBpcyByZXR1cm5lZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogQ3JlYXRlIGEgY2FjaGUgb2JqZWN0CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2FjcGlfc3RhdHVzCithY3BpX29zX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QorICoKKyAqIFBBUkFNRVRFUlM6ICBDYWNoZSAgICAgICAgICAgLSBIYW5kbGUgdG8gY2FjaGUgb2JqZWN0CisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBGcmVlIGFsbCBvYmplY3RzIHdpdGhpbiB0aGUgcmVxdWVzdGVkIGNhY2hlLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzIGFjcGlfb3NfcHVyZ2VfY2FjaGUoc3RydWN0IGFjcGlfbWVtb3J5X2xpc3QgKiBjYWNoZSkKK3sKKwljaGFyICpuZXh0OworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJaWYgKCFjYWNoZSkgeworCQlyZXR1cm4gKEFFX0JBRF9QQVJBTUVURVIpOworCX0KKworCS8qIFdhbGsgdGhlIGxpc3Qgb2Ygb2JqZWN0cyBpbiB0aGlzIGNhY2hlICovCisKKwl3aGlsZSAoY2FjaGUtPmxpc3RfaGVhZCkgeworCQkvKiBEZWxldGUgYW5kIHVubGluayBvbmUgY2FjaGVkIHN0YXRlIG9iamVjdCAqLworCisJCW5leHQgPSAqKEFDUElfQ0FTVF9JTkRJUkVDVF9QVFIoY2hhciwKKwkJCQkJCSYoKChjaGFyICopY2FjaGUtPgorCQkJCQkJICAgbGlzdF9oZWFkKVtjYWNoZS0+CisJCQkJCQkJICAgICAgbGlua19vZmZzZXRdKSkpOworCQlBQ1BJX01FTV9GUkVFKGNhY2hlLT5saXN0X2hlYWQpOworCisJCWNhY2hlLT5saXN0X2hlYWQgPSBuZXh0OworCQljYWNoZS0+Y3VycmVudF9kZXB0aC0tOworCX0KKworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX29zX2RlbGV0ZV9jYWNoZQorICoKKyAqIFBBUkFNRVRFUlM6ICBDYWNoZSAgICAgICAgICAgLSBIYW5kbGUgdG8gY2FjaGUgb2JqZWN0CisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBGcmVlIGFsbCBvYmplY3RzIHdpdGhpbiB0aGUgcmVxdWVzdGVkIGNhY2hlIGFuZCBkZWxldGUgdGhlCisgKiAgICAgICAgICAgICAgY2FjaGUgb2JqZWN0LgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzIGFjcGlfb3NfZGVsZXRlX2NhY2hlKHN0cnVjdCBhY3BpX21lbW9yeV9saXN0ICogY2FjaGUpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogUHVyZ2UgYWxsIG9iamVjdHMgaW4gdGhlIGNhY2hlICovCisKKwlzdGF0dXMgPSBhY3BpX29zX3B1cmdlX2NhY2hlKGNhY2hlKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJcmV0dXJuIChzdGF0dXMpOworCX0KKworCS8qIE5vdyB3ZSBjYW4gZGVsZXRlIHRoZSBjYWNoZSBvYmplY3QgKi8KKworCWFjcGlfb3NfZnJlZShjYWNoZSk7CisJcmV0dXJuIChBRV9PSyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfb3NfcmVsZWFzZV9vYmplY3QKKyAqCisgKiBQQVJBTUVURVJTOiAgQ2FjaGUgICAgICAgLSBIYW5kbGUgdG8gY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JCXJldHVybiAoc3RhdHVzKTsKKwkJfQorCisJCS8qIE1hcmsgdGhlIG9iamVjdCBhcyBjYWNoZWQgKi8KKworCQlBQ1BJX01FTVNFVChvYmplY3QsIDB4Q0EsIGNhY2hlLT5vYmplY3Rfc2l6ZSk7CisJCUFDUElfU0VUX0RFU0NSSVBUT1JfVFlQRShvYmplY3QsIEFDUElfREVTQ19UWVBFX0NBQ0hFRCk7CisKKwkJLyogUHV0IHRoZSBvYmplY3QgYXQgdGhlIGhlYWQgb2YgdGhlIGNhY2hlIGxpc3QgKi8KKworCQkqKEFDUElfQ0FTVF9JTkRJUkVDVF9QVFIoY2hhciwKKwkJCQkJICYoKChjaGFyICopb2JqZWN0KVtjYWNoZS0+CisJCQkJCQkJICAgIGxpbmtfb2Zmc2V0XSkpKSA9CisJCSAgICBjYWNoZS0+bGlzdF9oZWFkOworCQljYWNoZS0+bGlzdF9oZWFkID0gb2JqZWN0OworCQljYWNoZS0+Y3VycmVudF9kZXB0aCsrOworCisJCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9DQUNIRVMpOworCX0KKworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX29zX2FjcXVpcmVfb2JqZWN0CisgKgorICogUEFSQU1FVEVSUzogIENhY2hlICAgICAgICAgICAtIEhhbmRsZSB0byBjYWNoZSBvYmplY3QKKyAqCisgKiBSRVRVUk46ICAgICAgdGhlIGFjcXVpcmVkIG9iamVjdC4gIE5VTEwgb24gZXJyb3IKKyAqCisgKiBERVNDUklQVElPTjogR2V0IGFuIG9iamVjdCBmcm9tIHRoZSBzcGVjaWZpZWQgY2FjaGUuICBJZiBjYWNoZSBpcyBlbXB0eSwKKyAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGlzIGF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U4IG9iamVjdF90eXBlLAorCQkJCSAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqc291cmNlX29iamVjdCwKKwkJCQkgIHVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqc3RhdGUsCisJCQkJICB2b2lkICpjb250ZXh0KTsKIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2NvcHlfaWVsZW1lbnRfdG9faWVsZW1lbnQgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0X3R5cGUsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc291cmNlX29iamVjdCwKLQl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgICAgICAgICpzdGF0ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0KTsKK2FjcGlfdXRfY29weV9pcGFja2FnZV90b19lcGFja2FnZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICppbnRlcm5hbF9vYmplY3QsCisJCQkJICB1OCAqIGJ1ZmZlciwgYWNwaV9zaXplICogc3BhY2VfdXNlZCk7CiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9jb3B5X2lwYWNrYWdlX3RvX2VwYWNrYWdlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICppbnRlcm5hbF9vYmplY3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnNwYWNlX3VzZWQpOworYWNwaV91dF9jb3B5X2VzaW1wbGVfdG9faXNpbXBsZSh1bmlvbiBhY3BpX29iamVjdCAqdXNlcl9vYmosCisJCQkJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKnJldHVybl9vYmopOwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfY29weV9lc2ltcG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uaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnNvdXJjZV9vYmosCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqZGVzdF9vYmosCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSk7Ci0KK2FjcGlfdXRfY29weV9pcGFja2FnZV90b19pcGFja2FnZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpzb3VyY2Vfb2JqLAorCQkJCSAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqZGVzdF9vYmosCisJCQkJICBzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0xMTYsMTcgKzEwMywxMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2NvcHlfaXNpbXBsZV90b19lc2ltcGxlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICppbnRlcm5hbF9vYmplY3QsCi0JdW5pb24gYWNwaV9vYmplY3QgICAgICAgICAgICAgICAqZXh0ZXJuYWxfb2JqZWN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmRhdGFfc3BhY2UsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyX3NwYWNlX3VzZWQpCithY3BpX3V0X2NvcHlfaXNpbXBsZV90b19lc2ltcGxlKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKmludGVybmFsX29iamVjdCwKKwkJCQl1bmlvbiBhY3BpX29iamVjdCAqZXh0ZXJu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NvcHlfaWVsZW1lbnRfdG9fZWVsZW1lbnQKQEAgLTI0NywyNSArMjMwLDIzIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfY29weV9pZWxlbWVudF90b19lZWxlbWVudCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmplY3RfdHlwZSwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2Vfb2JqZWN0LAotCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAgICAgICAgKnN0YXRlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCithY3BpX3V0X2NvcHlfaWVsZW1lbnRfdG9fZWVsZW1lbnQodTggb2JqZWN0X3R5cGUsCisJCQkJICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpzb3VyY2Vfb2JqZWN0LAorCQkJCSAgdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICpzdGF0ZSwKKwkJCQkgIHZvaWQgKmNvbnRleHQpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKLQlzdHJ1Y3QgYWNwaV9wa2dfaW5mbyAgICAgICAgICAgICppbmZvID0gKHN0cnVjdCBhY3BpX3BrZ19pbmZvICopIGNvbnRleHQ7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBvYmplY3Rfc3BhY2U7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzX2luZGV4OwotCXVuaW9uIGFjcGlfb2JqZWN0ICAgICAgICAgICAgICAgKnRhcmdldF9vYmplY3Q7CisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CisJc3RydWN0IGFjcGlfcGt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CQlvYmplY3Rfc3BhY2UgPSBBQ1BJX1JPVU5EX1VQX1RPX05BVElWRV9XT1JEICgKLQkJCQkgICAoYWNwaV9zaXplKSB0YXJnZXRfb2JqZWN0LT5wYWNrYWdlLmNvdW50ICoKLQkJCQkgICBzaXplb2YgKHVuaW9uIGFjcGlfb2JqZWN0KSk7CisJCW9iamVjdF9zcGFjZSA9IEFDUElfUk9VTkRfVVBfVE9fTkFUSVZFX1dPUkQoKGFjcGlfc2l6ZSkKKwkJCQkJCQkgICAgdGFyZ2V0X29iamVjdC0+CisJCQkJCQkJICAgIHBhY2thZ2UuY291bnQgKgorCQkJCQkJCSAgICBzaXplb2YodW5pb24KKwkJCQkJCQkJICAgYWNwaV9vYmplY3QpKTsKIAkJYnJlYWs7CiAKLQogCWRlZmF1bHQ6CiAJCXJldHVybiAoQUVfQkFEX1BBUkFNRVRFUik7CiAJfQogCi0JaW5mby0+ZnJlZV9zcGFjZSAgKz0gb2JqZWN0X3NwYWNlOwotCWluZm8tPmxlbmd0aCAgICAgICs9IG9iamVjdF9zcGFjZTsKKwlpbmZvLT5mcmVlX3NwYWNlICs9IG9iamVjdF9zcGFjZTsKKwlpbmZvLT5sZW5ndGggKz0gb2JqZWN0X3NwYWNlOwogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2NvcHlfaXBhY2thZ2VfdG9fZXBhY2thZ2UKQEAgLTMzNiw1NSArMzE4LDUxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfY29weV9pcGFja2FnZV90b19lcGFja2FnZSAoCi0JdW5pb24gYWNwaV9v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gKHVuaW9uIGFjcGlfb2JqZWN0ICopCisJCQkJCQkJIHJldF9idWZmZXItPnBvaW50ZXIsCisJCQkJCQkJICgodTggKikgcmV0X2J1ZmZlci0+CisJCQkJCQkJICBwb2ludGVyICsKKwkJCQkJCQkgIEFDUElfUk9VTkRfVVBfVE9fTkFUSVZFX1dPUkQKKwkJCQkJCQkgIChzaXplb2YKKwkJCQkJCQkgICAodW5pb24KKwkJCQkJCQkgICAgYWNwaV9vYmplY3QpKSksCisJCQkJCQkJICZyZXRfYnVmZmVyLT5sZW5ndGgpOwogCQkvKgogCQkgKiBidWlsZCBzaW1wbGUgZG9lcyBub3QgaW5jbHVkZSB0aGUgb2JqZWN0IHNpemUgaW4gdGhlIGxlbmd0aAogCQkgKiBzbyB3ZSBhZGQgaXQgaW4gaGVyZQogCQkgKi8KLQkJcmV0X2J1ZmZlci0+bGVuZ3RoICs9IHNpemVvZiAodW5pb24gYWNwaV9vYmplY3QpOworCQlyZXRfYnVmZmVyLT5sZW5ndGggKz0gc2l6ZW9mKHVuaW9uIGFjcGlfb2JqZWN0KTsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9jb3B5X2VzaW1wbGVfdG9faXNpbXBsZQpAQCAtNDU1LDE1ICs0MzQsMTIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9jb3B5X2VzaW1wbGVfdG9faXNpbXBsZSAoCi0JdW5pb24gYWNwaV9vYmplY3QgICAgICAgICAgICA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R1cmUgaW1wbGVtZW50YXRpb24gKi8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02MjUsMzcgKzU5MiwzNSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfdXRfY29weV9lb2JqZWN0X3RvX2lvYmplY3QgKAotCXVuaW9uIGFjcGlfb2JqZWN0ICAgICAgICAgICAgICAgKmV4dGVybmFsX29iamVjdCwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqaW50ZXJuYWxfb2JqZWN0KQorYWNwaV91dF9jb3B5X2VvYmplY3RfdG9faW9iamVjdCh1bmlvbiBhY3BpX29iamVjdCAqZXh0ZXJuYWxfb2JqZWN0LAorCQkJCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKippbnRlcm5hbF9vYmplY3QpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgidXRfY29weV9lb2JqZWN0X3RvX2lvYmplY3QiKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X2NvcHlfZW9iamVjdF90b19pb2JqZWN0Iik7CiAKIAlpZiAoZXh0ZXJuYWxfb2JqZWN0LT50eXBlID09IEFDUElfVFlQRV9QQUNLQUdFKSB7CiAJCS8qCiAJCSAqIFBhY2thZ2VzIGFzIGV4dGVybmFsIGlucHV0IHRvIGNvbnRyb2wgbWV0aG9kcyBhcmUgbm90IHN1cHBvcnRlZCwKIAkJICovCi0JCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0VSUk9SLAotCQkJIlBhY2thZ2VzIGFzIHBhcmFtZXRlcnMgbm90IGltcGxlbWVudGVkIVxuIikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0VSUk9SLAorCQkJCSAgIlBhY2thZ2VzIGFzIHBhcmFtZXRlcnMgbm90IGltcGxlbWVudGVkIVxuIikpOwogCi0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfTk9UX0lNUExFTUVOVEVEKTsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX05PVF9JTVBMRU1FTlRFRCk7CiAJfQogCiAJZWxzZSB7CiAJCS8qCiAJCSAqIEJ1aWxkIGEgc2ltcGxlIG9iamVjdCAobm8gbmVzdGVkIG9iamVjdHMpCiAJCSAqLwotCQlzdGF0dXMgPSBhY3BpX3V0X2NvcHlfZXNpbXBsZV90b19pc2ltcGxlIChleHRlcm5hbF9vYmplY3QsIGludGVybmFsX29iamVjdCk7CisJCXN0YXR1cyA9CisJCSAgICBhY3BpX3V0X2NvcHlfZXNpbXBsZV90b19pc2ltcGxlKGV4dGVybmFsX29iamVjdCwKKwkJCQkJCSAgICBpbnRlcm5hbF9vYmplY3QpOwogCX0KIAotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2NvcHlfc2ltcGxlX29iamVjdApAQCAtNjcxLDgzICs2MzYsNzUgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9jb3B5X3NpbXBsZV9vYmplY3QgKAotCXVuaW9uIGFjcGlfb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Q1RJT046ICAgIGFjcGlfdXRfY29weV9pZWxlbWVudF90b19pZWxlbWVudApAQCAtNzgxLDI0ICs3MzcsMjEgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9jb3B5X2llbGVtZW50X3RvX2llbGVtZW50ICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdF90eXBlLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnNvdXJjZV9vYmplY3QsCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc3RhdGUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCkKK2FjcGlfdXRfY29weV9pZWxlbWVudF90b19pZWxlbWVudCh1OCBvYmplY3RfdHlwZSwKKwkJCQkgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnNvdXJjZV9vYmplY3QsCisJCQkJICB1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlLAorCQkJCSAgdm9pZCAqY29udGV4dCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc19pbmRleDsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqdGhpc190YXJnZXRfcHRyOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnRhcmdldF9vYmplY3Q7CisJYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7CisJdTMyIHRoaXNfaW5kZXg7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqKnRoaXNfdGFyZ2V0X3B0cjsKKwl1bmlvbiBhY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TUVNX0NBTExPQ0FURSAoKChhY3BpX3NpemUpIHNvdXJjZV9vYmplY3QtPnBhY2thZ2UuY291bnQgKyAxKSAqCi0JCQkJCSBzaXplb2YgKHZvaWQgKikpOworCQkgICAgQUNQSV9NRU1fQ0FMTE9DQVRFKCgoYWNwaV9zaXplKSBzb3VyY2Vfb2JqZWN0LT5wYWNrYWdlLgorCQkJCQljb3VudCArIDEpICogc2l6ZW9mKHZvaWQgKikpOwogCQlpZiAoIXRhcmdldF9vYmplY3QtPnBhY2thZ2UuZWxlbWVudHMpIHsKIAkJCXN0YXR1cyA9IEFFX05PX01FTU9SWTsKIAkJCWdvdG8gZXJyb3JfZXhpdDsKQEAgLTg2NiwxOSArODIxLDE3IEBACiAJCSp0aGlzX3RhcmdldF9wdHIgPSB0YXJnZXRfb2JqZWN0OwogCQlicmVhazsKIAotCiAJZGVmYXVsdDoKIAkJcmV0dXJuIChBRV9CQURfUEFSQU1FVEVSKTsKIAl9CiAKIAlyZXR1cm4gKHN0YXR1cyk7CiAKLWVycm9yX2V4aXQ6Ci0JYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlICh0YXJnZXRfb2JqZWN0KTsKKyAgICAgIGVycm9yX2V4aXQ6CisJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlKHRhcmdldF9vYmplY3QpOwogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2NvcHlfaXBhY2thZ2VfdG9faXBhY2thZ2UKQEAgLTg5NCw0OSArODQ3LDQ2IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfY29weV9pcGF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Y3BpX3V0X3dhbGtfcGFja2FnZV90cmVlIChzb3VyY2Vfb2JqLCBkZXN0X29iaiwKLQkJCSBhY3BpX3V0X2NvcHlfaWVsZW1lbnRfdG9faWVsZW1lbnQsIHdhbGtfc3RhdGUpOwotCWlmIChBQ1BJX0ZBSUxVUkUgKHN0YXR1cykpIHsKKwlzdGF0dXMgPSBhY3BpX3V0X3dhbGtfcGFja2FnZV90cmVlKHNvdXJjZV9vYmosIGRlc3Rfb2JqLAorCQkJCQkgICBhY3BpX3V0X2NvcHlfaWVsZW1lbnRfdG9faWVsZW1lbnQsCisJCQkJCSAgIHdhbGtfc3RhdGUpOworCWlmIChBQ1BJX0ZBSUxVUkUoc3RhdHVzKSkgewogCQkvKiBPbiBmYWlsdXJlLCBkZWxldGUgdGhlIGRlc3RpbmF0aW9uIHBhY2thZ2Ugb2JqZWN0ICovCiAKLQkJYWNwaV91dF9yZW1vdmVfcmVmZXJlbmNlIChkZXN0X29iaik7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShkZXN0X29iaik7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY29weV9pb2JqZWN0X3RvX2lvYmplY3QKQEAgLTk1MiwzNSArOTAyLDMxIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV91dF9jb3B5X2lvYmplY3RfdG9faW9iamVjdCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc291cmNlX2Rlc2MsCi0JdW5pb24g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pbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgidXRkZWJ1ZyIpCi0KK0FDUElfTU9EVUxFX05BTUUoInV0ZGVidWciKQogCiAjaWZkZWYgQUNQSV9ERUJVR19PVVRQVVQKK3N0YXRpYyB1MzIgYWNwaV9nYmxfcHJldl90aHJlYWRfaWQgPSAweEZGRkZGRkZGOworc3RhdGljIGNoYXIgKmFjcGlfZ2JsX2ZuX2VudHJ5X3N0ciA9ICItLS0tRW50cnkiOworc3RhdGljIGNoYXIgKmFjcGlfZ2JsX2ZuX2V4aXRfc3RyID0gIi0tLS1FeGl0LSI7CiAKLXN0YXRpYyB1MzIgICBhY3BpX2dibF9wcmV2X3RocmVhZF9pZCA9IDB4RkZGRkZGRkY7Ci1zdGF0aWMgY2hhciAgICAgKmFjcGlfZ2JsX2ZuX2VudHJ5X3N0ciA9ICItLS0tRW50cnkiOwotc3RhdGljIGNoYXIgICAgICphY3BpX2dibF9mbl9leGl0X3N0ciA9ICItLS0tRXhpdC0iOworLyogTG9jYWwgcHJvdG90eXBlcyAqLwogCitzdGF0aWMgY29uc3QgY2hhciAqYWNwaV91dF90cmltX2Z1bmN0aW9uX25hbWUoY29uc3QgY2hhciAqZnVuY3Rpb25fbmFtZSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNjgsMTcgKzY5LDEzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV91dF9pbml0X3N0YWNrX3B0cl90cmFjZSAoCi0Jdm9pZCkKK3ZvaWQgYWNwaV91dF9pbml0X3N0YWNrX3B0cl90cmFjZSh2b2lkKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3NwOworCXUzMiBjdXJyZW50X3NwOwogCi0KLQlhY3BpX2dibF9lbnRyeV9zdGFja19wb2ludGVyID0gQUNQSV9QVFJfRElGRiAoJmN1cnJlbnRfc3AsIE5VTEwpOworCWFjcGlfZ2JsX2VudHJ5X3N0YWNrX3BvaW50ZXIgPSBBQ1BJX1BUUl9ESUZGKCZjdXJyZW50X3NwLCBOVUxMKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3RyYWNrX3N0YWNrX3B0cgpAQCAtOTEsMTQgKzg4LDExIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV91dF90cmFja19zdGFja19wdHIgKAotCXZvaWQpCit2b2lkIGFjcGlfdXRfdHJhY2tfc3RhY2tfcHRyKHZvaWQpCiB7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfc3A7CisJYWNwaV9zaXplIGN1cnJlbnRfc3A7CiAKLQotCWN1cnJlbnRfc3AgPSBBQ1BJX1BUUl9ESUZGICgmY3VycmVudF9zcCwgTlVMTCk7CisJY3VycmVudF9zcCA9IEFDUElfUFRSX0RJRkYoJmN1cnJlbnRfc3AsIE5VTEwpOwogCiAJaWYgKGN1cnJlbnRfc3AgPCBhY3BpX2dibF9sb3dlc3Rfc3RhY2tfcG9pbnRlcikgewogCQlhY3BpX2dibF9sb3dlc3Rfc3RhY2tfcG9pbnRlciA9IGN1cnJlbnRfc3A7CkBAIC0xMDksNiArMTAzLDM5IEBACiAJfQogfQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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KwlpZiAoKihBQ1BJX0NBU1RfUFRSKHUzMiwgZnVuY3Rpb25fbmFtZSkpID09IEFDUElfUFJFRklYX0xPV0VSKSB7CisJCS8qIFRoaXMgaXMgdGhlIGNhc2Ugd2hlcmUgdGhlIHNvdXJjZSBoYXMgYmVlbiAnbGludXhpemVkJyAqLworCisJCXJldHVybiAoZnVuY3Rpb25fbmFtZSArIDUpOworCX0KKworCXJldHVybiAoZnVuY3Rpb25fbmFtZSk7Cit9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMTE2LDEwICsxNDMsOSBAQAogICoKICAqIFBBUkFNRVRFUlM6ICByZXF1ZXN0ZWRfZGVidWdfbGV2ZWwgLSBSZXF1ZXN0ZWQgZGVidWcgcHJpbnQgbGV2ZWwKICAqICAgICAgICAgICAgICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIgKGZvciBlcnJvciBvdXRwdXQpCi0gKiAgICAgICAgICAgICAgZGJnX2luZm8gICAgICAgICAgICAtIENvbnRhaW5zOgotICogICAgICAgICAgICAgICAgICBwcm9jX25hbWUgICAgICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lCi0gKiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKKyAqICAgICAgICAgICAgICBmdW5jdGlvbl9uYW1lICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKKyAqICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKKyAqICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElECiAgKiAgICAgICAgICAgICAgRm9ybWF0ICAgICAgICAgICAgICAtIFByaW50ZiBmb3JtYXQgZmllbGQKICAqICAgICAgICAgICAgICAuLi4gICAgICAgICAgICAgICAgIC0gT3B0aW9uYWwgcHJpbnRmIGFyZ3VtZW50cwogICoKQEAgLTEzMCwzNiArMTU2LDMzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCAgQUNQSV9JTlRFUk5BTF9WQVJfWEZBQ0UKLWFjcGlfdXRfZGVidWdfcHJpbnQgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkX2RlYnVnX2xldmVsLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0Jc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbyAgICAqZGJnX2luZm8sCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZm9ybWF0LAotCS4uLikKK3ZvaWQgQUNQSV9JTlRFUk5BTF9WQVJfWEZBQ0UKK2FjcGlfdXRfZGVidWdfcHJpbnQodTMyIHJlcXVlc3RlZF9kZWJ1Z19sZXZlbCwKKwkJICAgIHUzMiBsaW5lX251bWJlciwKKwkJICAgIGNvbnN0IGNoYXIgKmZ1bmN0aW9uX25hbWUsCisJCSAgICBjaGFyICptb2R1bGVfbmFtZSwgdTMyIGNvbXBvbmVudF9pZCwgY2hhciAqZm9ybWF0LCAuLi4pCiB7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJlYWRfaWQ7Ci0JdmFfbGlzdCAgICAgICAgICAgICAgICAgYXJnczsKLQorCXUzMiB0aHJlYWRfaWQ7CisJdmFfbGlzdCBhcmdzOwogCiAJLyoKIAkgKiBTdGF5IHNpbGVud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ZGVidWdfbGV2ZWwgLSBSZXF1ZXN0ZWQgZGVidWcgcHJpbnQgbGV2ZWwKICAqICAgICAgICAgICAgICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIKLSAqICAgICAgICAgICAgICBkYmdfaW5mbyAgICAgICAgICAgIC0gQ29udGFpbnM6Ci0gKiAgICAgICAgICAgICAgICAgIHByb2NfbmFtZSAgICAgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQotICogICAgICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAorICogICAgICAgICAgICAgIGZ1bmN0aW9uX25hbWUgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQorICogICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQorICogICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKICAqICAgICAgICAgICAgICBGb3JtYXQgICAgICAgICAgICAgIC0gUHJpbnRmIGZvcm1hdCBmaWVsZAogICogICAgICAgICAgICAgIC4uLiAgICAgICAgICAgICAgICAgLSBPcHRpb25hbCBwcmludGYgYXJndW1lbnRzCiAgKgpAQCAtMjA0LDM3ICsyMjcsMzMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkICBBQ1BJX0lOVEVSTkFMX1ZBUl9YRkFDRQotYWNwaV91dF9kZWJ1Z19wcmludF9yYXcgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkX2RlYnVnX2xldmVs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qKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF90cmFjZQogICoKICAqIFBBUkFNRVRFUlM6ICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIKLSAqICAgICAgICAgICAgICBkYmdfaW5mbyAgICAgICAgICAgIC0gQ29udGFpbnM6Ci0gKiAgICAgICAgICAgICAgICAgIHByb2NfbmFtZSAgICAgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQotICogICAgICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAorICogICAgICAgICAgICAgIGZ1bmN0aW9uX25hbWUgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQorICogICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQorICogICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQogICoKQEAgLTI0NCwyOSArMjYzLDI4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2lkCi1hY3BpX3V0X3RyYWNlICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXN0cnVjdCBhY3BpX2RlYnVnX3ByaW50X2luZm8gICAgKmRiZ19pbmZvKQorYWNwaV91dF90cmFjZSh1MzIgbGluZV9udW1iZXIsCisJICAgICAgY29uc3QgY2hhciAqZnVuY3Rpb25fbmFtZSwgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQpCiB7CiAKIAlhY3BpX2dibF9uZXN0aW5nX2xldmVsKys7Ci0JYWNwaV91dF90cmFja19zdGFja19wdHIgKCk7CisJYWNwaV91dF90cmFja19zdGFja19wdHIoKTsKIAotCWFjcGlfdXRfZGVidWdfcHJpbnQgKEFDUElfTFZfRlVOQ1RJT05TLCBsaW5lX251bWJlciwgZGJnX2luZm8sCi0JCQkiJXNcbiIsIGFjcGlfZ2JsX2ZuX2VudHJ5X3N0cik7CisJYWNwaV91dF9kZWJ1Z19wcmludChBQ1BJX0xWX0ZVTkNUSU9OUywKKwkJCSAgICBsaW5lX251bWJlciwgZnVuY3Rpb25fbmFtZSwgbW9kdWxlX25hbWUsCisJCQkgICAgY29tcG9uZW50X2lkLCAiJXNcbiIsIGFjcGlfZ2JsX2ZuX2VudHJ5X3N0cik7CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfdXRfdHJhY2UpOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfdXRfdHJhY2UpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3RyYWNlX3B0cgogICoKICAqIFBBUkFNRVRFUlM6ICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIKLSAqICAgICAgICAgICAgICBkYmdfaW5mbyAgICAgICAgICAgIC0gQ29udGFpbnM6Ci0gKiAgICAgICAgICAgICAgICAgIHByb2NfbmFtZSAgICAgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQotICogICAgICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAorICogICAgICAgICAgICAgIGZ1bmN0aW9uX25hbWUgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQorICogICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQorICogICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKICAqICAgICAgICAgICAgICBQb2ludGVyICAgICAgICAgICAgIC0gUG9pbnRlciB0byBkaXNwbGF5CiAgKgogICogUkVUVVJOOiAgICAgIE5vbmUKQEAgLTI3NywyOCArMjk1LDI3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2lkCi1hY3BpX3V0X3RyYWNlX3B0ciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQlzdHJ1Y3QgYWNwaV9kZWJ1Z19wcmludF9pbmZvICAgICpkYmdfaW5mbywKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwb2ludGVyKQorYWNwaV91dF90cmFjZV9wdHIodTMyIGxpbmVfbnVtYmVyLAorCQkgIGNvbnN0IGNoYXIgKmZ1bmN0aW9uX25hbWUsCisJCSAgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQsIHZvaWQgKnBvaW50ZXIpCiB7CiAJYWNwaV9nYmxfbmVzdGluZ19sZXZlbCsrOwotCWFjcGlfdXRfdHJhY2tfc3RhY2tfcHRyICgpOworCWFjcGlfdXRfdHJhY2tfc3RhY2tfcHRyKCk7CiAKLQlhY3BpX3V0X2RlYnVnX3ByaW50IChBQ1BJX0xWX0ZVTkNUSU9OUywgbGluZV9udW1iZXIsIGRiZ19pbmZvLAotCQkJIiVzICVwXG4iLCBhY3BpX2dibF9mbl9lbnRyeV9zdHIsIHBvaW50ZXIpOworCWFjcGlfdXRfZGVidWdfcHJpbnQoQUNQSV9MVl9GVU5DVElPTlMsCisJCQkgICAgbGluZV9udW1iZXIsIGZ1bmN0aW9uX25hbWUsIG1vZHVsZV9uYW1lLAorCQkJICAgIGNvbXBvbmVudF9pZCwgIiVzICVwXG4iLCBhY3BpX2dibF9mbl9lbnRyeV9zdHIsCisJCQkgICAgcG9pbnRlcik7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF90cmFjZV9zdHIKICAqCiAgKiBQQVJBTUVURVJTOiAgbGluZV9udW1iZXIgICAgICAgICAtIENhbGxlcidzIGxpbmUgbnVtYmVyCi0gKiAgICAgICAgICAgICAgZGJnX2luZm8gICAgICAgICAgICAtIENvbnRhaW5zOgotICogICAgICAgICAgICAgICAgICBwcm9jX25hbWUgICAgICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lCi0gKiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKKyAqICAgICAgICAgICAgICBmdW5jdGlvbl9uYW1lICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKKyAqICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKKyAqICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElECiAgKiAgICAgICAgICAgICAgU3RyaW5nICAgICAgICAgICAgICAtIEFkZGl0aW9uYWwgc3RyaW5nIHRvIGRpc3BsYXkKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQpAQCAtMzA5LDI5ICszMjYsMjggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHZvaWQKLWFjcGlfdXRfdHJhY2Vfc3RyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXN0cnVjdCBhY3BpX2RlYnVnX3ByaW50X2luZm8gICAgKmRiZ19pbmZvLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnN0cmluZykKK2FjcGlfdXRfdHJhY2Vfc3RyKHUzMiBsaW5lX251bWJlciwKKwkJICBjb25zdCBjaGFyICpmdW5jdGlvbl9uYW1lLAorCQkgIGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgY29tcG9uZW50X2lkLCBjaGFyICpzdHJpbmcpCiB7CiAKIAlhY3BpX2dibF9uZXN0aW5nX2xldmVsKys7Ci0JYWNwaV91dF90cmFja19zdGFja19wdHIgKCk7CisJYWNwaV91dF90cmFja19zdGFja19wdHIoKTsKIAotCWFjcGlfdXRfZGVidWdfcHJpbnQgKEFDUElfTFZfRlVOQ1RJT05TLCBsaW5lX251bWJlciwgZGJnX2luZm8sCi0JCQkiJXMgJXNcbiIsIGFjcGlfZ2JsX2ZuX2VudHJ5X3N0ciwgc3RyaW5nKTsKKwlhY3BpX3V0X2RlYnVnX3ByaW50KEFDUElfTFZfRlVOQ1RJT05TLAorCQkJICAgIGxpbmVfbnVtYmVyLCBmdW5jdGlvbl9uYW1lLCBtb2R1bGVfbmFtZSwKKwkJCSAgICBjb21wb25lbnRfaWQsICIlcyAlc1xuIiwgYWNwaV9nYmxfZm5fZW50cnlfc3RyLAorCQkJICAgIHN0cmluZyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF90cmFjZV91MzIKICAqCiAgKiBQQVJBTUVURVJTOiAgbGluZV9udW1iZXIgICAgICAgICAtIENhbGxlcidzIGxpbmUgbnVtYmVyCi0gKiAgICAgICAgICAgICAgZGJnX2luZm8gICAgICAgICAgICAtIENvbnRhaW5zOgotICogICAgICAgICAgICAgICAgICBwcm9jX25hbWUgICAgICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lCi0gKiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKKyAqICAgICAgICAgICAgICBmdW5jdGlvbl9uYW1lICAgICAgIC0gQ2FsbGVyJ3MgcHJvY2VkdXJlIG5hbWUKKyAqICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKKyAqICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElECiAgKiAgICAgICAgICAgICAgSW50ZWdlciAgICAgICAgICAgICAtIEludGVnZXIgdG8gZGlzcGxheQogICoKICAqIFJFVFVSTjogICAgICBOb25lCkBAIC0zNDIsMjkgKzM1OCwyOCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV91dF90cmFjZV91MzIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0Jc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbyAgICAqZGJnX2luZm8sCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyKQorYWNwaV91dF90cmFjZV91MzIodTMyIGxpbmVfbnVtYmVyLAorCQkgIGNvbnN0IGNoYXIgKmZ1bmN0aW9uX25hbWUsCisJCSAgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQsIHUzMiBpbnRlZ2VyKQogewogCiAJYWNwaV9nYmxfbmVzdGluZ19sZXZlbCsrOwotCWFjcGlfdXRfdHJhY2tfc3RhY2tfcHRyICgpOworCWFjcGlfdXRfdHJhY2tfc3RhY2tfcHRyKCk7CiAKLQlhY3BpX3V0X2RlYnVnX3ByaW50IChBQ1BJX0xWX0ZVTkNUSU9OUywgbGluZV9udW1iZXIsIGRiZ19pbmZvLAotCQkJIiVzICUwOFhcbiIsIGFjcGlfZ2JsX2ZuX2VudHJ5X3N0ciwgaW50ZWdlcik7CisJYWNwaV91dF9kZWJ1Z19wcmludChBQ1BJX0xWX0ZVTkNUSU9OUywKKwkJCSAgICBsaW5lX251bWJlciwgZnVuY3Rpb25fbmFtZSwgbW9kdWxlX25hbWUsCisJCQkgICAgY29tcG9uZW50X2lkLCAiJXMgJTA4WFxuIiwgYWNwaV9nYmxfZm5fZW50cnlfc3RyLAorCQkJICAgIGludGVnZXIpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZXhpdAogICoKICAqIFBBUkFNRVRFUlM6ICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIKLSAqICAgICAgICAgICAgICBkYmdfaW5mbyAgICAgICAgICAgIC0gQ29udGFpbnM6Ci0gKiAgICAgICAgICAgICAgICAgIHByb2NfbmFtZSAgICAgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQotICogICAgICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAorICogICAgICAgICAgICAgIGZ1bmN0aW9uX25hbWUgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQorICogICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQorICogICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQogICoKQEAgLTM3NCwyOCArMzg5LDI3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2lkCi1hY3BpX3V0X2V4aXQgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0Jc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbyAgICAqZGJnX2luZm8pCithY3BpX3V0X2V4aXQodTMyIGxpbmVfbnVtYmVyLAorCSAgICAgY29uc3QgY2hhciAqZnVuY3Rpb25fbmFtZSwgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQpCiB7CiAKLQlhY3BpX3V0X2RlYnVnX3ByaW50IChBQ1BJX0xWX0ZVTkNUSU9OUywgbGluZV9udW1iZXIsIGRiZ19pbmZvLAotCQkJIiVzXG4iLCBhY3BpX2dibF9mbl9leGl0X3N0cik7CisJYWNwaV91dF9kZWJ1Z19wcmludChBQ1BJX0xWX0ZVTkNUSU9OUywKKwkJCSAgICBsaW5lX251bWJlciwgZnVuY3Rpb25fbmFtZSwgbW9kdWxlX25hbWUsCisJCQkgICAgY29tcG9uZW50X2lkLCAiJXNcbiIsIGFjcGlfZ2JsX2ZuX2V4aXRfc3RyKTsKIAogCWFjcGlfZ2JsX25lc3RpbmdfbGV2ZWwtLTsKIH0KLUVYUE9SVF9TWU1CT0woYWNwaV91dF9leGl0KTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX3V0X2V4aXQpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3N0YXR1c19leGl0CiAgKgogICogUEFSQU1FVEVSUzogIGxpbmVfbnVtYmVyICAgICAgICAgLSBDYWxsZXIncyBsaW5lIG51bWJlcgotICogICAgICAgICAgICAgIGRiZ19pbmZvICAgICAgICAgICAgLSBDb250YWluczoKLSAqICAgICAgICAgICAgICAgICAgcHJvY19uYW1lICAgICAgICAgICAtIENhbGxlcidzIHByb2NlZHVyZSBuYW1lCi0gKiAgICAgICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQotICogICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElECisgKiAgICAgICAgICAgICAgZnVuY3Rpb25fbmFtZSAgICAgICAtIENhbGxlcidzIHByb2NlZHVyZSBuYW1lCisgKiAgICAgICAgICAgICAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lCisgKiAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAogICogICAgICAgICAgICAgIFN0YXR1cyAgICAgICAgICAgICAgLSBFeGl0IHN0YXR1cyBjb2RlCiAgKgogICogUkVUVVJOOiAgICAgIE5vbmUKQEAgLTQwNiwzNyArNDIwLDM4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2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GFjcGlfZ2JsX2ZuX2V4aXRfc3RyLAorCQkJCSAgICBhY3BpX2Zvcm1hdF9leGNlcHRpb24oc3RhdHVzKSk7CisJfSBlbHNlIHsKKwkJYWNwaV91dF9kZWJ1Z19wcmludChBQ1BJX0xWX0ZVTkNUSU9OUywKKwkJCQkgICAgbGluZV9udW1iZXIsIGZ1bmN0aW9uX25hbWUsIG1vZHVsZV9uYW1lLAorCQkJCSAgICBjb21wb25lbnRfaWQsICIlcyAqKioqRXhjZXB0aW9uKioqKjogJXNcbiIsCisJCQkJICAgIGFjcGlfZ2JsX2ZuX2V4aXRfc3RyLAorCQkJCSAgICBhY3BpX2Zvcm1hdF9leGNlcHRpb24oc3RhdHVzKSk7CiAJfQogCiAJYWNwaV9nYmxfbmVzdGluZ19sZXZlbC0tOwogfQotRVhQT1JUX1NZTUJPTChhY3BpX3V0X3N0YXR1c19leGl0KTsKIAorRVhQT1JUX1NZTUJPTChhY3BpX3V0X3N0YXR1c19leGl0KTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF92YWx1ZV9leGl0CiAgKgogICogUEFSQU1FVEVSUzogIGxpbmVfbnVtYmVyICAgICAgICAgLSBDYWxsZXIncyBsaW5lIG51bWJlcgotICogICAgICAgICAgICAgIGRiZ19pbmZvICAgICAgICAgICAgLSBDb250YWluczoKLSAqICAgICAgICAgICAgICAgICAgcHJvY19uYW1lICAgICAgICAgICAtIENhbGxlcidzIHByb2NlZHVyZSBuYW1lCi0gKiAgICAgICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQotICogICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElECisgKiAgICAgICAgICAgICAgZnVuY3Rpb25fbmFtZSAgICAgICAtIENhbGxlcidzIHByb2NlZHVyZSBuYW1lCisgKiAgICAgICAgICAgICAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lCisgKiAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAogICogICAgICAgICAgICAgIFZhbHVlICAgICAgICAgICAgICAgLSBWYWx1ZSB0byBiZSBwcmludGVkIHdpdGggZXhpdCBtc2cKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQpAQCAtNDQ3LDMwICs0NjIsMjkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHZvaWQKLWFjcGlfdXRfdmFsdWVfZXhpdCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQlzdHJ1Y3QgYWNwaV9kZWJ1Z19wcmludF9pbmZvICAgICpkYmdfaW5mbywKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIHZhbHVlKQorYWNwaV91dF92YWx1ZV9leGl0KHUzMiBsaW5lX251bWJlciwKKwkJICAgY29uc3QgY2hhciAqZnVuY3Rpb25fbmFtZSwKKwkJICAgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQsIGFjcGlfaW50ZWdlciB2YWx1ZSkKIHsKIAotCWFjcGlfdXRfZGVidWdfcHJpbnQgKEFDUElfTFZfRlVOQ1RJT05TLCBsaW5lX251bWJlciwgZGJnX2luZm8sCi0JCQkiJXMgJTguOFglOC44WFxuIiwgYWNwaV9nYmxfZm5fZXhpdF9zdHIsCi0JCQlBQ1BJX0ZPUk1BVF9VSU5UNjQgKHZhbHVlKSk7CisJYWNwaV91dF9kZWJ1Z19wcmludChBQ1BJX0xWX0ZVTkNUSU9OUywKKwkJCSAgICBsaW5lX251bWJlciwgZnVuY3Rpb25fbmFtZSwgbW9kdWxlX25hbWUsCisJCQkgICAgY29tcG9uZW50X2lkLCAiJXMgJTguOFglOC44WFxuIiwKKwkJCSAgICBhY3BpX2dibF9mbl9leGl0X3N0ciwgQUNQSV9GT1JNQVRfVUlOVDY0KHZhbHVlKSk7CiAKIAlhY3BpX2dibF9uZXN0aW5nX2xldmVsLS07CiB9Ci1FWFBPUlRfU1lNQk9MKGFjcGlfdXRfdmFsdWVfZXhpdCk7CiAKK0VYUE9SVF9TWU1CT0woYWNwaV91dF92YWx1ZV9leGl0KTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9wdHJfZXhpdAogICoKICAqIFBBUkFNRVRFUlM6ICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIKLSAqICAgICAgICAgICAgICBkYmdfaW5mbyAgICAgICAgICAgIC0gQ29udGFpbnM6Ci0gKiAgICAgICAgICAgICAgICAgIHByb2NfbmFtZSAgICAgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQotICogICAgICAgICAgICAgICAgICBtb2R1bGVfbmFtZSAgICAgICAgIC0gQ2FsbGVyJ3MgbW9kdWxlIG5hbWUKLSAqICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRAorICogICAgICAgICAgICAgIGZ1bmN0aW9uX25hbWUgICAgICAgLSBDYWxsZXIncyBwcm9jZWR1cmUgbmFtZQorICogICAgICAgICAgICAgIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZQorICogICAgICAgICAgICAgIGNvbXBvbmVudF9pZCAgICAgICAgLSBDYWxsZXIncyBjb21wb25lbnQgSUQKICAqICAgICAgICAgICAgICBQdHIgICAgICAgICAgICAgICAgIC0gUG9pbnRlciB0byBkaXNwbGF5CiAgKgogICogUkVUVVJOOiAgICAgIE5vbmUKQEAgLTQ4MSwyMSArNDk1LDIwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2lkCi1hY3BpX3V0X3B0cl9leGl0ICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXN0cnVjdCBhY3BpX2RlYnVnX3ByaW50X2luZm8gICAgKmRiZ19pbmZvLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnB0cikKK2FjcGlfdXRfcHRyX2V4aXQodTMyIGxpbmVfbnVtYmVyLAorCQkgY29uc3QgY2hhciAqZnVuY3Rpb25fbmFtZSwKKwkJIGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgY29tcG9uZW50X2lkLCB1OCAqIHB0cikKIHsKIAotCWFjcGlfdXRfZGVidWdfcHJpbnQgKEFDUElfTFZfRlVOQ1RJT05TLCBsaW5lX251bWJlciwgZGJnX2luZm8sCi0JCQkiJXMgJXBcbiIsIGFjcGlfZ2JsX2ZuX2V4aXRfc3RyLCBwdHIpOworCWFjcGlfdXRfZGVidWdfcHJpbnQoQUNQSV9MVl9GVU5DVElPTlMsCisJCQkgICAgbGluZV9udW1iZXIsIGZ1bmN0aW9uX25hbWUsIG1vZHVsZV9uYW1lLAorCQkJICAgIGNvbXBvbmVudF9pZCwgIiVzICVwXG4iLCBhY3BpX2dibF9mbl9leGl0X3N0ciwgcHRyKTsKIAogCWFjcGlfZ2JsX25lc3RpbmdfbGV2ZWwtLTsKIH0KIAogI2VuZGlmCiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9kdW1wX2J1ZmZlcgpAQCAtNTExLDIzICs1MjQsMTcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X2R1bXBfYnVmZmVyICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXksCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQpCit2b2lkIGFjcGlfdXRfZHVtcF9idWZmZXIodTggKiBidWZmZXIsIHUzMiBjb3VudCwgdTMyIGRpc3BsYXksIHUzMiBjb21wb25lbnRfaWQpCiB7Ci0JYWNwaV9uYXRpdmVfdWludCAgICAgICAgICAgICAgICBpID0gMDsKLQlhY3BpX25hdGl2ZV91aW50ICAgICAgICAgICAgICAgIGo7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wMzI7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZfY2hhcjsKLQorCWFjcGlfbmF0aXZlX3VpbnQgaSA9IDA7CisJYWNwaV9uYXRpdmVfdWludCBqOworCXUzMiB0ZW1wMzI7CisJdTggYnVmX2NoYXI7CiAKIAkvKiBPbmx5IGR1bXAgdGhlIGJ1ZmZlciBpZiB0cmFjaW5nIGlzIGVuYWJsZWQgKi8KIAogCWlmICghKChBQ1BJX0xWX1RBQkxFUyAmIGFjcGlfZGJnX2xldmVsKSAmJgotCQkoY29tcG9uZW50X2lkICYgYWNwaV9kYmdfbGF5ZXIpKSkgeworCSAgICAgIChjb21wb25lbnRfaWQgJiBhY3BpX2RiZ19sYXllcikpKSB7CiAJCXJldHVybjsKIAl9CiAKQEAgLTU0MCw3IC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N0ICAgICAgICpvYmplY3QsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24pOwotCithY3BpX3V0X3VwZGF0ZV9yZWZfY291bnQodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqZWN0LCB1MzIgYWN0aW9uKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03NiwxOCArNjksMTQgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZAotYWNwaV91dF9kZWxldGVfaW50ZXJuYWxfb2JqICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmplY3QpCitzdGF0aWMgdm9pZCBhY3BpX3V0X2RlbGV0ZV9pbnRlcm5hbF9vYmoodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb2JqZWN0KQogewotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm9ial9wb2ludGVyID0gTlVMTDsKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpoYW5kbGVyX2Rlc2M7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc2Vjb25kX2Rlc2M7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqbmV4dF9kZXNjOworCXZvaWQgKm9ial9wb2ludGVyID0gTlVMTDsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpoYW5kbGVyX2Rlc2M7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqc2Vjb25kX2Rlc2M7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqbmV4dF9kZXNjOwogCi0KLQlBQ1BJX0ZVT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fVk9JRDsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9pbnRlcm5hbF9vYmplY3RfbGlzdApAQCAtMjcyLDI5ICsyNTksMjQgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X2RlbGV0ZV9pbnRlcm5hbF9vYmplY3RfbGlzdCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKm9ial9saXN0KQordm9pZCBhY3BpX3V0X2RlbGV0ZV9pbnRlcm5hbF9vYmplY3RfbGlzdCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICoqb2JqX2xpc3QpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKmludGVybmFsX29iajsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICoqaW50ZXJuYWxfb2JqOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgidXRfZGVsZXRlX2ludGVybmFsX29iamVjdF9saXN0Iik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJ1dF9kZWxldGVfaW50ZXJuYWxfb2JqZWN0X2xpc3QiKTsKIAogCS8qIFdhbGsgdGhlIG51bGwtdGVybWluYXRlZCBpbnRlcm5hbCBsaXN0ICovCiAKIAlmb3IgKGludGVybmFsX29iaiA9IG9ial9saXN0OyAqaW50ZXJuYWxfb2JqOyBpbnRlcm5hbF9vYmorKykgewotCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UgKCppbnRlcm5hbF9vYmopOworCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UoKmludGVybmFsX29iaik7CiAJfQogCiAJLyogRnJlZSB0aGUgY29tYmluZWQgcGFyYW1ldGVyIHBvaW50ZXIgbGlzdCBhbmQgb2JqZWN0IGFycmF5ICovCiAKLQlBQ1BJX01FTV9GUkVFIChvYmpfbGlzdCk7CisJQUNQSV9NRU1fRlJFRShvYmpfbGlzdCk7CiAJcmV0dXJuX1ZPSUQ7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF91cGRhdGVfcmVmX2NvdW50CkBAIC0zMDksMTYgKzI5MSwxMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIHZvaWQKLWFjcGlfdXRfdXBkYXRlX3JlZl9jb3VudCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqZWN0LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uKQorYWNwaV91dF91cGRhdGVfcmVmX2NvdW50KHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9iamVjdCwgdTMyIGFjdGlvbikKIHsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50OwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NvdW50OworCXUxNiBjb3VudDsKKwl1MTYgbmV3X2NvdW50OwogCi0KLQlBQ1BJX0ZVTkNUSU9OX05BTUUgKCJ1dF91cGRhdGVfcmVmX2NvdW50Iik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX05BTUUoInV0X3VwZGF0ZV9yZWZfY291bnQiKTsKIAogCWlmICghb2JqZWN0KSB7CiAJCXJldHVybjsKQEAgLTMzOCw1OCArMzE2LDU1IEBACiAJCW5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PSVYLCBGb3JjZSBkZWxldGUhIChTZXQgdG8gMClcbiIsCisJCQkJICBvYmplY3QsIGNvdW50KSk7CiAKIAkJbmV3X2NvdW50ID0gMDsKIAkJb2JqZWN0LT5jb21tb24ucmVmZXJlbmNlX2NvdW50ID0gbmV3X2NvdW50OwotCQlhY3BpX3V0X2RlbGV0ZV9pbnRlcm5hbF9vYmogKG9iamVjdCk7CisJCWFjcGlfdXRfZGVsZXRlX2ludGVybmFsX29iaihvYmplY3QpOwogCQlicmVhazsKIAotCiAJZGVmYXVsdDoKIAotCQlBQ1BJX0RFQlVHX1BSSU5UICgoQUNQSV9EQl9FUlJPUiwgIlVua25vd24gYWN0aW9uICglWClcbiIsIGFjdGlvbikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0VSUk9SLCAiVW5rbm93biBhY3Rpb24gKCVYKVxuIiwKKwkJCQkgIGFjdGlvbikpOwogCQlicmVhazsKIAl9CiAKQEAgLTM5OSwxNSArMzc0LDE0IEBACiAJICovCiAJaWYgKGNvdW50ID4gQUNQSV9NQVhfUkVGRVJFTkNFX0NPVU5UKSB7CiAKLQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfV0FSTiwKLQkJCSIqKioqIFdhcm5pbmcgKioqKiBMYXJnZSBSZWZlcmVuY2UgQ291bnQgKCVYKSBpbiBvYmplY3QgJXBcblxuIiwKLQkJCWNvdW50LCBvYmplY3QpKTsKKwkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9XQVJOLAorCQkJCSAgIioqKiogV2FybmluZyAqKioqIExhcmdlIFJlZmVyZW5jZSBDb3VudCAoJVgpIGluIG9iamVjdCAlcFxuXG4iLAorCQkJCSAgY291bnQsIG9iamVjdCkpOwogCX0KIAogCXJldHVybjsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUS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LAotCXN0cnVjdCBhY3BpX2NvbXBhdGlibGVfaWQgICAgICAgKm9uZV9jaWQpOwotCithY3BpX3V0X3RyYW5zbGF0ZV9vbmVfY2lkKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjLAorCQkJICBzdHJ1Y3QgYWNwaV9jb21wYXRpYmxlX2lkICpvbmVfY2lkKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03NywzNyArNjksMzMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV91dF9vc2lfaW1wbGVtZW50YXRpb24gKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgKndhbGtfc3RhdGUpCithY3BpX3N0YXR1cyBhY3BpX3V0X29zaV9pbXBsZW1lbnRhdGlvbihzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlKQogewotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnN0cmluZ19kZXNjOwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnJldHVybl9kZXNjOwotCWFjcGlfbmF0aXZlX3VpbnQgICAgICAgICAgICAgICAgaTsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpzdHJpbmdfZGVzYzsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpyZXR1cm5fZGVzYzsKKwlhY3BpX25hdGl2ZV91aW50IGk7CiAKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJ1dF9vc2lfaW1wbGVtZW50YXRpb24iKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X29zaV9pbXBsZW1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kJIChjaGFyICopYWNwaV9nYmxfdmFsaWRfb3NpX3N0cmluZ3NbaV0pKSB7CiAJCQkvKiBUaGlzIHN0cmluZyBpcyBzdXBwb3J0ZWQgKi8KIAogCQkJcmV0dXJuX2Rlc2MtPmludGVnZXIudmFsdWUgPSAweEZGRkZGRkZGOwpAQCAtMTE2LDEwICsxMDQsOSBAQAogCX0KIAogCXdhbGtfc3RhdGUtPnJldHVybl9kZXNjID0gcmV0dXJuX2Rlc2M7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9DVFJMX1RFUk1JTkFURSk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX0NUUkxfVEVSTUlOQVRFKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2V2YWx1YXRlX29iamVjdApAQCAtMTQwLDE5ICsxMjcsMTYgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2V2YWx1YXRlX29iamVjdCAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqcHJlZml4X25vZGUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cGVjdGVkX3JldHVybl9idHlwZXMsCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqKnJldHVybl9kZXNjKQorYWNwaV91dF9ldmFsdWF0ZV9vYmplY3Qoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKnByZWZpeF9ub2RlLAorCQkJY2hhciAqcGF0aCwKKwkJCXUzMiBleHBlY3RlZF9yZXR1cm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ldGUgdGhlIHJldHVybiBvYmplY3QgKi8KIAotCQlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2UgKGluZm8ucmV0dXJuX29iamVjdCk7Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfVFlQRSk7CisJCWFjcGlfdXRfcmVtb3ZlX3JlZmVyZW5jZShpbmZvLnJldHVybl9vYmplY3QpOworCQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfVFlQRSk7CiAJfQogCiAJLyogT2JqZWN0IHR5cGUgaXMgT0ssIHJldHVybiBpdCAqLwogCiAJKnJldHVybl9kZXNjID0gaW5mby5yZXR1cm5fb2JqZWN0OwotCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfT0spOworCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9ldmFsdWF0ZV9udW1lcmljX29iamVjdApAQCAtMjY0LDIyICsyNTAsMTkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2V2YWx1YXRlX251bWVyaWNfb2JqZWN0ICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmplY3RfbmFtZSwKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpkZXZpY2Vfbm9kZSwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICphZGRyZXNzKQorYWNwaV91dF9ldmFsdWF0ZV9udW1lcmljX29iamVjdChjaGFyICpvYmplY3RfbmFtZSwKKwkJCQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqZGV2aW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3RhdHVzKTsKKwlhY3BpX3V0X3JlbW92ZV9yZWZlcmVuY2Uob2JqX2Rlc2MpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY29weV9pZF9zdHJpbmcKQEAgLTMxMCwxMCArMjkyLDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB2b2lkCi1hY3BpX3V0X2NvcHlfaWRfc3RyaW5nICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkZXN0aW5hdGlvbiwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzb3VyY2UsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBtYXhfbGVuZ3RoKQorYWNwaV91dF9jb3B5X2lkX3N0cmluZyhjaGFyICpkZXN0aW5hdGlvbiwgY2hhciAqc291cmNlLCBhY3BpX3NpemUgbWF4X2xlbmd0aCkKIHsKIAogCS8qCkBAIC0zMjgsMTAgKzMwNyw5IEBACiAKIAkvKiBEbyB0aGUgYWN0dWFsIGNvcHkgKi8KIAotCUFDUElfU1RSTkNQWSAoZGVzdGluYXRpb24sIHNvdXJjZSwgbWF4X2xlbmd0aCk7CisJQUNQSV9TVFJOQ1BZKGRlc3RpbmF0aW9uLCBzb3VyY2UsIG1heF9sZW5ndGgpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZXhlY3V0ZV9ISUQKQEAgLTM0OSw0MiArMzI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T52YWx1ZSk7CisJCWFjcGlfZXhfZWlzYV9pZF90b19zdHJpbmcoKHUzMikgb2JqX2Rlc2MtPmludGVnZXIudmFsdWUsCisJCQkJCSAgb25lX2NpZC0+dmFsdWUpOwogCQlyZXR1cm4gKEFFX09LKTsKIAogCWNhc2UgQUNQSV9UWVBFX1NUUklORzoKQEAgLTQyNSw4ICszOTksOCBAQAogCiAJCS8qIENvcHkgdGhlIFN0cmluZyBDSUQgZnJvbSB0aGUgcmV0dXJuZWQgb2JqZWN0ICovCiAKLQkJYWNwaV91dF9jb3B5X2lkX3N0cmluZyAob25lX2NpZC0+dmFsdWUsIG9ial9kZXNjLT5zdHJpbmcucG9pbnRlciwKLQkJCQlBQ1BJX01BWF9DSURfTEVOR1RIKTsKKwkJYWNwaV91dF9jb3B5X2lkX3N0cmluZyhvbmVfY2lkLT52YWx1ZSwgb2JqX2Rlc2MtPnN0cmluZy5wb2ludGVyLAorCQkJCSAgICAgICBBQ1BJX01BWF9DSURfTEVOR1RIKTsKIAkJcmV0dXJuIChBRV9PSyk7CiAKIAlkZWZhdWx0OgpAQCAtNDM1LDcgKzQwOSw2IEBACiAJfQogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZXhlY3V0ZV9DSUQKQEAgLTQ1Myw0NSArNDI2LDQyIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV91dF9leGVjdXRlX0NJRCAoCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAqZGV2aWNlX25vZGUsCi0Jc3RydWN0IGFjcGlfY29tcGF0aWJsZV9pZF9saXN0ICoqcmV0dXJuX2NpZF9saXN0KQorYWN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KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZXhlY3V0ZV9TeGRzCkBAIC02NjUsNDQgKzYyNiw0NSBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfdXRfZXhlY3V0ZV9zeGRzICgKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpkZXZpY2Vfbm9kZSwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoaWdoZXN0KQorYWNwaV91dF9leGVjdXRlX3N4ZHMoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKmRldmljZV9ub2RlLCB1OCAqIGhpZ2hlc3QpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2M7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKwl1MzIgaTsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X2V4ZWN1dGVfU3hkcyIpOwotCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidXRfZXhlY3V0ZV9TeGRzIik7CiAKIAlmb3IgKGkgPSAwOyBpIDwgNDsgaSsrKSB7CiAJCWhpZ2hlc3RbaV0gPSAweEZGOwotCQlzdGF0dXMgPSBhY3BpX3V0X2V2YWx1YXRlX29iamVjdCAoZGV2aWNlX25vZGUsCi0JCQkJIChjaGFyICopIGFjcGlfZ2J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YUE9SVF9TWU1CT0woYWNwaV9kYmdfbGV2ZWwpOwogCiAvKiBEZWJ1ZyBzd2l0Y2ggLSBsYXllciAoY29tcG9uZW50KSBtYXNrICovCiAKLXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZGJnX2xheWVyID0gQUNQSV9DT01QT05FTlRfREVGQVVMVCB8IEFDUElfQUxMX0RSSVZFUlM7Cit1MzIgYWNwaV9kYmdfbGF5ZXIgPSBBQ1BJX0NPTVBPTkVOVF9ERUZBVUxUIHwgQUNQSV9BTExfRFJJVkVSUzsKIEVYUE9SVF9TWU1CT0woYWNwaV9kYmdfbGF5ZXIpOwotdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfbmVzdGluZ19sZXZlbCA9IDA7Ci0KK3UzMiBhY3BpX2dibF9uZXN0aW5nX2xldmVsID0gMDsKIAogLyogRGVidWdnZXIgZ2xvYmFscyAqLwogCi11OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9kYl90ZXJtaW5hdGVfdGhyZWFkcyA9IEZBTFNFOwotdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfYWJvcnRfbWV0aG9kID0gRkFMU0U7Ci11OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9tZXRob2RfZXhlY3V0aW5nID0gRkFMU0U7Cit1OCBhY3BpX2dibF9kYl90ZXJtaW5hdGVfdGhyZWFkcyA9IEZBTFNFOwordTggYWNwaV9nYmxfYWJvcnRfbWV0aG9kID0gRkFMU0U7Cit1OCBhY3BpX2dibF9tZXRob2RfZXhlY3V0aW5nID0gRkFMU0U7CiAKIC8qIFN5c3RlbSBmbGFncyAqLwogCi11MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9zdGFydHVwX2ZsYWdzID0gMDsKK3UzMiBhY3BpX2dibF9zdGFydHVwX2Z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AKIAkvKiBUYWJsZSB0ZXJtaW5hdG9yICovCiAKLQl7TlVMTCwgICAgICBBQ1BJX1RZUEVfQU5ZLCAgICAgICAgICAgICAgTlVMTH0KK3tOVUxMLCBBQ1BJX1RZUEVfQU5ZLCBOVUxMfQogfTsKIAogLyoKICAqIFByb3BlcnRpZXMgb2YgdGhlIEFDUEkgT2JqZWN0IFR5cGVzLCBib3RoIGludGVybmFsIGFuZCBleHRlcm5hbC4KICAqIFRoZSB0YWJsZSBpcyBpbmRleGVkIGJ5IHZhbHVlcyBvZiBhY3BpX29iamVjdF90eXBlCiAgKi8KLWNvbnN0IHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9uc19wcm9wZXJ0aWVzW10gPQotewotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDAwIEFueSAgICAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAwMSBOdW1iZXIgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMDIgU3RyaW5nICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDAzIEJ1ZmZlciAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAwNCBQYWNrYWdlICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMDUgZmllbGRfdW5pdCAgICAgICAqLwotCUFDUElfTlNfTkVXU0NPUEUsICAgICAgICAgICAgICAgICAgIC8qIDA2IERldmljZSAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAwNyBFdmVudCAgICAgICAgICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSwgICAgICAgICAgICAgICAgICAgLyogMDggTWV0aG9kICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDA5IE11dGV4ICAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAxMCBSZWdpb24gICAgICAgICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSwgICAgICAgICAgICAgICAgICAgLyogMTEgUG93ZXIgICAgICAgICAgICAqLwotCUFDUElfTlNfTkVXU0NPUEUsICAgICAgICAgICAgICAgICAgIC8qIDEyIFByb2Nlc3NvciAgICAgICAgKi8KLQlBQ1BJX05TX05FV1NDT1BFLCAgICAgICAgICAgICAgICAgICAvKiAxMyBUaGVybWFsICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMTQgYnVmZmVyX2ZpZWxkICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDE1IGRkYl9oYW5kbGUgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAxNiBEZWJ1ZyBPYmplY3QgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMTcgZGVmX2ZpZWxkICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDE4IGJhbmtfZmllbGQgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAxOSBpbmRleF9maWVsZCAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMjAgUmVmZXJlbmNlICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDIxIEFsaWFzICAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAyMiBtZXRob2RfYWxpYXMgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMjMgTm90aWZ5ICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLCAgICAgICAgICAgICAgICAgICAgIC8qIDI0IEFkZHJlc3MgSGFuZGxlciAgKi8KLQlBQ1BJX05TX05FV1NDT1BFIHwgQUNQSV9OU19MT0NBTCwgICAvKiAyNSBSZXNvdXJjZSBEZXNjICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSB8IEFDUElfTlNfTE9DQUwsICAgLyogMjYgUmVzb3VyY2UgRmllbGQgICAqLwotCUFDUElfTlNfTkVXU0NPUEUsICAgICAgICAgICAgICAgICAgIC8qIDI3IFNjb3BlICAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwgICAgICAgICAgICAgICAgICAgICAvKiAyOCBFeHRyYSAgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsICAgICAgICAgICAgICAgICAgICAgLyogMjkgRGF0YSAgICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMICAgICAgICAgICAgICAgICAgICAgIC8qIDMwIEludmFsaWQgICAgICAgICAgKi8KK2NvbnN0IHU4IGFjcGlfZ2JsX25zX3Byb3BlcnRpZXNbXSA9IHsKKwlBQ1BJX05TX05PUk1BTCwJCS8qIDAwIEFueSAgICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDAxIE51bWJlciAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDAyIFN0cmluZyAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDAzIEJ1ZmZlciAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDA0IFBhY2thZ2UgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDA1IGZpZWxkX3VuaXQgICAgICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFLAkvKiAwNiBEZXZpY2UgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAwNyBFdmVudCAgICAgICAgICAgICovCisJQUNQSV9OU19ORVdTQ09QRSwJLyogMDggTWV0aG9kICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDkgTXV0ZXggICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTAgUmVnaW9uICAgICAgICAgICAqLworCUFDUElfTlNfTkVXU0NPUEUsCS8qIDExIFBvd2VyICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFLAkvKiAxMiBQcm9jZXNzb3IgICAgICAgICovCisJQUNQSV9OU19ORVdTQ09QRSwJLyogMTMgVGhlcm1hbCAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTQgYnVmZmVyX2ZpZWxkICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTUgZGRiX2hhbmRsZSAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTYgRGVidWcgT2JqZWN0ICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTcgZGVmX2ZpZWxkICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTggYmFua19maWVsZCAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMTkgaW5kZXhfZmllbGQgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMjAgUmVmZXJlbmNlICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMjEgQWxpYXMgICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMjIgbWV0aG9kX2FsaWFzICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMjMgTm90aWZ5ICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMjQgQWRkcmVzcyBIYW5kbGVyICAqLworCUFDUElfTlNfTkVXU0NPUEUgfCBBQ1BJX05TX0xPQ0FMLAkvKiAyNSBSZXNvdXJjZSBEZXNjICAgICovCisJQUNQSV9OU19ORVdTQ09QRSB8IEFDUElfTlNfTE9DQUwsCS8qIDI2IFJlc291cmNlIEZpZWxkICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFLAkvKiAyNyBTY29wZSAgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyOCBFeHRyYSAgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyOSBEYXRhICAgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwJCS8qIDMwIEludmFsaWQgICAgICAgICAgKi8KIH07CiAKLQogLyogSGV4IHRvIEFTQ0lJIGNvbnZlcnNpb24gdGFibGUgKi8KIAotc3RhdGljIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfaGV4X3RvX2FzY2lpW10gPQotewotCScwJywnMScsJzInLCczJywnNCcsJzUnLCc2JywnNycsCi0JJzgnLCc5JywnQScsJ0InLCdDJywnRCcsJ0UnLCdGJworc3RhdGljIGNvbnN0IGNoYXIgYWNwaV9nYmxfaGV4X3RvX2FzY2lpW10gPSB7CisJJzAnLCAnMScsICcyJywgJzMnLCAnNCcsICc1JywgJzYnLCAnNycsCisJJzgnLCAnOScsICdBJywgJ0InLCAnQycsICdEJywgJ0UnLCAnRicKIH07CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9oZXhfdG9fYXNjaWlfY2hhcgpAQCAtMzA3LDE2ICsyOTUsMTIgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1jaGFyCi1hY3BpX3V0X2hleF90b19hc2NpaV9jaGFyICgKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGludGVnZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbikKK2NoYXIgYWNwaV91dF9oZXhfdG9fYXNjaWlfY2hhcihhY3BpX2ludGVnZXIgaW50ZWdlciwgdTMyIHBvc2l0aW9uKQogewogCiAJcmV0dXJuIChhY3BpX2dibF9oZXhfdG9fYXNjaWlbKGludGVnZXIgPj4gcG9zaXRpb24pICYgMHhGXSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBUYWJsZSBuYW1lIGdsb2JhbHMKQEAgLTMzMCw2NyArMzE0LDEzOSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBhY3BpX3RhYmxlX2xpc3QgICAgICAgICAgICAgIGFjcGlfZ2JsX3RhYmxlX2xpc3RzW05VTV9BQ1BJX1RBQkxFX1RZUEVTXTsKK3N0cnVjdCBhY3BpX3RhYmxlX2xpc3QgYWNwaV9nYmxfdGFibGVfbGlzdHNbTlVNX0FDUElfVEFCTEVfVFlQRVNdOwogCi1zdHJ1Y3QgYWNwaV90YWJsZV9zdXBwb3J0ICAgICAgICAgICBhY3BpX2dibF90YWJsZV9kYXRhW05VTV9BQ1BJX1RBQkxFX1RZUEVTXSA9Ci17CitzdHJ1Y3QgYWNwaV90YWJsZV9zdXBwb3J0IGFjcGlfZ2JsX3RhYmxlX2RhdGFbTlVNX0FDUElfVEFCTEVfVFlQRVNdID0gewogCS8qKioqKioqKioqKiAgICBOYW1lLCAgIFNpZ25hdHVyZSwgR2xvYmFsIHR5cGVkIHBvaW50ZXIgICAgIFNpZ25hdHVyZSBzaXplLCAgICAgIFR5cGUgICAgICAgICAgICAgICAgICBIb3cgbWF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2YoUFNEVF9TSUcpIC0gMSwKKwkJICAgICAgQUNQSV9UQUJMRV9QUklNQVJZIHwgQUNQSV9UQUJMRV9NVUxUSVBMRSB8CisJCSAgICAgIEFDUElfVEFCTEVfRVhFQ1VUQUJMRX0KKwksCisJLyogU1NEVCA1ICovIHtTU0RUX1NJRywgU1NEVF9TSUcsIE5VTEwsIHNpemVvZihTU0RUX1NJRykgLSAxLAorCQkgICAgICBBQ1BJX1RBQkxFX1BSSU1BUlkgfCBBQ1BJX1RBQkxFX01VTFRJUExFIHwKKwkJICAgICAgQUNQSV9UQUJMRV9FWEVDVVRBQkxFfQorCSwKKwkvKiBYU0RUIDYgKi8ge1hTRFRfU0lHLCBYU0RUX1NJRywgTlVMTCwgc2l6ZW9mKFJTRFRfU0lHKSAtIDEsCisJCSAgICAgIEFDUElfVEFCTEVfUk9PVCB8IEFDUElfVEFCTEVfU0lOR0xFfQorCSwKIH07CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEV2ZW50IGFuZCBIYXJkd2FyZSBnbG9iYWxzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gICAgICAgYWNwaV9nYmxfYml0X3JlZ2lzdGVyX2luZm9bQUNQSV9OVU1fQklUUkVHXSA9Ci17CitzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbyBhY3BpX2dibF9iaXRfcmVnaXN0ZXJfaW5mb1tBQ1BJX05VTV9CSVRSRUddID0gewogCS8qIE5hbWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGFyZW50IFJlZ2lzdGVyICAgICAgICAgICAgIFJlZ2lzdGVyIEJpdCBQb3NpdGlvbiAgICA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JVR0dFUikKIC8qCiAgKiBTdHJpbmdzIGFuZCBwcm9jZWR1cmVzIHVzZWQgZm9yIGRlYnVnIG9ubHkKQEAgLTY5MywxMyArNzEwLDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotY2hhciAqCi1hY3BpX3V0X2dldF9tdXRleF9uYW1lICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11dGV4X2lkKQorY2hhciAqYWNwaV91dF9nZXRfbXV0ZXhfbmFtZSh1MzIgbXV0ZXhfaWQpCiB7CiAKLQlpZiAobXV0ZXhfaWQgPiBNQVhfTVVURVgpCi0JeworCWlmIChtdXRleF9pZCA+IE1BWF9NVVRFWCkgewogCQlyZXR1cm4gKCJJbnZhbGlkIE11dGV4IElEIik7CiAJfQogCkBAIC03MDcsNyArNzIxLDYgQEAKIH0KICNlbmRpZgogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfdmFsaWRfb2JqZWN0X3R5cGUKQEAgLTcyMCwxMyArNzMzLDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTgKLWFjcGlfdXRfdmFsaWRfb2JqZWN0X3R5cGUgKAotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgdHlwZSkKK3U4IGFjcGlfdXRfdmFsaWRfb2JqZWN0X3R5cGUoYWNwaV9vYmplY3RfdHlwZSB0eXBlKQogewogCi0JaWYgKHR5cGUgPiBBQ1BJX1RZUEVfTE9DQUxfTUFYKQotCXsKKwlpZiAodHlwZSA+IEFDUElfVFlQRV9MT0NBTF9NQVgpIHsKIAkJLyogTm90ZTogQXNzdW1lcyBhbGwgVFlQRXMgYXJlIGNvbnRpZ3VvdXMgKGV4dGVybmFsL2xvY2FsKSAqLwogCiAJCXJldHVybiAoRkFMU0UpOwpAQCAtNzM1LDc0ICs3NDUsNiBAQAogCXJldHVybiAoVFJVRSk7CiB9CiAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV91dF9hbGxvY2F0ZV9vd25lcl9pZAotICoKLSAqIFBBUkFNRVRFUlM6ICBpZF90eXBlICAgICAgICAgLSBUeXBlIG9mIElEIChtZXRob2Qgb3IgdGFibGUpCi0gKgotICogREVTQ1JJUFRJT046IEFsbG9jYXRlIGEgdGFibGUgb3IgbWV0aG9kIG93bmVyIGlkCi0gKgotICogTk9URTogdGhpcyBhbGdvcml0aG0gaGFzIGEgd3JhcGFyb3VuZCBwcm9ibGVtIGF0IDY0X2sgbWV0aG9kIGludm9jYXRpb25zLCBhbmQKLSAqICAgICAgIHNob3VsZCBiZSByZXZpc2l0ZWQgKFRCRCkKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX293bmVyX2lkCi1hY3BpX3V0X2FsbG9jYXRlX293bmVyX2lkICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkX3R5cGUpCi17Ci0JYWNwaV9vd25lcl9pZCAgICAgICAgICAgICAgICAgICBvd25lcl9pZCA9IDB4RkZGRjsKLQotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X2FsbG9jYXRlX293bmVyX2lkIik7Ci0KLQotCWlmIChBQ1BJX0ZBSUxVUkUgKGFjcGlfdXRfYWNxdWlyZV9tdXRleCAoQUNQSV9NVFhfQ0FDSEVTK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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfc3Vic3lzdGVtX3NodXRkb3duCkBAIC0yMjksNTAgKzIxMyw0NSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfdXRfc3Vic3lzdGVtX3NodXRkb3duICgKLQl2b2lkKQordm9pZCBhY3BpX3V0X3N1YnN5c3RlbV9zaHV0ZG93bih2b2lkKQogewogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X3N1YnN5c3RlbV9zaHV0ZG93biIpOworCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X3N1YnN5c3RlbV9zaHV0ZG93biIpOwogCiAJLyogSnVzdCBleGl0IGlmIHN1YnN5c3RlbSBpcyBhbHJlYWR5IHNodXRkb3duICovCiAKIAlpZiAoYWNwaV9nYmxfc2h1dGRvd24pIHsKLQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfRVJST1IsCi0JCQkiQUNQSSBTdWJzeXN0ZW0gaXMgYWxyZWFkeSB0ZXJtaW5hdGVkXG4iKSk7CisJCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfRVJST1IsCisJCQkJICAiQUNQSSBTdWJzeXN0ZW0gaXMgYWxyZWFkeSB0ZXJtaW5hdGVkXG4iKSk7CiAJCXJldHVybl9WT0lEOwogCX0KIAogCS8qIFN1YnN5c3RlbSBhcHBlYXJzIGFjdGl2ZSwgZ28gYWhlYWQgYW5kIHNodXQgaXQgZG93biAqLwogCiAJYWNwaV9nYmxfc2h1dGRvd24gPSBUUlVFOwotCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lORk8sCi0JCSJTaHV0dGluZyBkb3duIEFDUEkgU3Vic3lzdG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XRpbGl0aWVzL3V0bWF0aC5jCisrKyBiL2RyaXZlcnMvYWNwaS91dGlsaXRpZXMvdXRtYXRoLmMKQEAgLTQxLDE5ICs0MSwxNiBAQAogICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgogICovCiAKLQogI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgidXRtYXRoIikKK0FDUElfTU9EVUxFX05BTUUoInV0bWF0aCIpCiAKIC8qCiAgKiBTdXBwb3J0IGZvciBkb3VibGUtcHJlY2lzaW9uIGludGVnZXIgZGl2aWRlLiAgVGhpcyBjb2RlIGlzIGluY2x1ZGVkIGhlcmUKICAqIGluIG9yZGVyIHRvIHN1cHBvcnQga2VybmVsIGVudmlyb25tZW50cyB3aGVyZSB0aGUgZG91YmxlLXByZWNpc2lvbiBtYXRoCiAgKiBsaWJyYXJ5IGlzIG5vdCBhdmFpbGFibGUuCiAgKi8KLQogI2lmbmRlZiBBQ1BJX1VTRV9OQVRJVkVfRElWSURFCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTcxLDI3ICs2OCwyMiBAQAogICogICAgICAgICAgICAgIDMyLWJpdCByZW1haW5kZXIuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogYWNwaV9zdGF0dXMKLWFjcGlfdXRfc2hvcnRfZGl2aWRlICgKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGRpdmlkZW5kLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGl2aXNvciwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAg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ZnVsbCA9IGRpdmlkZW5kOwpAQCAtMTAwLDkgKzkyLDkgQEAKIAkgKiBUaGUgcXVvdGllbnQgaXMgNjQgYml0cywgdGhlIHJlbWFpbmRlciBpcyBhbHdheXMgMzIgYml0cywKIAkgKiBhbmQgaXMgZ2VuZXJhdGVkIGJ5IHRoZSBzZWNvbmQgZGl2aWRlLgogCSAqLwotCUFDUElfRElWXzY0X0JZXzMyICgwLCBkaXZpZGVuZF9vdmwucGFydC5oaSwgZGl2aXNvciwKKwlBQ1BJX0RJVl82NF9CWV8zMigwLCBkaXZpZGVuZF9vdmwucGFydC5oaSwgZGl2aXNvciwKIAkJCSAgcXVvdGllbnQucGFydC5oaSwgcmVtYWluZGVyMzIpOwotCUFDUElfRElWXzY0X0JZXzMyIChyZW1haW5kZXIzMiwgZGl2aWRlbmRfb3ZsLnBhcnQubG8sIGRpdmlzb3IsCisJQUNQSV9ESVZfNjRfQllfMzIocmVtYWluZGVyMzIsIGRpdmlkZW5kX292bC5wYXJ0LmxvLCBkaXZpc29yLAogCQkJICBxdW90aWVudC5wYXJ0LmxvLCByZW1haW5kZXIzMik7CiAKIAkvKiBSZXR1cm4gb25seSB3aGF0IHdhcyByZXF1ZXN0ZWQgKi8KQEAgLTExNCwxMCArMTA2LDkgQEAKIAkJKm91dF9yZW1haW5kZXIgPSByZW1haW5kZXIzMjsKIAl9CiAKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKEFFX09LKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZGl2aWRlCkBAIC0xMzQsMzQgKzEyNSwzMCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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vKTsKIAogCQkJaWYgKHJlbWFpbmRlci5wYXJ0LmxvKSB7CiAJCQkJcmVtYWluZGVyLnBhcnQuaGktLTsKQEAgLTI1MCwxMSArMjM3LDEwIEBACiAJCSpvdXRfcmVtYWluZGVyID0gcmVtYWluZGVyLmZ1bGw7CiAJfQogCi0JcmV0dXJuX0FDUElfU1RBVFVTIChBRV9PSyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKIH0KIAogI2Vsc2UKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9zaG9ydF9kaXZpZGUsIGFjcGlfdXRfZGl2aWRlCkBAIC0yNjksMjMgKzI1NSwxOSBAQAogICogICAgICAgICAgICAgICAgIHBlcmZvcm0gdGhlIGRpdmlkZS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiBhY3BpX3N0YXR1cwotYWNwaV91dF9zaG9ydF9kaXZpZGUgKAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgaW5fZGl2aWRlbmQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXZpc29yLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKm91dF9xdW90aWVudCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvdXRfcmVtYWluZGVyKQorYWNwaV91dF9zaG9ydF9kaXZpZGUoYWNwaV9pbnRlZ2VyIGluX2RpdmlkZW5kLAorCQkgICAgIHUzMiBkaXZpc29yLAorCQkgICAgIGFjcGlfaW50ZWdlciAqIG91dF9xdW90aWVudCwgdTMyICogb3V0X3JlbWFpbmRlcikKIHsKIAotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJ1dF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2ZXJzL2FjcGkvdXRpbGl0aWVzL3V0bWlzYy5jCkBAIC00MSwyNCArNDEsMTMwIEBACiAgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCiAgKi8KIAotCiAjaW5jbHVkZSA8YWNwaS9hY3BpLmg+CiAjaW5jbHVkZSA8YWNwaS9hY25hbWVzcC5oPgogCi0KICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwotCSBBQ1BJX01PRFVMRV9OQU1FICAgICgidXRtaXNjIikKK0FDUElfTU9EVUxFX05BTUUoInV0bWlzYyIpCiAKLS8qIExvY2FsIHByb3RvdHlwZXMgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfYWxsb2NhdGVfb3duZXJfaWQKKyAqCisgKiBQQVJBTUVURVJTOiAgb3duZXJfaWQgICAgICAgIC0gV2hlcmUgdGhlIG5ldyBvd25lciBJRCBpcyByZXR1cm5lZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogQWxsb2NhdGUgYSB0YWJsZSBvciBtZXRob2Qgb3duZXIgSUQuIFRoZSBvd25lciBJRCBpcyB1c2VkIHRvCisgKiAgICAgICAgICAgICAgdHJhY2sgb2JqZWN0cyBjcmVhdGVkIGJ5IHRoZSB0YWJsZSBvciBtZXRob2QsIHRvIGJlIGRlbGV0ZWQKKyAqICAgICAgICAgICAgICB3aGVuIHRoZSBtZXRob2QgZXhpdHMgb3IgdGhlIHRhYmxlIGlzIHVubG9hZGVkLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCithY3BpX3N0YXR1cyBhY3BpX3V0X2FsbG9jYXRlX293bmVyX2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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9yZWxlYXNlX293bmVyX2lkCisgKgorICogUEFSQU1FVEVSUzogIG93bmVyX2lkX3B0ciAgICAgICAgLSBQb2ludGVyIHRvIGEgcHJldmlvdXNseSBhbGxvY2F0ZWQgb3duZXJfaUQKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZS4gTm8gZXJyb3IgaXMgcmV0dXJuZWQgYmVjYXVzZSB3ZSBhcmUgZWl0aGVyIGV4aXRpbmcgYQorICogICAgICAgICAgICAgIGNvbnRyb2wgbWV0aG9kIG9yIHVubG9hZGluZyBhIHRhYmxlLiBFaXRoZXIgd2F5LCB3ZSB3b3VsZAorICogICAgICAgICAgICAgIGlnbm9yZSBhbnkgZXJyb3IgYW55d2F5LgorICoKKyAqIERFU0NSSVBUSU9OOiBSZWxlYXNlIGEgdGFibGUgb3IgbWV0aG9kIG93bmVyIElELiAgVmFsaWQgSURzIGFyZSAxIC0gMzIKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkIGFjcGlfdXRfcmVsZWFzZV9vd25lcl9pZChhY3BpX293bmVyX2lkICogb3duZXJfaWRfcHRyKQoreworCWFjcGlfb3duZXJfaWQgb3duZXJfaWQgPSAqb3duZXJfaWRfcHRyOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyKCJ1dF9yZWxlYXNlX293bmVyX2lkIiwgb3duZXJfaWQpOworCisJLyogQWx3YXlzIGNsZWFyIHRoZSBpbnB1dCBvd25lcl9pZCAoemVybyBpcyBhbiBpbnZhbGlkIElEKSAqLworCisJKm93bmVyX2lkX3B0ciA9IDA7CisKKwkvKiBaZXJvIGlzIG5vdCBhIHZhbGlkIG93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dHJpbmcgdG8gdXBwZXJjYXNlCiAgKgpAQCAtNzQsMjYgKzE4MCwyNSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWNoYXIgKgotYWNwaV91dF9zdHJ1cHIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNyY19zdHJpbmcpCit2b2lkIGFjcGlfdXRfc3RydXByKGNoYXIgKnNyY19zdHJpbmcpCiB7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nOworCWNoYXIgKnN0cmluZzsKIAorCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKIAotCUFDUElfRlVOQ1RJT05fRU5UUlkgKCk7Ci0KKwlpZiAoIXNyY19zdHJpbmcpIHsKKwkJcmV0dXJuOworCX0KIAogCS8qIFdhbGsgZW50aXJlIHN0cmluZywgdXBwZXJjYXNpbmcgdGhlIGxldHRlcnMgKi8KIAogCWZvciAoc3RyaW5nID0gc3JjX3N0cmluZzsgKnN0cmluZzsgc3RyaW5nKyspIHsKLQkJKnN0cmluZyA9IChjaGFyKSBBQ1BJX1RPVVBQRVIgKCpzdHJpbmcpOworCQkqc3RyaW5nID0gKGNoYXIpQUNQSV9UT1VQUEVSKCpzdHJpbmcpOwogCX0KIAotCXJldHVybiAoc3JjX3N0cmluZyk7CisJcmV0dXJuOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcHJpbnRfc3RyaW5nCkBAIC0xMDgsODUgKzIxMyw3NyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLW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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11MzIKLWFjcGlfdXRfZHdvcmRfYnl0ZV9zd2FwICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlKQordTMyIGFjcGlfdXRfZHdvcmRfYnl0ZV9zd2FwKHUzMiB2YWx1ZSkKIHsKIAl1bmlvbiB7Ci0JCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTsKLQkJdTggICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzWzRdOworCQl1MzIgdmFsdWU7CisJCXU4IGJ5dGVzWzRdOwogCX0gb3V0OwogCXVuaW9uIHsKLQkJdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOwotCQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNbNF07CisJCXUzMiB2YWx1ZTsKKwkJdTggYnl0ZXNbNF07CiAJfSBpbjsKIAotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKLQorCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKIAogCWluLnZhbHVlID0gdmFsdWU7CiAKQEAgLTIyNiw3ICszMTksNiBAQAogCXJldHVybiAob3V0LnZhbHVlKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3NldF9pbnRlZ2VyX3dpZHRoCkBAIC0yNDIsMjQgKzMzNCwyMCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfdXRfc2V0X2ludGVnZXJfd2lkdGggKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2aXNpb24pCit2b2lkIGFjcGlfdXRfc2V0X2ludGVnZXJfd2lkdGgodTggcmV2aXNpb24pCiB7CiAKIAlpZiAocmV2aXNpb24gPD0gMSkgewogCQlhY3BpX2dibF9pbnRlZ2VyX2JpdF93aWR0aCA9IDMyOwogCQlhY3BpX2dibF9pbnRlZ2VyX255YmJsZV93aWR0aCA9IDg7CiAJCWFjcGlfZ2JsX2ludGVnZXJfYnl0ZV93aWR0aCA9IDQ7Ci0JfQotCWVsc2UgeworCX0gZWxzZSB7CiAJCWFjcGlfZ2JsX2ludGVnZXJfYml0X3dpZHRoID0gNjQ7CiAJCWFjcGlfZ2JsX2ludGVnZXJfbnliYmxlX3dpZHRoID0gMTY7CiAJCWFjcGlfZ2JsX2ludGVnZXJfYnl0ZV93aWR0aCA9IDg7CiAJfQogfQogCi0KICNpZmRlZiBBQ1BJX0RFQlVHX09VVFBVVAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yNzcsMTcgKzM2NSwxNCBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV91dF9kaXNwbGF5X2luaXRfcGF0aG5hbWUgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSwKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpvYmpfaGFuZGxlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBhdGgpCithY3BpX3V0X2Rpc3BsYXlfaW5pdF9wYXRobmFtZSh1OCB0eXBlLAorCQkJICAgICAgc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm9ial9oYW5kbGUsCisJCQkgICAgICBjaGFyICpwYXRoKQogewotCWFjcGlfc3RhdHVzICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOw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GUgYW5kIHBhdGhuYW1lICovCiAKLQlhY3BpX29zX3ByaW50ZiAoIiUtMTJzICVzIiwKLQkJYWNwaV91dF9nZXRfdHlwZV9uYW1lICh0eXBlKSwgKGNoYXIgKikgYnVmZmVyLnBvaW50ZXIpOworCWFjcGlfb3NfcHJpbnRmKCIlLTEycyAlcyIsCisJCSAgICAgICBhY3BpX3V0X2dldF90eXBlX25hbWUodHlwZSksIChjaGFyICopYnVmZmVyLnBvaW50ZXIpOwogCiAJLyogRXh0cmEgcGF0aCBpcyB1c2VkIHRvIGFwcGVuZCBuYW1lcyBsaWtlIF9TVEEsIF9JTkksIGV0Yy4gKi8KIAogCWlmIChwYXRoKSB7Ci0JCWFjcGlfb3NfcHJpbnRmICgiLiVzIiwgcGF0aCk7CisJCWFjcGlfb3NfcHJpbnRmKCIuJXMiLCBwYXRoKTsKIAl9Ci0JYWNwaV9vc19wcmludGYgKCJcbiIpOworCWFjcGlfb3NfcHJpbnRmKCJcbiIpOwogCi0JQUNQSV9NRU1fRlJFRSAoYnVmZmVyLnBvaW50ZXIpOworCUFDUElfTUVNX0ZSRUUoYnVmZmVyLnBvaW50ZXIpOwogfQogI2VuZGlmCiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF92YWxpZF9hY3BpX25hbWUKQEAgLTM0NywyNSArNDMxLDIxIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTgKLWFjcGlfdXRfdmFsaWRfYWNwaV9uYW1lICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUpCit1OCBhY3BpX3V0X3ZhbGlkX2FjcGlfbmFtZSh1MzIgbmFtZSkKIHsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lX3B0ciA9IChjaGFyICopICZuYW1lOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhcmFjdGVyOwotCWFjcGlfbmF0aXZlX3VpbnQgICAgICAgICAgICAgICAgaTsKKwljaGFyICpuYW1lX3B0ciA9IChjaGFyICopJm5hbWU7CisJY2hhciBjaGFyYWN0ZXI7CisJYWNwaV9uYXRpdmVfdWludCBpOwogCi0KLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOwogCiAJZm9yIChpID0gMDsgaSA8IEFDUElfTkFNRV9TSVpFOyBpKyspIHsKIAkJY2hhcmFjdGVyID0gKm5hbWVfcHRyOwogCQluYW1lX3B0cisrOwogCiAJCWlmICghKChjaGFyYWN0ZXIgPT0gJ18nKSB8fAotCQkJICAoY2hhcmFjdGVyID49ICdBJyAmJiBjaGFyYWN0ZXIgPD0gJ1onKSB8fAotCQkJICAoY2hhcmFjdGVyID49ICcwJyAmJiBjaGFyYWN0ZXIgPD0gJzknKSkpIHsKKwkJICAgICAgKGNoYXJhY3RlciA+PSAnQScgJiYgY2hhcmFjdGVyIDw9ICdaJykgfHwKKwkJICAgICAgKGNoYXJhY3RlciA+PSAnMCcgJiYgY2hhcmFjdGVyIDw9ICc5JykpKSB7CiAJCQlyZXR1cm4gKEZBTFNFKTsKIAkJfQogCX0KQEAgLTM3Myw3ICs0NTMsNiBAQAogCXJldHVybiAoVFJVRSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF92YWxpZF9hY3BpX2NoYXJhY3RlcgpAQCAtMzg2LDE5ICs0NjUsMTYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11OAotYWNwaV91dF92YWxpZF9hY3BpX2NoYXJhY3RlciAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyYWN0ZXIpCit1OCBhY3BpX3V0X3ZhbGlkX2FjcGlfY2hhcmFjdGVyKGNoYXIgY2hhcmFjdGVyKQogewogCi0JQUNQSV9GVU5DVElPTl9FTlRSWSAoKTsKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CiAKLQlyZXR1cm4gKCh1OCkgICAoKGNoYXJhY3RlciA9PSAnXycpIHx8Ci0JCQkgICAoY2hhcmFjdGVyID49ICdBJyAmJiBjaGFyYWN0ZXIgPD0gJ1onKSB8fAotCQkJICAgKGNoYXJhY3RlciA+PSAnMCcgJiYgY2hhcmFjdGVyIDw9ICc5JykpKTsKKwlyZXR1cm4gKCh1OCkgKChjaGFyYWN0ZXIgPT0gJ18nKSB8fAorCQkgICAgICAoY2hhcmFjdGVyID49ICdBJyAmJiBjaGFyYWN0ZXIgPD0gJ1onKSB8fAorCQkgICAgICAoY2hhcmFjdGVyID49ICcwJyAmJiBjaGFyYWN0ZXIgPD0gJzknKSkpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfc3RydG91bDY0CkBAIC00MTUsMTggKzQ5MSwxMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfdXRfc3RydG91bDY0ICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlLAotCWFjcGlfaW50ZWdlciAgICAgIC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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfdXRfbXV0ZXhfaW5pdGlhbGl6ZSAoCi0Jdm9pZCkKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0KLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UgKCJ1dF9tdXRleF9pbml0aWFsaXplIik7Ci0KLQotCS8qCi0JICogQ3JlYXRlIGVhY2ggb2YgdGhlIHByZWRlZmluZWQgbXV0ZXggb2JqZWN0cwotCSAqLwotCWZvciAoaSA9IDA7IGkgPCBOVU1fTVVURVg7IGkrKykgewotCQlzdGF0dXMgPSBhY3BpX3V0X2NyZWF0ZV9tdXRleCAoaSk7Ci0JCWlmIChBQ1BJX0ZBSUxVUkUgKHN0YXR1cykpIHsKLQkJCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKLQkJfQotCX0KLQotCXN0YXR1cyA9IGFjcGlfb3NfY3JlYXRlX2xvY2sgKCZhY3BpX2dibF9ncGVfbG9jayk7Ci0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfbXV0ZXhfdGVybWluYXRlCi0gKgotICogUEFSQU1FVEVSUzogIE5vbmUuCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUuCi0gKgotICogREVTQ1JJUFRJT046IERlbGV0ZSBhbGwgb2YgdGhlIHN5c3RlbSBtdXRleCBvYmplY3RzLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXZvaWQKLWFjcGlfdXRfbXV0ZXhfdGVybWluYXRlICgKLQl2b2lkKQotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLQotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X211dGV4X3Rlcm1pbmF0ZSIpOwotCi0KLQkvKgotCSAqIERlbGV0ZSBlYWNoIHByZWRlZmluZWQgbXV0ZXggb2JqZWN0Ci0JICovCi0JZm9yIChpID0gMDsgaSA8IE5VTV9NVVRFWDsgaSsrKSB7Ci0JCSh2b2lkKSBhY3BpX3V0X2RlbGV0ZV9tdXRleCAoaSk7Ci0JfQotCi0JYWNwaV9vc19kZWxldGVfbG9jayAoYWNwaV9nYmxfZ3BlX2xvY2spOwotCXJldHVybl9WT0lEOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY3JlYXRlX211dGV4Ci0gKgotICogUEFSQU1FVEVSUzogIG11dGV4X2lEICAgICAgICAtIElEIG9mIHRoZSBtdXRleCB0byBiZSBjcmVhdGVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBDcmVhdGUgYSBtdXRleCBvYmplY3QuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2NyZWF0ZV9tdXRleCAoCi0JYWNwaV9tdXRleF9oYW5kbGUgICAgICAgICAgICAgICBtdXRleF9pZCkKLXsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IEFFX09LOwotCi0KLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMiAoInV0X2NyZWF0ZV9tdXRleCIsIG11dGV4X2lkKTsKLQotCi0JaWYgKG11dGV4X2lkID4gTUFYX01VVEVYKSB7Ci0JCXJldHVybl9BQ1BJX1NUQVRVUyAoQUVfQkFEX1BBUkFNRVRFUik7Ci0JfQotCi0JaWYgKCFhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS5tdXRleCkgewotCQlzdGF0dXMgPSBhY3BpX29zX2NyZWF0ZV9zZW1hcGhvcmUgKDEsIDEsCi0JCQkJICAmYWNwaV9nYmxfbXV0ZXhfaW5mb1ttdXRleF9pZF0ubXV0ZXgpOwotCQlhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS5vd25lcl9pZCA9IEFDUElfTVVURVhfTk9UX0FDUVVJUkVEOwotCQlhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS51c2VfY291bnQgPSAwOwotCX0KLQotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKLX0KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9tdXRleAotICoKLSAqIFBBUkFNRVRFUlM6ICBtdXRleF9pRCAgICAgICAgLSBJRCBvZiB0aGUgbXV0ZXggdG8gYmUgZGVsZXRlZAotICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKLSAqCi0gKiBERVNDUklQVElPTjogRGVsZXRlIGEgbXV0ZXggb2JqZWN0LgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyBhY3BpX3N0YXR1cwotYWNwaV91dF9kZWxldGVfbXV0ZXggKAotCWFjcGlfbXV0ZXhfaGFuZGxlICAgICAgICAgICAgICAgbXV0ZXhfaWQpCi17Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0KLQotCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyICgidXRfZGVsZXRlX211dGV4IiwgbXV0ZXhfaWQpOwotCi0KLQlpZiAobXV0ZXhfaWQgPiBNQVhfTVVURVgpIHsKLQkJcmV0dXJuX0FDUElfU1RBVFVTIChBRV9CQURfUEFSQU1FVEVSKTsKLQl9Ci0KLQlzdGF0dXMgPSBhY3BpX29zX2RlbGV0ZV9zZW1hcGhvcmUgKGFjcGlfZ2JsX211dGV4X2luZm9bbXV0ZXhfaWRdLm11dGV4KTsKLQotCWFjcGlfZ2JsX211dGV4X2luZm9bbXV0ZXhfaWRdLm11dGV4ID0gTlVMTDsKLQlhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS5vd25lcl9pZCA9IEFDUElfTVVURVhfTk9UX0FDUVVJUkVEOwotCi0JcmV0dXJuX0FDUElfU1RBVFVTIChzdGF0dXMpOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfYWNxdWlyZV9tdXRleAotICoKLSAqIFBBUkFNRVRFUlM6ICBtdXRleF9pRCAgICAgICAgLSBJRCBvZiB0aGUgbXV0ZXggdG8gYmUgYWNxdWlyZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IEFjcXVpcmUgYSBtdXRleCBvYmplY3QuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfdXRfYWNxdWlyZV9tdXRleCAoCi0JYWNwaV9tdXRleF9oYW5kbGUgICAgICAgICAgICAgICBt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190aHJlYWRfaWQsIGFjcGlfdXRfZ2V0X211dGV4X25hbWUgKG11dGV4X2lkKSwKLQkJCWFjcGlfZm9ybWF0X2V4Y2VwdGlvbiAoc3RhdHVzKSkpOwotCX0KLQllbHNlIHsKLQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfTVVURVgsICJUaHJlYWQgJVggcmVsZWFzZWQgTXV0ZXggWyVzXVxuIiwKLQkJCXRoaXNfdGhyZWFkX2lkLCBhY3BpX3V0X2dldF9tdXRleF9uYW1lIChtdXRleF9pZCkpKTsKLQl9Ci0KLQlyZXR1cm4gKHN0YXR1cyk7Ci19Ci0KLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfdXBkYXRlX3N0YXRlX2FuZF9wdXNoCkBAIC04NzAsMTYgKzYyMSwxMyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfdXRfY3JlYXRlX3VwZGF0ZV9zdGF0ZV9hbmRfcHVzaCAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqZWN0LAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLAotCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAgICAgICAgKipzdGF0ZV9saXN0KQorYWNwaV91dF9jcmVhdGVfdXBkYXRlX3N0YXRlX2FuZF9wdXNoKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9iamVjdCwKKwkJCQkgICAgIHUxNiBhY3Rpb24sCisJCQkJICAgICB1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKipzdGF0ZV9saXN0KQogewotCXVuaW9uI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aGUgc3RhdGUgd2lsbCBiZSBhZGRlZCB0bwotICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKLSAqCi0gKiBERVNDUklQVElPTjogQ3JlYXRlIGEgbmV3IHN0YXRlIGFuZCBwdXNoIGl0Ci0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmZGVmIEFDUElfRlVUVVJFX1VTQUdFCi1hY3BpX3N0YXR1cwotYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbnRlcm5hbF9vYmplY3QsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZXh0ZXJuYWxfb2JqZWN0LAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXgsCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqKnN0YXRlX2xpc3QpCi17Ci0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAgKnN0YXRlOwotCi0KLQlBQ1BJX0ZVTkNUSU9OX0VOVFJZICgpOwotCi0KLQlzdGF0ZSA9IGFjcGlfdXRfY3JlYXRlX3BrZ19zdGF0ZSAoaW50ZXJuYWxfb2JqZWN0LCBleHRlcm5hbF9vYmplY3QsIGluZGV4KTsKLQlpZiAoIXN0YXRlKSB7Ci0JCXJldHVybiAoQUVfTk9fTUVNT1JZKTsKLQl9Ci0KLQlhY3BpX3V0X3B1c2hfZ2VuZXJpY19zdGF0ZSAoc3RhdGVfbGlzdCwgc3RhdGUpOwotCXJldHVybiAoQUVfT0spOwotfQotI2VuZGlmICAvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcHVzaF9nZW5lcmljX3N0YXRlCi0gKgotICogUEFSQU1FVEVSUzogIGxpc3RfaGVhZCAgICAgICAgICAgLSBIZWFkIG9mIHRoZSBzdGF0ZSBzdGFjawotICogICAgICAgICAgICAgIFN0YXRlICAgICAgICAgICAgICAgLSBTdGF0ZSBvYmplY3QgdG8gcHVzaAotICoKLSAqIFJFVFVSTjogICAgICBOb25lCi0gKgotICogREVTQ1JJUFRJT046IFB1c2ggYSBzdGF0ZSBvYmplY3Qgb250byBhIHN0YXRlIHN0YWNrCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV91dF9wdXNoX2dlbmVyaWNfc3RhdGUgKAotCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAgICAgICAgKipsaXN0X2hlYWQsCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc3RhdGUpCi17Ci0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X3B1c2hfZ2VuZXJpY19zdGF0ZSIpOwotCi0KLQkvKiBQdXNoIHRoZSBzdGF0ZSBvYmplY3Qgb250byB0aGUgZnJvbnQgb2YgdGhlIGxpc3QgKHN0YWNrKSAqLwotCi0Jc3RhdGUtPmNvbW1vbi5uZXh0ID0gKmxpc3RfaGVhZDsKLQkqbGlzdF9oZWFkID0gc3RhdGU7Ci0KLQlyZXR1cm5fVk9JRDsKLX0KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3BvcF9nZW5lcmljX3N0YXRlCi0gKgotICogUEFSQU1FVEVSUzogIGxpc3RfaGVhZCAgICAgICAgICAgLSB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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV91dF9kZWxldGVfZ2VuZXJpY19zdGF0ZQotICoKLSAqIFBBUkFNRVRFUlM6ICBTdGF0ZSAgICAgICAgICAgICAgIC0gVGhlIHN0YXRlIG9iamVjdCB0byBiZSBkZWxldGVkCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUKLSAqCi0gKiBERVNDUklQVElPTjogUHV0IGEgc3RhdGUgb2JqZWN0IGJhY2sgaW50byB0aGUgZ2xvYmFsIHN0YXRlIGNhY2hlLiAgVGhlIG9iamVjdAotICogICAgICAgICAgICAgIGlzIG5vdCBhY3R1YWxseSBmcmVlZCBhdCB0aGlzIHRpbWUuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV91dF9kZWxldGVfZ2VuZXJpY19zdGF0ZSAoCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc3RhdGUpCi17Ci0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X2RlbGV0ZV9nZW5lcmljX3N0YXRlIik7Ci0KLQotCWFjcGlfdXRfcmVsZWFzZV90b19jYWNoZSAoQUNQSV9NRU1fTElTVF9TVEFURSwgc3RhdGUpOwotCXJldHVybl9WT0lEOwotfQotCi0KLSNpZmRlZiBBQ1BJX0VOQUJMRV9PQkpFQ1RfQ0FDSEUKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZGVsZXRlX2dlbmVyaWNfc3RhdGVfY2FjaGUKLSAqCi0gKiBQQVJBTUVURVJTOiAgTm9uZQotICoKLSAqIFJFVFVSTjogICAgICBOb25lCi0gKgotICogREVTQ1JJUFRJT046IFB1cmdlIHRoZSBnbG9iYWwgc3RhdGUgb2JqZWN0IGNhY2hlLiAgVXNlZCBkdXJpbmcgc3Vic3lzdGVtCi0gKiAgICAgICAgICAgICAgdGVybWluYXRpb24uCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZAotYWNwaV91dF9kZWxldGVfZ2VuZXJpY19zdGF0ZV9jYWNoZSAoCi0Jdm9pZCkKLXsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFICgidXRfZGVsZXRlX2dlbmVyaWNfc3RhdGVfY2FjaGUiKTsKLQotCi0JYWNwaV91dF9kZWxldGVfZ2VuZXJpY19jYWNoZSAoQUNQSV9NRU1fTElTVF9TVEFURSk7Ci0JcmV0dXJuX1ZPSUQ7Ci19Ci0jZW5kaWYKLQotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3dhbGtfcGFja2FnZV90cmVlCkBAIC0xMjY4LDMzICs2NjAsMjkgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X3dhbGtfcGFja2FnZV90cmVlICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2Vfb2JqZWN0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnRhcmdldF9vYmplY3QsCi0JYWNwaV9wa2dfY2FsbGJhY2sgICAgICAgICAgICAgICB3YWxrX2NhbGxiYWNrLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpCithY3BpX3V0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qKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZ2VuZXJhdGVfY2hlY2tzdW0KQEAgLTEzODQsMjMgKzc3NiwxOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXU4Ci1hY3BpX3V0X2dlbmVyYXRlX2NoZWNrc3VtICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGgpCit1OCBhY3BpX3V0X2dlbmVyYXRlX2NoZWNrc3VtKHU4ICogYnVmZmVyLCB1MzIgbGVuZ3RoKQogewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLQlzaWduZWQgY2hhciAgICAgICAgICAgICAgICAgICAgIHN1bSA9IDA7Ci0KKwl1MzIgaTsKKwlzaWduZWQgY2hhciBzdW0gPSAwOwogCiAJZm9yIChpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7Ci0JCXN1bSA9IChzaWduZWQgY2hhcikgKHN1bSArIGJ1ZmZlcltpXSk7CisJCXN1bSA9IChzaWduZWQgY2hhcikoc3VtICsgYnVmZmVyW2ldKTsKIAl9CiAKIAlyZXR1cm4gKCh1OCkgKDAgLSBzdW0pKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9yZXNvdXJjZV9lbmRfdGFnCkBAIC0xNDEzLDE3ICs4MDAsMTMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0KLXU4ICoKLWFjcGlfdXRfZ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AoKGJ1ZmZlcl9ieXRlICYgQUNQSV9SREVTQ19TTUFMTF9NQVNLKSA9PSBBQ1BJX1JERVNDX1RZUEVfRU5EX1RBRykgeworCQkJaWYgKChidWZmZXJfYnl0ZSAmIEFDUElfUkRFU0NfU01BTExfTUFTSykgPT0KKwkJCSAgICBBQ1BJX1JERVNDX1RZUEVfRU5EX1RBRykgewogCQkJCS8qIEZvdW5kIHRoZSBlbmQgdGFnIGRlc2NyaXB0b3IsIGFsbCBkb25lLiAqLwogCiAJCQkJcmV0dXJuIChidWZmZXIpOwpAQCAtMTQ1Myw3ICs4MzYsNiBAQAogCXJldHVybiAoTlVMTCk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9yZXBvcnRfZXJyb3IKQEAgLTE0NjgsMTcgKzg1MCwxMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQKLWFjcGlfdXRfcmVwb3J0X2Vycm9yICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkKQordm9pZCBhY3BpX3V0X3JlcG9ydF9lcnJvcihjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyLCB1MzIgY29tcG9uZW50X2lkKQogewogCi0JYWNwaV9vc19wcmludGYgKCIlOHMtJTA0ZDogKioqIEVycm9yOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOworCWFjcGlfb3NfcHJpbnRmKCIlOHMtJTA0ZDogKioqIEVycm9yOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcmVwb3J0X3dhcm5pbmcKQEAgLTE0OTQsMTYgKzg3MSwxMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotYWNwaV91dF9yZXBvcnRfd2FybmluZyAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCkKK2FjcGlfdXRfcmVwb3J0X3dhcm5pbmcoY2hhciAqbW9kdWxlX25hbWUsIHUzMiBsaW5lX251bWJlciwgdTMyIGNvbXBvbmVudF9pZCkKIHsKIAotCWFjcGlfb3NfcHJpbnRmICgiJThzLSUwNGQ6ICoqKiBXYXJuaW5nOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOworCWFjcGlfb3NfcHJpbnRmKCIlOHMtJTA0ZDogKioqIFdhcm5pbmc6ICIsIG1vZHVsZV9uYW1lLCBsaW5lX251bWJlcik7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9yZXBvcnRfaW5mbwpAQCAtMTUxOCwxNCArODkxLDggQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X3JlcG9ydF9pbmZvICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkKQordm9pZCBhY3BpX3V0X3JlcG9ydF9pbmZvKGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgbGluZV9udW1iZXIsIHUzMiBjb21wb25lbnRfaWQpCiB7CiAKLQlhY3BpX29zX3ByaW50ZiAoIiU4cy0lMDRkOiAqKiogSW5mbzogIiwgbW9kdWxlX25hbWUsIGxpbmVfbnVtYmVyKTsKKwlhY3BpX29zX3ByaW50ZigiJThzLSUwNGQ6ICoqKiBJbmZvOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOwogfQotCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS91dGlsaXRpZXMvdXRtdXRleC5jIGIvZHJpdmVycy9hY3BpL3V0aWxpdGllcy91dG11dGV4LmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOTAxMzRjNQotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvYWNwaS91dGlsaXRpZXMvdXRtdXRleC5jCkBAIC0wLDAgKzEsMzU0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE1vZHVsZSBOYW1lOiB1dG11dGV4IC0gbG9jYWwgbXV0ZXggc3VwcG9ydAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBDb3B5cmlnaHQgKEMpIDIwMDA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VTUyBJTlRFUlJVUFRJT04pCisgKiBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZIFRIRU9SWSBPRiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQ09OVFJBQ1QsCisgKiBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUIChJTkNMVURJTkcgTkVHTElHRU5DRSBPUiBPVEhFUldJU0UpIEFSSVNJTkcKKyAqIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRQorICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgorICovCisKKyNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KKworI2RlZmluZSBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfVVRJTElUSUVTCitBQ1BJX01PRFVMRV9OQU1FKCJ1dG11dGV4IikKKworLyogTG9jYWwgcHJvdG90eXBlcyAqLworc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfdXRfY3JlYXRlX211dGV4KGFjcGlfbXV0ZXhfaGFuZGxlIG11dGV4X2lkKTsKKworc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfdXRfZGVsZXRlX211dGV4KGFjcGlfbXV0ZXhfaGFuZGxlIG11dGV4X2lkKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9tdXRleF9pbml0aWFsaXplCisgKgorICogUEFSQU1FVEVSUzogIE5vbmUuCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBDcmVhdGUgdGhlIHN5c3RlbSBtdXRleCBvYmplY3RzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzIGFjcGlfdXRfbXV0ZXhfaW5pdGlhbGl6ZSh2b2lkKQoreworCXUzMiBpOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X211dGV4X2luaXRpYWxpemUiKTsKKworCS8qCisJICogQ3JlYXRlIGVhY2ggb2YgdGhlIHByZWRlZmluZWQgbXV0ZXggb2JqZWN0cworCSAqLworCWZvciAoaSA9IDA7IGkgPCBOVU1fTVVURVg7IGkrKykgeworCQlzdGF0dXMgPSBhY3BpX3V0X2NyZWF0ZV9tdXRleChpKTsKKwkJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CisJCQlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKKwkJfQorCX0KKworCXN0YXR1cyA9IGFjcGlfb3NfY3JlYXRlX2xvY2soJmFjcGlfZ2JsX2dwZV9sb2NrKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9tdXRleF90ZXJtaW5hdGUKKyAqCisgKiBQQVJBTUVURVJTOiAgTm9uZS4KKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZS4KKyAqCisgKiBERVNDUklQVElPTjogRGVsZXRlIGFsbCBvZiB0aGUgc3lzdGVtIG11dGV4IG9iamVjdHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBhY3BpX3V0X211dGV4X3Rlcm1pbmF0ZSh2b2lkKQoreworCXUzMiBpOworCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidXRfbXV0ZXhfdGVybWluYXRlIik7CisKKwkvKgorCSAqIERlbGV0ZSBlYWNoIHByZWRlZmluZWQgbXV0ZXggb2JqZWN0CisJICovCisJZm9yIChpID0gMDsgaSA8IE5VTV9NVVRFWDsgaSsrKSB7CisJCSh2b2lkKWFjcGlfdXRfZGVsZXRlX211dGV4KGkpOworCX0KKworCWFjcGlfb3NfZGVsZXRlX2xvY2soYWNwaV9nYmxfZ3BlX2xvY2spOworCXJldHVybl9WT0lEOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2NyZWF0ZV9tdXRleAorICoKKyAqIFBBUkFNRVRFUlM6ICBtdXRleF9pRCAgICAgICAgLSBJRCBvZiB0aGUgbXV0ZXggdG8gYmUgY3JlYXRlZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogQ3JlYXRlIGEgbXV0ZXggb2JqZWN0LgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBhY3BpX3N0YXR1cyBhY3BpX3V0X2NyZWF0ZV9tdXRleChhY3BpX211dGV4X2hhbmRsZSBtdXRleF9pZCkKK3sKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyKCJ1dF9jcmVhdGVfbXV0ZXgiLCBtdXRleF9pZCk7CisKKwlpZiAobXV0ZXhfaWQgPiBNQVhfTVVURVgpIHsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX0JBRF9QQVJBTUVURVIpOworCX0KKworCWlmICghYWNwaV9nYmxfbXV0ZXhfaW5mb1ttdXRleF9pZF0ubXV0ZXgpIHsKKwkJc3RhdHVzID0gYWNwaV9vc19jcmVhdGVfc2VtYXBob3JlKDEsIDEsCisJCQkJCQkgICZhY3BpX2dibF9tdXRleF9pbmZvCisJCQkJCQkgIFttdXRleF9pZF0ubXV0ZXgpOworCQlhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS50aHJlYWRfaWQgPQorCQkgICAgQUNQSV9NVVRFWF9OT1RfQUNRVUlSRUQ7CisJCWFjcGlfZ2JsX211dGV4X2luZm9bbXV0ZXhfaWRdLnVzZV9jb3VudCA9IDA7CisJfQorCisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZGVsZXRlX211dGV4CisgKgorICogUEFSQU1FVEVSUzogIG11dGV4X2lEICAgICAgICAtIElEIG9mIHRoZSBtdXRleCB0byBiZSBkZWxldGVkCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBEZWxldGUgYSBtdXRleCBvYmplY3QuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGFjcGlfc3RhdHVzIGFjcGlfdXRfZGVsZXRlX211dGV4KGFjcGlfbXV0ZXhfaGFuZGxlIG11dGV4X2lkKQoreworCWFjcGlfc3RhdHVzIHN0YXR1czsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyKCJ1dF9kZWxldGVfbXV0ZXgiLCBtdXRleF9pZCk7CisKKwlpZiAobXV0ZXhfaWQgPiBNQVhfTVVURVgpIHsKKwkJcmV0dXJuX0FDUElfU1RBVFVTKEFFX0JBRF9QQVJBTUVURVIpOworCX0KKworCXN0YXR1cyA9IGFjcGlfb3NfZGVsZXRlX3NlbWFwaG9yZShhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS5tdXRleCk7CisKKwlhY3BpX2dibF9tdXRleF9pbmZvW211dGV4X2lkXS5tdXRleCA9IE5VTEw7CisJYWNwaV9nYmxfbXV0ZXhfaW5mb1ttdXRleF9pZF0udGhyZWFkX2lkID0gQUNQSV9NVVRFWF9OT1RfQUNRVUlSRUQ7CisKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9hY3F1aXJlX211dGV4CisgKgorICogUEFSQU1FVEVSUzogIG11dGV4X2lEICAgICAgICAtIElEIG9mIHRoZSBtdXRleCB0byBiZSBhY3F1aXJlZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogQWNxdWlyZSBhIG11dGV4IG9iamVjdC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCithY3BpX3N0YXR1cyBhY3BpX3V0X2FjcXVpcmVfbXV0ZXgoYWNwaV9tdXRleF9oYW5kbGUgbXV0ZXhfaWQpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXUzMiB0aGlzX3RocmVhZF9pZDsKKworCUFDUElfRlVOQ1RJT05fTkFNRSgidXRfYWNxdWlyZV9tdXRleCIpOworCisJaWYgKG11dGV4X2lkID4gTUFYX01VVEVYKSB7CisJCXJldHVybiAoQUVfQkFEX1BBUkFNRVRFUik7CisJfQorCisJdGhpc190aHJlYWRfaWQgPSBhY3BpX29zX2dldF90aHJlYWRfaWQoKTsKKworI2lmZGVmIEFDUElfTVVURVhfREVCVUcKKwl7CisJCXUzMiBpOworCQkvKgorCQkgKiBNdXRleCBkZWJ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hbWUobXV0ZXhfaWQpLAorCQkJCSAgYWNwaV9mb3JtYXRfZXhjZXB0aW9uKHN0YXR1cykpKTsKKwl9CisKKwlyZXR1cm4gKHN0YXR1cyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcmVsZWFzZV9tdXRleAorICoKKyAqIFBBUkFNRVRFUlM6ICBtdXRleF9pRCAgICAgICAgLSBJRCBvZiB0aGUgbXV0ZXggdG8gYmUgcmVsZWFzZWQKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IFJlbGVhc2UgYSBtdXRleCBvYmplY3QuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV91dF9yZWxlYXNlX211dGV4KGFjcGlfbXV0ZXhfaGFuZGxlIG11dGV4X2lkKQoreworCWFjcGlfc3RhdHVzIHN0YXR1czsKKwl1MzIgdGhpc190aHJlYWRfaWQ7CisKKwlBQ1BJX0ZVTkNUSU9OX05BTUUoInV0X3JlbGVhc2VfbXV0ZXgiKTsKKworCXRoaXNfdGhyZWFkX2lkID0gYWNwaV9vc19nZXRfdGhyZWFkX2lkKCk7CisJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9NVVRFWCwKKwkJCSAgIlRocmVhZCAlWCByZWxlYXNpbmcgTXV0ZXggWyVzXVxuIiwgdGhpc190aHJlYWRfaWQsCisJCQkgIGFjcGlfdXRfZ2V0X211dGV4X25hbWUobXV0ZXhfaWQpKSk7CisKKwlpZiAobXV0ZXhfaWQgPiBNQVhfTVVURVgpIHsKKwkJcmV0dXJuIChBRV9CQURfUEFSQU1FVEVSKTsKKwl9CisKKwkvKgorC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LAorCQkJCWFjcGlfc2l6ZSAqIG9ial9sZW5ndGgpOwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfZ2V0X3BhY2thZ2Vfb2JqZWN0X3NpemUgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9iaiwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpvYmpfbGVuZ3RoKTsKLQotc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2dldF9lbGVtZW50X2xlbmd0aCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmplY3RfdHlwZSwKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpzb3VyY2Vfb2JqZWN0LAotCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAgICAgICAgKnN0YXRlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpOwotCithY3BpX3V0X2dldF9lbGVtZW50X2xlbmd0aCh1OCBvYmplY3RfdHlwZSwKKwkJCSAgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnNvdXJjZV9vYmplY3QsCisJCQkgICB1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlLCB2b2lkICpjb250ZXh0KTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC05MSwyNiArODMsMjUgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICoKLWFjcGlfdXRfY3JlYXRlX2ludGVybmFsX29iamVjdF9kYmcgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1v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Y3QpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY3JlYXRlX2J1ZmZlcl9vYmplY3QKQEAgLTE2NSwyMiArMTU2LDE4IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqCi1hY3BpX3V0X2NyZWF0ZV9idWZmZXJfb2JqZWN0ICgKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcl9zaXplKQordW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqYWNwaV91dF9jcmVhdGVfYnVmZmVyX29iamVjdChhY3BpX3NpemUgYnVmZmVyX3NpemUpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqYnVmZmVyX2Rlc2M7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyID0gTlVMTDsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpidWZmZXJfZGVzYzsKKwl1OCAqYnVmZmVyID0gTlVMTDsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRV9VMzIgKCJ1dF9jcmVhdGVfYnVmZmVyX29iamVjdCIsIGJ1ZmZlcl9zaXplKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyKCJ1dF9jcmVhdGVfYnVmZmVyX29iamVjdCIsIGJ1ZmZlcl9zaXplKTsKIAogCS8qIENyZWF0ZSBhIG5ldyBCdWZmZXIgb2JqZWN0ICovCiAKLQlidWZmZXJfZGVzYyA9IGFjcGlfdXRfY3JlYXRlX2ludGVybmFsX29iamVjdCAoQUNQSV9UWVBFX0JVRkZFUik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oYnVmZmVyX2Rlc2MpOworCXJldHVybl9QVFIoYnVmZmVyX2Rlc2MpOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY3JlYXRlX3N0cmluZ19vYmplY3QKQEAgLTIyMywzNCArMjA4LDI5IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqCi1hY3BpX3V0X2NyZWF0ZV9zdHJpbmdfb2JqZWN0ICgKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ19zaXplKQordW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqYWNwaV91dF9jcmVhdGVfc3RyaW5nX29iamVjdChhY3BpX3NpemUgc3RyaW5nX3NpemUpCiB7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqc3RyaW5nX2Rlc2M7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnN0cmluZ19kZXNjOworCWNoYXIgKnN0cmluZzsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRV9VMzIgKCJ1dF9jcmVhdGVfc3RyaW5nX29iamVjdCIsIHN0cmluZ19zaXplKTsKLQorCUFDUElfRlVOQ1RJT05fVFJBQ0VfVTMyKCJ1dF9jcmVhdGVfc3RyaW5nX29iamVjdCIsIHN0cmluZ19zaXplKTsKIAogCS8qIENyZWF0ZSBhIG5ldyBTdHJpbmcgb2JqZWN0ICovCiAKLQlzdHJpbmdfZGVzYyA9IGFjcGlfdXRfY3JlYXRlX2ludGVybmFsX29iamVjdCAoQUN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aGUgbmV3IHN0cmluZyBkZXNjcmlwdG9yICovCiAKLQlyZXR1cm5fUFRSIChzdHJpbmdfZGVzYyk7CisJcmV0dXJuX1BUUihzdHJpbmdfZGVzYyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF92YWxpZF9pbnRlcm5hbF9vYmplY3QKQEAgLTI3NiwyNCArMjU1LDIxIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdTgKLWFjcGlfdXRfdmFsaWRfaW50ZXJuYWxfb2JqZWN0ICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmplY3QpCit1OCBhY3BpX3V0X3ZhbGlkX2ludGVybmFsX29iamVjdCh2b2lkICpvYmplY3QpCiB7CiAKLQlBQ1BJX0ZVTkNUSU9OX05BTUUgKCJ1dF92YWxpZF9pbnRlcm5hbF9vYmplY3QiKTsKLQorCUFDUElfRlVOQ1RJT05fTkFNRSgidXRfdmFsaWRfaW50ZXJuYWxfb2JqZWN0Iik7CiAKIAkvKiBDaGVjayBmb3IgYSBudWxsIHBvaW50ZXIgKi8KIAogCWlmICghb2JqZWN0KSB7Ci0JCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lORk8sICIqKioqIE51bGwgT2JqZWN0IFB0clxuIikpOworCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0lORk8sICIqKioqIE51bGwgT2JqZWN0IFB0clxuIikpOwogCQlyZXR1cm4gKEZBTFNFKTsKIAl9CiAKIAkvKiBDaGVjayB0aGUgZGVzY3JpcHRvciB0eXBlIGZpZWxkICovCiAKLQlzd2l0Y2ggKEFDUElfR0VUX0RFU0NSSVBUT1JfVFlQRSAob2JqZWN0KSkgeworCXN3aXRjaCAoQUNQSV9HRVRfREVTQ1JJUFRPUl9UWVBFKG9iamVjdCkpIHsKIAljYXNlIEFDUElfREVTQ19UWVBFX09QRVJBTkQ6CiAKIAkJLyogVGhlIG9iamVjdCBhcHBlYXJzIHRvIGJlIGEgdmFsaWQgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAqLwpAQCAtMzAxLDE2ICsyNzcsMTUgQEAKIAkJcmV0dXJuIChUUlVFKTsKIAogCWRlZmF1bHQ6Ci0JCUFDUElfREVCVUdfUFJJTlQgKChBQ1BJX0RCX0lORk8sCi0JCQkJIiVwIGlzIG5vdCBub3QgYW4gQUNQSSBvcGVyYW5kIG9iaiBbJXNdXG4iLAotCQkJCW9iamVjdCwgYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9uYW1lIChvYmplY3QpKSk7CisJCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfSU5GTywKKwkJCQkgICIlcCBpcyBub3Qgbm90IGFuIEFDUEkgb3BlcmFuZCBvYmogWyVzXVxuIiwKKwkJCQkgIG9iamVjdCwgYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9uYW1lKG9iamVjdCkpKTsKIAkJYnJlYWs7CiAJfQogCiAJcmV0dXJuIChGQUxTRSk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9hbGxvY2F0ZV9vYmplY3RfZGVzY19kYmcKQEAgLTMyNiwzNyArMzAxLDMxIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCAqCi1hY3BpX3V0X2FsbG9jYXRlX29iamVjdF9kZXNjX2RiZyAoCi0JY2hhciAgICAgICAgICAgICAgICAgIC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KwkJcmV0dXJuX1BUUihOVUxMKTsKIAl9CiAKIAkvKiBNYXJrIHRoZSBkZXNjcmlwdG9yIHR5cGUgKi8KKwltZW1zZXQob2JqZWN0LCAwLCBzaXplb2YodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCkpOworCUFDUElfU0VUX0RFU0NSSVBUT1JfVFlQRShvYmplY3QsIEFDUElfREVTQ19UWVBFX09QRVJBTkQpOwogCi0JQUNQSV9TRVRfREVTQ1JJUFRPUl9UWVBFIChvYmplY3QsIEFDUElfREVTQ19UWVBFX09QRVJBTkQpOworCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfQUxMT0NBVElPTlMsICIlcCBTaXplICVYXG4iLAorCQkJICBvYmplY3QsICh1MzIpIHNpemVvZih1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0KSkpOwogCi0JQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfQUxMT0NBVElPTlMsICIlcCBTaXplICVYXG4iLAotCQkJb2JqZWN0LCAodTMyKSBzaXplb2YgKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QpKSk7Ci0KLQlyZXR1cm5fUFRSIChvYmplY3QpOworCXJldHVybl9QVFIob2JqZWN0KTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9vYmplY3RfZGVzYwpAQCAtMzY5LDU1ICszMzgsMjMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi12b2lkCi1hY3BpX3V0X2RlbGV0ZV9vYmplY3RfZGVzYyAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqZWN0KQordm9pZCBhY3BpX3V0X2RlbGV0Z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OwogfQogCi0KLSNpZmRlZiBBQ1BJX0VOQUJMRV9PQkpFQ1RfQ0FDSEUKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZGVsZXRlX29iamVjdF9jYWNoZQotICoKLSAqIFBBUkFNRVRFUlM6ICBOb25lCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUKLSAqCi0gKiBERVNDUklQVElPTjogUHVyZ2UgdGhlIGdsb2JhbCBzdGF0ZSBvYmplY3QgY2FjaGUuICBVc2VkIGR1cmluZyBzdWJzeXN0ZW0KLSAqICAgICAgICAgICAgICB0ZXJtaW5hdGlvbi4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkCi1hY3BpX3V0X2RlbGV0ZV9vYmplY3RfY2FjaGUgKAotCXZvaWQpCi17Ci0JQUNQSV9GVU5DVElPTl9UUkFDRSAoInV0X2RlbGV0ZV9vYmplY3RfY2FjaGUiKTsKLQotCi0JYWNwaV91dF9kZWxldGVfZ2VuZXJpY19jYWNoZSAoQUNQSV9NRU1fTElTVF9PUEVSQU5EKTsKLQlyZXR1cm5fVk9JRDsKLX0KLSNlbmRpZgotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZ2V0X3NpbXBsZV9vYmplY3Rfc2l6ZQpAQCAtNDM2LDE2ICszNzMsMTMgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBhY3BpX3N0YXR1cw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ByZXZlbnRpbmcgYWxpZ25tZW50IGZhdWx0cyBvbiBzb21lCiAJICogbWFjaGluZXMuKQogCSAqLwotCSpvYmpfbGVuZ3RoID0gQUNQSV9ST1VORF9VUF9UT19OQVRJVkVfV09SRCAobGVuZ3RoKTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJKm9ial9sZW5ndGggPSBBQ1BJX1JPVU5EX1VQX1RPX05BVElWRV9XT1JEKGxlbmd0aCk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfZWxlbWVudF9sZW5ndGgKQEAgLTU1NywxNiArNDkxLDEzIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfdXRfZ2V0X2VsZW1lbnRfbGVuZ3RoICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdF90eXBlLAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnNvdXJjZV9vYmplY3QsCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqc3RhdGUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCkKK2FjcGlfdXRfZ2V0X2VsZW1lbnRfbGVuZ3RoKHU4IG9iamVjdF90eXBlLAorCQkJICAgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqc291cmNlX29iamVjdCwKKwkJCSAgIHVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqc3RhdGUsIHZvaWQgKmNvbnRleHQpCiB7Ci0J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AJY2FzZSBBQ1BJX0NPUFlfVFlQRV9QQUNLQUdFOgogCiAJCS8qIFBhY2thZ2Ugb2JqZWN0IC0gbm90aGluZyBtdWNoIHRvIGRvIGhlcmUsIGxldCB0aGUgd2FsayBoYW5kbGUgaXQgKi8KQEAgLTU5Miw3ICs1MjQsNiBAQAogCQlzdGF0ZS0+cGtnLnRoaXNfdGFyZ2V0X29iaiA9IE5VTEw7CiAJCWJyZWFrOwogCi0KIAlkZWZhdWx0OgogCiAJCS8qIE5vIG90aGVyIHR5cGVzIGFsbG93ZWQgKi8KQEAgLTYwMyw3ICs1MzQsNiBAQAogCXJldHVybiAoc3RhdHVzKTsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9wYWNrYWdlX29iamVjdF9zaXplCkBAIC02MjIsMjUgKzU1MiwyMiBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGFjcGlfc3RhdHVzCi1hY3BpX3V0X2dldF9wYWNrYWdlX29iamVjdF9zaXplICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICppbnRlcm5hbF9vYmplY3QsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqb2JqX2xlbmd0aCkKK2FjcGlfdXRfZ2V0X3BhY2thZ2Vfb2JqZWN0X3NpemUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqaW50ZXJuYWxfb2JqZWN0LAorCQkJCWFjcGlfc2l6ZSAqIG9ial9sZW5ndGgpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfcGtnX2luZm8gICAgICAgICAg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9ST1VORF9VUF9UT19OQVRJVkVfV09SRCAoc2l6ZW9mICh1bmlvbiBhY3BpX29iamVjdCkpICoKLQkJCSAgKGFjcGlfc2l6ZSkgaW5mby5udW1fcGFja2FnZXM7CisJaW5mby5sZW5ndGggKz0gQUNQSV9ST1VORF9VUF9UT19OQVRJVkVfV09SRChzaXplb2YodW5pb24gYWNwaV9vYmplY3QpKSAqCisJICAgIChhY3BpX3NpemUpIGluZm8ubnVtX3BhY2thZ2VzOwogCiAJLyogUmV0dXJuIHRoZSB0b3RhbCBwYWNrYWdlIGxlbmd0aCAqLwogCiAJKm9ial9sZW5ndGggPSBpbmZvLmxlbmd0aDsKLQlyZXR1cm5fQUNQSV9TVEFUVVMgKHN0YXR1cyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7CiB9CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfb2JqZWN0X3NpemUKQEAgLTY3MywyNSArNTk5LDIzIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBhY3BpX3N0YXR1cwotYWNwaV91dF9nZXRfb2JqZWN0X3NpemUgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKmludGVybmFsX29iamVjdCwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpvYmpfbGVuZ3RoKQorYWNwaV91dF9nZXRfb2JqZWN0X3NpemUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqaW50ZXJuYWxfb2JqZWN0LAorCQkJYWNwaV9zaXplICogb2JqX2xlbmd0aCkKIHsKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKKwlhY3BpX3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AqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoCisgKgorICogUEFSQU1FVEVSUzogIE9iamVjdCAgICAgICAgICAtIE9iamVjdCB0byBiZSBhZGRlZCB0byB0aGUgbmV3IHN0YXRlCisgKiAgICAgICAgICAgICAgQWN0aW9uICAgICAgICAgIC0gSW5jcmVtZW50L0RlY3JlbWVudAorICogICAgICAgICAgICAgIHN0YXRlX2xpc3QgICAgICAtIExpc3QgdGhlIHN0YXRlIHdpbGwgYmUgYWRkZWQgdG8KKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IENyZWF0ZSBhIG5ldyBzdGF0ZSBhbmQgcHVzaCBpdAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCithY3BpX3N0YXR1cworYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoKHZvaWQgKmludGVybmFsX29iamVjdCwKKwkJCQkgIHZvaWQgKmV4dGVybmFsX29iamVjdCwKKwkJCQkgIHUxNiBpbmRleCwKKwkJCQkgIHVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqKiBzdGF0ZV9saXN0KQoreworCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqc3RhdGU7CisKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CisKKwlzdGF0ZSA9CisJICAgIGFjcGlfdXRfY3JlYXRlX3BrZ19zdGF0ZShpbnRlcm5hbF9vYmplY3QsIGV4dGVybmFsX29iamVjdCwgaW5kZXgpOworCWlmICghc3RhdGUpIHsKKwkJcmV0dXJuIChBRV9OT19NRU1PUlkpOworCX0KKworCWFjcGlfdXRfcHVzaF9nZW5lcmljX3N0YXRlKHN0YXRlX2xpc3QsIHN0YXRlKTsKKwlyZXR1cm4gKEFFX09LKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9wdXNoX2dlbmVyaWNfc3RhdGUKKyAqCisgKiBQQVJBTUVURVJTOiAgbGlzdF9oZWFkICAgICAgICAgICAtIEhlYWQgb2YgdGhlIHN0YXRlIHN0YWNrCisgKiAgICAgICAgICAgICAgU3RhdGUgICAgICAgICAgICAgICAtIFN0YXRlIG9iamVjdCB0byBwdXNoCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogUHVzaCBhIHN0YXRlIG9iamVjdCBvbnRvIGEgc3RhdGUgc3RhY2sKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkCithY3BpX3V0X3B1c2hfZ2VuZXJpY19zdGF0ZSh1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKipsaXN0X2hlYWQsCisJCQkgICB1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlKQoreworCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X3B1c2hfZ2VuZXJpY19zdGF0ZSIpOworCisJLyogUHVzaCB0aGUgc3RhdGUgb2JqZWN0IG9udG8gdGhlIGZyb250IG9mIHRoZSBsaXN0IChzdGFjaykgKi8KKworCXN0YXRlLT5jb21tb24ubmV4dCA9ICpsaXN0X2hlYWQ7CisJKmxpc3RfaGVhZCA9IHN0YXRlOworCisJcmV0dXJuX1ZPSUQ7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcG9wX2dlbmVyaWNfc3RhdGUKKyAqCisgKiBQQVJBTUVURVJTOiAgbGlzdF9oZWFkICAgICAgICAgICAtIEhlYWQgb2YgdGhlIHN0YXRlIHN0YWNrCisgKgorICogUkVUVVJOOiAgICAgIFRoZSBwb3BwZWQgc3RhdGUgb2JqZWN0CisgKgorICogREVTQ1JJUFRJT046IFBvcCBhIHN0YXRlIG9iamVjdCBmcm9tIGEgc3RhdGUgc3RhY2sKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKmFjcGlfdXRfcG9wX2dlbmVyaWNfc3RhdGUodW5pb24gYWNwaV9nZW5lcmljX3N0YXRlCisJCQkJCQkgICAgKipsaXN0X2hlYWQpCit7CisJdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICpzdGF0ZTsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0UoInV0X3BvcF9nZW5lcmljX3N0YXRlIik7CisKKwkvKiBSZW1vdmUgdGhlIHN0YXRlIG9iamVjdCBhdCB0aGUgaGVhZCBvZiB0aGUgbGlzdCAoc3RhY2spICovCisKKwlzdGF0ZSA9ICpsaXN0X2hlYWQ7CisJaWYgKHN0YXRlKSB7CisJCS8qIFVwZGF0ZSB0aGUgbGlzdCBoZWFkICovCisKKwkJKmxpc3RfaGVhZCA9IHN0YXRlLT5jb21tb24ubmV4dDsKKwl9CisKKwlyZXR1cm5fUFRSKHN0YXRlKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfZ2VuZXJpY19zdGF0ZQorICoKKyAqIFBBUkFNRVRFUlM6ICBOb25lCisgKgorICogUkVUVVJOOiAgICAgIFRoZSBuZXcgc3RhdGUgb2JqZWN0LiBOVUxMIG9uIGZhaWx1cmUuCisgKgorICogREVTQ1JJUFRJT046IENyZWF0ZSBhIGdlbmVyaWMgc3RhdGUgb2JqZWN0LiAgQXR0ZW1wdCB0byBvYnRhaW4gb25lIGZyb20KKyAqICAgICAgICAgICAgICB0aGUgZ2xvYmFsIHN0YXRlIGNhY2hlOyAgSWYgbm9uZSBhdmFpbGFibGUsIGNyZWF0ZSBhIG5ldyBvbmUuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICphY3BpX3V0X2NyZWF0ZV9nZW5lcmljX3N0YXRlKHZvaWQpCit7CisJdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICpzdGF0ZTsKKworCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKKworCXN0YXRlID0gYWNwaV9vc19hY3F1aXJlX29iamVjdChhY3BpX2dibF9zdGF0ZV9jYWNoZSk7CisJaWYgKHN0YXRlKSB7CisJCS8qIEluaXRpYWxpemUgKi8KKwkJbWVtc2V0KHN0YXRlLCAwLCBzaXplb2YodW5pb24gYWNwaV9nZW5lcmljX3N0YXRlKSk7CisJCXN0YXRlLT5jb21tb24uZGF0YV90eXBlID0gQUNQSV9ERVNDX1RZUEVfU1RBVEU7CisJfQorCisJcmV0dXJuIChzdGF0ZSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY3JlYXRlX3RocmVhZF9zdGF0ZQorICoKKyAqIFBBUkFNRVRFUlM6ICBOb25lCisgKgorICogUkVUVVJOOiAgICAgIE5ldyBUaHJlYWQgU3RhdGUuIE5VTEwgb24gZmFpbHVyZQorICoKKyAqIERFU0NSSVBUSU9OOiBDcmVhdGUg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ICoKKyAqIFBBUkFNRVRFUlM6ICBPYmplY3QgICAgICAgICAgLSBJbml0aWFsIE9iamVjdCB0byBiZSBpbnN0YWxsZWQgaW4gdGhlIHN0YXRlCisgKiAgICAgICAgICAgICAgQWN0aW9uICAgICAgICAgIC0gVXBkYXRlIGFjdGlvbiB0byBiZSBwZXJmb3JtZWQKKyAqCisgKiBSRVRVUk46ICAgICAgTmV3IHN0YXRlIG9iamVjdCwgbnVsbCBvbiBmYWlsdXJlCisgKgorICogREVTQ1JJUFRJT046IENyZWF0ZSBhbiAiVXBkYXRlIFN0YXRlIiAtIGEgZmxhdm9yIG9mIHRoZSBnZW5lcmljIHN0YXRlIHVzZWQKKyAqICAgICAgICAgICAgICB0byB1cGRhdGUgcmVmZXJlbmNlIGNvdW50cyBhbmQgZGVsZXRlIGNvbXBsZXggb2JqZWN0cyBzdWNoCisgKiAgICAgICAgICAgICAgYXMgcGFja2FnZXMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICphY3BpX3V0X2NyZWF0ZV91cGRhdGVfc3RhdGUodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdAorCQkJCQkJICAgICAgKm9iamVjdCwgdTE2IGFjdGlvbikKK3sKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlOworCisJQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIoInV0X2NyZWF0ZV91cGRhdGVfc3RhdGUiLCBvYmplY3QpOworCisJLyogQ3JlYXRlIHRoZSBnZW5lcmljIHN0YXRlIG9iamVjdCAqLworCisJc3RhdGUgPSBhY3BpX3V0X2NyZWF0ZV9nZW5lcmljX3N0YXRlKCk7CisJaWYgKCFzdGF0ZSkgeworCQlyZXR1cm5fUFRSKE5VTEwpOworCX0KKworCS8qIEluaXQgZmllbGRzIHNwZWNpZmljIHRvIHRoZSB1cGRhdGUgc3RydWN0ICovCisKKwlzdGF0ZS0+Y29tbW9uLmRhdGFfdHlwZSA9IEFDUElfREVTQ19UWVBFX1NUQVRFX1VQREFURTsKKwlzdGF0ZS0+dXBkYXRlLm9iamVjdCA9IG9iamVjdDsKKwlzdGF0ZS0+dXBkYXRlLnZhbHVlID0gYWN0aW9uOworCisJcmV0dXJuX1BUUihzdGF0ZSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY3JlYXRlX3BrZ19zdGF0ZQorICoKKyAqIFBBUkFNRVRFUlM6ICBPYmplY3QgICAgICAgICAgLSBJbml0aWFsIE9iamVjdCB0byBiZSBpbnN0YWxsZWQgaW4gdGhlIHN0YXRlCisgKiAgICAgICAgICAgICAgQWN0aW9uICAgICAgICAgIC0gVXBkYXRlIGFjdGlvbiB0byBiZSBwZXJmb3JtZWQKKyAqCisgKiBSRVRVUk46ICAgICAgTmV3IHN0YXRlIG9iamVjdCwgbnVsbCBvbiBmYWlsdXJlCisgKgorICogREVTQ1JJUFRJT046IENyZWF0ZSBhICJQYWNrYWdlIFN0YXRlIgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3VuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlKHZvaWQgKmludGVybmFsX29iamVjdCwKKwkJCQkJCSAgIHZvaWQgKmV4dGVybmFsX29iamVjdCwKKwkJCQkJCSAgIHUxNiBpbmRleCkKK3sKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlOworCisJQUNQSV9GVU5DVElPTl9UUkFDRV9QVFIoInV0X2NyZWF0ZV9wa2df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KyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKmFjcGlfdXRfY3JlYXRlX2NvbnRyb2xfc3RhdGUodm9pZCkKK3sKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKnN0YXRlOworCisJQUNQSV9GVU5DVElPTl9UUkFDRSgidXRfY3JlYXRlX2NvbnRyb2xfc3RhdGUiKTsKKworCS8qIENyZWF0ZSB0aGUgZ2VuZXJpYyBzdGF0ZSBvYmplY3QgKi8KKworCXN0YXRlID0gYWNwaV91dF9jcmVhdGVfZ2VuZXJpY19zdGF0ZSgpOworCWlmICghc3RhdGUpIHsKKwkJcmV0dXJuX1BUUihOVUxMKTsKKwl9CisKKwkvKiBJbml0IGZpZWxkcyBzcGVjaWZpYyB0byB0aGUgY29udHJvbCBzdHJ1Y3QgKi8KKworCXN0YXRlLT5jb21tb24uZGF0YV90eXBlID0gQUNQSV9ERVNDX1RZUEVfU1RBVEVfQ09OVFJPTDsKKwlzdGF0ZS0+Y29tbW9uLnN0YXRlID0gQUNQSV9DT05UUk9MX0NPTkRJVElPTkFMX0VYRUNVVElORzsKKworCXJldHVybl9QVFIoc3RhdGUpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2RlbGV0ZV9nZW5lcmljX3N0YXRlCisgKgorICogUEFSQU1FVEVSUzogIFN0YXRlICAgICAgICAgICAgICAgLSBUaGUgc3RhdGUgb2JqZWN0IHRvIGJlIGRlbGV0ZWQKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBQdXQgYSBzdGF0ZSBvYmplY3QgYmFjayBpbnRvIHR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gICAoInV0eGZhY2UiKQotCitBQ1BJX01PRFVMRV9OQU1FKCJ1dHhmYWNlIikKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02Niw2MSArNjMsNTQgQEAKICAqICAgICAgICAgICAgICBjYWxsZWQsIHNvIGFueSBlYXJseSBpbml0aWFsaXphdGlvbiBiZWxvbmdzIGhlcmUuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfaW5pdGlhbGl6ZV9zdWJzeXN0ZW0gKAotCXZvaWQpCithY3BpX3N0YXR1cyBhY3BpX2luaXRpYWxpemVfc3Vic3lzdGVtKHZvaWQpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXM7CisJYWNwaV9zdGF0dXMgc3RhdHVzOwogCisJQUNQSV9GVU5DVElPTl9UUkFDRSgiYWNwaV9pbml0aWFsaXplX3N1YnN5c3RlbSIpOwogCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfaW5pdGlhbGl6ZV9zdWJzeXN0ZW0iKTsKLQotCi0JQUNQSV9ERUJVR19FWEVDIChhY3BpX3V0X2luaXRfc3RhY2tfcHRyX3RyYWNlICgpKTsKLQotCi0JLyogSW5pdGlhbGl6ZSBhbGwgZ2xvYmFscyB1c2VkIGJ5IHRoZSBzdWJzeXN0ZW0gKi8KLQotCWFjcGlfdXRfaW5pdF9nbG9iYWxzICgpOworCUFDUElfREVCVUdfRVhFQyhhY3BpX3V0X2luaXRfc3RhY2tfcHRyX3RyYWNlKCkpOwogCiAJLyogSW5pdGlhbGl6ZSB0aGUgT1MtRGVwZW5kZW50IGxheWVyICovCiAKLQlzdGF0dXMgPSBhY3BpX29zX2luaXRpYWxpem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yhzdGF0dXMpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMjMzLDE1ICsyMjEsMTEgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1hY3BpX3N0YXR1cwotYWNwaV9pbml0aWFsaXplX29iamVjdHMgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MpCithY3BpX3N0YXR1cyBhY3BpX2luaXRpYWxpemVfb2JqZWN0cyh1MzIgZmxhZ3MpCiB7Ci0JYWNwaV9zdGF0dXMgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgPSBBRV9PSzsKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKIAotCi0JQUNQSV9GVU5DVElPTl9UUkFDRSAoImFjcGlfaW5pdGlhbGl6ZV9vYmplY3RzIik7Ci0KKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJhY3BpX2luaXRpYWxpemVfb2JqZWN0cyIpOwogCiAJLyoKIAkgKiBSdW4gYWxsIF9SRUcgbWV0aG9kcwpAQCAtMjUxLDEyICsyMzUsMTIgQEAKIAkgKiBjb250YWluIGV4ZWN1dGFibGUgQU1MIChzZWUgY2FsbCB0byBhY3BpX25zX2luaXRpYWxpemVfb2JqZWN0cyBiZWxvdykuCiAJICovCiAJaWYgKCEoZmxhZ3MgJiBBQ1BJX05PX0FERFJFU1NfU1BBQ0VfSU5JVCkpIHsKLQkJQUNQSV9ERUJVR19QUklOVCAoKEFDUElfREJfRVhFQywKLQkJCSJbSW5pdF0gRXhlY3V0aW5nIF9SRUcgb3BfcmVnaW9uIG1ldGhvZHNcbiIpKTsKKwkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9FWEVDLAorCQkJCSAgIltJbml0X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hY3BpX2RiX3Rlcm1pbmF0ZSAoKTsKKwlhY3BpX2RiX3Rlcm1pbmF0ZSgpOwogI2VuZGlmCiAKIAkvKiBOb3cgd2UgY2FuIHNodXRkb3duIHRoZSBPUy1kZXBlbmRlbnQgbGF5ZXIgKi8KIAotCXN0YXR1cyA9IGFjcGlfb3NfdGVybWluYXRlICgpOwotCXJldHVybl9BQ1BJX1NUQVRVUyAoc3RhdHVzKTsKKwlzdGF0dXMgPSBhY3BpX29zX3Rlcm1pbmF0ZSgpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQogCi0KICNpZmRlZiBBQ1BJX0ZVVFVSRV9VU0FHRQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0zNjYsMjAgKzM0MiwxNiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX3N1YnN5c3RlbV9zdGF0dXMgKAotCXZvaWQpCithY3BpX3N0YXR1cyBhY3BpX3N1YnN5c3RlbV9zdGF0dXModm9pZCkKIHsKIAogCWlmIChhY3BpX2dibF9zdGFydHVwX2ZsYWdzICYgQUNQSV9JTklUSUFMSVpFRF9PSykgewogCQlyZXR1cm4gKEFFX09LKTsKLQl9Ci0JZWxzZSB7CisJfSBlbHNlIHsKIAkJcmV0dXJuIChBRV9FUlJPUik7CiAJfQogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRlVOQ1RJT046ICAgIGFjcGlfZ2V0X3N5c3RlbV9pbmZvCkBAIC0zOTgsNjQgKzM3MCw2MCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioq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c3lzdGVtX2luZm8pOwogCitFWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X3N5c3RlbV9pbmZvKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtNDg1LDkgKzQ1Myw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogYWNwaV9zdGF0dXMKLWFjcGlfaW5zdGFsbF9pbml0aWFsaXphdGlvbl9oYW5kbGVyICgKLQlhY3BpX2luaXRfaGFuZGxlciAgICAgICAgICAgICAgIGhhbmRsZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbikKK2FjcGlfaW5zdGFsbF9pbml0aWFsaXphdGlvbl9oYW5kbGVyKGFjcGlfaW5pdF9oYW5kbGVyIGhhbmRsZXIsIHUzMiBmdW5jdGlvbikKIHsKIAogCWlmICghaGFuZGxlcikgewpAQCAtNTAyLDcgKzQ2OCw3IEBACiAJcmV0dXJuIEFFX09LOwogfQogCi0jZW5kaWYgIC8qICBBQ1BJX0ZVVFVSRV9VU0FHRSAgKi8KKyNlbmRpZgkJCQkvKiAgQUNQSV9GVVRVUkVfVVNBR0UgICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTUxNiwxOSArNDgyLDEzIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX3B1cmdlX2NhY2hlZF9vYmplY3RzICgKLQl2b2lkKQorYWNwaV9zdGF0dXMgYWNwaV9wdXJnZV9jYWNoZWRfb2JqZWN0c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AogCQkJICAgICAgICZtc2csCi0JCQkgICAgICAgTlVMTCwKKwkJCSAgICAgICBpbnRmLAogCQkJICAgICAgICZzbWlfbXNnLAogCQkJICAgICAgICZyZWN2X21zZywKIAkJCSAgICAgICAwLAotCQkJICAgICAgIGludGYtPm15X2FkZHJlc3MsCi0JCQkgICAgICAgaW50Zi0+bXlfbHVuLAorCQkJICAgICAgIGludGYtPmNoYW5uZWxzWzBdLmFkZHJlc3MsCisJCQkgICAgICAgaW50Zi0+Y2hhbm5lbHNbMF0ubHVuLAogCQkJICAgICAgIDAsIDEpOyAvKiBEb24ndCByZXRyeSwgYW5kIGRvbid0IHdhaXQuICovCiAJfQogCkBAIC0yOTMwLDcgKzI5ODksNyBAQAogCWlmICghc3RyKSAKIAkJcmV0dXJuOwogCi0JZm9yIChpPTA7IGk8TUFYX0lQTUlfSU5URVJGQUNFUzsgaSsrKSB7CisJZm9yIChpID0gMDsgaSA8IE1BWF9JUE1JX0lOVEVSRkFDRVM7IGkrKykgewogCQljaGFyICAgICAgICAgICAgICAgICAgKnAgPSBzdHI7CiAJCXN0cnVjdCBpcG1pX2lwbWJfYWRkciAqaXBtYjsKIAkJaW50ICAgICAgICAgICAgICAgICAgIGo7CkBAIC0yOTYxLDEyICszMDIwLDEyIEBACiAJCQkgICAgICAgJmFkZHIsCiAJCQkgICAgICAgMCwKIAkJCSAgICAgICAmbXNnLAotCQkJICAgICAgIE5VTEwsCisJCQkgICAgICAgaW50ZiwKIAkJCSAgICAgICAmc21pX21zZywKIAkJCSAgICAgICAmcmVjdl9tc2csCiAJCQkgICAgICAgMCwKLQkJCSAgICAgICBpbnRmLT5teV9hZGRyZXNzLAotCQkJICAgICAgIGludGYtPm15X2x1biwKKwkJCSAgICAgICBpbnRmLT5jaGFubmVsc1swXS5hZGRyZXNzLAorCQkJICAgICAgIGludGYtPmNoYW5uZWxzWzBdLmx1biwKIAkJCSAgICAgICAwLCAxKTsgLyogRG9uJ3QgcmV0cnksIGFuZCBkb24ndC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kUpKSB7CiAJICAgIFdET0dfU0VUX1BSRVRJTUVPVVRfQUNUKGRhdGFbMV0sIHByZWFjdGlvbl92YWwpOwogCSAgICBkYXRhWzJdID0gcHJldGltZW91dDsKIAl9IGVsc2UgewpAQCAtNjU5LDE5ICs2NTcsMTggQEAKIAogc3RhdGljIGludCBpcG1pX29wZW4oc3RydWN0IGlub2RlICppbm8sIHN0cnVjdCBmaWxlICpmaWxlcCkKIHsKLSAgICAgICAgc3dpdGNoIChpbWlub3IoaW5vKSkKLSAgICAgICAgewotICAgICAgICAgICAgICAgIGNhc2UgV0FUQ0hET0dfTUlOT1I6Ci0JCSAgICBpZih0ZXN0X2FuZF9zZXRfYml0KDAsICZpcG1pX3dkb2dfb3BlbikpCisgICAgICAgIHN3aXRjaCAoaW1pbm9yKGlubykpIHsKKyAgICAgICAgY2FzZSBXQVRDSERPR19NSU5PUjoKKwkJaWYgKHRlc3RfYW5kX3NldF9iaXQoMCwgJmlwbWlfd2RvZ19vcGVuKSkKICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUJVU1k7CiAKLQkJICAgIC8qIERvbid0IHN0YXJ0IHRoZSB0aW1lciBub3csIGxldCBpdCBzdGFydCBvbiB0aGUKLQkJICAgICAgIGZpcnN0IGhlYXJ0YmVhdC4gKi8KLQkJICAgIGlwbWlfc3RhcnRfdGltZXJfb25faGVhcnRiZWF0ID0gMTsKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vbnNlZWthYmxlX29wZW4oaW5vLCBmaWxlcCk7CisJCS8qIERvbid0IHN0YXJ0IHRoZSB0aW1lciBub3csIGxldCBpdCBzdGFydCBvbiB0aGUKKwkJICAgZmlyc3QgaGVhcnRiZWF0LiAqLworCQlpcG1pX3N0YXJ0X3RpbWVyX29uX2hlYXJ0YmVhdCA9IDE7CisJCXJldHVybiBub25zZWVrYWJsZV9vcGVuKGlubywgZmlsZXApOwogCi0gICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAg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worLyoqCisgKiBkY2RiYXNfcmVib290X25vdGlmeTogaGFuZGxlIHJlYm9vdCBub3RpZmljYXRpb24gZm9yIGhvc3QgY29udHJvbAorICovCitzdGF0aWMgaW50IGRjZGJhc19yZWJvb3Rfbm90aWZ5KHN0cnVjdCBub3RpZmllcl9ibG9jayAqbmIsIHVuc2lnbmVkIGxvbmcgY29kZSwKKwkJCQl2b2lkICp1bnVzZWQpCit7CisJc3RhdGljIHVuc2lnbmVkIGludCBub3RpZnlfY250ID0gMDsKKworCXN3aXRjaCAoY29kZSkgeworCWNhc2UgU1lTX0RPV046CisJY2FzZSBTWVNfSEFMVDoKKwljYXNlIFNZU19QT1dFUl9PRkY6CisJCWlmIChob3N0X2NvbnRyb2xfb25fc2h1dGRvd24pIHsKKwkJCS8qIGZpcm13YXJlIGlzIGdvaW5nIHRvIHBlcmZvcm0gaG9zdCBjb250cm9sIGFjdGlvbiAqLworCQkJaWYgKCsrbm90aWZ5X2NudCA9PSAyKSB7CisJCQkJcHJpbnRrKEtFUk5fV0FSTklORworCQkJCSAgICAgICAiUGxlYXNlIHdhaXQgZm9yIHNodXRkb3duICIKKwkJCQkgICAgICAgImFjdGlvbiB0byBjb21wbGV0ZS4uLlxuIik7CisJCQkJZGNkYmFzX2hvc3RfY29udHJvbCgpOworCQkJfQorCQkJLyoKKwkJCSAqIHJlZ2lzdGVyIGFnYWluIGFuZCBpbml0aWF0ZSB0aGUgaG9zdCBjb250cm9sCisJCQkgKiBhY3Rpb24gb24gdGhlIHNlY29uZCBub3RpZmljYXRpb24gdG8gYWxsb3cKKwkJCSAqIGV2ZXJ5b25lIHRoYXQgcmVnaXN0ZXJlZCB0byBiZSBub3RpZmllZAorCQkJICovCisJCQlyZWdpc3Rlcl9yZWJvb3Rfbm90aWZpZXIobmIpOworCQl9CisJCWJyZWFrOworCX0KKworCXJldHVybiBOT1RJRllfRE9ORTsKK30KKworc3RhdGljIHN0cnVjdCBub3RpZmllcl9ibG9jayBkY2RiYXNfcmVib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2kyYyAqaTJjKQoreworCXVuc2lnbmVkIGxvbmcgdGltZW91dCA9IGppZmZpZXMgKyBIWi80OworCisJaWYgKGkyY19weGFfaXNfc2xhdmVtb2RlKGkyYykpIHsKKwkJZGV2X2RiZygmaTJjLT5hZGFwLmRldiwgIiVzOiBjYWxsZWQgaW4gc2xhdmUgbW9kZVxuIiwgX19mdW5jX18pOworCQlyZXR1cm47CisJfQorCisJd2hpbGUgKHRpbWVfYmVmb3JlKGppZmZpZXMsIHRpbWVvdXQpICYmIChJQk1SICYgMHgxKSA9PSAwKSB7CisJCXVuc2lnbmVkIGxvbmcgaWNyID0gSUNSOworCisJCWljciAmPSB+SUNSX1NUQVJUOworCQlpY3IgfD0gSUNSX0FDS05BSyB8IElDUl9TVE9QIHwgSUNSX1RCOworCisJCUlDUiA9IGljcjsKKworCQlzaG93X3N0YXRlKGkyYyk7CisKKwkJbXNsZWVwKDEpOworCX0KKworCUlDUiAmPSB+KElDUl9NQSB8IElDUl9TVEFSVCB8IElDUl9TVE9QKTsKK30KKworc3RhdGljIGludCBpMmNfcHhhX3dhaXRfYnVzX25vdF9idXN5KHN0cnVjdCBweGFfaTJjICppMmMpCit7CisJaW50IHRpbWVvdXQgPSBERUZfVElNRU9VVDsKKworCXdoaWxlICh0aW1lb3V0LS0gJiYgSVNSICYgKElTUl9JQkIgfCBJU1JfVUIpKSB7CisJCWlmICgoSVNSICYgSVNSX1NBRCkgIT0gMCkKKwkJCXRpbWVvdXQgKz0gNDsKKworCQltc2xlZXAoMik7CisJCXNob3dfc3RhdGUoaTJjKTsKKwl9CisKKwlpZiAodGltZW91dCA8PSAwKQorCQlzaG93X3N0YXRlKGkyYyk7CisKKwlyZXR1cm4gdGltZW91dCA8PSAwID8gSTJDX1JFVFJZIDogMDsKK30KKworc3RhdGljIGludCBpMmNfcHhhX3dhaXRfbWFzdGVyKHN0cnVjdCBweGFfaTJjICppMmMpCit7CisJdW5zaWduZWQgbG9uZyB0aW1lb3V0ID0gamlmZmllc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i1jb3JlL2R2Yl9kZW11eC5jCkBAIC0zOCw4MiArMzgsNTIgQEAKICovCiAvLyAjZGVmaW5lIERWQl9ERU1VWF9TRUNUSU9OX0xPU1NfTE9HCiAKLQotc3RhdGljIExJU1RfSEVBRChkbXhfbXV4cyk7Ci0KLQotc3RhdGljIGludCBkbXhfcmVnaXN0ZXJfZGVtdXgoc3RydWN0IGRteF9kZW11eCAqZGVtdXgpCi17Ci0JZGVtdXgtPnVzZXJzID0gMDsKLQlsaXN0X2FkZCgmZGVtdXgtPnJlZ19saXN0LCAmZG14X211eHMpOwotCXJldHVybiAwOwotfQotCi1zdGF0aWMgaW50IGRteF91bnJlZ2lzdGVyX2RlbXV4KHN0cnVjdCBkbXhfZGVtdXgqIGRlbXV4KQotewotCXN0cnVjdCBsaXN0X2hlYWQgKnBvcywgKm4sICpoZWFkPSZkbXhfbXV4czsKLQotCWxpc3RfZm9yX2VhY2hfc2FmZSAocG9zLCBuLCBoZWFkKSB7Ci0JCWlmIChETVhfRElSX0VOVFJZKHBvcykgPT0gZGVtdXgpIHsKLQkJCWlmIChkZW11eC0+dXNlcnM+MCkKLQkJCQlyZXR1cm4gLUVJTlZBTDsKLQkJCWxpc3RfZGVsKHBvcyk7Ci0JCQlyZXR1cm4gMDsKLQkJfQotCX0KLQotCXJldHVybiAtRU5PREVWOwotfQotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIHN0YXRpYyBpbmxpbmVkIGhlbHBlciBmdW5jdGlvbnMKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQogc3RhdGljIGlubGluZSB1MTYgc2VjdGlvbl9sZW5ndGgoY29uc3QgdTggKmJ1ZikKIHsKLQlyZXR1cm4gMysoKGJ1ZlsxXSYweDBmKTw8OCkrYnVmWzJdO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DAwLCAweDQwMDAwfSwKIAkubmVlZHNfdHZhdWRpbwk9IDAsCiAJLnR1bmVyX3R5cGUJPSBUVU5FUl9QSElMSVBTX1BBTCwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJLmF1ZGlvX2hvb2sJPSB0ZXJyYXR2X2F1ZGlvLAogCS8qIEdQSU8gd2lyaW5nOgotICAgICAgICAgICAgICAgRXh0ZXJuYWwgMjAgcGluIGNvbm5lY3RvciAoZm9yIEFjdGl2ZSBSYWRpbyBVcGdyYWRlIGJvYXJkKQotICAgICAgICAgICAgICAgZ3BpbzAwOiBpMmMtc2RhCi0gICAgICAgICAgICAgICBncGlvMDE6IGkyYy1zY2wKLSAgICAgICAgICAgICAgIGdwaW8wMjogb201NjEwLWRhdGEKLSAgICAgICAgICAgICAgIGdwaW8wMzogb201NjEwLWNsawotICAgICAgICAgICAgICAgZ3BpbzA0OiBvbTU2MTAtd3JlCi0gICAgICAgICAgICAgICBncGlvMDU6IG9tNTYxMC1zdGVyZW8KLSAgICAgICAgICAgICAgIGdwaW8wNjogcmRzNjU4OC1kYXZuCi0gICAgICAgICAgICAgICBncGlvMDc6IFBpbiA3IG4uYy4KLSAgICAgICAgICAgICAgIGdwaW8wODogbklPVwotICAgICAgICAgICAgICAgZ3BpbzA5KzEwOiBuSU9SLCBuU0VMID8/IChidDg3OCkKLSAgICAgICAgICAgICAgICBncGlvMDk6IG5JT1IgKGJ0ODQ4KQotICAgICAgICAgICAgICAgIGdwaW8xMDogblNFTCAoYnQ4NDgpCi0gICAgICAgICAgICAgIFNvdW5kIFJvdXRpbmc6Ci0gICAgICAgICAgICAgICBncGlvMTY6IHUyLUEwICgxc3QgNDA1MmJ0KQotICAgICAgICAgICAgICAgZ3BpbzE3OiB1Mi1BMQotICAgICAgICAgICAgICAgZ3BpbzE4OiB1Mi1uRU4KLSAgICAgICAgICAgICAgIGdwaW8xOTogdTQtQTAgKDJuZCA0MDUyKQotICAgICAgICAgICAgICAgZ3B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gICAgICAgPSAwLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAyLAotICAgICAgICAuZ3Bpb21hc2sgICAgICAgPSAweGUwMCwKLSAgICAgICAgLm11eHNlbCAgICAgICAgID0geyAyLCAzLCAxLCAxfSwKLSAgICAgICAgLmF1ZGlvbXV4ICAgICAgID0geyAweDQwMCwgMHg0MDAsIDB4NDAwLCAweDQwMCwgMHg4MDAsIDB4NDAwIH0sCi0gICAgICAgIC5uZWVkc190dmF1ZGlvICA9IDEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gVFVORVJfVEVNSUNfNDAzNkZZNV9OVFNDLAorCS8qIERhbmllbCBIZXJyaW5ndG9uIDxkYW5pZWwuaGVycmluZ3RvbkBob21lLmNvbT4gKi8KKwkubmFtZSAgICAgICAgICAgPSAiQXNrZXkgQ1BIMDYwLyBQaG9lYmUgVFYgTWFzdGVyIE9ubHkgKE5vIEZNKSIsCisJLnZpZGVvX2lucHV0cyAgID0gMywKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnN2aHMgICAgICAgICAgID0gMiwKKwkuZ3Bpb21hc2sgICAgICAgPSAweGUwMCwKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDF9LAorCS5hdWRpb211eCAgICAgICA9IHsgMHg0MDAsIDB4NDAwLCAweDQwMCwgMHg0MDAsIDB4ODAwLCAweDQwMCB9LAorCS5uZWVkc190dmF1ZGlvICA9IDEsCisJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAorCS50dW5lcl90eXBlICAgICA9IFRVTkVSX1RFTUlDXzQwMzZGWTVfTlRTQywKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiB9LHsKIAkvKiBNYXR0aSBNb3R0dXMgPG1vdHR1c0BwaHlzaWMudXQuZWU+ICovCiAJLm5hbWUJCT0gIkFza2V5IENQSD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AgLDF9LAorCS50dW5lcl90eXBlICAgICA9IFRVTkVSX01UMjAzMiwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJLnBsbAkJPSBQTExfMjgsCiAJLmhhc19yYWRpbwk9IDEsCiB9LHsKQEAgLTEyNzksMjIgKzEzNDgsMjQgQEAKIAkuYXVkaW9faW5wdXRzICAgPSAwLAogCS50dW5lciAgICAgICAgICA9IC0xLAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAkucGxsICAgICAgICAgICAgPSBQTExfMjgsCiAJLm11eHNlbCAgICAgICAgID0geyAyIH0sCiAJLmdwaW9tYXNrICAgICAgID0gMAogfSx7Ci0gICAgICAgIC8qIFRvbWFzeiBQeXJhIDxoZWxsZmlyZUBzZWRlei5pcS5wbD4gKi8KLSAgICAgICAgLm5hbWUgICAgICAgICAgID0gIlByb2xpbmsgUGl4ZWx2aWV3IFBWLUJUODc4UCsgKFJldi40Qyw4RSkiLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSAzLAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSA0LAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAwLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAyLAotICAgICAgICAuZ3Bpb21hc2sgICAgICAgPSAxNSwKLSAgICAgICAgLm11eHNlbCAgICAgICAgID0geyAyLCAzLCAxLCAxfSwKLSAgICAgICAgLmF1ZGlvbXV4ICAgICAgID0geyAwLCAwLCAxMSwgNywgMTMsIDB9LCAvLyBUViBhbmQgUmFkaW8gd2l0aCBzYW1lIEdQSU8gIQotICAgICAgICAubmVlZHNfdHZhdWRpbyAgPSAxLAotICAgICAgICAucGxsICAgICAgICAgICAgPSBQTExfMjgsCi0gICAgICAgIC50dW5lcl90eXBlICAgICA9IDI1LAorCS8qIFRvbWFzeiBQeXJhIDxoZWxsZmlyZUBzZWRlei5pcS5wbD4gKi8KKwkubmFtZSAg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0byB3b3JrICovCkBAIC0xMzUyLDYgKzE0MjYsNyBAQAogCS5hdWRpb211eCAgICAgICA9IHsgMCB9LAogCS5uZWVkc190dmF1ZGlvICA9IDAsCiAJLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogfSx7CiAJLyogTWlndWVsIEZyZWl0YXMgPG1pZ3VlbEBjZXR1Yy5wdWMtcmlvLmJyPiAqLwogCS5uYW1lICAgICAgICAgICA9ICJSZW1vdGVWaXNpb24gTVggKFJWNjA1KSIsCkBAIC0xMzYyLDcxICsxNDM3LDc4IEBACiAJLmdwaW9tYXNrICAgICAgID0gMHgwMCwKIAkuZ3Bpb21hc2syICAgICAgPSAweDA3ZmYsCiAJLm11eHNlbCAgICAgICAgID0geyAweDMzLCAweDEzLCAweDIzLCAweDQzLCAweGYzLCAweDczLCAweGUzLCAweDAzLAotCQkJICAweGQzLCAweGIzLCAweGMzLCAweDYzLCAweDkzLCAweDUzLCAweDgzLCAweGEzIH0sCisJCQkweGQzLCAweGIzLCAweGMzLCAweDYzLCAweDkzLCAweDUzLCAweDgzLCAweGEzIH0sCiAJLm5vX21zcDM0eHggICAgID0gMSwKIAkubm9fdGRhOTg3NSAgICAgPSAxLAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAkubXV4c2VsX2hvb2sgICAgPSBydjYwNV9tdXhzZWwsCiB9LHsKLSAgICAgICAgLm5hbWUgICAgICAgICAgID0gIlBvd2VyY29sb3IgTVRWODc4LyBNVFY4NzhSLyBNVFY4NzhGIiwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gMywKLSAgICAgICAgLmF1ZGlvX2lucHV0cyAgID0gMiwKKwkubmFtZSAgICAgICAgICAgPSAiUG93ZXJjb2xvciBNVFY4NzgvIE1UVjg3OFIvIE1UVjg3OEYiLAorCS52aWRlb19pbnB1dHMgICA9IDMsCisJLmF1ZGlvX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NUEFRIFByZXNhcmlvIDM1MjRKUCwgNTExMkpQKSIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDMsCi0gICAgICAgIC5hdWRpb19pbnB1dHMgICA9IDEsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IDAsCi0gICAgICAgIC5zdmhzICAgICAgICAgICA9IDIsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDB4MTQwMDA3LAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDEgfSwKLSAgICAgICAgLmF1ZGlvbXV4ICAgICAgID0geyAwLCAxLCAyLCAzLCA0LCAwIH0sCi0gICAgICAgIC50dW5lcl90eXBlICAgICA9IFRVTkVSX1BISUxJUFNfTlRTQywKLSAgICAgICAgLmF1ZGlvX2hvb2sgICAgID0gd2luZHZyX2F1ZGlvLAorCS8qIE1hc2FraSBTdXp1a2kgPG1hc2FraUBidHJlZS5vcmc+ICovCisJLm5hbWUgICAgICAgICAgID0gIkNhbm9wdXMgV2luRFZSIFBDSSAoQ09NUEFRIFByZXNhcmlvIDM1MjRKUCwgNTExMkpQKSIsCisJLnZpZGVvX2lucHV0cyAgID0gMywKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnN2aHMgICAgICAgICAgID0gMiwKKwkuZ3Bpb21hc2sgICAgICAgPSAweDE0MDAwNywKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDEgfSwKKwkuYXVkaW9tdXggICAgICAgPSB7IDAsIDEsIDIsIDMsIDQsIDAgfSwKKwkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX05UU0MsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5hdWRpb19ob29rICAgICA9IHdpbmR2cl9hdWRpbywKIH0sewotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiR3JhbmRUZWMgTXVsdGkgQ2FwdHVyZSBDYXJkIChCdDg3OCkiLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSA0LAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAwLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAtMSwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDAsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAotICAgICAgICAuYXVkaW9tdXggICAgICAgPSB7IDAgfSwKLSAgICAgICAgLm5lZWRzX3R2YXVkaW8gID0gMCwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSAtMSwKKwkubmFtZSAgICAgICAgICAgPSAiR3JhbmRUZWMgTXVsdGkgQ2FwdHVyZSBDYXJkIChCdDg3OCkiLAorCS52aWRlb19pbnB1dHMgICA9IDQsCisJLmF1ZGlvX2lucHV0cyAgID0gMCwKKwkudHVuZXIgICAgICAgICAgPSAtMSwKKwkuc3ZocyAgICAgICAgICAgPSAtMSwKKwkuZ3Bpb21hc2sgICAgICAgPSAwLAorCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAorCS5hdWRpb211eCAgICAgICA9IHsgMCB9LAorCS5uZWVkc190dmF1ZGlvICA9IDAsCisJLm5vX21zcDM0eHggICAgID0gMSwKKwkucGxsICAgICAgICAgICAgPSBQTExfMjgsCisJLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogfSx7Ci0gICAgICAgIC5uYW1lICAgICAgICAgICA9ICJKZXR3YXkgVFYvQ2FwdHVyZSBKVy1UVjg3OC1GQkssIEt3b3JsZCBLVy1UVjg3OFJGIiwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gNCwKLSAgICAgICAgLmF1ZGlvX2lucHV0cyAg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mVyX2FkZHIJPSBBRERSX1VOU0VULAogfSx7CiAKLSAgICAgICAgLyogLS0tLSBjYXJkIDB4NTAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCS8qIC0tLS0gY2FyZCAweDUwIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIAkubmFtZSAgICAgICAgICAgPSAiSGF1cHBhdWdlIFdpblRWIFBWUiIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDQsCi0gICAgICAgIC5hdWRpb19pbnB1dHMgICA9IDEsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IDAsCi0gICAgICAgIC5zdmhzICAgICAgICAgICA9IDIsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiwgMCwgMSwgMX0sCi0gICAgICAgIC5uZWVkc190dmF1ZGlvICA9IDEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnZpZGVvX2lucHV0cyAgID0gNCwKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnN2aHMgICAgICAgICAgID0gMiwKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDAsIDEsIDF9LAorCS5uZWVkc190dmF1ZGlvICA9IDEsCisJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAorCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAogCS5ncGlvbWFzayAgICAgICA9IDcsCiAJLmF1ZGlvbXV4ICAgICAgID0gezd9LApAQCAtMTQ3MSw2ICsxNTU1LDcgQEAKIAkubm9fbXNwMzR4eCAgICAgPSAxLAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX05UU0NfTSwKKw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LS0tLS0tLS0tLS0gKi8KQEAgLTE1MDgsOSArMTU5NSwxMCBAQAogCS5tdXhzZWwgICAgICAgICA9IHsgMywgMSB9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCisJLm5vX21zcDM0eHggICAgID0gMSwKKwkubm9fdGRhOTg3NSAgICAgPSAxLAorCS5ub190ZGE3NDMyICAgICA9IDEsCiB9LHsKIAkubmFtZSAgICAgICAgICAgPSAiT3NwcmV5IDEwMS8xNTEiLCAgICAgICAvKiAweDEoNHw1KS0wMDA0LUM0ICovCiAJLnZpZGVvX2lucHV0cyAgID0gMSwKQEAgLTE1MjAsOSArMTYwOCwxMCBAQAogCS5tdXhzZWwgICAgICAgICA9IHsgMCB9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCisJLm5vX21zcDM0eHggICAgID0gMSwKKwkubm9fdGRhOTg3NSAgICAgPSAxLAorCS5ub190ZGE3NDMyICAgICA9IDEsCiB9LHsKIAkubmFtZSAgICAgICAgICAgPSAiT3NwcmV5IDEwMS8xNTEgdy8gc3ZpZCIsICAvKiAweCgxNnwxN3wyMCktMDBDNC1DMSAqLwogCS52aWRlb19pbnB1dHMgICA9IDIsCkBAIC0xNTMyLDkgKzE2MjEsMTAgQEAKIAkubXV4c2VsICAgICAgICAgPSB7IDAsIDEgfSwKIAkucGxsICAgICAgICAgICAgPSBQTExfMjgsCiAJLnR1bmVyX3R5cGUgICAgID0gLTEsCi0gICAgICAgIC5ub19tc3AzNHh4ICAgICA9IDEsCi0gICAgICAgIC5ub190ZGE5ODc1ICAgICA9IDEsCi0gICAgICAgIC5ub190ZGE3NDMyICAgICA9IDEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5ub19tc3AzNHh4ICAgICA9IDEsCisJLm5vX3RkYTk4NzUgICAgID0gMSwKKwkubm9fdGRhNzQzMiAgICAgPSAxLAogfSx7CiAJLm5hbWUgICAgICAgICAgID0gIk9zcHJleSAyMDAvMjAxLzI1MC8yNTEiLCAgLyogMHgxKDh8OXxFfEYpLTAwMDQtQzQgKi8KIAkudmlkZW9faW5wdXRzICAgPSAxLApAQCAtMTU0MywxMCArMTYzMywxMSBAQAogCS5zdmhzICAgICAgICAgICA9IC0xLAogCS5tdXhzZWwgICAgICAgICA9IHsgMCB9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLQkudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfdHlwZQk9IFVOU0VULAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKKwkubm9fbXNwMzR4eCAgICAgPSAxLAorCS5ub190ZGE5ODc1ICAgICA9IDEsCisJLm5vX3RkYTc0MzIgICAgID0gMSwKIH0sewogCiAJLyogLS0tLSBjYXJkIDB4NTggLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwpAQCAtMTU1NywxMCArMTY0OCwxMSBAQAogCS5zdmhzICAgICAgICAgICA9IDEsCiAJLm11eHNlbCAgICAgICAgID0geyAwLCAxIH0sCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotCS50dW5lcl90eXBlICAgICA9IC0xLAotICAgICAgICAubm9fbXNwMzR4eCAgICAgPSAxLAotICAgICAgICAubm9fdGRhOTg3NSAgICAgPSAxLAotICAgICAgICAubm9fdGRhNzQzMiAgICAgPSAxLAorCS50dW5lcl90eXBlCT0gVU5TRVQsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5ub19tc3AzNHh4ICAgICA9IDEsCisJLm5vX3RkYTk4NzUgICAgID0gMSwKKwkubm9fdGRhNzQzMiAgICAgPSAxLAogfSx7CiAJLm5hbWUgICAgICAgICAgID0gIk9zcHJleSAyMTAvMjIwIiwgICAvKiAweDEoQXxCKS0wNEMwLUMxICovCiAJLnZpZGVvX2lucHV0cyAgID0gMiwKQEAgLTE1NjksMTAgKzE2NjEsMTEgQEAKIAkuc3ZocyAgICAgICAgICAgPSAxLAogCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMyB9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLQkudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfdHlwZQk9IFVOU0VULAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKKwkubm9fbXNwMzR4eCAgICAgPSAxLAorCS5ub190ZGE5ODc1ICAgICA9IDEsCisJLm5vX3RkYTc0MzIgICAgID0gMSwKIH0sewogCS5uYW1lICAgICAgICAgICA9ICJPc3ByZXkgNTAwIiwgICAvKiA1MDAgKi8KIAkudmlkZW9faW5wdXRzICAgPSAyLApAQCAtMTU4MiwxOSArMTY3NSwyMSBAQAogCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMyB9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCisJLm5vX21zcDM0eHggICAgID0gMSwKKwkubm9fdGRhOTg3NSAgICAgPSAxLAorCS5ub190ZGE3NDMyICAgICA9IDEsCiB9LHsKLSAgICAgICAubmFtZSAgICAgICAgICAgPSAiT3NwcmV5IDU0MCIsICAgLyogNTQwICovCi0gICAgICAgLnZpZGVvX2lucHV0cyAgID0gNCwKLSAgICAgICAuYXVkaW9faW5wdXRzICAgPSAxLAotICAgICAgIC50dW5lciAgICAgICAgICA9IC0xLAotICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAubm9fbXNwMzR4eCAgICAgPSAxLAotICAgICAgIC5ub190ZGE5ODc1ICAgICA9IDEsCi0gICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKKwkubmFtZSAgICAgICAgICAgPSAiT3NwcmV5IDU0MCIsICAgLyogNTQwICovCisJLnZpZGVvX2lucHV0cyAgID0gNCwKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IC0xLAorCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKKwkudHVuZXJfdHlwZSAgICAgPSAtMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCisJLm5vX21zcDM0eHggICAgID0gMSwKKwkubm9fdGRhOTg3NSAgICAgPSAxLAorCS5ub190ZGE3NDMyICAgICA9IDEsCiB9LHsKIAogCS8qIC0tLS0gY2FyZCAweDVDIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KQEAgLTE2MDUsMTAgKzE3MDAsMTEgQEAKIAkuc3ZocyAgICAgICAgICAgPSAxLAogCS5tdXhzZWwgIC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xLAogCS5ub190ZGE3NDMyICAgICA9IDEsCkBAIC0xNjQxLDM4ICsxNzM5LDQwIEBACiAJLm5vX2dwaW9pcnEgICAgID0gMSwKIAkuaGFzX2R2YiAgICAgICAgPSAxLAogfSx7Ci0gICAgICAgIC5uYW1lICAgICAgICAgICA9ICJGb3JtYWMgUHJvVFYgSUkgKGJ0ODc4KSIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDQsCi0gICAgICAgIC5hdWRpb19pbnB1dHMgICA9IDEsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IDAsCi0gICAgICAgIC5zdmhzICAgICAgICAgICA9IDMsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDIsCi0JLy8gVFYsIENvbXAxLCBDb21wb3NpdGUgb3ZlciBTVklEIGNvbiwgU1ZJRAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDF9LAotICAgICAgICAuYXVkaW9tdXggICAgICAgPSB7IDIsIDIsIDAsIDAsIDAgfSwKLSAgICAgICAgLnBsbCAgICAgICAgICAgID0gUExMXzI4LAorCS5uYW1lICAgICAgICAgICA9ICJGb3JtYWMgUHJvVFYgSUkgKGJ0ODc4KSIsCisJLnZpZGVvX2lucHV0cyAgID0gNCwKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnN2aHMgICAgICAgICAgID0gMywKKwkuZ3Bpb21hc2sgICAgICAgPSAyLAorCS8qIFRWLCBDb21wMSwgQ29tcG9zaXRlIG92ZXIgU1ZJRCBjb24sIFNWSUQgKi8KKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDF9LAorCS5hdWRpb211eCAgICAgICA9IHsgMiwgMiwgMCwgMCwgMCB9LAorCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkuaGFzX3JhZGlvICAgICAgPSAxLAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX1B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SAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDcsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMX0sCi0gICAgICAgIC5hdWRpb211eCAgICAgICA9IHsgMCwgMSwgMiwgMywgNH0sCi0gICAgICAgIC5uZWVkc190dmF1ZGlvICA9IDEsCi0gICAgICAgIC50dW5lcl90eXBlICAgICA9IDUsCisJLnZpZGVvX2lucHV0cyAgID0gMywKKwkuYXVkaW9faW5wdXRzICAgPSAxLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnN2aHMgICAgICAgICAgID0gLTEsCisJLmdwaW9tYXNrICAgICAgID0gNywKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDF9LAorCS5hdWRpb211eCAgICAgICA9IHsgMCwgMSwgMiwgMywgNH0sCisJLm5lZWRzX3R2YXVkaW8gID0gMSwKKwkudHVuZXJfdHlwZSAgICAgPSA1LAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAkucGxsICAgICAgICAgICAgPSAxLAogfSx7CiAJLm5hbWUgICAgICAgICAgID0gIkV1cmVzeXMgUGljb2xvIiwKQEAgLTE2ODYsNiArMTc4Niw4IEBACiAJLm5vX3RkYTc0MzIgICAgID0gMSwKIAkubXV4c2VsICAgICAgICAgPSB7IDIsIDAsIDF9LAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKKwkudHVuZXJfdHlwZSAgICAgPSBVTlNFVCwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiB9LHsKIAkvKiBMdWMgVmFuIEhvZXlsYW5kdCA8bHVjQGUtbWFnaWMuYmU+ICovCiAJLm5hbWUgICAgICAgICAgID0gIlByb1ZpZGVvIFBWMTUwIiwgLyogMHg0ZiAqLwpAQCAtMTY5OSw3ICsxODAxLDggQEAKIAkubmVlZHNfdHZhdWRpbyAgPSAwLAogCS5ub19tc3AzNHh4ICAgICA9IDEsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl90eXBlICAgICA9IFVOU0VULAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIH0sewogCS8qIEhpcm9zaGkgVGFrZWthd2EgPHNpYW5AYmlnLm9yLmpwPiAqLwogCS8qIFRoaXMgY2FyZCBsYWNrcyBzdWJzeXN0ZW0gSUQgKi8KQEAgLTE3MTYsNzggKzE4MTksODUgQEAKIAkubm9fbXNwMzR4eCAgICAgPSAxLAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSAyLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAkuYXVkaW9faG9vawk9IGFkdHZrNTAzX2F1ZGlvLAogfSx7CiAKIAkvKiAtLS0tIGNhcmQgMHg2NCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCi0gICAgICAgIC5uYW1lICAgICAgICAgICA9ICJIZXJjdWxlcyBTbWFydCBUViBTdGVyZW8iLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSA0LAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAxLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAwLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAyLAotICAgICAgICAuZ3Bpb21hc2sgICAgICAgPSAweDAwLAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDEgfSwKLSAgICAgICAgLm5lZWRzX3R2YXVkaW8gID0gMSwKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSA1LAorCS5uYW1lICAgICAgICAgICA9ICJIZXJjdWxlcyBTbWFydCBUViBTdGVyZW8iLAorCS52aWRlb19pbnB1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AgICAgICAgICAgPSAiUGFjZSBUViAmIFJhZGlvIENhcmQiLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSA0LAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAxLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAwLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAyLAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDF9LCAvLyBUdW5lciwgQ1ZpZCwgU1ZpZCwgQ1ZpZCBvdmVyIFNWaWQgY29ubmVjdG9yCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDAsCi0gICAgICAgIC5ub190ZGE5ODc1ICAgICA9IDEsCi0gICAgICAgIC5ub190ZGE3NDMyICAgICA9IDEsCi0gICAgICAgIC50dW5lcl90eXBlICAgICA9IDEsCi0gICAgICAgIC5oYXNfcmFkaW8gICAgICA9IDEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAgLyogQnQ4NzgsIEJ0ODMyLCBGSTEyNDYgdHVuZXI7IG5vIHBjaSBzdWJzeXN0ZW0gaWQKLSAgICAgICAgICAgb25seSBpbnRlcm5hbCBsaW5lIG91dDogKDRwaW4gaGVhZGVyKSBSR0dMCi0gICAgICAgICAgIFJhZGlvIG11c3QgYmUgZGVjb2RlZCBieSBtc3AzNDEwZCAobm90IHJvdXRlZCB0aHJvdWdoKSovCi0gICAgICAgIC8vICAgICAgICAgLmRpZ2l0YWxfbW9kZSAgID0gRElHSVRBTF9NT0RFX0NBTUVSQSwgLy8gdG9kbyEKKwkubmFtZSAgICAgICAgICAgPSAiUGFjZSBUViAmIFJhZGlvIENhcmQiLAorCS52aWRlb19pbnB1dHMgICA9IDQsCisJLmF1ZGlvX2lucHV0cyAgID0gMSwKKwkudHVuZXIgICAgICAgICAgPSAwLAorCS5zdmhzICAgICAgICAgICA9IDIsCisJLm11eHNlbCAgICAgICAgID0geyAyLCAzLCAxLCAxfSwgLyogVHVuZXIsIENWaWQsIFNWaWQsIENWaWQgb3ZlciBTVmlkIGNvbm5lY3RvciAqLworCS5ncGlvbWFzayAgICAgICA9IDAsCisJLm5vX3RkYTk4NzUgICAgID0gMSwKKwkubm9fdGRhNzQzMiAgICAgPSAxLAorCS50dW5lcl90eXBlICAgICA9IDEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5oYXNfcmFkaW8gICAgICA9IDEsCisJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAorCS8qIEJ0ODc4LCBCdDgzMiwgRkkxMjQ2IHR1bmVyOyBubyBwY2kgc3Vic3lzdGVtIGlkCisJb25seSBpbnRlcm5hbCBsaW5lIG91dDogKDRwaW4gaGVhZGVyKSBSR0dMCisJUmFkaW8gbXVzdCBiZSBkZWNvZGVkIGJ5IG1zcDM0MTBkIChub3Qgcm91dGVkIHRocm91Z2gpKi8KKwkvKgorCS5kaWdpdGFsX21vZGUgICA9IERJR0lUQUxfTU9ERV9DQU1FUkEsICB0b2RvIQorCSovCiB9LHsKLSAgICAgICAgLyogQ2hyaXMgV2lsbGluZyA8Y2hyaXNAdmlzbGFiLnVzeWQuZWR1LmF1PiAqLwotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiSVZDLTIwMCIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDEsCi0gICAgICAgIC5hdWRpb19pbnB1dHMgICA9IDAsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IC0xLAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDB4ZGYsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiB9LAotICAgICAgICAucGxsICAgICAgICAgICAgPSBQTExfMjgsCisJLyogQ2hyaXMgV2lsbGluZyA8Y2hyaXNAdmlzbGFiLnVzeWQuZWR1LmF1PiAqLworCS5uYW1lICAgICAgICAgICA9ICJJVkMtMjAwIiwKKwkudmlkZW9faW5wdXRzICAgPSAxLAorCS5hdWRpb19pbnB1dHMgICA9IDAsCisJLnR1bmVyICAgICAgICAgID0gLTEsCisJLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5zdmhzICAgICAgICAgICA9IC0xLAorCS5ncGlvbWFzayAgICAgICA9IDB4ZGYsCisJLm11eHNlbCAgICAgICAgID0geyAyIH0sCisJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAogfSx7CiAJLm5hbWUgICAgICAgICAgID0gIkdyYW5kIFgtR3VhcmQgLyBUcnVzdCA4MTRQQ0kiLAogCS52aWRlb19pbnB1dHMgICA9IDE2LAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAwLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAtMSwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCisJLmF1ZGlvX2lucHV0cyAgID0gMCwKKwkudHVuZXIgICAgICAgICAgPSAtMSwKKwkuc3ZocyAgICAgICAgICAgPSAtMSwKIAkudHVuZXJfdHlwZSAgICAgPSA0LAotICAgICAgICAuZ3Bpb21hc2syICAgICAgPSAweGZmLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKKwkuZ3Bpb21hc2syICAgICAgPSAweGZmLAogCS5tdXhzZWwgICAgICAgICA9IHsgMiwyLDIsMiwgMywzLDMsMywgMSwxLDEsMSwgMCwwLDAsMCB9LAogCS5tdXhzZWxfaG9vayAgICA9IHhndWFyZF9tdXhzZWwsCiAJLm5vX21zcDM0eHggICAgID0gMSwKIAkubm9fdGRhOTg3NSAgICAgPSAxLAotICAgICAgICAubm9fdGRhNzQzMiAgICAgPSAxLAorCS5ub190ZGE3NDMyICAgICA9IDEsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAogfSx7CiAKIAkvKiAtLS0tIGNhcmQgMHg2OCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiAJLm5hbWUgICAgICAgICAgID0gIk5lYnVsYSBFbGVjdHJvbmljcyBEaWdpVFYiLAogCS52aWRlb19pbnB1dHMgICA9IDEsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IC0xLAorCS50dW5lciAgICAgICAgICA9IC0xLAogCS5zdmhzICAgICAgICAgICA9IC0xLAogCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMH0sCiAJLm5vX21zcDM0eHggICAgID0gMSwKQEAgLTE3OTUsMjIgKzE5MDUsMjQgQEAKIAkubm9fdGRhNzQzMiAgICAgPSAxLAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSAtMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJLmhhc19kdmIgICAgICAgID0gMSwKIAkubm9fZ3Bpb2lycSAgICAgPSAxLAogfSx7CiAJLyogSm9yZ2UgQm9uY29tcHRlIC0gRFRJMiA8am9yZ2VAZHRpMi5uZXQ+ICovCiAJLm5hbWUgICAgICAgICAgID0gIlByb1ZpZGVvIFBWMTQzIiwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gNCwKLSAgICAgICAgLmF1ZGlvX2lucHV0cyAgID0gMCwKLSAgICAgICAgLnR1bmVyICAgICAgICAgID0gLTEsCi0gICAgICAgIC5zdmhzICAgICAgICAgICA9IC0xLAotICAgICAgICAuZ3Bpb21hc2sgICAgICAgPSAwLAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDAgfSwKLSAgICAgICAgLmF1ZGlvbXV4ICAgICAgID0geyAwIH0sCi0gICAgICAgIC5uZWVkc190dmF1ZGlvICA9IDAsCi0gICAgICAgIC5ub19tc3AzNHh4ICAgICA9IDEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnZpZGVvX2lucHV0cyAgID0gNCwKKwkuYXVkaW9faW5wdXRzICAgPSAwLAorCS50dW5lciAgICAgICAgICA9IC0xLAorCS5zdmhzICAgICAgICAgICA9IC0xLAorCS5ncGlvbWFzayAgICAgICA9IDAsCisJLm11eHNlbCAgICAgICAgID0geyAyLCAzLCAxLCAwIH0sCisJLmF1ZGlvbXV4ICAgICAgID0geyAwIH0sCisJLm5lZWRzX3R2YXVkaW8gID0gMCwKKwkubm9fbXNwMzR4eCAgICAgPSAxLAorCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKKwkudHVuZXJfdHlwZSAgICAgPSAtMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiB9LHsKIAkvKiBNLktsYWhyQHBoeXRlYy5kZSAqLwogCS5uYW1lICAgICAgICAgICA9ICJQSFlURUMgVkQtMDA5LVgxIE1pbmlESU4gKGJ0ODc4KSIsCkBAIC0xODI0LDYgKzE5MzYsNyBAQAogCS5uZWVkc190dmF1ZGlvICA9IDEsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIH0sewogCS5uYW1lICAgICAgICAgICA9ICJQSFlURUMgVkQtMDA5LVgxIENvbWJpIChidDg3OCkiLAogCS52aWRlb19pbnB1dHMgICA9IDQsCkBAIC0xODM2LDYgKzE5NDksNyBAQAogCS5uZWVkc190dmF1ZGlvICA9IDEsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIH0sewogCiAJLyogLS0tLSBjYXJkIDB4NmMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwpAQCAtMTg0NiwxMyArMTk2MCwxNCBAQAogCS5zdmhzICAgICAgICAgICA9IDksCiAJLmdwaW9tYXN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ZXIgbmliYmxlIG9mIG11eHNlbC4gaGVyZTogdXNlZCBmb3IKKwkJCQl4dGVybmFsIHZpZGVvLW11eCAqLwogCS5tdXhzZWwgICAgICAgICA9IHsgMHgwMiwgMHgxMiwgMHgyMiwgMHgzMiwgMHgwMywgMHgxMywgMHgyMywgMHgzMywgMHgwMSwgMHgwMSB9LAogCS5hdWRpb211eCAgICAgICA9IHsgMCwgMCwgMCwgMCwgMCwgMCB9LCAvKiBjYXJkIGhhcyBubyBhdWRpbyAqLwogCS5uZWVkc190dmF1ZGlvICA9IDEsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIH0sewotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiSVZDLTEwMCIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDQsCi0gICAgICAgIC5hdWRpb19pbnB1dHMgICA9IDAsCi0gICAgICAgIC50dW5lciAgICAgICAgICA9IC0xLAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCi0gICAgICAgIC5ncGlvbWFzayAgICAgICA9IDB4ZGYsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAotICAgICAgICAucGxsICAgICAgICAgICAgPSBQTExfMjgsCisJLm5hbWUgICAgICAgICAgID0gIklWQy0xMDAiLAorCS52aWRlb19pbnB1dHMgICA9IDQsCisJLmF1ZGlvX2lucHV0cyAgID0gMCwKKwkudHVuZXIgICAgICAgICAgPSAtMSwKKwkudHVuZXJfdHlwZSAgICAgPSAtMSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCisJLnN2aHMgICAgICAgICAgID0gLTEsCisJLmdwaW9tYXNrICAgICAgID0gMHhkZiwKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDAgfSwKK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sCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogCS5oYXNfZHZiICAgICAgICA9IDEsCiB9LHsKIAkubmFtZSAgICAgICAgICAgPSAiVHdpbmhhbiBEU1QgKyBjbG9uZXMiLApAQCAtMTkxMiwxOSArMjAzMSwyMSBAQAogCS5ub190ZGE5ODc1ICAgICA9IDEsCiAJLm5vX3RkYTc0MzIgICAgID0gMSwKIAkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9BQlNFTlQsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogCS5ub192aWRlbyAgICAgICA9IDEsCiAJLmhhc19kdmIgICAgICAgID0gMSwKIH0sewotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiV2luZmFzdCBWQzEwMCIsCisJLm5hbWUgICAgICAgICAgID0gIldpbmZhc3QgVkMxMDAiLAogCS52aWRlb19pbnB1dHMgICA9IDMsCiAJLmF1ZGlvX2lucHV0cyAgID0gMCwKIAkuc3ZocyAgICAgICAgICAgPSAxLAotCS50dW5lciAgICAgICAgICA9IC0xLCAvLyBubyB0dW5lcgotCS5tdXhzZWwgICAgICAgICA9IHsgMywgMSwgMSwgM30sIC8vIFZpZCBJbiwgU1ZpZCBJbiwgVmlkIG92ZXIgU1ZpZCBpbiBjb25uZWN0b3IKLSAgICAgICAgLm5vX21zcDM0eHggICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTk4NzUgICAgID0gMSwKLSAgICAgICAgLm5vX3RkYTc0MzIgICAgID0gMSwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gVFVORVJfQUJTRU5ULAorCS50dW5lciAgICAgICAgICA9IC0xLAorCS5tdXhzZWwgICAgICAgICA9IHsgMywgMSwgMSwgM30sIC8qIFZpZCBJbiwgU1ZpZCBJbiwgVmlkIG92ZXIgU1ZpZCBpbiBjb25uZWN0b3IgKi8KKwkubm9fbXNwMzR4eCAgICAgPSAxLAorCS5ub190ZGE5ODc1ICAgICA9IDEsCisJLm5vX3RkYTc0MzIgICAgID0gMSwKKwkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9BQlNFTlQsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIH0sewogCS5uYW1lICAgICAgICAgICA9ICJUZXBwcm8gVEVWLTU2MC9JbnRlclZpc2lvbiBJVi01NjAiLApAQCAtMTkzNyw0NCArMjA1OCw0OSBAQAogCS5hdWRpb211eCAgICAgICA9IHsgMSwgMSwgMSwgMSwgMH0sCiAJLm5lZWRzX3R2YXVkaW8gID0gMSwKIAkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX1BBTCwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJLnBsbCAgICAgICAgICAgID0gUExMXzM1LAogfSx7CiAKIAkvKiAtLS0tIGNhcmQgMHg3NCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCi0gICAgICAgIC5uYW1lICAgICAgICAgICA9ICJTSU1VUyBHVkMxMTAwIiwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gNCwKLSAgICAgICAgLmF1ZGlvX2lucHV0cyAgID0gMCwKLSAgICAgICAgLnR1bmVyICAgICAgICAgID0gLTEsCi0gICAgICAgIC5zdmhzICAgICAgICAgICA9IC0xLAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSAtMSwKLSAgICAgICAgLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDIsIDIsIDJ9LAotICAgICAgICAuZ3Bpb21hc2sgICAgICAgPSAweDNGLAorCS5uYW1lICAgICAgICAgICA9ICJTSU1VUyBHVkMxMTAwIiwKKwkudmlkZW9faW5wdXRzICAgPSA0LAorCS5hdWRpb19pbnB1dHMgICA9IDAsCisJLnR1bmVyICAgICAgICAgID0gLTEsCisJLnN2aHMgICAgICAgICAgID0gLTEsCisJLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKKwkubXV4c2VsICAgICAgICAgPSB7IDIsIDIsIDIsIDJ9LAorCS5ncGlvbWFzayAgICAgICA9IDB4M0YsCiAJLm11eHNlbF9ob29rICAgID0gZ3ZjMTEwMF9tdXhzZWwsCiB9LHsKLSAgICAgICAgLyogQ2FybG9zIFNpbHZhIHIzcGVrQHIzcGVrLmhvbWVsaW51eC5vcmcgfHwgY2FyZCAweDc1ICovCi0gICAgICAgIC5uYW1lICAgICAgICAgICA9ICJOR1MgTkdTVFYrIiwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gMywKLSAgICAgICAgLnR1bmVyICAgICAgICAgID0gMCwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gMiwKLSAgICAgICAgLmdwaW9tYXNrICAgICAgID0gMHgwMDgwMDcsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsyLCAzLCAwLCAwfSwKLSAgICAgICAgLmF1ZGlvbXV4ICAgICAgID0gezAsIDAsIDAsIDAsIDB4MDAwMDAzLCAwfSwKLSAgICAgICAgLnBsbCAgICAgICAgICAgID0gUExMXzI4LAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX1BBTCwKLSAgICAgICAgLmhhc19yZW1vdGUgICAgID0gMSwKKwkvKiBDYXJsb3MgU2lsdmEgcjNwZWtAcjNwZWsuaG9tZWxpbnV4Lm9yZyB8fCBjYXJkIDB4NzUgKi8KKwkubmFtZSAgICAgICAgICAgPSAiTkdTIE5HU1RWKyIsCisJLnZpZGVvX2lucHV0cyAgID0gMywKKwkudHVuZXIgICAgICAgICAgPSAwLAorCS5zdmhzICAgICAgICAgICA9IDIsCisJLmdwaW9tYXNrICAgICAgID0gMHgwMDgwMDcsCisJLm11eHNlbCAgICAgICAgID0gezIsIDMsIDAsIDB9LAorCS5hdWRpb211eCAgICAgICA9IHswLCAwLCAwLCAwLCAweDAwMDAwMywgMH0sCisJLnBsbCAgICAgICAgICAgID0gUExMXzI4LAorCS50dW5lcl90eXBlICAgICA9IFRVTkVSX1BISUxJUFNfUEFMLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKKwkuaGFzX3JlbW90ZSAgICAgPSAxLAogfSx7Ci0gICAgICAgIC8qIGh0dHA6Ly9saW51eG1lZGlhbGFicy5jb20gKi8KLSAgICAgICAgLm5hbWUgICAgICAgICAgID0gIkxNTEJUNCIsCi0gICAgICAgIC52aWRlb19pbnB1dHMgICA9IDQsIC8qIElOMSxJTjIsSU4zLElONCAqLwotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAwLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAtMSwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gLTEsCi0gICAgICAgIC5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAotICAgICAgICAubm9fbXNwMzR4eCAgICAgPSAxLAotICAgICAgICAubm9fdGRhOTg3NSAgICAgPSAxLAotICAgICAgICAubm9fdGRhNzQzMiAgICAgPSAxLAotICAgICAgICAubmVlZHNfdHZhdWRpbyAgPSAwLAorCS8qIGh0dHA6Ly9saW51eG1lZGlhbGFicy5jb20gKi8KKwkubmFtZSAgICAgICAgICAgPSAiTE1MQlQ0IiwKKwkudmlkZW9faW5wdXRzICAgPSA0LCAvKiBJTjEsSU4yLElOMyxJTjQgKi8KKwkuYXVkaW9faW5wdXRzICAgPSAwLAorCS50dW5lciAgICAgICAgICA9IC0xLAorCS5zdmhzICAgICAgICAgICA9IC0xLAorCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAorCS5ub19tc3AzNHh4ICAgICA9IDEsCisJLm5vX3RkYTk4NzUgICAgID0gMSwKKwkubm9fdGRhNzQzMiAgICAgPSAxLAorCS5uZWVkc190dmF1ZGlvICA9IDAsCisJLnR1b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LyogU3RhZmZvcmQgR29vZHNlbGwgPHN1cmdlQGdvbGlhdGguaG9tZXVuaXgub3JnPiAqLwpAQCAtMjAzOCwyMyArMjE2OCwyNSBAQAogCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMSwgMSB9LAogCS5hdWRpb211eCAgICAgICA9IHsgMHgwMiwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH0sCiAJLnR1bmVyX3R5cGUgICAgID0gVFVORVJfVEVNSUNfUEFMLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIAkubm9fbXNwMzR4eCAgICAgPSAxLAogCS5ub190ZGE5ODc1ICAgICA9IDEsCiB9LHsKIAkvKiBXb2xmcmFtIEpvb3N0IDx3b2pvQGZyb2thc2Nod2VpLmRlPiAqLwotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiQVZlck1lZGlhIEFWZXJUViBEVkItVCA3NzEiLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSAyLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAxLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAtMSwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gVFVORVJfQUJTRU5ULAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDMgLCAzIH0sCi0gICAgICAgIC5ub19tc3AzNHh4ICAgICA9IDEsCi0gICAgICAgIC5ub190ZGE5ODc1ICAgICA9IDEsCi0gICAgICAgIC5ub190ZGE3NDMyICAgICA9IDEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLSAgICAgICAgLmhhc19kdmIgICAgICAgID0gMSwKLSAgICAgICAgLm5vX2dwaW9pcnEgICAgID0gMSwKLSAgICAgICAgLmhhc19yZW1vdGUgICAgID0gMSwKKwkubmFtZSAgICAgICAgICAgPSAiQVZlck1lZGlhIEFWZXJUViBEVkItVCA3NzEiLAorCS52aWRlb19pbnB1dHMgICA9IDIsCisJLnN2aHMgICAgICAgICAgID0gMS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VklDTyBGdXNpb25IRFRWIERWQi1UIExpdGUiLAorCS5uYW1lICAgICAgICAgICA9ICJEVmlDTyBGdXNpb25IRFRWIERWQi1UIExpdGUiLAogCS50dW5lciAgICAgICAgICA9IC0xLAogCS5ub19tc3AzNHh4ICAgICA9IDEsCiAJLm5vX3RkYTk4NzUgICAgID0gMSwKQEAgLTIxMzEsNiArMjI2Nyw3IEBACiAJLm5vX3ZpZGVvICAgICAgID0gMSwKIAkuaGFzX2R2YiAgICAgICAgPSAxLAogCS50dW5lcl90eXBlICAgICA9IC0xLAorCS50dW5lcl9hZGRyCT0gQUREUl9VTlNFVCwKIH0sewogCS8qIFN0ZXZlbiA8cGhvdG9uMzhAcGNob21lLmNvbS50dz4gKi8KIAkubmFtZSAgICAgICAgICAgPSAiVi1HZWFyIE15VkNEIiwKQEAgLTIxNDQsNjIgKzIyODEsNjUgQEAKIAkubm9fbXNwMzR4eCAgICAgPSAxLAogCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKIAkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX05UU0NfTSwKKwkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJLmhhc19yYWRpbyAgICAgID0gMCwKLQkvLyAuaGFzX3JlbW90ZSAgICAgPSAxLAogfSx7CiAJLyogUmljayBDIDxjcnlwdGRyYWdvb25AZ21haWwuY29tPiAqLwotICAgICAgICAubmFtZSAgICAgICAgICAgPSAiU3VwZXIgVFYgVHVuZXIiLAotICAgICAgICAudmlkZW9faW5wdXRzICAgPSA0LAotICAgICAgICAuYXVkaW9faW5wdXRzICAgPSAxLAotICAgICAgICAudHVuZXIgICAgICAgICAgPSAwLAotICAgICAgICAuc3ZocyAgICAgICAgICAgPSAyLAotICAgICAgICAubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDB9LAotICAgICAgICAudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX05UU0MsCi0gICAgICAgIC5ncGlvbWFz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iwKLSAgICAgICAgLnZpZGVvX2lucHV0cyAgID0gNCwKLSAgICAgICAgLmF1ZGlvX2lucHV0cyAgID0gMSwKLSAgICAgICAgLnR1bmVyICAgICAgICAgID0gMCwKLSAgICAgICAgLnN2aHMgICAgICAgICAgID0gMiwKLSAgICAgICAgLm11eHNlbCAgICAgICAgID0geyAyLCAzLCAxLCAwfSwKLSAgICAgICAgLnR1bmVyX3R5cGUgICAgID0gLTEsCi0gICAgICAgIC5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKLQorCS8qIC0tLS0gY2FyZCAweDg2LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCS8qIE1pY2hhZWwgSGVuc29uIDxtaGVuc29uQGNsYXJpdHl2aS5jb20+ICovCisJLyogQWRsaW5rIFJUVjI0IHdpdGggc3BlY2lhbCB1bmxvY2sgY29kZXMgKi8KKwkubmFtZSAgICAgICAgICAgPSAiQWRsaW5rIFJUVjI0IiwKKwkudmlkZW9faW5wdXRzICAgPSA0LAorCS5hdWRpb19pbnB1dHMgICA9IDEsCisJLnR1bmVyICAgICAgICAgID0gMCwKKwkuc3ZocyAgICAgICAgICAgPSAyLAorCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMH0sCisJLnR1bmVyX3R5cGUgICAgID0gLTEsCisJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAorCS5wbGwgICAgICAgICAgICA9IFBMTF8yOCwKK30sCit7CisJLyogLS0tLSBjYXJkIDB4ODctLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisJLyogTWljaGFlbCBLcnVma3kgPG1rcnVma3lAbTFrLm5ldD4gKi8KKwkubmFtZSAgICAgICAgICAgPSAiRFZpQ08gRnVzaW9uSERUViA1IExpdGUiLAorCS50dW5lciAgICAgICAgICA9IDAsCisJLnR1bmVyX3R5cGUgICAgID0gVFVORVJfTEdfVERWU19IMDYyRiwKKwkudHVuZXJfYWR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S5pbnB1dCAgICAgICAgICA9IHt7CiAgICAgICAgICAgICAgICAgICAgICAgICAudHlwZSAgID0gQ1g4OF9WTVVYX1RFTEVWSVNJT04sCiAgICAgICAgICAgICAgICAgICAgICAgICAudm11eCAgID0gMCwKLSAgICAgICAgICAgICAgICAgICAgICAgIC5ncGlvMCAgPSAweDBmMGQsCisgICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHg5N2VkLAogICAgICAgICAgICAgICAgIH0sewogICAgICAgICAgICAgICAgICAgICAgICAgLnR5cGUgICA9IENYODhfVk1VWF9DT01QT1NJVEUxLAogICAgICAgICAgICAgICAgICAgICAgICAgLnZtdXggICA9IDEsCi0gICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHgwZjAwLAorICAgICAgICAgICAgICAgICAgICAgICAgLmdwaW8wICA9IDB4OTdlOSwKICAgICAgICAgICAgICAgICB9LHsKICAgICAgICAgICAgICAgICAgICAgICAgIC50eXBlICAgPSBDWDg4X1ZNVVhfU1ZJREVPLAogICAgICAgICAgICAgICAgICAgICAgICAgLnZtdXggICA9IDIsCi0gICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHgwZjAwLAorICAgICAgICAgICAgICAgICAgICAgICAgLmdwaW8wICA9IDB4OTdlOSwKICAgICAgICAgICAgICAgICB9fSwKIAkJLmR2YiAgICAgICAgICAgID0gMSwKICAgICAgICAgfSwKQEAgLTc2NSwyMCArNzYwLDIxIEBACiAJCS5yYWRpb190eXBlICAgICA9IFVOU0VULAogCQkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJCS5yYWRpb19hZGRyCT0gQUREUl9VTlNFVCwKLQkJLyogIFNlZSBEVmlDTyBGdXNpb25IRFRWIDMgR29sZC1RIGZvciBHUElPIGRvY3VtZW50YXRpb24uICAqLworCQkudGRhOTg4N19jb25mICAgPSBUREE5ODg3X1BSRVNFTlQsCiAJCS5pbnB1dCAgICAgICAgICA9IHt7CiAgICAgICAgICAgICAgICAgICAgICAgICAudHlwZSAgID0gQ1g4OF9WTVVYX1RFTEVWSVNJT04sCiAgICAgICAgICAgICAgICAgICAgICAgICAudm11eCAgID0gMCwKLSAgICAgICAgICAgICAgICAgICAgICAgIC5ncGlvMCAgPSAweDBmMGQsCisgICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHg4N2ZkLAogICAgICAgICAgICAgICAgIH0sewogICAgICAgICAgICAgICAgICAgICAgICAgLnR5cGUgICA9IENYODhfVk1VWF9DT01QT1NJVEUxLAogICAgICAgICAgICAgICAgICAgICAgICAgLnZtdXggICA9IDEsCi0gICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHgwZjAwLAorICAgICAgICAgICAgICAgICAgICAgICAgLmdwaW8wICA9IDB4ODdmOSwKICAgICAgICAgICAgICAgICB9LHsKICAgICAgICAgICAgICAgICAgICAgICAgIC50eXBlICAgPSBDWDg4X1ZNVVhfU1ZJREVPLAogICAgICAgICAgICAgICAgICAgICAgICAgLnZtdXggICA9IDIsCi0gICAgICAgICAgICAgICAgICAgICAgICAuZ3BpbzAgID0gMHgwZjAwLAorICAgICAgICAgICAgICAgICAgICAgICAgLmdwaW8wICA9IDB4ODdmOSwKICAgICAgICAgICAgICAgICB9fSwKKwkJLmR2YiAgICAgICAgICAgID0gMSwKIAl9LAogfTsKIGNvbnN0IHVuc2lnbmVkIGludCBjeDg4X2Jjb3VudCA9IEFSUkFZX1NJWkUoY3g4OF9ib2FyZHMpOwpAQCAtOTQ5LDcgKzk0NSw3IEBACiB7CiAJc3RydWN0IHR2ZWVwcm9tIHR2OwogCi0JdHZlZXByb21faGF1cHBhdWdlX2FuYWxvZygmdHYsIGVlcHJvbV9kYXRhKTsKKwl0dmVlcHJvbV9oYXVwcGF1Z2VfYW5hbG9nKCZjb3JlLT5pMmNfY2xpZW50LCAmdHYsIGVlcHJvbV9kYXRhKTsKIAljb3JlLT50dW5lcl90eXBlID0gdHYudHVuZXJfdHlwZTs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sIDB4MDAwMDBGRkYgfSwKKwkJeyBBVURfRVJSSU5UUlBUVEhTSExEMl9SLCAweDAwMDAwMDFGIH0sCisJCXsgQVVEX0VSUklOVFJQVFRIU0hMRDNfUiwgMHgwMDAwMDAwRiB9LAogCi0gICAgICAgICAgICAgICAgeyBBVURfUERGX0REU19DTlNUX0JZVEUyLCAweDQ4IH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUERGX0REU19DTlNUX0JZVEUxLCAweDNEIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUUFNX01PREUsICAgICAgICAgICAweDAwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUERGX0REU19DTlNUX0JZVEUwLCAweGY1IH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUEhBQ0NfRlJFUV84TVNCLCAgICAweDNhIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUEhBQ0NfRlJFUV84TFNCLCAgICAweDRhIH0sCisJCXsgQVVEX1BERl9ERFNfQ05TVF9CWVRFMiwgMHg0OCB9LAorCQl7IEFVRF9QREZfRERTX0NOU1RfQllURTEsIDB4M0QgfSwKKwkJeyBBVURfUUFNX01PREUsICAgICAgICAgICAweDAwIH0sCisJCXsgQVVEX1BERl9ERFNfQ05TVF9CWVRFMCwgMHhmNSB9LAorCQl7IEFVRF9QSEFDQ19GUkVRXzhNU0IsICAgIDB4M2EgfSwKKwkJeyBBVURfUEhBQ0NfRlJFUV84TFNCLCAgICAweDRhIH0sCiAKLSAgICAgICAgICAgICAgICB7IEFVRF9ERUVNUEhHQUlOX1IsIDB4NjY4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSE5VTUVSMV9SLCAweDM1M0RFIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfREVFTVBITlVNRVIyX1IsIDB4MUIxIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfREVFTVBIREVOT00xX1IsIDB4MEYzRDAgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9ERUVNUEhERU5PTTJfUiwgMHgwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfRk1fTU9ERV9FTkFCTEUsIDB4NyB9LAotICAgICAgICAgICAgICAgIHsgQVVEX1BPTFlQSDgwU0NBTEVGQUMsIDB4MyB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0FGRV8xMkRCX0VOLCAweDEgfSwKLSAgICAgICAgICAgICAgICB7IEFBR0NfR0FJTiwgMHgwIH0sCi0gICAgICAgICAgICAgICAgeyBBQUdDX0hZU1QsIDB4MTggfSwKLSAgICAgICAgICAgICAgICB7IEFBR0NfREVGLCAweDIwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfRE4wX0ZSRVEsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX1BPTFkwX0REU19DT05TVEFOVCwgMHgwRTREQjIgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9EQ09DXzBfU1JDLCAweDIxIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfSUlSMV8wX1NFTCwgMHgwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfSUlSMV8wX1NISUZULCAweDcgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9JSVIxXzFfU0VMLCAweDIgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9JSVIxXzFfU0hJRlQsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RDT0NfMV9TUkMsIDB4MyB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RDT0MxX1NISUZULCAweDAgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9EQ09DX1BBU1NfSU4sIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0lJUjFfMl9TRUwsIDB4MjMgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9JSVIxXzJfU0hJRlQsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0lJUjFfM19TRUwsIDB4NCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0lJUjFfM19TSElGVCwgMHg3IH0sCi0gICAgICAgICAgICAgICAgeyBBVURfSUlSMV80X1NFTCwgMHg1IH0sCi0gICAgICAgICAgICAgICAgeyBBVURfSUlSMV80X1NISUZULCAweDcgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9JSVIzXzBfU0VMLCAweDcgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9JSVIzXzBfU0hJRlQsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfU1JDX1NFTCwgMHgxMSB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfU0hJRlQsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfRzAsIDB4NzAwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfQTAsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfQjAsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfQTEsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDBfQjEsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfU1JDX1NFTCwgMHgxMSB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfU0hJRlQsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfRzAsIDB4NzAwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfQTAsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfQjAsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfQTEsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSDFfQjEsIDB4MCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX09VVDBfU0VMLCAweDNGIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfT1VU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DBFNTQyIH0sCiAKLSAgICAgICAgICAgICAgICAvLyBzZXR1cCBRQU0gcmVnaXN0ZXJzCi0gICAgICAgICAgICAgICAgeyBBVURfUkFURV9BREoxLCAgICAgIDB4MDAwMDAxMDAgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjIsICAgICAgMHgwMDAwMDIwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX1JBVEVfQURKMywgICAgICAweDAwMDAwMzAwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUkFURV9BREo0LCAgICAgIDB4MDAwMDA0MDAgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjUsICAgICAgMHgwMDAwMDUwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX1JBVEVfVEhSRVNfRE1ELCAweDAwMDAwMEMwIH0sCi0gICAgICAgICAgICAgICAgeyAvKiBlbmQgb2YgbGlzdCAqLyB9LAotICAgICAgICB9OworCQkvLyBzZXR1cCBRQU0gcmVnaXN0ZXJzCisJCXsgQVVEX1JBVEVfQURKMSwgICAgICAweDAwMDAwMTAwIH0sCisJCXsgQVVEX1JBVEVfQURKMiwgICAgICAweDAwMDAwMjAwIH0sCisJCXsgQVVEX1JBVEVfQURKMywgICAgICAweDAwMDAwMzAwIH0sCisJCXsgQVVEX1JBVEVfQURKNCwgICAgICAweDAwMDAwNDAwIH0sCisJCXsgQVVEX1JBVEVfQURKNSwgICAgICAweDAwMDAwNTAwIH0sCisJCXsgQVVEX1JBVEVfVEhSRVNfRE1ELCAweDAwMDAwMEMwIH0sCisJCXsgLyogZW5kIG9mIGxpc3QgKi8gfSwKKwl9OwogCi0gICAgICAgIHN0YXRpYyBjb25zdCBzdHJ1Y3Qgcmxpc3QgbmljYW1fbFtdID0gewotICAgICAgICAgICAgICAgIC8vIHNldHVwIFFBTSByZWdpc3RlcnMKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjEsIDB4MDAwMDAwNjAgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjIsIDB4MDAwMDAwRjkgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjMsIDB4MDAwMDAxQ0MgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjQsIDB4MDAwMDAyQjMgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9SQVRFX0FESjUsIDB4MDAwMDA3MjYgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9ERUVNUEhERU5PTTFfUiwgMHgwMDAwRjNEMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSERFTk9NMl9SLCAweDAwMDAwMDAwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfRVJSTE9HUEVSSU9EX1IsIDB4MDAwMDAwNjQgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9FUlJJTlRSUFRUSFNITEQxX1IsIDB4MDAwMDBGRkYgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9FUlJJTlRSUFRUSFNITEQyX1IsIDB4MDAwMDAwMUYgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9FUlJJTlRSUFRUSFNITEQzX1IsIDB4MDAwMDAwMEYgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9QT0xZUEg4MFNDQUxFRkFDLCAweDAwMDAwMDAzIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfRE1EX1JBX0REUywgMHgwMEMwMDAwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX1BMTF9JTlQsIDB4MDAwMDAwMUUgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9QTExfRERTLCAweDAwMDAwMDAwIH0sCi0gICAgICAgICAgICAgICAgeyBBVURfUExMX0ZSQUMsIDB4MDAwMEU1NDIgfSwKLSAgICAgICAgICAgICAgICB7IEFVRF9TVEFSVF9USU1FUiwgMHgwMDAwMDAwMCB9LAotICAgICAgICAgICAgICAgIHsgQVVEX0RFRU1QSE5VTUVSMV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N0YW5kYXJkX1BBTF9JKHN0cnVjdCBjeDg4X2NvcmUgKmNvcmUsIGludCBzdGVyZW8pCiB7CiAgICAgICAgc3RhdGljIGNvbnN0IHN0cnVjdCBybGlzdCBwYWxfaV9mbV9tb25vW10gPSB7Ci0gICAgICAgICAgICB7QVVEX0VSUkxPR1BFUklPRF9SLCAgICAgICAweDAwMDAwMDY0fSwKLSAgICAgICAgICAgIHtBVURfRVJSSU5UUlBUVEhTSExEMV9SLCAgIDB4MDAwMDBmZmZ9LAotICAgICAgICAgICAge0FVRF9FUlJJTlRSUFRUSFNITEQyX1IsICAgMHgwMDAwMDAxZn0sCi0gICAgICAgICAgICB7QVVEX0VSUklOVFJQVFRIU0hMRDNfUiwgICAweDAwMDAwMDBmfSwKLSAgICAgICAgICAgIHtBVURfUERGX0REU19DTlNUX0JZVEUyLCAgIDB4MDZ9LAotICAgICAgICAgICAge0FVRF9QREZfRERTX0NOU1RfQllURTEsICAgMHg4Mn0sCi0gICAgICAgICAgICB7QVVEX1BERl9ERFNfQ05TVF9CWVRFMCwgICAweDEyfSwKLSAgICAgICAgICAgIHtBVURfUUFNX01PREUsICAgICAgICAgICAgIDB4MDV9LAotICAgICAgICAgICAge0FVRF9QSEFDQ19GUkVRXzhNU0IsICAgICAgMHgzYX0sCi0gICAgICAgICAgICB7QVVEX1BIQUNDX0ZSRVFfOExTQiwgICAgICAweDkzfSwKLSAgICAgICAgICAgIHtBVURfRE1EX1JBX0REUywgICAgICAgICAgIDB4MDAyYTRmMmZ9LAotICAgICAgICAgICAge0FVRF9QTExfSU5ULCAgICAgICAgICAgICAgMHgwMDAwMDAxZX0sCi0gICAgICAgICAgICB7QVVEX1BMTF9ERFMsICAgICAgICAgICAgICAweDAwMDAwMDA0fSwKLSAgICAgICAgICAgIHtBVURfUExMX0ZSQUMsICAgICAgICAgICAgIDB4MDAwMGU1NDJ9LAotICAgICAgICAgICAge0FVRF9SQVRFX0FESjEsICAgICAgICAgICAgMHgwMDAwMDEwMH0sCi0gICAgICAgICAgICB7QVVEX1JBVEVfQURKMiwgICAgICAgICAgICAweDAwMDAwMjAwfSwKLSAgICAgICAgICAgIHtBVURfUkFURV9BREozLCAgICAgICAgICAgIDB4MDAwMDAzMDB9LAotICAgICAgICAgICAge0FVRF9SQVRFX0FESjQsICAgICAgICAgICAgMHgwMDAwMDQwMH0sCi0gICAgICAgICAgICB7QVVEX1JBVEVfQURKNSwgICAgICAgICAgICAweDAwMDAwNTAwfSwKLSAgICAgICAgICAgIHtBVURfVEhSX0ZSLCAgICAgICAgICAgICAgIDB4MDAwMDAwMDB9LAotICAgICAgICAgICAge0FVRF9QSUxPVF9CUURfMV9LMCwgICAgICAgMHgwMDAwNzU1Yn0sCi0gICAgICAgICAgICB7QVVEX1BJTE9UX0JRRF8xX0sxLCAgICAgICAweDAwNTUxMzQwfSwKLSAgICAgICAgICAgIHtBVURfUElMT1RfQlFEXzFfSzIsICAgICAgIDB4MDA2ZDMwYmV9LAotICAgICAgICAgICAge0FVRF9QSUxPVF9CUURfMV9LMywgICAgICAgMHhmZmQzOTRhZn0sCi0gICAgICAgICAgICB7QVVEX1BJTE9UX0JRRF8xX0s0LCAgICAgICAweDAwNDAwMDAwfSwKLSAgICAgICAgICAgIHtBVURfUElMT1RfQlFEXzJfSzAsICAgICAgIDB4MDAwNDAwMDB9LAotICAgICAgICAgICAge0FVRF9QSUxPVF9CUURfMl9LMSwgICAgICAgMHgwMDJhNDg0MX0sCi0gICAgICAgICAgICB7QVVEX1BJTE9UX0JRRF8yX0syLCAgICAgICAweDAwNDAwMDAwfSwKLSAgICAgICAgICAgIHtBVURfUElMT1RfQlFEXzJfSzMsICAgICAgIDB4MDAwMDAwMDB9LAotICAgICAgICAgICAge0FVRF9QSUxPVF9CUURfMl9LNCwgICAgICAgMHgwMDAwMDAwMH0sCi0gICAgICAgICAgICB7QVVEX01PREVfQ0hHX1RJTUVSLCAgICAgICAweDAwMDAwMDYwfSwKLSAgICAgICAgICAgIHtBVURfQUZFXzEyREJfRU4sICAgICAgICAgIDB4MDAwMDAwMDF9LAotICAgICAgICAgICAge0FBR0NfSFlTVCwgICAgICAgICAgICAgICAgMHgwMDAwMDAwYX0sCi0gICAgICAgICAgICB7QVVEX0NPUkRJQ19TSElGVF8wLCAgICAgICAweDAwMDAwMDA3fSwKLSAgICAgICAgICAgIHtBVURfQ09SRElDX1NISUZUXzEsICAgICAgIDB4MDAwMDAwMDd9LAotICAgICAgICAgICAge0FVRF9DMV9VUF9USFIsICAgICAgICAgICAgMHgwMDAwNzAwMH0sCi0gICAgICAgICAgICB7QVVEX0MxX0xPX1RIUiwgICAgICAgICAgICAweDAwMDA1NDAwfSwKLSAgICAgICAgICAgIHtBVURfQzJfVVBfVEhSLCAgICAgICAgICAgIDB4MDAwMDU0MDB9LAotICAgICAgICAgICAge0FVRF9DMl9MT19USFIsICAgICAgICAgICAgMHgwMDAwMzAwMH0sCi0gICAgICAgICAgICB7QVVEX0RDT0NfMF9TUkMsICAgICAgICAgICAweDAwMDAwMDFhfSwKLSAgICAgICAgICAgIHtBVURfRENPQzBfU0hJRlQsICAgICAgICAgIDB4MDAwMDAwMDB9LAotICAgICAgICAgICAge0FVRF9EQ09DXzBfU0hJRlRfSU4wLCAgICAgMHgwMDAwMDAwYX0sCi0gICAgICAgICAgICB7QVVEX0RDT0NfMF9TSElGVF9JTjEsICAgICAweDAwMDAwMDA4fSwKLSAgICAgICAgICAgIHtBVURfRENPQ19QQVNTX0lOLCAgICAgICAgIDB4MDAwMDAwMDN9LAotICAgICAgICAgICAge0FVRF9JSVIzXzBfU0VMLCAgICAgICAgICAgMHgwMDAwMDAyMX0sCi0gICAgICAgICAgICB7QVVEX0ROMl9BRkMsICAgICAgICAgICAgICAweDAwMDAwMDAyfSwKLSAgICAgICAgICAgIHtBVURfRENPQ18xX1NSQywgICAgICAgICAgIDB4MDAwMDAwMWJ9LAotICAgICAgICAgICAge0FVRF9EQ09DMV9TSElGVCwgICAgICAgICAgMHgwMDAwMDAwMH0sCi0gICAgICAgICAgICB7QVVEX0RDT0NfMV9TSElGVF9JTjAsICAgICAweDAwMDAwMDBhfSwKLSAgICAgICAgICAgIHtBVURfRENPQ18xX1NISUZUX0lOMSwgICAgIDB4MDAwMDAwMDh9LAotICAgICAgICAgICAge0FVRF9JSVIzXzFfU0VMLCAgICAgICAgICAgMHgwMDAwMDAyM30sCi0gICAgICAgICAgICB7QVVEX0ROMF9GUkVRLCAgICAgICAgICAgICAweDAwMDAzNWEzfSwKLSAgICAgICAgICAgIHtBVURfRE4yX0ZSRVEsICAgICAgICAgICAgIDB4MDAwMDI5Yzd9LAotICAgICAgICAgICAge0FVRF9DUkRDMF9TUkNfU0VMLCAgICAgICAgMHgwMDAwMDUxMX0sCi0gICAgICAgICAgICB7QVVEX0lJUjFfMF9TRUwsICAgICAgICAgICAweDAwMDAwMDAxfSwKLSAgICAgICAgICAgIHtBVURfSUlSMV8xX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDB9LAotICAgICAgICAgICAge0FVRF9JSVIzXzJfU0VMLCAgICAgICAgICAgMHgwMDAwMDAwM30sCi0gICAgICAgICAgICB7QVVEX0lJUjNfMl9TSElGVCwgICAgICAgICAweDAwMDAwMDAwfSwKLSAgICAgICAgICAgIHtBVURfSUlSM18wX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDJ9LAotICAgICAgICAgICAge0FVRF9JSVIyXzBfU0VMLCAgICAgICAgICAgMHgwMDAwMDAyMX0sCi0gICAgICAgICAgICB7QVVEX0lJUjJfMF9TSElGVCwgICAgICAgICAweDAwMDAwMDAyfSwKLSAgICAgICAgICAgIHtBVURfREVFTVBIMF9TUkNfU0VMLCAgICAgIDB4MDAwMDAwMGJ9LAotICAgICAgICAgICAge0FVRF9ERUVNUEgxX1NSQ19TRUwsICAgICAgMHgwMDAwMDAwYn0sCi0gICAgICAgICAgICB7QVVEX1BPTFlQSDgwU0NBTEVGQUMsICAgICAweDAwMDAwMDAxfSwKLSAgICAgICAgICAgIHtBVURfU1RBUlRfVElNRVIsICAgICAgICAgIDB4MDAwMDAwMDB9LAotICAgICAgICAgICAgeyAvKiBlbmQgb2YgbGlzdCAqLyB9LAorCXtBVURfRVJSTE9HUEVSSU9EX1IsICAgICAgIDB4MDAwMDAwNjR9LAorCXtBVURfRVJSSU5UUlBUVEhTSExEMV9SLCAgIDB4MDAwMDBmZmZ9LAorCXtBVURfRVJSSU5UUlBUVEhTSExEMl9SLCAgIDB4MDAwMDAwMWZ9LAorCXtBVURfRVJSSU5UUlBUVEhTSExEM19SLCAgIDB4MDAwMDAwMGZ9LAorCXtBVURfUERGX0REU19DTlNUX0JZVEUyLCAgIDB4MDZ9LAorCXtBVURfUERGX0REU19DTlNUX0JZVEUxLCAgIDB4ODJ9LAorCXtBVURfUERGX0REU19DTlNUX0JZVEUwLCAgIDB4MTJ9LAorCXtBVURfUUFNX01PREUsICAgICAgICAgICAgIDB4MDV9LAorCXtBVURfUEhBQ0NfRlJFUV84TVNCLCAgICAgIDB4M2F9LAorCXtBVURfUEhBQ0NfRlJFUV84TFNCLCAgICAgIDB4OTN9LAorCXtBVURfRE1EX1JBX0REUywgICAgICAgICAgIDB4MDAyYTRmMmZ9LAorCXtBVURfUExMX0lOVCwgICAgICAgICAgICAgIDB4MDAwMDAwMWV9LAorCXtBVURfUExMX0REUywgICAgICAgICAgICAgIDB4MDAwMDAwMDR9LAorCXtBVURfUExMX0ZSQUMsICAgICAgICAgICAgIDB4MDAwMGU1NDJ9LAorCXtBVURfUkFURV9BREoxLCAgICAgICAgICAgIDB4MDAwMDAxMDB9LAorCXtBVURfUkFURV9BREoyLCAgICAgICAgICAgIDB4MDAwMDAyMDB9LAorCXtBVURfUkFURV9BREozLCAgICAgICAgICAgIDB4MDAwMDAzMDB9LAorCXtBVURfUkFURV9BREo0LCAgICAgICAgICAgIDB4MDAwMDA0MDB9LAorCXtBVURfUkFURV9BREo1LCAgICAgICAgICAgIDB4MDAwMDA1MDB9LAorCXtBVURfVEhSX0ZSLCAgIC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ICAgICAgIDB4MDAwMDAwMWF9LAorCXtBVURfRENPQzBfU0hJRlQsICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfRENPQ18wX1NISUZUX0lOMCwgICAgIDB4MDAwMDAwMGF9LAorCXtBVURfRENPQ18wX1NISUZUX0lOMSwgICAgIDB4MDAwMDAwMDh9LAorCXtBVURfRENPQ19QQVNTX0lOLCAgICAgICAgIDB4MDAwMDAwMDN9LAorCXtBVURfSUlSM18wX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMjF9LAorCXtBVURfRE4yX0FGQywgICAgICAgICAgICAgIDB4MDAwMDAwMDJ9LAorCXtBVURfRENPQ18xX1NSQywgICAgICAgICAgIDB4MDAwMDAwMWJ9LAorCXtBVURfRENPQzFfU0hJRlQsICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfRENPQ18xX1NISUZUX0lOMCwgICAgIDB4MDAwMDAwMGF9LAorCXtBVURfRENPQ18xX1NISUZUX0lOMSwgICAgIDB4MDAwMDAwMDh9LAorCXtBVURfSUlSM18xX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMjN9LAorCXtBVURfRE4wX0ZSRVEsICAgICAgICAgICAgIDB4MDAwMDM1YTN9LAorCXtBVURfRE4yX0ZSRVEsICAgICAgICAgICAgIDB4MDAwMDI5Yzd9LAorCXtBVURfQ1JEQzBfU1JDX1NFTCwgICAgICAgIDB4MDAwMDA1MTF9LAorCXtBVURfSUlSMV8wX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDF9LAorCXtBVURfSUlSMV8xX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfSUlSM18yX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDN9LAorCXtBVURfSUlSM18yX1NISUZULCAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfSUlSM18wX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMDJ9LAorCXtBVURfSUlSMl8wX1NFTCwgICAgICAgICAgIDB4MDAwMDAwMjF9LAorCXtBVURfSUlSMl8wX1NISUZULCAgICAgICAgIDB4MDAwMDAwMDJ9LAorCXtBVURfREVFTVBIMF9TUkNfU0VMLCAgICAgIDB4MDAwMDAwMGJ9LAorCXtBVURfREVFTVBIMV9TUkNfU0VMLCAgICAgIDB4MDAwMDAwMGJ9LAorCXtBVURfUE9MWVBIODBTQ0FMRUZBQywgICAgIDB4MDAwMDAwMDF9LAorCXtBVURfU1RBUlRfVElNRVIsICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXsgLyogZW5kIG9mIGxpc3QgKi8gfSwKICAgICAgICB9OwogCiAgICAgICAgc3RhdGljIGNvbnN0IHN0cnVjdCBybGlzdCBwYWxfaV9uaWNhbVtdID0gewotICAgICAgICAgICB7IEFVRF9SQVRFX0FESjEsICAgICAgICAgICAweDAwMDAwMDEwIH0sCi0gICAgICAgICAgIHsgQVVEX1JBVEVfQURKMiwgICAgICAgICAgIDB4MDAwMDAwNDAgfSwKLSAgICAgICAgICAgeyBBVURfUkFURV9BREozLCAgICAgICAgICAgMHgwMDAwMDEwMCB9LAotICAgICAgICAgICB7IEFVRF9SQVRFX0FESjQsICAgICAgICAgICAweDAwMDAwNDAwIH0sCi0gICAgICAgICAgIHsgQVVEX1JBVEVfQURKNSwgICAgICAgICAgIDB4MDAwMDEwMDAgfSwKLQkgICAvLyAgICAgeyBBVURfRE1EX1JBX0REUywgICAgICAgICAgMHgwMGMwZDVjZSB9LAotCSAgIHsgQVVEX0RFRU1QSEdBSU5fUiwgICAgICAgIDB4MDAwMDIzYzIgfSwKLQkgICB7IEFVRF9ERUVNUEhOVU1FUjFfUiwgICAgICAweDAwMDJhN2JjIH0sCi0JICAgeyBBVURfREVFTVBITlVNRVIyX1IsICAgICAgMHgwMDAzMDIzZSB9LAotCSAgIHsgQVVEX0RFRU1QSERFTk9NMV9SLCAgICAgIDB4MDAwMGYzZDAgfSwKLQkgICB7IEFVRF9ERUVNUEhERU5PTTJfUiwgICAgICAweDAw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AgICAgICAweDRjfSwKKwl7QVVEX1JBVEVfQURKMSwgICAgICAgICAgICAgICAgIDB4MDAwMDAxMDB9LAorCXtBVURfUkFURV9BREoyLCAgICAgICAgICAgICAgICAgMHgwMDAwMDIwMH0sCisJe0FVRF9SQVRFX0FESjMsICAgICAgICAgICAgICAgICAweDAwMDAwMzAwfSwKKwl7QVVEX1JBVEVfQURKNCwgICAgICAgICAgICAgICAgIDB4MDAwMDA0MDB9LAorCXtBVURfUkFURV9BREo1LCAgICAgICAgICAgICAgICAgMHgwMDAwMDUwMH0sCisJe0FVRF9USFJfRlIsICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwfSwKKwl7QUFHQ19IWVNULCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMWF9LAorCXtBVURfUElMT1RfQlFEXzFfSzAsICAgICAgICAgICAgMHgwMDAwNzU1Yn0sCisJe0FVRF9QSUxPVF9CUURfMV9LMSwgICAgICAgICAgICAweDAwNTUxMzQwfSwKKwl7QVVEX1BJTE9UX0JRRF8xX0syLCAgICAgICAgICAgIDB4MDA2ZDMwYmV9LAorCXtBVURfUElMT1RfQlFEXzFfSzMsICAgICAgICAgICAgMHhmZmQzOTRhZn0sCisJe0FVRF9QSUxPVF9CUURfMV9LNCwgICAgICAgICAgICAweDAwNDAwMDAwfSwKKwl7QVVEX1BJTE9UX0JRRF8yX0swLCAgICAgICAgICAgIDB4MDAwNDAwMDB9LAorCXtBVURfUElMT1RfQlFEXzJfSzEsICAgICAgICAgICAgMHgwMDJhNDg0MX0sCisJe0FVRF9QSUxPVF9CUURfMl9LMiwgICAgICAgICAgICAweDAwNDAwMDAwfSwKKwl7QVVEX1BJTE9UX0JRRF8yX0szLCAgICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfUElMT1RfQlFEXzJfSzQsICAgICAgICAgICAgMHgwMDAwMDAwMH0sCisJe0FVRF9NT0RFX0NIR19USU1FUiwgICAgICAgICAgICAweDAwMDAwMDQwfSwKKwl7QVVEX0FGRV8xMkRCX0VOLCAgICAgICAgICAgICAgIDB4MDAwMDAwMDF9LAorCXtBVURfQ09SRElDX1NISUZUXzAsICAgICAgICAgICAgMHgwMDAwMDAwN30sCisJe0FVRF9DT1JESUNfU0hJRlRfMSwgICAgICAgICAgICAweDAwMDAwMDA3fSwKKwl7QVVEX0RFRU1QSDBfRzAsICAgICAgICAgICAgICAgIDB4MDAwMDAzODB9LAorCXtBVURfREVFTVBIMV9HMCwgICAgICAgICAgICAgICAgMHgwMDAwMDM4MH0sCisJe0FVRF9EQ09DXzBfU1JDLCAgICAgICAgICAgICAgICAweDAwMDAwMDFhfSwKKwl7QVVEX0RDT0MwX1NISUZULCAgICAgICAgICAgICAgIDB4MDAwMDAwMDB9LAorCXtBVURfRENPQ18wX1NISUZUX0lOMCwgICAgICAgICAgMHgwMDAwMDAwYX0sCisJe0FVRF9EQ09DXzBfU0hJRlRfSU4xLCAgICAgICAgICAweDAwMDAwMDA4fSwKKwl7QVVEX0RDT0NfUEFTU19JTiwgICAgICAgICAgICAgIDB4MDAwMDAwMDN9LAorCXtBVURfSUlSM18wX1NFTCwgICAgICAgICAgICAgICAgMHgwMDAwMDAyMX0sCisJe0FVRF9ETjJfQUZDLCAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyfSwKKwl7QVVEX0RDT0NfMV9TUkMsICAgICAgICAgICAgICAgIDB4MDAwMDAwMWJ9LAorCXtBVURfRENPQzFfU0hJRlQsICAgICAgICAgICAgICAgMHgwMDAwMDAwMH0sCisJe0FVRF9EQ09DXzFfU0hJRlRfSU4wLCAgICAgICAgICAweDAwMDAwMDBhfSwKKwl7QVVEX0RDT0NfMV9TSElGVF9JTjEsICAgICAgICAgIDB4MDAwMDAwMDh9LAorCXtBVURfSUlSM18xX1NFTCwgICAgICAgICAgICAgICAgMHgwMDAwMDAyM30sCisJe0FVRF9SRFNJX1NFTCwgICAgICAgICAgICAgICAgICAweDAwMDAwMDE3fSwKKwl7QVVEX1JEU0lfU0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0ZSRVEsICAgICAgICAgICAgICAgICAgMHgwMDAwMzQxOH0sCisJe0FVRF9ETjJfRlJFUSwgICAgICAgICAgICAgICAgICAweDAwMDAyOWM3fSwKKwl7QVVEX1BPTFkwX0REU19DT05TVEFOVCwgICAgICAgIDB4MDAwYTc1NDB9LAogCQl7IC8qIGVuZCBvZiBsaXN0ICovIH0sCiAJfTsKIAotCXNldF9hdWRpb19zdGFydChjb3JlLCAweDAwMDQsIEVOX0RNVFJYX1NVTURJRkYgfCBFTl9BMl9BVVRPX1NURVJFTyk7CisJc3RhdGljIGNvbnN0IHN0cnVjdCBybGlzdCBhMl9kZWVtcGg1MFtdID0geworCXtBVURfREVFTVBIMF9HMCwgICAgICAgICAgICAgICAgMHgwMDAwMDM4MH0sCisJe0FVRF9ERUVNUEgxX0cwLCAgICAgICAgICAgICAgICAweDAwMDAwMzgwfSwKKwl7QVVEX0RFRU1QSEdBSU5fUiwgICAgICAgICAgICAgIDB4MDAwMDExZTF9LAorCXtBVURfREVFTVBITlVNRVIxX1IsICAgICAgICAgICAgMHgwMDAyYTdiY30sCisJe0FVRF9ERUVNUEhOVU1FUjJfUiwgICAgICAgICAgICAweDAwMDMwMjNjfSwKKwl7IC8qIGVuZCBvZiBsaXN0ICovIH0sCisJfTsKKworCXN0YXRpYyBjb25zdCBzdHJ1Y3Qgcmxpc3QgYTJfZGVlbXBoNzVbXSA9IHsKKwl7QVVEX0RFRU1QSDBfRzAsICAgICAgICAgICAgICAgIDB4MDAwMDA0ODB9LAorCXtBVURfREVFTVBIMV9HMCwgICAgICAgICAgICAgICAgMHgwMDAwMDQ4MH0sCisJe0FVRF9ERUVNUEhHQUlOX1IsICAgICAgICAgICAgICAweDAwMDA5MDAwfSwKKwl7QVVEX0RFRU1QSE5VTUVSMV9SLCAgICAgICAgICAgIDB4MDAwMzUzZGV9LAorCXtBVURfREVFTVBITlVNRVIyX1IsICAgICAgICAgICAgMHgwMDAwMDFiMX0sCisJCXsgLyogZW5kIG9mIGxp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tLS0tLS0tLS0tLS0tLS0tICovCiAvKiBmdW5jdGlvbiAxOiBhdWRpby9hbHNhIHN0dWZmICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT4gbW92ZWQgdG8gY3g4OC1hbHNhLmMgPD09PT09PT09PT09PT09PT09PT09PT0gKi8KIAotc3RydWN0IGN4ODgwMV9kZXYgewotCXN0cnVjdCBjeDg4X2NvcmUgICAgICAgICAgICpjb3JlOwotCi0JLyogcGNpIGkvbyAqLwotCXN0cnVjdCBwY2lfZGV2ICAgICAgICAgICAgICpwY2k7Ci0JdW5zaWduZWQgY2hhciAgICAgICAgICAgICAgcGNpX3JldixwY2lfbGF0OwotfTsKIAogLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIC8qIGZ1bmN0aW9uIDI6IG1wZWcgc3R1ZmYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCkBAIC0zNzMsOCArMzcyLDcgQEAKIAogc3RydWN0IGN4ODgwMl9kZXYgewogCXN0cnVjdCBjeDg4X2NvcmUgICAgICAgICAgICpjb3JlOwotICAgICAgICBzdHJ1Y3Qgc2VtYXBob3JlICAgICAgICAgICBsb2NrOwotICAgICAgIAlzcGlubG9ja190ICAgICAgICAgICAgICAgICBzbG9jazsKKwlzcGlubG9ja190ICAgICAgICAgICAgICAgICBzbG9jazsKIAogCS8qIHBjaSBpL28gKi8KIAlzdHJ1Y3QgcGNpX2RldiAgICAgICAgICAgICAqcGNpOwpAQCAtNTUzLDggKzU1MSwyMSBAQAogaW50IGN4ODgwMl9zdXNwZW5kX2NvbW1vbihzdHJ1Y3QgcGNpX2RldiAqcGNpX2RldiwgcG1fbWVzc2FnZV90IHN0YXRlKTsKIGludCBjeDg4MDJfcmVzdW1lX2NvbW1vbihzdHJ1Y3QgcGNpX2RldiAqcGNpX2Rldik7CiAKK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UU0MgfAorCQkJREVDT0RFUl9TVEFUVVNfQ09MT1I7CisJCWJyZWFrOworCX0KKwljYXNlIERFQ09ERVJfU0VUX05PUk06IHsKKwkJaW50ICppYXJnID0gYXJnOworCisJCXN3aXRjaCAoKmlhcmcpIHsKKwkJY2FzZSBWSURFT19NT0RFX05UU0M6CisJCQlicmVhazsKKwkJZGVmYXVsdDoKKwkJCXJldHVybiAtRUlOVkFMOworCQl9CisJCWJyZWFrOworCX0KKwljYXNlIERFQ09ERVJfU0VUX0lOUFVUOgl7CisJCWludCAqaWFyZyA9IGFyZzsKKworCQlpZiAoKmlhcmcgIT0gMCkKKwkJCXJldHVybiAtRUlOVkFMOworCQlicmVhazsKKwl9CisJY2FzZSBERUNPREVSX1NFVF9PVVRQVVQ6IHsKKwkJaW50ICppYXJnID0gYXJnOworCisJCWlmICgqaWFyZyAhPSAwKQorCQkJcmV0dXJuIC1FSU5WQUw7CisJCWJyZWFrOworCX0KKwljYXNlIERFQ09ERVJfRU5BQkxFX09VVFBVVDogeworCQkvKiBBbHdheXMgZW5hYmxlZCAqLworCQlicmVhazsKKwl9CisJY2FzZSBERUNPREVSX1NFVF9QSUNUVVJFOiB7CisJCS8vIHN0cnVjdCB2aWRlb19waWN0dXJlICpwaWMgPSBhcmc7CisJCS8qIFRPRE86IGNvbnZlcnQgdmFsdWVzIGZvciBpbmR5Y2FtX3NldF9jb250cm9scygpICovCisJCWJyZWFrOworCX0KKwljYXNlIERFQ09ERVJfSU5EWUNBTV9HRVRfQ09OVFJPTFM6IHsKKwkJc3RydWN0IGluZHljYW1fY29udHJvbCAqY3RybCA9IGFyZzsKKwkJaW5keWNhbV9nZXRfY29udHJvbHMoY2xpZW50LCBjdHJsKTsKKwl9CisJY2FzZSBERUNPREVSX0lORFlDQU1fU0VUX0NPTlRST0xTOiB7CisJCXN0cnVjdCBpbmR5Y2FtX2NvbnRyb2wgKmN0cmwgPSBhcmc7CisJCWluZHljYW1fc2V0X2NvbnRyb2xzKGNsaWV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ZXIgZHJpdmVyOworc3RhdGljIHN0cnVjdCBpMmNfY2xpZW50IGNsaWVudF90ZW1wbGF0ZTsKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKgorICogU0FBNjU4OCBkZWZpbmVzCisgKi8KKworLyogSW5pdGlhbGl6YXRpb24gYW5kIG1vZGUgY29udHJvbCBieXRlICgwdykgKi8KKworLyogYml0IDArMSAoREFDMC9EQUMxKSAqLworI2RlZmluZSBjTW9kZVN0YW5kYXJkICAgICAgICAgICAweDAwCisjZGVmaW5lIGNNb2RlRmFzdFBJICAgICAgICAgICAgIDB4MDEKKyNkZWZpbmUgY01vZGVSZWR1Y2VkUmVxdWVzdCAgICAgMHgwMgorI2RlZmluZSBjTW9kZUludmFsaWQgICAgICAgICAgICAweDAzCisKKy8qIGJpdCAyIChSQkRTKSAqLworI2RlZmluZSBjUHJvY2Vzc2luZ01vZGVSRFMgICAgICAweDAwCisjZGVmaW5lIGNQcm9jZXNzaW5nTW9kZVJCRFMgICAgIDB4MDQKKworLyogYml0IDMrNCAoU1lNMC9TWU0xKSAqLworI2RlZmluZSBjRXJyQ29ycmVjdGlvbk5vbmUgICAgICAweDAwCisjZGVmaW5lIGNFcnJDb3JyZWN0aW9uMkJpdHMgICAgIDB4MDgKKyNkZWZpbmUgY0VyckNvcnJlY3Rpb241Qml0cyAgICAgMHgxMAorI2RlZmluZSBjRXJyQ29ycmVjdGlvbk5vbmVSQkRTICAweDE4CisKKy8qIGJpdCA1IChOV1NZKSAqLworI2RlZmluZSBjU3luY05vcm1hbCAgICAgICAgICAgICAweDAwCisjZGVmaW5lIGNTeW5jUmVzdGFydCAgICAgICAgICAgIDB4MjAKKworLyogYml0IDYgKFRTUUQpICovCisjZGVmaW5lIGNTaWdRdWFsaXR5RGV0ZWN0T0ZGICAgIDB4MDAKKyNkZWZpbmUgY1N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lmIChjaGlwLT5wcmV2bW9kZSAhPSBWSURFT19TT1VORF9NT05PKQotCQkgICAgCQljaGlwLT5wcmV2bW9kZSA9IC0xOyAvKiByZXNldCBwcmV2aW91cyBtb2RlICovCisJCQlpZiAoY2hpcC0+cHJldm1vZGUgIT0gVklERU9fU09VTkRfTU9OTykKKwkJCQljaGlwLT5wcmV2bW9kZSA9IC0xOyAvKiByZXNldCBwcmV2aW91cyBtb2RlICovCiAJCQltb2RfdGltZXIoJmNoaXAtPnd0LCBqaWZmaWVzKzIqSFopOwogCQkJLyogdGhlIHRocmVhZCB3aWxsIGNhbGwgY2hlY2ttb2RlKCkgbGF0ZXIgKi8KIAkJfQpAQCAtMTY4OSwyOSArMTcwNCwzMiBAQAogCiBzdGF0aWMgc3RydWN0IGkyY19kcml2ZXIgZHJpdmVyID0gewogCS5vd25lciAgICAgICAgICAgPSBUSElTX01PRFVMRSwKLSAgICAgICAgLm5hbWUgICAgICAgICAgICA9ICJnZW5lcmljIGkyYyBhdWRpbyBkcml2ZXIiLAotICAgICAgICAuaWQgICAgICAgICAgICAgID0gSTJDX0RSSVZFUklEX1RWQVVESU8sCi0gICAgICAgIC5mbGFncyAgICAgICAgICAgPSBJMkNfREZfTk9USUZZLAotICAgICAgICAuYXR0YWNoX2FkYXB0ZXIgID0gY2hpcF9wcm9iZSwKLSAgICAgICAgLmRldGFjaF9jbGllbnQgICA9IGNoaXBfZGV0YWNoLAotICAgICAgICAuY29tbWFuZCAgICAgICAgID0gY2hpcF9jb21tYW5kLAorCS5uYW1lICAgICAgICAgICAgPSAiZ2VuZXJpYyBpMmMgYXVkaW8gZHJpdmVyIiwKKwkuaWQgICAgICAgICAgICAgID0gSTJDX0RSSVZFUklEX1RWQVVESU8sCisJLmZsYWdzICAgICAgICAgICA9IEkyQ19ERl9OT1RJRlksCisJLmF0dGFjaF9hZGFwdGVyICA9IGNoaXBfcHJvYmUsCisJLmRldGFjaF9jbGllbnQgICA9IGNoaXBfZGV0YWNoLAorCS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JCWJyZWFrOwpAQCAtMjk0LDI0ICszMzcsMzAgQEAKIAkJCWxlbiA9IGVlcHJvbV9kYXRhW2ldICYgMHgwNzsKIAkJCSsraTsKIAkJfSBlbHNlIHsKLQkJCVRWRUVQUk9NX0tFUk5fRVJSKCJFbmNvdW50ZXJlZCBiYWQgcGFja2V0IGhlYWRlciBbJTAyeF0uICIKKwkJCXR2ZWVwcm9tX3dhcm4oIkVuY291bnRlcmVkIGJhZCBwYWNrZXQgaGVhZGVyIFslMDJ4XS4gIgogCQkJCSAgICJDb3JydXB0IG9yIG5vdCBhIEhhdXBwYXVnZSBlZXByb20uXG4iLCBlZXByb21fZGF0YVtpXSk7CiAJCQlyZXR1cm47CiAJCX0KIAotCQlkcHJpbnRrKDEsICIlM2QgWyUwMnhdICIsIGxlbiwgZWVwcm9tX2RhdGFbaV0pOwotCQlmb3IoaiA9IDE7IGogPCBsZW47IGorKykgewotCQkJZHByaW50aygxLCAiJTAyeCAiLCBlZXByb21fZGF0YVtpICsgal0pOwotCQl9Ci0JCWRwcmludGsoMSwgIlxuIik7CisgICAgICAgICAgICAgICAgaWYgKGRlYnVnKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB0dmVlcHJvbV9pbmZvKCJUYWcgWyUwMnhdICsgJWQgYnl0ZXM6IiwgZWVwcm9tX2RhdGFbaV0sIGxlbiAtIDEpOworICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGogPSAxOyBqIDwgbGVuOyBqKyspIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCIgJTAyeCIsIGVlcHJvbV9kYXRhW2kgKyBqXSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIlxuIik7CisgICAgICAgICAgICAgICAgfQogCiAJCS8qIHByb2Nlc3MgYnkgdGFnICovCiAJCXRhZyA9IGVlcHJvbV9kYXRhW2ldOwogCQlzd2l0Y2ggKHRhZykgewogCQljYXNlI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dGFnICdBdWRpb0luZm8nCisgICAgICAgICAgICAgICAgICAgICAgICAgICBOb3RlIG1hc2sgd2l0aCAweDdGLCBoaWdoIGJpdCB1c2VkIG9uIHNvbWUgb2xkZXIgbW9kZWxzCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBpbmRpY2F0ZSA0MDUyIG11eCB3YXMgcmVtb3ZlZCBpbiBmYXZvciBvZiB1c2luZyBNU1AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0cyBkaXJlY3RseS4gKi8KKwkJCXR2ZWUtPmF1ZGlvX3Byb2Nlc3NvciA9IGVlcHJvbV9kYXRhW2krMl0gJiAweDdmOwogCQkJYnJlYWs7CisKKyAgICAgICAgICAgICAgICAvKiBjYXNlIDB4MDM6IHRhZyAnRUVJbmZvJyAqLworCiAJCWNhc2UgMHgwNDoKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRhZyAnU2VyaWFsSUQyJyAqLwogCQkJdHZlZS0+c2VyaWFsX251bWJlciA9CiAJCQkJZWVwcm9tX2RhdGFbaSs1XSArCiAJCQkJKGVlcHJvbV9kYXRhW2krNl0gPDwgOCkgKwogCQkJCShlZXByb21fZGF0YVtpKzddIDw8IDE2KTsKIAkJCWJyZWFrOworCiAJCWNhc2UgMHgwNToKLQkJCXR2ZWUtPmF1ZGlvX3Byb2Nlc3NvciA9IGVlcHJvbV9kYXRhW2krMV0gJiAweDBmOworICAgICAgICAgICAgICAgICAgICAgICAgLyogdGFnICdBdWRpbzInCisgICAgICAgICAgICAgICAgICAgICAgICAgICBOb3RlIG1hc2sgd2l0aCAweDdGLCBoaWdoIGJpdCB1c2VkIG9uIHNvbWUgb2xkZXIgbW9kZWxzCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBpbmRpY2F0ZSA0MDUyIG11eCB3YXMgcmVtb3ZlZCBpbiBmYXZvciBvZiB1c2luZyBNU1AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0cyBkaXJlY3RseS4gKi8KKwkJCXR2ZWUtPmF1ZGlvX3Byb2Nlc3NvciA9IGVlcHJvbV9kYXRhW2krMV0gJiAweDdmOwogCQkJYnJlYWs7CisKIAkJY2FzZSAweDA2OgorICAgICAgICAgICAgICAgICAgICAgICAgLyogdGFnICdNb2RlbFJldicgKi8KIAkJCXR2ZWUtPm1vZGVsID0KIAkJCQllZXByb21fZGF0YVtpKzFdICsKIAkJCQkoZWVwcm9tX2RhdGFbaSsyXSA8PCA4KTsKQEAgLTM0NSwyNyArNDEyLDY2IEBACiAJCQkJKGVlcHJvbV9kYXRhW2krNl0gPDwgOCkgKwogCQkJCShlZXByb21fZGF0YVtpKzddIDw8IDE2KTsKIAkJCWJyZWFrOworCisJCWNhc2UgMHgwNzoKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRhZyAnRGV0YWlscyc6IGFjY29yZGluZyB0byBIYXVwcGF1Z2Ugbm90IGludGVyZXN0aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiBhbnkgUENJLWVyYSBvciBsYXRlciBib2FyZHMuICovCisJCQlicmVhazsKKworICAgICAgICAgICAgICAgIC8qIHRoZXJlIGlzIG5vIHRhZyAweDA4IGRlZmluZWQgKi8KKworCQljYXNlIDB4MDk6CisgICAgICAgICAgICAgICAgICAgICAgICAvKiB0YWcgJ1ZpZGVvJyAqLworCQkJdHZlZS0+ZGVjb2Rlcl9wcm9jZXNzb3IgPSBlZXByb21fZGF0YVtpICsgMV07CisJCQlicmVhazsKKwogCQljYXNlIDB4MGE6Ci0JCQlpZihiZWVuaGVyZSA9PSAwKSB7Ci0JCQkJdHVuZXIgPSBlZXByb21fZGF0YVtpKzJdOwotCQkJCXRfZm9ybWF0ID0gZWVwcm9tX2RhdGFbaSsxXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRhZyAnVHVuZXInICovCisJCQlpZiAoYmVlbmhlcmUgPT0gMCkgeworCQkJCXR1bmVyMSA9IGVlcHJvbV9kYXRhW2krMl07CisJCQkJdF9mb3JtYXQxID0gZWVwcm9tX2RhdGFbaSsxXTsKIAkJCQliZWVuaGVyZSA9IDE7Ci0JCQkJYnJlYWs7CiAJCQl9IGVsc2UgewotCQkJCWJyZWFrOwotCQkJfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBhIHNlY29uZCAocmFkaW8pIHR1bmVyIG1heSBiZSBwcmVzZW50ICovCisJCQkJdHVuZXIyID0gZWVwcm9tX2RhdGFbaSsyXTsKKwkJCQl0X2Zvcm1hdDIgPSBlZXByb21fZGF0YVtpKzFdOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodF9mb3JtYXQyID09IDApIHsgIC8qIG5vdCBhIFRWIHR1bmVyPyAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR2ZWUtPmhhc19yYWRpbyA9IDE7IC8qIG11c3QgYmUgcmFkaW8gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkJYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNlIDB4MGI6CisgICAgICAgICAgICAgICAgICAgICAgICAvKiB0YWcgJ0lucHV0cyc6IGFjY29yZGluZyB0byBIYXVwcGF1Z2UgdGhpcyBpcyBzcGVjaWZpYworICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gZWFjaCBkcml2ZXIgZmFtaWx5LCBzbyBubyBnb29kIGFzc3VtcHRpb25zIGNhbiBiZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFkZS4gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgLyogY2FzZSAweDBjOiB0YWcgJ0JhbHVuJyAqLworICAgICAgICAgICAgICAgIC8qIGNhc2UgMHgwZDogdGFnICdUZWxldGV4dCcgKi8KKwogCQljYXNlIDB4MGU6CisgICAgICAgICAgICAgICAgICAgICAgICAvKiB0YWc6ICdSYW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HRfZm10X25hbWUxWzRdLCB0X2ZtdF9uYW1lMVs1XSwgdF9mbXRfbmFtZTFbNl0sIHRfZm10X25hbWUxWzddLAorICAgICAgICAgICAgICAgICAgIHRfZm9ybWF0MSk7CisgICAgICAgIGlmICh0dW5lcjIpIHsKKyAgICAgICAgICAgICAgICB0dmVlcHJvbV9pbmZvKCJzZWNvbmQgdHVuZXIgbW9kZWwgaXMgJXMgKGlkeCAlZCwgdHlwZSAlZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0X25hbWUyLCB0dW5lcjIsIHR2ZWUtPnR1bmVyMl90eXBlKTsKKyAgICAgICAgfQorICAgICAgICBpZiAodF9mb3JtYXQyKSB7CisgICAgICAgICAgICAgICAgdHZlZXByb21faW5mbygiVFYgc3RhbmRhcmRzJXMlcyVzJXMlcyVzJXMlcyAoZWVwcm9tIDB4JTAyeClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0X2ZtdF9uYW1lMlswXSwgdF9mbXRfbmFtZTJbMV0sIHRfZm10X25hbWUyWzJdLCB0X2ZtdF9uYW1lMlszXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHRfZm10X25hbWUyWzRdLCB0X2ZtdF9uYW1lMls1XSwgdF9mbXRfbmFtZTJbNl0sIHRfZm10X25hbWUyWzddLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgdF9mb3JtYXQyKTsKKyAgICAgICAgfQorCXR2ZWVwcm9tX2luZm8oImF1ZGlvIHByb2Nlc3NvciBpcyAlcyAoaWR4ICVkKVxuIiwKKwkJICAgU1RSTShhdWRpb0lDLCB0dmVlLT5hdWRpb19wcm9jZXNzb3IpLAogCQkgICB0dmVlLT5hdWRpb19wcm9jZXNzb3IpOwotCisgICAgICAgIGlmICh0dmVlLT5kZWNvZGVyX3Byb2Nlc3NvcikgeworICAgICAgICAgICAgICAgIHR2ZWVwcm9tX2luZm8oImRlY29kZXIgcHJvY2Vzc29yIGlzICVzIChpZHggJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgU1RSTShkZWNvZGVySUMsIHR2ZWUtPmRlY29kZXJfcHJvY2Vzc29yKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHR2ZWUtPmRlY29kZXJfcHJvY2Vzc29yKTsKKyAgICAgICAgfQorICAgICAgICBpZiAodHZlZS0+aGFzX2lyID09IDIpCisgICAgICAgICAgICAgICAgdHZlZXByb21faW5mbygiaGFzICVzcmFkaW9cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR2ZWUtPmhhc19yYWRpbyA/ICIiIDogIm5vICIpOworICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgdHZlZXByb21faW5mbygiaGFzICVzcmFkaW8sIGhhcyAlc0lSIHJlbW90ZVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHZlZS0+aGFzX3JhZGlvID8gIiIgOiAibm8gIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHZlZS0+aGFzX2lyID8gIiIgOiAibm8gIik7CiB9CiBFWFBPUlRfU1lNQk9MKHR2ZWVwcm9tX2hhdXBwYXVnZV9hbmFsb2cpOwogCkBAIC00MjksNDAgKzU2MCwzMSBAQAogCXVuc2lnbmVkIGNoYXIgYnVmOwogCWludCBlcnI7CiAKLQlkcHJpbnRrKDEsICIlc1xuIixfX0ZVTkNUSU9OX18pOwogCWJ1ZiA9IDA7Ci0JaWYgKDEgIT0gKGVyciA9IGkyY19tYXN0ZXJfc2VuZChjLCZidWYsMSkpKSB7Ci0JCXByaW50ayhLRVJOX0lORk8gInR2ZWVwcm9tKCVzKTogSHVoLCBubyBlZXByb20gcHJlc2VudCAoZXJyPSVkKT9cbiIsCi0JCSAgICAgICBjLT5uYW1lLGVycik7CisJaWYgKDEgIT0gKGVyciA9IGkyY19tYXN0ZXJfc2VuZChjLCAmYnVmLCAxKSkpIHsKKwkJdHZlZXByb21faW5mbygiSHVoLCBubyBlZXByb20gcHJlc2VudCAoZXJyPSVkKT9cbiIsIGVycik7CiAJCXJldHVybiAtMTsKIAl9Ci0JaWYgKGxlbiAhPSAoZXJyID0gaTJjX21hc3Rlcl9yZWN2KGMsZWVkYXRhLGxlbikpKSB7Ci0JCXByaW50ayhLRVJOX1dBUk5JTkcgInR2ZWVwcm9tKCVzKTogaTJjIGVlcHJvbSByZWFkIGVycm9yIChlcnI9JWQpXG4iLAotCQkgICAgICAgYy0+bmFtZSxlcnIpOworCWlmIChsZW4gIT0gKGVyciA9IGkyY19tYXN0ZXJfcmVjdihjLCBlZWRhdGEsIGxlbikpKSB7CisJCXR2ZWVwcm9tX3dhcm4oImkyYyBlZXByb20gcmVhZCBlcnJvciAoZXJyPSVkKVxuIiwgZXJyKTsKIAkJcmV0dXJuIC0xOwogCX0KKyAgICAgICAgaWYgKGRlYnVnKSB7CisgICAgICAgICAgICAgICAgaW50IGk7CisKKyAgICAgICAgICAgICAgICB0dmVlcHJvbV9pbmZvKCJmdWxsIDI1Ni1ieXRlIGVlcHJvbSBkdW1wOlxuIik7CisgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PSAoaSAlIDE2KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHZlZXByb21faW5mbygiJTAyeDoiLCBpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiICUwMngiLCBlZWRhdGFbaV0pOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDE1ID09IChpICUgMTYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIlxuIik7CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CiAJcmV0dXJuIDA7CiB9CiBFWFBPUlRfU1lNQk9MKHR2ZWVwcm9tX3JlYWQpOwogCi0jaWYgMAotaW50IHR2ZWVwcm9tX2R1bXAodW5zaWduZWQgY2hhciAqZWVkYXRhLC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0byBjbGVhciBpbnRlcnJ1cHQgc3RhdHVzICovCisJdmluby0+aW50cl9zdGF0dXMgPSB+aW50cjsKKworCXNwaW5fdW5sb2NrKCZ2aW5vX2RydmRhdGEtPnZpbm9fbG9jayk7CisKKwlpZiAoZG9uZV9hKSB7CisJCXZpbm9fZnJhbWVfZG9uZSgmdmlub19kcnZkYXRhLT5hLCBmY19hKTsKKwkJZHByaW50aygiY2hhbm5lbCBBIGZyYW1lIGRvbmUsIGludGVycnVwdDogJWRcbiIsIGludHIpOworCX0KKwlpZiAoZG9uZV9iKSB7CisJCXZpbm9fZnJhbWVfZG9uZSgmdmlub19kcnZkYXRhLT5iLCBmY19iKTsKKwkJZHByaW50aygiY2hhbm5lbCBCIGZyYW1lIGRvbmUsIGludGVycnVwdDogJWRcbiIsIGludHIpOworCX0KKworCXJldHVybiBJUlFfSEFORExFRDsKK30KKworLyogVklOTyB2aWRlbyBpbnB1dCBtYW5hZ2VtZW50ICovCisKK3N0YXRpYyBpbnQgdmlub19nZXRfc2FhNzE5MV9pbnB1dChpbnQgaW5wdXQpCit7CisJc3dpdGNoIChpbnB1dCkgeworCWNhc2UgVklOT19JTlBVVF9DT01QT1NJVEU6CisJCXJldHVybiBTQUE3MTkxX0lOUFVUX0NPTVBPU0lURTsKKwljYXNlIFZJTk9fSU5QVVRfU1ZJREVPOgorCQlyZXR1cm4gU0FBNzE5MV9JTlBVVF9TVklERU87CisJZGVmYXVsdDoKKwkJcHJpbnRrKEtFUk5fRVJSICJWSU5POiB2aW5vX2dldF9zYWE3MTkxX2lucHV0KCk6ICIKKwkJICAgICAgICJpbnZhbGlkIGlucHV0IVxuIik7CisJCXJldHVybiAtMTsKKwl9Cit9CisKK3N0YXRpYyBpbnQgdmlub19nZXRfc2FhNzE5MV9ub3JtKGludCBub3JtKQoreworCXN3aXRjaCAobm9ybSkgeworCWNhc2UgVklOT19EQVRBX05PUk1fQVVUTzoKKwkJcmV0dXJuIFNBQTcxOTFfTk9STV9BVVRPOworC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AgICAgICAgICgweDFFKQogCisjZGVmaW5lIE1QSV9GVU5DVElPTl9TQ1NJX0lPXzMyICAgICAgICAgICAgICAgICAgICAgKDB4MUYpCisKICNkZWZpbmUgTVBJX0ZVTkNUSU9OX0xBTl9TRU5EICAgICAgICAgICAgICAgICAgICAgICAoMHgyMCkKICNkZWZpbmUgTVBJX0ZVTkNUSU9OX0xBTl9SRUNFSVZFICAgICAgICAgICAgICAgICAgICAoMHgyMSkKICNkZWZpbmUgTVBJX0ZVTkNUSU9OX0xBTl9SRVNFVCAgICAgICAgICAgICAgICAgICAgICAoMHgyMikKIAorI2RlZmluZSBNUElfRlVOQ1RJT05fVEFSR0VUX0FTU0lTVF9FWFRFTkRFRCAgICAgICAgICgweDIzKQogI2RlZmluZSBNUElfRlVOQ1RJT05fVEFSR0VUX0NNRF9CVUZfQkFTRV9QT1NUICAgICAgICgweDI0KQogI2RlZmluZSBNUElfRlVOQ1RJT05fVEFSR0VUX0NNRF9CVUZfTElTVF9QT1NUICAgICAgICgweDI1KQogCkBAIC02ODEsNiArNjg3LDE1IEBACiAjZGVmaW5lIE1QSV9JT0NTVEFUVVNfU0NTSV9FWFRfVEVSTUlOQVRFRCAgICAgICAoMHgwMDRDKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICBGb3IgdXNlIGJ5IFNDU0kgSW5pdGlhdG9yIGFuZCBTQ1NJIFRhcmdldCBlbmQtdG8tZW5kIGRhdGEgcHJvdGVjdGlvbiAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgTVBJX0lPQ1NUQVRVU19FRURQX0dVQVJEX0VSUk9SICAgICAgICAgICgweDAwNEQpCisjZGVmaW5lIE1QSV9JT0NTVEFUVVNfRUVEUF9SRUZfVEFHX0VSUk9SICAgICAgICAoMHgwMDRFKQorI2RlZmluZSBNUElfSU9DU1RBVFVTX0VFRFBfQVBQX1RBR19FUlJPUiAgICAgICAgKDB4MDA0RikKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICBTQ1NJIFRhcmdldCB2YWx1ZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbHNpL21waV9jbmZnLmggYi9kcml2ZXJzL21lc3NhZ2UvZnVzaW9uL2xzaS9tcGlfY25mZy5oCmluZGV4IDE1YjEyYjAuLmQ4MzM5ODkgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbHNpL21waV9jbmZnLmgKKysrIGIvZHJpdmVycy9tZXNzYWdlL2Z1c2lvbi9sc2kvbXBpX2NuZmcuaApAQCAtNiw3ICs2LDcgQEAKICAqICAgICAgICAgIFRpdGxlOiAgTVBJIENvbmZpZyBtZXNzYWdlLCBzdHJ1Y3R1cmVzLCBhbmQgUGFnZXMKICAqICBDcmVhdGlvbiBEYXRlOiAgSnVseSAyNywgMjAwMAogICoKLSAqICAgIG1waV9jbmZnLmggVmVyc2lvbjogIDAxLjA1LjA4CisgKiAgICBtcGlfY25mZy5oIFZlcnNpb246ICAwMS4wNS4wOQogICoKICAqICBWZXJzaW9uIEhpc3RvcnkKICAqICAtLS0tLS0tLS0tLS0tLS0KQEAgLTIzMiw2ICsyMzIsMjMgQEAKICAqICAgICAgICAgICAgICAgICAgICAgIE5ldyBwaHlzaWNhbCBtYXBwaW5nIG1vZGUgaW4gU0FTIElPIFVuaXQgUGFnZSAyLgogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgQ09ORklHX1BBR0VfU0FTX0VOQ0xPU1VSRV8wLgogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgU2xvdCBhbmQgRW5jbG9zdXJlIGZpZWxkcyB0byBTQVMgRGV2aWNlIFBhZ2UgMC4KKyAqICAwNi0yNC0wNSAgMDEuMDUuMDkgIEFkZGVkIEVFRFAgZGVmaW5lcyB0byBJT0MgUGFnZSAxLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbW9yZSBSQUlEIHR5cGUgZGVmaW5lcyB0byBJT0MgUGFnZSAyLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgUG9ydCBFbmFibGUgRGVsYXkgc2V0dGluZ3MgdG8gQklPUyBQYWdlIDEuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBCYWQgQmxvY2sgVGFibGUgRnVsbCBkZWZpbmUgdG8gUkFJRCBWb2x1bWUgUGFnZSAwLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgUHJldmlvdXMgU3RhdGUgZGVmaW5lcyB0byBSQUlEIFBoeXNpY2FsIERpc2sKKyAqICAgICAgICAgICAgICAgICAgICAgIFBhZ2UgMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1heCBTYXRhIFRhcmdldHMgZGVmaW5lIGZvciBEaXNjb3ZlcnlTdGF0dXMgZmllbGQKKyAqICAgICAgICAgICAgICAgICAgICAgIG9mIFNBUyBJTyBVbml0IFBhZ2UgMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIERldmljZSBTZWxmIFRlc3QgdG8gQ29udHJvbCBGbGFncyBvZiBTQVMgSU8gVW5pdAorICogICAgICAgICAgICAgICAgICAgICAgUGFnZSAxLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgRGlyZWN0IEF0dGFjaCBTdGFydGluZyBTbG90IE51bWJlciBkZWZpbmUgZm9yIFNBUworICogICAg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RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9JTUUgICAgICAgICAgICAgICAgICAgICAgICgweDAxKQogI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9JTSAgICAgICAgICAgICAgICAgICAgICAgICgweDAyKQorI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9SQUlEXzUgICAgICAgICAgICAgICAgICAgICgweDAzKQorI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9SQUlEXzYgICAgICAgICAgICAgICAgICAgICgweDA0KQorI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9SQUlEXzEwICAgICAgICAgICAgICAgICAgICgweDA1KQorI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9SQUlEXzUwICAgICAgICAgICAgICAgICAgICgweDA2KQorI2RlZmluZSBNUElfUkFJRF9WT0xfVFlQRV9VTktOT1dOICAgICAgICAgICAgICAgICAgICgweEZGKQogCiAvKiBJT0MgUGFnZSAyIFZvbHVtZSBGbGFncyB2YWx1ZXMgKi8KIApAQCAtODIwLDEzICs4NDcsMTcgQEAKIH0gQ09ORklHX1BBR0VfSU9DXzIsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9JT0NfMiwKICAgSU9DUGFnZTJfdCwgTVBJX1BPSU5URVIgcElPQ1BhZ2UyX3Q7CiAKLSNkZWZpbmUgTVBJX0lPQ1BBR0UyX1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDIpCisjZGVmaW5lIE1QSV9JT0NQQUdFMl9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICgweDAzKQogCiAvKiBJT0MgUGFnZSAyIENhcGFiaWxpdGllcyBmbGFncyAqLwogCiAjZGVmaW5lIE1QSV9JT0NQQUdFMl9DQVBfRkxBR1NfSVNfU1VQUE9SVCAgICAgICAgICAgICAgICgweDAwMDAwMDAxKQogI2RlZmluZSBNUElfSU9DUEFHRTJfQ0FQX0ZMQUdTX0lN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TklUMl9GTEFHU19SRVNFUlZFX0lEXzBfRk9SX0JPT1QgICAgICAgICAoMHgxMCkKKyNkZWZpbmUgTVBJX1NBU19JT1VOSVQyX0ZMQUdTX0RBX1NUQVJUSU5HX1NMT1QgICAgICAgICAgICAgICgweDIwKQogCiAKIHR5cGVkZWYgc3RydWN0IF9DT05GSUdfUEFHRV9TQVNfSU9fVU5JVF8zCkBAIC0yNTg0LDExICsyNjIyLDE5IEBACiB7CiAgICAgQ09ORklHX0VYVEVOREVEX1BBR0VfSEVBREVSICAgICAgICAgSGVhZGVyOyAgICAgICAgICAgICAgICAgLyogMDBoICovCiAgICAgVTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGh5c2ljYWxJZGVudGlmaWVyOyAgICAgLyogMDhoICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgLyogMTBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5jbG9zdXJlTWFwcGluZzsgICAgICAgLyogMTBoICovCiB9IENPTkZJR19QQUdFX1NBU19ERVZJQ0VfMiwgTVBJX1BPSU5URVIgUFRSX0NPTkZJR19QQUdFX1NBU19ERVZJQ0VfMiwKICAgU2FzRGV2aWNlUGFnZTJfdCwgTVBJX1BPSU5URVIgcFNhc0RldmljZVBhZ2UyX3Q7CiAKLSNkZWZpbmUgTVBJX1NBU0RFVklDRTJfUEFHRVZFUlNJT04gICAgICAgICAgKDB4MDApCisjZGVmaW5lIE1QSV9TQVNERVZJQ0UyX1BBR0VWRVJTSU9OICAgICAgICAgICgweDAxKQorCisvKiBkZWZpbmVzIGZvciBTQVMgRGV2aWNlIFBhZ2UgMiBFbmNsb3N1cmVNYXBwaW5nIGZpZWxkICovCisjZGVmaW5lIE1QSV9TQVNERVZJQ0UyX0VOQ19NQVBfTUFTS19NSVNTSU5HX0NPVU5UICAgICAgICgweDAwMDAwMDBGKQorI2RlZmluZSBNUElfU0FTREVWSUNFMl9FTkNfTUFQX1NISUZUX01JU1NJTkdfQ09VTlQgICAgICAoMCkKKyNkZWZpbmUgTVBJX1NBU0RFVklDRTJfRU5DX01BUF9NQVNLX05VTV9TTE9UUyAgICAgICAgICAgKDB4MDAwMDA3RjApCisjZGVmaW5lIE1QSV9TQVNERVZJQ0UyX0VOQ19NQVBfU0hJRlRfTlVNX1NMT1RTICAgICAgICAgICg0KQorI2RlZmluZSBNUElfU0FTREVWSUNFMl9FTkNfTUFQX01BU0tfU1RBUlRfSU5ERVggICAgICAgICAoMHgwMDFGRjgwMCkKKyNkZWZpbmUgTVBJX1NBU0RFVklDRTJfRU5DX01BUF9TSElGVF9TVEFSVF9JTkRFWCAgICAgICAgKDExKQogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0yNTk4LDcgKzI2NDQsOCBAQAogdHlwZWRlZiBzdHJ1Y3QgX0NPTkZJR19QQUdFX1NBU19QSFlfMAogewogICAgIENPTkZJR19FWFRFTkRFRF9QQUdFX0hFQURFUiAgICAgICAgIEhlYWRlcjsgICAgICAgICAgICAgICAgIC8qIDAwaCAqLwotICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDA4aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE93bmVyRGV2SGFuZGxlOyAgICAgICAgIC8qIDA4aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDBBaCAqLwogICAgIFU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNBU0FkZHJlc3M7ICAgICAgICAgICAgIC8qIDBDaCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEF0dGFjaGVkRGV2SGFuZGxlOyAgICAgIC8qIDE0aCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEF0dGFjaGVkUGh5SWRlbnRpZmllcjsgIC8qIDE2aCAqLwpAQCAtMjYwNywxMiArMjY1NCwxMiBAQAogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFByb2dyYW1tZWRMaW5rUmF0ZTsgICAgIC8qIDIwaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh3TGlua1JhdGU7ICAgICAgICAgICAgIC8qIDIxaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENoYW5nZUNvdW50OyAgICAgICAgICAgIC8qIDIyaCAqLwotICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMzsgICAgICAgICAgICAgIC8qIDIzaCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAgICAgICAgICAgIC8qIDIzaCAqLwogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBoeUluZm87ICAgICAgICAgICAgICAgIC8qIDI0aCAqLwogfSBDT05GSUdfUEFHRV9TQVNfUEhZXzAsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9TQVNfUEhZXzAsCiAgIFNhc1BoeVBhZ2UwX3QsIE1QSV9QT0lOVEVSIHBTYXNQaHlQYWdlMF90OwogCi0jZGVmaW5lIE1QSV9TQVNQSFkwX1BBR0VWRVJTSU9OICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUElfU0FTUEhZMF9QQUdFVkVSU0lPTiAgICAgICAgICAgICAoMHgwMSkKIAogLyogdmFsdWVzIGZvciBTQVMgUEhZIFBhZ2UgMCBQcm9ncmFtbWVkTGlua1JhdGUgZmllbGQgKi8KICNkZWZpbmU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IFZlcnNpb246ICAgIDAxLjA1LjA5CisgSGVhZGVyIFNldCBSZWxlYXNlIFZlcnNpb246ICAgIDAxLjA1LjEwCiAgSGVhZGVyIFNldCBSZWxlYXNlIERhdGU6ICAgICAgIDAzLTExLTA1CiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKICBGaWxlbmFtZSAgICAgICAgICAgICAgIEN1cnJlbnQgdmVyc2lvbiAgICAgUHJpb3IgdmVyc2lvbgogIC0tLS0tLS0tLS0gICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tICAgICAtLS0tLS0tLS0tLS0tCi0gbXBpLmggICAgICAgICAgICAgICAgICAwMS4wNS4wNyAgICAgICAgICAgIDAxLjA1LjA2Ci0gbXBpX2lvYy5oICAgICAgICAgICAgICAwMS4wNS4wOCAgICAgICAgICAgIDAxLjA1LjA3Ci0gbXBpX2NuZmcuaCAgICAgICAgICAgICAwMS4wNS4wOCAgICAgICAgICAgIDAxLjA1LjA3Ci0gbXBpX2luaXQuaCAgICAgICAgICAgICAwMS4wNS4wNCAgICAgICAgICAgIDAxLjA1LjAzCi0gbXBpX3RhcmcuaCAgICAgICAgICAgICAwMS4wNS4wNCAgICAgICAgICAgIDAxLjA1LjAzCisgbXBpLmggICAgICAgICAgICAgICAgICAwMS4wNS4wOCAgICAgICAgICAgIDAxLjA1LjA3CisgbXBpX2lvYy5oICAgICAgICAgICAgICAwMS4wNS4wOSAgICAgICAgICAgIDAxLjA1LjA4CisgbXBpX2NuZmcuaCAgICAgICAgICAgICAwMS4wNS4wOSAgICAgICAgICAgIDAxLjA1LjA4CisgbXBpX2luaXQuaCAgICAgICAgICAgICAwMS4wNS4wNSAgICAgICAgICAgIDAxLjA1LjA0CisgbXBpX3RhcmcuaCAgICAgICAgICAgICAwMS4wNS4wNSAgICAgICAgICAgIDAxLjA1LjA0CiAgbXBpX2ZjLmggICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgI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AgICAgQWRkZWQgbW9yZSBSQUlEIHR5cGUgZGVmaW5lcyB0byBJT0MgUGFnZSAyLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgUG9ydCBFbmFibGUgRGVsYXkgc2V0dGluZ3MgdG8gQklPUyBQYWdlIDEuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBCYWQgQmxvY2sgVGFibGUgRnVsbCBkZWZpbmUgdG8gUkFJRCBWb2x1bWUgUGFnZSAwLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgUHJldmlvdXMgU3RhdGUgZGVmaW5lcyB0byBSQUlEIFBoeXNpY2FsIERpc2sKKyAqICAgICAgICAgICAgICAgICAgICAgIFBhZ2UgMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1heCBTYXRhIFRhcmdldHMgZGVmaW5lIGZvciBEaXNjb3ZlcnlTdGF0dXMgZmllbGQKKyAqICAgICAgICAgICAgICAgICAgICAgIG9mIFNBUyBJTyBVbml0IFBhZ2UgMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIERldmljZSBTZWxmIFRlc3QgdG8gQ29udHJvbCBGbGFncyBvZiBTQVMgSU8gVW5pdAorICogICAgICAgICAgICAgICAgICAgICAgUGFnZSAxLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgRGlyZWN0IEF0dGFjaCBTdGFydGluZyBTbG90IE51bWJlciBkZWZpbmUgZm9yIFNBUworICogICAgICAgICAgICAgICAgICAgICAgSU8gVW5pdCBQYWdlIDIuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBuZXcgZmllbGRzIGluIFNBUyBEZXZpY2UgUGFnZSAyIGZvciBlbmNsb3N1cmUKKyAqICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBPd25lckRldkhhbmRsZSBhbmQgRmxhZ3MgZmllbGQgdG8gU0FTIFBIWSBQYWdlIDAuCis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luaXQuaCBWZXJzaW9uOiAgMDEuMDUuMDUKICAqCiAgKiAgVmVyc2lvbiBIaXN0b3J5CiAgKiAgLS0tLS0tLS0tLS0tLS0tCkBAIC00OCw2ICs0OCw4IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICBNb2RpZmllZCBTQ1NJIEVuY2xvc3VyZSBQcm9jZXNzb3IgUmVxdWVzdCBhbmQgUmVwbHkgdG8KICAqICAgICAgICAgICAgICAgICAgICAgIHN1cHBvcnQgRW5jbG9zdXJlL1Nsb3QgYWRkcmVzc2luZyByYXRoZXIgdGhhbiBXV0lECiAgKiAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzaW5nLgorICogIDA2LTI0LTA1ICAwMS4wNS4wNSAgQWRkZWQgU0NTSSBJTyAzMiBzdHJ1Y3R1cmVzIGFuZCBkZWZpbmVzLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgZm91ciBuZXcgZGVmaW5lcyBmb3IgU0VQIFNsb3RTdGF0dXMuCiAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAqLwogCkBAIC0yMDMsNiArMjA1LDE5NyBAQAogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogIFNDU0kgSU8gMzIgbWVzc2FnZXMgYW5kIGFzc29jaWF0ZWQgc3RydWN0dXJlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordHlwZWRlZiBzdHJ1Y3QKK3sKKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBDREJbMjBdOyAgICAgICAgICAgICAgICAgICAgLyogMDBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUHJpbWFyeVJlZmVyZW5jZVRhZzsgICAgICAgIC8qIDE0aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFByaW1hcnlBcHBsaWNhdGlvblRhZzsgICAgICAvKiAxOGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBQcmltYXJ5QXBwbGljYXRpb25UYWdNYXNrOyAgLyogMUFoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgVHJhbnNmZXJMZW5ndGg7ICAgICAgICAgICAgIC8qIDFDaCAqLworfSBNUElfU0NTSV9JTzMyX0NEQl9FRURQMzIsIE1QSV9QT0lOVEVSIFBUUl9NUElfU0NTSV9JTzMyX0NEQl9FRURQMzIsCisgIE1waVNjc2lJbzMyQ2RiRWVkcDMyX3QsIE1QSV9QT0lOVEVSIHBNcGlTY3NpSW8zMkNkYkVlZHAzMl90OworCit0eXBlZGVmIHN0cnVjdAoreworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIENEQlsxNl07ICAgICAgICAgICAgICAgICAgICAvKiAwMGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBEYXRhTGVuZ3RoOyAgICAgICAgICAgICAgICAgLyogMTBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUHJpbWFyeVJlZmVyZW5jZVRhZzsgICAgICAgIC8qIDE0aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFByaW1hcnlBcHBsaWNhdGlvblRhZzsgICAgICAvKiAxOGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBQcmltYXJ5QXBwbGljYXRpb25UYWdNYXNrOyAgLyogMUFoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgVHJhbnNmZXJMZW5ndGg7ICAgICAgICAgICAgIC8qIDFDaCAqLworfSBNUElfU0NTSV9JTzMyX0NEQl9FRURQMTYsIE1QSV9QT0lOVEVSIFBUUl9NUElfU0NTSV9JTzMyX0N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fRk9STSAgICBTQ1NJSUQ7CisgICAgVTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV1dJRDsKK30gTVBJX1NDU0lfSU8zMl9BRERSRVNTLCBNUElfUE9JTlRFUiBQVFJfTVBJX1NDU0lfSU8zMl9BRERSRVNTLAorICBNcGlTY3NpSW8zMkFkZHJlc3NfdCwgTVBJX1BPSU5URVIgcE1waVNjc2lJbzMyQWRkcmVzc190OworCit0eXBlZGVmIHN0cnVjdCBfTVNHX1NDU0lfSU8zMl9SRVFVRVNUCit7CisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFBvcnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMDBoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAgICAgLyogMDFoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIENoYWluT2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgLyogMDJoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIEZ1bmN0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgLyogMDNoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIENEQkxlbmd0aDsgICAgICAgICAgICAgICAgICAgICAgLyogMDRoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFNlbnNlQnVmZmVyTGVuZ3RoOyAgICAgICAgICAgICAgLyogMDVoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMDZoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIE1zZ0ZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgLyogMDdoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIE1zZ0NvbnRleHQ7ICAgICAgICAgICAgICAgICAgICAgLyogMDhoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIExVTls4XTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogMENoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2w7ICAgICAgICAgICAgICAgICAgICAgICAgLyogMTRoICovCisgICAgTVBJX1NDU0lfSU8zMl9DREJfVU5JT04gICAgIENEQjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMThoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIERhdGFMZW5ndGg7ICAgICAgICAgICAgICAgICAgICAgLyogMzhoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIEJpZGlyZWN0aW9uYWxEYXRhTGVuZ3RoOyAgICAgICAgLyogM0NoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFNlY29uZGFyeVJlZmVyZW5jZVRhZzsgICAgICAgICAgLyogNDBoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgIFNlY29uZGFyeUFwcGxpY2F0aW9uVGFnOyAgICAgICAgLyogNDRoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAgICAgLyogNDZoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgIEVFRFBGbGFnczsgICAgICAgICAgICAgICAgICAgICAgLyogNDhoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgIEFwcGxpY2F0aW9uVGFnVHJhbnNsYXRpb25NYXNrOyAgLyogNEFoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIEVFRFBCbG9ja1NpemU7ICAgICAgICAgICAgICAgICAgLyogNENoICovCisgICAgTVBJX1NDU0lfSU8zMl9BRERSRVNTICAgICAgIERldmljZUFkZHJlc3M7ICAgICAgICAgICAgICAgICAgLyogNTBoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDA7ICAgICAgICAgICAgICAgICAgICAgLyogNThoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDE7ICAgICAgICAgICAgICAgICAgICAgLyogNTloICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDI7ICAgICAgICAgICAgICAgICAgICAgLyogNUFoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDM7ICAgICAgICAgICAgICAgICAgICAgLyogNUJoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMzsgICAgICAgICAgICAgICAgICAgICAgLyogNUNoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAgICAgLyogNjBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFNlbnNlQnVmZmVyTG93QWRkcjsgICAgICAgICAgICAgLyogNjRoICovCisgICAgU0dFX0lPX1VOSU9OICAgICAgICAgICAgICAgIFNHTDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogNjhoICovCit9IE1TR19TQ1NJX0lPMzJfUkVRVUVTVCwgTVBJX1BPSU5URVIgUFRSX01TR19TQ1NJX0lPMzJfUkVRVUVTVCwKKyAgU0NTSUlPMzJSZXF1ZXN0X3QsIE1QSV9QT0lOVEVSIHBTQ1NJSU8zMlJlcXVlc3RfdDsKKworLyogU0NTSSBJTyAzMiBNc2dGbGFncyBiaXRzICovCisjZGVmaW5lIE1QSV9TQ1NJSU8zMl9NU0dGTEdTX1NFTlNFX1dJRFRIICAgICAgICAgICAgICAgICgweDAxKQorI2RlZmluZSBNUElfU0NTSUlPMzJfTVNHRkxHU19TRU5TRV9XSURUSF8zMiAgICAgICAgICAgICAoMHgwMCkKKyNkZWZpbmUgTVBJX1NDU0lJTzMyX01TR0ZMR1NfU0VOU0VfV0lEVEhfNjQgICAgICAgICAgICAgKDB4MDEpCisKKyNkZWZpbmUgTVBJX1ND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iAwMmggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBGdW5jdGlvbjsgICAgICAgICAgICAgICAgICAgLyogMDNoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgQ0RCTGVuZ3RoOyAgICAgICAgICAgICAgICAgIC8qIDA0aCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIFNlbnNlQnVmZmVyTGVuZ3RoOyAgICAgICAgICAvKiAwNWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgICAgICAgICAgLyogMDZoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgTXNnRmxhZ3M7ICAgICAgICAgICAgICAgICAgIC8qIDA3aCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIE1zZ0NvbnRleHQ7ICAgICAgICAgICAgICAgICAvKiAwOGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBTQ1NJU3RhdHVzOyAgICAgICAgICAgICAgICAgLyogMENoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgU0NTSVN0YXRlOyAgICAgICAgICAgICAgICAgIC8qIDBEaCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIElPQ1N0YXR1czsgICAgICAgICAgICAgICAgICAvKiAwRWggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBJT0NMb2dJbmZvOyAgICAgICAgICAgICAgICAgLyogMTBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgVHJhbnNmZXJDb3VudDsgICAgICAgICAgICAgIC8qIDE0aCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFNlbnNlQ291bnQ7ICAgICAgICAgICAgICAgICAvKiAxOGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBSZXNwb25zZUluZm87ICAgICAgICAgICAgICAgLyogMUNoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgVGFza1RhZzsgICAgICAgICAgICAgICAgICAgIC8qIDIwaCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAvKiAyMmggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBCaWRpcmVjdGlvbmFsVHJhbnNmZXJDb3VudDsgLyogMjRoICovCit9IE1TR19TQ1NJSU8zMl9JT19SRVBMWSwgTVBJX1BPSU5URVIgUFRSX01TR19TQ1NJSU8zMl9JT19SRVBMWSwKKyAgU0NTSUlPMzJSZXBseV90LCBNUElfUE9JTlRFUiBwU0NTSUlPMzJSZXBseV90OworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogIFNDU0kgVGFzayBNYW5hZ2VtZW50IG1lc3NhZ2VzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtMzEwLDEwICs1MDMsMTQgQEAKICNkZWZpbmUgTVBJX1NFUF9SRVFfU0xPVFNUQVRVU19VTkNPTkZJR1VSRUQgICAgICAgICAgICAgKDB4MDAwMDAwODApCiAjZGVmaW5lIE1QSV9TRVBfUkVRX1NMT1RTVEFUVVNfSE9UX1NQQVJFICAgICAgICAgICAgICAgICgweDAwMDAwMTAwKQogI2RlZmluZSBNUElfU0VQX1JFUV9TTE9UU1RBVFVTX1JFQlVJTERfU1RPUFBFRCAgICAgICAgICAoMHgwMDAwMDIwMCkKKyNkZWZpbmUgTVBJX1NFUF9SRVFfU0xPVFNUQVRVU19SRVFfQ09OU0lTVEVOQ1lfQ0hFQ0sgICAgKDB4MDAwMDEwMDApCisjZGVmaW5lIE1QSV9TRVBfUkVRX1NMT1RTVEFUVVNfRElTQUJMRSAgICAgICAgICAgICAgICAgICgweDAw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iAgTVNHX1RBUkdFVF9DTURfQlVGRkVSX1BPU1RfQkFTRV9MSVNUX1JFUExZIGFkZGVkLgogICogIDAyLTIyLTA1ICAwMS4wNS4wMyAgQ2hhbmdlZCBhIGNvbW1lbnQuCiAgKiAgMDMtMTEtMDUgIDAxLjA1LjA0ICBSZW1vdmVkIFRhcmdldEFzc2lzdEV4dGVuZGVkIFJlcXVlc3QuCisgKiAgMDYtMjQtMDUgIDAxLjA1LjA1ICBBZGRlZCBUYXJnZXRBc3Npc3RFeHRlbmRlZCBzdHJ1Y3R1cmVzIGFuZCBkZWZpbmVzLgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgKi8KIApAQCAtMzcxLDYgKzM3Miw3NyBAQAogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogVGFyZ2V0IEFzc2lzdCBFeHRlbmRlZCBSZXF1ZXN0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordHlwZWRlZiBzdHJ1Y3QgX01TR19UQVJHRVRfQVNTSVNUX0VYVF9SRVFVRVNUCit7CisgICAgVTggICAgICAgICAgICAgICAgICAgICAgU3RhdHVzQ29kZTsgICAgICAgICAgICAgICAgICAgICAvKiAwMGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBUYXJnZXRBc3Npc3RGbGFnczsgICAgICAgICAgICAgIC8qIDAxaCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIENoYWluT2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgLyogMDJoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgRnVuY3Rpb247ICAgICAgICAgICAgICAgICAgICAgICAvKiAwM2ggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBRdWV1ZVRhZzsgICAgICAgICAgICAgICAgICAgICAgIC8qIDA0aCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAgICAgLyogMDZoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgTXNnRmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgICAvKiAwN2ggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBNc2dDb250ZXh0OyAgICAgICAgICAgICAgICAgICAgIC8qIDA4aCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlcGx5V29yZDsgICAgICAgICAgICAgICAgICAgICAgLyogMENoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgTFVOWzhdOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiAxMGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBSZWxhdGl2ZU9mZnNldDsgICAgICAgICAgICAgICAgIC8qIDE4aCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAgICAgLyogMUNoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgICAvKiAyMGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBQcmltYXJ5UmVmZXJlbmNlVGFnOyAgICAgICAgICAgIC8qIDI0aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFByaW1hcnlBcHBsaWNhdGlvblRhZzsgICAgICAgICAgLyogMjhoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUHJpbWFyeUFwcGxpY2F0aW9uVGFnTWFzazsgICAgICAvKiAyQWggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgICAgICAgICAgICAgIC8qIDJDaCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIERhdGFMZW5ndGg7ICAgICAgICAgICAgICAgICAgICAgLyogMzBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgQmlkaXJlY3Rpb25hbERhdGFMZW5ndGg7ICAgICAgICAvKiAzNGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBTZWNvbmRhcnlSZWZlcmVuY2VUYWc7ICAgICAgICAgIC8qIDM4aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFNlY29uZGFyeUFwcGxpY2F0aW9uVGFnOyAgICAgICAgLyogM0NoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ1OyAgICAgICAgICAgICAgICAgICAgICAvKiAzRWggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBFRURQRmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgIC8qIDQwaCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIEFwcGxpY2F0aW9uVGFnVHJhbnNsYXRpb25NYXNrOyAgLyogNDJoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgRUVEUEJsb2NrU2l6ZTsgICAgICAgICAgICAgICAgICAvKiA0NGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBTR0xPZmZzZXQwOyAgICAgICAgICAgICAgICAgICAgIC8qIDQ4aCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDE7ICAgICAgICAgICAgICAgICAgICAgLyogNDloICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgU0dMT2Zmc2V0MjsgICAgICAgICAgICAgICAgICAgICAvKiA0QWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBTR0xPZmZzZXQzOyAgICAgICAgICAgICAgICAgICAgIC8qIDRCaCAqLworICAgI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ZpbmUgVEFSR0VUX0FTU0lTVF9FWFRfRUVEUF9JTkNfUFJJX1JFRlRBRyAgICgweDgwMDApCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBUYXJnZXQgU3RhdHVzIFNlbmQgUmVxdWVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCmRpZmYgLS1naXQgYS9kcml2ZXJzL21lc3NhZ2UvZnVzaW9uL21wdGJhc2UuYyBiL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbXB0YmFzZS5jCmluZGV4IGZmYmU2ZjQuLmY1MTdkMDYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbXB0YmFzZS5jCisrKyBiL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbXB0YmFzZS5jCkBAIC0yMTgsOCArMjE4LDcgQEAKICAqCShhbHNvIHJlZmVycmVkIHRvIGFzIGEgSU8gQ29udHJvbGxlciBvciBJT0MpLgogICoJVGhpcyByb3V0aW5lIG11c3QgY2xlYXIgdGhlIGludGVycnVwdCBmcm9tIHRoZSBhZGFwdGVyIGFuZCBkb2VzCiAgKglzbyBieSByZWFkaW5nIHRoZSByZXBseSBGSUZPLiAgTXVsdGlwbGUgcmVwbGllcyBtYXkgYmUgcHJvY2Vzc2VkCi0gKglwZXIgc2luZ2xlIGNhbGwgdG8gdGhpcyByb3V0aW5lOyB1cCB0byBNUFRfTUFYX1JFUExJRVNfUEVSX0lTUgotICoJd2hpY2ggaXMgY3VycmVudGx5IHNldCB0byAzMiBpbiBtcHRiYXNlLmguCisgKglwZXIgc2luZ2xlIGNhbGwgdG8gdGhpcyByb3V0aW5lLgogICoKIC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Zm9yIGxhdGVyLiBXaWxsIGJlIHVzZWQgd2hlbgorCSAqIHNldHRpbmcgdXAgdGhlIGRhdGEgdHJhbnNmZXIuCisJICovCisJaG9zdC0+YnVzX3dpZHRoID0gaW9zLT5idXNfd2lkdGg7CisKIAlzcGluX3VubG9ja19iaCgmaG9zdC0+bG9jayk7CiB9CiAKK3N0YXRpYyBpbnQgd2JzZF9nZXRfcm8oc3RydWN0IG1tY19ob3N0KiBtbWMpCit7CisJc3RydWN0IHdic2RfaG9zdCogaG9zdCA9IG1tY19wcml2KG1tYyk7CisJdTggY3NyOworCisJc3Bpbl9sb2NrX2JoKCZob3N0LT5sb2NrKTsKKworCWNzciA9IGluYihob3N0LT5iYXNlICsgV0JTRF9DU1IpOworCWNzciB8PSBXQlNEX01TTEVEOworCW91dGIoY3NyLCBob3N0LT5iYXNlICsgV0JTRF9DU1IpOworCisJbWRlbGF5KDEpOworCisJY3NyID0gaW5iKGhvc3QtPmJhc2UgKyBXQlNEX0NTUik7CisJY3NyICY9IH5XQlNEX01TTEVEOworCW91dGIoY3NyLCBob3N0LT5iYXNlICsgV0JTRF9DU1IpOworCisJc3Bpbl91bmxvY2tfYmgoJmhvc3QtPmxvY2spOworCisJcmV0dXJuIGNzciAmIFdCU0RfV1JQVDsKK30KKwogc3RhdGljIHN0cnVjdCBtbWNfaG9zdF9vcHMgd2JzZF9vcHMgPSB7CiAJLnJlcXVlc3QJPSB3YnNkX3JlcXVlc3QsCiAJLnNldF9pb3MJPSB3YnNkX3NldF9pb3MsCisJLmdldF9ybwkJPSB3YnNkX2dldF9ybywKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKQEAgLTEwNjUsMjAgKzExMTIsNiBAQAogfQogCiAvKgotICogSGVscGVyIGZ1bmN0aW9uIGZvciBjYXJkIGRldGVjdGlvbgotICovCi1zdGF0aWMgdm9pZCB3YnNkX2RldG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ZF9waHkuIFNob3VsZCB0YWtlCisJCSAqIGFib3V0IDUwIHVzICovCisJCXNob3dfZXJyb3IgPSAwOworCQlicmVhazsKKwljYXNlIFNQSURFUl9ORVRfR1BXRkZJTlQ6CisJCS8qIFBIWSBjb21tYW5kIHF1ZXVlIGZ1bGwgKi8KKwkJaWYgKG5ldGlmX21zZ19pbnRyKGNhcmQpKQorCQkJcHJfZXJyKCJQSFkgd3JpdGUgcXVldWUgZnVsbFxuIik7CisJCXNob3dfZXJyb3IgPSAwOworCQlicmVhazsKKworCS8qIGNhc2UgU1BJREVSX05FVF9HUk1EQURSSU5UOiBub3QgdXNlZC4gcHJpbnQgYSBtZXNzYWdlICovCisJLyogY2FzZSBTUElERVJfTkVUX0dSTUFSUElOVDogbm90IHVzZWQuIHByaW50IGEgbWVzc2FnZSAqLworCS8qIGNhc2UgU1BJREVSX05FVF9HUk1NUElOVDogbm90IHVzZWQuIHByaW50IGEgbWVzc2FnZSAqLworCisJY2FzZSBTUElERVJfTkVUX0dEVERFTjBJTlQ6CisJCS8qIHNvbWVvbmUgaGFzIHNldCBUWF9ETUFfRU4gdG8gMCAqLworCQlzaG93X2Vycm9yID0gMDsKKwkJYnJlYWs7CisKKwljYXNlIFNQSURFUl9ORVRfR0REREVOMElOVDogLyogZmFsbHRocm91Z2ggKi8KKwljYXNlIFNQSURFUl9ORVRfR0RDREVOMElOVDogLyogZmFsbHRocm91Z2ggKi8KKwljYXNlIFNQSURFUl9ORVRfR0RCREVOMElOVDogLyogZmFsbHRocm91Z2ggKi8KKwljYXNlIFNQSURFUl9ORVRfR0RBREVOMElOVDoKKwkJLyogc29tZW9uZSBoYXMgc2V0IFJYX0RNQV9FTiB0byAwICovCisJCXNob3dfZXJyb3IgPSAwOworCQlicmVhazsKKworCS8qIFJYIGludGVycnVwdHMgKi8KKwljYXNlIFNQSURFUl9ORVRfR0RERkRDSU5UOgorCWNhc2UgU1BJREVSX05FVF9HRENGRENJTlQ6CisJY2FzZSBTUElERVJfT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QSURFUl9ORVRfR0RURkRDSU5UKSApCisKKy8qIHdlIHJlbHkgb24gZmxhZ2dlZCBkZXNjcmlwdG9yIGludGVycnVwdHMqLworI2RlZmluZSBTUElERVJfTkVUX1JYSU5UCSggKDEgPDwgU1BJREVSX05FVF9HREFGRENJTlQpIHwgXAorCQkJCSAgKDEgPDwgU1BJREVSX05FVF9HUk1GTExJTlQpICkKKworI2RlZmluZSBTUElERVJfTkVUX0dQUkVYRUMJCTB4ODAwMDAwMDAKKyNkZWZpbmUgU1BJREVSX05FVF9HUFJEQVRfTUFTSwkJMHgwMDAwZmZmZgorCisvKiBkZXNjcmlwdG9yIGJpdHMKKyAqCisgKiAxMDEwCQkJCQlkZXNjcmlwdG9yIHJlYWR5CisgKiAgICAgMAkJCQlkZXNjciBpbiBtaWRkbGUgb2YgY2hhaW4KKyAqICAgICAgMDAwCQkJCWZpeGVkIHRvIDAKKyAqCisgKiAgICAgICAgIDAJCQkJbm8gaW50ZXJydXB0IG9uIGNvbXBsZXRpb24KKyAqICAgICAgICAgIDAwMAkJCQlmaXhlZCB0byAwCisgKiAgICAgICAgICAgICAxCQkJbm8gaXBzZWMgcHJvY2Vzc2luZworICogICAgICAgICAgICAgIDEJCQlsYXN0IGRlc2NyaXB0b3IgZm9yIHRoaXMgZnJhbWUKKyAqICAgICAgICAgICAgICAgMDAJCQlubyBjaGVja3N1bQorICogICAgICAgICAgICAgICAxMAkJCXRjcCBjaGVja3N1bQorICogICAgICAgICAgICAgICAxMQkJCXVkcCBjaGVja3N1bQorICoKKyAqICAgICAgICAgICAgICAgICAwMAkJCWZpeGVkIHRvIDAKKyAqICAgICAgICAgICAgICAgICAgIDAJCQlmaXhlZCB0byAwCisgKiAgICAgICAgICAgICAgICAgICAgMAkJCW5vIGludGVycnVwdCBvbiByZXNwb25zZSBlcnJvcnMKKyAqICAgICAgICAgICAgICAgICAgICAgMAkJbm8gaW50ZXJydXB0IG9uIGludmFsaWQgZGVzY3IKKyAqICAgICAgICAgICAgICAgICAgICAgIDAJCW5vIGludGVycnVwdCBvbiBkbWEgcHJvY2VzcyB0ZXJtaW5hdGlvbgorICogICAgICAgICAgICAgICAgICAgICAgIDAJCW5vIGludGVycnVwdCBvbiBkZXNjciBjaGFpbiBlbmQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgMAkJbm8gaW50ZXJydXB0IG9uIGRlc2NyIGNvbXBsZXRlCisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgMDAwCQlmaXhlZCB0byAwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCQlyZXNwb25zZSBlcnJvciBpbnRlcnJ1cHQgc3RhdHVzCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAlpbnZhbGlkIGRlc2NyIHN0YXR1cworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCWRtYSB0ZXJtaW5hdGlvbiBzdGF0dXMKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAJZGVzY3IgY2hhaW4gZW5kIHN0YXR1cworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAJZGVzY3IgY29tcGxldGUgc3RhdHVzICovCisjZGVmaW5lIFNQSURFUl9ORVRfRE1BQ19DTURTVEFUX05PQ1MJMHhhMDBjMDAwMAorI2RlZmluZSBTUElERVJfTkVUX0RNQUNfQ01EU1RBVF9UQ1BDUwkweGEwMGUwMDAwCisjZGVmaW5lIFNQSURFUl9ORVRfRE1BQ19DTURTVEFUX1VEUENTCTB4YTAwZjAwMDAKKyNkZWZpbmUgU1BJREVSX05FVF9ERVNDUl9JTkRfUFJPQ19TSElGVAkyOAorI2RlZmluZSBTUElERVJfTkVUX0RFU0NSX0lORF9QUk9DX01BU0tPCTB4MGZmZmZmZmYKKworLyogZGVzY3IgcmVhZHksIGRlc2NyIGlzIGluIG1pZGRsZSBvZiBjaGFpbiwgZ2V0IGludGVycnVwdCBvbiBjb21wbGV0aW9uICovCisjZGVmaW5lIFNQSURFUl9ORVRfRE1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IElQV19XQUlUICAgICAgICAgICAgICAgICAgICAgKDE8PDApCiAjZGVmaW5lIElQV19RVUlFVCAgICAgICAgICAgICAgICAgICAgKDE8PDEpCiAjZGVmaW5lIElQV19ST0FNSU5HICAgICAgICAgICAgICAgICAgKDE8PDIpCkBAIC0xOTAsNyArMTg4LDYgQEAKICNkZWZpbmUgRENUX0ZMQUdfRVhUX01PREVfQ0NLICAweDAxCiAjZGVmaW5lIERDVF9GTEFHX0VYVF9NT0RFX09GRE0gMHgwMAogCi0KICNkZWZpbmUgVFhfUlhfVFlQRV9NQVNLICAgICAgICAgICAgICAgICAgICAweEZGCiAjZGVmaW5lIFRYX0ZSQU1FX1RZUEUgICAgICAgICAgICAgICAgICAgICAgMHgwMAogI2RlZmluZSBUWF9IT1NUX0NPTU1BTkRfVFlQRSAgICAgICAgICAgICAgIDB4MDEKQEAgLTI0MiwxMDcgKzIzOSw5NyBAQAogICogQ29udGFpbnMgY29tbW9uIGRhdGEgZm9yIFJ4IGFuZCBUeCBxdWV1ZXMKICAqLwogc3RydWN0IGNseDJfcXVldWUgewotCWludCBuX2JkOyAgICAgICAgICAgICAgICAgICAgICAvKio8IG51bWJlciBvZiBCRHMgaW4gdGhpcyBxdWV1ZSAqLwotCWludCBmaXJzdF9lbXB0eTsgICAgICAgICAgICAgICAvKio8IDEtc3QgZW1wdHkgZW50cnkgKGluZGV4KSAqLwotCWludCBsYXN0X3VzZWQ7ICAgICAgICAgICAgICAgICAvKio8IGxhc3QgdXNlZCBlbnRyeSAoaW5kZXgpICovCi0JdTMyIHJlZ193OyAgICAgICAgICAgICAgICAgICAvKio8ICd3cml0ZScgcmVnIChxdWV1ZSBoZWFkKSwgYWRkciBpbiBkb21haW4gMSAqLwotCXUzMiByZWdfcjsgICAgICAgICAgICAgICAgICAgLyoqPCAncmVhZCcgcmVnIChxdWV1ZSB0YWlsKSwgYWRkciBpbiBkb21haW4gMSAqLwotCWRtYV9hZGRyX3QgZG1hX2FkZHI7ICAgICAgICAg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ORCArIDB4QjE0KQogI2RlZmluZSBJUFdfRFVSSU5HX0FUSU1fV0lORE9XICAgICAgIChDWDJfU0hBUkVEX0xPV0VSX0JPVU5EICsgMHhCMTgpCiAKLQogI2RlZmluZSBNU0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKICNkZWZpbmUgTFNCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCiAjZGVmaW5lIFdPUkRfVE9fQllURShfd29yZCkgICAgICAgICAgICAgKChfd29yZCkgKiBzaXplb2YodTE2KSkKQEAgLTEzNjUsMTYgKzEzMTQsMTYgQEAKICAgICAoIFdPUkRfVE9fQllURShfd29yZG9mZnNldCkgKyAoX2J5dGVvZmZzZXQpICkKIAogLyogRUVQUk9NIGFjY2VzcyBieSBCWVRFICovCi0jZGVmaW5lIEVFUFJPTV9QTUVfQ0FQQUJJTElUWSAgIChHRVRfRUVQUk9NX0FERFIoMHgwOSxNU0IpKSAgICAgLyogMSBieXRlICAgKi8KLSNkZWZpbmUgRUVQUk9NX01BQ19BRERSRVNTICAgICAgKEdFVF9FRVBST01fQUREUigweDIxLExTQikpICAgICAvKiA2IGJ5dGUgICAqLwotI2RlZmluZSBFRVBST01fVkVSU0lPTiAgICAgICAgICAoR0VUX0VFUFJPTV9BRERSKDB4MjQsTVNCKSkgICAgIC8qIDEgYnl0ZSAgICovCi0jZGVmaW5lIEVFUFJPTV9OSUNfVFlQRSAgICAgICAgIChHRVRfRUVQUk9NX0FERFIoMHgyNSxMU0IpKSAgICAgLyogMSBieXRlICAgKi8KLSNkZWZpbmUgRUVQUk9NX1NLVV9DQVBBQklMSVRZICAgKEdFVF9FRVBST01fQUREUigweDI1LE1TQikpICAgICAvKiAxIGJ5dGUgICAqLwotI2RlZmluZSBFRVBST01fQ09VTlRSWV9DT0RFICAgICAoR0VUX0VFUFJPTV9BRERSKDB4MjYsTFNCKSkgICAgIC8qIDMgYnl0ZXMgICovCi0jZGVmaW5lIEVFUFJPTV9JQlNTX0NIQU5ORUx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cGhwX3BjaV9jb25maWdfYnJpZGdlKHN0cnVjdCBwY2lfZGV2ICpkZXYpCiB7CiAJdTggc2VjX2J1c25vOwpAQCAtMjUyLDYgKzIxNSw0MiBAQAogCXJldHVybiAwOwogfQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyBycGFwaHBfcGNpX2NvbmZpZ19zbG90KCkgd2lsbCAgY29uZmlndXJlIGFsbCBkZXZpY2VzIHVuZGVyIHRoZQorIGdpdmVuIHNsb3QtPmRuIGFuZCByZXR1cm4gdGhlIHRoZSBmaXJzdCBwY2lfZGV2LgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBwY2lfZGV2ICoKK3JwYXBocF9wY2lfY29uZmlnX3Nsb3Qoc3RydWN0IHBjaV9idXMgKmJ1cykKK3sKKwlzdHJ1Y3QgZGV2aWNlX25vZGUgKmRuID0gcGNpX2J1c190b19PRl9ub2RlKGJ1cyk7CisJc3RydWN0IHBjaV9kZXYgKmRldiA9IE5VTEw7CisJaW50IHNsb3RubzsKKwlpbnQgbnVtOworCisJZGJnKCJFbnRlciAlczogZG49JXMgYnVzPSVzXG4iLCBfX0ZVTkNUSU9OX18sIGRuLT5mdWxsX25hbWUsIGJ1cy0+bmFtZSk7CisJaWYgKCFkbiB8fCAhZG4tPmNoaWxkKQorCQlyZXR1cm4gTlVMTDsKKworCXNsb3RubyA9IFBDSV9TTE9UKFBDSV9ETihkbi0+Y2hpbGQpLT5kZXZmbik7CisKKwkvKiBwY2lfc2Nhbl9zbG90IHNob3VsZCBmaW5kIGFsbCBjaGlsZHJlbiAqLworCW51bSA9IHBjaV9zY2FuX3Nsb3QoYnVzLCBQQ0lfREVWRk4oc2xvdG5vLCAwKSk7CisJaWYgKG51bSkgeworCQlycGFwaHBf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IH0KICAgICAgICAgfQogCWlmIChwcml2cHRyLT5wa19za2IgIT0gTlVMTCkgewotCQlkZXZfa2ZyZWVfc2tiKHByaXZwdHItPnBrX3NrYik7CisJCWRldl9rZnJlZV9za2JfYW55KHByaXZwdHItPnBrX3NrYik7CiAJCXByaXZwdHItPnBrX3NrYiA9IE5VTEw7CiAJfQogCWlmKHByaXZwdHItPmJ1ZmZzX2FsbG9jICE9IDEpIHsKQEAgLTIwMTYsNyArMjAxNiw3IEBACiAgICAgICAgIHBfYnVmPShzdHJ1Y3QgY2N3YmsqKXByaXZwdHItPnBfZW5kX2NjdzsKICAgICAgICAgZHVtcGl0KChjaGFyICopcF9idWYsIHNpemVvZihzdHJ1Y3QgZW5kY2N3KSk7CiAjZW5kaWYKLSAgICAgICAgZGV2X2tmcmVlX3NrYihza2IpOworICAgICAgICBkZXZfa2ZyZWVfc2tiX2FueShza2IpOwogCWlmIChsaW5raWQ9PTApIHsKICAgICAgICAgCWxvY2s9TE9DS19OTzsKICAgICAgICAgfQpAQCAtNDA2MSw3ICs0MDYxLDcgQEAKIAogICAgICAgICB3aGlsZSAoKHNrYiA9IHNrYl9kZXF1ZXVlKHEpKSkgewogICAgICAgICAgICAgICAgIGF0b21pY19kZWMoJnNrYi0+dXNlcnMpOwotICAgICAgICAgICAgICAgIGRldl9rZnJlZV9za2JfaXJxKHNrYik7CisgICAgICAgICAgICAgICAgZGV2X2tmcmVlX3NrYl9hbnkoc2tiKTsKICAgICAgICAgfQogfQogCkBAIC00NDEwLDcgKzQ0MTAsNyBAQAogI2Vsc2UKICAgICAgICAgICAgICAgICAiY29tcGlsZWQgaW50byBrZXJuZWwgIgogI2VuZGlmCi0gICAgICAgICAgICAgICAgIiAkUmV2aXNpb246IDEuMzUgJCAkRGF0ZTogMjAwNS8wMy8yNCAxMjoyNTozOCAkIFxuIik7CisgICAgICAgICAgICAgICAgIiAkUmV2aXNpb246IDEuMzggJCAkRGF0ZTogMjAwNS8wOC8yOSAwOTo0NzowN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m9pZCBhaGRfbGludXhfcnVuX2RldmljZV9xdWV1ZShzdHJ1Y3QgYWhkX3NvZnRjKiwKLQkJCQkgICAgICAgc3RydWN0IGFoZF9saW51eF9kZXZpY2UqKTsKK3N0YXRpYyB2b2lkIGFoZF9saW51eF9kZXZpY2VfcXVldWVfZGVwdGgoc3RydWN0IHNjc2lfZGV2aWNlICopOworc3RhdGljIGludCBhaGRfbGludXhfcnVuX2NvbW1hbmQoc3RydWN0IGFoZF9zb2Z0YyosCisJCQkJIHN0cnVjdCBhaGRfbGludXhfZGV2aWNlICosCisJCQkJIHN0cnVjdCBzY3NpX2NtbmQgKik7CiBzdGF0aWMgdm9pZCBhaGRfbGludXhfc2V0dXBfdGFnX2luZm9fZ2xvYmFsKGNoYXIgKnApOwotc3RhdGljIGFpY19vcHRpb25fY2FsbGJhY2tfdCBhaGRfbGludXhfc2V0dXBfdGFnX2luZm87Ci1zdGF0aWMgYWljX29wdGlvbl9jYWxsYmFja190IGFoZF9saW51eF9zZXR1cF9yZF9zdHJtX2luZm87Ci1zdGF0aWMgYWljX29wdGlvbl9jYWxsYmFja190IGFoZF9saW51eF9zZXR1cF9kdjsKLXN0YXRpYyBhaWNfb3B0aW9uX2NhbGxiYWNrX3QgYWhkX2xpbnV4X3NldHVwX2lvY2VsbF9pbmZvOwotc3RhdGljIGludCBhaGRfbGludXhfbmV4dF91bml0KHZvaWQpOwotc3RhdGljIHZvaWQgYWhkX3J1bnFfdGFza2xldCh1bnNpZ25lZCBsb25nIGRhdGEpOwotc3RhdGljIGludCBhaWM3OXh4X3NldHVwKGNoYXIgKmMpOworc3RhdGljIGludCAgYWljNzl4eF9zZXR1cChjaGFyICpjKTsKKworc3RhdGljIGludCBhaGRfbGludXhfdW5pdDsKKwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIElubGluZXMgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIF9faW5saW5lIHZvaWQgYWhkX3NjaGV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IG1hc2sgdG8gbG9jYXRlIHN1YmZpZWxkIGluIHJlZ2lzdGVyCkBAIC05MjUsMjcgKzcwOCwxNyBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiBQcm9jIEZTIFN1cHBvcnQgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmIExJTlVYX1ZFUlNJT05fQ09ERSA8IEtFUk5FTF9WRVJTSU9OKDIsNSwwKQotaW50CWFoZF9saW51eF9wcm9jX2luZm8oY2hhciAqLCBjaGFyICoqLCBvZmZfdCwgaW50LCBpbnQsIGludCk7Ci0jZWxzZQogaW50CWFoZF9saW51eF9wcm9jX2luZm8oc3RydWN0IFNjc2lfSG9zdCAqLCBjaGFyICosIGNoYXIgKiosCiAJCQkgICAgb2ZmX3QsIGludCwgaW50KTsKLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqIERvbWFpbiBWYWxpZGF0aW9uICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZSBBSERfRFZfQ01EKGNtZCkgKChjbWQpLT5zY3NpX2RvbmUgPT0gYWhkX2xpbnV4X2R2X2NvbXBsZXRlKQotI2RlZmluZSBBSERfRFZfU0lNUV9GUk9aRU4oYWhkKQkJCQkJXAotCSgoKChhaGQpLT5wbGF0Zm9ybV9kYXRhLT5mbGFncyAmIEFIRF9EVl9BQ1RJVkUpICE9IDApCVwKLQkgJiYgKGFoZCktPnBsYXRmb3JtX2RhdGEtPnFmcm96ZW4gPT0gMSkKIAogLyoqKioqKioqKioqKioqKioqKioqKioqIFRyYW5zYWN0aW9uIEFjY2VzcyBXcmFwcGVycyAqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0YXRpYyBfX2lubGluZSB2b2lkIGFoZF9jbWRfc2V0X3RyYW5zYWN0aW9uX3N0YXR1cyhTY3NpX0NtbmQgKiwgdWludDMyX3QpOworc3RhdGljIF9faW5saW5lIHZvaWQgYWhkX2NtZF9zZ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IFcgIE8gICAgICove1NTVCgweDBDLCAweDAzLCBTU19SREVGLAotCQkJIldyaXRlIGVycm9yIC0gcmVjb21tZW5kIHJlYXNzaWdubWVudCIpIH0sCi0vKiBEVCAgVyAgTyAgICAgKi97U1NUKDB4MEMsIDB4MDQsIFNTX1JERUYsCi0JCQkiQ29tcHJlc3Npb24gY2hlY2sgbWlzY29tcGFyZSBlcnJvciIpIH0sCi0vKiBEVCAgVyAgTyAgICAgKi97U1NUKDB4MEMsIDB4MDUsIFNTX1JERUYsCi0JCQkiRGF0YSBleHBhbnNpb24gb2NjdXJyZWQgZHVyaW5nIGNvbXByZXNzaW9uIikgfSwKLS8qIERUICBXICBPICAgICAqL3tTU1QoMHgwQywgMHgwNiwgU1NfUkRFRiwKLQkJCSJCbG9jayBub3QgY29tcHJlc3NpYmxlIikgfSwKLS8qICAgICAgUiAgICAgICAqL3tTU1QoMHgwQywgMHgwNywgU1NfUkRFRiwKLQkJCSJXcml0ZSBlcnJvciAtIHJlY292ZXJ5IG5lZWRlZCIpIH0sCi0vKiAgICAgIFIgICAgICAgKi97U1NUKDB4MEMsIDB4MDgsIFNTX1JERUYsCi0JCQkiV3JpdGUgZXJyb3IgLSByZWNvdmVyeSBmYWlsZWQiKSB9LAotLyogICAgICBSICAgICAgICove1NTVCgweDBDLCAweDA5LCBTU19SREVGLAotCQkJIldyaXRlIGVycm9yIC0gbG9zcyBvZiBzdHJlYW1pbmciKSB9LAotLyogICAgICBSICAgICAgICove1NTVCgweDBDLCAweDBBLCBTU19SREVGLAotCQkJIldyaXRlIGVycm9yIC0gcGFkZGluZyBibG9ja3MgYWRkZWQiKSB9LAotLyogRCAgIFcgIE8gICAgICove1NTVCgweDEwLCAweDAwLCBTU19SREVGLAotCQkJIklEIENSQyBvciBFQ0MgZXJyb3IiKSB9LAotLyogRFQgIFdSU08gICAgICove1NTVCgweDExLCAweDAwLCBTU19SREVGLAotCQkJIlVucmVjb3ZlcmVkIHJlYWQgZXJyb3IiKSB9LAotLyogRFQgIFcgU08gICAgICove1NTVCgweDExLCAweDAxLCBTU19SREVGLAotCQkJIlJlYWQgcmV0cmllcyBleGhhdXN0ZWQiKSB9LAotLyogRFQgIFcgU08gICAgICove1NTVCgweDExLCAweDAyLCBTU19SREVGLAotCQkJIkVycm9yIHRvbyBsb25nIHRvIGNvcnJlY3QiKSB9LAotLyogRFQgIFcgU08gICAgICove1NTVCgweDExLCAweDAzLCBTU19SREVGLAotCQkJIk11bHRpcGxlIHJlYWQgZXJyb3JzIikgfSwKLS8qIEQgICBXICBPICAgICAqL3tTU1QoMHgxMSwgMHgwNCwgU1NfUkRFRiwKLQkJCSJVbnJlY292ZXJlZCByZWFkIGVycm9yIC0gYXV0byByZWFsbG9jYXRlIGZhaWxlZCIpIH0sCi0vKiAgICAgV1IgTyAgICAgKi97U1NUKDB4MTEsIDB4MDUsIFNTX1JERUYsCi0JCQkiTC1FQyB1bmNvcnJlY3RhYmxlIGVycm9yIikgfSwKLS8qICAgICBXUiBPICAgICAqL3tTU1QoMHgxMSwgMHgwNiwgU1NfUkRFRiwKLQkJCSJDSVJDIHVucmVjb3ZlcmVkIGVycm9yIikgfSwKLS8qICAgICBXICBPICAgICAqL3tTU1QoMHgxMSwgMHgwNywgU1NfUkRFRiwKLQkJCSJEYXRhIHJlLXN5bmNocm9uaXphdGlvbiBlcnJvciIpIH0sCi0vKiAgVCAgICAgICAgICAgKi97U1NUKDB4MTEsIDB4MDgsIFNTX1JERUYsCi0JCQkiSW5jb21wbGV0ZSBibG9jayByZWFkIikgfSwKLS8qICBUICAgICAgICAgICAqL3tTU1QoMHgxMSwgMHgwOSwgU1NfUkRFRiwKLQkJCSJObyBnYXAgZm91bmQiKSB9LAotLyogRFQgICAgIE8gICAgICove1NTVCgweDExLCAweDBBLCBTU19SREVGLAotCQkJIk1pc2NvcnJlY3RlZCBlcnJvciIpIH0sCi0vKiBEICAgVyAgTyAgICAgKi97U1NUKDB4MTEsIDB4MEIsIFNTX1JERUYsCi0JCQk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hYmxlIHRvIHJlY292ZXIgdGFibGUtb2YtY29udGVudHMiKSB9LAotLyogICAgICAgIE8gICAgICove1NTVCgweDU4LCAweDAwLCBTU19SREVGLAotCQkJIkdlbmVyYXRpb24gZG9lcyBub3QgZXhpc3QiKSB9LAotLyogICAgICAgIE8gICAgICove1NTVCgweDU5LCAweDAwLCBTU19SREVGLAotCQkJIlVwZGF0ZWQgYmxvY2sgcmVhZCIpIH0sCi0vKiBEVExQV1JTT00gICAgKi97U1NUKDB4NUEsIDB4MDAsIFNTX1JERUYsCi0JCQkiT3BlcmF0b3IgcmVxdWVzdCBvciBzdGF0ZSBjaGFuZ2UgaW5wdXQiKSB9LAotLyogRFQgIFdSIE9NICAgICove1NTVCgweDVBLCAweDAxLCBTU19SREVGLAotCQkJIk9wZXJhdG9yIG1lZGl1bSByZW1vdmFsIHJlcXVlc3QiKSB9LAotLyogRFQgIFcgIE8gICAgICove1NTVCgweDVBLCAweDAyLCBTU19SREVGLAotCQkJIk9wZXJhdG9yIHNlbGVjdGVkIHdyaXRlIHByb3RlY3QiKSB9LAotLyogRFQgIFcgIE8gICAgICove1NTVCgweDVBLCAweDAzLCBTU19SREVGLAotCQkJIk9wZXJhdG9yIHNlbGVjdGVkIHdyaXRlIHBlcm1pdCIpIH0sCi0vKiBEVExQV1JTT00gICAgKi97U1NUKDB4NUIsIDB4MDAsIFNTX1JERUYsCi0JCQkiTG9nIGV4Y2VwdGlvbiIpIH0sCi0vKiBEVExQV1JTT00gICAgKi97U1NUKDB4NUIsIDB4MDEsIFNTX1JERUYsCi0JCQkiVGhyZXNob2xkIGNvbmRpdGlvbiBtZXQiKSB9LAotLyogRFRMUFdSU09NICAgICove1NTVCgweDVCLCAweDAyLCBTU19SREVGLAotCQkJIkxvZyBjb3VudGVyIGF0IG1heGltdW0iKSB9LAotLyogRFRMUFdSU09NICAgICove1NTVCgweDVCLCAweDAzLCBTU19SREVGLAotCQkJIkxvZyBsaXN0IGNvZGVzIGV4aGF1c3RlZCI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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBSZWdpc3RlciBhIGRlZmF1bHQgNyBzZWdtZW50IGNoYXJhY3RlciBzZXQKKyAqLworc3RhdGljIFNFRzdfREVGQVVMVF9NQVAobWFwX3NlZzcpOworCisgLyogRGlzcGxheSBhIGNoYXIsCisgICogY2hhciAnXDknIGFuZCAnXG4nIGFyZSBwbGFjZWhvbGRlcnMgYW5kIGRvIG5vdCBvdmVyd3JpdGUgdGhlIG9yaWdpbmFsIHRleHQuCisgICogQSBzcGFjZSB3aWxsIGFsd2F5cyBoaWRlIGFuIGljb24uCisgICovCitzdGF0aWMgaW50IHNldENoYXIoc3RydWN0IHllYWxpbmtfZGV2ICp5bGQsIGludCBlbCwgaW50IGNocikKK3sKKwlpbnQgaSwgYSwgbSwgdmFsOworCisJaWYgKGVsID49IEFSUkFZX1NJWkUobGNkTWFwKSkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlpZiAoY2hyID09ICdcdCcgfHwgY2hyID09ICdcbicpCisJICAgIHJldHVybiAwOworCisJeWxkLT5sY2RNYXBbZWxdID0gY2hyOworCisJaWYgKGxjZE1hcFtlbF0udHlwZSA9PSAnLicpIHsKKwkJYSA9IGxjZE1hcFtlbF0udS5wLmE7CisJCW0gPSBsY2RNYXBbZWxdLnUucC5tOworCQlpZiAoY2hyICE9ICcgJykKKwkJCXlsZC0+bWFzdGVyLmJbYV0gfD0gbTsKKwkJZWxzZQorCQkJeWxkLT5tYXN0ZXIuYlthXSAmPSB+bTsKKwkJcmV0dXJuIDA7CisJfQorCisJdmFsID0gbWFwX3RvX3NlZzcoJm1hcF9zZWc3LCBjaHIpOworCWZvciAoaSA9IDA7IGkgPCBBUlJBWV9TSVpFKGxjZE1hcFswXS51LnMpOyBpKyspIHsKKwkJbSA9IGxjZE1hcFtlbF0udS5zW2ldLm07CisKKwkJaWYgKG0gPT0gMCkKKwkJCWNvbnRpbnVlOworCisJCWEgPSBsY2RNYXBbZWxdLnUuc1tpXS5hOworCQlpZiAodmFsICYgMSkKKwkJCXlsZC0+bWFzdGVyLmJbYV0gfD0gbTsKKwkJZWxzZQorCQkJeWxkLT5tYXN0ZXIuYlthXSAmPSB+bTsKKwkJdmFsID0gdmFsID4+IDE7CisJfQorCXJldHVybiAwOworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFllYWxpbmsga2V5IGludGVyZmFjZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogTWFwIGRldmljZSBidXR0b25zIHRvIGludGVybmFsIGtleSBldmVudHMuCisgKgorICogVVNCLVAxSyBidXR0b24gbGF5b3V0OgorICoKKyAqICAgICAgICAgICAgIHVwCisgKiAgICAgICBJTiAgICAgICAgICAgT1VUCisgKiAgICAgICAgICAgIGRvd24KKyAqCisgKiAgICAgcGlja3VwICAgQyAgICBoYW5ndXAKKyAqICAgICAgIDEgICAgICAyICAgICAgMworICogICAgICAgNCAgICAgIDUgICAgICA2CisgKiAgICAgICA3ICAgICAgOCAgICAgIDkKKyAqICAgICAgICogICAgICAwICAgICAgIworICoKKyAqIFRoZSAidXAiIGFuZCAiZG93biIga2V5cywgYXJlIHN5bWJvbGlzZWQgYnkgYXJyb3dzIG9uIHRoZSBidXR0b24uCisgKiBUaGUgInBpY2t1cCIgYW5kICJoYW5ndXAiIGtleXMgYXJlIHN5bWJvbGlzZWQgYnkgYSBncmVlbiBhbmQgcmVkIHBob25lCisgKiBvbiB0aGUgYnV0dG9uLgorICovCitzdGF0aWMgaW50IG1hcF9wMWtfdG9fa2V5KGludCBzY2FuY29kZSkKK3sKKwlzd2l0Y2goc2NhbmNvZGUpIHsJCS8qIHBob25lIGtleToJKi8KKwljYXNlIDB4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252ZXJ0aW5nIHRoZSBkYXRhIGludG8gZXZlbnRzIGZvciB0aGUKKyAqIGlucHV0IHN1YnN5c3RlbS4KKyAqCisgKiBUaGUga2V5IHBhcmFtZXRlciBjYW4gYmUgY2FzY2FkZWQ6IGtleTIgPDwgOCB8IGtleTEKKyAqLworc3RhdGljIHZvaWQgcmVwb3J0X2tleShzdHJ1Y3QgeWVhbGlua19kZXYgKnlsZCwgaW50IGtleSwgc3RydWN0IHB0X3JlZ3MgKnJlZ3MpCit7CisJc3RydWN0IGlucHV0X2RldiAqaWRldiA9ICZ5bGQtPmlkZXY7CisKKwlpbnB1dF9yZWdzKGlkZXYsIHJlZ3MpOworCWlmICh5bGQtPmtleV9jb2RlID49IDApIHsKKwkJLyogb2xkIGtleSB1cCAqLworCQlpbnB1dF9yZXBvcnRfa2V5KGlkZXYsIHlsZC0+a2V5X2NvZGUgJiAweGZmLCAwKTsKKwkJaWYgKHlsZC0+a2V5X2NvZGUgPj4gOCkKKwkJCWlucHV0X3JlcG9ydF9rZXkoaWRldiwgeWxkLT5rZXlfY29kZSA+PiA4LCAwKTsKKwl9CisKKwl5bGQtPmtleV9jb2RlID0ga2V5OworCWlmIChrZXkgPj0gMCkgeworCQkvKiBuZXcgdmFsaWQga2V5ICovCisJCWlucHV0X3JlcG9ydF9rZXkoaWRldiwga2V5ICYgMHhmZiwgMSk7CisJCWlmIChrZXkgPj4gOCkKKwkJCWlucHV0X3JlcG9ydF9rZXkoaWRldiwga2V5ID4+IDgsIDEpOworCX0KKwlpbnB1dF9zeW5jKGlkZXYpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogWWVhbGluayB1c2IgY29tbXVuaWNhdGlvbiBpbnRlcmZhY2UKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCis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Y29udGV4dDsKKwlpbnQgcmV0OworCisJaWYgKHVyYi0+c3RhdHVzKQorCQllcnIoIiVzIC0gdXJiIHN0YXR1cyAlZCIsIF9fRlVOQ1RJT05fXywgdXJiLT5zdGF0dXMpOworCisJc3dpdGNoICh5bGQtPmN0bF9kYXRhLT5jbWQpIHsKKwljYXNlIENNRF9LRVlQUkVTUzoKKwljYXNlIENNRF9TQ0FOQ09ERToKKwkJLyogYXNrIGZvciBhIHJlc3BvbnNlICovCisJCXJldCA9IHVzYl9zdWJtaXRfdXJiKHlsZC0+dXJiX2lycSwgR0ZQX0FUT01JQyk7CisJCWJyZWFrOworCWRlZmF1bHQ6CisJCS8qIHNlbmQgbmV3IGNvbW1hbmQgKi8KKwkJeWVhbGlua19kb19pZGxlX3Rhc2tzKHlsZCk7CisJCXJldCA9IHVzYl9zdWJtaXRfdXJiKHlsZC0+dXJiX2N0bCwgR0ZQX0FUT01JQyk7CisJfQorCisJaWYgKHJldCkKKwkJZXJyKCIlcyAtIHVzYl9zdWJtaXRfdXJiIGZhaWxlZCAlZCIsIF9fRlVOQ1RJT05fXywgcmV0KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIGlucHV0IGV2ZW50IGludGVyZmFjZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogVE9ETyBzaG91bGQgd2UgaXNzdWUgYSByaW5ndG9uZSBvbiBhIFNORF9CRUxMIGV2ZW50Pworc3RhdGljIGludCBpbnB1dF9ldihzdHJ1Y3QgaW5wdXRfZGV2ICpkZXYsIHVuc2lnbmVkIGludCB0eXBlLAorCQl1bnNpZ25lZCBpbnQgY29kZSwgaW50IHZhbHVlKQoreworCisJaWYgKHR5cGUgIT0gRVZfU05EKQorCQlyZXR1cm4gLUVJTlZBT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HVybiByZXQ7CisJfQorCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBpbnB1dF9jbG9zZShzdHJ1Y3QgaW5wdXRfZGV2ICpkZXYpCit7CisJc3RydWN0IHllYWxpbmtfZGV2ICp5bGQgPSBkZXYtPnByaXZhdGU7CisKKwl1c2Jfa2lsbF91cmIoeWxkLT51cmJfY3RsKTsKKwl1c2Jfa2lsbF91cmIoeWxkLT51cmJfaXJxKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIHN5c2ZzIGludGVyZmFjZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIERFQ0xBUkVfUldTRU0oc3lzZnNfcndzZW1hKTsKKworLyogSW50ZXJmYWNlIHRvIHRoZSA3LXNlZ21lbnRzIHRyYW5zbGF0aW9uIHRhYmxlIGFrYS4gY2hhciBzZXQuCisgKi8KK3N0YXRpYyBzc2l6ZV90IHNob3dfbWFwKHN0cnVjdCBkZXZpY2UgKmRldiwgc3RydWN0IGRldmljZV9hdHRyaWJ1dGUgKmF0dHIsCisJCQkJY2hhciAqYnVmKQoreworCW1lbWNweShidWYsICZtYXBfc2VnNywgc2l6ZW9mKG1hcF9zZWc3KSk7CisJcmV0dXJuIHNpemVvZihtYXBfc2VnNyk7Cit9CisKK3N0YXRpYyBzc2l6ZV90IHN0b3JlX21hcChzdHJ1Y3QgZGV2aWNlICpkZXYsIHN0cnVjdCBkZXZpY2VfYXR0cmlidXRlICphdHRyLAorCQkJCWNvbnN0IGNoYXIgKmJ1Ziwgc2l6ZV90IGNudCkKK3sKKwlpZiAoY250ICE9IHNpemVvZihtYXBfc2VnNykpCisJCXJldHVybiAtRUlOVkFMOworCW1lbWNweSgmbWFwX3NlZzcsIGJ1Ziwgc2l6ZW9mK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JCTEKKyAqIG9mZnNldAkwCisgKiBkYXRhWzBdCTAgT0ZGIC8gMHgyNCBPTgorICovCisjZGVmaW5lIENNRF9SSU5HVE9ORQkJMHgwMworCisvKiBTb3VuZCBkaWFsIHRvbmUgdmlhIHRoZSBlYXIgc3BlYWtlcgorICoKKyAqIGNtZAkJMHgwOQorICogc2l6ZQkJMQorICogb2Zmc2V0CTAKKyAqIGRhdGFbMF0JMCBPRkYgLyAxIE9OCisgKi8KKyNkZWZpbmUgQ01EX0RJQUxUT05FCQkweDA5CisKKyNlbmRpZiAvKiBJTlBVVF9ZRUFMSU5LX0ggKi8KKworCisjaWYgZGVmaW5lZChfU0VHKSAmJiBkZWZpbmVkKF9QSUMpCisvKiBUaGlzIHRhYmxlIG1hcHMgdGhlIExDRCBzZWdtZW50cyBvbnRvIGluZGl2aWR1YWwgYml0IHBvc2l0aW9ucyBpbiB0aGUKKyAqIHlsZF9zdGF0dXMgc3RydWN0LgorICovCisKKy8qIExDRCwgZWFjaCBzZWdtZW50IG11c3QgYmUgZHJpdmVuIHNlcGVyYXRlbHkuCisgKgorICogTGF5b3V0OgorICoKKyAqICAgfFtdICAgW11bXSAgIFtdW10gICBbXVtdICAgaW4gICB8W11bXQorICogICB8W10gTSBbXVtdIEQgW11bXSA6IFtdW10gICBvdXQgIHxbXVtdCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmUKKyAqCisgKiAgICBORVcgUkVQICAgICAgICAgU1UgTU8gVFUgV0UgVEggRlIgU0EKKyAqCisgKiAgICBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXQorICogICAgW10gW10gW10gW10gW10gW10gW10gW10gW10gW10gW10gW10KKyAqLworCisvKiBMaW5lIDEKKyAqCUZvcm1hdAkJOiAxOC5lOC5NOC44OC4uLjE4OAorICoJSWNvbiBuYW1lcwk6IE0gRCA6IElOIE9VVCBTVE9SRQorICovCisjZGVmaW5lIExDRF9MSU5FMV9PRkZTRVQ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ESV9WSUQsIEZURElfRUxWX0NMSTcwMDBfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfUFBTNzMzMF9QSUQpIH0sICovCisJLyogeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0VMVl9URk0xMDBfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfVURGNzdfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfVUlPODhfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfVUFEOF9QSUQpIH0sICovCisJLyogeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0VMVl9VREE3X1BJRCkgfSwgKi8KKwkvKiB7IFVTQl9ERVZJQ0UoRlRESV9WSUQsIEZURElfRUxWX1VTSTJfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfVDExMDBfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfUENEMjAwX1BJRCkgfSwgKi8KKwkvKiB7IFVTQl9ERVZJQ0UoRlRESV9WSUQsIEZURElfRUxWX1VMQTIwMF9QSUQpIH0sICovCisJLyogeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0VMVl9GSFoxMDAwUENfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfQ1NJOF9QSUQpIH0sICovCisJLyogeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0VMVl9FTTEwMDBETF9QSUQpIH0sICovCisJLyogeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0VMVl9QQ0sxMDBfUElEKSB9LCAqLworCS8qIHsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9FTFZfUkZQNTAwX1BJRCkgfS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FVTQl9ERVZJQ0UoRlRESV9WSUQsIEZURElfNE5fR0FMQVhZX0RFXzFfUElEKSB9LAogCXsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV80Tl9HQUxBWFlfREVfMl9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfMF9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfMV9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfMl9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfM19QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfNF9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfNV9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfNl9QSUQpIH0sCisJeyBVU0JfREVWSUNFKEZURElfVklELCBYU0VOU19DT05WRVJURVJfN19QSUQpIH0sCiAJeyBVU0JfREVWSUNFKE1PQklMSVRZX1ZJRCwgTU9CSUxJVFlfVVNCX1NFUklBTF9QSUQpIH0sCiAJeyBVU0JfREVWSUNFKEZURElfVklELCBGVERJX0FDVElWRV9ST0JPVFNfUElEKSB9LAogCXsgVVNCX0RFVklDRShGVERJX1ZJRCwgRlRESV9NSEFNX1k2X1BJRCkgfSwKIAl7IFVTQl9ERVZJQ0UoRlRESV9WSUQsIEZURElfTUhBTV9ZOF9QSUQpIH0sCiAJeyBVU0JfREVWSUNFKEVWT0xVVElPTl9WSUQsIEVWT0xVVElPTl9FUjFfUElEKSB9LAotCXsgfQkJCQkJCS8qIFRlcm1pbmF0aW5nIGVudHJ5ICovCisJeyB9LAkJCQkJLyogT3B0aW9uYWwgcGFyYW1ldGVyIGVudHJ5ICovCisJeyB9CQkJ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ENPTkZJR19GQl9TM1RSSU8pICAgICAgICAgICArPSBTM3RyaW9mYi5vCiBvYmotJChDT05GSUdfRkJfRk0yKSAgICAgICAgICAgICAgKz0gZm0yZmIubwotb2JqLSQoQ09ORklHX0ZCX1RSSURFTlQpCSAgKz0gdHJpZGVudGZiLm8KK29iai0kKENPTkZJR19GQl9DWUJMQSkgICAgICAgICAgICArPSBjeWJsYWZiLm8KK29iai0kKENPTkZJR19GQl9UUklERU5UKSAgICAgICAgICArPSB0cmlkZW50ZmIubwogb2JqLSQoQ09ORklHX0ZCX1NUSSkgICAgICAgICAgICAgICs9IHN0aWZiLm8KIG9iai0kKENPTkZJR19GQl9GRkIpICAgICAgICAgICAgICArPSBmZmIubyBzYnVzbGliLm8KIG9iai0kKENPTkZJR19GQl9DRzYpICAgICAgICAgICAgICArPSBjZzYubyBzYnVzbGliLm8KQEAgLTkyLDYgKzk0LDcgQEAKIG9iai0kKENPTkZJR19GQl9UWDM5MTIpCQkgICs9IHR4MzkxMmZiLm8KIG9iai0kKENPTkZJR19GQl9TMUQxM1hYWCkJICArPSBzMWQxM3h4eGZiLm8KIG9iai0kKENPTkZJR19GQl9JTVgpICAgICAgICAgICAgICArPSBpbXhmYi5vCitvYmotJChDT05GSUdfRkJfUzNDMjQxMCkJICArPSBzM2MyNDEwZmIubwogCiAjIFBsYXRmb3JtIG9yIGZhbGxiYWNrIGRyaXZlcnMgZ28gaGVyZQogb2JqLSQoQ09ORklHX0ZCX1ZFU0EpICAgICAgICAgICAgICs9IHZlc2FmYi5vCmRpZmYgLS1naXQgYS9kcml2ZXJzL3ZpZGVvL2F0eS9hdHkxMjhmYi5jIGIvZHJpdmVycy92aWRlby9hdHkvYXR5MTI4ZmIuYwppbmRleCBiMGViYTNhLi5lMzgwZWU4YiAxMDA2NDQKLS0tIGEvZHJpdmVycy92aWRlby9hdHkvYXR5MTI4ZmIuYworKysgYi9kcml2ZXJzL3ZpZGVvL2F0eS9hdHkxMjhmYi5jCkBAIC04MDYs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sMCk7Cittb2R1bGVfcGFyYW0odmVyYm9zaXR5LGludCwwKTsKK21vZHVsZV9wYXJhbSh2ZXNhZmIsaW50LDApOworCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisvLworLy8gUG9ydCBhY2Nlc3MgbWFjcm9zIGZvciBtZW1vcnkgbWFwcGVkIGlvCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisjZGVmaW5lIG91dDgocix2KSB3cml0ZWIodixpb192aXJ0K3IpCisjZGVmaW5lIG91dDMyKHIsdikgd3JpdGVsKHYsaW9fdmlydCtyKQorI2RlZmluZSBpbjgocikgcmVhZGIoaW9fdmlydCtyKQorI2RlZmluZSBpbjMyKHIpIHJlYWRsKGlvX3ZpcnQrcikKKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8KKy8vIEhhcmR3YXJlIGFjY2VzcyBpbmxpbmUgZnVuY3Rpb25zCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCitzdGF0aWMgaW5saW5lIHVuc2lnbmVkIGNoYXIgcmVhZDNYNChpbnQgcmVnKQoreworCW91dDgoMHgzRDQscmVnKTsKKwlyZXR1cm4gaW44KDB4M0Q1KTsKK30KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBjaGFyIHJlYWQzQzQoaW50IHJlZykKK3sKKwlvdXQ4KDB4M0M0LHJlZyk7CisJcmV0dXJuIGluOCgweDNDNSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdW5zaWduZWQgY2hhciByZWFkM0NFKGludCByZWcpCit7CisJb3V0OCgweDNDRSxyZWcpOworCXJldHVybiBpbjgoMHgzQ0YpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgd3JpdGUzWDQoaW50IHJlZyx1bnNpZ25lZCBjaGFyIHZhbCkKK3sKKwlvdXQ4KDB4M0Q0LHJlZyk7CisJb3V0OCgweDNENSx2YWwp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GNsZWFyIHdyaXRlIHByb3RlY3QgYml0IGZvciBwb3J0IDB4M2MyCisJdG1wPWluYigweDNkNSkgJiAweEJGOworCW91dGIoQ1IxRSwweDNkNCk7CisJb3V0Yih0bXAsMHgzZDUpOworCisJb3V0YihDUjM5LDB4M0Q0KTsKKwlvdXRiKGluYigweDNENSl8MHgwMSwweDNENSk7IC8vIEVuYWJsZSBtbWlvLCBldmVyeXRoaW5nIGVsc2UgdW50b3VjaGVkCit9CisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8KKy8vIFNldCBwaXhlbCBjbG9jayBWQ0xLMQorLy8gICAtIG11bHRpcGxpZXJzIHNldCBlbHN3aGVyZQorLy8gICAtIGZyZXEgaW4gdW5pdHMgb2YgMC4wMSBNSHoKKy8vCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworc3RhdGljIHZvaWQgc2V0X3ZjbGsoc3RydWN0IGN5YmxhZmJfcGFyICpwYXIsIGludCBmcmVxKQoreworCXUzMiBtLG4sazsKKwlpbnQgZixmaSxkLGRpOworCXU4IGxvPTAsaGk9MDsKKworCWQgPSAyMDAwOworCWsgPSBmcmVxID49IDEwMDAwID8gMCA6IGZyZXEgPj0gNTAwMCA/IDEgOiBmcmVxID49IDI1MDAgPyAyIDogMzsKKwlmb3IobSA9IDA7bTw2NDttKyspCisJZm9yKG4gPSAwO248MjUwO24rKykgeyAvLyBtYXggMjQ5IGlzIGEgaGFyZHdhcmUgbGltaXQgZm9yIGN5YmxhL2kxICEKKwkJZmkgPSAoaW50KSgoKDU4NjQ3MjcqKG4rOCkpLygobSsyKSooMTw8aykpKT4+MTIpOworCQlpZiAoKGRpID0gYWJzKGZpIC0gZnJlcSkpIDwgZCkgeworCQkJZCA9IGRpOworCQkJZiA9IGZpOworCQkJbG8gPSAodTgpIG47CisJCQloaSA9ICh1OCkgKChrPDw2KSB8IG0pOworCQl9CisJfQorCXdyaXRlM0M0KFNSMTksaGkpOworCXdyaXRlM0M0KFNSMTgsbG8pOworCWlmKHZlcmJvc2l0eSA+IDEpCisJCW91dHB1dCgicGl4Y2xvY2sgPSAlZC4lMDJkIE1Ieiwgay9tL24gJXggJXggJXhcbiIsCisJCWZyZXEvMTAwLGZyZXElMTAwLChoaSYweGMwKT4+NixoaSYweDNmLGxvKTsKK30KKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vCisvLyBDeWJlcmJsYWRlIHNwZWNpZmljIEdyYXBoaWNzIEVuZ2luZSAoR0UpIHNldHVwCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworc3RhdGljIHZvaWQgY3libGFmYl9zZXR1cF9HRShpbnQgcGl0Y2gsaW50IGJwcCkKK3sKKwlpbnQgYmFzZSA9IChwaXRjaD4+Myk8PDIwOworCisJc3dpdGNoIChicHApIHsKKwkJY2FzZSAgODogYmFzZSB8PSAoMDw8MjkpOyBicmVhazsKKwkJY2FzZSAxNTogYmFzZSB8PSAoNTw8MjkpOyBicmVhazsKKwkJY2FzZSAxNjogYmFzZSB8PSAoMTw8MjkpOyBicmVhazsKKwkJY2FzZSAyNDoKKwkJY2FzZSAzMjogYmFzZSB8PSAoMjw8MjkpOyBicmVhazsKKwl9CisKKwl3cml0ZTNYNChDUjM2LDB4OTApOwkvLyByZXNldCBHRQorCXdyaXRlM1g0KENSMzYsMHg4MCk7CS8vIGVuYWJsZSBHRQorCisJb3V0MzIoR0UyNCwxPDw3KTsJLy8gcmVzZXQgYWxsIEdFIHBvaW50ZXJzCisJb3V0MzIoR0UyNCwwKTsKKworCXdyaXRlM1g0KENSMkQsMHgwMCk7CS8vIEdFIFRpbWluaWdzLCBubyBkZWxheXMKKworCW91dDMyKEdFQjgsYmFzZSk7IC8vIERlc3RpbmF0aW9uIFN0cmlkZSAvIEJ1ZmZlciBCYXNlIDAsIHAg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OworCWludCBjb2w7CisKKwlzd2l0Y2ggKGJwcCkgeworCQlkZWZhdWx0OgorCQljYXNlIDg6IGNvbCA9IGZyLT5jb2xvcjsKKwkJCWNvbCB8PSBjb2wgPDw4OworCQkJY29sIHw9IGNvbCA8PDE2OworCQkJYnJlYWs7CisJCWNhc2UgMTY6IGNvbCA9ICgodTMyICopKGluZm8tPnBzZXVkb19wYWxldHRlKSlbZnItPmNvbG9yXTsKKwkJCSBjb2wgfD0gY29sIDw8MTY7CisJCQkgYnJlYWs7CisJCWNhc2UgMzI6IGNvbCA9ICgodTMyICopKGluZm8tPnBzZXVkb19wYWxldHRlKSlbZnItPmNvbG9yXTsKKwkJCSBicmVhazsKKwl9CisKKwljeWJsYWZiX3N5bmMoaW5mbyk7CisKKwlvdXQzMihHRTYwLGNvbCk7CisJb3V0MzIoR0U0OCxmci0+cm9wID8gMHg2NjpST1BfUyk7CisJb3V0MzIoR0U0NCwweDIwMDAwMDAwfDE8PDE5fDE8PDR8Mjw8Mik7CisJb3V0MzIoR0UwOCxwb2ludChmci0+ZHgsZnItPmR5KSk7CisJb3V0MzIoR0UwQyxwb2ludChmci0+ZHgrZnItPndpZHRoLTEsZnItPmR5K2ZyLT5oZWlnaHQtMSkpOworCit9CisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisvLworLy8gQ3liZXJibGFkZSBzcGVjaWZpYyBjb3B5YXJlYQorLy8KKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK3N0YXRpYyB2b2lkIGN5YmxhZmJfY29weWFyZWEoc3RydWN0IGZiX2luZm8gKmluZm8sCisJCQkgICAgIGNvbnN0IHN0cnVjdCBmYl9jb3B5YXJlYSAqY2EpCit7CisJX191MzIgczEsczIsZDEsZDI7CisJaW50IGRpcmVjdGlvbjsKKworCXMxID0gcG9pbnQoY2EtPnN4LGNhLT5zeSk7CisJczIgPSBwb2ludChjYS0+c3grY2EtPndpZHRoLTEsY2EtPnN5K2NhLT5oZWlna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ZnNldDsKKworCXdyaXRlM1g0KENSMEQsb2Zmc2V0ICYgMHhGRik7CisJd3JpdGUzWDQoQ1IwQywob2Zmc2V0ICYgMHhGRjAwKSA+PiA4KTsKKwl3cml0ZTNYNChDUjFFLChyZWFkM1g0KENSMUUpICYgMHhERikgfCAoKG9mZnNldCAmIDB4MTAwMDApID4+IDExKSk7CisJd3JpdGUzWDQoQ1IyNywocmVhZDNYNChDUjI3KSAmIDB4RjgpIHwgKChvZmZzZXQgJiAweEUwMDAwKSA+PiAxNykpOworCXdyaXRlM1g0KENSMkIsKHJlYWQzWDQoQ1IyQikgJiAweERGKSB8ICgob2Zmc2V0ICYgMHgxMDAwMDApID4+IDE1KSk7CisKKwlyZXR1cm4gMDsKK30KKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8KKy8vIFRoaXMgd2lsbCByZWFsbHkgaGVscCBpbiBjYXNlIG9mIGEgYnVnIC4uLgorLy8gZHVtcCBtb3N0IGdhcGhpY3MgY29yZSByZWdpc3RlcnMuCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCitzdGF0aWMgdm9pZCByZWdkdW1wKHN0cnVjdCBjeWJsYWZiX3BhciAqcGFyKQoreworCWludCBpOworCisJaWYgKHZlcmJvc2l0eSA8IDIpCisJCXJldHVybjsKKworCXByaW50aygiXG4iKTsKKwlmb3IoaT0wOyBpPD0weGZmOyBpKyspIHsKKwkJb3V0YihpLDB4M2Q0KTsKKwkJcHJpbnRrKCJDUiUwMng9JTAyeCAiLGksaW5iKDB4M2Q1KSk7CisJCWlmIChpJTE2PT0xNSkKKwkJCXByaW50aygiXG4iKTsKKwl9CisKKwlvdXRiKDB4MzAsMHgzY2UpOworCW91dGIoaW5iKDB4M2NmKSB8IDB4NDAsMHgzY2YpOworCWZvcihpPTA7IGk8PTB4MWY7IGkrKykgeworCQlpZiAoaT09MCB8fCAoaT4yICYmIGk8OCkgfHwgaT09MHgxMCB8fCBpPT0weDExIHx8IGk9PTB4MTYpIHsKKwkJCW91dGIoaSwweDNkNCk7CisJCQlwcmludGsoIkNSJTAyeD0lMDJ4ICIsaSxpbmIoMHgzZDUpKTsKKwkJfSBlbHNlCisJCQlwcmludGsoIi0tLS0tLS0gIik7CisJCWlmIChpJTE2PT0xNSkKKwkJCXByaW50aygiXG4iKTsKKwl9CisJb3V0YigweDMwLDB4M2NlKTsKKwlvdXRiKGluYigweDNjZikgJiAweGJmLDB4M2NmKTsKKworCXByaW50aygiXG4iKTsKKwlmb3IoaT0wOyBpPD0weDdmOyBpKyspIHsKKwkJb3V0YihpLDB4M2NlKTsKKwkJcHJpbnRrKCJHUiUwMng9JTAyeCAiLGksaW5iKDB4M2NmKSk7CisJCWlmIChpJTE2PT0xNSkKKwkJCXByaW50aygiXG4iKTsKKwl9CisKKwlwcmludGsoIlxuIik7CisJZm9yKGk9MDsgaTw9MHhmZjsgaSsrKSB7CisJCW91dGIoaSwweDNjNCk7CisJCXByaW50aygiU1IlMDJ4PSUwMnggIixpLGluYigweDNjNSkpOworCQlpZiAoaSUxNj09MTUpCisJCQlwcmludGsoIlxuIik7CisJfQorCisJcHJpbnRrKCJcbiIpOworCWZvcihpPTA7IGkgPD0gMHgxRjsgaSsrKSB7CisJCWluYigweDNkYSk7IC8vIG5leHQgYWNjZXNzIGlzIGluZGV4IQorCQlvdXRiKGksMHgzYzApOworCQlwcmludGsoIkFSJTAyeD0lMDJ4ICIsaSxpbmIoMHgzYzEpKTsKKwkJaWYgKGklMTY9PTE1KQorCQkJcHJpbnRrKCJcbiIpOworCX0KKwlwcmludGsoIlxuIik7CisKKwlpbmIoMHgzREEpOwkJCS8vIHJlc2V0IGludGVybmFsIGZsYWcgdG8gM2MwIGluZGV4CisJb3V0YigweDIwLDB4M0MwKTsJCS8vIGVuYWJsZSBhdHRyCisKKwlyZXR1cm47Cit9CisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy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IGhpY29sb3IKKwkJICAgKGJwcCA9PSAyNCkgPyAweEQwIDogCS8vIHRydWVjb2xvcgorCQkgICAoYnBwID09IDMyKSA/IDB4RDAgOiAwKTsJLy8gdHJ1ZWNvbG9yCisJaW44KDB4M0M4KTsKKworCS8vCisJLy8gR1IzMSBpcyBub3QgbWVudGlvbmVkIGluIHRoZSBkYXRhc2hlZXQKKwkvLworCWlmIChkaXNwbGF5dHlwZSA9PSBESVNQTEFZX0ZQKQorCQl3cml0ZTNDRShHUjMxLChyZWFkM0NFKEdSMzEpICYgMHg4RikgfAorCQkJICgoaW5mby0+dmFyLnlyZXMgPiAxMDI0KSA/IDB4NTAgOgorCQkJIChpbmZvLT52YXIueXJlcyA+ICAgNzY4KSA/IDB4MzAgOgorCQkJIChpbmZvLT52YXIueXJlcyA+ICAgNjAwKSA/IDB4MjAgOgorCQkJIChpbmZvLT52YXIueXJlcyA+ICAgNDgwKSA/IDB4MTAgOiAwKSk7CisKKwlpbmZvLT5maXgudmlzdWFsID0gKGJwcCA9PSA4KSA/IEZCX1ZJU1VBTF9QU0VVRE9DT0xPUgorCQkJCSAgICAgIDogRkJfVklTVUFMX1RSVUVDT0xPUjsKKwlpbmZvLT5maXgubGluZV9sZW5ndGggPSBpbmZvLT52YXIueHJlcyAqIChicHAgPj4gMyk7CisJaW5mby0+Y21hcC5sZW4gPSAoYnBwID09IDgpID8gMjU2OiAxNjsKKworCS8vCisJLy8gaW5pdCBhY2NlbGVyYXRpb24gZW5naW5lCisJLy8KKwljeWJsYWZiX3NldHVwX0dFKGluZm8tPnZhci54cmVzLGluZm8tPnZhci5iaXRzX3Blcl9waXhlbCk7CisKKwlyZWdkdW1wKHBhcik7CisKKwlyZXR1cm4gMDsKK30KKworLy89PT09PT09PT09PT09PT09PT09PT09PT0KKy8vCisvLyBTZXQgb25lIGNvbG9yIHJlZ2lzdGVyCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT0KKworc3RhdGljIGludCBjeWJsYWZiX3NldGNv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G1vZGUgaXMgdW5saWtlbHkgdG8gZmFpbC4gSWYgaXQgZG9lcywKKwkJLy8gdHJ5IDY0MHg0ODAtOEA3NSAuLi4KKwkJaWYoaT09MCkgeworCQkJbW9kZT0iNjQweDQ4MCI7CisJCQlicHA9ODsKKwkJCXJlZj03NTsKKwkJCW91dHB1dCgiRGV0ZWN0ZWQgbW9kZSBmYWlsZWQgY2hlY2tfdmFyISAiCisJCQkgICAgICAgIlRyeWluZyA2NDB4NDgwLThANzVcbiIpOworCQkJZ290byB0cnlhZ2FpbjsKKwkJfQorCQkvLyBBIHNwZWNpZmllZCB2aWRlbyBtb2RlIGZhaWxlZCBmb3Igc29tZSByZWFzb24uCisJCS8vIFRyeSB0aGUgc3RhcnR1cCBtb2RlIGZpcnN0CisJCW91dHB1dCgiU3BlY2lmaWVkIG1vZGUgJyVzJyBmYWlsZWQgY2hlY2shICIKKwkJCSJGYWxsaW5nIGJhY2sgdG8gc3RhcnR1cCBtb2RlLlxuIixtb2RlKTsKKwkJbW9kZT1OVUxMOworCQlnb3RvIHRyeWFnYWluOworCX0KKworCXJldHVybiAwOworCit9CisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vCisvLyBEZXRlY3QgYWN0aXZhdGVkIG1lbW9yeSBzaXplLiBVbmRlZmluZWQgdmFsdWVzIHJlcXVpcmUKKy8vIG1lbXNpemUgcGFyYW1ldGVyLgorLy8KKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworc3RhdGljIHVuc2lnbmVkIGludCBfX2RldmluaXQgZ2V0X21lbXNpemUodm9pZCkKK3sKKwl1bnNpZ25lZCBjaGFyIHRtcDsKKwl1bnNpZ25lZCBpbnQgazsKKworCWlmIChtZW1zaXplKQorCQlrID0gbWVtc2l6ZSAqIEtiOworCWVsc2UgeworCQl0bXAgPSByZWFkM1g0KENSMUYpICYgMHgwRjsKKwkJc3dpdGNoICh0bXApIHsKKwkJCWNhc2UgMHgwMzogayA9IDEgKiBNYjsgYnJlYWs7CisJCQljYXNlIDB4MDc6IGsgPSAyICogTWI7IGJyZWFrOworCQkJY2FzZSAweDBGOiBrID0gNCAqIE1iOyBicmVhazsKKwkJCWNhc2UgMHgwNDogayA9IDggKiBNYjsgYnJlYWs7CisJCQlkZWZhdWx0OgorCQkJCWsgPSAxICogTWI7CisJCQkJb3V0cHV0KCJVbmtub3duIG1lbW9yeSBzaXplIGNvZGUgJXggaW4gQ1IxRi4iCisJCQkJICAgICAgICIgV2UgZGVmYXVsdCB0byAxIE1iIGZvciBub3csIHBsZWFzZSIKKwkJCQkgICAgICAgIiBkbyBwcm92aWRlIGEgbWVtc2l6ZSBwYXJhbWV0ZXIhXG4iLAorCQkJCSAgICAgICB0bXApOworCQl9CisJfQorCisJaWYgKHZlcmJvc2l0eSA+IDApCisJCW91dHB1dCgiZnJhbWVidWZmZXIgc2l6ZSA9ICVkIEtiXG4iLGsvS2IpOworCXJldHVybiBrOworfQorCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8KKy8vIERldGVjdCBpZiBhIGZsYXQgcGFuZWwgbW9uaXRvciBjb25uZWN0ZWQgdG8gdGhlIHNwZWNpYWwKKy8vIGludGVyZmFjZSBpcyBhY3RpdmUuIE92ZXJyaWRlIGlzIHBvc3NpYmxlIGJ5IGZwIGFuZCBjcnQKKy8vIHBhcmFtZXRlcnMuCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworc3RhdGljIHVuc2lnbmVkIGludCBfX2RldmluaXQgZ2V0X2Rpc3BsYXl0eXBlKHZvaWQpCit7CisJaWYgKGZwKQorCQlyZXR1cm4gRElTUExBWV9GUDsKKwlpZiAoY3J0KQorCQlyZXR1cm4gRElTUExBWV9DUlQ7CisJcmV0dXJuIChyZWFkM0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l9iYWNrX3BvcmNoOworCXUzMiBoX21hcmdpbjsKKwl1MzIgdl9tYXJnaW47CisJdTMyIGludGVybGFjZTsKKwl1MzIgYXNwZWN0X3JhdGlvOworCXUzMiBhY3RpdmVfcGl4ZWxzOworCXUzMiBmbGFnczsKKwl1MzIgc3RhdHVzOworfTsKKworc3RhdGljIGludCBmYl9jdnRfdmJpX3RhYltdID0geworCTQsICAgICAgICAvKiA0OjMgICAgICAqLworCTUsICAgICAgICAvKiAxNjo5ICAgICAqLworCTYsICAgICAgICAvKiAxNjoxMCAgICAqLworCTcsICAgICAgICAvKiA1OjQgICAgICAqLworCTcsICAgICAgICAvKiAxNTo5ICAgICAqLworCTgsICAgICAgICAvKiByZXNlcnZlZCAqLworCTksICAgICAgICAvKiByZXNlcnZlZCAqLworCTEwICAgICAgICAvKiBjdXN0b20gICAqLworfTsKKworLyogcmV0dXJucyBocGVyaW9kICogMTAwMCAqLworc3RhdGljIHUzMiBmYl9jdnRfaHBlcmlvZChzdHJ1Y3QgZmJfY3Z0X2RhdGEgKmN2dCkKK3sKKwl1MzIgbnVtID0gMTAwMDAwMDAwMC9jdnQtPmZfcmVmcmVzaDsKKwl1MzIgZGVuOworCisJaWYgKGN2dC0+ZmxhZ3MgJiBGQl9DVlRfRkxBR19SRURVQ0VEX0JMQU5LKSB7CisJCW51bSAtPSBGQl9DVlRfUkJfTUlOX1ZCTEFOSyAqIDEwMDA7CisJCWRlbiA9IDIgKiAoY3Z0LT55cmVzL2N2dC0+aW50ZXJsYWNlICsgMiAqIGN2dC0+dl9tYXJnaW4pOworCX0gZWxzZSB7CisJCW51bSAtPSBGQl9DVlRfTUlOX1ZTWU5DX0JQICogMTAwMDsKKwkJZGVuID0gMiAqIChjdnQtPnlyZXMvY3Z0LT5pbnRlcmxhY2UgKyBjdnQtPnZfbWFyZ2luICogMgorCQkJICAgKyBGQl9DVlRfTUlOX1ZQT1JDSCArIGN2dC0+aW50ZXJsYWNlLzIpOworCX0KKworCXJldHVybiA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gY2hhbi0+cGFyOworCXU4ICAgICAgICAgICAgICAgICAgICAgICAgKm1taW8gPSBwYXItPm1taW9fc3RhcnRfdmlydHVhbDsKKworCWk4MTBfd3JpdGVsKG1taW8sIEdQSU9CLCAoc3RhdGUgPyBTQ0xfVkFMX09VVCA6IDApIHwgU0NMX0RJUiB8CisJCSAgICBTQ0xfRElSX01BU0sgfCBTQ0xfVkFMX01BU0spOworCWk4MTBfcmVhZGwobW1pbywgR1BJT0IpOwkvKiBmbHVzaCBwb3N0ZWQgd3JpdGUgKi8KK30KKworc3RhdGljIHZvaWQgaTgxMGkyY19zZXRzZGEodm9pZCAqZGF0YSwgaW50IHN0YXRlKQoreworICAgICAgICBzdHJ1Y3QgaTgxMGZiX2kyY19jaGFuICAgICpjaGFuID0gKHN0cnVjdCBpODEwZmJfaTJjX2NoYW4gKilkYXRhOworICAgICAgICBzdHJ1Y3QgaTgxMGZiX3BhciAgICAgICAgICpwYXIgPSBjaGFuLT5wYXI7CisJdTggICAgICAgICAgICAgICAgICAgICAgICAqbW1pbyA9IHBhci0+bW1pb19zdGFydF92aXJ0dWFsOworCisgCWk4MTBfd3JpdGVsKG1taW8sIEdQSU9CLCAoc3RhdGUgPyBTREFfVkFMX09VVCA6IDApIHwgU0RBX0RJUiB8CisJCSAgICBTREFfRElSX01BU0sgfCBTREFfVkFMX01BU0spOworCWk4MTBfcmVhZGwobW1pbywgR1BJT0IpOwkvKiBmbHVzaCBwb3N0ZWQgd3JpdGUgKi8KK30KKworc3RhdGljIGludCBpODEwaTJjX2dldHNjbCh2b2lkICpkYXRhKQoreworICAgICAgICBzdHJ1Y3QgaTgxMGZiX2kyY19jaGFuICAgICpjaGFuID0gKHN0cnVjdCBpODEwZmJfaTJjX2NoYW4gKilkYXRhOworICAgICAgICBzdHJ1Y3QgaTgxMGZiX3BhciAgICAgICAgICpwYXIgPSBjaGFuLT5wYXI7CisJdTggICAgICAgICAgICAgICAgICAgICAgICAqbW1pbyA9IHBhci0+bW1pb19z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K30KKworc3RhdGljIGludCBpODEwZGRjX2dldHNkYSh2b2lkICpkYXRhKQoreworICAgICAgICBzdHJ1Y3QgaTgxMGZiX2kyY19jaGFuICAgICpjaGFuID0gKHN0cnVjdCBpODEwZmJfaTJjX2NoYW4gKilkYXRhOworICAgICAgICBzdHJ1Y3QgaTgxMGZiX3BhciAgICAgICAgICpwYXIgPSBjaGFuLT5wYXI7CisJdTggICAgICAgICAgICAgICAgICAgICAgKm1taW8gPSBwYXItPm1taW9fc3RhcnRfdmlydHVhbDsKKworCWk4MTBfd3JpdGVsKG1taW8sIEdQSU9BLCBTREFfRElSX01BU0spOworCWk4MTBfd3JpdGVsKG1taW8sIEdQSU9BLCAwKTsKKwlyZXR1cm4gKDAgIT0gKGk4MTBfcmVhZGwobW1pbywgR1BJT0EpICYgU0RBX1ZBTF9JTikpOworfQorCisjZGVmaW5lIEkyQ19BTEdPX0REQ19JODEwICAgMHgwZTAwMDAKKyNkZWZpbmUgSTJDX0FMR09fSTJDX0k4MTAgICAweDBmMDAwMAorc3RhdGljIGludCBpODEwX3NldHVwX2kyY19idXMoc3RydWN0IGk4MTBmYl9pMmNfY2hhbiAqY2hhbiwgY29uc3QgY2hhciAqbmFtZSwKKwkJCSAgICAgIGludCBjb25uKQoreworICAgICAgICBpbnQgcmM7CisKKyAgICAgICAgc3RyY3B5KGNoYW4tPmFkYXB0ZXIubmFtZSwgbmFtZSk7CisgICAgICAgIGNoYW4tPmFkYXB0ZXIub3duZXIgICAgICAgICAgICAgPSBUSElTX01PRFVMRTsKKyAgICAgICAgY2hhbi0+YWRhcHRlci5hbGdvX2RhdGEgICAgICAgICA9ICZjaGFuLT5hbGdvOworICAgICAgICBjaGFuLT5hZGFwdGVyLmRldi5wYXJlbnQgICAgICAgID0gJmNoYW4tPnBhci0+ZGV2LT5kZXY7CisJc3dpdGNoIChjb25uKSB7CisJY2FzZSAxOgorCQljaGFuLT5hZGFwdGVyLmlkICAgICAgICAgICAgICAgID0gSTJDX0FMR09fRERDX0k4MTA7CisJCWNoYW4tPmFsZ28uc2V0c2RhICAgICAgICAgICAgICAgPSBpODEwZGRjX3NldHNkYTsKKwkJY2hhbi0+YWxnby5zZXRzY2wgICAgICAgICAgICAgICA9IGk4MTBkZGNfc2V0c2NsOworCQljaGFuLT5hbGdvLmdldHNkYSAgICAgICAgICAgICAgID0gaTgxMGRkY19nZXRzZGE7CisJCWNoYW4tPmFsZ28uZ2V0c2NsICAgICAgICAgICAgICAgPSBpODEwZGRjX2dldHNjbDsKKwkJYnJlYWs7CisJY2FzZSAyOgorCQljaGFuLT5hZGFwdGVyLmlkICAgICAgICAgICAgICAgID0gSTJDX0FMR09fSTJDX0k4MTA7CisJCWNoYW4tPmFsZ28uc2V0c2RhICAgICAgICAgICAgICAgPSBpODEwaTJjX3NldHNkYTsKKwkJY2hhbi0+YWxnby5zZXRzY2wgICAgICAgICAgICAgICA9IGk4MTBpMmNfc2V0c2NsOworCQljaGFuLT5hbGdvLmdldHNkYSAgICAgICAgICAgICAgID0gaTgxMGkyY19nZXRzZGE7CisJCWNoYW4tPmFsZ28uZ2V0c2NsICAgICAgICAgICAgICAgPSBpODEwaTJjX2dldHNjbDsKKwkJYnJlYWs7CisJfQorCWNoYW4tPmFsZ28udWRlbGF5ICAgICAgICAgICAgICAgPSAxMDsKKwljaGFuLT5hbGdvLm1kZWxheSAgICAgICAgICAgICAgID0gMTA7CisgICAgICAgIGNoYW4tPmFsZ28udGltZW91dCAgICAgICAgICAgICAgPSAoSFovMik7CisgICAgICAgIGNoYW4tPmFsZ28uZGF0YSAgICAgICAgICAgICAgICAgPSBjaGFuOworCisgICAgICAgIGkyY19zZXRfYWRhcGRhdGEoJmNoYW4tPmFkYXB0ZXIsIGNoYW4pOworCisgICAgICAgIC8qIFJhaXNlIFNDTCBhbmQgU0RBICovCisgICAgICAgIGNoYW4tPmFsZ28uc2V0c2RhKGNoYW4sIDEpOworICAgICAgICBjaGFuLT5hbGdvLnNldHNjbChjaGFuLCAxKTsKK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fcHJvYmVfaTJjX2VkaWQoc3RydWN0IGk4MTBmYl9pMmNfY2hhbiAqY2hhbikKK3sKKyAgICAgICAgdTggc3RhcnQgPSAweDA7CisgICAgICAgIHN0cnVjdCBpMmNfbXNnIG1zZ3NbXSA9IHsKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAuYWRkciAgID0gSTgxMF9EREMsCisgICAgICAgICAgICAgICAgICAgICAgICAubGVuICAgID0gMSwKKyAgICAgICAgICAgICAgICAgICAgICAgIC5idWYgICAgPSAmc3RhcnQsCisgICAgICAgICAgICAgICAgfSwgeworICAgICAgICAgICAgICAgICAgICAgICAgLmFkZHIgICA9IEk4MTBfRERDLAorICAgICAgICAgICAgICAgICAgICAgICAgLmZsYWdzICA9IEkyQ19NX1JELAorICAgICAgICAgICAgICAgICAgICAgICAgLmxlbiAgICA9IEVESURfTEVOR1RILAorICAgICAgICAgICAgICAgIH0sCisgICAgICAgIH07CisgICAgICAgIHU4ICpidWY7CisKKyAgICAgICAgYnVmID0ga21hbGxvYyhFRElEX0xFTkdUSCwgR0ZQX0tFUk5FTCk7CisgICAgICAgIGlmICghYnVmKSB7CisJCURQUklOVEsoImk4MTAtaTJjOiBGYWlsZWQgdG8gYWxsb2NhdGUgbWVtb3J5XG4iKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gTlVMTDsKKyAgICAgICAgfQorICAgICAgICBtc2dzWzFdLmJ1ZiA9IGJ1ZjsKKworICAgICAgICBpZiAoaTJjX3RyYW5zZmVyKCZjaGFuLT5hZGFwdGVyLCBtc2dzLCAyKSA9PSAyKSB7CisJCURQUklOVEsoImk4MTAtaTJjOiBJMkMgVHJhbnNmZXIgc3VjY2Vzc2Z1bFxuIik7CisgICAgICAgICAgICAgICAgcmV0dXJuIGJ1ZjsKKwl9CisgICAgICAgIERQUklOVEsoImk4MTAtaTJjOiBVbmFibGUgdG8gcmVhZCBFRElEIGJsb2NrLlxuIik7CisgICAgICAgIGtmcmVlKGJ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ml0ZGF0YSA9IDA7Ci1zdGF0aWMgaW50IHZzeW5jMiAgICAgX19pbml0ZGF0YSA9IDA7Ci1zdGF0aWMgaW50IHhyZXMgICAgICAgX19pbml0ZGF0YSA9IDY0MDsKLXN0YXRpYyBpbnQgeXJlcyAgICAgICBfX2luaXRkYXRhID0gNDgwOwotc3RhdGljIGludCB2eXJlcyAgICAgIF9faW5pdGRhdGEgPSAwOwotc3RhdGljIGludCBzeW5jICAgICAgIF9faW5pdGRhdGEgPSAwOwotc3RhdGljIGludCBleHRfdmdhICAgIF9faW5pdGRhdGEgPSAwOwotc3RhdGljIGludCBkY29sb3IgICAgIF9faW5pdGRhdGEgPSAwOworc3RhdGljIGNoYXIgKm1vZGVfb3B0aW9uIF9fZGV2aW5pdGRhdGEgPSBOVUxMOworc3RhdGljIGludCB2cmFtICAgICAgIF9fZGV2aW5pdGRhdGEgPSA0Oworc3RhdGljIGludCBicHAgICAgICAgIF9fZGV2aW5pdGRhdGEgPSA4Oworc3RhdGljIGludCBtdHJyICAgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCBhY2NlbCAgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCBoc3luYzEgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCBoc3luYzIgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCB2c3luYzEgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCB2c3luYzIgICAgIF9fZGV2aW5pdGRhdGEgPSAwOworc3RhdGljIGludCB4cmVzICAgICAgIF9fZGV2aW5pdGRhdGEgPSA2NDA7CitzdGF0aWMgaW50IHlyZXMgICAgICAgX19kZXZpbml0ZGF0YSA9IDQ4MDsKK3N0YXRpYyBpbnQgdnlyZXMgICAgICBfX2RldmluaXRkYXRhID0gMDsKK3N0YXRpYyBpbnQgc3luYyAgICAgICBfX2RldmluaXRkYXRhID0gMDsKK3N0YXRpYyBp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tX2RldmljZShkZXYpOworCXN0cnVjdCBzM2MyNDEwZmJfaHcgKm1yZWdzOworCWludCByZXQ7CisJaW50IGlycTsKKwlpbnQgaTsKKworCW1hY2hfaW5mbyA9IGRldi0+cGxhdGZvcm1fZGF0YTsKKwlpZiAobWFjaF9pbmZvID09IE5VTEwpIHsKKwkJZGV2X2VycihkZXYsIm5vIHBsYXRmb3JtIGRhdGEgZm9yIGxjZCwgY2Fubm90IGF0dGFjaFxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCW1yZWdzID0gJm1hY2hfaW5mby0+cmVnczsKKworCWlycSA9IHBsYXRmb3JtX2dldF9pcnEocGRldiwgMCk7CisJaWYgKGlycSA8IDApIHsKKwkJZGV2X2VycihkZXYsICJubyBpcnEgZm9yIGRldmljZVxuIik7CisJCXJldHVybiAtRU5PRU5UOworCX0KKworCWZiaW5mbyA9IGZyYW1lYnVmZmVyX2FsbG9jKHNpemVvZihzdHJ1Y3QgczNjMjQxMGZiX2luZm8pLCBkZXYpOworCWlmICghZmJpbmZvKSB7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCisJaW5mbyA9IGZiaW5mby0+cGFyOworCWluZm8tPmZiID0gZmJpbmZvOworCWRldl9zZXRfZHJ2ZGF0YShkZXYsIGZiaW5mbyk7CisKKwlzM2MyNDEwZmJfaW5pdF9yZWdpc3RlcnMoaW5mbyk7CisKKwlkcHJpbnRrKCJkZXZpbml0XG4iKTsKKworCXN0cmNweShmYmluZm8tPmZpeC5pZCwgZHJpdmVyX25hbWUpOworCisJbWVtY3B5KCZpbmZvLT5yZWdzLCAmbWFjaF9pbmZvLT5yZWdzLCBzaXplb2YoaW5mby0+cmVncykpOworCisJaW5mby0+bWFjaF9pbmZvCQkgICAgPSBkZXYtPnBsYXRmb3JtX2RhdGE7CisKKwlmYmluZm8tPmZpeC50eXBlCSAgICA9IEZCX1RZUEVfUEFDS0VEX1BJWEVMUzsKKwlmYmluZm8tPmZpeC50eXBlX2F1eAkgICA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ci0gICAgICBJbml0VG8zMTBQb2ludGVyKFNpU19QciwgSHdJbmZvKTsKLSAgICAgIGJyZWFrOwotI2VuZGlmCisgICBpZihTaVNfUHItPkNoaXBUeXBlIDwgU0lTXzMxNUgpIHsKICNpZmRlZiBTSVMzMDAKLSAgIGNhc2UgU0lTXzMwMDoKLSAgIGNhc2UgU0lTXzU0MDoKLSAgIGNhc2UgU0lTXzYzMDoKLSAgIGNhc2UgU0lTXzczMDoKLSAgICAgIEluaXRUbzMwMFBvaW50ZXIoU2lTX1ByLCBId0luZm8pOwotICAgICAgYnJlYWs7CisgICAgICBJbml0VG8zMDBQb2ludGVyKFNpU19Qcik7CisjZWxzZQorICAgICAgcmV0dXJuIEZBTFNFOwogI2VuZGlmCi0gICBkZWZhdWx0OgotICAgICAgYnJlYWs7CisgICB9IGVsc2UgeworI2lmZGVmIFNJUzMxNUgKKyAgICAgIEluaXRUbzMxMFBvaW50ZXIoU2lTX1ByKTsKKyNlbHNlCisgICAgICByZXR1cm4gRkFMU0U7CisjZW5kaWYKICAgIH0KKyAgIHJldHVybiBUUlVFOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgICAgICBIRUxQRVI6IEdldCBNb2RlSUQgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNpZmRlZiBMSU5VWF9YRjg2Ci1VU0hPUlQKLVNpU19HZXRNb2RlSUQoaW50IFZHQUVuZ2luZSwgVUxPTkcgVkJGbGFncywgaW50IEhEaXNwbGF5LCBpbnQgVkRpc3BsYXksCi0gICAgICAgICAgICAgIGludCBEZXB0aCwgQk9PTEVBTiBGU1ROLCBpbnQgTENEd2lkdGgsIGludCBMQ0RoZWlnaHQpCisjaWZuZGVmIFNJU19YT1JHX1hGODYKK3N0YXRpYworI2VuZGlmCit1bnNpZ25lZCBzaG9ydAorU2lTX0dldE1vZGVJRCh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MCkKLSAgICAgICAqICAgICAtIE1NSU8gRU5BQkxFICgweDEpCisgICAgICAgKiAgICAgLSBSRUxPQ0FURUQgVkdBIElPIEVOQUJMRUQgKDB4MjApCisgICAgICAgKiAgICAgLSBNTUlPIEVOQUJMRUQgKDB4MDEpCisgICAgICAgKiBMZWF2ZSBvdGhlciBiaXRzIHVudG91Y2hlZC4KICAgICAgICAqLwotICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MjAsMHhhMSk7CisgICAgICBTaVNfU2V0UmVnT1IoU2lTX1ByLT5TaVNfUDNjNCwweDIwLDB4YTEpOwogICAgICAgLyogIC0gRW5hYmxlIDJEICgweDQwKQogICAgICAgICogIC0gRW5hYmxlIDNEICgweDAyKQogICAgICAgICogIC0gRW5hYmxlIDNEIFZlcnRleCBjb21tYW5kIGZldGNoICgweDEwKSA/CkBAIC0xMzUwLDYgKzExMDcsOCBAQAogICAgICAgICovCiAgICAgICBTaVNfU2V0UmVnT1IoU2lTX1ByLT5TaVNfUDNjNCwweDFFLDB4NUEpOwogICAgICAgYnJlYWs7CisjZW5kaWYKKyNpZmRlZiBTSVMzMTVICiAgICBjYXNlIFNJU18zMTVIOgogICAgY2FzZSBTSVNfMzE1OgogICAgY2FzZSBTSVNfMzE1UFJPOgpAQCAtMTM2MiwyMSArMTEyMSwzMCBAQAogICAgY2FzZSBTSVNfNzYwOgogICAgY2FzZSBTSVNfNzYxOgogICAgY2FzZSBTSVNfMzQwOgotICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MjAsMHhhMSk7Ci0gICAgICAvKiAgLSBFbmFibGUgMkQgKDB4NDApCi0gICAgICAgKiAgLSBFbmFibGUgM0QgKDB4MDIpCisgICBjYXNlIFhHSV80MDoKKyAgICAgIC8qIFNlZSBhYm92ZSAqLworICAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzYzQsMHgyMCwweGExKTsKKyAgICAgIC8qICAtIEVuYWJsZSAzRCBHL0wgdHJhbnNmb3JtYXRpb24gZW5naW5lICgweDgwKQorICAgICAgICogIC0gRW5hYmxlIDJEICgweDQwKQogICAgICAgICogIC0gRW5hYmxlIDNEIHZlcnRleCBjb21tYW5kIGZldGNoICgweDEwKQogICAgICAgICogIC0gRW5hYmxlIDNEIGNvbW1hbmQgcGFyc2VyICgweDA4KQotICAgICAgICogIC0gRW5hYmxlIDNEIEcvTCB0cmFuc2Zvcm1hdGlvbiBlbmdpbmUgKDB4ODApCisgICAgICAgKiAgLSBFbmFibGUgM0QgKDB4MDIpCiAgICAgICAgKi8KICAgICAgIFNpU19TZXRSZWdPUihTaVNfUHItPlNpU19QM2M0LDB4MUUsMHhEQSk7CiAgICAgICBicmVhazsKKyAgIGNhc2UgWEdJXzIwOgogICAgY2FzZSBTSVNfNTUwOgotICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MjAsMHhhMSk7CisgICAgICAvKiBTZWUgYWJvdmUgKi8KKyAgICAgIFNpU19TZXRSZWdPUihTaVNfUHItPlNpU19QM2M0LDB4MjAsMHhhMSk7CiAgICAgICAvKiBObyAzRCBlbmdpbmUgISAqLwogICAgICAgLyogIC0gRW5hYmxlIDJEICgweDQwKQorICAgICAgICogIC0gZGlzYWJsZSAzRAogICAgICAgICovCi0gICAgICBTaVNfU2V0UmVnT1IoU2lTX1ByLT5TaVNfUDNjNCwweDFFLDB4NDApOworICAgICAgU2lTX1NldFJlZ0FORE9SKFNpU19Qci0+U2lTX1AzYzQsMHgxRSwweDYwLDB4NDApOworICAgICAgYnJlYWs7CisjZW5kaWYKKyAgIGRlZmF1bHQ6CisgICAgICBicmVhazsKICAgIH0KIH0KIApAQCAtMTM4NCwzOCArMTE1Miw0MCBAQAogLyogICAgICAgICAgICAgSEVMUEVSOiBTZXRMVkRTZXRjICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB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T0gMykJCQlTaVNfUHItPlNpU19JRl9ERUZfQ0g3MHh4ID0gMjsKKwlpZih0ZW1wID09IDQpCQkJU2lTX1ByLT5TaVNfSUZfREVGX0NPTkVYID0gMTsgIC8qIE5vdCB5ZXQgc3VwcG9ydGVkICovCisJYnJlYWs7CiAjZW5kaWYKICAgIGRlZmF1bHQ6Ci0gICAgICAgIGJyZWFrOworCWJyZWFrOwogICAgfQogfQogCkBAIC0xNDUxLDM1ICsxMjIxLDU1IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB2b2lkCi1TaVNfU2V0RW5hYmxlRHN0bihTaVNfUHJpdmF0ZSAqU2lTX1ByLCBpbnQgZW5hYmxlKQorU2lTX1NldEVuYWJsZURzdG4oc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIGludCBlbmFibGUpCiB7CiAgICBTaVNfUHItPlNpU19JRl9ERUZfRFNUTiA9IGVuYWJsZSA/IDEgOiAwOwogfQogCiB2b2lkCi1TaVNfU2V0RW5hYmxlRnN0bihTaVNfUHJpdmF0ZSAqU2lTX1ByLCBpbnQgZW5hYmxlKQorU2lTX1NldEVuYWJsZUZzdG4oc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIGludCBlbmFibGUpCiB7CiAgICBTaVNfUHItPlNpU19JRl9ERUZfRlNUTiA9IGVuYWJsZSA/IDEgOiAwOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICAgICBIRUxQRVI6IEdldCBtb2RlZmxhZyAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3Vuc2lnbmVkIHNob3J0CitTaVNfR2V0TW9kZUZsYWcoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IE1vZGVObywKKwkJdW5zaWduZWQgc2hvcnQgTW9kZUlkSW5kZXgpCit7CisgICBpZihTaVNfUHItPlVzZUN1c3RvbU1vZGUpIHsKKyAgICAgIHJldHVybiBTaVNfUHItPkNNb2RlRmxhZzsKKyAgIH0gZWxzZSBpZihNb2RlTm8gPD0gMHgxMykgeworICAgICAgcmV0dXJuIFNpU19Qci0+U2lTX1NNb2RlSURUYWJsZVtNb2RlSWRJbmRleF0uU3RfTW9kZUZsYWc7CisgICB9IGVsc2UgeworICAgICAgcmV0dXJuIFNpU19Qci0+U2lTX0VNb2RlSURUYWJsZVtNb2RlSWRJbmRleF0uRXh0X01vZGVGbGFnOworICAgfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgIEhFTFBFUjogRGV0ZXJtaW5lIFJPTSB1c2FnZSAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIEJPT0xFQU4KLVNpU0RldGVybWluZVJPTUxheW91dDY2MShTaVNfUHJpdmF0ZSAqU2lTX1ByLCBQU0lTX0hXX0lORk8gSHdJbmZvKQorU2lTRGV0ZXJtaW5lUk9NTGF5b3V0NjYxKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQogewotICAgVUNIQVIgICpST01BZGRyICA9IEh3SW5mby0+cGpWaXJ0dWFsUm9tQmFzZTsKLSAgIFVTSE9SVCByb212ZXJzb2Zmcywgcm9tdm1haiA9IDEsIHJvbXZtaW4gPSAwOworICAgdW5zaWduZWQgY2hhciAgKlJPTUFkZHIgID0gU2lTX1ByLT5WaXJ0dWFsUm9tQmFzZTsKKyAgIHVuc2lnbmVkIHNob3J0IHJvbXZlcnNvZmZzLCByb212bWFqID0gMSwgcm9tdm1pbiA9IDA7CiAKLSAgIGlmKEh3SW5mby0+akNoaXBUeXBlID49IFNJU183NjEpIHsKLSAgICAgIC8qIEkgdmVyeSBtdWNoIGFzc3VtZSA3NjEgYW5kIDM0MCB3aWxsIHVzZSBuZXcgbGF5b3V0ICovCisgICBpZihTaVNfUHItPkNoaXBUeXBlID49IFhHSV8yMCkgeworICAgICAgLyogWEdJIFJPTXMgZG9uJ3QgcXVhbGlmeSAqLworICAgICAgcmV0dXJuIEZBTFNFOworICAgfSBlbHNlIGlmKFNpU19Qci0+Q2hpcFR5cGUgPj0gU0lTXzc2MSkgeworICAgICAgLyogSSB2ZXJ5IG11Y2ggYXNzdW1lIDc2MSwgMzQwIGFuZCBuZXdlciB3aWxsIHVzZSBuZXcgbGF5b3V0ICovCiAgICAgICByZXR1cm4gVFJVRTsKLSAgIH0gZWxzZSBpZihId0luZm8tPmpDaGlwVHlwZSA+PSBTSVNfNjYxKSB7CisgICB9IGVsc2UgaWYoU2lTX1ByLT5DaGlwVHlwZSA+PSBTSVNfNjYxKSB7CiAgICAgICBpZigoUk9NQWRkclsweDFhXSA9PSAnTicpICYmCi0gICAgICAgICAoUk9NQWRkclsweDFiXSA9PSAnZScpICYmCi0gICAgICAgICAoUk9NQWRkclsweDFjXSA9PSAndycpICYmCi0gICAgICAgICAoUk9NQWRkclsweDFkXSA9PSAnVicpKSB7CisJIChST01BZGRyWzB4MWJdID09ICdlJykgJiYKKwkgKFJPTUFkZHJbMHgxY10gPT0gJ3cnKSAmJgorCSAoUk9NQWRkclsweDFkXSA9PSAnVicpKSB7CiAJIHJldHVybiBUUlVFOwogICAgICAgfQogICAgICAgcm9tdmVyc29mZnMgPSBST01BZGRyWzB4MTZdIHwgKFJPTUFkZHJbMHgxN10gPDwgOCk7CkBAIC0xNDk0LDkgKzEyODQsOSBAQAogICAgICAgfQogICAgfSBlbHNlIGlmKElTX1NJUzY1MDc0MCkgewogICAgICAgaWYoKFJPTUFkZHJbMHgxYV0gPT0gJ04nKSAmJgotICAgICAgICAgKFJPTUFkZHJbMHgxYl0gPT0gJ2UnKSAmJgotICAgICAgICAgKFJPTUFkZHJbMHgxY10gPT0gJ3cnKSAmJgotICAgICAgICAgKFJPTUFkZHJbMHgxZ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UluZGV4OwpAQCAtMTg2Niw3OSArMTY2MSwxMjUgQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgSEVMUEVSUzogR2V0IHNvbWUgaW5kaWNlcyAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit1bnNpZ25lZCBzaG9ydAorU2lTX0dldFJlZkNSVFZDTEsoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IEluZGV4LCBpbnQgVXNlV2lkZSkKK3sKKyAgIGlmKFNpU19Qci0+U2lTX1JlZkluZGV4W0luZGV4XS5FeHRfSW5mb0ZsYWcgJiBIYXZlV2lkZVRpbWluZykgeworICAgICAgaWYoVXNlV2lkZSA9PSAxKSB7CisgICAgICAgICByZXR1cm4gU2lTX1ByLT5TaVNfUmVmSW5kZXhbSW5kZXhdLkV4dF9DUlRWQ0xLX1dJREU7CisgICAgICB9IGVsc2UgeworICAgICAgICAgcmV0dXJuIFNpU19Qci0+U2lTX1JlZkluZGV4W0luZGV4XS5FeHRfQ1JUVkNMS19OT1JNOworICAgICAgfQorICAgfSBlbHNlIHsKKyAgICAgIHJldHVybiBTaVNfUHItPlNpU19SZWZJbmRleFtJbmRleF0uRXh0X0NSVFZDTEs7CisgICB9Cit9CisKK3Vuc2lnbmVkIHNob3J0CitTaVNfR2V0UmVmQ1JUMUNSVEMoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IEluZGV4LCBpbnQgVXNlV2lkZSkKK3sKKyAgIGlmKFNpU19Qci0+U2lTX1JlZkluZGV4W0luZGV4XS5FeHRfSW5mb0ZsYWcgJiBIYXZlV2lkZVRpbWluZykgeworICAgICAgaWYoVXNlV2lkZSA9PSAxKSB7CisgICAgICAgICByZXR1cm4gU2lTX1ByLT5TaVNfUmVmSW5kZXhbSW5kZXhdLkV4dF9DUlQxQ1JUQ19XSURFOworICAgICAgfSBlbHNlIHsKKyAgICAgICAgIHJldHVybiBTaVNfUHItPlNpU19SZWZJbmRleFtJbmRleF0uRXh0X0NSVDFDUlRDX05PUk07CisgICAgICB9CisgICB9IGVsc2UgeworICAgICAgcmV0dXJuIFNpU19Qci0+U2lTX1JlZkluZGV4W0luZGV4XS5FeHRfQ1JUMUNSVEM7CisgICB9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgICAgICAgICAgSEVMUEVSOiBMb3dNb2RlVGVzdHMgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIEJPT0xFQU4KLVNpU19Eb0xvd01vZGVUZXN0KFNpU19Qcml2YXRlICpTaVNfUHIsIFVTSE9SVCBNb2RlTm8sIFBTSVNfSFdfSU5GTyBId0luZm8pCitTaVNfRG9Mb3dNb2RlVGVzdChzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vKQogewotICAgIFVTSE9SVCB0ZW1wLHRlbXAxLHRlbXAyOworICAgdW5zaWduZWQgc2hvcnQgdGVtcCwgdGVtcDEsIHRlbXAyOwogCi0gICAgaWYoKE1vZGVObyAhPSAweDAzKSAmJiAoTW9kZU5vICE9IDB4MTApICYmIChNb2RlTm8gIT0gMHgxMikpCi0gICAgICAgcmV0dXJuKFRSVUUpOwotICAgIHRlbXAgPSBTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgxMSk7Ci0gICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzZDQsMHgxMSwweDgwKTsKLSAgICB0ZW1wMSA9IFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNkNCwweDAwKTsKLSAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgwMCwwe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TaVNfU2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgxMSx0ZW1wKTsKKyAgIGlmKChTaVNfUHItPkNoaXBUeXBlID49IFNJU18zMTVIKSB8fAorICAgICAgKFNpU19Qci0+Q2hpcFR5cGUgPT0gU0lTXzMwMCkpIHsKKyAgICAgIGlmKHRlbXAyID09IDB4NTUpIHJldHVybiBGQUxTRTsKKyAgICAgIGVsc2UgcmV0dXJuIFRSVUU7CisgICB9IGVsc2UgeworICAgICAgaWYodGVtcDIgIT0gMHg1NSkgcmV0dXJuIFRSVUU7CisgICAgICBlbHNlIHsKKwkgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzZDQsMHgzNSwweDAxKTsKKwkgcmV0dXJuIEZBTFNFOworICAgICAgfQorICAgfQogfQogCiBzdGF0aWMgdm9pZAotU2lTX1NldExvd01vZGVUZXN0KFNpU19Qcml2YXRlICpTaVNfUHIsIFVTSE9SVCBNb2RlTm8sIFBTSVNfSFdfSU5GTyBId0luZm8pCitTaVNfU2V0TG93TW9kZVRlc3Qoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IE1vZGVObykKIHsKLSAgICBpZihTaVNfRG9Mb3dNb2RlVGVzdChTaVNfUHIsIE1vZGVObywgSHdJbmZvKSkgewotICAgICAgIFNpU19Qci0+U2lTX1NldEZsYWcgfD0gTG93TW9kZVRlc3RzOwotICAgIH0KKyAgIGlmKFNpU19Eb0xvd01vZGVUZXN0KFNpU19QciwgTW9kZU5vKSkgeworICAgICAgU2lTX1ByLT5TaVNfU2V0RmxhZyB8PSBMb3dNb2RlVGVzdHM7CisgICB9CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgICAgIEhFTFBFUjogRU5BQkxFIENSVDEgICAgICAgICAgICAqLworLyogICAgICAgIEhFTFBFUjogT1BFTi9DTE9TRSBDUlQxIENSVEMgICAgICAgKi8K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RSZWdBTkRPUihTaVNfUHItPlNpU19QM2Q0LDB4NTYsMHhlNyx0ZW1wMik7CisgICB9CisjZW5kaWYKK30KKworc3RhdGljIHZvaWQKK1NpU19IYW5kbGVDUlQxKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQoreworICAgLyogRW5hYmxlIENSVDEgZ2F0aW5nICovCisgICBTaVNfU2V0UmVnQU5EKFNpU19Qci0+U2lTX1AzZDQsU2lTX1ByLT5TaVNfTXlDUjYzLDB4YmYpOwogI2lmIDAKLSAgaWYoIShTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzYzQsMHgxNSkgJiAweDAxKSkgewotICAgICBpZigoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MTUpICYgMHgwYSkgfHwKLSAgICAgICAgKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDE2KSAmIDB4MDEpKSB7Ci0gICAgICAgIFNpU19TZXRSZWdPUihTaVNfUHItPlNpU19QM2Q0LFNpU19Qci0+U2lTX015Q1I2MywweDQwKTsKLSAgICAgfQotICB9CisgICBpZighKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDE1KSAmIDB4MDEpKSB7CisgICAgICBpZigoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MTUpICYgMHgwYSkgfHwKKyAgICAgICAgIChTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzYzQsMHgxNikgJiAweDAxKSkgeworICAgICAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzZDQsU2lTX1ByLT5TaVNfTXlDUjYzLDB4NDApOworICAgICAgfQorICAgfQogI2VuZGlmCiB9CiAKQEAgLTE5NDYsNTcgKzE3ODcsNTQgQEAKIC8qICAgICAgICAgICBIRUxQRVI6IEdldENvbG9yRGVwdGggICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1VU0hP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1RWKSkgeworICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0SW5TbGF2ZU1vZGUpICAgIFNSZGF0YSB8PSAweDAxOworICAgICAgfSBlbHNlIGlmKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldENSVDJUb0xDREEpIFNSZGF0YSB8PSAweDAxOworCiAgICB9CiAKLSAgIGlmKFNpU19Qci0+U2lTX0lGX0RFRl9MVkRTID09IDEpIHsKLSAgICAgIGlmKFNpU19Qci0+U2lTX0lGX0RFRl9DSDcweHggIT0gMCkgewotICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvVFYpIHsKLSAgICAgICAgICAgIGlmKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldEluU2xhdmVNb2RlKSB7Ci0gICAgICAgICAgICAgICBTUmRhdGEgfD0gMHgwMTsgICAgICAgIAkJCS8qIDggZG90IGNsb2NrICAqLwotICAgICAgICAgICAgfQotICAgICAgICAgfQotICAgICAgfQotICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvTENEKSB7Ci0gICAgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRJblNsYXZlTW9kZSkgewotICAgICAgICAgICAgU1JkYXRhIHw9IDB4MDE7ICAgICAgICAgIAkJCS8qIDggZG90IGNsb2NrICAqLwotICAgICAgICAgfQotICAgICAgfQotICAgfQotCi0gICBTUmRhdGEgfD0gMHgyMDsgICAgICAgICAgICAgICAgCQkJLyogc2NyZWVuIG9mZiAgKi8KLQogICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MDEsU1JkYXRhKTsKIAogICAgZm9yKGkgPSAyOyBpIDw9IDQ7IGkrKykgewotICAgICAgU1JkYXRhID0gU2lTX1ByLT5TaVNfU3RhbmRUYWJsZVtTdGFuZFRhYmxlSW5kZXhdLlNSW2ktMV07CisgICAgICBTUmRhdGEgPSBTaVNfUHItP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SAgICAgIGlmKChpIDw9IDB4MGYpIHx8IChpID09IDB4MTEpKSB7Ci0gICAgICAgICBpZihkczo0ODkgJiAweDA4KSB7Ci0JICAgIGNvbnRpbnVlOwotICAgICAgICAgfQotICAgICAgfQotI2VuZGlmCisKICAgICAgIGlmKGkgPT0gMHgxMykgewotICAgICAgICAgLyogUGl4ZWwgc2hpZnQuIElmIHNjcmVlbiBvbiBMQ0Qgb3IgVFYgaXMgc2hpZnRlZCBsZWZ0IG9yIHJpZ2h0LAotICAgICAgICAgICogdGhpcyBtaWdodCBiZSB0aGUgY2F1c2UuCi0gICAgICAgICAgKi8KLSAgICAgICAgIGlmKFNpU19Qci0+U2lTX1ZCVHlwZSAmIFZCX1NJUzMwMUJMVjMwMkJMVikgewotICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvTENEQSkgIEFSZGF0YT0wOwotICAgICAgICAgfQotICAgICAgICAgaWYoU2lTX1ByLT5TaVNfSUZfREVGX0xWRFMgPT0gMSkgewotICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfSUZfREVGX0NINzB4eCAhPSAwKSB7Ci0gICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRDUlQyVG9UVikgewotICAgICAgICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0SW5TbGF2ZU1vZGUpIEFSZGF0YT0wOwotICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgfQotCSBpZihId0luZm8tPmpDaGlwVHlwZSA+PSBTSVNfNjYxKSB7CisJIC8qIFBpeGVsIHNoaWZ0LiBJZiBzY3JlZW4gb24gTENEIG9yIFRWIGlzIHNoaWZ0ZWQgbGVmdCBvciByaWdodCwKKwkgICogdGhpcyBtaWdodCBiZSB0aGUgY2F1c2UuCisJICAqLworCSBpZihTaVNfUHItPlNpU19WQlR5cGUgJiBWQl9TSVMzMHhCTFYpIHsKKwk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CSAgICAgICAgICB9IGVsc2UgewotCSAgICAgICAgICAgICBBUmRhdGEgPSAwOwotCSAgICAgICAgICB9CisJCSAgLyogMzE1LCAzMzAgZG9uJ3QgZG8gdGhpcyAqLworCQkgIGlmKFNpU19Qci0+U2lTX1ZCVHlwZSAmIFZCX1NJUzMweEIpIHsKKwkJICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRJblNsYXZlTW9kZSkgQVJkYXRhID0gMDsKKwkJICB9IGVsc2UgeworCQkgICAgIEFSZGF0YSA9IDA7CisJCSAgfQogCSAgICAgICB9CiAJICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRJblNsYXZlTW9kZSkgIEFSZGF0YT0wOworCSAgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRJblNsYXZlTW9kZSkgQVJkYXRhID0gMDsKIAkgICAgfQotICAgICAgICAgfQorCSB9CiAgICAgICB9Ci0gICAgICBTaVNfR2V0UmVnQnl0ZShTaVNfUHItPlNpU19QM2RhKTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmVzZXQgM2RhICAqLwotICAgICAgU2lTX1NldFJlZ0J5dGUoU2lTX1ByLT5TaVNfUDNjMCxpKTsgICAgICAgICAgICAgICAgICAgICAgIC8qIHNldCBpbmRleCAgKi8KLSAgICAgIFNpU19TZXRSZWdCeXRlKFNpU19Qci0+U2lTX1AzYzAsQVJkYXRhKTsgICAgICAgICAgICAgICAgICAvKiBzZXQgZGF0YSAgICovCisgICAgICBTaVNfR2V0UmVnQnl0ZShTaVNfUHItPlNpU19QM2RhKTsJCS8qIHJlc2V0IDNkYSAgKi8KKyAgICAgIFNpU19TZXRSZWdCeXRlKFNpU19Qci0+U2lTX1AzYzAsaSk7CS8qIHNldCBpbmRleCAgKi8KKyAgICAgIFNpU19TZXRSZWdCeXRlKFNpU19Qci0+U2lTX1AzYzAsQVJkYXRhKTsJLyogc2V0IGRhdGE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gMHgwZSkgewotCSAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDBlLDB4MjApOwotCX0KLSAgICAgfQotICB9CisgICBpZihTaVNfUHItPkNoaXBUeXBlID49IFNJU18zMTVIKSB7CisgICAgICBTaVNfU2V0UmVnQU5EKFNpU19Qci0+U2lTX1AzYzQsMHgzNywweEZFKTsKKyAgICAgIGlmKE1vZGVObyA8PSAweDEzKSB7CisJIGlmKE1vZGVObyA9PSAweDA2IHx8IE1vZGVObyA+PSAweDBlKSB7CisJICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDBlLDB4MjApOworCSB9CisgICAgICB9CisgICB9CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMjI4LDMyICsyMDM1LDI0IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgdm9pZAotU2lTX1Jlc2V0Q1JUMVZDTEsoU2lTX1ByaXZhdGUgKlNpU19QciwgUFNJU19IV19JTkZPIEh3SW5mbykKK1NpU19SZXNldENSVDFWQ0xLKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQogewotICAgaWYoSHdJbmZvLT5qQ2hpcFR5cGUgPj0gU0lTXzMxNUgpIHsKLSAgICAgIGlmKEh3SW5mby0+akNoaXBUeXBlIDwgU0lTXzY2MSkgewotICAgICAgICAgaWYoU2lTX1ByLT5TaVNfSUZfREVGX0xWRFMgPT0gMCkgcmV0dXJuOworICAgaWYoU2lTX1ByLT5DaGlwVHlwZSA+PSBTSVNfMzE1SCkgeworICAgICAgaWYoU2lTX1ByLT5DaGlwVHlwZSA8IFNJU182NjEpIHsKKwkgaWYoU2lTX1ByLT5TaVNfSUZfREVGX0xWRFMgPT0gMCkgcmV0dXJuOwogICAgICAgfQogICAgfSBlbHNlIHsKICAgICAgIGlmKChTaVNfUHItPlNpU19JRl9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KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMzU5LDMzICsyMTUzLDMyIEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBzdGF0aWMgdm9pZAotU2lTX1NldENSVDFPZmZzZXQoU2lTX1ByaXZhdGUgKlNpU19QciwgVVNIT1JUIE1vZGVObywgVVNIT1JUIE1vZGVJZEluZGV4LAotICAgICAgICAgICAgICAgICAgVVNIT1JUIFJlZnJlc2hSYXRlVGFibGVJbmRleCwKLQkJICBQU0lTX0hXX0lORk8gSHdJbmZvKQorU2lTX1NldENSVDFPZmZzZXQoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IE1vZGVObywKKwkJdW5zaWduZWQgc2hvcnQgTW9kZUlkSW5kZXgsIHVuc2lnbmVkIHNob3J0IFJSVEkpCiB7Ci0gICBVU0hPUlQgdGVtcCwgRGlzcGxheVVuaXQsIGluZm9mbGFnOworICAgdW5zaWduZWQgc2hvcnQgdGVtcCwgRGlzcGxheVVuaXQsIGluZm9mbGFnOwogCiAgICBpZihTaVNfUHItPlVzZUN1c3RvbU1vZGUpIHsKICAgICAgIGluZm9mbGFnID0gU2lTX1ByLT5DSW5mb0ZsYWc7CiAgICB9IGVsc2UgewotICAgICAgaW5mb2ZsYWcgPSBTaVNfUHItPlNpU19SZWZJbmRleFtSZWZyZXNoUmF0ZVRhYmxlSW5kZXhdLkV4dF9JbmZvRmxhZzsKKyAgICAgIGluZm9mbGFnID0gU2lTX1ByLT5TaVNfUmVmSW5kZXhbUlJUSV0uRXh0X0luZm9GbGFnOwogICAgfQogCi0gICBEaXNwbGF5VW5pdCA9IFNpU19HZXRPZmZzZXQoU2lTX1ByLE1vZGVObyxNb2RlSWRJbmRleCwKLSAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgUmVmcmVzaFJhdGVUYWJsZUluZGV4LEh3SW5mbyk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gICAgQiA9IFNpU19DYWxjRGVsYXkyKFNpU19QciwgRlFCUURhdGE3MzBbaV0sIEh3SW5mbykgKiBWQ0xLICogY29sb3J0aDsKLQkgIGJsID0gQiAvIChNQ0xLICogMTYpOworICAgICAgLyogR2V0IGhhbGYgY29sb3JkZXB0aCAqLworICAgICAgY29sb3J0aCA9IGNvbG9ydGhhcnJheVsoU2lTX1ByLT5TaVNfTW9kZVR5cGUgLSBNb2RlRUdBKV07CiAKLSAgICAgICAgICBpZihCID09IGJsICogMTYgKiBNQ0xLKSB7Ci0gICAgICAgICAgICAgYmwgPSBibCArIDE7Ci0gICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICBibCA9IGJsICsgMjsKLSAgICAgICAgICB9CisgICAgICBpZihTaVNfUHItPkNoaXBUeXBlID09IFNJU183MzApIHsKKwkgcXVldWVkYXRhID0gJkZRQlFEYXRhNzMwWzBdOworICAgICAgfSBlbHNlIHsKKwkgcXVldWVkYXRhID0gJkZRQlFEYXRhWzBdOworICAgICAgfQogCi0gICAgICAgICAgaWYoYmwgPiAweDEzKSB7Ci0gICAgICAgICAgICAgaWYoRlFCUURhdGE3MzBbaSsxXSA9PSAweEZGKSB7Ci0gICAgICAgICAgICAgICAgVGhyZXNob2xkTG93ID0gMHgxMzsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgaSsrOwotICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgVGhyZXNob2xkTG93ID0gYmw7Ci0gICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgfQotICAgICAgIH0gd2hpbGUoRlFCUURhdGE3MzBbaV0gIT0gMHhGRik7CisgICAgICBkbyB7CisJIHRlbXBsID0gU2lTX0NhbGNEZWxheTIoU2lTX1ByLCBxdWV1ZWRhdGFbaV0pICogVkNMSyAqIGNvbG9ydGg7CiAKLSAgICB9IGVsc2UgeworCSBkYXRhbCA9IHRlbXBsICUgTUNMSzE2OworCSB0ZW1wbCA9ICh0ZW1wbCAvIE1DTEsxNikgKyAxOworCSBpZihkYXRhbCkgdGVtcGwrKzsKIAotICAgICAgIGRvIHsKLSAgICAgICAgICBCID0gU2lTX0NhbGNEZWxheTIoU2lTX1ByLCBGUUJRRGF0YVtpXSwgSHdJbmZvKSAqIFZDTEsgKiBjb2xvcnRoOwotICAgICAgICAgIGJsID0gQiAvIChNQ0xLICogMTYpOworCSBpZih0ZW1wbCA+IDB4MTMpIHsKKwkgICAgaWYocXVldWVkYXRhW2kgKyAxXSA9PSAweEZGKSB7CisJICAgICAgIFRocmVzaG9sZExvdyA9IDB4MTM7CisJICAgICAgIGJyZWFrOworCSAgICB9CisJICAgIGkrKzsKKwkgfSBlbHNlIHsKKwkgICAgVGhyZXNob2xkTG93ID0gdGVtcGw7CisJICAgIGJyZWFrOworCSB9CisgICAgICB9IHdoaWxlKHF1ZXVlZGF0YVtpXSAhPSAweEZGKTsKIAotICAgICAgICAgIGlmKEIgPT0gYmwgKiAxNiAqIE1DTEspIHsKLSAgICAgICAgICAgICBibCA9IGJsICsgMTsKLSAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgIGJsID0gYmwgKyAyOwotICAgICAgICAgIH0KKyAgIH0gZWxzZSB7CiAKLSAgICAgICAgICBpZihibCA+IDB4MTMpIHsKLSAgICAgICAgICAgICBpZihGUUJRRGF0YVtpKzFdID09IDB4RkYpIHsKLSAgICAgICAgICAgICAgICBUaHJlc2hvbGRMb3cgPSAweDEzOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICBpKys7Ci0gICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICBUaHJlc2hvbGRMb3cgPSBibDsKLSAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICB9Ci0gICAgICAgfSB3aGlsZShGUUJRRGF0YVtpXSAhPSAweEZGKTsKLSAgICB9Ci0gIH0KLSAgZWxzZSB7Ci0gIC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49IDB4MTAxKSBkYXRhID0gMHgzYTsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4ZjUpICBkYXRhID0gMHgzMjsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4ZTIpICBkYXRhID0gMHgyYTsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4YzQpICBkYXRhID0gMHgyMjsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4YWMpICBkYXRhID0gMHgxYTsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4OWUpICBkYXRhID0gMHgxMjsKLQkgICAgICBlbHNlIGlmKGRhdGEyID49IDB4OGUpICBkYXRhID0gMHgwYTsKLQkgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICBkYXRhID0gMHgwMjsKLQkgICB9IGVsc2UgewotCSAgICAgIGlmKGRhdGEyID49IDB4MTI3KSAgICAgIGRhdGEgPSAweGJhOwotCSAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgIGRhdGEgPSAweDdhOwotCSAgIH0KLQl9IGVsc2UgeyAgLyogNzYwK0xGQiAqLwotCSAgIGlmICAgICAoZGF0YTIgPj0gMHgxOTApIGRhdGEgPSAweGJhOwotCSAgIGVsc2UgaWYoZGF0YTIgPj0gMHhmZikgIGRhdGEgPSAweDdhOwotCSAgIGVsc2UgaWYoZGF0YTIgPj0gMHhkMykgIGRhdGEgPSAweDNhOwotCSAgIGVsc2UgaWYoZGF0YTIgPj0gMHhhOSkgIGRhdGEgPSAweDFhOwotCSAgIGVsc2UgaWYoZGF0YTIgPj0gMHg5MykgIGRhdGEgPSAweDBhOwotCSAgIGVsc2UgICAgICAgICAgICAgICAgICAgIGRhdGEgPSAweDAyOwotCX0KLSAgICAgfQotICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1AzYzQsMHgxNyxkYXRhKTsKLSAgfSBlbHNlIGlmKEh3SW5mby0+akNoaXBUeXBlID09IFNJU18zNDApIHsKLSAgICAgLyogVE9ETyAqLwotICB9CisJIGlmKFNpU19Qci0+Q2hpcFR5cGUgPT0gU0lTXzMzMCkgeworCSAgICBpZihTaVNfUHItPlNpU19Nb2RlVHlwZSAhPSBNb2RlMTZCcHApIHsKKwkgICAgICAgaWYgICAgIChkYXRhMiA+PSAweDE5YykgZGF0YSA9IDB4YmE7CisJICAgICAgIGVsc2UgaWYoZGF0YTIgPj0gMHgxNDApIGRhdGEgPSAweDdhOworCSAgICAgICBlbHNlIGlmKGRhdGEyID49IDB4MTAxKSBkYXRhID0gMHgzYTsKKwkgICAgICAgZWxzZSBpZihkYXRhMiA+PSAweGY1KSAgZGF0YSA9IDB4MzI7CisJICAgICAgIGVsc2UgaWYoZGF0YTIgPj0gMHhlMikgIGRhdGEgPSAweDJhOworCSAgICAgICBlbHNlIGlmKGRhdGEyID49IDB4YzQpICBkYXRhID0gMHgyMjsKKwkgICAgICAgZWxzZSBpZihkYXRhMiA+PSAweGFjKSAgZGF0YSA9IDB4MWE7CisJICAgICAgIGVsc2UgaWYoZGF0YTIgPj0gMHg5ZSkgIGRhdGEgPSAweDEyOworCSAgICAgICBlbHNlIGlmKGRhdGEyID49IDB4OGUpICBkYXRhID0gMHgwYTsKKwkgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgZGF0YSA9IDB4MDI7CisJICAgIH0gZWxzZSB7CisJICAgICAgIGlmKGRhdGEyID49IDB4MTI3KSAgICAgIGRhdGEgPSAweGJhOworCSAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICBkYXRhID0gMHg3YTsKKwkgICAgfQorCSB9IGVsc2UgeyAgLyogNzZ4K0xGQiAqLworCSAgICBpZiAgICAgKGRhdGEyID49IDB4MTkwKSBkYXRhID0gMHhiYTsKKwkgICAgZWxzZSBpZihkYXRhMiA+PSAweGZmKSAgZGF0YSA9IDB4N2E7CisJICAgIGVsc2UgaWYoZGF0YTIgPj0gMHhkMykgIGRhdGEgPSAweDNhOworCSAgICBlbHNlIGlmKGRhdGEyID49IDB4YTkpICB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aVNfUDNjYykpOwkvKiBNSVNDICovCisgICBTaVNfU2V0UmVnKFAyXzNjNCwweDA1LDB4MDApOworI2VuZGlmCit9CisjZW5kaWYKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICAgICAgICAgICAgICAgICBMT0FEIERBQyAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0jaWYgMAogc3RhdGljIHZvaWQKLVNpU19DbGVhckRBQyhTaVNfUHJpdmF0ZSAqU2lTX1ByLCBVTE9ORyBwb3J0KQorU2lTX1dyaXRlREFDKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCBTSVNJT0FERFJFU1MgREFDRGF0YSwgdW5zaWduZWQgc2hvcnQgc2hpZnRmbGFnLAorICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGRsLCB1bnNpZ25lZCBzaG9ydCBhaCwgdW5zaWduZWQgc2hvcnQgYWwsIHVuc2lnbmVkIHNob3J0IGRoKQogewotICAgaW50IGk7CisgICB1bnNpZ25lZCBzaG9ydCBkMSwgZDIsIGQzOwogCi0gICBPdXRQb3J0Qnl0ZShwb3J0LCAwKTsKLSAgIHBvcnQrKzsKLSAgIGZvciAoaT0wOyBpIDwgKDI1NiAqIDMpOyBpKyspIHsKLSAgICAgIE91dFBvcnRCeXRlKHBvcnQsIDApOworICAgc3dpdGNoKGRsKSB7CisgICBjYXNlICAwOiBkMSA9IGRoOyBkMiA9IGFoOyBkMyA9IGFsOyBicmVhazsKKyAgIGNhc2UgIDE6IGQxID0gYWg7IGQyID0gYWw7IGQzID0gZGg7IGJyZWFrOworICAgZGVmYXVsdDogZDEgPSBhbDsgZDIgPSBkaDsgZDMgPSBhaDsKICAgIH0KLX0KLSNlbmRpZgotCi1zdGF0aWMgdm9pZAotU2lTX1dyaXRlREFDKFNpU19Qcml2YXRlICpTaVNfUHIsIFNJU0lPQ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b2RlIiBmb3IgdGV4dAorICAgICogd2hpY2ggbG9ja3MgQ1JUMiBpbiBzb21lIHdheSB0byBDUlQxIHRpbWluZy4gRGlzYWJsZQorICAgICogdGhpcyBoZXJlLgorICAgICovCisjaWZkZWYgU0lTMzE1SAorICAgaWYoKElTX1NJUzY1MSkgfHwgKElTX1NJU002NTApIHx8CisgICAgICBTaVNfUHItPkNoaXBUeXBlID09IFNJU18zNDAgfHwKKyAgICAgIFNpU19Qci0+Q2hpcFR5cGUgPT0gWEdJXzQwKSB7CiAgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1ZpZENhcHQsIDB4M2YsIDB4MDApOyAgIC8qIEZpZGRsZSB3aXRoIGNhcHR1cmUgcmVncyAqLwogICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19WaWRDYXB0LCAweDAwLCAweDAwKTsKICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfVmlkUGxheSwgMHgwMCwgMHg4Nik7ICAgLyogKEJJT1MgZG9lcyBOT1QgdW5sb2NrKSAqLwpAQCAtMzM2NSw0OSArMzE1MCw5OSBAQAogICAgICAgU2lTX1NldFJlZ0FORChTaVNfUHItPlNpU19WaWRQbGF5LCAweDNmLCAweGVmKTsKICAgIH0KICAgIC8qICEhISBUaGlzIGRvZXMgbm90IHN1cHBvcnQgbW9kZXMgPCAweDEzICEhISAqLworI2VuZGlmCiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgIFhGcmVlODY6IFNFVCBTQ1JFRU4gUElUQ0ggICAgICAgICAqLworLyogICAgIEhFTFBFUjogU0VUIEFHUCBUSU1JTkcgRk9SIFNpUzc2MCAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNpZmRlZiBMSU5VWF9YRjg2CiBzdGF0aWMgdm9pZAotU2lTX1NldFBpdGNoQ1JUMShTaVNfUHJpdmF0ZSAqU2lTX1ByLCBTY3JuSW5mb1B0ciBwU2NybikKK1NpU19IYW5kbGU3NjAoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIpCit7CisjaWZkZWYgU0lTMzE1SAorICAgdW5zaWduZWQgaW50IHNvbWViYXNlOworICAgdW5zaWduZWQgY2hhciB0ZW1wMSwgdGVtcDIsIHRlbXAzOworCisgICBpZiggKFNpU19Qci0+Q2hpcFR5cGUgIT0gU0lTXzc2MCkgICAgICAgICAgICAgICAgICAgICAgICAgfHwKKyAgICAgICAoKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNkNCwgMHg1YykgJiAweGY4KSAhPSAweDgwKSB8fAorICAgICAgICghKFNpU19Qci0+U2lTX1N5c0ZsYWdzICYgU0ZfNzYwTEZCKSkgICAgICAgICAgICAgICAgIHx8CisgICAgICAgKCEoU2lTX1ByLT5TaVNfU3lzRmxhZ3MgJiBTRl83NjBVTUEpKSApCisgICAgICByZXR1cm47CisKKyNpZmRlZiBTSVNfTElOVVhfS0VSTkVMCisgICBzb21lYmFzZSA9IHNpc2ZiX3JlYWRfbWlvX3BjaV93b3JkKFNpU19QciwgMHg3NCk7CisjZWxzZQorICAgc29tZWJhc2UgPSBwY2lSZWFkV29yZCgweDAwMDAxMDAwLCAweDc0KTsKKyNlbmRpZgorICAgc29tZWJhc2UgJj0gMHhmZmZmOworCisgICBpZihzb21lYmFzZSA9PSAwKSByZXR1cm47CisKKyAgIHRlbXAzID0gU2lTX0dldFJlZ0J5dGUoKHNvbWViYXNlICsgMHg4NSkpICYgMHhiNzsKKworICAgaWYoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MzEpICYgMHg0MCkgeworICAgICAgdGVtcDEgPSAweDIxOworICAgICAgdGVtcDIgPSAweDAzOworICAgICAgdGVtcDMgfD0gMHgwODsKKyAgIH0gZWxzZSB7CisgICAgICB0ZW1wMSA9IDB4MjU7CisgICAgICB0ZW1wMiA9IDB4MGI7C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gICAobW9kZS0+RmxhZ3MgJiBWX0RCTFNDQU4gPyBTaVNfUHItPkNWRGlzcGxheSAvIDIgOgogCQkgICAgICBTaVNfUHItPkNWRGlzcGxheSkpKTsKQEAgLTM2MzIsMzIgKzM0NzQsMzMgQEAKICAgIH0gZWxzZSB7CiAKICAgICAgIC8qIERvbid0IG5lZWQgdmJmbGFncyBoZXJlOyBjaGVja3MgZG9uZSBlYXJsaWVyICovCi0gICAgICBNb2RlTm8gPSBTaVNfR2V0TW9kZU51bWJlcihwU2NybiwgbW9kZSwgMCk7CisgICAgICBNb2RlTm8gPSBTaVNfR2V0TW9kZU51bWJlcihwU2NybiwgbW9kZSwgcFNpUy0+VkJGbGFncyk7CiAgICAgICBpZighTW9kZU5vKSByZXR1cm4gRkFMU0U7CiAKICAgICAgIHhmODZEcnZNc2dWZXJiKHBTY3JuLT5zY3JuSW5kZXgsIFhfSU5GTywgMywgIlNldHRpbmcgc3RhbmRhcmQgbW9kZSAweCV4XG4iLCBNb2RlTm8pOwogCiAgICB9CiAKLSAgIHJldHVybihTaVNTZXRNb2RlKFNpU19QciwgSHdJbmZvLCBwU2NybiwgTW9kZU5vLCBUUlVFKSk7CisgICByZXR1cm4oU2lTU2V0TW9kZShTaVNfUHIsIHBTY3JuLCBNb2RlTm8sIFRSVUUpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgIFhGcmVlODY6IFNpU0JJT1NTZXRNb2RlQ1JUMigpICAgICAgICovCisvKiAgICBYLm9yZy9YRnJlZTg2OiBTaVNCSU9TU2V0TW9kZUNSVDIoKSAgICAqLwogLyogICAgICAgICAgIGZvciBEdWFsLUhlYWQgbW9kZXMgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKIEJPT0xFQU4KLVNpU0JJT1NTZXRNb2RlQ1JUMihTaVNfUHJpdmF0ZSAqU2lTX1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WdBTkQoU2lTX1ByLT5TaVNfUDNkNCwweDM1LDB4RkUpOwpAQCAtMzgwMyw4ICszNjQ3LDggQEAKIAkgaWYoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MzApICYgU2V0Q1JUMlRvTENEKSB7CiAJICAgIFNpU19TZXRSZWdBTkQoU2lTX1ByLT5TaVNfUDNkNCwweDM4LDB4ZmMpOwogCSB9Ci0gICAgICB9IGVsc2UgaWYoKEh3SW5mby0+akNoaXBUeXBlID09IFNJU182MzApIHx8Ci0gICAgICAgICAgICAgICAgKEh3SW5mby0+akNoaXBUeXBlID09IFNJU183MzApKSB7CisgICAgICB9IGVsc2UgaWYoKFNpU19Qci0+Q2hpcFR5cGUgPT0gU0lTXzYzMCkgfHwKKwkgICAgICAgIChTaVNfUHItPkNoaXBUeXBlID09IFNJU183MzApKSB7CiAgICAgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgzNSxiYWNrdXByZWcpOwogICAgICAgfQogICAgfQpAQCAtMzgxMiwyNSArMzY1NiwyNyBAQAogICAgLyogU2V0UGl0Y2g6IEFkYXB0IHRvIHZpcnR1YWwgc2l6ZSAmIHBvc2l0aW9uICovCiAgICBTaVNfU2V0UGl0Y2hDUlQyKFNpU19QciwgcFNjcm4pOwogCisgICBTaVNfSGFuZGxlNzYwKFNpU19Qcik7CisKICAgIHJldHVybiBUUlVFOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgWEZyZWU4NjogU2lTQklPU1NldE1vZGVDUlQxKCkgICAgICAgKi8KKy8qICAgIFgub3JnL1hGcmVlODY6IFNpU0JJT1NTZXRNb2RlQ1JUMSgpICAgICovCiAvKiAgICAgICAgICAgZm9yIER1YWwtSGVhZCBtb2RlcyAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogQk9PTEVBTgotU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Gxhc21hVGFibGVbaV0ubW9kZW51bTsgaysrKSB7Ci0KLQkgICAgICAgICAgaWYoaXNmb3JkdmkpIHsKLQkJICAgICBpZighKFNpU19QbGFzbWFUYWJsZVtpXS5wbGFzbWFtb2Rlc1trXSAmIDB4ODApKSBjb250aW51ZTsKLQkJICB9IGVsc2UgewotCQkgICAgIGlmKCEoU2lTX1BsYXNtYVRhYmxlW2ldLnBsYXNtYW1vZGVzW2tdICYgMHg0MCkpIGNvbnRpbnVlOwotCQkgIH0KLQotCQkgIGwgPSBTaVNfUGxhc21hVGFibGVbaV0ucGxhc21hbW9kZXNba10gJiAweDNmOwotCi0JCSAgaWYocFNpUy0+VkJGbGFncyAmIChWQl8zMDF8VkJfMzAxQnxWQl8zMDJCfFZCXzMwMUxWKSkgewotCQkgICAgIGlmKGlzZm9yZHZpKSB7Ci0JCSAgICAgICAgaWYoU2lTX1BsYXNtYU1vZGVbbF0uVkRpc3BsYXkgPiAxMDI0KSBjb250aW51ZTsKLQkJICAgICB9Ci0JCSAgfQotCi0JICAgICAgICAgIGlmKCEobmV3ID0geGFsbG9jKHNpemVvZihEaXNwbGF5TW9kZVJlYykpKSkgcmV0dXJuIGZpcnN0OwotCi0gICAgICAgICAgICAgICAgICBtZW1zZXQobmV3LCAwLCBzaXplb2YoRGlzcGxheU1vZGVSZWMpKTsKLSAgICAgICAgICAgICAgICAgIGlmKCEobmV3LT5uYW1lID0geGFsbG9jKDEyKSkpIHsKLSAgICAgIAkJICAgICB4ZnJlZShuZXcpOwotCQkgICAgIHJldHVybiBmaXJzdDsKLSAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgIGlmKCFmaXJzdCkgZmlyc3QgPSBuZXc7Ci0gICAgICAgICAgICAgICAgICBpZihjdXJyZW50KSB7Ci0gICAgICAgICAgICAgICAgICAgICBjdXJyZW50LT5uZXh0ID0gbmV3OwotCSAgICAgICAgICAgICBuZXctPnByZXYgPSBjdXJyZW50OwotICAgICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgICBjdXJyZW50ID0gbmV3OwotCi0JCSAgcFNpUy0+QWRkZWRQbGFzbWFNb2RlcyA9IFRSVUU7Ci0KLQkJICBzdHJjcHkoY3VycmVudC0+bmFtZSwgU2lTX1BsYXNtYU1vZGVbbF0ubmFtZSk7Ci0JICAgICAgICAgIC8qIHNwcmludGYoY3VycmVudC0+bmFtZSwgIiVkeCVkIiwgU2lTX1BsYXNtYU1vZGVbbF0uSERpc3BsYXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpU19QbGFzbWFNb2RlW2xdLlZEaXNwbGF5KTsgKi8KLQotICAgICAgICAgICAgICAgICAgY3VycmVudC0+c3RhdHVzID0gTU9ERV9PSzsKLQotICAgICAgICAgICAgICAgICAgY3VycmVudC0+dHlwZSA9IE1fVF9CVUlMVElOOwotCi0JCSAgY3VycmVudC0+Q2xvY2sgPSBTaVNfUGxhc21hTW9kZVtsXS5jbG9jazsKLSAgICAgICAgICAgIAkgIGN1cnJlbnQtPlN5bnRoQ2xvY2sgPSBjdXJyZW50LT5DbG9jazsKLQotICAgICAgICAgICAgICAgICAgY3VycmVudC0+SERpc3BsYXkgICA9IFNpU19QbGFzbWFNb2RlW2xdLkhEaXNwbGF5OwotICAgICAgICAgICAgICAgICAgY3VycmVudC0+SFN5bmNTdGFydCA9IGN1cnJlbnQtPkhEaXNwbGF5ICsgU2lTX1BsYXNtYU1vZGVbbF0uSEZyb250UG9yY2g7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5IU3luY0VuZCAgID0gY3VycmVudC0+SFN5bmNTdGFydCArIFNpU19QbGFzbWFNb2RlW2xdLkhTeW5jV2lkdGg7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5IVG90YWwgICAgID0gU2lTX1BsYXNtYU1vZGVbbF0uSFRvdGFsOwotCi0JCSAgY3VycmVudC0+VkRpc3BsYXkgICA9IFNpU19QbGFzbWFNb2RlW2xdLlZEaXNwbGF5OwotICAgICAgICAgICAgICAgICAgY3VycmVudC0+VlN5bmNTdGFydCA9IGN1cnJlbnQtPlZEaXNwbGF5ICsgU2lTX1BsYXNtYU1vZGVbbF0uVkZyb250UG9yY2g7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5WU3luY0VuZCAgID0gY3VycmVudC0+VlN5bmNTdGFydCArIFNpU19QbGFzbWFNb2RlW2xdLlZTeW5jV2lkdGg7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5WVG90YWwgICAgID0gU2lTX1BsYXNtYU1vZGVbbF0uVlRvdGFsOwotCi0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5DcnRjSERpc3BsYXkgPSBjdXJyZW50LT5IRGlzcGxheTsKLSAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPkNydGNIQmxhbmtTdGFydCA9IGN1cnJlbnQtPkhTeW5jU3RhcnQ7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5DcnRjSFN5bmNTdGFydCA9IGN1cnJlbnQtPkhTeW5jU3RhcnQ7Ci0gICAgICAgICAgICAgICAgICBjdXJyZW50LT5DcnRjSFN5bmNFbmQgPSBjdXJyZW50LT5IU3luY0VuZDsKLSAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPkNydGNIQmxhbmtFbmQgPSBjdXJyZW50LT5IU3luY0VuZDsKLSAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPkNydGNIVG90YWwgPSBjdXJyZW50LT5IVG90YWw7Ci0KLSAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPkNydGNWRGlzcGxheSA9IGN1cnJlbnQtPlZEaXNwbGF5OwotICAgICAgICAgICAgICAgICAgY3VycmVudC0+Q3J0Y1ZCbGFua1N0YXJ0ID0gY3VycmVudC0+VlN5bmNTdGFydDsKLSAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPkNydGNWU3luY1N0YXJ0ID0gY3VycmVudC0+VlN5bmNTdGFydDsKL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QUk9CRUQsCi0JCSAgCSJcdEFkZGluZyBcIiVzXCIgdG8gbGlzdCBvZiBidWlsdC1pbiBtb2Rlc1xuIiwgY3VycmVudC0+bmFtZSk7Ci0KLSAgICAgICAgICAgICAgIH0KLQkgICAgICAgZG9uZSA9IFRSVUU7Ci0JICAgICAgIGJyZWFrOwotCSAgICB9Ci0JfQotICAgICB9Ci0KLSAgICAgaSsrOwotCi0gICB9Ci0KLSAgIGlmKHBTaVMtPlNpU19Qci0+Q1BfSGF2ZUN1c3RvbURhdGEpIHsKLQotICAgICAgZm9yKGk9MDsgaTw3OyBpKyspIHsKLQotICAgICAgICAgaWYocFNpUy0+U2lTX1ByLT5DUF9EYXRhVmFsaWRbaV0pIHsKLQotICAgICAgICAgICAgaWYoIShuZXcgPSB4YWxsb2Moc2l6ZW9mKERpc3BsYXlNb2RlUmVjKSkpKSByZXR1cm4gZmlyc3Q7Ci0KLSAgICAgICAgICAgIG1lbXNldChuZXcsIDAsIHNpemVvZihEaXNwbGF5TW9kZVJlYykpOwotICAgICAgICAgICAgaWYoIShuZXctPm5hbWUgPSB4YWxsb2MoMTApKSkgewotICAgICAgCQl4ZnJlZShuZXcpOwotCQlyZXR1cm4gZmlyc3Q7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBpZighZmlyc3QpIGZpcnN0ID0gbmV3OwotICAgICAgICAgICAgaWYoY3VycmVudCkgewotICAgICAgICAgICAgICAgY3VycmVudC0+bmV4dCA9IG5ldzsKLQkgICAgICAgbmV3LT5wcmV2ID0gY3VycmVudDsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgY3VycmVudCA9IG5ldzsKLQotICAgICAgICAgICAgc3ByaW50ZihjdXJyZW50LT5uYW1lLCAiJWR4JWQiLCBwU2lTLT5TaVNfUHItPkNQX0hEaXNwbGF5W2ldLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwU2lTLT5TaVNfUHItPkNQX1ZEaXNwbGF5W2ldK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AwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICAgfQotICAgfSwKLSAgIHsgMHgzOGEzLCAxLAotICAgICB7IDB4MDAwMCwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCwgMHgwMDAwIH0sCi0gICAgIHsgIiIsICIiLCAiIiwgIiIsICIiIH0sCi0gICAgICJORUMgUGxhc21hU3luYyA0MjAwVyIsCi0gICAgIDQsICAgLyogRFZJIGVudGlyZWx5IHVua25vd24gKi8KLSAgICAgeyAwfDB4NDAsIDF8MHhjMCwgMnwweGMwLCA0fDB4YzAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsCi0gICAgICAgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgICB9Ci0gICB9LAotICAgeyAweDM4YTMsIDEsCi0gICAgIHsgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCwgMHgwMDAwLCAweDAwMDAgfSwKLSAgICAgeyAiIiwgIiIsICIiLCAiIiwgIiIgfSwKLSAgICAgIk5FQyBQbGFzbWFTeW5jIDQyMTBXIiwKLSAgICAgMCwgMCwKLSAgICAgMCwgMCwKLSAgICAgNiwgICAvKiBEVkkgZW50aXJlbHkgdW5rbm93biAqLwotICAgICB7IDB8MHg0MCwgMXwweGMwLCAyfDB4YzAsIDR8MHhjMCwgOXwweGMwLDExfDB4YzAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwKLSAgICAgICAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAgIH0KLSAgIH0sCi0gICB7IDB4MzhhMywgMSwKLSAgICAgeyAweDAwMDAsIDB4MDAwMCwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCB9LAotICAgICB7ICIiLCAiIiwgIiIsICIiLCAiIiB9LAotICAgICAiTkVDIFBsYXNtYVN5bmMgNTAwMFciLAotICAgICAwLCAwLAotICAgICAwLCAwLAotICAgICA3LCAgIC8qIERWSSBlbnRpcmVseSB1bmtub3duICovCi0gICAgIHsgMHwweDQwLCAxfDB4YzAsIDJ8MHhjMCwgNHwweGMwLCA3fDB4NDAsIDl8MHhjMCwxMXwweGMwLCAwICAgICAsIDAgICAgICwgMCAgICAgLAotICAgICAgIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICAgfQotICAgfSwKLSNlbmRpZgotICAgeyAweDQxMmYsIDIsCi0gICAgIHsgMHgwMDBjLCAweDAwMGIsIDB4MDAwMCwgMHgwMDAwLCAweDAwMDAgfSwKLSAgICAgeyAiIiwgIiIsICIiLCAiIiwgIiIgfSwKLSAgICAgIlBpb25lZXIgNTAzQ01YL1BEQS01MDAyIiwKLSAgICAgMCwgMCwKLSAgICAgMCwgMCwKLSAgICAgNiwgICAvKiBEVkkgdW5rbm93biAqLwotICAgICB7IDF8MHhjMCwgMnwweGMwLCA5fDB4YzAsMTF8MHhjMCwxMnwweGMwLDE1fDB4YzAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwKLSAgICAgICAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAgIH0KLSAgIH0sCi0gICB7IDB4MzRhOSwgMSwKLSAgICAgeyAweGEwMGUsIDB4MDAwMCwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCB9LAotICAgICB7ICIiLCAiIiwgIiIsICIiLCAiIiB9LAotICAgICAiUGFuYXNvbmljIFRILTQyIiwKLSAgICAgMCwgMCwKLSAgICAgMCwgMCwKLSAgICAgNSwgICAvKiBObyBEVkkgb3V0cHV0ICovCi0gICAgIHsgMXwweDQwLCAyfDB4NDAsIDR8MHg0MCwgOXwweDQwLDE1fDB4NDAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLAotICAgICAgIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICAgfQotICAgfSwKLSAgIHsgMHgzNGE5LCAxLAotICAgICB7IDB4YTAwNSwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCwgMHgwMDAwIH0sCi0gICAgIHsgIlRILTQyUFcqNCIsICIiLCAiIiwgIiIsICIiIH0sCi0gICAgICJQYW5hc29uaWMgVEgtNDJQVzUiLAotICAgICAwLCAwLAotICAgICAwLCAwLAotICAgICAxLCAgIC8qIE5vIHNwZWNpYWwgbW9kZXMgb3RoZXJ3aXNlOyBubyBEVkkuICovCi0gICAgIHsyMHwweDQwLDE5fDB4NDAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLAotICAgICAgIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICAgfQotICAgfSwKLSAgIHsgMHg0YzJlLCAxLAotICAgICB7IDB4OWIwNSwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCwgMHgwMDAwIH0sCi0gICAgIHsgIlBMVi1aMiIsICIiLCAiIiwgIiIsICIiIH0sCi0gICAgICJTYW55byBQTFYtWjIgKG5vbiBIRENQLW1vZGUpIiwgCS8qIEhEQ1AgbW9kZSB3b3VsZCBiZSBpZCA5YjA2LCBidXQgbm90IG5lZWRlZCAqLwotICAgICAxMjgwLCA3NjgsCQkJCS8qIGFzIGl0IHRoZW4gYWR2ZXJ0aXNlcyBjb3JyZWN0IHNpemUgKi8KLSAgICAgMTI4MCwgNzIwLAotICAgICAxLCAgIC8qIDEyODB4NzIwLCBubyBzcGVjaWFsIG1vZGVzIG90aGVyd2lzZSAqLwotICAgICB7MjF8MHhjMCwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwKLSAgICAgICAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAgIH0KLSAgIH0sCi0gICB7IDB4MzRhOSwgMSwKLSAgICAgeyAweGQwMzQsIDB4MDAwMCwgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCB9LAotICAgICB7ICJBRTUwMFUgKERWSS1EKSIsICIiLCAiIiwgIiIsICIiIH0sCi0gICAgICJQYW5hc29uaWMgQUU1MDBVIiwKLSAgICAgMTI4MCwgNzY4LAotICAgICAxMjgwLCA3MjAsCi0gICAgIDEsICAgLyogMTI4MHg3MjAsIG5vIHNwZWNpYWwgbW9kZXMgb3RoZXJ3aXNlICovCi0gICAgIHsyMXwweGMwLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLAotICAgICAgIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICwgMCAgICAgLCAwICAgICAsIDAgICAgICAgfQotICAgfSwKLSAgIHsgMHgzNGE5LCAxLAotICAgICB7IDB4ZDA0MywgMHgwMDAwLCAweDAwMDAsIDB4MDAwMCwgMHgwMDAwIH0sCi0gICAgIHsgIkFFNzAwVSAoSERNSSkiLCAiIiwgIiIsICIiLCAiIiB9LAotICAgICAiUGFuYXNvbmljIEFFNzAwVSIsCi0gICAgIDEzNjAsIDc2OCwKLSAgICAgMTI4MCwgNzIwLAotICAgICA2LCAgIC8qIDEyODB4NzIwLzYwLCAxMjgweDcyMC81MCwgMTI4MHg3NjhANTY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SCkgeworICAgICAgaWYoIShTaVNfUHItPlNpU19WQkluZm8gJiBEcml2ZXJNb2RlKSkgeworCSBpZiggKFNpU19Qci0+U2lTX0VNb2RlSURUYWJsZVtNb2RlSWRJbmRleF0uRXh0X1ZFU0FJRCA9PSAweDEwNSkgfHwKKwkgICAgIChTaVNfUHItPlNpU19FTW9kZUlEVGFibGVbTW9kZUlkSW5kZXhdLkV4dF9WRVNBSUQgPT0gMHgxMDcpICkgeworCSAgICBpZihiYWNrdXBpbmRleCA8PSAxKSBSUlRJKys7CisJIH0KKyAgICAgIH0KKyAgIH0KIAotICBpID0gMDsKLSAgZG8gewotICAgICBpZihTaVNfUHItPlNpU19SZWZJbmRleFtSUlRJICsgaV0uTW9kZUlEICE9IE1vZGVObykgYnJlYWs7Ci0gICAgIHRlbXAgPSBTaVNfUHItPlNpU19SZWZJbmRleFtSUlRJICsgaV0uRXh0X0luZm9GbGFnOwotICAgICB0ZW1wICY9IE1vZGVUeXBlTWFzazsKLSAgICAgaWYodGVtcCA8IFNpU19Qci0+U2lTX01vZGVUeXBlKSBicmVhazsKLSAgICAgaSsrOwotICAgICBpbmRleC0tOwotICB9IHdoaWxlKGluZGV4ICE9IDB4RkZGRik7CisgICBpID0gMDsKKyAgIGRvIHsKKyAgICAgIGlmKFNpU19Qci0+U2lTX1JlZkluZGV4W1JSVEkgKyBpXS5Nb2RlSUQgIT0gTW9kZU5vKSBicmVhazsKKyAgICAgIHRlbXAgPSBTaVNfUHItPlNpU19SZWZJbmRleFtSUlRJICsgaV0uRXh0X0luZm9GbGFnOworICAgICAgdGVtcCAmPSBNb2RlVHlwZU1hc2s7CisgICAgICBpZih0ZW1wIDwgU2lTX1ByLT5TaVNfTW9kZVR5cGUpIGJyZWFrOworICAgICAgaSsrOworICAgICAgaW5kZXgtLTsKKyAgIH0gd2hpbGUoaW5kZXggIT0gMHhGRkZGKTsKIAotICBpZighKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldENSVDJUb1JBTURBQykp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wZikgPT0gMSkpICB7Ci0gICAgICAgICBEZWxheSA9IDM7CisJIERlbGF5ID0gMzsKICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICBpZihEZWxheVRpbWUgPj0gMikgRGVsYXlUaW1lIC09IDI7Ci0gICAgICAgICBpZighKERlbGF5VGltZSAmIDB4MDEpKSB7Ci0gICAgICAgCSAgICBEZWxheSA9IFNpU19Qci0+U2lTX1BhbmVsRGVsYXlUYmxbRGVsYXlJbmRleF0udGltZXJbMF07Ci0gICAgICAgICB9IGVsc2UgewotICAgICAgIAkgICAgRGVsYXkgPSBTaVNfUHItPlNpU19QYW5lbERlbGF5VGJsW0RlbGF5SW5kZXhdLnRpbWVyWzFdOwotICAgICAgICAgfQorCSBpZihEZWxheVRpbWUgPj0gMikgRGVsYXlUaW1lIC09IDI7CisJIGlmKCEoRGVsYXlUaW1lICYgMHgwMSkpIHsKKwkgICAgRGVsYXkgPSBTaVNfUHItPlNpU19QYW5lbERlbGF5VGJsW0RlbGF5SW5kZXhdLnRpbWVyWzBdOworCSB9IGVsc2UgeworCSAgICBEZWxheSA9IFNpU19Qci0+U2lTX1BhbmVsRGVsYXlUYmxbRGVsYXlJbmRleF0udGltZXJbMV07CisJIH0KIAkgaWYoU2lTX1ByLT5TaVNfVXNlUk9NKSB7Ci0gICAgICAgICAgICBpZihST01BZGRyWzB4MjIwXSAmIDB4NDApIHsKLSAgICAgICAgICAgICAgIGlmKCEoRGVsYXlUaW1lICYgMHgwMSkpIERlbGF5ID0gKFVTSE9SVClST01BZGRyWzB4MjI1XTsKLSAgICAgICAgICAgICAgIGVsc2UgCSAgICAJICAgICAgIERlbGF5ID0gKFVTSE9SVClST01BZGRyWzB4MjI2XTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgIH0KKwkgICAgaWYoUk9NQWRkclsweDIyMF0gJiAweDQwKSB7CisJICAgICAgIGlmKCEoRGVsYXlUaW1lICYgMHgwMSkpIERlbGF5ID0gKHVuc2lnbmVkIHNob3J0KVJ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UID09IENVVF9DTEVWTzE0MDApICovICkgewkJCS8qIDMxNSBzZXJpZXMsIExWRFM7IFNwZWNpYWwgKi8KIAotICAgICAgICAgaWYoU2lTX1ByLT5TaVNfSUZfREVGX0NINzB4eCA9PSAwKSB7Ci0gICAgICAgICAgICBQYW5lbElEID0gU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MzYpOworCSBpZihTaVNfUHItPlNpU19JRl9ERUZfQ0g3MHh4ID09IDApIHsKKwkgICAgUGFuZWxJRCA9IFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNkNCwweDM2KTsKIAkgICAgaWYoU2lTX1ByLT5TaVNfQ3VzdG9tVCA9PSBDVVRfQ0xFVk8xNDAwKSB7CiAJICAgICAgIGlmKCEoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MWIpICYgMHgxMCkpIFBhbmVsSUQgPSAweDEyOwogCSAgICB9CkBAIC01NDYsMzUgKzU0OCwzNSBAQAogCSAgICAgICBEZWxheUluZGV4ID0gUGFuZWxJRCA+PiA0OwogCSAgICB9CiAJICAgIGlmKChEZWxheVRpbWUgPj0gMikgJiYgKChQYW5lbElEICYgMHgwZikgPT0gMSkpICB7Ci0gICAgICAgICAgICAgICBEZWxheSA9IDM7Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgaWYoRGVsYXlUaW1lID49IDIpIERlbGF5VGltZSAtPSAyOwotICAgICAgICAgICAgICAgaWYoIShEZWxheVRpbWUgJiAweDAxKSkgewotICAgICAgIAkJICBEZWxheSA9IFNpU19Qci0+U2lTX1BhbmVsRGVsYXlUYmxMVkRTW0RlbGF5SW5kZXhdLnRpbWVyWzBdOwotICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAJCSAgRGVsYXkgPSBTaVNfUHItPlNpU19QYW5lbERlbGF5VGJsTFZEU1tEZWxheUluZGV4XS50aW1lclsxXTsKLSAgICAgICAgICAgICAgIH0KKwkgICAgICAgRGVsYXkgPSAzOworCSAgICB9IGVsc2UgeworCSAgICAgICBpZihEZWxheVRpbWUgPj0gMikgRGVsYXlUaW1lIC09IDI7CisJICAgICAgIGlmKCEoRGVsYXlUaW1lICYgMHgwMSkpIHsKKwkJICBEZWxheSA9IFNpU19Qci0+U2lTX1BhbmVsRGVsYXlUYmxMVkRTW0RlbGF5SW5kZXhdLnRpbWVyWzBdOworCQl9IGVsc2UgeworCQkgIERlbGF5ID0gU2lTX1ByLT5TaVNfUGFuZWxEZWxheVRibExWRFNbRGVsYXlJbmRleF0udGltZXJbMV07CisJICAgICAgIH0KIAkgICAgICAgaWYoKFNpU19Qci0+U2lTX1VzZVJPTSkgJiYgKCEoU2lTX1ByLT5TaVNfUk9NTmV3KSkpIHsKLSAgICAgICAgICAgICAgICAgIGlmKFJPTUFkZHJbMHgxM2NdICYgMHg0MCkgewotICAgICAgICAgICAgICAgICAgICAgaWYoIShEZWxheVRpbWUgJiAweDAxKSkgewotCSAgICAJICAgICAgICBEZWxheSA9IChVU0hPUlQpUk9NQWRkclsweDE3ZV07Ci0gICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewotCSAgICAJICAgICAgICBEZWxheSA9IChVU0hPUlQpUk9NQWRkclsweDE3Zl07Ci0gICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9CisJCSAgaWYoUk9NQWRkclsweDEzY10gJiAweDQwKSB7CisJCSAgICAgaWYoIShEZWxheVRpbWUgJiAweDAxKSkgeworCQkJRGVsYXkgPSAodW5zaWduZWQgc2hvcnQpUk9NQWRkclsweDE3ZV07CisJCSAgICAgfSBlbHNlIHsKKwkJCURlbGF5ID0gKHVuc2lnbmVkIHNob3J0KVJPTUFkZHJbMHgxN2ZdOworCQkgICAgIH0KKwkJICB9CisJICAgICAgIH0KKwkgICAgfQogCSAgICBTaVNfU2hvcnREZWxheShTaVNfUHIsIERlbGF5KTsKIAkgfQ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DSDcweHggPT0gMikgewotCSAgIHRlbXAgPSBTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgzOCk7Ci0gICAgIAkgICBpZihTaVNfUHItPlNpU19UVk1vZGUgJiBUVlNldFBBTCkgewotICAgICAgICAgICAgICBpZih0ZW1wICYgRW5hYmxlUEFMTSkgICAgICBTaVNfUHItPlNpU19UVk1vZGUgfD0gVFZTZXRQQUxNOwotCSAgICAgIGVsc2UgaWYodGVtcCAmIEVuYWJsZVBBTE4pIFNpU19Qci0+U2lTX1RWTW9kZSB8PSBUVlNldFBBTE47Ci0gICAgICAgICAgIH0gZWxzZSB7Ci0JICAgICAgaWYodGVtcCAmIEVuYWJsZU5UU0NKKSB7Ci0JICAgICAgICAgU2lTX1ByLT5TaVNfVFZNb2RlIHw9IFRWU2V0TlRTQ0o7Ci0gIAkgICAgICB9Ci0JICAgfQotCX0KLSAgICAgfQorICAgICAgaWYoU2lTX1ByLT5TaVNfVkJUeXBlICYgVkJfU0lTVkIpIHsKKwkgdGVtcCA9IDA7CisJIGlmKChTaVNfUHItPkNoaXBUeXBlID09IFNJU182MzApIHx8CisJICAgIChTaVNfUHItPkNoaXBUeXBlID09IFNJU183MzApKSB7CisJICAgIHRlbXAgPSAweDM1OworCSAgICByb21pbmRleCA9IDB4ZmU7CisJIH0gZWxzZSBpZihTaVNfUHItPkNoaXBUeXBlID49IFNJU18zMTVIKSB7CisJICAgIHRlbXAgPSAweDM4OworCSAgICBpZihTaVNfUHItPkNoaXBUeXBlIDwgWEdJXzIwKSB7CisJICAgICAgIHJvbWluZGV4ID0gMHhmMzsKKwkgICAgICAgaWYoU2lTX1ByLT5DaGlwVHlwZSA+PSBTSVNfMzMwKSByb21pbmRleCA9IDB4MTFiOworCSAgICB9CisJIH0KKwkgaWYodGVtcCkgeworCSAgICBpZihyb21pbmRleCAmJiBTaVNfUHItPlNpU19Vc2VST00gJiYgKCEoU2lTX1ByLT5TaVNfUk9NTmV3KSkpIHsKKwkgICA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fCBUVlNldFlQYlByNTI1cCB8IFRWU2V0WVBiUHI3NTBwKSkgeworCSAgICBTaVNfUHItPlNpU19UVk1vZGUgJj0gfihUVlNldFBBTCB8IFRWU2V0TlRTQ0ogfCBUVlNldFBBTE0gfCBUVlNldFBBTE4pOworCSB9CisgICAgICB9CiAKLSAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0SW5TbGF2ZU1vZGUpIHsKLSAgICAgICAgaWYoIShTaVNfUHItPlNpU19WQkluZm8gJiBTZXROb3RTaW11TW9kZSkpIHsKLSAgICAgICAgICAgU2lTX1ByLT5TaVNfVFZNb2RlIHw9IFRWU2V0VFZTaW11TW9kZTsKLSAgICAgICAgfQotICAgICB9CisgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRJblNsYXZlTW9kZSkgeworCSBpZighKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldE5vdFNpbXVNb2RlKSkgeworCSAgICBTaVNfUHItPlNpU19UVk1vZGUgfD0gVFZTZXRUVlNpbXVNb2RlOworCSB9CisgICAgICB9CiAKLSAgICAgaWYoIShTaVNfUHItPlNpU19UVk1vZGUgJiBUVlNldFBBTCkpIHsKLSAgICAgICAgLyogQklPUyBzZXRzIFRWTlRTQzEwMjQgd2l0aG91dCBjaGVja2luZyA1MjVwIGhlcmUuIFdyb25nPyAqLwotICAgICAgICBpZighKFNpU19Qci0+U2lTX1RWTW9kZSAmIChUVlNldEhpVmlzaW9uIHwgVFZTZXRZUGJQcjUyNXAgfCBUVlNldFlQYlByNzUwcCkpKSB7Ci0gICAgICAgICAgIGlmKHJlc2luZm8gPT0gU0lTX1JJXzEwMjR4NzY4KSB7Ci0gICAgICAgICAgICAgIFNpU19Qci0+U2lTX1RWTW9kZSB8PSBUVlNldE5UU0MxMDI0OwotCSAgIH0KLSAgICAgICAgfQotICAgICB9CisgICAgICBpZighKFNpU19Qci0+U2lTX1RWTW9kZSAmIFRWU2V0UEFMKSkgeworCSBpZihyZXN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gICAgICAgICAgaWYoTW9kZU5vID4gMHgxMykgewotCQkgaWYoIChId0luZm8tPmpDaGlwVHlwZSA9PSBTSVNfNjMwKSAmJgotICAgICAgICAgICAgICAgICAgICAgKEh3SW5mby0+akNoaXBSZXZpc2lvbiA+PSAweDMwKSApIHsKKwkgICBWQ0xLSW5kZXggPSBWQ0xLSW5kZXhHRU5DUlQ7CisJICAgaWYoU2lTX1ByLT5DaGlwVHlwZSA8IFNJU18zMTVIKSB7CisJICAgICAgaWYoTW9kZU5vID4gMHgxMykgeworCQkgaWYoIChTaVNfUHItPkNoaXBUeXBlID09IFNJU182MzApICYmCisJCSAgICAgKFNpU19Qci0+Q2hpcFJldmlzaW9uID49IDB4MzApICkgewogCQkgICAgaWYoVkNMS0luZGV4ID09IDB4MTQpIFZDTEtJbmRleCA9IDB4MmU7Ci0JICAgICAgICAgfQotICAgICAgICAgICAgICB9CisJCSB9CisJICAgICAgfQogCSAgIH0KLSAgICAgICAgfQorCX0KIAogICAgICB9IGVsc2UgeyAgLyogaWYgbm90IHByb2dyYW1taW5nIENSVDIgKi8KIAotICAgICAgICBWQ0xLSW5kZXggPSBWQ0xLSW5kZXhHRU47Ci0JaWYoSHdJbmZvLT5qQ2hpcFR5cGUgPCBTSVNfMzE1SCkgewotICAgICAgICAgICBpZihNb2RlTm8gPiAweDEzKSB7Ci0JICAgICAgaWYoIChId0luZm8tPmpDaGlwVHlwZSAhPSBTSVNfNjMwKSAmJgotCSAgICAgICAgICAoSHdJbmZvLT5qQ2hpcFR5cGUgIT0gU0lTXzMwMCkgKSB7CisJVkNMS0luZGV4ID0gVkNMS0luZGV4R0VOQ1JUOworCWlmKFNpU19Qci0+Q2hpcFR5cGUgPCBTSVNfMzE1SCkgeworCSAgIGlmKE1vZGVObyA+IDB4MTMpIHsKKwkgICAgICBpZiggKFNpU19Qci0+Q2hpcFR5cGUgIT0gU0lTXzYzMCkgJiYKKwkJICAoU2lTX1ByLT5DaGlwVHlwZSAhPSBTSVNfMzA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A9IHlyZXM7CisgICB9CisgICBTaVNfUHItPlNpU19WR0FIREUgPSBTaVNfUHItPlNpU19IREUgPSB4cmVzOworICAgU2lTX1ByLT5TaVNfVkdBVkRFID0gU2lTX1ByLT5TaVNfVkRFID0geXJlczsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICAgICAgICAgICBHRVQgQ1JUMiBUSU1JTkcgREFUQSAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgQk9PTEVBTgotU2lTX0dldExWRFNDUlQxUHRyKFNpU19Qcml2YXRlICpTaVNfUHIsIFVTSE9SVCBNb2RlTm8sIFVTSE9SVCBNb2RlSWRJbmRleCwKLQkJICAgVVNIT1JUIFJlZnJlc2hSYXRlVGFibGVJbmRleCwgVVNIT1JUICpSZXNJbmRleCwKLQkJICAgVVNIT1JUICpEaXNwbGF5VHlwZSkKLSB7Ci0gIFVTSE9SVCBtb2RlZmxhZz0wOwotCi0gIGlmKFNpU19Qci0+U2lTX0lGX0RFRl9MVkRTID09IDEpIHsKLSAgICAgaWYoIShTaVNfUHItPlNpU19WQkluZm8gJiBTZXRDUlQyVG9MQ0RBKSkgewotICAgICAgICBpZighKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldEluU2xhdmVNb2RlKSkgcmV0dXJuIEZBTFNFOwotICAgICB9Ci0gIH0gZWxzZSBpZihTaVNfUHItPlNpU19WQlR5cGUgJiBWQl9TSVNWQikgewotICAgICBpZighKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldEluU2xhdmVNb2RlKSkgICAgcmV0dXJuIEZBTFNFOwotICB9IGVsc2UKLSAgICAgcmV0dXJuIEZBTFNFOwotCi0gIGlmKE1vZGVObyA8PSAweDEzKSB7Ci0gICAgIG1vZGVmbGFnID0gU2lTX1ByLT5TaVNfU01vZGVJRFRhYmxlW01vZGVJZEluZGV4X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NpU19DdXN0b21UID09IENVVF9CQVJDTzEzNjYpIHsKLQkJICBpZihSZXNJbmRleCA8IDB4MDgpIHsKLQkJICAgICBTaVNfUHItPlNpU19IREUgPSAxMjgwOwotICAgICAgICAgICAgICAgICAgICAgU2lTX1ByLT5TaVNfVkRFID0gMTAyNDsKLSAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KKyAgICAgIGlmKCAoIShTaVNfUHItPlNpU19WQlR5cGUgJiBWQl9TSVNWQikpICYmCisJICAoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvTENEKSAmJgorCSAgKCEoU2lTX1ByLT5TaVNfTENESW5mbyAmIExDRFBhc3MxMSkpICkgeworCSBpZiggKCEoU2lTX1ByLT5TaVNfTENESW5mbyAmIERvbnRFeHBhbmRMQ0QpKSB8fAorCSAgICAgKFNpU19Qci0+U2lTX1NldEZsYWcgJiBTZXRET1NNb2RlKSApIHsKKwkgICAgU2lTX1ByLT5TaVNfSERFID0gU2lTX1ByLT5QYW5lbFhSZXM7CisgICAgICAgICAgICBTaVNfUHItPlNpU19WREUgPSBTaVNfUHItPlBhbmVsWVJlczsKKyNpZmRlZiBTSVMzMDAKKwkgICAgaWYoU2lTX1ByLT5TaVNfQ3VzdG9tVCA9PSBDVVRfQkFSQ08xMzY2KSB7CisJICAgICAgIGlmKFJlc0luZGV4IDwgMHgwOCkgeworCQkgIFNpU19Qci0+U2lTX0hERSA9IDEyODA7CisJCSAgU2lTX1ByLT5TaVNfVkRFID0gMTAyNDsKKwkgICAgICAgfQorCSAgICB9CisjZW5kaWYKICAgICAgICAgIH0KICAgICAgIH0KICAgIH0KIH0KIAogc3RhdGljIHZvaWQKLVNpU19HZXRDUlQyRGF0YTMwMShTaVNfUHJpdmF0ZSAqU2lTX1ByLFVTSE9SVCBNb2RlTm8sVVNIT1JUIE1vZGVJZEluZGV4LAotICAgICAgICAgICAgICAgICAgIFVTSE9SVCBSZWZ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WR0FWVCA9IFNpU19Qci0+U2lTX1ZUID0gU2lTX1ByLT5DVlRvdGFsOwogCiAgICAgIH0gZWxzZSB7CiAKLSAgICAgICAgU2lTX0dldFJBTURBQzJEQVRBKFNpU19QciwgTW9kZU5vLCBNb2RlSWRJbmRleCwgUmVmcmVzaFJhdGVUYWJsZUluZGV4LCBId0luZm8pOworCVNpU19HZXRSQU1EQUMyREFUQShTaVNfUHIsIE1vZGVObywgTW9kZUlkSW5kZXgsIFJlZnJlc2hSYXRlVGFibGVJbmRleCk7CiAKICAgICAgfQogCiAgIH0gZWxzZSBpZihTaVNfUHItPlNpU19WQkluZm8gJiBTZXRDUlQyVG9UVikgewogCiAgICAgIFNpU19HZXRDUlQyUHRyKFNpU19QcixNb2RlTm8sTW9kZUlkSW5kZXgsUmVmcmVzaFJhdGVUYWJsZUluZGV4LAotICAgICAgICAgICAgICAgICAgICAmQ1JUMkluZGV4LCZSZXNJbmRleCxId0luZm8pOworCQkgICAgJkNSVDJJbmRleCwmUmVzSW5kZXgpOwogCiAgICAgIHN3aXRjaChDUlQySW5kZXgpIHsKLSAgICAgICAgY2FzZSAgMjogVFZQdHIgPSBTaVNfUHItPlNpU19FeHRIaVRWRGF0YTsgICBicmVhazsKLSAgICAgICAgY2FzZSAgMzogVFZQdHIgPSBTaVNfUHItPlNpU19FeHRQQUxEYXRhOyAgICBicmVhazsKLSAgICAgICAgY2FzZSAgNDogVFZQdHIgPSBTaVNfUHItPlNpU19FeHROVFNDRGF0YTsgICBicmVhazsKLSAgICAgICAgY2FzZSAgNTogVFZQdHIgPSBTaVNfUHItPlNpU19FeHQ1MjVpRGF0YTsgICBicmVhazsKLSAgICAgICAgY2FzZSAgNjogVFZQdHIgPSBTaVNfUHItPlNpU19FeHQ1MjVwRGF0YTsgICBicmVhazsKLSAgICAgICAgY2FzZSAgNzogVFZQdHIgPSBTaVNfUHItPlNpU19FeHQ3NTBwRGF0YTsgICBicmVhazsKLSAgICAgICAgY2FzZSAgODogVFZQd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AgU2lTX1ByLT5TaVNfVkdBVlQgICAgID0gKExDRFB0citSZXNJbmRleCktPlZHQVZUOworCSAgIFNpU19Qci0+U2lTX0hUICAgICAgICA9IChMQ0RQdHIrUmVzSW5kZXgpLT5MQ0RIVDsKKwkgICBTaVNfUHItPlNpU19WVCAgICAgICAgPSAoTENEUHRyK1Jlc0luZGV4KS0+TENEVlQ7CiAKICAgICAgICAgfQogCiAJdGVtcGF4ID0gU2lTX1ByLT5QYW5lbFhSZXM7Ci0gICAgICAgIHRlbXBieCA9IFNpU19Qci0+UGFuZWxZUmVzOworCXRlbXBieCA9IFNpU19Qci0+UGFuZWxZUmVzOwogCi0JaWYoU2lTX1ByLT5TaVNfTENEUmVzSW5mbyA9PSBQYW5lbF8xMDI0eDc2OCkgewotICAgICAgICAgICBpZihTaVNfUHItPlNpU19TZXRGbGFnICYgTENEVkVTQVRpbWluZykgewotICAgICAgICAgICAgICBpZihId0luZm8tPmpDaGlwVHlwZSA8IFNJU18zMTVIKSB7Ci0gICAgICAgICAgICAgICAgIGlmICAgICAoU2lTX1ByLT5TaVNfVkdBVkRFID09IDM1MCkgdGVtcGJ4ID0gNTYwOwotICAgICAgICAgICAgICAgICBlbHNlIGlmKFNpU19Qci0+U2lTX1ZHQVZERSA9PSA0MDApIHRlbXBieCA9IDY0MDsKLSAgICAgICAgICAgICAgfQotICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICBpZiAgICAgKFNpU19Qci0+U2lTX1ZHQVZERSA9PSAzNTcpIHRlbXBieCA9IDUyNzsKLSAgICAgICAgICAgICAgZWxzZSBpZihTaVNfUHItPlNpU19WR0FWREUgPT0gNDIwKSB0ZW1wYnggPSA2MjA7Ci0gICAgICAgICAgICAgIGVsc2UgaWYoU2lTX1ByLT5TaVNfVkdBVkRFID09IDUyNSkgdGVtcGJ4ID0gNzc1OwotICAgICAgICAgICAgICBlbHNlIGlmKFNpU19Qci0+U2lTX1ZHQVZERSA9PSA2MDApIHRlbXBieCA9ID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NSkgdGVtcGJ4ID0gODAwOworCSAgIGVsc2UgaWYoU2lTX1ByLT5TaVNfVkdBVkRFID09IDQwNSkgdGVtcGJ4ID0gODY0OworCSAgIGJyZWFrOworCWNhc2UgUGFuZWxfMTYwMHgxMjAwOgogCSAgIGlmKCEoU2lTX1ByLT5TaVNfU2V0RmxhZyAmIExDRFZFU0FUaW1pbmcpKSB7Ci0gICAgICAgICAgICAgIGlmICAgICAoU2lTX1ByLT5TaVNfVkdBVkRFID09IDM1MCkgIHRlbXBieCA9IDg3NTsKLSAgICAgICAgICAgICAgZWxzZSBpZihTaVNfUHItPlNpU19WR0FWREUgPT0gNDAwKSAgdGVtcGJ4ID0gMTAwMDsKLSAgICAgICAgICAgfQotICAgICAgICB9CisJICAgICAgaWYgICAgIChTaVNfUHItPlNpU19WR0FWREUgPT0gMzUwKSAgdGVtcGJ4ID0gODc1OworCSAgICAgIGVsc2UgaWYoU2lTX1ByLT5TaVNfVkdBVkRFID09IDQwMCkgIHRlbXBieCA9IDEwMDA7CisJICAgfQorCSAgIGJyZWFrOworCX0KIAotICAgICAgICBpZihTaVNfUHItPlNpU19MQ0RJbmZvICYgRG9udEV4cGFuZExDRCkgewotICAgICAgICAgICB0ZW1wYXggPSBTaVNfUHItPlNpU19WR0FIREU7Ci0gICAgICAgICAgIHRlbXBieCA9IFNpU19Qci0+U2lTX1ZHQVZERTsKLSAgICAgICAgfQorCWlmKFNpU19Qci0+U2lTX0xDREluZm8gJiBEb250RXhwYW5kTENEKSB7CisJICAgdGVtcGF4ID0gU2lTX1ByLT5TaVNfVkdBSERFOworCSAgIHRlbXBieCA9IFNpU19Qci0+U2lTX1ZHQVZERTsKKwl9CiAKLSAgICAgICAgU2lTX1ByLT5TaVNfSERFID0gdGVtcGF4OwotICAgICAgICBTaVNfUHItPlNpU19WREUgPSB0ZW1wYng7CisJU2lTX1ByLT5TaVNfSERFID0gdGVtcGF4OworCVNpU19Qci0+U2lTX1ZERSA9IHRlbXBieDsKICAgICAgf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OwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgfQotICAgICAgICAgICB9Ci0gICAgICAgIH0KKyAgICAgICAgCSAgICB9CisjZW5kaWYKKwkJIH0KKwkgICAgICB9CisJICAgfQorCX0KICAgICAgfQogICB9CiB9CkBAIC0zODMyLDU0ICszODY5LDkwIEBACiAvKiAgICAgICAgICAgRElTQUJMRSBWSURFTyBCUklER0UgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAorI2lmZGVmIFNJUzMxNUgKK3N0YXRpYyBpbnQKK1NpU19IYW5kbGVQV0Qoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIpCit7CisgICBpbnQgcmV0ID0gMDsKKyNpZmRlZiBTRVRfUFdECisgICB1bnNpZ25lZCBjaGFyICpST01BZGRyID0gU2lTX1ByLT5WaXJ0dWFsUm9tQmFzZTsKKyAgIHVuc2lnbmVkIHNob3J0IHJvbXB0ciA9IEdldExDRFN0cnVjdFB0cjY2MV8yKFNpU19Qcik7CisgICB1bnNpZ25lZCBjaGFyICBkcml2ZXJtb2RlID0gU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MzEpICYgMHg0MDsKKyAgIHVuc2lnbmVkIHNob3J0IHRlbXA7CisKKyAgIGlmKCAoU2lTX1ByLT5TaVNfVkJUeXBlICYgVkJfU0lTUFdEKSAmJgorICAgICAgIChyb21wdHIpCQkJCSYmCisgICAgICAgKFNpU19Qci0+U2lTX1BXRE9mZnNldCkgKSB7CisgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1BhcnQ0UG9ydCwweDJiLFJPTUFkZHJbcm9tcHRyICsgU2lTX1ByLT5TaVNfUFdET2Zmc2V0ICsgMF0pOworICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QYXJ0NFBvcnQsMHgyYyxST01BZGRyW3JvbXB0ciArIFNp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kgICB9Ci0JICAgaWYoIShTaVNfQ1IzNkJJT1NXb3JkMjNiKFNpU19QcixId0luZm8pKSkgewotCSAgICAgIFNpU19TZXRSZWdTUjExQU5ET1IoU2lTX1ByLEh3SW5mbywweEY3LDB4MDgpOwotCSAgICAgIFNpU19QYW5lbERlbGF5KFNpU19QciwgSHdJbmZvLCAzKTsKKwkgICBpZighKFNpU19DUjM2QklPU1dvcmQyM2IoU2lTX1ByKSkpIHsKKwkgICAgICBTaVNfU2V0UmVnU1IxMUFORE9SKFNpU19QciwweEY3LDB4MDgpOworCSAgICAgIFNpU19QYW5lbERlbGF5KFNpU19QciwgMyk7CiAJICAgfQogCX0gZWxzZSB7CiAJICAgaWYoIShTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzYzQsMHgxMSkgJiAweDA4KSkgewogCSAgICAgIGlmKCEoU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2M0LDB4MTMpICYgMHg0MCkpIHsKLSAgCSAgICAgICAgIGlmKCEoU2lTX0NSMzZCSU9TV29yZDIzYihTaVNfUHIsSHdJbmZvKSkpIHsKLSAgICAgICAgICAgICAgICAgICAgU2lTX1dhaXRWQlJldHJhY2UoU2lTX1ByLEh3SW5mbyk7CisJCSBpZighKFNpU19DUjM2QklPU1dvcmQyM2IoU2lTX1ByKSkpIHsKKwkJICAgIFNpU19XYWl0VkJSZXRyYWNlKFNpU19Qcik7CiAJCSAgICBpZighKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDA2KSAmIDB4MWMpKSB7CiAJCSAgICAgICBTaVNfRGlzcGxheU9mZihTaVNfUHIpOwotCSAgICAgICAgICAgIH0KLQkgICAgICAgICAgICBTaVNfU2V0UmVnU1IxMUFORE9SKFNpU19QcixId0luZm8sMHhGNywweDA4KTsKLQkgICAgICAgICAgICBTaVNfUGFuZWxEZWxheShTaVNfUHIsIEh3SW5mbywgMyk7Ci0gICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgfQorCQ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LCBId0luZm8sIDEpOwotICAgICAgICAgICAgICAgICAgfQotCQkgIFNpU19XYWl0VkJSZXRyYWNlKFNpU19QcixId0luZm8pOwotICAgICAgICAgICAgICAgICAgU2lTX1NldFJlZ1NSMTFBTkRPUihTaVNfUHIsSHdJbmZvLDB4RjcsMHgwMCk7Ci0gICAgICAgICAgICAgICB9CisJCSAgaWYoIShTaVNfQ1IzNkJJT1NXb3JkMjNiKFNpU19QcikpKSB7CisJCSAgICAgU2lTX1BhbmVsRGVsYXkoU2lTX1ByLCAxKTsKKwkJICB9CisJCSAgU2lTX1dhaXRWQlJldHJhY2UoU2lTX1ByKTsKKwkJICBTaVNfU2V0UmVnU1IxMUFORE9SKFNpU19QciwweEY3LDB4MDApOworCSAgICAgICB9CiAJICAgIH0KIAogCSB9IGVsc2UgewogCiAJICAgIHRlbXAgPSBTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzYzQsMHgzMikgJiAweERGOyAgICAgICAgICAgICAvKiBsb2NrIG1vZGUgKi8KLSAgICAgICAgICAgIGlmKFNpU19CcmlkZ2VJblNsYXZlbW9kZShTaVNfUHIpKSB7Ci0gICAgICAgICAgICAgICB0ZW1wYWggPSBTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgzMCk7Ci0gICAgICAgICAgICAgICBpZighKHRlbXBhaCAmIFNldENSVDJUb1JBTURBQykpIHRlbXAgfD0gMHgyMDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUDNjNCwweDMyLHRlbXApOworCSAgICBpZihTaVNfQnJpZGdlSW5TbGF2ZW1vZGUoU2lTX1ByKSkgeworCSAgICAgICB0ZW1wYWggPSBTaVNfR2V0UmVnKFNpU19Qci0+U2lTX1AzZDQsMHgzMCk7CisJICAgICAgIGlmKCEodGVtcGFoICYgU2V0Q1JUMlRvUkFNREFDKSkgdGVtcCB8PSAweDIwOworCSAgICB9CisJICAgIFNpU19TZXRSZWc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gfQogICAgICAgIH0KIApAQCAtNDY5MSw5NCArNDc5Miw5NCBAQAogCiAjaWZkZWYgU0lTMzE1SCAgICAvKiAzMTUgc2VyaWVzICovCiAKLSAgICAgICBpZighKFNpU19Jc05vdE02NTBvckxhdGVyKFNpU19QcixId0luZm8pKSkgewotICAgICAgICAgIGlmKEh3SW5mby0+akNoaXBUeXBlIDwgU0lTXzM0MCkgewotICAgICAgICAgICAgIFNpU19TZXRSZWdPUihTaVNfUHItPlNpU19QYXJ0MVBvcnQsMHg0YywweDE4KTsKLQkgIH0KKyAgICAgICBpZighKFNpU19Jc05vdE02NTBvckxhdGVyKFNpU19QcikpKSB7CisJICAvKmlmKFNpU19Qci0+Q2hpcFR5cGUgPCBTSVNfMzQwKSB7Ki8gIC8qIFhHSSBuZWVkcyB0aGlzICovCisJICAgICBTaVNfU2V0UmVnT1IoU2lTX1ByLT5TaVNfUGFydDFQb3J0LDB4NGMsMHgxOCk7CisJICAvKn0qLwogICAgICAgIH0KIAogICAgICAgIGlmKFNpU19Qci0+U2lTX0lGX0RFRl9DSDcweHggPT0gMCkgewotCSAgaWYoU2lTX0NSVDJJc0xDRChTaVNfUHIsIEh3SW5mbykpIHsKLQkgICAgIFNpU19TZXRSZWdTUjExQU5ET1IoU2lTX1ByLEh3SW5mbywweEZCLDB4MDApOwotCSAgICAgU2lTX1BhbmVsRGVsYXkoU2lTX1ByLCBId0luZm8sIDApOwotICAgICAgICAgIH0KKwkgIGlmKFNpU19DUlQySXNMQ0QoU2lTX1ByKSkgeworCSAgICAgU2lTX1NldFJlZ1NSMTFBTkRPUihTaVNfUHIsMHhGQiwweDAwKTsKKwkgICAgIFNpU19QYW5lbERlbGF5KFNpU19QciwgMCk7CisJICB9CiAgICAgICAgfQogCiAgICAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzYzQsMHgxRSwweDIwKTsKLSAgICAgICBTaVNfVW5Mb2NrQ1JUMihTaVNfUHIsSHdJbmZvKTsKKyAgICAgICB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2RlKFNpU19QcixId0luZm8pKSB7Ci0gICAgICAgICAgaWYoSHdJbmZvLT5qQ2hpcFR5cGUgIT0gU0lTXzc0MCkgewotICAgICAgICAgICAgIFNpU19TZXRSZWdPUihTaVNfUHItPlNpU19QYXJ0MVBvcnQsMHgxRSwweDIwKTsKKyAgICAgICB9IGVsc2UgaWYoU2lTX0lzVkFNb2RlKFNpU19QcikpIHsKKwkgIGlmKFNpU19Qci0+Q2hpcFR5cGUgIT0gU0lTXzc0MCkgeworCSAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1BhcnQxUG9ydCwweDFFLDB4MjApOwogCSAgfQogICAgICAgIH0KIAotICAgICAgIGlmKCEoU2lTX1dlSGF2ZUJhY2tsaWdodEN0cmwoU2lTX1ByLEh3SW5mbykpKSB7Ci0gICAgICAgICAgU2lTX1NldFJlZ0FORChTaVNfUHItPlNpU19QYXJ0MVBvcnQsMHgwMCwweDdmKTsKKyAgICAgICBpZighKFNpU19XZUhhdmVCYWNrbGlnaHRDdHJsKFNpU19QcikpKSB7CisJICBTaVNfU2V0UmVnQU5EKFNpU19Qci0+U2lTX1BhcnQxUG9ydCwweDAwLDB4N2YpOwogICAgICAgIH0KIAogICAgICAgIGlmKFNpU19Qci0+U2lTX0lGX0RFRl9DSDcweHggPT0gMikgewotICAgICAgIAkgIGlmKFNpU19Jc1RWT3JZUGJQck9yU2NhcnQoU2lTX1ByLEh3SW5mbykpIHsKLSAgICAgICAgICAgICBTaVNfQ2hyb250ZWw3MDF4T24oU2lTX1ByLEh3SW5mbyk7Ci0gICAgICAgICAgfQotICAgICAgICAgIGlmKCAoU2lTX0lzVkFNb2RlKFNpU19QcixId0luZm8pKSB8fAotCSAgICAgIChTaVNfSXNMQ0RPckxDREEoU2lTX1ByLEh3SW5mbykpICkgewotICAgICAgICAgICAgIFNpU19DaHJvbnRlbERvU29tZXRoaW5nMShTaVNfUHIsSHdJbmZvKTsKLSAgICAgICAgICB9CisJICBpZihTaVNfSXNUV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TENESW5mbyAmIExDRFN5bmMpIHsKLQkgICAgICAgICAgICAgICB0ZW1wYWggPSBTaVNfUHItPlNpU19MQ0RJbmZvOworCSAgICB0ZW1wYWggPSB0ZW1wYmwgPSBpbmZvZmxhZyA+PiA4OworCSAgICBpZighU2lTX1ByLT5Vc2VDdXN0b21Nb2RlKSB7CisJICAgICAgIHRlbXBibCA9IDA7CisJICAgICAgIGlmKChTaVNfUHItPlNpU19WQlR5cGUgJiBWQl9TSVMzMHhDKSAmJiAoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvUkFNREFDKSkgeworCQkgIGlmKE1vZGVObyA8PSAweDEzKSB7CisJCSAgICAgdGVtcGFoID0gU2lTX0dldFJlZ0J5dGUoKFNpU19Qci0+U2lTX1AzY2ErMHgwMikpOworCQkgIH0KKwkgICAgICAgfQorCSAgICAgICBpZihTaVNfUHItPlNpU19WQkluZm8gJiAoU2V0Q1JUMlRvTENEIHwgU2V0Q1JUMlRvTENEQSkpIHsKKwkJICBpZighKFNpU19Qci0+U2lTX0xDREluZm8gJiBMQ0RQYXNzMTEpKSB7CisJCSAgICBpZihTaVNfUHItPlNpU19MQ0RJbmZvICYgTENEU3luYykgeworCQkgICAgICAgdGVtcGFoID0gU2lTX1ByLT5TaVNfTENESW5mbzsKIAkJICAgICAgIHRlbXBibCA9ICh0ZW1wYWggPj4gNikgJiAweDAzOwogCQkgICAgfQotCSAgICAgICAgIH0KLQkgICAgICB9Ci0JICAgfQotCSAgIHRlbXBhaCAmPSAweEMwOwotICAgICAgICAgICB0ZW1wYWggfD0gMHgyMDsKLSAgICAgICAgICAgaWYoIShTaVNfUHItPlNpU19MQ0RJbmZvICYgTENEUkdCMThCaXQpKSB0ZW1wYWggfD0gMHgxMDsKLQkgICBpZihTaVNfUHItPlNpU19WQlR5cGUgJiBWQl9Ob0xDRCkgewotCSAgICAgIC8qIEltaXRhdGUgQklPUyBidWcgKi8KLQkgICAgICBpZihTaVNfUHItPlNpU19WQklu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gdGVtcCAtPSA2OwotICAgICAgICBpZihTaVNfUHItPlNpU19UVk1vZGUgJiBUVlNldFRWU2ltdU1vZGUpIHsKLSAgICAgICAgICAgdGVtcCAtPSAyOwotICAgICAgICAgICBpZihNb2RlTm8gPiAweDEzKSB0ZW1wIC09IDEwOwotICAgICAgICB9Ci0gICAgIH0KLSAgfSBlbHNlIHsKLSAgICAgdGVtcGN4ID0gKHRlbXBjeCArIHRlbXBieCkgPj4gMTsKLSAgICAgdGVtcCA9ICh0ZW1wY3ggJiAweDAwRkYpICsgMjsKLSAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Q1JUMlRvVFYpIHsKLSAgICAgICAgdGVtcC0tOwotICAgICAgICBpZighKG1vZGVmbGFnICYgSGFsZkRDTEspKSB7Ci0gICAgICAgICAgIGlmKChtb2RlZmxhZyAmIENoYXJ4OERvdCkpIHsKLSAgICAgICAgICAgICAgdGVtcCArPSA0OwotICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19WR0FIREUgPj0gODAwKSB0ZW1wIC09IDY7Ci0gICAgICAgICAgICAgIGlmKEh3SW5mby0+akNoaXBUeXBlID49IFNJU18zMTVIKSB7Ci0JICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkdBSERFID09IDgwMCkgdGVtcCArPSAyOwotICAgICAgICAgICAgICB9Ci0gICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICB9IGVsc2UgewotICAgICAgICBpZighKG1vZGVmbGFnICYgSGFsZkRDTEspKSB7Ci0gICAgICAgICAgIHRlbXAgLT0gNDsKLSAgICAgICAgICAgaWYoKFNpU19Qci0+U2lTX0xDRFJlc0luZm8gIT0gUGFuZWxfMTI4MHg5NjApICYmCi0JICAgICAgKFNpU19Qci0+U2lTX0xDRFJlc0luZm8gIT0gUGFuZWxfMTYwMHgxMjAwKSkgewotICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19WR0FIREUgPj0gODAwKSB7Ci0gICAgICAgICAgICAgICAgIHRlbXAgLT0gNzsKLQkgICAgICAgICBpZihId0luZm8tPmpDaGlwVHlwZSA8IFNJU18zMTVIKSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmKFNpU19Qci0+U2lTX01vZGVUeXBlID09IE1vZGVFR0EpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkdBVkRFID09IDEwMjQpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcCArPSAxNTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfTENEUmVzSW5mbyAhPSBQYW5lbF8xMjgweDEwMjQpCi0JCSAgCSAgICAgdGVtcCArPSA3OwotICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIH0KLQkgICAgICAgICB9Ci0JCSBpZihTaVNfUHItPlNpU19MQ0RSZXNJbmZvICE9IFBhbmVsXzE0MDB4MTA1MCkgewotICAgICAgICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19WR0FIREUgPj0gMTI4MCkgewotICAgICAgICAgICAgICAgICAgICAgICBpZihTaVNfUHItPlNpU19MQ0RJbmZvICYgRG9udEV4cGFuZExDRCkgdGVtcCArPSAyODsKLQkJICAgIH0KLSAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICB9Ci0gICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICB9CisgICAgIFNpU19Qci0+Q0hCbGFua1N0YXJ0ICs9IDE2OwogICB9CiAKLSAgcDFfNyA9IHRlbXA7Ci0gIHAxXzggPSAweDAwOwotCi0gIGlmKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldENSVDJUb1RWKSB7Ci0gICAgIGlmKFNpU19Qci0+U2lTX1RWTW9kZSAmIFRWU2V0VFZTaW11TW9kZSkgewotICAgICAgICBpZihNb2RlTm8gPD0gMHgwMSkgewotCSAgIHAxXzcgPSAweDJhOwotCSAgIGlmKCEoU2lTX1ByLT5TaVNfVFZN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ICB0ZW1wYnggPj49IDE7Ci0gICAgIH0KICAgICAgaWYoIShTaVNfUHItPlNpU19MQ0RJbmZvICYgTENEUGFzczExKSkgewogICAgICAgICB0ZW1wYnggPSBTaVNfUHItPlBhbmVsWFJlczsKICAgICAgfQorICAgICBpZigoU2lTX1ByLT5TaVNfTENEUmVzSW5mbyA9PSBQYW5lbF8zMjB4MjQwXzEpIHx8CisgICAgICAgIChTaVNfUHItPlNpU19MQ0RSZXNJbmZvID09IFBhbmVsXzMyMHgyNDBfMikgfHwKKyAgICAgICAgKFNpU19Qci0+U2lTX0xDRFJlc0luZm8gPT0gUGFuZWxfMzIweDI0MF8zKSkgeworICAgICAgICB0ZW1wYnggPj49IDE7CisgICAgIH0KICAgfQogCiAgIHRlbXBheCArPSB0ZW1wYng7CkBAIC01NzY3LDI1ICs1NTc4LDI1IEBACiAgIHRlbXAgPSAodGVtcGN4ID4+IDMpICYgMHgwMEZGOwogICBpZihTaVNfUHItPlNpU19WQkluZm8gJiAoU2V0Q1JUMlRvTENEIHwgU2V0Q1JUMlRvTENEQSkpIHsKICAgICAgaWYoU2lTX1ByLT5TaVNfSUZfREVGX1RSVU1QSU9OKSB7Ci0gICAgICAgIGlmKFNpU19Qci0+U2lTX0xDRFJlc0luZm8gPT0gUGFuZWxfMTAyNHg3NjgpIHsKLSAgICAgICAgICAgc3dpdGNoKE1vZGVObykgewotICAgICAgICAgICBjYXNlIDB4MDQ6Ci0gICAgICAgICAgIGNhc2UgMHgwNToKLSAgICAgICAgICAgY2FzZSAweDBkOiB0ZW1wID0gMHg1NjsgYnJlYWs7Ci0gICAgICAgICAgIGNhc2UgMHgxMDogdGVtcCA9IDB4NjA7IGJyZWFrOwotICAgICAgICAgICBjYXNlIDB4MTM6IHRlbXAgPSAweDVmOyBicmVhazsKLSAgICAgICAgICAgY2FzZSAweDQwOgotICAgICAgICAgICBjYXNlIDB4NDE6Ci0gICAgICAgICAgIGNhc2UgMHg0ZjoKLSAgICAgICAgICAgY2FzZS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XRGbGFnICYgTENEVkVTQVRpbWluZykpICAmJgotICAgICAgICAgICghKFNpU19Qci0+U2lTX0xDREluZm8gJiBEb250RXhwYW5kTENEKSkgKSB7Ci0gICAgICAgICBpZihNb2RlTm8gPT0gMHgxMykgewotICAgICAgICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QYXJ0MlBvcnQsMHgwNCwweEI5KTsKLSAgICAgICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUGFydDJQb3J0LDB4MDUsMHhDQyk7Ci0gICAgICAgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1BhcnQyUG9ydCwweDA2LDB4QTYpOwotICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIGlmKChjcnQyY3J0YyAmIDB4M0YpID09IDQpIHsKLSAgICAgICAgICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUGFydDJQb3J0LDB4MDEsMHgyQik7Ci0gICAgICAgICAgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1BhcnQyUG9ydCwweDAyLDB4MTMpOwotICAgICAgICAgICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QYXJ0MlBvcnQsMHgwNCwweEU1KTsKLSAgICAgICAgICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUGFydDJQb3J0LDB4MDUsMHgwOCk7Ci0gICAgICAgICAgICAgICBTaVNfU2V0UmVnKFNpU19Qci0+U2lTX1BhcnQyUG9ydCwweDA2LDB4RTIpOwotICAgICAgICAgICAgfQotICAgICAgICAgfQorICAgICAgaWYoICggKCAoU2lTX1ByLT5DaGlwVHlwZSA9PSBTSVNfNjMwKSB8fAorCSAgICAgIChTaVNfUHItPkNoaXBUeXBlID09IFNJU183MzApICkgJiYKKwkgICAgKFNpU19Qci0+Q2hpcFJldmlzaW9uID4gMikgKSAgJiYKKwkgIChTaVNfUHItPlNpU19MQ0RSZXNJbmZvID09IFBhbmVsXzEwMjR4N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YgU2V0SW5TbGF2ZU1vZGUpIHsKLSAgICAgICAgICAgICAgICAgIHRlbXBjeCArPSA3OwotICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgdGVtcGN4ICs9IGNydDJjcnRjOwotICAgICAgICAgICAgaWYoY3J0MmNydGMgPj0gNCkgewotICAgICAgICAgICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QYXJ0MlBvcnQsMHgwNiwweGZmKTsKLSAgICAgICAgICAgIH0KKyAgICAgIGlmKFNpU19Qci0+Q2hpcFR5cGUgPCBTSVNfMzE1SCkgeworCSBpZihTaVNfUHItPlNpU19MQ0RUeXBlSW5mbyA9PSAweDBjKSB7CisJICAgIGNydDJjcnRjICY9IDB4MWY7CisJICAgIHRlbXBjeCA9IDA7CisJICAgIGlmKCEoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0Tm90U2ltdU1vZGUpKSB7CisJICAgICAgIGlmKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldEluU2xhdmVNb2RlKSB7CisJCSAgdGVtcGN4ICs9IDc7CisJICAgICAgIH0KKwkgICAgfQorCSAgICB0ZW1wY3ggKz0gY3J0MmNydGM7CisJICAgIGlmKGNydDJjcnRjID49IDQpIHsKKwkgICAgICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QYXJ0MlBvcnQsMHgwNiwweGZmKTsKKwkgICAgfQogCi0gICAgICAgICAgICBpZighKFNpU19Qci0+U2lTX1ZCSW5mbyAmIFNldE5vdFNpbXVNb2RlKSkgewotICAgICAgICAgICAgICAgaWYoU2lTX1ByLT5TaVNfVkJJbmZvICYgU2V0SW5TbGF2ZU1vZGUpIHsKLSAgICAgICAgICAgICAgICAgIGlmKGNydDJjcnRjID09IDQpIHsKLSAgICAgICAgICAgICAgICAgICAgIFNpU19TZXRSZWcoU2lTX1ByLT5TaVNfUGFydDJQb3J0LDB4MDEsMHgyOCk7Ci0gICAgICAgICAgICAgICAgICB9Ci0gICAgIC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tZW50IChTMy0yPTEwKSwKICAgIAkgICAgICAgIG1heGltdW0gZmxpY2tlciBmaWx0ZXIgZm9yIENocm9tYSBjaGFubmVsIChTNS00PTEwKQogCSAgICAgICAgPTAwMTAxMDAwPTB4MjggKFdoZW4gcmVhZGluZywgUzEtMC0+UzMtMiwgYW5kIFMzLTItPlMxLTAhKQotICAgICAgKi8KLSAgICAgU2lTX1NldENINzAweChTaVNfUHIsMHgyODAxKTsKKyAgICAgICAqLworICAgICAgU2lTX1NldENINzAweChTaVNfUHIsMHgwMSwweDI4KTsKIAotICAgICAvKiBTZXQgdmlkZW8gYmFuZHdpZHRoCisgICAgICAvKiBTZXQgdmlkZW8gYmFuZHdpZHRoCiAgICAgICAgICAgICBIaWdoIGJhbmR3aXRoIEx1bWEgY29tcG9zaXRlIHZpZGVvIGZpbHRlcihTMD0xKQogICAgICAgICAgICAgbG93IGJhbmR3aXRoIEx1bWEgUy12aWRlbyBmaWx0ZXIgKFMyLTE9MDApCiAJICAgIGRpc2FibGUgcGVhayBmaWx0ZXIgaW4gUy12aWRlbyBjaGFubmVsIChTMz0wKQogCSAgICBoaWdoIGJhbmR3aWR0aCBDaHJvbWEgRmlsdGVyIChTNS00PTExKQogCSAgICA9MDAxMTAwMDE9MHgzMQotICAgICAqLwotICAgICBTaVNfU2V0Q0g3MDB4KFNpU19QciwweGIxMDMpOyAgICAgICAvKiBvbGQ6IDMxMDMgKi8KLQotICAgICAvKiBSZWdpc3RlciAweDNEIGRvZXMgbm90IGV4aXN0IGluIG5vbi1tYWNyb3Zpc2lvbiByZWdpc3RlciBtYXAKLSAgICAgICAgICAgIChNYXliZSB0aGlzIGlzIGEgbWFjcm92aXNpb24gcmVnaXN0ZXI/KQogICAgICAgKi8KKyAgICAgIFNpU19TZXRDSDcwMHgoU2lTX1ByLDB4MDMsMHhiMSk7ICAgICAgIC8qIG9sZDogMzEwMyAqLworCisgICAgICAvKiBSZWdpc3RlciAweDNEIGRvZXMgbm90IGV4aXN0IGluIG5vbi1tYWNyb3Zpc2lvbiByZWdpc3RlciBtYXAKKyAgICAgICAgICAgIChNYXliZSB0aGlzIGlzIGEgbWFjcm92aXNpb24gcmVnaXN0ZXI/KQorICAgICAgICovCiAjaWZuZGVmIFNJU19DUAotICAgICBTaVNfU2V0Q0g3MHh4KFNpU19QciwweDAwM0QpOworICAgICAgU2lTX1NldENINzB4eChTaVNfUHIsMHgzZCwweDAwKTsKICNlbmRpZgogCi0gICAgIC8qIFJlZ2lzdGVyIDB4MTAgb25seSBjb250YWlucyAxIHdyaXRhYmxlIGJpdCAoUzApIGZvciBzZW5zaW5nLAotICAgICAgICAgICAgYWxsIG90aGVyIGJpdHMgYSByZWFkLW9ubHkuIE1hY3JvdmlzaW9uPwotICAgICAgKi8KLSAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAwMTAsMHgxRik7CisgICAgICAvKiBSZWdpc3RlciAweDEwIG9ubHkgY29udGFpbnMgMSB3cml0YWJsZSBiaXQgKFMwKSBmb3Igc2Vuc2luZywKKyAgICAgICAgICAgICBhbGwgb3RoZXIgYml0cyBhIHJlYWQtb25seS4gTWFjcm92aXNpb24/CisgICAgICAgKi8KKyAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgxMCwweDAwLDB4MUYpOwogCi0gICAgIC8qIFJlZ2lzdGVyIDB4MTEgb25seSBjb250YWlucyAzIHdyaXRhYmxlIGJpdHMgKFMwLVMyKSBmb3IKLSAgICAgICAgICAgIGNvbnRyYXN0IGVuaGFuY2VtZW50IChzZXQgdG8gMDEwIC0+IGdhaW4gMSBZb3V0ID0gMTcvMTYqKFlpbi0zMCkgKQotICAgICAgKi8KLSAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAyMTEsMHhGOCk7CisgICAgICAvKiBSZWdpc3RlciAweDExIG9ubHkgY29udGFpbnMgMyB3cml0YWJsZSBiaXRzIChTMC1TMikgZm9yCisgICAgICAgICAgICAgY29udHJhc3QgZW5oYW5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wKTsKLSAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAwMUEsMHhGMCk7Ci0gICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgwMDFCLDB4RjApOwotICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MDAxQywweEYwKTsKLSAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAwMUQsMHhGMCk7Ci0gICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgwMDFFLDB4RjApOwotICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MDAxRiwweEYwKTsKLSAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAxMjAsMHhFRik7ICAgICAgIC8qIExvb3AgZmlsdGVyIG9uIGZvciBtb2RlIDIzICovCi0gICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgwMDIxLDB4RkUpOyAgICAgICAvKiBBQ0lWIG9mZiwgbmVlZCB0byBzZXQgRlNDSSAqLwotICAgICAgICAgfQotICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICBpZihyZXNpbmRleCA9PSAweDA0KSB7ICAgICAJCQkgLyogLS0tLS0gNjQweDQ4MCB1bmRlcnNjYW47IE1vZGUgMTcgKi8KLSAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDAwMjAsMHhFRik7IAkgLyogbG9vcCBmaWx0ZXIgb2ZmICovCi0gICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgwMTIxLDB4RkUpOwotICAgICAgICAgfSBlbHNlIGlmKHJlc2luZGV4ID09IDB4MDUpIHsgICAJCSAvKiAtLS0tLSA4MDB4NjAwIHVuZGVyc2NhbjogTW9kZSAyNCAqLwotI2lmIDAKLSAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9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wMSwweEYwKTsJLyogMHgxOC0weDFmOiBGU0NJIDQ2OSw3NjIsMDQ4ICovCisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MTksMHgwQywweEYwKTsKKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgxYSwweDAwLDB4RjApOworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDFiLDB4MDAsMHhGMCk7CisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MWMsMHgwMCwweEYwKTsKKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgxZCwweDAwLDB4RjApOworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDFlLDB4MDAsMHhGMCk7CisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MWYsMHgwMCwweEYwKTsKKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMCwweDAxLDB4RUYpOwkvKiBMb29wIGZpbHRlciBvbiBmb3IgbW9kZSAyMyAqLworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDIxLDB4MDAsMHhGRSk7CS8qIEFDSVYgb2ZmLCBuZWVkIHRvIHNldCBGU0NJICovCisgICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MDAyMCwweEVGKTsgCS8qIGxvb3AgZmlsdGVyIG9mZiAqLwotICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MDEyMSwweEZFKTsgICAgICAvKiBBQ0lWIG9uICovCisgICAgICAgICAgICBpZihyZXNpbmRleCA9PSAweDA0KSB7ICAgICAJCQkvKiAtLS0tLSA2NDB4NDgwIHVuZGVyc2NhbjsgTW9kZSAxNyAqLworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDIwLDB4MDAsMHhFRik7CS8qIGxvb3AgZmlsdGVyIG9mZiAqLworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDIxLDB4MDEsMHhGRSk7CisgICAgICAgICAgICB9IGVsc2UgaWYocmVzaW5kZXggPT0gMHgwNSkgeyAgIAkJLyogLS0tLS0gODAweDYwMCB1bmRlcnNjYW46IE1vZGUgMjQgKi8KKyNpZiAwCisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MTgsMHgwMSwweEYwKTsJLyogKEZTQ0kgd2FzIDB4MWYxYzcxYzcgLSB0aGlzIGlzIGZvciBtb2RlIDIyKSAqLworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDE5LDB4MDksMHhGMCk7CS8qIEZTQ0kgZm9yIG1vZGUgMjQgaXMgNDI4LDU1NCw4NTEgKi8KKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgxYSwweDA4LDB4RjApOyAgICAgICAvKiAxOThiM2E2MyAqLworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDFiLDB4MGIsMHhGMCk7CisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MWMsMHgwNCwweEYwKTsKKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgxZCwweDAxLDB4RjApOworICAgICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDFlLDB4MDYsMHhGMCk7CisgICAgICAgICAgICAgICBTaVNfU2V0Q0g3MHh4QU5ET1IoU2lTX1ByLDB4MWYsMHgwNSwweEYwKTsKKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMCwweDAwLDB4RUYpOwkvKiBsb29wIGZpbHRlciBvZmYgZm9yIG1vZGUgMjQgKi8KKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMSwweDAwLDB4RkUpOwkqIEFDSVYgb2ZmLCBuZWVkIHRvIHNldCBGU0NJICovCisjZW5kaWYgICAgICAgICAvKiBBbGwgYWx0ZXJuYXRpdmVzIHdyb25nIChkYXRhc2hlZXQgd3Jvbmc/KSwgZG9uJ3QgdXNlIEZTQ0kgKi8KKwkgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDIwLDB4MDAsMHhFRik7CSAvKiBsb29wIGZpbHRlciBvZmYgKi8KKyAgICAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMSwweDAxLDB4RkUpOworICAgICAgICAgICAgfQogICAgICAgICAgfQotICAgICB9Ci0gICAgIAorICAgICAgfSBlbHNlIHsJCQkJCQkvKiAtLS0tIFBBTCAtLS0tICovCisgICAgICAgICAvKiBXZSBkb24ndCBwbGF5IGFyb3VuZCB3aXRoIEZTQ0kgaW4gUEFMIG1vZGUgKi8KKyAgICAgICAgIGlmKHJlc2luZGV4ID09IDB4MDQpIHsKKyAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMCwweDAwLDB4RUYpOwkvKiBsb29wIGZpbHRlciBvZmYgKi8KKyAgICAgICAgICAgIFNpU19TZXRDSDcweHhBTkRPUihTaVNfUHIsMHgyMSwweDAxLDB4RkUpOwkvKiBBQ0lWIG9uICovCisgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweDIwLDB4MDAsMHhFRik7CS8qIGxvb3AgZmlsdGVyIG9mZiAqLworICAgICAgICAgICAgU2lTX1NldENINzB4eEFORE9SKFNpU19QciwweD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TFZEUyBvbiAqLworCSAgIFNpU19DaHJvbnRlbFJlc2V0REIoU2lTX1ByKTsKKwkgICBTaVNfQ2hyb250ZWxEb1NvbWV0aGluZzIoU2lTX1ByKTsKKwkgICBTaVNfQ2hyb250ZWxEb1NvbWV0aGluZzMoU2lTX1ByLCAwKTsKIAl9IGVsc2UgewogICAgICAgICAgICB0ZW1wID0gU2lTX0dldENINzAxeChTaVNfUHIsMHg2Nik7CiAgICAgICAgICAgIGlmKHRlbXAgIT0gMHg0NSkgewotICAgICAgICAgICAgICBTaVNfQ2hyb250ZWxSZXNldERCKFNpU19QciwgSHdJbmZvKTsKLSAgICAgICAgICAgICAgU2lTX0Nocm9udGVsRG9Tb21ldGhpbmcyKFNpU19QciwgSHdJbmZvKTsKLSAgICAgICAgICAgICAgU2lTX0Nocm9udGVsRG9Tb21ldGhpbmczKFNpU19QciwgMCwgSHdJbmZvKTsKKyAgICAgICAgICAgICAgU2lTX0Nocm9udGVsUmVzZXREQihTaVNfUHIpOworICAgICAgICAgICAgICBTaVNfQ2hyb250ZWxEb1NvbWV0aGluZzIoU2lTX1ByKTsKKyAgICAgICAgICAgICAgU2lTX0Nocm9udGVsRG9Tb21ldGhpbmczKFNpU19QciwgMCk7CiAgICAgICAgICAgIH0KIAl9CiAKICAgICAgfSBlbHNlIHsgLyogNjUwICovCiAKLSAgICAgICAgU2lTX0Nocm9udGVsUmVzZXREQihTaVNfUHIsSHdJbmZvKTsKLSAgICAgICAgU2lTX0Nocm9udGVsRG9Tb21ldGhpbmcyKFNpU19QcixId0luZm8pOworICAgICAgICBTaVNfQ2hyb250ZWxSZXNldERCKFNpU19Qcik7CisgICAgICAgIFNpU19DaHJvbnRlbERvU29tZXRoaW5nMihTaVNfUHIpOwogICAgICAgICB0ZW1wID0gU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MzQpOwotICAgICAgICBTaVNfQ2hyb250ZWxEb1NvbWV0aGluZzMoU2lTX1ByLHRlbXAsSHdJbmZv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Exvd01vZGVUZXN0cykgewotICAgICAgU2lTX0xvY2tDUlQyKFNpU19QcixId0luZm8pOworICAgICAgU2lTX0xvY2tDUlQyKFNpU19Qcik7CiAgICB9CiAKICAgIHJldHVybiBUUlVFOwpAQCAtOTAzNywxMyArODg0OSwxMyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogdm9pZAotU2lTX1NpUzMweEJMT24oU2lTX1ByaXZhdGUgKlNpU19QciwgUFNJU19IV19JTkZPIEh3SW5mbykKK1NpU19TaVMzMHhCTE9uKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQogewogICAvKiBTd2l0Y2ggb24gTENEIGJhY2tsaWdodCBvbiBTaVMzMHhMViAqLwogICBTaVNfRERDMkRlbGF5KFNpU19QciwweGZmMDApOwogICBpZighKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUGFydDRQb3J0LDB4MjYpICYgMHgwMikpIHsKICAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1BhcnQ0UG9ydCwweDI2LDB4MDIpOwotICAgICBTaVNfV2FpdFZCUmV0cmFjZShTaVNfUHIsSHdJbmZvKTsKKyAgICAgU2lTX1dhaXRWQlJldHJhY2UoU2lTX1ByKTsKICAgfQogICBpZighKFNpU19HZXRSZWcoU2lTX1ByLT5TaVNfUGFydDRQb3J0LDB4MjYpICYgMHgwMSkpIHsKICAgICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1BhcnQ0UG9ydCwweDI2LDB4MDEpOwpAQCAtOTA1MSwxMiArODg2MywxMSBAQAogfQogCiB2b2lkCi1TaVNfU2lTMzB4QkxPZmYoU2lTX1ByaXZhdGUgKlNpU19QciwgUFNJU19IV19JTkZPIEh3SW5mbykKK1NpU19TaVMzMHhCTE9mZihzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QcikKIHsKICAgLyogU3dpdGNoIG9mZiBMQ0QgYmFja2xpZ2h0IG9uI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LwotICAgICBpZihTaVNfU2V0U3RvcChTaVNfUHIpKSBjb250aW51ZTsJCS8qIFNldCBzdG9wIGNvbmRpdGlvbiAqLworICAgICBpZihTaVNfU2V0U3RhcnQoU2lTX1ByKSkgY29udGludWU7CQkJCQkvKiBTZXQgc3RhcnQgY29uZGl0aW9uICovCisgICAgIHRlbXAgPSBTaVNfV3JpdGVEREMyRGF0YShTaVNfUHIsIFNpU19Qci0+U2lTX0REQ19EZXZpY2VBZGRyKTsJLyogV3JpdGUgREFCIChTMD0wPXdyaXRlKSAqLworICAgICBpZih0ZW1wKSBjb250aW51ZTsJCQkJCQkJLyogICAgKEVSUk9SOiBubyBhY2spICovCisgICAgIHRlbXAgPSBTaVNfV3JpdGVEREMyRGF0YShTaVNfUHIsIChyZWcgfCBteW9yKSk7CQkJLyogV3JpdGUgUkFCICg3MDB4OiBzZXQgYml0IDcsIHNlZSBkYXRhc2hlZXQpICovCisgICAgIGlmKHRlbXApIGNvbnRpbnVlOwkJCQkJCQkvKiAgICAoRVJST1I6IG5vIGFjaykgKi8KKyAgICAgdGVtcCA9IFNpU19Xcml0ZUREQzJEYXRhKFNpU19QciwgdmFsKTsJCQkJLyogV3JpdGUgZGF0YSAqLworICAgICBpZih0ZW1wKSBjb250aW51ZTsJCQkJCQkJLyogICAgKEVSUk9SOiBubyBhY2spICovCisgICAgIGlmKFNpU19TZXRTdG9wKFNpU19QcikpIGNvbnRpbnVlOwkJCQkJLyogU2V0IHN0b3AgY29uZGl0aW9uICovCiAgICAgIFNpU19Qci0+U2lTX0Nocm9udGVsSW5pdCA9IDE7CiAgICAgIHJldHVybiBUUlVFOwogICB9CiAgIHJldHVybiBGQUxTRTsKIH0KIAotI2lmIDAKLSNpZmRlZiBTSVMzMDAKLS8qIFdyaXRlIFRydW1waW9uIHJlZ2lzdGVyICovCi1zdGF0aWMgdm9pZAotU2lTX1NldFRydW1wUmVnKFNpU19Qcml2YXRlICpTaVNfUHIsIFVTSE9SVCB0ZW1wYngpCi17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0QgKi8KLSAgICAgU2lTX1ByLT5TaVNfRERDX0RhdGEgID0gMHgwMjsgICAgICAgICAgICAgIC8qIEJpdG1hc2sgaW4gSW5kZXhSZWcgZm9yIERhdGEgKi8KLSAgICAgU2lTX1ByLT5TaVNfRERDX0NsayAgID0gMHgwMTsgICAgICAgICAgICAgIC8qIEJpdG1hc2sgaW4gSW5kZXhSZWcgZm9yIENsayAqLworICAgICBTaVNfUHItPlNpU19ERENfRGF0YSAgPSAweDAyOwkJLyogQml0bWFzayBpbiBJbmRleFJlZyBmb3IgRGF0YSAqLworICAgICBTaVNfUHItPlNpU19ERENfQ2xrICAgPSAweDAxOwkJLyogQml0bWFzayBpbiBJbmRleFJlZyBmb3IgQ2xrICovCiAgICAgIFNpU19TZXR1cEREQ04oU2lTX1ByKTsKICAgfQogCi0gIGlmKCAoIShTaVNfU2V0Q2hSZWcoU2lTX1ByLCB0ZW1wYngsIDB4ODApKSkgJiYKKyAgaWYoICghKFNpU19TZXRDaFJlZyhTaVNfUHIsIHJlZywgdmFsLCAweDgwKSkpICYmCiAgICAgICAoIShTaVNfUHItPlNpU19DaHJvbnRlbEluaXQpKSApIHsKLSAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4ID0gMHgwYTsJCS8qIEJpdCA3ID0gU0M7ICBCaXQgNiA9IFNEICovCi0gICAgIFNpU19Qci0+U2lTX0REQ19EYXRhICA9IDB4ODA7ICAgICAgICAgICAgICAvKiBCaXRtYXNrIGluIEluZGV4UmVnIGZvciBEYXRhICovCi0gICAgIFNpU19Qci0+U2lTX0REQ19DbGsgICA9IDB4NDA7ICAgICAgICAgICAgICAvKiBCaXRtYXNrIGluIEluZGV4UmVnIGZvciBDbGsgKi8KKyAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4ID0gMHgwYTsKKyAgICAgU2lTX1ByLT5TaVNfRERDX0RhdGEgID0gMHg4MDsKKyAgICAgU2lTX1ByLT5TaVNfRERDX0NsayAgID0gMHg0MDsKICAgICAgU2lT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15YWRhcHRudW0gPSAxOwogCQkgICAgIGlmKCEoY3IzMiAmIDB4MTApKSByZXR1cm4gMHhGRkZGOwogICAgICAgICAgICAgICAgICB9CiAJICAgICAgfQpAQCAtOTQwMSwxNyArOTE5NywxNyBAQAogCiAgICAgIH0gZWxzZSB7CQkJCQkJLyogMzE1LzMzMCBzZXJpZXMgKi8KIAotICAgICAJLyogaGVyZSB3ZSBzaW1wbGlmeTogMCA9IENSVDEsIDEgPSBDUlQyIChWR0EsIExDRCkgKi8KKwkvKiBoZXJlIHdlIHNpbXBsaWZ5OiAwID0gQ1JUMSwgMSA9IENSVDIgKFZHQSwgTENEKSAqLwogCi0JaWYoVkJGbGFncyAmIFZCX1NJU0JSSURHRSkgeworCWlmKFZCRmxhZ3MyICYgVkIyX1NJU0JSSURHRSkgewogCSAgIGlmKG15YWRhcHRudW0gPT0gMikgewogCSAgICAgIG15YWRhcHRudW0gPSAxOwotICAgICAgICAgICB9CisJICAgfQogCX0KIAogICAgICAgICBpZihteWFkYXB0bnVtID09IDEpIHsKLSAgICAgCSAgIGZsYWcgPSAwOwotCSAgIGlmKFZCRmxhZ3MgJiBWQl9TSVNCUklER0UpIHsKKwkgICBmbGFnID0gMDsKKwkgICBpZihWQkZsYWdzMiAmIFZCMl9TSVNCUklER0UpIHsKIAkgICAgICBTaVNfUHItPlNpU19ERENfUG9ydCA9IFNpU19Qci0+U2lTX1BhcnQ0UG9ydDsKICAgICAgICAgICAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4ID0gMHgwZjsKIAkgICB9CkBAIC05NDI5LDkzICs5MjI1LDk2IEBACiAgICAgICAgIHRlbXAgPSBteWFkYXB0bnVtOwogICAgICAgICBpZihteWFkYXB0bnVtID09IDEpIHsKICAgICAgICAgICAgdGVtcCA9IDA7Ci0JICAgaWYoVkJGbGFncyAmIFZCX0xWRFMpIGZsYWcgPSAweGZmOworCSAgIGlmKFZCRmxhZ3MyICYgVkIyX0xWRFMpIGZsYWcgPSAweGZmOwog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3J0LAotICAgICAgCQkgICAgICBTaVNfUHItPlNpU19ERENfSW5kZXgsCi0gICAgICAgICAgICAgICAgICAgICAgU2lTX1ByLT5TaVNfRERDX05EYXRhLAorCQkgICAgICBTaVNfUHItPlNpU19ERENfSW5kZXgsCisJCSAgICAgIFNpU19Qci0+U2lTX0REQ19ORGF0YSwKIAkJICAgICAgU2lTX1ByLT5TaVNfRERDX0RhdGEpOwogICAgfSBlbHNlIHsKICAgICAgIFNpU19TZXRSZWdBTkRPUihTaVNfUHItPlNpU19ERENfUG9ydCwKLSAgICAgIAkJICAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4LAotICAgICAgICAgICAgICAgICAgICAgIFNpU19Qci0+U2lTX0REQ19ORGF0YSwKKwkJICAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4LAorCQkgICAgICBTaVNfUHItPlNpU19ERENfTkRhdGEsCiAJCSAgICAgIDApOwogICAgfQogICAgU2lTX1NldFNDTEtIaWdoKFNpU19Qcik7CiB9CiAKLXN0YXRpYyBVU0hPUlQKLVNpU19Eb1Byb2JlRERDKFNpU19Qcml2YXRlICpTaVNfUHIpCitzdGF0aWMgdW5zaWduZWQgc2hvcnQKK1NpU19Eb1Byb2JlRERDKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQogewogICAgIHVuc2lnbmVkIGNoYXIgbWFzaywgdmFsdWU7Ci0gICAgVVNIT1JUICB0ZW1wLCByZXQ9MDsKKyAgICB1bnNpZ25lZCBzaG9ydCAgdGVtcCwgcmV0PTA7CiAgICAgQk9PTEVBTiBmYWlsZWQgPSBGQUxTRTsKIAogICAgIFNpU19TZXRTd2l0Y2hEREMyKFNpU19Qcik7CiAgICAgaWYoU2lTX1ByZXBhcmVEREMoU2lTX1ByKSkgewogICAgICAgICAgU2lTX1NldFN0b3AoU2lTX1ByKTsKKyNpZmRlZiBTSVNfWE9SR19YRjg2CiAjaWZkZWYgVFdERUJVRwogICAgICAgICAgeGY4NkRydk1zZygwLCBYX0lORk8sICJQcm9iZTogUHJlcGFyZSBmYWlsZWRcbiIpOwogI2VuZGlmCi0gICAgICAgICByZXR1cm4oMHhGRkZGKTsKKyNlbmRpZgorICAgICAgICAgcmV0dXJuIDB4RkZGRjsKICAgICB9CiAgICAgbWFzayA9IDB4ZjA7CiAgICAgdmFsdWUgPSAweDIwOwogICAgIGlmKFNpU19Qci0+U2lTX0REQ19EZXZpY2VBZGRyID09IDB4YTApIHsKLSAgICAgICB0ZW1wID0gKHVuc2lnbmVkIGNoYXIpU2lTX1JlYWREREMyRGF0YShTaVNfUHIsIDApOworICAgICAgIHRlbXAgPSAodW5zaWduZWQgY2hhcilTaVNfUmVhZEREQzJEYXRhKFNpU19Qcik7CiAgICAgICAgU2lTX1NlbmRBQ0soU2lTX1ByLCAwKTsKICAgICAgICBpZih0ZW1wID09IDApIHsKICAgICAgICAgICAgbWFzayA9IDB4ZmY7CkBAIC05NTIzLDM0ICs5MzIyLDQxIEBACiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgZmFpbGVkID0gVFJVRTsKIAkgICByZXQgPSAweEZGRkY7CisjaWZkZWYgU0lTX1hPUkdfWEY4NgogI2lmZGVmIFRXREVCVUcKICAgICAgICAgICAgeGY4NkRydk1zZygwLCBYX0lORk8sICJQcm9iZTogUmVhZCAxIGZhaWxlZFxuIik7CiAjZW5kaWYKKyNlbmRpZgogICAgICAgIH0KICAgICB9CiAgICAgaWYoZmFpbGVkID09IEZBTFNFKSB7Ci0gICAgICAgdGVtcCA9ICh1bnNpZ25lZCBjaGFyKVNpU19SZWFkRERDMkRhdGEoU2lTX1ByLCAwKTsKKyAgICAgICB0ZW1wID0gKHVuc2lnbmVkIGNoYXIpU2lTX1JlYWREREMyRGF0YShTaVNfUHIpOwogICAgICAgIFNpU19TZW5kQUNLKFNpU19QciwgMSk7CiAgICAgICAgdGVtcCAmPSBtYXNrOwogICAgICAgIGlmKHRlbXAgPT0gdmFsdWUpIHJldCA9IDA7CiAgICAgICA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gICAgCQkgICAgICAvKiBXcml0ZSBiaXQgKDEpIHRvIFNEICovCisJCSAgICAgIFNpU19Qci0+U2lTX0REQ19JbmRleCwKKwkJICAgICAgU2lTX1ByLT5TaVNfRERDX05EYXRhLAorCQkgICAgICBTaVNfUHItPlNpU19ERENfRGF0YSk7CQkJLyogV3JpdGUgYml0ICgxKSB0byBTRCAqLwogICAgIH0gZWxzZSB7CiAgICAgICBTaVNfU2V0UmVnQU5ET1IoU2lTX1ByLT5TaVNfRERDX1BvcnQsCi0gICAgICAJCSAgICAgIFNpU19Qci0+U2lTX0REQ19JbmRleCwKLSAgICAgICAgICAgICAgICAgICAgICBTaVNfUHItPlNpU19ERENfTkRhdGEsCi0JCSAgICAgIDB4MDApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCSAgICAgIC8qIFdyaXRlIGJpdCAoMCkgdG8gU0QgKi8KKwkJICAgICAgU2lTX1ByLT5TaVNfRERDX0luZGV4LAorCQkgICAgICBTaVNfUHItPlNpU19ERENfTkRhdGEsCisJCSAgICAgIDB4MDApOwkJCQkJLyogV3JpdGUgYml0ICgwKSB0byBTRCAqLwogICAgIH0KLSAgICBTaVNfU2V0U0NMS0hpZ2goU2lTX1ByKTsJCQkJICAgICAgICAgICAgICAgICAgICAgIC8qIFNDLT5oaWdoICovCisgICAgU2lTX1NldFNDTEtIaWdoKFNpU19Qcik7CQkJCQkvKiBTQy0+aGlnaCAqLwogICAgIGZsYWcgPj49IDE7CiAgIH0KLSAgdGVtcCA9IFNpU19DaGVja0FDSyhTaVNfUHIpOwkJCQkgICAgICAgICAgICAgICAgICAgICAgLyogQ2hlY2sgYWNrbm93bGVkZ2UgKi8KLSAgcmV0dXJuKHRlbXApOworICB0ZW1wID0gU2lTX0NoZWNrQUNLKFNpU19Qcik7CQkJCQkvKiBDaGVjayBhY2tub3dsZWRnZSAqLworICByZXR1cm4gdGVtcDsKIH0KIAotc3RhdGljIFVTSE9SVAotU2lTX1JlYWREREMyRGF0YShTaVNf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0luZm9GbGFnICYgMHg4MDAwKQorICAgICAgIHZhci0+c3luYyAmPSB+RkJfU1lOQ19WRVJUX0hJR0hfQUNUOworICAgIGVsc2UKKyAgICAgICB2YXItPnN5bmMgfD0gRkJfU1lOQ19WRVJUX0hJR0hfQUNUOworCisgICAgaWYoU2lTX1ByLT5TaVNfUmVmSW5kZXhbUlJUSV0uRXh0X0luZm9GbGFnICYgMHg0MDAwKQorICAgICAgIHZhci0+c3luYyAmPSB+RkJfU1lOQ19IT1JfSElHSF9BQ1Q7CisgICAgZWxzZQorICAgICAgIHZhci0+c3luYyB8PSBGQl9TWU5DX0hPUl9ISUdIX0FDVDsKKworICAgIHZhci0+dm1vZGUgPSBGQl9WTU9ERV9OT05JTlRFUkxBQ0VEOworICAgIGlmKFNpU19Qci0+U2lTX1JlZkluZGV4W1JSVEldLkV4dF9JbmZvRmxhZyAmIDB4MDA4MCkKKyAgICAgICB2YXItPnZtb2RlID0gRkJfVk1PREVfSU5URVJMQUNFRDsKKyAgICBlbHNlIHsKKyAgICAgICBqID0gMDsKKyAgICAgICB3aGlsZShTaVNfUHItPlNpU19FTW9kZUlEVGFibGVbal0uRXh0X01vZGVJRCAhPSAweGZmKSB7CisJICBpZihTaVNfUHItPlNpU19FTW9kZUlEVGFibGVbal0uRXh0X01vZGVJRCA9PQorCSAgICAgICAgICAgICAgICAgIFNpU19Qci0+U2lTX1JlZkluZGV4W1JSVEldLk1vZGVJRCkgeworCSAgICAgIGlmKFNpU19Qci0+U2lTX0VNb2RlSURUYWJsZVtqXS5FeHRfTW9kZUZsYWcgJiBEb3VibGVTY2FuTW9kZSkgeworCSAgICAgIAkgIHZhci0+dm1vZGUgPSBGQl9WTU9ERV9ET1VCTEU7CisJICAgICAgfQorCSAgICAgIGJyZWFrOworCSAgfQorCSAgaisrOworICAgICAgIH0KKyAgICB9CisKKyAgICBpZigodmFyLT52bW9kZSAmIEZCX1ZNT0RFX01BU0spID09IEZCX1ZNT0RFX0lOVEVSTEFDRUQp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B4NDgwICh1bmtub3duKSAqLwotCQkgMHgzMywweDMzLDB4MzMsICAgIC8qICAxMDI0eDYwMCAodW5rbm93bikgKi8KLQkJIDB4MzMsMHgzMywweDMzLCAgICAvKiAgMTE1Mng4NjQgKHVua25vd24pICovCi0JCSAweDMzLDB4MzMsMHgzMywgICAgLyogIDEyODB4OTYwIChndWVzc2VkKSAqLwotCQkgMHgzMywweDMzLDB4MzMsICAgIC8qICAxMTUyeDc2OCAodW5rbm93bikgKi8KLQkJIDB4MzMsMHgzMywweDMzLCAgICAvKiAxNDAweDEwNTAgKi8KLQkJIDB4MzMsMHgzMywweDMzLCAgICAvKiAgMTI4MHg3NjggIChndWVzc2VkKSAqLwotCQkgMHgzMywweDMzLDB4MzMsICAgIC8qIDE2MDB4MTIwMCAqLwotCQkgMHgzMywweDMzLDB4MzMsCi0JCSAweDMzLDB4MzMsMHgzMywKLQkJIDB4MzMsMHgzMywweDMzLAotCQkgMHgzMywweDMzLDB4MzMKKwkweDMzLDB4MzMsMHgzMywgICAgLyogICA4MDB4NjAwIChndWVzc2VkKSAtIG5ldzogUGFuZWxUeXBlLCBub3QgUGFuZWxSZXMgISAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgMTAyNHg3NjggKi8KKwkweDMzLDB4MzMsMHgzMywgICAgLyogMTI4MHgxMDI0ICovCisJMHgzMywweDMzLDB4MzMsICAgIC8qICAgNjQweDQ4MCAodW5rbm93bikgKi8KKwkweDMzLDB4MzMsMHgzMywgICAgLyogIDEwMjR4NjAwICh1bmtub3duKSAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgMTE1Mng4NjQgKHVua25vd24pICovCisJMHgzMywweDMzLDB4MzMsICAgIC8qICAxMjgweDk2MCAoZ3Vlc3NlZCkgKi8KKwkweDMzLDB4MzMsMHgzMywgICAgLyogIDExNTJ4NzY4ICh1bmtub3duKSAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAxNDAweDEwNTAgKi8KKwkweDMzLDB4MzM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AwICovCi0JCSAweDMzLDB4MzMsMHgzMywKLQkJIDB4MzMsMHgzMywweDMzLAotCQkgMHgzMywweDMzLDB4MzMsCi0JCSAweDMzLDB4MzMsMHgzMworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgIDgwMHg2MDAgKGd1ZXNzZWQpICovCisJMHgzMywweDMzLDB4MzMsICAgIC8qICAxMDI0eDc2OCAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAxMjgweDEwMjQgKi8KKwkweDMzLDB4MzMsMHgzMywgICAgLyogICA2NDB4NDgwICh1bmtub3duKSAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgMTAyNHg2MDAgKHVua25vd24pICovCisJMHgzMywweDMzLDB4MzMsICAgIC8qICAxMTUyeDg2NCAodW5rbm93bikgKi8KKwkweDMzLDB4MzMsMHgzMywgICAgLyogIDEyODB4OTYwIChndWVzc2VkKSAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgMTE1Mng3NjggKHVua25vd24pICovCisJMHgzMywweDMzLDB4MzMsICAgIC8qIDE0MDB4MTA1MCAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAgMTI4MHg3NjggIChndWVzc2VkKSAqLworCTB4MzMsMHgzMywweDMzLCAgICAvKiAxNjAweDEyMDAgKi8KKwkweDMzLDB4MzMsMHgzMywKKwkweDMzLDB4MzMsMHgzMywKKwkweDMzLDB4MzMsMHgzMywKKwkweDMzLDB4MzMsMHgzMwogfTsKIAotc3RhdGljIGNvbnN0IFVDSEFSIFNpUzMxMF9MQ0REZWxheUNvbXBlbnNhdGlvbl8zeHgzMDFCW10gPQkgICAJLyogMzB4QiAqLworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGNoYXIgU2lTMzEwX0xDRERlbGF5Q29tcGVuc2F0aW9uXzN4eDMwMUJbXSA9CSAgIAkvKiAzMHhCICovCiB7Ci0JCSAweDAxLDB4MDEsMHgwMSwgICAgLyogICA4MDB4NjAwICovCi0JCSAweDBDLDB4MEMsM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c3RyaWEKKyAqIENvcHlyaWdodCAoQykgMjAwMS0yMDA1IGJ5IFRob21hcyBXaW5pc2NoaG9mZXIsIFZpZW5uYSwgQXVzdHJpYQogICoKICAqIElmIGRpc3RyaWJ1dGVkIGFzIHBhcnQgb2YgdGhlIExpbnV4IGtlcm5lbCwgdGhlIGZvbGxvd2luZyBsaWNlbnNlIHRlcm1zCiAgKiBhcHBseToKQEAgLTU1LDggKzU1LDExIEBACiAjZGVmaW5lIF9TSVNfT1NERUZfSF8KIAogLyogVGhlIGNob2ljZXMgYXJlOiAqLwotI2RlZmluZSBMSU5VWF9LRVJORUwJICAgLyogTGludXgga2VybmVsIGZyYW1lYnVmZmVyICovCi0vKiAjZGVmaW5lIExJTlVYX1hGODYgKi8gICAvKiBYRnJlZTg2L1gub3JnICovCisjZGVmaW5lIFNJU19MSU5VWF9LRVJORUwJCS8qIExpbnV4IGtlcm5lbCBmcmFtZWJ1ZmZlciAqLworI3VuZGVmICBTSVNfWE9SR19YRjg2CQkJLyogWEZyZWU4Ni9YLm9yZyAqLworCisjdW5kZWYgU0lTX0xJTlVYX0tFUk5FTF8yNAorI3VuZGVmIFNJU19MSU5VWF9LRVJORUxfMjYKIAogI2lmZGVmIE91dFBvcnRCeXRlCiAjdW5kZWYgT3V0UG9ydEJ5dGUKQEAgLTg2LDggKzg5LDkgQEAKIC8qICBMSU5VWCBLRVJORUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNpZmRlZiBMSU5VWF9LRVJORUwKKyNpZmRlZiBTSVNfTElOVVhfS0VSTkVMCiAjaW5jbHVkZSA8bGludXgvY29uZmlnLmg+CisjaW5jbHVkZSA8bGludXgvdmVyc2lvbi5oPgogCiAjaWZkZWYgQ09ORklHX0ZCX1NJU18zMDAKICNkZWZpbmUgU0lTMzAwCkBAIC05Nyw2ICsxMDEsMTIgQEAKICNkZWZpbmUgU0lTMzE1SAogI2VuZGlmCiAKKyNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPj0gS0VSTkVMX1ZFUlNJT04oMiw1LDApCisjZGVmaW5lIFNJU19MSU5VWF9LRVJORUxfMjYKKyNlbHNlCisjZGVmaW5lIFNJU19MSU5VWF9LRVJORUxfMjQKKyNlbmRpZgorCiAjaWYgIWRlZmluZWQoU0lTMzAwKSAmJiAhZGVmaW5lZChTSVMzMTVIKQogI3dhcm5pbmcgTmVpdGhlciBDT05GSUdfRkJfU0lTXzMwMCBub3IgQ09ORklHX0ZCX1NJU18zMTUgaXMgc2V0CiAjd2FybmluZyBzaXNmYiB3aWxsIG5vdCB3b3JrIQpAQCAtMTA5LDEzICsxMTksMTUgQEAKICNkZWZpbmUgSW5Qb3J0V29yZChwKSAgICBpbncoKFNJU0lPQUREUkVTUykocCkpCiAjZGVmaW5lIEluUG9ydExvbmcocCkgICAgaW5sKChTSVNJT0FERFJFU1MpKHApKQogI2RlZmluZSBTaVNfU2V0TWVtb3J5KE1lbW9yeUFkZHJlc3MsTWVtb3J5U2l6ZSx2YWx1ZSkgbWVtc2V0X2lvKE1lbW9yeUFkZHJlc3MsIHZhbHVlLCBNZW1vcnlTaXplKQotI2VuZGlmCisKKyNlbmRpZiAvKiBMSU5VWF9LRVJORUwgKi8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgWEZyZWU4Ni9YLm9yZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNpZmRlZiBMSU5VWF9YRjg2CisjaWZkZWYgU0lTX1hPUkdfWEY4NgorCiAjZGVmaW5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UgQ09NTUFORF9RVUVVRV9USFJFU0hPTEQgICAweDFGCi0jZGVmaW5lIEhXX0NVUlNPUl9BUkVBX1NJWkVfMzE1ICAgMHg0MDAwICAvKiAxNksgKi8KKyNkZWZpbmUgQ09NTUFORF9RVUVVRV9BUkVBX1NJWkUJKDUxMiAqIDEwMjQpCS8qIDUxMksgKi8KKyNkZWZpbmUgQ09NTUFORF9RVUVVRV9BUkVBX1NJWkVfWjcgKDEyOCAqIDEwMjQpCS8qIDEyOGsgZm9yIFhHSSBaNyAqLworI2RlZmluZSBIV19DVVJTT1JfQVJFQV9TSVpFXzMxNQkxNjM4NAkJLyogMTZLICovCisjZGVmaW5lIENPTU1BTkRfUVVFVUVfVEhSRVNIT0xECTB4MUYKIAotI2RlZmluZSBTSVNfT0hfQUxMT0NfU0laRSAgICAgICAgIDQwMDAKLSNkZWZpbmUgU0VOVElORUwgICAgICAgICAgICAgICAgICAweDdmZmZmZmZmCisjZGVmaW5lIFNJU19PSF9BTExPQ19TSVpFCTQwMDAKKyNkZWZpbmUgU0VOVElORUwJCTB4N2ZmZmZmZmYKIAotI2RlZmluZSBTRVFfQURSICAgICAgICAgICAgICAgICAgIDB4MTQKLSNkZWZpbmUgU0VRX0RBVEEgICAgICAgICAgICAgICAgICAweDE1Ci0jZGVmaW5lIERBQ19BRFIgICAgICAgICAgICAgICAgICAgMHgxOAotI2RlZmluZSBEQUNfREFUQSAgICAgICAgICAgICAgICAgIDB4MTkKLSNkZWZpbmUgQ1JUQ19BRFIgICAgICAgICAgICAgICAgICAweDI0Ci0jZGVmaW5lIENSVENfREFUQSAgICAgICAgICAgICAgICAgMHgyNQotI2RlZmluZSBEQUMyX0FEUiAgICAgICAgICAgICAgICAgICgweDE2LTB4MzApCi0jZGVmaW5lIERBQzJfREFUQSAgICAgICAgICAgICAgICAgKDB4MTctMHgzMCkKLSNkZWZpbmUgVkJfUEFSVDFfQURSICAgICAgICAgICAgICAoMHgwNC0weDMwKQotI2RlZmluZSBWQl9QQ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JCQlicmVhazsKKwkJY2FzZSBGQl9CTEFOS19WU1lOQ19TVVNQRU5EOgkvKiBubyB2c3luYyAqLworCQkJc3IwMSAgPSAweDIwOworCQkJc3IxMSAgPSAweDA4OworCQkJc3IxZiAgPSAweDgwOworCQkJY3I2MyAgPSAweDQwOworCQkJcDJfMCAgPSAweDQwOworCQkJcDFfMTMgPSAweDgwOworCQkJYmFja2xpZ2h0ID0gRkFMU0U7CisJCQlicmVhazsKKwkJY2FzZSBGQl9CTEFOS19IU1lOQ19TVVNQRU5EOgkvKiBubyBoc3luYyAqLworCQkJc3IwMSAgPSAweDIwOworCQkJc3IxMSAgPSAweDA4OworCQkJc3IxZiAgPSAweDQwOworCQkJY3I2MyAgPSAweDQwOworCQkJcDJfMCAgPSAweDgwOworCQkJcDFfMTMgPSAweDQwOworCQkJYmFja2xpZ2h0ID0gRkFMU0U7CisJCQlicmVhazsKKwkJY2FzZSBGQl9CTEFOS19QT1dFUkRPV046CS8qIG9mZiAqLworCQkJc3IwMSAgPSAweDIwOworCQkJc3IxMSAgPSAweDA4OworCQkJc3IxZiAgPSAweGMwOworCQkJY3I2MyAgPSAweDQwOworCQkJcDJfMCAgPSAweGMwOworCQkJcDFfMTMgPSAweGMwOworCQkJYmFja2xpZ2h0ID0gRkFMU0U7CisJCQlicmVhazsKKwkJZGVmYXVsdDoKKwkJCXJldHVybiAxOworCX0KIAotICAgaWYoaXZpZGVvLT5jdXJyZW50dmJmbGFncyAmIFZCX0RJU1BUWVBFX0NSVDEpIHsKKwlpZihpdmlkZW8tPmN1cnJlbnR2YmZsYWdzICYgVkJfRElTUFRZUEVfQ1JUMSkgewogCi0gICAgICBpZiggKCFpdmlkZW8tPnNpc2ZiX3RoaXNtb25pdG9yLmRhdGF2YWxpZCkgfHwKLSAgICAgICAgICAoKGl2aWRlby0+c2lzZmJfdGhpc21vbml0b3IuZGF0YXZhbGlkKSAmJgotICAgICAgICAgICAoaXZpZGVvLT5zaXNmYl90aGlzbW9uaXRvci5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21wdHIgPiAoMHgxMDAwMCAtIDgpKSB7Ci0JICAgICAgIGlvdW5tYXAocm9tX2Jhc2UpOwotCSAgICAgICBjb250aW51ZTsKLQkgICAgfQorCQlpZigobXlyb21iYXNlID0gdm1hbGxvYyg2NTUzNikpKQorCQkJbWVtY3B5X2Zyb21pbyhteXJvbWJhc2UsIHJvbV9iYXNlLCA2NTUzNik7CiAKLQkgICAgcm9tID0gcm9tX2Jhc2UgKyByb21wdHI7CisJCWlvdW5tYXAocm9tX2Jhc2UpOworCQlicmVhazsKIAotCSAgICBpZigocmVhZGIocm9tKSAgICAgIT0gJ1AnKSB8fCAocmVhZGIocm9tICsgMSkgIT0gJ0MnKSB8fAotCSAgICAgICAocmVhZGIocm9tICsgMikgIT0gJ0knKSB8fCAocmVhZGIocm9tICsgMykgIT0gJ1InKSkgewotCSAgICAgICBpb3VubWFwKHJvbV9iYXNlKTsKLQkgICAgICAgY29udGludWU7Ci0JICAgIH0KLQotCSAgICBwY2lpZCA9IHJlYWRiKHJvbSArIDQpIHwgKHJlYWRiKHJvbSArIDUpIDw8IDgpOwotCSAgICBpZihwY2lpZCAhPSAweDEwMzkpIHsKLQkgICAgICAgaW91bm1hcChyb21fYmFzZSk7Ci0JICAgICAgIGNvbnRpbnVlOwotCSAgICB9Ci0KLQkgICAgcGNpaWQgPSByZWFkYihyb20gKyA2KSB8IChyZWFkYihyb20gKyA3KSA8PCA4KTsKLQkgICAgaWYocGNpaWQgPT0gaXZpZGVvLT5jaGlwX2lkKSB7Ci0JICAgICAgIG1lbWNweV9mcm9taW8obXlyb21iYXNlLCByb21fYmFzZSwgNjU1MzYpOwotCSAgICAgICBpb3VubWFwKHJvbV9iYXNlKTsKLQkgICAgICAgcmV0dXJuIG15cm9tYmFzZTsKLQkgICAgfQotCi0JICAgIGlvdW5tYXAocm9tX2Jhc2UpOwogICAgICAgICB9CiAKICNlbHNlCkBAIC00MDM0LDc1MiArNDI4NiwxNjAzIEBACiAKIAlyb21fYmFzZSA9I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ayA9IDE2OwotICAgCURvbmUgPSAwOwotICAgCWZvcihpID0gNjsgaSA+PSAwOyBpLS0pIHsKLSAgICAgIAkgICBpZihEb25lKSBicmVhazsKLSAgICAgIAkgICBQc2V1ZG9SYW5rQ2FwYWNpdHkgPSAxIDw8IGk7Ci0gICAgICAJICAgZm9yKGogPSA0OyBqID49IDE7IGotLSkgewotICAgICAgICAgICAgICBpZihEb25lKSBicmVhazsKLSAgICAgICAgICAgICAgUHNldWRvVG90YWxDYXBhY2l0eSA9IFBzZXVkb1JhbmtDYXBhY2l0eSAqIGo7Ci0gICAgICAgICAgICAgIFBzZXVkb0FkclBpbkNvdW50ID0gMTUgLSBqOwotICAgICAgICAgICAgICBpZihQc2V1ZG9Ub3RhbENhcGFjaXR5IDw9IDY0KSB7Ci0gICAgICAgICAgICAgICAgIGZvcihrID0gMDsgayA8PSAxNjsgaysrKSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmKERvbmUpIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBSYW5rQ2FwYWNpdHkgPSBidXN3aWR0aCAqIFNpU19EUkFNVHlwZVtrXVszXTsKLSAgICAgICAgICAgICAgICAgICAgQWRyUGluQ291bnQgPSBTaVNfRFJBTVR5cGVba11bMl0gKyBTaVNfRFJBTVR5cGVba11bMF07Ci0gICAgICAgICAgICAgICAgICAgIGlmKFJhbmtDYXBhY2l0eSA9PSBQc2V1ZG9SYW5rQ2FwYWNpdHkpCi0gICAgICAgICAgICAgICAgICAgICAgIGlmKEFkclBpbkNvdW50IDw9IFBzZXVkb0FkclBpbkNvdW50KSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGogPT0gMykgeyAgICAgICAgICAgICAvKiBSYW5rIE5vICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhbmtOdW1IaWdoID0gUmFua0NhcGFjaXR5ICogTUIyQmFuayAqIDMgLSAxOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYW5rTnVtTWlkICA9IFJhbmtDYXBhY2l0eSAqIE1CMkJhbmsgKiAxIC0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFua051bUhpZ2ggPSBSYW5rQ2FwYWNpdHkgKiBNQjJCYW5rICogaiAtIDE7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhbmtOdW1NaWQgID0gUmFua0NhcGFjaXR5ICogTUIyQmFuayAqIGogLyAyIC0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgICBQYWdlQ2FwYWNpdHkgPSAoMSA8PCBTaVNfRFJBTVR5cGVba11bMV0pICogYnVzd2lkdGggKiA0OwotICAgICAgICAgICAgICAgICAgICAgICAgICBQaHlzaWNhbEFkckhpZ2ggPSBCYW5rTnVtSGlnaDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgUGh5c2ljYWxBZHJIYWxmUGFnZSA9IChQYWdlQ2FwYWNpdHkgLyAyICsgUGh5c2ljYWxBZHJIaWdoKSAlIFBhZ2VDYXBhY2l0eTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgUGh5c2ljYWxBZHJPdGhlclBhZ2UgPSBQYWdlQ2FwYWNpdHkgKiBTaVNfRFJBTVR5cGVba11bMl0gKyBQaHlzaWNhbEFkckhpZ2g7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFdyaXRlIGRhdGEgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kU0lTSURYUkVHKFNJU1NSLDB4MTUsMHhGQik7IC8qIFRlc3QgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgb3JTSVNJRFhSRUcoU0lTU1IsMHgxNSwweDA0KTsgIC8qIFRlc3QgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgVG90YWxDYXBhY2l0eSA9IFNpU19EUkFNVHlwZVtrXVszXSAqIGJ1c3dpZHRoOwotICAgICAgICAgICAgICAgICAgICAgICAgICBzcjEzID0gU2lTX0RSQU1UeXBlW2tdWzRdOwotICAgICAgICAgICAgICAgICAgICAgICAgICBpZihidXN3aWR0aCA9PSA0KSBzcjE0ID0gKFRvdGFsQ2FwYWNpdHkgLSAxKSB8IDB4ODA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGJ1c3dpZHRoID09IDIpIHNyMTQgPSAoVG90YWxDYXBhY2l0eSAtIDEpIHwgMHg0MDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYnVzd2lkdGggPT0gMSkgc3IxNCA9IChUb3RhbENhcGFjaXR5IC0gMSkgfCAweDAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRTSVNJRFhSRUcoU0lTU1IsMHgxMyxzcjEzKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0U0lTSURYUkVHKFNJU1NSLDB4MTQsc3IxNCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIEFkZHIgPSBGQkFkZHIgKyBCYW5rTnVtSGlnaCAqIDY0ICogMTAyNCArIFBoeXNpY2FsQWRySGlnaDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgLyogKigoVVNIT1JUICopKEFkZHIpKSA9IChVU0hPUlQpUGh5c2ljYWxBZHJIaWdoOyAqLwotCQkJICB3cml0ZXcoKChVU0hPUlQpUGh5c2ljYWxBZHJIaWdoKSwgQWRkcik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIEFkZHIgPSBGQkFkZHIgKyBCYW5rTnVtTWlkICogNjQgKiAxMDI0ICsgUGh5c2ljYWxBZHJIaWdoOwotICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAqKChVU0hPUlQgKikoQWRkcikpID0gKFVTSE9SVClCYW5rTnVtTWlkOyAqLwotCQkJICB3cml0ZXcoKChVU0hPUlQpQmFua051bU1pZCksIEFkZHIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRyID0gRkJBZGRyICsgQmFua051bUhpZ2ggKiA2NCAqIDEwMjQgKyBQaHlzaWNhbEFkckhhbGZQYWdlOwotICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAqKChVU0hPUlQgKikoQWRkcikpID0gKFVTSE9SVClQaHlzaWNhbEFkckhhbGZQYWdlOyAqLwotCQkJICB3cml0ZXcoKChVU0hPUlQpUGh5c2ljYWxBZHJIYWxmUGFnZSksIEFkZHIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRyID0gRkJBZGRyICsgQmFua051bUhpZ2ggKiA2NCAqIDEwMjQgKyBQaHlzaWNhbEFkck90aGVyUGFnZTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgLyogKigoVVNIT1JUICopKEFkZHIpKSA9IFBoeXNpY2FsQWRyT3RoZXJQYWdlOyAqLwotCQkJICB3cml0ZXcoKChVU0hPUlQpUGh5c2ljYWxBZHJPdGhlclBhZ2UpLCBBZGRyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgLyogUmVhZCBkYXRhICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgIEFkZHIgPSBGQkFkZHIgKyBCYW5rTnVtSGlnaCAqIDY0ICogMTAyNCArIFBoeXNpY2FsQWRySGlnaDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IHJlYWR3KEFkZHIpOyAvKiAqKChVU0hPUlQgKikoQWRkcikpOyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhID09IFBoeXNpY2FsQWRySGlnaCkgRG9uZSA9IDE7Ci0gICAgICAgICAgICAgICAgICAgICAgIH0gIC8qIGlmICovCi0gICAgICAgICAgICAgICAgIH0gIC8qIGZvciBrICovCi0gICAgICAgICAgICAgIH0gIC8qIGlmICovCi0gICAgICAJICAgfSAgLyogZm9yIGogKi8KLSAgIAl9ICAvKiBmb3IgaSAqLworCWZvcihpID0gNjsgaSA+PSAwOyBpLS0pIHsKKwkJUHNldWRvUmFua0NhcGFjaXR5ID0gMSA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AgICAgICAwLCAgICAgMHhERSwJICAgICAzN30sIC8qICA3NS4wMCBNSHogKi8KLSAgICB7MTAwLCAgICAgIDAsICAgNywgICAgICAgMCwgICAgIDB4RTAsICAgICAgICAyOH0sIC8qIDEwMC4wMCBNSHogKi8KLSAgICB7MTI1LCAgICAgIDAsICAgOSwgICAgICAgMCwgICAgIDB4RTAsICAgICAgICAyMn0sIC8qIDEyNS4wMCBNSHogKi8KLSAgICB7MTUwLCAgICAgIDAsICAgMTEsICAgICAgMCwgICAgIDB4RTAsICAgICAgICAxN30sIC8qIDE1MC4wMCBNSHogKi8KLSAgICB7ICAwLCAgICAgIDAsICAgMCwgICAgICAgMCwgICAgICAgIDAsICAgICAgICAgMH0gIC8qIFRlcm1pbmF0b3IgKi8KKy8qIFRoZSBQTEwgRm91dCBpcyBkZXRlcm1pbmVkIGJ5IChYdGFsRnJlcS8oTSsxKSkgKiAoKE5faW50KzEpICsgKE5fZmFjLzgpKSAqLworCisvKiAxMi41TUh6IENyeXN0YWwgUExMIFRhYmxlICovCitzdGF0aWMgc3RydWN0IHcxMDBfcGxsX2luZm8geHRhbF8xMjUwMDAwMFtdID0geworCS8qZnJlcSAgICAgTSAgIE5faW50ICAgIE5fZmFjICB0ZmdvYWwgIGxvY2tfdGltZSAqLworCXsgNTAsICAgICAgMCwgICAxLCAgICAgICAwLCAgICAgMHhlMCwgICAgICAgIDU2fSwgIC8qICA1MC4wMCBNSHogKi8KKwl7IDc1LCAgICAgIDAsICAgNSwgICAgICAgMCwgICAgIDB4ZGUsICAgICAgICAzN30sICAvKiAgNzUuMDAgTUh6ICovCisJezEwMCwgICAgICAwLCAgIDcsICAgICAgIDAsICAgICAweGUwLCAgICAgICAgMjh9LCAgLyogMTAwLjAwIE1IeiAqLworCXsxMjUsICAgICAgMCwgICA5LCAgICAgICAwLCAgICAgMHhlMCwgICAgICAgIDIyfSwgIC8qIDEyNS4wMCBNSHogKi8KKwl7MTUwLCAgICAgIDAsICAgMTEsICAgICAgMCwgICAgIDB4ZTAsICAgICAgICAxN30sICAvKiAxNTAuMDAgTUh6ICovCisJeyAgMCwgICAgICAwLCAgIDAsICAgICAgIDAsICAgICAgICAwLCAgICAgICAgIDB9LCAgLyogVGVybWluYXRvciAqLwogfTsKIAorLyogMTQuMzE4TUh6IENyeXN0YWwgUExMIFRhYmxlICovCitzdGF0aWMgc3RydWN0IHcxMDBfcGxsX2luZm8geHRhbF8xNDMxODAwMFtdID0geworCS8qZnJlcSAgICAgTSAgIE5faW50ICAgIE5fZmFjICB0ZmdvYWwgIGxvY2tfdGltZSAqLworCXsgNDAsICAgICAgNCwgICAxMywgICAgICAwLCAgICAgMHhlMCwgICAgICAgIDgwfSwgLyogdGZnb2FsIGd1ZXNzZWQgKi8KKwl7IDUwLCAgICAgIDEsICAgNiwgICAgICAgMCwgICAgIDB4ZTAsCSAgICAgNjR9LCAvKiAgNTAuMDUgTUh6ICovCisJeyA1NywgICAgICAyLCAgIDExLCAgICAgIDAsICAgICAweGUwLCAgICAgICAgNTN9LCAvKiB0ZmdvYWwgZ3Vlc3NlZCAqLworCXsgNzUsICAgICAgMCwgICA0LCAgICAgICAzLCAgICAgMHhlMCwJICAgICA0M30sIC8qICA3NS4wOCBNSHogKi8KKwl7MTAwLCAgICAgIDAsICAgNiwgICAgICAgMCwgICAgIDB4ZTAsICAgICAgICAzMn0sIC8qIDEwMC4xMCBNSHogKi8KKwl7ICAwLCAgICAgIDAsICAgMCwgICAgICAgMCwgICAgICAgIDAsICAgICAgICAgMH0sCit9OwogCi1zdGF0aWMgdTggdzEwMF9wbGxfZ2V0X3Rlc3Rjb3VudCh1OCB0ZXN0Y2xrX3NlbCkKKy8qIDE2TUh6IENyeXN0YWwgUExMIFRhYmxlICovCitzdGF0aWMgc3RydWN0IHcxMDBfcGxsX2luZm8geHRhbF8xNjAwMDAwMFtdID0geworCS8qZnJlcSAgICAgTSAgIE5faW50ICAgIE5fZmFjICB0ZmdvYWwgIGxvY2tfdGltZSAqLworCXsgNz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BzdHJ1Y3QgY2ZncmVnX2Jhc2VfdCB7Ci0gICAgIHVuc2lnbmVkIGxvbmcgY2ZncmVnX2Jhc2UgICAgICA6IDI0OwotICAgICB1bnNpZ25lZCBsb25nICAgIAkJCQk6IDg7CisJdW5zaWduZWQgbG9uZyBjZmdyZWdfYmFzZSAgOiAyNDsKKwl1bnNpZ25lZCBsb25nICAgICAgICAgICAgICA6IDg7CiB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwogCiB1bmlvbiBjZmdyZWdfYmFzZV91IHsKLSAgICAgdW5zaWduZWQgbG9uZyB2YWwgOiAzMjsKLSAgICAgc3RydWN0IGNmZ3JlZ19iYXNlX3QgZjsKKwl1bnNpZ25lZCBsb25nIHZhbCA6IDMyOworCXN0cnVjdCBjZmdyZWdfYmFzZV90IGY7CiB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwogCiBzdHJ1Y3QgY2lmX2lvX3QgewotICAgICB1bnNpZ25lZCBsb25nIGRxX3NycCAgICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIGRxX3NybiAgICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIGRxX3NwICAgICAgICAgICAgOiA0OwotICAgICB1bnNpZ25lZCBsb25nIGRxX3NuICAgICAgICAgICAgOiA0OwotICAgICB1bnNpZ25lZCBsb25nIHdhaXRiX3NycCAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHdhaXRiX3NybiAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHdhaXRiX3NwICAgICAgICAgOiA0OwotICAgICB1bnNpZ25lZCBsb25nIHdhaXRiX3NuICAgICAgICAgOiA0OwotICAgICB1bnNpZ25lZCBsb25nIGludGJfc3JwICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIGludGJfc3JuICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIGludGJfc3AgICAgICAgICAgOiA0OwotICAgICB1bnNp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vbmcgZGlzX3RpbWVvdXRfZHVyaW5nX3JiYm0gICAgICAgOiAxOworCXVuc2lnbmVkIGxvbmcgZGlzX3BhY2tlcl9mdWxfZHVyaW5nX3JiYm1fdGltZW91dCA6IDE7CisJdW5zaWduZWQgbG9uZyBlbl9kd29yZF9zcGxpdF90b19yYmJtICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlbl9kdW1teV92YWwgICAgICAgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBkdW1teV92YWxfc2VsICAgICAgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBtYXNrX3BtNF93cnB0cl9kZWMgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBkaXNfbWNfY2xlYW5fY29uZCAgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlcnJfdHdvX3JlcWlfZHVyaW5nX2Z1bCAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlcnJfcmVxaV9kdXJpbmdfaWRsZV9jbGsgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlcnJfZ2xvYmFsICAgICAgICAgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlbl93cl9idWZfZGJnX2xvYWQgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlbl93cl9idWZfZGJnX3BhdGggICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBzZWxfd3JfYnVmX2J5dGUgICAgICAgICAgICAgICA6IDM7CisJdW5zaWduZWQgbG9uZyBkaXNfcmRfZmx1c2hfd3IgICAgICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBkaXNfcGFja2VyX2Z1bF9jb25kICAgICAgICAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBkaXNfaW52YWxpZGF0ZV9ieV9vcHNfY2hubCAgICA6IDE7CisJdW5zaWduZWQgbG9uZyBlbl9oYWx0X3doZW5fcmVxaV9lcnIgICAg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l9mYl9kaXZfdCBmOwogfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKIAogc3RydWN0IHBsbF9jbnRsX3QgewotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wd2RuICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9yZXNldCAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wbV9lbiAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9tb2RlICAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9yZWZjbGtfc2VsICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9mYmNsa19zZWwgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF90Y3BvZmYgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wY3AgICAgICAgICAgOiAzOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wdmcgICAgICAgICAgOiAzOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF92Y29mciAgICAgICAgOiAxOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9pb2Zmc2V0ICAgICAgOiAyOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wZWNjX21vZGUgICAgOiAyOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9wZWNjX3Njb24gICAgOiAyOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9kYWN0YWwgICAgICAgOiA0OwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9jcF9jbGlwICAgICAgOiAyOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9jb25mICAgICAgICAgOiAzOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9tYmN0cmwgICAgICAgOiAyOwotICAgICB1bnNpZ25lZCBsb25nIHBsbF9yaW5nX29mZiAgICAgOiAxOworCXVuc2lnbmVkIGxvbmcgcGxsX3B3ZG4gICAgICAgIDogMTsKKwl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OworCX0gd2hpbGUgKGNvdW50KTsKKworCXJldHVybiB0b3RhbDsKK30KKworLyoqCisgKiB2OWZzX2ZpbGVfcmVhZCAtIHJlYWQgZnJvbSBhIGZpbGUKKyAqIEBmaWxlcDogZmlsZSBwb2ludGVyIHRvIHJlYWQKKyAqIEBkYXRhOiBkYXRhIGJ1ZmZlciB0byByZWFkIGRhdGEgaW50bworICogQGNvdW50OiBzaXplIG9mIGJ1ZmZlcgorICogQG9mZnNldDogb2Zmc2V0IGF0IHdoaWNoIHRvIHJlYWQgZGF0YQorICoKKyAqLworCitzdGF0aWMgc3NpemVfdAordjlmc19maWxlX3JlYWQoc3RydWN0IGZpbGUgKmZpbHAsIGNoYXIgX191c2VyICogZGF0YSwgc2l6ZV90IGNvdW50LAorCSAgICAgICBsb2ZmX3QgKiBvZmZzZXQpCit7CisJaW50IHJldHZhbCA9IC0xOworCWludCByZXQgPSAwOworCWNoYXIgKmJ1ZmZlcjsKKworCWJ1ZmZlciA9IGttYWxsb2MoY291bnQsIEdGUF9LRVJORUwpOworCWlmICghYnVmZmVyKQorCQlyZXR1cm4gLUVOT01FTTsKKworCXJldHZhbCA9IHY5ZnNfcmVhZChmaWxwLCBidWZmZXIsIGNvdW50LCBvZmZzZXQpOworCWlmIChyZXR2YWwgPiAwKSB7CisJCWlmICgocmV0ID0gY29weV90b191c2VyKGRhdGEsIGJ1ZmZlciwgcmV0dmFsKSkgIT0gMCkgeworCQkJZHByaW50ayhERUJVR19FUlJPUiwgIlByb2JsZW0gY29weWluZyB0byB1c2VyICVkXG4iLAorCQkJCXJldCk7CisJCQlyZXR2YWwgPSByZXQ7CisJCX0KKwl9CisKKwlrZnJlZShidWZmZXIpOworCisJcmV0dXJuIHJldHZhbDsKK30KKworLyoqCisgKiB2OWZzX3dyaXRlIC0gd3JpdGUgdG8gYSBmaWxlCisgKiBAZmlsZXA6IGZpbGUgcG9pbnRlciB0byB3cml0ZQorICogQGRhdGE6IGRhdGEgYnVmZmVyIHRvIHdy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wYXRobmFtZSAqLworI2RlZmluZSBBQ1BJX1BBVEhOQU1FX01BWCAgICAgICAgICAgICAgIDI1NgkvKiBBIGZ1bGwgbmFtZXNwYWNlIHBhdGhuYW1lICovCiAKIC8qIE1heGltdW0gY291bnQgZm9yIGEgc2VtYXBob3JlIG9iamVjdCAqLwogCkBAIC0xMTgsNyArMTE1LDYgQEAKIAogI2RlZmluZSBBQ1BJX1NZU01FTV9SRUdJT05fV0lORE9XX1NJWkUgIDQwOTYKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogQUNQSSBTcGVjaWZpY2F0aW9uIGNvbnN0YW50cyAoRG8gbm90IGNoYW5nZSB1bmxlc3MgdGhlIHNwZWNpZmljYXRpb24gY2hhbmdlcykKQEAgLTE1NiwxNSArMTUyLDE1IEBACiAvKiBOYW1lcyB3aXRoaW4gdGhlIG5hbWVzcGFjZSBhcmUgNCBieXRlcyBsb25nICovCiAKICNkZWZpbmUgQUNQSV9OQU1FX1NJWkUgICAgICAgICAgICAgICAgICA0Ci0jZGVmaW5lIEFDUElfUEFUSF9TRUdNRU5UX0xFTkdUSCAgICAgICAgNSAgICAgICAgICAgLyogNCBjaGFycyBmb3IgbmFtZSArIDEgY2hhciBmb3Igc2VwYXJhdG9yICovCisjZGVmaW5lIEFDUElfUEFUSF9TRUdNRU5UX0xFTkdUSCAgICAgICAgNQkvKiA0IGNoYXJzIGZvciBuYW1lICsgMSBjaGFyIGZvciBzZXBhcmF0b3IgKi8KICNkZWZpbmUgQUNQSV9QQVRIX1NFUEFSQVRPUiAgICAgICAgICAgICAnLicKIAogLyogQ29uc3RhbnRzIHVzZWQgaW4gc2VhcmNoaW5nIGZvciB0aGUgUlNEUCBpbiBsb3cgbWVtb3J5ICovCiAKLSNkZWZpbmUgQUNQSV9FQkRBX1BUUl9MT0NBVElPTiAgICAgICAgICAweDAwMDAwNDBFICAgICAvKiBQaHlzaWNhbCBBZGRyZXNzICovCisjZGVmaW5lIEFDUElfRUJEQV9QVFJfTE9DQVRJT04gICAgICAgICAgMHgwMDAwMDQwRQkvKiBQaHlzaWNhbCBBZGRyZXNzICovCiAjZGVmaW5lIEFDUElfRUJEQV9QVFJfTEVOR1RIICAgICAgICAgICAgMgogI2RlZmluZSBBQ1BJX0VCREFfV0lORE9XX1NJWkUgICAgICAgICAgIDEwMjQKLSNkZWZpbmUgQUNQSV9ISV9SU0RQX1dJTkRPV19CQVNFICAgICAgICAweDAwMEUwMDAwICAgICAvKiBQaHlzaWNhbCBBZGRyZXNzICovCisjZGVmaW5lIEFDUElfSElfUlNEUF9XSU5ET1dfQkFTRSAgICAgICAgMHgwMDBFMDAwMAkvKiBQaHlzaWNhbCBBZGRyZXNzICovCiAjZGVmaW5lIEFDUElfSElfUlNEUF9XSU5ET1dfU0laRSAgICAgICAgMHgwMDAyMDAwMAogI2RlZmluZSBBQ1BJX1JTRFBfU0NBTl9TVEVQICAgICAgICAgICAgIDE2CiAKQEAgLTE5OSwxOCArMTk1LDE1IEBACiAKICNkZWZpbmUgQUNQSV9OVU1fT1NJX1NUUklOR1MgICAgICAgICAgICAxMAogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBBQ1BJIEFNTCBEZWJ1Z2dlcgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotI2RlZmluZSBBQ1BJX0RFQlVHR0VSX01BWF9BUkdTICAgICAgICAgIDggIC8qIE11c3QgYmUgbWF4IG1ldGhvZCBhcmdzICsgMSAqLworI2RlZmluZSBBQ1BJX0RFQlVHR0VSX01BWF9BUkdTICAgICAgICAgIDgJLyogTXVzdCBiZSBtYXggbWV0aG9kIGFyZ3MgKyAxICov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Jfc2VuZF9ub3RpZnkgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSk7Ci0KLXZvaWQKLWFjcGlfZGJfc2V0X21ldGhvZF9kYXRhICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0eXBlX2FyZywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbmRleF9hcmcsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdmFsdWVfYXJnKTsKK3ZvaWQgYWNwaV9kYl9zZXRfbWV0aG9kX2RhdGEoY2hhciAqdHlwZV9hcmcsIGNoYXIgKmluZGV4X2FyZywgY2hhciAqdmFsdWVfYXJnKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZGJfZGlzcGxheV9vYmplY3RzICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmpfdHlwZV9hcmcsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZGlzcGxheV9jb3VudF9hcmcpOworYWNwaV9kYl9kaXNwbGF5X29iamVjdHMoY2hhciAqb2JqX3R5cGVfYXJnLCBjaGFyICpkaXNwbGF5X2NvdW50X2FyZyk7CiAKLWFjcGlfc3RhdHVzCi1hY3BpX2RiX2ZpbmRfbmFtZV9pbl9uYW1lc3BhY2UgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWVfYXJnKTsKK2FjcGlfc3RhdHVzIGFjcGlfZGJfZmluZF9uYW1lX2luX25hbWVzcGFjZShjaGFyICpuYW1lX2FyZyk7CiAKLXZvaWQKLWFjcGlfZGJfc2V0X3Njb3BlICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lKTsKK3ZvaWQgYWNwaV9kYl9zZXRfc2NvcGUoY2hhciAqbmFtZSk7CiAKLWFjcGlfc3RhdHVzCi1hY3BpX2Ri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AotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWUpOwordm9pZCBhY3BpX2RiX29wZW5fZGVidWdfZmlsZShjaGFyICpuYW1lKTsKKworYWNwaV9zdGF0dXMgYWNwaV9kYl9sb2FkX2FjcGlfdGFibGUoY2hhciAqZmlsZW5hbWUpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9kYl9sb2FkX2FjcGlfdGFibGUgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmZpbGVuYW1lKTsKK2FjcGlfZGJfZ2V0X3RhYmxlX2Zyb21fZmlsZShjaGFyICpmaWxlbmFtZSwgc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICoqdGFibGUpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9kYl9nZXRfdGFibGVfZnJvbV9maWxlICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpmaWxlbmFtZSwKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICoqdGFibGUpOwotCi1hY3BpX3N0YXR1cwotYWNwaV9kYl9yZWFkX3RhYmxlX2Zyb21fZmlsZSAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZmlsZW5hbWUsCi0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAqKnRhYmxlKTsKLQorYWNwaV9kYl9yZWFkX3RhYmxlX2Zyb21fZmlsZShjaGFyICpmaWxlbmFtZSwgc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICoqdGFibGUpOwogCiAvKgogICogZGJoaXN0cnkgLSBkZWJ1Z2dlciBISVNUT1JZIGNvbW1hbmQKICAqLwotdm9pZAotYWNwaV9kYl9hZGRfdG9faGlzdG9yeSAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29tbWFuZF9saW5lKTsKK3ZvaWQgYWNwaV9kYl9hZGRfdG9faGlzdG9yeShjaGFyICpjb21tYW5kX2xpbmUp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ZXJuYWxfbGlzdCAgICAgICAgKmFjcGlfZ2JsX2V4dGVybmFsX2xpc3Q7Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX2lvX2RlY29kZVsyXTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfd29yZF9kZWNvZGVbNF07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX2NvbnN1bWVfZGVjb2RlWzJdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9taW5fZGVjb2RlWzJdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9tYXhfZGVjb2RlWzJdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9ERUNkZWNvZGVbMl07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX1JOR2RlY29kZVs0XTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfTUVNZGVjb2RlWzRdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9SV2RlY29kZVsyXTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfaXJxX2RlY29kZVsyXTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfSEVkZWNvZGVbMl07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX0xMZGVjb2RlWzJdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9TSFJkZWNvZGVbMl07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX1RZUGRlY29kZVs0XTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfQk1kZWNvZGVbMl07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX1NJWmRlY29kZVs0XTsKLWV4dGVybiBjb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfVFRQZGVjb2RlWzJdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICphY3BpX2dibF9NVFBkZWNvZGVbNF07Ci1leHRlcm4gY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAgKmFjcGlfZ2JsX1RSU2RlY29kZVsyXTsKK2V4dGVybiBzdHJ1Y3QgYWNwaV9leHRlcm5hbF9saXN0ICphY3BpX2dibF9leHRlcm5hbF9saXN0OworZXh0ZXJuIGNvbnN0IGNoYXIgKmFjcGlfZ2JsX2lvX2RlY29kZVsyXTsKK2V4dGVybiBjb25zdCBjaGFyICphY3BpX2dibF93b3JkX2RlY29kZVs0XTsKK2V4dGVybiBjb25zdCBjaGFyICphY3BpX2dibF9jb25zdW1lX2RlY29kZVsyXTsKK2V4dGVybiBjb25zdCBjaGFyICphY3BpX2dibF9taW5fZGVjb2RlWzJdOworZXh0ZXJuIGNvbnN0IGNoYXIgKmFjcGlfZ2JsX21heF9kZWNvZGVbMl07CitleHRlcm4gY29uc3QgY2hhciAqYWNwaV9nYmxfREVDZGVjb2RlWzJdOworZXh0ZXJuIGNvbnN0IGNoYXIgKmFjcGlfZ2JsX1JOR2RlY29kZVs0XTsKK2V4dGVybiBjb25zdCBjaGFyICphY3BpX2dibF9NRU1kZWNvZGVbNF07CitleHRlcm4gY29uc3QgY2h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XMKLWFjcGlfZXZfc3lzdGVtX21lbW9yeV9yZWdpb25fc2V0dXAgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZWdpb25fY29udGV4dCk7CithY3BpX2V2X3N5c3RlbV9tZW1vcnlfcmVnaW9uX3NldHVwKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkJCQkgICB1MzIgZnVuY3Rpb24sCisJCQkJICAgdm9pZCAqaGFuZGxlcl9jb250ZXh0LAorCQkJCSAgIHZvaWQgKipyZWdpb25fY29udGV4dCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V2X2lvX3NwYWNlX3JlZ2lvbl9zZXR1cCAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJlZ2lvbl9jb250ZXh0KTsKK2FjcGlfZXZfaW9fc3BhY2VfcmVnaW9uX3NldHVwKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkJCSAgICAgIHUzMiBmdW5jdGlvbiwKKwkJCSAgICAgIHZvaWQgKmhhbmRsZXJfY29udGV4dCwgdm9pZCAqKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfcGNpX2NvbmZpZ19yZWdpb25fc2V0dXAgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZWdpb25fY29udGV4dCk7CithY3BpX2V2X3BjaV9jb25maWdfcmVnaW9uX3NldHVwKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkJCQl1MzIgZnVuY3Rpb24sCisJCQkJdm9pZCAqaGFuZGxlcl9jb250ZXh0LCB2b2lkICoqcmVnaW9uX2NvbnRleHQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9ldl9jbW9zX3JlZ2lvbl9zZXR1cCAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKnJlZ2lvbl9jb250ZXh0KTsKK2FjcGlfZXZfY21vc19yZWdpb25fc2V0dXAoYWNwaV9oYW5kbGUgaGFuZGxlLAorCQkJICB1MzIgZnVuY3Rpb24sCisJCQkgIHZvaWQgKmhhbmRsZXJfY29udGV4dCwgdm9pZCAqKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXZfcGNpX2Jhcl9yZWdpb25fc2V0dXAgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZWdpb25fY29udGV4dCk7CithY3BpX2V2X3Bja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1cm5lZCBieSBleHRlcm5hbCBBQ1BJIGludGVyZmFjZXMKICAqLwpAQCAtNTUsMTEgKzU0LDkgQEAKICNkZWZpbmUgQUVfQ09ERV9DT05UUk9MICAgICAgICAgICAgICAgICAweDQwMDAKICNkZWZpbmUgQUVfQ09ERV9NQVNLICAgICAgICAgICAgICAgICAgICAweEYwMDAKIAotCiAjZGVmaW5lIEFDUElfU1VDQ0VTUyhhKSAgICAgICAgICAgICAgICAgKCEoYSkpCiAjZGVmaW5lIEFDUElfRkFJTFVSRShhKSAgICAgICAgICAgICAgICAgKGEpCiAKLQogI2RlZmluZSBBRV9PSyAgICAgICAgICAgICAgICAgICAgICAgICAgIChhY3BpX3N0YXR1cykgMHgwMDAwCiAKIC8qCkBAIC05NSw5ICs5Miw5IEBACiAjZGVmaW5lIEFFX0FCT1JUX01FVEhPRCAgICAgICAgICAgICAgICAgKGFjcGlfc3RhdHVzKSAoMHgwMDFDIHwgQUVfQ09ERV9FTlZJUk9OTUVOVEFMKQogI2RlZmluZSBBRV9TQU1FX0hBTkRMRVIgICAgICAgICAgICAgICAgIChhY3BpX3N0YXR1cykgKDB4MDAxRCB8IEFFX0NPREVfRU5WSVJPTk1FTlRBTCkKICNkZWZpbmUgQUVfV0FLRV9PTkxZX0dQRSAgICAgICAgICAgICAgICAoYWNwaV9zdGF0dXMpICgweDAwMUUgfCBBRV9DT0RFX0VOVklST05NRU5UQUwpCisjZGVmaW5lIEFFX09XTkVSX0lEX0xJTUlUICAgICAgICAgICAgICAgKGFjcGlfc3RhdHVzKSAoMHgwMDFGIHwgQUVfQ09ERV9FTlZJUk9OTUVOVEFMKQogCi0jZGVmaW5lIEFFX0NPREVfRU5WX01BWCAgICAgICAgICAgICAgICAgMHgwMDFFCi0KKyNkZWZpbmUgQUVfQ09ERV9FTlZfTUFYICAgICAgICAgICAgICAgICAweDAwMUYKIAogLyoKICAqIFByb2dyYW1tZXIgZXhjZXB0aW9ucwpAQCAtMTE0LDcgKzExMSw2IEBACi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BJX0VYVEVSTiBzdHJ1Y3QgYWNwaV9nZW5lcmljX2FkZHJlc3MgICAgICAgICBhY3BpX2dibF94cG0xYl9lbmFibGU7Ci0KK0FDUElfRVhURVJOIHN0cnVjdCBhY3BpX2dlbmVyaWNfYWRkcmVzcyBhY3BpX2dibF94cG0xYV9lbmFibGU7CitBQ1BJX0VYVEVSTiBzdHJ1Y3QgYWNwaV9nZW5lcmljX2FkZHJlc3MgYWNwaV9nYmxfeHBtMWJfZW5hYmxlOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC03NSwxMyArNzMsMTIgQEAKIAogLyogUnVudGltZSBjb25maWd1cmF0aW9uIG9mIGRlYnVnIHByaW50IGxldmVscyAqLwogCi1leHRlcm4gICAgICB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2RiZ19sZXZlbDsKLWV4dGVybiAgICAgIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZGJnX2xheWVyOworZXh0ZXJuIHUzMiBhY3BpX2RiZ19sZXZlbDsKK2V4dGVybiB1MzIgYWNwaV9kYmdfbGF5ZXI7CiAKIC8qIFByb2NlZHVyZSBuZXN0aW5nIGxldmVsIGZvciBkZWJ1ZyBvdXRwdXQgKi8KIAotZXh0ZXJuICAgICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfbmVzdGluZ19sZXZlbDsKLQorZXh0ZXJuIHUzMiBhY3BpX2dibF9uZXN0aW5nX2xldmVsOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC05OCw3ICs5NSw3IEBACiAgKiAzKSBBbGxvdyBhY2Nlc3MgdG8gdW5pbml0aWFsaXplZCBsb2NhbHMvYXJncyAo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b1tOVU1fTVVURVhdOwotCitBQ1BJX0VYVEVSTiBzdHJ1Y3QgYWNwaV9tdXRleF9pbmZvIGFjcGlfZ2JsX211dGV4X2luZm9bTlVNX01VVEVYXTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMTgwLDQxICsxODAsNTYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAorI2lmZGVmIEFDUElfREJHX1RSQUNLX0FMTE9DQVRJT05TCiAKLUFDUElfRVhURVJOIHN0cnVjdCBhY3BpX21lbW9yeV9saXN0ICAgICAgICAgICAgIGFjcGlfZ2JsX21lbW9yeV9saXN0c1tBQ1BJX05VTV9NRU1fTElTVFNdOwotQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfb2JqZWN0X25vdGlmeV9oYW5kbGVyICAgYWNwaV9nYmxfZGV2aWNlX25vdGlmeTsKLUFDUElfRVhURVJOIHN0cnVjdCBhY3BpX29iamVjdF9ub3RpZnlfaGFuZGxlciAgIGFjcGlfZ2JsX3N5c3RlbV9ub3RpZnk7Ci1BQ1BJX0VYVEVSTiBhY3BpX2V4Y2VwdGlvbl9oYW5kbGVyICAgICAgICAgICAgICBhY3BpX2dibF9leGNlcHRpb25faGFuZGxlcjsKLUFDUElfRVhURVJOIGFjcGlfaW5pdF9oYW5kbGVyICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2luaXRfaGFuZGxlcjsKLUFDUElfRVhURVJOIHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgICAgKmFjcGlfZ2JsX2JyZWFrcG9pbnRfd2FsazsKLUFDUElfRVhURVJOIGFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2dsb2JhbF9sb2NrX3NlbWFwaG9yZTsKKy8qIExpc3RzIGZvciB0cmFja2luZyBtZW1vcnkgYWxsb2NhdGlvbnMgKi8KIAotQUNQSV9FWFRFUk4gdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZ2xvYmFsX2xvY2tfdGhyZWFkX2NvdW50OwotQUNQSV9FWFRFUk4gdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfb3JpZ2luYWxfbW9kZTsKLUFDUElfRVhURVJOIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX3JzZHBfb3JpZ2luYWxfbG9jYXRpb247Ci1BQ1BJX0VYVEVSTiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9uc19sb29rdXBfY291bnQ7Ci1BQ1BJX0VYVEVSTiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9wc19maW5kX2NvdW50OwotQUNQSV9FWFRFUk4gdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfcG0xX2VuYWJsZV9yZWdpc3Rlcl9zYXZlOwotQUNQSV9FWFRFUk4gdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfbmV4dF90YWJsZV9vd25lcl9pZDsKLUFDUElfRVhURVJOIHUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX25leHRfbWV0aG9kX293bmVyX2lkOwotQUNQSV9FWFRFUk4gdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZ2xvYmFsX2xvY2tfaGFuZGxlOwotQUNQSV9FWFRFUk4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZGVidWdnZXJfY29uZmlndXJhdGlvbjsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2dsb2JhbF9sb2NrX2FjcXVpcmVkOwotQUNQSV9FWFRFUk4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfc3RlcF90b19uZXh0X2NhbGw7Ci1BQ1BJX0VYVEVSTiB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9hY3BpX2hhcmR3YXJlX3ByZXNlbnQ7Ci1BQ1BJX0VYVEVSTiB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9nbG9iYWxfbG9ja19wcmVzZW50OwotQUNQSV9FWFRFUk4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZXZlbnRzX2luaXRpYWxpemVkOwotQUNQSV9FWFRFUk4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfc3lzdGVtX2F3YWtlX2FuZF9ydW5uaW5nOworQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfbWVtb3J5X2xpc3QgKmFjcGlfZ2JsX2dsb2JhbF9saXN0OworQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfbWVtb3J5X2xpc3QgKmFjcGlfZ2JsX25zX25vZGVfbGlzdDsKKyNlbmRpZgogCi1leHRlcm4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9zaHV0ZG93bjsKLWV4dGVybiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX3N0YXJ0dXBfZmxhZ3M7Ci1leHRlcm4gY29uc3QgdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9kZWNvZGVfdG84Yml0WzhdOwotZXh0ZXJuIGNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfc2xlZX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AgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9jdXJyZW50X25vZGVfc2l6ZTsKLUFDUElfRVhURVJOIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX21heF9jb25jdXJyZW50X25vZGVfY291bnQ7Ci1BQ1BJX0VYVEVSTiBhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9lbnRyeV9zdGFja19wb2ludGVyOwotQUNQSV9FWFRFUk4gYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfbG93ZXN0X3N0YWNrX3BvaW50ZXI7Ci1BQ1BJX0VYVEVSTiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9kZWVwZXN0X25lc3Rpbmc7CitBQ1BJX0VYVEVSTiB1MzIgYWNwaV9nYmxfY3VycmVudF9ub2RlX2NvdW50OworQUNQSV9FWFRFUk4gdTMyIGFjcGlfZ2JsX2N1cnJlbnRfbm9kZV9zaXplOworQUNQSV9FWFRFUk4gdTMyIGFjcGlfZ2JsX21heF9jb25jdXJyZW50X25vZGVfY291bnQ7CitBQ1BJX0VYVEVSTiBhY3BpX3NpemUgYWNwaV9nYmxfZW50cnlfc3RhY2tfcG9pbnRlcjsKK0FDUElfRVhURVJOIGFjcGlfc2l6ZSBhY3BpX2dibF9sb3dlc3Rfc3RhY2tfcG9pbnRlcjsKK0FDUElfRVhURVJOIHUzMiBhY3BpX2dibF9kZWVwZXN0X25lc3Rpbmc7CiAjZW5kaWYKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBJbnRlcnByZXRlciBnbG9iYWxzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQotQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfdGhyZWFkX3N0YXRlICAgICAgICAgICAqYWNwaV9nYmxfY3VycmVudF93YWxrX2xpc3Q7CitBQ1BJX0VYVEVSTiBzdHJ1Y3QgYWNwaV90aHJlYWRfc3RhdGUgKmFjcGlfZ2JsX2N1cnJlbnRfd2Fsa19saXN0OwogCiAvKiBDb250cm9sIG1ldGhvZCBzaW5nbGUgc3RlcCBmbGFnICovCiAKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2NtX3NpbmdsZV9zdGVwOwotCitBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9jbV9zaW5nbGVfc3RlcDsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjY3LDggKzI4MCw3IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLUFDUElfRVhURVJOIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICAgICAgICAgICAgKmFjcGlfZ2JsX3BhcnNlZF9uYW1lc3BhY2Vfcm9vdDsKLQorQUNQSV9FWFRFUk4gdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKmFjcGlfZ2JsX3BhcnNlZF9uYW1lc3BhY2Vfcm9vdDsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjc2LDEwICsyODgsMTAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotZXh0ZXJuICAgICAgc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8gICAgICAgYWNwaV9nYmxfYml0X3JlZ2lzdGVyX2luZm9bQUNQSV9OVU1fQklUUkVHXTsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX3NsZWVwX3R5cGVfYTsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX3NsZWVwX3R5cGVfYjsKLQorZXh0ZXJuIHN0cnVjdCBhY3BpX2JpdF9yZWdpc3Rlcl9pbmZvCisgICAgYWNwaV9nYmxfYml0X3JlZ2lzdGVyX2luZm9bQUNQSV9OVU1fQklUUkVHXTsKK0FDUElfRVhURVJOIHU4IGFjcGlfZ2JsX3NsZWVwX3R5cGVfYTsKK0FDUElfRVhURVJOIHU4IGFjcGlfZ2JsX3NsZWVwX3R5cGVfYjsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjg3LDEyICsyOTksMTQgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotZXh0ZXJuICAgICAgc3RydWN0IGFjcGlfZml4ZWRfZXZlbnRfaW5mbyAgICAgICAgYWNwaV9nYmxfZml4ZWRfZXZlbnRfaW5mb1tBQ1BJX05VTV9GSVhFRF9FVkVOVFNdOwotQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfZml4ZWRfZXZlbnRfaGFuZGxlciAgICAgYWNwaV9nYmxfZml4ZWRfZXZlbnRfaGFuZGxlcnNbQUNQSV9OVU1fRklYRURfRVZFTlRTXTsKLUFDUElfRVhURVJOIHN0cnVjdCBhY3BpX2dwZV94cnVwdF9pbmZvICAgICAgICAgKmFjcGlfZ2JsX2dwZV94cnVwdF9saXN0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GFnczsKK0FDUElfRVhURVJOIHU4IGFjcGlfZ2JsX2RiX291dHB1dF9mbGFnczsKIAogI2lmZGVmIEFDUElfRElTQVNTRU1CTEVSCiAKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX29wdF9kaXNhc207Ci1BQ1BJX0VYVEVSTiB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9kYl9vcHRfdmVyYm9zZTsKK0FDUElfRVhURVJOIHU4IGFjcGlfZ2JsX2RiX29wdF9kaXNhc207CitBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9kYl9vcHRfdmVyYm9zZTsKICNlbmRpZgogCi0KICNpZmRlZiBBQ1BJX0RFQlVHR0VSCiAKLWV4dGVybiAgICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX21ldGhvZF9leGVjdXRpbmc7Ci1leHRlcm4gICAgICB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9hYm9ydF9tZXRob2Q7Ci1leHRlcm4gICAgICB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9kYl90ZXJtaW5hdGVfdGhyZWFkczsKK2V4dGVybiB1OCBhY3BpX2dibF9tZXRob2RfZXhlY3V0aW5nOworZXh0ZXJuIHU4IGFjcGlfZ2JsX2Fib3J0X21ldGhvZDsKK2V4dGVybiB1OCBhY3BpX2dibF9kYl90ZXJtaW5hdGVfdGhyZWFkczsKIAotQUNQSV9FWFRFUk4gaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW5kOwotQUNQSV9FWFRFUk4gY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqb3B0YXJnOworQUNQSV9FWFRFUk4gaW50IG9wdGluZDsKK0FDUElfRVhURVJOIGNoYXIgKm9wdGFyZzsKIAotQUNQSV9FWFRFUk4gdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZGJfb3B0X3RhYmxlczsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX29wdF9zdGF0czsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX29wdF9pbmlfbWV0aG9kczsKK0FDUElfRVhURVJOIHU4IGFjcGlfZ2JsX2RiX29wdF90YWJsZXM7CitBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9kYl9vcHRfc3RhdHM7CitBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9kYl9vcHRfaW5pX21ldGhvZHM7CiAKLQotQUNQSV9FWFRFUk4gY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYWNwaV9nYmxfZGJfYXJnc1tBQ1BJX0RFQlVHR0VSX01BWF9BUkdTXTsKLUFDUElfRVhURVJOIGNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX2xpbmVfYnVmWzgwXTsKLUFDUElfRVhURVJOIGNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX3BhcnNlZF9idWZbODBdOwotQUNQSV9FWFRFUk4gY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfZGJfc2NvcGVfYnVmWzQwXTsKLUFDUElfRVhURVJOIGNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX2RlYnVnX2ZpbGVuYW1lWzQwXTsKLUFDUElfRVhURVJOIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX2RiX291dHB1dF90b19maWxlOwotQUNQSV9FWFRFUk4gY2hhciAgICAgICAgICAgICAgICAgICAgICAg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hURVJOIHUzMiBhY3BpX2dibF9kYl9jb25zb2xlX2RlYnVnX2xldmVsOworQUNQSV9FWFRFUk4gc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICphY3BpX2dibF9kYl90YWJsZV9wdHI7CitBQ1BJX0VYVEVSTiBzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqYWNwaV9nYmxfZGJfc2NvcGVfbm9kZTsKIAogLyoKICAqIFN0YXRpc3RpYyBnbG9iYWxzCiAgKi8KLUFDUElfRVhURVJOIHUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX29ial90eXBlX2NvdW50W0FDUElfVFlQRV9OU19OT0RFX01BWCsxXTsKLUFDUElfRVhURVJOIHUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZ2JsX25vZGVfdHlwZV9jb3VudFtBQ1BJX1RZUEVfTlNfTk9ERV9NQVgrMV07Ci1BQ1BJX0VYVEVSTiB1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9vYmpfdHlwZV9jb3VudF9taXNjOwotQUNQSV9FWFRFUk4gdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9nYmxfbm9kZV90eXBlX2NvdW50X21pc2M7Ci1BQ1BJX0VYVEVSTiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9udW1fbm9kZXM7Ci1BQ1BJX0VYVEVSTiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2dibF9udW1fb2JqZWN0czsKK0FDUElfRVhURVJOIHUxNiBhY3BpX2dibF9vYmpfdHlwZV9jb3VudFtBQ1BJX1RZUEVfTlNfTk9ERV9NQVggKyAxXTsKK0FDUElfRVhURVJOIHUxNiBhY3BpX2dibF9ub2RlX3R5cGVfY291bnRbQUNQSV9UWVBFX05TX05PREVfTUFYICsgMV07CitBQ1BJX0V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0YXR1cwotYWNwaV9nZXRfdGltZXJfcmVzb2x1dGlvbiAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVzb2x1dGlvbik7CithY3BpX3N0YXR1cyBhY3BpX2dldF90aW1lcl9yZXNvbHV0aW9uKHUzMiAqIHJlc29sdXRpb24pOworCithY3BpX3N0YXR1cyBhY3BpX2dldF90aW1lcih1MzIgKiB0aWNrcyk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF90aW1lciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGlja3MpOworYWNwaV9nZXRfdGltZXJfZHVyYXRpb24odTMyIHN0YXJ0X3RpY2tzLCB1MzIgZW5kX3RpY2tzLCB1MzIgKiB0aW1lX2VsYXBzZWQpOworI2VuZGlmCQkJCS8qIEFDUElfRlVUVVJFX1VTQUdFICovCiAKLWFjcGlfc3RhdHVzCi1hY3BpX2dldF90aW1lcl9kdXJhdGlvbiAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydF90aWNrcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF90aWNrcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0aW1lX2VsYXBzZWQpOwotI2VuZGlmCS8qIEFDUElfRlVUVVJFX1VTQUdFICovCi0KLQotI2VuZGlmIC8qIF9fQUNIV0FSRV9IX18gKi8KKyNlbmRpZgkJCQkvKiBfX0FDSFdBUkVfSF9fICovCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FjcGkvYWNpbnRlcnAuaCBiL2luY2x1ZGUvYWNwaS9hY2ludGVycC5oCmluZGV4IDVjNzE3MjQuLjJjOWMxYTEgMTAwNjQ0Ci0tLSBhL2luY2x1ZGUvYWNwaS9hY2ludGVycC5oCisrKyBiL2luY2x1ZGUvYWNwaS9hY2ludGVycC5oCkBAIC00NCwyOSArNDQsMjIgQEAKICNpZm5kZWYgX19BQ0lOVEVSUF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mFuZF9vYmplY3QgICAgICAgKipzdGFja19wdHIsCi0Jc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAgICAgICAgICAqd2Fsa19zdGF0ZSk7Ci0KK2FjcGlfZXhfcmVzb2x2ZV9vcGVyYW5kcyh1MTYgb3Bjb2RlLAorCQkJIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipzdGFja19wdHIsCisJCQkgc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSk7CiAKIC8qCiAgKiBleGR1bXAgLSBJbnRlcnByZXRlciBkZWJ1ZyBvdXRwdXQgcm91dGluZXMKICAqLwotdm9pZAotYWNwaV9leF9kdW1wX29wZXJhbmQgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKm9ial9kZXNjLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgpOwordm9pZCBhY3BpX2V4X2R1bXBfb3BlcmFuZCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywgdTMyIGRlcHRoKTsKIAogdm9pZAotYWNwaV9leF9kdW1wX29wZXJhbmRzICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICoqb3BlcmFuZHMsCi0JYWNwaV9pbnRlcnByZXRlcl9tb2RlICAgICAgICAgICBpbnRlcnByZXRlcl9tb2RlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmlkZW50LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtX2xldmVscywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpub3RlLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZV9uYW1lLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIpOworYWNwaV9leF9kdW1wX29wZXJhbmRzKHVuaW9uIGFjcGlfb3BlcmFuZ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gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICp2YWx1ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpOworYWNwaV9leF9zeXN0ZW1fbWVtb3J5X3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJCSAgICBhY3BpX3BoeXNpY2FsX2FkZHJlc3MgYWRkcmVzcywKKwkJCQkgICAgdTMyIGJpdF93aWR0aCwKKwkJCQkgICAgYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkJICAgIHZvaWQgKmhhbmRsZXJfY29udGV4dCwKKwkJCQkgICAgdm9pZCAqcmVnaW9uX2NvbnRleHQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9leF9zeXN0ZW1faW9fc3BhY2VfaGFuZGxlciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgICAgICAgICAgIGFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaXRfd2lkdGgsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnJlZ2lvbl9jb250ZXh0KTsKK2FjcGlfZXhfc3lzdGVtX2lvX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyBhZGRyZXNzLAorCQkJCXUzMiBiaXRfd2lkdGgsCisJCQkJYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkJdm9pZCAqaGFuZGxlcl9jb250ZXh0LCB2b2lkICpyZWdpb25fY29udGV4dCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX2V4X3BjaV9jb25maWdfc3BhY2VfaGFuZGxlciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgICAgICAgICAgIGFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaXRfd2lkdGgsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGFuZGxlcl9jb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnJlZ2lvbl9jb250ZXh0KTsKK2FjcGlfZXhfcGNpX2NvbmZpZ19zcGFjZV9oYW5kbGVyKHUzMiBmdW5jdGlvbiwKKwkJCQkgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkJIHUzMiBiaXRfd2lkdGgsCisJCQkJIGFjcGlfaW50ZWdlciAqIHZhbHVlLAorCQkJCSB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfY21vc19zcGFjZV9oYW5kbGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICp2YWx1ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpOworYWNwaV9leF9jbW9zX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJICAgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkgICB1MzIgYml0X3dpZHRoLAorCQkJICAgYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfcGNpX2Jhcl9zcGFjZV9oYW5kbGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICp2YWx1ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpOworYWNwaV9leF9wY2lfYmFyX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJICAgICAgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkgICAgICB1MzIgYml0X3dpZHRoLAorCQkJICAgICAgYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkgICAgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsIHZvaWQgKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfZW1iZWRkZWRfY29udHJvbGxlcl9zcGFjZV9oYW5kbGVyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uLAotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICp2YWx1ZSwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpoYW5kbGVyX2NvbnRleHQsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpOworYWNwaV9leF9lbWJlZGRlZF9jb250cm9sbGVyX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJCQkgIGFjcGlfcGh5c2ljYWxfYWRkcmVzcyBhZGRyZXNzLAorCQkJCQkgIHUzMiBiaXRfd2lkdGgsCisJCQkJCSAgYWNwaV9pbnRlZ2VyICogdmFsdWUsCisJCQkJCSAgdm9pZCAqaGFuZGxlcl9jb250ZXh0LAorCQkJCQkgIHZvaWQgKnJlZ2lvbl9jb250ZXh0KTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZXhfc21fYnVzX3NwYWNlX2hhbmRsZXIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0JYWNwaV9waHlzaWNhbF9hZGRyZXNzICAgICAgICAgICBhZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0X3dpZHRoLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKnZhbHVlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpyZWdpb25fY29udGV4dCk7Ci0KK2FjcGlfZXhfc21fYnVzX3NwYWNlX2hhbmRsZXIodTMyIGZ1bmN0aW9uLAorCQkJICAgICBhY3BpX3BoeXNpY2FsX2FkZHJlc3MgYW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9jYWwuaApAQCAtNDQsMTcgKzQ0LDIwIEBACiAjaWZuZGVmIF9fQUNMT0NBTF9IX18KICNkZWZpbmUgX19BQ0xPQ0FMX0hfXwogCisjZGVmaW5lIEFDUElfV0FJVF9GT1JFVkVSICAgICAgICAgICAgICAgMHhGRkZGCS8qIHUxNiwgYXMgcGVyIEFDUEkgc3BlYyAqLwogCi0jZGVmaW5lIEFDUElfV0FJVF9GT1JFVkVSICAgICAgICAgICAgICAgMHhGRkZGICAvKiB1MTYsIGFzIHBlciBBQ1BJIHNwZWMgKi8KLQotdHlwZWRlZiB2b2lkICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9tdXRleDsKLXR5cGVkZWYgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfbXV0ZXhfaGFuZGxlOwotCit0eXBlZGVmIHZvaWQgKmFjcGlfbXV0ZXg7Cit0eXBlZGVmIHUzMiBhY3BpX211dGV4X2hhbmRsZTsKIAogLyogVG90YWwgbnVtYmVyIG9mIGFtbCBvcGNvZGVzIGRlZmluZWQgKi8KIAogI2RlZmluZSBBTUxfTlVNX09QQ09ERVMgICAgICAgICAgICAgICAgIDB4N0YKIAorLyogRm9yd2FyZCBkZWNsYXJhdGlvbnMgKi8KKworc3RydWN0IGFjcGlfd2Fsa19zdGF0ZTsKK3N0cnVjdCBhY3BpX29ial9tdXRleDsKK3VuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC02Miw3ICs2NSw2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQogLyoKICAqIFByZWRlZmluZWQgaGFuZGxlcyBmb3IgdGhlIG11dGV4IG9iamVjdHMgdX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gKHUzMikgLTEKIAogLyogVGFibGUgZm9yIHRoZSBnbG9iYWwgbXV0ZXhlcyAqLwogCi1zdHJ1Y3QgYWNwaV9tdXRleF9pbmZvCi17Ci0JYWNwaV9tdXRleCAgICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZXg7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlX2NvdW50OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG93bmVyX2lkOworc3RydWN0IGFjcGlfbXV0ZXhfaW5mbyB7CisJYWNwaV9tdXRleCBtdXRleDsKKwl1MzIgdXNlX2NvdW50OworCXUzMiB0aHJlYWRfaWQ7CiB9OwogCi0vKiBUaGlzIG93bmVyIElEIG1lYW5zIHRoYXQgdGhlIG11dGV4IGlzIG5vdCBpbiB1c2UgKHVubG9ja2VkKSAqLwotCi0jZGVmaW5lIEFDUElfTVVURVhfTk9UX0FDUVVJUkVEICAgICAgICAgKHUzMikgKC0xKQotCi0KIC8qIExvY2sgZmxhZyBwYXJhbWV0ZXIgZm9yIHZhcmlvdXMgaW50ZXJmYWNlcyAqLwogCiAjZGVmaW5lIEFDUElfTVRYX0RPX05PVF9MT0NLICAgICAgICAgICAgMAogI2RlZmluZSBBQ1BJX01UWF9MT0NLICAgICAgICAgICAgICAgICAgIDEKIAotCi10eXBlZGVmIHUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX293bmVyX2lkOwotI2RlZmluZSBBQ1BJX09XTkVSX1RZUEVfVEFCTEUgICAgICAgICAgIDB4MAotI2RlZmluZSBBQ1BJX09XTkVSX1RZUEVfTUVUSE9EICAgICAgICAgIDB4MQotI2RlZmluZSBBQ1BJX0ZJUlNUX01FVEhPRF9JRCAgICAgICAgICAgIDB4MDAwMQotI2RlZmluZSBBQ1BJX0ZJUlNUX1RBQkxFX0lEICAgICAgICAgICAgIDB4RjAwMAotCi0KIC8qIEZpZWxkIGFjY2VzcyBncmFud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VlbiBpbnRlcm5hbCBkZXNjcmlwdG9ycywgYW5kIE1VU1QKICAqIGJlIHRoZSBmaXJzdCBieXRlIGluIHRoaXMgc3RydWN0dXJlLgogICovCi11bmlvbiBhY3BpX25hbWVfdW5pb24KLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzY2lpWzRdOwordW5pb24gYWNwaV9uYW1lX3VuaW9uIHsKKwl1MzIgaW50ZWdlcjsKKwljaGFyIGFzY2lpWzRdOwogfTsKIAotc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yOyAgICAgLyogVXNlZCB0byBkaWZmZXJlbnRpYXRlIG9iamVjdCBkZXNjcmlwdG9yIHR5cGVzICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsgICAgICAgICAgIC8qIFR5cGUgYXNzb2NpYXRlZCB3aXRoIHRoaXMgbmFtZSAqLwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG93bmVyX2lkOwotCXVuaW9uIGFjcGlfbmFtZV91bmlvbiAgICAgICAgICAgICAgIG5hbWU7ICAgICAgICAgICAvKiBBQ1BJIE5hbWUsIGFsd2F5cyA0IGNoYXJzIHBlciBBQ1BJIHNwZWMgKi8KLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAqb2JqZWN0OyAgICAgICAgLyogUG9pbnRlciB0byBhdHRhY2hlZCBBQ1BJIG9iamVjdCAob3B0aW9uYWwpICovCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAgICAgKmNoaWxkOyAgICAgICAgIC8qIEZpcnN0IGNoaWxkICovCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAgICAgKn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ICAgICAgICAgICAgICAgICAgcGh5c2ljYWxfYWRkcmVzczsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFtbF9sZW5ndGg7Ci0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JYWNwaV9vd25lcl9pZCAgICAgICAgICAgICAgICAgICB0YWJsZV9pZDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxvY2F0aW9uOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVkX2ludG9fbmFtZXNwYWNlOworc3RydWN0IGFjcGlfdGFibGVfZGVzYyB7CisJc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqcHJldjsKKwlzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICpuZXh0OworCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgKmluc3RhbGxlZF9kZXNjOworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAqcG9pbnRlcjsKKwl1OCAqYW1sX3N0YXJ0OworCXU2NCBwaHlzaWNhbF9hZGRyZXNzOworCXUzMiBhbWxfbGVuZ3RoOworCWFjcGlfc2l6ZSBsZW5ndGg7CisJYWNwaV9vd25lcl9pZCBvd25lcl9pZDsKKwl1OCB0eXBlOworCXU4IGFsbG9jYXRpb247CisJdTggbG9hZGVkX2ludG9fbmFtZXNwYWNlOwogfTsKIAotc3RydWN0IGFjcGlfdGFibGVfbGlzdAotewotCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgICAgICAgICAgKm5leHQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudDsKK3N0cnVjdCBhY3BpX3RhYmxlX2xpc3QgeworCXN0cnVjdCBhY3BpX3RhYmxlX2Rlc2MgKm5leHQ7CisJdTMyIGNvdW50OwogfTsKIAotCi1zdHJ1Y3QgYWNwaV9maW5kX2NvbnRleHQKLXsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzZWFyY2hfZm9yOwotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgKmxpc3Q7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY291bnQ7CitzdHJ1Y3QgYWNwaV9maW5kX2NvbnRleHQgeworCWNoYXIgKnNlYXJjaF9mb3I7CisJYWNwaV9oYW5kbGUgKmxpc3Q7CisJdTMyICpjb3VudDsKIH07CiAKLQotc3RydWN0IGFjcGlfbnNfc2VhcmNoX2RhdGEKLXsKLQlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAgICAgICpub2RlOworc3RydWN0IGFjcGlfbnNfc2VhcmNoX2RhdGEgeworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwogfTsKIAotCiAvKgogICogUHJlZGVmaW5lZCBOYW1lc3BhY2UgaXRlbXMKICAqLwotc3RydWN0IGFjcGlfcHJlZGVmaW5lZF9uYW1lcwotewotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnZhbDsKK3N0cnVjdCBhY3BpX3ByZWRlZmluZWRfbmFtZXMgeworCWNoYXIgKm5hbWU7CisJdTggdHlwZTsKKwljaGFyICp2YWw7CiB9OwogCi0KIC8qIE9iamVjdCB0eXBlcyB1c2VkIGR1cmluZyBwYWNrYWdlIGNvcGllcyAqLwogCi0KICNkZWZpbmUgQUNQSV9DT1BZX1RZUEVfU0lNUExFICAgICAgICAgICAwCiAjZGVmaW5lIEFDUElfQ09QWV9UWVBFX1BBQ0tBR0UgICAgICAgICAgMQogCiAvKiBJbmZvIHN0cnVjdHVyZSB1c2VkIHRvIGNvbnZlcnQgZXh0ZXJuYWw8LT5pbnRlcm5hbCBu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kvKiBBZGRyZXNzIG9mIGhhbmRsZXIuICovCisJdm9pZCAqY29udGV4dDsJCS8qIENvbnRleHQgdG8gYmUgcGFzc2VkIHRvIGhhbmRsZXIgKi8KIH07CiAKLXN0cnVjdCBhY3BpX2ZpeGVkX2V2ZW50X2luZm8KLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c19yZWdpc3Rlcl9pZDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZV9yZWdpc3Rlcl9pZDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c19iaXRfbWFzazsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZV9iaXRfbWFzazsKK3N0cnVjdCBhY3BpX2ZpeGVkX2V2ZW50X2luZm8geworCXU4IHN0YXR1c19yZWdpc3Rlcl9pZDsKKwl1OCBlbmFibGVfcmVnaXN0ZXJfaWQ7CisJdTE2IHN0YXR1c19iaXRfbWFzazsKKwl1MTYgZW5hYmxlX2JpdF9tYXNrOwogfTsKIAogLyogSW5mb3JtYXRpb24gdXNlZCBkdXJpbmcgZmllbGQgcHJvY2Vzc2luZyAqLwogCi1zdHJ1Y3QgYWNwaV9maWVsZF9pbmZvCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2lwX2ZpZWxkOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRfZmxhZzsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBrZ19sZW5ndGg7CitzdHJ1Y3QgYWNwaV9maWVsZF9pbmZvIHsKKwl1OCBza2lwX2ZpZWxkOworCXU4IGZpZWxkX2ZsYWc7CisJdTMyIHBrZ19sZW5ndGg7CiB9OwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEdl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KK3N0cnVjdCBhY3BpX3Njb3BlX3N0YXRlIHsKKwlBQ1BJX1NUQVRFX0NPTU1PTiBzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZTsKIH07CiAKLQotc3RydWN0IGFjcGlfcHNjb3BlX3N0YXRlCi17Ci0JQUNQSV9TVEFURV9DT01NT04KLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICAgICAqb3A7ICAgICAgICAgICAgICAgICAgICAvKiBDdXJyZW50IG9wIGJlaW5nIHBhcnNlZCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICphcmdfZW5kOyAgICAgICAgICAgICAgIC8qIEN1cnJlbnQgYXJndW1lbnQgZW5kICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBrZ19lbmQ7ICAgICAgICAgICAgICAgLyogQ3VycmVudCBwYWNrYWdlIGVuZCAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ19saXN0OyAgICAgICAgICAgICAgIC8qIE5leHQgYXJndW1lbnQgdG8gcGFyc2UgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdfY291bnQ7ICAgICAgICAgICAgICAvKiBOdW1iZXIgb2YgZml4ZWQgYXJndW1lbnRzICovCitzdHJ1Y3QgYWNwaV9wc2NvcGVfc3RhdGUgeworCUFDUElfU1RBVEVfQ09NTU9OIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICpvcDsJLyogQ3VycmVudCBvcCBiZWluZyBwYXJzZWQgKi8KKwl1OCAqYXJnX2VuZDsJCS8qIEN1cnJlbnQgYXJndW1lbnQgZW5kICovCisJdTggKnBrZ19lbmQ7CQkvKiBDdXJyZW50IHBhY2thZ2UgZW5kICovCisJdTMyIGFyZ19saXN0OwkJLyogTmV4dCBhcmd1bWVudCB0byBwYXJzZSAqLworCXUzMiBhcmdfY291bnQ7CQk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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi10eXBlZGVmCi1hY3BpX3N0YXR1cyAoKkFDUElfRVhFQ1VURV9PUCkgKAotCXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgICAgICAgICAgICAgICp3YWxrX3N0YXRlKTsKLQordHlwZWRlZiBhY3BpX3N0YXR1cygqQUNQSV9FWEVDVVRFX09QKSAoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqIHdhbGtfc3RhdGUpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC01ODYsMjggKzUwOSwyNiBAQAogLyoKICAqIEFNTCBvcGNvZGUsIG5hbWUsIGFuZCBhcmd1bWVudCBsYXlvdXQKICAqLwotc3RydWN0IGFjcGlfb3Bjb2RlX2luZm8KLXsKK3N0cnVjdCBhY3BpX29wY29kZV9pbmZvIHsKICNpZiBkZWZpbmVkKEFDUElfRElTQVNTRU1CTEVSKSB8fCBkZWZpbmVkKEFDUElfREVCVUdfT1VUUFVUKQotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lOyAgICAgICAgICAvKiBPcGNvZGUgbmFtZSAoZGlzYXNzZW1ibGVyL2RlYnVnIG9ubHkpICovCisJY2hhciAqbmFtZTsJCS8qIE9wY29kZSBuYW1lIChkaXNhc3NlbWJsZXIvZGVidWcgb25seSkgKi8KICNlbmRpZgotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlX2FyZ3M7ICAgICAvKiBHcmFtbWFyL1BhcnNlIHRpbWUgYXJndW1lbnRzICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVudGltZV9hcmdzOyAgIC8qIEludGVycHJldCB0aW1lIGFyZ3VtZW50cyAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzOyAgICAgICAgICAvKiBNaXNjIGZsYWdzICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0X3R5cGU7ICAgIC8qIENvcnJlc3BvbmRpbmcgaW50ZXJuYWwgb2JqZWN0IHR5cGUgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczsgICAgICAgICAgLyogT3Bjb2RlIGNsYXNzICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsgICAgICAgICAgIC8qIE9wY29kZSB0eXBlICovCisJdTMyIHBhcnNlX2FyZ3M7CQkvKiBHcmFtbWFyL1BhcnNlIHRpbWUgYXJndW1lbnRzICovCisJdTMyIHJ1bnRpbWVfYXJnczsJLyogSW50ZXJwcmV0IHRpbWUgYXJndW1lbnRzICovCisJdTMyIGZsYWdzOwkJLyogTWlzYyBmbGFncyAqLworCXU4IG9iamVjdF90eXBlOwkJLyogQ29ycmVzcG9uZGluZyBpbnRlcm5hbCBvYmplY3QgdHlwZSAqLworCXU4IGNsYXNzOwkJLyogT3Bjb2RlIGNsYXNzICovCisJdTggdHlwZTsJCS8qIE9wY29kZSB0eXBlICovCiB9OwogCi11bmlvbiBhY3BpX3BhcnNlX3ZhbHVlCi17Ci0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAgICAgaW50ZWdlcjsgICAgICAgIC8qIEludGVnZXIgY29uc3RhbnQgKFVwIHRvIDY0IGJpdHMpICovCi0Jc3RydWN0IHVpbnQ2NF9zdHJ1Y3QgICAgICAgICAgICAgICAgaW50ZWdlcjY0OyAgICAgIC8qIFN0cnVjdHVyZSBvdmVybGF5IGZvciAyIDMyLWJpdCBEd29yZHMgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOyAgICAgICAgICAgLyogYnl0ZWxpc3Qgb3IgZmllbGQgc2l6ZSAqLwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgIC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wogCi1zdHJ1Y3QgYWNwaV9wYXJzZV9vYmpfYXNsCi17Ci0JQUNQSV9QQVJTRV9DT01NT04KLQl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAgICAgICAgICAgICAqY2hpbGQ7Ci0JdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgICAgICAgICAgICAgKnBhcmVudF9tZXRob2Q7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmZpbGVuYW1lOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpleHRlcm5hbF9uYW1lOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lcGF0aDsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lX3NlZ1s0XTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYV92YWx1ZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW47Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXI7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9naWNhbF9saW5lX251bWJlcjsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dpY2FsX2J5dGVfb2Zmc2V0OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF9saW5lOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF9sb2dpY2FsX2xpbmU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9idHlwZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbWxfbGVuZ3RoOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFtbF9zdWJ0cmVlX2xlbmd0aDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5hbF9hbWxfbGVuZ3RoOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsX2FtbF9vZmZzZXQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGlsZV9mbGFnczsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZV9vcGNvZGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW1sX29wY29kZV9sZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW1sX3BrZ19sZW5fYnl0ZXM7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2Vfb3BfbmFtZVsxMl07CitzdHJ1Y3QgYWNwaV9wYXJzZV9vYmpfYXNsIHsKKwlBQ1BJX1BBUlNFX0NPTU1PTiB1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqY2hpbGQ7CisJdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKnBhcmVudF9tZXRob2Q7CisJY2hhciAqZmlsZW5hbWU7CisJY2hhciAqZXh0ZXJuYWxfbmFtZTsKKwljaGFyICpuYW1lcGF0aDsKKwljaGFyIG5hbWVfc2VnWzRdOworCXUzMiBleHRyYV92YWx1ZTsKKwl1MzIgY29sdW1uOworCXUzMiBsaW5lX251bWJlcjsKKwl1MzIgbG9naWNhbF9saW5lX251bWJlcjsKKwl1MzIgbG9naWNhbF9ieXRlX29mZnNldDsKKwl1MzIgZW5kX2xpbmU7CisJdTMyIGVuZF9sb2dpY2FsX2xpbmU7CisJdTMyIGFjcGlfYnR5cGU7CisJdTMyIGFtbF9sZW5ndGg7CisJdTMyIGFtbF9zdWJ0cmVlX2xlbmd0aDsKKwl1MzIgZmluYWxfYW1sX2xlbmd0aDsK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2NvcGUgKi8KKwl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqc3RhcnRfc2NvcGU7CiB9OwogCi0KIC8qIFBhcnNlIG9iamVjdCBmbGFncyAqLwogCiAjZGVmaW5lIEFDUElfUEFSU0VPUF9HRU5FUklDICAgICAgICAgICAgICAgICAgICAweDAxCkBAIC03MjksNyArNjM4LDYgQEAKICNkZWZpbmUgQUNQSV9QQVJTRU9QX0VNUFRZX1RFUk1MSVNUICAgICAgICAgICAgIDB4MDQKICNkZWZpbmUgQUNQSV9QQVJTRU9QX1NQRUNJQUwgICAgICAgICAgICAgICAgICAgIDB4MTAKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBIYXJkd2FyZSAoQUNQSSByZWdpc3RlcnMpIGFuZCBQTlAKQEAgLTczNywxNSArNjQ1LDE0IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2RlZmluZSBQQ0lfUk9PVF9ISURfU1RSSU5HICAgICAgICAgIlBOUDBBMDMiCisjZGVmaW5lIFBDSV9FWFBSRVNTX1JPT1RfSElEX1NUUklORyAiUE5QMEEwOCIKIAotc3RydWN0IGFjcGlfYml0X3JlZ2lzdGVyX2luZm8KLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRfcmVnaXN0ZXI7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0X3Bvc2l0aW9uOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjY2Vzc19iaXRfbWFzazsKK3N0cnVjdCBhY3BpX2JpdF9yZWdpc3Rlcl9pbmZvIHsKKwl1OCBwYXJlbnRfcmVnaXN0ZXI7CisJdTggYml0X3Bvc2l0aW9uOworCXUxNiBh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MSw4ICs3NDUsNyBAQAogI2RlZmluZSBBQ1BJX1JERVNDX1RZUEVfU01BTEwgICAgICAgICAgICAgICAgICAgMHgwMAogCiAjZGVmaW5lIEFDUElfUkRFU0NfVFlQRV9NQVNLICAgICAgICAgICAgICAgICAgICAweDgwCi0jZGVmaW5lIEFDUElfUkRFU0NfU01BTExfTUFTSyAgICAgICAgICAgICAgICAgICAweDc4IC8qIE9ubHkgYml0cyA2OjMgY29udGFpbiB0aGUgdHlwZSAqLwotCisjZGVmaW5lIEFDUElfUkRFU0NfU01BTExfTUFTSyAgICAgICAgICAgICAgICAgICAweDc4CS8qIE9ubHkgYml0cyA2OjMgY29udGFpbiB0aGUgdHlwZSAqLwogCiAvKgogICogU21hbGwgcmVzb3VyY2UgZGVzY3JpcHRvciB0eXBlcwpAQCAtODcxLDcgKzc3NCw2IEBACiAjZGVmaW5lIEFDUElfUkRFU0NfVFlQRV9RV09SRF9BRERSRVNTX1NQQUNFICAgICAweDhBCiAjZGVmaW5lIEFDUElfUkRFU0NfVFlQRV9FWFRFTkRFRF9BRERSRVNTX1NQQUNFICAweDhCCiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogTWlzY2VsbGFuZW91cwpAQCAtODgwLDQ5ICs3ODIsMzYgQEAKIAogI2RlZmluZSBBQ1BJX0FTQ0lJX1pFUk8gICAgICAgICAgICAgICAgICAgICAgMHgzMAogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIERlYnVnZ2VyCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBhY3BpX2RiX21ldGhvZF9pbmZvCi17Ci0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICB0aHJlYWRfZ2F0ZTsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuYW1lOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiphcmdzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fbG9vcHM7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZVsxMjhdOworc3RydWN0IGFjcGlfZGJfbWV0aG9kX2luZm8geworCWFjcGlfaGFuZGxlIHRocmVhZF9nYXRlOworCWNoYXIgKm5hbWU7CisJY2hhciAqKmFyZ3M7CisJdTMyIGZsYWdzOworCXUzMiBudW1fbG9vcHM7CisJY2hhciBwYXRobmFtZVsxMjhdOwogfTsKIAotc3RydWN0IGFjcGlfaW50ZWdyaXR5X2luZm8KLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXM7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdHM7CitzdHJ1Y3QgYWNwaV9pbnRlZ3JpdHlfaW5mbyB7CisJdTMyIG5vZGVzOworCXUzMiBvYmplY3RzOwogfTsKIAotCiAjZGVmaW5lIEFDUElfREJfUkVESVJFQ1RBQkxFX09VVFBVVCAgMHgwMQogI2RlZmluZSBBQ1BJX0RCX0NPTlNPTEVfT1VUUFVUICAgICAgIDB4MDIKICNkZWZpbmUgQUNQSV9EQl9EVVBMSUNBVEVfT1VUUFVUICAgICAweDAzCiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogRGVidWcKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbwotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkOwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnByb2NfbmFtZTsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZTsKLX07Ci0KLQogLyogRW50cnkgZm9yIGEgbWVtb3J5IGFsbG9jYXRpb24gKGRlYnVnIG9ubHkpICovCiAKICNkZWZpbmUgQUNQSV9NRU1fTUFMTE9DICAgICAgICAgICAgICAgICAgICAgIDAKQEAgLTkzOCw1MSArODI3LDM2IEBACiAJY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlW0FDUElfTUFYX01PRFVMRV9OQU1FXTsgXAogCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsbG9jX3R5cGU7CiAKLXN0cnVjdCBhY3BpX2RlYnVnX21lbV9oZWFkZXIKLXsKLQlBQ1BJX0NPTU1PTl9ERUJVR19NRU1fSEVBREVSCi19Oworc3RydWN0IGFjcGlfZGVidWdfbWVtX2hlYWRlciB7CitBQ1BJX0NPTU1PTl9ERUJVR19NRU1fSEVBREVSfTsKIAotc3RydWN0IGFjcGlfZGVidWdfbWVtX2Jsb2NrCi17Ci0JQUNQSV9DT01NT05fREVCVUdfTUVNX0hFQURFUgotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJfc3BhY2U7CitzdHJ1Y3QgYWNwaV9kZWJ1Z19tZW1fYmxvY2sgeworCUFDUElfQ09NTU9OX0RFQlVHX01FTV9IRUFERVIgdTY0IHVzZXJfc3BhY2U7CiB9OwogCi0KICNkZWZpbmUgQUNQSV9NRU1fTElTVF9HTE9CQUwgICAgICAgICAgICAwCiAjZGVmaW5lIEFDUElfTUVNX0xJU1RfTlNOT0RFICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX01FTV9MSVNUX01BWCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUNQSV9OVU1fTUVNX0xJU1RTICAgICAgICAgICAgICAyCiAKLSNkZWZpbmUgQUNQSV9NRU1fTElTVF9GSVJTVF9DQUNIRV9MSVNUICAyCi0jZGVmaW5lIEFDUElfTUVNX0xJU1RfU1RBVEUgICAgICAgICAgICAgMgotI2RlZmluZSBBQ1BJX01FTV9MSVNUX1BTTk9ERSAgICAgICAgICAgIDMKLSNkZWZpbmUgQUNQSV9NRU1fTElTVF9QU05PREVfRVhUICAgICAgICA0Ci0jZGVmaW5lIEFDUElfTUVNX0xJU1RfT1BFUkFORCAgICAgICAgICAgNQotI2RlZmluZSBBQ1BJX01FTV9MSVNUX1dBTEsgICAgICAgICAgICAgIDYKLSNkZWZpbmUgQUNQSV9NRU1fTElTVF9NQVggICAgICAgICAgICAgICA2Ci0jZGVmaW5lIEFDUElfTlVNX01FTV9MSVNUUyAgICAgICAgICAgICAgNwotCi0KLXN0cnVjdCBhY3BpX21lbW9yeV9saXN0Ci17Ci0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmxpc3RfaGVhZDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rX29mZnNldDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfY2FjaGVfZGVwdGg7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGVfZGVwdGg7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0X3NpemU7CitzdHJ1Y3QgYWNwaV9tZW1vcnlfbGlzdCB7CisJY2hhciAqbGlzdF9uYW1lOworCXZvaWQgKmxpc3RfaGVhZDsKKwl1MTYgb2JqZWN0X3NpemU7CisJdTE2IG1heF9kZXB0aDsKKwl1MTYgY3VycmVudF9kZXB0aDsKKwl1MTYgbGlua19vZmZzZXQ7CiAKICNpZmRlZiBBQ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ISUxFMChhKSAgICAgICAgICAgICAgIGEKICNlbmRpZgogCi0jZGVmaW5lIHJldHVybl9WT0lEICAgICAgICAgICAgICAgICAgICAgQUNQSV9ET19XSElMRTAgKHthY3BpX3V0X2V4aXQoX19MSU5FX18sJl9kZWJ1Z19pbmZvKTtyZXR1cm47fSkKLSNkZWZpbmUgcmV0dXJuX0FDUElfU1RBVFVTKHMpICAgICAgICAgICBBQ1BJX0RPX1dISUxFMCAoe2FjcGlfdXRfc3RhdHVzX2V4aXQoX19MSU5FX18sJl9kZWJ1Z19pbmZvLChzKSk7cmV0dXJuKChzKSk7fSkKLSNkZWZpbmUgcmV0dXJuX1ZBTFVFKHMpICAgICAgICAgICAgICAgICBBQ1BJX0RPX1dISUxFMCAoe2FjcGlfdXRfdmFsdWVfZXhpdChfX0xJTkVfXywmX2RlYnVnX2luZm8sKGFjcGlfaW50ZWdlcikocykpO3JldHVybigocykpO30pCi0jZGVmaW5lIHJldHVybl9QVFIocykgICAgICAgICAgICAgICAgICAgQUNQSV9ET19XSElMRTAgKHthY3BpX3V0X3B0cl9leGl0KF9fTElORV9fLCZfZGVidWdfaW5mbywodTggKikocykpO3JldHVybigocykpO30pCisjZGVmaW5lIHJldHVybl9WT0lEICAgICAgICAgICAgICAgICAgICAgQUNQSV9ET19XSElMRTAgKHthY3BpX3V0X2V4aXQoQUNQSV9ERUJVR19QQVJBTUVURVJTKTtyZXR1cm47fSkKKyNkZWZpbmUgcmV0dXJuX0FDUElfU1RBVFVTKHMpICAgICAgICAgICBBQ1BJX0RPX1dISUxFMCAoe2FjcGlfdXRfc3RhdHVzX2V4aXQoQUNQSV9ERUJVR19QQVJBTUVURVJTLChzKSk7cmV0dXJuKChzKSk7fSkKKyNkZWZpbmUgcmV0dXJuX1ZBTFVFKHMpICAgICAgICAgICAgICAgICBBQ1BJX0RPX1dISUxFMCAoe2FjcGlfdXRfdmFsdWVfZXhpdChBQ1BJX0RFQlVHX1BBUkFNRVRFUlMsKGFjcGlfaW50Z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LQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGhhbmRsZSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptc2csCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXZlbCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCk7Ci0KLXZvaWQKLWFjcGlfbnNfcHJpbnRfcGF0aG5hbWUgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtX3NlZ21lbnRzLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBhdGhuYW1lKTsKK3ZvaWQgYWNwaV9uc19wcmludF9wYXRobmFtZSh1MzIgbnVtX3NlZ21lbnRzLCBjaGFyICpwYXRobmFtZSk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX25zX2R1bXBfb25lX29iamVjdCAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBvYmpfaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWwsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmV0dXJuX3ZhbHVlKTsKK2FjcGlfbnNfZHVtcF9vbmVfb2JqZWN0KGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsCisJCQl1MzIgbGV2ZWwsIHZvaWQgKmNvbnRleHQsIHZvaWQgKipyZXR1cm5fdmFsdWUpOwogCiAjaWZkZWYJQUNQSV9GVVRVUkVfVVNBR0UKIHZvaWQKLWFjcGlfbnNfZHVtcF9vYmplY3RzICgKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIHR5cGUsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5X3R5cGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfZ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UpOwordTMyIGFjcGlfbnNfbG9jYWwoYWNwaV9vYmplY3RfdHlwZSB0eXBlKTsKIAogdm9pZAotYWNwaV9uc19yZXBvcnRfZXJyb3IgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZV9uYW1lLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaW50ZXJuYWxfbmFtZSwKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIGxvb2t1cF9zdGF0dXMpOworYWNwaV9uc19yZXBvcnRfZXJyb3IoY2hhciAqbW9kdWxlX25hbWUsCisJCSAgICAgdTMyIGxpbmVfbnVtYmVyLAorCQkgICAgIHUzMiBjb21wb25lbnRfaWQsCisJCSAgICAgY2hhciAqaW50ZXJuYWxfbmFtZSwgYWNwaV9zdGF0dXMgbG9va3VwX3N0YXR1cyk7CiAKIHZvaWQKLWFjcGlfbnNfcmVwb3J0X21ldGhvZF9lcnJvciAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptZXNzYWdlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm5vZGUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aCwKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIGxvb2t1cF9zdGF0dXMpOworYWNwaV9uc19yZXBvcnRfbWV0aG9kX2Vycm9yKGNoYXIgKm1vZHVsZV9uYW1l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wogCi12b2lkCi1hY3BpX25zX2dldF9pbnRlcm5hbF9uYW1lX2xlbmd0aCAoCi0Jc3RydWN0IGFjcGlfbmFtZXN0cmluZ19pbmZvICAgICAqaW5mbyk7CitzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqYWNwaV9uc19tYXBfaGFuZGxlX3RvX25vZGUoYWNwaV9oYW5kbGUgaGFuZGxlKTsKIAotYWNwaV9zdGF0dXMKLWFjcGlfbnNfaW50ZXJuYWxpemVfbmFtZSAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZG90dGVkX25hbWUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKmNvbnZlcnRlZF9uYW1lKTsKK2FjcGlfaGFuZGxlIGFjcGlfbnNfY29udmVydF9lbnRyeV90b19oYW5kbGUoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUpOwogCi1hY3BpX3N0YXR1cwotYWNwaV9uc19leHRlcm5hbGl6ZV9uYW1lICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVybmFsX25hbWVfbGVuZ3RoLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmludGVybmFsX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udmVydGVkX25hbWVfbGVuZ3RoLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipjb252ZXJ0ZWRfbmFtZSk7Cit2b2lkIGFjcGlfbnNfdGVybWluYXRlKHZvaWQpOwogCi1zdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqCi1hY3BpX25zX21hcF9oYW5kbGVfdG9fbm9kZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBoYW5kbGUpOworc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKmFjcGlfbnNfZ2V0X3BhcmVudF9ub2RlKHN0cnVjdCBhY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W5rIGJhY2sgdG8gcGFyZW50IG5vZGUgKi8KIAogLyoKICAqIEZpZWxkcyBjb21tb24gdG8gYm90aCBTdHJpbmdzIGFuZCBCdWZmZXJzCkBAIC0xMDUsMTUgKzEwMiwxMyBAQAogI2RlZmluZSBBQ1BJX0NPTU1PTl9CVUZGRVJfSU5GTyBcCiAJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKIAotCiAvKgogICogQ29tbW9uIGZpZWxkcyBmb3Igb2JqZWN0cyB0aGF0IHN1cHBvcnQgQVNMIG5vdGlmaWNhdGlvbnMKICAqLwogI2RlZmluZSBBQ1BJX0NPTU1PTl9OT1RJRllfSU5GTyBcCiAJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAgICAgICAgICpzeXN0ZW1fbm90aWZ5OyAgICAgLyogSGFuZGxlciBmb3Igc3lzdGVtIG5vdGlmaWVzICovXAogCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgICAgICAgICAqZGV2aWNlX25vdGlmeTsgICAgIC8qIEhhbmRsZXIgZm9yIGRyaXZlciBub3RpZmllcyAqL1wKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAgICAgKmhhbmRsZXI7ICAgICAgICAgICAvKiBIYW5kbGVyIGZvciBBZGRyZXNzIHNwYWNlICovCi0KKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAgICAgKmhhbmRsZXI7CS8qIEhhbmRsZXIgZm9yIEFkZHJlc3Mgc3BhY2UgKi8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTEyMSwxNjEgKzExNiwxMTAgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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l9CVUZGRVJfSU5GTyBjaGFyICpwb2ludGVyOwkvKiBTdHJpbmcgaW4gQU1MIHN0cmVhbSBvciBhbGxvY2F0ZWQgc3RyaW5nICovCiB9OwogCi0KLXN0cnVjdCBhY3BpX29iamVjdF9idWZmZXIKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0JQUNQSV9DT01NT05fQlVGRkVSX0lORk8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBvaW50ZXI7ICAgICAgICAgICAvKiBCdWZmZXIgaW4gQU1MIHN0cmVhbSBvciBhbGxvY2F0ZWQgYnVmZmVyICovCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAgICAgICAgICpub2RlOyAgICAgICAgICAgICAgLyogTGluayBiYWNrIHRvIHBhcmVudCBub2RlICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICphbWxfc3RhcnQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFtbF9sZW5ndGg7CitzdHJ1Y3QgYWNwaV9vYmplY3RfYnVmZmVyIHsKKwlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSIEFDUElfQ09NTU9OX0JVRkZFUl9JTkZPIHU4ICogcG9pbnRlcjsJLyogQnVmZmVyIGluIEFNTCBzdHJlYW0gb3IgYWxsb2NhdGVkIGJ1ZmZlciAqLworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwkvKiBMaW5rIGJhY2sgdG8gcGFyZW50IG5vZGUgKi8KKwl1OCAqYW1sX3N0YXJ0OworCXUzMiBhbWxfbGVuZ3RoOwogfTsKIAotCi1zdHJ1Y3QgYWNwaV9vYmplY3RfcGFja2FnZQotewotCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIKLQotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudDsgICAgICAgICAgICAgIC8qICMgb2YgZWxlbWVudHMgaW4gcGFja2FnZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbWxfbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYW1sX3N0YXJ0OwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgICAgICAgICAqbm9kZTsgICAgICAgICAgICAgIC8qIExpbmsgYmFjayB0byBwYXJlbnQgbm9kZSAqLwotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgICAgICAgICAqKmVsZW1lbnRzOyAgICAgICAgIC8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIGFjcGlfb2JqZWN0cyAqLworc3RydWN0IGFjcGlfb2JqZWN0X3BhY2thZ2UgeworCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIgdTMyIGNvdW50OwkvKiAjIG9mIGVsZW1lbnRzIGluIHBhY2thZ2UgKi8KKwl1MzIgYW1sX2xlbmd0aDsKKwl1OCAqYW1sX3N0YXJ0OworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwkvKiBMaW5rIGJhY2sgdG8gcGFyZW50IG5vZGUgKi8KKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICoqZWxlbWVudHM7CS8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIGFjcGlfb2JqZWN0cyAqLwogfTsKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogQ29tcGxleCBkYXRhIHR5cGVzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdHJ1Y3QgYWNwaV9vYmplY3RfZXZlbnQKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzZW1hcGhvcmU7CitzdHJ1Y3QgYWNwaV9vYmplY3RfZXZlbnQgeworCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIgdm9pZCAqc2VtYXBob3JlOwogfTsKIAotCiAjZGVmaW5lIEFDUElfSU5GSU5JVEVfQ09OQ1VSUkVOQ1kgICAweEZGCiAKIHR5cGVkZWYKLWFjcGlfc3RhdHVzICgqQUNQSV9JTlRFUk5BTF9NRVRIT0QpICgKLQlzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICAgICAgICAgICp3YWxrX3N0YXRlKTsKK2FjcGlfc3RhdHVzKCpBQ1BJX0lOVEVSTkFMX01FVEhPRCkgKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKiB3YWxrX3N0YXRlKTsKIAotc3RydWN0IGFjcGlfb2JqZWN0X21ldGhvZAotewotCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kX2ZsYWdzOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbV9jb3VudDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW1sX2xlbmd0aDsKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNlbWFwaG9yZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmFtbF9zdGFydDsKLQlBQ1BJX0lOVEVSTkFMX01FVEhPRCAgICAgICAgICAgIGltcGxlbWVudGF0aW9uOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jdXJyZW5jeTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyZWFkX2NvdW50OwotCWFjcGlfb3duZXJfaWQgICAgICAgICAgICAgICAgICAgICAgICAgICBvd25pbmdfaWQ7CitzdHJ1Y3QgYWNwaV9vYmplY3RfbWV0aG9kIHsKKwlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSIHU4IG1ldGhvZF9mbGFnczsKKwl1OCBwYXJhbV9jb3VudDsKKwl1MzIgYW1sX2xlbmd0aDsKKwl2b2lkICpzZW1hcGhvcmU7CisJdTggKmFtbF9zdGFydDsKKwlBQ1BJX0lOVEVSTkFMX01FVEhPRCBpbXBsZW1lbnRhdGlvbjsKKwl1OCBjb25jdXJyZW5jeTsKKwl1OCB0aHJlYWRfY291bnQ7CisJYWNwaV9vd25lcl9pZCBvd25lcl9pZDsKIH07CiAKLQotc3RydWN0IGFjcGlfb2JqZWN0X211dGV4Ci17Ci0JQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUgotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzeW5jX2xldmVsOyAgICAgICAgIC8qIDAtMTUsIHNwZWNpZmllZCBpbiBNdXRleCgpIGNhbGwgKi8KLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNxdWlzaXRpb25fZGVwdGg7ICAvKiBBbGxvdyBtdWx0aXBsZSBBY3F1aXJlcywgc2FtZSB0aHJlYWQgKi8KLQlzdHJ1Y3QgYWNwaV90aHJlYWRfc3RhdGUgICAgICAgICAgICAgICAgKm93bmVyX3RocmVhZDsgICAgICAvKiBDdXJyZW50IG93bmVyIG9mIHRoZSBtdXRleCAqLwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc2VtYXBob3JlOyAgICAgICAgIC8qIEFjdHVhbCBPUyBzeW5jaHJvbml6YXRpb24gb2JqZWN0ICovCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAgICAgICAgICpwcmV2OyAgICAgICAgICAgICAgLyogTGluayBmb3IgbGlzdCBvZiBhY3F1aX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LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIE9iamVjdHMgdGhhdCBjYW4gYmUgbm90aWZpZWQuICBBbGwgc2hhcmUgYSBjb21tb24gbm90aWZ5X2luZm8gYXJlYS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBhY3BpX29iamVjdF9ub3RpZnlfY29tbW9uICAgICAgICAgICAgLyogQ09NTU9OIE5PVElGWSBmb3IgUE9XRVIsIFBST0NFU1NPUiwgREVWSUNFLCBhbmQgVEhFUk1BTCAqLwoteworc3RydWN0IGFjcGlfb2JqZWN0X25vdGlmeV9jb21tb24gewkvKiBDT01NT04gTk9USUZZIGZvciBQT1dFUiwgUFJPQ0VTU09SLCBERVZJQ0UsIGFuZCBUSEVSTUFMICovCitBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSIEFDUElfQ09NTU9OX05PVElGWV9JTkZPfTsKKworc3RydWN0IGFjcGlfb2JqZWN0X2RldmljZSB7CiAJQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUgotCUFDUElfQ09NTU9OX05PVElGWV9JTkZPCisJICAgIEFDUElfQ09NTU9OX05PVElGWV9JTkZPIHN0cnVjdCBhY3BpX2dwZV9ibG9ja19pbmZvICpncGVfYmxvY2s7CiB9OwogCi0KLXN0cnVjdCBhY3BpX29iamVjdF9kZXZpY2UKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0JQUNQSV9DT01NT05fTk9USUZZX0lORk8KLQlzdHJ1Y3QgYWNwaV9ncGVfYmxvY2tfaW5mbyAgICAgICAgICAgICAgKmdwZV9ibG9jazsKK3N0cnVjdCBhY3BpX29iamVjdF9wb3dlcl9yZXNvdXJjZSB7CisJQUNQSV9PQkpFQ1RfQ09NTU9OX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NT05fTk9USUZZX0lORk99OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMjgzLDkwICsyMjcsNjMgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBhY3BpX29iamVjdF9maWVsZF9jb21tb24gICAgICAgICAgICAgICAgICAgICAgICAgLyogQ09NTU9OIEZJRUxEIChmb3IgQlVGRkVSLCBSRUdJT04sIEJBTkssIGFuZCBJTkRFWCBmaWVsZHMpICovCi17Ci0JQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUgotCUFDUElfQ09NTU9OX0ZJRUxEX0lORk8KLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAgICAgKnJlZ2lvbl9vYmo7ICAgICAgICAvKiBDb250YWluaW5nIE9wZXJhdGlvbiBSZWdpb24gb2JqZWN0ICovCi0JCQkgIC8qIChSRUdJT04vQkFOSyBmaWVsZHMgb25seSkgKi8KK3N0cnVjdCBhY3BpX29iamVjdF9maWVsZF9jb21tb24gewkvKiBDT01NT04gRklFTEQgKGZvciBCVUZGRVIsIFJFR0lPTiwgQkFOSywgYW5kIElOREVYIGZpZWxkcykgKi8KKwlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSIEFDUElfQ09NTU9OX0ZJRUxEX0lORk8gdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqcmVnaW9uX29iajsJLyogQ29udGFpbmluZyBPcGVyYXRpb24gUmVnaW9uIG9iamVjdCAqLworCS8qIChSRUdJT04vQkFOSyBmaWVsZHMgb25seSkgKi8KIH07CiAKLQotc3RydWN0IGFjcGlfb2JqZWN0X3JlZ2lvbl9maWVsZAotewotCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIKLQlB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YmplY3RfYnVmZmVyX2ZpZWxkCi17Ci0JQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUgotCUFDUElfQ09NTU9OX0ZJRUxEX0lORk8KLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAgICAgKmJ1ZmZlcl9vYmo7ICAgICAgICAvKiBDb250YWluaW5nIEJ1ZmZlciBvYmplY3QgKi8KK3N0cnVjdCBhY3BpX29iamVjdF9idWZmZXJfZmllbGQgeworCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIgQUNQSV9DT01NT05fRklFTERfSU5GTyB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpidWZmZXJfb2JqOwkvKiBDb250YWluaW5nIEJ1ZmZlciBvYmplY3QgKi8KIH07CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIE9iamVjdHMgZm9yIGhhbmRsZXJzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdHJ1Y3QgYWNwaV9vYmplY3Rfbm90aWZ5X2hhbmRsZXIKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAgICAgICAgICpub2RlOyAgICAgICAgICAgICAgLyogUGFyZW50IGRldmljZSAqLwotCWFjcGlfbm90aWZ5X2hhbmRsZXIgICAgICAgICAgICAgICAgICAgICBoYW5kbGVyOwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dDsKK3N0cnVjdCBhY3BpX29iamVjdF9ub3RpZnlfaGFuZGxlciB7CisJQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUiBzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZTsJLyogUGFyZW50IGRldmljZSAqLworCWFjcGlfbm90aWZ5X2hhbmRsZXIgaGFuZGxlcjsKKwl2b2lkICpjb250ZXh0OwogfTsKIAotCiAvKiBGbGFncyBmb3IgYWRkcmVzcyBoYW5kbGVyICovCiAKICNkZWZpbmUgQUNQSV9BRERSX0hBTkRMRVJfREVGQVVMVF9JTlNUQUxMRUQgIDB4MQogCi0KLXN0cnVjdCBhY3BpX29iamVjdF9hZGRyX2hhbmRsZXIKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwYWNlX2lkOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZmxhZ3M7Ci0JYWNwaV9hZHJfc3BhY2VfaGFuZGxlciAgICAgICAgICAgICAgICAgIGhhbmRsZXI7Ci0Jc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgICAgICAgICAgICAgICpub2RlOyAgICAgICAgICAgICAgLyogUGFyZW50IGRldmljZSAqLwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dDsKLQlhY3BpX2Fkcl9zcGFjZV9zZXR1cCAgICAgICAgICAgICAgICAgICAgc2V0dXA7Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAgICAgICAgICpyZWdpb25fbGlzdDsgICAgICAgLyogcmVnaW9ucyB1c2luZyB0aGlzIGhhbmRsZXIgKi8KLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICAgICAgICAgKm5leHQ7CitzdHJ1Y3QgYWNwaV9vYmplY3RfYWRkcl9oYW5kbGVyIHsKKwlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSIHU4IHNwYWNlX2lkOworCXUxNiBoZmxhZ3M7CisJYWNwaV9hZHJfc3BhY2VfaGFuZGxlciBoYW5kbGVyOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwkvKiBQYXJlbnQgZGV2aWNlICovCisJdm9pZCAqY29udGV4dDsKKwlhY3BpX2Fkcl9zcGFjZV9zZXR1cCBzZXR1cDsKKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpyZWdpb25fbGlzdDsJLyogcmVnaW9ucyB1c2luZyB0aGlzIGhhbmRsZXIgKi8KKwl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpuZXh0OwogfTsKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogU3BlY2lhbCBpbnRlcm5hbCBvYmplY3RzCkBAIC0zNzcsMTggKzI5NCwxNSBAQAogICogVGhlIFJlZmVyZW5jZSBvYmplY3QgdHlwZSBpcyB1c2VkIGZvciB0aGVzZSBvcGNvZGVzOgogICogQXJnWzAtNl0sIExvY2FsWzAtN10sIGluZGV4X29wLCBuYW1lX29wLCB6ZXJvX29wLCBvbmVfb3AsIG9uZXNfb3AsIGRlYnVnX29wCiAgKi8KLXN0cnVjdCBhY3BpX29iamVjdF9yZWZlcmVuY2UKLXsKLQlBQ1BJX09CSkVDVF9DT01NT05fSEVBREVSCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldF90eXBlOyAgICAgICAgLyogVXNlZCBmb3IgaW5kZXhfb3AgKi8KLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bjb2RlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ7ICAgICAgICAgICAgIC8qIFVzZWQgZm9yIGFyZ19vcCwgbG9jYWxfb3AsIGFuZCBpbmRleF9vcCAqLwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqb2JqZWN0OyAgICAgICAgIC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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JkX2ZpbGwxOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbWxfbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYW1sX3N0YXJ0OwotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgICAgICAgICAqbWV0aG9kX1JFRzsgICAgICAgIC8qIF9SRUcgbWV0aG9kIGZvciB0aGlzIHJlZ2lvbiAoaWYgYW55KSAqLwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQ7ICAgIC8qIFJlZ2lvbi1zcGVjaWZpYyBkYXRhICovCitzdHJ1Y3QgYWNwaV9vYmplY3RfZXh0cmEgeworCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIgdTggYnl0ZV9maWxsMTsKKwl1MTYgd29yZF9maWxsMTsKKwl1MzIgYW1sX2xlbmd0aDsKKwl1OCAqYW1sX3N0YXJ0OworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICptZXRob2RfUkVHOwkvKiBfUkVHIG1ldGhvZCBmb3IgdGhpcyByZWdpb24gKGlmIGFueSkgKi8KKwl2b2lkICpyZWdpb25fY29udGV4dDsJLyogUmVnaW9uLXNwZWNpZmljIGRhdGEgKi8KIH07CiAKLQogLyogQWRkaXRpb25hbCBkYXRhIHRoYXQgY2FuIGJlIGF0dGFjaGVkIHRvIG5hbWVzcGFjZSBub2RlcyAqLwogCi1zdHJ1Y3QgYWNwaV9vYmplY3RfZGF0YQotewotCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIKLQlhY3BpX29iamVjdF9oYW5kbGVyICAgICAgICAgICAgICAgICAgICAgaGFuZGxlcjsKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBvaW50ZXI7CitzdHJ1Y3QgYWNwaV9vYmplY3RfZGF0YSB7CisJQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUiBhY3BpX29iamVjdF9oYW5kbGVyIGhhbmRsZXI7CisJdm9pZCAqcG9pbnRlcjsKIH07CiAKLQogLyogU3RydWN0dXJlIHVzZWQgd2hlbiBvYmplY3RzIGFyZSBjYWNoZWQgZm9yIHJldXNlICovCiAKLXN0cnVjdCBhY3BpX29iamVjdF9jYWNoZV9saXN0Ci17Ci0JQUNQSV9PQkpFQ1RfQ09NTU9OX0hFQURFUgotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgICAgICAgICAqbmV4dDsgICAgICAgICAgICAgIC8qIExpbmsgZm9yIG9iamVjdCBjYWNoZSBhbmQgaW50ZXJuYWwgbGlzdHMqLworc3RydWN0IGFjcGlfb2JqZWN0X2NhY2hlX2xpc3QgeworCUFDUElfT0JKRUNUX0NPTU1PTl9IRUFERVIgdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqbmV4dDsJLyogTGluayBmb3Igb2JqZWN0IGNhY2hlIGFuZCBpbnRlcm5hbCBsaXN0cyAqLwogfTsKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCBEZXNjcmlwdG9yIC0gYSBnaWFudCB1bmlvbiBvZiBhbGwgb2YgdGhlIGFib3ZlCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi11bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0Ci17Ci0Jc3RydWN0IGFjcGlfb2JqZWN0X2NvbW1vbiAgICAgICAgICAgICAgIGNvbW1vbjsKLQlzdHJ1Y3QgYWNwaV9vYmplY3RfaW50ZWdlciAgICAgICAgICAgICAgaW50ZWd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9pbmNsdWRlL2FjcGkvYWNwaW9zeGYuaApAQCAtNyw3ICs3LDYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQogLyoKICAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMDUsIFIuIEJ5cm9uIE1vb3JlCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgpAQCAtNTEsNyArNTAsNiBAQAogI2luY2x1ZGUgInBsYXRmb3JtL2FjZW52LmgiCiAjaW5jbHVkZSAiYWN0eXBlcy5oIgogCi0KIC8qIFByaW9yaXRpZXMgZm9yIGFjcGlfb3NfcXVldWVfZm9yX2V4ZWN1dGlvbiAqLwogCiAjZGVmaW5lIE9TRF9QUklPUklUWV9HUEUgICAgICAgICAgICAxCkBAIC02MiwyMDAgKzYwLDEzNiBAQAogI2RlZmluZSBBQ1BJX05PX1VOSVRfTElNSVQgICAgICAgICAgKCh1MzIpIC0xKQogI2RlZmluZSBBQ1BJX01VVEVYX1NFTSAgICAgICAgICAgICAgMQogCi0KIC8qIEZ1bmN0aW9ucyBmb3IgYWNwaV9vc19zaWduYWwgKi8KIAogI2RlZmluZSBBQ1BJX1NJR05BTF9GQVRBTCAgICAgICAgICAgMAogI2RlZmluZSBBQ1BJX1NJR05BTF9CUkVBS1BPSU5UICAgICAgMQogCi1zdHJ1Y3QgYWNwaV9zaWduYWxfZmF0YWxfaW5mbwotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmd1bWVudDsKK3N0cnVjdCBhY3BpX3NpZ25hbF9mYXRhbF9pbmZvIHsKKwl1MzIgdHlwZTsKKwl1MzIgY29kZTsKKwl1MzIgYXJndW1lbnQ7CiB9OwogCi0KIC8qCiAgK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Sh2b2lkICpjb250ZXh0KTsKIAotdm9pZAotYWNwaV9vc193YWl0X2V2ZW50c19jb21wbGV0ZSAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCk7Cit2b2lkIGFjcGlfb3Nfd2FpdF9ldmVudHNfY29tcGxldGUodm9pZCAqY29udGV4dCk7CiAKLXZvaWQKLWFjcGlfb3Nfc2xlZXAgKAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgbWlsbGlzZWNvbmRzKTsKK3ZvaWQgYWNwaV9vc19zbGVlcChhY3BpX2ludGVnZXIgbWlsbGlzZWNvbmRzKTsKIAotdm9pZAotYWNwaV9vc19zdGFsbCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaWNyb3NlY29uZHMpOwotCit2b2lkIGFjcGlfb3Nfc3RhbGwodTMyIG1pY3Jvc2Vjb25kcyk7CiAKIC8qCiAgKiBQbGF0Zm9ybSBhbmQgaGFyZHdhcmUtaW5kZXBlbmRlbnQgSS9PIGludGVyZmFjZXMKICAqLwotYWNwaV9zdGF0dXMKLWFjcGlfb3NfcmVhZF9wb3J0ICgKLQlhY3BpX2lvX2FkZHJlc3MgICAgICAgICAgICAgICAgIGFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCk7CithY3BpX3N0YXR1cyBhY3BpX29zX3JlYWRfcG9ydChhY3BpX2lvX2FkZHJlc3MgYWRkcmVzcywgdTMyICogdmFsdWUsIHUzMiB3aWR0aCk7CiAKLWFjcGlfc3RhdHVzCi1hY3BpX29zX3dyaXRlX3BvcnQgKAotCWFjcGlfaW9fYWRkcmVzcyAgICAgICAgICAgICAgICAgYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAg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ICgKLQlzdHJ1Y3QgYWNwaV9wY2lfaWQgICAgICAgICAgICAgICpwY2lfaWQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWcsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCk7CithY3BpX29zX3JlYWRfcGNpX2NvbmZpZ3VyYXRpb24oc3RydWN0IGFjcGlfcGNpX2lkICpwY2lfaWQsCisJCQkgICAgICAgdTMyIHJlZywgdm9pZCAqdmFsdWUsIHUzMiB3aWR0aCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX29zX3dyaXRlX3BjaV9jb25maWd1cmF0aW9uICgKLQlzdHJ1Y3QgYWNwaV9wY2lfaWQgICAgICAgICAgICAgICpwY2lfaWQsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWcsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICB2YWx1ZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoKTsKK2FjcGlfb3Nfd3JpdGVfcGNpX2NvbmZpZ3VyYXRpb24oc3RydWN0IGFjcGlfcGNpX2lkICpwY2lfaWQsCisJCQkJdTMyIHJlZywgYWNwaV9pbnRlZ2VyIHZhbHVlLCB1MzIgd2lkdGgpOwogCiAvKgogICogSW50ZXJpbSBmdW5jdGlvbiBuZWVkZWQgZm9yIFBDSSBJUlEgcm91dGluZwogICovCiB2b2lkCi1hY3BpX29zX2Rlcml2ZV9wY2lfaWQoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICByaGFuZGxlLAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgY2hhbmRsZSwKLQlzdHJ1Y3QgYWNwaV9wY2lfaWQgICAgICAgICAgICAgICoqcGNpX2lkKTsKK2FjcGlfb3NfZGVyaXZlX3BjaV9pZChhY3BpX2hhb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uLik7Cit2b2lkIEFDUElfSU5URVJOQUxfVkFSX1hGQUNFIGFjcGlfb3NfcHJpbnRmKGNvbnN0IGNoYXIgKmZvcm1hdCwgLi4uKTsKIAotdm9pZAotYWNwaV9vc192cHJpbnRmICgKLQljb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICpmb3JtYXQsCi0JdmFfbGlzdCAgICAgICAgICAgICAgICAgYXJncyk7Cit2b2lkIGFjcGlfb3NfdnByaW50Zihjb25zdCBjaGFyICpmb3JtYXQsIHZhX2xpc3QgYXJncyk7CiAKLXZvaWQKLWFjcGlfb3NfcmVkaXJlY3Rfb3V0cHV0ICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkZXN0aW5hdGlvbik7Ci0KK3ZvaWQgYWNwaV9vc19yZWRpcmVjdF9vdXRwdXQodm9pZCAqZGVzdGluYXRpb24pOwogCiAjaWZkZWYgQUNQSV9GVVRVUkVfVVNBR0UKIC8qCiAgKiBEZWJ1ZyBpbnB1dAogICovCi11MzIKLWFjcGlfb3NfZ2V0X2xpbmUgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcik7Cit1MzIgYWNwaV9vc19nZXRfbGluZShjaGFyICpidWZmZXIpOwogI2VuZGlmCiAKLQogLyoKICAqIERpcmVjdG9yeSBtYW5pcHVsYXRpb24KICAqLwotdm9pZCAqCi1hY3BpX29zX29wZW5fZGlyZWN0b3J5ICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwYXRobmFtZSwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICp3aWxkY2FyZF9zcGVjLAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkX2ZpbGVfdHlwZSk7Cit2b2lkICphY3BpX29zX29wZW5fZGlyZWN0b3J5KGNoYXIgKnBhdGhuYW1lLAorCQkJICAgICBjaGFyICp3aWxkY2FyZF9zcGVjLCBjaGFyIHJlcXVlc3RlZF9maWxlX3R5cGUpOwogCiAvKiByZXF1ZXN0ZV9maWxlX3R5cGUgdmFsdWVzICovCiAKICNkZWZpbmUgUkVRVUVTVF9GSUxFX09OTFkgICAgICAgICAgICAgICAgICAgMAogI2RlZmluZSBSRVFVRVNUX0RJUl9PTkxZICAgICAgICAgICAgICAgICAgICAxCiAKK2NoYXIgKmFjcGlfb3NfZ2V0X25leHRfZmlsZW5hbWUodm9pZCAqZGlyX2hhbmRsZSk7CiAKLWNoYXIgKgotYWNwaV9vc19nZXRfbmV4dF9maWxlbmFtZSAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZGlyX2hhbmRsZSk7Ci0KLXZvaWQKLWFjcGlfb3NfY2xvc2VfZGlyZWN0b3J5ICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkaXJfaGFuZGxlKTsKK3ZvaWQgYWNwaV9vc19jbG9zZV9kaXJlY3Rvcnkodm9pZCAqZGlyX2hhbmRsZSk7CiAKIC8qCiAgKiBEZWJ1ZwogICovCiB2b2lkCi1hY3BpX29zX2RiZ19hc3NlcnQoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZmFpbGVkX2Fzc2VydGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpmaWxlX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptZXNzYWdlKTsKK2FjcGlfb3NfZGJnX2Fzc2VydCh2b2lkICpmYWlsZWRfYXNzZXJ0aW9uLAorCQkgICB2b2lkICpmaWxlX25hbWUsIHUzMiBsaW5lX251bWJlciwgY2hhciAqbWVzc2FnZSk7CiAKLSNlbmRpZiAvKiBfX0FDUElPU1hGX0hfXyAqLworI2VuZGlmCQkJCS8qIF9fQUNQSU9TWEZfSF9fICovCmRpZmYgLS1naXQgYS9pbmNsdWRl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RhbmNlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldF9idWZmZXIpOwotCi1hY3BpX3N0YXR1cwotYWNwaV9nZXRfZmlybXdhcmVfdGFibGUgKAotCWFjcGlfc3RyaW5nICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFncywKLQlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgICAgICAgICoqdGFibGVfcG9pbnRlcik7Ci0KK2FjcGlfZ2V0X2Zpcm13YXJlX3RhYmxlKGFjcGlfc3RyaW5nIHNpZ25hdHVyZSwKKwkJCXUzMiBpbnN0YW5jZSwKKwkJCXUzMiBmbGFncywgc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICoqdGFibGVfcG9pbnRlcik7CiAKIC8qCiAgKiBOYW1lc3BhY2UgYW5kIG5hbWUgaW50ZXJmYWNlcwogICovCiBhY3BpX3N0YXR1cwotYWNwaV93YWxrX25hbWVzcGFjZSAoCi0JYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICB0eXBlLAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgc3RhcnRfb2JqZWN0LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2RlcHRoLAotCWFjcGlfd2Fsa19jYWxsYmFjayAgICAgICAgICAgICAgdXNlcl9mdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0LAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipyZXR1cm5fdmFsdWUpOworYWNwaV93YWxrX25hbWVzcGFjZShhY3BpX29iamVjdF90eXBlIHR5cGUsCisJCSAgICBhY3BpX2hhbmRsZSBzdGFydF9vYmplY3QsCisJCSAgICB1MzIgbWF4X2RlcHRoLAorCQkgICAgYWNwaV93YWxrX2NhbGxiYWNrIHVzZXJfZnVuY3Rpb24sCisJCSAgICB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZ2V0X2RldmljZXMgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKkhJRCwKLQlhY3BpX3dhbGtfY2FsbGJhY2sgICAgICAgICAgICAgIHVzZXJfZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqcmV0dXJuX3ZhbHVlKTsKK2FjcGlfZ2V0X2RldmljZXMoY2hhciAqSElELAorCQkgYWNwaV93YWxrX2NhbGxiYWNrIHVzZXJfZnVuY3Rpb24sCisJCSB2b2lkICpjb250ZXh0LCB2b2lkICoqcmV0dXJuX3ZhbHVlKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfZ2V0X25hbWUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgaGFuZGxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZV90eXBlLAotCXN0cnVjdCBhY3BpX2J1ZmZlciAgICAgICAgICAgICAgKnJldF9wYXRoX3B0cik7CithY3BpX2dldF9uYW1lKGFjcGlfaGFuZGxlIGhhbmRsZSwKKwkgICAgICB1MzIgbmFtZV90eXBlLCBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJldF9wYXRoX3B0cik7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9oYW5kbGUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgcGFyZW50LAotCWFjcGlfc3RyaW5nICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICAqcmV0X2hhbmRsZSk7CithY3BpX2dld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iBpbnRlcnJ1cHRfbnVtYmVyKTsKIAotYWNwaV9zdGF0dXMKLWFjcGlfZW5hYmxlX2dwZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKTsKLQotYWNwaV9zdGF0dXMKLWFjcGlfZGlzYWJsZV9ncGUgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZ3BlX2RldmljZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdwZV9udW1iZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFncyk7Ci0KLWFjcGlfc3RhdHVzCi1hY3BpX2NsZWFyX2dwZSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzKTsKLQotI2lmZGVmIEFDUElfRlVUVVJFX1VTQUdFCi1hY3BpX3N0YXR1cwotYWNwaV9nZXRfZ3BlX3N0YXR1cyAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzLAotCWFjcGlfZXZlbnRfc3RhdHVzICAgICAgICAgICAgICAgKmV2ZW50X3N0YXR1cyk7Ci0jZW5kaWYgIC8qICBBQ1BJX0ZVVFVSRV9VU0FHRSAgKi8KLQotYWNwaV9zdGF0dXMKLWFjcGlfaW5zdGFsbF9ncGVfYmxvY2sgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgZ3BlX2RldmljZSwKLQlzdHJ1Y3QgYWNwaV9nZW5lcmljX2FkZHJlc3MgICAgICpncGVfYmxvY2tfYWRkcmVzcywKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyX2NvdW50LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0X2xldmVsKTsKLQotYWNwaV9zdGF0dXMKLWFjcGlfcmVtb3ZlX2dwZV9ibG9jayAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICBncGVfZGV2aWNlKTsKLQorYWNwaV9zdGF0dXMgYWNwaV9yZW1vdmVfZ3BlX2Jsb2NrKGFjcGlfaGFuZGxlIGdwZV9kZXZpY2UpOwogCiAvKgogICogUmVzb3VyY2UgaW50ZXJmYWNlcwogICovCiB0eXBlZGVmCi1hY3BpX3N0YXR1cyAoKkFDUElfV0FMS19SRVNPVVJDRV9DQUxMQkFDSykgKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKnJlc291cmNlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpOwotCithY3BpX3N0YXR1cygqQUNQSV9XQUxLX1JFU09VUkNFX0NBTExCQUNLKSAoc3RydWN0IGFjcGlfcmVzb3VyY2UgKiByZXNvdXJjZSwKKwkJCQkJICAgdm9pZCAqY29udGV4dCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9jdXJyZW50X3Jlc291cmNlcygKLQlhY3BpX2hhbmRsZSAgICAgICAgICAgICAgICAgICAgIGRldmljZV9oYW5kbGUsCi0Jc3RydWN0IGFjcGlfYnVmZmVyICAgICAgICAgICAgICAqcmV0X2J1ZmZlcik7CithY3BpX2dldF9jdXJyZW50X3Jlc291cmNlcyhhY3BpX2hhbmRsZSBkZXZpY2VfaGFuZGxlLAorCQkJICAgc3RydWN0IGFjcGlfYnVmZmVyICpyZXRf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WFjcGlfcnNfZHVtcF9pcnFfbGlzdCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcm91dGVfdGFibGUpOwotI2VuZGlmCS8qIEFDUElfRlVUVVJFX1VTQUdFICovCi0KK3ZvaWQgYWNwaV9yc19kdW1wX2lycV9saXN0KHU4ICogcm91dGVfdGFibGUpOworI2VuZGlmCQkJCS8qIEFDUElfRlVUVVJFX1VTQUdFICovCiAKIC8qCiAgKiByc2NhbGMKICAqLwogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZ2V0X2J5dGVfc3RyZWFtX3N0YXJ0ICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKmJ5dGVfc3RyZWFtX3N0YXJ0LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNpemUpOworYWNwaV9yc19nZXRfYnl0ZV9zdHJlYW1fc3RhcnQodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCQkgICAgICB1OCAqKiBieXRlX3N0cmVhbV9zdGFydCwgdTMyICogc2l6ZSk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9saXN0X2xlbmd0aCAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZV9zdHJlYW1fYnVmZmVyX2xlbmd0aCwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzaXplX25lZWRlZCk7CithY3BpX3JzX2dldF9saXN0X2xlbmd0aCh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCXUzMiBieXRlX3N0cmVhbV9idWZmZXJfbGVuZ3RoLCBhY3BpX3NpemUgKiBzaXplX25lZWRlZCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9ieXRlX3N0cmVhbV9sZW5ndGggKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzaXplX25lZWRlZCk7CithY3BpX3JzX2dldF9ieXRlX3N0cmVhbV9sZW5ndGgoc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0X2J1ZmZlciwKKwkJCSAgICAgICBhY3BpX3NpemUgKiBzaXplX25lZWRlZCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2dldF9wY2lfcm91dGluZ190YWJsZV9sZW5ndGggKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnBhY2thZ2Vfb2JqZWN0LAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcl9zaXplX25lZWRlZCk7CithY3BpX3JzX2dldF9wY2lfcm91dGluZ190YWJsZV9sZW5ndGgodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqcGFja2FnZV9vYmplY3QsCisJCQkJICAgICBhY3BpX3NpemUgKiBidWZmZXJfc2l6ZV9uZWVkZWQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19ieXRlX3N0cmVhbV90b19saXN0ICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlX3N0cmVhbV9idWZmZXJfbGVuZ3RoLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm91dHB1dF9idWZmZXIpOworYWNwaV9yc19ieXRlX3N0cmVhbV90b19saXN0KHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJICAgIHUzMiBieXRlX3N0cmVhbV9idWZmZXJfbGVuZ3RoLCB1OCAqIG91dHB1dF9idWZmZ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AgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19maXhlZF9pb19yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQkgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfaW9fc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCk7CithY3BpX3JzX2lvX3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCSAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19maXhlZF9pb19zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKTsKK2FjcGlfcnNfZml4ZWRfaW9fc3RyZWFtKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdCwKKwkJCXU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfaXJxX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19pcnFfcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCSAgICAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCSAgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19pcnFfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCk7CithY3BpX3JzX2lycV9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkgICB1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2RtYV9yZXNvdXJjZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnN0cnVjdHVyZV9zaXplKTsKK2FjcGlfcnNfZG1hX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkgICAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkgICAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZG1hX3N0cmVhbSAoCi0Jc3RydWN0IGFjcGlfcmVzb3VyY2UgICAgICAgICAgICAqbGlua2VkX2xpc3QsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQpOworYWNwaV9yc19kbWFfc3RyZWFtKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdCwKKwkJICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19hZGRyZXNzMTZfcmVzb3VyY2UgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVfc3RyZWFtX2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpzdHJ1Y3R1cmVfc2l6ZSk7CithY3BpX3JzX2FkZHJlc3MxNl9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19hZGRyZXNzMTZfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCk7CithY3BpX3JzX2FkZHJlc3MxNl9zdHJlYW0oc3RydWN0IGFjcGlfcmVzb3VyY2UgKmxpbmtlZF9saXN0LAorCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfYWRkcmVzczMyX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19hZGRyZXNzMzJfcmVzb3VyY2UodTggKiBieXRlX3N0cmVhbV9idWZmZXIsCisJCQkgICBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCwKKwkJCSAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfYWRkcmVzcz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AgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKTsKK2FjcGlfcnNfYWRkcmVzczY0X3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCQkgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19zdGFydF9kZXBlbmRfZm5zX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19zdGFydF9kZXBlbmRfZm5zX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJCSAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQkJICB1OCAqKiBvdXRwdXRfYnVmZmVyLAorCQkJCSAgYWNwaV9zaXplICogc3RydWN0dXJlX3NpemUpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19lbmRfZGVwZW5kX2Zuc19yZXNvdXJjZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZV9zdHJlYW1fYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKnN0cnVjdHVyZV9zaXplKTsKK2FjcGlfcnNfZW5kX2RlcGVuZF9mbnNfcmVzb3VyY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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19tZW1vcnkyNF9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKKwkJCSAgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQsCisJCQkgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfbWVtb3J5MjRfc3RyZWFtICgKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAgICAgICAgICAgICpsaW5rZWRfbGlzdCwKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqb3V0cHV0X2J1ZmZlciwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgICpieXRlc19jb25zdW1lZCk7CithY3BpX3JzX21lbW9yeTI0X3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCQl1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX21lbW9yeTMyX3JhbmdlX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi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c2l6ZSk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3JzX2V4dGVuZGVkX2lycV9zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwdXRfYnVmZmVyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgKmJ5dGVzX2NvbnN1bWVkKTsKK2FjcGlfcnNfZXh0ZW5kZWRfaXJxX3N0cmVhbShzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqbGlua2VkX2xpc3QsCisJCQkgICAgdTggKiogb3V0cHV0X2J1ZmZlciwgYWNwaV9zaXplICogYnl0ZXNfY29uc3VtZWQpOwogCiBhY3BpX3N0YXR1cwotYWNwaV9yc19lbmRfdGFnX3Jlc291cmNlICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpieXRlX3N0cmVhbV9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqYnl0ZXNfY29uc3VtZWQsCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKm91dHB1dF9idWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICAqc3RydWN0dXJlX3NpemUpOworYWNwaV9yc19lbmRfdGFnX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAorCQkJIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAorCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIHN0cnVjdHVyZV9zaXplKTsKIAogYWNwaV9zdGF0dXMKLWFjcGlfcnNfZW5kX3RhZ19zdHJlYW0gKAotCXN0cnVjdCBhY3BpX3Jlc291cmNlICAgICAgICAgICAgKmxpbmtlZF9saXN0LAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipvdXRwd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IGV4ZWN1dGlvbi4KQEAgLTY1LDE1MiArNjMsMTQyIEBACiAjZGVmaW5lIEFDUElfV0FMS19DT05TVF9SRVFVSVJFRCAgICAzCiAjZGVmaW5lIEFDUElfV0FMS19DT05TVF9PUFRJT05BTCAgICA0CiAKLXN0cnVjdCBhY3BpX3dhbGtfc3RhdGUKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhX3R5cGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBUbyBkaWZmZXJlbnRpYXRlIHZhcmlvdXMgaW50ZXJuYWwgb2JqcyBNVVNUIEJFIEZJUlNUISovXAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhbGtfdHlwZTsKLQlhY3BpX293bmVyX2lkICAgICAgICAgICAgICAgICAgICAgICBvd25lcl9pZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPd25lciBvZiBvYmplY3RzIGNyZWF0ZWQgZHVyaW5nIHRoZSB3YWxrICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9wcmVkaWNhdGU7ICAgICAgICAgICAgICAgICAgICAgLyogUmVzdWx0IG9mIGxhc3QgcHJlZGljYXRlICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRm9yIGFsaWdubWVudCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcmVzdWx0OyAgICAgICAgICAgICAgICAgICAgIC8qICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dF9vcF9pbmZvOyAgICAgICAgICAgICAgICAgICAgICAgLyogSW5mbyBhYm91dCBuZXh0X29wICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtX29wZXJhbmRzOyAgICAgICAgICAgICAgICAgICAgICAgLyogU3RhY2sgcG9pbnRlciBmb3IgT3BlcmFuZHNbXSBhcnJheSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybl91c2VkOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wY29kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEN1cnJlbnQgQU1MIG9wY29kZSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlX2RlcHRoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdfY291bnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwdXNoIGZvciBmaXhlZCBvciB2YXIgYXJncyAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFtbF9vZmZzZXQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnX3R5cGVzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZF9icmVha3BvaW50OyAgICAgICAgICAgICAgICAgIC8qIEZvciBzaW5nbGUgc3RlcHBpbmcgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VyX2JyZWFrcG9pbnQ7ICAgICAgICAgICAgICAgICAgICAvKiBVc2VyIEFNTCBicmVha3BvaW50ICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VfZmxhZ3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldl9hcmdfdHlwZXM7CitzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlIHsKKwl1OCBkYXRhX3R5cGU7CQkvKiBUbyBkaWZmZXJlbnRpYXRlIHZhcmlvdXMgaW50ZXJuYWwgb2JqcyBNVVNUI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NzZWQgKi8KKwlhY3BpX3BhcnNlX2Rvd253YXJkcyBkZXNjZW5kaW5nX2NhbGxiYWNrOworCWFjcGlfcGFyc2VfdXB3YXJkcyBhc2NlbmRpbmdfY2FsbGJhY2s7CisJc3RydWN0IGFjcGlfdGhyZWFkX3N0YXRlICp0aHJlYWQ7CisJc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqbmV4dDsJLyogTmV4dCB3YWxrX3N0YXRlIGluIGxpc3QgKi8KIH07CiAKLQogLyogSW5mbyB1c2VkIGJ5IGFjcGlfcHNfaW5pdF9vYmplY3RzICovCiAKLXN0cnVjdCBhY3BpX2luaXRfd2Fsa19pbmZvCi17Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2RfY291bnQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXZpY2VfY291bnQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcF9yZWdpb25fY291bnQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZF9jb3VudDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcl9jb3VudDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2thZ2VfY291bnQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcF9yZWdpb25faW5pdDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkX2luaXQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJfaW5pdDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2thZ2VfaW5pdDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdF9jb3VudDsKLQlzdHJ1Y3QgYWNwaV90YWJsZV9kZXNjICAgICAgICAgICp0YWJsZV9kZXNjOworc3RydWN0IGFjcGl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ICAgIG93bmVyX2lkOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheV90eXBlOworc3RydWN0IGFjcGlfd2Fsa19pbmZvIHsKKwl1MzIgZGVidWdfbGV2ZWw7CisJdTMyIGNvdW50OworCWFjcGlfb3duZXJfaWQgb3duZXJfaWQ7CisJdTggZGlzcGxheV90eXBlOwogfTsKIAogLyogRGlzcGxheSBUeXBlcyAqLwogCi0jZGVmaW5lIEFDUElfRElTUExBWV9TVU1NQVJZICAgIDAKLSNkZWZpbmUgQUNQSV9ESVNQTEFZX09CSkVDVFMgICAgMQorI2RlZmluZSBBQ1BJX0RJU1BMQVlfU1VNTUFSWSAgICAodTgpIDAKKyNkZWZpbmUgQUNQSV9ESVNQTEFZX09CSkVDVFMgICAgKHU4KSAxCisjZGVmaW5lIEFDUElfRElTUExBWV9NQVNLICAgICAgICh1OCkgMQogCi1zdHJ1Y3QgYWNwaV9nZXRfZGV2aWNlc19pbmZvCi17Ci0JYWNwaV93YWxrX2NhbGxiYWNrICAgICAgICAgICAgICB1c2VyX2Z1bmN0aW9uOwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQ7Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaGlkOworI2RlZmluZSBBQ1BJX0RJU1BMQVlfU0hPUlQgICAgICAodTgpIDIKKworc3RydWN0IGFjcGlfZ2V0X2RldmljZXNfaW5mbyB7CisJYWNwaV93YWxrX2NhbGxiYWNrIHVzZXJfZnVuY3Rpb247CisJdm9pZCAqY29udGV4dDsKKwljaGFyICpoaWQ7CiB9OwogCit1bmlvbiBhY3BpX2FtbF9vcGVyYW5kcyB7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqb3BlcmFuZHNbN107CiAKLXVuaW9uIGFjcGlfYW1sX29wZXJhbmRzCi17Ci0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAgICAgKm9wZXJhbmRzWzddO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ZSAqLworI2RlZmluZSBTQlNUX1NJRyAgICAgICAgICAgICAgICAiU0JTVCIJLyogU21hcnQgQmF0dGVyeSBTcGVjaWZpY2F0aW9uIFRhYmxlICovCisjZGVmaW5lIFNQSUNfU0lHICAgICAgICAgICAgICAgICJTUElDIgkvKiBJT1NBUElDIHRhYmxlICovCisjZGVmaW5lIEJPT1RfU0lHICAgICAgICAgICAgICAgICJCT09UIgkvKiBCb290IHRhYmxlICovCiAKLQotI2RlZmluZSBHTF9PV05FRCAgICAgICAgICAgICAgICAweDAyICAgICAgICAvKiBPd25lcnNoaXAgb2YgZ2xvYmFsIGxvY2sgaXMgYml0IDEgKi8KLQorI2RlZmluZSBHTF9PV05FRCAgICAgICAgICAgICAgICAweDAyCS8qIE93bmVyc2hpcCBvZiBnbG9iYWwgbG9jayBpcyBiaXQgMSAqLwogCiAvKgogICogQ29tbW9uIHRhYmxlIHR5cGVzLiAgVGhlIGJhc2UgY29kZSBjYW4gcmVtYWluCkBAIC03NSw3ICs3Miw2IEBACiAjZGVmaW5lIEZBQ1NfREVTQ1JJUFRPUiAgICAgICAgIHN0cnVjdCBmYWNzX2Rlc2NyaXB0b3JfcmV2MgogI2RlZmluZSBGQURUX0RFU0NSSVBUT1IgICAgICAgICBzdHJ1Y3QgZmFkdF9kZXNjcmlwdG9yX3JldjIKIAotCiAjcHJhZ21hIHBhY2soMSkKIAogLyoKQEAgLTg0LDQ1ICs4MCwzNyBAQAogICogTk9URTogVGhlIHRhYmxlcyB0aGF0IGFyZSBzcGVjaWZpYyB0byBBQ1BJIHZlcnNpb25zICgxLjAsIDIuMCwgZXRjLikKICAqIGFyZSBpbiBzZXBhcmF0ZSBmaWxlcy4KICAqLwotc3RydWN0IHJzZHBfZGVzY3JpcHRvciAgICAgICAgIC8qIFJvb3QgU3lzdGVtIERlc2NyaXB0b3IgUG9pbnRlciAqLwotewotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlIFs4XTsgICAgICAgICAgLyogQUNQSSBzaWduYXR1cmUsIGNvbnRhaW5zICJSU0QgUFRSICIgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrc3VtOyAgICAgICAgICAgICAgIC8qIFRvIG1ha2Ugc3VtIG9mIHN0cnVjdCA9PSAwICovCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1faWQgWzZdOyAgICAgICAgICAgICAvKiBPRU0gaWRlbnRpZmljYXRpb24gKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldmlzaW9uOyAgICAgICAgICAgICAgIC8qIE11c3QgYmUgMCBmb3IgMS4wLCAyIGZvciAyLjAgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJzZHRfcGh5c2ljYWxfYWRkcmVzczsgIC8qIDMyLWJpdCBwaHlzaWNhbCBhZGRyZXNzIG9mIFJTRFQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsgICAgICAgICAgICAgICAgIC8qIFhTRFQgTGVuZ3RoIGluIGJ5dGVzIGluY2x1ZGluZyBoZHIgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhzZHRfcGh5c2ljYWxfYWRkcmVzczsgIC8qIDY0LWJpdCBwaHlzaWNhbCBhZGRyZXNzIG9mIFhTRFQgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVuZGVkX2NoZWNrc3VtOyAgICAgIC8qIENoZWNrc3VtIG9mIGVudGlyZSB0YWJsZSAqLwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQgWzNdOyAgICAgICAgICAgLyogUmVzZXJ2ZWQgZmllbGQgbXVzdCBiZSAwICovCitzdHJ1Y3QgcnNkcF9kZXNjcmlwdG9yIHsJLyogUm9vdCBTeXN0ZW0gRGVzY3JpcHRvciBQb2ludGVyICovCisJY2hhciBzaWduY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2xvY2s7CisJdTY0ICpmaXJtd2FyZV93YWtpbmdfdmVjdG9yOworCXU4IHZlY3Rvcl93aWR0aDsKIH07CiAKLQogI2RlZmluZSBBQ1BJX1RBQkxFX0hFQURFUl9ERUYgICAvKiBBQ1BJIGNvbW1vbiB0YWJsZSBoZWFkZXIgKi8gXAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlIFs0XTsgICAgICAgICAgLyogQUNQSSBzaWduYXR1cmUgKDQgQVNDSUkgY2hhcmFjdGVycykgKi9cCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7ICAgICAgICAgICAgICAgICAvKiBMZW5ndGggb2YgdGFibGUsIGluIGJ5dGVzLCBpbmNsdWRpbmcgaGVhZGVyICovXAorCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlWzRdOyAgICAgICAgICAgLyogQVNDSUkgdGFibGUgc2lnbmF0dXJlICovXAorCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOyAgICAgICAgICAgICAgICAgLyogTGVuZ3RoIG9mIHRhYmxlIGluIGJ5dGVzLCBpbmNsdWRpbmcgdGhpcyBoZWFkZXIgKi9cCiAJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXZpc2lvbjsgICAgICAgICAgICAgICAvKiBBQ1BJIFNwZWNpZmljYXRpb24gbWlub3IgdmVyc2lvbiAjICovXAogCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tzdW07ICAgICAgICAgICAgICAgLyogVG8gbWFrZSBzdW0gb2YgZW50aXJlIHRhYmxlID09IDAgKi9cCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1faWQgWzZdOyAgICAgICAgICAgICAvKiBPRU0gaWRlbnRpZmljYXRpb24gKi9cCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1fdGFibGVfaWQgWzhdOyAgICAgICAvKiBPRU0gdGFibGUgaWRlbnRpZmljYXRpb24gKi9cCisJY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1faWRbNl07ICAgICAgICAgICAgICAvKiBBU0NJSSBPRU0gaWRlbnRpZmljYXRpb24gKi9cCisJY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1fdGFibGVfaWRbOF07ICAgICAgICAvKiBBU0NJSSBPRU0gdGFibGUgaWRlbnRpZmljYXRpb24gKi9cCiAJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZW1fcmV2aXNpb247ICAgICAgICAgICAvKiBPRU0gcmV2aXNpb24gbnVtYmVyICovXAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNsX2NvbXBpbGVyX2lkIFs0XTsgICAgLyogQVNMIGNvbXBpbGVyIHZlbmRvciBJRCAqL1wKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzbF9jb21waWxlcl9yZXZpc2lvbjsgIC8qIEFTTCBjb21waWxlciByZXZpc2lvbiBudW1iZXIgKi8KKwljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzbF9jb21waWxlcl9pZCBbNF07ICAgIC8qIEFTQ0lJIEFTTCBjb21waWxlciB2ZW5kb3IgSUQgKi9cCisJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc2xfY29tcGlsZXJfcmV2aXNpb247CS8qIEFTTCBjb21waWxlciB2ZXJzaW9uICovCiAKLQotc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgICAgICAgLyogQUNQSSBjb21tb24gdGFibGUgaGVhZGVyICovCi17Ci0JQUNQSV9UQUJMRV9IRUFERVJfREVGCi19OwotCitzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgewkvKiBBQ1BJIGNvbW1vbiB0YWJsZSBoZWFkZXIgKi8KK0FDUElfVEFCTEVfSEVBREVSX0RFRn07CiAKIC8qCiAgKiBNQURUIHZhbHVl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EAKICNkZWZpbmUgQVBJQ19JT19TQVBJQyAgICAgICAgICAgNgogI2RlZmluZSBBUElDX0xPQ0FMX1NBUElDICAgICAgICA3CiAjZGVmaW5lIEFQSUNfWFJVUFRfU09VUkNFICAgICAgIDgKLSNkZWZpbmUgQVBJQ19SRVNFUlZFRCAgICAgICAgICAgOSAgICAgICAgICAgLyogOSBhbmQgZ3JlYXRlciBhcmUgcmVzZXJ2ZWQgKi8KKyNkZWZpbmUgQVBJQ19SRVNFUlZFRCAgICAgICAgICAgOQkvKiA5IGFuZCBncmVhdGVyIGFyZSByZXNlcnZlZCAqLwogCiAvKgogICogTUFEVCBzdWItc3RydWN0dXJlcyAoRm9sbG93IE1VTFRJUExFX0FQSUNfREVTQ1JJUFRJT05fVEFCTEUpCkBAIC0xNjMsMTAgKzE1NCw4IEBACiAJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOyBcCiAJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7CiAKLXN0cnVjdCBhcGljX2hlYWRlcgotewotCUFQSUNfSEVBREVSX0RFRgotfTsKK3N0cnVjdCBhcGljX2hlYWRlciB7CitBUElDX0hFQURFUl9ERUZ9OwogCiAvKiBWYWx1ZXMgZm9yIE1QUyBJTlRJIGZsYWdzICovCiAKQEAgLTE4MCwxMTcgKzE2OSw5MCBAQAogI2RlZmluZSBUUklHR0VSX1JFU0VSVkVEICAgICAgICAyCiAjZGVmaW5lIFRSSUdHRVJfTEVWRUwgICAgICAgICAgIDMKIAotLyogQ29tbW9uIGZsYWcgZGVmaW5pdGlvbnMgKi8KKy8qIENvbW1vbiBmbGFnIGRlZmluaXRpb25zICgxNiBiaXRzIGVhY2gpICovCiAKICNkZWZpbmUgTVBTX0lOVElfRkxBR1MgXAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9sYXJpdHkgICAgICAgIDogMjsgICAgLyogUG9sYXJpdHkgb2YgQVBJQyBJL08gaW5wdXQgc2lnbmFscyAqL1wKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWdnZXJfbW9kZSAgICA6IDI7ICAgIC8qIFRyaWdnZXIgbW9kZSBvZiBBUElDIGlucHV0IHNpZ25hbHMgKi9cCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDEgICAgICAgOiAxMjsgICAvKiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb2xhcml0eSAgICAgICAgOiAyOyAgICAvKiAwMC0wMTogUG9sYXJpdHkgb2YgQVBJQyBJL08gaW5wdXQgc2lnbmFscyAqL1wKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWdnZXJfbW9kZSAgICA6IDI7ICAgIC8qIDAyLTAzOiBUcmlnZ2VyIG1vZGUgb2YgQVBJQyBpbnB1dCBzaWduYWxzICovXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogNDsgICAgLyogMDQtMDc6IFJlc2VydmVkLCBtdXN0IGJlIHplcm8gKi9cCisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDE7CS8qIDA4LTE1OiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCiAKICNkZWZpbmUgTE9DQUxfQVBJQ19GTEFHUyBcCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9jZXNzb3JfZW5hYmxlZDogMTsgICAvKiBQcm9jZXNzb3IgaXMgdXNhYmxlIGlmIHNldCAqL1wKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMiAgICAgICA6IDMxOyAgIC8qIFJlc2VydmVkLCBtdXN0IGJlIHplcm8gKi8KKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2Nlc3Nvcl9lbmFibGVkOiAxOyAgIC8qIDAwOiAgICBQcm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iBHbG9iYWwgc3lzdGVtIGludGVycnVwdCB3aGVyZSBJTlRJCisJCQkJICogbGluZXMgc3RhcnQgKi8KIH07CiAKLXN0cnVjdCBtYWR0X2lvX2FwaWMKLXsKLQlBUElDX0hFQURFUl9ERUYKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlvX2FwaWNfaWQ7ICAgICAgICAgICAgIC8qIEkvTyBBUElDIElEICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDsgICAgICAgICAgICAgICAvKiBSZXNlcnZlZCAtIG11c3QgYmUgemVybyAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzczsgICAgICAgICAgICAgICAgLyogQVBJQyBwaHlzaWNhbCBhZGRyZXNzICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQ7ICAgICAgICAgICAgICAvKiBHbG9iYWwgc3lzdGVtIGludGVycnVwdCB3aGVyZSBJTlRJCi0JCQkgICogbGluZXMgc3RhcnQgKi8KK3N0cnVjdCBtYWR0X2ludGVycnVwdF9vdmVycmlkZSB7CisJQVBJQ19IRUFERVJfREVGIHU4IGJ1czsJLyogMCAtIElTQSAqLworCXU4IHNvdXJjZTsJCS8qIEludGVycnVwdCBzb3VyY2UgKElSUSkgKi8KKwl1MzIgaW50ZXJydXB0OwkJLyogR2xvYmFsIHN5c3RlbSBpbnRlcnJ1cHQgKi8KKyBNUFNfSU5USV9GTEFHU307CisKK3N0cnVjdCBtYWR0X25taV9zb3VyY2UgeworCUFQSUNfSEVBREVSX0RFRiBNUFNfSU5USV9GTEFHUyB1MzIgaW50ZXJydXB0OwkvKiBHbG9iYWwgc3lzdGVtIGludGVycnVwdCAqLwogfTsKIAotc3RydWN0IG1hZHRfaW50ZXJydXB0X292ZXJyaWRlCi17Ci0JQVBJQ19IRUFERVJfREVGCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXM7ICAgICAgICAgICAgICAgICAgICAvKiAwIC0gSVNBICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2U7ICAgICAgICAgICAgICAgICAvKiBJbnRlcnJ1cHQgc291cmNlIChJUlEpICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQ7ICAgICAgICAgICAgICAvKiBHbG9iYWwgc3lzdGVtIGludGVycnVwdCAqLwotCU1QU19JTlRJX0ZMQUdTCitzdHJ1Y3QgbWFkdF9sb2NhbF9hcGljX25taSB7CisJQVBJQ19IRUFERVJfREVGIHU4IHByb2Nlc3Nvcl9pZDsJLyogQUNQSSBwcm9jZXNzb3IgaWQgKi8KKwlNUFNfSU5USV9GTEFHUyB1OCBsaW50OwkvKiBMSU5UbiB0byB3aGljaCBOTUkgaXMgY29ubmVjdGVkICovCiB9OwogCi1zdHJ1Y3QgbWFkdF9ubWlfc291cmNlCi17Ci0JQVBJQ19IRUFERVJfREVGCi0JTVBTX0lOVElfRkxBR1MKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdDsgICAgICAgICAgICAgIC8qIEdsb2JhbCBzeXN0ZW0gaW50ZXJydXB0ICovCitzdHJ1Y3QgbWFkdF9hZGRyZXNzX292ZXJyaWRlIHsKKwlBUElDX0hFQURFUl9ERUYgdTE2IHJlc2VydmVkOwkvKiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCisJdTY0IGFkZHJlc3M7CQkvKiBBUElDIHBoeXNpY2FsIGFkZHJlc3MgKi8KIH07CiAKLXN0cnVjdCBtYWR0X2xvY2FsX2FwaWNfbm1pCi17Ci0JQVBJQ19IRUFERVJfREVGCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9jZXNzb3JfaWQ7ICAgICAgICAgICAvKiBBQ1BJIHByb2Nlc3NvciBpZCAqLwotCU1QU19JTlRJX0ZMQUdTCi0JdTggICAgICAgICAgICAgICAgICAgICA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ICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc29yX2lkOyAgICAgICAgICAgLyogQUNQSSBwcm9jZXNzb3IgaWQgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2FsX3NhcGljX2lkOyAgICAgICAgIC8qIFNBUElDIElEICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhbF9zYXBpY19laWQ7ICAgICAgICAvKiBTQVBJQyBFSUQgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkIFszXTsgICAgICAgICAgIC8qIFJlc2VydmVkIC0gbXVzdCBiZSB6ZXJvICovCi0JTE9DQUxfQVBJQ19GTEFHUwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc29yX3VJRDsgICAgICAgICAgLyogTnVtZXJpYyBVSUQgLSBBQ1BJIDMuMCAqLwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc29yX3VJRHN0cmluZ1sxXTsgLyogU3RyaW5nIFVJRCAgLSBBQ1BJIDMuMCAqLwotfTsKLQotc3RydWN0IG1hZHRfaW50ZXJydXB0X3NvdXJjZQotewotCUFQSUNfSEVBREVSX0RFRgotCU1QU19JTlRJX0ZMQUdTCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHRfdHlwZTsgICAgICAgICAvKiAxPVBNSSwgMj1JTklULCAzPWNvcnJlY3RlZCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc29yX2lkOyAgICAgICAgICAgLyogUHJvY2Vzc29yIElEICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9jZXNzb3JfZWlkOyAgICAgICAgICAvKiBQcm9jZXNzb3IgRUlEICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpb19zYXBpY192ZWN0b3I7ICAgICAgICAvKiBWZWN0b3IgdmFsdWUgZm9yIFBNSSBpbnRlcnJ1cHRzICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQ7ICAgICAgICAgICAgICAvKiBHbG9iYWwgc3lzdGVtIGludGVycnVwdCAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7ICAgICAgICAgICAgICAgICAgLyogSW50ZXJydXB0IFNvdXJjZSBGbGFncyAqLwotfTsKLQotCiAvKgogICogU21hcnQgQmF0dGVyeQogICovCi1zdHJ1Y3Qgc21hcnRfYmF0dGVyeV90YWJsZQotewotCUFDUElfVEFCTEVfSEVBREVSX0RFRgotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2FybmluZ19sZXZlbDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvd19sZXZlbDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyaXRpY2FsX2xldmVsOworc3RydWN0IHNtYXJ0X2JhdHRlcnlfdGFibGUgeworCUFDUElfVEFCTEVfSEVBREVSX0RFRiB1MzIgd2FybmluZ19sZXZlbDsKKwl1MzIgbG93X2xldmVsOworCXUzMiBjcml0aWNhbF9sZXZlbDsKIH07CiAKLQogI3ByYWdtYSBwYWNrKCkKIAotCiAvKgogICogQUNQSSBUYWJsZSBpbmZvcm1hdGlvbi4gIFdlIHNhdmUgdGhlIHRhYmxlIGFkZHJlc3MsIGxlbmd0aCwKICAqIGFuZCB0eXBlIG9mIG1lbW9yeSBhbGxvY2F0aW9uIChtYXBwZWQgb3IgYWxsb2NhdGVkKSBmb3IgZWFjaApAQCAtMzE0LDM5ICsyNzYsMzUgQEAKIAogLyogRGF0YSBhYm91dCBlYWNoIGtub3duIHRhYmxlIHR5cGUgKi8KIAotc3RydWN0IGFjcGlfdGFibGVfc3VwcG9ydAotewotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5hbWU7Ci0JY2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AgICAgICAgICAgICAvKiBBQ1BJIGNvbW1vbiB0YWJsZSBoZWFkZXIgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhYmxlX29mZnNldF9lbnRyeSBbMV07IC8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIG90aGVyICovCi0JCQkgLyogQUNQSSB0YWJsZXMgKi8KK3N0cnVjdCByc2R0X2Rlc2NyaXB0b3JfcmV2MSB7CisJQUNQSV9UQUJMRV9IRUFERVJfREVGCS8qIEFDUEkgY29tbW9uIHRhYmxlIGhlYWRlciAqLworCXUzMiB0YWJsZV9vZmZzZXRfZW50cnlbMV07CS8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIEFDUEkgdGFibGVzICovCiB9OwogCi0KIC8qCiAgKiBBQ1BJIDEuMCBGaXJtd2FyZSBBQ1BJIENvbnRyb2wgU3RydWN0dXJlIChGQUNTKQogICovCi1zdHJ1Y3QgZmFjc19kZXNjcmlwdG9yX3JldjEKLXsKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpZ25hdHVyZVs0XTsgICAgICAgICAgIC8qIEFDUEkgU2lnbmF0dXJlICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7ICAgICAgICAgICAgICAgICAvKiBMZW5ndGggb2Ygc3RydWN0dXJlLCBpbiBieXRlcyAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFyZHdhcmVfc2lnbmF0dXJlOyAgICAgLyogSGFyZHdhcmUgY29uZmlndXJhdGlvbiBzaWduYXR1cmUgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcm13YXJlX3dha2luZ192ZWN0b3I7IC8qIEFDUEkgT1Mgd2FraW5nIHZlY3RvciAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsX2xvY2s7ICAgICAgICAgICAgLyogR2xvYmFsIExvY2sgKi8KLQl1MzIgICA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GVzY3JpcHRpb24gVGFibGUgKEZBRFQpCiAgKi8KLXN0cnVjdCBmYWR0X2Rlc2NyaXB0b3JfcmV2MQotewotCUFDUElfVEFCTEVfSEVBREVSX0RFRiAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEFDUEkgY29tbW9uIHRhYmxlIGhlYWRlciAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlybXdhcmVfY3RybDsgICAgICAgICAgLyogUGh5c2ljYWwgYWRkcmVzcyBvZiBGQUNTICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkc2R0OyAgICAgICAgICAgICAgICAgICAvKiBQaHlzaWNhbCBhZGRyZXNzIG9mIERTRFQgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOyAgICAgICAgICAgICAgICAgIC8qIFN5c3RlbSBJbnRlcnJ1cHQgTW9kZWwgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIFJlc2VydmVkICovCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2lfaW50OyAgICAgICAgICAgICAgICAvKiBTeXN0ZW0gdmVjdG9yIG9mIFNDSSBpbnRlcnJ1cHQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNtaV9jbWQ7ICAgICAgICAgICAgICAgIC8qIFBvcnQgYWRkcmVzcyBvZiBTTUkgY29tbWFuZCBwb3J0ICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2VuYWJsZTsgICAgICAgICAgICAvKiBWYWx1ZSB0byB3cml0ZSB0byBzbWlfY21kIHRvIGVuYWJsZSBBQ1BJICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2Rpc2FibGU7ICAgICAgICAgICAvKiBWYWx1ZSB0byB3cml0ZSB0byBzbWlfY21kIHRvIGRpc2FibGUgQUNQSSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUzRiaW9zX3JlcTsgICAgICAgICAgICAgLyogVmFsdWUgdG8gd3JpdGUgdG8gU01JIENNRCB0byBlbnRlciBTNEJJT1Mgc3RhdGUgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMjsgICAgICAgICAgICAgIC8qIFJlc2VydmVkIC0gbXVzdCBiZSB6ZXJvICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbTFhX2V2dF9ibGs7ICAgICAgICAgICAvKiBQb3J0IGFkZHJlc3Mgb2YgUG93ZXIgTWd0IDFhIGFjcGlfZXZlbnQgUmVnIEJsayAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG0xYl9ldnRfYmxrOyAgICAgICAgICAgLyogUG9ydCBhZGRyZXNzIG9mIFBvd2VyIE1ndCAxYiBhY3BpX2V2ZW50IFJlZyBCbGsgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtMWFfY250X2JsazsgICAgICAgICAgIC8qIFBvcnQgYWRkcmVzcyBvZiBQb3dlciBNZ3QgMWEgQ29udHJvbCBSZWcgQmxrICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbTFiX2NudF9ibGs7ICAgICAgICAgICAvKiBQb3J0IGFkZHJlc3Mgb2YgUG93ZXIgTWd0IDFiIENvbnRyb2wgUmVnIEJsayAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG0yX2NudF9ibGs7ICAgICAgICAgICAgLyogUG9ydCBhZGRyZXNzIG9mIFBvd2VyIE1ndCAyIENvbnRyb2wgUmVnIEJsayAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG1fdG1yX2JsazsgICAgICAgICAgICAgLyogUG9ydCBhZGRyZXNzIG9mIFBvd2VyIE1ndCBUaW1lciBDdHJsIFJlZyBCbGsgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdwZTBfYmxrOyAgICAgICAgICAgICAgIC8qIFBvcnQgYWRkciBvZiBHZW5lcmFsIFB1cnBvc2UgYWNwaV9ldmVudCAwIFJlZyBCbGsgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdwZTFfYmxrOyAgICAgICAgICAgICAgIC8qIFBvcnQgYWRkciBvZiBHZW5lcmFsIFB1cnBvc2UgYWNwaV9ldmVudCAxIFJlZyBCbGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtMV9ldnRfbGVuOyAgICAgICAgICAgIC8qIEJ5dGUgbGVuZ3RoIG9mIHBvcnRzIGF0IHBtMV94X2V2dF9ibGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtMV9jbnRfbGVuOyAgICAgICAgICAgIC8qIEJ5dGUgbGVuZ3RoIG9mIHBvcnRzIGF0IHBtMV94X2NudF9ibGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtMl9jbnRfbGVuOyAgICAgICAgICAgIC8qIEJ5dGUgTGVuZ3RoIG9mIHBvcnRzIGF0IHBtMl9jbnRfYmxrICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbV90bV9sZW47ICAgICAgICAgICAgICAvKiBCeXRlIExlbmd0aCBvZiBwb3J0cyBhdCBwbV90bV9ibGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdwZTBfYmxrX2xlbjsgICAgICAgICAgIC8qIEJ5dGUgTGVuZ3RoIG9mIHBvcnRzIGF0IGdwZTBfYmxrICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncGUxX2Jsa19sZW47ICAgICAgICAgICAvKiBCeXRlIExlbmd0aCBvZiBwb3J0cyBhdCBncGUxX2JsayAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlMV9iYXNlOyAgICAgICAgICAgICAgLyogT2Zmc2V0IGluIGdwZSBtb2RlbCB3aGVyZSBncGUxIGV2ZW50cyBzdGFydCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQzOyAgICAgICAgICAgICAgLyogUmVzZXJ2ZWQgKi8KLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsdmwyX2xhdDsgICAgICAgICAgICAgIC8qIFdvcnN0IGNhc2UgSFcgbGF0ZW5jeSB0byBlbnRlci9leGl0IEMyIHN0YXRlICovCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbHZsM19sYXQ7ICAgICAgICAgICAgICAvKiBXb3JzdCBjYXNlIEhXIGxhdGVuY3kgdG8gZW50ZXIvZXhpdCBDMyBzdGF0ZSAqLwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmx1c2hfc2l6ZTsgICAgICAgICAgICAgLyogU2l6ZSBvZiBhcmVhIHJlYWQgdG8gZmx1c2ggY2FjaGVzICovCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbHVzaF9zdHJpZGU7ICAgICAgICAgICAvKiBTdHJpZGUgdXNlZCBpbiBmbHVzaGluZyBjYWNoZXMgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR1dHlfb2Zmc2V0OyAgICAgICAgICAgIC8qIEJpdCBsb2NhdGlvbiBvZiBkdXR5IGN5Y2xlIGZpZWxkIGluIHBfY250IHJlZyAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHV0eV93aWR0aDsgICAgICAgICAgICAgLyogQml0IHdpZHRoIG9mIGR1dHkgY3ljbGUgZmllbGQgaW4gcF9jbnQgcmVnICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXlfYWxybTsgICAgICAgICAgICAgICAvKiBJbmRleCB0byBkYXktb2YtbW9udGggYWxhcm0gaW4gUlRDIENNT1MgUkFNICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb25fYWxybTsgICAgICAgICAgICAgICAvKiBJbmRleCB0byBtb250aC1vZi15ZWFyIGFsYXJtIGluIFJUQyBDTU9TIFJBTSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VudHVyeTsgICAgICAgICAgICAgICAgLyogSW5kZXggdG8gY2VudHVyeSBpbiBSVEMgQ01PUyBSQU0gKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkNDsgICAgICAgICAgICAgIC8qIFJlc2VydmVkICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDRhOyAgICAgICAgICAgICAvKiBSZXNlcnZlZCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQ0YjsgICAgICAgICAgICAgLyogUmVzZXJ2ZWQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdiX2ludmQgICAgICAgICA6IDE7ICAgIC8qIFRoZSB3YmludmQgaW5zdHJ1Y3Rpb24gd29ya3MgcHJvcGVybHkgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdiX2ludmRfZmx1c2ggICA6IDE7ICAgIC8qIFRoZSB3YmludmQgZmx1c2hlcyBidXQgZG9lcyBub3QgaW52YWxpZGF0ZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY19jMSAgICAgICAgIDogMTsgICAgLyogQWxsIHByb2Nlc3NvcnMgc3VwcG9ydCBDMSBzdGF0ZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGx2bDJfdXAgICAgICAgIDogMTsgICAgLyogQzIgc3RhdGUgd29ya3Mgb24gTVAgc3lzdGVtICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwd3JfYnV0dG9uICAgICAgO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VsxXTsJLyogQXJyYXkgb2YgcG9pbnRlcnMgdG8gQUNQSSB0YWJsZXMgKi8KIH07CiAKLQogLyoKICAqIEFDUEkgMi4wIEZpcm13YXJlIEFDUEkgQ29udHJvbCBTdHJ1Y3R1cmUgKEZBQ1MpCiAgKi8KLXN0cnVjdCBmYWNzX2Rlc2NyaXB0b3JfcmV2MgotewotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmF0dXJlWzRdOyAgICAgICAgICAgLyogQUNQSSBzaWduYXR1cmUgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsgICAgICAgICAgICAgICAgIC8qIExlbmd0aCBvZiBzdHJ1Y3R1cmUsIGluIGJ5dGVzICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYXJkd2FyZV9zaWduYXR1cmU7ICAgICAvKiBIYXJkd2FyZSBjb25maWd1cmF0aW9uIHNpZ25hdHVyZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlybXdhcmVfd2FraW5nX3ZlY3RvcjsgLyogMzJiaXQgcGh5c2ljYWwgYWRkcmVzcyBvZiB0aGUgRmlybXdhcmUgV2FraW5nIFZlY3Rvci4gKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdsb2JhbF9sb2NrOyAgICAgICAgICAgIC8qIEdsb2JhbCBMb2NrIHVzZWQgdG8gc3luY2hyb25pemUgYWNjZXNzIHRvIHNoYXJlZCBoYXJkd2FyZSByZXNvdXJjZXMgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFM0Ymlvc19mICAgICAgICA6IDE7ICAgIC8qIFM0Qmlvc19mIC0gSW5kaWNhdGVzIGlmIFM0QklPUyBzdXBwb3J0IGlzIHByZXNlbnQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMSAgICAgICA6IDMxOyAgIC8qIE11c3QgYm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VzZXJ2ZWQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdiX2ludmQgICAgIDogMTsgICAgLyogVGhlIHdiaW52ZCBpbnN0cnVjdGlvbiB3b3JrcyBwcm9wZXJseSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2JfaW52ZF9mbHVzaCA6IDE7ICAvKiBUaGUgd2JpbnZkIGZsdXNoZXMgYnV0IGRvZXMgbm90IGludmFsaWRhdGUgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2NfYzEgICAgIDogMTsgICAgLyogQWxsIHByb2Nlc3NvcnMgc3VwcG9ydCBDMSBzdGF0ZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGx2bDJfdXAgICAgOiAxOyAgICAvKiBDMiBzdGF0ZSB3b3JrcyBvbiBNUCBzeXN0ZW0gKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB3cl9idXR0b24gIDogMTsgICAgLyogUG93ZXIgYnV0dG9uIGlzIGhhbmRsZWQgYXMgYSBnZW5lcmljIGZlYXR1cmUgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsZWVwX2J1dHRvbiA6IDE7ICAgLyogU2xlZXAgYnV0dG9uIGlzIGhhbmRsZWQgYXMgYSBnZW5lcmljIGZlYXR1cmUsIG9yIG5vdCBwcmVzZW50ICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXhlZF9yVEMgICA6IDE7ICAgIC8qIFJUQyB3YWtldXAgc3RhdCBub3QgaW4gZml4ZWQgcmVnaXN0ZXIgc3BhY2UgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ0Y3M0ICAgICAgIDogMTsgICAgLyogUlRDIHdha2V1cCBzdGF0IG5vdCBwb3NzaWJsZSBmcm9tIFM0ICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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RhYmxlIGhlYWRlciAqLworCUZBRFRfUkVWMl9DT01NT04gdTggcmVzZXJ2ZWQyOwkvKiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCiAKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBjaV9leHBfd2FrICAgICAgICAgICAgICAgICAgICAgICAgIDogMTsgLyogU3lzdGVtIHN1cHBvcnRzIFBDSUVYUF9XQUtFIChTVFMvRU4pIGJpdHMgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZV9wbGF0Zm9ybV9jbG9jayAgICAgICAgICAgICAgICAgIDogMTsgLyogT1NQTSBzaG91bGQgdXNlIHBsYXRmb3JtLXByb3ZpZGVkIHRpbWVyICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTNHJ0Y19zdHNfdmFsaWQgICAgICAgICAgICAgICAgICAgICA6IDE7IC8qIENvbnRlbnRzIG9mIFJUQ19TVFMgdmFsaWQgYWZ0ZXIgUzQgd2FrZSAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3RlX3Bvd2VyX29uX2NhcGFibGUgICAgICAgICAgICAgOiAxOyAvKiBTeXN0ZW0gaXMgY29tcGF0aWJsZSB3aXRoIHJlbW90ZSBwb3dlciBvbiAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yY2VfYXBpY19jbHVzdGVyX21vZGVsICAgICAgICAgICAgOiAxOyAvKiBBbGwgbG9jYWwgQVBJQ3MgbXVzdCB1c2UgY2x1c3RlciBtb2RlbCAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yY2VfYXBpY19waHlzaWNhbF9kZXN0aW5hdGlvbl9tb2RlIDogMTsgLyogYWxsIGxvY2FsIHhfYVBJQ3MgbXVzdCB1c2UgcGh5c2ljYWwgZGVzdCBtb2RlICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZl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9VSUQgbWV0aG9kICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncGVfYml0OyAgICAgICAgICAgIC8qIFRoZSBHUEUgZm9yIHRoZSBFQyAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNfaWRbMV07ICAgICAgICAgICAvKiBGdWxsIG5hbWVwYXRoIG9mIHRoZSBFQyBpbiB0aGUgQUNQSSBuYW1lc3BhY2UgKi8KK3N0cnVjdCBlY19ib290X3Jlc291cmNlcyB7CisJQUNQSV9UQUJMRV9IRUFERVJfREVGIHN0cnVjdCBhY3BpX2dlbmVyaWNfYWRkcmVzcyBlY19jb250cm9sOwkvKiBBZGRyZXNzIG9mIEVDIGNvbW1hbmQvc3RhdHVzIHJlZ2lzdGVyICovCisJc3RydWN0IGFjcGlfZ2VuZXJpY19hZGRyZXNzIGVjX2RhdGE7CS8qIEFkZHJlc3Mgb2YgRUMgZGF0YSByZWdpc3RlciAqLworCXUzMiB1aWQ7CQkvKiBVbmlxdWUgSUQgLSBtdXN0IGJlIHNhbWUgYXMgdGhlIEVDIF9VSUQgbWV0aG9kICovCisJdTggZ3BlX2JpdDsJCS8qIFRoZSBHUEUgZm9yIHRoZSBFQyAqLworCXU4IGVjX2lkWzFdOwkJLyogRnVsbCBuYW1lcGF0aCBvZiB0aGUgRUMgaW4gdGhlIEFDUEkgbmFtZXNwYWNlICovCiB9OwogCi0KIC8qIFNSQVQgLSBTeXN0ZW0gUmVzb3VyY2UgQWZmaW5pdHkgVGFibGUgKi8KIAotc3RydWN0IHN0YXRpY19yZXNvdXJjZV9hbGxvYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3hpbWl0eV9kb21haW5fbG87Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcGljX2lkOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZCAgICAgICAgIDoxOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQzICAgICAgIDozMTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2FsX3NhcGljX2VpZDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3hpbWl0eV9kb21haW5faGlbM107Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDQ7CitzdHJ1Y3Qgc3RhdGljX3Jlc291cmNlX2FsbG9jIHsKKwl1OCB0eXBlOworCXU4IGxlbmd0aDsKKwl1OCBwcm94aW1pdHlfZG9tYWluX2xvOworCXU4IGFwaWNfaWQ7CisKKwkvKiBGbGFncyAoMzIgYml0cykgKi8KKworCXU4IGVuYWJsZWQ6MTsJCS8qIDAwOiAgICBVc2UgYWZmaW5pdHkgc3RydWN0dXJlICovCisJIHU4Ojc7CQkJLyogMDEtMDc6IFJlc2VydmVkLCBtdXN0IGJlIHplcm8gKi8KKwl1OCByZXNlcnZlZDNbM107CS8qIDA4LTMxOiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCisKKwl1OCBsb2NhbF9zYXBpY19laWQ7CisJdTggcHJveGltaXR5X2RvbWFpbl9oaVszXTsKKwl1MzIgcmVzZXJ2ZWQ0OwkJLyogUmVzZXJ2ZWQsIG11c3QgYmUgemVybyAqLwogfTsKIAotc3RydWN0IG1lbW9yeV9hZmZpbml0eQotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3hpbWl0eV9kb21haW47Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDM7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlX2FkZHJlc3M7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX2xlbmd0aDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkNDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZWQgICAgICAgICA6MTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvdF9wbHVnZ2FibGUgICA6MTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vbl92b2xhdGlsZSAgICA6MTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkNSAgICAgICA6Mjk7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDY7CitzdHJ1Y3QgbWVtb3J5X2FmZmluaXR5IHsKKwl1OCB0eXBlOworCXU4IGxlbmd0aDsKKwl1MzIgcHJveGltaXR5X2RvbWFpbjsKKwl1MTYgcmVzZXJ2ZWQzOworCXU2NCBiYXNlX2FkZHJlc3M7CisJdTY0IGFkZHJlc3NfbGVuZ3RoOworCXUzMiByZXNlcnZlZDQ7CisKKwkvKiBGbGFncyAoMzIgYml0cykgKi8KKworCXU4IGVuYWJsZWQ6MTsJCS8qIDAwOiAgICBVc2UgYWZmaW5pdHkgc3RydWN0dXJlICovCisJdTggaG90X3BsdWdnYWJsZToxOwkvKiAwMTogICAgTWVtb3J5IHJlZ2lvbiBpcyBob3QgcGx1Z2dhYmxlICovCisJdTggbm9uX3ZvbGF0aWxlOjE7CS8qIDAyOiAgICBNZW1vcnkgaXMgbm9uLXZvbGF0aWxlICovCisJIHU4OjU7CQkJLyogMDMtMDc6IFJlc2VydmVkLCBtdXN0IGJlIHplcm8gKi8KKwl1OCByZXNlcnZlZDVbM107CS8qIDA4LTMxOiBSZXNlcnZlZCwgbXVzdCBiZSB6ZXJvICovCis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EuMCwgMiBmb3IgMi4wICovCi0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByc2R0X3BoeXNpY2FsX2FkZHJlc3M7ICAvKiA2NC1iaXQgcGh5c2ljYWwgYWRkcmVzcyBvZiBSU0RUICovCitzdHJ1Y3QgewkJCS8qIFJvb3QgU3lzdGVtIERlc2NyaXB0b3IgUG9pbnRlciAqLworCU5BVElWRV9DSEFSIHNpZ25hdHVyZVs4XTsJLyogY29udGFpbnMgIlJTRCBQVFIgIiAqLworCXU4IGNoZWNrc3VtOwkJLyogdG8gbWFrZSBzdW0gb2Ygc3RydWN0ID09IDAgKi8KKwlOQVRJVkVfQ0hBUiBvZW1faWRbNl07CS8qIE9FTSBpZGVudGlmaWNhdGlvbiAqLworCXU4IHJlc2VydmVkOwkJLyogTXVzdCBiZSAwIGZvciAxLjAsIDIgZm9yIDIuMCAqLworCXU2NCByc2R0X3BoeXNpY2FsX2FkZHJlc3M7CS8qIDY0LWJpdCBwaHlzaWNhbCBhZGRyZXNzIG9mIFJTRFQgKi8KIH07CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogSUE2NCBFeHRlbnNpb25zIHRvIEFDUEkgU3BlYyBSZXYgMC43MSAqLwogLyogZm9yIHRoZSBSb290IFN5c3RlbSBEZXNjcmlwdGlvbiBUYWJsZSAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0Ci17Ci0Jc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICAgIGhlYWRlcjsgICAgICAgICAgICAgICAgIC8qIFRhYmxlIGhlYWRlciAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZF9wYWQ7ICAgICAgICAgICAvKiBJQTY0IGFsaWdubWVudCwgbXVzdCBiZSAwICovCi0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgIHRhYmxlX29mZnNldF9lbnRyeSBbMV07IC8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIG90aGVyICovCi0JCQkgICAvKiB0YWJsZXMnIGhlYWRlcnMgKi8KK3N0cnVjdCB7CisJc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyIGhlYWRlcjsJLyogVGFibGUgaGVhZGVyICovCisJdTMyIHJlc2VydmVkX3BhZDsJLyogSUE2NCBhbGlnbm1lbnQsIG11c3QgYmUgMCAqLworCXU2NCB0YWJsZV9vZmZzZXRfZW50cnlbMV07CS8qIEFycmF5IG9mIHBvaW50ZXJzIHRvIG90aGVyICovCisJLyogdGFibGVzJyBoZWFkZXJzICovCiB9OwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogSUE2NCBFeHRlbnNpb25zIHRvIEFDUEkgU3BlYyBSZXYgMC43MSAgICovCiAvKiBmb3IgdGhlIEZpcm13YXJlIEFDUEkgQ29udHJvbCBTdHJ1Y3R1cmUgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0Ci17Ci0JTkFUSVZFX0NIQVIgICAgICAgICBzaWduYXR1cmVbNF07ICAgICAgICAgLyogc2lnbmF0dXJlICJGQUNTIiAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7ICAgICAgICAgICAgICAgLyogbGVuZ3RoIG9mIHN0cnVjdHVyZSwgaW4gYnl0ZXMgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgaGFyZHdhcmVfc2lnbmF0dXJlOyAgIC8qIGhhcmR3YXJlIGNvbmZpZ3VyYXRpb24gc2lnbmF0dXJlICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkNDsgICAgICAgICAgICAvKiBtdXN0IGJlIDAgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgZmlybXdhcmVfd2FraW5nX3ZlY3RvcjsgLyogQUNQSSBPUyB3YWtpbmcgdmVjd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IElBNjQgRXh0ZW5zaW9ucyB0byBBQ1BJIFNwZWMgUmV2IDAuNzEgICovCiAvKiBmb3IgdGhlIEZpeGVkIEFDUEkgRGVzY3JpcHRpb24gVGFibGUgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdAotewotCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciAgICBoZWFkZXI7ICAgICAgICAgICAgIC8qIHRhYmxlIGhlYWRlciAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZF9wYWQ7ICAgICAgIC8qIElBNjQgYWxpZ25tZW50LCBtdXN0IGJlIDAgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgZmlybXdhcmVfY3RybDsgICAgICAvKiA2NC1iaXQgUGh5c2ljYWwgYWRkcmVzcyBvZiBGQUNTICovCi0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgIGRzZHQ7ICAgICAgICAgICAgICAgLyogNjQtYml0IFBoeXNpY2FsIGFkZHJlc3Mgb2YgRFNEVCAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDsgICAgICAgICAgICAgIC8qIFN5c3RlbSBJbnRlcnJ1cHQgTW9kZWwgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19zcGFjZTsgICAgICAvKiBBZGRyZXNzIFNwYWNlIEJpdG1hc2sgKi8KLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgc2NpX2ludDsgICAgICAgICAgICAvKiBTeXN0ZW0gdmVjdG9yIG9mIFNDSSBpbnRlcnJ1cHQgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9lbmFibGU7ICAgICAgICAvKiB2YWx1ZSB0byB3cml0ZSB0byBzbWlfY21kIHRvIGVuYWJsZSBBQ1BJICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfZGlzYWJsZTsgICAgICAgLyogdmFsdWUgdG8gd3JpdGUgdG8gc21pX2NtZCB0byBkaXNhYmxlIEFDUEkgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgUzRiaW9zX3JlcTsgICAgICAgICAvKiBWYWx1ZSB0byB3cml0ZSB0byBTTUkgQ01EIHRvIGVudGVyIFM0QklPUyBzdGF0ZSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDI7ICAgICAgICAgIC8qIHJlc2VydmVkIC0gbXVzdCBiZSB6ZXJvICovCi0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgIHNtaV9jbWQ7ICAgICAgICAgICAgLyogUG9ydCBhZGRyZXNzIG9mIFNNSSBjb21tYW5kIHBvcnQgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgcG0xYV9ldnRfYmxrOyAgICAgICAvKiBQb3J0IGFkZHJlc3Mgb2YgUG93ZXIgTWd0IDFhIGFjcGlfZXZlbnQgUmVnIEJsayAqLwotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICBwbTFiX2V2dF9ibGs7ICAgICAgIC8qIFBvcnQgYWRkcmVzcyBvZiBQb3dlciBNZ3QgMWIgYWNwaV9ldmVudCBSZWcgQmxrICovCi0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgIHBtMWFfY250X2JsazsgICAgICAgLyogUG9ydCBhZGRyZXNzIG9mIFBvd2VyIE1ndCAxYSBDb250cm9sIFJlZyBCbGsgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgcG0xYl9jbnRfYmxrOyAgICAgICAvKiBQb3J0IGFkZHJlc3Mgb2YgUG93ZXIgTWd0IDFiIENvbnRyb2wgUmVnIEJsayAqLwotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICBwbTJfY250X2JsazsgICAgICAgIC8qIFBvcnQgYWRkcmVzcyBvZiBQb3dlciBNZ3QgMiBDb250cm9sIFJlZyBCbGsgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgcG1fdG1yX2JsazsgICAgICAgICAvKiBQb3J0IGFkZHJlc3Mgb2YgUG93ZXIgTWd0IFRpbWVyIEN0cmwgUmVnIEJsayAqLwotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICBncGUwX2JsazsgICAgICAgICAgIC8qIFBvcnQgYWRkciBvZiBHZW5lcmFsIFB1cnBvc2UgYWNwaV9ldmVudCAwIFJlZyBCbGsgKi8KLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlMV9ibGs7ICAgICAgICAgICAvKiBQb3J0IGFkZHIgb2YgR2VuZXJhbCBQdXJwb3NlIGFjcGlfZXZlbnQgMSBSZWcgQmxrICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIHBtMV9ldnRfbGVuOyAgICAgICAgLyogQnl0ZSBsZW5ndGggb2YgcG9ydHMgYXQgcG0xX3hfZXZ0X2JsayAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICBwbTFfY250X2xlbjsgICAgICAgIC8qIEJ5dGUgbGVuZ3RoIG9mIHBvcnRzIGF0IHBtMV94X2NudF9ibGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgcG0yX2NudF9sZW47ICAgICAgICAvKiBCeXRlIExlbmd0aCBvZiBwb3J0cyBhdCBwbTJfY250X2JsayAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICBwbV90bV9sZW47ICAgICAgICAgIC8qIEJ5dGUgTGVuZ3RoIG9mIHBvcnRzIGF0IHBtX3RtX2JsayAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICBncGUwX2Jsa19sZW47ICAgICAgIC8qIEJ5dGUgTGVuZ3RoIG9mIHBvcnRzIGF0IGdwZTBfYmxrICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIGdwZTFfYmxrX2xlbjsgICAgICAgLyogQnl0ZSBMZW5ndGggb2YgcG9ydHMgYXQgZ3BlMV9ibGsgKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgZ3BlMV9iYXNlOyAgICAgICAgICAvKiBvZmZzZXQgaW4gZ3BlIG1vZGVsIHdoZXJlIGdwZTEgZXZlbnRzIHN0YXJ0ICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMzsgICAgICAgICAgLyogcmVzZXJ2ZWQgKi8KLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgcGx2bDJfbGF0OyAgICAgICAgICAvKiB3b3JzdCBjYXNlIEhXIGxhdGVuY3kgdG8gZW50ZXIvZXhpdCBDMiBzdGF0ZSAqLwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICBwbHZsM19sYXQ7ICAgICAgICAgIC8qIHdvcnN0IGNhc2UgSFcgbGF0ZW5jeSB0byBlbnRlci9leGl0IEMzIHN0YXRlICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIGRheV9hbHJtOyAgICAgICAgICAgLyogaW5kZXggdG8gZGF5LW9mLW1vbnRoIGFsYXJtIGluIFJUQyBDTU9TIFJBTSAqLwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICBtb25fYWxybTsgICAgICAgICAgIC8qIGluZGV4IHRvIG1vbnRoLW9mLXllYXIgYWxhcm0gaW4gUlRDIENNT1MgUkFNICovCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgIGNlbnR1cnk7ICAgICAgICAgICAgLyogaW5kZXggdG8gY2VudHVyeSBpbiBSVEMgQ01PUyBSQU0gKi8KLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQ0OyAgICAgICAgICAvKiByZXNlcnZlZCAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICBmbHVzaF9jYXNoICA6IDE7ICAgIC8qIFBBTF9GTFVTSF9DQUNIRSBpcyBjb3JyZWN0bHkgc3VwcG9ydGVkICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkNSAgIDogMTsgICAgLyogcmVzZXJ2ZWQgLSBtdXN0IGJlIHplcm8gKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY19jMSAgICAgOiAxOyAgICAvKiBhbGwgcHJvY2Vzc29ycyBzdXBwb3J0IEMxIHN0YXRlICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHBsdmwyX3VwICAgIDogMTsgICAgLyogQzIgc3RhdGUgd29ya3Mgb24gTVAgc3lzdGVtICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHB3cl9idXR0b24gIDogMTsgICAgLyogUG93ZXIgYnV0dG9uIGlzIGhhbmRsZWQgYXMgYSBnZW5lcmljIGZlYXR1cmUgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgc2xlZXBfYnV0dG9uIDogMTsgICAvKiBTbGVlcCBidXR0b24gaXMgaGFuZGxlZCBhcyBhIGdlbmVyaWMgZmVhdHVyZSwgb3Igbm90IHByZXNlbnQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgZml4ZWRfclRDICAgOiAxOyAgICAvKiBSVEMgd2FrZXVwIHN0YXQgbm90IGluIGZpeGVkIHJlZ2lzdGVyIHNwYWNlICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHJ0Y3M0ICAgICAgIDogMTsgICAgLyogUlRDIHdha2V1cCBzdGF0IG5vdCBwb3NzaWJsZSBmcm9tIFM0ICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHRtcl92YWxfZXh0IDogMTsgICAgLyogdG1yX3ZhbCBpcyAzMiBiaXRzICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgIGRvY2tfY2FwICAgIDogMTsgICAgLyogU3VwcG9ydHMgRG9ja2luZyAqLwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDYgICA6IDIyOyAgICAvKiByZXNlcnZlZCAtIG11c3QgYmUgemVybyAqLworc3RydWN0IHsKKwlzdHJ1Y3QgYWNwaV90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WZpbmUgQUNQSV9VSU5UOF9NQVggICAgICAgICAgICAgICAgICAoVUlOVDgpICh+KChVSU5UOCkgIDApKSAvKiAweEZGICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQUNQSV9VSU5UMTZfTUFYICAgICAgICAgICAgICAgICAoVUlOVDE2KSh+KChVSU5UMTYpIDApKSAvKiAweEZGRkYgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQUNQSV9VSU5UMzJfTUFYICAgICAgICAgICAgICAgICAoVUlOVDMyKSh+KChVSU5UMzIpIDApKSAvKiAweEZGRkZGRkZGICAgICAgICAgKi8KLSNkZWZpbmUgQUNQSV9VSU5UNjRfTUFYICAgICAgICAgICAgICAgICAoVUlOVDY0KSh+KChVSU5UNjQpIDApKSAvKiAweEZGRkZGRkZGRkZGRkZGRkYgKi8KKyNkZWZpbmUgQUNQSV9VSU5UOF9NQVggICAgICAgICAgICAgICAgICAoVUlOVDgpICh+KChVSU5UOCkgIDApKQkvKiAweEZGICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNQSV9VSU5UMTZfTUFYICAgICAgICAgICAgICAgICAoVUlOVDE2KSh+KChVSU5UMTYpIDApKQkvKiAweEZGRkYgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNQSV9VSU5UMzJfTUFYICAgICAgICAgICAgICAgICAoVUlOVDMyKSh+KChVSU5UMzIpIDApKQkvKiAweEZGRkZGRkZGICAgICAgICAgKi8KKyNkZWZpbmUgQUNQSV9VSU5UNjRfTUFYICAgICAgICAgICAgICAgICAoVUlOVDY0KSh+KChVSU5UNjQpIDApKQkvKiAweEZGRkZGRkZGRkZGRkZGRkYgKi8KICNkZWZpbmUgQUNQSV9BU0NJSV9NQVggICAgICAgICAgICAgICAgICAweDdGCiAKLQogI2lmZGVmIERFRklORV9BTFRFUk5BVEVfVFlQRVMKIC8qCiAgKiBUeXBlcyB1c2VkIG9ubHkgaW4gdHJhbnNsYXRlZCBzb3VyY2UsIGRlZmluZWQgaGV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RFTlRfSU5UNjQgICAgICAgIElOVDY0OwotdHlwZWRlZiBDT01QSUxFUl9ERVBFTkRFTlRfVUlOVDY0ICAgICAgIFVJTlQ2NDsKK3R5cGVkZWYgdW5zaWduZWQgY2hhciBVSU5UODsKK3R5cGVkZWYgdW5zaWduZWQgY2hhciBCT09MRUFOOwordHlwZWRlZiB1bnNpZ25lZCBzaG9ydCBVSU5UMTY7Cit0eXBlZGVmIGludCBJTlQzMjsKK3R5cGVkZWYgdW5zaWduZWQgaW50IFVJTlQzMjsKK3R5cGVkZWYgQ09NUElMRVJfREVQRU5ERU5UX0lOVDY0IElOVDY0OwordHlwZWRlZiBDT01QSUxFUl9ERVBFTkRFTlRfVUlOVDY0IFVJTlQ2NDsKIAogLyohIFtFbmRdIG5vIHNvdXJjZSBjb2RlIHRyYW5zbGF0aW9uICEqLwogCi10eXBlZGVmIHM2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX25hdGl2ZV9pbnQ7Ci10eXBlZGVmIHU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX25hdGl2ZV91aW50OwordHlwZWRlZiBzNjQgYWNwaV9uYXRpdmVfaW50OwordHlwZWRlZiB1NjQgYWNwaV9uYXRpdmVfdWludDsKIAotdHlwZWRlZiB1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV90YWJsZV9wdHI7Ci10eXBlZGVmIHU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX2lvX2FkZHJlc3M7Ci10eXBlZGVmIHU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX3BoeXNpY2FsX2FkZHJlc3M7Ci10eXBlZGVmIHU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX3NpemU7Cit0eXBlZGVmIHU2NCBhY3BpX3RhYmxlX3B0cjsKK3R5cGVkZWYgdTY0IGFj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W50ICAgICAgICAgICAgICAgICAgICBVSU5UMTY7Ci10eXBlZGVmIGxvbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5UMzI7Ci10eXBlZGVmIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5UMTY7Ci10eXBlZGVmIHVuc2lnbmVkIGxvbmcgICAgICAgICAgICAgICAgICAgVUlOVDMyOwordHlwZWRlZiB1bnNpZ25lZCBjaGFyIFVJTlQ4OwordHlwZWRlZiB1bnNpZ25lZCBjaGFyIEJPT0xFQU47Cit0eXBlZGVmIHVuc2lnbmVkIGludCBVSU5UMTY7Cit0eXBlZGVmIGxvbmcgSU5UMzI7Cit0eXBlZGVmIGludCBJTlQxNjsKK3R5cGVkZWYgdW5zaWduZWQgbG9uZyBVSU5UMzI7CiAKLXN0cnVjdAotewotCVVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMbzsKLQlVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSGk7CitzdHJ1Y3QgeworCVVJTlQzMiBMbzsKKwlVSU5UMzIgSGk7CiB9OwogCiAvKiEgW0VuZF0gbm8gc291cmNlIGNvZGUgdHJhbnNsYXRpb24gISovCiAKLXR5cGVkZWYgdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfbmF0aXZlX3VpbnQ7Ci10eXBlZGVmIHMxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX25hdGl2ZV9pbnQ7Cit0eXBlZGVmIHUxNiBhY3BpX25hdGl2ZV91aW50OwordHlwZWRlZiBzMTYgYWNwaV9uYXRpdmVfaW50OwogCi10eXBlZGVmIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX3RhYmxlX3B0cjsKLXR5cGVkZWYgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfaW9fYWRkcmVzczsKLXR5cGVk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VQ7Ci10eXBlZGVmIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVSU5UMzJfQklUOwotdHlwZWRlZiBhY3BpX25hdGl2ZV91aW50ICAgICAgICAgICAgICAgICAgICAgICAgQUNQSV9QVFJESUZGOwordHlwZWRlZiB1OCBVSU5UOF9CSVQ7Cit0eXBlZGVmIGFjcGlfbmF0aXZlX3VpbnQgQUNQSV9QVFJESUZGOwogCiAvKgogICogUG9pbnRlciBvdmVybGF5cyB0byBhdm9pZCBsb3RzIG9mIHR5cGVjYXN0aW5nIGZvcgogICogY29kZSB0aGF0IGFjY2VwdHMgYm90aCBwaHlzaWNhbCBhbmQgbG9naWNhbCBwb2ludGVycy4KICAqLwotdW5pb24gYWNwaV9wb2ludGVycwotewotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgICAgIHBoeXNpY2FsOwotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpsb2dpY2FsOwotCWFjcGlfdGFibGVfcHRyICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOwordW5pb24gYWNwaV9wb2ludGVycyB7CisJYWNwaV9waHlzaWNhbF9hZGRyZXNzIHBoeXNpY2FsOworCXZvaWQgKmxvZ2ljYWw7CisJYWNwaV90YWJsZV9wdHIgdmFsdWU7CiB9OwogCi1zdHJ1Y3QgYWNwaV9wb2ludGVyCi17Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlcl90eXBlOwotCXVuaW9uIGFjcGlfcG9pbnRlcnMgICAgICAgICAgICAgICAgIHBvaW50ZXI7CitzdHJ1Y3QgYWNwaV9wb2ludGVyIHsKKwl1MzIgcG9pbnRlcl90eXBlOworCXVuaW9uIGFjcGlfcG9pbnRlcnMgcG9pbnRlcjsKIH07CiAKIC8qIHBvaW50ZXJfdHlwZXMgZm9yIGFib3ZlICovCkBAIC0yNDMsNiArMjM0LDE0IEBACiAjZGVmaW5lIEFDUEl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gICAgICAgICAgYWNwaV9zdHJpbmc7ICAgIC8qIE51bGwgdGVybWluYXRlZCBBU0NJSSBzdHJpbmcgKi8KLXR5cGVkZWYgdm9pZCAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcGlfaGFuZGxlOyAgICAvKiBBY3R1YWxseSBhIHB0ciB0byBhbiBOb2RlICovCit0eXBlZGVmIHUzMiBhY3BpX3N0YXR1czsJLyogQWxsIEFDUEkgRXhjZXB0aW9ucyAqLwordHlwZWRlZiB1MzIgYWNwaV9uYW1lOwkJLyogNC1ieXRlIEFDUEkgbmFtZSAqLwordHlwZWRlZiBjaGFyICphY3BpX3N0cmluZzsJLyogTnVsbCB0ZXJtaW5hdGVkIEFTQ0lJIHN0cmluZyAqLwordHlwZWRlZiB2b2lkICphY3BpX2hhbmRsZTsJLyogQWN0dWFsbHkgYSBwdHIgdG8gYW4gTm9kZSAqLwogCi1zdHJ1Y3QgdWludDY0X3N0cnVjdAotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpOworc3RydWN0IHVpbnQ2NF9zdHJ1Y3QgeworCXUzMiBsbzsKKwl1MzIgaGk7CiB9OwogCi11bmlvbiB1aW50NjRfb3ZlcmxheQotewotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bGw7Ci0Jc3RydWN0IHVpbnQ2NF9zdHJ1Y3QgICAgICAgICAgICAgICAgcGFydDsKK3VuaW9uIHVpbnQ2NF9vdmVybGF5IHsKKwl1NjQgZnVsbDsKKwlzdHJ1Y3QgdWludDY0X3N0cnVjdCBwYXJ0OwogfTsKIAotc3RydWN0IHVpbnQzMl9zdHJ1Y3QKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsbzsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaTsKK3N0cnVjdCB1aW50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GVmIHUzMiBhY3BpX3RhYmxlX3R5cGU7CiAKICNkZWZpbmUgQUNQSV9UQUJMRV9SU0RQICAgICAgICAgICAgICAgICAoYWNwaV90YWJsZV90eXBlKSAwCiAjZGVmaW5lIEFDUElfVEFCTEVfRFNEVCAgICAgICAgICAgICAgICAgKGFjcGlfdGFibGVfdHlwZSkgMQpAQCAtNDIxLDIyICs0MTIsMjIgQEAKICAqIE5PVEU6IFR5cGVzIG11c3QgYmUga2VwdCBpbiBzeW5jIHdpdGggdGhlIGdsb2JhbCBhY3BpX25zX3Byb3BlcnRpZXMKICAqIGFuZCBhY3BpX25zX3R5cGVfbmFtZXMgYXJyYXlzLgogICovCi10eXBlZGVmIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3BpX29iamVjdF90eXBlOwordHlwZWRlZiB1MzIgYWNwaV9vYmplY3RfdHlwZTsKIAogI2RlZmluZSBBQ1BJX1RZUEVfQU5ZICAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgQUNQSV9UWVBFX0lOVEVHRVIgICAgICAgICAgICAgICAweDAxICAvKiBCeXRlL1dvcmQvRHdvcmQvWmVyby9PbmUvT25lcyAqLworI2RlZmluZSBBQ1BJX1RZUEVfSU5URUdFUiAgICAgICAgICAgICAgIDB4MDEJLyogQnl0ZS9Xb3JkL0R3b3JkL1plcm8vT25lL09uZXMgKi8KICNkZWZpbmUgQUNQSV9UWVBFX1NUUklORyAgICAgICAgICAgICAgICAweDAyCiAjZGVmaW5lIEFDUElfVFlQRV9CVUZGRVIgICAgICAgICAgICAgICAgMHgwMwotI2RlZmluZSBBQ1BJX1RZUEVfUEFDS0FHRSAgICAgICAgICAgICAgIDB4MDQgIC8qIGJ5dGVfY29uc3QsIG11bHRpcGxlIGRhdGFfdGVybS9Db25zdGFudC9zdXBlcl9uYW1lICovCisjZGVmaW5lIEFDUElfVFlQRV9QQUNLQUdFICAgICAgICAgICAgICAgMHgwNAkvKiBieXRlX2Nvb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bmNlICovCisJc3RydWN0IHsKKwkJYWNwaV9vYmplY3RfdHlwZSB0eXBlOworCQl1MzIgZmlsbDE7CisJCWFjcGlfaGFuZGxlIGhhbmRsZTsJLyogb2JqZWN0IHJlZmVyZW5jZSAqLwogCX0gcmVmZXJlbmNlOwogCi0Jc3RydWN0Ci0JewotCQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgICAgICB0eXBlOwotCQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudDsgICAgICAvKiAjIG9mIGVsZW1lbnRzIGluIHBhY2thZ2UgKi8KLQkJdW5pb24gYWNwaV9vYmplY3QgICAgICAgICAgICAgICAgICAgKmVsZW1lbnRzOyAgLyogUG9pbnRlciB0byBhbiBhcnJheSBvZiBBQ1BJX09CSkVDVHMgKi8KKwlzdHJ1Y3QgeworCQlhY3BpX29iamVjdF90eXBlIHR5cGU7CisJCXUzMiBjb3VudDsJLyogIyBvZiBlbGVtZW50cyBpbiBwYWNrYWdlICovCisJCXVuaW9uIGFjcGlfb2JqZWN0ICplbGVtZW50czsJLyogUG9pbnRlciB0byBhbiBhcnJheSBvZiBBQ1BJX09CSkVDVHMgKi8KIAl9IHBhY2thZ2U7CiAKLQlzdHJ1Y3QKLQl7Ci0JCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgICAgIHR5cGU7Ci0JCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2NfaWQ7Ci0JCWFjcGlfaW9fYWRkcmVzcyAgICAgICAgICAgICAgICAgICAgIHBibGtfYWRkcmVzczsKLQkJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJsa19sZW5ndGg7CisJc3RydWN0IHsKKwkJYWNwaV9vYmplY3RfdHlwZSB0eXBlOworCQl1MzIgcHJvY19pZDsKKwkJYWNwaV9pb19hZGRyZXNzIHBibGtfYWRkcmVzczsKKwkJdTMyIHBibGtfbGVuZ3RoOwogCX0gcHJvY2Vzc29yOwogCi0Jc3RydWN0Ci0JewotCQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgICAgICB0eXBlOwotCQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzeXN0ZW1fbGV2ZWw7Ci0JCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX29yZGVyOworCXN0cnVjdCB7CisJCWFjcGlfb2JqZWN0X3R5cGUgdHlwZTsKKwkJdTMyIHN5c3RlbV9sZXZlbDsKKwkJdTMyIHJlc291cmNlX29yZGVyOwogCX0gcG93ZXJfcmVzb3VyY2U7CiB9OwogCi0KIC8qCiAgKiBMaXN0IG9mIG9iamVjdHMsIHVzZWQgYXMgYSBwYXJhbWV0ZXIgbGlzdCBmb3IgY29udHJvbCBtZXRob2QgZXZhbHVhdGlvbgogICovCi1zdHJ1Y3QgYWNwaV9vYmplY3RfbGlzdAotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50OwotCXVuaW9uIGFjcGlfb2JqZWN0ICAgICAgICAgICAgICAgICAgICpwb2ludGVyOworc3RydWN0IGFjcGlfb2JqZWN0X2xpc3QgeworCXUzMiBjb3VudDsKKwl1bmlvbiBhY3BpX29iamVjdCAqcG9pbnRlcjsKIH07CiAKLQogLyoKICAqIE1pc2NlbGxhbmVvdXMgY29tbW9uIERhdGEgU3RydWN0dXJlcyB1c2VkIGJ5IHRoZSBpbnRlcmZhY2VzCiAgKi8KQEAgLTc0OSwxMyArNzI0LDExIEBACiAjZGVmaW5lIEFDUElfQUxMT0NBVEVfQlVGRkVSICAgICAgICAoYWNwaV9zaXplKSAoLTEpCiAjZGVmaW5lIEFDUElfQUxMT0NBVEVfTE9DQUxfQlVGRkVSICAoYWNwaV9zaXplKSAoLTIpCiAKLXN0cnVjdCBhY3BpX2J1ZmZlcgotewotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsgICA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hY3BpX3N5c3RlbV9pbmZvCi17Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9jYV92ZXJzaW9uOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyX3Jlc29sdXRpb247Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQxOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMjsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19sZXZlbDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19sYXllcjsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fdGFibGVfdHlwZXM7Ci0Jc3RydWN0IGFjcGlfdGFibGVfaW5mbyAgICAgICAgICAgICAgdGFibGVfaW5mbyBbTlVNX0FDUElfVEFCTEVfVFlQRVNdOworc3RydWN0IGFjcGlfc3lzdGVtX2luZm8geworCXUzMiBhY3BpX2NhX3ZlcnNpb247CisJdTMyIGZsYWdzOworCXUzMiB0aW1lcl9yZXNvbHV0aW9uOworCXUzMiByZXNlcnZlZDE7CisJdTMyIHJlc2VydmVkMjsKKwl1MzIgZGVidWdfbGV2ZWw7CisJdTMyIGRlYnVnX2xheWVyOworCXUzMiBudW1fdGFibGVfdHlwZXM7CisJc3RydWN0IGFjcGlfdGFibGVfaW5mbyB0YWJsZV9pbmZvW05VTV9BQ1BJX1RBQkxFX1RZUEVTXTsKIH07CiAKLQogLyoKICAqIFR5cGVzIHNwZWNpZmljIHRvIHRoZSBPUyBzZXJ2aWNlIGludGVyZmFjZXMKICAqLwotdHlwZWRlZiB1MzIKLShBQ1BJX1NZU1RFTV9YRkFDRSAqYWNwaV9vc2RfaGFuZGxlcikgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmNvbnRleHQpOwordHlwZWRlZiB1MzIoQUNQSV9TWVNURU1fWEZBQ0UgKiBhY3BpX29zZF9oYW5kbGVyKSAodm9pZCAqY29udGV4dCk7CiAKIHR5cGVkZWYgdm9pZAotKEFDUElfU1lTVEVNX1hGQUNFICphY3BpX29zZF9leGVjX2NhbGxiYWNrKSAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCk7CisgKEFDUElfU1lTVEVNX1hGQUNFICogYWNwaV9vc2RfZXhlY19jYWxsYmFjaykgKHZvaWQgKmNvbnRleHQpOwogCiAvKgogICogVmFyaW91cyBoYW5kbGVycyBhbmQgY2FsbGJhY2sgcHJvY2VkdXJlcwogICovCi10eXBlZGVmCi11MzIgKCphY3BpX2V2ZW50X2hhbmRsZXIpICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCk7Cit0eXBlZGVmIHUzMigqYWNwaV9ldmVudF9oYW5kbGVyKSAodm9pZCAqY29udGV4dCk7CiAKIHR5cGVkZWYKLXZvaWQgKCphY3BpX25vdGlmeV9oYW5kbGVyKSAoCi0JYWNwaV9oYW5kbGUgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0KTsKK3ZvaWQgKCphY3BpX25vdGlmeV9oYW5kbGVyKSAoYWNwaV9oYW5kbGUgZGV2aWNlLCB1MzIgdmFsdWUsIHZvaWQgKmNvbnRleHQpOwogCiB0eXBlZGVmCi12b2lkICgqYWNwaV9vYmplY3RfaGFuZGxlcikgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZGF0YSk7Cit2b2lkICgqYWNwaV9vYmplY3RfaGFuZGxlcikgKGFjcGlfaGFuZGxlIG9iamVjdCwgdTMyIGZ1bmN0aW9uLCB2b2lkICpkYXRhKTsKIAotdHlwZWRlZgotYWNwaV9zdGF0dXMgKCphY3BpX2luaXRfaGFuZGxlcikgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbik7Cit0eXBlZGVmIGFjcGlfc3RhdHVzKCphY3BpX2luaXRfaGFuZGxlcikgKGFjcGlfaGFuZGxlIG9iamVjdCwgdTMyIGZ1bmN0aW9uKTsKIAogI2RlZmluZSBBQ1BJX0lOSVRfREVWSUNFX0lOSSAgICAgICAgMQogCiB0eXBlZGVmCi1hY3BpX3N0YXR1cyAoKmFjcGlfZXhjZXB0aW9uX2hhbmRsZXIpICgKLQlhY3BpX3N0YXR1cyAgICAgICAgICAgICAgICAgICAgIGFtbF9zdGF0dXMsCi0JYWNwaV9uYW1lICAgICAgICAgICAgICAgICAgICAgICBuYW1lLAotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bjb2RlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW1sX29mZnNldCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpjb250ZXh0KTsKLQorYWNwaV9zdGF0dXMoKmFjcGlfZXhjZXB0aW9uX2hhbmRsZXIpIChhY3BpX3N0YXR1cyBhbWxfc3RhdHVzLAorCQkJCSAgICAgIGFjcGlfbmFtZSBuYW1lLAorCQkJCSAgICAgIHUxNiBvcGNvZGUsCisJCQkJICAgICAgdTMyIGFtbF9vZmZzZXQsIHZvaWQgKmNvbnRleHQpOwogCiAvKiBBZGRyZXNzIFNwYWNlcyAoRm9yIE9wZXJhdGlvbiBSZWdpb25zKSAqLwogCiB0eXBlZGVmCi1hY3BpX3N0YXR1cyAoKmFjcGlfYWRyX3NwYWNlX2hhbmRsZXIpICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiwKLQlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgICAgICAgICAgICAgICBhZGRyZXNzLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdF93aWR0aCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICAgICAqdmFsdWUsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcmVnaW9uX2NvbnRleHQpOworYWNwaV9zdGF0dXMoKmFjcGlfYWRyX3NwYWNlX2hhbmRsZXIpICh1MzIgZnVuY3Rpb24sCisJCQkJICAgICAgYWNwaV9waHlzaWNhbF9hZGRyZXNzIGFkZHJlc3MsCisJCQkJICAgICAgdTMyIGJpdF93aWR0aCwKKwkJCQkgICAgICBhY3BpX2ludGVnZXIgKiB2YWx1ZSwKKwkJCQkgICAgICB2b2lkICpoYW5kbGVyX2NvbnRleHQsCisJCQkJICAgICAgdm9pZCAqcmVnaW9uX2NvbnRleHQpOwogCiAjZGVmaW5lIEFDUElfREVGQVVMVF9IQU5ETEVSICAgICAgICBOVUxMCiAKLQogdHlwZWRlZgotYWNwaV9zdGF0dXMgKCphY3BpX2Fkcl9zcGFjZV9zZXR1cCkgKAotCWFjcGlfaGFuZGxlICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lvbl9oYW5kbGUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24sCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmhhbmRsZXJfY29udGV4dCwKLQl2b2lkICAgICAgICAgIC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Ki8KIAotc3RydWN0IGFjcGlfZGV2aWNlX2lkCi17Ci0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVtBQ1BJX0RFVklDRV9JRF9MRU5HVEhdOworc3RydWN0IGFjcGlfZGV2aWNlX2lkIHsKKwljaGFyIHZhbHVlW0FDUElfREVWSUNFX0lEX0xFTkdUSF07CiB9OwogCiAvKiBDb21tb24gc3RyaW5nIHZlcnNpb24gb2YgZGV2aWNlIENJRHMgKi8KIAotc3RydWN0IGFjcGlfY29tcGF0aWJsZV9pZAotewotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVbQUNQSV9NQVhfQ0lEX0xFTkdUSF07CitzdHJ1Y3QgYWNwaV9jb21wYXRpYmxlX2lkIHsKKwljaGFyIHZhbHVlW0FDUElfTUFYX0NJRF9MRU5HVEhdOwogfTsKIAotc3RydWN0IGFjcGlfY29tcGF0aWJsZV9pZF9saXN0Ci17Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU7Ci0Jc3RydWN0IGFjcGlfY29tcGF0aWJsZV9pZCAgICAgICBpZFsxXTsKK3N0cnVjdCBhY3BpX2NvbXBhdGlibGVfaWRfbGlzdCB7CisJdTMyIGNvdW50OworCXUzMiBzaXplOworCXN0cnVjdCBhY3BpX2NvbXBhdGlibGVfaWQgaWRbMV07CiB9OwogCi0KIC8qIFN0cnVjdHVyZSBhbmQgZmxhZ3MgZm9yIGFjcGlfZ2V0X29iamVjdF9pbmZvICovCiAKICNkZWZpbmUgQUNQSV9WQUxJRF9TVEEgICAgICAgICAgICAgICAgICAweDAwMDEKQEAgLTkxNCw1NSArODUzLDQ1IEBACiAjZGVmaW5lIEFDUElfVkFMSURfQ0lEICAgICAgICAgICAgICAgICAgMHgwMDEwCiAjZGVmaW5lIEFDUElfVkFMSURfU1hEUyAgICAgICAgICAgICAgICAgMHgwMDIwCiAKLQogI2RlZmluZSBBQ1BJX0NPTU1PTl9PQkpfSU5GTyBcCiAJYWNwaV9vYmplY3RfdHlwZSAgICAgICAgICAgICAgICAgICAgdHlwZTsgICAgICAgICAgIC8qIEFDUEkgb2JqZWN0IHR5cGUgKi8gXAotCWFjcGlfbmFtZSAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgICAgICAgICAgICAvKiBBQ1BJIG9iamVjdCBOYW1lICovCisJYWNwaV9uYW1lICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZQkvKiBBQ1BJIG9iamVjdCBOYW1lICovCiAKLQotc3RydWN0IGFjcGlfb2JqX2luZm9faGVhZGVyCi17CitzdHJ1Y3QgYWNwaV9vYmpfaW5mb19oZWFkZXIgewogCUFDUElfQ09NTU9OX09CSl9JTkZPOwogfTsKIAotCiAvKiBTdHJ1Y3R1cmUgcmV0dXJuZWQgZnJvbSBHZXQgT2JqZWN0IEluZm8gKi8KIAotc3RydWN0IGFjcGlfZGV2aWNlX2luZm8KLXsKK3N0cnVjdCBhY3BpX2RldmljZV9pbmZvIHsKIAlBQ1BJX0NPTU1PTl9PQkpfSU5GTzsKIAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkOyAgICAgICAgICAgICAgLyogSW5kaWNhdGVzIHdoaWNoIGZpZWxkcyBiZWxvdyBhcmUgdmFsaWQgKi8KLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3N0YXR1czsgICAgIC8qIF9TVEEgdmFsdWUgKi8KLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzOyAgICAgICAgICAgIC8qIF9BRFIgdmFsdWUgaWYgYW55ICovCi0Jc3RydWN0IGFjcGlfZGV2aWNlX2lkICAgICAgICAgICAgICAgaGFyZHdhcmVfaWQ7ICAgICAgICAvKiBfSElEIHZhbHVlIGlmIGFueSAqLwotCXN0cnVjdCBhY3BpX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AgICAgICAgICBidXM7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uOworc3RydWN0IGFjcGlfcGNpX2lkIHsKKwl1MTYgc2VnbWVudDsKKwl1MTYgYnVzOworCXUxNiBkZXZpY2U7CisJdTE2IGZ1bmN0aW9uOwogfTsKIAotCi1zdHJ1Y3QgYWNwaV9tZW1fc3BhY2VfY29udGV4dAotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgICAgICAgICAgICAgICBhZGRyZXNzOwotCWFjcGlfcGh5c2ljYWxfYWRkcmVzcyAgICAgICAgICAgICAgIG1hcHBlZF9waHlzaWNhbF9hZGRyZXNzOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICptYXBwZWRfbG9naWNhbF9hZGRyZXNzOwotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBlZF9sZW5ndGg7CitzdHJ1Y3QgYWNwaV9tZW1fc3BhY2VfY29udGV4dCB7CisJdTMyIGxlbmd0aDsKKwlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgYWRkcmVzczsKKwlhY3BpX3BoeXNpY2FsX2FkZHJlc3MgbWFwcGVkX3BoeXNpY2FsX2FkZHJlc3M7CisJdTggKm1hcHBlZF9sb2dpY2FsX2FkZHJlc3M7CisJYWNwaV9zaXplIG1hcHBlZF9sZW5ndGg7CiB9OwogCi0KIC8qCiAgKiBEZWZpbml0aW9ucyBmb3IgUmVzb3VyY2UgQXR0cmlidXRlcwogICovCkBAIC05OTIsOCArOTIxLDggQEAKIC8qCiAgKiAgSU8gUG9ydCBEZXNjcmlwdG9yIERlY29kZQogICovCi0jZGVmaW5lIEFDUElfREVDT0RFXzEwICAgICAgICAgICAgICAgICAgKHU4KSAweDAwICAgIC8qIDEwLWJpdCBJTyBhZGRyZXNzIGRlY29kZSAqLwotI2RlZmluZSBBQ1BJX0RFQ09ERV8xNiAgICAgICAgICAgICAgICAgICh1OCkgMHgwMSAgICAvKiAxNi1iaXQgSU8gYWRkcmVzcyBkZWNvZGUgKi8KKyNkZWZpbmUgQUNQSV9ERUNPREVfMTAgICAgICAgICAgICAgICAgICAodTgpIDB4MDAJLyogMTAtYml0IElPIGFkZHJlc3MgZGVjb2RlICovCisjZGVmaW5lIEFDUElfREVDT0RFXzE2ICAgICAgICAgICAgICAgICAgKHU4KSAweDAxCS8qIDE2LWJpdCBJTyBhZGRyZXNzIGRlY29kZSAqLwogCiAvKgogICogIElSUSBBdHRyaWJ1dGVzCkBAIC0xMDQ1LDMyICs5NzQsMjggQEAKICNkZWZpbmUgQUNQSV9QUk9EVUNFUiAgICAgICAgICAgICAgICAgICAodTgpIDB4MDAKICNkZWZpbmUgQUNQSV9DT05TVU1FUiAgICAgICAgICAgICAgICAgICAodTgpIDB4MDEKIAotCiAvKgogICogIFN0cnVjdHVyZXMgdXNlZCB0byBkZXNjcmliZSBkZXZpY2UgcmVzb3VyY2VzCiAgKi8KLXN0cnVjdCBhY3BpX3Jlc291cmNlX2lycQotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VfbGV2ZWw7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX2hpZ2hfbG93OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoYXJlZF9leGNsdXNpdmU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyX29mX2ludGVycnVwdHM7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0c1sxXTsKK3N0cnVjdCBhY3BpX3Jlc291cmNlX2lycSB7CisJdTMyIGVkZ2VfbGV2ZWw7CisJdTMyIGFjdGl2ZV9oaWdoX2xvdzsKKwl1MzIgc2hhcmVkX2V4Y2x1c2l2ZTsKKwl1MzIgbnVtYmVyX29mX2ludGVycnVwdHM7CisJdTMyIGludGVycnVwdHNbMV07CiB9OwogCi1zdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1c19tYXN0ZXI7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmZXI7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyX29mX2NoYW5uZWxzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5uZWxzWzFdOworc3RydWN0IGFjcGlfcmVzb3VyY2VfZG1hIHsKKwl1MzIgdHlwZTsKKwl1MzIgYnVzX21hc3RlcjsKKwl1MzIgdHJhbnNmZXI7CisJdTMyIG51bWJlcl9vZl9jaGFubmVsczsKKwl1MzIgY2hhbm5lbHNbMV07CiB9OwogCi1zdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zdGFydF9kcGYKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wYXRpYmlsaXR5X3ByaW9yaXR5OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcmZvcm1hbmNlX3JvYnVzdG5lc3M7CitzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zdGFydF9kcGYgeworCXUzMiBjb21wYXRpYmlsaXR5X3ByaW9yaXR5OworCXUzMiBwZXJmb3JtYW5jZV9yb2J1c3RuZXNzOwogfTsKIAogLyoKQEAgLTEwNzgsMTUwICsxMDAzLDEyOCBAQAogICogbmVlZGVkIGJlY2F1c2UgaXQgaGFzIG5vIGZpZWxkcwogICovCiAKLXN0cnVjdCBhY3BpX3Jlc291cmNlX2lvCi17Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW9fZGVjb2RlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbl9iYXNlX2FkZHJlc3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2Jhc2VfYWRkcmVzczsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbm1lbnQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2VfbGVuZ3RoOworc3RydWN0IGFjcGlfcmVzb3VyY2VfaW8geworCXUzMiBpb19kZWNvZGU7CisJdTMyIG1pbl9iYXNlX2FkZHJlc3M7CisJdTMyIG1heF9iYXNlX2FkZHJlc3M7CisJdTMyIGFsaWdubWVudDsKKwl1MzIgcmFuZ2VfbGVuZ3RoOwogfTsKIAotc3RydWN0IGFjcGlfcmVzb3VyY2VfZml4ZWRfaW8KLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlX2FkZHJlc3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2VfbGVuZ3RoOworc3RydWN0IGFjcGlfcmVzb3VyY2VfZml4ZWRfaW8geworCXUzMiBiYXNlX2FkZHJlc3M7CisJdTMyIHJhbmdlX2xlbmd0aDsKIH07CiAKLXN0cnVjdCBhY3BpX3Jlc291cmNlX3ZlbmRvcgotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZFsxXTsKK3N0cnVjdCBhY3BpX3Jlc291cmNlX3ZlbmRvciB7CisJdTMyIGxlbmd0aDsKKwl1OCByZXNlcnZlZFsxXTsKIH07CiAKLXN0cnVjdCBhY3BpX3Jlc291cmNlX2VuZF90YWcKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja3N1bTsKK3N0cnVjdCBhY3BpX3Jlc291cmNlX2VuZF90YWcgeworCXU4IGNoZWNrc3VtOwogfTsKIAotc3RydWN0IGFjcGlfcmVzb3VyY2VfbWVtMjQKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkX3dyaXRlX2F0dHJpYnV0ZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYmFzZV9hZGRyZXNzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heF9iYXNlX2FkZHJlc3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlX2xlbmd0aDsKK3N0cnVjdCBhY3BpX3Jlc291cmNlX21lbTI0IHsKKwl1MzIgcmVhZF93cml0ZV9hdHRyaWJ1dGU7CisJdTMyIG1pbl9iYXNlX2FkZHJlc3M7CisJdTMyIG1heF9iYXNlX2FkZHJlc3M7CisJdTMyIGFsaWdubWVudDsKKwl1MzIgcmFuZ2VfbGVuZ3RoOwogfTsKIAotc3RydWN0IGFjcGlfcmVzb3VyY2VfbWVtMzIKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkX3dyaXRlX2F0dHJpYnV0ZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYmFzZV9hZGRyZXNzOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heF9iYXNlX2FkZHJlc3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlX2xlbmd0aDsKK3N0cnVjdCBhY3BpX3Jl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sZW5ndGg7CisJY2hhciAqc3RyaW5nX3B0cjsKIH07CiAKLXN0cnVjdCBhY3BpX3Jlc291cmNlX2FkZHJlc3MxNgotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3R5cGU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvZHVjZXJfY29uc3VtZXI7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVjb2RlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbl9hZGRyZXNzX2ZpeGVkOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heF9hZGRyZXNzX2ZpeGVkOworLyogRmllbGRzIGNvbW1vbiB0byBhbGwgYWRkcmVzcyBkZXNjcmlwdG9ycywgMTYvMzIvNjQgYml0ICovCisKKyNkZWZpbmUgQUNQSV9SRVNPVVJDRV9BRERSRVNTX0NPTU1PTiBcCisJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VfdHlwZTsgXAorCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y2VyX2NvbnN1bWVyOyBcCisJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVjb2RlOyBcCisJdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluX2FkZHJlc3NfZml4ZWQ7IFwKKwl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfYWRkcmVzc19maXhlZDsgXAogCXVuaW9uIGFjcGlfcmVzb3VyY2VfYXR0cmlidXRlICAgICAgIGF0dHJpYnV0ZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFudWxhcml0eTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYWRkcmVzc19yYW5nZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfYWRkcmVzc19yYW5nZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX3RyYW5zbGF0aW9uX29mZnNldDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX2xlbmd0aDsKLQlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zb3VyY2UgICAgICAgICByZXNvdXJjZV9zb3VyY2U7CisKK3N0cnVjdCBhY3BpX3Jlc291cmNlX2FkZHJlc3MgeworQUNQSV9SRVNPVVJDRV9BRERSRVNTX0NPTU1PTn07CisKK3N0cnVjdCBhY3BpX3Jlc291cmNlX2FkZHJlc3MxNiB7CisJQUNQSV9SRVNPVVJDRV9BRERSRVNTX0NPTU1PTiB1MzIgZ3JhbnVsYXJpdHk7CisJdTMyIG1pbl9hZGRyZXNzX3JhbmdlOworCXUzMiBtYXhfYWRkcmVzc19yYW5nZTsKKwl1MzIgYWRkcmVzc190cmFuc2xhdGlvbl9vZmZzZXQ7CisJdTMyIGFkZHJlc3NfbGVuZ3RoOworCXN0cnVjdCBhY3BpX3Jlc291cmNlX3NvdXJjZSByZXNvdXJjZV9zb3VyY2U7CiB9OwogCi1zdHJ1Y3QgYWNwaV9yZXNvdXJjZV9hZGRyZXNzMzIKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZV90eXBlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y2VyX2NvbnN1bWVyOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlY29kZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYWRkcmVzc19maXhlZDsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfYWRkcmVzc19maXhlZDsKLQl1bmlvbiBhY3BpX3Jlc291cmNlX2F0dHJpYnV0ZSAgICAgICBhdHRyaWJ1dGU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbnVsYXJpdHk7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluX2FkZHJlc3NfcmFuZ2U7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2FkZHJlc3NfcmFuZ2U7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc190cmFuc2xhdGlvbl9vZmZzZXQ7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19sZW5ndGg7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2Vfc291cmNlICAgICAgICAgcmVzb3VyY2Vfc291cmNlOworc3RydWN0IGFjcGlfcmVzb3VyY2VfYWRkcmVzczMyIHsKKwlBQ1BJX1JFU09VUkNFX0FERFJFU1NfQ09NTU9OIHUzMiBncmFudWxhcml0eTsKKwl1MzIgbWluX2FkZHJlc3NfcmFuZ2U7CisJdTMyIG1heF9hZGRyZXNzX3JhbmdlOworCXUzMiBhZGRyZXNzX3RyYW5zbGF0aW9uX29mZnNldDsKKwl1MzIgYWRkcmVzc19sZW5ndGg7CisJc3RydWN0IGFjcGlfcmVzb3VyY2Vfc291cmNlIHJlc291cmNlX3NvdXJjZTsKIH07CiAKLXN0cnVjdCBhY3BpX3Jlc291cmNlX2FkZHJlc3M2NAotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3R5cGU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvZHVjZXJfY29uc3VtZXI7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVjb2RlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbl9hZGRyZXNzX2ZpeGVkOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heF9hZGRyZXNzX2ZpeGVkOwotCXVuaW9uIGFjcGlfcmVzb3VyY2VfYXR0cmlidXRlICAgICAgIGF0dHJpYnV0ZTsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFudWxhcml0eTsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYWRkcmVzc19yYW5nZTsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfYWRkcmVzc19yYW5nZTsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX3RyYW5zbGF0aW9uX29mZnNldDsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX2xlbmd0aDsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlX3NwZWNpZmljX2F0dHJpYnV0ZXM7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2Vfc291cmNlICAgICAgICAgcmVzb3VyY2Vfc291cmNlOworc3RydWN0IGFjcGlfcmVzb3VyY2VfYWRkcmVzczY0IHsKKwlBQ1BJX1JFU09VUkNFX0FERFJFU1NfQ09NTU9OIHU2NCBncmFudWxhcml0eTsKKwl1NjQgbWluX2FkZHJlc3NfcmFuZ2U7CisJdTY0IG1heF9hZGRyZXNzX3JhbmdlOworCXU2NCBhZGRyZXNzX3RyYW5zbGF0aW9uX29mZnNldDsKKwl1NjQgYWRkcmVzc19sZW5ndGg7CisJdTY0IHR5cGVfc3BlY2lmaWNfYXR0cmlidXRlczsKKwlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zb3VyY2UgcmVzb3VyY2Vfc291cmNlOwogfTsKIAotc3RydWN0IGFjcGlfcmVzb3VyY2VfZXh0X2lycQotewotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y2VyX2NvbnN1bWVyOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VfbGV2ZWw7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX2hpZ2hfbG93OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoYXJlZF9leGNsdXNpdmU7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyX29mX2ludGVycnVwdHM7Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2Vfc291cmNlICAgICAgICAgcmVzb3VyY2Vfc291cmNlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdHNbMV07CitzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9leHRfaXJxIHsKKwl1MzIgcHJvZHVjZXJfY29uc3VtZXI7CisJdTMyIGVkZ2VfbGV2ZWw7CisJdTMyIGFjdGl2ZV9oaWdoX2xvdzsKKwl1MzIgc2hhcmVkX2V4Y2x1c2l2ZTsKKwl1MzIgbnVtYmVyX29mX2ludGVycnVwdHM7CisJc3RydWN0IGFjcGlfcmVzb3VyY2Vfc291cmNlIHJlc291cmNlX3NvdXJjZTsKKwl1MzIgaW50ZXJydXB0c1sxXTsKIH07CiAKLQogLyogQUNQSV9SRVNPVVJDRV9UWVBFcyAqLwogCiAjZGVmaW5lIEFDUElfUlNUWVBFX0lSUSAgICAgICAgICAgICAgICAgMApAQCAtMTI0MCwzNSArMTE0MywzNCBAQAogI2RlZmluZSBBQ1BJX1JTVFlQRV9BRERSRVNTNjQgICAgICAgICAgIDEzCiAjZGVmaW5lIEFDUElfUlNUWVBFX0VYVF9JUlEgICAgICAgICAgICAgMTQKIAotdHlwZWRlZiB1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNwaV9yZXNvdXJjZV90eXBlOwordHlwZWRlZiB1MzIgYWNwaV9yZXNvdXJjZV90eX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gbGVuZ3RoOworCXVuaW9uIGFjcGlfcmVzb3VyY2VfZGF0YSBkYXRhOwogfTsKIAogI2RlZmluZSBBQ1BJX1JFU09VUkNFX0xFTkdUSCAgICAgICAgICAgICAgICAxMgotI2RlZmluZSBBQ1BJX1JFU09VUkNFX0xFTkdUSF9OT19EQVRBICAgICAgICA4ICAgICAgIC8qIElkICsgTGVuZ3RoIGZpZWxkcyAqLworI2RlZmluZSBBQ1BJX1JFU09VUkNFX0xFTkdUSF9OT19EQVRBICAgICAgICA4CS8qIElkICsgTGVuZ3RoIGZpZWxkcyAqLwogCiAjZGVmaW5lIEFDUElfU0laRU9GX1JFU09VUkNFKHR5cGUpICAgICAgICAgIChBQ1BJX1JFU09VUkNFX0xFTkdUSF9OT19EQVRBICsgc2l6ZW9mICh0eXBlKSkKIApAQCAtMTI4NCwxOSArMTE4NiwxNiBAQAogICogRU5EOiBvZiBkZWZpbml0aW9ucyBmb3IgUmVzb3VyY2UgQXR0cmlidXRlcwogICovCiAKLQotc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUKLXsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGluOwotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3M7ICAgICAgICAvKiBoZXJlIGZvciA2NC1iaXQgYWxpZ25tZW50ICovCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlX2luZGV4OwotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZVs0XTsgICAgICAvKiBwYWQgdG8gNjQgYml0cyBzbyBzaXplb2YoKSB3b3JrcyBpbiBhbGwgY2FzZXMgKi8KK3N0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlIHsKKwl1MzIgbGVuZ3RoOworCXUzMiBwaW47CisJYWNwaV9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fZ2VuZXJpY19zdGF0ZSAqIHN0YXRlLAorCQkJCSB2b2lkICpjb250ZXh0KTsKIAotc3RydWN0IGFjcGlfcGtnX2luZm8KLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpmcmVlX3NwYWNlOwotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0X3NwYWNlOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtX3BhY2thZ2VzOworc3RydWN0IGFjcGlfcGtnX2luZm8geworCXU4ICpmcmVlX3NwYWNlOworCWFjcGlfc2l6ZSBsZW5ndGg7CisJdTMyIG9iamVjdF9zcGFjZTsKKwl1MzIgbnVtX3BhY2thZ2VzOwogfTsKIAogI2RlZmluZSBSRUZfSU5DUkVNRU5UICAgICAgICh1MTYpIDAKQEAgLTcxLDE2NyArNjgsODkgQEAKICNkZWZpbmUgREJfRFdPUkRfRElTUExBWSAgICA0CiAjZGVmaW5lIERCX1FXT1JEX0RJU1BMQVkgICAgOAogCi0KIC8qCiAgKiB1dGdsb2JhbCAtIEdsb2JhbCBkYXRhIHN0cnVjdHVyZXMgYW5kIHByb2NlZHVyZXMKICAqLwotdm9pZAotYWNwaV91dF9pbml0X2dsb2JhbHMgKAotCXZvaWQpOwordm9pZCBhY3BpX3V0X2luaXRfZ2xvYmFscyh2b2lkKTsKIAogI2lmIGRlZmluZWQoQUNQSV9ERUJVR19PVVRQVVQpIHx8IGRlZmluZWQoQUNQSV9ERUJVR0dFUikKIAotY2hhciAqCi1hY3BpX3V0X2dldF9tdXRleF9uYW1lICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11dGV4X2lkKTsKK2NoYXIgKmFjcGlfdXRfZ2V0X211dGV4X25hbWUodTMyIG11dGV4X2lkKTsKIAogI2VuZGlmCiAKLWNoYXIgKgotYWNwaV91dF9nZXRfdHlwZV9uYW1lICgKLQlhY3BpX29iamVjdF90eXBlICAgICAgICAgICAgICAgIHR5cGUpOworY2hhciAqYWNwaV91dF9nZXRfdHlwZV9uYW1lKGFjcGlfb2JqZWN0X3R5cGUgdHlwZSk7CiAKLWNoYXIgKgotYWNwaV91dF9nZXRfbm9kZV9uYW1lICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmplY3QpOworY2hhciAqYWNwaV91dF9nZXRfbm9kZV9uYW1lKHZvaWQgKm9iamVjdCk7CiAKLWNoYXIgKgotYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9uYW1lICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpvYmplY3QpOworY2hhciAqYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9uYW1lKHZvaWQgKm9iamVjdCk7CiAKLWNoYXIgKgotYWNwaV91dF9nZXRfb2JqZWN0X3R5cGVfbmFtZSAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MpOworY2hhciAqYWNwaV91dF9nZXRfb2JqZWN0X3R5cGVfbmFtZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYyk7CiAKLWNoYXIgKgotYWNwaV91dF9nZXRfcmVnaW9uX25hbWUgKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2VfaWQpOworY2hhciAqYWNwaV91dF9nZXRfcmVnaW9uX25hbWUodTggc3BhY2VfaWQpOwogCi1jaGFyICoKLWFjcGlfdXRfZ2V0X2V2ZW50X25hbWUgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRfaWQpOworY2hhciAqYWNwaV91dF9nZXRfZXZlbnRfbmFtZSh1MzIgZXZlbnRfaWQpOwogCi1jaGFyCi1hY3BpX3V0X2hleF90b19hc2NpaV9jaGFyICgKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgIGludGV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ZW4gKAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKnN0cmluZyk7CithY3BpX3NpemUgYWNwaV91dF9zdHJsZW4oY29uc3QgY2hhciAqc3RyaW5nKTsKIAotY2hhciAqCi1hY3BpX3V0X3N0cmNweSAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZHN0X3N0cmluZywKLQljb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICpzcmNfc3RyaW5nKTsKK2NoYXIgKmFjcGlfdXRfc3RyY3B5KGNoYXIgKmRzdF9zdHJpbmcsIGNvbnN0IGNoYXIgKnNyY19zdHJpbmcpOwogCi1jaGFyICoKLWFjcGlfdXRfc3RybmNweSAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZHN0X3N0cmluZywKLQljb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICpzcmNfc3RyaW5nLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgY291bnQpOworY2hhciAqYWNwaV91dF9zdHJuY3B5KGNoYXIgKmRzdF9zdHJpbmcsCisJCSAgICAgIGNvbnN0IGNoYXIgKnNyY19zdHJpbmcsIGFjcGlfc2l6ZSBjb3VudCk7CiAKLWludAotYWNwaV91dF9tZW1jbXAgKAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKmJ1ZmZlcjEsCi0JY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyMiwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGNvdW50KTsKK2ludCBhY3BpX3V0X21lbWNtcChjb25zdCBjaGFyICpidWZmZXIxLCBjb25zdCBjaGFyICpidWZmZXIyLCBhY3BpX3NpemUgY291bnQpOwogCi1pbnQKLWFjcGlfdXRfc3RybmNtcCAoCi0JY29uc3QgY2hhciAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nMSwKLQljb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcyLAotCWFjcGlfc2l6ZSAgICAgICAgICAgICAgICAgICAgICAgY291bnQpOworaW50IGFjcGlfdXRfc3RybmNtcChjb25zdCBjaGFyICpzdHJpbmcxLCBjb25zdCBjaGFyICpzdHJpbmcyLCBhY3BpX3NpemUgY291bnQpOwogCi1pbnQKLWFjcGlfdXRfc3RyY21wICgKLQljb25zdCBjaGFyICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcxLAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKnN0cmluZzIpOworaW50IGFjcGlfdXRfc3RyY21wKGNvbnN0IGNoYXIgKnN0cmluZzEsIGNvbnN0IGNoYXIgKnN0cmluZzIpOwogCi1jaGFyICoKLWFjcGlfdXRfc3RyY2F0ICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkc3Rfc3RyaW5nLAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKnNyY19zdHJpbmcpOworY2hhciAqYWNwaV91dF9zdHJjYXQoY2hhciAqZHN0X3N0cmluZywgY29uc3QgY2hhciAqc3JjX3N0cmluZyk7CiAKLWNoYXIgKgotYWNwaV91dF9zdHJuY2F0ICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpkc3Rfc3RyaW5nLAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKnNyY19zdHJpbmcsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBjb3VudCk7CitjaGFyICphY3BpX3V0X3N0cm5jYXQoY2hhciAqZHN0X3N0cmluZywKKwkJICAgICAgY29uc3QgY2hhciAqc3JjX3N0cmluZywgYWNwaV9zaXplIGNvdW50KTsKIAotdTMyCi1hY3BpX3V0X3N0cnRvdWwgKAotCWNvbnN0IGNoYXIgICAgICAgICAgICAgICAgICAgICAgKnN0cmluZywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqdGVybWluYXRvciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhc2UpOwordTMyIGFjcGlfdXRfc3RydG91bChjb25zdCBjaGFyICpzdHJpbmcsIGNoYXIgKip0ZXJtaW5hdG9yLCB1MzIgYmFzZSk7CiAKLWNoYXIgKgotYWNwaV91dF9zdHJzdHIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnN0cmluZzEsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nMik7CitjaGFyICphY3BpX3V0X3N0cnN0cihjaGFyICpzdHJpbmcxLCBjaGFyICpzdHJpbmcyKTsKIAotdm9pZCAqCi1hY3BpX3V0X21lbWNweSAoCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZGVzdCwKLQljb25zdCB2b2lkICAgICAgICAgICAgICAgICAgICAgICpzcmMsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBjb3VudCk7Cit2b2lkICphY3BpX3V0X21lbWNweSh2b2lkICpkZXN0LCBjb25zdCB2b2lkICpzcmMsIGFjcGlfc2l6ZSBjb3VudCk7CiAKLXZvaWQgKgotYWNwaV91dF9tZW1zZXQgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmRlc3QsCi0JYWNwaV9uYXRpdmVfdWludCAgICAgICAgICAgICAgICB2YWx1ZSwKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIGNvdW50KTsKK3ZvaWQgKmFjcGlfdXRfbWVtc2V0KHZvaWQgKmRlc3QsIGFjcGlfbmF0aXZlX3VpbnQgdmFsdWUsIGFjcGlfc2l6ZSBjb3VudCk7CiAKLWludAotYWNwaV91dF90b191cHBlciAoCi0JaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKTsKK2ludCBhY3BpX3V0X3RvX3VwcGVyKGludCBjKTsKIAotaW50Ci1hY3BpX3V0X3RvX2xvd2VyICgKLQlpbnQgICAgICAgICAgICAgICAgICAgIC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hY2VfcHRyICgKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXN0cnVjdCBhY3BpX2RlYnVnX3ByaW50X2luZm8gICAgKmRiZ19pbmZvLAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBvaW50ZXIpOworYWNwaV91dF90cmFjZV91MzIodTMyIGxpbmVfbnVtYmVyLAorCQkgIGNvbnN0IGNoYXIgKmZ1bmN0aW9uX25hbWUsCisJCSAgY2hhciAqbW9kdWxlX25hbWUsIHUzMiBjb21wb25lbnRfaWQsIHUzMiBpbnRlZ2VyKTsKIAogdm9pZAotYWNwaV91dF90cmFjZV91MzIgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0Jc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbyAgICAqZGJnX2luZm8sCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyKTsKK2FjcGlfdXRfdHJhY2Vfc3RyKHUzMiBsaW5lX251bWJlciwKKwkJICBjb25zdCBjaGFyICpmdW5jdGlvbl9uYW1lLAorCQkgIGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgY29tcG9uZW50X2lkLCBjaGFyICpzdHJpbmcpOwogCiB2b2lkCi1hY3BpX3V0X3RyYWNlX3N0ciAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQlzdHJ1Y3QgYWNwaV9kZWJ1Z19wcmludF9pbmZvICAgICpkYmdfaW5mbywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzdHJpbmcpOworYWNwaV91dF9leGl0KHUzMiBsaW5lX251bWJlciwKKwkgICAgIGNvbnN0IGNoYXIgKmZ1bmN0aW9uX25hbWUsIGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgY29tcG9uZW50X2lkKTsKIAogdm9pZAotYWNwaV91dF9leGl0ICgKL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0X2luZm8oY2hhciAqbW9kdWxlX25hbWUsIHUzMiBsaW5lX251bWJlciwgdTMyIGNvbXBvbmVudF9pZCk7CisKK3ZvaWQgYWNwaV91dF9yZXBvcnRfZXJyb3IoY2hhciAqbW9kdWxlX25hbWUsIHUzMiBsaW5lX251bWJlciwgdTMyIGNvbXBvbmVudF9pZCk7CiAKIHZvaWQKLWFjcGlfdXRfcHRyX2V4aXQgKAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0Jc3RydWN0IGFjcGlfZGVidWdfcHJpbnRfaW5mbyAgICAqZGJnX2luZm8sCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcHRyKTsKK2FjcGlfdXRfcmVwb3J0X3dhcm5pbmcoY2hhciAqbW9kdWxlX25hbWUsIHUzMiBsaW5lX251bWJlciwgdTMyIGNvbXBvbmVudF9pZCk7CiAKLXZvaWQKLWFjcGlfdXRfcmVwb3J0X2luZm8gKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZV9uYW1lLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQpOwotCi12b2lkCi1hY3BpX3V0X3JlcG9ydF9lcnJvciAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCk7Ci0KLXZvaWQKLWFjcGlfdXRfcmVwb3J0X3dhcm5pbmcgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZV9uYW1lLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZV9udW1iZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQpOwotCi12b2lkCi1hY3BpX3V0X2R1bXBfYnVmZmVyICgKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpidWZmZXIsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXksCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRfaWQpOwordm9pZCBhY3BpX3V0X2R1bXBfYnVmZmVyKHU4ICogYnVmZmVyLCB1MzIgY291bnQsIHUzMiBkaXNwbGF5LCB1MzIgY29tcG9uZW50X2lkKTsKIAogdm9pZCBBQ1BJX0lOVEVSTkFMX1ZBUl9YRkFDRQotYWNwaV91dF9kZWJ1Z19wcmludCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRfZGVidWdfbGV2ZWwsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQlzdHJ1Y3QgYWNwaV9kZWJ1Z19wcmludF9pbmZvICAgICpkYmdfaW5mbywKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICpmb3JtYXQsCi0JLi4uKSBBQ1BJX1BSSU5URl9MSUtFX0ZVTkM7CithY3BpX3V0X2RlYnVnX3ByaW50KHUzMiByZXF1ZXN0ZWRfZGVidWdfbGV2ZWwsCisJCSAgICB1MzIgbGluZV9udW1iZXIsCisJCSAgICBjb25zdCBjaGFyICpmdW5jdGlvbl9uYW1lLAorCQkgICAgY2hhciAqbW9kdWxlX25hbWUsCisJCSAgICB1MzIgY29tcG9uZW50X2lkLCBjaGFyICpmb3JtYXQsIC4uLikgQUNQSV9QUklOVEZfTElLRV9GVU5DOwogCiB2b2lkIEFDUElfSU5URVJOQUxfVkFSX1hGQUNFCi1hY3BpX3V0X2RlYnVnX3ByaW50X3Jhdy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AgICAgICAqaGlnaGVzdCk7Ci0KK2FjcGlfdXRfZXhlY3V0ZV9zeGRzKHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpkZXZpY2Vfbm9kZSwgdTggKiBoaWdoZXN0KTsKIAogLyoKICAqIHV0b2JqZWN0IC0gaW50ZXJuYWwgb2JqZWN0IGNyZWF0ZS9kZWxldGUvY2FjaGUgcm91dGluZXMKICAqLwotdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAqCi1hY3BpX3V0X2NyZWF0ZV9pbnRlcm5hbF9vYmplY3RfZGJnICgKLQljaGFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICptb2R1bGVfbmFtZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVfbnVtYmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50X2lkLAotCWFjcGlfb2JqZWN0X3R5cGUgICAgICAgICAgICAgICAgdHlwZSk7Cit1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICphY3BpX3V0X2NyZWF0ZV9pbnRlcm5hbF9vYmplY3RfZGJnKGNoYXIgKm1vZHVsZV9uYW1lLAorCQkJCQkJCSAgICAgIHUzMiBsaW5lX251bWJlciwKKwkJCQkJCQkgICAgICB1MzIgY29tcG9uZW50X2lkLAorCQkJCQkJCSAgICAgIGFjcGlfb2JqZWN0X3R5cGUKKwkJCQkJCQkgICAgICB0eXBlKTsKIAotdm9pZCAqCi1hY3BpX3V0X2FsbG9jYXRlX29iamVjdF9kZXNjX2RiZyAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlX25hbWUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lX251bWJlciwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudF9pZCk7Cit2b2lkICphY3BpX3V0X2FsbG9jYXRlX29iamVjdF9kZXNjX2RiZy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ZXJpY19zdGF0ZSAqCi1hY3BpX3V0X2NyZWF0ZV9wa2dfc3RhdGUgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmludGVybmFsX29iamVjdCwKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICpleHRlcm5hbF9vYmplY3QsCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleCk7Cit1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKmFjcGlfdXRfY3JlYXRlX3BrZ19zdGF0ZSh2b2lkICppbnRlcm5hbF9vYmplY3QsCisJCQkJCQkgICB2b2lkICpleHRlcm5hbF9vYmplY3QsCisJCQkJCQkgICB1MTYgaW5kZXgpOwogCiBhY3BpX3N0YXR1cwotYWNwaV91dF9jcmVhdGVfdXBkYXRlX3N0YXRlX2FuZF9wdXNoICgKLQl1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICAgICAgICpvYmplY3QsCi0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24sCi0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICAgICAgICAqKnN0YXRlX2xpc3QpOworYWNwaV91dF9jcmVhdGVfdXBkYXRlX3N0YXRlX2FuZF9wdXNoKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9iamVjdCwKKwkJCQkgICAgIHUxNiBhY3Rpb24sCisJCQkJICAgICB1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKipzdGF0ZV9saXN0KTsKIAogI2lmZGVmCUFDUElfRlVUVVJFX1VTQUdFCiBhY3BpX3N0YXR1cwotYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoICgKLQl2b2lkICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbnRlcm5hbF9vYmplY3QsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqZXh0ZXJuYWxfb2JqZWN0LAotCXUxNiAgICAgICAg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gICAgaW5fZGl2aWRlbmQsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbl9kaXZpc29yLAotCWFjcGlfaW50ZWdlciAgICAgICAgICAgICAgICAgICAgKm91dF9xdW90aWVudCwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICpvdXRfcmVtYWluZGVyKTsKK2FjcGlfdXRfZGl2aWRlKGFjcGlfaW50ZWdlciBpbl9kaXZpZGVuZCwKKwkgICAgICAgYWNwaV9pbnRlZ2VyIGluX2Rpdmlzb3IsCisJICAgICAgIGFjcGlfaW50ZWdlciAqIG91dF9xdW90aWVudCwgYWNwaV9pbnRlZ2VyICogb3V0X3JlbWFpbmRlcik7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X3Nob3J0X2RpdmlkZSAoCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICBpbl9kaXZpZGVuZCwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpdmlzb3IsCi0JYWNwaV9pbnRlZ2VyICAgICAgICAgICAgICAgICAgICAqb3V0X3F1b3RpZW50LAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm91dF9yZW1haW5kZXIpOworYWNwaV91dF9zaG9ydF9kaXZpZGUoYWNwaV9pbnRlZ2VyIGluX2RpdmlkZW5kLAorCQkgICAgIHUzMiBkaXZpc29yLAorCQkgICAgIGFjcGlfaW50ZWdlciAqIG91dF9xdW90aWVudCwgdTMyICogb3V0X3JlbWFpbmRlcik7CiAKIC8qCiAgKiB1dG1pc2MKICAqLwotYWNwaV9zdGF0dXMKLWFjcGlfdXRfd2Fsa19wYWNrYWdlX3RyZWUgKAotCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgICAgICAgKnNvdXJjZV9vYmplY3QsCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdGFyZ2V0X29iamVjdCwKLQlhY3BpX3BrZ19jYWxsYmFjayAgICAgICAgICAgICAgIHdhbGtfY2FsbGJhY2ssCi0Jdm9pZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqY29udGV4dCk7CithY3BpX3N0YXR1cyBhY3BpX3V0X2FsbG9jYXRlX293bmVyX2lkKGFjcGlfb3duZXJfaWQgKiBvd25lcl9pZCk7CiAKLWNoYXIgKgotYWNwaV91dF9zdHJ1cHIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNyY19zdHJpbmcpOwotCi12b2lkCi1hY3BpX3V0X3ByaW50X3N0cmluZyAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nLAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2xlbmd0aCk7Ci0KLXU4Ci1hY3BpX3V0X3ZhbGlkX2FjcGlfbmFtZSAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKLQotdTgKLWFjcGlfdXRfdmFsaWRfYWNwaV9jaGFyYWN0ZXIgKAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhcmFjdGVyKTsKK3ZvaWQgYWNwaV91dF9yZWxlYXNlX293bmVyX2lkKGFjcGlfb3duZXJfaWQgKiBvd25lcl9pZCk7CiAKIGFjcGlfc3RhdHVzCi1hY3BpX3V0X3N0cnRvdWw2NCAoCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc3RyaW5nLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFzZSwKLQlhY3BpX2ludGVnZXIgICAgICAgICAgICAgICAgICAgICpyZXRfaW50ZWdlcik7CithY3BpX3V0X3dhbGtfcGFja2FnZV90cmVlKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKnNvdXJjZV9vYmplY3QsCisJCQkgIHZvaWQgKnRhcmdldF9vYmplY3QsCisJCQkgIGFjcGlfcGtnX2NhbGxiYWNrIHdhbGtfY2FsbGJh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11dGV4X2lkKTsKLQotdTggKgotYWNwaV91dF9nZXRfcmVzb3VyY2VfZW5kX3RhZyAoCi0JdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAgICAgICAqb2JqX2Rlc2MpOwotCi11OAotYWNwaV91dF9nZW5lcmF0ZV9jaGVja3N1bSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqYnVmZmVyLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoKTsKLQotdTMyCi1hY3BpX3V0X2R3b3JkX2J5dGVfc3dhcCAoCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSk7Ci0KLXZvaWQKLWFjcGlfdXRfc2V0X2ludGVnZXJfd2lkdGggKAotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2aXNpb24pOwordm9pZCBhY3BpX3V0X3NldF9pbnRlZ2VyX3dpZHRoKHU4IHJldmlzaW9uKTsKIAogI2lmZGVmIEFDUElfREVCVUdfT1VUUFVUCiB2b2lkCi1hY3BpX3V0X2Rpc3BsYXlfaW5pdF9wYXRobmFtZSAoCi0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlLAotCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICAgICAgKm9ial9oYW5kbGUsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGF0aCk7CithY3BpX3V0X2Rpc3BsYXlfaW5pdF9wYXRobmFtZSh1OCB0eXBlLAorCQkJICAgICAgc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm9ial9oYW5kbGUsCisJCQkgICAgICBjaGFyICpwYXRoKTsKIAogI2VuZGlmCiAKKy8qCisgKiB1dG11dGV4IC0gbXV0ZXggc3VwcG9ydAorICovCithY3BpX3N0YXR1cyBhY3BpX3V0X211dGV4X2luaXRpYWxpemUodm9pZCk7CisKK3ZvaWQgYWNwaV91dF9tdXRleF90ZXJtaW5h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lciwKKwkJCSAgYWNwaV9zaXplIHJlcXVpcmVkX2xlbmd0aCk7CiAKLWFjcGlfc3RhdHVzCi1hY3BpX3V0X2luaXRpYWxpemVfYnVmZmVyICgKLQlzdHJ1Y3QgYWNwaV9idWZmZXIgICAgICAgICAgICAgICpidWZmZXIsCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlZF9sZW5ndGgpOwordm9pZCAqYWNwaV91dF9hbGxvY2F0ZShhY3BpX3NpemUgc2l6ZSwgdTMyIGNvbXBvbmVudCwgY2hhciAqbW9kdWxlLCB1MzIgbGluZSk7CiAKLXZvaWQgKgotYWNwaV91dF9hbGxvY2F0ZSAoCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUpOwotCi12b2lkICoKLWFjcGlfdXRfY2FsbG9jYXRlICgKLQlhY3BpX3NpemUgICAgICAgICAgICAgICAgICAgICAgIHNpemUsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZSk7Cit2b2lkICphY3BpX3V0X2NhbGxvY2F0ZShhY3BpX3NpemUgc2l6ZSwgdTMyIGNvbXBvbmVudCwgY2hhciAqbW9kdWxlLCB1MzIgbGluZSk7CiAKICNpZmRlZiBBQ1BJX0RCR19UUkFDS19BTExPQ0FUSU9OUwotdm9pZCAqCi1hY3BpX3V0X2FsbG9jYXRlX2FuZF90cmFjayAoCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUpOwordm9pZCAqYWNwaV91dF9hbGxvY2F0ZV9hbmRfdHJhY2soYWNwaV9zaXplIHNpemUsCisJCQkJIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpOwogCi12b2lkICoKLWFjcGlfdXRfY2FsbG9jYXRlX2FuZF90cmFjayAoCi0JYWNwaV9zaXplICAgICAgICAgICAgICAgICAgICAgICBzaXplLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LAotCWNoYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1vZHVsZSwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUpOwordm9pZCAqYWNwaV91dF9jYWxsb2NhdGVfYW5kX3RyYWNrKGFjcGlfc2l6ZSBzaXplLAorCQkJCSAgdTMyIGNvbXBvbmVudCwgY2hhciAqbW9kdWxlLCB1MzIgbGluZSk7CiAKIHZvaWQKLWFjcGlfdXRfZnJlZV9hbmRfdHJhY2sgKAotCXZvaWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmFkZHJlc3MsCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsCi0JY2hhciAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbW9kdWxlLAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZSk7CithY3BpX3V0X2ZyZWVfYW5kX3RyYWNrKHZvaWQgKmFkZHJlc3MsIHUzMiBjb21wb25lbnQsIGNoYXIgKm1vZHVsZSwgdTMyIGxpbmUpOwogCiAjaWZkZWYJQUNQSV9GVVRVUkVfVVNBR0UKLXZvaWQKLWFjcGlfdXRfZHVtcF9hbGxvY2F0aW9uX2luZm8gKAotCXZvaW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MX0RFUkVGX09GX09QICAgICAgICAgICAgICh1MTYpIDB4ODMKLSNkZWZpbmUgQU1MX0NPTkNBVF9SRVNfT1AgICAgICAgICAgICh1MTYpIDB4ODQgICAgIC8qIEFDUEkgMi4wICovCi0jZGVmaW5lIEFNTF9NT0RfT1AgICAgICAgICAgICAgICAgICAodTE2KSAweDg1ICAgICAvKiBBQ1BJIDIuMCAqLworI2RlZmluZSBBTUxfQ09OQ0FUX1JFU19PUCAgICAgICAgICAgKHUxNikgMHg4NAkvKiBBQ1BJIDIuMCAqLworI2RlZmluZSBBTUxfTU9EX09QICAgICAgICAgICAgICAgICAgKHUxNikgMHg4NQkvKiBBQ1BJIDIuMCAqLwogI2RlZmluZSBBTUxfTk9USUZZX09QICAgICAgICAgICAgICAgKHUxNikgMHg4NgogI2RlZmluZSBBTUxfU0laRV9PRl9PUCAgICAgICAgICAgICAgKHUxNikgMHg4NwogI2RlZmluZSBBTUxfSU5ERVhfT1AgICAgICAgICAgICAgICAgKHUxNikgMHg4OApAQCAtMTIwLDIxICsxMjAsMjEgQEAKICNkZWZpbmUgQU1MX0NSRUFURV9CWVRFX0ZJRUxEX09QICAgICh1MTYpIDB4OGMKICNkZWZpbmUgQU1MX0NSRUFURV9CSVRfRklFTERfT1AgICAgICh1MTYpIDB4OGQKICNkZWZpbmUgQU1MX1RZUEVfT1AgICAgICAgICAgICAgICAgICh1MTYpIDB4OGUKLSNkZWZpbmUgQU1MX0NSRUFURV9RV09SRF9GSUVMRF9PUCAgICh1MTYpIDB4OGYgICAgIC8qIEFDUEkgMi4wICovCisjZGVmaW5lIEFNTF9DUkVBVEVfUVdPUkRfRklFTERfT1AgICAodTE2KSAweDhmCS8qIEFDUEkgMi4wICovCiAjZGVmaW5lIEFNTF9MQU5EX09QICAgICAgICAgICAgICAgICAodTE2KSAweDkwCiAjZGVmaW5lIEFNTF9MT1JfT1AgICAgICAgICAgICAgICAgICAodTE2KSAweDkxCiAjZGVmaW5lIEFNTF9MTk9UX09QICAgICAgICAgICAgICAgICAodTE2KSAweDkyCiAjZGVmaW5lIEFNTF9MRVFVQUxfT1AgICAgICAgICAgICAgICAodTE2KSAweDkzCiAjZGVmaW5lIEFNTF9MR1JFQVRFUl9PUCAgICAgICAgICAgICAodTE2KSAweDk0CiAjZGVmaW5lIEFNTF9MTEVTU19PUCAgICAgICAgICAgICAgICAodTE2KSAweDk1Ci0jZGVmaW5lIEFNTF9UT19CVUZGRVJfT1AgICAgICAgICAgICAodTE2KSAweDk2ICAgICAvKiBBQ1BJIDIuMCAqLwotI2RlZmluZSBBTUxfVE9fREVDU1RSSU5HX09QICAgICAgICAgKHUxNikgMHg5NyAgICAgLyogQUNQSSAyLjAgKi8KLSNkZWZpbmUgQU1MX1RPX0hFWFNUUklOR19PUCAgICAgICAgICh1MTYpIDB4OTggICAgIC8qIEFDUEkgMi4wICovCi0jZGVmaW5lIEFNTF9UT19JTlRFR0VSX09QICAgICAgICAgICAodTE2KSAweDk5ICAgICAvKiBBQ1BJIDIuMCAqLwotI2RlZmluZSBBTUxfVE9fU1RSSU5HX09QICAgICAgICAgICAgKHUxNikgMHg5YyAgICAgLyogQUNQSSAyLjAgKi8KLSNkZWZpbmUgQU1MX0NPUFlfT1AgICAgICAgICAgICAgICAgICh1MTYpIDB4OWQgICAgIC8qIEFDUEkgMi4wICovCi0jZGVmaW5lIEFNTF9NSURfT1AgICAgICAgICAgICAgICAgICAodTE2KSAweDllICAgICAvKiBBQ1BJIDIuMCAqLwotI2RlZmluZSBBTUxfQ09OVElOVUVfT1AgICAgICAgICAgICAgKHUxNikgMHg5ZiAgICAgLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX1RPX0JVRkZFUl9PUCAgICAgICAgICAgICh1MTYpIDB4OTYJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX1RPX0RFQ1NUUklOR19PUCAgICAgICAgICh1MTYpIDB4OTcJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX1RPX0hFWFNUUklOR19PUCAgICAgICAgICh1MTYpIDB4OTgJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX1RPX0lOVEVHRVJfT1AgICAgICAgICAgICh1MTYpIDB4OTkJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX1RPX1NUUklOR19PUCAgICAgICAgICAgICh1MTYpIDB4OWMJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX0NPUFlfT1AgICAgICAgICAgICAgICAgICh1MTYpIDB4OWQJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX01JRF9PUCAgICAgICAgICAgICAgICAgICh1MTYpIDB4OWUJLyogQUNQSSAyLjAgKi8KKyNkZWZpbmUgQU1MX0NPTlRJTlVFX09QICAgICAgICAgICAgICh1MTYpIDB4OWYJLyogQUNQSSAyLjAgKi8KICNkZWZpbmUgQU1MX0lGX09QICAgICAgICAgICAgICAgICAgICh1MTYpIDB4YTAKICNkZWZpbmUgQU1MX0VMU0VfT1AgICAgICAgICAgICAgICAgICh1MTYpIDB4YTEKICNkZWZpbmUgQU1MX1dISUxFX09QICAgICAgICAgICAgICAgICh1MTYpIDB4YTIKQEAgLTE0Niw3ICsxNDYsNyBAQAogCiAvKiBwcmVmaXhlZCBvcGNvZGVzICovCiAKLSNkZWZpbmUgQU1MX0VYVE9QICAgICAgICAgICAgICAgICAgICh1MTYpIDB4MDA1YiAgICAgLyogcHJlZml4IGZvciAyLWJ5dGUgb3Bjb2RlcyAqLworI2RlZmluZSBBTUxfRVhURU5ERURfT1BDT0RFICAgICAgICAgKHUxNikgMHg1YjAwCS8qIHByZWZpeCBmb3IgMi1ieXRlIG9wY29kZXMgKi8KIAogI2RlZmluZSBBTUxfTVVURVhfT1AgICAgICAgICAgICAgICAgKHUxNikgMHg1YjAxCiAjZGVmaW5lIEFNTF9FVkVOVF9PUCAgICAgICAgICAgICAgICAodTE2KSAweDViMDIKQEAgLTE1NCw3ICsxNTQsNyBAQAogI2RlZmluZSBBTUxfU0hJRlRfTEVGVF9CSVRfT1AgICAgICAgKHUxNikgMHg1YjExCiAjZGVmaW5lIEFNTF9DT05EX1JFRl9PRl9PUCAgICAgICAgICAodTE2KSAweDViMTIKICNkZWZpbmUgQU1MX0NSRUFURV9GSUVMRF9PUCAgICAgICAgICh1MTYpIDB4NWIxMwotI2RlZmluZSBBTUxfTE9BRF9UQUJMRV9PUCAgICAgICAgICAgKHUxNikgMHg1YjFmICAgICAvKiBBQ1BJIDIuMCAqLworI2RlZmluZSBBTUxfTE9BRF9UQUJMRV9PUCAgICAgICAgICAgKHUxNikgMHg1YjFmCS8qIEFDUEkgMi4wICovCiAjZGVmaW5lIEFNTF9MT0FEX09QICAgICAgICAgICAgICAgICAodTE2KSAweDViMjAKICNkZWZpbmUgQU1MX1NUQUxMX09QICAgICAgICAgICAgICAgICh1MTYpIDB4NWIyMQogI2RlZmluZSBBTUxfU0xFRVBfT1AgICAgICAgICAgICAgICAgKHUxNikgMHg1YjIyCkBAIC0xNjksNyArMTY5LDcgQEAKICNkZWZpbmUgQU1MX1JFVklTSU9OX09QICAgICAgICAgICAgICh1MTYpIDB4NWIzMAogI2RlZmluZSBBTUxfREVCVUdfT1AgICAgICAgICAgICAgICAgKHUxNikgMHg1YjMxCiAjZGVmaW5lIEFNTF9GQVRBTF9PUCAgICAgICAgICAgICAgICAodTE2KSAweDViMzIKLSNkZWZpbmUgQU1MX1RJTUVSX09QICAgICAgICAgICAgICAgICh1MTYpIDB4NWIzMyAgICAgLyogQUNQSSAzLjAgKi8KKyNkZWZpbmUgQU1MX1RJTUVSX09QICAgICAgICAgICAgICAgICh1MTYpIDB4NWIzMwkvKiBBQ1BJIDMuMCAqLwogI2RlZmluZSBBTUxfUkVHSU9OX09QICAgICAgICAgICAgICAgKHUxNikgMHg1YjgwCiAjZGVmaW5lIEFNTF9GSUVMRF9PUCAgICAgICAgICAgICAgICAodTE2KSAweDViODEKICNkZWZpbmUgQU1MX0RFVklDRV9PUCAgICAgIC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BBUkdJX0FOWVRZUEUgICAgICAgICAgICAgICAgMHgwMSAgICAvKiBEb24ndCBjYXJlICovCisjZGVmaW5lIEFSR0lfQU5ZVFlQRSAgICAgICAgICAgICAgICAweDAxCS8qIERvbid0IGNhcmUgKi8KICNkZWZpbmUgQVJHSV9QQUNLQUdFICAgICAgICAgICAgICAgIDB4MDIKICNkZWZpbmUgQVJHSV9FVkVOVCAgICAgICAgICAgICAgICAgIDB4MDMKICNkZWZpbmUgQVJHSV9NVVRFWCAgICAgICAgICAgICAgICAgIDB4MDQKQEAgLTI1Niw4ICsyNTMsOCBAQAogI2RlZmluZSBBUkdJX0lOVEVHRVIgICAgICAgICAgICAgICAgMHgwNgogI2RlZmluZSBBUkdJX1NUUklORyAgICAgICAgICAgICAgICAgMHgwNwogI2RlZmluZSBBUkdJX0JVRkZFUiAgICAgICAgICAgICAgICAgMHgwOAotI2RlZmluZSBBUkdJX0JVRkZFUl9PUl9TVFJJTkcgICAgICAgMHgwOSAgICAvKiBVc2VkIGJ5IE1JRCBvcCBvbmx5ICovCi0jZGVmaW5lIEFSR0lfQ09NUFVURURBVEEgICAgICAgICAgICAweDBBICAgIC8qIEJ1ZmZlciwgU3RyaW5nLCBvciBJbnRlZ2VyICovCisjZGVmaW5lIEFSR0lfQlVGRkVSX09SX1NUUklORyAgICAgICAweDA5CS8qIFVzZWQgYnkgTUlEIG9wIG9ubHkgKi8KKyNkZWZpbmUgQVJHSV9DT01QVVRFREFUQSAgICAgICAgICAgIDB4MEEJLyogQnVmZmVyLCBTdHJpbmcsIG9yIEludGVnZXIgKi8KIAogLyogUmVmZXJlbmNlIG9iamVjdHMgKi8KIApAQCAtMjY1LDMwICsyNjIsMjggQEAKICNkZWZpbmUgQVJHSV9PQkpFQ1RfUkVGICAgICAgICAgICAgIDB4MEMKICNkZWZpbmUgQVJHSV9ERVZJQ0VfUkVGICAgICAgICAgICAgIDB4MEQKICNkZWZpbmUgQVJHSV9SRUZFUkVOQ0UgICAgICAgICAgICA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EX0hXID0gMHg3RgogfSBBTUxfUkVHSU9OX1RZUEVTOwogCi0KIC8qIENvbXBhcmlzb24gb3BlcmF0aW9uIGNvZGVzIGZvciBtYXRjaF9vcCBvcGVyYXRvciAqLwogCi10eXBlZGVmIGVudW0KLXsKLQlNQVRDSF9NVFIgICAgICAgICAgICAgICAgICAgICAgID0gMCwKLQlNQVRDSF9NRVEgICAgICAgICAgICAgICAgICAgICAgID0gMSwKLQlNQVRDSF9NTEUgICAgICAgICAgICAgICAgICAgICAgID0gMiwKLQlNQVRDSF9NTFQgICAgICAgICAgICAgICAgICAgICAgID0gMywKLQlNQVRDSF9NR0UgICAgICAgICAgICAgICAgICAgICAgID0gNCwKLQlNQVRDSF9NR1QgICAgICAgICAgICAgICAgICAgICAgID0gNQotCit0eXBlZGVmIGVudW0geworCU1BVENIX01UUiA9IDAsCisJTUFUQ0hfTUVRID0gMSwKKwlNQVRDSF9NTEUgPSAyLAorCU1BVENIX01MVCA9IDMsCisJTUFUQ0hfTUdFID0gNCwKKwlNQVRDSF9NR1QgPSA1CiB9IEFNTF9NQVRDSF9PUEVSQVRPUjsKIAogI2RlZmluZSBNQVhfTUFUQ0hfT1BFUkFUT1IgICAgICAgICAgNQogCi0KIC8qCiAgKiBmaWVsZF9mbGFncwogICoKQEAgLTQ1MCw2MCArNDM2LDQ3IEBACiAjZGVmaW5lIEFNTF9GSUVMRF9MT0NLX1JVTEVfTUFTSyAgICAweDEwCiAjZGVmaW5lIEFNTF9GSUVMRF9VUERBVEVfUlVMRV9NQVNLICAweDYwCiAKLQogLyogMSkgRmllbGQgQWNjZXNzIFR5cGVzICovCiAKLXR5cGVkZWYgZW51bQotewotCUFNTF9GSUVMRF9BQ0NFU1NfQU5ZICAgICAgICAgICAgPSAweDAwLAotCUFNTF9GSUVMRF9BQ0NFU1NfQllURSAgICAgICAgICAgPSAweDAxLAotCUFNTF9GSUVMRF9BQ0NFU1NfV09SRCAgICAgICAgICAgPSAweDAyLAotCUFNTF9GSUVM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VTTkFNRV9CQVNFQUREUkVTUyAgICAgICAgICAgICAgICAgIl9CQVMiCi0jZGVmaW5lIEFTTF9SRVNOQU1FX0JVU01BU1RFUiAgICAgICAgICAgICAgICAgICAiX0JNXyIgIC8qIE1hc3RlcigxKSwgU2xhdmUoMCkgKi8KKyNkZWZpbmUgQVNMX1JFU05BTUVfQlVTTUFTVEVSICAgICAgICAgICAgICAgICAgICJfQk1fIgkvKiBNYXN0ZXIoMSksIFNsYXZlKDApICovCiAjZGVmaW5lIEFTTF9SRVNOQU1FX0RFQ09ERSAgICAgICAgICAgICAgICAgICAgICAiX0RFQyIKICNkZWZpbmUgQVNMX1JFU05BTUVfRE1BICAgICAgICAgICAgICAgICAgICAgICAgICJfRE1BIgotI2RlZmluZSBBU0xfUkVTTkFNRV9ETUFUWVBFICAgICAgICAgICAgICAgICAgICAgIl9UWVAiICAvKiBDb21wYXRpYmxlKDApLCBBKDEpLCBCKDIpLCBGKDMpICovCisjZGVmaW5lIEFTTF9SRVNOQU1FX0RNQVRZUEUgICAgICAgICAgICAgICAgICAgICAiX1RZUCIJLyogQ29tcGF0aWJsZSgwKSwgQSgxKSwgQigyKSwgRigzKSAqLwogI2RlZmluZSBBU0xfUkVTTkFNRV9HUkFOVUxBUklUWSAgICAgICAgICAgICAgICAgIl9HUkEiCiAjZGVmaW5lIEFTTF9SRVNOQU1FX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAiX0lOVCIKLSNkZWZpbmUgQVNMX1JFU05BTUVfSU5URVJSVVBUTEVWRUwgICAgICAgICAgICAgICJfTExfIiAgLyogYWN0aXZlX2xvKDEpLCBhY3RpdmVfaGkoMCkgKi8KLSNkZWZpbmUgQVNMX1JFU05BTUVfSU5URVJSVVBUU0hBUkUgICAgICAgICAgICAgICJfU0hSIiAgLyogU2hhcmVhYmxlKDEpLCBub19zaGFyZSgwKSAqLwotI2RlZmluZSBBU0xfUkVTTkFNRV9JTlRFUlJVUFRUWVBFICAgICAgICAgICAgICAgIl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AgICAgICJfTUFYIgogI2RlZmluZSBBU0xfUkVTTkFNRV9NSU5BRERSICAgICAgICAgICAgICAgICAgICAgIl9NSU4iCiAjZGVmaW5lIEFTTF9SRVNOQU1FX01BWFRZUEUgICAgICAgICAgICAgICAgICAgICAiX01BRiIKQEAgLTcyLDEyICs3MCwxMSBAQAogI2RlZmluZSBBU0xfUkVTTkFNRV9SRUdJU1RFUkJJVE9GRlNFVCAgICAgICAgICAgIl9SQk8iCiAjZGVmaW5lIEFTTF9SRVNOQU1FX1JFR0lTVEVSQklUV0lEVEggICAgICAgICAgICAiX1JCVyIKICNkZWZpbmUgQVNMX1JFU05BTUVfUkFOR0VUWVBFICAgICAgICAgICAgICAgICAgICJfUk5HIgotI2RlZmluZSBBU0xfUkVTTkFNRV9SRUFEV1JJVEVUWVBFICAgICAgICAgICAgICAgIl9SV18iICAvKiByZWFkX29ubHkoMCksIFdyaXRlYWJsZSAoMSkgKi8KKyNkZWZpbmUgQVNMX1JFU05BTUVfUkVBRFdSSVRFVFlQRSAgICAgICAgICAgICAgICJfUldfIgkvKiByZWFkX29ubHkoMCksIFdyaXRlYWJsZSAoMSkgKi8KICNkZWZpbmUgQVNMX1JFU05BTUVfVFJBTlNMQVRJT04gICAgICAgICAgICAgICAgICJfVFJBIgotI2RlZmluZSBBU0xfUkVTTkFNRV9UUkFOU1RZUEUgICAgICAgICAgICAgICAgICAgIl9UUlMiICAvKiBTcGFyc2UoMSksIERlbnNlKDApICovCi0jZGVmaW5lIEFTTF9SRVNOQU1FX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAiX1RUUCIgIC8qIFRyYW5zbGF0aW9uKDEpLCBTdGF0aWMgKDApICovCi0jZGVmaW5lIEFTTF9SRVNOQU1FX1hGRVJUWVBFICAgICAgICAgICAgICAgICAgICAiX1NJeiIgIC8qIDgoMCksIDhfYW5kMTYoMSksIDE2KDIpICovCi0KKyNkZWZpbmUgQVNMX1JFU05BTUVfVFJBTlNUWVBFICAgICAgICAgICAg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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcnFfbWFzazsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnczsKK3N0cnVjdCBhc2xfaXJxX2Zvcm1hdF9kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGlycV9tYXNrOworCXU4IGZsYWdzOwogfTsKIAotCi1zdHJ1Y3QgYXNsX2lycV9ub2ZsYWdzX2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXJxX21hc2s7CitzdHJ1Y3QgYXNsX2lycV9ub2ZsYWdzX2Rlc2MgeworCXU4IGRlc2NyaXB0b3JfdHlwZTsKKwl1MTYgaXJxX21hc2s7CiB9OwogCi0KLXN0cnVjdCBhc2xfZG1hX2Zvcm1hdF9kZXNjCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcl90eXBlOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRtYV9jaGFubmVsX21hc2s7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7CitzdHJ1Y3QgYXNsX2RtYV9mb3JtYXRfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOworCXU4IGRtYV9jaGFubmVsX21hc2s7CisJdTggZmxhZ3M7CiB9OwogCi0KLXN0cnVjdCBhc2xfc3RhcnRfZGVwZW5kZW50X2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7CitzdHJ1Y3QgYXNsX3N0YXJ0X2RlcGVuZGVudF9kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTggZmxhZ3M7CiB9OwogCi0KLXN0cnVjdCBhc2xfc3RhcnRfZGVwZW5kZW50X25vcHJpb19kZXNjCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcl90eXBlOworc3RydWN0IGFzbF9zdGFydF9kZXBlbmRlbnRfbm9wcmlvX2Rlc2MgeworCXU4IGRlc2NyaXB0b3JfdHlwZTsKIH07CiAKLQotc3RydWN0IGFzbF9lbmRfZGVwZW5kZW50X2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7CitzdHJ1Y3QgYXNsX2VuZF9kZXBlbmRlbnRfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOwogfTsKIAotCi1zdHJ1Y3QgYXNsX2lvX3BvcnRfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvcm1hdGlvbjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21pbjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21heDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbm1lbnQ7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOworc3RydWN0IGFzbF9pb19wb3J0X2Rlc2MgeworCXU4IGRlc2NyaXB0b3JfdHlwZTsKKwl1OCBpbmZvcm1hdGlvbjsKKwl1MTYgYWRkcmVzc19taW47CisJdTE2IGFkZHJlc3NfbWF4OworCXU4IGFsaWdubWVudDsKKwl1OCBsZW5ndGg7CiB9OwogCi0KLXN0cnVjdCBhc2xfZml4ZWRfaW9fcG9ydF9kZXNjCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcl90eXBlOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhc2VfYWRkcmVzczsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7CitzdHJ1Y3QgYXNsX2ZpeGVkX2lvX3BvcnRfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOworCXUxNiBiYXNlX2FkZHJlc3M7CisJdTggbGVuZ3RoOwogfTsKIAotCi1zdHJ1Y3QgYXNsX3NtYWxsX3ZlbmRvcl9kZXNjCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcl90eXBlOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlbmRvcl9kZWZpbmVkWzddOworc3RydWN0IGFzbF9zbWFsbF92ZW5kb3JfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOworCXU4IHZlbmRvcl9kZWZpbmVkWzddOwogfTsKIAotCi1zdHJ1Y3QgYXNsX2VuZF90YWdfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja3N1bTsKK3N0cnVjdCBhc2xfZW5kX3RhZ19kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTggY2hlY2tzdW07CiB9OwogCi0KIC8qIExBUkdFIGRlc2NyaXB0b3JzICovCiAKLXN0cnVjdCBhc2xfbWVtb3J5XzI0X2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm9ybWF0aW9uOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3NfbWluOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3NfbWF4OwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWdubWVudDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYW5nZV9sZW5ndGg7CitzdHJ1Y3QgYXNsX21lbW9yeV8yNF9kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGxlbmd0aDsKKwl1OCBpbmZvcm1hdGlvbjsKKwl1MTYgYWRkcmVzc19taW47CisJdTE2IGFkZHJlc3NfbWF4OworCXUxNiBhbGlnbm1lbnQ7CisJdTE2IHJhbmdlX2xlbmd0aDsKIH07CiAKLQotc3RydWN0IGFzbF9sYXJnZV92ZW5kb3JfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVuZG9yX2RlZmluZWRbMV07CitzdHJ1Y3QgYXNsX2xhcmdlX3ZlbmRvcl9kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGxlbmd0aDsKKwl1OCB2ZW5kb3JfZGVmaW5lZFsxXTsKIH07CiAKLQotc3RydWN0IGFzbF9tZW1vcnlfMzJfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mb3JtYXRpb247Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19taW47Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19tYXg7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlX2xlbmd0aDsKK3N0cnVjdCBhc2xfbWVtb3J5XzMyX2Rlc2MgeworCXU4IGRlc2NyaXB0b3JfdHlwZTsKKwl1MTYgbGVuZ3RoOworCXU4IGluZm9ybWF0aW9uOworCXUzMiBhZGRyZXNzX21pbjsKKwl1MzIgYWRkcmVzc19tYXg7CisJdTMyIGFsaWdubWVudDsKKwl1MzIgcmFuZ2VfbGVuZ3RoOwogfTsKIAotCi1zdHJ1Y3QgYXNsX2ZpeGVkX21lbW9yeV8zMl9kZXNjCi17Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvcl90eXBlOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvcm1hdGlvbjsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlX2FkZHJlc3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2VfbGVuZ3RoOworc3RydWN0IGFzbF9maXhlZF9tZW1vcnlfMzJfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOworCXUxNiBsZW5ndGg7CisJdTggaW5mb3JtYXRpb247CisJdTMyIGJhc2VfYWRkcmVzczsKKwl1MzIgcmFuZ2VfbGVuZ3RoOwogfTsKIAotCi1zdHJ1Y3QgYXNsX2V4dGVuZGVkX2FkZHJlc3NfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VfdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnczsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpY19mbGFnczsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXZpc2lvbl9pRDsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZDsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFudWxhcml0eTsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21pbjsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21heDsKLQl1NjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbl9vZmZzZXQ7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19sZW5ndGg7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZV9zcGVjaWZpY19hdHRyaWJ1dGVzOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbmFsX2ZpZWxkc1syXTsgLyogVXNlZCBmb3IgbGVuZ3RoIGNhbGN1bGF0aW9uIG9ubHkgKi8KK3N0cnVjdCBhc2xfZXh0ZW5kZWRfYWRkcmVzc19kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGxlbmd0aDsKKwl1OCByZXNvdXJjZV90eXBlOworCXU4IGZsYWdzOworCXU4IHNwZWNpZmljX2ZsYWdzOworCXU4IHJldmlzaW9uX2lEOworCXU4IHJlc2VydmVkOworCXU2NCBncmFudWxhcml0eTsKKwl1NjQgYWRkcmVzc19taW47CisJdTY0IGFkZHJlc3NfbWF4OworCXU2NCB0cmFuc2xhdGlvbl9vZmZzZXQ7CisJdTY0IGFkZHJlc3NfbGVuZ3RoOworCXU2NCB0eXBlX3NwZWNpZmljX2F0dHJpYnV0ZXM7CisJdTggb3B0aW9uYWxfZmllbGRzWzJdOwkvKiBVc2VkIGZvciBsZW5ndGggY2FsY3VsYXRpb24gb25seSAqLwogfTsKIAotI2RlZmluZSBBU0xfRVhURU5ERURfQUREUkVTU19ERVNDX1JFVklTSU9OICAgICAgICAgIDEgICAgICAgLyogQUNQSSAzLjAgKi8KKyNkZWZpbmUgQVNMX0VYVEVOREVEX0FERFJFU1NfREVTQ19SRVZJU0lPTiAgICAgICAgICAxCS8qIEFDUEkgMy4wICovCiAKLQotc3RydWN0IGFzbF9xd29yZF9hZGRyZXNzX2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3R5cGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWNfZmxhZ3M7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbnVsYXJpdHk7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19taW47Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19tYXg7Ci0JdTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25fb2Zmc2V0OwotCXU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3NfbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbmFsX2ZpZWxkc1syXTsKK3N0cnVjdCBhc2xfcXdvcmRfYWRkcmVzc19kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGxlbmd0aDsKKwl1OCByZXNvdXJjZV90eXBlOworCXU4IGZsYWdzOworCXU4IHNwZWNpZmljX2ZsYWdzOworCXU2NCBncmFudWxhcml0eTsKKwl1NjQgYWRkcmVzc19taW47CisJdTY0IGFkZHJlc3NfbWF4OworCXU2NCB0cmFuc2xhdGlvbl9vZmZzZXQ7CisJdTY0IGFkZHJlc3NfbGVuZ3RoOworCXU4IG9wdGlvbmFsX2ZpZWxkc1syXTsKIH07CiAKLQotc3RydWN0IGFzbF9kd29yZF9hZGRyZXNzX2Rlc2MKLXsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yX3R5cGU7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3R5cGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWNfZmxhZ3M7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbnVsYXJpdHk7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19taW47Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19tYXg7Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25fb2Zmc2V0OwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3NfbGVuZ3RoOwotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbmFsX2ZpZWxkc1syXTsKK3N0cnVjdCBhc2xfZHdvcmRfYWRkcmVzc19kZXNjIHsKKwl1OCBkZXNjcmlwdG9yX3R5cGU7CisJdTE2IGxlbmd0aDsKKwl1OCByZXNvdXJjZV90eXBlOworCXU4IGZsYWdzOworCXU4IHNwZWNpZmljX2ZsYWdzOworCXUzMiBncmFudWxhcml0eTsKKwl1MzIgYWRkcmVzc19taW47CisJdTMyIGFkZHJlc3NfbWF4OworCXUzMiB0cmFuc2xhdGlvbl9vZmZzZXQ7CisJdTMyIGFkZHJlc3NfbGVuZ3RoOworCXU4IG9wdGlvbmFsX2ZpZWxkc1syXTsKIH07CiAKLQotc3RydWN0IGFzbF93b3JkX2FkZHJlc3NfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VfdHlwZTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnczsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpY19mbGFnczsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFudWxhcml0eTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21pbjsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzX21heDsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbl9vZmZzZXQ7Ci0JdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc19sZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uYWxfZmllbGRzWzJdOworc3RydWN0IGFzbF93b3JkX2FkZHJlc3NfZGVzYyB7CisJdTggZGVzY3JpcHRvcl90eXBlOworCXUxNiBsZW5ndGg7CisJdTggcmVzb3VyY2VfdHlwZTsKKwl1OCBmbGFnczsKKwl1OCBzcGVjaWZpY19mbGFnczsKKwl1MTYgZ3JhbnVsYXJpdHk7CisJdTE2IGFkZHJlc3NfbWluOworCXUxNiBhZGRyZXNzX21heDsKKwl1MTYgdHJhbnNsYXRpb25fb2Zmc2V0OworCXUxNiBhZGRyZXNzX2xlbmd0aDsKKwl1OCBvcHRpb25hbF9maWVsZHNbMl07CiB9OwogCi0KLXN0cnVjdCBhc2xfZXh0ZW5kZWRfeHJ1cHRfZGVzYwotewotCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3JfdHlwZTsKLQl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGg7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFibGVfbGVuZ3RoOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdF9udW1iZXJbMV07CitzdHJ1Y3QgYXNsX2V4dGVuZGVkX3hydXB0X2Rlc2MgeworCXU4IGRlc2NyaXB0b3JfdHlwZTsKKwl1MTYgbGVuZ3RoOworCXU4IGZsYWdzOworCXU4IHRhYmxlX2xlbmd0aDsKKwl1MzIgaW50ZXJydXB0X251bWJlclsxXTsKIAkvKiByZXNfc291cmNlX2luZGV4LCByZXNfc291cmNlIG9wdGlvbmF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50aXJlIHN1YnN5c3RlbSBpcyBjb250YWluZWQgaW4gYW4gYXBwbGljYXRpb24KQEAgLTE5Niw4ICsxOTcsNyBAQAogI2Vsc2UKICNkZWZpbmUgREVCVUdHRVJfVEhSRUFESU5HICAgICAgICAgIERFQlVHR0VSX01VTFRJX1RIUkVBREVECiAjZW5kaWYKLSNlbmRpZiAvKiAhREVCVUdHRVJfVEhSRUFESU5HICovCi0KKyNlbmRpZgkJCQkvKiAhREVCVUdHRVJfVEhSRUFESU5HICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC0yMTksNyArMjE5LDcgQEAKICNpbmNsdWRlIDxzdHJpbmcuaD4KICNpbmNsdWRlIDxjdHlwZS5oPgogCi0jZW5kaWYgLyogQUNQSV9VU0VfU1RBTkRBUkRfSEVBREVSUyAqLworI2VuZGlmCQkJCS8qIEFDUElfVVNFX1NUQU5EQVJEX0hFQURFUlMgKi8KIAogLyoKICAqIFdlIHdpbGwgYmUgbGlua2luZyB0byB0aGUgc3RhbmRhcmQgQ2xpYiBmdW5jdGlvbnMKQEAgLTIzOCwxNSArMjM4LDE1IEBACiAjZGVmaW5lIEFDUElfTUVNQ1BZKGQscyxuKSAgICAgICh2b2lkKSBtZW1jcHkoKGQpLCAocyksIChhY3BpX3NpemUpKG4pKQogI2RlZmluZSBBQ1BJX01FTVNFVChkLHMsbikgICAgICAodm9pZCkgbWVtc2V0KChkKSwgKHMpLCAoYWNwaV9zaXplKShuKSkKIAotI2RlZmluZSBBQ1BJX1RPVVBQRVIgICAgICAgICAgICB0b3VwcGVyCi0jZGVmaW5lIEFDUElfVE9MT1dFUiAgICAgICAgICAgIHRvbG93ZXIKLSNkZWZpbmUgQUNQSV9JU19YRElHSVQgICAgICAgICAgaXN4ZGlnaXQKLSNkZWZpbmUgQUNQSV9JU19ESUdJVCAgICAgICAgICAgaXNkaWdpdAotI2RlZmluZSBBQ1BJX0lTX1NQQUNFICAgICAgICAgICBpc3NwYWNlCi0jZGVmaW5lIEFDUElfSVNfVVBQRVIgICAgICAgICAgIGlzdXBwZXIKLSNkZWZpbmUgQUNQSV9JU19QUklOVCAgICAgICAgICAgaXNwcmludAotI2RlZmluZSBBQ1BJX0lTX0FMUEhBICAgICAgICAgICBpc2FscGhhCi0jZGVmaW5lIEFDUElfSVNfQVNDSUkgICAgICAgICAgIGlzYXNjaWkKKyNkZWZpbmUgQUNQSV9UT1VQUEVSKGkpICAgICAgICAgdG91cHBlcigoaW50KSAoaSkpCisjZGVmaW5lIEFDUElfVE9MT1dFUihpKSAgICAgICAgIHRvbG93ZXIoKGludCkgKGkpKQorI2RlZmluZSBBQ1BJX0lTX1hESUdJVChpKSAgICAgICBpc3hkaWdpdCgoaW50KSAoaSkpCisjZGVmaW5lIEFDUElfSVNfRElHSVQoaSkgICAgICAgIGlzZGlnaXQoKGludCkgKGkpKQorI2RlZmluZSBBQ1BJX0lTX1NQQUNFKGkpICAgICAgICBpc3NwYWNlKChpbnQpIChpKSkKKyNkZWZpbmUgQUNQSV9JU19VUFBFUihpKSAgICAgICAgaXN1cHBlcigoaW50KSAoaSkpCisjZGVmaW5lIEFDUElfSVNfUFJJTlQoaSkgICAgICAgIGlzcHJpbnQoKGludCkgKGkpKQorI2RlZmluZSBBQ1BJX0lTX0FMUEhBKGkpICAgICAgICBpc2FscGhhKChpbnQpIChpKSkKKyNkZWZpbmUgQUNQSV9JU19BU0NJSShpKSAgICAgICAgaXNhc2NpaSgoaW50KSAoaSkpCiAKICNlbHNlCiAKQEAgLTI1NywxOCArMjU3LDE4IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICAvKgotICogVXNlIGxvY2FsIGRlZmluaXRpb25zIG9mIEMgbGlicmFyeSBtYWNyb3MgYW5kIGZ1bmN0aW9ucwotICogT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fc3RyY2hyICgoczEpLCAoYykpCkBAIC0zMDMsOCArMzAyLDcgQEAKICNkZWZpbmUgQUNQSV9UT1VQUEVSICAgICAgICAgICAgYWNwaV91dF90b191cHBlcgogI2RlZmluZSBBQ1BJX1RPTE9XRVIgICAgICAgICAgICBhY3BpX3V0X3RvX2xvd2VyCiAKLSNlbmRpZiAvKiBBQ1BJX1VTRV9TWVNURU1fQ0xJQlJBUlkgKi8KLQorI2VuZGlmCQkJCS8qIEFDUElfVVNFX1NZU1RFTV9DTElCUkFSWSAqLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMzQ1LDggKzM0Myw3IEBACiAjZGVmaW5lIEFDUElfQUNRVUlSRV9HTE9CQUxfTE9DSyhHbHB0ciwgYWNxKQogI2RlZmluZSBBQ1BJX1JFTEVBU0VfR0xPQkFMX0xPQ0soR2xwdHIsIGFjcSkKIAotI2VuZGlmIC8qIEFDUElfQVNNX01BQ1JPUyAqLwotCisjZW5kaWYJCQkJLyogQUNQSV9BU01fTUFDUk9TICovCiAKICNpZmRlZiBBQ1BJX0FQUExJQ0FUSU9OCiAKQEAgLTM1NiwxMSArMzUzLDEwIEBACiAjZGVmaW5lIEJSRUFLUE9JTlQzCiAjZW5kaWYKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogQ29tcGlsZXItc3BlY2lmaWMgaW5mb3JtYXRpb24gaXMgY29udGFpbmVkIGluIHRoZSBjb21waWxlci1zcGVjaWZpYwogICogaGVhZGVycy4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZW5kaWYgLyogX19BQ0VOVl9IX18gKi8KKyNlbmRpZgkJCQ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heSB3ZWxsIGJlCisgKiBsb29raW5nIGF0IGEgbXVsdGktbWFzdGVyIGVudmlyb25tZW50CisqLworI2RlZmluZSBERUZfVElNRU9VVCAgICAgICAgICAgICAzMgorI2VuZGlmCisKKyNkZWZpbmUgQlVTX0VSUk9SICAgICAgICAgICAgICAgKC1FUkVNT1RFSU8pCisjZGVmaW5lIFhGRVJfTkFLRUQgICAgICAgICAgICAgICgtRUNPTk5SRUZVU0VEKQorI2RlZmluZSBJMkNfUkVUUlkgICAgICAgICAgICAgICAoLTIwMDApIC8qIGFuIGVycm9yIGhhcyBvY2N1cnJlZCByZXRyeSB0cmFuc21pdCAqLworCisvKiBJQ1IgaW5pdGlhbGl6ZSBiaXQgdmFsdWVzCisqCisqICAxNS4gRk0gICAgICAgMCAoMTAwIEtoeiBvcGVyYXRpb24pCisqICAxNC4gVVIgICAgICAgMCAoTm8gdW5pdCByZXNldCkKKyogIDEzLiBTQURJRSAgICAwIChEaXNhYmxlcyB0aGUgdW5pdCBmcm9tIGludGVycnVwdGluZyBvbiBzbGF2ZSBhZGRyZXNzZXMKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGluZyBpdHMgc2xhdmUgYWRkcmVzcykKKyogIDEyLiBBTERJRSAgICAwIChEaXNhYmxlcyB0aGUgdW5pdCBmcm9tIGludGVycnVwdCB3aGVuIGl0IGxvc2VzIGFyYml0cmF0aW9uCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gbWFzdGVyIG1vZGUpCisqICAxMS4gU1NESUUgICAgMCAoRGlzYWJsZXMgaW50ZXJydXB0cyBmcm9tIGEgc2xhdmUgc3RvcCBkZXRlY3RlZCwgaW4gc2xhdmUgbW9kZSkKKyogIDEwLiBCRUlFICAgICAxIChFbmFibGUgaW50ZXJydXB0cyBmcm9tIGRldGVjdGVkIGJ1cyBlcnJvcnMsIG5vIEFDSyBzZW50KQorKiAgOS4gIElSRklFICAgIDEgKEVuYW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aD4KKyNpbmNsdWRlIDxhc20vZXJybm8uaD4KKyNpbmNsdWRlIDxhc20vdWFjY2Vzcy5oPgorCitzdGF0aWMgaW5saW5lIGludAorZnV0ZXhfYXRvbWljX29wX2ludXNlciAoaW50IGVuY29kZWRfb3AsIGludCBfX3VzZXIgKnVhZGRyKQoreworCWludCBvcCA9IChlbmNvZGVkX29wID4+IDI4KSAmIDc7CisJaW50IGNtcCA9IChlbmNvZGVkX29wID4+IDI0KSAmIDE1OworCWludCBvcGFyZyA9IChlbmNvZGVkX29wIDw8IDgpID4+IDIwOworCWludCBjbXBhcmcgPSAoZW5jb2RlZF9vcCA8PCAyMCkgPj4gMjA7CisJaW50IG9sZHZhbCA9IDAsIHJldCwgdGVtOworCWlmIChlbmNvZGVkX29wICYgKEZVVEVYX09QX09QQVJHX1NISUZUIDw8IDI4KSkKKwkJb3BhcmcgPSAxIDw8IG9wYXJnOworCisJaWYgKCEgYWNjZXNzX29rIChWRVJJRllfV1JJVEUsIHVhZGRyLCBzaXplb2YoaW50KSkpCisJCXJldHVybiAtRUZBVUxUOworCisJaW5jX3ByZWVtcHRfY291bnQoKTsKKworCXN3aXRjaCAob3ApIHsKKwljYXNlIEZVVEVYX09QX1NFVDoKKwljYXNlIEZVVEVYX09QX0FERDoKKwljYXNlIEZVVEVYX09QX09SOgorCWNhc2UgRlVURVhfT1BfQU5ETjoKKwljYXNlIEZVVEVYX09QX1hPUjoKKwlkZWZhdWx0OgorCQlyZXQgPSAtRU5PU1lTOworCX0KKworCWRlY19wcmVlbXB0X2NvdW50KCk7CisKKwlpZiAoIXJldCkgeworCQlzd2l0Y2ggKGNtcCkgeworCQljYXNlIEZVVEVYX09QX0NNUF9FUTogcmV0ID0gKG9sZHZhbCA9PSBjbXBhcmcpOyBicmVhazsKKwkJY2FzZSBGVVRFWF9PUF9DTVBfTkU6IHJldCA9IChvbGR2YWwgIT0gY21wYXJnKTsgYnJlYWs7CisJCWNhc2UgRlVURVhfT1BfQ01QX0xUOiBy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IG1vZGUgMTAwNjQ0CmluZGV4IDVjZGQ5YjAuLjAwMDAwMDAKLS0tIGEvaW5jbHVkZS9hc20tbTY4a25vbW11L2hkcmVnLmgKKysrIC9kZXYvbnVsbApAQCAtMSArMCwwIEBACi0jaW5jbHVkZSA8YXNtLW02OGsvaGRyZWcuaD4KZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLW02OGtub21tdS9tNTIzeHNpbS5oIGIvaW5jbHVkZS9hc20tbTY4a25vbW11L201MjN4c2ltLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOTI2Y2ZiOAotLS0gL2Rldi9udWxsCisrKyBiL2luY2x1ZGUvYXNtLW02OGtub21tdS9tNTIzeHNpbS5oCkBAIC0wLDAgKzEsNDYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICoJbTUyM3hzaW0uaCAtLSBDb2xkRmlyZSA1MjN4IFN5c3RlbSBJbnRlZ3JhdGlvbiBNb2R1bGUgc3VwcG9ydC4KKyAqCisgKgkoQykgQ29weXJpZ2h0IDIwMDMtMjAwNSwgR3JlZyBVbmdlcmVyIDxnZXJnQHNuYXBnZWFyLmNvbT4KKyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZm5kZWYJbTUyM3hzaW1faAorI2RlZmluZQltNTIzeHNpbV9oCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2luY2x1ZGUgPGxpbnV4L2NvbmZpZy5oPgorCisvKgorICoJRGVmaW5lIHRoZSA1MjN4IFNJTSByZWdpc3RlciBzZXQgYWRkcmVzc2VzLgorICovCisjZGVmaW5lCU1DRklDTV9JTlRDMA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fX3UzMglwYWRkaW5nOworfTsKKworc3RydWN0IGZ1c2Vfb3Blbl9vdXQgeworCV9fdTY0CWZoOworCV9fdTMyCW9wZW5fZmxhZ3M7CisJX191MzIJcGFkZGluZzsKK307CisKK3N0cnVjdCBmdXNlX3JlbGVhc2VfaW4geworCV9fdTY0CWZoOworCV9fdTMyCWZsYWdzOworCV9fdTMyCXBhZGRpbmc7Cit9OworCitzdHJ1Y3QgZnVzZV9mbHVzaF9pbiB7CisJX191NjQJZmg7CisJX191MzIJZmx1c2hfZmxhZ3M7CisJX191MzIJcGFkZGluZzsKK307CisKK3N0cnVjdCBmdXNlX3JlYWRfaW4geworCV9fdTY0CWZoOworCV9fdTY0CW9mZnNldDsKKwlfX3UzMglzaXplOworCV9fdTMyCXBhZGRpbmc7Cit9OworCitzdHJ1Y3QgZnVzZV93cml0ZV9pbiB7CisJX191NjQJZmg7CisJX191NjQJb2Zmc2V0OworCV9fdTMyCXNpemU7CisJX191MzIJd3JpdGVfZmxhZ3M7Cit9OworCitzdHJ1Y3QgZnVzZV93cml0ZV9vdXQgeworCV9fdTMyCXNpemU7CisJX191MzIJcGFkZGluZzsKK307CisKK3N0cnVjdCBmdXNlX3N0YXRmc19vdXQgeworCXN0cnVjdCBmdXNlX2tzdGF0ZnMgc3Q7Cit9OworCitzdHJ1Y3QgZnVzZV9mc3luY19pbiB7CisJX191NjQJZmg7CisJX191MzIJZnN5bmNfZmxhZ3M7CisJX191MzIJcGFkZGluZzsKK307CisKK3N0cnVjdCBmdXNlX3NldHhhdHRyX2luIHsKKwlfX3UzMglzaXplOworCV9fdTMyCWZsYWdzOworfTsKKworc3RydWN0IGZ1c2VfZ2V0eGF0dHJfaW4geworCV9fdTMyCXNpemU7CisJX191MzIJcGFkZGluZzsKK307CisKK3N0cnVjdCBmdXNlX2dldHhhdHRyX291dCB7CisJX191MzIJc2l6ZTsKKwlfX3UzMglwYWRkaW5nOworfTsKKworc3RydWN0IGZ1c2VfaW5pdF9pbl9vdXQge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HVkZS9saW51eC9zcGlubG9jay5oIC0gZ2VuZXJpYyBzcGlubG9jay9yd2xvY2sgZGVjbGFyYXRpb25zCisgKgorICogaGVyZSdzIHRoZSByb2xlIG9mIHRoZSB2YXJpb3VzIHNwaW5sb2NrL3J3bG9jayByZWxhdGVkIGluY2x1ZGUgZmlsZXM6CisgKgorICogb24gU01QIGJ1aWxkczoKKyAqCisgKiAgYXNtL3NwaW5sb2NrX3R5cGVzLmg6IGNvbnRhaW5zIHRoZSByYXdfc3BpbmxvY2tfdC9yYXdfcndsb2NrX3QgYW5kIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICBpbml0aWFsaXplcnMKKyAqCisgKiAgbGludXgvc3BpbmxvY2tfdHlwZXMuaDoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lcyB0aGUgZ2VuZXJpYyB0eXBlIGFuZCBpbml0aWFsaXplcnMKKyAqCisgKiAgYXNtL3NwaW5sb2NrLmg6ICAgICAgIGNvbnRhaW5zIHRoZSBfX3Jhd19zcGluXyooKS9ldGMuIGxvd2xldmVsCisgKiAgICAgICAgICAgICAgICAgICAgICAgIGltcGxlbWVudGF0aW9ucywgbW9zdGx5IGlubGluZSBhc3NlbWJseSBjb2RlCisgKgorICogICAoYWxzbyBpbmNsdWRlZCBvbiBVUC1kZWJ1ZyBidWlsZHM6KQorICoKKyAqICBsaW51eC9zcGlubG9ja19hcGlfc21wLmg6CisgKiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSBwcm90b3R5cGVzIGZvciB0aGUgX3NwaW5fKigpIEFQSXMuCisgKgorICogIGxpbnV4L3NwaW5sb2NrLmg6ICAgICBidWlsZHMgdGhlIGZpbmFsIHNwaW5fKigpIEFQSXMuCisgKgorICogb24gVVAgYnVpbGRzOgorICoKKyAqICBsaW51eC9zcGlubG9ja190eXBlX3VwLmg6CisgKiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSBnZW5lcmljLCBza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X3QgKmxvY2spCit7CisJU1BJTl9CVUdfT04obG9jay0+bWFnaWMgIT0gU1BJTkxPQ0tfTUFHSUMsIGxvY2ssICJiYWQgbWFnaWMiKTsKKwlTUElOX0JVR19PTihsb2NrLT5vd25lciA9PSBjdXJyZW50LCBsb2NrLCAicmVjdXJzaW9uIik7CisJU1BJTl9CVUdfT04obG9jay0+b3duZXJfY3B1ID09IHJhd19zbXBfcHJvY2Vzc29yX2lkKCksCisJCQkJCQkJbG9jaywgImNwdSByZWN1cnNpb24iKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGRlYnVnX3NwaW5fbG9ja19hZnRlcihzcGlubG9ja190ICpsb2NrKQoreworCWxvY2stPm93bmVyX2NwdSA9IHJhd19zbXBfcHJvY2Vzc29yX2lkKCk7CisJbG9jay0+b3duZXIgPSBjdXJyZW50OworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgZGVidWdfc3Bpbl91bmxvY2soc3BpbmxvY2tfdCAqbG9jaykKK3sKKwlTUElOX0JVR19PTihsb2NrLT5tYWdpYyAhPSBTUElOTE9DS19NQUdJQywgbG9jaywgImJhZCBtYWdpYyIpOworCVNQSU5fQlVHX09OKCFzcGluX2lzX2xvY2tlZChsb2NrKSwgbG9jaywgImFscmVhZHkgdW5sb2NrZWQiKTsKKwlTUElOX0JVR19PTihsb2NrLT5vd25lciAhPSBjdXJyZW50LCBsb2NrLCAid3Jvbmcgb3duZXIiKTsKKwlTUElOX0JVR19PTihsb2NrLT5vd25lcl9jcHUgIT0gcmF3X3NtcF9wcm9jZXNzb3JfaWQoKSwKKwkJCQkJCQlsb2NrLCAid3JvbmcgQ1BVIik7CisJbG9jay0+b3duZXIgPSBTUElOTE9DS19PV05FUl9JTklUOworCWxvY2stPm93bmVyX2NwdSA9IC0xOworfQorCitzdGF0aWMgdm9pZCBfX3NwaW5fbG9ja19kZWJ1ZyhzcGlubG9ja190ICpsb2NrKQoreworCWludCBwcmludF9vbmNlID0gMTsKKwl1NjQgaTsKK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0OworCisJcmN1X3JlYWRfbG9jaygpOworCWluX2RldiA9IF9faW5fZGV2X2dldChydC0+dS5kc3QuZGV2KTsKKwlpZiAoaW5fZGV2ICE9IE5VTEwpIHsKKwkJZm9yX3ByaW1hcnlfaWZhKGluX2RldikgeworCQkJaWYgKGlmYS0+aWZhX2Jyb2FkY2FzdCA9PSBpcGgtPmRhZGRyKSB7CisJCQkJbWFzayA9IGlmYS0+aWZhX21hc2s7CisJCQkJYnJlYWs7CisJCQl9CisJCX0gZW5kZm9yX2lmYShpbl9kZXYpOworCX0KKwlyY3VfcmVhZF91bmxvY2soKTsKKworCWlmIChtYXNrID09IDApCisJCWdvdG8gb3V0OworCisJdWggPSBza2JfaGVhZGVyX3BvaW50ZXIoKnBza2IsIGlwaC0+aWhsICogNCwgc2l6ZW9mKF91aCksICZfdWgpOworCUJVR19PTih1aCA9PSBOVUxMKTsKKworCWV4cCA9IGlwX2Nvbm50cmFja19leHBlY3RfYWxsb2MoY3QpOworCWlmIChleHAgPT0gTlVMTCkKKwkJZ290byBvdXQ7CisJbWVtc2V0KCZleHAtPnR1cGxlLCAwLCBzaXplb2YoZXhwLT50dXBsZSkpOworCWV4cC0+dHVwbGUuc3JjLmlwICAgICAgICAgPSBpcGgtPmRhZGRyICYgbWFzazsKKwlleHAtPnR1cGxlLmRzdC5pcCAgICAgICAgID0gaXBoLT5zYWRkcjsKKwlleHAtPnR1cGxlLmRzdC51LnVkcC5wb3J0ID0gdWgtPnNvdXJjZTsKKwlleHAtPnR1cGxlLmRzdC5wcm90b251bSAgID0gSVBQUk9UT19VRFA7CisKKwltZW1zZXQoJmV4cC0+bWFzaywgMCwgc2l6ZW9mKGV4cC0+bWFzaykpOworCWV4cC0+bWFzay5zcmMuaXAgICAgICAgICAgPSBtYXNrOworCWV4cC0+bWFzay5kc3QuaXAgICAgICAgICAgPSAweEZGRkZGRkZGOworCWV4cC0+bWFzay5kc3QudS51ZHAucG9ydCAgPSAweEZGRkY7CisJZXhwLT5tYXNrLmRzdC5wcm90b251bSAgICA9IDB4RkY7CisKKwlleHAtPmV4cGVjdGZuICAgICAgICAgICAgID0gTlVMTDsKKwlleHAtPmZsYWdzICAgICAgICAgICAgICAgID0gSVBfQ1RfRVhQRUNUX1BFUk1BTkVOVDsKKworCWlwX2Nvbm50cmFja19leHBlY3RfcmVsYXRlZChleHApOworCWlwX2Nvbm50cmFja19leHBlY3RfcHV0KGV4cCk7CisKKwlpcF9jdF9yZWZyZXNoX2FjY3QoY3QsIGN0aW5mbywgTlVMTCwgdGltZW91dCAqIEhaKTsKK291dDoKKwlyZXR1cm4gTkZfQUNDRVBUOworfQorCitzdGF0aWMgc3RydWN0IGlwX2Nvbm50cmFja19oZWxwZXIgaGVscGVyID0geworCS5uYW1lCQkJPSAibmV0Ymlvcy1ucyIsCisJLnR1cGxlID0geworCQkuc3JjID0geworCQkJLnUgPSB7CisJCQkJLnVkcCA9IHsKKwkJCQkJLnBvcnQJPSBfX2NvbnN0YW50X2h0b25zKDEzNyksCisJCQkJfQorCQkJfQorCQl9LAorCQkuZHN0ID0geworCQkJLnByb3RvbnVtCT0gSVBQUk9UT19VRFAsCisJCX0sCisJfSwKKwkubWFzayA9IHsKKwkJLnNyYyA9IHsKKwkJCS51ID0geworCQkJCS51ZHAgPSB7CisJCQkJCS5wb3J0CT0gMHhGRkZGLAorCQkJCX0KKwkJCX0KKwkJfSwKKwkJLmRzdCA9IHsKKwkJCS5wcm90b251bQk9IDB4RkYsCisJCX0sCisJfSwKKwkubWF4X2V4cGVjdGVkCQk9IDEsCisJLm1lCQkJPSBUSElTX01PRFVMRSwKKwkuaGVscAkJCT0gaGVscCwKK307CisKK3N0YXRpYyBpbnQgX19pbml0IGluaXQodm9pZCkKK3sKKwloZWxwZXIudGltZW91dCA9IHRpbWVvdXQ7CisJcmV0dXJuIGlwX2Nvbm50cmFja19oZWxwZXJfcmVnaXN0ZXIoJmhlbHBlcik7Cit9CisKK3N0YXRpYyB2b2lkIF9fZXhpdCBmaW5p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cml0eSk7CiAJc2V0X3RvX2R1bW15X2lmX251bGwob3BzLCBpbm9kZV9jcmVhdGUpOwotCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcG9zdF9jcmVhdGUpOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfbGluayk7Ci0Jc2V0X3RvX2R1bW15X2lmX251bGwob3BzLCBpbm9kZV9wb3N0X2xpbmspOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfdW5saW5rKTsKIAlzZXRfdG9fZHVtbXlfaWZfbnVsbChvcHMsIGlub2RlX3N5bWxpbmspOwotCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcG9zdF9zeW1saW5rKTsKIAlzZXRfdG9fZHVtbXlfaWZfbnVsbChvcHMsIGlub2RlX21rZGlyKTsKLQlzZXRfdG9fZHVtbXlfaWZfbnVsbChvcHMsIGlub2RlX3Bvc3RfbWtkaXIpOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcm1kaXIpOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfbWtub2QpOwotCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcG9zdF9ta25vZCk7CiAJc2V0X3RvX2R1bW15X2lmX251bGwob3BzLCBpbm9kZV9yZW5hbWUpOwotCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcG9zdF9yZW5hbWUpOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcmVhZGxpbmspOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfZm9sbG93X2xpbmspOwogCXNldF90b19kdW1teV9pZl9udWxsKG9wcywgaW5vZGVfcGVybWlzc2lvbik7CmRpZmYgLS1naXQgYS9zZWN1cml0eS9zZWxpbnV4L2hvb2tzLmMgYi9zZWN1cml0eS9zZWxpbnV4L2hvb2tzLmMKaW5kZXggODY0MWY4OC4u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