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4KLQotVGhlIG9yaWdpbmFsIGNvZGUgaW4gY29uc29sZS5jIGxpbmUgMTQwNToKLSAgICAgICAgZ2V0X3VzZXIoYywgYnVmKTsKLQotVGhlIHByZXByb2Nlc3NvciBvdXRwdXQgKGVkaXRlZCB0byBiZWNvbWUgc29tZXdoYXQgcmVhZGFibGUpOgotCi0oCi0gIHsgICAgICAgIAotICAgIGxvbmcgX19ndV9lcnIgPSAtIDE0ICwgX19ndV92YWwgPSAwOyAgICAgICAgCi0gICAgY29uc3QgX190eXBlb2ZfXygqKCAoICBidWYgKSApKSAqX19ndV9hZGRyID0gKChidWYpKTsgICAgICAgIAotICAgIGlmICgoKCgoMCArIGN1cnJlbnRfc2V0WzBdKS0+dHNzLnNlZ21lbnQpID09IDB4MTggKSAgfHwgCi0gICAgICAgKCgoc2l6ZW9mKCooYnVmKSkpIDw9IDB4QzAwMDAwMDBVTCkgJiYgCi0gICAgICAgKCh1bnNpZ25lZCBsb25nKShfX2d1X2FkZHIgKSA8PSAweEMwMDAwMDAwVUwgLSAoc2l6ZW9mKCooYnVmKSkpKSkpKSAgICAgICAgCi0gICAgICBkbyB7Ci0gICAgICAgIF9fZ3VfZXJyICA9IDA7ICAgICAgICAKLSAgICAgICAgc3dpdGNoICgoc2l6ZW9mKCooYnVmKSkpKSB7ICAgICAgICAKLSAgICAgICAgICBjYXNlIDE6IAotICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAKLSAgICAgICAgICAgICAgIjE6ICAgICAgbW92IiAiYiIgIiAlMiwlIiAiYiIgIjFcbiIgICAgICAgIAotICAgICAgICAgICAgICAiMjpcbiIgICAgICAgIAotICAgICAgICAgICAgICAiLnNlY3Rpb24gLmZpeHVwLFwiYXhcIlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIzOiAgICAgIG1vdmwgJTMsJTBcbiIgICAgICAgIAotICAgICAgICAgICAgICAiICAgICAgICB4b3IiICJiIiAiICUiICJiIiAiMSwlIiAiYiIgIjFcbiIgICAgICAgIAotICAgICAgICAgICAgICAiICAgICAgICBqbXAgMmJcbiIgICAgICAgIAotICAgICAgICAgICAgICAiLnNlY3Rpb24gX19leF90YWJsZSxcImFcIlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIgICAgICAgIC5hbGlnbiA0XG4iICAgICAgICAKLSAgICAgICAgICAgICAgIiAgICAgICAgLmxvbmcgMWIsM2JcbiIgICAgICAgIAotICAgICAgICAgICAgICAiLnRleHQiICAgICAgICA6ICI9ciIoX19ndV9lcnIpLCAiPXEiIChfX2d1X3ZhbCk6ICJtIigoKihzdHJ1Y3QgX19sYXJnZV9zdHJ1Y3QgKikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoICAgX19ndV9hZGRyICAgKSkgKSwgImkiKC0gMTQgKSwgIjAiKCAgX19ndV9lcnIgICkpIDsgCi0gICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgCi0gICAgICAgICAgY2FzZSAyOiAKLSAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKAotICAgICAgICAgICAgICAiMTogICAgICBtb3YiICJ3IiAiICUyLCUiICJ3IiAiMVxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIyOlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIuc2VjdGlvbiAuZml4dXAsXCJheFwiXG4iICAgICAgICAKLSAgICAgICAgICAgICAgIjM6ICAgICAgbW92bCAlMywlMFxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIgICAgICAgIHhvciIgInciICIgJSIgInciICIxLCUiICJ3IiAiMVxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIgICAgICAgIGptcCAyYlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIuc2VjdGlvbiBfX2V4X3RhYmxlLFwiYVwiXG4iICAgICAgICAKLSAgICAgICAgICAgICAgIiAgICAgICAgLmFsaWduIDRcbiIgICAgICAgIAotICAgICAgICAgICAgICAiICAgICAgICAubG9uZyAxYiwzYlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIudGV4dCIgICAgICAgIDogIj1yIihfX2d1X2VyciksICI9ciIgKF9fZ3VfdmFsKSA6ICJtIigoKihzdHJ1Y3QgX19sYXJnZV9zdHJ1Y3QgKikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoICAgX19ndV9hZGRyICAgKSkgKSwgImkiKC0gMTQgKSwgIjAiKCAgX19ndV9lcnIgICkpOyAKLSAgICAgICAgICAgICAgYnJlYWs7ICAgICAgICAKLSAgICAgICAgICBjYXNlIDQ6IAotICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAKLSAgICAgICAgICAgICAgIjE6ICAgICAgbW92IiAibCIgIiAlMiwlIiAiIiAiMVxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIyOlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIuc2VjdGlvbiAuZml4dXAsXCJheFwiXG4iICAgICAgICAKLSAgICAgICAgICAgICAgIjM6ICAgICAgbW92bCAlMywlMFxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIgICAgICAgIHhvciIgImwiICIgJSIgIiIgIjEsJSIgIiIgIjFcbiIgICAgICAgIAotICAgICAgICAgICAgICAiICAgICAgICBqbXAgMmJcbiIgICAgICAgIAotICAgICAgICAgICAgICAiLnNlY3Rpb24gX19leF90YWJsZSxcImFcIlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIgICAgICAgIC5hbGlnbiA0XG4iICAgICAgICAiICAgICAgICAubG9uZyAxYiwzYlxuIiAgICAgICAgCi0gICAgICAgICAgICAgICIudGV4dCIgICAgICAgIDogIj1yIihfX2d1X2VyciksICI9ciIgKF9fZ3VfdmFsKSA6ICJtIigoKihzdHJ1Y3QgX19sYXJnZV9zdHJ1Y3QgKikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoICAgX19ndV9hZGRyICAgKSkgKSwgImkiKC0gMTQgKSwgIjAiKF9fZ3VfZXJyKSk7IAotICAgICAgICAgICAgICBicmVhazsgICAgICAgIAotICAgICAgICAgIGRlZmF1bHQ6IAotICAgICAgICAgICAgKF9fZ3VfdmFsKSA9IF9fZ2V0X3VzZXJfYmFkKCk7ICAgICAgICAKLSAgICAgICAgfSAgICAgICAgCi0gICAgICB9IHdoaWxlICgwKSA7ICAgICAgICAKLSAgICAoKGMpKSA9IChfX3R5cGVvZl9fKCooKGJ1ZikpKSlfX2d1X3ZhbDsgICAgICAgIAotICAgIF9fZ3VfZXJyOwotICB9Ci0pOwotCi1XT1chIEJsYWNrIEdDQy9hc3NlbWJseSBtYWdpYy4gVGhpcyBpcyBpbXBvc3NpYmxlIHRvIGZvbGxvdywgc28gbGV0J3MKLXNlZSB3aGF0IGNvZGUgZ2NjIGdlbmVyYXRlczoKLQotID4gICAgICAgICB4b3JsICVlZHgsJWVkeAotID4gICAgICAgICBtb3ZsIGN1cnJlbnRfc2V0LCVlYXgKLSA+ICAgICAgICAgY21wbCAkMjQsNzg4KCVlYXgpICAgICAgICAKLSA+ICAgICAgICAgamUgLkwxNDI0ICAgICAgICAKLSA+ICAgICAgICAgY21wbCAkLTEwNzM3NDE4MjUsNjQoJWVzcCkKLSA+ICAgICAgICAgamEgLkwxNDIzICAgICAgICAgICAgICAgIAotID4gLkwxNDI0OgotID4gICAgICAgICBtb3ZsICVlZHgsJWVheCAgICAgICAgICAgICAgICAgICAgICAgIAotID4gICAgICAgICBtb3ZsIDY0KCVlc3ApLCVlYngKLSA+ICNBUFAKLSA+IDE6ICAgICAgbW92YiAoJWVieCksJWRsICAgICAgICAgICAgICAgIC8qIHRoaXMgaXMgdGhlIGFjdHVhbCB1c2VyIGFjY2VzcyAqLwotID4gMjoKLSA+IC5zZWN0aW9uIC5maXh1cCwiYXgiCi0gPiAzOiAgICAgIG1vdmwgJC0xNCwlZWF4Ci0gPiAgICAgICAgIHhvcmIgJWRsLCVkbAotID4gICAgICAgICBqbXAgMmIKLSA+IC5zZWN0aW9uIF9fZXhfdGFibGUsImEiCi0gPiAgICA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ElEIG9mIHByb2Nlc3MgdHJhY2luZyB0aGlzIHByb2Nlc3MgKDAgaWYgbm90KQorIFVpZCAgICAgICAgICAgICAgICAgICAgICAgICBSZWFsLCBlZmZlY3RpdmUsIHNhdmVkIHNldCwgYW5kICBmaWxlIHN5c3RlbSBVSURzCisgR2lkICAgICAgICAgICAgICAgICAgICAgICAgIFJlYWwsIGVmZmVjdGl2ZSwgc2F2ZWQgc2V0LCBhbmQgIGZpbGUgc3lzdGVtIEdJRHMKKyBGRFNpemUgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyIG9mIGZpbGUgZGVzY3JpcHRvciBzbG90cyBjdXJyZW50bHkgYWxsb2NhdGVkCisgR3JvdXBzICAgICAgICAgICAgICAgICAgICAgIHN1cHBsZW1lbnRhcnkgZ3JvdXAgbGlzdAorIFZtUGVhayAgICAgICAgICAgICAgICAgICAgICBwZWFrIHZpcnR1YWwgbWVtb3J5IHNpemUKKyBWbVNpemUgICAgICAgICAgICAgICAgICAgICAgdG90YWwgcHJvZ3JhbSBzaXplCisgVm1MY2sgICAgICAgICAgICAgICAgICAgICAgIGxvY2tlZCBtZW1vcnkgc2l6ZQorIFZtSFdNICAgICAgICAgICAgICAgICAgICAgICBwZWFrIHJlc2lkZW50IHNldCBzaXplICgiaGlnaCB3YXRlciBtYXJrIikKKyBWbVJTUyAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiBtZW1vcnkgcG9ydGlvbnMKKyBWbURhdGEgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiBkYXRhLCBzdGFjaywgYW5kIHRleHQgc2VnbWVudHMKKyBWbVN0ayAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiBkYXRhLCBzdGFjaywgYW5kIHRleHQgc2VnbWVudHMKKyBWbUV4ZSAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiB0ZXh0IHNlZ21lbnQKKyBWbUxpYiAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSBvZiBzaGFyZWQgbGlicmFyeSBjb2RlCisgVm1QVEUgICAgICAgICAgICAgICAgICAgICAgIHNpemUgb2YgcGFnZSB0YWJsZSBlbnRyaWVzCisgVGhyZWFkcyAgICAgICAgICAgICAgICAgICAgIG51bWJlciBvZiB0aHJlYWRzCisgU2lnUSAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlciBvZiBzaWduYWxzIHF1ZXVlZC9tYXguIG51bWJlciBmb3IgcXVldWUKKyBTaWdQbmQgICAgICAgICAgICAgICAgICAgICAgYml0bWFwIG9mIHBlbmRpbmcgc2lnbmFscyBmb3IgdGhlIHRocmVhZAorIFNoZFBuZCAgICAgICAgICAgICAgICAgICAgICBiaXRtYXAgb2Ygc2hhcmVkIHBlbmRpbmcgc2lnbmFscyBmb3IgdGhlIHByb2Nlc3MKKyBTaWdCbGsgICAgICAgICAgICAgICAgICAgICAgYml0bWFwIG9mIGJsb2NrZWQgc2lnbmFscworIFNpZ0lnbiAgICAgICAgICAgICAgICAgICAgICBiaXRtYXAgb2YgaWdub3JlZCBzaWduYWxzCisgU2lnQ2d0ICAgICAgICAgICAgICAgICAgICAgIGJpdG1hcCBvZiBjYXRjaGVkIHNpZ25hbHMKKyBDYXBJbmggICAgICAgICAgICAgICAgICAgICAgYml0bWFwIG9mIGluaGVyaXRhYmxlIGNhcGFiaWxpdGllcworIENhcFBybSAgICAgICAgICAgICAgICAgICAgICBiaXRtYXAgb2YgcGVybWl0dGVkIGNhcGFiaWxpdGllcworIENhcEVmZiAgICAgICAgICAgICAgICAgICAgICBiaXRtYXAgb2YgZWZmZWN0aXZlIGNhcGFiaWxpdGllcworIENhcEJuZCAgICAgICAgICAgICAgICAgICAgICBiaXRtYXAgb2YgY2FwYWJpbGl0aWVzIGJvdW5kaW5nIHNldAorIENwdXNfYWxsb3dlZCAgICAgICAgICAgICAgICBtYXNrIG9mIENQVXMgb24gd2hpY2ggdGhpcyBwcm9jZXNzIG1heSBydW4KKyBDcHVzX2FsbG93ZWRfbGlzdCAgICA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5b3VyCiBzeXN0ZW0uIEl0ICBkZXBlbmRzICBvbiB0aGUga2VybmVsIGNvbmZpZ3VyYXRpb24gYW5kIHRoZSBsb2FkZWQgbW9kdWxlcywgd2hpY2gKIGZpbGVzIGFyZSB0aGVyZSwgYW5kIHdoaWNoIGFyZSBtaXNzaW5nLgogCi1UYWJsZSAxLTQ6IEtlcm5lbCBpbmZvIGluIC9wcm9jCitUYWJsZSAxLTU6IEtlcm5lbCBpbmZvIGluIC9wcm9jCiAuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4KICBGaWxlICAgICAgICBDb250ZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogIGFwbSAgICAgICAgIEFkdmFuY2VkIHBvd2VyIG1hbmFnZW1lbnQgaW5mbyAgICAgICAgICAgICAgICAgICAgCkBAIC0yODMsNiArNDIxLDcgQEAKICBydGMgICAgICAgICBSZWFsIHRpbWUgY2xvY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogIHNjc2kgICAgICAgIFNDU0kgaW5mbyAoc2VlIHRleHQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgc2xhYmluZm8gICAgU2xhYiBwb29sIGluZm8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyBzb2Z0aXJxcyAgICBzb2Z0aXJxIHVzYWdlCiAgc3RhdCAgICAgICAgT3ZlcmFsbCBzdGF0aXN0aWNzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICBzd2FwcyAgICAgICBTd2FwIHNwYWNlIHV0aWxpemF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogIHN5cyAgICAgICAgIFNlZSBjaGFwdGVyIDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCkBAIC01OTcsNiArNzM2LDI1IEBACiAweGZmZmZmZmZmYTAwMTcwMDAtMHhmZmZmZmZmZmEwMDIyMDAwICAgNDUwNTYgc3lzX2luaXRfbW9kdWxlKzB4YzI3LzB4MWQwMCAuLi4KICAgIHBhZ2VzPTEwIHZtYWxsb2MgTjA9MTAKIAorLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uCisKK3NvZnRpcnFzOgorCitQcm92aWRlcyBjb3VudHMgb2Ygc29mdGlycSBoYW5kbGVycyBzZXJ2aWNlZCBzaW5jZSBib290IHRpbWUsIGZvciBlYWNoIGNwdS4KKworPiBjYXQgL3Byb2Mvc29mdGlycXMKKyAgICAgICAgICAgICAgICBDUFUwICAgICAgIENQVTEgICAgICAgQ1BVMiAgICAgICBDUFUzCisgICAgICBISTogICAgICAgICAgMCAgICAgICAgICAwICAgICAgICAgIDAgICAgICAgICAgMAorICAgVElNRVI6ICAgICAgMjcxNjYgICAgICAyNzEyMCAgICAgIDI3MDk3ICAgICAgMjcwMzQKKyAgTkVUX1RYOiAgICAgICAgICAwICAgICAgICAgIDAgICAgICAgICAgMCAgICAgICAgIDE3CisgIE5FVF9SWDogICAgICAgICA0MiAgICAgICAgICAwICAgICAgICAgIDAgICAgICAgICAzOQorICAgQkxPQ0s6ICAgICAgICAgIDAgICAgICAgICAgMCAgICAgICAgMTA3ICAgICAgIDExMjEKKyBUQVNLTEVUOiAgICAgICAgICAwICAgICAgICAgIDAgICAgICAgICAgMCAgICAgICAgMjkwCisgICBTQ0hFRDogICAgICAyNzAzNSAgICAgIDI2OTgzICAgICAgMjY5NzEgICAgICAyNjc0NgorIEhSVElNRVI6ICAgICAgICAgIDAgICAgICAgICAgMCAgICAgICAgICAwICAgICAgICAgIDAKKyAgICAgUkNVOiAgICAgICAxNjc4ICAgICAgIDE3NjkgICAgICAgMjE3OCAgICAgICAyMjUwCisKKwogMS4zIEl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lZnQgdGhhdCBwYWdlLgorCitBIHNhbXBsZSBvZiBob3cgdGhlIHJlYWRlciBwYWdlIGlzIHN3YXBwZWQ6IE5vdGUgdGhpcyBkb2VzIG5vdAorc2hvdyB0aGUgaGVhZCBwYWdlIGluIHRoZSBidWZmZXIsIGl0IGlzIGZvciBkZW1vbnN0cmF0aW5nIGEgc3dhcAorb25seS4KKworICArLS0tLS0tKworICB8cmVhZGVyfCAgICAgICAgICBSSU5HIEJVRkZFUgorICB8cGFnZSAgfAorICArLS0tLS0tKworICAgICAgICAgICAgICAgICAgKy0tLSsgICArLS0tKyAgICstLS0rCisgICAgICAgICAgICAgICAgICB8ICAgfC0tPnwgICB8LS0+fCAgIHwKKyAgICAgICAgICAgICAgICAgIHwgICB8PC0tfCAgIHw8LS18ICAgfAorICAgICAgICAgICAgICAgICAgKy0tLSsgICArLS0tKyAgICstLS0rCisgICAgICAgICAgICAgICAgICAgXiB8ICAgICAgICAgICAgIF4gfAorICAgICAgICAgICAgICAgICAgIHwgKy0tLS0tLS0tLS0tLS0rIHwKKyAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0rCisKKworICArLS0tLS0tKworICB8cmVhZGVyfCAgICAgICAgICBSSU5HIEJVRkZFUgorICB8cGFnZSAgfC0tLS0tLS0tLS0tLS0tLS0tLS0rCisgICstLS0tLS0rICAgICAgICAgICAgICAgICAgIHYKKyAgICB8ICAgICAgICAgICAgICstLS0rICAgKy0tLSsgICArLS0tKworICAgIHwgICAgICAgICAgICAgfCAgIHwtLT58ICAgfC0tPnwgICB8CisgICAgfCAgICAgICAgICAgICB8ICAgfDwtLXwgICB8PC0tfCAgIHw8LSsKKyAgICB8ICAgICAgICAgICAgICstLS0rICAgKy0tLSsgICArLS0tKyAgfAorICAgIHwgICAgICAgICAgICAgIF4gfCAgICAgICAgICAgICBeIHwgICB8CisgICAgfCAgICAgICAgICAgICAgfCArLS0tLS0tLS0tLS0tLSsgfCAgIHwKKyAgICB8ICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0rICAgfAorICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCisKKyAgKy0tLS0tLSsKKyAgfHJlYWRlcnwgICAgICAgICAgUklORyBCVUZGRVIKKyAgfHBhZ2UgIHwtLS0tLS0tLS0tLS0tLS0tLS0tKworICArLS0tLS0tKyA8LS0tLS0tLS0tLS0tLS0tKyB2CisgICAgfCAgXiAgICAgICAgICArLS0tKyAgICstLS0rICAgKy0tLSsKKyAgICB8ICB8ICAgICAgICAgIHwgICB8LS0+fCAgIHwtLT58ICAgfAorICAgIHwgIHwgICAgICAgICAgfCAgIHwgICB8ICAgfDwtLXwgICB8PC0rCisgICAgfCAgfCAgICAgICAgICArLS0tKyAgICstLS0rICAgKy0tLSsgIHwKKyAgICB8ICB8ICAgICAgICAgICAgIHwgICAgICAgICAgICAgXiB8ICAgfAorICAgIHwgIHwgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0rIHwgICB8CisgICAgfCAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgIHwKKyAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworCisgICstLS0tLS0rCisgIHxidWZmZXJ8ICAgICAgICAgIFJJTkcgQlVGRkVSCisgIHxwYWdlICB8LS0tLS0tLS0tLS0tLS0tLS0tLSsKKyAgKy0tLS0tLSsgPC0tLS0tLS0tLS0tLS0tLSsgdgorICAgIHwgIF4gICAgICAgICAgKy0tLSsgICArLS0tKyAgICstLS0rCisgICAgfCAgfCAgICAgICAgICB8ICAgfCAgIHwgICB8LS0+fCAgIHwKKyAgICB8ICB8ICBOZXcgICAgIHwgICB8ICAgfCAgIHw8LS18ICAgfDwtKworICAgIHwgIHwgUmVhZGVyICAgKy0tLSsgICArLS0tKyAgICstLS0rICB8CisgICAgfCAgfCAgcGFnZSAtLS0tXiAgICAgICAgICAgICAgICAgfCAgIHwKKyAgICB8ICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgfAorICAgIHwgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICB8CisgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKKworCisKK0l0IGlzIHBvc3NpYmxlIHRoYXQgdGhlIHBhZ2Ugc3dhcHBlZCBpcyB0aGUgY29tbWl0IHBhZ2UgYW5kIHRoZSB0YWlsIHBhZ2UsCitpZiB3aGF0IGlzIGluIHRoZSByaW5nIGJ1ZmZlciBpcyBsZXNzIHRoYW4gd2hhdCBpcyBoZWxkIGluIGEgYnVmZmVyIHBhZ2UuCisKKworICAgICAgICAgIHJlYWRlciBwYWdlICAgIGNvbW1pdCBwYWdlICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfAorICAgICAgICAgICAgICB2ICAgICAgICAgICAgICB8ICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICArLS0tKyAgICAgICAgICAgfCAgICAgICAgICAgICB8CisgICAgICAgICAgICAgfCAgIHw8LS0tLS0tLS0tLSsgICAgICAgICAgICAgfAorICAgICAgICAgICAgIHwgICB8PC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICB8ICAgfC0tLS0tLSsKKyAgICAgICAgICAgICArLS0tKyAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKK1RoaXMgY2FzZSBpcyBzdGlsbCB2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xsIGZhaWwuCisKK092ZXJ3cml0ZSBtb2RlOgorCisgICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisgICAgICAgICAgICAgICAgICAgICAgICBeCisgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgIGhlYWQgcGFnZQorCisKKyAgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCBwYWdlCisKKworICAgICAgICAgICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgIC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QgYnkgdGhlc2UgdHdvIGJpdHM6CisKKyAgIEhFQURFUiAtIHRoZSBwYWdlIGJlaW5nIHBvaW50ZWQgdG8gaXMgYSBoZWFkIHBhZ2UKKworICAgVVBEQVRFIC0gdGhlIHBhZ2UgYmVpbmcgcG9pbnRlZCB0byBpcyBiZWluZyB1cGRhdGVkIGJ5IGEgd3JpdGVyCisgICAgICAgICAgYW5kIHdhcyBvciBpcyBhYm91dCB0byBiZSBhIGhlYWQgcGFnZS4KKworCisgICAgICAgICAgcmVhZGVyIHBhZ2UKKyAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICB2CisgICAgICAgICAgICAgKy0tLSsKKyAgICAgICAgICAgICB8ICAgfC0tLS0tLSsKKyAgICAgICAgICAgICArLS0tKyAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LUgtPnwgICB8LS0tPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKKworVGhlIGFib3ZlIHBvaW50ZXIgIi1ILT4iIHdvdWxkIGhhdmUgdGhlIEhFQURFUiBmbGFnIHNldC4gVGhhdCBpcwordGhlIG5leHQgcGFnZSBpcyB0aGUgbmV4dCBwYWdlIHRvIGJlIHN3YXBwZWQgb3V0IGJ5IHRoZSByZWFkZXIuCitUaGlzIHBvaW50ZXIgbWVhbnMgdGhlIG5leHQgcGFnZSBpcyB0aGUgaGVhZCBwYWdlLgorCitXaGVuIHRoZSB0YWlsIHBhZ2UgbWVldHMgdGhlIGhlYWQgcG9pbnRlciwgaXQgd2lsbCB1c2UgY21weGNoZyB0bworY2hhbmdlIHRoZSBwb2ludGVyIHRvIHRoZSBVUERBVEUgc3RhdGU6CisKKworICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1ILT58ICAgfC0tLT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCisgICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LVUtPnwgICB8LS0tPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKKyItVS0+IiByZXByZXNlbnRzIGEgcG9pbnRlciBpbiB0aGUgVVBEQVRFIHN0YXRlLgorCitBbnkgYWNjZXNzIHRvIHRoZSByZWFkZXIgd2lsbCBuZWVkIHRvIHRha2Ugc29tZSBzb3J0IG9mIGxvY2sgdG8gc2VyaWFsaXplCit0aGUgcmVhZGVycy4gQnV0IHRoZSB3cml0ZXJzIHdpbGwgbmV2ZXIgdGFrZSBhIGxvY2sgdG8gd3JpdGUgdG8gdGhlCityaW5nIGJ1ZmZlci4gVGhpcyBtZWFucyB3ZSBvbmx5IG5lZWQgdG8gd29ycnkgYWJvdXQgYSBzaW5nbGUgcmVhZGVyLAorYW5kIHdyaXRlcyBvbmx5IHByZWVtcHQgaW4gInN0YWNrIiBmb3JtYXRpb24uCisKK1doZW4gdGhlIHJlYWRlciB0cmllcyB0byBzd2FwIHRoZSBwYWdlIHdpdGggdGhlIHJpbmcgYnVmZmVyLCBpdAord2lsbCBhbHNvIHVzZSBjbXB4Y2hnLiBJZiB0aGUgZmxhZyBiaXQgaW4gdGhlIHBvaW50ZXIgdG8gdGhlCitoZWFkIHBhZ2UgZG9lcyBub3QgaGF2ZSB0aGUgSEVBREVSIGZsYWcgc2V0LCB0aGUgY29tcGFyZSB3aWxsIGZhaWwKK2FuZCB0aGUgcmVhZGVyIHdpbGwgbmVlZCB0byBsb29rIGZvciB0aGUgbmV3IGhlYWQgcGFnZSBhbmQgdHJ5IGFnYWluLgorTm90ZSwgdGhlIGZsYWcgVVBEQVRFIGFuZCBIRUFERVIgYXJlIG5ldmVyIHNldCBhdCB0aGUgc2FtZSB0aW1lLgorCitUaGUgcmVhZGVyIHN3YXBzIHRoZSByZWFkZXIgcGFnZSBhcyBmb2xsb3dzOgorCisgICstLS0tLS0rCisgIHxyZWFkZXJ8ICAgICAgICAgIFJJTkcgQlVGRkVSCisgIHxwYWdlICB8CisgICstLS0tLS0rCisgICAgICAgICAgICAgICAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworICAgICAgICAgICAgICAgICAgfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwKKyAgICAgICAgICAgICAgICAgIHwgICB8PC0tLXwgICB8PC0tLXwgICB8CisgICAgICAgICAgICAgICAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworICAgICAgICAgICAgICAgICAgIF4gfCAgICAgICAgICAgICAgIF4gfAorICAgICAgICAgICAgICAgICAgIHwgKy0tLS0tLS0tLS0tLS0tLSsgfAorICAgICAgICAgICAgICAgICAgICstLS0tLUgtLS0tLS0tLS0tLS0tKworCitUaGUgcmVhZGVyIHNldHMgdGhlIHJlYWRlciBwYWdlIG5leHQgcG9pbnRlciBhcyBIRUFERVIgdG8gdGhlIHBhZ2UgYWZ0ZXIKK3RoZSBoZWFkIHBhZ2UuCisKKworICArLS0tLS0tKworICB8cmVhZGVyfCAgICAgICAgICBSSU5HIEJVRkZFUgorICB8cGFnZSAgfC0tLS0tLS1ILS0tLS0tLS0tLS0rCisgICstLS0tLS0rICAgICAgICAgICAgICAgICAgIHYKKyAgICB8ICAgICAgICAgICAgICstLS0rICAgICstLS0rICAgICstLS0rCisgICAgfCAgICAgICAgICAgICB8ICAgfC0tLT58ICAgfC0tLT58ICAgfAorICAgIHwgICAgICAgICAgICAgfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LSsKKyAgICB8ICAgICAgICAgICAgICstLS0rICAgICstLS0rICAgICstLS0rICB8CisgICAgfCAgICAgICAgICAgICAgXiB8ICAgICAgICAgICAgICAgXiB8ICAgfAorICAgIHwgICAgICAgICAgICAgIHwgKy0tLS0tLS0tLS0tLS0tLSsgfCAgIHwKKyAgICB8ICAgICAgICAgICAgICArLS0tLS1ILS0tLS0tLS0tLS0tLSsgICB8CisgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworCitJdCBkb2VzIGEgY21weGNoZyB3aXRoIHRoZSBwb2ludGVyIHRvIHRoZSBwcmV2aW91cyBoZWFkIHBhZ2UgdG8gbWFrZSBpdAorcG9pbnQgdG8gdGhlIHJlYWRlciBwYWdlLiBOb3RlIHRoYXQgdGhlIG5ldyBwb2ludGVyIGRvZXMgbm90IGhhdmUgdGhlIEhFQURFUgorZmxhZyBzZXQuICBUaGlzIGFjdGlvbiBhdG9taWNhbGx5IG1vdmVzIHRoZSBoZWFkIHBhZ2UgZm9yd2FyZC4KKworICArLS0tLS0tKworICB8cmVhZGVyfCAgICAgICAgICBSSU5HIEJVRkZFUgorICB8cGFnZSAgfC0tLS0tLS1ILS0tLS0tLS0tLS0rCisgICstLS0tLS0rICAgICAgICAgICAgICAgICAgIHYKKyAgICB8ICBeICAgICAgICAgICstLS0rICAgKy0tLSsgICArLS0tKworICAgIHwgIHwgICAgICAgICAgfCAgIHwtLT58ICAgfC0tPnwgICB8CisgICAgfCAgfCAgICAgICAgICB8ICAgfDwtLXwgICB8PC0tfCAgIHw8LSsKKyAgICB8ICB8ICAgICAgICAgICstLS0rICAgKy0tLSsgICArLS0tKyAgfAor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KyAgICArLS0tKworCitUaGUgZm9sbG93aW5nIHBhZ2Ugd2lsbCBiZSBtYWRlIGludG8gdGhlIG5ldyBoZWFkIHBhZ2UuCisKKyAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC1ILT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitBZnRlciB0aGUgbmV3IGhlYWQgcGFnZSBoYXMgYmVlbiBzZXQsIHdlIGNhbiBzZXQgdGhlIG9sZCBoZWFkIHBhZ2UKK3BvaW50ZXIgYmFjayB0byBOT1JNQUwuCisKKyAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC0tLT58ICAgfC1ILT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitBZnRlciB0aGUgaGVhZCBwYWdlIGhhcyBiZWVuIG1vdmVkLCB0aGUgdGFpbCBwYWdlIG1heSBub3cgbW92ZSBmb3J3YXJkLgorCisgICAgICAgICAgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtSC0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8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GVjdGVkCitwYWdlLiBJZiB0aGlzIGZhaWxzLCBhIG5lc3RlZCB3cml0ZSBwdXNoZWQgaXQgZm9yd2FyZCwgdGhlIHRoZSBjdXJyZW50IHdyaXRlCitkb2VzIG5vdCBuZWVkIHRvIHB1c2ggaXQuCisKKworICAgICAgICAgICB0ZW1wIHBhZ2UKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHYKKyAgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworTmVzdGVkIHdyaXRlIGNvbWVzIGluIGFuZCBtb3ZlcyB0aGUgdGFpbCBwYWdlIGZvcndhcmQ6CisKKyAgICAgICAgICAgICAgICAgICAgdGFpbCBwYWdlIChtb3ZlZCBieSBuZXN0ZWQgd3JpdGVyKQorICAgICAgICAgICAgdGVtcCBwYWdlICAgfAorICAgICAgICAgICAgICAgfCAgICAgICAgfAorICAgICAgICAgICAgICAgdiAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworVGhlIGFib3ZlIHdvdWxkIGZhaWwgdGhlIGNtcHhjaGcsIGJ1dCBzaW5jZSB0aGUgdGFpbCBwYWdlIGhhcyBhbHJlYWR5CitiZWVuIG1vdmVkIGZvcndhcmQsIHRoZSB3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IHRoZSBVUERBVEUgZmxhZyBpbnN0ZWFkIG9mIGEgSEVBREVSIG9yIE5PUk1BTAorcG9pbnRlci4KKworVGhlIG5lc3RlZCB3cml0ZXIgd2lsbCBzZXQgdGhlIG5ldyBoZWFkIHBhZ2UgcG9pbnRlci4KKworICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LVUtPnwgICB8LUgtPnwgICB8LS0tPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKK0J1dCBpdCB3aWxsIG5vdCByZXNldCB0aGUgdXBkYXRlIGJhY2sgdG8gbm9ybWFsLiBPbmx5IHRoZSB3cml0ZXIKK3RoYXQgY29udmVydGVkIGEgcG9pbnRlciBmcm9tIEhFQUQgdG8gVVBEQVRFIHdpbGwgY29udmVydCBpdCBiYWNrCit0byBOT1JNQUwuCisKKyAgICAgICAgICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC1ILT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitBZnRlciB0aGUgbmVzdGVkIHdyaXRlciBmaW5pc2hlcywgdGhlIG91dGVyIG1vc3Qgd3JpdGVyIHdpbGwgY29udmVydAordGhlIFVQREFURSBwb2ludGVyIHRvIE5PUk1BTC4KKworCisgICAgICAgICAgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtLS0+fCAgIHwtSC0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworCitJdCBjYW4gYmUgZXZlbiBtb3JlIGNvbXBsZXggaWYgc2V2ZXJhbCBuZXN0ZWQgd3JpdGVzIGNhbWUgaW4gYW5kIG1vdmVkCit0aGUgdGFpbCBwYWdlIGFoZWFkIHNldmVyYWwgcGFnZXM6CisKKworKGZpcnN0IHdyaXRlcikKKworICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1ILT58ICAgfC0tLT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitUaGUgd3JpdGUgY29udmVydHMgdGhlIGhlYWQgcGFnZSBwb2ludGVyIHRvIFVQREFURS4KKworICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC0tLT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitOZXh0IHdyaXRlciBjb21lcyBpbiwgYW5kIHNlZXMgdGhlIHVwZGF0ZSBhbmQgc2V0cyB1cCB0aGUgbmV3CitoZWFkIHBhZ2UuCisKKyhzZWNvbmQgd3JpdGVyKQorCisgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtVS0+fCAgIHwtSC0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworVGhlIG5lc3RlZCB3cml0ZXIgbW92ZXMgdGhlIHRhaWwgcGFnZSBmb3J3YXJkLiBCdXQgZG9lcyBub3Qgc2V0IHRoZSBvbGQKK3VwZGF0ZSBwYWdlIHRvIE5PUk1BTCBiZWNhdXNlIGl0IGlzIG5vdCB0aGUgb3V0ZXIgbW9zdCB3cml0ZXIuCisKKyAgICAgICAgICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC1ILT58ICAgfC0tLT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitBbm90aGVyIHdyaXRlciBwcmVlbXB0cyBhbmQgc2VlcyB0aGUgcGFnZSBhZnRlciB0aGUgdGFpbCBwYWdlIGlzIGEgaGVhZCBwYWdlLgorSXQgY2hhbmdlcyBpdCBmcm9tIEhFQUQgdG8gVVBEQVRFLgorCisodGhpcmQgd3JpdGVyKQorCisgICAgICAgICAgICAgICAgICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtVS0+fCAgIHwtVS0+fCAgIHwtLS0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworVGhlIHdyaXRlciB3aWxsIG1vdmUgdGhlIGhlYWQgcGFnZSBmb3J3YXJkOgorCisKKyh0aGlyZCB3cml0ZXIpCisKKyAgICAgICAgICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC1VLT58ICAgfC1ILT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCitCdXQgbm93IHRoYXQgdGhlIHRoaXJkIHdyaXRlciBkaWQgY2hhbmdlIHRoZSBIRUFEIGZsYWcgdG8gVVBEQVRFIGl0Cit3aWxsIGNvbnZlcnQgaXQgdG8gbm9ybWFsOgorCisKKyh0aGlyZCB3cml0ZXIpCisKKyAgICAgICAgICAgICAgICAgICAgdGFpbCBwYWdlCisgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICB2CisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKzwtLS18ICAgfC0tLT58ICAgfC1VLT58ICAgfC0tLT58ICAgfC1ILT4KKy0tLT58ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS18ICAgfDwtLS0KKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworCisKK1RoZW4gaXQgd2lsbCBtb3ZlIHRoZSB0YWlsIHBhZ2UsIGFuZCByZXR1cm4gYmFjayB0byB0aGUgc2Vjb25kIHdyaXRlci4KKworCisoc2Vjb25kIHdyaXRlcikKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LVUtPnwgICB8LS0tPnwgICB8LUgtPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKKworVGhlIHNlY29uZCB3cml0ZXIgd2lsbCBmYWlsIHRvIG1vdmUgdGhlIHRhaWwgcGFnZSBiZWNhdXNlIGl0IHdhcyBhbHJlYWR5Cittb3ZlZCwgc28gaXQgd2lsbCB0cnkgYWdhaW4gYW5kIGFkZCBpdHMgZGF0YSB0byB0aGUgbmV3IHRhaWwgcGFnZS4KK0l0IHdpbGwgcmV0dXJuIHRvIHRoZSBmaXJzdCB3cml0ZXIuCisKKworKGZpcnN0IHdyaXRlcikKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LVUtPnwgICB8LS0tPnwgICB8LUgtPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKK1RoZSBmaXJzdCB3c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yAgICAgICAgICAgICAgIHYgICAgICAgIHYgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LVUtPnwgICB8LUgtPnwgICB8LUgtPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKK0lmIHRhaWwgcGFnZSAhPSBBIGFuZCB0YWlsIHBhZ2UgZG9lcyBub3QgZXF1YWwgQiwgdGhlbiBpdCBtdXN0IHJlc2V0IHRoZQorcG9pbnRlciBiYWNrIHRvIE5PUk1BTC4gVGhlIGZhY3QgdGhhdCBpdCBvbmx5IG5lZWRzIHRvIHdvcnJ5IGFib3V0CituZXN0ZWQgd3JpdGVycywgaXQgb25seSBuZWVkcyB0byBjaGVjayB0aGlzIGFmdGVyIHNldHRpbmcgdGhlIEhFQUQgcGFnZS4KKworCisoZmlyc3Qgd3JpdGVyKQorCisgICAgICAgICAgICAgICBBICAgICAgICBCICAgIHRhaWwgcGFnZQorICAgICAgICAgICAgICAgfCAgICAgICAgfCAgICAgICAgfAorICAgICAgICAgICAgICAgdiAgICAgICAgdiAgICAgICAgdgorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCis8LS0tfCAgIHwtLS0+fCAgIHwtVS0+fCAgIHwtLS0+fCAgIHwtSC0+CistLS0+fCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tfCAgIHw8LS0tCisgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsgICAgKy0tLSsKKworTm93IHRoZSB3cml0ZXIgY2FuIHVwZGF0ZSB0aGUgaGVhZCBwYWdlLiBUaGlzIGlzIGFsc28gd2h5IHRoZSBoZWFkIHBhZ2UgbXVzdAorcmVtYWluIGluIFVQREFURSBhbmQgb25seSByZXNldCBieSB0aGUgb3V0ZXIgbW9zdCB3cml0ZXIuIFRoaXMgcHJldmVudHMKK3RoZSByZWFkZXIgZnJvbSBzZWVpbmcgdGhlIGluY29ycmVjdCBoZWFkIHBhZ2UuCisKKworKGZpcnN0IHdyaXRlcikKKworICAgICAgICAgICAgICAgQSAgICAgICAgQiAgICB0YWlsIHBhZ2UKKyAgICAgICAgICAgICAgIHwgICAgICAgIHwgICAgICAgIHwKKyAgICAgICAgICAgICAgIHYgICAgICAgIHYgICAgICAgIHYKKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKyAgICArLS0tKworPC0tLXwgICB8LS0tPnwgICB8LS0tPnwgICB8LS0tPnwgICB8LUgtPgorLS0tPnwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLXwgICB8PC0tLQorICAgICstLS0rICAgICstLS0rICAgICstLS0rICAgICstLS0rCisKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vdmlkZW80bGludXgvQ0FSRExJU1QuY3g4OCBiL0RvY3VtZW50YXRpb24vdmlkZW80bGludXgvQ0FSRExJU1QuY3g4OAppbmRleCA4OTA5M2Y1Li4wNzM2NTE4IDEwMDY0NAotLS0gYS9Eb2N1bWVudGF0aW9uL3ZpZGVvNGxpbnV4L0NBUkRMSVNULmN4ODgKKysrIGIvRG9jdW1lbnRhdGlvbi92aWRlbzRsaW51eC9DQVJETElTVC5jeDg4CkBAIC02LDggKzYsOCBAQAogICA1IC0+IExlYWR0ZWsgV2luZmFzdCAyMDAwWFAgRXhwZXJ0ICAgICAgICAgICAgICAgICAgICAgICBbMTA3ZDo2NjExLDEwN2Q6NjYxM10KICAgNiAtPiBBdmVyVFYgU3R1ZGlvIDMwMyAoTTEyNikgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzE0NjE6MDAwYl0KICAgNyAtPiBNU0kgVFYtQG55d2hlcmUgTWFzdGVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzE0NjI6ODYwNl0KLSAgOCAtPiBMZWFkdGVrIFdpbmZhc3QgRFYyMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzEwN2Q6NjYyMF0KLSAgOSAtPiBMZWFkdGVrIFBWUiAyMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzEwN2Q6NjYzYiwxMDdkOjY2M2MsMTA3ZDo2NjMyXQorICA4IC0+IExlYWR0ZWsgV2luZmFzdCBEVjIwMDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTA3ZDo2NjIwLDEwN2Q6NjYyMV0KKyAgOSAtPiBMZWFkdGVrIFBWUiAyMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzEwN2Q6NjYzYiwxMDdkOjY2M2MsMTA3ZDo2NjMyLDEwN2Q6NjYzMCwxMDdkOjY2MzgsMTA3ZDo2NjMxLDEwN2Q6NjYzNywxMDdkOjY2M2RdCiAgMTAgLT4gSU9EQVRBIEdWLVZDUDMvUENJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsxMGZjOmQwMDNdCiAgMTEgLT4gUHJvbGluayBQbGF5VFYgUFZSCiAgMTIgLT4gQVNVUyBQVlItNDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsxMDQzOjQ4MjMsMTQ2MTpjMTExXQpAQCAtNTksNyArNTksNyBAQAogIDU4IC0+IFBpbm5hY2xlIFBDVFYgSEQgODAwaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTFiZDowMDUxXQogIDU5IC0+IERWaUNPIEZ1c2lvbkhEVFYgNSBQQ0kgbmFubyAgICAgICAgICAgICAgICAgICAgICAgICBbMThhYzpkNTMwXQogIDYwIC0+IFBpbm5hY2xlIEh5YnJpZCBQQ1RWICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTJhYjoxNzg4XQotIDYxIC0+IFdpbmZhc3QgVFYyMDAwIFhQIEdsb2JhbCAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTA3ZDo2ZjE4XQorIDYxIC0+IExlYWR0ZWsgVFYyMDA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b3csIHRoZSBocHdkdCBjYW4gc3VjY2Vzc2Z1bGx5IHJlY2VpdmUgYW5kIHNvdXJjZSB0aGUgTk1JIGFuZCBwcm92aWRlIGEgbG9nCisgbWVzc2FnZSB0aGF0IGRldGFpbHMgdGhlIHJlYXNvbiBmb3IgdGhlIE5NSSAoYXMgZGV0ZXJtaW5lZCBieSB0aGUgSFAgQklPUykuCisKKyBCZWxvdyBpcyBhIGxpc3Qgb2YgTk1JcyB0aGUgSFAgQklPUyB1bmRlcnN0YW5kcyBhbG9uZyB3aXRoIHRoZSBhc3NvY2lhdGVkCisgY29kZSAocmVhc29uKToKKworCU5vIHNvdXJjZSBmb3VuZCAgICAgICAgICAgICAgICAwMGgKKworCVVuY29ycmVjdGFibGUgTWVtb3J5IEVycm9yICAgICAwMWgKKworCUFTUiBOTUkgICAgICAgICAgICAgICAgICAgICAgICAxQmgKKworCVBDSSBQYXJpdHkgRXJyb3IgICAgICAgICAgICAgICAyMGgKKworCU5NSSBCdXR0b24gUHJlc3MgICAgICAgICAgICAgICAyN2gKKworCVNCX0JVU19OTUkgICAgICAgICAgICAgICAgICAgICAyOGgKKworCUlMTyBEb29yYmVsbCBOTUkgICAgICAgICAgICAgICAyOWgKKworCUlMTyBJT1AgTk1JICAgICAgICAgICAgICAgICAgICAyQWgKKworCUlMTyBXYXRjaGRvZyBOTUkgICAgICAgICAgICAgICAyQmgKKworCVByb2MgVGhyb3QgTk1JICAgICAgICAgICAgICAgICAyQ2gKKworCUZyb250IFNpZGUgQnVzIE5NSSAgICAgICAgICAgICAyRGgKKworCVBDSSBFeHByZXNzIEVycm9yICAgICAgICAgICAgICAyRmgKKworCURNQSBjb250cm9sbGVyIE5NSSAgICAgICAgICAgICAzMGgKKworCUh5cGVydHJhbnNwb3J0L0NTSSBFcnJvciAgICAgICAzMWgKKworCisKKyAtLSBUb20gTWluZ2FyZWxsaQorICAgICh0aG9tYXMubWluZ2FyZWxsaUBocC5jb20pCmRpZmYgLS1naXQgYS9Eb2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VwLFwiYXhcIlxuIgorICAgICAgICAgICAgICAiMzogICAgICBtb3ZsICUzLCUwXG4iCisgICAgICAgICAgICAgICIgICAgICAgIHhvciIgImIiICIgJSIgImIiICIxLCUiICJiIiAiMVxuIgorICAgICAgICAgICAgICAiICAgICAgICBqbXAgMmJcbiIKKyAgICAgICAgICAgICAgIi5zZWN0aW9uIF9fZXhfdGFibGUsXCJhXCJcbiIKKyAgICAgICAgICAgICAgIiAgICAgICAgLmFsaWduIDRcbiIKKyAgICAgICAgICAgICAgIiAgICAgICAgLmxvbmcgMWIsM2JcbiIKKyAgICAgICAgICAgICAgIi50ZXh0IiAgICAgICAgOiAiPXIiKF9fZ3VfZXJyKSwgIj1xIiAoX19ndV92YWwpOiAibSIoKCooc3RydWN0IF9fbGFyZ2Vfc3RydWN0ICopCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCAgIF9fZ3VfYWRkciAgICkpICksICJpIigtIDE0ICksICIwIiggIF9fZ3VfZXJyICApKSA7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIGNhc2UgMjoKKyAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKAorICAgICAgICAgICAgICAiMTogICAgICBtb3YiICJ3IiAiICUyLCUiICJ3IiAiMVxuIgorICAgICAgICAgICAgICAiMjpcbiIKKyAgICAgICAgICAgICAgIi5zZWN0aW9uIC5maXh1cCxcImF4XCJcbiIKKyAgICAgICAgICAgICAgIjM6ICAgICAgbW92bCAlMywlMFxuIgorICAgICAgICAgICAgICAiICAgICAgICB4b3IiICJ3IiAiICUiICJ3IiAiMSwlIiAidyIgIjFcbiIKKyAgICAgICAgICAgICAgIiAgICAgICAgam1wIDJiXG4iCisgICAgICAgICAgICAgICIuc2VjdGlvbiBfX2V4X3RhYmxlLFwiYVwiXG4iCisgICAgICAgICAgICAgICIgICAgICAgIC5hbGlnbiA0XG4iCisgICAgICAgICAgICAgICIgICAgICAgIC5sb25nIDFiLDNiXG4iCisgICAgICAgICAgICAgICIudGV4dCIgICAgICAgIDogIj1yIihfX2d1X2VyciksICI9ciIgKF9fZ3VfdmFsKSA6ICJtIigoKihzdHJ1Y3QgX19sYXJnZV9zdHJ1Y3QgKikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoICAgX19ndV9hZGRyICAgKSkgKSwgImkiKC0gMTQgKSwgIjAiKCAgX19ndV9lcnIgICkpOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygKKyAgICAgICAgICAgICAgIjE6ICAgICAgbW92IiAibCIgIiAlMiwlIiAiIiAiMVxuIgorICAgICAgICAgICAgICAiMjpcbiIKKyAgICAgICAgICAgICAgIi5zZWN0aW9uIC5maXh1cCxcImF4XCJcbiIKKyAgICAgICAgICAgICAgIjM6ICAgICAgbW92bCAlMywlMFxuIgorICAgICAgICAgICAgICAiICAgICAgICB4b3IiICJsIiAiICUiICIiICIxLCUiICIiICIxXG4iCisgICAgICAgICAgICAgICIgICAgICAgIGptcCAyYlxuIgorICAgICAgICAgICAgICAiLnNlY3Rpb24gX19leF90YWJsZSxcImFcIlxuIgorICAgICAgICAgICAgICAiICAgICAgICAuYWxpZ24gNFxuIiAgICAgICAgIiAgICAgICAgLmxvbmcgMWIsM2JcbiIKKyAgICAgICAgICAgICAgIi50ZXh0IiAgICAgICAgOiAiPXIiKF9fZ3VfZXJyKSwgIj1yIiAoX19ndV92YWwpIDogIm0iKCgqKHN0cnVjdCBfX2xhcmdlX3N0cnVjdCAqKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICggICBfX2d1X2FkZHIgICApKSApLCAiaSIoLSAxNCApLCAiMCIoX19ndV9lcnIpKTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgIChfX2d1X3ZhbCkgPSBfX2dldF91c2VyX2JhZCgpOworICAgICAgICB9CisgICAgICB9IHdoaWxlICgwKSA7CisgICAgKChjKSkgPSAoX190eXBlb2ZfXygqKChidWYpKSkpX19ndV92YWw7CisgICAgX19ndV9lcnI7CisgIH0KKyk7CisKK1dPVyEgQmxhY2sgR0NDL2Fzc2VtYmx5IG1hZ2ljLiBUaGlzIGlzIGltcG9zc2libGUgdG8gZm9sbG93LCBzbyBsZXQncworc2VlIHdoYXQgY29kZSBnY2MgZ2VuZXJhdGVzOgorCisgPiAgICAgICAgIHhvcmwgJWVkeCwlZWR4CisgPiAgICAgICAgIG1vdmwgY3VycmVudF9zZXQsJWVheAorID4gICAgICAgICBjbXBsICQyNCw3ODgoJWVheCkKKyA+ICAgICAgICAgamUgLkwxNDI0CisgPiAgICAgICAgIGNtcGwgJC0xMDczNzQxODI1LDY0KCVlc3ApCisgPiAgICAgICAgIGphIC5MMTQyMworID4gLkwxNDI0OgorID4gICAgICAgICBtb3ZsICVlZHgsJWVheAorID4gICAgICAgICBtb3ZsIDY0KCVlc3ApLCVlYngKKyA+ICNBUFAKKyA+IDE6ICAgICAgbW92YiAoJWVieCksJWRsICAgICAgICAgICAgICAgIC8qIHRoaXMgaXMgdGhlIGFjdHVhbCB1c2VyIGFjY2VzcyAqLworID4gMjoKKyA+IC5zZWN0aW9uIC5maXh1cCwiYXgiCisgPiAzOiAgICAgIG1vdmwgJC0xNCwlZWF4CisgPiAgICAgICAgIHhvcmIgJWRsLCVkbAorID4gICAgICAgICBqbXAgMmIKKyA+IC5zZWN0aW9uIF9fZXhfdGFibGUsImEiCisgPiAgICAgICAgIC5hbGlnbiA0CisgPiAgICAgICAgIC5sb25nIDFiLDNiCisgPiAudGV4dAorID4gI05PX0FQUAorID4gLkwxNDIzOgorID4gICAgICAgICBtb3Z6YmwgJWRsLCVlc2kKKworVGhlIG9wdGltaXplciBkb2VzIGEgZ29vZCBqb2IgYW5kIGdpdmVzIHVzIHNvbWV0aGluZyB3ZSBjYW4gYWN0dWFsbHkKK3VuZGVyc3RhbmQuIENhbiB3ZT8gVGhlIGF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GSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CisjIENPTkZJR19NVERfQ0ZJX0FNRFNURCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTPXkKK0NPTkZJR19NVERfUEhZU01BUD15CisjIENPTkZJR19NVERfUEhZU01BUF9DT01QQVQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSTV9JTlRFR1JBVE9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkQ9eQorIyBDT05GSUdfTVREX05BTkRfVkVSSUZZX1dSSVRFIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX0VDQ19TTUMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfTVVTRVVNX0lEUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9HUElPIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTkFORF9JRFM9eQorIyBDT05GSUdfTVREX05BTkRfRElTS09OQ0hJUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkRfQVRNRUw9eQorIyBDT05GSUdfTVREX05BTkRfQVRNRUxfRUNDX0hXIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTkFORF9BVE1FTF9FQ0NfU09GVD15CisjIENPTkZJR19NVERfTkFORF9BVE1FTF9FQ0NfTk9ORSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9OQU5EU0lNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1BMQVRGT1JNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BTEFVREEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIExQRERSIGZsYXNoIG1lbW9yeSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfTFBERFIgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworQ09ORklHX01URF9VQkk9eQorQ09ORklHX01URF9VQklfV0xfVEhSRVNIT0xEPTQwOTYKK0NPTkZJR19NVERfVUJJX0JFQl9SRVNFUlZFPTEKK0NPTkZJR19NVERfVUJJX0dMVUVCST15CisKKyMKKyMgVUJJIGRlYnVnZ2luZyBvcHRpb25zCisjCisjIENPTkZJR19NVERfVUJJX0RFQlVHIGlzIG5vdCBzZXQKICMgQ09ORklHX1BBUlBPUlQgaXMgbm90IHNldAotCi0jCi0jIFBsdWcgYW5kIFBsYXkgc3VwcG9ydAotIwotCi0jCi0jIEJsb2NrIGRldmljZXMKLSMKK0NPTkZJR19CTEtfREVWPXkKICMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub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9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ09OQ0FUPXkKK0NPTkZJR19NVERfUEFSVElUSU9OUz15CisjIENPTkZJR19NVERfVEVTVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKyMgQ09ORklHX01URF9BRlNfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSN19QQVJUUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMS0RFVlM9eQorQ09ORklHX01URF9CTE9DSz15CitDT05GSUdfRlRMPXkKK0NPTkZJR19ORlRMPXkKK0NPTkZJR19ORlRMX1JXPXkKK0NPTkZJR19JTkZUTD15CitDT05GSUdfUkZEX0ZUTD15CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT09QUyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKK0NPTkZJR19NVERfSkVERUNQUk9CRT15CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfQ0ZJX1NUQUE9eQorQ09ORklHX01URF9DRklfVVRJTD15CitDT05GSUdfTVREX1JBTT15CitDT05GSUdfTVREX1JPTT15CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQVJNX0lOVEVHUkFUT1IgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0lNUEE3IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9EQVRBRkxBU0ggaXMgbm90IHNldAorIyBDT05GSUdfTVREX00yNVA4MCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EPXkKK0NPTkZJR19NVERfTkFORF9WRVJJRllfV1JJVEU9eQorIyBDT05GSUdfTVREX05BTkRfRUNDX1NNQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9NVVNFVU1fSURTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX0dQSU8gaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0lEUz15CitDT05GSUdfTVREX05BTkRfUzNDMjQxMD15CisjIENPTkZJR19NVERfTkFORF9TM0MyNDEwX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1MzQzI0MTBfSFdFQ0MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfUzNDMjQxMF9DTEtTVE9QIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX0RJU0tPTkNISVAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfTkFORFNJTSBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkRfUExBVEZPUk09eQorIyBDT05GSUdfTVREX0FMQVVEQSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgTFBERFIgZmxhc2ggbWVtb3J5IGRyaXZlcnMKKyMKK0NPTkZJR19NVERfTFBERFI9eQorQ09ORklHX01URF9RSU5GT19QUk9CRT15CisKKyMKKyMgVUJJIC0gVW5zb3J0ZWQgYmxvY2sgaW1hZ2VzCisjCisjIENPTkZJR19NVERfVUJJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BBUlBPUlQgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVY9eQorIyBDT05GSUdfQkxLX0RFVl9DT1dfQ09NTU9OIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX0xPT1A9bQorIyBDT05GSUdfQkxLX0RFVl9DU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VlfSENEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9HQURHRVRfRFVBTFNQRUVEIGlzIG5vdCBzZXQKK0NPTkZJR19VU0JfWkVSTz1tCitDT05GSUdfVVNCX0VUSD1tCitDT05GSUdfVVNCX0VUSF9STkRJUz15CitDT05GSUdfVVNCX0dBREdFVEZTPW0KK0NPTkZJR19VU0JfRklMRV9TVE9SQUdFPW0KKyMgQ09ORklHX1VTQl9GSUxFX1NUT1JBR0VfVEVTVCBpcyBub3Qgc2V0CitDT05GSUdfVVNCX0dfU0VSSUFMPW0KKyMgQ09ORklHX1VTQl9NSURJX0dBREdFVCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR19QUklOVEVSIGlzIG5vdCBzZXQKK0NPTkZJR19VU0JfQ0RDX0NPTVBPU0lURT1tCisKKyMKKyMgT1RHIGFuZCByZWxhdGVkIGluZnJhc3RydWN0dXJlCisjCisjIENPTkZJR19VU0JfR1BJT19WQlVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX05PUF9VU0JfWENFSVYgaXMgbm90IHNldAorQ09ORklHX01NQz15CisjIENPTkZJR19NTUNfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTU1DX1VOU0FGRV9SRVNVTUUgaXMgbm90IHNldAorCisjCisjIE1NQy9TRC9TRElPIENhcmQgRHJpdmVycworIworQ09ORklHX01NQ19CTE9DSz15CitDT05GSUdfTU1DX0JMT0NLX0JPVU5DRT15CitDT05GSUdfU0RJT19VQVJUPXkKKyMgQ09ORklHX01NQ19URVNUIGlzIG5vdCBzZXQKKworIworIyBNTUMvU0QvU0RJTyBIb3N0IENvbnRyb2xsZXIgRHJpdmVycworIworQ09ORklHX01NQ19TREhDST15CitDT05GSUdfTU1DX1NQST15CitDT05GSUdfTU1DX1MzQz15CisjIENPTkZJR19NRU1TVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19BQ0NFU1NJQklMSVRZIGlzIG5vdCBzZXQKK0NPTkZJR19ORVdfTEVE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X1BBUlRJVElPTiBpcyBub3Qgc2V0CitDT05GSUdfTkxTPXkKK0NPTkZJR19OTFNfREVGQVVMVD0iY3A0MzciCitDT05GSUdfTkxTX0NPREVQQUdFXzQzNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzczNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzc3NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Nz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2ND1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Nj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzNj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzMj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk0OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg3ND1tCitDT05GSUdfTkxTX0lTTzg4NTlfOD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzEyNTA9bQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUxPW0KK0NPTkZJR19OTFNfQVNDSUk9bQorQ09ORklHX05MU19JU084ODU5XzE9bQorQ09ORklHX05MU19JU084ODU5XzI9bQorQ09ORklHX05MU19JU084ODU5XzM9bQorQ09ORklHX05MU19JU084ODU5XzQ9bQorQ09ORklHX05MU19JU084ODU5XzU9bQorQ09ORklHX05MU19JU084ODU5XzY9bQor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9bQorQ09ORklHX0RFQ09NUFJFU1NfR1pJUD15CitDT05GSUdfREVDT01QUkVTU19CWklQMj15CitDT05GSUdfREVDT01QUkVTU19MWk1BPXkKK0NPTkZJR19IQVNfSU9NRU09eQorQ09ORklHX0hBU19ETUE9eQorQ09ORklHX05MQVRUUj15CmRpZmYgLS1naXQgYS9hcmNoL2FybS9jb25maWdzL214MjdfZGVmY29uZmlnIGIvYXJjaC9hcm0vY29uZmlncy9teDI3X2RlZmNvbmZpZwppbmRleCAwODM1MTZjLi43NTI2M2E4IDEwMDY0NAotLS0gYS9hcmNoL2FybS9jb25maWdzL214MjdfZGVmY29uZmlnCisrKyBiL2FyY2gvYXJtL2NvbmZpZ3MvbXgyN19kZWZjb25maWcKQEAgLTEsMTUgKzEsMTUgQEAKICMKICMgQXV0b21hdGljYWxseSBnZW5lcmF0ZWQgbWFrZSBjb25maWc6IGRvbid0IGVkaXQKLSMgTGludXgga2VybmVsIHZlcnNpb246IDIuNi4zMC1yYzEKLSMgV2VkIEFwciAgOCAxMDoxODowNiAyMDA5CisjIExpbnV4IGtlcm5lbCB2ZXJzaW9uOiAyLjYuMzEtcmM0CisjIEZyaSBKdWwgMjQgMTY6MDg6MDYgMjAwOQogIwogQ09ORklHX0FSTT15CitDT05GSUdfSEFWRV9QV009eQogQ09ORklHX1NZU19TVVBQT1JUU19BUE1fRU1VTEFUSU9OPXkKIENPTkZJR19HRU5FUklDX0dQSU89eQogQ09ORklHX0dFTkVSSUNfVElNRT15CiBDT05GSUdfR0VORVJJQ19DTE9DS0VWRU5UUz15CiBDT05GSUdfTU1VPXkKLSMgQ09ORklHX05PX0lPUE9SVCBpcyBub3Qgc2V0CiBDT05GSUdfR0VORVJJQ19IQVJESVJRUz15CiBDT05GSUdfU1RBQ0tUUkFDRV9TVVBQT1JUPXkKIENPTkZJR19IQVZFX0xBVEVOQ1lUT1BfU1VQUE9SVD15CkBAIC0xOCwxNCArMTgsMTMgQEAKIENPTkZJR19IQVJESVJRU19TV19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2lyZGEuaD4KICNpbmNsdWRlIDxtYWNoL3B4YTI3eF9rZXlwYWQuaD4KICNpbmNsdWRlIDxtYWNoL3VkYy5oPgorI2luY2x1ZGUgPG1hY2gvcGFsbWFzb2MuaD4KKwogI2luY2x1ZGUgPG1hY2gvcG0uaD4KIAogI2luY2x1ZGUgImdlbmVyaWMuaCIKQEAgLTY2LDYgKzcwLDggQEAKIAlHUElPMjlfQUM5N19TREFUQV9JTl8wLAogCUdQSU8zMF9BQzk3X1NEQVRBX09VVCwKIAlHUElPMzFfQUM5N19TWU5DLAorCUdQSU84OV9BQzk3X1NZU0NMSywKKwlHUElPMTEzX0FDOTdfblJFU0VULAogCiAJLyogSXJEQSAqLwogCUdQSU80OV9HUElPLAkvKiBpciBkaXNhYmxlICovCkBAIC03Nyw4ICs4Myw3IEBACiAKIAkvKiBVU0IgKi8KIAlHUElPMTVfR1BJTywJLyogdXNiIGRldGVjdCAqLwotCUdQSU8xMl9HUElPLAkvKiB1c2IgcHVsbHVwICovCi0JR1BJTzk1X0dQSU8sCS8qIHVzYiBwb3dlciAqLworCUdQSU85NV9HUElPLAkvKiB1c2IgcHVsbHVwICovCiAKIAkvKiBNYXRyaXgga2V5cGFkICovCiAJR1BJTzEwMF9LUF9NS0lOXzAJfCBXQUtFVVBfT05fTEVWRUxfSElHSCwKQEAgLTM1NSw2ICszNjAsMjIgQEAKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFVEQworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgZ3Bpb192YnVzX21hY2hfaW5mbyBwYWxtejcyX3VkY19pbmZvID0geworCS5ncGlvX3ZidXMJCT0gR1BJT19OUl9QQUxNWjcyX1VTQl9ERVRFQ1RfTiwKKwkuZ3Bpb19wdWxsdXAJCT0gR1BJT19OUl9QQUxNWjcyX1VTQl9QVUxMVVAsCit9OworCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSBwYWxtejcyX2dwaW9fdmJ1cyA9IHsKKwkubmFtZQk9ICJncGlvLXZidXMiLAorCS5pZAk9IC0xLAorCS5kZXYJPSB7CisJCS5wbGF0Zm9ybV9kYXRhCT0gJnBhbG16NzJfdWRjX2luZm8sCisJfSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFBvd2VyIHN1cHBseQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyBpbnQgcG93ZXJfc3VwcGx5X2luaXQoc3RydWN0IGRldmljZSAqZGV2KQpAQCAtNDIyLDYgKzQ0MywzMSBAQAogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogV005N3h4IGJhdHRlcnkKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgc3RydWN0IHdtOTd4eF9iYXR0X2luZm8gd205N3h4X2JhdHRfcGRhdGEgPSB7CisJLmJhdHRfYXV4CT0gV005N1hYX0FVWF9JRDMsCisJLnRlbXBfYXV4CT0gV005N1hYX0FVWF9JRDIsCisJLmNoYXJnZV9ncGlvCT0gLTEsCisJLm1heF92b2x0YWdlCT0gUEFMTVo3Ml9CQVRfTUFYX1ZPTFRBR0UsCisJLm1pbl92b2x0YWdlCT0gUEFMTVo3Ml9CQVRfTUlOX1ZPTFRBR0UsCisJLmJhdHRfbXVsdAk9IDEwMDAsCisJLmJhdHRfZGl2CT0gNDE0LAorCS50ZW1wX211bHQJPSAxLAorCS50ZW1wX2Rpdgk9IDEsCisJLmJhdHRfdGVjaAk9IFBPV0VSX1NVUFBMWV9URUNITk9MT0dZX0xJUE8sCisJLmJhdHRfbmFtZQk9ICJtYWluLWJhdHQiLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogYVNvQyBhdWRpbworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIHBhbG16NzJfYXNvYyA9IHsKKwkubmFtZSA9ICJwYWxtMjd4LWFzb2MiLAorCS5pZCAgID0gLTEsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBGcmFtZWJ1ZmZlcgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyBzdHJ1Y3QgcHhhZmJfbW9kZV9pbmZvIHBhbG16NzJfbGNkX21vZGVzW10gPSB7CkBAIC01MjcsMTcgKzU3MywzMiBAQAogc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgKmRldmljZXNbXSBfX2luaXRkYXRhID0gewogCSZwYWxtejcyX2JhY2tsaWdodCwKIAkmcGFsbXo3Ml9sZWRzLAorCSZwYWxtejcyX2Fzb2MsCiAJJnBvd2VyX3N1cHBseSwKKwkmcGFsbXo3Ml9ncGlvX3ZidXMsCiB9OwogCisvKiBzZXR1cCB1ZGMgR1BJT3MgaW5pdGlhbCBzdGF0ZSAqLworc3RhdGljIHZvaWQgX19pbml0IH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dWRlIDxtYWNoL3B4YTI3eF9rZXlwYWQuaD4KKyNpbmNsdWRlIDxtYWNoL3VkYy5oPgorI2luY2x1ZGUgPG1hY2gvb2hjaS5oPgorI2luY2x1ZGUgPG1hY2gvcHhhMnh4LXJlZ3MuaD4KKyNpbmNsdWRlIDxtYWNoL3BhbG1hc29jLmg+CisjaW5jbHVkZSA8bWFjaC9jYW1lcmEuaD4KKworI2luY2x1ZGUgPHNvdW5kL3B4YTJ4eC1saWIuaD4KKworI2luY2x1ZGUgImdlbmVyaWMuaCIKKyNpbmNsdWRlICJkZXZpY2VzLmgiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFBpbiBjb25maWd1cmF0aW9uCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHVuc2lnbmVkIGxvbmcgdHJlbzY4MF9waW5fY29uZmlnW10gX19pbml0ZGF0YSA9IHsKKwkvKiBNTUMgKi8KKwlHUElPMzJfTU1DX0NMSywKKwlHUElPOTJfTU1DX0RBVF8wLAorCUdQSU8xMDlfTU1DX0RBVF8xLAorCUdQSU8xMTBfTU1DX0RBVF8yLAorCUdQSU8xMTFfTU1DX0RBVF8zLAorCUdQSU8xMTJfTU1DX0NNRCwKKwlHUElPMzNfR1BJTywJCQkJLyogU0QgcmVhZCBvbmx5ICovCisJR1BJTzExM19HUElPLAkJCQkvKiBTRCBkZXRlY3QgKi8KKworCS8qIEFDOTcgKi8KKwlHUElPMjhfQUM5N19CSVRDTEssCisJR1BJTzI5X0FDOTdfU0RBVEFfSU5fMCwKKwlHUElPMzBfQUM5N19TREFUQV9PVVQsCisJR1BJTzMxX0FDOTdfU1lOQywKKwlHUElPODlfQUM5N19TWVNDTEssCisJR1BJTzk1X0FDOTdfblJFU0VULAorCisJLyogSXJE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REdFX0JPVEgsCS8qIGJsdWV0b290aCBob3N0IHdha2UgdXAgKi8KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFNEL01NQyBjYXJkIGNvbnRyb2xsZXIKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHRyZW82ODBfbWNpX2luaXQoc3RydWN0IGRldmljZSAqZGV2LAorCQlpcnFfaGFuZGxlcl90IHRyZW82ODBfZGV0ZWN0X2ludCwgdm9pZCAqZGF0YSkKK3sKKwlpbnQgZXJyID0gMDsKKworCS8qIFNldHVwIGFuIGludGVycnVwdCBmb3IgZGV0ZWN0aW5nIGNhcmQgaW5zZXJ0L3JlbW92ZSBldmVudHMgKi8KKwllcnIgPSBncGlvX3JlcXVlc3QoR1BJT19OUl9UUkVPNjgwX1NEX0RFVEVDVF9OLCAiU0QgSVJRIik7CisKKwlpZiAoZXJyKQorCQlnb3RvIGVycjsKKworCWVyciA9IGdwaW9fZGlyZWN0aW9uX2lucHV0KEdQSU9fTlJfVFJFTzY4MF9TRF9ERVRFQ1RfTik7CisJaWYgKGVycikKKwkJZ290byBlcnIyOworCisJZXJyID0gcmVxdWVzdF9pcnEoZ3Bpb190b19pcnEoR1BJT19OUl9UUkVPNjgwX1NEX0RFVEVDVF9OKSwKKwkJCXRyZW82ODBfZGV0ZWN0X2ludCwgSVJRRl9ESVNBQkxFRCB8IElSUUZfU0FNUExFX1JBTkRPTSB8CisJCQlJUlFGX1RSSUdHRVJfRkFMTElORyB8IElSUUZfVFJJR0dFUl9SSVNJTkcsCisJCQkiU0QvTU1DIGNhcmQgZGV0ZWN0IiwgZGF0YSk7CisKKwlpZiAoZXJyKSB7CisJCWRldl9lcnIoZGV2LCAiJXM6IGNhbm5vdCByZXF1ZXN0IF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OUl9UUkVPNjgwX1NEX0RFVEVDVF9OKSwgZGF0YSk7CisJZ3Bpb19mcmVlKEdQSU9fTlJfVFJFTzY4MF9TRF9ERVRFQ1RfTik7Cit9CisKK3N0YXRpYyB2b2lkIHRyZW82ODBfbWNpX3Bvd2VyKHN0cnVjdCBkZXZpY2UgKmRldiwgdW5zaWduZWQgaW50IHZkZCkKK3sKKwlzdHJ1Y3QgcHhhbWNpX3BsYXRmb3JtX2RhdGEgKnBfZCA9IGRldi0+cGxhdGZvcm1fZGF0YTsKKwlncGlvX3NldF92YWx1ZShHUElPX05SX1RSRU82ODBfU0RfUE9XRVIsIHBfZC0+b2NyX21hc2sgJiAoMSA8PCB2ZGQpKTsKK30KKworc3RhdGljIGludCB0cmVvNjgwX21jaV9nZXRfcm8oc3RydWN0IGRldmljZSAqZGV2KQoreworCXJldHVybiBncGlvX2dldF92YWx1ZShHUElPX05SX1RSRU82ODBfU0RfUkVBRE9OTFkpOworfQorCitzdGF0aWMgc3RydWN0IHB4YW1jaV9wbGF0Zm9ybV9kYXRhIHRyZW82ODBfbWNpX3BsYXRmb3JtX2RhdGEgPSB7CisJLm9jcl9tYXNrCT0gTU1DX1ZERF8zMl8zMyB8IE1NQ19WRERfMzNfMzQsCisJLnNldHBvd2VyCT0gdHJlbzY4MF9tY2lfcG93ZXIsCisJLmdldF9ybwkJPSB0cmVvNjgwX21jaV9nZXRfcm8sCisJLmluaXQgCQk9IHRyZW82ODBfbWNpX2luaXQsCisJLmV4aXQJCT0gdHJlbzY4MF9tY2lfZXhpdCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEdQSU8ga2V5Ym9hcmQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdW5zaWduZWQgaW50IHRyZW82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Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBhU29DIGF1ZGlvCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgcHhhMnh4X2F1ZGlvX29wc190IHRyZW82ODBfYWM5N19wZGF0YSA9IHsKKwkucmVzZXRfZ3Bpbwk9IDk1LAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogQmFja2xpZ2h0CisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCB0cmVvNjgwX2JhY2tsaWdodF9pbml0KHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfVFJFTzY4MF9CTF9QT1dFUiwgIkJMIFBPV0VSIik7CisJaWYgKHJldCkKKwkJZ290byBlcnI7CisJcmV0ID0gZ3Bpb19kaXJlY3Rpb25fb3V0cHV0KEdQSU9fTlJfVFJFTzY4MF9CTF9QT1dFUiwgMCk7CisJaWYgKHJldCkKKwkJZ290byBlcnIyOworCXJldCA9IGdwaW9fcmVxdWVzdChHUElPX05SX1RSRU82ODBfTENEX1BPV0VSLCAiTENEIFBPV0VSIik7CisJaWYgKHJldCkKKwkJZ290byBlcnIyOworCXJldCA9IGdwaW9fZGlyZWN0aW9uX291dHB1dChHUElPX05SX1RSRU82ODBfTENEX1BPV0VSLCAwKTsKKwlpZiAocmV0KQorCQlnb3RvIGVycjM7CisKKwlyZXR1cm4gMDsKK2VycjM6CisJZ3Bpb19mcmVlKEdQSU9fTlJfVF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S5wYXJlbnQJCT0gJnB4YTI3eF9kZXZpY2VfcHdtMC5kZXYsCisJCS5wbGF0Zm9ybV9kYXRhCT0gJnRyZW82ODBfYmFja2xpZ2h0X2RhdGEsCisJfSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIElyREEKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCB0cmVvNjgwX3RyYW5zY2VpdmVyX21vZGUoc3RydWN0IGRldmljZSAqZGV2LCBpbnQgbW9kZSkKK3sKKwlncGlvX3NldF92YWx1ZShHUElPX05SX1RSRU82ODBfSVJfRU4sIG1vZGUgJiBJUl9PRkYpOworCXB4YTJ4eF90cmFuc2NlaXZlcl9tb2RlKGRldiwgbW9kZSk7Cit9CisKK3N0YXRpYyBpbnQgdHJlbzY4MF9pcmRhX3N0YXJ0dXAoc3RydWN0IGRldmljZSAqZGV2KQoreworCWludCBlcnI7CisKKwllcnIgPSBncGlvX3JlcXVlc3QoR1BJT19OUl9UUkVPNjgwX0lSX0VOLCAiSXIgcG9ydCBkaXNhYmxlIik7CisJaWYgKGVycikKKwkJZ290byBlcnIxOworCisJZXJyID0gZ3Bpb19kaXJlY3Rpb25fb3V0cHV0KEdQSU9fTlJfVFJFTzY4MF9JUl9FTiwgMSk7CisJaWYgKGVycikKKwkJZ290byBlcnIyOworCisJcmV0dXJuIDA7CisKK2VycjI6CisJZGV2X2VycihkZXYsICJ0cmVvNjgwX2lyZGE6IGNhbm5vdCBjaGFuZ2UgSVIgZ3BpbyBkaXJlY3Rpb25cbiIpOworCWdwaW9fZnJlZShHUElPX05SX1RSRU82ODBfSVJfRU4pOworZXJyMToKKwlkZXZfZXJyKGRldiwgInRyZW82ODBfaXJkYTogY2Fubm90IGFsbG9jYXRlIElSIGdwaW9cbiIpOworCXJldHVybiBlcnI7Cit9CisKK3N0YXRpYyB2b2lkIHRyZW82ODBfaXJkYV9zaHV0ZG93bihzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisJZ3Bpb19mcmVlKEdQSU9fTlJfVFJFTzY4MF9JUl9FTik7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcHhhZmljcF9wbGF0Zm9ybV9kYXRhIHRyZW82ODBfZmljcF9pbmZvID0geworCS50cmFuc2NlaXZlcl9jYXAgID0gSVJfRklSTU9ERSB8IElSX1NJUk1PREUgfCBJUl9PRkYsCisJLnN0YXJ0dXAgICAgICAgICAgPSB0cmVvNjgwX2lyZGFfc3RhcnR1cCwKKwkuc2h1dGRvd24gICAgICAgICA9IHRyZW82ODBfaXJkYV9zaHV0ZG93biwKKwkudHJhbnNjZWl2ZXJfbW9kZSA9IHRyZW82ODBfdHJhbnNjZWl2ZXJfbW9kZSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFVEQworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcHhhMnh4X3VkY19tYWNoX2luZm8gdHJlbzY4MF91ZGNfaW5mbyBfX2luaXRkYXRhID0geworCS5ncGlvX3ZidXMJCT0gR1BJT19OUl9UUkVPNjgwX1VTQl9ERVRFQ1QsCisJLmdwaW9fdmJ1c19pbnZlcnRlZAk9IDEsCisJLmdwaW9fcHVsbHVwCQk9IEdQSU9fTlJfVFJFTzY4MF9VU0JfUFVMTFVQLAorfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBVU0IgaG9zdAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcHhhb2hjaV9wbGF0Zm9ybV9kYXRhIHRyZW82ODBfb2hjaV9pbmZvID0geworCS5wb3J0X21vZGUgICAgPSBQTU1fUEVSUE9SVF9NT0RFLAorCS5mbGFncyAgICAgICAgPSBFTkFCTEVfUE9SVDEgfCBFTkFCTEVfUE9SVDMsCisJLnBvd2VyX2J1ZGdldCA9IDAsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQb3dlciBzdXBwbHkKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHBvd2VyX3N1cHBseV9pbml0KHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfVFJFTzY4MF9QT1dFUl9ERVRFQ1QsICJDQUJMRV9TVEFURV9BQyIpOworCWlmIChyZXQpCisJCWdvdG8gZXJyMTsKKwlyZXQgPSBncGlvX2RpcmVjdGlvbl9pbnB1dChHUElPX05SX1RSRU82ODBfUE9XRVJfREVURUNUKTsKKwlpZiAocmV0KQorCQlnb3RvIGVycjI7CisKKwlyZXR1cm4gMDsKKworZXJyMjoKKwlncGlvX2ZyZWUoR1BJT19OUl9UUkVPNjgwX1BPV0VSX0RFVEVDVCk7CitlcnIxOgorCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgdHJlbzY4MF9pc19hY19vbmxpbmUodm9pZCkKK3sKKwlyZXR1cm4gZ3Bpb19nZXRfdmFsdWUoR1BJT19OUl9UUkVPNjgwX1BPV0VSX0RFVEVDVCk7Cit9CisKK3N0YXRpYyB2b2lkIHBvd2VyX3N1cHBseV9leGl0KHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlncGlvX2ZyZWUoR1BJT19OUl9UUkVPNjgwX1BPV0VSX0RFVEVDVCk7Cit9CisKK3N0YXRpYyBjaGFyICp0cmVvNjgwX3N1cHBsaWNhbnRzW10gPSB7CisJIm1haW4tYmF0dGVyeSIsCit9OworCitzdGF0aWMgc3RydWN0IHBkYV9wb3dlcl9wZGF0YSBwb3dlcl9zdXBwbHlfaW5mbyA9IHsKKwkuaW5pdAkJID0gcG93ZXJfc3VwcGx5X2luaXQsCisJLmlzX2FjX29ubGluZSAgICA9IHRyZW82ODBfaXNfYWNfb25saW5lLAorCS5leGl0CQkgPSBwb3dlcl9zdXBwbHlfZXhpdCwKKwkuc3VwcGxpZWRfdG8gICAgID0gdHJlbzY4MF9zdXBwbGljYW50cywKKwkubnVtX3N1cHBsaWNhbnRzID0gQVJSQVlfU0laRSh0cmVvNjgwX3N1cHBsaWNhbnRzKSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIHBvd2VyX3N1cHBseSA9IHsKKwkubmFtZSA9ICJwZGEtcG93ZXIiLAorCS5pZCAgID0gLTEsCisJLmRldiAgPSB7CisJCS5wbGF0Zm9ybV9kYXRhID0gJnBvd2VyX3N1cHBseV9pbmZvLAorCX0sCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBWaWJyYSBhbmQgTEVEcworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgZ3Bpb19sZWQgZ3Bpb19sZWRzW10gPSB7CisJeworCQkubmFtZQkJCT0gInRyZW82ODA6dmlicmE6dmlicmEiLAorCQkuZGVmYXVsdF90cmlnZ2VyCT0gI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b2NrCQk9IDg2NTM4LAorCS54cmVzCQkJPSAzMjAsCisJLnlyZXMJCQk9IDMyMCwKKwkuYnBwCQkJPSAxNiwKKworCS5sZWZ0X21hcmdpbgkJPSAyMCwKKwkucmlnaHRfbWFyZ2luCQk9IDgsCisJLnVwcGVyX21hcmdpbgkJPSA4LAorCS5sb3dlcl9tYXJnaW4JCT0gNSwKKworCS5oc3luY19sZW4JCT0gNCwKKwkudnN5bmNfbGVuCQk9IDEsCit9LAorfTsKKworc3RhdGljIHN0cnVjdCBweGFmYl9tYWNoX2luZm8gdHJlbzY4MF9sY2Rfc2NyZWVuID0geworCS5tb2RlcwkJPSB0cmVvNjgwX2xjZF9tb2RlcywKKwkubnVtX21vZGVzCT0gQVJSQVlfU0laRSh0cmVvNjgwX2xjZF9tb2RlcyksCisJLmxjZF9jb25uCT0gTENEX0NPTE9SX1RGVF8xNkJQUCB8IExDRF9QQ0xLX0VER0VfRkFMTCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFBvd2VyIG1hbmFnZW1lbnQgLSBzdGFuZGJ5CisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgX19pbml0IHRyZW82ODBfcG1faW5pdCh2b2lkKQoreworCXN0YXRpYyB1MzIgcmVzdW1lW10gPSB7CisJCTB4ZTNhMDAxMDEsCS8qIG1vdglyMCwJIzB4NDAwMDAwMDAgKi8KKwkJMHhlMzgwMDYwZiwJLyogb3JyCXIwLCByMCwgIzB4MDBmMDAwMDAgKi8KKwkJMHhlNTkwZjAwOCwJLyogbGRyCXBjLCBbcjAsICMweDA4XSAqLworCX07CisKKwkvKiB0aGlzIGlzIHdoZXJlIHRoZSBib290bG9hZGVyIGp1bXBzICovCisJbWVtY3B5KHBoeXNfdG9fdmlydChUUkVPNjgwX1NUUl9CQVNFKSwgcmVzdW1lLCBzaXplb2YocmVzdW1lKSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIE1hY2hpbmUgaW5pdAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpkZXZpY2VzW10gX19pbml0ZGF0YSA9IHsKKwkmdHJlbzY4MF9iYWNrbGlnaHQsCisJJnRyZW82ODBfbGVkcywKKwkmcG93ZXJfc3VwcGx5LAorfTsKKworLyogc2V0dXAgdWRjIEdQSU9zIGluaXRpYWwgc3RhdGUgKi8KK3N0YXRpYyB2b2lkIF9faW5pdCB0cmVvNjgwX3VkY19pbml0KHZvaWQpCit7CisJaWYgKCFncGlvX3JlcXVlc3QoR1BJT19OUl9UUkVPNjgwX1VTQl9QVUxMVVAsICJVREMgVmJ1cyIpKSB7CisJCWdwaW9fZGlyZWN0aW9uX291dHB1dChHUElPX05SX1RSRU82ODBfVVNCX1BVTExVUCwgMSk7CisJCWdwaW9fZnJlZShHUElPX05SX1RSRU82ODBfVVNCX1BVTExVUCk7CisJfQorfQorCitzdGF0aWMgdm9pZCBfX2luaXQgdHJlbzY4MF9pbml0KHZvaWQpCit7CisJdHJlbzY4MF9wbV9pbml0KCk7CisJcHhhMnh4X21mcF9jb25maWcoQVJSQVlfQU5EX1NJWkUodHJlbzY4MF9waW5fY29uZmlnKSk7CisJcHhhX3NldF9rZXlwYWRfaW5mbygmdHJlbzY4MF9rZXlwYWRfcGxhdGZvcm1fZGF0YSk7CisJc2V0X3B4YV9mYl9pbmZvKCZ0cmVvNjgwX2xjZF9zY3JlZW4pOworCXB4YV9zZXRfbWNpX2luZm8oJnRyZW82ODBfbWN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X0xPT0tVUCgiaTJzLjEiLCAmaTJzMV9jbGspLAotCURFRl9MT09LVVAoInN0ZGRjaTJjLjAiLCAmaTJjMF9jbGspLAotCURFRl9MT09LVVAoInN0ZGRjaTJjLjEiLCAmaTJjMV9jbGspLAotCURFRl9MT09LVVAoInBsMDIyIiwgJnNwaV9jbGspLAorCURFRl9MT09LVVAoImkycy4wIiwgICAgICZpMnMwX2NsayksCisJREVGX0xPT0tVUCgiaTJzLjEiLCAgICAgJmkyczFfY2xrKSwKKwlERUZfTE9PS1VQKCJzdHUzMDAuMCIsICAmaTJjMF9jbGspLAorCURFRl9MT09LVVAoInN0dTMwMC4xIiwgICZpMmMxX2NsayksCisJREVGX0xPT0tVUCgicGwwMjIiLCAgICAgJnNwaV9jbGspLAogI2lmZGVmIENPTkZJR19NQUNIX1UzMDBfQlMzMzUKLQlERUZfTE9PS1VQKCJ1YXJ0MSIsICZ1YXJ0MV9jbGspLAorCURFRl9MT09LVVAoInVhcnQxIiwgICAgICZ1YXJ0MV9jbGspLAogI2VuZGlmCiAJLyogU0xPVyBicmlkZ2UgY2xvY2tzICovCi0JREVGX0xPT0tVUCgic2xvdyIsICZzbG93X2NsayksCi0JREVGX0xPT0tVUCgid2RvZyIsICZ3ZG9nX2NsayksCi0JREVGX0xPT0tVUCgidWFydDAiLCAmdWFydF9jbGspLAotCURFRl9MT09LVVAoImFwcHRpbWVyIiwgJmFwcF90aW1lcl9jbGspLAotCURFRl9MT09LVVAoImtleXBhZCIsICZrZXlwYWRfY2xrKSwKKwlERUZfTE9PS1VQKCJzbG93IiwgICAgICAmc2xvd19jbGspLAorCURFRl9MT09LVVAoImNvaDkwMTMyN193ZG9nIiwgICAgICAmd2RvZ19jbGspLAorCURFRl9MT09LVVAoInVhcnQwIiwgICAgICZ1YXJ0X2NsayksCisJREVGX0xPT0tVUCgiYXBwdGltZXIiLCAgJmFwcF90aW1lcl9jbGspLAorCURFRl9MT09LVVAoImNvaDkwMTQ2MS1rZXlwYWQiLCA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J1Y3QgdGVybWlvczIgewotCXRjZmxhZ190IGNfaWZsYWc7ICAgICAgICAgICAgICAgLyogaW5wdXQgbW9kZSBmbGFncyAqLwotCXRjZmxhZ190IGNfb2ZsYWc7ICAgICAgICAgICAgICAgLyogb3V0cHV0IG1vZGUgZmxhZ3MgKi8KLQl0Y2ZsYWdfdCBjX2NmbGFnOyAgICAgICAgICAgICAgIC8qIGNvbnRyb2wgbW9kZSBmbGFncyAqLwotCXRjZmxhZ190IGNfbGZsYWc7ICAgICAgICAgICAgICAgLyogbG9jYWwgbW9kZSBmbGFncyAqLwotCWNjX3QgY19saW5lOyAgICAgICAgICAgICAgICAgICAgLyogbGluZSBkaXNjaXBsaW5lICovCi0JY2NfdCBjX2NjW05DQ1NdOyAgICAgICAgICAgICAgICAvKiBjb250cm9sIGNoYXJhY3RlcnMgKi8KLQlzcGVlZF90IGNfaXNwZWVkOyAgICAgICAgICAgICAgIC8qIGlucHV0IHNwZWVkICovCi0Jc3BlZWRfdCBjX29zcGVlZDsgICAgICAgICAgICAgICAvKiBvdXRwdXQgc3BlZWQgKi8KLX07Ci0KLXN0cnVjdCBrdGVybWlvcyB7Ci0JdGNmbGFnX3QgY19pZmxhZzsgICAgICAgICAgICAgICAvKiBpbnB1dCBtb2RlIGZsYWdzICovCi0JdGNmbGFnX3QgY19vZmxhZzsgICAgICAgICAgICAgICAvKiBvdXRwdXQgbW9kZSBmbGFncyAqLwotCXRjZmxhZ190IGNfY2ZsYWc7ICAgICAgICAgICAgICAgLyogY29udHJvbCBtb2RlIGZsYWdzICovCi0JdGNmbGFnX3QgY19sZmxhZzsgICAgICAgICAgICAgICAvKiBsb2NhbCBtb2RlIGZsYWdzICovCi0JY2NfdCBjX2xpbmU7ICAgICAgICAgICAgICAgICAgICAvKiBsaW5lIGRpc2NpcGxpbmUgKi8KLQljY190IGNfY2NbTkNDU107ICAgICAgICAgICAgICAgIC8qIGNvbnRyb2wgY2hhcmFjdGVycyAqLwotCXNwZWVkX3QgY19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TkgQEAKIAlwcmludGsoS0VSTl9JTkZPICJLZXJuZWwgTWFuYWdlZCBNZW1vcnk6ICVsZE1CXG4iLCBfcmFtZW5kID4+IDIwKTsKIAogCXByaW50ayhLRVJOX0lORk8gIk1lbW9yeSBtYXA6XG4iCi0JCUtFUk5fSU5GTyAiICBmaXhlZGNvZGUgPSAweCVwLTB4JXBcbiIKLQkJS0VSTl9JTkZPICIgIHRleHQgICAgICA9IDB4JXAtMHglcFxuIgotCQlLRVJOX0lORk8gIiAgcm9kYXRhICAgID0gMHglcC0weCVwXG4iCi0JCUtFUk5fSU5GTyAiICBic3MgICAgICAgPSAweCVwLTB4JXBcbiIKLQkJS0VSTl9JTkZPICIgIGRhdGEgICAgICA9IDB4JXAtMHglcFxuIgotCQlLRVJOX0lORk8gIiAgICBzdGFjayAgID0gMHglcC0weCVwXG4iCi0JCUtFUk5fSU5GTyAiICBpbml0ICAgICAgPSAweCVwLTB4JXBcbiIKLQkJS0VSTl9JTkZPICIgIGF2YWlsYWJsZSA9IDB4JXAtMHglcFxuIgorCSAgICAgICAiICBmaXhlZGNvZGUgPSAweCVwLTB4JXBcbiIKKwkgICAgICAgIiAgdGV4dCAgICAgID0gMHglcC0weCVwXG4iCisJICAgICAgICIgIHJvZGF0YSAgICA9IDB4JXAtMHglcFxuIgorCSAgICAgICAiICBic3MgICAgICAgPSAweCVwLTB4JXBcbiIKKwkgICAgICAgIiAgZGF0YSAgICAgID0gMHglcC0weCVwXG4iCisJICAgICAgICIgICAgc3RhY2sgICA9IDB4JXAtMHglcFxuIgorCSAgICAgICAiICBpbml0ICAgICAgPSAweCVwLTB4JXBcbiIKKwkgICAgICAgIiAgYXZhaWxhYmxlID0gMHglcC0weCVwXG4iCiAjaWZkZWYgQ09ORklHX01URF9VQ0xJTlVYCi0JCUtFUk5fSU5GTyAiICByb290ZnMgICAgPSAweCVwLTB4JXBcbiIKKwkgICAgICAgIiAgcm9vdGZzICAgID0gMHglcC0weCVwXG4iCiAjZW5kaWY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V0dXJuKDEsICh2KSkgPT0gMCkKIAorLyoKKyAqIDY0LWJpdCBhdG9taWMgb3BzCisgKi8KK3R5cGVkZWYgc3RydWN0IHsKKwl2b2xhdGlsZSBsb25nIGxvbmcgY291bnRlcjsKK30gYXRvbWljNjRfdDsKKworI2RlZmluZSBBVE9NSUM2NF9JTklUKGkpCXsgKGkpIH0KKworc3RhdGljIGlubGluZSBsb25nIGxvbmcgYXRvbWljNjRfcmVhZChhdG9taWM2NF90ICp2KQoreworCWxvbmcgbG9uZyBjb3VudGVyOworCisJYXNtKCJsZGQlSTEgJU0xLCUwIgorCSAgICA6ICI9ZSIoY291bnRlcikKKwkgICAgOiAibSIodi0+Y291bnRlcikpOworCXJldHVybiBjb3VudGVyOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgYXRvbWljNjRfc2V0KGF0b21pYzY0X3QgKnYsIGxvbmcgbG9uZyBpKQoreworCWFzbSB2b2xhdGlsZSgic3RkJUkwICUxLCVNMCIKKwkJICAgICA6ICI9bSIodi0+Y291bnRlcikKKwkJICAgICA6ICJlIihpKSk7Cit9CisKK2V4dGVybiBsb25nIGxvbmcgYXRvbWljNjRfaW5jX3JldHVybihhdG9taWM2NF90ICp2KTsKK2V4dGVybiBsb25nIGxvbmcgYXRvbWljNjRfZGVjX3JldHVybihhdG9taWM2NF90ICp2KTsKK2V4dGVybiBsb25nIGxvbmcgYXRvbWljNjRfYWRkX3JldHVybihsb25nIGxvbmcgaSwgYXRvbWljNjRfdCAqdik7CitleHRlcm4gbG9uZyBsb25nIGF0b21pYzY0X3N1Yl9yZXR1cm4obG9uZyBsb25nIGksIGF0b21pYzY0X3QgKnYpOworCitzdGF0aWMgaW5saW5lIGxvbmcgbG9uZyBhdG9taWM2NF9hZGRfbmVnYXRpdmUobG9uZyBsb25nIGksIGF0b21pYzY0X3QgKnYpCit7CisJcmV0dXJuIGF0b21pYzY0X2FkZF9yZXR1cm4oaSwgdikgPCAwOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgYXRvbWljNjRfYWRkKGxvbmcgbG9uZyBpLCBhdG9taWM2NF90ICp2KQoreworCWF0b21pYzY0X2FkZF9yZXR1cm4oaSwgdik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCBhdG9taWM2NF9zdWIobG9uZyBsb25nIGksIGF0b21pYzY0X3QgKnYpCit7CisJYXRvbWljNjRfc3ViX3JldHVybihpLCB2KTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGF0b21pYzY0X2luYyhhdG9taWM2NF90ICp2KQoreworCWF0b21pYzY0X2luY19yZXR1cm4odik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCBhdG9taWM2NF9kZWMoYXRvbWljNjRfdCAqdikKK3sKKwlhdG9taWM2NF9kZWNfcmV0dXJuKHYpOworfQorCisjZGVmaW5lIGF0b21pYzY0X3N1Yl9hbmRfdGVzdChpLHYpCShhdG9taWM2NF9zdWJfcmV0dXJuKChpKSwgKHYpKSA9PSAwKQorI2RlZmluZSBhdG9taWM2NF9kZWNfYW5kX3Rlc3QodikJKGF0b21pYzY0X2RlY19yZXR1cm4oKHYpKSA9PSAwKQorI2RlZmluZSBhdG9taWM2NF9pbmNfYW5kX3Rlc3QodikJKGF0b21pYzY0X2luY19yZXR1cm4oKHYpKSA9PSAwKQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKgogICogZXhjaGFuZ2UgdmFsdWUgd2l0aCBtZW1vcnkKICAqLworZXh0ZXJuIHVpbnQ2NF90IF9feGNoZ182NCh1aW50NjRfdCBpLCB2b2xhdGlsZSB2b2lkICp2KTsKKwogI2lmbmRlZiBDT05GSUdfRlJWX09VVE9GTElORV9BVE9NSUNfT1BTCiAKICNkZWZpbmUgeGNoZyhwdHIsIHgpCQkJCQkJCQlcCkBAIC0xNzQsOCArMjM2LDEwIEBACiAKICNkZWZpbmUgdGFzKHB0cikgKHh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Lmg+Ci0jaW5jbHVkZSA8bGludXgvY29tcGlsZXIuaD4gLyogbGlrZWx5ICovCi0jaW5jbHVkZSA8YXNtL3N5c3RlbS5oPiAvKiBsb2NhbF9pcnFfWFhYIGFuZCBmcmllbmRzICovCi0KLSNkZWZpbmUgQVRPTUlDX0lOSVQoaSkJCXsgKGkpIH0KLSNkZWZpbmUgYXRvbWljX3JlYWQodikJCSgodiktPmNvdW50ZXIpCi0jZGVmaW5lIGF0b21pY19zZXQodiwgaSkJKCgodiktPmNvdW50ZXIpID0gKGkpKQotCi0jZGVmaW5lIGF0b21pY19pbmModikJCShhdG9taWNfYWRkX3JldHVybigxLCAodikpKQotI2RlZmluZSBhdG9taWNfZGVjKHYpCQkoYXRvbWljX3N1Yl9yZXR1cm4oMSwgKHYpKSkKLQotI2RlZmluZSBhdG9taWNfYWRkKGksIHYpCShhdG9taWNfYWRkX3JldHVybihpLCAodikpKQotI2RlZmluZSBhdG9taWNfc3ViKGksIHYpCShhdG9taWNfc3ViX3JldHVybihpLCAodikpKQotCi0jZGVmaW5lIGF0b21pY19pbmNfcmV0dXJuKHYpCShhdG9taWNfYWRkX3JldHVybigxLCAodikpKQotI2RlZmluZSBhdG9taWNfZGVjX3JldHVybih2KQkoYXRvbWljX3N1Yl9yZXR1cm4oMSwgKHYpKSkKLQotI2RlZmluZSBhdG9taWNfaW5jX2FuZF90ZXN0KHYpCShhdG9taWNfYWRkX3JldHVybigxLCAodikpID09IDApCi0jZGVmaW5lIGF0b21pY19kZWNfYW5kX3Rlc3QodikJKGF0b21pY19zdWJfcmV0dXJuKDEsICh2KSkgPT0gMCkKLQotI2RlZmluZSBhdG9taWNfaW5jX25vdF96ZXJvKHYpCShhdG9taWNfYWRkX3VubGVzcygodiksIDEsIDApKQotCi0jZGVmaW5lIGF0b21pY19zdWJfYW5kX3Rlc3QoaSwgdikgKGF0b21pY19zdWJfcmV0dXJuKChpKSwgKHYpKSA9PSAwKQotCi1zdGF0aWMgaW5saW5lIGludCBh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NpbGl0aWVzLgorICovCisjaW5jbHVkZSA8bGludXgvaW5pdC5oPgorI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbnV4L3NlcmlhbF9yZWcuaD4KKyNpbmNsdWRlIDxsaW51eC9zcGlubG9jay5oPgorI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgorI2luY2x1ZGUgPGxpbnV4L3N0cmluZy5oPgorI2luY2x1ZGUgPGxpbnV4L2lvLmg+CisjaW5jbHVkZSA8YXNtL2Jvb3RpbmZvLmg+CisKKyNpbmNsdWRlIDxhc20vbWFjaC1hcjcvYXI3Lmg+CisjaW5jbHVkZSA8YXNtL21hY2gtYXI3L3Byb20uaD4KKworI2RlZmluZSBNQVhfRU5UUlkgODAKKworc3RydWN0IGVudl92YXIgeworCWNoYXIgKm5hbWU7CisJY2hhciAqdmFsdWU7Cit9OworCitzdGF0aWMgc3RydWN0IGVudl92YXIgYWRhbTJfZW52W01BWF9FTlRSWV07CisKK2NoYXIgKnByb21fZ2V0ZW52KGNvbnN0IGNoYXIgKm5hbWUpCit7CisJaW50IGk7CisJZm9yIChpID0gMDsgKGkgPCBNQVhfRU5UUlkpICYmIGFkYW0yX2VudltpXS5uYW1lOyBpKyspCisJCWlmICghc3RyY21wKG5hbWUsIGFkYW0yX2VudltpXS5uYW1lKSkKKwkJCXJldHVybiBhZGFtMl9lbnZbaV0udmFsdWU7CisKKwlyZXR1cm4gTlVMTDsKK30KK0VYUE9SVF9TWU1CT0wocHJvbV9nZXRlbnYpOworCitjaGFyICogX19pbml0IHByb21fZ2V0Y21kbGluZSh2b2lkKQoreworCXJldHVybiAmKGFyY3NfY21kbGluZVswXSk7Cit9CisKK3N0YXRpYyB2b2lkICBfX2luaXQgYXI3X2luaXRfY21kbGluZShpbnQgYXJnYywgY2hhciAqYXJndltdKQoreworCWNoYXIgKmNwOworCWludCBhY3RyOworCisJYWN0ciA9IDE7IC8qIEFsd2F5cyBpZ25vcmUgYX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IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9DRklfU1RBQT15CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCitDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1M9eQorQ09ORklHX01URF9QSFlTTUFQPXkKKyMgQ09ORklHX01URF9QSFlTTUFQX0NPTVBBVCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIExQRERSIGZsYXNoIG1lbW9yeSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfTFBERFIgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVREX1VCSSBpcyBub3Qgc2V0CisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWPXkKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfQ0RST01fUEtUQ0RW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lKHZvaWQpCit7CisJYXVfd3JpdGVsKDMsIEdQSU8yX0VOQUJMRSk7CS8qIHJlc2V0LCBjbG9jayBlbmFibGVkICovCisJYXVfc3luYygpOworCWF1X3dyaXRlbCgxLCBHUElPMl9FTkFCTEUpOwkvKiBjbG9jayBlbmFibGVkICovCisJYXVfc3luYygpOworfQorCisvKioKKyAqIGFsY2hlbXlfZ3BpbzJfZGlzYWJsZSAtIGRpc2FibGUgR1BJTzIgYmxvY2suCisgKgorICogRGlzYWJsZSBhbmQgcHV0IEdQSU8yIGJsb2NrIGluIGxvdy1wb3dlciBtb2RlLgorICovCitzdGF0aWMgaW5saW5lIHZvaWQgYWxjaGVteV9ncGlvMl9kaXNhYmxlKHZvaWQpCit7CisJYXVfd3JpdGVsKDIsIEdQSU8yX0VOQUJMRSk7CS8qIHJlc2V0LCBjbG9jayBkaXNhYmxlZCAqLworCWF1X3N5bmMoKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIHdyYXBwZXJzIGZvciBvbi1jaGlwIGdwaW9zOyBjYW4gYmUgdXNlZCBiZWZvcmUgZ3BpbyBjaGlwcyBoYXZlIGJlZW4KKyAqIHJlZ2lzdGVyZWQgd2l0aCBncGlvbGliLgorICovCitzdGF0aWMgaW5saW5lIGludCBhbGNoZW15X2dwaW9fZGlyZWN0aW9uX2lucHV0KGludCBncGlvKQoreworCXJldHVybiAoZ3BpbyA+PSBBTENIRU1ZX0dQSU8yX0JBU0UpID8KKwkJYWxjaGVteV9ncGlvMl9kaXJlY3Rpb25faW5wdXQoZ3BpbykgOgorCQlhbGNoZW15X2dwaW8xX2RpcmVjdGlvbl9pbnB1dChncGlvKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgYWxjaGVteV9ncGlvX2RpcmVjdGlvbl9vdXRwdXQoaW50IGdwaW8sIGludCB2KQoreworCXJldHVybiAoZ3BpbyA+PSBBTEN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lhbGNoZW15X2dwaW8yX3RvX2lycShncGlvKSA6CisJCWFsY2hlbXlfZ3BpbzFfdG9faXJxKGdwaW8pOworfQorCitzdGF0aWMgaW5saW5lIGludCBhbGNoZW15X2lycV90b19ncGlvKGludCBpcnEpCit7CisjaWYgZGVmaW5lZChDT05GSUdfU09DX0FVMTAwMCkKKwlyZXR1cm4gYXUxMDAwX2lycV90b19ncGlvKGlycSk7CisjZWxpZiBkZWZpbmVkKENPTkZJR19TT0NfQVUxMTAwKQorCXJldHVybiBhdTExMDBfaXJxX3RvX2dwaW8oaXJxKTsKKyNlbGlmIGRlZmluZWQoQ09ORklHX1NPQ19BVTE1MDApCisJcmV0dXJuIGF1MTUwMF9pcnFfdG9fZ3BpbyhpcnEpOworI2VsaWYgZGVmaW5lZChDT05GSUdfU09DX0FVMTU1MCkKKwlyZXR1cm4gYXUxNTUwX2lycV90b19ncGlvKGlycSk7CisjZWxpZiBkZWZpbmVkKENPTkZJR19TT0NfQVUxMjAwKQorCXJldHVybiBhdTEyMDBfaXJxX3RvX2dwaW8oaXJxKTsKKyNlbHNlCisJcmV0dXJuIC1FTlhJTzsKKyNlbmRpZgorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogTGludXggZ3BpbyBmcmFtZXdvcmsgaW50ZWdyYXRpb24uCisgKgorICogNCB1c2UgY2FzZXMgb2YgQXUxMDAwLUF1MTIwMCBHUElPUzoKKyAqKDEpIEdQSU9MSUI9eSwgQUxDSEVNWV9HUElPX0lORElSRUNUPXk6CisgKglCb2FyZCBtdXN0IHJlZ2lzdGVyIGdwaW9jaGlwcy4KKyAqKDIpIEdQSU9MSUI9eSwgQUxDSEVNWV9HUElPX0lORElSRUNUPW46CisgKgkyICgxIGZvciBBdTEwMDApIGdwaW9fY2hpcHMgYXJlIHJlZ2lzdGVyZWQuCisgKgorICooMykgR1BJT0xJQj1uLCBBTENIRU1Z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NjRfdCByZXNlcnZlZF80OF80OToyOworCQl1aW50NjRfdCBwa3RfcG9wMDoxOworCQl1aW50NjRfdCBwa3RfcG9wMToxOworCQl1aW50NjRfdCBkMF9tZW06MTsKKwkJdWludDY0X3QgZDFfbWVtOjE7CisJCXVpbnQ2NF90IGQyX21lbToxOworCQl1aW50NjRfdCBkM19tZW06MTsKKwkJdWludDY0X3QgZDRfbWVtOjE7CisJCXVpbnQ2NF90IGRzX21lbToxOworCQl1aW50NjRfdCByZXNlcnZlZF8zNl8zOTo0OworCQl1aW50NjRfdCBkMF9wc3Q6MTsKKwkJdWludDY0X3QgZDFfcHN0OjE7CisJCXVpbnQ2NF90IGQyX3BzdDoxOworCQl1aW50NjRfdCBkM19wc3Q6MTsKKwkJdWludDY0X3QgZDRfcHN0OjE7CisJCXVpbnQ2NF90IG4ycDBfYzoxOworCQl1aW50NjRfdCBuMnAwX286MTsKKwkJdWludDY0X3QgbjJwMV9jOjE7CisJCXVpbnQ2NF90IG4ycDFfbzoxOworCQl1aW50NjRfdCBjcGxfcDA6MTsKKwkJdWludDY0X3QgY3BsX3AxOjE7CisJCXVpbnQ2NF90IHAybjFfcG86MTsKKwkJdWludDY0X3QgcDJuMV9ubzoxOworCQl1aW50NjRfdCBwMm4xX2NvOjE7CisJCXVpbnQ2NF90IHAybjBfcG86MTsKKwkJdWludDY0X3QgcDJuMF9ubzoxOworCQl1aW50NjRfdCBwMm4wX2NvOjE7CisJCXVpbnQ2NF90IHAybjBfYzA6MTsKKwkJdWludDY0X3QgcDJuMF9jMToxOworCQl1aW50NjRfdCBwMm4wX246MTsKKwkJdWludDY0X3QgcDJuMF9wMDoxOworCQl1aW50NjRfdCBwMm4wX3AxOjE7CisJCXVpbnQ2NF90IHAybjFfYzA6MTsKKwkJdWludDY0X3QgcDJuMV9jMToxOworCQl1aW50NjRfdCBwMm4xX246MTsKKwkJdWludDY0X3QgcDJuMV9wMDoxOworCQl1aW50NjRfdCBwMm4xX3AxOjE7CisJCXVpb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aW9iMmJpZzoxOworCQl1aW50NjRfdCBiYXIwX3RvOjE7CisJCXVpbnQ2NF90IHJtbF93dG86MTsKKwkJdWludDY0X3Qgcm1sX3J0bzoxOworCX0gczsKKwlzdHJ1Y3QgY3ZteF9ucGVpX2ludF9lbmIyX3MgY241Mnh4OworCXN0cnVjdCBjdm14X25wZWlfaW50X2VuYjJfY241Mnh4cDEgeworCQl1aW50NjRfdCByZXNlcnZlZF82Ml82MzoyOworCQl1aW50NjRfdCBpbnRfYToxOworCQl1aW50NjRfdCBjMV9sZHduOjE7CisJCXVpbnQ2NF90IGMwX2xkd246MTsKKwkJdWludDY0X3QgYzFfZXhjOjE7CisJCXVpbnQ2NF90IGMwX2V4YzoxOworCQl1aW50NjRfdCBjMV91cF93ZjoxOworCQl1aW50NjRfdCBjMF91cF93ZjoxOworCQl1aW50NjRfdCBjMV91bl93ZjoxOworCQl1aW50NjRfdCBjMF91bl93ZjoxOworCQl1aW50NjRfdCBjMV91bl9ieDoxOworCQl1aW50NjRfdCBjMV91bl93aToxOworCQl1aW50NjRfdCBjMV91bl9iMjoxOworCQl1aW50NjRfdCBjMV91bl9iMToxOworCQl1aW50NjRfdCBjMV91bl9iMDoxOworCQl1aW50NjRfdCBjMV91cF9ieDoxOworCQl1aW50NjRfdCBjMV91cF93aToxOworCQl1aW50NjRfdCBjMV91cF9iMjoxOworCQl1aW50NjRfdCBjMV91cF9iMToxOworCQl1aW50NjRfdCBjMV91cF9iMDoxOworCQl1aW50NjRfdCBjMF91bl9ieDoxOworCQl1aW50NjRfdCBjMF91bl93aToxOworCQl1aW50NjRfdCBjMF91bl9iMjoxOworCQl1aW50NjRfdCBjMF91bl9iMToxOworCQl1aW50NjRfdCBjMF91bl9iMDoxOworCQl1aW50NjRfdCBjMF91cF9ieDoxOworCQl1aW50NjRfdCBjMF91cF93aToxOworCQl1aW50NjRfdCBjMF91cF9iMjoxOworCQl1aW50NjRfdCBjMF91cF9iMToxOworCQl1aW50NjRfdCBjMF91cF9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W1fY241Nnh4cDEgeworCQl1aW50NjRfdCBtaW9faW50YToxOworCQl1aW50NjRfdCByZXNlcnZlZF82MV82MjoyOworCQl1aW50NjRfdCBjMV9sZHduOjE7CisJCXVpbnQ2NF90IGMwX2xkd246MTsKKwkJdWludDY0X3QgYzFfZXhjOjE7CisJCXVpbnQ2NF90IGMwX2V4YzoxOworCQl1aW50NjRfdCBjMV91cF93ZjoxOworCQl1aW50NjRfdCBjMF91cF93ZjoxOworCQl1aW50NjRfdCBjMV91bl93ZjoxOworCQl1aW50NjRfdCBjMF91bl93ZjoxOworCQl1aW50NjRfdCBjMV91bl9ieDoxOworCQl1aW50NjRfdCBjMV91bl93aToxOworCQl1aW50NjRfdCBjMV91bl9iMjoxOworCQl1aW50NjRfdCBjMV91bl9iMToxOworCQl1aW50NjRfdCBjMV91bl9iMDoxOworCQl1aW50NjRfdCBjMV91cF9ieDoxOworCQl1aW50NjRfdCBjMV91cF93aToxOworCQl1aW50NjRfdCBjMV91cF9iMjoxOworCQl1aW50NjRfdCBjMV91cF9iMToxOworCQl1aW50NjRfdCBjMV91cF9iMDoxOworCQl1aW50NjRfdCBjMF91bl9ieDoxOworCQl1aW50NjRfdCBjMF91bl93aToxOworCQl1aW50NjRfdCBjMF91bl9iMjoxOworCQl1aW50NjRfdCBjMF91bl9iMToxOworCQl1aW50NjRfdCBjMF91bl9iMDoxOworCQl1aW50NjRfdCBjMF91cF9ieDoxOworCQl1aW50NjRfdCBjMF91cF93aToxOworCQl1aW50NjRfdCBjMF91cF9iMjoxOworCQl1aW50NjRfdCBjMF91cF9iMToxOworCQl1aW50NjRfdCBjMF91cF9iMDoxOworCQl1aW50NjRfdCBjMV9ocGludDoxOworCQl1aW50NjRfdCBjMV9wbWVpOjE7CisJCXVpbnQ2NF90IGMxX3dha2U6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMjlfMjk6MTsKKwkJdWludDY0X3QgYzFfc2U6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRf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sKKwkJdWludDY0X3QgYzFfZXhjOjE7CisJCXVpbnQ2NF90IGMwX2V4YzoxOworCQl1aW50NjRfdCBjMV91cF93ZjoxOworCQl1aW50NjRfdCBjMF91cF93ZjoxOworCQl1aW50NjRfdCBjMV91bl93ZjoxOworCQl1aW50NjRfdCBjMF91bl93ZjoxOworCQl1aW50NjRfdCBjMV91bl9ieDoxOworCQl1aW50NjRfdCBjMV91bl93aToxOworCQl1aW50NjRfdCBjMV91bl9iMjoxOworCQl1aW50NjRfdCBjMV91bl9iMToxOworCQl1aW50NjRfdCBjMV91bl9iMDoxOworCQl1aW50NjRfdCBjMV91cF9ieDoxOworCQl1aW50NjRfdCBjMV91cF93aToxOworCQl1aW50NjRfdCBjMV91cF9iMjoxOworCQl1aW50NjRfdCBjMV91cF9iMToxOworCQl1aW50NjRfdCBjMV91cF9iMDoxOworCQl1aW50NjRfdCBjMF91bl9ieDoxOworCQl1aW50NjRfdCBjMF91bl93aToxOworCQl1aW50NjRfdCBjMF91bl9iMjoxOworCQl1aW50NjRfdCBjMF91bl9iMToxOworCQl1aW50NjRfdCBjMF91bl9iMDoxOworCQl1aW50NjRfdCBjMF91cF9ieDoxOworCQl1aW50NjRfdCBjMF91cF93aToxOworCQl1aW50NjRfdCBjMF91cF9iMjoxOworCQl1aW50NjRfdCBjMF91cF9iMToxOworCQl1aW50NjRfdCBjMF91cF9iMDoxOworCQl1aW50NjRfdCBjMV9ocGludDoxOworCQl1aW50NjRfdCBjMV9wbWVpOjE7CisJCXVpbnQ2NF90IGMxX3dha2U6MTsKKwkJdWludDY0X3QgY3JzMV9kcjoxOworCQl1aW50NjRfdCBjMV9zZToxOworCQl1aW50NjRfdCBjcnMxX2VyOjE7CisJCXVpbnQ2NF90IGMxX2Flcmk6MTsKKwkJdWludDY0X3QgYzBfaHBpbnQ6MTsKKwkJdWludDY0X3QgYzBfcG1laToxOworCQl1aW50NjRfdCBjMF93YWtlOjE7CisJCXVpbnQ2NF90IGNyczBfZHI6MTsK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fcnNsX2ludF9ibG9ja3MgeworCXVpbnQ2NF90IHU2NDsKKwlzdHJ1Y3QgY3ZteF9ucGlfcnNsX2ludF9ibG9ja3NfcyB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzMyXzYzOjMyOworCQl1aW50NjRfdCByaW50XzMxOjE7CisJCXVpbnQ2NF90IGlvYjoxOworCQl1aW50NjRfdCByZXNlcnZlZF8yOF8yOToyOworCQl1aW50NjRfdCByaW50XzI3OjE7CisJCXVpbnQ2NF90IHJpbnRfMjY6MTsKKwkJdWludDY0X3QgcmludF8yNToxOworCQl1aW50NjRfdCByaW50XzI0OjE7CisJCXVpbnQ2NF90IGFzeDE6MTsKKwkJdWludDY0X3QgYXN4MDoxOworCQl1aW50NjRfdCByaW50XzIxOjE7CisJCXVpbnQ2NF90IHBpcDoxOworCQl1aW50NjRfdCBzcHgxOjE7CisJCXVpbnQ2NF90IHNweDA6MTsKKwkJdWludDY0X3QgbG1jOjE7CisJCXVpbnQ2NF90IGwyYzoxOworCQl1aW50NjRfdCByaW50XzE1OjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzEzXzE0OjI7CisJCXVpbnQ2NF90IHBvdzoxOworCQl1aW50NjRfdCB0aW06MTsKKwkJdWludDY0X3QgcGtvOjE7CisJCXVpbnQ2NF90IGlwZDoxOworCQl1aW50NjRfdCByaW50Xzg6MTsKKwkJdWludDY0X3QgemlwOjE7CisJCXVpbnQ2NF90IGRmYToxOworCQl1aW50NjRfdCBmcGE6MTsKKwkJdWludDY0X3Qga2V5OjE7CisJCXVpbnQ2NF90IG5waToxOworCQl1aW50NjRfdCBnbXgxOjE7CisJCXVpbnQ2NF90IGdteDA6MTsKKwkJdWludDY0X3QgbWlvOjE7CisJfSBzOworCXN0cnVjdCBjdm14X25waV9yc2xfaW50X2Jsb2Nrc19jbjMweHggeworCQl1aW50NjRfdCByZXNlcnZlZF8zMl82MzozMjsKKwkJdWludDY0X3QgcmludF8zMToxOworCQl1aW50NjRfdCBpb2I6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ODoxOworCQl1aW50NjRfdCByaW50XzI3OjE7CisJCXVpbnQ2NF90IHJpbnRfMjY6MTsKKwkJdWludDY0X3QgcmludF8yNToxOworCQl1aW50NjRfdCByaW50XzI0OjE7CisJCXVpbnQ2NF90IGFzeDE6MTsKKwkJdWludDY0X3QgYXN4MDoxOworCQl1aW50NjRfdCByaW50XzIxOjE7CisJCXVpbnQ2NF90IHBpcDoxOworCQl1aW50NjRfdCBzcHgxOjE7CisJCXVpbnQ2NF90IHNweDA6MTsKKwkJdWludDY0X3QgbG1jOjE7CisJCXVpbnQ2NF90IGwyYzoxOworCQl1aW50NjRfdCByaW50XzE1OjE7CisJCXVpbnQ2NF90IHJpbnRfMTQ6MTsKKwkJdWludDY0X3QgcmludF8xMzoxOworCQl1aW50NjRfdCBwb3c6MTsKKwkJdWludDY0X3QgdGltOjE7CisJCXVpbnQ2NF90IHBrbzoxOworCQl1aW50NjRfdCBpcGQ6MTsKKwkJdWludDY0X3QgcmludF84OjE7CisJCXVpbnQ2NF90IHppcDoxOworCQl1aW50NjRfdCBkZmE6MTsKKwkJdWludDY0X3QgZnBhOjE7CisJCXVpbnQ2NF90IGtleToxOworCQl1aW50NjRfdCBucGk6MTsKKwkJdWludDY0X3QgZ214MToxOworCQl1aW50NjRfdCBnbXgwOjE7CisJCXVpbnQ2NF90IG1pbzoxOworCX0gY24zOHh4OworCXN0cnVjdCBjdm14X25waV9yc2xfaW50X2Jsb2Nrc19jbjM4eHggY24zOHh4cDI7CisJc3RydWN0IGN2bXhfbnBpX3JzbF9pbnRfYmxvY2tzX2NuNTB4eCB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzMxXzYzOjMzOworCQl1aW50NjRfdCBpb2I6MTsKKwkJdWludDY0X3QgbG1jMToxOworCQl1aW50NjRfdCBhZ2w6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMjRfMjc6NDsKKwkJdWludDY0X3QgYXN4MToxOworCQl1aW50NjRfdCBhc3gwOjE7CisJCXVpbnQ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MzoxOworCQl1aW50NjRfdCBwdGltZTI6MTsKKwkJdWludDY0X3QgcHRpbWUxOjE7CisJCXVpbnQ2NF90IHB0aW1lMDoxOworCQl1aW50NjRfdCBwY250MzoxOworCQl1aW50NjRfdCBwY250MjoxOworCQl1aW50NjRfdCBwY250MToxOworCQl1aW50NjRfdCBwY250MDoxOworCQl1aW50NjRfdCByc2xfaW50OjE7CisJCXVpbnQ2NF90IGlsbF9ycmQ6MTsKKwkJdWludDY0X3QgaWxsX3J3cjoxOworCQl1aW50NjRfdCBkcGVycjoxOworCQl1aW50NjRfdCBhcGVycjoxOworCQl1aW50NjRfdCBzZXJyOjE7CisJCXVpbnQ2NF90IHRzcl9hYnQ6MTsKKwkJdWludDY0X3QgbXNjX21zZzoxOworCQl1aW50NjRfdCBtc2lfbWFidDoxOworCQl1aW50NjRfdCBtc2lfdGFidDoxOworCQl1aW50NjRfdCBtc2lfcGVyOjE7CisJCXVpbnQ2NF90IG1yX3R0bzoxOworCQl1aW50NjRfdCBtcl9hYnQ6MTsKKwkJdWludDY0X3QgdHJfYWJ0OjE7CisJCXVpbnQ2NF90IG1yX3d0dG86MTsKKwkJdWludDY0X3QgbXJfd2FidDoxOworCQl1aW50NjRfdCB0cl93YWJ0OjE7CisJfSBzOworCXN0cnVjdCBjdm14X3BjaV9pbnRfc3VtMl9jbjMweHggeworCQl1aW50NjRfdCByZXNlcnZlZF8zNF82MzozMDsKKwkJdWludDY0X3QgaWxsX3JkOjE7CisJCXVpbnQ2NF90IGlsbF93cjoxOworCQl1aW50NjRfdCB3aW5fd3I6MTsKKwkJdWludDY0X3QgZG1hMV9maToxOworCQl1aW50NjRfdCBkbWEwX2ZpOjE7CisJCXVpbnQ2NF90IGR0aW1lMToxOworCQl1aW50NjRfdCBkdGltZTA6MTsKKwkJdWludDY0X3QgZGNudDE6MTsKKwkJdWludDY0X3QgZGNudDA6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMjJfMjQ6MzsKKwkJdWludDY0X3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F0b21pY19hZGRfcmV0dXJuKCAgIDEsKHYpKSkpCiAjZGVmaW5lIGF0b21pY19kZWModikJKCh2b2lkKShfX2F0b21pY19hZGRfcmV0dXJuKCAgLTEsKHYpKSkpCiAKLSNkZWZpbmUgYXRvbWljX2FkZF9yZXR1cm4oaSx2KQkoX19hdG9taWNfYWRkX3JldHVybiggKChpbnQpKGkpKSwodikpKQotI2RlZmluZSBhdG9taWNfc3ViX3JldHVybihpLHYpCShfX2F0b21pY19hZGRfcmV0dXJuKC0oKGludCkoaSkpLCh2KSkpCisjZGVmaW5lIGF0b21pY19hZGRfcmV0dXJuKGksdikJKF9fYXRvbWljX2FkZF9yZXR1cm4oIChpKSwodikpKQorI2RlZmluZSBhdG9taWNfc3ViX3JldHVybihpLHYpCShfX2F0b21pY19hZGRfcmV0dXJuKC0oaSksKHYpKSkKICNkZWZpbmUgYXRvbWljX2luY19yZXR1cm4odikJKF9fYXRvbWljX2FkZF9yZXR1cm4oICAgMSwodikpKQogI2RlZmluZSBhdG9taWNfZGVjX3JldHVybih2KQkoX19hdG9taWNfYWRkX3JldHVybiggIC0xLCh2KSkpCiAKQEAgLTMzNiw3ICszMzYsMTEgQEAKIAogI2RlZmluZSBhdG9taWM2NF9pbmNfbm90X3plcm8odikgYXRvbWljNjRfYWRkX3VubGVzcygodiksIDEsIDApCiAKLSNlbmRpZiAvKiBDT05GSUdfNjRCSVQgKi8KKyNlbHNlIC8qIENPTkZJR182NEJJVCAqLworCisjaW5jbHVkZSA8YXNtLWdlbmVyaWMvYXRvbWljNjQuaD4KKworI2VuZGlmIC8qICFDT05GSUdfNjRCSVQgKi8KIAogI2luY2x1ZGUgPGFzbS1nZW5lcmljL2F0b21pYy1sb25nLmg+CiAKZGlmZiAtLWdpdCBhL2FyY2gvcGFyaXNjL2luY2x1ZGUvYXNtL2RtYS5oIGIvYXJjaC9wYXJpc2MvaW5jbHVkZS9hc20vZG1hLmgKaW5kZXggMzFhZDBmMC4uZjdhMThmOSAxMDA2N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FlvdXIgU3lzdGVtIGF0ZSBhIFNQQVJDISBHYWghID5cbiIKLUtFUk5fQ1JJVCAiICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBcbiIKLUtFUk5fQ1JJVCAiICAgICAgICAgICAgIFxcICAgXl9fXlxuIgotS0VSTl9DUklUICIgICAgICAgICAgICAgIFxcICAoeHgpXFxfX19fX19fXG4iCi1LRVJOX0NSSVQgIiAgICAgICAgICAgICAgICAgKF9fKVxcICAgICAgIClcXC9cXFxuIgotS0VSTl9DUklUICIgICAgICAgICAgICAgICAgICBVICB8fC0tLS13IHxcbiIKLUtFUk5fQ1JJVCAiICAgICAgICAgICAgICAgICAgICAgfHwgICAgIHx8XG4iKTsKKwlpZiAoZXJyKSBwcmludGsoS0VSTl9DUklUCisJCQkiICAgICAgX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXyBcbiIKKwkJCSIgICAgIDwgWW91ciBTeXN0ZW0gYXRlIGEgU1BBUkMhIEdhaCEgPlxuIgorCQkJIiAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gXG4iCisJCQkiICAgICAgICAgICAgIFxcICAgXl9fXlxuIgorCQkJIiAgICAgICAgICAgICAgICAgKF9fKVxcICAgICAgIClcXC9cXFxuIgorCQkJIiAgICAgICAgICAgICAgICAgIFUgIHx8LS0tLXcgfFxuIgorCQkJIiAgICAgICAgICAgICAgICAgICAgIHx8ICAgICB8fFxuIik7CiAJCiAJLyogdW5sb2NrIHRoZSBwZGMgbG9jayBpZiBuZWNlc3NhcnkgKi8KIAlwZGNfZW1lcmdlbmN5X3VubG9jaygpOwpAQCAtNTMzLDcgKzUzMiw3IEBACiAJICAJLyogS2lsbCB0aGUgdXNlciBwcm9jZXNzIGxhdGVyICovCiAJICAJcmVncy0+aWFvcVswXSA9IDAgfCAzOwogCQlyZWdzLT5pYW9xWzFdID0gcmVncy0+aWFvcVswXSArIDQ7Ci0JIAlyZWdzL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9OworCQkJCXRiaTA6IHRiaS1waHlAMTEgeworCQkJCQlyZWcgPSA8MHgxMT47CisJCQkJCWRldmljZV90eXBlID0gInRiaS1waHkiOworCQkJCX07CisJCQl9OworCQl9OworCisJCS8qIGVUU0VDIDIgKi8KKwkJZW5ldDE6IGV0aGVybmV0QDI1MDAwIHsKKwkJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkJI3NpemUtY2VsbHMgPSA8MT47CisJCQljZWxsLWluZGV4ID0gPDE+OworCQkJZGV2aWNlX3R5cGUgPSAibmV0d29yayI7CisJCQltb2RlbCA9ICJlVFNFQyI7CisJCQljb21wYXRpYmxlID0gImdpYW5mYXIiOworCQkJcmVnID0gPDB4MjUwMDAgMHgxMDAwPjsKKwkJCXJhbmdlcyA9IDwweDAgMHgyNTAwMCAweDEwMDA+OworCQkJbG9jYWwtbWFjLWFkZHJlc3MgPSBbIDAwIDAwIDAwIDAwIDAwIDAwIF07CisJCQlpbnRlcnJ1cHRzID0gPDM1IDIgMzYgMiA0MCAyPjsKKwkJCWludGVycnVwdC1wYXJlbnQgPSA8Jm1waWM+OworCQkJdGJpLWhhbmRsZSA9IDwmdGJpMT47CisJCQlwaHktaGFuZGxlID0gPCZwaHkxPjsKKwkJCXBoeS1jb25uZWN0aW9uLXR5cGUgPSAic2dtaWkiOworCisJCQltZGlvQDUyMCB7CisJCQkJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJCQkJI3NpemUtY2VsbHMgPSA8MD47CisJCQkJY29tcGF0aWJsZSA9ICJmc2wsZ2lhbmZhci10YmkiOworCQkJCXJlZyA9IDwweDUyMCAweDIwPjsKKworCQkJCXRiaTE6IHRiaS1waHlAMTEgeworCQkJCQlyZWcgPSA8MHgxMT47CisJCQkJCWRldmljZV90eXBlID0gInRiaS1waHkiOworCQkJCX07CisJCQl9OworCQl9OworCisJCS8qIFVBUlQwICovCisJCXNlcmlhbDA6IHNlcmlhbEA0NTAwIHsKKwkJCWNlbGwtaW5kZXggPSA8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ORklHX0JSSURHRT1tCisjIENPTkZJR19ORVRfRFNBIGlzIG5vdCBzZXQKK0NPTkZJR19WTEFOXzgwMjFRPXkKKyMgQ09ORklHX1ZMQU5fODAyMVFfR1ZSUCBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorQ09ORklHX0xMQz1tCisjIENPTkZJR19MTEMyIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lQWCBpcyBub3Qgc2V0CisjIENPTkZJR19BVEFMSyBpcyBub3Qgc2V0CisjIENPTkZJR19YMjUgaXMgbm90IHNldAorIyBDT05GSUdfTEFQQiBpcyBub3Qgc2V0CisjIENPTkZJR19FQ09ORVQgaXMgbm90IHNldAorIyBDT05GSUdfV0FOX1JPVVRFUiBpcyBub3Qgc2V0CisjIENPTkZJR19QSE9ORVQgaXMgbm90IHNldAorIyBDT05GSUdfSUVFRTgwMjE1NCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfU0NIRUQgaXMgbm90IHNldAorIyBDT05GSUdfRENCIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfQ0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lSREEgaXMgbm90IHNldAorIyBDT05GSUdfQlQgaXMgbm90IHNldAorIyBDT05GSUdfQUZfUlhSUEMgaXMgbm90IHNldAorIyBDT05GSUdfV0lSRUxFU1MgaXMgbm90IHNldAorIyBDT05GSUdfV0lNQVggaXMgbm90IHNldAorIyBDT05GSUdfUkZLSUxMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF85UCBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorQ09ORklHX01URF9DT05DQVQ9eQorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9URVNUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQorQ09ORklHX01URF9PRl9QQVJUUz15CisjIENPTkZJR19NVERfQVI3X1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0lOVEVMRVhUPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIWVNNQVAgaXMgbm90IHNldAorQ09ORklHX01URF9QSFlTTUFQX09GPXkKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIUkFNPXkKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIExQRERSIGZsYXNoIG1lbW9yeSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfTFBERFIgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworQ09ORklHX01URF9VQkk9eQorQ09ORklHX01URF9VQklfV0xfVEhSRVNIT0xEPTQwOTYKK0NPTkZJR19NVERfVUJJX0JFQl9SRVNFUlZFPTEKK0NPTkZJR19NVERfVUJJX0dMVUVCST15CisKKyMKKyMgVUJJIGRlYnVnZ2luZyBvcHRpb25zCisjCitDT05GSUdfTVREX1VCSV9ERUJVRz15CisjIENPTkZJR19NVERfVUJJX0RFQlVHX01TRyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfVUJJX0RFQlVHX1BBUkFOT0lEIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9VQklfREVCVUdfRElTQUJMRV9CR1QgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1VCSV9ERUJVR19FTVVMQVRFX0JJVEZMSVBTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9VQklfREVCVUdfRU1VTEFURV9XUklURV9GQUlMVVJFUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfVUJJX0RFQlVHX0VNVUxBVEVfRVJBU0VfRkFJTFVSRVMgaXMgbm90IHNldAorCisjCisjIEFkZGl0aW9uYWwgVUJJIGRlYnVnZ2luZyBtZXNzYWdlcworIworIyBDT05GSUdfTVREX1VCSV9ERUJVR19NU0dfQkxEIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9VQklfREVCVUdfTVNHX0VCQSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfVUJJX0RFQlVHX01TR19XTCBpcyBub3Qgc2V0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J0Ci0jCi0jIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAotIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAotIyBDT05GSUdfVklERU9fTUVESUEgaXMgbm90IHNldAotCi0jCi0jIE11bHRpbWVkaWEgZHJpdmVycwotIwotQ09ORklHX0RBQj15CisjIENPTkZJR19NRURJQV9TVVBQT1JUIGlzIG5vdCBzZXQKIAogIwogIyBHcmFwaGljcyBzdXBwb3J0CkBAIC03MjEsNiArNzM5LDEwIEBACiAjIENPTkZJR19ETUFERVZJQ0VTIGlzIG5vdCBzZXQKICMgQ09ORklHX0FVWERJU1BMQVkgaXMgbm90IHNldAogIyBDT05GSUdfVUlPIGlzIG5vdCBzZXQKKworIworIyBUSSBWTFlOUQorIwogIyBDT05GSUdfU1RBR0lORyBpcyBub3Qgc2V0CiAKICMKQEAgLTczMiwxMCArNzU0LDEyIEBACiAjIENPTkZJR19SRUlTRVJGU19GUyBpcyBub3Qgc2V0CiAjIENPTkZJR19KRlNfRlMgaXMgbm90IHNldAogIyBDT05GSUdfRlNfUE9TSVhfQUNMIGlzIG5vdCBzZXQKLUNPTkZJR19GSUxFX0xPQ0tJTkc9eQogIyBDT05GSUdfWEZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dGUzJfRlMgaXMgbm90IHNldAogIyBDT05GSUdfT0NGUzJfRlMgaXMgbm90IHNldAogIyBDT05GSUdfQlRSRlNfRlMgaXMgbm90IHNldAorQ09ORklHX0ZJTEVfTE9DS0lORz15CitDT05GSUdfRlNOT1RJRlk9eQogQ09ORklHX0ROT1RJRlk9eQogQ09ORklHX0lOT1RJRlk9eQogQ09ORklHX0lOT1RJRllfVVNFUj15CkBAIC04MzgsNiArODYyLDcgQEAKIENPTkZJR19IQVNfRE1BPXkKIENPTkZJR19IQVZFX0xNQj15CiBDT05GSUdfTkxBVFRSPXkKK0NPTkZJR19HRU5FUklDX0FUT01JQzY0PXkKIAogIwogIyBLZXJuZWwgaGFja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gc2V0CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1RFU1RTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUkVEQk9PVF9QQVJUUz15CitDT05GSUdfTVREX1JFREJPT1RfRElSRUNUT1JZX0JMT0NLPS0xCisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUU19VTkFMTE9DQVRFRCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUU19SRUFET05MWSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQorQ09ORklHX01URF9PRl9QQVJUUz15CisjIENPTkZJR19NVERfQVI3X1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0pFREVDUFJPQkU9eQorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9DRklfU1RBQT15CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVBfT0Y9eQorIyBDT05GSUdfTVREX0lOVEVMX1ZSX05PUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfUE1DNTUxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkQ9eQorIyBDT05GSUdfTVREX05BTkRfVkVSSUZZX1dSSVRFIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX0VDQ19TTUMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfTVVTRVVNX0lEUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkRfSURTPXkKKyMgQ09ORklHX01URF9OQU5EX0RJU0tPTkNISVAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfQ0FGRSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9OQU5EU0lNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1BMQVRGT1JNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BTEFVREEgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0ZTTF9FTEJDPXkKK0NPTkZJR19NVERfTkFORF9GU0xfVVBNPXkKKyMgQ09ORklHX01URF9PTkVOQU5EIGlzIG5vdCBzZXQKKworIworIyBMUEREUiBmbGFzaCBtZW1vcnkgZHJpdmVycworIworIyBDT05GSUdfTVREX0xQRERSIGlzIG5vdCBzZXQKKworIworIyBVQkkgLSBVbnNvcnRlZCBibG9jayBpbWFnZXMKKyMKKyMgQ09ORklHX01URF9VQkkgaXMgbm90IHNldAorQ09ORklHX09GX0RFVklDRT15CitDT05GSUdfT0ZfR1BJTz15CitDT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bm90IHNldAorQ09ORklHX0lERT15CisKKyMKKyMgUGxlYXNlIHNlZSBEb2N1bWVudGF0aW9uL2lkZS9pZGUudHh0IGZvciBoZWxwL2luZm8gb24gSURFIGRyaXZlcworIworIyBDT05GSUdfQkxLX0RFVl9JREVfU0FUQSBpcyBub3Qgc2V0CitDT05GSUdfSURFX0dEPXkKK0NPTkZJR19JREVfR0RfQVRBPXkKKyMgQ09ORklHX0lERV9HRF9BVEFQSSBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9JREVDUz15CisjIENPTkZJR19CTEtfREVWX0lERUNEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFVEFQRSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CitDT05GSUdfSURFX1BST0NfRlM9eQorCisjCisjIElERSBjaGlwc2V0IHN1cHBvcnQvYnVnZml4ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfUExBVEZPUk0gaXMgbm90IHNldAorCisjCisjIFBDSSBJREUgY2hpcHNldHMgc3VwcG9ydAorIworIyBDT05GSUdfQkxLX0RFVl9HRU5FUklDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfT1BUSTYyMSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0FFQzYyWFggaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9BTEkxNVgzIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQU1ENzRYWCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0NNRDY0WCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX1RSSUZMRVggaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9DUzU1MjAgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9DUzU1MzAgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9IUFQzNjYgaXMgbm90IHNldAorIyBD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R19JREUgaXMgbm90IHNldAorQ09ORklHX0lERT15CisKKyMKKyMgUGxlYXNlIHNlZSBEb2N1bWVudGF0aW9uL2lkZS9pZGUudHh0IGZvciBoZWxwL2luZm8gb24gSURFIGRyaXZlcworIworIyBDT05GSUdfQkxLX0RFVl9JREVfU0FUQSBpcyBub3Qgc2V0CitDT05GSUdfSURFX0dEPXkKK0NPTkZJR19JREVfR0RfQVRBPXkKKyMgQ09ORklHX0lERV9HRF9BVEFQSSBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9JREVDUz15CisjIENPTkZJR19CTEtfREVWX0lERUNEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFVEFQRSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CitDT05GSUdfSURFX1BST0NfRlM9eQorCisjCisjIElERSBjaGlwc2V0IHN1cHBvcnQvYnVnZml4ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfUExBVEZPUk0gaXMgbm90IHNldAorCisjCisjIFBDSSBJREUgY2hpcHNldHMgc3VwcG9ydAorIworIyBDT05GSUdfQkxLX0RFVl9HRU5FUklDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfT1BUSTYyMSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0FFQzYyWFggaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9BTEkxNVgzIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQU1ENzRYWCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0NNRDY0WCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX1RSSUZMRVggaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9DUzU1MjAgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9DUzU1MzAgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9IUFQzNjYgaXMgbm90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FX0JJVD15CitDT05GSUdfREVGQVVMVF9NTUFQX01JTl9BRERSPTQwOTYKIENPTkZJR19QUENfNEtfUEFHRVM9eQogIyBDT05GSUdfUFBDXzE2S19QQUdFUyBpcyBub3Qgc2V0CiAjIENPTkZJR19QUENfNjRLX1BBR0VTIGlzIG5vdCBzZXQKQEAgLTMxMyw2ICszMzAsNyBAQAogIyBDT05GSUdfTkVUX0lQSVAgaXMgbm90IHNldAogIyBDT05GSUdfTkVUX0lQR1JFIGlzIG5vdCBzZXQKICMgQ09ORklHX0lQX01ST1VURSBpcyBub3Qgc2V0CisjIENPTkZJR19BUlBEIGlzIG5vdCBzZXQKIENPTkZJR19TWU5fQ09PS0lFUz15CiAjIENPTkZJR19JTkVUX0FIIGlzIG5vdCBzZXQKICMgQ09ORklHX0lORVRfRVNQIGlzIG5vdCBzZXQKQEAgLTM3NCw3ICszOTIsMTEgQEAKIENPTkZJR19XSVJFTEVTU19PTERfUkVHVUxBVE9SWT15CiAjIENPTkZJR19XSVJFTEVTU19FWFQgaXMgbm90IHNldAogIyBDT05GSUdfTElCODAyMTEgaXMgbm90IHNldAotIyBDT05GSUdfTUFDODAyMTEgaXMgbm90IHNldAorCisjCisjIENGRzgwMjExIG5lZWRzIHRvIGJlIGVuYWJsZWQgZm9yIE1BQzgwMjExCisjCitDT05GSUdfTUFDODAyMTFfREVGQVVMVF9QU19WQUxVRT0wCiAjIENPTkZJR19XSU1BWCBpcyBub3Qgc2V0CiAjIENPTkZJR19SRktJTEwgaXMgbm90IHNldAogCkBAIC00ODQsNiArNTA2LDcgQEAKICMgQ09ORklHX01URF9VQkkgaXMgbm90IHNldAogQ09ORklHX09GX0RFVklDRT15CiBDT05GSUdfT0ZfR1BJTz15CitDT05GSUdfT0ZfTURJTz15CiAjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKIENPTkZJR19CTEtfREVWPXkKICMgQ09ORklHX0JMS19ERVZfRkQgaXMgbm90IHNldApAQCAtNTIzLDEzICs1NDY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itDT05GSUdfREVGQVVMVF9NTUFQX01JTl9BRERSPTQwOTYKIENPTkZJR19QUENfNEtfUEFHRVM9eQogIyBDT05GSUdfUFBDXzE2S19QQUdFUyBpcyBub3Qgc2V0CiAjIENPTkZJR19QUENfNjRLX1BBR0VTIGlzIG5vdCBzZXQKQEAgLTMwMyw2ICszMTksNyBAQAogIyBDT05GSUdfTkVUX0lQSVAgaXMgbm90IHNldAogIyBDT05GSUdfTkVUX0lQR1JFIGlzIG5vdCBzZXQKICMgQ09ORklHX0lQX01ST1VURSBpcyBub3Qgc2V0CisjIENPTkZJR19BUlBEIGlzIG5vdCBzZXQKIENPTkZJR19TWU5fQ09PS0lFUz15CiAjIENPTkZJR19JTkVUX0FIIGlzIG5vdCBzZXQKICMgQ09ORklHX0lORVRfRVNQIGlzIG5vdCBzZXQKQEAgLTM4Myw3ICs0MDAsMTEgQEAKIENPTkZJR19XSVJFTEVTU19PTERfUkVHVUxBVE9SWT15CiAjIENPTkZJR19XSVJFTEVTU19FWFQgaXMgbm90IHNldAogIyBDT05GSUdfTElCODAyMTEgaXMgbm90IHNldAotIyBDT05GSUdfTUFDODAyMTEgaXMgbm90IHNldAorCisjCisjIENGRzgwMjExIG5lZWRzIHRvIGJlIGVuYWJsZWQgZm9yIE1BQzgwMjExCisjCitDT05GSUdfTUFDODAyMTFfREVGQVVMVF9QU19WQUxVRT0wCiAjIENPTkZJR19XSU1BWCBpcyBub3Qgc2V0CiAjIENPTkZJR19SRktJTEwgaXMgbm90IHNldAogCkBAIC00ODksNiArNTEwLDcgQEAKICMgQ09ORklHX01URF9VQkkgaXMgbm90IHNldAogQ09ORklHX09GX0RFVklDRT15CiBDT05GSUdfT0ZfR1BJTz15CitDT05GSUdfT0ZfTURJTz15CiAjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKIENPTkZJR19CTEtfREVWPXkKICMgQ09ORklHX0JMS19ERVZfRkQgaXMgbm90IHNldApAQCAtNTI0LDEzICs1NDYsMTcgQEAKIC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kEgaXMgbm90IHNldAogIyBDT05GSUdfU0VOU09SU19WVDEyMTEgaXMgbm90IHNldAogIyBDT05GSUdfU0VOU09SU19WVDgyMzEgaXMgbm90IHNldApAQCAtMTEwNCwyNCArMTEzNyw5IEBACiAjIENPTkZJR19NRkRfV004NDAwIGlzIG5vdCBzZXQKICMgQ09ORklHX01GRF9XTTgzNTBfSTJDIGlzIG5vdCBzZXQKICMgQ09ORklHX01GRF9QQ0Y1MDYzMyBpcyBub3Qgc2V0CisjIENPTkZJR19BQjMxMDBfQ09SRSBpcyBub3Qgc2V0CiAjIENPTkZJR19SRUdVTEFUT1IgaXMgbm90IHNldAotCi0jCi0jIE11bHRpbWVkaWEgZGV2aWNlcwotIwotCi0jCi0jIE11bHRpbWVkaWEgY29yZSBzdXBwb3J0Ci0jCi0jIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAotIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAotIyBDT05GSUdfVklERU9fTUVESUEgaXMgbm90IHNldAotCi0jCi0jIE11bHRpbWVkaWEgZHJpdmVycwotIwotQ09ORklHX0RBQj15Ci0jIENPTkZJR19VU0JfREFCVVNCIGlzIG5vdCBzZXQKKyMgQ09ORklHX01FRElBX1NVUFBPUlQgaXMgbm90IHNldAogCiAjCiAjIEdyYXBoaWNzIHN1cHBvcnQKQEAgLTExNTksNyArMTE3Nyw3IEBACiBDT05GSUdfSElEX0NIRVJSWT15CiBDT05GSUdfSElEX0NISUNPTlk9eQogQ09ORklHX0hJRF9DWVBSRVNTPXkKLSMgQ09ORklHX0RSQUdPTlJJU0VfRkYgaXMgbm90IHNldAorIyBDT05GSUdfSElEX0RSQUdPTlJJU0UgaXMgbm90IHNldAogQ09ORklHX0hJRF9FWktFWT15CiAjIENPTkZJR19ISURfS1lFIGlzIG5vdCBzZXQKIENPTkZJR19ISURfR1lSQVRJT049eQpAQCAtMTE3NiwxMCArMTE5NCwxMSBAQAogQ09ORklHX0hJRF9TQU1TVU5HPXkK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F5KSAgICAgICAgICAgICAgICAgICAgICAgICAgXAorKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl0eXBlb2YoY29uZGl0aW9uKSBfX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl1bnNpZ25lZCBsb25nIF9fbG9vcHMgPSB0Yl90aWNrc19wZXJfdXNlYyAqIHRpbWVvdXQ7ICAgICAgICAgICAgICAgICAgIFwKKwl1bnNpZ25lZCBsb25nIF9fc3RhcnQgPSBnZXRfdGJsKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl3aGlsZSAoIShfX3JldCA9IChjb25kaXRpb24pKSAmJiAodGJfdGlja3Nfc2luY2UoX19zdGFydCkgPD0gX19sb29wcykpIFwKKwkJaWYgKGRlbGF5KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJdWRlbGF5KGRlbGF5KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJY3B1X3JlbGF4KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoIV9fcmV0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJX19yZXQgPSAoY29uZGl0aW9uKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCV9fcmV0OwkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30pCisKICNlbmRpZiAvKiBfX0tFUk5FTF9fICovCiAjZW5kaWYgLy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Iik7Cit9CisKK3N0YXRpYyB2b2lkIHhlc19tcGM4NXh4X2ZpeHVwcyh2b2lkKQoreworCXN0cnVjdCBkZXZpY2Vfbm9kZSAqbnA7CisJaW50IGVycjsKKworCS8qCisJICogTGVnYWN5IHhNb24gZmlybXdhcmUgb24gc29tZSBYLUVTIGJvYXJkcyBkb2VzIG5vdCBlbmFibGUgTDIKKwkgKiBhcyBjYWNoZS4gIFdlIG11c3QgZW5zdXJlIHRoYXQgdGhleSBnZXQgZW5hYmxlZCBoZXJlLgorCSAqLworCWZvcl9lYWNoX25vZGVfYnlfbmFtZShucCwgImwyLWNhY2hlLWNvbnRyb2xsZXIiKSB7CisJCXN0cnVjdCByZXNvdXJjZSByWzJdOworCQl2b2lkIF9faW9tZW0gKmwyX2Jhc2U7CisKKwkJLyogT25seSBNUEM4NTQ4LCBNUEM4NTQwLCBhbmQgTVBDODU2MCBib2FyZHMgYXJlIGFmZmVjdGVkICovCisJCWlmICghb2ZfZGV2aWNlX2lzX2NvbXBhdGlibGUobnAsCisJCQkJICAgICJmc2wsbXBjODU0OC1sMi1jYWNoZS1jb250cm9sbGVyIikgJiYKKwkJICAgICFvZl9kZXZpY2VfaXNfY29tcGF0aWJsZShucCwKKwkJCQkgICAgImZzbCxtcGM4NTQwLWwyLWNhY2hlLWNvbnRyb2xsZXIiKSAmJgorCQkgICAgIW9mX2RldmljZV9pc19jb21wYXRpYmxlKG5wLAorCQkJCSAgICAiZnNsLG1wYzg1NjAtbDItY2FjaGUtY29udHJvbGxlciIpKQorCQkJY29udGludWU7CisKKwkJZXJyID0gb2ZfYWRkcmVzc190b19yZXNvdXJjZShucCwgMCwgJnJbMF0pOworCQlpZiAoZXJyKSB7CisJCQlwcmludGsoS0VSTl9XQVJOSU5HICJ4ZXNfbXBjODV4eDogQ291bGQgbm90IGdldCAiCisJCQkgICAgICAgInJlc291cmNlIGZvciBkZXZpY2UgdHJlZSBub2RlICclcyciLAorCQkJICAgICAgIG5wLT5mdWxsX25hbWU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gICBbKFBVRCBQYWdlKV0tLS0+ICstLS0tLS0tLS0rCisgKgkgCQkgICAgfCAgCSAgIC0tLS0tLS0tLT4rLS0tLS0tLS0tKworICoJIAkJICAgIHwJICAgICAgfAkgICAgIHwgUEFERFIxICB8CisgKgkgCQkgIE1pZC1sZXZlbCAgIHwJICAgICB8IFBBRERSMiAgfAorICoJIAkJICAoUE1EKSBwYWdlICB8CSAgICAgfCAJICAgICAgIHwKKyAqCSAJCSAgICB8CSAgICAgIHwJICAgTG93ZXItbGV2ZWwgfAorICoJIAkJICAgIHwJICAgICAgfAkgICAoUFRFKSBwYWdlICB8CisgKgkgCQkgICAgfAkgICAgICB8CSAgICAgfAkgICAgICAgfAorICoJIAkJICAgICAgLi4uLiAgICAJICAgICAJIC4uLi4KKyAqCisgKgorICogQW5kIHRoZSB2aXJ0dWFsIGFkZHJlc3MgaXMgZGVjb2RlZCBhczoKKyAqCisgKiAgICAgICAgIDEgMSAwIDAgMCAwIDAgMCAwIDAgMCAxIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMAorICogICAgICB8PC0yLT58PC0tLSA5IGJpdHMgLS0tLT58PC0tLS0gOSBiaXRzIC0tLT58PC0tLS0tLSAxMiBiaXRzIC0tLS0tLT58CisgKiBJbmRleCBpbnRvICAgIEluZGV4IGludG8gbWlkICAgIEluZGV4IGludG8gbG93ZXIgICAgT2Zmc2V0IHdpdGhpbiBwYWdlCisgKiB0b3AgZW50cmllcyAgIGRpcmVjdG9yeSBwYWdlICAgICBwYWdldGFibGUgcGFnZQorICoKKyAqIEl0J3MgdG9vIGhhcmQgdG8gc3dpdGNoIGJldHdlZW4gdGhlc2UgdHdvIGZvcm1hdHMgYXQgcnVudGltZSwgc28gTGludXggb25seQorICogc3VwcG9ydHMgb25lIG9yIHRoZSBvdGhlciBkZXBlbmRpbmcgb24gd2hldGhlciBDT05GSUdfWDg2X1BBRSBpcyBzZXQuICBNYW55CisgKiBkaXN0cml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c2UKKwkJcmVnICY9IH5tOworCXdyaXRlYihyZWcsIFM2X1JFR19HUElPICsgUzZfR1BJT19CQU5LKDApICsgUzZfR1BJT19JRVYpOworCisJcmVnID0gcmVhZGIoUzZfUkVHX0dQSU8gKyBTNl9HUElPX0JBTksoMCkgKyBTNl9HUElPX0lCRSk7CisJaWYgKCh0eXBlICYgSVJRX1RZUEVfRURHRV9CT1RIKSA9PSBJUlFfVFlQRV9FREdFX0JPVEgpCisJCXJlZyB8PSBtOworCWVsc2UKKwkJcmVnICY9IH5tOworCXdyaXRlYihyZWcsIFM2X1JFR19HUElPICsgUzZfR1BJT19CQU5LKDApICsgUzZfR1BJT19JQkUpOworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IGlycV9jaGlwIGdwaW9pcnFzID0geworCS5uYW1lID0gIkdQSU8iLAorCS5hY2sgPSBhY2ssCisJLm1hc2sgPSBtYXNrLAorCS51bm1hc2sgPSB1bm1hc2ssCisJLnNldF90eXBlID0gc2V0X3R5cGUsCit9OworCitzdGF0aWMgdTggZGVtdXhfbWFza3NbNF07CisKK3N0YXRpYyB2b2lkIGRlbXV4X2lycXModW5zaWduZWQgaW50IGlycSwgc3RydWN0IGlycV9kZXNjICpkZXNjKQoreworCXU4ICptYXNrID0gZ2V0X2lycV9kZXNjX2RhdGEoZGVzYyk7CisJdTggcGVuZGluZzsKKwlpbnQgY2lycTsKKworCWRlc2MtPmNoaXAtPm1hc2soaXJxKTsKKwlkZXNjLT5jaGlwLT5hY2soaXJxKTsKKwlwZW5kaW5nID0gcmVhZGIoUzZfUkVHX0dQSU8gKyBTNl9HUElPX0JBTksoMCkgKyBTNl9HUElPX01JUykgJiAqbWFzazsKKwljaXJxID0gSVJRX0JBU0UgLSAxOworCXdoaWxlIChwZW5kaW5nKSB7CisJCWludCBuID0gZmZzKHBlbmRpbmcpOworCQljaXJxICs9IG47CisJCXBlbmRpbmcgPj49IG47CisJCWdlbmVyaWNfaGFuZGxlX2lycShjaXJxKTsK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2NhcGFjaXR5KGRpc2ssIG9ial9zaXplIC8gNTEyVUxMKTsKKwlhZGRfZGlzayhkaXNrKTsKKworCXByaW50ayhLRVJOX0lORk8gIiVzOiBBZGRlZCBvZiBzaXplIDB4JWxseFxuIiwKKwkJZGlzay0+ZGlza19uYW1lLCAodW5zaWduZWQgbG9uZyBsb25nKW9ial9zaXplKTsKKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIC9zeXMvY2xhc3Mvb3NkYmxrLworICogICAgICAgICAgICAgICAgICAgYWRkCW1hcCBPU0Qgb2JqZWN0IHRvIGJsa2RldgorICogICAgICAgICAgICAgICAgICAgcmVtb3ZlCXVubWFwIE9TRCBvYmplY3QKKyAqICAgICAgICAgICAgICAgICAgIGxpc3QJc2hvdyBtYXBwaW5ncworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIGNsYXNzX29zZGJsa19yZWxlYXNlKHN0cnVjdCBjbGFzcyAqY2xzKQoreworCWtmcmVlKGNscyk7Cit9CisKK3N0YXRpYyBzc2l6ZV90IGNsYXNzX29zZGJsa19saXN0KHN0cnVjdCBjbGFzcyAqYywgY2hhciAqZGF0YSkKK3sKKwlpbnQgbiA9IDA7CisJc3RydWN0IGxpc3RfaGVhZCAqdG1wOworCisJbXV0ZXhfbG9ja19uZXN0ZWQoJmN0bF9tdXRleCwgU0lOR0xFX0RFUFRIX05FU1RJTkcpOworCisJbGlzdF9mb3JfZWFjaCh0bXAsICZvc2RibGtkZXZfbGlzdCkgeworCQlzdHJ1Y3Qgb3NkYmxrX2RldmljZSAqb3NkZXY7CisKKwkJb3NkZXYgPSBsaXN0X2VudHJ5KHRtcCwgc3RydWN0IG9zZGJsa19kZXZpY2UsIG5vZGUpOworCisJCW4gKz0gc3ByaW50Zih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qKioqKioqKioqCisgKglNZW1vcnkgQnVzIENvbmZpZ3VyYXRpb24gUmVnaXN0ZXIgKE1CQ1IpCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NQkNSX09GRlNFVAkJMHgyMTkwCisjZGVmaW5lIE1CQ1JfNjRCSVRDRkdfU0hJRlQJMjMKKyNkZWZpbmUgTUJDUl82NEJJVENGR19NQVNLCSgxVUwgPDwgTUJDUl82NEJJVENGR19TSElGVCkKKyNkZWZpbmUgTUJDUl82NEJJVEJVU19TSElGVAkyMgorI2RlZmluZSBNQkNSXzY0QklUQlVTX01BU0sJKDFVTCA8PCBNQkNSXzY0QklUQlVTX1NISUZUKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKglNZW1vcnkgQmFuayBNb2RlIFJlZ2lzdGVyIChNQk1SKQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBSRUdfTUJNUl9PRkZTRVQJCTB4MjFDMAorI2RlZmluZSBNQk1SX01PREVfTUFYX1ZBTFVFCTB4RgorI2RlZmluZSBNQk1SX01PREVfU0hJRlQJCTI1CisjZGVmaW5lIE1CTVJfTU9ERV9NQVNLCQkoTUJNUl9NT0RFX01BWF9WQUxVRSA8PCBNQk1SX01PREVfU0hJRlQpCisjZGVmaW5lIE1CTVJfQkJBX1NISUZUCQkyNAorI2RlZmluZSBNQk1SX0JCQV9NQVNLCQkoMVVMIDw8IE1CTVJfQkJBX1NISUZUKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKglNZW1vcnkgQmFuayBCb3VuZGFyeSBBZGRyZXNzIFJlZ2lzdGVyIChNQkJBUikKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NQkJBUl9PRkZTRVQJMHgyMUQwCisjZGVmaW5lIE1CQkFSX0JCQV9NQVhfVkFMVUUJMHhGRgorI2RlZmluZSBNQkJBUl9CQkFfU0hJRlQJCTI0CisjZGVmaW5lIE1CQkFSX0JCQV9NQVNLCQkoTUJCQVJfQkJBX01BWF9WQUxVRSA8PCBNQkJBUl9CQkFfU0hJRlQpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCU1lbW9yeSBTY3J1YiBDb250cm9sIFJlZ2lzdGVyIChNU0NSKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgUkVHX01TQ1JfT0ZGU0VUCQkweDI0MDAKKyNkZWZpbmUgTVNDUl9TQ1JVQl9NT0RfTUFTSwkweEMwMDAwMDAwIC8qIHNjcnViX21vZCAtIGJpdDA6MSovCisjZGVmaW5lIE1TQ1JfQkFDS0dSX1NDUlVCCTB4NDAwMDAwMDAgLyogMDEgKi8KKyNkZWZpbmUgTVNDUl9TSV9TSElGVAkJMTYgCS8qIHNpIC0gYml0ODoxNSovCisjZGVmaW5lIE1TQ1JfU0lfTUFYX1ZBTFVFCTB4RkYKKyNkZWZpbmUgTVNDUl9TSV9NQVNLCQkoTVNDUl9TSV9NQVhfVkFMVUUgPDwgTVNDUl9TSV9TSElGVCkKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoJTWVtb3J5IFNjcnViIFJhbmdlIFN0YXJ0IFJlZ2lzdGVyIChNU1JTUikKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NU1JTUl9PRkZTRVQJMHgyNDEwCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCU1lbW9yeSBTY3J1YiBSYW5nZSBFbmQgUmVnaXN0ZXIgKE1TUkVSKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgUkVHX01TUkVSX09GRlNFVAkweDI0MjAKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoJTWVtb3J5IFNjcnViIFBhdHRlcm4gUmVnaXN0ZXIgKE1TUFIpCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBSRUdfTVNQUl9PRkZTRVQJCTB4MjQzMAorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKglNZW1vcnkgQ2hlY2sgQ29udHJvbCBSZWdpc3RlciAoTUNDUikKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NQ0NSX09GRlNFVAkJMHgyNDQwCitlbnVtIG1jY3JfYml0cyB7CisJTUNDUl9FQ0NfRU4JPSBDUEM5MjVfQklUKDApLCAvKiBFQ0MgaGlnaCBhbmQgbG93IGNoZWNrICovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKglNZW1vcnkgQ2hlY2sgUmFuZ2UgRW5kIFJlZ2lzdGVyIChNQ1JFUikKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NQ1JFUl9PRkZTRVQJMHgyNDUwCisKKy8qKioqKio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KyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFJFR19NRVNSX09GRlNFVAkJMHgyNDcwCisjZGVmaW5lIE1FU1JfRUNDX1NZTl9IX01BU0sJMHhGRjAwCisjZGVmaW5lIE1FU1JfRUNDX1NZTl9MX01BU0sJMHgwMEZGCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCU1lbW9yeSBNb2RlIENvbnRyb2wgUmVnaXN0ZXIgKE1NQ1IpCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBSRUdfTU1DUl9PRkZTRVQJCTB4MjUwMAorZW51bSBtbWNyX2JpdHMgeworCU1NQ1JfUkVHX0RJTU1fTU9ERSA9IENQQzkyNV9CSVQoMyksCit9OworCisvKgorICogSHlwZXJUcmFuc3BvcnQgTGluayBSZWdpc3RlcnMKKyAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogIEVycm9yIEhhbmRsaW5nL0VudW1lcmF0aW9uIFNjcmF0Y2ggUGFkIFJlZ2lzdGVyIChFUlJDVFJMKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgUkVHX0VSUkNUUkxfT0ZGU0VUCTB4NzAxNDAKK2VudW0gZXJyY3RybF9iaXRzIHsJCQkgLyogbm9uZmF0YWwgaW50ZXJydXB0cyBmb3IgKi8KKwlFUlJDVFJMX1NFUlJfTkYJPSBDUEM5MjVfQklUKDApLCAvKiBzeXN0ZW0gZXJyb3IgKi8KKwlFUlJDVFJMX0NSQ19ORgk9IENQQzkyNV9CSVQoMSksIC8qIENSQyBlcnJvciAqLworCUVSUkNUUkxfUlNQX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kyNV9CSVQoMjIpIHwgQ1BDOTI1X0JJVCgyMykpLAorCUxJTktDVFJMX0xJTktfRkFJTAk9IENQQzkyNV9CSVQoMjcpLAorCisJSFRfTElOS0NUUkxfREVURUNURUQJPSAoTElOS0NUUkxfQ1JDX0VSUiB8IExJTktDVFJMX0xJTktfRkFJTCksCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgTGluayBGcmVxQ2FwL0Vycm9yL0ZyZXEvUmV2aXNpb24gSUQgUmVnaXN0ZXIgKExJTktFUlIpCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBSRUdfTElOS0VSUl9PRkZTRVQJMHg3MDEyMAorZW51bSBsaW5rZXJyX2JpdHMgeworCUxJTktFUlJfRU9DX0VSUgkJPSBDUEM5MjVfQklUKDE3KSwgLyogRW5kLU9mLUNoYWluIGVycm9yICovCisJTElOS0VSUl9PVkZfRVJSCQk9IENQQzkyNV9CSVQoMTgpLCAvKiBSZWNlaXZlIEJ1ZmZlciBPdmVyZmxvdyAqLworCUxJTktFUlJfUFJPVF9FUlIJPSBDUEM5MjVfQklUKDE5KSwgLyogUHJvdG9jb2wgZXJyb3IgKi8KKworCUhUX0xJTktFUlJfREVURUNURUQJPSAoTElOS0VSUl9FT0NfRVJSIHwgTElOS0VSUl9PVkZfRVJSIHwKKwkJCQkgICBMSU5LRVJSX1BST1RfRVJSKSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCUJyaWRnZSBDb250cm9sIFJlZ2lzdGVyIChCUkdDVFJMKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgUkVHX0JSR0NUUkxfT0ZGU0VUCTB4NzAzMDAKK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BHNFhfUDJfRFVBTF9DSEFOTkVMX0xWRFNfRkFTVCAgICAgICAgICAgNwogI2RlZmluZSBHNFhfUDJfRFVBTF9DSEFOTkVMX0xWRFNfTElNSVQgICAgICAgICAgMAogCisvKlRoZSBwYXJhbWV0ZXIgaXMgZm9yIERJU1BMQVkgUE9SVCBvbiBHNHggcGxhdGZvcm0qLworI2RlZmluZSBHNFhfRE9UX0RJU1BMQVlfUE9SVF9NSU4gICAgICAgICAgIDE2MTY3MAorI2RlZmluZSBHNFhfRE9UX0RJU1BMQVlfUE9SVF9NQVggICAgICAgICAgIDIyNzAwMAorI2RlZmluZSBHNFhfTl9ESVNQTEFZX1BPUlRfTUlOICAgICAgICAgICAgIDEKKyNkZWZpbmUgRzRYX05fRElTUExBWV9QT1JUX01BWCAgICAgICAgICAgICAyCisjZGVmaW5lIEc0WF9NX0RJU1BMQVlfUE9SVF9NSU4gICAgICAgICAgICAgOTcKKyNkZWZpbmUgRzRYX01fRElTUExBWV9QT1JUX01BWCAgICAgICAgICAgICAxMDgKKyNkZWZpbmUgRzRYX00xX0RJU1BMQVlfUE9SVF9NSU4gICAgICAgICAgICAweDEwCisjZGVmaW5lIEc0WF9NMV9ESVNQTEFZX1BPUlRfTUFYICAgICAgICAgICAgMHgxMgorI2RlZmluZSBHNFhfTTJfRElTUExBWV9QT1JUX01JTiAgICAgICAgICAgIDB4MDUKKyNkZWZpbmUgRzRYX00yX0RJU1BMQVlfUE9SVF9NQVggICAgICAgICAgICAweDA2CisjZGVmaW5lIEc0WF9QX0RJU1BMQVlfUE9SVF9NSU4gICAgICAgICAgICAgMTAKKyNkZWZpbmUgRzRYX1BfRElTUExBWV9QT1JUX01BWCAgICAgICAgICAgICAyMAorI2RlZmluZSBHNFhfUDFfRElTUExBWV9QT1JUX01JTiAgICAgICAgICAgIDEKKyNkZWZpbmUgRzRYX1AxX0RJU1BMQVlfUE9SVF9NQVggICAgICAgICAgICAyCisjZGVmaW5lIEc0WF9QMl9ESVNQTEFZX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50ZWxfbGltaXRzX2k4eHhfZHZvID0gewogICAgICAgICAuZG90ID0geyAubWluID0gSThYWF9ET1RfTUlOLAkJLm1heCA9IEk4WFhfRE9UX01BWCB9LAogICAgICAgICAudmNvID0geyAubWluID0gSThYWF9WQ09fTUlOLAkJLm1heCA9IEk4WFhfVkNPX01BWCB9LAogICAgICAgICAubiAgID0geyAubWluID0gSThYWF9OX01JTiwJCS5tYXggPSBJOFhYX05fTUFYIH0sCkBAIC0yNjksOCArMjg2LDkgQEAKIAkucDIgID0geyAuZG90X2xpbWl0ID0gSThYWF9QMl9TTE9XX0xJTUlULAogCQkgLnAyX3Nsb3cgPSBJOFhYX1AyX1NMT1csCS5wMl9mYXN0ID0gSThYWF9QMl9GQVNUIH0sCiAJLmZpbmRfcGxsID0gaW50ZWxfZmluZF9iZXN0X1BMTCwKLSAgICB9LAotICAgIHsgLyogSU5URUxfTElNSVRfSThYWF9MVkRTICovCit9OworCitzdGF0aWMgY29uc3QgaW50ZWxfbGltaXRfdCBpbnRlbF9saW1pdHNfaTh4eF9sdmRzID0gewogICAgICAgICAuZG90ID0geyAubWluID0gSThYWF9ET1RfTUlOLAkJLm1heCA9IEk4WFhfRE9UX01BWCB9LAogICAgICAgICAudmNvID0geyAubWluID0gSThYWF9WQ09fTUlOLAkJLm1heCA9IEk4WFhfVkNPX01BWCB9LAogICAgICAgICAubiAgID0geyAubWluID0gSThYWF9OX01JTiwJCS5tYXggPSBJOFhYX05fTUFYIH0sCkBAIC0yODIsOCArMzAwLDkgQEAKIAkucDIgID0geyAuZG90X2xpbWl0ID0gSThYWF9QMl9TTE9XX0xJTUlULAogCQkgLnAyX3Nsb3cgPSBJOFhYX1AyX0xWRFNfU0xPVywJLnAyX2Zhc3QgPSBJOFhYX1AyX0xWRFNfRkFTVCB9LAogCS5maW5kX3BsbCA9IGludGVsX2ZpbmRfYmVzdF9QTEwsCi0gICAgfSwKLSAgICB7IC8qIElOVEVMX0xJTUlUX0k5WFhfU0RWT19EQUMgKi8KK307CisJCitzdGF0aWMgY29uc3QgaW50ZWxfbGltaXRfdCBpbnRlbF9saW1pdHNfaTl4eF9zZHZvID0gewogICAgICAgICAuZG90ID0geyAubWluID0gSTlYWF9ET1RfTUlOLAkJLm1heCA9IEk5WFhfRE9UX01BWCB9LAogICAgICAgICAudmNvID0geyAubWluID0gSTlYWF9WQ09fTUlOLAkJLm1heCA9IEk5WFhfVkNPX01BWCB9LAogICAgICAgICAubiAgID0geyAubWluID0gSTlYWF9OX01JTiwJCS5tYXggPSBJOVhYX05fTUFYIH0sCkBAIC0yOTUsOCArMzE0LDkgQEAKIAkucDIgID0geyAuZG90X2xpbWl0ID0gSTlYWF9QMl9TRFZPX0RBQ19TTE9XX0xJTUlULAogCQkgLnAyX3Nsb3cgPSBJOVhYX1AyX1NEVk9fREFDX1NMT1csCS5wMl9mYXN0ID0gSTlYWF9QMl9TRFZPX0RBQ19GQVNUIH0sCiAJLmZpbmRfcGxsID0gaW50ZWxfZmluZF9iZXN0X1BMTCwKLSAgICB9LAotICAgIHsgLyogSU5URUxfTElNSVRfSTlYWF9MVkRTICovCit9OworCitzdGF0aWMgY29uc3QgaW50ZWxfbGltaXRfdCBpbnRlbF9saW1pdHNfaTl4eF9sdmRzID0gewogICAgICAgICAuZG90ID0geyAubWluID0gSTlYWF9ET1RfTUlOLAkJLm1heCA9IEk5WFhfRE9UX01BWCB9LAogICAgICAgICAudmNvID0geyAubWluID0gSTlYWF9WQ09fTUlOLAkJLm1heCA9IEk5WFhfVkNPX01BWCB9LAogICAgICAgICAubiAgID0geyAubWluID0gSTlYWF9OX01JTiwJCS5tYXggPSBJOVhYX05fTUFYIH0sCkBAIC0zMTEsOSArMzMxLDEwIEBACiAJLnAyICA9IHsgLmRvdF9saW1pdCA9IEk5WFhfUDJfTFZEU19TTE9XX0xJTUlULAogCQkgLnAyX3Nsb3cgPSBJOVhYX1AyX0xWRFNfU0xPVywJLnAyX2Zhc3QgPSBJOVhYX1AyX0xWRFNfRkFTVC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SAgICB7IC8qIElOVEVMX0xJTUlUX0lHRF9TRFZPICovCit9OworCitzdGF0aWMgY29uc3QgaW50ZWxfbGltaXRfdCBpbnRlbF9saW1pdHNfZzR4X2Rpc3BsYXlfcG9ydCA9IHsKKyAgICAgICAgLmRvdCA9IHsgLm1pbiA9IEc0WF9ET1RfRElTUExBWV9QT1JUX01JTiwKKyAgICAgICAgICAgICAgICAgLm1heCA9IEc0WF9ET1RfRElTUExBWV9QT1JUX01BWCB9LAorICAgICAgICAudmNvID0geyAubWluID0gRzRYX1ZDT19NSU4sCisgICAgICAgICAgICAgICAgIC5tYXggPSBHNFhfVkNPX01BWH0sCisgICAgICAgIC5uICAgPSB7IC5taW4gPSBHNFhfTl9ESVNQTEFZX1BPUlRfTUlOLAorICAgICAgICAgICAgICAgICAubWF4ID0gRzRYX05fRElTUExBWV9QT1JUX01BWCB9LAorICAgICAgICAubSAgID0geyAubWluID0gRzRYX01fRElTUExBWV9QT1JUX01JTiwKKyAgICAgICAgICAgICAgICAgLm1heCA9IEc0WF9NX0RJU1BMQVlfUE9SVF9NQVggfSwKKyAgICAgICAgLm0xICA9IHsgLm1pbiA9IEc0WF9NMV9ESVNQTEFZX1BPUlRfTUlOLAorICAgICAgICAgICAgICAgICAubWF4ID0gRzRYX00xX0RJU1BMQVlfUE9SVF9NQVggfSwKKyAgICAgICAgLm0yICA9IHsgLm1pbiA9IEc0WF9NMl9ESVNQTEFZX1BPUlRfTUlOLAorICAgICAgICAgICAgICAgICAubWF4ID0gRzRYX00yX0RJU1BMQVlfUE9SVF9NQVggfSwKKyAgICAgICAgLnAgICA9IHsgLm1pbiA9IEc0WF9QX0RJU1BMQVlfUE9SVF9NSU4sCisgICAgICAgICAgICAgICAgIC5tYXggPSBHNFhfUF9ESVNQTEFZX1BPUlRfTUFYIH0sCisgICAgICAgIC5wMSAgPSB7IC5taW4gPSBHNFhfUDFfRElTUExBWV9QT1JUX01JTiwKKyAgICAgICAgICAgICAgICAgLm1heCA9IEc0WF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vb2wKK2ludGVsX2ZpbmRfcGxsX2c0eF9kcChjb25zdCBpbnRlbF9saW1pdF90ICpsaW1pdCwgc3RydWN0IGRybV9jcnRjICpjcnRjLAorCQkgICAgICBpbnQgdGFyZ2V0LCBpbnQgcmVmY2xrLCBpbnRlbF9jbG9ja190ICpiZXN0X2Nsb2NrKQoreworICAgIGludGVsX2Nsb2NrX3QgY2xvY2s7CisgICAgaWYgKHRhcmdldCA8IDIwMDAwMCkgeworCWNsb2NrLnAxID0gMjsKKwljbG9jay5wMiA9IDEwOworCWNsb2NrLm4gPSAyOworCWNsb2NrLm0xID0gMjM7CisJY2xvY2subTIgPSA4OworICAgIH0gZWxzZSB7CisJY2xvY2sucDEgPSAxOworCWNsb2NrLnAyID0gMTA7CisJY2xvY2subiA9IDE7CisJY2xvY2subTEgPSAxNDsKKwljbG9jay5tMiA9IDI7CisgICAgfQorICAgIGNsb2NrLm0gPSA1ICogKGNsb2NrLm0xICsgMikgKyAoY2xvY2subTIgKyAyKTsKKyAgICBjbG9jay5wID0gKGNsb2NrLnAxICogY2xvY2sucDIpOworICAgIGNsb2NrLmRvdCA9IDk2MDAwICogY2xvY2subSAvIChjbG9jay5uICsgMikgLyBjbG9jay5wOworICAgIG1lbWNweShiZXN0X2Nsb2NrLCAmY2xvY2ssIHNpemVvZihpbnRlbF9jbG9ja190KSk7CisgICAgcmV0dXJuIHRydWU7Cit9CisKIHZvaWQKIGludGVsX3dhaXRfZm9yX3ZibGFuayhzdHJ1Y3QgZHJtX2RldmljZSAqZGV2KQogewpAQCAtODI4LDE5ICs5NTMsMzEgQEAKIAl9CiAKIAltdXRleF9sb2NrKCZkZXYtPnN0cnVjdF9tdXRleCk7Ci0JcmV0ID0gaTkxNV9nZW1fb2JqZWN0X3BpbihpbnRlbF9mYi0+b2JqLCBhbGlnbm1lbnQpOworCXJldCA9IGk5MTVfZ2VtX29iamVjdF9waW4ob2JqLCBhbGlnbm1lbnQpOwogCWlmIChyZXQgIT0gMCkgewogCQlt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wcml2LT5kcGNkWzJdICYgMHgxZjsKKwkJc3dpdGNoIChtYXhfbGFuZV9jb3VudCkgeworCQljYXNlIDE6IGNhc2UgMjogY2FzZSA0OgorCQkJYnJlYWs7CisJCWRlZmF1bHQ6CisJCQltYXhfbGFuZV9jb3VudCA9IDQ7CisJCX0KKwl9CisJcmV0dXJuIG1heF9sYW5lX2NvdW50OworfQorCitzdGF0aWMgaW50CitpbnRlbF9kcF9tYXhfbGlua19idyhzdHJ1Y3QgaW50ZWxfb3V0cHV0ICppbnRlbF9vdXRwdXQpCit7CisJc3RydWN0IGludGVsX2RwX3ByaXYgICAqZHBfcHJpdiA9IGludGVsX291dHB1dC0+ZGV2X3ByaXY7CisJaW50IG1heF9saW5rX2J3ID0gZHBfcHJpdi0+ZHBjZFsxXTsKKworCXN3aXRjaCAobWF4X2xpbmtfYncpIHsKKwljYXNlIERQX0xJTktfQldfMV82MjoKKwljYXNlIERQX0xJTktfQldfMl83OgorCQlicmVhazsKKwlkZWZhdWx0OgorCQltYXhfbGlua19idyA9IERQX0xJTktfQldfMV82MjsKKwkJYnJlYWs7CisJfQorCXJldHVybiBtYXhfbGlua19idzsKK30KKworc3RhdGljIGludAoraW50ZWxfZHBfbGlua19jbG9jayh1aW50OF90IGxpbmtfYncpCit7CisJaWYgKGxpbmtfYncgPT0gRFBfTElOS19CV18yXzcpCisJCXJldHVybiAyNzAwMDA7CisJZWxzZQorCQlyZXR1cm4gMTYyMDAwOworfQorCisvKiBJIHRoaW5rIHRoaXMgaXMgYSBmaWN0aW9uICovCitzdGF0aWMgaW50CitpbnRlbF9kcF9saW5rX3JlcXVpcmVkKGludCBwaXhlbF9jbG9jaykKK3sKKwlyZXR1cm4gcGl4ZWxfY2xvY2sgKiAzOworfQorCitzdGF0aWMgaW50CitpbnRlbF9kcF9tb2RlX3ZhbGlkKHN0cnVjdCBkcm1fY29ubmVjdG9yICpjb25uZWN0b3IsCisJCSAgICBzdHJ1Y3QgZHJtX2Rpc3BsYXlfbW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JCXJvdW5kdXBfdzsKKwlib29sCQkJcm91bmR1cF9oOworfTsKKworc3RydWN0IHIzMDBfY3NfdHJhY2sgeworCXVuc2lnbmVkCQkJbnVtX2NiOworCXVuc2lnbmVkCQkJbWF4eTsKKwl1bnNpZ25lZAkJCXZ0eF9zaXplOworCXVuc2lnbmVkCQkJdmFwX3ZmX2NudGw7CisJdW5zaWduZWQJCQlpbW1kX2R3b3JkczsKKwl1bnNpZ25lZAkJCW51bV9hcnJheXM7CisJdW5zaWduZWQJCQltYXhfaW5keDsKKwlzdHJ1Y3QgcjMwMF9jc190cmFja19hcnJheQlhcnJheXNbMTFdOworCXN0cnVjdCByMzAwX2NzX3RyYWNrX2NiIAljYls0XTsKKwlzdHJ1Y3QgcjMwMF9jc190cmFja19jYiAJemI7CisJc3RydWN0IHIzMDBfY3NfdHJhY2tfdGV4dHVyZQl0ZXh0dXJlc1sxNl07CisJYm9vbAkJCQl6X2VuYWJsZWQ7Cit9OworCitzdGF0aWMgaW5saW5lIHZvaWQgcjMwMF9jc190cmFja190ZXh0dXJlX3ByaW50KHN0cnVjdCByMzAwX2NzX3RyYWNrX3RleHR1cmUgKnQpCit7CisJRFJNX0VSUk9SKCJwaXRjaCAgICAgICAgICAgICAgICAgICAgICAlZFxuIiwgdC0+cGl0Y2gpOworCURSTV9FUlJPUigid2lkdGggICAgICAgICAgICAgICAgICAgICAgJWRcbiIsIHQtPndpZHRoKTsKKwlEUk1fRVJST1IoImhlaWdodCAgICAgICAgICAgICAgICAgICAgICVkXG4iLCB0LT5oZWlnaHQpOworCURSTV9FUlJPUigibnVtIGxldmVscyAgICAgICAgICAgICAgICAgJWRcbiIsIHQtPm51bV9sZXZlbHMpOworCURSTV9FUlJPUigiZGVwdGggICAgICAgICAgICAgICAgICAgICAgJWRcbiIsIHQtPnR4ZGVwdGgpOworCURSTV9FUlJPUigiYnBwICAgICAgICAgICAgICAgICAgICAgICAgJWRcbiIsIHQtPmNwcCk7CisJRFJNX0VSUk9SKCJj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RlZmluZSBSNTAwX0QyTU9ERV9JTlRfTUFTSyAoMTw8OCkKLQogI2RlZmluZSBBVklWT19EMU1PREVfREFUQV9GT1JNQVQgICAgICAgICAgICAgICAgMHg2NTI4CiAjICAgICAgIGRlZmluZSBBVklWT19EMU1PREVfSU5URVJMRUFWRV9FTiAgICAgICAoMSA8PCAwKQogI2RlZmluZSBBVklWT19EMU1PREVfREVTS1RPUF9IRUlHSFQgICAgICAgICAgICAgMHg2NTJDCisjZGVmaW5lIEFWSVZPX0QxTU9ERV9WQkxBTktfU1RBVFVTICAgICAgICAgICAgICAweDY1MzQKKyMgICAgICAgZGVmaW5lIEFWSVZPX1ZCTEFOS19BQ0sgICAgICAgICAgICAgICAgICgxIDw8IDQpCisjZGVmaW5lIEFWSVZPX0QxTU9ERV9WTElORV9TVEFSVF9FTkQgICAgICAgICAgICAweDY1MzgKKyNkZWZpbmUgQVZJVk9fRHhNT0RFX0lOVF9NQVNLICAgICAgICAgICAgICAgICAgIDB4NjU0MAorIyAgICAgICBkZWZpbmUgQVZJVk9fRDFNT0RFX0lOVF9NQVNLICAgICAgICAgICAgKDEgPDwgMCkKKyMgICAgICAgZGVmaW5lIEFWSVZPX0QyTU9ERV9JTlRfTUFTSyAgICAgICAgICAgICgxIDw8IDgpCiAjZGVmaW5lIEFWSVZPX0QxTU9ERV9WSUVXUE9SVF9TVEFSVCAgICAgICAgICAgICAweDY1ODAKICNkZWZpbmUgQVZJVk9fRDFNT0RFX1ZJRVdQT1JUX1NJWkUgICAgICAgICAgICAgIDB4NjU4NAogI2RlZmluZSBBVklWT19EMU1PREVfRVhUX09WRVJTQ0FOX0xFRlRfUklHSFQgICAgMHg2NTg4CkBAIC00NzQsNiArNDc3LDcgQEAKICNkZWZpbmUgQVZJVk9fRDJDUlRDX0JMQU5LX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY4ODQKICNkZWZpbmUgQVZJVk9fRDJDUlRDX0lOVEVSTEFDRV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDY4ODgKICNkZWZpbmUgQVZJVk9fRDJDUlRDX0lOVEVSTEFDRV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY4OGMKKyNkZWZpbmUgQVZJVk9fRDJDUlRDX0ZSQU1FX0NPVU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY4YTQKICNkZWZpbmUgQVZJVk9fRDJDUlRDX1NURVJFT19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY4YzQKIAogI2RlZmluZSBBVklWT19EMkdSUEhfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjkwMApAQCAtNDk2LDYgKzUwMCw4IEBACiAjZGVmaW5lIEFWSVZPX0QyQ1VSX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAweDZjMTAKICNkZWZpbmUgQVZJVk9fRDJDVVJfUE9TSVRJT04gICAgICAgICAgICAgICAgICAgIDB4NmMxNAogCisjZGVmaW5lIEFWSVZPX0QyTU9ERV9WQkxBTktfU1RBVFVTICAgICAgICAgICAgICAweDZkMzQKKyNkZWZpbmUgQVZJVk9fRDJNT0RFX1ZMSU5FX1NUQVJUX0VORCAgICAgICAgICAgIDB4NmQzOAogI2RlZmluZSBBVklWT19EMk1PREVfVklFV1BPUlRfU1RBUlQgICAgICAgICAgICAgMHg2ZDgwCiAjZGVmaW5lIEFWSVZPX0QyTU9ERV9WSUVXUE9SVF9TSVpFICAgICAgICAgICAgICAweDZkODQKICNkZWZpbmUgQVZJVk9fRDJNT0RFX0VYVF9PVkVSU0NBTl9MRUZUX1JJR0hUICAgIDB4NmQ4OApAQCAtNzQ2LDQgKzc1Miw4IEBACiAjCWRlZmluZSBBVklWT19JMkNfRU4JCQkJCQkJKDEgPDwgMCkKICMJZGVmaW5lIEFWSVZPX0kyQ19SRVNFVAkJCQkJCSgxIDw8IDgpCiAKKyNkZWZpbmUgQVZJVk9fRElT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pbmxpbmUgdTggbG04MzIzX3doaWNoa2V5KHU4IGV2ZW50KQoreworCXJldHVybiBldmVudCAmIDB4N2Y7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGxtODMyM19pc3ByZXNzKHU4IGV2ZW50KQoreworCXJldHVybiAoZXZlbnQgJiAweDgwKSA/IDEgOiAwOworfQorCitzdGF0aWMgdm9pZCBwcm9jZXNzX2tleXMoc3RydWN0IGxtODMyM19jaGlwICpsbSkKK3sKKwl1OCBldmVudDsKKwl1OCBrZXlfZmlmb1tMTTgzMjNfRklGT19MRU4gKyAxXTsKKwlpbnQgb2xkX2tleXNfZG93biA9IGxtLT5rZXlzX2Rvd247CisJaW50IHJldDsKKwlpbnQgaSA9IDA7CisKKwkvKgorCSAqIFJlYWQgYWxsIGtleSBldmVudHMgZnJvbSB0aGUgRklGTyBhdCBvbmNlLiBOZXh0IFJFQURfRklGTyBjbGVhcnMgdGhlCisJICogRklGTyBldmVuIGlmIHdlIGRpZG4ndCByZWFkIGFsbCBldmVudHMgcHJldmlvdXNseS4KKwkgKi8KKwlyZXQgPSBsbTgzMjNfcmVhZChsbSwgTE04MzIzX0NNRF9SRUFEX0ZJRk8sIGtleV9maWZvLCBMTTgzMjNfRklGT19MRU4pOworCisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2VycigmbG0tPmNsaWVudC0+ZGV2LCAiRmFpbGVkIHJlYWRpbmcgZmlmbyBcbiIpOworCQlyZXR1cm47CisJfQorCWtleV9maWZvW3JldF0gPSAwOworCisJd2hpbGUgKChldmVudCA9IGtleV9maWZvW2krK10pKSB7CisJCXU4IGtleSA9IGxtODMyM193aGljaGtleShldmVudCk7CisJCWludCBpc2Rvd24gPSBsbTgzMjNfaXNwcmVzcyhldmVudCk7CisJCXVuc2lnbmVkIHNob3J0IGtleWNvZGUgPSBsbS0+a2V5bWFwW2tleV07CisKKwkJZGV2X3ZkYmcoJmxtLT5jbGllbnQtPmRldiwgImtleSAweCUwMnggJXNcbiIsCisJC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T5pbnB1dCk7CisKK291dDoKKwltdXRleF91bmxvY2soJnByaXYtPm11dGV4KTsKK30KKworc3RhdGljIGlycXJldHVybl90IGVldGlfdHNfaXNyKGludCBpcnEsIHZvaWQgKmRldl9pZCkKK3sKKwlzdHJ1Y3QgZWV0aV90c19wcml2ICpwcml2ID0gZGV2X2lkOworCisJIC8qIHBvc3Rwb25lIEkyQyB0cmFuc2FjdGlvbnMgYXMgd2UgYXJlIGF0b21pYyAqLworCXNjaGVkdWxlX3dvcmsoJnByaXYtPndvcmspOworCisJcmV0dXJuIElSUV9IQU5ETEVEOworfQorCitzdGF0aWMgaW50IGVldGlfdHNfb3BlbihzdHJ1Y3QgaW5wdXRfZGV2ICpkZXYpCit7CisJc3RydWN0IGVldGlfdHNfcHJpdiAqcHJpdiA9IGlucHV0X2dldF9kcnZkYXRhKGRldik7CisKKwllbmFibGVfaXJxKHByaXYtPmlycSk7CisKKwkvKiBSZWFkIHRoZSBldmVudHMgb25jZSB0byBhcm0gdGhlIElSUSAqLworCWVldGlfdHNfcmVhZCgmcHJpdi0+d29yayk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHZvaWQgZWV0aV90c19jbG9zZShzdHJ1Y3QgaW5wdXRfZGV2ICpkZXYpCit7CisJc3RydWN0IGVldGlfdHNfcHJpdiAqcHJpdiA9IGlucHV0X2dldF9kcnZkYXRhKGRldik7CisKKwlkaXNhYmxlX2lycShwcml2LT5pcnEpOworCWNhbmNlbF93b3JrX3N5bmMoJnByaXYtPndvcmspOworfQorCitzdGF0aWMgaW50IF9fZGV2aW5pdCBlZXRpX3RzX3Byb2JlKHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsCisJCQkJICAgY29uc3Qgc3RydWN0IGkyY19kZXZpY2VfaWQgKmlkcCkKK3sKKwlzdHJ1Y3QgZWV0aV90c19wcml2ICpwcml2OworCXN0cnVjdCBpbnB1dF9kZXYgKmlucHV0OworCWludCBlcnIgPSAtRU5PTUVNOworCisJLyogSW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LCAgICAgICAgICAgICAgICAgLTEsLTEsIHtBQ1RfREVCVUd9fSwKLQl7UlNQX1pDVFAsICAgIDYwOSw2MDksIC0xLCAgICAgICAgICAgICAgICAgLTEsLTEsIHtBQ1RfREVCVUd9fSwKLQl7UlNQX1pDUE4sICAgIDYwOSw2MDksIC0xLCAgICAgICAgICAgICAgICAgLTEsLTEsIHtBQ1RfREVCVUd9fSwKIAl7UlNQX0VSUk9SLCAgIDYwMSw2MDksIC0xLCAgICAgICAgICAgICAgICAgIDAsIDAsIHtBQ1RfQUJPUlRESUFMfX0sCiAJe0VWX1RJTUVPVVQsICA2MDEsNjA5LCAtMSwgICAgICAgICAgICAgICAgICAwLCAwLCB7QUNUX0FCT1JURElBTH19LAogCi0JLyogZGlhbGluZyAqLwotCXtSU1BfWkNUUCwgICAgNjUwLDY1MCwgLTEsICAgICAgICAgICAgICAgICAtMSwtMSwge0FDVF9ERUJVR319LAotCXtSU1BfWkNQTiwgICAgNjUwLDY1MCwgLTEsICAgICAgICAgICAgICAgICAtMSwtMSwge0FDVF9ERUJVR319LAotCXtSU1BfWlNBVSwgICAgNjUwLDY1MCxaU0FVX0NBTExfREVMSVZFUkVELCAtMSwtMSwge0FDVF9ERUJVR319LCAvKiBzb21lIGRldmljZXMgZG9uJ3Qgc2VuZCB0aGlzICovCisJLyogb3B0aW9uYWwgZGlhbGluZyByZXNwb25zZXMgKi8KKwl7RVZfQkNfT1BFTiwgIDY1MCw2NTAsIC0xLCAgICAgICAgICAgICAgICA2NTEsLTF9LAorCXtSU1BfWlZMUywgICAgNjA4LDY1MSwgMTcsICAgICAgICAgICAgICAgICAtMSwtMSwge0FDVF9ERUJVR319LAorCXtSU1BfWkNUUCwgICAgNjA5LDY1MSwgLTEsICAgICAgICAgICAgICAgICAtMSwtMSwge0FDVF9ERUJVR319LAorCXtSU1BfWkNQTiwgICAgNjA5LDY1MSwgLTEsICAgICAgICAgICAgICAgICAtMSwtMSwge0FDVF9ERUJVR319LAorCXtSU1Bf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pKTsKKwkJc3Bpbl91bmxvY2soJnJlY2VpdmluZ19saXN0X2xvY2spOworCisJCWdvdG8gb3V0OworCX0KKworCXIgPSB3YWl0X2Zvcl9jb21wbGV0aW9uX3RpbWVvdXQoJihwa2cuY29tcGxldGUpLCBETV9VTE9HX1JFVFJZX1RJTUVPVVQpOworCXNwaW5fbG9jaygmcmVjZWl2aW5nX2xpc3RfbG9jayk7CisJbGlzdF9kZWxfaW5pdCgmKHBrZy5saXN0KSk7CisJc3Bpbl91bmxvY2soJnJlY2VpdmluZ19saXN0X2xvY2spOworCWlmICghcikgeworCQlETVdBUk4oIlslc10gUmVxdWVzdCB0aW1lZCBvdXQ6IFsldS8ldV0gLSByZXRyeWluZyIsCisJCSAgICAgICAoc3RybGVuKHV1aWQpID4gOCkgPworCQkgICAgICAgKHV1aWQgKyAoc3RybGVuKHV1aWQpIC0gOCkpIDogKHV1aWQpLAorCQkgICAgICAgcmVxdWVzdF90eXBlLCBwa2cuc2VxKTsKKwkJZ290byByZXNlbmQ7CisJfQorCisJciA9IHBrZy5lcnJvcjsKKwlpZiAociA9PSAtRUFHQUlOKQorCQlnb3RvIHJlc2VuZDsKKworb3V0OgorCXJldHVybiByOworfQorCitpbnQgZG1fdWxvZ190ZnJfaW5pdCh2b2lkKQoreworCWludCByOworCXZvaWQgKnByZWFsbG9jZWQ7CisKKwlJTklUX0xJU1RfSEVBRCgmcmVjZWl2aW5nX2xpc3QpOworCisJcHJlYWxsb2NlZCA9IGttYWxsb2MoRE1fVUxPR19QUkVBTExPQ0VEX1NJWkUsIEdGUF9LRVJORUwpOworCWlmICghcHJlYWxsb2NlZCkKKwkJcmV0dXJuIC1FTk9NRU07CisKKwlwcmVhbGxvY2VkX2NuX21zZyA9IHByZWFsbG9jZWQ7CisJcHJlYWxsb2NlZF91bG9nX3RmciA9IHByZWFsbG9jZWQgKyBzaXplb2Yoc3RydWN0IGNuX21zZyk7CisKKwlyID0gY25fYWRkX2NhbGxiYWNrKCZ1bG9nX2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UgMzogQ2FsY3VsYXRlIHNlcnZpY2UgdGltZS4gQ2hvb3NlIGZhc3RlciBwYXRoLgorCSAqICAgICAgICAgU2VydmljZSB0aW1lIHVzaW5nIHBpMToKKwkgKiAgICAgICAgICAgICBzdDEgPSAoc3oxICsgaW5jb21pbmcpIC8gcGkxLT5yZWxhdGl2ZV90aHJvdWdocHV0CisJICogICAgICAgICBTZXJ2aWNlIHRpbWUgdXNpbmcgcGkyOgorCSAqICAgICAgICAgICAgIHN0MiA9IChzejIgKyBpbmNvbWluZykgLyBwaTItPnJlbGF0aXZlX3Rocm91Z2hwdXQKKwkgKgorCSAqICAgICAgICAgVG8gYXZvaWQgdGhlIGRpdmlzaW9uLCB0cmFuc2Zvcm0gdGhlIGV4cHJlc3Npb24gdG8gdXNlCisJICogICAgICAgICBtdWx0aXBsaWNhdGlvbi4KKwkgKiAgICAgICAgIEJlY2F1c2UgLT5yZWxhdGl2ZV90aHJvdWdocHV0ID4gMCBoZXJlLCBpZiBzdDEgPCBzdDIsCisJICogICAgICAgICB0aGUgZXhwcmVzc2lvbnMgYmVsb3cgYXJlIHRoZSBzYW1lIG1lYW5pbmc6CisJICogICAgICAgICAgICAgKHN6MSArIGluY29taW5nKSAvIHBpMS0+cmVsYXRpdmVfdGhyb3VnaHB1dCA8CisJICogICAgICAgICAgICAgICAgIChzejIgKyBpbmNvbWluZykgLyBwaTItPnJlbGF0aXZlX3Rocm91Z2hwdXQKKwkgKiAgICAgICAgICAgICAoc3oxICsgaW5jb21pbmcpICogcGkyLT5yZWxhdGl2ZV90aHJvdWdocHV0IDwKKwkgKiAgICAgICAgICAgICAgICAgKHN6MiArIGluY29taW5nKSAqIHBpMS0+cmVsYXRpdmVfdGhyb3VnaHB1dAorCSAqICAgICAgICAgU28gdXNlIHRoZSBsYXRlciBvbmUuCisJICovCisJc3oxICs9IGluY29taW5nOworCXN6MiArPSBpbmNvbWluZzsKKwlpZiAodW5saWtlbHkoc3oxID49IFNUX01BWF9JTkZMSUdI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ZXIgPSBtdDl2MDExX3NfcmVnaXN0ZXIsCisjZW5kaWYKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgdjRsMl9zdWJkZXZfdmlkZW9fb3BzIG10OXYwMTFfdmlkZW9fb3BzID0geworCS5lbnVtX2ZtdCA9IG10OXYwMTFfZW51bV9mbXQsCisJLnRyeV9mbXQgPSBtdDl2MDExX3RyeV9mbXQsCisJLnNfZm10ID0gbXQ5djAxMV9zX2ZtdCwKKwkuZ19wYXJtID0gbXQ5djAxMV9nX3Bhcm0sCisJLnNfcGFybSA9IG10OXYwMTFfc19wYXJtLAorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCB2NGwyX3N1YmRldl9vcHMgbXQ5djAxMV9vcHMgPSB7CisJLmNvcmUgID0gJm10OXYwMTFfY29yZV9vcHMsCisJLnZpZGVvID0gJm10OXYwMTFfdmlkZW9fb3BzLAorfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCQkJSTJDIENsaWVudCAmIERyaXZlcgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgbXQ5djAxMV9wcm9iZShzdHJ1Y3QgaTJjX2NsaWVudCAqYywKKwkJCSBjb25zdCBzdHJ1Y3QgaTJjX2RldmljZV9pZCAqaWQpCit7CisJdTE2IHZlcnNpb247CisJc3RydWN0IG10OXYwMTEgKmNvcmU7CisJc3RydWN0IHY0bDJfc3ViZGV2ICpzZDsKKworCS8qIENoZWNrIGlmIHRoZSBhZGFwdGVyIHN1cHBvcnRzIHRoZSBuZWVkZWQgZmVhdHVyZXMgKi8KKwlpZiAoIWkyY19jaGVja19mdW5jdGlvbmFsaXR5KGMtPmFkYXB0ZXIsCisJICAgICBJMkNfRlVOQ19TTUJVU19SRUFEX0JZVEUgf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fbWFwID0gewogCS5uYW1lID0gIlJBTSIsCisJLnBoeXMgPSAodW5zaWduZWQgbG9uZykmX2Vic3MsCisJLnNpemUgPSAwLAogfTsKIAotc3RydWN0IG10ZF9pbmZvICp1Y2xpbnV4X3JhbV9tdGRpbmZvOworc3RhdGljIHN0cnVjdCBtdGRfaW5mbyAqdWNsaW51eF9yYW1fbXRkaW5mbzsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0cnVjdCBtdGRfcGFydGl0aW9uIHVjbGludXhfcm9tZnNbXSA9IHsKK3N0YXRpYyBzdHJ1Y3QgbXRkX3BhcnRpdGlvbiB1Y2xpbnV4X3JvbWZzW10gPSB7CiAJeyAubmFtZSA9ICJST01mcyIgfQogfTsKIApAQCAtMzgsNyArNDIsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotaW50IHVjbGludXhfcG9pbnQoc3RydWN0IG10ZF9pbmZvICptdGQsIGxvZmZfdCBmcm9tLCBzaXplX3QgbGVuLAorc3RhdGljIGludCB1Y2xpbnV4X3BvaW50KHN0cnVjdCBtdGRfaW5mbyAqbXRkLCBsb2ZmX3QgZnJvbSwgc2l6ZV90IGxlbiwKIAlzaXplX3QgKnJldGxlbiwgdm9pZCAqKnZpcnQsIHJlc291cmNlX3NpemVfdCAqcGh5cykKIHsKIAlzdHJ1Y3QgbWFwX2luZm8gKm1hcCA9IG10ZC0+cHJpdjsKQEAgLTU1LDEyICs1OSwxMCBAQAogewogCXN0cnVjdCBtdGRfaW5mbyAqbXRkOwogCXN0cnVjdCBtYXBfaW5mbyAqbWFwcDsKLQlleHRlcm4gY2hhciBfZWJzczsKLQl1bnNpZ25lZCBsb25nIGFkZHIgPSAodW5zaWduZWQgbG9uZykgJl9lYnNzOwogCiAJbWFw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CSooZWNjX2RhdGEyICsgaSkgPSB+KCooZWNjX2RhdGEyICsgaSkpOworCX0KKworCWZvciAoaSA9IDA7IGkgPCA4OyBpKyspIHsKKwkJdG1wMF9iaXRbaV0gICAgID0gKmVjY19kYXRhMSAlIDI7CisJCSplY2NfZGF0YTEJPSAqZWNjX2RhdGExIC8gMjsKKwl9CisKKwlmb3IgKGkgPSAwOyBpIDwgODsgaSsrKSB7CisJCXRtcDFfYml0W2ldCSA9ICooZWNjX2RhdGExICsgMSkgJSAyOworCQkqKGVjY19kYXRhMSArIDEpID0gKihlY2NfZGF0YTEgKyAxKSAvIDI7CisJfQorCisJZm9yIChpID0gMDsgaSA8IDg7IGkrKykgeworCQl0bXAyX2JpdFtpXQkgPSAqKGVjY19kYXRhMSArIDIpICUgMjsKKwkJKihlY2NfZGF0YTEgKyAyKSA9ICooZWNjX2RhdGExICsgMikgLyAyOworCX0KKworCWZvciAoaSA9IDA7IGkgPCA4OyBpKyspIHsKKwkJY29tcDBfYml0W2ldICAgICA9ICplY2NfZGF0YTIgJSAyOworCQkqZWNjX2RhdGEyICAgICAgID0gKmVjY19kYXRhMiAvIDI7CisJfQorCisJZm9yIChpID0gMDsgaSA8IDg7IGkrKykgeworCQljb21wMV9iaXRbaV0gICAgID0gKihlY2NfZGF0YTIgKyAxKSAlIDI7CisJCSooZWNjX2RhdGEyICsgMSkgPSAqKGVjY19kYXRhMiArIDEpIC8gMjsKKwl9CisKKwlmb3IgKGkgPSAwOyBpIDwgODsgaSsrKSB7CisJCWNvbXAyX2JpdFtpXSAgICAgPSAqKGVjY19kYXRhMiArIDIpICUgMjsKKwkJKihlY2NfZGF0YTIgKyAyKSA9ICooZWNjX2RhdGEyICsgMikgLyAyOworCX0KKworCWZvciAoaSA9IDA7IGkgPCA2OyBpKyspCisJCWVjY19iaXRbaV0gPSB0bXAyX2JpdFtpICsgMl0gXiBjb21wMl9iaXRbaSArIDJdOworCisJZm9yIChpID0gMDsgaSA8IDg7IGkrKykKKwkJ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SAlIDEwOwogCQkJdGFza0luZm8tPmhwX3Nsb3QgPSBocF9zbG90OwpAQCAtMTAwLDE3ICsxMDAsMTcgQEAKIAkJCWZ1bmMtPnByZXNlbmNlX3NhdmUgfD0gKHRlbXBfd29yZCA+PiAoaHBfc2xvdCArIDcpKSAmIDB4MDI7CiAKIAkJCWlmIChjdHJsLT5jdHJsX2ludF9jb21wICYgKDB4MUwgPDwgaHBfc2xvdCkpIHsKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCQkJCS8qCiAJCQkJICogU3dpdGNoIG9wZW5lZAotCQkJCSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCSAqLwogCiAJCQkJZnVuYy0+c3dpdGNoX3NhdmUgPSAwOwogCiAJCQkJdGFza0luZm8tPmV2ZW50X3R5cGUgPSBJTlRfU1dJVENIX09QRU47CiAJCQl9IGVsc2UgewotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJCQkJLyoKIAkJCQkgKiBTd2l0Y2ggY2xvc2VkCi0JCQkJICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJICovCiAKIAkJCQlmdW5jLT5zd2l0Y2hfc2F2ZSA9IDB4MTA7CiAKQEAgLTEzMSw5ICsxMzEsOCBAQAogewogCXN0cnVjdCBzbG90ICpzbG90ID0gY3RybC0+c2xvdDsKIAotCXdoaWxlIChzbG90ICYmIChzbG90LT5kZXZpY2UgIT0gZGV2aWNlKSkgeworCXdoaWxlIChzbG90ICYmIChzbG90LT5kZXZpY2UgIT0gZGV2aWNlKSkKIAkJc2xvdCA9IHNsb3QtPm5leHQ7Ci0JfQogCiAJcmV0dXJuIHNsb3Q7CiB9CkBAIC0xNTIsMTcgKzE1MSwxNyBAQAogCWlmICghY2hhbmdlKQogCQlyZXR1cm4gMDsKIAotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJLyoKIAkgKiBQcmVzZ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BocF9zbG90KSAmIDB4MDE7CiAJCQkJZnVuYy0+cHJlc2VuY2Vfc2F2ZSB8PSAodGVtcF93b3JkID4+IChocF9zbG90ICsgNykpICYgMHgwMjsKQEAgLTI0MSwxNyArMjQyLDE3IEBACiAJaWYgKCFjaGFuZ2UpCiAJCXJldHVybiAwOwogCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkvKgogCSAqIHBvd2VyIGZhdWx0Ci0JICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJICovCiAKIAlpbmZvKCJwb3dlciBmYXVsdCBpbnRlcnJ1cHRcbiIpOwogCiAJZm9yIChocF9zbG90ID0gMDsgaHBfc2xvdCA8IDY7IGhwX3Nsb3QrKykgewogCQlpZiAoY2hhbmdlICYgKDB4MDEgPDwgaHBfc2xvdCkpIHsKLQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJCQkvKgogCQkJICogdGhpcyBvbmUgY2hhbmdlZC4KLQkJCSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJICovCiAJCQlmdW5jID0gY3BxaHBfc2xvdF9maW5kKGN0cmwtPmJ1cywKIAkJCQkoaHBfc2xvdCArIGN0cmwtPnNsb3RfZGV2aWNlX29mZnNldCksIDApOwogCkBAIC0yNjIsMTYgKzI2MywxNiBAQAogCQkJcmMrKzsKIAogCQkJaWYgKGN0cmwtPmN0cmxfaW50X2NvbXAgJiAoMHgwMDAwMDEwMCA8PCBocF9zbG90KSkgewotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJCQkJLyoKIAkJCQkgKiBwb3dlciBmYXVsdCBDbGVhcmVkCi0JCQkJICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJICovCiAJCQkJZnVuYy0+c3RhdHVzID0gMHgwMDsKIAogCQkJCXRhc2tJbmZvLT5ldmVudF90eXBlID0gSU5UX1BPV0VSX0ZBVUxUX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UoJmlvbW11LT5sb2NrLCBmbGFncyk7CisJCXByaW50ayhLRVJOX0VSUiAiSU9NTVU6IG5vIGZyZWUgZG9tYWluIGlkc1xuIik7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCWRvbWFpbi0+aWQgPSBudW07CisJc2V0X2JpdChudW0sIGlvbW11LT5kb21haW5faWRzKTsKKwlzZXRfYml0KGlvbW11LT5zZXFfaWQsICZkb21haW4tPmlvbW11X2JtcCk7CisJaW9tbXUtPmRvbWFpbnNbbnVtXSA9IGRvbWFpbjsKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZpb21tdS0+bG9jaywgZmxhZ3MpOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkIGlvbW11X2RldGFjaF9kb21haW4oc3RydWN0IGRtYXJfZG9tYWluICpkb21haW4sCisJCQkJc3RydWN0IGludGVsX2lvbW11ICppb21tdSkKK3sKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCWludCBudW0sIG5kb21haW5zOworCWludCBmb3VuZCA9IDA7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmaW9tbXUtPmxvY2ssIGZsYWdzKTsKKwluZG9tYWlucyA9IGNhcF9uZG9tcyhpb21tdS0+Y2FwKTsKKwludW0gPSBmaW5kX2ZpcnN0X2JpdChpb21tdS0+ZG9tYWluX2lkcywgbmRvbWFpbnMpOworCWZvciAoOyBudW0gPCBuZG9tYWluczsgKSB7CisJCWlmIChpb21tdS0+ZG9tYWluc1tudW1dID09IGRvbWFpbikgeworCQkJZm91bmQgPSAxOworCQkJYnJlYWs7CisJCX0KKwkJbnVtID0gZmluZF9uZXh0X2JpdChpb21tdS0+ZG9tYWluX2lkcywKKwkJCQkgICAgY2FwX25kb21zKGlvbW11LT5jYXApLCBudW0rMSk7CisJfQorCisJaWYgKGZvdW5kKSB7CisJCWNsZWFyX2JpdChudW0sIGlvbW11LT5kb21haW5faWRzKTsKKwkJY2xlYXJfYml0KGlvbW11LT5zZXFfa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WxlIChxbGlzdF9zaXplKSB7CisJCWlmICgocWxpc3QtPnZlbmRvciA9PSB0aGlua3BhZF9pZC52ZW5kb3IgfHwKKwkJCQlxbGlzdC0+dmVuZG9yID09IFRQQUNQSV9NQVRDSF9BTlkpICYmCisJCSAgICAocWxpc3QtPmJpb3MgPT0gdGhpbmtwYWRfaWQuYmlvc19tb2RlbCB8fAorCQkJCXFsaXN0LT5iaW9zID09IFRQQUNQSV9NQVRDSF9BTlkpICYmCisJCSAgICAocWxpc3QtPmVjID09IHRoaW5rcGFkX2lkLmVjX21vZGVsIHx8CisJCQkJcWxpc3QtPmVjID09IFRQQUNQSV9NQVRDSF9BTlkpKQorCQkJcmV0dXJuIHFsaXN0LT5xdWlya3M7CisKKwkJcWxpc3Rfc2l6ZS0tOworCQlxbGlzdCsrOworCX0KKwlyZXR1cm4gMDsKK30KKworCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCkBAIC01MTgsMTggKzU4Myw2IEBACiAJcmV0dXJuIDE7CiB9CiAKLSNpZiBkZWZpbmVkKENPTkZJR19USElOS1BBRF9BQ1BJX0RPQ0spIHx8IGRlZmluZWQoQ09ORklHX1RISU5LUEFEX0FDUElfQkFZKQotc3RhdGljIGludCBfc3RhKGFjcGlfaGFuZGxlIGhhbmRsZSkKLXsKLQlpbnQgc3RhdHVzOwotCi0JaWYgKCFoYW5kbGUgfHwgIWFjcGlfZXZhbGYoaGFuZGxlLCAmc3RhdHVzLCAiX1NUQSIsICJkIikpCi0JCXN0YXR1cyA9IDA7Ci0KLQlyZXR1cm4gc3RhdHVzOwotfQotI2VuZGlmCi0KIHN0YXRpYyBpbnQgaXNzdWVfdGhpbmtwYWRfY21vc19jb21tYW5kKGludCBjbW9zX2Nt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WUgKi8KKworLyogQ3VycmVudCB1bml0IG1lYXN1cmVtZW50IGluIHVBIGZvciBhIDEgbWlsbGktb2htIHNlbnNlIHJlc2lzdG9yICovCisjZGVmaW5lIERTMjc4Ml9DVVJSRU5UX1VOSVRTCTE1NjMKKworI2RlZmluZSB0b19kczI3ODJfaW5mbyh4KSBjb250YWluZXJfb2YoeCwgc3RydWN0IGRzMjc4Ml9pbmZvLCBiYXR0ZXJ5KQorCitzdHJ1Y3QgZHMyNzgyX2luZm8geworCXN0cnVjdCBpMmNfY2xpZW50CSpjbGllbnQ7CisJc3RydWN0IHBvd2VyX3N1cHBseQliYXR0ZXJ5OworCWludAkJCWlkOworfTsKKworc3RhdGljIERFRklORV9JRFIoYmF0dGVyeV9pZCk7CitzdGF0aWMgREVGSU5FX01VVEVYKGJhdHRlcnlfbG9jayk7CisKK3N0YXRpYyBpbmxpbmUgaW50IGRzMjc4Ml9yZWFkX3JlZyhzdHJ1Y3QgZHMyNzgyX2luZm8gKmluZm8sIGludCByZWcsIHU4ICp2YWwpCit7CisJaW50IHJldDsKKworCXJldCA9IGkyY19zbWJ1c19yZWFkX2J5dGVfZGF0YShpbmZvLT5jbGllbnQsIHJlZyk7CisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2VycigmaW5mby0+Y2xpZW50LT5kZXYsICJyZWdpc3RlciByZWFkIGZhaWxlZFxuIik7CisJCXJldHVybiByZXQ7CisJfQorCisJKnZhbCA9IHJldDsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgZHMyNzgyX3JlYWRfcmVnMTYoc3RydWN0IGRzMjc4Ml9pbmZvICppbmZvLCBpbnQgcmVnX21zYiwKKwkJCQkgICAgczE2ICp2YWwpCit7CisJaW50IHJldDsKKworCXJldCA9IHN3YWIxNihpMmNfc21idXNfcmVhZF93b3JkX2RhdGEoaW5mby0+Y2xpZW50LCByZWdfbXNiKSk7CisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2VycigmaW5mby0+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WxlIChzaW9faW4odXAsIFRYWDlfU0lESVNSKSAmIFRYWDlfU0lESVNSX1VWQUxJRCkKKwkJOworCisJYyA9IHNpb19pbih1cCwgVFhYOV9TSVJGSUZPKTsKKworCS8qCisJICoJRmluYWxseSwgY2xlYXIgUlggaW50ZXJydXB0IHN0YXR1cworCSAqCWFuZCByZXN0b3JlIHRoZSBJRVIKKwkgKi8KKwlzaW9fbWFzayh1cCwgVFhYOV9TSURJU1IsIFRYWDlfU0lESVNSX1JESVMpOworCXNpb19vdXQodXAsIFRYWDlfU0lESUNSLCBpZXIpOworCXJldHVybiBjOworfQorCisKK3N0YXRpYyB2b2lkIHNlcmlhbF90eHg5X3B1dF9wb2xsX2NoYXIoc3RydWN0IHVhcnRfcG9ydCAqcG9ydCwgdW5zaWduZWQgY2hhciBjKQoreworCXVuc2lnbmVkIGludCBpZXI7CisJc3RydWN0IHVhcnRfdHh4OV9wb3J0ICp1cCA9IChzdHJ1Y3QgdWFydF90eHg5X3BvcnQgKilwb3J0OworCisJLyoKKwkgKglGaXJzdCBzYXZlIHRoZSBJRVIgdGhlbiBkaXNhYmxlIHRoZSBpbnRlcnJ1cHRzCisJICovCisJaWVyID0gc2lvX2luKHVwLCBUWFg5X1NJRElDUik7CisJc2lvX291dCh1cCwgVFhYOV9TSURJQ1IsIDApOworCisJd2FpdF9mb3JfeG1pdHIodXApOworCS8qCisJICoJU2VuZCB0aGUgY2hhcmFjdGVyIG91dC4KKwkgKglJZiBhIExGLCBhbHNvIGRvIENSLi4uCisJICovCisJc2lvX291dCh1cCwgVFhYOV9TSVRGSUZPLCBjKTsKKwlpZiAoYyA9PSAxMCkgeworCQl3YWl0X2Zvcl94bWl0cih1cCk7CisJCXNpb19vdXQodXAsIFRYWDlfU0lURklGTywgMTMpOworCX0KKworCS8qCisJICoJRmluYWxseSwgd2FpdCBmb3IgdHJhbnNtaXR0ZXIgdG8gYmVjb21lIGVtcHR5CisJICoJYW5kIHJlc3RvcmUgdGhlIElFUgorCSA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ybiAtRUlOVkFMOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL2NvbWVkaS9kcml2ZXJzL2FkZGktZGF0YS9BUENJMTcxMF84Mng1NC5jIGIvZHJpdmVycy9zdGFnaW5nL2NvbWVkaS9kcml2ZXJzL2FkZGktZGF0YS9BUENJMTcxMF84Mng1NC5jCmluZGV4IGM5NmFlZTAuLjYwMjEzZDIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9jb21lZGkvZHJpdmVycy9hZGRpLWRhdGEvQVBDSTE3MTBfODJ4NTQuYworKysgYi9kcml2ZXJzL3N0YWdpbmcvY29tZWRpL2RyaXZlcnMvYWRkaS1kYXRhL0FQQ0kxNzEwXzgyeDU0LmMKQEAgLTIzLDE2ICsyMywxNiBAQAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX0luaXRUaW1lciAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfVGltZXJNb2RlLCAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfVGltZXJOYnIsICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck1vZGUsICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfIHVsX1JlbG9hZFZhbHVlLCAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSW5wdXRDbG9ja1NlbGVjdGlvbiwgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9JbnB1dENsb2NrTGV2ZWwsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX091dHB1dExldmVsLCAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSGFyZHdhcmVHYXRlTGV2ZWwpCi1JTlQgaV9JbnNuQ29uZmlnX0luaXRUaW1lcihzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0lucHV0Q2xvY2tTZWxlY3Rpb24sICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGF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gICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSS0xNzEwICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciAgICAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9UaW1lck5iciAgICAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTmJyICAgICAgICAgICA6IFRpbWVyIG51bWJlciB0byAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDIpICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9UaW1lck1vZGUgICAgICAgICAgOiBUaW1lciBtb2RlIHNlbGVjdGlvbiAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTW9kZSAgICAgICAgICA6IFRpbWVyIG1vZGUgc2VsZWN0aW9uICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gNSkgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOiBJbnRlcnJ1cHQgb24gdGVybWluYWx8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ICAgICAgICAgICAgICAgIHwKQEAgLTE3MywyMSArMTczLDIxIEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvciBkaXZpc2lvbiBmYWN0b3IgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlZSB0aW1lciBtb2RlICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gdGFibGUuICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX0lucHV0Q2xvY2tTZWxlY3Rpb24gOiBTZWxlY3Rpb24gZnJvbSBpbnB1dCAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfSW5wdXRDbG9ja1NlbGVjdGlvbiA6IFNlbGVjdGlvbiBmcm9tIGlucHV0ICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXIgY2xvY2suICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZWUgaW5wdXQgY2xvY2sgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbiB0YWJsZS4gICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9JbnB1dENsb2NrTGV2ZWwgICAgIDogU2VsZWN0aW9uIGZyb20gaW5wdXQgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0lucHV0Q2xvY2tMZXZlbCAgICAgOiBTZWxlY3Rpb24gZnJvbSBpbnB1dCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrIGxldmVsLiAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IExvdyBhY3RpdmUgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKElucHV0IGludmVydGVkKSAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBIaWdoIGFjdGl2ZSAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9PdXRwdXRMZXZlbCwgICAgICAgIDogU2VsZWN0aW9uIGZyb20gb3V0cHV0ICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX091dHB1dExldmVsLCAgICAgICAgOiBTZWxlY3Rpb24gZnJvbSBvdXRwdXQgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrIGxldmVsLiAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IExvdyBhY3RpdmUgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogSGlnaCBhY3RpdmUgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoT3V0cHV0IGludmVydGVkKSAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9IYXJkd2FyZUdhdGVMZXZlbCAgIDogU2VsZWN0aW9uIGZyb20gICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX0hhcmR3YXJlR2F0ZUxldmVsICAgOiBTZWxlY3Rpb24gZnJvbSAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhcmR3YXJlIGdhdGUgbGV2ZWwuICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IExvdyBhY3RpdmUgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKElucHV0IGludmVydGVkKSAgIHwKQEAgLTE5NSwxNCArMTk1LDE0IEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiB5b3Ugd2lsbCBub3QgdXNlZCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBoYXJkd2FyZSBnYXRlIHNldCAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyB2YWx1ZSB0byAwLgotfGJfTW9kdWxOYnIgICAgICAgID0gKEJZVEUpIENSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOwotCWJfVGltZXJOYnIJCSAgPSAoQllURSkgQ1JfQ0hBTihpbnNuLT5jaGFuc3BlYyk7Ci0JYl9UaW1lck1vZGUJCSAgPSAoQllURSkgZGF0YVswXTsKLQl1bF9SZWxvYWRWYWx1ZQkgID0gKFVMT05HKSBkYXRhWzFdOwotCWJfSW5wdXRDbG9ja1NlbGVjdGlvbgk9KEJZVEUpIGRhdGFbMl07Ci0JYl9JbnB1dENsb2NrTGV2ZWwJCT0oQllURSkgZGF0YVszXTsKLQliX091dHB1dExldmVsCQkJPShCWVRFKSBkYXRhWzRdOwotCWJfSGFyZHdhcmVHYXRlTGV2ZWwJCT0oQllURSkgZGF0YV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ENJMTcxMF9FbmFibGVUaW1lciAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfVGltZXJOYnIsICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9JbnRlcnJ1cHRFbmFibGUpCi1JTlQgaV9BUENJMTcxMF9JbnNuV3JpdGVFbmFibGVEaXNhYmxlVGltZXIoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldixzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlKQoraW50IGlfQVBDSTE3MTBfSW5zbldyaXRlRW5hYmxlRGlzYWJsZVRpbWVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCiAJc3RydWN0IGNvbWVkaV9pbn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mVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfVGltZXJOYnIgICAgICAgIDogVGltZXIgbnVtYmVyIHRvIGVuYWJsZSAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gZW5hYmxlICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDIpICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSW50ZXJydXB0RW5hYmxlIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyIGludGVycnVwdC4gICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFIDogICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIHRpbWVyIGludGVycnVwdCB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEUgOiAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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ICgoYl9UaW1lck5iciA+PSAwKSAmJiAoYl9UaW1lck5iciA8PSAyKSkgKi8KIAkJfSBlbHNlIHsKIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgVElNRVIgbW9kdWxlICovCiAJCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIFRJTUVSIG1vZHVsZVxuIik7CkBAIC01NTIsMjQgKzU1MiwyNCBAQAogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX1JlYWRBbGxUaW1lclZhbHVlICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfVGltZXJWYWx1ZUFycmF5KQotSU5UIGlfQVBDSTE3MTBfSW5zblJlYWRBbGxUaW1lclZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCitpbnQgaV9BUENJMTcxMF9JbnNuUmVhZEFsbFRpbWVyVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldixzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKIAlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBhbGwgdGltZXIgdmFsdWVzIGZyb20gc2VsZWN0ZWQgdGltZXIgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gICBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCAgICAgICAgICAgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJLTE3MTAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBud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W5zaWduZWQgaW50KWRhdGFbMV0pOwogCiAJCWJyZWFrOwogCkBAIC03MjcsMjUgKzcyNywyNSBAQAogCiAJaWYgKGlfUmV0dXJuVmFsdWUgPj0gMCkKIAkJaV9SZXR1cm5WYWx1ZSA9IGluc24tPm47Ci0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX1JlYWRUaW1lclZhbHVlICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1RpbWVyVmFsdWUpICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgdGltZXIgdmFsdWUgZnJvbSBzZWxlY3RlZCBkaWdpdGFsIHRpbWVyICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgKGJfVGltZXJOYnIpIGZyb20gc2VsZWN0ZWQgdGltZXIgIG1vZHVsZSAoYl9Nb2R1bE5icikuIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSS0xNzEwICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gcmVhZCAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1RpbWVyTmJyICAgICAgICA6IFRpbWVyIG51bWJlciB0byByZWFkICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMikgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IE91dHB1dCBQYXJhbWV0ZXJzIDogUFVMT05HXyBwdWxfVGltZXJWYWx1ZSAgICA6IFRpbWVyIHZhbHVlICAgICAgICAgICAgICAgIHwKQEAgLTc2MCwxMSArNzYwLDExIEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLUlOVCBpX0FQQ0kxNzEwX1JlYWRUaW1lclZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCQkJICAgICAgQllURSBiX01vZHVsTmJyLCBCWVRFIGJfVGltZXJOYnIsCi0JCQkgICAgICBQVUxPTkcgcHVsX1RpbWVyVmFsdWUpCitpbnQgaV9BUENJMTcxMF9SZWFkVGltZXJWYWx1ZShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAorCQkJICAgICAgdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLCB1bnNpZ25lZCBjaGFyIGJfVGltZXJOYnIsCisJCQkgICAgICB1bnNpZ25lZCBpbnQgKnB1bF9UaW1lclZhbHVlKQogewotCUlOVCBpX1JldHVyblZhbHVlID0gMDsKKwlpbnQgaV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01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX091dHB1dExldmVsKSAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9PdXRwdXRMZXZlbCkgICAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAJICAgfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgb3V0cHV0IHNpZ25hbCBsZXZlbCAocGJfT3V0cHV0TGV2ZWwpIGZyb20gICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIGRpZ2l0YWwgdGltZXIgKGJfVGltZXJOYnIpIGZyb20gc2VsZWN0ZWQgdGltZXJ8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8CisJICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJLTE3MTAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8CisJICAgfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gdGVzdCAgICAgICB8CisJICAgfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gdGVzdCAgICAgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAyKSAgICAgICAgIC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gICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1RpbWVyTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgcGJfVGltZXJTdGF0dXMpICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltZXJOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfVGltZXJTdGF0dXMpICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBwcm9ncmVzcyBzdGF0dXMgKHBiX1RpbWVyU3RhdHVzKSBmcm9tICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCBkaWdpdGFsIHRpbWVyIChiX1RpbWVyTmJyKSBmcm9tIHNlbGVjdGVkIHRpbWVyfAogfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyAgIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkICAgICAgICAgICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0ktMTcxMCAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfTW9kdWxOYnIgICAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfVGltZXJOYnIgICAgICAgIDogVGltZXIgbnVtYmVyIHRvIHRlc3QgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciAgICAgICAgOiBUaW1lciBudW1iZXIgdG8gdGVzdCAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDIpICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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1FUiBtb2R1bGUgKi8KIApAQCAtOTc2LDkgKzk3Niw5IEBACiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gICAgIGlfQVBDSTE3MTBfV3JpdGVUaW1lclZhbHVlICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1lck5iciwgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfIHVsX1dyaXRlVmFsdWUpICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogV3JpdGUgdGhlIHZhbHVlICh1bF9Xcml0ZVZhbHVlKSBpbnRvIHRoZSBzZWxlY3RlZCB0aW1lcnwKQEAgLTk4NiwxMSArOTg2LDExIEBACiB8ICAgICAgICAgICAgICAgICAgICAgVGhlIGFjdGlvbiBpbiBkZXBlbmQgb2YgdGhlIHRpbWUgbW9kZSBzZWxlY3Rpb24uICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBTZWUgdGltZXIgbW9kZSBkZXNjcmlwdGlvbiB0YWJsZS4gICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gICBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCAgICAgICAgICAgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJLTE3MTAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIgICAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX1RpbWVyTmJyICAgICA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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX0luaXRDaHJvbm8gICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9DaHJvbm9Nb2RlLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfQ2hyb25vTW9kZSwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9QQ0lJbnB1dENsb2NrLCAgICA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mlndXJlICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgIHwKLXwgQllURV8gICBiX0Nocm9ub01vZGUJCQkJZGF0YVswXSAgICA6IENocm9ub21ldGVyIGFjdGlvbiBtb2RlICAgICB8Cit8IHVuc2lnbmVkIGNoYXJfICAgYl9DaHJvbm9Nb2RlCQkJCWRhdGFbMF0gICAgOiBDaHJvbm9tZXRlciBhY3Rpb24gbW9kZSAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDcpLiAgICAgICAgICAgICAgICAgICB8Ci18IEJZVEVfICAgYl9QQ0lJbnB1dENsb2NrCQkJZGF0YVsxXSA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgY2xvY2t8Cit8IHVuc2lnbmVkIGNoYXJfICAgYl9QQ0lJbnB1dENsb2NrCQkJZGF0YVsxXSA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgY2xvY2t8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBBUENJMTcxMF8zME1IWiA6ICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBQQyBoYXZlIGEgUENJIGJ1cyAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2sgZnJvbSAzMCBNSHogICAgICAgICB8CkBAIC0xMDQsNyArMTA0LDcgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBBUENJLTE3MTAgaGF2ZSBhICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZWdyYXRlZCA0ME1oeiAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWFydHouICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICBCWVRFXyAgIGJfVGltaW5nVW5pdAlkYXRhWzJdICAgIDogQmFzZSB0aW1pbmcgdW5pdHkgKDAgdG8gNCkgfAorfCAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9UaW1pbmdVbml0CWRhdGFbMl0gICAgOiBCYXNlIHRpbWluZyB1bml0eSAoMCB0byA0KSB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBucyAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IMK1cyAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IG1zICAgICAgICAgICAgICAgICAgICAgfApAQCAtMTMxLDIzICsxMzEsMjMgQEAKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotSU5UIGlfQVBDSTE3MTBfSW5zbkNvbmZpZ0luaXRDaHJvbm8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQoraW50IGlfQVBDSTE3MTBfSW5zbkNvbmZpZ0luaXRDaHJvbm8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZ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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9FbmFibGVDaHJvbm8gICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyBiX0JvYXJkSGFuZGxlLCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIsICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9DeWNsZU1vZGUsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0ludGVycnVwdEVuYWJsZSkKLUlOVCBpX0FQQ0kxNzEwX0luc25Xcml0ZUVuYWJsZURpc2FibGVDaHJvbm8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlLCAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIsICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9DeWNsZU1vZGUsICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSkKK2ludCBpX0FQQ0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MCAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgIENSX0FSRUYoY2hhbnNwZWMpICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykgfAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gIEVOQUJsZS9EaXNhYmxlIGNocm9ubwotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfQ3ljbGVNb2RlICAgIDogU2VsZWN0ZWQgdGhlIGNocm9ub21ldGVyICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9DeWNsZU1vZGUgICAgOiBTZWxlY3RlZCB0aGUgY2hyb25vbWV0ZXIgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgYWNxdWlzaXRpb24gbW9kZSAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSAgICAgICAgICAgIGNocm9ub21ldGVyIGludGVycnVwdC4gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFOiAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIGNocm9ub21ldGVyICAgICAgIHwKQEAgLTg0MCwxNSArODQwLDE1IEBACiArLS0tLS0tL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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0dldENocm9ub1Byb2dyZXNzU3RhdHVzICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgcGJfQ2hyb25vU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0Nocm9ub1N0YXR1cykgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgY2hyb25vbWV0ZXIgc3RhdHVzIChwYl9DaHJvbm9TdGF0dXMpIGZyb20gICB8CiB8ICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgY2hyb25vbWV0ZXIgbW9kdWxlIChiX01vZHVsTmJyKS4gICAgICAgICAgICAgIHwKICstLS0tLS0tLS0t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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfUmVhZENocm9ub1ZhbHVlICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUlOVF8gICAgdWlfVGltZU91dCwgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9DaHJvbm9TdGF0dXMsICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnRfICAgIHVpX1RpbWVPdXQsICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX0Nocm9ub1N0YXR1cywgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfQ2hyb25vVmFsdWUpICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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iBQVUxPTkdfICBwYl9DaHJvbm9TdGF0dXMgOiBSZXR1cm4gdGhlIGNocm9ub21ldGVyICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cy4gICAgICAgICAgICAgICAgICAgICB8CkBAIC0xMzQxLDcgKzEzNDEsNyBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWluZyB3aXRjaCB0aGUgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0Q2hyb25vIiAgfAotfCAgICAgICAgICAgICAgICAgICAgIFBVTE9ORyAgcHVsX0Nocm9ub1ZhbHVlICA6IENocm9ub21ldGVyIHRpbWluZyB2YWx1ZS4gICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICogIHB1bF9DaHJvbm9WYWx1ZSAgOiBDaHJvbm9tZXRlciB0aW1pbmcgdmFsdWUuICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFJldHVybiBWYWx1ZSAgICAgIDogIDA6IE5vIGVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAtMTogVGhlIGhhbmRsZSBwYXJhbWV0ZXIgb2YgdGhlIGJvYXJkIGlzIHdyb25nICAgICAgICAgfApAQCAtMTM1NSwxMyArMTM1NSwxMyBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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hdHVzICYgMikgPT0gMikgKi8KKwkJCQkJCX0JLyogIGlmICgoZHdfU3RhdHVzICYgOCkgPT0gOCkgKi8KIAogCQkJCQkJaWYgKGR3X1RpbWVPdXQgPT0gdWlfVGltZU91dCkgewogCQkJICAgICAvKioqKioqKioqKioqKioqKiovCkBAIC0xNTA3LDcgKzE1MDcsNyBAQAogCQkJCQkJCW1kZWxheSgxMDAwKTsKIAogCQkJCQkJfQotCQkJCQl9CS8vIGZvciAoOzspCisJCQkJCX0JLyogIGZvciAoOzspICovCiAKIAkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogVGVzdCBpZiBzdG9wIHNpZ25hbCBvY2N1ciAqLwpAQCAtMTU3NSwzOSArMTU3NSwzOSBAQAogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfQ29udmVydENocm9ub1ZhbHVlICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgIHVsX0Nocm9ub1ZhbHVlLCAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfSG91ciwgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9NaW51dGUsICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX1NlY29uZCwgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVJTlRfICBwdWlfTWlsbGlTZWNvbmQsICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQVUlOVF8gIHB1aV9NaWNyb1NlY29uZCwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVSU5UXyAgcHVpX05hbm9TZWNvbmQpICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX01pbnV0ZSwgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX1NlY29uZCwgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpfICBwdWlfTWlsbGlTZWNvbmQsICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQg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hc3VyZWQgY2hyb25vbWV0ZXIgdGltaW5nICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS4gICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlZSJpX0FQQ0kxNzEwX1JlYWRDaHJvbm9WYWx1ZSJ8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQVUxPTkdfICAgcHVsX0hvdXIgICAgICAgIDogQ2hyb25vbWV0ZXIgdGltaW5nIGhvdXIgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgICAgcGJfTWludXRlICAgICAgOiBDaHJvbm9tZXRlciB0aW1pbmcgbWludXRlICB8Ci18ICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgICBwYl9TZWNvbmQgICAgICA6IENocm9ub21ldGVyIHRpbWluZyBzZWNvbmQgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQVUlOVF8gICAgcHVpX01pbGxpU2Vjb25kICA6IENocm9ub21ldGVyIHRpbWluZyBtaW5pICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICAgIHBiX01pbnV0ZSAgICAgIDogQ2hyb25vbWV0ZXIgdGltaW5nIG1pbnV0ZSAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICAgIHBiX1NlY29uZCAgICAgIDogQ2hyb25vbWV0ZXIgdGltaW5nIHNlY29uZCAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqXyAgICBwdWlfTWlsbGlTZWNvbmQgIDogQ2hyb25vbWV0ZXIgdGltaW5nIG1pbmkgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQVUlOVF8gICAgcHVpX01pY3JvU2Vjb25kIDogQ2hyb25vbWV0ZXIgdGltaW5nIG1pY3JvICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqXyAgICBwdWlfTWljcm9TZWNvbmQgOiBDaHJvbm9tZXRlciB0aW1pbmcgbWljcm8gICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQVUlOVF8gICAgcHVpX05hbm9TZWNvbmQgIDogQ2hyb25vbWV0ZXIgdGltaW5nIG5hbm8gICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqXyAgICBwdWlfTmFub1NlY29uZCAgOiBDaHJvbm9tZXRlciB0aW1pbmcgbmFubyAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZCAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC0xNjE5LDE1ICsxNjE5LDE1IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLUlOVCBpX0FQQ0kxNzEwX0NvbnZlcnRD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WwgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIG91dHB1dCAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX091dHB1dENoYW5uZWwgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIG91dHB1dCAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIENSX0NIQU4oKSAgICAgICAgICAgICAgICAgIGNoYW5uZWwgKDAgdG8gMikgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEggICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgQSAgICAgICAgICAgICAgICAgfApAQCAtMTc4NywxOSArMTc4NywxOSBAQAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfU2V0Q2hyb25vQ2hsT2ZmICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfT3V0cHV0Q2hhbm5lbCkgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfT3V0cHV0Q2hhbm5lbCkgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBSZXNldHMgdGhlIG91dHB1dCB3aXRjaCBoYXMgYmVlbiBwYXNzZWQgd2l0aCB0aGUgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlciBiX0NoYW5uZWwuIFJlc2V0dGluZyBhbiBvdXRwdXQgbWVhbnMgc2V0dGluZyB8CiB8ICAgICAgICAgICAgICAgICAgICAgYW4gb3V0cHV0IGxvdy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwCiAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdIDogQ2hsIE9OLCBDaGwgT0ZGICwgQ2hsIFJlYWQgLCBQb3J0IFJlYWQKIAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgIENSX0FSRUYgICAgOiBTZWxlY3RlZCBtb2R1bGUgbnVtYmVyICgwIHRvIDMpfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfT3V0cHV0Q2hhbm5lbCBDUl9DSEFOIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICBDUl9BUkVGICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX091dHB1dENoYW5uZWwgQ1JfQ0hBTiA6IFNlbGVjdGlvbiBmcm9tIGRpZ2l0YWwgb3V0cHV0ICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhbm5lbCAoMCB0byAyKSAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgSCAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5lbCBBICAgICAgICAgICAgICAgICB8CkBAIC0xODIwLDI0ICsxODIwLDI0IEBACiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkQ2hyb25vQ2hsVmFsdWUgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSW5wdXRDaGFubmVsLCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyBwYl9DaGFubmVsU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnB1dENoYW5uZWwsICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9DaGFubmVsU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBzdGF0dXMgZnJvb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pICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1JfQ0hBTigpICAgICAgICAgICAgIDAgOiBDaGFubmVsIEUgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgRiAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogQ2hhbm5lbCBHICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUEJZVEVfIHBiX0NoYW5uZWxTdGF0dXMgOiBEaWdpdGFsIGlucHV0IGNoYW5uZWwgc3RhdHVzLnwKK3wgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfIHBiX0NoYW5uZWxTdGF0dXMgOiBEaWdpdGFsIGlucHV0IGNoYW5uZWwgc3RhdHVzLnwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgaXMgbm90IGFjdGl2ZSAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ2hhbm5lbCBpcyBhY3RpdmUgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCkBAIC0xODU0LDE3ICsxODU0LDE3IEBACiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkQ2hyb25vUG9ydFZhbHVlICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfUG9ydFZhbHVlKSAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1BvcnRWYWx1ZSkgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIHN0YXR1cyBmcm9tIGRpZ2l0YWwgaW5wdXRzIHBvcnQgZnJvbSAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkICAoYl9Nb2R1bE5icikgY2hyb25vbWV0ZXIgbW9kdWxlLiAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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ldiwgfAogfAkJCQkJCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbix1bnNpZ25lZCBpbnQgKmRhdGEpfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlIHRoZSBkaWdpdGFsIEkvTyBvcGVyYXRpbmcgbW9kZSBmcm9tIHNlbGVjdGVkIHwKQEAgLTcwLDE0ICs3MCwxNCBAQAogfCAgICAgICAgICAgICAgICAgICAgIEkvTy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgSW5wdXQgUGFyYW1ldGVycyAgOgkJCQkJCQkJCQkJCQkgICAgIHwKLXwgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyICAgICAgZGF0YVswXTogTW9kdWxlIG51bWJlciB0byAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgZGF0YVswXTogTW9kdWxlIG51bWJlciB0byAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfQ2hhbm5lbEFNb2RlIGRhdGFbMV0gIDogQ2hhbm5lbCBBIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0NoYW5uZWxBTW9kZSBkYXRhWzFdICA6IENoYW5uZWwgQSBtb2RlIHNlbGVjdGlvbiAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IENoYW5uZWwgdXNlZCBmb3IgZGlnaXRhbCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBDaGFubmVsIHVzZWQgZm9yIGRpZ2l0YWwgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0NoYW5uZWxCTW9kZSBkYXRhWzJdIDogQ2hhbm5lbCBCIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0NoYW5uZWxCTW9kZSBkYXRhWzJdIDogQ2hhbm5lbCBCIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ2hhbm5lbCB1c2VkIGZvciBkaWdpdGFsICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgdXNlZCBmb3IgZGlnaXRhbCAgIHwKQEAgLTk5LDE5ICs5OSwxOSBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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BTZWxlY3Rpb24gZnJvbSBkaWdpdGFsICAgfAorfCAgdW5zaWduZWQgY2hhcl8gYl9JbnB1dENoYW5uZWwgQ1JfQ0hBTihjaGFuc3BlYykgICAgICAgIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCAoIDAgdG8gNikgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEMgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgRCAgICAgICAgIHwKQEAgLTI4OCwyMiArMjg4LDIyIEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLS8vX0lOVF8gICBpX0FQQ0kxNzEwX1JlYWREaWdpdGFsSU9DaGxWYWx1ZSAgICAgIChCWVRFXyAgICBiX0JvYXJkSGFuZGxlLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICBiX01vZHVsTmJyLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICBiX0lucHV0Q2hhbm5lbCwKLS8vCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgcGJfQ2hhbm5lbFN0YXR1cykKLUlOVCBpX0FQQ0kxNzEwX0luc25SZWFkRGlnaXRhbElPQ2hsVmFsdWUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsCi0Jc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLCBzdHJ1Y3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mVyICgwIHRvIDMpfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfT3V0cHV0Q2hhbm5lbCAoQ1JfQ0hBTikgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsIG91dHB1dCAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAoYXJlZiApICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKXwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX091dHB1dENoYW5uZWwgKENSX0NIQU4pIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsICgwIHRvIDIpICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDaGFubmVsIEggICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENoYW5uZWwgQSAgICAgICAgICAgICAgIHwKQEAgLTQ3OCwxNSArNDc3LDE2IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLS8vX0lOVF8gICBpX0FQQ0kxNzEwX1NldERpZ2l0YWxJT0NobE9uICAgIChCWVRFXyBiX0JvYXJkSGFuZGxlLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyLAotLy8g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w3IEBACiAJCQkJCQkJCTEgPDwKIAkJCQkJCQkJYl9PdXRwdXRDaGFubmVsOwogCQkJCQkJfQotCQkJCQl9CS8vIHNldCBjaGFubmVsIG9mZgorCQkJCQl9CS8qICBzZXQgY2hhbm5lbCBvZmYgKi8KIAkJCQkJZWxzZSB7CiAJCQkJCQlpZiAoZGV2cHJpdi0+CiAJCQkJCQkJc19Nb2R1bGVJbmZvCkBAIC02MjcsMjMgKzYyNywyNCBAQAogCQkJCQkJCQlkd19PdXRwdXRNZW1vcnkKIAkJCQkJCQkJPSBkd19Xcml0ZVZhbHVlOwogCQkJCQkJfSBlbHNlIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJLyogRGlnaXRhbCBPdXRwdXQgTWVtb3J5IE9GRiAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCQkJCS8vICtVc2UgcHJldmlvdXNseSB0aGUgZnVuY3Rpb24gImlfQVBDSTE3MTBfU2V0RGlnaXRhbElPTWVtb3J5T24iCisJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qICArVXNlIHByZXZpb3VzbHkgdGhlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX1NldERpZ2l0YWxJT01lbW9yeU9uIiAqLwogCQkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtODsKIAkJCQkJCX0KIAogCQkJCQl9Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFdyaXRlIHRoZSB2YWx1ZSAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCi0JCQkJCS8vT1VUUERXIChwc19BUENJMTcxMFZhcmlhYmxlLT4KLQkJCQ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WJfTW9kdWxOYnIgPSAodW5zaWduZWQgY2hhcikgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7CisJYl9Qb3J0T3BlcmF0aW9uID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMF07CS8qICBJbnB1dCBvciBvdXRwdXQgKi8KKwliX1BvcnRPbk9GRiA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzFdOwkvKiAgaWYgb3V0cHV0IHRoZW4gT24gb3IgT2ZmICovCisJYl9Qb3J0VmFsdWUgPSAodW5zaWduZWQgY2hhcikgZGF0YVsyXTsJLyogIGlmIG91dCBwdXQgdGhlbiBWYWx1ZSAqLwogCWlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOwotCXBiX1BvcnRWYWx1ZSA9IChQQllURSkgJiBkYXRhWzBdOwotLy8gaWYgaW5wdXQgdGhlbiByZWFkIHZhbHVlCisJcGJfUG9ydFZhbHVlID0gKHVuc2lnbmVkIGNoYXIgKikgJmRhdGFbMF07CisvKiBpZiBpbnB1dCB0aGVuIHJlYWQgdmFsdWUgKi8KIAogCXN3aXRjaCAoYl9Qb3J0T3BlcmF0aW9uKSB7CiAJY2FzZSBBUENJMTcxMF9JTlBVVDoKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBUZXN0IGlmIGRpZ2l0YWwgSS9PIGNvdW50ZXIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlpZiAoKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KIAkJCQkJZHdfTW9sZHVsZUNvbmZpZ3VyYXRpb25bYl9Nb2R1bE5icl0gJgogCQkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX0RJR0lUQUxfSU8pIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUZXN0IGlmIHRoZSBkaWdpdGFsIEkvTyBtb2R1bGUgaW5pdGlhbGlzZWQgKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWlmIChkZXZwcml2LT5zX01vZHVsZUluZm9bYl9Nb2R1bE5icl0uCiAJCQkJCXNfRGlnaXRhbElPSW5mby5iX0RpZ2l0YWxJbml0ID09IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBSZWFkIGFsbCBkaWdpdGFsIGlucHV0ICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotCQkJCQkvL0lOUERXIChwc19BUENJMTcxMFZhcmlhYmxlLT4KLQkJCQkJLy8gICAgICBzX0JvYXJkIFtiX0JvYXJkSGFuZGxlXS4KLQkJCQkJLy8gICAgICBzX0JvYXJkSW5mb3MuCi0JCQkJCS8vICAgICAgdWlfQWRkcmVzcyArICg2NCAqIGJfTW9kdWxOYnIpLAotCQkJCQkvLyAgICAgICZkd19TdGF0dXNSZWcpOworCQkJCQkvKiBJTlBEVyAocHNfQVBDSTE3MTBWYXJpYWJsZS0+CisJCQkJCSAqIHNfQm9hcmQgW2JfQm9hcmRIYW5kbGVdLgorCQkJCQkgKiBzX0JvYXJkSW5mb3MuCisJCQkJCSAqIHVpX0FkZHJlc3MgKyAoNjQgKiBiX01vZHVsTmJyKSwKKwkJCQkJICogJmR3X1N0YXR1c1JlZyk7CisJCQkJCSAqLwogCiAJCQkJCWR3X1N0YXR1c1JlZyA9CiAJCQkJCQlpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCQkJdWlfQWRkcmVzcyArICg2NCAqIGJfTW9kdWxOYnIpKTsKIAkJCQkJKnBiX1BvcnRWYWx1ZSA9Ci0JCQkJCQkoQllURSkgKGR3X1N0YXR1c1JlZyBeIDB4MUMpOworCQkJCQkJKHVuc2lnbmVkIGNoYXIpIChkd19TdGF0dXNSZWcgXiAweDFDKTsKIAogCQkJCX0gZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIERpZ2l0YWwgSS9PIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKIAkJCQl9CiAJCQl9IGVsc2UgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUaGUgbW9kdWxlIGlzIG5vdCBhIGRpZ2l0YWwgSS9PIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWlfUmV0dXJuVmFsdWUgPSAtMzsKIAkJCX0KQEAgLTg1MywxMSArODU3LDExIEBACiAJCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQogCQkJCQkJCQkJLTY7CiAJCQkJCQkJfQotCQkJCQkJfQkvLyBpZiAoKGJfUG9ydFZhbHVlICYgMikgPT0gMikKKwkJCQkJCX0JLyogIGlmICgoYl9Qb3J0VmFsdWUgJiAyKSA9PSAyKSAqLwogCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkvKiBUZXN0IGlmIGNoYW5uZWwgQiB1c2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCWlmICgoYl9Qb3J0VmFsdWUgJiA0KSA9PSA0KSB7CiAJCQkJCQkJaWYgKGRldnByaXYtPgpAQCAtODY2LDMzICs4NzAsMzMgQEAKIAkJCQkJCQkJc19EaWdpdGFsSU9JbmZvLgogCQkJCQkJCQliX0NoYW5uZWxCTW9kZQogCQkJCQkJCQkhPSAxKSB7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJLyogVGhlIGRpZ2l0YWwgY2hhbm5lbCBCIGlzIHVzZWQgZm9yIGlucHV0ICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQlpX1JldHVyblZhbHVlID0KIAkJCQkJCQkJCS03OwogCQkJCQkJCX0KLQkJCQkJCX0JLy8gaWYgKChiX1BvcnRWYWx1ZSAmIDQpID09IDQpCisJCQkJCQl9CS8qICBpZiAoKGJfUG9ydFZhbHVlICYgNCkgPT0gNCkgKi8KIAotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJLyogVGVzdCBpZiBlcnJvciBvY2N1ciAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQlpZiAoaV9SZXR1cm5WYWx1ZSA+PSAwKSB7CiAKLQkJCQkJCQkvL2lmKGRhdGFbMV0pCi0JCQkJCQkJLy97CisJCQkJCQkJLyogaWYoZGF0YVsxXSkgeyAqLworCiAJCQkJCQkJc3dpdGNoIChiX1BvcnRPbk9GRikgewotCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJLyogVGVzdCBpZiBzZXQgUG9ydCBPTiAgICAgICAgICAgICAgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCWNhc2UgQVBDSTE3MTBfT046CiAKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCS8qIFRlc3QgaWYgb3V0cHV0IG1lbW9yeSBlbmFibGVkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCWlmIChkZXZwcml2LT4KIA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OworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Jbml0Q291bnRlciAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICAgICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgICAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICAgICBiX0NvdW50ZXJSYW5nZSwgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICAgICAgIGJfRmlyc3RDb3VudGVyTW9kdXMsICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgICAgICAgYl9GaXJzdENvdW50ZXJPcHRpb24sICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICAgICBiX1NlY29uZENvdW50ZXJNb2R1cywgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICAgICAgIGJfU2Vjb25kQ291bnRlck9wdGlvbikgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgIGJfQ291bnRlclJhbmdlLCAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9GaXJzdENvdW50ZXJNb2R1cywgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX0ZpcnN0Q291bnRlck9wdGlvbiwgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgIGJfU2Vjb25kQ291bnRlck1vZHVzLCAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9TZWNvbmRDb3VudGVyT3B0aW9uKSAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBDb25maWd1cmUgdGhlIGNvdW50ZXIgb3BlcmF0aW5nIG1vZGUgZnJvbSBzZWxlY3RlZCAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhpcyBmdW5jdGlvbiBiZSB8CkBAIC0yNzMsMTcgKzI3MywxNyBAQAogfCArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5iciAgICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0NvdW50ZXJSYW5nZSAgICAgICAgOiBTZWxlY3Rpb24gZm9ybSBjb3VudGVyICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfQ291bnRlclJhbmdlICAgICAgICA6IFNlbGVjdGlvbiBmb3JtIGNvdW50ZXIgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0ZpcnN0Q291bnRlck1vZHVzICAgOiBGaXJzdCBjb3VudGVyIG9wZXJhdGluZyAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfRmlyc3RDb3VudGVyTW9kdXMgICA6IEZpcnN0IGNvdW50ZXIgb3BlcmF0aW5nICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZS4gICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0ZpcnN0Q291bnRlck9wdGlvbiAgOiBGaXJzdCBjb3VudGVyICBvcHRpb24uICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfU2Vjb25kQ291bnRlck1vZHVzICA6IFNlY29uZCBjb3VudGVyIG9wZXJhdGluZyB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9GaXJzdENvdW50ZXJPcHRpb24gIDogRmlyc3QgY291bnRlciAgb3B0aW9uLiAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1NlY29uZENvdW50ZXJNb2R1cyAgOiBTZWNvbmQgY291bnRlciBvcGVyYXRpbmcgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGUuICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9TZWNvbmRDb3VudGVyT3B0aW9uIDogU2Vjb25kIGNvdW50ZXIgIG9wdGlvbi4gIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1NlY29uZENvdW50ZXJPcHRpb24gOiBTZWNvbmQgY291bnRlciAgb3B0aW9uLiAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IE91dHB1dCBQYXJhbWV0ZXJzIDogLSAgICAgICAgICAgICAgICAgICAgICAgICA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i8KQEAgLTUwMiwxNCArNTAyLDE0IEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Db3VudGVyQXV0b1Rlc3QgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX1Rlc3RTdGF0dXMpICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfVGVzdFN0YXR1cykgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IEEgdGVzdCBtb2RlIGlzIGludGVuZGVkIGZvciB0ZXN0aW5nIHRoZSBjb21wb25lbnQgYW5kICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdGhlIGNvbm5lY3RlZCBwZXJpcGhlcnkuIEFsbCB0aGUgOC1iaXQgY291bnRlciBjaGFpbnMgIHwKQEAg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0SW5kZXggKEJZVEVfIGJfQm9hcmRIYW5kbGUsICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5iciwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1JlZmVyZW5jZUFjdGlvbiwgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW5kZXhPcGVyYXRpb24sICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9BdXRvTW9kZSwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0ludGVycnVwdEVuYWJsZSkgICB8Cit8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Jbml0SW5kZXggKHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUsICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciwgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1JlZmVyZW5jZUFjdGlvbiwgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW5kZXhPcGVyYXRpb24sICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9BdXRvTW9kZSwgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1JlZmVyZW5jZUFjdGlvbiA6IERldGVybWluZSBpZiB0aGUgcmVmZXJlbmNlICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfUmVmZXJlbmNlQWN0aW9uIDogRGV0ZXJtaW5lIGlmIHRoZSByZWZlcmVuY2UgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdXN0IHNldCBvciBubyBmb3IgdGhlICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjY2VwdGFuY2UgZnJvbSBpbmRleCAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFIDogICAgICAgICAgICB8CkBAIC02NzcsMTUgKzY3NywxNSBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRElTQUJMRSA6ICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZWZlcmVuY2UgaGF2ZSBub3QgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltcG9ydGFuY2UgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW5kZXhPcGVyYXRpb24gIDogSW5kZXggb3BlcmF0aW5nIG1vZGUuICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9JbmRleE9wZXJhdGlvbiAgOiBJbmRleCBvcGVyYXRpbmcgbW9kZS4gICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlZSB0YWJsZS4gICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfQXV0b01vZGUgICAgICAgIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9BdXRvTW9kZSAgICAgICAgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9tYXRpYyBpbmRleCByZXNldC4gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFIDogICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuYWJsZSB0aGUgYXV0b21hdGljIG1vZGUgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEUgOiAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHRoZSBhdXRvbWF0aWMgbW9kZSB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0LiAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9FTkFCTEUgOiAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuYWJsZSB0aGUgaW50ZXJydXB0ICAgICAgICAgfApAQCAtNzA4LDEyICs3MDgsMTIgQEAKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotSU5UIGlfQVBDSTE3MTBfSW5pdEluZGV4KHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCUJZVEUgYl9Nb2R1bE5iciwKLQlCWVRFIGJfUmVmZXJlbmNlQWN0aW9uLAotCUJZVEUgYl9JbmRleE9wZXJhdGlvbiwgQllURSBiX0F1dG9Nb2RlLCBCWVRFIGJfSW50ZXJydXB0RW5hYmxlKQoraW50IGlfQVBDSTE3MTBfSW5pdEluZGV4KHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLAorCXVuc2lnbmVkIGNoYXIgYl9SZWZlcmVuY2VBY3Rpb24sCisJdW5zaWduZWQgY2hhciBiX0luZGV4T3BlcmF0aW9uLCB1bnNpZ25lZCBjaGFyIGJfQXV0b01vZGUsIHVuc2lnbmVkIGNoYXIgYl9JbnRlcnJ1cHRFbmFibGUpCiB7Ci0JSU5UIGlfUmV0dXJuVmFsdWUgPSAwOworCWludCBpX1JldHVyblZhbHVlID0gMDsKIAogCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCkBAIC05M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TkRfQ0xFQVJfQ09VTlRFUiB8fCBiX0luZGV4T3BlcmF0aW9uID09IEFQQ0kxNzEwX0xPV19FREdFX0xBVENIX0FORF9DTEVBUl9DT1VOVEVSKSAqLwogCiAJCQkJCQkJaWYgKGJfQXV0b01vZGUgPT0KIAkJCQkJCQkJQVBDSTE3MTBfRElTQUJMRSkKQEAgLTExMTMsMTUgKzExMTMsMTUgQEAKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0luaXRSZWZlcmVuY2UgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyBiX0JvYXJkSGFuZGxlLCAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9SZWZlcmVuY2VMZXZlbCkgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlLCAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIsICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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jIsMjQgQEAKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIAkvKgogCSAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogCSAgIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0luaXRDb21wYXJlTG9naWMgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAotCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVJTlRfICB1aV9Db21wYXJlVmFsdWUpICAgICAgICAgICAgICAgICAgICAgfAorCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICAgfAorCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludF8gIHVpX0NvbXBhcmVWYWx1ZSkgICAgICAgICAgICAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAJICAgfCBUYXNrICAgICAgICAgICAgICA6IFNldCB0aGUgMzItQml0IGNvbXBhcmUgdmFsdWUuIEF0IHRoYXQgbW9tZW50IHRoYXQgdGhlICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgIGluY3JlbWVudGFsIGNvdW50ZXIgYXJyaXZlIHRvIHRoZSBjb21wYXJlIHZhbHVlICAgICAgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICh1aV9Db21wYXJlVmFsdWUpIGEgaW50ZXJydXB0IGlzIGdlbmVyYXRlZC4gICAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8CisJICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8CisJICAgfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgICAgIFVJTlRfIHVpX0NvbXBhcmVWYWx1ZSAgIDogMzItQml0IGNvbXBhcmUgdm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VGKGluc24tPmNoYW5zcGVjKSk7CiAJCWJyZWFrOwogCiAJZGVmYXVsdDoKQEAgLTIwNjUsMjAgKzIwNjUsMjAgQEAKIAogCWlmIChpX1JldHVyblZhbHVlID49IDApCiAJCWlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOwotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0NsZWFyQ291bnRlclZhbHVlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICBiX01vZHVsTmJyKSAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgICAgYl9Nb2R1bE5icikgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBDbGVhciB0aGUgY291bnRlciB2YWx1ZSBmcm9tIHNlbGVjdGVkIG1vZHVsZSAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgIC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S0gQVBDSTE3MTBfMzBNSFogOiAgICAgICAgICAgfAogfAkJCQkJCSAgVGhlIFBDIGhhcyBhIFBDSSBidXMgY2xvY2sgfApAQCAtMjIyNiw3ICsyMjI2LDcgQEAKIHwJCQkJCQktIEFQQ0kxNzEwXzQwTUhaIDogICAgICAgICAgIHwKIHwJCQkJCQkgIFRoZSBBUENJMTcxMCBoYXMgYSA0ME1IeiAgICB8CiB8CQkJCQkJICBxdWFydHoJCSAgICAgfAotfAkJICAgICAgQllURV8gIGJfRmlsdGVyCSAgICAgIDogRmlsdGVyIHNlbGVjdGlvbiAgICAgICAgICAgICB8Cit8CQkgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9GaWx0ZXIJICAgICAgOiBGaWx0ZXIgc2VsZWN0aW9uICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkzMCBNSHogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJCS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKQEAgLTIyOTcsMTEgKzIyOTcsMTEgQEAKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotSU5UIGlfQVBDSTE3MTBfU2V0SW5wdXRGaWx0ZXIoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsCi0JQllURSBiX01vZHVsTmJyLCBCWVRFIGJfUENJSW5wdXRDbG9jaywgQllURSBiX0ZpbHRlcikKK2ludCBpX0FQQ0kxNzEwX1NldElucHV0RmlsdGVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJdW5zaWduZWQgY2hhciBiX01vZHVsTmJyLCB1bnNpZ25lZCBjaGFyIG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XR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfTGF0Y2hDb3VudGVyIChCWVRFXyBiX0JvYXJkSGFuZGxlLCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIsICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9MYXRjaFJlZykgICAgICAgfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfTGF0Y2hDb3VudGVyICh1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlLCAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIsICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9MYXRjaFJlZykgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogTGF0Y2ggdGhlIGNvdXJhbnQgdmFsdWUgZnJvbSBzZWxlY3RlZCBtb2R1bGUgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikgaW4gdG8gdGhlIHNlbGVjdGVkIGxhdGNoIHJlZ2lzdGVyICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIChiX0xhdGNoUmVnKS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9MYXRjaFJlZyAgICA6IFNlbGVjdGVkIGxhdGNoIHJlZ2lzdGVyICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0xhdGNoUmVnICAgIDogU2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogZm9yIHRoZSBmaXJzdCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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ICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IEVuYWJsZSB0aGUgbGF0Y2ggaW50ZXJydXB0IGZyb20gc2VsZWN0ZWQgbW9kdWxlICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgKGJfTW9kdWxOYnIpLiBFYWNoIHNvZnR3YXJlIG9yIGhhcmR3YXJlIGxhdGNoIG9jY3VyIGEgIHwKIHwgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gYl9Cb2FyZEhhbmRsZSA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICAgICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgICB8Cit8ICAgICAgICAgICA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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9EaXNhYmxlTGF0Y2hJbnRlcnJ1cHQgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5icikgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogRGlzYWJsZSB0aGUgbGF0Y2ggaW50ZXJydXB0IGZyb20gc2VsZWN0ZWQgbW9kdWxlICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gYl9Cb2FyZEhhbmRsZSA6IEhhbmRsZSBvZ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mV0dXJuVmFsdWUgPSAwOwogCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KQEAgLTMxOTgsMjcgKzMxOTgsMjcgQEAKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1dyaXRlMTZCaXRDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICBiX0JvYXJkSGFuZGxlICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfTW9kdWxOYnIsICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9TZWxlY3RlZENvdW50ZXIsICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVJTlRfIHVpX1dyaXRlVmFsdWUpICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gIGJfQm9hcmRIYW5kbGUgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9Nb2R1bE5iciwgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX1NlbGVjdGVkQ291bnRlciwgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50XyB1aV9Xcml0ZVZhbHVlKSAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogV3JpdGUgYSAxNi1CaXQgdmFsdWUgKHVpX1dyaXRlVmFsdWUpIGluIHRvIHRoZSBzZWxlY3RlZHwKIHwgICAgICAgICAgICAgICAgICAgICAxNi1CaXQgY291bnRlciAoYl9TZWxlY3RlZENvdW50ZXIpIGZyb20gc2VsZWN0ZWQgbW9kdWxlfAogfCAgICAgICAgICAgICAgICAgICAgIChiX01vZHVsTmJyKS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9TZWxlY3RlZENvdW50ZXIgOiBTZWxlY3RlZCAxNi1CaXQgY291bnRlciAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1NlbGVjdGVkQ291bnRlciA6IFNlbGVjdGVkIDE2LUJpdCBjb3VudGVyICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgb3IgMSkgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUlOVF8gdWlfV3JpdGVWYWx1ZSAgICAgOiAxNi1CaXQgd3JpdGUgdmFsdWUgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnRfIHVpX1dyaXRlVmFsdWUgICAgIDogMTYtQml0IHdyaXRlIHZhbHVlICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCkBAIC0zMjMxLDEwICszMjMxLDEwIEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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ybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Xcml0ZTMyQml0Q291bnRlclZhbHVlICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciwgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9Xcml0ZVZhbHVlKSAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBXcml0ZSBhIDMyLUJpdCB2YWx1ZSAodWlfV3JpdGVWYWx1ZSkgaW4gdG8gdGhlIHNlbGVjdGVkfAogfCAgICAgICAgICAgICAgICAgICAgIG1vZHVsZSAoYl9Nb2R1bE5icikuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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SwgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyKSAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IERpc2FibGUgdGhlIElOREVYIGFjdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXR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2R1bE5icikgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IEVuYWJsZSB0aGUgMzItQml0IGNvbXBhcmUgbG9naWMuIEF0IHRoYXQgbW9tZW50IHRoYXQgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdGhlIGluY3JlbWVudGFsIGNvdW50ZXIgYXJyaXZlIHRvIHRoZSBjb21wYXJlIHZhbHVlIGEgIHwKIHwgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQgaXMgZ2VuZXJhdGVkLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0kt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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfRGlzYWJsZUNvbXBhcmVMb2dpYyAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5icikgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IERpc2FibGUgdGhlIDMyLUJpdCBjb21wYXJlIGxvZ2ljLgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA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ybiBpX1JldHVyblZhbHVlOwogfQogCiAJLyoKIAkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIAkgICB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9FbmFibGVGcmVxdWVuY3lNZWFzdXJlbWVudCAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSW50ZXJydXB0RW5hYmxlKSAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfSW50ZXJydXB0RW5hYmxlKSAgICAgICAgICAgICAgICAgIHwKIAkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIAkgICB8IFRhc2sgICAgICAgICAgICAgIDogRW5hYmxlcyB0aGUgZnJlcXVlbmN5IG1lYXN1cmVtZW50IGZ1bmN0aW9uICAgICAgICAgICAgIHwKIAkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLQkgICB8IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgQllURV8gIGJfTW9kdWxOYnIgICAgICAgOiBOdW1iZXIgb2YgdGhlIG1vZHVsZSB0byBiZSAgIHwKKwkgICB8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfTW9kdWxOYnIgICAgICAgOiBOdW1iZXIgb2YgdGhlIG1vZHVsZSB0byBiZSAgIHwKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmVkICgwIHRvIDMpICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgQllURV8gIGJfSW50ZXJydXB0RW5hYmxlOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfSW50ZXJydXB0RW5hYmxlOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQuICAgICAgICAgICAgICAgICAgIHwKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTcxMF9FTkFCTEU6ICAgICAgICAgICAgIHwKI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c3VyZW1lbnQgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgIGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgICAgICAgIHwKIAkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIAkgICB8IFRhc2sgICAgICAgICAgICAgIDogRGlzYWJsZXMgdGhlIGZyZXF1ZW5jeSBtZWFzdXJlbWVudCBmdW5jdGlvbiAgICAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8Ci0JICAgfCAgICAgICAgICAgICAgICAgIEJZVEVfICBiX01vZHVsTmJyICAgICAgIDogTnVtYmVyIG9mIHRoZSBtb2R1bGUgdG8gYmUgICB8CisJICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlICAgIDogSGFuZG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SBDUl9BUkVGKGluc24tPmNoYW5zcGVjKSwKKwkJCSh1bnNpZ25lZCBjaGFyICopICZkYXRhWzBdLAorCQkJKHVuc2lnbmVkIGNoYXIgKikgJmRhdGFbMV0sICh1bnNpZ25lZCBpbnQgKikgJmRhdGFbMl0pOwogCQlicmVhazsKIAogCWNhc2UgQVBDSTE3MTBfSU5DQ1BUX1JFQURJTlRFUlJVUFQ6CkBAIC00MTU1LDI5ICs0MTU1LDI5IEBACiAKIAlpZiAoaV9SZXR1cm5WYWx1ZSA+PSAwKQogCQlpX1JldHVyblZhbHVlID0gaW5zbi0+bjsKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogCiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1JlYWRMYXRjaFJlZ2lzdGVyU3RhdHVzICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciwgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX0xhdGNoUmVnLCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfTGF0Y2hTdGF0dXMpICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgY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yZCBBUENJLTE3MTAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9MYXRjaFJlZyAgICA6IFNlbGVjdGVkIGxhdGNoIHJlZ2lzdGVyICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX0xhdGNoUmVnICAgIDogU2VsZWN0ZWQgbGF0Y2ggcmVnaXN0ZXIgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogZm9yIHRoZSBmaXJzdCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBmb3IgdGhlIHNlY29uZCBsYXRjaCByZWdpc3RlciAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBCWVRFXyBwYl9MYXRjaFN0YXR1cyA6ICAgTGF0Y2ggcmVnaXN0ZXIgc3RhdHVzLiAgICAgICB8Cit8IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9MYXRjaFN0YXR1cyA6ICAgTGF0Y2ggcmVnaXN0ZXIgc3RhdHVzLiAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogTm8gbGF0Y2ggb2NjdXIgICAgICAgICAgIHwKIHwgICAgICAgICAg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aFJlZyAqCisJCQkJCSh1bnNpZ25lZCBjaGFyKSAoKGR3X0xhdGNoUmVnID4+IChiX0xhdGNoUmVnICoKIAkJCQkJCQk0KSkgJiAweDMpOwogCQkJfSBlbHNlIHsKIAkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTQyNDgsMjQgKzQyNDgsMjQgQEAKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX1JlYWRMYXRjaFJlZ2lzdGVyVmFsdWUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSx8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTGF0Y2hSZWcsICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSx8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAg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mFsdWUpCiB7Ci0JSU5UIGlfUmV0dXJuVmFsdWUgPSAwOworCWludCBpX1JldHVyblZhbHVlID0gMDsKIAogCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCkBAIC00MzMyLDI4ICs0MzMyLDI4IEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkMTZCaXRDb3VudGVyVmFsdWUgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1NlbGVjdGVkQ291bnRlciwgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVJTlRfICAgcHVpX0NvdW50ZXJWYWx1ZSkgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJy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UENJLTE3MTAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1NlbGVjdGVkQ291bnRlciA6IFNlbGVjdGVkIDE2LUJpdCBjb3VudGVyICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfU2VsZWN0ZWRDb3VudGVyIDogU2VsZWN0ZWQgMTYtQml0IGNvdW50ZXIgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCBvciAxKSAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBVSU5UXyBwdWlfQ291bnRlclZhbHVlIDogMTYtQml0IGNvdW50ZXIgdmFsdWUgICAgICAgICB8Cit8IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgaW50ICpfIHB1aV9Db3VudGVyVmFsdWUgOiAxNi1CaXQgY291bnRlciB2YWx1ZSAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBSZXR1cm4gVmFsdWUgICAgICA6ICAwOiBObyBlcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgLT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E2ICoKIAkJCQkJCQliX1NlbGVjdGVkQ291bnRlcikpICYKIAkJCQkJMHhGRkZGVSk7CiAJCQl9IGVsc2UgewpAQCAtNDQzMSwyMiArNDQzMSwyMiBAQAogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfUmVhZDMyQml0Q291bnRlclZhbHVlICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfQ291bnRlclZhbHVlKSAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogTGF0Y2ggdGhlIDMyLUJpdCBjb3VudGVyIGZyb20gc2VsZWN0ZWQgbW9kdWxlICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAoYl9Nb2R1bE5icikgaW4gdG8gdGhlIGZpcnN0IGxhdGNoIHJlZ2lzdGVyIGFuZCByZXR1cm4gfAogfCAgICAgICAgICAgICAgICAgICAgIHRoZSBsYXRjaGVkIHZhbHVlLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQVUxPTkdfICBwdWxfQ291bnRlclZhbHVlIDogMzItQml0IG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iX01vZHVsTmJyLCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfSW5kZXhTdGF0dXMpfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0SW5kZXhTdGF0dXMgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSx8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0luZGV4U3RhdHVzKXwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgaW5kZXggc3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0dldFJlZmVyZW5jZVN0YXR1cyAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgIGJfQm9hcmRIYW5kbGUsICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgYl9Nb2R1bE5iciwgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfIHBiX1JlZmVyZW5jZVN0YXR1cykgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUsICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciwgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9SZWZlcmVuY2VTdGF0dXMpIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IFJldHVybiB0aGUgcmVmZXJlbmNlIHN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFJlZmVyZW5jZSBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICJpX0FQQ0kxNzEwX0luaXRSZWZlcmVuY2UiICovCkBAIC00Njc2LDIzICs0Njc2LDIzIEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRVQVNTdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfVUFTU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1VBU1N0YXR1c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SBudW1iZXIgKi8KQEAgLTQ3MjQsNyArNDcyNCw3IEBACiAJCQlkd19TdGF0dXNSZWcgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCXVpX0FkZHJlc3MgKyAyNCArICg2NCAqIGJfTW9kdWxOYnIpKTsKIAotCQkJKnBiX1VBU1N0YXR1cyA9IChCWVRFKSAoKGR3X1N0YXR1c1JlZyA+PiAxKSAmIDEpOworCQkJKnBiX1VBU1N0YXR1cyA9ICh1bnNpZ25lZCBjaGFyKSAoKGR3X1N0YXR1c1JlZyA+PiAxKSAmIDEpOwogCQl9IGVsc2UgewogCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogQ291bnRlciBub3QgaW5pdGlhbGlzZWQgc2VlIGZ1bmN0aW9uICovCkBAIC00NzQ0LDIzICs0NzQ0LDIzIEBACiAKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRDQlN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfQ0JTdGF0dXMpICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0NCU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGNvdW50ZXIgb3ZlcmZsb3cgc3RhdHVzICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgIHwKIHwgICAgICAgICAgIC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iciA8IDQpCisJCX0JCS8qICBpZiAocHNfQVBDSTE3MTBWYXJpYWJsZS0+c19Cb2FyZCBbYl9Cb2FyZEhhbmRsZV0uc19Nb2R1bGVJbmZvIFtiX01vZHVsTmJyXS5zX1NpZW1lbnNDb3VudGVySW5mby5zX0luaXRGbGFnLmJfQ291bnRlckluaXQgPT0gMSkgKi8KKwl9CQkJLyogIGlmIChiX01vZHVsTmJyIDwgNCkgKi8KIAllbHNlIHsKIAkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nICovCkBAIC00OTM1LDI1ICs0OTM1LDI1IEBACiAKIAkJRFBSSU5USygiVGhlIHNlbGVjdGVkIG1vZHVsZSBudW1iZXIgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwotCX0JCQkvLyBpZiAoYl9Nb2R1bE5iciA8IDQpCisJfQkJCS8qICBpZiAoYl9Nb2R1bE5iciA8IDQpICovCiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRVRFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfVURTdGF0dXMpICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1VEU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGNvdW50ZXIgcHJvZ3Jlc3Mgc3RhdHVzICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvIGNvbmZpZ3VyZSAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHRvIDMpICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUEJZVEVfIHBiX1VEU3RhdHVzICAgICAgOiAwIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKK3wgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfIHBiX1VEU3RhdHVzICAgICAgOiAwIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCBtb2RlIGRvd24gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IENvdW50ZXIgcHJvZ3Jlc3MgaW4gdGhlICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgbW9kZSB1cCAgICAgICAgIHwKQEAgLTQ5NjYsMTEgKzQ5NjYsMTEgQEAKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotSU5UIGlfQVBDSTE3MTBfR2V0VURTdGF0dXMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsCi0JQllURSBiX01vZHVsTmJyLCBQQllURSBwYl9VRFN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xMF9HZXRJbnRlcnJ1cHRVRExhdGNoZWRTdGF0dXMgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gcGJfVURTdGF0dXMpICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1VEU3RhdHVzKSAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBSZXR1cm4gdGhlIGNvdW50ZXIgcHJvZ3Jlc3MgbGF0Y2hlZCBzdGF0dXMgYWZ0ZXIgYSAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIGluZGV4IGludGVycnVwdCBvY2N1ci4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQQllURV8gcGJfVURTdGF0dXMgICAgICA6IDAgOiBDb3VudGVyIHByb2dyZXNzIGluIHRoZSAgfAorfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfVURTdGF0dXMgICAgICA6IDAgOiBDb3VudGVyIHByb2dyZXNzIGluIHRoZSAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIG1vZGUgZG93biAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogQ291bnRlciBwcm9ncmVzcyBpbiB0aGUgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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qKioqKioqKioqKiovCiAJCQkJLyogTm8gaW5kZXggaW50ZXJydXB0IG9jY3VyICovCkBAIC01MTAwLDI2ICs1MTAwLDI2IEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAJLyoKIAkgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIAkgICB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkRnJlcXVlbmN5TWVhc3VyZW1lbnQgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgICAgICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICAgICAgICAgcGJfU3RhdHVzLCAgICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgICAgICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgIHwKKwkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgICAgICAgIHBiX1N0YXR1cywgICAgICAgICAgICAgICAgICB8CiAJICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlZCAoMCB0byAzKSAgICAgICAgICB8CiAJICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0JICAgfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBCWVRFXyBwYl9TdGF0dXMgICAgIDogUmV0dXJucyB0aGUgZnJlcXVlbmN5ICAgICAgICB8CisJICAgfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gcGJfU3RhdHVzICAgICA6IFJldHVybnMgdGhlIGZyZXF1ZW5jeSAgICAgICAgfAogCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmVtZW50IHN0YXR1cyAgICAgICAgICAgfAogCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBDb3VudGluZyBjeWNsZSBub3QgICAgICAgfAogCSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydGVkLiAgICAgICAgICAgICAgICAgfApAQCAtNTEyNyw3ICs1MTI3LDcgQEAKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogQ291bnRpbmcgY3ljbGUgc3RvcHBlZC4gIHwKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIG1lYXN1cmVtZW50IGN5Y2xlIGlzIHwKIAkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkLiAgICAgICAgICAgICAgIHwKLQkgICB8ICAgICAgICAgICAgICAgICAgUEJZVEVfIHBiX1VEU3RhdHVzICAgICAgOiAwIDogQ291bnRlciBwcm9ncm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IFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uCiAKQEAgLTYwLDExICs2MCwxMSBAQAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfSW5pdFB1bHNlRW5jb2RlciAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgICAgICAgYl9QdWxzZUVuY29kZXJOYnIsICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICAgICBiX0lucHV0TGV2ZWxTZWxlY3Rpb24sICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICAgICAgIGJfVHJpZ2dlck91dHB1dEFjdGlvbiwgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgICAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgIC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llURV8gYl9Nb2R1bE5iciAgICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1B1bHNlRW5jb2Rlck5iciAgICAgOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfUHVsc2VFbmNvZGVyTmJyICAgICA6IFB1bHNlIGVuY29kZXIgc2VsZWN0aW9uICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0lucHV0TGV2ZWxTZWxlY3Rpb24gOiBJbnB1dCBsZXZlbCBzZWxlY3Rpb24gICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW5wdXRMZXZlbFNlbGVjdGlvbiA6IElucHV0IGxldmVsIHNlbGVjdGlvbiAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgb3IgMSkgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFNldCBwdWxzZSBlbmNvZGVyfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnQgdGhlIHRoZSBsb3d8CkBAIC04Nyw3ICs4Nyw3IEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBTZXQgcHVsc2UgZW5jb2RlcnwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50IHRoZSB0aGUgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlnaCBsZXZlbCBwdWxzZS58Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9UcmlnZ2VyT3V0cHV0QWN0aW9uIDogRGlnaXRhbCBUUklHR0VSIG91dHB1dCAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1RyaWdnZXJPdXRwdXRBY3Rpb24gOiBEaWdpdGFsIFRSSUdHRVIgb3V0cHV0ICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBObyBhY3Rpb24gICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFNldCB0aGUgdHJpZ2dlciAgfApAQCAtMTA0LDExICsxMDQsMTEgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIFVMT05HXyB1bF9TdGFydFZhbHVlICAgICAgICA6IFB1bHN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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX1B1bHNlRW5jb2Rlck5iciwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfQ3ljbGVTZWxlY3Rpb24sICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9JbnRlcnJ1cHRIYW5kbGluZykgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9QdWxzZUVuY29kZXJOYnIsICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX0N5Y2xlU2VsZWN0aW9uLCAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfSW50ZXJydXB0SGFuZGxpbmcpICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogRW5hYmxlb3IgZGlzYWJsZSAgdGhlIHNlbGVjdGVkIHB1bHNlIGVuY29kZXIgKGJfUHVsc2VFbmNvZGVyTmJyKSAgfAogfCAgICAgICAgICAgICAgICAgICAgIGZyb20gc2VsZWN0ZWQgbW9kdWxlIChiX01vZHVsTmJyKS4gRWFjaCBpbnB1dCBwdWxzZSAgICB8CkBAIC0zNjUsMTIgKzM2NSwxMiBAQAogfCAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCBpcyBnZW5lcmF0ZWQgd2hlbiB0aGUgcHVsc2UgZW5jb2RlciBoYXMgcnVuICB8CiB8ICAgICAgICAgICAgICAgICAgICAgZG93bi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfICAgYl9Cb2FyZEhhbmRsZSAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICBiX01vZHVsTmJyICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyAgIGJfQm9hcmRIYW5kbGUgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9Nb2R1bE5iciAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfUHVsc2VFbmNvZGVyTmJyICAgOiBQdWxzZSBlbmNvZGVyIHNlbGVjdGlvbiAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9QdWxzZUVuY29kZXJOYnIgICA6IFB1bHNlIGVuY29kZXIgc2VsZWN0aW9uICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfQ3ljbGVTZWxlY3Rpb24gICAgOiBBUENJMTcxMF9DT05USU5VT1VTOiAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9DeWNsZVNlbGVjdGlvbiAgICA6IEFQQ0kxNzEwX0NPTlRJTlVPVVM6ICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVhY2ggdGltZSB0aGUgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRpbmcgdmFsdWUgaXMgc2V0fAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiAiMCIsIHRoZSBwdWxzZSAgICB8CkBAIC0zODEsNyArMzgxLDcgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgdGhlIGNvdW50ZXIgaXMgc2V0fAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiAiMCIsIHRoZSBwdWxzZSAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIgaXMgc3RvcHBlZC4gIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgIGJfSW50ZXJydXB0SGFuZGxpbmcgOiBJbnRlcnJ1cHRzIGNhbiBiZSAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgYl9JbnRlcnJ1cHRIYW5kbGluZyA6IEludGVycnVwdHMgY2FuIGJlICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhdGVkLCB3aGVuIHRoZSBwdWxzZXwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVyIGhhcyBydW4gZG93bi4gICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdpdGggdGhpcyBwYXJhbWV0ZXIgdGhlICB8CkBAIC0zOTMsMTEgKzM5MywxMSBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRElTQUJMRTogICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbnRlcnJ1cHRzIGFyZSBkaXNhYmxlZAogCi0gIAliX01vZHVsTmJyCQkJPShCWVRFKSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX0FjdGlvbgkJCT0oQllURSkgZGF0YVswXTsKLQliX1B1bHNlRW5jb2Rlck5icgk9KEJZVEUpIGRhdGFbMV07Ci0JYl9DeWNsZVNlbGVjdGlvbgk9KEJZVEUpIGRhdGFbMl07Ci0JYl9JbnRlcnJ1cHRIYW5kbGluZwk9KEJZVEUpIGRhdGFbM107fAorCWJfTW9kdWxOYnIJCQk9KHVuc2lnbmVkIGNoYXIpIENSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOworCWJfQWN0aW9uCQkJPSh1bnNpZ25lZCBjaGFyKSBkYXRhWzBdOworCWJfUHVsc2VFbmNvZGVyTmJyCT0odW5zaWduZWQgY2hhcikgZGF0YVsxXTsKKwliX0N5Y2xlU2VsZWN0aW9uCT0odW5zaWduZWQgY2hhcikgZGF0YVsyXTsKKwliX0ludGVycnVw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AgICAgIEJZVEVfICBiX1B1bHNlRW5jb2Rlck5iciwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfIHBiX1N0YXR1cykgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfUHVsc2VFbmNvZGVyTmJyLCAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX1N0YXR1cykgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgQVBDSTE3MTBfUFVMU0VFTkNPREVSX1JFQUQgICAgICAgICAgOiBSZWFkcyB0aGUgcHVsc2UgZW5jb2RlciBzdGF0dXMKIAkJCQkJCQkJCQkJYW5kIHZhbHVlZnJvbSBzZWxlY3RlZCBwdWxzZSAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIGVuY29kZXIgKGJfUHVsc2VFbmNvZGVyTmJyKSBmcm9tIHNlbGVjdGVkIG1vZHVsZSAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgKGJfTW9kdWxOYnIpLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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AgY29uZmlndXJlICgwIHRvIDMpICAgICAgIHwKLXwgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgQllURV8gICBiX1B1bHNlRW5jb2Rlck5iciAgIDogUHVsc2UgZW5jb2RlciBzZWxlY3Rpb24gIHwKK3wgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgdW5zaWduZWQgY2hhcl8gICBiX1B1bHNlRW5jb2Rlck5iciAgIDogUHVsc2UgZW5jb2RlciBzZWxlY3Rpb24gIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKQogICAgQVBDSTE3MTBfUFVMU0VFTkNPREVSX1dSSVRFCiAJCQkJZGF0YVsyXQkJVUxPTkdfIHVsX1dyaXRlVmFsdWUgICAgICAgIDogMzItYml0IHZhbHVlIHRvIGJlICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0dGVuICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBCWVRFXyBwYl9TdGF0dXMgICAgICAgICAgICA6IFB1bHNlIGVuY29kZXIgc3RhdHVzLiAgICB8Cit8IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyBwYl9TdGF0dXMgICAgICAgICAgICA6IFB1bHNlIGVuY29kZXIgc3RhdHVzLiAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBObyBvdmVyZmxvdyBvY2N1cnwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IE92ZXJmbG93IG9jY3VyCiAJCQkJCQlQVUxP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blZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Jbml0UFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1BXTSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfQ2xvY2tTZWxlY3Rpb24sICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9UaW1pbmdVbml0LCAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9QV00sICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX0Nsb2NrU2VsZWN0aW9uLCAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9Mb3dUaW1pbmcsICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgIHVsX0hpZ2hUaW1pbmcsICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfUmVhbExvd1RpbWluZywgICAgICAgICAgfApAQCAtMTM1LDExICsxMzUsMTEgQEAKIHwgICAgICAgICAgICAgICAgICAgICBZb3UgbXVzdCBjYWxsaW5nIHRoaXMgZnVuY3Rpb24gYmUgZm9yIHlvdSBjYWxsIGFueSAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIG90aGVyIGZ1bmN0aW9uIHdpdGNoIGFjY2VzcyBvZiB0aGUgUFdNLiAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmV8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfUFdNICAgICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9DbG9ja1NlbGVjdGlvbiA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BXTSAgICAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpLiAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfQ2xvY2tTZWxlY3Rpb24gOiBTZWxlY3Rpb24gZnJvbSBQQ0kgYnVzICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb2NrICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfMzBNSFogOiAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgUEMgaGF2ZSBhIDMwIE1IeiAgIHwKQEAgLTE1MSw3ICsxNTEsNyBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIEFQQ0ktMTcxMCBoYXZlIGEgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ3JhdGVkIDQwTWh6ICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YXJ0ei4gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1RpbWluZ1VuaXQgICAgIDogQmFzZSB0aW1pbmcgVW5pdCAoMCB0byA0KSB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogw6ZzICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICB8CkBAIC0xNzksMTkgKzE3OSwxOSBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwogCi1JTlQgaV9BUENJMTcxMF9Jbml0UFdNKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCUJZVEUgYl9Nb2R1bE5iciwKLQlCWVRFIGJfUFdNLAotCUJZVEUgYl9DbG9ja1NlbGVjdGlvbiwKLQlCWVRFIGJfVGltaW5nVW5pdCwKLQlVTE9ORyB1bF9Mb3dUaW1pbmcsCi0JVUxPTkcgdWxfSGlnaFRpbWluZywKLQlQVUxPTkcgcHVsX1JlYWxMb3dUaW1pbmcsIFBVTE9ORyBwdWxfUmVhbEhpZ2hUaW1pbmcpCitpbnQgaV9BUENJ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W9kdWxOYnJdICYKIAkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1BXTSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRlc3QgdGhlIFBXTSBzZWxlY3Rpb24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChiX1BXTSA8PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCB0aGUgY2xvY2sgKi8KLQkJIC8qKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKi8KIAogCQkJCWlmICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgfHwKIAkJCQkJKGJfQ2xvY2tTZWxlY3Rpb24gPT0gQVBDSTE3MTBfMzNNSFopIHx8CiAJCQkJCShiX0Nsb2NrU2VsZWN0aW9uID09IEFQQ0kxNzEwXzQwTUhaKSkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogVGVzdCB0aGUgdGltaW5nIHVuaXQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJaWYgKGJfVGltaW5nVW5pdCA8PSA0KSB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIFRlc3QgdGhlIGxvdyB0aW1pbmcgc2VsZWN0aW9uICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJaWYgKCgoYl9DbG9ja1NlbGVjdGlvbiA9PQogCQkJCQkJCQkJQVBDSTE3MTBfMzBNSFopCkBAIC0zNjEsNDUgKzM2MSw0NSBAQAogCQkJCQkJCQkmJiAodWxfTG93VGltaW5nCiAJCQkJCQkJCQk8PQogCQkJCQkJCQkJN1VMKSkpIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJLyogVGVzdCB0aGUgSGlnaCB0aW1pbmcgc2VsZWN0aW9uICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJaWYgKCgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAwKSAmJiAodWxfSGlnaFRpbWluZyA+PSAyNjYpICYmICh1bF9IaWdoVGltaW5nIDw9IDB4RkZGRkZGRkZVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAxKSAmJiAodWxfSGlnaFRpbWluZyA+PSAxKSAmJiAodWxfSGlnaFRpbWluZyA8PSA1NzEyMzA2NTBVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAyKSAmJiAodWxfSGlnaFRpbWluZyA+PSAxKSAmJiAodWxfSGlnaFRpbWluZyA8PSA1NzEyMzBVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgK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gPT0gQVBDSTE3MTBfNDBNSFopICYmIChkZXZwcml2LT5zX0JvYXJkSW5mb3MuYl9Cb2FyZFZlcnNpb24gPiAwKSkgfHwgKGJfQ2xvY2tTZWxlY3Rpb24gIT0gQVBDSTE3MTBfNDBNSFopKSB7CiAKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIENhbGN1bGF0ZSB0aGUgbG93IGRpdmlzaW9uIGZhdG9yICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCWZwdV9iZWdpbgogCQkJCQkJCQkJCSgpOwogCiAJCQkJCQkJCQlzd2l0Y2ggKGJfVGltaW5nVW5pdCkgewotCQkJCSAgIC8qKioqKiovCisJCQkJCQkJCQkJLyoqKioqKi8KIAkJCQkJCQkJCQkvKiBucyAqLwotCQkJCSAgIC8qKioqKiovCisJCQkJCQkJCQkJLyoqKioqKi8KIAogCQkJCQkJCQkJY2FzZSAwOgogCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQkvKiBUaW1lciAwIGZhY3RvciAqLwotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCQl1bF9Mb3dUaW1lclZhbHVlCiAJCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkJKFVMT05HKQorCQkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCQkodWxfTG93VGltaW5nCiAJCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkJKDAuMDAwMjUgKiBiX0Nsb2NrU2VsZWN0aW9uKSk7CiAKLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJaWYgKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltaW5nICogKDAuMDAwMjUgKiAoZG91YmxlKWJfQ2xvY2tTZWxlY3Rpb24pKSA+PSAoKGRvdWJsZSkoKGRvdWJsZSl1bF9Mb3dUaW1lclZhbHVlICsgMC41KSkpIHsKIAkJCQkJCQkJCQkJdWxfTG93VGltZXJWYWx1ZQpAQCAtNDA5LDEzICs0MDksMTMgQEAKIAkJCQkJCQkJCQkJCTE7CiAJCQkJCQkJCQkJfQogCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogQ2FsY3VsYXRlIHRoZSByZWFsIHRpbWluZyAqLwotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJKnB1bF9SZWFsTG93VGltaW5nCiAJCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkJKFVMT05HKQorCQkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCQkodWxfTG93VGltZXJWYWx1ZQogCQkJCQkJCQkJCQkvCiAJCQkJCQkJCQkJCSgwLjAwMDI1ICogKGRvdWJsZSliX0Nsb2NrU2VsZWN0aW9uKSk7CkBAIC00NTEsNyArNDUxLDcgQEAKIAkJCQkJCQkJCQlpZiAoYl9DbG9ja1NlbGVjdGlvb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b3dUaW1lclZhbHVlKQpAQCAtNTQ0LDE1ICs1NDQsMTUgQEAKIAogCQkJCQkJCQkJCWJyZWFrOwogCi0JCQkJICAgLyoqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqLwogCQkJCQkJCQkJCS8qIG1zICovCi0JCQkJICAgLyoqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqLwogCiAJCQkJCQkJCQljYXNlIDI6CiAKLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCS8qIFRpbWVyIDAgZmFjdG9yICovCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKIAkJCQkJCQkJCQkJPQpAQCAtNTYyLDkgKzU2Miw5IEBACiAJCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkJYl9DbG9ja1NlbGVjdGlvbik7CiAKLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJaWYgKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltaW5nICogKDI1MC4wICogKGRvdWJsZSliX0Nsb2NrU2VsZWN0aW9uKSkgPj0gKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltZXJWYWx1ZSArIDAuNSkpKSB7CiAJCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKQEAgLTU3NCwxMyArNTc0LDEzIEBACiAJCQkJCQkJCQkJCQkxOwogCQkJCQkJCQkJCX0KIAotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqK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CQkJCQkvKiBUaW1lciAwIGZhY3RvciAqLwotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCQl1bF9Mb3dUaW1lclZhbHVlCiAJCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkJKFVMT05HKQorCQkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCQkodWxfTG93VGltaW5nCiAJCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkJKDI1MDAwMC4wCiAJCQkJCQkJCQkJCQkqCiAJCQkJCQkJCQkJCQliX0Nsb2NrU2VsZWN0aW9uKSk7CiAKLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJaWYgKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltaW5nICogKDI1MDAwMC4wICogKGRvdWJsZSliX0Nsb2NrU2VsZWN0aW9uKSkgPj0gKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltZXJWYWx1ZSArIDAuNSkpKSB7CiAJCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKQEAgLTY1NiwxMyArNjU2LDEzIEBACiAJCQkJCQkJCQkJCQkxOwogCQkJCQkJCQkJCX0KIAotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCS8qIENhbGN1bGF0ZSB0aGUgcmVhbCB0aW1pbmcgKi8KLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKio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TG93VGltZXJWYWx1ZQogCQkJCQkJCQkJCQkvCiAJCQkJCQkJCQkJCSgyNTAwMDAuMApAQCAtNzk1LDcgKzc5NSw3IEBACiAJCQkJCQkJCQkJaWYgKGJfQ2xvY2tTZWxlY3Rpb24gIT0gQVBDSTE3MTBfNDBNSFopIHsKIAkJCQkJCQkJCQkJdWxfTG93VGltZXJWYWx1ZQogCQkJCQkJCQkJCQkJPQotCQkJCQkJCQkJCQkJKFVMT05HKQorCQkJCQkJCQkJCQkJKHVuc2lnbmVkIGludCkKIAkJCQkJCQkJCQkJCSgKIAkJCQkJCQkJCQkJCShkb3VibGUpCiAJCQkJCQkJCQkJCQkodWxfTG93VGltZXJWYWx1ZSkKQEAgLTgwNiwzMSArODA2LDMxIEBACiAJCQkJCQkJCQkJYnJlYWs7CiAJCQkJCQkJCQl9CiAKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogQ2FsY3VsYXRlIHRoZSBoaWdoIGRpdmlzaW9uIGZhdG9yICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJc3dpdGNoIChiX1RpbWluZ1VuaXQpIHsKLQkJCQkgICAvKioqKioqLworCQkJCQkJCQkJCS8qKioqKiovCiAJCQkJCQkJCQkJLyogbnMgKi8KLQkJCQkgICAvKioqKioqLworCQkJCQkJCQkJCS8qKioqKiovCiAKIAkJCQkJCQkJCWNhc2UgMDoKIAotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogVGltZXIgMCBmYWN0b3IgKi8KLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJdWxfSGlnaFRpbWVyVmFsdWUKIAkJCQkJCQkJCQkJPQotCQkJCQkJCQkJCQkoVUxPTkcpCisJCQkJCQkJCQkJCSh1bnNpZ25lZCBpbnQpCiAJCQkJCQkJCQkJCSh1bF9IaWdoVGltaW5nCiAJCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkJKDAuMDAwMjUgKiBiX0Nsb2NrU2VsZWN0aW9uKSk7CiAKLQkJCQkJICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJaWYgKChkb3VibGUpKChkb3VibGUpdWxfSGlnaFRpbWluZyAqICgwLjAwMDI1ICogKGRvdWJsZSliX0Nsb2NrU2VsZWN0aW9uKSkgPj0gKChkb3VibGUpKChkb3VibGUpdWxfSGlnaFRpbWVyVmFsdWUgKyAwLjUpKSkgewogCQkJCQkJCQkJCQl1bF9IaWdoVGltZXJWYWx1ZQpAQCAtODQwLDEzICs4NDAsMTMgQEAKIAkJCQkJCQkJCQkJCTE7CiAJCQkJCQkJCQkJfQogCi0JCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkJLyogQ2FsY3VsYXRlIHRoZSByZWFsIHRpbWluZyAqLwotCQkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQkJKnB1bF9SZWFsSGlnaFRpbWluZwogCQkJCQk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ioqKioqKioqKioqLwogCiAJCQkJCQkJCQlkZXZwcml2LT4KIAkJCQkJCQkJCQlzX01vZHVsZUluZm8KQEAgLTEyNTEsOSArMTI1MSw5IEBACiAJCQkJCQkJCQkJPQogCQkJCQkJCQkJCWJfQ2xvY2tTZWxlY3Rpb247CiAKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFNhdmUgdGhlIHRpbWluZyB1bml0ICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCWRldnByaXYtPgogCQkJCQkJCQkJCXNfTW9kdWxlSW5mbwpAQCAtMTI2NSw5ICsxMjY1LDkgQEAKIAkJCQkJCQkJCQk9CiAJCQkJCQkJCQkJYl9UaW1pbmdVbml0OwogCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFNhdmUgdGhlIGxvdyBiYXNlIHRpbWluZyAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCWRldnByaXYtPgogCQkJCQkJCQkJCXNfTW9kdWxlSW5mbwpAQCAtMTI4OSw5ICsxMjg5LDkgQEAKIAkJCQkJCQkJCQk9CiAJCQkJCQkJCQkJKnB1bF9SZWFsTG93VGltaW5nOwogCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFNhdmUgdGhlIGhpZ2ggYmFzZSB0aW1pbmcgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQlkZXZwcml2LT4KIAkJCQkJCQkJCQlzX01vZHVsZUluZm8KQEAgLTEzMTMsMjEgKzEzMTMsMjEgQEAKIAkJCQkJCQkJCQk9CiAJCQkJCQkJCQkJKnB1bF9SZWFsSGlnaFRpbWluZzsKIAotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogV3JpdGUgdGhlIGxvdyB0aW1pbmcgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJb3V0bCh1bF9Mb3dUaW1lclZhbHVlLCBkZXZwcml2LT5zX0JvYXJkSW5mb3MudWlfQWRkcmVzcyArIDAgKyAoMjAgKiBiX1BXTSkgKyAoNjQgKiBiX01vZHVsTmJyKSk7CiAKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogV3JpdGUgdGhlIGhpZ2ggdGltaW5nICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJb3V0bCh1bF9IaWdoVGltZXJWYWx1ZSwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLnVpX0FkZHJlc3MgKyA0ICsgKDIwICogYl9QV00pICsgKDY0ICogYl9Nb2R1bE5icikpOwogCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBTZXQgdGhlIGNsb2NrIHNlbGVjdGlvbiAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQlkd19Db21tYW5kCiAJCQkJCQkJCQkJPQpAQCAtMTM1NCwxNSArMTM1NCwxNSBAQAogCQkJCQkJCQkJCQkweDgwOwogCQkJCQkJCQkJfQogCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBTZXQgdGhlIGNsb2NrIHNlbGVjdGlvbiAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQlvdXRsKGR3X0NvbW1hbmQsIGRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsgOCArICgyMCAqIGJfUFdNKSArICg2NCAqIGJfTW9kdWxOYnIpKTsKIAotCQkJCS8qKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBQV00gaW5pdC4gKi8KLQkJCQkvKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqLwogCQkJCQkJCQkJZGV2cHJpdi0+CiAJCQkJCQkJCQkJc19Nb2R1bGVJbmZvCiAJCQkJCQkJCQkJW2JfTW9kdWxOYnJdLgpAQCAtMTM3Myw5OCArMTM3Myw5OCBAQAogCQkJCQkJCQkJCT0KIAkJCQkJCQkJCQkxOwogCQkJCQkJCQl9IGVsc2UgewotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogWW91IGNhbiBub3QgdXNlZCB0aGUgNDBNSHogY2xvY2sgc2VsZWN0aW9uIHdpdGggKi8KIAkJCQkJCQkJCS8qIHRoaXMgYm9hcmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQlEUFJJTlRLKCJZb3UgY2FuIG5vdCB1c2VkIHRoZSA0ME1IeiBjbG9jayBzZWxlY3Rpb24gd2l0aCB0aGlzIGJvYXJkXG4iKTsKIAkJCQkJCQkJCWlfUmV0dXJuVmFsdWUKIAkJCQkJCQkJCQk9CiAJCQkJCQkJCQkJLTk7CiAJCQkJCQkJCX0KIAkJCQkJCQl9IGVsc2UgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkvKiBIaWdoIGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQlEUFJJTlRLKCJIaWdoIGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQogCQkJCQkJCQkJLTg7CiAJCQkJCQkJfQogCQkJCQkJfSBlbHNlIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkvKiBMb3cgYmFzZSB0aW1pbmcgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJRFBSSU5USygiTG93IGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC03OwogCQkJCQkJfQotCQkJCQl9CS8vIGlmICgoYl9UaW1pbmdVbml0ID49IDApICYmIChiX1RpbWluZ1VuaXQgPD0gNCkpCisJCQkJCX0JLyogIGlmICgoYl9UaW1pbmdVbml0ID49IDApICYmIChiX1RpbWluZ1VuaXQgPD0gNCkpICovCiAJCQkJCWVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIFRpbWluZyB1bml0IHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCURQUklOVEsoIlRpbWluZyB1bml0IHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLy8gaWYgKChiX1RpbWluZ1VuaXQgPj0gMCkgJiYgKGJfVGltaW5nVW5pdCA8PSA0KSkKLQkJCQl9CS8vIGlmICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgfHwgKGJfQ2xvY2tTZWxlY3Rpb24gPT0gQVBDSTE3MTBfMzNNSFopIHx8IChiX0Nsb2NrU2VsZWN0aW9uID09IEFQQ0kxNzEwXzQwTUhaKSk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YgYl9QV00gPD0gMSkgKi8KIAkJCWVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFRvciBQV00gc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJRFBSSU5USygiVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwogCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0JLy8gaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkKKwkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCiAJCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIFBXTSBtb2R1bGVcbiIpOwogCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwogCQl9CiAJfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0dldFBXTUluaXRpYWxpc2F0aW9uICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfUFdNLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9UaW1pbmdVbml0LCAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9QV00sICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9UaW1pbmdVbml0LCAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX0xvd1RpbWluZywgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfSGlnaFRpbWluZywgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9TdGFydExldmVsLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX1N0b3BNb2RlLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgcGJfU3RvcExldmVsLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9FeHRlcm5HYXRlLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX0ludGVycnVwdEVuYWJsZSwgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgcGJfRW5hYmxlKSAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfU3RhcnRMZXZlbCwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfU3RvcE1vZGUsICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfU3RvcExldmVsLCAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfRXh0ZXJuR2F0ZSwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfSW50ZXJydXB0RW5hYmxlLCAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfRW5hYmxlKSAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBQV00gKGJfUFdNKSBpbml0aWFsaXNhdGlvbiBmcm9tIHNlbGVjdGVkICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBtb2R1bGUgKGJfTW9kdWxOYnIpLiBZb3UgbXVzdCBjYWxsaW5nIHRoZSAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0luaXRQV00iIGZ1bmN0aW9uIGJlIGZvciB5b3UgY2FsbCB0aGlzICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfIGJfQm9hcmRIYW5kbGUgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5iciAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1BXTSAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpICAgICAgICAgICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1BXTSAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUEJZVEVfICBwYl9UaW1pbmdVbml0ICAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKK3wgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfICBwYl9UaW1pbmdVbml0ICAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogw6ZzICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICB8CkBAIC0xNDcyLDEzICsxNDcyLDEzIEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgOiBtbiAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBQVUxPTkdfIHB1bF9Mb3dUaW1pbmcgICAgICA6IExvdyBiYXNlIHRpbWluZyB2YWx1ZS4gICAgfAogfCAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX0hpZ2hUaW1pbmcgICAgIDogSGlnaCBiYXNlIHRpbWluZyB2YWx1ZS4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICBwYl9TdGFydExldmVsICAgICAgOiBTdGFydCBwZXJpb2QgbGV2ZWwgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9TdGFydExldmVsICAgICAgOiBTdGFydCBwZXJpb2QgbGV2ZWwgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbiAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIHBlcmlvZCBzdGFydCB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoIGEgbG93IGxldmVsIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRoZSBwZXJpb2Qgc3RhcnQgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aCBhIGhpZ2ggbGV2ZWx8Ci18ICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICBwYl9TdG9wTW9kZSAgICAgICAgOiBTdG9wIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9TdG9wTW9kZSAgICAgICAgOiBTdG9wIG1vZGUgc2VsZWN0aW9uICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBUaGUgUFdNIGlzIHN0b3BwZWQgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGx5IGFmdGVyIHRoZSAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9EaXNhYmxlUFdNInwKQEAgLTE0ODksNyArMTQ4OSw3IEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdGhlIFBXTSBpcyAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdG9wcGVkIGF0IHRoZSBlbmQgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20gbGFzdCBwZXJpb2QgY3ljbGV8Ci18ICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICBwYl9TdG9wTGV2ZWwgICAgICAgIDogU3RvcCBQV00gbGV2ZWwgc2VsZWN0aW9uIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICBwYl9TdG9wTGV2ZWwgICAgICAgIDogU3RvcCBQV00gbGV2ZWwgc2VsZWN0aW9uIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBvdXRwdXQgc2lnbmFsICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2VlcCB0aGUgbGV2ZWwgYWZ0ZXJ8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgICAgICAgICAgICAgICAgIHwKQEAgLTE1MDQsMTMgKzE1MDQsMTMgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSJ8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQQllURV8gIHBiX0V4dGVybkdhdGUgICAgICA6IEV4dGVybiBnYXRlIGFjdGlvbiAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0V4dGVybkdhdGUgICAgICA6IEV4dGVybiBnYXRlIGFjdGlvbiAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IEV4dGVybiBnYXRlIHNpZ25hbCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90IHVzZWQuICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBFeHRlcm4gZ2F0ZSBzaWduYWwgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZWQuICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQQllURV8gIHBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSBQV00gfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSBQV00gfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0LiAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIEFQQ0kxNzEwX0VOQUJMRSA6ICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5hYmxlIHRoZSBQV00gaW50ZXJydXB0fApAQCAtMTUxOSw3ICsxNTE5LDcgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfRElTQUJMRSA6ICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlIHRoZSBQV00gICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBQQllURV8gIHBiX0VuYWJsZSAgICAgICAgICA6IEluZGljYXRlIGlmIHRoZSBQV00gaXMgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKl8gIHBiX0VuYWJsZSAgICAgICAgICA6IEluZGljYXRlIGlmIHRoZSBQV00gaXMgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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bmVkIGNoYXIgKnBiX1N0YXJ0TGV2ZWwsCisJdW5zaWduZWQgY2hhciAqcGJfU3RvcE1vZGUsCisJdW5zaWduZWQgY2hhciAqcGJfU3RvcExldmVsLAorCXVuc2lnbmVkIGNoYXIgKnBiX0V4dGVybkdhdGUsIHVuc2lnbmVkIGNoYXIgKnBiX0ludGVycnVwdEVuYWJsZSwgdW5zaWduZWQgY2hhciAqcGJfRW5hYmxlKQogewotCUlOVCBpX1JldHVyblZhbHVlID0gMDsKLQlEV09SRCBkd19TdGF0dXM7Ci0JRFdPUkQgZHdfQ29tbWFuZDsKKwlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7CisJdW5zaWduZWQgaW50IGR3X1N0YXR1czsKKwl1bnNpZ25lZCBpbnQgZHdfQ29tbWFuZDsKIAogCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKi8KIAkJLyogVGVzdCBpZiBQV00gKi8KLQkgICAvKioqKioqKioqKioqKioqLworCQkvKioqKioqKioqKioqKioqLwogCiAJCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKIAkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1BXTSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRlc3QgdGhlIFBXTSBzZWxlY3Rpb24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChiX1BXTSA8PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCBpZiBQV00gaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWR3X1N0YXR1cyA9IGlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCiAJCQkJCXVpX0FkZHJlc3MgKyAxMiArICgyMCAqIGJfUFdNKSArCiAJCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKIAogCQkJCWlmIChkd19TdGF0dXMgJiAweDEwKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogUmVhZCB0aGUgbG93IHRpbWluZyAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJKnB1bF9Mb3dUaW1pbmcgPQogCQkJCQkJaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KIAkJCQkJCXVpX0FkZHJlc3MgKyAwICsgKDIwICogYl9QV00pICsKIAkJCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKIAotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogUmVhZCB0aGUgaGlnaCB0aW1pbmcgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJKnB1bF9IaWdoVGltaW5nID0KIAkJCQkJCWlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCiAJCQkJCQl1aV9BZGRyZXNzICsgNCArICgyMCAqIG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QV00gbm90IGluaXRpYWxpc2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJRFBSSU5USygiUFdNIG5vdCBpbml0aWFsaXNlZFxuIik7CiAJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9CS8vIGlmIChkd19TdGF0dXMgJiAweDEwKQotCQkJfQkvLyBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKQorCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEwKSAqLworCQkJfQkvKiAgaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkgKi8KIAkJCWVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFRvciBQV00gc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJRFBSSU5USygiVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwogCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0JLy8gaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkKKwkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCiAJCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiA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SBpX0FQQ0kxNzEwX1NldE5ld1BXTVRpbWluZyhkZXYsCi0JCQkoQllURSkgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyksCi0JCQkoQllURSkgZGF0YVswXSwKLQkJCShCWVRFKSBkYXRhWzFdLCAoVUxPTkcpIGRhdGFbMl0sIChVTE9ORykgZGF0YVszXSk7CisJCQkodW5zaWduZWQgY2hhcikgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyksCisJCQkodW5zaWduZWQgY2hhcikgZGF0YVswXSwKKwkJCSh1bnNpZ25lZCBjaGFyKSBkYXRhWzFdLCAodW5zaWduZWQgaW50KSBkYXRhWzJdLCAodW5zaWduZWQgaW50KSBkYXRhWzNdKTsKIAkJYnJlYWs7CiAKIAlkZWZhdWx0OgpAQCAtMTcxOCwyMCArMTcxOCwyMCBAQAogCiAJaWYgKGlfUmV0dXJuVmFsdWUgPj0gMCkKIAkJaV9SZXR1cm5WYWx1ZSA9IGluc24tPm47Ci0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX0VuYWJsZVBXTSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9QV00sICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX1N0YXJ0TGV2ZWwsICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfU3RvcE1vZGUsICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9TdG9wTGV2ZWwsICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX0V4dGVybkdhdGUsICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfSW50ZXJydXB0RW5hYmxlKSAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfUFdNLCAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9TdGFydExldmVsLCAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICBiX1N0b3BNb2RlLCAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfU3RvcExldmVsL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kdWxlIG51bWJlciAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9QV00gICAgICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX1N0YXJ0TGV2ZWwgICAgICA6IFN0YXJ0IHBlcmlvZCBsZXZlbCBzZWxlY3Rpb24gfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfUFdNICAgICAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TdGFydExldmVsICAgICAgOiBTdGFydCBwZXJpb2QgbGV2ZWwgc2VsZWN0aW9uIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIHBlcmlvZCBzdGFydCB3aXRoIGEgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb3cgbGV2ZWwgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IFRoZSBwZXJpb2Qgc3RhcnQgd2l0aCBhIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlnaCBsZXZlbCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfU3RvcE1vZGUgICAgICAgIDogU3RvcCBtb2RlIHNlbGVjdGlvbiAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9TdG9wTW9kZSAgICAgICAgOiBTdG9wIG1vZGUgc2VsZWN0aW9uICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogVGhlIFBXTSBpcyBzdG9wcGVkICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RseSBhZnRlciB0aGUgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00iIHwKQEAgLTE3NjEsNyArMTc2MSw3IEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0aGUgUFdNIGlzICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3BwZWQgYXQgdGhlIGVuZCBmcm9tfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdCBwZXJpb2QgY3ljbGUuICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9TdG9wTGV2ZWwgICAgICAgOiBTdG9wIFBXTSBsZXZlbCBzZWxlY3Rpb24gICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1N0b3BMZXZlbCAgICAgICA6IFN0b3AgUFdNIGxldmVsIHNlbGVjdGlvbiAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOiBUaGUgb3V0cHV0IHNpZ25hbCBrZWVwICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBsZXZlbCBhZnRlciB0aGUgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlfQVBDSTE3MTBfRGlzYWJsZVBXTSIgfApAQCAtMTc3NCwxMSArMTc3NCwxMSBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBoaWdoIGFmdGVyIHRoZSAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpX0FQQ0kxNzEwX0Rpc2FibGVQV00iIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfRXh0ZXJuR2F0ZSAgICAgIDogRXh0ZXJuIGdhdGUgYWN0aW9uIHNlbGVjdGlvbiB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9FeHRlcm5HYXRlICAgICAgOiBFeHRlcm4gZ2F0ZSBhY3Rpb24gc2VsZWN0aW9uIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRXh0ZXJuIGdhdGUgc2lnbmFsIG5vdCAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VkLiAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA6IEV4dGVybiBnYXRlIHNpZ25hbCB1c2VkLnwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0ludGVycnVwdEVuYWJsZSA6IEVuYWJsZSBvciBkaXNhYmxlIHRoZSBQV00gICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW50ZXJydXB0RW5hYmxlIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlIFBXTSAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQuICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gQVBDSTE3MTBfRU5BQkxFIDogICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIFBXTSBpbnRlcnJ1cHQgICB8CkBAIC0xODA2LDc3ICsxODA2LDc3IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLUlOVCBpX0FQQ0kxNzEwX0VuYWJsZVBXTShzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlCWVRFIGJfTW9kdWxOYnIsCi0JQllURSBiX1BXTSwKLQlCWVRFIGJfU3RhcnRMZXZlbCwKLQlCWVRFIGJfU3RvcE1vZGUsCi0JQllURSBiX1N0b3BMZXZlbCwgQllURSBiX0V4dGVybkdhdGUsIEJZVEUgYl9JbnRlcnJ1cHRFbmFibGUpCitpbnQgaV9BUENJMTcxMF9FbmFibGVQV00oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKKwl1bnNpZ25lZCBjaGFyIGJfTW9kdWxOYnIsCisJdW5zaWduZWQgY2hhciBiX1BXTSwKKwl1bnNpZ25lZCBjaGFyIGJfU3RhcnRMZXZlbCwKKwl1bnNpZ25lZCBjaGFyIGJfU3RvcE1vZGUsCisJdW5zaWduZWQgY2hhciBiX1N0b3BMZXZlbCwgdW5zaWduZWQgY2hhciBiX0V4dGVybkdhdGUsIHVuc2lnbmVkIGNoYXIgYl9JbnRlcnJ1cHRFbmFibGUpCiB7Ci0JSU5UIGlfUmV0dXJuVmFsdWUgPSAwOwotCURXT1JEIGR3X1N0YXR1czsKLQlEV09SRCBkd19Db21tYW5kOworCWludCBpX1JldHVyblZhbHVlID0gMDsKKwl1bnNpZ25lZCBpbnQgZHdfU3RhdHVzOworCXVuc2lnbmVkIGludCBkd19Db21tYW5kOwogCi0JZGV2cHJpdi0+dHNrX0N1cnJlbnQgPSBjdXJyZW50OwkvLyBTYXZlIHRoZSBjdXJyZW50IHByb2Nlc3MgdGFzayBzdHJ1Y3R1cmUKKwlkZXZwcml2LT50c2tfQ3VycmVudCA9IGN1cnJlbnQ7CS8qICBTYXZlIHRoZSBjdXJyZW50IHByb2Nlc3MgdGFzayBzdHJ1Y3R1cmUgKi8KIAkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogVGVzdCB0aGUgbW9kdWxlIG51bWJlciAqLwogCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCWlmIChiX01vZHVsTmJyIDwgNCkgewotCSAgIC8qKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKiovCiAJCS8qIFRlc3QgaWYgUFdNICovCi0JICAgLyoqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKi8KIAogCQlpZiAoKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KIAkJCQlkd19Nb2xkdWxlQ29uZmlndXJhdGlvbltiX01vZHVsTmJyXSAmCiAJCQkJMHhGRkZGMDAwMFVMKSA9PSBBUENJMTcxMF9QV00pIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBUZXN0IHRoZSBQV00gc2VsZWN0aW9uICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlpZiAoYl9QV00gPD0gMSkgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFRlc3QgaWYgUFdNIGluaXRpYWxpc2VkICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlkd19TdGF0dXMgPSBpbmwoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCQl1aV9BZGRyZXNzICsgMTIgKyAoMjAgKiBiX1BXTSkgKwogCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7CiAKIAkJCQlpZiAoZHdfU3RhdHVzICYgMHgxMCkgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBUZXN0IHRoZSBzdGFydCBsZXZlbCBzZWxlY3Rpb24gKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQlpZiAoYl9TdGFydExldmVsIDw9IDEpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkvKiBUZXN0IHRoZSBzdG9wIG1vZGUgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCWlmIChiX1N0b3BNb2RlIDw9IDEpIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkvKiBUZXN0IHRoZSBzdG9wIGxldmVsICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQlpZiAoYl9TdG9wTGV2ZWwgPD0gMikgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJLyogVGVzdCB0aGUgZXh0ZXJuIGdhdGUgbW9kZSAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQlpZiAoYl9FeHRlcm5HYXRlCiAJCQkJCQkJCQk8PSAxKSB7Ci0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogVGVzdCB0aGUgaW50ZXJydXB0IGFjdGlvbiAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJaWYgKGJfSW50ZXJydXB0RW5hYmxlID09IEFQQ0kxNzEwX0VOQUJMRSB8fCBiX0ludGVycnVwdEVuYWJsZSA9PSBBUENJMTcxMF9ESVNBQkxFKSB7Ci0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCS8qIFRlc3QgaWYgaW50ZXJydXB0IGZ1bmN0aW9uIGluaXRpYWxpc2VkICovCi0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQkvKiBSZWFkIHRoZSBjb21tYW5kICovCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJCWR3X0NvbW1hbmQKIAkJCQkJCQkJCQkJPQpAQCAtMTg5NSw5ICsxODk1LDkgQEAKIAkJCQkJCQkJCQkJJgogCQkJCQkJCQkJCQkweDgwOwogCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQkvKiBNYWtlIHRoZSBjb21tYW5kICovCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJCWR3X0NvbW1hbmQKIAkJCQkJCQkJCQkJPQpAQCAtMTk0MywxMDAgKzE5NDMsMTAwIEBACiAJCQkJCQkJCQkJCT0KIAkJCQkJCQkJCQkJYl9JbnRlcnJ1cHRFbmFibGU7CiAKLQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQkvKiBTZXQgdGhlIGNvbW1hbmQgKi8KLQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJCW91dGwoZHdfQ29tbWFuZCwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLnVpX0FkZHJlc3MgKyA4ICsgKDIwICogYl9QV00pICsgKDY0ICogYl9Nb2R1bE5icikpOwogCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCS8qIEVuYWJsZSB0aGUgUFdNICovCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCW91dGwoMSwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLnVpX0FkZHJlc3MgKyAxMiArICgyMCAqIGJfUFdNKSArICg2NCAqIGJfTW9kdWxOYnIpKTsKLQkJCQkJCQkJCX0JLy8gaWYgKGJfSW50ZXJydXB0RW5hYmxlID09IEFQQ0kxNzEwX0VOQUJMRSB8fCBiX0ludGVycnVwdEVuYWJsZSA9PSBBUENJMTcxMF9ESVNBQkxFKQorCQkJCQkJCQkJfQkvKiAgaWYgKGJfSW50ZXJydXB0RW5hYmxlID09IEFQQ0kxNzEwX0VOQUJMRSB8fCBiX0ludGVycnVwdEVuYWJsZSA9PSBBUENJMTcxMF9ESVNBQkxFKSAqLwogCQkJCQkJCQkJZWxzZSB7Ci0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQkvKiBJbnRlcnJ1cHQgcGFyYW1ldGVyIGlzIHdyb25nICovCi0JCQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCQlEUFJJTlRLKCJJbnRlcnJ1cHQgcGFyYW1ldGVyIGlzIHdyb25nXG4iKTsKIAkJCQkJCQkJCQlpX1JldHVyblZhbHVlCiAJCQkJCQkJCQkJCT0K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Yl9TdG9wTGV2ZWwgPD0gMikKKwkJCQkJCQkJfQkvKiAgaWYgKGJfRXh0ZXJuR2F0ZSA+PSAwICYmIGJfRXh0ZXJuR2F0ZSA8PSAxKSAqLworCQkJCQkJCX0JLyogIGlmIChiX1N0b3BMZXZlbCA+PSAwICYmIGJfU3RvcExldmVsIDw9IDIpICovCiAJCQkJCQkJZWxzZSB7Ci0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJLyogUFdNIHN0b3AgbGV2ZWwgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJRFBSSU5USygiUFdNIHN0b3AgbGV2ZWwgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKIAkJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9CiAJCQkJCQkJCQktODsKLQkJCQkJCQl9CS8vIGlmIChiX1N0b3BMZXZlbCA+PSAwICYmIGJfU3RvcExldmVsIDw9IDIpCi0JCQkJCQl9CS8vIGlmIChiX1N0b3BNb2RlID49IDAgJiYgYl9TdG9wTW9kZSA8PSAxKQorCQkJCQkJCX0JLyogIGlmIChiX1N0b3BMZXZlbCA+PSAwICYmIGJfU3RvcExldmVsIDw9IDIpICovCisJCQkJCQl9CS8qICBpZiAoYl9TdG9wTW9kZSA+PSAwICYmIGJfU3RvcE1vZGUgPD0gMSkgKi8KIAkJCQkJCWVsc2UgewotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJLyogUFdNIHN0b3AgbW9kZSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCURQUklOVEsoIlBXTSBzdG9wIG1vZGUgc2VsZWN0aW9uIGlzIHdyb25nXG4iKTsKIAkJCQkJCQlpX1JldHVyblZhbHVlID0gLTc7Ci0JCQkJCQl9CS8vIGlmIChiX1N0b3BNb2RlID49IDAgJiYgYl9TdG9wTW9kZSA8PSAxKQotCQkJCQl9CS8vIGlmIChiX1N0YXJ0TGV2ZWwgPj0gMCAmJiBiX1N0YXJ0TGV2ZWwgPD0gMSkKKwkJCQkJCX0JLyogIGlmIChiX1N0b3BNb2RlID49IDAgJiYgYl9TdG9wTW9kZSA8PSAxKSAqLworCQkJCQl9CS8qICBpZiAoYl9TdGFydExldmVsID49IDAgJiYgYl9TdGFydExldmVsIDw9IDEpICovCiAJCQkJCWVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJLyogUFdNIHN0YXJ0IGxldmVsIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJRFBSSU5USygiUFdNIHN0YXJ0IGxldmVsIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLy8gaWYgKGJfU3RhcnRMZXZlbCA+PSAwICYmIGJfU3RhcnRMZXZlbCA8PSAxKQotCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MTApCisJCQkJCX0JLyogIGlmIChiX1N0YXJ0TGV2ZWwgPj0gMCAmJiBiX1N0YXJ0TGV2ZWwgPD0gMSkgKi8KKwkJCQl9CS8qICBpZiAoZHdfU3RhdHVzICYgMHgxMCkgKi8KIAkJCQllbHNlIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBQV00gbm90IGluaXRpYWxpc2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJRFBSSU5USygiUFdNIG5vdCBpbml0aWFsaXNlZFxuIik7CiAJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNTsKLQkJCQl9CS8vIGlmIChkd19TdGF0dXMgJiAweDEwKQotCQkJfQkvLyBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKQorCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEwKSAqLworCQkJfQkvKiAgaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkgKi8KIAkJCWVsc2UgewotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFRvciBQV00gc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJRFBSSU5USygiVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwogCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0JLy8gaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkKKwkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCiAJCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlEUFJJTlRLKCJUaGUgbW9kdWxlIGlzIG5vdCBhIFBXTSBtb2R1bGVcbiIpOwogCQkJaV9SZXR1cm5WYWx1ZSA9IC0zOwogCQl9CiAJfSBlbHNlIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogTW9kdWxlIG51bWJlciBlcnJvciAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQlEUFJJTlRLKCJNb2R1bGUgbnVtYmVyIGVycm9yXG4iKTsKIAkJaV9SZXR1cm5WYWx1ZSA9IC0yOwogCX0KIAotCXJldHVybiAoaV9SZXR1cm5WYWx1ZSk7CisJcmV0dXJuIGlfUmV0dXJuVmFsdWU7CiB9CiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0Rpc2FibGVQV00gKEJZVEVfICBiX0JvYXJkSGFuZGxlLCAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfTW9kdWxOYnIsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9QV00pICAgICAgICAgICAg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SAwOwotCURXT1JEIGR3X1N0YXR1czsKKwlpbnQgaV9SZXR1cm5WYWx1ZSA9IDA7CisJdW5zaWduZWQgaW50IGR3X1N0YXR1czsKIAogCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBUZXN0IHRoZSBtb2R1bGUgbnVtYmVyICovCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJaWYgKGJfTW9kdWxOYnIgPCA0KSB7Ci0JICAgLyoqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKi8KIAkJLyogVGVzdCBpZiBQV00gKi8KLQkgICAvKioqKioqKioqKioqKioqLworCQkvKioqKioqKioqKioqKioqLwogCiAJCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKIAkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1BXTSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRlc3QgdGhlIFBXTSBzZWxlY3Rpb24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChiX1BXTSA8PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCBpZiBQV00gaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWR3X1N0YXR1cyA9IGlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCiAJCQkJCXVpX0FkZHJlc3MgKyAxMiArICgyMCAqIGJfUFdNKSArCiAJCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKIAogCQkJCWlmIChkd19TdGF0dXMgJiAweDEwKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogVGVzdCBpZiBQV00gZW5hYmxlZCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJaWYgKGR3X1N0YXR1cyAmIDB4MSkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIERpc2FibGUgdGhlIFBXTSAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCW91dGwoMCwgZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCQkJCXVpX0FkZHJlc3MgKyAxMiArCiAJCQkJCQkJKDIwICogYl9QV00pICsKIAkJCQkJCQkoNjQgKiBiX01vZHVsTmJyKSk7Ci0JCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MSkKKwkJCQkJfQkvKiAgaWYgKGR3X1N0YXR1cyAmIDB4MSkgKi8KIAkJCQkJZWxzZSB7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCQkJCQkJLyogUFdNIG5vdCBlbmFibGVkICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCQkJCQkJRFBSSU5USygiUFdNIG5vdCBlbmFibGVkXG4iKTsKIAkJCQkJCWlfUmV0dXJuVmFsdWUgPSAtNjsKLQkJCQkJfQkvLyBpZiAoZHdfU3RhdHVzICYgMHgxKQotCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MTApCisJCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEpICovCisJCQkJfQkvKiAgaWYgKGR3X1N0YXR1cyAmIDB4MTApICovCiAJCQkJZWxzZSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogUFdNIG5vdCBpbml0aWFsaXNlZCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCURQUklOVEsoIiBQV00gbm90IGluaXRpYWxpc2VkXG4iKTsKIAkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MTApCi0JCQl9CS8vIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpCisJCQkJfQkvKiAgaWYgKGR3X1N0YXR1cyAmIDB4MTApICovCisJCQl9CS8qICBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKSAqLwogCQkJZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlEUFJJTlRLKCJUb3IgUFdNIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQkvLyBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKQorCQkJfQkvKiAgaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkgKi8KIAkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBQV00gbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZVxuIik7CiAJCQlpX1JldHVyblZhbHVlID0gLTM7CiAJCX0KIAl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3JcbiIpOwogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfU2V0TmV3UFdNVGltaW5nICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9QV00sICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX0Nsb2NrU2VsZWN0aW9uLCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfUFdNLCAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9DbG9ja1NlbGVjdGlvbiwgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1RpbWluZ1VuaXQsICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfICAgdWxfTG93VGltaW5nLCAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVTE9OR18gICB1bF9IaWdoVGltaW5nKSAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKQEAgLTIxNjIsMTEgKzIxNjIsMTEgQEAKIHwgICAgICAgICAgICAgICAgICAgICB1bF9UaW1pbmdVbml0IGRldGVybWluZSB0aGUgbG93L2hpZ2ggdGltaW5nIGJhc2UgZm9yICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHRoZSBwZXJpb2QuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmV8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdG8gMykgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfUFdNICAgICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkuICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9UaW1pbmdVbml0ICAgICA6IEJhc2UgdGltaW5nIFVuaXQgKDAgdG8gNCkgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1BXTSAgICAgICAgICAgIDogU2VsZWN0ZWQgUFdNICgwIG9yIDEpLiAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVGltaW5nVW5pdCAgICAgOiBCYXNlIHRpbWluZyBVbml0ICgwIHRvIDQpIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogw6ZzICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICB8CkBAIC0yMTg5LDE4ICsyMTg5LDE4IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLUlOVCBpX0FQQ0kxNzEwX1NldE5ld1BXTVRpbWluZyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlCWVRFIGJfTW9kdWxOYnIsCi0JQllURSBiX1BXTSwgQllURSBiX1RpbWluZ1VuaXQsIFVMT05HIHVsX0xvd1RpbWluZywgVUxPTkcgdWxfSGlnaFRpbWluZykKK2ludCBpX0FQQ0kxNzEwX1NldE5ld1BXTVRpbWluZyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAorCXVuc2lnbmVkIGNoYXIgYl9Nb2R1bE5iciwKKwl1bnNpZ25lZCBjaGFyIGJfUFdNLCB1bnNpZ25lZCBjaGFyIGJfVGltaW5nVW5pdCwgdW5zaWduZWQgaW50IHVsX0xvd1RpbWluZywgdW5zaWduZWQgaW50IHVsX0hpZ2hUaW1pbmcpCiB7Ci0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STE3MTBfUFdNKSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogVGVzdCB0aGUgUFdNIHNlbGVjdGlvbiAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJaWYgKGJfUFdNIDw9IDEpIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUZXN0IGlmIFBXTSBpbml0aWFsaXNlZCAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJZHdfU3RhdHVzID0gaW5sKGRldnByaXYtPnNfQm9hcmRJbmZvcy4KIAkJCQkJdWlfQWRkcmVzcyArIDEyICsgKDIwICogYl9QV00pICsKQEAgLTIyMzUsMTQgKzIyMzUsMTQgQEAKIAkJCQkJCXNfUFdNTW9kdWxlSW5mby4KIAkJCQkJCWJfQ2xvY2tTZWxlY3Rpb247CiAKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFRlc3QgdGhlIHRpbWluZyB1bml0ICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCWlmIChiX1RpbWluZ1VuaXQgPD0gNCkgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkvKiBUZXN0IHRoZSBsb3cgdGltaW5nIHNlbGVjdGlvbiAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCWlmICgoKGJfQ2xvY2tTZWxlY3Rpb24gPT0KIAkJCQkJCQkJCUFQQ0kxNzEwXzMwTUhaKQpAQCAtMjM3NywzNyArMjM3NywzNyBAQAogCQkJCQkJCQkmJiAodWxfTG93VGltaW5nCiAJCQkJCQkJCQk8PQogCQkJCQkJCQkJN1VMKSkpIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJLyogVGVzdCB0aGUgSGlnaCB0aW1pbmcgc2VsZWN0aW9uICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJaWYgKCgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAwKSAmJiAodWxfSGlnaFRpbWluZyA+PSAyNjYpICYmICh1bF9IaWdoVGltaW5nIDw9IDB4RkZGRkZGRkZVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAxKSAmJiAodWxfSGlnaFRpbWluZyA+PSAxKSAmJiAodWxfSGlnaFRpbWluZyA8PSA1NzEyMzA2NTBVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSBBUENJMTcxMF8zME1IWikgJiYgKGJfVGltaW5nVW5pdCA9PSAyKSAmJiAodWxfSGlnaFRpbWluZyA+PSAxKSAmJiAodWxfSGlnaFRpbWluZyA8PSA1NzEyMzBVTCkpIHx8ICgoYl9DbG9ja1NlbGVjdGlvbiA9PSB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JCQkJLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFRpbWVyIDAgZmFjdG9yICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQl1bF9Mb3dUaW1lclZhbHVlCiAJCQkJCQkJCQkJPQotCQkJCQkJCQkJCShVTE9ORykKKwkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCSh1bF9Mb3dUaW1pbmcKIAkJCQkJCQkJCQkqCiAJCQkJCQkJCQkJKDAuMjUgKiBiX0Nsb2NrU2VsZWN0aW9uKSk7CiAKLQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFJvdW5kIHRoZSB2YWx1ZSAqLwotCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQlpZiAoKGRvdWJsZSkoKGRvdWJsZSl1bF9Mb3dUaW1pbmcgKiAoMC4yNSAqIChkb3VibGUpYl9DbG9ja1NlbGVjdGlvbikpID49ICgoZG91YmxlKSgoZG91YmxlKXVsX0xvd1RpbWVyVmFsdWUgKyAwLjUpKSkgewogCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKQEAgLTI0OTgsMTMgKzI0OTgsMTMgQEAKIAkJCQkJCQkJCQkJMTsKIAkJCQkJCQkJCX0KIAotCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBDYWxjdWxhdGUgdGhlIHJlYWwgdGltaW5nICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi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kJCQkvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCWlmICgoZG91YmxlKSgoZG91YmxlKXVsX0xvd1RpbWluZyAqICgyNTAuMCAqIChkb3VibGUpYl9DbG9ja1NlbGVjdGlvbikpID49ICgoZG91YmxlKSgoZG91YmxlKXVsX0xvd1RpbWVyVmFsdWUgKyAwLjUpKSkgewogCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKQEAgLTI1ODIsMTMgKzI1ODIsMTMgQEAKIAkJCQkJCQkJCQkJMTsKIAkJCQkJCQkJCX0KIAotCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBDYWxjdWxhdGUgdGhlIHJlYWwgdGltaW5nICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJdWxfUmVhbExvd1RpbWluZwogCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkoVUxPTkcpCisJCQkJCQkJCQkJKHVuc2lnbmVkIGludCkKIAkJCQkJCQkJCQkodWxfTG93VGltZXJWYWx1ZQogCQkJCQkJCQkJCS8KIAkJCQkJCQkJCQkoMjUwLjAgKiAoZG91YmxlKWJfQ2xvY2tTZWxlY3Rpb24pKTsKQEAgLTI2MjQsNyArMjYyNCw3IEBACiAJCQkJCQkJCQlpZiAoYl9DbG9ja1NlbGVjdGlvbiAhPSBBUENJMTcxMF80ME1IWikgewogCQkJCQkJCQkJCXVsX0xvd1RpbWVyVmFsdWUKIAk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QkJCS8qKioqKiovCisJCQkJCQkJCQkvKioqKioqLwogCiAJCQkJCQkJCWNhc2UgNDoKIAotCQkJCQkvKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIFRpbWVyIDAgZmFjdG9yICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQl1bF9Mb3dUaW1lclZhbHVlCiAJCQkJCQkJCQkJPQotCQkJCQkJCQkJCShVTE9ORykKKwkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCSgKIAkJCQkJCQkJCQkodWxfTG93VGltaW5nCiAJCQkJCQkJCQkJCSoKQEAgLTI3NDIsOSArMjc0Miw5IEBACiAJCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkJYl9DbG9ja1NlbGVjdGlvbikpOwogCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCQkvKiBSb3VuZCB0aGUgdmFsdWUgKi8KLQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJCQkJaWYgKChkb3VibGUpKChkb3VibGUpKHVsX0xvd1RpbWluZyAqIDYwLjApICogKDI1MDAwMC4wICogKGRvdWJsZSliX0Nsb2NrU2VsZWN0aW9uKSkgPj0gKChkb3VibGUpKChkb3VibGUpdWxfTG93VGltZXJWYWx1ZSArIDAuNSkpKSB7CiAJCQkJCQkJCQkJdWxfTG93VGltZXJWYWx1ZQpAQCAtMjc1NCwxMyArMjc1NCwxMyBAQAogCQkJCQkJCQkJCQkxOwogCQkJCQkJCQkJfQogCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKio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iovCisJCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQl1bF9IaWdoVGltZXJWYWx1ZQogCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkoVUxPTkcpCisJCQkJCQkJCQkJKHVuc2lnbmVkIGludCkKIAkJCQkJCQkJCQkodWxfSGlnaFRpbWluZwogCQkJCQkJCQkJCSoKIAkJCQkJCQkJCQkoMC4yNSAqIGJfQ2xvY2tTZWxlY3Rpb24pKTsKIAotCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJLyogUm91bmQgdGhlIHZhbHVlICovCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJCWlmICgoZG91YmxlKSgoZG91YmxlKXVsX0hpZ2hUaW1pbmcgKiAoMC4yNSAqIChkb3VibGUpYl9DbG9ja1NlbGVjdGlvbikpID49ICgoZG91YmxlKSgoZG91YmxlKXVsX0hpZ2hUaW1lclZhbHVlICsgMC41KSkpIHsKIAkJCQkJCQkJCQl1bF9IaWdoVGltZXJWYWx1ZQpAQCAtMjkzMCwxMyArMjkzMCwxMyBAQAogCQkJCQkJCQkJCQkxOwogCQkJCQkJCQkJfQogCi0JCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJCS8qIENhbGN1bGF0ZSB0aGUgcmVhbCB0aW1pbmcgKi8KLQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCQl1bF9SZWFsSGlnaFRpbWluZwogCQkJCQkJCQkJCT0KLQkJCQkJCQkJCQkoVUxPTkcpCisJCQkJCQkJCQkJK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qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCS8qIFNhdmUgdGhlIGxvdyBiYXNlIHRpbWluZyAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJZGV2cHJpdi0+CiAJCQkJCQkJCQlzX01vZHVsZUluZm8KQEAgLTMyODcsOSArMzI4Nyw5IEBACiAJCQkJCQkJCQk9CiAJCQkJCQkJCQl1bF9SZWFsTG93VGltaW5nOwogCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkJLyogU2F2ZSB0aGUgaGlnaCBiYXNlIHRpbWluZyAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJZGV2cHJpdi0+CiAJCQkJCQkJCQlzX01vZHVsZUluZm8KQEAgLTMzMTEsMjEgKzMzMTEsMjEgQEAKIAkJCQkJCQkJCT0KIAkJCQkJCQkJCXVsX1JlYWxIaWdoVGltaW5nOwogCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJCS8qIFdyaXRlIHRoZSBsb3cgdGltaW5nICovCi0JCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCQkJb3V0bCh1bF9Mb3dUaW1lclZhbHVlLCBkZXZwcml2LT5zX0JvYXJkSW5mb3MudWlfQWRkcmVzcyArIDAgKyAoMjAgKiBiX1BXTSkgKyAoNjQgKiBiX01vZHVsTmJyKSk7CiAKLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkvKiBXcml0ZSB0aGUgaGlnaCB0aW1pbmcgKi8KLQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCW91dGwodWxfSGlnaFRpbWVyVmFsdWUsIGRldnByaXYtPnNfQm9hcmRJbmZvcy51aV9BZGRyZXNzICsgNCArICgyMCAqIGJfUFdNKSArICg2NCAqIGJfTW9kdWxOYnIpKTsKIAotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkvKiBTZXQgdGhlIGNsb2NrIHNlbGVjdGlvbiAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCWR3X0NvbW1hbmQgPQogCQkJCQkJCQkJaW5sCkBAIC0zMzQ3LDkgKzMzNDcsOSBAQAogCQkJCQkJCQkJCTB4ODA7CiAJCQkJCQkJCX0KIAotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkvKiBTZXQgdGhlIGNsb2NrIHNlbGVjdGlvbiAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCQkJCW91dGwoZHdfQ29tbWFuZCwKIAkJCQkJCQkJCWRldnByaXYtPgpAQCAtMzM1OCw5NiArMzM1OCw5NiBAQAogCQkJCQkJCQkJKyA4ICsKIAkJCQkJCQkJCSgyMCAqIGJfUFdNKSArICg2NCAqIGJfTW9kdWxOYnIpKTsKIAkJCQkJCQl9IGVsc2UgewotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkvKiBIaWdoIGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQlEUFJJTlRLKCJIaWdoIGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQkJCWlfUmV0dXJuVmFsdWUgPQogCQkJCQkJCQkJLTg7CiAJCQkJCQkJfQogCQkJCQkJfSBlbHNlIHsKLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCQkvKiBMb3cgYmFzZSB0aW1pbmcgc2VsZWN0aW9uIGlzIHdyb25nICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCQkJRFBSSU5USygiTG93IGJhc2UgdGltaW5nIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQkJaV9SZXR1cm5WYWx1ZSA9IC03OwogCQkJCQkJfQotCQkJCQl9CS8vIGlmICgoYl9UaW1pbmdVbml0ID49IDApICYmIChiX1RpbWluZ1VuaXQgPD0gNCkpCisJCQkJCX0JLyogIGlmICgoYl9UaW1pbmdVbml0ID49IDApICYmIChiX1RpbWluZ1VuaXQgPD0gNCkpICovCiAJCQkJCWVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIFRpbWluZyB1bml0IHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCURQUklOVEsoIlRpbWluZyB1bml0IHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLy8gaWYgKChiX1RpbWluZ1VuaXQgPj0gMCkgJiYgKGJfVGltaW5nVW5pdCA8PSA0KSkKLQkJCQl9CS8vIGlmIChkd19TdGF0dXMgJiAweDEwKQorCQkJCQl9CS8qICBpZiAoKGJfVGltaW5nVW5pdCA+PSAwKSAmJiAoYl9UaW1pbmdVbml0IDw9IDQpKSAqLworCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEwKSAqLwogCQkJCWVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFBXTSBub3QgaW5pdGlhbGlzZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlEUFJJTlRLKCJQV00gbm90IGluaXRpYWxpc2VkXG4iKTsKIAkJCQkJaV9SZXR1cm5WYWx1ZSA9IC01OwotCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MTApCi0JCQl9CS8vIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpCisJCQkJfQkvKiAgaWYgKGR3X1N0YXR1cyAmIDB4MTApICovCisJCQl9CS8qICBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKSAqLwogCQkJZWxzZSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmcgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlEUFJJTlRLKCJUb3IgUFdNIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQkvLyBpZiAoYl9QV00gPj0gMCAmJiBiX1BXTSA8PSAxKQorCQkJfQkvKiAgaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkgKi8KIAkJfSBlbHNlIHsKLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogVGhlIG1vZHVsZSBpcyBub3QgYSBQV00gbW9kdWxlICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZVxuIik7CiAJCQlpX1JldHVyblZhbHVlID0gLTM7CiAJCX0KIAl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBNb2R1bGUgbnVtYmVyIGVycm9yICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCURQUklOVEsoIk1vZHVsZSBudW1iZXIgZXJyb3JcbiIpOwogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfR2V0UFdNU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgYl9QV00sICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gIHBiX1BXTU91dHB1dFN0YXR1cywgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgcGJfRXh0ZXJuR2F0ZVN0YXR1cykgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgIGJfUFdNLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgcGJfUFdNT3V0cHV0U3RhdHVzLCAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgcGJfRXh0ZXJuR2F0ZVN0YXR1cykgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmV0dXJuIHRoZSBzdGF0dXMgZnJvbSBzZWxlY3RlZCBQV00gKGJfUFdNKSBmcm9tICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gIGJfQm9hcmRIYW5kbGUgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9QV00gICAgICAgICA6IFNlbGVjdGVkIFBXTSAoMCBvciAxKSAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX01vZHVsTmJyICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKQotCWJfTW9kdWxOYnIJCQk9KEJZVEUpICBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKLQliX1BXTQkJCQk9KEJZVEUpICBkYXRhWzBdOworfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMCAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfUFdNICAgICAgICAgOiBTZWxlY3RlZCBQV00gKDAgb3IgMSkgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9Nb2R1bE5iciAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMykKKwliX01vZHVsTmJyCQkJPSh1bnNpZ25lZCBjaGFyKSAgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7CisJYl9QV00JCQkJPSh1bnNpZ25lZCBjaGFyKSAgZGF0YVswXTsKIAogIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6IFBCWVRFXyAgcGJfUFdNT3V0cHV0U3RhdHVzICA6IFJldHVybiB0aGUgUFdNIG91dHB1dCAgICB8Cit8IE91dHB1dCBQYXJhbWV0ZXJzIDogdW5zaWduZWQgY2hhciAqXyAgcGJfUFdNT3V0cHV0U3RhdHVzICA6IFJldHVybiB0aGUgUFdNIG91dHB1dCAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWwgc3RhdHVzLiAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBQV00gb3V0cHV0IGxldmVsfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgbG93LiAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBUaGUgUFdNIG91dHB1dCBsZXZlbHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzIGhpZ2guICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgcGJfRXh0ZXJuR2F0ZVN0YXR1cyA6IFJldHVybiB0aGUgZXh0ZXJuIGdhdGUgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgcGJfRXh0ZXJuR2F0ZVN0YXR1cyA6IFJldHVybiB0aGUgZXh0ZXJuIGdhdGUgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWwgc3RhdHVzLiAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IFRoZSBleHRlcm4gZ2F0ZSBpcyAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG93LiAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBUaGUgZXh0ZXJuIGdhdGUgaXMgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2guCi0gICAgcGJfUFdNT3V0cHV0U3RhdHVzCT0oUEJZVEUpIGRhdGFbMF07Ci0JcGJfRXh0ZXJuR2F0ZVN0YXR1cyA9KFBCWVRFKSBkYXRhWzFdOyAgICAgICAgICAgICB8CisgICAgcGJfUFdNT3V0cHV0U3RhdHVzCT0odW5zaWduZWQgY2hhciAqKSBkYXRhWzB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CiAJCWlmICgoZGV2cHJpdi0+c19Cb2FyZEluZm9zLgogCQkJCWR3X01vbGR1bGVDb25maWd1cmF0aW9uW2JfTW9kdWxOYnJdICYKIAkJCQkweEZGRkYwMDAwVUwpID09IEFQQ0kxNzEwX1BXTSkgewotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRlc3QgdGhlIFBXTSBzZWxlY3Rpb24gKi8KLQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChiX1BXTSA8PSAxKSB7Ci0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCBpZiBQV00gaW5pdGlhbGlzZWQgKi8KLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWR3X1N0YXR1cyA9IGlubChkZXZwcml2LT5zX0JvYXJkSW5mb3MuCiAJCQkJCXVpX0FkZHJlc3MgKyAxMiArICgyMCAqIGJfUFdNKSArCiAJCQkJCSg2NCAqIGJfTW9kdWxOYnIpKTsKIAogCQkJCWlmIChkd19TdGF0dXMgJiAweDEwKSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogVGVzdCBpZiBQV00gZW5hYmxlZCAqLwotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJaWYgKGR3X1N0YXR1cyAmIDB4MSkgewogCQkJCQkJKnBiX1BXTU91dHB1dFN0YXR1cyA9Ci0JCQkJCQkJKEJZVEUpICgoZHdfU3RhdHVzID4+IDcpCisJCQkJCQkJKHVuc2lnbmVkIGNoYXIpICgoZHdfU3RhdHVzID4+IDcpCiAJCQkJCQkJJiAxKTsKIAkJCQkJCSpwYl9FeHRlcm5HYXRlU3RhdHVzID0KLQkJCQkJCQkoQllURSkgKChkd19TdGF0dXMgPj4gNikKKwkJCQkJCQkodW5zaWduZWQgY2hhcikgKChkd19TdGF0dXMgPj4gNikKIAkJCQkJCQkmIDEpOwotCQkJCQl9CS8vIGlmIChkd19TdGF0dXMgJiAweDEpCisJCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEpICovCiAJCQkJCWVsc2UgewotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIFBXTSBub3QgZW5hYmxlZCAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKiovCisJCQkJCQkvKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQkJRFBSSU5USygiUFdNIG5vdCBlbmFibGVkIFxuIik7CiAJCQkJCQlpX1JldHVyblZhbHVlID0gLTY7Ci0JCQkJCX0JLy8gaWYgKGR3X1N0YXR1cyAmIDB4MSkKLQkJCQl9CS8vIGlmIChkd19TdGF0dXMgJiAweDEwKQorCQkJCQl9CS8qICBpZiAoZHdfU3RhdHVzICYgMHgxKSAqLworCQkJCX0JLyogIGlmIChkd19TdGF0dXMgJiAweDEwKSAqLwogCQkJCWVsc2UgewotCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqLworCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFBXTSBub3QgaW5pdGlhbGlzZWQgKi8KLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCURQUklOVEsoIlBXTSBub3QgaW5pdGlhbGlzZWRcbiIpOwogCQkJCQlpX1JldHVyblZhbHVlID0gLTU7Ci0JCQkJfQkvLyBpZiAoZHdfU3RhdHVzICYgMHgxMCkKLQkJCX0JLy8gaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkKKwkJCQl9CS8qICBpZiAoZHdfU3RhdHVzICYgMHgxMCkgKi8KKwkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCiAJCQllbHNlIHsKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUb3IgUFdNIHNlbGVjdGlvbiBpcyB3cm9uZyAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJRFBSSU5USygiVG9yIFBXTSBzZWxlY3Rpb24gaXMgd3JvbmdcbiIpOwogCQkJCWlfUmV0dXJuVmFsdWUgPSAtNDsKLQkJCX0JLy8gaWYgKGJfUFdNID49IDAgJiYgYl9QV00gPD0gMSkKKwkJCX0JLyogIGlmIChiX1BXTSA+PSAwICYmIGJfUFdNIDw9IDEpICovCiAJCX0gZWxzZSB7Ci0JICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZSAqLwotCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCURQUklOVEsoIlRoZSBtb2R1bGUgaXMgbm90IGEgUFdNIG1vZHVsZVxuIik7CiAJCQlpX1JldHVyblZhbHVlID0gLTM7CiAJCX0KIAl9IGVsc2UgewotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioq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0aGUgTGljZW5zZSwgb3IgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KIApAQCAtNjUsMzEgKzY1LDMxIEBACiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9Jbml0U1NJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICBiX1NTSVByb2ZpbGUsICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgIGJfUG9zaXRpb25UdXJuTGVuZ3RoLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgYl9UdXJuQ3B0TGVuZ3RoLCAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX1NTSVByb2ZpbGUsICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgIGJfUG9zaXRpb25UdXJuTGVuZ3RoLCAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgYl9UdXJuQ3B0TGVuZ3RoLCAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVMT05HXyAgdWxfU1NJT3V0cHV0Q2xvY2ssICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgYl9TU0lDb3VudGluZ01vZGUpICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICBiX1NTSUNvdW50aW5nTW9kZSkgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZSB0aGUgU1NJIG9wZXJhdGluZyBtb2RlIGZyb20gc2VsZWN0ZWQgbW9kdWxlICB8CiB8ICAgICAgICAgICAgICAgICAgICAgKGJfTW9kdWxOYnIpLiBZb3UgbXVzdCBjYWxsaW5nIHRoaXMgZnVuY3Rpb24gYmUgZm9yIHlvdXwKIHwgICAgICAgICAgICAgICAgICAgICBjYWxsIGFueSBvdGhlciBmdW5jdGlvbiB3aXRjaCBhY2Nlc3Mgb2YgU1NJLiAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogQllURV8gYl9Cb2FyZEhhbmRsZSAgICAgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX01vZHVsTmJyICAgICAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvICAgICAgICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHVuc2lnbmVkIGNoYXJfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Nb2R1bE5iciAgICAgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX1NTSVByb2ZpbGUgICAgICAgICA6IFNlbGVjdGlvbiBmcm9tIFNTSSAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfU1NJUHJvZmlsZSAgICAgICAgIDogU2VsZWN0aW9uIGZyb20gU1NJICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9maWxlIGxlbmd0aCAoMiB0byAzMikufAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfICBiX1Bvc2l0aW9uVHVybkxlbmd0aCA6IFNlbGVjdGlvbiBmcm9tIFNTSSAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfUG9zaXRpb25UdXJuTGVuZ3RoIDogU2VsZWN0aW9uIGZyb20gU1NJICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiBkYXRhIGxlbmd0aCAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIHRvIDMxKS4gICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gIGJfVHVybkNwdExlbmd0aCAgICAgIDogU2VsZWN0aW9uIGZyb20gU1NJIHR1cm4gIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgYl9UdXJuQ3B0TGVuZ3RoICAgICAgOiBTZWxlY3Rpb24gZnJvbSBTU0kgdHVybiAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXIgZGF0YSBsZW5ndGggICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgdG8gMzEpLiAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFICAgYl9QQ0lJbnB1dENsb2NrICAgICAgOiBTZWxlY3Rpb24gZnJvbSBQQ0kgYnVzICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgICBiX1BDSUlucHV0Q2xvY2sgICAgICA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2sgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBBUENJMTcxMF8zME1IWiA6ICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBQQyBoYXZlIGEgUENJIGJ1cyAgICB8CkBAIC0xMDMsNyArMTAzLDcgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgMzAgTUh6IHNlbGVjdGlvbi4gICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyb20gIDI1MiB0byA1IDAwMCAwMDAgSHp8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIDMzIE1IeiBzZWxlY3Rpb24uICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBCWVRFICAgYl9TU0lDb3VudGluZ01vZGUgICAgOiBTU0kgY291bnRpbmcgbW9kZSAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgICBiX1NTSUNvdW50aW5nTW9kZSAgICA6IFNTSSBjb3VudGluZyBtb2RlICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBBUENJMTcxMF9CSU5BUllfTU9ERSA6ICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCaW5hcnkgY291bnRpbmcgbW9kZS4gICB8CkBAIC0xMTEsMTIgKzExMSwxMiBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHcmF5IGNvdW50aW5nIG1vZGUuCiAKIAliX01vZHVsTmJyCQkJPSBDUl9BUkVGKGluc24tPmNoYW5zc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W5ndGggKi8KQEAgLTI1MCw5ICsyNTAsOSBAQAogCiAJCQkJCQkJCQkJdWlfVGltZXJWYWx1ZQogCQkJCQkJCQkJCQk9Ci0JCQkJCQkJCQkJCShVSU5UKQorCQkJCQkJCQkJCQkodW5zaWduZWQgaW50KQogCQkJCQkJCQkJCQkoCi0JCQkJCQkJCQkJCSgoVUxPTkcpIChiX1BDSUlucHV0Q2xvY2spICogNTAwMDAwVUwpIC8gdWxfU1NJT3V0cHV0Q2xvY2spOworCQkJCQkJCQkJCQkoKHVuc2lnbmVkIGludCkgKGJfUENJSW5wdXRDbG9jaykgKiA1MDAwMDBVTCkgLyB1bF9TU0lPdXRwdXRDbG9jayk7CiAKIAkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkJCQkJCS8qIEluaXRpYWxpc2UgdGhlIHRpbWVyICovCkBAIC0zNTEsMTggKzM1MSwxOCBAQAogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICBpX0FQQ0kxNzEwX1JlYWQxU1NJVmFsdWUgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfU2VsZWN0ZWRTU0ksICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfU2VsZWN0ZWRTU0ksICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQVUxPTkdfIHB1bF9Qb3NpdGlvbiwgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1R1cm5DcHQpCi0gSU5UIGlfQVBDSTE3MTBfUmVhZFNTSVZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisgaW50IGlfQVBDSTE3MTBfUmVhZFNTSVZhbHVlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCiAJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6CkBAIC0zNzMsMjIgKzM3MywyMiBAQAogCQkJCQkJb3IgUmVhZCBhbGwgU1NJIGNvdW50ZXIgKGJfU2VsZWN0ZWRTU0kpIGZyb20gICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCBtb2R1bGUgKGJfTW9kdWxOYnIpLiAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgICAgICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgICAgICAgICAgOiBNb2R1bGUgbnVtYmVyIHRvICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyZSAoMCB0byAzKSAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9TZWxlY3RlZFNTSSAgICAgICAgIDogU2VsZWN0aW9uIGZyb20gU1NJICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX1NlbGVjdGVkU1NJICAgICAgICAgOiBTZWxlY3Rpb24gZnJvbSBTU0kgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXIgKDAgdG8gMikKIAotICAgIGJfTW9kdWxOYnIJCT0gICAoQllURSkgQ1JfQVJFRihpbnNuLT5jaGF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ICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX0lucHV0Q2hhbm5lbCwgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgcGJfQ2hhbm5lbFN0YXR1cykgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfSW5wdXRDaGFubmVsLCAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfQ2hhbm5lbFN0YXR1cykgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDoKIAkJCQkJKDApIFNldCB0aGUgZGlnaXRhbCBvdXRwdXQgZnJvbSBzZWxlY3RlZCBTU0kgbW91bGUgICAgICAgICB8CkBAIC03MTYsMTMgKzcxNCwxMyBAQAogICAgICAgICAgICAgICAgICAgICAoMylSZWFkIHRoZSBzdGF0dXMgZnJvbSBhbGwgU1NJIGRpZ2l0YWwgaW5wdXRzIGZyb20gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkIFNTSSBtb2R1bGUgKGJfTW9kdWxOYnIpICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IEJZVEVfIGJfQm9hcmRIYW5kbGUgICAgICAgICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTB8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5iciAgICBDUl9BUkVGICAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogdW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSAgICAgICAgIDogSGFuZGxlIG9mIGJvYXJkIEFQQ0ktMTcxMHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyICAgIENSX0FSRUYgICAgICAgIDogTW9kdWxlIG51bWJlciB0byAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUgKDAgdG8gMykgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW5wdXRDaGFubmVsIENSX0NIQU4gICAgICAgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfSW5wdXRDaGFubmVsIENSX0NIQU4gICAgICAgOiBTZWxlY3Rpb24gZnJvbSBkaWdpdGFsICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gd2hpY2ggSU9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQgKCAwIHRvIDIpICAg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GhlIExpY2Vuc2UsIG9yIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uCiAKQEAgLTYzLDExICs2MywxMSBAQAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfICAgICBpX0FQQ0kxNzEwX0luaXRUb3JDb3VudGVyICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9Ub3JDb3VudGVyLCAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX1BDSUlucHV0Q2xvY2ssICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfVGltaW5nVW5pdCwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfVG9yQ291bnRlciwgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9QQ0lJbnB1dENsb2NrLCAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1RpbWluZ1VuaXQsICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVUxPTkdfICAgdWxfVGltaW5nSW50ZXJ2YWwsICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQVUxPTkdfIHB1bF9SZWFsVGltaW5nSW50ZXJ2YWwpICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKQEAgLTgyLDExICs4MiwxMSBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogICAgfAogfAotCQlDUl9BUkVGCUJZVEVfICAgYl9Nb2R1bE5iciAgICAgICA6IE1vZHVsZSBudW1iZXIgdG8gY29uZmlndXJlICB8CisJCUNSX0FSRUYJdW5zaWduZWQgY2hhcl8gICBiX01vZHVsTmJyICAgICAgIDogTW9kdWxlIG51bWJlciB0byBjb25maWd1cmUgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB0byAzKSAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgZGF0YVswXSBCWVRFXyAgIGJfVG9yQ291bnRlciAgICAgOiBUb3IgY291bnRlciBzZWxlY3Rpb24gICAgICAgfAorfCAgICAgICAgICAgZGF0YVswXSB1bnNpZ25lZCBjaGFyXyAgIGJfVG9yQ291bnRlciAgICAgOiBUb3IgY291bnRlciBzZWxlY3Rpb24gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIG9yIDEpLiAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICBkYXRhWzFdIEJZVEVfICAgYl9QQ0lJbnB1dENsb2NrICA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgY2xvY2t8Cit8ICAgICAgICAgICBkYXRhWzFdIHVuc2lnbmVkIGNoYXJfICAgYl9QQ0lJbnB1dENsb2NrICA6IFNlbGVjdGlvbiBmcm9tIFBDSSBidXMgY2xvY2t8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBBUENJMTcxMF8zME1IWiA6ICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBQQyBoYXZlIGEgUENJIGJ1cyAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2sgZnJvbSAzMCBNSHogICAgICAgICB8CkBAIC0xMDQsNyArMTA0LDcgQEAKIHwJCQkJCQkgICB0aGFuIGl0IGlzIG5vdCBwb3NzaWJsIHRvIHwKIHwJCQkJCQkgICB1c2VkIHRoZSBnYXRlIGlucHV0IGZvciAgIHwKIHwJCQkJCQkgICBlbmFibGVkIHRoZSBhY3F1aXNpdGlvbiAgIHwKLXwgICAgICAgICAgIGRhdGFbMl0gQllURV8gICBiX1RpbWluZ1VuaXQgICAgOiBCYXNlIHRpbWluZyB1bml0ICgwIHRvIDQpICAgIHwKK3wgICAgICAgICAgIGRhdGFbMl0gdW5zaWduZWQgY2hhcl8gICBiX1RpbWluZ1VuaXQgICAgOiBCYXNlIHRpbWluZyB1bml0ICgwIHRvIDQpICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogwrVzICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICAgICAgICB8CkBAIC0xMzAsMjcgKzEzMCwyNyBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwogCi1JTlQgaV9BUENJMTcxMF9JbnNuQ29uZmlnSW5pdFRvckNvdW50ZXIoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsCi0Jc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLCBzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQoraW50IGlfQVBDSTE3MTBfSW5zbkNvbmZpZ0luaXRUb3JDb3VudGVyKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewotCUlOVCBpX1JldHVyblZhbHVlID0gMDsKLQlVTE9ORyB1bF9UaW1lclZhbHVlID0gMDsKLQlEV09SRCBkd19Db21tYW5kOworCWludCBpX1JldHVyblZhbHVlID0gMDsKKwl1bnNpZ25lZCBpbnQgdWxfVGltZXJWYWx1ZSA9IDA7CisJdW5zaWduZWQgaW50IGR3X0NvbW1hbmQ7CiAJZG91YmxlIGRfUmVhbFRpbWluZ0ludGVydmFsID0gMDsKLQlCWVRFIGJfTW9kdWxOYnI7Ci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pb24gTmFtZSAgICAgOiBfSU5UXyBpX0FQQ0kxNzEwX0VuYWJsZVRvckNvdW50ZXIgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfIGJfQm9hcmRIYW5kbGUsICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9Nb2R1bE5iciwgICAgICAgICAgIHwKLXwJCQkJCQkgQllURV8gYl9Ub3JDb3VudGVyLCAgICAgICAgIHwKLXwJCQkJCQkgQllURV8gYl9JbnB1dE1vZGUsICAgICAgICAgIHwKLXwJCQkJCQkgQllURV8gYl9FeHRlcm5HYXRlLCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyBiX0N5Y2xlTW9kZSwgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW50ZXJydXB0RW5hYmxlKSAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gYl9Cb2FyZEhhbmRsZSwgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyBiX01vZHVsTmJyLCAgICAgICAgICAgfAorfAkJCQkJCSB1bnNpZ25lZCBjaGFyXyBiX1RvckNvdW50ZXIsICAgICAgICAgfAorfAkJCQkJCSB1bnNpZ25lZCBjaGFyXyBiX0lucHV0TW9kZSwgICAgICAgICAgfAorfAkJCQkJCSB1bnNpZ25lZCBjaGFyXyBiX0V4dGVybkdhdGUsICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoY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8CiB8CQkJCQkgICAgICBzaWduYWwgQiAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJCQkJCSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfQ3ljbGVNb2RlICAgIDogU2VsZWN0ZWQgdGhlIHRvciBjb3VudGVyICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9DeWNsZU1vZGUgICAgOiBTZWxlY3RlZCB0aGUgdG9yIGNvdW50ZXIgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjcXVpc2l0aW9uIG1vZGUgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW50ZXJydXB0RW5hYmxlIDogRW5hYmxlIG9yIGRpc2FibGUgdGhlICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvciBjb3VudGVyIGludGVycnVwdC4gICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFOiAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIHRvciBjb3VudGVyICAgICAgIHwKQEAgLTk1OSw5ICs5NTksOSBAQAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBGdW5jdGlvbiBOYW1lICAgICA6IF9JTlRfIGlfQVBDSTE3MTBfRGlzYWJsZVRvckNvdW50ZXIgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURV8gIGJfQm9hcmRIYW5kbGUsICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgYl9Nb2R1bE5iciwgICAgICAgICAgfAotfAkJCQkJCSBCWVRFXyAgYl9Ub3JDb3VudGVyKSAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGNoYXJfICBiX0JvYXJkSGFuZGxlLCAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gIGJfTW9kdWxOYnIsICAgICAgICAgIHwKK3wJCQkJCQkgdW5zaWduZWQgY2hhcl8gIGJfVG9yQ291bnRlcikgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IERpc2FibGUgdGhlIHRvciBjb3VudGVyIChiX1RvckNvdW50ZXIpIGZyb20gc2VsZWN0ZWQgICB8CiB8CQkgICAgICBtb2R1bGUgKGJfTW9kdWxOYnIpLiBJZiB5b3UgZGlzYWJsZSB0aGUgdG9yIGNvdW50ZXIgICAgfApAQCAtOTY5LDkgKzk2OSw5IEBACiB8CQkgICAgICBjb3VudGVyIHdpdGNoIHRoZSAiIGlfQVBDSTE3MTBfRW5hYmxlVG9yQ291bnRlciIgICAgICAgfAogfAkJICAgICAgZnVuY3Rpb24sIHRoZSBzdGF0dXMgcmVnaXN0ZXIgaXMgY2xlYXJlZCAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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yB3cm9uZyAqLwpAQCAtMTM1Nyw3ICsxMzU3LDcgQEAKIAogCQkJCURQUklOVEsoIlRvciBjb3VudGVyIHNlbGVjdGlvbiBpcyB3cm9uZ1xuIik7CiAJCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQkvLyBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpCisJCQl9CS8qICBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpICovCiAJCX0gZWxzZSB7CiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgdG9yIGNvdW50ZXIgbW9kdWxlICovCkBAIC0xMzc1LDIyICsxMzc1LDIyIEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9HZXRUb3JDb3VudGVySW5pdGlhbGlzYXRpb24gICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCWVRFXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICB8Ci18CQkJCQkJIEJZVEVfICAgICBiX1RvckNvdW50ZXIsICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgUEJZVEVfICAgcGJfVGltaW5nVW5pdCwgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICB8Cit8CQkJCQkJIHVuc2lnbmVkIGNoYXJfICAgICBiX1RvckNvdW50ZXIsICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgdW5zaWduZWQgY2hhciAqXyAgIHBiX1RpbWluZ1VuaXQsICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgUFVMT05HXyBwdWxfVGltaW5nSW50ZXJ2YWwsIHwKLXwJCQkJCQkgUEJZVEVfICAgcGJfSW5wdXRNb2RlLCAgICAgIHwKLXwJCQkJCQkgUEJZVEVfICAgcGJfRXh0ZXJuR2F0ZSwgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQllURV8gICBwYl9DeWNsZU1vZGUsICAgICAgfAotfAkJCQkJCSBQQllURV8gICBwYl9FbmFibGUsICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX0ludGVycnVwdEVuYWJsZSl8Cit8CQkJCQkJIHVuc2lnbmVkIGNoYXIgKl8gICBwYl9JbnB1dE1vZGUsICAgICAgfAorfAkJCQkJCSB1bnNpZ25lZCBjaGFyICpfICAgcGJfRXh0ZXJuR2F0ZSwgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfQ3ljbGVNb2RlLCAgICAgIHwKK3wJCQkJCQkgdW5zaWduZWQgY2hhciAqXyAgIHBiX0VuYWJsZSw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GVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICA6IEhhbmRsZSBvZiBib2FyZCBBUENJLTE3MTAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgIDogU2VsZWN0ZWQgbW9kdWxlIG51bWJlciAoMCB0byAzKSB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9Ub3JDb3VudGVyICAgOiBUb3IgY291bnRlciBzZWxlY3Rpb24gKDAgb3IgMSkKIAogCWJfTW9kdWxOYnIJCQk9CUNSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOwogCWJfVG9yQ291bnRlcgkJPQlDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKIC4gfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDogUEJZVEVfICBwYl9UaW1pbmdVbml0ICAgIDogQmFzZSB0aW1pbmcgdW5pdCAoMCB0byA0KSAgIHwKK3wgT3V0cHV0IFBhcmFtZXRlcnMgOiB1bnNpZ25lZCBjaGFyICpfICBwYl9UaW1pbmdVbml0ICAgIDogQmFzZSB0aW1pbmcgdW5pdCAoMCB0byA0KSAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IG5zICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogwrVzICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyIDogbXMgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgOiBzICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCA6IG1uICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIFBVTE9OR18gcHVsX1RpbWluZ0ludGVydmFsIDogQmFzZSB0aW1pbmcgdmFsdWUuICAgICAgICB8Ci18CQkgICAgICBQQllURV8gcGJfSW5wdXRNb2RlICAgICAgICA6IElucHV0IHNpZ25hbCBsZXZlbCAgICAgICAgfAorfAkJICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9JbnB1dE1vZGUgICAgICAgIDogSW5wdXQgc2lnbmFsIGxldmVsICAgICAgICB8CiB8CQkJCQkJICAgc2VsZWN0aW9uICAJCSAgICAgfAogfAkJCQkJCTAgOiBUb3IgY291bnQgZWFjaCBsb3cgbGV2ZWwgfAogfAkJCQkJCTEgOiBUb3IgY291bnQgZWFjaCBoaWdoIGxldmVsfAotfAkJICAgICAgUEJZVEVfIHBiX0V4dGVybkdhdGUJOiBFeHRlcm4gZ2F0ZSBhY3Rpb24gICAgICAgICB8Cit8CQkgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0V4dGVybkdhdGUJOiBFeHRlcm4gZ2F0ZSBhY3Rpb24gICAgICAgICB8CiB8CQkJCQkJICBzZWxlY3Rpb24gICAgICAgICAgICAgICAgICB8CiB8CQkJCQkJICAwIDogRXh0ZXJuIGdhdGUgc2lnbmFsIG5vdCB8CiB8CQkJCQkJICAgICAgdXNlZCAgICAgICAgICAgICAgICAgICB8CiB8CQkJCQkJICAxIDogRXh0ZXJuIGdhdGUgc2lnbmFsIHVzZWR8Ci18ICAgICAgICAgICAgICAgICAgICAgUEJZVEVfIHBiX0N5Y2xlTW9kZSAgICAgICA6IFRvciBjb3VudGVyIGFjcXVpc2l0aW9uICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfIHBiX0N5Y2xlTW9kZSAgICAgICA6IFRvciBjb3VudGVyIGFjcXVpc2l0aW9uICAgIHwKIHwJCQkJCQkgIG1vZGUgICAgICAgICAgIAkgICAgIHwKLXwJCSAgICAgIFBCWVRFXyBwYl9FbmFibGUJCTogSW5kaWNhdGUgaWYgdGhlIHRvciBjb3VudGVyfAorfAkJICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9FbmFibGUJCTogSW5kaWNhdGUgaWYgdGhlIHRvciBjb3VudGVyfAogfAkJCQkJCSAgaXMgZW5hYmxlZCBvciBubyAgICAgICAgICAgfAogfAkJCQkJCSAgMCA6IFRvciBjb3VudGVyIGRpc2FibGVkICAgfAogfAkJCQkJCSAgMSA6IFRvciBjb3VudGVyIGVuYWJsZWQgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyBwYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyBwYl9JbnRlcnJ1cHRFbmFibGUgOiBFbmFibGUgb3IgZGlzYWJsZSB0aGUgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvciBjb3VudGVyIGludGVycnVwdC4gICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVBDSTE3MTBfRU5BQkxFOiAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmFibGUgdGhlIHRvciBjb3VudGVyICAgICB8CkBAIC0xNDQxLDEzICsxNDQxLDEzIEBACiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFQQ0kxNzEwX0RJU0FCTEU6ICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAg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50ZXIgc2VsZWN0aW9uIGlzIHdyb25nICovCkBAIC0xNjE5LDcgKzE2MTksNyBAQAogCiAJCQkJRFBSSU5USygiVG9yIGNvdW50ZXIgc2VsZWN0aW9uIGlzIHdyb25nIFxuIik7CiAJCQkJaV9SZXR1cm5WYWx1ZSA9IC00OwotCQkJfQkvLyBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpCisJCQl9CS8qICBpZiAoYl9Ub3JDb3VudGVyIDw9IDEpICovCiAJCX0gZWxzZSB7CiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFRoZSBtb2R1bGUgaXMgbm90IGEgdG9yIGNvdW50ZXIgbW9kdWxlICovCkBAIC0xNjM3LDE3ICsxNjM3LDE3IEBACiAJCWlfUmV0dXJuVmFsdWUgPSAtMjsKIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9SZWFkVG9yQ291bnRlclZhbHVlICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCSBCWVRFXyAgICAgYl9Ub3JDb3VudGVyLCAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVJTlRfICAgIHVpX1RpbWVPdXQsICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEVfICAgcGJfVG9yQ291bnRlclN0YXR1cywgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBjaGFyXyAgICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgfAorfAkJCQkgdW5zaWduZWQgY2hhcl8gICAgIGJfVG9yQ291bnRlciwgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnRfICAgIHVpX1RpbWVPdXQsICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqXyAgIHBiX1RvckNvdW50ZXJTdGF0dXMsICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFVMT05HXyBwdWxfVG9yQ291bnRlclZhbHVlKSAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgCWNhc2UgQVBDSTE3MTBfVE9SX0dFVFBST0dSRVNTU1RBVFVTOiBSZXR1cm4gdGhlIHRvciBjb3VudGVyCkBAIC0xNjYwLDE1ICsxNjYwLDE1IEBACiB8CQkgICAgICAocHVsX1RvckNvdW50ZXJWYWx1ZSkgYWZ0ZXIgYSBjb250aW5nIGN5Y2xlIHN0b3AgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIGZyb20gc2VsZWN0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nRlciAgPQkodW5zaWduZWQgY2hhcikgZGF0YVsxXTsKKwl1aV9UaW1lT3V0CSAgPSAodW5zaWduZWQgaW50KSBkYXRhWzJdOyB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOiBQQllURV8gIHBiX1RvckNvdW50ZXJTdGF0dXMgOiBSZXR1cm4gdGhlIHRvciBjb3VudGVyICAgfAorfCBPdXRwdXQgUGFyYW1ldGVycyA6IHVuc2lnbmVkIGNoYXIgKl8gIHBiX1RvckNvdW50ZXJTdGF0dXMgOiBSZXR1cm4gdGhlIHRvciBjb3VudGVyICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMuICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogQ29udGluZyBjeWNsZSBub3Qgc3RhcnRlZHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTb2Z0d2FyZSBnYXRlIG5vdCBzZXQuICAgfApAQCAtMTY4Myw5ICsxNjgzLDkgQEAKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaV9BUENJMTcxMF9Jbml0VG9yQ291bnRlciJ8CiB8CQkJCQkJNCA6IFRpbWVlb3V0IG9jY3VyICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgUFVMT05HICBwdWxfVG9yQ291bnRlclZhbHVlICA6IFRvciBjb3VudGVyIHZhbHVlLgotCXBiX1RvckNvdW50Z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RlLCAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCQkgQllURV8gICAgYl9Qb3J0Qk1vZGUsICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCSBCWVRFXyAgICBiX1BvcnRDTW9kZSwgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJIEJZVEVfICAgIGJfUG9ydERNb2RlKSAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgYl9Cb2FyZEhhbmRsZSwgICAgICAgICAgICAgICAgICAgICB8Cit8CQkJCSB1bnNpZ25lZCBjaGFyXyAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wJCQkJIHVuc2lnbmVkIGNoYXJfICAgIGJfUG9ydEFNb2RlLCAgICAgICAgICAgICAgICAgICAgICAgfAorfAkJCQkgdW5zaWduZWQgY2hhcl8gICAgYl9Qb3J0Qk1vZGUsICAgICAgICAgICAgICAgICAgICAgICB8Cit8CQkJCSB1bnNpZ25lZCBjaGFyXyAgICBiX1BvcnRDTW9kZSwgICAgICAgICAgICAgICAgICAgICAgIHwKK3wJCQkJIHVuc2lnbmVkIGNoYXJfICAgIGJfUG9ydERNb2RlKSAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgIEFQQ0kxNzEwX1RUTF9JTklUICh1c2luZyBkZWZhdWx0cykgICA6IENvbmZpZ3VyZSB0aGUgVFRMIEkvTyBvcGVyYXRpbmcgbW9kZSBmcm9tIHNlbGVjdGVkICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgbW9kdWxlICAoYl9Nb2R1bE5icikuIFlvdSBtdXN0IGNhbGxpbmcgdGhpcyBmdW5jdGlvb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l9Cb2FyZEhhbmRsZSwgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEVfICAgICBiX01vZHVsTmJyLCAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgIGJfU2VsZWN0ZWRQb3J0LCAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgYl9JbnB1dENoYW5uZWwsICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFXyAgIHBiX0NoYW5uZWxTdGF0dXMpICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICBiX1NlbGVjdGVkUG9ydCwgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gICAgIGJfSW5wdXRDaGFubmVsLCAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpfICAgcGJfQ2hhbm5lbFN0YXR1cykgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmVhZ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NlbGVjdGlvbiBmcm9tIFRUTCBJL08gICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCAoMCB0byAyKSAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogUG9ydCBBIHNlbGVjdGlvbiAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBQb3J0IEIgc2VsZWN0aW9uICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA6IFBvcnQgQyBzZWxlY3Rpb24gIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzIDogUG9ydCBEIHNlbGVjdGlvbiAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfSW5wdXRDaGFubmVsICAgICAgICA6IFNlbGVjdGlvbiBmcm9tIGRpZ2l0YWwgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9JbnB1dENoYW5uZWwgICAgICAgIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCAoIDAgdG8gMikKIEFQQ0kxNzEwX1RUTF9SRUFEQ0hBTk5FTAogCWJfTW9kdWxOYnIJICA9IENSX0FSRUYoaW5zbi0+Y2hhbnNwZWMpOwogCWJfU2VsZWN0ZWRQb3J0PSBDUl9SQU5HRShpbnNuLT5jaGFuc3BlYyk7CiAJYl9JbnB1dENoYW5uZWw9IENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOwotCWJfUmVhZFR5cGUJICA9IChCWVRFKSBkYXRhWzBdOworCWJfUmVhZFR5cGUJICA9ICh1bnNpZ25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IgPSAoQllURSkgQ1JfQVJFRihpbnNuLT5jaGFuc3BlYyk7CisJYl9Nb2R1bE5iciA9ICh1bnNpZ25lZCBjaGFyKSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKIAlpX1JldHVyblZhbHVlID0gaW5zbi0+bjsKLQlwdWxfUG9ydFZhbHVlID0gKFBVTE9ORykgJiBkYXRhWzBdOworCXB1bF9Qb3J0VmFsdWUgPSAodW5zaWduZWQgaW50ICopICZkYXRhWzBdOwogCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFRlc3QgdGhlIG1vZHVsZSBudW1iZXIgKi8KQEAgLTc3Nyw3ICs3NzcsNyBAQAogCQlpX1JldHVyblZhbHVlID0gLTI7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKQEAgLTc4OSwxOSArNzg5LDE5IEBACiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uIE5hbWUgICAgIDogX0lOVF8gaV9BUENJMTcxMF9TZXRUVExJT0NobE9uICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEVfICAgICAgICAgICBiX0JvYXJkSGFuZGxlLCAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURV8gICAgICAgICAgIGJfTW9kdWxOYnIsICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFXyAgICAgICAgICAgYl9PdXRwdXRDaGFubmVsKQotSU5UIGlfQVBDSTE3MTBfSW5zbldyaXRlU2V0VFRMSU9DaGxPbk9mZihzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgY2hhcl8gICAgICAgICAgIGJfQm9hcmRIYW5kbGUsICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyXyAgICAgICAgICAgYl9Nb2R1bE5iciwgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfICAgICAgICAgICBiX091dHB1dENoYW5uZWwpCitpbnQgaV9BUENJMTcxMF9JbnNuV3JpdGVTZXRUVExJT0NobE9uT2ZmKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCiAJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IFNldHMgb3IgcmVzZXRzICB0aGUgb3V0cHV0IHdpdGNoIGhhcyBiZWVuIHBhc3NlZCB3aXRoIHRoZSAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXIgYl9DaGFubmVsLiBTZXR0aW5nIGFuIG91dHB1dCBtZWFucyBzZXR0aW5nICAgfAogfCAgICAgICAgICAgICAgICAgICAgIGFuIG91cHV0IGhpZ2guICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBCWVRFXyBiX0JvYXJkSGFuZGxlICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIEJZVEVfIGJfTW9kdWxOYnIgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMyl8Ci18ICAgICAgICAgICAgICAgICAgICAgQllURV8gYl9PdXRwdXRDaGFubmVsIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKK3wgSW5wdXQgUGFyYW1ldGVycyAgOiB1bnNpZ25lZCBjaGFyXyBiX0JvYXJkSGFuZGxlICAgOiBIYW5kbGUgb2YgYm9hcmQgQVBDSS0xNzEwICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXJfIGJfTW9kdWxOYnIgICAgICA6IFNlbGVjdGVkIG1vZHVsZSBudW1iZXIgKDAgdG8gMyl8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhcl8gYl9PdXRwdXRDaGFubmVsIDogU2VsZWN0aW9uIGZyb20gZGlnaXRhbCBvdXRwdXQgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsICgwIG9yIDEpICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgICAgICA6IFBEMCAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgIDogUEQxICAgICAgICAgICAgICAgIHwKQEAgLTgxMSw3ICs4MTEsNyBAQAogCiAgIGJfTW9kdWxOYnIJICAgPSBDUl9BUkVGKGluc24tPmNoYW5zcGVjKTsKIAliX091dHB1dENoYW5uZWw9IENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOwotCXVpX1N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3ICs0OSwzNyBAQAogI2luY2x1ZGUgImFkZGlfYW1jY19TNTkyMC5oIgogCiAvKistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyovCi0vKnwgRnVuY3Rpb24gICBOYW1lICAgOiBJTlQgaV9BZGRpSGVhZGVyUldfUmVhZEVlcHJvbSAgICAgICAgICAgICAgICAgICAgICAgICAgfCovCi0vKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKElOVCAgICBpX05iT2ZXb3Jkc1RvUmVhZCwgICAgICAgICAgICAgICAgICAgfCovCi0vKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERXT1JEIGR3X1BDSUJvYXJkRWVwcm9tQWRkcmVzcywgICAgICAgICAgICAgfCovCi0vKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdPUkQgICB3X0VlcHJvbVN0YXJ0QWRkcmVzcywgICAgICAgICAgICAgICAgfCovCi0vKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBXT1JEIHB3X0RhdGFSZWFkKSAgICAgICAgICAgICAgICAgICAgICAgICAgfCovCisvKnwgRnVuY3Rpb24gICBOYW1lICAgOiBpbnQgaV9BZGRpSGVhZGVyUldfUmVhZEVlcHJvbSAgICAgICAgICAgICAgICAgICAgICAgICAgfCovCisvKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGludCAgICBpX05iT2ZXb3Jkc1RvUmVhZCwgICAgICAgICAgICAgICAgICAgfCovCisvKnwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBkd19QQ0lCb2FyZEVlcHJvbUFkZHJlc3MsICAgICAgICAgICAgIHwqLworLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCAgIHdfRWVwcm9tU3RhcnRBZGRyZXNzLCA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bwogCXsKQEAgLTQwMywxNyArNDAyLDE2IEBACiAKIAkJLyogICAgICB0aGUgb3BlcmF0b3IgcmVnaXN0ZXIgaXMgQU1DQ19PUF9SRUdfTUNTUiszICovCiAKLQkJLyogICAgICBXT1JEIHJlYWQgIEVFUFJPTT0weDgwMDAgYW5kQU1DQ19PUF9SRUdfTUNTUisyICAgICAgICAgICAgICAgICAgKi8KKwkJLyogICAgICB1bnNpZ25lZCBzaG9ydCByZWFkICBFRVBST009MHg4MDAwIGFuZEFNQ0NfT1BfUkVHX01DU1IrMiAgICAgICAgICAgICAgICAgICovCiAKLQkJLyogICAgICBEV09SRCByZWFkICBFRVBST009MHg4MDAwMDAwMCBhbmQgQU1DQ19PUF9SRUdfTUNTUiAqLworCQkvKiAgICAgIHVuc2lnbmVkIGludCByZWFkICBFRVBST009MHg4MDAwMDAwMCBhbmQgQU1DQ19PUF9SRUdfTUNTUiAqLwogCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQliX0VlcHJvbUJ1c3kgPSBpbmIod19QQ0lCb2FyZEVlcHJvbUFkZHJlc3MgKyAweDNGKTsKIAkJYl9FZXByb21CdXN5ID0gYl9FZXByb21CdXN5ICYgMHg4MDsKIAotCX0KLQl3aGlsZSAoYl9FZXByb21CdXN5ID09IDB4ODApOworCX0gd2hpbGUgKGJfRWVwcm9tQnVzeSA9PSAweDgwKTsKIAogfQogCkBAIC00MjEsOSArNDE5LDkgQEAKIAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIAotfCBGdW5jdGlvbiAgIE5hbWUgICA6IHZvaWQgdl9FZXByb21DbG9jazc2KERXT1JEIGR3X0FkZHJlc3MsICAgICAgICAgICAgICAgICAgICAgIHwKK3wgRnVu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GEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycyBhcyBiZWxvdyB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgZGF0YVswXSAgICAgICAgICAgIDogMCBDb25maWd1cmUgQXMgVGltZXIgICAgICB8CiB8CQkJCQkJCQkJCSAgIDEgQ29uZmlndXJlIEFzIFdhdGNoZG9nICAgfAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgIDogV2F0Y2hkb2cgbnVtYmVyCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICAgOiBXYXRjaGRvZyBudW1iZXIKIHwJCQkJCSAgZGF0YVsyXSAgICAgICAgICAgIDogVGltZSBiYXNlIFVuaXQgICAgICAgICAgICB8CiB8CQkJCQkgIGRhdGFbM10JCQkgOiBSZWxvYWQgVmFsdWUJCQkgICAgIHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNF0gICAgICAgICAgICA6IEV4dGVybmFsIFRyaWdnZXIgICAgICAgICAgfAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTpFbmFibGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6RGlzYWJsZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs1XSAgICAgICAgICAgIDpFeHRlcm5hbCBUcmlnZ2VyIExldmVsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAwIFRyaWdnZXIgRGlzYWJsZWQKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDEgVHJpZ2dlciBFbmFibGVkIChMb3cgbGV2ZWwpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwIFRyaWdnZXIgRW5hYmxlZCAoSGlnaCBMZXZlbCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEgVHJpZ2dlciBFbmFibGVkIChIaWdoL0xvdyBsZXZlbCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNl0gICAgICAgICAgICA6IEV4dGVybmFsIEdhdGUgICAgICAgICAgICB8Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOkVuYWJsZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDpEaXNhYmxlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzddICAgICAgICAgICAgOiBFeHRlcm5hbCBHYXRlIGxldmVsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAwIEdhdGUgRGlzYWJsZWQKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDEgR2F0ZSBFbmFibGVkIChMb3cgbGV2ZWwpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwIEdhdGUgRW5hYmxlZCAoSGlnaCBMZXZlbCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbOF0gICAgICAgICAgICA6V2FybmluZyBSZWxheQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOiBFTkFCTEUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDogRElTQUJMRQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs5XSAgICAgICAgICAgIDpXYXJuaW5nIERlbGF5IGF2YWlsYWJsZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxMF0gICAgICAgICAgIDpXYXJuaW5nIFJlbGF5IFRpbWUgdW5pdAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxMV0gICAgICAgICAgIDpXYXJuaW5nIFJlbGF5IFRpbWUgUmVsb2FkIHZhbHVlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzEyXSAgICAgICAgICAgOlJlc2V0IFJlbGF5Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBFTkFCTEUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IERJU0FCTEUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMTNdICAgICAgICAgICA6SW50ZXJydXB0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgOiBFTkFCTEUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6IERJU0FCTEUKLQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgIDogRXh0ZXJuYWwgVHJpZ2dlciAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOkVuYWJsZQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDpEaXNhYmxlCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs1XSAgICAgICAgICAgIDpFeHRlcm5hbCBUcmlnZ2VyIExldmVsCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMCBUcmlnZ2VyIERpc2FibGVkCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMSBUcmlnZ2VyIEVuYWJsZWQgKExvdyBsZXZlbCkKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwIFRyaWdnZXIgRW5hYmxlZCAoSGlnaCBMZXZlbCkKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExIFRyaWdnZXIgRW5hYmxlZCAoSGlnaC9Mb3cgbGV2ZWwpCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs2XSAgICAgICAgICAgIDogRXh0ZXJuYWwgR2F0ZSAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOkVuYWJsZQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6RGlzYWJsZQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbN10gICAgICAgICAgICA6IEV4dGVybmFsIEdhdGUgbGV2ZWwKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAwIEdhdGUgRGlzYWJsZWQKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAxIEdhdGUgRW5hYmxlZCAoTG93IGxldmVsKQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAgR2F0ZSBFbmFibGVkIChIaWdoIExldmVsKQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbOF0gICAgICAgICAgICA6V2FybmluZyBSZWxheQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTogRU5BQkxFCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOiBESVNBQkxFCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs5XSAgICAgICAgICAgIDpXYXJuaW5nIERlbGF5IGF2YWlsYWJsZQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMTBdICAgICAgICAgICA6V2FybmluZyBSZWxheSBUaW1lIHVuaXQKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzExXSAgICAgICAgICAgOldhcm5pbmcgUmVsYXkgVGltZSBSZWxvYWQgdmFsdWUKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzEyXSAgICAgICAgICAgOlJlc2V0IFJlbGF5Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogRU5BQkxFCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRElTQUJMRQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMTNdICAgICAgICAgICA6SW50ZXJydXB0Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogRU5BQkxFCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRElTQUJMRQorfAogfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IE91dHB1dCBQYXJhbWV0ZXJzID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hbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBVSU5UICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAogfAkJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgZGF0YVswXSA6IDAgLSBTdG9wIFNlbGVjdGVkIFRpbWVyL1dhdGNoZG9nICAgICB8CkBAIC0yNzgsMTEgKzI3OCwxMSBAQAogfAkJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KLUlOVCBpX0FQQ0kwMzVfU3RhcnRTdG9wV3JpdGVUaW1lcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK2ludCBpX0FQQ0kwMzVfU3RhcnRTdG9wV3JpdGVUaW1lcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewotCVVJ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GlfQ291bnQgPD0gNDsgaV9Db3VudCsrKSB7CkBAIC0zNzMsMTcgKzM3NSwxNyBAQAogfCBUYXNrICAgICAgICAgICAgICA6IFJlYWQgVGhlIFNlbGVjdGVkIFRpbWVyICwgQ291bnRlciBvciBXYXRjaGRvZyAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBVSU5UICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAJCQkJCQkJCQkJCQkJCQkJCSB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOglkYXRhWzBdICAgICAgICAgICAgOiBzb2Z0d2FyZSB0cmlnZ2VyIHN0YXR1cwotICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICAgOiBoYXJkd2FyZSB0cmlnZ2VyIHN0YXR1cwotfCAgICAgCQkJCWRhdGFbMl0gICAgICAgICAgICA6IFNvZnR3YXJlIGNsZWFyIHN0YXR1cwotICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVszXSAgICAgICAgICAgIDogT3ZlcmZsb3cgc3RhdHVzCi0gICAgICAgICAgICAgICAgICAgICBkYXRhWzRdICAgICAgICAgICAgOiBUaW1lciBhY3R1YWwgdmFsdWUKLQorfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgIDogaGFyZHdhcmUgdHJpZ2dlciBzdGF0dXMKK3wgICAgIAkgIAkgICAgICAgIGRhdGFbMl0gICAgICAgICAgICA6IFNvZnR3YXJlIGNsZWFyIHN0YXR1cworfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVszXSAgICAgICAgICAgIDogT3ZlcmZsb3cgc3RhdHVzCit8ICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzRdICAgICAgICAgICAgOiBUaW1lciBhY3R1YWwgdmFsdWUKK3wKIAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKQEAgLTM5MSw0MiArMzkzLDQ2IEBACiB8CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwotSU5UIGlfQVBDSTAzNV9SZWFkVGltZXJXYXRjaGRvZyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJMDM1X1JlYWRUaW1lcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewotCVVJTlQgdWlfU3RhdHVzID0gMDsJLy8gU3RhdHVzIHJlZ2lzdGVyCisJdW5zaWduZWQgaW50IHVpX1N0YXR1cyA9IDA7CS8qICBTdGF0dXMgcmVnaXN0ZXIgKi8KIAlpX1dhdGNoZG9nTmJyID0gaW5zbi0+dW51c2VkWzBdOwotCSAgICAgIC8qKioqKioqKioqKioqKioqKiovCisKKwkvKioqKioqKioqKioqKioqKioqLwogCS8qIEdldCB0aGUgc3RhdHVzICovCi0JICAgICAgLyoqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqLworCiAJdWlfU3RhdHVzID0gaW5sKGRldnByaXYtPmlvYmFzZSArICgoaV9XYXRjaGRvZ05iciAtIDEpICogMzIpICsgMTYpOwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIEdldCB0aGUgc29mdHdhcmUgdHJpZ2dlciBzdGF0dXMgKi8KLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKIAlkYXRhWzBdID0gKCh1aV9TdGF0dXMgPj4gMSkgJiAxKTsKLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogR2V0IHRoZSBoYXJkd2FyZSB0cmlnZ2VyIHN0YXR1cyAqLwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlkYXRhWzFdID0gKCh1aV9TdGF0dXMgPj4gMikgJiAxKTsKLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBHZXQgdGhlIHNvZnR3YXJlIGNsZWFyIHN0YXR1cyAqLwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCWRhdGFbMl0gPSAoKHVpX1N0YXR1cyA+PiAzKSAmIDEpOwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIEdldCB0aGUgb3ZlcmZsb3cgc3RhdHVzICovCi0gICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJZGF0YVszXSA9ICgodWlfU3RhdHVzID4+IDApICYgMSk7CiAJaWYgKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlID09IEFERElEQVRBX1RJTUVSKSB7CiAJCWRhdGFbNF0gPSBpbmwoZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAwKTsKIAotCX0JCQkvLyAgaWYgIChkZXZwcml2LT5iX1RpbWVyU2VsZWN0TW9kZT09QURESURBVEFfVElNRVIpCisJfQkJCS8qICAgaWYgIChkZXZwcml2LT5iX1RpbWVyU2VsZWN0TW9kZT09QURESURBVEFfVElNRVIpICovCiAKIAlyZXR1cm4gaW5zbi0+bjsKIH0KIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS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B3aGljaCB0aGUgZXZlbnQgd2lsbCB0YWtlIHBsYWNlICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIG9yIDIpCi0gICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgIDogVGhlIGV2ZW50IGxvZ2ljIGZvciBwb3J0IDEgaGFzICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgIDogVGhlIGV2ZW50IGxvZ2ljIGZvciBwb3J0IDEgaGFzICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocmVlIHBvc3NpYmlsaXRpZXMgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6MCAgQVBDSTE1MDBfQU5EICAgICAgIDpUaGlzIGxvZ2ljICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtzICAgICAgIHwKQEAgLTEzNyw4ICsxMzcsOCBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwogCi1JTlQgaV9BUENJMTUwMF9Db25maWdEaWdpdGFsSW5wdXRFdmVudChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsIHN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJMTUwMF9Db25maWdEaWdpdGFsSW5wdXRFdmVudChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAorCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCBzdHJ1Y3QgY29tZWRpX2luc24gK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ioqKioqKioqKioqKioqKiovCiAJCQkvKiBUZXN0cyBpZiBtb3JlIHRoYW4gb25lIHRyYW5zaXRpb24gKi8KQEAgLTI2MSw3ICsyNjEsNyBAQAogCQkJCQkJKChpX1BhdHRlcm5UcmFuc2l0aW9uID4+CiAJCQkJCQkJaV9Db3VudCkgJiAweDEpOwogCi0JCQkJfQkvL2ZvciAoaV9Db3VudCA9IDA7IGlfQ291bnQgPCA4OyBpX0NvdW50KyspCisJCQkJfQkvKiBmb3IgKGlfQ291bnQgPSAwOyBpX0NvdW50IDwgODsgaV9Db3VudCsrKSAqLwogCiAJCQkJaWYgKGlfUGF0dGVyblRyYW5zaXRpb25Db3VudCA+IDEpIHsKIAkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjY5LDggKzI2OSw4IEBACiAJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJcHJpbnRrKCJcbiBUcmFuc2l0aW9uIGVycm9yIG9uIGFuIEFORCBsb2dpY1xuIik7CiAJCQkJCXJldHVybiAtRUlOVkFMOwotCQkJCX0JLy8gaWYgKGlfUGF0dGVyblRyYW5zaXRpb25Db3VudCA+IDEpCi0JCQl9CS8vIGlmIChkYXRhWzFdPT0gQVBDSTE1MDBfQU5EKQorCQkJCX0JLyogIGlmIChpX1BhdHRlcm5UcmFuc2l0aW9uQ291bnQgPiAxKSAqLworCQkJfQkvKiAgaWYgKGRhdGFbMV09PSBBUENJMTUwMF9BTkQpICovCiAKIAkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MIHJlZ2lzdGVyICovCkBAIC0zNTksMTIgKzM1OSwxMiBAQAogCQkJCWRldnByaXYtPmlvYmFzZSAr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XSA9PSBBUENJMTUwMF9PUikgKi8KIAkJZWxzZSB7CiAJCQlwcmludGsoIlxuVGhlIGNob2ljZSBmb3IgaW50ZXJydXB0IGxvZ2ljIGRvZXMgbm90IGV4aXN0XG4iKTsKIAkJCXJldHVybiAtRUlOVkFMOwotCQl9CQkvL2Vsc2VpZiAoZGF0YVsxXSA9PSBBUENJMTUwMF9PUikKLQl9CQkJLy9pZihkYXRhWzBdPT0yKQorCQl9CQkvKiBlbHNlaWYgKGRhdGFbMV0gPT0gQVBDSTE1MDBfT1IpICovCisJfQkJCS8qIGlmKGRhdGFbMF09PTIpICovCiAKIAlyZXR1cm4gaW5zbi0+bjsKIH0KQEAgLTUwNiwxMSArNTA2LDExIEBACiB8IFRhc2sgICAgICAgICAgICAgIDogIEFsbG93cyBvciBkaXNhbGxvd3MgYSBwb3J0IGV2ZW50ICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgfAotfAkJICAgICAgICAgICAgICBVSU5UIHVpX0NoYW5uZWwgOiBDaGFubmVsIG51bWJlciB0byByZWFkICAgICAgIHwKK3wJCSAgICAgICAgICAgICAgdW5zaWduZWQgaW50IHVpX0NoYW5uZWwgOiBDaGFubmVsIG51bWJlciB0byByZWFkICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICAgOiBEYXRhIFBvaW50ZXIgdG8gcmVhZCBzdGF0dXMgIHwKLSAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICA6MCBTdGFydCBpbnB1dCBldmVudAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIFN0b3AgaW5wdXQgZXZlbnQKLSAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICAgICAgICA6Tm8gb2YgcG9ydCAoMSBvciAyKQorfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICA6MCBTdGFydCBpbnB1dCBldmVudAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSBTdG9wIGlucHV0IGV2ZW50Cit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICAgICAgIDpObyBvZiBwb3J0ICgxIG9yIDIpCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCkBAIC01MTksOCArNTE5LDggQEAKIHwJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCi1pbnQgaV9BUENJMTUwMF9TdGFydFN0b3BJbnB1dEV2ZW50KHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsCi0Jc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK2ludCBpX0FQQ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bHMgVG8gYmUgUmVhZCAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgIFVJTlQgKmRhdGEgICAgICAgICAgICAgOiBEYXRhIFBvaW50ZXIKLSAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICA6IDAgUmVhZCBhIHNpbmdsZSBjaGFubmVsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIHJlYWQgYSBwb3J0IHZhbHVlCi0gICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICAgOiBwb3J0IHZhbHVlCit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IHVpX05vT2ZDaGFubmVscyAgICA6IE5vIE9mIENoYW5uZWxzIFRvIGJlIFJlYWQgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICAgICAgOiBEYXRhIFBvaW50ZXIKK3wgICAgICAgICAgICAgICAgICAgICAgZGF0YVswXSAgICAgICAgICAgICAgICAgOiAwIFJlYWQgYSBzaW5nbGUgY2hhbm5lbAorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgcmVhZCBhIHBvcnQgdmFsdWUKK3wgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICAgOiBwb3J0IHZhbHVlCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQlkYXRhWzBdICAgIDpUaGUgcmVhZCBzdGF0dXMgdmFsdWUKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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ICAgICAgfAogfAkJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZXMgdGhlIGRpZ2l0YWwgb3V0cHV0IG1lbW9yeSBhbmQgdGhlIGRpZ2l0YWwKLSAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgZXJyb3IgaW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgZXJyb3IgaW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKIHwgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgOnBvaW50ZXIgdG8gc3ViZGV2aWNlIHN0cnVjdHVyZQotICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJCQkgIGRhdGFbMF0gIDoxOk1lbW9yeSBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJICAgICAgICAgICAgMDpNZW1vcnkgb2ZmICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gIDoxIEVuYWJsZSB0aGUgdm9sdGFnZSBlcnJvciBpbnRlcnJ1cHQKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICA6MSBFbmFibGUgdGhlIHZvbHRhZ2UgZXJyb3IgaW50ZXJydXB0CiB8CQkJCQkJCSAgIDowIERpc2FibGUgdGhlIHZvbHRhZ2UgZXJyb3IgaW50ZXJydXB0IAkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCQkJCQkJCQkJCQkJCSB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKQEAgLTEwNDAsOCArMTA0MCw4IEBACiB8CQkJICAgICAgICAgICAgICAgICAg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VycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ICAgICAgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi0gICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgOiAyICAgICBBUENJMTUwMF8xXzhfS0haCiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIEFQQ0kxNTAwXzNfNl9LSFogICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgICAgQVBDSTE1MDBfMTE1X0tIWgotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyMS9UaW1lcjEKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIENvdW50ZXIzL1dhdGNoZG9nCi0gICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSAgICAgICAgICAgICAgICA6IDAgICAgIENvdW50ZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgVGltZXIvV2F0Y2hkb2cKLSAgICAgICAgICAgICAgICAgICAgICBkYXRhWzNdICAgICAgICAgICAgICAgIDogICAgICAgICBUaGlzIHBhcmFtZXRlciBoYXMgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICAgICAgIDogMCAgICAgQ291bnRlcjEvVGltZXIxCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBDb3VudGVyMi9UaW1lcjIKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIENvdW50ZXIzL1dhdGNoZG9nCit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMl0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBUaW1lci9XYXRjaGRvZworfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzNdICAgICAgICAgICAgICAgIDogICAgICAgICBUaGlzIHBhcmFtZXRlciBoYXMgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR3byBtZWFuaW5ncy4gICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gSWYgdGhlIGNvdW50ZXIvdGltZXIgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcyB1c2VkIGFzIGEgY291bnRlciAgfApAQCAtMTI0MywxNSArMTI0MywxNSBAQAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBkaXZpZGVyIGZhY3RvciAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIHRoZSBvdXRwdXQgaXMgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnaXZlbi4KLSAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgICAgICAgOiAwICAgIEFQQ0kxNTAwX0NPTlRJTlVPVVMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgIEFQQ0kxNTAwX1NJTkdMRQotICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzVdICAgICAgICAgICAgICAgICA6IDAgICAgU29mdHdhcmUgVHJpZ2dlcgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgSGFyZHdhcmUgVHJpZ2dlcgotCi0gICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNl0gICAgICAgICAgICAgICAgICA6MCAgICBTb2Z0d2FyZSBnYXRlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBIYXJkd2FyZSBnYXRlCi0gICAgICAgICAgICAgICAgICAgICAgIGRhdGFbN10gICAgICAgICAgICAgICAgICA6MCAgICBJbnRlcnJ1cHQgRGlzYWJsZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgSW50ZXJydXB0IEVuYWJsZQorfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgICAgICAgOiAwICAgIEFQQ0kxNTAwX0NPTlRJTlVPVVMKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBBUENJMTUwMF9TSU5HTEUKK3wgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNV0gICAgICAgICAgICAgICAgIDogMCAgICBTb2Z0d2FyZSBUcmlnZ2VyCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgSGFyZHdhcmUgVHJpZ2dlcgorfAorfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs2XSAgICAgICAgICAgICAgICAgIDowICAgIFNvZnR3YXJlIGdhdGUKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBIYXJkd2FyZSBnYXRlCit8ICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzddICAgICAgICAgICAgICAgICAgOjAgICAgSW50ZXJydXB0IERpc2FibGUKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBJbnRlcnJ1cHQgRW5hYmxlCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCkBAIC0xMjYxLDI3ICsxMjYxLDI3IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCiAKLWludCBpX0FQQ0kxNTAwX0NvbmZpZ0NvdW50ZXJUaW1lcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQ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nZ2VyIHRoZSB0aW1lciBjb3VudGVyIG9yIFdhdGNoZG9nICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi0gICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICAgfAotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyMS9UaW1lcjEKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIENvdW50ZXIzL1dhdGNoZG9nCi0gICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICA6IDAgICAgIHN0YXJ0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIHN0b3AKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgICAgVHJpZ2dlcgotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMl0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIFRpbWVyL1dhdGNoZG9nCit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyMS9UaW1lcjEKK3wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIENvdW50ZXIyL1RpbWVyMgorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgICAgQ291bnRlcjMvV2F0Y2hkb2cKK3wgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICA6IDAgICAgIHN0YXJ0Cit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBzdG9wCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICBUcmlnZ2VyCit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMl0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyCit8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBUaW1lci9XYXRjaGRvZwogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IE91dHB1dCBQYXJhbWV0ZXJzIDoJLS0JCQkJCQkJCQkJCQkJIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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AgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgSW5wdXQgUGFyYW1ldGVycyAgOiAgIHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi0gICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgfAotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgOiAwICAgICBDb3VudGVyMS9UaW1lcjEKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIENvdW50ZXIzL1dhdGNoZG9nCi0KK3wgICAgICAgICAgICAgICAgICAgICAgZGF0YVswXSAgICAgICAgICAgICAgICA6IDAgICAgIENvdW50ZXIxL1RpbWVyMQorfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCit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CAgaV9BUENJMTUwMF9SZWFkSW50ZXJydXB0TWFzayAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLAotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEpOyAJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSk7IAkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmVhZCB0aGUgaW50ZXJydXB0IG1hc2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6ICAgc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiAgICAgIDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgIDpwb2ludGVyIHRvIHN1YmRldmljZSBzdHJ1Y3R1cmUKLSAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOn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lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLAotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEpOyAJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSk7IAkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlcyB0aGUgaW50ZXJydXB0IHJlZ2lzdGVycyAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6ICAgc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiAgICAgIDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgIDpwb2ludGVyIHRvIHN1YmRldmljZSBzdHJ1Y3R1cmUKLSAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQga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ogICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8vb3V0YihBUENJMTUwMF9SV19NQVNURVJfSU5URVJSVVBUX0NPTlRST0wsZGV2cHJpdi0+aW9iYXNlK0FQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOworCQkvKiBvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9JTlRFUlJVUFRfQ09OVFJPTCxkZXZwcml2LT5pb2Jhc2UrQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7ICovCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIERpc2FibGVzICB0aGUgbWFpbiBpbnRlcnJ1cHQgb24gdGhlIGJvYXJkICovCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCS8vb3V0YigweDAwLGRldnByaXYtPmlvYmFzZStBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKKwkJLyogb3V0YigweDAwLGRldnByaXYtPmlvYmFzZStBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsgKi8KIAogICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgcG9ydCBBICovCkBAIC0yNjQ3LDExICsyNjQ3LDExIEBACiAKIAkJCQlpX0lucHV0Q2hhbm5lbCA9IDEgKyAoaV9SZWdWYWx1ZSA+PiAxKTsKIAotCQkJfQkvLyBpZihpX0xvZ2ljPT1BUENJMTUwMF9PUl9QUklPUklUWSkKKwkJCX0JLyogIGlmKGlfTG9naWM9PUFQQ0kxNTAwX09SX1BSSU9SSVRZKSAqLwogCQkJZWxzZSB7CiAJCQkJaV9JbnB1dEN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LS0tLSsKIHwgRnVuY3Rpb24gICBOYW1lICAgOiBpbnQgaV9BUENJMTUxNl9Db25maWdEaWdpdGFsT3V0cHV0IChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAotICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcyBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICB8Cit8ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcyBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICB8CiB8CQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlcyBUaGUgRGlnaXRhbCBPdXRwdXQgU3ViZGV2aWNlLiAgICAgICAgICAgICAgIHwKQEAgLTE1OCw3ICsxNTgsNyBAQAogfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycyBhcyBiZWxvdyB8CiB8ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgIDpwb2ludGVyIHRvIHN1YmRldmljZSBzdHJ1Y3R1cmUKLSAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgZGF0YVswXSAgOjE6TWVtb3J5IG9uICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJCQkgICAgICAgICAgICAwOk1lbW9yeSBvZmYgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJCQkJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKQEAgLTE3MSw4ICsxNzEsOCBAQAogfAkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KLWludCBpX0FQQ0kxNTE2X0NvbmZpZ0RpZ2l0YWxPdXRwdXQoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQoraW50IGlfQVBDSTE1MTZfQ29uZmlnRGlnaXRhbE91dHB1dChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sIHVuc2lnbmVkIGludCAqZGF0YSkKIHsKIAlkZXZwcml2LT5iX091dHB1dE1lbW9yeVN0YXR1cyA9IGRhdGF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ZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkgIHwKIHwJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBDb25maWd1cmVzIFRoZSBXYXRjaGRvZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogICBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ICAgICAgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgOnBvaW50ZXIgdG8gc3ViZGV2aWNlIHN0cnVjdHVyZQotICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICAgOiBEYXRhIFBvaW50ZXIgdG8gcmVhZCBzdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0t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VhazsKLQkJfQkJLy8gc3dpdGNoICAodWlfTm9PZkNoYW5uZWxzKQotCX0JCQkvLyBpZiAgKGRhdGFbMV09PTApCisJCX0JCS8qICBzd2l0Y2ggICh1aV9Ob09mQ2hhbm5lbHMpICovCisJfQkJCS8qICBpZiAgKGRhdGFbMV09PTApICovCiAJZWxzZSB7CiAJCWlmIChkYXRhWzFdID09IDEpIHsKIAkJCSpkYXRhID0gdWlfSW50ZXJydXB0U3RhdHVzXzE1NjQ7Ci0JCX0JCS8vIGlmICAoZGF0YVsxXT09MSkKLQl9CQkJLy8gZWxzZSBpZiAgKGRhdGFbMV09PTApCisJCX0JCS8qICBpZiAgKGRhdGFbMV09PTEpICovCisJfQkJCS8qICBlbHNlIGlmICAoZGF0YVsxXT09MCkgKi8KIAlyZXR1cm4gaW5zbi0+bjsKIH0KIApAQCAtMjM5LDcgKzI0MSw3IEBACiB8IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlcyBUaGUgRGlnaXRhbCBPdXRwdXQgU3ViZGV2aWNlLiAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVJTlQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gcGFyYW1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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBVSU5UICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJCQkgIGRhdGFbMF0gICAgICAgICAgICA6IDAgQ29uZmlndXJlIEFzIFRpbWVyICAgICAgfApAQCAtNTY0LDM0ICs1NjYsMzQgQEAKIHwJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCi1JTlQgaV9BUENJMTU2NF9Db25maWdUaW1lckNvdW50ZXJXYXRjaGRvZyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsIHN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJ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VEFfQ09VTlRFUikgKi8KIAllbHNlIHsKIAkJcHJpbnRrKCIgSW52YWxpZCBzdWJkZXZpY2UuIik7Ci0JfQkJCS8vIGVsc2UgaWYgIChkYXRhWzBdPT1BRERJREFUQV9XQVRDSERPRykKKwl9CQkJLyogIGVsc2UgaWYgIChkYXRhWzBdPT1BRERJREFUQV9XQVRDSERPRykgKi8KIAogCXJldHVybiBpbnNuLT5uOwogfQpAQCAtNzAxLDcgKzcwMyw3IEBACiB8IFRhc2sgICAgICAgICAgICAgIDogU3RhcnQgLyBTdG9wIFRoZSBTZWxlY3RlZCBUaW1lciAsIENvdW50ZXIgb3IgV2F0Y2hkb2cgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVJTlQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycyBhcyBiZWxvdyB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgZGF0YVswXSAgICAgICAgICAgIDogMCBUaW1lciAgICAgICAgICAgICAgICAgICB8CkBAIC03MTgsMjIgKzcyMCwyMiBAQAogfAkJCSAgICA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lzdGVyIC0KIAkJCQkJMSkgKiAweDIwKSArIEFQQ0kxNTY0X1RDV19QUk9HKTsKLQl9CQkJLy8gaWYgKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlPT1BRERJREFUQV9DT1VOVEVSKQorCX0JCQkvKiAgaWYgKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlPT1BRERJREFUQV9DT1VOVEVSKSAqLwogCXJldHVybiBpbnNuLT5uOwogfQogCkBAIC04MDEsNyArODAzLDcgQEAKIHwgVGFzayAgICAgICAgICAgICAgOiBSZWFkIFRoZSBTZWxlY3RlZCBUaW1lciAsIENvdW50ZXIgb3IgV2F0Y2hkb2cgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUlOVCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogCkBAIC04MTMsMTMgKzgxNSwxMyBAQAogfAkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI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dpc3RlciAtCiAJCQkJCTEpICogMHgyMCkgKwpAQCAtODUwLDI4ICs4NTIsMjggQEAKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogR2V0IHRoZSBzb2Z0d2FyZSB0cmlnZ2VyIHN0YXR1cyAqLwogICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQlkYXRhWzFdID0gKEJZVEUpICgodWxfQ29tbWFuZDEgPj4gMSkgJiAxKTsKKwkJZGF0YVsxXSA9ICh1bnNpZ25lZCBjaGFyKSAoKHVsX0NvbW1hbmQxID4+IDEpICYgMSk7CiAKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogR2V0IHRoZSBoYXJkd2FyZSB0cmlnZ2VyIHN0YXR1cyAqLwogICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQlkYXRhWzJdID0gKEJZVEUpICgodWxfQ29tbWFuZDEgPj4gMikgJiAxKTsKKwkJZGF0YVsyXSA9ICh1bnNpZ25lZCBjaGFyKSAoKHVsX0NvbW1hbmQxID4+IDIpICYgMSk7CiAKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgc29mdHdhcmUgY2xlYXIgc3RhdHVzICovCiAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQlkYXRhWzNdID0gKEJZVEUpICgodWxfQ29tbWFuZDEgPj4gMykgJiAxKTsKKwkJZGF0YVszXSA9ICh1bnNpZ25lZCBjaGFyKSAoKHVsX0NvbW1hbmQxID4+IDMpICYgMSk7CiAKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgb3ZlcmZsb3cgc3RhdHVzICovCiAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQlkYXRhWzRdID0gKEJZV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UlJVUFRfRElTQUJMRSAgIDB4RkZGRkZGRkIKIAotLy9EaWdpdGFsIE91dHB1dCBJbnRlcnJ1cHQgRW5hYmxlIERpc2FibGUuCisvKiBEaWdpdGFsIE91dHB1dCBJbnRlcnJ1cHQgRW5hYmxlIERpc2FibGUuICovCiAjZGVmaW5lIEFQQ0kxNTY0X0RJR0lUQUxfT1BfVkNDX0lOVEVSUlVQVF9FTkFCTEUgICAweDEKICNkZWZpbmUgQVBDSTE1NjRfRElHSVRBTF9PUF9WQ0NfSU5URVJSVVBUX0RJU0FCTEUgIDB4RkZGRkZGRkUKICNkZWZpbmUgQVBDSTE1NjRfRElHSVRBTF9PUF9DQ19JTlRFUlJVUFRfRU5BQkxFICAgIDB4MgogI2RlZmluZSBBUENJMTU2NF9ESUdJVEFMX09QX0NDX0lOVEVSUlVQVF9ESVNBQkxFICAgMHhGRkZGRkZGRAogCi0vL0FERElEQVRBIEVuYWJsZSBEaXNhYmxlCisvKiBBRERJREFUQSBFbmFibGUgRGlzYWJsZSAqLwogCiAjZGVmaW5lIEFERElEQVRBX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCiAjZGVmaW5lIEFERElEQVRBX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAwCiAKLS8vIFRJTUVSIENPVU5URVIgV0FUQ0hET0cgREVGSU5FUworLyogVElNRVIgQ09VTlRFUiBXQVRDSERPRyBERUZJTkVTICovCiAKICNkZWZpbmUgQURESURBVEFfVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKICNkZWZpbmUgQURESURBVEFfQ09VTlRFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKQEAgLTc4LDMwICs3OCwzMiBAQAogI2RlZmluZSBBUENJMTU2NF9UQ1dfV0FSTl9USU1FVkFMICAgICAgICAgICAgICAgICAgMjQKICNkZWZpbmUgQVBDSTE1NjRfVENXX1dBUk5fVElNRUJBU0UgICAgICAgICAgICAgICAgIDI4CiAKL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b2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgogCkBAIC01Nyw3ICs1Nyw3IEBACiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBJTlQgICBpX0FQQ0kxNlhYX0luc25Db25maWdJbml0VFRMSU8gICAgICAgICAgICAgICAgICAgfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IGludCAgIGlfQVBDSTE2WFhfSW5zbkNvbmZpZ0luaXRUVExJTyAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RydWN0IGNvbWVkaV9kZXZpY2UgICAgKmRldiwgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICAgICAgKmluc24sICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC02OSwxMSArNjksMTEgQEAKIHwgICAgICAgICAgICAgICAgZm9yIHlvdSBjYWxsIGFueSBvdGhlciBmdW5jdGlvbiB3aXRjaCBhY2Nlc3Mgb2YgVFRMLiAgICAgICAgfAogfCAgICAgICAgICAgICAgICBBUENJMTZYWF9UVExfSU5JVERJUkVDVElPTih1c2VyIGlucHV0cyBmb3IgZGlyZWN0aW9uKSAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBiX0luaXRUeXBlICAgID0gKEJZVEUpIGRhdGFbMF07ICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGJfUG9ydDBNb2RlICAgPSAoQllURSkgZGF0YVsxXTsgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgYl9Qb3J0MU1vZGUgICA9IChCWVRFKSBkYXRhWzJdOyAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBiX1BvcnQyTW9kZSAgID0gKEJZVEUpIGRhdGFbM107ICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGJfUG9ydDNNb2RlICAgPSAoQllURSkgZGF0YVs0XTsgICAgICAgICAgICAgICAgICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogYl9Jbml0VHlwZSAgICA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzBdOyAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICBiX1BvcnQwTW9kZSAgID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMV07ICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIGJfUG9ydDFNb2RlICAgPSAodW5zaWduZWQgY2hhcikgZGF0YVsyXTsgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgYl9Qb3J0Mk1vZGUgICA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzNdOyAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICBiX1BvcnQzTW9kZSAgID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbNF07ICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgIC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W5zbi0+bikgIT0gMikpIHsKIAkJIC8qKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIERhdGEgc2l6ZSBlcnJvciAqLwogCQkgLyoqKioqKioqKioqKioqKioqKiovCkBAIC0xODIsOCArMTgyLDggQEAKIAkJIC8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlwcmludGsoIlxuUG9ydCAlZCBkaXJlY3Rpb24gc2VsZWN0aW9uIGVycm9yIiwKLQkJCQkJKElOVCkgYl9DcHQpOwotCQkJCWlfUmV0dXJuVmFsdWUgPSAtKElOVCkgYl9DcHQ7CisJCQkJCShpbnQpIGJfQ3B0KTsKKwkJCQlpX1JldHVyblZhbHVlID0gLShpbnQpIGJfQ3B0OwogCQkJfQogCiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjM5LDcgKzIzOSw3IEBACiAJCX0KIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgpAQCAtMjUwLDcgKzI1MCw3IEBACiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBJTlQgICAgIGlfQVBDSTE2WFhfSW5zbkJpdHNSZWFkVFRMSU8gICAgICAgICAgICAgICAgICAgfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IGludCAgICAgaV9BUENJMTZYWF9JbnNuQml0c1JlYWRUVExJTyAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RydWN0IGNvbWVkaV9kZXZpY2UgICAgKmRldiwgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICAgICAgKmluc24sICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC0yNjYsMTEgKzI2NiwxMSBAQAogfCAgICAgICAgICAgICAgQVBDSTE2WFhfVFRMX1JFQURDSEFOTkVMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICBiX1NlbGVjdGVkUG9ydD0gQ1JfUkFOR0UoaW5zbi0+Y2hhbnNwZWMpOyAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgIGJfSW5wdXRDaGFubmVsPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgYl9SZWFkVHlwZQkgID0gKEJZVEUpIGRhdGFbMF07ICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICBiX1JlYWRUeXBlCSAgPSAodW5zaWduZWQgY2hhcikgZGF0YVswXTsgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgQVBDSTE2WFhfVFRMX1JFQURQT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICBiX1NlbGVjdGVkUG9ydD0gQ1JfUkFOR0UoaW5zbi0+Y2hhbnNwZWMpOyAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgIGJfUmVhZFR5cGUJICA9IChCWVRFKSBkYXRhWzBdOyAgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgYl9SZWFkVHlwZQkgID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1cyA9ICh1bnNpZ25lZCBjaGFyICopICZkYXRhWzBdOwogCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgZGlnaXRhbCBpbnB1IHN0YXR1cyAqLwpAQCAtMzk0LDcgKzM5NCw3IEBACiAJCS8qIFNhdmUgdGhlIHBvcnQgdmFsdWUgKi8KIAkgICAvKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQkJKnBiX1N0YXR1cyA9IChCWVRFKSBkd19TdGF0dXM7CisJCSpwYl9TdGF0dXMgPSAodW5zaWduZWQgY2hhcikgZHdfU3RhdHVzOwogCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogVGVzdCBpZiByZWFkIGNoYW5uZWwgc3RhdHVzIGNvbW1hbmQgKi8KQEAgLTQwNSwxMiArNDA1LDEyIEBACiAJCX0KIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uIE5hbWUgICAgIDogSU5UIGlfQVBDSTE2WFhfSW5zblJlYWRUVExJT0FsbFBvcnRWYWx1ZSAgICAgICAgICAgICAgIHwKK3wgRnVuY3Rpb24gTmFtZSAgICAgOiBpbnQgaV9BUENJMTZYWF9JbnNuUmVhZFRUTElPQWxsUG9ydFZhbHVlICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICAgICpkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgICAgICAgICAg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IHwgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gICAgICAqaW5zbiwgICAgICAgICAgICAgICAgICAgICAgICAgIHwKQEAgLTU1MSwxMSArNTUxLDExIEBACiB8ICAgICAgICAgICAgICBBUENJMTZYWF9UVExfV1JJVEVDSEFOTkVMX09OIHwgQVBDSTE2WFhfVFRMX1dSSVRFQ0hBTk5FTF9PRkYgIHwKIHwgICAgICAgICAgICAgICAgICAgIGJfU2VsZWN0ZWRQb3J0ID0gQ1JfUkFOR0UoaW5zbi0+Y2hhbnNwZWMpOyAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgYl9PdXRwdXRDaGFubmVsPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICBiX0NvbW1hbmQgICAgICA9IChCWVRFKSBkYXRhWzBdOyAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgIGJfQ29tbWFuZCAgICAgID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMF07ICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICBBUENJMTZYWF9UVExfV1JJVEVQT1JUX09OIHwgQVBDSTE2WFhfVFRMX1dSSVRFUE9SVF9PRkYgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgIGJfU2VsZWN0ZWRQb3J0ID0gQ1JfUkFOR0UoaW5zbi0+Y2hhbnNwZWMpOyAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgYl9Db21tYW5kICAgICAgPSA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pbnMgICAgICAgICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJICBkYXRhWzBdICAgICAgICAgICAgOiAxIERpZ2l0YWwgTWVtb3J5IE9uICAgICAgICAgICAgICAgfApAQCAtNzUsMjAgKzc1LDIwIEBACiB8CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwotaW50IGlfQVBDSTIwMTZfQ29uZmlnRGlnaXRhbE91dHB1dChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJMjAxNl9Db25maWdEaWdpdGFsT3V0cHV0KHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewogCWlmICgoZGF0YVswXSAhPSAwKSAmJiAoZGF0YVswXSAhPSAxKSkgewogCQljb21lZGlfZXJyb3IoZGV2LAogCQkJIk5vdCBhIHZhbGlkIERhdGE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JbnRlcnJ1cHREYXRhLCB1aV9UeXBlOwordW5zaWduZWQgaW50IHVpX0ludGVycnVwdERhdGEsIHVpX1R5cGU7CiAvKgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IEZ1bmN0aW9uICAgTmFtZSAgIDogaW50IGlfQVBDSTIwMzJfQ29uZmlnRGlnaXRhbE91dHB1dCAgICAgICAgICAgICAgICAgICAgIHwKQEAgLTYzLDcgKzYzLDcgQEAKIHwgVGFzayAgICAgICAgICAgICAgOiBDb25maWd1cmVzIFRoZSBEaWdpdGFsIE91dHB1dCBTdWJkZXZpY2UuICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUlOVCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJICBkYXRhWzFdICAgICAgICAgICAgOiAxIEVuYWJsZSA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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogQ29uZmlndXJlcyBUaGUgV2F0Y2hkb2cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgIDpwb2ludGVyIHRvIHN1YmRldmljZSBzdHJ1Y3R1cmUKLSAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgOnBvaW50ZXIgdG8gaW5zbiBzdHJ1Y3R1cmUgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBPdXRwdXQgUGFyYW1ldGVycyA6CS0tCQkJCQkJCQkJCQkJCSB8CkBAIC0zODAsMTUgKzM4MC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ICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZXMgVGhlIERpZ2l0YWwgT3V0cHV0IFN1YmRldmljZS4gICAgICAgICAgICAgICB8CkBAIC0xNTYsNyArMTU2LDcgQEAKIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAogfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi0gICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJICBkYXRhWzBdICA6MTpNZW1vcnkgb24gICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgICAgICAgICAgIDA6TWVtb3J5IG9mZiAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8CQkJCQkJCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfApAQCAtMTY5LDggKzE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ZXZpY2UgKmRldixzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcyxzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSkgCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEpIAkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgICAgIDogUmVhZCAgdmFsdWUgIG9mIHRoZSBzZWxlY3RlZCBjaGFubmVsIG9yIHBvcnQgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgIDpwb2ludGVyIHRvIHN1YmRldmljZSBzdHJ1Y3R1cmUKLSAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGE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IGludCBpX0FQQ0kyMjAwX0NvbmZpZ1dhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0gICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkgIHwKK3wgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLHVuc2lnbmVkIGludCAqZGF0YSkgIHwKIHwJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgICAgOiBDb25maWd1cmVzIFRoZSBXYXRjaGRvZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogICBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ICAgICAgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgOnBvaW50ZXIgdG8gc3ViZGV2aWNlIHN0cnVjdHVyZQotICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAorfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29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0YWxPdXRwdXRSZWdpc3Rlcj0wOyAqLwogCi0JLy9DT01NRU5UIEpLIDA3LjA1LjA0OiBGb2xsb3dpbmdzIGNhbGxzIGFyZSBpbiBpX0FQQ0kzMTIwX1N0YXJ0QW5hbG9nSW5wdXRBY3F1aXNpdGlvbgorCS8qIENPTU1FTlQgSksgMDcuMDUuMDQ6IEZvbGxvd2luZ3MgY2FsbHMgYXJlIGluIGlfQVBDSTMxMjBfU3RhcnRBbmFsb2dJbnB1dEFjcXVpc2l0aW9uICovCiAKLSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIENsZWFyIFRpbWVyIFdyaXRlIFRDIElOVCAqLwotICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJLyogQ2xlYXIgVGltZXIgV3JpdGUgVEMgaW50ICovCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0bChBUENJMzEyMF9DTEVBUl9XUklURV9UQ19JTlQsCiAJCWRldnByaXYtPmlfSW9iYXNlQW1jYyArIEFQQ0kzMTIwX0FNQ0NfT1BfUkVHX0lOVENTUik7CiAKLSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBDbGVhcnMgdGhlIHRpbWVyIHN0YXR1cyByZWdpc3RlciAqLwotICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvL0JFR0lOIEpLIDA3LjA1LjA0OiBDb21wYXJpc29uIGJldHdlZW4gV0lOMzIgYW5kIExpbnV4IGRyaXZlcgotCS8vaW53KGRldi0+aW9iYXNlK0FQQ0kzMTIwX1RJTUVSX1NUQVRVU19SRUdJU1RFUik7Ci0JaW5iKGRldi0+aW9iYXNlICsgQVBDSTMxMjBfVElNRVJfU1RBVFVTX1JFR0lTVEVSKTsKLQkvL0VORCBKSyAwNy4wNS4wNDogQ29tcGFyaXNvbiBiZXR3ZWVuIFdJTjMyIGFuZCBMaW51eCBkcml2ZXIKKwkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0gICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJLyogQkVHSU4gSksgMDcuMDUuMDQ6IENvbXBhcmlzb24gYmV0d2VlbiBXSU4zMiBhbmQgTGludXggZHJpdmVyICovCisJLyogaW53KGRldi0+aW9iYXNlK0FQQ0kzMTIwX1RJTUVSX1NUQVRVU19SRUdJU1RFUik7ICovCisJLyogaW5iKGRldi0+aW9iYXNlICsgQVBDSTMxMjBfVElNRVJfU1RBVFVTX1JFR0lTVEVSKTsgKi8KKwkvKiBFTkQgSksgMDcuMDUuMDQ6IENvbXBhcmlzb24gYmV0d2VlbiBXSU4zMiBhbmQgTGludXggZHJpdmVyICovCisKKwkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogRGlzYWJsZXMgQWxsIFRpbWVyICAgICAqLwogCS8qIFNldHMgUFIgYW5kIFBBIHRvIDAgICAgKi8KLSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJZGV2cHJpdi0+dXNfT3V0cHV0UmVnaXN0ZXIgPSBkZXZwcml2LT51c19PdXRwdXRSZWdpc3RlciAmCiAJCUFQQ0kzMTIwX0RJU0FCTEVfVElNRVIwICYKIAkJQVBDSTMxMjBfRElTQUJMRV9USU1FUjEgJiBBUENJMzEyMF9DTEVBUl9QQV9QUjsKIAogCW91dHcoZGV2cHJpdi0+dXNfT3V0cHV0UmVnaXN0ZXIsIGRldi0+aW9iYXNlICsgQVBDSTMxMjBfV1JfQUREUkVTUyk7CiAKLSAgIC8qKioqKioqKioqKioqKioqKioqLworCS8qKioqKioqKioqKioqKioqKioqLwogCS8qIFJlc2V0cyB0aGUgRklGTyAqLwotICAgLyoqKioqKioqKioqKioqKioqK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GVzIHRvIGJlIHRyYW5zZmVyZWQgc2V0IHRyYW5zZmVyIGNvdW50IHVzZWQgQURET04KKyAqIE1XVEMgcmVnaXN0ZXIgY29tbWVudGVkIHRlc3RpbmcKKyAqIG91dGwoZGV2cHJpdi0+dWlfRG1hQnVmZmVyVXNlc2l6ZVswXSwKKyAqIGRldnByaXYtPmlfSW9iYXNlQWRkb24rQU1DQ19PUF9SRUdfQU1XVEMpOworICovCiAKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBOYnIgb2YgYWNxdWlzaXRpb24gTE9XICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJb3V0dyhBUENJMzEyMF9BRERfT05fTVdUQ19MT1csIGRldnByaXYtPmlfSW9iYXNlQWRkb24gKyAwKTsKIAkJb3V0dygoZGV2cHJpdi0+dWlfRG1hQnVmZmVyVXNlc2l6ZVswXSAmIDB4RkZGRiksCiAJCQlkZXZwcml2LT5pX0lvYmFzZUFkZG9uICsgMik7CiAKLQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIE5iciBvZiBhY3F1aXNpdGlvbiBISUdIICovCi0JCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXR3KEFQQ0kzMTIwX0FERF9PTl9NV1RDX0hJR0gsIGRldnByaXYtPmlfSW9iYXNlQWRkb24gKyAwKTsKIAkJb3V0dygoZGV2cHJpdi0+dWlfRG1hQnVmZmVyVXNlc2l6ZVswXSAvIDY1NTM2KSwKIAkJCWRldnByaXYtPmlfSW9iYXNlQWRkb24gKyAyKTsKIAotCQkvLzUKLQkJLy8gVG8gY29uZmlndXJlIEEyUCBGSUZPCi0JCS8vIHRlc3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yCi0JCS8vb3V0dygzLGRldnByaXYtPmlfSW9iYXNlQWRkb24gKyA0KTsKLQkJLy9FTkQgSksgMDcuMDUuMDQ6IENvbXBhcmlzb24gYmV0d2VlbiBXSU4zMiBhbmQgTGludXggZHJpdmVyCisvKgorICogNgorICogRU5BQkxFIEEyUCBGSUZPIFdSSVRFIEFORCBFTkFCTEUgQU1XRU4gQU1XRU5fRU5BQkxFIHwKKyAqIEEyUF9GSUZPX1dSSVRFX0VOQUJMRSAoMHgwMXwweDAyKT0weDAzCisgKi8KIAotCQkvLzcKLQkJLy9pbml0aWFsaXNlIGVuZCBvZiBkbWEgaW50ZXJydXB0ICBBSU5UX1dSSVRFX0NPTVBMID0gRU5BQkxFX1dSSVRFX1RDX0lOVChBRERJKQorCQkvKiBCRUdJTiBKSyAwNy4wNS4wNDogQ29tcGFyaXNvbiBiZXR3ZWVuIFdJTjMyIGFuZCBMaW51eCBkcml2ZXIgKi8KKwkJLyogb3V0dygzLGRldnByaXYtPmlfSW9iYXNlQWRkb24gKyA0KTsgKi8KKwkJLyogRU5EIEpLIDA3LjA1LjA0OiBDb21wYXJpc29uIGJldHdlZW4gV0lOMzIgYW5kIExpbnV4IGRyaXZlciAqLworCisvKgorICogNworICogaW5pdGlhbGlzZSBlbmQgb2YgZG1hIGludGVycnVwdCBBSU5UX1dSSVRFX0NPTVBMID0KKyAqIEVOQUJMRV9XUklURV9UQ19JTlQoQURESSkKKyAqLwogCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBBMlAgRklGTyBDT05GSUdVUkFURSwgRU5EIE9GIERNQSBJTlRFUlJVUFQgSU5JVCAqLworCQkvKiBBMlAgRklGTyBDT05GSUdVUkFURSwgRU5EIE9GIERNQSBpbnRFUlJVUFQgSU5JVCAqLwogCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRsKChBUENJMzEyMF9GSU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mljZSAqcwkJCQkJCQkJCSB8CiB8ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhIAkJCQkJCQkJCQkgfAotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgIFZhbHVlIHRvIGJlIHdyaXR0ZW4KLSAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgIDoxIFNldCBkaWdpdGFsIG8vcCBPTgotICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgIDIgU2V0IGRpZ2l0YWwgby9wIE9GRiB3aXRoIG1lbW9yeSBPTgorfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICBWYWx1ZSB0byBiZSB3cml0dGVuCit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgOjEgU2V0IGRpZ2l0YWwgby9wIE9OCit8ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgIDIgU2V0IGRpZ2l0YWwgby9wIE9GRiB3aXRoIG1lbW9yeSBPTgogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFJldHVybiBWYWx1ZSAgICAgIDogICAgICAgICAgICAgIAkJCQkJICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgIAkJCQkJCQkJCQkJCQkgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotaW50IGlfQVBDSTMxMjBfSW5zbkJpdHNEaWdpdGFsT3V0cHV0KHN0cnVjdCBjb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ElNRVJfU1RBVFVTX1JFR0lTVEVSICAgICAgICAgICAgMHgwRAkvL0FERFJFU1MgZm9yIGRlbGV0ZSB0aW1lciAyIGludGVycnVwdAotI2RlZmluZSBBUENJMzEyMF9SRF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAweDAyCS8vQUREUkVTUwotI2RlZmluZSBBUENJMzEyMF9XUl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAweDAwCS8vQUREUkVTUwotI2RlZmluZSBBUENJMzEyMF9FTkFCTEVfV0FUQ0hET0cgICAgICAgICAgICAgICAgICAweDIwCS8vJCRCSVQgaW4gbldyTW9kZV9TZWxlY3QKKyNkZWZpbmUgQVBDSTMxMjBfVElNRVJfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgMHgwNAkvKiBBRERSRVNTIGZvciBuQ3NUaW1lcldlcnQgKi8KKyNkZWZpbmUgQVBDSTMxMjBfVElNRVJfU1RBVFVTX1JFR0lTVEVSICAgICAgICAgICAgMHgwRAkvKiBBRERSRVNTIGZvciBkZWxldGUgdGltZXIgMiBpbnRlcnJ1cHQgKi8KKyNkZWZpbmUgQVBDSTMxMjBfUkRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgkvKiBBRERSRVNTICovCisjZGVmaW5lIEFQQ0kzMTIwX1dSX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDB4MDAJLyogQUREUkVTUyAqLworI2RlZmluZSBBUENJMzEyMF9FTkFCTEVfV0FUQ0hET0cgICAgICAgICAgICAgICAgICAweDIwCS8qICQkQklUIGluIG5Xck1vZGVfU2VsZWN0ICovCiAjZGVmaW5lIEFQQ0kzMTIwX0RJU0FCTEVfV0FUQ0hET0cgICAgICAgICAgICAgICAgICh+QVBDSTMxMjBfRU5BQkxFX1dBVENIRE9HKQotI2RlZmluZSBBUENJMzEyMF9FTkFCTEVfVElNRVJfQ09VTlRFUiAgICAJCSAgMHgxMAkvLyQkQklUIGluIG5Xck1vZGVfU2V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wMCAvIEFQQ0ktMzMwMCBSZWFkaW5nIG9mIEVFUFJPTSB2YWx1ZXMgKi8KIAogLyorLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsqLwotLyp8IEZ1bmN0aW9uICAgTmFtZSAgIDogSU5UIGlfQWRkaUhlYWRlclJXX1JlYWRFZXByb20gICAgICAgICAgICAgICAgICAgICAgICAgIHwqLwotLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChJTlQgICAgaV9OYk9mV29yZHNUb1JlYWQsICAgICAgICAgICAgICAgICAgIHwqLwotLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEV09SRCBkd19QQ0lCb2FyZEVlcHJvbUFkZHJlc3MsICAgICAgICAgICAgIHwqLwotLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXT1JEICAgd19FZXByb21TdGFydEFkZHJlc3MsICAgICAgICAgICAgICAgIHwqLwotLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQV09SRCBwd19EYXRhUmVhZCkgICAgICAgICAgICAgICAgICAgICAgICAgIHwqLworLyp8IEZ1bmN0aW9uICAgTmFtZSAgIDogaW50IGlfQWRkaUhlYWRlclJXX1JlYWRFZXByb20gICAgICAgICAgICAgICAgICAgICAgICAgIHwqLworLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQgICAgaV9OYk9mV29yZHNUb1JlYWQsICAgICAgICAgICAgICAgICAgIHwqLworLyp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgZHdfUENJQm9hcmRFZXByb21BZGRyZXNzLCAgICAgICAgICAgICB8Ki8KKy8qfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgICB3X0VlcHJvbVN0YXJ0QWRkcmVzcywgICA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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICAgfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgICAgICAgICAgICAgVUlOVCB1aV9Ob09mQ2hhbm5lbHMgICAgOiBObyBPZiBDaGFubmVscyBUbyByZWFkICAgICAgIHwKLSAgfCAgICAgICAgICAgICAgICAgICAgIFVJTlQgKmRhdGEgICAgICAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICB8CisgIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgdWlfTm9PZkNoYW5uZWxzICAgIDogTm8gT2YgQ2hhbm5lbHMgVG8gcmVhZCAgICAgICB8CisgIHwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICB8CiAgIGRhdGFbMF0gICAgICAgICAgICAgICAgIDowIHJlYWQgc2luZ2xlIGNoYW5uZWwKICAgMSByZWFkIHBvcnQgdmFsdWUKICAgZGF0YVsxXSAgICAgICAgICAgICAgICAgIHBvcnQgbm8KQEAgLTc2NiwyMyArNzU5LDIzIEBACiAgIHwJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KLUlOVCBpX0FQQ0kzMjAwX1JlYWREaWdpdGFsT3V0cHV0KHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1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gdWlfTm9PZkNoYW5uZWwgICAgOiBDaGFubmVsIE5vIHRvIHJlYWQgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgICAgICAgICAgICBVSU5UICpkYXRhICAgICAgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgfAorICB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IHVpX05vT2ZDaGFubmVsICAgIDogQ2hhbm5lbCBObyB0byByZWFkICAgICAgICAgICAgfAorICB8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgfAogICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICAgfCBPdXRwdXQgUGFyYW1ldGVycyA6CS0tCQkJCQkJCQkJCQkJCSB8CiAgIHwJCQkgICAgICAgICAgZGF0YVswXSAgOiBEaWdpdGFsIFZhbHVlIHJlYWQgICAgICAgICAgICAgICAgICAgfApAQCAtMTY1MSw0OSArMTY0NCw0OSBAQAogICB8CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICovCi1JTlQgaV9BUENJMzIwMF9SZWFkMUFuYWxvZ0lucHV0Q2hhbm5lbChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsIHN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJMzIwMF9SZWFkMUFuY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GUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOyAqLwogCXdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKwogCQkJCQkxMikgPj4gMTkpICYgMSkgIT0gMSkgOwogCi0JLy9vdXRsKGlfQURESURBVEFDb252ZXJzaW9uVGltZSAsIGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDMyKTsKKwkvKiBvdXRsKGlfQURESURBVEFDb252ZXJzaW9uVGltZSAsIGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDMyKTsgKi8KIAlvdXRsKHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX0FERElEQVRBQ29udmVyc2lvblRpbWUsCiAJCWRldnByaXYtPmlvYmFzZSArIHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX09mZnNldCArIDMyKTsKIApAQCAtMTcwNywzNiArMTcwMCwzNiBAQAogCS8qVGVzdCBpZiB0aGUgaW50ZXJydXB0IGlzIGVuYWJsZSAqLwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0JLy9pZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkKKwkvKiBpZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkgKi8KIAlpZiAoc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfSW50ZXJydXB0RmxhZyA9PSBBRERJREFUQV9FTkFCTEUpIHsKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEVuYWJsZSB0aGUgaW50ZXJydXB0ICovCiAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCQl1aV9Db21tYW5kUmVnaXN0ZXIgPSB1aV9Db21tYW5kUmVnaXN0ZXIgfCAweDAwMTAwMDAwOwotCX0JCQkvL2lmIChpX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRU5BQkxFKQorCX0JCQkvKiBpZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkgKi8KIAogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFdyaXRlIHRoZSBjb21tYW5kIHJlZ2lzdGVyICovCiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLy93aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0KzEyKT4+MTkpICYgMSkgIT0gMSk7CisJLyogd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOyAqLwogCXdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKwogCQkJCQkxMikgPj4gMTkpICYgMSkgIT0gMSkgOwogCi0JLy9vdXRsKHVpX0NvbW1hbmRSZWdpc3RlciwgZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0ICsgOCk7CisJLyogb3V0bCh1aV9Db21tYW5kUmVnaXN0ZXIsIGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDgpOyAqLwogCW91dGwodWlfQ29tbWFuZFJlZ2lzdGVyLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKyA4KTsKIAogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLypUZXN0IGlmIGludGVycnVwdCBpcyBlbmFibGUgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vaWYgKGlfSW50ZXJydXB0RmxhZyA9PSBBRERJREFUQV9ESVNBQkxFKQorCS8qIGlmIChpX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRElTQUJMRSkgKi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ArIHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX09mZnNldCArIDM2KTsKICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNldCB0aGUgY29udmVydCB0aW1pbmcgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOworCS8qIHdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQrMTIpPj4xOSkgJiAxKSAhPSAxKTsgKi8KIAl3aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsKIAkJCQkJMTIpID4+IDE5KSAmIDEpICE9IDEpIDsKLQkvL291dGwoaV9BRERJREFUQUNvbnZlcnNpb25UaW1lICwgZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0ICsgMzIpOworCS8qIG91dGwoaV9BRERJREFUQUNvbnZlcnNpb25UaW1lICwgZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0ICsgMzIpOyAqLwogCW91dGwoc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfQURESURBVEFDb252ZXJzaW9uVGltZSwKIAkJZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsgMzIpOwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKkNvbmZpZ3VyZSB0aGUgR2FpbiBDb252ZXJzaW9uICovCiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOworCS8qIHdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQrMTIp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aW9iYXNlK2lfT2Zmc2V0ICsgNCk7CisJLyogb3V0bCggMHgwMDAwMDQwMCAsIGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDQpOyAqLwogCW91dGwoMHgwMDAwMDQwMCwKIAkJZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsgNCk7CiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjA5Miw3ICsyMDg1LDcgQEAKICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKlRlc3QgaWYgdGhlIGludGVycnVwdCBpcyBlbmFibGUgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvL2lmIChpX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRU5BQkxFKQorCS8qIGlmIChpX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRU5BQkxFKSAqLwogCWlmIChzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkgewogICAgICAgLyoqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qRW5hYmxlIHRoZSBpbnRlcnJ1cHQgKi8KQEAgLTIxMDksMTAgKzIxMDIsMTAgQEAKICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKldyaXRlIHRoZSBjb21tYW5kIHJlZ2l0ZXIgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvL3doaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQrMTIpPj4xOSkgJiAxKSAhPSAxKTsKKwkvKiB3aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0KzEyKT4+MTkpICYgMSkgIT0gMSk7ICovCiAJd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZSArIHNfQm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ub3JdLmlfT2Zmc2V0ICsgNCk7CiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLypDb25maWd1cmUgdGhlIE9mZnNldCBDb252ZXJzaW9uICovCiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLy93aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0KzEyKT4+MTkpICYgMSkgIT0gMSk7CisJLyogd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOyAqLwogCXdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKwogCQkJCQkxMikgPj4gMTkpICYgMSkgIT0gMSkgOwotCS8vb3V0bCgweDAwMDIwMDAwLCBkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQgKyAxMik7CisJLyogb3V0bCgweDAwMDIwMDAwLCBkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQgKyAxMik7ICovCiAJb3V0bCgweDAwMDIwMDAwLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKyAxMik7CiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjIxOCw3ICsyMjExLDcgQEAKIAkvKlRlc3QgaWYgdGhlIGludGVycnVwdCBpcyBlbmFibGUgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotCS8vaWYgKGlfSW50ZXJydXB0RmxhZyA9PSBBRERJREFUQV9FTkFCTEUpCisJLyogaWYgKGlfSW50ZXJydXB0RmxhZyA9PSBBRERJREFUQV9FTkFCTEUpICovCiAJaWYgKHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRU5BQkxFKSB7CiAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLypFbmFibGUgdGhlIGludGVycnVwdCAqLwpAQCAtMjIzNCwxOSArMjIyNywxOSBAQAogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qV3JpdGUgdGhlIGNvbW1hbmQgcmVnaXRlciAqLwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOworCS8qIHdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQrMTIpPj4xOSkgJiAxKSAhPSAxKTsgKi8KIAl3aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsKIAkJCQkJMTIpID4+IDE5KSAmIDEpICE9IDEpIDsKLQkvL291dGwodWlfQ29tbWFuZFJlZ2lzdGVyLGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDgpOworCS8qIG91dGwodWlfQ29tbWFuZFJlZ2lzdGVyLGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDgpOyAqLwogCW91dGwodWlfQ29tbWFuZFJlZ2lzdGVyLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKyA4KTsKLQkvL2lmIChpX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRElTQUJMRSkKKwkvKiBpZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0RJU0FCTEUpICovCiAJaWYgKHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX0ludGVycnVwdEZsYWcgPT0gQURESURBVEFfRElTQUJMRSkgewogCQlkbyB7CiAJICAvKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qUmVhZCB0aGUgRU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QURESURBVEFDb252ZXJzaW9uVGltZVVuaXQsCiAJCWRldnByaXYtPmlvYmFzZSArIHNfQm9hcmRJbmZvc1tkZXYtPm1pbm9yXS5pX09mZnNldCArIDM2KTsKICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNldCB0aGUgY29udmVydCB0aW1pbmcgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOworCS8qIHdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQrMTIpPj4xOSkgJiAxKSAhPSAxKTsgKi8KIAl3aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsKIAkJCQkJMTIpID4+IDE5KSAmIDEpICE9IDEpIDsKLQkvL291dGwoaV9BRERJREFUQUNvbnZlcnNpb25UaW1lICwgZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0ICsgMzIpOworCS8qIG91dGwoaV9BRERJREFUQUNvbnZlcnNpb25UaW1lICwgZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0ICsgMzIpOyAqLwogCW91dGwoc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfQURESURBVEFDb252ZXJzaW9uVGltZSwKIAkJZGV2cHJpdi0+aW9iYXNlICsgc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsgMzIpOwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qQ29uZmlndXJlIHRoZSBDSkMgQ29udmVyc2lvbiAqLwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOworCS8qIHdo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QlkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKyAxMik7CiAKQEAgLTIzMzEsNyArMjMyNCw3IEBACiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLypUZXN0IGlmIHRoZSBpbnRlcnJ1cHQgaXMgZW5hYmxlICovCiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLy9pZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkKKwkvKiBpZiAoaV9JbnRlcnJ1cHRGbGFnID09IEFERElEQVRBX0VOQUJMRSkgKi8KIAlpZiAoc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfSW50ZXJydXB0RmxhZyA9PSBBRERJREFUQV9FTkFCTEUpIHsKICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCQkvKkVuYWJsZSB0aGUgaW50ZXJydXB0ICovCkBAIC0yMzQ1LDMwICsyMzM4LDMwIEBACiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLypXcml0ZSB0aGUgY29tbWFuZCByZWdpdGVyICovCiAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLy93aGlsZSAoKChpbmwoZGV2cHJpdi0+aW9iYXNlK2lfT2Zmc2V0KzEyKT4+MTkpICYgMSkgIT0gMSk7CisJLyogd2hpbGUgKCgoaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCsxMik+PjE5KSAmIDEpICE9IDEpOyAqLwogCXdoaWxlICgoKGlubChkZXZwcml2LT5pb2Jhc2UgKyBzX0JvYXJkSW5mb3NbZGV2LT5taW5vcl0uaV9PZmZzZXQgKwogCQkJCQkxMikgPj4gMTkpICYgMSkgIT0gMSkgOwotCS8vb3V0bCh1aV9Db21tYW5kUmVnaXN0ZXIgLGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDgpOworCS8qIG91dGwodW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AgICAgICAgcHJpbnRrKCJcbnVpX0RlbGF5VGltZT0ldVxuIix1aV9EZWxheVRpbWUpOwotCS8vICAgICAgICBwcmludGsoIlxudWlfRGVsYXlUaW1lQmFzZT0ldVxuIix1aV9EZWxheVRpbWVCYXNlKTsKKwl9CQkJLyogZWxzZSBpZihjbWQtPnNjYW5fYmVnaW5fc3JjPT1UUklHX0ZPTExPVykgKi8KKwkvKiAgICAgICAgIHByaW50aygiXG51aV9EZWxheVRpbWU9JXVcbiIsdWlfRGVsYXlUaW1lKTsgKi8KKwkvKiAgICAgICAgIHByaW50aygiXG51aV9EZWxheVRpbWVCYXNlPSV1XG4iLHVpX0RlbGF5VGltZUJhc2UpOyAqLwogCWlmIChjbWQtPmNvbnZlcnRfc3JjID09IFRSSUdfVElNRVIpIHsKIAkJdWlfQ29udmVydFRpbWUgPSBjbWQtPmNvbnZlcnRfYXJnICYgMHhGRkZGOwogCQl1aV9Db252ZXJ0VGltZUJhc2UgPSBjbWQtPmNvbnZlcnRfYXJnID4+IDE2OwpAQCAtMjg2OCwzNCArMjg2MSwzNCBAQAogCQl1aV9Db252ZXJ0VGltZUJhc2UgPSAwOwogCX0KIAotCS8vIGlmKGlfQURESURBVEFUeXBlID09MSB8fCAoKGlfQURESURBVEFUeXBlPT0yKSkpCi0JLy8gICB7CisJLyogIGlmKGlfQURESURBVEFUeXBlID09MSB8fCAoKGlfQURESURBVEFUeXBlPT0yKSkpICovCisJLyogICAgeyAqLwogICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLypSZWFkIHRoZSBvbGQgY29uZmlndXJhdGlvbiBvZiB0aGUgY3VycmVudCBzb3VyY2UgKi8KICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vdWlfQ29uZmlndXJhdGlvbiA9IGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQgKyAxMik7CisJLyogdWlfQ29u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AgICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKlJlYWQgdGhlIGNoYW5uZWwgbnVtYmVyICovCiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLy91aV9DaGFubmVsTnVtYmVyID0gaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDI0KTsKKwkJCQkvKiB1aV9DaGFubmVsTnVtYmVyID0gaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDI0KTsgKi8KIAogCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qUmVhZCB0aGUgZGlnaXRhbCBhbmFsb2cgaW5wdXQgdmFsdWUgKi8KIAkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkvL3VpX0RpZ2l0YWxJbnB1dCA9IGlubChkZXZwcml2LT5pb2Jhc2UraV9PZmZzZXQgKyAyOCk7CisJCQkJLyogdWlfRGlnaXRhbElucHV0ID0gaW5sKGRldnByaXYtPmlvYmFzZStpX09mZnNldCArIDI4KTsgKi8KIAkJCQl1aV9EaWdpdGFsSW5wdXQgPQogCQkJCQlpbmwoZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJc19Cb2FyZEluZm9zW2Rldi0+bWlub3JdLmlfT2Zmc2V0ICsgMjgpOwpAQCAtMzExNywxMyArMzExMCwxMyBAQAogCQkJCS8qIFRlc3QgaWYgdGhlIHZhbHVlIHJlYWQgaXMgdGhlIGNoYW5uZWwgdmFsdWUgKi8KIAkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJaWYgKGlfQ2FsaWJyYXRpb25GbGFnID09IDApIHsKLQkJCQkJLy91aV9JbnRlcnJ1cHRDaGFubmVsVmFsdWVbaV9Db3VudCArIDBdID0gdWlfRGlnaXRhbElucHV0OworCQkJCQkvKiB1aV9JbnRlcnJ1c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kJCQkvL0VuZCBKSyAyMi4xMC4yMDA0OiBBUENJLTMyMDAgLyBBUENJLTMzMDAgUmVhZGluZyBvZiBFRVBST00gdmFsdWVzCisJCQkJCS8qIEVuZCBKSyAyMi4xMC4yMDA0OiBBUENJLTMyMDAgLyBBUENJLTMzMDAgUmVhZGluZyBvZiBFRVBST00gdmFsdWVzICovCiAKIAkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKlN0YXJ0IHRoZSBjb252ZXJzaW9uIG9mIHRoZSBjYWxpYnJhdGlvbiBvZmZzZXQgdmFsdWUgKi8KIAkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlpX0FQQ0kzMjAwX1JlYWRDYWxpYnJhdGlvbk9mZnNldFZhbHVlCiAJCQkJCQkoZGV2LCAmdWlfRHVtbXlWYWx1ZSk7Ci0JCQkJfQkvL2lmIChpX0NhbGlicmF0aW9uRmxhZyA9PSAwKQorCQkJCX0JLyogaWYgKGlfQ2FsaWJyYXRpb25GbGFnID09IDApICovCiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCBpZiB0aGUgdmFsdWUgcmVhZCBpcyB0aGUgY2FsaWJyYXRpb24gb2Zmc2V0IHZhbHVlICovCiAJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0zMTQ5LDcgKzMxNDIsNyBAQAogCQkJCQkvKiBTYXZlIHRoZSB2YWx1ZSAqLwogCQkgIC8qKioqKioqKioqKioqKioqKiovCiAKLQkJCQkJLy91aV9JbnRlcnJ1cHRDaGFubmVsVmFsdWVbaV9Db3VudCArIDFdID0gdWlfRGlnaXRhbElucHV0OworCQkJCQkvKiB1aV9JbnRlcnJ1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WVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUlOVCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJICBkYXRhWzFdICAgICAgICAgICAgOiAxIEVuYWJsZSAgVkNDICBJbnRlcnJ1cHQgIHwKQEAgLTEyMSwyMSArMTIxLDIxIEBACiB8CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwotaW50IGlfQVBDSTM1MDFfQ29uZmlnRGlnaXRhbE91dHB1dChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitpbnQgaV9BUENJMzUwMV9Db25maWdEaWdpdGFsT3V0cHV0KHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5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LCBDb3VudGVyIG9yIFdhdGNoZG9nICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIFVJTlQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgOiBEYXRhIFBvaW50ZXIgY29udGFpbnMgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycyBhcyBiZWxvdyB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwJCQkJCSAgZGF0YVswXSAgICAgICAgICAgIDogMCBDb25maWd1cmUgQXMgVGltZXIgICAgICB8CkBAIC00MTAsNzggKzQxMCw3OCBAQAogfAkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KLUlOVCBpX0FQQ0kzNTAxX0NvbmZpZ1RpbWVyQ291bnRlcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgc3RydWN0IGN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ZiAoZGV2cHJpdi0+Yl9UaW1lclNlbGVjdE1vZGU9PUFERElEQVRBX1RJTUVSKSAqLwogCWlfVGVtcCA9IGlubChkZXZwcml2LT5pb2Jhc2UgKyBBUENJMzUwMV9XQVRDSERPRyArCiAJCUFQQ0kzNTAxX1RDV19UUklHX1NUQVRVUykgJiAweDE7CiAJcmV0dXJuIGluc24tPm47CkBAIC01OTgsNyArNTk4LDcgQEAKIHwgVGFzayAgICAgICAgICAgICAgOiBSZWFkIFRoZSBTZWxlY3RlZCBUaW1lciAsIENvdW50ZXIgb3IgV2F0Y2hkb2cgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IElucHV0IFBhcmFtZXRlcnMgIDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgVUlOVCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfAkJCQkJICBkYXRhWzBdICAgICAgICAgICAgOiAwIFRpbWVyICAgICAgICAgICAgICAgICAgIHwKQEAgLTYxMyw4ICs2MTMsOCBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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gLTIzLDcgKzIzLDcgQEAKICNkZWZpbmUgQVBDSTM1MDFfRElHSVRBTF9PUCAgICAgICAgICAgICAgICAgICAgICAgMHg0MAogI2RlZmluZSBBUENJMzUwMV9BTkFMT0dfT1VUUFVUICAgICAgICAgICAgICAgICAgICAweDAwCiAKLS8vQW5hbG9nIE91dHB1dCByZWxhdGVkIERlZmluZXMKKy8qIEFuYWxvZyBPdXRwdXQgcmVsYXRlZCBEZWZpbmVzICovCiAjZGVmaW5lIEFQQ0kzNTAxX0FPX1ZPTFRfTU9ERSAgICAgICAgICAgICAgICAgICAgIDAKICNkZWZpbmUgQVBDSTM1MDFfQU9fUFJPRyAgICAgICAgICAgICAgICAgICAgICAgICAgNAogI2RlZmluZSBBUENJMzUwMV9BT19UUklHX1NDUyAgICAgICAgICAgICAgICAgICAgICA4CkBAIC0zMSwxNCArMzEsMTQgQEAKICNkZWZpbmUgQklQT0xBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQogI2RlZmluZSBNT0RFMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCiAjZGVmaW5lIE1PREUxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKLS8vIEFOQUxPRyBPVVRQVVQgUkFOR0UKKy8qIEFOQUxPRyBPVVRQVVQgUkFOR0UgKi8KIHN0cnVjdCBjb21lZGlfbHJhbmdlIHJhbmdlX2FwY2kzNTAxX2FvID0geyAyLCB7CiAJCQkJCUJJUF9SQU5HRSgxMCksCiAJCQkJCVVOSV9SQU5HRSgxMCkKIAkJCQkJfQogfTsKIAotLy9XYXRjaGRvZyBSZWxhdGVkIERlZmluZXMKKy8qIFdhdGNoZG9nIFJlbGF0ZWQgRGVmaW5lcyAqLwogCiAjZGVmaW5lIEFQQ0kzNTAxX1dBVENIRE9HICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKICNkZWZpbmUgQVBDSTM1MDFfVENXX1NZTkNfRU5BQkxFRElTQUJMRS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AgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICAgICpkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAgICAgICppbnNuLCAgICAgICAgICAgICAgICAgICAgICAgICAgfApAQCAtODcsOSArODcsOSBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8IFRhc2sgICAgICAgICAgIENvbnZlcnRpbmcgbW9kZSBhbmQgY29udmVydCB0aW1lIHNlbGVjdGlvbiAgICAgICAgICAgICAgICAgIHwKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IGJfU2luZ2xlRGlmZiAgPSAoQllURSkgIGRhdGFbMV07ICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgYl9UaW1lQmFzZSAgICA9IChCWVRFKSAgZGF0YVsyXTsgKDA6IG5zLCAxOm1pY3JvcyAyOm1zKXwKLXwgICAgICAgICAgICAgICAgICAgIGR3X1JlbG9hZFZhbHVlID0gKERXT1JEKSBkYXRhWzNdOyAgICAgICAgICAgICAgICAgICAgICAgfAorfCBJbnB1dCBQYXJhbWV0ZXJzICA6IGJfU2luZ2xlRGlmZiAgPSAodW5zaWduZWQgY2hhcikgIGRhdGFbMV07ICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICAg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sdWUgPSBpbnNuLT5uOwotCUJZVEUgYl9UaW1lQmFzZSA9IDA7Ci0JQllURSBiX1NpbmdsZURpZmYgPSAwOwotCURXT1JEIGR3X1JlbG9hZFZhbHVlID0gMDsKLQlEV09SRCBkd19UZXN0UmVsb2FkVmFsdWUgPSAwOworCWludCBpX1JldHVyblZhbHVlID0gaW5zbi0+bjsKKwl1bnNpZ25lZCBjaGFyIGJfVGltZUJhc2UgPSAwOworCXVuc2lnbmVkIGNoYXIgYl9TaW5nbGVEaWZmID0gMDsKKwl1bnNpZ25lZCBpbnQgZHdfUmVsb2FkVmFsdWUgPSAwOworCXVuc2lnbmVkIGludCBkd19UZXN0UmVsb2FkVmFsdWUgPSAwOwogCiAJLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBUZXN0IHRoZSBidWZmZXIgc2l6ZSAqLwpAQCAtMTIzLDE5ICsxMjMsMTkgQEAKIAkJLyogR2V0IHRoZSBTaW5nZWwvRGlmZiBmbGFnICovCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLQkJYl9TaW5nbGVEaWZmID0gKEJZVEUpIGRhdGFbMV07CisJCWJfU2luZ2xlRGlmZiA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzFdOwogCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgdGltZSBiYXNlIHVuaXRpeSAqLwogCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0JCWJfVGltZUJhc2UgPSAoQllURSkgZGF0YVsyXTsKKwkJYl9UaW1lQmFzZSA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzJdOwogCiAJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgY29udmVydCB0aW1lIHJlbG9hZCB2YWx1ZSAqLwogCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0JC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nSW5wdXQgICAgICAgICAgICAgICAgIHwKK3wgRnVuY3Rpb24gTmFtZSAgICAgOiBpbnQgICBpX0FQQ0kzWFhYX0luc25Db25maWdBbmFsb2dJbnB1dCAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICAgICpkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAgICAgICppbnNuLCAgICAgICAgICAgICAgICAgICAgICAgICAgfApAQCAtMjgxLDkgKzI4MSw5IEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgVGFzayAgICAgICAgICAgQ29udmVydGluZyBtb2RlIGFuZCBjb252ZXJ0IHRpbWUgc2VsZWN0aW9uICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogYl9Db252ZXJ0TW9kZSA9IChCWVRFKSAgZGF0YVswXTsgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBiX1RpbWVCYXNlICAgID0gKEJZVEUpICBkYXRhWzFdOyAoMDogbnMsIDE6bWljcm9zIDI6bXMpfAotfCAgICAgICAgICAgICAgICAgICAgZHdfUmVsb2FkVmFsdWUgPSAoRFdPUkQpIGRhdGFbMl07ICAgICAgICAgICAgICAgICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogYl9Db252ZXJ0TW9kZSA9ICh1bnNpZ25lZCBjaGFyKSAgZGF0YVswXTsgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICBiX1RpbWVCYXNlICAgID0gKHVuc2lnbmVkIGNoYXIpICBkYXRhWzFdOyAoMDogbnMsIDE6bWljcm9zIDI6bXMpfAorfCAgICAgICAgICAgICAgICAgICAgZHdfUmVsb2FkVmFsdWUgPSAodW5zaWduZWQgaW50KSBkYXRhWzJdOyAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgIC4uLi4uLi4uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKIHwgT3V0cHV0IFBhcmFtZXRlcnMgOiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfApAQCAtMjk1LDE3ICsyOTUsMTcgQEAKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogKi8KIAotaW50IGlfQVBDSTNYWFhfSW5zbkNvbmZpZ0FuYWxvZ0lucHV0KHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK2ludCBpX0FQQ0kzWFhYX0luc25Db25maWdBbmFsb2dJbnB1dChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAorCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCB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VTCkgPT0KLQkJMHgyVUwpIHsKKwlkd19TdGF0dXMgPSByZWFkbCgodm9pZCAqKShkZXZwcml2LT5kd19BaUJhc2UgKyAxNikpOworCWlmICggKGR3X1N0YXR1cyAmIDB4MlVMKSA9PSAweDJVTCkgewogCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogUmVzZXQgdGhlIGludGVycnVwdCAqLwogCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTYzNSw3ICs2MzQsNyBAQAogCQkJCWJfQ29weUNwdCA8IGRldnByaXYtPnVpX0FpTmJyb2ZDaGFubmVsczsKIAkJCQliX0NvcHlDcHQrKykgewogCQkJCWRldnByaXYtPnVpX0FpUmVhZERhdGFbYl9Db3B5Q3B0XSA9Ci0JCQkJCShVSU5UKSByZWFkbCgodm9pZCAqKShkZXZwcml2LT4KKwkJCQkJKHVuc2lnbmVkIGludCkgcmVhZGwoKHZvaWQgKikoZGV2cHJpdi0+CiAJCQkJCQlkd19BaUJhc2UgKyAyOCkpOwogCQkJfQogCkBAIC02NjIsNyArNjYxLDcgQEAKIAogLyoKICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBGdW5jdGlvbiBOYW1lICAgICA6IElOVCAgIGlfQVBDSTNYWFhfSW5zbldyaXRlQW5hbG9nT3V0cHV0ICAgICAgICAgICAgICAgICB8Cit8IEZ1bmN0aW9uIE5hbWUgICAgIDogaW50ICAgaV9BUENJM1hYWF9JbnNuV3JpdGVBbmFsb2dPdXRwdXQgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJ1Y3QgY29tZWRpX2RldmljZSAgICAqZGV2LCAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKIHwgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N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AgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICAgICAgKmluc24sICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC03NzgsOCArNzc2LDggQEAKIHwgICAgICAgICAgICAgICAgZm9yIHlvdSBjYWxsIGFueSBvdGhlciBmdW5jdGlvbiB3aXRjaCBhY2Nlc3Mgb2YgVFRMLiAgICAgICAgfAogfCAgICAgICAgICAgICAgICBBUENJM1hYWF9UVExfSU5JVF9ESVJFQ1RJT05fUE9SVDIodXNlciBpbnB1dHMgZm9yIGRpcmVjdGlvbil8CiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBiX0luaXRUeXBlICAgID0gKEJZVEUpIGRhdGFbMF07ICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIGJfUG9ydDJNb2RlICAgPSAoQllURSkgZGF0YVsxXTsgICAgICAgICAgICAgICAgICAgICAgICB8Cit8IElucHV0IFBhcmFtZXRlcnMgIDogYl9Jbml0VHlwZSAgICA9ICh1bnNpZ25lZCBjaGFyKSBkYXRhWzBdOyAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgICAgICAgICAgICBiX1BvcnQyTW9kZSAgID0gKHVuc2lnbmVkIGNoYXIpIGRhdGFbMV07ICAgICAgICAgICAgICAgICAgICAgICAgfAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiB8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dOworCQliX0NvbW1hbmQgPSAodW5zaWduZWQgY2hhcikgZGF0YVswXTsKIAogCSAgIC8qKioqKioqKioqKioqKioqKioqKi8KIAkJLyogVGVzdCB0aGUgY29tbWFuZCAqLwpAQCAtODg4LDcgKzg4Niw3IEBACiAJCX0KIAl9CiAKLQlyZXR1cm4gKGlfUmV0dXJuVmFsdWUpOworCXJldHVybiBpX1JldHVyblZhbHVlOwogfQogCiAvKgpAQCAtODk5LDcgKzg5Nyw3IEBACiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBJTlQgICAgIGlfQVBDSTNYWFhfSW5zbkJpdHNUVExJTyAgICAgICAgICAgICAgICAgICAgICAgfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IGludCAgICAgaV9BUENJM1hYWF9JbnNuQml0c1RUTElPICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RydWN0IGNvbWVkaV9kZXZpY2UgICAgKmRldiwgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICAgICAgKmluc24sICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC05MTksMTQgKzkxNywxNCBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwogCi1pbnQgaV9BUENJM1hYWF9JbnNuQml0c1RUTElPKHN0cnVjdCB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zblJlYWRUVExJTyAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgRnVuY3Rpb24gTmFtZSAgICAgOiBpbnQgaV9BUENJM1hYWF9JbnNuUmVhZFRUTElPICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICAgICpkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogfCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAgICAgICppbnNuLCAgICAgICAgICAgICAgICAgICAgICAgICAgfApAQCAtMTA3NCwxMSArMTA3MiwxMSBAQAogKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAqLwogCi1pbnQgaV9BUENJM1hYWF9JbnNuUmVhZFRUTElPKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK2ludCBpX0FQQ0kzWFhYX0luc25SZWFkVFRMSU8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKKwlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7Ci0JQllURSBiX0NoYW5uZWwgPSAoQllURSkgQ1JfQ0hBTihpbnNuLT5jaGFuc3BlYyk7Ci0JSU5UIGlfUmV0dXJuVmFsdWUgPSBpbnNuLT5uOworCXVuc2lnbmVkIGNoYXIgYl9DaGFubmVsID0gKHVuc2lnbmVkIGNoYXIpIENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOworCWludCBpX1JldHVyblZhbHVlID0gaW5zbi0+bjsKIAl1bnNpZ25lZCBpbnQgKnBsc19SZWFkRGF0YSA9IGRhdGE7CiAKIAkvKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTE1Nyw3ICsxMTU1LDcgQEAKIAkJaV9SZXR1cm5WYWx1ZSA9IC0xMDE7CiAJfQogCi0JcmV0dXJuIChpX1JldHVyblZhbHVlKTsKKwlyZXR1cm4gaV9SZXR1cm5WYWx1ZTsKIH0KIAogLyoKQEAgLTExNjgsNyArMTE2Niw3IEBACiAKIC8qCiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gTmFtZSAgICAgOiBJTlQgICAgIGlfQVBDSTNYWFhfSW5zbldyaXRlVFRMSU8gICAgICAgICAgICAgICAgICAgICAgfAorfCBGdW5jdGlvbiBOYW1lICAgICA6IGludCAgICAgaV9BUENJM1hYWF9JbnNuV3JpdGVUVExJTyAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RydWN0IGNvbWVkaV9kZXZpY2UgICAgKmRldiwgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICAgICAgKmluc24sICAgICAgICAgICAgICAgICAgICAgICAgICB8CkBAIC0xMTg3LDIwICsxMTg1LDIwIEBACiArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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2LT5pb2Jhc2UgKyBQQ0k5MTE4X0RFTEZJRk8pOwkvKiAgZmx1c2ggRklGTyAqLwogCXJldHVybiBuOwogCiB9CkBAIC0zNzcsOCArMzc4LDggQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgaW50IHBjaTkxMThfaW5zbl93cml0ZV9hbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjaTkxMThfaW5zbl93cml0ZV9hbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sIHVuc2lnbmVkIGludCAqZGF0YSkKIHsKIAlpbnQgbiwgY2hhbnJlZywgY2g7CiAKQEAgLTQwMCw4ICs0MDEsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpOTExOF9pbnNuX3JlYWRfYW8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQorc3RhdGljIGludCBwY2k5MTE4X2luc25fcmVhZF9hbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sIHVuc2lnbmVkIGludCAqZGF0YSkKIHsKIAlpbnQgbiwgY2hhbjsKIApAQCAtNDE1LDggKzQxNiw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2k5MTE4X2luc25fYml0c19kaShzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjaTkxMThfaW5zbl9iaXRzX2RpKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewogCWRhdGFbMV0gPSBpbmwoZGV2LT5pb2Jhc2UgKyBQQ0k5MTE4X0RJKSAmIDB4ZjsKIApAQCAtNDI2LDggKzQyNyw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2k5MTE4X2luc25fYml0c19kbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjaTkxMThfaW5zbl9iaXRzX2RvKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQog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yA9IGRldnByaXYtPmFpX2FkZF9mcm9udCwKQEAgLTQ4MCw4ICs0ODEsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyB1bnNpZ25lZCBpbnQgbW92ZV9ibG9ja19mcm9tX2RtYShzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwKLQlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsIHNob3J0ICogZG1hX2J1ZmZlciwgdW5zaWduZWQgaW50IG51bV9zYW1wbGVzKQorc3RhdGljIHVuc2lnbmVkIGludCBtb3ZlX2Jsb2NrX2Zyb21fZG1hKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsIHNob3J0ICpkbWFfYnVmZmVyLCB1bnNpZ25lZCBpbnQgbnVtX3NhbXBsZXMpCiB7CiAJdW5zaWduZWQgaW50IG51bV9ieXRlczsKIApAQCAtNTAxLDggKzUwMiw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGNoYXIgcGNpOTExOF9kZWNvZGVfZXJyb3Jfc3RhdHVzKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LAotCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywgdW5zaWduZWQgY2hhciBtKQorc3RhdGljIGNoYXIgcGNpOTExOF9kZWNvZGVfZXJyb3Jfc3RhdHVzKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCisJc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsIHVuc2lnbmVkIGNoYXIgbSkKIHsKIAlpZiAobSAmIDB4MTAwKSB7CiAJCWNvbWVkaV9lcnJvcihkZXYsICJBL0QgRklGT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3RhdGljIGNvbnN0IHN0cnVjdCBjb21lZGlfbHJhbmdlIHJhbmdlX2FkcTEyYl9haV9iaXBvbGFyID0geyA0LCB7Ci0gICAgICAgIEJJUF9SQU5HRSggNSApLAotICAgICAgICBCSVBfUkFOR0UoIDIgKSwKLSAgICAgICAgQklQX1JBTkdFKCAxICksCi0gICAgICAgIEJJUF9SQU5HRSggMC41ICkKKyAgICAgICAgQklQX1JBTkdFKDUpLAorICAgICAgICBCSVBfUkFOR0UoMiksCisgICAgICAgIEJJUF9SQU5HRSgxKSwKKyAgICAgICAgQklQX1JBTkdFKDAuNSkKIH19OwogCiBzdGF0aWMgY29uc3Qgc3RydWN0IGNvbWVkaV9scmFuZ2UgcmFuZ2VfYWRxMTJiX2FpX3VuaXBvbGFyID0geyA0LCB7Ci0gICAgICAgIFVOSV9SQU5HRSggNSApLAotICAgICAgICBVTklfUkFOR0UoIDIgKSwKLSAgICAgICAgVU5JX1JBTkdFKCAxICksCi0gICAgICAgIFVOSV9SQU5HRSggMC41ICkKKyAgICAgICAgVU5JX1JBTkdFKDUpLAorICAgICAgICBVTklfUkFOR0UoMiksCisgICAgICAgIFVOSV9SQU5HRSgxKSwKKyAgICAgICAgVU5JX1JBTkdFKDAuNSkKIH19OwogCiAKQEAgLTEyNywyMCArMTI3LDIwIEBACiAKIHN0YXRpYyBjb25zdCBzdHJ1Y3QgYWRxMTJiX2JvYXJkIGFkcTEyYl9ib2FyZHNbXSA9IHsKICAgICAgICAgewotICAgICAgICBuYW1lOiAgICAgICAgICAgImFkcTEyYiIsCi0gICAgICAgIGFpX3NlX2NoYW5zOiAgICAxNiwKLSAgICAgICAgYWlfZGlmZl9jaGFuczogIDgsCi0gICAgICAgIGFpX2JpdHM6ICAgICAgICAxMiwKLSAgICAgICAgZGlfY2hhbnM6ICAgICAgIDUsCi0gICAgICAgIGRvX2NoYW5zOiAgICAgICA4CisJLm5hbWUgPSAiYWRxMTJiIiwKKwkuYWlfc2VfY2hhbnMgPSAxNiwK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CiAgICAgICAgIGludCByYW5nZSwgY2hhbm5lbDsKQEAgLTMyNSwyOSArMzI1LDI5IEBACiAgICAgICAgIGNoYW5uZWwgPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKICAgICAgICAgaWYgKGNoYW5uZWwgIT0gZGV2cHJpdi0+bGFzdF9jaGFubmVsIHx8IHJhbmdlICE9IGRldnByaXYtPmxhc3RfcmFuZ2UpIHsKICAgICAgICAgICBvdXRiKChyYW5nZSA8PCA0KSB8IGNoYW5uZWwsIGRldi0+aW9iYXNlICsgQURRMTJCX0NUUkVHKTsKLSAgICAgICAgICBjb21lZGlfdWRlbGF5KDUwKTsgICAvKiB3YWl0IGZvciB0aGUgbXV4IHRvIHNldHRsZSAqLworICAgICAgICAgIHVkZWxheSg1MCk7ICAgLyogd2FpdCBmb3IgdGhlIG11eCB0byBzZXR0bGUgKi8KICAgICAgICAgfQogCiAgICAgICAgIC8qIHRyaWdnZXIgY29udmVyc2lvbiAqLwogICAgICAgICBzdGF0dXMgPSBpbmIoZGV2LT5pb2Jhc2UgKyBBRFExMkJfQURMT1cpOwogCiAgICAgICAgIC8qIGNvbnZlcnQgbiBzYW1wbGVzICovCi0gICAgICAgIGZvcihuPTA7IG4gPCBpbnNuLT5uOyBuKyspeworICAgICAgICBmb3IgKG49MDsgbiA8IGluc24tPm47IG4rKyl7CiAKICAgICAgICAgICAvKiB3YWl0IGZvciBlbmQgb2YgY29udmVydGlvbiAqLwogCSAgaSA9IDA7CiAgICAgICAgICAgZG8gewotLy8gICAgICAgICAgICBjb21lZGlfdWRlbGF5KDEpOworLyogdWRlbGF5KDEpOyAqLwogCSAgICBzdGF0dXMgPSBpbmIoZGV2LT5pb2Jhc2UgKyBBRFExMkJfU1RJTlIpOwogICAgICAgICAgICAgc3RhdHVzID0gc3RhdHVzICYgQURRMTJCX0VPQzsKICAgICAgICAgICB9IHdoaWxlIChzdGF0dXMgPT0gMCAmJiArK2kgPCBUSU1FT1VUKTsKLS8vICAgICAg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PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpMTcxeF9pbnNuX3dyaXRlX2FvKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsCi0Jc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK3N0YXRpYyBpbnQgcGNpMTcxeF9pbnNuX3dyaXRlX2FvKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewogCWludCBuLCBjaGFuLCByYW5nZSwgb2ZzOwogCkBAIC00MjEsOCArNDIzLDggQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgaW50IHBjaTE3MXhfaW5zbl9yZWFkX2FvKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsCi0Jc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK3N0YXRpYyBpbnQgcGNpMTcxeF9pbnNuX3JlYWRfYW8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7CiAJaW50IG4sIGNoYW47CiAKQEAgLTQzNiw4ICs0MzgsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpMTcxeF9pbnNuX2JpdHNfZGkoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQorc3RhdGljIGludCBwY2kxNzF4X2luc25fYml0c19kaShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sIHVuc2lnbmVkIGludCAqZGF0YSkKIHsKIAlkYXRhWzFdID0gaW53KGRldi0+aW9iYXNlICsgUENJMTcxeF9ESSk7CiAKQEAgLTQ0Nyw4ICs0NDksOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpMTcxeF9pbnNuX2JpdHNfZG8oc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQorc3RhdGljIGludCBwY2kxNzF4X2luc25fYml0c19kbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwlzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sIHVuc2lnbmVkIGludCAqZGF0YSkKIHsKIAlpZiAoZGF0YVswXSkgewogCQlzLT5zdGF0ZSAmPSB+ZGF0YVswXTsKQEAgLTQ2Myw4ICs0NjUsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogK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YiwgT01CQ01EX1JFVFJZKTsKIH0KIAotc3RhdGljIGludCBwY2kxNzYwX21ieHJlcXVlc3Qoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsCitzdGF0aWMgaW50IHBjaTE3NjBfbWJ4cmVxdWVzdChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LAogCXVuc2lnbmVkIGNoYXIgKm9tYiwgdW5zaWduZWQgY2hhciAqaW1iKQogewogCWlmIChvbWJbMl0gPT0gQ01EX0NsZWFySU1CMikgewpAQCAtNDkwLDggKzQ5MSw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2kxNzYwX2luc25fYml0c19kaShzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjaTE3NjBfaW5zbl9iaXRzX2RpKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewogCWRhdGFbMV0gPSBpbmIoZGV2LT5pb2Jhc2UgKyBJTUIzKTsKIApAQCAtNTAxLDggKzUwMiw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2kxNzYwX2luc25fYml0c19kbyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlf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09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2kxNzYwX3Jlc2V0KHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2KQorc3RhdGljIGludCBwY2kxNzYwX3Jlc2V0KHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYpCiB7CiAJaW50IGk7CiAJdW5zaWduZWQgY2hhciBvbWJbNF0gPSB7IDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAgfTsKQEAgLTY2Nyw3ICs2NzMsNyBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpX2Rpb19yZXNldChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldikKK3N0YXRpYyBpbnQgcGNpX2Rpb19yZXNldChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2KQogewogCURQUklOVEsoImFkdl9wY2lfZGlvIEVEQkc6IEJHTjogcGNpMTcxeF9yZXNldCguLi4pXG4iKTsKIApAQCAtNzUwLDcgKzc1Niw3IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGludCBwY2kxNzYwX2F0dGFjaChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9kZXZjb25maWcgKiBpdCkKK3N0YXRpYyBpbnQgcGNpMTc2MF9hdHRhY2goc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9kZXZjb25maWcgKml0KQogewogCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzOwogCWludCBzdWJkZXYgPSAwOwpAQCAtODAyLDggKzgwOCw4IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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VORCB8IFNERl9DT01NT047CkBAIC04NTcsNyArODYzLDcgQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgaW50IENoZWNrQW5kQWxsb2NDYXJkKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX2RldmNvbmZpZyAqIGl0LAorc3RhdGljIGludCBDaGVja0FuZEFsbG9jQ2FyZChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX2RldmNvbmZpZyAqaXQsCiAJc3RydWN0IHBjaV9kZXYgKnBjaWRldikKIHsKIAlzdHJ1Y3QgcGNpX2Rpb19wcml2YXRlICpwciwgKnByZXY7CkBAIC04ODMsMTcgKzg4OSwxOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNpX2Rpb19hdHRhY2goc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfZGV2Y29uZmlnICogaXQpCitzdGF0aWMgaW50IHBjaV9kaW9fYXR0YWNoKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfZGV2Y29uZmlnICppdCkKIHsKIAlzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqczsKIAlpbnQgcmV0LCBzdWJkZXYsIG5fc3ViZGV2aWNlcywgaSwgajsKIAl1bnNpZ25lZCBsb25nIGlvYmFzZTsKIAlzdHJ1Y3QgcGNpX2RldiAqcGNpZGV2OwogCi0JcnRfcHJpbnRrKCJjb21lZGklZDogYWR2X3BjaV9kaW86ICIsIGRldi0+bWlub3IpOworCXByaW50aygiY29tZWRpJWQ6IGFkdl9wY2lfZGl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LAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEpCi0vL3sKLS8vICBwcmludGsoImM2eGRpZ2lvX2VpX2luaXRfaW5zbl9yZWFkICV4XG4iLCBpbnNuLT5uKTsKLS8vICByZXR1cm4gaW5zbi0+bjsKLS8vfQorLyogc3RhdGljIGludCBjNnhkaWdpb19laV9pbml0X2luc25fcmVhZChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCAqLworLyogc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICovCisvKiBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sICovCisvKiB1bnNpZ25lZCBpbnQgKmRhdGEpICovCisvKiB7ICovCisvKiBwcmludGsoImM2eGRpZ2lvX2VpX2luaXRfaW5zbl9yZWFkICV4XG4iLCBpbnNuLT5uKTsgKi8KKy8qIHJldHVybiBpbnNuLT5uOyAqLworLyogfSAqLwogCi0vL3N0YXRpYyBpbnQgYzZ4ZGlnaW9fZWlfaW5pdF9pbnNuX3dyaXRlKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSkKLS8vewotLy8gIGludCBpOwotLy8gIGludCBjaGFuID0gQ1JfQ0hBTihpbnNuLT5jaGFuc3BlYyk7Ci0vLwotLy8gIEM2WF9lbmNSZ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AgYWlfbmJpdHM6MTIsCi0JICAgICAgYWlfcGc6CWRhczA4X3BnaCwKLQkgICAgICBhaV9lbmNvZGluZzpkYXMwOF9lbmNvZGUxMiwKLQkgICAgICBhbzoJTlVMTCwKLQkgICAgICBkaToJZGFzMDhfZGlfcmJpdHMsCi0JICAgICAgZG9fOglkYXMwOF9kb193Yml0cywKLQkgICAgICBkb19uY2hhbjo0LAotCSAgICAgIGk4MjU1X29mZnNldDowLAotCSAgICAgIGk4MjU0X29mZnNldDoweDA0LAotCSAgICAgIGlvc2l6ZToJMTYsCS8vIHVuY2hlY2tlZAorCS5uYW1lID0gImRhczA4LXBnaCIsCS8qICBjaW8tZGFzMDhwZ3gucGRmICovCisJLmJ1c3R5cGUgPSBpc2EsCisJLmFpID0gZGFzMDhfYWlfcmluc24sCisJLmFpX25iaXRzID0gMTIsCisJLmFpX3BnID0gZGFzMDhfcGdoLAorCS5haV9lbmNvZGluZyA9IGRhczA4X2VuY29kZTEyLAorCS5hbyA9IE5VTEwsCisJLmRpID0gZGFzMDhfZGlfcmJpdHMsCisJLmRvXyA9IGRhczA4X2RvX3diaXRzLAorCS5kb19uY2hhbiA9IDQsCisJLmk4MjU1X29mZnNldCA9IDAsCisJLmk4MjU0X29mZnNldCA9IDB4MDQsCisJLmlvc2l6ZSA9IDE2LAkvKiAgdW5jaGVja2VkICovCiAJCX0sCiAJewotCSAgICAgIG5hbWU6CSJkYXMwOC1wZ2wiLAkvLyBjaW8tZGFzMDhwZ3gucGRmCi0JICAgICAgYnVzdHlwZToJaXNhLAotCSAgICAgIGFpOglkYXMwOF9haV9yaW5zbiwKLQkgICAgICBhaV9uYml0czoxMiwKLQkgICAgICBhaV9wZzoJZGFzMDhfcGdsLAotCSAgICAgIGFpX2VuY29kaW5nOmRhczA4X2VuY29kZTEyLAotCSAgICAgIGFvOglOVUxMLAotCSAgICAgIGRpOglkYXMwOF9kaV9yYml0cywKLQkgICAgICBkb186CWRhczA4X2RvX3diaXRzLAotCSAgICAg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BpZDoJMHgwMCwKKwkubmFtZSA9ICJkYXMtMTYiLAorCS5haSA9IGRhczE2X2FpX3JpbnNuLAorCS5haV9uYml0cyA9IDEyLAorCS5haV9zcGVlZCA9IDE1MDAwLAorCS5haV9wZyA9IGRhczE2X3BnX25vbmUsCisJLmFvID0gZGFzMTZfYW9fd2luc24sCisJLmFvX25iaXRzID0gMTIsCisJLmRpID0gZGFzMTZfZGlfcmJpdHMsCisJLmRvXyA9IGRhczE2X2RvX3diaXRzLAorCS5pODI1NV9vZmZzZXQgPSAweDEwLAorCS5pODI1NF9vZmZzZXQgPSAweDBjLAorCS5zaXplID0gMHgxNCwKKwkuaWQgPSAweDAwLAogCQl9LAogCXsKLQkgICAgICBuYW1lOgkiZGFzLTE2ZyIsCi0JICAgICAgYWk6CWRhczE2X2FpX3JpbnNuLAotCSAgICAgIGFpX25iaXRzOjEyLAotCSAgICAgIGFpX3NwZWVkOjE1MDAwLAotCSAgICAgIGFpX3BnOglkYXMxNl9wZ19ub25lLAotCSAgICAgIGFvOglkYXMxNl9hb193aW5zbiwKLQkgICAgICBhb19uYml0czoxMiwKLQkgICAgICBkaToJZGFzMTZfZGlfcmJpdHMsCi0JICAgICAgZG9fOglkYXMxNl9kb193Yml0cywKLQkgICAgICBpODI1NV9vZmZzZXQ6MHgxMCwKLQkgICAgICBpODI1NF9vZmZzZXQ6MHgwYywKLQkgICAgICBzaXplOgkweDE0LAotCSAgICAgIGlkOgkweDAwLAorCS5uYW1lID0gImRhcy0xNmciLAorCS5haSA9IGRhczE2X2FpX3JpbnNuLAorCS5haV9uYml0cyA9IDEyLAorCS5haV9zcGVlZCA9IDE1MDAwLAorCS5haV9wZyA9IGRhczE2X3BnX25vbmUsCisJLmFvID0gZGFzMTZfYW9fd2luc24sCisJLmFvX25iaXRzID0gMTIsCisJLmRpID0gZGFzMTZfZGlfcmJpdHMsCisJLmRvXyA9IGRhczE2X2RvX3diaXRzLAorCS5pODI1NV9vZmZzZXQgPSAweDEwLAorCS5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IGJ5dGVzIG9mIGRtYSBidWZmZXJzCisvKiBtaXNjLiBkZWZpbmVzICovCisjZGVmaW5lIERBUzE4MDBfU0laRSAgICAgICAgICAgMTYJLyogdXNlcyAxNiBpbyBhZGRyZXNzZXMgKi8KKyNkZWZpbmUgRklGT19TSVpFICAgICAgICAgICAgICAxMDI0CS8qICAxMDI0IHNhbXBsZSBmaWZvICovCisjZGVmaW5lIFRJTUVSX0JBU0UgICAgICAgICAgICAgMjAwCS8qICA1IE1oeiBtYXN0ZXIgY2xvY2sgKi8KKyNkZWZpbmUgVU5JUE9MQVIgICAgICAgICAgICAgICAweDQJLyogIGJpdCB0aGF0IGRldGVybWluZXMgd2hldGhlciBpbnB1dCByYW5nZSBpcyB1bmkvYmlwb2xhciAqLworI2RlZmluZSBETUFfQlVGX1NJWkUgICAgICAgICAgIDB4MWZmMDAJLyogIHNpemUgaW4gYnl0ZXMgb2YgZG1hIGJ1ZmZlcnMgKi8KIAogLyogUmVnaXN0ZXJzIGZvciB0aGUgZGFzMTgwMCAqLwogI2RlZmluZSBEQVMxODAwX0ZJRk8gICAgICAgICAgICAweDAKQEAgLTEzOCw3ICsxMzksNyBAQAogI2RlZmluZSAgIERNQV9DSDVfQ0g2ICAgICAgICAgICAgIDB4NQogI2RlZmluZSAgIERNQV9DSDZfQ0g3ICAgICAgICAgICAgIDB4NgogI2RlZmluZSAgIERNQV9DSDdfQ0g1ICAgICAgICAgICAgIDB4NwotI2RlZmluZSAgIERNQV9FTkFCTEVEICAgICAgICAgICAgIDB4MwkvL21hc2sgdXNlZCB0byBkZXRlcm1pbmUgaWYgZG1hIGlzIGVuYWJsZWQKKyNkZWZpbmUgICBETUFfRU5BQkxFRCAgICAgICAgICAgICAweDMJLyogbWFzayB1c2VkIHRvIGRldGVybWluZSBpZiBkbWEgaXMgZW5hYmxlZCAqLwogI2RlZmluZSAgIERNQV9EVUFMICAgICAgICAgICAgICAgIDB4NAogI2RlZmluZSAgIElSUTMgICAgICAgICAgICAgICAgICAgIDB4OAogI2RlZmluZSAgIElSUTUgICAgICAgICAgICAgICAgICAgIDB4MTAKQEAgLTE1Niw3ICsxNTcsNyBAQAogI2RlZmluZSAgIFNEICAgICAgICAgICAgICAgICAgICAgIDB4NDAKICNkZWZpbmUgICBVQiAgICAgICAgICAgICAgICAgICAgICAweDgwCiAjZGVmaW5lIERBUzE4MDBfU1RBVFVTICAgICAgICAgIDB4NwotLy8gYml0cyB0aGF0IHByZXZlbnQgaW50ZXJydXB0IHN0YXR1cyBiaXRzIChhbmQgQ1ZFTikgZnJvbSBiZWluZyBjbGVhcmVkIG9uIHdyaXRlCisvKiBiaXRzIHRoYXQgcHJldmVudCBpbnRlcnJ1cHQgc3RhdHVzIGJpdHMgKGFuZCBDVkVOKSBmcm9tIGJlaW5nIGNsZWFyZWQgb24gd3JpdGUgKi8KICNkZWZpbmUgICBDTEVBUl9JTlRSX01BU0sgICAgICAgICAoQ1ZFTl9NQVNLIHwgMHgxZikKICNkZWZpbmUgICBJTlQgICAgICAgICAgICAgICAgICAgICAweDEKICNkZWZpbmUgICBETUFUQyAgICAgICAgICAgICAgICAgICAweDIKQEAgLTE2NCwxNCArMTY1LDE0IEBACiAjZGVmaW5lICAgT1ZGICAgICAgICAgICAgICAgICAgICAgMHgxMAogI2RlZmluZSAgIEZIRiAgICAgICAgICAgICAgICAgICAgIDB4MjAKICNkZWZpbmUgICBGTkUgICAgICAgICAgICAgICAgICAgICAweDQwCi0jZGVmaW5lICAgQ1ZFTl9NQVNLICAgICAgICAgICAgICAgMHg0MAkvLyBtYXNrcyBDVkVOIG9uIHdyaXRlCisjZGVmaW5lICAgQ1ZFTl9NQVNLICAgICAgICAgICAgICAgMHg0MAkvKiAgbWFza3MgQ1ZFTiBvbiB3cml0ZSAqLwogI2RlZmluZSAgIENWRU4gICAgICAgICAgICAgICAgICAgIDB4ODAKICNkZWZpbmUgREFTMTgwMF9CVVJTVF9MRU5HVEggICAgMHg4CiAjZGVmaW5lIERBUzE4MDBfQl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kZSA8bGludXgvaW9wb3J0Lmg+CkBAIC03Miw3ICs3Myw3IEBACiAKICNkZWZpbmUgREFTODAwX1NJWkUgICAgICAgICAgIDgKICNkZWZpbmUgVElNRVJfQkFTRSAgICAgICAgICAgIDEwMDAKLSNkZWZpbmUgTl9DSEFOX0FJICAgICAgICAgICAgIDgJLy8gbnVtYmVyIG9mIGFuYWxvZyBpbnB1dCBjaGFubmVscworI2RlZmluZSBOX0NIQU5fQUkgICAgICAgICAgICAgOAkvKiAgbnVtYmVyIG9mIGFuYWxvZyBpbnB1dCBjaGFubmVscyAqLwogCiAvKiBSZWdpc3RlcnMgZm9yIHRoZSBkYXM4MDAgKi8KIApAQCAtOTQsOCArOTUsOCBAQAogI2RlZmluZSAgIElSUSAgICAgICAgICAgICAgICAgICAweDgKICNkZWZpbmUgICBCVVNZICAgICAgICAgICAgICAgICAgMHg4MAogI2RlZmluZSBEQVM4MDBfR0FJTiAgICAgICAgICAgMwotI2RlZmluZSAgIENJT19GRk9WICAgICAgICAgICAgICAweDgJLy8gZmlmbyBvdmVyZmxvdyBmb3IgY2lvLWRhczgwMi8xNgotI2RlZmluZSAgIENJT19FTkhGICAgICAgICAgICAgICAweDkwCS8vIGludGVycnVwdCBmaWZvIGhhbGYgZnVsbCBmb3IgY2lvLWRhczgwMi8xNgorI2RlZmluZSAgIENJT19GRk9WICAgICAgICAgICAgICAweDgJLyogIGZpZm8gb3ZlcmZsb3cgZm9yIGNpby1kYXM4MDIvMTYgKi8KKyNkZWZpbmUgICBDSU9fRU5IRiAgICAgICAgICAgICAgMHg5MAkvKiAgaW50ZXJydXB0IGZpZm8gaGFsZiBmdWxsIGZvciBjaW8tZGFzODAyLzE2ICovCiAjZGVmaW5lICAgQ09OVFJPTDEgICAgICAgICAgICAgIDB4ODAKICNkZWZpbmUgICBDT05WX0NPTlRST0wgICAgICAgICAgMHhhMAogI2RlZmluZSAgIFNDQU5fTElNSVRTICAgICAgICAgICAweGMwCkBAIC0xMTMsNyArMTE0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ICovCkBAIC02MTgsNyArNjE5LDcgQEAKIAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGlycXJldHVybl90IGludGVycnVwdF9zZXJ2aWNlX2ljcF9tdWx0aShpbnQgaXJxLCB2b2lkICpkIFBUX1JFR1NfQVJHKQorc3RhdGljIGlycXJldHVybl90IGludGVycnVwdF9zZXJ2aWNlX2ljcF9tdWx0aShpbnQgaXJxLCB2b2lkICpkKQogewogCXN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgPSBkOwogCWludCBpbnRfbm87CkBAIC04NDIsNyArODQzLDcgQEAKIAkJCQlkZXZwcml2LT5pb19hZGRyICsgSUNQX01VTFRJX0RBQ19DU1IpOwogCiAJCQkvKiAgRGVsYXkgdG8gYWxsb3cgREFDIHRpbWUgdG8gcmVjb3ZlciAqLwotCQkJY29tZWRpX3VkZWxheSgxKTsKKwkJCXVkZWxheSgxKTsKIAkJfQogCS8qICBEaWdpdGFsIG91dHB1dHMgdG8gMCAqLwogCXdyaXRldygwLCBkZXZwcml2LT5pb19hZGRyICsgSUNQX01VTFRJX0RPKTsKQEAgLTk1NCw3ICs5NTUsNyBAQAogCiAJaWYgKHRoaXNfYm9hcmQtPmhhdmVfaXJxKSB7CiAJCWlmIChpcnEpIHsKLQkJCWlmIChjb21lZGlfcmVxdWVzdF9pcnEoaXJxLCBpbnRlcnJ1cHRfc2VydmljZV9pY3BfbXVsdGksCisJCQlpZiAocmVxdWVzdF9pcnEoaXJxLCBpbnRlcnJ1cHRfc2VydmljZV9pY3BfbXVsdGksCiAJCQkJCUlSUUZfU0hBUkVELCAiSW5vdmEgSWNwIE11bHRpIiwgZGV2KSkgewogCQkJCXByaW50aygiLCB1bmFibGUgdG8gYWxsb2NhdGUgSVJRICV1LCBESVNBQkxJTkcgSVQiLCBpcnEpOwogCQkJCWlycSA9IDA7CS8qIENhbid0IHV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ICAgICAgICAgMwkvKiAgcmVhZC93cml0ZSB0by9mcm9tIHNlcmlhbCBFRVBST00gdmlhIEkyQyAqLworI2RlZmluZSBNUEM2MjRfTEVEUyAgICAgICAgICAgICA0CS8qICB3cml0ZSB0byBMRURzICovCisjZGVmaW5lIE1QQzYyNF9ESU8gICAgICAgICAgICAgIDUJLyogIHJlYWQvd3JpdGUgdG8vZnJvbSBkaWdpdGFsIEkvTyBwb3J0cyAqLworI2RlZmluZSBNUEM2MjRfSVJRX01BU0sgICAgICAgICA2CS8qICBJUlEgbWFza2luZyBlbmFibGUvZGlzYWJsZSAqLwogCi0vLyBSZWdpc3RlciBiaXRzJyBuYW1lcworLyogUmVnaXN0ZXIgYml0cycgbmFtZXMgKi8KICNkZWZpbmUgTVBDNjI0X0FEQlVTWSAgICAgICAgICAgKDE8PDUpCiAjZGVmaW5lIE1QQzYyNF9BRFNETyAgICAgICAgICAgICgxPDw0KQogI2RlZmluZSBNUEM2MjRfQURGTyAgICAgICAgICAgICAoMTw8MykKQEAgLTgxLDE5ICs4MSwxOSBAQAogI2RlZmluZSBNUEM2MjRfQURTQ0sgICAgICAgICAgICAoMTw8MSkKICNkZWZpbmUgTVBDNjI0X0FEU0RJICAgICAgICAgICAgKDE8PDApCiAKLS8vIFNESSBTcGVlZC9SZXNvbHV0aW9uIFByb2dyYW1taW5nIGJpdHMKKy8qIFNESSBTcGVlZC9SZXNvbHV0aW9uIFByb2dyYW1taW5nIGJpdHMgKi8KICNkZWZpbmUgTVBDNjI0X09TUjQgICAgICAgICAgICAgKDE8PDMxKQogI2RlZmluZSBNUEM2MjRfT1NSMyAgICAgICAgICAgICAoMTw8MzApCiAjZGVmaW5lIE1QQzYyNF9PU1IyICAgICAgICAgICAgICgxPDwyOSkKICNkZWZpbmUgTVBDNjI0X09TUjEgICAgICAgICAgICAgKDE8PDI4KQogI2RlZmluZSBNUEM2MjRfT1NSMCAgICAgICAgICAgICAoMTw8MjcpCiAKLS8vIDMyLWJpdCBvdXRwdXQgdmFsdWUgYml0cycgbmFtZXMKKy8qIDMyLWJpdCBvdXRwdXQgdmFsdWUgYml0cycgbmFtZXMgKi8KICNkZWZpbmUgTVBDNjI0X0VPQ19CSVQgICAgICAgICAgKDE8PDMxKQogI2RlZmluZSBNUEM2MjRfRE1ZX0JJVCAgICAgICAgICAoMTw8MzApCiAjZGVmaW5lIE1QQzYyNF9TR05fQklUICAgICAgICAgICgxPDwyOSkKIAotLy8gQ29udmVydGlvbiBzcGVlZHMKKy8qIENvbnZlcnRpb24gc3BlZWRzICovCiAvKiBPU1I0IE9TUjMgT1NSMiBPU1IxIE9TUjAgIENvbnZlcnRpb24gcmF0ZSAgUk1TIG5vaXNlICBFTk9CXgogICogIFggICAgMCAgICAwICAgIDAgICAgMSAgICAgICAgMy41MmtIeiAgICAgICAgMjN1ViAgICAgIDE3CiAgKiAgWCAgICAwICAgIDAgICAgMSAgICAwICAgICAgICAxLjc2a0h6ICAgICAgIDMuNXVWICAgICAgMjAKQEAgLTExMCwxMjMgKzExMCwxMjMgQEAKICAqLwogCiAjZGVmaW5lIE1QQzYyNF9TUEVFRF8zXzUyX2tIeiAgIChNUEM2MjRfT1NSNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IE1QQzYyNF9PU1IwKQotI2RlZmluZSBNUEM2MjRfU1BFRURfMV83Nl9rSHogICAoTVBDNjI0X09TUjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgTVBDNjI0X09TUjEgICAgICAgICAgICAgICkKKyNkZWZpbmUgTVBDNjI0X1NQRUVEXzFfNzZfa0h6ICAgKE1QQzYyNF9PU1I0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IE1QQzYyNF9PU1IxKQogI2RlZmluZSBNUEM2MjRfU1BFRURfODgwX0h6ICAgICAoTVBDNjI0X09TUjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgTVBDNjI0X09TUjEgfCBNUEM2MjRfT1NSMCkKLSNkZWZpbmUgTVBDNjI0X1NQRUVEXzQ0MF9IeiAgICAgKE1QQzYyNF9PU1I0ICAgICAgICAgICAgICAgfCBNUEM2MjRfT1NSMiAgICAgICAgICAgICAgICAgICAgICAgICAgICApCisjZGVmaW5lIE1QQzYyNF9TUEVFRF80NDBfSHogICAgIChNUEM2MjRfT1NSNCAgICAgICAgICAgICAgIHwgTVBDNjI0X09TUjIpCiAjZGVmaW5lIE1QQzYyNF9TUEVFRF8yMjBfSHogICAgIChNUEM2MjRfT1NSNCAgICAgICAgICAgICAgIHwgTVBDNjI0X09TUjIgICAgICAgICAgICAgICB8IE1QQzYyNF9PU1IwKQotI2RlZmluZSBNUEM2MjRfU1BFRURfMTEwX0h6ICAgICAoTVBDNjI0X09TUjQgICAgICAgICAgICAgICB8IE1QQzYyNF9PU1IyIHwgTVBDNjI0X09TUjEgICAgICAgICAgICAgICkKKyNkZWZpbmUgTVBDNjI0X1NQRUVEXzExMF9IeiAgICAgKE1QQzYyNF9PU1I0ICAgICAgICAgICAgICAgfCBNUEM2MjRfT1NSMiB8IE1QQzYyNF9PU1IxKQogI2RlZmluZSBNUEM2MjRfU1BFRURfNTVfSHogICAgICAoTVBDNjI0X09TUjQgICAgICAgICAgICAgICB8IE1QQzYyNF9PU1IyIHwgTVBDNjI0X09TUjEgfCBNUEM2MjRfT1NSMCkKLSNkZWZpbmUgTVBDNjI0X1NQRUVEXzI3XzVfSHogICAgKE1QQzYyNF9PU1I0IHwgTVBDNjI0X09TUjMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApCisjZGVmaW5lIE1QQzYyNF9TUEVFRF8yN181X0h6ICAgIChNUEM2MjRfT1NSNCB8IE1QQzYyNF9PU1IzKQogI2RlZmluZSBNUEM2MjRfU1BFRURfMTNfNzVfSHogICAoTVBDNjI0X09TUjQgfCBNUEM2MjRfT1NSMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBNUEM2MjRfT1NSMCkKICNkZWZpbmUgTVBDNj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TMiLAorCS5udW1fZG9fcG9ydHMgPSA4LAorCS5pbnZlcnRfb3V0cHV0cyA9IDF9LAogCXsKLQkgICAgICBkZXZfaWQ6CTB4NzA4OCwKLQkgICAgICBuYW1lOgkicGNpLTY1MTQiLAotCSAgICAgIG51bV9kaV9wb3J0czo0LAotCSAgICAgIG51bV9kb19wb3J0czo0LAotICAgICAgaW52ZXJ0X291dHB1dHM6MX0sCisJLmRldl9pZCA9IDB4NzA4OCwKKwkubmFtZSA9ICJwY2ktNjUxNCIsCisJLm51bV9kaV9wb3J0cyA9IDQsCisJLm51bV9kb19wb3J0cyA9IDQsCisJLmludmVydF9vdXRwdXRzID0gMX0sCiAJewotCSAgICAgIGRldl9pZDoJMHg3MENELAotCSAgICAgIG5hbWU6CSJweGktNjUxNCIsCi0JICAgICAgbnVtX2RpX3BvcnRzOjQsCi0JICAgICAgbnVtX2RvX3BvcnRzOjQsCi0gICAgICBpbnZlcnRfb3V0cHV0czoxfSwKKwkuZGV2X2lkID0gMHg3MENELAorCS5uYW1lID0gInB4aS02NTE0IiwKKwkubnVtX2RpX3BvcnRzID0gNCwKKwkubnVtX2RvX3BvcnRzID0gNCwKKwkuaW52ZXJ0X291dHB1dHMgPSAxfSwKIAl7Ci0JICAgICAgZGV2X2lkOgkweDcwODcsCi0JICAgICAgbmFtZToJInBjaS02NTE1IiwKLQkgICAgICBudW1fZGlfcG9ydHM6NCwKLQkgICAgICBudW1fZG9fcG9ydHM6NCwKLSAgICAgIGludmVydF9vdXRwdXRzOjF9LAorCS5kZXZfaWQgPSAweDcwODcsCisJLm5hbWUgPSAicGNpLTY1MTUiLAorCS5udW1fZGlfcG9ydHMgPSA0LAorCS5udW1fZG9fcG9ydHMgPSA0LAorCS5pbnZlcnRfb3V0cHV0cyA9IDF9LAogCXsKLQkgICAgICBkZXZfaWQ6CTB4NzBjOSwKLQkgICAgICBuYW1lOgkicHhpLTY1MTUiLAotCSAgICAgIG51bV9kaV9wb3J0czo0LAotCSAgICAgIG51bV9kb19wb3J0czo0LAotICAgICAgaW52ZXJ0X291dHB1dHM6MX0sCisJLmRldl9pZCA9IDB4NzBjOSwKKwkubmFtZSA9ICJweGktNjUxNSIsCisJLm51bV9kaV9wb3J0cyA9IDQsCisJLm51bV9kb19wb3J0cyA9IDQsCisJLmludmVydF9vdXRwdXRzID0gMX0sCiAJewotCSAgICAgIGRldl9pZDoJMHg3MTI1LAotCSAgICAgIG5hbWU6CSJwY2ktNjUxNiIsCi0JICAgICAgbnVtX2RvX3BvcnRzOjQsCi0gICAgICBpbnZlcnRfb3V0cHV0czoxfSwKKwkuZGV2X2lkID0gMHg3MTI1LAorCS5uYW1lID0gInBjaS02NTE2IiwKKwkubnVtX2RvX3BvcnRzID0gNCwKKwkuaW52ZXJ0X291dHB1dHMgPSAxfSwKIAl7Ci0JICAgICAgZGV2X2lkOgkweDcxMjYsCi0JICAgICAgbmFtZToJInBjaS02NTE3IiwKLQkgICAgICBudW1fZG9fcG9ydHM6NCwKLSAgICAgIGludmVydF9vdXRwdXRzOjF9LAorCS5kZXZfaWQgPSAweDcxMjYsCisJLm5hbWUgPSAicGNpLTY1MTciLAorCS5udW1fZG9fcG9ydHMgPSA0LAorCS5pbnZlcnRfb3V0cHV0cyA9IDF9LAogCXsKLQkgICAgICBkZXZfaWQ6CTB4NzEyNywKLQkgICAgICBuYW1lOgkicGNpLTY1MTgiLAotCSAgICAgIG51bV9kaV9wb3J0czoyLAotCSAgICAgIG51bV9kb19wb3J0czoyLAotICAgICAgaW52ZXJ0X291dHB1dHM6MX0sCisJLmRldl9pZCA9IDB4NzEyNywKKwkubmFtZSA9ICJwY2ktNjUxOCIsCisJLm51bV9kaV9wb3J0cyA9IDIsCisJLm51bV9kb19wb3J0cyA9IDIsCisJLmludmVydF9vdXRwdXRzID0gMX0sCiAJewotCSAgICAgIGRldl9pZDoJMHg3MTI4LAotCSAgICAgIG5hbWU6CSJwY2ktNjUxOSIsCi0JICAgICAgbnVtX2RpX3BvcnRzOjIsCi0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3dyaXRlKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMsCi0Jc3RydWN0IGNvbWVkaV9pbnNuICogaW5zbiwgdW5zaWduZWQgaW50ICogZGF0YSkKK3N0YXRpYyBpbnQgcGNsODEyX2FvX2luc25fd3JpdGUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7CiAJaW50IGNoYW4gPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKIAlpbnQgaTsKQEAgLTUyNyw4ICs1MjgsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNsODEyX2FvX2luc25fcmVhZChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjbDgxMl9hb19pbnNuX3JlYWQoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7CiAJaW50IGNoYW4gPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKIAlpbnQgaTsKQEAgLTU0Myw4ICs1NDQsOCBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNsODEyX2RpX2luc25fYml0cyhzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCXN0cnVjdCBjb21lZGlfaW5zbiAqIGluc24sIHVuc2lnbmVkIGludCAqIGRhdGEpCitzdGF0aWMgaW50IHBjbDgxMl9kaV9pbnNuX2JpdHMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7CiAJaWYgKGluc24tPm4gIT0gMikKIAkJcmV0dXJuIC1FSU5WQUw7CkBAIC01NTgsOCArNTU5LDggQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgaW50IHBjbDgxMl9kb19pbnNuX2JpdHMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKiBkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICogcywKLQlzdHJ1Y3QgY29tZWRpX2luc24gKiBpbnNuLCB1bnNpZ25lZCBpbnQgKiBkYXRhKQorc3RhdGljIGludCBwY2w4MTJfZG9faW5zbl9iaXRzKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCXN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQogewogCWlmIChpbnNuLT5uICE9IDIpCiAJCXJldHVybiAtRUlOVkFMOwpAQCAtNTc5LDE1ICs1ODAsMTUgQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgd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mW2RldnByaXYtPm5leHRfZG1hX2J1Zl07CiAJbGVuID0gKGRldnByaXYtPmRtYWJ5dGVzdG9tb3ZlW2RldnByaXYtPm5leHRfZG1hX2J1Zl0gPj4gMSkgLQpAQCAtMTA1Myw3ICsxMDU0LDcgQEAKIAl0cmFuc2Zlcl9mcm9tX2RtYV9idWYoZGV2LCBzLCBwdHIsIGJ1ZnB0ciwgbGVuKTsKIAogI2lmZGVmIFBDTDgxMl9FWFRERUJVRwotCXJ0X3ByaW50aygicGNsODEyIEVEQkc6IEVORDogaW50ZXJydXB0X3BjbDgxMl9haV9kbWEoLi4uKVxuIik7CisJcHJpbnRrKCJwY2w4MTIgRURCRzogRU5EOiBpbnRlcnJ1cHRfcGNsODEyX2FpX2RtYSguLi4pXG4iKTsKICNlbmRpZgogCXJldHVybiBJUlFfSEFORExFRDsKIH0KQEAgLTEwNjEsNyArMTA2Miw3IEBACiAvKgogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwotc3RhdGljIGlycXJldHVybl90IGludGVycnVwdF9wY2w4MTIoaW50IGlycSwgdm9pZCAqZCBQVF9SRUdTX0FSRykKK3N0YXRpYyBpcnFyZXR1cm5fdCBpbnRlcnJ1cHRfcGNsODEyKGludCBpcnEsIHZvaWQgKmQpCiB7CiAJc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA9IGQ7CiAKQEAgLTEwNzksMzMgKzEwODAsMzMgQEAKIC8qCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICovCi1zdGF0aWMgaW50IHBjbDgxMl9haV9wb2xsKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqIHMpCitzdGF0aWMgaW50IHBjbDgxMl9haV9wb2xsKHN0cnVjdC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ZmYsIGRldi0+aW9iYXNlICsgUENMODEyX0NUUjEpOwogCX0KICNpZmRlZiBQQ0w4MTJfRVhUREVCVUcKLQlydF9wcmludGsoInBjbDgxMiBFREJHOiBFTkQ6IHN0YXJ0X3BhY2VyKC4uLilcbiIpOworCXByaW50aygicGNsODEyIEVEQkc6IEVORDogc3RhcnRfcGFjZXIoLi4uKVxuIik7CiAjZW5kaWYKIH0KIAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyB2b2lkIGZyZWVfcmVzb3VyY2VzKHN0cnVjdCBjb21lZGlfZGV2aWNlICogZGV2KQorc3RhdGljIHZvaWQgZnJlZV9yZXNvdXJjZXMoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldikKIHsKIAogCWlmIChkZXYtPnByaXZhdGUpIHsKQEAgLTExOTYsNyArMTE5Nyw3IEBACiAJCQlmcmVlX2RtYShkZXZwcml2LT5kbWEpOwogCX0KIAlpZiAoZGV2LT5pcnEpCi0JCWNvbWVkaV9mcmVlX2lycShkZXYtPmlycSwgZGV2KTsKKwkJZnJlZV9pcnEoZGV2LT5pcnEsIGRldik7CiAJaWYgKGRldi0+aW9iYXNlKQogCQlyZWxlYXNlX3JlZ2lvbihkZXYtPmlvYmFzZSwgdGhpc19ib2FyZC0+aW9fcmFuZ2UpOwogfQpAQCAtMTIwNCwxOSArMTIwNSwxOSBAQAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLXN0YXRpYyBpbnQgcGNsODEyX2FpX2NhbmNlbChzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzKQorc3RhdGljIGludCBwY2w4MTJfYWlfY2FuY2VsKHN0cnVjdCBjb21lZGlfZ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IG1vZGUsIHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAorCWNvbWVkaV90cmlnICppdCkKIHsKIAlpbnQgZGl2aXNvcjEsIGRpdmlzb3IyOwogCkBAIC0xMDgwLDcgKzEwODgsNyBAQAogCWlmIChkZXZwcml2LT5pcnFfYmxvY2tlZCkKIAkJcmV0dXJuIC1FQlVTWTsKIAotCXN0YXJ0X3BhY2VyKGRldiwgLTEsIDAsIDApOwkvLyBzdG9wIHBhY2VyCisJc3RhcnRfcGFjZXIoZGV2LCAtMSwgMCwgMCk7CS8qICBzdG9wIHBhY2VyICovCiAKIAlkZXZwcml2LT5pbnQxM19hY3Rfc2NhbiA9IGl0LT5uOwogCWRldnByaXYtPmludDEzX2FjdF9jaGFuID0gMDsKQEAgLTExMjAsOCArMTEyOCw4IEBACiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgIEFOQUxPRyBPVVRQVVQgTU9ERSAxLCA4MTggY2FyZHMKICovCi1zdGF0aWMgaW50IHBjbDgxOF9hb19tb2RlMShzdHJ1Y3QgY29tZWRpX2RldmljZSAqIGRldiwgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKiBzLAotCWNvbWVkaV90cmlnICogaXQpCitzdGF0aWMgaW50IHBjbDgxOF9hb19tb2RlMShzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LCBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwljb21lZGlfdHJpZyAqaXQpCiB7CiAJcmV0dXJuIHBjbDgxOF9hb19tb2RlMTMoMSwgZGV2LCBzLCBpdCk7CiB9CkBAIC0xMTMwLDggKzExMzgsOCBAQAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICBBTkFM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NNRF9SRF9WRVJTSU9OICAweDBiICAgIC8qIGludGVybmFsIHVzYWdlICovCisjZGVmaW5lIFZNSzgwNjFfQ01EX1JEX0pNUF9TVEFUIDB4MGMgICAgLyogVE9ETzogbm90IGltcGxlbWVudGVkIHlldCAqLworI2RlZmluZSBWTUs4MDYxX0NNRF9SRF9QV1JfU1RBVCAweDBkICAgIC8qIGludGVybmFsIHVzYWdlICovCisjZGVmaW5lIFZNSzgwNjFfQ01EX1JEX0RPICAgICAgIDB4MGUKKyNkZWZpbmUgVk1LODA2MV9DTURfUkRfQU8gICAgICAgMHgwZgorI2RlZmluZSBWTUs4MDYxX0NNRF9SRF9QV00gICAgICAweDEwCisKKyNkZWZpbmUgVk1LODBYWF9NQVhfQk9BUkRTICAgICAgQ09NRURJX05VTV9CT0FSRF9NSU5PUlMKKworI2RlZmluZSBUUkFOU19PVVRfQlVTWSAgICAgICAgICAxCisjZGVmaW5lIFRSQU5TX0lOX0JVU1kgICAgICAgICAgIDIKKyNkZWZpbmUgVFJBTlNfSU5fUlVOTklORyAgICAgICAgMworCisjZGVmaW5lIElDM19WRVJTSU9OICAgICAgICAgICAgICgxIDw8IDApCisjZGVmaW5lIElDNl9WRVJTSU9OICAgICAgICAgICAgICgxIDw8IDEpCisKKyNkZWZpbmUgVVJCX1JDVl9GTEFHICAgICAgICAgICAgKDEgPDwgMCkKKyNkZWZpbmUgVVJCX1NORF9GTEFHICAgICAgICAgICAgKDEgPDwgMSkKKworI2RlZmluZSBDT05GSUdfVk1LODBYWF9ERUJVRworI3VuZGVmIENPTkZJR19WTUs4MFhYX0RFQlVHCisKKyNpZmRlZiBDT05GSUdfVk1LODBYWF9ERUJVRworIHN0YXRpYyBpbnQgZGJndm0gPSAxOworI2Vsc2UKKyBzdGF0aWMgaW50IGRiZ3ZtOworI2VuZGlmCisKKyNpZmRlZiBDT05GSUdfQ09NRURJX0RFQlVHCisgc3RhdGljIGludCBkYmdjbSA9IDE7CisjZWxzZQorIHN0YXRpYyBpbnQgZGJnY207CisjZW5kaWYKKworI2RlZmluZSBkYmd2bShmbXQsIGFyZy4uLikgICAgICAgICAgICAgICAgICAgICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoZGJndm0pICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXByaW50ayhLRVJOX0RFQlVHIGZtdCwgIyNhcmcpOyBcCit9IHdoaWxlICgwKQorCisjZGVmaW5lIGRiZ2NtKGZtdCwgYXJnLi4uKSAgICAgICAgICAgICAgICAgICAgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWlmIChkYmdjbSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJcHJpbnRrKEtFUk5fREVCVUcgZm10LCAjI2FyZyk7IFwKK30gd2hpbGUgKDApCisKK2VudW0gdm1rODB4eF9tb2RlbCB7CisJVk1LODA1NV9NT0RFTCwKKwlWTUs4MDYxX01PREVMCit9OworCitzdHJ1Y3QgZmlybXdhcmVfdmVyc2lvbiB7CisJdW5zaWduZWQgY2hhciBpYzNfdmVyc1szMl07IC8qIFVTQi1Db250cm9sbGVyICovCisJdW5zaWduZWQgY2hhciBpYzZfdmVyc1szMl07IC8qIENQVSAqLworfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBjb21lZGlfbHJhbmdlIHZtazgwNTVfcmFuZ2UgPSB7CisJMSwgeyBVTklfUkFOR0UoNSkgfQorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBjb21lZGlfbHJhbmdlIHZtazgwNjFfcmFuZ2UgPSB7CisJMiwgeyBVTklfUkFOR0UoNSksIFVOSV9SQU5HRSgxMCkgfQorfTsKKworc3RydWN0IHZtazgweHhfYm9hcmQgeworCWNvbnN0IGNoYXIgKm5hbWU7CisJZW51bSB2bWs4MHh4X21vZGVsIG1vZGVsOworCWNvbnN0IHN0cnVjdCBjb21lZGlfbHJhbmdl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4X2J1ZlswXSA9IGNtZDsKKwkJdm1rODB4eF9kb19idWxrX21zZyhkZXYpOworCisJCXJldHVybiAwOworCX0KKworCXVyYiA9IHVzYl9hbGxvY191cmIoMCwgR0ZQX0tFUk5FTCk7CisJaWYgKCF1cmIpCisJCXJldHVybiAtRU5PTUVNOworCisJdXJiLT5jb250ZXh0ID0gZGV2OworCXZtazgweHhfYnVpbGRfaW50X3VyYih1cmIsIFVSQl9TTkRfRkxBRyk7CisKKwlzZXRfYml0KFRSQU5TX09VVF9CVVNZLCAmZGV2LT5mbGFncyk7CisKKwl1c2JfYW5jaG9yX3VyYih1cmIsICZkZXYtPnR4X2FuY2hvcik7CisKKwlkZXYtPnVzYl90eF9idWZbMF0gPSBjbWQ7CisKKwlyZXR2YWwgPSB1c2Jfc3VibWl0X3VyYih1cmIsIEdGUF9LRVJORUwpOworCWlmICghcmV0dmFsKQorCQlnb3RvIGV4aXQ7CisKKwljbGVhcl9iaXQoVFJBTlNfT1VUX0JVU1ksICZkZXYtPmZsYWdzKTsKKwl1c2JfdW5hbmNob3JfdXJiKHVyYik7CisKK2V4aXQ6CisJdXNiX2ZyZWVfdXJiKHVyYik7CisKKwlyZXR1cm4gcmV0dmFsOworfQorCisjZGVmaW5lIERJUl9JTiAgMQorI2RlZmluZSBESVJfT1VUIDIKKworI2RlZmluZSBydWRpbWVudGFyeV9jaGVjayhkaXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoIWRldikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXJldHVybiAtRUZBVUxUOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKCFkZXYtPnByb2JlZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlyZXR1cm4gLUVOT0RFVjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWlmICghZGV2LT5hdHRhY2hlZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJcmV0dXJuIC1FTk9ERVY7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoKGRpcikgJiBESVJfSU4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWlmICh0ZXN0X2JpdChUUkFOU19JTl9CVVNZLCAmZGV2LT5mbGFncykpICBcCisJCQlyZXR1cm4gLUVCVVNZOyAgICAgICAgICAgICAgICAgICAgIFwKKwl9IGVsc2UgeyAgLyogRElSX09VVCAqLyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWlmICh0ZXN0X2JpdChUUkFOU19PVVRfQlVTWSwgJmRldi0+ZmxhZ3MpKSBcCisJCQlyZXR1cm4gLUVCVVNZOyAgICAgICAgICAgICAgICAgICAgIFwKKwl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9IHdoaWxlICgwKQorCitzdGF0aWMgaW50IHZtazgweHhfYWlfcmluc24oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmNkZXYsCisJCQkgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJCQkgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCit7CisJc3RydWN0IHZtazgweHhfdXNiICpkZXYgPSBjZGV2LT5wcml2YXRlOworCWludCBjaGFuLCByZWdbMl07CisJaW50IG47CisKKwlkYmd2bSgidm1rODB4eDogJXNcbiIsIF9fZnVuY19fKTsKKworCXJ1ZGltZW50YXJ5X2NoZWNrKERJUl9JTik7CisKKwlkb3duKCZkZXYtPmxpbWl0X3NlbSk7CisJY2hhbiA9IENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOworCisJc3dpdGNoIChkZXYtPmJvYXJkLm1vZGVsKSB7CisJY2FzZSBWTUs4MDU1X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hbiwgcmVnOworCWludCBuOworCisJZGJndm0oInZtazgweHg6ICVzXG4iLCBfX2Z1bmNfXyk7CisKKwlydWRpbWVudGFyeV9jaGVjayhESVJfSU4pOworCisJZG93bigmZGV2LT5saW1pdF9zZW0pOworCWNoYW4gPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKKworCXJlZyA9IFZNSzgwNjFfQU9fUkVHIC0gMTsKKworCWRldi0+dXNiX3R4X2J1ZlswXSA9IFZNSzgwNjFfQ01EX1JEX0FPOworCisJZm9yIChuID0gMDsgbiA8IGluc24tPm47IG4rKykgeworCQlpZiAodm1rODB4eF9yZWFkX3BhY2tldChkZXYpKQorCQkJYnJlYWs7CisKKwkJZGF0YVtuXSA9IGRldi0+dXNiX3J4X2J1ZltyZWcrY2hhbl07CisJfQorCisJdXAoJmRldi0+bGltaXRfc2VtKTsKKworCXJldHVybiBuOworfQorCitzdGF0aWMgaW50IHZtazgweHhfZGlfcmluc24oc3RydWN0IGNvbWVkaV9kZXZpY2UgKmNkZXYsCisJCQkgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJCQkgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCit7CisJc3RydWN0IHZtazgweHhfdXNiICpkZXYgPSBjZGV2LT5wcml2YXRlOworCWludCBjaGFuOworCXVuc2lnbmVkIGNoYXIgKnJ4X2J1ZjsKKwlpbnQgcmVnLCBpbnA7CisJaW50IG47CisKKwlkYmd2bSgidm1rODB4eDogJXNcbiIsIF9fZnVuY19fKTsKKworCXJ1ZGltZW50YXJ5X2NoZWNrKERJUl9JTik7CisKKwlkb3duKCZkZXYtPmxpbWl0X3NlbSk7CisJY2hhbiA9IENSX0NIQU4oaW5zbi0+Y2hhbnNwZWMpOworCisJcnhfYnVmID0gZGV2LT51c2JfcnhfYnVmOworCisJaWYgKGRldi0+Ym9hcmQubW9kZWwgPT0gVk1LODA2MV9NT0RFTCkgewor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lpZiAodm1rODB4eF9jaGVja19kYXRhX2xpbmsoZGV2KSkgeworCQkJdm1rODB4eF9yZWFkX2VlcHJvbShkZXYsIElDNl9WRVJTSU9OKTsKKwkJCXByaW50ayhLRVJOX0lORk8gImNvbWVkaSM6IHZtazgweHg6ICVzXG4iLAorCQkJICAgICAgIGRldi0+ZncuaWM2X3ZlcnMpOworCQl9IGVsc2UKKwkJCWRiZ2NtKCJjb21lZGkjOiB2bWs4MHh4OiBubyBjb25uLiB0byBDUFVcbiIpOworCX0KKworCWlmIChkZXYtPmJvYXJkLm1vZGVsID09IFZNSzgwNTVfTU9ERUwpCisJCXZtazgweHhfcmVzZXRfZGV2aWNlKGRldik7CisKKwlkZXYtPnByb2JlZCA9IDE7CisKKwlwcmludGsoS0VSTl9JTkZPICJjb21lZGkjOiB2bWs4MHh4OiBib2FyZCAjJWQgWyVzXSBub3cgYXR0YWNoZWRcbiIsCisJICAgICAgIGRldi0+Y291bnQsIGRldi0+Ym9hcmQubmFtZSk7CisKKwltdXRleF91bmxvY2soJmdsYl9tdXRleCk7CisKKwlyZXR1cm4gMDsKK2Vycm9yOgorCW11dGV4X3VubG9jaygmZ2xiX211dGV4KTsKKworCXJldHVybiAtRU5PREVWOworfQorCitzdGF0aWMgdm9pZCB2bWs4MHh4X2Rpc2Nvbm5lY3Qoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYpCit7CisJc3RydWN0IHZtazgweHhfdXNiICpkZXYgPSB1c2JfZ2V0X2ludGZkYXRhKGludGYpOworCisJZGJndm0oInZtazgweHg6ICVzXG4iLCBfX2Z1bmNfXyk7CisKKwlpZiAoIWRldikKKwkJcmV0dXJuOworCisJbXV0ZXhfbG9jaygmZ2xiX211dGV4KTsKKwlkb3duKCZkZXYtPmxpbWl0X3NlbSk7CisKKwlkZXYtPnByb2JlZCA9IDA7CisJdXNiX3NldF9pbnRmZGF0YShkZXYtPmludGYsIE5VTEwpOworCisJdXNiX2tpbGxfYW5jaG9yZWRfdXJicyg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LS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvY3BjLXVzYi9zamEybTE2Y18yLmMgYi9kcml2ZXJzL3N0YWdpbmcvY3BjLXVzYi9zamEybTE2Y18yLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYmYwMjMwZgotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9jcGMtdXNiL3NqYTJtMTZjXzIuYwpAQCAtMCwwICsxLDQ1MiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoKKyogICAgICBDb3B5cmlnaHQgKGMpIDIwMDMsMjAwNCBieSBFTVMgRHIuIFRob21hcyBXdWVuc2NoZQorKgorKiAgICAgICAgICAgICAgICAgIC0gQWxsIHJpZ2h0cyByZXNlcnZlZCAtCisqCisqIFRoaXMgY29kZSBpcyBwcm92aWRlZCAiYXMgaXMiIHdpdGhvdXQgd2FycmFudHkgb2YgYW55IGtpbmQsIGVpdGhlcgorKiBleHByZXNzZWQgb3IgaW1wbGllZCwgaW5jbHVkaW5nIGJ1dCBub3QgbGltaXRlZCB0byB0aGUgbGlhYmlsaXR5CisqIGNvbmNlcm5pbmcgdGhlIGZyZWVkb20gZnJvbSBtYXRlcmlhbCBkZWZlY3RzLCB0aGUgZml0bmVzcyBmb3IgcGFydGktCisqIGN1bGFyIHB1cnBvc2VzIG9yIHRoZSBmcmVlZG9tIG9mIHByb3ByaWV0YXJ5IHJpZ2h0cyBvZiB0aGlyZCBwYXJ0aWVzLgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogTW9kdWxlIG5hbWUuOiBjcGN1c2IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIEluY2x1ZGUgZmlsZTogY3BjLmgKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIFByb2plY3QuLi4uLjogV2luZG93cyBEcml2ZXIgRGV2ZWxvcG1lbnQgS2l0CisqIEZpbGVuYW1lLi4uLjogc2phMm0xNmMuY3BwCisqIEF1dGhvcnMuLi4uLjogKEdVKSBHZXJoYXJkIFV0dGVudGhhbGVyCisqICAgICAgICAgICAgICAgKENTKSBDaHJpc3RpYW4gU2Nob2V0dAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogU2hvcnQgZGVzY3IuOiBjb252ZXJ0cyBiYXVkcmF0ZSBiZXR3ZWVuIFNKQTEwMDAgYW5kIE0xNkMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIERlc2NyaXB0aW9uLjogaGFuZGxlcyB0aGUgYmF1ZHJhdGUgY29udmVyc2lvbiBmcm9tIFNKQTEwMDAgcGFyYW1ldGVycyB0bworKiAgICAgICAgICAgICAgIE0xNkMgcGFyYW1ldGVycworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogQWRkcmVzcyAgICAgOiBFTVMgRHIuIFRob21hcyBXdWVuc2NoZQorKiAgICAgICAgICAgICAgIFNvbm5lbmhhbmcgMworKiAgICAgICAgICAgICAgIEQtODUzMDQgSWxtbXVlbnN0ZXIKKyogICAgICAgICAgICAgICBUZWwuIDogKzQ5LTg0NDEtNDkwMjYwCisqICAgICAgICAgICAgICAgRmF4LiA6ICs0OS04NDQxLTgxODYwCisqICAgICAgICAgICAgICAgZW1haWw6IHN1cHBvcnRAZW1zLXd1ZW5zY2hlLmNvbQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgSGlzdG9yeQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogVmVyc2lvbiAgRGF0ZSAgICAgICAgQXV0aCBSZW1hcmsKKyoKKyogMDEuMDAgICAgPz8gICAgICAgICAgR1UgICAtIGluaXRpYWwgcmVsZWFzZQorKiAwMS4xMCAgICA/Pz8/Pz8/Pz8/ICBDUyAgIC0gYWRhcHRlZCB0byBmaXQgaW50byB0aGUgVVNCIFdpbmRvd3MgZHJpdmVyCisqIDAyLjAwICAgIDE4LjA4LjIwMDQgIEdVICAgLSBpbXByb3ZlZCB0aGUgYmF1ZHJhdGUgY2FsY3VsYXRpbmcgYWxnb3JpdGhtCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBpbXBsZW1lbnRlZCBhY2NlcHRhbmNlIGZpbHRlcmluZworKiAwMi4xMCAgICAxMC4wOS4yMDA0ICBDUyAgIC0gYWRhcHRlZCB0byBmaXQgaW50byB0aGUgVVNCIFdpbmRvd3MgZHJpdmVyCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBUb0RvJ3MKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICBJIE4gQyBMIFUgRCBFIFMKKyovCisjaW5jbHVkZSA8bGludXgva2VybmVsLmg+CisjaW5jbHVkZSA8bGludXgvZXJybm8uaD4KKyNpbmNsdWRlIDxsaW51eC9pbml0Lmg+CisjaW5jbHVkZSA8bGludXgvc2xhYi5oPgorI2luY2x1ZGUgPGxpbnV4L3ZtYWxsb2MuaD4KKyNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KKyNpbmNsdWRlIDxsaW51eC9wb2xsLmg+CisjaW5jbHVkZSA8bGludXgvc21wX2xvY2suaD4KKyNpbmNsdWRlIDxsaW51eC9jb21wbGV0aW9uLmg+CisjaW5jbHVkZSA8YXNtL3VhY2Nlc3MuaD4KKyNpbmNsdWRlIDxsaW51eC91c2IuaD4KKworI2luY2x1ZGUgImNwYy5oIgorI2luY2x1ZGUgImNwY19pbnQuaCIKKyNpbmNsdWRlICJjcGN1c2IuaCIKKworI2luY2x1ZGUgInNqYTJtMTZjLmgiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgYmF1ZHJhdGVfbTE2YyhpbnQgY2xrLCBpbnQgYnJwLCBpbnQgcHIsIGludCBwaDEsIGludCBwaDIpCit7CisJcmV0dXJuICgxNjAwMDAwMCAvICgxIDw8IGNsaykpIC8gMiAvIChicnAgKyAxKSAvICgxICsgcHIgKyAxICsKKwkJCQkJCQkgICAgcGgxICsgMSArIHBoMiArCisJCQkJCQkJICAgIDEpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgc2FtcGxlcG9pbnRfbTE2YyhpbnQgYnJwLCBpbnQgcHIsIGludCBwaDEsIGludCBwaDIpCit7CisJcmV0dXJuICgxMDAgKiAoMSArIHByICsgMSArIHBoMSArIDEpKSAvICgxICsgcHIgKyAxICsgcGgxICsgMSArCisJCQkJCQkgIHBoMiArIDEpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIEZ1bmN0aW9uLi4uLi46IFNKQTEwMDBfVE9fTTE2Q19CQVNJQ19QYXJhbXMKKyoKKyogVGFzay4uLi4uLi4uLjogVGhpcyByb3V0aW5lIGNvbnZlcnRzIFNKQTEwMDAgQ0FOIGJ0ciBwYXJhbWV0ZXJzIGludG8gTTE2QworKiAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzIGJhc2VkIG9uIHRoZSBzYW1wbGUgcG9pbnQgYW5kIHRoZSBlcnJvci4gSW4KKyogICAgICAgICAgICAgICAgYWRkaXRpb24gaXQgY29udmVydHMgdGhlIGFjY2VwdGFuY2UgZmlsdGVyIHBhcmFtZXRlcnMgdG8KKyogICAgICAgICAgICAgICAgc3VpdCB0aGUgTTE2QyBwYXJhbWV0ZXJzCisqCisqIFBhcmFtZXRlcnMuLi46IE5vbmUKKyoKKyogUmV0dXJuIHZhbHVlczogTm9uZQorKgorKiBDb21tZW50cy4uLi4uOgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgSGlzdG9yeQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogMTkuMDEuMjAwNSAgQ1MgICAtIG1vZGlmZWQgdGhlIGNvbnZlcnNpb24gb2YgU0pBMTAwMCBmaWx0ZXIgcGFyYW1zIGludG8KKyogICAgICAgICAgICAgICAgICAgIE0xNkMgcGFyYW1zLiBEdWUgdG8gY29tcGF0aWJpbGl0eSByZWFzb25zIHdpdGggdGhlCisqICAgICAgICAgICAgICAgICAgICBvbGRlciA4MkMyMDAgQ0FOIGNvbnRyb2xsZXIgdGhlIFNKQTEwMDAKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgU0pBMTAwMF9UT19NMTZDX0JBU0lDX1BhcmFtcyhDUENfTVNHX1QgKiBpbikKK3sKKwlpbnQgc2phQmF1ZHJhdGU7CisJaW50IHNqYVNhbXBsZXBvaW50OworCWludCAqYmF1ZHJhdGVfZXJyb3I7CS8vIEJSUFswLi4xNV0sIFBSWzAuLjddLCBQSDFbMC4uN10sIFBIMlswLi43XQorCWludCAqc2FtcGxlcG9pbnRfZXJyb3I7CS8vIEJSUFswLi4xNV0sIFBSWzAuLjddLCBQSDFbMC4uN10sIFBIMlswLi43XQorCWludCBiYXVkcmF0ZV9lcnJvcl9tZXJrOworCWludCBjbGssIGJycCwgcHIsIHBoMSwgcGgyOworCWludCBjbGtfbWVyaywgYnJwX21lcmssIHByX21lcmssIHBoMV9tZXJrLCBwaDJfbWVyazsKKwlpbnQgaW5kZXg7CisJdW5zaWduZWQgY2hhciBhY2NfY29kZTAsIGFjY19jb2RlMSwgYWNjX2NvZGUyLCBhY2NfY29kZTM7CisJdW5zaWduZWQgY2hhciBhY2NfbWFzazAsIGFjY19tYXNrMSwgYWNjX21hc2syLCBhY2NfbWFzazM7CisJQ1BDX01TR19UICogb3V0OworCUMwQ09OUl9UIGMwY29uOworCUMxQ09OUl9UIGMxY29uOworCWludCB0bXBBY2NDb2RlOworCWludCB0bXBBY2NNYXNrOworCisJICAgIC8vIHdlIGhhdmUgdG8gY29udmVydCB0aGUgcGFyYW1ldGVycyBpbnRvIE0xNkMgcGFyYW1ldGVycworCSAgICBDUENfU0pBMTAwMF9QQVJBTVNfVCAqIHBQYXJhbXM7CisKKwkgICAgLy8gY2hlY2sgaWYgdGhlIHR5cGUgaXMgQ0FOIHBhcmFtZXRlcnMgYW5kIGlmIHdlIGhhdmUgdG8gY29udmVydCB0aGUgZ2l2ZW4gcGFyYW1zCisJICAgIGlmIChpbi0+dHlwZSAhPSBDUENfQ01EX1RfQ0FOX1BSTVMKK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5ZX0lELAotCSBQQ0lfQU5ZX0lELCAwLCAwLCAwfSwKLQl7UENJX1ZFTkRPUl9JRF9NRUlMSEFVUywgUENJX0RFVklDRV9JRF9NRUlMSEFVU19NRTA5NjAsIFBDSV9BTllfSUQsCi0JIFBDSV9BTllfSUQsIDAsIDAsIDB9LAotCi0JezB9Ci19OwotCi1NT0RVTEVfREVWSUNFX1RBQkxFKHBjaSwgbWVfcGNpX3RhYmxlKTsKLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICBVU0IgZGV2aWNlIHRhYmxlLgotICBUaGlzIGlzIHVzZWQgYnkgbW9kcHJvYmUgdG8gdHJhbnNsYXRlIFVTQiBJRHMgdG8gZHJpdmVycy4KLSAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLS8qCi1zdGF0aWMgc3RydWN0IHVzYl9kZXZpY2VfaWQgbWVfdXNiX3RhYmxlW10gX19kZXZpbml0ZGF0YSA9IHsKLQl7IFVTQl9ERVZJQ0UoVVNCX1ZFTkRPUl9JRF9NRVBISVNUT19TMSwgVVNCX0RFVklDRV9JRF9NRVBISVNUT19TMSkgfSwKLQl7IDAgfQotfTsKLQotTU9EVUxFX0RFVklDRV9UQUJMRSAodXNiLCBtZV91c2JfdGFibGUpOwotKi8KLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICBUZW1wbGF0ZXMKICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL29jdGVvbi9LY29uZmlnIGIvZHJpdmVycy9zdGFnaW5nL29jd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pCit7CisJdW5pb24geworCQl1aW50NjRfdCBpODsKKwkJY3ZteF9mYXVfdGFnd2FpdDhfdCB0OworCX0gcmVzdWx0OworCXJlc3VsdC5pOCA9IGN2bXhfcmVhZDY0X2ludDgoX19jdm14X2ZhdV9hdG9taWNfYWRkcmVzcygxLCByZWcsIHZhbHVlKSk7CisJcmV0dXJuIHJlc3VsdC50OworfQorCisvKioKKyAqIEJ1aWxkcyBJL08gZGF0YSBmb3IgYXN5bmMgb3BlcmF0aW9ucworICoKKyAqIEBzY3JhZGRyOiBTY3JhdGNoIHBhZCBieXRlIGFkZHJlcyB0byB3cml0ZSB0by4gIE11c3QgYmUgOCBieXRlIGFsaWduZWQKKyAqIEB2YWx1ZTogICBTaWduZWQgdmFsdWUgdG8gYWRkLgorICogICAgICAgICAgICAgICAgTm90ZTogV2hlbiBwZXJmb3JtaW5nIDMyIGFuZCA2NCBiaXQgYWNjZXNzLCBvbmx5IHRoZSBsb3cKKyAqICAgICAgICAgICAgICAgIDIyIGJpdHMgYXJlIGF2YWlsYWJsZS4KKyAqIEB0YWd3YWl0OiBTaG91bGQgdGhlIGF0b21pYyBhZGQgd2FpdCBmb3IgdGhlIGN1cnJlbnQgdGFnIHN3aXRjaAorICogICAgICAgICAgICAgICAgb3BlcmF0aW9uIHRvIGNvbXBsZXRlLgorICogICAgICAgICAgICAgICAgLSAwID0gRG9uJ3Qgd2FpdAorICogICAgICAgICAgICAgICAgLSAxID0gV2FpdCBmb3IgdGFnIHN3aXRjaCB0byBjb21wbGV0ZQorICogQHNpemU6ICAgIFRoZSBzaXplIG9mIHRoZSBvcGVyYXRpb246CisgKiAgICAgICAgICAgICAgICAtIENWTVhfRkFVX09QX1NJWkVfOCAgKDApID0gOCBiaXRzCisgKiAgICAgICAgICAgICAgICAtIENWTVhfRkFVX09QX1NJWkVfMTYgKDEpID0gMTYgYml0cworICogICAgICAgICAgICAgICAgLSBDVk1YX0ZBVV9PUF9TSVpFXzMyICgyKSA9IDMyIGJpdHM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bXhfZ214eF9yeF9icF9vZmZ4X3MgY241OHh4OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb2ZmeF9zIGNuNTh4eHAxOworfTsKKwordW5pb24gY3ZteF9nbXh4X3J4X2JwX29ueCB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgeworCQl1aW50NjRfdCByZXNlcnZlZF85XzYzOjU1OworCQl1aW50NjRfdCBtYXJrOjk7CisJfSBzOworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY24zMHh4OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY24zMXh4OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY24zOHh4OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY24zOHh4cDI7CisJc3RydWN0IGN2bXhfZ214eF9yeF9icF9vbnhfcyBjbjUweHg7CisJc3RydWN0IGN2bXhfZ214eF9yeF9icF9vbnhfcyBjbjUyeHg7CisJc3RydWN0IGN2bXhfZ214eF9yeF9icF9vbnhfcyBjbjUyeHhwMTsKKwlzdHJ1Y3QgY3ZteF9nbXh4X3J4X2JwX29ueF9zIGNuNTZ4eDsKKwlzdHJ1Y3QgY3ZteF9nbXh4X3J4X2JwX29ueF9zIGNuNTZ4eHAxOworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY241OHh4OworCXN0cnVjdCBjdm14X2dteHhfcnhfYnBfb254X3MgY241OHh4cDE7Cit9OworCit1bmlvbiBjdm14X2dteHhfcnhfaGcyX3N0YXR1cyB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X2dteHhfcnhfaGcyX3N0YXR1c19zIHsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfNDhfNjM6MTY7CisJCXVpbnQ2NF90IHBodGltMmdvOjE2OworCQl1aW50NjRfdCB4b2Y6MTY7CisJCXVpbnQ2NF90IGxndGltMmdvOjE2OworCX0gczs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HJpZXM6CisgKiAgICAgICAgICAgICAgIE51bWJlciBvZiB3b3JrIHF1ZXVlIGVudHJpZXMKKyAqIEBwa29fYnVmZmVyczoKKyAqICAgICAgICAgICAgICAgUEtPIENvbW1hbmQgYnVmZmVycy4gWW91IHNob3VsZCBhdCBtaW5pbXVtIGhhdmUgdHdvIHBlcgorICogICAgICAgICAgICAgICBlYWNoIFBLTyBxdWV1ZS4KKyAqIEB0aW1fYnVmZmVyczoKKyAqICAgICAgICAgICAgICAgVElNIHJpbmcgYnVmZmVyIGNvbW1hbmQgcXVldWVzLiBBdCBsZWFzdCB0d28gcGVyIHRpbWVyIGJ1Y2tldAorICogICAgICAgICAgICAgICBpcyByZWNvbW1lbmVkLgorICogQGRmYV9idWZmZXJzOgorICogICAgICAgICAgICAgICBERkEgY29tbWFuZCBidWZmZXIuIEEgcmVsYXRpdmVseSBzbWFsbCAoMzIgZm9yIGV4YW1wbGUpCisgKiAgICAgICAgICAgICAgIG51bWJlciBzaG91bGQgd29yay4KKyAqIFJldHVybnMgWmVybyBvbiBzdWNjZXNzLCBub24temVybyBpZiBvdXQgb2YgbWVtb3J5CisgKi8KK2V4dGVybiBpbnQgY3ZteF9oZWxwZXJfaW5pdGlhbGl6ZV9mcGEoaW50IHBhY2tldF9idWZmZXJzLAorCQkJCSAgICAgIGludCB3b3JrX3F1ZXVlX2VudHJpZXMsIGludCBwa29fYnVmZmVycywKKwkJCQkgICAgICBpbnQgdGltX2J1ZmZlcnMsIGludCBkZmFfYnVmZmVycyk7CisKKyNlbmRpZiAvKiBfX0NWTVhfSEVMUEVSX0hfXyAqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL29jdGVvbi9jdm14LWhlbHBlci1sb29wLmMgYi9kcml2ZXJzL3N0YWdpbmcvb2N0ZW9uL2N2bXgtaGVscGVyLWxvb3AuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41NWE1NzFhCi0tLSAvZGV2L251b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2ZSBvbiBmYWlsdXJlCisgKi8KK3N0YXRpYyBpbnQgX19jdm14X2hlbHBlcl9zZ21paV9oYXJkd2FyZV9pbml0KGludCBpbnRlcmZhY2UsIGludCBudW1fcG9ydHMpCit7CisJaW50IGluZGV4OworCisJX19jdm14X2hlbHBlcl9zZXR1cF9nbXgoaW50ZXJmYWNlLCBudW1fcG9ydHMpOworCisJZm9yIChpbmRleCA9IDA7IGluZGV4IDwgbnVtX3BvcnRzOyBpbmRleCsrKSB7CisJCWludCBpcGRfcG9ydCA9IGN2bXhfaGVscGVyX2dldF9pcGRfcG9ydChpbnRlcmZhY2UsIGluZGV4KTsKKwkJX19jdm14X2hlbHBlcl9zZ21paV9oYXJkd2FyZV9pbml0X29uZV90aW1lKGludGVyZmFjZSwgaW5kZXgpOworCQlfX2N2bXhfaGVscGVyX3NnbWlpX2xpbmtfc2V0KGlwZF9wb3J0LAorCQkJCQkgICAgIF9fY3ZteF9oZWxwZXJfc2dtaWlfbGlua19nZXQKKwkJCQkJICAgICAoaXBkX3BvcnQpKTsKKworCX0KKworCXJldHVybiAwOworfQorCisvKioKKyAqIFByb2JlIGEgU0dNSUkgaW50ZXJmYWNlIGFuZCBkZXRlcm1pbmUgdGhlIG51bWJlciBvZiBwb3J0cworICogY29ubmVjdGVkIHRvIGl0LiBUaGUgU0dNSUkgaW50ZXJmYWNlIHNob3VsZCBzdGlsbCBiZSBkb3duIGFmdGVyCisgKiB0aGlzIGNhbGwuCisgKgorICogQGludGVyZmFjZTogSW50ZXJmYWNlIHRvIHByb2JlCisgKgorICogUmV0dXJucyBOdW1iZXIgb2YgcG9ydHMgb24gdGhlIGludGVyZmFjZS4gWmVybyB0byBkaXNhYmxlLgorICovCitpbnQgX19jdm14X2hlbHBlcl9zZ21paV9wcm9iZShpbnQgaW50ZXJmYWNlKQoreworCXVuaW9uIGN2bXhfZ214eF9pbmZfbW9kZSBtb2RlOworCisJLyoKKwkgKiBEdWUgdG8gZXJyYXRhIEdNWC03MDAgb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qLworCQlwa29fY29tbWFuZC51NjQgPSAwOworCQlwa29fY29tbWFuZC5zLnNlZ3MgPSBudW1fc2VnczsKKwkJcGtvX2NvbW1hbmQucy50b3RhbF9ieXRlcyA9IHNpemU7CisJCXBrb19jb21tYW5kLnMuZG9udGZyZWUgPSAwOworCQlwa29fY29tbWFuZC5zLmdhdGhlciA9IDE7CisKKwkJZ214X2NmZy51NjQgPQorCQkgICAgY3ZteF9yZWFkX2NzcihDVk1YX0dNWFhfUFJUWF9DRkcKKwkJCQkgIChJTkRFWChGSVhfSVBEX09VVFBPUlQpLAorCQkJCSAgIElOVEVSRkFDRShGSVhfSVBEX09VVFBPUlQpKSk7CisJCWdteF9jZmcucy5lbiA9IDE7CisJCWN2bXhfd3JpdGVfY3NyKENWTVhfR01YWF9QUlRYX0NGRworCQkJICAgICAgIChJTkRFWChGSVhfSVBEX09VVFBPUlQpLAorCQkJCUlOVEVSRkFDRShGSVhfSVBEX09VVFBPUlQpKSwgZ214X2NmZy51NjQpOworCQljdm14X3dyaXRlX2NzcihDVk1YX0FTWFhfVFhfUFJUX0VOKElOVEVSRkFDRShGSVhfSVBEX09VVFBPUlQpKSwKKwkJCSAgICAgICAxIDw8IElOREVYKEZJWF9JUERfT1VUUE9SVCkpOworCQljdm14X3dyaXRlX2NzcihDVk1YX0FTWFhfUlhfUFJUX0VOKElOVEVSRkFDRShGSVhfSVBEX09VVFBPUlQpKSwKKwkJCSAgICAgICAxIDw8IElOREVYKEZJWF9JUERfT1VUUE9SVCkpOworCisJCW10dSA9CisJCSAgICBjdm14X3JlYWRfY3NyKENWTVhfR01YWF9SWFhfSkFCQkVSCisJCQkJICAoSU5ERVgoRklYX0lQRF9PVVRQT1JUKSwKKwkJCQkgICBJTlRFUkZBQ0UoRklYX0lQRF9PVVRQT1JUKSkpOworCQljdm14X3dyaXRlX2NzcihDVk1YX0dNWFhfUlhYX0pBQkJFUgorCQkJICAgICAgIChJTkRFWChGSVhfSVBEX09VVFBPUlQpLAorCQk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X21zay5zLmRyd25uZyA9IDE7CisJCXNweF9pbnRfbXNrLnMuY2xzZXJyID0gMTsKKwkJc3B4X2ludF9tc2sucy5zcGlvdnIgPSAxOworCQkvKiBTa2lwcGluZyBzcHhfaW50X21zay5zLnJlc2VydmVkXzJfMyAqLworCQlzcHhfaW50X21zay5zLmFibm9ybSA9IDE7CisJCXNweF9pbnRfbXNrLnMucHJ0bnhhID0gMTsKKwl9CisJaWYgKE9DVEVPTl9JU19NT0RFTChPQ1RFT05fQ041OFhYKSkgeworCQkvKiBTa2lwcGluZyBzcHhfaW50X21zay5zLnJlc2VydmVkXzEyXzYzICovCisJCXNweF9pbnRfbXNrLnMuY2FsZXJyID0gMTsKKwkJc3B4X2ludF9tc2sucy5zeW5jZXJyID0gMTsKKwkJc3B4X2ludF9tc2sucy5kaXBlcnIgPSAxOworCQlzcHhfaW50X21zay5zLnRwYW92ciA9IDE7CisJCXNweF9pbnRfbXNrLnMucnN2ZXJyID0gMTsKKwkJc3B4X2ludF9tc2sucy5kcndubmcgPSAxOworCQlzcHhfaW50X21zay5zLmNsc2VyciA9IDE7CisJCXNweF9pbnRfbXNrLnMuc3Bpb3ZyID0gMTsKKwkJLyogU2tpcHBpbmcgc3B4X2ludF9tc2sucy5yZXNlcnZlZF8yXzMgKi8KKwkJc3B4X2ludF9tc2sucy5hYm5vcm0gPSAxOworCQlzcHhfaW50X21zay5zLnBydG54YSA9IDE7CisJfQorCWN2bXhfd3JpdGVfY3NyKENWTVhfU1BYWF9JTlRfTVNLKGluZGV4KSwgc3B4X2ludF9tc2sudTY0KTsKK30KKy8qKgorICogX19jdm14X2ludGVycnVwdF9zdHh4X2ludF9tc2tfZW5hYmxlIGVuYWJsZXMgYWxsIGludGVycnVwdCBiaXRzIGluIGN2bXhfc3R4eF9pbnRfbXNrX3QKKyAqLwordm9pZCBfX2N2bXhfaW50ZXJydXB0X3N0eHhfaW50X21za19lbmFibGUoaW50IGluZGV4KQoreworCXVuaW9uIGN2bXhfc3R4e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VChidXNfaWQpLCBzbWlfd3IudTY0KTsKKworCXNtaV9jbWQudTY0ID0gMDsKKwlzbWlfY21kLnMucGh5X29wID0gTURJT19DTEFVU0VfNDVfQUREUkVTUzsKKwlzbWlfY21kLnMucGh5X2FkciA9IHBoeV9pZDsKKwlzbWlfY21kLnMucmVnX2FkciA9IGRldmljZTsKKwljdm14X3dyaXRlX2NzcihDVk1YX1NNSVhfQ01EKGJ1c19pZCksIHNtaV9jbWQudTY0KTsKKworCWRvIHsKKwkJY3ZteF93YWl0KDEwMDApOworCQlzbWlfd3IudTY0ID0gY3ZteF9yZWFkX2NzcihDVk1YX1NNSVhfV1JfREFUKGJ1c19pZCkpOworCX0gd2hpbGUgKHNtaV93ci5zLnBlbmRpbmcgJiYgLS10aW1lb3V0KTsKKwlpZiAodGltZW91dCA8PSAwKSB7CisJCWN2bXhfZHByaW50ZigiY3ZteF9tZGlvXzQ1X3JlYWQ6IGJ1c19pZCAlZCBwaHlfaWQgJTJkICIKKwkJCSAgICAgImRldmljZSAlMmQgcmVnaXN0ZXIgJTJkICAgVElNRSBPVVQoYWRkcmVzcylcbiIsCisJCSAgICAgYnVzX2lkLCBwaHlfaWQsIGRldmljZSwgbG9jYXRpb24pOworCQlyZXR1cm4gLTE7CisJfQorCisJc21pX2NtZC51NjQgPSAwOworCXNtaV9jbWQucy5waHlfb3AgPSBNRElPX0NMQVVTRV80NV9SRUFEOworCXNtaV9jbWQucy5waHlfYWRyID0gcGh5X2lkOworCXNtaV9jbWQucy5yZWdfYWRyID0gZGV2aWNlOworCWN2bXhfd3JpdGVfY3NyKENWTVhfU01JWF9DTUQoYnVzX2lkKSwgc21pX2NtZC51NjQpOworCisJZG8geworCQljdm14X3dhaXQoMTAwMCk7CisJCXNtaV9yZC51NjQgPSBjdm14X3JlYWRfY3NyKENWTVhfU01JWF9SRF9EQVQoYnVzX2lkKSk7CisJfSB3aGlsZSAoc21pX3JkLnMucGVuZGluZyAmJiB0aW1lb3V0LS0pOworCisJaWY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N0IGN2bXhfcGlwX3BydF9jZmd4X2NuMzB4eCB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzM3XzYzOjI3OworCQl1aW50NjRfdCByYXdkcnA6MTsKKwkJdWludDY0X3QgdGFnX2luYzoyOworCQl1aW50NjRfdCBkeW5fcnM6MTsKKwkJdWludDY0X3QgaW5zdF9oZHI6MTsKKwkJdWludDY0X3QgZ3JwX3dhdDo0OworCQl1aW50NjRfdCByZXNlcnZlZF8yN18yNzoxOworCQl1aW50NjRfdCBxb3M6MzsKKwkJdWludDY0X3QgcW9zX3dhdDo0OworCQl1aW50NjRfdCByZXNlcnZlZF8xOF8xOToyOworCQl1aW50NjRfdCBxb3NfZGlmZjoxOworCQl1aW50NjRfdCBxb3NfdmxhbjoxOworCQl1aW50NjRfdCByZXNlcnZlZF8xMF8xNTo2OworCQl1aW50NjRfdCBtb2RlOjI7CisJCXVpbnQ2NF90IHJlc2VydmVkXzdfNzoxOworCQl1aW50NjRfdCBza2lwOjc7CisJfSBjbjMweHg7CisJc3RydWN0IGN2bXhfcGlwX3BydF9jZmd4X2NuMzB4eCBjbjMxeHg7CisJc3RydWN0IGN2bXhfcGlwX3BydF9jZmd4X2NuMzh4eCB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzM3XzYzOjI3OworCQl1aW50NjRfdCByYXdkcnA6MTsKKwkJdWludDY0X3QgdGFnX2luYzoyOworCQl1aW50NjRfdCBkeW5fcnM6MTsKKwkJdWludDY0X3QgaW5zdF9oZHI6MTsKKwkJdWludDY0X3QgZ3JwX3dhdDo0OworCQl1aW50NjRfdCByZXNlcnZlZF8yN18yNzoxOworCQl1aW50NjRfdCBxb3M6MzsKKwkJdWludDY0X3QgcW9zX3dhdDo0OworCQl1aW50NjRfdCByZXNlcnZlZF8xOF8xOToyOworCQl1aW50NjRfdCBxb3NfZGlmZjoxOworCQl1aW50NjRfdCBxb3NfdmxhbjoxOworCQl1aW50NjRfdCByZXNlcnZlZF8xM18xNTozOworCQl1aW50N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oaW50KXByaW9yaXR5W3F1ZXVlXSkgeworCQljYXNlIDA6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4MDA7CisJCQlicmVhazsKKwkJY2FzZSAxOgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweDAxOworCQkJYnJlYWs7CisJCWNhc2UgMjoKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHgxMTsKKwkJCWJyZWFrOworCQljYXNlIDM6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4NDk7CisJCQlicmVhazsKKwkJY2FzZSA0OgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweDU1OworCQkJYnJlYWs7CisJCWNhc2UgNToKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHg1NzsKKwkJCWJyZWFrOworCQljYXNlIDY6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4Nzc7CisJCQlicmVhazsKKwkJY2FzZSA3OgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweDdmOworCQkJYnJlYWs7CisJCWNhc2UgODoKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHhmZjsKKwkJCWJyZWFrOworCQljYXNlIENWTVhfUEtPX1FVRVVFX1NUQVRJQ19QUklPUklUWToKKwkJCS8qIFBhc3MgMSB3aWxsIGZhbGwgdGhyb3VnaCB0byB0aGUgZXJyb3IgY2FzZSAqLworCQkJaWYgKCFjdm14X29jdGVvbl9pc19wYXNzMSgpKSB7CisJCQkJY29uZmlnLnMucW9zX21hc2sgPSAweGZmOworCQkJCWJyZWFrOworCQkJfQorCQlkZWZhdWx0OgorCQkJY3ZteF9kcHJpbnRmKCJFUlJPUjogY3ZteF9wa29fY29uZmlnX3BvcnQ6IEludmFsaWQgIgorCQkJCSAgICAgInByaW9yaXR5ICVsbHVcbiIsCisJCQkJKHVuc2lnbmVkIGxvbmcgbG9uZylwcmlvcml0eVtxdWV1ZV0pOworCQkJY29uZmlnLnMucW9zX21hc2sgPSAweGZmOworCQkJcmVzdWx0X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N2bXhfd3JpdGVfY3NyKENWTVhfUE9XX1BQX0dSUF9NU0tYKGNvcmVfbnVtKSwgZ3JwX21zay51NjQpOworfQorCisvKioKKyAqIFRoaXMgZnVuY3Rpb24gc2V0cyBQT1cgc3RhdGljIHByaW9yaXRpZXMgZm9yIGEgY29yZS4gRWFjaCBpbnB1dCBxdWV1ZSBoYXMKKyAqIGFuIGFzc29jaWF0ZWQgcHJpb3JpdHkgdmFsdWUuCisgKgorICogQGNvcmVfbnVtOiAgIGNvcmUgdG8gYXBwbHkgcHJpb3JpdGllcyB0bworICogQHByaW9yaXR5OiAgIFZlY3RvciBvZiA4IHByaW9yaXRpZXMsIG9uZSBwZXIgUE9XIElucHV0IFF1ZXVlICgwLTcpLgorICogICAgICAgICAgICAgICAgICAgSGlnaGVzdCBwcmlvcml0eSBpcyAwIGFuZCBsb3dlc3QgaXMgNy4gQSBwcmlvcml0eSB2YWx1ZQorICogICAgICAgICAgICAgICAgICAgb2YgMHhGIGluc3RydWN0cyBQT1cgdG8gc2tpcCB0aGUgSW5wdXQgUXVldWUgd2hlbgorICogICAgICAgICAgICAgICAgICAgc2NoZWR1bGluZyB0byB0aGlzIHNwZWNpZmljIGNvcmUuCisgKiAgICAgICAgICAgICAgICAgICBOT1RFOiBwcmlvcml0aWVzIHNob3VsZCBub3QgaGF2ZSBnYXBzIGluIHZhbHVlcywgbWVhbmluZworICogICAgICAgICAgICAgICAgICAgICAgICAgezAsMSwxLDEsMSwxLDEsMX0gaXMgYSB2YWxpZCBjb25maWd1cmF0aW9uIHdoaWxlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICB7MCwyLDIsMiwyLDIsMiwyfSBpcyBub3QuCisgKi8KK3N0YXRpYyBpbmxpbmUgdm9pZCBjdm14X3Bvd19zZXRfcHJpb3JpdHkodWludDY0X3QgY29yZV9udW0sCisJCQkJCSBjb25zdCB1aW50OF90IHByaW9yaXR5W10pCit7CisJLyogUE9XIHByaW9yaXRpZXMgYXJlIHN1cHBvcn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isgKgorICogUmV0dXJucyBaZXJvIG9uIHN1Y2Nlc3MsIG5vbi16ZXJvIGVycm9yIGNvZGUgb24gZmFpbHVyZSAod2lsbCBjYXVzZQorICogU1BJIGluaXRpYWxpemF0aW9uIHRvIGFib3J0KQorICovCitleHRlcm4gaW50IGN2bXhfc3BpX2NhbGVuZGFyX3NldHVwX2NiKGludCBpbnRlcmZhY2UsIGN2bXhfc3BpX21vZGVfdCBtb2RlLAorCQkJCSAgICAgIGludCBudW1fcG9ydHMpOworCisvKioKKyAqIENhbGxiYWNrIHRvIHBlcmZvcm0gY2xvY2sgZGV0ZWN0aW9uCisgKgorICogQGludGVyZmFjZTogVGhlIGlkZW50aWZpZXIgb2YgdGhlIHBhY2tldCBpbnRlcmZhY2UgdG8gY29uZmlndXJlIGFuZAorICogICAgICAgICAgICAgICAgICB1c2UgYXMgYSBTUEkgaW50ZXJmYWNlLgorICogQG1vZGU6ICAgICAgVGhlIG9wZXJhdGluZyBtb2RlIGZvciB0aGUgU1BJIGludGVyZmFjZS4gVGhlIGludGVyZmFjZQorICogICAgICAgICAgICAgICAgICBjYW4gb3BlcmF0ZSBhcyBhIGZ1bGwgZHVwbGV4IChib3RoIFR4IGFuZCBSeCBkYXRhIHBhdGhzCisgKiAgICAgICAgICAgICAgICAgIGFjdGl2ZSkgb3IgYXMgYSBoYWxmcGxleCAoZWl0aGVyIHRoZSBUeCBkYXRhIHBhdGggaXMKKyAqICAgICAgICAgICAgICAgICAgYWN0aXZlIG9yIHRoZSBSeCBkYXRhIHBhdGggaXMgYWN0aXZlLCBidXQgbm90IGJvdGgpLgorICogQHRpbWVvdXQ6ICAgVGltZW91dCB0byB3YWl0IGZvciBjbG9jayBzeW5jaHJvbml6YXRpb24gaW4gc2Vjb25kcworICoKKyAqIFJldHVybnMgWmVybyBvbiBzdWNjZXNzLCBub24temVybyBlcnJvciBjb2RlIG9uIGZhaWx1cmUgKHdpbGwgY2F1c2UKKyAqIFNQSSBpbml0aWFsaXphdGlvbi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LgorCQkgKi8KKworCQl1aW50NjRfdCByY3ZfZXJyb3I6MTsKKwkJLyoKKwkJICogbG93ZXIgZXJyX2NvZGUgPSBmaXJzdC1sZXZlbCBkZXNjcmlwdG9yIG9mIHRoZQorCQkgKiB3b3JrCisJCSAqLworCQkvKgorCQkgKiB6ZXJvIGZvciBwYWNrZXQgc3VibWl0dGVkIGJ5IGhhcmR3YXJlIHRoYXQgaXNuJ3Qgb24KKwkJICogdGhlIHNsb3cgcGF0aAorCQkgKi8KKwkJLyogdHlwZSBpcyBjdm14X3BpcF9lcnJfdCAodW5pb24sIHNvIGNhbid0IHVzZSBkaXJlY3RseSAqLworCQl1aW50NjRfdCBlcnJfY29kZTo4OworCX0gc25vaXA7CisKK30gY3ZteF9waXBfd3FlX3dvcmQyOworCisvKioKKyAqIFdvcmsgcXVldWUgZW50cnkgZm9ybWF0CisgKgorICogbXVzdCBiZSA4LWJ5dGUgYWxpZ25lZAorICovCit0eXBlZGVmIHN0cnVjdCB7CisKKyAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgKiBXT1JEIDAKKyAgICAgKiAgSFcgV1JJVEU6IHRoZSBmb2xsb3dpbmcgNjQgYml0cyBhcmUgZmlsbGVkIGJ5IEhXIHdoZW4gYSBwYWNrZXQgYXJyaXZlcworICAgICAqLworCisgICAgLyoqCisgICAgICogcmF3IGNoa3N1bSByZXN1bHQgZ2VuZXJhdGVkIGJ5IHRoZSBIVworICAgICAqLworCXVpbnQxNl90IGh3X2Noa3N1bTsKKyAgICAvKioKKyAgICAgKiBGaWVsZCB1bnVzZWQgYnkgaGFyZHdhcmUgLSBhdmFpbGFibGUgZm9yIHNvZnR3YXJlCisgICAgICovCisJdWludDhfdCB1bnVzZWQ7CisgICAgLyoqCisgICAgICogTmV4dCBwb2ludGVyIHVzZWQgYnkgaGFyZHdhcmUgZm9yIGxpc3QgbWFpbnRlbmFuY2UuCisgICAgICogTWF5IGJlIHdyaXR0ZW4vcmVhZCBieSBIVyBiZWZvcmUgdGhlIHdvcmsgcXVldWUKKyAgICAgKiAgICAgICAgICAgZW50cnkgaXMgc2NoZWR1bGVkIHRvIGEgUFAKKyAgICAgKiAoT25seSAzNiBiaXRzIHVzZWQgaW4gT2N0ZW9uIDEpCisgICAgICovCisJdWludDY0X3QgbmV4dF9wdHI6NDA7CisKKyAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgKiBXT1JEIDEKKyAgICAgKiAgSFcgV1JJVEU6IHRoZSBmb2xsb3dpbmcgNjQgYml0cyBhcmUgZmlsbGVkIGJ5IEhXIHdoZW4gYSBwYWNrZXQgYXJyaXZlcworICAgICAqLworCisgICAgLyoqCisgICAgICogSFcgc2V0cyB0byB0aGUgdG90YWwgbnVtYmVyIG9mIGJ5dGVzIGluIHRoZSBwYWNrZXQKKyAgICAgKi8KKwl1aW50NjRfdCBsZW46MTY7CisgICAgLyoqCisgICAgICogSFcgc2V0cyB0aGlzIHRvIGlucHV0IHBoeXNpY2FsIHBvcnQKKyAgICAgKi8KKwl1aW50NjRfdCBpcHBydDo2OworCisgICAgLyoqCisgICAgICogSFcgc2V0cyB0aGlzIHRvIHdoYXQgaXQgdGhvdWdodCB0aGUgcHJpb3JpdHkgb2YgdGhlIGlucHV0IHBhY2tldCB3YXMKKyAgICAgKi8KKwl1aW50NjRfdCBxb3M6MzsKKworICAgIC8qKgorICAgICAqIHRoZSBncm91cCB0aGF0IHRoZSB3b3JrIHF1ZXVlIGVudHJ5IHdpbGwgYmUgc2NoZWR1bGVkIHRvCisgICAgICovCisJdWludDY0X3QgZ3JwOjQ7CisgICAgLyoqCisgICAgICogdGhlIHR5cGUgb2YgdGhlIHRhZyAoT1JERVJFRCwgQVRPTUlDLCBOVUxMKQorICAgICAqLworCXVpbnQ2NF90IHRhZ190eXBlOjM7CisgICAgLyoqCisg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Aoc3R4X2ludF9yZWcucy5kYXRvdnIpCisJCQkJcHJfZXJyKCJTUEkwOiBTVFggU3BpNCBGSUZPIG92ZXJmbG93IGVycm9yXG4iKTsKKwkJCWlmIChzdHhfaW50X3JlZy5zLm92cmJzdCkKKwkJCQlwcl9lcnIoIlNQSTA6IFNUWCBUcmFuc21pdCBwYWNrZXQgYnVyc3QgIgorCQkJCSAgICAgICAidG9vIGJpZ1xuIik7CisJCQlpZiAoc3R4X2ludF9yZWcucy5jYWxwYXIxKQorCQkJCXByX2VycigiU1BJMDogU1RYIENhbGVuZGFyIFRhYmxlIFBhcml0eSAiCisJCQkJICAgICAgICJFcnJvciBCYW5rMVxuIik7CisJCQlpZiAoc3R4X2ludF9yZWcucy5jYWxwYXIwKQorCQkJCXByX2VycigiU1BJMDogU1RYIENhbGVuZGFyIFRhYmxlIFBhcml0eSAiCisJCQkJICAgICAgICJFcnJvciBCYW5rMFxuIik7CisJCX0KKworCQljdm14X3dyaXRlX2NzcihDVk1YX1NQWFhfSU5UX01TSygwKSwgMCk7CisJCWN2bXhfd3JpdGVfY3NyKENWTVhfU1RYWF9JTlRfTVNLKDApLCAwKTsKKwkJbmVlZF9yZXRyYWluWzBdID0gMTsKKwkJcmV0dXJuX3N0YXR1cyA9IElSUV9IQU5ETEVEOworCX0KKworCXJldHVybiByZXR1cm5fc3RhdHVzOworfQorCitzdGF0aWMgdm9pZCBjdm1fb2N0X3NwaV9lbmFibGVfZXJyb3JfcmVwb3J0aW5nKGludCBpbnRlcmZhY2UpCit7CisJdW5pb24gY3ZteF9zcHh4X2ludF9tc2sgc3B4eF9pbnRfbXNrOworCXVuaW9uIGN2bXhfc3R4eF9pbnRfbXNrIHN0eHhfaW50X21zazsKKworCXNweHhfaW50X21zay51NjQgPSBjdm14X3JlYWRfY3NyKENWTVhfU1BYWF9JTlRfTVNLKGludGVyZmFjZSkpOworCXNweHhfaW50X21zay5zLmNhbGVyciA9IDE7CisJc3B4eF9pbnRfbXNrLnMuc3luY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Wxsb3dTc2lkTGVuZ3RoKSYmCi0gICAgICAgICAgICAgKHpmTWVtb3J5SXNFcXVhbCh3ZC0+c3RhLnNzaWQsIHdkLT5zdGEuY21EaXNhbGxvd1NzaWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZC0+c3RhLnNzaWRMZW4pKSAmJgotICAgICAgICAgICAgICh3ZC0+c3RhLndlcFN0YXR1cyA9PSBaTV9FTkNSWVBUSU9OX1RLSVApKQotICAgICAgICB7ICAgLyogY291bnRlcm1lYXN1cmVzICovCi0gICAgICAgICAgICB6bV9kZWJ1Z19tc2cwKCJjb3VudGVybWVhc3VyZXMgZGlzYWxsb3cgYXNzb2NpYXRpb24iKTsKKwkJemZTdGFSZXNldFN0YXR1cyhkZXYsIDApOwogCi0gICAgICAgIH0KLSAgICAgICAgZWxzZQotICAgICAgICB7Ci0gICAgICAgICAgICBzd2l0Y2goIHdkLT53bGFuTW9kZSApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgY2FzZSBaTV9NT0RFX0lCU1M6Ci0gICAgICAgICAgICAgICAgICAgIC8qIHNvbWUgcmVnaXN0ZXJzIG1heSBiZSBzZXQgaGVyZSAqLwotICAgICAgICAgICAgICAgICAgICBpZiAoIHdkLT5zdGEuYXV0aE1vZGUgPT0gWk1fQVVUSF9NT0RFX1dQQTJQU0sgKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICB6ZkhwU2V0QXBTdGFNb2RlKGRldiwgWk1fSEFMXzgwMjExX01PREVfSUJTU19XUEEyUFNLKTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHpmSHBTZXRBcFN0YU1vZGUoZGV2LCBaTV9IQUxfODAyMTFfTU9ERV9JQlNTX0dFTkVSQUwpOwotICAgICAgICAgICAgICAgICAgICB9CisJCWlmIC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gICAgICAgICAgICAgICAgY2FzZSBaTV9NT0RFX0lORlJBU1RSVUNUVVJFOgotICAgICAgICAgICAgICAgICAgICAvKiBzb21lIHJlZ2lzdGVycyBtYXkgYmUgc2V0IGhlcmUgKi8KLSAgICAgICAgICAgICAgICAgICAgemZIcFNldEFwU3RhTW9kZShkZXYsIFpNX0hBTF84MDIxMV9NT0RFX1NUQSk7CisJCQljYXNlIFpNX01PREVfSU5GUkFTVFJVQ1RVUkU6CisJCQkJLyogc29tZSByZWdpc3RlcnMgbWF5IGJlIHNldCBoZXJlICovCisJCQkJemZIcFNldEFwU3RhTW9kZShkZXYsIFpNX0hBTF84MDIxMV9NT0RFX1NUQSk7CiAKLSAgICAgICAgICAgICAgICAgICAgemZJbmZyYUNvbm5lY3ROZXR3b3JrKGRldik7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOworCQkJCXpmSW5mcmFDb25uZWN0TmV0d29yayhkZXYpOworCQkJCWJyZWFrOwogCi0gICAgICAgICAgICAgICAgY2FzZSBaTV9NT0RFX1BTRVVETzoKLSAgICAgICAgICAgICAgICAgICAgLyogc29tZSByZWdpc3RlcnMgbWF5IGJlIHNldCBoZXJlICovCi0gICAgICAgICAgICAgICAgICAgIHpmSHBTZXRBcFN0YU1vZGUoZGV2LCBaTV9IQUxfODAyMTFfTU9ERV9TVEEpOworCQkJY2FzZSBaTV9NT0RFX1BTRVVETzoKKwkJCQkvKiBzb21lIHJlZ2lzdGVycyBtYXkgYmUgc2V0IGhlcmUgKi8KKwkJCQl6ZkhwU2V0QXBTdGFNb2RlKGRldiwgWk1fSEFMXzgwMjExX01PREVfU1RBKTsKIAotICAgICAgICAgICAgICAgICAgICB6ZlVwZGF0ZUJzc2lkKGRldiwgYnNzaWQpOwotICAgICAgICAgICAgICAgICAgICB6ZkNvcmVTZXRGcmVxdWVuY3koZGV2LCB3ZC0+ZnJlcXVlbmN5KTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisJCQkJemZVcGRhdG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AgICAgIHptd19sZWF2ZV9jcml0aWNhbF9zZWN0aW9uKGRldik7CisJem1fbXNnMF9tbShaTV9MVl8xLCAiUmVzdW1lIFdsYW4iKTsKKwlpZiAoKHpmU3RhSXNDb25uZWN0ZWQoZGV2KSkgfHwgKHpmU3RhSXNDb25uZWN0aW5nKGRldikpKSB7CisJCWlmIChkb1JlY29ubiA9PSAxKSB7CisJCQl6bV9tc2cwX21tKFpNX0xWXzEsICJSZS1jb25uZWN0Li4uIik7CisJCQl6bXdfZW50ZXJfY3JpdGljYWxfc2VjdGlvbihkZXYpOworCQkJd2QtPnN0YS5jb25uZWN0QnlSZWFzc28gPSBGQUxTRTsKKwkJCXptd19sZWF2ZV9jcml0aWNhbF9zZWN0aW9uKGRldik7CiAKLSAgICAgICAgICAgIHpmV2xhbkVuYWJsZShkZXYpOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgaWYgKGRvUmVjb25uID09IDApCi0gICAgICAgIHsKLSAgICAgICAgICAgIHpmSHBTZXRSb2xsQ2FsbFRhYmxlKGRldik7Ci0gICAgICAgIH0KLSAgICB9CisJCQl6ZldsYW5FbmFibGUoZGV2KTsKKwkJfSBlbHNlIGlmIChkb1JlY29ubiA9PSAwKQorCQkJemZIcFNldFJvbGxDYWxsVGFibGUoZGV2KTsKKwl9CiAKLSAgICByZXQgPSAwOworCXJldCA9IDA7CiAKLSAgICByZXR1cm4gcmV0OworCXJldHVybiByZXQ7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xMDU3LDIzNSArOTc5LDIyNyBAQAogLyogICAgICBTdGVwaGVuIENoZW4gICAgICAgIEF0aGVyb3MgQ29tbXVuaWNhdGlvbnMsIElOQy4gICAgMjAwNy4xICAgICAgKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCB6ZmlXbGFuRmx1c2hBbGxRdWV1ZWRCdWZmZXJzKHpkZXZfdCogZGV2KQordm9pZCB6ZmlXbGFuRmx1c2hBbGxRdWV1ZWRCdWZmZXJzKHpkZXZfdCAqZGV2KQogewotICAgIC8qIEZsdXNoIFZUeFEgYW5kIE1tUSAqLwotICAgIHpmRmx1c2hWdHhxKGRldik7Ci0gICAgLyogRmx1c2ggQVAgUFMgcXVldWVzICovCi0gICAgemZBcEZsdXNoQnVmZmVyZWRQc0ZyYW1lKGRldik7Ci0gICAgLyogRnJlZSBidWZmZXIgaW4gZGVmcmFnbWVudCBsaXN0Ki8KLSAgICB6ZkFnaW5nRGVmcmFnTGlzdChkZXYsIDEpOworCS8qIEZsdXNoIFZUeFEgYW5kIE1tUSAqLworCXpmRmx1c2hWdHhxKGRldik7CisJLyogRmx1c2ggQVAgUFMgcXVldWVzICovCisJemZBcEZsdXNoQnVmZmVyZWRQc0ZyYW1lKGRldik7CisJLyogRnJlZSBidWZmZXIgaW4gZGVmcmFnbWVudCBsaXN0Ki8KKwl6ZkFnaW5nRGVmcmFnTGlzdChkZXYsIDEpOwogfQogCiAvKiBEbyBXTEFOIHNpdGUgc3VydmV5ICovCi11MTZfdCB6ZmlXbGFuU2Nhbih6ZGV2X3QqIGRldikKK3UxNl90IHpmaVdsYW5TY2FuKHpkZXZfdCAqZGV2KQogewotICAgIHUxNl90IHJldCA9IDE7Ci0gICAgem13X2dldF93bGFuX2RldihkZXYpOworCXUxNl90IHJldCA9IDE7CisJem13X2dldF93bGFuX2RldihkZXYpOwogCi0gICAgem1fZGVidWdfbXNnMCgiIik7CisJem1fZGVidWdfbXNnMCgiIik7CiAKLSAgICB6bXdfZGVjbGFyZV9mb3JfY3JpdGljYWxfc2VjdGlvbigpOworCXptd19kZWNsYXJlX2Zvcl9jcml0aWNhb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S2JwcyA9IDIwMDA7CisJc3dpdGNoICh3ZC0+bW9kdWxhdGlvblR5cGUpIHsKKwkvKiBDQ0sgbW9kZSAqLworCWNhc2UgMHgwOgorCQlzd2l0Y2ggKHdkLT5yYXRlRmllbGQpIHsKKwkJY2FzZSAweDBhOgorCQkJcnhSYXRlS2JwcyA9IDEwMDA7CisJCQlicmVhazsKKwkJY2FzZSAweDE0OgorCQkJcnhSYXRlS2JwcyA9IDIwMDA7CiAKLSAgICAgICAgICAgICAgICAgICAgICBjYXNlIDB4Mzc6IHJ4UmF0ZUticHMgPSA1NTAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMHg2ZTogcnhSYXRlS2JwcyA9IDExMDAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICBicmVhazsKLQkJY2FzZSAweDE6IC8vTGVnYWN5LU9GRE0gbW9kZQotICAgICAgICAgICAgICAgICAgaWYgKHdkLT5yYXRlRmllbGQgPD0gMTUpCi0gICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgcnhSYXRlS2JwcyA9IHpjSW5kZXh0b1JhdGVCR1t3ZC0+cmF0ZUZpZWxkXTsKLSAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgIGJyZWFrOwotCQljYXNlIDB4MjogLy9IVC1PRkRNIG1vZGUKLQkJICAgICAgICAgIG1jcyA9IHdkLT5yYXRlRmllbGQgJiAweDdGOwotCQkgICAgICAgICAgYmFuZHdpZHRoID0gd2QtPnJhdGVGaWVsZCAmIDB4ODA7Ci0gICAgICAgICAgICAgICAgICBpZiAobWNzIDw9IDE1KQotICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgIGlmIChiYW5kd2lkdGggIT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCh3ZC0+cnhJbmZvICYgMHg4MCkgIT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU2hvcnQgR0kgNDAgTUh6IE1JTU8gUmF0ZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnhSYXRlS2JwcyA9IHpjSW5kZXh0b1JhdGVONDBTW21jc107Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBMb25nIEdJIDQwIE1IeiBNSU1PIFJhdGUgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ4UmF0ZUticHMgPSB6Y0luZGV4dG9SYXRlTjQwTFttY3NdOwotICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCh3ZC0+cnhJbmZvICYgMHg4MCkgIT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU2hvcnQgR0kgMjAgTUh6IE1JTU8gUmF0ZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnhSYXRlS2JwcyA9IHpjSW5kZXh0b1JhdGVOMjBTW21jc107Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgICB7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UzMl90IGtleVs4XTsKKwkJCXUxNl90IG51bGxBZGRyWzNdID0geyAweDAsIDB4MCwgMHgwIH07CiAKLSAgICAgICAgICAgIGlmICh3ZC0+YXAuc3RhVGFibGVbaV0uZW5jcnlNb2RlICE9IFpNX05PX1dFUCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICB6ZkhwU2V0QXBQYWlyd2lzZUtleShkZXYsIG51bGxBZGRyLAotICAgICAgICAgICAgICAgICAgICAgICAgWk1fTk9fV0VQLCAma2V5WzBdLCAma2V5WzRdLCBpKzEpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgLy96ZkhwU2V0QXBQYWlyd2lzZUtleShkZXYsICh1MTZfdCAqKW1hY0FkZHIsCi0gICAgICAgICAgICAvLyAgICAgICAgWk1fTk9fV0VQLCAma2V5WzBdLCAma2V5WzRdLCBpZCsxKTsKLSAgICAgICAgICAgIHdkLT5hcC5zdGFUYWJsZVtpZF0uZW5jcnlNb2RlID0gWk1fTk9fV0VQOwotICAgICAgICAgICAgd2QtPmFwLnN0YVRhYmxlW2lkXS5rZXlJZHggPSAweGZmOwotICAgICAgICB9Ci0gICAgICAgICovCisJCQlpZiAod2QtPmFwLnN0YVRhYmxlW2ldLmVuY3J5TW9kZSAhPSBaTV9OT19XRVApCisJCQl7CisJCQkJemZIcFNldEFwUGFpcndpc2VLZXkoZGV2LCBudWxsQWRkciwKKwkJCQlaTV9OT19XRVAsICZrZXlbMF0sICZrZXlbNF0sIGkrMSk7CisJCQl9CisJCQkvL3pmSHBTZXRBcFBhaXJ3aXNlS2V5KGRldiwgKHUxNl90ICopbWFjQWRkciwKKwkJCS8vICAgICAgICBaTV9OT19XRVAsICZrZXlbMF0sICZrZXlbNF0sIGlkKzEpOworCQl3ZC0+YXAuc3RhVGFibGVbaWRdLmVuY3J5TW9kZSA9IFpNX05PX1dFUDsKKwkJd2QtPmFwLnN0YVRhYmxlW2lkXS5rZXlJZHggPSAweGZmOworCQl9CisJCSovCiAKLS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AgUFRYRF9TVFJVQyBwVHhEOwpAQCAtODQ0LDcgKzc5Myw3IEBACiAJICAgIGhleF9kdW1wKCJSeCBEZXNjcmlwdG9yIiwgKGNoYXIgKilwUnhELCAxNik7CiAJCXByaW50aygicFJ4RC0+RERPTkUgPSAleFxuIiwgcFJ4RC0+RERPTkUpOwogCX0KLQorI2VuZGlmIC8qIFJUMjg2MCAqLwogCXJldHVybiBUUlVFOwogfQogCkBAIC05MTIsNyArODYxLDYgQEAKIAogCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKi8KLSNpZmRlZiBDT05GSUdfU1RBX1NVUFBPUlQKIFZPSUQgICAgUlRNUFNldERlc2lyZWRSYXRlcygKICAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAogICAgIElOICBMT05HICAgICAgICAgICAgUmF0ZXMpCkBAIC0xMTI1LDEwICsxMDczLDcgQEAKIAogCXJldHVybiAoU3RhdHVzKTsKIH0KLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KIAotCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCiAvKgogCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCkBAIC0xMTc4LDcgKzExMjMsNiBAQAogCX0KIAogfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwogCiAvKgogCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpAQCAtMTIwMiwxOSArMTE0NiwxMSBAQAogCUlOVCBpOwogCS8vIHRoZSBzZWxlY3RlZCBwaHltb2RlIG11c3QgYmUgc3VwcG9ydGVkIGJ5IHRoZSBSRiBJQyBlbmNvZGVkIGluIEUyUFJPTQogCi0JLy8gaWYgbm8gY2hhb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BvcnQgdGhvc2Ugb2xkLWZpcm13YXJlIEFQLApAQCAtNTg4LDggKzU3Miw2IEBACiAgICAgICAgICAgICAgICAgICAgICAgICAqQWRkSHRJbmZvTGVuID0gU0laRV9BRERfSFRfSU5GT19JRTsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIH0KLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KICAgICAgICAgICAgICAgICBlbHNlIGlmIChOZGlzRXF1YWxNZW1vcnkocEVpZC0+T2N0ZXQsIFdQQV9PVUksIDQpKQogICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgLy8gQ29weSB0byBwVklFIHdoaWNoIHdpbGwgcmVwb3J0IHRvIG1pY3Jvc29mdCBic3NpZCBsaXN0LgpAQCAtNzEyLDE1ICs2OTQsNiBAQAogICAgICAgICAgICAgICAgICAgICAqTGVuZ3RoVklFICs9IChwRWlkLT5MZW4gKyAyKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgYnJlYWs7Ci0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0jaWZkZWYgRVhUX0JVSUxEX0NIQU5ORUxfTElTVAotCQkJY2FzZSBJRV9DT1VOVFJZOgotCQkJCVB0ciA9IChQVUNIQVIpIHBWSUU7Ci0gICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoUHRyICsgKkxlbmd0aFZJRSwgJnBFaWQtPkVpZCwgcEVpZC0+TGVuICsgMik7Ci0gICAgICAgICAgICAgICAgKkxlbmd0aFZJRSArPSAocEVpZC0+TGVuICsgMik7Ci0JCQkJYnJlYWs7Ci0jZW5kaWYgLy8gRVhUX0JVSUxEX0NIQU5ORUxfTElTVCAvLwotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwogCiAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICA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FUQSB0byByZWFkCisJLy81OTA6RiBFIEQgQworCS8vNTk0OkIgQSA5IDgKKwkvLzU5ODo3IDYgNSA0CisJLy81OUM6MyAyIDEgMAorCWVmdXNlRGF0YU9mZnNldCA9ICBFRlVTRV9EQVRBMyAtIChPZmZzZXQgJiAweEMpICA7CisKKwlSVE1QX0lPX1JFQUQzMihwQWQsIGVmdXNlRGF0YU9mZnNldCwgJmRhdGEpOworCisJZGF0YSA9IGRhdGEgPj4gKDgqKE9mZnNldCAmIDB4MykpOworCisJTmRpc01vdmVNZW1vcnkocERhdGEsICZkYXRhLCBMZW5ndGgpOworCit9CisKKy8qCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwlSb3V0aW5lIERlc2NyaXB0aW9uOgorCisJQXJndW1lbnRzOgorCisJUmV0dXJuIFZhbHVlOgorCisJSVJRTCA9CisKKwlOb3RlOgorCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisqLworVk9JRCBlRnVzZVJlYWRQaHlzaWNhbCgKKwlJTglQUlRNUF9BREFQVEVSCXBBZCwKKyAgCUlOCVBVU0hPUlQgbHBJbkJ1ZmZlciwKKyAgCUlOCVVMT05HIG5JbkJ1ZmZlclNpemUsCisgIAlPVVQJUFVTSE9SVCBscE91dEJ1ZmZlciwKKyAgCUlOCVVMT05HIG5PdXRCdWZmZXJTaXplCispCit7CisJVVNIT1JUKiBwSW5CdWYgPSAoVVNIT1JUKilscEluQnVmZmVyOworCVVTSE9SVCogcE91dEJ1ZiA9IChVU0hPUlQqKWxwT3V0QnVmZmVyOworCisJVVNIT1JUIE9mZnNldCA9IHBJbkJ1ZlswXTsJCQkJCS8vYWRkcgorCVVTSE9SVCBMZW5ndGggPSBwSW5CdWZbMV07CQkJCQkvL2xlbmd0aAorCWludCAJCWk7CisKKwlmb3IoaT0wOyBpPExlbmd0aDsgaSs9MikKKwl7CisJCWVGdXNlUGh5c2ljYWxSZWFkUmVnaXN0ZXJzKHBBZCxPZmZzZXQraSwgMiwgJnBPdXRCdWZbaS8yXSk7CisJfQorfQorCisvKgorCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisJUm91dGluZSBEZXNjcmlwdGlvbjoKKworCUFyZ3VtZW50czoKKworCVJldHVybiBWYWx1ZToKKworCUlSUUwgPQorCisJTm90ZToKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKi8KK05UU1RBVFVTIGVGdXNlUmVhZCgKKwlJTglQUlRNUF9BREFQVEVSCXBBZCwKKwlJTglVU0hPUlQJCQlPZmZzZXQsCisJT1VUCVBVQ0hBUgkJCXBEYXRhLAorCUlOCVVTSE9SVAkJCUxlbmd0aCkKK3sKKwlVU0hPUlQqIHBPdXRCdWYgPSAoVVNIT1JUKilwRGF0YTsKKwlOVFNUQVRVUwlTdGF0dXMgPSBTVEFUVVNfU1VDQ0VTUzsKKwlVQ0hBUglFRlNST01fQU9VVDsKKwlpbnQJaTsKKworCWZvcihpPTA7IGk8TGVuZ3RoOyBpKz0yKQorCXsKKwkJRUZTUk9NX0FPVVQgPSBlRnVzZVJlYWRSZWdpc3RlcnMocEFkLCBPZmZzZXQraSwgMiwgJnBPdXRCdWZbaS8yXSk7CisJfQorCXJldHVybiBTdGF0dXM7Cit9CisKKy8qCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwlSb3V0aW5lIERlc2NyaXB0aW9uOgorCisJQXJndW1lbnRzOgorCisJUmV0dXJuIFZhbHVlOgorCisJSVJRTCA9CisKKwlOb3RlOgorCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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TUk9NX01PREUgPSAzOworCisJLy9TdGVwMy4gV3JpdGUgRUZTUk9NX0tJQ0sgKDB4NTgwLCBiaXQzMCkgdG8gMSB0byBraWNrLW9mZiBwaHlzaWNhbCB3cml0ZSBwcm9jZWR1cmUuCisJZUZ1c2VDdHJsU3RydWMuZmllbGQuRUZTUk9NX0tJQ0sgPSAxOworCisJTmRpc01vdmVNZW1vcnkoJmRhdGEsICZlRnVzZUN0cmxTdHJ1YywgNCk7CisJUlRNUF9JT19XUklURTMyKHBBZCwgRUZVU0VfQ1RSTCwgZGF0YSk7CisKKwkvL1N0ZXA0LiBQb2xsaW5nIEVGU1JPTV9LSUNLKDB4NTgwLCBiaXQzMCkgdW50aWwgaXQgYmVjb21lIDAgYWdhaW4uIEl077+977+9cyBkb25lLgorCWkgPSAwOworCXdoaWxlKGkgPCAxMDApCisJeworCQlSVE1QX0lPX1JFQUQzMihwQWQsIEVGVVNFX0NUUkwsIChQVUlOVDMyKSAmZUZ1c2VDdHJsU3RydWMpOworCisJCWlmKGVGdXNlQ3RybFN0cnVjLmZpZWxkLkVGU1JPTV9LSUNLID09IDApCisJCQlicmVhazsKKworCQlSVE1QdXNlY0RlbGF5KDIpOworCQlpKys7CisJfQorfQorCisvKgorCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisJUm91dGluZSBEZXNjcmlwdGlvbjoKKworCUFyZ3VtZW50czoKKworCVJldHVybiBWYWx1ZToKKworCUlSUUwgPQorCisJTm90ZToKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKi8KK05UU1RBVFVTIGVGdXNlV3JpdGVSZWdpc3RlcnMoCisJSU4JUFJUTVBfQURBUFRFUglwQWQsCisJSU4JVVNIT1JUIE9mZnNldCwKKwlJTglVU0hPUlQgTGVuZ3RoLAorCUlOCVVTSE9SVCogcERhd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IgPSBhZGRyIC0xOworCQkJSW5CdWZbMF0gPSBhZGRyOworCQkJSW5CdWZbMV0gPSAyOworCisJCQllRnVzZVJlYWRQaHlzaWNhbChwQWQsICZJbkJ1ZlswXSwgNCwgJkluQnVmWzJdLCAyKTsKKworCQkJLy8gd3JpdGUgdGhlIGxvZ2ljYWwgYWRkcmVzcworCQkJaWYodG1wYWRkciUyICE9IDApCisJCQl7CisJCQkJLy8gSW52YWxpZGF0ZSB0aGUgaGlnaCBieXRlCisJCQkJZm9yIChpPTg7IGk8MTU7IGkrKykKKwkJCQl7CisJCQkJCWlmKCAoIChJbkJ1ZlsyXSA+PiBpKSAmIDB4MDEpID09IDApCisJCQkJCXsKKwkJCQkJCUluQnVmWzJdIHw9ICgweDEgPDxpKTsKKwkJCQkJCWJyZWFrOworCQkJCQl9CisJCQkJfQorCQkJfQorCQkJZWxzZQorCQkJeworCQkJCS8vIGludmFsaWRhdGUgdGhlIGxvdyBieXRlCisJCQkJZm9yIChpPTA7IGk8ODsgaSsrKQorCQkJCXsKKwkJCQkJaWYoICggKEluQnVmWzJdID4+IGkpICYgMHgwMSkgPT0gMCkKKwkJCQkJeworCQkJCQkJSW5CdWZbMl0gfD0gKDB4MSA8PGkpOworCQkJCQkJYnJlYWs7CisJCQkJCX0KKwkJCQl9CisJCQl9CisJCQllRnVzZVdyaXRlUGh5c2ljYWwocEFkLCAmSW5CdWZbMF0sIDYsIE5VTEwsIDApOworCQl9CisJfQorCXdoaWxlKCFiV3JpdGVTdWNjZXNzKTsKKworCXJldHVybiBUUlVFOworfQorCisvKgorCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisJUm91dGluZSBEZXNjcmlwdGlvbjoKKworCUFyZ3VtZW50czoKKworCVJldHVybiBWYWx1ZToKKworCUlSUUwgPQorCisJTm90ZToKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisJUm91dGluZSBEZXNjcmlwdGlvbjoKKworCUFyZ3VtZW50czoKKworCVJldHVybiBWYWx1ZToKKworCUlSUUwgPQorCisJTm90ZToKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKi8KK05UU1RBVFVTIGVGdXNlV3JpdGUoCisgICAJSU4JUFJUTVBfQURBUFRFUglwQWQsCisJSU4JVVNIT1JUCQkJT2Zmc2V0LAorCUlOCVBVQ0hBUgkJCXBEYXRhLAorCUlOCVVTSE9SVAkJCWxlbmd0aCkKK3sKKwlpbnQgaTsKKworCVVTSE9SVCogcFZhbHVlWCA9IChQVVNIT1JUKSBwRGF0YTsJCQkJLy92YWx1ZSAuLi4KKwkJLy9UaGUgaW5wdXQgdmFsdWU9MzA3MCB3aWxsIGJlIHN0b3JlZCBhcyBmb2xsb3dpbmcKKyAJCS8vIExpdHRsZS1lbmRpYW4JCVMJfAlTCUJpZy1lbmRpYW4KKwkJLy8gYWRkcgkJCTEJMAl8CTAJMQorCQkvLyBPcmktVgkJCTMwCTcwCXwJMzAJNzAKKwkJLy9BZnRlciBzd2FwcGluZworCQkvLwkJCQkzMAk3MAl8CTcwCTMwCisJCS8vQ2FzdGluZworCQkvLwkJCQkzMDcwCXwJNzAzMCAoeCkKKwkJLy9UaGUgc3dhcHBpbmcgc2hvdWxkIGJlIHJlbW92ZWQgZm9yIGJpZy1lbmRpYW4KKwlmb3IoaT0wOyBpPGxlbmd0aDsgaSs9MikKKwl7CisJCWVGdXNlV3JpdGVSZWdpc3RlcnMocEFkLCBPZmZzZXQraSwgMiwgJnBWYWx1ZVhbaS8yXSk7CisJfQorCisJcmV0dXJuIFRSVUU7Cit9CisKKy8qCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwlSb3V0aW5lIERlc2NyaXB0aW9uOgorCisJQXJndW1lbnRzOgorCisJUmV0dXJuIFZhbHVlOgorCisJSVJRTCA9CisKKwlOb3RlOgorCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisqLworSU5UIHNldF9lRnVzZUdldEZyZWVCbG9ja0NvdW50X1Byb2MoCisgICAJSU4JUFJUTVBfQURBUFRFUglwQWQsCisJSU4JUFVDSEFSCQkJYXJnKQoreworCVVTSE9SVCBpOworCVVTSE9SVAlMb2dpY2FsQWRkcmVzczsKKwlVU0hPUlQgZWZ1c2VmcmVlbnVtPTA7CisJaWYoIXBBZC0+YlVzZUVmdXNlKQorCQlyZXR1cm4gRkFMU0U7CisJZm9yIChpID0gRUZVU0VfVVNBR0VfTUFQX1NUQVJUOyBpIDw9IEVGVVNFX1VTQUdFX01BUF9FTkQ7IGkrPTIpCisJeworCQllRnVzZVBoeXNpY2FsUmVhZFJlZ2lzdGVycyhwQWQsIGksIDIsICZMb2dpY2FsQWRkcmVzcyk7CisJCWlmKCAoTG9naWNhbEFkZHJlc3MgJiAweGZmKSA9PSAwKQorCQl7CisJCQllZnVzZWZyZWVudW09IChVQ0hBUikgKEVGVVNFX1VTQUdFX01BUF9FTkQtaSsxKTsKKwkJCWJyZWFrOworCQl9CisJCWVsc2UgaWYoKCAoTG9naWNhbEFkZHJlc3MgPj4gOCkgJiAweGZmKSA9PSAwKQorCQl7CisJCQllZnVzZWZyZWVudW0gPSAoVUNIQVIpIChFRlVTRV9VU0FHRV9NQVBfRU5ELWkpOworCQkJYnJlYWs7CisJCX0KKworCQlpZihpID09IEVGVVNFX1VTQUdFX01BUF9FTkQpCisJCQllZnVzZWZyZWVudW0gPSAwOworCX0KKwlwcmludGsoImVmdXNlRnJlZU51bWJlciBpcyAlZFxuIixlZnVzZWZyZWVudW0pOworCXJldHVybiB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Dk0LDYgQEAKIAkJUHJvdGVjdFsxXSA9IFByb3RDZmcud29yZDsKIAl9CiAKLSNpZmRlZiBET1QxMV9OX1NVUFBPUlQKIAkvLyBEZWNpZGUgSFQgZnJhbWUgcHJvdGVjdGlvbi4KIAlpZiAoKFNldE1hc2sgJiBBTExOX1NFVFBST1RFQ1QpICE9IDApCiAJewpAQCAtNTg0OCw3ICs1NjI0LDYgQEAKIAkJCQlicmVhazsKIAkJfQogCX0KLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KIAogCW9mZnNldCA9IENDS19QUk9UX0NGRzsKIAlmb3IgKGkgPSAwO2kgPCA2O2krKykKQEAgLTU4NjAsNiArNTYzNSwyNzYgQEAKIAl9CiB9CiAKKyNpZmRlZiBSVDMweHgKKy8qCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwlSb3V0aW5lIERlc2NyaXB0aW9uOiBXcml0ZSBSVDMweHggUkYgcmVnaXN0ZXIgdGhyb3VnaCBNQUMKKworCUFyZ3VtZW50czoKKworCVJldHVybiBWYWx1ZToKKworCUlSUUwgPQorCisJTm90ZToKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKi8KK05UU1RBVFVTIFJUMzB4eFdyaXRlUkZSZWdpc3RlcigKKwlJTglQUlRNUF9BREFQVEVSCXBBZCwKKwlJTglVQ0hBUgkJCVJlZ0lELAorCUlOCVVDSEFSCQkJVmFsdWUpCit7CisJUkZfQ1NSX0NGR19TVFJVQwlyZmNzcjsKKwlVSU5UCQkJCWkgPSAwOworCisJZG8KKwl7CisJCVJUTVBfSU9fUkVBRDMyKHBBZCwgUkZfQ1NSX0NGRywgJnJmY3NyLndvcmQpOworCisJCWlmICghcmZjc3IuZmllbGQuUkZfQ1NSX0tJQ0spCisJCQlicmVhazsKKwkJaSsrOworCX0KKwl3aGlsZSAoKGkgPCBSRVRSWV9MSU1JVCkgJiYgKCFSVE1QX1RFU1RfRkxBRyhwQWQsIGZSVE1QX0FEQVBURVJfTklDX05PVF9FWElTVCkpKTsKKworCWlmICgoaSA9PSBSRVRSWV9MSU1JVCkgfHwgKFJUTVBfVEVTVF9GTEFHKHBBZCwgZlJUTVBfQURBUFRFUl9OSUNfTk9UX0VYSVNUKSkpCisJeworCQlEQkdQUklOVF9SQVcoUlRfREVCVUdfRVJST1IsICgiUmV0cnkgY291bnQgZXhoYXVzdGVkIG9yIGRldmljZSByZW1vdmVkISEhXG4iKSk7CisJCXJldHVybiBTVEFUVVNfVU5TVUNDRVNTRlVMOworCX0KKworCXJmY3NyLmZpZWxkLlJGX0NTUl9XUiA9IDE7CisJcmZjc3IuZmllbGQuUkZfQ1NSX0tJQ0sgPSAxOworCXJmY3NyLmZpZWxkLlRFU1RDU1JfUkZBQ0NfUkVHTlVNID0gUmVnSUQ7CisJcmZjc3IuZmllbGQuUkZfQ1NSX0RBVEEgPSBWYWx1ZTsKKworCVJUTVBfSU9fV1JJVEUzMihwQWQsIFJGX0NTUl9DRkcsIHJmY3NyLndvcmQpOworCisJcmV0dXJuIFNUQVRVU19TVUNDRVNTOworfQorCisKKy8qCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwlSb3V0aW5lIERlc2NyaXB0aW9uOiBSZWFkIFJUMzB4eCBSRiByZWdpc3RlciB0aHJvdWdoIE1BQworCisJQXJndW1lbnRzOgorCisJUmV0dXJuIFZhbHVlOgorCisJSVJRTCA9CisKKwlOb3RlOgorCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisqLworTlRTVEFUVVMgUlQzMHh4UmVhZFJGUmVnaXN0ZXIoCisJSU4JUFJUTVBfQURBUFRFUglwQWQsCisJSU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VGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLSNpbmNsdWRlICJuZXRpZl9ibG9jay5oIgotCi1zdGF0aWMgTkVUSUZfRU5UUlkgZnJlZU5ldElmRW50cnlQb29sW0ZSRUVfTkVUSUZfUE9PTF9TSVpFXTsKLXN0YXRpYyBMSVNUX0hFQURFUiBmcmVlTmV0SWZFbnRyeUxpc3Q7Ci0KLXZvaWQgaW5pdGJsb2NrUXVldWVUYWIoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpCi17Ci0JaW50IGk7Ci0KLQlpbml0TGlzdCgmZnJlZU5ldElmRW50cnlMaXN0KTsKLQlmb3IgKGkgPSAwOyBpIDwgRlJFRV9ORVRJRl9QT09MX1NJWkU7IGkrKykKLQkJaW5zZXJ0VGFpbExpc3QoJmZyZWVOZXRJZkVudHJ5TGlzdCwgKFBMSVNUX0VOVFJZKSZmcmVlTmV0SWZFbnRyeVBvb2xbaV0pOwotCi0JZm9yIChpPTA7IGkgPCBOVU1fT0Z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BMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA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aWduZWQgc2hvcnQpKChjcmMgPDwgOCkgXiAgY2NpdHRfMTZUYWJsZVsoKGNyYyA+PiA4KSBeICh2KSkgJiAyNTVdKQogCisjaWZkZWYgUlQyODcwCit1bnNpZ25lZCBjaGFyIEJpdFJldmVyc2UodW5zaWduZWQgY2hhciB4KQoreworCWludCBpOworCXVuc2lnbmVkIGNoYXIgVGVtcD0wOworCWZvcihpPTA7IDsgaSsrKQorCXsKKwkJaWYoeCAmIDB4ODApCVRlbXAgfD0gMHg4MDsKKwkJaWYoaT09NykJCWJyZWFrOworCQl4CTw8PSAxOworCQlUZW1wID4+PSAxOworCX0KKwlyZXR1cm4gVGVtcDsKK30KKyNlbmRpZgorCiAvLwogLy8gQkJQIHJlZ2lzdGVyIGluaXRpYWxpemF0aW9uIHNldAogLy8KQEAgLTExNCw2ICsxNDAsMzggQEAKIC8vCiAvLyBSRiByZWdpc3RlciBpbml0aWFsaXphdGlvbiBzZXQKIC8vCisjaWZkZWYgUlQyODcwCitSRUdfUEFJUiAgIFJUMzB4eF9SRlJlZ1RhYmxlW10gPSB7CisgICAgICAgIHtSRl9SMDQsICAgICAgICAgIDB4NDB9LAorICAgICAgICB7UkZfUjA1LCAgICAgICAgICAweDAzfSwKKyAgICAgICAge1JGX1IwNiwgICAgICAgICAgMHgwMn0sCisgICAgICAgIHtSRl9SMDcsICAgICAgICAgIDB4NzB9LAorICAgICAgICB7UkZfUjA5LCAgICAgICAgICAweDBGfSwKKyNpZm5kZWYgUlQzMHh4CisgICAgICAgIHtSRl9SMTAsICAgICAgICAgIDB4NzF9LAorI2VuZGlmCisjaWZkZWYgUlQzMHh4CisgICAgICAgIHtSRl9SMTAsICAgICAgICAgIDB4NDF9LAorI2VuZGlmCisgICAgICAgIHtSRl9SMTEsICAgICAgICAgIDB4MjF9LAorICAgICAgICB7UkZfUjEyLCAgICAgICAgICAweDdCfSwKKyAgICAgICAge1JGX1IxNCwgICAgICAgICAgMHg5MH0sCisgICAgICAgIHtSRl9SMTU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J5dGUxIDwgMzYpICYmIChQb3dlci5maWVsZC5CeXRlMSA+IC02KSkKLQkJCXBBZC0+VHhQb3dlcjExSltpICogMiArIDFdLlBvd2VyID0gUG93ZXIuZmllbGQuQnl0ZTE7Ci0KLQkJaWYgKChQb3dlcjIuZmllbGQuQnl0ZTAgPCAzNikgJiYgKFBvd2VyMi5maWVsZC5CeXRlMCA+IC02KSkKLQkJCXBBZC0+VHhQb3dlcjExSltpICogMl0uUG93ZXIyID0gUG93ZXIyLmZpZWxkLkJ5dGUwOwotCi0JCWlmICgoUG93ZXIyLmZpZWxkLkJ5dGUxIDwgMzYpICYmIChQb3dlcjIuZmllbGQuQnl0ZTEgPiAtNikpCi0JCQlwQWQtPlR4UG93ZXIxMUpbaSAqIDIgKyAxXS5Qb3dlcjIgPSBQb3dlcjIuZmllbGQuQnl0ZTE7Ci0JfQotI2VuZGlmCiB9CiAKIC8qCkBAIC0xMDcxLDYgKzEwODIsNDI1IEBACiB9CiAKIAorI2lmZGVmIFJUMjg3MAorLyoKKwk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworCVJvdXRpbmUgRGVzY3JpcHRpb246CisJCUZvciBSRiBmaWx0ZXIgY2FsaWJyYXRpb24gcHVycG9zZQorCisJQXJndW1lbnRzOgorCQlwQWQgICAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKKworCVJldHVybiBWYWx1ZToKKwkJTm9uZQorCisJSVJRTCA9IFBBU1NJVkVfTEVWRUwKKworCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKi8KKyNpZm5kZWYgUlQzMHh4CitWT0lEIFJUVVNCRmlsdGVyQ2FsaWJyYXRpb24oCisJSU4gUFJUTVBfQURBUFRFUiBwQWQpCit7CisJVUNIQVIJUjU1eCA9IDAsI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lZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JbGVhcC5oCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQ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DJfMTFfRExTX0lORk8gewotCVJUXzgwMl8xMV9ETFNfVUkJRW50cnlbTUFYX05VTUJFUl9PRl9ETFNfRU5UUlldOwotCVVDSEFSCQkJCW51bTsKLX0gUlRfODAyXzExX0RMU19JTkZPLCAqUFJUXzgwMl8xMV9ETFNfSU5GTzsKLQotdHlwZWRlZiBlbnVtIF9SVF84MDJfMTFfRExTX01PREUgewotICAgIERMU19OT05FLAotICAgIERMU19XQUlUX0tFWSwKLSAgICBETFNfRklOSVNICi19IFJUXzgwMl8xMV9ETFNfTU9ERTsKLSNlbmRpZiAvLyBRT1NfRExTX1NVUFBPUlQgLy8KLQotI2lmZGVmIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQKLSNpZm5kZWYgTkFUSVZFX1dQQV9TVVBQTElDQU5UX1NVUFBPUlQKLSNkZWZpbmUJUlRfQVNTT0NfRVZFTlRfRkxBRyAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDEKLSNkZWZpbmUJUlRfRElTQVNTT0NfRVZFTlRfRkxBRyAgICAgICAgICAgICAgICAgICAgICAweDAxMDIKLSNkZWZpbmUJUlRfUkVRSUVfRVZFTlRfRkxBRyAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDMKLSNkZWZpbmUJUlRfUkVTUElFX0VWRU5UX0ZMQUcgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDQKLSNkZWZpbmUJUlRfQVNTT0NJTkZPX0VWRU5UX0ZMQUcgICAgICAgICAgICAgICAgICAgICAweDAxMDUKLSNkZWZpbmUgUlRfUE1LSURDQU5EX0ZMQUcgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDYKLSNkZWZpbmUgUlRfSU5URVJGQUNFX0RPV04gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDcKLSNkZWZpbmUgUlRfSU5URVJGQUNFX1VQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDgKLSNlbmRpZiAvLyBOQVRJVkVfV1BBX1NVUFBMSUNBTl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gKKyNkZWZpbmUgQkJQX1IzMSAgICAgICAgICAgICAgICAgICAgIDMxCisjZW5kaWYKICNkZWZpbmUgQkJQX1I0OSAgICAgICAgICAgICAgICAgICAgIDQ5IC8vVFNTSQogI2RlZmluZSBCQlBfUjUwICAgICAgICAgICAgICAgICAgICAgNTAKICNkZWZpbmUgQkJQX1I1MSAgICAgICAgICAgICAgICAgICAgIDUxCkBAIC0xNzcxLDYgKzExNTYsMTAgQEAKICNkZWZpbmUgQkJQX1I3MyAgICAgICAgICAgICAgICAgICAgIDczCiAjZGVmaW5lIEJCUF9SNzUJCQkJCQk3NQogI2RlZmluZSBCQlBfUjc3ICAgICAgICAgICAgICAgICAgICAgNzcKKyNpZmRlZiBSVDMweHgKKyNkZWZpbmUgQkJQX1I3OSAgICAgICAgICAgICAgICAgICAgIDc5CisjZGVmaW5lIEJCUF9SODAgICAgICAgICAgICAgICAgICAgICA4MAorI2VuZGlmCiAjZGVmaW5lIEJCUF9SODEgICAgICAgICAgICAgICAgICAgICA4MQogI2RlZmluZSBCQlBfUjgyICAgICAgICAgICAgICAgICAgICAgODIKICNkZWZpbmUgQkJQX1I4MyAgICAgICAgICAgICAgICAgICAgIDgzCkBAIC0xNzkyLDYgKzExODEsOSBAQAogI2RlZmluZSBCQlBfUjEyMSAgICAgICAgICAgICAgICAgICAgMTIxCiAjZGVmaW5lIEJCUF9SMTIyICAgICAgICAgICAgICAgICAgICAxMjIKICNkZWZpbmUgQkJQX1IxMjMgICAgICAgICAgICAgICAgICAgIDEyMworI2lmZGVmIFJUMzB4eAorI2RlZmluZSBCQlBfUjEzOCAgICAgICAgICAgICAgICAgICAgMTM4IC8vIGFkZCBieSBqb2hubGksIFJGIHBvd2VyIHNlcXVlbmNlIHNldHVwLCBBREMgZHluYW1pYyBvbi9vZmYgY29udHJvbAorI2VuZGlmIC8vIFJUMzB4eCAvLwogCiAKICNkZWZpbmUgQkJQUjk0X0RFRkFVTFQgICAgICAgICAgICAgIDB4MDYgLy8gQWR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b3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqLwotCi0jaW5jbHVkZSAicnRfY29uZmlnLmgiCi0KLSNpZmRlZiBSQUxJTktfQVRFCi1VQ0hBUiBUZW1wbGF0ZUZyYW1lWzI0XSA9IHsweDA4LyogRGF0YSB0eXBlICovLDB4MDAsMHgwMCwweDAwLDB4RkYsMHhGRiwweEZGLDB4RkYsMHhGRiwweEZGLDB4MDAsMHhBQSwweEJCLDB4MTIsMHgzNCwweDU2LDB4MDAsMHgxMSwweDIyLDB4QUEsMHhCQiwweENDLDB4MDAsMHgwMH07CS8vIDgwMi4xMSBNQUMgSGVhZGVyLCBUeXBlOkRhdGEsIExlbmd0aDoyNGJ5dGVzCi1leHRlcm4gUlRNUF9SRl9SRUdTIFJGMjg1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19Ci0jZW5kaWYgLy8gMSAvLwotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQVRFIG9wZXJhdGlvbiBtb2RlIHRvCi0gICAgICAgIDAuIEFURVNUQVJUICA9IFN0YXJ0IEFURSBNb2RlCi0gICAgICAgIDEuIEFURVNUT1AgICA9IFN0b3AgQVRFIE1vZGUKLSAgICAgICAgMi4gVFhDT05UICAgID0gQ29udGludW91cyBUcmFuc21pdAotICAgICAgICAzLiBUWENBUlIgICAgPSBUcmFuc21pdCBDYXJyaWVyCi0gICAgICAgIDQuIFRYRlJBTUUgICA9IFRyYW5zbWl0IEZyYW1lcwotICAgICAgICA1LiBSWEZSQU1FICAgPSBSZWNlaXZlIEZyYW1lcwotI2lmZGVmIFJBTElOS18yOHh4X1FBCi0gICAgICAgIDYuIFRYU1RPUCAgICA9IFN0b3AgQW55IFR5cGUgb2YgVHJhbnNtaXRpb24KLSAgICAgICAgNy4gUlhTVE9QICAgID0gU3RvcCBSZWNlaXZpbmcgRnJhbWVzCi0jZW5kaWYgLy8gUkFMSU5LXzI4eHhfUUEgLy8KLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLXN0YXRpYyBJTlQJQVRFQ21kSGFuZGxlcigKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JVUlOVDMyCQkJVmFsdWUgPSAwOwotCVVDSEFSCQkJQmJwRGF0YTsKLQlVSU5UMzIJCQlNYWNEYXRhID0gMDsKLQlQVFhEX1NUUlVDCQlw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ogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotCi1JTlQJU2V0X0FURV9Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBVQ0hBUgkJCWFyZykKLXsKLQlpZiAoQVRFQ21kSGFuZGxlcihwQWQsIGFyZykpCi0JewotCQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSYWxpbms6IFNldF9BVEVfUHJvYyBTdWNjZXNzXG4iKSk7Ci0KLQotCQlyZXR1cm4gVFJVRTsKLQl9Ci0JZWxzZQotCXsKLQkJQVRFREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUmFsaW5rOiBTZXRfQVRFX1Byb2MgRmFpbGVkXG4iKSk7Ci0JCXJldHVybiBGQUxTRTsKLQl9Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IEFURSBBRERSMT1EQSBmb3IgVHhGcmFtZShBUCAgOiBUbyBEUyA9IDAgOyBGcm9tIERTID0gMSkKLSAgICAgICAgb3IKLSAgICAgICAgU2V0IEFURSBBRERSMz1EQSBmb3IgVHhGcmFtZShTVEEgOiBUbyBEUyA9IDEgOyBGcm9tIERTID0gMCkKLQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9BVEVfREFfUHJvYygKLQlJTglQUlRNUF9BREFQV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FuZ2UsIGl0IHNob3VsZCBiZSBpbiByYW5nZSBvZiAyNH4lZC5cbiIsIChNQVhfRlJBTUVfU0laRSAtIDM0LyogPT0gMjMxMiAqLykpKTsKLQkJcmV0dXJuIEZBTFNFOwotCX0KLQotCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9BVEVfVFhfTEVOR1RIX1Byb2MgKFR4TGVuZ3RoID0gJWQpXG4iLCBwQWQtPmF0ZS5UeExlbmd0aCkpOwotCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlJhbGluazogU2V0X0FURV9UWF9MRU5HVEhfUHJvYyBTdWNjZXNzXG4iKSk7Ci0KLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBBVEUgVHggZnJhbWUgY291bnQKLQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9BVEVfVFhfQ09VTlRfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JcEFkLT5hdGUuVHhDb3VudCA9IHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCk7Ci0KLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfQVRFX1RYX0NPVU5UX1Byb2MgKFR4Q291bnQgPSAlZClcbiIsIHBBZC0+YXRlLlR4Q291bnQpKTsKLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSYWxpbms6IFNldF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ERUJVR19UUkFDRSwgKCJSYWxpbms6IFNldF9BVEVfVFhfTUNTX1Byb2MgU3VjY2Vzc1xuIikpOwotCi0KLQlyZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQVRFIFR4IGZyYW1lIE1vZGUKLSAgICAgICAgMDogTU9ERV9DQ0sKLSAgICAgICAgMTogTU9ERV9PRkRNCi0gICAgICAgIDI6IE1PREVfSFRNSVgKLSAgICAgICAgMzogTU9ERV9IVEdSRUVORklFTEQKLQotICAgICAgICBSZXR1cm46Ci0gICAgICAgIAlUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X0FURV9UWF9NT0RFX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCXBBZC0+YXRlLlR4V0kuUEhZTU9ERSA9IHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCk7Ci0KLQlpZihwQWQtPmF0ZS5UeFdJLlBIWU1PREUgPiAzKQotCXsKLQkJcEFkLT5hdGUuVHhXSS5QSFlNT0RFID0gMDsKLQkJQVRFREJHUFJJTlQoUlRfREVCVUdfRVJST1IsICgiU2V0X0FURV9UWF9NT0RFX1Byb2M6Ok91dCBvZiByYW5nZS4gaXQgc2hvdWxkIGJlIGluIHJhbmdlIG9mIDB+M1xuIikpOwotCQlBVEVEQkdQUklOVChSVF9ERUJVR19FUlJPUiwgKCIwOiBDQ0ssIDE6IE9GRE0sIDI6IEhUX01JWCwgMzogSFRfR1JFRU5fRklFTE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ywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLSNpZm5kZWYgX19BVEVfSF9fCi0jZGVmaW5lIF9fQVRFX0hfXwotCi0jaWZuZGVmIFVDT1MKLSNkZWZpbmUgYXRlX3ByaW50IHByaW50awotI2RlZmluZSBBVEVEQkdQUklOVCBEQkdQUklOVAotI2RlZmluZSBFRVBST01fU0laRQkJCQkJCQkJMHgyMDAKLSNpZmRlZiBDT05GSUdfU1RBX1NVUFBPUlQKLSNkZWZpbmUgRUVQUk9NX0JJTl9GSUxFX05BTUUgICIvZXRjL1dpcmVsZXNzL1JUMjg2MFNUQS9lMnAuYmluIgotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCi0jZWxzZSAvLyAhVUNPUyAvLwotI2RlZmluZSBmQVRFX0xPQURfRUVQUk9NCQkJCQkJMHgwQzQzCi0jaWZkZWYgQ09ORklHX1BSSU5USwotZXh0ZXJuIElOVCBDb25zb2xlUmVzcG9uc2UoSU4gUFVDSEFSIGJ1ZmYpOwotZXh0ZXJuIGludCAoKnJlbW90ZV9kaXNwbGF5KShjaGFyICopOwotZXh0ZXJuIHZvaWQgcHV0cyAoY29uc3QgY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gICAgICAgICAgICAoKChfcCktPmF0ZS5Nb2RlKSAhPSBBVEVfU1RPUCkKLQotLyogUlQyODgwX2lOSUMgd2lsbCBkZWZpbmUgIlJUMjg2MCIuICovCi0jZGVmaW5lIEFURV9CQlBfSU9fUkVBRDhfQllfUkVHX0lEKF9BLCBfSSwgX3BWKSAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgQkJQX0NTUl9DRkdfU1RSVUMgIEJicENzcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBpbnQgICAgICAgICAgICAgaSwgazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGZvciAoaT0wOyBpPE1BWF9CVVNZX0NPVU5UOyBpKyspICAgICAgICAgICAgICAgICAgICBcCi0gICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgUlRNUF9JT19SRUFEMzIoX0EsIEJCUF9DU1JfQ0ZHLCAmQmJwQ3NyLndvcmQpOyAgICAgXAotICAgICAgICBpZiAoQmJwQ3NyLmZpZWxkLkJ1c3kgPT0gQlVTWSkgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIGNvbnRpbnVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIEJicENzci53b3JkID0gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgQmJwQ3NyLmZpZWxkLmZSZWFkID0gMTsgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBCYnBDc3IuZmllbGQuQkJQX1JXX01PREUgPSAxOyAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIEJicENzci5maWVsZC5CdXN5ID0gMTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgQmJwQ3NyLmZpZWxkLlJlZ051bSA9IF9JOyAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBSVE1QX0lPX1dSSVRFMzIoX0EsIEJCUF9DU1JfQ0ZHLCBCYnBDc3Iud29yZCk7ICAgICBcCi0gICAgICAgIGZvciAoaz0wOyBrPE1BWF9CVVNZX0NPVU5UOyBrKyspICAgICAgICAgICAgICAgIFwKLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgUlRNUF9JT19SRUFEMzIoX0EsIEJCUF9DU1JfQ0ZHLCAmQmJwQ3NyLndvcmQpOyBcCi0gICAgICAgICAgICBpZiAoQmJwQ3NyLmZpZWxkLkJ1c3kgPT0gSURMRSkgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmICgoQmJwQ3NyLmZpZWxkLkJ1c3kgPT0gSURMRSkgJiYgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIChCYnBDc3IuZmllbGQuUmVnTnVtID09IF9JKSkgICAgICAgICAgICAgICAgXAotICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAqKF9wVikgPSAoVUNIQVIpQmJwQ3NyLmZpZWxkLlZhbHVlOyAgICAgICAgIFwKLSAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBpZiAoQmJwQ3NyLmZpZWxkLkJ1c3kgPT0gQlVTWSkgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIEFURURCR1BSSU5UKFJUX0RFQlVHX0VSUk9SLCAoIkJCUCByZWFkIFIlZCBmYWlsXG4iLCBfSSkpOyAgICAgIFwKLSAgICAgICAgKihfcFYpID0gKF9BKS0+QmJwV3JpdGVMYXRjaFtfSV07ICAgICAgICAgICAgICAgXAotICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgQVRFX0JCUF9JT19XUklURThfQllfUkVHX0lEKF9BLCBfSSwgX1YpICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBCQlBfQ1NSX0NGR19TVFJVQyAgQmJwQ3NyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGludCAgICAgICAgICAgICBCdXN5Q250OyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgZm9yIChCdXN5Q250PTA7IEJ1c3lDbnQ8TUFYX0JVU1lfQ09VTlQ7IEJ1c3lDbnQrKykgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBSVE1QX0lPX1JFQUQzMihfQSwgQkJQX0NTUl9DRkcsICZCYnBDc3Iud29yZCk7ICAgICBcCi0gICAgICAgIGlmIChCYnBDc3IuZmllbGQuQnVzeSA9PSBCVVNZKSAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIGNvbnRpbnVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBCYnBDc3Iud29yZCA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIEJicENzci5maWVsZC5mUmVhZCA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgQmJwQ3NyLmZpZWxkLkJCUF9SV19NT0RFID0gMTsgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBCYnBDc3IuZmllbGQuQnVzeSA9IDE7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIEJicENzci5maWVsZC5WYWx1ZSA9IF9WOyAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgQmJwQ3NyLmZpZWxkLlJlZ051bSA9IF9JOyAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBSVE1QX0lPX1dSSVRFMzIoX0EsIEJCUF9DU1JfQ0ZHLCBCYnBDc3Iud29yZCk7ICAgICBcCi0gICAgICAgIChfQSktPkJicFdyaXRlTGF0Y2hbX0ldID0gX1Y7ICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgaWYgKEJ1c3lDbnQgPT0gTUFYX0JVU1lfQ09VTlQpICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBBVEVEQkdQUklOVChSVF9ERUJVR19FUlJPUiwgKCJCQlAgd3JpdGUgUiVkIGZhaWxcbiIsIF9JKSk7ICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotLyogUlQyODgwX2lOSUMgd2lsbCBkZWZpbmUgUlQy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yAvLzgwMi4xeCBkYWVtb24gcGlkCiAJSU5UCQkJCQkJaW9jdGxfaWZfdHlwZTsKQEAgLTE5OCwxMyArMjI2LDcgQEAKIH0gVklSVFVBTF9BREFQVEVSLCBQVklSVFVBTF9BREFQVEVSOwogCiAjdW5kZWYgIEFTU0VSVAotI2RlZmluZSBBU1NFUlQoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBpZiAoISh4KSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHByaW50ayhLRVJOX1dBUk5JTkcgX19GSUxFX18gIjolZCBhc3NlcnQgIiAjeCAiZmFpbGVkXG4iLCBfX0xJTkVfXyk7ICAgIFwKLSAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQorI2RlZmluZSBBU1NFUlQoeCkKIAogdHlwZWRlZiBzdHJ1Y3Qgb3NfY29va2llCSogUE9TX0NPT0tJRTsKIHR5cGVkZWYgc3RydWN0IHBjaV9kZXYgCQkqIFBQQ0lfREVWOwpAQCAtMjM4LDYgKzI2MCw3IEBACiAKICNkZWZpbmUgUlQyODYwX1BDSV9ERVZJQ0VfSUQJCTB4MDYwMQogCisjaWZkZWYgUlQyODYwCiAjZGVmaW5lIFBDSV9NQVBfU0lOR0xFKF9oYW5kbGUsIF9wdHIsIF9zaXplLCBfc2RfaWR4LCBfZGlyKSBcCiAJbGludXhfcGNpX21hcF9zaW5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QkJZWxzZQotI2VuZGlmIC8vIE1VTFRJUExFX0NBUkRfU1VQUE9SVCAvLwogCQlzcHJpbnRmKGRldi0+bmFtZSwgInJhJWQiLCBpKTsKIAkJU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKIAl9CkBAIC04MDksMzY5ICs3MzUsNiBAQAogCiB9CiAKLQotI2lmZGVmIE1VTFRJUExFX0NBUkRfU1VQUE9SVAotLyoKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICBHZXQgY2FyZCBwcm9maWxlIHBhdGguCi0KLUFyZ3VtZW50czoKLSAgICBwQWQKLQotUmV0dXJuIFZhbHVlOgotICAgIFRSVUUJCS0gRmluZCBhIGNhcmQgcHJvZmlsZQotCUZBTFNFCQktIHVzZSBkZWZhdWx0IHByb2ZpbGUKLQotTm90ZToKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLWV4dGVybiBJTlQgUlRNUEdldEtleVBhcmFtZXRlcigKLSAgICBJTiAgUENIQVIgICBrZXksCi0gICAgT1VUIFBDSEFSICAgZGVzdCwKLSAgICBJTiAgSU5UICAgICBkZXN0c2l6ZSwKLSAgICBJTiAgUENIQVIgICBidWZmZXIpOwotCi1CT09MRUFOIFJUTVBfQ2FyZEluZm9SZWFkKAotCUlOCVBSVE1QX0FEQVBURVIgcEFkKQotewotI2RlZmluZSBNQ19TRUxFQ1RfQ0FSRElECQkwCS8qIHVzZSBDQVJEIElEICgwIH4gMzEpIHRvIGlkZW50aWZ5IGRpZmZlcmVudCBjYXJkcyAqLwotI2RlZmluZSBNQ19TRUxFQ1RfTUFDCQkJMQkvKiB1c2UgQ0FSRCBNQUMgdG8gaWRlbnRpZnkgZGlmZmVyZW50IGNhcmRzICovCi0jZGVmaW5l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AwMCkpCisjZW5kaWYKICNkZWZpbmUgSVNfUlQzMDcwKF9wQWQpCQkJCSgoKF9wQWQpLT5NQUNWZXJzaW9uICYgMHhmZmZmMDAwMCkgPT0gMHgzMDcwMDAwMCkKKyNpZmRlZiBSVDMweHgKKyNkZWZpbmUgSVNfUlQzMDcxKF9wQWQpCQkJCSgoKF9wQWQpLT5NQUNWZXJzaW9uICYgMHhmZmZmMDAwMCkgPT0gMHgzMDcxMDAwMCkKKyNkZWZpbmUgSVNfUlQyMDcwKF9wQWQpCQkJCSgoKF9wQWQpLT5SZkljVHlwZSA9PSBSRklDXzIwMjApIHx8ICgoX3BBZCktPkVGdXNlVGFnID09IDB4MjcpKQorCisjZGVmaW5lIElTX1JUMzB4eChfcEFkKQkJCQkoKChfcEFkKS0+TUFDVmVyc2lvbiAmIDB4ZmZmMDAwMDApID09IDB4MzA3MDAwMDApCisjZW5kaWYKIAogI2RlZmluZSBSSU5HX1BBQ0tFVF9JTklUKF9UeFJpbmcsIF9pZHgpICAgIFwKIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC00MzcsNyArNDQ2LDYgQEAKICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogfQogCi0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCiAvLyBTdGFBY3RpdmUuU3VwcG9ydGVkSHRQaHkuTUNTU2V0IGlzIGNvcGllZCBmcm9tIEFQIGJlYWNvbi4gIERvbid0IG5lZWQgdG8gdXBkYXRlIGhlcmUuCiAjZGVmaW5lIENPUFlfSFRTRVRUSU5HU19GUk9NX01MTUVfQVVYX1RPX0FDVElWRV9DRkcoX3BBZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtNDYxLDcgKzQ2OSw2IEBACiAJX3BBZC0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF0uTW1wc01vZGU9IChVQ0hBUikoX3BIdENhcGFiaWxpdHktPkh0Q2FwSW5mby5NaW1vUHMpOwlcCiAJX3BBZC0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF0uTWF4UkFtcGR1RmFjdG9yID0gKFVDSEFSKShfcEh0Q2FwYWJpbGl0eS0+SHRDYXBQYXJtLk1heFJBbXBkdUZhY3Rvcik7CVwKIH0KLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KIAogLy8KIC8vIE1BQ1JPIGZvciAzMi1iaXQgUENJIHJlZ2lzdGVyIHJlYWQgLyB3cml0ZQpAQCAtNDgzLDYgKzQ5MCw3IEBACiAvLwogI2RlZmluZSBNQVhfQlVTWV9DT1VOVCAgMTAwICAgICAgICAgLy8gTnVtYmVyIG9mIHJldHJ5IGJlZm9yZSBmYWlsaW5nIGFjY2VzcyBCQlAgJiBSRiBpbmRpcmVjdCByZWdpc3RlcgogLy8KKyNpZmRlZiBSVDI4NjAKICNkZWZpbmUgUlRNUF9SRl9JT19XUklURTMyKF9BLCBfVikgICAgICAgICAgICAgICAgICBcCiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIFBIWV9DU1I0X1NUUlVDICBWYWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTY0Niw3ICs2NTQsMjAgQEAKICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9CisjZW5kaWYgLyogUlQyODYwICovCisjaWZkZWYgUlQyODcwCisjZGVmaW5lIFJUTVBfUkZfSU9fV1JJVEUzMihfQSwgX1YpICAgICAgICAgICAgICAgICBSVFVTQldyaX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VjYXVzZSBNTE1FIG5lZWQgdG8gcGFzcyBkYXRhIHR5cGUKIC8vIGluZm9ybWF0aW9uIGZyb20gODAyLjExIGhlYWRlcgorI2lmZGVmIFJUMjg2MAogI2RlZmluZSBSRVBPUlRfTUdNVF9GUkFNRV9UT19NTE1FKF9wQWQsIFdjaWQsIF9wRnJhbWUsIF9GcmFtZVNpemUsIF9Sc3NpMCwgX1Jzc2kxLCBfUnNzaTIsIF9QbGNwU2lnbmFsKSAgICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICBVSU5UMzIgSGlnaDMyVFNGLCBMb3czMlRTRjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtOTA0LDYgKzkyNiw0OSBAQAogICAgIFJUTVBfSU9fUkVBRDMyKF9wQWQsIFRTRl9USU1FUl9EVzAsICZMb3czMlRTRik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICBNbG1lRW5xdWV1ZUZvclJlY3YoX3BBZCwgV2NpZCwgSGlnaDMyVFNGLCBMb3czMlRTRiwgKFVDSEFSKV9Sc3NpMCwgKFVDSEFSKV9Sc3NpMSwoVUNIQVIpX1Jzc2kyLF9GcmFtZVNpemUsIF9wRnJhbWUsIChVQ0hBUilfUGxjcFNpZ25hbCk7ICAgXAogfQorI2VuZGlmCisjaWZkZWYgUlQyODcwCisjZGVmaW5lIFJFUE9SVF9NR01UX0ZSQU1FX1RPX01MTUUoX3BBZCwgV2NpZCwgX3BGcmFtZSwgX0ZyYW1lU2l6ZSwgX1Jzc2kwLCBfUnNzaTEsIF9Sc3NpMiwgX1BsY3BTaWduYWwpICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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PZmZzZXQ7CkBAIC0yNjg2LDExICsyNjA3LDUxIEBACiAJUlRNUF9ETUFCVUYgICAgICAgICAgICAgUnhEZXNjUmluZzsgICAgICAgICAgICAgICAgIC8vIFNoYXJlZCBtZW1vcnkgZm9yIFJYIGRlc2NyaXB0b3JzCiAJUlRNUF9ETUFCVUYgICAgICAgICAgICAgVHhEZXNjUmluZ1tOVU1fT0ZfVFhfUklOR107IAkvLyBTaGFyZWQgbWVtb3J5IGZvciBUeCBkZXNjcmlwdG9ycwogCVJUTVBfVFhfUklORyAgICAgICAgICAgIFR4UmluZ1tOVU1fT0ZfVFhfUklOR107ICAgICAJLy8gQUMwfjQgKyBIQ0NBCi0KKyNlbmRpZgogCiAJTkRJU19TUElOX0xPQ0sgICAgICAgICAgaXJxX2xvY2s7CiAJVUNIQVIgICAgICAgICAgICAgICAgICAgaXJxX2Rpc2FibGVkOwogCisjaWZkZWYgUlQyODcwCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgIFVTQiByZWxhdGVkIHBhcmFtZXRlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisJc3RydWN0IHVzYl9jb25maWdfZGVzY3JpcHRvcgkJKmNvbmZpZzsKKwlVSU5UCQkJCQkJCQlCdWxrSW5FcEFkZHI7CQkvLyBidWxrLWluIGVuZHBvaW50IGFkZHJlc3MKKwlVSU5UCQkJCQkJCQlCdWxrT3V0RXBBZGRyWzZdOwkvLyBidWxrLW91dCBlbmRwb2ludCBhZGRyZXNzCisKKwlVSU5UCQkJCQkJCQlOdW1iZXJPZlBpcGVzOworCVVTSE9SVAkJCQkJCQk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ZXNldFBpcGVpZDsKKwlCT09MRUFOCQkJCQlNZ210QnVsa1BlbmRpbmc7CisJVUxPTkcJCQkJCWJ1bGtSZXNldFJlcVs2XTsKKyNlbmRpZiAvLyBSVDI4NzAgLy8KIAogCS8vIHJlc291cmNlIGZvciBzb2Z0d2FyZSBiYWNrbG9nIHF1ZXVlcwogCVFVRVVFX0hFQURFUiAgICAgICAgICAgIFR4U3dRdWV1ZVtOVU1fT0ZfVFhfUklOR107ICAvLyA0IEFDICsgMSBIQ0NBCkBAIC0yNzE3LDEwICsyNjk0LDIwIEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgICAgIFJ4IHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQorI2lmZGVmIFJUMjg2MAogCVJUTVBfUlhfUklORyAgICAgICAgICAgIFJ4UmluZzsKIAlORElTX1NQSU5fTE9DSyAgICAgICAgICBSeFJpbmdMb2NrOyAgICAgICAgICAgICAgICAgLy8gUnggUmluZyBzcGlubG9jawotCisjZW5kaWYKKyNpZmRlZiBSVDI4NzAKKwlSWF9DT05URVhUCQkJCVJ4Q29udGV4dFtSWF9SSU5HX1NJWkVdOyAgLy8gMSBmb3IgcmVkdW5kYW50IG11bHRpcGxlIElSUCBidWxrIGluLgorCU5ESVNfU1BJTl9MT0NLCQkJQnVsa0luTG9jazsJCQkJLy8gQnVsa0luIHNwaW5sb2NrIGZvciA0IEFDcworCVVDSEFSCQkJCQlQZW5kaW5nUng7CQkJCS8vIFRoZSBNYXhpbWEgcGVuZGluZyBSeCB2YWx1ZSBzaG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CU5ESVNfU1BJTl9MT0NLICAgICAgICAgIE1hY1RhYkxvY2s7CiAKLSNpZmRlZiBET1QxMV9OX1NVUFBPUlQKIAlCQV9UQUJMRQkJCUJBVGFibGU7Ci0jZW5kaWYgLy8gRE9UMTFfTl9TVVBQT1JUIC8vCisKIAlORElTX1NQSU5fTE9DSyAgICAgICAgICBCQVRhYkxvY2s7CiAJUkFMSU5LX1RJTUVSX1NUUlVDVCBSRUNCQVRpbWVyOwogCkBAIC0yODkwLDE2ICsyODg2LDEzIEBACiAKIAkvLyBmbGFncywgc2VlIGZSVE1QX0FEQVBURVJfeHh4IGZsYWdzCiAJVUxPTkcgICAgICAgICAgICAgICAgICAgRmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgIC8vIFJlcHJlc2VudCBjdXJyZW50IGRldmljZSBzdGF0dXMKKyNpZmRlZiBSVDI4NjAKIAlVTE9ORyAgICAgICAgICAgICAgICAgICBQU0ZsYWdzOyAgICAgICAgICAgICAgICAgICAgLy8gUG93ZXIgU2F2ZSBvcGVyYXRpb24gZmxhZy4KKyNlbmRpZgogCiAJLy8gY3VycmVudCBUWCBzZXF1ZW5jZSAjCiAJVVNIT1JUICAgICAgICAgICAgICAgICAgU2VxdWVuY2U7CiAKLSNpZmRlZiBVTkRFUl9DRQotCU5ESVNfSEFORExFICAgICAgICAgICAgIGhHaUlTUjsKLSNlbmRpZgotCi0KIAkvLyBDb250cm9sIGRpc2Nvbm5lY3QgLyBjb25uZWN0IGV2ZW50IGdlbmVyYXRpb24KIAkvLysrK0RpZG4ndCB1c2VkIGFueW1vcmUKIAlVTE9ORyAgICAgICAgICAgICAgICAgICBMaW5rRG93blRpbWU7CkBAIC0yOTI4LDYgKzI5MjEsMTQgQEAKIAkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogICAgICBTdGF0aXN0aWMgcmVsYXRlZCBwY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XRpb24gc3RhdGUgbWFjaGluZQotI2RlZmluZSBBUENMSV9BVVRIX1JFUV9JRExFICAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgQVBDTElfQVVUSF9XQUlUX1NFUTIgICAgICAgICAgICAgICAxCi0jZGVmaW5lIEFQQ0xJX0FVVEhfV0FJVF9TRVE0ICAgICAgICAgICAgICAgMgotI2RlZmluZSBBUENMSV9NQVhfQVVUSF9TVEFURSAgICAgICAgICAgICAgIDMKLQotI2RlZmluZSBBUENMSV9BVVRIX01BQ0hJTkVfQkFTRSAgICAgICAgICAgIDAKLSNkZWZpbmUgQVBDTElfTVQyX01MTUVfQVVUSF9SRVEgICAgICAgICAgICAwCi0jZGVmaW5lIEFQQ0xJX01UMl9NTE1FX0RFQVVUSF9SRVEgICAgICAgICAgMQotI2RlZmluZSBBUENMSV9NVDJfUEVFUl9BVVRIX0VWRU4gICAgICAgICAgIDIKLSNkZWZpbmUgQVBDTElfTVQyX1BFRVJfREVBVVRIICAgICAgICAgICAgICAzCi0jZGVmaW5lIEFQQ0xJX01UMl9BVVRIX1RJTUVPVVQgICAgICAgICAgICAgNAotI2RlZmluZSBBUENMSV9NQVhfQVVUSF9NU0cgICAgICAgICAgICAgICAgIDUKLQotI2RlZmluZSBBUENMSV9BVVRIX0ZVTkNfU0laRSAgICAgICAgICAgICAgIChBUENMSV9NQVhfQVVUSF9TVEFURSAqIEFQQ0xJX01BWF9BVVRIX01TRykKLQotLy9BcENsaSBhc3NvY2lhdGlvbiBzdGF0ZSBtYWNoaW5lCi0jZGVmaW5lIEFQQ0xJX0FTU09DX0lETEUgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBBUENMSV9BU1NPQ19XQUlUX1JTUCAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgQVBDTElfTUFYX0FTU09DX1NUQVRFICAgICAgICAgICAgICAyCi0KLSNkZWZpbmUgQVBDTElfQVNTT0NfTUFDSElORV9CQVNFICAgICAgICAgICAwCi0jZGVmaW5lIE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NfU0laRSAgICAgICAgICAgICAgKEFQQ0xJX01BWF9TWU5DX1NUQVRFICogQVBDTElfTUFYX1NZTkNfTVNHKQotCi0vL0FwQ2xpIGN0cmwgc3RhdGUgbWFjaGluZQotI2RlZmluZSBBUENMSV9DVFJMX0RJU0NPTk5FQ1RFRCAgICAgICAgICAgMCAgLy8gbWVyZ2UgTk9fQlNTLElCU1NfSURMRSxJQlNTX0FDVElWRSBhbmQgQlNTIGluIHRvIDEgc3RhdGUKLSNkZWZpbmUgQVBDTElfQ1RSTF9QUk9CRSAgICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgQVBDTElfQ1RSTF9BVVRIICAgICAgICAgICAgICAgICAgIDIKLSNkZWZpbmUgQVBDTElfQ1RSTF9BVVRIXzIgICAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgQVBDTElfQ1RSTF9BU1NPQyAgICAgICAgICAgICAgICAgIDQKLSNkZWZpbmUgQVBDTElfQ1RSTF9ERUFTU09DICAgICAgICAgICAgICAgIDUKLSNkZWZpbmUgQVBDTElfQ1RSTF9DT05ORUNURUQgICAgICAgICAgICAgIDYKLSNkZWZpbmUgQVBDTElfTUFYX0NUUkxfU1RBVEUgICAgICAgICAgICAgIDcKLQotI2RlZmluZSBBUENMSV9DVFJMX01BQ0hJTkVfQkFTRSAgICAgICAgICAgMAotI2RlZmluZSBBUENMSV9DVFJMX0pPSU5fUkVRICAgICAgICAgICAgICAgMAotI2RlZmluZSBBUENMSV9DVFJMX1BST0JFX1JTUCAgICAgICAgICAgICAgMQotI2RlZmluZSBBUENMSV9DVFJMX0FVVEhfUlNQICAgICAgICAgICAgICAgMgotI2RlZmluZSBBUENMSV9DVFJMX0RJU0NPTk5FQ1RfUkVRICAgICAgICAgMwotI2RlZmluZSBBUENMSV9DVFJMX1BFRVJfRElTQ09OTkVDVF9SRVEgICAgNAotI2RlZmluZSBBUENMSV9DVFJMX0FTU09DX1JTUCAgICAgICAgICAgICAgNQotI2RlZmluZSBBUENMSV9D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lRfQklHX0VORElBTgotI2RlZmluZSBESVJfUkVBRCAgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBESVJfV1JJVEUgICAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBUWVBFX1RYRCAgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBUWVBFX1JYRCAgICAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBUWVBFX1RYSU5GTwkJCQkJMAotI2RlZmluZSBUWVBFX1JYSU5GTwkJCQkJMQotI2RlZmluZSBUWVBFX1RYV0kJCQkJCTAKLSNkZWZpbmUgVFlQRV9SWFdJCQkJCQkxCi0jZW5kaWYKLQogLy8gPT09PT09PT09PT09PT09PT09PT09PT09PSBBUCBydG1wX2RlZi5oID09PT09PT09PT09PT09PT09PT09PT09PT09PQogLy8gdmFsdWUgZG9tYWluIGZvciBwQWQtPkV2ZW50VGFiLkxvZ1tdLkV2ZW50CiAjZGVmaW5lIEVWRU5UX1JFU0VUX0FDQ0VTU19QT0lOVCAgICAwIC8vIExvZyA9ICJoaDptbTpzcyAgIFJlc3RhcnQgQWNjZXNzIFBvaW50IgpAQCAtMTQxMCwyNCArMTMyMCw2IEBACiAjZGVmaW5lIElOVF9NRVNIICAgICAgICAgICAgICAgICAgIAkweDA1MDAKIAogLy8gVXNlIGJpdG1hcCB0byBhbGxvdyBjb2V4aXN0IG9mIEFURV9UWEZSQU1FIGFuZCBBVEVfUlhGUkFNRShpLmUuLHRvIHN1cHBvcnQgTG9vcEJhY2sgbW9kZSkKLSNpZmRlZiBSQUxJTktfQVRFCi0jZGVmaW5lCUFURV9TVEFSVCAgICAgICAgICAgICAgICAgICAweDAwICAgLy8gU3RhcnQgQVRFCi0jZGVmaW5lCUFURV9TVE9QICAgICAgICAgICAgICAgICAgICAweDgwICAgLy8gU3RvcCBBVEUKLSNkZWZpbmUJQVRFX1RYQ09OVCAgICAgICAgICAgICAgICAgIDB4MDUgICAvLyBDb250aW51b3VzIFRyYW5zbWl0Ci0jZGVm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ICB7CiAgICAgICAgICAgICAgICAgLy8gQXV0aGVudGljYXRpb24gTW9kZSAiTEVBUCIgaGFzIGFsbG93IGZvciBDQ1ggMS5YCiAgICAgICAgICAgICAgICAgaWYgKChwQWQtPk1sbWVBdXguQWxnID09IE5kaXM4MDJfMTFBdXRoTW9kZU9wZW4pCi0jaWZkZWYgTEVBUF9TVVBQT1JUCi0JCQkJCXx8IChwQWQtPlN0YUNmZy5MZWFwQXV0aE1vZGUgPT0gQ0lTQ09fQXV0aE1vZGVMRUFQKQotI2VuZGlmIC8vIExFQVBfU1VQUE9SVCAvLwogCQkJCSkKICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPSBBVVRIX1JFUV9JRExFOwotI2lmZGVmIExFQVBfU1VQUE9SVAotICAgICAgICAgICAgICAgICAgICBwQWQtPk1sbWUuTGVhcE1hY2hpbmUuQ3VyclN0YXRlID0gTEVBUF9JRExFOwotI2VuZGlmIC8vIExFQVBfU1VQUE9SVCAvLwogICAgICAgICAgICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNVDJfQVVUSF9DT05GLCAyLCAmU3RhdHVzKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgZWxzZQpAQCAtMjgyLDE0ICsyNzYsNiBAQAogICAgICAgICAgICAgfQogICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgewotI2lmZGVmIExFQVBfU1VQUE9SVAotICAgICAgICAgICAgICAgIGlmIChwQWQtPlN0YUNmZy5MZWFwQXV0aE1vZGUgPT0gQ0lTQ09fQXV0aE1vZGVMRUFQKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgLy9JbnZhbGlkIEF1dGhlbnRpY2F0aW9uIHBvc3NpYmxlIHJvZ3VlIEFQCi0gICAgICAgICAgICAgICAgICAgIC8vQ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uIikpOwogCQlwQWQtPk1sbWUuQ250bE1hY2hpbmUuQ3VyclN0YXRlID0gQ05UTF9JRExFOwotI2lmZGVmIE5BVElWRV9XUEFfU1VQUExJQ0FOVF9TVVBQT1JUCisKICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhICAgIHdycXU7CiAKQEAgLTU2Nyw3ICs1NjMsNiBAQAogICAgICAgICAgICAgICAgIHdpcmVsZXNzX3NlbmRfZXZlbnQocEFkLT5uZXRfZGV2LCBTSU9DR0lXQVAsICZ3cnF1LCBOVUxMKTsKIAogICAgICAgICAgICAgfQotI2VuZGlmIC8vIE5BVElWRV9XUEFfU1VQUExJQ0FOVF9TVVBQT1JUIC8vCiAJfQogCWVsc2UKIAl7CkBAIC02NzIsMTEzICs2NjcsNiBAQAogCUl0ZXJhdGVPbkJzc1RhYihwQWQpOwogfQogCi0jaWZkZWYgUU9TX0RMU19TVVBQT1JUCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBDbnRsT2lkRExTU2V0dXBQcm9jKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLQlQUlRfODAyXzExX0RMUwkJcERMUyA9IChQUlRfODAyXzExX0RMUylFbGVtLT5Nc2c7Ci0JTUxNRV9ETFNfUkVRX1NUUlVDVAlNbG1lRGxzUmVxOwotCUlOVAkJCQkJaTsKLQlVU0hPUlQJCQkJcmVhc29uID0gUkVBU09OX1VOU1BFQ0lGWTsKLQotCURCR1BSSU5UKFJUX0RFQlVHX1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bjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIERsc1Bhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX0RMU19SRVFfU1RSVUNUICpwRGxzUmVxLAotCUlOIFBSVF84MDJfMTFfRExTIHBEbHMsCi0JSU4gVVNIT1JUIHJlYXNvbikKLXsKLQlwRGxzUmVxLT5wRExTID0gcERsczsKLQlwRGxzUmVxLT5SZWFzb24gPSByZWFzb247Ci19Ci0jZW5kaWYgLy8gUU9TX0RMU19TVVBQT1JUIC8vCi0KIC8qCiAJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAlEZXNjcmlwdGlvbjoKQEAgLTI1MjMsMjEgKzIzMjEsNjEgQEAKIAogCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgKi8KKworCisjaWZkZWYgUlQyODcwCisKK1ZPSUQgTWxtZUNudGxDb25maXJtKAorCUlOIFBSVE1QX0FEQVBURVIgcEFkLAorCUlOIFVMT05HIE1zZ1R5cGUsCisJSU4gVVNIT1JUIE1zZykKK3sKKwlNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNc2dUeXBlLCBzaXplb2YoVVNIT1JUKSwgJk1zZyk7Cit9CisjZW5kaWYKKwogVk9JRCBDb21wb3NlUHNQb2xsKAogCUlOIFBSVE1QX0FEQVBURVIgcEFkKQogeworI2lmZGVmIFJUMjg3MAorCVBUWElORk9fU1RSVUMJCXBUeEluZm87CisJUFRYV0lfU1RSVUMJCXBUeFdJOworCisJREJHUFJJTlQoUlRfREVCVUdfV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gICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotICAgIGRscy5jCi0KLSAgICBBYnN0cmFjdDoKLSAgICBIYW5kbGUgV01NLURMUyBzdGF0ZSBtYWNoaW5lCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5Ogot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5RGVzYy5LZXlJbmZvLkluc3RhbGwsCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLktleUFjaywKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uU2VjdXJlLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5FS0RfREwsCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLkVycm9yLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5SZXF1ZXN0KSk7Ci0KLQkJaWYgKChMZW4gPj0gKExFTkdUSF84MDJfMTEgKyA2ICsgMiArIDIgKyBzaXplb2YoRUFQT0xfUEFDS0VUKSAtIE1BWF9MRU5fT0ZfUlNOSUUgKyAxNikpICYmIHBFYXAtPktleURlc2MuS2V5SW5mby5LZXlNaWMKLQkJCSYmIHBFYXAtPktleURlc2MuS2V5SW5mby5JbnN0YWxsICYmIHBFYXAtPktleURlc2MuS2V5SW5mby5LZXlBY2sgJiYgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLlNlY3VyZQotCQkJJiYgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLkVLRF9ETCAmJiAhcEVhcC0+S2V5RGVzYy5LZXlJbmZvLkVycm9yICYmICFwRWFwLT5LZXlEZXNjLktleUluZm8uUmVxdWVzdCkKLQkJewotCQkJLy8gRmlyc3QgdmFsaWRhdGUgcmVwbGF5IGNvdW50ZXIsIG9ubHkg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l9TVVBQT1JUIC8vCiAKLSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9TVVBQT1JUCi0jaWZuZGVmIE5BVElWRV9XUEFfU1VQUExJQ0FOVF9TVVBQT1JUCi0JICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLldwYVN1cHBsaWNhbnRVUCkKLQkgICAgICAgICAgICAgICAgICAgICAgICB7Ci0JICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgICAgd3JxdTsKLQotCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZW5kQXNzb2NJRXNUb1dwYVN1cHBsaWNhbnQocEFkKTsKLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtc2V0KCZ3cnF1LCAwLCBzaXplb2Yod3JxdSkpOwotCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cnF1LmRhdGEuZmxhZ3MgPSBSVF9BU1NPQ19FVkVOVF9GTEFHOwotCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXJlbGVzc19zZW5kX2V2ZW50KHBBZC0+bmV0X2RldiwgSVdFVkNVU1RPTSwgJndycXUsIE5VTEwpOwotCSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSNlbmRpZiAvLyBOQVRJVkVfV1BBX1NVUFBMSUNBTlRfU1VQUE9SVCAvLwotI2VuZGlmIC8vIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQgLy8KLQotI2lmZGVmIE5BVElWRV9XUEFfU1VQUExJQ0FOVF9TVVBQT1JUCiAJICAgICAgICAgICAgICAgICAgICAgICAgewogCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhICAgIHdycXU7CiAJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdleHRfbm90aWZ5X2V2ZW50X2Fzc29jKHBBZCk7CkBAIC0xNDM0LDEwICsxMzcyLDgyIEBACiAJICAgICAgICAgICAgICAgICAgICAgICAgICA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AKICAgICAgICAgICAgIGl3ZS51LmRhdGEubGVuZ3RoID0gKHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLldwYUlFLklFTGVuICogMikgKyA3OwogICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoY3VzdG9tLCAid3BhX2llPSIsIDcpOwogICAgICAgICAgICAgZm9yIChpZHggPSAwOyBpZHggPCBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5XcGFJRS5JRUxlbjsgaWR4KyspCi0gICAgICAgICAgICAgICAgc3ByaW50ZihjdXN0b20sICIlcyUwMngiLCBjdXN0b20sIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLldwYUlFLklFW2lkeF0pOworICAgICAgICAgICAgICAgIHNwcmludGYoY3VzdG9tICsgc3RybGVuKGN1c3RvbSksICIlMDJ4IiwgcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uV3BhSUUuSUVbaWR4XSk7CiAgICAgICAgICAgICBwcmV2aW91c19ldiA9IGN1cnJlbnRfZXY7Ci0gICAgCQljdXJyZW50X2V2ID0gSVdFX1NUUkVBTV9BRERfUE9JTlQoaW5mbywgY3VycmVudF9ldiwgZW5kX2J1ZiwgJml3ZSwgIGN1c3RvbSk7CisgICAgCQljdXJyZW50X2V2ID0gaXdlX3N0cmVhbV9hZGRfcG9pbnQoY3VycmVudF9ldiwgZW5kX2J1ZiwgJml3ZSwgIGN1c3RvbSk7CiAgICAgICAgICAgICBpZiAoY3VycmVudF9ldiA9PSBwcmV2aW91c19ldikKICNpZiBXSVJFTEVTU19FWFQgPj0gMTcKICAgICAgICAgICAgICAgICByZXR1cm4gLUUyQklHOwpAQCAtMTM4MCw5ICsxNDI5LDkgQEAKICAgICAgICAgICAgIGl3ZS51LmRhdGEubGVuZ3RoID0gKHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlJzbklFLklFTGVuICogMikgKyA3OwogICAgICAgICAgICAgT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CQkJZmlsZV93LT5mX29wLT53cml0ZShmaWxlX3csIG1zZywgc3RybGVuKG1zZyksICZmaWxlX3ctPmZfcG9zKTsKKworCQkJCQlwcmludGsoIiVzIiwgbXNnKTsKKwkJCQkJZWVwQWRkciArPSAyOworCQkJCX0KKwkJCQlzcHJpbnRmKG1zZywgIlxuRHVtcCBhbGwgRUVQUk9NIHZhbHVlcyB0byAlc1xuIiwgZmlsZU5hbWUpOworCQkJfQorCQkJZmlscF9jbG9zZShmaWxlX3csIE5VTEwpOworCQl9CisJCXNldF9mcyhvcmlnX2ZzKTsKKwl9CisjZW5kaWYgLyogUlQzMHh4ICovCiAJaWYoc3RybGVuKG1zZykgPT0gMSkKIAkJc3ByaW50Zihtc2crc3RybGVuKG1zZyksICI9PT0+RXJyb3IgY29tbWFuZCBmb3JtYXQhIik7CiAKQEAgLTY5MTQsNiArNjY3NCwxNTQgQEAKIAogCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIjw9PVJUTVBJb2N0bEUyUFJPTVxuIikpOwogfQorI2lmZGVmIFJUMzB4eAorLyoKKyAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgIERlc2NyaXB0aW9uOgorICAgICAgICBSZWFkIC8gV3JpdGUgUkYgcmVnaXN0ZXIKK0FyZ3VtZW50czoKKyAgICBwQWRhcHRlciAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgorICAgIHdycSAgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBpb2N0bCBhcmd1bWVudAorCisgICAgUmV0dXJuIFZhbHVlOgorICAgICAgICBOb25lCisKKyAgICBOb3RlOgorICAgICAgICBVc2FnZToKKyAgICAgICAgICAgICAgIDEuKSBpd3ByaXYgcmEwIHJmICAgICAgICAgICAgICAgID09PiByZWFkIGFsbCBSRiByZWdpc3RlcnMKKyAgICAgICAg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pZmRlZiBDT05GSUdfU1RBX1NVUFBPUlQKIE1PRFVMRV9MSUNFTlNFKCJHUEwiKTsKICNpZmRlZiBNT0RVTEVfVkVSU0lPTgogTU9EVUxFX1ZFUlNJT04oU1RBX0RSSVZFUl9WRVJTSU9OKTsKICNlbmRpZgotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCi0jaWZkZWYgTVVMVElQTEVfQ0FSRF9TVVBQT1JUCi0vLyByZWNvcmQgd2hldGhlciB0aGUgY2FyZCBpbiB0aGUgY2FyZCBsaXN0IGlzIHVzZWQgaW4gdGhlIGNhcmQgZmlsZQotZXh0ZXJuIFVJTlQ4ICBNQ19DYXJkVXNlZFtdOwotI2VuZGlmIC8vIE1VTFRJUExFX0NBUkRfU1VQUE9SVCAvLwogCiAvKiBLZXJuZWwgdGhyZWFkIGFuZCB2YXJzLCB3aGljaCBoYW5kbGVzIHBhY2tldHMgdGhhdCBhcmUgY29tcGxldGVkLiBPbmx5CiAgKiBwYWNrZXRzIHRoYXQgaGF2ZSBhICJjb21wbGV0ZSIgZnVuY3Rpb24gYXJlIHNlbnQgaGVyZS4gVGhpcyB3YXksIHRoZQpAQCAtNzcsMjYgKzcwLDYgQEAKICNlbmRpZgogCiAKLSNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPCBLRVJORUxfVkVSU0lPTigyLDUsMCkKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLy90ZXN0ZWQgZm9yIGtlcm5lbCAyLjQgc2VyaWVzCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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ICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKio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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSAgICBNb2R1bGUgTmFtZToKLSAgICBhcC5oCi0KLSAgICBBYnN0cmFjdDoKLSAgICBNaW5pcG9ydCBnZW5lcmljIHBvcnRpb24gaGVhZGVyIGZpbGUKLQotICAgIFJldmlzaW9uIEhpc3Rvcnk6Ci0gICAgV2hvICAgICAgICAgV2hlbiAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gICAgUGF1bCBMaW4gICAgMDgtMDEtMjAwMiAgICBjcmVhdGVkCi0gICAgSmFtZXMgVGFuICAgMDktMDYtMjAwMiAgICBtb2RpZmllZCAoUmV2aXNlIE5UQ1JlZ1RhYmxlKQotICAgIEpvaG4gQ2hhbmcgIDEyLTIyLTIwMDQgICAgbW9kaWZpZWQgZm9yIFJUMjU2MS8yNjYxLiBtZXJnZSB3aXRoIFNUQSBkcml2ZXIKLSovCi0jaWZuZGVmIF9fQVBfSF9fCi0jZGVmaW5lIF9fQVBfSF9fCi0KLQotCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09IEFQIFJUTVAuaCA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gICAgICBGdW5jdGlvbiBQcm90b3R5cGVzCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8vIGFwX2RhdGEuYwotCi1CT09MRUFOIEFQQnJpZGdlVG9XaXJlbGVzc1N0YSgKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZCwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIHBIZWFkZXIsCi0gICAgSU4gIFVJTlQgICAgICAgICAgICBIZHJMZW4sCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBwRGF0YSwKLSAgICBJTiAgVUlOVCAgICAgICAgICAgIERhdGFMZW4sCi0gICAgSU4gIFVMT05HICAgICAgICAgICBmcm9td2RzaWR4KTsKLQotQk9PTEVBTiBBUEhhbmRsZVJ4RG9uZUludGVycnVwdCgKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZCk7Ci0KLVZPSUQJQVBTZW5kUGFja2V0cygKLQlJTglORElTX0hBTkRMRQkJTWluaXBvcnRBZGFwdGVyQ29udGV4dCwKLQlJTglQUE5ESVNfUEFDS0VUCXBwUGFja2V0QXJyYXksCi0JSU4JVUlOVAkJCU51bWJlck9mUGFja2V0cyk7Ci0KLU5ESVNfU1RBVFVTIEFQU2VuZFBhY2tldCgKLSAgICBJTiAgUFJUTVBfQURBUFRFUi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DIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAg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RcbiIscEFkLT5uZXRfZGV2LT5uYW1lKTsKIAkJcmV0dXJuIE5ESVNfU1RBVFVTX0ZBSUxVUkU7CiAJfQotCXBPYmotPlRpbWVyUVRocl90YXNrID0gdHNrOworI2lmbmRlZiBSVDMweHgKKwlwT2JqLT5UaW1lclFUaHJfcGlkID0gR0VUX1BJRChwaWRfbnVtYmVyKTsKKyNlbmRpZgorI2lmZGVmIFJUMzB4eAorCXBPYmotPlRpbWVyUVRocl9waWQgPSBmaW5kX2dldF9waWQocGlkX251bWJlcik7CisjZW5kaWYKIAkvLyBXYWl0IGZvciB0aGUgdGhyZWFkIHRvIHN0YXJ0CiAJd2FpdF9mb3JfY29tcGxldGlvbigmKHBBZC0+VGltZXJRQ29tcGxldGUpKTsKIApAQCAtODMxLDggKzg0OSw2IEBACiAJcmV0dXJuIE5ESVNfU1RBVFVTX1NVQ0NFU1M7CiB9CiAKLQotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogUm91dGluZSBEZXNjcmlwdGlvbjoKQEAgLTEwMTMsNyArMTAyOSw2IEBACiAJCURCR1BSSU5UX1JBVyhSVF9ERUJVR19UUkFDRSwoIiAleDoiLCBwS2V5LT5LZXlNYXRlcmlhbFtpXSkpOwogCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCgiCSBcbiIpKTsKIH0KLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KIAogLyoKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpAQCAtMTA4NCwxOCArMTA5OSwxMyBAQAogCS8vIHNraXAgVVNCIGZyYW1lIGxlbmd0aCBmaWVsZAogCXBEYXRhICs9IFJUMjg3MF9SWERNQUxFTl9GSUVMRF9TSVpFOwogCXBSeFdJID0gKFB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J1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0JYWN0aW9uLmMKLQotICAgIEFic3RyYWN0OgotICAgIEhhbmRsZSBhc3NvY2lhdGlvbiByZWxhdGVkIHJlcXVlc3RzIGVpdGhlciBmcm9tIFdTVEEgb3IgZnJvbSBsb2NhbCBNTE1FCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotICAgIC0tLS0tLS0tICAgIC0tLS0tLS0tLS0gICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCUphbiBMZWUJCTIwMDYJICAJY3JlYXRlZCBmb3IgcnQyODYwCi0gKi8KLQotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotI2luY2x1ZGUgImFjdGlvbi5oIgotCi0KLXN0YXRpYyBWT0lEIFJlc2VydmVkQWN0aW9uKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSk7Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgYXNzb2NpYXRpb24gc3RhdGUgbWFjaGluZSBpbml0LCBpbmNsdWRpbmcgc3RhdGUgdHJhbnNpdGlvbiBhbmQgdGltZXIgaW5pdAotICAgIFBhcmFtZXRlcnM6Ci0gICAgICAgIFMgLSBwb2ludGVyIHRvIHRoZSBhc3NvY2lhdGlvbiBzdGF0ZSBtYWNoaW5lCi0gICAgTm90ZToKLSAgICAgICAgVGhlIHN0YXRlIG1hY2hpbmUgbG9va3MgbGlrZSB0aGUgZm9sbG93aW5nCi0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFTU09DX0lETEUKLSAgICAgICAgTVQyX01MTUVfRElTQVNTT0NfUkVRICAgIG1sbWVfZGlzYXNzb2NfcmVxX2FjdGlvbgotICAgICAgICBNVDJfUEVFUl9ESVNBU1NPQ19SRVEgICAgcGVlcl9kaXNhc3NvY19hY3Rpb24KLSAgICAgICAgTVQyX1BFRVJfQVNTT0NfUkVRICAgICAgIGRyb3AKLSAgICAgICAgTVQyX1BFRVJfUkVBU1NPQ19SRVEgICAgIGRyb3AKLSAgICAgICAgTVQyX0NMUzNFUlIgICAgICAgICAgICAgIGNsczNlcnJfYWN0aW9uCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBY3Rpb25TdGF0ZU1hY2hpbmVJbml0KAotICAgIElOCVBSVE1QX0FEQVBURVIJcEFkLAotICAgIElOICBTVEFURV9NQUNISU5FICpTLAotICAgIE9VVCBTVEFURV9NQUNISU5FX0ZVTkMgVHJhbnNbXSkKLXsKLQlTdGF0ZU1hY2hpbmVJbml0KFMsIChTVEFURV9NQUNISU5FX0ZVTkMgKilUcmFucywgTUFYX0FDVF9TVEFURSwgTUFYX0FDVF9NU0csIChTVEFURV9NQUNISU5FX0ZVTkMpRHJvcCwgQUNUX0lETEUsIEFDVF9NQUNISU5FX0JBU0UpOwotCi0JU3RhdGVN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NTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCWFpcm9uZXQuaAotCi0JQWJzdHJhY3Q6Ci0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobwkJCVdoZW4JCQlXaGF0Ci0JLS0tLS0tLS0JLS0tLS0tLS0tLQkJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCU5hbWUJCURhdGUJCQlNb2RpZmljYXRpb24gbG9ncwotCVBhdWwgTGluCTA0LTA2LTE1C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G9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotCi0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotCi0KLSNkZWZpbmUgQkFfT1JJX0lOSVRfU0VRCQkocEVudHJ5LT5UeFNlcVtUSURdKSAvLzEJCQkvLyBpbml0YWwgc2VxdWVuY2UgbnVtYmVyIG9mIEJBIHNlc3Npb24KLQotI2RlZmluZSBPUklfU0VTU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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotI2RlZmluZSBNQVhfVFhfSU5fVEJUVAkJKDE2KQotCi0KLVVDSEFSCVNOQVBfODAyXzFIW10gPSB7MHhhYSwgMHhhYSwgMHgwMywgMHgwMCwgMHgwMCwgMHgwMH07Ci1VQ0hBUglTTkFQX0JSSURHRV9UVU5ORUxbXSA9IHsweGFhLCAweGFhLCAweDAzLCAweDAwLCAweDAwLCAweGY4fTsKLS8vIEFkZCBDaXNjbyBBaXJvbmV0IFNOQVAgaGVhZGUgZm9yIENDWDIgc3VwcG9ydAotVUNIQVIJU05BUF9BSVJPTkVUW10gPSB7MHhhYSwgMHhhYSwgMHgwMywgMHgwMCwgMHg0MCwgMHg5NiwgMHgwMCwgMHgwMH07Ci1VQ0hBUglDS0lQX0xMQ19TTkFQW10gPSB7MHhhYSwgMHh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xJID0gRkFMU0U7Ci0KLQotCi0jaWZkZWYgUlQyODcwCi0JCQlOZGlzWmVyb01lbW9yeShwQWQtPk1hY1RhYi5Db250ZW50W2ldLkFkZHIsIDYpOwotCQkJUlQyOFhYX1NUQV9FTlRSWV9NQUNfUkVTRVQocEFkLCBpKTsKLSNlbmRpZiAvLyBSVDI4NzAgLy8KLQotCQkJLy9Bc2ljRGVsV2NpZFRhYihwQWQsIGkpOwotCQl9Ci0JfQotCi0JcmV0dXJuOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBBc3NvY1Bhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX0FTU09DX1JFUV9TVFJVQ1QgKkFzc29jUmVxLAotCUlOIFBVQ0hBUiAgICAgICAgICAgICAgICAgICAgIHBBZGRyLAotCUlOIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIENhcGFiaWxpdHlJbmZvLAotCUlOIFVMT05HICAgICAgICAgICAgICAgICAgICAgIFRpbWVvdXQsCi0JSU4gVVNIT1JUICAgICAgICAgICAgICAgICAgICAgTGlzdGVuSW50dikKLXsKLQlDT1BZX01BQ19BRERSKEFzc29jUmVxLT5BZGRyLCBwQWRkcik7Ci0JLy8gQWRkIG1hc2sgdG8gc3VwcG9ydCA4MDIuMTFiIG1vZGUgb25seQotCUFzc29jUmVxLT5DYXBhYmlsaXR5SW5mbyA9IENhcGFiaWxpdHlJbmZvICYgU1VQUE9SVEVEX0NBUEFCSUxJVFlfSU5GTzsgLy8gbm90IGNmLXBvbGxhYmxlLCBub3QgY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5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0E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XR1cm46Ci0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0RyaXZlclZlcnNpb25fUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0KLSNpZmRlZiBDT05GSUdfU1RBX1NVUFBPUlQKLQlJRl9ERVZfQ09ORklHX09QTU9ERV9PTl9TVEEocEFkKQotCQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJEcml2ZXIgdmVyc2lvbi0lc1xuIiwgU1RBX0RSSVZFUl9WRVJTSU9OKSk7Ci0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQ291bnRyeSBSZWdpb24uCi0gICAgICAgIFRoaXMgY29tbWFuZCB3aWxsIG5vdCB3b3JrLCBpZiB0aGUgZmllbGQgb2YgQ291bnRyeVJlZ2lvbiBpbiBlZXByb20gaXMgcHJvZ3JhbW1lZC4KLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfQ291bnRyeVJlZ2lvbl9Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBVQ0hBUgkJCWFyZykKLXsKLQlVTE9ORyByZWdpb247Ci0KLQlyZWdpb24gPSBzaW1wbGVfc3RydG9sKGF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mV0dXJuIHN1Y2Nlc3M7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFNob3J0IFNsb3QgVGltZSBFbmFibGUgb3IgRGlzYWJsZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9TaG9ydFNsb3RfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JVUxPTkcgU2hvcnRTbG90OwotCi0JU2hvcnRTbG90ID0gc2ltcGxlX3N0cnRvbChhcmcsIDAsIDEwKTsKLQotCWlmIChTaG9ydFNsb3QgPT0gMSkKLQkJcEFkLT5Db21tb25DZmcuYlVzZVNob3J0U2xvdFRpbWUgPSBUUlVFOwotCWVsc2UgaWYgKFNob3J0U2xvdCA9PSAwKQotCQlwQWQtPkNvbW1vbkNmZy5iVXNlU2hvcnRTbG90VGltZSA9IEZBTFNFOwotCWVsc2UKLQkJcmV0dXJuIEZBTFNFOyAgLy9JbnZhbGlkIGFyZ3VtZW50Ci0KLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfU2hvcnRTbG90X1Byb2M6OihTaG9ydFNsb3Q9JWQpXG4iLCBwQWQtPkNvbW1vbkNmZy5iVXNlU2hvcnRTbG90VGltZSkpOwotCi0JcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSA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1cG9uIGFzc29jaWF0aW9uLgotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCQkJcEFkLT5Db21tb25DZmcuVHhQcmVhbWJsZSA9IFByZWFtYmxlOwotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCQkJSUZfREVWX0NPTkZJR19PUE1PREVfT05fU1RBKHBBZCkKLQkJCQlNbG1lU2V0VHhQcmVhbWJsZShwQWQsIFJ0ODAyXzExUHJlYW1ibGVMb25nKTsKLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KLQkJCWJyZWFrOwotCQlkZWZhdWx0OiAvL0ludmFsaWQgYXJndW1lbnQKLQkJCXJldHVybiBGQUxTRTsKLQl9Ci0KLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfVHhQcmVhbWJsZV9Qcm9jOjooVHhQcmVhbWJsZT0lbGQpXG4iLCBwQWQtPkNvbW1vbkNmZy5UeFByZWFtYmxlKSk7Ci0KLQlyZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgUlRTIFRocmVzaG9sZAotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9SVFNUaHJlc2hvbGRfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JIE5ESVNfODAyXzExX1JUU19USFJFU0hPTEQgICAgICAgICAgIFJ0c1RocmVzaDsKLQotCVJ0c1RocmVzaCA9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QtPkNvbW1vbkNmZy5iQWdncmVnYXRpb25DYXBhYmxlKSk7Ci0KLQlyZXR1cm4gVFJVRTsKLX0KLSNlbmRpZgotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBJRUVFODAyMTFILgotICAgICAgICBUaGlzIHBhcmFtZXRlciBpcyAxIHdoZW4gbmVlZHMgcmFkYXIgZGV0ZWN0aW9uLCBvdGhlcndpc2UgMAotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9JRUVFODAyMTFIX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotICAgIFVMT05HIGllZWU4MDIxMWg7Ci0KLQlpZWVlODAyMTFoID0gc2ltcGxlX3N0cnRvbChhcmcsIDAsIDEwKTsKLQotCWlmIChpZWVlODAyMTFoID09IDEpCi0JCXBBZC0+Q29tbW9uQ2ZnLmJJRUVFODAyMTFIID0gVFJVRTsKLQllbHNlIGlmIChpZWVlODAyMTFoID09IDApCi0JCXBBZC0+Q29tbW9uQ2ZnLmJJRUVFODAyMTFIID0gRkFMU0U7Ci0JZWxzZQotCQlyZXR1cm4gRkFMU0U7ICAvL0ludmFsaWQgYXJndW1lbnQKLQotCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9JRUVFODAyMTFIX1Byb2M6OihJRUVFODAyMTFIPSVkKVxuIiwgcEFkLT5Db21tb25DZmcuYklFRUU4MDIxMUgpKTsKLQotCXJldHVybiBUUlVFOwotfQotCi0KLSNpZmRlZiBEQkcKLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgRm9yIERlYnVnIGluZm9ybWF0aW9uCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X0RlYnVnX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIj09PiBTZXRfRGVidWdfUHJvYyAqKioqKioqKioqKioqKioqKioqXG4iKSk7Ci0KLSAgICBpZihzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApIDw9IFJUX0RFQlVHX0xPVUQpCi0gICAgICAgIFJURGVidWdMZXZlbCA9IHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCk7Ci0KLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCI8PT0gU2V0X0RlYnVnX1Byb2MoUlREZWJ1Z0xldmVsID0gJWxkKVxuIiwgUlREZWJ1Z0xldmVsKSk7Ci0KLQlyZXR1cm4gVFJVRTsKLX0KLSNlbmRpZgotCi1JTlQJU2hvd19EZXNjSW5mb19Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBVQ0hBUgkJCWFyZykKLXsKLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0g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CQkJCVBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQkJcEJ1ZgkJCQkJCQlQb2ludGVyIHRvIHRoZSB3aGVyZSB0aGUga2V5IHN0b3JlZAotCi0JUmV0dXJuIFZhbHVlOgotCQlORElTX1NVQ0NFU1MJCQkJCUFkZCBrZXkgc3VjY2Vzc2Z1bGx5Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi1WT0lEICAgIFJUTVBTZXREZXNpcmVkUmF0ZXMoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgTE9ORyAgICAgICAgICAgIFJhdGVzKQotewotICAgIE5ESVNfODAyXzExX1JBVEVTIGFyeVJhdGVzOwotCi0gICAgbWVtc2V0KCZhcnlSYXRlcywgMHgwMCwgc2l6ZW9mKE5ESVNfODAyXzExX1JBVEVTKSk7Ci0gICAgc3dpdGNoIChwQWRhcHRlci0+Q29tbW9uQ2ZnLlBoeU1vZGUpCi0gICAgewotICAgICAgICBjYXNlIFBIWV8xMUE6IC8vIEEgb25seQotICAgICAgICAgICAgc3dpdGNoIChSYXRlcykKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBjYXNlIDYwMDAwMDA6IC8vNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBjOyAvLyA2TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgOTAwMDAwMDogLy85TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTI7IC8vIDlNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMjAwMDAwMDogLy8xMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18yOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDE4MDAwMDAwOiAvLzE4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MjQ7IC8vIDE4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzM7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjQwMDAwMDA6IC8vMjRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHgzMDsgLy8gMjRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAzNjAwMDAwMDogLy8zNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDQ4OyAvLyAzNk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU181OwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDQ4MDAwMDAwOiAvLzQ4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4NjA7IC8vIDQ4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzY7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgNTQwMDAwMDA6IC8vNTRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHg2YzsgLy8gNTRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAtMTogLy9BdXRvCi0gICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDZjOyAvLyA1NE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMV0gPSAweDYwOyAvLyA0OE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMl0gPSAweDQ4OyAvLyAzNk1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbM10gPSAweDMwOyAvLyAyNE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNF0gPSAweDI0OyAvLyAxOE0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNV0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNl0gPSAweDEyOyAvLyA5TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1s3XSA9IDB4MGM7IC8vIDZNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfQVVUTzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBQSFlfMTFCR19NSVhFRDogLy8gQi9HIE1peGVkCi0gICAgICAgIGNhc2UgUEhZXzExQjogLy8gQiBvbmx5Ci0gICAgICAgIGNhc2UgUEhZXzExQUJHX01JWEVEOiAvLyBBL0IvRyBNaXhlZAotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgc3dpdGNoIChSYXRlcykKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBjYXNlIDEwMDAwMDA6IC8vMU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDAyOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjAwMDAwMDogLy8yTQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MDQ7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSA1MDAwMDAwOiAvLzUuNU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBiOyAvLyA1LjVNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMTAwMDAwMDogLy8xMU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE2OyAvLyAxMU0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18zOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDYwMDAwMDA6IC8vNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBjOyAvLyA2TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgOTAwMDAwMDogLy85TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTI7IC8vIDlNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMjAwMDAwMDogLy8xMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18yOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDE4MDAwMDAwOiAvLzE4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MjQ7IC8vIDE4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzM7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjQwMDAwMDA6IC8vMjRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHgzMDsgLy8gMjRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAzNjAwMDAwMDogLy8zNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDQ4OyAvLyAzNk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU181OwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDQ4MDAwMDAwOiAvLzQ4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4NjA7IC8vIDQ4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzY7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgNTQwMDAwMDA6IC8vNTRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHg2YzsgLy8gNTRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAtMTogLy9BdXRvCi0gICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZSA9PSBQSFlfMTFCKQotICAgICAgICAgICAgICAgICAgICB7IC8vQiBPbmx5Ci0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTY7IC8vIDExTWJwcwotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMV0gPSAweDBiOyAvLyA1LjVNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1syXSA9IDB4MDQ7IC8vIDJNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1szXSA9IDB4MDI7IC8vIDFNYnBzCi0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICB7IC8vKEIvRykgTWl4ZWQgb3IgKEEvQi9HKSBNaXhlZAotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDZjOyAvLyA1NE1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzFdID0gMHg2MDsgLy8gNDhNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1syXSA9IDB4NDg7IC8vIDM2TWJwcwotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbM10gPSAweDMwOyAvLyAyNE1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzRdID0gMHgxNjsgLy8gMTFNYnBzCi0gICAgICAgIC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2lwaGVyTmFtZVtDaXBoZXJBbGddKSk7Ci0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsKCIJV0NJREF0dHJpID0gMHgleCBcbiIsICBXQ0lEQXR0cmkpKTsKLQotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFBhcnNlIGVuY3J5cHRpb24gdHlwZQotQXJndW1lbnRzOgotICAgIHBBZGFwdGVyICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgd3JxICAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIGlvY3RsIGFyZ3VtZW50Ci0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIE5vbmUKLQotICAgIE5vdGU6Ci0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1DSEFSICpHZXRFbmNyeXB0VHlwZShDSEFSIGVuYykKLXsKLSAgICBpZihlbmMgPT0gTmRpczgwMl8xMVdFUERpc2FibGVkKQotICAgICAgICByZXR1cm4gIk5PTkUiOwotICAgIGlmKGVuYyA9PSBOZGlzODAyXzExV0VQRW5hYmxlZCkKLSAgICAJcmV0dXJuICJXRVAiOwotICAgIGlmKGVuYyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkKQotICAgIAlyZXR1cm4gIlRLSVAiOwotICAgIGlmKGVuYyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkKQotICAgIAlyZXR1cm4gIkFFUyI7Ci0JaWYoZW5jID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uNEVuYWJsZWQpCi0gICAgCXJldHVybiAiVEtJUEFFUyI7Ci0gICAgZWxzZQotICAgIAlyZXR1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gICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0Jc2FuaXR5LmMK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ICAgICAgICAqcFNzaWRMZW4gPSBwRWlkLT5MZW47Ci0gICAgICAgICAgICAgICAgICAgIFNhbml0eSB8PSAweDE7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eSAtIHdyb25nIElFX1NTSUQgKGxlbj0lZClcbiIscEVpZC0+TGVuKSk7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgSUVfU1VQUF9SQVRFUzoKLSAgICAgICAgICAgICAgICBpZihwRWlkLT5MZW4gPD0gTUFYX0xFTl9PRl9TVVBQT1JURURfUkFURVMpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBTYW5pdHkgfD0gMHgyOwotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShTdXBSYXRlLCBwRWlkLT5PY3RldCwgcEVpZC0+TGVuKTsKLSAgICAgICAgICAgICAgICAgICAgKnBTdXBSYXRlTGVuID0gcEVpZC0+TGVuOwotCi0gICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IDIwMDQtMDktMTQgbm90IGEgZ29vZCBkZXNpZ24gaGVyZSwgY2F1c2UgaXQgZXhjbHVkZSBleHRyYSByYXRlcwotICAgICAgICAgICAgICAgICAgICAvLyBmcm9tIFNjYW5UYWIuIFdlIHNob3VsZCByZXBvcnQgYXMgaXMuIEFuZCBmaWx0ZXIgb3V0IHVuc3VwcG9ydGVkCi0gICAgICAgICAgICAgICAgICAgIC8vIHJhdGVzIGluIE1sbWVBdXguCi0gICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGFnYWluc3QgdGhlIHN1cHBvcnRlZ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ci0JCQl9Ci0KLQkJYnJlYWs7Ci0gICAgICAgICAgICBjYXNlIElFX0ZIX1BBUk06Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUGVlckJlYWNvbkFuZFByb2JlUnNwU2FuaXR5KElFX0ZIX1BBUk0pIFxuIikpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX0RTX1BBUk06Ci0gICAgICAgICAgICAgICAgaWYocEVpZC0+TGVuID09IDEpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAqcENoYW5uZWwgPSAqcEVpZC0+T2N0ZXQ7Ci0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0JCQkJCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JCQkJCXsKLQkJCQkJCWlmIChDaGFubmVsU2FuaXR5KHBBZCwgKnBDaGFubmVsKSA9PSAwKQotCQkJCQkJewotCi0JCQkJCQkJcmV0dXJuIEZBTFNFOwotCQkJCQkJfQotCQkJCQl9Ci0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0gICAgICAgICAgICAgICAgICAgIFNhbml0eSB8PSAweDQ7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eSAtIHdyb25nIElFX0RTX1BBUk0gKGxlbj0lZClcbiIscEVpZC0+TGVuKSk7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgSUVfQ0ZfUEFSTToKLSAgICAgICAgICAgICAgICBpZihwRWlkLT5MZW4gPT0gNikKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBDZlBhcm0tPmJWYWxpZCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIHBDZlBhcm0tPkNmcENvdW50ID0gcEVpZC0+T2N0ZXRbMF07Ci0gICAgICAgICAgICAgICAgICAgIHBDZlBhcm0tPkNmcFBlcmlvZCA9IHBFaWQtPk9jdGV0WzFdOwotICAgICAgICAgICAgICAgICAgICBwQ2ZQYXJtLT5DZnBNYXhEdXJhdGlvbiA9IHBFaWQtPk9jdGV0WzJdICsgMjU2ICogcEVpZC0+T2N0ZXRbM107Ci0gICAgICAgICAgICAgICAgICAgIHBDZlBhcm0tPkNmcER1clJlbWFpbmluZyA9IHBFaWQtPk9jdGV0WzRdICsgMjU2ICogcEVpZC0+T2N0ZXRbNV07Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eSAtIHdyb25nIElFX0NGX1BBUk1cbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9JQlNTX1BBUk06Ci0gICAgICAgICAgICAgICAgaWYocEVpZC0+TGVuID09IDIpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwQXRpbVdpbiwgcEVpZC0+T2N0ZXQsIHBFaWQtPkxlbik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eSAtIHdyb25nIElFX0lCU1NfUEFSTVxuIikpOwotICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0gICAgICAgICAgICBjYXNlIElFX1RJTToKLSAgICAgICAgICAgICAgICBpZihJTkZSQV9PTihwQWQpICYmIFN1YlR5cGUgPT0gU1VCVFlQRV9CRUFDT04pCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBHZXRUaW1CaXQoKFBVQ0hBUilwRWlkLCBwQWQtPlN0YUFjdGl2ZS5BaWQsICZUaW1MZW4sIHBCY2FzdEZsYWcsIHBEdGltQ291bnQsIHBEdGltUGVyaW9kLCBwTWVzc2FnZVRvTWUpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBicmVhazsKLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KLSAgICAgICAgICAgIGNhc2UgSUVfQ0hBTk5FTF9TV0lUQ0hfQU5OT1VOQ0VNRU5UOgotICAgICAgICAgICAgICAgIGlmKHBFaWQtPkxlbiA9PSAzKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAJKnBOZXdDaGFubmVsID0gcEVpZC0+T2N0ZXRbMV07CS8vZXh0cmFjdCBuZXcgY2hhbm5lbCBudW1iZXIKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIC8vIE5ldyBmb3IgV1BBCi0gICAgICAgICAgICAvLyBDQ1ggdjIgaGFzIHRoZSBzYW1lIElFLCB3ZSBuZWVkIHRvIHBhcnNlIHRoYXQgdG9vCi0gICAgICAgICAgICAvLyBXaWZpIFdNTSB1c2UgdGhlIHNhbWUgSUUgdmFsZSwgbmVlZCB0byB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NpemVvZihBRERfSFRfSU5GT19JRSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgKkFkZEh0SW5mb0xlbiA9IFNJWkVfQUREX0hUX0lORk9fSUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0jZW5kaWYgLy8gRE9UMTFfTl9TVVBQT1JUIC8vCi0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0gICAgICAgICAgICAgICAgZWxzZSBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBXUEFfT1VJLCA0KSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIENvcHkgdG8gcFZJRSB3aGljaCB3aWxsIHJlcG9ydCB0byBtaWNyb3NvZnQgYnNzaWQgbGlzdC4KLSAgICAgICAgICAgICAgICAgICAgUHRyID0gKFBVQ0hBUikgcFZJRTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoUHRyICsgKkxlbmd0aFZJRSwgJnBFaWQtPkVpZCwgcEVpZC0+TGVuICsgMik7Ci0gICAgICAgICAgICAgICAgICAgICpMZW5ndGhWSUUgKz0gKHBFaWQtPkxlbiArIDIpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIGlmIChOZGlzRXF1YWxNZW1vcnkocEVpZC0+T2N0ZXQsIFdNRV9QQVJNX0VMRU0sIDYpICYmIChwRWlkLT5MZW4gPT0gMjQpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgUFVDSEFSIHB0cjsKLSAgICAgICAgICAgICAgICAgICAgaW50IGk7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gcGFyc2luZyBFRENBIHBhcmFtZXRlcnMKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iVmFsaWQgICAgICAgICAgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJRQWNrICAgICAgICAgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4MTA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlF1ZXVlUmVxdWVzdCAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHgyMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iVHhvcFJlcXVlc3QgICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDQwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkVkY2FVcGRhdGVDb3VudCA9IHBFaWQtPk9jdGV0WzZdICYgMHgwZjsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQVBTRENhcGFibGUgICAgPSAocEVpZC0+T2N0ZXRbNl0gJiAweDgwKSA/IDEgOiAwOwotICAgICAgICAgICAgICAgICAgICBwdHIgPSAmcEVpZC0+T2N0ZXRbOF07Ci0gICAgICAgICAgICAgICAgICAgIGZvciAoaT0wOyBpPDQ7IGkrKykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgVUNIQVIgYWNpID0gKCpwdHIgJiAweDYwKSA+PiA1OyAvLyBiNX42IGlzIEFDIElOREVYCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBQ01bYWNpXSAgPSAoKCgqcHRyKSAmIDB4MTApID09IDB4MTApOyAgIC8vIGI1IGlzIEFDTQotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5BaWZzblthY2ldID0gKCpwdHIpICYgMHgwZjsgICAgICAgICAgICAgICAvLyBiMH4zIGlzIEFJRlNOCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWluW2FjaV0gPSAqKHB0cisxKSAmIDB4MGY7ICAgICAgICAgICAgIC8vIGIwfjQgaXMgQ3dtaW4KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtYXhbYWNpXSA9ICoocHRyKzEpID4+IDQ7ICAgICAgICAgICAgICAgLy8gYjV+OCBpcyBDd21heAotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5UeG9wW2FjaV0gID0gKihwdHIrMikgKyAyNTYgKiAoKihwdHIrMykpOyAvLyBpbiB1bml0IG9mIDMyLXVzCi0gICAgICAgICAgICAgICAgICAgICAgICBwdHIgKz0gNDsgLy8gcG9pbnQgdG8gbmV4dCBBQwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgV01FX0lORk9fRUxFTSwgNikgJiYgKHBFaWQtPkxlbiA9PSA3KSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIHBhcnNpbmcgRURDQSBwYXJhbWV0ZXJzCi0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlZhbGlkICAgICAgICAgID0gVFJVRTsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iUUFjayAgICAgICAgICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDEwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJRdWV1ZVJlcXVlc3QgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4MjA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlR4b3BSZXF1ZXN0ICAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHg0MDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5FZGNhVXBkYXRlQ291bnQgPSBwRWlkLT5PY3RldFs2XSAmIDB4MGY7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YkFQU0RDYXBhYmxlICAgID0gKHBFaWQtPk9jdGV0WzZdICYgMHg4MCkgPyAxIDogMDsKLQotICAgICAgICAgICAgICAgICAgICAvLyB1c2UgZGVmYXVsdCBFRENBIHBhcmFtZXRlcgotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBQ01bUUlEX0FDX0JFXSAgPSAwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkFpZnNuW1FJRF9BQ19CRV0gPSAzOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWluW1FJRF9BQ19CRV0gPSBDV19NSU5fSU5fQklUUzsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21heFtRSURfQUNfQkVdID0gQ1dfTUFYX0lOX0JJVFM7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+VHhvcFtRSURfQUNfQkVdICA9IDA7Ci0KLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQUNNW1FJRF9BQ19CS10gID0gMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5BaWZzbltRSURfQUNfQktdID0gNzsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21pbltRSURfQUNfQktdID0gQ1dfTUlOX0lOX0JJVFM7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtYXhbUUlEX0FDX0JLXSA9IENXX01BWF9JTl9CSVRTOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPlR4b3BbUUlEX0FDX0JLXSAgPSAwOwotCi0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YkFDTVtRSURfQUNfVkldICA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+QWlmc25bUUlEX0FDX1ZJXSA9IDI7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtaW5bUUlEX0FDX1ZJXSA9IENXX01JTl9JTl9CSVRTLTE7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtYXhbUUlEX0FDX1ZJXSA9IENXX01BWF9JTl9CSVRTOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPlR4b3BbUUlEX0FDX1ZJXSAgPSA5NjsgICAvLyBBQ19WSTogOTYqMzJ1cyB+PSAzbXMKLQotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBQ01bUUlEX0FDX1ZPXSAgPSAwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkFpZnNuW1FJRF9BQ19WT10gPSAyOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWluW1FJRF9BQ19WT10gPSBDV19NSU5fSU5fQklUUy0yOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWF4W1FJRF9BQ19WT10gPSBDV19NQVhfSU5fQklUUy0xOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPlR4b3BbUUlEX0FDX1ZPXSAgPSA0ODsgICAvLyBBQ19WTzogNDgqMzJ1cyB+PSAxLjVtcwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9FWFRfU1VQUF9SQVRFUzoKLSAgICAgICAgICAgICAgICBpZiAocEVpZC0+TGVuIDw9IE1BWF9MRU5fT0ZfU1VQUE9SVEVEX1JBVEVTKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoRXh0UmF0ZSwgcEVpZC0+T2N0ZXQsIHBFaWQtPkxlbik7Ci0gICAgICAgICAgICAgICAgICAgICpwRXh0UmF0ZUxlbiA9IHBFaWQtPkxlbjsKLQotICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiAyMDA0LTA5LTE0IG5vdCBhIGdvb2QgZGVzaWduIGhlcmUsIGNhdXNlIGl0IGV4Y2x1ZGUgZXh0cmEgcmF0ZXMKLSAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSBTY2FuVGFiLiBXZSBzaG91bGQgcmVwb3J0IGFzIGlzLiBBbmQgZmlsdGVyIG91dCB1bnN1cHBvcnRlZAotICAgICAgICAgICAgICAgICAgICAvLyByYXRlcyBpbiBNbG1lQXV4LgotICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBhZ2FpbnN0IHRoZSBzdXBwb3J0ZWQgcmF0ZXMKLSAgICAgICAgICAgICAgICAgICAgLy8gUlRNUENoZWNrUmF0ZXMocEFkLCBFeHRSYXRlLCBwRXh0UmF0ZUxlbik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX0VSUDoKLSAgICAgICAgICAgICAgICBpZiAocEVpZC0+TGVuID09IDEpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAqcEVycCA9IChVQ0hBUilwRWlkLT5PY3RldFswXTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgSUVfQUlST05FVF9DS0lQOgotICAgICAgICAgICAgICAgIC8vIDAuIENoZWNrIEFpcm9uZXQgSUUgbGVuZ3RoLCBpdCBtdXN0IGJlIGxhcmdlciBvciBlcXVhbCB0byAyOAotICAgICAgICAgICAgICAgIC8vIENpc2NvIEFQMzUwIHVzZWQgbGVuZ3RoIGFzIDI4Ci0gICAgICAgICAgICAgICAgLy8gQ2lzY28gQVAxMlhYIHVzZWQgbGVuZ3RoIGFzIDMwCi0gICAgICAgICAgICAgICAgaWYgKHBFaWQtPkxlbiA8IChDS0lQX05FR09USUFUSU9OX0xFTkdUSCAtIDIpKQotICAgICAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgICAgIC8vIDEuIENvcHkgQ0tJUCBmbGFnIGJ5dGUgdG8gYnVmZmVyIGZvciBwcm9jZXNzCi0gICAgICAgICAgICAgICAgKnBDa2lwRmxhZyA9ICoocEVpZC0+T2N0ZXQgKyA4KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9BUF9UWF9QT1dFUjoKLSAgICAgICAgICAgICAgICAvLyBBUCBDb250cm9sIG9mIENsaWVudCBUcmFuc21pdCBQb3dlcgotICAgICAgICAgICAgICAgIC8vMC4gQ2hlY2sgQWlyb25ldCBJRSBsZW5ndGgsIGl0IG11c3QgYmUgNgotICAgICAgICAgICAgICAgIGlmIChwRWlkLT5MZW4gIT0gMHgwNikKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgICAgICAvLyBHZXQgY2VsbCBwb3dlciBsaW1pdCBpbiBkQm0KLSAgICAgICAgICAgICAgICBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBDSVNDT19PVUksIDMpID09IDEpCi0gICAgICAgICAgICAgICAgICAgICpwQWlyb25ldENlbGxQb3dlckxpbWl0ID0gKihwRWlkLT5PY3RldCArIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAvLyBXUEEyICYgODAyLjExaSBSU04KLSAgICAgICAgICAgIGNhc2UgSUVfUlNOOgotICAgICAgICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIE9VSSBmb3IgdmVyc2lvbiBhbnltb3JlLCBjaGVjayB0aGUgZ3JvdXAgY2lwaGVyIE9VSSBiZWZvcmUgY29weWluZwotICAgICAgICAgICAgICAgIGlmIChSVE1QRXF1YWxNZW1vcnkocEVpZC0+T2N0ZXQgKyAyLCBSU05fT1VJLCAzKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIENvcHkgdG8gcFZJRSB3aGljaCB3aWxsIHJlcG9ydCB0byBtaWNyb3NvZnQgYnNzaWQgbGlzdC4KLSAgICAgICAgICAgICAgICAgICAgUH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0hBUiBDaGFubmVsU2FuaXR5KAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIFVDSEFSIGNoYW5uZWwpCi17Ci0gICAgaW50IGk7Ci0KLSAgICBmb3IgKGkgPSAwOyBpIDwgcEFkLT5DaGFubmVsTGlzdE51bTsgaSArKykKLSAgICB7Ci0gICAgICAgIGlmIChjaGFubmVsID09IHBBZC0+Q2hhbm5lbExpc3RbaV0uQ2hhbm5lbCkKLSAgICAgICAgICAgIHJldHVybiAxOwotICAgIH0KLSAgICByZXR1cm4gMDsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBNTE1FIG1lc3NhZ2Ugc2FuaXR5IGNoZWNrCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gUGVlckRlYXV0aFNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFkZHIyLAotICAgIE9VVCBVU0hPUlQgKnBSZWFzb24pCi17Ci0gICAgUEZSQU1FXzgwMl8xMSBwRnJhbWUgPSAoUEZSQU1FXzgwMl8xMSlNc2c7Ci0KLSAgICBDT1BZX01BQ19BRERSKHBBZGRyMiwgcEZyYW1lLT5IZHIuQWRkcjIpOwotICAgIE5kaXNNb3ZlTWVtb3J5KHBSZWFzb24sICZwRnJhbWUtPk9jdGV0WzBdLCAyKTsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBQZWVyQXV0aFNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFkZHIsCi0gICAgT1VUIFVTSE9SVCAqcEFsZywKLSAgICBPVVQgVVNIT1JUICpwU2VxLAotICAgIE9VVCBVU0hPUlQgKnBTdGF0dXMsCi0gICAgQ0hBUiAqcENobGdUZXh0KQotewotICAgIFBGUkFNRV84MDJfMTEgcEZyYW1lID0gKFBGUkFNRV84MDJfMTEpTXNnOwotCi0gICAgQ09QWV9NQUNfQUREUihwQWRkciwgICBwRnJhbWUtPkhkci5BZGRyMik7Ci0gICAgTmRpc01vdmVNZW1vcnkocEFsZywgICAgJnBGcmFtZS0+T2N0ZXRbMF0sIDIpOwotICAgIE5kaXNNb3ZlTWVtb3J5KHBTZXEsICAgICZwRnJhbWUtPk9jdGV0WzJdLCAyKTsKLSAgICBOZGlzTW92ZU1lbW9yeShwU3RhdHVzLCAmcEZyYW1lLT5PY3RldFs0XSwgMik7Ci0KLSAgICBpZiAoKCpwQWxnID09IE5kaXM4MDJfMTFBdXRoTW9kZU9wZW4pCi0jaWZkZWYgTEVBUF9TVVBQT1JUCi0gICAgICB8fCAoKnBBbGcgPT0gQ0lTQ09fQXV0aE1vZGVMRUFQKQotI2VuZGlmIC8vIExFQVBfU1VQUE9SVCAvLwotICAgICAgKQotICAgIHsKLSAgICAgICAgaWYgKCpwU2VxID09IDEgfHwgKnBTZXEgPT0gMikKLSAgICAgICAgewotICAgICAgICAgICAgcmV0dXJuIFRSVUU7Ci0gICAgICAgIH0KLSAgICAgICAgZWxzZQotICAgICAgICB7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQXV0aFNhbml0eSBmYWlsIC0gd3JvbmcgU2VnI1xuIikpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgICAgICB9Ci0gICAgfQotICAgIGVsc2UgaWYgKCpwQWxnID09IE5kaXM4MDJfMTFBdXRoTW9kZVNoYXJlZCkKLSAgICB7Ci0gICAgICAgIGlmICgqcFNlcSA9PSAxIHx8ICpwU2VxID09IDQpCi0gICAgICAgIHsKLSAgICAgICAgICAgIHJldHVybiBUUlVFOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgaWYgKCpwU2VxID09IDIgfHwgKnBTZXEgPT0gMykKLSAgICAgICAgewotICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocENobGdUZXh0LCAmcEZyYW1lLT5PY3RldFs4XSwgQ0lQSEVSX1RFWFRfTEVOKTsKLSAgICAgICAgICAgIHJldHVybiBUUlVFOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UKLSAgICAgICAgewotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUGVlckF1dGhTYW5pdHkgZmFpbCAtIHdyb25nIFNlZyNcbiIpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQXV0aFNhbml0eSBmYWlsIC0gd3JvbmcgYWxnb3JpdGhtXG4iKSk7Ci0gICAgICAgIHJldHVybiBGQUxTRTsKLSAgICB9Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gTWxtZUF1dGhSZXFTYW5pdHkoCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gVk9JRCAqTXNnLAotICAgIElOIFVMT05HIE1zZ0xlbiwKLSAgICBPVVQgUFVDSEFSIHBBZGRyLAotICAgIE9VVCBVTE9ORyAqcFRpbWVvdXQsCi0gICAgT1VUIFVTSE9SVCAqcEFsZykKLXsKLSAgICBNTE1FX0FVVEhfUkVRX1NUUlVDVCAqcEluZm87Ci0KLSAgICBwSW5mbyAgPSAoTUxNRV9BVVRIX1JFUV9TVFJVQ1QgKilNc2c7Ci0gICAgQ09QWV9NQUNfQUREUihwQWRkciwgcEluZm8tPkFkZHIpOwotICAgICpwVGltZW91dCA9IHBJbmZvLT5UaW1lb3V0OwotICAgICpwQWxnID0gcEluZm8tPkFsZzsKLQotICAgIGlmICgoKCpwQWxnID09IE5kaXM4MDJfMTFBdXRoTW9kZVNoYXJlZCkgfHwoKnBBbGcgPT0gTmRpczgwMl8xMUF1dGhNb2RlT3BlbikKLSNpZmRlZiBMRUFQX1NVUFBPUlQKLSAgICAgfHwgKCpwQWxnID09IENJU0NPX0F1dGhNb2RlTEVBUCkKLSNlbmRpZiAvLyBMRUFQX1NVUFBPUlQgLy8KLSAgICAgCSkgJiYKLSAgICAgICAgKCgqcEFkZHIgJiAweDAxKSA9PSAwKSkKLSAgICB7Ci0gICAgICAgIHJldHVybiBUUlVFOwotICAgIH0KLSAgICBlbHNlCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJNbG1lQXV0aFJlcVNhbml0eSBmYWlsIC0gd3JvbmcgYWxnb3JpdGhtXG4iKSk7Ci0gICAgICAgIHJldHVybiBGQUxTRTsKLSAgICB9Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIE1sbWVBc3NvY1JlcVNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFwQWRkciwKLSAgICBPVVQgVVNIT1JUICpwQ2FwYWJpbGl0eUluZm8sCi0gICAgT1VUIFVMT05HICpwVGltZW91dCwKLSAgICBPVVQgVVNIT1JUICpwTGlzdGVuSW50dikKLXsKLSAgICBNTE1FX0FTU09DX1JFUV9TVFJVQ1QgKnBJbmZvOwotCi0gICAgcEluZm8gPSAoTUxNRV9BU1NPQ19SRVFfU1RSVUNUICopTXNnOwotICAgICpwVGltZW91dCA9IHBJbmZvLT5UaW1lb3V0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGltZW91dAotICAgIENPUFlfTUFDX0FERFIocEFwQWRkciwgcEluZm8tPkFkZHIpOyAgICAgICAgICAgICAgICAgICAvLyBBUCBhZGRyZXNzCi0gICAgKnBDYXBhYmlsaXR5SW5mbyA9IHBJbmZvLT5DYXBhYmlsaXR5SW5mbzsgICAgICAgICAgICAgICAvLyBjYXBhYmlsaXR5IGluZm8KLSAgICAqcExpc3RlbkludHYgPSBwSW5mby0+TGlzdGVuSW50djsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBQZWVyRGlzYXNzb2NTYW5pdHkoCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gVk9JRCAqTXNnLAotICAgIElOIFVMT05HIE1zZ0xlbiwKLSAgICBPVVQgUFVDSEFSIHBBZGRyMiwKLSAgICBPVVQgVVNIT1JUICpwUmVhc29uKQotewotICAgIFBGUkFNRV84MDJfMTEgcEZyYW1lID0gKFBGUkFNRV84MDJfMTEpTXNnOwotCi0gICAgQ09QWV9NQUNfQUREUihwQWRkcjIsIHBGcmFtZS0+SGRyLkFkZ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i0gICAgaWYgKHBCc3MtPkh0Q2FwYWJpbGl0eUxlbiAhPSAwKQotICAgIHsKLSAgICAgICAgaWYgKE5ldFdvcmtUeXBlID09IE5kaXM4MDJfMTFPRkRNNSkKLSAgICAgICAgICAgIE5ldFdvcmtUeXBlID0gTmRpczgwMl8xMU9GRE01X047Ci0gICAgICAgIGVsc2UKLSAgICAgICAgICAgIE5ldFdvcmtUeXBlID0gTmRpczgwMl8xMU9GRE0yNF9OOwotICAgIH0KLQotCXJldHVybiBOZXRXb3JrVHlwZTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBXUEEgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIFBlZXJXcGFNZXNzYWdlU2FuaXR5KAotICAgIElOIAlQUlRNUF9BREFQVEVSIAkJcEFkLAotICAgIElOIAlQRUFQT0xfUEFDS0VUIAkJcE1zZywKLSAgICBJTiAJVUxPTkcgCQkJCU1zZ0xlbiwKLSAgICBJTiAJVUNIQVIJCQkJTXNnVHlwZSwKLSAgICBJTiAJTUFDX1RBQkxFX0VOVFJZICAJKnBFbnRyeSkKLXsKLQlVQ0hBUgkJCW1pY1tMRU5fS0VZX0RFU0NfTUlDXSwgZGlnZXN0WzgwXSwgS0VZREFUQVtNQVhfTEVOX09GX1JTTklFXTsKLQlCT09MRUFOCQkJYlJlcGxheURpZmYgPSBGQUxTRTsKLQlCT09MRUFOCQkJYldQQTIgPSBGQUxTRTsKLQlLRVlfSU5GTw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G9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlzeW5jLmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huIENoYW5nCTIwMDQtMDktMDEgICAg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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVRoaXMgcm91dGluZSByZXR1cm4gdGhlIGZpcnN0IGNoYW5uZWwgbnVtYmVyIGFjY29yZGluZyB0byB0aGUgY291bnRyeQotCQljb2RlIHNlbGVjdGlvbiBhbmQgUkYgSUMgc2VsZWN0aW9uIChzaWduYWwgYmFuZCBvciBkdWFsIGJhbmQpLiBJdCBpcyBjYWxsZWQKLQkJd2hlbmV2ZXIgZHJpdmVyIG5lZWQgdG8gc3RhcnQgYSBzaXRlIHN1cnZleSBvZiBhbGwgc3VwcG9ydGVkIGNoYW5uZWxzLgotCVJldHVybjoKLQkJY2ggLSB0aGUgZmlyc3QgY2hhbm5lbCBudW1iZXIgb2YgY3VycmVudCBjb3VudHJ5IGNvZGUgc2V0dGluZwotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVVDSEFSIEZpcnN0Q2hhbm5lbCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlyZXR1cm4gcEFkLT5DaGFubmVsTGlzdFswXS5DaGFubmVsOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVRoaXMgcm91dGluZSByZXR1cm5zIHRoZSBuZXh0IGNoYW5uZWwgbnVtYmVyLiBUaGlzIHJvdXRpbmUgaXMgY2FsbGVkCi0JCWR1cmluZyBkcml2ZXIgbmVlZCB0byBzdGFydCBhIHNpdGUgc3VydmV5IG9mIGFsbCBzdXBwb3J0ZWQgY2hhbm5lbHMuCi0JUmV0dXJuOgotCQluZXh0X2NoYW5uZWw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gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQl3cGEuYwotCi0JQWJzdHJhY3Q6Ci0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobwkJCVdoZW4JCQlXaGF0Ci0JLS0tLS0tLS0JLS0tLS0tLS0tLQkJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCUphbglMZWUJCTAzLTA3LTIyCQlJbml0aWFsCi0JUGF1bCBMaW4JMDMtMTEtMjgJCU1vZGlmeSBmb3Igc3VwcGxpY2FudAotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLS8vIFdQQSBPVUkKLVVDSEFSCQlPVUlfV1BBX05PTkVfQUtNWzRdCQk9IHsweDAwLCAwe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AgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEExV1BBMjoKLSAgICAgICAgICAgICAgICBwUnNuaWVfYXV0aC0+YWNvdW50ID0gMTsKLSAgICAgICAgICAgICAgICAJTmRpc01vdmVNZW1vcnkocFJzbmllX2F1dGgtPmF1dGhbMF0ub3VpLCBPVUlfV1BBMl84MDIxWF9BS00sIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0s6Ci0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTFQU0tXUEEyUFNLOgotICAgICAgICAgICAgICAgIHBSc25pZV9hdXRoLT5hY291bnQgPSAxOwotICAgICAgICAgICAgICAgIAlOZGlzTW92ZU1lbW9yeShwUnNuaWVfYXV0aC0+YXV0aFswXS5vdWksIE9VSV9XUEEyX1BTS19BS00sIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0JfQotCWVsc2UKLQl7Ci0JCXN3aXRjaCAoQXV0aE1vZGUpCi0gICAgICAgIHsKLSAgICAgICAgICAgIGNhc2UgTmRpczgwMl8xMUF1dGhNb2RlV1BBOgotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEExV1BBMjoKLSAgICAgICAgICAgICAgICBwUnNuaWVfYXV0aC0+YWNvdW50ID0gMTsKLSAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwUnNuaWVfYXV0aC0+YXV0aFswXS5vdWksIE9VSV9XUEFfODAyMVhfQUtNLCA0KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0s6Ci0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTFQU0tXUEEyUFNLOgotICAgICAgICAgICAgICAgIHBSc25pZV9hdXRoLT5hY291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XQpOwotCX0KLQotCS8vIDQuIHVwZGF0ZSB0aGUgUlNOSUUgbGVuZ3RoCi0JKnJzbmllbGVuX2N1cl9wID0gcF9vZmZzZXQ7Ci0KLQloZXhfZHVtcCgiVGhlIHByaW1hcnkgUlNOSUUiLCBwUnNuSWUsICgqcnNuaWVsZW5fY3VyX3ApKTsKLQotCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQkJQ2hlY2sgd2hldGhlciB0aGUgcmVjZWl2ZWQgZnJhbWUgaXMgRUFQIGZyYW1lLgotCi0JQXJndW1lbnRzOgotCQlwQWQJCQkJLQlwb2ludGVyIHRvIG91ciBwQWRhcHRlciBjb250ZXh0Ci0JCXBFbnRyeQkJCS0JcG9pbnRlciB0byBhY3RpdmUgZW50cnkKLQkJcERhdGEJCQktCXRoZSByZWNlaXZlZCBmcmFtZQotCQlEYXRhQnl0ZUNvdW50IAktCXRoZSByZWNlaXZlZCBmcmFtZSdzIGxlbmd0aAotCQlGcm9tV2hpY2hCU1NJRAktCWluZGljYXRlIHRoZSBpbnRlcmZhY2UgaW5kZXgKLQotICAgIFJldHVybjoKLSAgICAgICAgIFRSVUUgCQkJLQlUaGlzIGZyYW1lIGlzIEVBUCBmcmFtZQotICAgICAgICAgRkFMU0UgCQkJLQlvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUJPT0xFQU4gUlRNUENoZWNrV1BBZnJhbWUoCi0gICAgSU4gUFJUTVBfQURBUFRFUiAgICBwQWQsCi0gICAgSU4gUE1BQ19UQUJMRV9FTlRSWQlwRW50cnksCi0gICAgSU4gUFVDSEFSICAgICAgICAgICBwRGF0YSwKLSAgICBJTiBVTE9ORyAgICAgICAgICAgIERh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FTRkFsZXJ0IGZyYW1lLCBUWVBFID0gNCBcbiIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotCi0gICAgfQotICAgIHJldHVybiBUUlVFOwotfQotCi0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgRU5DUllQVCBBRVMgR1RLIGJlZm9yZSBzZW5kaW5nIGluIEVBUE9MIGZyYW1lLgotICAgICAgICBBRVMgR1RLIGxlbmd0aCA9IDEyOCBiaXQsICBzbyBmaXggYmxvY2tzIGZvciBhZXMta2V5LXdyYXAgYXMgMiBpbiB0aGlzIGZ1bmN0aW9uLgotICAgICAgICBUaGlzIGZ1bmN0aW9uIHJlZmVyZW5jZXMgdG8gUkZDIDMzOTQgZm9yIGFlcyBrZXkgd3JhcCBhbGdvcml0aG0uCi0gICAgUmV0dXJuOgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBBRVNfR1RLX0tFWV9XUkFQKAotICAgIElOIFVDSEFSICAgICprZXksCi0gICAgSU4gVUNIQVIgICAgKnBsYWludGV4dCwKLSAgICBJTiBVQ0hBUiAgICBwX2xlbiwKLSAgICBPVVQgVUNIQVIgICAqY2lwaGVydGV4dCkKLXsKLSAgICBVQ0hBUiAgICAgICBBWzhdLCBCSU5bMTZdLCBCT1VUWzE2XTsKLSAgICBVQ0hBUiAgICAgICBSWzUxMl07Ci0gICAgSU5UICAgICAgICAgbnVtX2Jsb2NrcyA9IHBfbGVuLzg7ICAgLy8gdW5pdDo2NGJpdHMKLSAgICBJTlQgICAgICAgICBpLCBqOwotICAgIGFlc19jb250ZXh0IGFlc2N0eDsKLSAgICBVQ0hBUiAgICAgICB4b3I7Ci0KLSAgICBydG1wX2Flc19zZXRfa2V5KCZhZXNjdHgsIGtleSwgMTI4KTsKLQotICAgIC8vIEluaXQgSUEKLSAgICBmb3IgKGkgPSAwOyBpIDwgODsgaSsrKQotICAgICAgICBBW2ldID0gMHhhNjsKLQotICAgIC8vSW5wdXQgcGxhaW50ZXh0Ci0gICAgZm9yIChpID0gMDsgaSA8IG51bV9ibG9ja3M7IGkrKykKLSAgICB7Ci0gICAgICAgIGZvciAoaiA9IDAgOyBqIDwgODsgaisrKQotICAgICAgICAgICAgUls4ICogKGkgKyAxKSArIGpdID0gcGxhaW50ZXh0WzggKiBpICsgal07Ci0gICAgfQotCi0gICAgLy8gS2V5IE1peAotICAgIGZvciAoaiA9IDA7IGogPCA2OyBqKyspCi0gICAgewotICAgICAgICBmb3IoaSA9IDE7IGkgPD0gbnVtX2Jsb2NrczsgaSsrKQotICAgICAgICB7Ci0gICAgICAgICAgICAvL3BoYXNlIDEKLSAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KEJJTiwgQSwgOCk7Ci0gICAgICAgICAgICBOZGlzTW92ZU1lbW9yeSgmQklOWzhdLCAmUls4ICogaV0sIDgpOwotICAgICAgICAgICAgcnRtcF9hZXNfZW5jcnlwdCgmYWVzY3R4LCBCSU4sIEJPVVQpOwotCi0gICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShBLCAmQk9VVFswXSwgOCk7Ci0gICAgICAgICAgICB4b3IgPSBudW1fYmxvY2tzICogaiArIGk7Ci0gICAgICAgICAgICBBWzddID0gQk9VVFs3XSBeIHhvcjsKLSAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KCZSWzggKiBpXSwgJkJPVVRbOF0sIDgpOwotICAgICAgICB9Ci0gICAgfQotCi0gICAgLy8gT3V0cHV0IGNpcGhlcnRleHQKLSAgICBOZGlzTW92ZU1lbW9yeShjaXBoZXJ0ZXh0LCBBLCA4KTsKLQotICAgIGZvciAoaSA9IDE7IGkgPD0gbnVtX2Jsb2NrczsgaSsrKQotICAgIHsKLSAgICAgICAgZm9yIChqID0gMCA7IGogPCA4OyBqKyspCi0gICAgICAgICAgICBjaXBoZXJ0ZXh0WzggKiBpICsgal0gPSBSWzggKiBpICsgal07Ci0gICAgfQotfQotCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCQlNaXNjIGZ1bmN0aW9uIHRvIGRlY3J5cHQgQUVTIGJvZHkKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCU5vdGU6Ci0JCVRoaXMgZnVuY3Rpb24gcmVmZXJlbmNlcyB0bwlSRkMJMzM5NCBmb3IgYWVzIGtleSB1bndyYXAgYWxnb3JpdGhtLgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRAlBRVNfR1RLX0tFWV9VTldSQVAoCi0JSU4JVUNIQVIJKmtleSwKLQlPVVQJVUNIQVIJKnBsYWludGV4dCwKLQlJTglVQ0hBUiAgICBjX2xlbiwKLQlJTglVQ0hBUgkqY2lwaGVydGV4dCkKLQotewotCVVDSEFSICAgICAgIEFbOF0sIEJJTlsxNl0sIEJPVVRbMTZdOwotCVVDSEFSICAgICAgIHhvcjsKLQlJTlQgICAgICAgICBpLCBqOwotCWFlc19jb250ZXh0IGFlc2N0eDsKLQlVQ0hBUiAgICAgICAqUjsKLQlJTlQgICAgICAgICBudW1fYmxvY2tzID0gY19sZW4vODsJLy8gdW5pdDo2NGJpdHMKLQotCi0Jb3NfYWxsb2NfbWVtKE5VTEwsIChQVUNIQVIgKikmUiwgNTEyKTsKLQotCWlmIChSID09IE5VTEwpCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19FUlJPUiwgK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KLQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICBDaGVjayBTYW5pdHkgUlNOIElFIG9mIEVBUG9MIG1lc3NhZ2UKLQotICAgIEFyZ3VtZW50czoKLQotICAgIFJldHVybiBWYWx1ZToKLQotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotQk9PTEVBTiBSVE1QQ2hlY2tSU05JRSgKLQlJTiAgUFJUTVBfQURBUFRFUiAgIHBBZCwKLQlJTiAgUFVDSEFSICAgICAgICAgIHBEYXRhLAotCUlOICBVQ0hBUiAgICAgICAgICAgRGF0YUxlbiwKLQlJTiAgTUFDX1RBQkxFX0VOVFJZICpwRW50cnksCi0JT1VUCVVDSEFSCQkJKk9mZnNldCkKLXsKLQlQVUNIQVIgICAgICAgICAgICAgIHBWSUU7Ci0JVUNIQVIgICAgICAgICAgICAgICBsZW47Ci0JUEVJRF9TVFJVQ1QgICAgICAgICBwRWlkOwotCUJPT0xFQU4JCQkJcmVzdWx0ID0gRkFMU0U7Ci0KLQlwVklFID0gcERhdGE7Ci0JbGVuCSA9IERhdGFMZW47Ci0JKk9mZnNldCA9IDA7Ci0KLQl3aGlsZSAobGVuID4gc2l6ZW9mKFJTTklFMikpCi0JewotCQlwRWlkID0gKFBFSURfU1RSVUNUKSBwVklFOwotCQkvLyBXUEEgUlNOIElFCi0JCWlmICgocEVpZC0+RWlkID09IElFX1dQQSkgJiYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgV1BBX09VSSwgNCkpKQotCQl7Ci0JCQlpZiAoKHBFbnRyeS0+QXV0aE1vZGUgPT0gTmRpczgwMl8xMUF1dGhNb2RlV1BBIHx8IHBFbnRyeS0+QXV0aE1vZGUgPT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ZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgYXBfZGZzLmMKLQotICAgIEFic3RyYWN0OgotICAgIFN1cHBvcnQgREZTIGZ1bmN0aW9uLgotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgV2hlbiAgICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLSAgLS0tLS0tLS0tLSAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBGb25jaGkgICAgMDMtMTItMjAwNyAgICAgIGNyZWF0ZWQKLSovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotdHlwZWRlZiBzdHJ1Y3QgX1JBREFSX0RVUkFUSU9OX1RBQkxFCi17Ci0JVUxPTkcgUkREdXJSZWdpb247Ci0JVUxPTkcgUmFkYXJTaWduYWxEdXJhdGlvbjsKLQlVTE9ORyBUb2xlcmFuY2U7Ci19IFJBREFSX0RVUkFUSU9OX1RBQkxFLCAqUFJBREFSX0RVUkFUSU9OX1RBQkxFOwotCi0KLXN0YXRpYyBVQ0hBUiBSZElkbGVUaW1lVGFibGVbTUFYX1JEX1JFR0lPTl1bNF0gPQotewotCXs5LCAyNTAsIDI1MCwgMjUwfSwJCS8vIENFCi0JezQsIDI1MCwgMjUwLCAyNTB9LAkJLy8gRkNDCi0JezQsIDI1MCwgMjUwLCAyNTB9LAkJLy8gSkFQCi0J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JhZGFyIGRldGVjdGlvbiByb3V0aW5lCi0KLQlBcmd1bWVudHM6Ci0JCXBBZCAJUG9pbnRlciB0byBvdXIgYWRhcHRlcgotCi0JUmV0dXJuIFZhbHVlOgotCQlUUlVFCUZvdW5kIHJhZGFyIHNpZ25hbAotCQlGQUxTRQlOb3QgZm91bmQgcmFkYXIgc2lnbmFsCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFJhZGFyRGV0ZWN0aW9uU3RvcCgKLQlJTiBQUlRNUF9BREFQVEVSCXBBZCkKLXsKLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwoIlJhZGFyRGV0ZWN0aW9uU3RvcC5cbiIpKTsKLQlBc2ljU2VuZENvbW1hbmRUb01jdShwQWQsIDB4NjAsIDB4ZmYsIDB4MDAsIDB4MDApOwkvLyBzZW5kIHN0YXJ0LVJEIHdpdGggQ1RTIHByb3RlY3Rpb24gY29tbWFuZCB0byBNQ1UKLQotCXJldHVybjsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCVJhZGFyIGNoYW5uZWwgY2hlY2sgcm91dGluZQotCi0JQXJndW1lbnRzOgotCQlwQWQgCVBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQotCVJldHVybiBWYWx1ZToKLQkJVFJVRQluZWVkIHRvIGRvIHJhZGFyIGRldGVjdAotCQlGQUxTRQluZWVkIG5vdCB0byBkbyByYWRhciBkZXRlY3QKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUJPT0xFQU4gUmFkYXJDaGFubmVsQ2hlY2soCi0JSU4gUFJUTVBfQURBUFR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BRDhfQllfUkVHX0lEKHBBZCwgQkJQX1IxMTYsICZkdXJhdGlvbjEpOwotCUJCUF9JT19SRUFEOF9CWV9SRUdfSUQocEFkLCBCQlBfUjExNywgJmR1cmF0aW9uMik7Ci0JQkJQX0lPX1JFQUQ4X0JZX1JFR19JRChwQWQsIEJCUF9SMTE4LCAmZHVyYXRpb24zKTsKLQlyZXN1bHQgPSAoZHVyYXRpb24xIDw8IDE2KSArIChkdXJhdGlvbjIgPDwgOCkgKyBkdXJhdGlvbjM7Ci0jZW5kaWYgLy8gREZTX1NVUFBPUlQgLy8KLQotCXJldHVybiByZXN1bHQ7Ci0KLX0KLQotVk9JRCBSVE1QQ2xlYW5SYWRhckR1cmF0aW9uKAotCUlOIFBSVE1QX0FEQVBURVIJcEFkKQotewotCXJldHVybjsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBSYWRhciB3YXZlIGRldGVjdGlvbi4gVGhlIEFQSSBzaG91bGQgYmUgaW52b2tlIGVhY2ggc2Vjb25kLgotCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWQgICAgICAgICAtIEFkYXB0ZXIgcG9pbnRlcgotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIEFwUmFkYXJEZXRlY3RQZXJpb2RpYygKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlJTlQJaTsKLQotCXBBZC0+Q29tbW9uQ2ZnLlJhZGFyRGV0ZWN0LkluU2VydmljZU1vbml0b3JDb3VudCsrOwotCi0JZm9yIChpPTA7IGk8cEFkLT5DaGFubmVsTGlzdE51bTsgaSsrKQ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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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gICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgbWQ1LmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlOYW1lCQlEYXRlCQkJTW9kaWZpY2F0aW9uIGxvZ3MKLQlqYW4JCQkxMC0yOC0wMwkJSW5pdGlhbAotCVJpdGEgICAgCTExLTIzLTA0CQlNb2RpZnkgTUQ1IGFuZCBTSEEtMQotCVJpdGEJCTEwLTE0LTA1CQlNb2RpZnkgU0hBLTEgaW4gYmlnLWVuZGlhbiBwbGF0Zm9ybQotICovCi0jaW5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Ql9Ci0JCWJyZWFrOwotCX0KLQotCS8qIHNldHVwIGRlY3J5cHRpb24Jcm91bmQga2V5cyAqLwotCi0JaWYoCUtUX2luaXQJKQotCXsKLQkJZm9yKCBpID0gMDsJaSA8CTI1NjsgaSsrICkKLQkJewotCQkJS1QwW2ldID0gUlQwWyBGU2JbaV0gXTsKLQkJCUtUMVtpXSA9IFJUMVsgRlNiW2ldIF07Ci0JCQlLVDJbaV0gPSBSVDJbIEZTYltpXSBdOwotCQkJS1QzW2ldID0gUlQzWyBGU2JbaV0gXTsKLQkJfQotCi0JCUtUX2luaXQJPSAwOwotCX0KLQotCVNLID0gY3R4LT5kcms7Ci0KLQkqU0srKyA9CSpSSysrOwotCSpTSysrID0JKlJLKys7Ci0JKlNLKysgPQkqUksrKzsKLQkqU0srKyA9CSpSSysrOwotCi0JZm9yKCBpID0gMTsJaSA8CWN0eC0+bnI7IGkrKyApCi0JewotCQlSSyAtPSA4OwotCi0JCSpTSysrID0JS1QwWyAodWludDgpICggKlJLID4+IDI0ICkgXSBeCi0JCQkJS1QxWyAodWludDgpICggKlJLID4+IDE2ICkgXSBeCi0JCQkJS1QyWyAodWludDgpICggKlJLID4+ICA4ICkgXSBeCi0JCQkJS1QzWyAodWludDgpICggKlJLCQkgKSBdOyBSSysrOwotCi0JCSpTSysrID0JS1QwWyAodWludDgpICggKlJLID4+IDI0ICkgXSBeCi0JCQkJS1QxWyAodWludDgpICggKlJLID4+IDE2ICkgXSBeCi0JCQkJS1QyWyAodWludDgpICggKlJLID4+ICA4ICkgXSBeCi0JCQkJS1QzWyAodWludDgpICggKlJLCQkgKSBdOyBSSysrOwotCi0JCSpTSysrID0JS1QwWyAodWludDgpICggKlJLID4+IDI0ICkgXSBeCi0JCQkJS1QxWyAodWludDgpICggKlJLID4+IDE2ICkgXSBeCi0JCQkJS1QyWyAodWludDgpICggKlJLID4+ICA4ICkgXSBeCi0JCQkJS1QzWyAodWludDgpICggKlJLCQkgKSBdOyBSSysrOwotCi0JC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c2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQltbG1lLmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huIENoYW5nCTIwMDQtMDgtMjUJCU1vZGlmeSBmcm9tIFJUMjUwMCBjb2RlIGJhc2UKLQlKb2huIENoYW5nCTIwMDQtMDktMDYJCW1vZGlmaWVkIGZvciBSVDI2MDAKLSovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLSNpbmNs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KioqKioqKioqKioqKioqKioqKioqLwotCS8vLUNILS0tTi0tLS0tLS1SLS0tSy0tLS0tLS0tLS0tCi0JezEsICAgIDI0MSwgIDIsICAyfSwKLQl7MiwgICAgMjQxLAkgMiwgIDd9LAotCXszLCAgICAyNDIsCSAyLCAgMn0sCi0JezQsICAgIDI0MiwJIDIsICA3fSwKLQl7NSwgICAgMjQzLAkgMiwgIDJ9LAotCXs2LCAgICAyNDMsCSAyLCAgN30sCi0JezcsICAgIDI0NCwJIDIsICAyfSwKLQl7OCwgICAgMjQ0LAkgMiwgIDd9LAotCXs5LCAgICAyNDUsCSAyLCAgMn0sCi0JezEwLCAgIDI0NSwJIDIsICA3fSwKLQl7MTEsICAgMjQ2LAkgMiwgIDJ9LAotCXsxMiwgICAyNDYsCSAyLCAgN30sCi0JezEzLCAgIDI0NywJIDIsICAyfSwKLQl7MTQsICAgMjQ4LAkgMiwgIDR9LAotfTsKLSNkZWZpbmUJTlVNX09GXzMwMjBfQ0hOTAkoc2l6ZW9mKEZyZXFJdGVtczMwMjApIC8gc2l6ZW9mKEZSRVFVRU5DWV9JVEVNKSkKLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlpbml0aWFsaXplIHRoZSBNTE1FIHRhc2sgYW5kIGl0cyBkYXRhIHN0cnVjdHVyZSAocXVldWUsIHNwaW5sb2NrLAotCQl0aW1lciwgc3RhdGUgbWFjaGluZXMpLgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQotCVJldHVybjoKLQkJYWx3YXlzIHJldHVybiBORElTX1NUQVRVU19TVUNDRVNTCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLU5ESVNfU1RBVFVTIE1sbWVJbml0KAotCUlOIFBSVE1QX0FEQV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Ly8gSVJRTCA9IERJU1BBVENIX0xFVkVMCi1WT0lEIE1sbWVSYWRpb09mZigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlSVDI4WFhfTUxNRV9SQURJT19PRkYocEFkKTsKLX0KLQotLy8gSVJRTCA9IERJU1BBVENIX0xFVkVMCi1WT0lEIE1sbWVSYWRpb09uKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKQotewotCVJUMjhYWF9NTE1FX1JBRElPX09OKHBBZCk7Ci19Ci0KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIGJzc190YWJsZS5jCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQotLyohIFxicmllZiBpbml0aWFsaXplIEJTUyB0YWJsZQotICoJXHBhcmFtIHBfdGFiIHBvaW50ZXIgdG8gdGhlIHRhYmxlCi0gKglccmV0dXJuIG5vbmUKLSAqCVxwcmUKLSAqCVxwb3N0Ci0KLSBJUlFMID0gUEFTU0lWRV9MRVZFTAotIElSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gKi8KLVZPSUQgQnNzVGFibGVJbml0KAotCUlOIEJTU19UQUJMRSAqVGFiKQotewotCWludCBpOwotCi0JVGFiLT5Cc3NOciA9IDA7Ci0gICAgVGFiLT5Cc3NPdmVybGFwTnIgPSAwOwotCWZvciAoaSA9IDA7IGkgPCBNQVhfTEVOX09GX0JTU19UQUJMRTsgaSsrKQotCXsKLQkJTmRpc1plcm9NZW1vcnkoJlRhYi0+QnNzRW50cnlbaV0sIHNpemVvZihCU1NfRU5UUlkpKTsKLQkJVGFiLT5Cc3NFbnRyeVtpXS5Sc3NpID0gLTEyNzsJLy8gaW5pdGlhbCB0aGUgcnNzaSBhcyBh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Ci0JCQkJaWYgKHBCc3MtPldQQTIuR3JvdXBDaXBoZXIgIT0gcEJzcy0+V1BBMi5QYWlyQ2lwaGVyKQotCQkJCQlwQnNzLT5XUEEyLmJNaXhNb2RlID0gVFJVRTsKLQotCQkJCWJyZWFrOwotCQkJZGVmYXVsdDoKLQkJCQlicmVhazsKLQkJfQotCQlMZW5ndGggLT0gKHBFaWQtPkxlbiArIDIpOwotCX0KLX0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gbWFjX3RhYmxlLmMKLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLyohIFxicmllZiBnZW5lcmF0ZXMgYSByYW5kb20gbWFjIGFkZHJlc3MgdmFsdWUgZm9yIElCU1MgQlNTSUQKLSAqCVxwYXJhbSBBZGRyIHRoZSBic3NpZCBsb2NhdGlvbgotICoJXHJldHVybiBub25lCi0gKglccHJlCi0gKglccG9zdAotICovCi1WT0lEIE1hY0FkZHJSYW5kb21Cc3NpZCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlPVVQgUFVDSEFSIHBBZGRyKQotewotCUlOVCBpOwotCi0JZm9yIChpID0gMDsgaSA8IE1BQ19BRERSX0xFTjsgaSsrKQotCXsKLQkJcEFkZHJbaV0gPSBSYW5kb21CeXRlKHBBZCk7Ci0JfQotCi0JcEFkZHJbMF0gPSAocEFkZHJbMF0gJiAweGZlKSB8IDB4MDI7ICAvLyB0aGUgZmlyc3QgMiBiaXRzIG11c3QgYmUgMDF4eHh4eHh4eAotfQotCi0vKiEgXGJyaWVmIGluaXQgdGhlIG1hbmFnZW1lbnQgbWFjIGZyYW1lIGhlYWRlcgotICoJXHBhcmFtIHBfaGRyIG1hYyBoZWFkZXIKLSA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MuVG9EcyA9IFRvRHM7Ci0JQ09QWV9NQUNfQUREUihwSGRyODAyMTEtPkFkZHIxLCBwREEpOwotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JCUNPUFlfTUFDX0FERFIocEhkcjgwMjExLT5BZGRyMiwgcEFkLT5DdXJyZW50QWRkcmVzcyk7Ci0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0JQ09QWV9NQUNfQUREUihwSGRyODAyMTEtPkFkZHIzLCBwQnNzaWQpOwotfQotCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBtZW1fbWdtdC5jCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVGhpcyByb3V0aW5lIGJ1aWxkIGFuIG91dGdvaW5nIGZyYW1lLCBhbmQgZmlsbCBhbGwgaW5mb3JtYXRpb24gc3BlY2lmaWVkCi0gKiBpbiBhcmd1bWVudCBsaXN0IHRvIHRoZSBmcmFtZSBib2R5LiBUaGUgYWN0dWFsIGZyYW1lIHNpemUgaXMgdGhlIHN1bW1hdGlvbgotICogb2YgYWxsIGFyZ3VtZW50cy4KLSAqIGlucHV0IHBhcmFtczoKLSAqCQlCdWZmZXIgLSBwb2ludGVyIHRvIGEgcHJlLWFsbG9jYXRlZCBtZW1vcnkgc2VnbWVudAotICoJCWFyZ3MgLSBhIGxpc3Qgb2YgPGludCBhcmdfc2l6ZSwgYXJnPiBwYWlycy4KLSAqCQlOT1RFIE5PV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lvbiwgd2hlbiBtYWNoaW5lIGV4ZWN1dGVzIHRoaXMsIHRoZSBtZXNzYWdlIGlzIHNpbXBseQotCQlpZ25vcmVkLiBUaGlzIGZ1bmN0aW9uIGRvZXMgbm90aGluZywgdGhlIG1lc3NhZ2UgaXMgZnJlZWQgaW4KLQkJU3RhdGVNYWNoaW5lUGVyZm9ybUFjdGlvbigpCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBEcm9wKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLX0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gbGZzci5jCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBQQVNTSVZFX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIExmc3JJbml0KAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIFVMT05HIFNlZWQpCi17Ci0JaWYgKFNlZWQgPT0gMCkKLQkJcEFkLT5NbG1lLlNoaWZ0UmVnID0gMTsKLQllbHNlCi0JCXBBZC0+TWxtZS5TaGlmdFJlZyA9IFNlZWQ7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT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PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJVGhpcyBmdW5jdGlvbiBpcyByZXF1aXJlZCBmb3IgMjQyMSBvbmx5LCBhbmQgc2hvdWxkIG5vdCBiZSB1c2VkIGR1cmluZwotCQlzaXRlIHN1cnZleS4gSXQncyBvbmx5IHJlcXVpcmVkIGFmdGVyIE5JQyBkZWNpZGVkIHRvIHN0YXkgYXQgYSBjaGFubmVsCi0JCWZvciBhIGxvbmdlciBwZXJpb2QuCi0JCVdoZW4gdGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQsIGl0J3MgYWx3YXlzIGFmdGVyIEFzaWNTd2l0Y2hDaGFubmVsKCkuCi0KLQlJUlFMID0gUEFTU0lWRV9MRVZFTAotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBc2ljTG9ja0NoYW5uZWwoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gVUNIQVIgQ2hhbm5lbCkKLXsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQJQXNpY0FudGVubmFTZWxlY3QoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JVUNIQVIJCQlDaGFubmVsKQotewotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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cmVkCi0JCUFzaWNGb3JjZVNsZWVwKCkgc2hvdWxkIG9ubHkgYmUgdXNlZCB3aGVuIG5vdCBpbiBJTkZSQSBCU1MuIFdoZW4KLQkJaW4gSU5GUkEgQlNTLCB3ZSBzaG91bGQgdXNlIEFzaWNTbGVlcFRoZW5BdXRvV2FrZXVwKCkgaW5zdGVhZC4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEFzaWNGb3JjZVNsZWVwKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKQotewotCi19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJQXNpY0ZvcmNlV2FrZXVwKCkgaXMgdXNlZCB3aGVuZXZlciBUd2FrZXVwIHRpbWVyIChzZXQgdmlhIEFzaWNTbGVlcFRoZW5BdXRvV2FrZXVwKQotCQlleHBpcmVkLgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEFzaWNGb3JjZVdha2V1cCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBCT09MRUFOICAgIGJGcm9tVHgpCi17Ci0gICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiLS0+IEFzaWNGb3JjZVdha2V1cCBcbiIpKTsKLSAgICBSVDI4WFhfU1RBX0ZPUkNFX1dBS0VVUChwQWQsIGJGcm9tVHgpOwotfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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Zmc2V0ICs9IDQ7Ci0JUlRNUF9JT19XUklURTMyKHBBZCwgb2Zmc2V0LCBBZGRyMSk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBc2ljRW5hYmxlUkRHKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKQotewotCVRYX0xJTktfQ0ZHX1NUUlVDCVR4TGlua0NmZzsKLQlVSU5UMzIJCQkJRGF0YSA9IDA7Ci0KLQlSVE1QX0lPX1JFQUQzMihwQWQsIFRYX0xJTktfQ0ZHLCAmVHhMaW5rQ2ZnLndvcmQpOwotCVR4TGlua0NmZy5maWVsZC5UeFJER0VuID0gMTsKLQlSVE1QX0lPX1dSSVRFMzIocEFkLCBUWF9MSU5LX0NGRywgVHhMaW5rQ2ZnLndvcmQpOwotCi0JUlRNUF9JT19SRUFEMzIocEFkLCBFRENBX0FDMF9DRkcsICZEYXRhKTsKLQlEYXRhICAmPSAweEZGRkZGRjAwOwotCURhdGEgIHw9IDB4ODA7Ci0JUlRNUF9JT19XUklURTMyKHBBZCwgRURDQV9BQzBfQ0ZHLCBEYXRhKTsKLQotCS8vT1BTVEFUVVNfQ0xFQVJfRkxBRyhwQWQsIGZPUF9TVEFUVVNfQUdHUkVHQVRJT05fSU5VU0VEKTsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09P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LSAgICAgICAgcEFkICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgotICAgICAgICBXQ0lEICAgICAgICAgICAgICAgICAgICBXQ0lEIEVudHJ5IG51bWJlci4KLSAgICAgICAgQnNzSW5kZXggICAgICAgICAgICAgICAgQlNTSUQgaW5kZXgsIHN0YXRpb24gb3Igbm9uZSBtdWx0aXBsZSBCU1NJRCBzdXBwb3J0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgdmFsdWUgc2hvdWxkIGJlIDAuCi0gICAgICAgIEtleUlkeCAgICAgICAgICAgICAgICAgIFRoaXMgS2V5SWR4IHdpbGwgc2V0IHRvIElWJ3MgS2V5SUQgaWYgYlR4S2V5IGVuYWJsZWQKLSAgICAgICAgcENpcGhlcktleSAgICAgICAgICAgICAgUG9pbnRlciB0byBDaXBoZXIgS2V5LgotICAgICAgICBiVXNlUGFpcmV3aXNlS2V5VGFibGUgICBUUlVFIG1lYW5zIHNhdmVkIHRoZSBrZXkgaW4gU2hhcmVkS2V5IHRhYmxlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdGhlcndpc2UgUGFpcmV3aXNlS2V5IHRhYmxlCi0gICAgICAgIGJUeEtleSAgICAgICAgICAgICAgICAgIFRoaXMgaXMgdGhlIHRyYW5zbWl0IGtleSBpZiBlbmFibGVkLgotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICBOb3RlOgotICAgICAgICBUaGlzIHJvdXRpbmUgd2lsbCBzZXQgdGhlIHJlbGF0aXZlIGtleSBzdHVmZiB0byBBc2ljIGluY2x1ZGluZyBXQ0lEIGF0dHJpYnV0ZSwKLSAgICAgICAgQ2lwaGVyIEtleSwgQ2lwaGVyIGFsZ29yaXRobSBhbmQgSVYvRUlWLgotCi0gICAgICAgIElWL0VJViB3aWxsIGJlIHVwZGF0ZSBpZiB0aGlzIENpcGhlcktleSBpcyB0aGUgdHJhbn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X0KLQotCWlmIChsYXJnZXIgPT0gLTEyNykKLQkJbGFyZ2VyID0gMDsKLQotCXJldHVybiBsYXJnZXI7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgUGVyaW9kaWMgZXZhbHVhdGUgYW50ZW5uYSBsaW5rIHN0YXR1cwotCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWQgICAgICAgICAtIEFkYXB0ZXIgcG9pbnRlcgotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIEFzaWNFdmFsdWF0ZVJ4QW50KAotCUlOIFBSVE1QX0FEQVBURVIJcEFkKQotewotCVVDSEFSCUJCUFIzID0gMDsKLQotI2lmZGVmIFJBTElOS19BVEUKLQlpZiAoQVRFX09OKHBBZCkpCi0JCXJldHVybjsKLSNlbmRpZiAvLyBSQUxJTktfQVRFIC8vCi0KLQotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JewotCQlpZiAoUlRNUF9URVNUX0ZMQUcocEFkLCBmUlRNUF9BREFQVEVSX1JFU0VUX0lOX1BST0dSRVNTCXwKLQkJCQkJCQkJZlJUTVBfQURBUFRFUl9IQUxUX0lOX1BST0dSRVNTCXwKLQkJCQkJCQkJZlJUTVBfQURBUFRFUl9SQURJT19PRkYJCQl8Ci0JCQkJCQkJCWZSVE1QX0FEQVBURVJfTklDX05PVF9FWElTVAkJfAotCQkJCQkJCQlmUlRNUF9BREFQVEVSX0JTU19TQ0FOX0lOX1BST0dSRVNTKSkKLQkJCXJldHVybjsKL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ZmcuVHhSYXRlLCBUUlVFKTsKLQkJcEFkLT5Db21tb25DZmcuYk5lZWRTZW5kVHJpZ2dlckZyYW1lID0gRkFMU0U7Ci0JCXBBZC0+Q29tbW9uQ2ZnLlRyaWdnZXJUaW1lckNvdW50ID0gMDsKLQkJcEFkLT5Db21tb25DZmcuYkluU2VydmljZVBlcmlvZCA9IFRSVUU7Ci0JfSovCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0L3Jlc2V0IE1BQyByZWdpc3RlcnMgYWNjb3JkaW5nIHRvIGJQaWdneUJhY2sgcGFyYW1ldGVyCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZCAgICAgICAgIC0gQWRhcHRlciBwb2ludGVyCi0gICAgICAgIGJQaWdneUJhY2sgIC0gRW5hYmxlIC8gRGlzYWJsZSBQaWdneS1CYWNrCi0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIE5vbmUKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgUlRNUFNldFBpZ2d5QmFjaygKLSAgICBJTiBQUlRNUF9BREFQVEVSICAgIHBBZCwKLSAgICBJTiBCT09MRUFOICAgICAgICAgIGJQaWdneUJhY2spCi17Ci0JVFhfTElOS19DRkdfU1RSVUMgIFR4TGlua0NmZzsKLQotCVJUTVBfSU9fUkVBRDMyKHBBZCwgVFhfTElOS19DRkcsICZUeExpbmtDZmcud29yZCk7Ci0KLQlUeExpbmtDZmcuZmllbGQuVHhDRkFja0VuID0gYlBpZ2d5QmFjazsKLQlSVE1QX0lPX1dSSVRFMzIocEFkLCBUWF9MSU5LX0NGRywgVHhMaW5rQ2ZnLndvcmQpOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIFJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgICAgIGNoZWNrIGlmIHRoaXMgZW50cnkgbmVlZCB0byBzd2l0Y2ggcmF0ZSBhdXRvbWF0aWNhbGx5Ci0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZAotICAgICAgICBwRW50cnkKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgVFVSRQotICAgICAgICBGQUxTRQotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotQk9PTEVBTiBSVE1QQ2hlY2tFbnRyeUVuYWJsZUF1dG9SYXRlU3dpdGNoKAotCUlOIFBSVE1QX0FEQVBURVIgICAgcEFkLAotCUlOIFBNQUNfVEFCTEVfRU5UUlkJcEVudHJ5KQotewotCUJPT0xFQU4JCXJlc3VsdCA9IFRSVUU7Ci0KLQotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JewotCQkvLyBvbmx5IGFzc29jaWF0ZWQgU1RBIGNvdW50cwotCQlpZiAocEVudHJ5ICYmIChwRW50cnktPlZhbGlkQXNDTEkpICYmIChwRW50cnktPlNzdCA9PSBTU1RfQVNTT0MpKQotCQl7Ci0JCQlyZXN1bHQgPSBwQWQtPlN0YUNmZy5iQXV0b1R4UmF0ZVN3aXRjaDsKLQkJfQotCQllbHNlCi0JCQlyZXN1bHQgPSBGQUxTRTsKLQotI2lmZGVmIFFPU19ETFNfU1VQUE9SVAotCQlpZiAocEVudHJ5ICYmIChwRW50cnktPlZhbGlkQXNEbHMpKQotCQkJcmVzdWx0ID0gcEFkLT5TdGFDZmcuYkF1dG9UeFJhdGVTd2l0Y2g7Ci0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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotI2luY2x1ZGUgIm5ldGlmX2Jsb2NrLmgiCi0KLXN0YXRpYyBORVRJRl9FTlRSWSBmcmVlTmV0SWZFbnRyeVBvb2xbRlJFRV9ORVRJRl9QT09MX1NJWkVdOwotc3RhdGljIExJU1RfSEVBREVSIGZyZWVOZXRJZkVudHJ5TGlzdDsKLQotdm9pZCBpbml0YmxvY2tRdWV1ZVRhYigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlpbnQgaTsKLQotCWluaXRMaXN0KCZmcmVlTmV0SWZFbnRyeUxpc3QpOwotCWZvciAoaSA9IDA7IGkgPCBGUkVFX05FVElGX1BPT0xfU0laRTsgaSsrKQotCQlpbnNlcnRUYWlsTGlzdCgmZnJlZU5ldElmRW50cnlMaXN0LCAoUExJU1RfRU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mQvb3IgbW9kaWZ5ICAqCi0gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlydG1wX2luaXQuYwotCi0JQWJzdHJhY3Q6Ci0JTWluaXBvcnQgZ2VuZXJpYyBwb3J0aW9uIGhlYWRlciBmaWxlCi0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotCS0tLS0tLS0tICAgIC0tLS0tLS0tLS0gICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCVBhdWwgTGluICAgIDIwMDItMDgtMDEgICAgY3JlYXRlZAotICAgIEpvaG4gQ2hhbmcgIDIwMDQtMDgtMjAgICAgUlQyNTYxLzI2NjEgdXNlIHNjYXR0ZXItZ2F0aGVyIHNjaGVtZQotICAgIEphbiBMZWUgIDIwMDYtMDktMTUgICAgUlQyODYwLiBDaGFuZ2UgZm9yIDgwMi4xMW4gLCBFRVBST00sIExlZCwgQkEsIEhULgotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLSNpbmNsdWRlICJmaXJtd2FyZS5oIgotCi0vLyNkZWZpbmUgQklOX0lOX0ZJTEUgLyogdXNlICouYmluIGZpcm13YXJlICovCi0KLVVDSEFSICAgIEJJVDhbXSA9IHsweDAxLCAweDAyLCAweDA0LCAweDA4LCAweDEwLCAweDIwLC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uZCBiZWZvcmUuCi19OwotI2RlZmluZQlOVU1fQkJQX1JFR19QQVJNUwkoc2l6ZW9mKEJCUFJlZ1RhYmxlKSAvIHNpemVvZihSRUdfUEFJUikpCi0KLS8vCi0vLyBSRiByZWdpc3RlciBpbml0aWFsaXphdGlvbiBzZXQKLS8vCi0jaWZkZWYgUlQyODcwCi1SRUdfUEFJUiAgIFJUMzB4eF9SRlJlZ1RhYmxlW10gPSB7Ci0gICAgICAgIHtSRl9SMDQsICAgICAgICAgIDB4NDB9LAotICAgICAgICB7UkZfUjA1LCAgICAgICAgICAweDAzfSwKLSAgICAgICAge1JGX1IwNiwgICAgICAgICAgMHgwMn0sCi0gICAgICAgIHtSRl9SMDcsICAgICAgICAgIDB4NzB9LAotICAgICAgICB7UkZfUjA5LCAgICAgICAgICAweDBGfSwKLSAgICAgICAge1JGX1IxMCwgICAgICAgICAgMHg3MX0sCi0gICAgICAgIHtSRl9SMTEsICAgICAgICAgIDB4MjF9LAotICAgICAgICB7UkZfUjEyLCAgICAgICAgICAweDdCfSwKLSAgICAgICAge1JGX1IxNCwgICAgICAgICAgMHg5MH0sCi0gICAgICAgIHtSRl9SMTUsICAgICAgICAgIDB4NTh9LAotICAgICAgICB7UkZfUjE2LCAgICAgICAgICAweEIzfSwKLSAgICAgICAge1JGX1IxNywgICAgICAgICAgMHg5Mn0sCi0gICAgICAgIHtSRl9SMTgsICAgICAgICAgIDB4MkN9LAotICAgICAgICB7UkZfUjE5LCAgICAgICAgICAweDAyfSwKLSAgICAgICAge1JGX1IyMCwgICAgICAgICAgMHhCQX0sCi0gICAgICAgIHtSRl9SMjEsICAgICAgICAgIDB4REJ9LAotICAgICAgICB7UkZfUjI0LCAgICAgICAgICAweDE2fSwKLSAgICAgICAge1JGX1IyNSwgICAgICAgICAgMHgwMX0sCi0gICAgICAgIHtSRl9SMjcsICAgICAgICAgIDB4MDN9LAotICAgICAgICB7UkZfUjI5LCAgICAgICAgICAweDFGfSwKLX07Ci0jZGVmaW5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aGUgY29ubmVjdGlvbiBzaG91bGQgcmVtYWlucyBvbi4KLQlBc2ljU3dpdGNoQ2hhbm5lbChwQWQsIHBBZC0+Q29tbW9uQ2ZnLkNlbnRyYWxDaGFubmVsLCBGQUxTRSk7Ci0JQXNpY0xvY2tDaGFubmVsKHBBZCwgcEFkLT5Db21tb25DZmcuQ2VudHJhbENoYW5uZWwpOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQkJZXJhc2UgODA1MSBmaXJtd2FyZSBpbWFnZSBpbiBNQUMgQVNJQwotCi0JQXJndW1lbnRzOgotCQlBZGFwdGVyCQkJCQkJUG9pbnRlciB0byBvdXIgYWRhcHRlcgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgTklDRXJhc2VGaXJtd2FyZSgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlVTE9ORyBpOwotCi0JZm9yKGk9MDsgaTxNQVhfRklSTVdBUkVfSU1BR0VfU0laRTsgaSs9NCkKLQkJUlRNUF9JT19XUklURTMyKHBBZCwgRklSTVdBUkVfSU1BR0VfQkFTRSArIGksIDApOwotCi19LyogRW5kIG9mIE5JQ0VyYXNlRmlybXdhcmUgKi8KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCUxvYWQgODA1MSBmaXJtd2FyZSBSVDI1NjEuQklOIGZpbGUgaW50byBNQUMgQVNJQwotCi0JQXJndW1lbnRzOgotCQlBZGFwdGVyCQkJCQkJUG9pbnRlciB0by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IDMwMiwKLSAqIFRhaXdhbiwgUi5PLkMuCi0gKgotICogKGMpIENvcHlyaWdodCAyMDAyLTIwMDcsIFJhbGluayBUZWNobm9sb2d5LCBJbmMuCi0gKgotICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICoKLSAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCXJ0bXBfdGtpcC5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JUGF1bCBXdQkJMDItMjUtMDIJCUluaXRpYWwKLSovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotLy8gUm90YXRpb24gZnVuY3Rpb25zIG9uIDMyIGJpdCB2YWx1ZXMKLSNkZWZpbmUgUk9MMzIoIEEsIG4gKSBcCi0JKCAoKEEpIDw8IChuKSkgfCAoICgoQSk+PigzMi0obikpKSAmICggKDFVTCA8PCAobikpIC0gMSApICkgKQotI2RlZmluZSBST1IzMiggQSwgbiApIFJPTDMyKCAoQSksIDMyLShuKSApCi0KLV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aW5lCURlc2NyaXB0aW9uOgotCQlDb252ZXJ0IGZyb20gVUNIQVJbXSB0byBVTE9ORyBpbiBhIHBvcnRhYmxlIHdheQotCi0JQXJndW1lbnRzOgotICAgICAgcE1JQ0tleQkJcG9pbnRlciB0byBNSUMgS2V5Ci0KLQlSZXR1cm4gVmFsdWU6Ci0JCU5vbmUKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1VTE9ORwlSVE1QVGtpcEdldFVJbnQzMigKLQlJTglQVUNIQVIJcE1JQ0tleSkKLXsKLQlVTE9ORwlyZXMgPSAwOwotCUlOVAkJaTsKLQotCWZvciAoaSA9IDA7IGkgPCA0OyBpKyspCi0JewotCQlyZXMgfD0gKCpwTUlDS2V5KyspIDw8ICg4ICogaSk7Ci0JfQotCi0JcmV0dXJuIHJlczsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUJRGVzY3JpcHRpb246Ci0JCUNvbnZlcnQgZnJvbSBVTE9ORyB0byBVQ0hBUltdIGluIGEgcG9ydGFibGUgd2F5Ci0KLQlBcmd1bWVudHM6Ci0gICAgICBwRHN0CQkJcG9pbnRlciB0byBkZXN0aW5hdGlvbiBmb3IgY29udmVydCBVTE9ORyB0byBVQ0hBUltdCi0gICAgICB2YWwJCQl0aGUgdmFsdWUgZm9yIGNvbnZlcnQKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRAlSVE1QVGtpcFB1dFVJbnQzMigKLQlJTiBPVVQJUFVDSEFSCQlwRHN0LAotCUlOCQlVTE9ORwkJdmFsKQotewotCUlOVCBpOwotCi0JZm9yKGkgPSAwOyBpIDwgNDsgaSsrKQotCXsKLQkJKnBEc3QrKyA9IChVQ0hBUikgKHZhbCAmIDB4ZmYpOwotCQl2YWwgPj49IDg7Ci0JfQotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZQlEZXNjcmlwdGlvbjoKLQkJU2V0IHRoZSBNSUMgS2V5LgotCi0JQXJndW1lbnRzOgotICAgICAgcEFkCQlQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgICBwTUlDS2V5CQlwb2ludGVyIHRvIE1JQyBLZXkKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBSVE1QVGtpcFNldE1JQ0tleSgKLQlJTglQVEtJUF9LRVlfSU5GTwlwVGtpcCwKLQlJTglQVUNIQVIJCQlwTUlDS2V5KQotewotCS8vIFNldCB0aGUga2V5Ci0JcFRraXAtPkswID0gUlRNUFRraXBHZXRVSW50MzIocE1JQ0tleSk7Ci0JcFRraXAtPksxID0gUlRNUFRraXBHZXRVSW50MzIocE1JQ0tleSArIDQpOwotCS8vIGFuZCByZXNldCB0aGUgbWVzc2FnZQotCXBUa2lwLT5MID0gcFRraXAtPkswOwotCXBUa2lwLT5SID0gcFRraXAtPksxOwotCXBUa2lwLT5uQnl0ZXNJbk0gPSAwOwotCXBUa2lwLT5NID0gMDsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJ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TNdID0gbXBkdVsxM107Ci0JbWljX2hlYWRlcjFbMTRdID0gbXBkdVsxNF07Ci0JbWljX2hlYWRlcjFbMTVdID0gbXBkdVsxNV07Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKSAgICAgICAgICAgICAgICAgICAgICAqLwotLyogQnVpbGRzIHRoZSBsYXN0IE1JQyBoZWFkZXIgYmxvY2sgZnJvbSAgICAgICAgKi8KLS8qIGhlYWRlciBmaWVsZHMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkIGNvbnN0cnVjdF9taWNfaGVhZGVyMigKLQl1bnNpZ25lZCBjaGFyICptaWNfaGVhZGVyMiwKLQl1bnNpZ25lZCBjaGFyICptcGR1LAotCWludCBhNF9leGlzdHMsCi0JaW50IHFjX2V4aXN0cykKLXsKLQlpbnQgaTsKLQotCWZvciAoaSA9IDA7IGk8MTY7IGkrKykgbWljX2hlYWRlcjJbaV09MHgwMDsKLQotCW1pY19oZWFkZXIyWzBdID0gbXBkdVsxNl07ICAgIC8qIEEzICovCi0JbWljX2hlYWRlcjJbMV0gPSBtcGR1WzE3XTsKLQltaWNfaGVhZGVyMlsyXSA9IG1wZHVbMThdOwotCW1pY19oZWFkZXIyWzNdID0gbXBkdVsxOV07Ci0JbWljX2hlYWRlcjJbNF0gPSBtcGR1WzIwXTsKLQltaWNfaGVhZGVyMls1XSA9IG1wZHVbMjFdOwotCi0JLy8gSW4gU2VxdWVuY2UgQ29udHJvbCBmaWVsZCwgbXV0ZSBzZXF1ZW5jZSBudW1lciBiaXRzICgxMi1iaXQpCi0JbWljX2hlYWRlcjJbNl0gPSBtcGR1WzIyXSAmIDB4MGY7ICAgLyogU0MgKi8KLQltaWNfaGVhZGVyMls3XSA9IDB4MDA7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xpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2Ug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09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZQlEZXNjcmlwdGlvbjoKLQkJVGhlIFN0cmVhbSBDaXBoZXIgRGVjcnlwdGlvbiBBbGdvcml0aG0KLQotCUFyZ3VtZW50czoKLQkJQ3R4ICAgICAgICAgUG9pbnRlciB0byBBUkNGT1VSIENPTlRFWFQgKFNCT1gpCi0JCXBEZXN0CQkJUG9pbnRlciB0byB0aGUgRGVzdGluYXRpb24KLQkJcFNyYyAgICAgICAgUG9pbnRlciB0byB0aGUgU291cmNlIGRhdGEKLQkJTGVuICAgICAgICAgSW5kaWNhdGUgdGhlIGxlbmd0aCBvZiB0aGUgU291cmNlIGRhdGEKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJQVJDRk9VUl9ERUNSWVBUKAotCUlOCVBBUkNGT1VSQ09OVEVYVAlDdHgsCi0JSU4JUFVDSEFSCQkJcERlc3QsCi0JSU4JUFVDSEFSCQkJcFNyYywKLQlJTglVSU5UCQkJTGVuKQotewotCVVJTlQgaTsKLQotCWZvciAoaSA9IDA7IGkgPCBMZW47IGkrKykKLQkJcERlc3RbaV0gPSBwU3JjW2ldIF4gQVJDRk9VUl9CWVRFKEN0eCk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lCURlc2NyaXB0aW9uOgotCQlUaGUgU3RyZWFtIENpcGhlciBFbmNyeXB0aW9uIEFsZ29yaXRobQotCi0JQXJndW1lbnRzOgotCQlDdHggICAgICAgICBQb2ludGVyIHRvIEFSQ0ZPVVIgQ09OVEVYVCAoU0JPWCkKLQkJcERlc3QJCQlQb2ludGVyIHRvIHRoZSBEZXN0aW5hdG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0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0KLVZPSUQJV1BBQVJDRk9VUl9FTkNSWVBUKAotCUlOCVBBUkNGT1VSQ09OVEVYVAlDdHgsCi0JSU4JUFVDSEFSCQkJcERlc3QsCi0JSU4JUFVDSEFSCQkJcFNyYywKLQlJTglVSU5UCQkJTGVuKQotewotCVVJTlQgaTsKLSAgICAgICAgLy9kaXNjYXJkIGZpcnN0IDI1NiBieXRlcwotCWZvciAoaSA9IDA7IGkgPCAyNTY7IGkrKykKLSAgICAgICAgICAgIEFSQ0ZPVVJfQllURShDdHgpOwotCi0JZm9yIChpID0gMDsgaSA8IExlbjsgaSsrKQotCQlwRGVzdFtpXSA9IHBTcmNbaV0gXiBBUkNGT1VSX0JZVEUoQ3R4KTsKLX0KLQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZQlEZXNjcmlwdGlvbjoKLQkJQ2FsY3VsYXRlIGEgbmV3IEZDUyBnaXZlbiB0aGUgY3VycmVudCBGQ1MgYW5kIHRoZSBuZXcgZGF0YS4KLQotCUFyZ3VtZW50czoKLQkJRmNzCSAgICAgIHRoZSBvcmlnaW5hbCBGQ1MgdmFsdWUKLQkJQ3AgICAgICAgICAgcG9pbnRlciB0byB0aGUgZGF0YSB3aGljaCB3aWxsIGJlIGNhbGN1bGF0ZSB0aGUgRkNTCi0JCUxlbiAgICAgICAgIHRoZSBsZW5ndGggb2YgdGhlIGRhdGEKLQotCVJldHVybiBWYWx1ZToKLQkJVUlOVCAtIEZDUyAzMiBiaXRzCi0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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nJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0JYWN0aW9uLmMKLQotICAgIEFic3RyYWN0OgotICAgIEhhbmRsZSBhc3NvY2lhdGlvbiByZWxhdGVkIHJlcXVlc3RzIGVpdGhlciBmcm9tIFdTVEEgb3IgZnJvbSBsb2NhbCBNTE1FCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgICBXaGVuICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JRm9uY2hpIFd1ICAgIDIwMDgJICAJICAgY3JlYXRlZCBmb3IgODAyLjExaAotICovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLSNpbmNsdWRlICJhY3Rpb24uaCIKLQotVk9JRCBNZWFzdXJlUmVxVGFiSW5pdCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlOZGlzQWxsb2NhdGVTcGluTG9jaygmcEFkLT5Db21tb25DZmcuTWVhc3VyZVJlcVRhYkxvY2spOwotCi0JcEFkLT5Db21tb25DZmcucE1lYXN1cmVSZXFUYWIgPSBrbWFs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ldEN1cnJlbnRUaW1lU3RhbXAoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpCi17Ci0JLy8gZ2V0IGN1cnJlbnQgdGltZSBzdGFtcC4KLQlyZXR1cm4gMDsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlHZXQgQ3VycmVudCBUcmFuc21pdCBQb3dlci4KLQotCVBhcmFtZXRyczoKLQotCVJldHVybgk6IEN1cnJlbnQgVGltZSBTdGFtcC4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1zdGF0aWMgVUlOVDggR2V0Q3VyVHhQd3IoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gVUlOVDggV2NpZCkKLXsKLQlyZXR1cm4gMTY7IC8qIDE2IGRCbSAqLwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCUluc2VydCBEaWFsb2cgVG9rZW4gaW50byBmcmFtZS4KLQotCVBhcmFtZXRyczoKLQkJMS4gZnJhbWUgYnVmZmVyIHBvaW50ZXIuCi0JCTIuIGZyYW1lIGxlbmd0aC4KLQkJMy4gRGlhbG9nIHRva2VuLgotCi0JUmV0dXJuCTogTm9uZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1zdGF0aWMgVk9JRCBJbnNlcnREaWFsb2dUb2tlbigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlPVVQgUFVDSEFSIHBGcmFtZUJ1ZiwKLQlPVVQgUFVMT05HIHBGcmFtZUxlb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B0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgZGZzLmgKLQotICAgIEFic3RyYWN0OgotICAgIFN1cHBvcnQgREZTIGZ1bmN0aW9uLgotCi0gICAgUmV2aXNpb24gS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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlsZWFwLmgKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlOYW1lCQlEYXRlCQkJTW9kaWZpY2F0aW9uIGxvZ3MKLSovCi0jaWZuZGVmIF9fTEVBUF9IX18KLSNkZWZpbmUgX19MRUFQX0hfXwotCi0vLyBNZXNzYWdlcyBmb3IgQXNzb2NpYXRlIHN0YXRlIG1hY2hpbmUKLSNkZWZpbmUgTEVBUF9NQUNISU5FX0JBU0UgICAgICAgICAgICAgICAgICAgMzAKLQotI2RlZmluZSBMRUFQX01TR19SRVFVRVNUX0lERU5USVRZICAgICAgICAgICAzMQotI2RlZmluZSBMRUFQX01TR19SRVFVRVNUX0xFQVAgICAgICAgICAgICAgICAzMgotI2RlZmluZSBMRUFQX01TR19TVUNDRVNTICAgICAgICAgICAgICAgICAgICAzMwotI2RlZmluZSBMRUFQX01TR19GQUlMRUQgICAgICAgICAgICAgICAgICAgICAzNAotI2RlZmluZSBMRUFQX01TR19SRVNQT05TRV9MRUFQICAgICAgICAgICAgICAzNQotI2RlZmluZSBMRUFQX01TR19FQVBPTEtFWSAgICAgICAgICAgICAgICAgICAzNgotI2RlZmluZSBMRUFQX01TR19VTktOT1dOICAgICAgICAgICAgICAgICAgICAzNwotI2RlZmluZSBMRUFQX01TRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOAotLy8hIGFzc29jIHN0YXRlLW1hY2hpbmUgc3RhdGVzCi0jZGVmaW5lIExFQVBfSURMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgTEVBUF9XQUlUX0lERU5USVRZX1JFUVVFU1QgICAgICAgICAgMQotI2RlZmluZSBMRUFQX1dBSVRfQ0hBTkxMRU5HRV9SRVFVRVNUICAgICAgICAyCi0jZGVmaW5lIExFQVBfV0FJVF9TVUNDRVNTICAgICAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgTEVBUF9XQUlUX0NIQU5MTEVOR0VfUkVTUE9OU0UgICAgICAgNAotI2RlZmluZSBMRUFQX1dBSVRfRUFQT0xLRVkgICAgICAgICAgICAgICAgICA1Ci0KLSNkZWZpbmUgTEVBUF9SRUFTT05fSU5WQUxJRF9BVVRIICAgICAgICAgICAgICAgICAgICAweDAxCi0jZGVmaW5lIExFQVBfUkVBU09OX0FVVEhfVElNRU9VVCAgICAgICAgICAgICAgICAgICAgMHgwMgotI2RlZmluZSBMRUFQX1JFQVNPTl9DSEFMTEVOR0VfRlJPTV9BUF9GQUlMRUQgICAgICAgIDB4MDMKLSNkZWZpbmUgTEVBUF9SRUFTT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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqLwotCi0jaWZuZGVmIF9fTElOS19MSVNUX0hfXwotI2RlZmluZSBfX0xJTktfTElTVF9IX18KLQotdHlwZWRlZiBzdHJ1Y3QgX0xJU1RfRU5UUlkKLXsKLQlzdHJ1Y3QgX0xJU1RfRU5UUlkgKnBOZXh0OwotfSBMSVNUX0VOVFJZLCAqUExJU1RfRU5UUlk7Ci0KLXR5cGVkZWYgc3RydWN0IF9MSVNUX0hFQURSCi17Ci0JUExJU1RfRU5UUlkgcEhlYWQ7Ci0JUExJU1RfRU5UUlkgcFRhaWw7Ci0JVUNIQVIgc2l6ZTsKLX0gTElTVF9IRUFERVIsICpQTElTVF9IRUFERVI7Ci0KLXN0YXRpYyBpbmxpbmUgVk9JRCBpbml0TGlzdCgKLQlJTiBQTElTVF9IRUFERVIgcExpc3QpCi17Ci0JcEx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ICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQltZDUuaAotCi0JQWJzdHJhY3Q6Ci0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobwkJCVdoZW4JCQlXaGF0Ci0JLS0tLS0tLS0JLS0tLS0tLS0tLQ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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmFsaW5rIFRlY2ggSW5jLgotICogNUYuLCBOby4zNiwgVGFpeXVhbiBTdC4sIEpodWJlaSBDaXR5LAotICogSHNpbmNodSBDb3VudHkgMzAyLAotICogVGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JbWxtZS5oCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JSm9obiBDaGFuZwkyMDAzLTA4LTI4CQlDcmVhdGVkCi0JSm9obiBDaGFuZyAgMjAwNC0wOS0wNiAgICAgIG1vZGlmaWVkIGZvciBSVDI2MDAKLQotKi8KLSNpZm5kZWYgX19NTE1FX0hfXwotI2RlZmluZSBfX01MTU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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2lmbmRlZiBfX05FVF9JRl9CTE9DS19IX18KLSNkZWZpbmUgX19ORVRfSUZfQkxPQ0tfSF9fCi0KLS8vI2luY2x1ZGUgPGxpbnV4L2RldmljZS5oPgotI2luY2x1ZGUgImxpbmtfbGlzdC5oIgotI2luY2x1ZGUgInJ0bXAuaCIKLQotI2RlZmluZSBGUkVFX05FVElGX1BPT0xfU0laRSAzMgotCi10eXBlZGVmIHN0cnVjdCBfTkVUSUZfRU5UUlkKLXsKLQlzdHJ1Y3QgX05FVElGX0VOVFJZICpwTmV4dDsKLQlQTkVUX0RFViBwTmV0RGV2OwotfSBORVRJRl9FTlRSWSwgKlBORVRJRl9FTlRSWTsKLQotdm9pZCBpbml0YmxvY2tRdWV1ZVRhYigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCk7Ci0KLUJPT0xFQU4gYmxvY2tOZXRJZ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OVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlvaWQuaAotCi0JQWJzdHJhY3Q6Ci0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobwkJCVdoZW4JCQlXaGF0Ci0JLS0tLS0tLS0JLS0tLS0tLS0tLQkJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCU5hbWUJCURhdGUJCQlNb2RpZmljYXRpb24gbG9ncwotKi8KLSNpZm5kZWYgX09JRF9IXwotI2RlZmluZSBfT0lEX0hfCi0KLSNkZWZpbmUgVFJVRQkJCQkxCi0jZGVmaW5lIEZBTFNFCQkJCTAKLS8vCi0vLyBJRUVFIDgwMi4xMSBTdHJ1Y3R1cmVzIGFuZCBkZWZpbml0aW9ucwotLy8KLSNkZWZpbmUgTUFYX1RYX1BPV0VSX0xFVkVMICAgICAgICAgICAgICAxMDAgICAvKiBtVyAqLwotI2RlZmluZSBNQVhfUlNTSV9UUklHR0VSICAgICAgICAgICAgICAgIC0xMCAgICAvKiBkQm0gKi8KLSNkZWZpbmUgTUlOX1JTU0lfVFJJR0dFUiAgICAgICAgICAgICAgICAtMjAwICAgLyogZEJtICovCi0jZGVmaW5lIE1BWF9GUkFHX1RIUkVTSE9MRCAgICAgICAgICAgICAgMjM0NiAgLyogYnl0ZSBjb3VudCAqLwotI2RlZmluZSBNSU5fRlJBR19USFJFU0hPTEQgICAgICAgICAgICAgIDI1NiAgIC8qIGJ5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ExX1JTU0k7ICAgICAgICAgICAvLyBpbiBkQm0KLQotdHlwZWRlZiBzdHJ1Y3QgX05ESVNfODAyXzExX0NPTkZJR1VSQVRJT05fRkgKLXsKLSAgIFVMT05HICAgICAgICAgICBMZW5ndGg7ICAgICAgICAgICAgLy8gTGVuZ3RoIG9mIHN0cnVjdHVyZQotICAgVUxPTkcgICAgICAgICAgIEhvcFBhdHRlcm47ICAgICAgICAvLyBBcyBkZWZpbmVkIGJ5IDgwMi4xMSwgTVNCIHNldAotICAgVUxPTkcgICAgICAgICAgIEhvcFNldDsgICAgICAgICAgICAvLyB0byBvbmUgaWYgbm9uLTgwMi4xMQotICAgVUxPTkcgICAgICAgICAgIER3ZWxsVGltZTsgICAgICAgICAvLyB1bml0cyBhcmUgS3VzZWMKLX0gTkRJU184MDJfMTFfQ09ORklHVVJBVElPTl9GSCwgKlBORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OX0ZIOwotCi10eXBlZGVmIHN0cnVjdCBfTkRJU184MDJfMTFfQ09ORklHVVJBVElPTgotewotICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICBMZW5ndGg7ICAgICAgICAgICAgIC8vIExlbmd0aCBvZiBzdHJ1Y3R1cmUKLSAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgQmVhY29uUGVyaW9kOyAgICAgICAvLyB1bml0cyBhcmUgS3VzZWMKLSAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgQVRJTVdpbmRvdzsgICAgICAgICAvLyB1bml0cyBhcmUgS3VzZWMKLSAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgRFNDb25maWc7ICAgICAgICAgICAvLyBGcmVxdWVuY3ksIHVuaXRzIGFyZSBrSHoKLSAgIE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT05fRkggICAgRkhDb25maWc7Ci19IE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04sICpQTkRJU184MDJfMTFfQ09ORklHVVJBVElPTj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IHVwcGVyIGJvdW5kCi19IE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUsICpQTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERTsKLQotdHlwZWRlZiBVQ0hBUiAgIE5ESVNfODAyXzExX1JBVEVTW05ESVNfODAyXzExX0xFTkdUSF9SQVRFU107ICAgICAgICAvLyBTZXQgb2YgOCBkYXRhIHJhdGVzCi10eXBlZGVmIFVDSEFSICAgTkRJU184MDJfMTFfUkFURVNfRVhbTkRJU184MDJfMTFfTEVOR1RIX1JBVEVTX0VYXTsgIC8vIFNldCBvZiAxNiBkYXRhIHJhdGVzCi0KLXR5cGVkZWYgc3RydWN0IFBBQ0tFRCBfTkRJU184MDJfMTFfU1NJRAotewotICAgIFVJTlQgICBTc2lkTGVuZ3RoOyAgICAgICAgIC8vIGxlbmd0aCBvZiBTU0lEIGZpZWxkIGJlbG93LCBpbiBieXRlczsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyBjYW4gYmUgemVyby4KLSAgICBVQ0hBUiAgIFNzaWRbTkRJU184MDJfMTFfTEVOR1RIX1NTSURdOyAgICAgICAgICAgLy8gU1NJRCBpbmZvcm1hdGlvbiBmaWVsZAotfSBORElTXzgwMl8xMV9TU0lELCAqUE5ESVNfODAyXzExX1NTSUQ7Ci0KLQotdHlwZWRlZiBzdHJ1Y3QgUEFDS0VEIF9ORElTX1dMQU5fQlNTSUQKLXsKLSAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExlbmd0aDsgICAgIC8vIExlbmd0aCBvZiB0aGlzIHN0cnVjdHVyZQotICAgTkRJU184MDJfMTFfTUFDX0FERFJFU1MgICAgICAgICAgICAgTWFjQWRkcmVzczsgLy8gQlNTSUQKLSAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkWzJdOwotICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAg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2YgdGhpcyBzdHJ1Y3R1cmUKLSAgICBORElTXzgwMl8xMV9NQUNfQUREUkVTUyAgICAgICAgICAgICBNYWNBZGRyZXNzOyAgICAgICAgIC8vIEJTU0lECi0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWRbMl07Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZDsgICAgICAgICAgICAgICAvLyBTU0lECi0gICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJpdmFjeTsgICAgICAgICAgICAvLyBXRVAgZW5jcnlwdGlvbiByZXF1aXJlbWVudAotICAgIE5ESVNfODAyXzExX1JTU0kgICAgICAgICAgICAgICAgICAgIFJzc2k7ICAgICAgICAgICAgICAgLy8gcmVjZWl2ZSBzaWduYWwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0cmVuZ3RoIGluIGRCbQotICAgIE5ESVNfODAyXzExX05FVFdPUktfVFlQRSAgICAgICAgICAgIE5ldHdvcmtUeXBlSW5Vc2U7Ci0gICAgTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAgICAgICAgICAgQ29uZmlndXJhdGlvbjsKLSAgICBORElTXzgwMl8xMV9ORVRXT1JLX0lORlJBU1RSVUNUVVJFICBJbmZyYXN0cnVjdHVyZU1vZGU7Ci0gICAgTkRJU184MDJfMTFfUkFURVNfRVggICAgICAgICAgICAgICAgU3VwcG9ydGVkUmF0ZXM7Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSUVMZW5ndGg7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSUVzWzFdOwotfSBORElTX1dMQU5fQlNTSURfRVgsICpQTkRJU19XTEFOX0JTU0lEX0VYOwotCi10eXBlZGVmIHN0cnVjdCBQQUNLRUQgX05ESVNfODAyXzEx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dGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsI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CQkgICAgICAgICAgICAxNCAvLyBSWCBjb25maWd1cmUKLSNkZWZpbmUgQkJQX1IxNiAgICAgICAgICAgICAgICAgICAgIDE2Ci0jZGVmaW5lIEJCUF9SMTcgICAgICAgICAgICAgICAgICAgICAxNyAvLyBSWCBzZW5zaWJpbGl0eQotI2RlZmluZSBCQlBfUjE4ICAgICAgICAgICAgICAgICAgICAgMTgKLSNkZWZpbmUgQkJQX1IyMSAgICAgICAgICAgICAgICAgICAgIDIxCi0jZGVmaW5lIEJCUF9SMjIgICAgICAgICAgICAgICAgICAgICAyMgotI2RlZmluZSBCQlBfUjI0ICAgICAgICAgICAgICAgICAgICAgMjQKLSNkZWZpbmUgQkJQX1IyNSAgICAgICAgICAgICAgICAgICAgIDI1Ci0jZGVmaW5lIEJCUF9SNDkgICAgICAgICAgICAgICAgICAgICA0OSAvL1RTU0kKLSNkZWZpbmUgQkJQX1I1MCAgICAgICAgICAgICAgICAgICAgIDUwCi0jZGVmaW5lIEJCUF9SNTEgICAgICAgICAgICAgICAgICAgICA1MQotI2RlZmluZSBCQlBfUjUyICAgICAgICAgICAgICAgICAgICAgNTIKLSNkZWZpbmUgQkJQX1I1NSAgICAgICAgICAgICAgICAgICAgIDU1Ci0jZGVmaW5lIEJCUF9SNjIgICAgICAgICAgICAgICAgICAgICA2MiAvLyBSeCBTUTAgVGhyZXNob2xkIEhJR0gKLSNkZWZpbmUgQkJQX1I2MyAgICAgICAgICAgICAgICAgICAgIDYzCi0jZGVmaW5lIEJCUF9SNjQgICAgICAgICAgICAgICAgICAgICA2NAotI2RlZmluZSBCQlBfUjY1ICAgICAgICAgICAgICAgICAgICAgNjUKLSNkZWZpbmUgQkJQX1I2NiAgICAgICAgICAgICAgICAgICAgIDY2Ci0jZGVmaW5lIEJCUF9SNjcgICAgICAgICAgICAgICAgICAgICA2NwotI2RlZmluZSBCQlBfUjY4ICAgICAgICAgICAgICAgICAgICAgNjgKLSNkZWZpbmUgQkJQX1I2OSAgICAgICAgICAgICAgICAgICAgIDY5Ci0jZGVmaW5lIEJCUF9SNzAgICAgICAgICAgICAgICAgICAgICA3MCAvLyBSeCBBR0MgU1EgQ0NLIFhjb3JyIHRocmVzaG9sZAotI2RlZmluZSBCQlBfUjczICAgICAgICAgICAgICAgICAgICAgNzMKLSNkZWZpbmUgQkJQX1I3NQkJCQkJCTc1Ci0jZGVmaW5lIEJCUF9SNzcgICAgICAgICAgICAgICAgICAgICA3NwotI2RlZmluZSBCQlBfUjgxICAgICAgICAgICAgICAgICAgICAgODEKLSNkZWZpbmUgQkJQX1I4MiAgICAgICAgICAgICAgICAgICAgIDgyCi0jZGVmaW5lIEJCUF9SODMgICAgICAgICAgICAgICAgICAgICA4MwotI2RlZmluZSBCQlBfUjg0ICAgICAgICAgICAgICAgICAgICAgODQKLSNkZWZpbmUgQkJQX1I4NgkJCQkJCTg2Ci0jZGVmaW5lIEJCUF9SOTEJCQkJCQk5MQotI2RlZmluZSBCQlBfUjkyCQkJCQkJOTIKLSNkZWZpbmUgQkJQX1I5NCAgICAgICAgICAgICAgICAgICAgIDk0IC8vIFR4IEdhaW4gQ29udHJvbAotI2RlZmluZSBCQlBfUjEwMyAgICAgICAgICAgICAgICAgICAgMTAzCi0jZGVmaW5lIEJCUF9SMTA1ICAgICAgICAgICAgICAgICAgICAxMDUKLSNkZWZpbmUgQkJQX1IxMTMgICAgICAgICAgICAgICAgICAgIDExMwotI2RlZmluZSBCQlBfUjExNCAgICAgICAgICAgICAgICAgICAgMTE0Ci0jZGVmaW5lIEJCUF9SMTE1ICAgICAgICAgICAgICAgICAgICAxMTUKLSNkZWZpbmUgQkJQX1IxMTYgICAgICAgICAgICAgICAgICAgIDExNgotI2RlZmluZSBCQlBfUjExNyAgICAgICAgICAgICAgICAgICAgMTE3Ci0jZGVmaW5lIEJCUF9SMTE4ICAgICAgICAgICAgICAgICAgICAxMTgKLSNkZWZpbmUgQkJQX1IxMTkgICAgICAgICAgICAgICAgICAgIDExOQotI2RlZmluZSBCQlBfU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VQUk9NX0NDS19UWF9QV1JfT0ZGU0VUICAweDYyCi0vLyNkZWZpbmUgRUVQUk9NX0NBTElCUkFURV9PRkZTRVQJMHg3YwotI2RlZmluZSBFRVBST01fVkVSU0lPTl9PRkZTRVQgICAgICAgMHgwMgotI2RlZmluZQlFRVBST01fRlJFUV9PRkZTRVQJCQkweDNhCi0jZGVmaW5lIEVFUFJPTV9UWFBPV0VSX0JZUkFURSAJMHhkZQkvLyAyME1IWiBwb3dlci4KLSNkZWZpbmUgRUVQUk9NX1RYUE9XRVJfREVMVEEJCTB4NTAJLy8gMjBNSFogQU5EIDQwIE1IWiB1c2UgZGlmZmVyZW50IHBvd2VyLiBUaGlzIGlzIGRlbHRhIGluIDQwTUhaLgotI2RlZmluZSBWQUxJRF9FRVBST01fVkVSU0lPTiAgICAgICAgMQotCi0vLyBQYWlyS2V5TW9kZSBkZWZpbml0aW9uCi0jZGVmaW5lIFBLTU9ERV9OT05FICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIFBLTU9ERV9XRVA2NCAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIFBLTU9ERV9XRVAxMjggICAgICAgICAgICAgICAyCi0jZGVmaW5lIFBLTU9ERV9US0lQICAgICAgICAgICAgICAgICAzCi0jZGVmaW5lIFBLTU9ERV9BRVMgICAgICAgICAgICAgICAgICA0Ci0jZGVmaW5lIFBLTU9ERV9DS0lQNjQgICAgICAgICAgICAgICA1Ci0jZGVmaW5lIFBLTU9ERV9DS0lQMTI4ICAgICAgICAgICAgICA2Ci0jZGVmaW5lIFBLTU9ERV9US0lQX05PX01JQyAgICAgICAgICA3ICAgICAgIC8vIE1JQyBhcHBlbmRlZCBieSBkcml2ZXI6IG5vdCBhIHZhbGlkIHZhbHVlIGluIGhhcmR3YXJlIGtleSB0YWJsZQotCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIF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otICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgIC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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyo9PT09PT09PT09PT09PT09PT09PT09PUVuZCBvZiBSVDI4NjA9PT09PT09PT09PT09PT09PT09PT09PSovCi0KLQotLyo9PT09PT09PT09PT09PT09PT09PT09U3RhcnQgb2YgUlQyODcwPT09PT09PT09PT09PT09PT09PT09PSovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0jaWZkZWYgUlQyODcwCi1zdGF0aWMgSU5UCUFURUNtZEhhbmRsZXIoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCVVJTlQzMgkJCVZhbHVlOwotCVVDSEFSCQkJQmJwRGF0YTsKLQlVSU5UMzIgICAgICAgICAgTWFjRGF0YTsKLQlVSU5UCQkJaT0wLCBhdGVtb2RlOwotCS8vTkRJU19TVEFUVVMJCVN0YXR1cyA9IE5ESVNfU1RBVFVTX1NVQ0NFU1M7Ci0JLy9QVUNIQVIJCQlwRGVzdDsKLQlVSU5UMzIgCQkJdGVtcDsKLQlVTE9ORwkJCUlycUZsYWdzOwotCi0JQVRFREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiPT09PiBBVEVDbWRIYW5kbGVyKClcbiIpKTsKLQlBVEVBc2ljU3dpdGNoQ2hhbm5lbChwQWQpOwotCS8qIEFzaWNMb2NrQ2hhbm5lbCgpIGlzIGVtcHR5IGZ1bmN0aW9uIHNvIGZhciBpbiBm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B3YWl0IGJ1bGsgb3V0IGZpbmlzaAotCQl7Ci0JCQlkbwotCQkJewotCQkJCVJUVVNCQ2FuY2VsUGVuZGluZ0J1bGtPdXRJUlAocEFkKTsKLQkJCX0gd2hpbGUgKEZBTFNFKTsKLQotCQkJUlRNUHVzZWNEZWxheSg1MDAwMDApOwotCQl9Ci0KLS8vCQlBU1NFUlQoYXRvbWljX3JlYWQoJnBBZC0+UGVuZGluZ1J4KSA9PSAwKTsKLQkJQVNTRVJUKHBBZC0+UGVuZGluZ1J4ID09IDApOwotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLS8qICAgICAgUmVzZXQgUnggUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotLy8JCUludGVybG9ja2VkRXhjaGFuZ2UoJnBBZC0+UGVuZGluZ1J4LCAwKTsKLQkJcEFkLT5QZW5kaW5nUnggPSAwOwotCQlwQWQtPk5leHRSeEJ1bGtJblJlYWRJbmRleCA9IDA7CS8vIE5leHQgUnggUmVhZCBpbmRleAotCQlwQWQtPk5leHRSeEJ1bGtJbkluZGV4ID0gUlhfUklOR19TSVpFIC0gMTsJLy8gUnggQnVsayBwb2ludGVyCi0JCXBBZC0+TmV4dFJ4QnVsa0luUG9zaXRpb24gPSAwOwotCQlmb3IgKGkgPSAwOyBpIDwgKFJYX1JJTkdfU0laRSk7IGkrKykKLQkJewotCQkJUFJYX0NPTlRFWFQgIHBSeENvbnRleHQgPSAmKHBBZC0+UnhDb250ZXh0W2ldKTsKLQkJCU5kaXNaZXJvTWVtb3J5KHBSeENvbnRleHQtPlRyYW5zZmVyQnVmZmVyLCBNQVhfUlhCVUxLX1NJWkUpOwotCQkJLyogcGV0ZXIgOiB3aHkgZG9uJ3Qgd2UgaGF2ZSB0byBnZXQgQnVsa0luTG9jayBmaXJzdCA/ICovCi0JCQlwUnhDb250ZXh0LT5wQWQJPSBwQWQ7Ci0JCQlwUnhDb250ZXh0LT5wSXJwID0gTlVMTDsKLSAgICAgICAgICAgIC8qIHBldGVyIGRlYnVnICsrICovCi0JCQlwUnhDb250ZXh0LT5CdWxrSW5PZmZzZXQgPSAwOwotCQkJcFJ4Q29udGV4dC0+YlJ4SGFuZGxpbmcgPSBGQUxTRTsKLSAgICAgICAgICAgIC8qIHBldGVyIGRlYnVnIC0tICovCi0JCQlwUnhDb250ZXh0LT5JblVzZQkJPSBGQUxTRTsKLQkJCXBSeENvbnRleHQtPklSUFBlbmRpbmcJPSBGQUxTRTsKLQkJCXBSeENvbnRleHQtPlJlYWRhYmxlCT0gRkFMU0U7Ci0vLwkJCXBSeENvbnRleHQtPlJlb3JkZXJJblVzZSA9IEZBTFNFOwotLy8JCQlwUnhDb250ZXh0LT5SZWFkUG9zT2Zmc2V0ID0gMDsKLQkJfQotCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotLyogICAgICBSZXNldCBUeCBSSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0JCWRvCi0JCXsKLQkJCVJUVVNCQ2FuY2VsUGVuZGluZ0J1bGtPdXRJUlAocEFkKTsKLQkJfSB3aGlsZSAoRkFMU0UpOwotCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotCQkvLyBFbmFibGUgYXV0byByZXNwb25kZXIuCi0JCVJUTVBfSU9fUkVB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FJUX0RFQlVHX1RSQUNFLCAoIlNldF9BVEVfVFhfTEVOR1RIX1Byb2MgKFR4TGVuZ3RoID0gJWQpXG4iLCBwQWQtPmF0ZS5UeExlbmd0aCkpOwotCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlJhbGluazogU2V0X0FURV9UWF9MRU5HVEhfUHJvYyBTdWNjZXNzXG4iKSk7Ci0KLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBBVEUgVHggZnJhbWUgY291bnQKLQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9BVEVfVFhfQ09VTlRfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JcEFkLT5hdGUuVHhDb3VudCA9IHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCk7Ci0KLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfQVRFX1RYX0NPVU5UX1Byb2MgKFR4Q291bnQgPSAlZClcbiIsIHBBZC0+YXRlLlR4Q291bnQpKTsKLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSYWxpbms6IFNldF9BVEVfVFhfQ09VTlRfUHJvYyBTdWNjZXNzXG4iKSk7Ci0KLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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CR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIjw9PSBSVE1QU3RhdGlvblN0YXJ0XG4iKSk7Ci19Ci0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJU2V0dXAgRnJhbWUgZm9ybWF0LgotCU5PVEU6Ci0JCVRoaXMgcm91dGluZSBzaG91bGQgb25seSBiZSB1c2VkIGluIEFURSBtb2RlLgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLQotI2lmZGVmIFJUMjg3MAotLyo9PT09PT09PT09PT09PT09PT09PT09U3RhcnQgb2YgUlQyODcwPT09PT09PT09PT09PT09PT09PT09PSovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotc3RhdGljIElOVCBBVEVTZXRVcEZyYW1lKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIFVJTlQzMiBUeElkeCkKLXsKLQlVSU5UIGo7Ci0JUFRYX0NPTlRFWFQJcE51bGxDb250ZXh0OwotCVBVQ0hBUgkJCXBEZXN0OwotCUhUVFJBTlNNSVRfU0VUVElORwlUeEhUUGh5TW9kZTsKLQlQVFhXSV9TVFJVQwkJcFR4V0k7Ci0JUFRYSU5GT19TVFJVQwkJcFR4SW5mbzsKLQlVSU5UMzIJCQlUcmFuc2ZlckJ1ZmZlckxlbmd0aCwgT3JnQnVmZmVyTGVuZ3RoID0gMDsKLQlVQ0hBUgkJCXBhZExlbiA9IDA7Ci0jaWZkZWYgUkFMS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lvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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AgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlydF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lzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2luY2x1ZGUgInJ0X2NvbmZpZy5oIgotCi1VTE9ORwlSVERlYnVnTGV2ZWwgP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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgUHJvZ3JhbTogICAgcnRfbGludXguYyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgQ3JlYXRlZDogICAgNC8yMS8yMDA2IDE6MTc6MzggUE0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgQXV0aG9yOiAgICAgV3UgWGktS3VuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgQ29tbWVudHM6ICAgYGRlc2NyaXB0aW9uYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIEhpc3Rvcnk6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgIFJldmlzaW9uIDEuMSA0LzIxLzIwMDYgMToxNzozOCBQTSAgeHNpa3VuICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgIEluaXRpYWwgcmV2aXNpb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2luY2x1ZGUgInJ0bXBfdHlwZS5oIgotI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgotI2luY2x1ZGUgPGxpbnV4L3ZlcnNpb24uaD4KLSNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KLSNpbmNsdWRlIDxsaW51eC9rdGhyZWFkLmg+Ci0KLSNpbmNsdWRlIDxsaW51eC9zcGlubG9jay5oPgotI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4KLSNpbmNsdWRlIDxsaW51eC9zdHJpbmcuaD4KLSNpbmNsdWRlIDxsaW51eC90aW1lci5oPgotI2luY2x1ZGUgPGxpb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ICAgICAgICAgICAgXAotICAgIGlmICghKHgpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcHJpbnRrKEtFUk5fV0FSTklORyBfX0ZJTEVfXyAiOiVkIGFzc2VydCAiICN4ICJmYWlsZWRcbiIsIF9fTElORV9fKTsgICAgXAotICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLXR5cGVkZWYgc3RydWN0IG9zX2Nvb2tpZQkqIFBPU19DT09LSUU7Ci10eXBlZGVmIHN0cnVjdCBwY2lfZGV2IAkJKiBQUENJX0RFVjsKLXR5cGVkZWYgc3RydWN0IG5ldF9kZXZpY2UJKiBQTkVUX0RFVjsKLXR5cGVkZWYgdm9pZAkJCQkqIFBORElTX1BBQ0tFVDsKLXR5cGVkZWYgY2hhcgkJCQlORElTX1BBQ0tFVDsKLXR5cGVkZWYgUE5ESVNfUEFDS0VUCQkqIFBQTkRJU19QQUNLRVQ7Ci10eXBlZGVmCWRtYV9hZGRyX3QJCQlORElTX1BIWVNJQ0FMX0FERFJFU1M7Ci10eXBlZGVmCWRtYV9hZGRyX3QJCQkqIFBORElTX1BIWVNJQ0FMX0FERFJFU1M7Ci0vL3R5cGVkZWYgc3RydWN0IHRpbWVyX2xpc3QJUkFMSU5LX1RJTUVSX1NUUlVDVDsKLS8vdHlwZWRlZiBzdHJ1Y3QgdGltZXJfbGlzdAkqIFBSQUxJTktfVElNRVJfU1RSVUNUOwotLy90eXBlZGVmIHN0cnVjdCBvc19sb2NrCQlORElTX1NQSU5fTE9DSzsKLXR5cGVkZWYgc3BpbmxvY2tfdAkJCU5ESVNfU1BJTl9MT0NLOw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gIFwKLSAgICBpZiAoTGV2ZWwgPD0gUlREZWJ1Z0xldmVsKSAgICAgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcHJpbnRrIEZtdDsgICAgICAgICAgICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgREJHUFJJTlQoTGV2ZWwsIEZtdCkgICAgREJHUFJJTlRfUkFXKExldmVsLCBGbXQpCi0KLQotI2RlZmluZSBEQkdQUklOVF9FUlIoRm10KSAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHByaW50aygiRVJST1IhISEgIik7ICAgICAgICAgIFwKLSAgICBwcmludGsgRm10OyAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBEQkdQUklOVF9TKFN0YXR1cywgRm10KQkJXAotewkJCQkJCQkJCVwKLQlwcmludGsgRm10OwkJCQkJXAotfQotCi0KLSNlbHNlCi0jZGVmaW5lIERCR1BSSU5UKExldmVsLCBGbXQpCi0jZGVmaW5lIERCR1BSSU5UX1JBVyhMZXZlbCwgRm10KQotI2RlZmluZSBEQkdQUklOVF9TKFN0YXR1cywgRm10KQotI2RlZmluZSBEQkdQUklOVF9FUlIoRm10KQotI2VuZGlmCi0KLQotLy8KLS8vICBzcGluX2xvY2sgZW5oYW5jZWQgZm9yIE5lc3RlZCBzcGluIGxvY2sKLS8vCi0jZGVmaW5lIE5kaXNBbGxvY2F0ZVNwaW5Mb2NrKF9fbG9jaykgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHNwaW5fbG9ja19pbml0KChzcGlubG9ja190ICopKF9fbG9jaykpOyAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBOZGlzRnJlZVNwaW5Mb2NrKGxvY2spICAgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgIC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19XUklURTgoX0EsIF9SLCBfVikJCQkJCQkJCVwKLXsJCQkJCQkJCQkJCQkJCQkJXAotCVVTSE9SVAlfVmFsID0gX1Y7CQkJCQkJCQkJCQlcCi0JUlRVU0JTaW5nbGVXcml0ZShfQSwgX1IsIF9WYWwpOwkJCQkJCQkJXAotfQotCi0KLSNkZWZpbmUgUlRNUF9JT19XUklURTE2KF9BLCBfUiwgX1YpCQkJCQkJCQlcCi17CQkJCQkJCQkJCQkJCQkJCVwKLQlSVFVTQlNpbmdsZVdyaXRlKF9BLCBfUiwgX1YpOwkJCQkJCQkJXAotfQotI2VuZGlmIC8vIFJUMjg3MCAvLwotCi0jaWZuZGVmIHdhaXRfZXZlbnRfaW50ZXJydXB0aWJsZV90aW1lb3V0Ci0jZGVmaW5lIF9fd2FpdF9ldmVudF9pbnRlcnJ1cHRpYmxlX3RpbWVvdXQod3EsIGNvbmRpdGlvbiwgcmV0KSBcCi1kbyB7IFwKLSAgICAgICAgd2FpdF9xdWV1ZV90IF9fd2FpdDsgXAotICAgICAgICBpbml0X3dhaXRxdWV1ZV9lbnRyeSgmX193YWl0LCBjdXJyZW50KTsgXAotICAgICAgICBhZGRfd2FpdF9xdWV1ZSgmd3EsICZfX3dhaXQpOyBcCi0gICAgICAgIGZvciAoOzspIHsgXAotICAgICAgICAgICAgICAgIHNldF9jdXJyZW50X3N0YXRlKFRBU0tfSU5URVJSVVBUSUJMRSk7IFwKLSAgICAgICAgICAgICAgICBpZiAoY29uZGl0aW9uKSBcCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgXAotICAgICAgICAgICAgICAgIGlmICghc2lnbmFsX3BlbmRpbmcoY3VycmVudCkpIHsgXAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gc2NoZWR1bGVfdGltZW91dChyZXQpOyBcCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJldCkgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgXAotICAgICAgICAgIC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ZXQsIF9TdGF0dXMpICAgICAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIFJUTVBGcmVlTmRpc1BhY2tldChfcEFkLCBfcFBhY2tldCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLQotI2RlZmluZSBTV0lUQ0hfUGh5QUIoX3BBQSwgX3BCQikgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBVTE9ORwlBQUJhc2VQYUhpZ2g7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFVMT05HCUFBQmFzZVBhTG93OyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBVTE9ORwlCQkJhc2VQYUhpZ2g7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFVMT05HCUJCQmFzZVBhTG93OyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBCQkJhc2VQYUhpZ2ggPSBSVE1QX0dldFBoeXNpY2FsQWRkcmVzc0hpZ2goX3BCQik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBCQkJhc2VQYUxvdyA9IFJUTVBfR2V0UGh5c2ljYWxBZGRyZXNzTG93KF9wQkIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgQUFCYXNlUGFIaWdoID0gUlRNUF9HZXRQaHlzaWNhbEFkZHJlc3NIaWdoKF9wQUEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgQUFCYXNlUGFMb3cgPSBSVE1QX0dldFBoeXNpY2FsQWRkcmVzc0xvdyhfcEFBKTsgICAgICAgICAgICAg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YnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGU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sZCBrZWVwIGl0IGluIG91ciBzb3VyY2UgdHJlZT8/Ci0vKgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1Sb3V0aW5lIERlc2NyaXB0aW9uOgotICAgIEZpbmQgYW5kIGFzc2lnbiBhIGZyZWUgaW50ZXJmYWNlIG5hbWUgKHJheHgpLgotCi1Bcmd1bWVudHM6Ci0gICAgKm5hbWVfcAkJCQl0aGUgaW50ZXJmYWNlIG5hbWUgcG9pbnRlcgotCi1SZXR1cm4gVmFsdWU6Ci0JVFJVRQkJCQlPSwotCUZBTFNFCQkJCUZBSUwKLQotTm90ZToKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLXN0YXRpYyBCT09MRUFOIFJUMjhYWEF2YWlsUkFOYW1lQXNzaWduKAotCUlOIENIQVIJCQkqbmFtZV9wKQotewotICAgIENIQVIJCQkJc2xvdF9uYW1lW0lGTkFNU0laXTsKLSAgICBzdHJ1Y3QgbmV0X2RldmljZQkqZGV2aWNlOwotCVVJTlQzMgkJCQlpZl9pZDsKLQotCi0gICAgZm9yKGlmX2lkPTA7IGlmX2lkPDg7IGlmX2lkKyspCi0gICAgewotICAgICAgICBzcHJpbnRmKHNsb3RfbmFtZSwgInJhJWQiLCBpZl9pZCk7Ci0KLSAgICAgICAgZm9yKGRldmljZT1kZXZfYmFzZTsgZGV2aWNlIT1OVUxMOyBkZXZpY2U9ZGV2aWNlLT5uZXh0KQotICAgICAgICB7Ci0gICAgICAgICAgICBpZiAoc3RybmNtcChkZXZpY2UtPm5hbWUsIHNsb3RfbmFtZSwgNCkgPT0gMCkKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIGlmIChkZXZpY2UgPT0gTlVMTCkKLQkJCWJyZWFrOwotICAgIH0KLQotICAgIGlmIChpZl9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ICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLSNpbmNsdWRlICJydF9jb25maWcuaCIKLQotI2lmZGVmIERPVDExX05fU1VQUE9SVAotc3RhdGljIHZvaWQgSFRQYXJhbWV0ZXJzSG9vaygKLQlJTglQUlRNUF9BREFQVEVSIHBBZCwKLQlJTglDSEFSCQkgICpwVmFsdWVTdHIsCi0JSU4JQ0hBUgkJICAqcElucHV0KTsKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLQotI2RlZmluZSBFVEhfTUFDX0FERFJfU1RSX0xFTiAxNyAgLy8gaW4gZm9ybWF0IG9mIHh4Onh4Onh4Onh4Onh4Onh4Ci0KLS8vIFdlIGFzc3VtZSB0aGUgczEgaXMgYSBzdGluZywgczIgaXMgYSBtZW1vcnkgc3BhY2Ugd2l0aCA2IGJ5dGVzLiBhb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m4gY291bnQ7Ci19Ci0KLS8qCi0gICogY29udmVydHMgdGhlIEludGVybmV0IGhvc3QgYWRkcmVzcyBmcm9tIHRoZSBzdGFuZGFyZCBudW1iZXJzLWFuZC1kb3RzIG5vdGF0aW9uCi0gICogaW50byBiaW5hcnkgZGF0YS4KLSAgKiByZXR1cm5zIG5vbnplcm8gaWYgdGhlIGFkZHJlc3MgaXMgdmFsaWQsIHplcm8gaWYgbm90LgotICAqLwotaW50IHJ0aW5ldF9hdG9uKGNvbnN0IGNoYXIgKmNwLCB1bnNpZ25lZCBpbnQgKmFkZHIpCi17Ci0JdW5zaWduZWQgaW50IAl2YWw7Ci0JaW50ICAgICAgICAgCWJhc2UsIG47Ci0JY2hhciAgICAgICAgCWM7Ci0JdW5zaWduZWQgaW50ICAgIHBhcnRzWzRdOwotCXVuc2lnbmVkIGludCAgICAqcHAgPSBwYXJ0czsKLQotCWZvciAoOzspCi0gICAgewotICAgICAgICAgLyoKLSAgICAgICAgICAqIENvbGxlY3QgbnVtYmVyIHVwIHRvIGBgLicnLgotICAgICAgICAgICogVmFsdWVzIGFyZSBzcGVjaWZpZWQgYXMgZm9yIEM6Ci0gICAgICAgICAgKgkweD1oZXgsIDA9b2N0YWwsIG90aGVyPWRlY2ltYWwuCi0gICAgICAgICAgKi8KLSAgICAgICAgIHZhbCA9IDA7Ci0gICAgICAgICBiYXNlID0gMTA7Ci0gICAgICAgICBpZiAoKmNwID09ICcwJykKLSAgICAgICAgIHsKLSAgICAgICAgICAgICBpZiAoKisrY3AgPT0gJ3gnIHx8ICpjcCA9PSAnWCcpCi0gICAgICAgICAgICAgICAgIGJhc2UgPSAxNiwgY3ArKzsKLSAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgIGJhc2UgPSA4OwotICAgICAgICAgfQotICAgICAgICAgd2hpbGUgKChjID0gKmNwKSAhPSAnXDAnKQotICAgICAgICAgewotICAgICAgICAgICAgIGlmIChpc2RpZ2l0KCh1bnNpZ25lZCBjaGFyKSBjKSkKLSAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgIHZhbCA9ICh2YWwgKiBiYXNlKSArIChjIC0gJzAnKTsKLSAgICAgICAgICAgICAgICAgY3ArKzsKLSAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgfQotICAgICAgICAgICAgIGlmIChiYXNlID09IDE2ICYmIGlzeGRpZ2l0KCh1bnNpZ25lZCBjaGFyKSBjKSkKLSAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgIHZhbCA9ICh2YWwgPDwgNCkgKwotICAgICAgICAgICAgICAgICAgICAgKGMgKyAxMCAtIChpc2xvd2VyKCh1bnNpZ25lZCBjaGFyKSBjKSA/ICdhJyA6ICdBJykpOwotICAgICAgICAgICAgICAgICBjcCsrOwotICAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICB9Ci0gICAgICAgICBpZiAoKmNwID09ICcuJykKLSAgICAgICAgIHsKLSAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAqIEludGVybmV0IGZvcm1hdDogYS5iLmMuZCBhLmIuYyAgICh3aXRoIGMgdHJlYXRlZCBhcyAxNi1iaXRzKQotICAgICAgICAgICAgICAqIGEuYiAgICAgKHdpdGggYiB0cmVhdGVkIGFzIDI0IGJpdHMpCi0gICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgaWYgKHBwID49IHBhcnRzICsgMyB8fCB2YWwgPiAweGZmKQotICAgICAgICAgICAgICAgICByZXR1cm4gMDsKLSAgICAgICAgICAgICAqcHArKyA9IHZhbCwgY3ArKzsKLSAgICAgICAgIH0KLSAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICBicmVhazsKLSAgICAgfQotCi0gICAgIC8qCi0gICAgICAqIENoZWNrIGZvciB0cmFpbGluZyBqdW5rLgotICAgICAgKi8KLSAgICAgd2hpbGUgKCpjcCkKLSAgICAgICAgIGlmICghaXNzcGFjZSgodW5zaWduZWQgY2hhcikgKmNwKyspKQotICAgICAgICAgICAgIHJldHVybiAwOwotCi0gICAgIC8qCi0gICAgICAqIENvbmNvY3QgdGhlIGFkZHJlc3MgYWNjb3JkaW5nIHRvIHRoZSBudW1iZXIgb2YgcGFydHMgc3BlY2lmaWVkLgotICAgICAgKi8KLSAgICAgbiA9IHBwIC0gcGFydHMgKyAxOwotICAgICBzd2l0Y2ggKG4pCi0gICAgIHsKLQotICAgICAgICAgY2FzZSAxOiAgICAgICAgIC8qIGEgLS0gMzIgYml0cyAqLwotICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICBjYXNlIDI6ICAgICAgICAgLyogYS5iIC0tIDguMjQgYml0cyAqLwotICAgICAgICAgICAgIGlmICh2YWwgPiAweGZmZmZmZikKLSAgICAgICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgICAgICAgdmFsIHw9IHBhcnRzWzBdIDw8IDI0OwotICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICBjYXNlIDM6ICAgICAgICAgLyogYS5iLmMgLS0gOC44LjE2IGJpdHMgKi8KLSAgICAgICAgICAgICBpZiAodmFsID4gMHhmZmZmKQotICAgICAgICAgICAgICAgICByZXR1cm4gMDsKLSAgICAgICAgICAgICB2YWwgfD0gKHBhcnRzWzBdIDw8IDI0KSB8IChwYXJ0c1sxXSA8PCAxNik7Ci0gICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgIGNhc2UgNDogICAgICAgICAvKiBhLmIuYy5kIC0tIDguOC44LjggYml0cyAqLwotICAgICAgICAgICAgIGlmICh2YWwgPiAweGZmKQotICAgICAgICAgICAgICAgICByZXR1cm4gMDsKLSAgICAgICAgICAgICB2YWwgfD0gKHBhcnRzWzBdIDw8IDI0KSB8IChwYXJ0c1sxXSA8PCAxNikgfCAocGFydHNbMl0gPDwgOCk7Ci0gICAgICAgICAgICAgYnJlYWs7Ci0gICAgIH0KLQotICAgICAqYWRkciA9IGh0b25sKHZhbCk7Ci0gICAgIHJldHVybiAxOwotCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBGaW5kIGtleSBzZWN0aW9uIGZvciBHZXQga2V5IHBhcmFtZXRlci4KLQotICAgIEFyZ3VtZW50czoKLSAgICAgICAgYnVmZmVyICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIGJ1ZmZlciB0byBzdGFydCBmaW5kIHRoZSBrZXkgc2VjdGlvbgotICAgICAgICBzZWN0aW9uICAgICAgICAgICAgICAgICAgICAgdGhlIGtleSBvZiB0aGUgc2VjaW9uIHRvIGJlIGZpbmQKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgTlVMTCAgICAgICAgICAgICAgICAgICAgICAgIEZhaWwKLSAgICAgICAgT3RoZXJzICAgICAgICAgICAgICAgICAgICAgIFN1Y2Nlc3MKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1QVUNIQVIgIFJUTVBGaW5kU2VjdGlvbigKLSAgICBJTiAgUENIQVIgICBidWZmZXIpCi17Ci0gICAgQ0hBUiB0ZW1wX2J1ZlszMl07Ci0gICAgUFVDSEFSICBwdHI7Ci0KLSAgICBzdHJjcHkodGVtcF9idWYsICJEZWZhdWx0Iik7Ci0KLSAgICBpZigocHRyID0gcnRzdHJzdHIoYnVmZmVyLCB0ZW1wX2J1ZikpICE9IE5VTEwpCi0gICAgICAgICAgICByZXR1cm4gKHB0citzdHJsZW4oIlxuIikpOwotICAgICAgICBlbHNlCi0gICAgICAgICAgICByZXR1cm4gTlVMTDsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIFJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgICAgIEdldCBrZXkgcGFyYW1ldGVyLgotCi0gICAgQXJndW1lbnRzOgotICAgICAgICBrZXkgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBrZXkgc3RyaW5nCi0gICAgICAgIGRlc3QgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIGRlc3RpbmF0aW9uCi0gICAgICAgIGRlc3RzaXplICAgICAgICAgICAgICAgICAgICBUaGUgZGF0YXNpemUgb2YgdGhlIGRlc3RpbmF0aW9uCi0gICAgICAgIGJ1ZmZlciAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBidWZmZXIgdG8gc3RhcnQgZmluZCB0aGUga2V5Ci0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIFRSVUUgICAgICAgICAgICAgICAgICAgICAgICBTdWNjZXNzCi0gICAgICAgIEZBTFNFICAgICAgICAgICAgICAgICAgICAgICBGYWlsCi0KLSAgICBOb3RlOgotICAgICAgICBUaGlzIHJvdXRpbmUgZ2V0IHRoZSB2YWx1ZSB3aXRoIHRoZSBtYXRjaGVkIGtleSAoY2FzZSBjYXNlLXNlbnNpdGl2ZSkKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgUlRNUEdldEtleVBhcmFtZXRlcigKLSAgICBJTiAgUENIQVIgICBrZXksCi0gICAgT1VUIFBDSEFSICAgZGVzdCwKLSAgICBJTiAgSU5UICAgICBkZXN0c2l6ZSwKLSAgICBJTiAgUENIQVIgICBidWZmZXIpCi17Ci0gICAgVUNIQVIgKnRlbXBfYnVmMSA9IE5VTEw7Ci0gICAgVUNIQVIgKnRlbXBfYnVmMiA9IE5VTEw7Ci0gICAgQ0hBUiAqc3RhcnRfcHR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mltIHNwYWNlIG9yIHRhYgotICAgIHdoaWxlKCpwdHIgIT0gMHgwMCkKLSAgICB7Ci0gICAgICAgIGlmKCAoKnB0ciA9PSAnICcpIHx8ICgqcHRyID09ICdcdCcpICkKLSAgICAgICAgICAgIHB0cisrOwotICAgICAgICBlbHNlCi0gICAgICAgICAgIGJyZWFrOwotICAgIH0KLQotICAgIGxlbiA9IHN0cmxlbihwdHIpOwotICAgIG1lbXNldChkZXN0LCAweDAwLCBkZXN0c2l6ZSk7Ci0gICAgc3RybmNweShkZXN0LCBwdHIsIGxlbiA+PSBkZXN0c2l6ZSA/ICBkZXN0c2l6ZTogbGVuKTsKLQotCW9zX2ZyZWVfbWVtKE5VTEwsIHRlbXBfYnVmMSk7Ci0gICAgb3NfZnJlZV9tZW0oTlVMTCwgdGVtcF9idWYyKTsKLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIFJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgICAgIEdldCBrZXkgcGFyYW1ldGVyLgotCi0gICAgQXJndW1lbnRzOgotICAgICAgICBrZXkgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBrZXkgc3RyaW5nCi0gICAgICAgIGRlc3QgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIGRlc3RpbmF0aW9uCi0gICAgICAgIGRlc3RzaXplICAgICAgICAgICAgICAgICAgICBUaGUgZGF0YXNpemUgb2YgdGhlIGRlc3RpbmF0aW9uCi0gICAgICAgIGJ1ZmZlciAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBidWZmZXIgdG8gc3RhcnQgZmluZCB0aGUga2V5Ci0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIFRSVUUgICAgICAgICAgICAgICAgICAgICAgICBTdWNjZXNzCi0gICA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cF9idWYxKTsKLSAgICBvc19mcmVlX21lbShOVUxMLCB0ZW1wX2J1ZjIpOwotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgR2V0IG11bHRpcGxlIGtleSBwYXJhbWV0ZXIuCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIGtleSAgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIGtleSBzdHJpbmcKLSAgICAgICAgZGVzdCAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gZGVzdGluYXRpb24KLSAgICAgICAgZGVzdHNpemUgICAgICAgICAgICAgICAgICAgIFRoZSBkYXRhc2l6ZSBvZiB0aGUgZGVzdGluYXRpb24KLSAgICAgICAgYnVmZmVyICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIGJ1ZmZlciB0byBzdGFydCBmaW5kIHRoZSBrZXkKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgVFJVRSAgICAgICAgICAgICAgICAgICAgICAgIFN1Y2Nlc3MKLSAgICAgICAgRkFMU0UgICAgICAgICAgICAgICAgICAgICAgIEZhaWwKLQotICAgIE5vdGU6Ci0gICAgICAgIFRoaXMgcm91dGluZSBnZXQgdGhlIHZhbHVlIHdpdGggdGhlIG1hdGNoZWQga2V5IChjYXNlIGNhc2Utc2Vuc2l0aXZlKQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBSVE1QR2V0S2V5UGFyYW1ldGVyV2l0aE9mZnNldCgKLSAgICBJTiAgUENIQVIgICBrZXksCi0gICAgT1VUIFBDSEFSICAgZGVzdCwKLSAgICBPVVQJVVNIT1JUCSpl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gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgcnRtcC5oCi0KLSAgICBBYnN0cmFjdDoKLSAgICBNaW5pcG9ydCBnZW5lcmljIHBvcnRpb24gaGVhZGVyIGZpbGUKLQotICAgIFJldmlzaW9uIEhpc3Rvcnk6Ci0gICAgV2hvICAgICAgICAgV2hlbiAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gICAgUGF1bCBMaW4gICAgMjAwMi0wOC0wMSAgICBjcmVhdGVkCi0gICAgSmFtZXMgVGFuICAgMjAwMi0wOS0wNiAgICBtb2RpZmllZCAoUmV2aXNlIE5UQ1JlZ1RhYmxlKQotICAgIEpvaG4gQ2hhbmcgIDIwMDQtMDktMDYgICAgbW9kaWZpZWQgZm9yIFJUMjYwMAotKi8KLSNpZm5kZWYgX19SVE1QX0hfXwotI2RlZmluZSBfX1JUTVBfSF9fCi0KLSNpbmNsdWRl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9FTlRSWSwgKlBRVUVVRV9FTlRSWTsKLQotLy8gUXVldWUgc3RydWN0dXJlCi10eXBlZGVmIHN0cnVjdCAgX1FVRVVFX0hFQURFUiAgIHsKLQlQUVVFVUVfRU5UUlkgICAgSGVhZDsKLQlQUVVFVUVfRU5UUlkgICAgVGFpbDsKLQlVTE9ORyAgICAgICAgICAgTnVtYmVyOwotfSAgIFFVRVVFX0hFQURFUiwgKlBRVUVVRV9IRUFERVI7Ci0KLSNkZWZpbmUgSW5pdGlhbGl6ZVF1ZXVlSGVhZGVyKFF1ZXVlSGVhZGVyKSAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JKFF1ZXVlSGVhZGVyKS0+SGVhZCA9IChRdWV1ZUhlYWRlciktPlRhaWwgPSBOVUxMOyAgIFwKLQkoUXVldWVIZWFkZXIpLT5OdW1iZXIgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQotCi0jZGVmaW5lIFJlbW92ZUhlYWRRdWV1ZShRdWV1ZUhlYWRlcikgICAgICAgICAgICAgICAgXAotKFF1ZXVlSGVhZGVyKS0+SGVhZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JUFFVRVVFX0VOVFJZIHBOZXh0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCWlmICgoUXVldWVIZWFkZXIpLT5IZWFkICE9IE5VTEwpCQkJCVwKLQl7CQkJCQkJCQkJCQkJXAotCQlwTmV4dCA9IChRdWV1ZUhlYWRlciktPkhlYWQtPk5leHQ7ICAgICAgICAgIFwKLQkJKFF1ZXVlSGVhZGVyKS0+SGVhZCA9IHBOZXh0OyAgICAgICAgICAgICAgICBcCi0JCWlmIChwTmV4dCA9PSBOVUxMKSAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJKFF1ZXVlSGVhZGVyKS0+VGFpbCA9IE5VTEw7ICAgICAgICAgICAgIFwKLQkJKFF1ZXVlSGVhZGVyKS0+TnVtYmVyLS07ICAgICAgICAgICAgICAgICAgICBcCi0JfQkJCQkJCQkJCQkJCVwKLX0KLQotI2RlZmluZSBJbnNlcnRIZWFkUXVldWUoUXVldWVIZWFkZXIsIFF1ZXVlRW50cnkpICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkoKFBRVUVVRV9FTlRSWSlRdWV1ZUVudHJ5KS0+TmV4dCA9IChRdWV1ZUhlYWRlciktPkhlYWQ7IFwKLQkJKFF1ZXVlSGVhZGVyKS0+SGVhZCA9IChQUVVFVUVfRU5UUlkpKFF1ZXVlRW50cnkpOyAgICAgICBcCi0JCWlmICgoUXVldWVIZWFkZXIpLT5UYWlsID09IE5VTEwpICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJKFF1ZXVlSGVhZGVyKS0+VGFpbCA9IChQUVVFVUVfRU5UUlkpKFF1ZXVlRW50cnkpOyAgIFwKLQkJKFF1ZXVlSGVhZGVyKS0+TnVtYmVyKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgSW5zZXJ0VGFpbFF1ZXVlKFF1ZXVlSGVhZGVyLCBRdWV1ZUVudHJ5KSAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCSgoUFFVRVVFX0VOVFJZKVF1ZXVlRW50cnkpLT5OZXh0ID0gTlVMTDsgICAgICAgICAgICAgICAgICAgIFwKLQlpZiAoKFF1ZXVlSGVhZGVyKS0+VGFpbCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCShRdWV1ZUhlYWRlciktPlRhaWwtPk5leHQgPSAoUFFVRVV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BcCi0gICAgX1R4UmluZy0+Q2VsbFtfaWR4XS5wTmRpc1BhY2tldCA9IE5VTEw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIF9UeFJpbmctPkNlbGxbX2lkeF0ucE5leHROZGlzUGFja2V0ID0gTlVMTDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgVFhEVF9JTklUKF9UeEQpICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JTmRpc1plcm9NZW1vcnkoX1R4RCwgVFhEX1NJWkUpOwlcCi0JX1R4RC0+RE1BRE9ORSA9IDE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQotCi0vL1NldCBsYXN0IGRhdGEgc2VnbWVudAotI2RlZmluZSBSSU5HX1NFVF9MQVNURFMoX1R4RCwgX0lzU0QwKSAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGlmIChfSXNTRDApIHtfVHhELT5MYXN0U2VjMCA9IDE7fSAgICAgXAotICAgIGVsc2Uge19UeEQtPkxhc3RTZWMxID0gMTt9ICAgICBcCi19Ci0KLS8vIEluY3JlYXNlIFR4VHNjIHZhbHVlIGZvciBuZXh0IHRyYW5zbWlzc2lvbgotLy8gVE9ETzoKLS8vIFdoZW4gaT09NiwgbWVhbnMgVFNDIGhhcyBkb25lIG9uZSBmdWxsIGN5Y2xlLCBkbyByZS1rZXlpbmcgc3R1ZmYgZm9sbG93IHNwZWNzCi0vLyBTaG91bGQgc2VuZCBhIHNwZWNpYWwgZXZlbnQgbWljcm9zb2Z0IGRlZmluZWQgdG8gcmVxdWVzdCByZS1rZXkKLSNkZWZpbmUgSU5DX1RYX1RTQyhfdHNjKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgaW50IGk9MDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB3aGlsZSAoKytfdHNjW2ldID09IDB4MCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGkrKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgaWYgKGkgPT0gNikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2lmZGVmIERPVDExX05fU1VQUE9SVAotLy8gU3RhQWN0aXZlLlN1cHBvcnRlZEh0UGh5Lk1DU1NldCBpcyBjb3BpZWQgZnJvbSBBUCBiZWFjb24uICBEb24ndCBuZWVkIHRvIHVwZGF0ZSBoZXJlLgotI2RlZmluZSBDT1BZX0hUU0VUVElOR1NfRlJPTV9NTE1FX0FVWF9UT19BQ1RJVkVfQ0ZHKF9wQWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlfcEFkLT5TdGFBY3RpdmUuU3VwcG9ydGVkSHRQaHkuQ2hhbm5lbFdpZHRoID0gX3BBZC0+TWxtZUF1eC5IdENhcGFiaWxpdHkuSHRDYXBJbmZvLkNoYW5uZWxXaWR0aDsgICAgICBcCi0JX3BBZC0+U3RhQWN0aXZlLlN1cHBvcnRlZEh0UGh5Lk1pbW9QcyA9IF9wQWQtPk1sbWVBdXguSHRDYXBhYmlsaXR5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kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTogICAgIGtoeiA9IDI0MTIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjogICAgIGtoeiA9IDI0MTcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMzogICAgIGtoeiA9IDI0MjIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNDogICAgIGtoeiA9IDI0MjcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTogICAgIGtoeiA9IDI0MzIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNjogICAgIGtoeiA9IDI0MzcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNzogICAgIGtoeiA9IDI0NDIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgODogICAgIGtoeiA9IDI0NDcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgOTogICAgIGtoeiA9IDI0NTIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTA6ICAgIGtoeiA9IDI0NTcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTE6ICAgIGtoeiA9IDI0NjIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTI6ICAgIGtoeiA9IDI0NjcwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6ICAgIGtoeiA9IDI0NzIwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTQ6ICAgIGtoeiA9IDI0ODQwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMzY6ICAvKiBVTklJICovICBraHogPSA1MTgwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQwOiAgLyogVU5JSSAqLyAga2h6ID0gNTIwMDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA0NDogIC8qIFVOSUkgKi8gIGtoeiA9IDUyMjAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNDg6ICAvKiBVTklJICovICBraHogPSA1MjQwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyOiAgLyogVU5JSSAqLyAga2h6ID0gNTI2MDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjogIC8qIFVOSUkgKi8gIGtoeiA9IDUyODAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNjA6ICAvKiBVTklJICovICBraHogPSA1MzAwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDY0OiAgLyogVU5JSSAqLyAga2h6ID0gNTMyMDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxNDk6IC8qIFVOSUkgKi8gIGtoeiA9IDU3NDUwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTUzOiAvKiBVTklJICovICBraHogPSA1NzY1MDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE1NzogLyogVU5JSSAqLyAga2h6ID0gNTc4NTAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxNjE6IC8qIFVOSUkgKi8gIGtoeiA9IDU4MDUwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTY1OiAvKiBVTklJICovICBraHogPSA1ODI1MDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEwMDogLyogSGlwZXJMQU4yICovICBraHogPSA1NTAwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEwNDogLyogSGlwZXJMQU4yICovICBraHogPSA1NTIwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEwODogLyogSGlwZXJMQU4yICovICBraHogPSA1NTQwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDExMjogLyogSGlwZXJMQU4yICovICBraHogPSA1NTYwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDExNjogLyogSGlwZXJMQU4yICovICBraHogPSA1NTgwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEyMDogLyogSGlwZXJMQU4yICovICBraHogPSA1NjAwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEyNDogLyogSGlwZXJMQU4yICovICBraHogPSA1NjIwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEyODogLyogSGlwZXJMQU4yICovICBraHogPSA1NjQwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEzMjogLyogSGlwZXJMQU4yICovICBraHogPSA1NjYwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDEzNjogLyogSGlwZXJMQU4yICovICBraHogPSA1NjgwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE0MDogLyogSGlwZXJMQU4yICovICBraHogPSA1NzAwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDM0OiAgLyogSmFwYW4gTU1BQyAqLyAgIGtoeiA9IDUxNzAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDM4OiAgLyogSmFwYW4gTU1BQyAqLyAgIGtoeiA9IDUxOTAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQyOiAgLyogSmFwYW4gTU1BQyAqLyAgIGtoeiA9IDUyMTAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ2OiAgLyogSmFwYW4gTU1BQyAqLyAgIGtoeiA9IDUyMzAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE4NDogLyogSmFwYW4gKi8gICBraHogPSA0OTIwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxODg6IC8qIEphcGFuICovICAga2h6ID0gNDk0MDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTkyOiAvKiBKYXBhbiAqLyAgIGtoeiA9IDQ5NjAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE5NjogLyogSmFwYW4gKi8gICBraHogPSA0OTgwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAyMDg6IC8qIEphcGFuLCBtZWFucyBKMDggKi8gICBraHogPSA1MDQwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAyMTI6IC8qIEphcGFuLCBtZWFucyBKMTIgKi8gICBraHogPSA1MDYwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAyMTY6IC8qIEphcGFuLCBtZWFucyBKMTYgKi8gICBraHogPSA1MDgwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogICAga2h6ID0gMjQxMjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIH0KLQotI2RlZmluZSAgICAgTUFQX0tIWl9UT19DSEFOTkVMX0lEKGtoeiwgY2gpICB7ICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIHN3aXRjaCAoa2h6KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MTIwMDA6ICAgIGNoID0gMTsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MTcwMDA6ICAgIGNoID0gMjsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MjIwMDA6ICAgIGNoID0gMzsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MjcwMDA6ICAgIGNoID0gNDsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MzIwMDA6ICAgIGNoID0gNTsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0MzcwMDA6ICAgIGNoID0gNjsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NDIwMDA6ICAgIGNoID0gNzsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NDcwMDA6ICAgIGNoID0gODsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NTIwMDA6ICAgIGNoID0gOTsgICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NTcwMDA6ICAgIGNoID0gMTA7ICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NjIwMDA6ICAgIGNoID0gMTE7ICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NjcwMDA6ICAgIGNoID0gMTI7ICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0NzIwMDA6ICAgIGNoID0gMTM7ICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDI0ODQwMDA6ICAgIGNoID0gMTQ7ICAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUxODAwMDA6ICAgIGNoID0gMzY7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjAwMDAwOiAgICBjaCA9IDQwOyAgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTIyMDAwMDogICAgY2ggPSA0NDsgIC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyNDAwMDA6ICAgIGNoID0gNDg7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjYwMDAwOiAgICBjaCA9IDUyOyAgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTI4MDAwMDogICAgY2ggPSA1NjsgIC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUzMDAwMDA6ICAgIGNoID0gNjA7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MzIwMDAwOiAgICBjaCA9IDY0OyAgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTc0NTAwMDogICAgY2ggPSAxNDk7IC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU3NjUwMDA6ICAgIGNoID0gMTUzOyAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1Nzg1MDAwOiAgICBjaCA9IDE1NzsgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTgwNTAwMDogICAgY2ggPSAxNjE7IC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU4MjUwMDA6ICAgIGNoID0gMTY1OyAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NTAwMDAwOiAgICBjaCA9IDEwMDsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NTIwMDAwOiAgICBjaCA9IDEwNDsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NTQwMDAwOiAgICBjaCA9IDEwODsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NTYwMDAwOiAgICBjaCA9IDExMjsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NTgwMDAwOiAgICBjaCA9IDExNjsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjAwMDAwOiAgICBjaCA9IDEyMDsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjIwMDAwOiAgICBjaCA9IDEyNDsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjQwMDAwOiAgICBjaCA9IDEyODsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjYwMDAwOiAgICBjaCA9IDEzMjsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NjgwMDAwOiAgICBjaCA9IDEzNjsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NzAwMDAwOiAgICBjaCA9IDE0MDsgLyogSGlwZXJMQU4yICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MTcwMDAwOiAgICBjaCA9IDM0OyAgLyogSmFwYW4gTU1BQyAqLyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MTkwMDAwOiAgICBjaCA9IDM4OyAgLyogSmFwYW4gTU1BQyAqLyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjEwMDAwOiAgICBjaCA9IDQyOyAgLyogSmFwYW4gTU1BQyAqLyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjMwMDAwOiAgICBjaCA9IDQ2OyAgLyogSmFwYW4gTU1BQyAqLyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA0OTIwMDAwOiAgICBjaCA9IDE4N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ElQWCBvciBBUFBMRVRBTEssIHByZXNlcnZlIHRoZSBMTEMvU05BUCBmaWVsZAotLy8gZWxzZSByZW1vdmUgdGhlIExMQy9TTkFQIGZpZWxkIGZyb20gdGhlIHJlc3VsdCBFdGhlcm5ldCBmcmFtZQotLy8gUGF0Y2ggZm9yIFdIUUwgb25seSwgd2hpY2ggZGlkIG5vdCB0dXJuIG9uIE5ldGJpb3MgYnV0IHVzZSBJUFggd2l0aGluIGl0cyBwYXlsb2FkCi0vLyBOb3RlOgotLy8gICAgIF9wRGF0YSAmIF9EYXRhU2l6ZSBtYXkgYmUgYWx0ZXJlZCAocmVtb3ZlIDgtYnl0ZSBMTEMvU05BUCkgYnkgdGhpcyBNQUNSTwotLy8gICAgIF9wUmVtb3ZlZExMQ1NOQVA6IHBvaW50ZXIgdG8gcmVtb3ZlZCBMTEMvU05BUDsgTlVMTCBpcyBub3QgcmVtb3ZlZAotI2RlZmluZSBDT05WRVJUX1RPXzgwMl8zKF9wODAyM2hkciwgX3BEQSwgX3BTQSwgX3BEYXRhLCBfRGF0YVNpemUsIF9wUmVtb3ZlZExMQ1NOQVApICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGNoYXIgTExDX0xlblsyXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIF9wUmVtb3ZlZExMQ1NOQVAgPSBOVUxMOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGlmIChOZGlzRXF1YWxNZW1vcnkoU05BUF84MDJfMUgsIF9wRGF0YSwgNikgIHx8ICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBOZGlzRXF1YWxNZW1vcnkoU05BUF9CUklER0VfVFVOTkVMLCBfcERhdGEsIDYpKSAgICAgICAgICAgICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBQVUNIQVIgcFByb3RvID0gX3BEYXRhICsgNjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBpZiAoKE5kaXNFcXVhbE1lbW9yeShJUFgsIHBQcm90bywgMikgfHwgTmRpc0VxdWFsTWVtb3J5KEFQUExFX1RBTEssIHBQcm90bywgMikpICYmICBcCi0gICAgICAgICAgICBOZGlzRXF1YWxNZW1vcnkoU05BUF84MDJfMUgsIF9wRGF0YSwgNikpICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBMTENfTGVuWzBdID0gKFVDSEFSKShfRGF0YVNpemUgLyAyNTYpOyAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBMTENfTGVuWzFdID0gKFVDSEFSKShfRGF0YVNpemUgJSAyNTYpOyAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBNQUtFXzgwMl8zX0hFQURFUihfcDgwMjNoZHIsIF9wREEsIF9wU0EsIExMQ19MZW4pOyAgICAgICAgICBcCi0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBNQUtFXzgwMl8zX0hFQURFUihfcDgwMjNoZHIsIF9wREEsIF9wU0EsIHBQcm90byk7ICAgICAgICAgICBcCi0gICAgICAgICAgICBfcFJlbW92ZWRMTENTTkFQID0gX3BEYXRhOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBfRGF0YVNpemUgLT0gTEVOR1RIXzgwMl8xX0g7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICBfcERhdGEgKz0gTEVOR1RIXzgwMl8xX0g7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIExMQ19MZW5bMF0gPSAoVUNIQVIpKF9EYXRhU2l6ZSAvIDI1Nik7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIExMQ19MZW5bMV0gPSAoVUNIQVIpKF9EYXRhU2l6ZSAlIDI1Nik7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIE1BS0VfODAyXzNfSEVBREVSKF9wODAyM2hkciwgX3BEQSwgX3BTQSwgTExDX0xlbik7ICAgICAgICAgICAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgU1dJVENIX0FCKCBfcEFBLCBfcEJCKSAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFBWT0lEIHBDQzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIHBDQyA9IF9wQkI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBfcEJCID0gX3BBQTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIF9wQUEgPSBwQ0M7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotLy8gRW5xdWV1ZSB0aGlzIGZyYW1lIHRvIE1MTUUgZW5naW5lCi0vLyBXZSBuZWVkIHRvIGVucXVldWUgdGhlIHdob2xlIGZyYW1lIGJlY2F1c2UgTUxNRSBuZWVkIHRvIHBhc3MgZGF0YSB0eXBlCi0vLyBpbmZvcm1hdGlvbiBmcm9tIDgwMi4xMSBoZWFkZXIKLSNpZmRlZiBSVDI4NzAKLSNkZWZpbmUgUkVQT1JUX01HTVRfRlJBTUVfVE9fTUxNRShfcEFkLCBXY2lkLCBfcEZyYW1lLCBfRnJhbWVTaXplLCBfUnNzaTAsIF9Sc3NpMSwgX1Jzc2kyLCBfUGxjcFNpZ25hbCkgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgVUlOVDMyIEhpZ2gzMlRTRj0wLCBMb3czMlRTRj0wOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgTWxtZUVucXVldWVGb3JSZW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lEMzMsIC4uLiBhbmQgc28gb24KLQlVQ0hBUgkJCQkJCQkJVGltQml0bWFwc1tXTEFOX01BWF9OVU1fT0ZfVElNXTsKLQotICAgIC8vIFdQQQotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNS1szMl07Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE1LWzMyXTsKLQlVQ0hBUgkJCQkJCQkJR1RLWzMyXTsKLSAgICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJRUVFODAyMVg7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJlQXV0aDsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTm9uY2VbMzJdOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvcnRTZWN1cmVkOwotICAgIE5ESVNfODAyXzExX1BSSVZBQ1lfRklMVEVSICAgICAgICAgIFByaXZhY3lGaWx0ZXI7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkFOQ2xhc3MzRGF0YTsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJc29sYXRlSW50ZXJTdGFUcmFmZmljOwotCi0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUlNOSUVfTGVuWzJdOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJTTl9JRVsyXVtNQVhfTEVOX09GX1JTTklFXTsKLQotCi0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgCQkJVGltSUVMb2NhdGlvbkluQmVhY29uOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgIAkJCUNhcGFiaWxpdHlJbmZvTG9jYXRpb25JbkJlYWNvbjsKLSAgICAvLyBvdXRnb2luZyBCRUFDT04gZnJhbWUgYnVmZmVyIGFuZ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Ci0KLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBDZmdTc2lkTGVuOwotCUNIQVIgICAgICAgICAgICAgICAgICAgIENmZ1NzaWRbTUFYX0xFTl9PRl9TU0lEXTsKLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBDZmdBcENsaUJzc2lkW0VUSF9MRU5HVEhfT0ZfQUREUkVTU107Ci0JVUNIQVIgICAgICAgICAgICAgICAgICAgQ3VycmVudEFkZHJlc3NbRVRIX0xFTkdUSF9PRl9BRERSRVNTXTsKLQotCVVMT05HICAgICAgICAgICAgICAgICAgIEFwQ2xpUmN2QmVhY29uVGltZTsKLQotCVVMT05HICAgICAgICAgICAgICAgICAgIEN0cmxDdXJyU3RhdGU7Ci0JVUxPTkcgICAgICAgICAgICAgICAgICAgU3luY0N1cnJTdGF0ZTsKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBBdXRoQ3VyclN0YXRlOwotCVVMT05HICAgICAgICAgICAgICAgICAgIEFzc29jQ3VyclN0YXRlOwotCVVMT05HCQkJCQlXcGFQc2tDdXJyU3RhdGU7Ci0KLQlVU0hPUlQgICAgICAgICAgICAgICAgICBBdXRoUmVxQ250OwotCVVTSE9SVCAgICAgICAgICAgICAgICAgIEFzc29jUmVxQ250OwotCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgQ2xpZW50U3RhdHVzRmxhZ3M7Ci0JVUNIQVIgICAgICAgICAgICAgICAgICAgTXBkdURlbnNpdHk7Ci0KLQlORElTXzgwMl8xMV9BVVRIRU5USUNBVElPTl9NT0RFICAgICBBdXRoTW9kZTsgICAvLyBUaGlzIHNob3VsZCBtYXRjaCB0byB3aGF0ZXZlciBtaWNyb3NvZnQgZGVmaW5lZAotCU5ESVNfODAyXzExX1dFUF9TVEFUVVMgICAgICAgICAgICAgIFdlcFN0YXR1czsKLQotCS8vIEFkZCB0byBzdXBwb3J0IGRpZmZlcmVudCBjaXBoZXIgc3VpdGUgZm9yIFdQQTIvV1BBIG1vZGUKLQlORElT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0aXZlIHRvIE9TCi0JUE5FVF9ERVYJCQkJbmV0X2RldjsKLQlVTE9ORwkJCQkJVmlydHVhbElmQ250OwotCi0KLQotCU5ESVNfU1BJTl9MT0NLICAgICAgICAgIGlycV9sb2NrOwotCVVDSEFSICAgICAgICAgICAgICAgICAgIGlycV9kaXNhYmxlZDsKLQotI2lmZGVmIFJUMjg3MAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICBVU0IgcmVsYXRlZCBwYXJhbWV0ZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCXN0cnVjdCB1c2JfY29uZmlnX2Rlc2NyaXB0b3IJCSpjb25maWc7Ci0JVUlOVAkJCQkJCQkJQnVsa0luRXBBZGRyOwkJLy8gYnVsay1pbiBlbmRwb2ludCBhZGRyZXNzCi0JVUlOVAkJCQkJCQkJQnVsa091dEVwQWRkcls2XTsJLy8gYnVsay1vdXQgZW5kcG9pbnQgYWRkcmVzcwotCi0JVUlOVAkJCQkJCQkJTnVtYmVyT2ZQaXBlczsKLQlVU0hPUlQJCQkJCQkJCUJ1bGtPdXRNYXhQYWNrZXRTaXplOwotCVVTSE9SVAkJCQkJCQkJQnVsa0luTWF4UGFja2V0U2l6ZTsKLQotCS8vPT09PT09Q29udHJvbCBGbGFncwotCUxPTkcgICAgICAgICAgICAgICAgICAgIAlQZW5kaW5nSW9Db3VudDsKLQlVTE9ORwkJCQkJCUJ1bGtGbGFnczsKLQlCT09MRUFOICAgICAgICAgICAgICAgICAgICAgYlVzYlR4QnVsa0FnZ3JlOwkvLyBGbGFncyBmb3IgYnVsayBvdXQgZGF0YSB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JLy8gQVRFIFR4L1J4IGdlbmVyaWMgc3BpbmxvY2sKLSNlbmRpZiAvLyBSQUxJTktfQVRFIC8vCi0KLSNlbmRpZiAvLyBSVDI4NzAgLy8KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogICAgICBCb3RoIFBDSS9VU0IgcmVsYXRlZCBwYXJhbWV0ZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgVHggcmVsYXRlZCBwYXJhbWV0ZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCUJPT0xFQU4gICAgICAgICAgICAgICAgIERlUXVldWVSdW5uaW5nW05VTV9PRl9UWF9SSU5HXTsgIC8vIGZvciBlbnN1cmluZyBSVFVTQkRlUXVldWVQYWNrZXQgZ2V0IGNhbGwgb25jZQotCU5ESVNfU1BJTl9MT0NLICAgICAgICAgIERlUXVldWVMb2NrW05VTV9PRl9UWF9SSU5HXTsKLQotI2lmZGVmIFJUMjg3MAotCS8vIERhdGEgcmVsYXRlZCBjb250ZXh0IGFuZCBBQyBzcGVjaWZpZWQsIDQgQUMgc3VwcG9ydGVkCi0JTkRJU19TUElOX0xPQ0sJCQlCdWxrT3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lc2NyaXB0b3JzCi0JUlRNUF9NR01UX1JJTkcgICAgICAgICAgTWdtdFJpbmc7Ci0JTkRJU19TUElOX0xPQ0sgICAgICAgICAgTWdtdFJpbmdMb2NrOyAgICAgICAgICAgICAgIAkvLyBQcmlvIFJpbmcgc3BpbmxvY2sKLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgIFJ4IHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi0jaWZkZWYgUlQyODcwCi0JUlhfQ09OVEVYVAkJCQlSeENvbnRleHRbUlhfUklOR19TSVpFXTsgIC8vIDEgZm9yIHJlZHVuZGFudCBtdWx0aXBsZSBJUlAgYnVsayBpbi4KLQlORElTX1NQSU5fTE9DSwkJCUJ1bGtJbkxvY2s7CQkJCS8vIEJ1bGtJbiBzcGlubG9jayBmb3IgNCBBQ3MKLQlVQ0hBUgkJCQkJUGVuZGluZ1J4OwkJCQkvLyBUaGUgTWF4aW1hIHBlbmRpbmcgUnggdmFsdWUgc2hvdWxkIGJlIAlSWF9SSU5HX1NJWkUuCi0JVUNIQVIJCQkJCU5leHRSeEJ1bGtJbkluZGV4OwkJLy8gSW5kaWNhdGUgdGhlIGN1cnJlbnQgUnhDb250ZXh0IEluZGV4IHdoaWNoIGhvbGQgYnkgSG9zdCBjb250cm9sbGVyLgotCVVDSEFSCQkJCQlOZXh0UnhCdWxrSW5SZWFkSW5kZXg7CS8vIEluZGljYXRlIHRoZSBjdXJyZW50IFJ4Q29udGV4dCBJbmRleCB3aGljaCBkcml2ZXIgY2FuIHJlYWQgJiBwcm9jZXNzIGl0LgotCVVMT05HCQkJCQlOZXh0UnhCdWxrSW5Qb3NpdGlvbjsgICAvLyBXYW50IHRvIGNvbnRhdGVuYXRlIDIgVVJCIGJ1ZmZlciB3aGlsZSAxc3QgaXMgYnVsa2luIGZhaWxlZCBVUkIuIFRoaXMgUG9zaXRpb24gaXMgMXN0IFVSQiBUcmFuc2Zlckxlbmd0aC4KLQlVTE9ORwkJCQkJVHJhbnNmZXJCdWZmZXJMZW5ndGg7CS8vIGN1cnJlbnQgbGVuZ3RoIG9mIHRoZSBwYWNrZXQgYnVmZmVyCi0JVUxPTkcJCQkJCVJlYWRQb3NpdGlvbjsJCQkvLyBjdXJyZW50IHJlYWQgcG9zaXRpb24gaW4gYSBwYWNrZXQgYnVmZmVyCi0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICBBU0lDIHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCVVJTlQzMiAgICAgICAgICAgICAgIAlNQUNWZXJzaW9uOyAgICAgIAkvLyBNQUMgdmVyc2lvbi4gUmVjb3JkIHJ0Mjg2MEMoMHgyODYwMDEwMCkgb3IgcnQyODYwRCAoMHgyODYwMDEwMSkuLgotCi0JLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JLy8gRTJQUk9NCi0JLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgRWVwcm9tVmVyc2lvbjsgICAgIC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0JVVNIT1JUCQkJCUxlZDI7CS8vIEVFUFJPTSAweDNlCi0JVVNIT1JUCQkJCUxlZDM7CS8vIEVFUFJPTSAweDQwCi0JVUNIQVIJCQkJTGVkSW5kaWNhdG9yU3RyZWd0aDsKLQlVQ0hBUgkJCQlSc3NpU2luZ2Fsc3RyZW5ndGhPZmZldDsKLSAgICBCT09MRUFOCQkJCWJMZWRPblNjYW5uaW5nOwotCVVDSEFSCQkJCUxlZFN0YXR1czsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICA4MDIuMTEgcmVsYXRlZCBwYXJhbWV0ZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8vIG91dGdvaW5nIEJFQUNPTiBmcmFtZSBidWZmZXIgYW5kIGNvcnJlc3BvbmRpbmcgVFhECi0JVFhXSV9TVFJVQyAgICAgICAgICAgICAgCUJlYWNvblR4V0k7Ci0JUFVDSEFSCQkJCQkJQmVhY29uQnVmOwotCVVTSE9SVAkJCQkJCUJlYWNvbk9mZnNldFtIV19CRUFDT05fTUFYX0NPVU5UXTsKLQotCS8vIHByZS1idWlsZCBQUy1QT0xMIGFuZCBOVUxMIGZyYW1lIHVwb24gbGluayB1cC4gZm9yIGVmZmljaWVuY3kgcHVycG9zZS4KLQlQU1BPTExfRlJBTUUgICAgICAgICAgICAJUHNQb2xsRnJhbWU7Ci0JSEVBREVSXzgwMl8xMSAgICAgICAgICAgCU51bGxGcmFtZTsKLQotI2lmZGVmIFJUMjg3MAotCVRYX0NPTlRFWFQJCQkJQmVhY29uQ29udGV4dFtCRUFDT05fUklOR19TSVpFXTsKLQl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yBGcmFtZSBzdG9yYWdlIGZvciBmcmFnbWVudCBmcmFtZQotCi0JLy8gdmFyaW91cyBDb3VudGVycwotCUNPVU5URVJfODAyXzMgICAgICAgICAgIENvdW50ZXJzODAyMzsgICAgICAgICAgICAgICAvLyA4MDIuMyBjb3VudGVycwotCUNPVU5URVJfODAyXzExICAgICAgICAgIFdsYW5Db3VudGVyczsgICAgICAgICAgICAgICAvLyA4MDIuMTEgTUlCIGNvdW50ZXJzCi0JQ09VTlRFUl9SQUxJTksgICAgICAgICAgUmFsaW5rQ291bnRlcnM7ICAgICAgICAgICAgIC8vIFJhbGluayBwcm9wcmlldHkgY291bnRlcnMKLQlDT1VOVEVSX0RSUyAgICAgICAgICAgICBEcnNDb3VudGVyczsgICAgICAgICAgICAgICAgLy8gY291bnRlcnMgZm9yIER5bmFtaWMgVFggUmF0ZSBTd2l0Y2hpbmcKLQlQUklWQVRFX1NUUlVDICAgICAgICAgICBQcml2YXRlSW5mbzsgICAgICAgICAgICAgICAgLy8gUHJpdmF0ZSBpbmZvcm1hdGlvbiAmIGNvdW50ZXJzCi0KLQkvLyBmbGFncywgc2VlIGZSVE1QX0FEQVBURVJfeHh4IGZsYWdzCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgRmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgIC8vIFJlcHJlc2VudCBjdXJyZW50IGRldmljZSBzdGF0dXMKLQotCS8vIGN1cnJlbnQgVFggc2VxdWVuY2UgIwotCVVTSE9SVCAgICAgICAgICAgICAgICAgIFNlcXVlbmNlOwotCi0JLy8gQ29udHJvbCBkaXNjb25uZWN0IC8gY29ubmVjdCBldmVudCBnZW5lcmF0aW9uCi0JLy8rKytEaWRuJ3QgdXNlZCBhbnltb3JlCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgTGlua0Rvd25UaW1lOwotCS8vLS0tCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgTGFzdFJ4UmF0ZTsKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBMYXN0VHhSYXRlOwotCS8vKysrVXNlZCBvbmx5IGZvciBTdGF0aW9uCi0JQk9PTEVBTiAgICAgICAgICAgICAgICAgYkNvbmZpZ0NoYW5nZWQ7ICAgICAgICAgLy8gQ29uZmlnIENoYW5nZSBmbGFnIGZvciB0aGUgc2FtZSBTU0lEIHNldHRpbmcKLQkvLy0tLQotCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgRXh0cmFJbmZvOyAgICAgICAgICAgICAgLy8gRXh0cmEgaW5mb3JtYXRpb24gZm9yIGRpc3BsYXlpbmcgc3RhdHVzCi0JVUxPTkcgICAgICAgICAgICAgICAgICAgU3lzdGVtRXJyb3JCaXRtYXA7ICAgICAgLy8gYjA6IEUyUFJPTSB2ZXJzaW9uIGVycm9yCi0KLQkvLysrK0RpZG4ndCB1c2VkIGFueW1vcmUKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBNYWNJY1ZlcnNpb247ICAgICAgICAgICAvLyBNQUMvQkJQIHNlcmlhbCBpbnRlcmZhY2UgaXNzdWUgc29sdmVkIGFmdGVyIHZlci5ECi0JLy8tLS0KLQotCS8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCS8vIFN5c3RlbSBldmVudCBsb2cKLQkvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlSVF84MDJfMTFfRVZFTlRfVEFCTEUgICBFdmVudFRhYjsKLQotCi0JQk9PTEVBTgkJSFRDRW5hYmxlOwotCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qICAgICAgU3RhdGlzdGljIHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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CBfcEhlYWRlcjgwMl8zKQlcCi17CQkJCQkJCQkJCQkJCQkJCQkJCQlcCi0JUFVDSEFSIF9wUmVtb3ZlZExMQ1NOQVAgPSBOVUxMLCBfcERBLCBfcFNBOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQkJCQkJCQkJCQkJCQkJCQkJXAotCWlmIChSWF9CTEtfVEVTVF9GTEFHKF9wUnhCbGssIGZSWF9NRVNIKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJX3BEQSA9IF9wUnhCbGstPnBIZWFkZXItPkFkZHIzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlfcFNBID0gKFBVQ0hBUilfcFJ4QmxrLT5wSGVhZGVyICsgc2l6ZW9mKEhFQURFUl84MDJfMTEpOyAgICAgICAgICAgICAgICBcCi0JfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQllbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmIChSWF9CTEtfVEVTVF9GTEFHKF9wUnhCbGssIGZSWF9JTkZSQSkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKLQkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJX3BEQSA9IF9wUnhCbGstPnBIZWFkZXItPkFkZHIxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmIChSWF9CTEtfVEVTVF9GTEFHKF9wUnhCbGssIGZSWF9ETFMpKQkJCQkJCQkJCVwKLQkJCV9wU0EgPSBfcFJ4QmxrLT5wSGVhZGVyLT5BZGRyMjsJCQkJCQkJCQkJXAotCQllbHNlCQkJCQkJCQkJCQkJCQkJCQlcCi0JCQlfcFNBID0gX3BSeEJsay0+cEhlYWRlci0+QWRkcjM7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQllbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCV9wREEgPSBfcFJ4QmxrLT5wSGVhZGVyLT5BZGRyMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJX3BTQSA9IF9wUnhCbGstPnBIZWFkZXItPkFkZHIyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCQkJCQkJCQkJCQkJCQkJCQlcCi0JQ09OVkVSVF9UT184MDJfMyhfcEhlYWRlcjgwMl8zLCBfcERBLCBfcFNBLCBfcFJ4QmxrLT5wRGF0YSwgCQkJCVwKLQkJX3BSeEJsay0+RGF0YVNpemUsIF9wUmVtb3ZlZExMQ1NOQVApOyAgICAgICAgICAgICAgICAgICAg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AgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JcnRtcF9ja2lwbWljLmgKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlOYW1lCQlEYXRlCQkJTW9kaWZpY2F0aW9uIGxvZ3MKLSovCi0jaWZuZGVmCV9fUlRNUF9DS0lQTUlDX0hfXwotI2RlZmluZQlfX1JUTVBfQ0tJUE1JQ19IX18KLQotdHlwZWRlZglzdHJ1Y3QJX01JQ19DT05URVhUCXsKLQkvKiAtLS0gTU1IIGNvbnRleHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi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HZXRDb2VmZmljaWVudCgKLSAgICBJTiAgUE1JQ19DT05URVhUICAgICAgICAgcENvbnRleHQpOwotCi1WT0lEIHhvcl8xMjgoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgYSwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBiLAotICAgIE9VVCBQVUNIQVIgICAgICAgICAgICAgIG91dCk7Ci0KLVVDSEFSIFJUTVBDa2lwU2JveCgKLSAgICBJTiAgVUNIQVIgICAgICAgICAgICAgICBhKTsKLQotVk9JRCB4b3JfMzIoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgYSwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBiLAotICAgIE9VVCBQVUNIQVIgICAgICAgICAgICAgIG91dCk7Ci0KLVZPSUQgbmV4dF9rZXkoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAga2V5LAotICAgIElOICBJTlQgICAgICAgICAgICAgICAgIHJvdW5kKTsKLQotVk9JRCBieXRlX3N1YigKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBpbiwKLSAgICBPVVQgUFVDSEFSICAgICAgICAgICAgICBvdXQpOwotCi1WT0lEIHNoaWZ0X3JvdygKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBpbiwKLSAgICBPVVQgUFVDSEFSICAgICAgICAgICAgICBvdXQpOwotCi1WT0lEIG1peF9jb2x1bW4oCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgaW4sCi0gICAgT1VUIFBVQ0hBUiAgICAgICAgICAgICAgb3V0KTsKLQotVk9JRCBSVE1QQWVzRW5jcnlwdCgKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBrZXksCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgZGF0YSwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBjaXBoZXJ0ZXh0KTsKLQotVk9JRCBSVE1QTWljRmluYWwoCi0gICAgSU4gIF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XMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgcnRtcF9kZWYuaAotCi0gICAgQWJzdHJhY3Q6Ci0gICAgTWluaXBvcnQgcmVsYXRlZCBkZWZpbml0aW9uIGhlYWRlcgotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgICBXaGVuICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLSAgICAtLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBQYXVsIExpbiAgICAwOC0wMS0yMDAyICAgIGNyZWF0ZWQKLSAgICBKb2huIENoYW5nICAwOC0wNS0yMDAzICAgIGFkZCBkZWZpbml0aW9uIGZvciAxMWcgJiBvdGhlciBkcmFmdHMKLSovCi0jaWZuZGVmIF9fUlRNUF9ERUZfSF9fCi0jZGVmaW5lIF9fUlRNUF9ERUZfSF9fCi0KLSNpbmNsdWRlICJvaWQuaCIKLQotLy8KLS8vICBEZWJ1ZyBpbmZvcm1hdGlvbiB2ZXJib3NpdHk6IGxvd2VyIHZhbHVlcyBpbmRpY2F0ZSBoaWdoZXIgdXJnZW5jeQotLy8KLSNkZWZpbmUgUlRfREVCVU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AgICAgICAgICAyCi0jZGVmaW5lIEJTUzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBCU1M0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKLSNkZWZpbmUgQlNTNSAgICAgICAgICAgICAgICAgICAgICAgICAgICA1Ci0jZGVmaW5lIEJTUzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgotI2RlZmluZSBCU1M3ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKLQotCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gTGVuZ3RoIGRlZmluaXRpb25zCi0jZGVmaW5lIFBFRVJfS0VZX05PICAgICAgICAgICAgICAgICAgICAgMgotI2RlZmluZSBNQUNfQUREUl9MRU4gICAgICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgVElNRVNUQU1QX0xFTiAgICAgICAgICAgICAgICAgICA4Ci0jZGVmaW5lIE1BWF9MRU5fT0ZfU1VQUE9SVEVEX1JBVEVTICAgICAgTUFYX0xFTkdUSF9PRl9TVVBQT1JUX1JBVEVTIC8vIDEsIDIsIDUuNSwgMTEsIDYsIDksIDEyLCAxOCwgMjQsIDM2LCA0OCwgNTQKLSNkZWZpbmUgTUFYX0xFTl9PRl9LRVkgICAgICAgICAgICAgICAgICAzMiAgICAgIC8vIDMyIG9jdGV0cyA9PSAyNTYgYml0cywgUmVkZWZpbmUgZm9yIFdQQQotI2RlZmluZSBNQVhfTlVNX09GX0NIQU5ORUxTICAgICAgICAgICAgIE1BWF9OVU1fT0ZfQ0hTICAgICAgLy8gMTQgY2hhbm5lbHMgQDIuNEcgKyAgMTJAVU5JSSArIDQgQE1NQUMgKyAxMSBASGlwZXJMQU4yICsgNyBASmFwYW4gKyAxIGFzIE5VTEwgdGVybWluYXRpb24KLSNkZWZpbmUgTUFYX05VTV9PRl8xMUpDSEFOTkVMUyAgICAgICAgICAgICAyMCAgICAgIC8v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MTUVfQlVGRkVSICAgICAgICAgIDIwNDgKLQotLy8gcG93ZXIgc3RhdHVzIHJlbGF0ZWQgZGVmaW5pdGlvbnMKLSNkZWZpbmUgUFdSX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIFBXUl9TQVZFICAgICAgICAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBQV1JfTU1QUyAgICAgICAgICAgICAgICAgICAgICAgIDIJCQkvL01JTU8gcG93ZXIgc2F2ZQotLy8jZGVmaW5lIFBXUl9VTktOT1dOICAgICAgICAgICAgICAgICAgIDIKLQotLy8gQXV0aCBhbmQgQXNzb2MgbW9kZSByZWxhdGVkIGRlZmluaXRpb25zCi0jZGVmaW5lIEFVVEhfTU9ERV9PUEVOICAgICAgICAgICAgICAgICAgMHgwMAotI2RlZmluZSBBVVRIX01PREVfS0VZICAgICAgICAgICAgICAgICAgIDB4MDEKLS8vI2RlZmluZSBBVVRIX01PREVfQVVUT19TV0lUQ0ggICAgICAgICAweDAzCi0vLyNkZWZpbmUgQVVUSF9NT0RFX0RFQVVUSCAgICAgICAgICAgICAgMHgwNAotLy8jZGVmaW5lIEFVVEhfTU9ERV9VUExBWUVSICAgICAgICAgICAgIDB4MDUgLy8gcmVzZXJ2ZWQgZm9yIDgwMi4xMWkgdXNlCi0KLS8vIEJTUyBUeXBlIGRlZmluaXRpb25zCi0jZGVmaW5lIEJTU19BREhPQyAgICAgICAgICAgICAgICAgICAgICAgMCAgLy8gPSBOZGlzODAyXzExSUJTUwotI2RlZmluZSBCU1NfSU5GUkEgICAgICAgICAgICAgICAgICAgICAgIDEgIC8vID0gTmRpczgwMl8xMUluZnJhc3RydWN0dXJlCi0jZGVmaW5lIEJTU19BTlkgICAgICAgICAgICAgICAgICAgICAgICAgMiAgLy8gPSBOZGlzODAyXzExQXV0b1Vua25vd24KLSNkZWZpbmUgQlNTX01PTklUT1IJCQkgICAgICAgICAgICAzICAvLyA9IE5kaXM4MDJfMTFNb25pdG9yC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NTIKLSNkZWZpbmUgTUxNRV9TVEFURV9NQUNISU5FX1JFSkVDVCAgICAgICAweDUzCi0jZGVmaW5lIE1MTUVfTUFDX1RBQkxFX0ZBSUwgICAgICAgICAgICAgMHg1NAotCi0vLyBJRSBjb2RlCi0jZGVmaW5lIElFX1NTSUQgICAgICAgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBJRV9TVVBQX1JBVEVTICAgICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgSUVfRkhfUEFSTSAgICAgICAgICAgICAgICAgICAgICAyCi0jZGVmaW5lIElFX0RTX1BBUk0gICAgICAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBJRV9DRl9QQVJNICAgICAgICAgICAgICAgICAgICAgIDQKLSNkZWZpbmUgSUVfVElNICAgICAgICAgICAgICAgICAgICAgICAgICA1Ci0jZGVmaW5lIElFX0lCU1NfUEFSTSAgICAgICAgICAgICAgICAgICAgNgotI2RlZmluZSBJRV9DT1VOVFJZICAgICAgICAgICAgICAgICAgICAgIDcgICAgIC8vIDgwMi4xMWQKLSNkZWZpbmUgSUVfODAyXzExRF9SRVFVRVNUICAgICAgICAgICAgICAxMCAgICAvLyA4MDIuMTFkCi0jZGVmaW5lIElFX1FCU1NfTE9BRCAgICAgICAgICAgICAgICAgICAgMTEgICAgLy8gODAyLjExZSBkOQotI2RlZmluZSBJRV9FRENBX1BBUkFNRVRFUiAgICAgICAgICAgICAgIDEyICAgIC8vIDgwMi4xMWUgZDkKLSNkZWZpbmUgSUVfVFNQRUMgICAgICAgICAgICAgICAgICAgICAgICAxMyAgICAvLyA4MDIuMTFlIGQ5Ci0jZGVmaW5lIElFX1RDTEFTICAgICAgICAgICAgICAgICAgICAgICAgMTQgICAgLy8gODAyLjExZSBkOQotI2RlZmluZSBJRV9TQ0hFRFVMRSAgICAgICAgICAgICAgICAgICAgIDE1ICAgIC8vIDgwMi4xMWUgZDkKLSNkZWZpbmUgSUVfQ0hBTExFTkdFX1RFWFQgICAgICAgICAgICAgICAxNgotI2RlZmluZSBJRV9QT1dFUl9DT05TVFJBSU5UICAgICAgICAgICAgIDMyICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9QT1dFUl9DQVBBQklMSVRZICAgICAgICAgICAgIDMzICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9UUENfUkVRVUVTVCAgICAgICAgICAgICAgICAgIDM0ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9UUENfUkVQT1JUICAgICAgICAgICAgICAgICAgIDM1ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9TVVBQX0NIQU5ORUxTICAgICAgICAgICAgICAgIDM2ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9DSEFOTkVMX1NXSVRDSF9BTk5PVU5DRU1FTlQgIDM3ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9NRUFTVVJFTUVOVF9SRVFVRVNUICAgICAgICAgIDM4ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9NRUFTVVJFTUVOVF9SRVBPUlQgICAgICAgICAgIDM5ICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9RVUlFVCAgICAgICAgICAgICAgICAgICAgICAgIDQwICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9JQlNTX0RGUyAgICAgICAgICAgICAgICAgICAgIDQxICAgIC8vIDgwMi4xMWggZDMuMwotI2RlZmluZSBJRV9FUlAgICAgICAgICAgICAgICAgICAgICAgICAgIDQyICAgIC8vIDgwMi4xMWcKLSNkZWZpbmUgSUVfVFNfREVMQVkgICAgICAgICAgICAgICAgICAgICA0MyAgICAvLyA4MDIuMTFlIGQ5Ci0jZGVmaW5lIElFX1RDTEFTX1BST0NFU1NJTkcgICAgICAgICAgICAgNDQgICAgLy8gODAyLjExZSBkOQotI2RlZmluZSBJRV9RT1NfQ0FQQUJJTElUWSAgICAgICAgIC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GVmaW5lIElFX0FJUk9ORVRfQ0tJUCAgICAgICAgICAgICAgICAgMTMzICAgLy8gQ0NYMS4wIElEIDg1SCBmb3IgQ0tJUAotI2RlZmluZSBJRV9BUF9UWF9QT1dFUiAgICAgICAgICAgICAgICAgIDE1MCAgIC8vIENDWCAyLjAgZm9yIEFQIHRyYW5zbWl0IHBvd2VyCi0jZGVmaW5lIElFX01FQVNVUkVNRU5UX0NBUEFCSUxJVFkgICAgICAgMjIxICAgLy8gQ0NYIDIuMAotI2RlZmluZSBJRV9DQ1hfVjIgICAgICAgICAgICAgICAgICAgICAgIDIyMQotI2RlZmluZSBJRV9BSVJPTkVUX0lQQUREUkVTUyAgICAgICAgICAgIDE0OSAgIC8vIENDWCBJRCA5NUggZm9yIElQIEFkZHJlc3MKLSNkZWZpbmUgSUVfQUlST05FVF9DQ0tNUkVBU1NPQyAgICAgICAgICAxNTYgICAvLyBDQ1ggSUQgOUNIIGZvciBDQ0tNIFJlYXNzb2NpYXRpb24gUmVxdWVzdCBlbGVtZW50Ci0jZGVmaW5lIENLSVBfTkVHT1RJQVRJT05fTEVOR1RIICAgICAgICAgMzAKLSNkZWZpbmUgQUlST05FVF9JUEFERFJFU1NfTEVOR1RIICAgICAgICAxMAotI2RlZmluZSBBSVJPTkVUX0NDS01SRUFTU09DX0xFTkdUSCAgICAgIDI0Ci0KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBNTE1FIHN0YXRlIG1hY2hpbmUgZGVmaW5pdGlvbgotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLy8gU1RBIE1MTUUgc3RhdGUgbWFoY2luZXMKLSNkZWZpbmUgQVNTT0NfU1RBVEVfTUFDSElORSAgICAgICAgICAgICAxCi0jZGVmaW5lIEFVVEhfU1RBVEVfTUFDSElORSAgICAgICAgICAgICAgMgotI2RlZmluZSBBVVRIX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ICAgICAxCi0jZGVmaW5lIENOVExfV0FJVF9KT0lOICAgICAgICAgICAgICAgICAgMgotI2RlZmluZSBDTlRMX1dBSVRfUkVBU1NPQyAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgQ05UTF9XQUlUX1NUQVJUICAgICAgICAgICAgICAgICA0Ci0jZGVmaW5lIENOVExfV0FJVF9BVVRIICAgICAgICAgICAgICAgICAgNQotI2RlZmluZSBDTlRMX1dBSVRfQVNTT0MgICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgQ05UTF9XQUlUX0FVVEgyICAgICAgICAgICAgICAgICA3Ci0jZGVmaW5lIENOVExfV0FJVF9PSURfTElTVF9TQ0FOICAgICAgICAgOAotI2RlZmluZSBDTlRMX1dBSVRfT0lEX0RJU0FTU09DICAgICAgICAgIDkKLSNpZmRlZiBSVDI4NzAKLSNkZWZpbmUgQ05UTF9XQUlUX1NDQU5fRk9SX0NPTk5FQ1QgICAgICAxMAotI2VuZGlmIC8vIFJUMjg3MCAvLwotCi0jZGVmaW5lIE1UMl9BU1NPQ19DT05GICAgICAgICAgICAgICAgICAgMzQKLSNkZWZpbmUgTVQyX0FVVEhfQ09ORiAgICAgICAgICAgICAgICAgICAzNQotI2RlZmluZSBNVDJfREVBVVRIX0NPTkYgICAgICAgICAgICAgICAgIDM2Ci0jZGVmaW5lIE1UMl9ESVNBU1NPQ19DT05GICAgICAgICAgICAgICAgMzcKLSNkZWZpbmUgTVQyX1JFQVNTT0NfQ09ORiAgICAgICAgICAgICAgICAzOAotI2RlZmluZSBNVDJfUFdSX01HTVRfQ09ORiAgICAgICAgICAgICAgIDM5Ci0jZGVmaW5lIE1UMl9KT0lOX0NPTkYgICAgICAgICAgICAgICAgICAgNDAKLSNkZWZpbmUgTVQyX1NDQU5fQ09ORiAgICAgICAgICAgICAgICAgICA0MQotI2RlZmluZSBNVDJfU1RBUlRfQ09ORiAgICAgICAgICAgICAgICAgIDQyCi0jZGVmaW5lIE1UMl9HRVRfQ09ORiAgICAgICAgICAgICAgICAgICAgNDMKLSNkZWZpbmUgTVQyX1NFVF9DT05GICAgICAgICAgICAgICAgICAgICA0NAotI2RlZmluZSBNVDJfUkVTRVRfQ09ORiAgICAgICAgICAgICAgICAgIDQ1Ci0jZGVmaW5lIE1UMl9NTE1FX1JPQU1JTkdfUkVRICAgICAgICAgICAgNTIKLQotI2RlZmluZSBDTlRMX0ZVTkNfU0laRSAgICAgICAgICAgICAgICAgIDEKLQotLy8KLS8vIFNUQSdzIEFTU09DIHN0YXRlIG1hY2hpbmU6IHN0YXRlcywgZXZlbnRzLCB0b3RhbCBmdW5jdGlvbiAjCi0vLwotI2RlZmluZSBBU1NPQ19JRExFICAgICAgICAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgQVNTT0NfV0FJVF9SU1AgICAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIFJFQVNTT0NfV0FJVF9SU1AgICAgICAgICAgICAgICAgMgotI2RlZmluZSBESVNBU1NPQ19XQUlUX1JTUCAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgTUFYX0FTU09DX1NUQVRFICAgICAgICAgICAgICAgICA0Ci0KLSNkZWZpbmUgQVNTT0NfTUFDSElORV9CQVNFICAgICAgICAgICAgICAwCi0jZGVmaW5lIE1UMl9NTE1FX0FTU09DX1JFUSAgICAgICAgICAgICAgMAotI2RlZmluZSBNVDJfTUxNRV9SRUFTU09DX1JFUSAgICAgICAgICAgIDEKLSNkZWZpbmUgTVQyX01MTUVfRElTQVNTT0NfUkVRICAgICAgICAgICAyCi0jZGVmaW5lIE1UMl9QRUVSX0RJU0FTU09DX1JFUSAgICAgICAgICAgMwotI2RlZmluZSBNVDJfUEVFUl9BU1NPQ19SRVEgICAgICAgICAgICAgIDQKLSNkZWZpbmUgTVQyX1BFRVJfQVNTT0NfUlNQICAgICAgICAgICAgICA1Ci0jZGVmaW5lIE1UMl9QRUVSX1JFQVNTT0NfUkVRICAgICAgICAgICAgNgotI2RlZmluZSBNVDJfUEVFUl9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yBsb25nIHByZWFtYmxlIENDSyAxTWJwcwotI2RlZmluZSBNQ1NfTE9OR1BfUkFURV8yICAgICAgICAgICAgICAgICAgICAgIDEJLy8gbG9uZyBwcmVhbWJsZSBDQ0sgMU1icHMKLSNkZWZpbmUgTUNTX0xPTkdQX1JBVEVfNV81ICAgICAgICAgICAgICAgICAgICAyCi0jZGVmaW5lIE1DU19MT05HUF9SQVRFXzExICAgICAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBNQ1NfU0hPUlRQX1JBVEVfMSAgICAgICAgICAgICAgICAgICAgICA0CSAvLyBsb25nIHByZWFtYmxlIENDSyAxTWJwcy4gc2hvcnQgaXMgZm9yYmlkZGVuIGluIDFNYnBzCi0jZGVmaW5lIE1DU19TSE9SVFBfUkFURV8yICAgICAgICAgICAgICAgICAgICAgIDUJLy8gc2hvcnQgcHJlYW1ibGUgQ0NLIDJNYnBzCi0jZGVmaW5lIE1DU19TSE9SVFBfUkFURV81XzUgICAgICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgTUNTX1NIT1JUUF9SQVRFXzExICAgICAgICAgICAgICAgICAgICAgNwotLy8gVG8gc2VuZCBkdXBsaWNhdGUgbGVnYWN5IE9GRE0uIHNldCBCVz1CV180MC4gIFNHSS5TVEJDIGFyZSByZXNlcnZlZAotI2RlZmluZSBNQ1NfUkFURV82ICAgICAgICAgICAgICAgICAgICAgIDAgICAvLyBsZWdhY3kgT0ZETQotI2RlZmluZSBNQ1NfUkFURV85ICAgICAgICAgICAgICAgICAgICAgIDEgICAvLyBPRkRNCi0jZGVmaW5lIE1DU19SQVRFXzEyICAgICAgICAgICAgICAgICAgICAgMiAgIC8vIE9GRE0KLSNkZWZpbmUgTUNTX1JBVEVfMTggICAgICAgICAgICAgICAgICAgICAzICAgLy8gT0ZETQotI2RlZmluZSBNQ1NfUkFURV8yNCAgICAgICAgICAgICAgICAgICAgIDQgIC8vIE9GRE0KLSNkZWZpbmUgTUNTX1JBVEVfMzYgICAgICAgICAg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V8xMiAgICAgICAgICAgICAgICAgICAgIDYgICAvLyBPRkRNCi0jZGVmaW5lIFJBVEVfMTggICAgICAgICAgICAgICAgICAgICA3ICAgLy8gT0ZETQotI2RlZmluZSBSQVRFXzI0ICAgICAgICAgICAgICAgICAgICAgOCAgIC8vIE9GRE0KLSNkZWZpbmUgUkFURV8zNiAgICAgICAgICAgICAgICAgICAgIDkgICAvLyBPRkRNCi0jZGVmaW5lIFJBVEVfNDggICAgICAgICAgICAgICAgICAgICAxMCAgLy8gT0ZETQotI2RlZmluZSBSQVRFXzU0ICAgICAgICAgICAgICAgICAgICAgMTEgIC8vIE9GRE0KLSNkZWZpbmUgUkFURV9GSVJTVF9PRkRNX1JBVEUgICAgICAgIFJBVEVfNgotI2RlZmluZSBSQVRFX0xBU1RfT0ZETV9SQVRFICAgICAgICAJUkFURV81NAotI2RlZmluZSBSQVRFXzZfNSAgICAgICAgICAgICAgICAgICAgMTIgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzEzICAgICAgICAgICAgICAgICAgICAgMTMgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzE5XzUgICAgICAgICAgICAgICAgICAgMTQgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzI2ICAgICAgICAgICAgICAgICAgICAgMTUgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzM5ICAgICAgICAgICAgICAgICAgICAgMTYgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzUyICAgICAgICAgICAgICAgICAgICAgMTcgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzU4XzUgICAgICAgICAgICAgICAgICAgMTggIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzY1ICAgICAgICAgICAgICAgICAgICAgMTkgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzc4ICAgICAgICAgICAgICAgICAgICAgMjAgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzEwNCAgICAgICAgICAgICAgICAgICAgMjEgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzExNyAgICAgICAgICAgICAgICAgICAgMjIgIC8vIEhUIG1peAotI2RlZmluZSBSQVRFXzEzMCAgICAgICAgICAgICAgICAgICAgMjMgIC8vIEhUIG1peAotLy8jZGVmaW5lIFJBVEVfQVVUT19TV0lUQ0ggICAgICAgICAgICAyNTUgLy8gZm9yIFN0YUNmZy5GaXhlZFR4UmF0ZSBvbmx5Ci0jZGVmaW5lIEhUUkFURV8wICAgICAgICAgICAgICAgICAgICAgIDEyCi0jZGVmaW5lIFJBVEVfRklSU1RfTU1fUkFURSAgICAgICAgSFRSQVRFXzAKLSNkZWZpbmUgUkFURV9GSVJTVF9IVF9SQVRFICAgICAgICBIVFJBVEVfMAotI2RlZmluZSBSQVRFX0xBU1RfSFRfUkFURSAgICAgICAgSFRSQVRFXzAKLQotLy8gcFR4V0ktPnR4b3AKLSNkZWZpbmUgSUZTX0hUVFhPUCAgICAgICAgICAgICAgICAgMAkvLyBUaGUgdHhvcCB3aWxsIGJlIGhhbmRsZXMgYnkgQVNJQy4KLSNkZWZpbmUgSUZTX1BJRlMgICAgICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgSUZTX1NJRlMgICAgICAgICAgICAgICAgICAgIDIKLSNkZWZpbmUgSUZTX0JBQ0tPRkYgICAgICAgICAgICAgICAgIDMKLQotLy8gcFR4RC0+UmV0cnlNb2RlCi0jZGVmaW5lIExPTkdfUkVUUlkgICAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIFNIT1JUX1JFVFJZICAgICAgICAgICAgICAgICAwCi0KLS8vIENvdW50cnkgUmVnaW9uIGRlZmluaXRpb24KLSNkZWZpbmUgUkVHSU9OX01JTklNVU1fQkdfQkFORCAgICAgICAgICAgIDAKLSNkZWZpbmUgUkVHSU9OXzBfQkdfQkFORCAgICAgICAgICAgICAgICAgIDAgICAgICAgLy8gMS0xMQotI2RlZmluZSBSRUdJT05fMV9CR19CQU5EICAgICAgICAgICAgICAgICAgMSAgICAgICAvLyAx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gICAgICAgICAgICAgICAgMTEJICAvLyAzNiwgNDAsIDQ0LCA0OCwgNTIsIDU2LCA2MCwgNjQsIDEwMCwgMTA0LCAxMDgsIDExMiwgMTE2LCAxMjAsIDE0OSwgMTUzLCAxNTcsIDE2MQotI2RlZmluZSBSRUdJT05fTUFYSU1VTV9BX0JBTkQgICAgICAgICAgICAgMTEKLQotLy8gcFR4RC0+Q2lwaGVyQWxnCi0jZGVmaW5lIENJUEhFUl9OT05FICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIENJUEhFUl9XRVA2NCAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIENJUEhFUl9XRVAxMjggICAgICAgICAgICAgICAyCi0jZGVmaW5lIENJUEhFUl9US0lQICAgICAgICAgICAgICAgICAzCi0jZGVmaW5lIENJUEhFUl9BRVMgICAgICAgICAgICAgICAgICA0Ci0jZGVmaW5lIENJUEhFUl9DS0lQNjQgICAgICAgICAgICAgICA1Ci0jZGVmaW5lIENJUEhFUl9DS0lQMTI4ICAgICAgICAgICAgICA2Ci0jZGVmaW5lIENJUEhFUl9US0lQX05PX01JQyAgICAgICAgICA3ICAgICAgIC8vIE1JQyBhcHBlbmRlZCBieSBkcml2ZXI6IG5vdCBhIHZhbGlkIHZhbHVlIGluIGhhcmR3YXJlIGtleSB0YWJsZQotI2RlZmluZSBDSVBIRVJfU01TNAkJCQkJOAotCi0vLyB2YWx1ZSBkb21haW4gb2YgcEFkLT5SZkljVHlwZQotI2RlZmluZSBSRklDXzI4MjAgICAgICAgICAgICAgICAgICAgMSAgICAgICAvLyAyLjRHIDJUM1IKLSNkZWZpbmUgUkZJQ18yODUwICAgICAgICAgICAgICAgICAgIDIgICAgICAgLy8gMi40Ry81RyAyVDNSCi0jZGVmaW5lIFJGSUNfMjcyMCAgICAgICAgICAgICAgICAgICAzICAgICAgIC8vIDIuNEcgMVQyUgotI2RlZmluZSBSRklDXzI3NTAgICAgICAgICAgICAgICAgICAgNCAgICAgICAvLyAyLjRHLzVHI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KgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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gICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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MZW4sCi0JSU4gUFVJTlQ4IHBSZXBvcnRJbmZvKTsKLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlQcmVwYXJlIFRQQyBSZXF1ZXN0IGFjdGlvbiBmcmFtZSBhbmQgZW5xdWV1ZSBpdCBpbnRvCi0JCW1hbmFnZW1lbnQgcXVldWUgd2FpdGluZyBmb3IgdHJhbnNtaXRpb24uCi0KLQlQYXJhbWV0cnM6Ci0JCTEuIHRoZSBkZXN0aW5hdGlvbiBtYWMgYWRkcmVzcyBvZiB0aGUgZnJhbWUuCi0KLQlSZXR1cm4JOiBOb25lLgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgRW5xdWV1ZVRQQ1JlcSgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBQVUNIQVIgcERBLAotCUlOIFVDSEFSIERpYWxvZ1Rva2VuKTsKLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlQcmVwYXJlIFRQQyBSZXBvcnQgYWN0aW9uIGZyYW1lIGFuZCBlbnF1ZXVlIGl0IGludG8KLQkJbWFuYWdlbWVudCBxdWV1ZSB3YWl0aW5nIGZvciB0cmFuc21pdGlvbi4KLQotCVBhcmFtZXRyczoKLQkJMS4gdGhlIGRlc3RpbmF0aW9uIG1hYyBhZGRyZXNzIG9mIHRoZSBmcmFtZS4KLQotCVJldHVybgk6IE5vbmUuCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBFbnF1Z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EdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAg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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmFsaW5rIFRlY2ggSW5jLgotICogNUYuLCBOby4zNiwgVGFpeXVhbiBTdC4sIEpodWJlaSBDaXR5LAotICogSHNpbmNodSBDb3VudHkgMzAyLAotICogVGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JYWlyb25ldC5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JUGF1bCBMaW4JMDQtMDYtMTUJCUluaXRpYWwKLSovCi0jaW5jbHVkZSAiLi4vcnRfY29uZmlnLmgiCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KL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vciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgIC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0ZXIgYXNzb2MgdGltZW91dAotCVBhcmFtZXRlcnM6Ci0JCUVsbWUgLQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEFzc29jVGltZW91dEFjdGlvbigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBNTE1FX1FVRVVFX0VMRU0gKkVsZW0pCi17Ci0JVVNIT1JUICBTdGF0dXM7Ci0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiQVNTT0MgLSBBc3NvY1RpbWVvdXRBY3Rpb25cbiIpKTsKLQlwQWQtPk1sbWUuQXNzb2NNYWNoaW5lLkN1cnJTdGF0ZSA9IEFTU09DX0lETEU7Ci0JU3RhdHVzID0gTUxNRV9SRUpfVElNRU9VVDsKLQlNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNVDJfQVNTT0NfQ09ORiwgMiwgJlN0YXR1cyk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJd2hhdCB0aGUgc3RhdGUgbWFjaGluZSB3aWxsIGRvIGFmdGVyIHJlYXNzb2MgdGltZW91dAotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIFJlYXNzb2NUaW1lb3V0QWN0aW9uKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLQlVU0hPUlQgIFN0YXR1czsKLQlEQkdQUklOVChSVF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uIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAqCi0gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlhdXRoLmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huCQkyMDA0LTktMwkJcG9ydGluZyBmcm9tIFJUMjUwMAotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBhdXRoZW50aWNhdGUgc3RhdGUgbWFjaGluZSBpbml0LCBpbmNsdWRpbmcgc3RhdGUgdHJhbnNpdGlvbiBhbmQgdGltZXIgaW5pdAotICAgIFBhcmFtZXRlcnM6Ci0gICAgICAgIFNtIC0gcG9pbnRlciB0byB0aGUgYXV0aCBzdGF0ZSBtYWNoaW5lCi0gICAgTm90ZToKLSAgICAgICAgVGhlIHN0YXRlIG1hY2hpbmUgbG9va3MgbGlrZSB0aGlzCi0KLSAgICAgICAgICAgICAgICAgICAgIC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uOwotCi0JLy8gc2VuZCBhIGRlLWF1dGggdG8gcmVzZXQgQVAncyBzdGF0ZSBtYWNoaW5lIChQYXRjaCBBUC1EaXI2MzUpCi0JaWYgKHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPT0gQVVUSF9XQUlUX1NFUTIpCi0JCUNsczJlcnJBY3Rpb24ocEFkLCBwQWQtPk1sbWVBdXguQnNzaWQpOwotCi0KLSAgICBNbG1lRW5xdWV1ZShwQWQsIEFVVEhfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfVElNRU9VVCwgMCwgTlVMTCk7Ci0gICAgUlQyOFhYX01MTUVfSEFORExFUihwQWQpOwotfQotCi0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBNbG1lQXV0aFJlcUFjdGlvbigKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBNTE1FX1FVRVVFX0VMRU0gKkVsZW0pCi17Ci0gICAgVUNIQVIgICAgICAgICAgICAgIEFkZHJbNl07Ci0gICAgVVNIT1JUICAgICAgICAgICAgIEFsZywgU2VxLCBTdGF0dXM7Ci0gICAgVUxPTkcgICAgICAgICAgICAgIFRpbWVvdXQ7Ci0gICAgSEVBREVSXzgwMl8xMSAgICAgIEF1dGhIZHI7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgIFRpbWVyQ2FuY2VsbGVkOwotICAgIE5ESVNfU1RBVFVTICAgICAgICBOU3RhdHVzOwotICAgIFBVQ0hBUiAgICAgICAgICAgICBwT3V0QnVmZmVyID0gTlVMTDsKLSAgICBVT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CAgICAgICAgICAgICAgICAgICAgJlN0YXR1cywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgRU5EX09GX0FSR1MpOwotICAgICAgICBNaW5pcG9ydE1NUmVxdWVzdChwQWQsIDAsIHBPdXRCdWZmZXIsIEZyYW1lTGVuKTsKLSAgICAJTWxtZUZyZWVNZW1vcnkocEFkLCBwT3V0QnVmZmVyKTsKLQotICAgICAgICBSVE1QU2V0VGltZXIoJnBBZC0+TWxtZUF1eC5BdXRoVGltZXIsIFRpbWVvdXQpOwotICAgICAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9XQUlUX1NFUTI7Ci0gICAgfQotICAgIGVsc2UKLSAgICB7Ci0gICAgICAgIERCR1BSSU5UX0VSUigoIkFVVEggLSBNbG1lQXV0aFJlcUFjdGlvbigpIHNhbml0eSBjaGVjayBmYWlsZWRcbiIpKTsKLSAgICAgICAgcEFkLT5NbG1lLkF1dGhNYWNoaW5lLkN1cnJTdGF0ZSA9IEFVVEhfUkVRX0lETEU7Ci0gICAgICAgIFN0YXR1cyA9IE1MTUVfSU5WQUxJRF9GT1JNQVQ7Ci0gICAgICAgIE1sbWVFbnF1ZXVlKHBBZCwgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsIE1UMl9BVVRIX0NPTkYsIDIsICZTdGF0dXMpOwotICAgIH0KLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIFBlZXJBdXRoUnNwQXRTZXEyQWN0aW9uKAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOI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AgICAgICAgICAgICBOU3RhdHVzID0gTWxtZUFsbG9jYXRlTWVtb3J5KHBBZCwgJnBPdXRCdWZmZXIpOwotICAgICAgICAgICAgICAgICAgICBpZihOU3RhdHVzICE9IE5ESVNfU1RBVFVTX1NVQ0NFU1MpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIkFVVEggLSBQZWVyQXV0aFJzcEF0U2VxMkFjdGlvbigpIGFsbG9jYXRlIG1lbW9yeSBmYWlsXG4iKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9SRVFfSURMRTsKLSAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czIgPSBNTE1FX0ZBSUxfTk9fUkVTT1VSQ0U7Ci0gICAgICAgICAgICAgICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNVDJfQVVUSF9DT05GLCAyLCAmU3RhdHVzMik7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47Ci0gICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gU2VuZCBBVVRIIHJlcXVlc3Qgc2VxIzMuLi5cbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgTWd0TWFjSGVhZGVySW5pdChwQWQsICZBdXRoSGRyLCBTVUJUWVBFX0FVVEgsIDAsIEFkZHIyLCBwQWQtPk1sbWVBdXguQnNzaWQpOwotICAgICAgICAgICAgICAgICAgICBBdXRoSGRyLkZDLldlcCA9IDE7Ci0gICAgICAgICAgICAgICAgICAgIC8vIEVuY3J5cHQgY2hhbGxlbmdlIHRleHQgJiBhdXRoIGluZm9ybWF0aW9uCi0gICAgICAgICAgICAgICAgICAgIF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kLCBDeXBlckNobGdUZXh0ICsgMTQwKTsKLSAgICAgICAgICAgICAgICAgICAgTWFrZU91dGdvaW5nRnJhbWUocE91dEJ1ZmZlciwgICAgICAgICAgICAgICAmRnJhbWVMZW4sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZihIRUFERVJfODAyXzExKSwgICAgJkF1dGhIZHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENJUEhFUl9URVhUX0xFTiArIDE2LCAgICAgQ3lwZXJDaGxnVGV4dCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5EX09GX0FSR1MpOwotICAgICAgICAgICAgICAgICAgICBNaW5pcG9ydE1NUmVxdWVzdChwQWQsIDAsIHBPdXRCdWZmZXIsIEZyYW1lTGVuKTsKLSAgICAgICAgICAgICAgICAJTWxtZUZyZWVNZW1vcnkocEFkLCBwT3V0QnVmZmVyKTsKLQotICAgICAgICAgICAgICAgICAgICBSVE1QU2V0VGltZXIoJnBBZC0+TWxtZUF1eC5BdXRoVGltZXIsIEFVVEhfVElNRU9VVCk7Ci0gICAgICAgICAgICAgICAgICAgIHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPSBBVVRIX1dBSVRfU0VRNDsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0jaWZkZWYgTEVBUF9TVVBQT1JUCi0gICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLkxlYXBBdXRoTW9kZSA9PSBDSVNDT19BdXRoTW9kZUxFQVApCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAvL0ludmFsaWQgQXV0aGVudGljYXRpb24gcG9zc2libGUgcm9ndWUgQVAKLSAgICAgICAgICAgICAgICAgICAgLy9BZGQgdGhpcyBBcCB0byBSb2d1ZSBBUC4KLSAgICAgICAgICAgICAgICAgICAgUm9ndWVBcFRhYmxlU2V0RW50cnkocEFkLCAmcEFkLT5TdGFDZmcuUm9ndWVBcFRhYiwgQWRkcjIsIExFQVBfUkVBU09OX0lOVkFMSURfQVVUSCk7Ci0JCQkJfQotI2VuZGlmIC8vIExFQVBfU1VQUE9SVCAvLwotICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLkF1dGhGYWlsUmVhc29uID0gU3RhdHVzOwotICAgICAgICAgICAgICAgIENPUFlfTUFDX0FERFIocEFkLT5TdGFDZmcuQXV0aEZhaWxTdGEsIEFkZHIyKTsKLSAgICAgICAgICAgICAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9SRVFfSURMRTsKLSAgICAgICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNVDJfQVVUSF9DT05GLCAyLCAmU3RhdHVzKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gUGVlckF1dGhTYW5pdHkoKSBzYW5pdHkgY2hlY2sgZmFpbFxuIikpOwotICAgIH0KLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIFBlZXJBdXRoUnNwQXRTZXE0QWN0aW9uKAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLSAgICBVQ0h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LSAgICB9Ci0gICAgZWxzZQotICAgIHsKLSAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiQVVUSCAtIFBlZXJBdXRoUnNwQXRTZXE0QWN0aW9uKCkgc2FuaXR5IGNoZWNrIGZhaWxcbiIpKTsKLSAgICB9Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBNbG1lRGVhdXRoUmVxQWN0aW9uKAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLSAgICBNTE1FX0RFQVVUSF9SRVFfU1RSVUNUICpwSW5mbzsKLSAgICBIRUFERVJfODAyXzExIERlYXV0aEhkcjsKLSAgICBQVUNIQVIgICAgICAgIHBPdXRCdWZmZXIgPSBOVUxMOwotICAgIE5ESVNfU1RBVFVTICAgTlN0YXR1czsKLSAgICBVTE9ORyAgICAgICAgIEZyYW1lTGVuID0gMDsKLSAgICBVU0hPUlQgICAgICAgIFN0YXR1czsKLQotICAgIHBJbmZvID0gKE1MTUVfREVBVVRIX1JFUV9TVFJVQ1QgKilFbGVtLT5Nc2c7Ci0KLSAgICBOU3RhdHVzID0gTWxtZUFsbG9jYXRlTWVtb3J5KHBBZCwgJnBPdXRCdWZmZXIpOyAgLy9HZXQgYW4gdW51c2VkIG5vbnBhZ2VkIG1lbW9yeQotICAgIGlmIChOU3RhdHVzICE9IE5ESVNfU1RBVFVTX1NVQ0NFU1MpCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJ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UVfUkVKX1RJTUVPVVQ7Ci0gICAgTWxtZUVucXVldWUocEFkLCBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfQ09ORiwgMiwgJlN0YXR1cyk7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBJbnZhbGlkU3RhdGVXaGVuQXV0aCgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBNTE1FX1FVRVVFX0VMRU0gKkVsZW0pCi17Ci0gICAgVVNIT1JUIFN0YXR1czsKLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gSW52YWxpZFN0YXRlV2hlbkF1dGggKHN0YXRlPSVsZCksIHJlc2V0IEFVVEggc3RhdGUgbWFjaGluZVxuIiwgcEFkLT5NbG1lLkF1dGhNYWNoaW5lLkN1cnJTdGF0ZSkpOwotICAgIHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPSBBVVRIX1JFUV9JRExFOwotICAgIFN0YXR1cyA9IE1MTUVfU1RBVEVfTUFDSElORV9SRUpFQ1Q7Ci0gICAgTWxtZUVucXVldWUocEFkLCBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfQ09ORiwgMiwgJlN0YXR1cyk7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU29tZSBTVEEvQ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KLSAqIFRhaXdhbiwgUi5PLkMuCi0gKgotICogKGMpIENvcHlyaWdodCAyMDAyLTIwMDcsIFJhbGluayBUZWNobm9sb2d5LCBJbmMuCi0gKgotICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICoKLSAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCWF1dGhfcnNwLmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huCQkyMDA0LTEwLTEJCWNvcHkgZnJvbSBSVDI1NjAKLSovCi0jaW5jbHVkZSAiLi4vcnRfY29uZmlnLmgiCi0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgYXV0aGVudGljYXRpb24gc3RhdGUgbWFjaGluZSBpbml0IHByb2NlZHVyZQotICAgIFBhcmFtZXRlcnM6Ci0gICAgICAgIFNtIC0gdGhlIHN0YXRlIG1hY2hpbmUKLQotCUlSUUwgPSBQQVNTSVZFX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEF1dGhSc3BTdGF0ZU1hY2hpbmVJbml0KAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIFBTVEFURV9NQUNISU5FIFNtLAotICAgIElOIFNUQVRFX01BQ0hJTkVfRlVOQyBUcmFuc1tdKQotewotICAgIFN0YXRlTWFjaGluZUluaXQoU20sIFRyYW5zLCBNQVhfQVVUSF9SU1BfU1RBVEUsIE1BWF9BVVRIX1JTUF9NU0csIChTVEFURV9NQUNISU5FX0ZVTkMpRHJvcCwgQVVUSF9SU1BfSURMRSwgQVVUSF9SU1BfTUFDSElORV9CQVNFKTsKLQotICAgIC8vIGNvbHVtbiAxCi0gICAgU3RhdGVNYWNoaW5lU2V0QWN0aW9uKFNtLCBBVVRIX1JTUF9JRExFLCBNVDJfUEVFUl9ERUFVVEgsIChTVEFURV9NQUNISU5FX0ZVTkMpUGVlckRlYXV0aEFjdGlvbik7Ci0KLSAgICAvLyBjb2x1bW4gMgotICAgIFN0YXRlTWFjaGluZVNldEFjdGlvbihTbSwgQVVUSF9SU1BfV0FJVF9DSEFMLCBNVDJfUEVFUl9ERUFVVEgsIChTVEFURV9NQUNISU5FX0ZVTkMpUGVlckRlYXV0aEFjdGlvbik7Ci0KLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgUGVlckF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ICAgICAgIHNpemVvZihIRUFERVJfODAyXzExKSwgICAgJkF1dGhIZHIsCi0gICAgICAgICAgICAgICAgICAgICAgMiwgICAgICAgICAgICAgICAgICAgICAgICAmQWxnLAotICAgICAgICAgICAgICAgICAgICAgIDIsICAgICAgICAgICAgICAgICAgICAgICAgJlNlcSwKLSAgICAgICAgICAgICAgICAgICAgICAyLCAgICAgICAgICAgICAgICAgICAgICAgICZSZWFzb24sCi0gICAgICAgICAgICAgICAgICAgICAgRU5EX09GX0FSR1MpOwotICAgIE1pbmlwb3J0TU1SZXF1ZXN0KHBBZCwgMCwgcE91dEJ1ZmZlciwgRnJhbWVMZW4pOwotCU1sbWVGcmVlTWVtb3J5KHBBZCwgcE91dEJ1ZmZlcik7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFBlZXJEZWF1dGhBY3Rpb24oCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gUE1MTUVfUVVFVUVfRUxFTSBFbGVtKQotewotICAgIFVDSEFSICAgICAgIEFkZHIyW01BQ19BRERSX0xFTl07Ci0gICAgVVNIT1JUICAgICAgUmVhc29uOwotCi0gICAgaWYgKFBlZXJEZWF1dGhTYW5pdHkocEFkLCBFbGVtLT5Nc2csIEVsZW0tPk1zZ0xlbiwgQWRkcjIsICZSZWFzb24pKQotICAgIHsKLSAgICAgICAgaWYgKElORlJBX09OKHBBZCkgJiYgTUFDX0FERFJfRVFVQUwoQWRkcjIsIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkKSkKLSAgICAgICAgewotICAgICAgICA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idXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JY29ubmVjdC5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2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kNvbW1vbkNmZy5DaGFubmVsKTsKLQkJcEFkLT5NbG1lLkNudGxNYWNoaW5lLkN1cnJTdGF0ZSA9IENOVExfSURMRTsKLQl9Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIEpvaW5QYXJtRmlsbCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBPVVQgTUxNRV9KT0lOX1JFUV9TVFJVQ1QgKkpvaW5SZXEsCi0JSU4gVUxPTkcgQnNzSWR4KQotewotCUpvaW5SZXEtPkJzc0lkeCA9IEJzc0lkeDsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgU2NhblBhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX1NDQU5fUkVRX1NUUlVDVCAqU2NhblJlcSwKLQlJTiBDSEFSIFNzaWRbXSwKLQlJTiBVQ0hBUiBTc2lkTGVuLAotCUlOIFVDSEFSIEJzc1R5cGUsCi0JSU4gVUNIQVIgU2NhblR5cGUpCi17Ci0gICAgTmRpc1plcm9NZW1vcnkoU2NhblJlcS0+U3NpZCwgTUFYX0xFTl9PRl9TU0lEKTsKLQlTY2FuUmVxLT5Tc2lkTGVuID0gU3NpZExlbjsKLQlOZGlzTW92ZU1lbW9yeShTY2FuUmVxLT5Tc2lkLCBTc2lkLCBTc2lkTGVuKTsKLQlTY2FuUmVxLT5Cc3NUeXBlID0gQnNzVHlwZTsKLQlTY2FuUmVxLT5TY2FuVHlwZSA9IFNjYW5UeXBlOwotfQotCi0jaWZkZWYgUU9TX0RMU19TVVBQT1JUCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBEbHNQYXJtRmlsbCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBPVVQgTUxNRV9ETFNfUkVRX1NUUlVDVCAqcERsc1JlcSwKLQlJTiBQUlRfODAyXzExX0RMUyBwRGxzLAotCUlOIFVTSE9SVCByZWFzb24pCi17Ci0JcERsc1JlcS0+cERMUyA9IHBEbHM7Ci0JcERsc1JlcS0+UmVhc29uID0gcmVhc29uOwotfQotI2VuZGlmIC8vIFFPU19ETFNfU1VQUE9SVCAvLwotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBTdGFydFBhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX1NUQVJUX1JFUV9TVFJVQ1QgKlN0YXJ0UmVxLAotCUlOIENIQVIgU3NpZFtdLAotCUlOIFVDSEFSIFNzaWRMZW4pCi17Ci0JQVNTRVJUKFNzaWRMZW4gPD0gTUFYX0xFTl9PRl9TU0lEKTsKLQlOZGlzTW92ZU1lbW9yeShTdGFydFJlcS0+U3NpZCwgU3NpZCwgU3NpZExlbik7Ci0JU3RhcnRSZXEtPlNzaWRMZW4gPSBTc2lkTGVuOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBBdXRoUGFybUZpbGwoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gT1VUIE1MTUVfQVVUSF9SRVFfU1RSVUNUICpBdXRoUmVxLAotCUlOIFBVQ0hBUiBwQWRkciwKLQlJTiBVU0hPUlQgQWxnKQotewotCUNPUFlfTUFDX0FERFIoQXV0aFJlcS0+QWRkciwgcEFkZHIpOwotCUF1dGhSZXEtPkFsZyA9IEFsZzsKLQlBdXRoUmVxLT5UaW1lb3V0ID0gQVVUSF9USU1FT1VUOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLQotCi0jaWZkZWYgUlQyODcwCi0KLVZPSUQgTWxtZUNudGxDb25maXJtKAotCUlOIFBSVE1QX0FEQVBURVIg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AgICAgJkJjbkhkciwKLQkJCQkJICBUSU1FU1RBTVBfTEVOLCAgICAgICAgICAgICAgICAgICAmRmFrZVRpbWVzdGFtcCwKLQkJCQkJICAyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5Db21tb25DZmcuQmVhY29uUGVyaW9kLAotCQkJCQkgIDIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZDYXBhYmlsaXR5SW5mbywKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmU3NpZEllLAotCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPkNvbW1vbkNmZy5Tc2lkTGVuLAotCQkJCQkgIHBBZC0+Q29tbW9uQ2ZnLlNzaWRMZW4sICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLlNzaWQsCi0JCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN1cFJhdGVJZSwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmU3VwUmF0ZUxlbiwKLQkJCQkJICBTdXBSYXRlTGVuLCAgICAgICAgICAgICAgICAgICAgICBTdXBSYXRlLAotCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEc0llLAotCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEc0xlbiwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5Db21tb25DZmcuQ2hhbm5lbCwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSWJzc0llLAotCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZJYnNzTGVuLAotCQkJCQkgIDIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPlN0YUFjdGl2ZS5BdGltV2luLAotCQkJCQkgIEVORF9PRl9BUkdTKTsKLQotCS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ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgZGxzLmMKLQotICAgIEFic3RyYWN0OgotICAgIEhhbmRsZSBXTU0tRExTIHN0YXRlIG1hY2hpbmUKLQotICAgIFJldmlzaW9uIEhpc3Rvcnk6Ci0gICAgV2hvICAgICAgICAgV2hlbiAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gICAgUm9yeSBDaGVuICAgMDItMTQtMjAwNgotCUFydmluIFRhaQkwNi0wMy0yMDA4CSAgTW9kaWZpZWQgZm9yIFJUMjh4eAotICovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBkbHMgc3RhdGUgbWFjaGluZSBpbml0LCBpbmNsdWRpbmcgc3RhdGUgdHJhbnNpdGlvbiBhbmQgdGltZXIgaW5pdAotICAgIFBhcmFtZXRlcnM6Ci0gICAgICAgIFNtIC0gcG9pbnRlciB0byB0aGUgZGxzIHN0YXRlIG1hY2hpbmUKLSAgICBOb3RlOgotICAgICAgICBUaGUgc3RhdGUgbWFjaGluZSBsb29rcyBsaWtlIHRoaXMKLQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIERMU19JRExFCi0gICAgTVQyX01MTUVfRExTX1JFUVVFU1QgICBNbG1lRGxzUmVxQWN0aW9uCi0gICAgTVQyX1BFRVJfRExTX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ZCwgU2VjdXJlPSVkLCBFS0RfREw9JWQsIEVycm9yPSVkLCBSZXF1ZXN0PSVkXG4iLCBMZW4sCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKExFTkdUSF84MDJfMTEgKyA2ICsgMiArIDIgKyBzaXplb2YoRUFQT0xfUEFDS0VUKSAtIE1BWF9MRU5fT0ZfUlNOSUUgKyAxNiksCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLktleU1pYywKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uSW5zdGFsbCwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uS2V5QWNrLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5TZWN1cmUsCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLkVLRF9ETCwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uRXJyb3IsCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLlJlcXVlc3QpKTsKLQotCQlpZiAoKExlbiA+PSAoTEVOR1RIXzgwMl8xMSArIDYgKyAyICsgMi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aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCXJ0bXBfZGF0YS5jCi0KLQlBYnN0cmFjdDoKLQlEYXRhIHBhdGggc3Vicm91dGluZXMKLQotCVJldmlzaW9uIEhpc3Rv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oYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0Jc2FuaXR5LmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huIENoYW5nICAyMDA0LTA5LTAxICAgICAgYWRkIFdNTSBzdXBwb3J0Ci0qLwotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotCi1leHRlcm4gVUNIQVIJQ0lTQ09fT1VJW107Ci0KLWV4dGVybiBVQ0hBUglXUEFfT1VJW107Ci1leHRlcm4gVUNIQVIJUlNOX09VSVtdOwotZXh0ZXJuIFVDSEFSCVdNRV9JTkZPX0VMRU1bXTsKLWV4dGVybiBVQ0hBUglXTUVfUEFSTV9FTEVNW107Ci1leHRlcm4gVUNIQVIJQ2N4MlFvc0luZm9bXTsKLWV4dGVybiBVQ0hBUglSQUxJTktfT1VJW107Ci1leHRlcm4gVUNIQVIJQlJPQURDT01fT1VJW107Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gTWxtZVN0YXJ0UmVxU2FuaXR5KAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIFZPSUQgKk1zZywKLSAgICBJTiBVTE9ORyBNc2dMZW4sCi0gICAgT1VUIENIQVIgU3NpZFtdLAotICAgIE9VVCBVQ0hBUiAqcFNzaWRMZW4pCi17Ci0gICAgTUxNRV9TVEFSVF9SRVFfU1RSVUNUICpJbmZvOwotCi0gICAgSW5mbyA9IChNTE1FX1NUQVJUX1JFUV9TVFJVQ1QgKikoTXNnKTsKLQotICAgIGlmIChJbmZvLT5Tc2lkTGVuID4gTUFYX0xFTl9PRl9TU0lEKQotICAgIHsKLSAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiTWxtZVN0YXJ0UmVxU2FuaXR5IGZhaWwgLSB3cm9uZyBTU0lEIGxlbmd0aFxuIikpOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotCi0gICAgKnBTc2lkTGVuID0gSW5mby0+U3NpZExlbjsKLSAgICBOZGlzTW92ZU1lbW9yeShTc2lkLCBJbmZvLT5Tc2lkLCAqcFNzaWRMZW4pOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09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ERFJFU1M6Ci0gICAgICAgICAgICAgICAgaWYgKHBFaWQtPkxlbiAhPSAweDBBKQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAgICAgLy8gR2V0IENpc2NvIEFpcm9uZXQgSVAgaW5mb3JtYXRpb24KLSAgICAgICAgICAgICAgICBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBDSVNDT19PVUksIDMpID09IDEpCi0gICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBBZC0+U3RhQ2ZnLkFpcm9uZXRJUEFkZHJlc3MsIHBFaWQtPk9jdGV0ICsgNCwgNCk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIC8vIENDWDIsIFdNTSB1c2UgdGhlIHNhbWUgSUUgdmFsdWUKLSAgICAgICAgICAgIC8vIGNhc2UgSUVfQ0NYX1YyOgotICAgICAgICAgICAgY2FzZSBJRV9WRU5ET1JfU1BFQ0lGSUM6Ci0gICAgICAgICAgICAgICAgLy8gaGFuZGxlIFdNRSBQQVJBTVRFUiBFTEVNRU5UCi0gICAgICAgICAgICAgICAgaWYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgV01FX1BBUk1fRUxFTSwgNikgJiYgKHBFaWQtPkxlbiA9PSAyNCkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBQVUNIQVIgcHRyOwotICAgICAgICAgICAgICAgICAgICBpbnQgaTsKLQotICAgICAgICAgICAgICAgICAgICAvLyBwYXJzaW5nIEVEQ0EgcGFyYW1ldGVycwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJWYWxpZCAgICAgICAgICA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlFBY2sgICAgICAgICAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHgxMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iUXVldWVSZXF1ZXN0ICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDIwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJUeG9wUmVxdWVzdCAgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4NDA7Ci0gICAgICAgICAgICAgICAgICAgIC8vcEVkY2FQYXJtLT5iTW9yZURhdGFBY2sgICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDgwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkVkY2FVcGRhdGVDb3VudCA9IHBFaWQtPk9jdGV0WzZdICYgMHgwZjsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQVBTRENhcGFibGUgICAgPSAocEVpZC0+T2N0ZXRbNl0gJiAweDgwKSA/IDEgOiAwOwotICAgICAgICAgICAgICAgICAgICBwdHIgPSAmcEVpZC0+T2N0ZXRbOF07Ci0gICAgICAgICAgICAgICAgICAgIGZvciAoaT0wOyBpPDQ7IGkrKykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgVUNIQVIgYWNpID0gKCpwdHIgJiAweDYwKSA+PiA1OyAvLyBiNX42IGlzIEFDIElOREVYCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBQ01bYWNpXSAgPSAoKCgqcHRyKSAmIDB4MTApID09IDB4MTApOyAgIC8vIGI1IGlzIEFDTQotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5BaWZzblthY2ldID0gKCpwdHIpICYgMHgwZjsgICAgICAgICAgICAgICAvLyBiMH4zIGlzIEFJRlNOCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWluW2FjaV0gPSAqKHB0cisxKSAmIDB4MGY7ICAgICAgICAgICAgIC8vIGIwfjQgaXMgQ3dtaW4KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtYXhbYWNpXSA9ICoocHRyKzEpID4+IDQ7ICAgICAgICAgICAgICAgLy8gYjV+OCBpcyBDd21heAotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5UeG9wW2FjaV0gID0gKihwdHIrMikgKyAyNTYgKiAoKihwdHIrMykpOyAvLyBpbiB1bml0IG9mIDMyLXVzCi0gICAgICAgICAgICAgICAgICAgICAgICBwdHIgKz0gNDsgLy8gcG9pbnQgdG8gbmV4dCBBQwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgLy8gaGFuZGxlIENDWCBJRQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIDAuIENoZWNrIHRoZSBzaXplIGFuZCBDQ1ggYWRtaW4gY29udHJvbAotICAgICAgICAgICAgICAgICAgICBpZiAocEFkLT5TdGFDZmcuQ0NYQ29udHJvbC5maWVsZC5FbmFibGUgPT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICBpZiAocEVpZC0+TGVuICE9IDUpCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgICAgICAgICAvLyBUdXJuIENDWDIgaWYgbWF0Y2hlZAotICAgICAgICAgICAgICAgICAgICBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBDY3gySWVJbmZvLCA1KSA9PSAxKQotICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5TdGFDZmcuQ0NYRW5hYmxlID0gVFJVRTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgIERCR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AhPSBJRV9TVVBQX1JBVEVTKQotICAgIHsKLSAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUGVlclByb2JlUmVxU2FuaXR5IGZhaWwgLSB3cm9uZyBTdXBwb3J0UmF0ZXMgSUUoVHlwZT0lZCxMZW49JWQpXG4iLHBGcmFtZS0+T2N0ZXRbSWR4XSxwRnJhbWUtPk9jdGV0W0lkeCsxXSkpOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotICAgIGVsc2UKLSAgICB7Ci0gICAgICAgIGlmICgocEFkLT5Db21tb25DZmcuUGh5TW9kZSA9PSBQSFlfMTFHKSAmJiAoUmF0ZUxlbiA8IDgpKQotICAgICAgICAgICAgcmV0dXJuIChGQUxTRSk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBHZXRUaW1CaXQoCi0gICAgSU4gQ0hBUiAqUHRyLAotICAgIElOIFVTSE9SVCBBaWQsCi0gICAgT1VUIFVDSEFSICpUaW1MZW4sCi0gICAgT1VUIFVDSEFSICpCY2FzdEZsYWcsCi0gICAgT1VUIFVDSEFSICpEdGltQ291bnQsCi0gICAgT1VUIFVDSEFSICpEdGltUGVyaW9kLAotICAgIE9VVCBVQ0hBUiAqTWVzc2FnZVRvTWUpCi17Ci0gICAgVUNIQVIgICAgICAgICAgQml0Q250bCwgTjEsIE4yLCBNeUJ5dGUsIE15Qml0OwotICAgIENIQVIgICAgICAgICAgKklkeFB0cjsKLQotICAgIElkeFB0ci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Bzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0Jc3luYy5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JSm9obiBDaGFuZwkyMDA0LTA5LTAxICAgICAgbW9kaWZpZWQgZm9yIHJ0MjU2MS8yNjYxCi0JSmFuIExlZQkJMjAwNi0wOC0wMSAgICAgIG1vZGlmaWVkIGZvciBydDI4NjAgZm9yIDgwMi4xMW4KLSovCi0jaW5jbHVkZSAiLi4vcnRfY29uZmlnLmgiCi0KLSNkZWZpbmUgQURIT0NfRU5UUllfQkVBQ09OX0xPU1RfVElNRQkoMipPU19IWikJLy8gMiBzZWMKLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlUaGUgc3luYyBzdGF0ZSBtYWNoaW5lLAotCVBhcmFtZXRlcnM6Ci0JCVNtIC0gcG9pbnRlciB0byB0aGUgc3RhdGUgbWFja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bkNmZy5Tc2lkLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN1cFJhdGVJZSwKLQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPlN0YUFjdGl2ZS5TdXBSYXRlTGVuLAotCQkJCQkJCSAgcEFkLT5TdGFBY3RpdmUuU3VwUmF0ZUxlbiwgICAgcEFkLT5TdGFBY3RpdmUuU3VwUmF0ZSwKLQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEc0llLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkRzTGVuLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBBZC0+Q29tbW9uQ2ZnLkNoYW5uZWwsCi0JCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSWJzc0llLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJklic3NMZW4sCi0JCQkJCQkJICAyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5TdGFBY3RpdmUuQXRpbVdpbiwKLQkJCQkJCQkgIEVORF9PRl9BUkdTKTsKLQotCQkJaWYgKHBBZC0+U3RhQWN0aXZlLkV4dFJhdGVMZW4pCi0JCQl7Ci0JCQkJVUxPTkcgdG1wOwotCQkJCU1ha2VPdXRnb2luZ0ZyYW1lKHBPdXRCdWZmZXIgKyBGcmFtZUxlbiwgICAgICAgICZ0bXAsCi0JCQkJCQkJCSAgMywgICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9jYWxFcnBJZSwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRXh0UmF0ZUllLAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPlN0YUFjdGl2ZS5FeHRSYXRlTGVuLAotCQkJCQkJCQkgIHBBZC0+U3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KLQkJCQlOZXdFeHRMZW4gPSAxOwotCQkJCS8vTmV3IGV4dGVuc2lvbiBjaGFubmVsIG9mZnNldCBJRSBpcyBpbmNsdWRlZCBpbiBCZWFjb24sIFByb2JlIFJzcCBvciBjaGFubmVsIFN3aXRjaCBBbm5vdW5jZW1lbnQgRnJhbWUKLQkJCQlpZiAocEFkLT5iQnJvYWRDb21IVCA9PSBUUlVFKQotCQkJCXsKLQkJCQkJTWFrZU91dGdvaW5nRnJhbWUocE91dEJ1ZmZlciArIEZyYW1lTGVuLCAgICAgICAgICAgICZUbXBMZW4sCi0JCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZXcGFJZSwKLQkJCQkJCQkJICA0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJST0FEQ09NWzBdLAotCQkJCQkJCQkgcEFkLT5NbG1lQXV4Lkh0Q2FwYWJpbGl0eUxlbiwgICAgICAgICAgJnBBZC0+TWxtZUF1eC5IdENhcGFiaWxpdHksCi0JCQkJCQkJCSAgRU5EX09GX0FSR1MpOwotCQkJCX0KLQkJCQllbHNlCi0JCQkJewotCQkJCU1ha2VPdXRnb2luZ0ZyYW1lKHBPdXRCdWZmZXIgKyBGcmFtZUxlbiwgICAgICAgICAgICAmVG1wTGVuLAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSHRDYXBJZSwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkh0TGVuLAotCQkJCQkJCQkgc2l6ZW9mKEhUX0NBUEFCSUxJVFlfSUUpLCAgICAgICAgICAmcEFkLT5Db21tb25DZmcuSHRDYXBhYmlsaXR5LAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmQWRkSHRJbmZvSWUsCi0JCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZBZGRIdExlbiwKLQkJCQk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PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEVucXVldWVQc1BvbGwoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpCi17Ci0jaWZkZWYgUkFMSU5LX0FURQotICAgIGlmIChBVEVfT04ocEFkKSkKLSAgICB7Ci0JCXJldHVybjsKLSAgICB9Ci0jZW5kaWYgLy8gUkFMSU5LX0FURSAvLwotCi0KLQlpZiAocEFkLT5TdGFDZmcuV2luZG93c1Bvd2VyTW9kZSA9PSBOZGlzODAyXzExUG93ZXJNb2RlTGVnYWN5X1BTUCkKLSAgICAJcEFkLT5Qc1BvbGxGcmFtZS5GQy5Qd3JNZ210ID0gUFdSX1NBVkU7Ci0JTWluaXBvcnRNTVJlcXVlc3QocEFkLCAwLCAoUFVDSEFSKSZwQWQtPlBzUG9sbEZyYW1lLCBzaXplb2YoUFNQT0xMX0ZSQU1FKSk7Ci19Ci0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgRW5xdWV1ZVByb2JlUmVxdWVzdCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlORElTX1NUQVRVUyAgICAgTlN0YXRlOwotCVBVQ0hBUiAgICAgICAgICBwT3V0QnVmZmVyOwotCVVMT05HICAgICAgICAgICBGcmFtZUxlbiA9IDA7Ci0JSEVBREVSXzgwMl8xMSAgIEhkcjgwMjExOwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiZm9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ykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0Jd3BhLmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKYW4JTGVlCQkwMy0wNy0yMgkJSW5pdGlhbAotCVBhdWwgTGluCTAzLTExLTI4CQlNb2RpZnkgZm9yIHN1cHBsaWNhbnQKLSovCi0jaW5jbHVkZSAiLi4vcnRfY29uZmlnLmgiCi0KLSNkZWZpbmUJCVdQQVJTTklFCTB4ZGQKLSNkZWZpbmUJCVdQQTJSU05JRQkweDMwCi0KLS8vZXh0ZXJuIFVDSEFSIEJJVDhbXTsKLVVDSEFSCUNpcGhlcldwYVBza1RraXBbXSA9IHsKLQkJMHhERCwgMHgxNiwJCQkJLy8gUlNOIElFCi0JCTB4MDAsIDB4NTAsIDB4ZjIsIDB4MDEsCS8vIG91aQotCQkweDAxLCAwe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qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSAgICBNb2R1bGUgTmFtZToKLSAgICBzdGFfaW9jdGwuYwotCi0gICAgQWJzdHJhY3Q6Ci0gICAgSU9DVEwgcmVsYXRlZCBzdWJyb3V0aW5lcwotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgICBXaGVuICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLSAgICAtLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBSb3J5IENoZW4gICAwMS0wMy0yMDAzICAgIGNyZWF0ZWQKLQlSb3J5IENoZW4gICAwMi0xNC0yMDA1ICAgIG1vZGlmeSB0byBzdXBwb3J0IFJUNjEKLSovCi0KLSNpbmNsdWRlCSJydF9jb25maWc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gIGVsc2UKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLSAgICAgICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIk1vbml0b3IgTW9kZShDaGFubmVsICVkKVxuIiwgcEFkLT5Db21tb25DZmcuQ2hhbm5lbCk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+SW5kaWNhdGVNZWRpYVN0YXRlID09IE5kaXNNZWRpYVN0YXRlQ29ubmVjdGVkKQotICAgICAgICAgICAgCXsKLSAgICAgICAgICAgIAkgICAgaWYgKElORlJBX09OKHBBZCkpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIkNvbm5lY3RlZChBUDogJXNbJTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOiUwMlhdKVxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLlNzaWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFswXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzFdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbMl0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFszXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzRdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbNV0pOwotICAgICAgICAgICAgCQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSAsKCJTc2lkPSVzICxTc2lkbGVuID0gJWRcbiIscEFkLT5Db21tb25DZmcuU3NpZCwgcEFkLT5Db21tb25DZmcuU3NpZExlbikpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoQURIT0NfT04ocEFkKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJDb25uZWN0ZWRcbiIpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgIAllbHNlCi0gICAgICAgICAgICAJewotICAgICAgICAgICAgCSAgICBzcHJpbnRmKGV4dHJhLCAiRGlzY29ubmVjdGVkXG4iKTsKLSAgICAgICAgICAgIAkJREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UgLCgiQ29ublN0YXR1cyBpcyBub3QgY29ubmVjdGVkXG4iKSk7Ci0gICAgICAgICAgICAJfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBTSE9XX0RSVklFUl9WRVJJT046Ci0gICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiRHJpdmVyIHZlcnNpb24tJXMsICVzICVzXG4iLCBTVEFfRFJJVkVSX1ZFUlNJT04sIF9fREFURV9fLCBfX1RJTUVfXyApOwotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSNpZmRlZiBET1QxMV9OX1NVUFBPUlQKLSAgICAgICAgY2FzZSBTSE9XX0JBX0lORk86Ci0gICAgICAgICAgICBnZXRCYUluZm8ocEFkLCBleHRyYSk7Ci0gICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcM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kLT5FeHRyYUluZm8gPSBTV19SQURJT19PRkY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIlJhZGlvIE9mZlxuIik7Ci0gICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcMCcKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJBSU9fT046Ci0gICAgICAgICAgICBpZiAoUlRNUF9URVNUX0ZMQUcocEFkLCBmUlRNUF9BREFQVEVSX0JTU19TQ0FOX0lOX1BST0dSRVNTKSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiU2Nhbm5pbmdcbiIpOwotICAgICAgICAgICAgICAgIHdycS0+bGVuZ3RoID0gc3RybGVuKGV4dHJhKSArIDE7IC8vIDE6IHNpemUgb2YgJ1wwJwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkLT5TdGFDZmcuYlN3UmFkaW8gPSBUUlVFOwotICAgICAgICAgICAgLy9pZiAocEFkLT5TdGFDZmcuYlJhZGlvICE9IChwQWQtPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWQtPlN0YUNmZy5iU3dSYWRpbykpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgcEFkLT5TdGFDZmcuYlJhZGlvID0gKHBBZC0+U3RhQ2ZnLmJId1JhZGlvICYmIHBBZC0+U3RhQ2ZnLmJTd1JhZGlvKTsKLSAgICAgICAgICAgICAgICBpZiAocEFkLT5TdGFDZmcuYlJhZGlvID09IFRSVUUpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBNbG1lUmFkaW9PbihwQWQpOwotICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJcEFkLT5FeH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JsZWQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlIGlmIChwYXJhbS0+dmFsdWUgPT0gSVdfQVVUSF9DSVBIRVJfVEtJUCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkdyb3VwQ2lwaGVyID0gTmRpczgwMl8xMUVuY3J5cHRpb24yRW5hYmxlZDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtLT52YWx1ZSA9PSBJV19BVVRIX0NJUEhFUl9DQ01QKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgPSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiJXM6OklXX0FVVEhfQ0lQSEVSX0dST1VQIC0gcGFyYW0tPnZhbHVlID0gJWQhXG4iLCBfX2Z1bmNfXywgcGFyYW0tPnZhbHVlKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAJY2FzZSBJV19BVVRIX0tFWV9NR01UOgotICAgICAgICAgICAgaWYgKHBhcmFtLT52YWx1ZSA9PSBJV19BVVRIX0tFWV9NR01UXzgwMl8xWCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9PSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlV1BBOwotI2lmZGVmIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5JRUVFODAyMVggPSBGQUxTR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ICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVEFfUE9SVF9TRUNVUkVEKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQkJfQotICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfR1JPVVBfS0VZKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfVEtJUCwgVFJVRSwgZXh0KTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IDgwMi4xeCBwb3J0IGNvbnRyb2wKLSAgICAgICAgICAgIAkgICAgICAgIC8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgCSAgICAgICAgU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgSVdfRU5DT0RFX0FMR19DQ01QOgotICAgICAgICAgICAgICAgIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfU0VUX1RYX0tFWSkKLQkJewotICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfQUVTLCBGQUxTRSwgZXh0KTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgCS8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgICAgICAJU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKGV4dC0+ZXh0X2ZsYWdzICYgSVdfRU5DT0RFX0VYVF9HUk9VUF9LRVkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfQUVTLCBUUlVFLCBleHQpOwotCi0gICAgICAgICAgICAgICAgICAgIC8vIHNldCA4MDIuMXggcG9ydCBjb250cm9sCi0gICAgICAgIAkgICAgICAgIC8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAJICAgICAgICBTVEFfUE9SVF9TRUNVUkVEKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgCQlkZWZhdWx0OgotICAgIAkJCXJldHVybiAtRUlOVkFMOwotCQl9Ci0gICAgfQotCi0gICAgcmV0dXJuIDA7Ci19Ci0KLWludAotcnRfaW9jdGxfZ2l3ZW5jb2RlZXh0KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCi0JCQkgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCi0JCQkgIHVuaW9uIGl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wKLSAgICBJTiAgSU5UICAgICAgICAgICAgICAgICBjbWQpCi17Ci0gICAgc3RydWN0IGl3cmVxICAgICAgICAgICAgICAgICAgICAgICAgKndycSA9IChzdHJ1Y3QgaXdyZXEgKikgcnE7Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZDsKLSAgICBORElTXzgwMl8xMV9NQUNfQUREUkVTUyAgICAgICAgICAgICBCc3NpZDsKLSAgICBSVF84MDJfMTFfUEhZX01PREUgICAgICAgICAgICAgICAgICBQaHlNb2RlOwotICAgIFJUXzgwMl8xMV9TVEFfQ09ORklHICAgICAgICAgICAgICAgIFN0YUNvbmZpZzsKLSAgICBORElTXzgwMl8xMV9SQVRFUyAgICAgICAgICAgICAgICAgICBhcnlSYXRlczsKLSAgICBSVF84MDJfMTFfUFJFQU1CTEUgICAgICAgICAgICAgICAgICBQcmVhbWJsZTsKLSAgICBORElTXzgwMl8xMV9XRVBfU1RBVFVTICAgICAgICAgICAgICBXZXBTdGF0dXM7Ci0gICAgTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERSAgICAgQXV0aE1vZGUgPSBOZGlzODAyXzExQXV0aE1vZGVNYXg7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19JTkZSQVNUUlVDVFVSRSAgQnNzVHlwZTsKLSAgICBORElTXzgwMl8xMV9SVFNfVEhSRVNIT0xEICAgICAgICAgICBSdHNUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQgRnJhZ1RocmVzaDsKLSAgICBORElTXzgwMl8xMV9QT1dFUl9NT0RFICAgICAgICAgICAgICBQb3dlck1vZGU7Ci0gICAgUE5ESVNfODAyXzExX0tFWSAgICAgICAgICAgICAgICAgICAgcEtleSA9IE5VTEw7Ci0gICAgUE5ESVNfODAyXzExX1dFUAkJCSAgICAgICAgcFdlcEtleSA9TlVMTDsKLSAgICBQTkRJU184MDJfMTFfUkVNT1ZFX0tFWSAgICAgICAgICAgICBwUmVtb3ZlS2V5ID0gTlVMTDsKLSAgICBORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OICAgICAgICAgICBDb25maWcsICpwQ29uZmlnID0gTlVMTDsKLSAgICBORElTXzgwMl8xMV9ORVRXT1JLX1RZUEUgICAgICAgICAgICBOZXRUeXBlOwotICAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vdzsKLSAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlJZHggPSAwOwotICAgIElOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IE5ESVNfU1RBVFVTX1NVQ0NFU1MsIE1heFBoeU1vZGUgPSBQSFlfMTFHOwotICAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvd2VyVGVtcDsKLSAgICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSYWRpb1N0YXRlOwotICAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBGQUxTRTsKLSNpZmRlZiBET1QxMV9OX1NVUFBPUlQKLQlPSURfU0VUX0hUX1BIWU1PREUJCQkJCUhUX1BoeU1vZGU7CS8vMTFuICxrYXRoeQotI2VuZGlmIC8vIERPVDExX05fU1VQUE9SVCAvLwotI2lmZGVmIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQKLSAgICBQTkRJU184MDJfMTFfUE1LSUQgICAgICAgICAgICAgICAgICBwUG1rSWQgPSBOVUxMOwotICAgIEJPT0xFQU4JCQkJICAgICAgICAgICAgICAgIElFRUU4MDIxeFN0YXRlID0gRkFMU0U7Ci0gICAgQk9PTEVBTgkJCQkgICAgICAgICAgICAgICAgSUVFRTgwMjF4X3JlcXVpcmVkX2tleXMgPSBGQUxTRTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB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U2NhbkNudCA9IDA7Ci0gICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkxhc3RTY2FuVGltZSA9IE5vdzsKLQotCQkJcEFkYXB0ZXItPlN0YUNmZy5iU2NhblJlcUlzRnJvbVdlYlVJID0gVFJVRTsKLSAgICAgICAgICAgIFJUTVBfU0VUX0ZMQUcocEFkYXB0ZXIsIGZSVE1QX0FEQVBURVJfQlNTX1NDQU5fSU5fUFJPR1JFU1MpOwotICAgICAgICAgICAgTWxtZUVucXVldWUocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwKLSAgICAgICAgICAgICAgICAgICAgICAgIE9JRF84MDJfMTFfQlNTSURfTElTVF9TQ0FOLAotICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotCi0gICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotICAgICAgICAgICAgU3RhdGVNYWNoaW5lVG91Y2hlZCA9IFRSVUU7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1NTSUQ6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9TU0lEKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgCVBDSEFSIHBTc2lkU3RyaW5nID0gTlVMTDsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmU3NpZCwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLQotCQkJCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9TU0lEIChMZW49JWQsU3NpZD0lcylcbiI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LT5NbG1lLkNudGxNYWNoaW5lLkN1cnJTdGF0ZSAhPSBDTlRMX0lETEUpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBSVDI4WFhfTUxNRV9SRVNFVF9TVEFURV9NQUNISU5FKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiISEhIE1MTUUgYnVzeSwgcmVzZXQgTUxNRSBzdGF0ZSBtYWNoaW5lICEhIVxuIikpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBPSURfODAyXzExX0JTU0lELAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZihORElTXzgwMl8xMV9NQUNfQUREUkVTUyksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKikmQnNzaWQpOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IE5ESVNfU1RBVFVTX1NVQ0NFU1M7Ci0gICAgICAgICAgICAgICAgU3RhdGVNYWNoaW5lVG91Y2hlZCA9IFRSVUU7Ci0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQlNTSUQgJTAyeDolMDJ4OiUwMng6JTAyeDolMDJ4OiUwMnhcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzaWRbMF0sIEJzc2lkWzFdLCBCc3NpZFsyXSwgQnNzaWRbM10sIEJzc2lkWzRdLCBCc3NpZFs1XSkpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9SQURJTzoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKEJPT0xFQU4pKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZSYWRpb1N0YXRlLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9SQURJTyAoPSVkKVxuIiwgUmFkaW9TdGF0ZSkpOwotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvICE9IFJhZGlvU3RhdGUpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvID0gUmFkaW9TdGF0ZTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuYlJhZGlvICE9IChwQWRhcHRlci0+U3RhQ2ZnLmJId1JhZGlvICYmIHBBZGFwdGVyLT5TdGFDZmcuYlN3UmFkaW8pKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLmJSYWRpbyA9IChwQWRhcHRlci0+U3RhQ2ZnLmJId1JhZGlvICYmIHBBZGFwdGVyLT5TdGFDZmcuYlN3UmFkaW8pOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuYlJhZGlvID09IFRSVUUpCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgTWxtZVJhZGlvT24ocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBleHRyYSBpbmZvcm1hdGlvbgotCQkJCQkJCXBBZGFwdGVyLT5FeHRyYUluZm8gPSBFWFRSQV9JTkZPX0NMRUFSOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1sbWVSYWRpb09mZihwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIGV4dHJhIGluZm9ybWF0aW9uCi0JCQkJCQkJcEFkYXB0ZXItPkV4dHJhSW5mbyA9IFNXX1JBRElPX09GRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJUX09JRF84MDJfMTFfUEhZX01PREU6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihSVF84MDJfMTFfUEhZX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZQaHlNb2RlLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotCQkJCWlmIChQaHlNb2RlIDw9IE1heFBoeU1vZGUpCi0JCQkJewotICAgICAgICAgICAgICAgIAlSVE1QU2V0UGh5TW9kZShwQWRhcHRlciwgUGh5TW9kZSk7Ci0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCi0JCQkJCVNldENvbW1vbkhUKHBBZGFwdGVyKTsKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLQkJCQl9Ci0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lIG9mICJVU0UgT0ZETSByYXRlIG9yIG5vdCIgaW4gQURIT0MgbW9kZQotICAgICAgICAgICAgICAgICAgICAvLyBpZiBzZXR0aW5nIGNoYW5nZWQsIG5lZWQgdG8gcmVzZXQgY3VycmVudCBUWCByYXRlIGFzIHdlbGwgYXMgQkVBQ09OIGZyYW1lIGZvcm1hdAotICAgICAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5Cc3NUeXBlID09IEJTU19BREhPQykKLSAgICAgICAgICAgICAgICAgICAgewotCQkJCQkJcEFkYXB0ZXItPkNvbW1vbkNmZy5QaHlNb2RlID0gU3RhQ29uZmlnLkFkaG9jTW9kZTsKLSAgICAgICAgICAgICAgICAgICAgCVJUTVBTZXRQaHlNb2RlKHBBZGFwdGVyLCBQaHlNb2RlKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIE1sbWVVcGRhdGVUeFJhdGVzKHBBZGFwdGVyLCBGQUxTRSwgMCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBNYWtlSWJzc0JlYWNvbihwQWRhcHRlcik7ICAgICAgICAgICAvLyByZS1idWlsZCBCRUFDT04gZnJhbWUKLSAgICAgICAgICAgICAgICAgICAgICAgIEFzaWNFbmFibGVJYnNzU3luYyhwQWRhcHRlcik7ICAgLy8gY29weSB0byBvbi1jaGlwIG1lbW9yeQotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9TRVRfU1RBX0NPTkZJRyAoQnVyc3Q9JWQsIFByb3RlY3Rpb249JWxkLFNob3J0U2xvdD0lZFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLmJFbmFibGVUeEJ1cnN0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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ICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkRlc2lyZVJhdGVbMl0scEFkYXB0ZXItPkNvbW1vbkNmZy5EZXNpcmVSYXRlWzNdLAotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkRlc2lyZVJhdGVbNF0scEFkYXB0ZXItPkNvbW1vbkNmZy5EZXNpcmVSYXRlWzVdLAotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkRlc2lyZVJhdGVbNl0scEFkYXB0ZXItPkNvbW1vbkNmZy5EZXNpcmVSYXRlWzddICkpOwotICAgICAgICAgICAgICAgIC8vIENoYW5naW5nIERlc2lyZWRSYXRlIG1heSBhZmZlY3QgdGhlIE1BWCBUWCByYXRlIHdlIHVzZWQgdG8gVFggZnJhbWVzIG91dAotICAgICAgICAgICAgICAgIE1sbWVVcGRhdGVUeFJhdGVzKHBBZGFwdGVyLCBGQUxTRSwgMCk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BSRUFNQkxFOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoUlRfODAyXzExX1BSRUFNQkxFKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUHJlYW1ibGUsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgaWYgKFByZWFtYmxlID09IFJ0ODAyXzExUHJlYW1ibGVTaG9ydCkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuVHhQcmVhbWJsZSA9IFByZWFtYmxlOwotICAgICAgICAgICAgICAgICAgICBNbG1lU2V0VHhQcmVhbWJsZShwQWRhcHRlciwgUnQ4MDJfMTFQcmVhbWJsZVNob3J0KTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSBpZiAoKFByZWFtYmxlID09IFJ0ODAyXzExUHJlYW1ibGVMb25nKSB8fCAoUHJlYW1ibGUgPT0gUnQ4MDJfMTFQcmVhbWJsZUF1dG8pKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgLy8gaWYgdXNlciB3YW50cyBBVVRPLCBpbml0aWFsaXplIHRvIExPTkcgaGVyZSwgdGhlbiBjaGFuZ2UgYWNjb3JkaW5nIHRvIEFQJ3MKLSAgICAgICAgICAgICAgICAgICAgLy8gY2FwYWJpbGl0eSB1cG9uIGFzc29jaWF0aW9uLgotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlR4UHJlYW1ibGUgPSBQcmVhbWJsZTsKLSAgICAgICAgICAgICAgICAgICAgTWxtZVNldFR4UHJlYW1ibGUocEFkYXB0ZXIsIFJ0ODAyXzExUHJlYW1ibGVMb25nKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgU3RhdHVzID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9QUkVBTUJMRSAoPSVkKVxuIiwgUHJlYW1ibGUpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfV0VQX1NUQVRVUzoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX1dFUF9TVEFUVVMpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZXZXBTdGF0dXMsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgLy8gU2luY2UgVEtJUCwgQUVTLCBXRVAgYXJlIGFsbCBzdXBwb3J0ZWQuIEl0IHNob3VsZCBub3QgaGF2ZSBhbnkgaW52YWxpZCBzZXR0aW5nCi0gICAgICAgICAgICAgICAgaWYgKFdlcFN0YXR1cyA8PSBOZGlzODAyXzExRW5jcnlwdGlvbjNLZXlBYnNlbnQpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5XZXBTdGF0dXMgIT0gV2VwU3RhdHVzKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBDb25maWcgaGFzIGNoYW5nZWQKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5iQ29uZmlnQ2hhbmdlZCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XZXBTdGF0dXMgICAgID0gV2VwU3RhdHVzOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLk9yaWdXZXBTdGF0dXMgPSBXZXBTdGF0dXM7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuUGFpckNpcGhlciAgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICAJcEFkYXB0ZXItPlN0YUNmZy5Hcm91cENpcGhlciAgID0gV2VwU3RhdHVzOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9XRVBfU1RBVFVTICg9JWQpXG4iLFdlcFN0YXR1cykpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9BVVRIRU5USUNBVElPTl9NT0RFOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERSkpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJkF1dGhNb2RlLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIGlmIChBdXRoTW9kZSA+IE5kaXM4MDJfMTFBdXRoTW9kZU1heCkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgIT0gQXV0aE1vZGUpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICA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CAoPSVsZClcbiIsUnRzVGhyZXNoKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoTkRJU184MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZGcmFnVGhyZXNoLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuYlVzZVplcm9Ub0Rpc2FibGVGcmFnbWVudCA9IEZBTFNFOwotICAgICAgICAgICAgICAgIGlmIChGcmFnVGhyZXNoID4gTUFYX0ZSQUdfVEhSRVNIT0xEIHx8IEZyYWdUaHJlc2ggPCBNSU5fRlJBR19USFJFU0hPTEQpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBpZiAoRnJhZ1RocmVzaCA9PSAwKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkZyYWdtZW50VGhyZXNob2xkID0gTUFYX0ZSQUdfVEhSRVNIT0xEOwotICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5iVXNlWmVyb1RvRGlzYWJsZUZyYWdtZW50ID0gVFJVRTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICB9Ci0gICA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REJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpSVF9PSURfODAyXzExX0FERF9XUEEgKGlkPTB4JXgsIExlbj0lZC1ieXRlKVxuIiwgcEtleS0+S2V5SW5kZXgsIHBLZXktPktleUxlbmd0aCkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLldwYVN0YXRlID0gU1NfTk9UVVNFOwotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfQUREX1dQQSAoaWQ9MHgleCwgTGVuPSVkLWJ5dGUpXG4iLCBwS2V5LT5LZXlJbmRleCwgcEtleS0+S2V5TGVuZ3RoKSk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAga2ZyZWUocEtleSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1JFTU9WRV9LRVk6Ci0gICAgICAgICAgICBwUmVtb3ZlS2V5ID0ga21hbGxvYyh3cnEtPnUuZGF0YS5sZW5ndGgsIE1FTV9BTExPQ19GTEFHKTsKLSAgICAgICAgICAgIGlmKHBSZW1vdmVLZXkgPT0gTlVMTCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRU5PTUVNOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotCi0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcihwUmVtb3ZlS2V5LCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgaWYgKHBSZW1vdmVLZXktPkxlbmd0aCAhPSB3cnEtPnUuZGF0YS5sZW5ndGgpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVksIEZhaWxlZCEhXG4iKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgUlRNUFdQQVJlbW92ZUtleVByb2MocEFkYXB0ZXIsIHBSZW1vdmVLZXkpOwotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfUkVNT1ZFX0tFWSwgUmVtb3ZlIFdQQSBLZXkhIVxuIikpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBLZXlJZHggPSBwUmVtb3ZlS2V5LT5LZXlJbmRleDsKLQotICAgICAgICAgICAgICAgICAgICBpZiAoS2V5SWR4ICYgMHg4MDAwMDAwMCkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2hvdWxkIG5ldmVyIHNldCBkZWZhdWx0IGJpdCB3aGVuIHJlbW92ZSBrZXkKLSAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVksIEZhaWxlZCEhKFNob3VsZCBuZXZlciBzZXQgZGVmYXVsdCBiaXQgd2hlbiByZW1vdmUga2V5KVxuIikpOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gS2V5SWR4ICYgMHgwZmZmZmZmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChLZXlJZHggPiAzKQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIShLZXlJZFslZF0gb3V0IG9mIHJhbmdlKVxuIiwgS2V5SWR4KSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLktleUxlbiA9IDA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLkNpcGhlckFsZyA9IENJUEhFUl9OT05FOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFzaWNSZW1vdmVTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwgMCwgKFVDSEFSKUtleUlkeCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVkgKGlkPTB4JXgsIExlbj0lZC1ieXRlKVxuIiwgcFJlbW92ZUtleS0+S2V5SW5kZXgsIHBSZW1vdmVLZXktPkxlbmd0aCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAga2ZyZWUocFJlbW92ZUtleSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgLy8gTmV3IGZvciBXUEEKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0FERF9LRVk6Ci0gICAgICAgICAgICBwS2V5ID0ga21hbGxvYyh3cnEtPnUuZGF0YS5sZW5ndGgsIE1FTV9BTExPQ19GTEFHKTsKLSAgICAgICAgICAgIGlmKHBLZXkgPT0gTlVMTCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRU5PTUVNOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9BRERfS0VZLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFJUTVBBZGRLZXkocEFkYXB0ZXIsIHBLZXkpOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9BRERfS0VZIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBLZXktPktleUluZGV4LCBwS2V5LT5LZXlMZW5ndGgpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9DT05GSUdVUkFUSU9OOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTikpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJkNvbmZpZywgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBwQ29uZmlnID0gJkNvbmZpZzsKLQotICAgICAgICAgICAgICAgIGlmICgocENvbmZpZy0+QmVhY29uUGVyaW9kID49IDIwKSAmJiAocENvbmZpZy0+QmVhY29uUGVyaW9kIDw9NDAwKSkKLSAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuQmVhY29uUGVyaW9kID0gKFVTSE9SVCkgcENvbmZpZy0+QmVhY29uUGVyaW9kOwotCi0gICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUFjdGl2ZS5BdGltV2luID0gKFVTSE9SVCkgcENvbmZpZy0+QVRJTVdpbmRvdzsKLSAgICAgICAgICAgICAgICBNQVBfS0haX1RPX0NIQU5ORUxfSUQocENvbmZpZy0+RFNDb25maWcsIHBBZGFwdGVyLT5Db21tb25DZmcuQ2hhbm5lbCk7Ci0gICAgICAgICAgICAgICAgLy8KLQkJCQkvLyBTYXZlIHRoZSBjaGFubmVsIG9uIE1sbWVBdXggZm9yIENudGxPaWRSVEJzc2lkUHJvYyB1c2VkLgotCQkJCS8vCi0JCQkJcEFkYXB0ZXItPk1sbWVBdXguQ2hhbm5lbCA9IHBBZGFwdGVyLT5Db21tb25DZmcuQ2hhbm5lbDsKLQotICAgICAgICAgICAgICA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bWF0Y2gpISFcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLQkJICAgICAgICBLZXlJZHggPSBwV2VwS2V5LT5LZXlJbmRleCAmIDB4MGZmZmZmZmY7Ci0gICAgICAgICAgICAgICAgLy8gS2V5SWR4IG11c3QgYmUgMCB+IDMKLSAgICAgICAgICAgICAgICBpZiAoS2V5SWR4ID4gNCkKLSAgICAJCQl7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX1dFUCwgRmFpbGVkIChLZXlJZHggbXVzdCBiZSBzbWFsbGVyIHRoYW4gNCkhIVxuIikpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBVQ0hBUiBDaXBoZXJBbGcgPSAwOwotICAgICAgICAgICAgICAgICAgICBQVUNIQVIgS2V5OwotCi0gICAgICAgICAgICAgICAgICAgIC8vIHNldCBrZXkgbWF0ZXJpYWwgYW5kIGtleSBsZW5ndGgKLSAgICAgICAgICAgICAgICAgICAgTmRpc1plcm9NZW1vcnkocEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLktleSwgMTYpOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdW0tleUlkeF0uS2V5TGVuID0gKFVDSEFSKSBwV2VwS2V5LT5LZXlMZW5ndGg7Ci0gICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXksICZwV2VwS2V5LT5LZXlNYXRlcmlhbCwgcFdlcEtleS0+S2V5TGVuZ3RoKTsKLQotICAgICAgICAgICAgICAgICAgICBzd2l0Y2gocFdlcEtleS0+S2V5TGVuZ3RoKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDU6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMzoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaXBoZXJBbGcgPSBDSVBIRVJfV0VQMTI4OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX1dFUCwgb25seSBzdXBwb3J0IENJUEhFUl9XRVA2NChsZW46NSkgJiBDSVBIRVJfV0VQMTI4KGxlbjoxMykhIVxuIikpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLkNpcGhlckFsZyA9IENpcGhlckFsZzsKLQotICAgICAgICAgICAgICAgICAgICAvLyBEZWZhdWx0IGtleSBmb3IgdHggKHNoYXJlZCBrZXkpCi0gICAgICAgICAgICAgICAgICAgIGlmIChwV2VwS2V5LT5LZXlJbmRleCAmIDB4ODAwMDAwMDApCi0gICAgICAgICAgICAgICAgICAgIHsKLSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9TVVBQT1JUCi0gICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQga2V5IG1hdGVyaWF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AgIGNhc2UgT0lEX1NFVF9DT1VOVEVSTUVBU1VSRVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihpbnQpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGludCBlbmFibGVkID0gMDsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmZW5hYmxlZCwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCA9PSAxKQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLmJCbG9ja0Fzc29jID0gVFJVRTsKLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIC8vIFdQQSBNSUMgZXJyb3Igc2hvdWxkIGJsb2NrIGFzc29jaWF0aW9uIGF0dGVtcHQgZm9yIDYwIHNlY29uZHMKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5iQmxvY2tBc3NvYyA9IEZBTFNFOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEX1NFVF9DT1VOVEVSTUVBU1VSRVMgYkJsb2NrQXNzb2M9JXNcbiIsIHBBZGFwdGVyLT5TdGFDZmcuYkJsb2NrQXNzb2MgPyAiVFJVRSI6IkZBTFNFIikpOwotICAgICAgICAgICAgfQotCSAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEX1dQQV9TVVBQTElDQU5UX1NVUFBPUlQ6Ci0JCQlpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihVQ0hBUikpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAg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sZW5ndGgpOwotICAgICAgICAgICAgICAgIE1sbWVEZWF1dGhSZXFBY3Rpb24ocEFkYXB0ZXIsIE1zZ0VsZW0pOwotCQkJCWtmcmVlKE1zZ0VsZW0pOwotCi0gICAgICAgICAgICAgICAgaWYgKElORlJBX09OKHBBZGFwdGVyKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIExpbmtEb3duKHBBZGFwdGVyLCBGQUxTRSk7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5NbG1lLkFzc29jTWFjaGluZS5DdXJyU3RhdGUgPSBBU1NPQ19JRExFOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfREVBVVRIRU5USUNBVElPTiAoUmVhc29uPSVkKVxuIiwgcEluZm8tPlJlYXNvbikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9EUk9QX1VORU5DUllQVEVEOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoaW50KSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBpbnQgZW5hYmxlZCA9IDA7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJmVuYWJsZWQsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgaWYgKGVuYWJsZWQgPT0gMSkKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9OT1RfU0VDVVJFRDsKLSAgICAgICAgICA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Ci0gICAgcmV0dXJuIFN0YXR1czsKLX0KLQotSU5UIFJUTVBRdWVyeUluZm9ybWF0aW9uKAotICAgIElOICBQUlRNUF9BREFQVEVSIHBBZGFwdGVyLAotICAgIElOICBPVVQgc3RydWN0IGlmcmVxICAgICpycSwKLSAgICBJTiAgSU5UICAgICAgICAgICAgICAgICBjbWQpCi17Ci0gICAgc3RydWN0IGl3cmVxICAgICAgICAgICAgICAgICAgICAgICAgKndycSA9IChzdHJ1Y3QgaXdyZXEgKikgcnE7Ci0gICAgTkRJU184MDJfMTFfQlNTSURfTElTVF9FWCAgICAgICAgICAgKnBCc3NpZExpc3QgPSBOVUxMOwotICAgIFBORElTX1dMQU5fQlNTSURfRVggICAgICAgICAgICAgICAgIHBCc3M7Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZDsKLSAgICBORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OICAgICAgICAgICAqcENvbmZpZ3VyYXRpb24gPSBOVUxMOwotICAgIFJUXzgwMl8xMV9MSU5LX1NUQVRVUyAgICAgICAgICAgICAgICpwTGlua1N0YXR1cyA9IE5VTEw7Ci0gICAgUlRfODAyXzExX1NUQV9DT05GSUcgICAgICAgICAgICAgICAgKnBTdGFDb25maWcgPSBOVUxMOwotICAgIE5ESVNfODAyXzExX1NUQVRJU1RJQ1MgICAgICAgICAgICAgICpwU3RhdGlzdGljcyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfUlRTX1RIUkVTSE9MRCAgICAgICAgICAgUnRzVGhyZXNoOwotICAgIE5ESVNfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEIEZyYWdUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfUE9XRVJfTU9ERSAgICAgICAgICAgICAgUG93ZXJNb2RlOwotICAgIE5ESVNfODAyXzExX05FVFdPUktfSU5GUkFTVFJVQ1RVUkUgIEJzc1R5cGU7Ci0gICAgUlRfODAyXzExX1BSRUFNQkxFICAgICAgICAgICAgICAgICAgUHJlYW1UeXBlOwotICAgIE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUgICAgIEF1dGhNb2RlOwotICAgIE5ESVNfODAyXzExX1dFUF9TVEFUVVMgICAgICAgICAgICAgIFdlcFN0YXR1czsKLSAgICBORElTX01FRElBX1NUQVRFICAgICAgICAgICAgICAgICAgICBNZWRpYVN0YXRlOwotICAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJzc0J1ZlNpemUsIHVsSW5mbz0wLCBOZXR3b3JrVHlwZUxpc3RbNF0sIGFwc2QgPSAwOwotICAgIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJzc0xlbiA9IDA7Ci0gICAgUFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEJ1ZiA9IE5VTEwsIHBQdHI7Ci0gICAgSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLSAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZV92ZXJzaW9uX2NvbXBpbGVkOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGksIFBhZGRpbmcgPSAwOwotICAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJhZGlvU3RhdGU7Ci0JVUNIQVIJZHJpdmVyVmVyc2lvbls4XTsKLSAgICBPSURfU0VUX0hUX1BIWU1PREUJCQkgICAgICAgICpwSFRQaHlNb2RlID0gTlVMTDsKLQotCi0jaWZkZWYgU05NUF9TVVBQT1JUCi0JLy9mb3Igc25tcCwga2F0aHkKLQlEZWZhdWx0S2V5SWR4VmFsdWUJCQkqcEtleUlkeFZhbHVlOwotCUlOVAkJCQkJCQl2YWx1ZUxlbjsKLQlUWF9SVFlfQ0ZHX1NUUlVDCQkJdHhfcnR5X2NmZzsKLQlVTE9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AgICAgICAgICBpZiAoKEJzc0xlbiArIHBCc3MtPkxlbmd0aCkgPCB3cnEtPnUuZGF0YS5sZW5ndGgpCi0gICAgICAgICAgICAgICAgQnNzTGVuICs9IHBCc3MtPkxlbmd0aDsKLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQnNzaWRMaXN0LT5OdW1iZXJPZkl0ZW1zID0gaTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotI2Vsc2UKLSAgICAgICAgICAgICAgICBCc3NMZW4gKz0gcEJzcy0+TGVuZ3RoOwotI2VuZGlmCi0gICAgICAgICAgICB9Ci0KLSNpZiBXSVJFTEVTU19FWFQgPCAxNwotICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gQnNzTGVuOwotI2Vsc2UKLSAgICAgICAgICAgIGlmIChCc3NMZW4gPiB3cnEtPnUuZGF0YS5sZW5ndGgpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAga2ZyZWUocEJzc2lkTGlzdCk7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC1FMkJJRzsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBCc3NMZW47Ci0jZW5kaWYKLSAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfdG9fdXNlcih3cnEtPnUuZGF0YS5wb2ludGVyLCBwQnNzaWRMaXN0LCBCc3NMZW4pOwotICAgICAgICAgICAga2ZyZWUocEJzc2lkTGlzdCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzNfQ1VSUkVOVF9BRERSRVNTOgotICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gTUFDX0FERFJfTEVOOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS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ICAga2ZyZWUocExpbmtTdGF0dXMpOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlF1ZXJ5OjpSVF9PSURfODAyXzExX1FVRVJZX0xJTktfU1RBVFVTXG4iKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUXVlcnk6OlJUX09JRF84MDJfMTFfUVVFUllfTElOS19TVEFUVVMoa21hbGxvYyBmYWlsZWQpXG4iKSk7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVGQVVMVDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQ09ORklHVVJBVElPTjoKLSAgICAgICAgICAgIHBDb25maWd1cmF0aW9uID0gKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04gKikga21hbGxvYyhzaXplb2YoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiksIE1FTV9BTExPQ19GTEFHKTsKLSAgICAgICAgICAgIGlmIChwQ29uZmlndXJhdGlvbikKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBwQ29uZmlndXJhdGlvbi0+TGVuZ3RoID0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pOwotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5CZWFjb25QZXJpb2QgPSBwQWRhcHRlci0+Q29tbW9uQ2ZnLkJlYWNvblBlcmlvZDsKLSAgICAgICAgICAgICAgICBwQ29uZmlndXJhdGlvbi0+QVRJTVdpbmRvdyA9IHBBZGFwdGVyLT5TdGFBY3RpdmUuQXRpbVdpbjsKLSAgICAgICAgICAgICAgICBNQVBfQ0hBTk5FTF9JRF9UT19LSFoocEFkYXB0ZXItPkNvbW1vbkNmZy5DaGFubmVsLCBwQ29uZm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Db3VudC51Lkxvd1BhcnQgPSBwQWRhcHRlci0+V2xhbkNvdW50ZXJzLkZyYW1lRHVwbGljYXRlQ291bnQudS5Mb3dQYXJ0IC8gMTAwOwotI2VuZGlmCi0gICAgICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKE5ESVNfODAyXzExX1NUQVRJU1RJQ1MpOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfdG9fdXNlcih3cnEtPnUuZGF0YS5wb2ludGVyLCBwU3RhdGlzdGljcywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBrZnJlZShwU3RhdGlzdGljcyk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUXVlcnk6Ok9JRF84MDJfMTFfU1RBVElTVElDUyhrbWFsbG9jIGZhaWxlZClcbiIpKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUZBVUxUOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEX0dFTl9SQ1ZfT0s6Ci0gICAgICAgICAgICB1bEluZm8gPSBwQWRhcHRlci0+Q291bnRlcnM4MDIzLkdvb2RSZWNlaXZlczsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfR0VOX1JDVl9OT19CVUZGRVI6Ci0gICAgICAgICAgICB1bEluZm8gPSBwQWRhcHRlci0+Q291bnRlcnM4MDIzLlJ4Tm9CdWZmZXI7Ci0gICAgICA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R4QnVyc3Q7Ci0gICAgICAgICAgICAgICAgcFN0YUNvbmZpZy0+RW5hYmxlVHVyYm9SYXRlID0gMDsKLSAgICAgICAgICAgICAgICBwU3RhQ29uZmlnLT5Vc2VCR1Byb3RlY3Rpb24gPSBwQWRhcHRlci0+Q29tbW9uQ2ZnLlVzZUJHUHJvdGVjdGlvbjsKLSAgICAgICAgICAgICAgICBwU3RhQ29uZmlnLT5Vc2VTaG9ydFNsb3RUaW1lID0gcEFkYXB0ZXItPkNvbW1vbkNmZy5iVXNlU2hvcnRTbG90VGltZTsKLSAgICAgICAgICAgICAgICAvL3BTdGFDb25maWctPkFkaG9jTW9kZSA9IHBBZGFwdGVyLT5TdGFDZmcuQWRob2NNb2RlOwotICAgICAgICAgICAgICAgIHBTdGFDb25maWctPkh3UmFkaW9TdGF0dXMgPSAocEFkYXB0ZXItPlN0YUNmZy5iSHdSYWRpbyA9PSBUUlVFKSA/IDEgOiAwOwotICAgICAgICAgICAgICAgIHBTdGFDb25maWctPlJzdjEgPSAwOwotICAgICAgICAgICAgICAgIHBTdGFDb25maWctPlN5c3RlbUVycm9yQml0bWFwID0gcEFkYXB0ZXItPlN5c3RlbUVycm9yQml0bWFwOwotICAgICAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZihSVF84MDJfMTFfU1RBX0NPTkZJRyk7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsIHBTdGFDb25maWcsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAga2ZyZWUocFN0YUNvbmZpZyk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUXVlcnk6OlJUX09JRF84MDJfMTFfU1RBX0NPTkZJRyhrbWFsbG9jIGZhaWxlZClcbi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JcEFkLT5Db21tb25DZmcuYldtbUNhcGFibGUpKTsKLQotCXJldHVybiBUUlVFOwotfQotI2VuZGlmIC8vIFdNTV9TVVBQT1JUIC8vCi0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IE5ldHdvcmsgVHlwZShJbmZyYXN0cnVjdHVyZS9BZGhvYyBtb2RlKQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9OZXR3b3JrVHlwZV9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgVUlOVDMyCVZhbHVlID0gMDsKLQotICAgIGlmIChzdHJjbXAoYXJnLCAiQWRob2MiKSA9PSAwKQotCXsKLQkJaWYgKHBBZGFwdGVyLT5TdGFDZmcuQnNzVHlwZSAhPSBCU1NfQURIT0MpCi0JCXsKLQkJCS8vIENvbmZpZyBoYXMgY2hhbmdlZAotCQkJcEFkYXB0ZXItPmJDb25maWdDaGFuZ2VkID0gVFJVRTsKLSAgICAgICAgICAgIGlmIChNT05JVE9SX09OKHBBZGFwdGVyKSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBSVE1QX0lPX1dSSVRFMzIocEFkYXB0ZXIsIFJYX0ZJTFRSX0NGRywgU1RBTk9STUFMKTsKLSAgICAgICAgICAgICAgICBSVE1QX0lPX1JFQUQzMihwQWRhcHRlciwgTUFDX1NZU19DVFJMLCAmVmFsdWUpOwotCQkJCVZhb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RGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBFbmNyeXB0aW9uIFR5cGUKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfRW5jcnlwVHlwZV9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaWYgKChzdHJjbXAoYXJnLCAiTk9ORSIpID09IDApIHx8IChzdHJjbXAoYXJnLCAibm9uZSIpID09IDApKQotICAgIHsKLSAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICAgICAgcmV0dXJuIFRSVUU7ICAgIC8vIGRvIG5vdGhpbmcKLQotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLldlcFN0YXR1cyAgICAgPSBOZGlzODAyXzExV0VQRGlzYWJsZWQ7Ci0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuUGFpckNpcGhlciAgICA9IE5kaXM4MDJfMTFXRVBEaXNhYmxlZDsKLQkgICAgcEFkYXB0ZXItPlN0YUNmZy5Hcm91cENpcGhlciAgID0gTmRpczgwMl8xMVdFUERpc2FibGVkOwotICAgIH0KLSAgICBlbHNlIGlmICgoc3RyY21wKGFyZywgIldFUCIpID09IDApIHx8IChzdHJjbXAoYXJnLCAid2VwIikgPT0gMCkpCi0gICAgewotICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgICAgICByZXR1cm4gVFJVRTsgICAgLy8gZG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+U3RhQ2ZnLldlcFN0YXR1cyAgICAgPSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkOwotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBhaXJDaXBoZXIgICAgPSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkOwotCSAgICBwQWRhcHRlci0+U3RhQ2ZnLkdyb3VwQ2lwaGVyICAgPSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkOwotICAgIH0KLSAgICBlbHNlCi0gICAgICAgIHJldHVybiBGQUxTRTsKLQotICAgIHBBZGFwdGVyLT5TdGFDZmcuT3JpZ1dlcFN0YXR1cyA9IHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzOwotCi0gICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0VuY3J5cFR5cGVfUHJvYzo6KEVuY3J5cFR5cGU9JWQpXG4iLCBwQWRhcHRlci0+U3RhQ2ZnLldlcFN0YXR1cykpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IERlZmF1bHQgS2V5IElECi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0RlZmF1bHRLZXlJRF9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5SWR4OwotCi0gICAgS2V5SWR4ID0gc2ltcGxlX3N0cnRvbChhcmcsIDAsIDEwKTsKLSAgICBpZigoS2V5SWR4ID49IDEgKSAmJiAoS2V5SWR4IDw9IDQpKQotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlZmF1bHRLZXlJZCA9IChVQ0hBUikgKEtleUlkeCAtIDEgKTsKLSAgICBlbHNlCi0gICAgICAgIHJldHVybiBGQUxTRTsgIC8vSW52YWxpZCBhcmd1bWVudAotCi0gICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0RlZmF1bHRLZXlJRF9Qcm9jOjooRGVmYXVsdEtleUlEPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5EZWZhdWx0S2V5SWQpKTsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXRVAgS0VZMQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9LZXkxX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlMZW47Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaXBoZXJBbGc9Q0lQSEVSX1dFUDY0O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ERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkxX1Byb2M6OihLZXkxPSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiSGV4IikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8vSW52YWxpZCBhcmd1bWVudAotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTFfUHJvYzo6SW52YWxpZCBhcmd1bWVudCAoPSVzKVxuIiwgYXJnKSk7Ci0gICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotCi0gICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5DaXBoZXJBbGcgPSBDaXBoZXJBbGc7Ci0KLSAgICAvLyBTZXQga2V5cyAoaW50byBBU0lDKQotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgOyAgIC8vIG5vdCBzdXBwb3J0Ci0gICAgZWxzZSAgICAvLyBPbGQgV0VQIHN0dWZmCi0gICAgewotICAgICAgICBBc2ljQWRkU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMF0uQ2lwaGVyQWxnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkyCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTJfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBUUlVFOyAgICAvLyBkbyBub3RoaW5nCi0KLSAgICBLZXlMZW4gPSBzdHJsZW4oYXJnKTsKLQotICAgIHN3aXRjaCAoS2V5TGVuKQotICAgIHsKLSAgICAgICAgY2FzZSA1OiAvL3dlcCA0MCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgREJHUF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kF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgOyAgIC8vIG5vdCBzdXBwb3J0Ci0gICAgZWxzZSAgICAvLyBPbGQgV0VQIHN0dWZmCi0gICAgewotICAgICAgICBBc2ljQWRkU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMV0uQ2lwaGVyQWxnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsxXS5LZXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXRVAgS0VZMwotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9LZXkzX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlMZW47Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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IpOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDEyODsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkzX1Byb2M6OihLZXkzPSVzIGFuZCB0eXBlPUhleClcbiIsIGFyZykpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8vSW52YWxpZCBhcmd1bWVudAotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTNfUHJvYzo6SW52YWxpZCBhcmd1bWVudCAoPSVzKVxuIiwgYXJnKSk7Ci0gICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMl0uQ2lwaGVyQWxnID0gQ2lwaGVyQWxnOwotCi0gICAgLy8gU2V0IGtleXMgKGludG8gQVNJQykKLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIDsgICAvLyBub3Qgc3VwcG9ydAotICAgIGVsc2UgICAgLy8gT2xkIFdFUCBzdHVmZgotICAgIHsKLSAgICAgICAgQXNpY0FkZFNoYXJlZEtleUVudHJ5KHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzJdLkNpcGhlckFsZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMl0uS2V5LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotICAgIH0KLQotICAgIHJldHVybiBUUlVFOwotfQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgV0VQIEtFWTQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfS2V5NF9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5TGVuOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnPUNJUEhFUl9XRVA2NDsKLQotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgcmV0dXJuIFRSVUU7ICAgIC8vIGRvIG5vdGhpbmcKLQotICAgIEtleUxlbiA9IHN0cmxlbihhcmcpOwotCi0gICAgc3dpdGNoIChLZXlMZW4pCi0gICAgewotICAgICAgICBjYXNlIDU6IC8vd2VwIDQwIEFzY2lpIHR5cGUKLSAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5TGVuID0gS2V5TGVuOwotICAgICAgICAgICAgbWVtY3B5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5LCBhcmcsIEtleUxlbik7Ci0gICAgICAgICA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AgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXk0X1Byb2M6OihLZXk0PSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiQXNjaWkiKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSAyNjogLy93ZXAgMTA0IEhleCB0eXBlCi0gICAgICAgICAgICBmb3IoaT0wOyBpIDwgS2V5TGVuOyBpKyspCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYoICFpc3hkaWdpdCgqKGFyZytpKSkgKQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7ICAvL05vdCBIZXggdmFsdWU7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLktleUxlbiA9IEtleUxlbiAvIDIgOwotICAgICAgICAgICAgQXRvSChhcmcsIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5LCBLZXlMZW4gLyAyKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVAxMjg7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5NF9Qcm9jOjooS2V5ND0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OiAvL0ludmFsaWQgYXJndW1lbnQKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXk0X1Byb2M6OkludmFsaWQgYXJndW1lbnQgKD0lcylcbiIsIGFyZykpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgIH0KLSAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLkNpcGhlckFsZyA9IENpcGhlckFsZzsKLQotICAgIC8vIFNldCBrZXlzIChpbnRvIEFTSUMpCi0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICA7ICAgLy8gbm90IHN1cHBvcnQKLSAgICBlbHNlICAgIC8vIE9sZCBXRVAgc3R1ZmYKLSAgICB7Ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVszXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgV1BBIFBTSyBrZXkKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfV1BBUFNLX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICBrZX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1eC5Tc2lkTGVuLCBrZXlNYXRlcmlhbCk7Ci0gICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBBZGFwdGVyLT5TdGFDZmcuUE1LLCBrZXlNYXRlcmlhbCwgMzIpOwotICAgIH0KLQotCi0KLSAgICBpZihwQWRhcHRlci0+U3RhQ2ZnLkJzc1R5cGUgPT0gQlNTX0FESE9DICYmCi0gICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9PSBOZGlzODAyXzExQXV0aE1vZGVXUEFOb25lKQotICAgIHsKLSAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV3BhU3RhdGUgPSBTU19OT1RVU0U7Ci0gICAgfQotICAgIGVsc2UKLSAgICB7Ci0gICAgICAgIC8vIFN0YXJ0IFNUQSBzdXBwbGljYW50IHN0YXRlIG1hY2hpbmUKLSAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XcGFTdGF0ZSA9IFNTX1NUQVJUOwotICAgIH0KLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBQb3dlciBTYXZpbmcgbW9kZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9QU01vZGVfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkJzc1R5cGUgPT0gQlNTX0lORlJBKQotICAgIHsKLSAg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bvd2VyTW9kZSkpOwotICAgIH0KLSAgICBlbHNlCi0gICAgICAgIHJldHVybiBGQUxTRTsKLQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9TVVBQT1JUCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXcGFTdXBwb3J0IGZsYWcuCi0gICAgVmFsdWU6Ci0gICAgICAgIDA6IERyaXZlciBpZ25vcmUgd3BhX3N1cHBsaWNhbnQuCi0gICAgICAgIDE6IHdwYV9zdXBwbGljYW50IGluaXRpYXRlcyBzY2FubmluZyBhbmQgQVAgc2VsZWN0aW9uLgotICAgICAgICAyOiBkcml2ZXIgdGFrZXMgY2FyZSBvZiBzY2FubmluZywgQVAgc2VsZWN0aW9uLCBhbmQgSUVFRSA4MDIuMTEgYXNzb2NpYXRpb24gcGFyYW1ldGVycy4KLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfV3BhX1N1cHBvcnQoCi0gICAgSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCi0gICAgaWYgKCBzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApID09IDApCi0gICAgICAgIHBBZC0+U3RhQ2ZnLldwYVN1cHBsaWNhbnRVUCA9IFdQQV9TVVBQTElDQU5UX0RJU0FCTEU7Ci0gICAgZWxzZSBpZiAoIHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCkgPT0gMSkKLSAgICAgICAgcEFkLT5TdGFDZmcuV3BhU3VwcGxpY2FudFVQID0gV1BBX1NVUFBMSUNBTlRfRU5BQkxFOwotICAgIGVsc2UgaWYgKCBzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApID09IDIpCi0gICAgICAgIHBBZC0+U3RhQ2ZnLldwYVN1cHBsaWNhbnRVUCA9IFdQQV9TVVBQTElDQU5UX0VOQUJMRV9XSVRIX1dFQl9VSTsKLSAgICBlbHNlCi0gICAgICAgIHBBZC0+U3RhQ2ZnLldwYVN1cHBsaWNhbnRVUCA9IFdQQV9TVVBQTElDQU5UX0RJU0FCTEU7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfV3BhX1N1cHBvcnQ6OihXcGFTdXBwbGljYW50VVA9JWQpXG4iLCBwQWQtPlN0YUNmZy5XcGFTdXBwbGljYW50VVApKTsKLQotICAgIHJldHVybiBUUlVFOwotfQotI2VuZGlmIC8vIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQgLy8KLQotI2lmZGVmIERCRwotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBSZWFkIC8gV3JpdGUgTUFDCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWRhcHRlciAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgotICAgICAgICB3cnEgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgaW9jdGwgYXJndW1lbnQKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgTm9uZQotCi0gICAgTm90ZToKLSAgICAgICAgVXNhZ2U6Ci0gICAgICAgICAgICAgICAxLikgaXdwcml2IHJhMCBtYWMgMCAgICAgICAgPT0+IHJlYWQgTUFDIHdoZXJlIEFkZHI9MHgwCi0gICAgICAgICAgICAgICAyLikgaXdwcml2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F09J1wwJzsKLQotCQkJewotCQkJCUF0b0godGhpc19jaGFyLCB0ZW1wLCAyKTsKLQkJCQltYWNBZGRyID0gKnRlbXAqMjU2ICsgdGVtcFsxXTsKLQotCQkJCUF0b0godGVtcDIsIHRlbXAsIDQpOwotCQkJCW1hY1ZhbHVlID0gKnRlbXAqMjU2KjI1NioyNTYgKyB0ZW1wWzFdKjI1NioyNTYgKyB0ZW1wWzJdKjI1NiArIHRlbXBbM107Ci0KLQkJCQkvLyBkZWJ1ZyBtb2RlCi0JCQkJaWYgKG1hY0FkZHIgPT0gKEhXX0RFQlVHX1NFVFRJTkdfQkFTRSArIDQpKQotCQkJCXsKLQkJCQkJLy8gMHgyYmY0OiBieXRlMCBub24temVybzogZW5hYmxlIFIxNyB0dW5pbmcsIDA6IGRpc2FibGUgUjE3IHR1bmluZwotICAgICAgICAgICAgICAgICAgICBpZiAobWFjVmFsdWUgJiAweDAwMDAwMGZmKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+QmJwVHVuaW5nLmJFbmFibGUgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsKCJ0dXJuIG9uIFIxNyB0dW5pbmdcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIFVDSEFSIFI2NjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5CYnBUdW5pbmcuYkVuYWJsZSA9IEZBTFNFOwotICAgICAgICAgICAgICAgICAgICAgICAgUjY2ID0gMHgyNiArIEdFVF9MTkFfR0FJTihwQWRhcHRlcik7Ci0jaWZkZWYgUkFMSU5LX0FURQotCQkJCQkJaWYgKEFURV9PTihwQWRhcHRlcikpCi0JCQkJCQl7Ci0JCQkJCQkJQVRFX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lidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgc3RhX2lvY3RsLmMKLQotICAgIEFic3RyYWN0OgotICAgIElPQ1RMIHJlbGF0ZW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Y21kKQotICAgIHsKLQotICAgICAgICBjYXNlIFNIT1dfQ09OTl9TVEFUVVM6Ci0gICAgICAgICAgICBpZiAoTU9OSVRPUl9PTihwQWQpKQotICAgICAgICAgICAgewotI2lmZGVmIERPVDExX05fU1VQUE9SVAotICAgICAgICAgICAgICAgIGlmIChwQWQtPkNvbW1vbkNmZy5QaHlNb2RlID49IFBIWV8xMUFCR05fTUlYRUQgJiYKLSAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuUmVnVHJhbnNtaXRTZXR0aW5nLmZpZWxkLkJXKQotICAgICAgICAgICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiTW9uaXRvciBNb2RlKENlbnRyYWxDaGFubmVsICVkKVxuIiwgcEFkLT5Db21tb25DZmcuQ2VudHJhbENoYW5uZWwpOwotICAgICAgICAgICAgICAgIGVsc2UKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLSAgICAgICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIk1vbml0b3IgTW9kZShDaGFubmVsICVkKVxuIiwgcEFkLT5Db21tb25DZmcuQ2hhbm5lbCk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+SW5kaWNhdGVNZWRpYVN0YXRlID09IE5kaXNNZWRpYVN0YXRlQ29ubmVjdGVkKQotICAgICAgICAgICAgCXsKLSAgICAgICAgICAgIAkgICAgaWYgKElORlJBX09OKHBBZCkpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIkNvbm5lY3RlZChBUDogJXNbJTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOiUwMlhdKVxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLlNzaWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFswXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzFdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbMl0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFszXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzRdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbNV0pOwotICAgICAgICAgICAgCQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSAsKCJTc2lkPSVzICxTc2lkbGVuID0gJWRcbiIscEFkLT5Db21tb25DZmcuU3NpZCwgcEFkLT5Db21tb25DZmcuU3NpZExlbikpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoQURIT0NfT04ocEFkKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJDb25uZWN0ZWRcbiIpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgIAllbHNlCi0gICAgICAgICAgICAJewotICAgICAgICAgICAgCSAgICBzcHJpbnRmKGV4dHJhLCAiRGlzY29ubmVjdGVkXG4iKTsKLSAgICAgICAgICAgIAkJREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UgLCgiQ29ublN0YXR1cyBpcyBub3QgY29ubmVjdGVkXG4iKSk7Ci0gICAgICAgICAgICAJfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2Fz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otICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyAhPSAocEFkLT5TdGFDZmcuYkh3UmFkaW8gJiYgcEFkLT5TdGFDZmcuYlN3UmFkaW8pKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLmJSYWRpbyA9IChwQWQtPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWQtPlN0YUNmZy5iU3dSYWRpbyk7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyA9PSBGQUxTRSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIE1sbWVSYWRpb09mZihwQWQpOwotICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJcEFkLT5FeHRyYUluZm8gPSBTV19SQURJT19PRkY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIlJhZGlvIE9mZlxuIik7Ci0gICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcMCcKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJBSU9fT046Ci0gICAgICAgICAgICBpZiAoUlRNUF9URVNUX0ZMQUcocEFkLCBmUlRNUF9BREFQVEVSX0JTU19TQ0FOX0lOX1BST0dSRVNTKSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiU2Nhbm5pbmdcbiIpOwotICAgICAgICAgICAgICAgIHdycS0+bGVuZ3RoID0gc3RybGVuKGV4dHJhKSArIDE7IC8vIDE6IHNpemUgb2YgJ1wwJwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkLT5TdGFDZmcuYlN3UmFkaW8gPSBUUlV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7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAJY2FzZSBJV19BVVRIX0NJUEhFUl9HUk9VUDoKLSAgICAgICAgICAgIGlmIChwYXJhbS0+dmFsdWUgPT0gSVdfQVVUSF9DSVBIRVJfTk9ORSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkdyb3VwQ2lwaGVyID0gTmRpczgwMl8xMVdFUERpc2FibGVkOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSBpZiAocGFyYW0tPnZhbHVlID09IElXX0FVVEhfQ0lQSEVSX1dFUDQwIHx8Ci0gICAgICAgICAgICAgICAgICAgICBwYXJhbS0+dmFsdWUgPT0gSVdfQVVUSF9DSVBIRVJfV0VQMTA0KQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgPSBOZGlzODAyXzExV0VQRW5hYmxlZDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtLT52YWx1ZSA9PSBJV19BVVRIX0NJUEhFUl9US0lQKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgPSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSBpZiAocGFyYW0tPnZhbHVlID09IElXX0FVVEhfQ0lQSEVSX0NDTVApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5Hcm91cENpcGhlciA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCIlczo6SVdfQVVUSF9DSVBIRVJfR1JPVVAgLSBwYXJhbS0+dmFsdWUgPSAlZ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BdW2tleUlkeF0uS2V5LCAgMTYpOwotCQkJICAgIE5kaXNNb3ZlTWVtb3J5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1ba2V5SWR4XS5LZXksIGV4dC0+a2V5LCBleHQtPmtleV9sZW4pOwotICAgIAkJCWJyZWFrOwotICAgICAgICAgICAgY2FzZSBJV19FTkNPREVfQUxHX1RLSVA6Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiJXM6OklXX0VOQ09ERV9BTEdfVEtJUCAtIGtleUlkeCA9ICVkLCBleHQtPmtleV9sZW4gPSAlZFxuIiwgX19mdW5jX18sIGtleUlkeCwgZXh0LT5rZXlfbGVuKSk7Ci0gICAgICAgICAgICAgICAgaWYgKGV4dC0+a2V5X2xlbiA9PSAzMikKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfU0VUX1RYX0tFWSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgZm5TZXRDaXBoZXJLZXkocEFkYXB0ZXIsIGtleUlkeCwgQ0lQSEVSX1RLSVAsIEZBTFNFLCBleHQpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVEFfUE9SVF9TRUNVUkVEKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQkJfQotICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfR1JPVVBfS0VZKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfVEtJUCwgVFJVRSwgZXh0KTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IDgwMi4xeCBwb3J0IGNvbnRyb2wKLSAgICAgICAgICAgIAkgICAgICAgIC8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgCSAgICAgICAgU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgSVdfRU5DT0RFX0FMR19DQ01QOgotICAgICAgICAgICAgICAgIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfU0VUX1RYX0tFWSkKLQkJewotICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfQUVTLCBGQUxTRSwgZXh0KTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgCS8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgICAgICAJU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAg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ICAgICAgICAgICAgICAgICAgUGh5TW9kZTsKLSAgICBSVF84MDJfMTFfU1RBX0NPTkZJRyAgICAgICAgICAgICAgICBTdGFDb25maWc7Ci0gICAgTkRJU184MDJfMTFfUkFURVMgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXM7Ci0gICAgUlRfODAyXzExX1BSRUFNQkxFICAgICAgICAgICAgICAgICAgUHJlYW1ibGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUgICAgIEF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlTWF4OwotICAgIE5ESVNfODAyXzExX05FVFdPUktfSU5GUkFTVFJVQ1RVUkUgIEJzc1R5cGU7Ci0gICAgTkRJU184MDJfMTFfUlRTX1RIUkVTSE9MRCAgICAgICAgICAgUnRzVGhyZXNoOwotICAgIE5ESVNfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEIEZyYWdUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfUE9XRVJfTU9ERSAgICAgICAgICAgICAgUG93ZXJNb2RlOwotICAgIFBORElTXzgwMl8xMV9LRVkgICAgICAgICAgICAgICAgICAgIHBLZXkgPSBOVUxMOwotICAgIFBORElTXzgwMl8xMV9XRVAJCQkgICAgICAgIHBXZXBLZXkgPU5VTEw7Ci0gICAgUE5ESVNfODAyXzExX1JFTU9WRV9LRVkgICAgICAgICAgICAgcFJlbW92ZUtleSA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAgICAgICAgICAgQ29uZmlnLCAqcENvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19UWVBFICAgICAgICAgICAgTmV0VHlwZTsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOb3c7Ci0gICAgVUlOVCAgICAgICAg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ICAgICAgICAgICAgICAgICAgICAgICAgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsCi0gICAgICAgICAgICAgICAgICAgICAgICBPSURfODAyXzExX0JTU0lEX0xJU1RfU0NBTiwKLSAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLQotICAgICAgICAgICAgU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLSAgICAgICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9TU0lEOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoTkRJU184MDJfMTFfU1NJRCkpCi0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgIAlQQ0hBUiBwU3NpZFN0cmluZyA9IE5VTEw7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlNzaWQsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0KLQkJCQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfU1NJRCAoTGVuPSVkLFNzaWQ9JXMpXG4iLCBTc2lkLlNzaWRMZW5ndGgsIFNzaWQuU3NpZCkpOwotICAgICAgICAgICAgICAgIGlmIChTc2lkLlNzaWRMZW5ndGggPiBNQVhfTEVOX09GX1NTSUQpCi0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAJaWYgKFNzaWQuU3NpZExlbmd0aCA9PSAwKQotICAgICAgIC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hISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgTWxtZUVucXVldWUocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgT0lEXzgwMl8xMV9CU1NJRCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoTkRJU184MDJfMTFfTUFDX0FERFJFU1MpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIChWT0lEICopJkJzc2lkKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotICAgICAgICAgICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotCi0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0JTU0lEICUwMng6JTAyeDolMDJ4OiUwMng6JTAyeDolMDJ4XG4iLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJzc2lkWzBdLCBCc3NpZFsxXSwgQnNzaWRbMl0sIEJzc2lkWzNdLCBCc3NpZFs0XSwgQnNzaWRbNV0pKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJUX09JRF84MDJfMTFfUkFESU86Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihCT09MRUFOKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUmFkaW9TdGF0ZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUkFESU8gKD0lZClcbiIsIFJhZGlvU3RhdGUpKTsKLSAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbyAhPSBSYWRpb1N0YXRlKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbyA9IFJhZGlvU3RhdGU7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLmJSYWRpbyAhPSAocEFkYXB0ZXItPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvKSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5iUmFkaW8gPSAocEFkYXB0ZXItPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLmJSYWRpbyA9PSBUUlVFKQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1sbWVSYWRpb09uKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJCQlwQWRhcHRlci0+RXh0cmFJbmZvID0gRVhUUkFfSU5GT19DTEVBUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNbG1lUmFkaW9PZmYocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBleHRyYSBpbmZvcm1hdGlvbgotCQkJCQkJCXBBZGFwdGVyLT5FeHRyYUluZm8gPSBTV19SQURJT19PRkY7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BIWV9NT0RFOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoUlRfODAyXzExX1BIWV9NT0RFKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUGh5TW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLQkJCQlpZiAoUGh5TW9kZSA8PSBNYXhQaHlNb2RlKQotCQkJCXsKLSAgICAgICAgICAgICAgICAJUlRNUFNldFBoeU1vZGUocEFkYXB0ZXIsIFBoeU1vZGUpOwotI2lmZGVmIERPVDExX05fU1VQUE9SVAotCQkJCQlTZXRDb21tb25IVChwQWRhcHRlcik7Ci0jZW5kaWYgLy8gRE9UMTFfTl9TVVBQT1JUIC8vCi0JCQkJfQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9QSFlfTU9ERSAoPSVkKVxuIiwgUGh5TW9kZSkpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9TVEFfQ09ORklHOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb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BCU1NfQURIT0MpCi0gICAgICAgICAgICAgICAgICAgIHsKLQkJCQkJCXBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZSA9IFN0YUNvbmZpZy5BZGhvY01vZGU7Ci0gICAgICAgICAgICAgICAgICAgIAlSVE1QU2V0UGh5TW9kZShwQWRhcHRlciwgUGh5TW9kZSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBNbG1lVXBkYXRlVHhSYXRlcyhwQWRhcHRlciwgRkFMU0UsIDApOwotICAgICAgICAgICAgICAgICAgICAgICAgTWFrZUlic3NCZWFjb24ocEFkYXB0ZXIpOyAgICAgICAgICAgLy8gcmUtYnVpbGQgQkVBQ09OIGZyYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICBBc2ljRW5hYmxlSWJzc1N5bmMocEFkYXB0ZXIpOyAgIC8vIGNvcHkgdG8gb24tY2hpcCBtZW1vcnkKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfU0VUX1NUQV9DT05GSUcgKEJ1cnN0PSVkLCBQcm90ZWN0aW9uPSVsZCxTaG9ydFNsb3Q9JWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5iRW5hYmxlVHhCdXJzdCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlVzZUJHUHJvdGVjdGlvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLmJVc2VTaG9ydFNsb3RUaW1lKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0RFU0lSRURfUkFURVM6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yXzExUHJlYW1ibGVBdXRvKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIGlmIHVzZXIgd2FudHMgQVVUTywgaW5pdGlhbGl6ZSB0byBMT05HIGhlcmUsIHRoZW4gY2hhbmdlIGFjY29yZGluZyB0byBBUCdzCi0gICAgICAgICAgICAgICAgICAgIC8vIGNhcGFiaWxpdHkgdXBvbiBhc3NvY2lhdGlvbi4KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5UeFByZWFtYmxlID0gUHJlYW1ibGU7Ci0gICAgICAgICAgICAgICAgICAgIE1sbWVTZXRUeFByZWFtYmxlKHBBZGFwdGVyLCBSdDgwMl8xMVByZWFtYmxlTG9uZyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUFJFQU1CTEUgKD0lZClcbiIsIFByZWFtYmxlKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1dFUF9TVEFUVVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9XRVBfU1RBVFVTKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmV2VwU3RhdHVzLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIC8vIFNpbmNlIFRLSVAsIEFFUywgV0VQIGFyZSBhbGwgc3VwcG9ydGVkLiBJdCBzaG91bGQgbm90IGhhdmUgYW55IGludmFsaWQgc2V0dGluZwotICAgICAgICAgICAgICAgIGlmIChXZXBTdGF0dXMgPD0gTmRpczgwMl8xMUVuY3J5cHRpb24zS2V5QWJzZW50KQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICE9IFdlcFN0YXR1cykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29uZmlnIGhhcyBjaGFuZ2VkCi0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+YkNvbmZpZ0NoYW5nZWQgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICAgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5PcmlnV2VwU3RhdHVzID0gV2VwU3RhdHVzOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBhaXJDaXBoZXIgICAgPSBXZXBTdGF0dXM7Ci0gICAgICAgICAgICAgICAgCXBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfV0VQX1NUQVRVUyAoPSVkKVxuIixXZXBTdGF0dXMpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZBdXRoTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoQXV0aE1vZGUgPiBOZGlzODAyXzExQXV0aE1vZGVNYXgpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IEF1dGhNb2RlKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBDb25maWcgaGFzIGNoYW5nZWQKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5iQ29uZmlnQ2hhbmdlZCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9IEF1dGhNb2RlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgIC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VR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUkVTRVRfQ09VTlRFUlMgXG4iKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1JUU19USFJFU0hPTEQ6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9SVFNfVEhSRVNIT0xEKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUnRzVGhyZXNoLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIGlmIChSdHNUaHJlc2ggPiBNQVhfUlRTX1RIUkVTSE9MRCkKLSAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlJ0c1RocmVzaG9sZCA9IChVU0hPUlQpUnRzVGhyZXNoOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JUU19USFJFU0hPTEQgKD0lbGQpXG4iLFJ0c1RocmVzaCkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9GUkFHTUVOVEFUSU9OX1RIUkVTSE9MRDoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmRnJhZ1RocmVzaCwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLmJVc2VaZXJvVG9EaXNhYmxlRnJhZ21lbnQgPSBGQUxTRTsKLSAgICAgICAgICAgICAgICBpZiAoRnJhZ1RocmVzaCA+IE1BWF9GUkFHX1RIUkVTSE9MRCB8fCBGcmFnVGhyZXNoIDwgTUlOX0ZSQUdfVEhSRVNIT0xEKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKEZyYWdUaHJlc2ggPT0gMCkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5GcmFnbWVudFRocmVzaG9sZCA9IE1BWF9GUkFHX1RIUkVTSE9MRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuYlVzZVplcm9Ub0Rpc2FibGVGcmFnbWVudCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5GcmFnbWVudFRocmVzaG9sZCA9IChVU0hPUlQpRnJhZ1RocmVzaDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9GUkFHTUVOVEFUSU9OX1RIUkVTSE9MRCAoPSVsZCkgXG4iLEZyYWdUaHJlc2gpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfUE9XRVJfTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX1BPV0VSX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlBvd2VyTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoUG93ZXJNb2RlID09IE5kaXM4MDJfMTFQb3dlck1vZGVDQU0pCi0gICAgICAgICAgICAgICAgCVNldF9QU01vZGVfUHJvYyhwQWRhcHRlciwgIkNBTSIpOwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKFBvd2VyTW9kZSA9PSBOZGlzODAyXzExUG93ZXJNb2RlTUFYX1BTUCkKLSAgICAgICAgICAgICAgICAJU2V0X1BTTW9kZV9Qcm9jKHBBZGFwdGVyLCAiTWF4X1BTUCIpOwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKFBvd2VyTW9kZSA9PSBOZGlzODAyXzExUG93ZXJNb2RlRmFzdF9QU1ApCi0JCQkJCVNldF9QU01vZGVfUHJvYyhwQWRhcHRlciwgIkZhc3RfUFNQIik7Ci0gICAgICAgICAgICAgICAgZWxzZSBpZiAoUG93ZXJNb2RlID09IE5kaXM4MDJfMTFQb3dlck1vZGVMZWdhY3lfUFNQKQotCQkJCQlTZXRfUFNNb2RlX1Byb2MocEFkYXB0ZXIsICJMZWdhY3lfUFNQIik7Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUlOVkFMOwotICAgICAgICAgICAgfQotICAgICAgIC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gICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9BRERfV1BBLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spICYmCi0JCQkJICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0spICYmCi0JCQkJICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQU5vbmUpICkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FT1BOT1RTVVBQOwotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfQUREX1dQQSwgRmFpbGVkISEgW0F1dGhNb2RlICE9IFdQQVBTSy9XUEEyUFNLL1dQQU5PTkVdXG4iKSk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhN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JTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpSVF9PSURfODAyXzExX0FERF9XUEEgKGlkPTB4JXgsIExlbj0lZC1ieXRlKVxuIiwgcEtleS0+S2V5SW5kZXgsIHBLZXktPktleUxlbmd0aCkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9SRU1PVkVfS0VZOgotICAgICAgICAgICAgcFJlbW92ZUtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwUmVtb3ZlS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocFJlbW92ZUtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwUmVtb3ZlS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFJUTVBXUEFSZW1vdmVLZXlQcm9jKHBBZGFwdGVyLCBwUmVtb3ZlS2V5KTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVksIFJlbW92ZSBXUEEgS2V5ISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gcFJlbW92ZUtleS0+S2V5SW5kZXg7Ci0KLSAgICAgICAgICAgICAgICAgICAgaWYgKEtleUlkeCAmIDB4ODAwMDAwMDApCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNob3VsZCBuZXZlciBzZXQgZGVmYXVsdCBiaXQgd2hlbiByZW1vdmUga2V5Ci0gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIShTaG91bGQgbmV2ZXIgc2V0IGRlZmF1bHQgYml0IHdoZW4gcmVtb3ZlIGtleSlcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIEtleUlkeCA9IEtleUlkeCAmIDB4MGZmZmZmZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoS2V5SWR4ID4gMykKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfUkVNT1ZFX0tFWSwgRmFpbGVkISEoS2V5SWRbJWRdIG91dCBvZiByYW5nZSlcbiIsIEtleUlkeCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXlMZW4gPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5DaXBoZXJBbGcgPSBDSVBIRVJfTk9ORTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBBc2ljUmVtb3ZlU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsIDAsIChVQ0hBUilLZXlJZHgpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBSZW1vdmVLZXktPktleUluZGV4LCBwUmVtb3ZlS2V5LT5MZW5ndGgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBSZW1vdmVLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIC8vIE5ldyBmb3IgV1BBCi0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9BRERfS0VZOgotICAgICAgICAgICAgcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKHBLZXksIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBpZiAocEtleS0+TGVuZ3RoICE9IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSwgRmFpbGVkISFcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBSVE1QQWRkS2V5KHBBZGFwdGVyLCBwS2V5KTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSAoaWQ9MHgleCwgTGVuPSVkLWJ5dGUpXG4iLCBwS2V5LT5LZXlJbmRleCwgcEtleS0+S2V5TGVuZ3RoKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBrZnJlZShwS2V5KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQ09ORklHVVJBVElPTjoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGN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Ja2ZyZWUocEJBKTsKLQkJCQl9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLQotICAgICAgICAvLyBGb3IgV1BBX1NVUFBMSUNBTlQgdG8gc2V0IHN0YXRpYyB3ZXAga2V5Ci0gICAgCWNhc2UgT0lEXzgwMl8xMV9BRERfV0VQOgotICAgIAkgICAgcFdlcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0KLSAgICAJICAgIGlmKHBXZXBLZXkgPT0gTlVMTCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRU5PTUVNOwotCQkJCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9BRERfV0VQLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocFdlcEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChTdGF0dXMpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAobGVuZ3RoIG1pc21hdGNoKSEhXG4iKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0JCSAgICAgICAgS2V5SWR4ID0gcFdlcEtleS0+S2V5SW5kZXggJiAweDBmZmZmZmZmOwotICAgICAgICAgICAgICAgIC8vIEtleUlkeCBtdXN0IGJlIDAgfiAzCi0gICAgICAgICAgICAgICAgaWYgKEtleUlkeCA+IDQpCi0gICAgCQkJewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAoS2V5SWR4IG11c3QgYmUgc21hbGxlciB0aGFuIDQpISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgVUNIQVIgQ2lwaGVyQWxnID0gMDsKLSAgICAgICAgICAgICAgICAgICAgUFVDSEFSIEtleTsKLQotICAgICAgICAgICAgICAgICAgICAvLyBzZXQga2V5IG1hdGVyaWFsIGFuZCBrZXkgbGVuZ3RoCi0gICAgICAgICAgICAgICAgICAgIE5kaXNaZXJvTWVtb3J5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXksIDE2KTsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLktleUxlbiA9IChVQ0hBUikgcFdlcEtleS0+S2V5TGVuZ3RoOwotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdW0tleUlkeF0uS2V5LCAmcFdlcEtleS0+S2V5TWF0ZXJpYWwsIHBXZXBLZXktPktleUxlbmd0aCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHBXZXBLZXktPktleUxlbmd0aCkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA1OgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVA2NDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDEyODsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIG9ubHkgc3VwcG9ydCBDSVBIRVJfV0VQNjQobGVuOjUpICYgQ0lQSEVSX1dFUDEyOChsZW46MTMpISFcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5DaXBoZXJBbGcgPSBDaXBoZXJBbGc7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gRGVmYXVsdCBrZXkgZm9yIHR4IChzaGFyZWQga2V5KQotICAgICAgICAgICAgICAgICAgICBpZiAocFdlcEtleS0+S2V5SW5kZXggJiAweDgwMDAwMDAwKQotICAgICAgICAgICAgICAgICAgICB7Ci0jaWZkZWYgV1BBX1NVUFBMSUNBTlRfU1VQUE9SVAotICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IGtleSBtYXRlcmlhbCBhbmQga2V5IGxlbmd0aAotICAgICAgICAgICAgICAgICAgICAgICAgTmRpc1plcm9NZW1vcnkocEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVTaGFyZWRLZXlbS2V5SWR4XS5LZXksIDE2KTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlU2hhcmVkS2V5W0tleUlkeF0uS2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kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgTWxtZURlYXV0aFJlcUFjdGlvbihwQWRhcHRlciwgTXNnRWxlbSk7Ci0JCQkJa2ZyZWUoTXNnRWxlbSk7Ci0KLSAgICAgICAgICAgICAgICBpZiAoSU5GUkFfT04ocEFkYXB0ZXIpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgTGlua0Rvd24ocEFkYXB0ZXIsIEZBTFNFKTsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPk1sbWUuQXNzb2NNYWNoaW5lLkN1cnJTdGF0ZSA9IEFTU09DX0lETEU7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9ERUFVVEhFTlRJQ0FUSU9OIChSZWFzb249JWQpXG4iLCBwSW5mby0+UmVhc29uKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0RST1BfVU5FTkNSWVBURUQ6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihpbnQpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGludCBlbmFibGVkID0gMDsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmZW5hYmxlZCwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCA9PSAxKQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkID0gV1BBXzgwMl8xWF9QT1JUX05PVF9TRUNVUkVEOwotICAgICAgICAgICAgIC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AgICAgICAgYnJlYWs7Ci0gICAgfQotCi0KLSAgICByZXR1cm4gU3RhdHVzOwotfQotCi1JTlQgUlRNUFF1ZXJ5SW5mb3JtYXRpb24oCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgcEFkYXB0ZXIsCi0gICAgSU4gIE9VVCBzdHJ1Y3QgaWZyZXEgICAgKnJxLAotICAgIElOICBJTlQgICAgICAgICAgICAgICAgIGNtZCkKLXsKLSAgICBzdHJ1Y3QgaXdyZXEgICAgICAgICAgICAgICAgICAgICAgICAqd3JxID0gKHN0cnVjdCBpd3JlcSAqKSBycTsKLSAgICBORElTXzgwMl8xMV9CU1NJRF9MSVNUX0VYICAgICAgICAgICAqcEJzc2lkTGlzdCA9IE5VTEw7Ci0gICAgUE5ESVNfV0xBTl9CU1NJRF9FWCAgICAgICAgICAgICAgICAgcEJzczsKLSAgICBORElTXzgwMl8xMV9TU0lEICAgICAgICAgICAgICAgICAgICBTc2lkOwotICAgIE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04gICAgICAgICAgICpwQ29uZmlndXJhdGlvbiA9IE5VTEw7Ci0gICAgUlRfODAyXzExX0xJTktfU1RBVFVTICAgICAgICAgICAgICAgKnBMaW5rU3RhdHVzID0gTlVMTDsKLSAgICBSVF84MDJfMTFfU1RBX0NPTkZJRyAgICAgICAgICAgICAgICAqcFN0YUNvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfU1RBVElTVElDUyAgICAgICAgICAgICAgKnBTdGF0aXN0aWNzID0gTlVMTDsKLSAgICBORElTXzgwMl8xMV9SVFNfVEhSRVNIT0xEICAgICAgICAgICBSdHNUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQgRnJhZ1RocmVzaDsKLSAgICBORElTXzgwMl8xMV9QT1dFUl9NT0RFICAgICAgICAgICAgICBQb3dlck1vZGU7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19JTkZSQVNUUlVDVFVSRSAgQnNzVHlwZTsKLSAgICBSVF84MDJfMTFfUFJFQU1CTEUgICAgICAgICAgICAgICAgICBQcmVhbVR5cGU7Ci0gICAgTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERSAgICAgQXV0aE1vZGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfTUVESUFfU1RBVEUgICAgICAgICAgICAgICAgICAgIE1lZGlhU3RhdGU7Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzQnVmU2l6ZSwgdWxJbmZvPTAsIE5ldHdvcmtUeXBlTGlzdFs0XSwgYXBzZCA9IDA7Ci0gICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzTGVuID0gMDsKLSAgICBQVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQnVmID0gTlVMTCwgcFB0cjsKLSAgICBJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotICAgIFVJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdlX3ZlcnNpb25fY29tcGlsZWQ7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSwgUGFkZGluZyA9IDA7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmFkaW9TdGF0ZTsKLQlVQ0hBUglkcml2ZXJWZXJzaW9uWzhdOwotICAgIE9JRF9TRVRfSFRfUEhZTU9ERQkJCSAgICAgICAgKnBIVFBoeU1vZGUgPSBOVUxMOwotCi0KLSNpZmRlZiBTTk1QX1NVUFBPUlQKLQkvL2ZvciBzbm1wLCBrYXRoeQotCURlZmF1bHRLZXlJZHhWYWx1ZQkJCSpwS2V5SWR4VmFsdWU7Ci0JSU5UCQkJCQkJCXZhbHVlT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1ZmZlciBzaXplIHJlcXVpcmVkCi0gICAgICAgICAgICBCc3NCdWZTaXplID0gc2l6ZW9mKFVMT05HKTsKLQotICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHBBZGFwdGVyLT5TY2FuVGFiLkJzc05yOyBpKyspCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgLy8gQWxpZ24gcG9pbnRlciB0byA0IGJ5dGVzIGJvdW5kYXJ5LgotICAgICAgICAgICAgICAgIC8vUGFkZGluZyA9IDQgLSAocEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uVmFySUVMZW4gJiAweDAwMDMpOwotICAgICAgICAgICAgICAgIC8vaWYgKFBhZGRpbmcgPT0gNCkKLSAgICAgICAgICAgICAgICAvLyAgICBQYWRkaW5nID0gMDsKLSAgICAgICAgICAgICAgICBCc3NCdWZTaXplICs9IChzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuICsgUGFkZGluZyk7Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIC8vIEZvciBzYWZldHkgaXNzdWUsIHdlIGFkZCAyNTYgYnl0ZXMganVzdCBpbiBjYXNlCi0gICAgICAgICAgICBCc3NCdWZTaXplICs9IDI1NjsKLSAgICAgICAgICAgIC8vIEFsbG9jYXRlIHRoZSBzYW1lIHNpemUgYXMgcGFzc2VkIGZyb20gaGlnaGVyIGxheWVyCi0gICAgICAgICAgICBwQnVmID0ga21hbGxvYyhCc3NCdWZTaXplLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwQnVmID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAg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ODAyXzExX0ZJWEVEX0lFcyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBCc3MtPklFTGVuZ3RoID0gKFVMT05HKShzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuKTsKLSAgICAgICAgICAgICAgICAgICAgcFB0ciA9IHBQdHIgKyBzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEJzcy0+SUVzLCAmcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uRml4SUVzLCBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSk7Ci0gICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBCc3MtPklFcyArIHNpemVvZihORElTXzgwMl8xMV9GSVhFRF9JRXMpLCBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5WYXJJRXMsIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuKTsKLSAgICAgICAgICAgICAgICAgICAgcFB0ciArPSBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5WYXJJRUxlbjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcEJzcy0+TGVuZ3RoID0gKFVMT05HKShzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuICsgUGFkZGluZyk7Ci0KLSNpZiBXSVJFTEVTU19FWFQgPCAxNwotICAgICAgICAgICAgICAgIGlmICgoQnNzTGVuICsgcEJzcy0+TGVuZ3RoKSA8IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgICAgICBCc3NMZW4gKz0gcEJzcy0+TGVuZ3RoOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBCc3NpZExpc3QtPk51bWJlck9mSXRlbXMgPSBpOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICB9Ci0jZWxzZQotICAgICAgICAgICAgICAgIEJzc0xlbiArPSBwQnNzLT5MZW5ndGg7Ci0jZW5kaWYKLSAgICAgICAgICAgIH0KLQotI2lmIFdJUkVMRVNTX0VYVCA8IDE3Ci0gICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBCc3NMZW47Ci0jZWxzZQotICAgICAgICAgICAgaWYgKEJzc0xlbiA+IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBrZnJlZShwQnNzaWRMaXN0KTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUUyQklHOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IEJzc0xlbjsKLSNlbmRpZgotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsIHBCc3NpZExpc3QsIEJzc0xlbik7Ci0gICAgICAgICAgICBrZnJlZShwQnNzaWRMaXN0KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfM19DVVJSRU5UX0FERFJFU1M6Ci0gICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBNQUNfQUREUl9MRU47Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdG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gICBrZnJlZShwTGlua1N0YXR1cyk7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUXVlcnk6OlJUX09JRF84MDJfMTFfUVVFUllfTElOS19TVEFUVVNcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV9RVUVSWV9MSU5LX1NUQVRVUyhrbWFsbG9jIGZhaWxlZClcbiIpKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUZBVUxUOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9DT05GSUdVUkFUSU9OOgotICAgICAgICAgICAgcENvbmZpZ3VyYXRpb24gPSAoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAqKSBrbWFsbG9jKHNpemVvZihORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OKSwgTUVNX0FMTE9DX0ZMQUcpOwotICAgICAgICAgICAgaWYgKHBDb25maWd1cmF0aW9uKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5MZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTik7Ci0gICAgICAgICAgICAgICAgcENvbmZpZ3VyYXRpb24tPkJlYWNvblBlcmlvZCA9IHBBZGFwdGVyLT5Db21tb25DZmcuQmVhY29uUGVyaW9kOwotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5BVElNV2luZG93ID0gcEFkYXB0ZXItPlN0YUFjdGl2ZS5BdGltV2luOwotICAgICAgICAgICAgICAgIE1BUF9DSEFOTkVMX0lEX1RPX0tIWihwQWRhcHRlci0+Q29tbW9uQ2ZnLkNoYW5uZWwsIHBDb25maWd1cmF0aW9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93UGFydCA9IHBBZGFwdGVyLT5XbGFuQ291bnRlcnMuRnJhbWVEdXBsaWNhdGVDb3VudC51Lkxvd1BhcnQgLyAxMDA7Ci0jZW5kaWYKLSAgICAgICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfU1RBVElTVElDUyk7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsIHBTdGF0aXN0aWNzLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIGtmcmVlKHBTdGF0aXN0aWNzKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6T0lEXzgwMl8xMV9TVEFUSVNUSUNTKGttYWxsb2MgZmFpbGVkKVxuIikpOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FRkFVTFQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfR0VOX1JDVl9PSzoKLSAgICAgICAgICAgIHVsSW5mbyA9IHBBZGFwdGVyLT5Db3VudGVyczgwMjMuR29vZFJlY2VpdmVzOwotICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKHVsSW5mbyk7Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgJnVsSW5mbywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF9HRU5fUkNWX05PX0JVRkZFUjoKLSAgICAgICAgICAgIHVsSW5mbyA9IHBBZGFwdGVyLT5Db3VudGVyczgwMjMuUnhOb0J1ZmZlcjsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BIWV9NT0RFOgotICAgICAgICAgICAgdWxJbmZvID0gKFVMT05HKXBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZTsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV9QSFlfTU9ERSAoPSVsZClcbiIsIHVsSW5mbykpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9TVEFfQ09ORklHOgotICAgICAgICAgICAgcFN0YUNvbmZpZyA9IChSVF84MDJfMTFfU1RBX0NPTkZJRyAqKSBrbWFsbG9jKHNpemVvZihSVF84MDJfMTFfU1RBX0NPTkZJRyksIE1FTV9BTExPQ19GTEFHKTsKLSAgICAgICAgICAgIGlmIChwU3RhQ29uZmlnKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlF1ZXJ5OjpSVF9PSURfODAyXzExX1NUQV9DT05GSUdcbiIpKTsKLSAgICAgICAgICAgICAgICBwU3RhQ29uZmlnLT5FbmFibGVUeEJ1cnN0ID0gcEFkYXB0ZXItPkNvbW1vbkNmZy5iRW5hYmxlVHhCdXJzdDsKLSAgICAgICAgICAgICAgIC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1NVUFBPUlQgLy8KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgTmV0d29yayBUeXBlKEluZnJhc3RydWN0dXJlL0FkaG9jIG1vZGUpCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X05ldHdvcmtUeXBlX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBVSU5UMzIJVmFsdWUgPSAwOwotCi0gICAgaWYgKHN0cmNtcChhcmcsICJBZGhvYyIpID09IDApCi0JewotCQlpZiAocEFkYXB0ZXItPlN0YUNmZy5Cc3NUeXBlICE9IEJTU19BREhPQykKLQkJewotCQkJLy8gQ29uZmlnIGhhcyBjaGFuZ2VkCi0JCQlwQWRhcHRlci0+YkNvbmZpZ0NoYW5nZWQgPSBUUlVFOwotICAgICAgICAgICAgaWYgKE1PTklUT1JfT04ocEFkYXB0ZXIpKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFJUTVBfSU9fV1JJVEUzMihwQWRhcHRlciwgUlhfRklMVFJfQ0ZHLCBTVEFOT1JNQUwpOwotICAgICAgICAgICAgICAgIFJUTVBfSU9fUkVBRDMyKHBBZGFwdGVyLCBNQUNfU1lTX0NUUkwsICZWYWx1ZSk7Ci0JCQkJVmFsdWUgJj0gKH4weDgwKTsKLQkJCQlSVE1QX0lPX1dSSVRFMzIocEFkYXB0ZXIsIE1BQ19TWVNfQ1RSTCwgVmFs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01vZGUgPSAwOwotCQlSVE1QX0lPX1dSSVRFMzIocEFkYXB0ZXIsIEJDTl9USU1FX0NGRywgY3NyLndvcmQpOwotCi0JCXBBZGFwdGVyLT5TdGFDZmcuQnNzVHlwZSA9IEJTU19NT05JVE9SOwotICAgICAgICBwQWRhcHRlci0+bmV0X2Rldi0+dHlwZSA9IEFSUEhSRF9JRUVFODAyMTFfUFJJU007IC8vQVJQSFJEX0lFRUU4MDIxMTsgLy8gSUVFRTgwMjExCi0JCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIj09PT5TZXRfTmV0d29ya1R5cGVfUHJvYzo6KE1PTklUT1IpXG4iKSk7Ci0gICAgfQotCi0gICAgLy8gUmVzZXQgUmFsaW5rIHN1cHBsaWNhbnQgdG8gbm90IHVzZSwgaXQgd2lsbCBiZSBzZXQgdG8gc3RhcnQgd2hlbiBVSSBzZXQgUE1LIGtleQotICAgIHBBZGFwdGVyLT5TdGFDZmcuV3BhU3RhdGUgPSBTU19OT1RVU0U7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfTmV0d29ya1R5cGVfUHJvYzo6KE5ldHdvcmtUeXBlPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5Cc3NUeXBlKSk7Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQXV0aGVudGljYXRpb24gbW9kZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9BdXRoTW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GhlciAgICA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQ7Ci0JICAgIHBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgICA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQ7Ci0gICAgfQotICAgIGVsc2UKLSAgICAgICAgcmV0dXJuIEZBTFNFOwotCi0gICAgcEFkYXB0ZXItPlN0YUNmZy5PcmlnV2VwU3RhdHVzID0gcEFkYXB0ZXItPlN0YUNmZy5XZXBTdGF0dXM7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfRW5jcnlwVHlwZV9Qcm9jOjooRW5jcnlwVHlwZT0lZClcbiIsIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzKSk7Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgRGVmYXVsdCBLZXkgSUQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfRGVmYXVsdEtleUlEX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlJZHg7Ci0KLSAgICBLZXlJZHggPSBzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApOwotICAgIGlmKChLZXlJZHggPj0gMSApICYmIChLZXlJZHggPD0gNCkpCi0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVmYXVsdEtleUlkID0gKFVDSEFSKSAoS2V5SWR4IC0gMSApOwotICAgIGVsc2UKLSAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9JbnZhbGlkIGFyZ3VtZW50Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfRGVmYXVsdEtleUlEX1Byb2M6OihEZWZhdWx0S2V5SUQ9JWQpXG4iLCBwQWRhcHRlci0+U3RhQ2ZnLkRlZmF1bHRLZXlJZCkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkxCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTFfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBU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dHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDEzOiAvL3dlcCAxMDQgQXNjaWkgdHlwZQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW47Ci0gICAgICAgICAgICBtZW1jcHkocEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXksIGFyZywgS2V5TGVuKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVAxMjg7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjooS2V5MT0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkFzY2lpIikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMjY6IC8vd2VwIDEwNCBIZXggdHlwZQotICAgICAgICAgICAgZm9yKGk9MDsgaSA8IEtleUxlbjsgaSsrKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmKCAhaXN4ZGlnaXQoKihhcmcraSkpICkKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9Ob3QgSGV4IHZhbHVlOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW4gLyAyIDsKLSAgICAgICAgICAgIEF0b0goYXJnLCBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwgS2V5TGVuIC8gMik7Ci0gICAgICAgICAgICBDaXBoZXJBbGcgPSBDSVBIRVJfV0VQMTI4OwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTFfUHJvYzo6KEtleTE9JXMgYW5kIHR5cGU9JXMpXG4iLCBhcmcsICJIZXgiKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgZGVmYXVsdDogLy9JbnZhbGlkIGFyZ3VtZW50Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjpJbnZhbGlkIGFyZ3VtZW50ICg9JXMpXG4iLCBhcmcpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICB9Ci0KLSAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLkNpcGhlckFsZyA9IENpcGhlckFsZzsKLQotICAgIC8vIFNldCBrZXlzIChpbnRvIEFTSUMpCi0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICA7ICAgLy8gbm90IHN1cHBvcnQKLSAgICBlbHNlICAgIC8vIE9sZCBXRVAgc3R1ZmYKLSAgICB7Ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgV0VQIEtFWTIKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfS2V5Ml9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5TGVuOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnPUNJUEhFUl9XRVA2NDsKLQotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgcmV0dXJuIFRSVUU7ICAgIC8vIGRvIG5vdGhpbmcKLQotICAgIEtleUxlbiA9IHN0cmxlbihhcmcpOwotCi0gICAgc3dpdGNoIChLZXlMZW4pCi0gICAgewotICAgICAgICBjYXNlIDU6IC8vd2VwIDQwIEFzY2lpIHR5cGUKLSAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMV0uS2V5TGVuID0gS2V5TGVuOwotICAgICAgICAgICAgbWVtY3B5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMV0uS2V5LCBhcmcsIEtleUxlbik7Ci0gICAgICAgICAgICBDaXBoZXJBbGcgPSBDSVBIRVJfV0VQNjQ7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5Ml9Qcm9jOjooS2V5Mj0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkFzY2lpIikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTA6IC8vd2VwIDQwIEhleCB0eXBlCi0gICAgICAgICAgICBmb3IoaT0wOyBpIDwgS2V5TGVuOyBpKyspCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYoICFpc3hkaWdpdCgqKGFyZytpKSkgKQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7ICAvL05vdCBIZXggdmFsdWU7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleUxlbiA9IEtleUxlbiAvIDIgOwotICAgICAgICAgICAgQXRvSChhcmcsIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMV0uS2V5LCBLZXlMZW4gLyAyKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVA2NDsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkyX1Byb2M6OihLZXkyPSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiSGV4IikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTM6IC8vd2VwIDEwNCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDEyODsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkyX1Byb2M6OihLZXkyPSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiQXNjaWkiKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICA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c3R1ZmYKLSAgICB7Ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsxXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkzCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTNfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB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JvYzo6KEtleTM9JXMgYW5kIHR5cGU9SGV4KVxuIiwgYXJnKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgZGVmYXVsdDogLy9JbnZhbGlkIGFyZ3VtZW50Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5M19Qcm9jOjpJbnZhbGlkIGFyZ3VtZW50ICg9JXMpXG4iLCBhcmcpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICB9Ci0gICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsyXS5DaXBoZXJBbGcgPSBDaXBoZXJBbGc7Ci0KLSAgICAvLyBTZXQga2V5cyAoaW50byBBU0lDKQotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgOyAgIC8vIG5vdCBzdXBwb3J0Ci0gICAgZWxzZSAgICAvLyBPbGQgV0VQIHN0dWZmCi0gICAgewotICAgICAgICBBc2ljQWRkU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMl0uQ2lwaGVyQWxnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsyXS5LZXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXRVAgS0VZNAotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9LZXk0X1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlMZW47Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaXBoZXJBbGc9Q0lQSEVSX1dFUDY0OwotCi0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICByZXR1cm4gVFJVRTsgICAgLy8gZG8gbm90aGluZwotCi0gICAgS2V5TGVuID0gc3RybGVuKGFyZyk7Ci0KLSAgICBzd2l0Y2ggKEtleUxlbikKLSAgICB7Ci0gICAgICAgIGNhc2UgNTogLy93ZXAgNDAgQXNjaWkgdHlwZQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVszXS5LZXlMZW4gPSBLZXlMZW47Ci0gICAgICAgICAgICBtZW1jcHkocEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVszXS5LZXksIGFyZywgS2V5TGVuKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVA2NDsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXk0X1Byb2M6OihLZXk0PSV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AvLyBub3Qgc3VwcG9ydAotICAgIGVsc2UgICAgLy8gT2xkIFdFUCBzdHVmZgotICAgIHsKLSAgICAgICAgQXNpY0FkZFNoYXJlZEtleUVudHJ5KHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLkNpcGhlckFsZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotICAgIH0KLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXUEEgUFNLIGtleQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9XUEFQU0tfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgIGtleU1hdGVyaWFsWzQwXTsKLQotICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spICYmCi0gICAgICAgIChwQWR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otCi0KLQotICAgIGlmKHBBZGFwdGVyLT5TdGFDZmcuQnNzVHlwZSA9PSBCU1NfQURIT0MgJiYKLSAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID09IE5kaXM4MDJfMTFBdXRoTW9kZVdQQU5vbmUpCi0gICAgewotICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XcGFTdGF0ZSA9IFNTX05PVFVTRTsKLSAgICB9Ci0gICAgZWxzZQotICAgIHsKLSAgICAgICAgLy8gU3RhcnQgU1RBIHN1cHBsaWNhbnQgc3RhdGUgbWFjaGluZQotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLldwYVN0YXRlID0gU1NfU1RBUlQ7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFBvd2VyIFNhdmluZyBtb2RlCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X1BTTW9kZV9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQnNzVHlwZSA9PSBCU1NfSU5GUkEpCi0gICAgewotICAgICAgICBpZiAoKHN0cmNtcChhcmcsICJNYXhfUFNQIikgPT0gMCkgfHwKLQkJCShzdHJjbXAoYXJnLCAibWF4X3BzcCIpID09IDApIHx8Ci0JCQkoc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zdHJ0b2woYXJnLCAwLCAxMCkgPT0gMikKLSAgICAgICAgcEFkLT5TdGFDZmcuV3BhU3VwcGxpY2FudFVQID0gV1BBX1NVUFBMSUNBTlRfRU5BQkxFX1dJVEhfV0VCX1VJOwotICAgIGVsc2UKLSAgICAgICAgcEFkLT5TdGFDZmcuV3BhU3VwcGxpY2FudFVQID0gV1BBX1NVUFBMSUNBTlRfRElTQUJMRTsKLQotICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9XcGFfU3VwcG9ydDo6KFdwYVN1cHBsaWNhbnRVUD0lZClcbiIsIHBBZC0+U3RhQ2ZnLldwYVN1cHBsaWNhbnRVUCkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0jZW5kaWYgLy8gV1BBX1NVUFBMSUNBTlRfU1VQUE9SVCAvLwotCi0jaWZkZWYgREJHCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFJlYWQgLyBXcml0ZSBNQUMKLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZGFwdGVyICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgICAgIHdycSAgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBpb2N0bCBhcmd1bWVudAotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICBOb3RlOgotICAgICAgICBVc2FnZToKLSAgICAgICAgICAgICAgIDEuKSBpd3ByaXYgcmEwIG1hYyAwICAgICAgICA9PT4gcmVhZCBNQUMgd2hlcmUgQWRkcj0weDAKLSAgICAgICAgICAgICAgIDIuKSBpd3ByaXYgcmEwIG1hYyAwPTEyICAgICA9PT4gd3JpdGUgTUFDIHdoZXJlIEFkZHI9MHgwLCB2YWx1ZT0xMgotIC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dfVFJBQ0UsICgiPD09UlRNUElvY3RsTUFDXG5cbiIpKTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBSZWFkIC8gV3JpdGUgRTJQUk9NCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWRhcHRlciAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgotICAgICAgICB3cnEgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgaW9jdGwgYXJndW1lbnQKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgTm9uZQotCi0gICAgTm90ZToKLSAgICAgICAgVXNhZ2U6Ci0gICAgICAgICAgICAgICAxLikgaXdwcml2IHJhMCBlMnAgMCAgICAgCT09PiByZWFkIEUyUFJPTSB3aGVyZSBBZGRyPTB4MAotICAgICAgICAgICAgICAgMi4pIGl3cHJpdiByYTAgZTJwIDA9MTIzNCAgICA9PT4gd3JpdGUgRTJQUk9NIHdoZXJlIEFkZHI9MHgwLCB2YWx1ZT0xMjM0Ci0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFJUTVBJb2N0bEUyUFJPTSgKLQlJTglQUlRNUF9BREFQVEVSCXBBZGFwdGVyLAotCUlOCXN0cnVjdCBpd3JlcQkqd3JxKQotewotCUNIQVIJCQkJKnRoaXNfY2hhcjsKLQlDSEFSCQkJCSp2YWx1ZTsKLQlJTlQJCQkJCWogPSAwLCBrID0gMDsKLQlDSEFSCQkJCW1zZ1sxMDI0XTsKLQlDSEFSCQkJCWFyZ1syNTVdOwotCVVTSE9SVAkJCQllZXBBZGRyID0gMDsKLQlVQ0hBUgkJCQl0ZW1wWzE2XSwgdGVtcDJbM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2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgc3RhX2lvY3RsLmMKLQotICAgIEFic3RyYWN0OgotICAgIElPQ1RMIHJlbGF0ZWQgc3Vicm91dGluZXMKLQotICAgIFJldmlzaW9uIEhpc3Rvcnk6Ci0gICAgV2hvICAgICAgICAgV2hlbiAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gICAgUm9yeSBDaGVuICAgMDEtMDMtMjAwMyAgICBjcmVhdGVkCi0JUm9yeSBDaGVuICAgMDItMTQtMjAwNSAgICBtb2RpZnkgdG8gc3VwcG9ydCBSVDYxCi0qLwotCi0jaW5jbHVkZQkicnRfY29uZmlnLmgiCi0KLSNpZmRlZiBEQkcKLWV4dGVybiBVTE9ORyAgICBSVERlYnVnTGV2ZWw7Ci0jZW5kaWYKLQotI2RlZmluZSBOUl9XRVBfS0VZUyAJCQkJNAotI2RlZmluZSBXRVBfU01BTExfS0VZX0xFTiAJCQkoNDAvOCkKLSNkZWZpbmUgV0VQX0xB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ihleHRyYSwgIk1vbml0b3IgTW9kZShDaGFubmVsICVkKVxuIiwgcEFkLT5Db21tb25DZmcuQ2hhbm5lbCk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+SW5kaWNhdGVNZWRpYVN0YXRlID09IE5kaXNNZWRpYVN0YXRlQ29ubmVjdGVkKQotICAgICAgICAgICAgCXsKLSAgICAgICAgICAgIAkgICAgaWYgKElORlJBX09OKHBBZCkpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIkNvbm5lY3RlZChBUDogJXNbJTAyWDolMDJYOiUwMlg6JTAyWDolMDJYOiUwMlhdKVxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLlNzaWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFswXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzFdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbMl0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFszXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzRdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbNV0pOwotICAgICAgICAgICAgCQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSAsKCJTc2lkPSVzICxTc2lkbGVuID0gJWRcbiIscEFkLT5Db21tb25DZmcuU3NpZCwgcEFkLT5Db21tb25DZmcuU3NpZExlbikpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoQURIT0NfT04ocEFkKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJDb25uZWN0ZWRcbiIpOwotICAgICAgICAgICAgCX0KLSAgICAgICAgICAgIAllbHNlCi0gICAgICAgICAgICAJewotICAgICAgICAgICAgCSAgICBzcHJpbnRmKGV4dHJhLCAiRGlzY29ubmVjdGVkXG4iKTsKLSAgICAgICAgICAgIAkJREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UgLCgiQ29ublN0YXR1cyBpcyBub3QgY29ubmVjdGVkXG4iKSk7Ci0gICAgICAgICAgICAJfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBTSE9XX0RSVklFUl9WRVJJT046Ci0gICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiRHJpdmVyIHZlcnNpb24tJXMsICVzICVzXG4iLCBTVEFfRFJJVkVSX1ZFUlNJT04sIF9fREFURV9fLCBfX1RJTUVfXyApOwotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSNpZmRlZiBET1QxMV9OX1NVUFBPUlQKLSAgICAgICAgY2FzZSBTSE9XX0JBX0lORk86Ci0gICAgICAgICAgICBnZXRCYUluZm8ocEFkLCBleHRyYSk7Ci0gICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcMCcKLSAgICAgICAgICAgIGJyZWFrOwotI2VuZGlmIC8vIERPVDExX05fU1VQUE9SVCAvLwotCQljYXNlIFNIT1dfREVTQ19JTkZPOgotCQkJewotCQkJCVNob3dfRGVzY0luZm9fUHJvYyhwQWQsIE5VTEwpOwotCQkJCXdycS0+bGVuZ3RoID0gMDsgLy8gMTogc2l6ZSBvZiAnXDAnCi0JCQl9Ci0JCQlicmVhazsKLSAgICAgICAgY2FzZSBSQUlPX09GRjoKLSAgICAgICAgICAgIGlmIChSVE1QX1RFU1RfRkxBRyhwQWQsIGZSVE1QX0FEQVBURVJfQlNTX1NDQU5fSU5fUFJPR1JFU1MpKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJTY2FubmluZ1xuIik7Ci0gICAgICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBwQWQtPlN0YUNmZy5iU3dSYWRpbyA9IEZBTFNFOwotICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyAhPSAocEFkLT5TdGFDZmcuYkh3UmFkaW8gJiYgcEFkLT5TdGFDZmcuYlN3UmFkaW8pKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLmJSYWRpbyA9IChwQWQtPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWQtPlN0YUNmZy5iU3dSYWRpbyk7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyA9PSBGQUxTRSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIE1sbWVSYWRpb09mZihwQWQpOwotICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJcEFkLT5FeHRyYUluZm8gPSBTV19SQURJT19PRkY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIlJhZGlvIE9mZlxuIik7Ci0gICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcMCcKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJBSU9fT046Ci0gICAgICAgICAgICBpZiAoUlRNUF9URVNUX0ZMQUcocEFkLCBmUlRNUF9BREFQVEVSX0JTU19TQ0FOX0lOX1BST0dSRVNTKSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBzcHJpbnRmKGV4dHJhLCAiU2Nhbm5pbmdcbiIpOwotICAgICAgICAgICAgICAgIHdycS0+bGVuZ3RoID0gc3RybGVuKGV4dHJhKSArIDE7IC8vIDE6IHNpemUgb2YgJ1wwJwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkLT5TdGFDZmcuYlN3UmFkaW8gPSBUUlVFOwotICAgICAgICAgICAgLy9pZiAocEFkLT5TdGFDZmcuYlJhZGlvICE9IChwQWQtPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWQtPlN0YUNmZy5iU3dSYWRpbykpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgcEFkLT5TdGFDZmcuYlJhZGlvID0gKHBBZC0+U3RhQ2ZnLmJId1JhZGlvICYmIHBBZC0+U3RhQ2ZnLmJTd1JhZGlvKTsKLSAgICAgICAgICAgICAgICBpZiAocEFkLT5TdGFDZmcuYlJhZGlvID09IFRSVUUpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBNbG1lUmFkaW9PbihwQWQpOwotICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJcEFkLT5FeHRyYUluZm8gPSBFWFRSQV9JTkZPX0NMRUFSOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAg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AgIH0KLSAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtLT52YWx1ZSA9PSBJV19BVVRIX0NJUEhFUl9US0lQKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgPSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSBpZiAocGFyYW0tPnZhbHVlID09IElXX0FVVEhfQ0lQSEVSX0NDTVApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5Hcm91cENpcGhlciA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCIlczo6SVdfQVVUSF9DSVBIRVJfR1JPVVAgLSBwYXJhbS0+dmFsdWUgPSAlZCFcbiIsIF9fZnVuY19fLCBwYXJhbS0+dmFsdWUpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgIAljYXNlIElXX0FVVEhfS0VZX01HTVQ6Ci0gICAgICAgICAgICBpZiAocGFyYW0tPnZhbHVlID09IElXX0FVVEhfS0VZX01HTVRfODAyXzFYKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID09IE5kaXM4MDJfMTFBdXRoTW9kZVdQQVBTSykKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPSBOZGlzODAyXzExQXV0aE1vZGVXUEE7Ci0jaWZkZWYgV1BBX1NVUFBMSUNBTlRfU1VQUE9SVAotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLklFRUU4MDIxWCA9IEZBTFNFOwotI2VuZGlmIC8vIFdQQV9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RYX0tFWSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgZm5TZXRDaXBoZXJLZXkocEFkYXB0ZXIsIGtleUlkeCwgQ0lQSEVSX1RLSVAsIEZBTFNFLCBleHQpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVEFfUE9SVF9TRUNVUkVEKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQkJfQotICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfR1JPVVBfS0VZKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfVEtJUCwgVFJVRSwgZXh0KTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IDgwMi4xeCBwb3J0IGNvbnRyb2wKLSAgICAgICAgICAgIAkgICAgICAgIC8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgCSAgICAgICAgU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgSVdfRU5DT0RFX0FMR19DQ01QOgotICAgICAgICAgICAgICAgIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfU0VUX1RYX0tFWSkKLQkJewotICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfQUVTLCBGQUxTRSwgZXh0KTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBMikKLSAgICAgICAgICAgICAgICAgICAgCS8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgICAgICAJU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKGV4dC0+ZXh0X2ZsYWdzICYgSVdfRU5DT0RFX0VYVF9HUk9VUF9LRVkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBmblNldENpcGhlcktleShwQWRhcHRlciwga2V5SWR4LCBDSVBIRVJfQUVTLCBUUlVFLCBleHQpOwotCi0gICAgICAgICAgICAgICAgICAgIC8vIHNldCA4MDIuMXggcG9ydCBjb250cm9sCi0gICAgICAgIAkgICAgICAgIC8vcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotICAgICAgICAJICAgICAgICBTVEFfUE9SVF9TRUNVUkVEKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgCQlkZWZhdWx0OgotICAgIAkJCXJldHVybiAtRUlOVkFMOwotCQl9Ci0gICAgfQotCi0gICAgcmV0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IE4ocHJpdnRhYiksCi0jaWYgSVdfSEFORExFUl9WRVJTSU9OID49IDcKLSAgICAuZ2V0X3dpcmVsZXNzX3N0YXRzID0gcnQyOHh4X2dldF93aXJlbGVzc19zdGF0cywKLSNlbmRpZgotfTsKLQotSU5UIFJUTVBTZXRJbmZvcm1hdGlvbigKLSAgICBJTiAgUFJUTVBfQURBUFRFUiBwQWRhcHRlciwKLSAgICBJTiAgT1VUIHN0cnVjdCBpZnJlcSAgICAqcnEsCi0gICAgSU4gIElOVCAgICAgICAgICAgICAgICAgY21kKQotewotICAgIHN0cnVjdCBpd3JlcSAgICAgICAgICAgICAgICAgICAgICAgICp3cnEgPSAoc3RydWN0IGl3cmVxICopIHJxOwotICAgIE5ESVNfODAyXzExX1NTSUQgICAgICAgICAgICAgICAgICAgIFNzaWQ7Ci0gICAgTkRJU184MDJfMTFfTUFDX0FERFJFU1MgICAgICAgICAgICAgQnNzaWQ7Ci0gICAgUlRfODAyXzExX1BIWV9NT0RFICAgICAgICAgICAgICAgICAgUGh5TW9kZTsKLSAgICBSVF84MDJfMTFfU1RBX0NPTkZJRyAgICAgICAgICAgICAgICBTdGFDb25maWc7Ci0gICAgTkRJU184MDJfMTFfUkFURVMgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXM7Ci0gICAgUlRfODAyXzExX1BSRUFNQkxFICAgICAgICAgICAgICAgICAgUHJlYW1ibGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUgICAgIEF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlTWF4OwotICAgIE5ESVNfODAyXzExX05FVFdPUktfSU5GUkFTVFJVQ1RVUkUgIEJzc1R5cGU7Ci0gICAgTkRJU184MDJfMTFfUlRTX1RIUkVTSE9MRCAgICAgICAgICAgUnRzVGhyZXNoOwotICAgIE5ESVNfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEIEZyYWdUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfUE9XRVJfTU9ERSAgICAgICAgICAgICAgUG93ZXJNb2RlOwotICAgIFBORElTXzgwMl8xMV9LRVkgICAgICAgICAgICAgICAgICAgIHBLZXkgPSBOVUxMOwotICAgIFBORElTXzgwMl8xMV9XRVAJCQkgICAgICAgIHBXZXBLZXkgPU5VTEw7Ci0gICAgUE5ESVNfODAyXzExX1JFTU9WRV9LRVkgICAgICAgICAgICAgcFJlbW92ZUtleSA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAgICAgICAgICAgQ29uZmlnLCAqcENvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19UWVBFICAgICAgICAgICAgTmV0VHlwZTsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOb3c7Ci0gICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gMDsKLSAgICBJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTLCBNYXhQaHlNb2RlID0gUEhZXzExRzsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQb3dlclRlbXA7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmFkaW9TdGF0ZTsKLSAgICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0ZU1hY2hpbmVUb3VjaGVkID0gRkFMU0U7Ci0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCi0JT0lEX1NFVF9IVF9QSFlNT0RFCQkJCQlIVF9QaHlNb2RlOwkvLzExbiAsa2F0aHkKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLSNpZmRlZiBXUEFfU1VQUExJQ0FO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cXVlc3QsIGJlY2F1c2UgdGhpcyByZXF1ZXN0IGlzIGluaXRpYXRlZCBieSBORElTLgotICAgICAgICAgICAgcEFkYXB0ZXItPk1sbWVBdXguQ3VyclJlcUlzRnJvbU5kaXMgPSBGQUxTRTsKLSAgICAgICAgICAgIC8vIFJlc2V0IGFsbG93ZWQgc2NhbiByZXRyaWVzCi0gICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlNjYW5DbnQgPSAwOwotICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5MYXN0U2NhblRpbWUgPSBOb3c7Ci0KLQkJCXBBZGFwdGVyLT5TdGFDZmcuYlNjYW5SZXFJc0Zyb21XZWJVSSA9IFRSVUU7Ci0gICAgICAgICAgICBSVE1QX1NFVF9GTEFHKHBBZGFwdGVyLCBmUlRNUF9BREFQVEVSX0JTU19TQ0FOX0lOX1BST0dSRVNTKTsKLSAgICAgICAgICAgIE1sbWVFbnF1ZXVlKHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsCi0gICAgICAgICAgICAgICAgICAgICAgICBPSURfODAyXzExX0JTU0lEX0xJU1RfU0NBTiwKLSAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLQotICAgICAgICAgICAgU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLSAgICAgICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9TU0lEOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoTkRJU184MDJfMTFfU1NJRCkpCi0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICA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m5lY3QgQVAgYWdhaW4gaW4gU1RBTWxtZVBlcmlvZGljRXhlYwotCQkJCXBBZGFwdGVyLT5NbG1lQXV4LkF1dG9SZWNvbm5lY3RTc2lkTGVuPSAzMjsKLQotICAgICAgICAgICAgICAgIC8vIFJlc2V0IGFsbG93ZWQgc2NhbiByZXRyaWVzCi0JCQkJcEFkYXB0ZXItPlN0YUNmZy5TY2FuQ250ID0gMDsKLQotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+TWxtZS5DbnRsTWFjaGluZS5DdXJyU3RhdGUgIT0gQ05UTF9JRExFKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgUlQyOFhYX01MTUVfUkVTRVRfU1RBVEVfTUFDSElORShwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIiEhISBNTE1FIGJ1c3ksIHJlc2V0IE1MTUUgc3RhdGUgbWFjaGluZSAhISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgTWxtZUVucXVldWUocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgT0lEXzgwMl8xMV9CU1NJRCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoTkRJU184MDJfMTFfTUFDX0FERFJFU1MpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIChWT0lEICopJkJzc2lkKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotICAgICAgICAgICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotCi0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0JTU0lEICUwMng6JTAyeDolMDJ4OiUwMng6JTAyeDolMDJ4XG4iLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJzc2lkWzBdLCBCc3NpZFsxXSwgQnNzaWRbMl0sIEJzc2lkWzNdLCBCc3NpZFs0XSwgQnNzaWRbNV0pKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFJUX09JRF84MDJfMTFfUkFESU86Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihCT09MRUFOKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUmFkaW9TdGF0ZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUkFESU8gKD0lZClcbiIsIFJhZGlvU3RhdGUpKTsKLSAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbyAhPSBSYWRpb1N0YXRlKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbyA9IFJhZGlvU3RhdGU7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLmJSYWRpbyAhPSAocEFkYXB0ZXItPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvKSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5iUmFkaW8gPSAocEFkYXB0ZXItPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWRhcHRlci0+U3RhQ2ZnLmJTd1JhZGlvKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLmJSYWRpbyA9PSBUUlVFKQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1sbWVSYWRpb09uKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJCQlwQWRhcHRlci0+RXh0cmFJbmZvID0gRVhUUkFfSU5GT19DTEVBUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNbG1lUmFkaW9PZmYocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBleHRyYSBpbmZvcm1hdGlvbgotCQkJCQkJCXBBZGFwdGVyLT5FeHRyYUluZm8gPSBTV19SQURJT19PRkY7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BIWV9NT0RFOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoUlRfODAyXzExX1BIWV9NT0RFKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmUGh5TW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwg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AgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfU0VUX1NUQV9DT05GSUcgKEJ1cnN0PSVkLCBQcm90ZWN0aW9uPSVsZCxTaG9ydFNsb3Q9JWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5iRW5hYmxlVHhCdXJzdCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlVzZUJHUHJvdGVjdGlvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLmJVc2VTaG9ydFNsb3RUaW1lKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0RFU0lSRURfUkFURVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9SQVRFUykpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJmFyeVJhdGVzLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIE5kaXNaZXJvTWVtb3J5KHBBZGFwdGVyLT5Db21tb25DZmcuRGVzaXJlUmF0ZSwgTUFYX0xFTl9PRl9TVVBQT1JURURfUkFURVMpOwotICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBBZGFwdGVyLT5Db21tb25DZmcuRGVzaXJlUmF0ZSwgJmFyeVJhdGVzLCBzaXplb2YoTkRJU184MDJfMTFfUkFURVMpKTsK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HNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlByZWFtYmxlLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIGlmIChQcmVhbWJsZSA9PSBSdDgwMl8xMVByZWFtYmxlU2hvcnQpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlR4UHJlYW1ibGUgPSBQcmVhbWJsZTsKLSAgICAgICAgICAgICAgICAgICAgTWxtZVNldFR4UHJlYW1ibGUocEFkYXB0ZXIsIFJ0ODAyXzExUHJlYW1ibGVTaG9ydCk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKChQcmVhbWJsZSA9PSBSdDgwMl8xMVByZWFtYmxlTG9uZykgfHwgKFByZWFtYmxlID09IFJ0ODAyXzExUHJlYW1ibGVBdXRvKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIGlmIHVzZXIgd2FudHMgQVVUTywgaW5pdGlhbGl6ZSB0byBMT05HIGhlcmUsIHRoZW4gY2hhbmdlIGFjY29yZGluZyB0byBBUCdzCi0gICAgICAgICAgICAgICAgICAgIC8vIGNhcGFiaWxpdHkgdXBvbiBhc3NvY2lhdGlvbi4KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5UeFByZWFtYmxlID0gUHJlYW1ibGU7Ci0gICAgICAgICAgICAgICAgICAgIE1sbWVTZXRUeFByZWFtYmxlKHBBZGFwdGVyLCBSdDgwMl8xMVByZWFtYmxlTG9uZyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUFJFQU1CTEUgKD0lZClcbiIsIFByZWFtYmxlKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1dFUF9TVEFUVVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9XRVBfU1RBVFVTKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmV2VwU3RhdHVzLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIC8vIFNpbmNlIFRLSVAsIEFFUywgV0VQIGFyZSBhbGwgc3VwcG9ydGVkLiBJdCBzaG91bGQgbm90IGhhdmUgYW55IGludmFsaWQgc2V0dGluZwotICAgICAgICAgICAgICAgIGlmIChXZXBTdGF0dXMgPD0gTmRpczgwMl8xMUVuY3J5cHRpb24zS2V5QWJzZW50KQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICE9IFdlcFN0YXR1cykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29uZmlnIGhhcyBjaGFuZ2VkCi0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+YkNvbmZpZ0NoYW5nZWQgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICAgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5PcmlnV2VwU3RhdHVzID0gV2VwU3RhdHVzOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBhaXJDaXBoZXIgICAgPSBXZXBTdGF0dXM7Ci0gICAgICAgICAgICAgICAgCXBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfV0VQX1NUQVRVUyAoPSVkKVxuIixXZXBTdGF0dXMpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZBdXRoTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoQXV0aE1vZGUgPiBOZGlzODAyXzExQXV0aE1vZGVNYXgpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IEF1dGhNb2RlKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBDb25maWcgaGFzIGNoYW5nZWQKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5iQ29uZmlnQ2hhbmdlZCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9IEF1dGhNb2RlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkID0gV1BBXzgwMl8xWF9QT1JUX05PVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9BVVRIRU5USUNBVElPTl9NT0RFICg9JWQpIFxuIixwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0lORlJBU1RSVUNUVVJFX01PREU6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9ORVRXT1JLX0lORlJBU1RSVUNUVVJFKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICA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9sZCA9IE1BWF9GUkFHX1RIUkVTSE9MRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuYlVzZVplcm9Ub0Rpc2FibGVGcmFnbWVudCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5GcmFnbWVudFRocmVzaG9sZCA9IChVU0hPUlQpRnJhZ1RocmVzaDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9GUkFHTUVOVEFUSU9OX1RIUkVTSE9MRCAoPSVsZCkgXG4iLEZyYWdUaHJlc2gpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfUE9XRVJfTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX1BPV0VSX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlBvd2VyTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoUG93ZXJNb2RlID09IE5kaXM4MDJfMTFQb3dlck1vZGVDQU0pCi0gICAgICAgICAgICAgICAgCVNldF9QU01vZGVfUHJvYyhwQWRhcHRlciwgIkNBTSIpOwotICAgICAgICAgICAgICAgIGV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E9SVAotCQkJCWlmIChTdGF0dXMgPT0gTkRJU19TVEFUVVNfU1VDQ0VTUykKLQkJCQkJU2V0Q29tbW9uSFQocEFkYXB0ZXIpOwotI2VuZGlmIC8vIERPVDExX05fU1VQUE9SVCAvLwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9ORVRXT1JLX1RZUEVfSU5fVVNFICg9JWQpXG4iLE5ldFR5cGUpKTsKLQkJICAgIH0KLQkJCWJyZWFrOwotICAgICAgICAvLyBGb3IgV1BBIFBTSyBQTUsga2V5Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9BRERfV1BBOgotICAgICAgICAgICAgcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9BRERfV1BBLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyX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QotICAgICAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFOb25lKQotICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XcGFTdGF0ZSA9IFNTX1NUQVJUOwotCi0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9BRERfV1BBIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBLZXktPktleUluZGV4LCBwS2V5LT5LZXlMZW5ndGgpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XcGFTdGF0ZSA9IFNTX05PVFVTRTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpSVF9PSURfODAyXzExX0FERF9XUEEgKGlkPTB4JXgsIExlbj0lZC1ieXRlKVxuIiwgcEtleS0+S2V5SW5kZXgsIHBLZXktPktleUxlbmd0aCkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9SRU1PVkVfS0VZOgotICAgICAgICAgICAgcFJlbW92ZUtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwUmVtb3ZlS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocFJlbW92ZUtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwUmVtb3ZlS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFJUTVBXUEFSZW1vdmVLZXlQcm9jKHBBZGFwdGVyLCBwUmVtb3ZlS2V5KTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVksIFJlbW92ZSBXUEEgS2V5ISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gcFJlbW92ZUtleS0+S2V5SW5kZXg7Ci0KLSAgICAgICAgICAgICAgICAgICAgaWYgKEtleUlkeCAmIDB4ODAwMDAwMDApCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNob3VsZCBuZXZlciBzZXQgZGVmYXVsdCBiaXQgd2hlbiByZW1vdmUga2V5Ci0gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIShTaG91bGQgbmV2ZXIgc2V0IGRlZmF1bHQgYml0IHdoZW4gcmVtb3ZlIGtleSlcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIEtleUlkeCA9IEtleUlkeCAmIDB4MGZmZmZmZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoS2V5SWR4ID4gMykKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfUkVNT1ZFX0tFWSwgRmFpbGVkISEoS2V5SWRbJWRdIG91dCBvZiByYW5nZSlcbiIsIEtleUlkeCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXlMZW4gPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5DaXBoZXJBbGcgPSBDSVBIRVJfTk9ORTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBBc2ljUmVtb3ZlU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsIDAsIChVQ0hBUilLZXlJZHgpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBSZW1vdmVLZXktPktleUluZGV4LCBwUmVtb3ZlS2V5LT5MZW5ndGgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBSZW1vdmVLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIC8vIE5ldyBmb3IgV1BBCi0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9BRERfS0VZOgotICAgICAgICAgICAgcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKHBLZXksIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBpZiAocEtleS0+TGVuZ3RoICE9IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSwgRmFpbGVkISFcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBSVE1QQWRkS2V5KHBBZGFwdGVyLCBwS2V5KTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSAoaWQ9MHgleCwgTGVuPSVkLWJ5dGUpXG4iLCBwS2V5LT5LZXlJbmRleCwgcEtleS0+S2V5TGVuZ3RoKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBrZnJlZShwS2V5KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQ09ORklHVVJBVElPTjoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZDb25maWcsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgcENvbmZpZyA9ICZDb25maWc7Ci0KLSAgICAgICAgICAgICAgICBpZiAoKHBDb25maWctPkJlYWNvblBlcmlvZCA+PSAyMCkgJiYgKHBDb25maWctPkJlYWNvblBlcmlvZCA8PTQwMCkpCi0gICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkJlYWNvblBlcmlvZCA9IChVU0hPUlQpIHBDb25maWctPkJlYWNvblBlcmlvZDsKLQotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFBY3RpdmUuQXRpbVdpbiA9IChVU0hPUlQpIHBDb25maWctPkFUSU1XaW5kb3c7Ci0gICAgICAgICAgICAgICAgTUFQX0tIWl9UT19DSEFOTkVMX0lEKHBDb25maWctPkRTQ29uZmlnLCBwQWRhcHRlci0+Q29t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gICAgICAgICAgfQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocFdlcEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChTdGF0dXMpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAobGVuZ3RoIG1pc21hdGNoKSEhXG4iKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0JCSAgICAgICAgS2V5SWR4ID0gcFdlcEtleS0+S2V5SW5kZXggJiAweDBmZmZmZmZmOwotICAgICAgICAgICAgICAgIC8vIEtleUlkeCBtdXN0IGJlIDAgfiAzCi0gICAgICAgICAgICAgICAgaWYgKEtleUlkeCA+IDQpCi0gICAgCQkJewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAoS2V5SWR4IG11c3QgYmUgc21hbGxlciB0aGFuIDQpISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgVUNIQVIgQ2lwaGVyQWxnID0gMDsKLSAgICAgICAgICAgICAgICAgICAgUFVDSEFSIEtleTsKLQotICAgICAgICAgICAgICAgICAgICAvLyBzZXQga2V5IG1hdGVyaWFsIGFuZCBrZXkgbGVuZ3RoCi0gICAgICAgICAgICAgICAgICAgIE5kaXNaZXJvTWVtb3J5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXksIDE2KTsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLktleUxlbiA9IChVQ0hBUikgcFdlcEtleS0+S2V5TGVuZ3RoOwotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdW0tleUlkeF0uS2V5LCAmcFdlcEtleS0+S2V5TWF0ZXJpYWwsIHBXZXBLZXktPktleUxlbmd0aCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHBXZXBLZXktPktleUxlbmd0aCkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA1OgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVA2NDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDEyODsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIG9ubHkgc3VwcG9ydCBDSVBIRVJfV0VQNjQobGVuOjUpICYgQ0lQSEVSX1dFUDEyOChsZW46MTMpISFcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXl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gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0RST1BfVU5FTkNSWVBURUQ6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihpbnQpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGludCBlbmFibGVkID0gMDsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmZW5hYmxlZCwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCA9PSAxKQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkID0gV1BBXzgwMl8xWF9QT1JUX05PVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5Qb3J0U2VjdXJlZCA9IFdQQV84MDJfMVhfUE9SVF9TRUNVUkVEOwotCQkJCU5kaXNBY3F1aXJlU3BpbkxvY2soJnBBZGFwdGVyLT5NYWNUYWJMb2NrKTsKLQkJCQlwQWRhcHRlci0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF0uUG9ydFNlY3VyZWQgPSBwQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkOwotCQkJCU5kaXNSZWxlYXNlU3BpbkxvY2soJnBBZGFwdGVyLT5NYWNUYWJMb2NrKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfRFJPUF9VTkVOQ1JZUFRFRCAoPSVkKVxuIiwgZW5hYmxlZCkpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICA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TkZJR1VSQVRJT04gICAgICAgICAgICpwQ29uZmlndXJhdGlvbiA9IE5VTEw7Ci0gICAgUlRfODAyXzExX0xJTktfU1RBVFVTICAgICAgICAgICAgICAgKnBMaW5rU3RhdHVzID0gTlVMTDsKLSAgICBSVF84MDJfMTFfU1RBX0NPTkZJRyAgICAgICAgICAgICAgICAqcFN0YUNvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfU1RBVElTVElDUyAgICAgICAgICAgICAgKnBTdGF0aXN0aWNzID0gTlVMTDsKLSAgICBORElTXzgwMl8xMV9SVFNfVEhSRVNIT0xEICAgICAgICAgICBSdHNUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQgRnJhZ1RocmVzaDsKLSAgICBORElTXzgwMl8xMV9QT1dFUl9NT0RFICAgICAgICAgICAgICBQb3dlck1vZGU7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19JTkZSQVNUUlVDVFVSRSAgQnNzVHlwZTsKLSAgICBSVF84MDJfMTFfUFJFQU1CTEUgICAgICAgICAgICAgICAgICBQcmVhbVR5cGU7Ci0gICAgTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERSAgICAgQXV0aE1vZGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfTUVESUFfU1RBVEUgICAgICAgICAgICAgICAgICAgIE1lZGlhU3RhdGU7Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzQnVmU2l6ZSwgdWxJbmZvPTAsIE5ldHdvcmtUeXBlTGlzdFs0XSwgYXBzZCA9IDA7Ci0gICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzTGVuID0gMDsKLSAgICBQVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQnVmID0gTlVMTCwgcFB0cjsKLSAg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AgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5FeHRSYXRlTGVuKTsKLQotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5WYXJJRUxlbiA9PSAwKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEJzcy0+SUVMZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEJzcy0+SUVzLCAmcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uRml4SUVzLCBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSk7Ci0gICAgICAgICAgICAgICAgICAgIHBQdHIgPSBwUHRyICsgc2l6ZW9mKE5ESVNfV0xBTl9CU1NJRF9FWCkgLSAxICsgc2l6ZW9mKE5ESVNfODAyXzExX0ZJWEVEX0lFcyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBCc3MtPklFTGVuZ3RoID0gKFVMT05HKShzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuKTsKLSAgICAgICAgICAgICAgICAgICAgcFB0ciA9IHBQdHIgKyBzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEJzcy0+SUVzLCAmcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uRml4SUVzLCBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSk7Ci0gICAgICAgICAgICAgICAgIC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aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBrZnJlZShwQnNzaWRMaXN0KTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUUyQklHOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IEJzc0xlbjsKLSNlbmRpZgotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsIHBCc3NpZExpc3QsIEJzc0xlbik7Ci0gICAgICAgICAgICBrZnJlZShwQnNzaWRMaXN0KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfM19DVVJSRU5UX0FERFJFU1M6Ci0gICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBNQUNfQUREUl9MRU47Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgJnBBZGFwdGVyLT5DdXJyZW50QWRkcmVzcywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF9HRU5fTUVESUFfQ09OTkVDVF9TVEFUVVM6Ci0gICAgICAgICAgICBpZiAocEFkYXB0ZXItPkluZGljYXRlTWVkaWFTdGF0ZSA9PSBOZGlzTWVkaWFTdGF0ZUNvbm5lY3RlZCkKLSAgICAgICAgICAgICAgICBNZWRpYVN0YXRlID0gTmRpc01lZGlhU3RhdGVDb25uZWN0ZWQ7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgTWVkaWFTdGF0ZSA9IE5kaXNNZWRpYVN0YXRlRGlzY29ubmVjdGVkOwotCi0gICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBzaXplb2YoTkRJU19NRURJQV9TVEFURSk7Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3Rv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TiAqKSBrbWFsbG9jKHNpemVvZihORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OKSwgTUVNX0FMTE9DX0ZMQUcpOwotICAgICAgICAgICAgaWYgKHBDb25maWd1cmF0aW9uKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5MZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTik7Ci0gICAgICAgICAgICAgICAgcENvbmZpZ3VyYXRpb24tPkJlYWNvblBlcmlvZCA9IHBBZGFwdGVyLT5Db21tb25DZmcuQmVhY29uUGVyaW9kOwotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5BVElNV2luZG93ID0gcEFkYXB0ZXItPlN0YUFjdGl2ZS5BdGltV2luOwotICAgICAgICAgICAgICAgIE1BUF9DSEFOTkVMX0lEX1RPX0tIWihwQWRhcHRlci0+Q29tbW9uQ2ZnLkNoYW5uZWwsIHBDb25maWd1cmF0aW9uLT5EU0NvbmZpZyk7Ci0gICAgICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfdG9fdXNlcih3cnEtPnUuZGF0YS5wb2ludGVyLCBwQ29uZmlndXJhdGlvbiwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6T0lEXzgwMl8xMV9DT05GSUdVUkFUSU9OKEJlYWNvblBlcmlvZD0lbGQsQXRpbVc9JWxkLENoYW5uZWw9JWQpIFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQ29uZmlndXJhdGlvbi0+QmVhY29uUGVyaW9kLCBwQ29uZmlndXJhdGlvbi0+QVRJTVdpbmRvdywgcEFkYXB0ZXItPkNvbW1vbkN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ICAgICAgICAgICAgIFN0YXR1cyA9IC1FRkFVTFQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfR0VOX1JDVl9PSzoKLSAgICAgICAgICAgIHVsSW5mbyA9IHBBZGFwdGVyLT5Db3VudGVyczgwMjMuR29vZFJlY2VpdmVzOwotICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKHVsSW5mbyk7Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgJnVsSW5mbywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF9HRU5fUkNWX05PX0JVRkZFUjoKLSAgICAgICAgICAgIHVsSW5mbyA9IHBBZGFwdGVyLT5Db3VudGVyczgwMjMuUnhOb0J1ZmZlcjsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BIWV9NT0RFOgotICAgICAgICAgICAgdWxJbmZvID0gKFVMT05HKXBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZTsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV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ZCBvcGVyYXRpb25zCi0gICAgCVJUMjhYWF9NTE1FX0hBTkRMRVIocEFkKTsKLQotCXJldHVybiBTdGF0dXM7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFNTSUQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfU1NJRF9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZCwgKnBTc2lkPU5VTEw7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3RhdGVNYWNoaW5lVG91Y2hlZCA9IEZBTFNFOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgPSBUUlVFOwotCi0gICAgaWYoIHN0cmxlbihhcmcpIDw9IE1BWF9MRU5fT0ZfU1NJRCkKLSAgICB7Ci0gICAgICAgIE5kaXNaZXJvTWVtb3J5KCZTc2lkLCBzaXplb2YoTkRJU184MDJfMTFfU1NJRCkpOwotICAgICAgICBpZiAoc3RybGVuKGFyZykgIT0gMCkKLSAgICAgICAgewotICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoU3NpZC5Tc2lkLCBhcmcsIHN0cmxlbihhcmcpKTsKLSAgICAgICAgICAgIFNzaWQuU3NpZExlbmd0aCA9IHN0cmxlbih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AgICAgICAgICBzaXplb2YoTkRJU184MDJfMTFfU1NJRCksCi0gICAgICAgICAgICAgICAgICAgIChWT0lEICopcFNzaWQpOwotCi0gICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfU1NJRF9Qcm9jOjooTGVuPSVkLFNzaWQ9JXMpXG4iLCBTc2lkLlNzaWRMZW5ndGgsIFNzaWQuU3NpZCkpOwotICAgIH0KLSAgICBlbHNlCi0gICAgICAgIHN1Y2Nlc3MgPSBGQUxTRTsKLQotICAgIGlmIChTdGF0ZU1hY2hpbmVUb3VjaGVkKSAvLyBVcHBlciBsYXllciBzZW50IGEgTUxNRS1yZWxhdGVkIG9wZXJhdGlvbnMKLSAgICAJUlQyOFhYX01MTUVfSEFORExFUihwQWRhcHRlcik7Ci0KLSAgICByZXR1cm4gc3VjY2VzczsKLX0KLQotI2lmZGVmIFdNTV9TVVBQT1JUCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXbW1DYXBhYmxlIEVuYWJsZSBvciBEaXNhYmxlCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X1dtbUNhcGFibGVfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JQk9PTEVBTgliV21tQ2FwYWJsZTsKLQotCWJXbW1DYXBhYmxlID0gc2ltcGxlX3N0cnRvbChhcmcsIDAsIDEwK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OT1RVU0U7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfTmV0d29ya1R5cGVfUHJvYzo6KE5ldHdvcmtUeXBlPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5Cc3NUeXBlKSk7Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQXV0aGVudGljYXRpb24gbW9kZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9BdXRoTW9kZV9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaWYgKChzdHJjbXAoYXJnLCAiV0VQQVVUTyIpID09IDApIHx8IChzdHJjbXAoYXJnLCAid2VwYXV0byIpID09IDApKQotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlQXV0b1N3aXRjaDsKLSAgICBlbHNlIGlmICgoc3RyY21wKGFyZywgIk9QRU4iKSA9PSAwKSB8fCAoc3RyY21wKGFyZywgIm9wZW4iKSA9PSAwKSkKLSAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9IE5kaXM4MDJfMTFBdXRoTW9kZU9wZW47Ci0gICAgZWxzZSBpZiAoKHN0cmNtcChhcmcsICJTSEFSRUQiKSA9PSAwKSB8fCAoc3RyY21wKGFyZywgInNoY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U5UX1NVUFBPUlQgLy8KLSAgICBlbHNlCi0gICAgICAgIHJldHVybiBGQUxTRTsKLQotICAgIHBBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfTk9UX1NFQ1VSRUQ7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfQXV0aE1vZGVfUHJvYzo6KEF1dGhNb2RlPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IEVuY3J5cHRpb24gVHlwZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9FbmNyeXBUeXBlX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpZiAoKHN0cmNtcChhcmcsICJOT05FIikgPT0gMCkgfHwgKHN0cmNtcChhcmcsICJub25lIikgPT0gMCkpCi0gICAgewotICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgICAgICByZXR1cm4gVFJVRTsgICAgLy8gZG8gbm90aGluZwotCi0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICAgICA9IE5kaXM4MDJfMTFXRV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PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgRGVmYXVsdCBLZXkgSUQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfRGVmYXVsdEtleUlEX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlJZHg7Ci0KLSAgICBLZXlJZHggPSBzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApOwotICAgIGlmKChLZXlJZHggPj0gMSApICYmIChLZXlJZHggPD0gNCkpCi0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVmYXVsdEtleUlkID0gKFVDSEFSKSAoS2V5SWR4IC0gMSApOwotICAgIGVsc2UKLSAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9JbnZhbGlkIGFyZ3VtZW50Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfRGVmYXVsdEtleUlEX1Byb2M6OihEZWZhdWx0S2V5SUQ9JWQpXG4iLCBwQWRhcHRlci0+U3RhQ2ZnLkRlZmF1bHRLZXlJZCkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkxCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTFfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBUUlVFOyAgICAvLyBkbyBub3RoaW5nCi0KLSAgICBLZXlMZW4gPSBzdHJsZW4oYXJnKTsKLQotICAgIHN3aXRjaCAoS2V5TGVuKQotICAgIHsKLSAgICAgICAgY2FzZSA1OiAvL3dlcCA0MCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTFfUHJvYzo6KEtleTE9JXMgYW5kIHR5cGU9JXMpXG4iLCBhcmcsICJBc2NpaSIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDEwOiAvL3dlcCA0MCBIZXggdHlwZQotICAgICAgICAgICAgZm9yKGk9MDsgaSA8IEtleUxlbjsgaSsrKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmKCAhaXN4ZGlnaXQoKihhcmcraSkpICkKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9Ob3QgSGV4IHZhbHVlOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW4gLyAyIDsKLSAgICAgICAgICAgIEF0b0goYXJnLCBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwgS2V5TGVuIC8gMik7Ci0gICAgICAgICAgICBDaXBoZXJBbGcgPSBDSVBIRVJfV0VQNjQ7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjooS2V5MT0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDEzOiAvL3dlcCAxMDQgQXNjaWkgdHlwZQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW47Ci0gICAgICAgICAgICBtZW1jcHkocEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXksIGFyZywgS2V5TGVuKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVAxMjg7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjooS2V5MT0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkFzY2lpIikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMjY6IC8vd2VwIDEwNCBIZXggdHlwZQotICAgICAgICAgICAgZm9yKGk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XlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgV0VQIEtFWTIKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfS2V5Ml9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5TGVuOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnPUNJUEhFUl9XRVA2NDsKLQotICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJf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Mj0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OiAvL0ludmFsaWQgYXJndW1lbnQKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkyX1Byb2M6OkludmFsaWQgYXJndW1lbnQgKD0lcylcbiIsIGFyZykpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgIH0KLSAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLkNpcGhlckFsZyA9IENpcGhlckFsZzsKLQotICAgIC8vIFNldCBrZXlzIChpbnRvIEFTSUMpCi0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICA7ICAgLy8gbm90IHN1cHBvcnQKLSAgICBlbHNlICAgIC8vIE9sZCBXRVAgc3R1ZmYKLSAgICB7Ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsxXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkzCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTNfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBUUlVFOyAgICAvLyBkbyBub3RoaW5nCi0KLSAgICBLZXlMZW4gPSBzdHJsZW4oYXJnKTsKLQotICAgIHN3aXRjaCAoS2V5TGVuKQotICAgIHsKLSAgICAgICAgY2FzZSA1OiAvL3dlcCA0MCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzJdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzJdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTNfUHJvYzo6KEtleTM9JXMgYW5kIHR5c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LyBPbGQgV0VQIHN0dWZmCi0gICAgewotICAgICAgICBBc2ljQWRkU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMl0uQ2lwaGVyQWxnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsyXS5LZXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXRVAgS0VZNAotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9LZXk0X1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlMZW47Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaXBoZXJBbGc9Q0lQSEVSX1dFUDY0OwotCi0gICAgaWYg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0RFQlVHX1RSQUNFLCAoIlNldF9LZXk0X1Byb2M6OihLZXk0PSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiSGV4IikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8vSW52YWxpZCBhcmd1bWVudAotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTRfUHJvYzo6SW52YWxpZCBhcmd1bWVudCAoPSVzKVxuIiwgYXJnKSk7Ci0gICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uQ2lwaGVyQWxnID0gQ2lwaGVyQWxnOwotCi0gICAgLy8gU2V0IGtleXMgKGludG8gQVNJQykKLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIDsgICAvLyBub3Qgc3VwcG9ydAotICAgIGVsc2UgICAgLy8gT2xkIFdFUCBzdHVmZgotICAgIHsKLSAgICAgICAgQXNpY0FkZFNoYXJlZEtleUVudHJ5KHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLkNpcGhlckFsZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotICAgIH0KLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXUEEgUFNLIGtleQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9XUEFQU0tfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgIGtleU1hdGVyaWFsWzQwXTsKLQotICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spICYmCi0gICAgICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0spICYmCi0JICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQU5vbmUpCi0JCSkKLSAgICAgICAgcmV0dXJuIFRSVUU7ICAgIC8vIGRvIG5vdGhpbmcKLQotICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9XUEFQU0tfUHJvYzo6KFdQQVBTSz0lcylcbiIsIGFyZykpOwotCi0gICAgTmRpc1plcm9NZW1vcnkoa2V5TWF0ZXJpYWwsIDQwKTsKLQotICAgIGlmICgoc3RybGVuKGFyZykgPCA4KSB8fCAoc3RybGVuKGFyZykgPiA2NCkpCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQgZmFpbGVkISEoV1BBUFNLPSVzKSwgV1BBUFNLIGtleS1zd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0KLQkJCQlSVE1QX0lPX1dSSVRFMzIocEFkYXB0ZXIsIG1hY0FkZHIsIG1hY1ZhbHVlKTsKLQkJCQlzcHJpbnRmKG1zZytzdHJsZW4obXNnKSwgIlsweCUwOGxYXTolMDhYICAiLCBtYWNBZGRyLCBtYWNWYWx1ZSk7Ci0JCQl9Ci0JCX0KLQl9Ci1uZXh0OgotCWlmKHN0cmxlbihtc2cpID09IDEpCi0JCXNwcmludGYobXNnK3N0cmxlbihtc2cpLCAiPT09PkVycm9yIGNvbW1hbmQgZm9ybWF0ISIpOwotCi0JLy8gQ29weSB0aGUgaW5mb3JtYXRpb24gaW50byB0aGUgdXNlciBidWZmZXIKLQl3cnEtPnUuZGF0YS5sZW5ndGggPSBzdHJsZW4obXNnKTsKLQlTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgbXNnLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiPD09UlRNUElvY3RsTUFDXG5cbiIpKTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBSZWFkIC8gV3JpdGUgRTJQUk9NCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWRhcHRlciAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgotICAgICAgICB3cnEgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgaW9jdGwgYXJndW1lbnQKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgTm9uZQotCi0gICAgTm90ZToKLSAgICAgICAgVXNhZ2U6Ci0gICAgICAgICAgICAgICAxLikgaXdwcml2IHJhMCBlMnAgMCAgICAgCT09PiByZWFkIEUyUFJPTSB3aGVyZSBBZGRyPTB4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lZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0Jd3BhLmgKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVu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gICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotICAgIHJ0bXBfbWFpbi5jCi0KLSAgICBBYnN0cmFjdDoKLSAgICBtYWluIGluaXRpYWxpemF0aW9uIHJvdXRpbmVzCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBOYW1lICAgICAgICBEYXRlICAgICAgICAgICAgTW9kaWZpY2F0aW9uIGxvZ3MKLSAgICBKYW4gTGVlCQkwMS0xMC0yMDA1CSAgICBtb2RpZmllZAotCVNhbXB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iX2lkKTsKLQotI2lmbmRlZiBQRl9OT0ZSRUVaRQotI2RlZmluZSBQRl9OT0ZSRUVaRSAgMAotI2VuZGlmCi0KLQotI2lmIExJTlVYX1ZFUlNJT05fQ09ERSA8IEtFUk5FTF9WRVJTSU9OKDIsNSwwKQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vL3Rlc3RlZCBmb3Iga2VybmVsIDIuNCBzZXJpZXMKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0YXRpYyB2b2lkICpydHVzYl9wcm9iZShzdHJ1Y3QgdXNiX2RldmljZSAqZGV2LCBVSU5UIGludGVyZmFjZSwKLQkJCQkJCWNvbnN0IHN0cnVjdCB1c2JfZGV2aWNlX2lkICppZF90YWJsZSk7Ci1zdGF0aWMgdm9pZCBydHVzYl9kaXNjb25uZWN0KHN0cnVjdCB1c2JfZGV2aWNlICpkZXYsIHZvaWQgKnB0cik7Ci0KLXN0cnVjdCB1c2JfZHJpdmVyIHJ0dXNiX2RyaXZlciA9IHsKLQkJbmFtZToicnQyODcwIiwKLQkJcHJvYmU6cnR1c2JfcHJvYmUsCi0JCWRpc2Nvbm5lY3Q6cnR1c2JfZGlzY29ubmVjdCwKLQkJaWRfdGFibGU6cnR1c2JfdXNiX2lkLAotCX07Ci0KLSNlbHNlCi0KLSNpZmRlZiBDT05GSUdfUE0KLXN0YXRpYyBpbnQgcnQyODcwX3N1c3BlbmQoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYsIHBtX21lc3NhZ2VfdCBzdGF0ZSk7Ci1zdGF0aWMgaW50IHJ0Mjg3MF9yZXN1bWUoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYpOwotI2VuZGlmIC8vIENPTkZJR19QTSAvLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vL3Rlc3RlZCBmb3Iga2VybmVsIDIuNnNlcmllcwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGludCBydHVzYl9wcm9iZSAoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYsCi0JCQkJCQljb25zdCBzdHJ1Y3QgdXNiX2RldmljZV9pZCAqaWQpOwotc3RhdGljIHZvaWQgcnR1c2JfZGlzY29ubmVjdChzdHJ1Y3QgdXNiX2ludGVyZmFjZSAqaW50Zik7Ci0KLXN0cnVjdCB1c2JfZHJpdmVyIHJ0dXNiX2RyaXZlciA9IHsKLSNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPCBLRVJORUxfVkVSU0lPTigyLDYsMTUpCi0JLm93bmVyID0gVEhJU19NT0RVTEUsCi0jZW5kaWYKLQkubmFtZT0icnQyODcwIiwKLQkucHJvYmU9cnR1c2JfcHJvYmUsCi0JLmRpc2Nvbm5lY3Q9cnR1c2JfZGlzY29ubmVjdCwKLQkuaWRfdGFibGU9cnR1c2JfdXNiX2lkLAotCi0jaWZkZWYgQ09ORklHX1BNCi0Jc3VzcGVuZDoJcnQyODcwX3N1c3BlbmQsCi0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sa091dE1heFBhY2tldFNpemUpKTsKLQkJCURCR1BSSU5UX1JBVyhSVF9ERUJVR19UUkFDRSwKLQkJCQkoIkVQIGFkZHJlc3MgPSAweCUyeCAgXG4iLCBpZmFjZV9kZXNjLT5lbmRwb2ludFtpXS5kZXNjLmJFbmRwb2ludEFkZHJlc3MpKTsKLQkJfQotCX0KLQotCWlmICghKHBBZC0+QnVsa0luRXBBZGRyICYmIHBBZC0+QnVsa091dEVwQWRkclswXSkpCi0JewotCQlwcmludGsoIiVzOiBDb3VsZCBub3QgZmluZCBib3RoIGJ1bGstaW4gYW5kIGJ1bGstb3V0IGVuZHBvaW50c1xuIiwgX19GVU5DVElPTl9fKTsKLQkJcmV0dXJuIEZBTFNFOwotCX0KLQotCXJldHVybiBUUlVFOwotfQotI2VuZGlmIC8vIExJTlVYX1ZFUlNJT05fQ09ERSAvLwotCi0KLS8qCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLVJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgRGlzYWJsZSBETUEuCi0KLUFyZ3VtZW50czoKLQkqcEFkCQkJCXRoZSByYXh4IGludGVyZmFjZSBkYXRhIHBvaW50ZXIKLQotUmV0dXJuIFZhbHVlOgotCU5vbmUKLQotTm90ZToKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgUlQyOFhYRE1BRGlzYWJsZSgKLQlJTiBSVE1QX0FEQVBURVIgCQkqcEFkKQotewotCS8vIG5vIHVzZQotfQotCi0KLQotLyoKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICBFbmFibGUgRE1BLgotCi1Bcmd1bWVudHM6Ci0JKnBBZAkJCQl0a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W5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAg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W5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAg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ZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgYXAuaAotCi0gICAgQWJzdHJhY3Q6Ci0gICAgTWluaXBvcnQgZ2VuZXJpYyBwb3J0aW9uIGhlYWRlciBmaWxlCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotICAgIC0tLS0tLS0tICAgIC0tLS0tLS0tLS0gICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotICAgIFBhdWwgTGluICAgIDA4LTAxLTIwMDIgICAgY3JlYXRlZAotICAgIEphbWVzIFRhbiAgIDA5LTA2LTIwMDIgICAgbW9kaWZpZWQgKFJldmlzZSBOVENSZWdUYWJsZSkKLSAgICBKb2huIENoYW5nICAxMi0yMi0yMDA0ICAgIG1vZGlmaWVkIGZvciBSVDI1NjEvMjY2MS4gbWVyZ2Ugd2l0aCBTVEEgZHJpdmVyCi0qLwotI2lmbmRlZiBfX0FQX0hfXwotI2RlZmluZSBfX0FQX0hfXwotCi0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PSBBUCBSVE1QLmggPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCi0KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vICAgICAgRnVuY3Rpb24gUHJvdG90eXBlcwotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0vLyBhcF9kYXRhLmMKLQotQk9PTEVBTiBBUEJyaWRnZVRvV2lyZWxlc3NTdGEoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWQsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBwSGVhZGVyLAotICAgIElOICBVSU5UICAgICAgICAgICAgSGRyTGVuLAotICAgIElOICBQVUNIQVIgICAgICAgICAgcERhdGEsCi0gICAgSU4gIFVJTlQgICAgICAgICAgICBEYXRhTGVuLAotICAgIElOICBVTE9ORyAgICAgICAgICAgZnJvbXdkc2lkeCk7Ci0KLUJPT0xFQU4gQVBIYW5kbGVSeERvbmVJbnRlcnJ1cHQoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWQpOwotCi1WT0lECUFQU2VuZFBhY2tldHMoCi0JSU4JTkRJU19IQU5ETEUJCU1pbmlwb3J0QWRhcHRlckNvbnRleHQsCi0JSU4JUFBORElTX1BBQ0tFVAlwcFBhY2tldEFycmF5LAotCUlOCVVJTlQJCQlOdW1iZXJPZlBhY2tldHMpOwotCi1ORElTX1NUQVRVUyBBUFNlbmRQYWNrZXQoCi0gIC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gICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqK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LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCTI4NzBfcnRtcF9pbml0LmMKLQotCUFic3RyYWN0OgotCU1pbmlwb3J0IGdlbmVyaWMgcG9ydGlvbiBoZWFkZXIgZmlsZQotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8gICAgICAgICBXaGVuICAgICAgICAgIFdoYXQKLQktLS0tLS0tLSAgICAtLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlQYXVsIExpbiAgICAyMDAyLTA4LTAxICAgIGNyZWF0ZWQKLSAgICBKb2huIENoYW5nICAyMDA0LTA4LTIwICAgIFJUMjU2MS8yNjYxIHVzZSBzY2F0dGVyLWdhdGhlciBzY2hlbWUKLSAgICBKYW4gTGVlICAJMjAwNi0wOS0xNSAgICBSVDI4NjAuIENoYW5nZSBmb3IgODAyLjExbiAsIEVFUFJPTSwgTGVkLCBCQSwgSFQuCi0JU2FtcGxlIExpbgkyMDA3LTA1LTMxICAgIE1lcmdlIFJUMjg2MCBhbmQgUlQyODcwIGRyaXZlcnMuCi0qLwotCi0jaW5jbHVkZQkiLi4vcnRfY29uZmlnLmgiCi0KLQotc3RhdGljIHZva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91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0JYWN0aW9uLmMKLQotICAgIEFic3RyYWN0OgotICAgIEhhbmRsZSBhc3NvY2lhdGlvbiByZWxhdGVkIHJlcXVlc3RzIGVpdGhlciBmcm9tIFdTVEEgb3IgZnJvbSBsb2NhbCBNTE1FCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotICAgIC0tLS0tLS0tICAgIC0tLS0tLS0tLS0gICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCUphbiBMZWUJCTIwMDYJICAJY3JlYXRlZCBmb3IgcnQyODYwCi0gKi8KLQotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotI2luY2x1ZGUgIi4uL2FjdGlvbi5oIgotCi0KLXN0YXRpYyBWT0lEIFJlc2VydmVkQWN0aW9uKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSk7Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgYXNzb2NpYXRpb24gc3RhdGUgbWFjaGluZSBpbml0LCBpbmNsdWRpbmcgc3RhdGUgdHJhbnNpdGlvbiBhbmQgdGltZXIgaW5pdAotICAgIFBhcmFtZXRlcnM6Ci0gICAgICAgIFMgLSBwb2ludGVyIHRvIHRoZSBhc3NvY2lhdGlvbiBzdGF0ZSBtYWNoaW5lCi0gICAgTm90ZToKLSAgICAgICAgVGhlIHN0YXRlIG1hY2hpbmUgbG9va3MgbGlrZSB0aGUgZm9sbG93aW5nCi0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFTU09DX0lETEUKLSAgICAgICAgTVQyX01MTUVfRElTQVNTT0NfUkVRICAgIG1sbWVfZGlzYXNzb2NfcmVxX2FjdGlvbgotICAgICAgICBNVDJfUEVFUl9ESVNBU1NPQ19SRVEgICAgcGVlcl9kaXNhc3NvY19hY3Rpb24KLSAgICAgICAgTVQyX1BFRVJfQVNTT0NfUkVRICAgICAgIGRyb3AKLSAgICAgICAgTVQyX1BFRVJfUkVBU1NPQ19SRVEgICAgIGRyb3AKLSAgICAgICAgTVQyX0NMUzNFUlIgICAgICAgICAgICAgIGNsczNlcnJfYWN0aW9uCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBY3Rpb25TdGF0ZU1hY2hpbmVJbml0KAotICAgIElOCVBSVE1QX0FEQVBURVIJcEFkLAotICAgIElOICBTVEFURV9NQUNISU5FICpTLAotICAgIE9VVCBTVEFURV9NQUNISU5FX0ZVTkMgVHJhbnNbXSkKLXsKLQlTdGF0ZU1hY2hpbmVJbml0KFMsIChTVEFURV9NQUNISU5FX0ZVTkMgKilUcmFucywgTUFYX0FDVF9TVEFURSwgTUFYX0FDVF9NU0csIChTVEFURV9NQUNISU5FX0ZVTkMpRHJvcCwgQUNUX0lETEUsIEFDVF9NQUNISU5F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cHlyaWdodCAyMDAyLTIwMDcsIFJhbGluayBUZWNobm9sb2d5LCBJbmMuCi0gKgotICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICoKLSAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2Y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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSovCi0KLS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DRVNTOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTmV3IERlUXVldWUgUHJvY2VkdXJlcy4KLQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIERFUVVFVUVfTE9DSyhsb2NrLCBiSW50Q29udGV4dCwgSXJxRmxhZ3MpIAkJCQlcCi0JCQlkb3sJCQkJCQkJCQkJCQkJXAotCQkJCWlmIChiSW50Q29udGV4dCA9PSBGQUxTRSkJCQkJCQlcCi0JCQkJUlRNUF9JUlFfTE9DSygobG9jayksIElycUZsYWdzKTsJCVwKLQkJCX13aGlsZSgwKQotCi0jZGVmaW5lIERFUVVFVUVfVU5MT0NLKGxvY2ssIGJJbnRDb250ZXh0LCBJcnFGbGFncykJCQkJXAotCQkJZG97CQkJCQkJCQkJCQkJCVwKLQkJCQlpZiAoYkludENvbnRleHQgPT0gRkFMU0UpCQkJCQkJXAotCQkJCQlSVE1QX0lSUV9VTkxPQ0soKGxvY2spLCBJcnFGbGFncyk7CVwKLQkJCX13aGlsZSgwKQotCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JVHggUGF0aCBkZXNpZ24gYWxnb3JpdGhtOgotCQlCYXNpY2FsbHksIHdlIGRpdmlkZSB0aGUgcGFja2V0cyBpbnRvIGZvdXIgdHlwZXMsIEJyb2FkY2FzdC9NdWx0aWNhc3QsIDExTiBSYXRlKEFNUERVLCBBTVNEVSwgTm9ybWFsKSwgQi9HIFJhdGUoQVJBTElOSywgTm9ybWFsKSwKLQkJU3BlY2lmaWMgUGFja2V0IFR5cGUuIEZvbGxvd2luZyBzaG93IHRoZSBjbGFzc2lmaWNhdG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ci0JCVJUMjhYWF9VUERBVEVfUFJPVEVDVChwQWQpOyAgLy8gZWRpdCBieSBqb2hubGksIGZpeCAiaW5faW50ZXJydXB0IiBlcnJvciB3aGVuIGNhbGwgIk1hY1RhYmxlRGVsZXRlRW50cnkiIGluIFJ4IHRhc2tsZXQKLQl9Ci0KLQlyZXR1cm4gVFJVRTsKLX0KLQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVRoaXMgcm91dGluZSByZXNldCB0aGUgZW50aXJlIE1BQyB0YWJsZS4gQWxsIHBhY2tldHMgcGVuZGluZyBpbgotCQl0aGUgcG93ZXItc2F2aW5nIHF1ZXVlcyBhcmUgZnJlZWQgaGVyZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIE1hY1RhYmxlUmVzZXQoCi0JSU4gIFBSVE1QX0FEQVBURVIgIHBBZCkKLXsKLQlpbnQgICAgICAgICBpOwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiTWFjVGFibGVSZXNldFxuIikpOwotCS8vTmRpc0FjcXVpcmVTcGluTG9jaygmcEFkLT5NYWNUYWJMb2NrKTsKLQotCWZvciAoaT0xOyBpPE1BWF9MRU5fT0ZfTUFDX1RBQkxFOyBpKyspCi0JewotCQlpZiAocEFkLT5NYWNUYWIuQ29udGVudFtpXS5WYWxpZEFzQ0xJID09IFRSVUUpCi0JICAgewotCi0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCi0JCQkvLyBmcmVlIHJlc291cmNlcyBvZiBCQQotCQkJQkFTZXNzaW9uVGVhckRvd25BTEwocEFkLCBpKTsKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLQotCQkJcEFkLT5NYWNUYWIuQ29udGVudFtpXS5WYWxpZEFzQ0xJID0gRkFMU0U7Ci0KLQotCi0jaWZkZWYgUlQyODcwCi0JCQlOZGlzWmVyb01lbW9yeShwQWQtPk1hY1RhYi5Db250ZW50W2ldLkFkZHIsIDYpOwotCQkJUlQyOFhYX1NUQV9FTlRSWV9NQUNfUkVTRVQocEFkLCBpKTsKLSNlbmRpZiAvLyBSVDI4NzAgLy8KLQotCQkJLy9Bc2ljRGVsV2NpZFRhYihwQWQsIGkpOwotCQl9Ci0JfQotCi0JcmV0dXJuOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBBc3NvY1Bhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX0FTU09DX1JFUV9TVFJVQ1QgKkFzc29jUmVxLAotCUlOIFBVQ0hBUiAgICAgICAgICAgICAgICAgICAgIHBBZGRyLAotCUlOIFVTSE9SVCAgICAgICAgICAgICAgICAgICAgIENhcGFiaWxpdHlJbmZvLAotCUlOIFVMT05HICAgICAgICAgICAgICAgICAgICAgIFRpbWVvdXQsCi0JSU4gVVNIT1JUICAgICAgICAgICAgICAgICAgICAgTGlzdGVuSW50dikKLXsKLQlDT1BZX01BQ19BRERSKEFzc29jUmVxLT5BZGRyLCBwQWRkcik7Ci0JLy8gQWRkIG1hc2sgdG8gc3VwcG9ydCA4MDIuMTFiIG1vZGUgb25seQotCUFzc29jUmVxLT5DYXBhYmlsaXR5SW5mbyA9IENhcGFiaWxpdHlJbmZvICYgU1VQUE9SVEVEX0NBUEFCSUxJVFlfSU5GTzsgLy8gbm90IGNmL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ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qLwotLyoKLSAgIEFsbCBmdW5jdGlvbnMgaW4gdGhpcyBmaWxlIG11c3QgYmUgVVN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AgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSovCi0KLSNpbmNsdWRlCSIuLi9ydF9jb25maWcuaCIKLQotSU5UCVNob3dfU1NJRF9Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCU9VVAlQVUNIQVIJCQlwQnVmKTsKLQotSU5UCVNob3dfV2lyZWxlc3NNb2RlX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JT1VUCVBVQ0hBUgkJCXBCdWYpOwotCi1JTlQJU2hvd19UeEJ1cnN0X1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JT1VUCVBVQ0hBUgkJCXBCdWYpOwotCi1JTlQJU2hvd19UeFByZWFtYmxlX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JT1VUCVBVQ0hBUgkJCXBCdWYpOwotCi1JTlQJU2hvd19UeFBvd2VyX1Byb2MoCi0JSU4JUFJUTVBfQUR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JvY30sCi0JeyJLZXkxIiwJCQkJCVNob3dfS2V5MV9Qcm9jfSwKLQl7IktleTIiLAkJCQkJU2hvd19LZXkyX1Byb2N9LAotCXsiS2V5MyIsCQkJCQlTaG93X0tleTNfUHJvY30sCi0JeyJLZXk0IiwJCQkJCVNob3dfS2V5NF9Qcm9jfSwKLQl7IldQQVBTSyIsCQkJCQlTaG93X1dQQVBTS19Qcm9jfSwKLQl7TlVMTCwgTlVMTH0KLX07Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgR2V0IERyaXZlciB2ZXJzaW9uLgotCi0gICAgUmV0dXJuOgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9Ecml2ZXJWZXJzaW9uX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0JSUZfREVWX0NPTkZJR19PUE1PREVfT05fU1RBKHBBZCkKLQkJREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiRHJpdmVyIHZlcnNpb24tJXNcbiIsIFNUQV9EUklWRVJfVkVSU0lPTikpOwotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IENvdW50cnkgUmVnaW9uLgotICAgICAgICBUaGlzIGNvbW1hbmQgd2lsbCBub3Qgd29yaywgaW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0gMCkKLQkJcEFkLT5Db21tb25DZmcuYlVzZVNob3J0U2xvdFRpbWUgPSBGQUxTRTsKLQllbHNlCi0JCXJldHVybiBGQUxTRTsgIC8vSW52YWxpZCBhcmd1bWVudAotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X1Nob3J0U2xvdF9Qcm9jOjooU2hvcnRTbG90PSVkKVxuIiwgcEFkLT5Db21tb25DZmcuYlVzZVNob3J0U2xvdFRpbWUpKTsKLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBUeCBwb3dlcgotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9UeFBvd2VyX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCVVMT05HIFR4UG93ZXI7Ci0JSU5UICAgc3VjY2VzcyA9IEZBTFNFOwotCi0JVHhQb3dlciA9IChVTE9ORykgc2ltcGxlX3N0cnRvbChhcmcsIDAsIDEwKTsKLQlpZiAoVHhQb3dlciA8PSAxMDApCi0JewotCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0JCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JCXsKLQkJCXBBZC0+Q29tbW9uQ2ZnLlR4UG93ZXJEZWZhdWx0ID0gVHhQb3dlcjsKLQkJCXBBZC0+Q29tbW9uQ2ZnLlR4UG93ZXJQZXJjZW50YWdlID0gcEFkLT5Db21tb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VUdfVFJBQ0UsICgiPD09IFNldF9EZWJ1Z19Qcm9jKFJURGVidWdMZXZlbCA9ICVsZClcbiIsIFJURGVidWdMZXZlbCkpOwotCi0JcmV0dXJuIFRSVUU7Ci19Ci0jZW5kaWYKLQotSU5UCVNob3dfRGVzY0luZm9fUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0KLQlyZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBSZXNldCBzdGF0aXN0aWNzIGNvdW50ZXIKLQotICAgIEFyZ3VtZW50czoKLSAgICAgICAgcEFkYXB0ZXIgICAgICAgICAgICBQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgICAgIGFyZwotCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X1Jlc2V0U3RhdENvdW50ZXJfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JLy9VQ0hBUiAgICAgICAgICAgaTsKLQkvL01BQ19UQUJMRV9FTlRSWSAqcEVudHJ5OwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiPT0+U2V0X1Jlc2V0U3RhdENvdW50ZXJfUHJvY1xuIikpOwotCi0JLy8gYWRkIHRoZSBtb3N0IHVwLXRvLWRhdGUgaC93IHJhdyBjb3VudGVycyBpbnRvIHNvZnR3YXJlIGNvdW50ZXJzCi0JTklDVXBkYXRl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9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi1WT0lEICAgIFJUTVBTZXREZXNpcmVkUmF0ZXMoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgTE9ORyAgICAgICAgICAgIFJhdGVzKQotewotICAgIE5ESVNfODAyXzExX1JBVEVTIGFyeVJhdGVzOwotCi0gICAgbWVtc2V0KCZhcnlSYXRlcywgMHgwMCwgc2l6ZW9mKE5ESVNfODAyXzExX1JBVEVTKSk7Ci0gICAgc3dpdGNoIChwQWRhcHRlci0+Q29tbW9uQ2ZnLlBoeU1vZGUpCi0gICAgewotICAgICAgICBjYXNlIFBIWV8xMUE6IC8vIEEgb25seQotICAgICAgICAgICAgc3dpdGNoIChSYXRlcykKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBjYXNlIDYwMDAwMDA6IC8vNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBjOyAvLyA2TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgOTAwMDAwMDogLy85TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTI7IC8vIDlNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMjAwMDAwMDogLy8xMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18yOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDE4MDAwMDAwOiAvLzE4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MjQ7IC8vIDE4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzM7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjQwMDAwMDA6IC8vMjRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHgzMDsgLy8gMjRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAzNjAwMDAwMDogLy8zNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDQ4OyAvLyAzNk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU181OwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDQ4MDAwMDAwOiAvLzQ4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4NjA7IC8vIDQ4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzY7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgNTQwMDAwMDA6IC8vNTRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHg2YzsgLy8gNTRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAtMTogLy9BdXRvCi0gICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDZjOyAvLyA1NE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMV0gPSAweDYwOyAvLyA0OE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMl0gPSAweDQ4OyAvLyAzNk1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbM10gPSAweDMwOyAvLyAyNE1icHMKLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNF0gPSAweDI0OyAvLyAxOE0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNV0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbNl0gPSAweDEyOyAvLyA5TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1s3XSA9IDB4MGM7IC8vIDZNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfQVVUTzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBQSFlfMTFCR19NSVhFRDogLy8gQi9HIE1peGVkCi0gICAgICAgIGNhc2UgUEhZXzExQjogLy8gQiBvbmx5Ci0gICAgICAgIGNhc2UgUEhZXzExQUJHX01JWEVEOiAvLyBBL0IvRyBNaXhlZAotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgc3dpdGNoIChSYXRlcykKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBjYXNlIDEwMDAwMDA6IC8vMU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDAyOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjAwMDAwMDogLy8yTQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MDQ7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSA1MDAwMDAwOiAvLzUuNU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBiOyAvLyA1LjVNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMTAwMDAwMDogLy8xMU0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE2OyAvLyAxMU0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18zOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDYwMDAwMDA6IC8vNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDBjOyAvLyA2TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzA7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgOTAwMDAwMDogLy85TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTI7IC8vIDlNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfMTsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAxMjAwMDAwMDogLy8xMk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDE4OyAvLyAxMk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU18yOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDE4MDAwMDAwOiAvLzE4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MjQ7IC8vIDE4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzM7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgMjQwMDAwMDA6IC8vMjRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHgzMDsgLy8gMjRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAzNjAwMDAwMDogLy8zNk0KLSAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDQ4OyAvLyAzNk0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5EZXNpcmVkVHJhbnNtaXRTZXR0aW5nLmZpZWxkLk1DUyA9IE1DU181OwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBjYXNlIDQ4MDAwMDAwOiAvLzQ4TQotICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4NjA7IC8vIDQ4TQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuTUNTID0gTUNTXzY7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgNTQwMDAwMDA6IC8vNTRNCi0gICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzBdID0gMHg2YzsgLy8gNTRNCi0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVzaXJlZFRyYW5zbWl0U2V0dGluZy5maWVsZC5NQ1MgPSBNQ1NfNzsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSAtMTogLy9BdXRvCi0gICAgICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZSA9PSBQSFlfMTFCKQotICAgICAgICAgICAgICAgICAgICB7IC8vQiBPbmx5Ci0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1swXSA9IDB4MTY7IC8vIDExTWJwcwotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMV0gPSAweDBiOyAvLyA1LjVNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1syXSA9IDB4MDQ7IC8vIDJNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1szXSA9IDB4MDI7IC8vIDFNYnBzCi0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICB7IC8vKEIvRykgTWl4ZWQgb3IgKEEvQi9HKSBNaXhlZAotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbMF0gPSAweDZjOyAvLyA1NE1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzFdID0gMHg2MDsgLy8gNDhNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1syXSA9IDB4NDg7IC8vIDM2TWJwcwotICAgICAgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXNbM10gPSAweDMwOyAvLyAyNE1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzRdID0gMHgxNjsgLy8gMTFNYnBzCi0gICAgICAgICAgICAgICAgICAgICAgICBhcnlSYXRlc1s1XSA9IDB4MGI7IC8vIDUuNU1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzZdID0gMHgwNDsgLy8gMk1icHMKLSAgICAgICAgICAgICAgICAgICAgICAgIGFyeVJhdGVzWzddID0gMHgwMjsgLy8gMU1icHMKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBwQWRhcHRl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vIG9ubHkgbmVlZCB0byB1cGRhdGUgdGhlIHBvc2l0aW9uKG9mZnNldCszKS4KLSNpZmRlZiBSVDI4NzAKLQlSVFVTQk11bHRpV3JpdGVfT25lQnl0ZShwQWQsIG9mZnNldCszLCAmSVZFSVYpOwotI2VuZGlmIC8vIFJUMjg3MCAvLwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsKCJSVE1QQWRkV2NpZEF0dHJpYnV0ZUVudHJ5OiBXQ0lEICMlZCwgS2V5SW5kZXggIyVkLCBBbGc9JXNcbiIsV2NpZCwgS2V5SWR4LCBDaXBoZXJOYW1lW0NpcGhlckFsZ10pKTsKLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwoIglXQ0lEQXR0cmkgPSAweCV4IFxuIiwgIFdDSURBdHRyaSkpOwotCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgUGFyc2UgZW5jcnlwdGlvbiB0eXBlCi1Bcmd1bWVudHM6Ci0gICAgcEFkYXB0ZXIgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLSAgICB3cnEgICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgaW9jdGwgYXJndW1lbnQKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgTm9uZQotCi0gICAgTm90ZToKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUNIQVIgKkdldEVuY3J5cHRUeXBlKENIQVIgZW5jKQotewotICAgIGlmKGVuYyA9PSBOZGlzODAyXzExV0VQRGlzYWJsZWQpCi0gICAgICAgIHJldHVybiAiTk9ORSI7Ci0gICAgaWYoZW5jID09IE5kaXM4MDJfM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SBOZGlzODAyXzExQXV0aE1vZGVXUEExV1BBMikKLSAgICAJcmV0dXJuICJXUEExV1BBMiI7Ci0JaWYoYXV0aCA9PSBOZGlzODAyXzExQXV0aE1vZGVXUEExUFNLV1BBMlBTSykKLSAgICAJcmV0dXJuICJXUEExUFNLV1BBMlBTSyI7Ci0KLSAgICAJcmV0dXJuICJVTktOT1ciOwotfQotCi0jaWYgMSAvLyNpZm5kZWYgVUNPUwotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBHZXQgc2l0ZSBzdXJ2ZXkgcmVzdWx0cwotCUFyZ3VtZW50czoKLQkgICAgcEFkYXB0ZXIgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQkgICAgd3JxICAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gdGhlIGlvY3RsIGFyZ3VtZW50Ci0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIE5vbmUKLQotICAgIE5vdGU6Ci0gICAgICAgIFVzYWdlOgotICAgICAgICAJCTEuKSBVSSBuZWVkcyB0byB3YWl0IDQgc2Vjb25kcyBhZnRlciBpc3N1ZSBhIHNpdGUgc3VydmV5IGNvbW1hbmQKLSAgICAgICAgCQkyLikgaXdwcml2IHJhMCBnZXRfc2l0ZV9zdXJ2ZXkKLSAgICAgICAgCQkzLikgVUkgbmVlZHMgdG8gcHJlcGFyZSBhdCBsZWFzdCA0MDk2Ynl0ZXMgdG8gZ2V0IHRoZSByZXN1bHRzCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0jZGVmaW5lCUxJTkVfTEVOCSg0KzMzKzIwKzgrMTArOSs3KzMpCS8vIENoYW5uZWwrU1NJ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mVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCXNhbml0eS5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JSm9obiBDaGFuZyAgMjAwNC0wOS0wMSAgICAgIGFkZCBXTU0gc3VwcG9ydAotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotCi1leHRlcm4gVUNIQVIJQ0lTQ09fT1VJW107Ci0KLWV4dGVybiBVQ0hBUglXUEFfT1VJW107Ci1leHRlcm4gVUNIQVIJUlNOX09VSVtdOwotZXh0ZXJuIFVDSEFSCVdNRV9JTkZPX0VMRU1bXTsKLWV4dGVybiBVQ0hBUglXTUVfUEFSTV9FTEVNW107Ci1leHRlcm4gVUNIQVIJQ2N4MlFvc0luZm9bXTsKLWV4dGVybiBVQ0hBUglSQUxJTktfT1VJW107Ci1leHRlcm4gVUNIQVIJQlJPQURDT01fT1VJW107Ci1leHRlcm4gVUNIQVIgICAgV1BTX09VSVtdOwotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUg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RU9SREVSQlVGKSB8fCAocEluZm8tPkJhQnVmU2l6ZSA8IDIpKQotICAgIHsKLSAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiTWxtZUFkZEJBUmVxU2FuaXR5IGZhaWwgLSBSeCBSZW9yZGVyaW5nIGJ1ZmZlciB0b28gYmlnIG9yIHRvbyBzbWFsbFxuIikpOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotCSovCi0KLSAgICBpZiAoKHBJbmZvLT5wQWRkclswXSYweDAxKSA9PSAweDAxKQotICAgIHsKLSAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiTWxtZUFkZEJBUmVxU2FuaXR5IGZhaWwgLSBicm9hZGNhc3QgYWRkcmVzcyBub3Qgc3VwcG9ydCBCQVxuIikpOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIE1sbWVEZWxCQVJlcVNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuKQotewotCU1MTUVfREVMQkFfUkVRX1NUUlVDVCAqcEluZm87Ci0JcEluZm8gPS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c2Vjb25kIG9uZQotICAgICAgICAgICAgICAgIGlmIChTYW5pdHkgJiAweDEpCi0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGlmKHBFaWQtPkxlbiA8PSBNQVhfTEVOX09GX1NTSUQpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShTc2lkLCBwRWlkLT5PY3RldCwgcEVpZC0+TGVuKTsKLSAgICAgICAgICAgICAgICAgICAgKnBTc2lkTGVuID0gcEVpZC0+TGVuOwotICAgICAgICAgICAgICAgICAgICBTYW5pdHkgfD0gMHgxOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQmVhY29uQW5kUHJvYmVSc3BTYW5pdHkgLSB3cm9uZyBJRV9TU0lEIChsZW49JWQpXG4iLHBFaWQtPkxlbikpOwotICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX1NVUFBfUkFURVM6Ci0gICAgICAgICAgICAgICAgaWYocEVpZC0+TGVuIDw9IE1BWF9MRU5fT0ZfU1VQUE9SVEVEX1JBVEVTKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgU2FuaXR5IHw9IDB4MjsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoU3VwUmF0ZSwgcEVpZC0+T2N0ZXQsIHBFaWQtPkxlbik7Ci0gICAgICAgICAgICAgICAgICAgICpwU3VwUmF0ZUxlbiA9IHBFaWQtPkxlbjsKLQotICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiAyMDA0LTA5LTE0IG5vdCBhIGdvb2QgZGVzaWduIGhlcm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NlIElFX1NFQ09OREFSWV9DSF9PRkZTRVQ6Ci0JCQlpZiAocEVpZC0+TGVuID09IDEpCi0JCQl7Ci0JCQkJKk5ld0V4dENoYW5uZWxPZmZzZXQgPSBwRWlkLT5PY3RldFswXTsKLQkJCX0KLQkJCWVsc2UKLQkJCXsKLQkJCQlEQkdQUklOVChSVF9ERUJVR19XQVJOLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eSAtIHdyb25nIElFX1NFQ09OREFSWV9DSF9PRkZTRVQuIFxuIikpOwotCQkJfQotCi0JCWJyZWFrOwotICAgICAgICAgICAgY2FzZSBJRV9GSF9QQVJNOgotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlBlZXJCZWFjb25BbmRQcm9iZVJzcFNhbml0eShJRV9GSF9QQVJNKSBcbiIpKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9EU19QQVJNOgotICAgICAgICAgICAgICAgIGlmKHBFaWQtPkxlbiA9PSAxKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgKnBDaGFubmVsID0gKnBFaWQtPk9jdGV0OwotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCQkJCQlJRl9ERVZfQ09ORklHX09QTU9ERV9PTl9TVEEocEFkKQotCQkJCQl7Ci0JCQkJCQlpZiAoQ2hhbm5lbFNhbml0eShwQWQsICpwQ2hhbm5lbCkgPT0gMCkKLQkJCQkJCXsKLQotCQkJCQkJCXJldHVybiBGQUxTRTsKLQkJCQkJCX0KLQkJCQkJfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotICAgICAgICAgICAgICAgICAgICBTYW5pdHkgfD0gMHg0OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQmVhY29uQW5kUHJvYmVSc3BTYW5pdHkgLSB3cm9uZyBJRV9EU19QQVJNIChsZW49JWQpXG4iLHBFaWQtPkxlbikpOwotICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX0NGX1BBUk06Ci0gICAgICAgICAgICAgICAgaWYocEVpZC0+TGVuID09IDYpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQ2ZQYXJtLT5iVmFsaWQgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICBwQ2ZQYXJtLT5DZnBDb3VudCA9IHBFaWQtPk9jdGV0WzBdOwotICAgICAgICAgICAgICAgICAgICBwQ2ZQYXJtLT5DZnBQZXJpb2QgPSBwRWlkLT5PY3RldFsxXTsKLSAgICAgICAgICAgICAgICAgICAgcENmUGFybS0+Q2ZwTWF4RHVyYXRpb24gPSBwRWlkLT5PY3RldFsyXSArIDI1NiAqIHBFaWQtPk9jdGV0WzNdOwotICAgICAgICAgICAgICAgICAgICBwQ2ZQYXJtLT5DZnBEdXJSZW1haW5pbmcgPSBwRWlkLT5PY3RldFs0XSArIDI1NiAqIHBFaWQtPk9jdGV0WzVdOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQmVhY29uQW5kUHJvYmVSc3BTYW5pdHkgLSB3cm9uZyBJRV9DRl9QQVJNXG4iKSk7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgSUVfSUJTU19QQVJNOgotICAgICAgICAgICAgICAgIGlmKHBFaWQtPkxlbiA9PSAyKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEF0aW1XaW4sIHBFaWQtPk9jdGV0LCBwRWlkLT5MZW4pOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQmVhY29uQW5kUHJvYmVSc3BTYW5pdHkgLSB3cm9uZyBJRV9JQlNTX1BBUk1cbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBicmVhazsKLQotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotICAgICAgICAgICAgY2FzZSBJRV9USU06Ci0gICAgICAgICAgICAgICAgaWYoSU5GUkFfT04ocEFkKSAmJiBTdWJUeXBlID09IFNVQlRZUEVfQkVBQ09OKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgR2V0VGltQml0KChQVUNIQVIpcEVpZCwgcEFkLT5TdGFBY3RpdmUuQWlkLCAmVGltTGVuLCBwQmNhc3RGbGFnLCBwRHRpbUNvdW50LCBwRHRpbVBlcmlvZCwgcE1lc3NhZ2VUb01lKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0gICAgICAgICAgICBjYXNlIElFX0NIQU5ORUxfU1dJVENIX0FOTk9VTkNFTUVOVDoKLSAgICAgICAgICAgICAgICBpZihwRWlkLT5MZW4gPT0gMykKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgCSpwTmV3Q2hhbm5lbCA9IHBFaWQtPk9jdGV0WzFdOwkvL2V4dHJhY3QgbmV3IGNoYW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SHRDYXBhYmlsaXR5TGVuID0gU0laRV9IVF9DQVBfSUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICBpZiAoKHBFaWQtPk9jdGV0WzNdID09IE9VSV9QUkVOX0FERF9IVCkgJiYgKHBFaWQtPkxlbiA+PSAyNikpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KEFkZEh0SW5mbywgJnBFaWQtPk9jdGV0WzRdLCBzaXplb2YoQUREX0hUX0lORk9fSUUpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICpBZGRIdEluZm9MZW4gPSBTSVpFX0FERF9IVF9JTkZPX0lFOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotI2VuZGlmIC8vIERPVDExX05fU1VQUE9SVCAvLwotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgV1BBX09VSSwgNCkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAvLyBDb3B5IHRvIHBWSUUgd2hpY2ggd2lsbCByZXBvcnQgdG8gbWljcm9zb2Z0IGJzc2lkIGxpc3QuCi0gICAgICAgICAgICAgICAgICAgIFB0ciA9IChQVUNIQVIpIHBWSUU7Ci0gICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KFB0ciArICpMZW5ndGhWSUUsICZwRWlkLT5FaWQsIHBFaWQtPkxlbiArIDIpOwotICAgICAgICAgICAgICAgICAgICAqTGVuZ3RoVklFICs9IChwRWlkLT5MZW4gKyAyKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBXTUVfUEFSTV9FTEVNLCA2KSAmJiAocEVpZC0+TGVuID09IDI0KSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFBVQ0hBUiBwdHI7Ci0gICAgICAgICAgICAgICAgICAgIGludCBpOwotCi0gICAgICAgICAgICAgICAgICAgIC8vIHBhcnNpbmcgRURDQSBwYXJhbWV0ZXJzCi0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlZhbGlkICAgICAgICAgID0gVFJVRTsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iUUFjayAgICAgICAgICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDEwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJRdWV1ZVJlcXVlc3QgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4MjA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlR4b3BSZXF1ZXN0ICAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHg0MDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5FZGNhVXBkYXRlQ291bnQgPSBwRWlkLT5PY3RldFs2XSAmIDB4MGY7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YkFQU0RDYXBhYmxlICAgID0gKHBFaWQtPk9jdGV0WzZdICYgMHg4MCkgPyAxIDogMDsKLSAgICAgICAgICAgICAgICAgICAgcHRyID0gJnBFaWQtPk9jdGV0WzhdOwotICAgICAgICAgICAgICAgICAgICBmb3IgKGk9MDsgaTw0OyBpKyspCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIFVDSEFSIGFjaSA9ICgqcHRyICYgMHg2MCkgPj4gNTsgLy8gYjV+NiBpcyBBQyBJTkRFWAotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQUNNW2FjaV0gID0gKCgoKnB0cikgJiAweDEwKSA9PSAweDEwKTsgICAvLyBiNSBpcyBBQ00KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+QWlmc25bYWNpXSA9ICgqcHRyKSAmIDB4MGY7ICAgICAgICAgICAgICAgLy8gYjB+MyBpcyBBSUZTTgotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21pblthY2ldID0gKihwdHIrMSkgJiAweDBmOyAgICAgICAgICAgICAvLyBiMH40IGlzIEN3bWluCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWF4W2FjaV0gPSAqKHB0cisxKSA+PiA0OyAgICAgICAgICAgICAgIC8vIGI1fjggaXMgQ3dtYXgKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+VHhvcFthY2ldICA9ICoocHRyKzIpICsgMjU2ICogKCoocHRyKzMpKTsgLy8gaW4gdW5pdCBvZiAzMi11cwotICAgICAgICAgICAgICAgICAgICAgICAgcHRyICs9IDQ7IC8vIHBvaW50IHRvIG5leHQgQUMKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIGlmIChOZGlzRXF1YWxNZW1vcnkocEVpZC0+T2N0ZXQsIFdNRV9JTkZPX0VMRU0sIDYpICYmIChwRWlkLT5MZW4gPT0gNykpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAvLyBwYXJzaW5nIEVEQ0EgcGFyYW1ldGVycwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJWYWxpZCAgICAgICAgICA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlFBY2sgICAgICAgICAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHgxMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iUXVldWVSZXF1ZXN0ICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDIwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJUeG9wUmVxdWVzdCAgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4NDA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+RWRjYVVwZGF0ZUNvdW50ID0gcEVpZC0+T2N0ZXRbNl0gJiAweDBmOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBUFNEQ2FwYWJsZSAgICA9IChwRWlkLT5PY3RldFs2XSAmIDB4ODApID8gMSA6IDA7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gdXNlIGRlZmF1bHQgRURDQSBwYXJhbWV0ZXIKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQUNNW1FJRF9BQ19CRV0gID0gMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5BaWZzbltRSURfQUNfQkVdID0gMzsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21pbltRSURfQUNfQkVdID0gQ1dfTUlOX0lOX0JJVFM7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtYXhbUUlEX0FDX0JFXSA9IENXX01BWF9JTl9CSVRTOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPlR4b3BbUUlEX0FDX0JFXSAgPSAwOwotCi0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YkFDTVtRSURfQUNfQktdICA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+QWlmc25bUUlEX0FDX0JLXSA9IDc7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+Q3dtaW5bUUlEX0FDX0JLXSA9IENXX01JTl9JTl9CSVRTOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWF4W1FJRF9BQ19CS10gPSBDV19NQVhfSU5fQklUUzsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5UeG9wW1FJRF9BQ19CS10gID0gMDsKLQotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJBQ01bUUlEX0FDX1ZJXSAgPSAwOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkFpZnNuW1FJRF9BQ19WSV0gPSAyOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWluW1FJRF9BQ19WSV0gPSBDV19NSU5fSU5fQklUUy0xOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWF4W1FJRF9BQ19WSV0gPSBDV19NQVhfSU5fQklUUzsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5UeG9wW1FJRF9BQ19WSV0gID0gOTY7ICAgLy8gQUNfVkk6IDk2KjMydXMgfj0gM21zCi0KLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQUNNW1FJRF9BQ19WT10gID0gMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5BaWZzbltRSURfQUNfVk9dID0gMjsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21pbltRSURfQUNfVk9dID0gQ1dfTUlOX0lOX0JJVFMtMjsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21heFtRSURfQUNfVk9dID0gQ1dfTUFYX0lOX0JJVFMtMTsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5UeG9wW1FJRF9BQ19WT10gID0gNDg7ICAgLy8gQUNfVk86IDQ4KjMydXMgfj0gMS41bXMKLSAgICAgICAgICAgICAgICB9Ci0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0jZW5kaWYgLy8gQ09ORklHX1NUQV9TVVBQT1JUIC8vCi0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9FWFRfU1VQUF9SQVRFUzoKLSAgICAgICAgICAgICAgICBpZiAocEVpZC0+TGVuIDw9IE1BWF9MRU5fT0ZfU1VQUE9SVEVEX1JBVEVTKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoRXh0UmF0ZSwgcEVpZC0+T2N0ZXQsIHBFaWQtPkxlbik7Ci0gICAgICAgICAgICAgICAgICAgICpwRXh0UmF0ZUxlbiA9IHBFaWQtPkxlbjsKLQotICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiAyMDA0LTA5LTE0IG5vdCBhIGdvb2QgZGVzaWduIGhlcmUsIGNhdXNlIGl0IGV4Y2x1ZGUgZXh0cmEgcmF0ZXMKLSAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSBTY2FuVGFiLiBXZSBzaG91bGQgcmVwb3J0IGFzIGlzLiBBbmQgZmlsdGVyIG91dCB1bnN1cHBvcnRlZAotICAgICAgICAgICAgICAgICAgICAvLyByYXRlcyBpbiBNbG1lQXV4LgotICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBhZ2FpbnN0IHRoZSBzdXBwb3J0ZWQgcmF0ZXMKLSAgICAgICAgICAgICAgICAgICAgLy8gUlRNUENoZWNrUmF0ZXMocEFkLCBFeHRSYXRlLCBwRXh0UmF0ZUxlbik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX0VSUDoKLSAgICAgICAgICAgICAgICBpZiAocEVpZC0+TGVuID09IDEpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAqcEVycCA9IChVQ0hBUilwRWlkLT5PY3RldFswXTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgSUVfQUlST05FVF9DS0lQOgotICAgICAgICAgICAgICAgIC8vIDAuIENoZWNrIEFpcm9uZXQgSUUgbGVuZ3RoLCBpdCBtdXN0IGJlIGxhcmdlciBvciBlcXVhbCB0byAyOAotICAgICAgICAgICAgICAgIC8vIENpc2NvIEFQMzUwIHVzZWQgbGVuZ3RoIGFzIDI4Ci0gICAgICAgICAgICAgICAgLy8gQ2lzY28gQVAxMlhYIHVzZWQgbGVuZ3RoIGFzIDMwCi0gICAgICAgICAgICAgICAgaWYgKHBFaWQtPkxlbiA8IChDS0lQX05FR09USUFUSU9OX0xFTkdUSCAtIDIpKQotICAgICAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgICAgIC8vIDEuIENvcHkgQ0tJUCBmbGFnIGJ5dGUgdG8gYnVmZmVyIGZvciBwcm9jZXNzCi0gICAgICAgICAgICAgICAgKnBDa2lwRmxhZyA9ICoocEVpZC0+T2N0ZXQgKyA4KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBJRV9BUF9UWF9QT1dFUjoKLSAgICAgICAgICAgICAgICAvLyBBUCBDb250cm9sIG9mIENsaWVudCBUcmFuc21pdCBQb3dlcgotICAgICAgICAgICAgICAgIC8vMC4gQ2hlY2sgQWlyb25ldCBJRSBsZW5ndGgsIGl0IG11c3QgYmUgNgotICAgICAgICAgICAgICAgIGlmIChwRWlkLT5MZW4gIT0gMHgwNikKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgICAgICAvLyBHZXQgY2VsbCBwb3dlciBsaW1pdCBpbiBkQm0KLSAgICAgICAgICAgICAgICBpZiAoTmRpc0VxdWFsTWVtb3J5KHBFaWQtPk9jdGV0LCBDSVNDT19PVUksIDMpID09IDEpCi0gICAgICAgICAgICAgICAgICAgICpwQWlyb25ldENlbGxQb3dlckxpbWl0ID0gKihwRWlkLT5PY3RldCArIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gUGVlckRlYXV0aFNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFkZHIyLAotICAgIE9VVCBVU0hPUlQgKnBSZWFzb24pCi17Ci0gICAgUEZSQU1FXzgwMl8xMSBwRnJhbWUgPSAoUEZSQU1FXzgwMl8xMSlNc2c7Ci0KLSAgICBDT1BZX01BQ19BRERSKHBBZGRyMiwgcEZyYW1lLT5IZHIuQWRkcjIpOwotICAgIE5kaXNNb3ZlTWVtb3J5KHBSZWFzb24sICZwRnJhbWUtPk9jdGV0WzBdLCAyKTsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBQZWVyQXV0aFNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFkZHIsCi0gICAgT1VUIFVTSE9SVCAqcEFsZywKLSAgICBPVVQgVVNIT1JUICpwU2VxLAotICAg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sc2UgaWYgKCpwU2VxID09IDIgfHwgKnBTZXEgPT0gMykKLSAgICAgICAgewotICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocENobGdUZXh0LCAmcEZyYW1lLT5PY3RldFs4XSwgQ0lQSEVSX1RFWFRfTEVOKTsKLSAgICAgICAgICAgIHJldHVybiBUUlVFOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UKLSAgICAgICAgewotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUGVlckF1dGhTYW5pdHkgZmFpbCAtIHdyb25nIFNlZyNcbiIpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQXV0aFNhbml0eSBmYWlsIC0gd3JvbmcgYWxnb3JpdGhtXG4iKSk7Ci0gICAgICAgIHJldHVybiBGQUxTRTsKLSAgICB9Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gTWxtZUF1dGhSZXFTYW5pdHkoCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gVk9JRCAqTXNnLAotICAgIElOIFVMT05HIE1zZ0xlbiwKLSAgICBPVVQgUFVDSEFSIHBBZGRyLAotICAgIE9VVCBVTE9ORyAqcFRpb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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIE1sbWVBc3NvY1JlcVNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFwQWRkciwKLSAgICBPVVQgVVNIT1JUICpwQ2FwYWJpbGl0eUluZm8sCi0gICAgT1VUIFVMT05HICpwVGltZW91dCwKLSAgICBPVVQgVVNIT1JUICpwTGlzdGVuSW50dikKLXsKLSAgICBNTE1FX0FTU09DX1JFUV9TVFJVQ1QgKnBJbmZvOwotCi0gICAgcEluZm8gPSAoTUxNRV9BU1NPQ19SRVFfU1RSVUNUICopTXNnOwotICAgICpwVGltZW91dCA9IHBJbmZvLT5UaW1lb3V0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGltZW91dAotICAgIENPUFlfTUFDX0FERFIocEFwQWRkciwgcEluZm8tPkFkZHIpOyAgICAgICAgICAgICAgICAgICAvLyBBUCBhZGRyZXNzCi0gICAgKnBDYXBhYmlsaXR5SW5mbyA9IHBJbmZvLT5DYXBhYmlsaXR5SW5mbzsgICAgICAgICAgICAgICAvLyBjYXBhYmlsaXR5IGluZm8KLSAgICAqcExpc3RlbkludHYgPSBwSW5mby0+TGlzdGVuSW50djsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBQZWVyRGlzYXNzb2NTYW5pdHkoCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gVk9JRCAqTXNnLAotICAgIElOIFVMT05HIE1zZ0xlbiwKLSAgICBPVVQgUFVDSEFSIHBBZGRyMiwKLSAgICBPVVQgVVNIT1JUICpwUmVhc29uKQotewotICAgIFBGUkFNRV84MDJfMTEgcEZyYW1lID0gKFBGUkFNRV84MDJfMTEpTXNnOwotCi0gICAgQ09QWV9NQUNfQUREUihwQWRkcjIsIHBGcmFtZS0+SGRyLkFkZHIyKTsKLSAgICBOZGlzTW92ZU1lbW9yeShwUmVhc29uLCAmcEZyYW1lLT5PY3RldFswXSwgMik7Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCQlTYW5pdHkgY2hlY2sgTmV0d29ya1R5cGUgKDExYiwgMTFnIG9yIDExYSkKLQotCUFyZ3VtZW50czoKLQkJcEJzcyAtIFBvaW50ZXIgdG8gQlNTIHRhYmxlLgotCi0JUmV0dXJuIFZhbHVlOgotICAgICAgICBOZGlzODAyXzExRFMgLi4uLi4uLigxMWIpCi0gICAgICAgIE5kaXM4MDJfMTFPRkRNMjQuLi4uKDExZykKLSAgICAgICAgTmRpczgwMl8xMU9GRE01Li4uLi4oMTFhKQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1ORElTXzgwMl8x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0ZSBzZXQgYml0Ci0JCQkJaWYgKChyYXRlID09IDIpIHx8IChyYXRlID09IDQpIHx8IChyYXRlID09IDExKSB8fCAocmF0ZSA9PSAyMikpCi0JCQkJewotCQkJCQljb250aW51ZTsKLQkJCQl9Ci0JCQkJZWxzZQotCQkJCXsKLQkJCQkJLy8KLQkJCQkJLy8gT3RoZXJ3aXNlIChldmVuIHJhdGUgPiAxMDgpIG1lYW5zIE5kaXM4MDJfMTFPRkRNMjQKLQkJCQkJLy8KLQkJCQkJTmV0V29ya1R5cGUgPSBOZGlzODAyXzExT0ZETTI0OwotCQkJCQlicmVhazsKLQkJCQl9Ci0JCQl9Ci0JCX0KLQl9Ci0JZWxzZQotCXsKLQkJTmV0V29ya1R5cGUgPSBOZGlzODAyXzExT0ZETTU7Ci0JfQotCi0gICAgaWYgKHBCc3MtPkh0Q2FwYWJpbGl0eUxlbiAhPSAwKQotICAgIHsKLSAgICAgICAgaWYgKE5ldFdvcmtUeXBlID09IE5kaXM4MDJfMTFPRkRNNSkKLSAgICAgICAgICAgIE5ldFdvcmtUeXBlID0gTmRpczgwMl8xMU9GRE01X047Ci0gICAgICAgIGVsc2UKLSAgICAgICAgICAgIE5ldFdvcmtUeXBlID0gTmRpczgwMl8xMU9GRE0yNF9OOwotICAgIH0KLQotCXJldHVybiBOZXRXb3JrVHlwZTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBXUEEgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1C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hcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDA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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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ciBwQWRhcHRlciBjb250ZXh0Ci0gICAgCUVsZW1lbnRJRAktCWluZGljYXRlIHRoZSBXUEExIG9yIFdQQTIKLSAgICAJQXV0aE1vZGUJLQlpbmRpY2F0ZSB0aGUgYXV0aGVudGljYXRpb24gbW9kZQotCQlhcGlkeAkJLQlpbmRpY2F0ZSB0aGUgaW50ZXJmYWNlIGluZGV4Ci0KLQlSZXR1cm4gVmFsdWU6Ci0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotc3RhdGljIFZPSUQgUlRNUEluc2VydFJzbkllQUtNKAotCUlOICBQUlRNUF9BREFQVEVSICAgcEFkLAotCUlOCVVDSEFSCQkJRWxlbWVudElELAotCUlOCVVJTlQJCQlBdXRoTW9kZSwKLQlJTglVQ0hBUgkJCWFwaWR4LAotCU9VVAlQVUNIQVIJCQlwUnNuSWUsCi0JT1VUCVVDSEFSCQkJKnJzbl9sZW4pCi17Ci0JUlNOSUVfQVVUSAkJKnBSc25pZV9hdXRoOwotCi0JcFJzbmllX2F1dGggPSAoUlNOSUVfQVVUSCopKHBSc25JZSArICgqcnNuX2xlbikpOwotCi0JLy8gZGVjaWRlIFdQQTIgb3IgV1BBMQotCWlmIChFbGVtZW50SUQgPT0gV3BhMkllKQotCXsKLQkJc3dpdGNoIChBdXRoTW9kZSkKLSAgICAgICAgewotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEEyOgotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEExV1BBMjoKLSAgICAgICAgICAgICAgICBwUnNuaWVfYXV0aC0+YWNvdW50ID0gMTsKLSAgICAgICAgICAgICAgICAJTmRpc01vdmVNZW1vcnkocFJzbmllX2F1dGgtPmF1dGhbMF0ub3VpLCBPVUlfV1BBMl84MDIxWF9BS00sIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0s6Ci0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTFQU0tXUEEyUFNLOgotICAgICAgICAgICAgICAgIHBSc25pZV9hdXRoLT5hY291bnQgPSAxOwotICAgICAgICAgICAgICAgIAlOZGlzTW92ZU1lbW9yeShwUnNuaWVfYXV0aC0+YXV0aFswXS5vdWksIE9VSV9XUEEyX1BTS19BS00sIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0JfQotCWVsc2UKLQl7Ci0JCXN3aXRjaCAoQXV0aE1vZGUpCi0gICAgICAgIHsKLSAgICAgICAgICAgIGNhc2UgTmRpczgwMl8xMUF1dGhNb2RlV1BBOgotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEExV1BBMjoKLSAgICAgICAgICAgICAgICBwUnNuaWVfYXV0aC0+YWNvdW50ID0gMTsKLSAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwUnNuaWVfYXV0aC0+YXV0aFswXS5vdWksIE9VSV9XUEFfODAyMVhfQUtNLCA0KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0s6Ci0gICAgICAgICAgICBjYXNlIE5kaXM4MDJfMTFBdXRoTW9kZVdQQTFQU0tXUEEyUFNLOgotICAgICAgICAgICAgICAgIHBSc25pZV9hdXRoLT5hY291bnQgPSAxOwotICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBSc25pZV9hdXRoLT5hdXRoWzBdLm91aSwgT1VJX1dQQV9QU0tfQUtNLCA0KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLQotCQkJY2FzZSBOZGlzODAyXzExQXV0aE1vZGVXUEFOb25lOgotICAgICAgICAgICAgICAgIHBSc25pZV9hdXRoLT5hY291bnQ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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQkJQ2hlY2sgd2hldGhlciB0aGUgcmVjZWl2ZWQgZnJhbWUgaXMgRUFQIGZyYW1lLgotCi0JQXJndW1lbnRzOgotCQlwQWQJCQkJLQlwb2ludGVyIHRvIG91ciBwQWRhcHRlciBjb250ZXh0Ci0JCXBFbnRyeQkJCS0JcG9pbnRlciB0byBhY3RpdmUgZW50cnkKLQkJcERhdGEJCQktCXRoZSByZWNlaXZlZCBmcmFtZQotCQlEYXRhQnl0ZUNvdW50IAktCXRoZSByZWNlaXZlZCBmcmFtZSdzIGxlbmd0aAotCQlGcm9tV2hpY2hCU1NJRAktCWluZGljYXRlIHRoZSBpbnRlcmZhY2UgaW5kZXgKLQotICAgIFJldHVybjoKLSAgICAgICAgIFRSVUUgCQkJLQlUaGlzIGZyYW1lIGlzIEVBUCBmcmFtZQotICAgICAgICAgRkFMU0UgCQkJLQlvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUJPT0xFQU4gUlRNUENoZWNrV1BBZnJhbWUoCi0gICAgSU4gUFJUTVBfQURBUFRFUiAgICBwQWQsCi0gICAgSU4gUE1BQ19UQUJMRV9FTlRSWQlwRW50cnksCi0gICAgSU4gUFVDSEFSICAgICAgICAgICBwRGF0YSwKLSAgICBJTiBVTE9ORyAgICAgICAgICAgIERhdGFCeXRlQ291bnQsCi0JSU4gVUNIQVIJCQlGcm9tV2hpY2hCU1NJRCkKLXsKLQlVTE9ORwlCb2R5X2xlbjsKLQlCT09MRUFOIENhbmNlbGxlZDsKLQotCi0gICAgaWYoRGF0YUJ5dGVDb3VudCA8IChMRU5HVEhfODAyXzFfSCArIExFTkdUSF9FQVBPTF9IKSkKLSAgICAgICAgcmV0dXJuIEZBTFNFOwotCi0K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1RSQUNFLCAoIkNhbmNlbCB0aGUgRW5xdWV1ZUVhcG9sU3RhcnRUaW1lclJ1bm5pbmcgXG4iKSk7Ci0gICAgICAgICAgICAgICAgUlRNUENhbmNlbFRpbWVyKCZwRW50cnktPkVucXVldWVTdGFydEZvclBTS1RpbWVyLCAmQ2FuY2VsbGVkKTsKLSAgICAgICAgICAgICAgICBwRW50cnktPkVucXVldWVFYXBvbFN0YXJ0VGltZXJSdW5uaW5nID0gRUFQT0xfU1RBUlRfRElTQUJMRTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIEVBUE9MTG9nb2ZmOgotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUmVjZWl2ZSBFQVBPTExvZ29mZiBmcmFtZSwgVFlQRSA9IDIgXG4iKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBFQVBPTEtleToKLQkJCUJvZHlfbGVuID0gKCoocERhdGErMik8PDgpIHwgKCoocERhdGErMykpOwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUmVjZWl2ZSBFQVBPTC1LZXkgZnJhbWUsIFRZUEUgPSAzLCBMZW5ndGggPSAlbGRcbiIsIEJvZHlfbGVuKSk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBFQVBPTEFTRkFsZXJ0OgotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUmVjZWl2ZSBFQVBPTEFTRkFsZXJ0IGZyYW1lLCBUWVBFID0gNCBcbiIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotCi0gICAgfQotICAgIHJldHVybiBUUlVFOwotfQotCi0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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9ibG9ja3M7IGkrKykKLSAgICB7Ci0gICAgICAgIGZvciAoaiA9IDAgOyBqIDwgODsgaisrKQotICAgICAgICAgICAgUls4ICogKGkgKyAxKSArIGpdID0gcGxhaW50ZXh0WzggKiBpICsgal07Ci0gICAgfQotCi0gICAgLy8gS2V5IE1peAotICAgIGZvciAoaiA9IDA7IGogPCA2OyBqKyspCi0gICAgewotICAgICAgICBmb3IoaSA9IDE7IGkgPD0gbnVtX2Jsb2NrczsgaSsrKQotICAgICAgICB7Ci0gICAgICAgICAgICAvL3BoYXNlIDEKLSAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KEJJTiwgQSwgOCk7Ci0gICAgICAgICAgICBOZGlzTW92ZU1lbW9yeSgmQklOWzhdLCAmUls4ICogaV0sIDgpOwotICAgICAgICAgICAgcnRtcF9hZXNfZW5jcnlwdCgmYWVzY3R4LCBCSU4sIEJPVVQpOwotCi0gICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShBLCAmQk9VVFswXSwgOCk7Ci0gICAgICAgICAgICB4b3IgPSBudW1fYmxvY2tzICogaiArIGk7Ci0gICAgICAgICAgICBBWzddID0gQk9VVFs3XSBeIHhvcjsKLSAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KCZSWzggKiBpXSwgJkJPVVRbOF0sIDgpOwotICAgICAgICB9Ci0gICAgfQotCi0gICAgLy8gT3V0cHV0IGNpcGhlcnRleHQKLSAgICBOZGlzTW92ZU1lbW9yeShjaXBoZXJ0ZXh0LCBBLCA4KTsKLQotICAgIGZvciAoaSA9IDE7IGkgPD0gbnVtX2Jsb2NrczsgaSsrKQotICAgIHsKLSAgICAgICAgZm9yIChqID0gMCA7IGogPCA4OyBqKyspCi0gICAgICAgICAgICBjaXBoZXJ0ZXh0WzggKiBpICsgal0gPSBSWzggKiBpICsgal07Ci0gICAgfQotfQotCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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BUE9MX0dST1VQX01TR18yCi0KLSAgICBSZXR1cm46Ci0gICAgICAgICBtZXNzYWdlIHR5cGUgc3RyaW5nCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUNIQVIgKkdldEVhcG9sTXNnVHlwZShDSEFSIG1zZykKLXsKLSAgICBpZihtc2cgPT0gRUFQT0xfUEFJUl9NU0dfMSkKLSAgICAgICAgcmV0dXJuICJQYWlyd2lzZSBNZXNzYWdlIDEiOwotICAgIGVsc2UgaWYobXNnID09IEVBUE9MX1BBSVJfTVNHXzIpCi0gICAgICAgIHJldHVybiAiUGFpcndpc2UgTWVzc2FnZSAyIjsKLQllbHNlIGlmKG1zZyA9PSBFQVBPTF9QQUlSX01TR18zKQotICAgICAgICByZXR1cm4gIlBhaXJ3aXNlIE1lc3NhZ2UgMyI7Ci0JZWxzZSBpZihtc2cgPT0gRUFQT0xfUEFJUl9NU0dfNCkKLSAgICAgICAgcmV0dXJuICJQYWlyd2lzZSBNZXNzYWdlIDQiOwotCWVsc2UgaWYobXNnID09IEVBUE9MX0dST1VQX01TR18xKQotICAgICAgICByZXR1cm4gIkdyb3VwIE1lc3NhZ2UgMSI7Ci0JZWxzZSBpZihtc2cgPT0gRUFQT0xfR1JPVVBfTVNHXzIpCi0gICAgICAgIHJldHVybiAiR3JvdXAgTWVzc2FnZSAyIjsKLSAgICBlbHNlCi0gICAgCXJldHVybiAiSW52YWxpZCBNZXNzYWdlIjsKLX0KLQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICBDaGVjayBTYW5pdHkgUlNOIElFIG9mIEVBUG9MIG1lc3NhZ2UKLQotICAgIEFyZ3VtZW50czoKLQotICAgIFJldHVybiBWYWx1ZToK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gICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgYXBfZGZzLmMKLQotICAgIEFic3RyYWN0OgotICAgIFN1cHBvcnQgREZTIGZ1bmN0aW9uLgotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgV2hlbiAgICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLSAgLS0tLS0tLS0tLSAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBGb25jaGkgICAgMDMtMTItMjAwNyAgICAgIGNyZWF0ZWQKLSovCi0KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotdHlwZWRlZiBzdHJ1Y3QgX1JBREFSX0RVUkFUSU9OX1RBQkxFCi17Ci0JVUxPTkcgUkRE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nRlciB0byBvdXIgYWRhcHRlcgotCi0JUmV0dXJuIFZhbHVlOgotCQlUUlVFCUZvdW5kIHJhZGFyIHNpZ25hbAotCQlGQUxTRQlOb3QgZm91bmQgcmFkYXIgc2lnbmFsCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFJhZGFyRGV0ZWN0aW9uU3RvcCgKLQlJTiBQUlRNUF9BREFQVEVSCXBBZCkKLXsKLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwoIlJhZGFyRGV0ZWN0aW9uU3RvcC5cbiIpKTsKLQlBc2ljU2VuZENvbW1hbmRUb01jdShwQWQsIDB4NjAsIDB4ZmYsIDB4MDAsIDB4MDApOwkvLyBzZW5kIHN0YXJ0LVJEIHdpdGggQ1RTIHByb3RlY3Rpb24gY29tbWFuZCB0byBNQ1UKLQotCXJldHVybjsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCVJhZGFyIGNoYW5uZWwgY2hlY2sgcm91dGluZQotCi0JQXJndW1lbnRzOgotCQlwQWQgCVBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQotCVJldHVybiBWYWx1ZToKLQkJVFJVRQluZWVkIHRvIGRvIHJhZGFyIGRldGVjdAotCQlGQUxTRQluZWVkIG5vdCB0byBkbyByYWRhciBkZXRlY3QKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUJPT0xFQU4gUmFkYXJDaGFubmVsQ2hlY2soCi0JSU4gUFJUTVBfQURBUFRFUglwQWQsCi0JSU4gVUNIQVIJCQlDaCkKLXsKLSNpZiAxCi0JSU5UCQlpOwotCUJPT0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RUFEOF9CWV9SRUdfSUQocEFkLCBCQlBfUjExNywgJmR1cmF0aW9uMik7Ci0JQkJQX0lPX1JFQUQ4X0JZX1JFR19JRChwQWQsIEJCUF9SMTE4LCAmZHVyYXRpb24zKTsKLQlyZXN1bHQgPSAoZHVyYXRpb24xIDw8IDE2KSArIChkdXJhdGlvbjIgPDwgOCkgKyBkdXJhdGlvbjM7Ci0jZW5kaWYgLy8gREZTX1NVUFBPUlQgLy8KLQotCXJldHVybiByZXN1bHQ7Ci0KLX0KLQotVk9JRCBSVE1QQ2xlYW5SYWRhckR1cmF0aW9uKAotCUlOIFBSVE1QX0FEQVBURVIJcEFkKQotewotCXJldHVybjsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBSYWRhciB3YXZlIGRldGVjdGlvbi4gVGhlIEFQSSBzaG91bGQgYmUgaW52b2tlIGVhY2ggc2Vjb25kLgotCi0gICAgQXJndW1lbnRzOgotICAgICAgICBwQWQgICAgICAgICAtIEFkYXB0ZXIgcG9pbnRlcgotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIEFwUmFkYXJEZXRlY3RQZXJpb2RpYygKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlJTlQJaTsKLQotCXBBZC0+Q29tbW9uQ2ZnLlJhZGFyRGV0ZWN0LkluU2VydmljZU1vbml0b3JDb3VudCsrOwotCi0JZm9yIChpPTA7IGk8cEFkLT5DaGFubmVsTGlzdE51bTsgaSsrKQotCXsKLQkJaWYgKHBBZC0+Q2hhbm5lbExpc3RbaV0uUmVtYWluaW5nVGltZUZvclVzZSA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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hb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k7Ci0KLSAgICBmb3IoaT0wOyBpPDE2OyBpKyspCi0gICAgewotICAgICAgICBkYXRhID0gZGF0YSA8PCAxOwotICAgICAgICBSYWlzZUNsb2NrKHBBZCwgJngpOwotCi0gICAgICAgIFJUTVBfSU9fUkVBRDMyKHBBZCwgRTJQUk9NX0NTUiwgJngpOwotCQlMb3dlckNsb2NrKHBBZCwgJngpOyAvL3ByZXZlbnQgcmVhZCBmYWlsZWQKLQotICAgICAgICB4ICY9IH4oRUVESSk7Ci0gICAgICAgIGlmKHggJiBFRURPKQotICAgICAgICAgICAgZGF0YSB8PSAxOwotICAgIH0KLQotICAgIHJldHVybiBkYXRhOwotfQotCi0vLyBJUlFMID0gUEFTU0lWRV9MRVZFTAotVk9JRCBTaGlmdE91dEJpdHMoCi0gICAgSU4JUFJUTVBfQURBUFRFUglwQWQsCi0gICAgSU4gIFVTSE9SVCBkYXRhLAotICAgIElOICBVU0hPUlQgY291bnQpCi17Ci0gICAgVUlOVDMyICAgICAgIHgsbWFzazsKLQotICAgIG1hc2sgPSAweDAxIDw8IChjb3VudCAtIDEpOwotICAgIFJUTVBfSU9fUkVBRDMyKHBBZCwgRTJQUk9NX0NTUiwgJngpOwotCi0gICAgeCAmPSB+KEVFRE8gfCBFRURJKTsKLQotICAgIGRvCi0gICAgewotICAgICAgICB4ICY9IH5FRURJOwotICAgICAgICBpZihkYXRhICYgbWFzaykJCXggfD0gRUVESTsKLQotICAgICAgICBSVE1QX0lPX1dSSVRFMzIocEFkLCBFMlBST01fQ1NSLCB4KTsKLQotICAgICAgICBSYWlzZUNsb2NrKHBBZCwgJngpOwotICAgICAgICBMb3dlckNsb2NrKHBBZCwgJngpOwotCi0gICAgICAgIG1hc2sgPSBtYXNrID4+IDE7Ci0gICAgfSB3aGlsZShtYXNrKTsKLQotICAgIHggJj0gfkVFREk7Ci0gICAgUlRNUF9JT19XUklURTMyKHBBZCwgRTJQUk9NX0NTUiwgeCk7Ci19Ci0KLS8vIElSUUwgPSBQQV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lvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIF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ICAgICAvLyBvbmUtd29yZCByaWdodCBzaGlmdAotICAgICAgICBUZW1wICAgPSBSZWdbM107Ci0gICAgICAgIFJlZ1szXSA9IFJlZ1syXTsKLSAgICAgICAgUmVnWzJdID0gUmVnWzFdOwotICAgICAgICBSZWdbMV0gPSBSZWdbMF07Ci0gICAgICAgIFJlZ1swXSA9IFRlbXA7Ci0gICAgfQotICAgIGZvciAoaT00ODsgaTw2NDsgaSsrKQotICAgIHsKLSAgICAgICAgTUQ1U3RlcChNRDVfRjQsIFJlZ1swXSwgUmVnWzFdLCBSZWdbMl0sIFJlZ1szXSwgTWVzWyg3KihpICYgMHhmKSkgJiAweGZdLAotICAgICAgICAgICAgICAgIE1ENVRhYmxlW2ldLCBMU2hpZnRWYWxbKDB4MyA8PCAyKSsoaSAmIDB4MyldKTsKLQotICAgICAgICAvLyBvbmUtd29yZCByaWdodCBzaGlmdAotICAgICAgICBUZW1wICAgPSBSZWdbM107Ci0gICAgICAgIFJlZ1szXSA9IFJlZ1syXTsKLSAgICAgICAgUmVnWzJdID0gUmVnWzFdOwotICAgICAgICBSZWdbMV0gPSBSZWdbMF07Ci0gICAgICAgIFJlZ1swXSA9IFRlbXA7Ci0gICAgfQotCi0KLSAgICAvLyAodGVtcG9yYXJ5KW91dHB1dAotICAgIGZvciAoaT0wOyBpPDQ7IGkrKykKLSAgICAgICAgQnVmW2ldICs9IFJlZ1tpXTsKLQotfQotCi0KLQotLyogPT09PT09PT09PT09PT09PT09PT09PT09PSAgU0hBLTEgaW1wbGVtZW50YXRpb24gPT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLS8vIGZvdXIgYmFzZSBmdW5jdGlvbnMgZm9yIFNIQS0xCi0jZGVmaW5lIFNIQTFfRjEoYiwgYywgZCkgICAgKCgoYikgJiAoYykpIHwgKCh+YikgJiAoZCkpKQotI2RlZmluZSBTSEExX0YyKGIsIGMsIGQpICAgICgoYikgXiAoYykgXiAoZCkpCi0jZGVmaW5lIFNIQTFfRjMoYi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b3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQ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aV0gJj0gMHg3ZjsKLSAgICAgICAgZXh0X3BbaV0gJj0gMHg3ZjsKLSAgICB9IC8qIEVuZCBvZiBmb3IgKi8KLQotICAgIGZvcihpPTA7IGk8TUFYX0xFTl9PRl9TVVBQT1JURURfUkFURVM7IGkrKykKLSAgICB7Ci0gICAgICAgIGlmIChiaXRtYXAgJiAoMSA8PCBpKSkKLSAgICAgICAgewotICAgICAgICAgICAgZm9yKGo9MDsgajxNQVhfTEVOX09GX1NVUFBPUlRFRF9SQVRFUzsgaisrKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChzdXBfcFtqXSA9PSByYXRlW2ldKQotICAgICAgICAgICAgICAgICAgICBzdXBfcFtqXSB8PSAweDgwOwotICAgICAgICAgICAgICAgIC8qIEVuZCBvZiBpZiAqLwotICAgICAgICAgICAgfSAvKiBFbmQgb2YgZm9yICovCi0KLSAgICAgICAgICAgIGZvcihqPTA7IGo8TUFYX0xFTl9PRl9TVVBQT1JURURfUkFURVM7IGorKykKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBpZiAoZXh0X3Bbal0gPT0gcmF0ZVtpXSkKLSAgICAgICAgICAgICAgICAgICAgZXh0X3Bbal0gfD0gMHg4MDsKLSAgICAgICAgICAgICAgICAvKiBFbmQgb2YgaWYgKi8KLSAgICAgICAgICAgIH0gLyogRW5kIG9mIGZvciAqLwotICAgICAgICB9IC8qIEVuZCBvZiBpZiAqLwotICAgIH0gLyogRW5kIG9mIGZvciAqLwotfSAvKiBFbmQgb2YgVXBkYXRlQmFzaWNSYXRlQml0bWFwICovCi0KLS8vIElSUUwgPSBQQVNTSVZFX0xFVkVMCi0vLyBJUlFMID0gRElTUEFUQ0hfTEVWRUwKLS8vIGJMaW5rVXAgaXMgdG8gaWRlbnRpZnkgdGhlIGluaXRhbCBsaW5rIHNwZWVkLgotLy8gVFJVRSBpbmRpY2F0ZXMgdGhlIHJhdGUgdXBkYXRlIGF0IGxpbmt1cCwgd2Ugc2hv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vLwotCi0vLyBJUlFMID0gRElTUEFUQ0hfTEVWRUwKLVZPSUQgTWxtZVJhZGlvT2ZmKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKQotewotCVJUMjhYWF9NTE1FX1JBRElPX09GRihwQWQpOwotfQotCi0vLyBJUlFMID0gRElTUEFUQ0hfTEVWRUwKLVZPSUQgTWxtZVJhZGlvT24oCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpCi17Ci0JUlQyOFhYX01MTUVfUkFESU9fT04ocEFkKTsKLX0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gYnNzX3RhYmxlLmMKLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCi0vKiEgXGJyaWVmIGluaXRpYWxpemUgQlNTIHRhYmxlCi0gKglccGFyYW0gcF90YWIgcG9pbnRlciB0byB0aGUgdGFibGUKLSAqCVxyZXR1cm4gbm9uZQotICoJXHByZQotICoJXHBvc3QKLQotIElSUUwgPSBQQVNTSVZFX0xFVkVMCi0gSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAqLwotVk9JRCBCc3NUYWJsZUluaXQoCi0JSU4gQlNTX1RBQkxFICpUYWIpCi17Ci0JaW50IGk7Ci0KLQlUYWItPkJzc05yID0gMDsKLSAgICBUYWItPkJzc092ZXJsYXBOciA9IDA7Ci0JZm9yIChpID0gMDsgaSA8IE1BWF9MRU5fT0ZfQlNTX1RBQkxFOyBpKyspCi0JewotCQlOZGlzWmVyb01lbW9yeSgmVGFiLT5Cc3NFbnRyeVtpXSwgc2l6ZW9mKEJTU19FTlRSWSkpOwotCQlUYWItPkJzc0VudHJ5W2ldLlJzc2kgPSAtMTI3OwkvLyBpbml0aWFsIHRoZSByc3NpIG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4MDIxMS0+QWRkcjEsIHBEQSk7Ci0jaWZkZWYgQ09ORklHX1NUQV9TVVBQT1JUCi0JSUZfREVWX0NPTkZJR19PUE1PREVfT05fU1RBKHBBZCkKLQkJQ09QWV9NQUNfQUREUihwSGRyODAyMTEtPkFkZHIyLCBwQWQtPkN1cnJlbnRBZGRyZXNzKTsKLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KLQlDT1BZX01BQ19BRERSKHBIZHI4MDIxMS0+QWRkcjMsIHBCc3NpZCk7Ci19Ci0KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIG1lbV9tZ210LmMKLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBUaGlzIHJvdXRpbmUgYnVpbGQgYW4gb3V0Z29pbmcgZnJhbWUsIGFuZCBmaWxsIGFsbCBpbmZvcm1hdGlvbiBzcGVjaWZpZWQKLSAqIGluIGFyZ3VtZW50IGxpc3QgdG8gdGhlIGZyYW1lIGJvZHkuIFRoZSBhY3R1YWwgZnJhbWUgc2l6ZSBpcyB0aGUgc3VtbWF0aW9uCi0gKiBvZiBhbGwgYXJndW1lbnRzLgotICogaW5wdXQgcGFyYW1zOgotICoJCUJ1ZmZlciAtIHBvaW50ZXIgdG8gYSBwcmUtYWxsb2NhdGVkIG1lbW9yeSBzZWdtZW50Ci0gKgkJYXJncyAtIGEgbGlzdCBvZiA8aW50IGFyZ19zaXplLCBhcmc+IHBhaXJzLgotICoJCU5PVEUgTk9URSBOT1RFISEhISB0aGUgbGFzdCBhcmd1bWVudCBt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Gx5Ci0JCWlnbm9yZWQuIFRoaXMgZnVuY3Rpb24gZG9lcyBub3RoaW5nLCB0aGUgbWVzc2FnZSBpcyBmcmVlZCBpbgotCQlTdGF0ZU1hY2hpbmVQZXJmb3JtQWN0aW9uKCkKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIERyb3AoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gTUxNRV9RVUVVRV9FTEVNICpFbGVtKQotewotfQotCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBsZnNyLmMKLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgTGZzckluaXQoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gVUxPTkcgU2VlZCkKLXsKLQlpZiAoU2VlZCA9PSAwKQotCQlwQWQtPk1sbWUuU2hpZnRSZWcgPSAxOwotCWVsc2UKLQkJcEFkLT5NbG1lLlNoaWZ0UmVnID0gU2VlZDsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9u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Ci0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gVVNIT1JUIFRidHROdW1Ub05leHRXYWtlVXApCi17Ci0gICAgUlQyOFhYX1NUQV9TTEVFUF9USEVOX0FVVE9fV0FLRVVQKHBBZCwgVGJ0dE51bVRvTmV4dFdha2VVcCk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJQXNpY0ZvcmNlV2FrZXVwKCkgaXMgdXNlZCB3aGVuZXZlciBtYW51YWwgd2FrZXVwIGlzIHJlcXVpcmVkCi0JCUFzaWNGb3JjZVNsZWVwKCkgc2hvdWxkIG9ubHkgYmUgdXNlZCB3aGVuIG5vdCBpbiBJTkZSQSBCU1MuIFdoZW4KLQkJaW4gSU5GUkEgQlNTLCB3ZSBzaG91bGQgdXNlIEFzaWNTbGVlcFRoZW5BdXRvV2FrZXVwKCkgaW5zdGVhZC4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEFzaWNGb3JjZVNsZWVwKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKQotewotCi19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJQXNpY0ZvcmNlV2FrZXVwKCkgaXMgdXNlZCB3aGVuZXZlciBUd2FrZXVwIHRpbWVyIChzZXQgdmlhIEFzaWNTbGVlcFRoZW5BdXRvV2FrZXVwKQotCQlleHBpcmVkLgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEFzaWNGb3JjZVdha2V1cCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBCT09MRUFOICAgIGJGcm9tVHgpCi17Ci0gICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiLS0+IEFzaWNGb3JjZVdha2V1cCBcbiIpKTsKLSAgICBSVDI4WFhfU1RBX0ZPUkNFX1dBS0VVUChwQWQsIGJGcm9tVHgpOwotfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlTZXQgTXkgQlNTSUQKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBc2ljU2V0QnNzaWQoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gUFVDSEFSIHBCc3NpZCkKLXsKLQlVTE9ORwkJICBBZGRyNDsKLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCI9PT09PT09PT09PT09PT4gQXNpY1NldEJzc2lkICV4OiV4OiV4OiV4OiV4OiV4XG4iLAotCQlwQnNzaWRbMF0scEJzc2lkWzFdLHBCc3NpZFsyXSxwQnNzaWRbM10sIHBCc3NpZFs0XSxwQnNzaWRbNV0pKTsKLQotCUFkZHI0ID0gKFVMT05HKShwQnNzaWRbMF0pCQkgfAotCQkJKFVMT05HKShwQnNzaWRbMV0gPDwgOCkgIHwKLQkJCShVTE9ORykocEJzc2lkWzJdIDw8IDE2KSB8Ci0JCQkoVUxPTkcpKHBCc3NpZFszXSA8PCAyNCk7Ci0JUlRNUF9JT19X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QgKiBIV19XQ0lEX0VOVFJZX1NJWkUpOwotCUFkZHIgPSBwQWRkclswXSArIChwQWRkclsxXSA8PCA4KSArKHBBZGRyWzJdIDw8IDE2KSArKHBBZGRyWzNdIDw8IDI0KTsKLQlSVE1QX0lPX1dSSVRFMzIocEFkLCBvZmZzZXQsIEFkZHIpOwotCUFkZHIgPSBwQWRkcls0XSArIChwQWRkcls1XSA8PCA4KTsKLQlSVE1QX0lPX1dSSVRFMzIocEFkLCBvZmZzZXQgKyA0LCBBZGRyKTsKLX0KLQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IENpcGhlciBLZXksIENpcGhlciBhbGdvcml0aG0sIElWL0VJViB0byBBc2ljCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZCAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLSAgICAgICAgV0NJRCAgICAgICAgICAgICAgICAgICAgV0NJRCBFbnRyeSBudW1iZXIuCi0gICAgICAgIEJzc0luZGV4ICAgICAgICAgICAgICAgIEJTU0lEIGluZGV4LCBzdGF0aW9uIG9yIG5vbmUgbXVsdGlwbGUgQlNTSUQgc3VwcG9ydAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIHZhbHVlIHNob3VsZCBiZSAwLgotICAgICAgICBLZXlJZHggICAgICAgICAgICAgICAgICBUaGlzIEtleUlkeCB3aWxsIHNldCB0byBJVidzIEtleUlEIGlmIGJUeEtleSBlbmFibGVkCi0gICAgICAgIHBDaXBoZXJLZXkgICAgICAgICAgICAgIFBvaW50ZXIgdG8gQ2lwaGVyIEtleS4KLSAgICAgICAgYlVzZVBhaXJld2lzZUtleVRhYmxlICAgVFJVRSBtZWFucyBzYXZlZCB0aGUga2V5IGluIFNoYX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ZXJUaW1lckNvdW50ID0gMDsKLQkJcEFkLT5Db21tb25DZmcuYkluU2VydmljZVBlcmlvZCA9IFRSVUU7Ci0JfSovCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0L3Jlc2V0IE1BQyByZWdpc3RlcnMgYWNjb3JkaW5nIHRvIGJQaWdneUJhY2sgcGFyYW1ldGVyCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZCAgICAgICAgIC0gQWRhcHRlciBwb2ludGVyCi0gICAgICAgIGJQaWdneUJhY2sgIC0gRW5hYmxlIC8gRGlzYWJsZSBQaWdneS1CYWNrCi0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIE5vbmUKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgUlRNUFNldFBpZ2d5QmFjaygKLSAgICBJTiBQUlRNUF9BREFQVEVSICAgIHBBZCwKLSAgICBJTiBCT09MRUFOICAgICAgICAgIGJQaWdneUJhY2spCi17Ci0JVFhfTElOS19DRkdfU1RSVUMgIFR4TGlua0NmZzsKLQotCVJUTVBfSU9fUkVBRDMyKHBBZCwgVFhfTElOS19DRkcsICZUeExpbmtDZmcud29yZCk7Ci0KLQlUeExpbmtDZmcuZmllbGQuVHhDRkFja0VuID0gYlBpZ2d5QmFjazsKLQlSVE1QX0lPX1dSSVRFMzIocEFkLCBUWF9MSU5LX0NGRywgVHhMaW5rQ2ZnLndvcmQpOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIFJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAg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wQWQtPlN0YUNmZy5iQXV0b1R4UmF0ZVN3aXRjaCkKLQkJCXJldHVybiBUUlVFOwotCX0KLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KLQlyZXR1cm4gRkFMU0U7Ci19Ci0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBjaGVjayBpZiB0aGlzIGVudHJ5IG5lZWQgdG8gZml4IHR4IGxlZ2FjeSByYXRlCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIHBBZAotICAgICAgICBwRW50cnkKLQotICAgIFJldHVybiBWYWx1ZToKLSAgICAgICAgVFVSRQotICAgICAgICBGQUxTRQotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVUNIQVIgUlRNUFN0YUZpeGVkVHhNb2RlKAotCUlOIFBSVE1QX0FEQVBURVIgICAgcEFkLAotCUlOIFBNQUNfVEFCTEVfRU5UUlkJcEVudHJ5KQotewotCVVDSEFSCXR4X21vZGUgPSBGSVhFRF9UWE1PREVfSFQ7Ci0KLQotI2lmZGVmIENPTkZJR19TVEFfU1VQUE9SVAotCUlGX0RFVl9DT05GSUdfT1BNT0RFX09OX1NUQShwQWQpCi0JewotCQl0eF9tb2RlID0gKFVDSEFSKXBBZC0+U3RhQ2ZnLkRlc2lyZWRUcmFuc21pdFNldHRpbmcuZmllbGQuRml4ZWRUeE1vZGU7Ci0JfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCi0JcmV0dXJuIHR4X21vZGU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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TUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotI2luY2x1ZGUgIm5ldGlmX2Jsb2NrLmgiCi0KLXN0YXRpYyBORVRJRl9FTlRSWSBmcmVlTmV0SWZFbnRyeVBvb2xbRlJFRV9ORVRJRl9QT09MX1NJWkVdOwotc3RhdGljIExJU1RfSEVBREVSIGZyZWVOZXRJZkVudHJ5TGlzdDsKLQotdm9pZCBpbml0YmxvY2tRdWV1ZVRhYigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKL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pb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgot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ci0vLwotI2lmZGVmIFJUMzB4eAotUkVHX1BBSVIgICBSVDMweHhfUkZSZWdUYWJsZVtdID0gewotICAgICAgICB7UkZfUjA0LCAgICAgICAgICAweDQwfSwKLSAgICAgICAge1JGX1IwNSwgICAgICAgICAgMHgwM30sCi0gICAgICAgIHtSRl9SMDYsICAgICAgICAgIDB4MDJ9LAotICAgICAgICB7UkZfUjA3LCAgICAgICAgICAweDcwfSwKLSAgICAgICAge1JGX1IwOSwgICAgICAgICAgMHgwRn0sCi0gICAgICAgIHtSRl9SMTAsICAgICAgICAgIDB4NDF9LAotICAgICAgICB7UkZfUjExLCAgICAgICAgICAweDIxfSwKLSAgICAgICAge1JGX1IxMiwgICAgICAgICAgMHg3Qn0sCi0gICAgICAgIHtSRl9SMTQsICAgICAgICAgIDB4OTB9LAotICAgICAgICB7UkZfUjE1LCAgICAgICAgICAweDU4fSwKLSAgICAgICAge1JGX1IxNiwgICAgICAgICAgMHhCM30sCi0gICAgICAgIHtSRl9SMTcsICAgICAgICAgIDB4OTJ9LAotICAgICAgICB7UkZfUjE4LCAgICAgICAgICAweDJDfSwKLSAgICAgICAge1JGX1IxOSwgICAgICAgICAgMHgwMn0sCi0gICAgICAgIHtSRl9SMjAsICAgICAgICAgIDB4QkF9LAotICAgICAgICB7UkZfUjIxLCAgICAgICAgICAweERCfSwKLSAgICAgICAge1JGX1IyNCwgICAgICAgICAgMHgxNn0sCi0gICAgICAgIHtSRl9SMjUsICAgICAgICAgIDB4MDF9LAotICAgICAgICB7UkZfUjI5LCAgICAgICAgICAweDFGfSwKLX07Ci0jZGVmaW5lCU5VTV9SRl9SRUdfUEFSTVMJKHNpemVvZihSVDMweHhfUkZSZWdUYWJsZSkgLyBzaXplb2YoUkVHX1BBSVIpKQotI2VuZGlmIC8vIFJUMzB4eCAvLwotCi0vLwotLy8gQVNJQyByZWdpc3RlciBpbml0aWFsaXphdGlvbiBzZXRzCi0vLwotCi1SVE1QX1JFR19QQUlSCU1BQ1JlZ1RhY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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1ORElTX1NUQVRVUwlOSUNSZWFkUmVnUGFyYW1ldGVycygKLQlJTglQUlRNUF9BREFQVEVSCQlwQWQsCi0JSU4JTkRJU19IQU5ETEUJCQlXcmFwcGVyQ29uZmlndXJhdGlvbkNvbnRleHQKLQkpCi17Ci0JTkRJU19TVEFUVVMJCQkJCQlTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotCURCR1BSSU5UX1MoU3RhdHVzLCAoIjwtLSBOSUNSZWFkUmVnUGFyYW1ldGVycywgU3RhdHVzPSV4XG4iLCBTdGF0dXMpKTsKLQlyZXR1cm4gU3RhdHVzOwotfQotCi0KLSNpZmRlZiBSVDMweHgKLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCQlGb3IgUkYgZmlsdGVyIGNhbGlicmF0aW9uIHB1cnBvc2UKLQotCUFyZ3VtZW50czoKLQkJcEFkICAgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0KLQlSZXR1cm4gVmFsdWU6Ci0JCU5vbmUKLQotCUlSUUwgPSBQQVNTSVZFX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFJUTVBGaWx0ZXJDYWxpYnJhdGlvbigKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlVQ0hBUglSNTV4ID0gMCwgdmFsdWUsIEZpbHRlclRhcmdldCA9IDB4MUUsIEJCUFZhbHVlPTA7Ci0JVUlOVAlsb29wID0gMCwgY291bnQgPSAwLCBsb29wY250ID0gMCwgUmVUcnkgPSAwOwotCVVDSE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U9OX18sIFN0YXR1cykpOwotICAgIHJldHVybiBTdGF0dXM7Ci19IC8qIEVuZCBvZiBOSUNMb2FkRmlybXdhcmUgKi8KLQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQkJTG9hZCBUeCByYXRlIHN3aXRjaGluZyBwYXJhbWV0ZXJzCi0KLQlBcmd1bWVudHM6Ci0JCUFkYXB0ZXIJCQkJCQlQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0KLQlSZXR1cm4gVmFsdWU6Ci0JCU5ESVNfU1RBVFVTX1NVQ0NFU1MgICAgICAgICBmaXJtd2FyZSBpbWFnZSBsb2FkIG9rCi0JCU5ESVNfU1RBVFVTX0ZBSUxVUkUgICAgICAgICBpbWFnZSBub3QgZm91bmQKLQotCUlSUUwgPSBQQVNTSVZFX0xFVkVMCi0KLQlSYXRlIFRhYmxlIEZvcm1hdDoKLQkJMS4gKEIwOiBWYWxpZCBJdGVtIG51bWJlcikgKEIxOkluaXRpYWwgaXRlbSBmcm9tIHplcm8pCi0JCTIuIEl0ZW0gTnVtYmVyKERlYykgICAgICBNb2RlKEhleCkgICAgIEN1cnJlbnQgTUNTKERlYykgICAgVHJhaW5VcChEZWMpICAgIFRyYWluRG93bihEZWMpCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1ORElTX1NUQVRVUyBOSUNMb2FkUmF0ZVN3aXRjaGluZ1BhcmFtcygKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlyZXR1cm4gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCWlmICBwU3JjMSBhbGwgemVybyB3aXRoIGxlbmd0aCBMZW5ndGgsIHJldHVybiAwLgotCQlJZiBub3QgYWxsIHplcm8sIHJldHVybiAxCi0KLQlBcmd1bWVudHM6Ci0JCXBTcmMxCi0KLQlSZXR1cm4gVmFsdWU6Ci0JCTE6CQkJbm90IGFsbCB6ZXJvCi0JCTA6CQkJYWxsIHplcm8KLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVVMT05HCVJUTVBOb3RBbGxaZXJvKAotCUlOCVBWT0lECXBTcmMxLAotCUlOCVVMT05HCUxlbmd0aCkKLXsKLQlQVUNIQVIJcE1lbTE7Ci0JVUxPTkcJSW5kZXggPSAwOwotCi0JcE1lbTEgPSAoUFVDSEFSKSBwU3JjMTsKLQotCWZvciAoSW5kZXggPSAwOyBJbmRleCA8IExlbmd0aDsgSW5kZXgrKykKLQl7Ci0JCWlmIChwTWVtMVtJbmRleF0gIT0gMHgwKQotCQl7Ci0JCQlicmVhazsKLQkJfQotCX0KLQotCWlmIChJbmRleCA9PSBMZW5ndGgpCi0JewotCQlyZXR1cm4gKDApOwotCX0KLQllbHNlCi0JewotCQlyZXR1cm4gKDEpOwotCX0KLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCUNvbXBhcmUgdHdvIG1lbW9yeSBibG9jawotCi0JQXJndW1lbnRzOgotCQlwU3JjMQkJUG9pbnRlciB0byBmaXJzdCBtZW1vcnkgYWRkcmVzcwotCQlwU3JjMgkJUG9pbnRlciB0byBzZWNvbmQgbWVtb3J5IGFkZHJlc3MKLQotCV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VybiBWYWx1ZToKLQkJTm9uZQotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lECVJUTVBNb3ZlTWVtb3J5KAotCU9VVAlQVk9JRAlwRGVzdCwKLQlJTglQVk9JRAlwU3JjLAotCUlOCVVMT05HCUxlbmd0aCkKLXsKLQlQVUNIQVIJcE1lbTE7Ci0JUFVDSEFSCXBNZW0yOwotCVVJTlQJSW5kZXg7Ci0KLQlBU1NFUlQoKExlbmd0aD09MCkgfHwgKHBEZXN0ICYmIHBTcmMpKTsKLQotCXBNZW0xID0gKFBVQ0hBUikgcERlc3Q7Ci0JcE1lbTIgPSAoUFVDSEFSKSBwU3JjOwotCi0JZm9yIChJbmRleCA9IDA7IEluZGV4IDwgTGVuZ3RoOyBJbmRleCsrKQotCXsKLQkJcE1lbTFbSW5kZXhdID0gcE1lbTJbSW5kZXhdOwotCX0KLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCUluaXRpYWxpemUgcG9ydCBjb25maWd1cmF0aW9uIHN0cnVjdHVyZQotCi0JQXJndW1lbnRzOgotCQlBZGFwdGVyCQkJCQkJUG9pbnRlciB0byBvdXIgYWRhcHRlcgotCi0JUmV0dXJuIFZhbHVlOgotCQlOb25lCi0KLQlJUlFMID0gUEFTU0lWRV9MRVZFTAotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJVXNlckNmZ0luaXQoCi0JSU4JUFJUTVBfQURBUFR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ID0gUmVwZWF0OwotCXBUaW1lci0+U3RhdGUgICAgICA9IEZBTFNFOwotCXBUaW1lci0+Y29va2llID0gKFVMT05HKSBwRGF0YTsKLQotI2lmZGVmIFJUMjg3MAotCXBUaW1lci0+cEFkID0gcEFkOwotI2VuZGlmIC8vIFJUMjg3MCAvLwotCi0JUlRNUF9PU19Jbml0X1RpbWVyKHBBZCwJJnBUaW1lci0+VGltZXJPYmosCXBUaW1lckZ1bmMsIChQVk9JRCkgcFRpbWVyKTsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JCUluaXQgdGltZXIgb2JqZWN0cwotCi0JQXJndW1lbnRzOgotCQlwVGltZXIJCQkJVGltZXIgc3RydWN0dXJlCi0JCVZhbHVlCQkJCVRpbWVyIHZhbHVlIGluIG1pbGxpc2Vjb25kcwotCi0JUmV0dXJuIFZhbHVlOgotCQlOb25lCi0KLQlOb3RlOgotCQlUbyB1c2UgdGhpcyByb3V0aW5lLCBtdXN0IGNhbGwgUlRNUEluaXRUaW1lciBiZWZvcmUuCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lECVJUTVBTZXRUaW1lcigKLQlJTglQUkFMSU5LX1RJTUVSX1NUUlVDVAlwVGltZXIsCi0JSU4JVUxPTkcJCQkJCVZhbHVlKQotewotCWlmIChwVGltZXItPlZhbGlkKQotCXsKLQkJcFRpbWVyLT5UaW1lclZhbHVlID0gVmFsdWU7Ci0JCXBUaW1lci0+U3RhdGUgICAgICA9IEZBTFNFOwotCQlpZiAocFRpbWVyLT5QZXJpb2RpY1R5cGUgPT0gVFJVRSkKLQkJewotCQkJcFRpbWVyLT5SZXBlYXQgPSBUUlVFOwotCQkJUlRNUF9TZXRQZXJp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B3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCXJ0bXBfdGtpcC5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JUGF1bCBXdQkJMDItMjUtMDIJCUluaXRpYWwKLSovCi0KLSNpbmNsdWRlCSIuLi9ydF9jb25maWcuaCIKLQotLy8gUm90YXRpb24gZnVuY3Rpb25zIG9uIDMyIGJpdCB2YWx1ZXMKLSNkZWZpbmUgUk9MMzIoIEEsIG4gKSBcCi0JKCAoKEEpIDw8IChuKSkgfCAoICgoQSk+PigzMi0obikpKSAmICggKDFVTCA8PCAobikpIC0gMSApICkgKQotI2RlZmluZSBST1IzMiggQSwgbiApIFJPTDMyKCAoQSksIDMyLShuKSApCi0KLVVJTlQgVGtpcF9TYm94X0xvd2VyWzI1Nl0gPQotewotCTB4QTUsMHg4NCwweDk5LDB4OEQsMHgwRCwweEJELDB4QjEsMHg1NCwKLQkweDUwLDB4MDMsMHhBOSwweDdELDB4MTksMHg2MiwweEU2LDB4OUEsC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Ci0KLQlSZXR1cm4gVmFsdWU6Ci0JCU5vbmUKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1VTE9ORwlSVE1QVGtpcEdldFVJbnQzMigKLQlJTglQVUNIQVIJcE1JQ0tleSkKLXsKLQlVTE9ORwlyZXMgPSAwOwotCUlOVAkJaTsKLQotCWZvciAoaSA9IDA7IGkgPCA0OyBpKyspCi0JewotCQlyZXMgfD0gKCpwTUlDS2V5KyspIDw8ICg4ICogaSk7Ci0JfQotCi0JcmV0dXJuIHJlczsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUJRGVzY3JpcHRpb246Ci0JCUNvbnZlcnQgZnJvbSBVTE9ORyB0byBVQ0hBUltdIGluIGEgcG9ydGFibGUgd2F5Ci0KLQlBcmd1bWVudHM6Ci0gICAgICBwRHN0CQkJcG9pbnRlciB0byBkZXN0aW5hdGlvbiBmb3IgY29udmVydCBVTE9ORyB0byBVQ0hBUltdCi0gICAgICB2YWwJCQl0aGUgdmFsdWUgZm9yIGNvbnZlcnQKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRAlSVE1QVGtpcFB1dFVJbnQzMigKLQlJTiBPVVQJUFVDSEFSCQlwRHN0LAotCUlOCQlVTE9ORwkJdmFsKQotewotCUlOVCBpOwotCi0JZm9yKGkgPSAwOyBpIDwgNDsgaSsrKQotCXsKLQkJKnBEc3QrKyA9IChVQ0hBUikgKHZhbCAmIDB4ZmYpOwotCQl2YWwgPj49IDg7Ci0JfQotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZQlEZXNjcmlwdGlvbjoKLQkJU2V0IHRoZSBNSUMgS2V5LgotCi0JQXJndW1lbnRzOgotICAgICAgcEFkCQlQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgICBwTUlDS2V5CQlwb2ludGVyIHRvIE1JQyBLZXkKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBSVE1QVGtpcFNldE1JQ0tleSgKLQlJTglQVEtJUF9LRVlfSU5GTwlwVGtpcCwKLQlJTglQVUNIQVIJCQlwTUlDS2V5KQotewotCS8vIFNldCB0aGUga2V5Ci0JcFRraXAtPkswID0gUlRNUFRraXBHZXRVSW50MzIocE1JQ0tleSk7Ci0JcFRraXAtPksxID0gUlRNUFRraXBHZXRVSW50MzIocE1JQ0tleSArIDQpOwotCS8vIGFuZCByZXNldCB0aGUgbWVzc2FnZQotCXBUa2lwLT5MID0gcFRraXAtPkswOwotCXBUa2lwLT5SID0gcFRraXAtPksxOwotCXBUa2lwLT5uQnl0ZXNJbk0gPSAwOwotCXBUa2lwLT5NID0gMDsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUJRGVzY3JpcHRpb246Ci0JCUNhbGN1bGF0ZSB0aGUgTUlDIFZhbHVlLgotCi0JQXJndW1lbnRzOgotICAgICAgcEFkCQlQb2ludGVyIHRvIG91ciBhZGFwdGVyCi0gICAgICB1Q2hhcgkJCUF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E0ICovCi0KLQl9Ci0KLQlpZiAocWNfZXhpc3RzICYmICghYTRfZXhpc3RzKSkKLQl7Ci0JCW1pY19oZWFkZXIyWzhdID0gbXBkdVsyNF0gJiAweDBmOyAvKiBtdXRlIGJpdHMgMTUgLSA0ICovCi0JCW1pY19oZWFkZXIyWzldID0gbXBkdVsyNV0gJiAweDAwOwotCX0KLQotCWlmIChxY19leGlzdHMgJiYgYTRfZXhpc3RzKQotCXsKLQkJZm9yIChpPTA7aTw2O2krKykgbWljX2hlYWRlcjJbOCtpXSA9IG1wZHVbMjQraV07ICAgLyogQTQgKi8KLQotCQltaWNfaGVhZGVyMlsxNF0gPSBtcGR1WzMwXSAmIDB4MGY7Ci0JCW1pY19oZWFkZXIyWzE1XSA9IG1wZHVbMzFdICYgMHgwMDsKLQl9Ci19Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIGNvbnN0cnVjdF9taWNfaXYoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBCdWlsZHMgdGhlIE1JQyBJViBmcm9tIGhlYWRlciBmaWVsZHMgYW5kIFBOICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZCBjb25zdHJ1Y3RfbWljX2l2KAotCXVuc2lnbmVkIGNoYXIgKm1pY19pdiwKLQlpbnQgcWNfZXhpc3RzLAotCWludCBhNF9leGlzdHMsCi0JdW5zaWduZWQgY2hhciAqbXBkdSwKLQl1bnNpZ25lZCBpbnQgcGF5bG9hZF9sZW5ndGgsCi0JdW5zaWduZWQgY2hhciAqcG5fdmVjdG9yKQotewotCWludCBpOwotCi0JbWljX2l2WzBdID0gMHg1OTsKLQlpZiAocWNfZXhpc3RzICYmIGE0X2V4aXN0cykKLQkJbWljX2l2WzFdID0gbXBkdVszMF0gJiAweDBmOyAgICAvKiBRb1NfVEMgICAgICAgICAgICovCi0JaWYgKHFjX2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yIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICo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gICAgICAgUG9pbnRlciB0byBBUkNGT1VSIENPTlRFWFQgKFNCT1gpCi0JCXBEZXN0CQkJUG9pbnRlciB0byB0aGUgRGVzdGluYXRpb24KLQkJcFNyYyAgICAgICAgUG9pbnRlciB0byB0aGUgU291cmNlIGRhdGEKLQkJTGVuICAgICAgICAgSW5kaWNhdGUgdGhlIGxlbmd0aCBvZiB0aGUgU291cmNlIGRhdGEKLQotCVJldHVybiBWYWx1ZToKLQkJTm9uZQotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJQVJDRk9VUl9ERUNSWVBUKAotCUlOCVBBUkNGT1VSQ09OVEVYVAlDdHgsCi0JSU4JUFVDSEFSCQkJcERlc3QsCi0JSU4JUFVDSEFSCQkJcFNyYywKLQlJTglVSU5UCQkJTGVuKQotewotCVVJTlQgaTsKLQotCWZvciAoaSA9IDA7IGkgPCBMZW47IGkrKykKLQkJcERlc3RbaV0gPSBwU3JjW2ldIF4gQVJDRk9VUl9CWVRFKEN0eCk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lCURlc2NyaXB0aW9uOgotCQlUaGUgU3RyZWFtIENpcGhlciBFbmNyeXB0aW9uIEFsZ29yaXRobQotCi0JQXJndW1lbnRzOgotCQlDdHggICAgICAgICBQb2ludGVyIHRvIEFSQ0ZPVVIgQ09OVEVYVCAoU0JPWCkKLQkJcERlc3QJCQlQb2ludGVyIHRvIHRoZSBEZXN0aW5hdGlvbgotCQlwU3JjICAgICAgICBQb2ludGVyIHRvIHRoZSBTb3VyY2UgZGF0YQotCQlMZW4gICAgICAgICBJbmRpY2F0ZSB0aGUgbGVuZ3RoIG9mIHRoZSBTb3VyY2UgZHRhCi0KLQlSZXR1cm4gVmFsdWU6Ci0JCU5vbmUKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJQVJDRk9VUl9FTkNSWVBUKAotCUlOCVBBUkNGT1VSQ09OVEVYVAlDdHgsCi0JSU4JUFVDSEFSCQkJcERlc3QsCi0JSU4JUFVDSEFSCQkJcFNyYywKLQlJTglVSU5UCQkJTGVuKQotewotCVVJTlQgaTsKLQotCWZvciAoaSA9IDA7IGkgPCBMZW47IGkrKykKLQkJcERlc3RbaV0gPSBwU3JjW2ldIF4gQVJDRk9VUl9CWVRFKEN0eCk7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lCURlc2NyaXB0aW9uOgotCQlUaGUgU3RyZWFtIENpcGhlciBFbmNyeXB0aW9uIEFsZ29yaXRobSB3aGljaCBjb25mb3JtIHRvIHRoZSBzcGVjaWFsIHJlcXVpcmVtZW50IHRvIGVuY3J5cHQgIEdUSy4KLQotCUFyZ3VtZW50czoKLQkJQ3R4ICAgICAgICAgUG9pbnRlciB0byBBUkNGT1VSIENPTlRFWFQgKFNCT1gpCi0JCXBEZXN0CQkJUG9pbnRlciB0byB0aGUgRGVzdGluYXRpb24KLQkJcFNyYyAgICAgICAgUG9pbnRlciB0byB0aGUgU291cmNlIGRhdGEKLQkJTGVuICAgICAgICAgSW5kaWNhdGUgdGhlIGxlbmd0aCBvZiB0aGUgU291cmNlIGR0YQotCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0KLVZPSUQJV1BBQVJDRk9VUl9FTkNSWVBUKAotCUlOCVBBUkNGT1VSQ09OVE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ydDMwNzAvY29tbW9uL3J0dXNiX2J1bGsuYwppbmRleCAxYTA1NzAzLi43NjJlY2ZlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnQzMDcwL2NvbW1vbi9ydHVzYl9idWxrLmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0MzA3MC9jb21tb24vcnR1c2JfYnVsay5jCkBAIC0xLDEzODIgKzEgQEAKLS8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmFsaW5rIFRlY2ggSW5jLgotICogNUYuLCBOby4zNiwgVGFpeXVhbiBTdC4sIEpodWJlaSBDaXR5LAotICogSHNpbmNodSBDb3VudHkgMzAyLAotICogVGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JcnR1c2JfYnVsay5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJV2hhdAotCS0tLS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hbHVlOgotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJUlRVU0JDbGVhblVwRGF0YUJ1bGtPdXRRdWV1ZSgKLQlJTglQUlRNUF9BREFQVEVSCXBBZCkKLXsKLQlVQ0hBUgkJCUlkeDsKLQlQSFRfVFhfQ09OVEVYVAlwVHhDb250ZXh0OwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiLS0tPkNsZWFuVXBEYXRhQnVsa091dFF1ZXVlXG4iKSk7Ci0KLQlmb3IgKElkeCA9IDA7IElkeCA8IDQ7IElkeCsrKQotCXsKLQkJcFR4Q29udGV4dCA9ICZwQWQtPlR4Q29udGV4dFtJZHhdOwotCi0JCXBUeENvbnRleHQtPkN1cldyaXRlUG9zaXRpb24gPSBwVHhDb250ZXh0LT5OZXh0QnVsa091dFBvc2l0aW9uOwotCQlwVHhDb250ZXh0LT5MYXN0T25lID0gRkFMU0U7Ci0JCU5kaXNBY3F1aXJlU3BpbkxvY2soJnBBZC0+QnVsa091dExvY2tbSWR4XSk7Ci0JCXBBZC0+QnVsa091dFBlbmRpbmdbSWR4XSA9IEZBTFNFOwotCQlOZGlzUmVsZWFzZVNwaW5Mb2NrKCZwQWQtPkJ1bGtPdXRMb2NrW0lkeF0pOwotCX0KLQotCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIjwtLS1DbGVhblVwRGF0YUJ1bGtPdXRRdWV1ZVxuIikpOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lECVJUVVNCQ2xlYW5VcE1MTUVCdWxrT3V0UXVldWUoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQpCi17Ci0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiLS0tPkNsZWFuVXBNTE1FQnVsa091dFF1ZXVlXG4iKSk7Ci0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiPC0tLUNsZWFuVXBNTE1FQnVsa091dFF1ZXVlXG4iKSk7Ci19Ci0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0KLQlBcmd1bWVudHM6Ci0KLQlSZXR1cm4gVmFsdWU6Ci0KLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lECVJUVVNCQ2FuY2VsUGVuZGluZ0lSUHMoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQpCi17Ci0JUlRVU0JDYW5jZWxQZW5kaW5nQnVsa0luSVJQKHBBZCk7Ci0JUlRVU0JDYW5jZWxQZW5kaW5nQnVsa091dElSUChwQWQpOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lECVJUVVNCQ2FuY2VsUGVuZGluZ0J1bGtJbklSUCgKLQlJTglQUlRN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ZHJpdmVycy9zdGFnaW5nL3J0MzA3MC9jb21tb24vcnR1c2JfZGF0YS5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydDMwNzAvY29tbW9uL3J0dXNiX2RhdGEuYwpAQCAtMSwyMTggKzEgQEAKLS8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmFsaW5rIFRlY2ggSW5jLgotICogNUYuLCBOby4zNiwgVGFpeXVhbiBTdC4sIEpodWJlaSBDaXR5LAotICogSHNpbmNodSBDb3VudHkgMzAyLAotICogVGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JcnR1c2JfZGF0YS5jCi0KLQlBYnN0cmFjdDoKLQlSYWxpbmsgVVNCIGRyaXZlciBUeC9SeCBmdW5jdGlvbnMuCi0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotCS0tLS0tLS0tICAgIC0tLS0tL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ibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIAlNb2R1bGUgTmFtZToKLQlydHVzYl9pby5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkgICAgV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0gIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlOYW1lCQlEYXRlCSAgICBNb2RpZmljYXRpb24gbG9ncwotCVBhdWwgTGluICAgIDA2LTI1LTIwMDQgIGNyZWF0ZWQKLSovCi0KLSNpbmNsdWRlCSIuLi9ydF9jb25maWcuaCIKLQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjogTklDIGluaXRpYWxpemF0aW9uIGNvbXBsZXRlCi0KLQlBcmd1bWVudHM6Ci0KLQlSZXR1cm4gVmFsdWU6Ci0KLQlJUlFMID0KLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0KLU5UU1RBVFVTCVJUVVNCRmlybXdhcmVSdW4oCi0JSU4JUFJUTVBfQURBUFRFUglwQWQpCi17Ci0JTlRTVEFUVVMJU3RhdHVzOwotCi0JU3RhdHVzID0gUlRVU0J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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246IFdyaXRlIDMyLWJpdCBNQUMgcmVnaXN0ZXIKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCUlSUUwgPQotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLU5UU1RBVFVTCVJUVVNCV3JpdGVNQUNSZWdpc3RlcigKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglVU0hPUlQJCQlPZmZzZXQsCi0JSU4JVUlOVDMyCQkJVmFsdWUpCi17Ci0JTlRTVEFUVVMJU3RhdHVzOwotCVVJTlQzMgkJbG9jYWxWYWw7Ci0KLQlsb2NhbFZhbCA9IFZhbHVlOwotCi0JU3RhdHVzID0gUlRVU0JTaW5nbGVXcml0ZShwQWQsIE9mZnNldCwgKFVTSE9SVCkobG9jYWxWYWwgJiAweGZmZmYpKTsKLQlTdGF0dXMgPSBSVFVTQlNpbmdsZVdyaXRlKHBBZCwgT2Zmc2V0ICsgMiwgKFVTSE9SVCkoKGxvY2FsVmFsICYgMHhmZmZmMDAwMCkgPj4gMTYpKTsKLQotCXJldHVybiBTdGF0dXM7Ci19Ci0KLQotCi0jaWYgMQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246IFJlYWQgOC1iaXQgQkJQIHJlZ2lzdGVyCi0KLQlBcmd1bWVudHM6Ci0KLQlSZXR1cm4gVmFsdWU6Ci0KLQlJUlFMID0KLQotCU5vdGU6Ci0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1OVFNUQVRVUwlS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UpOwotCi0JcmV0dXJuIFNUQVRVU19TVUNDRVNTOwotfQotCi0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCi0JQXJndW1lbnRzOgotCi0JUmV0dXJuIFZhbHVlOgotCi0JSVJRTCA9Ci0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotTlRTVEFUVVMJUlRVU0JSZWFkRUVQUk9NKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVVTSE9SVAkJCU9mZnNldCwKLQlPVVQJUFVDSEFSCQkJcERhdGEsCi0JSU4JVVNIT1JUCQkJbGVuZ3RoKQotewotCU5UU1RBVFVTCVN0YXR1cyA9IFNUQVRVU19TVUNDRVNTOwotCi0jaWZkZWYgUlQzMHh4Ci0JaWYocEFkLT5iVXNlRWZ1c2UpCi0JewotCQlTdGF0dXMgPWVGdXNlUmVhZChwQWQsIE9mZnNldCwgcERhdGEsIGxlbmd0aCk7Ci0JfQotCWVsc2UKLSNlbmRpZiAvLyBSVDMweHggLy8KLQl7Ci0JU3RhdHVzID0gUlRVU0JfVmVuZG9yUmVxdWVzdCgKLQkJcEFkLAotCQkoVVNCRF9UUkFOU0ZFUl9ESVJFQ1RJT05fSU4gfCBVU0JEX1NIT1JUX1RSQU5TRkVSX09LKSwKLQkJREVWSUNFX1ZFTkRPUl9SRVFVRVNUX0lOLAotCQkweDksCi0JCTAsCi0JCU9mZnNldCwKLQkJcERhdGEsCi0JCWxlbmd0aCk7Ci0JfQotCi0JcmV0dXJuIFN0YXR1czsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotC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T09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFJUVVNCUHV0VG9TbGVlcCgKLQlJTglQUlRNUF9BREFQVEVSCXBBZCkKLXsKLQlVSU5UMzIJCXZhbHVlOwotCi0JLy8gVGltZW91dCAweDQwIHggNTB1cwotCXZhbHVlID0gKFNMRUVQQ0lEPDwxNikrKE9XTkVSTUNVPDwyNCkrICgweDQwPDw4KSsxOwotCVJUVVNCV3JpdGVNQUNSZWdpc3RlcihwQWQsIDB4NzAxMCwgdmFsdWUpOwotCVJUVVNCV3JpdGVNQUNSZWdpc3RlcihwQWQsIDB4NDA0LCAweDMwKTsKLQkvL1JUTVBfU0VUX0ZMQUcocEFkLCBmUlRNUF9BREFQVEVSX0hBTFRfSU5fUFJPR1JFU1MpOwotCURCR1BSSU5UX1JBVyhSVF9ERUJVR19FUlJPUiwgKCJTbGVlcCBNYWlsYm94IHRlc3R2YWx1ZSAleFxuIiwgdmFsdWUpKTsKLQotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCUlSUUwgPQotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLU5UU1RBVFVTIFJUVVNCV2FrZVVwKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkKQotewotCU5UU1RBVFVTCVN0YXR1czsKLQotCVN0YXR1cyA9IFJUVVNCX1ZlbmRvclJlcXVlc3QoCi0JCXBBZCwKLQkJVVNCRF9UUkFOU0ZFUl9ESVJFQ1RJT05fT1VULAotCQlERVZJQ0VfVkVORE9SX1JFUVVFU1RfT1VULAotCQkweDAxLAotCQkweDA5LAotCQkwLAotCQlOVUxMLAotCQkwKTsKLQotCXJldHVybiBTdGF0dXM7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCi0JQXJndW1lbnRzOgotCi0JUmV0dXJuIFZhbHVlOgotCi0JSVJRTCA9Ci0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRAlSVFVTQkluaXRpYWxpemVDbWRRKAotCUlOCVBDbWRRCWNtZHEpCi17Ci0JY21kcS0+aGVhZCA9IE5VTEw7Ci0JY21kcS0+dGFpbCA9IE5VTEw7Ci0JY21kcS0+c2l6ZSA9IDA7Ci0JY21kcS0+Q21kUVN0YXRlID0gUlQyODcwX1RIUkVBRF9JTklURUQ7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLQlSb3V0aW5lIERlc2NyaXB0aW9uOgotCi0JQXJndW1lbnRzOgotCi0JUmV0dXJuIFZhbHVlOgotCi0JSVJRTCA9Ci0KLQlOb3RlOgotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotTkRJU19TVEFUVVMJUlRVU0JFbnF1ZXVlQ21kRnJvbU5kaXMoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JTkRJU19PSUQJCU9pZCwKLQlJTglCT09MRUFOCQkJU2V0SW5mb3JtYXRpb24sCi0JSU4JUFZPSUQJCQlwSW5mb3JtYXRpb25CdWZmZXIsCi0JSU4JVUlOVDMyCQkJSW5mb3JtYXRpb25CdWZmZXJMZW5ndGgpCi17Ci0JTkRJU19TVEFUVVMJc3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G10LCBzaXplb2YoQ21kUUVsbXQpLCAwKTsKLQkJfQotCQllbHNlCi0JCVJUVVNCQ01EVXAocEFkKTsKLQl9Ci0JcmV0dXJuKE5ESVNfU1RBVFVTX1NVQ0NFU1MpOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQotCUFyZ3VtZW50czoKLQotCVJldHVybiBWYWx1ZToKLQotCUlSUUwgPQotCi0JTm90ZToKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQJUlRVU0JEZXF1ZXVlQ21kKAotCUlOCVBDbWRRCQljbWRxLAotCU9VVAlQQ21kUUVsbXQJKnBjbWRxZWxtdCkKLXsKLQkqcGNtZHFlbG10ID0gY21kcS0+aGVhZDsKLQotCWlmICgqcGNtZHFlbG10ICE9IE5VTEwpCi0JewotCQljbWRxLT5oZWFkID0gY21kcS0+aGVhZC0+bmV4dDsKLQkJY21kcS0+c2l6ZS0tOwotCQlpZiAoY21kcS0+c2l6ZSA9PSAwKQotCQkJY21kcS0+dGFpbCA9IE5VTEw7Ci0JfQotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCSAgdXNiX2NvbnRyb2xfbXNnIC0gQnVpbGRzIGEgY29udHJvbCB1cmIsIHNlbmRzIGl0IG9mZiBhbmQgd2FpdHMgZm9yIGNvbXBsZXRpb24KLQkgIEBkZXY6IHBvaW50ZXIgdG8gdGhlIHVzYiBkZXZpY2UgdG8gc2VuZCB0aGUgbWVzc2FnZSB0bwotCSAgQHBpcGU6IGVuZHBvaW50ICJwaXBlIiB0byBzZW5kIHRoZSBtZXNzYWdlIHRvCi0JICBAcmV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hvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotCWFjdGlvbi5jCi0KLSAgICBBYnN0cmFjdDoKLSAgICBIYW5kbGUgYXNzb2NpYXRpb24gcmV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CX0KLQkJCQlicmVhazsKLQkJCX0KLQotCQkJcFByZXZFbnRyeSA9IHBQcm9iZUVudHJ5OwotCQkJcFByb2JlRW50cnkgPSBwUHJvYmVFbnRyeS0+cE5leHQ7Ci0JCX0gd2hpbGUgKHBQcm9iZUVudHJ5KTsKLQotCQlOZGlzWmVyb01lbW9yeShwRW50cnksIHNpemVvZihUUENfUkVRX0VOVFJZKSk7Ci0JCXBUYWItPlNpemUtLTsKLQotCQlSVE1QX1NFTV9VTkxPQ0soJnBBZC0+Q29tbW9uQ2ZnLlRwY1JlcVRhYkxvY2spOwotCX0KLQotCXJldHVybjsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlHZXQgQ3VycmVudCBUaW1lUyB0YW1wLgotCi0JUGFyYW1ldHJzOgotCi0JUmV0dXJuCTogQ3VycmVudCBUaW1lIFN0YW1wLgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLXN0YXRpYyBVSU5UNjQgR2V0Q3VycmVudFRpbWVTdGFtcCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQkvLyBnZXQgY3VycmVudCB0aW1lIHN0YW1wLgotCXJldHVybiAwOwotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCUdldCBDdXJyZW50IFRyYW5zbWl0IFBvd2VyLgotCi0JUGFyYW1ldHJzOgotCi0JUmV0dXJuCTogQ3VycmVudCBUaW1lIFN0YW1wLgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0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gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotICAgIGRmcy5oCi0KLSAgICBBYnN0cmFjdDoKLSAgICBTdXBwb3J0IERGUyBmdW5jdGlvbi4KLQotICAgIFJldmlzaW9uIEhpc3Rvcnk6Ci0gICAgV2hvICAgICAgIFdoZW4gICAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gIC0tLS0tLS0tLS0gICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gICAgRm9uY2hpICAgIDAzLTEyLTIwMDcgICAgICBjcmVhdGVkCi0qLwotCi0jZGVmaW5lIFJBREFSX1BVTFNFIDEKLSNkZWZpbmUgUkFEQVJfV0lEVEggMgotCi0jZGVmaW5lIFdJRFRIX1JEX0lETEUgMAotI2RlZmluZSBXSURUSF9SRF9DSEVDSyAxCi0KLQotVk9JRCBCYnBSYWR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saXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC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gICAgICAgICAgICAgICAgICAgMzcKLSNkZWZpbmUgTEVBUF9NU0cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzgKLS8vISBhc3NvYyBzdGF0ZS1tYWNoaW5lIHN0YXRlcwotI2RlZmluZSBMRUFQX0lETEUgICAgICAgICAgICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIExFQVBfV0FJVF9JREVOVElUWV9SRVFVRVNUICAgICAgICAgIDEKLSNkZWZpbmUgTEVBUF9XQUlUX0NIQU5MTEVOR0VfUkVRVUVTVCAgICAgICAgMgotI2RlZmluZSBMRUFQX1dBSVRfU1VDQ0VTUyAgICAgICAgICAgICAgICAgICAzCi0jZGVmaW5lIExFQVBfV0FJVF9DSEFOTExFTkdFX1JFU1BPTlNFICAgICAgIDQKLSNkZWZpbmUgTEVBUF9XQUlUX0VBUE9MS0VZICAgICAgICAgICAgICAgICAgNQotCi0jZGVmaW5lIExFQVBfUkVBU09OX0lOVkFMSURfQVVUSCAgICAgICAgICAgICAgICAgICAgMHgwMQotI2RlZmluZSBMRUFQX1JFQVNPTl9BVVRIX1RJTUVPVVQgICAgICAgICAgICAgICAgICAgIDB4MDIKLSNkZWZpbmUgTEVBUF9SRUFTT05fQ0hBTExFTkdFX0ZST01fQVBfRkFJTEVEICAgICAgICAweDAzCi0jZGVmaW5lIExFQVBfUkVBU09OX0NIQUxMRU5HRV9UT19BUF9GQUlMRUQgICAgICAgICAgMHgwNAotCi0jZGVmaW5lIENJU0NPX0F1dGhNb2RlTEVBUCAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAotI2RlZmluZSBDSVNDT19BdXRoTW9kZUxFQVBOb25lICAgICAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgTEVBUF9BVVRIX1RJTUVPVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDAwMAotI2RlZmluZSBMRUFQX0NIQUxMRU5HRV9SRVNQT05TRV9MRU5HVEggICAgICAgICAgICAgIDI0Ci0jZGVmaW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RlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2lmbmRlZiBfX0xJTktfTElTVF9IX18KLSNkZWZpbmUgX19MSU5LX0xJU1RfSF9fCi0KLXR5cGVkZWYgc3RydWN0IF9MSVNUX0VOVFJZCi17Ci0Jc3RydWN0IF9MSVNUX0VOVFJZICpwTmV4dDsKLX0gTElTVF9FTlRSWSwgKlBMSVNUX0VOVFJZOwotCi10eXBlZGVmIHN0cnVjdCBfTElTVF9IRUFEUgotewotCVBMSVNUX0VOVFJZIHBIZWFkOwotCVBMSVNUX0VOVFJZIHBUYWlsOwotCVVDSEFSIHNpemU7Ci19IExJU1RfSEVBREVSLCAqUExJU1RfSEVBREVSOwotCi1zdGF0aWMgaW5saW5lIFZPSUQgaW5pdExpc3QoCi0JSU4gUExJU1RfSEVBREVSIHBMaXN0KQotewotCXBMaXN0LT5wSGVhZCA9IHBMaXN0LT5wVGFpbCA9IE5VTEw7Ci0JcExpc3QtPnNpemUgPSAwOwotCXJldHVybjsKLX0KLQotc3RhdGljIGlubGluZSBWT0lEIGluc2VydFRhaWxMaXN0KAotCUlOIFBMSVNUX0hFQURFUiBwTGlzdCwKLQlJTiBQTElTVF9FTlRSWSBwRW50cnkpCi17Ci0JcEVudHJ5LT5wTmV4dCA9IE5VTEw7Ci0JaWYgKHBMaXN0LT5wVGFpbCkKLQkJcExpc3QtPnBUYWlsLT5wTmV4dCA9IHBFbnRyeTsKLQllbHNlCi0JCXBMaXN0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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JbWQ1LmgKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlOYW1lCQlEYXRlCQkJTW9kaWZpY2F0aW9uIGxvZ3MKLQlqYW4JCQkxMC0yOC0wMwkJSW5pdGlhbAotCVJpdGEgICAgCTExLTIzLTA0CQlNb2RpZnkgTUQ1IGFuZCBTSEEtMQotKi8KLQotI2lmbmRlZgl1aW50OAotI2RlZmluZQl1aW50OCAgdW5zaWduZWQJY2hhcgotI2VuZGlmCi0KLSNpZm5kZWYJdWludDMyCi0jZGVmaW5lCXVpbnQzMiB1bnNpZ25lZAlsb25nIGludAotI2VuZGlm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IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZ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i0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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RORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCW9pZC5oCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JTmFtZQkJRGF0ZQkJCU1vZGlmaWNhdGlvbiBsb2dzCi0qLwotI2lmbmRlZiBfT0lEX0h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4KLSAgICBVQ0hBUiAgIFNzaWRbTkRJU184MDJfMTFfTEVOR1RIX1NTSURdOyAgICAgICAgICAgLy8gU1NJRCBpbmZvcm1hdGlvbiBmaWVsZAotfSBORElTXzgwMl8xMV9TU0lELCAqUE5ESVNfODAyXzExX1NTSUQ7Ci0KLQotdHlwZWRlZiBzdHJ1Y3QgUEFDS0VEIF9ORElTX1dMQU5fQlNTSUQKLXsKLSAgIFVMT05HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExlbmd0aDsgICAgIC8vIExlbmd0aCBvZiB0aGlzIHN0cnVjdHVyZQotICAgTkRJU184MDJfMTFfTUFDX0FERFJFU1MgICAgICAgICAgICAgTWFjQWRkcmVzczsgLy8gQlNTSUQKLSAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkWzJdOwotICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZDsgICAgICAgLy8gU1NJRAotICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJpdmFjeTsgICAgLy8gV0VQIGVuY3J5cHRpb24gcmVxdWlyZW1lbnQKLSAgIE5ESVNfODAyXzExX1JTU0kgICAgICAgICAgICAgICAgICAgIFJzc2k7ICAgICAgIC8vIHJlY2VpdmUgc2lnbmFsIHN0cmVuZ3RoIGluIGRCbQotICAgTkRJU184MDJfMTFfTkVUV09SS19UWVBFICAgICAgICAgICAgTmV0d29ya1R5cGVJblVzZTsKLSAgIE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04gICAgICAgICAgIENvbmZpZ3VyYXRpb247Ci0gICBORElTXzgwMl8xMV9ORVRXT1JLX0lORlJBU1RSVUNUVVJFICBJbmZyYXN0cnVjdHVyZU1vZGU7Ci0gICBORElTXzgwMl8xMV9SQVRFUyAgICAgICAgICAgICAgICAgICBTdXBwb3J0ZWRSYXRlczsKLX0gTkRJU19XTEFOX0JTU0lELCAqUE5ESVNfV0xBTl9CU1NJRDsKLQotdHlwZWRlZiBzdHJ1Y3QgUEFDS0VEIF9ORElTXzgwMl8xMV9CU1NJRF9MSVNUCi17Ci0gICBVSU5UICAgICAgICAgICBOdW1iZXJPZkl0ZW1zOyAgICAgIC8vIGluIGxpc3QgYmVsb3csIGF0IGxlYXN0IDEKLSAgIE5ESVNfV0xBTl9CU1NJRCBCc3NpZFsxXTsKLX0gTkRJU184MDJfMTFfQlNTSURfTElTVCwgKlBORElTXzgwMl8xMV9CU1NJRF9MSVNUOwotCi0vLyBBZGRlZCBDYXBhYmlsaXRpZXMsIElFTGVuZ3RoIGFuZCBJRXMgZm9yIGVhY2ggQlNTSUQKLXR5cGVkZWYgc3RydWN0IFBBQ0tFRCBfTkRJU19XTEFOX0JTU0lEX0VYCi17Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTGVuZ3RoOyAgICAgICAgICAgICAvLyBMZW5ndGggb2YgdGhpcyBzdHJ1Y3R1cmUKLSAgICBORElTXzgwMl8xMV9NQUNfQUREUkVTUyAgICAgICAgICAgICBNYWNBZGRyZXNzOyAgICAgICAgIC8vIEJTU0lECi0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWRbMl07Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZDsgICAgICAgICAgICAgICAvLyBTU0lECi0gICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJpdmFjeTsgICAgICAgICAgICAvLyBXRVAgZW5jcnlwdGlvbiByZXF1aXJlbWVudAotICAgIE5ESVNfODAyXzExX1JTU0kgICAgICAgICAgICAgICAgICAgIFJzc2k7ICAgICAgICAgICAgICAgLy8gcmVjZWl2ZSBzaWduYWwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0cmVuZ3RoIGluIGRCbQotICAgIE5ESVN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lICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqLwotCi0jaWZuZGVmIF9fUlQyODcwX0hfXwotI2RlZmluZSBfX1JUMjg3MF9IX18KLQotLy91c2IgaGVhZGVyIGZpbGVzCi0jaW5jbHVkZSA8bGludXgvdXNiLmg+Ci0KLS8qIHJ0bXBfZGVmLmggKi8KLS8vCi0jaWYgTElOVVhfVkVSU0lPTl9DT0RFID49IEtFUk5FTF9WRVJTSU9OKDIsNSwwKQotI2RlZmluZSBCVUxLQUdHUkVfWklTRSAgICAgICAgICAxMDAKLSNkZWZpbmUgUlQyOFhYX0RSVkRBVEFfU0VUKF9hKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzYl9zZXRfaW50ZmRhdGEoX2EsIHBBZCk7Ci0jZGVmaW5lIFJUMjhYWF9QVVRfREVWSUNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2JfcHV0X2RldgotI2RlZmluZSBSVFVTQl9BTExPQ19VUkIoaXNvKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNiX2FsbG9jX3VyYihpc28s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BDTURUSFJFQURfVkVORE9SX1dSSVRFX1JGICAgICAgICAgICAgICAgICAgIDB4MEQ3MzAxMUEJLy8gY21kCi0jZGVmaW5lIENNRFRIUkVBRF9WRU5ET1JfRkxJUF9JUSAgICAgICAgICAgICAgICAgICAgMHgwRDczMDExRAkvLyBjbWQKLSNkZWZpbmUgQ01EVEhSRUFEX1JFU0VUX0JVTEtfT1VUICAgICAgICAgICAgICAgICAgICAweDBENzMwMjEwCS8vIGNtZAotI2RlZmluZSBDTURUSFJFQURfUkVTRVRfQlVMS19JTiAgICAgICAgICAgICAgICAgICAgIDB4MEQ3MzAyMTEJLy8gY21kCi0jZGVmaW5lIENNRFRIUkVBRF9TRVRfUFNNX0JJVF9TQVZFICAgICAgICAgICAgICAgICAgMHgwRDczMDIxMgkvLyBjbWQKLSNkZWZpbmUgQ01EVEhSRUFEX1NFVF9SQURJTyAgICAgICAgICAgICAgICAgICAgICAgICAweDBENzMwMjE0CS8vIGNtZAotI2RlZmluZSBDTURUSFJFQURfVVBEQVRFX1RYX1JBVEUgICAgICAgICAgICAgICAgICAgIDB4MEQ3MzAyMTYJLy8gY21kCi0jZGVmaW5lIENNRFRIUkVBRF84MDJfMTFfQUREX0tFWV9XRVAgICAgICAgICAgICAgICAgMHgwRDczMDIxOAkvLyBjbWQKLSNkZWZpbmUgQ01EVEhSRUFEX1JFU0VUX0ZST01fRVJST1IgICAgICAgICAgICAgICAgICAweDBENzMwMjFBCS8vIGNtZAotI2RlZmluZSBDTURUSFJFQURfTElOS19ET1dOICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEQ3MzAyMUIJLy8gY21kCi0jZGVmaW5lIENNRFRIUkVBRF9SRVNFVF9GUk9NX05ESVMgICAgICAgICAgICAgICAgICAgMHgwRDczMDIxQwkvLyBjbWQKLSNkZWZpbmUgQ01EVEhSRUFEX0NIRUNLX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAweDBENzMwMjE1CS8vIGNtZAotI2RlZmluZSBDTURUSFJF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gICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVs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ZpZ3VyZQotI2RlZmluZSBCQlBfUjMgICAgICAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBCQlBfUjQgICAgICAgICAgICAgICAgICAgICAgNAotI2RlZmluZSBCQlBfUjUgICAgICAgICAgICAgICAgICAgICAgNQotI2RlZmluZSBCQlBfUjYgICAgICAgICAgICAgICAgICAgICAgNgotI2RlZmluZQlCQlBfUjE0CQkJICAgICAgICAgICAgMTQgLy8gUlggY29uZmlndXJlCi0jZGVmaW5lIEJCUF9SMTYgICAgICAgICAgICAgICAgICAgICAxNgotI2RlZmluZSBCQlBfUjE3ICAgICAgICAgICAgICAgICAgICAgMTcgLy8gUlggc2Vuc2liaWxpdHkKLSNkZWZpbmUgQkJQX1IxOCAgICAgICAgICAgICAgICAgICAgIDE4Ci0jZGVmaW5lIEJCUF9SMjEgICAgICAgICAgICAgICAgICAgICAyMQotI2RlZmluZSBCQlBfUjIyICAgICAgICAgICAgICAgICAgICAgMjIKLSNkZWZpbmUgQkJQX1IyNCAgICAgICAgICAgICAgICAgICAgIDI0Ci0jZGVmaW5lIEJCUF9SMjUgICAgICAgICAgICAgICAgICAgICAyNQotI2RlZmluZSBCQlBfUjMxICAgICAgICAgICAgICAgICAgICAgMzEKLSNkZWZpbmUgQkJQX1I0OSAgICAgICAgICAgICAgICAgICAgIDQ5IC8vVFNTSQotI2RlZmluZSBCQlBfUjUwICAgICAgICAgICAgICAgICAgICAgNTAKLSNkZWZpbmUgQkJQX1I1MSAgICAgICAgICAgICAgICAgICAgIDUxCi0jZGVmaW5lIEJCUF9SNTIgICAgICAgICAgICAgICAgICAgICA1MgotI2RlZmluZSBCQlBfUjU1ICAgICAgICAgICAgICAgICAgICAgNTUKLSNkZWZpbmUgQkJQX1I2MiAgICAgICAgICAgICAgICAgICAgIDYyIC8vIFJ4IFNRMCBUaHJlc2hvbGQgSElHSAotI2RlZmluZSBCQlBfUjYzICAgICAgICAgICAgICAgICAgICAgNjMKLSNkZWZpbmUgQkJQX1I2NCAgICAgICAgICAgICAgICAgICAgIDY0Ci0jZGVmaW5lIEJCUF9SNjUgICAgICAgICAgICAgICAgICAgICA2NQotI2RlZmluZSBCQlBfUjY2ICAgICAgICAgICAgICAgICAgICAgNjYKLSNkZWZpbmUgQkJQX1I2NyAgICAgICAgICAgICAgICAgICAgIDY3Ci0jZGVmaW5lIEJCUF9SNjggICAgICAgICAgICAgICAgICAgICA2OAotI2RlZmluZSBCQlBfUjY5ICAgICAgICAgICAgICAgICAgICAgNjkKLSNkZWZpbmUgQkJQX1I3MCAgICAgICAgICAgICAgICAgICAgIDcwIC8vIFJ4IEFHQyBTUSBDQ0sgWGNvcnIgdGhyZXNob2xkCi0jZGVmaW5lIEJCUF9SNzMgICAgICAgICAgICAgICAgICAgICA3MwotI2RlZmluZSBCQlBfUjc1CQkJCQkJNzUKLSNkZWZpbmUgQkJQX1I3NyAgICAgICAgICAgICAgICAgICAgIDc3Ci0jZGVmaW5lIEJCUF9SNzkgICAgICAgICAgICAgICAgICAgICA3OQotI2RlZmluZSBCQlBfUjgwICAgICAgICAgICAgICAgICAgICAgODAKLSNkZWZpbmUgQkJQX1I4MSAgICAgICAgICAgICAgICAgICAgIDgxCi0jZGVmaW5lIEJCUF9SODIgICAgICAgICAgICAgICAgICAgICA4MgotI2RlZmluZSBCQlBfUjgzICAgICAgICAgICAgICAgICAgICAgODMKLSNkZWZpbmUgQkJQX1I4NCAgICAgICAgICAgICAgICAgICAgIDg0Ci0jZGVmaW5lIEJCUF9SODYJCQkJCQk4NgotI2RlZmluZSBCQlBfUjkxCQkJCQkJOTEKLSNkZWZpbmUgQkJQX1I5MgkJCQkJCTkyCi0jZGVmaW5lIEJCUF9SOTQgICAgICAgICAgICAgICAgICAgICA5NCAvLyBUeCBHYWluIENvbnRyb2wKLSNkZWZpbmUgQkJQX1IxMDMgICAgICAgICAgICAgICAgICAgIDEwMwotI2RlZmluZSBCQlBfUjEwNSAgICAgICAgICAgICAgICAgICAgMTA1Ci0jZGVmaW5lIEJCUF9SMTEzICAgICAgICAgICAgICAgICAgICAxMTMKLSNkZWZpbmUgQkJQX1IxMTQgICAgICAgICAgICAgICAgICAgIDExNAotI2RlZmluZSBCQlBfUjExNSAgICAgICAgICAgICAgICAgICAgMTE1Ci0jZGVmaW5lIEJCUF9SMTE2ICAgICAgICAgICAgICAgICAgICAxMTYKLSNkZWZpbmUgQkJQX1IxMTcgICAgICAgICAgICAgICAgICAgIDExNwotI2RlZmluZSBCQlBfUjExOCAgICAgICAgICAgICAgICAgICAgMTE4Ci0jZGVmaW5lIEJCUF9SMTE5ICAgICAgICAgICAgICAgICAgICAxMTkKLSNkZWZpbmUgQkJQX1IxMjAgICAgICAgICAgICAgICAgICAgIDEyMAotI2RlZmluZSBCQlBfUjEyMSAgICAgICAgICAgICAgICAgICAgMTIxCi0jZGVmaW5lIEJCUF9SMTIyICAgICAgICAgICAgICAgICAgICAxMjIKLSNkZWZpbmUgQkJQX1IxMjMgICAgICAgICAgICAgICAgICAgIDEyMwotI2lmZGVmIFJUMzB4eAotI2RlZmluZSBCQlBfUjEzOCAgICAgICAgICAgICAgICAgICAgMTM4IC8vIGFkZCBieSBqb2hubGksIFJGIHBvd2VyIHNlcXVlbmNlIHNldHVwLCBBREMgZHluYW1pYyBvbi9vZmYgY29udHJvbAotI2VuZGlmIC8vIFJUMzB4eCAvLwotCi0KLSNkZWZpbmUgQkJQUjk0X0RFRkFVTFQgICAgICAgICAgICAgIDB4MDYgLy8gQWRkIDEgdmFsdWUgd2lsbCBnYWluIDFkYgotCi0vLyNkZWZpbmUgUEhZX1RSX1NXSVRDSF9USU1FICAgICAgICAgIDUgIC8vIHVzZWMKLQotLy8jZGVmaW5lIEJCUF9SMTdfTE9XX1NFTlNJQklMSVRZICAgICAweDUwCi0vLyNkZWZpbmUgQkJQX1IxN19NSURfU0VOU0lCSUxJVFkgICAgIDB4NDEKLS8vI2RlZmluZSBCQlBfUjE3X0RZTkFNSUNfVVBfQk9VTkQgICAgMHg0MAotI2RlZmluZS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AgMAotI2RlZmluZSBQS01PREVfV0VQNjQgICAgICAgICAgICAgICAgMQotI2RlZmluZSBQS01PREVfV0VQMTI4ICAgICAgICAgICAgICAgMgotI2RlZmluZSBQS01PREVfVEtJUCAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBQS01PREVfQUVTICAgICAgICAgICAgICAgICAgNAotI2RlZmluZSBQS01PREVfQ0tJUDY0ICAgICAgICAgICAgICAgNQotI2RlZmluZSBQS01PREVfQ0tJUDEyOCAgICAgICAgICAgICAgNgotI2RlZmluZSBQS01PREVfVEtJUF9OT19NSUMgICAgICAgICAgNyAgICAgICAvLyBNSUMgYXBwZW5kZWQgYnkgZHJpdmVyOiBub3QgYSB2YWxpZCB2YWx1ZSBpbiBoYXJkd2FyZSBrZXkgdGFibGUKLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBXQ0lEICBmb3JtYXQKLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy83LjEJV0NJRCAgRU5UUlkgIGZvcm1hdCAgOiA4Ynl0ZXMKLXR5cGVkZWYJc3RydWN0CV9XQ0lEX0VOVFJZX1NUUlVDIHsKLQlVQ0hBUgkJUlhCQUJpdG1hcDc7ICAgIC8vIGJpdDAgZm9yIFRJRDgsIGJpdDcgZm9yIFRJRCAxNQotCVVDSEFSCQlSWEJBQml0bWFwMDsgICAgLy8gYml0MCBmb3IgVElEMCwgYml0NyBmb3IgVElEIDcKLQlVQ0hBUgkJTUFDWzZdOwkvLyAwIGZvciBzaGFyZWQga2V5IHRhYmxlLiAgMSBmb3IgcGFpcndpc2Uga2V5IHRhYmxlCi19CVdDSURfRU5UUllfU1RSVUMsICpQV0NJRF9FTlRSWV9TVFJVQzsKLQotLy84LjEuMQlTRUNVUklUWSAgS0VZIC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U0lESWR4OjM7IC8vbXVsdGlwbGVCU1MgaW5kZXggZm9yIHRoZSBXQ0lECi0JVUlOVDMyCQlSWFdJVURGOjM7Ci0JVUlOVDMyCQlyc3Y6MjI7Ci19CU1BQ19BVFRSSUJVVEVfU1RSVUMsICpQTUFDX0FUVFJJQlVURV9TVFJVQzsKLSNlbmRpZgotCi0KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gVFggLyBSWCByaW5nIGRlc2NyaXB0b3IgZm9ybWF0Ci0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLy8gdGhlIGZpcnN0IDI0LWJ5dGUgaW4gVFhEIGlzIGNhbGxlZCBUWElORk8gYW5kIHdpbGwgYmUgRE1BZWQgdG8gTUFDIGJsb2NrIHRocm91Z2ggVFhGSUZPLgotLy8gTUFDIGJsb2NrIHVzZSB0aGlzIFRYSU5GTyB0byBjb250cm9sIHRoZSB0cmFuc21pc3Npb24gYmVoYXZpb3Igb2YgdGhpcyBmcmFtZS4KLSNkZWZpbmUgRklGT19NR01UICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIEZJRk9fSENDQSAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBGSUZPX0VEQ0EgICAgICAgICAgICAgICAgIDIKLQotLy8KLS8vIFRYIGRlc2NyaXB0b3IgZm9ybWF0LCBUeAlyaW5nLCBNZ210IFJpbmcKLS8vCi0jaWZkZWYgUlRfQklHX0VORElBTgotdHlwZWRlZglzdHJ1Y3QJUEFDS0VEIF9UWERfU1RSVUMgewotCS8vIFdvcmQgMAotCVVJTlQzMgkJU0RQdHIwOwotCS8vIFdvcmQgMQotCVVJTlQzMgkJRE1BRE9ORToxOwotCVVJTlQzMgkJTGFzdFNlYzA6MTsKLQlVSU5UMzIJCVN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lbmRpZgotCi0KLS8vCi0vLyBTRUNfQ1NSNTogc2hhcmVkIGtleSB0YWJsZSBzZWN1cml0eSBtb2RlIHJlZ2lzdGVyCi0vLwotI2lmZGVmIFJUX0JJR19FTkRJQU4KLXR5cGVkZWYJdW5pb24JX1NFQ19DU1I1X1NUUlVDCXsKLQlzdHJ1Y3QJewotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MzS2V5M0NpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MzS2V5MkNpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MzS2V5MUNpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MzS2V5MENpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MyS2V5M0NpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MyS2V5MkNpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MyS2V5MUNpcGhlckFsZzozOwotICAgICAgICBVSU5UMzIgICAgICAgOjE7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MyS2V5MENpcGhlckFsZzozOwotCX0JZmllbGQ7Ci0JVUlOVDMyCQkJd29yZDsKLX0JU0VDX0NTUjVfU1RSVUMsICpQU0VDX0NTUjVfU1RSVUM7Ci0jZWxzZQotdHlwZWRlZgl1bmlvbglfU0VDX0NTUjVfU1RSVUMJewotCXN0cnVjdAl7Ci0gICAgICAgIFVJTlQzMiAgICAgICBCc3MyS2V5MENpcGhlckFsZzoz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ogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotI2luY2x1ZGUgInJ0X2NvbmZpZy5oIgotCi0jaWZkZW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pb24gbW9kZSB0bwotICAgICAgICAwLiBBVEVTVEFSVCAgPSBTdGFydCBBVEUgTW9kZQotICAgICAgICAxLiBBVEVTVE9QICAgPSBTdG9wIEFURSBNb2RlCi0gICAgICAgIDIuIFRYQ09OVCAgICA9IENvbnRpbnVvdXMgVHJhbnNtaXQKLSAgICAgICAgMy4gVFhDQVJSICAgID0gVHJhbnNtaXQgQ2FycmllcgotICAgICAgICA0LiBUWEZSQU1FICAgPSBUcmFuc21pdCBGcmFtZXMKLSAgICAgICAgNS4gUlhGUkFNRSAgID0gUmVjZWl2ZSBGcmFtZXMKLSNpZmRlZiBSQUxJTktfMjh4eF9RQQotICAgICAgICA2LiBUWFNUT1AgICAgPSBTdG9wIEFueSBUeXBlIG9mIFRyYW5zbWl0aW9uCi0gICAgICAgIDcuIFJYU1RPUCAgICA9IFN0b3AgUmVjZWl2aW5nIEZyYW1lcwotI2VuZGlmIC8vIFJBTElOS18yOHh4X1FBIC8vCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyo9PT09PT09PT09PT09PT09PT09PT09PUVuZCBvZiBSVDI4NjA9PT09PT09PT09PT09PT09PT09PT09PSovCi0KLQotLyo9PT09PT09PT09PT09PT09PT09PT09U3RhcnQgb2YgUlQyODcwPT09PT09PT09PT09PT09PT09PT09PSovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIC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UKHBBZC0+UGVuZGluZ1J4ID09IDApOwotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLS8qICAgICAgUmVzZXQgUnggUklORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotLy8JCUludGVybG9ja2VkRXhjaGFuZ2UoJnBBZC0+UGVuZGluZ1J4LCAwKTsKLQkJcEFkLT5QZW5kaW5nUnggPSAwOwotCQlwQWQtPk5leHRSeEJ1bGtJblJlYWRJbmRleCA9IDA7CS8vIE5leHQgUnggUmVhZCBpbmRleAotCQlwQWQtPk5leHRSeEJ1bGtJbkluZGV4ID0gUlhfUklOR19TSVpFIC0gMTsJLy8gUnggQnVsayBwb2ludGVyCi0JCXBBZC0+TmV4dFJ4QnVsa0luUG9zaXRpb24gPSAwOwotCQlmb3IgKGkgPSAwOyBpIDwgKFJYX1JJTkdfU0laRSk7IGkrKykKLQkJewotCQkJUFJYX0NPTlRFWFQgIHBSeENvbnRleHQgPSAmKHBBZC0+UnhDb250ZXh0W2ldKTsKLQkJCU5kaXNaZXJvTWVtb3J5KHBSeENvbnRleHQtPlRyYW5zZmVyQnVmZmVyLCBNQVhfUlhCVUxLX1NJWkUpOwotCQkJLyogcGV0ZXIgOiB3aHkgZG9uJ3Qgd2UgaGF2ZSB0byBnZXQgQnVsa0luTG9jayBmaXJzdCA/ICovCi0JCQlwUnhDb250ZXh0LT5wQWQJPSBwQWQ7Ci0JCQlwUnhDb250ZXh0LT5wSXJwID0gTlVMTDsKLSAgICAgICAgICAgIC8qIHBldGVyIGRlYnVnICsrICovCi0JCQlwUnhDb250ZXh0LT5CdWxrSW5PZmZzZXQgPSAwOwotCQkJcFJ4Q29udGV4dC0+YlJ4SGFuZGxpbmcgPSBGQUxTRTsKLSAgICAgICAgICAgIC8qIHBldGVyIGRlYnVnIC0tICovCi0JCQlwUnhDb250ZXh0LT5JblVzZQkJPSBGQUxTRTsKLQkJCXBSeENvbnRleHQtPklSUFBlbmRpbmcJPSBGQUxTRTsKLQkJCXBSeENvbnRleHQtPlJlYWRhYmxlCT0gRkFMU0U7Ci0vLwkJCXBSeENvbnRleHQtPlJlb3JkZXJJblVzZSA9IEZBTFNFOwotLy8JCQlwUnhDb250ZXh0LT5SZWFkUG9zT2Zmc2V0ID0gMDsKLQkJfQotCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotLyogICAgICBSZXNldCBUeCBSSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0JCWRvCi0JCXsKLQkJCVJUVVNCQ2FuY2VsUGVuZGluZ0J1bGtPdXRJUlAocEFkKTsKLQkJfSB3aGlsZSAoRkFMU0UpOwotCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotCQkvLyBFbmFibGUgYXV0byByZXNwb25kZXIuCi0JCVJUTVBfSU9fUkVBRDMyKHBBZCwgQVVUT19SU1BfQ0ZHLCAmdGVtcCk7Ci0JCXRlbXAgPSB0ZW1wIHwgKDB4MDEpOwotCQlSVE1QX0lPX1dSSVRFMzIocEFkLCBBVVRPX1JTUF9DRkcsIHRlbXApOwotCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0JCUFzaWNFbmFibGVCc3NTeW5jKHBBZCk7Ci0KLQkJLyogU29mdCByZXNldCBCQ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URUNtZEhhbmRsZXIoKVxuIikpOwotCi0JcmV0dXJuIFRSVUU7Ci19Ci0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLUlOVAlTZXRfQVRFX1Byb2MoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JUFVDSEFSCQkJYXJnKQotewotCWlmIChBVEVDbWRIYW5kbGVyKHBBZCwgYXJnKSkKLQl7Ci0JCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlJhbGluazogU2V0X0FURV9Qcm9jIFN1Y2Nlc3NcbiIpKTsKLQotCi0JCXJldHVybiBUUlVFOwotCX0KLQllbHNlCi0JewotCQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSYWxpbms6IFNldF9BVEVfUHJvYyBGYWlsZWRcbiIpKTsKLQkJcmV0dXJuIEZBTFNFOwotCX0KLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQVRFIEFERFIxPURBIGZvciBUeEZyYW1lKEFQICA6IFRvIERTID0gMCA7IEZyb20gRFMgPSAxKQotICAgICAgICBvcgotICAgICAgICBTZXQgQVRFIEFERFIzPURBIGZvciBUeEZyYW1lKFNUQSA6IFRvIERTID0gMSA7IEZyb20gRFMgPSAwKQotCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X0FURV9EQV9Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBVQ0hBUgkJCWFyZykKLXsKLQlDSEFSCQkJCSp2YWx1Z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gcmFuZ2UsIGl0IHNob3VsZCBiZSBpbiByYW5nZSBvZiAyNH4lZC5cbiIsIChNQVhfRlJBTUVfU0laRSAtIDM0LyogPT0gMjMxMiAqLykpKTsKLQkJcmV0dXJuIEZBTFNFOwotCX0KLQotCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9BVEVfVFhfTEVOR1RIX1Byb2MgKFR4TGVuZ3RoID0gJWQpXG4iLCBwQWQtPmF0ZS5UeExlbmd0aCkpOwotCUFURURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlJhbGluazogU2V0X0FURV9UWF9MRU5HVEhfUHJvYyBTdWNjZXNzXG4iKSk7Ci0KLQotCXJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBBVEUgVHggZnJhbWUgY291bnQKLQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UCVNldF9BVEVfVFhfQ09VTlRfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JcEFkLT5hdGUuVHhDb3VudCA9IHNpbXBsZV9zdHJ0b2woYXJnLCAwLCAxMCk7Ci0KLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfQVRFX1RYX0NPVU5UX1Byb2MgKFR4Q291bnQgPSAlZClcbiIsIHBBZC0+YXRlLlR4Q291bnQpKTsKLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSYWxpbms6IF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U3RhcnQoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWQpCi17Ci0gICAgQVRFREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiPT0+IFJUTVBTdGF0aW9uU3RhcnRcbiIpKTsKLQlBVEVEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCI8PT0gUlRNUFN0YXRpb25TdGFydFxuIikpOwotfQotI2VuZGlmIC8vIENPTkZJR19TVEFfU1VQUE9SVCAvLwotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVNldHVwIEZyYW1lIGZvcm1hdC4KLQlOT1RFOgotCQlUaGlzIHJvdXRpbmUgc2hvdWxkIG9ubHkgYmUgdXNlZCBpbiBBVEUgbW9kZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi0KLSNpZmRlZiBSVDI4NzAKLS8qPT09PT09PT09PT09PT09PT09PT09PVN0YXJ0IG9mIFJUMjg3MD09PT09PT09PT09PT09PT09PT09PT0qLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLXN0YXRpYyBJTlQgQVRFU2V0VXBGcmFtZSgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBVSU5UMzIgVHhJZHgpCi17Ci0JVUlOVCBqOwotCVBUWF9DT05URVhUCXBOdWxsQ29udGV4dDsKLQlQVUNIQVIJCQlwRGVzdDsKLQlIVFRSQU5TTUlUX1NFVFRJTkcJVHhIVFBoeU1vZGU7Ci0JUFRYV0lfU1RSVUMJCXBUeFdJOwotCVBUWElORk9fU1RSVU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lIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1w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cmludCBhcyBhIG1hY3JvLiAqLwotI2RlZmluZSBhdGVfcHJpbnQoZm10LCBhcmdzLi4uKSAgICAgICAgICAgICAgICAgXAotZG97ICAgaW50ICgqb3JnX3JlbW90ZV9kaXNwbGF5KShjaGFyICopID0gTlVMTDsgICBcCi0Jb3JnX3JlbW90ZV9kaXNwbGF5ID0gcmVtb3RlX2Rpc3BsYXk7XAotCS8qIFNhdmUgb3JpZ2luYWwgInJlbW90ZV9kaXNwbGF5IiAqL1wKLQlyZW1vdGVfZGlzcGxheSA9IChpbnQgKCopKGNoYXIgKikpQ29uc29sZVJlc3BvbnNlOyAgICAgICAgICAgXAotCXByaW50ayhmbXQsICMjIGFyZ3MpOyAgICAgICAgICAgICAgICAgICAgICAgXAotCS8qIFJlc3RvcmUgdGhlIHJlbW90ZV9kaXNwbGF5IGZ1bmN0aW9uIHBvaW50ZXIgKi8gICAgICAgIFwKLQlyZW1vdGVfZGlzcGxheSA9IG9yZ19yZW1vdGVfZGlzcGxheTsgfXdoaWxlKDApCi0KLSNkZWZpbmUgQVRFREJHUFJJTlQoTGV2ZWwsIEZtdCkgICAgCVwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBpZiAoKExldmVsKSA8PSBSVERlYnVnTGV2ZWwpICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBhdGVfcHJpbnQgRm10OwkJCQkJXAotICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQotI2VuZGlmIC8vIENPTkZJR19QUklOVEsgLy8KLSNlbmRpZiAvLyAhVUNPUyAvLwotCi0jZGVmaW5lIEFURV9PTihfcCkgICAgICAgICAgICAgICgoKF9wKS0+YXRlLk1vZGUpICE9IEFURV9TVE9QKQotCi0vKiBSVDI4ODBfaU5JQyB3aWxsIGRlZmluZSAiUlQyODYwIi4gKi8KLQotLyogUlQyODgwX2lOSUMgd2lsbCBkZWZpbmUgUlQy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c3RhZ2luZy9ydDMwNzAvcnRfY29uZmlnLmgKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0MzA3MC9ydF9jb25maWcuaApAQCAtMSwxMjEgKzEgQEAKLS8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmFsaW5rIFRlY2ggSW5jLgotICogNUYuLCBOby4zNiwgVGFpeXVhbiBTdC4sIEpodWJlaSBDaXR5LAotICogSHNpbmNodSBDb3VudHkgMzAyLAotICogVGFpd2FuLCBSLk8uQy4KLSAqCi0gKiAoYykgQ29weXJpZ2h0IDIwMDItMjAwNywgUmFsaW5rIFRlY2hub2xvZ3ksIEluYy4KLSAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0JTW9kdWxlIE5hbWU6Ci0JcnRfY29uZmlnLmgKLQotCUFic3RyYWN0OgotCUNlbnRyYWwgaGVhZGVyIGZpbGUgdG8gbWFpbnRhaW4gYWxsIGluY2x1ZGUgZmlsZXMgZm9yIGFsbCBORElTCi0JbWluaXBvcnQgZHJpdmVyIHJvdXRpbmVzLgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8gICAgICAgICBXaGVuICAgICAgICA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IG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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V0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICBQcm9ncmFtOiAgICBydF9saW51eC5jICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICBDcmVhdGVkOiAgICA0LzIxLzIwMDYgMToxNzozOCBQTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICBBdXRob3I6ICAgICBXdSBYaS1LdW4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICBDb21tZW50czogICBgZGVzY3JpcHRpb25gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogSGlzdG9yeTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgUmV2aXNpb24gMS4xIDQvMjEvMjAwNiAxOjE3OjM4IFBNICB4c2lrdW4gICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgSW5pdGlhbCByZXZpc2lvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jaW5jbHVkZSAicnRtcF90eXBlLmgiCi0jaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+Ci0jaW5jbHVkZSA8bGludXgvdmVyc2lvbi5oPgotI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgotCi0jaW5jbHVkZSA8bGludXgvc3BpbmxvY2suaD4KLSNpbmNsdWRlIDxsaW51eC9pbml0Lmg+Ci0jaW5jbHVkZSA8bGludXgvc3RyaW5nLmg+Ci0jaW5jbHVkZSA8bGludXgvdGltZXIuaD4KLSNpbmNsdWRlIDx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UlOVCAJCQkJCWlvY3RsX2lmOwotfTsKLQotdHlwZWRlZiBzdHJ1Y3QgX1ZJUlRVQUxfQURBUFRFUgotewotCXN0cnVjdCBuZXRfZGV2aWNlCQkqUnRtcERldjsKLQlzdHJ1Y3QgbmV0X2RldmljZQkJKlZpcnR1YWxEZXY7Ci19IFZJUlRVQUxfQURBUFRFUiwgUFZJUlRVQUxfQURBUFRFUjsKLQotI3VuZGVmICBBU1NFUlQKLSNkZWZpbmUgQVNTRVJUKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgaWYgKCEoeCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBwcmludGsoS0VSTl9XQVJOSU5HIF9fRklMRV9fICI6JWQgYXNzZXJ0ICIgI3ggImZhaWxlZFxuIiwgX19MSU5FX18pOyAgICBcCi0gICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotdHlwZWRlZiBzdHJ1Y3Qgb3NfY29va2llCSogUE9TX0NPT0tJRTsKLXR5cGVkZWYgc3RydWN0IHBjaV9kZXYgCQkqIFBQQ0lfREVWOwotdHlwZWRlZiBzdHJ1Y3QgbmV0X2RldmljZQkqIFBORVRfREVWOwotdHlwZWRlZiB2b2lkCQkJCSogUE5ESVNfUEFDS0VUOwotdHlwZWRlZiBjaGFyCQkJCU5ESVNfUEFDS0VUOwotdHlwZWRlZiBQTkRJU19QQ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ci0JUlQyODcwX1RJTUVSX0VOVFJZIAkqcFFIZWFkOwotCVJUMjg3MF9USU1FUl9FTlRSWSAJKnBRVGFpbDsKLX1SVDI4NzBfVElNRVJfUVVFVUU7Ci0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLQotLy8jZGVmaW5lIERCRwkxCi0KLS8vCi0vLyAgTUFDUk8gZm9yIGRlYnVnZ2luZyBpbmZvcm1hdGlvbgotLy8KLQotI2lmZGVmIERCRwotZXh0ZXJuIFVMT05HICAgIFJURGVidWdMZXZlbDsKLQotI2RlZmluZSBEQkdQUklOVF9SQVcoTGV2ZWwsIEZtdCkgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGlmIChMZXZlbCA8PSBSVERlYnVnTGV2ZWwpICAgICAgXAotICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBwcmludGsgRm10OyAgICAgICAgICAgICAgIFwKLSAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBEQkdQUklOVChMZXZlbCwgRm10KSAgICBEQkdQUklOVF9SQVcoTGV2ZWwsIEZtdCkKLQotCi0jZGVmaW5lIERCR1BSSU5UX0VSUihGbXQpICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgcHJpbnRrKCJFUlJPUiEhISAiKTsgICAgICAgICAgXAotICAgIHByaW50ayBGbXQ7ICAgICAgICAgICAgICAgICAgXAotfQotCi0jZGVmaW5lIERCR1BSSU5UX1MoU3RhdHVzLCBGbXQpCQlcCi17CQkJCQkJCQkJXAotCXByaW50ayBGbXQ7CQkJCQlcCi19Ci0KLQotI2Vsc2UKLSNkZWZpbmUgREJHUFJJTlQoTGV2ZWwsIEZtdCkKLSNkZWZpbmUgREJHUFJJTlRfUkFXKExldmVsLCBGbXQpCi0jZGVmaW5lIERCR1BSSU5UX1MoU3RhdHVzLCBGbXQ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sIF9SLCBfVikJCQkJCQkJCVwKLXsJCQkJCQkJCQkJCQkJCQkJXAotCVJUVVNCU2luZ2xlV3JpdGUoX0EsIF9SLCBfVik7CQkJCQkJCQlcCi19Ci0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLSNpZm5kZWYgd2FpdF9ldmVudF9pbnRlcnJ1cHRpYmxlX3RpbWVvdXQKLSNkZWZpbmUgX193YWl0X2V2ZW50X2ludGVycnVwdGlibGVfdGltZW91dCh3cSwgY29uZGl0aW9uLCByZXQpIFwKLWRvIHsgXAotICAgICAgICB3YWl0X3F1ZXVlX3QgX193YWl0OyBcCi0gICAgICAgIGluaXRfd2FpdHF1ZXVlX2VudHJ5KCZfX3dhaXQsIGN1cnJlbnQpOyBcCi0gICAgICAgIGFkZF93YWl0X3F1ZXVlKCZ3cSwgJl9fd2FpdCk7IFwKLSAgICAgICAgZm9yICg7OykgeyBcCi0gICAgICAgICAgICAgICAgc2V0X2N1cnJlbnRfc3RhdGUoVEFTS19JTlRFUlJVUFRJQkxFKTsgXAotICAgICAgICAgICAgICAgIGlmIChjb25kaXRpb24pIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyBcCi0gICAgICAgICAgICAgICAgaWYgKCFzaWduYWxfcGVuZGluZyhjdXJyZW50KSkgeyBcCi0gICAgICAgICAgICAgICAgICAgICAgICByZXQgPSBzY2hlZHVsZV90aW1lb3V0KHJldCk7IFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmV0KSBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyBcCi0gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgXAotICAgICAgICAgICAgICAgIH0gXAotICAgICAgICAgICAgICAgIHJldCA9IC1FUkVTVEFSVFNZUzsgXAotICAgICAgICAgICAgICAgIGJyZWFrOyBcCi0gICAgICAgIH0gXAotICAgICAgICBjdXJyZW50LT5zdGF0ZSA9IFRBU0tfUlVOTklORzsgXAotICA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BQ0tFVCkocEVudHJ5KQotCi0jZGVmaW5lIFBBQ0tFVF9UT19RVUVVRV9FTlRSWShwUGFja2V0KSBcCi0JKFBRVUVVRV9FTlRSWSkocFBhY2tldCkKLQotCi0jaWZuZGVmIENPTlRBSU5JTkdfUkVDT1JECi0jZGVmaW5lIENPTlRBSU5JTkdfUkVDT1JEKGFkZHJlc3MsIHR5cGUsIGZpZWxkKQkJCVwKLSgodHlwZSAqKSgoUENIQVIpKGFkZHJlc3MpIC0gb2Zmc2V0b2YodHlwZSwgZmllbGQpKSkKLSNlbmRpZgotCi0KLSNkZWZpbmUgUkVMRUFTRV9ORElTX1BBQ0tFVChfcEFkLCBfcFBhY2tldCwgX1N0YXR1cykgICAgICAgICAgICAgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgUlRNUEZyZWVOZGlzUGFja2V0KF9wQWQsIF9wUGFja2V0KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotCi0jZGVmaW5lIFNXSVRDSF9QaHlBQihfcEFBLCBfcEJCKSAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFVMT05HCUFBQmFzZVBhSGlnaDsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgVUxPTkcJQUFCYXNlUGFMb3c7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFVMT05HCUJCQmFzZVBhSGlnaDsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgVUxPTkcJQkJCYXNlUGFMb3c7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIEJCQmFzZVBhSGlnaCA9IFJUTVBfR2V0UGh5c2ljYWxBZGRyZXNzSGlnaChfcEJCKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIEJCQmFzZVBhTG93ID0gUlRNUF9HZXRQaHlzaWNhbEFkZHJlc3NMb3coX3BCQik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBBQUJhc2VQYUhpZ2ggPSBSVE1QX0dldFBoeXNpY2FsQWRkcmVzc0hpZ2goX3BBQSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBBQUJhc2VQYUxvdyA9IFJUTVBfR2V0UGh5c2ljYWxBZGRyZXNzTG93KF9wQUEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgUlRNUF9TZXRQaHlzaWNhbEFkZHJlc3NIaWdoKF9wQUEsIEJCQmFzZVBhSGlnaCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBSVE1QX1NldFBoeXNpY2FsQWRkcmVzc0xvdyhfcEFBLCBCQkJhc2VQYUxvdyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBSVE1QX1NldFBoeXNpY2FsQWRkcmVzc0hpZ2goX3BCQiwgQUFCYXNlUGFIaWdoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIFJUTVBfU2V0UGh5c2ljYWxBZGRyZXNzTG93KF9wQkIsIEFBQmFzZVBhTG93KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQotCi0KLSNkZWZpbmUgTmRpc1dyaXRlRXJyb3JMb2dFbnRyeShfYSwgX2IsIF9jLCBfZCkKLSNkZWZpbmUgTmRpc01BbGxvY2F0ZU1hcFJlZ2lzdGVycyhfYSwgX2IsIF9jLCBfZCwgX2UpCQlORElTX1NUQVRV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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotICAgIHJ0X21haW5fZGV2LmMKLQotICAgIEFic3RyYWN0OgotICAgIENyZWF0ZSBhbmQgcmVnaXN0ZXIgbmV0d29yayBpbnRlcmZhY2UuCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgICBXaGF0Ci0gICAgLS0tLS0tLS0gICAgLS0tLS0tLS0tLSAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlTYW1wbGUJCU1hci8yMS8wNwkJTWVyZ2UgUlQyODcwIGFuZCBSVDI4NjAgZHJpdmVycy4KLSovCi0KLSNpbmNsdWRlICJydF9jb25maWcuaCIKLQotI2RlZmluZSBGT1JUWV9NSFpfSU5UT0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Ci0JewotI2lmZGVmIE1VTFRJUExFX0NBUkRfU1VQUE9SVAotCQlpZiAocEFkLT5NQ19Sb3dJRCA+PSAwKQotCSAgICAgICAgc3ByaW50ZihkZXYtPm5hbWUsICJyYSUwMmRfJWQiLCBwQWQtPk1DX1Jvd0lELCBpKTsKLQkJZWxzZQotI2VuZGlmIC8vIE1VTFRJUExFX0NBUkRfU1VQUE9SVCAvLwotCQlzcHJpbnRmKGRldi0+bmFtZSwgInJhJWQiLCBpKTsKLQkJU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLQl9Ci0KLQlyZXR1cm4gU3RhdHVzOwotCi19Ci0KLQotI2lmZGVmIE1VTFRJUExFX0NBUkRfU1VQUE9SVAotLyoKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICBHZXQgY2FyZCBwcm9maWxlIHBhdGguCi0KLUFyZ3VtZW50czoKLSAgICBwQWQKLQotUmV0dXJuIFZhbHVlOgotICAgIFRSVUUJCS0gRmluZCBhIGNhcmQgcHJvZmlsZQotCUZBTFNFCQktIHVzZSBkZWZhdWx0IHByb2ZpbGUKLQotTm90ZToKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLWV4dGVybiBJTlQgUlRNUEdldEtleVBhcmFtZXRlcigKLSAgICBJTiAgUENIQVIgICBrZXksCi0gICAgT1VUIFBDSEFSICAgZGVzdCwKLSAgICBJTiAgSU5UICAgICBkZXN0c2l6ZSwKLSAgICBJTiAgUENIQVIgICBidWZmZXIpOwotCi1CT09MRUFOIFJUTVBfQ2FyZEluZm9SZWFkKAotCUlOCVBSVE1QX0FEQVBURVIgcEFkKQotewotI2RlZmluZSBNQ19TRUxFQ1RfQ0FSRElECQkwCS8qIHVzZSBDQVJEIElEICgwI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Btb2RpZnkgICoKLSAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCi0gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKg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dCBjaGFyICpjcCwgdW5zaWduZWQgaW50ICphZGRyKQotewotCXVuc2lnbmVkIGludCAJdmFsOwotCWludCAgICAgICAgIAliYXNlLCBuOwotCWNoYXIgICAgICAgIAljOwotCXVuc2lnbmVkIGludCAgICBwYXJ0c1s0XTsKLQl1bnNpZ25lZCBpbnQgICAgKnBwID0gcGFydHM7Ci0KLQlmb3IgKDs7KQotICAgIHsKLSAgICAgICAgIC8qCi0gICAgICAgICAgKiBDb2xsZWN0IG51bWJlciB1cCB0byBgYC4nJy4KLSAgICAgICAgICAqIFZhbHVlcyBhcmUgc3BlY2lmaWVkIGFzIGZvciBDOgotICAgICAgICAgICoJMHg9aGV4LCAwPW9jdGFsLCBvdGhlcj1kZWNpbWFsLgotICAgICAgICAgICovCi0gICAgICAgICB2YWwgPSAwOwotICAgICAgICAgYmFzZSA9IDEwOwotICAgICAgICAgaWYgKCpjcCA9PSAnMCcpCi0gICAgICAgICB7Ci0gICAgICAgICAgICAgaWYgKCorK2NwID09ICd4JyB8fCAqY3AgPT0gJ1gnKQotICAgICAgICAgICAgICAgICBiYXNlID0gMTYsIGNwKys7Ci0gICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICBiYXNlID0gODsKLSAgICAgICAgIH0KLSAgICAgICAgIHdoaWxlICgoYyA9ICpjcCkgIT0gJ1wwJykKLSAgICAgICAgIHsKLSAgICAgICAgICAgICBpZiAoaXNkaWdpdCgodW5zaWduZWQgY2hhcikgYykpCi0gICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICB2YWwgPSAodmFsICogYmFzZSkgKyAoYyAtICcwJyk7Ci0gICAgICAgICAgICAgICAgIGNwKys7Ci0gICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICBpZiAoYmFzZSA9PSAxNiAmJiBpc3hkaWdpdCgodW5zaWduZWQgY2hhcikgYykpCi0gICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICB2YWwgPSAodmFsIDw8IDQpICsKLSAgICAgICAgICAgICAgICAgICAgIChjICsgMTAgLSAoaXNsb3dlcigodW5zaWduZWQgY2hhcikgYykgPyAnYScgOiAnQScpKTsKLSAgICAgICAgICAgICAgICAgY3ArKzsKLSAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgfQotICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgfQotICAgICAgICAgaWYgKCpjcCA9PSAnLicpCi0gICAgICAgICB7Ci0gICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgKiBJbnRlcm5ldCBmb3JtYXQ6IGEuYi5jLmQgYS5iLmMgICAod2l0aCBjIHRyZWF0ZWQgYXMgMTYtYml0cykKLSAgICAgICAgICAgICAgKiBhLmIgICAgICh3aXRoIGIgdHJlYXRlZCBhcyAyNCBiaXRzKQotICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgIGlmIChwcCA+PSBwYXJ0cyArIDMgfHwgdmFsID4gMHhmZikKLSAgICAgICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgICAgICAgKnBwKysgPSB2YWwsIGNwKys7Ci0gICAgICAgICB9Ci0gICAgICAgICBlbHNlCi0gICAgICAgICAgICAgYnJlYWs7Ci0gICAgIH0KLQotICAgICAvKgotICAgICAgKiBDaGVjayBmb3IgdHJhaWxpbmcganVuay4KLSAgICAgICovCi0gICAgIHdoaWxlICgqY3ApCi0gICAgICAgICBpZiAoIWlzc3BhY2UoKHVuc2lnbmVkIGNoYXIpICpjcCsrKSkKLSAgICAgICAgICAgICByZXR1cm4gMDsKLQotICAgICAvKgotICAgICAgKiBDb25jb2N0IHRoZSBhZGRyZXNzIGFjY29yZGluZyB0byB0aGUgbnVtYmVyIG9mIHBhcnRzIHNwZWNpZmllZC4KLSAgICAgICovCi0gICAgIG4gPSBwcCAtIHBhcnRzICsgMTsKLSAgICAgc3dpdGNoIChuKQotICAgICB7Ci0KLSAgICAgICAgIGNhc2UgMTogICAgICAgICAvKiBhIC0tIDMyIGJpdHMgKi8KLSAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgY2FzZSAyOiAgICAgICAgIC8qIGEuYiAtLSA4LjI0IGJpdHMgKi8KLSAgICAgICAgICAgICBpZiAodmFsID4gMHhmZmZmZmYpCi0gICAgICAgICAgICAgICAgIHJldHVybiAwOwotICAgICAgICAgICAgIHZhbCB8PSBwYXJ0c1swXSA8PCAyNDsKLSAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgY2FzZSAzOiAgICAgICAgIC8qIGEuYi5jIC0tIDguOC4xNiBiaXRzICovCi0gICAgICAgICAgICAgaWYgKHZhbCA+IDB4ZmZmZikKLSAgICAgICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgICAgICAgdmFsIHw9IChwYXJ0c1swXSA8PCAyNCkgfCAocGFydHNbMV0gPDwgMTYpOwotICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICBjYXNlIDQ6ICAgICAgICAgLyogYS5iLmMuZCAtLSA4LjguOC44IGJpdHMgKi8KLSAgICAgICAgICAgICBpZiAodmFsID4gMHhmZikKLSAgICAgICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgICAgICAgdmFsIHw9IChwYXJ0c1swXSA8PCAyNCkgfCAocGFydHNbMV0gPDwgMTYpIHwgKHBhcnRzWzJdIDw8IDgpOwotICAgICAgICAgICAgIGJyZWFrOwotICAgICB9Ci0KLSAgICAgKmFkZHIgPSBodG9ubCh2YWwpOwotICAgICByZXR1cm4gMTsKLQotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0gICAgUm91dGluZSBEZXNjcmlwdGlvbjoKLSAgICAgICAgRmluZCBrZXkgc2VjdGlvbiBmb3IgR2V0IGtleSBwYXJhbWV0ZXIuCi0KLSAgICBBcmd1bWVudHM6Ci0gICAgICAgIGJ1ZmZlciAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBidWZmZXIgdG8gc3RhcnQgZmluZCB0aGUga2V5IHNlY3Rpb24KLSAgICAgICAgc2VjdGlvbiAgICAgICAgICAgICAgICAgICAgIHRoZSBrZXkgb2YgdGhlIHNlY2lvbiB0byBiZSBmaW5kCi0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIE5VTEwgICAgICAgICAgICAgICAgICAgICAgICBGYWlsCi0gICAgICAgIE90aGVycyAgICAgICAgICAgICAgICAgICAgICBTdWNjZXNzCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotUFVDSEFSICBSVE1QRmluZFNlY3Rpb24oCi0gICAgSU4gIFBDSEFSICAgYnVmZmVyKQotewotICAgIENIQVIgdGVtcF9idWZbMzJdOwotICAgIFBVQ0hBUiAgcHRyOwotCi0gICAgc3RyY3B5KHRlbXBfYnVmLCAiRGVmYXVsdCIpOwotCi0gICAgaWYoKHB0ciA9IHJ0c3Ryc3RyKGJ1ZmZlciwgdGVtcF9idWYpKSAhPSBOVUxMKQotICAgICAgICAgICAgcmV0dXJuIChwdHIrc3RybGVuKCJcbiIpKTsKLSAgICAgICAgZWxzZQotICAgICAgICAgICAgcmV0dXJuIE5VTEw7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBHZXQga2V5IHBhcmFtZXRlci4KLQotICAgIEFyZ3VtZW50czoKLSAgICAgICAga2V5ICAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8ga2V5IHN0cmluZwotICAgICAgICBkZXN0ICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBkZXN0aW5hdGlvbgotICAgICAgICBkZXN0c2l6ZSAgICAgICAgICAgICAgICAgICAgVGhlIGRhdGFzaXplIG9mIHRoZSBkZXN0aW5hdGlvbgotICAgICAgICBidWZmZXIgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgYnVmZmVyIHRvIHN0YXJ0IGZpbmQgdGhlIGtleQotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBUUlVFICAgICAgICAgICAgICAgICAgICAgICAgU3VjY2VzcwotICAgICAgICBGQUxTRSAgICAgICAgICAgICAgICAgICAgICAgRmFpbAotCi0gICAgTm90ZToKLSAgICAgICAgVGhpcyByb3V0aW5lIGdldCB0aGUgdmFsdWUgd2l0aCB0aGUgbWF0Y2hlZCBrZXkgKGNhc2UgY2FzZS1zZW5zaXRpdmUpCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFJUTVBHZXRLZXlQYXJhbWV0ZXIoCi0gICAgSU4gIFBDSEFSICAga2V5LAotICAgIE9VVCBQQ0hBUiAgIGRlc3QsCi0gICAgSU4gIElOVCAgICAgZGVzdHNpemUsCi0gICAgSU4gIFBDSEFSICAgYnVmZmVyKQotewotICAgIFVDSEFSICp0ZW1wX2J1ZjEgPSBOVUxMOwotICAgIFVDSEFSICp0ZW1wX2J1ZjIgPSBOVUxMOwotICAgIENIQVIgKnN0YXJ0X3B0cjsKLSAgICBDSEFSICplbmRfcHRyOwotICAgIENIQVIgKnB0cjsKLSAgICBDSEFSICpvZmZzZXQgPSAwOwotICAgIElOVCAgbGVuOwotCi0JLy90ZW1wX2J1ZjEgPSBrbWFsbG9jKE1BWF9QQVJBTV9CVUZGRVJfU0laRSwgTUVNX0FMTE9DX0ZMQUcpOwotCW9zX2FsbG9jX21lbShOVUxMLCAmdGVtcF9idWYxLCBNQVhfUEFSQU1fQlVGRkVSX1NJWkUpOwotCi0JaWYodGVtcF9idWYxID09IE5VTEwpCi0gICA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0KLQlvc19mcmVlX21lbShOVUxMLCB0ZW1wX2J1ZjEpOwotICAgIG9zX2ZyZWVfbWVtKE5VTEwsIHRlbXBfYnVmMik7Ci0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLSAgICBSb3V0aW5lIERlc2NyaXB0aW9uOgotICAgICAgICBHZXQga2V5IHBhcmFtZXRlci4KLQotICAgIEFyZ3VtZW50czoKLSAgICAgICAga2V5ICAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8ga2V5IHN0cmluZwotICAgICAgICBkZXN0ICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBkZXN0aW5hdGlvbgotICAgICAgICBkZXN0c2l6ZSAgICAgICAgICAgICAgICAgICAgVGhlIGRhdGFzaXplIG9mIHRoZSBkZXN0aW5hdGlvbgotICAgICAgICBidWZmZXIgICAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byB0aGUgYnVmZmVyIHRvIHN0YXJ0IGZpbmQgdGhlIGtleQotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBUUlVFICAgICAgICAgICAgICAgICAgICAgICAgU3VjY2VzcwotICAgICAgICBGQUxTRSAgICAgICAgICAgICAgICAgICAgICAgRmFpbAotCi0gICAgTm90ZToKLSAgICAgICAgVGhpcyByb3V0aW5lIGdldCB0aGUgdmFsdWUgd2l0aCB0aGUgbWF0Y2hlZCBrZXkgKGNhc2UgY2FzZS1zZW5zaXRpdmUpLgotICAgICAgICBJdCBpcyBjYWxsZWQgZm9yIHBhcnNpbmcgU1NJRCBhbmQgYW55IGtleSBzdHJpbmcuCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFJUTVBHZXRDcml0aWNhbF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pbnRlciB0byBrZXkgc3RyaW5nCi0gICAgICAgIGRlc3QgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIGRlc3RpbmF0aW9uCi0gICAgICAgIGRlc3RzaXplICAgICAgICAgICAgICAgICAgICBUaGUgZGF0YXNpemUgb2YgdGhlIGRlc3RpbmF0aW9uCi0gICAgICAgIGJ1ZmZlciAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBidWZmZXIgdG8gc3RhcnQgZmluZCB0aGUga2V5Ci0KLSAgICBSZXR1cm4gVmFsdWU6Ci0gICAgICAgIFRSVUUgICAgICAgICAgICAgICAgICAgICAgICBTdWNjZXNzCi0gICAgICAgIEZBTFNFICAgICAgICAgICAgICAgICAgICAgICBGYWlsCi0KLSAgICBOb3RlOgotICAgICAgICBUaGlzIHJvdXRpbmUgZ2V0IHRoZSB2YWx1ZSB3aXRoIHRoZSBtYXRjaGVkIGtleSAoY2FzZSBjYXNlLXNlbnNpdGl2ZSkKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgUlRNUEdldEtleVBhcmFtZXRlcldpdGhPZmZzZXQoCi0gICAgSU4gIFBDSEFSICAga2V5LAotICAgIE9VVCBQQ0hBUiAgIGRlc3QsCi0gICAgT1VUCVVTSE9SVAkqZW5kX29mZnNldCwKLSAgICBJTiAgSU5UICAgICBkZXN0c2l6ZSwKLSAgICBJTiAgUENIQVIgICBidWZmZXIsCi0gICAgSU4JQk9PTEVBTgliVHJpbVNwYWNlKQotewotICAgIFVDSEFSICp0ZW1wX2J1ZjEgPSBOVUxMOwotICAgIFVDSEFSICp0ZW1wX2J1ZjIgPSBOVUxMOwotICAgIENIQVIgKnN0YXJ0X3B0cjsKLSAgICBDSEFSICplbmRfcHRyOwotICAgIENIQVIgKnB0cjsKLSAgICBDSEFSICpvZmZzZXQgPSAwOwotICAgIElOVCAgb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ZSBMaWNlbnNlLCBvciAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKi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hZGVyKS0+SGVhZCA9IHBOZXh0OyAgICAgICAgICAgICAgICBcCi0JCWlmIChwTmV4dCA9PSBOVUxMKSAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJKFF1ZXVlSGVhZGVyKS0+VGFpbCA9IE5VTEw7ICAgICAgICAgICAgIFwKLQkJKFF1ZXVlSGVhZGVyKS0+TnVtYmVyLS07ICAgICAgICAgICAgICAgICAgICBcCi0JfQkJCQkJCQkJCQkJCVwKLX0KLQotI2RlZmluZSBJbnNlcnRIZWFkUXVldWUoUXVldWVIZWFkZXIsIFF1ZXVlRW50cnkpICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkoKFBRVUVVRV9FTlRSWSlRdWV1ZUVudHJ5KS0+TmV4dCA9IChRdWV1ZUhlYWRlciktPkhlYWQ7IFwKLQkJKFF1ZXVlSGVhZGVyKS0+SGVhZCA9IChQUVVFVUVfRU5UUlkpKFF1ZXVlRW50cnkpOyAgICAgICBcCi0JCWlmICgoUXVldWVIZWFkZXIpLT5UYWlsID09IE5VTEwpICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJKFF1ZXVlSGVhZGVyKS0+VGFpbCA9IChQUVVFVUVfRU5UUlkpKFF1ZXVlRW50cnkpOyAgIFwKLQkJKFF1ZXVlSGVhZGVyKS0+TnVtYmVyKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19Ci0KLSNkZWZpbmUgSW5zZXJ0VGFpbFF1ZXVlKFF1ZXVlSGVhZGVyLCBRdWV1ZUVudHJ5KSAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCSgoUFFVRVVFX0VOVFJZKVF1ZXVlRW50cnkpLT5OZXh0ID0gTlVMTDsgICAgICAgICAgICAgICAgICAgIFwKLQlpZiAoKFF1ZXVl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kRNQURPTkUgPSAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotLy9TZXQgbGFzdCBkYXRhIHNlZ21lbnQKLSNkZWZpbmUgUklOR19TRVRfTEFTVERTKF9UeEQsIF9Jc1NEMCkgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBpZiAoX0lzU0QwKSB7X1R4RC0+TGFzdFNlYzAgPSAxO30gICAgIFwKLSAgICBlbHNlIHtfVHhELT5MYXN0U2VjMSA9IDE7fSAgICAgXAotfQotCi0vLyBJbmNyZWFzZSBUeFRzYyB2YWx1ZSBmb3IgbmV4dCB0cmFuc21pc3Npb24KLS8vIFRPRE86Ci0vLyBXaGVuIGk9PTYsIG1lYW5zIFRTQyBoYXMgZG9uZSBvbmUgZnVsbCBjeWNsZSwgZG8gcmUta2V5aW5nIHN0dWZmIGZvbGxvdyBzcGVjcwotLy8gU2hvdWxkIHNlbmQgYSBzcGVjaWFsIGV2ZW50IG1pY3Jvc29mdCBkZWZpbmVkIHRvIHJlcXVlc3QgcmUta2V5Ci0jZGVmaW5lIElOQ19UWF9UU0MoX3RzYykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGludCBpPTA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgd2hpbGUgKCsrX3RzY1tpXSA9PSAweDApICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBpKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChpID09IDYpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAg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vCi0KLSNpZmRlZiBSVDMweHgKLSNkZWZpbmUgUlRNUF9SRl9JT19SRUFEOF9CWV9SRUdfSUQoX0EsIF9JLCBfcFYpICAgIFJUMzB4eFJlYWRSRlJlZ2lzdGVyKF9BLCBfSSwgX3BWKQotI2RlZmluZSBSVE1QX1JGX0lPX1dSSVRFOF9CWV9SRUdfSUQoX0EsIF9JLCBfVikgICAgUlQzMHh4V3JpdGVSRlJlZ2lzdGVyKF9BLCBfSSwgX1YpCi0jZW5kaWYgLy8gUlQzMHh4IC8vCi0KLSNkZWZpbmUgICAgIE1BUF9DSEFOTkVMX0lEX1RPX0tIWihjaCwga2h6KSAgeyAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBzd2l0Y2ggKGNoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxOiAgICAga2h6ID0gMjQxMjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAyOiAgICAga2h6ID0gMjQxNzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAzOiAgICAga2h6ID0gMjQyMjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA0OiAgICAga2h6ID0gMjQyNzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1OiAgICAga2h6ID0gMjQzMjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA2OiAgICAga2h6ID0gMjQzNzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiAgICAga2h6ID0gMjQ0MjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA4OiAgICAga2h6ID0gMjQ0NzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA5OiAgICAga2h6ID0gMjQ1MjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxMDogICAga2h6ID0gMjQ1NzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxMTogICAga2h6ID0gMjQ2MjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxMjogICAga2h6ID0gMjQ2NzAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxMzogICAga2h6ID0gMjQ3MjAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxNDogICAga2h6ID0gMjQ4NDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAzNjogIC8qIFVOSUkgKi8gIGtoeiA9IDUxODAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNDA6ICAvKiBVTklJICovICBraHogPSA1MjAwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ0OiAgLyogVU5JSSAqLyAga2h6ID0gNTIyMDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA0ODogIC8qIFVOSUkgKi8gIGtoeiA9IDUyNDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTI6ICAvKiBVTklJICovICBraHogPSA1MjYwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2OiAgLyogVU5JSSAqLyAga2h6ID0gNTI4MDAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA2MDogIC8qIFVOSUkgKi8gIGtoeiA9IDUzMDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNjQ6ICAvKiBVTklJICovICBraHogPSA1MzIwMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE0OTogLyogVU5JSSAqLyAga2h6ID0gNTc0NTAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxNTM6IC8qIFVOSUkgKi8gIGtoeiA9IDU3NjUwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTU3OiAvKiBVTklJICovICBraHogPSA1Nzg1MDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE2MTogLyogVU5JSSAqLyAga2h6ID0gNTgwNTAwMDsgICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxNjU6IC8qIFVOSUkgKi8gIGtoeiA9IDU4MjUwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTAwOiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU1MDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTA0OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU1MjAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTA4OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU1NDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTEyOiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU1NjAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTE2OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU1ODAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTIwOiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU2MDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTI0OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU2MjAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTI4OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU2NDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTMyOiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU2NjAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTM2OiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU2ODAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTQwOiAvKiBIaXBlckxBTjIgKi8gIGtoeiA9IDU3MDAwMDA7ICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMzQ6ICAvKiBKYXBhbiBNTUFDICovICAga2h6ID0gNTE3MDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMzg6ICAvKiBKYXBhbiBNTUFDICovICAga2h6ID0gNTE5MDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNDI6ICAvKiBKYXBhbiBNTUFDICovICAga2h6ID0gNTIxMDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNDY6ICAvKiBKYXBhbiBNTUFDICovICAga2h6ID0gNTIzMDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTg0OiAvKiBKYXBhbiAqLyAgIGtoeiA9IDQ5MjAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDE4ODogLyogSmFwYW4gKi8gICBraHogPSA0OTQwMDAwOyAgIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSAxOTI6IC8qIEphcGFuICovICAga2h6ID0gNDk2MDAwMDsgICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMTk2OiAvKiBKYXBhbiAqLyAgIGtoeiA9IDQ5ODAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDIwODogLyogSmFwYW4sIG1lYW5zIEowOCAqLyAgIGtoeiA9IDUwNDAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDIxMjogLyogSmFwYW4sIG1lYW5zIEoxMiAqLyAgIGtoeiA9IDUwNjAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDIxNjogLyogSmFwYW4sIG1lYW5zIEoxNiAqLyAgIGtoeiA9IDUwODAwMDA7ICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiAgICBraHogPSAyNDEyMDAwOyAgIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgfQotCi0jZGVmaW5lICAgICBNQVBfS0haX1RPX0NIQU5ORUxfSUQoa2h6LCBjaCkgIHsgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgc3dpdGNoIChraHopICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQxMjAwMDogICAgY2ggPSAxOyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQxNzAwMDogICAgY2ggPSAyOyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQyMjAwMDogICAgY2ggPSAzOyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQyNzAwMDogICAgY2ggPSA0OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQzMjAwMDogICAgY2ggPSA1OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQzNzAwMDogICAgY2ggPSA2OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ0MjAwMDogICAgY2ggPSA3OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ0NzAwMDogICAgY2ggPSA4OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ1MjAwMDogICAgY2ggPSA5OyAgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ1NzAwMDogICAgY2ggPSAxMDsgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ2MjAwMDogICAgY2ggPSAxMTsgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ2NzAwMDogICAgY2ggPSAxMjsgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ3MjAwMDogICAgY2ggPSAxMzsgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgMjQ4NDAwMDogICAgY2ggPSAxNDsgICAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTE4MDAwMDogICAgY2ggPSAzNjsgIC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyMDAwMDA6ICAgIGNoID0gNDA7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjIwMDAwOiAgICBjaCA9IDQ0OyAgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTI0MDAwMDogICAgY2ggPSA0ODsgIC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyNjAwMDA6ICAgIGNoID0gNTI7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MjgwMDAwOiAgICBjaCA9IDU2OyAgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTMwMDAwMDogICAgY2ggPSA2MDsgIC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUzMjAwMDA6ICAgIGNoID0gNjQ7ICAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1NzQ1MDAwOiAgICBjaCA9IDE0OTsgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTc2NTAwMDogICAgY2ggPSAxNTM7IC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU3ODUwMDA6ICAgIGNoID0gMTU3OyAvKiBVTklJICovICBicmVhazsgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1ODA1MDAwOiAgICBjaCA9IDE2MTsgLyogVU5JSSAqLyAgYnJlYWs7ICAgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTgyNTAwMDogICAgY2ggPSAxNjU7IC8qIFVOSUkgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU1MDAwMDA6ICAgIGNoID0gMTAwOyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU1MjAwMDA6ICAgIGNoID0gMTA0OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU1NDAwMDA6ICAgIGNoID0gMTA4OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU1NjAwMDA6ICAgIGNoID0gMTEyOyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU1ODAwMDA6ICAgIGNoID0gMTE2OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2MDAwMDA6ICAgIGNoID0gMTIwOyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2MjAwMDA6ICAgIGNoID0gMTI0OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2NDAwMDA6ICAgIGNoID0gMTI4OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2NjAwMDA6ICAgIGNoID0gMTMyOyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU2ODAwMDA6ICAgIGNoID0gMTM2OyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDU3MDAwMDA6ICAgIGNoID0gMTQwOyAvKiBIaXBlckxBTjIgKi8gIGJyZWFrOyAgICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUxNzAwMDA6ICAgIGNoID0gMzQ7ICAvKiBKYXBhbiBNTUFDICovICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUxOTAwMDA6ICAgIGNoID0gMzg7ICAvKiBKYXBhbiBNTUFDICovICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyMTAwMDA6ICAgIGNoID0gNDI7ICAvKiBKYXBhbiBNTUFDICovICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUyMzAwMDA6ICAgIGNoID0gNDY7ICAvKiBKYXBhbiBNTUFDICovICAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ5MjAwMDA6ICAgIGNoID0gMTg0OyAvKiBKYXBhbiAqLyAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ5NDAwMDA6ICAgIGNoID0gMTg4OyAvKiBKYXBhbiAqLyAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ5NjAwMDA6ICAgIGNoID0gMTkyOyAvKiBKYXBhbiAqLyAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDQ5ODAwMDA6ICAgIGNoID0gMTk2OyAvKiBKYXBhbiAqLyAgYnJlYWs7ICAgXAotICAgICAgICAgICAgICAgICAgICBjYXNlIDUwNDAwMDA6ICAgIGNoID0gMjA4OyAvKiBKYXBhbiwgbWVhbnMgSjA4ICovICBicmVhazsgICBcCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgNTA2MDAwMDogICAgY2ggPSAyMTI7IC8qIEphcGFuLCBtZWFucyBKMTIgKi8gIGJyZWFrOyAgIFwKLSAgICAgICAgICAgICAgICAgICAgY2FzZSA1MDgwMDAwOiAgICBjaCA9IDIxN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i17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgY2hhciBMTENfTGVuWzJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgX3BSZW1vdmVkTExDU05BUCA9IE5VTEw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgaWYgKE5kaXNFcXVhbE1lbW9yeShTTkFQXzgwMl8xSCwgX3BEYXRhLCA2KSAgfHwgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIE5kaXNFcXVhbE1lbW9yeShTTkFQX0JSSURHRV9UVU5ORUwsIF9wRGF0YSwgNikpICAgICAgICAgICAgICAgICBcCi0gICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIFBVQ0hBUiBwUHJvdG8gPSBfcERhdGEgKyA2OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmICgoTmRpc0VxdWFsTWVtb3J5KElQWCwgcFByb3RvLCAyKSB8fCBOZGlzRXF1YWxNZW1vcnkoQVBQTEVfVEFMSywgcFByb3RvLCAyKSkgJiYgIFwKLSAgICAgICAgICAgIE5kaXNFcXVhbE1lbW9yeShTTkFQXzgwMl8xSCwgX3BEYXRhLCA2KSkgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIExMQ19MZW5bMF0gPSAoVUNIQVIpKF9EYXRhU2l6ZSAvIDI1Nik7ICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIExMQ19MZW5bMV0gPSAoVUNIQVIpKF9EYXRhU2l6ZSAlIDI1Nik7ICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIE1BS0VfODAyXzNfSEVBREVSKF9wODAyM2hkciwgX3BEQSwgX3BTQSwgTExDX0xlbik7ICAgICAgICAgIFwKLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIE1BS0VfODAyXzNfSEVBREVSKF9wODAyM2hkciwgX3BEQSwgX3BTQSwgcFByb3RvKTsgICAgICAgICAgIFwKLSAgICAgICAgICAgIF9wUmVtb3ZlZExMQ1NOQVAgPSBfcERhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIF9EYXRhU2l6ZSAtPSBMRU5HVEhfODAyXzFfSDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgIF9wRGF0YSArPSBMRU5HVEhfODAyXzFfSDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgTExDX0xlblswXSA9IChVQ0hBUikoX0RhdGFTaXplIC8gMjU2KTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgTExDX0xlblsxXSA9IChVQ0hBUikoX0RhdGFTaXplICUgMjU2KTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgTUFLRV84MDJfM19IRUFERVIoX3A4MDIzaGRyLCBfcERBLCBfcFNBLCBMTENfTGVuKTsgICAgICAgICAgICAgIFwKLSAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBTV0lUQ0hfQUIoIF9wQUEsIF9wQkIpICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgUFZPSUQgcENDOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgcENDID0gX3BCQjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIF9wQkIgPSBfcEFBOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgX3BBQSA9IHBDQzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfQotCi0vLyBFbnF1ZXVlIHRoaXMgZnJhbWUgdG8gTUxNRSBlbmdpbmUKLS8vIFdlIG5lZWQgdG8gZW5xdWV1ZSB0aGUgd2hvbGUgZnJhbWUgYmVjYXVzZS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FURV8xMQotCi0vLwlVTE9ORyAgICAgICAgICAgCQkJCQlUaW1CaXRtYXA7ICAgICAgLy8gYml0MCBmb3IgYnJvYWRjYXN0LCAxIGZvciBBSUQxLCAyIGZvciBBSUQyLCAuLi5zbyBvbgotLy8gICAgVUxPTkcgICAgICAgICAgIAkJCQkJVGltQml0bWFwMjsgICAgIC8vIGIwIGZvciBBSUQzMiwgYjEgZm9yIEFJRDMzLCAuLi4gYW5kIHNvIG9uCi0JVUNIQVIJCQkJCQkJCVRpbUJpdG1hcHNbV0xBTl9NQVhfTlVNX09GX1RJTV07Ci0KLSAgICAvLyBXUEEKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTUtbMzJdOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBNS1szMl07Ci0JVUNIQVIJCQkJCQkJCUdUS1szMl07Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSUVFRTgwMjFYOwotICAgIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFByZUF1dGg7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR05vbmNlWzMyXTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQb3J0U2VjdXJlZDsKLSAgICBORElTXzgwMl8xMV9QUklWQUNZX0ZJTFRFUiAgICAgICAgICBQcml2YWN5RmlsdGVyOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJBTkNsYXNzM0RhdGE7Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSXNvbGF0ZUludGVyU3RhVHJhZmZpYzsKLQotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJTTklFX0xlblsyXTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSU05fSUVbMl1b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2l0aCBtYXhpbXVtIGR1cmF0aW9uCi0JVVNIT1JUICAgICAgICAgICAgICBQYXJhbGxlbER1cmF0aW9uOyAgICAgICAgICAgLy8gTWF4aW11bSBkdXJhdGlvbiBmb3IgcGFyYWxsZWwgbWVhc3VyZW1lbnQKLQlVQ0hBUiAgICAgICAgICAgICAgIFBhcmFsbGVsQ2hhbm5lbDsgICAgICAgICAgICAvLyBPbmx5IG9uZSBjaGFubmVsIHdpdGggcGFyYWxsZWwgbWVhc3VyZW1lbnQKLQlVU0hPUlQgICAgICAgICAgICAgIElBUFBUb2tlbjsgICAgICAgICAgICAgICAgICAvLyBJQVBQIGRpYWxvZyB0b2tlbgotCVVDSEFSICAgICAgICAgICAgICAgQ0NYUW9zRUNXTWluOyAgICAgICAgICAgICAgIC8vIENpc2NvIFFPUyBFQ1dNaW4gZm9yIEFDIDAKLQlVQ0hBUiAgICAgICAgICAgICAgIENDWFFvc0VDV01heDsgICAgICAgICAgICAgICAvLyBDaXNjbyBRT1MgRUNXTWF4IGZvciBBQyAwCi0JLy8gSGFjayBmb3IgY2hhbm5lbCBsb2FkIGFuZCBub2lzZSBoaXN0b2dyYW0gcGFyYW1ldGVycwotCVVDSEFSICAgICAgICAgICAgICAgTkhGYWN0b3I7ICAgICAgICAgICAgICAgICAgIC8vIFBhcmFtZXRlciBmb3IgTm9pc2UgaGlzdG9ncmFtCi0JVUNIQVIgICAgICAgICAgICAgICBDTEZhY3RvcjsgICAgICAgICAgICAgICAgICAgLy8gUGFyYW1ldGVyIGZvciBjaGFubmVsIGxvYWQKLQotCVVDSEFSICAgICAgICAgICAgICAgS1JLWzE2XTsgICAgICAgIC8vS2V5IFJlZnJlc2ggS2V5LgotCVVDSEFSICAgICAgICAgICAgICAgQlRLWzMyXTsgICAgICAgIC8vQmFzZSBUcmFuc2llbnQgS2V5Ci0JQk9PTEVBTiAgICAgICAgICAgICBDQ0tNTGlua1VwRmxhZzsKLQlVTE9ORyAgICAgICAgICAgICAgIENDS01STjs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b3IgYnkgaXdwcml2IGNtZCAiQXBDbGlFbmFibGUiCi0JQk9PTEVBTiAgICAgICAgICAgICAgICAgVmFsaWQ7CS8vIFNldCBpdCBhcyAxIGlmIHRoZSBhcGNsaSBpbnRlcmZhY2UgYXNzb2NpYXRlZCBzdWNjZXNzIHRvIHJlbW90ZSBBUC4KLQlVQ0hBUgkJCQkJTWFjVGFiV0NJRDsJLy9XQ0lEIHZhbHVlLCB3aGljaCBwb2ludCB0byB0aGUgZW50cnkgb2YgQVNJQyBNYWMgdGFibGUuCi0JVUNIQVIgICAgICAgICAgICAgICAgICAgU3NpZExlbjsKLQlDSEFSICAgICAgICAgICAgICAgICAgICBTc2lkW01BWF9MRU5fT0ZfU1NJRF07Ci0KLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBDZmdTc2lkTGVuOwotCUNIQVIgICAgICAgICAgICAgICAgICAgIENmZ1NzaWRbTUFYX0xFTl9PRl9TU0lEXTsKLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBDZmdBcENsaUJzc2lkW0VUSF9MRU5HVEhfT0ZfQUREUkVTU107Ci0JVUNIQVIgICAgICAgICAgICAgICAgICAgQ3VycmVudEFkZHJlc3NbRVRIX0xFTkdUSF9PRl9BRERSRVNTXTsKLQotCVVMT05HICAgICAgICAgICAgICAgICAgIEFwQ2xpUmN2QmVhY29uVGltZTsKLQotCVVMT05HICAgICAgICAgICAgICAgICAgIEN0cmxDdXJyU3RhdGU7Ci0JVUxPTkcgICAgICAgICAgICAgICAgICAgU3luY0N1cnJTdGF0ZTsKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBBdXRoQ3VyclN0YXRlOwotCVVMT05HICAgICAgICAgICAgICAgICAgIEFzc29jQ3VyclN0YXRlOwotCVVMT05HCQkJCQlXcGFQc2tDdXJyU3RhdGU7Ci0KLQlVU0hPUlQgICAgICAgICAgICAgICAgICBBdXRoUmVxQ250OwotCVVTSE9SVCAgICAgICAgICAgICAgICAgIEFzc29jUmVxQ250OwotC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0vLwlVU0hPUlQJCQlSeE1jc0NudFtESUFHTk9TRV9USU1FXVsxNl07CQkvLyBSeCBNQ1MgQ291bnQgaW4gcmFuZ2UgZnJvbSAwIHRvIDE1LCBzdGVwIGluIDEuCi0JVVNIT1JUCQkJUnhNY3NDbnRbRElBR05PU0VfVElNRV1bMjRdOyAvLyAzKjMKLX1SdG1wRGlhZ1N0cnVjdDsKLSNlbmRpZiAvLyBEQkdfRElBR05PU0UgLy8KLQotCi0vLwotLy8gIFRoZSBtaW5pcG9ydCBhZGFwdGVyIHN0cnVjdHVyZQotLy8KLXR5cGVkZWYgc3RydWN0IF9SVE1QX0FEQVBURVIKLXsKLQlQVk9JRAkJCQkJT1NfQ29va2llOwkvLyBzYXZlIHNwZWNpZmljIHN0cnVjdHVyZSByZWxhdGl2ZSB0byBPUwotCVBORVRfREVWCQkJCW5ldF9kZXY7Ci0JVUxPTkcJCQkJCVZpcnR1YWxJZkNudDsKLQotCi0KLQlORElTX1NQSU5fTE9DSyAgICAgICAgICBpcnFfbG9jazsKLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBpcnFfZGlzYWJsZWQ7Ci0KLSNpZmRlZiBSVDI4NzAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgVVNCIHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQlzdHJ1Y3QgdXNiX2NvbmZpZ19kZXNjcmlwdG9yCQkqY29uZmlnOwotCVVJTlQJCQkJCQkJCUJ1bGtJbkVwQWRkcjsJCS8vIGJ1bGstaW4gZW5kcG9pbnQgYW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KLSNpZmRlZiBJTkZfQU1BWk9OX1NFCi0Jc3RydWN0IHNlbWFwaG9yZQkJCVVzYlZlbmRvclJlcV9zZW1hcGhvcmU7Ci0JUFZPSUQJCQkJCQlVc2JWZW5kb3JSZXFCdWY7Ci0jZW5kaWYgLy8gSU5GX0FNQVpPTl9TRSAvLwotCXN0cnVjdCBjb21wbGV0aW9uCQkJVGltZXJRQ29tcGxldGU7Ci0Jc3RydWN0IGNvbXBsZXRpb24JCQltbG1lQ29tcGxldGU7Ci0Jc3RydWN0IGNvbXBsZXRpb24JCQlDbWRRQ29tcGxldGU7Ci0Jd2FpdF9xdWV1ZV9oZWFkX3QJCQkqd2FpdDsKLQotCS8vPT09PT09TG9jayBmb3IgMjg3MCBBVEUKLSNpZmRlZiBSQUxJTktfQVRFCi0JTkRJU19TUElOX0xPQ0sJCQlHZW5lcmljTG9jazsJCS8vIEFURSBUeC9SeCBnZW5lcmljIHNwaW5sb2NrCi0jZW5kaWYgLy8gUkFMSU5LX0FURSAvLwotCi0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qICAgICAgQm90aCBQQ0kvVVNCIHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgIFR4IHJlbGF0ZWQgcGFyYW1ldGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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0JQk9PTEVBTgkJCQkJTWdtdEJ1bGtQZW5kaW5nOwotCVVMT05HCQkJCQlidWxrUmVzZXRSZXFbNl07Ci0jZW5kaWYgLy8gUlQyODcwIC8vCi0KLQkvLyByZXNvdXJjZSBmb3Igc29mdHdhcmUgYmFja2xvZyBxdWV1ZXMKLQlRVUVVRV9IRUFERVIgICAgICAgICAgICBUeFN3UXVldWVbTlVNX09GX1RYX1JJTkddOyAgLy8gNCBBQyArIDEgSENDQQotCU5ESVNfU1BJTl9MT0NLICAgICAgICAgIFR4U3dRdWV1ZUxvY2tbTlVNX09GX1RYX1JJTkddOwkvLyBUeFN3UXVldWUgc3BpbmxvY2sKLQotCVJUTVBfRE1BQlVGICAgICAgICAgICAgIE1nbXREZXNjUmluZzsgICAgICAgICAgICAgICAJLy8gU2hhcmVkIG1lbW9yeSBmb3IgTUdNVCBkZXNjcmlwdG9ycwotCVJUTVBfTUdNVF9SSU5HICAgICAgICAgIE1nbXRSaW5nOwotCU5ESVNfU1BJTl9MT0NLICAgICAgICAgIE1nbXRSaW5nTG9jazsgICAgICAgICAgICAgICAJLy8gUHJpbyBSaW5nIHNwaW5sb2NrCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICBSeCByZWxhdGVkIHBhcmFtZXRlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLQotI2lmZGVmIFJUMjg3MAotCVJYX0NPTlRFWFQJCQkJUnhDb250ZXh0W1JYX1JJTkdfU0laRV07ICAvLyAxIGZvciByZWR1bmRhbnQgbXVsdGlwbGUgSVJQIGJ1bGsgaW4uCi0JTkRJU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AgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQlVSU5UMzIgICAgICAgICAgICAgICAJTUFDVmVyc2lvbjsgICAgICAJLy8gTUFDIHZlcnNpb24uIFJlY29yZCBydDI4NjBDKDB4Mjg2MDAxMDApIG9yIHJ0Mjg2MEQgKDB4Mjg2MDAxMDEpLi4KLQotCS8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCS8vIEUyUFJPTQotCS8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCVVMT05HICAgICAgICAgICAgICAgICAgIEVlcHJvbVZlcnNpb247ICAgICAgICAgIC8vIGJ5dGUgMDogdmVyc2lvbiwgYnl0ZSAxOiByZXZpc2lvbiwgYnl0ZSAyfjM6IHVudXNlZAotCVVDSEFSICAgICAgICAgICAgICAgICAgIEVFUFJPTUFkZHJlc3NOdW07ICAgICAgIC8vIDkzYzQ2PTYgIDkzYzY2PTgKLQlVU0hPUlQgICAgICAgICAgICAgICAgICBFRVBST01EZWZhdWx0VmFsdWVbTlVNX0VFUFJPTV9CQlBfUEFSTVNdOwotCUJPT0xFQU4gICAgICAgICAgICAgICAgIEVlcHJvbUFjY2VzczsKLQlVQ0hBUiAgICAgICAgICAgICAgICAgICBFRnVzZVRhZzsKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBGaXJtd2FyZVZlcnNpb247ICAgICAgICAvLyBieXRlIDA6IE1pbm9yIHZlcnNpb24sIGJ5dGUgMTogTWFqb3IgdmVyc2lvbiwgb3RoZXJ3aXNlIHVudXNlZC4KLQotCS8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCS8vIEJCUCBDb250cm9sCi0JLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JVUNIQVIgICAgICA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Bjb3VudGVycyBmb3IgRHluYW1pYyBUWCBSYXRlIFN3aXRjaGluZwotCVBSSVZBVEVfU1RSVUMgICAgICAgICAgIFByaXZhdGVJbmZvOyAgICAgICAgICAgICAgICAvLyBQcml2YXRlIGluZm9ybWF0aW9uICYgY291bnRlcnMKLQotCS8vIGZsYWdzLCBzZWUgZlJUTVBfQURBUFRFUl94eHggZmxhZ3MKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgICAgICAgICAgLy8gUmVwcmVzZW50IGN1cnJlbnQgZGV2aWNlIHN0YXR1cwotCi0JLy8gY3VycmVudCBUWCBzZXF1ZW5jZSAjCi0JVVNIT1JUICAgICAgICAgICAgICAgICAgU2VxdWVuY2U7Ci0KLSNpZmRlZiBVTkRFUl9DRQotCU5ESVNfSEFORExFICAgICAgICAgICAgIGhHaUlTUjsKLSNlbmRpZgotCi0KLQkvLyBDb250cm9sIGRpc2Nvbm5lY3QgLyBjb25uZWN0IGV2ZW50IGdlbmVyYXRpb24KLQkvLysrK0RpZG4ndCB1c2VkIGFueW1vcmUKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBMaW5rRG93blRpbWU7Ci0JLy8tLS0KLQlVTE9ORyAgICAgICAgICAgICAgICAgICBMYXN0UnhSYXRlOwotCVVMT05HICAgICAgICAgICAgICAgICAgIExhc3RUeFJhdGU7Ci0JLy8rKytVc2VkIG9ubHkgZm9yIFN0YXRpb24KLQlCT09MRUFOICAgICAgICAgICAgICAgICBiQ29uZmlnQ2hhbmdlZDsgICAgICAgICAvLyBDb25maWcgQ2hhbmdlIGZsYWcgZm9yIHRoZSBzYW1lIFNTSUQgc2V0dGluZwotCS8vLS0tCi0KLQlVTE9ORyAgICAgICAgICAgICAgICAgICBFeHRyYUluZm87ICAgICAgICAgICAgICAvLyBFeHRyYSBpbmZvcm1hdGlvbiBmb3IgZGlzcGxheWluZyBzdGF0dXMKLQlVTE9ORyAgICAgICAgICAgICAgICAgICBTeXN0ZW1FcnJvckJpdG1hcDsgICAgICAvLyBiMDogRTJQUk9NIHZlcnNpb24gZXJyb3IKLQotCS8vKysrRGlkbid0IHVzZWQgYW55bW9yZQotCVVMT05HICAgICAgICAgICAgICAgICAgIE1hY0ljVmVyc2lvbjsgICAgICAgICAgIC8vIE1BQy9CQlAgc2VyaWFsIGludGVyZmFjZSBpc3N1ZSBzb2x2ZWQgYWZ0ZXIgdmVyLkQKLQkvLy0tLQotCi0JLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JLy8gU3lzdGVtIGV2ZW50IGxvZwotCS8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCVJUXzgwMl8xMV9FVkVOVF9UQUJMRSAgIEV2ZW50VGFiOwotCi0KLQlCT09MRUFOCQlIVENFbmFibGU7Ci0KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogICAgICBTdGF0aXN0aWMgcmVsYXRlZCBwYXJhbWV0ZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpZmRlZiBSVDI4NzAKLQlVTE9ORwkJCQkJCUJ1bGtPdXREYXRhT25lU2VjQ291bnQ7Ci0JVUxPTkcJCQkJCQlCdWxrSW5EYXRhT25lU2VjQ291bnQ7Ci0JVUxPTkcJCQkJCQlCdWxrTGFzdE9uZVNlY0NvdW50OyAvLyBCdWxrT3V0RGF0YU9uZVNlY0NvdW50ICsgQnVsa0luRGF0YU9uZVNlY0NvdW50Ci0JVUxPTkcJCQkJCQl3YXRjaERvZ1J4Q250OwotCVVMT05HCQkJCQkJd2F0Y2hEb2dSeE92ZX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3RlOgotCQlDYWxsIHRoaXMgZnVuY3Rpb24gd2hlbiByZWFkIG9yIHVwZGF0ZSBkZXNjcmlwdG9yCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotCi0jaWZkZWYgUlQyODcwCi1zdGF0aWMgaW5saW5lIFZPSUQJUlRNUERlc2NyaXB0b3JFbmRpYW5DaGFuZ2UoCi0JSU4JUFVDSEFSCQkJcERhdGEsCi0JSU4JVUxPTkcJCQlEZXNjcmlwdG9yVHlwZSkKLXsKLQkqKChVSU5UMzIgKikocERhdGEpKSA9IFNXQVAzMigqKChVSU5UMzIgKikocERhdGEpKSk7Ci19Ci0jZW5kaWYgLy8gUlQyODcwIC8vCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JUm91dGluZSBEZXNjcmlwdGlvbjoKLQkJRW5kaWFuIGNvbnZlcnNpb24gb2YgYWxsIGtpbmRzIG9mIDgwMi4xMSBmcmFtZXMgLgotCi0JQXJndW1lbnRzOgotCQlwQWQgCVBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQkJcERhdGEJCQlQb2ludGVyIHRvIHRoZSA4MDIuMTEgZnJhbWUgc3RydWN0dXJlCi0JCURpciAJCQlEaXJlY3Rpb24gb2YgdGhlIGZyYW1lCi0JCUZyb21SeERvbmVJbnQJQ2FsbGVyIGlzIGZyb20gUnhEb25lIGludGVycnVwdAotCi0JUmV0dXJuIFZhbHVlOgotCQlOb25lCi0KLQlOb3RlOgotCQlDYWxsIHRoaXMgZnVuY3Rpb24gd2hlbiByZWFkIG9yIHVwZGF0ZSBidWZmZXIgZGF0YQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLXN0YXRpYyBpbmxpbmU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LT5BZGRyMzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJX3BTQSA9IChQVUNIQVIpX3BSeEJsay0+cEhlYWRlciArIHNpemVvZihIRUFERVJfODAyXzExKTsgICAgICAgICAgICAgICAgXAotCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlpZiAoUlhfQkxLX1RFU1RfRkxBRyhfcFJ4QmxrLCBmUlhfSU5GUkEpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlcCi0JCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCV9wREEgPSBfcFJ4QmxrLT5wSGVhZGVyLT5BZGRyMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlpZiAoUlhfQkxLX1RFU1RfRkxBRyhfcFJ4QmxrLCBmUlhfRExTKSkJCQkJCQkJCQlcCi0JCQlfcFNBID0gX3BSeEJsay0+cEhlYWRlci0+QWRkcjI7CQkJCQkJCQkJCVwKLQkJZWxzZQkJCQkJCQkJCQkJCQkJCQkJXAotCQkJX3BTQSA9IF9wUnhCbGstPnBIZWFkZXItPkFkZHIzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQlfcERBID0gX3BSeEJsay0+cEhlYWRlci0+QWRkcjE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCV9wU0EgPSBfcFJ4QmxrLT5wSGVhZGVyLT5BZGRyMjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQkJCQkJCQkJCQkJCQkJCQkJXAotCUNPTlZFUlRfVE9fODAyXzMoX3BIZWFkZXI4MDJfMywgX3BEQSwgX3BTQSwgX3BSeEJsay0+cERhdGEsIAkJCQlcCi0JCV9wUnhCbGstPkRhdGFTaXplLCBfcFJlbW92ZWRMTENTTkFQKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLSNlbmRpZiAvLyBDT05GSUdfU1RBX1NVUFBPUlQgLy8KLQotCi1CT09MRUFOIEFQRm93YXJkV2lyZWxlc3NTdGFUb1dpcmVsZXNzU3RhKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBORElTX1BBQ0tFVAlwUGFja2V0LAotCUlOCVVMT05HCQkJRnJvbVdoaWNoQlNTSUQpOwotCi1WT0lEIEFubm91bmNlX29yX0ZvcndhcmRfODAyXzNfUGFja2V0KAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBORElTX1BBQ0tFVAlwUGFja2V0LAotCUlOCVVDSEFSCQkJRnJvbVdoaWNoQlNTSUQpOwotCi1WT0lEIFN0Y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AgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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cm11dGVkIGtleSAqLwotCUlOCVVDSEFSCSpDSywJCQkvKiBpbnB1dCBDS0lQIGtleSAqLwotCUlOCVVDSEFSCXRvRHNGcm9tRHMsCQkvKiBpbnB1dCB0b0RzL0Zyb21EcyBiaXRzICovCi0JSU4JVUNIQVIJKnBpdik7CQkJLyogaW5wdXQgcG9pbnRlciB0byBJViAqLwotCi1WT0lECVJUTVBDa2lwTWljSW5pdCgKLQlJTglQTUlDX0NPTlRFWFQJCXBDb250ZXh0LAotCUlOCVBVQ0hBUgkJCQlDSyk7Ci0KLVZPSUQgUlRNUE1pY1VwZGF0ZSgKLSAgICBJTiAgUE1JQ19DT05URVhUICAgICAgICBwQ29udGV4dCwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBwT2N0ZXRzLAotICAgIElOICBJTlQgICAgICAgICAgICAgICAgIGxlbik7Ci0KLVVMT05HIFJUTVBNaWNHZXRDb2VmZmljaWVudCgKLSAgICBJTiAgUE1JQ19DT05URVhUICAgICAgICAgcENvbnRleHQpOwotCi1WT0lEIHhvcl8xMjgoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgYSwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBiLAotICAgIE9VVCBQVUNIQVIgICAgICAgICAgICAgIG91dCk7Ci0KLVVDSEFSIFJUTVBDa2lwU2JveCgKLSAgICBJTiAgVUNIQVIgICAgICAgICAgICAgICBhKTsKLQotVk9JRCB4b3JfMzIoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAgYSwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgICAgICBiLAotICAgIE9VVCBQVUNIQVIgICAgICAgICAgICAgIG91dCk7Ci0KLVZPSUQgbmV4dF9rZXkoCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICAgICAga2V5LAotICAgIElOICBJTlQgICAgICAgICAgICAgICAgIHJvdW5kKTsKLQotVk9JRCBieXRlX3N1YigKLSAgICBJTiAgUFVDSEFSICAgICAgIC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V0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6Ci0gICAgcnRtcF9kZWYuaAotCi0gICAgQWJzdHJhY3Q6Ci0gICAgTWluaXBvcnQgcmVsYXRlZCBkZWZpbml0aW9uIGhlYWRlcgotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgICBXaGVuICAgICAgIC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AgICAgICAgICAgICAgICAgICAgNQotI2RlZmluZSBCU1M2ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgQlNTNyAgICAgICAgICAgICAgICAgICAgICAgICAgICA3Ci0KLQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIExlbmd0aCBkZWZpbml0aW9ucwotI2RlZmluZSBQRUVSX0tFWV9OTyAgICAgICAgICAgICAgICAgICAgIDIKLSNkZWZpbmUgTUFDX0FERFJfTEVOICAgICAgICAgICAgICAgICAgICA2Ci0jZGVmaW5lIFRJTUVTVEFNUF9MRU4gICAgICAgICAgICAgICAgICAgOAotI2RlZmluZSBNQVhfTEVOX09GX1NVUFBPUlRFRF9SQVRFUyAgICAgIE1BWF9MRU5HVEhfT0ZfU1VQUE9SVF9SQVRFUyAvLyAxLCAyLCA1LjUsIDExLCA2LCA5LCAxMiwgMTgsIDI0LCAzNiwgNDgsIDU0Ci0jZGVmaW5lIE1BWF9MRU5fT0ZfS0VZICAgICAgICAgICAgICAgICAgMzIgICAgICAvLyAzMiBvY3RldHMgPT0gMjU2IGJpdHMsIFJlZGVmaW5lIGZvciBXUEEKLSNkZWZpbmUgTUFYX05VTV9PRl9DSEFOTkVMUyAgICAgICAgICAgICBNQVhfTlVNX09GX0NIUyAgICAgIC8vIDE0IGNoYW5uZWxzIEAyLjRHICsgIDEyQFVOSUkgKyA0IEBNTUFDICsgMTEgQEhpcGVyTEFOMiArIDcgQEphcGFuICsgMSBhcyBOVUxMIHRlcm1pbmF0aW9uCi0jZGVmaW5lIE1BWF9OVU1fT0ZfMTFKQ0hBTk5FTFMgICAgICAgICAgICAgMjAgICAgICAvLyAxNCBjaGFubmVscyBAMi40RyArICAxMkBVTklJICsgNCBATU1BQyArIDExIEBIaXBlckxBTjIgKyA3IEBKYXBhbiArIDEgYXMgTlVMTCB0ZXJtaW5hdGlvbgotI2RlZmluZSBNQVhfTEV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fU0FWRSAgICAgICAgICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgUFdSX01NUFMgICAgICAgICAgICAgICAgICAgICAgICAyCQkJLy9NSU1PIHBvd2VyIHNhdmUKLS8vI2RlZmluZSBQV1JfVU5LTk9XTiAgICAgICAgICAgICAgICAgICAyCi0KLS8vIEF1dGggYW5kIEFzc29jIG1vZGUgcmVsYXRlZCBkZWZpbml0aW9ucwotI2RlZmluZSBBVVRIX01PREVfT1BFTiAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgQVVUSF9NT0RFX0tFWSAgICAgICAgICAgICAgICAgICAweDAxCi0vLyNkZWZpbmUgQVVUSF9NT0RFX0FVVE9fU1dJVENIICAgICAgICAgMHgwMwotLy8jZGVmaW5lIEFVVEhfTU9ERV9ERUFVVEggICAgICAgICAgICAgIDB4MDQKLS8vI2RlZmluZSBBVVRIX01PREVfVVBMQVlFUiAgICAgICAgICAgICAweDA1IC8vIHJlc2VydmVkIGZvciA4MDIuMTFpIHVzZQotCi0vLyBCU1MgVHlwZSBkZWZpbml0aW9ucwotI2RlZmluZSBCU1NfQURIT0MgICAgICAgICAgICAgICAgICAgICAgIDAgIC8vID0gTmRpczgwMl8xMUlCU1MKLSNkZWZpbmUgQlNTX0lORlJBICAgICAgICAgICAgICAgICAgICAgICAxICAvLyA9IE5kaXM4MDJfMTFJbmZyYXN0cnVjdHVyZQotI2RlZmluZSBCU1NfQU5ZICAgICAgICAgICAgICAgICAgICAgICAgIDIgIC8vID0gTmRpczgwMl8xMUF1dG9Vbmtub3duCi0jZGVmaW5lIEJTU19NT05JVE9SCQkJICAgICAgICAgICAgMyAgLy8gPSBOZGlzODAyXzExTW9uaXRvcgotCi0KLS8vIFJlYXNvbiBjb2RlIGRlZmluaXRpb25zCi0jZGVmaW5lIFJFQVNPTl9SRVNFUlZFRCAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBSRUFTT05fVU5TUEVDSUZZICAgICAgICAgICAgICAgIDEKLSNkZ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EICAgICAgICAgICAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgSUVfU1VQUF9SQVRFUyAgICAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIElFX0ZIX1BBUk0gICAgICAgICAgICAgICAgICAgICAgMgotI2RlZmluZSBJRV9EU19QQVJNICAgICAgICAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgSUVfQ0ZfUEFSTSAgICAgICAgICAgICAgICAgICAgICA0Ci0jZGVmaW5lIElFX1RJTSAgICAgICAgICAgICAgICAgICAgICAgICAgNQotI2RlZmluZSBJRV9JQlNTX1BBUk0gICAgICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgSUVfQ09VTlRSWSAgICAgICAgICAgICAgICAgICAgICA3ICAgICAvLyA4MDIuMTFkCi0jZGVmaW5lIElFXzgwMl8xMURfUkVRVUVTVCAgICAgICAgICAgICAgMTAgICAgLy8gODAyLjExZAotI2RlZmluZSBJRV9RQlNTX0xPQUQgICAgICAgICAgICAgICAgICAgIDExICAgIC8vIDgwMi4xMWUgZDkKLSNkZWZpbmUgSUVfRURDQV9QQVJBTUVURVIgICAgICAgICAgICAgICAxMiAgICAvLyA4MDIuMTFlIGQ5Ci0jZGVmaW5lIElFX1RTUEVDICAgICAgICAgICAgICAgICAgICAgICAgMTMgICAgLy8gODAyLjExZSBkOQotI2RlZmluZSBJRV9UQ0xBUyAgICAgICAgICAgICAgICAgICAgICAgIDE0ICAgIC8vIDgwMi4xMWUgZDkKLSNkZWZpbmUgSUVfU0NIRURVTEUgICAgICAgICAgICAgICAgICAgICAxNSAgICAvLyA4MDIuMTFlIGQ5Ci0jZGVmaW5lIElFX0NIQUxMRU5HRV9URVhUICAgICAgICAgICAgICAgMTYKLSNkZWZpbmUgSUVfUE9XRVJfQ09OU1RSQUlOVCAgICAgICAgICAgICAzMiAgICAvLyA4MDIuMTFoIGQzLjMKLSNkZWZpbmUgSUVfUE9XRVJfQ0FQQUJJTElUWSAgICAgICAgICAgICAzMyAgICAvLyA4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gICAxNTAgICAvLyBDQ1ggMi4wIGZvciBBUCB0cmFuc21pdCBwb3dlcgotI2RlZmluZSBJRV9NRUFTVVJFTUVOVF9DQVBBQklMSVRZICAgICAgIDIyMSAgIC8vIENDWCAyLjAKLSNkZWZpbmUgSUVfQ0NYX1YyICAgICAgICAgICAgICAgICAgICAgICAyMjEKLSNkZWZpbmUgSUVfQUlST05FVF9JUEFERFJFU1MgICAgICAgICAgICAxNDkgICAvLyBDQ1ggSUQgOTVIIGZvciBJUCBBZGRyZXNzCi0jZGVmaW5lIElFX0FJUk9ORVRfQ0NLTVJFQVNTT0MgICAgICAgICAgMTU2ICAgLy8gQ0NYIElEIDlDSCBmb3IgQ0NLTSBSZWFzc29jaWF0aW9uIFJlcXVlc3QgZWxlbWVudAotI2RlZmluZSBDS0lQX05FR09USUFUSU9OX0xFTkdUSCAgICAgICAgIDMwCi0jZGVmaW5lIEFJUk9ORVRfSVBBRERSRVNTX0xFTkdUSCAgICAgICAgMTAKLSNkZWZpbmUgQUlST05FVF9DQ0tNUkVBU1NPQ19MRU5HVEggICAgICAyNAotCi0vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gTUxNRSBzdGF0ZSBtYWNoaW5lIGRlZmluaXRpb24KLS8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8vIFNUQSBNTE1FIHN0YXRlIG1haGNpbmVzCi0jZGVmaW5lIEFTU09DX1NUQVRFX01BQ0hJTkUgICAgICAgICAgICAgMQotI2RlZmluZSBBVVRIX1NUQVRFX01BQ0hJTkUgICAgICAgICAgICAgIDIKLSNkZWZpbmUgQVVUSF9SU1BfU1RBVEVfTUFDSElORSAgICAgICAgICAzCi0jZGVmaW5lIFNZTkNfU1RBVEVfTUFDSElORSAgICAgICAgICAgICAgNAotI2RlZmluZSBNTE1FX0NOVExfU1RBVEVfTUFDSElORSAgICAgICA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1dBSVRfSk9JTiAgICAgICAgICAgICAgICAgIDIKLSNkZWZpbmUgQ05UTF9XQUlUX1JFQVNTT0MgICAgICAgICAgICAgICAzCi0jZGVmaW5lIENOVExfV0FJVF9TVEFSVCAgICAgICAgICAgICAgICAgNAotI2RlZmluZSBDTlRMX1dBSVRfQVVUSCAgICAgICAgICAgICAgICAgIDUKLSNkZWZpbmUgQ05UTF9XQUlUX0FTU09DICAgICAgICAgICAgICAgICA2Ci0jZGVmaW5lIENOVExfV0FJVF9BVVRIMiAgICAgICAgICAgICAgICAgNwotI2RlZmluZSBDTlRMX1dBSVRfT0lEX0xJU1RfU0NBTiAgICAgICAgIDgKLSNkZWZpbmUgQ05UTF9XQUlUX09JRF9ESVNBU1NPQyAgICAgICAgICA5Ci0jaWZkZWYgUlQyODcwCi0jZGVmaW5lIENOVExfV0FJVF9TQ0FOX0ZPUl9DT05ORUNUICAgICAgMTAKLSNlbmRpZiAvLyBSVDI4NzAgLy8KLQotI2RlZmluZSBNVDJfQVNTT0NfQ09ORiAgICAgICAgICAgICAgICAgIDM0Ci0jZGVmaW5lIE1UMl9BVVRIX0NPTkYgICAgICAgICAgICAgICAgICAgMzUKLSNkZWZpbmUgTVQyX0RFQVVUSF9DT05GICAgICAgICAgICAgICAgICAzNgotI2RlZmluZSBNVDJfRElTQVNTT0NfQ09ORiAgICAgICAgICAgICAgIDM3Ci0jZGVmaW5lIE1UMl9SRUFTU09DX0NPTkYgICAgICAgICAgICAgICAgMzgKLSNkZWZpbmUgTVQyX1BXUl9NR01UX0NPTkYgICAgICAgICAgICAgICAzOQotI2RlZmluZSBNVDJfSk9JTl9DT05GICAgICAgICAgICAgICAgICAgIDQwCi0jZGVmaW5lIE1UMl9TQ0FOX0NPTkYgICAgICAgICAgICAgICAgICAgNDEKLSNkZWZpbmUgTVQyX1NUQVJUX0NPTkYgICAgICAgICAgICAgICAgICA0MgotI2RlZmluZSBNVDJfR0VUX0NPTkYgICAgICAgICAgICAgICAgICAgIDQzCi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TWU5DX1NUQVRFICAgICAgICAgICAgICAgICAgMwotCi0jZGVmaW5lIFNZTkNfTUFDSElORV9CQVNFICAgICAgICAgICAgICAgMAotI2RlZmluZSBNVDJfTUxNRV9TQ0FOX1JFUSAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgTVQyX01MTUVfSk9JTl9SRVEgICAgICAgICAgICAgICAxCi0jZGVmaW5lIE1UMl9NTE1FX1NUQVJUX1JFUSAgICAgICAgICAgICAgMgotI2RlZmluZSBNVDJfUEVFUl9CRUFDT04gICAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgTVQyX1BFRVJfUFJPQkVfUlNQICAgICAgICAgICAgICA0Ci0jZGVmaW5lIE1UMl9QRUVSX0FUSU0gICAgICAgICAgICAgICAgICAgNQotI2RlZmluZSBNVDJfU0NBTl9USU1FT1VUICAgICAgICAgICAgICAgIDYKLSNkZWZpbmUgTVQyX0JFQUNPTl9USU1FT1VUICAgICAgICAgICAgICA3Ci0jZGVmaW5lIE1UMl9BVElNX1RJTUVPVVQgICAgICAgICAgICAgICAgOAotI2RlZmluZSBNVDJfUEVFUl9QUk9CRV9SRVEgICAgICAgICAgICAgIDkKLSNkZWZpbmUgTUFYX1NZTkNfTVNHICAgICAgICAgICAgICAgICAgICAxMAotCi0jZGVmaW5lIFNZTkNfRlVOQ19TSVpFICAgICAgICAgICAgICAgICAgKE1BWF9TWU5DX1NUQVRFICogTUFYX1NZTkNfTVNHKQotCi0vL01lc3NhZ2VzIGZvciB0aGUgRExTIHN0YXRlIG1hY2hpbmUKLSNkZWZpbmUgRExTX0lETEUJCQkJCQkwCi0jZGVmaW5lIE1BWF9ETFNfU1RBVEUJCQkJCTEKLQotI2RlZmluZSBETFNfTUFDSElORV9CQVNFCQkJCTAKLSNkZWZpbmUgTVQyX01MTUVfRExTX1JFUQkJCSAgICAwCi0jZGVmaW5lIE1UMl9QRUVSX0RMU19SRVEJCQkgICAgMQotI2RlZmluZSBNVDJfUEVFUl9ETFNfUlNQCQkJ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i0vLwotLy8gQVAncyBXUEEgc3RhdGUgbWFjaGluZTogc3RhdGVzLCBldmVudHMsIHRvdGFsIGZ1bmN0aW9uICMKLS8vCi0jZGVmaW5lIEFQX1dQQV9QVEsgICAgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBBUF9NQVhfV1BBX1BUS19TVEFURSAgICAgICAgICAgIDEKLQotI2RlZmluZSBBUF9XUEFfTUFDSElORV9CQVNFICAgICAgICAgICAgIDAKLSNkZWZpbmUgQVBNVDJfRUFQUGFja2V0ICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIEFQTVQyX0VBUE9MU3RhcnQgICAgICAgICAgICAgICAgMQotI2RlZmluZSBBUE1UMl9FQVBPTExvZ29mZiAgICAgICAgICAgICAgIDIKLSNkZWZpbmUgQVBNVDJfRUFQT0xLZXkgICAgICAgICAgICAgICAgICAzCi0jZGVmaW5lIEFQTVQyX0VBUE9MQVNGQWxlcnQgICAgICAgICAgICAgNAotI2RlZmluZSBBUF9NQVhfV1BBX01TRyAgICAgICAgICAgICAgICAgIDUKLQotI2RlZmluZSBBUF9XUEFfRlVOQ19TSVpFICAgICAgICAgICAgICAgIChBUF9NQVhfV1BBX1BUS19TVEFURSAqIEFQX01BWF9XUEFfTVNHKQotCi0KLQotLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotLy8gdmFsdWUgZG9tYWluIG9mIDgwMi4xMSBoZWFkZXIgRkMuVHl0ZSwgd2hpY2ggaXMgYjMuLmIyIG9mIHRoZSAxc3QtYnl0ZSBvZiBNQUMgaGVhZGVyCi0jZGVmaW5lIEJUWVBFX01HTVQgICAgICAgICAgICAgICAgICAwCi0jZGVmaW5lIEJUWVBFX0NOVEwgICAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIEJUWVBFX0RBVEEgICAgICAgICAgICAgICAgICAyCi0KLS8vIHZhbHVlIGRvbWFpbiBvZi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SAgICAgICAgICAgICAgICAgICAgMgotI2RlZmluZSBNQ1NfTE9OR1BfUkFURV8xMSAgICAgICAgICAgICAgICAgICAgIDMKLSNkZWZpbmUgTUNTX1NIT1JUUF9SQVRFXzEgICAgICAgICAgICAgICAgICAgICAgNAkgLy8gbG9uZyBwcmVhbWJsZSBDQ0sgMU1icHMuIHNob3J0IGlzIGZvcmJpZGRlbiBpbiAxTWJwcwotI2RlZmluZSBNQ1NfU0hPUlRQX1JBVEVfMiAgICAgICAgICAgICAgICAgICAgICA1CS8vIHNob3J0IHByZWFtYmxlIENDSyAyTWJwcwotI2RlZmluZSBNQ1NfU0hPUlRQX1JBVEVfNV81ICAgICAgICAgICAgICAgICAgICA2Ci0jZGVmaW5lIE1DU19TSE9SVFBfUkFURV8xMSAgICAgICAgICAgICAgICAgICAgIDcKLS8vIFRvIHNlbmQgZHVwbGljYXRlIGxlZ2FjeSBPRkRNLiBzZXQgQlc9QldfNDAuICBTR0kuU1RCQyBhcmUgcmVzZXJ2ZWQKLSNkZWZpbmUgTUNTX1JBVEVfNiAgICAgICAgICAgICAgICAgICAgICAwICAgLy8gbGVnYWN5IE9GRE0KLSNkZWZpbmUgTUNTX1JBVEVfOSAgICAgICAgICAgICAgICAgICAgICAxICAgLy8gT0ZETQotI2RlZmluZSBNQ1NfUkFURV8xMiAgICAgICAgICAgICAgICAgICAgIDIgICAvLyBPRkRNCi0jZGVmaW5lIE1DU19SQVRFXzE4ICAgICAgICAgICAgICAgICAgICAgMyAgIC8vIE9GRE0KLSNkZWZpbmUgTUNTX1JBVEVfMjQgICAgICAgICAgICAgICAgICAgICA0ICAvLyBPRkRNCi0jZGVmaW5lIE1DU19SQVRFXzM2ICAgICAgICAgICAgICAgICAgICAgNSAgIC8vIE9GRE0KLSNkZWZpbmUgTUNTX1JBVEVfNDggICAgICAgICAgICAgICAgICAgICA2ICAvLyBPRkRNCi0jZGVmaW5lIE1DU19SQVRFXzU0ICAgICAgICAgICAgICAgICAgICAgNyAvLy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yByZXNlcnZlZAotI2RlZmluZSBNQ1NGQktfVU5TT0xJQ0lUCTIJLy8gb25seSBzdXBwb3J0IHVuc29saWN0IG1jcyBmZWVkYmFjawotI2RlZmluZSBNQ1NGQktfTVJRCTMJLy8gcmVzcG9uc2UgdG8gYm90aCBNUlEgYW5kIHVuc29saWN0IG1jcyBmZWVkYmFjawotCi0vLyBNSU1PIHBvd2VyIHNhZmUKLSNkZWZpbmUJTU1QU19TVEFUSUMJMAotI2RlZmluZQlNTVBTX0RZTkFNSUMJCTEKLSNkZWZpbmUgICBNTVBTX1JTVgkJMgotI2RlZmluZSBNTVBTX0VOQUJMRQkJMwotCi0KLS8vIEEtTVNEVSBzaXplCi0jZGVmaW5lCUFNU0RVXzAJMAotI2RlZmluZQlBTVNEVV8xCQkxCi0KLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLQotLy8gTUNTIHVzZSA3IGJpdHMKLSNkZWZpbmUgVFhSQVRFTUlNTwkJMHg4MAotI2RlZmluZSBUWFJBVEVNQ1MJCTB4N0YKLSNkZWZpbmUgVFhSQVRFT0ZETQkJMHg3RgotI2RlZmluZSBSQVRFXzEgICAgICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBSQVRFXzIgICAgICAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBSQVRFXzVfNSAgICAgICAgICAgICAgICAgICAgMgotI2RlZmluZSBSQVRFXzExICAgICAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBSQVRFXzYgICAgICAgICAgICAgICAgICAgICAgNCAgIC8vIE9GRE0KLSNkZWZpbmUgUkFURV85ICAgICAgICAgICAgICAgICAgICAgIDUgICAvLyBPRkRNCi0jZGVmaW5lIFJBVEVfMTIgICAgICAgICAgICAgICAgICAgICA2ICAgLy8gT0ZETQotI2RlZmluZSBSQVRFXzE4ICAgICAgICAgICAgICAgICAgICAgNyAgIC8vIE9GRE0KLSNkZWZpbmUgUkFURV8yNCAgICAgICAgICAgICAgICAgICAgIDggICAvLyBPRkRNCi0jZGVmaW5lIFJBVEVfMzYgICAgICAgICAgICAgICAgICAgICA5ICAgLy8gT0ZETQotI2RlZmluZSBSQVRFXzQ4ICAgICAgICAgICAgICAgICAgICAgMTAgIC8vIE9GRE0KLSNkZWZpbmUgUkFURV81NCAgICAgICAgICAgICAgICAgICAgIDExICAvLyBPRkRNCi0jZGVmaW5lIFJBVEVfRklSU1RfT0ZETV9SQVRFICAgICAgICBSQVRFXzYKLSNkZWZpbmUgUkFURV9MQVNUX09GRE1fUkFURSAgICAgICAgCVJBVEVfNTQKLSNkZWZpbmUgUkFURV82XzUgICAgICAgICAgICAgICAgICAgIDEyICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8xMyAgICAgICAgICAgICAgICAgICAgIDEzICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8xOV81ICAgICAgICAgICAgICAgICAgIDE0ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8yNiAgICAgICAgICAgICAgICAgICAgIDE1ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8zOSAgICAgICAgICAgICAgICAgICAgIDE2ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV81MiAgICAgICAgICAgICAgICAgICAgIDE3ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV81OF81ICAgICAgICAgICAgICAgICAgIDE4ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV82NSAgICAgICAgICAgICAgICAgICAgIDE5ICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV83OCAgICAgICAgICAgICAgICAgICAgIDIwICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8xMDQgICAgICAgICAgICAgICAgICAgIDIxICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8xMTcgICAgICAgICAgICAgICAgICAgIDIyICAvLyBIVCBtaXgKLSNkZWZpbmUgUkFURV8xMzAgICAgICAgICAgICAgICAgICAgIDIzICAvLyBIVCBtaXgKLS8vI2RlZmluZSBSQVRFX0FVVE9fU1dJVENIICAgICAgICAgICAgMjU1IC8vIGZvciBTdGFDZmcuRml4ZWRUeFJhdGUgb25seQotI2RlZmluZSBIVFJBVEVfMCAgICAgICAgICAgICAgICAgICAgICAxMgotI2RlZmluZSBSQVRFX0ZJUlNUX01NX1JBVEUgICAgICAgIEhUUkFURV8wCi0jZGVmaW5lIFJBVEVfRklSU1RfSFRfUkFURSAgICAgICAgSFRSQVRFXzAKLSNkZWZpbmUgUkFURV9MQVNUX0hUX1JBVEUgICAgICAgIEhUUkFURV8wCi0KLS8vIHBUeFdJLT50eG9wCi0jZGVmaW5lIElGU19IVFRYT1AgICAgICAgICAgICAgICAgIDAJLy8gVGhlIHR4b3Agd2lsbCBiZSBoYW5kbGVzIGJ5IEFTSUMuCi0jZGVmaW5lIElGU19QSUZTICAgICAgICAgICAgICAgICAgICAxCi0jZGVmaW5lIElGU19TSUZTICAgICAgICAgICAgICAgICAgICAyCi0jZGVmaW5lIElGU19CQUNLT0ZGICAgICAgICAgICAgICAgICAzCi0KLS8vIHBUeEQtPlJldHJ5TW9kZQotI2RlZmluZSBMT05HX1JFVFJZICAgICAgICAgICAgICAgICAgMQotI2RlZmluZSBTSE9SVF9SRVRSWSAgICAgICAgICAgICAgICAgMAotCi0vLyBDb3VudHJ5IFJlZ2lvbiBkZWZpbml0aW9uCi0jZGVmaW5lIFJFR0lPTl9NSU5JTVVNX0JHX0JBTkQgICAgICAgICAgICAwCi0jZGVmaW5lIFJFR0lPTl8wX0JHX0JBTkQgICAgICAgICAgICAgICAgICAwICAgICAgIC8vIDEtMTEKLSNkZWZpbmUgUkVHSU9OXzFfQkdfQkFORCAgICAgICAgICAgICAgICAgIDEgICAgICAgLy8gMS0xMwotI2RlZmluZSBSRUdJT05fMl9CR19CQU5EICAgICAgICAgICAgICAgICAgMiAgICAgICAvLyAxMC0xMQotI2RlZmluZSBSRUdJT05fM19CR19CQU5EICAgICAgICAgICAgICAgICAgMyAgICAgICAvLyAxMC0xMwotI2RlZmluZSBSRUdJT05fNF9CR19CQU5EICAgICAgICAgICAgICAgICAgNCAgICAgICAvLyAxNAotI2RlZmluZSBSRUdJT05fNV9CR19CQU5EICAgICAgICAgICAgICAgICAgNSAgICAgICAvLyAxLTE0Ci0jZGVmaW5lIFJFR0lPTl82X0JHX0JBTkQgICAgICAgICAgICAgICAgICA2ICAgICAgIC8vIDMtOQotI2RlZmluZSBSRUdJT05fN19CR19CQU5EICAgICAgICAgICAgICAgICAgNyAgICAgICAvLyA1LTEzCi0jZGVmaW5lIFJFR0lPTl8zMV9CR19CQU5EICAgICAgICAgICAgICAgICAzMSAgICAgICAvLyA1LTEzCi0jZGVmaW5lIFJFR0lPTl9NQVhJTVVNX0JHX0JBTkQgICAgICAgICAgICA3Ci0KLSNkZWZpbmUgUkVHSU9OX01JTklNVU1fQV9CQU5EICAgICAgICAgICAgIDAKLSNkZWZpbmUgUkVHSU9OXzBfQV9CQU5EICAgICAgICAgICAgICAgICAgIDAgICAgICAgLy8gMzYsIDQwLCA0NCwgNDgsIDUyLCA1NiwgNjAsIDY0LCAxNDksIDE1MywgMTU3LCAxNjEsIDE2NQotI2RlZmluZSBSRUdJT05fMV9BX0JBTkQgICAgICAgICAgICAgICAgICAgMSAgICAgICAvLyAzNiwgNDAsIDQ0LCA0OCwgNTIsIDU2LCA2MCwgNjQsIDEwMCwgMTA0LCAxMDgsIDExMiwgMTE2LCAxMjAsIDEyNCwgMTI4LCAxMzIsIDEzNiwgMTQwCi0jZGVmaW5lIFJFR0lPTl8yX0FfQkFORCAgICAgICAgICAgICAgICAgICAyICAgICAgIC8vIDM2LCA0MCwgNDQsIDQ4LCA1MiwgNTYsIDYwLCA2NAotI2RlZmluZSBSRUdJT05fM19BX0JBTkQgICAgICAgICAgICAgICAgICAgMyAgICAgICAvLyA1MiwgNTYsIDYwLCA2NCwgMTQ5LCAxNTMsIDE1NywgMTYxCi0jZGVmaW5lIFJFR0lPTl80X0FfQkFORCAgICAgICAgICAgICAg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DExCi0KLS8vIHBUeEQtPkNpcGhlckFsZwotI2RlZmluZSBDSVBIRVJfTk9ORSAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBDSVBIRVJfV0VQNjQgICAgICAgICAgICAgICAgMQotI2RlZmluZSBDSVBIRVJfV0VQMTI4ICAgICAgICAgICAgICAgMgotI2RlZmluZSBDSVBIRVJfVEtJUCAgICAgICAgICAgICAgICAgMwotI2RlZmluZSBDSVBIRVJfQUVTICAgICAgICAgICAgICAgICAgNAotI2RlZmluZSBDSVBIRVJfQ0tJUDY0ICAgICAgICAgICAgICAgNQotI2RlZmluZSBDSVBIRVJfQ0tJUDEyOCAgICAgICAgICAgICAgNgotI2RlZmluZSBDSVBIRVJfVEtJUF9OT19NSUMgICAgICAgICAgNyAgICAgICAvLyBNSUMgYXBwZW5kZWQgYnkgZHJpdmVyOiBub3QgYSB2YWxpZCB2YWx1ZSBpbiBoYXJkd2FyZSBrZXkgdGFibGUKLSNkZWZpbmUgQ0lQSEVSX1NNUzQJCQkJCTgKLQotLy8gdmFsdWUgZG9tYWluIG9mIHBBZC0+UmZJY1R5cGUKLSNkZWZpbmUgUkZJQ18yODIwICAgICAgICAgICAgICAgICAgIDEgICAgICAgLy8gMi40RyAyVDNSCi0jZGVmaW5lIFJGSUNfMjg1MCAgICAgICAgICAgICAgICAgICAyICAgICAgIC8vIDIuNEcvNUcgMlQzUgotI2RlZmluZSBSRklDXzI3MjAgICAgICAgICAgICAgICAgICAgMyAgICAgICAvLyAyLjRHIDFUMlIKLSNkZWZpbmUgUkZJQ18yNzUwICAgICAgICAgICAgICAgICAgIDQgICAgICAgLy8gMi40Ry81RyAxVDJSCi0jZGVmaW5lIFJGSUNfMzAyMCAgICAgICAgICAgICAgICAgICA1ICAgICAgIC8vIDIuNEcgMVQxUgotI2RlZmluZSBSRklDXzIwMjAgICAgICAgICAgICAgICAgICAgNiAgICAgICAvLyAyLjRHIEIvRwotI2RlZmluZSBSRklDXzMwMjEgICAgICAgICAgICAgIC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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gICAgTW9kdWxlIE5hbWU6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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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FBVSU5UOCBwUmVwb3J0SW5mbyk7Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJUHJlcGFyZSBUUEMgUmVxdWVzdCBhY3Rpb24gZnJhbWUgYW5kIGVucXVldWUgaXQgaW50bwotCQltYW5hZ2VtZW50IHF1ZXVlIHdhaXRpbmcgZm9yIHRyYW5zbWl0aW9uLgotCi0JUGFyYW1ldHJzOgotCQkxLiB0aGUgZGVzdGluYXRpb24gbWFjIGFkZHJlc3Mgb2YgdGhlIGZyYW1lLgotCi0JUmV0dXJuCTogTm9uZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEVucXVldWVUUENSZXEoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gUFVDSEFSIHBEQSwKLQlJTiBVQ0hBUiBEaWFsb2dUb2tlbik7Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQkJUHJlcGFyZSBUUEMgUmVwb3J0IGFjdGlvbiBmcmFtZSBhbmQgZW5xdWV1ZSBpdCBpbnRvCi0JCW1hbmFnZW1lbnQgcXVldWUgd2FpdGluZyBmb3IgdHJhbnNtaXRpb24uCi0KLQlQYXJhbWV0cnM6Ci0JCTEuIHRoZSBkZXN0aW5hdGlvbiBtYWMgYWRkcmVzcyBvZiB0aGUgZnJhbWUuCi0KLQlSZXR1cm4JOiBOb25lLgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgRW5xdWV1ZVRQQ1JlcCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBQVUNIQVIgcERBLAotCUlOIFVJTlQ4IERpYWxvZ1Rva2VuLAotCUlOIFVJTlQ4IFR4UHdyLAotCUlOIFVJTlQ4IExpbmtNYXJnaW4pOwotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVByZXBhcmUgQ2hhbm5lbCBTd2l0Y2ggQW5ub3VuY2VtZW50IGFjdGlvbiBmcmFtZSBhbmQgZW5xdWV1ZSBpdCBpbnRvCi0JCW1hbmFnZW1lbnQgcXVldWUgd2FpdGluZyBmb3IgdHJhbnNtaXRpb24uCi0KLQlQYXJhbWV0cnM6Ci0JCTEuIHRoZSBkZXN0aW5hdGlvbiBtYWMgYWRkcmVzcyBvZiB0aGUgZnJhbWUuCi0JCTIuIENoYW5uZWwgc3dpdGNoIGFubm91bmNlbWVudCBtb2RlLgotCQkyLiBhIE5ldyBzZWxlY3RlZCBjaGFubmVsLgotCi0JUmV0dXJuCTogTm9uZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEVucXVldWVDaFN3QW5uKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIFBVQ0hBUiBwREEsCi0JSU4gVUlOVDggQ2hTd01vZGUsCi0JSU4gVUlOVDggTmV3Q2gpOwotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCVNwZWN0cnVuIGFjdGlvbiBmcmFtZXMgSGFuZGxlciBzdWNoIGFzIGNoYW5uZWwgc3dpdGNoIGFubm91Y2VtZW50LAotCQltZWFzdXJlbWVudCByZXBvcnQsIG1lYXN1cmVtZW50IHJlcXVlc3QgYWN0aW9ucyBmcmFtZXMuCi0KLQlQYXJhbWV0cnM6Ci0JCUVsbWUgLSBNTE1FIG1lc3NhZ2UgY29udGFpbmluZyB0aGUgcmVjZWl2ZWQgZnJhbWUKLQotCVJldHVybgk6IE5vbmUuCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBQZWVyU3BlY3RydW1BY3Rpb24oCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gTUxNRV9RVUVVRV9FTEVNICpFbGVtKTsKLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JUGFyYW1ldHJzOgotCi0JUmV0dXJuCTogTm9uZS4KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1JTlQgU2V0X01lYXN1cmVSZXFfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpOwotCi1JTlQgU2V0X1RwY1JlcV9Qcm9jKAotCUlOCVBSVE1QX0FEQVBURVIJcEFkLAotCUlOCVBVQ0hBUgkJCWFyZyk7Ci0KLVZPSUQgTWVhc3VyZVJlcVRhYkluaXQoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpOwotCi1WT0lEIE1lYXN1cmVSZXFUYWJFeGl0KAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKTsKLQotVk9JRCBUcGNSZXFUYWJJbml0KAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKTsKLQotVk9JRCBUcGNSZXFUYWJFeGl0KAotCUlOIFBSVE1QX0FEQVBURVIgcEFkKTsKLQot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KLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwL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AgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCWFpcm9uZXQuYwotCi0JQWJzdHJhY3Q6Ci0KLQlSZXZpc2lvbiBIaXN0b3J5OgotCVdobwkJCVdoZW4JCQlXaGF0Ci0JLS0tLS0tLS0JLS0tLS0tLS0tLQkJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotCVBhdWwgTGluCTA0LTA2LTE1CQlJbml0aWFsCi0qLwotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0JCWFzc29jaWF0aW9uCXN0YXRlIG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ICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlhc3NvYy5jC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gICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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9NQUNISU5FLCBNVDJfQVVUSF9USU1FT1VULCAwLCBOVUxMKTsKLSAgICBSVDI4WFhfTUxNRV9IQU5ETEVSKHBBZCk7Ci19Ci0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIE1sbWVBdXRoUmVxQWN0aW9uKAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIE1MTUVfUVVFVUVfRUxFTSAqRWxlbSkKLXsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgQWRkcls2XTsKLSAgICBVU0hPUlQgICAgICAgICAgICAgQWxnLCBTZXEsIFN0YXR1czsKLSAgICBVTE9ORyAgICAgICAgICAgICAgVGltZW91dDsKLSAgICBIRUFERVJfODAyXzExICAgICAgQXV0aEhkcjsKLSAgICBCT09MRUFOICAgICAgICAgICAgVGltZXJDYW5jZWxsZWQ7Ci0gICAgTkRJU19TVEFUVVMgICAgICAgIE5TdGF0dXM7Ci0gICAgUFVDSEFSICAgICAgICAgICAgIHBPdXRCdWZmZXIgPSBOVUxMOwotICAgIFVMT05HICAgICAgICAgICAgICBGcmFtZUxlbiA9IDA7Ci0KLQkvLyBCbG9jayBhbGwgYXV0aGVudGljYXRpb24gcmVxdWVzdCBkdXJuaW5nIFdQQSBibG9jayBwZXJpb2QKLQlpZiAocEFkLT5TdGFDZmcuYkJsb2NrQXNzb2MgPT0gVFJVRSkKLQl7Ci0gICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIkFVVEggLSBCbG9jayBBdXRoIHJlcXVlc3QgZHVybmluZyBXUEEgYmxvY2sgcGVya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UV9JRExFOwotICAgICAgICAgICAgU3RhdHVzID0gTUxNRV9GQUlMX05PX1JFU09VUkNFOwotICAgICAgICAgICAgTWxtZUVucXVldWUocEFkLCBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfQ09ORiwgMiwgJlN0YXR1cyk7Ci0gICAgICAgICAgICByZXR1cm47Ci0gICAgICAgIH0KLQotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gU2VuZCBBVVRIIHJlcXVlc3Qgc2VxIzEgKEFsZz0lZCkuLi5cbiIsIEFsZykpOwotICAgICAgICBNZ3RNYWNIZWFkZXJJbml0KHBBZCwgJkF1dGhIZHIsIFNVQlRZUEVfQVVUSCwgMCwgQWRkciwgcEFkLT5NbG1lQXV4LkJzc2lkKTsKLSAgICAgICAgTWFrZU91dGdvaW5nRnJhbWUocE91dEJ1ZmZlciwgICAgICAgICAgICZGcmFtZUxlbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKEhFQURFUl84MDJfMTEpLCZBdXRoSGRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAyLCAgICAgICAgICAgICAgICAgICAgJkFsZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgMiwgICAgICAgICAgICAgICAgICAgICZTZXEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIDIsICAgICAgICAgICAgICAgICAgICAmU3RhdHVzLAotICAgICAgICAgICAgICAgICAgICAgICAgICBFTkRfT0ZfQVJHUyk7Ci0gICAgICAgIE1pbmlwb3J0TU1SZXF1ZXN0KHBBZCwgMCwgcE91dEJ1ZmZlciwgRnJhbWVMZW4pOwotICAgIAlNbG1lRnJlZU1lbW9yeShwQWQsIHBPdXRCdWZmZXIpOwotCi0gICAgICAgIFJUTVBTZXRUaW1lcigmcEFkLT5NbG1lQXV4LkF1dGhUaW1lciwgVGltZW91dCk7Ci0gICAgICAgIHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPSBBVVRIX1dBSVRfU0VRMjsKLSAgICB9Ci0gICAgZWxzZQotICAgIHsKLSAgICAgICAgREJHUFJJTlRfRVJSKCgiQVVUSCAtIE1sbWVBdXRoUmVxQWN0aW9uKCkgc2FuaXR5IGNoZWNrIGZhaWxlZFxuIikpOwotICAgICAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9SRVFfSURMRTsKLSAgICAgICAgU3RhdHVzID0gTUxNRV9JTlZBTElEX0ZPUk1BVDsKLSAgICAgICAgTWxtZUVucXVldWUocEFkLCBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfQ09ORiwgMiwgJlN0YXR1cyk7Ci0gICAgfQotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgUGVlckF1dGhSc3BBdFNlcTJBY3Rpb24oCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gTUxNRV9RVUVVRV9FTEVNICpFbGVtKQotewotICAgIFVDSEFSICAgICAgICAgQWRkcjJbTUFDX0FERFJfTEVOXTsKLSAgICBVU0hPUlQgICAgICAgIFNlcSwgU3RhdHVzLCBSZW1vdGVTdGF0dXMsIEFsZzsKLSAgICBVQ0hBUiAgICAgICAgIENobGdUZXh0W0NJUEhFUl9URVhUX0xFTl07Ci0gICAgVUNIQVIgICAgICAgICBDeXBlckNobGdUZXh0W0NJUEhFUl9URVhUX0xFTiArIDggKyA4XTsKLSAgICBVQ0hBUiAgICAgICAgIEVsZW1lbnRbMl07Ci0gICA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LSNlbmRpZiAvLyBMRUFQX1NVUFBPUlQgLy8KLQkJCQkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9SRVFfSURMRTsKLSNpZmRlZiBMRUFQX1NVUFBPUlQKLSAgICAgICAgICAgICAgICAgICAgcEFkLT5NbG1lLkxlYXBNYWNoaW5lLkN1cnJTdGF0ZSA9IExFQVBfSURMRTsKLSNlbmRpZiAvLyBMRUFQX1NVUFBPUlQgLy8KLSAgICAgICAgICAgICAgICAgICAgTWxtZUVucXVldWUocEFkLCBNTE1FX0NOVExfU1RBVEVfTUFDSElORSwgTVQyX0FVVEhfQ09ORiwgMiwgJlN0YXR1cyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIDIuIHNoYXJlZCBrZXksIG5lZWQgdG8gYmUgY2hhbGxlbmdlZAotICAgICAgICAgICAgICAgICAgICBTZXErKzsKLSAgICAgICAgICAgICAgICAgICAgUmVtb3RlU3RhdHVzID0gTUxNRV9TVUNDRVNTOwotCi0JCQkJCS8vIEdldCBhbiB1bnVzZWQgbm9ucGFnZWQgbWVtb3J5Ci0gICAgICAgICAgICAgICAgICAgIE5TdGF0dXMgPSBNbG1lQWxsb2NhdGVNZW1vcnkocEFkLCAmcE91dEJ1ZmZlcik7Ci0gICAgICAgICAgICAgICAgICAgIGlmKE5TdGF0dXMgIT0gTkRJU19TVEFUVVNfU1VDQ0VTUykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiQVVUSCAtIFBlZXJBdXRoUnNwQXRTZXEyQWN0aW9uKCkgYWxsb2NhdGUgbWVtb3J5IGZhaWxcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgICA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RkcjIpOwotICAgICAgICAgICAgICAgIHBBZC0+TWxtZS5BdXRoTWFjaGluZS5DdXJyU3RhdGUgPSBBVVRIX1JFUV9JRExFOwotICAgICAgICAgICAgICAgIE1sbWVFbnF1ZXVlKHBBZCwgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsIE1UMl9BVVRIX0NPTkYsIDIsICZTdGF0dXMpOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQotICAgIGVsc2UKLSAgICB7Ci0gICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIkFVVEggLSBQZWVyQXV0aFNhbml0eSgpIHNhbml0eSBjaGVjayBmYWlsXG4iKSk7Ci0gICAgfQotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgUGVlckF1dGhSc3BBdFNlcTRBY3Rpb24oCi0gICAgSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0gICAgSU4gTUxNRV9RVUVVRV9FTEVNICpFbGVtKQotewotICAgIFVDSEFSICAgICAgICAgQWRkcjJbTUFDX0FERFJfTEVOXTsKLSAgICBVU0hPUlQgICAgICAgIEFsZywgU2VxLCBTdGF0dXM7Ci0gICAgQ0hBUiAgICAgICAgICBDaGxnVGV4dFtDSVBIRVJfVEVYVF9MRU5dOwotICAgIEJPT0xFQU4gICAgICAgVGltZXJDYW5jZWxsZWQ7Ci0KLSAgICBpZihQZWVyQXV0aFNhbml0eShwQWQsIEVsZW0tPk1zZywgRWxlbS0+TXNnTGVuLCBBZGRyMiwgJkFsZywgJlNlcSwgJlN0YXR1cywgQ2hsZ1RleHQpKQotICAgIHsKLSAgICAgICAgaWYoTUFDX0FERFJfRVFVQUwocEFkLT5NbG1lQXV4LkJzc2lkLCBBZGRyMikgJiYgU2VxID09IDQpCi0gICAgICAgIHsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIkFVVEggLSBSZWNlaXZlIEFVVEhfUlNQIHNlcSM0IHRvIG1lXG4iKSk7Ci0gICAgICAgICAgICBSVE1QQ2FuY2VsVGltZXIoJnBBZC0+TWxtZUF1eC5BdXRoVGltZXIsICZUaW1lckNhbmNlbGxlZCk7Ci0KLSAgICAgICAgICAgIGlmIChTdGF0dXMgIT0gTUxNRV9TVUNDRVNTKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLkF1dGhGYWlsUmVhc29uID0gU3RhdHVzOwotICAgICAgICAgICAgICAgIENPUFlfTUFDX0FERFIocEFkLT5TdGFDZmcuQXV0aEZhaWxTdGEsIEFkZHIyKTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgcEFkLT5NbG1lLkF1dGhNYWNoaW5lLkN1cnJTdGF0ZSA9IEFVVEhfUkVRX0lETEU7Ci0gICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWQsIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLCBNVDJfQVVUSF9DT05GLCAyLCAmU3RhdHVzKTsKLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gUGVlckF1dGhSc3BBdFNlcTRBY3Rpb24oKSBzYW5pdHkgY2hlY2sgZmFpbFxuIikpOwotICAgIH0KLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkV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vbgotCWlmIChwQWQtPkNvbW1vbkNmZy5iV2lyZWxlc3NFdmVudCkKLQkJUlRNUFNlbmRXaXJlbGVzc0V2ZW50KHBBZCwgSVdfREVBVVRIX0VWRU5UX0ZMQUcsIHBBZC0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF0uQWRkciwgQlNTMCwgMCk7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBdXRoVGltZW91dEFjdGlvbigKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBNTE1FX1FVRVVFX0VMRU0gKkVsZW0pCi17Ci0gICAgVVNIT1JUIFN0YXR1czsKLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJBVVRIIC0gQXV0aFRpbWVvdXRBY3Rpb25cbiIpKTsKLSAgICBwQWQtPk1sbWUuQXV0aE1hY2hpbmUuQ3VyclN0YXRlID0gQVVUSF9SRVFfSURMRTsKLSAgICBTdGF0dXMgPSBNTE1FX1JFSl9USU1FT1VUOwotICAgIE1sbWVFbnF1ZXVlKHBBZCwgTUxNRV9DTlRMX1NUQVRFX01BQ0hJTkUsIE1UMl9BVVRIX0NPTkYsIDIsICZTdGF0dXMpOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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c2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQlhdXRoX3JzcC5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JSm9obgkJMjAwNC0xMC0xCQljb3B5IGZyb20gUlQyNTYwCi0qLwotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIGF1dGhlbnRpY2F0aW9uIHN0YXRlIG1hY2hpbmUgaW5pdCBwcm9jZWR1cmUKLSAgICBQYXJhbWV0ZXJzOgotICAgICAgICBTbSAtIHRoZSBzdGF0ZSBtYWNoaW5lCi0KLQlJUlFMID0gUEFTU0lWRV9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotVk9JRCBBdXRoUnNwU3RhdGVNYWNoaW5lSW5pdCgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBQU1RBVEVfTUFDSElORSBTbSwKLSAgICBJTiBTVEFURV9NQUNISU5FX0ZVTkMgVHJhbnNbXSkKLXsKLSAgICBTdGF0ZU1hY2hpbmVJbml0KFNtLCBUcmFucywgTUFYX0FVVEhfUlNQX1NUQVRFLCBNQVhfQVVUSF9SU1BfTVNHLCAoU1RBVEVfTUFDSElORV9GVU5DKURyb3AsIEFVVEhfUlNQX0lETEUsIEFVVEhfUlNQX01BQ0hJTkVfQkFTRSk7Ci0KLSAgICAvLyBjb2x1bW4gMQotICAgIFN0YXRlTWFjaGluZVNldEFjdGlvbihTbSwgQVVUSF9SU1BfSURMRSwgTVQyX1BFRVJfREVBVVRILCAoU1RBVEVfTUFDSElORV9GVU5DKVBlZXJEZWF1dGhBY3Rpb24pOwotCi0gICAgLy8gY29sdW1uIDIKLSAgICBTdGF0ZU1hY2hpbmVTZXRBY3Rpb24oU20sIEFVVEhfUlNQX1dBSVRfQ0hBTCwgTVQyX1BFRVJfREVBVVRILCAoU1RBVEVfTUFDSElORV9GVU5DKVBlZXJEZWF1dGhBY3Rpb24pOwotCi19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIFBlZXJBdXRoU2ltcGxlUnNwR2VuQW5kU2VuZCgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBQSEVBREVSXzgwMl8xMSBwSGRyODAyMTEsCi0gICAgSU4gVVNIT1JUIEFsZywKLSAgICBJTiBVU0hPUlQgU2VxLAotICAgIElOIFVTSE9SVCBSZWFzb24sCi0gICAgSU4gVVNIT1JUIFN0YXR1cykKLXsKLSAgICBIRUFERVJfODAyXzExICAgICBBdXRoSGRyOwotICAgIFVMT05HICAgICAgICAgICAgIEZyYW1lTGVuID0gMDsKLSAgICBQVUNIQVIgICAgICAgICAgICBwT3V0QnVmZmVyID0gTlVMTDsKLSAgICBORElTX1NUQVRVUyAgICAgICBOU3RhdHVzOwotCi0gICAgaWYgKFJlYXNvbiAhPSBNTE1FX1NVQ0NFU1MpCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyIEFVVEggZmFpbC4uLlxuIikpOwotICAgICAgICByZXR1cm47Ci0gICAgfQotCi0JLy9HZXQgYW4gdW51c2VkIG5vbnBhZ2VkIG1lbW9yeQotICAgIE5TdGF0dXMgPSBNbG1lQWxsb2NhdGVNZW1vcnkocEFkLCAmcE91dEJ1ZmZlcik7Ci0gICAgaWYgKE5TdGF0dXMgIT0gTkRJU19TVEFUVVNfU1VDQ0VTUykKLSAgICAgICAgcmV0dXJuOwotCi0gICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2VuZCBBVVRIIHJlc3BvbnNlIChzZXEjMikuLi5cbiIpKTsKLSAgICBNZ3RNYWNIZWFkZXJJbml0KHBBZCwgJkF1dGhIZHIsIFNVQlRZUEVfQVVUSCwgMCwgcEhkcjgwMjExLT5BZGRyMiwgcEFkLT5NbG1lQXV4LkJzc2lkKTsKLSAgICBNYWtlT3V0Z29pbmdGcmFtZShwT3V0QnVmZmVyLCAgICAgICAgICAgICAgICZGcmFtZUxlbiwKLSAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoSEVBREVSXzgwMl8xMSksICAgICZBdXRoSGRyLAotICAgICAgICAgICAgICAgICAgICAgIDIsICAgICAgICAgICAgICAgICAgICAgICAgJkFsZywKLSAgICAgICAgICAgICAgICAgICAgICAyLCAgICAgICAgICAgICAgICAgICAgICAgICZTZXEsCi0gICAgICAgICAgICAgICAgICAgICAgMiwgICAgICAgICAgICAgICAgICAgICAgICAmUmVhc29uLAotICAgICAgICAgICAgICAgICAgICAgIEVORF9PRl9BUkdTKTsKLSAgICBNaW5pcG9ydE1NUmVxdWVzdChwQWQsIDAsIHBPdXRCdWZmZXIsIEZyYW1lTGVuKTsKLQlNbG1lRnJlZU1lbW9yeShwQWQsIHBPdXRCdWZmZXIpOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBQZWVyRGVhdXRoQWN0aW9uKAotICAgIElOIFBSVE1QX0FEQVBURVIgcEFkLAotICAgIElOIFBNTE1FX1FVRVVFX0VMRU0gRWxlbSkKLXsKLSAgICBVQ0hBUiAgICAgICBBZGRyMltNQUNfQUREUl9MRU5dOwotICAgIFVTSE9SVCAgICAgIFJlYXNvbjsKLQotICAgIGlmIChQZWVyRGVhdXRoU2FuaXR5KHBBZCwgRWxlbS0+TXNnLCBFbGVtLT5Nc2dMZW4sIEFkZHIyLCAmUmVhc29uKSkKLSAgICB7Ci0gICAgICAgIGlmIChJTkZSQV9PTihwQWQpICYmIE1BQ19BRERSX0VRVUFMKEFkZHIyLCBwQWQtPkNvbW1vbkNmZy5Cc3NpZCkpCi0gICAgICAgIHsKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCgiQVVUSF9SU1AgLSByZWNlaXZlIERFLUFVVEggZnJvbSBvdXIgQVAgKFJlYXNvbj0lZClcbiIsIFJlYXNvbikpOwotCi0KLSNpZmRlZiBOQVRJVkVfV1BBX1NVUFBMSUNBTlRfU1VQUE9SVAotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgICAgd3JxdTsKLSAgICAgICAgICAgICAgICBtZW1zZXQod3JxdS5hcF9hZGRyLnN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wgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQlNb2R1bGUgTmFtZToKLQljb25uZWN0LmMKLQotCUFic3RyYWN0OgotCi0JUmV2aXNpb24gSGlzdG9yeToKLQlXaG8JCQlXaGVuCQkJV2hhdAotCS0tLS0tLS0tCS0tLS0tLS0tLS0JCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQlKb2huCQkJMjAwNC0wOC0wOAkJCU1ham9yIG1vZGlmaWNhdGlvbiBmcm9tIFJUMjU2MAotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotVUNIQVIJQ2lwaGVyU3VpdGVXcGFOb25lVGtpcFtdID0gewotC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ZUF1eC5Cc3NpZCk7XAotCShfcEFkKS0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF0uUmF0ZUxlbiA9IChfcEFkKS0+U3RhQWN0aXZlLlN1cFJhdGVMZW4gKyAoX3BBZCktPlN0YUFjdGl2ZS5FeHRSYXRlTGVuO1wKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IFBBU1NJVkVfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBNbG1lQ250bEluaXQoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gU1RBVEVfTUFDSElORSAqUywKLQlPVVQgU1RBVEVfTUFDSElORV9GVU5DIFRyYW5zW10pCi17Ci0JLy8gQ29udHJvbCBzdGF0ZSBtYWNoaW5lIGRpZmZlcnMgZnJvbSBvdGhlciBzdGF0ZSBtYWNoaW5lcywgdGhlIGludGVyZmFjZQotCS8vIGZvbGxvd3MgdGhlIHN0YW5kYXJkIGludGVyZmFjZQotCXBBZC0+TWxtZS5DbnRsTWFjaGluZS5DdXJyU3RhdGUgPSBDTlRMX0lETEU7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1WT0lEIE1sbWVDbnRsTWFjaGluZVBlcmZvcm1BY3Rpb24oCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQ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3VyclN0YXRlID0gQ05UTF9XQUlUX1JFQVNTT0M7Ci0JfQotCWVsc2UgLy8gbm8gbW9yZSBCU1MKLQl7Ci0JCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIkNOVEwgLSBBbGwgZmFzdCByb2FtaW5nIGZhaWxlZCwgYmFjayB0byBjaCAjJWRcbiIscEFkLT5Db21tb25DZmcuQ2hhbm5lbCkpOwotCQlBc2ljU3dpdGNoQ2hhbm5lbChwQWQsIHBBZC0+Q29tbW9uQ2ZnLkNoYW5uZWwsIEZBTFNFKTsKLQkJQXNpY0xvY2tDaGFubmVsKHBBZCwgcEFkLT5Db21tb25DZmcuQ2hhbm5lbCk7Ci0JCXBBZC0+TWxtZS5DbnRsTWFjaGluZS5DdXJyU3RhdGUgPSBDTlRMX0lETEU7Ci0JfQotfQotCi0vKgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0JRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBKb2luUGFybUZpbGwoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQsCi0JSU4gT1VUIE1MTUVfSk9JTl9SRVFfU1RSVUNUICpKb2luUmVxLAotCUlOIFVMT05HIEJzc0lkeCkKLXsKLQlKb2luUmVxLT5Cc3NJZHggPSBCc3NJZHg7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQlEZXNjcmlwdGlvbjoKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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Ly8KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgU3RhcnRQYXJtRmlsbCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCwKLQlJTiBPVVQgTUxNRV9TVEFSVF9SRVFfU1RSVUNUICpTdGFydFJlcSwKLQlJTiBDSEFSIFNzaWRbXSwKLQlJTiBVQ0hBUiBTc2lkTGVuKQotewotCUFTU0VSVChTc2lkTGVuIDw9IE1BWF9MRU5fT0ZfU1NJRCk7Ci0JTmRpc01vdmVNZW1vcnkoU3RhcnRSZXEtPlNzaWQsIFNzaWQsIFNzaWRMZW4pOwotCVN0YXJ0UmVxLT5Tc2lkTGVuID0gU3NpZExlbjsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLVZPSUQgQXV0aFBhcm1GaWxsKAotCUlOIFBSVE1QX0FEQVBURVIgcEFkLAotCUlOIE9VVCBNTE1FX0FVVEhfUkVRX1NUUlVDVCAqQXV0aFJlcSwKLQlJTiBQVUNIQVIgcEFkZHIsCi0JSU4gVVNIT1JUIEFsZykKLXsKLQlDT1BZX01BQ19BRERSKEF1dGhSZXEtPkFkZHIsIHBBZGRyKTsKLQlBdXRoUmVxLT5BbGcgPSBBbGc7Ci0JQXV0aFJlc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JCSAgKHBBZC0+U3RhQ2ZnLldlcFN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkKTsKLQlDYXBhYmlsaXR5SW5mbyA9IENBUF9HRU5FUkFURSgwLCAxLCBQcml2YWN5LCAocEFkLT5Db21tb25DZmcuVHhQcmVhbWJsZSA9PSBSdDgwMl8xMVByZWFtYmxlU2hvcnQpLCAwLCAwKTsKLQotCU1ha2VPdXRnb2luZ0ZyYW1lKHBCZWFjb25GcmFtZSwgICAgICAgICAgICAgICAgJkZyYW1lTGVuLAotCQkJCQkgIHNpemVvZihIRUFERVJfODAyXzExKSwgICAgICAgICAgICZCY25IZHIsCi0JCQkJCSAgVElNRVNUQU1QX0xFTiwgICAgICAgICAgICAgICAgICAgJkZha2VUaW1lc3RhbXAsCi0JCQkJCSAgMiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBBZC0+Q29tbW9uQ2ZnLkJlYWNvblBlcmlvZCwKLQkJCQkJICAyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmQ2FwYWJpbGl0eUluZm8sCi0JCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlNzaWRJZSwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5Db21tb25DZmcuU3NpZExlbiwKLQkJCQkJICBwQWQtPkNvbW1vbkNmZy5Tc2lkTGVuLCAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Tc2lkLAotCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZTdXBSYXRlSWUsCi0JCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN1cFJhdGVMZW4sCi0JCQkJCSAgU3VwUmF0ZUxlbiwgICAgICAgICAgICAgICAgICAgICAgU3VwUmF0ZSwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRHNJZSwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRHNMZW4sCi0JCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBBZC0+Q29tbW9uQ2ZnLkNoYW5uZWwsCi0JCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJklic3NJZSwKLQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSWJzc0xlbiwKLQkJCQkJICAyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5TdGFBY3RpdmUuQXRpbVdpbiwKLQkJCQkJICBFTkRfT0ZfQVJHUyk7Ci0KLQkvLyBhZGQgRVJQX0lFIGFuZCBFWFRfUkFFIElFIG9mIGluIDgwMi4xMWcKLQlpZiAoRXh0UmF0ZUxlbikKLQl7Ci0JCVVMT05HCXRtcDsKLQotCQlNYWtlT3V0Z29pbmdGcmFtZShwQmVhY29uRnJhbWUgKyBGcmFtZUxlbiwgICAgICAgICAmdG1wLAotCQkJCQkJICAzLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2NhbEVycEllLAotCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRXh0UmF0ZUllLAotCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRXh0UmF0ZUxlbiwKLQkJCQkJCSAgRXh0UmF0ZUxlbiwgICAgICAgICAgICAgICAgICAgICAgRXh0UmF0ZSwKLQkJCQkJCSAgRU5EX09GX0FSR1MpOwotCQlGcmFtZUxlbiArPSB0bXA7Ci0JfQotCi0JLy8gSWYgYWRob2Mgc2VjcnVpdHkgaXMgc2V0IGZvciBXUEEtTm9uZSwgYXBwZW5kIHRoZSBjaXBoZXIgc3VpdGUgSUUKLQlpZiAocEFkLT5TdGFDZmcuQXV0aE1vZGUgPT0gTmRpczgwMl8xMUF1dGhNb2RlV1BBTm9uZSkKLQl7Ci0JCVVMT05HIHRtc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h1YmVpIENpdHksCi0gKiBIc2luY2h1IENvdW50eSAzMDIsCi0gKiBUYWl3YW4sIFIuTy5DLgotICoKLSAqIChjKSBDb3B5cmlnaHQgMjAwMi0yMDA3LCBSYWxpbmsgVGVjaG5vbG9neSwgSW5jLgotICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAqCi0gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICoKLSAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSAgICBNb2R1bGUgTmFtZToKLSAgICBkbHMuYwotCi0gICAgQWJzdHJhY3Q6Ci0gICAgSGFuZGxlIFdNTS1ETFMgc3RhdGUgbWFjaGluZQotCi0gICAgUmV2aXNpb24gSGlzdG9yeToKLSAgICBXaG8gICAgICAgICBXaGVuICAgICAgICAgIFdoYXQKLSAgICAtLS0tLS0tLSAgICAtLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAgICBSb3J5IENoZW4gICAwMi0xNC0yMDA2Ci0JQXJ2aW4gVGFpCTA2LTAzLTIwMDgJICBNb2RpZmllZCBmb3IgUlQyOHh4Ci0gKi8KLQotI2luY2x1ZGUgIi4uL3J0X2NvbmZpZy5oIgotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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OR1RIXzgwMl8xMSArIDYgKyAyICsgMiArIHNpemVvZihFQVBPTF9QQUNLRVQpIC0gTUFYX0xFTl9PRl9SU05JRSArIDE2KSwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uS2V5TWljLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5JbnN0YWxsLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5LZXlBY2ssCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEVhcC0+S2V5RGVzYy5LZXlJbmZvLlNlY3VyZSwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uRUtEX0RMLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFYXAtPktleURlc2MuS2V5SW5mby5FcnJvciwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRWFwLT5LZXlEZXNjLktleUluZm8uUmVxdWVzdCkpOwotCi0JCWlmICgoTGVuID49IChMRU5HVEhfODAyXzExICsgNiArIDIgKyAyICsgc2l6ZW9mKEVBUE9MX1BBQ0tFVCkgLSBNQVhfTEVOX09GX1JTTklFICsgMTYpKSAmJiBwRWFwLT5LZXlEZXNjLktleUluZm8uS2V5TWljCi0JCQkmJiBwRWFwLT5LZXlEZXNjLktleUluZm8uSW5zdGFsbCAmJiBwRWFwLT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PgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUlRfQUREX1BBSVJXSVNFX0tFWV9FTlRSWSBLZXlJbmZvOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENPUFlfTUFDX0FERFIoS2V5SW5mby5NYWNBZGRyLHBBZC0+U3RhQ2ZnLkRMU0VudHJ5W2ldLk1hY0FkZHIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUluZm8uTWFjVGFiTWF0Y2hXQ0lEPXBBZC0+U3RhQ2ZnLkRMU0VudHJ5W2ldLk1hY1RhYk1hdGNoV0NJRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeSgmS2V5SW5mby5DaXBoZXJLZXksICAmUGFpcndpc2VLZXksc2l6ZW9mKENJUEhFUl9LRVkpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSVFVTQkVucXVldWVJbnRlcm5hbENtZChwQWQsIFJUX0NNRF9TRVRfS0VZX1RBQkxFLCAmS2V5SW5mbywgc2l6ZW9mKFJUX0FERF9QQUlSV0lTRV9LRVlfRU5UUlkpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE1BQ19UQUJMRV9FTlRSWSBwRExTRW50cnk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERMU0VudHJ5ID0gRGxzRW50cnlUYWJsZUxvb2t1cChwQWQsIHBBZC0+U3RhQ2ZnLkRMU0VudHJ5W2ldLk1hY0FkZHIsIFRSVUUpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBETFNFbnRyeS0+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AgICAgICAgIEtleUluZm8uTWFjVGFiTWF0Y2hXQ0lEPXBBZC0+U3RhQ2ZnLkRMU0VudHJ5W2ldLk1hY1RhYk1hdGNoV0NJRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeSgmS2V5SW5mby5DaXBoZXJLZXksICAmUGFpcndpc2VLZXksc2l6ZW9mKENJUEhFUl9LRVkpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSVFVTQkVucXVldWVJbnRlcm5hbENtZChwQWQsIFJUX0NNRF9TRVRfS0VZX1RBQkxFLCAmS2V5SW5mbywgc2l6ZW9mKFJUX0FERF9QQUlSV0lTRV9LRVlfRU5UUlkpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE1BQ19UQUJMRV9FTlRSWSBwRExTRW50cnk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERMU0VudHJ5ID0gRGxzRW50cnlUYWJsZUxvb2t1cChwQWQsIHBBZC0+U3RhQ2ZnLkRMU0VudHJ5W2ldLk1hY0FkZHIsIFRSVUUpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBETFNFbnRyeS0+UGFpcndpc2VLZXkuQ2lwaGVyQWxnPVBhaXJ3aXNlS2V5LkNpcGhlckFsZzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSVFVTQkVucXVldWVJbnRlcm5hbENtZChwQWQsIFJUX0NNRF9TRVRfUlhfV0NJRF9UQUJMRSwgcERMU0VudHJ5LCBzaXplb2YoTUFDX1RBQkxFX0VOVFJZKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLS8vQmVuc29uIG1vZGlmaWVkIGZ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AgICAgICAgICAgJkZyYW1lTGVuLAotCSAgICAgICAgICAgICAgICAgIHNpemVvZihIZWFkZXI4MDJfMyksCUhlYWRlcjgwMl8zLAotCQkgICAgICAgICAgICAgIFBhY2tldC5Cb2R5X0xlblsxXSArIDQsCSZQYWNrZXQsCi0JCSAgICAgICAgICAgICAgRU5EX09GX0FSR1MpOwotCi0JTlN0YXR1cyA9IFJUTVBBbGxvY2F0ZU5kaXNQYWNrZXQocEFkLCAmcE5kaXNQYWNrZXQsIE5VTEwsIDAsIHBPdXRCdWZmZXIsIEZyYW1lTGVuKTsKLQlpZiAoTlN0YXR1cyA9PSBORElTX1NUQVRVU19TVUNDRVNTKQotCXsKLQkJUlRNUF9TRVRfUEFDS0VUX1dDSUQocE5kaXNQYWNrZXQsIEJTU0lEX1dDSUQpOwotCQlTVEFTZW5kUGFja2V0KHBBZCwgcE5kaXNQYWNrZXQpOwotCQlSVE1QRGVRdWV1ZVBhY2tldChwQWQsIEZBTFNFLCBOVU1fT0ZfVFhfUklORywgTUFYX1RYX1BST0NFU1MpOwotCX0KLQotCU1sbWVGcmVlTWVtb3J5KHBBZCwgcE91dEJ1ZmZlcik7Ci0KLQlEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJSVE1QU2VuZFNUQUtleVJlcXVlc3QtIFNlbmQgU1RBS2V5IHJlcXVlc3QgKE5TdGF0dXM9JXgsIEZyYW1lTGVuPSVsZClcbiIsIE5TdGF0dXMsIEZyYW1lTGVuKSk7Ci0KLQlyZXR1cm4gTlN0YXR1czsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovC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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICoKLSAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCi0gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgKgotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiA1OSBUZW1wbGUgUGxhY2UgLSBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcsIFVTQS4gICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLQl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Ryb2xGcmFtZShwQWQsICZSeENlbGwpOwotCQkJCX0KLQkJCQlicmVhazsKLQkJCQkvLyBkaXNjYXJkIG90aGVyIHR5cGUKLQkJCQlkZWZhdWx0OgotCQkJCQlSRUxFQVNFX05ESVNfUEFDS0VUKHBBZCwgcFJ4UGFja2V0LCBORElTX1NUQVRVU19GQUlMVVJFKTsKLQkJCQkJYnJlYWs7Ci0JCQl9Ci0JCX0KLQkJZWxzZQotCQl7Ci0JCQlwQWQtPkNvdW50ZXJzODAyMy5SeEVycm9ycysrOwotCQkJLy8gZGlzY2FyZCB0aGlzIGZyYW1lCi0JCQlSRUxFQVNFX05ESVNfUEFDS0VUKHBBZCwgcFJ4UGFja2V0LCBORElTX1NUQVRVU19GQUlMVVJFKTsKLQkJfQotCX0KLQotCXJldHVybiBiUmVzY2hlZHVsZTsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotCVJvdXRpbmUgRGVzY3JpcHRpb246Ci0JQXJndW1lbnRzOgotCQlwQWQgCVBvaW50ZXIgdG8gb3VyIGFkYXB0ZXIKLQotCUlSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRAlSVE1QSGFuZGxlVHdha2V1cEludGVycnVwdCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlBc2ljRm9yY2VXYWtldXAocEFkLCBGQUxTRSk7Ci19Ci0KLS8qCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLVJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgRWFybHkgY2hlY2tpbmcgYW5kIE9TLWRlcGVuZWQgcGFyc2luZyBmb3IgVHggcGFja2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KGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotCU1vZHVsZSBOYW1lOgotCXNhbml0eS5jCi0KLQlBYnN0cmFjdDoKLQotCVJldmlzaW9uIEhpc3Rvcnk6Ci0JV2hvCQkJV2hlbgkJCVdoYXQKLQktLS0tLS0tLQktLS0tLS0tLS0tCQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JSm9obiBDaGFuZyAgMjAwNC0wOS0wMSAgICAgIGFkZCBXTU0gc3VwcG9ydAotKi8KLSNpbmNsdWRlICIuLi9ydF9jb25maWcuaCIKLQotZXh0ZXJuIFVDSEFSCUNJU0NPX09VSVtdOwotCi1leHRlcm4gVUNIQVIJV1BBX09VSVtdOwotZXh0ZXJuIFVDSEFSCVJTTl9PVUlbXTsKLWV4dGVybiBVQ0hBUglXTUVfSU5GT19FTEVNW107Ci1leHRlcm4gVUNIQVIJV01FX1BBUk1fRUxFTVtdOwotZXh0ZXJuIFVDSEFSCUNjeDJRb3NJbmZvW107Ci1leHRlcm4gVUNIQVIJUkFMSU5LX09VSVtdOwotZXh0ZXJuIFVDSEFSCUJST0FEQ09NX09VSVtdOwotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIE1sbWVTdGFydFJlcVNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBDSEFSIFNzaWRbXSwKLSAgICBPVVQgVUNIQVIgKnBTc2lkTGVuKQotewotICAgIE1MTUVfU1RBUlRfUkVRX1NUUlVDVCAqSW5mbzsKLQotICAgIEluZm8gPSAoTUxNRV9TVEFSVF9SRVFfU1RSVUNUICopKE1zZyk7Ci0KLSAgICBpZiAoSW5mby0+U3NpZExlbiA+IE1BWF9MRU5fT0ZfU1NJRCkKLSAgICB7Ci0gICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIk1sbWVTdGFydFJlcVNhbml0eSBmYWlsIC0gd3JvbmcgU1NJRCBsZW5ndGhcbiIpKTsKLSAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgIH0KLQotICAgICpwU3NpZExlbiA9IEluZm8tPlNzaWRMZW47Ci0gICAgTmRpc01vdmVNZW1vcnkoU3NpZCwgSW5mby0+U3NpZCwgKnBTc2lkTGVuKTsKLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIE1MTUUgbWVzc2FnZSBzYW5pdHkgY2hlY2sKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLQotICAgIElSUUwgPSBESVNQQVRDSF9MRVZFTAotCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqLwotQk9PTEVBTiBQZWVyQXN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VfQUlST05FVF9DS0lQOgotICAgICAgICAgICAgICAgIC8vIDAuIENoZWNrIEFpcm9uZXQgSUUgbGVuZ3RoLCBpdCBtdXN0IGJlIGxhcmdlciBvciBlcXVhbCB0byAyOAotICAgICAgICAgICAgICAgIC8vICAgIENpc2NvJ3MgQVAgVnhXb3JrIHZlcnNpb24od2lsbCBub3QgYmUgc3VwcG9ydGVkKSB1c2VkIHRoaXMgSUUgbGVuZ3RoIGFzIDI4Ci0gICAgICAgICAgICAgICAgLy8gICAgQ2lzY28ncyBBUCBJT1MgdmVyc2lvbiB1c2VkIHRoaXMgSUUgbGVuZ3RoIGFzIDMwCi0gICAgICAgICAgICAgICAgaWYgKHBFaWQtPkxlbiA8IChDS0lQX05FR09USUFUSU9OX0xFTkdUSCAtIDIpKQotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAgICAgLy8gMS4gQ29weSBDS0lQIGZsYWcgYnl0ZSB0byBidWZmZXIgZm9yIHByb2Nlc3MKLSAgICAgICAgICAgICAgICAqcENraXBGbGFnID0gKihwRWlkLT5PY3RldCArIDgpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBjYXNlIElFX0FJUk9ORVRfSVBBRERSRVNTOgotICAgICAgICAgICAgICAgIGlmIChwRWlkLT5MZW4gIT0gMHgwQSkKLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgICAgIC8vIEdldCBDaXNjbyBBaXJvbmV0IElQIGluZm9ybWF0aW9uCi0gICAgICAgICAgICAgICAgaWYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgQ0lTQ09fT1VJLCAzKSA9PSAxKQotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwQWQtPlN0YUNmZy5BaXJvbmV0SVBBZGRyZXNzLCBwRWlkLT5PY3RldCArIDQsIDQpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAvLyBDQ1gyLCBXTU0gdXNlIHRoZSBzYW1lIElFIHZhbHVlCi0gICAgICAgICAgICAvLyBjYXNlIElFX0NDWF9WMjoKLSAgICAgICAgICAgIGNhc2UgSUVfVkVORE9SX1NQRUNJRklDOgotICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBXTUUgUEFSQU1URVIgRUxFTUVOVAotICAgICAgICAgICAgICAgIGlmIChOZGlzRXF1YWxNZW1vcnkocEVpZC0+T2N0ZXQsIFdNRV9QQVJNX0VMRU0sIDYpICYmIChwRWlkLT5MZW4gPT0gMjQpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgUFVDSEFSIHB0cjsKLSAgICAgICAgICAgICAgICAgICAgaW50IGk7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gcGFyc2luZyBFRENBIHBhcmFtZXRlcnMKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iVmFsaWQgICAgICAgICAgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPmJRQWNrICAgICAgICAgICA9IEZBTFNFOyAvLyBwRWlkLT5PY3RldFswXSAmIDB4MTA7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YlF1ZXVlUmVxdWVzdCAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHgyMDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iVHhvcFJlcXVlc3QgICAgPSBGQUxTRTsgLy8gcEVpZC0+T2N0ZXRbMF0gJiAweDQwOwotICAgICAgICAgICAgICAgICAgICAvL3BFZGNhUGFybS0+Yk1vcmVEYXRhQWNrICAgID0gRkFMU0U7IC8vIHBFaWQtPk9jdGV0WzBdICYgMHg4MDsKLSAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5FZGNhVXBkYXRlQ291bnQgPSBwRWlkLT5PY3RldFs2XSAmIDB4MGY7Ci0gICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+YkFQU0RDYXBhYmxlICAgID0gKHBFaWQtPk9jdGV0WzZdICYgMHg4MCkgPyAxIDogMDsKLSAgICAgICAgICAgICAgICAgICAgcHRyID0gJnBFaWQtPk9jdGV0WzhdOwotICAgICAgICAgICAgICAgICAgICBmb3IgKGk9MDsgaTw0OyBpKyspCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIFVDSEFSIGFjaSA9ICgqcHRyICYgMHg2MCkgPj4gNTsgLy8gYjV+NiBpcyBBQyBJTkRFWAotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5iQUNNW2FjaV0gID0gKCgoKnB0cikgJiAweDEwKSA9PSAweDEwKTsgICAvLyBiNSBpcyBBQ00KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+QWlmc25bYWNpXSA9ICgqcHRyKSAmIDB4MGY7ICAgICAgICAgICAgICAgLy8gYjB+MyBpcyBBSUZTTgotICAgICAgICAgICAgICAgICAgICAgICAgcEVkY2FQYXJtLT5Dd21pblthY2ldID0gKihwdHIrMSkgJiAweDBmOyAgICAgICAgICAgICAvLyBiMH40IGlzIEN3bWluCi0gICAgICAgICAgICAgICAgICAgICAgICBwRWRjYVBhcm0tPkN3bWF4W2FjaV0gPSAqKHB0cisxKSA+PiA0OyAgICAgICAgICAgICAgIC8vIGI1fjggaXMgQ3dtYXgKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFZGNhUGFybS0+VHhvcFthY2ldICA9ICoocHRyKzIpICsgMjU2ICogKCoocHRyKzMpKTsgLy8gaW4gdW5pdCBvZiAzMi11cwotICAgICAgICAgICAgICAgICAgICAgICAgcHRyICs9IDQ7IC8vIHBvaW50IHRvIG5leHQgQUMKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBDQ1ggSUUKLSAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAvLyAwLiBDaGVjayB0aGUgc2l6ZSBhbmQgQ0NYIGFkbWluIGNvbnRyb2wKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLkNDWENvbnRyb2wuZmllbGQuRW5hYmxlID09IDApCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBFaWQtPkxlbiAhPSA1KQotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gVHVybiBDQ1gyIGlmIG1hdGNoZWQKLSAgICAgICAgICAgICAgICAgICAgaWYgKE5kaXNFcXVhbE1lbW9yeShwRWlkLT5PY3RldCwgQ2N4MkllSW5mbywgNSkgPT0gMSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLkNDWEVuYWJsZSA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBicmVhazsKLQotICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJQZWVyQXNzb2NSc3BTYW5pdHkgLSBpZ25vcmUgdW5yZWNvZ25pemVkIEVJRCA9ICVkXG4iLCBwRWlkLT5FaWQpKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIExlbmd0aCA9IExlbmd0aCArIDIgKyBwRWlkLT5MZW47Ci0gICAgICAgIHBFaWQgPSAoUEVJRF9TVFJVQ1QpKChVQ0hBUiopcEVpZCArIDIgKyBwRWlkLT5MZW4pOwotICAgIH0KLQotICAgIC8vIEZvcmNlIENDWDIgZW5hYmxlIHRvIFRSVUUgZm9yIHRob3NlIEFQIGRpZG4ndCByZXBsYXkgQ0NYIHYyIElFLCB3ZSBzdGlsbCBmb3JjZSBpdCB0byBiZSBvbgotICAgIGlmIChwQWQtPlN0YUNmZy5DQ1hDb250cm9sLmZpZWxkLkVuYWJsZSA9PSAxKQotICAgICAgICBwQWQtPlN0YUNmZy5DQ1hFbmFibGUgPSBUUlVFOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgTUxNRSBtZXNzYWdlIHNhbml0eSBjaGVjawotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotCi0JSVJRTCA9IERJU1BBVENIX0xFVkVMCi0KLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1CT09MRUFOIFBlZXJQcm9iZVJlcVNhbml0eSgKLSAgICBJTiBQUlRNUF9BREFQVEVSIHBBZCwKLSAgICBJTiBWT0lEICpNc2csCi0gICAgSU4gVUxPTkcgTXNnTGVuLAotICAgIE9VVCBQVUNIQVIgcEFkZHIyLAotICAgIE9VVCBDSEFSIFNzaWRbXSwKLSAgICBPVVQgVUNIQVIgKnBTc2lkTGVuKQotewotICAgIFVDSEFSICAgICAgICAgSWR4OwotICAgIFVDSEFSCSAgICAgIFJhdGVMZW47Ci0gICAgQ0hBUiAgICAgICAgICBJZVR5cGU7Ci0gICAgUEZSQU1FXzgwMl8xMSBwRnJhbWUgPSAoUEZSQU1FXzgwMl8xMSlNc2c7Ci0KLSAgICBDT1BZX01BQ19BRERSKHBBZGRyMiwgcEZyYW1lLT5IZHIuQWRkcjIpOwotCi0gICAgaWYgKChwRnJhbWUtPk9jdGV0WzBdICE9IElFX1NTSUQpIHx8IChwRnJh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HVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0KLQlJUlFMID0gRElTUEFUQ0hfTEVWRUwKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLUJPT0xFQU4gR2V0VGltQml0KAotICAgIElOIENIQVIgKlB0ciwKLSAgICBJTiBVU0hPUlQgQWlkLAotICAgIE9VVCBVQ0hBUiAqVGltTGVuLAotICAgIE9VVCBVQ0hBUiAqQmNhc3RGbGFnLAotICAgIE9VVCBVQ0hBUiAqRHRpbUNvdW50LAotICAgIE9VVCBVQ0hBUiAqRHRpbVBlcmlvZCwKLSAgICBPVVQgVUNIQVIgKk1lc3NhZ2VUb01lKQotewotICAgIFVDSEFSICAgICAgICAgIEJpdENudGwsIE4xLCBOMiwgTXlCeXRlLCBNeUJpdDsKLSAgICBDSEFSICAgICAgICAgICpJZHhQdHI7Ci0KLSAgICBJZHhQdHIgPSBQdHI7Ci0KLSAgICBJZHhQdHIgKys7Ci0gICAgKlRpbUxlbiA9ICpJZHhQdHI7Ci0KLSAgICAvLyBnZXQgRFRJTSBDb3VudCBmcm9tIFRJTSBlbGVtZW50Ci0gICAgSWR4UHRyICsrOwotICAgICpEdGltQ291bnQgPSAqSWR4UHRyOwotCi0gICAgLy8gZ2V0IERUSU0gUGVyaW9kIGZyb20gVElNIGVsZW1lbnQKLSAgICBJZHhQdHIrKzsKLSAgICAqRHRpbVBlcmlvZCA9ICpJZHhQdHI7Ci0KLSAgICAvLyBnZXQgQml0bWFwIENvbnRyb2wgZnJvbSBUSU0gZWxlbWVudAotICAgIElkeFB0cisrOwotICAgIEJpdENudGwgPSAqSWR4UHRyOwotCi0gICAgaWYgKCgqRHRpbUNvdW50ID09IDApICYmI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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICoKLSAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCi0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK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BU1RfQUREUiwgQlJPQURDQVNUX0FERFIpOwotCi0JCQlNYWtlT3V0Z29pbmdGcmFtZShwT3V0QnVmZmVyLCAgICAgICAgICAgICAgICZGcmFtZUxlbiwKLQkJCQkJCQkgIHNpemVvZihIRUFERVJfODAyXzExKSwgICAgJkhkcjgwMjExLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAmU3NpZEllLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5NbG1lQXV4LlNzaWRMZW4sCi0JCQkJCQkJICBwQWQtPk1sbWVBdXguU3NpZExlbiwJICAgIHBBZC0+TWxtZUF1eC5Tc2lkLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAmU3VwUmF0ZUllLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAmU3VwUmF0ZUxlbiwKLQkJCQkJCQkgIFN1cFJhdGVMZW4sICAgICAgICAgICAgICAgcFN1cFJhdGUsCi0JCQkJCQkJICBFTkRfT0ZfQVJHUyk7Ci0KLQkJCWlmIChFeHRSYXRlTGVuKQotCQkJewotCQkJCVVMT05HIFRtcDsKLQkJCQlNYWtlT3V0Z29pbmdGcmFtZShwT3V0QnVmZmVyICsgRnJhbWVMZW4sICAgICAgICAgICAgJlRtcCwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkV4dFJhdGVJZSwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkV4dFJhdGVMZW4sCi0JCQkJCQkJCSAgRXh0UmF0ZUxlbiwgICAgICAgICAgICAgICAgICAgICAgIHBFeHRSYXRlLAotCQkJCQkJCQkgIEVORF9PRl9BUkdTKTsKLQkJCQlGcmFtZUxlbiArPSBUbXA7Ci0JCQl9Ci0KLQotCQkJTWluaXBvcnRNTVJlcXVlc3QocEFkLCAwLCBwT3V0QnVmZmVyLCBGcmFtZUxlbik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N1cFJhdGVJZSwKLQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPlN0YUFjdGl2ZS5TdXBSYXRlTGVuLAotCQkJCQkJCSAgcEFkLT5TdGFBY3RpdmUuU3VwUmF0ZUxlbiwgICAgcEFkLT5TdGFBY3RpdmUuU3VwUmF0ZSwKLQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEc0llLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkRzTGVuLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBBZC0+Q29tbW9uQ2ZnLkNoYW5uZWwsCi0JCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSWJzc0llLAotCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgJklic3NMZW4sCi0JCQkJCQkJICAyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEFkLT5TdGFBY3RpdmUuQXRpbVdpbiwKLQkJCQkJCQkgIEVORF9PRl9BUkdTKTsKLQotCQkJaWYgKHBBZC0+U3RhQWN0aXZlLkV4dFJhdGVMZW4pCi0JCQl7Ci0JCQkJVUxPTkcgdG1wOwotCQkJCU1ha2VPdXRnb2luZ0ZyYW1lKHBPdXRCdWZmZXIgKyBGcmFtZUxlbiwgICAgICAgICZ0bXAsCi0JCQkJCQkJCSAgMywgICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9jYWxFcnBJZSwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAmRXh0UmF0ZUllLAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwQWQtPlN0YUFjdGl2ZS5FeHRSYXRlTGVuLAotCQkJCQkJCQkgIHBBZC0+U3RhQWN0aXZlLkV4dFJhdGVMZW4sICAgICZwQWQtPlN0YUFjdGl2ZS5FeHRSYXRl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VsIG9mZnNldCBJRSBpcyBpbmNsdWRlZCBpbiBCZWFjb24sIFByb2JlIFJzcCBvciBjaGFubmVsIFN3aXRjaCBBbm5vdW5jZW1lbnQgRnJhbWUKLQkJCQlpZiAocEFkLT5iQnJvYWRDb21IVCA9PSBUUlVFKQotCQkJCXsKLQkJCQkJTWFrZU91dGdvaW5nRnJhbWUocE91dEJ1ZmZlciArIEZyYW1lTGVuLCAgICAgICAgICAgICZUbXBMZW4sCi0JCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZXcGFJZSwKLQkJCQkJCQkJICA0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkJST0FEQ09NWzBdLAotCQkJCQkJCQkgcEFkLT5NbG1lQXV4Lkh0Q2FwYWJpbGl0eUxlbiwgICAgICAgICAgJnBBZC0+TWxtZUF1eC5IdENhcGFiaWxpdHksCi0JCQkJCQkJCSAgRU5EX09GX0FSR1MpOwotCQkJCX0KLQkJCQllbHNlCi0JCQkJewotCQkJCU1ha2VPdXRnb2luZ0ZyYW1lKHBPdXRCdWZmZXIgKyBGcmFtZUxlbiwgICAgICAgICAgICAmVG1wTGVuLAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmSHRDYXBJZSwKLQkJCQkJCQkJICAxLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkh0TGVuLAotCQkJCQkJCQkgc2l6ZW9mKEhUX0NBUEFCSUxJVFlfSUUpLCAgICAgICAgICAmcEFkLT5Db21tb25DZmcuSHRDYXBhYmlsaXR5LAotCQkJCQkJCQkgIDEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmQWRkSHRJbmZvSWUsCi0JCQkJCQkJCSAgMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZBZGRIdExlbiwKLQkJCQkJCQkJIHNpemVvZihBRERfSFRfSU5GT19JRSksICAgICAgICAgICZwQWQtPkNvbW1vbkNmZ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LQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIEVucXVldWVQc1BvbGwoCi0JSU4gUFJUTVBfQURBUFRFUiBwQWQpCi17Ci0jaWZkZWYgUkFMSU5LX0FURQotICAgIGlmIChBVEVfT04ocEFkKSkKLSAgICB7Ci0JCXJldHVybjsKLSAgICB9Ci0jZW5kaWYgLy8gUkFMSU5LX0FURSAvLwotCi0KLQlpZiAocEFkLT5TdGFDZmcuV2luZG93c1Bvd2VyTW9kZSA9PSBOZGlzODAyXzExUG93ZXJNb2RlTGVnYWN5X1BTUCkKLSAgICAJcEFkLT5Qc1BvbGxGcmFtZS5GQy5Qd3JNZ210ID0gUFdSX1NBVkU7Ci0JTWluaXBvcnRNTVJlcXVlc3QocEFkLCAwLCAoUFVDSEFSKSZwQWQtPlBzUG9sbEZyYW1lLCBzaXplb2YoUFNQT0xMX0ZSQU1FKSk7Ci19Ci0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKi8KLVZPSUQgRW5xdWV1ZVByb2JlUmVxdWVzdCgKLQlJTiBQUlRNUF9BREFQVEVSIHBBZCkKLXsKLQlORElTX1NUQVRVUyAgICAgTlN0YXRlOwotCVBVQ0hBUiAgICAgICAgICBwT3V0QnVmZmVyOwotCVVMT05HICAgICAgICAgICBGcmFtZUxlbiA9IDA7Ci0JSEVBREVSXzgwMl8xMSAgIEhkcjgwMjExOwotCi0JREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiZm9yY2Ugb3V0IGEgUHJvYmVSZXF1ZXN0IC4uLlxuIikpOwotCi0JTlN0YXRlID0gT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SAqCi0gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICoKLSAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCi0gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdG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UFQT0xLZXk7Ci0JCQlicmVhazsKLQkJY2FzZSBFQVBPTEFTRkFsZXJ0OgotCQkJKk1zZ1R5cGUgPSBNVDJfRUFQT0xBU0ZBbGVydDsKLQkJCWJyZWFrOwotCQlkZWZhdWx0OgotCQkJcmV0dXJuIEZBTFNFOwotCX0KLQlyZXR1cm4gVFJVRTsKLX0KLQotLyoKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCURlc2NyaXB0aW9uOgotCQlhc3NvY2lhdGlvbglzdGF0ZSBtYWNoaW5lIGluaXQsCWluY2x1ZGluZyBzdGF0ZQl0cmFuc2l0aW9uIGFuZCB0aW1lciBpbml0Ci0JUGFyYW1ldGVyczoKLQkJUyAtCXBvaW50ZXIJdG8gdGhlIGFzc29jaWF0aW9uIHN0YXRlIG1hY2hpbmUKLQk9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICovCi1WT0lEIFdwYVBza1N0YXRlTWFjaGluZUluaXQoCi0JSU4JUFJUTVBfQURBUFRFUglwQWQsCi0JSU4JU1RBVEVfTUFDSElORSAqUywKLQlPVVQJU1RBVEVfTUFDSElORV9GVU5DIFRyYW5zW10pCi17Ci0JU3RhdGVNYWNoaW5lSW5pdChTLAlUcmFucywgTUFYX1dQQV9QU0tfU1RBVEUsIE1BWF9XUEFfUFNLX01TRywgKFNUQVRFX01BQ0hJTkVfRlVOQylEcm9wLCBXUEFfUFNLX0lETEUsIFdQQV9NQUNISU5FX0JBU0UpOwotCVN0YXRlTWFjaGluZVNldEFjdGlvbihTLCBXUEFfUFNLX0lETEUsIE1UMl9FQVBPTEtleSwgKFNUQVRFX01BQ0hJTkVfRlVOQylXcGFFQVBPTEtleUFjdGlvbik7Ci19Ci0KLS8qCi0JPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIFJvdXRpbmUgRGVzY3JpcHRpb246Ci0gICAgUGFyc2UgS0VZREFUQSBmaWVsZC4gIEtFWURBVEFbXSBNYXkgY29udGFpbiAyIFJTTiBJRSBhbmQgb3B0aW9uYWxseSBHVEsuCi0gICAgR1RLICBpcyBlbmNhcHR1bGF0ZWQgaW4gS0RFIGZvcm1hdCBhdCAgcC44MyA4MDIuMTFpIEQxMAotCi0gICAgQXJndW1lbnRzOgotCi0gICAgUmV0dXJuIFZhbHVlOgotCi0gICAgTm90ZToKLSAgICAgICAgODAyLjExaSBEMTAKLQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUJPT0xFQU4gUGFyc2VLZXlEYXRhKAotCUlOICBQUlRNUF9BREFQVEVSICAgcEFkLAotCUlOICBQVUNIQVIgICAgICAgICAgcEtleURhdGEsCi0JSU4gIFVDSEFSICAgICAgICAgICBLZXlEYXRhTGVuLAotCUlOCVVDSEFSCQkJYlBhaXJld2lzZSkKLXsKLSAgICBQS0RFX0VOQ0FQICAgICAgICAgIHBLREUgPSBOVUxMOwotICAgIFBVQ0hBUiAgICAgICAgICAgICAgcE15S2V5RGF0YSA9IHBLZXlEYXRhOwotICAgIFVDSEFSICAgICAgICAgICAgICAgS2V5RGF0YUxlbmd0aCA9IEtleURhdGFMZW47Ci0gICAgVUNIQVIgICAgICAgICAgICAgICBHVEtMRU47Ci0JVUNIQVIJCQkJc2tpcF9vZmZzZXQ7Ci0KLQkvLyBWZXJpZnkgVGhlIFJTTiBJRSBjb250YWluZWQgaW4gUGFpcmV3aXNlLU1zZyAzIGFuZCBza2lwIGl0Ci0JaWYgKGJQYWlyZXdpc2UpCi0gICAgewotCQkvLyBDaGVjayBSU04gSUUgd2hldGhlciBpdCBpcyBXUEEyL1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Ci0gKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlICAgICAqCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNywgVVNBLiAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotICAgIE1vZHVsZSBOYW1lOgotICAgIHN0YV9pb2N0bC5jCi0KLSAgICBBYnN0cmFjdDoKLSAgICBJT0NUTCByZWxhdGVkIHN1YnJvdXRpbmVzCi0KLSAgICBSZXZpc2lvbiBIaXN0b3J5OgotICAgIFdobyAgICAgICAgIFdoZW4gICAgICAgICAgV2hhdAotICAgIC0tLS0tLS0tICAgIC0tLS0tLS0tLS0gICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotICAgIFJvcnkgQ2hlbiAgIDAxLTAzLTIwMDMgICAgY3JlYXRlZAot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9UMTFfTl9TVVBQT1JUIC8vCi0gICAgICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJNb25pdG9yIE1vZGUoQ2hhbm5lbCAlZClcbiIsIHBBZC0+Q29tbW9uQ2ZnLkNoYW5uZWwpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChwQWQtPkluZGljYXRlTWVkaWFTdGF0ZSA9PSBOZGlzTWVkaWFTdGF0ZUNvbm5lY3RlZCkKLSAgICAgICAgICAgIAl7Ci0gICAgICAgICAgICAJICAgIGlmIChJTkZSQV9PTihwQWQpKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJDb25uZWN0ZWQoQVA6ICVzWyUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWDolMDJYXSlcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Tc2lkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbMF0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFsxXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzJdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkLT5Db21tb25DZmcuQnNzaWRbM10sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWQtPkNvbW1vbkNmZy5Cc3NpZFs0XSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZC0+Q29tbW9uQ2ZnLkJzc2lkWzVdKTsKLSAgICAgICAgICAgIAkJREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UgLCgiU3NpZD0lcy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F0aW9uCi0JCQkJCXBBZC0+RXh0cmFJbmZvID0gU1dfUkFESU9fT0ZGOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHNwcmludGYoZXh0cmEsICJSYWRpbyBPZmZcbiIpOwotICAgICAgICAgICAgd3JxLT5sZW5ndGggPSBzdHJsZW4oZXh0cmEpICsgMTsgLy8gMTogc2l6ZSBvZiAnXDAnCi0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSQUlPX09OOgotICAgICAgICAgICAgaWYgKFJUTVBfVEVTVF9GTEFHKHBBZCwgZlJUTVBfQURBUFRFUl9CU1NfU0NBTl9JTl9QUk9HUkVTUykpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgc3ByaW50ZihleHRyYSwgIlNjYW5uaW5nXG4iKTsKLSAgICAgICAgICAgICAgICB3cnEtPmxlbmd0aCA9IHN0cmxlbihleHRyYSkgKyAxOyAvLyAxOiBzaXplIG9mICdcMCcKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLmJTd1JhZGlvID0gVFJVRTsKLSAgICAgICAgICAgIC8vaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyAhPSAocEFkLT5TdGFDZmcuYkh3UmFkaW8gJiYgcEFkLT5TdGFDZmcuYlN3UmFkaW8pKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBBZC0+U3RhQ2ZnLmJSYWRpbyA9IChwQWQtPlN0YUNmZy5iSHdSYWRpbyAmJiBwQWQtPlN0YUNmZy5iU3dSYWRpbyk7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZC0+U3RhQ2ZnLmJSYWRpbyA9PSBUUlVFKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgTWxtZVJhZGlvT24ocEFkKTsKLSAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIGV4dH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gICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGZuU2V0Q2lwaGVyS2V5KHBBZGFwdGVyLCBrZXlJZHgsIENJUEhFUl9US0lQLCBGQUxTRSwgZXh0KTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTIpCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9wQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkID0gV1BBXzgwMl8xWF9QT1JUX1NFQ1VSRUQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0JCX0KLSAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZXh0LT5leHRfZmxhZ3MgJiBJV19FTkNPREVfRVhUX0dST1VQX0tFWSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgZm5TZXRDaXBoZXJLZXkocEFkYXB0ZXIsIGtleUlkeCwgQ0lQSEVSX1RLSVAsIFRSVUUsIGV4dCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNldCA4MDIuMXggcG9ydCBjb250cm9sCi0gICAgICAgICAgICAJICAgICAgICAvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgICAgIAkgICAgICAgIFNUQV9QT1JUX1NFQ1VSRUQocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICBjYXNlIElXX0VOQ09ERV9BTEdfQ0NNUDoKLSAgICAgICAgICAgICAgICBpZiAoZXh0LT5leHRfZmxhZ3MgJiBJV19FTkNPREVfRVhUX1NFVF9UWF9LRVkpCi0JCXsKLSAgICAgICAgICAgICAgICAgICAgZm5TZXRDaXBoZXJLZXkocEFkYXB0ZXIsIGtleUlkeCwgQ0lQSEVSX0FFUywgRkFMU0UsIGV4dCk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTIpCi0gICAgICAgICAgICAgICAgICAgIAkvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgICAgICAgICAgICAgCVNUQV9QT1JUX1NFQ1VSRUQocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfR1JPVVBfS0VZKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgZm5TZXRDaXBoZXJLZXkocEFkYXB0ZXIsIGtleUlkeCwgQ0lQSEVSX0FFUywgVFJVRSwgZXh0KTsKLQotICAgICAgICAgICAgICAgICAgICAvLyBzZXQgODAyLjF4IHBvcnQgY29udHJvbAotICAgICAgICAJICAgICAgICAvL3BBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfU0VDVVJFRDsKLSAgICAgICAgCSAgICAgICAgU1RBX1BPUlRfU0VDVVJFRChwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgIAkJZGVmYXVsdDoKLSAgICAJCQlyZXR1cm4gLUVJTlZBTDsKLQkJfQotICAgIH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FRFUiBwQWRhcHRlciwKLSAgICBJTiAgT1VUIHN0cnVjdCBpZnJlcSAgICAqcnEsCi0gICAgSU4gIElOVCAgICAgICAgICAgICAgICAgY21kKQotewotICAgIHN0cnVjdCBpd3JlcSAgICAgICAgICAgICAgICAgICAgICAgICp3cnEgPSAoc3RydWN0IGl3cmVxICopIHJxOwotICAgIE5ESVNfODAyXzExX1NTSUQgICAgICAgICAgICAgICAgICAgIFNzaWQ7Ci0gICAgTkRJU184MDJfMTFfTUFDX0FERFJFU1MgICAgICAgICAgICAgQnNzaWQ7Ci0gICAgUlRfODAyXzExX1BIWV9NT0RFICAgICAgICAgICAgICAgICAgUGh5TW9kZTsKLSAgICBSVF84MDJfMTFfU1RBX0NPTkZJRyAgICAgICAgICAgICAgICBTdGFDb25maWc7Ci0gICAgTkRJU184MDJfMTFfUkFURVMgICAgICAgICAgICAgICAgICAgYXJ5UmF0ZXM7Ci0gICAgUlRfODAyXzExX1BSRUFNQkxFICAgICAgICAgICAgICAgICAgUHJlYW1ibGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUgICAgIEF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlTWF4OwotICAgIE5ESVNfODAyXzExX05FVFdPUktfSU5GUkFTVFJVQ1RVUkUgIEJzc1R5cGU7Ci0gICAgTkRJU184MDJfMTFfUlRTX1RIUkVTSE9MRCAgICAgICAgICAgUnRzVGhyZXNoOwotICAgIE5ESVNfODAyXzExX0ZSQUdNRU5UQVRJT05fVEhSRVNIT0xEIEZyYWdUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfUE9XRVJfTU9ERSAgICAgICAgICAgICAgUG93ZXJNb2RlOwotICAgIFBORElTXzgwMl8xMV9LRVkgICAgICAgICAgICAgICAgICAgIHBLZXkgPSBOVUxMOwotICAgIFBORElTXzgwMl8xMV9XRVAJCQkgICAgICAgIHBXZXBLZXkgPU5VTEw7Ci0gICAgUE5ESVNfODAyXzExX1JFTU9WRV9LRVkgICAgICAgICAgICAgcFJlbW92ZUtleSA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAgICAgICAgICAgQ29uZmlnLCAqcENvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19UWVBFICAgICAgICAgICAgTmV0VHlwZTsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOb3c7Ci0gICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gMDsKLSAgICBJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTLCBNYXhQaHlNb2RlID0gUEhZXzExRzsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQb3dlclRlbXA7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmFkaW9TdGF0ZTsKLSAgICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0ZU1hY2hpbmVUb3VjaGVkID0gRkFMU0U7Ci0jaWZkZWYgRE9UMTFfTl9TVVBQT1JUCi0JT0lEX1NFVF9IVF9QSFlNT0RFCQkJCQlIVF9QaHlNb2RlOwkvLzExbiAsa2F0aHkKLSNlbmRpZiAvLyBET1QxMV9OX1NVUFBPUlQgLy8KLSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9TVVBQT1JUCi0gICAgUE5ESVNfODAyXzExX1BNS0lEICAgICAgICAgICAgICAgICAgcFBta0lkID0gTlVMTDsKLSAgICBCT09MRUFOCQkJCSAgICAgICAgICAgICAgICBJRUVFODAyMXhTdGF0ZSA9IEZBTFNFOwotICAgIEJPT0xFQU4JCQkJICAgICAgICAgICAgICAgIElFRUU4MDIx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0cmllcwotICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5TY2FuQ250ID0gMDsKLSAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuTGFzdFNjYW5UaW1lID0gTm93OwotCi0JCQlwQWRhcHRlci0+U3RhQ2ZnLmJTY2FuUmVxSXNGcm9tV2ViVUkgPSBUUlVFOwotICAgICAgICAgICAgUlRNUF9TRVRfRkxBRyhwQWRhcHRlciwgZlJUTVBfQURBUFRFUl9CU1NfU0NBTl9JTl9QUk9HUkVTUyk7Ci0gICAgICAgICAgICBNbG1lRW5xdWV1ZShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLAotICAgICAgICAgICAgICAgICAgICAgICAgT0lEXzgwMl8xMV9CU1NJRF9MSVNUX1NDQU4sCi0gICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0KLSAgICAgICAgICAgIFN0YXR1cyA9IE5ESVNfU1RBVFVTX1NVQ0NFU1M7Ci0gICAgICAgICAgICBTdGF0ZU1hY2hpbmVUb3VjaGVkID0gVFJVRTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfU1NJRDoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX1NTSUQpKQotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAJUENIQVIgcFNzaWRTdHJpbmcgPSBOVUxMOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZTc2lkLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotCi0JCQkJREJHUFJJTlQoUlRfREVCVUd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5TdGFDZmcuU2NhbkNudCA9IDA7Ci0KLSAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPk1sbWUuQ250bE1hY2hpbmUuQ3VyclN0YXRlICE9IENOVExfSURMRSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFJUMjhYWF9NTE1FX1JFU0VUX1NUQVRFX01BQ0hJTkUocEFkYXB0ZXIpOwotICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCIhISEgTUxNRSBidXN5LCByZXNldCBNTE1FIHN0YXRlIG1hY2hpbmUgISEhXG4iKSk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIE1sbWVFbnF1ZXVlKHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1MTUVfQ05UTF9TVEFURV9NQUNISU5FLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9JRF84MDJfMTFfQlNTSUQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKE5ESVNfODAyXzExX01BQ19BRERSRVNTKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKSZCc3NpZCk7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gTkRJU19TVEFUVVNfU1VDQ0VTUzsKLSAgICAgICAgICAgICAgICBTdGF0ZU1hY2hpbmVUb3VjaGVkID0gVFJVRTsKLQotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9CU1NJRCAlMDJ4OiUwMng6JTAyeDolMDJ4OiUwMng6JTAyeFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCc3NpZFswXSwgQnNzaWRbMV0sIEJzc2lkWzJdLCBCc3NpZFszXSwgQnNzaWRbNF0sIEJzc2lkWzVdKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1JBRElPOgotICAgICAgICAgICAgaWYgKHdycS0+dS5kYXRhLmxlbmd0aCAhPSBzaXplb2YoQk9PTEVBTikpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlJhZGlvU3RhdGUsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpSVF9PSURfODAyXzExX1JBRElPICg9JWQpXG4iLCBSYWRpb1N0YXRlKSk7Ci0gICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuYlN3UmFkaW8gIT0gUmFkaW9TdGF0ZSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuYlN3UmFkaW8gPSBSYWRpb1N0YXRlOwotICAgICAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5iUmFkaW8gIT0gKHBBZGFwdGVyLT5TdGFDZmcuYkh3UmFkaW8gJiYgcEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbykpCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuYlJhZGlvID0gKHBBZGFwdGVyLT5TdGFDZmcuYkh3UmFkaW8gJiYgcEFkYXB0ZXItPlN0YUNmZy5iU3dSYWRpbyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5iUmFkaW8gPT0gVFJVRSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNbG1lUmFkaW9PbihwQWRhcHRlcik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIGV4dHJhIGluZm9ybWF0aW9uCi0JCQkJCQkJcEFkYXB0ZXItPkV4dHJhSW5mbyA9IEVYVFJBX0lORk9fQ0xFQVI7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgTWxtZVJhZGlvT2ZmKHBBZGFwdGVyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXh0cmEgaW5mb3JtYXRpb24KLQkJCQkJCQlwQWRhcHRlci0+RXh0cmFJbmZvID0gU1dfUkFESU9fT0ZGOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9QSFlfTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKFJUXzgwMl8xMV9QSFlfTU9ERSkpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlBoeU1vZGUsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0JCQkJaWYgKFBoeU1vZGUgPD0gTWF4UGh5TW9kZSkKLQkJCQl7Ci0gICAgICAgICAgICAgICAgCVJUTVBTZXRQaHlNb2RlKHBBZGFwdGVyLCBQaHlNb2RlKTsKLSNpZmRlZiBET1QxMV9OX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2NNb2RlIDw9IE1heFBoeU1vZGUpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgLy8gYWxsb3cgZHluYW1pYyBjaGFuZ2Ugb2YgIlVTRSBPRkRNIHJhdGUgb3Igbm90IiBpbiBBREhPQyBtb2RlCi0gICAgICAgICAgICAgICAgICAgIC8vIGlmIHNldHRpbmcgY2hhbmdlZCwgbmVlZCB0byByZXNldCBjdXJyZW50IFRYIHJhdGUgYXMgd2VsbCBhcyBCRUFDT04gZnJhbWUgZm9ybWF0Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZSA9IFN0YUNvbmZpZy5BZGhvY01vZGU7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkJzc1R5cGUgPT0gQlNTX0FESE9DKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIAlSVE1QU2V0UGh5TW9kZShwQWRhcHRlciwgUGh5TW9kZSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBNbG1lVXBkYXRlVHhSYXRlcyhwQWRhcHRlciwgRkFMU0UsIDApOwotICAgICAgICAgICAgICAgICAgICAgICAgTWFrZUlic3NCZWFjb24ocEFkYXB0ZXIpOyAgICAgICAgICAgLy8gcmUtYnVpbGQgQkVBQ09OIGZyYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICBBc2ljRW5hYmxlSWJzc1N5bmMocEFkYXB0ZXIpOyAgIC8vIGNvcHkgdG8gb24tY2hpcCBtZW1vcnkKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfU0VUX1NUQV9DT05GSUcgKEJ1cnN0PSVkLCBQcm90ZWN0aW9uPSVsZCxTaG9ydFNsb3Q9JWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5iRW5hYmxlVHhCdXJzdCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlVzZUJHUHJvdGVjdGlvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLmJVc2VTaG9ydFNsb3RUaW1lKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0RFU0lSRURfUkFURVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9SQVRFUykpCi0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJmFyeVJhdGVzLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIE5kaXNaZXJvTWVtb3J5KHBBZGFwdGVyLT5Db21tb25DZmcuRGVzaXJlUmF0ZSwgTUFYX0xFTl9PRl9TVVBQT1JURURfUkFURVMpOwotICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBBZGFwdGVyLT5Db21tb25DZmcuRGVzaXJlUmF0ZSwgJmFyeVJhdGVzLCBzaXplb2YoTkRJU184MDJfMTFfUkFURVMpKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfREVTSVJFRF9SQVRFUyAoJTAyeCwlMDJ4LCUwMngsJTAyeCwlMDJ4LCUwMngsJTAyeCwlMDJ4KVxuIi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gIGlmIChQcmVhbWJsZSA9PSBSdDgwMl8xMVByZWFtYmxlU2hvcnQpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLlR4UHJlYW1ibGUgPSBQcmVhbWJsZTsKLSAgICAgICAgICAgICAgICAgICAgTWxtZVNldFR4UHJlYW1ibGUocEFkYXB0ZXIsIFJ0ODAyXzExUHJlYW1ibGVTaG9ydCk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgaWYgKChQcmVhbWJsZSA9PSBSdDgwMl8xMVByZWFtYmxlTG9uZykgfHwgKFByZWFtYmxlID09IFJ0ODAyXzExUHJlYW1ibGVBdXRvKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIC8vIGlmIHVzZXIgd2FudHMgQVVUTywgaW5pdGlhbGl6ZSB0byBMT05HIGhlcmUsIHRoZW4gY2hhbmdlIGFjY29yZGluZyB0byBBUCdzCi0gICAgICAgICAgICAgICAgICAgIC8vIGNhcGFiaWxpdHkgdXBvbiBhc3NvY2lhdGlvbi4KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5UeFByZWFtYmxlID0gUHJlYW1ibGU7Ci0gICAgICAgICAgICAgICAgICAgIE1sbWVTZXRUeFByZWFtYmxlKHBBZGFwdGVyLCBSdDgwMl8xMVByZWFtYmxlTG9uZyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6OlJUX09JRF84MDJfMTFfUFJFQU1CTEUgKD0lZClcbiIsIFByZWFtYmxlKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1dFUF9TVEFUVVM6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9XRVBfU1RBVFVTKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmV2VwU3RhdHVzLCB3cnEtPnUuZGF0YS5wb2ludGVyLCB3cnEtPnUuZGF0YS5sZW5ndGgpOwotICAgICAgICAgICAgICAgIC8vIFNpbmNlIFRLSVAsIEFFUywgV0VQIGFyZSBhbGwgc3VwcG9ydGVkLiBJdCBzaG91bGQgbm90IGhhdmUgYW55IGludmFsaWQgc2V0dGluZwotICAgICAgICAgICAgICAgIGlmIChXZXBTdGF0dXMgPD0gTmRpczgwMl8xMUVuY3J5cHRpb24zS2V5QWJzZW50KQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICE9IFdlcFN0YXR1cykKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29uZmlnIGhhcyBjaGFuZ2VkCi0gICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+YkNvbmZpZ0NoYW5nZWQgPSBUUlVFOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3RhdHVzICAgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5PcmlnV2VwU3RhdHVzID0gV2VwU3RhdHVzOwotICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBhaXJDaXBoZXIgICAgPSBXZXBTdGF0dXM7Ci0gICAgICAgICAgICAgICAgCXBBZGFwdGVyLT5TdGFDZmcuR3JvdXBDaXBoZXIgICA9IFdlcFN0YXR1czsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfV0VQX1NUQVRVUyAoPSVkKVxuIixXZXBTdGF0dXMpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0FVVEhFTlRJQ0FUSU9OX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZBdXRoTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoQXV0aE1vZGUgPiBOZGlzODAyXzExQXV0aE1vZGVNYXgpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IEF1dGhNb2RlKQotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBDb25maWcgaGFzIGNoYW5nZWQKLSAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5iQ29uZmlnQ2hhbmdlZCA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9IEF1dGhNb2RlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLlBvcnRTZWN1cmVkID0gV1BBXzgwMl8xWF9QT1JUX05PVF9TRUNVUkVEOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9BVVRIRU5USUNBVElPTl9NT0RFICg9JWQpIFxuIixwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX0lORlJBU1RSVUNUVVJFX01PREU6Ci0gICAgICAgICAgICBpZiAod3JxLT51LmRhdGEubGVuZ3RoICE9IHNpemVvZihORElTXzgwMl8xMV9ORVRXT1JLX0lORlJBU1RSVUNUVVJFKSkKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X2Zyb21fdXNlcigmQnNzVHlwZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLQotCQkJCWlmIChCc3NUeXBlID09IE5kaXM4MDJfMTFJQlNTKQotCQkJC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IH0KLSAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPkNvbW1vbkNmZy5GcmFnbWVudFRocmVzaG9sZCA9IChVU0hPUlQpRnJhZ1RocmVzaDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9GUkFHTUVOVEFUSU9OX1RIUkVTSE9MRCAoPSVsZCkgXG4iLEZyYWdUaHJlc2gpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfUE9XRVJfTU9ERToKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX1BPV0VSX01PREUpKQotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FSU5WQUw7Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIoJlBvd2VyTW9kZSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBpZiAoUG93ZXJNb2RlID09IE5kaXM4MDJfMTFQb3dlck1vZGVDQU0pCi0gICAgICAgICAgICAgICAgCVNldF9QU01vZGVfUHJvYyhwQWRhcHRlciwgIkNBTSIpOwotICAgICAgICAgICAgICAgIGVsc2UgaWYgKFBvd2VyTW9kZSA9PSBOZGlzODAyXzExUG93ZXJNb2RlTUFYX1BTUCkKLSAgICAgICAgICAgICAgICAJU2V0X1BTTW9kZV9Qcm9jKHBBZGFwdGVyLCAiTWF4X1BTUCIpOwotICAgICAgICAgICAgICAgIG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BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9ORVRXT1JLX1RZUEVfSU5fVVNFICg9JWQpXG4iLE5ldFR5cGUpKTsKLQkJICAgIH0KLQkJCWJyZWFrOwotICAgICAgICAvLyBGb3IgV1BBIFBTSyBQTUsga2V5Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9BRERfV1BBOgotICAgICAgICAgICAgcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocEtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9BRERfV1BBLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spICYmCi0JCQkJICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0spICYmCi0JCQkJICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1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GF0ZSA9IFNTX1NUQVJUOwotCi0gICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6UlRfT0lEXzgwMl8xMV9BRERfV1BBIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBLZXktPktleUluZGV4LCBwS2V5LT5LZXlMZW5ndGgpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5XcGFTdGF0ZSA9IFNTX05PVFVTRTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpSVF9PSURfODAyXzExX0FERF9XUEEgKGlkPTB4JXgsIExlbj0lZC1ieXRlKVxuIiwgcEtleS0+S2V5SW5kZXgsIHBLZXktPktleUxlbmd0aCkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9SRU1PVkVfS0VZOgotICAgICAgICAgICAgcFJlbW92ZUtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwUmVtb3ZlS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgU3RhdHVzID0gY29weV9mcm9tX3VzZXIocFJlbW92ZUtleSwgd3JxLT51LmRhdGEucG9pbnRlciwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGlmIChwUmVtb3ZlS2V5LT5MZW5ndGggIT0gd3JxLT51LmRhdGEubGVuZ3RoKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIVxuIikpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID49IE5kaXM4MDJfMTFBdXRoTW9kZVdQQSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIFJUTVBXUEFSZW1vdmVLZXlQcm9jKHBBZGFwdGVyLCBwUmVtb3ZlS2V5KTsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX1JFTU9WRV9LRVksIFJlbW92ZSBXUEEgS2V5ISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgS2V5SWR4ID0gcFJlbW92ZUtleS0+S2V5SW5kZXg7Ci0KLSAgICAgICAgICAgICAgICAgICAgaWYgKEtleUlkeCAmIDB4ODAwMDAwMDApCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNob3VsZCBuZXZlciBzZXQgZGVmYXVsdCBiaXQgd2hlbiByZW1vdmUga2V5Ci0gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZLCBGYWlsZWQhIShTaG91bGQgbmV2ZXIgc2V0IGRlZmF1bHQgYml0IHdoZW4gcmVtb3ZlIGtleSlcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIEtleUlkeCA9IEtleUlkeCAmIDB4MGZmZmZmZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoS2V5SWR4ID4gMykKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfUkVNT1ZFX0tFWSwgRmFpbGVkISEoS2V5SWRbJWRdIG91dCBvZiByYW5nZSlcbiIsIEtleUlkeCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXlMZW4gPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5DaXBoZXJBbGcgPSBDSVBIRVJfTk9ORTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBBc2ljUmVtb3ZlU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsIDAsIChVQ0hBUilLZXlJZHgpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEXzgwMl8xMV9SRU1PVkVfS0VZIChpZD0weCV4LCBMZW49JWQtYnl0ZSlcbiIsIHBSZW1vdmVLZXktPktleUluZGV4LCBwUmVtb3ZlS2V5LT5MZW5ndGgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGtmcmVlKHBSZW1vdmVLZXkpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIC8vIE5ldyBmb3IgV1BBCi0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9BRERfS0VZOgotICAgICAgICAgICAgcEtleSA9IGttYWxsb2Mod3JxLT51LmRhdGEubGVuZ3RoLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwS2V5ID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKHBLZXksIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBpZiAocEtleS0+TGVuZ3RoICE9IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSwgRmFpbGVkISFcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBSVE1QQWRkS2V5KHBBZGFwdGVyLCBwS2V5KTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQ6Ok9JRF84MDJfMTFfQUREX0tFWSAoaWQ9MHgleCwgTGVuPSVkLWJ5dGUpXG4iLCBwS2V5LT5LZXlJbmRleCwgcEtleS0+S2V5TGVuZ3RoKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBrZnJlZShwS2V5KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfQ09ORklHVVJBVElPTjoKLSAgICAgICAgICAgIGlmICh3cnEtPnUuZGF0YS5sZW5ndGggIT0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pKQotICAgICAgICAgICAgICAgIFN0YXR1cyAgPSAtRUlOVkFMOwotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfZnJvbV91c2VyKCZDb25maWcsIHdycS0+dS5kYXRhLnBvaW50ZXIsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICAgICAgcENvbmZpZyA9ICZDb25maWc7Ci0KLSAgICAgICAgICAgICAgICBpZiAoKHBDb25maWctPkJlYWNvblBlcmlvZCA+PSAyMCkgJiYgKHBDb25maWctPkJlYWNvblBlcmlvZCA8PTQwMCkpCi0gICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+Q29tbW9uQ2ZnLkJlYWNvblBlcmlvZCA9IChVU0hPUlQpIHBDb25maWctPkJlYWNvblBlcmlvZDsKLQotICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TdGFBY3RpdmUuQXRpbVdpbiA9IChVU0hPUlQpIHBDb25maWctPkFUSU1XaW5kb3c7Ci0gICAgICAgICAgICAgICAgTUFQX0tIWl9UT19DSEFOTkVMX0lEKHBDb25maWctPkRTQ29uZmlnLCBwQWRhcHRlci0+Q29tbW9uQ2ZnLkNoYW5uZWwpOwotICAgICAgICAgICAgICAgIC8vCi0JCQkJLy8gU2F2ZSB0aGUgY2hhbm5lbCBvbiBNbG1lQXV4IGZvciBDbnRsT2lkUlRCc3NpZFByb2MgdXNlZC4KLQkJCQkvLwotCQkJCXBBZ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ICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzICA9IC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAobGVuZ3RoIG1pc21hdGNoKSEhXG4iKSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0JCSAgICAgICAgS2V5SWR4ID0gcFdlcEtleS0+S2V5SW5kZXggJiAweDBmZmZmZmZmOwotICAgICAgICAgICAgICAgIC8vIEtleUlkeCBtdXN0IGJlIDAgfiAzCi0gICAgICAgICAgICAgICAgaWYgKEtleUlkeCA+IDQpCi0gICAgCQkJewotICAgICAgICAgICAgICAgICAgICBTdGF0dXMgID0gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIEZhaWxlZCAoS2V5SWR4IG11c3QgYmUgc21hbGxlciB0aGFuIDQpISFcbiIpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgVUNIQVIgQ2lwaGVyQWxnID0gMDsKLSAgICAgICAgICAgICAgICAgICAgUFVDSEFSIEtleTsKLQotICAgICAgICAgICAgICAgICAgICAvLyBzZXQga2V5IG1hdGVyaWFsIGFuZCBrZXkgbGVuZ3RoCi0gICAgICAgICAgICAgICAgICAgIE5kaXNaZXJvTWVtb3J5KHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5LZXksIDE2KTsKLSAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVtLZXlJZHhdLktleUxlbiA9IChVQ0hBUikgcFdlcEtleS0+S2V5TGVuZ3RoOwotICAgICAgICAgICAgICAgICAgICBOZGlzTW92ZU1lbW9yeShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdW0tleUlkeF0uS2V5LCAmcFdlcEtleS0+S2V5TWF0ZXJpYWwsIHBXZXBLZXktPktleUxlbmd0aCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHBXZXBLZXktPktleUxlbmd0aCkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA1OgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVA2NDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDEyODsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0OjpPSURfODAyXzExX0FERF9XRVAsIG9ubHkgc3VwcG9ydCBDSVBIRVJfV0VQNjQobGVuOjUpICYgQ0lQSEVSX1dFUDEyOChsZW46MTMpISFcbiIpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUlOVkFMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bS2V5SWR4XS5DaXBoZXJBbGcgPSBDaXBoZXJBbGc7Ci0KLSAgICAgICAgICAgICAgICAgICAgLy8gRGVmYXVsdCBrZXkgZm9yIHR4IChzaGFyZWQga2V5KQotICAgICAgICAgICAgICAgICAgICBpZiAocFdlcE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VyZWQgPT0gV1BBXzgwMl8xWF9QT1JUX1NFQ1VSRUQpCi0jZW5kaWYgLy8gV1BBX1NVUFBMSUNBTlRfU1VQUE9SVAotICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBLZXkgPSBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdW0tleUlkeF0uS2V5OwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvLyBTZXQga2V5IG1hdGVyaWFsIGFuZCBjaXBoZXJBbGcgdG8gQXNpYwotICAgICAgICAJCQkJQXNpY0FkZFNoYXJlZEtleUVudHJ5KHBBZGFwdGVyLCBCU1MwLCBLZXlJZHgsIENpcGhlckFsZywgS2V5LCBOVUxMLCBOVUxMKTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBXZXBLZXktPktleUluZGV4ICYgMHg4MDAwMDAwMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBQTUFDX1RBQkxFX0VOVFJZIHBFbnRyeSA9ICZwQWRhcHRlci0+TWFjVGFiLkNvbnRlbnRbQlNTSURfV0NJRF07Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXNzaWduIGdyb3VwIGtleSBpbmZvCi0gICAgCQkJCQkJUlRNUEFkZFdjaWRBdHRyaWJ1dGVFbnRyeShwQWRhcHRlciwgQlNTMCwgS2V5SWR4LCBDaXBoZXJBbGcsIE5VTEwpOwotICAgIAkJCQkJCS8vIEFzc2lnbiBwYWlyd2lzZSBrZXkgaW5mbwotICAgIAkJCQkJCVJUTVBBZGRXY2lkQXR0cmlidXRlRW50cnkocEFkYXB0ZXIsIEJTUzAsIEtleUlkeCwgQ2lwaGVyQWxnLCBwRW50cnkpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICB9Ci0JCQkJCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldDo6T0lEX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X0NPTkZJRyAgICAgICAgICAgICAgICAqcFN0YUNvbmZpZyA9IE5VTEw7Ci0gICAgTkRJU184MDJfMTFfU1RBVElTVElDUyAgICAgICAgICAgICAgKnBTdGF0aXN0aWNzID0gTlVMTDsKLSAgICBORElTXzgwMl8xMV9SVFNfVEhSRVNIT0xEICAgICAgICAgICBSdHNUaHJlc2g7Ci0gICAgTkRJU184MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQgRnJhZ1RocmVzaDsKLSAgICBORElTXzgwMl8xMV9QT1dFUl9NT0RFICAgICAgICAgICAgICBQb3dlck1vZGU7Ci0gICAgTkRJU184MDJfMTFfTkVUV09SS19JTkZSQVNUUlVDVFVSRSAgQnNzVHlwZTsKLSAgICBSVF84MDJfMTFfUFJFQU1CTEUgICAgICAgICAgICAgICAgICBQcmVhbVR5cGU7Ci0gICAgTkRJU184MDJfMTFfQVVUSEVOVElDQVRJT05fTU9ERSAgICAgQXV0aE1vZGU7Ci0gICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgICAgICAgICAgICAgV2VwU3RhdHVzOwotICAgIE5ESVNfTUVESUFfU1RBVEUgICAgICAgICAgICAgICAgICAgIE1lZGlhU3RhdGU7Ci0gICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzQnVmU2l6ZSwgdWxJbmZvPTAsIE5ldHdvcmtUeXBlTGlzdFs0XSwgYXBzZCA9IDA7Ci0gICAgVVNIT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnNzTGVuID0gMDsKLSAgICBQVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQnVmID0gTlVMTCwgcFB0cjsKLSAgICBJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXMgPSBORElTX1NUQVRVU19TVUNDRVNTOwotICAgIFVJTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdlX3ZlcnNpb25fY29tcGlsZWQ7Ci0gIC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AyNTYgYnl0ZXMganVzdCBpbiBjYXNlCi0gICAgICAgICAgICBCc3NCdWZTaXplICs9IDI1NjsKLSAgICAgICAgICAgIC8vIEFsbG9jYXRlIHRoZSBzYW1lIHNpemUgYXMgcGFzc2VkIGZyb20gaGlnaGVyIGxheWVyCi0gICAgICAgICAgICBwQnVmID0ga21hbGxvYyhCc3NCdWZTaXplLCBNRU1fQUxMT0NfRkxBRyk7Ci0gICAgICAgICAgICBpZihwQnVmID09IE5VTEwpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgU3RhdHVzID0gLUVOT01FTTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIC8vIEluaXQgODAyXzExX0JTU0lEX0xJU1RfRVggc3RydWN0dXJlCi0gICAgICAgICAgICBOZGlzWmVyb01lbW9yeShwQnVmLCBCc3NCdWZTaXplKTsKLSAgICAgICAgICAgIHBCc3NpZExpc3QgPSAoUE5ESVNfODAyXzExX0JTU0lEX0xJU1RfRVgpIHBCdWY7Ci0gICAgICAgICAgICBwQnNzaWRMaXN0LT5OdW1iZXJPZkl0ZW1zID0gcEFkYXB0ZXItPlNjYW5UYWIuQnNzTnI7Ci0KLSAgICAgICAgICAgIC8vIENhbGN1bGF0ZSB0b3RhbCBidWZmZXIgbGVuZ3RoCi0gICAgICAgICAgICBCc3NMZW4gPSA0OyAvLyBDb25zaXN0IG9mIE51bWJlck9mSXRlbXMKLSAgICAgICAgICAgIC8vIFBvaW50IHRvIHN0YXJ0IG9mIE5ESVNfV0xBTl9CU1NJRF9FWAotICAgICAgICAgICAgLy8gcFB0ciA9IHBCdWYgKyBzaXplb2YoVUxPTkcpOwotICAgICAgICAgICAgcFB0ciA9IChQVUNIQVIpICZwQnNzaWRMaXN0LT5Cc3NpZFswXTsKLSAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBwQWRhcHRlci0+U2NhblRhYi5Cc3NOcjsgaSsrKQotICAgICAgICAgICA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JRUxlbiA9PSAwKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgcEJzcy0+SUVMZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEJzcy0+SUVzLCAmcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uRml4SUVzLCBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSk7Ci0gICAgICAgICAgICAgICAgICAgIHBQdHIgPSBwUHRyICsgc2l6ZW9mKE5ESVNfV0xBTl9CU1NJRF9FWCkgLSAxICsgc2l6ZW9mKE5ESVNfODAyXzExX0ZJWEVEX0lFcyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBCc3MtPklFTGVuZ3RoID0gKFVMT05HKShzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuKTsKLSAgICAgICAgICAgICAgICAgICAgcFB0ciA9IHBQdHIgKyBzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKTsKLSAgICAgICAgICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkocEJzcy0+SUVzLCAmcEFkYXB0ZXItPlNjYW5UYWIuQnNzRW50cnlbaV0uRml4SUVzLCBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSk7Ci0gICAgICAgICAgICAgICAgICAgIE5kaXNNb3ZlTWVtb3J5KHBCc3MtPklFcyArIHNpemVvZihORElTXzgwMl8xMV9GSVhFRF9JRXMpLCBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5WYXJJRXMsIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuKTsKLSAgICAgICAgICAgICAgICAgICAgcFB0ciArPSBwQWRhcHRlci0+U2NhblRhYi5Cc3NFbnRyeVtpXS5WYXJJRUxlbjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcEJzcy0+TGVuZ3RoID0gKFVMT05HKShzaXplb2YoTkRJU19XTEFOX0JTU0lEX0VYKSAtIDEgKyBzaXplb2YoTkRJU184MDJfMTFfRklYRURfSUVzKSArIHBBZGFwdGVyLT5TY2FuVGFiLkJzc0VudHJ5W2ldLlZhcklFTGVuICsgUGFkZGluZyk7Ci0KLSNpZiBXSVJFTEVTU19FWFQgPCAxNwotICAgICAgICAgICAgICAgIGlmICgoQnNzTGVuICsgcEJzcy0+TGVuZ3RoKSA8IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgICAgICBCc3NMZW4gKz0gcEJzcy0+TGVuZ3RoOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIHBCc3NpZExpc3QtPk51bWJlck9mSXRlbXMgPSBpOwotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICB9Ci0jZWxzZQotICAgICAgICAgICAgICAgIEJzc0xlbiArPSBwQnNzLT5MZW5ndGg7Ci0jZW5kaWYKLSAgICAgICAgICAgIH0KLQotI2lmIFdJUkVMRVNTX0VYVCA8IDE3Ci0gICAgICAgICAgICB3cnEtPnUuZGF0YS5sZW5ndGggPSBCc3NMZW47Ci0jZWxzZQotICAgICAgICAgICAgaWYgKEJzc0xlbiA+IHdycS0+dS5kYXRhLmxlbmd0aCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBrZnJlZShwQnNzaWRMaXN0KTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUUyQklHOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHd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VyLT5SYWxpbmtDb3VudGVycy5UcmFuc21pdHRlZEJ5dGVDb3VudDsKLSAgICAgICAgCQlwTGlua1N0YXR1cy0+Q2VudHJhbENoYW5uZWwgPSBwQWRhcHRlci0+Q29tbW9uQ2ZnLkNlbnRyYWxDaGFubmVsOwotICAgICAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZihSVF84MDJfMTFfTElOS19TVEFUVVMpOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfdG9fdXNlcih3cnEtPnUuZGF0YS5wb2ludGVyLCBwTGlua1N0YXR1cywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBrZnJlZShwTGlua1N0YXR1cyk7Ci0gICAgICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiUXVlcnk6OlJUX09JRF84MDJfMTFfUVVFUllfTElOS19TVEFUVVNcbiIpKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV9RVUVSWV9MSU5LX1NUQVRVUyhrbWFsbG9jIGZhaWxlZClcbiIpKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSAtRUZBVUxUOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgT0lEXzgwMl8xMV9DT05GSUdVUkFUSU9OOgotICAgICAgICAgICAgcENvbmZpZ3VyYXRpb24gPSAoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTiAqKSBrbWFsbG9jKHNpemVvZihORElTXzgwMl8xMV9DT05GSUdVUkFUSU9OKSwgTUVNX0FMTE9DX0ZMQUcpOwotICAgICAgICAgICAgaWYgKHBDb25maWd1cmF0aW9uKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5MZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfQ09ORklHVVJBVElPTik7Ci0gICAgICAgICAgICAgICAgcENvbmZpZ3VyYXRpb24tPkJlYWNvblBlcmlvZCA9IHBBZGFwdGVyLT5Db21tb25DZmcuQmVhY29uUGVyaW9kOwotICAgICAgICAgICAgICAgIHBDb25maWd1cmF0aW9uLT5BVElNV2luZG93ID0gcEFkYXB0ZXItPlN0YUFjdGl2ZS5BdGltV2luOwotICAgICAgICAgICAgICAgIE1BUF9DSEFOTkVMX0lEX1RPX0tIWihwQWRhcHRlci0+Q29tbW9uQ2ZnLkNoYW5uZWwsIHBDb25maWd1cmF0aW9uLT5EU0NvbmZpZyk7Ci0gICAgICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKE5ESVNfODAyXzExX0NPTkZJR1VSQVRJT04pOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IGNvcHlfdG9fdXNlcih3cnEtPnUuZGF0YS5wb2ludGVyLCBwQ29uZmlndXJhdGlvbiwgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6T0lEXzgwMl8xMV9DT05GSUdVUkFUSU9OKEJlYWNvblBlcmlvZD0lbGQsQXRpbVc9JWxkLENoYW5uZWw9JWQpIFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQ29uZmlndXJhdGlvbi0+QmVhY29uUGVyaW9kLCBwQ29uZmlndXJhdGlvbi0+QVRJTVdpbmRvdywgcEFkYXB0ZXItPkNvbW1vbkNmZy5DaGFubmVsKSk7Ci0JCQkJa2ZyZWUocENvbmZpZ3VyYXRpb24pOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLC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LT5Db3VudGVyczgwMjMuR29vZFJlY2VpdmVzOwotICAgICAgICAgICAgd3JxLT51LmRhdGEubGVuZ3RoID0gc2l6ZW9mKHVsSW5mbyk7Ci0gICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgJnVsSW5mbywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF9HRU5fUkNWX05PX0JVRkZFUjoKLSAgICAgICAgICAgIHVsSW5mbyA9IHBBZGFwdGVyLT5Db3VudGVyczgwMjMuUnhOb0J1ZmZlcjsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBSVF9PSURfODAyXzExX1BIWV9NT0RFOgotICAgICAgICAgICAgdWxJbmZvID0gKFVMT05HKXBBZGFwdGVyLT5Db21tb25DZmcuUGh5TW9kZTsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZih1bEluZm8pOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZ1bEluZm8sIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV9QSFlfTU9ERSAoPSVsZClcbiIsIHVsSW5mbykpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgUlRfT0lEXzgwMl8xMV9TVEFfQ09ORklHOgotICAgICAgICAgICAgcFN0YUNvbmZpZyA9IChSVF84MDJfM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VEFfQ09ORklHKTsKLSAgICAgICAgICAgICAgICBTdGF0dXMgPSBjb3B5X3RvX3VzZXIod3JxLT51LmRhdGEucG9pbnRlciwgcFN0YUNvbmZpZywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLSAgICAgICAgICAgICAgICBrZnJlZShwU3RhQ29uZmlnKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6UlRfT0lEXzgwMl8xMV9TVEFfQ09ORklHKGttYWxsb2MgZmFpbGVkKVxuIikpOwotICAgICAgICAgICAgICAgIFN0YXR1cyA9IC1FRkFVTFQ7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBPSURfODAyXzExX1JUU19USFJFU0hPTEQ6Ci0gICAgICAgICAgICBSdHNUaHJlc2ggPSBwQWRhcHRlci0+Q29tbW9uQ2ZnLlJ0c1RocmVzaG9sZDsKLSAgICAgICAgICAgIHdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZihSdHNUaHJlc2gpOwotICAgICAgICAgICAgU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsICZSdHNUaHJlc2gsIHdycS0+dS5kYXRhLmxlbmd0aCk7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJRdWVyeTo6T0lEXzgwMl8xMV9SVFNfVEhSRVNIT0xEKD0lbGQpXG4iLCBSdHNUaHJlc2gpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIE9JRF84MDJfMTFfRlJBR01FTlRBVElPTl9USFJFU0hPTEQ6Ci0gICAgICAgICAgICBGcmFnVGhyZXNoID0gcEFkYXB0ZXItPkNvbW1vbkNmZy5GcmFnbWVudFRocmVzaG9sZDsKLSAgICAgICAgICAgIGlmIChwQ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F5ZXIgc2VudCBhIE1MTUUtcmVsYXRlZCBvcGVyYXRpb25zCi0gICAgCVJUMjhYWF9NTE1FX0hBTkRMRVIocEFkKTsKLQotCXJldHVybiBTdGF0dXM7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFNTSUQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfU1NJRF9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgTkRJU184MDJfMTFfU1NJRCAgICAgICAgICAgICAgICAgICAgU3NpZCwgKnBTc2lkPU5VTEw7Ci0gICAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3RhdGVNYWNoaW5lVG91Y2hlZCA9IEZBTFNFOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgPSBUUlVFOwotCi0gICAgaWYoIHN0cmxlbihhcmcpIDw9IE1BWF9MRU5fT0ZfU1NJRCkKLSAgICB7Ci0gICAgICAgIE5kaXNaZXJvTWVtb3J5KCZTc2lkLCBzaXplb2YoTkRJU184MDJfMTFfU1NJRCkpOwotICAgICAgICBpZiAoc3RybGVuKGFyZykgIT0gMCkKLSAgICAgICAgewotICAgICAgICAgICAgTmRpc01vdmVNZW1vcnkoU3NpZC5Tc2lkLCBhcmcsIHN0cmxlbihhcmcpKTsKLSAgICAgICAgICAgIFN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lEXzgwMl8xMV9TU0lELAotICAgICAgICAgICAgICAgICAgICBzaXplb2YoTkRJU184MDJfMTFfU1NJRCksCi0gICAgICAgICAgICAgICAgICAgIChWT0lEICopcFNzaWQpOwotCi0gICAgICAgIFN0YXRlTWFjaGluZVRvdWNoZWQgPSBUUlVFOwotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfU1NJRF9Qcm9jOjooTGVuPSVkLFNzaWQ9JXMpXG4iLCBTc2lkLlNzaWRMZW5ndGgsIFNzaWQuU3NpZCkpOwotICAgIH0KLSAgICBlbHNlCi0gICAgICAgIHN1Y2Nlc3MgPSBGQUxTRTsKLQotICAgIGlmIChTdGF0ZU1hY2hpbmVUb3VjaGVkKSAvLyBVcHBlciBsYXllciBzZW50IGEgTUxNRS1yZWxhdGVkIG9wZXJhdGlvbnMKLSAgICAJUlQyOFhYX01MTUVfSEFORExFUihwQWRhcHRlcik7Ci0KLSAgICByZXR1cm4gc3VjY2VzczsKLX0KLQotI2lmZGVmIFdNTV9TVVBQT1JUCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXbW1DYXBhYmxlIEVuYWJsZSBvciBEaXNhYmxlCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQJU2V0X1dtbUNhcGFibGVfUHJvYygKLQlJTglQUlRNUF9BREFQVEVSCXBBZCwKLQlJTglQVUNIQVIJCQlhcmcpCi17Ci0JQk9PTEVBTgliV21tQ2FwYWJsZTsKLQotCWJXbW1DYXBhYmxlID0gc2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LT5TdGFDZmcuV3BhU3RhdGUgPSBTU19OT1RVU0U7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfTmV0d29ya1R5cGVfUHJvYzo6KE5ldHdvcmtUeXBlPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5Cc3NUeXBlKSk7Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLQotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgQXV0aGVudGljYXRpb24gbW9kZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9BdXRoTW9kZV9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaWYgKChzdHJjbXAoYXJnLCAiV0VQQVVUTyIpID09IDApIHx8IChzdHJjbXAoYXJnLCAid2VwYXV0byIpID09IDApKQotICAgICAgICBwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlID0gTmRpczgwMl8xMUF1dGhNb2RlQXV0b1N3aXRjaDsKLSAgICBlbHNlIGlmICgoc3RyY21wKGFyZywgIk9QRU4iKSA9PSAwKSB8fCAoc3RyY21wKGFyZywgIm9wZW4iKSA9PSAwKSkKLSAgICAgICAgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA9IE5kaXM4MDJfMTFBdXRoTW9kZU9wZW47Ci0gICAgZWxzZSBpZiAoKHN0cmNtcChhcmcsICJTSEFSRUQiKSA9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wotI2VuZGlmIC8vIFdQQV9TVVBQTElDQU5UX1NVUFBPUlQgLy8KLSAgICBlbHNlCi0gICAgICAgIHJldHVybiBGQUxTRTsKLQotICAgIHBBZGFwdGVyLT5TdGFDZmcuUG9ydFNlY3VyZWQgPSBXUEFfODAyXzFYX1BPUlRfTk9UX1NFQ1VSRUQ7Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfQXV0aE1vZGVfUHJvYzo6KEF1dGhNb2RlPSVkKVxuIiwgcEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IEVuY3J5cHRpb24gVHlwZQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9FbmNyeXBUeXBlX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpZiAoKHN0cmNtcChhcmcsICJOT05FIikgPT0gMCkgfHwgKHN0cmNtcChhcmcsICJub25lIikgPT0gMCkpCi0gICAgewotICAgICAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgICAgICByZXR1cm4gVFJVRTsgICAgLy8gZG8gbm90aGluZwotCi0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuV2VwU3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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgRGVmYXVsdCBLZXkgSUQKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfRGVmYXVsdEtleUlEX1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlJZHg7Ci0KLSAgICBLZXlJZHggPSBzaW1wbGVfc3RydG9sKGFyZywgMCwgMTApOwotICAgIGlmKChLZXlJZHggPj0gMSApICYmIChLZXlJZHggPD0gNCkpCi0gICAgICAgIHBBZGFwdGVyLT5TdGFDZmcuRGVmYXVsdEtleUlkID0gKFVDSEFSKSAoS2V5SWR4IC0gMSApOwotICAgIGVsc2UKLSAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9JbnZhbGlkIGFyZ3VtZW50Ci0KLSAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfRGVmYXVsdEtleUlEX1Byb2M6OihEZWZhdWx0S2V5SUQ9JWQpXG4iLCBwQWRhcHRlci0+U3RhQ2ZnLkRlZmF1bHRLZXlJZCkpOwotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkxCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTFfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBUUlVFOyAgICAvLyBkbyBub3RoaW5nCi0KLSAgICBLZXlMZW4gPSBzdHJsZW4oYXJnKTsKLQotICAgIHN3aXRjaCAoS2V5TGVuKQotICAgIHsKLSAgICAgICAgY2FzZSA1OiAvL3dlcCA0MCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTFfUHJvYzo6KEtleTE9JXMgYW5kIHR5cGU9JXMpXG4iLCBhcmcsICJBc2NpaSIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDEwOiAvL3dlcCA0MCBIZXggdHlwZQotICAgICAgICAgICAgZm9yKGk9MDsgaSA8IEtleUxlbjsgaSsrKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmKCAhaXN4ZGlnaXQoKihhcmcraSkpICkKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOyAgLy9Ob3QgSGV4IHZhbHVlOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW4gLyAyIDsKLSAgICAgICAgICAgIEF0b0goYXJnLCBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwgS2V5TGVuIC8gMik7Ci0gICAgICAgICAgICBDaXBoZXJBbGcgPSBDSVBIRVJfV0VQNjQ7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjooS2V5MT0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDEzOiAvL3dlcCAxMDQgQXNjaWkgdHlwZQotICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXlMZW4gPSBLZXlMZW47Ci0gICAgICAgICAgICBtZW1jcHkocEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5LZXksIGFyZywgS2V5TGVuKTsKLSAgICAgICAgICAgIENpcGhlckFsZyA9IENJUEhFUl9XRVAxMjg7Ci0gICAgICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXRfS2V5MV9Qcm9jOjooS2V5MT0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkFzY2lpIikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMjY6IC8vd2VwIDEwNCB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ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVswXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzBdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBTZXQgV0VQIEtFWTIKLSAgICBSZXR1cm46Ci0gICAgICAgIFRSVUUgaWYgYWxsIHBhcmFtZXRlcnMgYXJlIE9LLCBGQUxTRSBvdGhlcndpc2UKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotKi8KLUlOVCBTZXRfS2V5Ml9Qcm9jKAotICAgIElOICBQUlRNUF9BREFQVEVSICAgcEFkYXB0ZXIsCi0gICAgSU4gIFBVQ0hBUiAgICAgICAgICBhcmcpCi17Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5TGVuOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGk7Ci0gICAgVUNIQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2lwaGVyQWxnPUNJUEhFUl9XRVA2NDsKLQotICAgIGlmIChwQWRhcHRlci0+U3RhQ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gKCJTZXRfS2V5Ml9Qcm9jOjooS2V5Mj0lcyBhbmQgdHlwZT0lcylcbiIsIGFyZywgIkhleCIpKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OiAvL0ludmFsaWQgYXJndW1lbnQKLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXkyX1Byb2M6OkludmFsaWQgYXJndW1lbnQgKD0lcylcbiIsIGFyZykpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOwotICAgIH0KLSAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLkNpcGhlckFsZyA9IENpcGhlckFsZzsKLQotICAgIC8vIFNldCBrZXlzIChpbnRvIEFTSUMpCi0gICAgaWYgKHBBZGFwdGVyLT5TdGFDZmcuQXV0aE1vZGUgPj0gTmRpczgwMl8xMUF1dGhNb2RlV1BBKQotICAgICAgICA7ICAgLy8gbm90IHN1cHBvcnQKLSAgICBlbHNlICAgIC8vIE9sZCBXRVAgc3R1ZmYKLSAgICB7Ci0gICAgICAgIEFzaWNBZGRTaGFyZWRLZXlFbnRyeShwQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsxXS5DaXBoZXJBbGcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzFdLktleSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMKTsKLSAgICB9Ci0KLSAgICByZXR1cm4gVFJVRTsKLX0KLS8qCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICBEZXNjcmlwdGlvbjoKLSAgICAgICAgU2V0IFdFUCBLRVkzCi0gICAgUmV0dXJuOgotICAgICAgICBUUlVFIGlmIGFsbCBwYXJhbWV0ZXJzIGFyZSBPSywgRkFMU0Ugb3RoZXJ3aXNlCi0gICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSovCi1JTlQgU2V0X0tleTNfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIGludCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtleUxlbjsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpOwotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpcGhlckFsZz1DSVBIRVJfV0VQNjQ7Ci0KLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIHJldHVybiBUUlVFOyAgICAvLyBkbyBub3RoaW5nCi0KLSAgICBLZXlMZW4gPSBzdHJsZW4oYXJnKTsKLQotICAgIHN3aXRjaCAoS2V5TGVuKQotICAgIHsKLSAgICAgICAgY2FzZSA1OiAvL3dlcCA0MCBBc2NpaSB0eXBlCi0gICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzJdLktleUxlbiA9IEtleUxlbjsKLSAgICAgICAgICAgIG1lbWNweShwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzJdLktleSwgYXJnLCBLZXlMZW4pOwotICAgICAgICAgICAgQ2lwaGVyQWxnID0gQ0lQSEVSX1dFUDY0OwotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleT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CBzdXBwb3J0Ci0gICAgZWxzZSAgICAvLyBPbGQgV0VQIHN0dWZmCi0gICAgewotICAgICAgICBBc2ljQWRkU2hhcmVkS2V5RW50cnkocEFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bMl0uQ2lwaGVyQWxnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEFkYXB0ZXItPlNoYXJlZEtleVtCU1MwXVsyXS5LZXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCk7Ci0gICAgfQotCi0gICAgcmV0dXJuIFRSVUU7Ci19Ci0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXRVAgS0VZNAotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9LZXk0X1Byb2MoCi0gICAgSU4gIFBSVE1QX0FEQVBURVIgICBwQWRhcHRlciwKLSAgICBJTiAgUFVDSEFSICAgICAgICAgIGFyZykKLXsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLZXlMZW47Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaTsKLSAgICBVQ0hBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaXBoZXJBbGc9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KLSAgICAgICAgICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9LZXk0X1Byb2M6OihLZXk0PSVzIGFuZCB0eXBlPSVzKVxuIiwgYXJnLCAiSGV4IikpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8vSW52YWxpZCBhcmd1bWVudAotICAgICAgICAgICAgREJHUFJJTlQoUlRfREVCVUdfVFJBQ0UsICgiU2V0X0tleTRfUHJvYzo6SW52YWxpZCBhcmd1bWVudCAoPSVzKVxuIiwgYXJnKSk7Ci0gICAgICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uQ2lwaGVyQWxnID0gQ2lwaGVyQWxnOwotCi0gICAgLy8gU2V0IGtleXMgKGludG8gQVNJQykKLSAgICBpZiAocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSA+PSBOZGlzODAyXzExQXV0aE1vZGVXUEEpCi0gICAgICAgIDsgICAvLyBub3Qgc3VwcG9ydAotICAgIGVsc2UgICAgLy8gT2xkIFdFUCBzdHVmZgotICAgIHsKLSAgICAgICAgQXNpY0FkZFNoYXJlZEtleUVudHJ5KHBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQWRhcHRlci0+U2hhcmVkS2V5W0JTUzBdWzNdLkNpcGhlckFsZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBBZGFwdGVyLT5TaGFyZWRLZXlbQlNTMF1bM10uS2V5LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwpOwotICAgIH0KLQotICAgIHJldHVybiBUUlVFOwotfQotCi0vKgotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgRGVzY3JpcHRpb246Ci0gICAgICAgIFNldCBXUEEgUFNLIGtleQotICAgIFJldHVybjoKLSAgICAgICAgVFJVRSBpZiBhbGwgcGFyYW1ldGVycyBhcmUgT0ssIEZBTFNFIG90aGVyd2lzZQotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotSU5UIFNldF9XUEFQU0tfUHJvYygKLSAgICBJTiAgUFJUTVBfQURBUFRFUiAgIHBBZGFwdGVyLAotICAgIElOICBQVUNIQVIgICAgICAgICAgYXJnKQotewotICAgIFVDSEFSICAgICAgICAgICAgICAgICAgIGtleU1hdGVyaWFsWzQwXTsKLQotICAgIGlmICgocEFkYXB0ZXItPlN0YUNmZy5BdXRoTW9kZSAhPSBOZGlzODAyXzExQXV0aE1vZGVXUEFQU0spICYmCi0gICAgICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQTJQU0spICYmCi0JICAgIChwQWRhcHRlci0+U3RhQ2ZnLkF1dGhNb2RlICE9IE5kaXM4MDJfMTFBdXRoTW9kZVdQQU5vbmUpCi0JCSkKLSAgICAgICAgcmV0dXJuIFRSVUU7ICAgIC8vIGRvIG5vdGhpbmcKLQotICAgIERCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIlNldF9XUEFQU0tfUHJvYzo6KFdQQVBTSz0lcylcbiIsIGFyZykpOwotCi0gICAgTmRpc1plcm9NZW1vcnkoa2V5TWF0ZXJpYWwsIDQwKTsKLQotICAgIGlmICgoc3RybGVuKGFyZykgPCA4KSB8fCAoc3RybGVuKGFyZykgPiA2NCkpCi0gICAgewotICAgICAgICBEQkdQUklOVChSVF9ERUJVR19UUkFDRSwgKCJTZXQgZmFpbGVkISEoV1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ybWF0aW9uIGludG8gdGhlIHVzZXIgYnVmZmVyCi0Jd3JxLT51LmRhdGEubGVuZ3RoID0gc3RybGVuKG1zZyk7Ci0JU3RhdHVzID0gY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsIG1zZywgd3JxLT51LmRhdGEubGVuZ3RoKTsKLQotCURCR1BSSU5UKFJUX0RFQlVHX1RSQUNFLCAoIjw9PVJUTVBJb2N0bEUyUFJPTVxuIikpOwotfQotI2lmZGVmIFJUMzB4eAotLyoKLSAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgIERlc2NyaXB0aW9uOgotICAgICAgICBSZWFkIC8gV3JpdGUgUkYgcmVnaXN0ZXIKLUFyZ3VtZW50czoKLSAgICBwQWRhcHRlciAgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBvdXIgYWRhcHRlcgotICAgIHdycSAgICAgICAgICAgICAgICAgICAgICAgICBQb2ludGVyIHRvIHRoZSBpb2N0bCBhcmd1bWVudAotCi0gICAgUmV0dXJuIFZhbHVlOgotICAgICAgICBOb25lCi0KLSAgICBOb3RlOgotICAgICAgICBVc2FnZToKLSAgICAgICAgICAgICAgIDEuKSBpd3ByaXYgcmEwIHJmICAgICAgICAgICAgICAgID09PiByZWFkIGFsbCBSRiByZWdpc3RlcnMKLSAgICAgICAgICAgICAgIDIuKSBpd3ByaXYgcmEwIHJmIDEgICAgICAgICAgICAgID09PiByZWFkIFJGIHdoZXJlIFJlZ0lEPTEKLSAgICAgICAgICAgICAgIDMuKSBpd3ByaXYgcmEwIHJmIDE9MTAJCSAgICA9PT4gd3JpdGUgUkYgUjE9MHgxMAotICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0qLwotVk9JRCBSVE1QSW9jdGxSRigKLQlJTglQUlRNUF9BREFQVEVS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24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCi0gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICoKLSAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICoKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogNTkgVGVtcGxlIFBsYWNlIC0gU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3LCBVU0EuICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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0eXBlICopKCAoY2hhciAqKV9fbXB0ciAtIG9mZnNldG9mKHR5cGUsbWVtYmVyKSApO30pCisjZW5kaWYKKworI2RlZmluZSBLRVlfVFlQRV9OQQkJMHgwCisjZGVmaW5lIEtFWV9UWVBFX1dFUDQwIAkJMHgxCisjZGVmaW5lIEtFWV9UWVBFX1RLSVAJCTB4MgorI2RlZmluZSBLRVlfVFlQRV9DQ01QCQkweDQKKyNkZWZpbmUgS0VZX1RZUEVfV0VQMTA0CQkweDUKKworLyogYWRkZWQgZm9yIHJ0bDgxOXggdHggcHJvY2VkdXJlICovCisjZGVmaW5lIE1BWF9RVUVVRV9TSVpFCQkweDEwCisKKy8vCisvLyA4MTkwIHF1ZXVlIG1hcHBpbmcKKy8vCisjZGVmaW5lIEJLX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQkVfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSV9RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZPX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSENDQV9RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBUWENNRF9RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIE1HTlRfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElHSF9RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBCRUFDT05fUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgTE9XX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVfUVVFVUUKKyNkZWZpbmUgTk9STUFMX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgTUdOVF9RVUVVRQorC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lIFJlbGFnZWQgZmxhZ3MgKDEwLTExKSovCisgICAgICAgIHU4IGJDVFNFbmFibGU6MTsKKyAgICAgICAgdTggYlJUU0VuYWJsZToxOworICAgICAgICB1OCBiVXNlU2hvcnRHSToxOworICAgICAgICB1OCBiVXNlU2hvcnRQcmVhbWJsZToxOworICAgICAgICB1OCBiVHhFbmFibGVGd0NhbGNEdXI6MTsKKyAgICAgICAgdTggYkFNUERVRW5hYmxlOjE7CisgICAgICAgIHU4IGJSVFNTVEJDOjE7CisgICAgICAgIHU4IFJUU1NDOjE7CisKKyAgICAgICAgdTggYlJUU0JXOjE7CisgICAgICAgIHU4IGJQYWNrZXRCVzoxOworCXU4IGJSVFNVc2VTaG9ydFByZWFtYmxlOjE7CisJdTggYlJUU1VzZVNob3J0R0k6MTsKKwl1OCBiTXVsdGljYXN0OjE7CisJdTggYkJyb2FkY2FzdDoxOworICAgICAgICAvL3U4IHJlc2VydmVkMjoyOworICAgICAgICB1OCBkcnZfYWdnX2VuYWJsZToxOworICAgICAgICB1OCByZXNlcnZlZDI6MTsKKworICAgICAgICAvKiBUeCBEZXNjIHJlbGF0ZWQgZWxlbWVudCgxMi0xOSkgKi8KKyAgICAgICAgdTggcmF0YV9pbmRleDsKKyAgICAgICAgdTggcXVldWVfaW5kZXg7CisgICAgICAgIC8vdTggcmVzZXJ2ZWQzOworICAgICAgICAvL3U4IHJlc2VydmVkNDsKKyAgICAgICAgdTE2IHR4YnVmX3NpemU7CisgICAgICAgIC8vdTggcmVzZXJ2ZWQ1OworCXU4IFJBVFJJbmRleDsKKyAgICAgICAgdTggcmVzZXJ2ZWQ2OworICAgICAgICB1OCByZXNlcnZlZDc7CisgICAgICAgIHU4IHJlc2VydmVkODsKKworICAgICAgICAvKiBUeCBmaXJtd2FyZSByZWxhdGVkIGVsZW1lbnQoMjAtMjcpICovCisgICAgICAgIHU4IGRhdGFfcmF0ZTsKKyAgICAgICAgdTggcnRzX3JhdGU7CisgICAgICAgIHU4IGFtcGR1X2ZhY3RvcjsKKyAgICAgICAgdTggYW1wZHVfZGVuc2l0eTsKKyAgICAgICAgLy91OCByZXNlcnZlZDk7CisgICAgICAgIC8vdTggcmVzZXJ2ZWQxMDsKKyAgICAgICAgLy91OCByZXNlcnZlZDExOworICAgICAgICB1OCBEcnZBZ2dyTnVtOworCXUxNiBwa3Rfc2l6ZTsKKyAgICAgICAgdTggcmVzZXJ2ZWQxMjsKK31jYl9kZXNjLCAqcGNiX2Rlc2M7CisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1EZWZpbmUgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIE1HTl8xTSAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgTUdOXzJNICAgICAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBNR05fNV81TSAgICAgICAgICAgICAgICAweDBiCisjZGVmaW5lIE1HTl8xMU0gICAgICAgICAgICAgICAgIDB4MTYKKworI2RlZmluZSBNR05fNk0gICAgICAgICAgICAgICAgICAweDBjCisjZGVmaW5lIE1HTl85TSAgICAgICAgICAgICAgICAgIDB4MTIKKyNkZWZpbmUgTUdOXzEyTSAgICAgICAgICAgICAgICAgMHgxOAorI2RlZmluZSBNR05fMThNICAgICAgICAgICAgICAgICAweDI0CisjZGVmaW5lIE1HTl8yNE0gICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgTUdOXzM2TSAgICAgICAgICAgICAgICAgMHg0OAorI2RlZmluZSBNR05fNDhNICAgICAgICAgICAgICAgICAweDYwCisjZGVmaW5lIE1HTl81NE0gICAgICAgICAgICAgICAgIDB4NmMKKworI2RlZmluZSBNR05fTUNTMCAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lIE1HTl9NQ1MxICAgICAgICAgICAgICAgIDB4ODEKKyNkZWZpbmUgTUdOX01DUzIgICAgICAgICAgICAgICAgMHg4MgorI2RlZmluZSBNR05fTUNTMyAgICAgICAgICAgICAgICAweDgzCisjZGVmaW5lIE1HTl9NQ1M0ICAgICAgICAgICAgICAgIDB4ODQKKyNkZWZpbmUgTUdOX01DUzUgICAgICAgICAgICAgICAgMHg4NQorI2RlZmluZSBNR05fTUNTNiAgICAgICAgICAgICAgICAweDg2CisjZGVmaW5lIE1HTl9NQ1M3ICAgICAgICAgICAgICAgIDB4ODcKKyNkZWZpbmUgTUdOX01DUzggICAgICAgICAgICAgICAgMHg4OAorI2RlZmluZSBNR05fTUNTOSAgICAgICAgICAgICAgICAweDg5CisjZGVmaW5lIE1HTl9NQ1MxMCAgICAgICAgICAgICAgIDB4OGEKKyNkZWZpbmUgTUdOX01DUzExICAgICAgICAgICAgICAgMHg4YgorI2RlZmluZSBNR05fTUNTMTIgICAgICAgICAgICAgICAweDhjCisjZGVmaW5lIE1HTl9NQ1MxMyAgICAgICAgICAgICAgIDB4OGQKKyNkZWZpbmUgTUdOX01DUzE0ICAgICAgICAgICAgICAgMHg4ZQorI2RlZmluZSBNR05fTUNTMTUgICAgICAgICAgICAgICAweDhmCisjZGVmaW5lCU1HTl9NQ1MwX1NHCQkJMHg5MAorI2RlZmluZQlNR05fTUNTMV9TRwkJCTB4OTEKKyNkZWZpbmUJTUdOX01DUzJfU0cJCQkweDkyCisjZGVmaW5lCU1HTl9NQ1MzX1NHCQkJMHg5MworI2RlZmluZQlNR05fTUNTNF9TRwkJCTB4OTQKKyNkZWZpbmUJTUdOX01DUzVfU0cJCQkweDk1CisjZGVmaW5lCU1HTl9NQ1M2X1NHCQkJMHg5NgorI2RlZmluZQlNR05fTUNTN19TRwkJCTB4OTcKKyNkZWZpbmUJTUdOX01DUzhfU0cJCQkweDk4CisjZGVmaW5lCU1HTl9NQ1M5X1NHCQkJMHg5OQorI2RlZmluZQlNR05fTUNTMTBfU0cJCTB4OWEKKyNkZWZpbmUJTUdOX01DUzExX1NHCQkweDliCisjZGVmaW5lCU1HTl9NQ1MxMl9TRwkJMHg5YworI2R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X0RMUyA9IDIsCisgICAgICAgIEFDVF9DQVRfQkEgID0gMywKKyAgICAgICAgQUNUX0NBVF9IVCAgPSA3LAorICAgICAgICBBQ1RfQ0FUX1dNTSA9IDE3LAorfSBBQ1RfQ0FURUdPUlksICpQQUNUX0NBVEVHT1JZOworCit0eXBlZGVmIGVudW0gX1RTX0FDVElPTnsKKyAgICAgICAgQUNUX0FERFRTUkVRID0gMCwKKyAgICAgICAgQUNUX0FERFRTUlNQID0gMSwKKyAgICAgICAgQUNUX0RFTFRTICAgID0gMiwKKyAgICAgICAgQUNUX1NDSEVEVUxFID0gMywKK30gVFNfQUNUSU9OLCAqUFRTX0FDVElPTjsKKwordHlwZWRlZiBlbnVtIF9CQV9BQ1RJT057CisgICAgICAgIEFDVF9BRERCQVJFUSA9IDAsCisgICAgICAgIEFDVF9BRERCQVJTUCA9IDEsCisgICAgICAgIEFDVF9ERUxCQSAgICA9IDIsCit9IEJBX0FDVElPTiwgKlBCQV9BQ1RJT047CisKK3R5cGVkZWYgZW51bSBfSW5pdGlhbEdhaW5PcFR5cGV7CisJSUdfQmFja3VwPTAsCisJSUdfUmVzdG9yZSwKKwlJR19NYXgKK31Jbml0aWFsR2Fpbk9wVHlwZTsKKy8vYWRkZWQgYnkgYW15IGZvciBMRUQgMDkwMzE5CisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisvLyBMRUQgY3VzdG9taXphdGlvbi4KKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KK3R5cGVkZWYgZW51bSBfTEVEX0NUTF9NT0RFeworICAgICAgICBMRURfQ1RMX1BPV0VSX09OID0gMSwKKyAgICAgICAgTEVEX0NUTF9MSU5LID0gMiwKKyAgICAgICAgTEVEX0NUTF9OT19MSU5LID0gMywKKyAgICAgICAgTEVEX0N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UdfRFJPUChmLCBhLi4uKSAgSUVFRTgwMjExX0RFQlVHKElFRUU4MDIxMV9ETF9EUk9QLCBmLCAjIyBhKQorI2RlZmluZSBJRUVFODAyMTFfREVCVUdfVFgoZiwgYS4uLikgIElFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfVFgsIGYsICMjIGEpCisjZGVmaW5lIElFRUU4MDIxMV9ERUJVR19SWChmLCBhLi4uKSAgSUVFRTgwMjExX0RFQlVHKElFRUU4MDIxMV9ETF9SWCwgZiwgIyMgYSkKKyNkZWZpbmUgSUVFRTgwMjExX0RFQlVHX1FPUyhmLCBhLi4uKSAgSUVFRTgwMjExX0RFQlVHKElFRUU4MDIxMV9ETF9RT1MsIGYsICMjIGEpCisKKyNpZmRlZiBDT05GSUdfSUVFRTgwMjExX0RFQlVHCisvKiBBZGRlZCBieSBBbm5pZSwgMjAwNS0xMS0yMi4gKi8KKyNkZWZpbmUgTUFYX1NUUl9MRU4gICAgIDY0CisvKiBJIHdhbnQgdG8gc2VlIEFTQ0lJIDMzIHRvIDEyNiBvbmx5LiBPdGhlcndpc2UsIEkgcHJpbnQgJz8nLiBBbm5pZSwgMjAwNS0xMS0yMi4qLworI2RlZmluZSBQUklOVEFCTEUoX2NoKSAgKF9jaD4nIScgJiYgX2NoPCd+JykKKyNkZWZpbmUgSUVFRTgwMjExX1BSSU5UX1NUUihfQ29tcCwgX1RpdGxlU3RyaW5nLCBfUHRyLCBfTGVuKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAorICAgICAgICAgICAgICAgICAgICAgICAgaWYoKF9Db21wKSAmIGxldmVsKSAgIAkJCQkJCQlcCisgICAgICAgICAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCAgICAgICAgICAgICBfX2k7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4ICBidWZmZXJbTUFYX1NUUl9MRU5dOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBsZW5ndGggPSAoX0xlbjxNQVhfU1RSX0xFTik/IF9MZW4gOiAoTUFYX1NUUl9MRU4tMSkgOyAgCVwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtc2V0KGJ1ZmZlciwgMCwgTUFYX1NUUl9MRU4pOyAgICAgICAgICAgICAgICAgICAgICAJCVwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KGJ1ZmZlciwgKHU4ICopX1B0ciwgbGVuZ3RoICk7ICAgICAgICAgICAgCQlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciggX19pPTA7IF9faTxNQVhfU1RSX0xFTjsgX19pKysgKSAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoICFQUklOVEFCTEUoYnVmZmVyW19faV0pICkgICBidWZmZXJbX19pXSA9ICc/JzsgICAgIAlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcltsZW5ndGhdID0gJ1wwJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiUnRsODE5eDogIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoX1RpdGxlU3RyaW5nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCI6ICVkLCA8JXM+XG4iLCBfTGVuLCBidWZmZXIpOyAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICB9CisjZWxzZQorI2RlZmluZSBJRUVFODAyMTFfUFJJTlRfU1RSKF9Db21wLCBfVGl0bGVTdHJpbmcsIF9QdHIsIF9MZW4pICBkbyB7fSB3aGlsZSAoMCkKKyNlbmRpZgorCisjaW5jbHVkZSA8bGludXgvbmV0ZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvaWZfYXJwLmg+IC8qIEFSUEhSRF9FVEhFUiAqLworCisjaWZuZGVmIFdJUkVMRVNTX1NQWQorI2RlZmluZSBXSVJFTEVTU19TUFkJCS8vIGVuYWJsZSBpd3NweSBzdXBwb3J0CisjZW5kaWYKKyNpbmNsdWRlIDxuZXQvaXdfaGFuZGxlci5oPgkvLyBuZXcgZHJpdmVyIEFQSQorCisjaWZuZGVmIEVUSF9QX1BBRQorI2RlZmluZSBFVEhfUF9QQUUgMHg4ODhFIC8qIFBvcnQgQWNjZXNzIEVudGl0eSAoSUVFRSA4MDIuMVgpICovCisjZW5kaWYgLyogRVRIX1BfUEFFICovCisKKyNkZWZpbmUgRVRIX1BfUFJFQVVUSCAweDg4QzcgLyogSUVFRSA4MDIuMTFpIHByZS1hdXRoZW50aWNhdGlvbiAqLworCisjaWZuZGVmIEVUSF9QXzgwMjExX1JBVworI2RlZmluZSBFVEhfUF84MDIxMV9SQVcgKEVUSF9QX0VDT05FVCArIDEpCisjZW5kaWYKKworLyogSUVFRSA4MDIuMTEgZGVmaW5lcyAqLworCisjZGVmaW5lIFA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E4NSwgcnRsODE4NworCXUxNiAgICAgICBXYWtldXA6MTsgICAgICAgLy9mb3IgcnRsODE4NQorCXUxNiAgICAgICBSZXNlcnZlZDA6MTsgICAgLy9mb3IgcnRsODE4NQorCXU4ICAgICAgICBBR0M7CisJdTMyICAgICAgIFRpbWVTdGFtcExvdzsKKwl1MzIgICAgICAgVGltZVN0YW1wSGlnaDsKKwlib29sICAgICAgYlNoaWZ0OworCWJvb2wgICAgICBiSXNRb3NEYXRhOyAgICAgICAgICAgICAvLyBBZGRlZCBieSBBbm5pZSwgMjAwNS0xMi0yMi4KKwl1OCAgICAgICAgVXNlclByaW9yaXR5OworCisJLy8xISEhISEhISEhISEhISEhISEhISEhISEhISEhCisJLy8xQXR0ZW50aW9uIFBsZWFzZSEhITwxMW4gb3IgODE5MCBzcGVjaWZpYyBjb2RlIHNob3VsZCBiZSBwdXQgYmVsb3cgdGhpcyBsaW5lPgorCS8vMSEhISEhISEhISEhISEhISEhISEhISEhISEhIQorCisJdTggICAgICAgIFJ4RHJ2SW5mb1NpemU7CisJdTggICAgICAgIFJ4QnVmU2hpZnQ7CisJYm9vbCAgICAgIGJJc0FNUERVOworCWJvb2wgICAgICBiRmlyc3RNUERVOworCWJvb2wgICAgICBiQ29udGFpbkhUQzsKKwlib29sICAgICAgUnhJczQwTUh6UGFja2V0OworCXUzMiAgICAgICBSeFBXREJBbGw7CisJdTggICAgICAgIFJ4TUlNT1NpZ25hbFN0cmVuZ3RoWzRdOyAgICAgICAgLy8gaW4gMH4xMDAgaW5kZXgKKwlzOCAgICAgICAgUnhNSU1PU2lnbmFsUXVhbGl0eVsyXTsKKwlib29sICAgICAgYlBhY2tldE1hdGNoQlNTSUQ7CisJYm9vbCAgICAgIGJJc0NDSzsKKwlib29sICAgICAgYlBhY2tldFRvU2VsZjsKKwkvL2FkZGVkIGJ5IGFteQorCXU4KiAgICAgICB2aXJ0dWFsX2FkZHJlc3M7CisJdTE2ICAgICAgICAgIHBhY2tldGxlbmd0aDsg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GVkIHJhdGVzIGZvciB0aGUgcmVtYWluaW5nIHN1cHBvcnRlZAorICogcmF0ZXMuICBPdGhlciBBUHMsIGhvd2V2ZXIsIHN0aWNrIGFsbCBvZiB0aGVpciBzdXBwb3J0ZWQgcmF0ZXMgb24gdGhlCisgKiBtYWluIHJhdGVzIGluZm9ybWF0aW9uIGVsZW1lbnQuLi4gKi8KKyNkZWZpbmUgTUFYX1JBVEVTX0xFTkdUSCAgICAgICAgICAgICAgICAgICgodTgpMTIpCisjZGVmaW5lIE1BWF9SQVRFU19FWF9MRU5HVEggICAgICAgICAgICAgICAoKHU4KTE2KQorI2RlZmluZSBNQVhfTkVUV09SS19DT1VOVCAgICAgICAgICAgICAgICAgIDEyOAorCisjZGVmaW5lIE1BWF9DSEFOTkVMX05VTUJFUiAgICAgICAgICAgICAgICAgMTYxCisjZGVmaW5lIElFRUU4MDIxMV9TT0ZUTUFDX1NDQU5fVElNRQkgICAxMDAKKy8vKEhaIC8gMikKKyNkZWZpbmUgSUVFRTgwMjExX1NPRlRNQUNfQVNTT0NfUkVUUllfVElNRSAoSFogKiAyKQorCisjZGVmaW5lIENSQ19MRU5HVEggICAgICAgICAgICAgICAgIDRVCisKKyNkZWZpbmUgTUFYX1dQQV9JRV9MRU4gNjQKKworI2RlZmluZSBORVRXT1JLX0VNUFRZX0VTU0lEICgxPDwwKQorI2RlZmluZSBORVRXT1JLX0hBU19PRkRNICAgICgxPDwxKQorI2RlZmluZSBORVRXT1JLX0hBU19DQ0sgICAgICgxPDwyKQorCisvKiBRb1Mgc3RydWN0dXJlICovCisjZGVmaW5lIE5FVFdPUktfSEFTX1FPU19QQVJBTUVURVJTICAgICAgKDE8PDMpCisjZGVmaW5lIE5FVFdPUktfSEFTX1FPU19JTkZPUk1BVElPTiAgICAgKDE8PDQpCisjZGVmaW5lIE5FVFdPUktfSEFTX1FPU19NQVNLICAgICAgICAgICAgKE5FVFdPUktfSEFTX1FPU19QQVJBTUVURVJTIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBORVRXT1JLX0hBU19RT1NfSU5GT1JNQVRJT04pCisvKiA4MDIuMTFoICovCisjZGVmaW5lIE5FVFdPUktfSEFTX1BPV0VSX0NPTlNUUkFJTlQgICAgKDE8PDUpCisjZGVmaW5lIE5FVFdPUktfSEFTX0NTQSAgICAgICAgICAgICAgICAgKDE8PDYpCisjZGVmaW5lIE5FVFdPUktfSEFTX1FVSUVUICAgICAgICAgICAgICAgKDE8PDcpCisjZGVmaW5lIE5FVFdPUktfSEFTX0lCU1NfREZTICAgICAgICAgICAgKDE8PDgpCisjZGVmaW5lIE5FVFdPUktfSEFTX1RQQ19SRVBPUlQgICAgICAgICAgKDE8PDkpCisKKyNkZWZpbmUgTkVUV09SS19IQVNfRVJQX1ZBTFVFICAgICAgICAgICAoMTw8MTApCisKKyNkZWZpbmUgUU9TX1FVRVVFX05VTSAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFPU19PVUlfTEVOICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBRT1NfT1VJX1RZUEUgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgUU9TX0VMRU1FTlRfSUQgICAgICAgICAgICAgICAgICAyMjEKKyNkZWZpbmUgUU9TX09VSV9JTkZPX1NVQl9UWVBFICAgICAgICAgICAwCisjZGVmaW5lIFFPU19PVUlfUEFSQU1fU1VCX1RZUEUgICAgICAgICAgMQorI2RlZmluZSBRT1NfVkVSU0lPTl8xICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUU9TX0FJRlNOX01JTl9WQUxVRSAgICAgICAgICAgICAyCisjaWYgMQorc3RydWN0IGllZWU4MDIxMV9xb3NfaW5mb3JtYXRpb25fZWxlbWVudCB7CisgICAgICAgIHU4IGVsZW1lbnRJRDsKKyAgICAgICAgdTggbGVuZ3RoOworICAgICAgICB1OCBxdWlbUU9TX09VSV9MRU5dOworICAgICAgICB1OCBxdWlfdHlwZTsKKyAgICA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gorICAgICAgICBpbnQgKCpoYW5kbGVfYmVhY29uKSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYsIHN0cnVjdCBpZWVlODAyMTFfYmVhY29uICogYmVhY29uLCBzdHJ1Y3QgaWVlZTgwMjExX25ldHdvcmsgKiBuZXR3b3JrKTsKKyNpZiAwCisgICAgICAgIGludCAoKmhhbmRsZV9wcm9iZV9yZXNwb25zZSkgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3Byb2JlX3Jlc3BvbnNlICogcmVzcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9uZXR3b3JrICogbmV0d29yayk7CisgICAgICAgIGludCAoKmhhbmRsZV9wcm9iZV9yZXF1ZXN0KSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9wcm9iZV9yZXF1ZXN0ICogcmVxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfcnhfc3RhdHMgKiBzdGF0cyk7CisjZW5kaWYKKyAgICAgICAgaW50ICgqaGFuZGxlX2Fzc29jX3Jlc3BvbnNlKSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYsIHN0cnVjdCBpZWVlODAyMTFfYXNzb2NfcmVzcG9uc2VfZnJhbWUgKiByZXNwLCBzdHJ1Y3QgaWVlZTgwMjExX25ldHdvcmsgKiBuZXR3b3JrKTsKKworI2lmIDAKKyAgICAgICAgLyogVHlwaWNhbCBBUCBtZXRob2RzICovCisgICAgICAgIGludCAoKmhhbmRsZV9hc3NvY19yZXF1ZXN0KSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYpOworICAgICAgICBpbnQgKCpoYW5kbGV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rOworCQl9CisJCWJyZWFrOworCX0KKworCXJldHVybiBoZHJsZW47Cit9CisKK3N0YXRpYyBpbmxpbmUgdTggKmllZWU4MDIxMV9nZXRfcGF5bG9hZChzdHJ1Y3QgaWVlZTgwMjExX2hkciAqaGRyKQoreworICAgICAgICBzd2l0Y2ggKGllZWU4MDIxMV9nZXRfaGRybGVuKGxlMTZfdG9fY3B1KGhkci0+ZnJhbWVfY3RsKSkpIHsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfMUFERFJfTEVOOgorICAgICAgICAgICAgICAgIHJldHVybiAoKHN0cnVjdCBpZWVlODAyMTFfaGRyXzFhZGRyICopaGRyKS0+cGF5bG9hZDsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfMkFERFJfTEVOOgorICAgICAgICAgICAgICAgIHJldHVybiAoKHN0cnVjdCBpZWVlODAyMTFfaGRyXzJhZGRyICopaGRyKS0+cGF5bG9hZDsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfM0FERFJfTEVOOgorICAgICAgICAgICAgICAgIHJldHVybiAoKHN0cnVjdCBpZWVlODAyMTFfaGRyXzNhZGRyICopaGRyKS0+cGF5bG9hZDsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfNEFERFJfTEVOOgorICAgICAgICAgICAgICAgIHJldHVybiAoKHN0cnVjdCBpZWVlODAyMTFfaGRyXzRhZGRyICopaGRyKS0+cGF5bG9hZDsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gTlVMTDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaWVlZTgwMjExX2lzX29mZG1fcmF0ZSh1OCByYXRlKQoreworICAgICAgICBzd2l0Y2ggKHJhdGUgJiB+SUVFRTgwMjExX0JBU0lDX1JBVEVfTUFTSykgeworICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfNk1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfOU1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMTJNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzE4TUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX09GRE1fUkFURV8yNE1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMzZNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzQ4TUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX09GRE1fUkFURV81NE1COgorICAgICAgICAgICAgICAgIHJldHVybiAxOworICAgICAgICB9CisgICAgICAgIHJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludCBpZWVlODAyMTFfaXNfY2NrX3JhdGUodTggcmF0ZSkKK3sKKyAgICAgICAgc3dpdGNoIChyYXRlICYgfklFRUU4MDIxMV9CQVNJQ19SQVRFX01BU0spIHsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfQ0NLX1JBVEVfMU1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9DQ0tfUkFURV8yTUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX0NDS19SQVRFXzVNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfQ0NLX1JBVEVfMTFNQjoKKyAgICAgICAgICAgICAgICByZXR1cm4gMTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gMDsKK30KKworCisvKiBpZWVlODAyMTEuYyAqLworZXh0ZXJuIHZvaWQgZnJlZV9pZWVlODAyMTEoc3RydWN0IG5ldF9kZXZpY2UgKmRldik7CitleHRlcm4gc3RydWN0IG5ldF9kZXZpY2UgKmFsbG9jX2llZWU4MDIxMShpbnQgc2l6ZW9mX3ByaXYpOworCitleHRlcm4gaW50IGllZWU4MDIxMV9zZXRfZW5jcnlwdGlvbihzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSk7CisKKy8qIGllZWU4MDIxMV90eC5jICovCisKK2V4dGVybiBpbnQgaWVlZTgwMjExX2VuY3J5c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3JxdSwgY2hhciAqa2V5KTsKK2V4dGVybiBpbnQgaWVlZTgwMjExX3d4X2dldF9lbmNvZGUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCisJCQkJICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKwkJCQkgICB1bmlvbiBpd3JlcV9kYXRhICp3cnF1LCBjaGFyICprZXkpOworI2lmIFdJUkVMRVNTX0VYVCA+PSAxOAorZXh0ZXJuIGludCBpZWVlODAyMTFfd3hfZ2V0X2VuY29kZV9leHQoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhKiB3cnF1LCBjaGFyICpleHRyYSk7CitleHRlcm4gaW50IGllZWU4MDIxMV93eF9zZXRfZW5jb2RlX2V4dChzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEqIHdycXUsIGNoYXIgKmV4dHJhKTsKK2V4dGVybiBpbnQgaWVlZTgwMjExX3d4X3NldF9hdXRoKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl3X3BhcmFtICpkYXRhLCBjaGFyICpleHRyYSk7CitleHRlcm4gaW50IGllZWU4MDIxMV93eF9zZXRfbWxtZShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKKyAgICAgICAgICA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IxMV9kZXZpY2UqICAgICAgICBpZWVlLAorICAgICAgICBQVFNfQ09NTU9OX0lORk8gICAgICAgICAgICAgICAgICpwcFRTLAorICAgICAgICB1OCogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFkZHIsCisgICAgICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVElELAorICAgICAgICBUUl9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgIFR4UnhTZWxlY3QsICAvL1J4OjEsIFR4OjAKKyAgICAgICAgYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgICBiQWRkTmV3VHMKKyAgICAgICAgKTsKK2V4dGVybiB2b2lkIFRTSW5pdGlhbGl6ZShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSk7CitleHRlcm4gIHZvaWQgVHNTdGFydEFkZEJhUHJvY2VzcyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgUFRYX1RTX1JFQ09SRCAgIHBUeFRTKTsKK2V4dGVybiB2b2lkIFJlbW92ZVBlZXJUUyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgdTgqIEFkZHIpOworZXh0ZXJuIHZvaWQgUmVtb3ZlQWxsVFMoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUpOwordm9pZCBpZWVlODAyMTFfc29mdG1hY19zY2FuX3N5bmNybyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSk7CisKK2V4dGVybiBjb25zdCBsb25nIGllZWU4MDIxMV93bGFuX2ZyZXF1ZW5jaWVzW107CisKK2V4dGVybiBpbmxpbmUgdm9pZCBpZWVlODAyMTFfaW5jcmVtZW50X3NjYW5zKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlKQoreworCWllZWUtPnNjYW5zKys7Cit9CisKK2V4dGVybiBpbmxpbmUgaW50IGllZWU4MDIxMV9nZXRfc2NhbnMoc3RydWN0IGllZWU4MDIxMV9kZXZp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BmdF90YWJbNF1bMjU2XTsKK3N0YXRpYyB1MzIgaXRfdGFiWzRdWzI1Nl07CisKK3N0YXRpYyB1MzIgZmxfdGFiWzRdWzI1Nl07CitzdGF0aWMgdTMyIGlsX3RhYls0XVsyNTZdOworCitzdGF0aWMgaW5saW5lIHU4IF9faW5pdAorZl9tdWx0ICh1OCBhLCB1OCBiKQoreworCXU4IGFhID0gbG9nX3RhYlthXSwgY2MgPSBhYSArIGxvZ190YWJbYl07CisKKwlyZXR1cm4gcG93X3RhYltjYyArIChjYyA8IGFhID8gMSA6IDApXTsKK30KKworI2RlZmluZSBmZl9tdWx0KGEsYikgICAgKGEgJiYgYiA/IGZfbXVsdChhLCBiKSA6IDApCisKKyNkZWZpbmUgZl9ybihibywgYmksIG4sIGspCQkJCQlcCisgICAgYm9bbl0gPSAgZnRfdGFiWzBdW2J5dGUoYmlbbl0sMCldIF4JCQkJXAorICAgICAgICAgICAgIGZ0X3RhYlsxXVtieXRlKGJpWyhuICsgMSkgJiAzXSwxKV0gXgkJXAorICAgICAgICAgICAgIGZ0X3RhYlsyXVtieXRlKGJpWyhuICsgMikgJiAzXSwyKV0gXgkJXAorICAgICAgICAgICAgIGZ0X3RhYlszXVtieXRlKGJpWyhuICsgMykgJiAzXSwzKV0gXiAqKGsgKyBuKQorCisjZGVmaW5lIGlfcm4oYm8sIGJpLCBuLCBrKQkJCQkJXAorICAgIGJvW25dID0gIGl0X3RhYlswXVtieXRlKGJpW25dLDApXSBeCQkJCVwKKyAgICAgICAgICAgICBpdF90YWJbMV1bYnl0ZShiaVsobiArIDMpICYgM10sMSldIF4JCVwKKyAgICAgICAgICAgICBpdF90YWJbMl1bYnl0ZShiaVsobiArIDIpICYgM10sMildIF4JCVwKKyAgICAgICAgICAgICBpdF90YWJbM11bYnl0ZShiaVsobiArIDEpICYgM10sMyldIF4gKihrICsgbikKKworI2RlZmluZSBsc19ib3goeCkJCQkJXAorICAgICggZmxfdGFiWzBdW2J5dGUoeCwgMCldIF4J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JCWZ0X3RhYlsyXVtpXSA9IHJvdGwgKHQsIDE2KTsKKwkJZnRfdGFiWzNdW2ldID0gcm90bCAodCwgMjQpOworCisJCXAgPSBpc2JfdGFiW2ldOworCisJCXQgPSBwOworCQlpbF90YWJbMF1baV0gPSB0OworCQlpbF90YWJbMV1baV0gPSByb3RsICh0LCA4KTsKKwkJaWxfdGFiWzJdW2ldID0gcm90bCAodCwgMTYpOworCQlpbF90YWJbM11baV0gPSByb3RsICh0LCAyNCk7CisKKwkJdCA9ICgodTMyKSBmZl9tdWx0ICgxNCwgcCkpIHwKKwkJICAgICgodTMyKSBmZl9tdWx0ICg5LCBwKSA8PCA4KSB8CisJCSAgICAoKHUzMikgZmZfbXVsdCAoMTMsIHApIDw8IDE2KSB8CisJCSAgICAoKHUzMikgZmZfbXVsdCAoMTEsIHApIDw8IDI0KTsKKworCQlpdF90YWJbMF1baV0gPSB0OworCQlpdF90YWJbMV1baV0gPSByb3RsICh0LCA4KTsKKwkJaXRfdGFiWzJdW2ldID0gcm90bCAodCwgMTYpOworCQlpdF90YWJbM11baV0gPSByb3RsICh0LCAyNCk7CisJfQorfQorCisjZGVmaW5lIHN0YXJfeCh4KSAoKCh4KSAmIDB4N2Y3ZjdmN2YpIDw8IDEpIF4gKCgoKHgpICYgMHg4MDgwODA4MCkgPj4gNykgKiAweDFiKQorCisjZGVmaW5lIGltaXhfY29sKHkseCkgICAgICAgXAorICAgIHUgICA9IHN0YXJfeCh4KTsgICAgICAgIFwKKyAgICB2ICAgPSBzdGFyX3godSk7ICAgICAgICBcCisgICAgdyAgID0gc3Rhcl94KHYpOyAgICAgICAgXAorICAgIHQgICA9IHcgXiAoeCk7ICAgICAgICAgIFwKKyAgICh5KSAgPSB1IF4gdiBeIHc7ICAgICAgICBcCisgICAoeSkgXj0gcm90cih1IF4gdCwgIDgpIF4gXAorICAgICAgICAgIHJvdHIodiBeIHQsIDE2KSBeIFwKKyAgICAgICAgICByb3RyKHQsMjQpCisKKy8qIGluaXRpYWxpc2UgdGhlIGtleSBzY2hlZHVsZSBmcm9tIHRoZSB1c2VyIHN1cHBsaWVkIGtleSAqLworCisjZGVmaW5lIGxvb3A0KGkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgIHQgPSByb3RyKHQsICA4KTsgdCA9IGxzX2JveCh0KSBeIHJjb190YWJbaV07ICAgIFwKKyAgICB0IF49IEVfS0VZWzQgKiBpXTsgICAgIEVfS0VZWzQgKiBpICsgNF0gPSB0OyAgICBcCisgICAgdCBePSBFX0tFWVs0ICogaSArIDFdOyBFX0tFWVs0ICogaSArIDVdID0gdDsgICAgXAorICAgIHQgXj0gRV9LRVlbNCAqIGkgKyAyXTsgRV9LRVlbNCAqIGkgKyA2XSA9IHQ7ICAgIFwKKyAgICB0IF49IEVfS0VZWzQgKiBpICsgM107IEVfS0VZWzQgKiBpICsgN10gPSB0OyAgICBcCit9CisKKyNkZWZpbmUgbG9vcDYoaSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgdCA9IHJvdHIodCwgIDgpOyB0ID0gbHNfYm94KHQpIF4gcmNvX3RhYltpXTsgICAgXAorICAgIHQgXj0gRV9LRVlbNiAqIGldOyAgICAgRV9LRVlbNiAqIGkgKyA2XSA9IHQ7ICAgIFwKKyAgICB0IF49IEVfS0VZWzYgKiBpICsgMV07IEVfS0VZWzYgKiBpICsgN10gPSB0OyAgICBcCisgICAgdCBePSBFX0tFWVs2ICogaSArIDJdOyBFX0tFWVs2ICogaSArIDhdID0gdDsgICAgXAorICAgIHQgXj0gRV9LRVlbNiAqIGkgKyAzXTsgRV9LRVlbNiAqIGkgKyA5XSA9IHQ7ICAgIFwKKyAgICB0IF49IEVfS0VZWzYgKiBpICsgNF07IEVfS0VZWzYgKiBpICsgMTBdID0gdDsgICBcCisgICAgdCBePSBFX0tFWVs2ICogaSArIDVdOyBFX0tFWVs2ICogaSArIDExXSA9IHQ7ICAgXAorfQorCisjZGVmaW5lIG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CBiMCwga3ApOworCWZfbnJvdW5kIChiMCwgYjEsIGtwKTsKKwlmX25yb3VuZCAoYjEsIGIwLCBrcCk7CisJZl9ucm91bmQgKGIwLCBiMSwga3ApOworCWZfbnJvdW5kIChiMSwgYjAsIGtwKTsKKwlmX25yb3VuZCAoYjAsIGIxLCBrcCk7CisJZl9ucm91bmQgKGIxLCBiMCwga3ApOworCWZfbnJvdW5kIChiMCwgYjEsIGtwKTsKKwlmX25yb3VuZCAoYjEsIGIwLCBrcCk7CisJZl9scm91bmQgKGIwLCBiMSwga3ApOworCisJdTMyX291dCAob3V0LCBiMFswXSk7CisJdTMyX291dCAob3V0ICsgNCwgYjBbMV0pOworCXUzMl9vdXQgKG91dCArIDgsIGIwWzJdKTsKKwl1MzJfb3V0IChvdXQgKyAxMiwgYjBbM10pOworfQorCisvKiBkZWNyeXB0IGEgYmxvY2sgb2YgdGV4dCAqLworCisjZGVmaW5lIGlfbnJvdW5kKGJvLCBiaSwgaykgXAorICAgIGlfcm4oYm8sIGJpLCAwLCBrKTsgICAgIFwKKyAgICBpX3JuKGJvLCBiaSwgMSwgayk7ICAgICBcCisgICAgaV9ybihibywgYmksIDIsIGspOyAgICAgXAorICAgIGlfcm4oYm8sIGJpLCAzLCBrKTsgICAgIFwKKyAgICBrIC09IDQKKworI2RlZmluZSBpX2xyb3VuZChibywgYmksIGspIFwKKyAgICBpX3JsKGJvLCBiaSwgMCwgayk7ICAgICBcCisgICAgaV9ybChibywgYmksIDEsIGspOyAgICAgXAorICAgIGlfcmwoYm8sIGJpLCAyLCBrKTsgICAgIFwKKyAgICBpX3JsKGJvLCBiaSwgMywgaykKKworc3RhdGljIHZvaWQgYWVzX2RlY3J5cHQodm9pZCAqY3R4X2FyZywgdTggKm91dCwgY29uc3QgdTggKmluKQoreworCWNvbnN0IHN0cnVjdCBhZXNfY3R4ICpjdHggPSBjdHhfYXJnOworCXUzMiBiMFs0XSwgYjFbNF07CisJY29uc3QgaW50IGtleV9sZW4gPSBjdH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NpZ25lZCBpbnQgc2xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCAqZHN0LCB1bnNpZ25lZCBpbnQgKmRsZW4pCit7CisJcmV0dXJuIHRmbS0+X19jcnRfYWxnLT5jcmFfY29tcHJlc3MuY29hX2NvbXByZXNzKGNyeXB0b190Zm1fY3R4KHRmbSksCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYywgc2xlbiwgZHN0LAorCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbGVuKTsKK30KKworc3RhdGljIGludCBjcnlwdG9fZGVjb21wcmVzcyhzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1OCAqc3JjLCB1bnNpZ25lZCBpbnQgc2xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTggKmRzdCwgdW5zaWduZWQgaW50ICpkbGVuKQoreworCXJldHVybiB0Zm0tPl9fY3J0X2FsZy0+Y3JhX2NvbXByZXNzLmNvYV9kZWNvbXByZXNzKGNyeXB0b190Zm1fY3R4KHRmbSksCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjLCBzbGVuLCBkc3QsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGxlbik7Cit9CisKK2ludCBjcnlwdG9faW5pdF9jb21wcmVzc19mbGFncyhzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLCB1MzIgZmxhZ3MpCit7CisJcmV0dXJuIGZsYWdzID8gLUVJTlZBTCA6IDA7Cit9CisKK2ludCBjcnlwdG9faW5pdF9jb21wcmVzc19vcHMoc3RydWN0IGNyeXB0b190Zm0gKnRmbSkKK3sKKwlpbnQgcmV0ID0gMDsKKwlzdHJ1Y3QgY29tcHJlc3NfdGZtICpvcHMg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FuZC9vciBtb2RpZnkKKyAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgdmVyc2lvbiAyIGFzCisgKiBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbi4gU2VlIFJFQURNRSBhbmQgQ09QWUlORyBmb3IKKyAqIG1vcmUgZGV0YWlscy4KKyAqLworCisjaW5jbHVkZSA8bGludXgvY3J5cHRvLmg+CisKK3N0YXRpYyBpbmxpbmUgaW50IGNyeXB0b19jaXBoZXJfZW5jcnlwdChzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqZHN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqc3JjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBuYnl0ZXMpCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfQ0lQSEVSKTsKKwlyZXR1cm4gdGZtLT5jcnRfY2lwaGVyLmNpdF9lbmNyeXB0KHRmbSwgZHN0LCBzcmMsIG5ieXRlcyk7Cit9CisKKworc3RhdGljIGlubGluZSBpbnQgY3J5cHRvX2NpcGhlcl9kZWNyeXB0KHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNjYXR0ZXJsaXN0ICpkc3QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNjYXR0ZXJsaXN0ICpzcmMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IG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RlZmluZSBLRVlfVFlQRV9US0lQCQkweDIKKyNkZWZpbmUgS0VZX1RZUEVfQ0NNUAkJMHg0CisjZGVmaW5lIEtFWV9UWVBFX1dFUDEwNAkJMHg1CisKKy8qIGFkZGVkIGZvciBydGw4MTl4IHR4IHByb2NlZHVyZSAqLworI2RlZmluZSBNQVhfUVVFVUVfU0laRQkJMHgxMAorCisvLworLy8gODE5MCBxdWV1ZSBtYXBwaW5nCisvLworI2RlZmluZSBCS19RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEJFX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBWT19RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhDQ0FfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgVFhDTURfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBNR05UX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJR0hfUVVFVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQkVBQ09OX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorCisjZGVmaW5lIExPV19RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFX1FVRVVFCisjZGVmaW5lIE5PUk1BTF9RVUVVRSAgICAgICAgICAgICAgICAgICAgICAgICAgIE1HTlRfUVVFVUUKKworLy9hZGRlZCBieSBhbXkgZm9yIHBzCisjZGVmaW5lIFNXUkZfVElNRU9VVAkJCQk1MAorCisvL2FkZGVkIGJ5IGFteSBmb3IgTEVBUCByZWxhdGVkCisjZGVmaW5lIElFX0NJU0NPX0ZMQUdfUE9TSVRJT04JCTB4MD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KyAgICAgICAgdTggYlR4RW5hYmxlRndDYWxjRHVyOjE7CisgICAgICAgIHU4IGJBTVBEVUVuYWJsZToxOworICAgICAgICB1OCBiUlRTU1RCQzoxOworICAgICAgICB1OCBSVFNTQzoxOworCisgICAgICAgIHU4IGJSVFNCVzoxOworICAgICAgICB1OCBiUGFja2V0Qlc6MTsKKwl1OCBiUlRTVXNlU2hvcnRQcmVhbWJsZToxOworCXU4IGJSVFNVc2VTaG9ydEdJOjE7CisJdTggYk11bHRpY2FzdDoxOworCXU4IGJCcm9hZGNhc3Q6MTsKKyAgICAgICAgLy91OCByZXNlcnZlZDI6MjsKKyAgICAgICAgdTggZHJ2X2FnZ19lbmFibGU6MTsKKyAgICAgICAgdTggcmVzZXJ2ZWQyOjE7CisKKyAgICAgICAgLyogVHggRGVzYyByZWxhdGVkIGVsZW1lbnQoMTItMTkpICovCisgICAgICAgIHU4IHJhdGFfaW5kZXg7CisgICAgICAgIHU4IHF1ZXVlX2luZGV4OworICAgICAgICAvL3U4IHJlc2VydmVkMzsKKyAgICAgICAgLy91OCByZXNlcnZlZDQ7CisgICAgICAgIHUxNiB0eGJ1Zl9zaXplOworICAgICAgICAvL3U4IHJlc2VydmVkNTsKKwl1OCBSQVRSSW5kZXg7CisgICAgICAgIHU4IHJlc2VydmVkNjsKKyAgICAgICAgdTggcmVzZXJ2ZWQ3OworICAgICAgICB1OCByZXNlcnZlZDg7CisKKyAgICAgICAgLyogVHggZmlybXdhcmUgcmVsYXRlZCBlbGVtZW50KDIwLTI3KSAqLworICAgICAgICB1OCBkYXRhX3JhdGU7CisgICAgICAgIHU4IHJ0c19yYXRlOworICAgICAgICB1OCBhbXBkdV9mYWN0b3I7CisgICAgICAgIHU4IGFtcGR1X2RlbnNpdHk7CisgICAgICAgIC8vdTggcmVzZXJ2ZWQ5OworICAgICAgICAvL3U4IHJlc2VydmVkMTA7CisgICAgICAgIC8vdTggcmVzZXJ2ZWQxMTsKKyAgICAgICAgdTggRHJ2QWdnck51bTsKKwl1MTYgcGt0X3NpemU7CisgICAgICAgIHU4IHJlc2VydmVkMTI7Cit9Y2JfZGVzYywgKnBjYl9kZXNjOworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tRGVmaW5lIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2RlZmluZSBNR05fMU0gICAgICAgICAgICAgICAgICAweDAyCisjZGVmaW5lIE1HTl8yTSAgICAgICAgICAgICAgICAgIDB4MDQKKyNkZWZpbmUgTUdOXzVfNU0gICAgICAgICAgICAgICAgMHgwYgorI2RlZmluZSBNR05fMTFNICAgICAgICAgICAgICAgICAweDE2CisKKyNkZWZpbmUgTUdOXzZNICAgICAgICAgICAgICAgICAgMHgwYworI2RlZmluZSBNR05fOU0gICAgICAgICAgICAgICAgICAweDEyCisjZGVmaW5lIE1HTl8xMk0gICAgICAgICAgICAgICAgIDB4MTgKKyNkZWZpbmUgTUdOXzE4TSAgICAgICAgICAgICAgICAgMHgyNAorI2RlZmluZSBNR05fMjRNICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lIE1HTl8zNk0gICAgICAgICAgICAgICAgIDB4NDgKKyNkZWZpbmUgTUdOXzQ4TSAgICAgICAgICAgICAgICAgMHg2MAorI2RlZmluZSBNR05fNTRNICAgICAgICAgICAgICAgICAweDZjCisKKyNkZWZpbmUgTUdOX01DUzAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSBNR05fTUNTMSAgICAgICAgICAgICAgICAweDgxCisjZGVmaW5lIE1HTl9NQ1MyICAgICAgICAgICAgICAgIDB4ODIKKyNkZWZpbmUgTUdOX01DUzMgICAgICAgICAgICAgICAgMHg4MworI2RlZmluZSBNR05fTUNTNCAgICAgICAgICAgICAgICAweDg0CisjZGVmaW5lIE1HTl9NQ1M1ICAgICAgICAgICAgICAgIDB4ODUKKyNkZWZpbmUgTUdOX01DUzYgICAgICAgICAgICAgICAgMHg4NgorI2Rl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ordHlwZWRlZiBlbnVtIF9UU19BQ1RJT057CisgICAgICAgIEFDVF9BRERUU1JFUSA9IDAsCisgICAgICAgIEFDVF9BRERUU1JTUCA9IDEsCisgICAgICAgIEFDVF9ERUxUUyAgICA9IDIsCisgICAgICAgIEFDVF9TQ0hFRFVMRSA9IDMsCit9IFRTX0FDVElPTiwgKlBUU19BQ1RJT047CisKK3R5cGVkZWYgZW51bSBfQkFfQUNUSU9OeworICAgICAgICBBQ1RfQUREQkFSRVEgPSAwLAorICAgICAgICBBQ1RfQUREQkFSU1AgPSAxLAorICAgICAgICBBQ1RfREVMQkEgICAgPSAyLAorfSBCQV9BQ1RJT04sICpQQkFfQUNUSU9OOworCit0eXBlZGVmIGVudW0gX0luaXRpYWxHYWluT3BUeXBleworCUlHX0JhY2t1cD0wLAorCUlHX1Jlc3RvcmUsCisJSUdfTWF4Cit9SW5pdGlhbEdhaW5PcFR5cGU7CisvL2FkZGVkIGJ5IGFteSBmb3IgTEVEIDA5MDMxOQorLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8gTEVEIGN1c3RvbWl6YXRpb24uCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cit0eXBlZGVmIGVudW0gX0xFRF9DVExfTU9ERXsKKyAgICAgICAgTEVEX0NUTF9QT1dFUl9PTiA9IDEsCisgICAgICAgIExFRF9DVExfTElOSyA9IDIsCisgICAgICAgIExFRF9DVExfTk9fTElOSyA9IDMsCisgICAgICAgIExFRF9DVExfVFggPSA0LAorICAgICAgICBMRURfQ1RMX1JYID0gNSwKKyAgICAgICAgTEVEX0NUTF9TSVRFX1NVUlZFWSA9IDYsCisgICAgICAgIExFRF9DVExfUE9XRVJfT0ZGID0gNywKKyAgICAgICAgTEVEX0NUTF9TVEFSVF9UT19MSU5LID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oSUVFRTgwMjExX0RMX1RYLCBmLCAjIyBhKQorI2RlZmluZSBJRUVFODAyMTFfREVCVUdfUlgoZiwgYS4uLikgIElFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfUlgsIGYsICMjIGEpCisjZGVmaW5lIElFRUU4MDIxMV9ERUJVR19RT1MoZiwgYS4uLikgIElFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfUU9TLCBmLCAjIyBhKQorCisjaWZkZWYgQ09ORklHX0lFRUU4MDIxMV9ERUJVRworLyogQWRkZWQgYnkgQW5uaWUsIDIwMDUtMTEtMjIuICovCisjZGVmaW5lIE1BWF9TVFJfTEVOICAgICA2NAorLyogSSB3YW50IHRvIHNlZSBBU0NJSSAzMyB0byAxMjYgb25seS4gT3RoZXJ3aXNlLCBJIHByaW50ICc/Jy4gQW5uaWUsIDIwMDUtMTEtMjIuKi8KKyNkZWZpbmUgUFJJTlRBQkxFKF9jaCkgIChfY2g+JyEnICYmIF9jaDwnficpCisjZGVmaW5lIElFRUU4MDIxMV9QUklOVF9TVFIoX0NvbXAsIF9UaXRsZVN0cmluZywgX1B0ciwgX0xlbikgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmKChfQ29tcCkgJiBsZXZlbCkgICAJCQkJCQkJXAorICAgICAgICAgICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgICAgICAgICAgICAgX19pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCAgYnVmZmVyW01BWF9TVFJfTEVOXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbGVuZ3RoID0gKF9MZW48TUFYX1NUUl9MRU4pPyBfTGVuIDogKE1BWF9TVFJfTEVOLTEpIDsgIAlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lbXNldChidWZmZXIsIDAsIE1BWF9TVFJfTEVOKTsgICAgICAgICAgICAgICAgICAgICAgCQlcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lbWNweShidWZmZXIsICh1OCAqKV9QdHIsIGxlbmd0aCApOyAgICAgICAgICAgIAkJXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoIF9faT0wOyBfX2k8TUFYX1NUUl9MRU47IF9faSsrICkgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCAhUFJJTlRBQkxFKGJ1ZmZlcltfX2ldKSApICAgYnVmZmVyW19faV0gPSAnPyc7ICAgICAJXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJbbGVuZ3RoXSA9ICdcMCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIlJ0bDgxOXg6ICIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKF9UaXRsZVN0cmluZyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgIC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OworCXUzMiAgICAgICBUaW1lU3RhbXBMb3c7CisJdTMyICAgICAgIFRpbWVTdGFtcEhpZ2g7CisJYm9vbCAgICAgIGJTaGlmdDsKKwlib29sICAgICAgYklzUW9zRGF0YTsgICAgICAgICAgICAgLy8gQWRkZWQgYnkgQW5uaWUsIDIwMDUtMTItMjIuCisJdTggICAgICAgIFVzZXJQcmlvcml0eTsKKworCS8vMSEhISEhISEhISEhISEhISEhISEhISEhISEhIQorCS8vMUF0dGVudGlvbiBQbGVhc2UhISE8MTFuIG9yIDgxOTAgc3BlY2lmaWMgY29kZSBzaG91bGQgYmUgcHV0IGJlbG93IHRoaXMgbGluZT4KKwkvLzEhISEhISEhISEhISEhISEhISEhISEhISEhISEKKworCXU4ICAgICAgICBSeERydkluZm9TaXplOworCXU4ICAgICAgICBSeEJ1ZlNoaWZ0OworCWJvb2wgICAgICBiSXNBTVBEVTsKKwlib29sICAgICAgYkZpcnN0TVBEVTsKKwlib29sICAgICAgYkNvbnRhaW5IVEM7CisJYm9vbCAgICAgIFJ4SXM0ME1IelBhY2tldDsKKwl1MzIgICAgICAgUnhQV0RCQWxsOworCXU4ICAgICAgICBSeE1JTU9TaWduYWxTdHJlbmd0aFs0XTsgICAgICAgIC8vIGluIDB+MTAwIGluZGV4CisJczggICAgICAgIFJ4TUlNT1NpZ25hbFF1YWxpdHlbMl07CisJYm9vbCAgICAgIGJQYWNrZXRNYXRjaEJTU0lEOworCWJvb2wgICAgICBiSXNDQ0s7CisJYm9vbCAgICAgIGJQYWNrZXRUb1NlbGY7CisJLy9hZGRlZCBieSBhbXkKKwl1OCogICAgICAgdmlydHVhbF9hZGRyZXNzOworCXUxNiAgICAgICAgICBwYWNrZXRsZW5ndGg7ICAgICAgICAgICAgICAvLyBUb3RhbCBwYWNrZXQgbGVuZ3RoOiBNdXN0IGVxdWFsIHRvIHN1bSBvZiBhbGwgRnJhZ0xlbmd0aAorCXUxNiAgICAgICAgICBmcmFnbGVuZ3RoOyAgICAgICAgICA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2VxdSB8ICBmcmFtZSAgfCAgZmNzIHwKKyAgICAgIHwgICAgICB8IHRpb24gfCAoQlNTSUQpIHwgICAgICAgICB8ICAgICAgICAgfCBlbmNlIHwgIGRhdGEgICB8ICAgICAgfAorICAgICAgYC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0nCitUb3RhbDogMjgtMjM0MCBieXRlcworKi8KKworLyogTWFuYWdlbWVudCBGcmFtZSBJbmZvcm1hdGlvbiBFbGVtZW50IFR5cGVzICovCitlbnVtIGllZWU4MDIxMV9tZmllIHsKKyAgICAgICAgTUZJRV9UWVBFX1NTSUQgPSAwLAorICAgICAgICBNRklFX1RZUEVfUkFURVMgPSAxLAorICAgICAgICBNRklFX1RZUEVfRkhfU0VUID0gMiwKKyAgICAgICAgTUZJRV9UWVBFX0RTX1NFVCA9IDMsCisgICAgICAgIE1GSUVfVFlQRV9DRl9TRVQgPSA0LAorICAgICAgICBNRklFX1RZUEVfVElNID0gNSwKKyAgICAgICAgTUZJRV9UWVBFX0lCU1NfU0VUID0gNiwKKyAgICAgICAgTUZJRV9UWVBFX0NPVU5UUlkgPSA3LAorICAgICAgICBNRklFX1RZUEVfSE9QX1BBUkFNUyA9IDgsCisgICAgICAgIE1GSUVfVFlQRV9IT1BfVEFCTEUgPSA5LAorICAgICAgICBNRklFX1RZUEVfUkVRVUVTVCA9IDEwLAorICAgICAgICBNRklFX1RZUEVfQ0hBTExFTkdFID0gMTYsCisgICAgICAgIE1GSUVfVFlQRV9QT1dFUl9DT05TVFJBSU5UID0gMzIsCisgICAgICAgIE1GSUVfVFlQRV9QT1dFUl9DQVBBQklMSVRZID0gMzMsCisgICAgICAgIE1GSUVfVFlQRV9UUENfUkVRVUVTVCA9IDM0LAorICAgICAgICBNRklFX1RZUEVfVFBDX1JFUE9SVCA9IDM1LAorICAgICAgICBNRklFX1RZUEVfU1VQUF9DSEFOTkVMUyA9IDM2LAorICAgICAgICBNRklFX1RZUEVfQ1NBID0gMzcsCisgICAgICAgIE1GSUVfVFlQRV9NRUFTVVJFX1JFUVVFU1QgPSAzOCwKKyAgICAgICAgTUZJRV9UWVBFX01FQVNVUkVfUkVQT1JUID0gMzksCisgICAgICAgIE1GSUVfVFlQRV9RVUlFVCA9IDQwLAorICAgICAgICBNRklFX1RZUEVfSUJTU19ERlMgPSA0MSwKKyAgICAgICAgTUZJRV9UWVBFX0VSUCA9IDQyLAorICAgICAgICBNRklFX1RZUEVfUlNOID0gNDgsCisgICAgICAgIE1GSUVfVFlQRV9SQVRFU19FWCA9IDUwLAorICAgICAgICBNRklFX1RZUEVfSFRfQ0FQPSA0NSwKKwkgTUZJRV9UWVBFX0hUX0lORk89IDYxLAorCSBNRklFX1RZUEVfQUlST05FVD0xMzMsCisgICAgICAgIE1GSUVfVFlQRV9HRU5FUklDID0gMjIxLAorICAgICAgICBNRklFX1RZUEVfUU9TX1BBUkFNRVRFUiA9IDIyMiwKK307CisKKy8qIE1pbmltYWwgaGVhZGVyOyBjYW4gYmUgdXNlZCBmb3IgcGFzc2luZyA4MDIuMTEgZnJhbWVzIHdpdGggc3VmZmljaWVudAorICogaW5mb3JtYXRpb24gdG8gZGV0ZXJtaW5lIHdoYXQgdHlwZSBvZiB1bmRlcmx5aW5nIGRhdGEgdHlwZSBpcyBhY3R1YWxseQorICogc3RvcmVkIGluIHRoZSBkYXRhLiAqLworc3RydWN0IGllZWU4MDIxMV9oZHIgeworICAgICAgICBfX2xlMTYgZnJhbWVfY3RsOworICAgICAgICBfX2xlMTYgZHVyYXRpb25faWQ7CisgICAgICAgIHU4IHBheWxvYWRbMF07Cit9IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTsKKworc3RydWN0IGllZWU4MDIxMV9oZHJfMWFkZHIgeworICAgICAgICBfX2xlMTYgZnJhbWVfY3RsOworICAgICAgICBfX2xlMTYgZHVyYXRpb25faWQ7CisgICAgICAgIHU4IGF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WFpbiByYXRlcyBpbmZvcm1hdGlvbiBlbGVtZW50Li4uICovCisjZGVmaW5lIE1BWF9SQVRFU19MRU5HVEggICAgICAgICAgICAgICAgICAoKHU4KTEyKQorI2RlZmluZSBNQVhfUkFURVNfRVhfTEVOR1RIICAgICAgICAgICAgICAgKCh1OCkxNikKKyNkZWZpbmUgTUFYX05FVFdPUktfQ09VTlQgICAgICAgICAgICAgICAgICAxMjgKKworI2RlZmluZSBNQVhfQ0hBTk5FTF9OVU1CRVIgICAgICAgICAgICAgICAgIDE2MQorI2RlZmluZSBJRUVFODAyMTFfU09GVE1BQ19TQ0FOX1RJTUUJICAgMTAwCisvLyhIWiAvIDIpCisjZGVmaW5lIElFRUU4MDIxMV9TT0ZUTUFDX0FTU09DX1JFVFJZX1RJTUUgKEhaICogMikKKworI2RlZmluZSBDUkNfTEVOR1RIICAgICAgICAgICAgICAgICA0VQorCisjZGVmaW5lIE1BWF9XUEFfSUVfTEVOIDY0CisKKyNkZWZpbmUgTkVUV09SS19FTVBUWV9FU1NJRCAoMTw8MCkKKyNkZWZpbmUgTkVUV09SS19IQVNfT0ZETSAgICAoMTw8MSkKKyNkZWZpbmUgTkVUV09SS19IQVNfQ0NLICAgICAoMTw8MikKKworLyogUW9TIHN0cnVjdHVyZSAqLworI2RlZmluZSBORVRXT1JLX0hBU19RT1NfUEFSQU1FVEVSUyAgICAgICgxPDwzKQorI2RlZmluZSBORVRXT1JLX0hBU19RT1NfSU5GT1JNQVRJT04gICAgICgxPDw0KQorI2RlZmluZSBORVRXT1JLX0hBU19RT1NfTUFTSyAgICAgICAgICAgIChORVRXT1JLX0hBU19RT1NfUEFSQU1FVEVSUyB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTkVUV09SS19IQVNfUU9TX0lORk9STUFUSU9OKQorLyogODAyLjExaCAqLworI2RlZmluZSBORVRXT1JLX0hBU19QT1dFUl9DT05TVFJBSU5UICAgICgxPDw1KQorI2RlZmluZSBORVRXT1JLX0hBU19DU0EgICAgICAgICAgICAgICAgICgxPDw2KQorI2RlZmluZSBORVRXT1JLX0hBU19RVUlFVCAgICAgICAgICAgICAgICgxPDw3KQorI2RlZmluZSBORVRXT1JLX0hBU19JQlNTX0RGUyAgICAgICAgICAgICgxPDw4KQorI2RlZmluZSBORVRXT1JLX0hBU19UUENfUkVQT1JUICAgICAgICAgICgxPDw5KQorCisjZGVmaW5lIE5FVFdPUktfSEFTX0VSUF9WQUxVRSAgICAgICAgICAgKDE8PDEwKQorCisjZGVmaW5lIFFPU19RVUVVRV9OVU0gICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBRT1NfT1VJX0xFTiAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUU9TX09VSV9UWVBFICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFPU19FTEVNRU5UX0lEICAgICAgICAgICAgICAgICAgMjIxCisjZGVmaW5lIFFPU19PVUlfSU5GT19TVUJfVFlQRSAgICAgICAgICAgMAorI2RlZmluZSBRT1NfT1VJX1BBUkFNX1NVQl9UWVBFICAgICAgICAgIDEKKyNkZWZpbmUgUU9TX1ZFUlNJT05fMSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFFPU19BSUZTTl9NSU5fVkFMVUUgICAgICAgICAgICAgMgorI2lmIDEKK3N0cnVjdCBpZWVlODAyMTFfcW9zX2luZm9ybWF0aW9uX2VsZW1lbnQgeworICAgICAgICB1OCBlbGVtZW50SUQ7CisgICAgICAgIHU4IGxlbmd0aDsKKyAgICAgICAgdTggcXVpW1FPU19PVUlfTEVOXTsKKyAgICAgICAgdTggcXVpX3R5cGU7CisgICAgICAgIHU4IHF1aV9zdWJ0eXBlOworICAgICAgICB1OCB2ZXJzaW9uOworICAgICAgICB1OCBhY19pbmZvOworfSBfX2F0dHJpYnV0ZV9fICgocGFja2VkKSk7CisKK3N0cnVjdCBpZWVlODAyMTFfcW9zX2FjX3BhcmFtZXRlciB7CisgICAgICAgIHU4IGFjaV9haWZzbjsKKyAgICAgICAgdTggZWN3X21pbl9tYXg7CisgICAgICAgIF9fbGUxNiB0eF9vcF9saW1pdDsKK30gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOworCitzdHJ1Y3QgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJfaW5mbyB7CisgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfcW9zX2luZm9ybWF0aW9uX2VsZW1lbnQgaW5mb19lbGVtZW50OworICAgICAgICB1OCByZXNlcnZlZDsKKyAgICAgICAgc3RydWN0IGllZWU4MDIxMV9xb3NfYWNfcGFyYW1ldGVyIGFjX3BhcmFtc19yZWNvcmRbUU9TX1FVRVVFX05VTV07Cit9IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTsKKworc3RydWN0IGllZWU4MDIxMV9xb3NfcGFyYW1ldGVycyB7CisgICAgICAgIF9fbGUxNiBjd19taW5bUU9TX1FVRVVFX05VTV07CisgICAgICAgIF9fbGUxNiBjd19tYXhbUU9TX1FVRVVFX05VTV07CisgICAgICAgIHU4IGFpZnNbUU9TX1FVRVVFX05VTV07CisgICAgICAgIHU4IGZsYWdbUU9TX1FVRVVFX05VTV07CisgICAgICAgIF9fbGUxNiB0eF9vcF9saW1pdFtRT1NfUVVFVUVfTlVNXTsKK30gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOworCitzdHJ1Y3QgaWVlZTgwMjExX3Fvc19kYXRhIHsKKyAgICAgICAgc3RydWN0IGllZWU4MDIxMV9xb3NfcGFyYW1ldGVycyBwYXJhbWV0ZXJzOworICAgICAgICBpbnQgYWN0aXZlOworICAgICAgICBpbnQgc3VwcG9ydGVkOworICAgICAgICB1OCBwYXJhbV9jb3VudDsKKyAgICAgICAgdTggb2xkX3BhcmFtX2NvdW50OworfTsKKworc3RydWN0IGllZWU4MDIxMV90aW1fcGFyYW1ldGVycyB7CisgICAgICAgIHU4IHRpbV9jb3VudDsKKyAgICAgICAgdTggdGltX3Bl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gdGgsIHUzMiB0bCk7CisJc2hvcnQgKCpwc19pc19xdWV1ZV9lbXB0eSkgKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpOworI2lmIDAKKwkvKiBUeXBpY2FsIFNUQSBtZXRob2RzICovCisgICAgICAgIGludCAoKmhhbmRsZV9hdXRoKSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9hdXRoICogYXV0aCk7CisgICAgICAgIGludCAoKmhhbmRsZV9kZWF1dGgpIChzdHJ1Y3QgbmV0X2RldmljZSAqIGRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfZGVhdXRoICogYXV0aCk7CisgICAgICAgIGludCAoKmhhbmRsZV9hY3Rpb24pIChzdHJ1Y3QgbmV0X2RldmljZSAqIGRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfYWN0aW9uICogYWN0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9yeF9zdGF0cyAqIHN0YXRzKTsKKyAgICAgICAgaW50ICgqaGFuZGxlX2Rpc2Fzc29jKSAoc3RydWN0IG5ldF9kZXZpY2UgKiBkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfZGlzYXNzb2MgKiBhc3NvYyk7CisjZW5kaWYKKyAgICAgICAgaW50ICgqaGFuZGxlX2JlYWNvbikgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2LCBzdHJ1Y3QgaWVlZTgwMjExX2JlYWNvbiAqIGJlYWNvbiwgc3RydWN0IGllZWU4MDIxMV9uZXR3b3JrICogbmV0d29yayk7CisjaWYgMAorICAgICAgICBpbnQgKCpoYW5kbGVfcHJvYmVfcmVzcG9uc2UpIChzdHJ1Y3QgbmV0X2RldmljZSAqIGRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9wcm9iZV9yZXNwb25zZSAqIHJlc3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqIG5ldHdvcmspOworICAgICAgICBpbnQgKCpoYW5kbGVfcHJvYmVfcmVxdWVzdCkgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfcHJvYmVfcmVxdWVzdCAqIHJlcSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3J4X3N0YXRzICogc3RhdHMpOworI2VuZGlmCisgICAgICAgIGludCAoKmhhbmRsZV9hc3NvY19yZXNwb25zZSkgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2LCBzdHJ1Y3QgaWVlZTgwMjExX2Fzc29jX3Jlc3BvbnNlX2ZyYW1lICogcmVzcCwgc3RydWN0IGllZWU4MDIxMV9uZXR3b3JrICogbmV0d29yayk7CisKKyNpZiAwCisgICAgICAgIC8qIFR5cGljYWwgQVAgbWV0aG9kcyAqLworICAgICAgICBpbnQgKCpoYW5kbGVfYXNzb2NfcmVxdWVzdCkgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2KTsKKyAgICAgICAgaW50ICgqaGFuZGxlX3JlYXNzb2NfcmVxdWVzdCkgKHN0cnVjdCBuZXRfZGV2aWNlICogZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9yZWFzc29jX3JlcXVlc3QgKiByZXEpOworI2VuZGlmCisKKwkvKiBjaGVjayB3aGV0aGVyIFR4IGh3IHJlc291Y2UgYXZhaWxhYmxlICovCisJc2hvcnQgKCpjaGVja19uaWNfZW5vdWd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dShoZHItPmZyYW1lX2N0bCkpKSB7CisgICAgICAgIGNhc2UgSUVFRTgwMjExXzFBRERSX0xFTjoKKyAgICAgICAgICAgICAgICByZXR1cm4gKChzdHJ1Y3QgaWVlZTgwMjExX2hkcl8xYWRkciAqKWhkciktPnBheWxvYWQ7CisgICAgICAgIGNhc2UgSUVFRTgwMjExXzJBRERSX0xFTjoKKyAgICAgICAgICAgICAgICByZXR1cm4gKChzdHJ1Y3QgaWVlZTgwMjExX2hkcl8yYWRkciAqKWhkciktPnBheWxvYWQ7CisgICAgICAgIGNhc2UgSUVFRTgwMjExXzNBRERSX0xFTjoKKyAgICAgICAgICAgICAgICByZXR1cm4gKChzdHJ1Y3QgaWVlZTgwMjExX2hkcl8zYWRkciAqKWhkciktPnBheWxvYWQ7CisgICAgICAgIGNhc2UgSUVFRTgwMjExXzRBRERSX0xFTjoKKyAgICAgICAgICAgICAgICByZXR1cm4gKChzdHJ1Y3QgaWVlZTgwMjExX2hkcl80YWRkciAqKWhkciktPnBheWxvYWQ7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIE5VTEw7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGllZWU4MDIxMV9pc19vZmRtX3JhdGUodTggcmF0ZSkKK3sKKyAgICAgICAgc3dpdGNoIChyYXRlICYgfklFRUU4MDIxMV9CQVNJQ19SQVRFX01BU0spIHsKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzZNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzlNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzEyTUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX09GRE1fUkFURV8xOE1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfMjRNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfT0ZETV9SQVRFXzM2TUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX09GRE1fUkFURV80OE1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9PRkRNX1JBVEVfNTRNQjoKKyAgICAgICAgICAgICAgICByZXR1cm4gMTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaWVlZTgwMjExX2lzX2Nja19yYXRlKHU4IHJhdGUpCit7CisgICAgICAgIHN3aXRjaCAocmF0ZSAmIH5JRUVFODAyMTFfQkFTSUNfUkFURV9NQVNLKSB7CisgICAgICAgIGNhc2UgSUVFRTgwMjExX0NDS19SQVRFXzFNQjoKKyAgICAgICAgY2FzZSBJRUVFODAyMTFfQ0NLX1JBVEVfMk1COgorICAgICAgICBjYXNlIElFRUU4MDIxMV9DQ0tfUkFURV81TUI6CisgICAgICAgIGNhc2UgSUVFRTgwMjExX0NDS19SQVRFXzExTUI6CisgICAgICAgICAgICAgICAgcmV0dXJuIDE7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKworLyogaWVlZTgwMjExLmMgKi8KK2V4dGVybiB2b2lkIGZyZWVfaWVlZTgwMjExKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpOworZXh0ZXJuIHN0cnVjdCBuZXRfZGV2aWNlICphbGxvY19pZWVlODAyMTEoaW50IHNpemVvZl9wcml2KTsKKworZXh0ZXJuIGludCBpZWVlODAyMTFfc2V0X2VuY3J5cHRpb24oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUpOworCisvKiBpZWVlODAyMTFfdHguYyAqLworCitleHRlcm4gaW50IGllZWU4MDIxMV9lbmNyeXB0X2ZyYWdtZW50KAorCXN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLAorCXN0cnVjdCBza19idWZmICpmcmFnLAorCWludCBoZHJfbGVuKTsKKworZXh0ZXJuIGludCBydGw4MTkyX2llZWU4MDIxMV94bWl0KHN0cnVjdCBza19idWZmICpza2IsCisJCQkgIHN0cnVjdCBuZX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wgY2hhciAqa2V5KTsKKyNpZiBXSVJFTEVTU19FWFQgPj0gMTgKK2V4dGVybiBpbnQgaWVlZTgwMjExX3d4X2dldF9lbmNvZGVfZXh0KHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSogd3JxdSwgY2hhciAqZXh0cmEpOworZXh0ZXJuIGludCBpZWVlODAyMTFfd3hfc2V0X2VuY29kZV9leHQoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhKiB3cnF1LCBjaGFyICpleHRyYSk7CitleHRlcm4gaW50IGllZWU4MDIxMV93eF9zZXRfYXV0aChzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19wYXJhbSAqZGF0YSwgY2hhciAqZXh0cmEpOworZXh0ZXJuIGludCBpZWVlODAyMTFfd3hfc2V0X21sbWUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhICp3cnF1LCBjaGFyICpleHRyYSk7CisjZW5kaWYKK2V4dGVybiBpbnQgaWVlZTgwMjExX3d4X3NldF9nZW5faWUo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gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRJRCwKKyAgICAgICAgVFJfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICBUeFJ4U2VsZWN0LCAgLy9SeDoxLCBUeDowCisgICAgICAgIGJvb2wgICAgICAgICAgICAgICAgICAgICAgICAgICAgYkFkZE5ld1RzCisgICAgICAgICk7CitleHRlcm4gdm9pZCBUU0luaXRpYWxpemUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUpOworZXh0ZXJuICB2b2lkIFRzU3RhcnRBZGRCYVByb2Nlc3Moc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUsIFBUWF9UU19SRUNPUkQgICBwVHhUUyk7CitleHRlcm4gdm9pZCBSZW1vdmVQZWVyVFMoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUsIHU4KiBBZGRyKTsKK2V4dGVybiB2b2lkIFJlbW92ZUFsbFRTKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiBpZWVlKTsKK3ZvaWQgaWVlZTgwMjExX3NvZnRtYWNfc2Nhbl9zeW5jcm8oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUpOworCitleHRlcm4gY29uc3QgbG9uZyBpZWVlODAyMTFfd2xhbl9mcmVxdWVuY2llc1tdOworCitleHRlcm4gaW5saW5lIHZvaWQgaWVlZTgwMjExX2luY3JlbWVudF9zY2FucyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSkKK3sKKwlpZWVlLT5zY2FucysrOworfQorCitleHRlcm4gaW5saW5lIGludCBpZWVlODAyMTFfZ2V0X3NjYW5zKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlKQoreworCXJldHVybiBpZWVlLT5zY2FuczsKK30KKworc3RhdGljIGlubGluZSBjb25zdCBjaGFyICplc2NhcGVfZXNzaWQoY29uc3QgY2hhciAqZXNzaWQsIHU4IGVzc2lkX2xlbikgeworCXN0YXRpYyBjaGFyIGV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BmYWlsOworCW1lbXNldChwcml2LCAwLCBzaXplb2YoKnByaXYpKTsKKwlwcml2LT5rZXlfaWR4ID0ga2V5aWR4OworCisjaWYoKExJTlVYX1ZFUlNJT05fQ09ERSA8IEtFUk5FTF9WRVJTSU9OKDIsNiwyMSkpICYmICghT1BFTlNVU0VfU0xFRCkpCisJcHJpdi0+dGZtID0gY3J5cHRvX2FsbG9jX3RmbSgiYXJjNCIsIDApOworCWlmIChwcml2LT50Zm0gPT0gTlVMTCkgeworCQlwcmludGsoS0VSTl9ERUJVRyAiaWVlZTgwMjExX2NyeXB0X3dlcDogY291bGQgbm90IGFsbG9jYXRlICIKKwkJICAgICAgICJjcnlwdG8gQVBJIGFyYzRcbiIpOworCQlnb3RvIGZhaWw7CisJfQorCSNlbHNlCisJcHJpdi0+dHhfdGZtID0gY3J5cHRvX2FsbG9jX2Jsa2NpcGhlcigiZWNiKGFyYzQpIiwgMCwgQ1JZUFRPX0FMR19BU1lOQyk7CisgICAgICAgIGlmIChJU19FUlIocHJpdi0+dHhfdGZtKSkgeworICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX0RFQlVHICJpZWVlODAyMTFfY3J5cHRfd2VwOiBjb3VsZCBub3QgYWxsb2NhdGUgIgorICAgICAgICAgICAgICAgICAgICAgICAiY3J5cHRvIEFQSSBhcmM0XG4iKTsKKyAgICAgICAgICAgICAgICBwcml2LT50eF90Zm0gPSBOVUxMOworICAgICAgICAgICAgICAgIGdvdG8gZmFpbDsKKyAgICAgICAgfQorICAgICAgICBwcml2LT5yeF90Zm0gPSBjcnlwdG9fYWxsb2NfYmxrY2lwaGVyKCJlY2IoYXJjNCkiLCAwLCBDUllQVE9fQUxHX0FTWU5DKTsKKyAgICAgICAgaWYgKElTX0VSUihwcml2LT5yeF90Zm0pKSB7CisgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fREVCVUcgImllZWU4MDIxMV9jcnlwdF93ZXA6IGNvdWxkIG5vdCBhbGxvY2F0ZSAiCisgICAgICAgICAgICAgICAgICAgICAgICJjcnlwdG8gQVBJIGFyYzRcbiIpOworICAgICAgICAgICAgICAgIHByaXYtPnJ4X3RmbSA9IE5VTEw7CisgICAgICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisgICAgICAgICNlbmRpZgorCisJLyogc3RhcnQgV0VQIElWIGZyb20gYSByYW5kb20gdmFsdWUgKi8KKwlnZXRfcmFuZG9tX2J5dGVzKCZwcml2LT5pdiwgNCk7CisKKwlyZXR1cm4gcHJpdjsKKworZmFpbDoKKyNpZigoTElOVVhfVkVSU0lPTl9DT0RFIDwgS0VSTkVMX1ZFUlNJT04oMiw2LDIxKSkgJiYgKCFPUEVOU1VTRV9TTEVEKSkKKwlpZiAocHJpdikgeworCQlpZiAocHJpdi0+dGZtKQorCQkJY3J5cHRvX2ZyZWVfdGZtKHByaXYtPnRmbSk7CisJCWtmcmVlKHByaXYpOworCX0KKwkjZWxzZQorCWlmIChwcml2KSB7CisgICAgICAgICAgICAgICAgaWYgKHByaXYtPnR4X3RmbSkKKyAgICAgICAgICAgICAgICAgICAgICAgIGNyeXB0b19mcmVlX2Jsa2NpcGhlcihwcml2LT50eF90Zm0pOworICAgICAgICAgICAgICAgIGlmIChwcml2LT5yeF90Zm0pCisgICAgICAgICAgICAgICAgICAgICAgICBjcnlwdG9fZnJlZV9ibGtjaXBoZXIocHJpdi0+cnhfdGZtKTsKKyAgICAgICAgICAgICAgICBrZnJlZShwcml2KTsKKyAgICAgICAgfQorICAgICAgICAjZW5kaWYKKwlyZXR1cm4gTlVMTDsKK30KKworCitzdGF0aWMgdm9pZCBwcmlzbTJfd2VwX2RlaW5pdCh2b2lkICpwcml2KQoreworCXN0cnVjdCBwcmlzbTJfd2VwX2RhdGEgKl9wcml2ID0gcHJpdjsKKyNpZigoTElOVVhfVkVSU0lPTl9DT0RFIDwgS0VSTkVMX1ZFUlNJT04oMiw2LDIxKSkgJiYgKCFPUEVOU1VTRV9TTEVEKSkKKwlpZiAoX3Bya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NAorCitzdGF0aWMgdTggcW9zX291aVtRT1NfT1VJX0xFTl0gPSB7IDB4MDAsIDB4NTAsIDB4RjIgfTsKKworLyoKKyogTWFrZSB0aGVyIHN0cnVjdHVyZSB3ZSByZWFkIGZyb20gdGhlIGJlYWNvbiBwYWNrZXQgaGFzCisqIHRoZSByaWdodCB2YWx1ZXMKKyovCitzdGF0aWMgaW50IGllZWU4MDIxMV92ZXJpZnlfcW9zX2luZm8oc3RydWN0IGllZWU4MDIxMV9xb3NfaW5mb3JtYXRpb25fZWxlbWVudAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbmZvX2VsZW1lbnQsIGludCBzdWJfdHlwZSkKK3sKKworICAgICAgICBpZiAoaW5mb19lbGVtZW50LT5xdWlfc3VidHlwZSAhPSBzdWJfdHlwZSkKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIGlmIChtZW1jbXAoaW5mb19lbGVtZW50LT5xdWksIHFvc19vdWksIFFPU19PVUlfTEVOKSkKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIGlmIChpbmZvX2VsZW1lbnQtPnF1aV90eXBlICE9IFFPU19PVUlfVFlQRSkKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIGlmIChpbmZvX2VsZW1lbnQtPnZlcnNpb24gIT0gUU9TX1ZFUlNJT05fMSkKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKworLyoKKyAqIFBhcnNlIGEgUW9TIHBhcmFtZXRlciBlbGVtZW50CisgKi8KK3N0YXRpYyBpbnQgaWVlZTgwMjExX3JlYWRfcW9zX3BhcmFtX2VsZW1lbnQoc3RydWN0IGllZWU4MDIxMV9xb3NfcGFyYW1ldGVyX2luZm8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmVsZW1lbnRfcGFyYW0sIHN0cnVjdCBpZWVlODAyMTFfaW5mb19lbGVtZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICppbmZvX2VsZW1lbnQpCit7CisgICAgICAgIGludCByZXQgPSAwOworICAgICAgICB1MTYgc2l6ZSA9IHNpemVvZihzdHJ1Y3QgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJfaW5mbykgLSAyOworCisgICAgICAgIGlmICgoaW5mb19lbGVtZW50ID09IE5VTEwpIHx8IChlbGVtZW50X3BhcmFtID09IE5VTEwpKQorICAgICAgICAgICAgICAgIHJldHVybiAtMTsKKworICAgICAgICBpZiAoaW5mb19lbGVtZW50LT5pZCA9PSBRT1NfRUxFTUVOVF9JRCAmJiBpbmZvX2VsZW1lbnQtPmxlbiA9PSBzaXplKSB7CisgICAgICAgICAgICAgICAgbWVtY3B5KGVsZW1lbnRfcGFyYW0tPmluZm9fZWxlbWVudC5xdWksIGluZm9fZWxlbWVudC0+ZGF0YSwKKyAgICAgICAgICAgICAgICAgICAgICAgaW5mb19lbGVtZW50LT5sZW4pOworICAgICAgICAgICAgICAgIGVsZW1lbnRfcGFyYW0tPmluZm9fZWxlbWVudC5lbGVtZW50SUQgPSBpbmZvX2VsZW1lbnQtPmlkOworICAgICAgICAgICAgICAgIGVsZW1lbnRfcGFyYW0tPmluZm9fZWxlbWVudC5sZW5ndGggPSBpbmZvX2VsZW1lbnQtPmxlbjsKKyAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgcmV0ID0gLTE7CisgICAgICAgIGlmIChyZXQgPT0gMCkKKyAgICAgICAgICAgICAgICByZXQgPSBpZWVlODAyMTFfdmVyaWZ5X3Fvc19pbmZvKCZlbGVtZW50X3BhcmFtLT5pbmZvX2VsZW1lbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRT1NfT1VJX1BBUkFNX1NVQl9UWVBFKTsKKyAgICAgICAgcmV0dXJuIHJldDsKK30KKworLyoKKyAqIFBhcnNlIGEgUW9TIGluZm9ybWF0aW9uIGVsZW1lbnQKKyAqLworc3RhdGljIGludCBpZWVlODAyMTFfcmVhZF9xb3NfaW5mb19lbGVtZW50KHN0cnVjdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGllZWU4MDIxMV9xb3NfaW5mb3JtYXRpb25fZWxlbWVudAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICplbGVtZW50X2luZm8sIHN0cnVjdCBpZWVlODAyMTFfaW5mb19lbGVtZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKmluZm9fZWxlbWVudCkKK3sKKyAgICAgICAgaW50IHJldCA9IDA7CisgICAgICAgIHUxNiBzaXplID0gc2l6ZW9mKHN0cnVjdCBpZWVlODAyMTFfcW9zX2luZm9ybWF0aW9uX2VsZW1lbnQpIC0gMjsKKworICAgICAgICBpZiAoZWxlbWVudF9pbmZvID09IE5VTEwpCisgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICBpZiAoaW5mb19lbGVtZW50ID09IE5VTEwpCisgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworCisgICAgICAgIGlmICgoaW5mb19lbGVtZW50LT5pZCA9PSBRT1NfRUxFTUVOVF9JRCkgJiYgKGluZm9fZWxlbWVudC0+bGVuID09IHNpemUpKSB7CisgICAgICAgICAgICAgICAgbWVtY3B5KGVsZW1lbnRfaW5mby0+cXVpLCBpbmZvX2VsZW1lbnQtPmRhdGEsCisgICAgICAgICAgICAgICAgICAgICAgIGluZm9fZWxlbWVudC0+bGVuKTsKKyAgICAgICAgICAgICAgICBlbGVtZW50X2luZm8tPmVsZW1lbnRJRCA9IGluZm9fZWxlbWVudC0+aWQ7CisgICAgICAgICAgICAgICAgZWxlbWVudF9pbmZvLT5sZW5ndGggPSBpbmZvX2VsZW1lbnQtPmxlbjsKKyAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgcmV0ID0gLTE7CisKKyAgICAgICAgaWYgKHJldCA9PSAwKQorICAgICAgICAgICAgICAgIHJldCA9IGllZWU4MDIxMV92ZXJpZnlfcW9zX2luZm8oZWxlbWVudF9pbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUU9TX09VSV9JTkZPX1NVQl9UWVBFKTsKKyAgICAgICAgcmV0dXJuIHJldDsKK30KKworCisvKgorICogV3JpdGUgUW9TIHBhcmFtZXRlcnMgZnJvbSB0aGUgYWMgcGFyYW1ldGVycy4KKyAqLworc3RhdGljIGludCBpZWVlODAyMTFfcW9zX2NvbnZlcnRfYWNfdG9fcGFyYW1ldGVycyhzdHJ1Y3QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJfaW5mbworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGFyYW1fZWxtLCBzdHJ1Y3QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpxb3NfcGFyYW0pCit7CisgICAgICAgIGludCByYyA9IDA7CisgICAgICAgIGludCBpOworICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3Fvc19hY19wYXJhbWV0ZXIgKmFjX3BhcmFtczsKKwl1OCBhY2k7CisgICAgICAgIC8vdTggY3dfbWluOworICAgICAgICAvL3U4IGN3X21heDsKKworICAgICAgICBmb3IgKGkgPSAwOyBpIDwgUU9TX1FVRVVFX05VTTsgaSsrKSB7CisgICAgICAgICAgICAgICAgYWNfcGFyYW1zID0gJihwYXJhbV9lbG0tPmFjX3BhcmFtc19yZWNvcmRbaV0pOworCisJCWFjaSA9IChhY19wYXJhbXMtPmFjaV9haWZzbiAmIDB4NjApID4+IDU7CisKKwkJaWYoYWNpID49IFFPU19RVUVVRV9OVU0pCisJCQljb250aW51ZTsKKyAgICAgICAgICAgICAgICBxb3NfcGFyYW0tPmFpZnNbYWNpXSA9IChhY19wYXJhbXMtPmFjaV9haWZzbikgJiAweDBmOworCisJCS8qIFdNTSBzcGVjIFAuMTE6IFRoZSBtaW5pbXVtIHZhbHVlIGZvciBBSUZTTiBzaGFsbCBiZSAyICovCisgICAgICAgICAgICAgICAgcW9zX3BhcmFtLT5haWZzW2FjaV0gPSAocW9zX3BhcmFtLT5haWZzW2FjaV0gPCAyKSA/IDI6cW9zX3BhcmFtLT5haWZzW2FjaV07CisKKyAgICAgICAgICAgICAgICBxb3NfcGFyYW0tPmN3X21pblthY2ldID0gYWNfcGFyYW1zLT5lY3dfbWluX21heCAmIDB4MEY7CisKKyAgICAgICAgICAgICAgICBxb3NfcGFyYW0tPmN3X21heFthY2ldID0gKGFjX3BhcmFtcy0+ZWN3X21pbl9tYXggJiAweEYwKSA+PiA0OworCisgICAgICAgICAgICAgICAgcW9zX3BhcmFtLT5mbGFnW2FjaV0gPQorICAgICAgICAgICAgICAgICAgICAoYWNfcGFyYW1zLT5hY2lfYWlmc24gJiAweDEwKSA/IDB4MDEgOiAweDAwOworICAgICAgICAgICAgICAgIHFvc19wYXJhbS0+dHhfb3BfbGltaXRbYWNpXSA9IGxlMTZfdG9fY3B1KGFjX3BhcmFtcy0+dHhfb3BfbGltaXQpOworICAgICAgICB9CisgICAgICAgIHJldHVybiByYzsKK30KKworLyoKKyAqIHdlIGhhdmUgYSBnZW5lcmljIGRhdGEgZWxlbWVudCB3aGljaCBpdCBtYXkgY29udGFpbiBRb1MgaW5mb3JtYXRpb24gb3IKKyAqIHBhcmFtZXRlcnMgZWxlbWVudC4gY2hlY2sgdGhlIGluZm9ybWF0aW9uIGVsZW1lbnQgbGVuZ3RoIHRvIGRlY2lkZQorICogd2hpY2ggdHlwZSB0byByZWFkCisgKi8KK3N0YXRpYyBpbnQgaWVlZTgwMjExX3BhcnNlX3Fvc19pbmZvX3BhcmFtX0lFKHN0cnVjdCBpZWVlODAyMTFfaW5mb19lbGVtZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqaW5mb19lbGVtZW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9uZXR3b3JrICpuZXR3b3JrKQoreworICAgICAgICBpbnQgcmMgPSAwOworICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJzICpxb3NfcGFyYW0gPSBOVUxMOworICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3Fvc19pbmZvcm1hdGlvbl9lbGVtZW50IHFvc19pbmZvX2VsZW1lbnQ7CisKKyAgICAgICAgcmMgPSBpZWVlODAyMTFfcmVhZF9xb3NfaW5mb19lbGVtZW50KCZxb3NfaW5mb19lbGVtZW50LCBpbmZvX2VsZW1lbnQpOworCisgICAgICAgIGlmIChyYyA9PSAwKSB7CisgICAgICAgICAgICAgICAgbmV0d29yay0+cW9zX2RhdGEucGFyYW1fY291bnQgPSBxb3NfaW5mb19lbGVtZW50LmFjX2luZm8gJiAweDBGOworICAgICAgICAgICAgICAgIG5ldHdvcmstPmZsYWdzIHw9IE5FVFdPUktfSEFTX1FPU19JTkZPUk1BVElPTjsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3Fvc19wYXJhbWV0ZXJfaW5mbyBwYXJhbV9lbGVtZW50OworCisgICAgICAgICAgICAgICAgcmMgPSBpZWVlODAyMTFfcmVhZF9xb3NfcGFyYW1fZWxlbWVudCgmcGFyYW1fZWxlbWVudCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm9fZWxlbWVudCk7CisgICAgICAgICAgICAgICAgaWYgKHJjID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHFvc19wYXJhbSA9ICYobmV0d29yay0+cW9zX2RhdGEucGFyYW1ldGVycyk7CisgICAgICAgICAgICAgICAgICAgICAgICBpZWVlODAyMTFfcW9zX2NvbnZlcnRfYWNfdG9fcGFyYW1ldGVycygmcGFyYW1fZWxlbWVudCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFvc19wYXJhbSk7CisgICAgICAgICAgICAgICAgICAgICAgICBuZXR3b3JrLT5mbGFncyB8PSBORVRXT1JLX0hBU19RT1NfUEFSQU1FVEVSUzsKKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldHdvcmstPnFvc19kYXRhLnBhcmFtX2NvdW50ID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbV9lbGVtZW50LmluZm9fZWxlbWVudC5hY19pbmZvICYgMHgwRjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAocmMgPT0gMCkgeworICAgICAgICAgICAgICAgIElFRUU4MDIxMV9ERUJVR19RT1MoIlFvUyBpcyBzdXBwb3J0ZWRcbiIpOworICAgICAgICAgICAgICAgIG5ldHdvcmstPnFvc19kYXRhLnN1cHBvcnRlZCA9IDE7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHJjOworfQorCisjaWZkZWYgQ09ORklHX0lFRUU4MDIxMV9ERUJVRworI2RlZmluZSBNRklFX1NUUklORyh4KSBjYXNlIE1GSUVfVFlQRV8gIyN4OiByZXR1cm4gI3gKKworc3RhdGljIGNvbnN0IGNoYXIgKmdldF9pbmZvX2VsZW1lbnRfc3RyaW5nKHUxNiBpZCkKK3sKKyAgICAgICAgc3dpdGNoIChpZCkgeworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKFNTSUQpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKFJBVEVTKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhGSF9TRVQpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKERTX1NFVCk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoQ0ZfU0VUKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhUSU0pOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKElCU1NfU0VUKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhDT1VOVFJZKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhIT1BfUEFSQU1TKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhIT1BfVEFCTEUpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKFJFUVVFU1QpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKENIQUxMRU5HRSk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoUE9XRVJfQ09OU1RSQUlOVCk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoUE9XRVJfQ0FQQUJJTElUWSk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoVFBDX1JFUVVFU1QpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKFRQQ19SRVBPUlQpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKFNVUFBfQ0hBTk5FTFMpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKENTQSk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoTUVBU1VSRV9SRVFVRVNUKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklORyhNRUFTVVJFX1JFUE9SVCk7CisgICAgICAgICAgICAgICAgTUZJRV9TVFJJTkcoUVVJRVQpOworICAgICAgICAgICAgICAgIE1GSUVfU1RSSU5HKElCU1NfREZTKTsKKyAgICAgICAgICAgICAgIC8vIE1GSUVfU1RSSU5HKEVSUF9JTkZPKTsKKyAgICAgICAgICAgICAgICBNRklFX1NUUklOR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rLT5yYXRlc19leF9sZW4pOworCQkJYnJlYWs7CisKKwkJY2FzZSBNRklFX1RZUEVfRFNfU0VUOgorCQkJSUVFRTgwMjExX0RFQlVHX01HTVQoIk1GSUVfVFlQRV9EU19TRVQ6ICVkXG4iLAorCQkJCQkgICAgIGluZm9fZWxlbWVudC0+ZGF0YVswXSk7CisJCQluZXR3b3JrLT5jaGFubmVsID0gaW5mb19lbGVtZW50LT5kYXRhWzBdOworCQkJYnJlYWs7CisKKwkJY2FzZSBNRklFX1RZUEVfRkhfU0VUOgorCQkJSUVFRTgwMjExX0RFQlVHX01HTVQoIk1GSUVfVFlQRV9GSF9TRVQ6IGlnbm9yZWRcbiIpOworCQkJYnJlYWs7CisKKwkJY2FzZSBNRklFX1RZUEVfQ0ZfU0VUOgorCQkJSUVFRTgwMjExX0RFQlVHX01HTVQoIk1GSUVfVFlQRV9DRl9TRVQ6IGlnbm9yZWRcbiIpOworCQkJYnJlYWs7CisKKwkJY2FzZSBNRklFX1RZUEVfVElNOgorCQkJaWYoaW5mb19lbGVtZW50LT5sZW4gPCA0KQorCQkJCWJyZWFrOworCisJCQluZXR3b3JrLT50aW0udGltX2NvdW50ID0gaW5mb19lbGVtZW50LT5kYXRhWzBdOworCQkJbmV0d29yay0+dGltLnRpbV9wZXJpb2QgPSBpbmZvX2VsZW1lbnQtPmRhdGFbMV07CisKKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldHdvcmstPmR0aW1fcGVyaW9kID0gaW5mb19lbGVtZW50LT5kYXRhWzFdOworICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWVlZS0+c3RhdGUgIT0gSUVFRTgwMjExX0xJTktFRCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisjaWYgMAorICAgICAgICAgICAgICAgICAgICAgICAgbmV0d29yay0+bGFzdF9kdGltX3N0YV90aW1lWzBdID0gc3RhdHMtPm1hY190aW1lWzBdOworI2Vsc2UKKwkJCS8vd2UgdXNlIGppZmZpZXMgZm9yIGxlZ2FjeSBQb3dlciBzYXZlCisJCQluZXR3b3JrLT5sYXN0X2R0aW1fc3RhX3RpbWVbMF0gPSBqaWZmaWVzOworI2VuZGlmCisgICAgICAgICAgICAgICAgICAgICAgICBuZXR3b3JrLT5sYXN0X2R0aW1fc3RhX3RpbWVbMV0gPSBzdGF0cy0+bWFjX3RpbWVbMV07CisKKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldHdvcmstPmR0aW1fZGF0YSA9IElFRUU4MDIxMV9EVElNX1ZBTElEOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZihpbmZvX2VsZW1lbnQtPmRhdGFbMF0gIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmKGluZm9fZWxlbWVudC0+ZGF0YVsyXSAmIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldHdvcmstPmR0aW1fZGF0YSB8PSBJRUVFODAyMTFfRFRJTV9NQkNBU1Q7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IChpbmZvX2VsZW1lbnQtPmRhdGFbMl0gPj4gMSkqMjsKKworICAgICAgICAgICAgICAgICAgICAgICAgLy9wcmludGsoIm9mZnNldDE6JXggYWlkOiV4XG4iLG9mZnNldCwgaWVlZS0+YXNzb2NfaWQpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZihpZWVlLT5hc3NvY19pZCA8IDgqb2Zmc2V0IHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGllZWUtPmFzc29jX2lkID4gOCoob2Zmc2V0ICsgaW5mb19lbGVtZW50LT5sZW4gLTMpKQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAoaWVlZS0+YXNzb2NfaWQgLyA4KSAtIG9mZnNldDsvLyArICgoYWlkICUgOC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orCQkJCQkgICAgIGluZm9fZWxlbWVudC0+bGVuKTsKKwkJCWlmICghaWVlZTgwMjExX3BhcnNlX3Fvc19pbmZvX3BhcmFtX0lFKGluZm9fZWxlbWVudCwKKwkJCQkJCQkgICAgICAgbmV0d29yaykpCisJCQkJYnJlYWs7CisKKwkJCWlmIChpbmZvX2VsZW1lbnQtPmxlbiA+PSA0ICYmCisJCQkgICAgaW5mb19lbGVtZW50LT5kYXRhWzBdID09IDB4MDAgJiYKKwkJCSAgICBpbmZvX2VsZW1lbnQtPmRhdGFbMV0gPT0gMHg1MCAmJgorCQkJICAgIGluZm9fZWxlbWVudC0+ZGF0YVsyXSA9PSAweGYyICYmCisJCQkgICAgaW5mb19lbGVtZW50LT5kYXRhWzNdID09IDB4MDEpIHsKKwkJCQluZXR3b3JrLT53cGFfaWVfbGVuID0gbWluKGluZm9fZWxlbWVudC0+bGVuICsgMiwKKwkJCQkJCQkgIE1BWF9XUEFfSUVfTEVOKTsKKwkJCQltZW1jcHkobmV0d29yay0+d3BhX2llLCBpbmZvX2VsZW1lbnQsCisJCQkJICAgICAgIG5ldHdvcmstPndwYV9pZV9sZW4pOworCQkJCWJyZWFrOworCQkJfQorCisjaWZkZWYgVEhPTUFTX1RVUkJPCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5mb19lbGVtZW50LT5sZW4gPT0gNyAmJgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm9fZWxlbWVudC0+ZGF0YVswXSA9PSAweDAwICYmCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mb19lbGVtZW50LT5kYXRhWzFdID09IDB4ZTAgJiYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvX2VsZW1lbnQtPmRhdGFbMl0gPT0gMHg0YyAmJgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm9fZWxlbWVudC0+ZGF0YVszXSA9PSAweDAxICYmCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mb19lbGV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pOworCisJdGFnICs9IHNzaWRfbGVuOworCisJKih0YWcrKykgPSBNRklFX1RZUEVfUkFURVM7CisJKih0YWcrKykgPSByYXRlX2xlbi0yOworCW1lbWNweSh0YWcsaWVlZS0+Y3VycmVudF9uZXR3b3JrLnJhdGVzLHJhdGVfbGVuLTIpOworCXRhZys9cmF0ZV9sZW4tMjsKKworCSoodGFnKyspID0gTUZJRV9UWVBFX0RTX1NFVDsKKwkqKHRhZysrKSA9IDE7CisJKih0YWcrKykgPSBpZWVlLT5jdXJyZW50X25ldHdvcmsuY2hhbm5lbDsKKworCWlmKGF0aW1fbGVuKXsKKwl1MTYgdmFsMTY7CisJCSoodGFnKyspID0gTUZJRV9UWVBFX0lCU1NfU0VUOworCQkqKHRhZysrKSA9IDI7CisJCS8vKigodTE2KikodGFnKSkgPSBjcHVfdG9fbGUxNihpZWVlLT5jdXJyZW50X25ldHdvcmsuYXRpbV93aW5kb3cpOworCQkgdmFsMTYgPSBjcHVfdG9fbGUxNihpZWVlLT5jdXJyZW50X25ldHdvcmsuYXRpbV93aW5kb3cpOworCQltZW1jcHkoKHU4ICopdGFnLCAodTggKikmdmFsMTYsIDIpOworCQl0YWcrPTI7CisJfQorCisJaWYoZXJwX2xlbil7CisJCSoodGFnKyspID0gTUZJRV9UWVBFX0VSUDsKKwkJKih0YWcrKykgPSAxOworCQkqKHRhZysrKSA9IGVycGluZm9fY29udGVudDsKKwl9CisjaWYgMAorCS8vSW5jbHVkZSBIaWdoIFRocm91cHV0IGNhcGFiaWxpdHkKKworCSoodGFnKyspID0gTUZJRV9UWVBFX0hUX0NBUDsKKwkqKHRhZysrKSA9IHRtcF9odF9jYXBfbGVuIC0gMjsKKwltZW1jcHkodGFnLCB0bXBfaHRfY2FwX2J1ZiwgdG1wX2h0X2NhcF9sZW4gLSAyKTsKKwl0YWcgKz0gdG1wX2h0X2NhcF9sZW4gLSAyOworI2VuZGlmCisJaWYocmF0ZV9leF9sZW4peworCQkqKHRhZysrKSA9IE1GSU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mRpZgorCisJdXAoJmllZWUtPnd4X3NlbSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU3RhcnQgb2YgV1BBIGNvZGUuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiB0aGlzIGlzIHN0b2xlbiBmcm9tIHRoZSBpcHcyMjAwIGRyaXZlciAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCitzdGF0aWMgaW50IGllZWU4MDIxMV93cGFfZW5hYmxlKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLCBpbnQgdmFsdWUpCit7CisJLyogVGhpcyBpcyBjYWxsZWQgd2hlbiB3cGFfc3VwcGxpY2FudCBsb2FkcyBhbmQgY2xvc2VzIHRoZSBkcml2ZXIKKwkgKiBpbnRlcmZhY2UuICovCisJcHJpbnRrKCIlcyBXUEFcbiIsdmFsdWUgPyAiZW5hYmxpbmciIDogImRpc2FibGluZyIpOworCWllZWUtPndwYV9lbmFibGVkID0gdmFsdWU7CisJbWVtc2V0KGllZWUtPmFwX21hY19hZGRyLCAwLCA2KTsgLy9yZXNldCBhcF9tYWNfYWRkciBldmVyeXRpbWUgaXQgc3RhcnRzIHdwYS4KKwlyZXR1cm4gMDsKK30KKworCit2b2lkIGllZWU4MDIxMV93cGFfYXNzb2NfZnJhbWUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsIGNoYXIgKndwYV9pZSwgaW50IHdwYV9pZV9sZW4pCit7CisJLyogbWFrZSBzdXJlIFdQQSBpcyBlbmFibGVkICovCisJaWVlZTgwMjExX3dwYV9lbmFibGUoaWVlZSwgMSk7CisKKwlpZWVlODAyMTFfZGlzYXNzb2NpYXRlKGllZWUpOworfQorCisKK3N0YXRpYyBpbnQgaWVlZTgwMjExX3dwYV9tbG1lKHN0cnVjd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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLScKKwkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL1wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cis4MDIuMTEgRGF0YSBGcmFtZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAsLS0tLS0tLS0tICdjdHJsJyBleHBhbmRzIHRvID4tLS0tLS0tLS0tLScKKyAgICAgICAgICB8CisgICAgICAsLS0nLS0tLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0uCitCeXRlcyB8ICAyICAgfCAgMiAgIHwgICAgNiAgICB8ICAgIDYgICAgfCAgICA2ICAgIHwgIDIgICB8IDAuLjIzMTIgfCAgIDQgIHwKKyAgICAgIHwtLS0tLS18LS0tLS0tfC0tLS0tLS0tLXwtLS0tLS0tLS18LS0tLS0tLS0tfC0tLS0tLXwtLS0tLS0tLS18LS0tLS0tfAorRGVzYy4gfCBjdHJsIHwgZHVyYSB8ICBEQS9SQSAgfCAgIFRBICAgIHwgICAgU0EgICB8IFNlcXUgfCAgRnJhbWUgIHwgIGZjcyB8CisgICAgICB8ICAgICAgfCB0aW9uIHwgKEJTU0lEKSB8ICAgICAgICAgfCAgICAgICAgIHwgZW5jZSB8ICBkYXRhICAgfCAgICAgIHwKKyAgICAgIGAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwgICAgICAgICB8LS0tLS0tJworVG90YWw6IDI4IG5vbi1kYXRhIGJ5dGVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYC0tLS0uLS0tLScKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgIC4tICdGcmFtZSBkYXRhJyBleHBhbmRzIHRvIDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0nCisgICAgICAgfAorICAgICAgIFYKKyAgICAgICwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0uCitCeXRlcyB8ICAxICAgfCAgMSAgIHwgICAgMSAgICB8ICAgIDMgICAgIHwgIDIgICB8ICAwLTIzMDQgfAorICAgICAgfC0tLS0tLXwtLS0tLS18LS0tLS0tLS0tfC0tLS0tLS0tLS18LS0tLS0tfC0tLS0tLS0tLXwKK0Rlc2MuIHwgU05BUCB8IFNOQVAgfCBDb250cm9sIHxFdGggVHVubmVsfCBUeXBlIHwgSVAgICAgICB8CisgICAgICB8IERTQVAgfCBTU0FQIHwgICAgICAgICB8ICAgICAgICAgIHwgICAgICB8IFBhY2tldCAgfAorICAgICAgfCAweEFBIHwgMHhBQSB8MHgwMyAoVUkpfDB4MDAtMDAtRjh8ICAgICAgfCAgICAgICAgIHwKKyAgICAgIGAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwgICAgICAgICB8CitUb3RhbDogOCBub24tZGF0YSBieXRlcyAgICAgICAgICAgICAgICAgICAgICAgICBgLS0tLS4tLS0tJworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgLi0gJ0lQIFBhY2tldCcgZXhwYW5kcywgaWYgV0VQIGVuYWJsZWQsIHRvIDwtLScKKyAgICAgICB8CisgICAgICAgVgorICAgICAgLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLgorQnl0ZXMgfCAgNCAgfCAgIDAtMjI5NiAgfCAgNCAgfAorICAgICAgfC0tLS0tfC0tLS0tLS0tLS0tfC0tLS0tfAorRGVzYy4gfCBJViAgfCBFbmNyeXB0ZWQgfCBJQ1YgfAorICAgICAgfCA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ExJTlVYX1ZFUlNJT05fQ09ERSA+IEtFUk5FTF9WRVJTSU9OKDIsNCwyMCkpICYmIChMSU5VWF9WRVJTSU9OX0NPREUgPCBLRVJORUxfVkVSU0lPTigyLDUsMCkpCitzdGF0aWMgaW5saW5lIGNoYXIgKgoraXdlX3N0cmVhbV9hZGRfZXZlbnRfcnNsKGNoYXIgKiAgICAgc3RyZWFtLCAgICAgICAgIC8qIFN0cmVhbSBvZiBldmVudHMgKi8KKyAgICAgICAgICAgICAgICAgICAgIGNoYXIgKiAgICAgZW5kcywgICAgICAgICAgIC8qIEVuZCBvZiBzdHJlYW0gKi8KKyAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19ldmVudCAqaXdlLCAgICAgIC8qIFBheWxvYWQgKi8KKyAgICAgICAgICAgICAgICAgICAgIGludCAgICAgICAgZXZlbnRfbGVuKSAgICAgIC8qIFJlYWwgc2l6ZSBvZiBwYXlsb2FkICovCit7CisgICAgICAgIC8qIENoZWNrIGlmIGl0J3MgcG9zc2libGUgKi8KKyAgICAgICAgaWYoKHN0cmVhbSArIGV2ZW50X2xlbikgPCBlbmRzKSB7CisgICAgICAgICAgICAgICAgaXdlLT5sZW4gPSBldmVudF9sZW47CisJCW5kZWxheSgxKTsgICAvL25ldworICAgICAgICAgICAgICAgIG1lbWNweShzdHJlYW0sIChjaGFyICopIGl3ZSwgZXZlbnRfbGVuKTsKKyAgICAgICAgICAgICAgICBzdHJlYW0gKz0gZXZlbnRfbGVuOworICAgICAgICB9CisgICAgICAgIHJldHVybiBzdHJlYW07Cit9CisjZWxzZQorI2RlZmluZSBpd2Vfc3RyZWFtX2FkZF9ldmVudF9yc2wgaXdlX3N0cmVhbV9hZGRfZXZlbnQKKyNlbmRpZgorCisjZGVmaW5lIE1BWF9DVVNUT01fTEVOIDY0CitzdGF0aWMgaW5saW5lIGNoYXIgKnJ0bDgxOXhfdHJhbnNsYXRlX3NjYW4oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZ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jdCBpZWVlODAyMTFfY3J5cHRfZGF0YSAqKmNyeXB0OworCisgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfc2VjdXJpdHkgc2VjID0geworICAgICAgICAgICAgICAgIC5mbGFncyA9IDAsCisgICAgICAgIH07CisJLy9wcmludGsoIj09PT09PT5lbmNvZGluZyBmbGFnOiV4LGV4dCBmbGFnOiV4LCBleHQgYWxnOiVkXG4iLCBlbmNvZGluZy0+ZmxhZ3MsZXh0LT5leHRfZmxhZ3MsIGV4dC0+YWxnKTsKKyAgICAgICAgaWR4ID0gZW5jb2RpbmctPmZsYWdzICYgSVdfRU5DT0RFX0lOREVYOworICAgICAgICBpZiAoaWR4KSB7CisgICAgICAgICAgICAgICAgaWYgKGlkeCA8IDEgfHwgaWR4ID4gV0VQX0tFWVMpCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKKyAgICAgICAgICAgICAgICBpZHgtLTsKKyAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgaWR4ID0gaWVlZS0+dHhfa2V5aWR4OworCisgICAgICAgIGlmIChleHQtPmV4dF9mbGFncyAmIElXX0VOQ09ERV9FWFRfR1JPVVBfS0VZKSB7CisKKyAgICAgICAgICAgICAgICBjcnlwdCA9ICZpZWVlLT5jcnlwdFtpZHhdOworCisgICAgICAgICAgICAgICAgZ3JvdXBfa2V5ID0gMTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvKiBzb21lIENpc2NvIEFQcyB1c2UgaWR4PjAgZm9yIHVuaWNhc3QgaW4gZHluYW1pYyBXRVAgKi8KKwkJLy9wcmludGsoIm5vdCBncm91cCBrZXksIGZsYWdzOiV4LCBleHQtPmFsZzolZFxuIiwgZXh0LT5leHRfZmxhZ3MsIGV4dC0+YWxnKTsKKyAgICAgICAgICAgICAgICBpZiAoaWR4ICE9IDAgJiYgZXh0LT5hbGcgIT0gSVdfRU5DT0RFX0FMR19XRVApCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKKyAgICAgICAgICAgICAgICBpZiAoaWVlZS0+aXdfbW9kZSA9PSBJV19NT0RFX0lORlJBKQorCisgICAgICAgICAgICAgICAgICAgICAgICBjcnlwdCA9ICZpZWVlLT5jcnlwdFtpZHhdOworCisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgIH0KKworICAgICAgICBzZWMuZmxhZ3MgfD0gU0VDX0VOQUJMRUQ7Ly8gfCBTRUNfRU5DUllQVDsKKyAgICAgICAgaWYgKChlbmNvZGluZy0+ZmxhZ3MgJiBJV19FTkNPREVfRElTQUJMRUQpIHx8CisgICAgICAgICAgICBleHQtPmFsZyA9PSBJV19FTkNPREVfQUxHX05PTkUpIHsKKyAgICAgICAgICAgICAgICBpZiAoKmNyeXB0KQorICAgICAgICAgICAgICAgICAgICAgICAgaWVlZTgwMjExX2NyeXB0X2RlbGF5ZWRfZGVpbml0KGllZWUsIGNyeXB0KTsKKworICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBXRVBfS0VZUzsgaSsrKQorCisJCQlpZiAoaWVlZS0+Y3J5cHRbaV0gIT0gTlVMTCkKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGlmIChpID09IFdFUF9LRVlTKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBzZWMuZW5hYmxlZCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgLy8gIHNlYy5lbmNyeXB0ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNlYy5sZXZlbCA9IFNFQ19MRVZFTF8wOworICAgICAgICAgICAgICAgICAgICAgICAgc2VjLmZsYWdzIHw9IFNFQ19MRVZFTDsKKyAgICAgICAgICAgICAgICB9CisJCS8vcHJpbnRrKCJkaXNhYmxlZDogZmxhZzoleFxuIiwgZW5jb2RpbmctPmZsYWdzKTsKKyAgICAgICAgICAgICAgICBnb3RvIGRvbmU7CisgICAgICAgIH0KKworCXNlYy5lbmFibGVkID0gMTsKKyAgICAvLyAgICBzZWMuZW5jcnlwdCA9IDE7CisjaWYgMAorICAgICAgICBpZiAoZ3JvdXBfa2V5ID8gIWllZWUtPmhvc3RfbWNfZGVjcnlwdCA6CisgICAgICAgICAgICAhKGllZWUtPmhvc3RfZW5jcnlwdCB8fCBpZWVlLT5ob3N0X2RlY3J5cHQgfHwKKyAgICAgICAgICAgICAgaWVlZS0+aG9zdF9lbmNyeXB0X21zZHUpKQorICAgICAgICAgICAgICAgIGdvdG8gc2tpcF9ob3N0X2NyeXB0OworI2VuZGlmCisgICAgICAgIHN3aXRjaCAoZXh0LT5hbGcpIHsKKyAgICAgICAgY2FzZSBJV19FTkNPREVfQUxHX1dFUDoKKyAgICAgICAgICAgICAgICBhbGcgPSAiV0VQIjsKKyAgICAgICAgICAgICAgICBtb2R1bGUgPSAiaWVlZTgwMjExX2NyeXB0X3dlcCI7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgSVdfRU5DT0RFX0FMR19US0lQOgorICAgICAgICAgICAgICAgIGFsZyA9ICJUS0lQIjsKKyAgICAgICAgICAgICAgICBtb2R1bGUgPSAiaWVlZTgwMjExX2NyeXB0X3RraXAiOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIElXX0VOQ09ERV9BTEdfQ0NNUDoKKyAgICAgICAgICAgICAgICBhbGcgPSAiQ0NNUCI7CisgICAgICAgICAgICAgICAgbW9kdWxlID0gImllZWU4MDIxMV9jcnlwdF9jY21wIjsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBJRUVFODAyMTFfREVCVUdfV1goIiVzOiB1bmtub3duIGNyeXB0byBhbGcgJWRcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldi0+bmFtZSwgZXh0LT5hbGcpOworICAgICAgICAgICAgICAgIHJldCA9IC1FSU5WQUw7CisgICAgICAgICAgICAgICAgZ290byBkb25lOworICAgICAgICB9CisJcHJpbnRrKCJhbGcgbmFtZTolc1xuIixhbGcpOworCisJIG9wcyA9IGllZWU4MDIxMV9nZXRfY3J5cHRvX29wcyhhbGcpOworICAgICAgICBpZiAob3BzID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICByZXF1ZXN0X21vZHVsZSgiJXMiLCBtb2R1bGUpOworICAgICAgICAgICAgICAgIG9wcyA9IGllZWU4MDIxMV9nZXRfY3J5cHRvX29wcyhhbGcpOworICAgICAgICB9CisgICAgICAgIGlmIChvcHMgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgIElFRUU4MDIxMV9ERUJVR19XWCgiJXM6IHVua25vd24gY3J5cHRvIGFsZyAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2LT5uYW1lLCBleHQtPmFsZyk7CisJCXByaW50aygiPT09PT09PT0+dW5rbm93biBjcnlwdG8gYWxnICVkXG4iLCBleHQtPmFsZyk7CisgICAgICAgICAgICAgICAgcmV0ID0gLUVJTlZBTDsKKyAgICAgICAgICAgICAgICBnb3RvIGRvbmU7CisgICAgICAgIH0KKworICAgICAgICBpZiAoKmNyeXB0ID09IE5VTEwgfHwgKCpjcnlwdCktPm9wcyAhPSBvcHMpIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX2NyeXB0X2RhdGEgKm5ld19jcnlwdDsKKworICAgICAgICAgICAgICAgIGllZWU4MDIxMV9jcnlwdF9kZWxheWVkX2RlaW5pdChpZWVlLCBjcnlwdCk7CisKKyNpZiAoTElOVVhfVkVSU0lPTl9DT0RFID4gS0VSTkVMX1ZFUlNJT04oMiw2LDEzKSkKKyAgICAgICAgICAgICAgICBuZXdfY3J5cHQgPSBremFsbG9jKHNpemVvZigqbmV3X2NyeXB0KSwgR0ZQX0tFUk5FTCk7CisjZWxzZQorICAgICAgICAgICAgICAgIG5ld19jcnlwdCA9IGttYWxsb2Moc2l6ZW9mKCpuZXdfY3J5cHQpLCBHRlBfS0VSTkVMKTsKKwkJbWVtc2V0KG5ld19jcnlwdCwwLHNpemVvZigqbmV3X2NyeXB0KSk7CisjZW5kaWYKKyAgICAgICAgICAgICAgICBpZiAobmV3X2NyeXB0ID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9IC1FTk9NRU07CisgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGRvbmU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIG5ld19jcnlwdC0+b3BzID0gb3BzOworICAgICAgICAgICAgICAgIGlmIChuZXdfY3J5cHQtPm9wcyAmJiB0cnlfbW9kdWxlX2dldChuZXdfY3J5cHQtPm9wcy0+b3duZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NyeXB0LT5wcml2ID0gbmV3X2NyeXB0LT5vcHMtPmluaXQoaWR4KTsKKyAgICAgICAgICAgICAgICBpZiAobmV3X2NyeXB0LT5wcml2ID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGtmcmVlKG5ld19jcnlwdCk7CisgICAgICAgICAgICAgICAgICAgICAgICByZXQgPSAtRUlOVkFMOworICAgICAgICAgICAgICAgICAgICAgICAgZ290byBkb25lOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAqY3J5cHQgPSBuZXdfY3J5cHQ7CisKKyAJfQorCisgICAgICAgIGlmIChleHQtPmtleV9sZW4gPiAwICYmICgqY3J5cHQpLT5vcHMtPnNldF9rZXkgJiYKKyAgICAgICAgICAgICgqY3J5cHQpLT5vcHMtPnNldF9rZXkoZXh0LT5rZXksIGV4dC0+a2V5X2xlbiwgZXh0LT5yeF9zZXEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgqY3J5cHQpLT5wcml2KSA8IDApIHsKKyAgICAgICAgICAgICAgICBJRUVFODAyMTFfREVCVUdfV1goIiVzOiBrZXkgc2V0dGluZyBmYWlsZWRcbiIsIGRldi0+bmFtZSk7CisJCXByaW50aygia2V5IHNldHRpbmcgZmFpbGVkXG4iKTsKKyAgICAgICAgICAgICAgICByZXQgPSAtRUlOVkFMOworICAgICAgICAgICAgICAgIGdvdG8gZG9uZTsKKyAgICAgICAgfQorI2lmIDEKKyAvL3NraXBfaG9zdF9jcnlwdDoKKwkvL3ByaW50aygic2tpcF9ob3N0X2NyeXB0OmV4dF9mbGFnczoleFxuIiwgZXh0LT5leHRfZmxhZ3MpOworICAgICAgICBpZiAoZXh0LT5leHRfZmxhZ3MgJiBJV19FTkNPREVfRVhUX1NFVF9UWF9LRVkpIHsKKyAgICAgICAgICAgICAgICBpZWVlLT50eF9rZXlpZHggPSBpZHg7CisgICAgICAgICAgICAgICAgc2VjLmFjdGl2ZV9rZXkgPSBpZHg7CisgICAgICAgICAgICAgICAgc2VjLmZsYWdzIHw9IFNFQ19BQ1RJVkVfS0VZOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGV4dC0+YWxnICE9IElXX0VOQ09ERV9BTEdfTk9ORSkgeworICAgICAgICAgICAgICAgIC8vbWVtY3B5KHNlYy5rZXlzW2lkeF0sIGV4dC0+a2V5LCBleHQtPmtleV9sZW4pOworICAgICAgICAgICAgICAgIHNlYy5rZXlfc2l6ZXNbaWR4XSA9IGV4dC0+a2V5X2xlbjsKKyAgICAgICAgICAgICAgICBzZWMuZmxhZ3MgfD0gKDEgPDwgaWR4KTsKKyAgICAgICAgICAgICAgICBpZiAoZXh0LT5hbGcgPT0gSVdfRU5DT0RFX0FMR19XRVApIHsKKyAgICAgICAgICAgICAgICAgICAgICAvLyAgc2VjLmVuY29kZV9hbGdbaWR4XSA9IFNFQ19BTEdfV0VQOworICAgICAgICAgICAgICAgICAgICAgICAgc2VjLmZsYWdzIHw9IFNFQ19MRVZFTDsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNlYy5sZXZlbCA9IFNFQ19MRVZFTF8xOworICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXh0LT5hbGcgPT0gSVdfRU5DT0RFX0FMR19US0lQKSB7CisgICAgICAgICAgICAgICAgICAgICAgLy8gIHNlYy5lbmNvZGVfYWxnW2lkeF0gPSBTRUNfQUxHX1RLSVA7CisgICAgICAgICAgICAgICAgICAgICAgICBzZWMuZmxhZ3MgfD0gU0VDX0xFVkVMOworICAgICAgICAgICAgICAgICAgICAgICAgc2VjLmxldmVsID0gU0VDX0xFVkVMXzI7CisgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChleHQtPmFsZyA9PSBJV19FTkNPREVfQUxHX0NDTVApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgLy8gc2VjLmVuY29kZV9hbGdbaWR4XSA9IFNFQ19BTEdfQ0NNUDsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNlYy5mbGFncyB8PSBTRUNfTEVWRUw7CisgICAgICAgICAgICAgICAgICAgICAgICBzZWMubGV2ZWwgPSBTRUNfTEVWRUxfMzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgLyogRG9uJ3Qgc2V0IHNlYyBsZXZlbCBmb3IgZ3JvdXAga2V5cy4gKi8KKyAgICAgICAgICAgICAgICBpZiAoZ3JvdXBfa2V5KQorICAgICAgICAgICAgICAgICAgICAgICAgc2VjLmZsYWdzICY9IH5TRUNfTEVWRUw7CisgICAgICAgIH0KKyNlbmRpZgorZG9uZToKKyAgICAgICAgaWYgKGllZWUtPnNldF9zZWN1cml0eSkKKyAgICAgICAgICAgICAgICBpZWVlLT5zZXRfc2VjdXJpdHkoaWVlZS0+ZGV2LCAmc2VjKTsKKworCSBpZiAoaWVlZS0+cmVzZXRfb25fa2V5Y2hhbmdlICYmCisgICAgICAgICAgICBpZWVlLT5pd19tb2RlICE9IElXX01PREVfSU5GUkEgJiYKKyAgICAgICAgICAgIGllZWUtPnJlc2V0X3BvcnQgJiYgaWV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ElXX0FVVEhfSU5ERVgpIHsKKyAgICAgICAgY2FzZSBJV19BVVRIX1dQQV9WRVJTSU9OOgorCSAgICAgLypuZWVkIHRvIHN1cHBvcnQgd3BhMiBoZXJlKi8KKwkJLy9wcmludGsoIndwYSB2ZXJzaW9uOiV4XG4iLCBkYXRhLT52YWx1ZSk7CisJCWJyZWFrOworICAgICAgICBjYXNlIElXX0FVVEhfQ0lQSEVSX1BBSVJXSVNFOgorICAgICAgICBjYXNlIElXX0FVVEhfQ0lQSEVSX0dST1VQOgorICAgICAgICBjYXNlIElXX0FVVEhfS0VZX01HTVQ6CisgICAgICAgICAgICAgICAgLyoKKyAqICAgICAgICAgICAgICAgICAgKiBIb3N0IEFQIGRyaXZlciBkb2VzIG5vdCB1c2UgdGhlc2UgcGFyYW1ldGVycyBhbmQgYWxsb3dzCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiB3cGFfc3VwcGxpY2FudCB0byBjb250cm9sIHRoZW0gaW50ZXJuYWxseS4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgSVdfQVVUSF9US0lQX0NPVU5URVJNRUFTVVJFUzoKKyAgICAgICAgICAgICAgICBpZWVlLT50a2lwX2NvdW50ZXJtZWFzdXJlcyA9IGRhdGEtPnZhbHVlOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIElXX0FVVEhfRFJPUF9VTkVOQ1JZUFRFRDoKKyAgICAgICAgICAgICAgICBpZWVlLT5kcm9wX3VuZW5jcnlwdGVkID0gZGF0YS0+dmFsdWU7CisJCWJyZWFrOworCisJY2FzZSBJV19BVVRIXzgwMjExX0FVVEhfQUxHOgorCQkvL3ByaW50aygiPT09PT09PiVzKCk6ZGF0YS0+dmFsdWUgaXMgJWRcbiIsX19GVU5DVElPTl9fLGRhdGEtPnZhbHVlKTsKKwkvLwl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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVGhpcyBmaWxlIGlzIGNyZWF0ZWQgdG8gcHJvY2VzcyBCQSBBY3Rpb24gRnJhbWUuIEFjY29yZGluZyB0byA4MDIuMTEgc3BlYywgdGhlcmUgYXJlIDMgQkEgYWN0aW9uIHR5cGVzIGF0IGFsbC4gQW5kIGFzIEJBIGlzCisgKiByZWxhdGVkIHRvIFRTLCB0aGlzIHBhcnQgbmVlZCBzb21lIHN0cnV0dXJlIGRlZmluZWQgaW4gUU9TIHNpZGUgY29kZS4gQWxzbyBUWCBSWCBpcyBnb2luZyB0byBiZSByZXN0dXJjdHVyZWQsIHNvIGhvdyB0byBzZW5kCisgKiBBRERCQVJFUSBBRERCQVJTUCBhbmQgREVMQkEgcGFja2V0IGlzIHN0aWxsIG9uIGNvbnNpZGVyYXRpb24uIFRlbXBvcmFyaWx5IHVzZSBNQU5BR0UgUVVFVUUgaW5zdGVhZCBvZiBOb3JtYWwgUXVldWUuCisgKiBXQiAyMDA4LTA1LTI3CisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpbmNsdWRlICJpZWVlODAyMTEuaCIKKyNpbmNsdWRlICJydGw4MTl4X0JBLmgiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIEFjdGl2YXRlIEJBIGVudHJ5LiBBbmQgaWYgVGltZSBpcyBub3plcm8sIHN0YXJ0IHRpbWVyLgorICogICBpbnB1dDogIFBCQV9SRUNPUkQgCQlwQkEgIC8vQkEgZW50cnkgdG8gYmUgZW5hYmxlZAorICogICAJICAgICB1MTYgCQkJVGltZSAvL2luZGljYXRlIHRpbWUgZGVsYXkuCisgKiAgb3V0cHV0OiAgbm9uZQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIEFjdGl2YXRlQkFFbnRyeShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgUEJBX1JFQ09SRCBwQkEsIHUxNiBUaW1lKQoreworCXBCQS0+YlZhbGlkID0gdHJ1ZTsKKwlpZihUaW1lICE9IDApCisJCW1vZF90aW1lcigmcEJBLT5UaW1lciwgamlmZmllcyArIE1TRUNTKFRpbWUpKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgZGVhY3RpdmF0ZSBCQSBlbnRyeSwgaW5jbHVkaW5nIGl0cyB0aW1lci4KKyAqICAgaW5wdXQ6ICBQQkFfUkVDT1JEIAkJcEJBICAvL0JBIGVudHJ5IHRvIGJlIGRpc2FibGVkCisgKiAgb3V0cHV0OiAgbm9uZQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIERlQWN0aXZhdGVCQUVudHJ5KCBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgUEJBX1JFQ09SRCBwQkEpCit7CisJcEJBLT5iVmFsaWQgPSBmYWxzZTsKKwlkZWxfdGltZXJfc3luYygmcEJBLT5UaW1lcik7Cit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246IGRlYWN0aXZldGUgQkEgZW50cnkgaW4gVHggVHMsIGFuZCBzZW5kIERFTEJBLgorICogICBpbnB1dDoKKyAqICAgCSAgICAgUFRYX1RTX1JFQ09SRAkJcFR4VHMgLy9UeCBUcyB3aGljaCBpcyB0byBkZWFjdGl2YXRlIEJBIGVudHJ5LgorICogIG91dHB1dDogIG5vbmUKKyAqICBub3RpY2U6ICBBcyBQVFhfVFNfUkVDT1JEIHN0cnVjdHVyZSB3aWxsIGJlIGRlZmluZWQgaW4gUU9TLCBzbyB3YWl0IHRvIGJlIG1lcmdlZC4gLy9GSVhNRQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit1OCBUeFRzRGVsZXRlQkEoIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiBpZWVlLCBQVFhfVFNfUkVDT1JECXBUeFRzKQoreworCVBCQV9SRUNPUkQJCXBBZG1pdHRlZEJhID0gJnBUeFRzLT5UeEFkbWl0dGVkQkFSZWNvcmQ7ICAvL1RoZXNlIHR3byBCQSBlbnRyaWVzIG11c3QgZXhpc3QgaW4gVFMgc3RydWN0dXJlCisJUEJBX1JFQ09SRAkJcFBlbmRpbmdCYSA9ICZwVHhUcy0+VHhQZW5kaW5nQkFSZWNvcmQ7CisJdTgJCQliU2VuZERFTEJBID0gZmFsc2U7CisKKwkvLyBEZWxldGUgcGVuZGluZyBCQQorCWlmKHBQZW5kaW5nQmEtPmJWYWxpZCkKKwl7CisJCURlQWN0aXZhdGVCQUVudHJ5KGllZWUsIHBQZW5kaW5nQmEpOworCQliU2VuZERFTEJBID0gdHJ1ZTsKKwl9CisKKwkvLyBEZWxldGUgYWRtaXR0ZWQgQkEKKwlpZihwQWRtaXR0ZWRCYS0+YlZhbGlkKQorCXsKKwkJRGVBY3RpdmF0ZUJBRW50cnkoaWVlZSwgcEFkbWl0dGVkQmEpOworCQliU2VuZERFTEJBID0gdHJ1ZTsKKwl9CisKKwlyZXR1cm4gYlNlbmRERUxCQTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiBkZWFjdGl2ZXRlIEJBIGVudHJ5IGluIFR4IFRzLCBhbmQgc2VuZCBERUxCQS4KKyAqICAgaW5wdXQ6CisgKiAgIAkgICAgIFBSWF9UU19SRUNPUkQJCXBSeFRzIC8vUnggVHMgd2hpY2ggaXMgdG8gZGVhY3RpdmF0ZSBCQSBlbnRyeS4KKyAqICBvdXRwdXQ6ICBub25lCisgKiAgbm90aWNlOiAgQXMgUFJYX1RTX1JFQ09SRCBzdHJ1Y3R1cmUgd2lsbCBiZSBkZWZpbmVkIGluIFFPUywgc28gd2FpdCB0byBiZSBtZXJnZWQuIC8vRklYTUUsIHNhbWUgd2l0aCBhYm92ZQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit1OCBSeFRzRGVsZXRlQkEoIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiBpZWVlLCBQUlhfVFNfUkVDT1JECXBSeFRzKQoreworCVBCQV9SRUNPUkQJCXBCYSA9ICZwUnhUcy0+UnhBZG1pdHRlZEJBUmVjb3JkOworCXU4CQkJYlNlbmRERUxCQSA9IGZhbHNlOworCisJaWYocEJhLT5iVmFsaWQpCisJeworCQlEZUFjdGl2YXRlQkFFbnRyeShpZWVlLCBwQmEpOworCQliU2VuZERFTEJBID0gdHJ1ZTsKKwl9CisKKwlyZXR1cm4gYlNlbmRERUxCQTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiByZXNldCBCQSBlbnRyeQorICogICBpbnB1dDoKKyAqICAgCSAgICAgUEJBX1JFQ09SRAkJcEJBIC8vZW50cnkgdG8gYmUgcmVzZXQKKyAqICBvdXRwdXQ6ICBub25lCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgUmVzZXRCYUVudHJ5KCBQQkFfUkVDT1JEIHBCQSkKK3sKKwlwQkEtPmJWYWxpZAkJCT0gZmFsc2U7CisJcEJBLT5CYVBhcmFtU2V0LnNob3J0RGF0YQk9IDA7CisJcEJBLT5CYVRpbWVvdXRWYWx1ZQkJPSAwOworCXBCQS0+RGlhbG9nVG9rZW4JCT0gMDsKKwlwQkEtPkJhU3RhcnRTZXFDdHJsLlNob3J0RGF0YQk9IDA7Cit9CisvL1RoZXNlIGZ1bmN0aW9ucyBuZWVkIHBvcnRpbmcgaGVyZSBvciBub3Q/CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIGNvbnN0cnVjdCBBRERCQVJFUSBhbmQgQUREQkFSU1AgZnJhbWUgaGVyZSB0b2dldGhlci4KKyAqICAgaW5wdXQ6ICB1OCogCQlEc3QgCS8vQUREQkEg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ltZW91dCBWYWx1ZQorCXRtcCA9IGNwdV90b19sZTE2KHBCQS0+QmFUaW1lb3V0VmFsdWUpOworCW1lbWNweSh0YWcsICh1OCopJnRtcCwgMik7CisJdGFnICs9IDI7CisKKwlpZiAoQUNUX0FEREJBUkVRID09IHR5cGUpCisJeworCS8vIEJBIFN0YXJ0IFNlcUN0cmwKKwkJbWVtY3B5KHRhZywodTgqKSYocEJBLT5CYVN0YXJ0U2VxQ3RybCksIDIpOworCQl0YWcgKz0gMjsKKwl9CisKKwlJRUVFODAyMTFfREVCVUdfREFUQShJRUVFODAyMTFfRExfREFUQXxJRUVFODAyMTFfRExfQkEsIHNrYi0+ZGF0YSwgc2tiLT5sZW4pOworCXJldHVybiBza2I7CisJLy9yZXR1cm4gTlVMTDsKK30KKworI2lmIDAgLy9JIHRyeSB0byBtZXJnZSBBRERCQV9SRVEgYW5kIEFEREJBX1JTUCBmcmFtZXMgdG9nZXRoZXIuLgorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgY29uc3RydWN0IEFEREJBUkVRIGZyYW1lCisgKiAgIGlucHV0OiAgdTgqIAkJZHN0IAkvL0FEREJBUnNwIGZyYW1lJ3MgZGVzdGluYXRpb24KKyAqICAgCSAgICAgUEJBX1JFQ09SRCAJcEJBCS8vQkFfUkVDT1JEIGVudHJ5IHdoaWNoIHN0b3JlcyB0aGUgbmVjZXNzYXJ5IGluZm9ybWF0aW9uIGZvciBCQV9SU1AuCisgKiAgIAkgICAgIHUxNiAJCVN0YXR1c0NvZGUgIC8vc3RhdHVzIGNvZGUuCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIHNrX2J1ZmYqIAkJc2tiICAgICAvL3JldHVybiBjb25zdHJ1Y3RlZCBza2IgdG8geG1pdAorKioqKioqKioq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NrZXRBcHBlbmREYXRhKCZvc0FEREJBRnJhbWUsIHRtcCk7CisKKwkqcExlbmd0aCA9IG9zQUREQkFGcmFtZS5MZW5ndGg7Cit9CisjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgY29uc3RydWN0IERFTEJBIGZyYW1lCisgKiAgIGlucHV0OiAgdTgqIAkJZHN0IAkvL0RFTEJBIGZyYW1lJ3MgZGVzdGluYXRpb24KKyAqICAgCSAgICAgUEJBX1JFQ09SRCAJcEJBCS8vQkFfUkVDT1JEIGVudHJ5IHdoaWNoIHN0b3JlcyB0aGUgbmVjZXNzYXJ5IGluZm9ybWF0aW9uIGZvciBCQQorICogICAJICAgICBUUl9TRUxFQ1QJICAgICAgICBUeFJ4U2VsZWN0ICAvL1RYIFJYIGRpcmVjdGlvbgorICogICAJICAgICB1MTYgCQlSZWFzb25Db2RlICAvL3N0YXR1cyBjb2RlLgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBza19idWZmKiAJCXNrYiAgICAgLy9yZXR1cm4gY29uc3RydWN0ZWQgc2tiIHRvIHhtaXQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBza19idWZmKiBpZWVlODAyMTFfREVMQkEoCisJc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUsCisJdTgqCQkgICAgICAgICBkc3QsCisJUEJBX1JFQ09SRAkJIHBCQSwKKwlUUl9TRUxFQ1QJCSBUeFJ4U2VsZWN0LAorCXUxNgkJCSBSZWFzb25Db2RlCisJKQoreworCURFTEJBX1BBUkFNX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QkEsICI8PT09PT0lcygpXG4iLCBfX0ZVTkNUSU9OX18pOworCXJldHVybiBza2I7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogc2VuZCBBRERCQVJlcSBmcmFtZSBvdXQKKyAqICAgaW5wdXQ6ICB1OCogCQlkc3QgCS8vQUREQkFSZXEgZnJhbWUncyBkZXN0aW5hdGlvbgorICogICAJICAgICBQQkFfUkVDT1JEIAlwQkEJLy9CQV9SRUNPUkQgZW50cnkgd2hpY2ggc3RvcmVzIHRoZSBuZWNlc3NhcnkgaW5mb3JtYXRpb24gZm9yIEJBCisgKiAgb3V0cHV0OiAgbm9uZQorICogIG5vdGljZTogSWYgYW55IHBvc3NpYmxlLCBwbGVhc2UgaGlkZSBwQkEgaW4gaWVlZS4gQW5kIHRlbXBvcmFyaWx5IHVzZSBNYW5hZ2UgUXVldWUgYXMgc29mdG1hY19tZ210X3htaXQoKSB1c3VhbGx5IGRvZXMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBpZWVlODAyMTFfc2VuZF9BRERCQVJlcShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgdTgqCWRzdCwgUEJBX1JFQ09SRAlwQkEpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYiA9IE5VTEw7CisJc2tiID0gaWVlZTgwMjExX0FEREJBKGllZWUsIGRzdCwgcEJBLCAwLCBBQ1RfQUREQkFSRVEpOyAvL2NvbnN0cnVjdCBBQ1RfQUREQkFSRVEgZnJhbWVzIHNvIHNldCBzdGF0dXNjb2RlIHplcm8uCisKKwlpZiAoc2ti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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIGllZWU4MDIxMV9zZW5kX0FEREJBUnNwKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiBpZWVlLCB1OCogZHN0LCBQQkFfUkVDT1JEIHBCQSwgdTE2IFN0YXR1c0NvZGUpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYiA9IE5VTEw7CisJc2tiID0gaWVlZTgwMjExX0FEREJBKGllZWUsIGRzdCwgcEJBLCBTdGF0dXNDb2RlLCBBQ1RfQUREQkFSU1ApOyAvL2NvbnN0cnVjdCBBQ1RfQUREQkFSU1AgZnJhbWVzCisJaWYgKHNrYikKKwl7CisJCXNvZnRtYWNfbWdtdF94bWl0KHNrYiwgaWVlZSk7CisJCS8vc2FtZSBhYm92ZQorCX0KKwllbHNlCisJeworCQlJRUVFODAyMTFfREVCVUcoSUVFRTgwMjExX0RMX0VSUiwgImFsbG9jIHNrYiBlcnJvciBpbiBmdW5jdGlvbiAlcygpXG4iLCBfX0ZVTkNUSU9OX18pOworCX0KKworCXJldHVybjsKKworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiBzZW5kIEFEREJBUlNQIGZyYW1lIG91dAorICogICBpbnB1dDogIHU4KiAJCWRzdCAJLy9ERUxCQSBmcmFtZSdzIGRlc3RpbmF0aW9uCisgKiAgIAkgICAgIFBCQV9SRUNPUkQgCXBCQQkvL0JBX1JFQ09SRCBlbnRyeSB3aGljaCBzdG9yZXMgdGhlIG5lY2Vzc2FyeSBpbmZvcm1hdGlvbiBmb3IgQkEKKyAqICAgCSAgICAgVFJfU0VMRUNUICAgICAgICAgIFR4UnhTZWxlY3QgLy9UWCBvciBSWAorICogICAJICAgICB1MTYJCVJlYXNvbkNvZGUgLy9ERUwgUmVhc29uQ29kZQorICogIG91dHB1dDogIG5vbmUKKyAqICBub3RpY2U6IElmIGFueSBwb3NzaWJsZSwgcGxlYXNlIGhpZGUgcEJBIGluIGllZWUuIEFuZCB0ZW1wb3JhcmlseSB1c2UgTWFuYWdlIFF1ZXVlIGFzIHNvZnRtYWNfbWdtdF94bWl0KCkgdXN1YWxseSBkb2VzCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBpZWVlODAyMTFfc2VuZF9ERUxCQShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgdTgqIGRzdCwgUEJBX1JFQ09SRCBwQkEsIFRSX1NFTEVDVCBUeFJ4U2VsZWN0LCB1MTYgUmVhc29uQ29kZSkKK3sKKwlzdHJ1Y3Qgc2tfYnVmZiAqc2tiID0gTlVMTDsKKwlza2IgPSBpZWVlODAyMTFfREVMQkEoaWVlZSwgZHN0LCBwQkEsIFR4UnhTZWxlY3QsIFJlYXNvbkNvZGUpOyAvL2NvbnN0cnVjdCBBQ1RfQUREQkFSU1AgZnJhbWVzCisJaWYgKHNrYikKKwl7CisJCXNvZnRtYWNfbWdtdF94bWl0KHNrYiwgaWVlZSk7CisJCS8vc2FtZSBhYm92ZQorCX0KKwllbHNlCisJeworCQlJRUVFODAyMTFfREVCVUcoSUVFRTgwMjExX0RMX0VSUiwgImFsbG9jIHNrYiBlcnJvciBpbiBmdW5jdGlvbiAlcygpXG4iLCBfX0ZVTkNUSU9OX18pOworCX0KKwlyZXR1cm4gOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246IFJYIEFEREJBUmVxCisgKiAgIGlucHV0OiAgc3RydWN0IHNrX2J1ZmYgKiAgIHNrYgkvL2luY29taW5nIEFEREJBUmVxIHNrYi4KKyAqICByZXR1cm46ICAwKHBhc3MpLCBvdGhlcihmYWlsKQorICogIG5vdGljZTogIEFzIHRoaXMgZnVuY3Rpb24gbmVlZCBzdXBwb3J0IG9mIFFPUywgSSBjb21tZW50IHNvbWUgY29kZSBvdXQuIEFuZCB3aGVuIHFvcyBpcyByZWFkeSwgdGhpcyBjb2RlIG5lZWQgdG8gYmUgc3VwcG9ydC4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGllZWU4MDIxMV9yeF9BRERCQVJlcSggc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUsIHN0cnVjdCBza19idWZmICpza2IpCit7CisJIHN0cnVjdCBpZWVlODAyMTFfaGRyXzNhZGRyKiByZXEgPSBOVUxMOworCXUxNiByYyA9IDA7CisJdTggKiBkc3QgPSBOVUxMLCAqcERpYWxvZ1Rva2VuID0gTlVMTCwgKnRhZyA9IE5VTEw7CisJUEJBX1JFQ09SRCBwQkEgPSBOVUxMOworCVBCQV9QQVJBTV9TRVQJcEJhUGFyYW1TZXQgPSBOVUxMOworCXUxNiogcEJhVGltZW91dFZhbCA9IE5VTEw7CisJUFNFUVVFTkNFX0NPTlRST0wgcEJhU3RhcnRTZXFDdHJsID0gTlVMTDsKKwlQUlhfVFNfUkVDT1JECXBUUyA9IE5VTEw7CisKKwlpZiAoc2tiLT5sZW4gPCBzaXplb2YoIHN0cnVjdCBpZWVlODAyMTFfaGRyXzNhZGRyKSArIDkpCisJeworCQlJRUVFODAyMTFfREVCVUcoSUVFRTgwMjExX0RMX0VSUiwgIiBJbnZhbGlkI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sIDApOy8vcEJBLT5CYVRpbWVvdXRWYWx1ZSk7CisJaWVlZTgwMjExX3NlbmRfQUREQkFSc3AoaWVlZSwgZHN0LCBwQkEsIEFEREJBX1NUQVRVU19TVUNDRVNTKTsKKworCS8vIEVuZCBvZiBwcm9jZWR1cmUuCisJcmV0dXJuIDA7CisKK09uQUREQkFSZXFfRmFpbDoKKwl7CisJCUJBX1JFQ09SRAlCQTsKKwkJQkEuQmFQYXJhbVNldCA9ICpwQmFQYXJhbVNldDsKKwkJQkEuQmFUaW1lb3V0VmFsdWUgPSAqcEJhVGltZW91dFZhbDsKKwkJQkEuRGlhbG9nVG9rZW4gPSAqcERpYWxvZ1Rva2VuOworCQlCQS5CYVBhcmFtU2V0LmZpZWxkLkJBUG9saWN5ID0gQkFfUE9MSUNZX0lNTUVESUFURTsKKwkJaWVlZTgwMjExX3NlbmRfQUREQkFSc3AoaWVlZSwgZHN0LCAmQkEsIHJjKTsKKwkJcmV0dXJuIDA7IC8vd2Ugc2VuZCBSU1Agb3V0LgorCX0KKworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246IFJYIEFEREJBUlNQCisgKiAgIGlucHV0OiAgc3RydWN0IHNrX2J1ZmYgKiAgIHNrYgkvL2luY29taW5nIEFEREJBUmVxIHNrYi4KKyAqICByZXR1cm46ICAwKHBhc3MpLCBvdGhlcihmYWlsKQorICogIG5vdGljZTogIEFzIHRoaXMgZnVuY3Rpb24gbmVlZCBzdXBwb3J0IG9mIFFPUywgSSBjb21tZW50IHNvbWUgY29kZSBvdXQuIEFuZCB3aGVuIHFvcyBpcyByZWFkeSwgdGhpcyBjb2RlIG5lZWQgdG8gYmUgc3VwcG9ydC4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBCQSBzZXR1cCB0aW1lcgorICogICBpbnB1dDogIHVuc2lnbmVkIGxvbmcJIGRhdGEJCS8vYWN0dXJhbGx5IHdlIHNlbmQgVFhfVFNfUkVDT1JEIG9yIFJYX1RTX1JFQ09SRCB0byB0aGVzZSB0aW1lcgorICogIHJldHVybjogIE5VTEwKKyAqICBub3RpY2U6CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgQmFTZXR1cFRpbWVPdXQodW5zaWduZWQgbG9uZyBkYXRhKQoreworCVBUWF9UU19SRUNPUkQJcFR4VHMgPSAoUFRYX1RTX1JFQ09SRClkYXRhOworCisJcFR4VHMtPmJBZGRCYVJlcUluUHJvZ3Jlc3MgPSBmYWxzZTsKKwlwVHhUcy0+YkFkZEJhUmVxRGVsYXllZCA9IHRydWU7CisJcFR4VHMtPlR4UGVuZGluZ0JBUmVjb3JkLmJWYWxpZCA9IGZhbHNlOworfQorCit2b2lkIFR4QmFJbmFjdFRpbWVvdXQodW5zaWduZWQgbG9uZyBkYXRhKQoreworCVBUWF9UU19SRUNPUkQJcFR4VHMgPSAoUFRYX1RTX1JFQ09SRClkYXRhOworCXN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlID0gY29udGFpbmVyX29mKHBUeFRzLCBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSwgVHhUc1JlY29yZFtwVHhUcy0+bnVtXSk7CisJVHhUc0RlbGV0ZUJBKGllZWUsIHBUeFRzKTsKKwlpZWVlODAyMTFfc2VuZF9ERUxCQSgKKwkJaWVlZSwKKwkJcFR4VHMtPlRzQ29tbW9uS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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gdXBkYXRlIGRlZmF1bHQgc2V0dGluZ3MgaW4gcEhUSW5mbyBzdHJ1Y3R1cmUKKyAqICAgaW5wdXQ6ICBQUlRfSElHSF9USFJPVUdIUFVUCXBIVEluZm8KKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogIG5vdGljZTogIFRoZXNlIHZhbHVlIG5lZWQgYmUgbW9kaWZpZWQgaWYgYW55IGNoYW5nZXMuCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgSFRVcGRhdGVEZWZhdWx0U2V0dGluZyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSkKK3sKKwlQUlRfSElHSF9USFJPVUdIUFVUCXBIVEluZm8gPSBpZWVlLT5wSFRJbmZvOworCS8vY29uc3QgdHlwZW9mKCAoKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICopMCktPnBIVEluZm8gKSAqX19tcHRyID0gJnBIVEluZm87CisKKwkvL3ByaW50aygicEhUaW5mbzolcCwgJnBIVGluZm86JXAsIG1wdHI6JXAsICBvZmZzZXRvZjoleFxuIiwgcEhUSW5mbywgJnBIVEluZm8sIF9fbXB0ciwgb2Zmc2V0b2Yoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UsIHBIVEluZm8pKTsKKwkvL3ByaW50aygiPT09PmllZWU6JXAsXG4iLCBpZWVlKTsKKwkvLyBTaG9ydEdJIHN1cHBvcnQKKwlwSFRJbmZvLT5iUmVnU2hvcnRHSTIwTUh6PSAxOworCXBIVEluZm8tPmJSZWdTaG9ydEdJNDBNSHo9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saXR5IElFIHRvIGJlIHByaW50ZWQgb3V0CisgKiAgIAkgICAgIHU4KiAJVGl0bGVTdHJpbmcgLy9tYWlubHkgcHJpbnQgb3V0IGNhbGxlciBmdW5jdGlvbgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOiAgRHJpdmVyIHNob3VsZCBub3QgcHJpbnQgb3V0IHRoaXMgbWVzc2FnZSBieSBkZWZhdWx0LgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIEhURGVidWdIVENhcGFiaWxpdHkodTgqIENhcElFLCB1OCogVGl0bGVTdHJpbmcgKQoreworCisJc3RhdGljIHU4CUVXQzExTkhUQ2FwW10gPSB7MHgwMCwgMHg5MCwgMHg0YywgMHgzM307CS8vIEZvciAxMW4gRVdDIGRlZmluaXRpb24sIDIwMDcuMDcuMTcsIGJ5IEVtaWx5CisJUEhUX0NBUEFCSUxJVFlfRUxFIAkJcENhcEVMRTsKKworCWlmKCFtZW1jbXAoQ2FwSUUsIEVXQzExTkhUQ2FwLCBzaXplb2YoRVdDMTFOSFRDYXApKSkKKwl7CisJCS8vRVdDIElFCisJCUlFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfSFQsICJFV0MgSUUgaW4gJXMoKVxuIiwgX19GVU5DVElPTl9fKTsKKwkJcENhcEVMRSA9IChQSFRfQ0FQQUJJTElUWV9FTEUpKCZDYXBJRVs0XSk7CisJfWVsc2UKKwkJcENhcEVMRSA9IChQSFRfQ0FQQUJJTElUWV9FTEUpKCZDYXBJRVswXSk7CisKKwlJRUVFODAyMTFfREVCVUcoSUVFRTgwMjExX0RMX0hULCAiPExvZyBIVCBDYXBhYmlsaXR5Pi4gQ2FsbGVkIGJ5ICVzXG4iLCBUaXRsZVN0cmluZyApOworCisJSUV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eSk7CisJSUVFRTgwMjExX0RFQlVHKElFRUU4MDIxMV9ETF9IVCwgICJcdE1DUyBSYXRlIFNldCA9IFsleF1bJXhdWyV4XVsleF1bJXhdXG4iLCBwQ2FwRUxFLT5NQ1NbMF0sXAorCQkJCXBDYXBFTEUtPk1DU1sxXSwgcENhcEVMRS0+TUNTWzJdLCBwQ2FwRUxFLT5NQ1NbM10sIHBDYXBFTEUtPk1DU1s0XSk7CisJcmV0dXJuOworCit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBUaGlzIGZ1bmN0aW9uIHByaW50IG91dCBlYWNoIGZpZWxkIG9uIEhUIEluZm9ybWF0aW9uIElFIG1haW5seSBmcm9tIChCZWFjb24vUHJvYmVSc3ApCisgKiAgIGlucHV0OiAgdTgqCUluZm9JRSAgICAgICAvL0NhcGFiaWxpdHkgSUUgdG8gYmUgcHJpbnRlZCBvdXQKKyAqICAgCSAgICAgdTgqIAlUaXRsZVN0cmluZyAvL21haW5seSBwcmludCBvdXQgY2FsbGVyIGZ1bmN0aW9uCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vbmUKKyAqICBub3RpY2U6ICBEcml2ZXIgc2hvdWxkIG5vdCBwcmludCBvdXQgdGhpcyBtZXNzYWdlIGJ5IGRlZmF1bHQuCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgSFREZWJ1Z0hUSW5mbyh1OCoJSW5mb0lFLCB1OCogVGl0bGVTdHJpbmcpCit7CisKKwlzdGF0aWMgdTgJRVdDMTFOSFRJbmZvW10gPSB7MHgwMCwgMHg5MCwgM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MpPT0wKSB8fAorCQkgICAgIChtZW1jbXAobmV0LT5ic3NpZCwgQUlSTElOS19SQUxJTkssIDMpPT0wKSB8fAorCQkgICAgIChuZXQtPnJhbGlua19jYXBfZXhpc3QpKQorCQlyZXRWYWx1ZSA9IHRydWU7CisJZWxzZSBpZigobWVtY21wKG5ldC0+YnNzaWQsIFVOS05PV05fQk9SQURDT00sIDMpPT0wKSB8fAorICAgIAkJICAgIChtZW1jbXAobmV0LT5ic3NpZCwgTElOS1NZU1dSVDMzMF9MSU5LU1lTV1JUMzAwX0JST0FEQ09NLCAzKT09MCl8fAorICAgIAkJICAgIChtZW1jbXAobmV0LT5ic3NpZCwgTElOS1NZU1dSVDM1MF9MSU5LU1lTV1JUMTUwX0JST0FEQ09NLCAzKT09MCl8fAorICAgIAkJICAgIChtZW1jbXAobmV0LT5ic3NpZCwgTkVUR0VBUjgzNEJ2Ml9CUk9BRENPTSwgMyk9PTApIHx8CisgICAgCQkgICAgKG5ldC0+YnJvYWRjb21fY2FwX2V4aXN0KSkKKyAgICAJCSAgcmV0VmFsdWUgPSB0cnVlOworCWVsc2UgaWYobmV0LT5ic3NodC5iZFJUMlJUQWdncmVnYXRpb24pCisJCXJldFZhbHVlID0gdHJ1ZTsKKwllbHNlCisJCXJldFZhbHVlID0gZmFsc2U7CisKKwlyZXR1cm4gcmV0VmFsdWU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gcmV0dXJucyBwZWVyIElPVC4KKyAqICAgaW5wdXQ6ICBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogCWllZWUKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOgorICogIG5vdGljZToKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqK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SFRfSU9UX1BFRVJfVU5LTk9XTjsKKworCUlFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfSU9ULCAiSm9zZXBoIGRlYnVnISEgSU9UUEVFUjogJXhcbiIsIHBIVEluZm8tPklPVFBlZXIpOworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQ2hlY2sgd2hldGhlciBkcml2ZXIgc2hvdWxkIGRlY2xhcmUgcmVjZWl2ZWQgcmF0ZSB1cCB0byBNQ1MxMyBvbmx5IHNpbmNlIHNvbWUgY2hpcHNldCBpcyBub3QgZ29vZAorICoJICAgICBhdCByZWNlaXZpbmcgTUNTMTR+MTUgZnJhbWUgZnJvbSBzb21lIEFQLgorICogICBpbnB1dDogIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiAJaWVlZQorICogICAJICAgICB1OCAqCQkJUGVlck1hY0FkZHIKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgcmV0dXJuIDEgaWYgZHJpdmVyIHNob3VsZCBkZWNsYXJlIE1DUzEzIG9ubHkob3RoZXJ3aXNlIHJldHVybiAwKQorICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordTggSFRJT1RBY3RJc0Rpc2FibGVNQ1MxNChzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgdTgqIFBlZXJNYWNBZGRyKQoreworCXU4IHJldCA9IDA7CisjaWYgMAorCS8vIEFwcGx5IGZvciA4MTl1IG9ubHkKKyNpZiAoSEFMX0NPREVfQkFTRT09UlRMODE5MiAmJiBERVZfQlVTX1RZUEU9PVVTQl9JTlR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SA9IHRydWU7CisJfQorI2VuZGlmCisjZW5kaWYKKwlyZXR1cm4gcmV0VmFsdWU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIENoZWNrIHdoZXRoZXIgZHJpdmVyIHNob3VsZCBkaXNhYmxlIEVEQ0EgdHVyYm8gbW9kZQorICogICBpbnB1dDogIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiAJaWVlZQorICogICAJICAgICB1OCogCQkJUGVlck1hY0FkZHIKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgcmV0dXJuIDEgaWYgZHJpdmVyIHNob3VsZCBkaXNhYmxlIEVEQ0EgdHVyYm8gbW9kZShvdGhlcndpc2UgcmV0dXJuIDApCisgICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit1OCBIVElPVEFjdElzRGlzYWJsZUVEQ0FUdXJibyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogCWllZWUsIHU4KiBQZWVyTWFjQWRkcikKK3sKKwl1OAlyZXRWYWx1ZSA9IGZhbHNlOwkvLyBkZWZhdWx0IGVuYWJsZSBFRENBIFR1cmJvIG1vZGUuCisJLy8gU2V0IHNwZWNpZmljIEVEQ0EgcGFyYW1ldGVyIGZvciBkaWZmZXJlbnQgQVAgaW4gRE0gaGFuZGxlci4KKworCXJldHVybiByZXRWYWx1ZTsKKyNpZiAwCisJaWYoKG1lbWNtcChQZWVyTWFjQWRkciwgVU5LTk9XTl9CT1JBRENPTSwgMyk9PTApfHwKKwkJKG1lbWNtcChQZWVyTWFjQWRkciwgTElOS1NZU1dSVDMzMF9MSU5LU1lTV1JUMzAwX0JST0FEQ09NLCAzKT09MCl8fAorCQkobWVtY21wKFBlZXJNYWNBZGRyLCBMSU5LU1lTV1JUMzUwX0xJTktTWVNXUlQxNTBfQlJPQURDT00sIDMpPT0wKXx8CisJCShtZW1jbXAoUGVlck1hY0FkZHIsIE5FVEdFQVI4MzRCdjJfQlJPQURDT00sIDMpPT0wKSkKKworCXsKKwkJcmV0VmFsdWUgPSAxOwkvL0xpbmtzeXMgZGlzYWJsZSBFRENBIHR1cmJvIG1vZGUKKwl9CisKKwlyZXR1cm4gcmV0VmFsdWU7CisjZW5kaWYKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQ2hlY2sgd2hldGhlciB3ZSBuZWVkIHRvIHVzZSBPRkRNIHRvIHNuZWQgTUdOVCBmcmFtZSBmb3IgYnJvYWRjb20gQVAKKyAqICAgaW5wdXQ6ICBzdHJ1Y3QgaWVlZTgwMjExX25ldHdvcmsgKm5ldHdvcmsgICAvL2N1cnJlbnQgbmV0d29yayB3ZSBsaXZlCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIHJldHVybiAxIGlmIHRydWUKKyAgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3U4IEhUSU9UQWN0SXNNZ250VXNlQ0NLNk0oc3RydWN0IGllZWU4MDIxMV9uZXR3b3JrICpuZXR3b3JrKQoreworCXU4CXJldFZhbHVlID0gMDsKKworCS8vIDIwMDgvMDEvMjUgTUggSnVkZWcgaWYgd2UgbmVlZCB0byB1c2UgT0ZETSB0byBzbmVkIE1HTlQgZnJhbWUgZm9yIGJyb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VuZGlmCisJcmV0dXJuIHJldFZhbHVlOworfQorCit2b2lkIEhUUmVzZXRJT1RTZXR0aW5nKAorCVBSVF9ISUdIX1RIUk9VR0hQVVQJCXBIVEluZm8KKykKK3sKKwlwSFRJbmZvLT5JT1RBY3Rpb24gPSAwOworCXBIVEluZm8tPklPVFBlZXIgPSBIVF9JT1RfUEVFUl9VTktOT1dOOworCXBIVEluZm8tPklPVFJhRnVuYyA9IDA7Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQ29uc3RydWN0IENhcGFibGlsaXR5IEVsZW1lbnQgaW4gQmVhY29uLi4uIGlmIEhURW5hYmxlIGlzIHR1cm5lZCBvbgorICogICBpbnB1dDogIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiAJaWVlZQorICogICAJICAgICB1OCogCQkJcG9zSFRDYXAgLy9wb2ludGVyIHRvIHN0b3JlIENhcGFiaWxpdHkgRWxlCisgKiAgIAkgICAgIHU4KgkJCWxlbiAvL3N0b3JlIGxlbmd0aCBvZiBDRQorICogICAJICAgICB1OAkJCQlJc0VuY3J5cHQgLy93aGV0aGVyIGVuY3J5cHQsIG5lZWRlZCBmdXJ0aGVyCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vbmUKKyAqICBub3RpY2U6ICBwb3NIVENhcCBjYW4ndCBiZSBudWxsIGFuZCBzaG91bGQgYmUgaW5pdGlhbGl6ZWQgYmVmb3JlLgorICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBIVENvbnN0cnVjdENhcGFiaWxpdHlFbGVtZW50KHN0cnVjd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SBieSBkZWZhdWx0CisvLwlIVERlYnVnSFRDYXBhYmlsaXR5KHBvc0hUQ2FwLCAodTgqKSJIVENvbnN0cnVjdENhcGFiaWxpdHkoKSIpOworCXJldHVybjsKKworfQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQ29uc3RydWN0ICBJbmZvcm1hdGlvbiBFbGVtZW50IGluIEJlYWNvbi4uLiBpZiBIVEVuYWJsZSBpcyB0dXJuZWQgb24KKyAqICAgaW5wdXQ6ICBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogCWllZWUKKyAqICAgCSAgICAgdTgqIAkJCXBvc0hUQ2FwIC8vcG9pbnRlciB0byBzdG9yZSBJbmZvcm1hdGlvbiBFbGUKKyAqICAgCSAgICAgdTgqCQkJbGVuICAgLy9zdG9yZSBsZW4gb2YKKyAqICAgCSAgICAgdTgJCQkJSXNFbmNyeXB0IC8vd2hldGhlciBlbmNyeXB0LCBuZWVkZWQgZnVydGhlcgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOiAgcG9zSFRDYXAgY2FuJ3QgYmUgbnVsbCBhbmQgYmUgaW5pdGlhbGl6ZWQgYmVmb3JlLiBvbmx5IEFQIGFuZCBJQlNTIHN0YSBzaG91bGQgZG8gdGhpcworICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBIVENvbnN0cnVjdEluZm9FbGVtZW50KHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiBpZWVlLCB1OCogcG9zSFRJbmZvLCB1OCogbGVuLCB1OCBJc0VuY3J5cHQpCit7Cis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JcG9zUlQyUlRBZ2cgLy9wb2ludGVyIHRvIHN0b3JlIEluZm9ybWF0aW9uIEVsZQorICogICAJICAgICB1OCoJCQlsZW4gICAvL3N0b3JlIGxlbgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOgorICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBIVENvbnN0cnVjdFJUMlJUQWdnRWxlbWVudChzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSwgdTgqIHBvc1JUMlJUQWdnLCB1OCogbGVuKQoreworCWlmIChwb3NSVDJSVEFnZyA9PSBOVUxMKSB7CisJCUlFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfRVJSLCAicG9zUlQyUlRBZ2cgY2FuJ3QgYmUgbnVsbCBpbiBIVENvbnN0cnVjdFJUMlJUQWdnRWxlbWVudCgpXG4iKTsKKwkJcmV0dXJuOworCX0KKwltZW1zZXQocG9zUlQyUlRBZ2csIDAsICpsZW4pOworCSpwb3NSVDJSVEFnZysrID0gMHgwMDsKKwkqcG9zUlQyUlRBZ2crKyA9IDB4ZTA7CisJKnBvc1JUMlJUQWdnKysgPSAweDRjOworCSpwb3NSVDJSVEFnZysrID0gMHgwMjsKKwkqcG9zUlQyUlRBZ2crKyA9IDB4MDE7CisJKnBvc1JUMlJUQWdnID0gMHgxMDsvLypwb3NSVDJSVEFnZyA9IDB4MDI7CisKKwlpZihpZWVlLT5iU3VwcG9ydFJlbW90ZVdha2VVcCkgeworCQkqcG9zUlQyUlRBZ2cgfD0gMHgwODsvL1JUX0hUX0NBUF9VU0VfV09XOworCX0KKworCSpsZW4gPSA2ICsgMjsKKwlyZXR1cm47CisjaWZkZWYgVE9ETworI2lmKEhBTF9DT0RFX0JBU0UgPT0gUlRMODE5MiAmJiBERVZfQlVTX1RZUEUgPT0gVVNCX0lOVEVSRkFDRSkKKwkvKgorCS8vRW1pbHkuIElmIGl0IGlzIHJlcXVpcmVkIHRvIEFzayBSZWFsdGVrIEFQIHRvIHNlbmQgQU1QRFUgZHVyaW5nIEFFUyBtb2RlLCBlbmFibGUgdGhpcworCSAgIHNlY3Rpb24gb2YgY29kZS4KKwlpZihJU19VTkRFUl8xMU5fQUVTX01PREUoQWRhcHRlcikpCisJeworCQlwb3NSVDJSVEFnZy0+T2N0ZXRbNV0gfD1SVF9IVF9DQVBfVVNFX0FNUERVOworCX1lbHNlCisJeworCQlwb3NSVDJSVEFnZy0+T2N0ZXRbNV0gJj0gMHhmYjsKKwl9CisJKi8KKworI2Vsc2UKKwkvLyBEbyBOb3RoaW5nCisjZW5kaWYKKworCXBvc1JUMlJUQWdnLT5MZW5ndGggPSA2OworI2VuZGlmCisKKworCisKK30KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBQaWNrIHRoZSByaWdodCBSYXRlIEFkYXB0aXZlIHRhYmxlIHRvIHVzZQorICogICBpbnB1dDogIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlKiAJaWVlZQorICogICAJICAgICB1OCogCQkJcE9wZXJhdGVNQ1MgLy9BIHBvaW50ZXIgdG8gTUNTIHJhdGUgYml0bWFwCisgKiAgcmV0dXJuOiAgYWx3YXlzIHdlIHJldHVybiB0cnVlCisgKiAgbm90aWNlOgorICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordTggSFRfUGlja01DU1JhdGUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2U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VNldCwgcE1jc0ZpbHRlcik7CisJaWVlZS0+SFRDdXJyZW50T3BlcmFSYXRlID0gaWVlZS0+SFRIaWdoZXN0T3BlcmFSYXRlOworCisJLy8KKwkvLyBDb25maWcgY3VycmVudCBvcGVyYXRpb24gbW9kZS4KKwkvLworCXBIVEluZm8tPkN1cnJlbnRPcE1vZGUgPSBwUGVlckhUSW5mby0+T3B0TW9kZTsKKworCisKK30KKwordm9pZCBIVFNldENvbm5lY3RCd01vZGVDYWxsYmFjayhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSogaWVlZSk7CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBpbml0aWFsaXplIEhUIGluZm8oc3RydWN0IFBSVF9ISUdIX1RIUk9VR0hQVVQpCisgKiAgIGlucHV0OiAgc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIAlpZWVlCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vbmUKKyAqICBub3RpY2U6IFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIHdoZW4gKiAgKDEpIE1QSW5pdGlhbGl6YXRpb24gUGhhc2UgKiAgKDIpIFJlY2VpdmluZyBvZiBEZWF1dGhlbnRpY2F0aW9uIGZyb20gQVAKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLy8gVE9ETzogU2hvdWxkIHRoaXMgZnVuY2l0b24gYmUgY2FsbGVkIHdoZW4gcmVjZWl2aW5nIG9mIERpc2Fzc29jaWF0aW9uPwordm9pZCBIVEluaXRpYWxpemVIVEluZm8oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZW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JSVF9IVF9Nb2RlID0gKFJUX0hUX0NBUEJJTElUWSkwOworCisJcEhUSW5mby0+SU9UUGVlciA9IDA7CisJcEhUSW5mby0+SU9UQWN0aW9uID0gMDsKKwlwSFRJbmZvLT5JT1RSYUZ1bmMgPSAwOworCisJLy9NQ1MgcmF0ZSBpbml0aWFsaXplZCBoZXJlCisJeworCQl1OCogUmVnSFRTdXBwUmF0ZVNldHMgPSAmKGllZWUtPlJlZ0hUU3VwcFJhdGVTZXRbMF0pOworCQlSZWdIVFN1cHBSYXRlU2V0c1swXSA9IDB4RkY7CS8vc3VwcG9ydCBNQ1MgMH43CisJCVJlZ0hUU3VwcFJhdGVTZXRzWzFdID0gMHhGRjsJLy9zdXBwb3J0IE1DUyA4fjE1CisJCVJlZ0hUU3VwcFJhdGVTZXRzWzRdID0gMHgwMTsJLy9zdXBwb3J0IE1DUyAzMgorCX0KK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIGluaXRpYWxpemUgQnNzIEhUIHN0cnVjdHVyZShzdHJ1Y3QgUEJTU19IVCkKKyAqICAgaW5wdXQ6ICBQQlNTX0hUIHBCc3NIVCAvL3RvIGJlIGluaXRpYWxpemVkCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vbmUKKyAqICBub3RpY2U6IFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIHdoZW4gaW5pdGlhbGl6ZSBuZXR3b3JrIHN0cnVjdHVyZQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIEhUSW5pdGlhbGl6ZUJzc0Rlc2MoUEJTU19IVCBwQnNzS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sZW1lbnRlZCBhdCBhbGwuIFdCCisjaWZkZWYgVE9ETworCQlBZGFwdGVyLT5IYWxGdW5jLkluaXRIYWxSQVRSVGFibGVIYW5kbGVyKCBBZGFwdGVyLCAmcE1nbnRJbmZvLT5kb3QxMU9wZXJhdGlvbmFsUmF0ZVNldCwgcE1nbnRJbmZvLT5kb3QxMUhUT3BlcmF0aW9uYWxSYXRlU2V0KTsKKyNlbmRpZgorCQlpZWVlLT5IVEhpZ2hlc3RPcGVyYVJhdGUgPSBIVEdldEhpZ2hlc3RNQ1NSYXRlKGllZWUsIGllZWUtPmRvdDExSFRPcGVyYXRpb25hbFJhdGVTZXQsIE1DU19GSUxURVJfQUxMKTsKKwkJaWVlZS0+SFRDdXJyZW50T3BlcmFSYXRlID0gaWVlZS0+SFRIaWdoZXN0T3BlcmFSYXRlOworCisJfQorCWVsc2UKKwl7CisJCXBIVEluZm8tPmJDdXJyZW50SFRTdXBwb3J0ID0gZmFsc2U7CisJfQorCXJldHVybjsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIGNoZWNrIHdoZXRoZXIgSFQgY29udHJvbCBmaWVsZCBleGlzdHMKKyAqICAgaW5wdXQ6ICBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAJKmllZWUKKyAqICAgCSAgICAgdTgqCQkJcEZyYW1lIC8vY29taW5nIHNrYi0+ZGF0YQorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICByZXR1cm4gdHJ1ZSBpZiBIVCBjb250cm9sIGZpZWxkIGV4aXN0cyhmYWxzZSBvdGhlcndpc2UpCisgKiAgbm90aWNlOgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZjdiODgyYgotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyc3UvaWVlZTgwMjExL3J0bDgxOXhfUW9zLmgKQEAgLTAsMCArMSw3NDkgQEAKKyNpZm5kZWYgX19JTkNfUU9TX1RZUEVfSAorI2RlZmluZSBfX0lOQ19RT1NfVFlQRV9ICisKKy8vI2luY2x1ZGUgIkVuZGlhbkZyZWUuaCIKKyNkZWZpbmUgQklUMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBCSVQxICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIEJJVDIgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDQKKyNkZWZpbmUgQklUMyAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwOAorI2RlZmluZSBCSVQ0ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEwCisjZGVmaW5lIEJJVDUgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMjAKKyNkZWZpbmUgQklUNiAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA0MAorI2RlZmluZSBCSVQ3ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDgwCisjZGVmaW5lIEJJVDggICAgICAgICAgICAgICAgICAgIDB4MDAwMDAxMDAKKyNkZWZpbmUgQklUOSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDIwMAorI2RlZmluZSBCSVQxMCAgICAgICAgICAgICAgICAgICAweDAwMDAwNDAwCisjZGVmaW5lIEJJVDExICAgICAgICAgICAgICAgICAgIDB4MDAwMDA4MDAKKyNkZWZpbmUgQklUMTIgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBCSVQxMyAgICAgICAgICAgICAgICAgICAweDAwMDAyMDAwCisjZGVmaW5lIEJJVDE0ICAgICAgICAgICAgICAgICAgIDB4MDAwMDQwMDAKKyNkZWZpbmUgQklUMTUgICAgICAgICAgICAgICAgICAgMHgwMDAwODAwMAorI2RlZmluZSBCSVQxNiAgICAgICAgICAgICAgICAgICAweDAwMDEwMDAwCisjZGVmaW5lIEJJVDE3ICAgICAgICAgICAgICAgICAgIDB4MDAwMjAwMDAKKyNkZWZpbmUgQklUMTggICAgICAgICAgICAgICAgICAgMHgwMDA0MDAwMAorI2RlZmluZSBCSVQxOSAgICAgICAgICAgICAgICAgICAweDAwMDgwMDAwCisjZGVmaW5lIEJJVDIwICAgICAgICAgICAgICAgICAgIDB4MDAxMDAwMDAKKyNkZWZpbmUgQklUMjEgICAgICAgICAgICAgICAgICAgMHgwMDIwMDAwMAorI2RlZmluZSBCSVQyMiAgICAgICAgICAgICAgICAgICAweDAwNDAwMDAwCisjZGVmaW5lIEJJVDIzICAgICAgICAgICAgICAgICAgIDB4MDA4MDAwMDAKKyNkZWZpbmUgQklUMjQgICAgICAgICAgICAgICAgICAgMHgwMTAwMDAwMAorI2RlZmluZSBCSVQyNSAgICAgICAgICAgICAgICAgICAweDAyMDAwMDAwCisjZGVmaW5lIEJJVDI2ICAgICAgICAgICAgICAgICAgIDB4MDQwMDAwMDAKKyNkZWZpbmUgQklUMjcgICAgICAgICAgICAgICAgICAgMHgwODAwMDAwMAorI2RlZmluZSBCSVQyOCAgICAgICAgICAgICAgICAgICAweDEwMDAwMDAwCisjZGVmaW5lIEJJVDI5ICAgICAgICAgICAgICAgICAgIDB4MjAwMDAwMDAKKyNkZWZpbmUgQklUMzAgICAgICAgICAgICAgICAgICAgMHg0MDAwMDAwMAorI2RlZmluZSBCSVQzMSAgICAgICAgICAgICAgICAgICAweDgwMDAwMDAwCisKKyNkZWZpbmUJTUFYX1dNTUVMRV9MRU5HVEgJNjQKKworLy8KKy8vIFFvUyBtb2RlLgorLy8gZW51bSAwLCAxLCAyLCA0OiBzaW5jZSB3ZSBjYW4gdXNlIHRoZSBPUih8KSBvcGVyYXRpb24uCisvLworLy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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQWRkIEJBIHRpbWVyIGZ1bmN0aW9uCisgKiAgIGlucHV0OiAgdW5zaWduZWQgbG9uZwkgZGF0YQkJLy9hY3R1cmFsbHkgd2Ugc2VuZCBUWF9UU19SRUNPUkQgb3IgUlhfVFNfUkVDT1JEIHRvIHRoZXNlIHRpbWVyCisgKiAgcmV0dXJuOiAgTlVMTAorICogIG5vdGljZToKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBUc0FkZEJhUHJvY2Vzcyh1bnNpZ25lZCBsb25nIGRhdGEpCit7CisJUFRYX1RTX1JFQ09SRAlwVHhUcyA9IChQVFhfVFNfUkVDT1JEKWRhdGE7CisJdTggbnVtID0gcFR4VHMtPm51bTsKKwlzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSA9IGNvbnRhaW5lcl9vZihwVHhUcywgc3RydWN0IGllZWU4MDIxMV9kZXZpY2UsIFR4VHNSZWNvcmRbbnVtXSk7CisKKwlUc0luaXRBZGRCQShpZWVlLCBwVHhUcywgQkFfUE9MSUNZX0lNTUVESUFURSwgZmFsc2UpOworCUlFRUU4MDIxMV9ERUJVRyhJRUVFODAyMTFfRExfQkEsICJUc0FkZEJhUHJvY2VzcygpOiBBRERCQSBSZXEgaXMgc3RhcnRlZCEhIFxuIik7Cit9CisKKwordm9pZCBSZXNldFRzQ29tbW9uSW5mbyhQVFNfQ09NTU9OX0lORk8JcFRzQ29tbW9uSW5mbykKK3sKKwltZW1zZXQocFRzQ29tbW9uSW5mby0+QWRkciwgMCwgNik7CisJbWVtc2V0KCZwVHNDb21tb25JbmZvLT5UU3BlYywgMCwgc2l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uZGluZ1RpbWVyKSkKKwkJCWRlbF90aW1lcl9zeW5jKCZwUnhUUy0+UnhQa3RQZW5kaW5nVGltZXIpOworCisgICAgICAgICAgICAgICAgd2hpbGUoIWxpc3RfZW1wdHkoJnBSeFRTLT5SeFBlbmRpbmdQa3RMaXN0KSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLy8gICAgICBQbGF0Zm9ybUFjcXVpcmVTcGluTG9jayhBZGFwdGVyLCBSVF9SWF9TUElOTE9DSyk7CisgICAgICAgICAgICAgICAgICAgICAgICBzcGluX2xvY2tfaXJxc2F2ZSgmKGllZWUtPnJlb3JkZXJfc3BpbmxvY2spLCBmbGFncyk7CisgICAgICAgICAgICAgICAgICAgICAgICAvL3BSeFJlb3JkZXJFbnRyeSA9IGxpc3RfZW50cnkoJnBSeFRTLT5SeFBlbmRpbmdQa3RMaXN0LnByZXYsUlhfUkVPUkRFUl9FTlRSWSxMaXN0KTsKKwkJCXBSeFJlb3JkZXJFbnRyeSA9IChQUlhfUkVPUkRFUl9FTlRSWSlsaXN0X2VudHJ5KHBSeFRTLT5SeFBlbmRpbmdQa3RMaXN0LnByZXYsUlhfUkVPUkRFUl9FTlRSWSxMaXN0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RfZGVsX2luaXQoJnBSeFJlb3JkZXJFbnRyeS0+TGlzdCk7CisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBpID0gMDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGllZWU4MDIxMV9yeGIgKiBwcnhiID0gcFJ4UmVvcmRlckVudHJ5LT5wcnhiOworCQkJCWlmICh1bmxpa2VseSghcHJ4YikpCisJCQkJeworCQkJCQlzcGluX3VubG9ja19pcnFyZXN0b3JlKCYoaWVlZS0+cmVvcmRlcl9zcGlubG9jayksIGZsYWdzKTsKKwkJCQkJcmV0dXJuOworCQkJCX0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGkgPTA7IGkgPCBwcnhiLT5ucl9zdWJmcmFtZXM7IGkrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldl9rZnJlZV9za2IocHJ4Yi0+c3ViZnJhbWVzW2ldKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZnJlZShwcnhiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJ4YiA9IE5VTEw7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBsaXN0X2FkZF90YWlsKCZwUnhSZW9yZGVyRW50cnktPkxpc3QsJmllZWUtPlJ4UmVvcmRlcl9VbnVzZWRfTGlzdCk7CisgICAgICAgICAgICAgICAgICAgICAgICAvL1BsYXRmb3JtUmVsZWFzZVNwaW5Mb2NrKEFkYXB0ZXIsIFJUX1JYX1NQSU5MT0NLKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJihpZWVlLT5yZW9yZGVyX3NwaW5sb2NrKSwgZmxhZ3MpOworICAgICAgICAgICAgICAgIH0KKworLy8jZW5kaWYKKwl9CisJZWxzZQorCXsKKwkJUFRYX1RTX1JFQ09SRCBwVHhUUyA9IChQVFhfVFNfUkVDT1JEKXBUczsKKwkJZGVsX3RpbWVyX3N5bmMoJnBUeFRTLT5Uc0FkZEJhVGltZXIpOworCX0KK30KKwordm9pZCBSZW1vdmVQZWVyVFMoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UqIGllZWUsIHU4KiBBZGRyKQoreworCVBUU19DT01NT05fSU5GTwlwVFMsIHBUbXBUUzsKKwlwcmludGsoIj09PT09PT09PT09PlJlbW92ZVBlZXJUUywiTUFDX0ZNVCJcbiIsIE1BQ19BUkcoQWRkcikpOworI2lmIDEKKwls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m9pZCAoKmRpdF9kaWdlc3QpKHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sIHN0cnVjdCBzY2F0dGVybGlzdCAqc2csCisJICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBuc2csIHU4ICpvdXQpOworCWludCAoKmRpdF9zZXRrZXkpKHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sCisJICAgICAgICAgICAgICAgICAgY29uc3QgdTggKmtleSwgdW5zaWduZWQgaW50IGtleWxlbik7CisjaWZkZWYgQ09ORklHX0NSWVBUT19ITUFDCisJdm9pZCAqZGl0X2htYWNfYmxvY2s7CisjZW5kaWYKK307CisKK3N0cnVjdCBjb21wcmVzc190Zm0geworCWludCAoKmNvdF9jb21wcmVzcykoc3RydWN0IGNyeXB0b190Zm0gKnRmbSwKKwkgICAgICAgICAgICAgICAgICAgIGNvbnN0IHU4ICpzcmMsIHVuc2lnbmVkIGludCBzbGVuLAorCSAgICAgICAgICAgICAgICAgICAgdTggKmRzdCwgdW5zaWduZWQgaW50ICpkbGVuKTsKKwlpbnQgKCpjb3RfZGVjb21wcmVzcykoc3RydWN0IGNyeXB0b190Zm0gKnRmbSwKKwkgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKnNyYywgdW5zaWduZWQgaW50IHNsZW4sCisJICAgICAgICAgICAgICAgICAgICAgIHU4ICpkc3QsIHVuc2lnbmVkIGludCAqZGxlbik7Cit9OworCisjZGVmaW5lIGNydF9jaXBoZXIJY3J0X3UuY2lwaGVyCisjZGVmaW5lIGNydF9kaWdlc3QJY3J0X3UuZGlnZXN0CisjZGVmaW5lIGNydF9jb21wcmVzcwljcnRfdS5jb21wcmVzcworCitzdHJ1Y3QgY3J5cHRvX3RmbSB7CisKKwl1MzIgY3J0X2ZsYWdzOworCisJdW5pb24geworCQlzdHJ1Y3QgY2lwaGVyX3RmbSBjaXBoZXI7CisJCXN0cnVjdCBkaWdlc3RfdGZtIGRpZ2VzdDsKKwkJc3RydWN0IGNvbX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F0dGVybGlzdCAqc2csCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IG5zZykKK3sKKwlCVUdfT04oY3J5cHRvX3RmbV9hbGdfdHlwZSh0Zm0pICE9IENSWVBUT19BTEdfVFlQRV9ESUdFU1QpOworCXRmbS0+Y3J0X2RpZ2VzdC5kaXRfdXBkYXRlKHRmbSwgc2csIG5zZyk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCBjcnlwdG9fZGlnZXN0X2ZpbmFsKHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sIHU4ICpvdXQpCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfRElHRVNUKTsKKwl0Zm0tPmNydF9kaWdlc3QuZGl0X2ZpbmFsKHRmbSwgb3V0KTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGNyeXB0b19kaWdlc3RfZGlnZXN0KHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNjYXR0ZXJsaXN0ICpzZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgbnNnLCB1OCAqb3V0KQoreworCUJVR19PTihjcnlwdG9fdGZtX2FsZ190eXBlKHRmbSkgIT0gQ1JZUFRPX0FMR19UWVBFX0RJR0VTVCk7CisJdGZtLT5jcnRfZGlnZXN0LmRpdF9kaWdlc3QodGZtLCBzZywgbnNnLCBvdXQpOworfQorCitzdGF0aWMgaW5saW5lIGludCBjcnlwdG9fZGlnZXN0X3NldGtleShzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKmtleSwgdW5zaWduZWQgaW50IGtleWxlbikKK3sKKwlCVUdfT04oY3J5cHRvX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ludCBjcnlwdG9fY2lwaGVyX2VuY3J5cHRfaXYoc3RydWN0IGNyeXB0b190Zm0gKnRmbSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc2NhdHRlcmxpc3QgKmRzdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc2NhdHRlcmxpc3QgKnNyYywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgbmJ5dGVzLCB1OCAqaXYpCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfQ0lQSEVSKTsKKwlCVUdfT04odGZtLT5jcnRfY2lwaGVyLmNpdF9tb2RlID09IENSWVBUT19URk1fTU9ERV9FQ0IpOworCXJldHVybiB0Zm0tPmNydF9jaXBoZXIuY2l0X2VuY3J5cHRfaXYodGZtLCBkc3QsIHNyYywgbmJ5dGVzLCBpdik7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGNyeXB0b19jaXBoZXJfZGVjcnlwdChzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqZHN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqc3JjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBuYnl0ZXMpCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfQ0lQSEVSKTsKKwlyZXR1cm4gdGZtLT5jcnRfY2lwaGVyLmNpdF9kZWNyeXB0KHRmbSwgZHN0LCBzcmMsIG5ieXRlcyk7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGNyeXB0b19jaXBoZXJfZGVjcnlwdF9pdihzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqZHN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCAqc3JjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBuYnl0ZXMsIHU4ICppdikKK3sKKwlCVUdfT04oY3J5cHRvX3RmbV9hbGdfdHlwZSh0Zm0pICE9IENSWVBUT19BTEdfVFlQRV9DSVBIRVIpOworCUJVR19PTih0Zm0tPmNydF9jaXBoZXIuY2l0X21vZGUgPT0gQ1JZUFRPX1RGTV9NT0RFX0VDQik7CisJcmV0dXJuIHRmbS0+Y3J0X2NpcGhlci5jaXRfZGVjcnlwdF9pdih0Zm0sIGRzdCwgc3JjLCBuYnl0ZXMsIGl2KTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGNyeXB0b19jaXBoZXJfc2V0X2l2KHN0cnVjdCBjcnlwdG9fdGZtICp0Zm0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKnNyYywgdW5zaWduZWQgaW50IGxlbikKK3sKKwlCVUdfT04oY3J5cHRvX3RmbV9hbGdfdHlwZSh0Zm0pICE9IENSWVBUT19BTEdfVFlQRV9DSVBIRVIpOworCW1lbWNweSh0Zm0tPmNydF9jaXBoZXIuY2l0X2l2LCBzcmMsIGxlbik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCBjcnlwdG9fY2lwaGVyX2dldF9pdihzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4ICpkc3QsIHVuc2lnbmVkIGludCBsZW4pCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfQ0lQSEVSKTsKKwltZW1jcHkoZHN0LCB0Zm0tPmNydF9jaXBoZXIuY2l0X2l2LCBsZW4pOworfQorCitzdGF0aWMgaW5saW5lIGludCBjcnlwdG9fY29tcF9jb21wcmVzcyhzdHJ1Y3QgY3J5cHRvX3RmbSAqdGZtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKnNyYywgdW5zaWduZWQgaW50IHNsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCAqZHN0LCB1bnNpZ25lZCBpbnQgKmRsZW4pCit7CisJQlVHX09OKGNyeXB0b190Zm1fYWxnX3R5cGUodGZtKSAhPSBDUllQVE9fQUxHX1RZUEVfQ09NUFJFU1MpOworCXJldHVybiB0Zm0tPmNydF9jb21wcmVzcy5jb3RfY29tcHJlc3ModGZtLCBzcmMsIHNsZW4sIGRzdCwgZGxlbik7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGNyeXB0b19jb21wX2RlY29tcHJlc3Moc3RydWN0IGNyeXB0b190Zm0gKnRmbSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdTggKnNyYywgdW5zaWduZWQgaW50IHNsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4ICpkc3QsIHVuc2lnbmVkIGludCAqZGxlbikKK3sKKwlCVUdfT04oY3J5cHRvX3RmbV9hbGdfdHlwZSh0Zm0pICE9IENSWVBUT19BTEdfVFlQRV9DT01QUkVTUyk7CisJcmV0dXJuIHRmbS0+Y3J0X2NvbXByZXNzLmNvdF9kZWNvbXByZXNzKHRmbSwgc3JjLCBzbGVuLCBkc3QsIGRsZW4pOworfQorCisvKgorICogSE1BQyBzdXBwb3J0LgorICovCisja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KwkJCWVmdXNlX1BnUGFja2V0V3JpdGUoZGV2LG9mZnNldCx3b3JkX2VuLHBnX2RhdGErKHdvcmRfc3RhcnQqMikpOworCisJCX0KKworCX0KKwkvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCWVsc2UgaWYocGdfcGt0X2NudHM+MSl7Ly9zaXR1YXRpb24gQgorCQlpZih3b3JkX3N0YXJ0PT0wKXsKKwkJCXdvcmRfZW4gPSAweDAwOworCQkJZm9yKHRtcGlkeCA9IDAgO3RtcGlkeDwod29yZF9jbnRzLzQpO3RtcGlkeCsrKQorCQkJeworCQkJCWVmdXNlX1BnUGFja2V0V3JpdGUoZGV2LChvZmZzZXQrdG1waWR4KSx3b3JkX2VuLGRhdGErKHRtcGlkeCpQR1BLVF9EQVRBX1NJWkUpKTsKKwkJCX0KKwkJCXdvcmRfZW4gPSAweDBmOworCQkJZm9yKHRtcGlkeD0gMDsgdG1waWR4PCh3b3JkX2NudHMlNCkgOyB0bXBpZHgrKykKKwkJCXsKKwkJCQl0bXBiaXRtYXNrID10bXBpZHg7CisJCQkJd29yZF9lbiAmPSAofihFRlVTRV9CSVQodG1wYml0bWFzaykpKTsKKwkJCQkvL0JJVDAKKwkJCX0KKwkJCWVmdXNlX1BnUGFja2V0V3JpdGUoZGV2LG9mZnNldCsod29yZF9jbnRzLzQpLHdvcmRfZW4sZGF0YSsoKHdvcmRfY250cy80KSpQR1BLVF9EQVRBX1NJWkUpKTsKKwkJfWVsc2UKKwkJeworCisJCX0KKwl9CisJLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKwllbHNley8vc2l0dWF0aW9uIEMKKwkJd29yZF9lbiA9IDB4MGY7CisJCWZvcih0bXBpZHg9IDA7IHRtcGlkeDx3b3JkX2NudHMgOyB0bXBpZHgrKykKKwkJeworCQkJdG1wY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L3I4MTkyU19maXJtd2FyZS5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmIzZDY5YjMKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MnN1L3I4MTkyU19maXJtd2FyZS5jCkBAIC0wLDAgKzEsMTAyMyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQcm9jZWR1cmU6ICAgIEluaXQgYm9vdCBjb2RlL2Zpcm13YXJlIGNvZGUvZGF0YSBzZXNzaW9uCisgKgorICogRGVzY3JpcHRpb246IFRoaXMgcm91dGluZSB3aWxsIGludGlhbGl6ZSBmaXJtd2FyZS4gSWYgYW55IGVycm9yIG9jY3VycyBkdXJpbmcgdGhlIGluaXRpYWxpemF0aW9uCisgKiAJCXByb2Nlc3MsIHRoZSByb3V0aW5lIHNoYWxsIHRlcm1pbmF0ZSBpbW1lZGlhdGVseSBhbmQgcmV0dXJuIGZhaWwuCisgKgkJTklDIGRyaXZlciBzaG91bGQgY2FsbCBOZGlzT3BlbkZpbGUgb25seSBmcm9tIE1pbmlwb3J0SW5pdGlhbGl6ZS4KKyAqCisgKiBBcmd1bWVudHM6ICAgVGhlIHBvaW50ZXIgb2YgdGhlIGFkYXB0ZXIKKworICogUmV0dXJuczoKKyAqICAgICAgICBORElTX1NUQVRVU19GQUlMVVJFIC0gdGhlIGZvbGxvd2luZyBpbml0aWFsaXphdGlvbiBwcm9jZXNzIHNob3VsZCBiZSB0ZXJtaW5hdGVkCisgKiAgICAgICAgTkRJU19TVEFUVVNfU1VDQ0VTUyAtIGlmIGZpcm13YXJlIGluaXRpYWxpemF0aW9uIHByb2Nlc3Mgc3VjY2VzcworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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1BXTQkJCQkweDA1NjMJLy8gQ3VycmVudCBQb3dlciBNb2RlLgorCisvLworLy8gQ29uZmlnIHJlZ2lzdGVyICAgKE9mZnNldCAweDgwMC0pCisvLworI2RlZmluZSAJUEhZX0NDQQkJCQkweDgwMyAgIC8vIENDQSByZWxhdGVkIHJlZ2lzdGVyCisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8gICAgICAgODE5MlMgVVNCIHNwZWNpZmljIFJlZ3NpdGVyIE9mZnNldCBhbmQgQ29udGVudCBkZWZpbml0aW9uLAorLy8gICAgICAgMjAwOC4wOC4yOCwgYWRkZWQgYnkgUm9nZXIuCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vIFJ4IEFnZ3JlZ2F0aW9uIHRpbWUtb3V0IHJlZy4KKyNkZWZpbmUJVVNCX1JYX0FHR19USU1FT1VUCTB4RkU1QgorCisvLyBGaXJ3YXJlIHJlc2VydmVkIFR4IHBhZ2UgY29udHJvbC4KKyNkZWZpbmUJRldfT0ZGTE9BRF9FTgkJQklUNworCisvLyBNaW4gU3BhY2luZyByZWxhdGVkIHNldHRpbmdzLgorI2RlZmluZQlNQVhfTVNTX0RFTlNJVFkgCQkJMHgxMworI2RlZmluZQlNQVhfTVNTX0RFTlNJVFlfMlQgCQkweDEzCisjZGVmaW5lCU1BWF9NU1NfREVOU0lUWV8xVCAJCTB4MEEKKworLy8gUnggRE1BIENvbnRyb2wgcmVsYXRlZCBzZXR0aW5ncworI2RlZmluZQlSWERNQV9BR0dfRU4JCUJJVDcKKworLy8gVVNCIFJ4IEFnZ3JlZ2F0aW9uIFRpbWVPdXQgc2V0dGluZ3MKKyNkZWZpbmUJUlhETUFfQUdHX1RJTUVPVVRfRElTQUJMRQkJMHgwMAorI2RlZmluZQlSWERNQV9B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QorI2RlZmluZQkJTkhNX1JQSV9DT1VOVEVSNwkJMHg4REYKKy8vIE5ITSBSUEkgY291bnRlcjcsIHRoZSBmcmFjdGlvbiBvZiBzaWduYWwgc3RyZW4gaW4gTkhNX1RIUkVTSDEyLCBOSE1fVEhSRVNIMTMKKworI2RlZmluZSBIQUxfUkVUUllfTElNSVRfSU5GUkEJCQkJCQkJNDgKKyNkZWZpbmUgSEFMX1JFVFJZX0xJTUlUX0FQX0FESE9DCQkJCQkJNworCisvLyBIVyBSZWFkaW8gT0ZGIHN3aXRjaCAoR1BJTyBCSVQpCisjZGVmaW5lCQlIQUxfODE5MlNfSFdfR1BJT19PRkZfQklUCUJJVDMKKyNkZWZpbmUJCUhBTF84MTkyU19IV19HUElPX09GRl9NQVNLCTB4RjcKKyNkZWZpbmUJCUhBTF84MTkyU19IV19HUElPX1dQU19CSVQJQklUNAorCisjZW5kaWYgIC8vUjgxOTJTX0hXCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MnN1L3I4MTkyU19waHkuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyc3UvcjgxOTJTX3BoeS5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjk5YTQwNTFhCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJzdS9yODE5MlNfcGh5LmMKQEAgLTAsMCArMSw1MDI4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisKKyAgICAgKGMpIENvcHlyaWdodCAyMDA4LCBSZWFsVEVLIFRlY2hub2xvZ2llcyBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCisKKyBNb2R1bGU6CWhhbDgxOTJzcGh5LmMKKworIE5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yhOb25lKS4KKyAqCisgKiBBYmJyZXY6CisgKgorICogSGlzdG9yeToKKyAqCQlEYXRhCQlXaG8JCVJlbWFyaworICogICAgICAwOC8wNy8yMDA3ICBNSEMgICAgCTEuIFBvcnRpbmcgZnJvbSA5eCBzZXJpZXMgUEhZQ0ZHLmguCisgKgkJCQkJCQkyLiBSZW9yZ2FuaXplIGNvZGUgYXJjaGl0ZWN0dXJlLgorICoJMDkvMjUvMjAwOAlNSAkJMS4gQWRkIFJMNjA1MiByZWdpc3RlciBkZWZpbml0aW9uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmbmRlZiBfX0lOQ19IQUw4MTkyU1BIWVJFR19ICisjZGVmaW5lIF9fSU5DX0hBTDgxOTJTUEhZUkVHX0gKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tRGVmaW5lIFBhcmFtZXRlcnMtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vICAgICAgIDgxOTJTIFJlZ3NpdGVyIG9mZnNldCBkZWZpbml0aW9uCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisvLworLy8gQkItUEhZIHJlZ2lzdGVyIFBNQUMgMHgxMDAgUEhZIDB4ODAwIC0gMHhFRkYKKy8vIDEuIFBNQUMgZHVwbGljYXRlIHJlZ2lzdGVyIGR1ZSB0byBjb25uZWN0aW9uOiBSRl9Nb2RlLCBUUnhSTiwgTnVtT2YgTC1TVEYKKy8vIDIuIDB4ODAwLzB4OTAwLzB4QTAwLzB4QzAwLzB4RDAwLzB4RTAwCisvLyAzLiBSRiByZWdpc3RlciAweDAwLTJFCisvLyA0LiBCaXQgTWFzay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AgICAgICAgICAgICAgICAgICAgCQkJMHgwZjAwMDAwMAorI2RlZmluZQkJYlJGRW5kICAgICAgICAgICAgICAgICAgICAJCQkweDAwMGYwMDAwCisjZGVmaW5lCQliQ0NBTWFzayAgICAgICAgICAgICAgICAgIAkJCTB4MDAwMDAwZjAgICAvL1QyUgorI2RlZmluZQkJYlIyUkNDQU1hc2sgICAgICAgICAgICAgICAJCQkweDAwMDAwZjAwCisjZGVmaW5lCQliSFNTSV9SMlREZWxheSAgICAgICAgICAgIAkJMHhmODAwMDAwMAorI2RlZmluZQkJYkhTU0lfVDJSRGVsYXkgICAgICAgICAgICAJCTB4ZjgwMDAwCisjZGVmaW5lCQliQ29udFR4SFNTSSAgICAgICAgICAgICAgIAkJCTB4NDAwICAgICAvL2NoYW5lIGdhaW4gYXQgY29udGludWUgVHgKKyNkZWZpbmUJCWJJR0Zyb21DQ0sgICAgICAgICAgICAgICAgCQkJMHgyMDAKKyNkZWZpbmUJCWJBR0NBZGRyZXNzICAgICAgICAgICAgICAgCQkJMHgzZgorI2RlZmluZQkJYlJ4SFBUeCAgICAgICAgICAgICAgICAgICAJCQkweDcwMDAKKyNkZWZpbmUJCWJSeEhQVDJSICAgICAgICAgICAgICAgICAgCQkJMHgzODAwMAorI2RlZmluZQkJYlJ4SFBDQ0tJbmkgICAgICAgICAgICAgICAJCQkweGMwMDAwCisjZGVmaW5lCQliQUdDVHhDb2RlICAgICAgICAgICAgICAgIAkJCTB4YzAwMDAwCisjZGVmaW5lCQliQUdDUnhDb2RlICAgICAgICAgICAgICAgIAkJCTB4MzAwMDAwCisKKyNkZWZpbmUJCWIzV2lyZURhdGFMZW5ndGggICAgICAgICAgCQkweDgwMAkvLyBSZWcgMHg4MjB+ODRmIHJGUEdBMF9YQV9IU1NJUGFyYW1ldGVyMQorI2RlZmluZQkJYjNXaXJlQWRkcmVzc0xlbmd0aCAgICAgICAJCTB4NDAwCisKKyNkZWZpbmUJCWIzV2lyZVJGUG93ZXJEb3duICAgICAgICAgCQkweDEJLy8gVXNlbGVzcyBub3cKKy8vI2RlZmluZSBiSFdTSVNlbGVjdCAgICAgICAgICAgICAgIAkJMHg4CisjZGVmaW5lCQliNUdQQVBFUG9sYXJpdHkgICAgICAgICAgIAkJCTB4NDAwMDAwMDAKKyNkZWZpbmUJCWIyR1BBUEVQb2xhcml0eSAgICAgICAgICAgCQkJMHg4MDAwMDAwMAorI2RlZmluZQkJYlJGU1dfVHhEZWZhdWx0QW50ICAgICAgICAJCTB4MworI2RlZmluZQkJYlJGU1dfVHhPcHRpb25BbnQgICAgICAgICAJCTB4MzAKKyNkZWZpbmUJCWJSRlNXX1J4RGVmYXVsdEFudCAgICAgICAgCQkweDMwMAorI2RlZmluZQkJYlJGU1dfUnhPcHRpb25BbnQgICAgICAgICAJCTB4MzAwMAorI2RlZmluZQkJYlJGU0lfM1dpcmVEYXRhICAgICAgICAgICAJCTB4MQorI2RlZmluZQkJYlJGU0lfM1dpcmVDbG9jayAgICAgICAgICAJCTB4MgorI2RlZmluZQkJYlJGU0lfM1dpcmVMb2FkICAgICAgICAgICAJCTB4NAorI2RlZmluZQkJYlJGU0lfM1dpcmVSVyAgICAgICAgICAgICAJCTB4OAorI2RlZmluZQkJYlJGU0lfM1dpcmUgICAgICAgICAgICAgICAJCQkweGYKKworI2RlZmluZQkJYlJGU0lfUkZFTlYgICAgICAgICAgICAgICAJCQkweDEwCS8vIFJlZyAweDg3MCByRlBHQTBfWEFCX1JGSW50ZXJmYWNlU1cKKworI2RlZmluZQkJYlJGU0lfVFJTVyAgICAgICAgICAgICAgICAJCQkweDIwCS8vIFVzZWxlc3Mgbm93CisjZGVmaW5lCQliUkZTSV9UUlNXQiAgICAgICAgICAgICAgIAkJCTB4NDAKKyNkZWZpbmUJCWJSRlNJX0FOVFNXICAgICAgICAgICAgICAgCQkJMHgxMDAKKyNkZWZpbmUJCWJSRlNJX0FOVFNXQiAgICAgICAgICAgICAgCQkweDIwMAorI2RlZmluZQkJYlJGU0lfUEFQRSAgICAgICAgICAgICAgICAJCQkweDQwMAorI2RlZmluZQkJYlJGU0lfUEFQRTVHICAgICAgICAgICAgICAJCQkweDgwMAorI2RlZmluZQkJYkJhbmRTZWxlY3QgICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUJCWJIVFNJRzJfR0kgICAgICAgICAgICAgICAgCQkJMHg4MAorI2RlZmluZQkJYkhUU0lHMl9TbW9vdGhpbmcgICAgICAgICAJCTB4MDEKKyNkZWZpbmUJCWJIVFNJRzJfU291bmRpbmcgICAgICAgICAgCQkweDAyCisjZGVmaW5lCQliSFRTSUcyX0FnZ3JlYXRvbiAgICAgICAgIAkJMHgwOAorI2RlZmluZQkJYkhUU0lHMl9TVEJDICAgICAgICAgICAgICAJCTB4MzAKKyNkZWZpbmUJCWJIVFNJRzJfQWR2Q29kaW5nICAgICAgICAgCQkweDQwCisjZGVmaW5lCQliSFRTSUcyX051bU9mSFRMVEYgICAgICAgIAkJMHgzMDAKKyNkZWZpbmUJCWJIVFNJRzJfQ1JDOCAgICAgICAgICAgICAgCQkweDNmYworI2RlZmluZQkJYkhUU0lHMV9NQ1MgICAgICAgICAgICAgICAJCQkweDdmCisjZGVmaW5lCQliSFRTSUcxX0JhbmRXaWR0aCAgICAgICAgIAkJMHg4MAorI2RlZmluZQkJYkhUU0lHMV9IVExlbmd0aCAgICAgICAgICAJCTB4ZmZmZgorI2RlZmluZQkJYkxTSUdfUmF0ZSAgICAgICAgICAgICAgICAJCQkweGYKKyNkZWZpbmUJCWJMU0lHX1Jlc2VydmVkICAgICAgICAgICAgCQkweDEwCisjZGVmaW5lCQliTFNJR19MZW5ndGggICAgICAgICAgICAgIAkJCTB4MWZmZmUKKyNkZWZpbmUJCWJMU0lHX1Bhcml0eSAgICAgICAgICAgICAgCQkJMHgyMAorI2RlZmluZQkJYkNDS1J4UGhhc2UgICAgICAgICAgICAgICAJCTB4NAorI2RlZmluZQkJYkxTU0lSZWFkQWRkcmVzcyAgICAgICAgICAJCTB4N2Y4MDAwMDAgICAvLyBUNjUgUkYKKyNkZWZpbmUJCWJMU1NJUmVhZEVkZ2UgICAgICAgICAgICAgCQkweDgwMDAwMDAwICAgLy9MU1NJICJSZWFkIiBlZGdlIHNpZ25hbAorI2RlZmluZQkJYkxTU0lSZWFkQmFja0RhdGEgICAgICAgICAJCTB4ZmZmZmYJCS8vIFQ2NSBSRgorI2RlZmluZQkJYkxTU0lSZWFkT0tGbGFnICAgICAgICAgICAJCTB4MTAwMAkvLyBVc2VsZXNzIG5vdworI2RlZmluZQkJYkNDS1NhbXBsZVJhdGUgICAgICAgICAgICAJCTB4OCAgICAgICAvLzA6IDQ0TUh6LCAxOjg4TUh6CisjZGVmaW5lCQliUmVndWxhdG9yMFN0YW5kYnkgICAgICAgIAkJMHgxCisjZGVmaW5lCQliUmVndWxhdG9yUExMU3RhbmRieSAgICAgIAkJMHgyCisjZGVmaW5lCQliUmVndWxhdG9yMVN0YW5kYnkgICAgICAgIAkJMHg0CisjZGVmaW5lCQliUExMUG93ZXJVcCAgICAgICAgICAgICAgIAkJCTB4OAorI2RlZmluZQkJYkRQTExQb3dlclVwICAgICAgICAgICAgICAJCTB4MTAKKyNkZWZpbmUJCWJEQTEwUG93ZXJVcCAgICAgICAgICAgICAgCQkweDIwCisjZGVmaW5lCQliQUQ3UG93ZXJVcCAgICAgICAgICAgICAgIAkJCTB4MjAwCisjZGVmaW5lCQliREE2UG93ZXJVcCAgICAgICAgICAgICAgIAkJCTB4MjAwMAorI2RlZmluZQkJYlh0YWxQb3dlclVwICAgICAgICAgICAgICAJCQkweDQwMDAKKyNkZWZpbmUJCWI0ME1EQ2xrUG93ZXJVUCAgICAgICAgICAgCQkweDgwMDAKKyNkZWZpbmUJCWJEQTZEZWJ1Z01vZGUgICAgICAgICAgICAgCQkweDIwMDAwCisjZGVmaW5lCQliREE2U3dpbmcgICAgICAgICAgICAgICAgIAkJCTB4MzgwMDAwCisKKyNkZWZpbmUJCWJBRENsa1BoYXNlICAgICAgICAgIC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cGJhY2sgICAgICAgICAgICAgIAkJMHgxMDAwMDAwMAorI2RlZmluZQkJYkRBMTBTd2luZyAgICAgICAgICAgICAgICAJCTB4N2UwCisjZGVmaW5lCQliREExMFJldmVyc2UgICAgICAgICAgICAgIAkJMHg4MDAKKyNkZWZpbmUJCWJEQUNsa1NvdXJjZSAgICAgICAgICAgICAgCQkweDEwMDAKKyNkZWZpbmUJCWJBRDdJbnB1dFJhbmdlICAgICAgICAgICAgCQkweDYwMDAKKyNkZWZpbmUJCWJBRDdHYWluICAgICAgICAgICAgICAgICAgCQkJMHgzODAwMAorI2RlZmluZQkJYkFEN091dHB1dENNTW9kZSAgICAgICAgICAJCTB4NDAwMDAKKyNkZWZpbmUJCWJBRDdJbnB1dENNTW9kZSAgICAgICAgICAgCQkweDM4MDAwMAorI2RlZmluZQkJYkFEN0N1cnJlbnQgICAgICAgICAgICAgICAJCQkweGMwMDAwMAorI2RlZmluZQkJYlJlZ3VsYXRvckFkanVzdCAgICAgICAgICAJCTB4NzAwMDAwMAorI2RlZmluZQkJYkFEMTFQb3dlclVwQXRUeCAgICAgICAgICAJCTB4MQorI2RlZmluZQkJYkRBMTBQU0F0VHggICAgICAgICAgICAgICAJCTB4MTAKKyNkZWZpbmUJCWJBRDExUG93ZXJVcEF0UnggICAgICAgICAgCQkweDEwMAorI2RlZmluZQkJYkRBMTBQU0F0UnggICAgICAgICAgICAgICAJCTB4MTAwMAorI2RlZmluZQkJYkNDS1J4QUdDRm9ybWF0ICAgICAgICAgICAJCTB4MjAwCisjZGVmaW5lCQliUFNERkZUU2FtcGxlcFBvaW50ICAgICAgIAkJMHhjMDAwCisjZGVmaW5lCQliUFNEQXZlcmFnZU51bSAgICAgICAgICAgIAkJMHgzMDAwCisjZGVmaW5lCQliSVFQYXRoQ29udHJvbCAgICAgICAgICAgIAkJMHhjMDAKKyNkZWZpbmUJCWJQU0RGcmVxICAgICAgICAgICAgICAgICAgCQkJMHgzZmYKKyNkZWZpbmUJCWJQU0RBbnRlbm5hUGF0aCAgICAgICAgICAgCQkweDMwCisjZGVmaW5lCQliUFNESVFTd2l0Y2ggICAgICAgICAgICAgIAkJMHg0MAorI2RlZmluZQkJYlBTRFJ4VHJpZ2dlciAgICAgICAgICAgICAJCTB4NDAwMDAwCisjZGVmaW5lCQliUFNEVHhUcmlnZ2VyICAgICAgICAgICAgIAkJMHg4MDAwMDAwMAorI2RlZmluZQkJYlBTRFNpbmVUb25lU2NhbGUgICAgICAgIAkJMHg3ZjAwMDAwMAorI2RlZmluZQkJYlBTRFJlcG9ydCAgICAgICAgICAgICAgICAJCQkweGZmZmYKKworLy8gMy4gUGFnZTkoMHg5MDApCisjZGVmaW5lCQliT0ZETVR4U0MgICAgICAgICAgICAgICAgIAkJMHgzMDAwMDAwMAkvLyBVc2VsZXNzCisjZGVmaW5lCQliQ0NLVHhPbiAgICAgICAgICAgICAgICAgIAkJCTB4MQorI2RlZmluZQkJYk9GRE1UeE9uICAgICAgICAgICAgICAgICAJCTB4MgorI2RlZmluZQkJYkRlYnVnUGFnZSAgICAgICAgICAgICAgICAJCTB4ZmZmICAvL3Jlc2V0IGRlYnVnIHBhZ2UgYW5kIGFsc28gSFdvcmQsIExXb3JkCisjZGVmaW5lCQliRGVidWdJdGVtICAgICAgICAgICAgICAgIAkJMHhmZiAgIC8vcmVzZXQgZGVidWcgcGFnZSBhbmQgTFdvcmQKKyNkZWZpbmUJCWJBbnRMICAgICAgICAgICAgICAJICAgICAgIAkJMHgxMAorI2RlZmluZQkJYkFudE5vbkhUICAgICAgICAgICAJICAgICAgCQkJMHgxMDAKKyNkZWZpbmUJCWJBbnRIVDEgICAgICAgICAgICAgICAJCQkweDEwMDAKKyNkZWZpbmUJCWJBbnRIVDIgICAgICAgICAgICAgICAgICAgCQkJMHgxMDAwMAorI2RlZmluZQkJYkFudEhUMVMxICAgICAgICAgICAgICAgICAJCQkweDEwMDAwMAorI2RlZmluZQkJYkFudE5vbkhUUzEgICAgICAgICAgICAgICAJCTB4MTAw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XRlICAgICAgIAkJMHgwMzAwMDAwMAorI2RlZmluZQkJYkNDS1J4RkFDb3VudGVyTG93ZXIgICAgICAJMHhmZgorI2RlZmluZQkJYkNDS1J4RkFDb3VudGVyVXBwZXIgICAgICAJMHhmZjAwMDAwMAorI2RlZmluZQkJYkNDS1J4SFBBR0NTdGFydCAgICAgICAgICAJCTB4ZTAwMAorI2RlZmluZQkJYkNDS1J4SFBBR0NGaW5hbCAgICAgICAgICAJCTB4MWMwMAorI2RlZmluZQkJYkNDS1J4RmFsc2VBbGFybUVuYWJsZSAgICAJMHg4MDAwCisjZGVmaW5lCQliQ0NLRkFDb3VudGVyRnJlZXplICAgICAgIAkJMHg0MDAwCisjZGVmaW5lCQliQ0NLVHhQYXRoU2VsICAgICAgICAgICAgIAkJMHgxMDAwMDAwMAorI2RlZmluZQkJYkNDS0RlZmF1bHRSeFBhdGggICAgICAgICAJCTB4YzAwMDAwMAorI2RlZmluZQkJYkNDS09wdGlvblJ4UGF0aCAgICAgICAgICAJCTB4MzAwMDAwMAorCisvLyA1LiBQYWdlQygweEMwMCkKKyNkZWZpbmUJCWJOdW1PZlNURiAgICAgICAgICAgICAgICAJCQkweDMJLy8gVXNlbGVzcworI2RlZmluZQkJYlNoaWZ0X0wgICAgICAgICAgICAgICAgIAkJCTB4YzAKKyNkZWZpbmUJCWJHSV9USCAgICAgICAgICAgICAgICAgICAJCQkweGMKKyNkZWZpbmUJCWJSeFBhdGhBICAgICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUJCWJSeFBhdGhCICAgICAgICAgICAgICAgICAJCQkweDIKKyNkZWZpbmUJCWJSeFBhdGhDICAgICAgICAgICAgICAgICAJCQkweDQKKyNkZWZpbmUJCWJSeFBhdGhEICAgICAgICAgICAgICAgICAJCQkweDgKKyNkZWZpbmUJCWJUeFBhdGhBICAgICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUJCWJUeFBhdGhCICAgICAgICAgICAgICAgICAJCQkweDIKKyNkZWZpbmUJCWJUeFBhdGhDICAgICAgICAgICAgICAgICAJCQkweDQKKyNkZWZpbmUJCWJUeFBhdGhEICAgICAgICAgICAgICAgICAJCQkweDgKKyNkZWZpbmUJCWJUUlNTSUZyZXEgICAgICAgICAgICAgICAJCQkweDIwMAorI2RlZmluZQkJYkFEQ0JhY2tvZmYgICAgICAgICAgICAgIAkJCTB4MzAwMAorI2RlZmluZQkJYkRGSVJCYWNrb2ZmICAgICAgICAgICAgIAkJCTB4YzAwMAorI2RlZmluZQkJYlRSU1NJTGF0Y2hQaGFzZSAgICAgICAgIAkJMHgxMDAwMAorI2RlZmluZQkJYlJ4SURDT2Zmc2V0ICAgICAgICAgICAgIAkJCTB4ZmYKKyNkZWZpbmUJCWJSeFFEQ09mZnNldCAgICAgICAgICAgICAJCQkweGZmMDAKKyNkZWZpbmUJCWJSeERGSVJNb2RlICAgICAgICAgICAgICAJCTB4MTgwMDAwMAorI2RlZmluZQkJYlJ4RENORlR5cGUgICAgICAgICAgICAgIAkJMHhlMDAwMDAwCisjZGVmaW5lCQliUlhJUUltYl9BICAgICAgICAgICAgICAgCQkJMHgzZmYKKyNkZWZpbmUJCWJSWElRSW1iX0IgICAgICAgICAgICAgICAJCQkweGZjMDAKKyNkZWZpbmUJCWJSWElRSW1iX0MgICAgICAgICAgICAgICAJCQkweDNmMDAwMAorI2RlZmluZQkJYlJYSVFJbWJfRCAgICAgICAgICAgICAgIAkJCTB4ZmZjMDAwMDAKKyNkZWZpbmUJCWJEQ19kY19Ob3RjaCAgICAgICAgICAgICAJCTB4NjAwMDAKKyNkZWZpbmUJCWJSeE5CSU5vdGNoICAgICAgICAgICAgICAJCQkweDFmMDAwMDAwCisjZGVmaW5lCQliUERfVEggICAgICAgICAgICAgICAgICAgCQkJMHhmCisjZGVmaW5lCQliUERfVEhfT3B0MiAgICAgICAgICAgICAgCQkweGMwMDAKKyNkZWZpbmUJCWJQV0VEX1RIICAgICAgICAgICAgICAgICAJCQkweDcwMAorI2RlZmluZQkJYklmTUZfV2luX0wgICAgICAgICAgICAgIAkJCTB4ODAwCisjZGVmaW5lCQliUERfT3B0aW9uICAgICAgICAgICAgICAgCQkJMHgxMDAwCisjZGVmaW5lCQliTUZfV2luX0wgICAgICAgICAgICAgICAgCQkJMHhlMDAwCisjZGVmaW5lCQliQldfU2VhcmNoX0wgICAgICAgICAgICAgCQkweDMwMDAwCisjZGVmaW5lCQlid2luX2VuaF9MICAgICAgICAgICAgICAgCQkJMHhjMDAwMAorI2RlZmluZQkJYkJXX1RIICAgICAgICAgICAgICAgICAgIAkJCTB4NzAwMDAwCisjZGVmaW5lCQliRURfVEgyICAgICAgICAgICAgICAgICAgCQkJMHgzODAwMDAwCisjZGVmaW5lCQliQldfb3B0aW9uICAgICAgICAgICAgICAgCQkJMHg0MDAwMDAwCisjZGVmaW5lCQliUmF0aW9fVEggICAgICAgICAgICAgICAgCQkJMHgxODAwMDAwMAorI2RlZmluZQkJYldpbmRvd19MICAgICAgICAgICAgICAgIAkJCTB4ZTAwMDAwMDAKKyNkZWZpbmUJCWJTQkRfT3B0aW9uICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUJCWJGcmFtZV9USCAgICAgICAgICAgICAgICAJCQkweDFjCisjZGVmaW5lCQliRlNfT3B0aW9uICAgICAgICAgICAgICAgCQkJMHg2MAorI2RlZmluZQkJYkRDX1Nsb3BlX2NoZWNrICAgICAgICAgIAkJMHg4MAorI2RlZmluZQkJYkZHdWFyZF9Db3VudGVyX0RDX0wgICAgIAkJMHhlMDAKKyNkZWZpbmUJCWJGcmFtZV9XZWlnaHRfU2hvcnQgICAgICAJCTB4NzAwMAorI2RlZmluZQkJYlN1Yl9UdW5lICAgICAgICAgICAgICAgIAkJCTB4ZTAwMDAwCisjZGVmaW5lCQliRnJhbWVfRENfTGVuZ3RoICAgICAgICAgCQkweGUwMDAwMDAKKyNkZWZpbmUJCWJTQkRfc3RhcnRfb2Zmc2V0ICAgICAgICAJCTB4MzAwMDAwMDAKKyNkZWZpbmUJCWJGcmFtZV9USF8yICAgICAgICAgICAgICAJCTB4NworI2RlZmluZQkJYkZyYW1lX0dJMl9USCAgICAgICAgICAgIAkJMHgzOAorI2RlZmluZQkJYkdJMl9TeW5jX2VuICAgICAgICAgICAgIAkJMHg0MAorI2RlZmluZQkJYlNhcmNoX1Nob3J0X0Vhcmx5ICAgICAgIAkJMHgzMDAKKyNkZWZpbmUJCWJTYXJjaF9TaG9ydF9MYXRlICAgICAgICAJCTB4YzAwCisjZGVmaW5lCQliU2FyY2hfR0kyX0xhdGUgICAgICAgICAgCQkweDcwMDAwCisjZGVmaW5lCQliQ0ZPQW50U3VtICAgICAgICAgICAgICAgCQkweDEKKyNkZWZpbmUJCWJDRk9BY2MgICAgICAgICAgICAgICAgICAJCQkweDIKKyNkZWZpbmUJCWJDRk9TdGFydE9mZnNldCAgICAgICAgICAJCTB4YworI2RlZmluZQkJYkNGT0xvb2tCYWNrICAgICAgICAgICAgIAkJMHg3MAorI2RlZmluZQkJYkNGT1N1bVdlaWdodCAgICAgICAgICAgIAkJMHg4MAorI2RlZmluZQkJYkRBR0NFbmFibGUgICAgICAgICAgICAgIAkJCTB4MTAwMDAKKyNkZWZpbmUJCWJUWElRSW1iX0EgICAgICAgICAgICAgICAJCQkweDNmZgorI2RlZmluZQkJYlRYSVFJbWJfQiAgICAgICAgICAgICAgIAkJCTB4ZmMwMAorI2RlZmluZQkJYlRYSVFJbWJfQyAgICAgICAgICAgICAgIAkJCTB4M2YwMDAwCisjZGVmaW5lCQliVFhJUUltYl9EICAgICAgICAgICAgICAgCQkJMHhmZmMwMDAwMAorI2RlZmluZQkJYlR4SURDT2Zmc2V0ICAgICAgICAgICAgIAkJCTB4ZmYKKyNkZWZpbmUJCWJUeFFEQ09mZnNldCAgICAgICAgICAgICAJCQkweGZmMDAKKyNkZWZpbmUJCWJUeERGSVJNb2RlICAgICAgICAgICAgICAJCTB4MTAwMDAKKyNkZWZpbmUJCWJUeFBlc3Vkb05vaXNlT24gICAg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AgICAweDEwMDAwMDAwCisjZGVmaW5lCQliUnhRdWlja0FHQ0VuICAgICAgICAgICAgMHgyMDAwMDAwMAorI2RlZmluZQkJYlJ4QUdDRnJlZXplVGhyZXNNb2RlICAgIDB4NDAwMDAwMDAKKyNkZWZpbmUJCWJSeE92ZXJGbG93Q2hlY2tUeXBlICAgICAweDgwMDAwMDAwCisjZGVmaW5lCQliUnhBR0NTaGlmdCAgICAgICAgICAgICAgMHg3ZgorI2RlZmluZQkJYlRSU1dfVHJpX09ubHkgICAgICAgICAgIDB4ODAKKyNkZWZpbmUJCWJQb3dlclRocmVzICAgICAgICAgICAgICAweDMwMAorI2RlZmluZQkJYlJ4QUdDRW4gICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZQkJYlJ4QUdDVG9nZXRoZXJFbiAgICAgICAgIDB4MgorI2RlZmluZQkJYlJ4QUdDTWluICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZQkJYlJ4SFBfSW5pICAgICAgICAgICAgICAgIDB4NworI2RlZmluZQkJYlJ4SFBfVFJMTkEgICAgICAgICAgICAgIDB4NzAKKyNkZWZpbmUJCWJSeEhQX1JTU0kgICAgICAgICAgICAgICAweDcwMAorI2RlZmluZQkJYlJ4SFBfQkJQMSAgICAgICAgICAgICAgIDB4NzAwMAorI2RlZmluZQkJYlJ4SFBfQkJQMiAgICAgICAgICAgICAgIDB4NzAwMDAKKyNkZWZpbmUJCWJSeEhQX0JCUDMgICAgICAgICAgICAgICAweDcwMDAwMAorI2RlZmluZQkJYlJTU0lfSCAgICAgICAgICAgICAgICAgIDB4N2YwMDAwICAgICAvL3RoZSB0aHJlc2hvbGQgZm9yIGhpZ2ggcG93ZXIKKyNkZWZpbmUJCWJSU1NJX0dlbiAgICAgICAgICAgICAgICAweDdmMDAwMDAwICAgLy90aGUgdGhyZXNob2xkIGZvciBhbnQgZGl2ZXJzaXR5CisjZGVmaW5lCQliUnhTZXR0bGVfVFJTVyAgICAgICAgICAgMHg3CisjZGVmaW5l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V9USCAgICAgICAgICAgICAgICAweGMwMDAwMDAwCisjZGVmaW5lCQliREZTQ250MCAgICAgICAgICAgICAgICAgMHhmZgorI2RlZmluZQkJYkRGU0NudDEgICAgICAgICAgICAgICAgIDB4ZmYwMAorI2RlZmluZQkJYkRGU0ZsYWcgICAgICAgICAgICAgICAgIDB4ZjAwMDAKKyNkZWZpbmUJCWJNRldlaWdodFN1bSAgICAgICAgICAgICAweDMwMDAwMAorI2RlZmluZQkJYk1pbklkeFRIICAgICAgICAgICAgICAgIDB4N2YwMDAwMDAKKyNkZWZpbmUJCWJEQUZvcm1hdCAgICAgICAgICAgICAgICAweDQwMDAwCisjZGVmaW5lCQliVHhDaEVtdUVuYWJsZSAgICAgICAgICAgMHgwMTAwMDAwMAorI2RlZmluZQkJYlRSU1dJc29sYXRpb25fQSAgICAgICAgIDB4N2YKKyNkZWZpbmUJCWJUUlNXSXNvbGF0aW9uX0IgICAgICAgICAweDdmMDAKKyNkZWZpbmUJCWJUUlNXSXNvbGF0aW9uX0MgICAgICAgICAweDdmMDAwMAorI2RlZmluZQkJYlRSU1dJc29sYXRpb25fRCAgICAgICAgIDB4N2YwMDAwMDAKKyNkZWZpbmUJCWJFeHRMTkFHYWluICAgICAgICAgICAgICAweDdjMDAKKworLy8gNi4gUGFnZUUoMHhFMDApCisjZGVmaW5lCQliU1RCQ0VuICAgICAgICAgICAgICAgICAgMHg0CS8vIFVzZWxlc3MKKyNkZWZpbmUJCWJBbnRlbm5hTWFwcGluZyAgICAgICAgICAweDEwCisjZGVmaW5lCQliTnNzICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZQkJYkNGT0FudFN1bUQgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lCQliUEhZQ291bnRlclJlc2V0ICAgICAgICAgMHg4MDAwMDAwCisjZGVmaW5lCQliQ0ZPUmVwb3J0R2V0ICAgICAgICAgICAgMHg0MDAwMDAwCisjZGVmaW5lCQliT0ZETUNvbnRpbnVlVHggICAgICAgICAgMHgxMDAwMDAwMAorI2RlZmluZQkJYk9GRE1TaW5nbGVDYXJyaWVyICAgICAgIDB4MjAwMDAwMDAKKyNkZWZpbmUJCWJPRkRNU2luZ2xlVG9uZSAgICAgICAgICAweDQwMDAwMDAwCisvLyNkZWZpbmUgYlJ4UGF0aDEgICAgICAgICAgICAgICAgIDB4MDEKKy8vI2RlZmluZSBiUnhQYXRoMiAgICAgICAgICAgICAgICAgMHgwMgorLy8jZGVmaW5lIGJSeFBhdGgzICAgICAgICAgICAgICAgICAweDA0CisvLyNkZWZpbmUgYlJ4UGF0aDQgICAgICAgICAgICAgICAgIDB4MDgKKy8vI2RlZmluZSBiVHhQYXRoMSAgICAgICAgICAgICAgICAgMHgxMAorLy8jZGVmaW5lIGJUeFBhdGgyICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lCQliSFREZXRlY3QgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUJCWJDRk9FbiAgICAgICAgICAgICAgICAgICAweDEwMDAwCisjZGVmaW5lCQliQ0ZPVmFsdWUgICAgICAgICAgICAgICAgMHhmZmYwMDAwMAorI2RlZmluZQkJYlNpZ1RvbmVfUmUgICAgICAgICAgICAgIDB4M2YKKyNkZWZpbmUJCWJTaWdUb25lX0ltICAgICAgICAgICAgICAweDdmMDAKKyNkZWZpbmUJCWJDb3VudGVyX0NDQSAgICAgICAgICAgICAweGZmZmYKKyNkZWZpbmUJCWJDb3VudGVyX1Bhcml0eUZhaWwgICAgICAweGZmZmYwMDAwCisjZGVmaW5lCQliQ291bnRlcl9SYXRlSWxsZWdhbCAgICAgMHhmZmZmCisjZGVmaW5lCQliQ291bnRlcl9DUkM4RmFpbCAgICAgICAgMHhmZmZmMDAwMAorI2RlZmluZQkJYkNvdW50ZXJfTUNTTm9TdXBwb3J0ICAgIDB4ZmZmZgorI2RlZmluZQkJYkNvdW50ZXJfRmFzdFN5bmMgICAgICAgIDB4ZmZmZgorI2RlZmluZQkJYlNob3J0Q0ZPICAgICAgICAgICAgICAgIDB4ZmZmCisjZGVmaW5lCQliU2hvcnRDRk9UTGVuZ3RoICAgICAgICAgMTIgICAvL3RvdGFsCisjZGVmaW5lCQliU2hvcnRDRk9GTGVuZ3RoICAgICAgICAgMTEgICAvL2ZyYWN0aW9uCisjZGVmaW5lCQliTG9uZ0NGTyAgICAgICAgICAgICAgICAgMHg3ZmYKKyNkZWZpbmUJCWJMb25nQ0ZPVExlbmd0aCAgICAgICAgICAxMQorI2RlZmluZQkJYkxvbmdDRk9GTGVuZ3RoICAgICAgICAgIDExCisjZGVmaW5lCQliVGFpbENGTyAgICAgICAgICAgICAgICAgMHgxZmZmCisjZGVmaW5lCQliVGFpbENGT1RMZW5ndGggICAgICAgICAgMTMKKyNkZWZpbmUJCWJUYWlsQ0ZPRkxlbmd0aCAgICAgICAgICAxMgorI2RlZmluZQkJYm1heF9lbl9wd2RCICAgICAgICAgICAgIDB4ZmZmZgorI2RlZmluZQkJYkNDX3Bvd2VyX2RCICAgICAgICAgICAgIDB4ZmZmZjAwMDAKKyNkZWZpbmUJCWJub2lzZV9wd2RCICAgICAgICAgICAgICAweGZmZmYKKyNkZWZpbmUJCWJQb3dlck1lYXNUTGVuZ3RoICAgICAgICAxMAorI2RlZmluZQkJYlBvd2VyTWVhc0ZMZW5ndGggICAgICAgIDMKKyNkZWZpbmUJCWJSeF9IVF9CVyAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUJCWJSeFNDICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUJCWJSeF9IVCAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUJCWJOQl9pbnRmX2RldF9vbiAgICAgICAgICAweDEKKyNkZWZpbmUJCWJJbnRmX3dpbl9sZW5fY2ZnICAgICAgICAweDMwCisjZGVmaW5lCQliTkJfSW50Zl9USF9jZmcgICAgICAgICAgMHgxYzAKKyNkZWZpbmUJCWJSRkdhaW4gICAgICAgICAgICAgICAgICAweDNmCisjZGVmaW5lCQliVGFibGVTZWwgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZQkJYlRSU1cgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUJCWJSeFNOUl9BICAgICAgICAgICAgICAgICAweGZmCisjZGVmaW5lCQliUnhTTlJfQiAgICAgICAgICAgICAgICAgMHhmZjAwCisjZGVmaW5lCQliUnhTTlJfQyAgICAgICAgICAgICAgICAgMHhmZjAwMDAKKyNkZWZpbmUJCWJSeFNOUl9EICAgICAgICAgICAgICAgICAweGZmMDAwMDAwCisjZGVmaW5lCQliU05SRVZNVExlbmd0aCAgICAgICAgICAgOAorI2RlZmluZQkJYlNOUkVWTUZMZW5ndGggICAgICAgICAgIDEKKyNkZWZpbmUJCWJDU0kxc3QgICAgICAgICAgICAgICAgICAweGZmCisjZGVmaW5lCQliQ1NJMm5kICAgICAgICAgICAgICAgICAgMHhmZjAwCisjZGVmaW5lCQliUnhFVk0xc3QgICAgICAgICAgICAgICAgMHhmZjAwMDAKKyNkZWZpbmUJCWJSeEVWTTJuZCAgICAgICAgICAgICAgICAweGZmMDAwMDAwCisjZGVmaW5lCQliU0lHRVZNICAgICAgICAgICAgICAgICAgMHhmZgorI2RlZmluZQkJYlBXREIgICAgICAgICAgICAgICAgICAgIDB4ZmYwMAorI2RlZmluZQkJYlNHSUVOICAgICAgICAgICAgICAgICAgIDB4MTAwMDAKKworI2RlZmluZQkJYlNGYWN0b3JRQU0xICAgICAgICAgICAgIDB4ZgkvLyBVc2VsZXNzCisjZGVmaW5lCQliU0ZhY3RvclFBTTIgICAgICAgICAgICAgMHhmMAorI2RlZmluZQkJYlNGYWN0b3JRQU0zICAgICAgICAgICAgIDB4ZjAwCisjZGVmaW5lCQliU0ZhY3RvclFBTTQgICAgICAgICAgICAgMHhmMDAwCisjZGVmaW5lCQliU0ZhY3RvclFBTTUgICAgICAgICAgICAgMHhmMDAwMAorI2RlZmluZQkJYlNGYWN0b3JRQU02ICAgICAgICAgICAgIDB4ZjAwMDAKKyNkZWZpbmUJCWJTRmFjdG9yUUFNNyAgICAgICAgICAgICAweGYwMDAwMAorI2RlZmluZQkJYlNGYWN0b3JRQU04ICAgICAgICAgICAgIDB4ZjAwMDAwMAorI2RlZmluZQkJYlNGYWN0b3JRQU05ICAgICAgICAgICAgIDB4ZjAwMDAwMDAKKyNkZWZpbmUJCWJDU0lTY2hlbWUgICAgICAgICAgICAgICAweDEwMDAwMAorCisjZGVmaW5lCQliTm9pc2VMdmxUb3BTZXQgICAgICAgICAgMHgzCS8vIFVzZWxlc3MKKyNkZWZpbmUJCWJDaFNtb290aCAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUJCWJDaFNtb290aENmZzEgICAgICAgICAgICAweDM4CisjZGVmaW5lCQliQ2hTbW9vdGhDZmcyICAgICAgICAgICAgMHgxYzAKKyNkZWZpbmUJCWJDaFNtb290aENmZzMgICAgICAgICAgICAweGUwMAorI2RlZmluZQkJYkNoU21vb3RoQ2ZnNCAgICAgICAgICAgIDB4NzAwMAorI2RlZmluZQkJYk1SQ01vZGUgICAgICAgICAgICAgICAgIDB4ODAwMDAwCisjZGVmaW5lCQliVEhFVk1DZmcgICAgICAgICAgICAgICAgMHg3MDAwMDAwCisKKyNkZWZpbmUJCWJMb29wRml0VHlwZSAgICAgICAgICAgICAweDEJLy8gVXNlbGVzcworI2RlZmluZQkJYlVwZENGTyAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUJCWJVcGRDRk9PZmZEYXRhICAgICAgICAgICAweDgwCisjZGVmaW5lCQliQWR2VXBkQ0ZPICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUJCWJBZHZUaW1lQ3RybCAgICAgICAgICAgICAweDgwMAorI2RlZmluZQkJYlVwZENsa28gICAgICAgICAgICAgICAgIDB4MTAwMAorI2RlZmluZQkJYkZDICAgICAgICAgICAgICAgICAgICAgIDB4NjAwMAorI2RlZmluZQkJYlRyYWNraW5nTW9kZSAgICAgICAgICAgIDB4ODAwMAorI2RlZmlu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VyAgICAgICAgICAweDYwMAorCisvL1JUTDgyNTgKKyNkZWZpbmUJCWJSVEw4MjU4X1R4TFBGQlcgICAgICAgICAgMHhjCS8vIFVzZWxlc3MKKyNkZWZpbmUJCWJSVEw4MjU4X1J4TFBGQlcgICAgICAgICAgMHhjMDAKKyNkZWZpbmUJCWJSVEw4MjU4X1JTU0lMUEZCVyAgICAgICAgMHhjMAorCisKKy8vCisvLyBPdGhlciBEZWZpbml0aW9uCisvLworCisvL2J5dGUgZW5kYWJsZSBmb3Igc2Jfd3JpdGUKKyNkZWZpbmUJCWJCeXRlMCAgICAgICAgICAgICAgICAgICAgMHgxCS8vIFVzZWxlc3MKKyNkZWZpbmUJCWJCeXRlMSAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lCQliQnl0ZTIgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZQkJYkJ5dGUzICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUJCWJXb3JkMCAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lCQliV29yZDEgICAgICAgICAgICAgICAgICAgIDB4YworI2RlZmluZQkJYkRXb3JkICAgICAgICAgICAgICAgICAgICAweGYKKworLy9mb3IgUHV0UmVnc2V0dGluZyAmIEdldFJlZ1NldHRpbmcgQml0TWFzaworI2RlZmluZQkJYk1hc2tCeXRlMCAgICAgICAgICAgICAgICAweGZmCS8vIFJlZyAweGM1MCByT0ZETTBfWEFBR0NDb3JlfjB4QzZmCisjZGVmaW5lCQliTWFza0J5dGUxICAgICAgICAgICAgICAgIDB4ZmYwMAorI2RlZmluZQkJYk1hc2tCeXRlMiAgICAgICAgICAgICAgICAweGZmMDAwMAorI2RlZmluZQkJYk1hc2tCeXRlMyAgICAgICAgICAgICAgICAweGZmMDAwMDAwCisjZGVmaW5lCQliTWFza0hXb3JkICAgICAgICAgICAgICAgIDB4ZmZmZjAwMDAKKyNkZWZpbmUJCWJNYXNrTFdvcmQgICAgICAgICAgICAgICAgMHgwMDAwZmZmZgorI2RlZmluZQkJYk1hc2tEV29yZCAgICAgICAgICAgICAgICAweGZmZmZmZmZmCisKKy8vZm9yIFB1dFJGUmVnc2V0dGluZyAmIEdldFJGUmVnU2V0dGluZyBCaXRNYXNrCisjZGVmaW5lCQliTWFzazEyQml0cyAgICAgICAgICAgICAgIDB4ZmZmZmYJLy8gUkYgUmVnIG1hc2sgYml0cworI2RlZmluZQkJYk1hc2syMEJpdHMgICAgICAgICAgICAgICAweGZmZmZmCS8vIFJGIFJlZyBtYXNrIGJpdHMgVDY1IFJGCisjZGVmaW5lIAkJYlJGUmVnT2Zmc2V0TWFzawkJMHhmZmZmZgorCisjZGVmaW5lCQliRW5hYmxlICAgICAgICAgICAgICAgICAgIDB4MQkvLyBVc2VsZXNzCisjZGVmaW5lCQliRGlzYWJsZSAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lCQlMZWZ0QW50ZW5uYSAgICAgICAgICAgICAgIDB4MAkvLyBVc2VsZXNzCisjZGVmaW5lCQlSaWdodEFudGVubmEgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lCQl0Q2hlY2tUeFN0YXR1cyAgICAgICAgICAgIDUwMCAgIC8vNTAwbXMgLy8gVXNlbGVzcworI2RlZmluZQkJdFVwZGF0ZVJ4Q291bnRlciAgICAgICAgICAxMDAgICAvLzEwMG1zCisKKyNkZWZpbmUJCXJhdGVDQ0sgICAgIDAJLy8gVXNlbGVzcworI2RlZmluZQkJcmF0ZU9GRE0gICAgMQorI2RlZmluZQkJcmF0ZUhUICAgICAgMgorCisvL2RlZmluZSBSZWdpc3Rlci1FbmQKKyNkZWZpbmUJCWJQTUFDX0VuZCAgICAgICAgICAgICAgICAgMHgxZmYJLy8gVXNlbGVzcworI2RlZmluZQkJYkZQR0FQSFkwX0VuZCAgICAgICAgICAgICAweDhmZgorI2RlZmluZQkJYkZQR0FQSFkxX0VuZCAgICAgICAgICAgICAweDlmZgorI2RlZmluZQkJYkNDS1BIWTBfRW5kICAgICAgICAgICAgICAweGFmZgorI2RlZmluZQkJYk9GRE1QSFkwX0VuZCAgICAgICAgICAgICAweGNmZgorI2RlZmluZQkJYk9GRE1QSFkxX0VuZCAgICAgICAgICAgICAweGRmZgorCisvL2RlZmluZSBtYXggZGVidWcgaXRlbSBpbiBlYWNoIGRlYnVnIHBhZ2UKKy8vI2RlZmluZSBiTWF4SXRlbV9GUEdBX1BIWTAgICAgICAgIDB4OQorLy8jZGVmaW5lIGJNYXhJdGVtX0ZQR0FfUEhZMSAgICAgICAgMHgzCisvLyNkZWZpbmUgYk1heEl0ZW1fUEhZXzExQiAgICAgICAgICAweDE2CisvLyNkZWZpbmUgYk1heEl0ZW1fT0ZETV9QSFkwICAgICAgICAweDI5CisvLyNkZWZpbmUgYk1heEl0ZW1fT0ZETV9QSFkxICAgICAgICAweDAKKworI2RlZmluZQkJYlBNQUNDb250cm9sICAgICAgICAgICAgICAweDAJCS8vIFVzZWxlc3MKKyNkZWZpbmUJCWJXTUFDQ29udHJvbCAgICAgICAgICAgICAgMHgxCisjZGVmaW5lCQliV05JQ0NvbnRyb2wgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lCQlQYXRoQSAgICAgICAgICAgICAgICAgICAgIDB4MAkvLyBVc2VsZXNzCisjZGVmaW5lCQlQYXRoQiAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZQkJUGF0aEMgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUJCVBhdGhEICAgICAgICAgICAgICAgICAgICAgMHgzCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1EZWZpbmUgUGFyYW1ldGVycy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKyNlbmRpZgkvL19fSU5DX0hBTDgxOTJTUEhZUkVHX0gKKwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJzdS9yODE5MlNfcnRsNjA1Mi5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJzdS9yODE5MlNfcnRsNjA1Mi5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjcxY2FmODEKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MnN1L3I4MTkyU19ydGw2MDUyLmMKQEAgLTAsMCArMSw5NDYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiAgICAgKGMpIENvcHlyaWdodCAgMjAwOCwgUmVhbFRFSyBUZWNobm9sb2dpZXMgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLgorICoKKyAqIE1vZHVsZToJSGFsUmY2MDUyLmMJKCBTb3VyY2UgQyBGaWxlKQorICoKKyAqIE5vdGU6CVByb3ZpZGUgUkYgNjA1MiBzZXJpZXMgcmVsYXRpdmUgQVBJLgorICoKKyAqIEZ1bmN0aW9uOgorICoKKyAqIEV4cG9ydDoKKyAqCisgKiBBYmJyZXY6CisgKgorICogSGlzdG9yeToKKyAqIERhdGEJCQlXaG8JCVJlbWFyaworICoKKyAqIDA5LzI1LzIwMDgJTUhDCQlDcmVhdGUgaW5pdGlhbCB2ZXJzaW9uLgorICogMTEvMDUvMjAwOCAJTUhDCQlBZGQgQVBJIGZvciB0dyBwb3dlciBzZXR0aW5nLgorICoKKyAqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaW5jbHVkZSAicjgxOTJVLmgiCisjaW5jbHVkZSAicjgxOTJTX3J0bDYwNTIuaCIKKworI2lmZGVmIFJUTDgxOTJTVQorI2luY2x1ZGUgInI4MTkyU19ody5oIgorI2luY2x1ZGUgInI4MTkyU19waHlyZWcuaCIKKyNpbmNsdWRlICJyODE5MlNfcGh5LmgiCis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MHgwMDAwMDQwMAorI2RlZmluZSBCSVQxMSAgICAgICAgICAgMHgwMDAwMDgwMAorI2RlZmluZSBCSVQxMiAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBCSVQxMyAgICAgICAgICAgMHgwMDAwMjAwMAorI2RlZmluZSBCSVQxNCAgICAgICAgICAgMHgwMDAwNDAwMAorI2RlZmluZSBCSVQxNSAgICAgICAgICAgMHgwMDAwODAwMAorI2RlZmluZSBCSVQxNiAgICAgICAgICAgMHgwMDAxMDAwMAorI2RlZmluZSBCSVQxNyAgICAgICAgICAgMHgwMDAyMDAwMAorI2RlZmluZSBCSVQxOCAgICAgICAgICAgMHgwMDA0MDAwMAorI2RlZmluZSBCSVQxOSAgICAgICAgICAgMHgwMDA4MDAwMAorI2RlZmluZSBCSVQyMCAgICAgICAgICAgMHgwMDEwMDAwMAorI2RlZmluZSBCSVQyMSAgICAgICAgICAgMHgwMDIwMDAwMAorI2RlZmluZSBCSVQyMiAgICAgICAgICAgMHgwMDQwMDAwMAorI2RlZmluZSBCSVQyMyAgICAgICAgICAgMHgwMDgwMDAwMAorI2RlZmluZSBCSVQyNCAgICAgICAgICAgMHgwMTAwMDAwMAorI2RlZmluZSBCSVQyNSAgICAgICAgICAgMHgwMjAwMDAwMAorI2RlZmluZSBCSVQyNiAgICAgICAgICAgMHgwNDAwMDAwMAorI2RlZmluZSBCSVQyNyAgICAgICAgICAgMHgwODAwMDAwMAorI2RlZmluZSBCSVQyOCAgICAgICAgICAgMHgxMDAwMDAwMAorI2RlZmluZSBCSVQyOSAgICAgICAgICAgMHgyMDAwMDAwMAorI2RlZmluZSBCSVQzMCAgICAgICAgICAgMHg0MDAwMDAwMAorI2RlZmluZSBCSVQzMSAgICAgICAgICAgMHg4MDAwMDAwMAorCisvLyBSeCBzbW9vdGggZmFjdG9yCisjZGVmaW5lCVJ4X1Ntb290aF9GYWN0b3IJCTIwCisjaWYgMCAvL3dlIG5lZWQgdG8gdXNlIFJUX1RSQUNF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ICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHByaW50ayggIkFzc2VydGlvbiBmYWlsZWQhICVzLCVzLCVzLGxpbmU9JWRcbiIsIFwKKyAgICAgICAgICAgICAgICAjZXhwcixfX0ZJTEVfXyxfX0ZVTkNUSU9OX18sX19MSU5FX18pOyAgICAgICAgICBcCisgICAgICAgIH0KKy8vd2IgYWRkZWQgdG8gZGVidWcgb3V0IGRhdGEgYnVmCisvL2lmIHlvdSB3YW50IHByaW50IERBVEEgYnVmZmVyIHJlbGF0ZWQgQkEsIHBsZWFzZSBzZXQgaWVlZTgwMjExX2RlYnVnX2xldmVsIHRvIERBVEF8QkEKKyNkZWZpbmUgUlRfREVCVUdfREFUQShsZXZlbCwgZGF0YSwgZGF0YWxlbikgICAgICBcCisgICAgICAgIGRveyBpZiAoKHJ0X2dsb2JhbF9kZWJ1Z19jb21wb25lbnQgJiAobGV2ZWwpKSA9PSAobGV2ZWwpKSAgIFwKKyAgICAgICAgICAgICAgICB7ICAgICAgIFwKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICB1OCogcGRhdGEgPSAodTgqKSBkYXRhOyAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fREVCVUcgUlRMODE5eFVfTU9EVUxFX05BTUUgIjogJXMoKVxuIiwgX19GVU5DVElPTl9fKTsgICBcCisgICAgICAgICAgICAgICAgICAgICAgICBmb3IoaT0wOyBpPChpbnQpKGRhdGFsZW4pOyBpKyspICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiJTJ4ICIsIHBkYXRhW2ldKTsgICAgICAgICAgICAgICBcCisgICAgIC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9SRUdfdG8yVDJSX0FycmF5CQkJUnRsODE5MlNVUEhZX0NoYW5nZVRvXzJUMlJBcnJheQorCSNkZWZpbmUgUnRsODE5WFBIWV9SRUdfQXJyYXlfUEcJCQkJUnRsODE5MlNVUEhZX1JFR19BcnJheV9QRworCSNkZWZpbmUgUnRsODE5WFJhZGlvQV9BcnJheQkJCQkJUnRsODE5MlNVUmFkaW9BXzFUX0FycmF5CisJI2RlZmluZSBSdGw4MTlYUmFkaW9CX0FycmF5CQkJCQlSdGw4MTkyU1VSYWRpb0JfQXJyYXkKKwkjZGVmaW5lIFJ0bDgxOVhSYWRpb0JfR01fQXJyYXkJCQkJUnRsODE5MlNVUmFkaW9CX0dNX0FycmF5CisJI2RlZmluZSBSdGw4MTlYUmFkaW9BX3RvMVRfQXJyYXkJCQkJUnRsODE5MlNVUmFkaW9BX3RvMVRfQXJyYXkKKwkjZGVmaW5lIFJ0bDgxOVhSYWRpb0FfdG8yVF9BcnJheQkJCQlSdGw4MTkyU1VSYWRpb0FfdG8yVF9BcnJheQorLy8jZW5kaWYKKworLy8KKy8vIFF1ZXVlIFNlbGVjdCBWYWx1ZSBpbiBUeERlc2MKKy8vCisjZGVmaW5lIFFTTFRfQksgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgUVNMVF9CRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRU0xUX1ZJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIFFTTFRfVk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgUVNMVF9CRUFDT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgUVNMVF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTEKKyNkZWZpbmUgUVNMVF9NR05UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTIKKyNkZWZpbmUgUVNMVF9DTUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTMKKworI2RlZmluZSBERVNDOTBfUkFURTFNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBERVNDOTBfUkFURTJNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBERVNDOTBfUkFURTVfNU0gICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBERVNDOTBfUkFURTExTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmluZSBERVNDOTBfUkFURTZNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBERVNDOTBfUkFURTlNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNQorI2RlZmluZSBERVNDOTBfUkFURTEyTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBERVNDOTBfUkFURTE4TSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNworI2RlZmluZSBERVNDOTBfUkFURTI0TSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorI2RlZmluZSBERVNDOTBfUkFURTM2TSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOQorI2RlZmluZSBERVNDOTBfUkFURTQ4TSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYQorI2RlZmluZSBERVNDOTBfUkFURTU0TSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwYgorI2RlZmluZSBERVNDOTBfUkFURU1DUzAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBERVNDOTBfUkFURU1DUzEgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBERVNDOTBfUkFURU1DUzIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBERVNDOTBfUkFURU1DUzMgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmluZSBERVNDOTBfUkFURU1DUzQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBERVNDOTBfUkFURU1DUzUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNQorI2RlZmluZSBERVNDOTBfUkFURU1DUzYgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBERVNDOTBfUkFURU1DUzcgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNworI2RlZmluZSBERVNDOTBfUkFURU1DUzggICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorI2RlZmluZSBERVNDOTBfUkFURU1DUzkgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOQorI2RlZmluZSBERVNDOTBfUkFURU1DUzEwICAgICAgICAgICAgICAgICAgICAgICAgMHgwYQorI2RlZmluZSBERVNDOTBfUkFURU1DUzExICAgICAgICAgICAgICAgICAgICAgICAgMHgwYgorI2RlZmluZSBERVNDOTBfUkFURU1DUzEyICAgICAgICAgICAgICAgICAgICAgICAgMHgwYworI2RlZmluZSBERVNDOTBfUkFURU1DUzEzICAgICAgICAgICAgICAgICAgICAgICAgMHgwZAorI2RlZmluZSBERVNDOTBfUkFURU1DUzE0ICAgICAgICAgICAgICAgICAgICAgICAgMHgwZQorI2RlZmluZSBERVNDOTBfUkFURU1DUzE1ICAgICAgICAgICAgICAgICAgICAgICAgMHgwZgorI2RlZmluZSBERVNDOTBfUkFURU1DUzMyICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorCisvLyNpZmRlZiBSVEw4MTkyU1UKKy8vIENDSyBSYXRlcywgVHhIVCA9IDAKKyNkZWZpbmUgREVTQzkyU19SQVRFMU0JCQkJCTB4MDAKKyNkZWZpbmUgREVTQzkyU19SQVRFMk0JCQkJCTB4MDEKKyNkZWZpbmUgREVTQzkyU19SQVRFNV81TQkJCQkweDAyCisjZGVmaW5lIERFU0M5MlNfUkFURTExTQkJCQkJMHgwMworCisvLyBPRkRNIFJhdGVzLCBUeEhUID0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gJCVJ4QUdDMTsKKwl1OAkJUnhBR0MyOworCXU4CQlSeEFHQzM7CisJdTgJCVJ4QUdDNDsKK310eF9zdGF0dXNfZGVzY184MTkyc191c2IsICpwdHhfc3RhdHVzX2Rlc2NfODE5MnNfdXNiOworI2Vsc2UKKy8qIGZvciBydGw4MTl4ICovCit0eXBlZGVmIHN0cnVjdCBfdHhfZGVzY184MTl4X3VzYiB7CisgICAgICAgIC8vRFdPUkQgMAorICAgICAgICB1MTYJUGt0U2l6ZTsKKyAgICAgICAgdTgJT2Zmc2V0OworICAgICAgICB1OAlSZXNlcnZlZDA6MzsKKyAgICAgICAgdTgJQ21kSW5pdDoxOworICAgICAgICB1OAlMYXN0U2VnOjE7CisgICAgICAgIHU4CUZpcnN0U2VnOjE7CisgICAgICAgIHU4CUxJTklQOjE7CisgICAgICAgIHU4CU9XTjoxOworCisgICAgICAgIC8vRFdPUkQgMQorICAgICAgICB1OAlUeEZXSW5mb1NpemU7CisgICAgICAgIHU4CVJBVGlkOjM7CisgICAgICAgIHU4CURJU0ZCOjE7CisgICAgICAgIHU4CVVTRVJBVEU6MTsKKyAgICAgICAgdTgJTU9SRUZSQUc6MTsKKyAgICAgICAgdTgJTm9FbmM6MTsKKyAgICAgICAgdTgJUElGUzoxOworICAgICAgICB1OAlRdWV1ZVNlbGVjdDo1OworICAgICAgICB1OAlOb0FDTToxOworICAgICAgICB1OAlSZXNlcnZlZDE6MjsKKyAgICAgICAgdTgJU2VjQ0FNSUQ6NTsKKyAgICAgICAgdTgJU2VjRGVzY0Fzc2lnbjoxOworICAgICAgICB1OAlTZWNUeXBlOjI7CisKKyAgICAgICAgLy9EV09SRCAyCisgICAgICAgIHUxNglUeEJ1ZmZlclNpemU7CisgICAgICAgIC8vdTE2IFJlc2VydmVkMjsKKyAgICAgICAgdTgJUmVzdkZvclBhZGRpbmdMZW46NzsKKyAgICAgICAgdTgJUmVzZXJ2ZWQzOjE7CisgICAgICAgIHU4CVJlc2VydmVkNDsKKworICAg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kvL0RXT1JEIDUKKwl1MzIJCVRTRkw7CisvL31SWF9ERVNDX1NUQVRVU184MTkyU1UsICpQUlhfREVTQ19TVEFUVVNfODE5MlNVOworfXJ4X2Rlc2NfODE5eF91c2IsICpwcnhfZGVzY184MTl4X3VzYjsKKyNlbHNlCit0eXBlZGVmIHN0cnVjdCByeF9kZXNjXzgxOXhfdXNieworCS8vRE9XUkQgMAorCXUxNiAgICAgICAgICAgICAgICAgTGVuZ3RoOjE0OworCXUxNiAgICAgICAgICAgICAgICAgQ1JDMzI6MTsKKwl1MTYgICAgICAgICAgICAgICAgIElDVjoxOworCXU4ICAgICAgICAgICAgICAgICAgUnhEcnZJbmZvU2l6ZTsKKwl1OCAgICAgICAgICAgICAgICAgIFNoaWZ0OjI7CisJdTggICAgICAgICAgICAgICAgICBQSFlTdGF0dXM6MTsKKwl1OCAgICAgICAgICAgICAgICAgIFNXRGVjOjE7CisJLy91OCAgICAgICAgICAgICAgICBMYXN0U2VnOjE7CisJLy91OCAgICAgICAgICAgICAgICBGaXJzdFNlZzoxOworCS8vdTggICAgICAgICAgICAgICAgRU9SOjE7CisJLy91OCAgICAgICAgICAgICAgICBPV046MTsKKwl1OCAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTo0OworCisJLy9EV09SRCAxCisJdTMyICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7CisKKwkvL0RXT1JEIDIKKwkvL3UzMiAgICAgICAgICAgICAgIFJlc2VydmVkMzsKKworCS8vRFdPUkQgMworCS8vdTMyICAgICAgICAgICAgICAgIEJ1ZmZlckFkZHJlc3M7CisKK31yeF9kZXNjXzgxOXhfdXNiLCAqcHJ4X2Rlc2NfODE5eF91c2I7CisjZW5kaWYKKworI2lmZGVmIFVTQl9SWF9BR0dSRUdBVElPTl9TVVBQT1JUCit0eXBlZGVmIHN0cnVjdCBfcnhfZGVzY184MTl4X3VzYl9hZ2dyX3N1YmZyYW1leworCS8vRE9XUkQgMAorCXUxNgkJCUxlbmd0aDoxN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c2lfdGFyZ2V0XzE6ODsKKwl1NEJ5dGUJCQlzaWdldm06ODsKKwl1NEJ5dGUJCQltYXhfZXhfcHdyOjg7CisJdTRCeXRlCQkJZXhfaW50Zl9mbGFnOjE7CisJdTRCeXRlCQkJc2dpX2VuOjE7CisJdTRCeXRlCQkJcnhzYzoyOworCXU0Qnl0ZQkJCXJlc2VydmU6NDsqLworCXU4CQkJc2lnZXZtOworCXU4CQkJbWF4X2V4X3B3cjsKKwl1OAkJCWV4X2ludGZfZmxhZzoxOworCXU4CQkJc2dpX2VuOjE7CisJdTgJCQlyeHNjOjI7CisJdTgJCQlyZXNlcnZlOjQ7CisKK31yeF9kcnZpbmZvXzgxOXhfdXNiLCAqcHJ4X2RydmluZm9fODE5eF91c2I7CisjZWxzZQordHlwZWRlZiBzdHJ1Y3QgcnhfZHJ2aW5mb184MTl4X3VzYnsKKwkvL0RXT1JEIDAKKwl1MTYgICAgICAgICAgICAgICAgIFJlc2VydmVkMToxMjsKKwl1MTYgICAgICAgICAgICAgICAgIFBhcnRBZ2dyOjE7CisJdTE2ICAgICAgICAgICAgICAgICBGaXJzdEFHR1I6MTsKKwl1MTYgICAgICAgICAgICAgICAgIFJlc2VydmVkMjoyOworCisJdTggICAgICAgICAgICAgICAgICBSeFJhdGU6NzsKKwl1OCAgICAgICAgICAgICAgICAgIFJ4SFQ6MTsKKworCXU4ICAgICAgICAgICAgICAgICAgQlc6MTsKKwl1OCAgICAgICAgICAgICAgICAgIFNQTENQOjE7CisJdTggICAgICAgICAgICAgICAgICBSZXNlcnZlZDM6MjsKKwl1OCAgICAgICAgICAgICAgICAgIFBBTToxOworCXU4ICAgICAgICAgICAgICAgICAgTWNhc3Q6MTsKKwl1OCAgICAgICAgICAgICAgICAgIEJjYXN0OjE7CisJdTggICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ6MTsKKworCS8vRFdPUkQgMQorCXUzMiAgICAgICAgICAgICAgICAgIFRTRkw7CisKK31yeF9kcnZpbmZvXzgxOX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mZsYWd7CisJdTgJCQlyZXNlcnZlZDo0OworCXU4CQkJcnhzYzoyOworCXU4CQkJc2dpX2VuOjE7CisJdTgJCQlleF9pbnRmX2ZsYWc6MTsKK31waHlfb2ZkbV9yeF9zdGF0dXNfcnhzY19zZ2llbl9leGludGZmbGFnOworCit0eXBlZGVmIGVudW0gX1JUX0NVU1RPTUVSX0lECit7CisJUlRfQ0lEX0RFRkFVTFQgPSAwLAorCVJUX0NJRF84MTg3X0FMUEhBMCA9IDEsCisJUlRfQ0lEXzgxODdfU0VSQ09NTV9QUyA9IDIsCisJUlRfQ0lEXzgxODdfSFdfTEVEID0gMywKKwlSVF9DSURfODE4N19ORVRHRUFSID0gNCwKKwlSVF9DSURfV0hRTCA9IDUsCisJUlRfQ0lEXzgxOXhfQ0FNRU8gID0gNiwKKwlSVF9DSURfODE5eF9SVU5UT1AgPSA3LAorCVJUX0NJRF84MTl4X1NlbmFvID0gOCwKKwlSVF9DSURfVE9TSElCQSA9IDksCS8vIE1lcmdlIGJ5IEphY2tlbiwgMjAwOC8wMS8zMS4KKwlSVF9DSURfODE5eF9OZXRjb3JlID0gMTAsCisJUlRfQ0lEX05ldHRyb25peCA9IDExLAorCVJUX0NJRF9ETElOSyA9IDEyLAorCVJUX0NJRF9QUk9ORVQgPSAxMywKK31SVF9DVVNUT01FUl9JRCwgKlBSVF9DVVNUT01FUl9JRDsKKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorLy8gTEVEIGN1c3RvbWl6YXRpb24uCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK3R5cGVkZWYJZW51bSBfTEVEX1NUUkFURUdZXzgxOTB7CisJU1dfTEVEX01PREUwLCAvLyBTVyBjb250cm9sIDEgTEVEIHZpYSBHUElPMC4gSXQgaXMgZGV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DsKKyAgICAgICAgLy8yMDA0LzAyLzExICBJbiBzdGF0aWMgV0VQLCBPSURfQUREX0tFWSBvciBPSURfQUREX1dFUCBhcmUgc2V0IGJlZm9yZSBTVEEgYXNzb2NpYXRlIHRvIEFQLgorICAgICAgICAvLyBIb3dldmVyLCBSZXNldEtleSBpcyBjYWxsZWQgb24gT0lEXzgwMl8xMV9JTkZSQVNUUlVDVFVSRV9NT0RFIGFuZCBNbG1lQXNzb2NpYXRlUmVxdWVzdAorICAgICAgICAvLyBJbiB0aGlzIGNvbmRpdGlvbiwgQ2FtIGNhbiBub3QgYmUgcmVzZXQgYmVjYXVzZSB1cHBlciBsYXllciB3aWxsIG5vdCBzZXQgdGhpcyBzdGF0aWMga2V5IGFnYWluLgorICAgICAgICAvL2lmKEFkYXB0ZXItPkVuY0FsZ29yaXRobSA9PSBXRVBfRW5jcnlwdGlvbikKKyAgICAgICAgLy8gICAgICByZXR1cm47CisvL2RlYnVnCisgICAgICAgIC8vRGJnUHJpbnQoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworICAgICAgICAvL0RiZ1ByaW50KCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2FsbCBSZXNldEFsbEVudHJ5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuIik7CisgICAgICAgIC8vRGJnUHJpbnQoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuIik7CisJdWxjb21tYW5kIHw9IEJJVDMxfEJJVDMwOworCXdyaXRlX25pY19kd29yZChkZXYsIFJXQ0FNLCB1bGNvbW1hbmQpOworI2Vsc2UKKyAgICAgICAgZm9yKHVjSW5kZXg9MDt1Y0luZGV4PFRPVEFMX0NBTV9FTlRSWTt1Y0luZGV4KyspCisgICAgICAgICAgICAgICAgQ0FNX21hcmtfaW52YWxpZChkZXYsIHVjSW5kZXgpOworICAgICAgICBmb3IodWNJbmRleD0wO3VjS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GEsIDIsIEhaIC8gMik7CisjZW5kaWYKKworICAgICAgICBpZiAoc3RhdHVzIDwgMCkKKyAgICAgICAgeworICAgICAgICAgICAgICAgIHByaW50aygicmVhZF9uaWNfd29yZCBUaW1lT3V0ISBzdGF0dXM6JWRcbiIsIHN0YXR1cyk7CisgICAgICAgIH0KKworCisJcmV0dXJuIGRhdGE7Cit9CisKK3UxNiByZWFkX25pY193b3JkX0Uoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgaW50IGluZHgpCit7CisJdTE2IGRhdGE7CisJaW50IHN0YXR1czsKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IChzdHJ1Y3QgcjgxOTJfcHJpdiAqKWllZWU4MDIxMV9wcml2KGRldik7CisJc3RydWN0IHVzYl9kZXZpY2UgKnVkZXYgPSBwcml2LT51ZGV2OworCisJc3RhdHVzID0gdXNiX2NvbnRyb2xfbXNnKHVkZXYsIHVzYl9yY3ZjdHJscGlwZSh1ZGV2LCAwKSwKKwkJCSAgICAgICBSVEw4MTg3X1JFUV9HRVRfUkVHUywgUlRMODE4N19SRVFUX1JFQUQsCisJCQkgICAgICAgaW5keHwweGZlMDAsIDAsICZkYXRhLCAyLCBIWiAvIDIpOworCisgICAgICAgIGlmIChzdGF0dXMgPCAwKQorICAgICAgICB7CisgICAgICAgICAgICAgICAgcHJpbnRrKCJyZWFkX25pY193b3JkIFRpbWVPdXQhIHN0YXR1czolZFxuIiwgc3RhdHVzKTsKKyAgICAgICAgfQorCisKKwlyZXR1cm4gZGF0YTsKK30KKwordTMyIHJlYWRfbmljX2R3b3JkKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIGludCBpbmR4KQoreworCXUzMiBkYXRhOworCWludCBzdGF0dXM7CisvLwlpbnQgcmVzdWx0OworCisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSAoc3RydWN0IHI4MTkyX3ByaXYgKilpZWVlODAyMTFfcHJpdihkZXYpOworCXN0cnVjdCB1c2JfZG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bDgxOTJfcHJvYyA9IE5VTEw7CisKKworCitzdGF0aWMgaW50IHByb2NfZ2V0X3N0YXRzX2FwKGNoYXIgKnBhZ2UsIGNoYXIgKipzdGFydCwKKwkJCSAgb2ZmX3Qgb2Zmc2V0LCBpbnQgY291bnQsCisJCQkgIGludCAqZW9mLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBkYXRhOworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gKHN0cnVjdCByODE5Ml9wcml2ICopaWVlZTgwMjExX3ByaXYoZGV2KTsKKwlzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSA9IHByaXYtPmllZWU4MDIxMTsKKwlzdHJ1Y3QgaWVlZTgwMjExX25ldHdvcmsgKnRhcmdldDsKKworCWludCBsZW4gPSAwOworCisgICAgICAgIGxpc3RfZm9yX2VhY2hfZW50cnkodGFyZ2V0LCAmaWVlZS0+bmV0d29ya19saXN0LCBsaXN0KSB7CisKKwkJbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLAorICAgICAgICAgICAgICAgICIlcyAiLCB0YXJnZXQtPnNzaWQpOworCisJCWlmKHRhcmdldC0+d3BhX2llX2xlbj4wIHx8IHRhcmdldC0+cnNuX2llX2xlbj4wKXsKKwkgICAgICAgICAgICAgICAgbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLAorICAgICAgICAJICAgICAgICAiV1BBXG4iKTsKKwkJfQorCQllbHNleworICAgICAgICAgICAgICAgICAgICAgICAgbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgIm5vbl9XUEFcbiIpOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICB9CisKKwkqZW9mID0gMTsKKwlyZXR1cm4gbGVuOworfQorCisjaWZkZWYgUlRMODE5MlNVCitzdGF0aW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CByODE5Ml9wcml2ICopaWVlZTgwMjExX3ByaXYoZGV2KTsKKworCWludCBsZW4gPSAwOworCWludCBpLG47CisKKwlpbnQgbWF4PTB4ZmY7CisKKwkvKiBUaGlzIGR1bXAgdGhlIGN1cnJlbnQgcmVnaXN0ZXIgcGFnZSAqLworbGVuICs9IHNucHJpbnRmKHBhZ2UgKyBsZW4sIGNvdW50IC0gbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgIlxuIyMjIyMjIyMjIyMjIyMjIyMjIyNwYWdlIDAjIyMjIyMjIyMjIyMjIyMjIyNcbiAiKTsKKworCWZvcihuPTA7bjw9bWF4OykKKwl7CisJCS8vcHJpbnRrKCAiXG5EOiAlMng+ICIsIG4pOworCQlsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sCisJCQkiXG5EOiAgJTJ4ID4gIixuKTsKKworCQlmb3IoaT0wO2k8MTYgJiYgbjw9bWF4O2krKyxuKyspCisJCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwKKwkJCSIlMnggIixyZWFkX25pY19ieXRlKGRldiwweDAwMHxuKSk7CisKKwkJLy8JcHJpbnRrKCIlMnggIixyZWFkX25pY19ieXRlKGRldixuKSk7CisJfQorI2lmIDEKK2xlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICJcbiMjIyMjIyMjIyMjIyMjIyMjIyMjcGFnZSAxIyMjIyMjIyMjIyMjIyMjIyMjXG4gIik7CisgICAgICAgIGZvcihuPTA7bjw9bWF4OykKKyAgICAgICAgeworICAgICAgICAgICAgICAgIC8vcHJpbnRrKCAiXG5EOiAlMng+ICIsIG4pOworICAgICAgICAgICAgICAgIGxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICJcbkQ6ICAlMnggPiAiLG4pOworCisgICAgICAgICAgICAgICAgZm9yKGk9MDtpPDE2ICYmIG48PW1heDtpKyssbisrKQorICAgICAgICAgICAgICAgIGxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICIlMnggIixyZWFkX25pY19ieXRlKGRldiwweDEwMHxuKSk7CisKKyAgICAgICAgICAgICAgICAvLyAgICAgIHByaW50aygiJTJ4ICIscmVhZF9uaWNfYnl0ZShkZXYsbikpOworICAgICAgICB9CitsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAiXG4jIyMjIyMjIyMjIyMjIyMjIyMjI3BhZ2UgMyMjIyMjIyMjIyMjIyMjIyMjI1xuICIpOworICAgICAgICBmb3Iobj0wO248PW1heDspCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvL3ByaW50ayggIlxuRDogJTJ4PiAiLCBuKTsKKyAgICAgICAgICAgICAgICBsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAiXG5EOiAgJTJ4ID4gIixuKTsKKworICAgICAgICAgICAgICAgIGZvcihpPTA7aTwxNiAmJiBuPD1tYXg7aSsrLG4rKykKKyAgICAgICAgICAgICAgICBsZW4gKz0gc25wcmludGYocGFnZSArIGxlbiwgY291bnQgLSBsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAiJTJ4ICIscmVhZF9uaWNfYnl0ZShkZXYsMHgzMDB8bikpOworCisgICAgICAgICAgICAgICAgLy8gICAgICBwcmludGsoIiUyeCAiLHJlYWRfbmljX2J5dGUoZGV2LG4pKTsKKyAgICAgICAgfQorCisjZW5kaWYKKworCWxlbiArPSBzbnByaW50ZihwYWdlICsgbGVuLCBjb3VudCAtIGxlbiwiXG4iKTsKKwkqZW9mID0gMTsKKwlyZXR1cm4gbGVuOworCit9CisjZW5kaWYKKworI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isKKwllID0gY3JlYXRlX3Byb2NfcmVhZF9lbnRyeSgib2ZkbS1yZWdpc3RlcnMiLCBTX0lGUkVHIHwgU19JUlVHTywKKwkJCQkgICBwcml2LT5kaXJfZGV2LCBwcm9jX2dldF9vZmRtX3JlZywgZGV2KTsKKwlpZiAoIWUpIHsKKwkJUlRfVFJBQ0UoQ09NUF9FUlIsICJVbmFibGUgdG8gaW5pdGlhbGl6ZSAiCisJCSAgICAgICIvcHJvYy9uZXQvcnRsODE5Mi8lcy9vZmRtLXJlZ2lzdGVyc1xuIiwKKwkJICAgICAgZGV2LT5uYW1lKTsKKwl9CisjZW5kaWYKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLU1JU0MgU1RVRkYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogdGhpcyBpcyBvbmx5IGZvciBkZWJ1Z2dpbmcgKi8KK3ZvaWQgcHJpbnRfYnVmZmVyKHUzMiAqYnVmZmVyLCBpbnQgbGVuKQoreworCWludCBpOworCXU4ICpidWYgPSh1OCopYnVmZmVyOworCisJcHJpbnRrKCJBU0NJSSBCVUZGRVIgRFVNUCAobGVuOiAleCk6XG4iLGxlbik7CisKKwlmb3IoaT0wO2k8bGVuO2krKykKKwkJcHJpbnRrKCIlYyIsYnVmW2ldKTsKKworCXByaW50aygiXG5CSU5BUlkgQlVGRkVSIERVTVAgKGxlbjogJXgpOlxuIixsZW4pOworCisJZm9yKGk9MDtpPGxlbjtpKyspCisJCXByaW50aygiJXgiLGJ1ZltpXSk7CisKKwlwcmludGsoIlxuIik7Cit9CisKKy8vc2hvcnQgY2hlY2tfbmljX2Vub3VnaF9kZ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R1cmUgKi8KKyAgICAgICAgd2hpbGUgKHNrYl9xdWV1ZV9sZW4oJnByaXYtPnJ4X3F1ZXVlKSA8IE1BWF9SWF9VUkIpIHsKKyAgICAgICAgICAgICAgICBza2IgPSBfX2Rldl9hbGxvY19za2IoUlhfVVJCX1NJWkUsIEdGUF9LRVJORUwpOworICAgICAgICAgICAgICAgIGlmICghc2tiKQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisjaWYgTElOVVhfVkVSU0lPTl9DT0RFID4gS0VSTkVMX1ZFUlNJT04oMiw1LDApCisJICAgICAgICBlbnRyeSA9IHVzYl9hbGxvY191cmIoMCwgR0ZQX0tFUk5FTCk7CisjZWxzZQorCSAgICAgICAgZW50cnkgPSB1c2JfYWxsb2NfdXJiKDApOworI2VuZGlmCisgICAgICAgICAgICAgICAgaWYgKCFlbnRyeSkgeworICAgICAgICAgICAgICAgICAgICAgICAga2ZyZWVfc2tiKHNrYik7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisvLwkJcHJpbnRrKCJub21hbCBwYWNrZXQgSU4gcmVxdWVzdCFcbiIpOworICAgICAgICAgICAgICAgIHVzYl9maWxsX2J1bGtfdXJiKGVudHJ5LCBwcml2LT51ZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzYl9yY3ZidWxrcGlwZShwcml2LT51ZGV2LCAzKSwgc2tiLT50YWlsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJYX1VSQl9TSVpFLCBydGw4MTkyX3J4X2lzciwgc2tiKTsKKyAgICAgICAgICAgICAgICBpbmZvID0gKHN0cnVjdCBydGw4MTkyX3J4X2luZm8gKikgc2tiLT5jYjsKKyAgICAgICAgICAgICAgICBpbmZvLT51cmIgPSBlbnRyeTsKKyAgICAgICAgICAgICAgICBpbmZvLT5kZXYgPSBkZXY7CisJCWluZm8tPm91dF9waXBlID0gMzsgLy9kZW5vdGUgcnggbm9ybWFsIHBhY2tldCBxdWV1ZQorICAgICAgICAgICAgICAgIHNrYl9xdWV1ZV90YWlsKCZwcml2LT5yeF9xdWV1ZSwgc2tiKTsKKyNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPiBLRVJORUxfVkVSU0lPTigyLDUsMCkKKyAgICAgICAgICAgICAgICB1c2Jfc3VibWl0X3VyYihlbnRyeSwgR0ZQX0tFUk5FTCk7CisjZWxzZQorICAgICAgICAgICAgICAgIHVzYl9zdWJtaXRfdXJiKGVudHJ5KTsKKyNlbmRpZgorICAgICAgICB9CisKKwkvKiBjb21tYW5kIHBhY2tldCByeCBwcm9jZWR1cmUgKi8KKyAgICAgICAgd2hpbGUgKHNrYl9xdWV1ZV9sZW4oJnByaXYtPnJ4X3F1ZXVlKSA8IE1BWF9SWF9VUkIgKyAzKSB7CisvLwkJcHJpbnRrKCJjb21tYW5kIHBhY2tldCBJTiByZXF1ZXN0IVxuIik7CisgICAgICAgICAgICAgICAgc2tiID0gX19kZXZfYWxsb2Nfc2tiKFJYX1VSQl9TSVpFICxHRlBfS0VSTkVMKTsKKyAgICAgICAgICAgICAgICBpZiAoIXNrYikKKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworI2lmIExJTlVYX1ZFUlNJT05fQ09ERSA+IEtFUk5FTF9WRVJTSU9OKDIsNSwwKQorICAgICAgICAgICAgICAgIGVudHJ5ID0gdXNiX2FsbG9jX3VyYigwLCBHRlBfS0VSTkVMKTsKKyNlbHNlCisgICAgICAgICAgICAgICAgZW50cnkgPSB1c2JfYWxsb2NfdXJiKDApOworI2VuZGlmCisgICAgICAgICAgICAgICAgaWYgKCFlbnRyeSkgeworICAgICAgICAgICAgICAgICAgICAgICAga2ZyZWVfc2tiKHNrYik7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgdXNiX2ZpbGxfYnVsa191cmIoZW50cnksIHByaXYtPnVkZXYsCisgICAgIC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ZGUgPT0gSVdfTU9ERV9JTkZSQSB8fCBpZWVlLT5pd19tb2RlID09IElXX01PREVfQURIT0MpCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICB1MzIgcmVnID0gMDsKKyAgICAgICAgICAgICAgICByZWcgPSByZWFkX25pY19kd29yZChkZXYsIFJDUik7CisgICAgICAgICAgICAgICAgaWYgKHByaXYtPmllZWU4MDIxMS0+c3RhdGUgPT0gSUVFRTgwMjExX0xJTktFRCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHByaXYtPlJlY2VpdmVDb25maWcgPSByZWcgfD0gUkNSX0NCU1NJRDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICBwcml2LT5SZWNlaXZlQ29uZmlnID0gcmVnICY9IH5SQ1JfQ0JTU0lEOworICAgICAgICAgICAgICAgIHdyaXRlX25pY19kd29yZChkZXYsIFJDUiwgcmVnKTsKKyAgICAgICAgfQorCisvLwlydGw4MTkyX3NldF9yeGNvbmYoZGV2KTsKK30KKyNlbmRpZgorCitzdGF0aWMgc3RydWN0IGllZWU4MDIxMV9xb3NfcGFyYW1ldGVycyBkZWZfcW9zX3BhcmFtZXRlcnMgPSB7CisgICAgICAgIHszLDMsMywzfSwvKiBjd19taW4gKi8KKyAgICAgICAgezcsNyw3LDd9LC8qIGN3X21heCAqLworICAgICAgICB7MiwyLDIsMn0sLyogYWlmcyAqLworICAgICAgICB7MCwwLDAsMH0sLyogZmxhZ3MgKi8KKyAgICAgICAgezAsMCwwLDB9IC8qIHR4X29wX2xpbWl0ICovCit9OworCisKKyNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPj1LRVJORUxfVkVSU0lPTigyLDYsMjApCit2b2lkIHJ0bDgxOTJfdXBkYXRlX2JlYWNvbihzdHJ1Y3Qgd29ya19zdHJ1Y3QgKiB3b3JrKQoreworICAgICAgICBzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGNvbnRhaW5lcl9vZih3b3JrLC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NldHRpbmcKKyogb2ZmIHRoZSBuZXR3b3JrIGZyb20gdGhlIGFzc29jaWF0ZWQgc2V0dGluZywgYWRqdXN0IHRoZSBRb1MKKyogc2V0dGluZworKi8KK3N0YXRpYyBpbnQgcnRsODE5Ml9xb3NfYXNzb2NpYXRpb25fcmVzcChzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqbmV0d29yaykKK3sKKyAgICAgICAgaW50IHJldCA9IDA7CisgICAgICAgIHVuc2lnbmVkIGxvbmcgZmxhZ3M7CisgICAgICAgIHUzMiBzaXplID0gc2l6ZW9mKHN0cnVjdCBpZWVlODAyMTFfcW9zX3BhcmFtZXRlcnMpOworICAgICAgICBpbnQgc2V0X3Fvc19wYXJhbSA9IDA7CisKKyAgICAgICAgaWYgKChwcml2ID09IE5VTEwpIHx8IChuZXR3b3JrID09IE5VTEwpKQorICAgICAgICAgICAgICAgIHJldHVybiByZXQ7CisKKwlpZihwcml2LT5pZWVlODAyMTEtPnN0YXRlICE9SUVFRTgwMjExX0xJTktFRCkKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0OworCisgICAgICAgIGlmICgocHJpdi0+aWVlZTgwMjExLT5pd19tb2RlICE9IElXX01PREVfSU5GUkEpKQorICAgICAgICAgICAgICAgIHJldHVybiByZXQ7CisKKyAgICAgICAgc3Bpbl9sb2NrX2lycXNhdmUoJnByaXYtPmllZWU4MDIxMS0+bG9jaywgZmxhZ3MpOworCWlmKG5ldHdvcmstPmZsYWdzICYgTkVUV09SS19IQVNfUU9TX1BBUkFNRVRFUlMpIHsKKwkJbWVtY3B5KCZwcml2LT5pZWVlODAyMTEtPmN1cnJlbnRfbmV0d29yay5xb3NfZGF0YS5wYXJhbWV0ZXJzLFwKKwkJCSAmbmV0d29yay0+cW9zX2RhdGEucGFyYW1ldGVycyxcCisJCQlzaXplb2Yoc3Ryd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AgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlKCZwcml2LT5pZWVlODAyMTEtPmxvY2ssIGZsYWdzKTsKKworCVJUX1RSQUNFKENPTVBfUU9TLCAiJXM6IG5ldHdvcmstPmZsYWdzID0gJWQsJWRcbiIsX19GVU5DVElPTl9fLG5ldHdvcmstPmZsYWdzICxwcml2LT5pZWVlODAyMTEtPmN1cnJlbnRfbmV0d29yay5xb3NfZGF0YS5hY3RpdmUpOworCWlmIChzZXRfcW9zX3BhcmFtID09IDEpCisjaWYgTElOVVhfVkVSU0lPTl9DT0RFID4gS0VSTkVMX1ZFUlNJT04oMiw1LDApCisJCXF1ZXVlX3dvcmsocHJpdi0+cHJpdl93cSwgJnByaXYtPnFvc19hY3RpdmF0ZSk7CisjZWxzZQorCQlzY2hlZHVsZV90YXNrKCZwcml2LT5xb3NfYWN0aXZhdGUpOworI2VuZGlmCisKKworICAgICAgICByZXR1cm4gcmV0OworfQorCisKK3N0YXRpYyBpbnQgcnRsODE5Ml9oYW5kbGVfYXNzb2NfcmVzcG9uc2Uoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX2Fzc29jX3Jlc3BvbnNlX2ZyYW1lICpyZXNwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqbmV0d29yaykKK3sKKyAgICAgICAgc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworICAgICAgICBydGw4MTkyX3Fvc19hc3NvY2lhdGlvbl9yZXNwKHByaXYsIG5ldHdvcmspOworICAgICAgICByZXR1cm4gMDsKK30KKworCit2b2lkIHJ0bDgxOTJfdXBkYXRlX3JhdHJfdGFibGUoc3RydWN0IG5ldF9kZXZpY2UqIGRldikKKwkvLwlQT0NURVRfU1RSSU5HCXBvc0xl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pOworCisJd29yZCAgPSByZWFkX25pY193b3JkKGRldiwgQkNOX0lOVFJfSVRWKTsKKwl3b3JkICY9IH5CQ05fSU5UUl9JVFZfTUFTSzsKKworCS8vd29yZCB8PSBwcml2LT5pZWVlODAyMTEtPmJlYWNvbl9pbnRlcnZhbCAqCisJLy8JKChwcml2LT50eGJlYWNvbmNvdW50ID4gMSk/KHByaXYtPnR4YmVhY29uY291bnQtMSk6MSk7CisJLy8gRklYTUU6RklYTUUgY2hlY2sgaWYgY29ycmVjdCBeXiB3b3JrZWQgd2l0aCAweDNlODsKKworCXdyaXRlX25pY193b3JkKGRldiwgQkNOX0lOVFJfSVRWLCB3b3JkKTsKKworCS8vd3JpdGVfbmljX3dvcmQoZGV2LDB4MmUsMHhlMDAyKTsKKwkvL3dyaXRlX25pY19kd29yZChkZXYsMHgzMCwweGI4Yzc4MzJlKTsKKwlmb3IoaT0wOyBpPEVUSF9BTEVOOyBpKyspCisJCXdyaXRlX25pY19ieXRlKGRldiwgQlNTSUQraSwgcHJpdi0+aWVlZTgwMjExLT5iZWFjb25fY2VsbF9zc2lkW2ldKTsKKworLy8JcnRsODE5Ml91cGRhdGVfbXNyKGRldik7CisKKworCS8vd3JpdGVfbmljX2J5dGUoZGV2LENPTkZJRzQsMyk7IC8qICEhISEhISEhISEgKi8KKworCXJ0bDgxOTJfc2V0X21vZGUoZGV2LCBFUFJPTV9DTURfTk9STUFMKTsKKworCXJ0bDgxOTJfaXJxX2VuYWJsZShkZXYpOworCisJLyogVlYgISEhISEhISEhISBWViovCisJLyoKKwlydGw4MTkyX3NldF9tb2RlKGRldixFUFJPTV9DTURfQ09ORklHKTsKKwl3cml0ZV9uaWNfYnl0ZShkZXYsMHg5ZCwweDAwKTsKKwlydGw4MTkyX3NldF9tb2RlKGRldixFUFJPTV9DTURfTk9STUFMKTsKKyovCit9CisjZW5kaWYKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tTkVUIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3QgbmV0X2RldmljZV9zdGF0cyAqcnRsODE5Ml9zdGF0cyhzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKKworCXJldHVybiAmcHJpdi0+aWVlZTgwMjExLT5zdGF0czsKK30KKworYm9vbAorSGFsVHhDaGVja1N0dWNrODE5eFVzYigKKwlzdHJ1Y3QgbmV0X2RldmljZSAqZGV2CisJKQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKKwl1MTYgCQlSZWdUeENvdW50ZXIgPSByZWFkX25pY193b3JkKGRldiwgMHgxMjgpOworCWJvb2wJCWJTdHVjayA9IEZBTFNFOworCVJUX1RSQUNFKENPTVBfUkVTRVQsIiVzKCk6UmVnVHhDb3VudGVyIGlzICVkLFR4Q291bnRlciBpcyAlZFxuIixfX0ZVTkNUSU9OX18sUmVnVHhDb3VudGVyLHByaXYtPlR4Q291bnRlcik7CisJaWYocHJpdi0+VHhDb3VudGVyPT1SZWdUeENvdW50ZXIpCisJCWJTdHVjayA9IFRSVUU7CisKKwlwcml2LT5UeENvdW50ZXIgPSBSZWdUeENvdW50ZXI7CisKKwlyZXR1cm4gYlN0dWNrOworfQorCisvKgorKgk8QXNzdW1wdGlvbjogUlRfVFhfU1BJTkxPQ0sgaXMgYWNxdWlyZWQuPgorKglGaXJzdCBhZGRlZDogMjAwNi4xMS4xOSBieSBlbWlseQorKi8KK1JFU0VUX1RZUEUKK1R4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5jcnlwdGVkLgorCSAqIGV4LCBBZnRlciBraWxsIHdwYV9zdXBwbGljYW50IHByb2Nlc3MsIG1ha2UgdGhlIGRyaXZlciB1cCBhZ2Fpbi4KKwkgKiBkcm9wX3VuZW5jcnlwdGVkIHJlbWFpbnMgYXMgIjEiLCB3aGljaCBpcyBzZXQgYnkgd3BhX3N1cHBsaWNhbnQuIDIwMDgvMTIvMDQuam9obgorCSAqLworCXByaXYtPmllZWU4MDIxMS0+ZHJvcF91bmVuY3J5cHRlZCA9IDA7CisKKwlyZXR1cm4gMDsKK30KKworCitpbnQgcnRsODE5Ml9vcGVuKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCWludCByZXQ7CisJZG93bigmcHJpdi0+d3hfc2VtKTsKKwlyZXQgPSBydGw4MTkyX3VwKGRldik7CisJdXAoJnByaXYtPnd4X3NlbSk7CisJcmV0dXJuIHJldDsKKworfQorCisKK2ludCBydGw4MTkyX3VwKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCisJaWYgKHByaXYtPnVwID09IDEpIHJldHVybiAtMTsKKworCXJldHVybiBfcnRsODE5Ml91cChkZXYpOworfQorCisKK2ludCBydGw4MTkyX2Nsb3NlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCWludCByZXQ7CisKKwlkb3duKCZwcml2LT53eF9zZW0pOworCisJcmV0ID0gcnRsODE5Ml9kb3duKGRldik7CisKKwl1cCgmcHJpdi0+d3hfc2VtKTsKKworCXJldHVybiByZXQ7CisKK30KKworaW50IHJ0bDgxOTJfZG93bihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCXN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9IF9ydGw4MTkyX3VwKGRldik7CisKK30KKworLyoKK3ZvaWQgcnRsODE5Ml9yZXN0YXJ0KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworKi8KKyNpZiAoTElOVVhfVkVSU0lPTl9DT0RFID49IEtFUk5FTF9WRVJTSU9OKDIsNiwyMCkpCit2b2lkIHJ0bDgxOTJfcmVzdGFydChzdHJ1Y3Qgd29ya19zdHJ1Y3QgKndvcmspCit7CisgICAgICAgIHN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gY29udGFpbmVyX29mKHdvcmssIHN0cnVjdCByODE5Ml9wcml2LCByZXNldF93cSk7CisgICAgICAgIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBwcml2LT5pZWVlODAyMTEtPmRldjsKKyNlbHNlCit2b2lkIHJ0bDgxOTJfcmVzdGFydChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCisgICAgICAgIHN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKKyNlbmRpZgorCisJZG93bigmcHJpdi0+d3hfc2VtKTsKKworCXJ0bDgxOTJfY29tbWl0KGRldik7CisKKwl1cCgmcHJpdi0+d3hfc2VtKTsKK30KKworc3RhdGljIHZvaWQgcjgxOTJfc2V0X211bHRpY2FzdChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKKwlzaG9ydCBwcm9taXNjOworCisJLy9kb3duKCZwcml2LT53eF9zZW0pOworCisJLyogRklYTUUgRklYTUUgKi8KKworCXByb21pc2MgPSAoZGV2LT5mbGFncyAmIElGRl9QUk9NSVNDKSA/IDE6MDsKKworCWlmIChwcm9taXNjICE9IHByaXYtPnByb21pc2MpCisJLy8JcnRsODE5Ml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uIHJldF9yYXRlOworfQorI2VuZGlmCisKK3U4IEh3UmF0ZVRvTVJhdGU5MChib29sIGJJc0hULCB1OCByYXRlKQoreworCXU4ICByZXRfcmF0ZSA9IDB4ZmY7CisKKwlpZighYklzSFQpIHsKKwkJc3dpdGNoKHJhdGUpIHsKKwkJCWNhc2UgREVTQzkwX1JBVEUxTTogICByZXRfcmF0ZSA9IE1HTl8xTTsgICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUyTTogICByZXRfcmF0ZSA9IE1HTl8yTTsgICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEU1XzVNOiByZXRfcmF0ZSA9IE1HTl81XzVNOyAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUxMU06ICByZXRfcmF0ZSA9IE1HTl8xMU07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEU2TTogICByZXRfcmF0ZSA9IE1HTl82TTsgICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEU5TTogICByZXRfcmF0ZSA9IE1HTl85TTsgICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUxMk06ICByZXRfcmF0ZSA9IE1HTl8xMk07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUxOE06ICByZXRfcmF0ZSA9IE1HTl8xOE07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUyNE06ICByZXRfcmF0ZSA9IE1HTl8yNE07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEUzNk06ICByZXRfcmF0ZSA9IE1HTl8zNk07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEU0OE06ICByZXRfcmF0ZSA9IE1HTl80OE07ICAgICAgICBicmVhazsKKwkJCWNhc2UgREVTQzkwX1JBVEU1NE06ICByZXRfcmF0ZSA9IE1HTl81NE07ICAgICAgICBicmVhazsKK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DRShDT01QX1JFQ1YsICJjb21tYW5kIGluLXBpcGUgaW5kZXgoJWQpXG4iLFwKKwkJCQkJCWluZm8tPm91dF9waXBlKTsKKwkJCQlwcml2LT5vcHMtPnJ0bDgxOXhfcnhfY21kKHNrYik7CisJCQkJYnJlYWs7CisKKwkJCWRlZmF1bHQ6IC8qIHNob3VsZCBuZXZlciBnZXQgaGVyZSEgKi8KKwkJCQlSVF9UUkFDRShDT01QX0VSUiwgIlVua25vd24gaW4tcGlwZSBpbmRleCglZClcbiIsXAorCQkJCQkJaW5mby0+b3V0X3BpcGUpOworCQkJCWRldl9rZnJlZV9za2Ioc2tiKTsKKwkJCQlicmVhazsKKworCQl9CisgICAgICAgIH0KK30KKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gVVNCX1NUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPiBLRVJORUxfVkVSU0lPTigyLDUsMCkKKy8vTFpNIE1lcmdlIGZyb20gd2luZG93cyBIYWxVc2JTZXRRdWV1ZVBpcGVNYXBwaW5nODE5MlNVc2IgMDkwMzE5CitzdGF0aWMgdm9pZCBIYWxVc2JTZXRRdWV1ZVBpcGVNYXBwaW5nODE5MlNVc2Ioc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCXN0cnVjdCB1c2JfaG9zdF9pbnRlcmZhY2UgKmlmYWNlX2Rlc2M7CisJc3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BLZXlJbmRleDsKKworCisJZm9yKGk9MCA7IGk8Q0FNX0NPTlRFTlRfQ09VTlQ7IGkrKyl7CisJCVRhcmdldENvbW1hbmQgID0gaStDQU1fQ09OVEVOVF9DT1VOVCpFbnRyeU5vOworCQlUYXJnZXRDb21tYW5kIHw9IEJJVDMxfEJJVDE2OworCisJCWlmKGk9PTApey8vTUFDfENvbmZpZworCQkJVGFyZ2V0Q29udGVudCA9ICh1MzIpKCooTWFjQWRkciswKSkgPDwgMTZ8CisJCQkJCSh1MzIpKCooTWFjQWRkcisxKSkgPDwgMjR8CisJCQkJCSh1MzIpdXNDb25maWc7CisKKwkJCXdyaXRlX25pY19kd29yZChkZXYsIFdDQU1JLCBUYXJnZXRDb250ZW50KTsKKwkJCXdyaXRlX25pY19kd29yZChkZXYsIFJXQ0FNLCBUYXJnZXRDb21tYW5kKTsKKwkvLwkJcHJpbnRrKCJzZXRrZXkgY2FtID0lOHhcbiIsIHJlYWRfY2FtKGRldiwgaSs2KkVudHJ5Tm8pKTsKKwkJfQorCQllbHNlIGlmKGk9PTEpey8vTUFDCisgICAgICAgICAgICAgICAgICAgICAgICBUYXJnZXRDb250ZW50ID0gKHUzMikoKihNYWNBZGRyKzIpKSAJIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodTMyKSgqKE1hY0FkZHIrMykpIDw8ICA4fAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1MzIpKCooTWFjQWRkcis0KSkgPDwgMTZ8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHUzMikoKihNYWNBZGRyKzUpKSA8PCAyNDsKKwkJCXdyaXRlX25pY19kd29yZChkZXYsIFdDQU1JLCBUYXJnZXRDb250ZW50KTsKKwkJCXdyaXRlX25pY19kd29yZChkZXYsIFJXQ0FNLCBUYXJnZXRDb21tYW5kKTsKKwkJfQorCQllbHNlIHsKKwkJCS8vS2V5IE1hdGVyaWFsCisJC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E8PCA0KXwoMTw8IDMpfCgxPDwgMil8KDE8PCAxKXwoMTw8IDApKQorI2RlZmluZSBCUlNSX01CUjAgICAoKDE8PCAwKSkKKyNkZWZpbmUgQlJTUl9NQlIxICAgKCgxPDwgMSkpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwlFSUZTXzgxODcgIAkJPSAweDAzNSwKKwlFSUZTXzgxODdCIAkJPSAweDAyRCwKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCUZFUiAJCQk9IDB4MEYwLAorCUZFTVIgCQkJPSAweDBGNCwKKwlGUFNSIAkJCT0gMHgwRjgsCisJRkZFUiAJCQk9IDB4MEZDLAorCisJQUNfVk9fUEFSQU0gICAgICAgICAgICAgPSAweDBGMCwgICAgICAvLyBBQ19WTyBQYXJhbWV0ZXJzIFJlY29yZAorCUFDX1ZJX1BBUkFNICAgICAgICAgICAgID0gMHgwRjQsICAgICAgLy8gQUNfVkkgUGFyYW1ldGVycyBSZWNvcmQKKwlBQ19CRV9QQVJBTSAgICAgICAgICAgICA9IDB4MEY4LCAgICAgIC8vIEFDX0JFIFBhcmFtZXRlcnMgUmVjb3JkCisJQUNfQktfUEFSQU0gICAgICAgICAgICAgPSAweDBGQywgICAgICAvLyBBQ19CSyBQYXJhbWV0ZXJzIFJlY29yZAorCVRBTExZX1NFTCAJCT0gMHgwZmMsCisvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKy8vICAgICAgIDgxODdCIEFDX1hYX1BBUkFNIGJpdHMKKy8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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AgICAgICB1bmlvbiBpd3JlcV9kYXRhICp3cnF1LCBjaGFyICpleHRyYSkKK3sKKyAgICAgICAgc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworICAgICAgICB1OCBkYXRhYmI7CisKKyAgICAgICAgZG93bigmcHJpdi0+d3hfc2VtKTsKKworICAgICAgICBnZXRfdXNlcihkYXRhYmIsICh1OCopd3JxdS0+ZGF0YS5wb2ludGVyKTsKKyAgICAgICAgcnRsODE4N193cml0ZV9waHkoZGV2LCB3cnF1LT5kYXRhLmxlbmd0aCwgZGF0YWJiKTsKKworICAgICAgICB1cCgmcHJpdi0+d3hfc2VtKTsKKyAgICAgICAgcmV0dXJuIDA7CisKK30KKworCitzdGF0aWMgaW50IHI4MTkyX3d4X3dyaXRlX25pY2Ioc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmV4dHJhKQoreworICAgICAgICBzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisgICAgICAgIHUzMiBhZGRyOworCisgICAgICAgIGRvd24oJnByaXYtPnd4X3NlbSk7CisKKyAgICAgICAgZ2V0X3VzZXIoYWRkciwgKHUzMiopd3JxdS0+ZGF0YS5wb2ludGVyKTsKKyAgICAgICAgd3JpdGVfbmljX2J5dGUoZGV2LCBhZGRyLCB3cnF1LT5kYXRhLmxlbmd0aCk7CisKKyAgICAgICAgdXAoJnByaXYtPnd4X3NlbSk7CisgICAgICAgIHJldHVybiAwOworCit9CitzdGF0aWMgaW50IHI4MTkyX3d4X3JlYWRfbmljYihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisgICAgICAgIHN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKKyAgICAgICAgdTMyIGFkZHI7CisgICAgICAgIHUxNiBkYXRhMTsKKworICAgICAgICBkb3duKCZwcml2LT53eF9zZW0pOworCisgICAgICAgIGdldF91c2VyKGFkZHIsKHUzMiopd3JxdS0+ZGF0YS5wb2ludGVyKTsKKyAgICAgICAgZGF0YTEgPSByZWFkX25pY19ieXRlKGRldiwgYWRkcik7CisgICAgICAgIHdycXUtPmRhdGEubGVuZ3RoID0gZGF0YTE7CisKKyAgICAgICAgdXAoJnByaXYtPnd4X3NlbSk7CisgICAgICAgIHJldHVybiAwOworfQorCitzdGF0aWMgaW50IHI4MTkyX3d4X2dldF9hcF9zdGF0dXMoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmV4dHJhKQoreworICAgICAgICBzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisgICAgICAgIHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlID0gcHJpdi0+aWVlZTgwMjExOworICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX25ldHdvcmsgKnRhcmdldDsKKwlpbnQgbmFtZV9sZW47CisKKyAgICAgICAgZG93bigmcHJpdi0+d3hfc2VtKTsKKworCS8vY291bnQgdGhlIGxlbmd0aCBvZiBpbnB1dCBzc2lkCisJZm9y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RyYSkKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJaW50IHJldDsKKworCWRvd24oJnByaXYtPnd4X3NlbSk7CisKKwlyZXQgPSBpZWVlODAyMTFfd3hfc2V0X3Jhd3R4KHByaXYtPmllZWU4MDIxMSwgaW5mbywgd3JxdSwgZXh0cmEpOworCisJdXAoJnByaXYtPnd4X3NlbSk7CisKKwlyZXR1cm4gcmV0OworCit9CisKK3N0YXRpYyBpbnQgcjgxOTJfd3hfc2V0X2NyY21vbihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorCQkJICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisJCQkgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCWludCAqcGFybXMgPSAoaW50ICopZXh0cmE7CisJaW50IGVuYWJsZSA9IChwYXJtc1swXSA+IDApOworCXNob3J0IHByZXYgPSBwcml2LT5jcmNtb247CisKKwlkb3duKCZwcml2LT53eF9zZW0pOworCisJaWYoZW5hYmxlKQorCQlwcml2LT5jcmNtb249MTsKKwllbHNlCisJCXByaXYtPmNyY21vbj0wOworCisJRE1FU0coImJhZCBDUkMgaW4gbW9uaXRvciBtb2RlIGFyZSAlcyIsCisJICAgICAgcHJpdi0+Y3JjbW9uID8gImFjY2VwdGVkIiA6ICJyZWplY3RlZCIpOworCisJaWYocHJldiAhPSBwcml2LT5jcmNtb24gJiYgcHJpdi0+dXApeworCQkvL3J0bDgxODBfZG93bihkZXYpOworCQkvL3J0bDgxODBfdXAoZGV2KTsKKwl9CisKKwl1cCgmcHJpdi0+d3hfc2VtKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHI4MTkyX3d4X3NldF9tb2RlKHN0cnVjdCBuZXRfZGV2aW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lEIChvciBkb21haW4gaWQpICovCisgICAgICAgIF9fdTMyICAgICAgICAgICBtaW5fbndpZDsgICAgICAgLyogTWluaW1hbCBOV0lEIHdlIGFyZSBhYmxlIHRvIHNldCAqLworICAgICAgICBfX3UzMiAgICAgICAgICAgbWF4X253aWQ7ICAgICAgIC8qIE1heGltYWwgTldJRCB3ZSBhcmUgYWJsZSB0byBzZXQgKi8KKworICAgICAgICAvKiBPbGQgRnJlcXVlbmN5IChiYWNrd2FyZCBjb21wYXQgLSBtb3ZlZCBsb3dlciApICovCisgICAgICAgIF9fdTE2ICAgICAgICAgICBvbGRfbnVtX2NoYW5uZWxzOworICAgICAgICBfX3U4ICAgICAgICAgICAgb2xkX251bV9mcmVxdWVuY3k7CisKKyAgICAgICAgLyogU2NhbiBjYXBhYmlsaXRpZXMgKi8KKyAgICAgICAgX191OCAgICAgICAgICAgIHNjYW5fY2FwYTsKK307CitzdGF0aWMgaW50IHJ0bDgxODBfd3hfZ2V0X3JhbmdlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisJCQkJc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKwkJCQl1bmlvbiBpd3JlcV9kYXRhICp3cnF1LCBjaGFyICpleHRyYSkKK3sKKwlzdHJ1Y3QgaXdfcmFuZ2UgKnJhbmdlID0gKHN0cnVjdCBpd19yYW5nZSAqKWV4dHJhOworCXN0cnVjdCBpd19yYW5nZV93aXRoX3NjYW5fY2FwYSogdG1wID0gKHN0cnVjdCBpd19yYW5nZV93aXRoX3NjYW5fY2FwYSopcmFuZ2U7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCXUxNiB2YWw7CisJaW50IGk7CisKKwl3cnF1LT5kYXRhLmxlbmd0aCA9IHNpemVvZigqcmFuZ2UpOworCW1lbXNldChyYW5nZSwgMCwgc2l6ZW9mKCpyYW5nZSkpOworCisJLyogTGV0J3MgdHJ5IHRvIGtlZXAgd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0IHRvIHNldCBzZW5zaXZpdHkgdG8gJWRkYiIsd3JxdS0+c2Vucy52YWx1ZSk7CisJaWYocHJpdi0+cmZfc2V0X3NlbnMgPT0gTlVMTCkgeworCQllcnI9IC0xOyAvKiB3ZSBoYXZlIG5vdCB0aGlzIHN1cHBvcnQgZm9yIHRoaXMgcmFkaW8gKi8KKwkJZ290byBleGl0OworCX0KKwlpZihwcml2LT5yZl9zZXRfc2VucyhkZXYsIHdycXUtPnNlbnMudmFsdWUpID09IDApCisJCXByaXYtPnNlbnMgPSB3cnF1LT5zZW5zLnZhbHVlOworCWVsc2UKKwkJZXJyPSAtRUlOVkFMOworCitleGl0OgorCXVwKCZwcml2LT53eF9zZW0pOworCisJcmV0dXJuIGVycjsKK30KKworI2lmIChXSVJFTEVTU19FWFQgPj0gMTgpCisjaWYgMAorc3RhdGljIGludCByODE5Ml93eF9nZXRfZW5jX2V4dChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCWludCByZXQgPSAwOworCXJldCA9IGllZWU4MDIxMV93eF9nZXRfZW5jb2RlX2V4dChwcml2LT5pZWVlODAyMTEsIGluZm8sIHdycXUsIGV4dHJhKTsKKwlyZXR1cm4gcmV0OworfQorI2VuZGlmCisvL2h3IHNlY3VyaXR5IG5lZWQgdG8gcmVvcmdhbml6ZWQuCitzdGF0aWMgaW50IHI4MTkyX3d4X3NldF9lbmNfZXh0KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Ryd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bSk7CisjZW5kaWYKKwlyZXR1cm4gcmV0OworCit9CitzdGF0aWMgaW50IHI4MTkyX3d4X3NldF9hdXRoKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmlvbiBpd3JlcV9kYXRhICpkYXRhLCBjaGFyICpleHRyYSkKK3sKKwlpbnQgcmV0PTA7CisjaWYgTElOVVhfVkVSU0lPTl9DT0RFID4gS0VSTkVMX1ZFUlNJT04oMiw1LDApCisJLy9wcmludGsoIj09PT0+JXMoKVxuIiwgX19GVU5DVElPTl9fKTsKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJZG93bigmcHJpdi0+d3hfc2VtKTsKKwlyZXQgPSBpZWVlODAyMTFfd3hfc2V0X2F1dGgocHJpdi0+aWVlZTgwMjExLCBpbmZvLCAmKGRhdGEtPnBhcmFtKSwgZXh0cmEpOworCXVwKCZwcml2LT53eF9zZW0pOworI2VuZGlmCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCByODE5Ml93eF9zZXRfbWxtZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisJLy9wcmludGsoIj09PT0+JXMoKVxuIiwgX19GVU5DVElPTl9fKTsKKworCWludCByZXQ9MDsKKyNpZiBMSU5VWF9WRVJTSU9OX0NPREUgPiBLRVJORUxfVkVSU0lPTigyLDUsMCkKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJZG93bigmcHJpdi0+d3hfc2VtKTsKKwlyZXQgPSBpZWVlODAyMTFfd3hfc2V0X21sbWUocHJpdi0+aWVlZTgwMjExLCBpbmZvLCB3cnF1LCBleHRyYSk7CisKKwl1cCgmcHJpdi0+d3hfc2VtKTsKKyNlbmRpZgorCXJldHVybiByZXQ7Cit9CisjZW5kaWYKK3N0YXRpYyBpbnQgcjgxOTJfd3hfc2V0X2dlbl9pZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqZGF0YSwgY2hhciAqZXh0cmEpCit7CisJICAgLy9wcmludGsoIj09PT0+JXMoKSwgbGVuOiVkXG4iLCBfX0ZVTkNUSU9OX18sIGRhdGEtPmxlbmd0aCk7CisJaW50IHJldD0wOworI2lmIExJTlVYX1ZFUlNJT05fQ09ERSA+IEtFUk5FTF9WRVJTSU9OKDIsNSwwKQorICAgICAgICBzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisgICAgICAgIGRvd24oJnByaXYtPnd4X3NlbSk7CisjaWYgMQorICAgICAgICByZXQgPSBpZWVlODAyMTFfd3hfc2V0X2dlbl9pZShwcml2LT5pZWVlODAyMTEsIGV4dHJhLCBkYXRhLT5kYXRhLmxlbmd0aCk7CisjZW5kaWYKKyAgICAgICAgdXAoJnByaXYtPnd4X3NlbSk7CisJLy9wcmludGsoIjw9PT09PT0lcygpLCByZXQ6JWRcbiIsIF9fRlVOQ1RJT05fXywgcmV0KTsKKyNlbmRpZgorICAgICAgICByZXR1cm4gcmV0OworCisKK30KKworc3RhdGljIGludCBkdW1teShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICphLAorCQkgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSxjaGFyICpiKQoreworCXJldHVybiAtMTsKK30KKworCitzdGF0aWMgaXdfaGFuZGxlciByODE5Ml93eF9oYW5kbGVyc1tdID0KK3sKKyAgICAgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAvKiBTSU9DU0lXQ09NTUlUICovCisgICAgICAgIHI4MTkyX3d4X2dldF9uYW1lLCAgIAkgIC8qIFNJT0NHSVdOQU1FICovCisgICAgICAgIGR1bW15LCAgICAgICAgICAgICAgICAgICAgLyogU0lPQ1NJV05XSUQgKi8KKyAgICAgICAgZHVtbXksICAgICAgICAgICAgICAgICAgICAvKiBTSU9DR0lXTldJRCAqLworICAgICAgICByODE5Ml93eF9zZXRfZnJlcSwgICAgICAgIC8qIFNJT0NTSVdGUkVRICovCisgICAgICAgIHI4MTkyX3d4X2dldF9mcmVxLCAgICAgICAgLyogU0lPQ0dJV0ZSRVEgKi8KKyAgICAgICAgcjgxOTJfd3hfc2V0X21vZGUsICAgICAgICAvKiBTSU9DU0lXTU9ERSAqLworICAgICAgICByODE5Ml93eF9nZXRfbW9kZSwgICAgICAgIC8qIFNJT0NHSVdNT0RFICovCisgICAgICAgIHI4MTkyX3d4X3NldF9zZW5zLCAgICAgICAgLyogU0lPQ1NJV1NFTlMgKi8KKyAgICAgICAgcjgxOTJfd3hfZ2V0X3NlbnMsICAgICAgICAvKiBTSU9DR0lXU0VOUyAqLworICAgICAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NTSVdSQU5HRSAqLworICAgICAgICBydGw4MTgwX3d4X2dldF9yYW5nZSwJICAvKiBTSU9DR0lXUkFOR0UgKi8KKyAgICAgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAvKiBTSU9DU0lXUFJJViAqLworICAgICAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NHSVdQUklWICovCisgICAgICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgLyogU0lPQ1NJV1NUQVRTICovCisgICAgICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgLyogU0lPQ0dJV1NUQVRTICovCisgICAgICAgIGR1bW15LCAgICAgICAgICAgICAgICAgICAgLyogU0lPQ1NJV1NQWSAqLworICAgICAgICBkdW1teSwgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NHSVdTUFkgKi8KKyAgICAgICAgTlVMTCwgICAgICAgICAgICAgICAgICAgICAvKiBTSU9DR0lXVEhSU1BZICovCisgICAgICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgLyogU0lPQ1dJV1RIUlNQWSAqLworICAgICAgICByODE5Ml93eF9zZXRfd2FwLCAgICAgIAkgIC8qIFNJT0NTSVdBUCAqLworICAgICAgICByODE5Ml93eF9nZXRfd2FwLCAgICAgICAgIC8qIFNJT0NHSVdBUCAqLworI2lmIChXSVJFTEVTU19FWFQgPj0gMTgpCisgICAgICAgIHI4MTkyX3d4X3NldF9tbG1lLCAgICAgICAgICAgICAgICAgICAgIC8qIE1MTUUtLSAqLworI2Vsc2UKKwkgTlVMTCwKKyNlbmRpZgorICAgICAgICBkdW1teSwgICAgICAgICAgICAgICAgICAgICAvKiBTSU9DR0lXQVBMSVNUIC0tIGRlcHJpY2F0ZWQgKi8KKyAgICAgICAgcjgxOTJfd3hfc2V0X3NjYW4sICAgICAgICAvKiBTSU9DU0lXU0NBTiAqLworICAgICAgICByODE5Ml93eF9nZXRfc2NhbiwgICAgICAgIC8qIFNJT0NHSVdTQ0FOICovCisgICAgICAgIHI4MTkyX3d4X3NldF9lc3NpZCwgICAgICAgLyogU0lPQ1NJV0VTU0lEICovCisgICAgICAgIHI4MTkyX3d4X2dldF9lc3NpZCwgICAgICAgLyogU0lPQ0dJV0VTU0lEICovCisgICAgICAgIGR1bW15LCAgICAgICAgICAgICAgICAgICAgLyogU0lPQ1NJV05JQ0tOICovCisgICAgICAgIGR1bW15LCAgICAgICAgICAgICAgICAgICAgLyogU0lPQ0dJV05JQ0tOICovCisgICAgICAgIE5VTEwsICAgICAgICAgICAgICAgICAgICAgLyogLS0gaG9sZSAtLSAqLworICAgICAgICBOVUxMLCAgICAgICAgICAgICAgICAgICAgIC8qIC0tIGhvbGUgLS0gKi8KKyAgICAgICAgcjgxOTJfd3hfc2V0X3JhdGUsICAgICAgICAvKiBTSU9DU0lXUkFURSAqLworICAgICAgICByODE5Ml93eF9nZXRfcmF0ZSwgICAgICAgIC8qIFNJT0NHSVdSQVRFICovCisgICAgICAgIHI4MTkyX3d4X3NldF9ydHMsICAgICAgICAgICAgICAgICAgICAvKiBTSU9DU0lXUlRTICovCisgICAgICAgIHI4MTkyX3d4X2dldF9ydHMsICAgICAgICAgICAgICAgICAgICAvKiBTSU9DR0lXUlRTICovCisgICAgICAgIHI4MTkyX3d4X3NldF9mcmFnLCAgICAgICAgLyogU0lPQ1NJV0ZSQUcgKi8KKyAgICAgICAgcjgxOTJfd3hfZ2V0X2ZyYWcsICAgICAgICAvKiBTSU9DR0lXRlJBRyAqLworICAgICAgICBkdW1teSwgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NTSVdUWFBPVyAqLworICAgICAgICBkdW1teSwgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NHSVdUWFBPVyAqLworICAgICAgICByODE5Ml93eF9zZXRfcmV0cnksICAgICAgIC8qIFNJT0NTSVdSRVRSWSAqLworICAgICAgICByODE5Ml93eF9nZXRfcmV0cnksICAgICAgIC8qIFNJT0NHSVdSRVRSWSAqLworICAgICAgICByODE5Ml93eF9zZXRfZW5jLCAgICAgICAgIC8qIFNJT0NTSVdFTkNPREUgKi8KKyAgICAgICAgcjgxOTJfd3hfZ2V0X2VuYywgICAgICAgICAvKiBTSU9DR0lXRU5DT0RFICovCisgICAgICAgIHI4MTkyX3d4X3NldF9wb3dlciwgICAgICAgICAgICAgICAgICAgIC8qIFNJT0NTSV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Kwl9LAorCXsKKwkJU0lPQ0lXRklSU1RQUklWICsgMHgyLAorCQlJV19QUklWX1RZUEVfSU5UIHwgSVdfUFJJVl9TSVpFX0ZJWEVEIHwgMSwgMCwgInJhd3R4IgorCX0KKyNpZmRlZiBKT0hOX0lPQ1RMCisJLAorCXsKKwkJU0lPQ0lXRklSU1RQUklWICsgMHgzLAorICAgICAgICAgICAgICAgIElXX1BSSVZfVFlQRV9JTlQgfCBJV19QUklWX1NJWkVfRklYRUQgfCAxLCAwLCAicmVhZFJGIgorCX0KKwksCisJeworCQlTSU9DSVdGSVJTVFBSSVYgKyAweDQsCisgICAgICAgICAgICAgICAgSVdfUFJJVl9UWVBFX0lOVCB8IElXX1BSSVZfU0laRV9GSVhFRCB8IDEsIDAsICJ3cml0ZVJGIgorCX0KKwksCisJeworCQlTSU9DSVdGSVJTVFBSSVYgKyAweDUsCisgICAgICAgICAgICAgICAgSVdfUFJJVl9UWVBFX0lOVCB8IElXX1BSSVZfU0laRV9GSVhFRCB8IDEsIDAsICJyZWFkQkIiCisJfQorCSwKKwl7CisJCVNJT0NJV0ZJUlNUUFJJViArIDB4NiwKKyAgICAgICAgICAgICAgICBJV19QUklWX1RZUEVfSU5UIHwgSVdfUFJJVl9TSVpFX0ZJWEVEIHwgMSwgMCwgIndyaXRlQkIiCisJfQorICAgICAgICAsCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICBTSU9DSVdGSVJTVFBSSVYgKyAweDcsCisgICAgICAgICAgICAgICAgSVdfUFJJVl9UWVBFX0lOVCB8IElXX1BSSVZfU0laRV9GSVhFRCB8IDEsIDAsICJyZWFkbmljYiIKKyAgICAgICAgfQorICAgICAgICAsCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICBTSU9DSVdGSVJTVFBSSVYgKyAweDgsCisgICAgICAgICAgICAgICAgSVdfUFJJVl9UWVBFX0lOVCB8IElXX1BSSVZfU0laRV9GSVhFRCB8IDEsIDAsICJ3cml0ZW5pY2IiCisgICAgICAgIH0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IDEpCisJCQlicmVhazsKKwl9CisJcmV0dXJuIGk7Cit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBjaGVjayBkaWZmZXJlbnQgUkYgdHlwZSB0byBleGVjdXRlIGxlZ2FsIGp1ZGdlbWVudC4gSWYgUkYgUGF0aCBpcyBpbGxlZ2FsLCB3ZSB3aWxsIHJldHVybiBmYWxzZS4KKyAqICAgaW5wdXQ6ICBub25lCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIDAoaWxsZWdhbCwgZmFsc2UpLCAxKGxlZ2FsLHRydWUpCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit1OCBydGw4MTkyX3BoeV9DaGVja0lzTGVnYWxSRlBhdGgoc3RydWN0IG5ldF9kZXZpY2UqIGRldiwgdTMyIGVSRlBhdGgpCit7CisJdTggcmV0ID0gMTsKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJaWYgKHByaXYtPnJmX3R5cGUgPT0gUkZfMlQ0UikKKwkJcmV0ID0gMDsKKwllbHNlIGlmIChwcml2LT5yZl90eXBlID09IFJGXzFUMlIpCisJeworCQlpZiAoZVJGUGF0aCA9PSBSRjkwX1BBVEhfQSB8fCBlUkZQYXRoID09IFJGOTBfUEFUSF9CKQorCQkJcmV0ID0gMTsKKwkJZWxzZSBpZiAoZVJGUGF0aCA9PSBSRjkwX1BBVEhfQyB8fCBlUkZQYXRoID09IFJGOTBfUEFUSF9EKQorCQkJcmV0ID0gMDsKKwl9CisJcmV0dXJuIHJldDsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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fUXVlcnlCQlJlZyhkZXYsIHBQaHlSZWctPnJmTFNTSVJlYWRCYWNrLCBiTFNTSVJlYWRCYWNrRGF0YSk7CisKKworCS8vIFN3aXRjaCBiYWNrIHRvIFJlZ19Nb2RlMDsKKwlpZihwcml2LT5yZl9jaGlwID09IFJGXzgyNTYpCisJeworCQlwcml2LT5SZlJlZzBWYWx1ZVtlUkZQYXRoXSAmPSAweGViZjsKKworCQlydGw4MTkyX3NldEJCcmVnKAorCQkJZGV2LAorCQkJcFBoeVJlZy0+cmYzd2lyZU9mZnNldCwKKwkJCWJNYXNrRFdvcmQsCisJCQkocHJpdi0+UmZSZWcwVmFsdWVbZVJGUGF0aF0gPDwgMTYpKTsKKwl9CisKKwlyZXR1cm4gcmV0OworCit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBUaGlzIGZ1bmN0aW9uIHdyaXRlIGRhdGEgdG8gUkYgcmVnaXN0ZXIKKyAqICAgaW5wdXQ6ICBuZXRfZGV2aWNlIGRldgorICogICAJICAgICBSRjkwX1JBRElPX1BBVEhfRSBlUkZQYXRoIC8vcmFkaW8gcGF0aCBvZiBBL0IvQy9ECisgKiAgICAgICAgICAgdTMyCU9mZnNldCAgICAgLy90YXJnZXQgYWRkcmVzcyB0byBiZSB3cml0dGVuCisgKiAgICAgICAgICAgdTMyCURhdGEJLy9UaGUgbmV3IHJlZ2lzdGVyIGRhdGEgdG8gYmUgd3JpdHRlbgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOiAgRm9yIFJGODI1NiBvbmx5LgorICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICpSZWcgTW9kZQlSZWdDVExbMV0JUmVnQ1RMWzBdCQlOb3RlCisgKgkJKFJlZzAwWzEyXSkJ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ZnQoQml0TWFzayk7CisgICAJCVJlYWRiYWNrX1ZhbHVlID0gKE9yaWdpbmFsX1ZhbHVlICYgQml0TWFzaykgPj4gQml0U2hpZnQ7CisJCXJldHVybiAoUmVhZGJhY2tfVmFsdWUpOworCX0KK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBXZSBzdXBwb3J0IGZpcm13YXJlIHRvIGV4ZWN1dGUgUkYtUi9XLgorICogICBpbnB1dDogIGRldgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljCXUzMgorcGh5X0Z3UkZTZXJpYWxSZWFkKAorCXN0cnVjdCBuZXRfZGV2aWNlKiBkZXYsCisJUkY5MF9SQURJT19QQVRIX0UJZVJGUGF0aCwKKwl1MzIJCQkJT2Zmc2V0CSkKK3sKKwl1MzIJCXJldFZhbHVlID0gMDsKKwl1MzIJCURhdGEgPSAwOworCXU4CQl0aW1lID0gMDsKKwkvL0RiZ1ByaW50KCJGVyBSRiBDVFJMXG5cciIpOworCS8qIDIwMDcvMTEvMDIgTUggRmlybXdhcmUgUkYgV3JpdGUgY29udHJvbC4gQnkgRnJhbmNpcycgc3VnZ2VzdGlvbiwgd2UgY2FuCisJICAgbm90IGV4ZWN1dGUgdGhlIHNjaGVtZSBpbiB0aGUgaW5pdGlhbCBzdGVwLiBPdGhlcndpc2UsIFJGLVIvVyB3aWxsIHdhc3RlCisJICAgbXVjaCB0aW1lLiBUaGlzIGlzIG9ubHkgZm9yIHNpdGUgc3VydmV5LiAqLworCS8vIDEuIFJlYWQgb3BlcmF0aW9uIG5lZWQgbm90IGluc2VydCBkYXRhLiBiaXQgMC0xMQorCS8vRGF0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A/PyB0aW1lcy4gV2UgbXVzdCByZXNldCBGVy4KKwkJaWYgKHRpbWUrKyA8IDEwMCkKKwkJeworCQkJLy9EYmdQcmludCgiRlcgbm90IGZpbmlzaCBSRi1XIFRpbWU9JWRcblxyIiwgdGltZSk7CisJCQl1ZGVsYXkoMTApOworCQl9CisJCWVsc2UKKwkJCXJldHVybgkoMCk7CisJfQorCXJldFZhbHVlID0gcmVhZF9uaWNfZHdvcmQoZGV2LCBSRl9EQVRBKTsKKworCXJldHVybgkocmV0VmFsdWUpOworCit9CS8qIHBoeV9Gd1JGU2VyaWFsUmVhZCAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgV2Ugc3VwcG9ydCBmaXJtd2FyZSB0byBleGVjdXRlIFJGLVIvVy4KKyAqICAgaW5wdXQ6ICBkZXYKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogIG5vdGljZToKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkCitwaHlfRndSRlNlcmlhbFdyaXRlKAorCQlzdHJ1Y3QgbmV0X2RldmljZSogZGV2LAorCQlSRjkwX1JBRElPX1BBVEhfRQllUkZQYXRoLAorCQl1MzIJCQkJT2Zmc2V0LAorCQl1MzIJCQkJRGF0YQkpCit7CisJdTgJdGltZSA9IDA7CisKKwkvL0RiZ1ByaW50KCJOIEZXIFJGIENUUkwgUkYtJWQgT0YlMDJ4IERBVEE9JTAzeFxuXHIiLCBlUkZQYXRoLCBPZmZzZXQsIERhdGEpOworCS8qIDIwMDcvMTEvMDIgTUggRmlybXdhcmUgUkYgV3JpdGUgY29udHJvbC4gQnkgRnJhbmNpcycgc3VnZ2VzdGlvbiwgd2UgY2FuCisJICAgb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rOworCX0KKwkvLyA3LiBObyBtYXR0ZXIgY2hlY2sgYml0LiBXZSBhbHdheXMgZm9yY2UgdGhlIHdyaXRlLiBCZWNhdXNlIEZXIHdpbGwKKwkvLyAgICBub3QgYWNjZXB0IHRoZSBjb21tYW5kLgorCXdyaXRlX25pY19kd29yZChkZXYsIFFQTlIsIERhdGEpOworCS8qIDIwMDcvMTEvMDIgTUggQWNvb3JkaW5nIHRvIHRlc3QsIHdlIG11c3QgZGVsYXkgMjB1cyB0byB3YWl0IGZpcm13YXJlCisJICAgdG8gZmluaXNoIFJGIHdyaXRlIG9wZXJhdGlvbi4gKi8KKwkvKiAyMDA4LzAxLzE3IE1IIFdlIHN1cHBvcnQgZGVsYXkgaW4gZmlybXdhcmUgc2lkZSBub3cuICovCisJLy9kZWxheV91cygyMCk7CisKK30JLyogcGh5X0Z3UkZTZXJpYWxXcml0ZSAqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBUaGlzIGZ1bmN0aW9uIHJlYWQgQkIgcGFyYW1ldGVycyBmcm9tIEhlYWRlciBmaWxlIHdlIGdlbiwKKyAqCSAgICAgYW5kIGRvIHJlZ2lzdGVyIHJlYWQvd3JpdGUKKyAqICAgaW5wdXQ6ICBkZXYKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogIG5vdGljZTogIEJCIHBhcmFtZXRlcnMgbWF5IGNoYW5nZSBhbGwgdGhlIHRpbWUsIHNvIHBsZWFzZSBtYWtlCisgKiAgICAgICAgICAgc3VyZSBpdCBoYXMgYmVlbiBzeW5jZWQgd2l0aCB0aGUgbmV3ZXN0LgorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBydGw4MTkyX3BoeV9jb25maWdtYW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2krMV0sIHBkd0FycmF5W2krMl0pOworCQlydGw4MTkyX3NldEJCcmVnKGRldiwgcGR3QXJyYXlbaV0sIHBkd0FycmF5W2krMV0sIHBkd0FycmF5W2krMl0pOworCX0KKwlyZXR1cm47CisKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gZG8gZGlydHkgd29yaworICogICBpbnB1dDogIGRldgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub25lCisgKiAgbm90aWNlOiAgQkIgcGFyYW1ldGVycyBtYXkgY2hhbmdlIGFsbCB0aGUgdGltZSwgc28gcGxlYXNlIG1ha2UKKyAqICAgICAgICAgICBzdXJlIGl0IGhhcyBiZWVuIHN5bmNlZCB3aXRoIHRoZSBuZXdlc3QuCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQgcnRsODE5Ml9waHlDb25maWdCQihzdHJ1Y3QgbmV0X2RldmljZSogZGV2LCB1OCBDb25maWdUeXBlKQoreworCXUzMiBpOworCisjaWZkZWYgVE9fRE9fTElTVAorCXUzMiAqcnRsODE5MlBoeVJlZ0FycmF5VGFibGUgPSBOVUxMLCAqcnRsODE5MkFnY1RhYkFycmF5VGFibGUgPSBOVUxMOworCWlmKEFkYXB0ZXItPmJJbkhjdFRlc3QpCisJeworCQlQSFlfUkVHQXJyYXlMZW4gPSBQSFlfUkVHQXJyYXlMZW5ndGhEVE07CisJCUFHQ1RBQl9BcnJheUxlbiA9IEFHQ1RBQl9BcnJheUxlbmd0aERUTTsKKwkJUnRsODE5MFBIWV9SRUdBcnJheV9UYWJsZSA9IFJ0bDgxOVhQSFlfUkVHQXJyYXlEVE07CisJCVJ0bDgxOTBBR0NUQUJfQXJyYXlfVGFib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sKKworCS8vIFRyYW5jZWl2ZXIgTFNTSSBSZWFkYmFjaworCXByaXYtPlBIWVJlZ0RlZltSRjkwX1BBVEhfQV0ucmZMU1NJUmVhZEJhY2sgPSByRlBHQTBfWEFfTFNTSVJlYWRCYWNrOworCXByaXYtPlBIWVJlZ0RlZltSRjkwX1BBVEhfQl0ucmZMU1NJUmVhZEJhY2sgPSByRlBHQTBfWEJfTFNTSVJlYWRCYWNrOworCXByaXYtPlBIWVJlZ0RlZltSRjkwX1BBVEhfQ10ucmZMU1NJUmVhZEJhY2sgPSByRlBHQTBfWENfTFNTSVJlYWRCYWNrOworCXByaXYtPlBIWVJlZ0RlZltSRjkwX1BBVEhfRF0ucmZMU1NJUmVhZEJhY2sgPSByRlBHQTBfWERfTFNTSVJlYWRCYWNrOworCit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBpcyB0byB3cml0ZSByZWdpc3RlciBhbmQgdGhlbiByZWFkYmFjayB0byBtYWtlIHN1cmUgd2hldGhlciBCQiBhbmQgUkYgaXMgT0sKKyAqICAgaW5wdXQ6ICBuZXRfZGV2aWNlIGRldgorICogICAJICAgICBIVzkwX0JMT0NLX0UgQ2hlY2tCbG9jaworICogICAJICAgICBSRjkwX1JBRElPX1BBVEhfRSBlUkZQYXRoICAvL29ubHkgdXNlZCB3aGVuIGNoZWNrYmxvY2sgaXMgSFc5MF9CTE9DS19SRgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICByZXR1cm4gd2hldGhlciBCQiBhbmQgUkYgaXMgb2soMDpPSzsgMTpGYWlsKQorICogIG5vdGljZTogIFRoaXMgZnVuY3Rpb24gbWF5IGJlIHJlbW92ZWQgaW4gdGhlIEFTSUMKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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mVycm9yPT09PT1kd1JlZ1JlYWQ6ICV4LCBXcml0ZURhdGE6ICV4IFxuIiwgZHdSZWdSZWFkLCBXcml0ZURhdGFbaV0pOworCQkJcmV0ID0gMTsKKwkJCWJyZWFrOworCQl9CisJfQorCisJcmV0dXJuIHJldDsKK30KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBpbml0aWFsaXplIEJCJlJGCisgKiAgIGlucHV0OiAgbmV0X2RldmljZSBkZXYKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogIG5vdGljZTogIEluaXRpYWxpemF0aW9uIHZhbHVlIG1heSBjaGFuZ2UgYWxsIHRoZSB0aW1lLCBzbyBwbGVhc2UgbWFrZQorICogICAgICAgICAgIHN1cmUgaXQgaGFzIGJlZW4gc3luY2VkIHdpdGggdGhlIG5ld2VzdC4KKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgcnRsODE5Ml9CQl9Db25maWdfUGFyYUZpbGUoc3RydWN0IG5ldF9kZXZpY2UqIGRldikKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJdTggYlJlZ1ZhbHVlID0gMCwgZUNoZWNrSXRlbSA9IDAsIHJ0U3RhdHVzID0gMDsKKwl1MzIgZHdSZWdWYWx1ZSA9IDA7CisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJLy88MT5Jbml0aWFsaXplIEJhc2VCYW5kCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKwkvKi0tc2V0IEJCIEdsb2JhbCBSZXNldC0tKi8KKwliUmVnVmFsd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uIHdlbGwKKwkvL2ltcGxlbWVudGVkLCBzbyB1c2UgZmlsZSBmaXJzdC5GSVhNRTpzaG91bGQgaW1wbGVtZW50IGl0IGZvciBoYXJkY29kZT8KKwlydGw4MTkyX0JCX0NvbmZpZ19QYXJhRmlsZShkZXYpOworCXJldHVybjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gb2J0YWlucyB0aGUgaW5pdGlhbGl6YXRpb24gdmFsdWUgb2YgVHggcG93ZXIgTGV2ZWwgb2Zmc2V0CisgKiAgIGlucHV0OiAgbmV0X2RldmljZSBkZXYKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBydGw4MTkyX3BoeV9nZXRUeFBvd2VyKHN0cnVjdCBuZXRfZGV2aWNlKiBkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCXByaXYtPk1DU1R4UG93ZXJMZXZlbE9yaWdpbmFsT2Zmc2V0WzBdID0KKwkJcmVhZF9uaWNfZHdvcmQoZGV2LCByVHhBR0NfUmF0ZTE4XzA2KTsKKwlwcml2LT5NQ1NUeFBvd2VyTGV2ZWxPcmlnaW5hbE9mZnNldFsxXSA9CisJCXJlYWRfbmljX2R3b3JkKGRldiwgclR4QUdDX1JhdGU1NF8yNCk7CisJcHJpdi0+TUNTVHhQb3dlckxldmVsT3JpZ2luYWxPZmZzZXRbMl0gPQorCQlyZWFkX25pY19kd29yZChkZXYsIHJUeEFHQ19NY3MwM19NY3MwMCk7CisJcHJpdi0+TUNTVHhQb3dlckxldmVsT3JpZ2luYWxPZmZzZXRbM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pOworCXByaXYtPmZyYW1lc3luY0MzNCA9IHJlYWRfbmljX2J5dGUoZGV2LCByT0ZETTBfUnhEZXRlY3RvcjIpOworCVJUX1RSQUNFKENPTVBfSU5JVCwgIkRlZmF1bHQgZnJhbWVzeW5jICgweCV4KSA9IDB4JXggXG4iLAorCQlyT0ZETTBfUnhEZXRlY3RvcjMsIHByaXYtPmZyYW1lc3luYyk7CisKKwkvLyByZWFkIFNJRlMgKHNhdmUgdGhlIHZhbHVlIHJlYWQgZm9tZSBNQUNQSFlfUkVHLnR4dCkKKwlwcml2LT5TaWZzVGltZSA9IHJlYWRfbmljX3dvcmQoZGV2LCBTSUZTKTsKKworCXJldHVybjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gb2J0YWlucyB0aGUgaW5pdGlhbGl6YXRpb24gdmFsdWUgb2YgVHggcG93ZXIgTGV2ZWwgb2Zmc2V0CisgKiAgIGlucHV0OiAgbmV0X2RldmljZSBkZXYKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBydGw4MTkyX3BoeV9zZXRUeFBvd2VyKHN0cnVjdCBuZXRfZGV2aWNlKiBkZXYsIHU4IGNoYW5uZWwpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBpZWVlODAyMTFfcHJpdihkZXYpOworCXU4CXBvd2VybGV2ZWwgPSBwcml2LT5UeFBvd2VyTGV2ZWxDQ0tbY2hhbm5lbC0xXTsKKwl1OAlwb3dlcmxldmVsT0ZETTI0RyA9IHByaXYtPlR4UG93ZXJMZXZlbE9GRE0yNEdbY2hhbm5lbC0xXTsKKworCXN3aXRjaChwcml2LT5yZl9jaGlwKQorCXsKKwljYXNlIFJGXzgyNTY6CisJCVBIWV9TZXRSRjgyNTZDQ0tUeFBvd2VyKGRldiwgcG93ZXJsZXZlbCk7IC8vbmVlZCBmdXJ0aGVyIGltcGxlbWVudAorCQlQSFlfU2V0UkY4MjU2T0ZETVR4UG93ZXIoZGV2LCBwb3dlcmxldmVsT0ZETTI0Ryk7CisJCWJyZWFrOworCWRlZmF1bHQ6CisvLwljYXNlIFJGXzgyMjU6CisvLwljYXNlIFJGXzgyNTg6CisJCVJUX1RSQUNFKChDT01QX1BIWXxDT01QX0VSUiksICJlcnJvciBSRiBjaGlwSUQoODIyNSBvciA4MjU4KSBpbiBmdW5jdGlvbiAlcygpXG4iLCBfX0ZVTkNUSU9OX18pOworCQlicmVhazsKKwl9CisJcmV0dXJuOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBjaGVjayBSZiBjaGlwIHRvIGRvIFJGIGNvbmZpZworICogICBpbnB1dDogIG5ldF9kZXZpY2UgZGV2CisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG9ubHkgODI1NiBpcyBzdXBwb3J0ZWQKKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgcnRsODE5Ml9waHlfUkZDb25maWcoc3RydWN0IG5ldF9kZXZpY2UqIGRldikKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisKKwlzd2l0Y2gocHJpdi0+cmZfY2hpcCkKKwl7CisJCWNhc2UgUkZfODI1NjoKKwkJCVBIWV9SRjgyNTZfQ29uZmlnKGRldik7CisJCQlicmVhazsKKwkvLwljYXNlIFJGXzgyMjU6CisJLy8JY2FzZSBSRl84MjU4OgorCQlkZWZhdWx0OgorCQkJUlRfVFJBQ0UoQ09NUF9FUlIsICJlcnJvciBjaGlwIGlkXG4iKTsKKwkJCWJyZWFrOworCX0KKwlyZXR1cm47Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBUaGlzIGZ1bmN0aW9uIHVwZGF0ZSBJbml0aWFsIGdhaW4KKyAqICAgaW5wdXQ6ICBuZXRfZGV2aWNlIGRldgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBBcyBXaW5kb3dzIGhhcyBub3QgaW1wbGVtZW50ZWQgdGhpcywgd2FpdCBmb3IgY29tcGxlbWVudAorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBydGw4MTkyX3BoeV91cGRhdGVJbml0R2FpbihzdHJ1Y3QgbmV0X2RldmljZSogZGV2KQoreworCXJldHVybjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICpmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gcmVhZCBSRiBwYXJhbWV0ZXJzIGZyb20gZ2VuZXJhbCBoZWFkIGZpbGUsIGFuZCBkbyBSRiAzLXdpcmUKKyAqICAgaW5wdXQ6ICBuZXRfZGV2aWNlIGRldgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICByZXR1cm4gY29kZSBzaG93IGlmIFJGIGNvbmZpZ3VyYXRpb24gaXMgc3VjY2Vzc2Z1bCgwOnBhc3MsIDE6ZmFpbCkKKyAqICAgIE5vdGU6ICBEZWxheSBtYXkgYmUgcmVxdWlyZWQgZm9yIFJGIGNvbmZpZ3VyYXRpb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DOgorCQkJZm9yKGkgPSAwO2k8UmFkaW9DX0FycmF5TGVuZ3RoOyBpPWkrMil7CisKKwkJCQlpZihydGw4MTlYUmFkaW9DX0FycmF5W2ldID09IDB4ZmUpeworCQkJCQkJbWRlbGF5KDEwMCk7CisJCQkJCQljb250aW51ZTsKKwkJCQl9CisJCQkJcnRsODE5Ml9waHlfU2V0UkZSZWcoZGV2LCBlUkZQYXRoLCBydGw4MTlYUmFkaW9DX0FycmF5W2ldLCBiTWFzazEyQml0cywgcnRsODE5WFJhZGlvQ19BcnJheVtpKzFdKTsKKwkJCQltZGVsYXkoMSk7CisKKwkJCX0KKwkJCWJyZWFrOworCQljYXNlIFJGOTBfUEFUSF9EOgorCQkJZm9yKGkgPSAwO2k8UmFkaW9EX0FycmF5TGVuZ3RoOyBpPWkrMil7CisKKwkJCQlpZihydGw4MTlYUmFkaW9EX0FycmF5W2ldID09IDB4ZmUpeworCQkJCQkJbWRlbGF5KDEwMCk7CisJCQkJCQljb250aW51ZTsKKwkJCQl9CisJCQkJcnRsODE5Ml9waHlfU2V0UkZSZWcoZGV2LCBlUkZQYXRoLCBydGw4MTlYUmFkaW9EX0FycmF5W2ldLCBiTWFzazEyQml0cywgcnRsODE5WFJhZGlvRF9BcnJheVtpKzFdKTsKKwkJCQltZGVsYXkoMSk7CisKKwkJCX0KKwkJCWJyZWFrOworCQlkZWZhdWx0OgorCQkJYnJlYWs7CisJfQorCisJcmV0dXJuIHJldDs7CisKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqZnVuY3Rpb246ICBUaGlzIGZ1bmN0aW9uIHNldCBUeCBQb3dlciBvZiB0aGUgY2hhbm5lbAorICogICBpbnB1dDogIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYKKyAqICAgCSAgICAgdTggCQljaGFubmVsCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vb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Hkgc2V0IGNoYW5uZWwgd29yaworICogICBpbnB1dDogIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYKKyAqICAgCSAgICAgdTggCQljaGFubmVsCisgKiAgb3V0cHV0OiAgbm9uZQorICogIHJldHVybjogIG5vaW4KKyAqICAgIE5vdGU6ICBXZSBzaG91bGQgbm90IGNhbGwgdGhpcyBmdW5jdGlvbiBkaXJlY3RseQorICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBydGw4MTkyX3BoeV9GaW5pc2hTd0NobmxOb3coc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgdTggY2hhbm5lbCkKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisJdTMyCWRlbGF5ID0gMDsKKworCXdoaWxlKCFydGw4MTkyX3BoeV9Td0NobmxTdGVwQnlTdGVwKGRldixjaGFubmVsLCZwcml2LT5Td0NobmxTdGFnZSwmcHJpdi0+U3dDaG5sU3RlcCwmZGVsYXkpKQorCXsKKwkvLwlpZihkZWxheT4wKQorCS8vCQltc2xlZXAoZGVsYXkpOy8vb3IgbWRlbGF5PyBuZWVkIGZ1cnRoZXIgY29uc2lkZXJhdGlvbgorCQlpZighcHJpdi0+dXApCisJCQlicmVhazsKKwl9Cit9CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgQ2FsbGJhY2sgcm91dGluZSBvZiB0aGUgd29yayBpdGVtIGZvciBzd2l0Y2ggY2hhbm5lbC4KKyAqICAgaW5wdXQ6CisgKgorICogIG91dHB1dDogIG5vbmUKKyAqICByZXR1cm46ICBub2luCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIHJ0bDgxOTJfU3dDaG5sX1dvcmtJdGVtKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IGllZWU4MDIxMV9wcml2KGRldik7CisKKwlSVF9UUkFDRShDT01QX0NILCAiPT0+IFN3Q2hubENhbGxiYWNrODE5eFVzYldvcmtJdGVtKCksIGNoYW46JWRcbiIsIHByaXYtPmNoYW4pOworCisKKwlydGw4MTkyX3BoeV9GaW5pc2hTd0NobmxOb3coZGV2ICwgcHJpdi0+Y2hhbik7CisKKwlSVF9UUkFDRShDT01QX0NILCAiPD09IFN3Q2hubENhbGxiYWNrODE5eFVzYldvcmtJdGVtKClcbiIpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBzY2hlZHVsZWQgYWN0dXJhbCB3b3JraXRlbSB0byBzZXQgY2hhbm5lbAorICogICBpbnB1dDogIG5ldF9kZXZpY2UgZGV2CisgKiAgIAkgICAgIHU4CQljaGFubmVsIC8vY2hhbm5lbCB0byBzZXQKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgcmV0dXJuIGNvZGUgc2hvdyBpZiB3b3JraXRlbSBpcyBzY2hlZHVsZWQoMTpwYXNzLCAwOmZhaWwpCisgKiAgICBOb3RlOiAgRGVsYXkgbWF5IGJlIHJlcXVpcmVkIGZvciBSRiBjb25maWd1cmF0aW9uCisgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit1OCBydGw4MTkyX3BoeV9Td0Nobmwoc3RydWN0IG5ldF9kZXZpY2UqIGRldiwgdTggY2hhbm5lbCkKK3sKKwlzdHJ1Y3Qgcj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GQ2hpcElEOiAlZFxuIiwgcHJpdi0+cmZfY2hpcCk7CisJCQlicmVhazsKKwl9CisjZW5kaWYKKwlwcml2LT5TZXRCV01vZGVJblByb2dyZXNzPSBmYWxzZTsKKworCVJUX1RSQUNFKENPTVBfU1dCVywgIjw9PVNldEJXTW9kZTgxOXhVc2IoKSwgJWQiLCBhdG9taWNfcmVhZCgmKHByaXYtPmllZWU4MDIxMS0+YXRtX3N3YncpKSApOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKmZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiBzY2hlZHVsZXMgYmFuZHdpdGggc3dpdGNoIHdvcmsuCisgKiAgIGlucHV0OiAgc3RydWN0IG5ldF9kZXZpY2UgKmRldgorICogICAJICAgICBIVF9DSEFOTkVMX1dJRFRICUJhbmR3aWR0aCAgLy8yME0gb3IgNDBNCisgKiAgIAkgICAgIEhUX0VYVENITkxfT0ZGU0VUIE9mZnNldCAJICAgLy9VcHBlciwgTG93ZXIsIG9yIERvbid0IGNhcmUKKyAqICBvdXRwdXQ6ICBub25lCisgKiAgcmV0dXJuOiAgbm9uZQorICogICAgTm90ZTogIEkgZG91YnQgd2hldGhlciBTZXRCV01vZGVJblByb2dyZXNzIGZsYWcgaXMgbmVjZXNzYXJ5IGFzIHdlIGNhbgorICogICAgCSAgICAgdGVzdCB3aGV0aGVyIGN1cnJlbnQgd29yayBpbiB0aGUgcXVldWUgb3Igbm90Li8vZG8gST8KKyAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgcnRsODE5Ml9TZXRCV01vZGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgSFRfQ0hBTk5FTF9XSURUSAlCYW5kd2lkdGgsIEhUX0VYVENITkxfT0ZGU0VUIE9mZnN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ICAgCTB4MgorI2RlZmluZSByWmVicmExX0FHQyAgICAgICAgICAgICAgICAgICAJCTB4NAorI2RlZmluZSByWmVicmExX0NoYXJnZVB1bXAgICAgICAgICAgICAJMHg1CisjZGVmaW5lIHJaZWJyYTFfQ2hhbm5lbCAgICAgICAgICAgICAgIAkJMHg3CisjZGVmaW5lIHJaZWJyYTFfVHhHYWluICAgICAgICAgICAgICAgCSAJMHg4CisjZGVmaW5lIHJaZWJyYTFfVHhMUEYgICAgICAgICAgICAgICAgIAkJMHg5CisjZGVmaW5lIHJaZWJyYTFfUnhMUEYgICAgICAgICAgICAgICAgIAkJMHhiCisjZGVmaW5lIHJaZWJyYTFfUnhIUEZDb3JuZXIgICAgICAgICAgIAkweGMKKworLy9aZWJyYTQKKyNkZWZpbmUgckdsb2JhbEN0cmwgICAgICAgICAgICAgICAgICAgCQkwCisjZGVmaW5lIHJSVEw4MjU2X1R4TFBGICAgICAgICAgICAgICAgIAkJMTkKKyNkZWZpbmUgclJUTDgyNTZfUnhMUEYgICAgICAgICAgICAgICAgCQkxMQorCisvL1JUTDgyNTgKKyNkZWZpbmUgclJUTDgyNThfVHhMUEYgICAgICAgICAgICAgICAgCQkweDExCisjZGVmaW5lIHJSVEw4MjU4X1J4TFBGICAgICAgICAgICAgICAgIAkJMHgxMworI2RlZmluZSByUlRMODI1OF9SU1NJTFBGICAgICAgICAgICAgICAJMHhhCisKKy8vQml0IE1hc2sKKy8vcGFnZS0xCisjZGVmaW5lIGJCQlJlc2V0QiAgICAgICAgICAgICAgICAgCQkJMHgxMDAKKyNkZWZpbmUgYkdsb2JhbFJlc2V0QiAgICAgICAgICAgICAJCTB4MjAwCisjZGVmaW5lIGJPRkRNVHhTdGFydCAgICAgICAgICAgICAgCQkweDQKKyNkZWZpbmUgYkNDS1R4U3RhcnQgICAgICAgICAgICAgICAJCQkweDgKKyNkZWZpbmUgYkNSQzMyRGVidWcgICAgICAgICAgICAgICAJCTB4MTAwCisjZGVmaW5lIGJQTUFDTG9vcGJhY2sgICAgICAgICAgICAgCQkweDEwCisjZGVmaW5lIGJUeExTSUcgICAgICAgICAgICAgICAgICAgCQkJMHhmZmZmZmYKKyNkZWZpbmUgYk9GRE1UeFJhdGUgICAgICAgICAgICAgICAJCTB4ZgorI2RlZmluZSBiT0ZETVR4UmVzZXJ2ZWQgICAgICAgICAgIAkJMHgxMAorI2RlZmluZSBiT0ZETVR4TGVuZ3RoICAgICAgICAgICAgIAkJMHgxZmZlMAorI2RlZmluZSBiT0ZETVR4UGFyaXR5ICAgICAgICAgICAgIAkJMHgyMDAwMAorI2RlZmluZSBiVHhIVFNJRzEgICAgICAgICAgICAgICAgIAkJCTB4ZmZmZmZmCisjZGVmaW5lIGJUeEhUTUNTUmF0ZSAgICAgICAgICAgICAgCQkweDdmCisjZGVmaW5lIGJUeEhUQlcgICAgICAgICAgICAgICAgICAgCQkJMHg4MAorI2RlZmluZSBiVHhIVExlbmd0aCAgICAgICAgICAgICAgIAkJMHhmZmZmMDAKKyNkZWZpbmUgYlR4SFRTSUcyICAgICAgICAgICAgICAgICAJCQkweGZmZmZmZgorI2RlZmluZSBiVHhIVFNtb290aGluZyAgICAgICAgICAgIAkJMHgxCisjZGVmaW5lIGJUeEhUU291bmRpbmcgICAgICAgICAgICAgCQkweDIKKyNkZWZpbmUgYlR4SFRSZXNlcnZlZCAgICAgICAgICAgICAJCTB4NAorI2RlZmluZSBiVHhIVEFnZ3JlYXRpb24gICAgICAgICAgIAkJMHg4CisjZGVmaW5lIGJUeEhUU1RCQyAgICAgICAgICAgICAgICAgCQkJMHgzMAorI2RlZmluZSBiVHhIVEFkdmFuY2VDb2RpbmcgICAgICAgIAkJMHg0MAorI2RlZmluZSBiVHhIVFNob3J0R0kgICAgICAgICAgICAgIAkJMHg4MAorI2RlZmluZSBiVHhIVE51bWJlckhUX0xURiAgICAgICAgIAkJMHgzMDAKKyNkZWZpbmUgYlR4SFRDUkM4ICAgICAgICAgICAgICAgICAJCQkweDNmYzAwCisjZGV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weDIKKworLy9wYWdlLTgKKyNkZWZpbmUgYlJGTU9EICAgICAgICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUgYkphcGFuTW9kZSAgICAgICAgICAgICAgICAJCTB4MgorI2RlZmluZSBiQ0NLVHhTQyAgICAgICAgICAgICAgICAgIAkJCTB4MzAKKyNkZWZpbmUgYkNDS0VuICAgICAgICAgICAgICAgICAgICAJCQkweDEwMDAwMDAKKyNkZWZpbmUgYk9GRE1FbiAgICAgICAgICAgICAgICAgICAJCQkweDIwMDAwMDAKKyNkZWZpbmUgYk9GRE1SeEFEQ1BoYXNlICAgICAgICAgICAJCTB4MTAwMDAKKyNkZWZpbmUgYk9GRE1UeERBQ1BoYXNlICAgICAgICAgICAJCTB4NDAwMDAKKyNkZWZpbmUgYlhBVHhBR0MgICAgICAgICAgICAgICAgICAJCQkweDNmCisjZGVmaW5lIGJYQlR4QUdDICAgICAgICAgICAgICAgICAgCQkJMHhmMDAKKyNkZWZpbmUgYlhDVHhBR0MgICAgICAgICAgICAgICAgICAJCQkweGYwMDAKKyNkZWZpbmUgYlhEVHhBR0MgICAgICAgICAgICAgICAgICAJCQkweGYwMDAwCisjZGVmaW5lIGJQQVN0YXJ0ICAgICAgICAgICAgICAgICAgCQkJMHhmMDAwMDAwMAorI2RlZmluZSBiVFJTdGFydCAgICAgICAgICAgICAgICAgIAkJCTB4MDBmMDAwMDAKKyNkZWZpbmUgYlJGU3RhcnQgICAgICAgICAgICAgICAgICAJCQkweDAwMDBmMDAwCisjZGVmaW5lIGJCQlN0YXJ0ICAgICAgICAgICAgICAgICAgCQkJMHgwMDAwMDBmMAorI2RlZmluZSBiQkJDQ0tTdGFydCAgICAgICAgICAgICAgIAkJMHgwMDAwMDAwZgorI2RlZmluZSBiUEFFbmQgICAgICAgICAgICAgICAgICAgIAkJCTB4ZiAgICAgICAgICAvL1JlZzB4ODE0CisjZGVmaW5lIGJUUkVuZCAgICAgICAgICAgICAgICAgICAgCQkJMHgwZjAwMDAw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kweDQwMDAwMDAwCisjZGVmaW5lIGIyR1BBUEVQb2xhcml0eSAgICAgICAgICAgCQkweDgwMDAwMDAwCisjZGVmaW5lIGJSRlNXX1R4RGVmYXVsdEFudCAgICAgICAgCQkweDMKKyNkZWZpbmUgYlJGU1dfVHhPcHRpb25BbnQgICAgICAgICAJCTB4MzAKKyNkZWZpbmUgYlJGU1dfUnhEZWZhdWx0QW50ICAgICAgICAJCTB4MzAwCisjZGVmaW5lIGJSRlNXX1J4T3B0aW9uQW50ICAgICAgICAgCQkweDMwMDAKKyNkZWZpbmUgYlJGU0lfM1dpcmVEYXRhICAgICAgICAgICAJCTB4MQorI2RlZmluZSBiUkZTSV8zV2lyZUNsb2NrICAgICAgICAgIAkJMHgyCisjZGVmaW5lIGJSRlNJXzNXaXJlTG9hZCAgICAgICAgICAgCQkweDQKKyNkZWZpbmUgYlJGU0lfM1dpcmVSVyAgICAgICAgICAgICAJCTB4OAorI2RlZmluZSBiUkZTSV8zV2lyZSAgICAgICAgICAgICAgIAkJCTB4ZiAgLy8zLXdpcmUgdG90YWwgY29udHJvbAorI2RlZmluZSBiUkZTSV9SRkVOViAgICAgICAgICAgICAgIAkJMHgxMAorI2RlZmluZSBiUkZTSV9UUlNXICAgICAgICAgICAgICAgIAkJMHgyMAorI2RlZmluZSBiUkZTSV9UUlNXQiAgICAgICAgICAgICAgIAkJMHg0MAorI2RlZmluZSBiUkZTSV9BTlRTVyAgICAgICAgICAgICAgIAkJMHgxMDAKKyNkZWZpbmUgYlJGU0lfQU5UU1dCICAgICAgICAgICAgICAJCTB4MjAwCisjZGVmaW5lIGJSRlNJX1BBUEUgICAgICAgICAgICAgICAgCQkJMHg0MDAKKyNkZWZpbmUgYlJGU0lfUEFQRTVHICAgICAgICAgICAgICAJCTB4ODAwCisjZGVmaW5lIGJCYW5kU2VsZWN0ICAgICAgICAgICAgICAgCQkJMHgxCisjZGVmaW5lIGJIVFNJRzJfR0kgICAgICAgICAgICAgICAgCQkJMHg4MAorI2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isjZGVmaW5lIGJFeHRTaWdDbGtFbmFibGUgICAgICAgICAJIAkweDgwMAorI2RlZmluZSBiQmFuZGdhcE1iaWFzUG93ZXJVcCAgICAgIAkweDEwMDAwCisjZGVmaW5lIGJBRDExU0hHYWluICAgICAgICAgICAgICAgCQkweGMwMDAwCisjZGVmaW5lIGJBRDExSW5wdXRSYW5nZSAgICAgICAgICAgCQkweDcwMDAwMAorI2RlZmluZSBiQUQxMU9QQ3VycmVudCAgICAgICAgICAgIAkJMHgzODAwMDAwCisjZGVmaW5lIGJJUGF0aExvb3BiYWNrICAgICAgICAgICAgCQkweDQwMDAwMDAKKyNkZWZpbmUgYlFQYXRoTG9vcGJhY2sgICAgICAgICAgICAJCTB4ODAwMDAwMAorI2RlZmluZSBiQUZFTG9vcGJhY2sgICAgICAgICAgICAgIAkJMHgxMDAwMDAwMAorI2RlZmluZSBiREExMFN3aW5nICAgICAgICAgICAgICAgIAkJMHg3ZTAKKyNkZWZpbmUgYkRBMTBSZXZlcnNlICAgICAgICAgICAgICAJCTB4ODAwCisjZGVmaW5lIGJEQUNsa1NvdXJjZSAgICAgICAgICAgICAgCQkweDEwMDAKKyNkZWZpbmUgYkFEN0lucHV0UmFuZ2UgICAgICAgICAgICAJCTB4NjAwMAorI2RlZmluZSBiQUQ3R2FpbiAgICAgICAgICAgICAgICAgIAkJCTB4MzgwMDAKKyNkZWZpbmUgYkFEN091dHB1dENNTW9kZSAgICAgICAgICAJCTB4NDAwMDAKKyNkZWZpbmUgYkFEN0lucHV0Q01Nb2RlICAgICAgICAgICAJCTB4MzgwMDAwCisjZGVmaW5lIGJBRDdDdXJyZW50ICAgICAgICAgICAgICAgCQkJMHhjMDAwMDAKKyNkZWZpbmUgYlJlZ3VsYXRvckFkanVzdCAgICAgICAgICAJCTB4NzAwMDAwMAorI2RlZmluZSBiQUQxMVBvd2VyVXBBdFR4ICAgICAgICAgIAkJMHgxCisjZGVmaW5lIGJEQTEwUFNBdFR4ICAgICAgICAgICAgICAgCQkweDEwCisjZGVmaW5lIGJBRDExUG93ZXJVcEF0UnggICAgICAgICAgCQkweDEwMAorI2RlZmluZSBiREExMFBTQXRSeCAgICAgICAgICAgICAgIAkJMHgxMDAwCisKKyNkZWZpbmUgYkNDS1J4QUdDRm9ybWF0ICAgICAgICAgICAJCTB4MjAwCisKKyNkZWZpbmUgYlBTREZGVFNhbXBsZXBQb2ludCAgICAgICAJCTB4YzAwMAorI2RlZmluZSBiUFNEQXZlcmFnZU51bSAgICAgICAgICAgIAkJMHgzMDAwCisjZGVmaW5lIGJJUVBhdGhDb250cm9sICAgICAgICAgICAgCQkweGMwMAorI2RlZmluZSBiUFNERnJlcSAgICAgICAgICAgICAgICAgIAkJCTB4M2ZmCisjZGVmaW5lIGJQU0RBbnRlbm5hUGF0aCAgICAgICAgICAgCQkweDMwCisjZGVmaW5lIGJQU0RJUVN3aXRjaCAgICAgICAgICAgICAgCQkweDQwCisjZGVmaW5lIGJQU0RSeFRyaWdnZXIgICAgICAgICAgICAgCQkweDQwMDAwMAorI2RlZmluZSBiUFNEVHhUcmlnZ2VyICAgICAgICAgICAgIAkJMHg4MDAwMDAwMAorI2RlZmluZSBiUFNEU2luZVRvbmVTY2FsZSAgICAgICAgCQkweDdmMDAwMDAwCisjZGVmaW5lIGJQU0RSZXBvcnQgICAgICAgICAgICAgICAgCQkJMHhmZmZmCisKKy8vcGFnZS05CisjZGVmaW5lIGJPRkRNVHhTQyAgICAgICAgICAgICAgICAgCQkweDMwMDAwMDAwCisjZGVmaW5lIGJDQ0tUeE9uICAgICAgICAgICAgICAgICAgCQkJMHgxCisjZGVmaW5lIGJPRkRNVHhPbiAgICAgICAgICAgICAgICAgCQkweDIKKyNkZWZpbmUgYkRlYnVnUGFnZSAgICAgICAgICAgICAgICAJCTB4ZmZmICAvL3Jlc2V0IGRlYnVnIHBhZ2UgYW5kIGFsc28gSFdvcmQsIExXb3JkCisjZGVmaW5lIGJEZWJ1Z0l0ZW0gICAgICAgICAgICAgICAgCQ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gICAgICAgICAgICAgIAkJCTB4NAorI2RlZmluZSBiUnhQYXRoRCAgICAgICAgICAgICAgICAgCQkJMHg4CisjZGVmaW5lIGJUeFBhdGhBICAgICAgICAgICAgICAgICAJCQkweDEKKyNkZWZpbmUgYlR4UGF0aEIgICAgICAgICAgICAgICAgIAkJCTB4MgorI2RlZmluZSBiVHhQYXRoQyAgICAgICAgICAgICAgICAgCQkJMHg0CisjZGVmaW5lIGJUeFBhdGhEICAgICAgICAgICAgICAgICAJCQkweDgKKyNkZWZpbmUgYlRSU1NJRnJlcSAgICAgICAgICAgICAgIAkJCTB4MjAwCisjZGVmaW5lIGJBRENCYWNrb2ZmICAgICAgICAgICAgICAJCQkweDMwMDAKKyNkZWZpbmUgYkRGSVJCYWNrb2ZmICAgICAgICAgICAgIAkJCTB4YzAwMAorI2RlZmluZSBiVFJTU0lMYXRjaFBoYXNlICAgICAgICAgCQkweDEwMDAwCisjZGVmaW5lIGJSeElEQ09mZnNldCAgICAgICAgICAgICAJCQkweGZmCisjZGVmaW5lIGJSeFFEQ09mZnNldCAgICAgICAgICAgICAJCQkweGZmMDAKKyNkZWZpbmUgYlJ4REZJUk1vZGUgICAgICAgICAgICAgIAkJMHgxODAwMDAwCisjZGVmaW5lIGJSeERDTkZUeXBlICAgICAgICAgICAgICAJCTB4ZTAwMDAwMAorI2RlZmluZSBiUlhJUUltYl9BICAgICAgICAgICAgICAgCQkJMHgzZmYKKyNkZWZpbmUgYlJYSVFJbWJfQiAgICAgICAgICAgICAgIAkJCTB4ZmMwMAorI2RlZmluZSBiUlhJUUltYl9DICAgICAgICAgICAgICAgCQkJMHgzZjAwMDAKKyNkZWZpbmUgYlJYSVFJbWJfRCAgICAgICAgICAgICAgIAkJCTB4ZmZjMDAwMDAKKyNkZWZpbmUgYkRDX2RjX05vdGNoICAgICAgICAgICAgIAkJMHg2MDAwMAorI2RlZmluZSBiUnhOQklOb3RjaCAgICAgICAgICAgICAgCQkJMHgxZjAwMDAwMAorI2RlZmluZSBiUERfVEggICAgICAgICAgICAgICAgICAgCQkJMHhmCisjZGVmaW5lIGJQRF9USF9PcHQyICAgICAgICAgICAgICAJCTB4YzAwMAorI2RlZmluZSBiUFdFRF9USCAgICAgICAgICAgICAgICAgCQkJMHg3MDAKKyNkZWZpbmUgYklmTUZfV2luX0wgICAgICAgICAgICAgIAkJCTB4ODAwCisjZGVmaW5lIGJQRF9PcHRpb24gICAgICAgICAgICAgICAJCQkweDEwMDAKKyNkZWZpbmUgYk1GX1dpbl9MICAgICAgICAgICAgICAgIAkJCTB4ZTAwMAorI2RlZmluZSBiQldfU2VhcmNoX0wgICAgICAgICAgICAgCQkweDMwMDAwCisjZGVmaW5lIGJ3aW5fZW5oX0wgICAgICAgICAgICAgICAJCQkweGMwMDAwCisjZGVmaW5lIGJCV19USCAgICAgICAgICAgICAgICAgICAJCQkweDcwMDAwMAorI2RlZmluZSBiRURfVEgyICAgICAgICAgICAgICAgICAgCQkJMHgzODAwMDAwCisjZGVmaW5lIGJCV19vcHRpb24gICAgICAgICAgICAgICAJCQkweDQwMDAwMDAKKyNkZWZpbmUgYlJhdGlvX1RIICAgICAgICAgICAgICAgIAkJCTB4MTgwMDAwMDAKKyNkZWZpbmUgYldpbmRvd19MICAgICAgICAgICAgICAgIAkJCTB4ZTAwMDAwMDAKKyNkZWZpbmUgYlNCRF9PcHRpb24gICAgICAgICAgICAgIAkJCTB4MQorI2RlZmluZSBiRnJhbWVfVEggICAgICAgICAgICAgICAgCQkJMHgxYworI2RlZmluZSBiRlNfT3B0aW9uICAgICAgICAgICAgICAgCQkJMHg2MAorI2RlZmluZSBiRENfU2xvcGVfY2hlY2sgICAgICAgICAgCQkweDgwCisjZGVmaW5lIGJGR3VhcmRfQ291bnRlcl9EQ19MICAgICAJCTB4ZTAwCisjZGVmaW5lIGJGcmFtZV9XZWlnaHRfU2hvcnQgICAgICAJCTB4NzAwMAorI2RlZmluZSBiU3ViX1R1bmUgICAgICAgICAgICAgICAgCQkJMHhlMDAwMDAKKyNkZWZpbmUgYkZyYW1lX0RDX0xlbmd0aCAgICAgICAgIAkJMHhlMDAwMDAwCisjZGVmaW5lIGJTQkRfc3RhcnRfb2Zmc2V0ICAgICAgICAJCTB4MzAwMDAwMDAKKyNkZWZpbmUgYkZyYW1lX1RIXzIgICAgICAgICAgICAgIAkJMHg3CisjZGVmaW5lIGJGcmFtZV9HSTJfVEggICAgICAgICAgICAJCTB4MzgKKyNkZWZpbmUgYkdJMl9TeW5jX2VuICAgICAgICAgICAgIAkJMHg0MAorI2RlZmluZSBiU2FyY2hfU2hvcnRfRWFybHkgICAgICAgCQkweDMwMAorI2RlZmluZSBiU2FyY2hfU2hvcnRfTGF0ZSAgICAgICAgCQkweGMwMAorI2RlZmluZSBiU2FyY2hfR0kyX0xhdGUgICAgICAgICAgCQkweDcwMDAwCisjZGVmaW5lIGJDRk9BbnRTdW0gICAgICAgICAgICAgICAJCTB4MQorI2RlZmluZSBiQ0ZPQWNjICAgICAgICAgICAgICAgICAgCQkJMHgyCisjZGVmaW5lIGJDRk9TdGFydE9mZnNldCAgICAgICAgICAJCTB4YworI2RlZmluZSBiQ0ZPTG9va0JhY2sgICAgICAgICAgICAgCQkweDcwCisjZGVmaW5lIGJDRk9TdW1XZWlnaHQgICAgICAgICAgICAJCTB4ODAKKyNkZWZpbmUgYkRBR0NFbmFibGUgICAgICAgICAgICAgIAkJCTB4MTAwMDAKKyNkZWZpbmUgYlRYSVFJbWJfQSAgICAgICAgICAgICAgIAkJCTB4M2ZmCisjZGVmaW5lIGJUWElRSW1iX0IgICAgICAgICAgICAgICAJCQkweGZjMDAKKyNkZWZpbmUgYlRYSVFJbWJfQyAgICAgICAgICAgICAgIAkJCTB4M2YwMDAwCisjZGVmaW5lIGJUWElRSW1iX0QgICAgICAgICAgICAgICAJCQkweGZmYzAwMDAwCisjZGVmaW5lIGJUeElEQ09mZnNldCAgICAgICAgICAgICAJCQkweGZmCisjZGVmaW5lIGJUeFFEQ09mZnNldCAgICAgICAg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AwMDAwMAorI2RlZmluZSBiUnhGcmVlemVTdGVwX0FHQzAgICAgICAgMHhjMDAwMDAwCisjZGVmaW5lIGJSeFJzc2lfQ21wX0VuICAgICAgICAgICAweDEwMDAwMDAwCisjZGVmaW5lIGJSeFF1aWNrQUdDRW4gICAgICAgICAgICAweDIwMDAwMDAwCisjZGVmaW5lIGJSeEFHQ0ZyZWV6ZVRocmVzTW9kZSAgICAweDQwMDAwMDAwCisjZGVmaW5lIGJSeE92ZXJGbG93Q2hlY2tUeXBlICAgICAweDgwMDAwMDAwCisjZGVmaW5lIGJSeEFHQ1NoaWZ0ICAgICAgICAgICAgICAweDdmCisjZGVmaW5lIGJUUlNXX1RyaV9Pbmx5ICAgICAgICAgICAweDgwCisjZGVmaW5lIGJQb3dlclRocmVzICAgICAgICAgICAgICAweDMwMAorI2RlZmluZSBiUnhBR0NFbiAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIGJSeEFHQ1RvZ2V0aGVyRW4gICAgICAgICAweDIKKyNkZWZpbmUgYlJ4QUdDTWluICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSBiUnhIUF9JbmkgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIGJSeEhQX1RSTE5BICAgICAgICAgICAgICAweDcwCisjZGVmaW5lIGJSeEhQX1JTU0kgICAgICAgICAgICAgICAweDcwMAorI2RlZmluZSBiUnhIUF9CQlAxICAgICAgICAgICAgICAgMHg3MDAwCisjZGVmaW5lIGJSeEhQX0JCUDIgICAgICAgICAgICAgICAweDcwMDAwCisjZGVmaW5lIGJSeEhQX0JCUDMgICAgICAgICAgICAgICAweDcwMDAwMAorI2RlZmluZSBiUlNTSV9IICAgICAgICAgICAgICAgICAgMHg3ZjAwMDAgICAgIC8vdGhlIHRocmVzaG9sZCBmb3IgaGlnaCBwb3dlcgorI2RlZmluZSBiUlNTSV9HZW4gICAgICAgICAgICAgICAgMHg3ZjAwMDAwMCAgIC8vdGhlIHRocmVzaG9sZCBmb3IgYW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weDMwMDAwMDAwCisjZGVmaW5lIGJSeFNHSV9USCAgICAgICAgICAgICAgICAweGMwMDAwMDAwCisjZGVmaW5lIGJERlNDbnQwICAgICAgICAgICAgICAgICAweGZmCisjZGVmaW5lIGJERlNDbnQxICAgICAgICAgICAgICAgICAweGZmMDAKKyNkZWZpbmUgYkRGU0ZsYWcgICAgICAgICAgICAgICAgIDB4ZjAwMDAKKworI2RlZmluZSBiTUZXZWlnaHRTdW0gICAgICAgICAgICAgMHgzMDAwMDAKKyNkZWZpbmUgYk1pbklkeFRIICAgICAgICAgICAgICAgIDB4N2YwMDAwMDAKKworI2RlZmluZSBiREFGb3JtYXQgICAgICAgICAgICAgICAgMHg0MDAwMAorCisjZGVmaW5lIGJUeENoRW11RW5hYmxlICAgICAgICAgICAweDAxMDAwMDAwCisKKyNkZWZpbmUgYlRSU1dJc29sYXRpb25fQSAgICAgICAgIDB4N2YKKyNkZWZpbmUgYlRSU1dJc29sYXRpb25fQiAgICAgICAgIDB4N2YwMAorI2RlZmluZSBiVFJTV0lzb2xhdGlvbl9DICAgICAgICAgMHg3ZjAwMDAKKyNkZWZpbmUgYlRSU1dJc29sYXRpb25fRCAgICAgICAgIDB4N2YwMDAwMDAKKworI2RlZmluZSBiRXh0TE5BR2FpbiAgICAgICAgICAgICAgMHg3YzAwCisKKy8vcGFnZSBkCisjZGVmaW5lIGJTVEJDRW4gICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgYkFudGVubmFNYXBwaW5nICAgICAgICAgIDB4MTAKKyNkZWZpbmUgYk5zcyAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgYkNGT0FudFN1bUQgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lIGJQSFlDb3VudGVyUmVzZXQgICAgICAgICAweDgwMDAwMDAKKyNkZWZpbmUgYkNGT1JlcG9ydEdldCAgICAgICAgICAgIDB4NDAwMDAwMAorI2RlZmluZSBiT0ZETUNvbnRpbnVlVHggICAgICAgICAgM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AweGZmZgorI2RlZmluZSBiU2hvcnRDRk9UTGVuZ3RoICAgICAgICAgMTIgICAvL3RvdGFsCisjZGVmaW5lIGJTaG9ydENGT0ZMZW5ndGggICAgICAgICAxMSAgIC8vZnJhY3Rpb24KKyNkZWZpbmUgYkxvbmdDRk8gICAgICAgICAgICAgICAgIDB4N2ZmCisjZGVmaW5lIGJMb25nQ0ZPVExlbmd0aCAgICAgICAgICAxMQorI2RlZmluZSBiTG9uZ0NGT0ZMZW5ndGggICAgICAgICAgMTEKKyNkZWZpbmUgYlRhaWxDRk8gICAgICAgICAgICAgICAgIDB4MWZmZgorI2RlZmluZSBiVGFpbENGT1RMZW5ndGggICAgICAgICAgMTMKKyNkZWZpbmUgYlRhaWxDRk9GTGVuZ3RoICAgICAgICAgIDEyCisKKyNkZWZpbmUgYm1heF9lbl9wd2RCICAgICAgICAgICAgIDB4ZmZmZgorI2RlZmluZSBiQ0NfcG93ZXJfZEIgICAgICAgICAgICAgMHhmZmZmMDAwMAorI2RlZmluZSBibm9pc2VfcHdkQiAgICAgICAgICAgICAgMHhmZmZmCisjZGVmaW5lIGJQb3dlck1lYXNUTGVuZ3RoICAgICAgICAxMAorI2RlZmluZSBiUG93ZXJNZWFzRkxlbmd0aCAgICAgICAgMworI2RlZmluZSBiUnhfSFRfQlcgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIGJSeFNDICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgYlJ4X0hUICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lIGJOQl9pbnRmX2RldF9vbiAgICAgICAgICAweDEKKyNkZWZpbmUgYkludGZfd2luX2xlbl9jZmcgICAgICAgIDB4MzAKKyNkZWZpbmUgYk5CX0ludGZfVEhfY2ZnICAgICAgICAgIDB4MWMwCisKKyNkZWZpbmUgYlJGR2FpbiAgICAgICAgICAgICAgICAgIDB4M2YKKyNkZWZpbmUgYlRhYmxlU2VsICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgYlRSU1cgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSBiUnhTTlJfQSAgICAgICAgICAgICAgICAgMHhmZgorI2RlZmluZSBiUnhTTlJfQiAgICAgICAgICAgICAgICAgMHhmZjAwCisjZGVmaW5lIGJSeFNOUl9DICAgICAgICAgICAgICAgICAweGZmMDAwMAorI2RlZmluZSBiUnhTTlJfRCAgICAgICAgICAgICAgICAgMHhmZjAwMDAwMAorI2RlZmluZSBiU05SRVZNVExlbmd0aCAgICAgICAgICAgOAorI2RlZmluZSBiU05SRVZNRkxlbmd0aCAgICAgICAgICAgMQorCisjZGVmaW5lIGJDU0kxc3QgICAgICAgICAgICAgICAgICAweGZmCisjZGVmaW5lIGJDU0kybmQgICAgICAgICAgICAgICAgICAweGZmMDAKKyNkZWZpbmUgYlJ4RVZNMXN0ICAgICAgICAgICAgICAgIDB4ZmYwMDAwCisjZGVmaW5lIGJSeEVWTTJuZCAgICAgICAgICAgICAgICAweGZmMDAwMDAwCisKKyNkZWZpbmUgYlNJR0VWTSAgICAgICAgICAgICAgICAgIDB4ZmYKKyNkZWZpbmUgYlBXREIgICAgICAgICAgICAgICAgICAgIDB4ZmYwMAorI2RlZmluZSBiU0dJRU4gICAgICAgICAgICAgICAgICAgMHgxMDAwMAorCisjZGVmaW5lIGJTRmFjdG9yUUFNMSAgICAgICAgICAgICAweGYKKyNkZWZpbmUgYlNGYWN0b3JRQU0yICAgICAgICAgICAgIDB4ZjAKKyNkZWZpbmUgYlNGYWN0b3JRQU0zICAgICAgICAgICAgIDB4ZjAwCisjZGVmaW5lIGJTRmFjdG9yUUFNNCAgICAgICAgICAgICAweGYwMDAKKyNkZWZpbmUgYlNGYWN0b3JRQU01ICAgICAgICAgICAgIDB4ZjAwMDAKKyNkZWZpbmUgYlNGYWN0b3JRQU02ICAgICAgICAgICAgIDB4ZjAwMDAKKyNkZWZpbmUgYlNGYWN0b3JRQU03ICAgICAgICAgICAgIDB4ZjAwMDAwCisjZGVmaW5lIGJTRmFjdG9yUUFNOCAgICAgICAgICAgICAweGYwMDAwMDAKKyNkZWZpbmUgYlNGYWN0b3JRQU05ICAgICAgICAgICAgIDB4ZjAwMDAwMDAKKyNkZWZpbmUgYkNTSVNjaGVtZSAgICAgICAgICAgICAgIDB4MTAwMDAwCisKKyNkZWZpbmUgYk5vaXNlTHZsVG9wU2V0ICAgICAgICAgIDB4MworI2RlZmluZSBiQ2hTbW9vdGggICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIGJDaFNtb290aENmZzEgICAgICAgICAgICAweDM4CisjZGVmaW5lIGJDaFNtb290aENmZzIgICAgICAgICAgICAweDFjMAorI2RlZmluZSBiQ2hTbW9vdGhDZmczICAgICAgICAgICAgMHhlMDAKKyNkZWZpbmUgYkNoU21vb3RoQ2ZnNCAgICAgICAgICAgIDB4NzAwMAorI2RlZmluZSBiTVJDTW9kZSAgICAgICAgICAgICAgICAgMHg4MDAwMDAKKyNkZWZpbmUgYlRIRVZNQ2ZnICAgICAgICAgICAgICAgIDB4NzAwMDAwMAorCisjZGVmaW5lIGJMb29wRml0VHlwZSAgICAgICAgICAgICAweDEKKyNkZWZpbmUgYlVwZENGTyAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgYlVwZENGT09mZkRhdGEgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgYkFkdlVwZENGTyAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lIGJBZHZUaW1lQ3RybCAgICAgICAgICAgICAweDgwMAorI2RlZmluZSBiVXBkQ2xrbyAgICAgICAgICAgICAgICAgMHgxMDAwCisjZGVmaW5lIGJGQyAgICAgICAgICAgICAgICAgICAgICAweDYwMDAKKyNkZWZpbmUgYlRyYWNraW5nTW9kZSAgICAgICAgICAgIDB4ODAwMAorI2RlZmluZSBiUGhDbXBFbmFibGUgICAgICAgICAgICAgMHgxMDAwMAorI2RlZmluZSBiVXBkQ2xrb0xURiAgICAgICAgICAgICAgMHgyMDAwMA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5kYWJsZSBmb3Igc2Jfd3JpdGUKKyNkZWZpbmUgYkJ5dGUwICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgYkJ5dGUxICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgYkJ5dGUyICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgYkJ5dGUzICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgYldvcmQwICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgYldvcmQxICAgICAgICAgICAgICAgICAgICAweGMKKyNkZWZpbmUgYkRXb3JkICAgICAgICAgICAgICAgICAgICAweGYKKworLy9mb3IgUHV0UmVnc2V0dGluZyAmIEdldFJlZ1NldHRpbmcgQml0TWFzaworI2RlZmluZSBiTWFza0J5dGUwICAgICAgICAgICAgICAgIDB4ZmYKKyNkZWZpbmUgYk1hc2tCeXRlMSAgICAgICAgICAgICAgICAweGZmMDAKKyNkZWZpbmUgYk1hc2tCeXRlMiAgICAgICAgICAgICAgICAweGZmMDAwMAorI2RlZmluZSBiTWFza0J5dGUzICAgICAgICAgICAgICAgIDB4ZmYwMDAwMDAKKyNkZWZpbmUgYk1hc2tIV29yZCAgICAgICAgICAgICAgICAweGZmZmYwMDAwCisjZGVmaW5lIGJNYXNrTFdvcmQgICAgICAgICAgICAgICAgMHgwMDAwZmZmZgorI2RlZmluZSBiTWFza0RXb3JkICAgICAgICAgICAgICAgIDB4ZmZmZmZmZmYKKworLy9mb3IgUHV0UkZSZWdzZXR0aW5nICYgR2V0UkZSZWdTZXR0aW5nIEJpdE1hc2sKKyNkZWZpbmUgYk1hc2sxMkJpdHMgICAgICAgICAgICAgICAweGZmZgorCisjZGVmaW5lIGJFbmFibGUgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIGJEaXNhYmxlICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgTGVmdEFudGVubmEgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU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RhdGFbaV0KLSNkZWZpbmUgTkVYVENIQVIgICAgICAgICAgICAgICAgICAgIGRhdGFbaSArIDFdCi0jZGVmaW5lIFRISVJEQ0hBUiAgICAgICAgICAgICAgICAgIGRhdGFbaSArIDJdCi0jZGVmaW5lIEZPVVJUSENIQVIgICAgICAgICAgICAgICAgICBkYXRhW2kgKyAzXQotCi0vKgotICogVXNlZnVsIGRlZmludGlvbnMgZm9yIHBvcnQgQSwgUG9ydCBCIGFuZCBQb3J0IEMKLSAqLwotI2RlZmluZSBGVUxMUFdSQklUICAgICAgICAgIDB4MDAwMDAwODAKLSNkZWZpbmUgTkVYVF9CT0FSRF9QT1dFUl9CSVQgICAgICAgIDB4MDAwMDAwMDQKLQotI2RlZmluZSBTRVJJQUxfTFNSX09FICAgICAgIDB4MDIKLSNkZWZpbmUgU0VSSUFMX0xTUl9QRSAgICAgICAweDA0Ci0jZGVmaW5lIFNFUklBTF9MU1JfRkUgICAgICAgMHgwOAotI2RlZmluZSBTRVJJQUxfTFNSX0JJICAgICAgIDB4MTAKLQotI2RlZmluZSBTRVJJQUxfTFNSX1RFTVQgICAgIDB4NDAKLQotI2RlZmluZSAgRElWX0xBVENIX0xTICAgICAgICAgICAgICAgMHgwMAotI2RlZmluZSAgWE1UX0hPTERfUkVHSVNURVIgICAgICAgICAgMHgwMAotI2RlZmluZSAgWFZSX0JVRkZFUl9SRUdJU1RFUiAgICAgICAgMHgwMAotI2RlZmluZSAgRElWX0xBVENIX01TICAgICAgICAgICAgICAgMHgwMQotI2RlZmluZSAgRklGT19DT05UUk9MX1JFR0lTVEVSICAgICAgMHgwMgotI2RlZmluZSAgTElORV9DT05UUk9MX1JFR0lTVEVSICAgICAgMHgwMwotI2RlZmluZSAgTU9ERU1fQ09OVFJPTF9SRUdJU1RFUiAgICAgMHgwNAotI2RlZmluZSAgTElORV9TVEFUVVNfUkVHSVNURVIgICAgICAgMHgwNQotI2RlZmluZSAgTU9ERU1fU1RBVFVTX1JFR0lTVEVSICAgICAgMHgwNgotCi0jZGVmaW5lICBTRVJJQUxfTUNSX0RUUiAgICAgICAgICAgICAweDAxCi0jZGVmaW5lICBTRVJJQUxfTUNSX1JUUyAgICAgICAgICAgICAweDAyCi0jZGVmaW5lICBTRVJJQUxfTUNSX0xPT1AgICAgICAgICAgICAweDEwCi0KLSNkZWZpbmUgIFNFUklBTF9NU1JfQ1RTICAgICAgICAgICAgIDB4MTAKLSNkZWZpbmUgIFNFUklBTF9NU1JfQ0QgICAgICAgICAgICAgIDB4ODAKLSNkZWZpbmUgIFNFUklBTF9NU1JfUkkgICAgICAgICAgICAgIDB4NDAKLSNkZWZpbmUgIFNFUklBTF9NU1JfRFNSICAgICAgICAgICAgIDB4MjAKLSNkZWZpbmUgIFNFUklBTF9NU1JfTUFTSyAgICAgICAgICAgIDB4ZjAKLQotI2RlZmluZSAgU0VSSUFMXzhfREFUQSAgICAgICAgICAgICAgMHgwMwotI2RlZmluZSAgU0VSSUFMXzdfREFUQSAgICAgICAgICAgICAgMHgwMgotI2RlZmluZSAgU0VSSUFMXzZfREFUQSAgICAgICAgICAgICAgMHgwMQotI2RlZmluZSAgU0VSSUFMXzVfREFUQSAgICAgICAgICAgICAgMHgwMAotCi0jZGVmaW5lICBTRVJJQUxfT0REX1BBUklUWSAgICAgICAgICAwWDA4Ci0jZGVmaW5lICBTRVJJQUxfRVZFTl9QQVJJVFkgICAgICAgICAwWDE4Ci0jZGVmaW5lICBTRVJJQUxfVFdPX1NUT1BCICAgICAgICAgICAweDA0Ci0jZGVmaW5lICBTRVJJQUxfT05FX1NUT1BCICAgICAgICAgICAweDAwCi0KLSNkZWZpbmUgIE1BWF9CQVVEX1JBVEUgICAgICAgICAgICAgIDQ2MDgwMAotI2RlZmluZSAgTUFYX0JBVURfUkVNQUlOREVSICAgICAgICAgNDYwOAotCi0jZGVmaW5lIFFUX1NFVF9HRVRfREVWSUNFICAgICAgICAgICAweGMyCi0jZGVmaW5lIFFUX09QRU5fQ0xPU0VfQ0hBTk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OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogIEJveFNldEFUQwotICAgVEVMTFMgQk9YIFdIRU4gVE8gQVNTRVJUIGF1dG9tYXRpYyB0cmFuc21pdHRlciBjb250cm9sCi0gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGludCBCb3hTZXRBVEMoc3RydWN0IHVzYl9zZXJpYWwgKnNlcmlhbCwgX191MTYgbl9Nb2RlKQotewotCWludCByZXN1bHQ7Ci0JX191MTYgYnVmZmVyX2xlbmd0aDsKLQotCWJ1ZmZlcl9sZW5ndGggPSBQUkVGVUZGX0xFVkVMX0NPTlNFUlZBVElWRTsKLQotCXJlc3VsdCA9Ci0JICAgIHVzYl9jb250cm9sX21zZyhzZXJpYWwtPmRldiwgdXNiX3NuZGN0cmxwaXBlKHNlcmlhbC0+ZGV2LCAwKSwKLQkJCSAgICBRVF9TRVRfQVRGLCAweDQwLCBuX01vZGUsIDAsIE5VTEwsIDAsIDMwMCk7Ci0KLQlyZXR1cm4gcmVzdWx0OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBCb3hTZXRVYXJ0Ci0qCWlzc3VzZSBhIFNFVF9VQVJUIHZlbmRvci1zcGNpZmljIHJlcXVlc3Qgb24gdGhlIGRlZmF1bHQgY29udHJvbCBwaXBlCi0qCUlmIHN1Y2Nlc3NmdWwgc2V0cyBiYXVkIHJhdGUgZGl2aXNvciBhbmQgTENSIHZhbHVlCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGludCBCb3hTZXRVYXJ0KHN0c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0NPTlRST0xfTUFTSyAgICAgMHhjNgorI2RlZmluZSBRVF9TV19GTE9XX0NPTlRST0xfRElTQUJMRSAgMHhjNworI2RlZmluZSBRVF9CUkVBS19DT05UUk9MICAgICAgICAgICAgMHhjOAorCisjZGVmaW5lIFVTQkRfVFJBTlNGRVJfRElSRUNUSU9OX0lOICAgIDB4YzAKKyNkZWZpbmUgVVNCRF9UUkFOU0ZFUl9ESVJFQ1RJT05fT1VUICAgMHg0MAorCisjZGVmaW5lICBNQVhfQkFVRF9SQVRFICAgICAgICAgICAgICA0NjA4MDAKKyNkZWZpbmUgIE1BWF9CQVVEX1JFTUFJTkRFUiAgICAgICAgIDQ2MDgKKworI2RlZmluZSAgRElWX0xBVENIX0xTICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSAgWE1UX0hPTERfUkVHSVNURVIgICAgICAgICAgMHgwMAorI2RlZmluZSAgWFZSX0JVRkZFUl9SRUdJU1RFUiAgICAgICAgMHgwMAorI2RlZmluZSAgRElWX0xBVENIX01TICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSAgRklGT19DT05UUk9MX1JFR0lTVEVSICAgICAgMHgwMgorI2RlZmluZSAgTElORV9DT05UUk9MX1JFR0lTVEVSICAgICAgMHgwMworI2RlZmluZSAgTU9ERU1fQ09OVFJPTF9SRUdJU1RFUiAgICAgMHgwNAorI2RlZmluZSAgTElORV9TVEFUVVNfUkVHSVNURVIgICAgICAgMHgwNQorI2RlZmluZSAgTU9ERU1fU1RBVFVTX1JFR0lTVEVSICAgICAgMHgwNgorCisjZGVmaW5lICBTRVJJQUxfTUNSX0RUUiAgICAgICAgICAgICAweDAxCisjZGVmaW5lICBTRVJJQUxfTUNSX1JUUyAgICAgICAgICAgICAweDAyCisjZGVmaW5lICBTRVJJQUxfTUNSX0xPT1AgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgIFNFUklBTF9NU1JfQ1RTICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgIFNFUklBTF9NU1JfQ0QgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgIFNFUklBTF9NU1JfUkkgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgIFNFUklBTF9NU1JfRFNSICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgIFNFUklBTF9NU1JfTUFTSyAgICAgICAgICAgIDB4ZjAKKworI2RlZmluZSAgU0VSSUFMXzhfREFUQSAgICAgICAgICAgICAgMHgwMworI2RlZmluZSAgU0VSSUFMXzdfREFUQSAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSAgU0VSSUFMXzZfREFUQSAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSAgU0VSSUFMXzVfREFUQSAgICAgICAgICAgICAgMHgwMAorCisjZGVmaW5lICBTRVJJQUxfT0REX1BBUklUWSAgICAgICAgICAwWDA4CisjZGVmaW5lICBTRVJJQUxfRVZFTl9QQVJJVFkgICAgICAgICAwWDE4CisjZGVmaW5lICBTRVJJQUxfVFdPX1NUT1BCICAgICAgICAgICAweDA0CisjZGVmaW5lICBTRVJJQUxfT05FX1NUT1BCICAgICAgICAgICAweDAwCisKKyNkZWZpbmUgREVGQVVMVF9ESVZJU09SICAweDMwCS8qIGdpdmVzIDk2MDAgYmF1ZCByYXRlICovCisjZGVmaW5lIERFRkFVTFRfTENSIFNFUklBTF84X0RBVEEJLyogOCwgbm9uZSAsIDEgKi8KKworI2RlZmluZSBGVUxMUFdSQklUICAgICAgICAgIDB4MDAwMDAwODAKKyNkZWZpbmUgTkVYVF9CT0FSRF9QT1dFUl9CSVQgICAgICAgIDB4MDAwMDAwMDQKKworI2RlZmluZSBTRVJJQUxfTFNSX09FICAgICAgIDB4MDIKKyNkZWZpbmUgU0VSSUFMX0xTUl9QRSAgICAgICAweDA0CisjZGVmaW5lIFNFUklBTF9MU1JfRkUgICAgICAgMHgwOAorI2RlZmluZSBTRVJJQUxfTFNSX0JJICAgICAgIDB4MTAKKworI2RlZmluZSAgU0VSSUFMX01TUl9DVFMg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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBCb3hHZXRSZWdpc3RlcihzdHJ1Y3QgdXNiX3NlcmlhbCAqc2VyaWFsLCB1bnNpZ25lZCBzaG9ydCBVYXJ0X051bWJlciwKKwkJCSAgdW5zaWduZWQgc2hvcnQgUmVnaXN0ZXJfTnVtLCBfX3U4ICpwVmFsdWUpCit7CisJaW50IHJlc3VsdDsKKwlfX3UxNiBjdXJyZW50X2xlbmd0aDsKKworCWN1cnJlbnRfbGVuZ3RoID0gc2l6ZW9mKHN0cnVjdCBxdF9nZXRfZGV2aWNlX2RhdGEpOworCisJcmVzdWx0ID0KKwkgICAgdXNiX2NvbnRyb2xfbXNnKHNlcmlhbC0+ZGV2LCB1c2JfcmN2Y3RybHBpcGUoc2VyaWFsLT5kZXYsIDApLAorCQkJICAgIFFUX0dFVF9TRVRfUkVHSVNURVIsIDB4QzAsIFJlZ2lzdGVyX051bSwKKwkJCSAgICBVYXJ0X051bWJlciwgKHZvaWQgKilwVmFsdWUsIHNpemVvZigqcFZhbHVlKSwgMzAwKTsKKworCXJldHVybiByZXN1bHQ7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIEJveFNldFJlZ2lzdGVyCisqCWlzc3VzZSBhIEdFVF9SRUdJU1RFUiB2ZW5kb3Itc3BjaWZpYyByZXF1ZXN0IG9uIHRoZSBkZWZhdWx0IGNvbnRyb2wgcGlwZQorKglJZiBzdWNjZXNzZnVsLCBmaWxscyBpbiB0aGUgIHBWYWx1ZSB3aXRoIHRoZSByZWdpc3RlciB2YWx1ZSBhc2tlZCBmb3IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IEJveFNldFJlZ2lzdG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TAwNjQ0CmluZGV4IDAwMDAwMDAuLjMwZDllNjcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvdWRsZmIvTWFrZWZpbGUKQEAgLTAsMCArMSBAQAorb2JqLSQoQ09ORklHX0ZCX1VETCkJCSs9IHVkbGZiLm8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy91ZGxmYi91ZGxmYi5jIGIvZHJpdmVycy9zdGFnaW5nL3VkbGZiL3VkbGZiLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZjU0MTZhZgotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvc3RhZ2luZy91ZGxmYi91ZGxmYi5jCkBAIC0wLDAgKzEsOTM4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICBETEZCIEtlcm5lbCBEcml2ZXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgVmVyc2lvbiAwLjIgKHVkbGZiKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAoQykgMjAwOSBSb2JlcnRvIERlIElvcmlzIDxyb2JlcnRvQHVuYml0Lml0PiAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgIFRoaXMgZmlsZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjIuIFNlZSBDT1BZSU5HIGluIHRoZSBwYWNrYWdlLiAgICAqCisgKiBCYXNlZCBvbiB0aGUgYW1hemluZyB3b3JrIG9mIEZsb3JpYW4gRWNodGxlciBhbmQgbGliZGxvIDAuMSAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAxMC4wNi4wOSByZWxlYXNlIDAuMi4zIChlZGlkIGlvY3RsLCBmYWxsYmFjayBmb3IgdW5zdXBwb3J0ZWQgbW9kZXMpICAgICAgICoKKyAqIDA1LjA2LjA5IHJlbGVhc2UgMC4yLjIgKHJlYWwgc2NyZWVuIGJsYW5raW5nLCBybGUgY29tcHJlc3Npb24sIGRvdWJsZSBidWZmZXIpICoKKyAqIDMxLjA1LjA5IHJlbGVhc2UgMC4yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogMjIuMDUuMDkgRmlyc3QgcHVibGljICh1Z2x5KSByZWxlYXNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KKyNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KKyNpbmNsdWRlIDxsaW51eC9pbml0Lmg+CisjaW5jbHVkZSA8bGludXgvdXNiLmg+CisjaW5jbHVkZSA8bGludXgvdWFjY2Vzcy5oPgorI2luY2x1ZGUgPGxpbnV4L21tLmg+CisjaW5jbHVkZSA8bGludXgvZmIuaD4KKyNpbmNsdWRlIDxsaW51eC9tdXRleC5oPgorI2luY2x1ZGUgPGxpbnV4L3ZtYWxsb2MuaD4KKworI2luY2x1ZGUgInVkbGZiLmgiCisKKyNkZWZpbmUgRFJJVkVSX1ZFUlNJT04gIkRMRkIgMC4yIgorCisvKiBtZW1vcnkgZnVuY3Rpb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C09IDI1NTsKKwkJCQliYXNlICs9IDI1NSAqIDI7CisJCQkJc291cmNlICs9IDI1NSAqIDI7CisKKwkJCX0gZWxzZSB7CisJCQkJKmJ1ZnB0cisrID0gcmVtOworCQkJCSpidWZwdHIrKyA9IChjaGFyKShzb3VyY2UgPj4gMTYpOworCQkJCSpidWZwdHIrKyA9IChjaGFyKShzb3VyY2UgPj4gOCk7CisJCQkJKmJ1ZnB0cisrID0gKGNoYXIpKHNvdXJjZSk7CisKKwkJCQliYXNlICs9IHJlbSAqIDI7CisJCQkJc291cmNlICs9IHJlbSAqIDI7CisJCQkJcmVtID0gMDsKKwkJCX0KKwkJfQorCX0KKworCWlmIChidWZwdHIgPiBkZXZfaW5mby0+YnVmKQorCQlyZXQgPSBkbGZiX2J1bGtfbXNnKGRldl9pbmZvLCBidWZwdHIgLSBkZXZfaW5mby0+YnVmKTsKKworCW11dGV4X3VubG9jaygmZGV2X2luZm8tPmJ1bGtfbXV0ZXgpOworCisJcmV0dXJuIDE7CisKK30KKworc3RhdGljIGludAorY29weWFyZWEoc3RydWN0IGRsZmJfZGF0YSAqZGV2X2luZm8sIGludCBkeCwgaW50IGR5LCBpbnQgc3gsIGludCBzeSwKKwkgaW50IHdpZHRoLCBpbnQgaGVpZ2h0KQoreworCWludCBiYXNlOworCWludCBzb3VyY2U7CisJaW50IHJlbTsKKwlpbnQgaSwgcmV0OworCisJY2hhciAqYnVmcHRyOworCisJaWYgKGR4ICsgd2lkdGggPiBkZXZfaW5mby0+aW5mby0+dmFyLnhyZXMpCisJCXJldHVybiAtRUlOVkFMOworCisJaWYgKGR5ICsgaGVpZ2h0ID4gZGV2X2luZm8tPmluZm8tPnZhci55cmVzKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCW11dGV4X2xvY2soJmRldl9pbmZvLT5idWxrX211dGV4KTsKKworCWJhc2UgPQorCSAgICBkZXZfaW5mby0+YmFzZTE2ICsgKGRldl9pbmZvLT5pbmZvLT52YXIueHJlcyAqIDIgKiB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WZpbmUgV0xBTl9NR01UX0dFVF9USU1fT0ZGU0VUKGIpICAgICAoKChiKSAmIH5CSVQwKSA+PiAxKQorCisvLyAzLUFkZHIgJiA0LUFkZHIKKyNkZWZpbmUgV0xBTl9IRFJfQTNfREFUQV9QVFIocCkgKCgoUEJZVEUpKHApKSArIFdMQU5fSERSX0FERFIzX0xFTikKKyNkZWZpbmUgV0xBTl9IRFJfQTRfREFUQV9QVFIocCkgKCgoUEJZVEUpKHApKSArIFdMQU5fSERSX0FERFI0X0xFTikKKworLy8gSUVFRSBBRERSCisjZGVmaW5lIElFRUVfQUREUl9VTklWRVJTQUwgICAgICAgICAweDAyCisjZGVmaW5lIElFRUVfQUREUl9HUk9VUCAgICAgICAgICAgICAweDAxCisKK3R5cGVkZWYgc3RydWN0IHsKKyAgICBCWVRFICAgICAgICAgICAgYWJ5QWRkcls2XTsKK30gSUVFRV9BRERSLCAqUElFRUVfQUREUjsKKworLy8gODAyLjExIEhlYWRlciBGb3JtYXQKKwordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl84MDIxMUhEUl9BMiB7CisKKyAgICBXT1JEICAgIHdGcmFtZUN0bDsKKyAgICBXT1JEICAgIHdEdXJhdGlvbklEOworICAgIEJZVEUgICAgYWJ5QWRkcjFbV0xBTl9BRERSX0xFTl07CisgICAgQllURSAgICBhYnlBZGRyMltXTEFOX0FERFJfTEVOXTsKKworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1dMQU5fODAyMTFIRFJfQTIsICpQV0xBTl84MDIxMUhEUl9BMjsKKwordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl84MDIxMUhEUl9BMyB7CisKKyAgICBXT1JEICAgIHdGcmFtZUN0bDsKKyAgICBXT1JEICAgIHdEdXJhdGlvbklEOworICAgIEJZVEUgICAgYWJ5QWRkcjFbV0xBTl9BRERSX0xFTl07CisgICAgQllURSAgICBhYnlBZGRyMltXTEFOX0FERFJfTEVOXTsKKyAgICBCWVRFICAg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ICAgcEZyYW1lLT5wd0JlYWNvbkludGVydmFsID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9CRUFDT05fT0ZGX0JDTl9JTlQpOworICAgIHBGcmFtZS0+cHdDYXBJbmZvID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0JFQUNPTl9PRkZfQ0FQSU5GTyk7CisKKyAgICBwRnJhbWUtPmxlbiA9IFdMQU5fSERSX0FERFIzX0xFTiArIFdMQU5fQkVBQ09OX09GRl9TU0lEOworCisgICAgcmV0dXJuOworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogRGVjb2RlIEJlYWNvbiBmcmFtZSBib2R5IG9mZnNldAorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCisKK1ZPSUQKK3ZNZ3JEZWNvZGVCZWFjb24oCisgICAgSU4gIFBXTEFOX0ZSX0JFQUNPTiAgcEZyYW1lCisgICAgKQoreworICAgIFBXTEFOX0lFICAgICAgICBwSXRlbTsKKworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gRml4ZWQgRmllbGRzCisgICAgcEZyYW1lLT5wcXdUaW1lc3RhbXAgPSAoUFFXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9CRUFDT05fT0ZGX1RTKTsKKyAgICBwRnJhbWUtPnB3QmVhY29uSW50ZXJ2YWwgPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0JFQUNPTl9PRkZfQkNOX0lOVCk7CisgICAgcEZyYW1lLT5wd0NhcEluZm8gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQkVBQ09OX09GRl9DQVBJTkZPKTsKKworICAgIC8vIEluZm9ybWF0aW9uIGVsZW1lbnRzCisgICAgcEl0ZW0gPSAoUFdMQU5fSUUpKChQQllURSkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpKQorICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQkVBQ09OX09GRl9TU0lEKTsKKyAgICB3aGlsZSggKChQQllURSlwSXRlbSkgPCAocEZyYW1lLT5wQnVmICsgcEZyYW1lLT5sZW4pICl7CisKKyAgICAgICAgc3dpdGNoIChwSXRlbS0+YnlFbGVtZW50SUQpIHsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfU1NJRDoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wU1NJRCA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBTU0lEID0gKFBXTEFOX0lFX1NTSUQpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX1NVUFBfUkFURVM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cFN1cHBSYXRlcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBTdXBwUmF0ZXMgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfRkhfUEFSTVM6CisgICAgICAgICAgICAgICAgLy9wRnJhbWUtPnBGSFBhcm1zID0gKFBXTEFOX0lFX0ZIX1BBUk1TKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9EU19QQVJNUzoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wRFNQYXJtcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBEU1Bhcm1zID0gKFBXTEFOX0lFX0RTX1BBUk1TKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9DRl9QQVJNUzoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wQ0ZQYXJtcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBDRlBhcm1zID0gKFBXTEFOX0lFX0NGX1BBUk1TKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9JQlNTX1BBUk1TOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBJQlNTUGFybXMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUJTU1Bhcm1zID0gKFBXTEFOX0lFX0lCU1NfUEFSTVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX1RJTToKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wVElNID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFRJTSA9IChQV0xBTl9JRV9USU0pcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfUlNOOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBSU04gPT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBSU04gPSAoUFdMQU5fSUVfUlNOKXBJdGVtOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfUlNOX1dQQToKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wUlNOV1BBID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKFdQQWJfSXNfUlNOKChQV0xBTl9JRV9SU05fRVhUKXBJdGVtKSA9PSBUUlVFKQorICAgICAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wUlNOV1BBID0gKFBXTEFOX0lFX1JTTl9FWFQpcEl0ZW07CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0VSUDoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wRVJQID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cEVSUCA9IChQV0xBTl9JRV9FUlApcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0VYVFNVUFBfUkFURVM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cEV4dFN1cHBSYXRlcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBFeHRTdXBwUmF0ZXMgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9DT1VOVFJZOiAgICAgIC8vNworICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBJRV9Db3VudHJ5ID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cElFX0NvdW50cnkgPSAoUFdMQU5fSUVfQ09VTlRSWSlwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9QV1JfQ09OU1RSQUlOVDogICAvLzMyCisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX1Bvd2VyQ29uc3RyYWludCA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBJRV9Qb3dlckNvbnN0cmFpbnQgPSAoUFdMQU5fSUVfUFdfQ09OU1QpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfQ0hfU1dJVENIOiAgICAvLzM3CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX0NIU1cgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfQ0hTVyA9IChQV0xBTl9JRV9DSF9TVylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9RVUlFVDogICAgICAgIC8vNDAKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wSUVfUXVpZXQgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfUXVpZXQgPSAoUFdMQU5fSUVfUVVJRVQpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfSUJTU19ERlM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX0lCU1NERlMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfSUJTU0RGUyA9IChQV0xBTl9JRV9JQlNTX0RGUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJVbnJlY29nbml6ZWQgRUlEPSVkZCBpbiBiZWFjb24gZGVjb2RlLlxuIiwgcEl0ZW0tPmJ5RWxlbWVudElEKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICB9CisgICAgICAgIHBJdGVtID0gKFBXTEFOX0lFKSgoKFBCWVRFKXBJdGVtKSArIDIgKyBwSXRlbS0+bGVuKTsKKyAgICB9CisKKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICBFbmNvZGUgSUJTUyBBVElNCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworVk9JRAordk1nckVuY29kZUlCU1NBVElNKAorICAgIElOICBQV0xBTl9GUl9JQlNTQVRJTSAgIHBGcmFtZQorICAgICkKK3sKKyAgICBwRnJhbWUtPnBIZHIgPSAoUFVXTEFOXzgwMjExSERSKXBGcmFtZS0+cEJ1ZjsKKyAgICBwRnJhbWUtPmxlbiA9IFdMQU5fSERSX0FERFIzX0xFTjsKKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIERlY29kZSBJQlNTIEFUSU0KKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckRlY29kZUlCU1NBVElNKAorICAgIElOICBQV0xBTl9GUl9JQlNTQVRJTSAgIHBGcmFtZQorICAgICkKK3sKKyAgICBwRnJhbWUtPnBIZHIgPSAoUFVXTEFOXzgwMjExSERSKXBGcmFtZS0+cEJ1ZjsKKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIEVuY29kZSBEaXNhc3NvY2lhdGlvbgorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitWT0lECit2TWdyRW5jb2RlRGlzYXNzb2NpYXRpb24oCisgICAgSU4gIFBXTEFOX0ZSX0RJU0FTU09DICBwRnJhbWUKKyAgICApCit7CisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKworICAgIC8vIEZpeGVkIEZpZWxkcworICAgIHBGcmFtZS0+cHdSZWFzb24gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9ESVNBU1NPQ19PRkZfUkVBU09OKTsKKyAgICBwRnJhbWUtPmxlbiA9IFdMQU5fSERSX0FERFIzX0xFTiArIFdMQU5fRElTQVNTT0NfT0ZGX1JFQVNPTiArIHNpemVvZigqKHBGcmFtZS0+cHdSZWFzb24pKTsKKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIERlY29kZSBEaXNhc3NvY2lhdGlvbgorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitWT0lECit2TWdyRGVjb2RlRGlzYXNzb2NpYXRpb24oCisgICAgSU4gIFBXTEFOX0ZSX0RJU0FTU09DICBwRnJhbWUKKyAgICApCit7CisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnB3UmVhc29uID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fRElTQVNTT0NfT0ZGX1JFQVNPTik7CisKKyAgICByZXR1cm47Cit9CisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgRW5jb2RlIEFzc29jaWF0aW9uIFJlcXVlc3QKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworCitWT0lECit2TWdyRW5jb2RlQXNzb2NSZXF1ZXN0KAorICAgIElOICBQV0xBTl9GUl9BU1NPQ1JFUSAgcEZyYW1lCisgICAgKQoreworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworICAgIC8vIEZpeGVkIEZpZWxkcworICAgIHBGcmFtZS0+cHdDYXBJbmZvID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0FTU09DUkVRX09GRl9DQVBfSU5GTyk7CisgICAgcEZyYW1lLT5wd0xpc3RlbkludGVydmFsID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9BU1NPQ1JFUV9PRkZfTElTVEVOX0lOVCk7CisgICAgcEZyYW1lLT5sZW4gPSBXTEFOX0hEUl9BRERSM19MRU4gKyBXTEFOX0FTU09DUkVRX09GRl9MSVNURU5fSU5UICsgc2l6ZW9mKCoocEZyYW1lLT5wd0xpc3RlbkludGVydmFsKSk7CisgICAgcmV0dXJuOworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246IChBUCkKKyAqICBEZWNvZGUgQXNzb2NpYXRpb24gUmVxdWVzdAorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitWT0lECit2TWdyRGVjb2RlQXNzb2NSZXF1ZXN0KAorICAgIElOICBQV0xBTl9GUl9BU1NPQ1JFUSAgcEZyYW1lCisgICAgKQoreworICAgIFBXTEFOX0lFICAgcEl0ZW07CisKKyAgIC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wUmF0ZXMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wU3VwcFJhdGVzID0gKFBXTEFOX0lFX1NVUFBfUkFURVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfUlNOOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBSU04gPT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBSU04gPSAoUFdMQU5fSUVfUlNOKXBJdGVtOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfUlNOX1dQQToKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wUlNOV1BBID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKFdQQWJfSXNfUlNOKChQV0xBTl9JRV9SU05fRVhUKXBJdGVtKSA9PSBUUlVFKQorICAgICAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wUlNOV1BBID0gKFBXTEFOX0lFX1JTTl9FWFQpcEl0ZW07CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9FWFRTVVBQX1JBVEVTOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBFeHRTdXBwUmF0ZXMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wRXh0U3VwcFJhdGVzID0gKFBXTEFOX0lFX1NVUFBfUkFURVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiVW5yZWNvZ25pemVkIEVJRD0lZGQgaW4gYXNzb2NyZXEgZGVjb2RlLlxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgIHBJdGVtLT5ieUVsZW1lbnRJRCk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgcEl0ZW0gPSAoUFdMQU5fSUUpKCgoUEJZVEUpcEl0ZW0pICsgMiArIHBJdGVtLT5sZW4pOworICAgIH0KKyAgICByZXR1cm47Cit9CisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246IChBUCkKKyAqICBFbmNvZGUgQXNzb2NpYXRpb24gUmVzcG9uc2UKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckVuY29kZUFzc29jUmVzcG9uc2UoCisgICAgSU4gIFBXTEFOX0ZSX0FTU09DUkVTUCAgcEZyYW1lCisgICAgICkKK3sKKyAgICBwRnJhbWUtPnBIZHIgPSAoUFVXTEFOXzgwMjExSERSKXBGcmFtZS0+cEJ1ZjsKKworICAgIC8vIEZpeGVkIEZpZWxkcworICAgIHBGcmFtZS0+cHdDYXBJbmZvID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0FTU09DUkVTUF9PRkZfQ0FQX0lORk8pOworICAgIHBGcmFtZS0+cHdTdGF0dXMgPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9BU1NPQ1JFU1BfT0ZGX1NUQVRVUyk7CisgICAgcEZyYW1lLT5wd0FpZCA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0FTU09DUkVTUF9PRkZfQUlEKTs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yBJbmZvcm1hdGlvbiBlbGVtZW50cworICAgIHBGcmFtZS0+cFN1cHBSYXRlcyAgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUykoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQVNTT0NSRVNQX09GRl9TVVBQX1JBVEVTKTsKKworICAgIHBJdGVtID0gKFBXTEFOX0lFKShwRnJhbWUtPnBTdXBwUmF0ZXMpOworICAgIHBJdGVtID0gKFBXTEFOX0lFKSgoKFBCWVRFKXBJdGVtKSArIDIgKyBwSXRlbS0+bGVuKTsKKworICAgIGlmICgoKChQQllURSlwSXRlbSkgPCAocEZyYW1lLT5wQnVmICsgcEZyYW1lLT5sZW4pKSAmJiAocEl0ZW0tPmJ5RWxlbWVudElEID09IFdMQU5fRUlEX0VYVFNVUFBfUkFURVMpKSB7CisgICAgICAgIHBGcmFtZS0+cEV4dFN1cHBSYXRlcyA9IChQV0xBTl9JRV9TVVBQX1JBVEVTKXBJdGVtOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJwRnJhbWUtPnBFeHRTdXBwUmF0ZXM9WyVwXS5cbiIsIHBJdGVtKTsKKyAgICB9CisgICAgZWxzZSB7CisgICAgICAgIHBGcmFtZS0+cEV4dFN1cHBSYXRlcyA9IE5VTEw7CisgICAgfQorICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIEVuY29kZSBSZWFzc29jaWF0aW9uIFJlcXVlc3QKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckVuY29kZVJlYXNzb2NSZXF1ZXN0KAorICAgIElOICBQV0xBTl9GUl9SRUFTU09DUkVRICBwRnJhbWUKKyAgICAgKQoreworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gRml4ZWQgRmllbGRzCisgICAgcEZyYW1lLT5wd0NhcEluZm8gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUkVBU1NPQ1JFUV9PRkZfQ0FQX0lORk8pOworICAgIHBGcmFtZS0+cHdMaXN0ZW5JbnRlcnZhbCA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9SRUFTU09DUkVRX09GRl9MSVNURU5fSU5UKTsKKyAgICBwRnJhbWUtPnBBZGRyQ3VyckFQID0gKFBJRUVFX0FERFIpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1JFQVNTT0NSRVFfT0ZGX0NVUlJfQVApOworICAgIHBGcmFtZS0+bGVuID0gV0xBTl9IRFJfQUREUjNfTEVOICsgV0xBTl9SRUFTU09DUkVRX09GRl9DVVJSX0FQICsgc2l6ZW9mKCoocEZyYW1lLT5wQWRkckN1cnJBUCkpOworCisgICAgcmV0dXJuOworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246IChBUCkKKyAqICBEZWNvZGUgUmVhc3NvY2lhdGlvbiBSZXF1ZXN0CisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworVk9JRAordk1nckRlY29kZVJlYXNzb2NSZXF1ZXN0KAorICAgIElOICBQV0xBTl9GUl9SRUFTU09DUkVRICBwRnJhbWUKKyAgICAgKQoreworICAgIFBXTEFOX0lFICAgcEl0ZW07CisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnB3Q2FwSW5mbyA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9SRUFTU09DUkVRX09GRl9DQVBfSU5GTyk7CisgICAgcEZyYW1lLT5wd0xpc3RlbkludGVydmFsID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1JFQVNTT0NSRVFfT0ZGX0xJU1RFTl9JTlQpOworICAgIHBGcmFtZS0+cEFkZHJDdXJyQVAgPSAoUElFRUVfQUREUikoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUkVBU1NPQ1JFUV9PRkZfQ1VSUl9BUCk7CisKKyAgICAvLyBJbmZvcm1hdGlvbiBlbGVtZW50cworICAgIHBJdGVtID0gKFBXTEFOX0lFKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1JFQVNTT0NSRVFfT0ZGX1NTSUQpOworCisgICAgd2hpbGUoKChQQllURSlwSXRlbSkgPCAocEZyYW1lLT5wQnVmICsgcEZyYW1lLT5sZW4pKSB7CisKKyAgICAgICAgc3dpdGNoIChwSXRlbS0+YnlFbGVtZW50SUQpeworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9TU0lEOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBTU0lEID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFNTSUQgPSAoUFdMQU5fSUVfU1NJRClwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfU1VQUF9SQVRFUzoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wU3VwcFJhdGVzID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFN1cHBSYXRlcyA9IChQV0xBTl9JRV9TVVBQX1JBVEVTKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX1JTTjoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wUlNOID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wUlNOID0gKFBXTEFOX0lFX1JTTilwSXRlbTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX1JTTl9XUEE6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cFJTTldQQSA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChXUEFiX0lzX1JTTigoUFdMQU5fSUVfUlNOX0VYVClwSXRlbSkgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFJTTldQQSA9IChQV0xBTl9JRV9SU05fRVhUKXBJdGVtOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9FWFRTVVBQX1JBVEVTOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBFeHRTdXBwUmF0ZXMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wRXh0U3VwcFJhdGVzID0gKFBXTEFOX0lFX1NVUFBfUkFURVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlVucmVjb2duaXplZCBFSUQ9JWRkIGluIHJlYXNzb2NyZXEgZGVjb2RlLlxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSXRlbS0+YnlFbGVtZW50SUQpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIHBJdGVtID0gKFBXTEFOX0lFKSgoKFBCWVRFKXBJdGVtKSArIDIgKyBwSXRlbS0+bGVuKTsKKyAgICB9CisgICAgcmV0dXJuOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICBFbmNvZGUgUHJvYmUgUmVxdWVzdAorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCisKK1ZPSUQKK3ZNZ3JFbmNvZGVQcm9iZVJlcXVlc3QoCisgICAgSU4gUFdMQU5fRlJfUFJPQkVSRVEgIHBGcmFtZQorICAgICApCit7CisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisgICAgcEZyYW1lLT5sZW4gPSBXTEFOX0hEUl9BRERSM19MRU47CisgICAgcmV0dXJuOworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIERlY29kZSBQcm9iZSBSZXF1ZXN0CisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JEZWNvZGVQcm9iZVJlcXVlc3QoCisgICAgSU4gUFdMQU5fRlJfUFJPQkVSRVEgIHBGcmFtZQorICAgICApCit7CisgICAgUFdMQU5fSUUgICBwSXRlbTsKKworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gSW5mb3JtYXRpb24gZWxlbWVudHMKKyAgICBwSXRlbSA9IChQV0xBTl9JRSkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpKTsKKworICAgIHdoaWxlKCAoKFBCWVRFKXBJdGVtKSA8IChwRnJhbWUtPnBCdWYgKyBwRnJhbWUtPmxlbikgKSB7CisKKyAgICAgICAgc3dpdGNoIChwSXRlbS0+YnlFbGVtZW50SUQpIHsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfU1NJRDoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wU1NJRCA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBTU0lEID0gKFBXTEFOX0lFX1NTSUQpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfU1VQUF9SQVRFUzoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wU3VwcFJhdGVzID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFN1cHBSYXRlcyA9IChQV0xBTl9JRV9TVVBQX1JBVEVTKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0VYVFNVUFBfUkFURVM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cEV4dFN1cHBSYXRlcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBFeHRTdXBwUmF0ZXMgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCYWQgRUlEPSVkZCBpbiBwcm9iZXJlcVxuIiwgcEl0ZW0tPmJ5RWxlbWVudElEKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCisgICAgICAgIHBJdGVtID0gKFBXTEFOX0lFKSgoKFBCWVRFKXBJdGVtKSArIDIgKyAgcEl0ZW0tPmxlbik7CisgICAgfQorICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIEVuY29kZSBQcm9iZSBSZXNwb25zZQorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCisKK1ZPSUQKK3ZNZ3JFbmNvZGVQcm9iZVJlc3BvbnNlKAorICAgIElOIFBXTEFOX0ZSX1BST0JFUkVTUCAgcEZyYW1lCisgICAgKQoreworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gRml4ZWQgRmllbGRzCisgICAgcEZyYW1lLT5wcXdUaW1lc3RhbXAgPSAoUFFXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9QUk9CRVJFU1BfT0ZGX1RTKTsKKyAgICBwRnJhbWUtPnB3QmVhY29uSW50ZXJ2YWwgPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1BST0JFUkVTUF9PRkZfQkNOX0lOVCk7CisgICAgcEZyYW1lLT5wd0NhcEluZm8gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUFJPQkVSRVNQX09GRl9DQVBfSU5GTyk7CisKKyAgICBwRnJhbWUtPmxlbiA9IFdMQU5fSERSX0FERFIzX0xFTiArIFdMQU5fUFJPQkVSRVNQX09GRl9DQVBfSU5GTyArCisgICAgICAgICAgICAgICAgICBzaXplb2YoKihwRnJhbWUtPnB3Q2FwSW5mbykpOworCisgICAgcmV0dXJuOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICBEZWNvZGUgUHJvYmUgUmVzcG9uc2UKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckRlY29kZVByb2JlUmVzcG9uc2UoCisgICAgSU4gUFdMQU5fRlJfUFJPQkVSRVNQICBwRnJhbWUKKyAgICApCit7CisgICAgUFdMQU5fSUUgICAgcEl0ZW07CisvLyAgICBCWVRFICAgICAgICBieUNoZWNrRUlEID0gMDsKKworCisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnBxd1RpbWVzdGFtcCA9IChQUVdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1BST0JFUkVTUF9PRkZfVFMpOworICAgIHBGcmFtZS0+cHdCZWFjb25JbnRlcnZhbCA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUFJPQkVSRVNQX09GRl9CQ05fSU5UKTsKKyAgICBwRnJhbWUtPnB3Q2FwSW5mbyA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9QUk9CRVJFU1BfT0ZGX0NBUF9JTkZPKTsKKworICAgIC8vIEluZm9ybWF0aW9uIGVsZW1lbnRzCisgICAgcEl0ZW0gPSAoUFdMQU5fSUUpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUFJPQkVSRVNQX09GRl9TU0lEKTsKKworICAgIHdoaWxlKCAoKFBCWVRFKXBJdGVtKSA8IChwRnJhbWUtPnBCdWYgKyBwRnJhbWUtPmxlbikgKSB7CisJCS8qCisgICAgICAgIGlmIChwSXRlbS0+YnlFbGVtZW50SUQgPCBieUNoZWNrRUlEKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGJ5Q2hlY2tFSUQgPSBwSXRlbS0+YnlFbGVtZW50SUQ7CisqLworICAgICAgICBzd2l0Y2ggKHBJdGVtLT5ieUVsZW1lbnRJRCkgeworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9TU0lEOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBTU0lEID09IE5VTEwpCisgICAgICAgICAgICAgICAgcEZyYW1lLT5wU1NJRCA9IChQV0xBTl9JRV9TU0lEKXBJdGVtOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9TVVBQX1JBVEVTOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBTdXBwUmF0ZXMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICBwRnJhbWUtPnBTdXBwUmF0ZXMgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfRkhfUEFSTVM6CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0RTX1BBUk1TOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBEU1Bhcm1zID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cERTUGFybXMgPSAoUFdMQU5fSUVfRFNfUEFSTVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0NGX1BBUk1TOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBDRlBhcm1zID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cENGUGFybXMgPSAoUFdMQU5fSUVfQ0ZfUEFSTVMpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0lCU1NfUEFSTVM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElCU1NQYXJtcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBJQlNTUGFybXMgPSAoUFdMQU5fSUVfSUJTU19QQVJNUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9SU046CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cFJTTiA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cFJTTiA9IChQV0xBTl9JRV9SU04pcEl0ZW07CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9SU05fV1BBOgorICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBSU05XUEEgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoV1BBYl9Jc19SU04oKFBXTEFOX0lFX1JTTl9FWFQpcEl0ZW0pID09IFRSVUUpCisgICAgICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBSU05XUEEgPSAoUFdMQU5fSUVfUlNOX0VYVClwSXRlbTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0VSUDoKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wRVJQID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cEVSUCA9IChQV0xBTl9JRV9FUlApcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIFdMQU5fRUlEX0VYVFNVUFBfUkFURVM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cEV4dFN1cHBSYXRlcyA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBFeHRTdXBwUmF0ZXMgPSAoUFdMQU5fSUVfU1VQUF9SQVRFUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9DT1VOVFJZOiAgICAgIC8vNworICAgICAgICAgICAgICAgIGlmIChwRnJhbWUtPnBJRV9Db3VudHJ5ID09IE5VTEwpCisgICAgICAgICAgICAgICAgICAgIHBGcmFtZS0+cElFX0NvdW50cnkgPSAoUFdMQU5fSUVfQ09VTlRSWSlwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9QV1JfQ09OU1RSQUlOVDogICAvLzMyCisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX1Bvd2VyQ29uc3RyYWludCA9PSBOVUxMKQorICAgICAgICAgICAgICAgICAgICBwRnJhbWUtPnBJRV9Qb3dlckNvbnN0cmFpbnQgPSAoUFdMQU5fSUVfUFdfQ09OU1QpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfQ0hfU1dJVENIOiAgICAvLzM3CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX0NIU1cgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfQ0hTVyA9IChQV0xBTl9JRV9DSF9TVylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0VJRF9RVUlFVDogICAgICAgIC8vNDAKKyAgICAgICAgICAgICAgICBpZiAocEZyYW1lLT5wSUVfUXVpZXQgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfUXVpZXQgPSAoUFdMQU5fSUVfUVVJRVQpcEl0ZW07CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9FSURfSUJTU19ERlM6CisgICAgICAgICAgICAgICAgaWYgKHBGcmFtZS0+cElFX0lCU1NERlMgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgcEZyYW1lLT5wSUVfSUJTU0RGUyA9IChQV0xBTl9JRV9JQlNTX0RGUylwSXRlbTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCYWQgRUlEPSVkZCBpbiBwcm9iZXJlc3BcbiIsIHBJdGVtLT5ieUVsZW1lbnRJRCk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKworICAgICAgICBwSXRlbSA9IChQV0xBTl9JRSkoKChQQllURSlwSXRlbSkgKyAyICsgIHBJdGVtLT5sZW4pOworICAgIH0KKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgICBFbmNvZGUgQXV0aGVudGljYXRpb24gZnJhbWUKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckVuY29kZUF1dGhlbigKKyAgICBJTiAgUFdMQU5fRlJfQVVUSEVOICBwRnJhbWUKKyAgICApCit7CisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnB3QXV0aEFsZ29yaXRobSA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9BVVRIRU5fT0ZGX0FVVEhfQUxHKTsKKyAgICBwRnJhbWUtPnB3QXV0aFNlcXVlbmNlID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQVVUSEVOX09GRl9BVVRIX1NFUSk7CisgICAgcEZyYW1lLT5wd1N0YXR1cyA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0FVVEhFTl9PRkZfU1RBVFVTKTsKKyAgICBwRnJhbWUtPmxlbiA9IFdMQU5fSERSX0FERFIzX0xFTiArIFdMQU5fQVVUSEVOX09GRl9TVEFUVVMgKyBzaXplb2YoKihwRnJhbWUtPnB3U3RhdHVzKSk7CisKKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgRGVjb2RlIEF1dGhlbnRpY2F0aW9uCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JEZWNvZGVBdXRoZW4oCisgICAgSU4gIFBXTEFOX0ZSX0FVVEhFTiAgcEZyYW1lCisgICAgKQoreworICAgIFBXTEFOX0lFICAgIHBJdGVtOworCisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnB3QXV0aEFsZ29yaXRobSA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9BVVRIRU5fT0ZGX0FVVEhfQUxHKTsKKyAgICBwRnJhbWUtPnB3QXV0aFNlcXVlbmNlID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQVVUSEVOX09GRl9BVVRIX1NFUSk7CisgICAgcEZyYW1lLT5wd1N0YXR1cyA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0FVVEhFTl9PRkZfU1RBVFVTKTsKKworICAgIC8vIEluZm9ybWF0aW9uIGVsZW1lbnRzCisgICAgcEl0ZW0gPSAoUFdMQU5fSUUpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fQVVUSEVOX09GRl9DSEFMTEVOR0UpOworCisgICAgaWYgKCgoKFBCWVRFKXBJdGVtKSA8IChwRnJhbWUtPnBCdWYgKyBwRnJhbWUtPmxlbikpICYmIChwSXRlbS0+YnlFbGVtZW50SUQgPT0gV0xBTl9FSURfQ0hBTExFTkdFKSkgeworICAgICAgICBwRnJhbWUtPnBDaGFsbGVuZ2UgPSAoUFdMQU5fSUVfQ0hBTExFTkdFKXBJdGVtOworICAgIH0KKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICBFbmNvZGUgQXV0aGVudGljYXRpb24KKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckVuY29kZURlYXV0aGVuKAorICAgIElOICBQV0xBTl9GUl9ERUFVVEhFTiAgcEZyYW1lCisgICAgKQoreworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gRml4ZWQgRmllbGRzCisgICAgcEZyYW1lLT5wd1JlYXNvbiA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX0RFQVVUSEVOX09GRl9SRUFTT04pOworICAgIHBGcmFtZS0+bGVuID0gV0xBTl9IRFJfQUREUjNfTEVOICsgV0xBTl9ERUFVVEhFTl9PRkZfUkVBU09OICsgc2l6ZW9mKCoocEZyYW1lLT5wd1JlYXNvbikpOworCisgICAgcmV0dXJuOworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgIERlY29kZSBEZWF1dGhlbnRpY2F0aW9uCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JEZWNvZGVEZWF1dGhlbigKKyAgICBJTiAgUFdMQU5fRlJfREVBVVRIRU4gIHBGcmFtZQorICAgICkKK3sKKyAgICBwRnJhbWUtPnBIZHIgPSAoUFVXTEFOXzgwMjExSERSKXBGcmFtZS0+cEJ1ZjsKKworICAgIC8vIEZpeGVkIEZpZWxkcworICAgIHBGcmFtZS0+cHdSZWFzb24gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9ERUFVVEhFTl9PRkZfUkVBU09OKTsKKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOiAoQVApCisgKiAgIEVuY29kZSBSZWFzc29jaWF0aW9uIFJlc3BvbnNlCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JFbmNvZGVSZWFzc29jUmVzcG9uc2UoCisgICAgSU4gIFBXTEFOX0ZSX1JFQVNTT0NSRVNQICBwRnJhbWUKKyAgICAgKQoreworICAgIHBGcmFtZS0+cEhkciA9IChQVVdMQU5fODAyMTFIRFIpcEZyYW1lLT5wQnVmOworCisgICAgLy8gRml4ZWQgRmllbGRzCisgICAgcEZyYW1lLT5wd0NhcEluZm8gPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUkVBU1NPQ1JFU1BfT0ZGX0NBUF9JTkZPKTsKKyAgICBwRnJhbWUtPnB3U3RhdHVzID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUkVBU1NPQ1JFU1BfT0ZGX1NUQVRVUyk7CisgICAgcEZyYW1lLT5wd0FpZCA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXTEFOX1JFQVNTT0NSRVNQX09GRl9BSUQpOworCisgICAgcEZyYW1lLT5sZW4gPSBXTEFOX0hEUl9BRERSM19MRU4gKyBXTEFOX1JFQVNTT0NSRVNQX09GRl9BSUQgKyBzaXplb2YoKihwRnJhbWUtPnB3QWlkKSk7CisKKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgRGVjb2RlIFJlYXNzb2NpYXRpb24gUmVzcG9uc2UKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworCitWT0lECit2TWdyRGVjb2RlUmVhc3NvY1Jlc3BvbnNlKAorICAgIElOICBQV0xBTl9GUl9SRUFTU09DUkVTUCAgcEZyYW1lCisgICAgICkKK3sKKyAgICBQV0xBTl9JRSAgIHBJdGVtOworCisgICAgcEZyYW1lLT5wSGRyID0gKFBVV0xBTl84MDIxMUhEUilwRnJhbWUtPnBCdWY7CisKKyAgICAvLyBGaXhlZCBGaWVsZHMKKyAgICBwRnJhbWUtPnB3Q2FwSW5mbyA9IChQV09SRCkoV0xBTl9IRFJfQTNfREFUQV9QVFIoJihwRnJhbWUtPnBIZHItPnNBMykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9SRUFTU09DUkVTUF9PRkZfQ0FQX0lORk8pOworICAgIHBGcmFtZS0+cHdTdGF0dXMgPSAoUFdPUkQpKFdMQU5fSERSX0EzX0RBVEFfUFRSKCYocEZyYW1lLT5wSGRyLT5zQTMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0xBTl9SRUFTU09DUkVTUF9PRkZfU1RBVFVTKTsKKyAgICBwRnJhbWUtPnB3QWlkID0gKFBXT1JEKShXTEFOX0hEUl9BM19EQVRBX1BUUigmKHBGcmFtZS0+cEhkci0+c0EzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdMQU5fUkVBU1NPQ1JFU1BfT0ZGX0FJRCk7CisKKyAgICAvL0luZm9ybWF0aW9uIGVsZW1lbnRzCisgICAgcEZyYW1l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UxJRCAgICAgIDE5CisjZGVmaW5lIFdMQU5fTUdNVF9SRUFTT05fQUtNUF9JTlZBTElEICAgICAgICAgICAgICAgMjAKKyNkZWZpbmUgV0xBTl9NR01UX1JFQVNPTl9SU05FX1VOU1VQUE9SVEVEICAgICAgICAgICAyMQorI2RlZmluZSBXTEFOX01HTVRfUkVBU09OX1JTTkVfQ0FQX0lOVkFMSUQgICAgICAgICAgIDIyCisjZGVmaW5lIFdMQU5fTUdNVF9SRUFTT05fODAyMTFYX0FVVEhfRkFJTEVEICAgICAgICAgMjMKKworLy8gU3RhdHVzIENvZGVzCisjZGVmaW5lIFdMQU5fTUdNVF9TVEFUVVNfU1VDQ0VTUyAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgV0xBTl9NR01UX1NUQVRVU19VTlNQRUNfRkFJTFVSRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX0NBUFNfVU5TVVBQT1JURUQgICAgICAgICAgICAgICAxMAorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX1JFQVNTT0NfTk9fQVNTT0MgICAgICAgICAgICAgICAxMQorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX0FTU09DX0RFTklFRF9VTlNQRUMgICAgICAgICAgICAxMgorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX1VOU1VQUE9SVEVEX0FVVEhBTEcgICAgICAgICAgICAxMworI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX1JYX0FVVEhfTk9TRVEgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX0NIQUxMRU5HRV9GQUlMICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX0FVVEhfVElNRU9VVCAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBXTEFOX01HTVRfU1RBVFVTX0FTU09DX0RFTklFRF9CVVNZICAgICAgICAgICAgICAxNworI2R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ZfQ0FQX0lORk8gICAgICAgICAxMAorI2RlZmluZSBXTEFOX1BST0JFUkVTUF9PRkZfU1NJRCAgICAgICAgICAgICAxMgorCisjZGVmaW5lIFdMQU5fQVVUSEVOX09GRl9BVVRIX0FMRyAgICAgICAgICAgIDAKKyNkZWZpbmUgV0xBTl9BVVRIRU5fT0ZGX0FVVEhfU0VRICAgICAgICAgICAgMgorI2RlZmluZSBXTEFOX0FVVEhFTl9PRkZfU1RBVFVTICAgICAgICAgICAgICA0CisjZGVmaW5lIFdMQU5fQVVUSEVOX09GRl9DSEFMTEVOR0UgICAgICAgICAgIDYKKworI2RlZmluZSBXTEFOX0RFQVVUSEVOX09GRl9SRUFTT04gICAgICAgICAgICAwCisKKworLy8KKy8vIENpcGhlciBTdWl0ZSBTZWxlY3RvcnMgZGVmaWVuZWQgaW4gODAyLjExaQorLy8KKyNkZWZpbmUgV0xBTl8xMWlfQ1NTX1VTRV9HUk9VUCAgICAgICAgICAgICAgMAorI2RlZmluZSBXTEFOXzExaV9DU1NfV0VQNDAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFdMQU5fMTFpX0NTU19US0lQICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgV0xBTl8xMWlfQ1NTX0NDTVAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBXTEFOXzExaV9DU1NfV0VQMTA0ICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFdMQU5fMTFpX0NTU19VTktOT1dOICAgICAgICAgICAgICAgIDI1NQorCisvLworLy8gQXV0aGVudGljYXRpb24gYW5kIEtleSBNYW5hZ2VtZW50IFN1aXRlIFNlbGVjdG9ycyBkZWZpbmVkIGluIDgwMi4xMWkKKy8vCisjZGVmaW5lIFdMQU5fMTFpX0FLTVNTXzgwMl8xWCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgV0xBTl8xMWlfQUtNU1NfUFNLICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBXTEFOXzExaV9BS01TU19V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QTUVBU0VVUkVfUkVRX1JQSTsKKwordHlwZWRlZiBzdHJ1Y3QgX01FQVNFVVJFX1JFUF9CQVNJQyB7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNoYW5uZWw7CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlTdGFydFRpbWVbOF07CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlEdXJhdGlvblsyXTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5TWFwOworfSBNRUFTRVVSRV9SRVBfQkFTSUMsICpQTUVBU0VVUkVfUkVQX0JBU0lDOworCit0eXBlZGVmIHN0cnVjdCBfTUVBU0VVUkVfUkVQX0NDQSB7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNoYW5uZWw7CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlTdGFydFRpbWVbOF07CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlEdXJhdGlvblsyXTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5Q0NBQnVzeUZyYWN0aW9uOworfSBNRUFTRVVSRV9SRVBfQ0NBLCAqUE1FQVNFVVJFX1JFUF9DQ0E7CisKK3R5cGVkZWYgc3RydWN0IF9NRUFTRVVSRV9SRVBfUlBJIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5Q2hhbm5lbDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieVN0YXJ0VGltZVs4XTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieUR1cmF0aW9uWzJdOworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5UlBJZGVuc2l0eVs4XTsKK30gTUVBU0VVUkVfUkVQX1JQSSwgKlBNRUFTRVVSRV9SRVBfUlBJOworCit0eXBlZGVmIHVuaW9uIF9NRUFTRVVSRV9SRVAgeworCisgICAgTUVBU0VVUkVfUkVQX0JBU0lDICBzQmFzaWM7CisgICAgTUVBU0VVUkVfUkVQX0NDQSAgICBzQ0NBOworICAgIE1FQVNFVVJFX1JFUF9SUEkgICAgc1JQSTsKKworfSBNRUFTRVVSRV9SRVAsICpQTUVBU0VVUkVfUkVQOworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9NRUFTVVJFX1JFUSB7CisgICAgQllURSAgICAgICAgICAgICAgICBieUVsZW1lbnRJRDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGxlbjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5VG9rZW47CisgICAgQllURSAgICAgICAgICAgICAgICBieU1vZGU7CisgICAgQllURSAgICAgICAgICAgICAgICBieVR5cGU7CisgICAgTUVBU0VVUkVfUkVRICAgICAgICBzUmVxOworfSBXTEFOX0lFX01FQVNVUkVfUkVRLCAqUFdMQU5fSUVfTUVBU1VSRV9SRVE7CisKK3R5cGVkZWYgc3RydWN0IF9XTEFOX0lFX01FQVNVUkVfUkVQIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlUb2tlbjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5TW9kZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5VHlwZTsKKyAgICBNRUFTRVVSRV9SRVAgICAgICAgIHNSZXA7Cit9IFdMQU5fSUVfTUVBU1VSRV9SRVAsICpQV0xBTl9JRV9NRUFTVVJFX1JFUDsKKwordHlwZWRlZiBzdHJ1Y3QgX1dMQU5fSUVfQ0hfU1cgeworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlFbGVtZW50SUQ7CisgICAgQllURSAgICAgICAgICAgICAgICBsZW47CisgICAgQllURSAgICAgICAgICAgICAgICBieU1vZGU7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNoYW5uZWw7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNvdW50OworfSBXTEFOX0lFX0NIX1NXLCAqUFdMQU5fSUVfQ0hfU1c7CisKK3R5cGVkZWYgc3RydWN0IF9XTEFOX0lFX1FVSUVUIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlRdWlldENvdW50OworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlRdWlldFBlcmlvZDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieVF1aWV0RHVyYXRpb25bMl07CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlRdWlldE9mZnNldFsyXTsKK30gV0xBTl9JRV9RVUlFVCwgKlBXTEFOX0lFX1FVSUVUOworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9DT1VOVFJZIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5Q291bnRyeVN0cmluZ1szXTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieUNvdW50cnlJbmZvWzNdOworfSBXTEFOX0lFX0NPVU5UUlksICpQV0xBTl9JRV9DT1VOVFJZOworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9QV19DT05TVCB7CisgICAgQllURSAgICAgICAgICAgICAgICBieUVsZW1lbnRJRDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGxlbjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5UG93ZXI7Cit9IFdMQU5fSUVfUFdfQ09OU1QsICpQV0xBTl9JRV9QV19DT05TVDsKKwordHlwZWRlZiBzdHJ1Y3QgX1dMQU5fSUVfUFdfQ0FQIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlNaW5Qb3dlcjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5TWF4UG93ZXI7Cit9IFdMQU5fSUVfUFdfQ0FQLCAqUFdMQU5fSUVfUFdfQ0FQOworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9TVVBQX0NIIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5Q2hhbm5lbFR1cGxlWzJdOworfSBXTEFOX0lFX1NVUFBfQ0gsICpQV0xBTl9JRV9TVVBQX0NIOworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9UUENfUkVRIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworfSBXTEFOX0lFX1RQQ19SRVEsICpQV0xBTl9JRV9UUENfUkVROworCit0eXBlZGVmIHN0cnVjdCBfV0xBTl9JRV9UUENfUkVQIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlUeFBvd2VyOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlMaW5rTWFyZ2luOworfSBXTEFOX0lFX1RQQ19SRVAsICpQV0xBTl9JRV9UUENfUkVQOworCisKK3R5cGVkZWYgc3RydWN0IF9XTEFOX0lFX0lCU1NfREZTIHsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RWxlbWVudElEOworICAgIEJZVEUgICAgICAgICAgICAgICAgbGVuOworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5REZTT3duZXJbNl07CisgICAgQllURSAgICAgICAgICAgICAgICBieURGU1JlY292ZXJ5OworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5Q2hhbm5lbE1hcFsyXTsKK30gV0xBTl9JRV9JQlNTX0RGUywgKlBXTEFOX0lFX0lCU1NfREZTOworCisjcHJhZ21hIHBhY2soKQorCisKKworLy8gRnJhbWUgVHlwZXMKKy8vIHByb3RvdHlwZSBzdHJ1Y3R1cmUsIGFsbCBtZ210IGZyYW1lIHR5cGVzIHdpbGwgc3RhcnQgd2l0aCB0aGVzZSBtZW1iZXJzCit0eXBlZGVmIHN0cnVjdCB0YWdXTEFOX0ZSX01HTVQgeworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgIHVUeXBlOworICAgIFVJTlQgICAgICAgICAgICAgICAgICBsZW47CisgICAgUEJZVEUgICAgICAgICAgICAgICAgIHBCdWY7CisgICAgUFVXTEFOXzgwMjExSERSICAgICAgIHBIZHI7CisKK30gV0xBTl9GUl9NR01ULCAgKlBXTEFOX0ZSX01HTVQ7CisKKy8vIEJlYWNvbiBmcmFtZQordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl9GUl9CRUFDT04geworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdVR5cGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgbGVuOworICAgIFBCWVRFICAgICAgICAgICAgICAgICAgIHBCdWY7CisgICAgUFVXTEFOXzgwMjExSERSICAgICAgICAgcEhkcjsKKyAgICAvLyBmaXhlZCBmaWVsZHMKKyAgICBQUVdPUkQgICAgICAgICAgICAgICAgICBwcXdUaW1lc3RhbXA7CisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdCZWFjb25JbnRlcnZhbDsKKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0NhcEluZm87CisgICAgLyotLSBpbmZvIGVsZW1lbnRzIC0tLS0tLS0tLS0qLworICAgIFBXTEFOX0lFX1NTSUQgICAgICAgICAgIHBTU0lEOworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgICAgIHBTdXBwUmF0ZXM7CisvLyAgUFdMQU5fSUVfRkhfUEFSTVMgICAgICAgcEZIUGFybXM7CisgICAgUFdMQU5fSUVfRFNfUEFSTVMgICAgICAgcERTUGFybXM7CisgICAgUFdMQU5fSUVfQ0ZfUEFSTVMgICAgICAgcENGUGFybXM7CisgICAgUFdMQU5fSUVfVElNICAgICAgICAgICAgcFRJTTsKKyAgICBQV0xBTl9JRV9JQlNTX1BBUk1TICAgICBwSUJTU1Bhcm1zOworICAgIFBXTEFOX0lFX1JTTiAgICAgICAgICAgIHBSU047CisgICAgUFdMQU5fSUVfUlNOX0VYVCAgICAgICAgcFJTTldQQTsKKyAgICBQV0xBTl9JRV9FUlAgICAgICAgICAgICBwRVJQOworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgICAgIHBFeHRTdXBwUmF0ZXM7CisgICAgUFdMQU5fSUVfQ09VTlRSWSAgICAgICAgcElFX0NvdW50cnk7CisgICAgUFdMQU5fSUVfUFdfQ09OU1QgICAgICAgcElFX1Bvd2VyQ29uc3RyYWludDsKKyAgICBQV0xBTl9JRV9DSF9TVyAgICAgICAgICBwSUVfQ0hTVzsKKyAgICBQV0xBTl9JRV9JQlNTX0RGUyAgICAgICBwSUVfSUJTU0RGUzsKKyAgICBQV0xBTl9JRV9RVUlFVCAgICAgICAgICBwSUVfUXVpZXQ7CisKK30gV0xBTl9GUl9CRUFDT04sICpQV0xBTl9GUl9CRUFDT047CisKKworLy8gSUJTUyBBVElNIGZyYW1lCit0eXBlZGVmIHN0cnVjdCB0YWdXTEFOX0ZSX0lCU1NBVElNIHsKKworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVUeXBlOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIGxlbjsKKyAgICBQQllURSAgICAgICAgICAgICAgICAgICBwQnVmOworICAgIFBVV0xBTl84MDIxMUhEUiAgICAgICAgIHBIZHI7CisKKyAgICAvLyBmaXhlZCBmaWVsZHMKKyAgICAvLyBpbmZvIGVsZW1lbnRzCisgICAgLy8gdGhpcyBmcmFtZSB0eXBlIGhhcyBhIG51bGwgYm9keQorCit9IFdMQU5fRlJfSUJTU0FUSU0sICpQV0xBTl9GUl9JQlNTQVRJTTsKKworLy8gRGlzYXNzb2NpYXRpb24KK3R5cGVkZWYgc3RydWN0IHRhZ1dMQU5fRlJfRElTQVNTT0MgeworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdVR5cGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgbGVuOworICAgIFBCWVRFICAgICAgICAgICAgICAgICAgIHBCdWY7CisgICAgUFVXTEFOXzgwMjExSERSICAgICAgICAgcEhkcjsKKyAgICAvKi0tIGZpeGVkIGZpZWxkcyAtLS0tLS0tLS0tLSovCisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdSZWFzb247CisgICAgLyotLSBpbmZvIGVsZW1lbnRzIC0tLS0tLS0tLS0qLworCit9IFdMQU5fRlJfRElTQVNTT0MsICpQV0xBTl9GUl9ESVNBU1NPQzsKKworLy8gQXNzb2NpYXRpb24gUmVxdWVzdAordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl9GUl9BU1NPQ1JFUSB7CisKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1VHlwZTsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICBsZW47CisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgcEJ1ZjsKKyAgICBQVVdMQU5fODAyMTFIRFIgICAgICAgICBwSGRyOworICAgIC8qLS0gZml4ZWQgZmllbGRzIC0tLS0tLS0tLS0tKi8KKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0NhcEluZm87CisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdMaXN0ZW5JbnRlcnZhbDsKKyAgICAvKi0tIGluZm8gZWxlbWVudHMgLS0tLS0tLS0tLSovCisgICAgUFdMQU5fSUVfU1NJRCAgICAgICAgICAgcFNTSUQ7CisgICAgUFdMQU5fSUVfU1VQUF9SQVRFUyAgICAgcFN1cHBSYXRlczsKKyAgICBQV0xBTl9JRV9SU04gICAgICAgICAgICBwUlNOOworICAgIFBXTEFOX0lFX1JTTl9FWFQgICAgICAgIHBSU05XUEE7CisgICAgUFdMQU5fSUVfU1VQUF9SQVRFUyAgICAgcEV4dFN1cHBSYXRlczsKKyAgICBQV0xBTl9JRV9QV19DQVAgICAgICAgICBwQ3VyclBvd2VyQ2FwOworICAgIFBXTEFOX0lFX1NVUFBfQ0ggICAgICAgIHBDdXJyU3VwcENoOworCit9IFdMQU5fRlJfQVNTT0NSRVEsICpQV0xBTl9GUl9BU1NPQ1JFUTsKKworLy8gQXNzb2NpYXRpb24gUmVzcG9uc2UKK3R5cGVkZWYgc3RydWN0IHRhZ1dMQU5fRlJfQVNTT0NSRVNQIHsKKworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVUeXBlOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIGxlbjsKKyAgICBQQllURSAgICAgICAgICAgICAgICAgICBwQnVmOworICAgIFBVV0xBTl84MDIxMUhEUiAgICAgICAgIHBIZHI7CisgICAgLyotLSBmaXhlZCBmaWVsZHMgLS0tLS0tLS0tLS0qLworICAgIFBXT1JEICAgICAgICAgICAgICAgICAgIHB3Q2FwSW5mbzsKKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd1N0YXR1czsKKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0FpZDsKKyAgICAvKi0tIGluZm8gZWxlbWVudHMgLS0tLS0tLS0tLSovCisgICAgUFdMQU5fSUVfU1VQUF9SQVRFUyAgICAgcFN1cHBSYXRlczsKKyAgICBQV0xBTl9JRV9TVVBQX1JBVEVTICAgICBwRXh0U3VwcFJhdGVzOworCit9IFdMQU5fRlJfQVNTT0NSRVNQLCAqUFdMQU5fRlJfQVNTT0NSRVNQOworCisvLyBSZWFzc29jaWF0aW9uIFJlcXVlc3QKK3R5cGVkZWYgc3RydWN0IHRhZ1dMQU5fRlJfUkVBU1NPQ1JFUSB7CisKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1VHlwZTsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICBsZW47CisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgcEJ1ZjsKKyAgICBQVVdMQU5fODAyMTFIRFIgICAgICAgICBwSGRyOworCisgICAgLyotLSBmaXhlZCBmaWVsZHMgLS0tLS0tLS0tLS0qLworICAgIFBXT1JEICAgICAgICAgICAgICAgICAgIHB3Q2FwSW5mbzsKKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0xpc3RlbkludGVydmFsOworICAgIFBJRUVFX0FERFIgICAgICAgICAgICAgIHBBZGRyQ3VyckFQOworCisgICAgLyotLSBpbmZvIGVsZW1lbnRzIC0tLS0tLS0tLS0qLworICAgIFBXTEFOX0lFX1NTSUQgICAgICAgICAgIHBTU0lEOworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgICAgIHBTdXBwUmF0ZXM7CisgICAgUFdMQU5fSUVfUlNOICAgICAgICAgICAgcFJTTjsKKyAgICBQV0xBTl9JRV9SU05fRVhUICAgICAgICBwUlNOV1BBOworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgICAgIHBFeHRTdXBwUmF0ZXM7CisKK30gV0xBTl9GUl9SRUFTU09DUkVRLCAqUFdMQU5fRlJfUkVBU1NPQ1JFUTsKKworLy8gUmVhc3NvY2lhdGlvbiBSZXNwb25zZQordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl9GUl9SRUFTU09DUkVTUCB7CisKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1VHlwZTsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICBsZW47CisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgcEJ1ZjsKKyAgICBQVVdMQU5fODAyMTFIRFIgICAgICAgICBwSGRyOworICAgIC8qLS0gZml4ZWQgZmllbGRzIC0tLS0tLS0tLS0tKi8KKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0NhcEluZm87CisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdTdGF0dXM7CisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdBaWQ7CisgICAgLyotLSBpbm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UkQgICAgICAgICAgICAgICAgICBwcXdUaW1lc3RhbXA7CisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdCZWFjb25JbnRlcnZhbDsKKyAgICBQV09SRCAgICAgICAgICAgICAgICAgICBwd0NhcEluZm87CisgICAgLyotLSBpbmZvIGVsZW1lbnRzIC0tLS0tLS0tLS0qLworICAgIFBXTEFOX0lFX1NTSUQgICAgICAgICAgIHBTU0lEOworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgICAgIHBTdXBwUmF0ZXM7CisgICAgUFdMQU5fSUVfRFNfUEFSTVMgICAgICAgcERTUGFybXM7CisgICAgUFdMQU5fSUVfQ0ZfUEFSTVMgICAgICAgcENGUGFybXM7CisgICAgUFdMQU5fSUVfSUJTU19QQVJNUyAgICAgcElCU1NQYXJtczsKKyAgICBQV0xBTl9JRV9SU04gICAgICAgICAgICBwUlNOOworICAgIFBXTEFOX0lFX1JTTl9FWFQgICAgICAgIHBSU05XUEE7CisgICAgUFdMQU5fSUVfRVJQICAgICAgICAgICAgcEVSUDsKKyAgICBQV0xBTl9JRV9TVVBQX1JBVEVTICAgICBwRXh0U3VwcFJhdGVzOworICAgIFBXTEFOX0lFX0NPVU5UUlkgICAgICAgIHBJRV9Db3VudHJ5OworICAgIFBXTEFOX0lFX1BXX0NPTlNUICAgICAgIHBJRV9Qb3dlckNvbnN0cmFpbnQ7CisgICAgUFdMQU5fSUVfQ0hfU1cgICAgICAgICAgcElFX0NIU1c7CisgICAgUFdMQU5fSUVfSUJTU19ERlMgICAgICAgcElFX0lCU1NERlM7CisgICAgUFdMQU5fSUVfUVVJRVQgICAgICAgICAgcElFX1F1aWV0OworCit9IFdMQU5fRlJfUFJPQkVSRVNQLCAqUFdMQU5fRlJfUFJPQkVSRVNQOworCisvLyBBdXRoZW50aWNhdGlvbgordHlwZWRlZiBzdHJ1Y3QgdGFnV0xBTl9GUl9BVVRIRU4geworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdVR5cGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgbGVuOworICAgIFBCWVRFICAgICAgICAgICAgICAgICAgIHBCdWY7CisgICAgUFVXTEFOXzgwMjExSERSICAgICAgICAgcEhkcjsKKyAgICAvKi0tIGZpeGVkIGZpZWxkcyAtLS0tLS0tLS0tLSovCisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdBdXRoQWxnb3JpdGhtOworICAgIFBXT1JEICAgICAgICAgICAgICAgICAgIHB3QXV0aFNlcXVlbmNlOworICAgIFBXT1JEICAgICAgICAgICAgICAgICAgIHB3U3RhdHVzOworICAgIC8qLS0gaW5mbyBlbGVtZW50cyAtLS0tLS0tLS0tKi8KKyAgICBQV0xBTl9JRV9DSEFMTEVOR0UgICAgICBwQ2hhbGxlbmdlOworCit9IFdMQU5fRlJfQVVUSEVOLCAqUFdMQU5fRlJfQVVUSEVOOworCisvLyBEZWF1dGhlbmljYXRpb24KK3R5cGVkZWYgc3RydWN0IHRhZ1dMQU5fRlJfREVBVVRIRU4geworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdVR5cGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgbGVuOworICAgIFBCWVRFICAgICAgICAgICAgICAgICAgIHBCdWY7CisgICAgUFVXTEFOXzgwMjExSERSICAgICAgICAgcEhkcjsKKyAgICAvKi0tIGZpeGVkIGZpZWxkcyAtLS0tLS0tLS0tLSovCisgICAgUFdPUkQgICAgICAgICAgICAgICAgICAgcHdSZWFzb247CisKKyAgICAvKi0tIGluZm8gZWxlbWVudHMgLS0tLS0tLS0tLSovCisKK30gV0xBTl9GUl9ERUFVVEhFTiwgKlBXTEFOX0ZSX0RFQVVUSEVOOworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworVk9JRAordk1nckVuY29kZUJlYWNvbigKKyAgICBJTiAgUFdMQU5fRl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VmaW5pdGlvbnMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCitzdGF0aWMgaW50ICAgICAgICAgIG1zZ2xldmVsICAgICAgICAgICAgICAgID1NU0dfTEVWRUxfSU5GTzsKKworI3ByYWdtYSBwYWNrKDEpCisKK3R5cGVkZWYgc3RydWN0IF9XTEFOX0ZSQU1FX0FDVElPTiB7CisgICAgV0xBTl84MDIxMUhEUl9BMyAgICBIZWFkZXI7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNhdGVnb3J5OworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlBY3Rpb247CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlWYXJzWzFdOworfSBXTEFOX0ZSQU1FX0FDVElPTiwgKlBXTEFOX0ZSQU1FX0FDVElPTjsKKwordHlwZWRlZiBzdHJ1Y3QgX1dMQU5fRlJBTUVfTVNSUkVRIHsKKyAgICBXTEFOXzgwMjExSERSX0EzICAgIEhlYWRlcjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5Q2F0ZWdvcnk7CisgICAgQllURSAgICAgICAgICAgICAgICBieUFjdGlvbjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RGlhbG9nVG9rZW47CisgICAgV0xBTl9JRV9NRUFTVVJFX1JFUSBzTVNSUmVxRUlEc1sxXTsKK30gV0xBTl9GUkFNRV9NU1JSRVEsICpQV0xBTl9GUkFNRV9NU1JSRVE7CisKK3R5cGVkZWYgc3RydWN0IF9XTEFOX0ZSQU1FX01TUlJFUCB7CisgICAgV0xBTl84MDIxMUhEUl9BMyAgICBIZWFkZXI7CisgICAgQllURSAgICAgICAgICAgICAgICBieUNhdGVnb3J5OworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlBY3Rpb247CisgICAgQllURSAgICAgICAgICAgICAgICBieURpYWxvZ1Rva2VuOworICAgIFdMQU5fSUVfTUVBU1VSRV9SRVAgc01TUlJlcEVJRHNbMV07Cit9IFdMQU5fRlJBTUVfTVNSUk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ICAgICAgICAgICAgICAgICAgICAgICAgdU51bU9mRUlEcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIHJldHVybiAoYlJlc3VsdCk7Cit9CisKKworc3RhdGljIEJPT0wgc19iUnhUUENSZXEoUFNNZ210T2JqZWN0IHBNZ210LCBQV0xBTl9GUkFNRV9UUENSRVEgcFRQQ1JlcSwgQllURSBieVJhdGUsIEJZVEUgYnlSU1NJKQoreworICAgIFBXTEFOX0ZSQU1FX1RQQ1JFUCAgcEZyYW1lOworICAgIFBTVHhNZ210UGFja2V0ICAgICAgcFR4UGFja2V0ID0gTlVMTDsKKworCisgICAgcFR4UGFja2V0ID0gKFBTVHhNZ210UGFja2V0KXBNZ210LT5wYnlNZ210UGFja2V0UG9vbDsKKyAgICBtZW1zZXQocFR4UGFja2V0LCAwLCBzaXplb2YoU1R4TWdtdFBhY2tldCkgKyBXTEFOX0EzRlJfTUFYTEVOKTsKKyAgICBwVHhQYWNrZXQtPnA4MDIxMUhlYWRlciA9IChQVVdMQU5fODAyMTFIRFIpKChQQllURSlwVHhQYWNrZXQgKyBzaXplb2YoU1R4TWdtdFBhY2tldCkpOworCisgICAgcEZyYW1lID0gKFBXTEFOX0ZSQU1FX1RQQ1JFUCkoKFBCWVRFKXBUeFBhY2tldCArIHNpemVvZihTVHhNZ210UGFja2V0KSk7CisKKyAgICBwRnJhbWUtPkhlYWRlci53RnJhbWVDdGwgPSAoICAgV0xBTl9TRVRfRkNfRlRZUEUoV0xBTl9GVFlQRV9NR01UKSB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXTEFOX1NFVF9GQ19GU1RZUEUoV0xBTl9GU1RZUEVfQUNUSU9OKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworCisgICAgTUVNdkNvcHkoIHBGcmFtZS0+SGVhZGVyLmFieUFkZHIxLCBwVFBDUmVxLT5IZWFkZXIuYWJ5QWRkcjIsIFdMQU5fQUREUl9MRU4pOworICAgI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gICAgICAgIGNhc2UgUkFURV8yNE06CisgICAgICAgICAgICBwRnJhbWUtPnNUUENSZXBFSURzLmJ5TGlua01hcmdpbiA9IDc0IC0gYnlSU1NJOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgUkFURV8xOE06CisgICAgICAgICAgICBwRnJhbWUtPnNUUENSZXBFSURzLmJ5TGlua01hcmdpbiA9IDc3IC0gYnlSU1NJOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgUkFURV8xMk06CisgICAgICAgICAgICBwRnJhbWUtPnNUUENSZXBFSURzLmJ5TGlua01hcmdpbiA9IDc5IC0gYnlSU1NJOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgUkFURV85TToKKyAgICAgICAgICAgIHBGcmFtZS0+c1RQQ1JlcEVJRHMuYnlMaW5rTWFyZ2luID0gODEgLSBieVJTU0k7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBSQVRFXzZNOgorICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgcEZyYW1lLT5zVFBDUmVwRUlEcy5ieUxpbmtNYXJnaW4gPSA4MiAtIGJ5UlNTSTsKKyAgICAgICAgICAgIGJyZWFrOworICAgIH0KKworICAgIHBUeFBhY2tldC0+Y2JNUERVTGVuID0gc2l6ZW9mKFdMQU5fRlJBTUVfVFBDUkVQKTsKKyAgICBwVHhQYWNrZXQtPmNiUGF5bG9hZExlbiA9IHNpemVvZihXTEFOX0ZSQU1FX1RQQ1JFUCkgLSBXTEFOX0hEUl9BRERSM19MRU47CisgICAgaWYgKGNzTWdtdF94bWl0KHBNZ210LT5wQWRhcHRlciwgcFR4UGFja2V0KSAhPSBDTURfU1RBVFVTX1BFTkRJTkcpCisgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgIHJldHVybiAoVFJVRSk7CisvLyAgICByZXR1cm4gKENBUkRiU2VuZFBhY2tldChwTWdtdC0+cEFkYXB0ZXIsIHBGcmFtZSwgUEtUX1RZUEVfODAyXzExX01ORywgc2l6ZW9mKFdMQU5fRlJBTUVfVFBDUkVQKSkpOworCit9CisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBWYXJpYWJsZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgSGFuZGxlcyBhY3Rpb24gbWFuYWdlbWVudCBmcmFtZXMuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcE1nbXQgICAgICAgICAgIC0gTWFuYWdlbWVudCBPYmplY3Qgc3RydWN0dXJlCisgKiAgICAgIHBSeFBhY2tldCAgICAgICAtIFJlY2VpdmVkIHBhY2tldAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogTm9uZS4KKyAqCistKi8KK0JPT0wKK0lFRUUxMWhiTWdyUnhBY3Rpb24gKAorICAgIElOIFBWT0lEIHBNZ210SGFuZGxlLAorICAgIElOIFBWT0lEIHBSeFBhY2tldAorICAgICkKK3sKKyAgICBQU01nbXRPYmplY3QgICAgICAgICAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpIHBNZ210SGFuZGxlOworICAgIFBXTEFOX0ZSQU1FX0FDVElPTiAgICAgIHBBY3Rpb24gPSBOVUxMOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVMZW5ndGggPSAwOworICAgIFBXTEFOX0lFX0NIX1NXICAgICAgICAgIHBDaGFubmVsU3dpdGNoID0gTlVMTDsKKworCisgICAgLy8gZGVjb2RlIHRoZSBmcmFtZQorICAgIHVMZW5ndGggPSAoKFBTUnhNZ210UGFja2V0KXBSeFBhY2tldCktPmNiTVBEVUxlbjsKKyAgICBpZiAodUxlbmd0aCA+IFdMQU5fQTNGUl9NQVhMRU4pIHsKKyAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgfQorCisKKyAgICBwQWN0aW9uID0gKFBXTEFOX0ZSQU1FX0FDVElPTikgKCgoUFNSeE1nbXRQYWNrZXQpcFJ4UGFja2V0KS0+cDgwMjExSGVhZGVyKTsKKworICAgIGlmIChwQWN0aW9uLT5ieUNhdGVnb3J5ID09IDApIHsKKyAgICAgICAgc3dpdGNoIChwQWN0aW9uLT5ieUFjdGlvbikgeworICAgICAgICAgICAgY2FzZSBBQ1RJT05fTVNSUkVROgorICAgICAgICAgICAgICAgIHJldHVybiAoc19iUnhNU1JSZXEocE1nbXQsIChQV0xBTl9GUkFNRV9NU1JSRVEpIHBBY3Rpb24sIHVMZW5ndGgpKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgQUNUSU9OX01TUlJFUDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgQUNUSU9OX1RQQ1JFUToKKyAgICAgICAgICAgICAgICByZXR1cm4gKHNfYlJ4VFBDUmVxKHBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0ZSQU1FX1RQQ1JFUSkgcEFjdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoUFNSeE1nbXRQYWNrZXQpcFJ4UGFja2V0KS0+YnlSeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoQllURSkgKChQU1J4TWdtdFBhY2tldClwUnhQYWNrZXQpLT51UlNTSSkpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBBQ1RJT05fVFBDUkVQOgorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBBQ1RJT05fQ0hTVzoKKyAgICAgICAgICAgICAgICBwQ2hhbm5lbFN3aXRjaCA9IChQV0xBTl9JRV9DSF9TVykgKHBBY3Rpb24tPmFieVZhcnMpOworICAgICAgICAgICAgICAgIGlmICgocENoYW5uZWxTd2l0Y2gtPmJ5RWxlbWVudElEID09IFdMQU5fRUlEX0NIX1NXSVRDSCkgJiYKKyAgICAgICAgICAgICAgICAgICAgKHBDaGFubmVsU3dpdGNoLT5sZW4gPT0gMykpIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gdmFsaWQgZWxlbWVudCBpZAorICAgICAgICAgICAgICAgICAgICBDQVJEYkNoYW5uZWxTd2l0Y2goIHBNZ210LT5wQWRhcHRlciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQ2hhbm5lbFN3aXRjaC0+YnlNb2RlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENBUkRieUdldENoYW5uZWxNYXBwaW5nKHBNZ210LT5wQWRhcHRlciwgcENoYW5uZWxTd2l0Y2gtPmJ5Q2hhbm5lbCwgcE1nbXQtPmVDdXJyZW50UEhZTW9kZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcENoYW5uZWxTd2l0Y2gtPmJ5Q291bnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJVbmtub3duIEFjdGlvbiA9ICVkXG4iLCBwQWN0aW9uLT5ieUFjdGlvbik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9IGVsc2UgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlVua25vd24gQ2F0ZWdvcnkgPSAlZFxuIiwgcEFjdGlvbi0+YnlDYXRlZ29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gY2xlYW4KKworCisjIGxvb2sgZm9yIFNNUCBpbiBjb25maWcuaAorU01QIDo9ICQoc2hlbGwgJChDQykgJChDRkxBR1MpIC1FIC1kTSAkKENPTkZJR19GSUxFKSB8IFwKKyAgICAgICAgIGdyZXAgQ09ORklHX1NNUCB8IGF3ayAneyBwcmludCAkJDMgfScpCisKK2lmbmVxICgkKFNNUCksMSkKKyAgU01QIDo9IDAKK2VuZGlmCisKKworaWZlcSAoJChTTVApLCAxKQorICBDRkxBR1MgKz0gLURfX1NNUF9fCitlbmRpZgorCisKK2lmZXEgKCQoUFJJVl9PQkopLCAxKQorICBDRkxBR1MgKz0gLURQUklWQVRFX09CSgorICBUQVJHRVQgPSB4ODZnX3VwLm8KKworaWZlcSAoJChTTVApLCAxKQorICBUQVJHRVQgPSB4ODZnX3NtcC5vCitlbmRpZgorCitlbmRpZgorCisKKyMgY2hlY2sgeDg2XzY0CitTVUJBUkNIIDo9ICQoc2hlbGwgdW5hbWUgLW0pCitpZmVxICgkKFNVQkFSQ0gpLHg4Nl82NCkKKyAgICBDRkxBR1MgKz0gLW1jbW9kZWw9a2VybmVsIC1tbm8tcmVkLXpvbmUKK2VuZGlmCisKKworJChUQVJHRVQpOiAkKGZpbHRlci1vdXQgJChUQVJHRVQpLCAkKFNSQzouYz0ubykpCisJJChMRCkgLXIgJF4gLW8gJEAKKwllY2hvOyBlY2hvCisJZWNobyAiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioiCisJZWNobyAiQnVpbGQgb3B0aW9uczoiCisJZWNobyAiICAgVkVSU0lPTiAgICAkKEtWRVIpIgorCWVjaG8gLW4gIiAgIFNNUCAgICAgICAgICAgICAiCisJaWYgWyAiJChTTVApIiA9ICIxIiBdOyBcCisJCXRoZW4gZWNobyAiRW5hYmxlZCI7IGVsc2UgZWNobyAiRGlzYWJsZWQiOyBmaQorCisKKworZW5kaWYgIyBpZmVxICgkKEtWRVIpLDIuNikKKworCitpZmVxIC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RyQSsrKSBeICgqZHdQdHJCKyspOworICAgICgqZHdQdHJPdXQrKykgPSAoKmR3UHRyQSsrKSBeICgqZHdQdHJCKyspOworICAgICgqZHdQdHJPdXQrKykgPSAoKmR3UHRyQSsrKSBeICgqZHdQdHJCKyspOworICAgICgqZHdQdHJPdXQrKykgPSAoKmR3UHRyQSsrKSBeICgqZHdQdHJCKyspOworfQorCisKK3ZvaWQgeG9yXzMyKEJZVEUgKmEsIEJZVEUgKmIsIEJZVEUgKm91dCkKK3sKK1BEV09SRCBkd1B0ckEgPSAoUERXT1JEKSBhOworUERXT1JEIGR3UHRyQiA9IChQRFdPUkQpIGI7CitQRFdPUkQgZHdQdHJPdXQgPShQRFdPUkQpIG91dDsKKworICAgICgqZHdQdHJPdXQrKykgPSAoKmR3UHRyQSsrKSBeICgqZHdQdHJCKyspOworfQorCit2b2lkIEFkZFJvdW5kS2V5KEJZVEUgKmtleSwgaW50IHJvdW5kKQoreworQllURSBzYm94X2tleVs0XTsKK0JZVEUgcmNvbl90YWJsZVsxMF0gPSB7IDB4MDEsIDB4MDIsIDB4MDQsIDB4MDgsIDB4MTAsIDB4MjAsIDB4NDAsIDB4ODAsIDB4MWIsIDB4MzZ9OworCisgICAgc2JveF9rZXlbMF0gPSBzYm94X3RhYmxlW2tleVsxM11dOworICAgIHNib3hfa2V5WzFdID0gc2JveF90YWJsZVtrZXlbMTRdXTsKKyAgICBzYm94X2tleVsyXSA9IHNib3hfdGFibGVba2V5WzE1XV07CisgICAgc2JveF9rZXlbM10gPSBzYm94X3RhYmxlW2tleVsxMl1dOworCisgICAga2V5WzBdID0ga2V5WzBdIF4gcmNvbl90YWJsZVtyb3VuZF07CisgICAgeG9yXzMyKCZrZXlbMF0sIHNib3hfa2V5LCAma2V5WzBdKTsKKworICAgIHhvcl8zMigma2V5WzRdLCAma2V5WzBdLCAma2V5WzRdKTsKKyAgICB4b3JfMzIoJmtleVs4XSwgJmtleVs0XSwgJmtleVs4XSk7CisgICAgeG9yXzMyKCZrZXlbMTJdLCAma2V5WzhdLCAma2V5WzEyXSk7Cit9CisKK3ZvaWQgU3ViQnl0ZXMoQllURSAqaW4sIEJZVEUgKm91dCkKK3sKK2ludCBpOworCisgICAgZm9yIChpPTA7IGk8IDE2OyBpKyspCisgICAgeworICAgICAgICBvdXRbaV0gPSBzYm94X3RhYmxlW2luW2ldXTsKKyAgICB9Cit9CisKK3ZvaWQgU2hpZnRSb3dzKEJZVEUgKmluLCBCWVRFICpvdXQpCit7CisgICAgb3V0WzBdICA9IGluWzBdOworICAgIG91dFsxXSAgPSBpbls1XTsKKyAgICBvdXRbMl0gID0gaW5bMTBdOworICAgIG91dFszXSAgPSBpblsxNV07CisgICAgb3V0WzRdICA9IGluWzRdOworICAgIG91dFs1XSAgPSBpbls5XTsKKyAgICBvdXRbNl0gID0gaW5bMTRdOworICAgIG91dFs3XSAgPSBpblszXTsKKyAgICBvdXRbOF0gID0gaW5bOF07CisgICAgb3V0WzldICA9IGluWzEzXTsKKyAgICBvdXRbMTBdID0gaW5bMl07CisgICAgb3V0WzExXSA9IGluWzddOworICAgIG91dFsxMl0gPSBpblsxMl07CisgICAgb3V0WzEzXSA9IGluWzFdOworICAgIG91dFsxNF0gPSBpbls2XTsKKyAgICBvdXRbMTVdID0gaW5bMTFdOworfQorCit2b2lkIE1peENvbHVtbnMoQllURSAqaW4sIEJZVEUgKm91dCkKK3sKKworICAgIG91dFswXSA9IGRvdDJfdGFibGVbaW5bMF1dIF4gZG90M190YWJsZVtpblsxXV0gXiBpblsyXSBeIGluWzNdOworICAgIG91dFsxXSA9IGluWzBdIF4gZG90Ml90YWJsZVtpblsxXV0gXiBkb3QzX3RhYmxlW2luWzJdXSBeIGluWzNdOworICAgIG91dFsyXSA9IGluWzBdIF4gaW5bMV0gXiBkb3QyX3RhYmxlW2luWzJdXSBeIGRvdDNfdGFibGVbaW5bM11dOworICAgIG91dFszXSA9IGRvdDNfdGFibGVbaW5bMF1dIF4gaW5bMV0gXiBpblsyXSBeIGRvdDJfdGFibGVbaW5bM11dOworfQorCisKK3ZvaWQgQUVTdjEyOChCWVRFICprZXksIEJZVEUgKmRhdGEsIEJZVEUgKmNpcGhlcnRleHQpCit7CitpbnQgIGk7CitpbnQgIHJvdW5kOworQllURSBUbXBkYXRhQVsxNl07CitCWVRFIFRtcGRhdGFCWzE2XTsKK0JZVEUgYWJ5Um91bmRLZXlbMTZdOworCisgICAgZm9yKGk9MDsgaTwxNjsgaSsrKQorICAgICAgICBhYnlSb3VuZEtleVtpXSA9IGtleVtpXTsKKworICAgIGZvciAocm91bmQgPSAwOyByb3VuZCA8IDExOyByb3VuZCsrKQorICAgIHsKKyAgICAgICAgaWYgKHJvdW5kID09IDApCisgICAgICAgIHsKKyAgICAgICAgICAgIHhvcl8xMjgoYWJ5Um91bmRLZXksIGRhdGEsIGNpcGhlcnRleHQpOworICAgICAgICAgICAgQWRkUm91bmRLZXkoYWJ5Um91bmRLZXksIHJvdW5kKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChyb3VuZCA9PSAxMCkKKyAgICAgICAgeworICAgICAgICAgICAgU3ViQnl0ZXMoY2lwaGVydGV4dCwgVG1wZGF0YUEpOworICAgICAgICAgICAgU2hpZnRSb3dzKFRtcGRhdGFBLCBUbXBkYXRhQik7CisgICAgICAgICAgICB4b3JfMTI4KFRtcGRhdGFCLCBhYnlSb3VuZEtleSwgY2lwaGVydGV4dCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSAvLyByb3VuZCAxIH4gOQorICAgICAgICB7CisgICAgICAgICAgICBTdWJCeXRlcyhjaXBoZXJ0ZXh0LCBUbXBkYXRhQSk7CisgICAgICAgICAgICBTaGlmdFJvd3MoVG1wZGF0YUEsIFRtcGRhdGFCKTsKKyAgICAgICAgICAgIE1peENvbHVtbnMoJlRtcGRhdGFCWzBdLCAmVG1wZGF0YUFbMF0pOworICAgICAgICAgICAgTWl4Q29sdW1ucygmVG1wZGF0YUJbNF0sICZUbXBkYXRhQVs0XSk7CisgICAgICAgICAgICBNaXhDb2x1bW5zKCZUbXBkYXRhQls4XSwgJlRtcGRhdGFBWzhdKTsKKyAgICAgICAgICAgIE1peENvbHVtbnMoJlRtcGRhdGFCWzEyXSwgJlRtcGRhdGFBWzEyXSk7CisgICAgICAgICAgICB4b3JfMTI4KFRtcGRhdGFBLCBhYnlSb3VuZEtleSwgY2lwaGVydGV4dCk7CisgICAgICAgICAgICBBZGRSb3VuZEtleShhYnlSb3VuZEtleSwgcm91bmQpOworICAgICAgICB9CisgICAgfQorCit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjogQUVTIGRlY3J5cHRpb24KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwYnlSeEtleSAgICAgICAgICAgIC0gVGhlIGtleSB1c2VkIHRvIGRlY3J5cHQKKyAqICAgICAgcGJ5RnJhbWUgICAgICAgICAgICAtIFN0YXJ0aW5nIGFkZHJlc3Mgb2YgcGFja2V0IGhlYWRlcgorICogICAgICB3RnJhbWVTaXplICAgICAgICAgIC0gVG90YWwgcGFja2V0IHNpemUgaW5jbHVkaW5nIENSQworICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogTUlDIGNvbXBhcmUgcmVzdWx0CisgKgorICovCitCT09MIEFFU2JHZW5DQ01QKFBCWVRFIHBieVJ4S2V5LCBQQllURSBwYnlGcmFtZSwgV09SRCB3RnJhbWVTaXplKQoreworQllURSAgICAgICAgICAgIGFieU5vbmNlWzEzXTsKK0JZVEUgICAgICAgICAgICBNSUNfSVZbMTZdOworQllURSAgICAgICAgICAgIE1JQ19IRFIxWzE2XTsKK0JZVEUgICAgICAgICAgICBNSUNfSERSMlsxNl07CitCWVRFICAgICAgICAgICAgYWJ5TUlDWzE2XTsKK0JZVEUgICAgICAgICAgICBhYnlDVFJQTERbMTZdOworQllURSAgICAgICAgICAgIGFieVRtcFsxNl07CitCWVRFICAgICAgICAgICAgYWJ5UGxhaW5UZXh0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gIE1FTXZDb3B5KCYoTUlDX0hEUjJbMF0pLCBwTUFDSGVhZGVyLT5hYnlBZGRyMywgVV9FVEhFUl9BRERSX0xFTik7CisgICAgYnlUbXAgPSAoQllURSkocE1BQ0hlYWRlci0+d1NlcUN0bCAmIDB4ZmYpOworICAgIE1JQ19IRFIyWzZdID0gYnlUbXAgJiAweDBmOworICAgIE1JQ19IRFIyWzddID0gMDsKKyAgICBpZiAoIGJBNCApIHsKKyAgICAgICAgTUVNdkNvcHkoJihNSUNfSERSMls4XSksIHBNQUNIZWFkZXItPmFieUFkZHI0LCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICB9IGVsc2UgeworICAgICAgICBNSUNfSERSMls4XSAgPSAweDAwOworICAgICAgICBNSUNfSERSMls5XSAgPSAweDAwOworICAgICAgICBNSUNfSERSMlsxMF0gPSAweDAwOworICAgICAgICBNSUNfSERSMlsxMV0gPSAweDAwOworICAgICAgICBNSUNfSERSMlsxMl0gPSAweDAwOworICAgICAgICBNSUNfSERSMlsxM10gPSAweDAwOworICAgIH0KKyAgICBNSUNfSERSMlsxNF0gPSAweDAwOworICAgIE1JQ19IRFIyWzE1XSA9IDB4MDA7CisKKyAgICAvL0NDTVAKKyAgICBBRVN2MTI4KHBieVJ4S2V5LE1JQ19JVixhYnlNSUMpOworICAgIGZvciAoIGtrPTA7IGtrPDE2OyBraysrICkgeworICAgICAgICBhYnlUbXBba2tdID0gTUlDX0hEUjFba2tdIF4gYWJ5TUlDW2trXTsKKyAgICB9CisgICAgQUVTdjEyOChwYnlSeEtleSxhYnlUbXAsYWJ5TUlDKTsKKyAgICBmb3IgKCBraz0wOyBrazwxNjsga2srKyApIHsKKyAgICAgICAgYWJ5VG1wW2trXSA9IE1JQ19IRFIyW2trXSBeIGFieU1JQ1tra107CisgICAgfQorICAgIEFFU3YxMjgocGJ5UnhLZXksYWJ5VG1wLGFieU1JQyk7CisKKyAgICB3Q250ID0gMTsKKyAgICBhYnlDVFJQTERbMF0gPSAweDAxOworICAgIE1FTXZDb3B5KCYoYWJ5Q1RSUExEWzFdKSwgJihhYnlOb25jZVswXSksIDEzKTsKKworICAgIGZvcihqaj13UGF5bG9hZFNpemU7IGpqPjE2OyBqaj1qai0xNikgeworCisgICAgICAgIGFieUNUUlBMRFsxNF0gPSAoQllURSkgKHdDbnQgPj4gOCk7CisgICAgICAgIGFieUNUUlBMRFsxNV0gPSAoQllURSkgKHdDbnQgJiAweGZmKTsKKworICAgICAgICBBRVN2MTI4KHBieVJ4S2V5LGFieUNUUlBMRCxhYnlUbXApOworCisgICAgICAgIGZvciAoIGtrPTA7IGtrPDE2OyBraysrICkgeworICAgICAgICAgICAgYWJ5UGxhaW5UZXh0W2trXSA9IGFieVRtcFtra10gXiBwYnlQYXlsb2FkW2trXTsKKyAgICAgICAgfQorICAgICAgICBmb3IgKCBraz0wOyBrazwxNjsga2srKyApIHsKKyAgICAgICAgICAgIGFieVRtcFtra10gPSBhYnlNSUNba2tdIF4gYWJ5UGxhaW5UZXh0W2trXTsKKyAgICAgICAgfQorICAgICAgICBBRVN2MTI4KHBieVJ4S2V5LGFieVRtcCxhYnlNSUMpOworCisgICAgICAgIE1FTXZDb3B5KHBieVBheWxvYWQsIGFieVBsYWluVGV4dCwgMTYpOworICAgICAgICB3Q250Kys7CisgICAgICAgIHBieVBheWxvYWQgKz0gMTY7CisgICAgfSAvL2ZvciB3UGF5bG9hZFNpemUKKworICAgIC8vbGFzdCBwYXlsb2FkCisgICAgTUVNdkNvcHkoJihhYnlMYXN0Q2lwaGVyWzBdKSwgcGJ5UGF5bG9hZCwgamopOworICAgIGZvciAoIGlpPWpqOyBpaTwxNjsgaWkrKyApIHsKKyAgICAgICAgYWJ5TGFzdENpcGhlcltpaV0gPSAweDAwOworICAgIH0KKworICAgIGFieUNUUlBMRFsxNF0gPSAoQllURSkgKHdDbnQgPj4gOCk7CisgICAgYWJ5Q1RSUExEWzE1XSA9IChCWVRFKSAod0NudCAmIDB4ZmYpOworCisgICAgQUVTdj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4MDB9LAorICAgIHsweDA1LCAweDAwfSwKKyAgICB7MHgwNiwgMHgwMH0sCisgICAgezB4MDcsIDB4MDB9LAorICAgIHsweDA4LCAweDcwfSwKKyAgICB7MHgwOSwgMHg0NX0sCisgICAgezB4MGEsIDB4MmF9LAorICAgIHsweDBiLCAweDc2fSwKKyAgICB7MHgwYywgMHgwMH0sCisgICAgezB4MGQsIDB4MDF9LAorICAgIHsweDBlLCAweDgwfSwKKyAgICB7MHgwZiwgMHgwMH0sCisgICAgezB4MTAsIDB4MDB9LAorICAgIHsweDExLCAweDAwfSwKKyAgICB7MHgxMiwgMHgwMH0sCisgICAgezB4MTMsIDB4MDB9LAorICAgIHsweDE0LCAweDAwfSwKKyAgICB7MHgxNSwgMHgwMH0sCisgICAgezB4MTYsIDB4MDB9LAorICAgIHsweDE3LCAweDAwfSwKKyAgICB7MHgxOCwgMHgwMH0sCisgICAgezB4MTksIDB4MDB9LAorICAgIHsweDFhLCAweDAwfSwKKyAgICB7MHgxYiwgMHg5ZH0sCisgICAgezB4MWMsIDB4MDV9LAorICAgIHsweDFkLCAweDAwfSwKKyAgICB7MHgxZSwgMHgwMH0sCisgICAgezB4MWYsIDB4MDB9LAorICAgIHsweDIwLCAweDAwfSwKKyAgICB7MHgyMSwgMHgwMH0sCisgICAgezB4MjIsIDB4MDB9LAorICAgIHsweDIzLCAweDAwfSwKKyAgICB7MHgyNCwgMHgwMH0sCisgICAgezB4MjUsIDB4NGF9LAorICAgIHsweDI2LCAweDAwfSwKKyAgICB7MHgyNywgMHgwMH0sCisgICAgezB4MjgsIDB4MDB9LAorICAgIHsweDI5LCAweDAwfSwKKyAgICB7MHgyYSwgMHgwMH0sCisgICAgezB4MmIsIDB4MDB9LAorICAgIHsweDJjLCAweDAwfSwKKyAgICB7MHgyZCwgMHhhOH0sCisgICAgezB4MmUsIDB4MWF9LAorICAgIHsweDJmLCAweDBjfSwKKyAgICB7MHgzMCwgMHgyNn0sCisgICAgezB4MzEsIDB4NWJ9LAorICAgIHsweDMyLCAweDAwfSwKKyAgICB7MHgzMywgMHgwMH0sCisgICAgezB4MzQsIDB4MDB9LAorICAgIHsweDM1LCAweDAwfSwKKyAgICB7MHgzNiwgMHhhYX0sCisgICAgezB4MzcsIDB4YWF9LAorICAgIHsweDM4LCAweGZmfSwKKyAgICB7MHgzOSwgMHhmZn0sCisgICAgezB4M2EsIDB4MDB9LAorICAgIHsweDNiLCAweDAwfSwKKyAgICB7MHgzYywgMHgwMH0sCisgICAgezB4M2QsIDB4MGR9LAorICAgIHsweDNlLCAweDUxfSwKKyAgICB7MHgzZiwgMHgwNH0sCisgICAgezB4NDAsIDB4MDB9LAorICAgIHsweDQxLCAweDA4fSwKKyAgICB7MHg0MiwgMHgwMH0sCisgICAgezB4NDMsIDB4MDh9LAorICAgIHsweDQ0LCAweDA2fSwKKyAgICB7MHg0NSwgMHgxNH0sCisgICAgezB4NDYsIDB4MDV9LAorICAgIHsweDQ3LCAweDA4fSwKKyAgICB7MHg0OCwgMHgwMH0sCisgICAgezB4NDksIDB4MDB9LAorICAgIHsweDRhLCAweDAwfSwKKyAgICB7MHg0YiwgMHgwMH0sCisgICAgezB4NGMsIDB4MDl9LAorICAgIHsweDRkLCAweDgwfSwKKyAgICB7MHg0ZSwgMHgwMH0sCisgICAgezB4NGYsIDB4YzV9LAorICAgIHsweDUwLCAweDE0fSwKKyAgICB7MHg1MSwgMHgxOX0sCisgICAgezB4NTIsIDB4MDB9LAorICAgIHsweDUzLCAweDAwfSwKKyAgICB7MHg1NCwgMHgwMH0sCisgICAgezB4NTUsIDB4MDB9LAorICAgIHsweDU2LCAweDAwfSwKKyAgICB7MHg1NywgMHgwMH0sCisgICAgezB4NTgsIDB4MDB9LAorICAgIHsweDU5LCAweGIwfSwKKyAgICB7MHg1YSwgMHgwMH0sCisgICAgezB4NWIsIDB4MDB9LAorICAgIHsweDVjLCAweDAwfSwKKyAgICB7MHg1ZCwgMHgwMH0sCisgICAgezB4NWUsIDB4MDB9LAorICAgIHsweDVmLCAweDAwfSwKKyAgICB7MHg2MCwgMHg0NH0sCisgICAgezB4NjEsIDB4MDR9LAorICAgIHsweDYyLCAweDAwfSwKKyAgICB7MHg2MywgMHgwMH0sCisgICAgezB4NjQsIDB4MDB9LAorICAgIHsweDY1LCAweDAwfSwKKyAgICB7MHg2NiwgMHgwNH0sCisgICAgezB4NjcsIDB4Yjd9LAorICAgIHsweDY4LCAweDAwfSwKKyAgICB7MHg2OSwgMHgwMH0sCisgICAgezB4NmEsIDB4MDB9LAorICAgIHsweDZiLCAweDAwfSwKKyAgICB7MHg2YywgMHgwMH0sCisgICAgezB4NmQsIDB4MDN9LAorICAgIHsweDZlLCAweDAxfSwKKyAgICB7MHg2ZiwgMHgwMH0sCisgICAgezB4NzAsIDB4MDB9LAorICAgIHsweDcxLCAweDAwfSwKKyAgICB7MHg3MiwgMHgwMH0sCisgICAgezB4NzMsIDB4MDB9LAorICAgIHsweDc0LCAweDAwfSwKKyAgICB7MHg3NSwgMHgwMH0sCisgICAgezB4NzYsIDB4MDB9LAorICAgIHsweDc3LCAweDAwfSwKKyAgICB7MHg3OCwgMHgwMH0sCisgICAgezB4NzksIDB4MDB9LAorICAgIHsweDdhLCAweDAwfSwKKyAgICB7MHg3YiwgMHgwMH0sCisgICAgezB4N2MsIDB4MDB9LAorICAgIHsweDdkLCAweDAwfSwKKyAgICB7MHg3ZSwgMHgwMH0sCisgICAgezB4N2YsIDB4MDB9LAorICAgIHsweDgwLCAweDBifSwKKyAgICB7MHg4MSwgMHgwMH0sCisgICAgezB4ODIsIDB4M2N9LAorICAgIHsweDgzLCAweDAwfSwKKyAgICB7MHg4NCwgMHgwMH0sCisgICAgezB4ODUsIDB4MDB9LAorICAgIHsweDg2LCAweDAwfSwKKyAgICB7MHg4NywgMHgwMH0sCisgICAgezB4ODgsIDB4MDh9LAorICAgIHsweDg5LCAweDAwfSwKKyAgICB7MHg4YSwgMHgwOH0sCisgICAgezB4OGIsIDB4YTZ9LAorICAgIHsweDhjLCAweDg0fSwKKyAgICB7MHg4ZCwgMHg0N30sCisgICAgezB4OGUsIDB4YmJ9LAorICAgIHsweDhmLCAweDAyfSwKKyAgICB7MHg5MCwgMHgyMX0sCisgICAgezB4OTEsIDB4MGN9LAorICAgIHsweDkyLCAweDA0fSwKKyAgICB7MHg5MywgMHgyMn0sCisgICAgezB4OTQsIDB4MDB9LAorICAgIHsweDk1LCAweDAwfSwKKyAgICB7MHg5NiwgMHgwMH0sCisgICAgezB4OTcsIDB4ZWJ9LAorICAgIHsweDk4LCAweDAwfSwKKyAgICB7MHg5OSwgMHgwMH0sCisgICAgezB4OWEsIDB4MDB9LAorICAgIHsweDliLCAweDAwfSwKKyAgICB7MHg5YywgMHgwMH0sCisgICAgezB4OWQsIDB4MDB9LAorICAgIHsweDllLCAweDAwfSwKKyAgICB7MHg5ZiwgMHgwMH0sCisgICAgezB4YTAsIDB4MDB9LAorICAgIHsweGExLCAweDAwfSwKKyAgICB7MHhhMiwgMHgwMH0sCisgICAgezB4YTMsIDB4MDB9LAorICAgIHsweGE0LCAweDAwfSwKKyAgICB7MHhhNSwgMHgwMH0sCisgICAgezB4YTYsIDB4MTB9LAorICAgIHsweGE3LCAweDA0fSwKKyAgICB7MHhhOCwgMHgxMH0sCisgICAgezB4YTksIDB4MDB9LAorICAgIHsweGFhLCAweDhmfSwKKyAgICB7MHhhYiwgMHgwMH0sCisgICAgezB4YWMsIDB4MDB9LAorICAgIHsweGFkLCAweDAwfSwKKyAgICB7MHhhZSwgMHgwMH0sCisgICAgezB4YWYsIDB4ODB9LAorICAgIHsweGIwLCAweDM4fSwKKyAgICB7MHhiMSwgMHgwMH0sCisgICAgezB4YjIsIDB4MDB9LAorICAgIHsweGIzLCAweDAwfSwKKyAgICB7MHhiNCwgMHhlZX0sCisgICAgezB4YjUsIDB4ZmZ9LAorICAgIHsweGI2LCAweDEwfSwKKyAgICB7MHhiNywgMHgwMH0sCisgICAgezB4YjgsIDB4MDB9LAorICAgIHsweGI5LCAweDAwfSwKKyAgICB7MHhiYSwgMHgwMH0sCisgICAgezB4YmIsIDB4MDN9LAorICAgIHsweGJjLCAweDAwfSwKKyAgICB7MHhiZCwgMHgwMH0sCisgICAgezB4YmUsIDB4MDB9LAorICAgIHsweGJmLCAweDAwfSwKKyAgICB7MHhjMCwgMHgxMH0sCisgICAgezB4YzEsIDB4MTB9LAorICAgIHsweGMyLCAweDE4fSwKKyAgICB7MHhjMywgMHgyMH0sCisgICAgezB4YzQsIDB4MTB9LAorICAgIHsweGM1LCAweDAwfSwKKyAgICB7MHhjNiwgMHgyMn0sCisgICAgezB4YzcsIDB4MTR9LAorICAgIHsweGM4LCAweDBmfSwKKyAgICB7MHhjOSwgMHgwOH0sCisgICAgezB4Y2EsIDB4YTR9LAorICAgIHsweGNiLCAweGE3fSwKKyAgICB7MHhjYywgMHgzY30sCisgICAgezB4Y2QsIDB4MTB9LAorICAgIHsweGNlLCAweDIwfSwKKyAgICB7MHhjZiwgMHgwMH0sCisgICAgezB4ZDAsIDB4MDB9LAorICAgIHsweGQxLCAweDEwfSwKKyAgICB7MHhkMiwgMHgwMH0sCisgICAgezB4ZDMsIDB4MDB9LAorICAgIHsweGQ0LCAweDEwfSwKKyAgICB7MHhkNSwgMHgzM30sCisgICAgezB4ZDYsIDB4NzB9LAorICAgIHsweGQ3LCAweDAxfSwKKyAgICB7MHhkOCwgMHgwMH0sCisgICAgezB4ZDksIDB4MDB9LAorICAgIHsweGRhLCAweDAwfSwKKyAgICB7MHhkYiwgMHgwMH0sCisgICAgezB4ZGMsIDB4MDB9LAorICAgIHsweGRkLCAweDAwfSwKKyAgICB7MHhkZSwgMHgwMH0sCisgICAgezB4ZGYsIDB4MDB9LAorICAgIHsweGUwLCAweDAwfSwKKyAgICB7MHhlMSwgMHgwMH0sCisgICAgezB4ZTIsIDB4Y2N9LAorICAgIHsweGUzLCAweDA0fSwKKyAgICB7MHhlNCwgMHgwOH0sCisgICAgezB4ZTUsIDB4MTB9LAorICAgIHsweGU2LCAweDAwfSwKKyAgICB7MHhlNywgMHgwZX0sCisgICAgezB4ZTgsIDB4ODh9LAorICAgIHsweGU5LCAweGQ0fSwKKyAgICB7MHhlYSwgMHgwNX0sCisgICAgezB4ZWIsIDB4ZjB9LAorICAgIHsweGVjLCAweDc5fSwKKyAgICB7MHhlZCwgMHgwZn0sCisgICAgezB4ZWUsIDB4MDR9LAorICAgIHsweGVmLCAweDA0fSwKKyAgICB7MHhmMCwgMHgwMH0sCisgICAgezB4ZjEsIDB4MDB9LAorICAgIHsweGYyLCAweDAwfSwKKyAgICB7MHhmMywgMHgwMH0sCisgICAgezB4ZjQsIDB4MDB9LAorICAgIHsweGY1LCAweDAwfSwKKyAgICB7MHhmNiwgMHgwMH0sCisgICAgezB4ZjcsIDB4MDB9LAorICAgIHsweGY4LCAweDAwfSwKKyAgICB7MHhmOSwgMHgwMH0sCisgICAgezB4RjAsIDB4MDB9LAorICAgIHsweEYxLCAweEY4fSwKKyAgICB7MHhGMCwgMHg4MH0sCisgICAgezB4RjAsIDB4MDB9LAorICAgIHsweEYxLCAweEY0fSwKKyAgICB7MHhGMCwgMHg4MX0sCisgICAgezB4RjAsIDB4MDF9LAorICAgIHsweEYxLCAweEYwfSwKKyAgICB7MHhGMCwgMHg4Mn0sCisgICAgezB4RjAsIDB4MDJ9LAorICAgIHsweEYxLCAweEVDfSwKKyAgICB7MHhGMCwgMHg4M30sCisgICAgezB4RjAsIDB4MDN9LAorICAgIHsweEYxLCAweEU4fSwKKyAgICB7MHhGMCwgMHg4NH0sCisgICAgezB4RjAsIDB4MDR9LAorICAgIHsweEYxLCAweEU0fSwKKyAgICB7MHhGMCwgMHg4NX0sCisgICAgezB4RjAsIDB4MDV9LAorICAgIHsweEYxLCAweEUwfSwKKyAgICB7MHhGMCwgMHg4Nn0sCisgICAgezB4RjAsIDB4MDZ9LAorICAgIHsweEYxLCAweERDfSwKKyAgICB7MHhGMCwgMHg4N30sCisgICAgezB4RjAsIDB4MDd9LAorICAgIHsweEYxLCAweEQ4fSwKKyAgICB7MHhGMCwgMHg4OH0sCisgICAgezB4RjAsIDB4MDh9LAorICAgIHsweEYxLCAweEQ0fSwKKyAgICB7MHhGMCwgMHg4OX0sCisgICAgezB4RjAsIDB4MDl9LAorICAgIHsweEYxLCAweEQwfSwKKyAgICB7MHhGMCwgMHg4QX0sCisgICAgezB4RjAsIDB4MEF9LAorICAgIHsweEYxLCAweENDfSwKKyAgICB7MHhGMCwgMHg4Qn0sCisgICAgezB4RjAsIDB4MEJ9LAorICAgIHsweEYxLCAweEM4fSwKKyAgICB7MHhGMCwgMHg4Q30sCisgICAgezB4RjAsIDB4MEN9LAorICAgIHsweEYxLCAweEM0fSwKKyAgICB7MHhGMCwgMHg4RH0sCisgICAgezB4RjAsIDB4MER9LAorICAgIHsweEYxLCAweEMwfSwKKyAgICB7MHhGMCwgMHg4RX0sCisgICAgezB4RjAsIDB4MEV9LAorICAgIHsweEYxLCAweEJDfSwKKyAgICB7MHhGMCwgMHg4Rn0sCisgICAgezB4RjAsIDB4MEZ9LAorICAgIHsweEYxLCAweEI4fSwKKyAgICB7MHhGMCwgMHg5MH0sCisgICAgezB4RjAsIDB4MTB9LAorICAgIHsweEYxLCAweEI0fSwKKyAgICB7MHhGMCwgMHg5MX0sCisgICAgezB4RjAsIDB4MTF9LAorICAgIHsweEYxLCAweEIwfSwKKyAgICB7MHhGMCwgMHg5Mn0sCisgICAgezB4RjAsIDB4MTJ9LAorICAgIHsweEYxLCAweEFDfSwKKyAgICB7MHhGMCwgMHg5M30sCisgICAgezB4RjAsIDB4MTN9LAorICAgIHsweEYxLCAweEE4fSwKKyAgICB7MHhGMCwgMHg5NH0sCisgICAgezB4RjAsIDB4MTR9LAorICAgIHsweEYxLCAweEE0fSwKKyAgICB7MHhGMCwgMHg5NX0sCisgICAgezB4RjAsIDB4MTV9LAorICAgIHsweEYxLCAweEEwfSwKKyAgICB7MHhGMCwgMHg5Nn0sCisgICAgezB4RjAsIDB4MTZ9LAorICAgIHsweEYxLCAweDlDfSwKKyAgICB7MHhGMCwgMHg5N30sCisgICAgezB4RjAsIDB4MTd9LAorICAgIHsweEYxLCAweDk4fSwKKyAgICB7MHhGMCwgMHg5OH0sCisgICAgezB4RjAsIDB4MTh9LAorICAgIHsweEYxLCAweDk0fSwKKyAgICB7MHhGMCwgMHg5OX0sCisgICAgezB4RjAsIDB4MTl9LAorICAgIHsweEYxLCAweDkwfSwKKyAgICB7MHhGMCwgMHg5QX0sCisgICAgezB4RjAsIDB4MUF9LAorICAgIHsweEYxLCAweDhDfSwKKyAgICB7MHhGMCwgMHg5Qn0sCisgICAgezB4RjAsIDB4MUJ9LAorICAgIHsweEYxLCAweDg4fSwKKyAgICB7MHhGMCwgMHg5Q30sCisgICAgezB4RjAsIDB4MUN9LAorICAgIHsweEYxLCAweDg0fSwKKyAgICB7MHhGMCwgMHg5RH0sCisgICAgezB4RjAsIDB4MUR9LAorICAgIHsweEYxLCAweDgwfSwKKyAgICB7MHhGMCwgMHg5RX0sCisgICAgezB4RjAsIDB4MUV9LAorICAgIHsweEYxLCAweDdDfSwKKyAgICB7MHhGMCwgMHg5Rn0sCisgICAgezB4RjAsIDB4MUZ9LAorICAgIHsweEYxLCAweDc4fSwKKyAgICB7MHhGMCwgMHhBMH0sCisgICAgezB4RjAsIDB4MjB9LAorICAgIHsweEYxLCAweDc0fSwKKyAgICB7MHhGMCwgMHhBMX0sCisgICAgezB4RjAsIDB4MjF9LAorICAgIHsweEYxLCAweDcwfSwKKyAgICB7MHhGMCwgMHhBMn0sCisgICAgezB4RjAsIDB4MjJ9LAorICAgIHsweEYxLCAweDZDfSwKKyAgICB7MHhGMCwgMHhBM30sCisgICAgezB4RjAsIDB4MjN9LAorICAgIHsweEYxLCAweDY4fSwKKyAgICB7MHhGMCwgMHhBNH0sCisgICAgezB4RjAsIDB4MjR9LAorICAgIHsweEYxLCAweDY0fSwKKyAgICB7MHhGMCwgMHhBNX0sCisgICAgezB4RjAsIDB4MjV9LAorICAgIHsweEYxLCAweDYwfSwKKyAgICB7MHhGMCwgMHhBNn0sCisgICAgezB4RjAsIDB4MjZ9LAorICAgIHsweEYxLCAweDVDfSwKKyAgICB7MHhGMCwgMHhBN30sCisgICAgezB4RjAsIDB4Mjd9LAorICAgIHsweEYxLCAweDU4fSwKKyAgICB7MHhGMCwgMHhBOH0sCisgICAgezB4RjAsIDB4Mjh9LAorICAgIHsweEYxLCAweDU0fSwKKyAgICB7MHhGMCwgMHhBOX0sCisgICAgezB4RjAsIDB4Mjl9LAorICAgIHsweEYxLCAweDUwfSwKKyAgICB7MHhGMCwgMHhBQX0sCisgICAgezB4RjAsIDB4MkF9LAorICAgIHsweEYxLCAweDRDfSwKKyAgICB7MHhGMCwgMHhBQn0sCisgICAgezB4RjAsIDB4MkJ9LAorICAgIHsweEYxLCAweDQ4fSwKKyAgICB7MHhGMCwgMHhBQ30sCisgICAgezB4RjAsIDB4MkN9LAorICAgIHsweEYxLCAweDQ0fSwKKyAgICB7MHhGMCwgMHhBRH0sCisgICAgezB4RjAsIDB4MkR9LAorICAgIHsweEYxLCAweDQwfSwKKyAgICB7MHhGMCwgMHhBRX0sCisgICAgezB4RjAsIDB4MkV9LAorICAgIHsweEYxLCAweDNDfSwKKyAgICB7MHhGMCwgMHhBRn0sCisgICAgezB4RjAsIDB4MkZ9LAorICAgIHsweEYxLCAweDM4fSwKKyAgICB7MHhGMCwgMHhCMH0sCisgICAgezB4RjAsIDB4MzB9LAorICAgIHsweEYxLCAweDM0fSwKKyAgICB7MHhGMCwgMHhCMX0sCisgICAgezB4RjAsIDB4MzF9LAorICAgIHsweEYxLCAweDMwfSwKKyAgICB7MHhGMCwgMHhCMn0sCisgICAgezB4RjAsIDB4MzJ9LAorICAgIHsweEYxLCAweDJDfSwKKyAgICB7MHhGMCwgMHhCM30sCisgICAgezB4RjAsIDB4MzN9LAorICAgIHsweEYxLCAweDI4fSwKKyAgICB7MHhGMCwgMHhCNH0sCisgICAgezB4RjAsIDB4MzR9LAorICAgIHsweEYxLCAweDI0fSwKKyAgICB7MHhGMCwgMHhCNX0sCisgICAgezB4RjAsIDB4MzV9LAorICAgIHsweEYxLCAweDIwfSwKKyAgICB7MHhGMCwgMHhCNn0sCisgICAgezB4RjAsIDB4MzZ9LAorICAgIHsweEYxLCAweDFDfSwKKyAgICB7MHhGMCwgMHhCN30sCisgICAgezB4RjAsIDB4Mzd9LAorICAgIHsweEYxLCAweDE4fSwKKyAgICB7MHhGMCwgMHhCOH0sCisgICAgezB4RjAsIDB4Mzh9LAorICAgIHsweEYxLCAweDE0fSwKKyAgICB7MHhGMCwgMHhCOX0sCisgICAgezB4RjAsIDB4Mzl9LAorICAgIHsweEYxLCAweDEwfSwKKyAgICB7MHhGMCwgMHhCQX0sCisgICAgezB4RjAsIDB4M0F9LAorICAgIHsweEYxLCAweDBDfSwKKyAgICB7MHhGMCwgMHhCQn0sCisgICAgezB4RjAsIDB4M0J9LAorICAgIHsweEYxLCAweDA4fSwKKyAgICB7MHhGMCwgMHgwMH0sCisgICAgezB4RjAsIDB4M0N9LAorICAgIHsweEYxLCAweDA0fSwKKyAgICB7MHhGMCwgMHhCRH0sCisgICAgezB4RjAsIDB4M0R9LAorICAgIHsweEYxLCAweDAwfSwKKyAgICB7MHhGMCwgMHhCRX0sCisgICAgezB4RjAsIDB4M0V9LAorICAgIHsweEYxLCAweDAwfSwKKyAgICB7MHhGMCwgMHhCRn0sCisgICAgezB4RjAsIDB4M0Z9LAorICAgIHsweEYxLCAweDAwfSwKKyAgICB7MHhGMCwgMHhDMH0sCisgICAgezB4RjAsIDB4MDB9LAorfTsKKworI2RlZmluZSBDQl9WVDMyNTNCMF9JTklUX0ZPUl9SRk1EIDI1NgorQllURSBieVZUMzI1M0IwX1JGTURbQ0JfVlQzMjUzQjBfSU5JVF9GT1JfUkZNRF1bMl0gPSB7CisgICAgezB4MDAsIDB4MzF9LAorICAgIHsweDAxLCAweDAwfSwKKyAgICB7MHgwMiwgMHgwMH0sCisgICAgezB4MDMsIDB4MDB9LAorICAgIHsweDA0LCAweDAwfSwKKyAgICB7MHgwNSwgMHg4MX0sCisgICAgezB4MDYsIDB4MDB9LAorICAgIHsweDA3LCAweDAwfSwKKyAgICB7MHgwOCwgMHgzOH0sCisgICAgezB4MDksIDB4NDV9LAorICAgIHsweDBhLCAweDJhfSwKKyAgICB7MHgwYiwgMHg3Nn0sCisgICAgezB4MGMsIDB4MDB9LAorICAgIHsweDBkLCAweDAwfSwKKyAgICB7MHgwZSwgMHg4MH0sCisgICAgezB4MGYsIDB4MDB9LAorICAgIHsweDEwLCAweDAwfSwKKyAgICB7MHgxMSwgMHgwMH0sCisgICAgezB4MTIsIDB4MDB9LAorICAgIHsweDEzLCAweDAwfSwKKyAgICB7MHgxNCwgMHgwMH0sCisgICAgezB4MTUsIDB4MDB9LAorICAgIHsweDE2LCAweDAwfSwKKyAgICB7MHgxNywgMHgwMH0sCisgICAgezB4MTgsIDB4MDB9LAorICAgIHsweDE5LCAweDAwfSwKKyAgICB7MHgxYSwgMHgwMH0sCisgICAgezB4MWIsIDB4OGV9LAorICAgIHsweDFjLCAweDA2fSwKKyAgICB7MHgxZCwgMHgwMH0sCisgICAgezB4MWUsIDB4MDB9LAorICAgIHsweDFmLCAweDAwfSwKKyAgICB7MHgyMCwgMHgwMH0sCisgICAgezB4MjEsIDB4MDB9LAorICAgIHsweDIyLCAweDAwfSwKKyAgICB7MHgyMywgMHgwMH0sCisgICAgezB4MjQsIDB4MDB9LAorICAgIHsweDI1LCAweDRhfSwKKyAgICB7MHgyNiwgMHgwMH0sCisgICAgezB4MjcsIDB4MDB9LAorICAgIHsweDI4LCAweDAwfSwKKyAgICB7MHgyOSwgMHgwMH0sCisgICAgezB4MmEsIDB4MDB9LAorICAgIHsweDJiLCAweDAwfSwKKyAgICB7MHgyYywgMHgwMH0sCisgICAgezB4MmQsIDB4MzR9LAorICAgIHsweDJlLCAweDE4fSwKKyAgICB7MHgyZiwgMHgwY30sCisgICAgezB4MzAsIDB4MjZ9LAorICAgIHsweDMxLCAweDVifSwKKyAgICB7MHgzMiwgMHgwMH0sCisgICAgezB4MzMsIDB4MDB9LAorICAgIHsweDM0LCAweDAwfSwKKyAgICB7MHgzNSwgMHgwMH0sCisgICAgezB4MzYsIDB4YWF9LAorICAgIHsweDM3LCAweGFhfSwKKyAgICB7MHgzOCwgMHhmZn0sCisgICAgezB4MzksIDB4ZmZ9LAorICAgIHsweDNhLCAweGY4fSwKKyAgICB7MHgzYiwgMHgwMH0sCisgICAgezB4M2MsIDB4MDB9LAorICAgIHsweDNkLCAweDA5fSwKKyAgICB7MHgzZSwgMHgwZH0sCisgICAgezB4M2YsIDB4MDR9LAorICAgIHsweDQwLCAweDAwfSwKKyAgICB7MHg0MSwgMHgwOH0sCisgICAgezB4NDIsIDB4MDB9LAorICAgIHsweDQzLCAweDA4fSwKKyAgICB7MHg0NCwgMHgwOH0sCisgICAgezB4NDUsIDB4MTR9LAorICAgIHsweDQ2LCAweDA1fSwKKyAgICB7MHg0NywgMHgwOH0sCisgICAgezB4NDgsIDB4MDB9LAorICAgIHsweDQ5LCAweDAwfSwKKyAgICB7MHg0YSwgMHgwMH0sCisgICAgezB4NGIsIDB4MDB9LAorICAgIHsweDRjLCAweDA5fSwKKyAgICB7MHg0ZCwgMHg4MH0sCisgICAgezB4NGUsIDB4MDB9LAorICAgIHsweDRmLCAweGM1fSwKKyAgICB7MHg1MCwgMHgxNH0sCisgICAgezB4NTEsIDB4MTl9LAorICAgIHsweDUyLCAweDAwfSwKKyAgICB7MHg1MywgMHgwMH0sCisgICAgezB4NTQsIDB4MDB9LAorICAgIHsweDU1LCAweDAwfSwKKyAgICB7MHg1NiwgMHgwMH0sCisgICAgezB4NTcsIDB4MDB9LAorICAgIHsweDU4LCAweDAwfSwKKyAgICB7MHg1OSwgMHhiMH0sCisgICAgezB4NWEsIDB4MDB9LAorICAgIHsweDViLCAweDAwfSwKKyAgICB7MHg1YywgMHgwMH0sCisgICAgezB4NWQsIDB4MDB9LAorICAgIHsweDVlLCAweDAwfSwKKyAgICB7MHg1ZiwgMHgwMH0sCisgICAgezB4NjAsIDB4Mzl9LAorICAgIHsweDYxLCAweDgzfSwKKyAgICB7MHg2MiwgMHgwMH0sCisgICAgezB4NjMsIDB4MDB9LAorICAgIHsweDY0LCAweDAwfSwKKyAgICB7MHg2NSwgMHgwMH0sCisgICAgezB4NjYsIDB4YzB9LAorICAgIHsweDY3LCAweDQ5fSwKKyAgICB7MHg2OCwgMHgwMH0sCisgICAgezB4NjksIDB4MDB9LAorICAgIHsweDZhLCAweDAwfSwKKyAgICB7MHg2YiwgMHgwMH0sCisgICAgezB4NmMsIDB4MDB9LAorICAgIHsweDZkLCAweDAzfSwKKyAgICB7MHg2ZSwgMHgwMX0sCisgICAgezB4NmYsIDB4MDB9LAorICAgIHsweDcwLCAweDAwfSwKKyAgICB7MHg3MSwgMHgwMH0sCisgICAgezB4NzIsIDB4MDB9LAorICAgIHsweDczLCAweDAwfSwKKyAgICB7MHg3NCwgMHgwMH0sCisgICAgezB4NzUsIDB4MDB9LAorICAgIHsweDc2LCAweDAwfSwKKyAgICB7MHg3NywgMHgwMH0sCisgICAgezB4NzgsIDB4MDB9LAorICAgIHsweDc5LCAweDAwfSwKKyAgICB7MHg3YSwgMHgwMH0sCisgICAgezB4N2IsIDB4MDB9LAorICAgIHsweDdjLCAweDAwfSwKKyAgICB7MHg3ZCwgMHgwMH0sCisgICAgezB4N2UsIDB4MDB9LAorICAgIHsweDdmLCAweDAwfSwKKyAgICB7MHg4MCwgMHg4OX0sCisgICAgezB4ODEsIDB4MDB9LAorICAgIHsweDgyLCAweDBlfSwKKyAgICB7MHg4MywgMHgwMH0sCisgICAgezB4ODQsIDB4MDB9LAorICAgIHsweDg1LCAweDAwfSwKKyAgICB7MHg4NiwgMHgwMH0sCisgICAgezB4ODcsIDB4MDB9LAorICAgIHsweDg4LCAweDA4fSwKKyAgICB7MHg4OSwgMHgwMH0sCisgICAgezB4OGEsIDB4MGV9LAorICAgIHsweDhiLCAweGE3fSwKKyAgICB7MHg4YywgMHg4OH0sCisgICAgezB4OGQsIDB4NDd9LAorICAgIHsweDhlLCAweGFhfSwKKyAgICB7MHg4ZiwgMHgwMn0sCisgICAgezB4OTAsIDB4MjN9LAorICAgIHsweDkxLCAweDBjfSwKKyAgICB7MHg5MiwgMHgwNn0sCisgICAgezB4OTMsIDB4MDh9LAorICAgIHsweDk0LCAweDAwfSwKKyAgICB7MHg5NSwgMHgwMH0sCisgICAgezB4OTYsIDB4MDB9LAorICAgIHsweDk3LCAweGVifSwKKyAgICB7MHg5OCwgMHgwMH0sCisgICAgezB4OTksIDB4MDB9LAorICAgIHsweDlhLCAweDAwfSwKKyAgICB7MHg5YiwgMHgwMH0sCisgICAgezB4OWMsIDB4MDB9LAorICAgIHsweDlkLCAweDAwfSwKKyAgICB7MHg5ZSwgMHgwMH0sCisgICAgezB4OWYsIDB4MDB9LAorICAgIHsweGEwLCAweDAwfSwKKyAgICB7MHhhMSwgMHgwMH0sCisgICAgezB4YTIsIDB4MDB9LAorICAgIHsweGEzLCAweGNkfSwKKyAgICB7MHhhNCwgMHgwN30sCisgICAgezB4YTUsIDB4MzN9LAorICAgIHsweGE2LCAweDE4fSwKKyAgICB7MHhhNywgMHgwMH0sCisgICAgezB4YTgsIDB4MTh9LAorICAgIHsweGE5LCAweDAwfSwKKyAgICB7MHhhYSwgMHgyOH0sCisgICAgezB4YWIsIDB4MDB9LAorICAgIHsweGFjLCAweDAwfSwKKyAgICB7MHhhZCwgMHgwMH0sCisgICAgezB4YWUsIDB4MDB9LAorICAgIHsweGFmLCAweDE4fSwKKyAgICB7MHhiMCwgMHgzOH0sCisgICAgezB4YjEsIDB4MzB9LAorICAgIHsweGIyLCAweDAwfSwKKyAgICB7MHhiMywgMHgwMH0sCisgICAgezB4YjQsIDB4MDB9LAorICAgIHsweGI1LCAweDAwfSwKKyAgICB7MHhiNiwgMHg4NH0sCisgICAgezB4YjcsIDB4ZmR9LAorICAgIHsweGI4LCAweDAwfSwKKyAgICB7MHhiOSwgMHgwMH0sCisgICAgezB4YmEsIDB4MDB9LAorICAgIHsweGJiLCAweDAzfSwKKyAgICB7MHhiYywgMHgwMH0sCisgICAgezB4YmQsIDB4MDB9LAorICAgIHsweGJlLCAweDAwfSwKKyAgICB7MHhiZiwgMHgwMH0sCisgICAgezB4YzAsIDB4MTB9LAorICAgIHsweGMxLCAweDIwfSwKKyAgICB7MHhjMiwgMHgxOH0sCisgICAgezB4YzMsIDB4MjB9LAorICAgIHsweGM0LCAweDEwfSwKKyAgICB7MHhjNSwgMHgyY30sCisgICAgezB4YzYsIDB4MWV9LAorICAgIHsweGM3LCAweDEwfSwKKyAgICB7MHhjOCwgMHgxMn0sCisgICAgezB4YzksIDB4MDF9LAorICAgIHsweGNhLCAweDZmfSwKKyAgICB7MHhjYiwgMHhhN30sCisgICAgezB4Y2MsIDB4M2N9LAorICAgIHsweGNkLCAweDEwfSwKKyAgICB7MHhjZSwgMHgwMH0sCisgICAgezB4Y2YsIDB4MjJ9LAorICAgIHsweGQwLCAweDAwfSwKKyAgICB7MHhkMSwgMHgxMH0sCisgICAgezB4ZDIsIDB4MDB9LAorICAgIHsweGQzLCAweDAwfSwKKyAgICB7MHhkNCwgMHgxMH0sCisgICAgezB4ZDUsIDB4MzN9LAorICAgIHsweGQ2LCAweDgwfSwKKyAgICB7MHhkNywgMHgyMX0sCisgICAgezB4ZDgsIDB4MDB9LAorICAgIHsweGQ5LCAweDAwfSwKKyAgICB7MHhkYSwgMHgwMH0sCisgICAgezB4ZGIsIDB4MDB9LAorICAgIHsweGRjLCAweDAwfSwKKyAgICB7MHhkZCwgMHgwMH0sCisgICAgezB4ZGUsIDB4MDB9LAorICAgIHsweGRmLCAweDAwfSwKKyAgICB7MHhlMCwgMHgwMH0sCisgICAgezB4ZTEsIDB4QjN9LAorICAgIHsweGUyLCAweDAwfSwKKyAgICB7MHhlMywgMHgwMH0sCisgICAgezB4ZTQsIDB4MDB9LAorICAgIHswe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DB4M0V9LAorICAgIHsweEYwLCAweDgzfSwKKyAgICB7MHhGMCwgMHgwM30sCisgICAgezB4RjEsIDB4M0J9LAorICAgIHsweEYwLCAweDg0fSwKKyAgICB7MHhGMCwgMHgwNH0sCisgICAgezB4RjEsIDB4Mzl9LAorICAgIHsweEYwLCAweDg1fSwKKyAgICB7MHhGMCwgMHgwNX0sCisgICAgezB4RjEsIDB4Mzh9LAorICAgIHsweEYwLCAweDg2fSwKKyAgICB7MHhGMCwgMHgwNn0sCisgICAgezB4RjEsIDB4Mzd9LAorICAgIHsweEYwLCAweDg3fSwKKyAgICB7MHhGMCwgMHgwN30sCisgICAgezB4RjEsIDB4MzZ9LAorICAgIHsweEYwLCAweDg4fSwKKyAgICB7MHhGMCwgMHgwOH0sCisgICAgezB4RjEsIDB4MzV9LAorICAgIHsweEYwLCAweDg5fSwKKyAgICB7MHhGMCwgMHgwOX0sCisgICAgezB4RjEsIDB4MzV9LAorICAgIHsweEYwLCAweDhBfSwKKyAgICB7MHhGMCwgMHgwQX0sCisgICAgezB4RjEsIDB4MzR9LAorICAgIHsweEYwLCAweDhCfSwKKyAgICB7MHhGMCwgMHgwQn0sCisgICAgezB4RjEsIDB4MzR9LAorICAgIHsweEYwLCAweDhDfSwKKyAgICB7MHhGMCwgMHgwQ30sCisgICAgezB4RjEsIDB4MzN9LAorICAgIHsweEYwLCAweDhEfSwKKyAgICB7MHhGMCwgMHgwRH0sCisgICAgezB4RjEsIDB4MzJ9LAorICAgIHsweEYwLCAweDhFfSwKKyAgICB7MHhGMCwgMHgwRX0sCisgICAgezB4RjEsIDB4MzF9LAorICAgIHsweEYwLCAweDhGfSwKKyAgICB7MHhGMCwgMHgwRn0sCisgICAgezB4RjEsIDB4MzB9LAorICAgIHsweEYwLCAweDkwfSwKKyAgICB7MHhGMCwgMHgxMH0sCisgICAgezB4RjEsIDB4MkZ9LAorICAgIHsweEYwLCAweDkxfSwKKyAgICB7MHhGMCwgMHgxMX0sCisgICAgezB4RjEsIDB4MkZ9LAorICAgIHsweEYwLCAweDkyfSwKKyAgICB7MHhGMCwgMHgxMn0sCisgICAgezB4RjEsIDB4MkV9LAorICAgIHsweEYwLCAweDkzfSwKKyAgICB7MHhGMCwgMHgxM30sCisgICAgezB4RjEsIDB4MkR9LAorICAgIHsweEYwLCAweDk0fSwKKyAgICB7MHhGMCwgMHgxNH0sCisgICAgezB4RjEsIDB4MkN9LAorICAgIHsweEYwLCAweDk1fSwKKyAgICB7MHhGMCwgMHgxNX0sCisgICAgezB4RjEsIDB4MkJ9LAorICAgIHsweEYwLCAweDk2fSwKKyAgICB7MHhGMCwgMHgxNn0sCisgICAgezB4RjEsIDB4MkJ9LAorICAgIHsweEYwLCAweDk3fSwKKyAgICB7MHhGMCwgMHgxN30sCisgICAgezB4RjEsIDB4MkF9LAorICAgIHsweEYwLCAweDk4fSwKKyAgICB7MHhGMCwgMHgxOH0sCisgICAgezB4RjEsIDB4Mjl9LAorICAgIHsweEYwLCAweDk5fSwKKyAgICB7MHhGMCwgMHgxOX0sCisgICAgezB4RjEsIDB4Mjh9LAorICAgIHsweEYwLCAweDlBfSwKKyAgICB7MHhGMCwgMHgxQX0sCisgICAgezB4RjEsIDB4Mjd9LAorICAgIHsweEYwLCAweDlCfSwKKyAgICB7MHhGMCwgMHgxQn0sCisgICAgezB4RjEsIDB4MjZ9LAorICAgIHsweEYwLCAweDlDfSwKKyAgICB7MHhGMCwgMHgxQ30sCisgICAgezB4RjEsIDB4MjV9LAorICAgIHsweEYwLCAweDlEfSwKKyAgICB7MHhGMCwgMHgxRH0sCisgICAgezB4RjEsIDB4MjR9LAorICAgIHsweEYwLCAweDlFfSwKKyAgICB7MHhGMCwgMHgxRX0sCisgICAgezB4RjEsIDB4MjR9LAorICAgIHsweEYwLCAweDlGfSwKKyAgICB7MHhGMCwgMHgxRn0sCisgICAgezB4RjEsIDB4MjN9LAorICAgIHsweEYwLCAweEEwfSwKKyAgICB7MHhGMCwgMHgyMH0sCisgICAgezB4RjEsIDB4MjJ9LAorICAgIHsweEYwLCAweEExfSwKKyAgICB7MHhGMCwgMHgyMX0sCisgICAgezB4RjEsIDB4MjF9LAorICAgIHsweEYwLCAweEEyfSwKKyAgICB7MHhGMCwgMHgyMn0sCisgICAgezB4RjEsIDB4MjB9LAorICAgIHsweEYwLCAweEEzfSwKKyAgICB7MHhGMCwgMHgyM30sCisgICAgezB4RjEsIDB4MjB9LAorICAgIHsweEYwLCAweEE0fSwKKyAgICB7MHhGMCwgMHgyNH0sCisgICAgezB4RjEsIDB4MUZ9LAorICAgIHsweEYwLCAweEE1fSwKKyAgICB7MHhGMCwgMHgyNX0sCisgICAgezB4RjEsIDB4MUV9LAorICAgIHsweEYwLCAweEE2fSwKKyAgICB7MHhGMCwgMHgyNn0sCisgICAgezB4RjEsIDB4MUR9LAorICAgIHsweEYwLCAweEE3fSwKKyAgICB7MHhGMCwgMHgyN30sCisgICAgezB4RjEsIDB4MUN9LAorICAgIHsweEYwLCAweEE4fSwKKyAgICB7MHhGMCwgMHgyOH0sCisgICAgezB4RjEsIDB4MUJ9LAorICAgIHsweEYwLCAweEE5fSwKKyAgICB7MHhGMCwgMHgyOX0sCisgICAgezB4RjEsIDB4MUJ9LAorICAgIHsweEYwLCAweEFBfSwKKyAgICB7MHhGMCwgMHgyQX0sCisgICAgezB4RjEsIDB4MUF9LAorICAgIHsweEYwLCAweEFCfSwKKyAgICB7MHhGMCwgMHgyQn0sCisgICAgezB4RjEsIDB4MUF9LAorICAgIHsweEYwLCAweEFDfSwKKyAgICB7MHhGMCwgMHgyQ30sCisgICAgezB4RjEsIDB4MTl9LAorICAgIHsweEYwLCAweEFEfSwKKyAgICB7MHhGMCwgMHgyRH0sCisgICAgezB4RjEsIDB4MTh9LAorICAgIHsweEYwLCAweEFFfSwKKyAgICB7MHhGMCwgMHgyRX0sCisgICAgezB4RjEsIDB4MTd9LAorICAgIHsweEYwLCAweEFGfSwKKyAgICB7MHhGMCwgMHgyRn0sCisgICAgezB4RjEsIDB4MTZ9LAorICAgIHsweEYwLCAweEIwfSwKKyAgICB7MHhGMCwgMHgzMH0sCisgICAgezB4RjEsIDB4MTV9LAorICAgIHsweEYwLCAweEIxfSwKKyAgICB7MHhGMCwgMHgzMX0sCisgICAgezB4RjEsIDB4MTV9LAorICAgIHsweEYwLCAweEIyfSwKKyAgICB7MHhGMCwgMHgzMn0sCisgICAgezB4RjEsIDB4MTV9LAorICAgIHsweEYwLCAweEIzfSwKKyAgICB7MHhGMCwgMHgzM30sCisgICAgezB4RjEsIDB4MTR9LAorICAgIHsweEYwLCAweEI0fSwKKyAgICB7MHhGMCwgMHgzNH0sCisgICAgezB4RjEsIDB4MTN9LAorICAgIHsweEYwLCAweEI1fSwKKyAgICB7MHhGMCwgMHgzNX0sCisgICAgezB4RjEsIDB4MTJ9LAorICAgIHsweEYwLCAweEI2fSwKKyAgICB7MHhGMCwgMHgzNn0sCisgICAgezB4RjEsIDB4MTF9LAorICAgIHsweEYwLCAweEI3fSwKKyAgICB7MHhGMCwgMHgzN30sCisgICAgezB4RjEsIDB4MTB9LAorICAgIHsweEYwLCAweEI4fSwKKyAgICB7MHhGMCwgMHgzOH0sCisgICAgezB4RjEsIDB4MEZ9LAorICAgIHsweEYwLCAweEI5fSwKKyAgICB7MHhGMCwgMHgzOX0sCisgICAgezB4RjEsIDB4MEV9LAorICAgIHsweEYwLCAweEJBfSwKKyAgICB7MHhGMCwgMHgzQX0sCisgICAgezB4RjEsIDB4MER9LAorICAgIHsweEYwLCAweEJCfSwKKyAgICB7MHhGMCwgMHgzQn0sCisgICAgezB4RjEsIDB4MEN9LAorICAgIHsweEYwLCAweEJDfSwKKyAgICB7MHhGMCwgMHgzQ30sCisgICAgezB4RjEsIDB4MEJ9LAorICAgIHsweEYwLCAweEJEfSwKKyAgICB7MHhGMCwgMHgzRH0sCisgICAgezB4RjEsIDB4MEJ9LAorICAgIHsweEYwLCAweEJFfSwKKyAgICB7MHhGMCwgMHgzRX0sCisgICAgezB4RjEsIDB4MEF9LAorICAgIHsweEYwLCAweEJGfSwKKyAgICB7MHhGMCwgMHgzRn0sCisgICAgezB4RjEsIDB4MDl9LAorICAgIHsweEYwLCAweDAwfSwKK307CisKKyNkZWZpbmUgQ0JfVlQzMjUzQjBfSU5JVF9GT1JfQUlST0hBMjIzMCAyNTYKKy8vIEZvciBBSVJPSEEKK0JZVEUgYnlWVDMyNTNCMF9BSVJPSEEyMjMwW0NCX1ZUMzI1M0IwX0lOSVRfRk9SX0FJUk9IQTIyMzBdWzJdID0geworICAgIHsweDAwLCAweDMxfSwKKyAgICB7MHgwMSwgMHgwMH0sCisgICAgezB4MDIsIDB4MDB9LAorICAgIHsweDAzLCAweDAwfSwKKyAgICB7MHgwNCwgMHgwMH0sCisgICAgezB4MDUsIDB4ODB9LAorICAgIHsweDA2LCAweDAwfSwKKyAgICB7MHgwNywgMHgwMH0sCisgICAgezB4MDgsIDB4NzB9LAorICAgIHsweDA5LCAweDQxfSwKKyAgICB7MHgwYSwgMHgyQX0sCisgICAgezB4MGIsIDB4NzZ9LAorICAgIHsweDBjLCAweDAwfSwKKyAgICB7MHgwZCwgMHgwMH0sCisgICAgezB4MGUsIDB4ODB9LAorICAgIHsweDBmLCAweDAwfSwKKyAgICB7MHgxMCwgMHgwMH0sCisgICAgezB4MTEsIDB4MDB9LAorICAgIHsweDEyLCAweDAwfSwKKyAgICB7MHgxMywgMHgwMH0sCisgICAgezB4MTQsIDB4MDB9LAorICAgIHsweDE1LCAweDAwfSwKKyAgICB7MHgxNiwgMHgwMH0sCisgICAgezB4MTcsIDB4MDB9LAorICAgIHsweDE4LCAweDAwfSwKKyAgICB7MHgxOSwgMHgwMH0sCisgICAgezB4MWEsIDB4MDB9LAorICAgIHsweDFiLCAweDhmfSwKKyAgICB7MHgxYywgMHgwOX0sCisgICAgezB4MWQsIDB4MDB9LAorICAgIHsweDFlLCAweDAwfSwKKyAgICB7MHgxZiwgMHgwMH0sCisgICAgezB4MjAsIDB4MDB9LAorICAgIHsweDIxLCAweDAwfSwKKyAgICB7MHgyMiwgMHgwMH0sCisgICAgezB4MjMsIDB4MDB9LAorICAgIHsweDI0LCAweDAwfSwKKyAgICB7MHgyNSwgMHg0YX0sCisgICAgezB4MjYsIDB4MDB9LAorICAgIHsweDI3LCAweDAwfSwKKyAgICB7MHgyOCwgMHgwMH0sCisgICAgezB4MjksIDB4MDB9LAorICAgIHsweDJhLCAweDAwfSwKKyAgICB7MHgyYiwgMHgwMH0sCisgICAgezB4MmMsIDB4MDB9LAorICAgIHsweDJkLCAweDRhfSwKKyAgICB7MHgyZSwgMHgwMH0sCisgICAgezB4MmYsIDB4MGF9LAorICAgIHsweDMwLCAweDI2fSwKKyAgICB7MHgzMSwgMHg1Yn0sCisgICAgezB4MzIsIDB4MDB9LAorICAgIHsweDMzLCAweDAwfSwKKyAgICB7MHgzNCwgMHgwMH0sCisgICAgezB4MzUsIDB4MDB9LAorICAgIHsweDM2LCAweGFhfSwKKyAgICB7MHgzNywgMHhhYX0sCisgICAgezB4MzgsIDB4ZmZ9LAorICAgIHsweDM5LCAweGZmfSwKKyAgICB7MHgzYSwgMHg3OX0sCisgICAgezB4M2IsIDB4MDB9LAorICAgIHsweDNjLCAweDAwfSwKKyAgICB7MHgzZCwgMHgwYn0sCisgICAgezB4M2UsIDB4NDh9LAorICAgIHsweDNmLCAweDA0fSwKKyAgICB7MHg0MCwgMHgwMH0sCisgICAgezB4NDEsIDB4MDh9LAorICAgIHsweDQyLCAweDAwfSwKKyAgICB7MHg0MywgMHgwOH0sCisgICAgezB4NDQsIDB4MDh9LAorICAgIHsweDQ1LCAweDE0fSwKKyAgICB7MHg0NiwgMHgwNX0sCisgICAgezB4NDcsIDB4MDl9LAorICAgIHsweDQ4LCAweDAwfSwKKyAgICB7MHg0OSwgMHgwMH0sCisgICAgezB4NGEsIDB4MDB9LAorICAgIHsweDRiLCAweDAwfSwKKyAgICB7MHg0YywgMHgwOX0sCisgICAgezB4NGQsIDB4NzN9LAorICAgIHsweDRlLCAweDAwfSwKKyAgICB7MHg0ZiwgMHhjNX0sCisgICAgezB4NTAsIDB4MTV9LAorICAgIHsweDUxLCAweDE5fSwKKyAgICB7MHg1MiwgMHgwMH0sCisgICAgezB4NTMsIDB4MDB9LAorICAgIHsweDU0LCAweDAwfSwKKyAgICB7MHg1NSwgMHgwMH0sCisgICAgezB4NTYsIDB4MDB9LAorICAgIHsweDU3LCAweDAwfSwKKyAgICB7MHg1OCwgMHgwMH0sCisgICAgezB4NTksIDB4YjB9LAorICAgIHsweDVhLCAweDAwfSwKKyAgICB7MHg1YiwgMHgwMH0sCisgICAgezB4NWMsIDB4MDB9LAorICAgIHsweDVkLCAweDAwfSwKKyAgICB7MHg1ZSwgMHgwMH0sCisgICAgezB4NWYsIDB4MDB9LAorICAgIHsweDYwLCAweGU0fSwKKyAgICB7MHg2MSwgMHg4MH0sCisgICAgezB4NjIsIDB4MDB9LAorICAgIHsweDYzLCAweDAwfSwKKyAgICB7MHg2NCwgMHgwMH0sCisgICAgezB4NjUsIDB4MDB9LAorICAgIHsweDY2LCAweDk4fSwKKyAgICB7MHg2NywgMHgwYX0sCisgICAgezB4NjgsIDB4MDB9LAorICAgIHsweDY5LCAweDAwfSwKKyAgICB7MHg2YSwgMHgwMH0sCisgICAgezB4NmIsIDB4MDB9LAorICAgIC8vezB4NmMsIDB4ODB9LAorICAgIHsweDZjLCAweDAwfSwgLy9Sb2JlcnRZdToyMDA1MDEyNSwgcmVxdWVzdCBieSBKSlN1ZQorICAgIHsweDZkLCAweDAzfSwKKyAgICB7MHg2ZSwgMHgwMX0sCisgICAgezB4NmYsIDB4MDB9LAorICAgIHsweDcwLCAweDAwfSwKKyAgICB7MHg3MSwgMHgwMH0sCisgICAgezB4NzIsIDB4MDB9LAorICAgIHsweDczLCAweDAwfSwKKyAgICB7MHg3NCwgMHgwMH0sCisgICAgezB4NzUsIDB4MDB9LAorICAgIHsweDc2LCAweDAwfSwKKyAgICB7MHg3NywgMHgwMH0sCisgICAgezB4NzgsIDB4MDB9LAorICAgIHsweDc5LCAweDAwfSwKKyAgICB7MHg3YSwgMHgwMH0sCisgICAgezB4N2IsIDB4MDB9LAorICAgIHsweDdjLCAweDAwfSwKKyAgICB7MHg3ZCwgMHgwMH0sCisgICAgezB4N2UsIDB4MDB9LAorICAgIHsweDdmLCAweDAwfSwKKyAgICB7MHg4MCwgMHg4Y30sCisgICAgezB4ODEsIDB4MDF9LAorICAgIHsweDgyLCAweDA5fSwKKyAgICB7MHg4MywgMHgwMH0sCisgICAgezB4ODQsIDB4MDB9LAorICAgIHsweDg1LCAweDAwfSwKKyAgICB7MHg4NiwgMHgwMH0sCisgICAgezB4ODcsIDB4MDB9LAorICAgIHsweDg4LCAweDA4fSwKKyAgICB7MHg4OSwgMHgwMH0sCisgICAgezB4OGEsIDB4MGZ9LAorICAgIHsweDhiLCAweGI3fSwKKyAgICB7MHg4YywgMHg4OH0sCisgICAgezB4OGQsIDB4NDd9LAorICAgIHsweDhlLCAweGFhfSwKKyAgICB7MHg4ZiwgMHgwMn0sCisgICAgezB4OTAsIDB4MjJ9LAorICAgIHsweDkxLCAweDAwfSwKKyAgICB7MHg5MiwgMHgwMH0sCisgICAgezB4OTMsIDB4MDB9LAorICAgIHsweDk0LCAweDAwfSwKKyAgICB7MHg5NSwgMHgwMH0sCisgICAgezB4OTYsIDB4MDB9LAorICAgIHsweDk3LCAweGVifSwKKyAgICB7MHg5OCwgMHgwMH0sCisgICAgezB4OTksIDB4MDB9LAorICAgIHsweDlhLCAweDAwfSwKKyAgICB7MHg5YiwgMHgwMH0sCisgICAgezB4OWMsIDB4MDB9LAorICAgIHsweDlkLCAweDAwfSwKKyAgICB7MHg5ZSwgMHgwMH0sCisgICAgezB4OWYsIDB4MDF9LAorICAgIHsweGEwLCAweDAwfSwKKyAgICB7MHhhMSwgMHgwMH0sCisgICAgezB4YTIsIDB4MDB9LAorICAgIHsweGEzLCAweDAwfSwKKyAgICB7MHhhNCwgMHgwMH0sCisgICAgezB4YTUsIDB4MDB9LAorICAgIHsweGE2LCAweDEwfSwKKyAgICB7MHhhNywgMHgwMH0sCisgICAgezB4YTgsIDB4MTh9LAorICAgIHsweGE5LCAweDAwfSwKKyAgICB7MHhhYSwgMHgwMH0sCisgICAgezB4YWIsIDB4MDB9LAorICAgIHsweGFjLCAweDAwfSwKKyAgICB7MHhhZCwgMHgwMH0sCisgICAgezB4YWUsIDB4MDB9LAorICAgIHsweGFmLCAweDE4fSwKKyAgICB7MHhiMCwgMHgzOH0sCisgICAgezB4YjEsIDB4MzB9LAorICAgIHsweGIyLCAweDAwfSwKKyAgICB7MHhiMywgMHgwMH0sCisgICAgezB4YjQsIDB4ZmZ9LAorICAgIHsweGI1LCAweDBmfSwKKyAgICB7MHhiNiwgMHhlNH0sCisgICAgezB4YjcsIDB4ZTJ9LAorICAgIHsweGI4LCAweDAwfSwKKyAgICB7MHhiOSwgMHgwMH0sCisgICAgezB4YmEsIDB4MDB9LAorICAgIHsweGJiLCAweDAzfSwKKyAgICB7MHhiYywgMHgwMX0sCisgICAgezB4YmQsIDB4MDB9LAorICAgIHsweGJlLCAweDAwfSwKKyAgICB7MHhiZiwgMHgwMH0sCisgICAgezB4YzAsIDB4MTh9LAorICAgIHsweGMxLCAweDIwfSwKKyAgICB7MHhjMiwgMHgwN30sCisgICAgezB4YzMsIDB4MTh9LAorICAgIHsweGM0LCAweGZmfSwKKyAgICB7MHhjNSwgMHgyY30sCisgICAgezB4YzYsIDB4MGN9LAorICAgIHsweGM3LCAweDBhfSwKKyAgICB7MHhjOCwgMHgwZX0sCisgICAgezB4YzksIDB4MDF9LAorICAgIHsweGNhLCAweDY4fSwKKyAgICB7MHhjYiwgMHhhN30sCisgICAgezB4Y2MsIDB4M2N9LAorICAgIHsweGNkLCAweDEwfSwKKyAgICB7MHhjZSwgMHgwMH0sCisgICAgezB4Y2YsIDB4MjV9LAorICAgIHsweGQwLCAweDQwfSwKKyAgICB7MHhkMSwgMHgxMn0sCisgICAgezB4ZDIsIDB4MDB9LAorICAgIHsweGQzLCAweDAwfSwKKyAgICB7MHhkNCwgMHgxMH0sCisgICAgezB4ZDUsIDB4Mjh9LAorICAgIHsweGQ2LCAweDgwfSwKKyAgICB7MHhkNywgMHgyQX0sCisgICAgezB4ZDgsIDB4MDB9LAorICAgIHsweGQ5LCAweDAwfSwKKyAgICB7MHhkYSwgMHgwMH0sCisgICAgezB4ZGIsIDB4MDB9LAorICAgIHsweGRjLCAweDAwfSwKKyAgICB7MHhkZCwgMHgwMH0sCisgICAgezB4ZGUsIDB4MDB9LAorICAgIHsweGRmLCAweDAwfSwKKyAgICB7MHhlMCwgMHgwMH0sCisgICAgezB4ZTEsIDB4QjN9LAorICAgIHsweGUyLCAweDAwfSwKKyAgICB7MHhlMywgMHgwMH0sCisgICAgezB4ZTQsIDB4MDB9LAorICAgIHsweGU1LCAweDEwfSwKKyAgICB7MHhlNiwgMHgwMH0sCisgICAgezB4ZTcsIDB4MUN9LAorICAgIHsweGU4LCAweDAwfSwKKyAgICB7MHhlOSwgMHhmNH0sCisgICAgezB4ZWEsIDB4MDB9LAorICAgIHsweGViLCAweGZmfSwKKyAgICB7MHhlYywgMHg3OX0sCisgICAgezB4ZWQsIDB4MjB9LAorICAgIHsweGVlLCAweDMwfSwKKyAgICB7MHhlZiwgMHgwMX0sCisgICAgezB4ZjAsIDB4MDB9LAorICAgIHsweGYxLCAweDNlfSwKKyAgICB7MHhmMiwgMHgwMH0sCisgICAgezB4ZjMsIDB4MDB9LAorICAgIHsweGY0LCAweDAwfSwKKyAgICB7MHhmNSwgMHgwMH0sCisgICAgezB4ZjYsIDB4MDB9LAorICAgIHsweGY3LCAweDAwfSwKKyAgICB7MHhmOCwgMHgwMH0sCisgICAgezB4ZjksIDB4MDB9LAorICAgIHsweGZhLCAweDAwfSwKKyAgICB7MHhmYiwgMHgwMH0sCisgICAgezB4ZmMsIDB4MDB9LAorICAgIHsweGZkLCAweDAwfSwKKyAgICB7MHhmZSwgMHgwMH0sCisgICAgezB4ZmYsIDB4MDB9LAorfTsKKworCisKKyNkZWZpbmUgQ0JfVlQzMjUzQjBfSU5JVF9GT1JfVVcyNDUxIDI1NgorLy9Gb3IgVVcyNDUxCitCWVRFIGJ5VlQzMjUzQjBfVVcyNDUxW0NCX1ZUMzI1M0IwX0lOSVRfRk9SX1VXMjQ1MV1bMl0gPSB7CisgICAgezB4MDAsIDB4MzF9LAorICAgIHsweDAxLCAweDAwfSwKKyAgICB7MHgwMiwgMHgwMH0sCisgICAgezB4MDMsIDB4MDB9LAorICAgIHsweDA0LCAweDAwfSwKKyAgICB7MHgwNSwgMHg4MX0sCisgICAgezB4MDYsIDB4MDB9LAorICAgIHsweDA3LCAweDAwfSwKKyAgICB7MHgwOCwgMHgzOH0sCisgICAgezB4MDksIDB4NDV9LAorICAgIHsweDBhLCAweDI4fSwKKyAgICB7MHgwYiwgMHg3Nn0sCisgICAgezB4MGMsIDB4MDB9LAorICAgIHsweDBkLCAweDAwfSwKKyAgICB7MHgwZSwgMHg4MH0sCisgICAgezB4MGYsIDB4MDB9LAorICAgIHsweDEwLCAweDAwfSwKKyAgICB7MHgxMSwgMHgwMH0sCisgICAgezB4MTIsIDB4MDB9LAorICAgIHsweDEzLCAweDAwfSwKKyAgICB7MHgxNCwgMHgwMH0sCisgICAgezB4MTUsIDB4MDB9LAorICAgIHsweDE2LCAweDAwfSwKKyAgICB7MHgxNywgMHgwMH0sCisgICAgezB4MTgsIDB4MDB9LAorICAgIHsweDE5LCAweDAwfSwKKyAgICB7MHgxYSwgMHgwMH0sCisgICAgezB4MWIsIDB4OGZ9LAorICAgIHsweDFjLCAweDBmfSwKKyAgICB7MHgxZCwgMHgwMH0sCisgICAgezB4MWUsIDB4MDB9LAorICAgIHsweDFmLCAweDAwfSwKKyAgICB7MHgyMCwgMHgwMH0sCisgICAgezB4MjEsIDB4MDB9LAorICAgIHsweDIyLCAweDAwfSwKKyAgICB7MHgyMywgMHgwMH0sCisgICAgezB4MjQsIDB4MDB9LAorICAgIHsweDI1LCAweDRhfSwKKyAgICB7MHgyNiwgMHgwMH0sCisgICAgezB4MjcsIDB4MDB9LAorICAgIHsweDI4LCAweDAwfSwKKyAgICB7MHgyOSwgMHgwMH0sCisgICAgezB4MmEsIDB4MDB9LAorICAgIHsweDJiLCAweDAwfSwKKyAgICB7MHgyYywgMHgwMH0sCisgICAgezB4MmQsIDB4MTh9LAorICAgIHsweDJlLCAweDAwfSwKKyAgICB7MHgyZiwgMHgwYX0sCisgICAgezB4MzAsIDB4MjZ9LAorICAgIHsweDMxLCAweDVifSwKKyAgICB7MHgzMiwgMHgwMH0sCisgICAgezB4MzMsIDB4MDB9LAorICAgIHsweDM0LCAweDAwfSwKKyAgICB7MHgzNSwgMHgwMH0sCisgICAgezB4MzYsIDB4YWF9LAorICAgIHsweDM3LCAweGFhfSwKKyAgICB7MHgzOCwgMHhmZn0sCisgICAgezB4MzksIDB4ZmZ9LAorICAgIHsweDNhLCAweDAwfSwKKyAgICB7MHgzYiwgMHgwMH0sCisgICAgezB4M2MsIDB4MDB9LAorICAgIHsweDNkLCAweDAzfSwKKyAgICB7MHgzZSwgMHgxZH0sCisgICAgezB4M2YsIDB4MDR9LAorICAgIHsweDQwLCAweDAwfSwKKyAgICB7MHg0MSwgMHgwOH0sCisgICAgezB4NDIsIDB4MDB9LAorICAgIHsweDQzLCAweDA4fSwKKyAgICB7MHg0NCwgMHgwOH0sCisgICAgezB4NDUsIDB4MTR9LAorICAgIHsweDQ2LCAweDA1fSwKKyAgICB7MHg0NywgMHgwOX0sCisgICAgezB4NDgsIDB4MDB9LAorICAgIHsweDQ5LCAweDAwfSwKKyAgICB7MHg0YSwgMHgwMH0sCisgICAgezB4NGIsIDB4MDB9LAorICAgIHsweDRjLCAweDA5fSwKKyAgICB7MHg0ZCwgMHg5MH0sCisgICAgezB4NGUsIDB4MDB9LAorICAgIHsweDRmLCAweGM1fSwKKyAgICB7MHg1MCwgMHgxNX0sCisgICAgezB4NTEsIDB4MTl9LAorICAgIHsweDUyLCAweDAwfSwKKyAgICB7MHg1MywgMHgwMH0sCisgICAgezB4NTQsIDB4MDB9LAorICAgIHsweDU1LCAweDAwfSwKKyAgICB7MHg1NiwgMHgwMH0sCisgICAgezB4NTcsIDB4MDB9LAorICAgIHsweDU4LCAweDAwfSwKKyAgICB7MHg1OSwgMHhiMH0sCisgICAgezB4NWEsIDB4MDB9LAorICAgIHsweDViLCAweDAwfSwKKyAgICB7MHg1YywgMHgwMH0sCisgICAgezB4NWQsIDB4MDB9LAorICAgIHsweDVlLCAweDAwfSwKKyAgICB7MHg1ZiwgMHgwMH0sCisgICAgezB4NjAsIDB4YjN9LAorICAgIHsweDYxLCAweDgxfSwKKyAgICB7MHg2MiwgMHgwMH0sCisgICAgezB4NjMsIDB4MDB9LAorICAgIHsweDY0LCAweDAwfSwKKyAgICB7MHg2NSwgMHgwMH0sCisgICAgezB4NjYsIDB4NTd9LAorICAgIHsweDY3LCAweDZjfSwKKyAgICB7MHg2OCwgMHgwMH0sCisgICAgezB4NjksIDB4MDB9LAorICAgIHsweDZhLCAweDAwfSwKKyAgICB7MHg2YiwgMHgwMH0sCisgICAgLy97MHg2YywgMHg4MH0sCisgICAgezB4NmMsIDB4MDB9LCAvL1JvYmVydFl1OjIwMDUwMTI1LCByZXF1ZXN0IGJ5IEpKU3VlCisgICAgezB4NmQsIDB4MDN9LAorICAgIHsweDZlLCAweDAxfSwKKyAgICB7MHg2ZiwgMHgwMH0sCisgICAgezB4NzAsIDB4MDB9LAorICAgIHsweDcxLCAweDAwfSwKKyAgICB7MHg3MiwgMHgwMH0sCisgICAgezB4NzMsIDB4MDB9LAorICAgIHsweDc0LCAweDAwfSwKKyAgICB7MHg3NSwgMHgwMH0sCisgICAgezB4NzYsIDB4MDB9LAorICAgIHsweDc3LCAweDAwfSwKKyAgICB7MHg3OCwgMHgwMH0sCisgICAgezB4NzksIDB4MDB9LAorICAgIHsweDdhLCAweDAwfSwKKyAgICB7MHg3YiwgMHgwMH0sCisgICAgezB4N2MsIDB4MDB9LAorICAgIHsweDdkLCAweDAwfSwKKyAgICB7MHg3ZSwgMHgwMH0sCisgICAgezB4N2YsIDB4MDB9LAorICAgIHsweDgwLCAweDhjfSwKKyAgICB7MHg4MSwgMHgwMH0sCisgICAgezB4ODIsIDB4MGV9LAorICAgIHsweDgzLCAweDAwfSwKKyAgICB7MHg4NCwgMHgwMH0sCisgICAgezB4ODUsIDB4MDB9LAorICAgIHsweDg2LCAweDAwfSwKKyAgICB7MHg4NywgMHgwMH0sCisgICAgezB4ODgsIDB4MDh9LAorICAgIHsweDg5LCAweDAwfSwKKyAgICB7MHg4YSwgMHgwZX0sCisgICAgezB4OGIsIDB4YTd9LAorICAgIHsweDhjLCAweDg4fSwKKyAgICB7MHg4ZCwgMHg0N30sCisgICAgezB4OGUsIDB4YWF9LAorICAgIHsweDhmLCAweDAyfSwKKyAgICB7MHg5MCwgMHgwMH0sCisgICAgezB4OTEsIDB4MDB9LAorICAgIHsweDkyLCAweDAwfSwKKyAgICB7MHg5MywgMHgwMH0sCisgICAgezB4OTQsIDB4MDB9LAorICAgIHsweDk1LCAweDAwfSwKKyAgICB7MHg5NiwgMHgwMH0sCisgICAgezB4OTcsIDB4ZTN9LAorICAgIHsweDk4LCAweDAwfSwKKyAgICB7MHg5OSwgMHgwMH0sCisgICAgezB4OWEsIDB4MDB9LAorICAgIHsweDliLCAweDAwfSwKKyAgICB7MHg5YywgMHgwMH0sCisgICAgezB4OWQsIDB4MDB9LAorICAgIHsweDllLCAweDAwfSwKKyAgICB7MHg5ZiwgMHgwMH0sCisgICAgezB4YTAsIDB4MDB9LAorICAgIHsweGExLCAweDAwfSwKKyAgICB7MHhhMiwgMHgwMH0sCisgICAgezB4YTMsIDB4MDB9LAorICAgIHsweGE0LCAweDAwfSwKKyAgICB7MHhhNSwgMHgwMH0sCisgICAgezB4YTYsIDB4MTB9LAorICAgIHsweGE3LCAweDAwfSwKKyAgICB7MHhhOCwgMHgxOH0sCisgICAgezB4YTksIDB4MDB9LAorICAgIHsweGFhLCAweDAwfSwKKyAgICB7MHhhYiwgMHgwMH0sCisgICAgezB4YWMsIDB4MDB9LAorICAgIHsweGFkLCAweDAwfSwKKyAgICB7MHhhZSwgMHgwMH0sCisgICAgezB4YWYsIDB4MTh9LAorICAgIHsweGIwLCAweDE4fSwKKyAgICB7MHhiMSwgMHgzMH0sCisgICAgezB4YjIsIDB4MDB9LAorICAgIHsweGIzLCAweDAwfSwKKyAgICB7MHhiNCwgMHgwMH0sCisgICAgezB4YjUsIDB4MDB9LAorICAgIHsweGI2LCAweDAwfSwKKyAgICB7MHhiNywgMHgwMH0sCisgICAgezB4YjgsIDB4MDB9LAorICAgIHsweGI5LCAweDAwfSwKKyAgICB7MHhiYSwgMHgwMH0sCisgICAgezB4YmIsIDB4MDN9LAorICAgIHsweGJjLCAweDAxfSwKKyAgICB7MHhiZCwgMHgwMH0sCisgICAgezB4YmUsIDB4MDB9LAorICAgIHsweGJmLCAweDAwfSwKKyAgICB7MHhjMCwgMHgxMH0sCisgICAgezB4YzEsIDB4MjB9LAorICAgIHsweGMyLCAweDAwfSwKKyAgICB7MHhjMywgMHgyMH0sCisgICAgezB4YzQsIDB4MDB9LAorICAgIHsweGM1LCAweDJjfSwKKyAgICB7MHhjNiwgMHgxY30sCisgICAgezB4YzcsIDB4MTB9LAorICAgIHsweGM4LCAweDEwfSwKKyAgICB7MHhjOSwgMHgwMX0sCisgICAgezB4Y2EsIDB4Njh9LAorICAgIHsweGNiLCAweGE3fSwKKyAgICB7MHhjYywgMHgzY30sCisgICAgezB4Y2QsIDB4MDl9LAorICAgIHsweGNlLCAweDAwfSwKKyAgICB7MHhjZiwgMHgyMH0sCisgICAgezB4ZDAsIDB4NDB9LAorICAgIHsweGQxLCAweDEwfSwKKyAgICB7MHhkMiwgMHgwMH0sCisgICAgezB4ZDMsIDB4MDB9LAorICAgIHsweGQ0LCAweDIwfSwKKyAgICB7MHhkNSwgMHgyOH0sCisgICAgezB4ZDYsIDB4YTB9LA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MF9BR0NbQ0JfVlQzMjUzQjBfQUdDXVsyXSA9IHsKKyAgICB7MHhGMCwgMHgwMH0sCisgICAgezB4RjEsIDB4MDB9LAorICAgIHsweEYwLCAweDgwfSwKKyAgICB7MHhGMCwgMHgwMX0sCisgICAgezB4RjEsIDB4MDB9LAorICAgIHsweEYwLCAweDgxfSwKKyAgICB7MHhGMCwgMHgwMn0sCisgICAgezB4RjEsIDB4MDJ9LAorICAgIHsweEYwLCAweDgyfSwKKyAgICB7MHhGMCwgMHgwM30sCisgICAgezB4RjEsIDB4MDR9LAorICAgIHsweEYwLCAweDgzfSwKKyAgICB7MHhGMCwgMHgwM30sCisgICAgezB4RjEsIDB4MDR9LAorICAgIHsweEYwLCAweDg0fSwKKyAgICB7MHhGMCwgMHgwNH0sCisgICAgezB4RjEsIDB4MDZ9LAorICAgIHsweEYwLCAweDg1fSwKKyAgICB7MHhGMCwgMHgwNX0sCisgICAgezB4RjEsIDB4MDZ9LAorICAgIHsweEYwLCAweDg2fSwKKyAgICB7MHhGMCwgMHgwNn0sCisgICAgezB4RjEsIDB4MDZ9LAorICAgIHsweEYwLCAweDg3fSwKKyAgICB7MHhGMCwgMHgwN30sCisgICAgezB4RjEsIDB4MDh9LAorICAgIHsweEYwLCAweDg4fSwKKyAgICB7MHhGMCwgMHgwOH0sCisgICAgezB4RjEsIDB4MDh9LAorICAgIHsweEYwLCAweDg5fSwKKyAgICB7MHhGMCwgMHgwOX0sCisgICAgezB4RjEsIDB4MEF9LAorICAgIHsweEYwLCAweDhBfSwKKyAgICB7MHhGMCwgMHgwQX0sCisgICAgezB4RjEsIDB4MEF9LAorICAgIHsweEYwLCAweDhCfSwKKyAgICB7MHhGMCwgMHgwQn0sCisgICAgezB4RjEsIDB4MEN9LAorICAgIHsweEYwLCAweDhDfSwKKyAgICB7MHhGMCwgMHgwQ30sCisgICAgezB4RjEsIDB4MEN9LAorICAgIHsweEYwLCAweDhEfSwKKyAgICB7MHhGMCwgMHgwRH0sCisgICAgezB4RjEsIDB4MEV9LAorICAgIHsweEYwLCAweDhFfSwKKyAgICB7MHhGMCwgMHgwRX0sCisgICAgezB4RjEsIDB4MEV9LAorICAgIHsweEYwLCAweDhGfSwKKyAgICB7MHhGMCwgMHgwRn0sCisgICAgezB4RjEsIDB4MTB9LAorICAgIHsweEYwLCAweDkwfSwKKyAgICB7MHhGMCwgMHgxMH0sCisgICAgezB4RjEsIDB4MTB9LAorICAgIHsweEYwLCAweDkxfSwKKyAgICB7MHhGMCwgMHgxMX0sCisgICAgezB4RjEsIDB4MTJ9LAorICAgIHsweEYwLCAweDkyfSwKKyAgICB7MHhGMCwgMHgxMn0sCisgICAgezB4RjEsIDB4MTJ9LAorICAgIHsweEYwLCAweDkzfSwKKyAgICB7MHhGMCwgMHgxM30sCisgICAgezB4RjEsIDB4MTR9LAorICAgIHsweEYwLCAweDk0fSwKKyAgICB7MHhGMCwgMHgxNH0sCisgICAgezB4RjEsIDB4MTR9LAorICAgIHsweEYwLCAweDk1fSwKKyAgICB7MHhGMCwgMHgxNX0sCisgICAgezB4RjEsIDB4MTZ9LAorICAgIHsweEYwLCAweDk2fSwKKyAgICB7MHhGMCwgMHgxNn0sCisgICAgezB4RjEsIDB4MTZ9LAorICAgIHsweEYwLCAweDk3fSwKKyAgICB7MHhGMCwgMHgxN30sCisgICAgezB4RjEsIDB4MTh9LAorICAgIHsweEYwLCAweDk4fSwKKyAgICB7MHhGMCwgMHgxOH0sCisgICAgezB4RjEsIDB4MTh9LAorICAgIHsweEYwLCAweDk5fSwKKyAgICB7MHhGMCwgMHgxOX0sCisgICAgezB4RjEsIDB4MUF9LAorICAgIHsweEYwLCAweDlBfSwKKyAgICB7MHhGMCwgMHgxQX0sCisgICAgezB4RjEsIDB4MUF9LAorICAgIHsweEYwLCAweDlCfSwKKyAgICB7MHhGMCwgMHgxQn0sCisgICAgezB4RjEsIDB4MUN9LAorICAgIHsweEYwLCAweDlDfSwKKyAgICB7MHhGMCwgMHgxQ30sCisgICAgezB4RjEsIDB4MUN9LAorICAgIHsweEYwLCAweDlEfSwKKyAgICB7MHhGMCwgMHgxRH0sCisgICAgezB4RjEsIDB4MUV9LAorICAgIHsweEYwLCAweDlFfSwKKyAgICB7MHhGMCwgMHgxRX0sCisgICAgezB4RjEsIDB4MUV9LAorICAgIHsweEYwLCAweDlGfSwKKyAgICB7MHhGMCwgMHgxRn0sCisgICAgezB4RjEsIDB4MjB9LAorICAgIHsweEYwLCAweEEwfSwKKyAgICB7MHhGMCwgMHgyMH0sCisgICAgezB4RjEsIDB4MjB9LAorICAgIHsweEYwLCAweEExfSwKKyAgICB7MHhGMCwgMHgyMX0sCisgICAgezB4RjEsIDB4MjJ9LAorICAgIHsweEYwLCAweEEyfSwKKyAgICB7MHhGMCwgMHgyMn0sCisgICAgezB4RjEsIDB4MjJ9LAorICAgIHsweEYwLCAweEEzfSwKKyAgICB7MHhGMCwgMHgyM30sCisgICAgezB4RjEsIDB4MjR9LAorICAgIHsweEYwLCAweEE0fSwKKyAgICB7MHhGMCwgMHgyNH0sCisgICAgezB4RjEsIDB4MjR9LAorICAgIHsweEYwLCAweEE1fSwKKyAgICB7MHhGMCwgMHgyNX0sCisgICAgezB4RjEsIDB4MjZ9LAorICAgIHsweEYwLCAweEE2fSwKKyAgICB7MHhGMCwgMHgyNn0sCisgICAgezB4RjEsIDB4MjZ9LAorICAgIHsweEYwLCAweEE3fSwKKyAgICB7MHhGMCwgMHgyN30sCisgICAgezB4RjEsIDB4Mjh9LAorICAgIHsweEYwLCAweEE4fSwKKyAgICB7MHhGMCwgMHgyOH0sCisgICAgezB4RjEsIDB4Mjh9LAorICAgIHsweEYwLCAweEE5fSwKKyAgICB7MHhGMCwgMHgyOX0sCisgICAgezB4RjEsIDB4MkF9LAorICAgIHsweEYwLCAweEFBfSwKKyAgICB7MHhGMCwgMHgyQX0sCisgICAgezB4RjEsIDB4MkF9LAorICAgIHsweEYwLCAweEFCfSwKKyAgICB7MHhGMCwgMHgyQn0sCisgICAgezB4RjEsIDB4MkN9LAorICAgIHsweEYwLCAweEFDfSwKKyAgICB7MHhGMCwgMHgyQ30sCisgICAgezB4RjEsIDB4MkN9LAorICAgIHsweEYwLCAweEFEfSwKKyAgICB7MHhGMCwgMHgyRH0sCisgICAgezB4RjEsIDB4MkV9LAorICAgIHsweEYwLCAweEFFfSwKKyAgICB7MHhGMCwgMHgyRX0sCisgICAgezB4RjEsIDB4MkV9LAorICAgIHsweEYwLCAweEFGfSwKKyAgICB7MHhGMCwgMHgyRn0sCisgICAgezB4RjEsIDB4MzB9LAorICAgIHsweEYwLCAweEIwfSwKKyAgICB7MHhGMCwgMHgzMH0sCisgICAgezB4RjEsIDB4MzB9LAorICAgIHsweEYwLCAweEIxfSwKKyAgICB7MHhGMCwgMHgzMX0sCisgICAgezB4RjEsIDB4MzJ9LAorICAgIHsweEYwLCAweEIyfSwKKyAgICB7MHhGMCwgMHgzMn0sCisgICAgezB4RjEsIDB4MzJ9LAorICAgIHsweEYwLCAweEIzfSwKKyAgICB7MHhGMCwgMHgzM30sCisgICAgezB4RjEsIDB4MzR9LAorICAgIHsweEYwLCAweEI0fSwKKyAgICB7MHhGMCwgMHgzNH0sCisgICAgezB4RjEsIDB4MzR9LAorICAgIHsweEYwLCAweEI1fSwKKyAgICB7MHhGMCwgMHgzNX0sCisgICAgezB4RjEsIDB4MzZ9LAorICAgIHsweEYwLCAweEI2fSwKKyAgICB7MHhGMCwgMHgzNn0sCisgICAgezB4RjEsIDB4MzZ9LAorICAgIHsweEYwLCAweEI3fSwKKyAgICB7MHhGMCwgMHgzN30sCisgICAgezB4RjEsIDB4Mzh9LAorICAgIHsweEYwLCAweEI4fSwKKyAgICB7MHhGMCwgMHgzOH0sCisgICAgezB4RjEsIDB4Mzh9LAorICAgIHsweEYwLCAweEI5fSwKKyAgICB7MHhGMCwgMHgzOX0sCisgICAgezB4RjEsIDB4M0F9LAorICAgIHsweEYwLCAweEJBfSwKKyAgICB7MHhGMCwgMHgzQX0sCisgICAgezB4R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5zbWl0dGluZyB0aW1lCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgYnlQcmVhbWJsZVR5cGUgIC0gUHJlYW1ibGUgVHlwZQorICogICAgICBieVBrdFR5cGUgICAgICAgIC0gUEtfVFlQRV8xMUEsIFBLX1RZUEVfMTFCLCBQS19UWVBFXzExR0IsIFBLX1RZUEVfMTFHQQorICogICAgICBjYkZyYW1lTGVuZ3RoICAgLSBCYXNlYmFuZCBUeXBlCisgKiAgICAgIHdSYXRlICAgICAgICAgICAtIFR4IFJhdGUKKyAqICBPdXQ6CisgKgorICogUmV0dXJuIFZhbHVlOiBGcmFtZVRpbWUKKyAqCisgKi8KK1VJTlQKK0JCdUdldEZyYW1lVGltZSAoCisgICAgSU4gQllURSBieVByZWFtYmxlVHlwZSwKKyAgICBJTiBCWVRFIGJ5UGt0VHlwZSwKKyAgICBJTiBVSU5UIGNiRnJhbWVMZW5ndGgsCisgICAgSU4gV09SRCB3UmF0ZQorICAgICkKK3sKKyAgICBVSU5UIHVGcmFtZVRpbWU7CisgICAgVUlOVCB1UHJlYW1ibGU7CisgICAgVUlOVCB1VG1wOworICAgIFVJTlQgdVJhdGVJZHggPSAoVUlOVCl3UmF0ZTsKKyAgICBVSU5UIHVSYXRlID0gMDsKKworCisgICAgaWYgKHVSYXRlSWR4ID4gUkFURV81NE0pIHsKKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorCisgICAgdVJhdGUgPSAoVUlOVClhd2NGcmFtZVRpbWVbdVJhdGVJZHhdOworCisgICAgaWYgKHVSYXRlSWR4IDw9IDMpIHsgICAgICAgICAgLy9DQ0sgbW9kZQorCisgICAgICAgIGlmIChieVByZWFtYmxlVHlwZSA9PSAxKSB7Ly9TaG9ydAorICAgICAgICAgICAgdVByZWFtYmxlID0gOTY7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICB1UHJlYW1ibGUgPSAxOTI7CisgICAgICAgIH0KKyAgICAgICAgdUZyYW1lVGlt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AgIC0gVHggUmF0ZQorICogIE91dDoKKyAqICAgICAgcHdQaHlMZW4gICAgICAgIC0gcG9pbnRlciB0byBQaHkgTGVuZ3RoIGZpZWxkCisgKiAgICAgIHBieVBoeVNydiAgICAgICAtIHBvaW50ZXIgdG8gUGh5IFNlcnZpY2UgZmllbGQKKyAqICAgICAgcGJ5UGh5U2duICAgICAgIC0gcG9pbnRlciB0byBQaHkgU2lnbmFsIGZpZWxkCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitWT0lECitCQnZDYWN1bGF0ZVBhcmFtZXRlciAoCisgICAgSU4gIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gIFVJTlQgY2JGcmFtZUxlbmd0aCwKKyAgICBJTiAgV09SRCB3UmF0ZSwKKyAgICBJTiAgQllURSBieVBhY2tldFR5cGUsCisgICAgT1VUIFBXT1JEIHB3UGh5TGVuLAorICAgIE9VVCBQQllURSBwYnlQaHlTcnYsCisgICAgT1VUIFBCWVRFIHBieVBoeVNnbgorICAgICkKK3sKKyAgICBVSU5UIGNiQml0Q291bnQ7CisgICAgVUlOVCBjYlVzQ291bnQgPSAwOworICAgIFVJTlQgY2JUbXA7CisgICAgQk9PTCBiRXh0Qml0OworICAgIEJZVEUgYnlQcmVhbWJsZVR5cGUgPSBwRGV2aWNlLT5ieVByZWFtYmxlVHlwZTsKKyAgICBCT09MIGJDQ0sgPSBwRGV2aWNlLT5iQ0NLOworCisgICAgY2JCaXRDb3VudCA9IGNiRnJhbWVMZW5ndGggKiA4OworICAgIGJFeHRCaXQgPSBGQUxTRTsKKworICAgIHN3aXRjaCAod1JhdGUpIHsKKyAgICBjYXNlIFJBVEVfMU0gOgorICAgICAgICBjYlVzQ291bnQgPSBjYkJpdENvdW50OworICAgICAgICAqcGJ5UGh5U2duID0gMHgwMDsKKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfMk0gOgorICAgICAgICBjYlVzQ291bnQgPSBjYkJpdENvdW50IC8gMjsKKyAgICAgICAgaWYgKGJ5UHJlYW1ibGVUeXBlID09IDEpCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwOTsKKyAgICAgICAgZWxzZSAvLyBsb25nIHByZWFtYmxlCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwMTsKKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfNU0gOgorICAgICAgICBpZiAoYkNDSyA9PSBGQUxTRSkKKyAgICAgICAgICAgIGNiQml0Q291bnQgKys7CisgICAgICAgIGNiVXNDb3VudCA9IChjYkJpdENvdW50ICogMTApIC8gNTU7CisgICAgICAgIGNiVG1wID0gKGNiVXNDb3VudCAqIDU1KSAvIDEwOworICAgICAgICBpZiAoY2JUbXAgIT0gY2JCaXRDb3VudCkKKyAgICAgICAgICAgIGNiVXNDb3VudCArKzsKKyAgICAgICAgaWYgKGJ5UHJlYW1ibGVUeXBlID09IDEpCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwYTsKKyAgICAgICAgZWxzZSAvLyBsb25nIHByZWFtYmxlCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHgwMjsKKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfMTFNIDoKKworICAgICAgICBpZiAoYkNDSyA9PSBGQUxTRSkKKyAgICAgICAgICAgIGNiQml0Q291bnQgKys7CisgICAgICAgIGNiVXNDb3VudCA9IGNiQml0Q291bnQgLyAxMTsKKyAgICAgICAgY2JUbXAgPSBjYlVzQ291bnQgKiAxMTsKKyAgICAgICAgaWYgKGNiVG1wICE9IGNiQml0Q291bnQpIHsKKyAgICAgICAgICAgIGNiVXNDb3VudCArKzsKKyAgICAgICAgICAgIGlmICgoY2JCaXRDb3VudCAtIGNiVG1wKSA8PSAzKQorICAgICAgICAgICAgICAgIGJFeHRCaXQgPSBUUlVFOworICAgICAgICB9CisgICAgICAgIGlmIChieVByZWFtYmxlVHlwZSA9PSAxKQorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4MGI7CisgICAgICAgIGVsc2UgLy8gbG9uZyBwcmVhbWJsZQorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4MDM7CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBSQVRFXzZNIDoKKyAgICAgICAgaWYoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlCOyAvLzEwMDEgMTAxMQorICAgICAgICB9CisgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhCOyAvLzEwMDAgMTAxMQorICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBSQVRFXzlNIDoKKyAgICAgICAgaWYoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlGOyAvLzEwMDEgMTExMQorICAgICAgICB9CisgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhGOyAvLzEwMDAgMTExMQorICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBSQVRFXzEyTSA6CisgICAgICAgIGlmKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5QTsgLy8xMDAxIDEwMTAKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsvLzExZywgMi40R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg4QTsgLy8xMDAwIDEwMTAKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgUkFURV8xOE0gOgorICAgICAgICBpZihieVBhY2tldFR5cGUgPT0gUEtfVFlQRV8xMUEpIHsvLzExYSwgNUdIWgorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OUU7IC8vMTAwMSAxMTEwCisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OEU7IC8vMTAwMCAxMTEwCisgICAgICAgIH0KKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfMjRNIDoKKyAgICAgICAgaWYoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDk5OyAvLzEwMDEgMTAwMQorICAgICAgICB9CisgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDg5OyAvLzEwMDAgMTAwMQorICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBSQVRFXzM2TSA6CisgICAgICAgIGlmKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5RDsgLy8xMDAxIDExMDEKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsvLzExZywgMi40R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg4RDsgLy8xMDAwIDExMDEKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgUkFURV80OE0gOgorICAgICAgICBpZihieVBhY2tldFR5cGUgPT0gUEtfVFlQRV8xMUEpIHsvLzExYSwgNUdIWgorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4OTg7IC8vMTAwMSAxMDAwCisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7Ly8xMWcsIDIuNEdIWgorICAgICAgICAgICAgKnBieVBoeVNnbiA9IDB4ODg7IC8vMTAwMCAxMDAwCisgICAgICAgIH0KKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfNTRNIDoKKyAgICAgICAgaWYgKGJ5UGFja2V0VHlwZSA9PSBQS19UWVBFXzExQSkgey8vMTFhLCA1R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg5QzsgLy8xMDAxIDExMDAKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsvLzExZywgMi40R0haCisgICAgICAgICAgICAqcGJ5UGh5U2duID0gMHg4QzsgLy8xMDAwIDExMDAKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGRlZmF1bHQgOgorICAgICAgICBpZiAoYnlQYWNrZXRUeXBlID09IFBLX1RZUEVfMTFBKSB7Ly8xMWEsIDVHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDlDOyAvLzEwMDEgMTEwMAorICAgICAgICB9CisgICAgICAgIGVsc2Ugey8vMTFnLCAyLjRHSFoKKyAgICAgICAgICAgICpwYnlQaHlTZ24gPSAweDhDOyAvLzEwMDAgMTEwMAorICAgICAgICB9CisgICAgICAgIGJyZWFrOworICAgIH0KKworICAgIGlmIChieVBhY2tldFR5cGUgPT0gUEtfVFlQRV8xMUIpIHsKKyAgICAgICAgKnBieVBoeVNydiA9IDB4MDA7CisgICAgICAgIGlmIChiRXh0Qml0KQorICAgICAgICAgICAgKnBieVBoeVNydiA9ICpwYnlQaHlTcnYgfCAweDgwOworICAgICAgICAqcHdQaHlMZW4gPSAoV09SRCljYlVzQ291bnQ7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICAqcGJ5UGh5U3J2ID0gMHgwMDsKKyAgICAgICAgKnB3UGh5TGVuID0gKFdPUkQpY2JGcmFtZUxlbmd0aDsKKyAgICB9Cit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjogUmVhZCBhIGJ5dGUgZnJvbSBCQVNFQkFORCwgYnkgZW1iZWRlZCBwcm9ncmFtbWluZworICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGR3SW9CYXNlICAgIC0gSS9PIGJhc2UgYW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WR0FbMl0gPSAweDA7CisgICAgICAgIHBEZXZpY2UtPmFieUJCVkdBWzNdID0gMHgwOworICAgICAgICBwRGV2aWNlLT5sZEJtVGhyZXNob2xkWzBdID0gLTcwOworICAgICAgICBwRGV2aWNlLT5sZEJtVGhyZXNob2xkWzFdID0gLTQ4OworICAgICAgICBwRGV2aWNlLT5sZEJtVGhyZXNob2xkWzJdID0gMDsKKyAgICAgICAgcERldmljZS0+bGRCbVRocmVzaG9sZFszXSA9IDA7CisgICAgLy99fSBSb2JlcnRZdQorICAgIH0gZWxzZSB7CisgICAgCS8vIE5vIFZHQSBUYWJsZSBub3cKKyAgICAJcERldmljZS0+YlVwZGF0ZUJCVkdBID0gRkFMU0U7CisgICAgICAgIHBEZXZpY2UtPmFieUJCVkdBWzBdID0gMHgxQzsKKyAgICB9CisKKyAgICBpZiAoYnlMb2NhbElEID4gUkVWX0lEX1ZUMzI1M19BMSkgeworICAgICAgICBCQmJXcml0ZUVtYmVkZWQoZHdJb0Jhc2UsIDB4MDQsIDB4N0YpOworICAgICAgICBCQmJXcml0ZUVtYmVkZWQoZHdJb0Jhc2UsIDB4MEQsIDB4MDEpOworICAgIH0KKworICAgIHJldHVybiBiUmVzdWx0OworfQorCisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBSZWFkIEFsbCBCYXNlYmFuZCBSZWdpc3RlcnMKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBkd0lvQmFzZSAgICAtIEkvTyBiYXNlIGFkZHJlc3MKKyAqICAgICAgcGJ5QkJSZWdzICAgLSBQb2ludCB0byBzdHJ1Y3QgdGhhdCBzdG9yZXMgQmFzZWJhbmQgUmVnaXN0ZXJzCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitWT0lEIEJCdlJlYWRBbGxSZWdzIChEV09SRF9QVFIgZHdJb0Jhc2UsIFBCWVRFIHBieUJCUmVncykKK3sKKyAgICBpbnQg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UgYnlPcmdEYXRhOworCisgICAgQkJiUmVhZEVtYmVkZWQoZHdJb0Jhc2UsIDB4MEQsICZieU9yZ0RhdGEpOworICAgIGJ5T3JnRGF0YSB8PSBCSVQwOworICAgIEJCYldyaXRlRW1iZWRlZChkd0lvQmFzZSwgMHgwRCwgYnlPcmdEYXRhKTsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBCYXNlYmFuZCBQb3dlciBTYXZlIE1vZGUgT0ZGCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgLSBJL08gYmFzZSBhZGRyZXNzCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitWT0lECitCQnZQb3dlclNhdmVNb2RlT0ZGIChEV09SRF9QVFIgZHdJb0Jhc2UpCit7CisgICAgQllURSBieU9yZ0RhdGE7CisKKyAgICBCQmJSZWFkRW1iZWRlZChkd0lvQmFzZSwgMHgwRCwgJmJ5T3JnRGF0YSk7CisgICAgYnlPcmdEYXRhICY9IH4oQklUMCk7CisgICAgQkJiV3JpdGVFbWJlZGVkKGR3SW9CYXNlLCAweDBELCBieU9yZ0RhdGEpOworfQorCisvKgorICogRGVzY3JpcHRpb246IFNldCBUeCBBbnRlbm5hIG1vZGUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgIC0gRGV2aWNlIFN0cnVjdHVyZQorICogICAgICBieUFudGVubmFNb2RlICAgIC0gQW50ZW5uYSBNb2RlCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCisKK1ZPSUQKK0JCdlNldFR4QW50ZW5uYU1vZGUgKERXT1JEX1BUUiBkd0lvQmFzZSwgQllURSBieUFudGVubmFNb2RlKQoreworICAgIEJZVEUgYnlCQlR4Q29uZjsKKworI2lmZGVmCVBMSUNFX0RFQlVHCisJLy9wcmludGsoIkVudGVyIEJCdlNldFR4QW50ZW5uYU1vZGVcbiIpOworI2VuZGlmCisgICAgQkJiUmVhZEVtYmVkZWQoZHdJb0Jhc2UsIDB4MDksICZieUJCVHhDb25mKTsvL0NSMDkKKyAgICBpZiAoYnlBbnRlbm5hTW9kZSA9PSBBTlRfRElWRVJTSVRZKSB7CisgICAgICAgIC8vIGJpdCAxIGlzIGRpdmVyc2l0eQorICAgICAgICBieUJCVHhDb25mIHw9IDB4MDI7CisgICAgfSBlbHNlIGlmIChieUFudGVubmFNb2RlID09IEFOVF9BKSB7CisgICAgICAgIC8vIGJpdCAyIGlzIEFOVFNFTAorICAgICAgICBieUJCVHhDb25mICY9IDB4Rjk7IC8vIDExMTEgMTAwMQorICAgIH0gZWxzZSBpZiAoYnlBbnRlbm5hTW9kZSA9PSBBTlRfQikgeworI2lmZGVmCVBMSUNFX0RFQlVHCisJLy9wcmludGsoIkJCdlNldFR4QW50ZW5uYU1vZGU6QU5UX0JcbiIpOworI2VuZGlmCisgICAgICAgIGJ5QkJUeENvbmYgJj0gMHhGRDsgLy8gMTExMSAxMTAxCisgICAgICAgIGJ5QkJUeENvbmYgfD0gMHgwNDsKKyAgICB9CisgICAgQkJiV3JpdGVFbWJlZGVkKGR3SW9CYXNlLCAweDA5LCBieUJCVHhDb25mKTsvL0NSMDkKK30KKworCisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBTZXQgUnggQW50ZW5uYSBtb2RlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAtIERldmljZSBTdHJ1Y3R1cmUKKyAqICAgICAgYnlBbnRlbm5hTW9kZSAgICAtIEFudGVubmEgTW9kZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLworCitWT0lECitCQnZTZXRSeEFudGVubmFNb2RlIChEV09SRF9QVFIgZHdJb0Jhc2UsIEJZVEUgYnlBbnRlbm5hTW9kZSkKK3sKKyAgICBCWVRFIGJ5QkJSeENvbmY7CisKKyAgICBCQmJSZWFkRW1iZWRlZChkd0lvQmFzZSwgMHgwQSwgJmJ5QkJSeENvbmYpOy8vQ1IxMAorICAgIGlmIChieUFudGVubmFNb2RlID09IEFOVF9ESVZFUlNJVFkpIHsKKyAgICAgICAgYnlCQlJ4Q29uZiB8PSAweDAxOworCisgICAgfSBlbHNlIGlmIChieUFudGVubmFNb2RlID09IEFOVF9BKSB7CisgICAgICAgIGJ5QkJSeENvbmYgJj0gMHhGQzsgLy8gMTExMSAxMTAwCisgICAgfSBlbHNlIGlmIChieUFudGVubmFNb2RlID09IEFOVF9CKSB7CisgICAgICAgIGJ5QkJSeENvbmYgJj0gMHhGRTsgLy8gMTExMSAxMTEwCisgICAgICAgIGJ5QkJSeENvbmYgfD0gMHgwMjsKKyAgICB9CisgICAgQkJiV3JpdGVFbWJlZGVkKGR3SW9CYXNlLCAweDBBLCBieUJCUnhDb25mKTsvL0NSMTAKK30KKworCisvKgorICogRGVzY3JpcHRpb246IEJCdlNldERlZXBTbGVlcAorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgICAgICAgLSBEZXZpY2UgU3RydWN0dXJlCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitWT0lECitCQnZTZXREZWVwU2xlZXAgKERXT1JEX1BUUiBkd0lvQmFzZSwgQllURSBieUxvY2FsSUQpCit7CisgICAgQkJiV3JpdGVFbWJlZGVkKGR3SW9CYXNlLCAweDBDLCAweDE3KTsvL0NSMTIKKyAgICBCQmJXcml0ZUVtYmVkZWQoZHdJb0Jhc2UsIDB4MEQsIDB4QjkpOy8vQ1IxMworfQorCitWT0lECitCQnZFeGl0RGVlcFNsZWVwIChEV09SRF9QVFIgZHdJb0Jhc2UsIEJZVEUgYnlMb2NhbElEKQoreworICAgIEJCYldyaXRlRW1iZWRlZChkd0lvQmFzZSwgMHgwQywgMHgwMCk7Ly9DUjEyCisgICAgQkJiV3JpdGVFbWJlZGVkKGR3SW9CYXNlLCAweDBELCAweDAxKTsvL0NSMTMKK30KKworCisKK3N0YXRpYworVUxPTkcKK3NfdWxHZXRSYXRpbyAoUFNEZXZpY2UgcERldmljZSkKK3sKK1VMT05HICAgdWxSYXRpbyA9IDA7CitVTE9ORyAgIHVsTWF4UGFja2V0OworVUxPTkcgICB1bFBhY2tldE51bTsKKworICAgIC8vVGhpcyBpcyBhIHRob3VzYW5kLXJhdGlvCisgICAgdWxNYXhQYWNrZXQgPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNTRNXTsKKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV81NE1dICE9IDAgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dU51bVNRM1tSQVRFXzU0TV07CisgICAgICAgIHVsUmF0aW8gPSAodWxQYWNrZXROdW0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIC8vdWxSYXRpbyA9IChwRGV2aWNlLT51TnVtU1EzW1JBVEVfNTRNXSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV81NE07CisgICAgfQorICAgIGlmICggcERldmljZS0+dU51bVNRM1tSQVRFXzQ4TV0gPiB1bE1heFBhY2tldCApIHsKKyAgICAgICAgdWxQYWNrZXROdW0gPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNTRNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV80OE1dOworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzQ4TV0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIHVsUmF0aW8gKz0gVE9QX1JBVEVfNDhNOworICAgICAgICB1bE1heFBhY2tldCA9IHBEZXZpY2UtPnVOdW1TUTNbUkFURV80OE1dOworICAgIH0KKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8zNk1dID4gdWxNYXhQYWNrZXQgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dU51bVNRM1tSQVRFXzU0TV0gKyBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNDhNXSArCisgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dU51bVNRM1tSQVRFXzM2TV07CisgICAgICAgIHVsUmF0aW8gPSAodWxQYWNrZXROdW0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIC8vdWxSYXRpbyA9IChwRGV2aWNlLT51TnVtU1EzW1JBVEVfMzZNXSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV8zNk07CisgICAgICAgIHVsTWF4UGFja2V0ID0gcERldmljZS0+dU51bVNRM1tSQVRFXzM2TV07CisgICAgfQorICAgIGlmICggcERldmljZS0+dU51bVNRM1tSQVRFXzI0TV0gPiB1bE1heFBhY2tldCApIHsKKyAgICAgICAgdWxQYWNrZXROdW0gPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNTRNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV80OE1dICsKKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMzZNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8yNE1dOworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzI0TV0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIHVsUmF0aW8gKz0gVE9QX1JBVEVfMjRNOworICAgICAgICB1bE1heFBhY2tldCA9IHBEZXZpY2UtPnVOdW1TUTNbUkFURV8yNE1dOworICAgIH0KKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xOE1dID4gdWxNYXhQYWNrZXQgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dU51bVNRM1tSQVRFXzU0TV0gKyBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNDhNXSArCisgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dU51bVNRM1tSQVRFXzM2TV0gKyBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMjRNXSArCisgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dU51bVNRM1tSQVRFXzE4TV07CisgICAgICAgIHVsUmF0aW8gPSAodWxQYWNrZXROdW0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIC8vdWxSYXRpbyA9IChwRGV2aWNlLT51TnVtU1EzW1JBVEVfMThNXSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV8xOE07CisgICAgICAgIHVsTWF4UGFja2V0ID0gcERldmljZS0+dU51bVNRM1tSQVRFXzE4TV07CisgICAgfQorICAgIGlmICggcERldmljZS0+dU51bVNRM1tSQVRFXzEyTV0gPiB1bE1heFBhY2tldCApIHsKKyAgICAgICAgdWxQYWNrZXROdW0gPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNTRNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV80OE1dICsKKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMzZNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8yNE1dICsKKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMThNXSArIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xMk1dOworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzEyTV0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIHVsUmF0aW8gKz0gVE9QX1JBVEVfMTJNOworICAgICAgICB1bE1heFBhY2tldCA9IHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xMk1dOworICAgIH0KKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xMU1dID4gdWxNYXhQYWNrZXQgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dURpdmVyc2l0eUNudCAtIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xTV0gLQorICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8yTV0gLSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNU1dIC0KKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNk1dIC0gcERldmljZS0+dU51bVNRM1tSQVRFXzlNXTsKKyAgICAgICAgdWxSYXRpbyA9ICh1bFBhY2tldE51bSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgLy91bFJhdGlvID0gKHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xMU1dICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICB1bFJhdGlvICs9IFRPUF9SQVRFXzExTTsKKyAgICAgICAgdWxNYXhQYWNrZXQgPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMTFNXTsKKyAgICB9CisgICAgaWYgKCBwRGV2aWNlLT51TnVtU1EzW1JBVEVfOU1dID4gdWxNYXhQYWNrZXQgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dURpdmVyc2l0eUNudCAtIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xTV0gLQorICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8yTV0gLSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNU1dIC0KKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfNk1dOworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzlNXSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV85TTsKKyAgICAgICAgdWxNYXhQYWNrZXQgPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfOU1dOworICAgIH0KKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV82TV0gPiB1bE1heFBhY2tldCApIHsKKyAgICAgICAgdWxQYWNrZXROdW0gPSBwRGV2aWNlLT51RGl2ZXJzaXR5Q250IC0gcERldmljZS0+dU51bVNRM1tSQVRFXzFNXSAtCisgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dU51bVNRM1tSQVRFXzJNXSAtIHBEZXZpY2UtPnVOdW1TUTNbUkFURV81TV07CisgICAgICAgIHVsUmF0aW8gPSAodWxQYWNrZXROdW0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIC8vdWxSYXRpbyA9IChwRGV2aWNlLT51TnVtU1EzW1JBVEVfNk1dICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICB1bFJhdGlvICs9IFRPUF9SQVRFXzZNOworICAgICAgICB1bE1heFBhY2tldCA9IHBEZXZpY2UtPnVOdW1TUTNbUkFURV82TV07CisgICAgfQorICAgIGlmICggcERldmljZS0+dU51bVNRM1tSQVRFXzVNXSA+IHVsTWF4UGFja2V0ICkgeworICAgICAgICB1bFBhY2tldE51bSA9IHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQgLSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMU1dIC0KKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMk1dOworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzVNXSAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV81NU07CisgICAgICAgIHVsTWF4UGFja2V0ID0gcERldmljZS0+dU51bVNRM1tSQVRFXzVNXTsKKyAgICB9CisgICAgaWYgKCBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMk1dID4gdWxNYXhQYWNrZXQgKSB7CisgICAgICAgIHVsUGFja2V0TnVtID0gcERldmljZS0+dURpdmVyc2l0eUNudCAtIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xTV07CisgICAgICAgIHVsUmF0aW8gPSAodWxQYWNrZXROdW0gKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIC8vdWxSYXRpbyA9IChwRGV2aWNlLT51TnVtU1EzW1JBVEVfMk1dICAqIDEwMDAgLyBwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyAgICAgICAgdWxSYXRpbyArPSBUT1BfUkFURV8yTTsKKyAgICAgICAgdWxNYXhQYWNrZXQgPSBwRGV2aWNlLT51TnVtU1EzW1JBVEVfMk1dOworICAgIH0KKyAgICBpZiAoIHBEZXZpY2UtPnVOdW1TUTNbUkFURV8xTV0gPiB1bE1heFBhY2tldCApIHsKKyAgICAgICAgdWxQYWNrZXROdW0gPSBwRGV2aWNlLT51RGl2ZXJzaXR5Q250OworICAgICAgICB1bFJhdGlvID0gKHVsUGFja2V0TnVtICogMTAwMCAvIHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworICAgICAgICAvL3VsUmF0aW8gPSAocERldmljZS0+dU51bVNRM1tSQVRFXzFNXSAgKiAxMDAwIC8gcERldmljZS0+dURpdmVyc2l0eUNudCk7CisgICAgICAgIHVsUmF0aW8gKz0gVE9QX1JBVEVfMU07CisgICAgfQorCisgICAgcmV0dXJuIHVsUmF0aW87Cit9CisKKworVk9JRAorQkJ2Q2xlYXJBbnREaXZTUTNWYWx1ZSAoUFNEZXZpY2UgcERldmljZSkKK3sKKyAgICBVSU5UICAgIGlpOworCisgICAgcERldmljZS0+dURpdmVyc2l0eUNudCA9IDA7CisgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX1JBVEU7IGlpKyspIHsKKyAgICAgICAgcERldmljZS0+dU51bVNRM1tpaV0gPSAwOworICAgIH0KK30KKworCisvKgorICogRGVzY3JpcHRpb246IEFudGVubmEgRGl2ZXJzaXR5CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAtIERldmljZSBTdHJ1Y3R1cmUKKyAqICAgICAgYnlSU1IgICAgICAgICAgICAtIFJTUiBmcm9tIHJlY2VpdmVkIHBhY2tldAorICogICAgICBieVNRMyAgICAgICAgICAgIC0gU1EzIHZhbHVlIGZyb20gcmVjZWl2ZWQgcGFja2V0CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCisKK1ZPSUQKK0JCdkFudGVubmFEaXZlcnNpdHkgKFBTRGV2aWNlIHBEZXZpY2UsIEJZVEUgYnlSeFJhdGUsIEJZVEUgYnlTUTMpCit7CisKKyAgICBpZiAoKGJ5UnhSYXRlID49IE1BWF9SQVRFKSB8fCAocERldmljZS0+d0FudERpdmVyc2l0eU1heFJhdGUgPj0gTUFYX1JBVEUpKSB7CisgICAgICAgIHJldHVybjsKKyAgICB9CisgICAgcERldmljZS0+dURpdmVyc2l0eUNudCsrOworICAgLy8gREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicERldmljZS0+dURpdmVyc2l0eUNudCA9ICVkXG4iLCAoaW50KXBEZXZpY2UtPnVEaXZlcnNpdHlDbnQpOworCisgICAgcERldmljZS0+dU51bVNRM1tieVJ4UmF0ZV0rKzsKKworICAgIGlmIChwRGV2aWNlLT5ieUFudGVubmFTdGF0ZSA9PSAwKSB7CisKKyAgICAgICAgaWYgKHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQgPiBwRGV2aWNlLT51bERpdmVyc2l0eU5WYWx1ZSkgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJ1bERpdmVyc2l0eU5WYWx1ZT1bJWRdLDU0TS1bJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50KXBEZXZpY2UtPnVsRGl2ZXJzaXR5TlZhbHVlLCAoaW50KXBEZXZpY2UtPnVOdW1TUTNbKGludClwRGV2aWNlLT53QW50RGl2ZXJzaXR5TWF4UmF0ZV0pOworCisgICAgICAgICAgICBpZiAocERldmljZS0+dU51bVNRM1twRGV2aWNlLT53QW50RGl2ZXJzaXR5TWF4UmF0ZV0gPCBwRGV2aWNlLT51RGl2ZXJzaXR5Q250LzIpIHsKKworICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVsUmF0aW9fU3RhdGUwID0gc191bEdldFJhdGlvKHBEZXZpY2UpOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iU1EzX1N0YXRlMCwgcmF0ZSA9IFslMDh4XVxuIiwgKGludClwRGV2aWNlLT51bFJhdGlvX1N0YXRlMCk7CisKKyAgICAgICAgICAgICAgICBpZiAoIHBEZXZpY2UtPmJ5VE1heCA9PSAwICkKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iMS5bJTA4eF0sIHVOdW1TUTNbJWRdPSVkLCAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+dWxSYXRpb19TdGF0ZTAsIChpbnQpcERldmljZS0+d0FudERpdmVyc2l0eU1heFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50KXBEZXZpY2UtPnVOdW1TUTNbKGludClwRGV2aWNlLT53QW50RGl2ZXJzaXR5TWF4UmF0ZV0sIChpbnQpcERldmljZS0+dURpdmVyc2l0eUNudCk7CisjaWZkZWYJUExJQ0VfREVCVUcKKwkJLy9wcmludGsoIkJCdkFudGVubmFEaXZlcnNpdHkxOmNhbGwgc192Q2hhbmdlQW50ZW5uYVxuIik7CisjZW5kaWYKKwkJc192Q2hhbmdlQW50ZW5uYShwRGV2aWNlKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUFudGVubmFTdGF0ZSA9IDE7CisgICAgICAgICAgICAgICAgZGVsX3RpbWVyKCZwRGV2aWNlLT5UaW1lclNRM1RtYXgzKTsKKyAgICAgICAgICAgICAgICBkZWxfdGltZXIoJnBEZXZpY2UtPlRpbWVyU1EzVG1heDIpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPlRpbWVyU1EzVG1heDEuZXhwaXJlcyA9ICBSVU5fQVQocERldmljZS0+YnlUTWF4ICogSFopOworICAgICAgICAgICAgICAgIGFkZF90aW1lcigmcERldmljZS0+VGltZXJTUTNUbWF4MSk7CisKKyAgICAgICAgICAgIH0gZWxzZSB7CisKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5UaW1lclNRM1RtYXgzLmV4cGlyZXMgPSAgUlVOX0FUKHBEZXZpY2UtPmJ5VE1heDMgKiBIWik7CisgICAgICAgICAgICAgICAgYWRkX3RpbWVyKCZwRGV2aWNlLT5UaW1lclNRM1RtYXgzKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIEJCdkNsZWFyQW50RGl2U1EzVmFsdWUocERldmljZSk7CisKKyAgICAgICAgfQorICAgIH0gZWxzZSB7IC8vYnlBbnRlbm5hU3RhdGUgPT0gMQorCisgICAgICAgIGlmIChwRGV2aWNlLT51RGl2ZXJzaXR5Q250ID4gcERldmljZS0+dWxEaXZlcnNpdHlNVmFsdWUpIHsKKworICAgICAgICAgICAgZGVsX3RpbWVyKCZwRGV2aWNlLT5UaW1lclNRM1RtYXgxKTsKKworICAgICAgICAgICAgcERldmljZS0+dWxSYXRpb19TdGF0ZTEgPSBzX3VsR2V0UmF0aW8ocERldmljZSk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlJYOlNRM19TdGF0ZTEsIHJhdGUwID0gJTA4eCxyYXRlMSA9ICUwOHhcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+dWxSYXRpb19TdGF0ZTAsKGludClwRGV2aWNlLT51bFJhdGlvX1N0YXRlMSk7CisKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT51bFJhdGlvX1N0YXRlMSA8IHBEZXZpY2UtPnVsUmF0aW9fU3RhdGUwKSB7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIyLlslMDh4XVslMDh4XSwgdU51bVNRM1slZF09JWQsICVkXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGludClwRGV2aWNlLT51bFJhdGlvX1N0YXRlMCwgKGludClwRGV2aWNlLT51bFJhdGlvX1N0YXRlMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+d0FudERpdmVyc2l0eU1heFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50KXBEZXZpY2UtPnVOdW1TUTNbKGludClwRGV2aWNlLT53QW50RGl2ZXJzaXR5TWF4UmF0ZV0sIChpbnQpcERldmljZS0+dURpdmVyc2l0eUNudCk7CisjaWZkZWYJUExJQ0VfREVCVUcKKwkJLy9wcmludGsoIkJCdkFudGVubmFEaXZlcnNpdHkyOmNhbGwgc192Q2hhbmdlQW50ZW5uYVxuIik7CisjZW5kaWYKKwkJCQlzX3ZDaGFuZ2VBbnRlbm5hKHBEZXZpY2UpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPlRpbWVyU1EzVG1heDMuZXhwaXJlcyA9ICBSVU5fQVQocERldmljZS0+YnlUTWF4MyAqIEhaKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5UaW1lclNRM1RtYXgyLmV4cGlyZXMgPSAgUlVOX0FUKHBEZXZpY2UtPmJ5VE1heDIgKiBIWik7CisgICAgICAgICAgICAgICAgYWRkX3RpbWVyKCZwRGV2aWNlLT5UaW1lclNRM1RtYXgzKTsKKyAgICAgICAgICAgICAgICBhZGRfdGltZXIoJnBEZXZpY2UtPlRpbWVyU1EzVG1heDIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcERldmljZS0+YnlBbnRlbm5hU3RhdGUgPSAwOworICAgICAgICAgICAgQkJ2Q2xlYXJBbnREaXZTUTNWYWx1ZShwRGV2aWNlKTsKKyAgICAgICAgfQorICAgIH0gLy9ieUFudGVubmFTdGF0ZQorfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICBUaW1lciBmb3IgU1EzIGFudGVubmEgZGl2ZXJzaXR5CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKy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VyU1EzVG1heDIpOworCisgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICBUaW1lciBmb3IgU1EzIGFudGVubmEgZGl2ZXJzaXR5CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcHZTeXNTcGVjMQorICogICAgICBoRGV2aWNlQ29udGV4dCAtIFBvaW50ZXIgdG8gdGhlIGFkYXB0ZXIKKyAqICAgICAgcHZTeXNTcGVjMgorICogICAgICBwdlN5c1NwZWMzCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorLSovCisKK1ZPSUQKK1RpbWVyU3RhdGUxQ2FsbEJhY2sgKAorICAgIElOICBIQU5ETEUgICAgICBoRGV2aWNlQ29udGV4dAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iVGltZXJTdGF0ZTFDYWxsQmFjay4uLiIpOworCisgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgaWYgKHBEZXZpY2UtPnVEaXZlcnNpdHlDbnQgPCBwRGV2aWNlLT51bERpdmVyc2l0eU1WYWx1ZS8xMDApIHsKKyNpZmRlZglQTElDRV9ERUJVRworCQkvL3ByaW50aygiVGltZXJTUTNDYWxsQmFjazI6Y2FsbCBzX3ZDaGFuZ2VBbnRlbm5hXG4iKTsKKyNlbmRpZgorCisJCXNfdkNoYW5nZUFudGVubmEocERldmljZSk7CisgICAgICAgIHBEZXZpY2UtPlRpbWVyU1EzVG1heDMuZXhwaXJlcyA9ICBSVU5fQVQocERldmljZS0+YnlUTWF4MyAqIEhaKTsKKyAgICAgICAgcERldmljZS0+VGltZXJTUTNUbWF4Mi5leHBpcmVzID0gIFJVTl9BVChwRGV2aWNlLT5ieVRNYXgyICogSFopOworICAgICAgICBhZGRfdGltZXIoJnBEZXZpY2UtPlRpbWVyU1EzVG1heDMpOworICAgICAgICBhZGRfdGltZXIoJnBEZXZpY2UtPlRpbWVyU1EzVG1heDIpOworICAgIH0gZWxzZSB7CisgICAgICAgIHBEZXZpY2UtPnVsUmF0aW9fU3RhdGUxID0gc191bEdldFJhdGlvKHBEZXZpY2UpOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlNRM19TdGF0ZTEsIHJhdGUwID0gJTA4eCxyYXRlMSA9ICUwOHhcbiIsCisgICAgICAgICAgICAgICAgICAgICAgKGludClwRGV2aWNlLT51bFJhdGlvX1N0YXRlMCwoaW50KXBEZXZpY2UtPnVsUmF0aW9fU3RhdGUxKTsKKworICAgICAgICBpZiAoIHBEZXZpY2UtPnVsUmF0aW9fU3RhdGUxIDwgcERldmljZS0+dWxSYXRpb19TdGF0ZTAgKSB7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIjIuWyUwOHhdWyUwOHhdLCB1TnVtU1EzWyVkXT0lZCwgJWRcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+dWxSYXRpb19TdGF0ZTAsIChpbnQpcERldmljZS0+dWxSYXRpb19TdGF0ZTEsCisgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+d0FudERpdmVyc2l0eU1heFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpcERldmljZS0+dU51bVNRM1soaW50KXBEZXZpY2UtPndBbnREaXZlcnNpdHlNYXhSYXRlXSwgKGludClwRGV2aWNlLT51RGl2ZXJzaXR5Q250KTsKKyNpZmRlZglQTElDRV9ERUJVRworCQkvL3ByaW50aygiVGltZXJTUTNDYWxsQmFjazM6Y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5lIFRPUF9SQVRFXzJNICAgICAgICAgMHgwMDIwMDAwMAorI2RlZmluZSBUT1BfUkFURV8xTSAgICAgICAgIDB4MDAxMDAwMDAKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBUeXBlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBNYWNyb3MgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisKKyNkZWZpbmUgQkJ2Q2xlYXJGT0UoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBCQmJXcml0ZUVtYmVkZWQoZHdJb0Jhc2UsIDB4QjEsIDApOyAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBCQnZTZXRGT0UoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIEJCYldyaXRlRW1iZWRlZChkd0lvQmFzZSwgMHhCMSwgMHgwQyk7ICAgICAgICAgICAgICAgICAgXAorfQorCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgQ2xhc3NlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgRnVuY3Rpb25zICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjaWZkZ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tLS0tLS0tLS0tICBTdGF0aWMgRGVmaW5pdGlvbnMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBTdGF0aWMgQ2xhc3NlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBTdGF0aWMgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCitzdGF0aWMgaW50ICAgICAgICAgIG1zZ2xldmVsICAgICAgICAgICAgICAgID1NU0dfTEVWRUxfSU5GTzsKKy8vc3RhdGljIGludCAgICAgICAgICBtc2dsZXZlbCAgICAgICAgICAgICAgICA9TVNHX0xFVkVMX0RFQlVHOworCisKKworY29uc3QgV09SRCAgICAgICAgICAgICBhd0hXUmV0cnkwWzVdWzVdID0geworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7UkFURV8xOE0sIFJBVEVfMThNLCBSQVRFXzEyTSwgUkFURV8xMk0sIFJBVEVfMTJNfSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1JBVEVfMjRNLCBSQVRFXzI0TSwgUkFURV8xOE0sIFJBVEVfMTJNLCBSQVRFXzEyTX0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtSQVRFXzM2TSwgUkFURV8zNk0sIFJBVEVfMjRNLCBSQVRFXzE4TSwgUkFURV8xOE19LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7UkFURV80OE0sIFJBVEVfNDhNLCBSQVRFXzM2TSwgUkFURV8yNE0sIFJBVEVfMjRNfSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1JBVEVfNTRNLCBSQVRFXzU0TSwgUkFURV80OE0sIFJBVEVfMzZNLCBSQVRFXzM2TX0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OworY29uc3QgV09SRCAgICAgICAgICAgICBhd0hXUmV0cnkxWzVdWzVdID0geworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7UkFURV8xOE0sIFJBVEVfMThNLCBSQVRFXzEyTSwgUkFURV82TSwgUkFURV82TX0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtSQVRFXzI0TSwgUkFURV8yNE0sIFJBVEVfMThNLCBSQVRFXzZNLCBSQVRFXzZNfSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1JBVEVfMzZNLCBSQVRFXzM2TSwgUkFURV8yNE0sIFJBVEVfMTJNLCBSQVRFXzEyTX0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtSQVRFXzQ4TSwgUkFURV80OE0sIFJBVEVfMjRNLCBSQVRFXzEyTSwgUkFURV8xMk19LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7UkFURV81NE0sIFJBVEVfNTRNLCBSQVRFXzM2TSwgUkFURV8xOE0sIFJBVEVfMThNfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CisKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgU3RhdGljIEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCitWT0lEIHNfdkNoZWNrU2Vuc2l0aXZpdHkoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKTsKKworI2lmZGVmIENhbGN1X0xpbmtRdWFsCitWT0lEIHNfdUNhbGN1bGF0ZUxpbmtRdWFsKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dAorICAgICk7CisjZW5kaWYKKworCitWT0lEIHNfdkNoZWNrUHJlRURUaHJlc2hvbGQoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKTsKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgU2VhcmNoIGtub3duIEJTUyBsaXN0IGZvciBEZXNpcmUgU1NJRCBvciBCU1NJRC4KKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBQVFIgdG8gS25vd25CU1Mgb3IgTlVMTAorICoKKy0qLworCitQS25vd25CU1MKK0JTU3BTZWFyY2hCU1NMaXN0KAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiBQQllURSBwYnlEZXNpcmVCU1NJRCwKKyAgICBJTiBQQllURSBwYnlEZXNpcmVTU0lELAorICAgIElOIENBUkRfUEhZX1RZUEUgZVBoeVR5cGUKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisgICAgUEJZVEUgICAgICAgICAgIHBieUJTU0lEID0gTlVMTDsKKyAgICBQV0xBTl9JRV9TU0lEICAgcFNTSUQgPSBOVUxMOworICAgIFBLbm93bkJTUyAgICAgICBwQ3VyckJTUyA9IE5VTEw7CisgICAgUEtub3duQlNTICAgICAgIHBTZWxlY3QgPSBOVUxMOworQllURSAgICAgICAgICAgICAgICAgWmVyb0JTU0lEW1dMQU5fQlNTSURfTEVOXT17MHgwMCwweDAwLDB4MDAsMHgwMCwweDAwLDB4MDB9OworICAgIFVJTlQgICAgICAgICAgICBpaSA9IDA7CisvLyAgICBVSU5UICAgICAgICAgICAgamogPSAwOyAgIC8vRGF2aWRXYW5nCisgICAgaWYgKHBieURlc2lyZUJTU0lEICE9IE5VTEwpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJCU1NwU2VhcmNoQlNTTGlzdCBCU1NJRFslMDJYICUwMlggJTAyWC0lMDJYICUwMlggJTAyWF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBieURlc2lyZUJTU0lELCoocGJ5RGVzaXJlQlNTSUQrMSksKihwYnlEZXNpcmVCU1NJRCsyKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKHBieURlc2lyZUJTU0lEKzMpLCoocGJ5RGVzaXJlQlNTSUQrNCksKihwYnlEZXNpcmVCU1NJRCs1KSk7CisgICAgICAgIGlmICgoIUlTX0JST0FEQ0FTVF9BRERSRVNTKHBieURlc2lyZUJTU0lEKSkgJiYKKwkgICAgIChtZW1jbXAocGJ5RGVzaXJlQlNTSUQsIFplcm9CU1NJRCwgNikhPSAwKSkgeworICAgICAgICAgICAgcGJ5QlNTSUQgPSBwYnlEZXNpcmVCU1NJRDsKKyAgICAgICAgfQorICAgIH0KKyAgICBpZiAocGJ5RGVzaXJlU1NJRCAhPSBOVUxMKSB7CisgICAgICAgIGlmICgoKFBXTEFOX0lFX1NTSUQpcGJ5RGVzaXJlU1NJRCktPmxlbiAhPSAwKSB7CisgICAgICAgICAgICBwU1NJRCA9IChQV0xBTl9JRV9TU0lEKSBwYnlEZXNpcmVTU0lEOworICAgICAgICB9CisgICAgfQorCisgICAgaWYgKHBieUJTU0lEICE9IE5VTEwpIHsKKyAgICAgICAgLy8gbWF0Y2ggQlNTSUQgZmlyc3QKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDxNQVhfQlNTX05VTTsgaWkrKykgeworICAgICAgICAgICAgcEN1cnJCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFtpaV0pOworaWYocERldmljZS0+YkxpbmtQYXNzPT1GQUxTRSkgcEN1cnJCU1MtPmJTZWxlY3RlZCA9IEZBTFNFOworICAgICAgICAgICAgaWYgKChwQ3VyckJTUy0+YkFjdGl2ZSkgJiYKKyAgICAgICAgICAgICAgICAocEN1cnJCU1MtPmJTZWxlY3RlZCA9PSBGQUxTRSkpIHsKKyAgICAgICAgICAgICAgICBpZiAoSVNfRVRIX0FERFJFU1NfRVFVQUwocEN1cnJCU1MtPmFieUJTU0lELCBwYnlCU1NJRCkpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBTU0lEICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbXBhcmUgc3NpZAorICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1FTUVxdWFsTWVtb3J5KHBTU0lELT5hYnlTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoUFdMQU5fSUVfU1NJRClwQ3VyckJTUy0+YWJ5U1NJRCktPmFieVNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFNTSUQtPmxlbikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19BVVRPKSB8fAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19JQlNTX1NUQSkgJiYgV0xBTl9HRVRfQ0FQX0lORk9fSUJTUyhwQ3VyckJTUy0+d0NhcEluZm8pKSB8fAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19FU1NfU1RBKSAmJiBXTEFOX0dFVF9DQVBfSU5GT19FU1MocEN1cnJCU1MtPndDYXBJbmZvKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBDdXJyQlNTLT5iU2VsZWN0ZWQgPSBUUlVFOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ocEN1cnJCU1MpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0FVVE8pIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChwTWdtdC0+ZUNvbmZpZ01vZGUgPT0gV01BQ19DT05GSUdfSUJTU19TVEEpICYmIFdMQU5fR0VUX0NBUF9JTkZPX0lCU1MocEN1cnJCU1MtPndDYXBJbmZvKSkgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19FU1NfU1RBKSAmJiBXTEFOX0dFVF9DQVBfSU5GT19FU1MocEN1cnJCU1MtPndDYXBJbmZvKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQ3VyckJTUy0+YlNlbGVjdGVkID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ocEN1cnJCU1MpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfSBlbHNlIHsKKyAgICAgICAgLy8gaWdub3JlIEJTU0lECisgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8TUFYX0JTU19OVU07IGlpKyspIHsKKyAgICAgICAgICAgIHBDdXJyQlNTID0gJihwTWdtdC0+c0JTU0xpc3RbaWldKTsKKwkvLzIwMDctMDcyMS0wMTxBZGQ+YnkgTWlrZUxpdQorCSAgcEN1cnJCU1MtPmJTZWxlY3RlZCA9IEZBTFNFOworICAgICAgICAgIGlmIChwQ3VyckJTUy0+YkFjdGl2ZSkgeworCisgICAgICAgICAgICAgICAgaWYgKHBTU0lEICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2hlZCBTU0lECisgICAgICAgICAgICAgICAgICAgIGlmICghTUVNRXF1YWxNZW1vcnkocFNTSUQtPmFieVNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAoKFBXTEFOX0lFX1NTSUQpcEN1cnJCU1MtPmFieVNTSUQpLT5hYnlTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgcFNTSUQtPmxlbikgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgIChwU1NJRC0+bGVuICE9ICgoUFdMQU5fSUVfU1NJRClwQ3VyckJTUy0+YWJ5U1NJRCktPmxlbikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNTSUQgbm90IG1hdGNoIHNraXAgdGhpcyBCU1MKKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICgoKHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19JQlNTX1NUQSkgJiYgV0xBTl9HRVRfQ0FQX0lORk9fRVNTKHBDdXJyQlNTLT53Q2FwSW5mbykpIHx8CisgICAgICAgICAgICAgICAgICAgICgocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0VTU19TVEEpICYmIFdMQU5fR0VUX0NBUF9JTkZPX0lCU1MocEN1cnJCU1MtPndDYXBJbmZvKSkKKyAgICAgICAgICAgICAgICAgICAgKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIFR5cGUgbm90IG1hdGNoIHNraXAgdGhpcyBCU1MKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJCU1MgdHlwZSBtaXNtYXRjaC4uLi4gQ29uZmlnWyVkXSBCU1NbMHglMDR4XVxuIiwgcE1nbXQtPmVDb25maWdNb2RlLCBwQ3VyckJTUy0+d0NhcEluZm8pOworICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBpZiAoZVBoeVR5cGUgIT0gUEhZX1RZUEVfQVVUTykgeworICAgICAgICAgICAgICAgICAgICBpZiAoKChlUGh5VHlwZSA9PSBQSFlfVFlQRV8xMUEpICYmIChQSFlfVFlQRV8xMUEgIT0gcEN1cnJCU1MtPmVOZXR3b3JrVHlwZUluVXNlKSkgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgICgoZVBoeVR5cGUgIT0gUEhZX1RZUEVfMTFBKSAmJiAoUEhZX1RZUEVfMTFBID09IHBDdXJyQlNTLT5lTmV0d29ya1R5cGVJblVzZSkpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBQaHlUeXBlIG5vdCBtYXRjaCBza2lwIHRoaXMgQlNTCisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlBoeXNpY2FsIHR5cGUgbWlzbWF0Y2guLi4uIGVQaHlUeXBlWyVkXSBCU1NbJWRdXG4iLCBlUGh5VHlwZSwgcEN1cnJCU1MtPmVOZXR3b3JrVHlwZUluVXNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorLyoKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlIDwgV01BQ19BVVRIX1dQQSkgeworICAgICAgICAgICAgICAgICAgICBpZiAocEN1cnJCU1MtPmJXUEFWYWxpZCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBXUEEgQVAgd2lsbCByZWplY3QgY29ubmVjdGlvbiBvZiBzdGF0aW9uIHdpdGhvdXQgV1BBIGVuYWJsZS4KKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEpIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEFQU0spKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChwQ3VyckJTUy0+YldQQVZhbGlkID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBzdGF0aW9uIHdpdGggV1BBIGVuYWJsZSBjYW4ndCBqb2luIE5vbldQQSBBUC4KKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSB8fAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBDdXJyQlNTLT5iV1BBMlZhbGlkID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBzdGF0aW9uIHdpdGggV1BBMiBlbmFibGUgY2FuJ3Qgam9pbiBOb25XUEEyIEFQLgorICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisqLworICAgICAgICAgICAgICAgIGlmIChwU2VsZWN0ID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgcFNlbGVjdCA9IHBDdXJyQlNTOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGNvbXBhcmUgUlNTSSwgc2VsZWN0IHNpZ25hbCBzdHJvbmcgb25lCisgICAgICAgICAgICAgICAgICAgIGlmIChwQ3VyckJTUy0+dVJTU0kgPCBwU2VsZWN0LT51UlNTSSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcFNlbGVjdCA9IHBDdXJyQlNTOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGlmIChwU2VsZWN0ICE9IE5VTEwpIHsKKyAgICAgICAgICAgIHBTZWxlY3QtPmJTZWxlY3RlZCA9IFRSVUU7CisvKgorICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJSb2FtaW5nID09IEZBTFNFKSAgeworCS8vICAgICAgIEVpbnNuIEFkZCBAMjAwNzA5MDcKKwkJCVpFUk9fTUVNT1JZKHBieURlc2lyZVNTSUQsIFdMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDEpOworCQkJTUVNdkNvcHkocGJ5RGVzaXJlU1NJRCxwQ3VyckJTUy0+YWJ5U1NJRCxXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKyAxKSA7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ki8KKworICAgICAgICAgICAgcmV0dXJuKHBTZWxlY3QpOworICAgICAgICB9CisgICAgfQorICAgIHJldHVybihOVUxMKTsKKworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBDbGVhciBCU1MgTGlzdAorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworVk9JRAorQlNTdkNsZWFyQlNTTGlzdCgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gQk9PTCBiS2VlcEN1cnJCU1NJRAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBVSU5UICAgICAgICAgICAgaWk7CisKKyAgICBmb3IgKGlpID0gMDsgaWkgPCBNQVhfQlNTX05VTTsgaWkrKykgeworICAgICAgICBpZiAoYktlZXBDdXJyQlNTSUQpIHsKKyAgICAgICAgICAgIGlmIChwTWdtdC0+c0JTU0xpc3RbaWldLmJBY3RpdmUgJiYKKyAgICAgICAgICAgICAgICBJU19FVEhfQUREUkVTU19FUVVBTChwTWdtdC0+c0JTU0xpc3RbaWldLmFieUJTU0lELCBwTWdtdC0+YWJ5Q3VyckJTU0lEKSkgeworICAgICAgICAgICAgICAgLy8gYktlZXBDdXJyQlNTSUQgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIGlmICgocE1nbXQtPnNCU1NMaXN0W2lpXS5iQWN0aXZlKSAmJiAocE1nbXQtPnNCU1NMaXN0W2lpXS51Q2xlYXJDb3VudCA8IEJTU19DTEVBUl9DT1VOVCkpIHsKKyAgICAgICAgICAgICBwTWdtdC0+c0JTU0xpc3RbaWldLnVDbGVhckNvdW50ICsrOworICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisKKyAgICAgICAgcE1nbXQtPnNCU1NMaXN0W2lpXS5iQWN0aXZlID0gRkFMU0U7CisgICAgICAgIG1lbXNldCgmcE1nbXQtPnNCU1NMaXN0W2lpXSwgMCwgc2l6ZW9mKEtub3duQlNTKSk7CisgICAgfQorICAgIEJTU3ZDbGVhckFueUJTU0pvaW5SZWNvcmQocERldmljZSk7CisKKyAgICByZXR1cm47Cit9CisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgc2VhcmNoIEJTUyBsaXN0IGJ5IEJTU0lEICYgU1NJRCBpZiBtYXRjaGVkCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgVFJVRSBpZiBmb3VuZC4KKyAqCistKi8KK1BLbm93bkJTUworQlNTcEFkZHJJc0luQlNTTGlzdCgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gUEJZVEUgYWJ5QlNTSUQsCisgICAgSU4gUFdMQU5fSUVfU1NJRCBwU1NJRAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBQS25vd25CU1MgICAgICAgcEJTU0xpc3QgPSBOVUxMOworICAgIFVJTlQgICAgICAgICAgICBpaTsKKworICAgIGZvciAoaWkgPSAwOyBpaSA8IE1BWF9CU1NfTlVNOyBpaSsrKSB7CisgICAgICAgIHBCU1NMaXN0ID0gJihwTWdtdC0+c0JTU0xpc3RbaWldKTsKKyAgICAgICAgaWYgKHBCU1NMaXN0LT5iQWN0aXZlKSB7CisgICAgICAgICAgICBpZiAoSVNfRVRIX0FERFJFU1NfRVFVQUwocEJTU0xpc3QtPmFieUJTU0lELCBhYnlCU1NJRCkpIHsKKy8vICAgICAgICAgICAgICAgIGlmIChwU1NJRCA9PSBOVUxMKQorLy8gICAgICAgICAgICAgICAgICAgIHJldHVybiBwQlNTTGlzdDsKKyAgICAgICAgICAgICAgICBpZiAocFNTSUQtPmxlbiA9PSAoKFBXTEFOX0lFX1NTSUQpcEJTU0xpc3QtPmFieVNTSUQpLT5sZW4peworICAgICAgICAgICAgICAgICAgICBpZiAobWVtY21wKHBTU0lELT5hYnlTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoUFdMQU5fSUVfU1NJRClwQlNTTGlzdC0+YWJ5U1NJRCktPmFieVNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFNTSUQtPmxlbikgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwQlNTTGlzdDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICByZXR1cm4gTlVMTDsKK307CisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBJbnNlcnQgYSBCU1Mgc2V0IGludG8ga25vd24gQlNTIGxpc3QKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBUUlVFIGlmIHN1Y2Nlc3MuCisgKgorLSovCisKK0JPT0wKK0JTU2JJbnNlcnRUb0JTU0xpc3QgKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiBQQllURSBhYnlCU1NJREFkZHIsCisgICAgSU4gUVdPUkQgcXdUaW1lc3RhbXAsCisgICAgSU4gV09SRCB3QmVhY29uSW50ZXJ2YWwsCisgICAgSU4gV09SRCB3Q2FwSW5mbywKKyAgICBJTiBCWVRFIGJ5Q3VyckNoYW5uZWwsCisgICAgSU4gUFdMQU5fSUVfU1NJRCBwU1NJRCwKKyAgICBJTiBQV0xBTl9JRV9TVVBQX1JBVEVTIHBTdXBwUmF0ZXMsCisgICAgSU4gUFdMQU5fSUVfU1VQUF9SQVRFUyBwRXh0U3VwcFJhdGVzLAorICAgIElOIFBFUlBPYmplY3QgcHNFUlAsCisgICAgSU4gUFdMQU5fSUVfUlNOIHBSU04sCisgICAgSU4gUFdMQU5fSUVfUlNOX0VYVCBwUlNOV1BBLAorICAgIElOIFBXTEFOX0lFX0NPVU5UUlkgcElFX0NvdW50cnksCisgICAgSU4gUFdMQU5fSUVfUVVJRVQgcElFX1F1aWV0LAorICAgIElOIFVJTlQgdUlFTGVuZ3RoLAorICAgIElOIFBCWVRFIHBieUlFcywKKyAgICBJTiBIQU5ETEUgcFJ4UGFja2V0Q29udGV4dAorICAgICkKK3sKKworICAgIFBTRGV2aWNlICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFBTUnhNZ210UGFja2V0ICBwUnhQYWNrZXQgPSAoUFNSeE1nbXRQYWNrZXQpcFJ4UGFja2V0Q29udGV4dDsKKyAgICBQS25vd25CU1MgICAgICAgcEJTU0xpc3QgPSBOVUxMOworICAgIFVJTlQgICAgICAgICAgICBpaTsKKyAgICBCT09MICAgICAgICAgICAgYlBhcnNpbmdRdWlldCA9IEZBTFNFOworICAgIFBXTEFOX0lFX1FVSUVUICBwUXVpZXQgPSBOVUxMOworCisKKworICAgIHBCU1NMaXN0ID0gKFBLbm93bkJTUykmKHBNZ210LT5zQlNTTGlzdFswXSk7CisKKyAgICBmb3IgKGlpID0gMDsgaWkgPCBNQVhfQlNTX05VTTsgaWkrKykgeworICAgICAgICBwQlNTTGlzdCA9IChQS25vd25CU1MpJihwTWdtdC0+c0JTU0xpc3RbaWldKTsKKyAgICAgICAgaWYgKCFwQlNTTGlzdC0+YkFjdGl2ZSkKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICB9CisKKyAgICBpZiAoaWkgPT0gTUFYX0JTU19OVU0peworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9OT1RJQ0UsIEtFUk5fSU5GTyAiR2V0IGZyZWUgS25vd0JTUyBub2RlIGZhaWxlZC5cbiIpOworICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorICAgIC8vIHNhdmUgdGhlIEJTUyBpbmZvCisgICAgcEJTU0xpc3QtPmJBY3RpdmUgPSBUUlVFOworICAgIG1lbWNweSggcEJTU0xpc3QtPmFieUJTU0lELCBhYnlCU1NJREFkZHIsIFdMQU5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UUikoKFBCWVRFKXBSU04gLSBwYnlJRXMpKSkgeworICAgICAgICAgICAgcEJTU0xpc3QtPndSU05MZW4gPSB1TGVuOworICAgICAgICAgICAgbWVtY3B5KHBCU1NMaXN0LT5ieVJTTklFLCBwUlNOLCB1TGVuKTsKKyAgICAgICAgICAgIFdQQTJ2UGFyc2VSU04ocEJTU0xpc3QsIHBSU04pOworICAgICAgICB9CisgICAgfQorCisgICAgaWYgKChwTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQTIpIHx8IChwQlNTTGlzdC0+YldQQTJWYWxpZCA9PSBUUlVFKSkgeworCisgICAgICAgIFBTS2V5SXRlbSAgcFRyYW5zbWl0S2V5ID0gTlVMTDsKKyAgICAgICAgQk9PTCAgICAgICBiSXM4MDJfMXggPSBGQUxTRTsKKworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCBwQlNTTGlzdC0+d0FLTVNTQXV0aENvdW50OyBpaSArKykgeworICAgICAgICAgICAgaWYgKHBCU1NMaXN0LT5hYnlBS01TU0F1dGhUeXBlW2lpXSA9PSBXTEFOXzExaV9BS01TU184MDJfMVgpIHsKKyAgICAgICAgICAgICAgICBiSXM4MDJfMXggPSBUUlVFOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGlmICgoYklzODAyXzF4ID09IFRSVUUpICYmIChwU1NJRC0+bGVuID09ICgoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5RGVzaXJlU1NJRCktPmxlbikgJiYKKyAgICAgICAgICAgIChNRU1FcXVhbE1lbW9yeShwU1NJRC0+YWJ5U1NJRCwgKChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlEZXNpcmVTU0lEKS0+YWJ5U1NJRCwgcFNTSUQtPmxlbikpKSB7CisKKyAgICAgICAgICAgIGJBZGRfUE1LSURfQ2FuZGlkYXRlKChIQU5ETEUpcERldmljZSwgcEJTU0xpc3QtPmFieUJTU0l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aWkgPSAxOyBpaSA8IFJTU0lfU1RBVF9DT1VOVDsgaWkrKykKKyAgICAgICAgICAgIHBCU1NMaXN0LT5sZEJtQXZlcmFnZVtpaV0gPSAwOworICAgIH0KKworICAgIGlmICgocElFX0NvdW50cnkgIT0gTlVMTCkgJiYKKyAgICAgICAgKHBNZ210LT5iMTFoRW5hYmxlID09IFRSVUUpKSB7CisgICAgICAgIENBUkR2U2V0Q291bnRyeUluZm8ocE1nbXQtPnBBZGFwdGVyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NMaXN0LT5lTmV0d29ya1R5cGVJblVzZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSUVfQ291bnRyeSk7CisgICAgfQorCisKKworICAgIGlmICgoYlBhcnNpbmdRdWlldCA9PSBUUlVFKSAmJiAocElFX1F1aWV0ICE9IE5VTEwpKSB7CisgICAgICAgIGlmICgoKChQV0xBTl9JRV9RVUlFVClwSUVfUXVpZXQpLT5sZW4gPT0gOCkgJiYKKyAgICAgICAgICAgICgoKFBXTEFOX0lFX1FVSUVUKXBJRV9RdWlldCktPmJ5UXVpZXRDb3VudCAhPSAwKSkgeworICAgICAgICAgICAgLy8gdmFsaWQgRUlECisgICAgICAgICAgICBpZiAocFF1aWV0ID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBwUXVpZXQgPSAoUFdMQU5fSUVfUVVJRVQpcElFX1F1aWV0OworICAgICAgICAgICAgICAgIENBUkRiU2V0UXVpZXQoICBwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRSVUUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBRdWlldC0+YnlRdWlldENvdW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwUXVpZXQtPmJ5UXVpZXRQZXJpb2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICooKFBXT1JEKXBRdWlldC0+YWJ5UXVpZXREdXJhdGlvbiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICooKFBXT1JEKXBRdWlldC0+YWJ5UXVpZXRPZmZzZXQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBRdWlldCA9IChQV0xBTl9JRV9RVUlFVClwSUVfUXVpZXQ7CisgICAgICAgICAgICAgICAgQ0FSRGJTZXRRdWlldCggIHBNZ210LT5wQWRhcHRlciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRkFMU0UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBRdWlldC0+YnlRdWlldENvdW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwUXVpZXQtPmJ5UXVpZXRQZXJpb2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICooKFBXT1JEKXBRdWlldC0+YWJ5UXVpZXREdXJhdGlvbiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICooKFBXT1JEKXBRdWlldC0+YWJ5UXVpZXRPZmZzZXQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICBpZiAoKGJQYXJzaW5nUXVpZXQgPT0gVFJVRSkgJiYKKyAgICAgICAgKHBRdWlldCAhPSBOVUxMKSkgeworICAgICAgICBDQVJEYlN0YXJ0UXVpZXQocE1nbXQtPnBBZGFwdGVyKTsKKyAgICB9CisKKyAgICBwQlNTTGlzdC0+dUlFTGVuZ3RoID0gdUlFTGVuZ3RoOworICAgIGlmIChwQlNTTGlzdC0+dUlFTGVuZ3RoID4gV0xBTl9CRUFDT05fRlJfTUFYTEVOKQorICAgICAgICBwQlNTTGlzdC0+dUlFTGVuZ3RoID0gV0xBTl9CRUFDT05fRlJfTUFYTEVOOworICAgIE1FTXZDb3B5KHBCU1NMaXN0LT5hYnlJRXMsIHBie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ICAgICBXUEFfUGFyc2VSU04ocEJTU0xpc3QsIHBSU05XUEEpOworICAgICAgICB9CisgICAgfQorCisgIFdQQTJfQ2xlYXJSU04ocEJTU0xpc3QpOyAgLy9taWtlIHVwZGF0ZQorCisgICAgaWYgKHBSU04gIT0gTlVMTCkgeworICAgICAgICBVSU5UIHVMZW4gPSBwUlNOLT5sZW4gKyAyOworICAgICAgICBpZiAodUxlbiA8PSAodUlFTGVuZ3RoIC0gKFVJTlQpKFVMT05HX1BUUikoKFBCWVRFKXBSU04gLSBwYnlJRXMpKSkgeworICAgICAgICAgICAgcEJTU0xpc3QtPndSU05MZW4gPSB1TGVuOworICAgICAgICAgICAgbWVtY3B5KHBCU1NMaXN0LT5ieVJTTklFLCBwUlNOLCB1TGVuKTsKKyAgICAgICAgICAgIFdQQTJ2UGFyc2VSU04ocEJTU0xpc3QsIHBSU04pOworICAgICAgICB9CisgICAgfQorCisgICAgaWYgKHBSeFBhY2tldC0+dVJTU0kgIT0gMCkgeworICAgICAgICBSRnZSU1NJVG9kQm0ocERldmljZSwgKEJZVEUpKHBSeFBhY2tldC0+dVJTU0kpLCAmbGRCbSk7CisgICAgICAgIC8vIE1vbml0ZXIgaWYgUlNTSSBpcyB0b28gc3Ryb25nLgorICAgICAgICBwQlNTTGlzdC0+YnlSU1NJU3RhdENudCsrOworICAgICAgICBwQlNTTGlzdC0+YnlSU1NJU3RhdENudCAlPSBSU1NJX1NUQVRfQ09VTlQ7CisgICAgICAgIHBCU1NMaXN0LT5sZEJtQXZlcmFnZVtwQlNTTGlzdC0+YnlSU1NJU3RhdENudF0gPSBsZEJtOworICAgICAgICBmb3IoaWk9MDtpaTxSU1NJX1NUQVRfQ09VTlQ7aWkrKykgeworICAgICAgICAgICAgaWYgKHBCU1NMaXN0LT5sZEJtQXZlcmFnZVtpaV0gIT0gMCkgeworICAgICAgICAgICAgICAgIHBCU1NMaXN0LT5sZEJtTUFYID0gbWF4KHBCU1NMaXN0LT5sZEJtQXZlcmFnZVtpaV0sIGxkQm0pOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgaWYgKChwSUVfQ291bnRyeSAhPSBOVUxMKSAmJgorICAgICAgICAocE1nbXQtPmIxMWhFbmFibGUgPT0gVFJVRSkpIHsKKyAgICAgICAgQ0FSRHZTZXRDb3VudHJ5SW5mbyhwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEJTU0xpc3QtPmVOZXR3b3JrVHlwZUluVXNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBJRV9Db3VudHJ5KTsKKyAgICB9CisKKyAgICBpZiAoKGJQYXJzaW5nUXVpZXQgPT0gVFJVRSkgJiYgKHBJRV9RdWlldCAhPSBOVUxMKSkgeworICAgICAgICBpZiAoKCgoUFdMQU5fSUVfUVVJRVQpcElFX1F1aWV0KS0+bGVuID09IDgpICYmCisgICAgICAgICAgICAoKChQV0xBTl9JRV9RVUlFVClwSUVfUXVpZXQpLT5ieVF1aWV0Q291bnQgIT0gMCkpIHsKKyAgICAgICAgICAgIC8vIHZhbGlkIEVJRAorICAgICAgICAgICAgaWYgKHBRdWlldCA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgcFF1aWV0ID0gKFBXTEFOX0lFX1FVSUVUKXBJRV9RdWlldDsKKyAgICAgICAgICAgICAgICBDQVJEYlNldFF1aWV0KCAgcE1nbXQtPnBBZGFwdGVyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUUlVFLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwUXVpZXQtPmJ5UXVpZXRDb3VudCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFF1aWV0LT5ieVF1aWV0UGVyaW9kLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKChQV09SRClwUXVpZXQtPmFieVF1aWV0RHVyYXRpb24pLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKChQV09SRClwUXVpZXQtPmFieVF1aWV0T2Zmc2V0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBwUXVpZXQgPSAoUFdMQU5fSUVfUVVJRVQpcElFX1F1aWV0OworICAgICAgICAgICAgICAgIENBUkRiU2V0UXVpZXQoICBwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZBTFNFLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwUXVpZXQtPmJ5UXVpZXRDb3VudCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFF1aWV0LT5ieVF1aWV0UGVyaW9kLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKChQV09SRClwUXVpZXQtPmFieVF1aWV0RHVyYXRpb24pLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKChQV09SRClwUXVpZXQtPmFieVF1aWV0T2Zmc2V0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgaWYgKChiUGFyc2luZ1F1aWV0ID09IFRSVUUpICYmCisgICAgICAgIChwUXVpZXQgIT0gTlVMTCkpIHsKKyAgICAgICAgQ0FSRGJTdGFydFF1aWV0KHBNZ210LT5wQWRhcHRlcik7CisgICAgfQorCisgICAgcEJTU0xpc3QtPnVJRUxlbmd0aCA9IHVJRUxlbmd0aDsKKyAgICBpZiAocEJTU0xpc3QtPnVJRUxlbmd0aCA+IFdMQU5fQkVBQ09OX0ZSX01BWExFTikKKyAgICAgICAgcEJTU0xpc3QtPnVJRUxlbmd0aCA9IFdMQU5fQkVBQ09OX0ZSX01BWExFTjsKKyAgICBtZW1jcHkocEJTU0xpc3QtPmFieUlFcywgcGJ5SUVzLCBwQlNTTGlzdC0+dUlFTGVuZ3RoKTsKKworICAgIHJldHVybiBUUlVFOworfQorCisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBTZWFyY2ggTm9kZSBEQiB0YWJsZSB0byBmaW5kIHRoZSBpbmRleCBvZiBtYXRjaGVkIERzdEFkZHIKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lCisgKgorLSovCisKK0JPT0wKK0JTU0RCYklzU1RBSW5Ob2RlREIoCisgICAgSU4gUFZPSUQgcE1nbXRPYmplY3QsCisgICAgSU4gUEJZVEUgYWJ5RHN0QWRkciwKKyAgICBPVVQgUFVJTlQgcHVOb2RlSW5kZXgKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gKFBTTWdtdE9iamVjdCkgcE1nbXRPYmplY3Q7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworCisgICAgLy8gSW5kZXggPSAwIHJlc2VydmVkIGZvciBBUCBOb2RlCisgICAgZm9yIChpaSA9IDE7IGlpIDwgKE1BWF9OT0RFX05VTSArIDEpOyBpaSsrKSB7CisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iQWN0aXZlKSB7CisgICAgICAgICAgICBpZiAoSVNfRVRIX0FERFJFU1NfRVFVQUwoYWJ5RHN0QWRkciwgcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uYWJ5TUFDQWRkcikpIHsKKyAgICAgICAgICAgICAgICAqcHVOb2RlSW5kZXggPSBpaTsKKyAgICAgICAgICAgICAgICByZXR1cm4gVFJVRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworICAgcmV0dXJuIEZBTFNFOworfTsKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBGaW5kIGFuIGVtcHR5IG5vZGUgYW5kIGFsbG9jYXRlZDsgaWYgbm8gZW1wdHkgZm91bmQsCisgKiAgICBpbnN0YW5kIHVzZWQgb2YgbW9zdCBpbmFjdGl2ZSBvbmUuCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZQorICoKKy0qLworVk9JRAorQlNTdkNyZWF0ZU9uZU5vZGUoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIE9VVCBQVUlOVCBwdU5vZGVJbmRleAorICAgICkKK3sKKworICAgIFBTRGV2aWNlICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFVJTlQgICAgICAgICAgICBpaTsKKyAgICBVSU5UICAgICAgICAgICAgQmlnZXN0Q291bnQgPSAwOworICAgIFVJTlQgICAgICAgICAgICBTZWxlY3RJbmRleDsKKyAgICBzdHJ1Y3Qgc2tfYnVmZiAgKnNrYjsKKyAgICAvLyBJbmRleCA9IDAgcmVzZXJ2ZWQgZm9yIEFQIE5vZGUgKEluIFNUQSBtb2RlKQorICAgIC8vIEluZGV4ID0gMCByZXNlcnZlZCBmb3IgQnJvYWRjYXN0L011bHRpQ2FzdCAoSW4gQVAgbW9kZSkKKyAgICBTZWxlY3RJbmRleCA9IDE7CisgICAgZm9yIChpaSA9IDE7IGlpIDwgKE1BWF9OT0RFX05VTSArIDEpOyBpaSsrKSB7CisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iQWN0aXZlKSB7CisgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0udUluQWN0aXZlQ291bnQgPiBCaWdlc3RDb3VudCkgeworICAgICAgICAgICAgICAgIEJpZ2VzdENvdW50ID0gcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0udUluQWN0aXZlQ291bnQ7CisgICAgICAgICAgICAgICAgU2VsZWN0SW5kZXggPSBpaTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9Cisg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XS5zVHhQU1F1ZXVlKTsKKyAgICBwTWdtdC0+c05vZGVEQlRhYmxlWypwdU5vZGVJbmRleF0uYnlBdXRoU2VxdWVuY2UgPSAwOworICAgIHBNZ210LT5zTm9kZURCVGFibGVbKnB1Tm9kZUluZGV4XS53RW5RdWV1ZUNudCA9IDA7CisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiQ3JlYXRlIG5vZGUgaW5kZXggPSAlZFxuIiwgaWkpOworICAgIHJldHVybjsKK307CisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgUmVtb3ZlIE5vZGUgYnkgTm9kZUluZGV4CisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUKKyAqCistKi8KK1ZPSUQKK0JTU3ZSZW1vdmVPbmVOb2RlKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiBVSU5UIHVOb2RlSW5kZXgKKyAgICApCit7CisKKyAgICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBCWVRFICAgICAgICAgICAgYnlNYXNrWzhdID0gezEsIDIsIDQsIDgsIDB4MTAsIDB4MjAsIDB4NDAsIDB4ODB9OworICAgIHN0cnVjdCBza19idWZmICAqc2tiOworCisKKyAgICB3aGlsZSAoKHNrYiA9IHNrYl9kZXF1ZXVlKCZwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLnNUeFBTUXVldWUpKSAhPSBOVUxMKQorICAgICAgICAgICAgZGV2X2tmcmVlX3NrYihza2IpOworICAgIC8vIGNsZWFyIGNvbnRleHQKKyAgICBtZW1zZXQoJnBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0sIDAsIHNpemVvZihLbm93bk5vZGV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xMUI7CisgICAgfQorICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzWzFdID0gUkFURXVTZXRJRSgoUFdMQU5fSUVfU1VQUF9SQVRFUylwU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdVJhdGVMZW4pOworICAgIHBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzWzFdID0gUkFURXVTZXRJRSgoUFdMQU5fSUVfU1VQUF9SQVRFUylwRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdVJhdGVMZW4pOworICAgIFJBVEV2UGFyc2VNYXhSYXRlKChQVk9JRCkgcERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICBUUlVFLAorICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbMF0ud01heEJhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS53TWF4U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbMF0ud1N1cHBSYXRlKSwKKyAgICAgICA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AgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbMF0ud01heEJhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdLndNYXhTdXBwUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS53U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS5ieVRvcENDS0Jhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJ5VG9wT0ZETUJhc2ljUmF0ZSkKKyAgICAgICAgICAgICAgICAgICAgICk7CisgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS53VHhEYXRhUmF0ZSA9IHBNZ210LT5zTm9kZURCVGFibGVbMF0ud01heEJhc2ljUmF0ZTsKKyNpZmRlZglQTElDRV9ERUJVRworCXByaW50aygiQlNTdkFkZE11bHRpQ2FzdE5vZGU6cE1nbXQtPnNOb2RlREJUYWJsZVswXS53VHhEYXRhUmF0ZSBpcyAlZFxuIixwTWdtdC0+c05vZGVEQlRhYmxlWzBdLndUeERhdGFSYXRlKTsKKyNlbmRpZgorICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0udVJhdGVQb2xsVGltZW91dCA9IEZBTExCQUNLX1BPTExfU0VDT05EOworCit9OworCisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKgorICoKKyAqICBTZWNvbmQgY2FsbCBiYWNrIGZ1bmN0aW9uIHRvIHVwZGF0ZSBOb2RlIERCIGluZm8gJiBBUCBsaW5rIHN0YXR1cworICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBub25lLgorICoKKy0qLworIC8vMjAwOC00LTE0IDxhZGQ+IGJ5IGNoZXN0ZXIgZm9yIGxlZCBpc3N1ZQorICNpZmRlZiBGT1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BwRGV2aWNlLT53VXNlUHJvdGVjdENudERvd24gLS07CisgICAgfQorICAgIGVsc2UgeworICAgICAgICAvLyBkaXNhYmxlIHByb3RlY3QgbW9kZQorICAgICAgICBwRGV2aWNlLT5ieUVSUEZsYWcgJj0gfihXTEFOX1NFVF9FUlBfVVNFX1BST1RFQ1RJT04oMSkpOworICAgIH0KKworeworICAgICAgIHBEZXZpY2UtPmJ5UmVBc3NvY0NvdW50Kys7CisgICBpZigocERldmljZS0+YnlSZUFzc29jQ291bnQgPiAxMCkgJiYgKHBEZXZpY2UtPmJMaW5rUGFzcyAhPSBUUlVFKSkgeyAgLy8xMCBzZWMgdGltZW91dAorICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJSZS1hc3NvY2lhdGlvbiB0aW1lb3V0ISEhXG4iKTsKKwkJICAgcERldmljZS0+YnlSZUFzc29jQ291bnQgPSAwOworICAgICAgICAgICAgICAgICAgICAgI2lmZGVmIFdQQV9TVVBQTElDQU5UX0RSSVZFUl9XRVhUX1NVUFBPUlQKKyAgICAgICAgICAgICAgICAgICAgLy8gaWYocERldmljZS0+YldQQVN1cHBXZXh0RW5hYmxlZCA9PSBUUlVFKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgCXVuaW9uIGl3cmVxX2RhdGEgIHdycXU7CisgICAgICAgICAgICAgICAgICAJbWVtc2V0KCZ3cnF1LCAwLCBzaXplb2YgKHdycXUpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgd3JxdS5hcF9hZGRyLnNhX2ZhbWlseSA9IEFSUEhSRF9FVEhFUjsKKyAgICAgICAgICAgICAgICAgIAlwcmludGsoIndpcmVsZXNzX3NlbmRfZXZlbnQtLS0+U0lPQ0dJV0FQKGRpc2Fzc29jaWF0ZWQpXG4iKTsKKyAgICAgICAgICAgICAgICAgIAl3aXJlbGVzc19zZW5kX2V2ZW50KHBEZXZpY2UtPmRldiwgU0lPQ0dJV0FQLCAmd3JxdSwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgI2VuZGlmCisgICAgIH0KKyAgIGVsc2UgaWYocERldmljZS0+YkxpbmtQYXNzID09IFRSVUUpCisgICAJcERldmljZS0+YnlSZUFzc29jQ291bnQgPSAwOworfQorCisjaWZkZWYgQ2FsY3VfTGlua1F1YWwKKyAgIHNfdUNhbGN1bGF0ZUxpbmtRdWFsKChIQU5ETEUpcERldmljZSk7CisjZW5kaWYKKworICAgIGZvciAoaWkgPSAwOyBpaSA8IChNQVhfTk9ERV9OVU0gKyAxKTsgaWkrKykgeworCisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iQWN0aXZlKSB7CisKKyAgICAgICAgICAgIC8vIEluY3JlYXNlIGluLWFjdGl2aXR5IGNvdW50ZXIKKyAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaWldLnVJbkFjdGl2ZUNvdW50Kys7CisKKyAgICAgICAgICAgIGlmIChpaSA+IDApIHsKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0udUluQWN0aXZlQ291bnQgPiBNQVhfSU5BQ1RJVkVfQ09VTlQpIHsKKyAgICAgICAgICAgICAgICAgICAgQlNTdlJlbW92ZU9uZU5vZGUocERldmljZSwgaWkpOworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9OT1RJQ0UsIEtFUk5fSU5GTworICAgICAgICAgICAgICAgICAgICAgICAgIkluYWN0aXZlIHRpbWVvdXQgWyVkXSBzZWMsIFNUQSBpbmRleCA9IFslZF0gcmVtb3ZlXG4iLCBNQVhfSU5BQ1RJVkVfQ09VTlQsIGlpKTsKKyAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbaWldLmVOb2RlU3RhdGUgPj0gTk9ERV9BU1NPQykgeworCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVBc3NvY0NvdW50Kys7CisKKyAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgTm9uIEVSUCBleGlzdAorICAgICAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0udUluQWN0aXZlQ291bnQgPCBFUlBfUkVDT1ZFUl9DT1VOVCkgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iU2hvcnRQcmVhbWJsZSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5RVJQRmxhZyB8PSBXTEFOX1NFVF9FUlBfQkFSS0VSX01PREUoMSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdUxvbmdQcmVhbWJsZVNUQUNudCArKzsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uYkVSUEV4aXN0KSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlFUlBGbGFnIHw9IFdMQU5fU0VUX0VSUF9OT05FUlBfUFJFU0VOVCgxKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUVSUEZsYWcgfD0gV0xBTl9TRVRfRVJQX1VTRV9QUk9URUNUSU9OKDEpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iU2hvcnRTbG90VGltZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB1Tm9uU2hvcnRTbG90U1RBQ250Kys7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiBhbnkgU1RBIGluIFBTIG1vZGUKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uYlBTRW5hYmxlKQorICAgICAgICAgICAgICAgICAgICB1U2xlZXB5U1RBQ250Kys7CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyBSYXRlIGZhbGxiYWNrIGNoZWNrCisKKyAgICAgICAgICAgIGlmICghcERldmljZS0+YkZpeFJhdGUpIHsKKy8qCisgICAgICAgICAgICAgICAgaWYgKChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfU1RBKSAmJiAoaWkgPT0gMCkpCisgICAgICAgICAgICAgICAgICAgIFJBVEV2VHhSYXRlRmFsbEJhY2socERldmljZSwgJihwTWdtdC0+c05vZGVEQlRhYmxlW2lpXSkpOworKi8KKyAgICAgICAgICAgICAgICBpZiAoaWkgPiAwKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGlpID0gMCBmb3IgbXVsdGljYXN0IG5vZGUgKEFQICYgQWRob2MpCisgICAgICAgICAgICAgICAgICAgIFJBVEV2VHhSYXRlRmFsbEJhY2soKFBWT0lEKXBEZXZpY2UsICYocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0pKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGlpID0gMCByZXNlcnZlZCBmb3IgdW5pY2FzdCBBUCBub2RlIChJbmZyYSBTVEEpCisgICAgICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfU1RBKQorI2lmZGVmCVBMSUNFX0RFQlVHCisJCXByaW50aygiU2Vjb25kQ2FsbGJhY2s6QmVmb3JlOlR4RGF0YVJhdGUgaXMgJWRcbiIscE1nbXQtPnNOb2RlREJUYWJsZVswXS53VHhEYXRhUmF0ZSk7CisjZW5kaWYKKyAgICAgICAgICAgICAgICAgICAgICAgIFJBVEV2VHhSYXRlRmFsbEJhY2soKFBWT0lEKXBEZXZpY2UsICYocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0pKTsKKyNpZmRlZglQTElDRV9ERUJVRworCQlwcmludGsoIlNlY29uZENhbGxiYWNrOkFmdGVyOlR4RGF0YVJhdGUgaXMgJWRcbiIscE1nbXQtPnNOb2RlREJUYWJsZVswXS53VHhEYXRhUmF0ZSk7CisjZW5kaWYKKworCQl9CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gY2hlY2sgaWYgcGVuZGluZyBQUyBxdWV1ZQorICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbaWldLndFblF1ZXVlQ250ICE9IDApIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJJbmRleD0gJWQsIFF1ZXVlID0gJWQgcGVuZGluZyBcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpaSwgcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0ud0VuUXVldWVDbnQpOworICAgICAgICAgICAgICAgIGlmICgoaWkgPjApICYmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS53RW5RdWV1ZUNudCA+IDE1KSkgeworICAgICAgICAgICAgICAgICAgICBCU1N2UmVtb3ZlT25lTm9kZShwRGV2aWNlLCBpaSk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJQZW5kaW5nIG1hbnkgcXVldWVzIFBTIFNUQSBJbmRleCA9ICVkIHJlbW92ZSBcbiIsIGlpKTsKKyAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICB9CisKKworICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSAmJiAocERldmljZS0+ZUN1cnJlbnRQSFlUeXBlID09IFBIWV9UWVBFXzExRykpIHsKKworICAgICAgICAvLyBvbi9vZmYgcHJvdGVjdCBtb2RlCisgICAgICAgIGlmIChXTEFOX0dFVF9FUlBfVVNFX1BST1RFQ1RJT04ocERldmljZS0+YnlFUlBGbGFnKSkgeworICAgICAgICAgICAgaWYgKCFwRGV2aWNlLT5iUHJvdGVjdE1vZGUpIHsKKyAgICAgICAgICAgICAgICBNQUN2RW5hYmxlUHJvdGVjdE1EKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJQcm90ZWN0TW9kZSA9IFRSVUU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+YlByb3RlY3RNb2RlKSB7CisgICAgICAgICAgICAgICAgTUFDdkRpc2FibGVQcm90ZWN0TUQocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgcERldmljZS0+YlByb3RlY3RNb2RlID0gRkFMU0U7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgLy8gb24vb2ZmIHNob3J0IHNsb3QgdGltZQorCisgICAgICAgIGlmICh1Tm9uU2hvcnRTbG90U1RBQ250ID4gMCkgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJTaG9ydFNsb3RUaW1lKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+YlNob3J0U2xvdFRpbWUgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBCQnZTZXRTaG9ydFNsb3RUaW1lKHBEZXZpY2UpOworICAgICAgICAgICAgICAgIHZVcGRhdGVJRlMoKFBWT0lEKXBEZXZpY2UpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgaWYgKCFwRGV2aWNlLT5iU2hvcnRTbG90VGltZSkgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJTaG9ydFNsb3RUaW1lID0gVFJVRTsKKyAgICAgICAgICAgICAgICBCQnZTZXRTaG9ydFNsb3RUaW1lKHBEZXZpY2UpOworICAgICAgICAgICAgICAgIHZVcGRhdGVJRlMoKFBWT0lEKXBEZXZpY2UpOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgLy8gb24vb2ZmIGJhcmtlciBsb25nIHByZWFtYmxlIG1vZGUKKworICAgICAgICBpZiAodUxvbmdQcmVhbWJsZVNUQUNudCA+IDApIHsKKyAgICAgICAgICAgIGlmICghcERldmljZS0+YkJhcmtlclByZWFtYmxlTWQpIHsKKyAgICAgICAgICAgICAgICBNQUN2RW5hYmxlQmFya2VyUHJlYW1ibGVNZChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iQmFya2VyUHJlYW1ibGVNZCA9IFRSVUU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+YkJhcmtlclByZWFtYmxlTWQpIHsKKyAgICAgICAgICAgICAgICBNQUN2RGlzYWJsZUJhcmtlclByZWFtYmxlTWQocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkJhcmtlclByZWFtYmxlTWQgPSBGQUxTRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgfQorCisKKyAgICAvLyBDaGVjayBpZiBhbnkgU1RBIGluIFBTIG1vZGUsIGVuYWJsZSBEVElNIG11bHRpY2FzdCBkZWxpdmVyCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAodVNsZWVweVNUQUNudCA+IDApCisgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJQU0VuYWJsZSA9IFRSVUU7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0uYlBTRW5hYmxlID0gRkFMU0U7CisgICAgfQorCisgICAgcEl0ZW1TU0lEID0gKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieURlc2lyZVNTSUQ7CisgICAgcEN1cnJTU0lEID0gKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lEOworLy9wcmludGsoInBDdXJyU1NJRD0lc1xuIixwQ3VyclNTSUQtPmFieVNTSUQpOworICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfU1RBTkRCWSkgfHwKKyAgICAgICAgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19TVEEpKSB7CisKKyAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbMF0uYkFjdGl2ZSkgeyAvLyBBc3NvYyB3aXRoIEJTUworICAgICAgICAgICAvLyBERVZJQ0VfUFJUKE1TR19MRVZFTF9JTkZPLCBLRVJOX0lORk8gIkNhbGxiYWNrIGluYWN0aXZlIENvdW50ID0gWyVkXVxuIiwgcE1nbXQtPnNOb2RlREJUYWJsZVswXS51SW5BY3RpdmVDb3VudCk7CisgICAgICAgICAgICAvL2lmIChwRGV2aWNlLT5iVXBkYXRlQkJWR0EpIHsKKyAgICAgICAgICAgIC8vICBzX3ZDaGVja1NlbnNpdGl2aXR5KChIQU5ETEUpIHBEZXZpY2UpOworICAgICAgICAgICAgLy99CisgICAgICAgICAgICBpZiAocERldmljZS0+YlVwZGF0ZUJCVkdBKSB7CisgICAgICAgICAgICAgICAvLyBzX3ZDaGVja1NlbnNpdGl2aXR5KChIQU5ETEUpIHBEZXZpY2UpOworICAgICAgICAgICAgICAgc192Q2hlY2tQcmVFRFRocmVzaG9sZCgoSEFORExFKXBEZXZpY2UpOworICAgICAgICAgICAgfQorICAgIAkgICAgaWYgKChwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVJbkFjdGl2ZUNvdW50ID49IChMT1NUX0JFQUNPTl9DT1VOVC8yKSkgJiYKKyAgICAJICAgICAgICAocERldmljZS0+YnlCQlZHQUN1cnJlbnQgIT0gcERldmljZS0+YWJ5QkJWR0FbMF0pICkgeworICAgIAkgICAgICAgIHBEZXZpY2UtPmJ5QkJWR0FOZXcgPSBwRGV2aWNlLT5hYnlCQlZHQVswXTsKKyAgICAgICAgICAgICAgICBiU2NoZWR1bGVDb21tYW5kKChIQU5ETEUpIHBEZXZpY2UsIFdMQU5fQ01EX0NIQU5HRV9CQlNFTlNJVElWSVRZLCBOVUxMKTsKKyAgICAJICAgIH0KKworCisgICAgICAgIAlpZiAocE1nbXQtPnNOb2RlREJUYWJsZVswXS51SW5BY3RpdmVDb3VudCA+PSBMT1NUX0JFQUNPTl9DT1VOVCkgeworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0uYkFjdGl2ZSA9IEZBTFNFOworICAgICAgICAgICAgICAgIHBNZ210LT5lQ3Vyck1vZGUgPSBXTUFDX01PREVfU1RBTkRCWTsKKyAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfSURMRTsKKyAgICAgICAgICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gRkFMU0U7CisgICAgICAgICAgICAgICAgcERldmljZS0+YlJvYW1pbmcgPSBUUlVFOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJMb3N0IEFQIGJlYWNvbiBbJWRdIHNlYywgZGlzY29ubmVjdGVkICFcbiIsIHBNZ210LT5zTm9kZURCVGFibGVbMF0udUluQWN0aXZlQ291bnQpOworICAgICAgICBpZiAoKHBEZXZpY2UtPmJXUEFERVZVcCkgJiYgKHBEZXZpY2UtPnNrYiAhPSBOVUxMKSkgeworICAgICAgICAgICAgIHdwYWhkciA9ICh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BUlBIUkRfRVRIRVI7CisJcHJpbnRrKCJ3aXJlbGVzc19zZW5kX2V2ZW50LS0tPlNJT0NHSVdBUChkaXNhc3NvY2lhdGVkKVxuIik7CisJd2lyZWxlc3Nfc2VuZF9ldmVudChwRGV2aWNlLT5kZXYsIFNJT0NHSVdBUCwgJndycXUsIE5VTEwpOworICAgICB9CisgICNlbmRpZgorCQkJfQorICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHBJdGVtU1NJRC0+bGVuICE9IDApIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT51QXV0b1JlQ29ubmVjdFRpbWUgPCAxMCkgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVBdXRvUmVDb25uZWN0VGltZSsrOworCSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9EUklWRVJfV0VYVF9TVVBQT1JUCisgICAgICAgICAgICAgICAgLy9uZXR3b3JrIG1hbmFnZXIgc3VwcG9ydCBuZWVkIG5vdCBkbyBSb2FtaW5nIHNjYW4/Pz8KKyAgICAgICAgICAgICAgICBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09VFJVRSkKKwkJIHBEZXZpY2UtPnVBdXRvUmVDb25uZWN0VGltZSA9IDA7CisJICAgICAjZW5kaWYKKworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisJCSAgICAvL21pa2UgdXNlIG9sZCBlbmNyeXB0aW9uIHN0YXR1cyBmb3Igd3BhIHJlYXV0aGVuCisJICAgICAgaWYocERldmljZS0+YldQQURFVlVwKQorCSAgICAgICAgICBwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9IHBEZXZpY2UtPmVPbGRFbmNyeXB0aW9uU3RhdHVzOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlJvYW1pbmcgLi4uXG4iKTsKKyAgICAgICAgICAgICAgICBCU1N2Q2xlYXJCU1NMaXN0KChIQU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BTkRMRSkgcERldmljZSwgV0xBTl9DTURfQlNTSURfU0NBTiwgTlVMTCk7CisgICAgICAgICAgICAgICAgYlNjaGVkdWxlQ29tbWFuZCgoSEFORExFKSBwRGV2aWNlLCBXTEFOX0NNRF9TU0lELCBOVUxMKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT51QXV0b1JlQ29ubmVjdFRpbWUgPSAwOworICAgICAgICAgICAgfTsKKyAgICAgICAgfQorICAgICAgICBpZiAocE1nbXQtPmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9KT0lOVEVEKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+YlVwZGF0ZUJCVkdBKSB7CisgICAgICAgICAgICAgICAvL3NfdkNoZWNrU2Vuc2l0aXZpdHkoKEhBTkRMRSkgcERldmljZSk7CisgICAgICAgICAgICAgICBzX3ZDaGVja1ByZUVEVGhyZXNob2xkKChIQU5ETEUpcERldmljZSk7CisgICAgICAgICAgICB9CisgICAgICAgIAlpZiAocE1nbXQtPnNOb2RlREJUYWJsZVswXS51SW5BY3RpdmVDb3VudCA+PUFESE9DX0xPU1RfQkVBQ09OX0NPVU5UKSB7CisgICAgICAgIAkgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfTk9USUNFLCBLRVJOX0lORk8gIkxvc3Qgb3RoZXIgU1RBIGJlYWNvbiBbJWRdIHNlYywgc3RhcnRlZCAhXG4iLCBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVJbkFjdGl2ZUNvdW50KTsKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVJbkFjdGl2ZUNvdW50ID0gMDsKKyAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfU1RBUlRFRDsKKyAgICAgICAgICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gRkFMU0U7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCisgICAgcE1nbXQtPnNUaW1lclNlY29uZENhbGxiYWNrLmV4cGlyZXMgPSBSVU5fQVQoSFopOworICAgIGFkZF90aW1lcigmcE1nbXQtPnNUaW1lclNlY29uZENhbGxiYWNrKTsKKyAgICByZXR1cm47Cit9CisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKgorICoKKyAqICBVcGRhdGUgVHggYXR0ZW1wcywgVHggZmFpbHVyZSBjb3VudGVyIGluIE5vZGUgREIKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgbm9uZS4KKyAqCistKi8KKworCisKK1ZPSUQKK0JTU3ZVcGRhdGVOb2RlVHhDb3VudGVyKAorICAgIElOIEhBTkRMRSAgICAgIGhEZXZpY2VDb250ZXh0LAorICAgIElOIEJZVEUgICAgICAgIGJ5VHNyMCwKKyAgICBJTiBCWVRFICAgICAgICBieVRzcjEsCisgICAgSU4gUEJZVEUgICAgICAgcGJ5QnVmZmVyLAorICAgIElOIFVJTlQgICAgICAgIHVGSUZPSGVhZGVyU2l6ZQorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBVSU5UICAgICAgICAgICAgdU5vZGVJbmRleCA9IDA7CisgICAgQllURSAgICAgICAgICAgIGJ5VHhSZXRyeSA9IChieVRzcjAgJiBUU1IwX05DUik7CisgICAgUFNUeEJ1ZkhlYWQgICAgIHBUeEJ1ZkhlYWQ7CisgICAgUFM4MDJfMTFIZWFkZXIgIHBNQUNIZWFkZXI7CisgICAgV09SRCAgICAgICAgICAgIHdSYXRlOworICAgIFdPUkQgICAgICAgICAgICB3RmFsbEJ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0ZhbGxCYWNrUmF0ZSA9IGF3SFdSZXRyeTBbd1JhdGUtUkFURV8xOE1dW3R4UmV0cnlUZW1wXSArMTsKKwkJZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgd0ZhbGxCYWNrUmF0ZSA9IGF3SFdSZXRyeTBbd1JhdGUtUkFURV8xOE1dWzRdOworCQkJLy93RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MFt3UmF0ZS1SQVRFXzEyTV1bNF07CisJCX0gZWxzZSBpZiAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCXzEpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGJ5VHhSZXRyeSA8IDUpCisgICAgICAgICAgICAgICAgICAgICAgICB3RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MVt3UmF0ZS1SQVRFXzE4TV1bYnlUeFJldHJ5XTsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgd0ZhbGxCYWNrUmF0ZSA9IGF3SFdSZXRyeTFbd1JhdGUtUkFURV8xOE1dWzRdOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVUeE9rW3dGYWxsQmFja1JhdGVdKys7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0udVR4RmFpbHVyZXMgKys7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVUeFJldHJ5ICs9IGJ5VHhSZXRyeTsKKyAgICAgICAgICAgIGlmIChieVR4UmV0cnkgIT0gMCkgeworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0udVR4RmFpbFtNQVhfUkFURV0rPWJ5VHhSZXRyeTsKKyAgICAgICAgICAgICAgICBpZiAoIChieUZhbGxCYWNrID09IEFVVE9fRkJfTk9ORSkgfHwKKyAgIC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UmF0ZV0rKzsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCXzEpIHsKKyAgICAgICAgICAgICAgICAgICAgZm9yKGlpPTA7aWk8YnlUeFJldHJ5O2lpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpaSA8IDUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0ZhbGxCYWNrUmF0ZSA9IGF3SFdSZXRyeTFbd1JhdGUtUkFURV8xOE1dW2lpXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MVt3UmF0ZS1SQVRFXzE4TV1bNF07CisgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVUeEZhaWxbd0ZhbGxCYWNrUmF0ZV0rKzsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfTsKKworICAgICAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSB8fAorICAgICAgICAgICAgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkpIHsKKworICAgICAgICAgICAgcE1BQ0hlYWRlciA9IChQUzgwMl8xMUhlYWRlcikocGJ5QnVmZmVyICsgdUZJRk9IZWFkZXJTaXplKTsKKworICAgICAgICAgICAgaWYgKEJTU0RCYklzU1RBSW5Ob2RlREIoKEhBTkRMRSlwTWdtdCwgJihwTUFDSGVhZGVyLT5hYnlBZGRyMVswXSksICZ1Tm9kZUluZGV4KSl7CisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhBdHRlbXB0cyArPSAxOworICAgICAgICAgICAgICAgIGlmICgoYnlUc3IxICYgVFNSMV9URVJSKSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHRyYW5zbWl0IHN1Y2Nlc3MsIFR4QXR0ZW1wdHMgYXQgbGVhc3QgcGx1cyBvbmUKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhPa1tNQVhfUkFURV0rKzsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCX05PTkUpIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgKHdSYXRlIDwgUkFURV8xOE0pICkgeworICAgICAgICAgICAgICAgICAgICAgICAgd0ZhbGxCYWNrUmF0ZSA9IHdSYXRlOworICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJ5RmFsbEJhY2sgPT0gQVVUT19GQl8wKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYnlUeFJldHJ5IDwgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MFt3UmF0ZS1SQVRFXzE4TV1bYnlUeFJldHJ5XTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MFt3UmF0ZS1SQVRFXzE4TV1bNF07CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCXzEpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChieVR4UmV0cnkgPCA1KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdGYWxsQmFja1JhdGUgPSBhd0hXUmV0cnkxW3dSYXRlLVJBVEVfMThNXVtieVR4UmV0cnldOworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdGYWxsQmFja1JhdGUgPSBhd0hXUmV0cnkxW3dSYXRlLVJBVEVfMThNXVs0XTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLnVUeE9rW3dGYWxsQmFja1JhdGVdKys7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhGYWlsdXJlcyArKzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhSZXRyeSArPSBieVR4UmV0cnk7CisgICAgICAgICAgICAgICAgaWYgKGJ5VHhSZXRyeSAhPSAwKSB7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVR4RmFpbFtNQVhfUkFURV0rPWJ5VHhSZXRyeTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCX05PTkUpIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgKHdSYXRlIDwgUkFURV8xOE0pICkgeworICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhGYWlsW3dSYXRlXSs9YnlUeFJldHJ5OworICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJ5RmFsbEJhY2sgPT0gQVVUT19GQl8wKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBmb3IoaWk9MDtpaTxieVR4UmV0cnk7aWkrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpaSA8IDUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdGYWxsQmFja1JhdGUgPSBhd0hXUmV0cnkwW3dSYXRlLVJBVEVfMThNXVtpaV07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RmFsbEJhY2tSYXRlID0gYXdIV1JldHJ5MFt3UmF0ZS1SQVRFXzE4TV1bNF07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhGYWlsW3dGYWxsQmFja1JhdGVdKys7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYnlGYWxsQmFjayA9PSBBVVRPX0ZCXzEpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvcihpaT0wO2lpPGJ5VHhSZXRyeTtpaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlpIDwgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0ZhbGxCYWNrUmF0ZSA9IGF3SFdSZXRyeTFbd1JhdGUtUkFURV8xOE1dW2lpXTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdGYWxsQmFja1JhdGUgPSBhd0hXUmV0cnkxW3dSYXRlLVJBVEVfMThNXVs0XTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLnVUeEZhaWxbd0ZhbGxCYWNrUmF0ZV0rKzsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH07CisgICAgICAgIH0KKyAgICB9OworCisgICAgcmV0dXJuOworCit9CisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBDbGVhciBOb2RlcyAmIHNrYiBpbiBEQiBUYWJsZQorICoKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBoRGV2aWNlQ29udGV4dCAgICAgICAgLSBUaGUgYWRhcHRlciBjb250ZXh0LgorICogICAgICB1U3RhcnRJbmRleCAgICAgICAgICAgLSBzdGFydGluZyBpbmRleAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworVk9JRAorQlNTdkNsZWFyTm9kZURCVGFibGUoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFVJTlQgdVN0YXJ0SW5kZXgKKyAgICApCisKK3sKKyAgICBQU0RldmljZSAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBzdHJ1Y3Qgc2tfYnVmZiAgKnNrYjsKKyAgICBVSU5UICAgICAgICAgICAgaWk7CisKKyAgICBmb3IgKGlpID0gdVN0YXJ0SW5kZXg7IGlpIDwgKE1BWF9OT0RFX05VTSArIDEpOyBpaSsrKSB7CisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iQWN0aXZlKSB7CisgICAgICAgICAgICAvLyBjaGVjayBpZiBzVHhQU1F1ZXVlIGhhcyBiZWVuIGluaXRpYWwKKyAgICAgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5zVHhQU1F1ZXVlLm5leHQgIT0gTlVMTCkgeworICAgICAgICAgICAgICAgIHdoaWxlICgoc2tiID0gc2tiX2RlcXVldWUoJnBNZ210LT5zTm9kZURCVGFibGVbaWldLnNUeFBTUXVldWUpKSAhPSBOVUxMKXsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlBTIHNrYiAhPSBOVUxMICVkXG4iLCBpaSk7CisgICAgICAgICAgICAgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiKHNrYik7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWVtc2V0KCZwTWdtdC0+c05vZGVEQlRhYmxlW2lpXSwgMCwgc2l6ZW9mKEtub3duTm9kZURCKSk7CisgICAgICAgIH0KKyAgICB9CisKKyAgICByZXR1cm47Cit9OworCisKK1ZPSUQgc192Q2hlY2tTZW5zaXRpdml0eSgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUEtub3duQlNTICAgICAgIHBCU1NMaXN0ID0gTlVMTDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBpbnQgICAgICAgICAgICAgaWk7CisKKyAgICBpZiAoKHBEZXZpY2UtPmJ5TG9jYWxJRCA8PSBSRVZfSURfVlQzMjUzX0ExKSAmJiAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfUkZNRDI5NTkpICYmCisgICAgICAgIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9JQlNTX1NUQSkpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworICAgIGlmICgocE1nbXQtPmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQykgfHwKKyAgICAgICAgKChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9JQlNTX1NUQSkgJiYgKHBNZ210LT5lQ3VyclN0YXRlID09IFdNQUNfU1RBVEVfSk9JTlRFRCkpKSB7CisgICAgICAgIHBCU1NMaXN0ID0gQlNTcEFkZHJJc0luQlNTTGlzdChwRGV2aWNlLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCAoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5Q3VyclNTSUQpOworICAgICAgICBpZiAocEJTU0xpc3QgIT0gTlVMTCkgeworICAgICAgICAgICAgLy8gVXBkYXRhIEJCIFJlZyBpZiBSU1NJIGlzIHRvbyBzdHJvbmcuCisgICAgICAgICAgICBMT05HICAgIExvY2FsbGRCbUF2ZXJhZ2UgPSAwOworICAgICAgICAgICAgTE9ORyAgICB1TnVtb2ZkQm0gPSAwOworICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgUlNTSV9TVEFUX0NPVU5UOyBpaSsrKSB7CisgICAgICAgICAgICAgICAgaWYgKHBCU1NMaXN0LT5sZEJtQXZlcmFnZVtpaV0gIT0gMCkgeworICAgICAgICAgICAgICAgICAgICB1TnVtb2ZkQm0gKys7CisgICAgICAgICAgICAgICAgICAgIExvY2FsbGRCbUF2ZXJhZ2UgKz0gcEJTU0xpc3QtPmxkQm1BdmVyYWdlW2lpXTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAodU51bW9mZEJtID4gMCkgeworICAgICAgICAgICAgICAgIExvY2FsbGRCbUF2ZXJhZ2UgPSBMb2NhbGxkQm1BdmVyYWdlL3VOdW1vZmRCbTsKKyAgICAgICAgICAgICAgICBmb3IgKGlpPTA7aWk8QkJfVkdBX0xFVkVMO2lpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJMb2NhbGxkQm1BdmVyYWdlOiVsZCwgJWxkICUwMnhcbiIsIExvY2FsbGRCbUF2ZXJhZ2UsIHBEZXZpY2UtPmxkQm1UaHJlc2hvbGRbaWldLCBwRGV2aWNlLT5hYnlCQlZHQVtpaV0pOworICAgICAgICAgICAgICAgICAgICBpZiAoTG9jYWxsZEJtQXZlcmFnZSA8IHBEZXZpY2UtPmxkQm1UaHJlc2hvbGRbaWldKSB7CisgICAgICAgICAgICAgICAgCSAgICBwRGV2aWNlLT5ieUJCVkdBTmV3ID0gcERldmljZS0+YWJ5QkJWR0FbaWldOworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJ5QkJWR0FOZXcgIT0gcERldmljZS0+YnlCQlZHQUN1cnJlbnQpIHsKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dUJCVkdBRGlmZkNvdW50Kys7CisgICAgICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT51QkJWR0FEaWZmQ291bnQgPj0gQkJfVkdBX0NIQU5HRV9USFJFU0hPTEQpCisgICAgICAgICAgICAgICAgICAgICAgICBiU2NoZWR1bGVDb21tYW5kKChIQU5ETEUpIHBEZXZpY2UsIFdMQU5fQ01EX0NIQU5HRV9CQlNFTlNJVElWSVRZLCBOVUxMKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51QkJWR0FEaWZmQ291bnQgPSAwOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KK30KKworCitWT0lECitCU1N2Q2xlYXJBbnlCU1NKb2luUmVjb3JkICgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworCisgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX0JTU19OVU07IGlpKyspIHsKKyAgICAgICAgcE1nbXQtPnNCU1NMaXN0W2lpXS5iU2VsZWN0ZWQgPSBGQUxTRTsKKyAgICB9CisgICAgcmV0dXJuOworfQorCisjaWZkZWYgQ2FsY3VfTGlua1F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dOworICAgIFVJTlQgICAgICAgICAgICB1Q2hhbm5lbDsKKyAgICBCWVRFICAgICAgICAgICAgYWJ5U3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU4gKyAxXTsKKyAgICBCWVRFICAgICAgICAgICAgYWJ5RXh0U3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU4gKyAxXTsKKyAgICBVSU5UICAgICAgICAgICAgdVJTU0k7CisgICAgQllURSAgICAgICAgICAgIGJ5U1E7CisgICAgV09SRCAgICAgICAgICAgIHdCZWFjb25JbnRlcnZhbDsKKyAgICBXT1JEICAgICAgICAgICAgd0NhcEluZm87CisgICAgQllURSAgICAgICAgICAgIGFieVNTSURbV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1NTSURfTUFYTEVOICsgMV07CisgICAgQllURSAgICAgICAgICAgIGJ5UnhSYXRlOworLy8gICAgV09SRCAgICAgICAgICAgIHdBVElNV2luZG93OworICAgIEJZVEUgICAgICAgICAgICBieVJTU0lTdGF0Q250OworICAgIExPTkcgICAgICAgICAgICBsZEJtTUFYOworICAgIExPTkcgICAgICAgICAgICBsZEJtQXZlcmFnZVtSU1NJX1NUQVRfQ09VTlRdOworICAgICBMT05HICAgICAgICAgICAgbGRCbUF2ZXJSYW5nZTsKKyAgICAvL0ZvciBhbnkgQlNTSUQgc2VsZWN0aW9uIGltcHJvdm1lbnQKKyAgICBCT09MICAgICAgICAgICAgYlNlbGVjdGVkOworCisgICAgLy8rKyBXUEEgaW5mb3JtYXRpb25zCisgICAgQk9PTCAgICAgICAgICAgIGJXUEFWYWxpZDsKKyAgICBCWVRFICAgICAgICAgICAgYnlHS1R5cGU7CisgICAgQllURSAgICAgICAgICAgIGFieVBLVHlwZVs0XTsKKyAgICBXT1JEICAgICAgICAgICAgd1BLQ291bnQ7CisgICAgQllURSAgICAgICAgICAgIGFieUF1dGhUeXBlWzRdOworICAgIFdPUkQgICAgICAgICAgICB3QXV0aENvdW50OworICAgIEJZVEUgICAgICAgICAgICBieURlZmF1bHRLX2FzX1BLOworICAgIEJZVEUgICAgICAgICAgICBieVJlcGxheUlkeDsKKyAgICAvLy0tCisKKyAgICAvLysrIFdQQTIgaW5mb3JtYXRpb25zCisgICAgQk9PTCAgICAgICAgICAgIGJXUEEyVmFsaWQ7CisgICAgQllURSAgICAgICAgICAgIGJ5Q1NTR0s7CisgICAgV09SRCAgICAgICAgICAgIHdDU1NQS0NvdW50OworICAgIEJZVEUgICAgICAgICAgICBhYnlDU1NQS1s0XTsKKyAgICBXT1JEICAgICAgICAgICAgd0FLTVNTQXV0aENvdW50OworICAgIEJZVEUgICAgICAgICAgICBhYnlBS01TU0F1dGhUeXBlWzRdOworCisgICAgLy8rKyAgd3BhY3RsCisgICAgQllURSAgICAgICAgICAgIGJ5V1BBSUVbTUFYX1dQQV9JRV9MRU5dOworICAgIEJZVEUgICAgICAgICAgICBieVJTTklFW01BWF9XUEFfSUVfTEVOXTsKKyAgICBXT1JEICAgICAgICAgICAgd1dQQUxlbjsKKyAgICBXT1JEICAgICAgICAgICAgd1JTTkxlbjsKKworICAgIC8vIENsZWFyIGNvdW50CisgICAgVUlOVCAgICAgICAgICAgIHVDbGVhckNvdW50OworLy8gICAgQllURSAgICAgICAgICAgIGFieUlFc1tXTEFOX0JFQUNPTl9GUl9NQVhMRU5dOworICAgIFVJTlQgICAgICAgICAgICB1SUVMZW5ndGg7CisgICAgUVdPUkQgICAgICAgICAgIHF3QlNTVGltZXN0YW1wOworICAgIFFXT1JEICAgICAgICAgICBxd0xvY2FsVFNGOyAgICAgLy8gbG9jYWwgVFNGIHRpbWVyCisKKy8vICAgIE5ESVNfODAyXzExX05FVFdPUktfVFlQRSAgICBOZXR3b3JrVHlwZUluVXNlOworICAgIENBUkRfUEhZX1RZUEUgICBlTmV0d29ya1R5cGVJblVzZTsKKworICAgIEVSUE9iamVjdCAgICAgICBzRVJQOworICAgIFNSU05DYXBPYmplY3QgICBzUlNOQ2FwT2JqOworICAgIEJZVEUgICAgICAgICAgICBhYnlJRXNbMTAyNF07ICAgLy8gZG9uJ3QgbW92ZSB0aGlzIGZpZWxkICEhCisKK31fX2F0dHJpYnV0ZV9fICgoX19wYWNrZWRfXykpCitLbm93bkJTUyAsIERFRiogUEtub3duQlNTOworCisvLzIwMDYtMTExNi0wMSw8QWRkPiBieSBOb21hZFpoYW8KKyNwcmFnbWEgcGFjaygpCisKK3R5cGVkZWYgZW51bSB0YWdOT0RFX1NUQVRFIHsKKyAgICBOT0RFX0ZSRUUsCisgICAgTk9ERV9BR0VELAorICAgIE5PREVfS05PV04sCisgICAgTk9ERV9BVVRILAorICAgIE5PREVfQVNTT0MKK30gTk9ERV9TVEFURSwgKlBOT0RFX1NUQVRFOworCisKKy8vIFNUQSBub2RlIGluZm8KK3R5cGVkZWYgc3RydWN0IHRhZ0tub3duTm9kZURCIHsKKyAgICAvLyBTVEEgaW5mbworICAgIEJPT0wgICAgICAgICAgICBiQWN0aXZlOworICAgIEJZVEUgICAgICAgICAgICBhYnlNQUNBZGRyW1dMQU5fQUREUl9MRU5dOworICAgIEJZVEUgICAgICAgICAgICBhYnlDdXJyU3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU5dOworICAgIEJZVEUgICAgICAgICAgICBhYnlDdXJyRXh0U3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU5dOworICAgIFdPUkQgICAgICAgICAgICB3VHhEYXRhUmF0ZTsKKyAgICBCT09MICAgICAgICAgICAgYlNob3J0UHJlYW1ibGU7CisgICAgQk9PTCAgICAgICAgICAgIGJFUlBFeGlzdDsKKyAgICBCT09MICAgICAgICAgICAgYlNob3J0U2xvdFRpbWU7CisgICAgVUlOVCAgICAgICAgICAgIHVJbkFjdGl2ZUNvdW50OworICAgIFdPUkQgICAgICAgICAgICB3TWF4QmFzaWNSYXRlOyAgICAgLy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XVlQ250OworCisgICAgQk9PTCAgICAgICAgICAgIGJPbkZseTsKKyAgICBVTE9OR0xPTkcgICAgICAgS2V5UlNDOworICAgIEJZVEUgICAgICAgICAgICBieUtleUluZGV4OworICAgIERXT1JEICAgICAgICAgICBkd0tleUluZGV4OworICAgIEJZVEUgICAgICAgICAgICBieUNpcGhlclN1aXRlOworICAgIERXT1JEICAgICAgICAgICBkd1RTQzQ3XzE2OworICAgIFdPUkQgICAgICAgICAgICB3VFNDMTVfMDsKKyAgICBVSU5UICAgICAgICAgICAgdVdlcEtleUxlbmd0aDsKKyAgICBCWVRFICAgICAgICAgICAgYWJ5V2VwS2V5W1dMQU5fV0VQTUFYX0tFWUxFTl07CisgICAgLy8KKyAgICAvLyBBdXRvIHJhdGUgZmFsbGJhY2sgdmFycworICAgIEJPT0wgICAgICAgICAgICBiSXNJbkZhbGxiYWNrOworICAgIFVJTlQgICAgICAgICAgICB1QXZlcmFnZVJTU0k7CisgICAgVUlOVCAgICAgICAgICAgIHVSYXRlUmVjb3ZlcnlUaW1lb3V0OworICAgIFVJTlQgICAgICAgICAgICB1UmF0ZVBvbGxUaW1lb3V0OworICAgIFVJTlQgICAgICAgICAgICB1VHhGYWlsdXJlczsKKyAgICBVSU5UICAgICAgICAgICAgdVR4QXR0ZW1wdHM7CisKKyAgICBVSU5UICAgICAgICAgICAgdVR4UmV0cnk7CisgICAgVUlOVCAgICAgICAgICAgIHVGYWlsdXJlUmF0aW87CisgICAgVUlOVCAgICAgICAgICAgIHVSZXRyeVJhdGlvOworICAgIFVJTlQgICAgICAgICAgICB1VHhPa1tNQVhfUkFURSsxXTsKKyAgICBVSU5UICAgICAgICAgICAgdVR4RmFpbFtNQVhfUkFURSsxXTsKKyAgICBVSU5UICAgICAgICAgICAgdVRpbWVDb3VudDsKKworfSBLbm93bk5vZGVEQiwgREVGKiBQS25vd25Ob2RlREI7CisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbn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kZXgKKyAgICApOworCitWT0lECitCU1N2Q3JlYXRlT25lTm9kZSgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgT1VUIFBVSU5UIHB1Tm9kZUluZGV4CisgICAgKTsKKworVk9JRAorQlNTdlVwZGF0ZUFQTm9kZSgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gUFdPUkQgcHdDYXBJbmZvLAorICAgIElOIFBXTEFOX0lFX1NVUFBfUkFURVMgcEl0ZW1SYXRlcywKKyAgICBJTiBQV0xBTl9JRV9TVVBQX1JBVEVTIHBFeHRTdXBwUmF0ZXMKKyAgICApOworCisKK1ZPSUQKK0JTU3ZTZWNvbmRDYWxsQmFjaygKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApOworCitWT0lECitCU1N2VXBkYXRlTm9kZVR4Q291bnRlcigKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gQllURSAgICAgICAgYnlUc3IwLAorICAgIElOIEJZVEUgICAgICAgIGJ5VHNyMSwKKyAgICBJTiBQQllURSAgICAgICBwYnlCdWZmZXIsCisgICAgSU4gVUlOVCAgICAgICAgdUZJRk9IZWFkZXJTaXplCisgICAgKTsKKworVk9JRAorQlNTdlJlbW92ZU9uZU5vZGUoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFVJTlQgdU5vZGVJbmRleAorICAgICk7CisKK1ZPSUQKK0JTU3ZBZGRNdWx0aWNhc3ROb2RlKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dAorICAgICk7CisKKworVk9JRAorQlNTdkNsZWFyTm9kZURCVGFibGUoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFVJTlQgdVN0YXJ0SW5kZXgKKyAgICApOworCitWT0lECitCU1N2Q2xlYXJBbnlCU1NKb2luUmVjb3JkKAorICAgIElOIEhBTkRMRSBoRGV2a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cgICAgICAgMTAKKworI2RlZmluZSBDX0VJRlMgICAgICAgICAgODAgICAgICAvLyBtaWNybyBzZWMuCisKKworI2RlZmluZSBDX1NMT1RfU0hPUlQgICAgOSAgICAgICAvLyBtaWNybyBzZWMuCisjZGVmaW5lIENfU0xPVF9MT05HICAgICAyMAorCisjZGVmaW5lIENfQ1dNSU5fQSAgICAgICAxNSAgICAgIC8vIHNsb3QgdGltZQorI2RlZmluZSBDX0NXTUlOX0IgICAgICAgMzEKKworI2RlZmluZSBDX0NXTUFYICAgICAgICAgMTAyMyAgICAvLyBzbG90IHRpbWUKKworI2RlZmluZSBDQVJEX01BWF9DSEFOTkVMX1RCTCAgICA1NgorCisjZGVmaW5lIFdBSVRfQkVBQ09OX1RYX0RPV05fVE1PICAgICAgICAgMyAgICAvLyBUaW1lcworCit0eXBlZGVmIHN0cnVjdCB0YWdTQ2hhbm5lbFRibEVsZW1lbnQgeworICAgIEJZVEUgICAgYnlDaGFubmVsTnVtYmVyOworICAgIFVJTlQgICAgdUZyZXF1ZW5jeTsKKyAgICBCT09MICAgIGJWYWxpZDsKKyAgICBCWVRFICAgIGJ5TUFQOworfVNDaGFubmVsVGJsRWxlbWVudCwgREVGKiBQU0NoYW5uZWxUYmxFbGVtZW50OworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vMU0sICAgMk0sICAgNU0sICAxMU0sICAxOE0sICAyNE0sICAzNk0sICA1NE0KK3N0YXRpYyBCWVRFIGFieURlZmF1bHRTdXBwUmF0ZXNHW10gPSB7V0xBTl9FSURfU1VQUF9SQVRFUywgOCwgMHgwMiwgMHgwNCwgMHgwQiwgMHgxNiwgMHgyNCwgMHgzMCwgMHg0OCwgMHg2Q307CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vNk0sICAgOU0sICAxMk0sICA0OE0KK3N0YXRpYyBCWVR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KioqCisgKiBUaGUgUmFkYXIgcmVndWxhdGlvbiBydWxlcyBmb3IgZWFjaCBjb3VudHJ5CisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworU0NvdW50cnlUYWJsZSBDaGFubmVsUnVsZVRhYltDQ09ERV9NQVgrMV0gPQoreworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVGhpcyB0YWJsZSBpcyBiYXNlZCBvbiBBdGhlcm8gZHJpdmVyIHJ1bGVzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogQ291bnRyeSAgICAgICAgICBBdmFpbGFibGUgY2hhbm5lbHMsIGVuZGVkIHdpdGggMCAgICAgICAgICAgICAgICAgICAgKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAyICAgMyAgIDQgICA1ICAgNiAgIDcgICA4ICAgOSAgMTAgIDExICAxMiAgMTMgIDE0ICAxNSAgMTYgIDE3ICAxOCAgMTkgIDIwICAyMSAgMjIgIDIzICAyNCAgMjUgIDI2ICAyNyAgMjggIDI5ICAzMCAgMzEgIDMyICAzMyAgMzQgIDM1ICAzNiAgMzcgIDM4ICAzOSAgNDAgIDQxICA0MiAgNDMgIDQ0ICA0NSAgNDYgIDQ3ICA0OCAgNDkgIDUwICA1MSAgNTIgIDUzICA1NCAgNTUgIDU2ICAqLwore0NDT0RFX0ZDQywgICAgICAgICAgICAgICAgICAgICB7J1UnLCdTJ30sICB7ICAgMSwgIDEsICAxLCAgMSwgIDEsICAxLCAgMSwgIDEsICAxLCAgMSwgIDEsICAwLCAgMCwgIDAsICAwLCAgMCwgIDAsICAwLCAgMCwgIDAsICAwLCAgMCwgIDAsICAwLCAgMCwgIDAsICA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AtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENvdW50cnkgQ2hhbm5lbCBWYWxpZAorICogIElucHV0OiAgQ291bnRyeUNvZGUsIENoYW5uZWxOdW0KKyAqICAgICAgICAgIENoYW5uZUluZGV4IGlzIGRlZmluZWQgYXMgVlQzMjUzIE1BQyBjaGFubmVsOgorICogICAgICAgICAgICAgIDEgICA9IDIuNEcgY2hhbm5lbCAxCisgKiAgICAgICAgICAgICAgMiAgID0gMi40RyBjaGFubmVsIDIKKyAqICAgICAgICAgICAgICAuLi4KKyAqICAgICAgICAgICAgICAxNCAgPSAyLjRHIGNoYW5uZWwgMTQKKyAqICAgICAgICAgICAgICAxNSAgPSA0LjlHIGNoYW5uZWwgMTgzCisgKiAgICAgICAgICAgICAgMTYgID0gNC45RyBjaGFubmVsIDE4NAorICogICAgICAgICAgICAgIC4uLi4uCisgKiAgT3V0cHV0OiBUUlVFIGlmIHRoZSBzcGVjaWZpZWQgNUdIeiBiYW5kIGlzIGFsbG93ZWQgdG8gYmUgdXNlZC4KKyAgICAgICAgICAgIEZhbHNlIG90aGVyd2lzZS4KKy8vIDQuOUcgPT4gQ2ggMTgzLCAxODQsIDE4NSwgMTg3LCAxODgsIDE4OSwgMTkyLCAxOTYgKFZhbHVlOjE1IH4gMjIpCisKKy8vIDVHID0+IENoIDcsIDgsIDksIDExLCAxMiwgMTYsIDM0LCAzNiwgMzgsIDQwLCA0MiwgNDQsIDQ2LCA0OCwgNTIsIDU2LCA2MCwgNjQsCisvLyAxMDAsIDEwNCwgMTA4LCAxMTIsIDExNiwgMTIwLCAxMjQsIDEyOCwgMTMyLCAxMzYsIDE0MCwgMTQ5LCAxNTMsIDE1NywgMTYxLCAxNjUgKFZhbHVlIDIzIH4gNTYpCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLy8yMDA4LTgtNCA8YWRkPiBieSBjaGVzdGVyCitCT09MCitDaGFubmVsVmFsaWQoVUlOVCBDb3VudHJ5Q29kZSwgVUlOVCBDaGFubmVsSW5kZXgpCit7CisgICAgQk9PTCAgICBiVmFsaWQ7CisKKyAgICBiVmFsaWQgPSBGQUxTRTsKKyAgICAvKgorICAgICAqIElmIENoYW5uZWwgSW5kZXggaXMgaW52YWxpZCwgcmV0dXJuIGludmFsaWQKKyAgICAgKi8KKyAgICBpZiAoKENoYW5uZWxJbmRleCA+IENCX01BWF9DSEFOTkVMKSB8fAorICAgICAgICAoQ2hhbm5lbEluZGV4ID09IDApKQorICAgIHsKKyAgICAgICAgYlZhbGlkID0gRkFMU0U7CisgICAgICAgIGdvdG8gZXhpdDsKKyAgICB9CisKKyAgICBiVmFsaWQgPSBzQ2hhbm5lbFRibFtDaGFubmVsSW5kZXhdLmJWYWxpZDsKKworZXhpdDoKKyAgICByZXR1cm4gKGJWYWxpZCk7CisKK30gLyogZW5kIENoYW5uZWxWYWxpZCAqLworCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2FjdWxhdGUgVHhSYXRlIGFuZCBSc3ZUaW1lIGZpZWxkcyBmb3IgUlNQSU5GIGluIE9GRE0gbW9kZS4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICB3UmF0ZSAgICAgICAgICAgLSBUeCBSYXRlCisgKiAgICAgIGJ5UGt0VHlwZSAgICAgICAtIFR4IFBhY2tldCB0eXBlCisgKiAgT3V0OgorICogICAgICBwYnlUeFJhdGUgICAgICAgLSBwb2ludGVyIHRvIFJTUElORiBUeFJhdGUgZmllbGQKKyAqICAgICAgcGJ5UnN2VGltZSAgICAgIC0gcG9pbnRlciB0byBSU1BJTkYgUnN2VGltZSBmaWVsZAorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLworc3RhdGljCitWT0lECitzX3ZDYWN1bGF0ZU9GRE1SUGFyYW1ldGVyICgKKyAgICBJTiAgQllURSBieVJhdGUsCisgICAgSU4gIENBUkRfUEhZX1RZUEUgZVBIWVR5cGUsCisgICAgT1VUIFBCWVRFIHBieVR4UmF0ZSwKKyAgICBPVVQgUEJZVEUgcGJ5UnN2VGltZQorICAgICkKK3sKKyAgICBzd2l0Y2ggKGJ5UmF0ZSkgeworICAgIGNhc2UgUkFURV82TSA6CisgICAgICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsvLzVHSFoKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDlCOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSA0NDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDhCOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSA1MDsKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgUkFURV85TSA6CisgICAgICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsvLzVHSFoKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDlGOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAzNjsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDhGOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSA0MjsKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgY2FzZSBSQVRFXzEyTSA6CisgICAgICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsvLzVHSFoKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDlBOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAzMjsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDhBOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAzODsKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgY2FzZSBSQVRFXzE4TSA6CisgICAgICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsvLzVHSFoKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDlFOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAyODsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDhFOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAzNDsKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgUkFURV8zNk0gOgorICAgICAgICBpZiAoZVBIWVR5cGUgPT0gUEhZX1RZUEVfMTFBKSB7Ly81R0haCisgICAgICAgICAgICAqcGJ5VHhSYXRlID0gMHg5RDsKKyAgICAgICAgICAgICpwYnlSc3ZUaW1lID0gMjQ7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAqcGJ5VHhSYXRlID0gMHg4RDsKKyAgICAgICAgICAgICpwYnlSc3ZUaW1lID0gMzA7CisgICAgICAgIH0KKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFJBVEVfNDhNIDoKKyAgICAgICAgaWYgKGVQSFlUeXBlID09IFBIWV9UWVBFXzExQSkgey8vNUdIWgorICAgICAgICAgICAgKnBieVR4UmF0ZSA9IDB4OTg7CisgICAgICAgICAgICAqcGJ5UnN2VGltZSA9IDI0OworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgKnBieVR4UmF0ZSA9IDB4ODg7CisgICAgICAgICAgICAqcGJ5UnN2VGltZSA9IDMwOworICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBSQVRFXzU0TSA6CisgICAgICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsvLzVHSFoKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDlDOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAyNDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlUeFJhdGUgPSAweDhDOworICAgICAgICAgICAgKnBieVJzdlRpbWUgPSAzMDsKKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgUkFURV8yNE0gOgorICAgIGRlZmF1bHQgOgorICAgICAgICBpZiAoZVBIWVR5cGUgPT0gUEhZX1RZUEVfMTFBKSB7Ly81R0haCisgICAgICAgICAgICAqcGJ5VHhSYXRlID0gMHg5OTsKKyAgICAgICAgICAgICpwYnlSc3ZUaW1lID0gMjg7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAqcGJ5VHhSYXRlID0gMHg4OTsKKyAgICAgICAgICAgICpwYnlSc3ZUaW1lID0gMzQ7CisgICAgICAgIH0KKyAgICAgICAgYnJlYWs7CisgICAgfQorfQorCisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBTZXQgUlNQSU5GCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAgICAtIFRoZSBhZGFwdGVyIHRvIGJlIHNldAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogTm9uZS4KKyAqCisgKi8KK3N0YXRpYworVk9JRAorc192U2V0UlNQSU5GIChQU0RldmljZSBwRGV2aWNlLCBDQVJEX1BIWV9UWVBFIGVQSFlUeXBlLCBQVk9JRCBwdlN1cHBvcnRSYXRlSUVzLCBQVk9JRCBwdkV4dFN1cHBvcnRSYXRlSUVzKQoreworICAgIEJZVEUgIGJ5U2VydiA9IDAsIGJ5U2lnbmFsID0gMDsgLy8gRm9yIENDSworICAgIFdPUkQgIHdMZW4gPSAwOworICAgIEJZVEUgIGJ5VHhSYXRlID0gMCwgYnlSc3ZUaW1lID0gMDsgICAgLy8gRm9yIE9GRE0KKworICAgIC8vU2V0IHRvIFBhZ2UxCisgICAgTUFDdlNlbGVjdFBhZ2UxKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworCisgICAgLy9SU1BJTkZfYl8xCisgICAgQkJ2Q2FjdWxhdGVQYXJhbWV0ZXIocERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAxNCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBWTlRXSUZJYnlHZXRBQ0tUeFJhdGUoUkFURV8xTSwgcHZTdXBwb3J0UmF0ZUlFcywgcHZFeHRTdXBwb3J0UmF0ZUlFcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgUEtfVFlQRV8xMUIsCisgICAgICAgICAgICAgICAgICAgICAgICAgJndMZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2VydiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmYnlTaWduYWwKKyAgICApOworCisgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9CXzEsIE1BS0VEV09SRCh3TGVuLE1BS0VXT1JEKGJ5U2lnbmFsLGJ5U2VydikpKTsKKyAgICAvLy9SU1BJTkZfYl8yCisgICAgQkJ2Q2FjdWxhdGVQYXJhbWV0ZXIocERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAxNCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBWTlRXSUZJYnlHZXRBQ0tUeFJhdGUoUkFURV8yTSwgcHZTdXBwb3J0UmF0ZUlFcywgcHZFeHRTdXBwb3J0UmF0ZUlFcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgUEtfVFlQRV8xMUIsCisgICAgICAgICAgICAgICAgICAgICAgICAgJndMZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2VydiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmYnlTaWduYWwKKyAgICApOworCisgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9CXzIsIE1BS0VEV09SRCh3TGVuLE1BS0VXT1JEKGJ5U2lnbmFsLGJ5U2VydikpKTsKKyAgICAvL1JTUElORl9iXzUKKyAgICBCQnZDYWN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAorICAgICAgICAgICAgICAgICAgICAgICAgIFZOVFdJRklieUdldEFDS1R4UmF0ZShSQVRFXzVNLCBwdlN1cHBvcnRSYXRlSUVzLCBwdkV4dFN1cHBvcnRSYXRlSUVzKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBQS19UWVBFXzExQiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmd0xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmYnlTZXJ2LAorICAgICAgICAgICAgICAgICAgICAgICAgICZieVNpZ25hbAorICAgICk7CisKKyAgICBWTlN2T3V0UG9ydEQocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0JfNSwgTUFLRURXT1JEKHdMZW4sTUFLRVdPUkQoYnlTaWduYWwsYnlTZXJ2KSkpOworICAgIC8vUlNQSU5GX2JfMTEKKyAgICBCQnZDYWN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAorICAgICAgICAgICAgICAgICAgICAgICAgIFZOVFdJRklieUdldEFDS1R4UmF0ZShSQVRFXzExTSwgcHZTdXBwb3J0UmF0ZUlFcywgcHZFeHRTdXBwb3J0UmF0ZUlFcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgUEtfVFlQRV8xMUIsCisgICAgICAgICAgICAgICAgICAgICAgICAgJndMZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2VydiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmYnlTaWduYWwKKyAgICApOworCisgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9CXzExLCBNQUtFRFdPUkQod0xlbixNQUtFV09SRChieVNpZ25hbCxieVNlcnYpKSk7CisgICAgLy9SU1BJTkZfYV82CisgICAgc192Q2FjdWxhdGVPRkRNUlBhcmFtZXRlcihSQVRFXzZNLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1lKTsKKyAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0FfNiwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisgICAgLy9SU1BJTkZfYV85CisgICAgc192Q2FjdWxhdGVPRkRNUlBhcmFtZXRlcihSQVRFXzlNLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1lKTsKKyAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0FfOSwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisgICAgLy9SU1BJTkZfYV8xMgorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoUkFURV8xMk0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlUEhZVHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVR4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVJzdlRpbWUpOworICAgIFZOU3ZPdXRQb3J0VyhwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQV8xMiwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisgICAgLy9SU1BJTkZfYV8xOAorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoUkFURV8xOE0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlUEhZVHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVR4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVJzdlRpbWUpOworICAgIFZOU3ZPdXRQb3J0VyhwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQV8xOCwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisgICAgLy9SU1BJTkZfYV8yNAorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoUkFURV8yNE0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlUEhZVHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVR4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVJzdlRpbWUpOworICAgIFZOU3ZPdXRQb3J0VyhwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQV8yNCwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisgICAgLy9SU1BJTkZfYV8zNgorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWTlRXSUZJYnlHZXRBQ0tUeFJhdGUoUkFURV8zNk0sIHB2U3VwcG9ydFJhdGVJRXMsIHB2RXh0U3VwcG9ydFJhdGVJRXMpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1lKTsKKyAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0FfMzYsIE1BS0VXT1JEKGJ5VHhSYXRlLGJ5UnN2VGltZSkpOworICAgIC8vUlNQSU5GX2FfNDgKKyAgICBzX3ZDYWN1bGF0ZU9GRE1SUGFyYW1ldGVyKAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVk5UV0lGSWJ5R2V0QUNLVHhSYXRlKFJBVEVfNDhNLCBwdlN1cHBvcnRSYXRlSUVzLCBwdkV4dFN1cHBvcnRSYXRlSUVzKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVQSFlUeXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5VHhSYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5UnN2VGltZSk7CisgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9BXzQ4LCBNQUtFV09SRChieVR4UmF0ZSxieVJzdlRpbWUpKTsKKyAgICAvL1JTUElORl9hXzU0CisgICAgc192Q2FjdWxhdGVPRkRNUlBhcmFtZXRlcigKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZOVFdJRklieUdldEFDS1R4UmF0ZShSQVRFXzU0TSwgcHZTdXBwb3J0UmF0ZUlFcywgcHZFeHRTdXBwb3J0UmF0ZUlFcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlUEhZVHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVR4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVJzdlRpbWUpOworICAgIFZOU3ZPdXRQb3J0VyhwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQV81NCwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW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isgICAgICAgIHJldHVybihGQUxTRSk7CisgICAgfQorICAgIHJldHVybihUUlVFKTsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBHZXQgQ2FyZCBzaG9ydCBzbG90IHRpbWUgb3B0aW9uIHZhbHVlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAgICAtIFRoZSBhZGFwdGVyIHRvIGJlIHNldAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBzaG9ydCBzbG90IHRpbWU7IG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBDQVJEYklzU2hvclNsb3RUaW1lIChQVk9JRCBwRGV2aWNlSGFuZGxlcikKK3sKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKyAgICByZXR1cm4ocERldmljZS0+YlNob3J0U2xvdFRpbWUpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogVXBkYXRlIElGUworICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgICAgICAgICAgLSBUaGUgYWRhcHRlciB0byBiZSBzZXQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IE5vbmUuCisgKgorICovCitCT09MIENBUkRiU2V0UGh5UGFyYW1ldGVyIChQVk9JRCBwRGV2aWNlSGFuZGxlciwgQ0FSRF9QSFlfVFlQRSBlUEhZVHlwZSwgV09SRCB3Q2FwSW5mbywgQllURSBieUVSUEZpZWxkLCBQVk9JRCBwdlN1cHBvcnRSYXRlSUVzLCBQVk9JRCBwdkV4dFN1cHBvcnRSYXRlSUVzKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworICAgIEJZVEUgICAgICAgIG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VszXSA9IDB4MTA7CisgICAgICAgICAgICBCQmJSZWFkRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCAmYnlEYXRhKTsKKyAgICAgICAgICAgIGlmIChieURhdGEgPT0gMHgxQykgeworICAgICAgICAgICAgICAgIEJCYldyaXRlRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCBwRGV2aWNlLT5hYnlCQlZHQVswXSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSBpZiAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfVVcyNDUyKSB7CisgICAgICAgICAgICBNQUN2U2V0QkJUeXBlKHBEZXZpY2UtPlBvcnRPZmZzZXQsIEJCX1RZUEVfMTFBKTsKKyAgICAgICAgICAgIHBEZXZpY2UtPmFieUJCVkdBWzBdID0gMHgxODsKKyAgICAgICAgICAgIEJCYlJlYWRFbWJlZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4RTcsICZieURhdGEpOworICAgICAgICAgICAgaWYgKGJ5RGF0YSA9PSAweDE0KSB7CisgICAgICAgICAgICAgICAgQkJiV3JpdGVFbWJlZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4RTcsIHBEZXZpY2UtPmFieUJCVkdBWzBdKTsKKyAgICAgICAgICAgICAgICBCQmJXcml0ZUVtYmVkZWQocERldmljZS0+UG9ydE9mZnNldCwgMHhFMSwgMHg1Nyk7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBNQUN2U2V0QkJUeXBlKHBEZXZpY2UtPlBvcnRPZmZzZXQsIEJCX1RZUEVfMTFBKTsKKyAgICAgICAgfQorICAgICAgICBCQmJXcml0ZUVtYmVkZWQocERldmljZS0+UG9ydE9mZnNldCwgMHg4OCwgMHgwMyk7CisgICAgICAgIGJ5U2xvdCA9IENfU0xPVF9TSE9SVDsKKyAgICAgICAgYnlTSUZTID0gQ19TSUZTX0E7CisgIC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7CisgICAgICAgICAgICBwRGV2aWNlLT5hYnlCQlZHQVszXSA9IDB4MDA7CisgICAgICAgICAgICBCQmJSZWFkRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCAmYnlEYXRhKTsKKyAgICAgICAgICAgIGlmIChieURhdGEgPT0gMHgyMCkgeworICAgICAgICAgICAgICAgIEJCYldyaXRlRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCBwRGV2aWNlLT5hYnlCQlZHQVswXSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSBpZiAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfVVcyNDUyKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5hYnlCQlZHQVswXSA9IDB4MTQ7CisgICAgICAgICAgICBCQmJSZWFkRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCAmYnlEYXRhKTsKKyAgICAgICAgICAgIGlmIChieURhdGEgPT0gMHgxOCkgeworICAgICAgICAgICAgICAgIEJCYldyaXRlRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweEU3LCBwRGV2aWNlLT5hYnlCQlZHQVswXSk7CisgICAgICAgICAgICAgICAgQkJiV3JpdGVFbWJlZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4RTEsIDB4RDMpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIEJCYldyaXRlRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweDg4LCAweDA4KTsKKyAgICAgICAgYnlTSUZTID0gQ19TSUZTX0JHOworICAgICAgICBpZihWTlRXSUZJYklzU2hvcnRTbG90VGltZSh3Q2FwSW5mbykpIHsKKyAgICAgICAgICAgIGJ5U2xvdCA9IENfU0xPVF9TSE9SVDsKKyAgICAgICAgICAgIGJ5RElGUyA9IENfU0lGU19CRyArIDIqQ19TTE9UX1NIT1JUOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgYnlTbG90ID0gQ19TTE9UX0xPTkc7CisgICAgICAgICAgICBieURJRlMgPSBDX1NJRlNfQkcgKyAyKkNfU0xPVF9MT05HOworCSAgICB9CisgICAgICAgIGlmIChWTlRXSUZJYnlHZXRNYXhTdXBwb3J0UmF0ZShwU3VwcG9ydFJhdGVzLCBwRXh0U3VwcG9ydFJhdGVzKSA+IFJBVEVfMTFNKSB7CisgICAgICAgICAgICBieUNXTWF4TWluID0gMHhBNDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGJ5Q1dNYXhNaW4gPSAweEE1OworICAgICAgICB9CisgICAgICAgIGlmIChwRGV2aWNlLT5iUHJvdGVjdE1vZGUgIT0gVk5UV0lGSWJJc1Byb3RlY3RNb2RlKGJ5RVJQRmllbGQpKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5iUHJvdGVjdE1vZGUgPSBWTlRXSUZJYklzUHJvdGVjdE1vZGUoYnlFUlBGaWVsZCk7CisgICAgICAgICAgICBpZiAocERldmljZS0+YlByb3RlY3RNb2RlKSB7CisgICAgICAgICAgICAgICAgTUFDdkVuYWJsZVByb3RlY3RNRChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgTUFDdkRpc2FibGVQcm90ZWN0TUQocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmJCYXJrZXJQcmVhbWJsZU1kICE9IFZOVFdJRkliSXNCYXJrZXJNb2RlKGJ5RVJQRmllbGQpKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5iQmFya2VyUHJlYW1ibGVNZCA9IFZOVFdJRkliSXNCYXJrZXJNb2RlKGJ5RVJQRmllbGQpOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJCYXJrZXJQcmVhbWJsZU1kKSB7CisgICAgICAgICAgICAgICAg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HRvIGJlIHNldC4KKyAqICAgICAgd0JlYWNvbkludGVydmFsIC0gQmVhY29uIEludGVydmFsCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2NlZWQ7IG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBDQVJEYlNldEJlYWNvblBlcmlvZCAoUFZPSUQgcERldmljZUhhbmRsZXIsIFdPUkQgd0JlYWNvbkludGVydmFsKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworICAgIFVJTlQgICAgICAgIHVCZWFjb25JbnRlcnZhbCA9IDA7CisgICAgVUlOVCAgICAgICAgdUxvd05leHRUQlRUID0gMDsKKyAgICBVSU5UICAgICAgICB1SGlnaFJlbWFpbiA9IDA7CisgICAgVUlOVCAgICAgICAgdUxvd1JlbWFpbiA9IDA7CisgICAgUVdPUkQgICAgICAgcXdOZXh0VEJUVDsKKworICAgIEhJRFdPUkQocXdOZXh0VEJUVCkgPSAwOworICAgIExPRFdPUkQocXdOZXh0VEJUVCkgPSAwOworICAgIENBUkRiR2V0Q3VycmVudFRTRihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAmcXdOZXh0VEJUVCk7IC8vR2V0IExvY2FsIFRTRiBjb3VudGVyCisgICAgdUJlYWNvbkludGVydmFsID0gd0JlYWNvbkludGVydmFsICogMTAyNDsKKyAgICAvLyBOZXh0IFRCVFQgPSAoKGxvY2FsX2N1cnJlbnRfVFNGIC8gYmVhY29uX2ludGVydmFsKSArIDEgKSAqIGJlYWNvbl9pbnRlcnZhbAorICAgIHVMb3dOZXh0VEJUVCA9IChMT0RXT1JEKHF3TmV4dFRCVFQpID4+IDEwKSA8PCAxMDsKKyAgICB1TG93UmVtYWluID0gKHVMb3dOZXh0VEJUVCkgJSB1QmVhY29uSW50ZXJ2YWw7CisgICAgLy8gaGlnaCBkd29yZCAobW9kKSB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gICAgcmV0dXJuKFRSVUUpOworfQorCisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBDYXJkIFN0b3AgSGFyZHdhcmUgVHgKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlSGFuZGxlciAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgc2V0CisgKiAgICAgIGVQa3RUeXBlICAgICAgICAgICAgLSBQYWNrZXQgdHlwZSB0byBzdG9wCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIGFsbCBkYXRhIHBhY2tldCBjb21wbGV0ZTsgb3RoZXJ3aXNlIEZBTFNFLgorICoKKyAqLworQk9PTCBDQVJEYlN0b3BUeFBhY2tldCAoUFZPSUQgcERldmljZUhhbmRsZXIsIENBUkRfUEtUX1RZUEUgZVBrdFR5cGUpCit7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisKKworICAgIGlmIChlUGt0VHlwZSA9PSBQS1RfVFlQRV84MDJfMTFfQUxMKSB7CisgICAgICAgIHBEZXZpY2UtPmJTdG9wQmVhY29uID0gVFJVRTsKKyAgICAgICAgcERldmljZS0+YlN0b3BUeDBQa3QgPSBUUlVFOworICAgICAgICBwRGV2aWNlLT5iU3RvcERhdGFQa3QgPSBUUlVFOworICAgIH0gZWxzZSBpZiAoZVBrdFR5cGUgPT0gUEtUX1RZUEVfODAyXzExX0JDTikgeworICAgICAgICBwRGV2aWNlLT5iU3RvcEJlYWNvbiA9IFRSVUU7CisgICAgfSBlbHNlIGlmIChlUGt0VHlwZSA9PSBQS1RfVFlQRV84MDJfMTFfTU5HKSB7CisgICAgICAgIHBEZXZpY2UtPmJTdG9wVHgwUGt0ID0gVFJVRTsKKyAgICB9IGVsc2UgaWYgKGVQa3RUeXBlID09IFBLVF9UWVBFXzgwMl8xMV9EQVRBKSB7CisgICAgICAgIHBEZXZpY2UtPmJTdG9wRGF0YVBrdCA9IFRSVUU7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJTdG9wQmVhY29uID09IFRSVUUpIHsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJJc0JlYWNvbkJ1ZlJlYWR5U2V0ID09IFRSVUUpIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5jYkJlYWNvbkJ1ZlJlYWR5U2V0Q250IDwgV0FJVF9CRUFDT05fVFhfRE9XTl9UTU8pIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5jYkJlYWNvbkJ1ZlJlYWR5U2V0Q250ICsrOworICAgICAgICAgICAgICAgIHJldHVybihGQUxTRSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcERldmljZS0+YklzQmVhY29uQnVmUmVhZHlTZXQgPSBGQUxTRTsKKyAgICAgICAgcERldmljZS0+Y2JCZWFjb25CdWZSZWFkeVNldENudCA9IDA7CisgICAgICAgIE1BQ3ZSZWdCaXRzT2ZmKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfVENSLCBUQ1JfQVVUT0JDTlRYKTsKKyAgICB9CisgICAgLy8gd2FpdCBhbGwgVEQwIGNvbXBsZXRlCisgICAgaWYgKHBEZXZpY2UtPmJTdG9wVHgwUGt0ID09IFRSVUUpIHsKKyAgICAgICAgIGlmIChwRGV2aWNlLT5pVERVc2VkW1RZUEVfVFhETUEwXSAhPSAwKXsKKyAgICAgICAgICAgIHJldHVybihGQUxTRSk7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gd2FpdCBhbGwgRGF0YSBURCBjb21wbGV0ZQorICAgIGlmIChwRGV2aWNlLT5iU3RvcERhdGFQa3QgPT0gVFJVRSkgeworICAgICAgICBpZiAocERldmljZS0+aVREVXNlZFtUWVBFX0FDMERNQV0gIT0gMCl7CisgICAgICAgICAgICByZXR1cm4oRkFMU0UpOworICAgICAgICB9CisgICAgfQorCisgICAgcmV0dXJuKFRSV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QgPSBGQUxTRTsKKyAgICB9CisKKyAgICBpZiAoKHBEZXZpY2UtPmJTdG9wQmVhY29uID09IEZBTFNFKSAmJgorICAgICAgICAocERldmljZS0+YkJlYWNvbkJ1ZlJlYWR5ID09IFRSVUUpICYmCisgICAgICAgIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQURIT0MpKSB7CisgICAgICAgIE1BQ3ZSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19UQ1IsIFRDUl9BVVRPQkNOVFgpOworICAgIH0KKworICAgIHJldHVybihUUlVFKTsKK30KKworCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2FyZCBTZXQgQlNTSUQgdmFsdWUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlSGFuZGxlciAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgc2V0CisgKiAgICAgIHBieUJTU0lEICAgICAgICAgICAgLSBwb2ludGVyIHRvIEJTU0lEIGZpZWxkCisgKiAgICAgIGJBZGhvYyAgICAgICAgICAgICAgLSBmbGFnIHRvIGluZGljYXRlIElCU1MKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IFRSVUUgaWYgc3VjY2VzczsgRkFMU0UgaWYgZmFpbGVkLgorICoKKyAqLworQk9PTCBDQVJEYlNldEJTU0lEKFBWT0lEIHBEZXZpY2VIYW5kbGVyLCBQQllURSBwYnlCU1NJRCwgQ0FSRF9PUF9NT0RFIGVPUE1vZGUpCit7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisKKyAgICBNQUN2V3JpdGVCU1NJREFkZHJlc3MocERldmljZS0+UG9ydE9mZnNldCwgcGJ5QlNTSUQpOworICAgIE1FTXZDb3B5KHBEZXZpY2UtPmFieUJTU0lELCBwYnlCU1NJRCwgV0xBTl9CU1NJRF9MRU4pOworIC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JDUl9CU1NJRCk7CisgICAgICAgICAgICBwRGV2aWNlLT5iQlNTSURGaWx0ZXIgPSBUUlVFOworICAgICAgICAgICAgcERldmljZS0+YnlSeE1vZGUgfD0gUkNSX0JTU0lEOworCSAgICB9CisJICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIndtZ3I6IHJ4X21vZGUgPSAleFxuIiwgcERldmljZS0+YnlSeE1vZGUgKTsKKyAgICB9CisgICAgLy8gQWRvcHQgQlNTIHN0YXRlIGluIEFkYXB0ZXIgRGV2aWNlIE9iamVjdAorICAgIHBEZXZpY2UtPmVPUE1vZGUgPSBlT1BNb2RlOworICAgIHJldHVybihUUlVFKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IENhcmQgaW5kaWNhdGUgc3RhdHVzCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZUhhbmRsZXIgICAgICAtIFRoZSBhZGFwdGVyIHRvIGJlIHNldAorICogICAgICBlU3RhdHVzICAgICAgICAgICAgIC0gU3RhdHVzCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2Nlc3M7IEZBTFNFIGlmIGZhaWxlZC4KKyAqCisgKi8KKworCisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBTYXZlIEFzc29jIGluZm8uIGNvbnRhaW4gaW4gYXNzb2MuIHJlc3BvbnNlIGZyYW1lCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAgICAtIFRoZSBhZGFwdGVyIHRvIGJlIHNldAorICogICAgICB3Q2FwYWJpbGl0eUluZm8gICAgIC0gQ2FwYWJpbGl0eSBpbmZvcm1hdGlvbgorICogICAgICB3U3RhdHVzICAgICAgICAgICAgIC0gU3RhdHVzIGNvZGUKKyAqICAgICAgd0FJRCAgICAgICAgICAgICAgICAtIEFzc29jLiBJRAorICogICAgICB1TGVuICAgICAgICAgICAgICAgIC0gTGVuZ3RoIG9mIElFcworICogICAgICBwYnlJRXMgICAgICAgICAgICAgIC0gcG9pbnRlciB0byBJRXMKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IFRSVUUgaWYgc3VjY2VlZDsgb3RoZXJ3aXNlIEZBTFNFCisgKgorICovCitCT09MIENBUkRiU2V0VHhEYXRhUmF0ZSgKKyAgICBQVk9JRCAgIHBEZXZpY2VIYW5kbGVyLAorICAgIFdPUkQgICAgd0RhdGFSYXRlCisgICAgKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworCisgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gd0RhdGFSYXRlOworICAgIHJldHVybihUUlVFKTsKK30KKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgICAgQ29uc2lkZXIgdG8gcG93ZXIgZG93biB3aGVuIG5vIG1vcmUgcGFja2V0cyB0byB0eCBvciByeC4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgc2V0CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHBvd2VyIGRvd24gc3VjY2Vzczsgb3RoZXJ3aXNlIEZBTFNFCisgKgorLSovCitCT09MCitDQVJEYlBvd2VyRG93bigKKyAgICBQVk9JRCAgIHBEZXZpY2VIYW5kbGVyCisgICAgKQoreworICAgIFBTRGV2aWNlICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKXBEZXZpY2VIYW5kbGVyOworICAgIFVJTlQgICAgICAgICAgICB1SWR4OworCisgICAgLy8gY2hlY2sgaWYgYWxyZWFkeSBpbiBEb3plIG1vZGUKKyAgICBpZiAoTUFDYklz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KCJjaGVzdGVyIHBiUmFkaW9PZmZcbiIpOworcmV0dXJuIFRSVUU7fQorCisgICAgQkJ2RXhpdERlZXBTbGVlcChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBwRGV2aWNlLT5ieUxvY2FsSUQpOworCisgICAgTUFDdlJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX0hPU1RDUiwgSE9TVENSX1JYT04pOworCisgICAgc3dpdGNoIChwRGV2aWNlLT5ieVJGVHlwZSkgeworCisgICAgICAgIGNhc2UgUkZfUkZNRDI5NTk6CisgICAgICAgICAgICBNQUN2V29yZFJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1NPRlRQV1JDVEwsIFNPRlRQV1JDVExfVFhQRUlOVik7CisgICAgICAgICAgICBNQUN2V29yZFJlZ0JpdHNPZmYocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19TT0ZUUFdSQ1RMLCBTT0ZUUFdSQ1RMX1NXUEUxKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgUkZfQUlST0hBOgorICAgICAgICBjYXNlIFJGX0FMMjIzMFM6CisgICAgICAgIGNhc2UgUkZfQUlST0hBNzIzMDogLy9Sb2JlcnRZdToyMDA1MDEwNAorICAgICAgICAgICAgTUFDdldvcmRSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19TT0ZUUFdSQ1RMLCAoU09GVFBXUkNUTF9TV1BFMiB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTT0ZUUFdSQ1RMX1NXUEUzKSk7CisgICAgICAgICAgICBicmVhazsKKworICAgIH0KKworICAgIHBEZXZpY2UtPmJSYWRpb09mZiA9IEZBTFNFOworLy8gIDIwMDctMDQwOS0wMyw8QWRkPiBieSBjaGVzdGVyCitwcmludGsoImNoZXN0ZXIgcG93ZXIgb25cbiIpOworTUFDdlJlZ0JpdHNPZmYocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19HUElPQ1RMMCwgTEVEX0FDVFNFVCk7IC8vTEVEIGlzc3VlCisgICAgcmV0dXJuIGJSZXN1bHQ7Cit9CisKKworCitCT09MIENBUkRiUmVtb3ZlS2V5IChQVk9JRCBwRGV2aWNlSGFuZGxlciwgUEJZVEUgcGJ5QlNTSUQpCit7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisKKyAgICBLZXliUmVtb3ZlQWxsS2V5KCYocERldmljZS0+c0tleSksIHBieUJTU0lELCBwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICByZXR1cm4gKFRSVUUpOworfQorCisKKy8qCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBBZGQgQlNTSUQgaW4gUE1LSUQgQ2FuZGlkYXRlIGxpc3QuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgICAgIHBieUJTU0lEIC0gQlNTSUQgYWRkcmVzcyBmb3IgYWRkaW5nCisgKiAgICAgIHdSU05DYXAgLSBCU1MncyBSU04gY2FwYWJpbGl0eQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZS4KKyAqCistKi8KK0JPT0wKK0NBUkRiQWRkX1BNS0lEX0NhbmRpZGF0ZSAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBQQllURSAgICAgICAgICAgIHBieUJTU0lELAorICAgIElOIEJPT0wgICAgICAgICAgICAgYlJTTkNhcEV4aXN0LAorICAgIElOIFdPUkQgICAgICAgICAgICAgd1JTTkNhcAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgIHB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OworICAgIHBEZXZpY2UtPmdzUE1LSURDYW5kaWRhdGUuTnVtQ2FuZGlkYXRlcysrOworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iTnVtQ2FuZGlkYXRlczolZFxuIiwgKGludClwRGV2aWNlLT5nc1BNS0lEQ2FuZGlkYXRlLk51bUNhbmRpZGF0ZXMpOworICAgIHJldHVybiBUUlVFOworfQorCitQVk9JRAorQ0FSRHBHZXRDdXJyZW50QWRkcmVzcyAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlcgorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworCisgICAgcmV0dXJuIChwRGV2aWNlLT5hYnlDdXJyZW50TmV0QWRkcik7Cit9CisKKworCitWT0lEIENBUkR2SW5pdENoYW5uZWxUYWJsZSAoUFZPSUQgcERldmljZUhhbmRsZXIpCit7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisgICAgQk9PTCAgICAgICAgYk11bHRpQmFuZCA9IEZBTFNFOworICAgIFVJTlQgICAgICAgIGlpOworCisgICAgZm9yKGlpPTE7aWk8PUNBUkRfTUFYX0NIQU5ORUxfVEJMO2lpKyspIHsKKyAgICAgICAgc0NoYW5uZWxUYmxbaWldLmJWYWxpZCA9IEZBTFNFOworICAgIH0KKworICAgIHN3aXRjaCAocERldmljZS0+YnlSRlR5cGUpIHsKKyAgICAgICAgY2FzZSBSRl9SRk1EMjk1OSA6CisgICAgICAgIGNhc2UgUkZfQUlST0hBIDoKKyAgICAgICAgY2FzZSBSRl9BTDIyMzBTOgorICAgICAgICBjYXNlIFJGX1VXMjQ1MSA6CisgICAgICAgIGNhc2UgUkZfVlQzMjI2IDoKKwkvLwkJcHJpbnRrKCJjaGVzdGVyLWZhbHNlXG4iKTsKKyAgICAgICAgICAgIGJNdWx0aUJhbmQgPSBGQUxTRTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIFJGX0FJUk9IQTcyMzAgOgorICAgICAgICBjYXNlIFJGX1VXMjQ1MiA6CisgICAgICAgIGNhc2UgUkZfTk9USElORyA6CisgICAgICAgIGRlZmF1bHQgOgorICAgICAgICAgICAgYk11bHRpQmFuZCA9IFRSVUU7CisgICAgICAgICAgICBicmVhazsKKyAgICB9CisKKyAgICBpZiAoKHBEZXZpY2UtPmR3RGlhZ1JlZkNvdW50ICE9IDApIHx8CisgICAgICAgIChwRGV2aWNlLT5iMTFoRW5hYmxlID09IFRSVUUpKSB7CisgICAgICAgIGlmIChiTXVsdGlCYW5kID09IFRSVUUpIHsKKyAgICAgICAgICAgIGZvcihpaT0wO2lpPENBUkRfTUFYX0NIQU5ORUxfVEJMO2lpKyspIHsKKyAgICAgICAgICAgICAgICBzQ2hhbm5lbFRibFtpaSsxXS5iVmFsaWQgPSBUUlVFOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmFieVJlZ1B3cltpaSsxXSA9IHBEZXZpY2UtPmFieU9GRE1EZWZhdWx0UHdyW2lpKzFdOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmFieUxvY2FsUHdyW2lpKzFdID0gcERldmljZS0+YWJ5T0ZETURlZmF1bHRQd3JbaWkrMV07CisgICAgICAgICAgICB9CisgICAgICAgICAgICBmb3IoaWk9MDtpaTxDSEFOTkVMX01BWF8yNEc7aWkrKykgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmFieVJlZ1B3cltpaSsxXSA9IHBEZXZpY2UtPmFieUNDS0RlZmF1bHRQd3JbaWkrMV07CisgICAgICAgICAgICAgICAgcERldmljZS0+YWJ5TG9jYWxQd3JbaWkrMV0gPSBwRGV2aWNlLT5hYnlDQ0tEZWZhdWx0UHdyW2lpKzFdOworICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgZm9yKGl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E1EZWZhdWx0UHdyW2lpKzFdOworICAgICAgICB9CisgICAgICAgIGlmIChwRGV2aWNlLT5hYnlMb2NhbFB3cltpaSsxXSA9PSAwKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5hYnlMb2NhbFB3cltpaSsxXSA9IHBEZXZpY2UtPmFieU9GRE1EZWZhdWx0UHdyW2lpKzFdOworICAgICAgICB9CisgICAgfQorfQorCisKKworLyoKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFN0YXJ0IFNwZWN0cnVtIE1lYXN1cmUgZGVmaW5lZCBpbiA4MDIuMTFoCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworQk9PTAorQ0FSRGJTdGFydE1lYXN1cmUgKAorICAgIElOIFBWT0lEICAgICAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwdk1lYXN1cmVFSURzLAorICAgIElOIFVJTlQgICAgICAgICAgICAgdU51bU9mTWVhc3VyZUVJRHMKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgICAgICAgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisgICAgUFdMQU5fSUVfTUVBU1VSRV9SRVEgICAgcEVJRCA9IChQV0xBTl9JRV9NRUFTVVJFX1JFUSkgcHZNZWFzdXJlRUlEczsKKyAgICBRV09SRCAgICAgICAgICAgICAgICAgICBxd0N1cnJUU0Y7CisgICAgUVdPUkQgICAgICAgICAgICAgICAgICAgcXdTdGFydFRTRjsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiRXhwaXJlZCA9IFRSVUU7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd0R1cmF0aW9uID0gMDsKKworICAgIGlmICgocEVJ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RikgPSBMT0RXT1JEKHF3Q3VyclRTRikgKyAyMDQ4OworICAgICAgICAgICAgICAgIEhJRFdPUkQocXdTdGFydFRTRikgPSBISURXT1JEKHF3Q3VyclRTRik7CisgICAgICAgICAgICAgICAgaWYgKExPRFdPUkQocXdDdXJyVFNGKSA+IExPRFdPUkQocXdTdGFydFRTRikpIHsKKyAgICAgICAgICAgICAgICAgICAgSElEV09SRChxd1N0YXJ0VFNGKSsrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBiRXhwaXJlZCA9IEZBTFNFOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBzdGFydCBhdCBzZXR0aW5nIHN0YXJ0IFRTRiAtIDFUVShmb3IgY2hhbm5lbCBzd2l0Y2hpbmcpCisgICAgICAgICAgICAgICAgaWYgKExPRFdPUkQocXdTdGFydFRTRikgPCAxMDI0KSB7CisgICAgICAgICAgICAgICAgICAgIEhJRFdPUkQocXdTdGFydFRTRiktLTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgTE9EV09SRChxd1N0YXJ0VFNGKSAtPSAxMDI0OworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoKEhJRFdPUkQocXdDdXJyVFNGKSA8IEhJRFdPUkQocXdTdGFydFRTRikpIHx8CisgICAgICAgICAgICAgICAgKChISURXT1JEKHF3Q3VyclRTRikgPT0gSElEV09SRChxd1N0YXJ0VFNGKSkgJiYKKyAgICAgICAgICAgICAgICAoTE9EV09SRChxd0N1cnJUU0YpIDwgTE9EV09SRChxd1N0YXJ0VFNGKSkpCisgICAgICAgICAgICAgICAgKSB7CisgICAgICAgICAgICAgICAgYkV4cGlyZWQgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIFZOVFdJRkliTWVhc3VyZVJlcG9ydCggIHBEZXZpY2UtPnBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRkFMU0UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5wQ3Vyck1lYXN1cmVFSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNRUFTVVJFX01PREVfTEFURSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5QmFzaWNNYXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUNDQUZyYWN0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YWJ5UlBJcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIC8vIGhhcmR3YXJlIGRvIG5vdCBzdXBwb3J0IG1lYXN1cmUKKyAgICAgICAgICAgIFZOVFdJRkliTWVhc3VyZVJlcG9ydCggIHBEZXZpY2UtPnBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRkFMU0UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5wQ3Vyck1lYXN1cmVFSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNRUFTVVJFX01PREVfSU5DQVBBQkxFLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlCYXNpY01hcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5Q0NBRnJhY3Rpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5hYnlSUElzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICB9CisgICAgfSB3aGlsZSAocERldmljZS0+dU51bU9mTWVhc3VyZUVJRHMgIT0gMCk7CisKKyAgICBpZiAoYkV4cGlyZWQgPT0gRkFMU0UpIHsKKyAgICAgICAgTUFDdlNlbGVjdFBhZ2UxKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICBWTlN2T3V0UG9ydEQocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfTVNSU1RBUlQsIExPRFdPUkQocXdTdGFydFRTRikpOworICAgICAgICBWTlN2T3V0UG9ydEQocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfTVNSU1RBUlQgKyA0LCBISURXT1JEKHF3U3RhcnRUU0YpKTsKKyAgICAgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX01TUkRVUkFUSU9OLCB3RHVyYXRpb24pOworICAgICAgICBNQUN2UmVnQml0c09uKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfTVNSQ1RMLCBNU1JDVExfRU4pOworICAgICAgICBNQUN2U2VsZWN0UGFnZTAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgLy8gYWxsIG1lYXN1cmUgc3RhcnQgdGltZSBleHBpcmVkIHdlIHNob3VsZCBjb21wbGV0ZSBhY3Rpb24KKyAgICAgICAgVk5UV0lGSWJNZWFzdXJlUmVwb3J0KCAgcERldmljZS0+cE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRSVUUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5QmFzaWNNYXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5Q0NBRnJhY3Rpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmFieVJQSXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICB9CisgICAgcmV0dXJuIChUUlVFKTsKK30KKworCisvKgorICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgRG8gQ2hhbm5lbCBTd2l0Y2ggZGVmaW5lZCBpbiA4MDIuMTFoCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworQk9PTAorQ0FSRGJDaGFubmVsU3dpdGNoICgKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlNb2RlLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlOZXdDaGFubmVsLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlDb3VudAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKyAgICBCT09MICAgICAgICBiUmVzdWx0ID0gVFJVRTsKKworICAgIGlmIChieUNvdW50ID09IDApIHsKKyAgICAgICAgYlJlc3VsdCA9IENBUkRiU2V0Q2hhbm5lbChwRGV2aWNlLCBieU5ld0NoYW5uZWwpOworICAgICAgICBWTlRXSUZJYkNoYW5uZWxTd2l0Y2gocERldmljZS0+cE1nbXQsIGJ5TmV3Q2hhbm5lbCk7CisgICAgICAgIE1BQ3ZTZWxlY3RQYWdlMShwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgTUFDdlJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX01TUkNUTCsxLCBNU1JDVEwxX1RYUEFVU0UpOworICAgICAgICBNQUN2U2VsZWN0UGFnZTAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgIHJldHVybihiUmVzdWx0KTsKKyAgICB9CisgICAgcERldmljZS0+YnlDaGFubmVsU3dpdGNoQ291bnQgPSBieUNvdW50OworICAgIHBEZXZpY2UtPmJ5TmV3Q2hhbm5lbCA9IGJ5TmV3Q2hhbm5lbDsKKyAgICBwRGV2aWNlLT5iQ2hhbm5lbFN3aXRjaCA9IFRSVUU7CisgICAgaWYgKGJ5TW9kZSA9PSAxKSB7CisgICAgICAgIGJSZXN1bHQ9Q0FSRGJTdG9wVHhQYWNrZXQocERldmljZSwgUEtUX1RZUEVfODAyXzExX0FMTCk7CisgICAgfQorICAgIHJldHVybiAoYlJlc3VsdCk7Cit9CisKKworLyoKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIEhhbmRsZSBRdWlldCBFSUQgZGVmaW5lZCBpbiA4MDIuMTFoCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworQk9PTAorQ0FSRGJTZXRRdWlldCAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBCT09MICAgICAgICAgICAgIGJSZXNldFF1aWV0LAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlRdWlldENvdW50LAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlRdWlldFBlcmlvZCwKKyAgICBJTiBXT1JEICAgICAgICAgICAgIHdRdWlldER1cmF0aW9uLAorICAgIElOIFdPUkQgICAgICAgICAgICAgd1F1aWV0T2Zmc2V0CisgICAgKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworICAgIFVJTlQgICAgICAgIGlpID0gMDsKKworICAgIGlmIChi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A9IDA7CisgICAgRFdPUkQgICAgICAgZHdTdGFydFRpbWUgPSAweEZGRkZGRkZGOworICAgIFVJTlQgICAgICAgIHVDdXJyZW50UXVpZXRJbmRleCA9IDA7CisgICAgRFdPUkQgICAgICAgZHdOZXh0VGltZSA9IDA7CisgICAgRFdPUkQgICAgICAgZHdHYXAgPSAwOworICAgIERXT1JEICAgICAgIGR3RHVyYXRpb24gPSAwOworCisgICAgZm9yKGlpPTA7aWk8TUFYX1FVSUVUX0NPVU5UO2lpKyspIHsKKyAgICAgICAgaWYgKChwRGV2aWNlLT5zUXVpZXRbaWldLmJFbmFibGUgPT0gVFJVRSkgJiYKKyAgICAgICAgICAgIChkd1N0YXJ0VGltZSA+IHBEZXZpY2UtPnNRdWlldFtpaV0uZHdTdGFydFRpbWUpKSB7CisgICAgICAgICAgICBkd1N0YXJ0VGltZSA9IHBEZXZpY2UtPnNRdWlldFtpaV0uZHdTdGFydFRpbWU7CisgICAgICAgICAgICB1Q3VycmVudFF1aWV0SW5kZXggPSBpaTsKKyAgICAgICAgfQorICAgIH0KKyAgICBpZiAoZHdTdGFydFRpbWUgPT0gMHhGRkZGRkZGRikgeworICAgICAgICAvLyBubyBtb3JlIHF1aWV0CisgICAgICAgIHBEZXZpY2UtPmJRdWlldEVuYWJsZSA9IEZBTFNFOworICAgICAgICBNQUN2UmVnQml0c09mZihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX01TUkNUTCwgKE1TUkNUTF9RVUlFVFRYQ0hLIHwgTVNSQ1RMX1FVSUVURU4pKTsKKyAgICB9IGVsc2UgeworICAgICAgICBpZiAocERldmljZS0+YlF1aWV0RW5hYmxlID09IEZBTFNFKSB7CisgICAgICAgICAgICAvLyBmaXJzdCBxdWlldAorICAgICAgICAgICAgcERldmljZS0+YnlRdWlldFN0YXJ0Q291bnQtLTsKKyAgICAgICAgICAgIGR3TmV4dFRpbWUgPSBwRGV2aWNlLT5zUXVpZXRbdUN1cnJlbnRRdWlldEluZGV4XS5kd1N0YXJ0VGltZTsKKyAgICAgICAgICAgIGR3TmV4dFRpbWUgJT0gcERldmljZS0+d0JlYWNvbkludGVydmFsOworICAgICAgICAgICAgTUFDdlNlbGVjdFBhZ2UxKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1FVSUVUSU5JVCwgKFdPUkQpIGR3TmV4dFRpbWUpOworICAgICAgICAgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1FVSUVURFVSLCAoV09SRCkgcERldmljZS0+c1F1aWV0W3VDdXJyZW50UXVpZXRJbmRleF0ud0R1cmF0aW9uKTsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieVF1aWV0U3RhcnRDb3VudCA9PSAwKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkVuYWJsZUZpcnN0UXVpZXQgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBNQUN2UmVnQml0c09uKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfTVNSQ1RMLCAoTVNSQ1RMX1FVSUVUVFhDSEsgfCBNU1JDVExfUVVJRVRFTikpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iRW5hYmxlRmlyc3RRdWlldCA9IFRSVUU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBNQUN2U2VsZWN0UGFnZTAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+ZHdDdXJyZW50UXVpZXRFbmRUaW1lID4gcERldmljZS0+c1F1aWV0W3VDdXJyZW50UXVpZXRJbmRleF0uZHdTdGFydFRpbWUpIHsKKyAgICAgICAgICAgICAgICAvLyBvdmVybGFwIHdpdGggcHJldmlvdXMgUXVpZXQK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cERldmljZS0+d0JlYWNvbkludGVydmFsOworICAgICAgICAgICAgcERldmljZS0+c1F1aWV0W3VDdXJyZW50UXVpZXRJbmRleF0uZHdTdGFydFRpbWUgPSBkd05leHRUaW1lOworICAgICAgICB9CisgICAgICAgIGlmIChwRGV2aWNlLT5kd0N1cnJlbnRRdWlldEVuZFRpbWUgPiAweDgwMDEwMDAwKSB7CisgICAgICAgICAgICAvLyBkZWNyZWFtZW50IGFsbCB0aW1lIHRvIGF2b2lkIHdyYXAgYXJvdW5kCisgICAgICAgICAgICBmb3IoaWk9MDtpaTxNQVhfUVVJRVRfQ09VTlQ7aWkrKykgeworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5zUXVpZXRbaWldLmJFbmFibGUgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5zUXVpZXRbaWldLmR3U3RhcnRUaW1lIC09IDB4ODAwMDAwMDA7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgcERldmljZS0+ZHdDdXJyZW50UXVpZXRFbmRUaW1lIC09IDB4ODAwMDAwMDA7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIChUUlVFKTsKK30KKworCisvKgorICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgU2V0IENoYW5uZWwgSW5mbyBvZiBDb3VudHJ5CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworVk9JRAorQ0FSRHZTZXRDb3VudHJ5SW5mbyAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBDQVJEX1BIWV9UWVBFICAgIGVQSFlUeXBlLAorICAgIElOIFBWT0lEICAgICAgICAgICAgcElFCisgICAgKQoreworICAgIFBTRGV2aWNlICAgICAgICAgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisgICAgVUlOVCAgICAgICAgICAgICAgICBpaSA9IDA7CisgICAgVUlOVCAgICAgICAgICAgICAgICB1dSA9IDA7CisgICAgVUlOVCAgICAgICAgICAgICAgICBzdGVwID0gMDsKKyAgICBVSU5UICAgICAgICAgICAgICAgIHVOdW1PZkNvdW50cnlJbmZvID0gMDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5Q2ggPSAwOworICAgIFBXTEFOX0lFX0NPVU5UUlkgICAgcElFX0NvdW50cnkgPSAoUFdMQU5fSUVfQ09VTlRSWSkgcElFOworCisKKyAgICB1TnVtT2ZDb3VudHJ5SW5mbyA9IChwSUVfQ291bnRyeS0+bGVuIC0gMyk7CisgICAgdU51bU9mQ291bnRyeUluZm8gLz0gMzsKKworICAgIGlmIChlUEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsKKyAgICAgICAgcERldmljZS0+YkNvdW50cnlJbmZvNUcgPSBUUlVFOworICAgICAgICBmb3IoaWk9Q0JfTUFYX0NIQU5ORUxfMjRHKzE7aWk8PUNBUkRfTUFYX0NIQU5ORUxfVEJMO2lpKyspIHsKKyAgICAgICAgICAgIHNDaGFubmVsVGJsW2lpXS5iVmFsaWQgPSBGQUxTRTsKKyAgICAgICAgfQorICAgICAgICBzdGVwID0gNDsKKyAgICB9IGVsc2UgeworICAgICAgICBwRGV2aWNlLT5iQ291bnRyeUluZm8yNEcgPSBUUlVFOworICAgICAgICBmb3IoaWk9MTtpaTw9Q0JfTUFYX0NIQU5ORUxfMjRHO2lpKyspIHsKKyAgICAgICAgICAgIHNDaGFubmVsVGJsW2lpXS5iVmFsaWQgPSBGQUxTRTsKKyAgICAgICAgfQorICAgICAgICBzdGVwID0gMTsKKyAgICB9CisgICAgcERldmljZS0+YWJ5Q291bnRyeUNvZGVbMF0gPSBwSUVfQ291bnRyeS0+YWJ5Q291bnRyeVN0cmluZ1swXTsKKyAgICBwRGV2aWNlLT5hYnlDb3VudHJ5Q29kZVsxXSA9IHBJRV9Db3VudHJ5LT5hYnlDb3VudHJ5U3RyaW5nWzFdOworICAgIHBEZXZpY2UtPmFieUNvdW50cnlDb2RlWzJdID0gcElFX0NvdW50cnktPmFieUNvdW50cnlTdHJpbmdbMl07CisKKyAgICBmb3IoaWk9MDtpaTx1TnVtT2ZDb3VudHJ5SW5mbztpaSsrKSB7CisgICAgICAgIGZvcih1dT0wO3V1PHBJRV9Db3VudHJ5LT5hYnlDb3VudHJ5SW5mb1tpaSozKzFdO3V1KyspIHsKKyAgICAgICAgICAgIGJ5Q2ggPSBDQVJEYnlHZXRDaGFubmVsTWFwcGluZyhwRGV2aWNlLCAoQllURSkocElFX0NvdW50cnktPmFieUNvdW50cnlJbmZvW2lpKjNdK3N0ZXAqdXUpLCBlUEhZVHlwZSk7CisgICAgICAgICAgICBzQ2hhbm5lbFRibFtieUNoXS5iVmFsaWQgPSBUUlVFOworICAgICAgICAgICAgcERldmljZS0+YWJ5UmVnUHdyW2J5Q2hdID0gcElFX0NvdW50cnktPmFieUNvdW50cnlJbmZvW2lpKjMrMl07CisgICAgICAgIH0KKyAgICB9Cit9CisKKy8qCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBTZXQgTG9jYWwgUG93ZXIgQ29uc3RyYWludAorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGhEZXZpY2VDb250ZXh0IC0gZGV2aWNlIHN0cnVjdHVyZSBwb2ludAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZS4KKyAqCistKi8KK1ZPSUQKK0NBUkR2U2V0UG93ZXJDb25zdHJhaW50ICgKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlDaGFubmVsLAorICAgIElOIEk4ICAgICAgICAgICAgICAgYnlQb3dlcgorICAgICkKK3sKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKworICAgIGlmIChieUNoYW5uZWwgPiBDQl9NQVhfQ0hBTk5FTF8yNEcpIHsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJDb3VudHJ5SW5mbzVHID09IFRSVUUpIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPmFieUxvY2FsUHdyW2J5Q2hhbm5lbF0gPSBwRGV2aWNlLT5hYnlSZWdQd3JbYnlDaGFubmVsXSAtIGJ5UG93ZXI7CisgICAgICAgIH0KKyAgICB9IGVsc2UgeworICAgICAgICBpZiAocERldmljZS0+YkNvdW50cnlJbmZvMjRHID09IFRSVUUpIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPmFieUxvY2FsUHdyW2J5Q2hhbm5lbF0gPSBwRGV2aWNlLT5hYnlSZWdQd3JbYnlDaGFubmVsXSAtIGJ5UG93ZXI7CisgICAgICAgIH0KKyAgICB9Cit9CisKKworLyoKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFNldCBMb2NhbCBQb3dlciBDb25zdHJhaW50CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworVk9JRAorQ0FSRHZHZXRQb3dlckNhcGFiaWxpdHkgKAorICAgIElOIFBWT0lEICAgICAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgT1VUIFBCWVRFICAgICAgICAgICBwYnlNaW5Qb3dlciwKKyAgICBPVVQgUEJZVEUgICAgICAgICAgIHBieU1heFBvd2VyCisgICAgKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworICAgIEJZVEUgICAgICAgIGJ5RGVjID0gMDsKKworICAgICpwYnlNYXhQb3dlciA9IHBEZXZpY2UtPmFieU9GRE1EZWZhdWx0UHdyW3BEZXZpY2UtPmJ5Q3VycmVudENoXTsKKyAgICBieURlYyA9IHBEZXZpY2UtPmFieU9GRE1Qd3JUYmxbcERldmljZS0+YnlDdXJyZW50Q2hdOworICAgIGlmIChwRGV2aWNlLT5ieVJGVHlwZSA9PSBSRl9VVzI0NTIpIHsKKyAgICAgICAgYnlEZWMgKj0gMzsKKyAgICAgICAgYnlEZWMgPj49IDE7CisgICAgfSBlbHNlIHsKKyAgICAgICAgYnlEZWMgPDw9IDE7CisgICAgfQorICAgICpwYnlNaW5Qb3dlciA9IHBEZXZpY2UtPmFieU9GRE1EZWZhdWx0UHdyW3BEZXZpY2UtPmJ5Q3VycmVudENoXSAtIGJ5RGVjOworfQorCisKKy8qCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBTZXQgU3VwcG9ydCBDaGFubmVscyBJRSBkZWZpbmVkIGluIDgwMi4xMWgKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBoRGV2aWNlQ29udGV4dCAtIGRldmljZSBzdHJ1Y3R1cmUgcG9pbnQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUuCisgKgorLSovCitCWVRFCitDQVJEYnlTZXRTdXBwb3J0Q2hhbm5lbHMgKAorICAgIElOIFBWT0lEICAgICAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gT1VUIFBCWVRFICAgICAgICBwYnlJRXMKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKyAgICBVSU5UICAgICAgICAgICAgICAgIGlpOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlDb3VudDsKKyAgICBQV0xBTl9JRV9TVVBQX0NIICAgIHBJRSA9IChQV0xBTl9JRV9TVVBQX0NIKSBwYnlJRXM7CisgICAgUEJZVEUgICAgICAgICAgICAgICBwYnlDaFR1cHBsZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5TGVuID0gMDsKKworCisgICAgcElFLT5ieUVsZW1lbnRJRCA9IFdMQU5fRUlEX1NVUFBfQ0g7CisgICAgcElFLT5sZW4gPSAwOworICAgIHBieUNoVHVwcGxlID0gcElFLT5hYnlDaGFubmVsVHVwbGU7CisgICAgYnlMZW4gPSAyOworICAgIC8vIGxvd2VyIGJhbmQKKyAgICBieUNvdW50ID0gMDsKKyAgICBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0WzI4XSA9PSBUUlVFKSB7CisgICAgICAgIGZvciAoaWk9Mjg7aWk8MzY7aWkrPTIpIHsKKyAgICAgICAgICAgIGlmIChDaGFubmVsUnVsZVRhYltwRGV2aWNlLT5ieVpvbmVUeXBlXS5iQ2hhbm5lbElkeExpc3RbaWldID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBieUNvdW50Kys7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSAzNDsKKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSBieUNvdW50OworICAgICAgICBieUxlbiArPSAyOworICAgIH0gZWxzZSBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0WzI5XSA9PSBUUlVFKSB7CisgICAgICAgIGZvciAoaWk9Mjk7aWk8MzY7aWkrPTIpIHsKKyAgICAgICAgICAgIGlmIChDaGFubmVsUnVsZVRhYltwRGV2aWNlLT5ieVpvbmVUeXBlXS5iQ2hhbm5lbElkeExpc3RbaWldID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBieUNvdW50Kys7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSAzNjsKKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSBieUNvdW50OworICAgICAgICBieUxlbiArPSAyOworICAgIH0KKyAgICAvLyBtaWRkbGUgYmFuZAorICAgIGJ5Q291bnQgPSAwOworICAgIGlmIChDaGFubmVsUnVsZVRhYltwRGV2aWNlLT5ieVpvbmVUeXBlXS5iQ2hhbm5lbElkeExpc3RbMzZdID09IFRSVUUpIHsKKyAgICAgICAgZm9yIChpaT0zNjtpaTw0MDtpaSsrKSB7CisgICAgICAgICAgICBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0W2lpXSA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgYnlDb3VudCsrOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICpwYnlDaFR1cHBsZSsrID0gNTI7CisgICAgICAgICpwYnlDaFR1cHBsZSsrID0gYnlDb3VudDsKKyAgICAgICAgYnlMZW4gKz0gMjsKKyAgICB9CisgICAgLy8gaGlnaGVyIGJhbmQKKyAgICBieUNvdW50ID0gMDsKKyAgICBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0WzQwXSA9PSBUUlVFKSB7CisgICAgICAgIGZvciAoaWk9NDA7aWk8NTE7aWkrKykgeworICAgICAgICAgICAgaWYgKENoYW5uZWxSdWxlVGFiW3BEZXZpY2UtPmJ5Wm9uZVR5cGVdLmJDaGFubmVsSWR4TGlzdFtpaV0gPT0gVFJVRSkgeworICAgICAgICAgICAgICAgIGJ5Q291bnQrKzsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAqcGJ5Q2hUdXBwbGUrKyA9IDEwMDsKKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSBieUNvdW50OworICAgICAgICBieUxlbiArPSAyOworICAgIH0gZWxzZSBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0WzUxXSA9PSBUUlVFKSB7CisgICAgICAgIGZvciAoaWk9NTE7aWk8NTY7aWkrKykgeworICAgICAgICAgICAgaWYgKENoYW5uZWxSdWxlVGFiW3BEZXZpY2UtPmJ5Wm9uZVR5cGVdLmJDaGFubmVsSWR4TGlzdFtpaV0gPT0gVFJVRSkgeworICAgICAgICAgICAgICAgIGJ5Q291bnQrKzsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAqcGJ5Q2hUdXBwbGUrKyA9IDE0OTsKKyAgICAgICAgKnBieUNoVHVwcGxlKysgPSBieUNvdW50OworICAgICAgICBieUxlbiArPSAyOworICAgIH0KKyAgICBwSUUtPmxlbiArPSAoYnlMZW4gLSAyKTsKKyAgICByZXR1cm4gKGJ5TGVuKTsKK30KKworCisvKgorICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgR2V0IEN1cnJlbnQgVHggUG93ZXIKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBoRGV2aWNlQ29udGV4dCAtIGRldmljZSBzdHJ1Y3R1cmUgcG9pbnQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUuCisgKgorLSovCitJOAorQ0FSRGJ5R2V0VHJhbnNtaXRQb3dlciAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlcgorICAgICkKK3sKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKworICAgIHJldHVybiAocERldmljZS0+YnlDdXJQd3JkQm0pOworfQorCisKK0JPT0wKK0NBUkRiQ2hhbm5lbEdldExpc3QgKAorICAgIElOICBVSU5UICAgICAgIHVDb3VudHJ5Q29kZUlkeCwKKyAgICBPVVQgUEJZ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kVMOyBpaSsrICkgeworICAgICAgICBpZiAoQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYkNoYW5uZWxJZHhMaXN0W2lpXSAhPSAwKSB7CisgICAgICAgICAgICBwSUVDb3VudHJ5LT5hYnlDb3VudHJ5SW5mb1twSUVDb3VudHJ5LT5sZW4rK10gPSBzQ2hhbm5lbFRibFtpaSsxXS5ieUNoYW5uZWxOdW1iZXI7CisgICAgICAgICAgICBwSUVDb3VudHJ5LT5hYnlDb3VudHJ5SW5mb1twSUVDb3VudHJ5LT5sZW4rK10gPSAxOworICAgICAgICAgICAgcElFQ291bnRyeS0+YWJ5Q291bnRyeUluZm9bcElFQ291bnRyeS0+bGVuKytdID0gQ2hhbm5lbFJ1bGVUYWJbcERldmljZS0+Ynlab25lVHlwZV0uYnlQb3dlcltpaV07CisgICAgICAgIH0KKyAgICB9CisgICAgcElFQ291bnRyeS0+bGVuICs9IDM7Cit9CisKKworQk9PTAorQ0FSRGJHZXRDaGFubmVsTWFwSW5mbygKKyAgICBJTiBQVk9JRCAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gVUlOVCAgICAgICAgIHVDaGFubmVsSW5kZXgsCisgICAgT1VUIFBCWVRFICAgICAgIHBieUNoYW5uZWxOdW1iZXIsCisgICAgT1VUIFBCWVRFICAgICAgIHBieU1hcAorICAgICkKK3sKKy8vICAgIFBTRGV2aWNlICAgICAgICAgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisKKyAgICBpZiAodUNoYW5uZWxJbmRleCA+IENCX01BWF9DSEFOTkVMKSB7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisgICAgKnBieUNoYW5uZWxOdW1iZXIgPSBzQ2hhbm5lbFRibFt1Q2hhbm5lbEluZGV4XS5ieUNoYW5uZWxOdW1iZXI7CisgICAgKnBieU1hcCA9IHNDaGFubmVsVGJsW3VDaGFubmVsSW5kZXhdLmJ5TUFQOworICAgIHJldHVybiBzQ2hhbm5lbFRibFt1Q2hhbm5lbEluZGV4XS5iVmFsaWQ7Cit9CisKKworVk9JRAorQ0FSRHZTZXRDaGFubmVsTWFwSW5mbygKKyAgICBJTiBQVk9JRCAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gVUlOVCAgICAgICAgIHVDaGFubmVsSW5kZXgsCisgICAgSU4gQllURSAgICAgICAgIGJ5TWFwCisgICAgKQoreworLy8gICAgUFNEZXZpY2UgICAgICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKworICAgIGlmICh1Q2hhbm5lbEluZGV4ID4gQ0JfTUFYX0NIQU5ORUwpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKyAgICBzQ2hhbm5lbFRibFt1Q2hhbm5lbEluZGV4XS5ieU1BUCB8PSBieU1hcDsKK30KKworCitWT0lECitDQVJEdkNsZWFyQ2hhbm5lbE1hcEluZm8oCisgICAgSU4gUFZPSUQgICAgICAgIHBEZXZpY2VIYW5kbGVyCisgICAgKQoreworLy8gICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisgICAgVUlOVCAgICAgICAgaWkgPSAwOworCisgICAgZm9yIChpaSA9IDE7IGlpIDw9ICBDQl9NQVhfQ0hBTk5FTDsgaWkrKykgeworICAgICAgICBzQ2hhbm5lbFRibFtpaV0uYnlNQVAgPSAwOworICAgIH0KK30KKworCitCWVRFCitDQVJEYnlBdXRvQ2hhbm5lbFNlbGVjdCgKKyAgICBJTiBQVk9JRCAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgQ0FSRF9QSFlfVFlQRSAgIGVQSFlUeXBlCisgICAgKQoreworLy8gICAgUFNEZXZpY2UgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworICAgIFVJTlQgICAgICAgICAgICBpaSA9IDA7CisgICAgQllURSAgICAgICAgICAgIGJ5T3B0aW9uQ2hhbm5lbCA9IDA7CisgICAgSU5UICAgICAgICAgICAgIGFpV2VpZ2h0W0NCX01BWF9DSEFOTkVMXzI0RysxXSA9IHstMTAwMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDB9OworCisgICAgaWYgKGVQSFlUeXBlID09IFBIWV9UWVBFXzExQSkgeworICAgICAgICBmb3IoaWk9Q0JfTUFYX0NIQU5ORUxfMjRHKzE7aWk8PUNCX01BWF9DSEFOTkVMO2lpKyspIHsKKyAgICAgICAgICAgIGlmIChzQ2hhbm5lbFRibFtpaV0uYlZhbGlkID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBpZiAoYnlPcHRpb25DaGFubmVsID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgYnlPcHRpb25DaGFubmVsID0gKEJZVEUpIGlpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoc0NoYW5uZWxUYmxbaWldLmJ5TUFQID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgoQllURSkgaWkpOworICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoQklUYklzQml0T2ZmKHNDaGFubmVsVGJsW2lpXS5ieU1BUCwgMHgwOCkpIHsKKyAgICAgICAgICAgICAgICAgICAgYnlPcHRpb25DaGFubmVsID0gKEJZVEUpIGlpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0gZWxzZSB7CisgICAgICAgIGJ5T3B0aW9uQ2hhbm5lbCA9IDA7CisgICAgICAgIGZvcihpaT0xO2lpPD1DQl9NQVhfQ0hBTk5FTF8yNEc7aWkrKykgeworICAgICAgICAgICAgaWYgKHNDaGFubmVsVGJsW2lpXS5iVmFsaWQgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgIGlmIChzQ2hhbm5lbFRibFtpaV0uYnlNQVAgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaV0gKz0gMTAwOworICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoQklUYklzQml0T24oc0NoYW5uZWxUYmxbaWldLmJ5TUFQLCAweDAxKSkgeworICAgICAgICAgICAgICAgICAgICBpZiAoaWkgPiAzKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaS0zXSAtPSAxMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoaWkgPiAyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaS0yXSAtPSAyMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoaWkgPiAxKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaS0xXSAtPSA0MDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaV0gLT0gODA7CisgICAgICAgICAgICAgICAgICAgIGlmIChpaSA8IENCX01BWF9DSEFOTkVMXzI0RykgeworICAgICAgICAgICAgICAgICAgICAgICAgYWlXZWlnaHRbaWkrMV0gLT0gNDA7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKGlpIDwgKENCX01BWF9DSEFOTkVMXzI0RyAtIDEpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhaVdlaWdodFtpaSsyXSAtPSAyMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoaWkgPCAoQ0JfTUFYX0NIQU5ORUxfMjRHIC0gMikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFpV2VpZ2h0W2lpKzNdIC09IDEwOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGZvcihpaT0xO2lpPD1DQl9NQVhfQ0hBTk5FTF8yNEc7aWkrKykgeworICAgICAgICAgICAgaWYgKChzQ2hhbm5lbFRibFtpaV0uYlZhbGlkID09IFRSVUUpICYmCisgICAgICAgICAgICAgICAgKGFpV2VpZ2h0W2lpXSA+IGFpV2VpZ2h0W2J5T3B0aW9uQ2hhbm5lbF0pKSB7CisgICAgICAgICAgICAgICAgYnlPcHRpb25DaGFubmVsID0gKEJZVEUpIGlpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAgIHJldHVybiAoYnlPcHRpb25DaGFubmVsKTsKK30KKworCisKKy8veHh4CitWT0lECitDQVJEdlNhZmVSZXNldFR4ICgKKyAgICBJTiBQVk9JRCAgICBwRGV2aWNlSGFuZGxlcgorICAgICkKK3sKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKyAgICBVSU5UICAgICAgICB1dTsKKyAgICBQU1R4RGVzYyAgICBwQ3VyclREOworCisgICAgLy8gaW5pdGlhbGl6ZSBURCBpbmRleAorICAgIHBEZXZpY2UtPmFwVGFpbFREWzBdID0gcERldmljZS0+YXBDdXJyVERbMF0gPSAmKHBEZXZpY2UtPmFwVEQwUmluZ3NbMF0pOworICAgIHBEZXZpY2UtPmFwVGFpbFREWzFdID0gcERldmljZS0+YXBDdXJyVERbMV0gPSAmKHBEZXZpY2UtPmFwVEQxUmluZ3NbMF0pOworCisgICAgZm9yICh1dSA9IDA7IHV1IDwgVFlQRV9NQVhURDsgdXUgKyspCisgICAgICAgIHBEZXZpY2UtPmlURFVzZWRbdXVdID0gMDsKKworICAgIGZvciAodXUgPSAwOyB1dSA8IHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdOyB1dSsrKSB7CisgICAgICAgIHBDdXJyVEQgPSAmKHBEZXZpY2UtPmFwVEQwUmluZ3NbdXVdKTsKKyAgICAgICAgcEN1cnJURC0+bV90ZDBURDAuZjFPd25lciA9IE9XTkVEX0JZX0hPU1Q7CisgICAgICAgIC8vIGluaXQgYWxsIFR4IFBhY2tldCBwb2ludGVyIHRvIE5VTEwKKyAgICB9CisgICAgZm9yICh1dSA9IDA7IHV1IDwgcERldmljZS0+c09wdHMublR4RGVzY3NbMV07IHV1KyspIHsKKyAgICAgICAgcEN1cnJURCA9ICYocERldmljZS0+YXBURDFSaW5nc1t1dV0pOworICAgICAgICBwQ3VyclRELT5tX3RkMFREMC5mMU93bmVyID0gT1dORURfQllfSE9TVDsKKyAgICAgICAgLy8gaW5pdCBhbGwgVHggUGFja2V0IHBvaW50ZXIgdG8gTlVMTAorICAgIH0KKworICAgIC8vIHNldCBNQUMgVEQgcG9pbnRlcgorICAgIE1BQ3ZTZXRDdXJyVFhEZXNjQWRkcihUWVBFX1RYRE1BMCwgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgIChwRGV2aWNlLT50ZDBfcG9vbF9kbWEpKTsKKworICAgIE1BQ3ZTZXRDdXJyVFhEZXNjQWRkcihUWVBFX0FDMERNQSwgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgIChwRGV2aWNlLT50ZDFfcG9vbF9kbWEpKTsKKworICAgIC8vIHNldCBNQUMgQmVhY29uIFRYIHBvaW50ZXIKKyAgICBNQUN2U2V0Q3VyckJDTlR4RGVzY0FkZHIocERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgIChwRGV2aWNlLT50eF9iZWFjb25fZG1hKSk7CisKK30KKworCisKKy8qKworICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBSZXNldCBSeAorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgIC0gUG9pbnRlciB0byB0aGUgYWRhcHRlcgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKy0qLworVk9JRAorQ0FSRHZTYWZlUmVzZXRSeCAoCisgICAgSU4gUFZPSUQgICAgcERldmljZUhhbmRsZXIKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkgcERldmljZUhhbmRsZXI7CisgICAgVUlOVCAgICAgICAgdXU7CisgICAgUFNSeERlc2MgICAgcERlc2M7CisKKworCisgICAgLy8gaW5pdGlhbGl6ZSBSRCBpbmRleAorICAgIHBEZXZpY2UtPnBDdXJyUkRbMF09JihwRGV2aWNlLT5hUkQwUmluZ1swXSk7CisgICAgcERldmljZS0+cEN1cnJSRFsxXT0mKHBEZXZpY2UtPmFSRDFSaW5nWzBdKTsKKworICAgIC8vIGluaXQgc3RhdGUsIGFsbCBSRCBpcyBjaGlwJ3MKKyAgICBmb3IgKHV1ID0gMDsgdXUgPCBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczA7IHV1KyspIHsKKyAgICAgICAgcERlc2MgPSYocERldmljZS0+YVJEMFJpbmdbdXVdKTsKKyAgICAgICAgcERlc2MtPm1fcmQwUkQwLndSZXNDb3VudCA9IChXT1JEKShwRGV2aWNlLT5yeF9idWZfc3opOworICAgICAgICBwRGVzYy0+bV9yZDBSRDAuZjFPd25lcj1PV05FRF9CWV9OSUM7CisgICAgICAgIHBEZXNjLT5tX3JkMVJEMS53UmVxQ291bnQgPSAoV09SRCkocERldmljZS0+cnhfYnVmX3N6KTsKKyAgICB9CisKKyAgICAvLyBpbml0IHN0YXRlLCBhbGwgUkQgaXMgY2hpcCdzCisgICAgZm9yICh1dSA9IDA7IHV1IDwgcERldmljZS0+c09wdHMublJ4RGVzY3MxOyB1dSsrKSB7CisgICAgICAgIHBEZXNjID0mKHBEZXZpY2UtPmFSRDFSaW5nW3V1XSk7CisgICAgICAgIHBEZXNjLT5tX3JkMFJEMC53UmVzQ291bnQgPSAoV09SRCkocERldmljZS0+cnhfYnVmX3N6KTsKKyAgICAgICAgcERlc2MtPm1fcmQwUkQwLmYxT3duZXI9T1dORURfQllfTklDOworICAgICAgICBwRGVzYy0+bV9yZD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lKSBwRGV2aWNlSGFuZGxlcjsKKyAgICBCWVRFICBieVNlcnYgPSAweDAwLCBieVNpZ25hbCA9IDB4MDA7IC8vRm9yIENDSworICAgIFdPUkQgIHdMZW4gPSAweDAwMDA7CisgICAgQllURSAgYnlUeFJhdGUsIGJ5UnN2VGltZTsgICAgICAgICAgICAgLy9Gb3IgT0ZETQorCisgICAgLy9TZXQgdG8gUGFnZTEKKyAgICBNQUN2U2VsZWN0UGFnZTEocERldmljZS0+UG9ydE9mZnNldCk7CisKKyAgICAvL1JTUElORl9iXzEKKyAgICBCQnZDYWN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAorICAgICAgICAgICAgICAgICAgICAgICAgIENBUkR3R2V0Q0NLQ29udHJvbFJhdGUoKFBWT0lEKXBEZXZpY2UsIFJBVEVfMU0pLAorICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLAorICAgICAgICAgICAgICAgICAgICAgICAgICZ3TGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICZieVNlcnYsCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2lnbmFsCisgICAgKTsKKworICAgIFZOU3ZPdXRQb3J0RChwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQl8xLCBNQUtFRFdPUkQod0xlbixNQUtFV09SRChieVNpZ25hbCxieVNlcnYpKSk7CisgICAgLy8vUlNQSU5GX2JfMgorICAgIEJCdkNhY3VsYXRlUGFyYW1ldGVyKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgMTQsCisgICAgICAgICAgICAgICAgICAgICAgICAgQ0FSRHdHZXRDQ0tDb250cm9sUmF0ZSgoUFZPSUQpcERldmljZSwgUkFURV8yTSksCisgICAgICAgICAgICAgICAgICAgICAgICAgUEtfVFlQRV8xMUIsCisgICAgICAgICAgICAgICAgICAgICAgICAgJndMZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2VydiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAmYnlTaWduYWwKKyAgICApOworCisgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9CXzIsIE1BS0VEV09SRCh3TGVuLE1BS0VXT1JEKGJ5U2lnbmFsLGJ5U2VydikpKTsKKyAgICAvL1JTUElORl9iXzUKKyAgICBCQnZDYWN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgIDE0LAorICAgICAgICAgICAgICAgICAgICAgICAgIENBUkR3R2V0Q0NLQ29udHJvbFJhdGUoKFBWT0lEKXBEZXZpY2UsIFJBVEVfNU0pLAorICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLAorICAgICAgICAgICAgICAgICAgICAgICAgICZ3TGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICZieVNlcnYsCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2lnbmFsCisgICAgKTsKKworICAgIFZOU3ZPdXRQb3J0RChwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQl81LCBNQUtFRFdPUkQod0xlbixNQUtFV09SRChieVNpZ25hbCxieVNlcnYpKSk7CisgICAgLy9SU1BJTkZfYl8xMQorICAgIEJCdkNhY3VsYXRlUGFyYW1ldGVyKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgMTQsCisgICAgICAgICAgICAgICAgICAgICAgICAgQ0FSRHdHZXRDQ0tDb250cm9sUmF0ZSgoUFZPSUQpcERldmljZSwgUkFURV8xMU0pLAorICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLAorICAgICAgICAgICAgICAgICAgICAgICAgICZ3TGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICZieVNlcnYsCisgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5U2lnbmFsCisgICAgKTsKKworICAgIFZOU3ZPdXRQb3J0RChwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQl8xMSwgTUFLRURXT1JEKHdMZW4sTUFLRVdPUkQoYnlTaWduYWwsYnlTZXJ2KSkpOworICAgIC8vUlNQSU5GX2FfNgorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoUkFURV82TSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVQSFlUeXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5VHhSYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5UnN2VGltZSk7CisgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9BXzYsIE1BS0VXT1JEKGJ5VHhSYXRlLGJ5UnN2VGltZSkpOworICAgIC8vUlNQSU5GX2FfOQorICAgIHNfdkNhY3VsYXRlT0ZETVJQYXJhbWV0ZXIoUkFURV85TSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVQSFlUeXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5VHhSYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5UnN2VGltZSk7CisgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9BXzksIE1BS0VXT1JEKGJ5VHhSYXRlLGJ5UnN2VGltZSkpOworICAgIC8vUlNQSU5GX2FfMTIKKyAgICBzX3ZDYWN1bGF0ZU9GRE1SUGFyYW1ldGVyKFJBVEVfMTJNLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1l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gICAgICAgICAgICAgICAgICAgICAgICAgJmJ5UnN2VGltZSk7CisgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JTUElORl9BXzM2LCBNQUtFV09SRChieVR4UmF0ZSxieVJzdlRpbWUpKTsKKyAgICAvL1JTUElORl9hXzQ4CisgICAgc192Q2FjdWxhdGVPRkRNUlBhcmFtZXRlcihDQVJEd0dldE9GRE1Db250cm9sUmF0ZSgoUFZPSUQpcERldmljZSwgUkFURV80OE0pLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1lKTsKKyAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0FfNDgsIE1BS0VXT1JEKGJ5VHhSYXRlLGJ5UnN2VGltZSkpOworICAgIC8vUlNQSU5GX2FfNTQKKyAgICBzX3ZDYWN1bGF0ZU9GRE1SUGFyYW1ldGVyKENBUkR3R2V0T0ZETUNvbnRyb2xSYXRlKChQVk9JRClwRGV2aWNlLCBSQVRFXzU0TSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlUEhZVHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVR4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVJzdlRpbWUpOworICAgIFZOU3ZPdXRQb3J0VyhwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SU1BJTkZfQV81NCwgTUFLRVdPUkQoYnlUeFJhdGUsYnlSc3ZUaW1lKSk7CisKKyAgICAvL1JTUElORl9hXzcyCisgICAgc192Q2FjdWxhdGVPRkRNUlBhcmFtZXRlcihDQVJEd0dldE9GRE1Db250cm9sUmF0ZSgoUFZPSUQpcERldmljZSwgUkFURV81NE0pLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZVBIWVR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlUeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmYnlSc3ZUaW1lKTsKKyAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUlNQSU5GX0FfNzIsIE1BS0VXT1JEKGJ5VHhSYXRlLGJ5UnN2VGltZSkpOworICAgIC8vU2V0IHRvIFBhZ2UwCisgICAgTUFDdlNlbGVjdFBhZ2UwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworfQorCisvKgorICogRGVzY3JpcHRpb246IFVwZGF0ZSBJRlMKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgc2V0CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBOb25lLgorICoKKyAqLwordm9pZCB2VXBkYXRlSUZTIChQVk9JRCBwRGV2aWNlSGFuZGxlcikKK3sKKyAgICAvL1NldCBTSUZTLCBESUZTLCBFSUZTLCBTbG90VGltZSwgQ3dNaW4KKyAgICBQU0RldmljZSBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKKworICAgIEJZVEUgYnlNYXhNaW4gPSAwOworICAgIGlmIChwRGV2aWNlLT5ieVBhY2tldFR5cGU9PVBLX1RZUEVfMTFBKSB7Ly8wMDAwIDAwMDAgMDAwMCAwMDAwLDExYQorICAgICAgICBwRGV2aWNlLT51U2xvdCA9IENfU0xPVF9TSE9SVDsKKyAgICAgICAgcERldmljZS0+dVNJRlMgPSBDX1NJRlNfQTsKKyAgICAgICAgcERldmljZS0+dURJRlMgPSBDX1NJRlNfQSArIDIqQ19TTE9UX1NIT1JUOworICAgICAgICBwRGV2aWNlLT51Q3dNaW4gPSBDX0NXTUlOX0E7CisgICAgICAgIGJ5TWF4TWluID0gNDsKKyAgICB9CisgICAgZWxzZSBpZiAocERldmljZS0+YnlQYWNrZXRUeXBlPT1QS19UWVBFXzExQikgey8vMDAwMCAwMDAxIDAwMDAgMDAwMCwxMWIKKyAgICAgICAgcERldmljZS0+dVNsb3QgPSBDX1NMT1RfTE9ORzsKKyAgICAgICAgcERldmljZS0+dVNJRlMgPSBDX1NJRlNfQkc7CisgICAgICAgIHBEZXZpY2UtPnVESUZTID0gQ19TSUZTX0JHICsgMipDX1NMT1RfTE9ORzsKKwkgICAgcERldmljZS0+dUN3TWluID0gQ19DV01JTl9COworICAgICAgICBieU1heE1pbiA9IDU7CisgICAgfQorICAgIGVsc2UgeyAvLyBQS19UWVBFXzExR0EgJiBQS19UWVBFXzExR0IKKyAgICAgICAgcERldmljZS0+dVNJRlMgPSBDX1NJRlNfQkc7CisgICAgICAgIGlmIChwRGV2aWNlLT5iU2hvcnRTbG90VGltZSkgeworICAgICAgICAgICAgcERldmljZS0+dVNsb3QgPSBDX1NMT1RfU0hPUlQ7CisgICAgICAgIH0gZWxzZSB7CisJICAgICAgICBwRGV2aWNlLT51U2xvdCA9IENfU0xPVF9MT05HOworCSAgICB9CisJICAgIHBEZXZpY2UtPnVESUZTID0gQ19TSUZTX0JHICsgMipwRGV2aWNlLT51U2xvdDsKKyAgICAgICAgaWYgKHBEZXZpY2UtPndCYXNpY1JhdGUgJiAweDAxNTApIHsgLy8wMDAwIDAwMDEgMDEwMSAwMDAwLDI0TSwxMk0sNk0KKyAgICAgICAgICAgIHBEZXZpY2UtPnVDd01pbiA9IENfQ1dNSU5fQTsKKyAgICAgICAgICAgIGJ5TWF4TWluID0gNDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPnVDd01pbiA9IENfQ1dNSU5fQjsKKyAgICAgICAgICAgIGJ5TWF4TWluID0gNTsKKyAgICAgICAgf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WVBFXzExQikgeworICAgICAgICByZXR1cm4gKEJZVEUpcERldmljZS0+YnlCQlR5cGU7CisgICAgfQorICAgIGVsc2UgaWYgKENBUkRiSXNPRkRNaW5CYXNpY1JhdGUoKFBWT0lEKXBEZXZpY2UpKSB7CisgICAgICAgIHJldHVybiBQS19UWVBFXzExR0E7CisgICAgfQorICAgIGVsc2UgeworICAgIAlyZXR1cm4gUEtfVFlQRV8xMUdCOworICAgIH0KK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBTZXQgTklDIExvb3BiYWNrIG1vZGUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgLSBUaGUgYWRhcHRlciB0byBiZSBzZXQKKyAqICAgICAgd0xvb3BiYWNrTW9kZSAgIC0gTG9vcGJhY2sgbW9kZSB0byBiZSBzZXQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCisgKi8KK3ZvaWQgQ0FSRHZTZXRMb29wYmFja01vZGUgKERXT1JEX1BUUiBkd0lvQmFzZSwgV09SRCB3TG9vcGJhY2tNb2RlKQoreworICAgIHN3aXRjaCh3TG9vcGJhY2tNb2RlKSB7CisgICAgY2FzZSBDQVJEX0xCX05PTkU6CisgICAgY2FzZSBDQVJEX0xCX01BQzoKKyAgICBjYXNlIENBUkRfTEJfUEhZOgorICAgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgICBBU1NFUlQoRkFMU0UpOworICAgICAgICBicmVhazsKKyAgICB9CisgICAgLy8gc2V0IE1BQyBsb29wYmFjaworICAgIE1BQ3ZTZXRMb29wYmFja01vZGUoZHdJb0Jhc2UsIExPQllURSh3TG9vcGJhY2tNb2RlKSk7CisgICAgLy8gc2V0IEJhc2ViYW5kIGxvb3BiYWNrCit9CisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBTb2Z0d2FyZSBSZXNldCBOSUMKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgLSBUaGUgYWRhcHRlciB0byBiZSByZXNldAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLworQk9PTCBDQVJEYlNvZnR3YXJlUmVzZXQgKFBWT0lEIHBEZXZpY2VIYW5kbGVyKQoreworICAgIFBTRGV2aWNlIHBEZXZpY2UgPSAoUFNEZXZpY2UpIHBEZXZpY2VIYW5kbGVyOworCisgICAgLy8gcmVzZXQgTUFDCisgICAgaWYgKCFNQUNiU2FmZVNvZnR3YXJlUmVzZXQocERldmljZS0+UG9ydE9mZnNldCkpCisgICAgICAgIHJldHVybiBGQUxTRTsKKworICAgIHJldHVybiBUUlVFOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2FjdWxhdGUgVFNGIG9mZnNldCBvZiB0d28gVFNGIGlucHV0CisgKiAgICAgICAgICAgICAgR2V0IFRTRiBPZmZzZXQgZnJvbSBSeEJDTidzIFRTRiBhbmQgbG9jYWwgVFNGCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgc3luYy4KKyAqICAgICAgcXdUU0YxICAgICAgICAgIC0gUnggQkNOJ3MgVFNGCisgKiAgICAgIHF3VFNGMiAgICAgICAgICAtIExvY2FsIFRTRgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogVFNGIE9mZnNldCB2YWx1ZQorICoKKyAqLworUVdPUkQgQ0FSRHFHZXRUU0ZPZmZzZXQgKEJZVEUgYnlSeFJhdGUsIFFXT1JEIHF3VFNGMSwgUVdPUkQgcXdUU0YyKQoreworICAgIFFXT1JEICAgcXdUU0ZPZmZzZXQ7CisgICAgV09SRCAgICB3UnhCY25UU0ZPZmZzdD0gMDs7CisKKyAgICBISURXT1JEKHF3VFNGT2Zmc2V0KSA9IDA7CisgICAgTE9EV09SRChxd1RTRk9mZnNldCkgPSAwOworICAgIHdSeEJjblRTRk9mZnN0ID0gY3dSWEJDTlRTRk9mZltieVJ4UmF0ZSVNQVhfUkFURV07CisgICAgKHF3VFNGMikudS5kd0xvd0R3b3JkICs9IChEV09SRCkod1J4QmNuVFNGT2Zmc3QpOworICAgIGlmICgocXdUU0YyKS51LmR3TG93RHdvcmQgPCAoRFdPUkQpKHdSeEJjblRTRk9mZnN0KSkgeworICAgICAgICAocXdUU0YyKS51LmR3SGlnaER3b3JkKys7CisgICAgfQorICAgIExPRFdPUkQocXdUU0ZPZmZzZXQpID0gTE9EV09SRChxd1RTRjEpIC0gTE9EV09SRChxd1RTRjIpOworICAgIGlmIChMT0RXT1JEKHF3VFNGMSkgPCBMT0RXT1JEKHF3VFNGMikpIHsKKyAgICAgICAgLy8gaWYgYm9ycm93IG5lZWRlZAorICAgICAgICBISURXT1JEKHF3VFNGT2Zmc2V0KSA9IEhJRFdPUkQocXdUU0YxKSAtIEhJRFdPUkQocXdUU0YyKSAtIDEgOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgSElEV09SRChxd1RTRk9mZnNldCkgPSBISURXT1JEKHF3VFNGMSkgLSBISURXT1JEKHF3VFNGMik7CisgICAgfTsKKyAgICByZXR1cm4gKHF3VFNGT2Zmc2V0KTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IFJlYWQgTklDIFRTRiBjb3VudGVyCisgKiAgICAgICAgICAgICAgR2V0IGxvY2FsIFRTRiBjb3VudGVyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgIC0gVGhlIGFkYXB0ZXIgdG8gYmUgcmVhZAorICogIE91dDoKKyAqICAgICAgcXdDdXJyVFNGICAgICAgIC0gQ3VycmVudCBUU0YgY291bnRlcgorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBzdWNjZXNzOyBvdGhlcndpc2UgRkFMU0UKKyAqCisgKi8KK0JPT0wgQ0FSRGJHZXRDdXJyZW50VFNGIChEV09SRF9QVFIgZHdJb0Jhc2UsIFBRV09SRCBwcXdDdXJyVFNGKQoreworICAgIFdPUkQgICAgd3c7CisgICAgQllURSAgICBieURhdGE7CisKKyAgICBNQUN2UmVnQml0c09uKGR3SW9CYXNlLCBNQUNfUkVHX1RGVENUTCwgVEZUQ1RMX1RTRkNOVFJSRCk7CisgICAgZm9yICh3dyA9IDA7IHd3IDwgV19NQVhfVElNRU9VVDsgd3crKykgeworICAgICAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfVEZUQ1RMLCAmYnlEYXRhKTsKKyAgICAgICAgaWYgKEJJVGJJc0JpdE9mZihieURhdGEsIFRGVENUTF9UU0ZDTlRSUkQpKQorICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIGlmICh3dyA9PSBXX01BWF9USU1FT1VUKQorICAgICAgICByZXR1cm4oRkFMU0UpOworICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19UU0ZDTlRSLCAmTE9EV09SRCgqcHF3Q3VyclRTRikpOworICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19UU0ZDTlRSICsgNCwgJkhJRFdPUkQoKnBxd0N1cnJUU0YpKTsKKworICAgIHJldHVybihUUlVFKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IFJlYWQgTklDIFRTRiBjb3VudGVyCisgKiAgICAgICAgICAgICAgR2V0IE5FWFRUQlRUIGZyb20gYWRqdXN0ZWQgVFNGIGFuZCBCZWFjb24gSW50ZXJ2YWwKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBxd1RTRiAgICAgICAgICAgLSBDdXJyZW50IFRTRiBjb3VudGVyCisgKiAgICAgIHdiZWFjb25JbnRlcnZhbCAtIEJlYWNvbiBJbnRlcnZhbAorICogIE91dDoKKyAqICAgICAgcXdDdXJyVFNGICAgICAgIC0gQ3VycmVudCBUU0YgY291bnRlcgorICoKKyAqIFJldHVybiBWYWx1ZTogVFNGIHZhbHVlIG9mIG5leHQgQmVhY29uCisgKgorICovCitRV09SRCBDQVJEcUdldE5leHRUQlRUIChRV09SRCBxd1RTRiwgV09SRCB3QmVhY29uSW50ZXJ2YWwpCit7CisKKyAgICBVSU5UICAgIHVMb3dOZXh0VEJUVDsKKyAgICBVSU5UICAgIHVIaWdoUmVtYWluLCB1TG93UmVtYWluOworICAgIFVJTlQgICAgdUJlYWNvbkludGVydmFsOworCisgICAgdUJlYWNvbkludGVydmFsID0gd0JlYWNvbkludGVydmFsICogMTAyNDsKKyAgICAvLyBOZXh0IFRCVFQgPSAoKGxvY2FsX2N1cnJlbnRfVFNGIC8gYmVhY29uX2ludGVydmFsKSArIDEgKSAqIGJlYWNvbl9pbnRlcnZhbAorICAgIHVMb3dOZXh0VEJUVCA9IChMT0RXT1JEKHF3VFNGKSA+PiAxMCkgPDwgMTA7CisgICAgLy8gbG93IGR3b3JkIChtb2QpIGJjbgorICAgIHVMb3dSZW1haW4gPSAodUxvd05leHRUQlRUKSAlIHVCZWFjb25JbnRlcnZhbDsKKy8vICAgIHVIaWdoUmVtYWluID0gKCgweDgwMDAwMDAwICUgdUJlYWNvbkludGVydmFsKSogMiAqIEhJRFdPUkQocXdUU0YpKQorLy8gICAgICAgICAgICAgICAgICAlIHVCZWFjb25JbnRlcnZhbDsKKyAgICAvLyBoaWdoIGR3b3JkIChtb2QpIGJjbgorICAgIHVIaWdoUmVtYWluID0gKCgoMHhmZmZmZmZmZiAlIHVCZWFjb25JbnRlcnZhbCkgKyAxKSAqIEhJRFdPUkQocXdUU0YpKQorICAgICAgICAgICAgICAgICAgJSB1QmVhY29uSW50ZXJ2YWw7CisgICAgdUxvd1JlbWFpbiA9ICh1SGlnaFJlbWFpbiArIHVMb3dSZW1haW4pICUgdUJlYWNvbkludGVydmFsOworICAgIHVMb3dSZW1haW4gPSB1Q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NJRCwKKyAgICBJTiBCT09MICAgICAgICAgICAgIGJSU05DYXBFeGlzdCwKKyAgICBJTiBXT1JEICAgICAgICAgICAgIHdSU05DYXAKKyAgICApOworCitQVk9JRAorQ0FSRHBHZXRDdXJyZW50QWRkcmVzcyAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlcgorICAgICk7CisKKworVk9JRCBDQVJEdkluaXRDaGFubmVsVGFibGUoUFZPSUQgcERldmljZUhhbmRsZXIpOworQllURSBDQVJEYnlHZXRDaGFubmVsTWFwcGluZyhQVk9JRCBwRGV2aWNlSGFuZGxlciwgQllURSBieUNoYW5uZWxOdW1iZXIsIENBUkRfUEhZX1RZUEUgZVBoeVR5cGUpOworCitCT09MCitDQVJEYlN0YXJ0TWVhc3VyZSAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHB2TWVhc3VyZUVJRHMsCisgICAgSU4gVUlOVCAgICAgICAgICAgICB1TnVtT2ZNZWFzdXJlRUlEcworICAgICk7CisKK0JPT0wKK0NBUkRiQ2hhbm5lbFN3aXRjaCAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBCWVRFICAgICAgICAgICAgIGJ5TW9kZSwKKyAgICBJTiBCWVRFICAgICAgICAgICAgIGJ5TmV3Q2hhbm5lbCwKKyAgICBJTiBCWVRFICAgICAgICAgICAgIGJ5Q291bnQKKyAgICApOworCitCT09MCitDQVJEYlNldFF1aWV0ICgKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIElOIEJPT0wgICAgICAgICAgICAgYlJlc2V0UXVpZXQsCisgICAgSU4gQllURSAgICAgICAgICAgICBieVF1aWV0Q291bnQsCisgICAgSU4gQllURSAgICAgICAgICAgICBieVF1aWV0UGVyaW9kLAorICAgIElOIFdPUkQgICAgICAgICAgICAgd1F1aWV0RHVyYXRpb24sCisgICAgSU4gV09SRCAgICAgICAgICAgICB3UXVpZXRPZmZzZXQKKyAgICApOworCitCT09MCitDQVJEYlN0YXJ0UXVpZXQgKAorICAgIElOIFBWT0lEICAgICAgICAgICAgcERldmljZUhhbmRsZXIKKyAgICApOworCitWT0lECitDQVJEdlNldENvdW50cnlJbmZvICgKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIElOIENBUkRfUEhZX1RZUEUgICAgZVBIWVR5cGUsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwSUUKKyAgICApOworCitWT0lECitDQVJEdlNldFBvd2VyQ29uc3RyYWludCAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBCWVRFICAgICAgICAgICAgIGJ5Q2hhbm5lbCwKKyAgICBJTiBJOCAgICAgICAgICAgICAgIGJ5UG93ZXIKKyAgICApOworCitWT0lECitDQVJEdkdldFBvd2VyQ2FwYWJpbGl0eSAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBPVVQgUEJZVEUgICAgICAgICAgIHBieU1pblBvd2VyLAorICAgIE9VVCBQQllURSAgICAgICAgICAgcGJ5TWF4UG93ZXIKKyAgICApOworCitCWVRFCitDQVJEYnlTZXRTdXBwb3J0Q2hhbm5lbHMgKAorICAgIElOIFBWT0lEICAgICAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gT1VUIFBCWVRFICAgICAgICBwYnlJRXMKKyAgICApOworCitJOAorQ0FSRGJ5R2V0VHJhbnNtaXRQb3dlciAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwRGV2aWNlSGFuZGxlcgorICAgICk7CisKK0JPT0wKK0NBUkRiQ2hhbm5lbEdldExpc3QgKAorICAgIElOICBVSU5UICAgICAgIHVDb3VudHJ5Q29kZUlkeCwKKyAgICBPVVQgUEJZVEUgICAgICBwYnlDaGFubmVsVGFibGUKKyAgICApOworCitWT0lECitDQVJEdlNldENvdW50cnlJRSgKKyAgICBJTiBQVk9JRCAgICAgICAgcERldmljZUhhbmRsZXIsCisgICAgSU4gUFZPSUQgICAgICAgIHBJRQorICAgICk7CisKK0JPT0wKK0NBUkRiR2V0Q2hhbm5lbE1hcEluZm8oCisgICAgSU4gUFZPSUQgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIElOIFVJTlQgICAgICAgICB1Q2hhbm5lbEluZGV4LAorICAgIE9VVCBQQllURSAgICAgICBwYnlDaGFubmVsTnVtYmVyLAorICAgIE9VVCBQQllURSAgICAgICBwYnlNYXAKKyAgICApOworCitWT0lECitDQVJEdlNldENoYW5uZWxNYXBJbmZvKAorICAgIElOIFBWT0lEICAgICAgICBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBVSU5UICAgICAgICAgdUNoYW5uZWxJbmRleCwKKyAgICBJTiBCWVRFICAgICAgICAgYnlNYXAKKyAgICApOworCitWT0lECitDQVJEdkNsZWFyQ2hhbm5lbE1hcEluZm8oCisgICAgSU4gUFZPSUQgICAgICAgIHBEZXZpY2VIYW5kbGVyCisgICAgKTsKKworQllURQorQ0FSRGJ5QXV0b0NoYW5uZWxTZWxlY3QoCisgICAgSU4gUFZPSUQgICAgICAgIHBEZXZpY2VIYW5kbGVyLAorICAgIENBUkRfUEhZX1RZUEUgICBlUEhZVHlwZQorICAgICk7CisKK0JZVEUgQ0FSRGJ5R2V0Q2hhbm5lbE51bWJlcihQVk9JRCBwRGV2aWNlSGFuZGxlciwgQllURSBieUNoYW5uZWxJbmRleCk7CisKKyNpZmRlZiBfX2NwbHVzcGx1cworfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEVuZCBvZiBleHRlcm4gIkMiIHsgKi8KKyNlbmRpZiAvKiBfX2NwbHVzcGx1cyAqLworCisKKyNlbmRpZiAvLyBfX0NBUkRfSF9fCisKKworCmRpZmY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haWxzLgorICoKKyAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFsb25nCisgKiB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLAorICogNTEgRnJhbmtsaW4gU3RyZWV0LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQSAwMjExMC0xMzAxIFVTQS4KKyAqCisgKgorICogRmlsZTogY291bnRyeS5oCisgKgorICogUHVycG9zZTogQ291bnRyeSBDb2RlIGluZm9ybWF0aW9uCisgKgorICogQXV0aG9yOiBMdWNhcyBMaW4KKyAqCisgKiBEYXRlOiBEZWMgMjMsIDIwMDQKKyAqCisgKi8KKworI2lmbmRlZiBfX0NPVU5UUllfSF9fCisjZGVmaW5lIF9fQ09VTlRSWV9IX18KKworI2lmICFkZWZpbmVkKF9fVFRZUEVfSF9fKQorI2luY2x1ZGUgInR0eXBlLmgiCisjZW5kaWYKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IERlZmluaXRpb25zIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVGhlIGRlZmluaXRpb24gaGVyZSBzaG91bGQgYmUgY29tcGxpZWQgd2l0aCB0aGUgSU5GIGNvdW50cnkgb3JkZXIKKyAqIFBsZWFzZSBjaGVjayB3aXRoIFZOV0wuaW5mL1ZOV0w2NC5pbmYvVk5XTCouaW5mCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordHlwZWRlZiBlbnVtIF9DT1VOVFJZX0NPREUgeworICAgIENDT0RF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0NPREVfUEFOQU1BLAorICAgIENDT0RFX1BFUlUsCisgICAgQ0NPREVfUEhJTElQUElORVMsCisgICAgQ0NPREVfUE9MQU5ELAorICAgIENDT0RFX1BPUlRVR0FMLAorICAgIENDT0RFX1BVRVJUT19SSUNPLAorICAgIENDT0RFX1FBVEFSLAorICAgIENDT0RFX1JPTUFOSUEsCisgICAgQ0NPREVfUlVTU0lBLAorICAgIENDT0RFX1NBVURJX0FSQUJJQSwKKyAgICBDQ09ERV9TSU5HQVBPUkUsCisgICAgQ0NPREVfU0xPVkFLSUEsCisgICAgQ0NPREVfU0xPVkVOSUEsCisgICAgQ0NPREVfU09VVEhfQUZSSUNBLAorICAgIENDT0RFX1NPVVRIX0tPUkVBLAorICAgIENDT0RFX1NQQUlOLAorICAgIENDT0RFX1NXRURFTiwKKyAgICBDQ09ERV9TV0lUWkVSTEFORCwKKyAgICBDQ09ERV9TWVJJQSwKKyAgICBDQ09ERV9UQUlXQU4sCisgICAgQ0NPREVfVEhBSUxBTkQsCisgICAgQ0NPREVfVFJJTklEQURfVE9CQUdPLAorICAgIENDT0RFX1RVTklTSUEsCisgICAgQ0NPREVfVFVSS0VZLAorICAgIENDT0RFX1VLLAorICAgIENDT0RFX1VLUkFJTkUsCisgICAgQ0NPREVfVU5JVEVEX0FSQUJfRU1JUkFURVMsCisgICAgQ0NPREVfVU5JVEVEX1NUQVRFUywKKyAgICBDQ09ERV9VUlVHVUFZLAorICAgIENDT0RFX1VaQkVLSVNUQU4sCisgICAgQ0NPREVfVkVORVpVRUxBLAorICAgIENDT0RFX1ZJRVROQU0sCisgICAgQ0NPREVfWUVNRU4sCisgICAgQ0NPREVfWklNQkFCV0UsCisgICAgQ0NPREVfSkFQQU5fVzUyX1c1MywKKyAgICBDQ09ERV9NQVgKK30gQ09VTlRSWV9DT0RFOworCit0eXBlZGVmIHN0cnVjdCB0YWdTQ291bnRyeVRhYmxlCit7CisgICAgQllURSAgICBieUNoYW5uZWxDb3VudHJ5Q29kZTsgICAgICAgICAgICAgLyogVGhlIGNvdW50cnkgY29kZSAgICAgICAgICovCisgICAgQ0hBUiAgICBjaENvdW50cnlDb2RlWzJdOworICAgIEJZVEUgICAgYkNoYW5uZWxJZHhMaXN0W0NCX01BWF9DSEFOTkVMXTsgIC8qIEF2YWlsYWJsZSBjaGFubmVscyBJbmRleCAqLworICAgIEJZVEUgICAgYnlQb3dlcltDQl9NQVhfQ0hBTk5FTF07Cit9ICAgU0NvdW50cnlUYWJsZSwgREVGKiBQU0NvdW50cnlUYWJsZTsKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBDbGFzc2VzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBWYXJpYWJsZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KK2V4dGVybiBTQ291bnRyeVRhYmxlIENoYW5uZWxSdWxlVGFiW0NDT0RFX01BWCsxXTsKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNpZmRlZiBfX2NwbHVzcGx1cworZXh0ZXJuICJDIiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEFzc3VtZSBDIGRlY2xhcmF0aW9ucyBmb3IgQysrICovCisjZW5kaWYgLyogX19jcGx1c3BsdXMgKi8KKworCisjaWZkZWYgX19jcGx1c3BsdXMKK30gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBFbmQgb2YgZXh0ZXJuICJDIiB7ICovCisjZW5kaWYgLyogX19jcGx1c3BsdXMgKi8KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBGdW5jdGlvbiBwcm90b3R5cGUKKyAq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dGVbTUFYX1JBVEVdID0KK3sweDAyLCAweDA0LCAweDBCLCAweDE2LCAweDBDLCAweDEyLCAweDE4LCAweDI0LCAweDMwLCAweDQ4LCAweDYwLCAweDZDfTsKKworI2RlZmluZSBBVVRPUkFURV9UWE9LX0NOVCAgICAgICAweDA0MDAKKyNkZWZpbmUgQVVUT1JBVEVfVFhGQUlMX0NOVCAgICAgMHgwMDY0CisjZGVmaW5lIEFVVE9SQVRFX1RJTUVPVVQgICAgICAgIDEwCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBTdGF0aWMgRnVuY3Rpb25zICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKK1ZPSUQgc192UmVzZXRDb3VudGVyICgKKyAgICBJTiBQS25vd25Ob2RlREIgcHNOb2RlREJUYWJsZQorICAgICk7CisKKworCitWT0lECitzX3ZSZXNldENvdW50ZXIgKAorICAgIElOIFBLbm93bk5vZGVEQiBwc05vZGVEQlRhYmxlCisgICAgKQoreworICAgIEJZVEUgICAgICAgICAgICBpaTsKKworICAgIC8vIGNsZWFyIHN0YXRpc3RpYyBjb3VudGVyIGZvciBhdXRvX3JhdGUKKyAgICBmb3IoaWk9MDtpaTw9TUFYX1JBVEU7aWkrKykgeworICAgICAgICBwc05vZGVEQlRhYmxlLT51VHhPa1tpaV0gPSAwOworICAgICAgICBwc05vZGVEQlRhYmxlLT51VHhGYWlsW2lpXSA9IDA7CisgICAgfQorfQorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgRnVuY3Rpb25zICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIEdldCBSYXRlSWR4IGZyb20gdGhlIHZhbHVlIGluIFN1cHBSYXRlcyBJRSBvciBFeHRTdXBwUmF0ZXMgSUUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBCWVRFICAgIC0gUmF0ZSB2YWx1ZSBpbiBTdXBwUmF0ZXMgSUUgb3IgRXh0U3VwcFJhdGVzIElFCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBSYXRlSWR4CisgKgorLSovCitCWVRFCitEQVRBUkFURWJ5R2V0UmF0ZUlkeCAoCisgICAgSU4gQllURSBieVJhdGUKKyAgICApCit7CisgICAgQllURSAgICBpaTsKKworICAgIC8vRXJhc2UgYmFzaWNSYXRlIGZsYWcuCisgICAgYnlSYXRlID0gYnlSYXRlICYgMHg3RjsvLzAxMTEgMTExMQorCisgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX1JBVEU7IGlpICsrKSB7CisgICAgICAgIGlmIChhY2J5SUVSYXRlW2lpXSA9PSBieVJhdGUpCisgICAgICAgICAgICByZXR1cm4gaWk7CisgICAgfQorICAgIHJldHVybiAwOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgICAgUmF0ZSBmYWxsYmFjayBBbGdvcml0aG0gSW1wbGVtZW50YWlvbgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIGFkYXB0ZXIKKyAqICAgICAgcHNOb2RlREJUYWJsZSAgIC0gUG9pbnRlciB0byBOb2RlIERhdGEgQmFzZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKy0qLworI2RlZmluZSBBVVRPUkFURV9UWENOVF9USFJFU0hPTEQgICAgICAgIDIwCisjZGVmaW5lIEFVVE9SQVRFX0lOQ19USFJFU0hPTEQgICAgICAgICAgMzAKKworCisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIEdldCBSYXRlSWR4IGZyb20gdGhlIHZhbHVlIGluIFN1cHBSYXRlcyBJRSBvciBFeHRTdXBwUmF0ZXMgSUUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBCWVRFICAgIC0gUmF0ZSB2YWx1ZSBpbiBTdXBwUmF0ZXMgSUUgb3IgRXh0U3VwcFJhdGVzIElFCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBSYXRlSWR4CisgKgorLSovCitXT1JECit3R2V0UmF0ZUlkeCgKKyAgICBJTiBCWVRFIGJ5UmF0ZQorICAgICkKK3sKKyAgICBXT1JEICAgIGlpOworCisgICAgLy9FcmFzZSBiYXNpY1JhdGUgZmxhZy4KKyAgICBieVJhdGUgPSBieVJhdGUgJiAweDdGOy8vMDExMSAxMTExCisKKyAgICBmb3IgKGlpID0gMDsgaWkgPCBNQVhfUkFURTsgaWkgKyspIHsKKyAgICAgICAgaWYgKGFjYnlJRVJhdGVbaWldID09IGJ5UmF0ZSkKKyAgICAgICAgICAgIHJldHVybiBpaTsKKyAgICB9CisgICAgcmV0dXJuIDA7Cit9CisKKy8qKworICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBQYXJzaW5nIHRoZSBoaWdoZXN0IGJhc2ljICYgc3VwcG9ydCByYXRlIGluIHJhdGUgZmllbGQgb2YgZnJhbWUuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgYWRhcHRlcgorICogICAgICBwSXRlbVJhdGVzICAgICAgLSBQb2ludGVyIHRvIFJhdGUgZmllbGQgZGVmaW5lZCBpbiA4MDIuMTEgc3BlYy4KKyAqICAgICAgcEl0ZW1FeHRSYXRlcyAgICAgIC0gUG9pbnRlciB0byBFeHRlbmRlZCBSYXRlIGZpZWxkIGRlZmluZWQgaW4gODAyLjExIHNwZWMuCisgKiAgT3V0OgorIC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lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorLSovCisjZGVmaW5lIEFVVE9SQVRFX1RYQ05UX1RIUkVTSE9MRCAgICAgICAgMjAKKyNkZWZpbmUgQVVUT1JBVEVfSU5DX1RIUkVTSE9MRCAgICAgICAgICAzMAorCitWT0lECitSQVRFdlR4UmF0ZUZhbGxCYWNrICgKKyAgICBJTiBQVk9JRCBwRGV2aWNlSGFuZGxlciwKKyAgICBJTiBQS25vd25Ob2RlREIgcHNOb2RlREJUYWJsZQorICAgICkKK3sKK1BTRGV2aWNlICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKSBwRGV2aWNlSGFuZGxlcjsKK1dPUkQgICAgICAgICAgICB3SWR4RG93blJhdGUgPSAwOworVUlOVCAgICAgICAgICAgIGlpOworLy9EV09SRCAgICAgICAgICAgZHdSYXRlVGFibGVbTUFYX1JBVEVdICA9IHsxLCAgIDIsICAgNSwgICAxMSwgIDYsICAgIDksICAgIDEyLCAgIDE4LCAgMjQsICAzNiwgIDQ4LCAgNTR9OworQk9PTCAgICAgICAgICAgIGJBdXRvUmF0ZVtNQVhfUkFURV0gICAgPSB7VFJVRSxUUlVFLFRSVUUsVFJVRSxGQUxTRSxGQUxTRSxUUlVFLFRSVUUsVFJVRSxUUlVFLFRSVUUsVFJVRX07CitEV09SRCAgICAgICAgICAgZHdUaHJvdWdocHV0VGJsW01BWF9SQVRFXSA9IHsxMCwgMjAsIDU1LCAxMTAsIDYwLCA5MCwgMTIwLCAxODAsIDI0MCwgMzYwLCA0ODAsIDU0MH07CitEV09SRCAgICAgICAgICAgZHdUaHJvdWdocHV0ID0gMDsKK1dPUkQgICAgICAgICAgICB3SWR4VXBSYXRlID0gMDsKK0RXT1JEICAgICAgICAgICBkd1R4RGlmZiA9IDA7CisKKyAgICBpZiAocERldmljZS0+cE1nbXQtPmVTY2FuU3RhdGUgIT0gV01BQ19OT19TQ0FOTklORykgeworICAgICAgICAvLyBEb24ndCBkbyBGYWxsYmFjayB3aGVuIHNjYW5uaW5nIENoYW5uZWwKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworICAgIHBzTm9kZURCVGFibGUtPnVUaW1lQ291bnQgKys7CisKKyAgICBpZiAocHNOb2RlREJUYWJsZS0+dVR4RmFpbFtNQVhfUkFURV0gPiBwc05vZGVEQlRhYmxlLT51VHhPa1tNQVhfUkFURV0pCisgICAgICAgIGR3VHhEaWZmID0gcHNOb2RlREJUYWJsZS0+dVR4RmFpbFtNQVhfUkFURV0gLSBwc05vZGVEQlRhYmxlLT51VHhPa1tNQVhfUkFURV07CisKKyAgICBpZiAoKHBzTm9kZURCVGFibGUtPnVUeE9rW01BWF9SQVRFXSA8IEFVVE9SQVRFX1RYT0tfQ05UKSAmJgorICAgICAgICAoZHdUeERpZmYgPCBBVVRPUkFURV9UWEZBSUxfQ05UKSAmJgorICAgICAgICAocHNOb2RlREJUYWJsZS0+dVRpbWVDb3VudCA8IEFVVE9SQVRFX1RJTUVPVVQpKSB7CisgICAgICAgIHJldHVybjsKKyAgICB9CisKKyAgICBpZiAocHNOb2RlREJUYWJsZS0+dVRpbWVDb3VudCA+PSBBVVRPUkFURV9USU1FT1VUKSB7CisgICAgICAgIHBzTm9kZURCVGFibGUtPnVUaW1lQ291bnQgPSAwOworICAgIH0KKworCisgICAgZm9yKGlpPTA7aWk8TUFYX1JBVEU7aWkrKykgeworICAgICAgICBpZiAocHNOb2RlREJUYWJsZS0+d1N1cHBSYXRlICYgKDB4MDAwMTw8aWkpKSB7CisgICAgICAgICAgICBpZiAoYkF1dG9SYXRlW2lpXSA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgd0lkeFVwUmF0ZSA9IChXT1JEKSBpaTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGJBdXRvUmF0ZVtpaV0gPSBGQUxTRTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGZvcihpaT0wO2lpPD1wc05vZGVEQlRhYmxlLT53VHhEYXRhUmF0ZTtpaSsrKSB7CisgICAgICAgIGlmICggKHBzTm9kZURCVGFibGUtPnVUeE9rW2lpXSAhPSAwKSB8fAorICAgICAgICAgICAgIChwc05vZGVEQlRhYmxlLT51VHhGYWlsW2lpXSAhPSAwKSApIHsKKyAgICAgICAgICAgIGR3VGhyb3VnaHB1dFRibFtpaV0gKj0gcHNOb2RlREJUYWJsZS0+dVR4T2tbaWldOworICAgICAgICAgICAgaWYgKGlpIDwgUkFURV8xMU0pIHsKKyAgICAgICAgICAgICAgICBwc05vZGVEQlRhYmxlLT51VHhGYWlsW2lpXSAqPSA0OworICAgICAgICAgICAgfQorICAgICAgICAgICAgZHdUaHJvdWdocHV0VGJsW2lpXSAvPSAocHNOb2RlREJUYWJsZS0+dVR4T2tbaWldICsgcHNOb2RlREJUYWJsZS0+dVR4RmFpbFtpaV0pOworICAgICAgICB9CisvLyAgICAgICAgREJHX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJSYXRlICVkLE9rOiAlZCwgRmFpbDolZCwgVGhyb3VnaHB1dDolZFxuIiwKKy8vICAgICAgICAgICAgICAgICAgICAgICBpaSwgcHNOb2RlREJUYWJsZS0+dVR4T2tbaWldLCBwc05vZGVEQlRhYmxlLT51VHhGYWlsW2lpXSwgZHdUaHJvdWdocHV0VGJsW2lpXSk7CisgICAgfQorICAgIGR3VGhyb3VnaHB1dCA9IGR3VGhyb3VnaHB1dFRibFtwc05vZGVEQlRhYmxlLT53VHhEYXRhUmF0ZV07CisKKyAgICB3SWR4RG93blJhdGUgPSBwc05vZGVEQlRhYmxlLT53VHhEYXRhUmF0ZTsKKyAgICBmb3IoaWkgPSBwc05vZGVEQlRhYmxlLT53VHhEYXRhUmF0ZTsgaWkgPiAwOykgeworICAgICAgICBpaS0tOworICAgICAgICBpZiAoIChkd1Rocm91Z2hwdXRUYmxbaWldID4gZHdUaHJvdWdocHV0KSAmJgorICAgICAgICAgICAgIChiQXV0b1JhdGVbaWldPT1UUlVFKSApIHsKKyAgICAgICAgICAgIGR3VGhyb3VnaHB1dCA9IGR3VGhyb3VnaHB1dFRibFtpaV07CisgICAgICAgICAgICB3SWR4RG93blJhdGUgPSAoV09SRCkgaWk7CisgICAgICAgIH0KKyAgICB9CisgICAgcHNOb2RlREJUYWJsZS0+d1R4RGF0YVJhdGUgPSB3SWR4RG93blJhdGU7CisgICAgaWYgKHBzTm9kZURCVGFibGUtPnVUeE9rW01BWF9SQVRFXSkgeworICAgICAgICBpZiAocHNOb2RlREJUYWJsZS0+dVR4T2tbTUFYX1JBVEVdID4KKyAgICAgICAgICAgKHBzTm9kZURCVGFibGUtPnVUeEZhaWxbTUFYX1JBVEVdICogNCkgKSB7CisgICAgICAgICAgICBwc05vZGVEQlRhYmxlLT53VHhEYXRhUmF0ZSA9IHdJZHhVcFJhdGU7CisgICAgICAgIH0KKyAgICB9ZWxzZSB7IC8vIGFkaG9jLCBpZiB1VHhPayA9MCAmIHVUeEZhaWwgPSAwCisgICAgICAgIGlmIChwc05vZGVEQlRhYmxlLT51VHhGYWlsW01BWF9SQVRFXSA9PSAwKQorICAgICAgICAgICAgcHNOb2RlREJUYWJsZS0+d1R4RGF0YVJhdGUgPSB3SWR4VXBSYXRlOworICAgIH0KKy8vMjAwOC01LTggPGFkZD4gYnkgY2hlc3RlcgorVHhSYXRlX2l3Y29uZmlnPXBzTm9kZURCVGFibGUtPndUeERhdGFSYXRlOworICAgIHNfdlJlc2V0Q291bnRlcihwc05vZGVEQlRhYmxlKTsKKy8vICAgIERCR19QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iUmF0ZTogJWQsIFU6JWQsIEQ6JWRcbiIsIHBzTm9kZURCVGFibGUtPndUeERhdGFSYXRlLCB3SWR4VXBSYXRlLCB3SWR4RG93blJhdGUpOworCisgICAgcmV0dXJuOworCit9CisKKy8qKworICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgVGhpcyByb3V0aW5lIGlzIHVzZWQgdG8gYX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0aGVyLmgiCisjZW5kaWYKKy8vICNpZmRlZiBQUklWQVRFX09CSgorLy8jaWYgIWRlZmluZWQoX19ERVZJQ0VfTU9EVUxFX0gpCisvLyNpbmNsdWRlICJkZXZpY2VfbW9kdWxlLmgiCisvLyNlbmRpZgorCisKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IERlZmluaXRpb25zIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIEJfT1dORURfQllfQ0hJUCAgICAgMSAgICAgICAgICAgLy8KKyNkZWZpbmUgQl9PV05FRF9CWV9IT1NUICAgICAwICAgICAgICAgICAvLworCisvLworLy8gQml0cyBpbiB0aGUgUlNSIHJlZ2lzdGVyCisvLworI2RlZmluZSBSU1JfQUREUkJST0FEICAgICAgIDB4ODAgICAgICAgIC8vIDEwMDAgMDAwMAorI2RlZmluZSBSU1JfQUREUk1VTFRJICAgICAgIDB4NDAgICAgICAgIC8vIDAxMDAgMDAwMAorI2RlZmluZSBSU1JfQUREUlVOSSAgICAgICAgIDB4MDAgICAgICAgIC8vIDAwMDAgMDAwMAorI2RlZmluZSBSU1JfSVZMRFRZUCAgICAgICAgIDB4MjAgICAgICAgIC8vIDAwMTAgMDAwMCAsIGludmFsaWQgcGFja2V0IHR5cGUKKyNkZWZpbmUgUlNSX0lWTERMRU4gICAgICAgICAweDEwICAgICAgICAvLyAwMDAxIDAwMDAgLCBpbnZhbGlkIGxlbiAoPiAyMzEyIGJ5dGUpCisjZGVmaW5lIFJTUl9CU1NJRE9LICAgICAgICAgMHgwOCAgICAgICAgLy8gMDAwMCAxMDAwCisjZGVmaW5lIFJTUl9DUkNPSyAgICAgICAgICAgMHgwNCAgICAgICAgLy8gMDAwMCAwMTAwCisjZGVmaW5lIFJTUl9CQ05TU0lET0sgICAgICAgMHgwMiAgICAgICAgLy8gMDAwMCAwMDEwCisjZGVmaW5lIFJTUl9BRERST0sgICAgICAgICAgMHgwMSAgICAgICA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Rlc2NyaXB0b3IKKyNkZWZpbmUgQ0JfTUFYX1RYX0RFU0MgICAgICA2NCAgICAgICAgICAvLyBtYXggIyBvZiBkZXNjcmlwdG9yCisjZGVmaW5lIENCX01JTl9UWF9ERVNDICAgICAgMTYgICAgICAgICAgLy8gbWluICMgb2YgdHggZGVzY3JpcHRvcgorCisjZGVmaW5lIENCX01BWF9SRUNFSVZFRF9QQUNLRVRTICAgICAxNiAgLy8gbWF4ICMgb2YgcmVjZWl2ZWQgcGFja2V0cyBhdCBvbmUgdGltZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxpbWl0IG91ciByZWNlaXZlIHJvdXRpbmUgdG8gaW5kaWNhdGluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgbWFueSBhdCBhIHRpbWUgZm9yIDIgcmVhc29uczoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxLiBkcml2ZXIgZmxvdyBjb250cm9sIHRvIHByb3RvY29sIGxheWVyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMi4gbGltaXQgdGhlIHRpbWUgdXNlZCBpbiBJU1Igcm91dGluZQorCisjZGVmaW5lIENCX0VYVFJBX1JEX05VTSAgICAgMzIgICAgICAgICAgLy8gZGVmYXVsdCAjIG9mIEV4dHJhIFJECisjZGVmaW5lIENCX1JEX05VTSAgICAgICAgICAgMzIgICAgICAgICAgLy8gZGVmYXVsdCAjIG9mIFJECisjZGVmaW5lIENCX1REX05VTSAgICAgICAgICAgMzIgICAgICAgICAgLy8gZGVmYXVsdCAjIG9mIFRECisKKworLy8gbWF4IG51bWJlciBvZiBwaHlzaWNhbCBzZWdtZW50cworLy8gaW4gYSBzaW5nbGUgTkRJUyBwYWNrZXQuIEFib3ZlIHRoaXMgdGhyZXNob2xkLCB0aGUgcGFja2V0CisvLyBpcyBjb3BpZWQgaW50byBhIHNpbm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RpbGUgICAgV09SRCAgICB3T3duZXJfVHh0aW1lOworLy8gICAgdm9sYXRpbGUgICAgV09SRCAgICBmMTVUeHRpbWUgOiAxNTsKKy8vICAgIHZvbGF0aWxlICAgIFdPUkQgICAgZjFPd25lcjoxOworfSBfX2F0dHJpYnV0ZV9fICgoX19wYWNrZWRfXykpCitTVERFUzA7CisqLworCit0eXBlZGVmIHN0cnVjdCB0YWdUREVTMCB7CisgICAgdm9sYXRpbGUgICAgQllURSAgICBieVRTUjA7CisgICAgdm9sYXRpbGUgICAgQllURSAgICBieVRTUjE7CisJdW5pb24geworCQl2b2xhdGlsZSBVMTYgICAgZjE1VHh0aW1lOworCQlzdHJ1Y3QgeworICAgICAgICAgICAgdm9sYXRpbGUgVTggZjhSZXNlcnZlZDE7CisJCQl2b2xhdGlsZSBVOCBmMU93bmVyOjE7CisJCQl2b2xhdGlsZSBVOCBmN1Jlc2VydmVkOjc7CisJCX0gX19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKTsKKwl9IF9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSk7Cit9IF9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NUREVTMCwgUFNUREVTMDsKKworI2Vsc2UKKwordHlwZWRlZiBzdHJ1Y3QgdGFnVERFUzAgeworICAgIHZvbGF0aWxlICAgIEJZVEUgICAgYnlUU1IwOworICAgIHZvbGF0aWxlICAgIEJZVEUgICAgYnlUU1IxOworICAgIHZvbGF0aWxlICAgIFdPUkQgICAgZjE1VHh0aW1lIDogMTU7CisgICAgdm9sYXRpbGUgICAgV09SRCAgICBmMU93bmVyOjE7Cit9IF9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NUREVTMDsKKworI2VuZGlmCisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnVERFUzEgeworICAgIHZvbGF0aWxlICAgIFdPUkQgICAgd1JlcUNvdW50OworICAgIHZvbGF0aWxlICAgIEJZVEUgICAgYnlUQ1I7CisgICAgdm9sYXRpbGUgICAgQllURSAgICBieVJlc2VydmVkOworfSBfX2F0dHJpYnV0ZV9fICgoX19wYWNrZWRfXykpCitTVERFUzE7CisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnREVWSUNFX1REX0lORk97CisgICAgc3RydWN0IHNrX2J1ZmYqICAgICBza2I7CisgICAgUEJZVEUgICAgICAgICAgICAgICBidWY7CisgICAgZG1hX2FkZHJfdCAgICAgICAgICBza2JfZG1hOworICAgIGRtYV9hZGRyX3QgICAgICAgICAgYnVmX2RtYTsKKyAgICBkbWFfYWRkcl90ICAgICAgICAgIGN1cnJfZGVzYzsKKyAgICBEV09SRCAgICAgICAgICAgICAgIGR3UmVxQ291bnQ7CisgICAgRFdPUkQgICAgICAgICAgICAgICBkd0hlYWRlckxlbmd0aDsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5RmxhZ3M7Cit9IERFVklDRV9URF9JTkZPLCAgICAqUERFVklDRV9URF9JTkZPOworCisvKgorc3RhdGljIGlubGluZSBQREVWSUNFX1REX0lORk8gYWxsb2NfdGRfaW5mbyh2b2lkKSB7CisgICAgUERFVklDRV9URF9JTkZPICBwdHI7CisgICAgaWYgKChwdHIgPSBrbWFsbG9jKHNpemVvZihERVZJQ0VfVERfSU5GTyksR0ZQX0FUT01JQykpPT1OVUxMKQorICAgICAgICByZXR1cm4gTlVMTDsKKyAgICBlbHNlIHsKKyAgICAgICAgbWVtc2V0KHB0ciwwLHNpemVvZihERVZJQ0VfVERfSU5GTykpOworICAgICAgICByZXR1cm4gcHRyOworICAgIH0KK30KKyovCisKKy8vCisvLyB0cmFuc21pdCBkZXNjcmlwdG9yCisvLwordHlwZWRlZiBzdHJ1Y3QgdGFnU1R4RGVzYyB7CisgICAgdm9sYXRpbGUgICAgU1RERVMwICBtX3RkMFREMDsKKyAgICB2b2xhdGlsZSAgICBTVERFUzEgIG1fdGQxVEQxOworICAgIHZvbGF0aWxlICAgIFUzMiAgICBidWZmX2FkZHI7CisgICA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KiAgICAgIFBDU1R4U3luY0Rlc2M7CisKKworLy8KKy8vIFJzdlRpbWUgYnVmZmVyIGhlYWRlcgorLy8KK3R5cGVkZWYgc3RydWN0IHRhZ1NScnZUaW1lX2dSVFMgeworICAgIFdPUkQgICAgICAgIHdSVFNUeFJydlRpbWVfYmE7CisgICAgV09SRCAgICAgICAgd1JUU1R4UnJ2VGltZV9hYTsKKyAgICBXT1JEICAgICAgICB3UlRTVHhScnZUaW1lX2JiOworICAgIFdPUkQgICAgICAgIHdSZXNlcnZlZDsKKyAgICBXT1JEICAgICAgICB3VHhScnZUaW1lX2I7CisgICAgV09SRCAgICAgICAgd1R4UnJ2VGltZV9hOworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NScnZUaW1lX2dSVFMsIERFRiogUFNScnZUaW1lX2dSVFM7Cit0eXBlZGVmIGNvbnN0IFNScnZUaW1lX2dSVFMgREVGKiAgICAgUENTUnJ2VGltZV9nUlRTOworCit0eXBlZGVmIHN0cnVjdCB0YWdTUnJ2VGltZV9nQ1RTIHsKKyAgICBXT1JEICAgICAgICB3Q1RTVHhScnZUaW1lX2JhOworICAgIFdPUkQgICAgICAgIHdSZXNlcnZlZDsKKyAgICBXT1JEICAgICAgICB3VHhScnZUaW1lX2I7CisgICAgV09SRCAgICAgICAgd1R4UnJ2VGltZV9hOworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NScnZUaW1lX2dDVFMsIERFRiogUFNScnZUaW1lX2dDVFM7Cit0eXBlZGVmIGNvbnN0IFNScnZUaW1lX2dDVFMgREVGKiAgICAgUENTUnJ2VGltZV9nQ1RTOworCit0eXBlZGVmIHN0cnVjdCB0YWdTUnJ2VGltZV9hYiB7CisgICAgV09SRCAgICAgICAgd1JUU1R4UnJ2VGltZTsKKyAgICBXT1JEICAgICAgICB3VHhScnZUaW1lOworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NScnZUaW1lX2FiLCBERUYqIFB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gICAgICB3RHVyYXRpb25fYmE7CisgICAgV09SRCAgICAgICAgd0R1cmF0aW9uX2FhOworICAgIFdPUkQgICAgICAgIHdEdXJhdGlvbl9iYjsKKyAgICBXT1JEICAgICAgICB3UmVzZXJ2ZWQ7CisgICAgU1JUU0RhdGEgICAgRGF0YTsKK31fX2F0dHJpYnV0ZV9fICgoX19wYWNrZWRfXykpCitTUlRTX2csIERFRiogUFNSVFNfZzsKK3R5cGVkZWYgY29uc3QgU1JUU19nIERFRiogICAgIFBDU1JUU19nOworCisKK3R5cGVkZWYgc3RydWN0IHRhZ1NSVFNfZ19GQiB7CisgICAgQllURSAgICAgICAgYnlTaWduYWxGaWVsZF9iOworICAgIEJZVEUgICAgICAgIGJ5U2VydmljZUZpZWxkX2I7CisgICAgV09SRCAgICAgICAgd1RyYW5zbWl0TGVuZ3RoX2I7CisgICAgQllURSAgICAgICAgYnlTaWduYWxGaWVsZF9hOworICAgIEJZVEUgICAgICAgIGJ5U2VydmljZUZpZWxkX2E7CisgICAgV09SRCAgICAgICAgd1RyYW5zbWl0TGVuZ3RoX2E7CisgICAgV09SRCAgICAgICAgd0R1cmF0aW9uX2JhOworICAgIFdPUkQgICAgICAgIHdEdXJhdGlvbl9hYTsKKyAgICBXT1JEICAgICAgICB3RHVyYXRpb25fYmI7CisgICAgV09SRCAgICAgICAgd1Jlc2VydmVkOworICAgIFdPUkQgICAgICAgIHdSVFNEdXJhdGlvbl9iYV9mMDsKKyAgICBXT1JEICAgICAgICB3UlRTRHVyYXRpb25fYWFfZjA7CisgICAgV09SRCAgICAgICAgd1JUU0R1cmF0aW9uX2JhX2YxOworICAgIFdPUkQgICAgICAgIHdSVFNEdXJhdGlvbl9hYV9mMTsKKyAgICBTUlRTRGF0YSAgICBEYXRhOworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NSVFNfZ19GQiwgREVGKiBQU1JUU19nX0ZCOwordHlwZWRlZiBjb25zdCBTUlRTX2dfRkIgREVGKiAgICAgUENTUlRTX2dfRkI7CisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnU1JUU19hYiB7CisgICAgQllURSAgICAgICAgYnlTaWduYWxGaWVsZDsKKyAgICBCWVRFICAgICAgICBieVNlcnZpY2VGaWVsZDsKKyAgICBXT1JEICAgICAgICB3VHJhbnNtaXRMZW5ndGg7CisgICAgV09SRCAgICAgICAgd0R1cmF0aW9uOworICAgIFdPUkQgICAgICAgIHdSZXNlcnZlZDsKKyAgICBTUlRTRGF0YSAgICBEYXRhOworfV9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSkKK1NSVFNfYWIsIERFRiogUFNSVFNfYWI7Cit0eXBlZGVmIGNvbnN0IFNSVFNfYWIgREVGKiAgICAgUENTUlRTX2FiOworCisKK3R5cGVkZWYgc3RydWN0IHRhZ1NSVFNfYV9GQiB7CisgICAgQllURSAgICAgICAgYnlTaWduYWxGaWVsZDsKKyAgICBCWVRFICAgICAgICBieVNlcnZpY2VGaWVsZDsKKyAgICBXT1JEICAgICAgICB3VHJhbnNtaXRMZW5ndGg7CisgICAgV09SRCAgICAgICAgd0R1cmF0aW9uOworICAgIFdPUkQgICAgICAgIHdSZXNlcnZlZDsKKyAgICBXT1JEICAgICAgICB3UlRTRHVyYXRpb25fZjA7CisgICAgV09SRCAgICAgICAgd1JUU0R1cmF0aW9uX2YxOworICAgIFNSVFNEYXRhICAgIERhdGE7Cit9X19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKQorU1JUU19hX0ZCLCBERUYqIFBTUlRTX2FfRkI7Cit0eXBlZGVmIGNvbnN0IFNSVFNfYV9GQiBERUYqICAgICBQQ1NSVFNfYV9GQjsKKworCisvLworLy8gQ1RTIGJ1ZmZlciBoZWFkZXIKKy8vCit0eXBlZGVmIHN0cnVjdCB0YWdTQ1RTRGF0YSB7CisgICAgV09SRCAgICB3RnJhbWVDb250cm9sOworICAgIFdPUkQgICAgd0R1cmF0aW9uSUQ7CisgICAgQllURSAgICBhYnlSQVt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Tk9ORSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVFhfV0VQX09URiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFRYX1dFUF9TVyAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBUWF9XRVBfU1dPVFAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVFhfV0VQX09UUFNXICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFRYX1dFUF9TVzIzMiAgICAgICAgICAgICAgICAgICAgNQorCisjZGVmaW5lIEtFWVNFTF9XRVA0MCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBLRVlTRUxfV0VQMTA0ICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgS0VZU0VMX1RLSVAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEtFWVNFTF9DQ01QICAgICAgICAgICAgICAgICAgICAgMworCisKKworI2RlZmluZSBBVVRPX0ZCX05PTkUgICAgICAgICAgICAwCisjZGVmaW5lIEFVVE9fRkJfMCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQVVUT19GQl8xICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIEZCX1JBVEUwICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRkJfUkFURTEgICAgICAgICAgICAgICAgMQorCisvLyBBbnRlbm5hIE1vZGUKKyNkZWZpbmUgQU5UX0EgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBTlRfQiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFOVF9ESVZFUlNJVFkgICAgICAgICAgIDIKKyNkZWZpbmUgQU5UX1JYRF9UWEEgICAgICAgICAgICAgMworI2RlZmluZSBBTlRfUlhEX1RYQiAgICAgICAgICAgICA0CisjZGVmaW5lIEFOVF9VTktOT1dOICAgICAgICAgICAgIDB4RkYKKworI2RlZmluZSBNQVhDSEVDS0hBTkdDTlQgICAgICAgICA0CisKKyNkZWZpbmUgQkJfVk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lbWJseQordHlwZWRlZiBzdHJ1Y3QgdGFnU0RlRnJhZ0NvbnRyb2xCbG9jaworeworICAgIFdPUkQgICAgICAgICAgICB3U2VxdWVuY2U7CisgICAgV09SRCAgICAgICAgICAgIHdGcmFnTnVtOworICAgIEJZVEUgICAgICAgICAgICBhYnlBZGRyMltVX0VUSEVSX0FERFJfTEVOXTsKKwlVSU5UICAgICAgICAgICAgdUxpZmV0aW1lOworICAgIHN0cnVjdCBza19idWZmKiBza2I7CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICByZWZfc2tfYnVmZiAgICAgcmVmX3NrYjsKKyNlbmRpZgorICAgIFBCWVRFICAgICAgICAgICBwYnlSeEJ1ZmZlcjsKKyAgICBVSU5UICAgICAgICAgICAgY2JGcmFtZUxlbmd0aDsKKyAgICBCT09MICAgICAgICAgICAgYkluVXNlOworfSBTRGVGcmFnQ29udHJvbEJsb2NrLCBERUYqIFBTRGVGcmFnQ29udHJvbEJsb2NrOworCisKKworCisvL2ZsYWdzIGZvciBvcHRpb25zCisjZGVmaW5lICAgICBERVZJQ0VfRkxBR1NfSVBfQUxJR04gICAgICAgIDB4MDAwMDAwMDFVTAorI2RlZmluZSAgICAgREVWSUNFX0ZMQUdTX1BSRUFNQkxFX1RZUEUgICAweDAwMDAwMDAyVUwKKyNkZWZpbmUgICAgIERFVklDRV9GTEFHU19PUF9NT0RFICAgICAgICAgMHgwMDAwMDAwNFVMCisjZGVmaW5lICAgICBERVZJQ0VfRkxBR1NfUFNfTU9ERSAgICAgICAgIDB4MDAwMDAwMDhVTAorI2RlZmluZQkJREVWSUNFX0ZMQUdTXzgwMjExaF9NT0RFCSAweDAwMDAwMDEwVUwKKyNkZWZpbmUJCURFVklDRV9GTEFHU19EaXZlcnNpdHlBTlQJIDB4MDAwMDAwMjBVTAorCisvL2ZsYWdzIGZvciBkcml2ZXIgc3RhdHVzCisjZGVmaW5lICAgICBERVZJQ0VfRkxBR1NfT1BFTkVEICAgICAgICAgIDB4MDAwM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hZCx0YWlsOworCVBTUnhNZ210UGFja2V0CVFbTlVNXTsKK30gUnhNYW5hZ2VtZW50UXVldWUsKlBTUnhNYW5hZ2VtZW50UXVldWU7CisKKworCisvL1BMSUNFX0RFQlVHPC0KKworCit0eXBlZGVmIHN0cnVjdCBfX2RldmljZV9vcHQgeworICAgIGludCAgICAgICAgIG5SeERlc2NzMDsgICAgICAvL051bWJlciBvZiBSWCBkZXNjcmlwdG9yczAKKyAgICBpbnQgICAgICAgICBuUnhEZXNjczE7ICAgICAgLy9OdW1iZXIgb2YgUlggZGVzY3JpcHRvcnMxCisgICAgaW50ICAgICAgICAgblR4RGVzY3NbMl07ICAgIC8vTnVtYmVyIG9mIFRYIGRlc2NyaXB0b3JzIDAsIDEKKyAgICBpbnQgICAgICAgICBpbnRfd29ya3M7ICAgICAgLy9pbnRlcnJ1cHQgbGltaXRzCisgICAgaW50ICAgICAgICAgcnRzX3RocmVzaDsgICAgIC8vcnRzIHRocmVzaG9sZAorICAgIGludCAgICAgICAgIGZyYWdfdGhyZXNoOworICAgIGludCAgICAgICAgIGRhdGFfcmF0ZTsKKyAgICBpbnQgICAgICAgICBjaGFubmVsX251bTsKKyAgICBpbnQgICAgICAgICBzaG9ydF9yZXRyeTsKKyAgICBpbnQgICAgICAgICBsb25nX3JldHJ5OworICAgIGludCAgICAgICAgIGJicF90eXBlOworICAgIFUzMiAgICAgICAgIGZsYWdzOworfSBPUFRJT05TLCAqUE9QVElPTlM7CisKKwordHlwZWRlZiBzdHJ1Y3QgX19kZXZpY2VfaW5mbyB7CisgICAgc3RydWN0IF9fZGV2aWNlX2luZm8qICAgICAgICBuZXh0OworICAgIHN0cnVjdCBfX2RldmljZV9pbmZvKiAgICAgICAgcHJldjsKKworICAgIHN0cnVjdCBwY2lfZGV2KiAgICAgICAgICAgICBwY2lkOworCisjaWYgQ09ORklHX1BNCisgICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgIHBjaV9zdGF0ZVsxNl07CisjZW5kaWYKKworLy8gbmV0ZGV2CisgICAgc3RydWN0IG5ldF9kZXZpY2UqICAgICAgICAgIGRldjsKKyAgICBzdHJ1Y3QgbmV0X2RldmljZSogICAgICAgICAgbmV4dF9tb2R1bGU7CisgICAgc3RydWN0IG5ldF9kZXZpY2Vfc3RhdHMgICAgIHN0YXRzOworCisvL2RtYSBhZGRyLCByeC90eCBwb29sCisgICAgZG1hX2FkZHJfdCAgICAgICAgICAgICAgICAgIHBvb2xfZG1hOworICAgIGRtYV9hZGRyX3QgICAgICAgICAgICAgICAgICByZDBfcG9vbF9kbWE7CisgICAgZG1hX2FkZHJfdCAgICAgICAgICAgICAgICAgIHJkMV9wb29sX2RtYTsKKworICAgIGRtYV9hZGRyX3QgICAgICAgICAgICAgICAgICB0ZDBfcG9vbF9kbWE7CisgICAgZG1hX2FkZHJfdCAgICAgICAgICAgICAgICAgIHRkMV9wb29sX2RtYTsKKworICAgIGRtYV9hZGRyX3QgICAgICAgICAgICAgICAgICB0eF9idWZzX2RtYTA7CisgICAgZG1hX2FkZHJfdCAgICAgICAgICAgICAgICAgIHR4X2J1ZnNfZG1hMTsKKyAgICBkbWFfYWRkcl90ICAgICAgICAgICAgICAgICAgdHhfYmVhY29uX2RtYTsKKworICAgIFBCWVRFICAgICAgICAgICAgICAgICAgICAgICB0eDBfYnVmczsKKyAgICBQQllURSAgICAgICAgICAgICAgICAgICAgICAgdHgxX2J1ZnM7CisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgIHR4X2JlYWNvbl9idWZzOworCisgICAgQ0hJUF9UWVBFICAgICAgICAgICAgICAgICAgIGNoaXBfaWQ7CisKKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgUG9ydE9mZnNldDsKKyAgICBEV09SRCAgICAgICAgICAgICAgICAgICAgICAgZHdJc3I7CisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIG1lbWFkZHI7CisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIGlvYWRkcjsKKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgaW9fc2l6ZTsKKworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVJldklkOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgICAgICBTdWJTeXN0ZW1JRDsKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICAgICAgU3ViVmVuZG9ySUQ7CisKKyAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgblR4UXVldWVzOworICAgIHZvbGF0aWxlIGludCAgICAgICAgICAgICAgICBpVERVc2VkW1RZUEVfTUFYVERdOworCisgICAgdm9sYXRpbGUgUFNUeERlc2MgICAgICAgICAgIGFwQ3VyclREW1RZUEVfTUFYVERdOworICAgIHZvbGF0aWxlIFBTVHhEZXNjICAgICAgICAgICBhcFRhaWxURFtUWVBFX01BWFREXTsKKworICAgIHZvbGF0aWxlIFBTVHhEZXNjICAgICAgICAgICBhcFREMFJpbmdzOworICAgIHZvbGF0aWxlIFBTVHhEZXNjICAgICAgICAgICBhcFREMVJpbmdzOworCisgICAgdm9sYXRpbGUgUFNSeERlc2MgICAgICAgICAgIGFSRDBSaW5nOworICAgIHZvbGF0aWxlIFBTUnhEZXNjICAgICAgICAgICBhUkQxUmluZzsKKyAgICB2b2xhdGlsZSBQU1J4RGVzYyAgICAgICAgICAgcEN1cnJSRFtUWVBFX01BWFJEXTsKKyAgICBTQ2FjaGUgICAgICAgICAgICAgICAgICAgICAgc0R1cFJ4Q2FjaGU7CisKKyAgICBTRGVGcmFnQ29udHJvbEJsb2NrICAgICAgICAgc1J4REZDQltDQl9NQVhfUlhfRlJBR107CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgIGNiREZDQjsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgY2JGcmVlREZDQjsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgdUN1cnJlbnRERkNCSWR4OworCisgICAgT1BUSU9OUyAgICAgICAgICAgICAgICAgICAgIHNPcHRzOworCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzOworCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIHJ4X2J1Zl9zejsKKyAgICBpbnQgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGljYXN0X2xpbWl0OworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVJ4TW9kZTsKKworICAgIHNwaW5sb2NrX3QgICAgICAgICAgICAgICAgICBsb2NrOworLy9QTElDRV9ERUJVRy0+CisJc3RydWN0CXRhc2tsZXRfc3RydWN0IAkJUnhNbmdXb3JrSXRlbTsKKwlSeE1hbmFnZW1lbnRRdWV1ZQlyeE1hbmVRdWV1ZTsKKy8vUExJQ0VfREVCVUc8LQorLy9QTElDRV9ERUJVRyAtPgorCXBpZF90CQkJCU1MTUVUaHJfcGlkOworCXN0cnVjdCAJY29tcGxldGlvbglub3RpZnk7CisJc3RydWN0IAlzZW1hcGhvcmUJbWxtZV9zZW1hcGhvcmU7CisvL1BMSUNFX0RFQlVHIDwtCisKKworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICByeF9ieXRlczsKKworICAgIC8vIFZlcnNpb24gY29udHJvbAorICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieUxvY2FsSUQ7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5UkZUeXBlOworCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5TWF4UHdyTGV2ZWw7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5Wm9uZVR5cGU7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgICAgIGJab25lUmVnRXhpc3Q7CisgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlPcmlnaW5hbFpvbmV0eXBlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBhYnlNYWNDb250ZXh0W01BQ19NQVhfQ09OVEVYVF9SRUddOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgICAgICBiTGlua1Bhc3M7ICAgICAgICAgIC8vIGxpbmsgc3RhdHVzOiBPSyBvciBmYWlsCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGFieUN1cnJlbnROZXRBZGRyW1VfRVRIRVJfQUREUl9MRU5dOworCisgICAgLy8gQWRhcHRlciBzdGF0aXN0aWNzCisgICAgU1N0YXRDb3VudGVyICAgICAgICAgICAgICAgIHNjU3RhdGlzdGljOworICAgIC8vIDgwMi4xMSBjb3VudGVyCisgICAgU0RvdDExQ291bnRlcnMgICAgICAgICAgICAgIHM4MDJfMTFDb3VudGVyOworCisKKyAgICAvLyA4MDIuMTEgbWFuYWdlbWVudAorICAgIFBTTWdtdE9iamVjdCAgICAgICAgICAgICAgICBwTWdtdDsKKyAgICBTTWdtdE9iamVjdCAgICAgICAgICAgICAgICAgc01nbXRPYmo7CisKKyAgICAvLyA4MDIuMTEgTUFDIHNwZWNpZmljCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgIHVDdXJyUlNTSTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlDdXJyU1E7CisKKyAgICBEV09SRCAgICAgICAgICAgICAgICAgICAgICAgZHdUeEFudGVubmFTZWw7CisgICAgRFdPUkQgICAgICAgICAgICAgICAgICAgICAgIGR3UnhBbnRlbm5hU2VsOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieUFudGVubmFDb3VudDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlSeEFudGVubmFNb2RlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVR4QW50ZW5uYU1vZGU7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgICAgIGJUeFJ4QW50SW52OworCisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgIHBieVRtcEJ1ZmY7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgIHVTSUZTOyAgICAvL0N1cnJlbnQgU0lGUworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgICAgICB1RElGUzsgICAgLy9DdXJyZW50IERJRlMKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgdUVJRlM7ICAgIC8vQ3VycmVudCBFSUZTCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgICAgIHVTbG90OyAgICAvL0N1cnJlbnQgU2xvdFRpbWUKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICAgICAgdUN3TWluOyAgIC8vQ3VycmVudCBDd01pbgorICAgIFVJTlQgICAgICAgICAgICAgICAgICAgICAgICB1Q3dNYXg7ICAgLy9Dd01heCBpcyBmaXhlZCBvbiAxMDIzLgorICAgIC8vIFBIWSBwYXJhbWV0ZXIKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlTSUZTOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieURJRlM7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5RUlGUzsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlTbG90OworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieUNXTWF4TWluOworICAgIENBUkRfUEhZX1RZUEUgICAgICAgICAgICAgICBlQ3VycmVudFBIWVR5cGU7CisKKworICAgIFZJQV9CQl9UWVBFICAgICAgICAgICAgICAgICBieUJCVHlwZTsgLy8wOiAxMUEsIDE6MTFCLCAyOjExRworICAgIFZJQV9QS1RfVFlQRSAgICAgICAgICAgICAgICBieVBhY2tldFR5cGU7IC8vMDoxMWEsMToxMWIsMjoxMWdiKG9ubHkgQ0NLIGluIEJhc2ljUmF0ZSksMzoxMWdhKE9GRE0gaW4gQmFzaWMgUmF0ZSkKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICAgICAgd0Jhc2ljUmF0ZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlBQ0tSYXRlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVRvcE9GRE1CYXNpY1JhdGU7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5VG9wQ0NLQmFzaWNSYXRlOworCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5TWluQ2hhbm5lbDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlNYXhDaGFubmVsOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgICAgICB1Q29ubmVjdGlvblJhdGU7CisKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlQcmVhbWJsZVR5cGU7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5U2hvcnRQcmVhbWJsZTsKKworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgICAgICB3Q3VycmVudFJhdGU7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgICAgIHdSVFNUaHJlc2hvbGQ7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgICAgIHdGcmFnbWVudGF0aW9uVGhyZXNob2xkOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVNob3J0UmV0cnlMaW1pdDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlMb25nUmV0cnlMaW1pdDsKKyAgICBDQVJEX09QX01PREUgICAgICAgICAgICAgICAgZU9QTW9kZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYnlPcE1vZGU7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgICAgIGJCU1NJREZpbHRlcjsKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICAgICAgd01heFRyYW5zbWl0TVNEVUxpZmV0aW1lOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBhYnlCU1NJRFtVX0VUSEVSX0FERFJfTEVOXTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYWJ5RGVzaXJlQlNTSURbVV9FVEhFUl9BRERSX0xFTl07CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgICAgIHdDVFNEdXJhdGlvbjsgICAgICAgLy8gdXBkYXRlIHdoaWxlIHNwZWVkIGNoYW5nZQorICAgIFdPUkQgICAgICAgICAgICAgICAgICAgICAgICB3QUNLRHVyYXRpb247ICAgICAgIC8vIHVwZGF0ZSB3aGlsZSBzcGVlZCBjaGFuZ2UKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICAgICAgd1JUU1RyYW5zbWl0TGVuOyAgICAvLyB1cGRhdGUgd2hpbGUgc3BlZWQgY2hhbmdlCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgICAgIGJ5UlRTU2VydmljZUZpZWxkOyAgLy8gdXBkYXRlIHdoaWxlIHNwZWVkIGNoYW5nZQorICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieVJUU1NpZ25hbEZpZWxkOyAgIC8vIHVwZGF0ZSB3aGlsZSBzcGVlZCBjaGFuZ2UKKworICAgIERXT1JEICAgICAgICAgICAgICAgICAgICAgICBkd01heFJlY2VpdmVMaWZldGltZTsgICAgICAgLy8gZG90MTFNYXhSZWNlaXZlTGlmZXRpbWUKKworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgICAgICBiQ0NLOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgICAgICBiRW5jcnlwdGlvbkVuYWJsZTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICAgICAgYkxvbmdIZWFkZXI7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgICAgIGJTaG9ydFNsb3RUaW1lOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgICAgICBiUHJvdGVjdE1vZGU7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgICAgIGJOb25FUlBQcmVzZW50OworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgICAgICBiQmFya2VyUHJlYW1ibGVNZDsKKworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICBieUVSUEZsYWc7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgICAgIHdVc2VQcm90ZWN0Q250RG93bjsKKworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJSYWRpb0NvbnRyb2xPZmY7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYlJhZGlvT2ZmOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJFbmFibGVQU01vZGU7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd0xpc3RlbkludGVydmFsOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJQV0JpdE9uOworICAgIFdNQUNfUE9XRVJfTU9ERSAgICAgICAgIGVQU01vZGU7CisKKworICAgIC8vIEdQSU8gUmFkaW8gQ29udHJvbAorICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5UmFkaW9DdGw7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlHUElPOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJIV1JhZGlvT2ZmOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJQcnZBY3RpdmU0UmFkaW9PRkY7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYkdQSU9CbG9ja1JlYWQ7CisKKyAgICAvLyBCZWFjb24gcmVsZWF0ZWQKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICB3U2VxQ291bnRlcjsKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICB3QkNOQnVmTGVuOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJCZWFjb25CdWZSZWFkeTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQmVhY29uU2VudDsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiSXNCZWFjb25CdWZSZWFkeVNldDsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICBjYkJlYWNvbkJ1ZlJlYWR5U2V0Q250OworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJGaXhSYXRlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Q3VycmVudENoOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVTY2FuVGltZTsKKworICAgIENNRF9TVEFURSAgICAgICAgICAgICAgIGVDb21tYW5kU3RhdGU7CisKKyAgICBDTURfQ09ERSAgICAgICAgICAgICAgICBlQ29tbWFuZDsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQmVhY29uVHg7CisKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiU3RvcEJlYWNvbjsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiU3RvcERhdGFQa3Q7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYlN0b3BUeDBQa3Q7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUF1dG9SZUNvbm5lY3RUaW1lOworCisgICAgLy8gODAyLjExIGNvdW50ZXIKKworICAgIENNRF9JVEVNICAgICAgICAgICAgICAgIGVDbWRRdWV1ZVtDTURfUV9TSVpFXTsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1Q21kRGVxdWV1ZUlkeDsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1Q21kRW5xdWV1ZUlkeDsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICBjYkZyZWVDbWRRdWV1ZTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQ21kUnVubmluZzsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQ21kQ2xlYXI7CisKKworCisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYlJvYW1pbmc7CisgICAgLy9XT1cKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlJUEFkZHJbNF07CisKKyAgICBVTE9ORyAgICAgICAgICAgICAgICAgICB1bFR4UG93ZXI7CisgICAgTkRJU184MDJfMTFfV0VQX1NUQVRVUyAgZUVuY3J5cHRpb25TdGF0dXM7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYlRyYW5zbWl0S2V5OworLy8yMDA3LTA5MjUtMDE8QWRkPmJ5IE1pa2VMaXUKKy8vbWlrZSBhZGQgOnNhdmUgb2xkIEVuY3J5cHRpb24KKyAgICBORElTXzgwMl8xMV9XRVBfU1RBVFVTICBlT2xkRW5jcnlwdGlvblN0YXR1czsKKyAgICBTS2V5TWFuYWdlbWVudCAgICAgICAgICBzS2V5OworICAgIERXT1JEICAgICAgICAgICAgICAgICAgIGR3SVZDb3VudGVyOworCisgICAgUVdPUkQgICAgICAgICAgICAgICAgICAgcXdQYWNrZXROdW1iZXI7IC8vRm9yIENDTVAgYW5kIFRLSVAgYXMgVFNDKDYgYnl0ZXMpCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUN1cnJlbnRXRVBNb2RlOworCisgICAgUkM0RXh0ICAgICAgICAgICAgICAgICAgU0JveDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlQUk5HW1dMQU5fV0VQTUFYX0tFWUxFTiszXTsKKworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5S2V5SW5kZXg7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUtleUxlbmd0aDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlLZXlbV0xBTl9XRVAyMzJfS0VZTEVOXTsKKworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJBRVM7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlDbnRNZWFzdXJlOworCisgICAgLy8gZm9yIEFQIG1vZGUKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1QXNzb2NDb3VudDsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiTW9yZURhdGE7CisKKyAgICAvLyBRb1MKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiR3JwQWNrUG9saWN5OworCisgICAgLy8gZm9yIE9JRF84MDJfMTFfQVNTT0NJQVRJT05fSU5GT1JNQVRJT04KKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQXNzb2NJbmZvU2V0OworCisKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieUF1dG9GQkN0cmw7CisKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiVHhNSUNGYWlsOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJSeE1JQ0ZhaWw7CisKKworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVSQVRFSWR4OworCisKKyAgICAvLyBGb3IgVXBkYXRlIEJhc2VCYW5kIFZHQSBHYWluIE9mZnNldAorICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJVcGRhdGVCQlZHQTsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1QkJWR0FEaWZmQ291bnQ7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQlZHQU5ldzsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieUJCVkdBQ3VycmVudDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlCQlZHQVtCQl9WR0FfTEVWRUxdOworICAgIExPTkcgICAgICAgICAgICAgICAgICAgIGxkQm1UaHJlc2hvbGRbQkJfVkdBX0xFVkVMXTsKKworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5QkJQcmVFRFJTU0k7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQlByZUVESW5kZXg7CisKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiUmFkaW9DbWQ7CisgICAgRFdPUkQgICAgICAgICAgICAgICAgICAgZHdEaWFnUmVmQ291bnQ7CisKKyAgICAvLyBGb3IgRk9FIFR1bmluZworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Rk9FVHVuaW5nOworCisgICAgLy8gRm9yIEF1dG8gUG93ZXIgVHVubmluZworCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlBdXRvUHdyVHVubmluZzsKKyAgICBTSE9SVCAgICAgICAgICAgICAgICAgICBzUFNldFBvaW50Q0NLOworICAgIFNIT1JUICAgICAgICAgICAgICAgICAgIHNQU2V0UG9pbnRPRkRNRzsKKyAgICBTSE9SVCAgICAgICAgICAgICAgICAgICBzUFNldFBvaW50T0ZETUE7CisgICAgTE9ORyAgICAgICAgICAgICAgICAgICAgbFBGb3JtdWxhT2Zmc2V0OworICAgIFNIT1JUICAgICAgICAgICAgICAgICAgIHNQVGhyZXNob2xkOworICAgIENIQVIgICAgICAgICAgICAgICAgICAgIGNBZGp1c3RTdGVwOworICAgIENIQVIgICAgICAgICAgICAgICAgICAgIGNNaW5UeEFHQzsKKworICAgIC8vIEZvciBSRiBQb3dlciB0YWJsZQorICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Q0NLUHdyOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5T0ZETVB3ckc7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlDdXJQd3I7CisgICAgSTggICAgICAgICAgICAgICAgICAgICAgYnlDdXJQd3JkQm07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5Q0NLUHdyVGJsW0NCX01BWF9DSEFOTkVMXzI0RysxXTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlPRkRNUHdyVGJsW0NCX01BWF9DSEFOTkVMKzFdOworICAgIEk4ICAgICAgICAgICAgICAgICAgICAgIGFieUNDS0RlZmF1bHRQd3JbQ0JfTUFYX0NIQU5ORUxfMjRHKzFdOworICAgIEk4ICAgICAgICAgICAgICAgICAgICAgIGFieU9GRE1EZWZhdWx0UHdyW0NCX01BWF9DSEFOTkVMKzFdOworICAgIEk4ICAgICAgICAgICAgICAgICAgICAgIGFieVJlZ1B3cltDQl9NQVhfQ0hBTk5FTCsxXTsKKyAgICBJOCAgICAgICAgICAgICAgICAgICAgICBhYnlMb2NhbFB3cltDQl9NQVhfQ0hBTk5FTCsxXTsKKworCisgICAgLy8gQmFzZUJhbmQgTG9vcGJhY2sgVXNlCisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQkNSNGQ7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQkNSYzk7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQkNSODg7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlCQkNSMDk7CisKKyAgICAvLyBjb21tYW5kIHRpbWVyCisgICAgc3RydWN0IHRpbWVyX2xpc3QgICAgICAgc1RpbWVyQ29tbWFuZDsKKyNpZmRlZiBUeEluU2xlZXAKKyAgICAgc3RydWN0IHRpbWVyX2xpc3QgICAgICAgc1RpbWVyVHhEYXRhOworICAgICBVTE9ORyAgICAgICAgICAgICAgICAgICAgICAgblR4RGF0YVRpbWVDb3V0OworICAgICBCT09MICBmVHhEYXRhSW5TbGVlcDsKKyAgICAgQk9PTCAgSXNUeERhdGFUcmlnZ2VyOworI2VuZGlmCisKKyNpZmRlZiBXUEFfU01fVHJhbnN0YXR1cworICAgIEJPT0wgIGZXUEFfQXV0aGVuZWQ7ICAgICAgICAgICAvL2lzIFdQQS9XUEEtUFNLIG9yIFdQQTIvV1BBMi1QU0sgYXV0aGVuPz8KKyNlbmRpZgorICAgIEJZVEUgICAgICAgICAgICBieVJlQXNzb2NDb3VudDsgICAvL21pa2UgYWRkOnJlLWFzc29jaWF0aW9uIHJldHJ5IHRpbWVzIQorICAgIEJZVEUgICAgICAgICAgICBieUxpbmtXYWl0Q291bnQ7CisKKworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieU5vZGVOYW1lWzE3XTsKKworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJEaXZlcnNpdHlSZWdDdGxPTjsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiRGl2ZXJzaXR5RW5hYmxlOworICAgIFVMT05HICAgICAgICAgICAgICAgICAgIHVsRGl2ZXJzaXR5TlZhbHVlOworICAgIFVMT05HICAgICAgICAgICAgICAgICAgIHVsRGl2ZXJzaXR5TVZhbHVlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5VE1heDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieVRNYXgyOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5VE1heDM7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgdWxTUTNUSDsKKworLy8gQU5UIGRpdmVyc2l0eQorICAgIFVMT05HICAgICAgICAgICAgICAgICAgIHVEaXZlcnNpdHlDbnQ7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlBbnRlbm5hU3RhdGU7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgdWxSYXRpb19TdGF0ZTA7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgdWxSYXRpb19TdGF0ZTE7CisKKyAgICAvL1NRMyBmdW5jdGlvbnMgZm9yIGFudGVubmEgZGl2ZXJzaXR5CisgICAgc3RydWN0IHRpbWVyX2xpc3QgICAgICAgICAgIFRpbWVyU1EzVG1heDE7CisgICAgc3RydWN0IHRpbWVyX2xpc3QgICAgICAgICAgIFRpbWVyU1EzVG1heDI7CisgICAgc3RydWN0IHRpbWVyX2xpc3QgICAgICAgICAgIFRpbWVyU1EzVG1heDM7CisKKworICAgIFVMT05HICAgICAgICAgICAgICAgICAgIHVOdW1TUTNbTUFYX1JBVEVdOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdBbnREaXZlcnNpdHlNYXhSYXRlOworCisKKyAgICBTRXRoZXJuZXRIZWFkZXIgICAgICAgICBzVHhFdGhIZWFkZXI7CisgICAgU0V0aGVybmV0SGVhZGVyICAgICAgICAgc1J4RXRoSGVhZGVyOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUJyb2FkY2FzdEFkZHJbVV9FVEhFUl9BRERSX0xFTl07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5U05BUF9SRkMxMDQyW1VfRVRIRVJfQUREUl9MRU5dOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieVNOQVBfQnJpZGdldHVubmVsW1VfRVRIRVJfQUREUl9MRU5dOworICAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgYWJ5RUVQUk9NW0VFUF9NQVhfQ09OVEVYVF9TSVpFXTsgIC8vRFdPUkQgYWxpZ25tZW50CisgICAgLy8gUHJlLUF1dGhlbnRpY2F0aW9uICYgUE1LIGNhY2hlCisgICAgU1BNS0lEICAgICAgICAgICAgICAgICAgZ3NQTUtJRDsKKyAgICBTUE1LSURDYW5kaWRhdGVFdmVudCAgICBnc1BNS0lEQ2FuZGlkYXRlOworCisKKyAgICAvLyBmb3IgODAyLjExaAorICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGIxMWhFbmFibGU7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5Q291bnRyeUNvZGVbM107CisgICAgLy8gZm9yIDgwMi4xMWggREZTCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdU51bU9mTWVhc3VyZUVJRHM7CisgICAgUFdMQU5fSUVfTUVBU1VSRV9SRVEgICAgcEN1cnJNZWFzdXJlRUlEOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJNZWFzdXJlSW5Qcm9ncmVzczsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieU9yZ0NoYW5uZWw7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlPcmdSQ1I7CisgICAgRFdPUkQgICAgICAgICAgICAgICAgICAgZHdPcmdNQVIwOworICAgIERXT1JEICAgICAgICAgICAgICAgICAgIGR3T3JnTUFSNDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieUJhc2ljTWFwOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Q0NBRnJhY3Rpb247CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5UlBJc1s4XTsKKyAgICBEV09SRCAgICAgICAgICAgICAgICAgICBkd1JQSXNbOF07CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYkNoYW5uZWxTd2l0Y2g7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlOZXdDaGFubmVsOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Q2hhbm5lbFN3aXRjaENvdW50OworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJRdWlldEVuYWJsZTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiRW5hYmxlRmlyc3RRdWlldDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieVF1aWV0U3RhcnRDb3VudDsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1UXVpZXRFbnF1ZXVlOworICAgIERXT1JEICAgICAgICAgICAgICAgICAgIGR3Q3VycmVudFF1aWV0RW5kVGltZTsKKyAgICBTUXVpZXRDb250cm9sICAgICAgICAgICBzUXVpZXRbTUFYX1FVSUVUX0NPVU5UXTsKKyAgICAvLyBmb3IgODAyLjExaCBUUEMKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQ291bnRyeUluZm81RzsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiQ291bnRyeUluZm8yNEc7CisKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICB3QmVhY29uSW50ZXJ2YWw7CisKKyAgICAvL1dQQSBzdXBwbGljYW50IGRlYW1vbgorCXN0cnVjdCBuZXRfZGV2aWNlICAgICAgICp3cGFkZXY7CisJQk9PTCAgICAgICAgICAgICAgICAgICAgYldQQURFVlVwOworICAgIHN0cnVjdCBza19idWZmICAgICAgICAgICpza2I7CisjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorLyoKKyAgICAgICAgQk9PTCAgICAgICAgICAgICAgICAgYndleHRzdGVwMDsKKyAgICAgICAgQk9PTCAgICAgICAgICAgICAgICAgYndleHRzdGVwMTsKKyAgICAgICAgQk9PTCAgICAgICAgICAgICAgICAgYndleHRzdGVwMjsKKyAgICAgICAgQk9PTCAgICAgICAgICAgICAgICAgYndleHRzdGVwMzsKKyAgICAgICAgKi8KKyAgICAgICAgVUlOVCAgICAgICAgICAgICAgICAgICBid2V4dGNvdW50OworICAgICAgICBCT09MICAgICAgICAgICAgICAgICBiV1BBU3VwcFdleHRFbmFibGVkOworI2VuZGlmCisKKyAgICAvLy0tCisjaWZkZWYgSE9TVEFQCisgICAgLy8gdXNlciBzcGFjZSBkYWVtb246IGhvc3RhcGQsIGlzIHVzZWQgZm9yIEhPU1RBUAorCUJPT0wgICAgICAgICAgICAgICAgICAgIGJFbmFibGVIb3N0YXBkOworCUJPT0wgICAgICAgICAgICAgICAgICAgIGJFbmFibGU4MDIxeDsKKwlCT09MICAgICAgICAgICAgICAgICAgICBiRW5hYmxlSG9zdFdFUDsKKwlzdHJ1Y3QgbmV0X2RldmljZSAgICAgICAqYXBkZXY7CisJaW50ICgqdHhfODAyMTEpKHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpOworI2VuZGlmCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUNoYW5uZWw7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYk1BQ1N1c3BlbmQ7CisKKyNpZmRlZiBXSVJFTEVTU19FWFQKKwlzdHJ1Y3QgaXdfc3RhdGlzdGljcwl3c3RhdHM7CQkvLyB3aXJlbGVzcyBzdGF0cworI2VuZGlmIC8qIFdJUkVMRVNTX0VYVCAqLworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJDb21taXQ7CisKK30gREVWSUNFX0lORk8sICpQU0RldmljZTsKKworCisvL1BMSUNFX0RFQlVHLT4KKworCisgaW5saW5lICBzdGF0aWMJVk9JRCAgIEVuUXVldWUgKFBTRGV2aWNlIHBEZXZpY2UsUFNSeE1nbXRQYWNrZXQgIHBSeE1nbXRQYWNrZXQpCit7CisJLy9wcmludGsoIkVudGVyIEVuUXVldWU6dGFpbCBpcyAlZFxuIixwRGV2aWNlLT5yeE1hbmVRdWV1ZS50YWlsKTsKKwlpZiAoKHBEZXZpY2UtPnJ4TW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ByaW50aygiRW50ZXIgRGVRdWV1ZTpoZWFkIGlzICVkXG4iLHgpOworCQlwUnhNZ210UGFja2V0ID0gcERldmljZS0+cnhNYW5lUXVldWUuUVt4XTsKKwkJcERldmljZS0+cnhNYW5lUXVldWUucGFja2V0X251bS0tOworCQlyZXR1cm4gcFJ4TWdtdFBhY2tldDsKKwl9Cit9CisKK1ZPSUQJSW5pdFJ4TWFuYWdlbWVudFF1ZXVlKFBTRGV2aWNlICAgcERldmljZSk7CisKKworCisvL1BMSUNFX0RFQlVHPC0KKworCisKKworCisKK2lubGluZSBzdGF0aWMgQk9PTCBkZXZpY2VfZ2V0X2lwKFBTRGV2aWNlIHBJbmZvKSB7CisgICAgc3RydWN0IGluX2RldmljZSogaW5fZGV2PShzdHJ1Y3QgaW5fZGV2aWNlKikgcEluZm8tPmRldi0+aXBfcHRyOworICAgIHN0cnVjdCBpbl9pZmFkZHIqIGlmYTsKKworICAgIGlmIChpbl9kZXYhPU5VTEwpIHsKKyAgICAgICAgaWZhPShzdHJ1Y3QgaW5faWZhZGRyKikgaW5fZGV2LT5pZmFfbGlzdDsKKyAgICAgICAgaWYgKGlmYSE9TlVMTCkgeworICAgICAgICAgICAgbWVtY3B5KHBJbmZvLT5hYnlJUEFkZHIsJmlmYS0+aWZhX2FkZHJlc3MsNCk7CisgICAgICAgICAgICByZXR1cm4gVFJVRTsKKyAgICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gRkFMU0U7Cit9CisKKworCitzdGF0aWMgaW5saW5lIFBERVZJQ0VfUkRfSU5GTyBhbGxvY19yZF9pbmZvKHZvaWQpIHsKKyAgICBQREVWSUNFX1JEX0lORk8gIHB0cjsKKyAgICBpZiAoKHB0ciA9IChQREVWSUNFX1JEX0lORk8pa21hbGxvYygoaW50KXNpemVvZihERVZJQ0VfUkRfSU5GTyksIChpbnQpR0ZQX0FUT01JQykpID09IE5VTEwpCisgICAgICAgIHJldHVybiBOVUxMOworICAgIGVsc2UgeworICAgICAgICBtZW1z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kVTSF9NQVggICAgIDIzNDcKKyNkZWZpbmUgUlRTX1RIUkVTSF9ERUYgICAgIDIzNDcKKworREVWSUNFX1BBUkFNKFJUU1RocmVzaG9sZCwgIlJUUyB0aHJlc2hvbGQiKTsKKworCisjZGVmaW5lIEZSQUdfVEhSRVNIX01JTiAgICAgMjU2CisjZGVmaW5lIEZSQUdfVEhSRVNIX01BWCAgICAgMjM0NgorI2RlZmluZSBGUkFHX1RIUkVTSF9ERUYgICAgIDIzNDYKKworREVWSUNFX1BBUkFNKEZyYWdUaHJlc2hvbGQsICJGcmFnbWVudGF0aW9uIHRocmVzaG9sZCIpOworCisKKyNkZWZpbmUgREFUQV9SQVRFX01JTiAgICAgMAorI2RlZmluZSBEQVRBX1JBVEVfTUFYICAgICAxMworI2RlZmluZSBEQVRBX1JBVEVfREVGICAgICAxMworLyogZGF0YXJhdGVbXSBpbmRleAorICAgMDogaW5kaWNhdGUgMSBNYnBzICAgMHgwMgorICAgMTogaW5kaWNhdGUgMiBNYnBzICAgMHgwNAorICAgMjogaW5kaWNhdGUgNS41IE1icHMgMHgwQgorICAgMzogaW5kaWNhdGUgMTEgTWJwcyAgMHgxNgorICAgNDogaW5kaWNhdGUgNiBNYnBzICAgMHgwYworICAgNTogaW5kaWNhdGUgOSBNYnBzICAgMHgxMgorICAgNjogaW5kaWNhdGUgMTIgTWJwcyAgMHgxOAorICAgNzogaW5kaWNhdGUgMTggTWJwcyAgMHgyNAorICAgODogaW5kaWNhdGUgMjQgTWJwcyAgMHgzMAorICAgOTogaW5kaWNhdGUgMzYgTWJwcyAgMHg0OAorICAxMDogaW5kaWNhdGUgNDggTWJwcyAgMHg2MAorICAxMTogaW5kaWNhdGUgNTQgTWJwcyAgMHg2YworICAxMjogaW5kaWNhdGUgNzIgTWJwcyAgMHg5MAorICAxMzogaW5kaWNhdGUgYXV0byByYXRlCisqLworCitERVZJQ0VfUEFSQU0oQ29ubmVjdGlvblJhdGUsICJDb25uZWN0aW9uIGRhdGEgcmF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lKTsKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIiBwRGV2aWNlLT5iRGl2ZXJzaXR5UmVnQ3RsT049ICVkXG4iLChJTlQpcERldmljZS0+YkRpdmVyc2l0eVJlZ0N0bE9OKTsKK30KKworc3RhdGljIFZPSUQgc192Q29tcGxldGVDdXJyZW50TWVhc3VyZSAoSU4gUFNEZXZpY2UgcERldmljZSwgSU4gQllURSBieVJlc3VsdCkKK3sKKyAgICBVSU5UICAgIGlpOworICAgIERXT1JEICAgZHdEdXJhdGlvbiA9IDA7CisgICAgQllURSAgICBieVJQSTAgPSAwOworCisgICAgZm9yKGlpPTE7aWk8ODtpaSsrKSB7CisgICAgICAgIHBEZXZpY2UtPmR3UlBJc1tpaV0gKj0gMjU1OworICAgICAgICBkd0R1cmF0aW9uIHw9ICooKFBXT1JEKSAocERldmljZS0+cEN1cnJNZWFzdXJlRUlELT5zUmVxLmFieUR1cmF0aW9uKSk7CisgICAgICAgIGR3RHVyYXRpb24gPDw9IDEwOworICAgICAgICBwRGV2aWNlLT5kd1JQSXNbaWldIC89IGR3RHVyYXRpb247CisgICAgICAgIHBEZXZpY2UtPmFieVJQSXNbaWldID0gKEJZVEUpIHBEZXZpY2UtPmR3UlBJc1tpaV07CisgICAgICAgIGJ5UlBJMCArPSBwRGV2aWNlLT5hYnlSUElzW2lpXTsKKyAgICB9CisgICAgcERldmljZS0+YWJ5UlBJc1swXSA9ICgweEZGIC0gYnlSUEkwKTsKKworICAgICBpZiAocERldmljZS0+dU51bU9mTWVhc3VyZUVJRHMgPT0gMCkgeworICAgICAgICBWTlRXSUZJYk1lYXN1cmVSZXBvcnQoICBwRGV2aWNlLT5wTWdtdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVFJVRSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+cEN1cnJNZWFzdXJlRUlELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieVJlc3VsdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlCYXNpY01hcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlDQ0FGcmFjdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YWJ5UlBJcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIH0gZWxzZSB7CisgICAgICAgIFZOVFdJRkliTWVhc3VyZVJlcG9ydCggIHBEZXZpY2UtPnBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGQUxTRSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+cEN1cnJNZWFzdXJlRUlELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieVJlc3VsdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlCYXNpY01hcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlDQ0FGcmFjdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YWJ5UlBJcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICBDQVJEYlN0YXJ0TWVhc3VyZSAocERldmljZSwgcERldmljZS0+cEN1cnJNZWFzdXJlRUlEKyssIHBEZXZpY2UtPnVOdW1PZk1lYXN1cmVFSURzKTsKKyAgICB9CisKK30KKworCisKKy8vCisvLyBJbml0aWFsaWF0aW9uIG9mIE1BQyAmIEJCUCByZWdpc3RlcnMKKy8vCisKK3N0YXRpYyB2b2lkIGRldmljZV9pbml0X3JlZ2lzdGVycyhQU0RldmljZSBwRGV2aWNlLCBERVZJQ0VfSU5JVF9UWVBFIEluaXRUeXBlKQoreworICAgIFVJTlQgICAgaWk7CisgICAgQllURSAgICBieVZhbHVlOworCUJZVEUgICAgYnlWYWx1ZTE7CisgICAgQllURSAgICBieUNDS1B3cmRCbSA9IDA7CisgICAgQllURSAgICBieU9GRE1Qd3JkQm0gPSAwOworICAgIElOVCB6b25ldHlwZT0wOworICAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAmKHBEZXZpY2UtPnNNZ210T2JqKTsKKyAgICBNQUNiU2h1dGRvd24ocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgQkJ2U29mdHdhcmVSZXNldChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKworICAgIGlmICgoSW5pdFR5cGUgPT0gREVWSUNFX0lOSVRfQ09MRCkgfHwKKyAgICAgICAgKEluaXRUeXBlID09IERFVklDRV9JTklUX0RYUEwpKSB7CisgICAgICAgIC8vIERvIE1BQ2JTb2Z0d2FyZVJlc2V0IGluIE1BQ3ZJbml0aWFsaXplCisgICAgICAgIE1BQ2JTb2Z0d2FyZVJlc2V0KHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAvLyBmb3JjZSBDQ0sKKyAgICAgICAgcERldmljZS0+YkNDSyA9IFRSVUU7CisgICAgICAgIHBEZXZpY2UtPmJBRVMgPSBGQUxTRTsKKyAgICAgICAgcERldmljZS0+YlByb3RlY3RNb2RlID0gRkFMU0U7ICAgICAgLy9Pbmx5IHVzZWQgaW4gMTFnIHR5cGUsIHN5bmMgd2l0aCBFUlAgSUUKKyAgICAgICAgcERldmljZS0+Yk5vbkVSUFByZXNlbnQgPSBGQUxTRTsKKyAgICAgICAgcERldmljZS0+YkJhcmtlclByZWFtYmxlTWQgPSBGQUxTRTsKKyAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV8xTTsKKyAgICAgICAgcERldmljZS0+YnlUb3BPRkRNQmFzaWNSYXRlID0gUkFURV8yNE07CisgICAgICAgIHBEZXZpY2UtPmJ5VG9wQ0NLQmFzaWNSYXRlID0gUkFURV8xTTsKKworICAgICAgICBwRGV2aWNlLT5ieVJldklkID0gMDsgICAgICAgICAgICAgICAgICAgLy9UYXJnZXQgdG8gSUYgcGluIHdoaWxlIHByb2dyYW1taW5nIHRvIFJGIGNoaXAuCisKKyAgICAgICAgLy8gaW5pdCBNQUMKKyAgICAgICAgTUFDdkluaXRpYWxpemUocERldmljZS0+UG9ydE9mZnNldCk7CisKKyAgICAgICAgLy8gR2V0IExvY2FsIElECisgICAgICAgIFZOU3ZJblBvcnRCKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX0xPQ0FMSUQsICYocERldmljZS0+YnlMb2NhbElEKSk7CisKKyAgICAgICAgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisJIFNST012UmVhZEFsbENvbnRlbnRzKHBEZXZpY2UtPlBvcnRPZmZzZXQscERldmljZS0+YWJ5RUVQUk9NKTsKKworICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCisgICAgICAgIC8vIEdldCBDaGFubmVsIHJhbmdlCisKKyAgICAgICAgcERldmljZS0+YnlNaW5DaGFubmVsID0gMTsKKyAgICAgICAgcERldmljZS0+YnlNYXhDaGFubmVsID0gQ0JfTUFYX0NIQU5ORUw7CisKKyAgICAgICAgLy8gR2V0IEFudGVuYQorICAgICAgICBieVZhbHVlID0gU1JPTWJ5UmVhZEVtYmVkZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIEVFUF9PRlNfQU5URU5OQSk7CisgICAgICAgIGlmIChieVZhbHVlICYgRUVQX0FOVElOVikKKyAgICAgICAgICAgIHBEZXZpY2UtPmJUeFJ4QW50SW52ID0gVFJVRTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgcERldmljZS0+YlR4UnhBbnRJbnYgPSBGQUxTRTsKKyNpZmRlZglQTElDRV9ERUJVRworCS8vcHJpbnRrKCJpbml0X3JlZ2lzdGVyOlR4UnhBbnRJbnYgaXMgJWQsYnlWYWx1ZSBpcyAlZFxuIixwRGV2aWNlLT5iVHhSeEFudEludixieVZhbHVlK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EVOTkFfQVVYIHwgRUVQX0FOVEVOTkFfTUFJTikpIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPmJ5QW50ZW5uYUNvdW50ID0gMjsKKyAgICAgICAgICAgIHBEZXZpY2UtPmJ5VHhBbnRlbm5hTW9kZSA9IEFOVF9COworICAgICAgICAgICAgcERldmljZS0+ZHdUeEFudGVubmFTZWwgPSAxOworICAgICAgICAgICAgcERldmljZS0+ZHdSeEFudGVubmFTZWwgPSAxOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJUeFJ4QW50SW52ID09IFRSVUUpCisgICAgICAgICAgICAgICAgcERldmljZS0+YnlSeEFudGVubmFNb2RlID0gQU5UX0E7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgcERldmljZS0+YnlSeEFudGVubmFNb2RlID0gQU5UX0I7CisgICAgICAgICAgICAgICAgLy8gY2hlc3RlciBmb3IgYW50ZW5uYQorYnlWYWx1ZTEgPSBTUk9NYnlSZWFkRW1iZWRkZWQocERldmljZS0+UG9ydE9mZnNldCwgRUVQX09GU19BTlRFTk5BKTsKKyAgICAgICAgICAvLyAgaWYgKHBEZXZpY2UtPmJEaXZlcnNpdHlSZWdDdGxPTikKKyAgICAgICAgICBpZigoYnlWYWx1ZTEmMHgwOCk9PTApCisgICAgICAgICAgICAgICAgcERldmljZS0+YkRpdmVyc2l0eUVuYWJsZSA9IEZBTFNFOy8vU1JPTWJ5UmVhZEVtYmVkZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4NTApOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJEaXZlcnNpdHlFbmFibGUgPSBUUlVFOworI2lmZGVmCVBMSUNFX0RFQlVHCisJCS8vcHJpbnRrKCJhdXggfG1haW4gYW50ZW5uYTogUnhBbnRlbm5hTW9kZSBpcyAlZFxuIixwRGV2aWNlLT5ieVJ4QW50ZW5uYU1vZGUpOworI2VuZGlmCisJfSBlbHNlICB7CisgICAgICAgICAgICBwRGV2aWNlLT5iRGl2ZXJzaXR5RW5hYmxlID0gRkFMU0U7CisgICAgICAgICAgICBwRGV2aWNlLT5ieUFudGVubmFDb3VudCA9IDE7CisgICAgICAgICAgICBwRGV2aWNlLT5kd1R4QW50ZW5uYVNlbCA9IDA7CisgICAgICAgICAgICBwRGV2aWNlLT5kd1J4QW50ZW5uYVNlbCA9IDA7CisgICAgICAgICAgICBpZiAoYnlWYWx1ZSAmIEVFUF9BTlRFTk5BX0FVWCkgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5VHhBbnRlbm5hTW9kZSA9IEFOVF9BOworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iVHhSeEFudEludiA9PSBUUlVFKQorICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVJ4QW50ZW5uYU1vZGUgPSBBTlRfQjsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5UnhBbnRlbm5hTW9kZSA9IEFOVF9BOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVR4QW50ZW5uYU1vZGUgPSBBTlRfQjsKKyAgICAgICAgICAgICAgICBpZiAocERldmljZS0+YlR4UnhBbnRJbnYgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlSeEFudGVubmFNb2RlID0gQU5UX0E7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVJ4QW50ZW5uYU1vZGUgPSBBTlRfQjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorI2lmZGVmCVBMSUNFX0RFQlVHCisJLy9wcmludGsoImluaXQgcmVnaXN0ZXJzOiBUeEFudGVubmFNb2RlIGlzICVkXG4iLHBEZXZpY2UtPmJ5VHhBbnRlbm5hTW9kZSk7CisjZW5kaWYKKyAgICAgICAgREVWSUNFX1BSVCh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tPnNrYiwgc2l6ZW9mKHZpYXdnZXRfd3BhX2hlYWRlcikpOworICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2ItPmRldiA9IHBEZXZpY2UtPndwYWRldjsKKyAgICAgICAgICAgICAgICAgcERldmljZS0+c2tiLT5tYWNfaGVhZGVyID0gcERldmljZS0+c2tiLT5kYXRhOworICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2ItPnBrdF90eXBlID0gUEFDS0VUX0hPU1Q7CisgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+cHJvdG9jb2wgPSBodG9ucyhFVEhfUF84MDJfMik7CisgICAgICAgICAgICAgICAgIG1lbXNldChwRGV2aWNlLT5za2ItPmNiLCAwLCBzaXplb2YocERldmljZS0+c2tiLT5jYikpOworICAgICAgICAgICAgICAgICBuZXRpZl9yeChwRGV2aWNlLT5za2IpOworICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2IgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKworIC8vd2FpdCByZWxlYXNlIFdQQURFVgorICAgICAgICAgICAgICAvLyAgICBpbml0X3dhaXRxdWV1ZV9oZWFkKCZTZXRfd2FpdCk7CisgICAgICAgICAgICAgIC8vICAgIHdhaXRfZXZlbnRfdGltZW91dChTZXRfd2FpdCwgKChwRGV2aWNlLT53cGFkZXY9PU5VTEwpJiYocERldmljZS0+c2tiID09IE5VTEwpKSw1KkhaKTsgICAgLy8xcyB3YWl0CisgICAgICAgICAgICAgIHdoaWxlKChwRGV2aWNlLT5iV1BBREVWVXA9PVRSVUUpKSB7CisJICAgICAgICBzZXRfY3VycmVudF9zdGF0ZShUQVNLX1VOSU5URVJSVVBUSUJMRSk7CisgICAgICAgICAgICAgICAgIHNjaGVkdWxlX3RpbWVvdXQgKEhaLzIwKTsgICAgICAgICAgLy93YWl0IDUwbXMKKyAgICAgICAgICAgICAgICAgaWkrKzsKKwkgICAgICAgIGlmKGlpPjIwKQorCQkgIGJyZWFrOworICAgICAgICAgICAgICB9CisgICAgICAgICAgIH07CisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworc3RhdGljIGNvbnN0IHN0cnVjdCBuZXRfZGV2aWNlX29wcyBkZXZpY2VfbmV0ZGV2X29wcyA9IHsKKyAgICAubmRvX29wZW4gICAgICAgICAgICAgICA9IGRldmljZV9vcGVuLAorICAgIC5uZG9fc3RvcCAgICAgICAgICAgICAgID0gZGV2aWNlX2Nsb3NlLAorICAgIC5uZG9fZG9faW9jdGwgICAgICAgICAgID0gZGV2aWNlX2lvY3RsLAorICAgIC5uZG9fZ2V0X3N0YXRzICAgICAgICAgID0gZGV2aWNlX2dldF9zdGF0cywKKyAgICAubmRvX3N0YXJ0X3htaXQgICAgICAgICA9IGRldmljZV94bWl0LAorICAgIC5uZG9fc2V0X211bHRpY2FzdF9saXN0ID0gZGV2aWNlX3NldF9tdWx0aSwKK307CisKKworI2lmbmRlZiBQUklWQVRFX09CSgorCitzdGF0aWMgaW50CitkZXZpY2VfZm91bmQxKHN0cnVjdCBwY2lfZGV2ICpwY2lkLCBjb25zdCBzdHJ1Y3QgcGNpX2RldmljZV9pZCAqZW50KQoreworICAgIHN0YXRpYyBCT09MIGJGaXJzdCA9IFRSVUU7CisgICAgc3RydWN0IG5ldF9kZXZpY2UqICBkZXYgPSBOVUxMOworICAgIFBDSElQX0lORk8gIHBDaGlwX2luZm8gPSAoUENISVBfSU5GTyllbnQtPmRyaXZlcl9kYXRhOworICAgIFBTRGV2aWNlICAgIHBEZXZpY2U7CisgICAgaW50ICAgICAgICAgcmM7CisgICAgaWYgKGRldmljZV9uaWNzICsrPj0gTUFYX1VJTlRTKSB7CisgICAgICAgIHByaW50ayhLRVJOX05PVElDRSBERVZJQ0VfTkFNRSAiOiBhbHJlYWR5IGZvdW5kICVkIE5JQ3NcbiIsIGRldmljZV9uaWNzKTsKKyAgICAgICAgcmV0dXJuIC1FTk9ERVY7CisgICAgfQorCisKKyAgICBkZXYgPSBhbGxvY19ldGhlcmRldihzaXplb2YoREVWSUNFX0lORk8pKTsKKworICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpIG5ldGRldl9wcml2KGRldik7CisKKyAgICBpZiAoZGV2ID09IE5VTEwpIHsKKyAgICAgICAgcHJpbnRrKEtFUk5fRVJSIERFVklDRV9OQU1FICI6IGFsbG9jYXRlIG5ldCBkZXZpY2UgZmFpbGVkIFxuIik7CisgICAgICAgIHJldHVybiAtRU5PREVWOworICAgIH0KKworICAgIC8vIENoYWluIGl0IGFsbCB0b2dldGhlcgorICAgLy8gU0VUX01PRFVMRV9PV05FUihkZXYpOworICAgIFNFVF9ORVRERVZfREVWKGRldiwgJnBjaWQtPmRldik7CisKKyAgICBpZiAoYkZpcnN0KSB7CisgICAgICAgIHByaW50ayhLRVJOX05PVElDRSAiJXMgVmVyLiAlc1xuIixERVZJQ0VfRlVMTF9EUlZfTkFNLCBERVZJQ0VfVkVSU0lPTik7CisgICAgICAgIHByaW50ayhLRVJOX05PVElDRSAiQ29weXJpZ2h0IChjKSAyMDAzIFZJQSBOZXR3b3JraW5nIFRlY2hub2xvZ2llcywgSW5jLlxuIik7CisgICAgICAgIGJGaXJzdD1GQUxTRTsKKyAgICB9CisKKyAgICBpZiAoIWRldmljZV9pbml0X2luZm8ocGNpZCwgJnBEZXZpY2UsIHBDaGlwX2luZm8pKSB7CisgICAgICAgIHJldHVybiAtRU5PTUVNOworICAgIH0KKyAgICBwRGV2aWNlLT5kZXYgPSBkZXY7CisgICAgcERldmljZS0+bmV4dF9tb2R1bGUgPSByb290X2RldmljZV9kZXY7CisgICAgcm9vdF9kZXZpY2VfZGV2ID0gZGV2OworICAgIGRldi0+aXJxID0gcGNpZC0+aXJxOworCisgICAgaWYgKHBjaV9lbmFibGVfZGV2aWNlKHBjaWQpKSB7CisgICAgICAgIGRldmljZV9mcmVlX2luZm8ocERldmljZSk7CisgICAgICAgIHJldHVybiAtRU5PREVWOworICAgIH0KKyNpZmRlZglERUJV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ERldmljZSwKKyAgICBQQ0hJUF9JTkZPIHBDaGlwX2luZm8pIHsKKworICAgIFBTRGV2aWNlIHA7CisKKyAgICBtZW1zZXQoKnBwRGV2aWNlLDAsc2l6ZW9mKERFVklDRV9JTkZPKSk7CisKKyAgICBpZiAocERldmljZV9JbmZvcyA9PSBOVUxMKSB7CisgICAgICAgIHBEZXZpY2VfSW5mb3MgPSpwcERldmljZTsKKyAgICB9CisgICAgZWxzZSB7CisgICAgICAgIGZvciAocD1wRGV2aWNlX0luZm9zO3AtPm5leHQhPU5VTEw7cD1wLT5uZXh0KQorICAgICAgICAgICAgZG8ge30gd2hpbGUgKDApOworICAgICAgICBwLT5uZXh0ID0gKnBwRGV2aWNlOworICAgICAgICAoKnBwRGV2aWNlKS0+cHJldiA9IHA7CisgICAgfQorCisgICAgKCpwcERldmljZSktPnBjaWQgPSBwY2lkOworICAgICgqcHBEZXZpY2UpLT5jaGlwX2lkID0gcENoaXBfaW5mby0+Y2hpcF9pZDsKKyAgICAoKnBwRGV2aWNlKS0+aW9fc2l6ZSA9IHBDaGlwX2luZm8tPmlvX3NpemU7CisgICAgKCpwcERldmljZSktPm5UeFF1ZXVlcyA9IHBDaGlwX2luZm8tPm5UeFF1ZXVlOworICAgICgqcHBEZXZpY2UpLT5tdWx0aWNhc3RfbGltaXQgPTMyOworCisgICAgc3Bpbl9sb2NrX2luaXQoJigoKnBwRGV2aWNlKS0+bG9jaykpOworCisgICAgcmV0dXJuIFRSVUU7Cit9CisKK3N0YXRpYyBCT09MIGRldmljZV9nZXRfcGNpX2luZm8oUFNEZXZpY2UgcERldmljZSwgc3RydWN0IHBjaV9kZXYqIHBjaWQpIHsKKworICAgIFUxNiBwY2lfY21kOworICAgIFU4ICBiOworICAgIFVJTlQgY2lzX2FkZHI7CisjaWZkZWYJUExJQ0VfREVCVUcKKwlCWVRFICAgICAgIHBjaV9jb25maWdbMjU2XTsKKwlCWVRFCXZhbHVlID0weDAwOworCWludAkJaWksajsKKwlVMTYJb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U1NFUlQocERldmljZSk7CisvLzIwMDgtMDcxNC0wMTxBZGQ+YnkgY2hlc3RlcgorZGV2aWNlX3JlbGVhc2VfV1BBREVWKHBEZXZpY2UpOworCisvLzIwMDgtMDctMjEtMDE8QWRkPmJ5IE1pa2VMaXUKKy8vdW5yZWdpc3RlciB3cGFkZXYKKyAgIGlmKHdwYV9zZXRfd3BhZGV2KHBEZXZpY2UsIDApIT0wKQorICAgICBwcmludGsoInVucmVnaXN0ZXIgd3BhZGV2IGZhaWw/XG4iKTsKKworICAgIGlmIChwRGV2aWNlX0luZm9zPT1OVUxMKQorICAgICAgICByZXR1cm47CisKKyAgICBmb3IgKHB0cj1wRGV2aWNlX0luZm9zO3B0ciAmJiAocHRyIT1wRGV2aWNlKTtwdHI9cHRyLT5uZXh0KQorICAgICAgICAgICAgZG8ge30gd2hpbGUgKDApOworCisgICAgaWYgKHB0cj09cERldmljZSkgeworICAgICAgICBpZiAocHRyPT1wRGV2aWNlX0luZm9zKQorICAgICAgICAgICAgcERldmljZV9JbmZvcz1wdHItPm5leHQ7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHB0ci0+cHJldi0+bmV4dD1wdHItPm5leHQ7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsIEtFUk5fRVJSICJpbmZvIHN0cnVjdCBub3QgZm91bmRcbiIpOworICAgICAgICByZXR1cm47CisgICAgfQorI2lmZGVmIEhPU1RBUAorICAgIGlmIChkZXYpCisgICAgICAgIGhvc3RhcF9zZXRfaG9zdGFwZChwRGV2aWNlLCAwLCAwKTsKKyNlbmRpZgorICAgIGlmIChkZXYpCisgICAgICAgIHVucmVnaXN0ZXJfbmV0ZGV2KGRldik7CisKKyAgICBpZiAocERldmljZS0+UG9ydE9mZnNldCkKKyAgICAgICAgaW91bm1hcCgoUFZPSUQpcERldmljZS0+UG9ydE9mZnNldCk7CisKKyAgICBpZiAocERldmljZS0+cGNpZCkKKyAgICAgICAgcGNpX3JlbGVhc2VfcmVnaW9ucyhwRGV2aWNlLT5wY2lkKTsKKyAgICBpZiAoZGV2KQorICAgICAgICBmcmVlX25ldGRldihkZXYpOworCisgICAgaWYgKHBEZXZpY2UtPnBjaWQpIHsKKyAgICAgICAgcGNpX3NldF9kcnZkYXRhKHBEZXZpY2UtPnBjaWQsTlVMTCk7CisgICAgfQorfQorI2VuZGlmLy8gaWZuZGVmIFBSSVZBVEVfT0JKCisKK3N0YXRpYyBCT09MIGRldmljZV9pbml0X3JpbmdzKFBTRGV2aWNlIHBEZXZpY2UpIHsKKyAgICB2b2lkKiAgIHZpcl9wb29sOworCisKKyAgICAvKmFsbG9jYXRlIGFsbCBSRC9URCByaW5ncyBhIHNpbmdsZSBwb29sKi8KKyAgICB2aXJfcG9vbCA9IHBjaV9hbGxvY19jb25zaXN0ZW50KHBEZXZpY2UtPnBjaWQsCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMCAqIHNpemVvZihTUnhEZXNjKSArCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMSAqIHNpemVvZihTUnhEZXNjKSArCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogc2l6ZW9mKFNUeERlc2MpICsKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+c09wdHMublR4RGVzY3NbMV0gKiBzaXplb2YoU1R4RGVzYyksCisgICAgICAgICAgICAgICAgICAgICZwRGV2aWNlLT5wb29sX2RtYSk7CisKKyAgICBpZiAodmlyX3Bvb2wgPT0gTlVMTCkgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsS0VSTl9FUlIgIiVzIDogYWxsb2NhdGUgZGVzYyBkbWEgbWVtb3J5IGZhaWxlZFxuIiwgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH0KKworICAgIG1lbXNldCh2aXJfcG9vbCwgMCwKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMCAqIHNpemVvZihTUnhEZXNjKSArCisgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczEgKiBzaXplb2YoU1J4RGVzYykgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublR4RGVzY3NbMF0gKiBzaXplb2YoU1R4RGVzYykgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublR4RGVzY3NbMV0gKiBzaXplb2YoU1R4RGVzYykKKyAgICAgICAgICApOworCisgICAgcERldmljZS0+YVJEMFJpbmcgPSB2aXJfcG9vbDsKKyAgICBwRGV2aWNlLT5hUkQxUmluZyA9IHZpcl9wb29sICsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMCAqIHNpemVvZihTUnhEZXNjKTsKKworCisgICAgcERldmljZS0+cmQwX3Bvb2xfZG1hID0gcERldmljZS0+cG9vbF9kbWE7CisgICAgcERldmljZS0+cmQxX3Bvb2xfZG1hID0gcERldmljZS0+cmQwX3Bvb2xfZG1hICsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczAgKiBzaXplb2YoU1J4RGVzYyk7CisKKyAgICBwRGV2aWNlLT50eDBfYnVmcyA9IHBjaV9hbGxvY19jb25zaXN0ZW50KHBEZXZpY2UtPnBjaWQsCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogUEtUX0JVRl9TWiArCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzFdICogUEtUX0JVRl9TWiArCisgICAgICAgICAgICAgICAgICAgIENCX0JFQUNPTl9CVUZfU0laRSArCisgICAgICAgICAgICAgICAgICAgIENCX01BWF9CVUZfU0laRSwKKyAgICAgICAgICAgICAgICAgICAgJnBEZXZpY2UtPnR4X2J1ZnNfZG1hMCk7CisKKyAgICBpZiAocERldmljZS0+dHgwX2J1ZnMgPT0gTlVMTCkgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsS0VSTl9FUlIgIiVzOiBhbGxvY2F0ZSBidWYgZG1hIG1lbW9yeSBmYWlsZWRcbiIsIHBEZXZpY2UtPmRldi0+bmFtZSk7CisgICAgICAgIHBjaV9mcmVlX2NvbnNpc3RlbnQocERldmljZS0+cGNpZCwKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMCAqIHNpemVvZihTUnhEZXNjKSArCisgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczEgKiBzaXplb2YoU1J4RGVzYykgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublR4RGVzY3NbMF0gKiBzaXplb2YoU1R4RGVzYykgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublR4RGVzY3NbMV0gKiBzaXplb2YoU1R4RGVzYyksCisgICAgICAgICAgICB2aXJfcG9vbCwgcERldmljZS0+cG9vbF9kbWEKKyAgICAgICAgICAgICk7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisKKyAgICBtZW1zZXQocERldmljZS0+dHgwX2J1ZnMsIDAsCisgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogUEtUX0JVRl9TWiArCisgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzFdICogUEtUX0JVRl9TWiArCisgICAgICAgICAgIENCX0JFQUNPTl9CVUZfU0laRSArCisgICAgICAgICAgIENCX01BWF9CVUZfU0laRQorICAgICAgICAgICk7CisKKyAgICBwRGV2aWNlLT50ZDBfcG9vbF9kbWEgPSBwRGV2aWNlLT5yZDFfcG9vbF9kbWEgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublJ4RGVzY3MxICogc2l6ZW9mKFNSeERlc2MpOworCisgICAgcERldmljZS0+dGQxX3Bvb2xfZG1hID0gcERldmljZS0+dGQwX3Bvb2xfZG1hICsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogc2l6ZW9mKFNUeERlc2MpOworCisKKyAgICAvLyB2aXJfcG9vbDogcHZvaWQgdHlwZQorICAgIHBEZXZpY2UtPmFwVEQwUmluZ3MgPSB2aXJfcG9vbAorICAgICAgICAgICAgICAgICAgICAgICAgICArIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMCAqIHNpemVvZihTUnhEZXNjKQorICAgICAgICAgICAgICAgICAgICAgICAgICArIHBEZXZpY2UtPnNPcHRzLm5SeERlc2NzMSAqIHNpemVvZihTUnhEZXNjKTsKKworICAgIHBEZXZpY2UtPmFwVEQxUmluZ3MgPSB2aXJfcG9vbAorICAgICAgICAgICAgKyBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczAgKiBzaXplb2YoU1J4RGVzYykKKyAgICAgICAgICAgICsgcERldmljZS0+c09wdHMublJ4RGVzY3MxICogc2l6ZW9mKFNSeERlc2MpCisgICAgICAgICAgICArIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogc2l6ZW9mKFNUeERlc2MpOworCisKKyAgICBwRGV2aWNlLT50eDFfYnVmcyA9IHBEZXZpY2UtPnR4MF9idWZzICsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogUEtUX0JVRl9TWjsKKworCisgICAgcERldmljZS0+dHhfYmVhY29uX2J1ZnMgPSBwRGV2aWNlLT50eDFfYnVmcyArCisgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1sxXSAqIFBLVF9CVUZfU1o7CisKKyAgICBwRGV2aWNlLT5wYnlUbXBCdWZmID0gcERldmljZS0+dHhfYmVhY29uX2J1ZnMgKworICAgICAgICAgICAgQ0JfQkVBQ09OX0JVRl9TSVpFOworCisgICAgcERldmljZS0+dHhfYnVmc19kbWExID0gcERldmljZS0+dHhfYnVmc19kbWEwICsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogUEtUX0JVRl9TWjsKKworCisgICAgcERldmljZS0+dHhfYmVhY29uX2RtYSA9IHBEZXZpY2UtPnR4X2J1ZnNfZG1hMSArCisgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1sxXSAqIFBLVF9CVUZfU1o7CisKKworICAgIHJldHVybiBUUlVFOworfQorCitzdGF0aWMgdm9pZCBkZXZpY2VfZnJlZV9yaW5ncyhQU0RldmljZSBwRGV2aWNlKSB7CisKKyAgICBwY2lfZnJlZV9jb25zaXN0ZW50KHBEZXZpY2UtPnBjaWQsCisgICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczAgKiBzaXplb2YoU1J4RGVzYykgKworICAgICAgICAgICAgcERldmljZS0+c09wdHMublJ4RGVzY3MxICogc2l6ZW9mKFNSeERlc2MpICsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzBdICogc2l6ZW9mKFNUeERlc2MpICsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNPcHRzLm5UeERlc2NzWzFdICogc2l6ZW9mKFNUeERlc2MpCisgICAgICAgICAgICAsCisgICAgICAgICAgICBwRGV2aWNlLT5hUkQwUmluZywgcERldmljZS0+cG9vbF9kbWEKKyAgICAgICAgKTsKKworICAgIGlmIChwRGV2aWNlLT50eDBfYnVmcykKKyAgICAgICAgcGNpX2ZyZWVfY29uc2lzdGVudChwRGV2aWNlLT5wY2lkLAorICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1swXSAqIFBLVF9CVUZfU1ogKworICAgICAgICAgICBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1sxXSAqIFBLVF9CVUZfU1ogKworICAgICAgICAgICBDQl9CRUFDT05fQlVGX1NJWkUgKworICAgICAgICAgICBDQl9NQVhfQlVGX1NJWkUsCisgICAgICAgICAgIHBEZXZpY2UtPnR4MF9idWZzLCBwRGV2aWNlLT50eF9idWZzX2RtYTAKKyAgICAgICAgKTsKK30KKworc3RhdGljIHZvaWQgZGV2aWNlX2luaXRfcmQwX3JpbmcoUFNEZXZpY2UgcERldmljZSkgeworICAgIGludCBpOworICAgIGRtYV9hZGRyX3QgICAgICBjdXJyID0gcERldmljZS0+cmQwX3Bvb2xfZG1hOworICAgIFBTUnhEZXNjICAgICAgICBwRGVzYzsKKworICAgIC8qIEluaXQgdGhlIFJEMCByaW5nIGVudHJpZXMgKi8KKyAgICBmb3IgKGkgPSAwOyBpIDwgcERldmljZS0+c09wdHMublJ4RGVzY3MwOyBpICsrLCBjdXJyICs9IHNpemVvZihTUnhEZXNjKSkgeworICAgICAgICBwRGVzYyA9ICYocERldmljZS0+YVJEMFJpbmdbaV0pOworICAgICAgICBwRGVzYy0+cFJESW5mbyA9IGFsbG9jX3JkX2luZm8oKTsKKyAgICAgICAgQVNTRVJUKHBEZXNjLT5wUkRJbmZvKTsKKyAgICAgICAgaWYgKCFkZXZpY2VfYWxsb2NfcnhfYnVmKHBEZXZpY2UsIHBEZXNjKSkgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfRVJSLEtFUk5fRVJSICIlczogY2FuIG5vdCBhbGxvYyByeCBidWZzXG4iLAorICAgICAgICAgICAgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgfQorICAgICAgICBwRGVzYy0+bmV4dCA9ICYocERldmljZS0+YVJEMFJpbmdbKGkrMSkgJSBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczBdKTsKKyAgICAgICAgcERlc2MtPnBSREluZm8tPmN1cnJfZGVzYyA9IGNwdV90b19sZTMyKGN1cnIpOworICAgICAgICBwRGVzYy0+bmV4dF9kZXNjID0gY3B1X3RvX2xlMzIoY3VyciArIHNpemVvZihTUnhEZXNjKSk7CisgICAgfQorCisgICAgcERldmljZS0+YV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jcHVfdG9fbGUzMihjdXJyICsgc2l6ZW9mKFNSeERlc2MpKTsKKyAgICB9CisKKyAgICBwRGV2aWNlLT5hUkQxUmluZ1tpLTFdLm5leHRfZGVzYyA9IGNwdV90b19sZTMyKHBEZXZpY2UtPnJkMV9wb29sX2RtYSk7CisgICAgcERldmljZS0+cEN1cnJSRFsxXSA9ICYocERldmljZS0+YVJEMVJpbmdbMF0pOworfQorCisKK3N0YXRpYyB2b2lkIGRldmljZV9pbml0X2RlZnJhZ19jYihQU0RldmljZSBwRGV2aWNlKSB7CisgICAgaW50IGk7CisgICAgUFNEZUZyYWdDb250cm9sQmxvY2sgcERlRjsKKworICAgIC8qIEluaXQgdGhlIGZyYWdtZW50IGN0bCBlbnRyaWVzICovCisgICAgZm9yIChpID0gMDsgaSA8IENCX01BWF9SWF9GUkFHOyBpKyspIHsKKyAgICAgICAgcERlRiA9ICYocERldmljZS0+c1J4REZDQltpXSk7CisgICAgICAgIGlmICghZGV2aWNlX2FsbG9jX2ZyYWdfYnVmKHBEZXZpY2UsIHBEZUYpKSB7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsS0VSTl9FUlIgIiVzOiBjYW4gbm90IGFsbG9jIGZyYWcgYnVmc1xuIiwKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5kZXYtPm5hbWUpOworICAgICAgICB9OworICAgIH0KKyAgICBwRGV2aWNlLT5jYkRGQ0IgPSBDQl9NQVhfUlhfRlJBRzsKKyAgICBwRGV2aWNlLT5jYkZyZWVERkNCID0gcERldmljZS0+Y2JERkNCOworfQorCisKKworCitzdGF0aWMgdm9pZCBkZXZpY2VfZnJlZV9yZDBfcmluZyhQU0RldmljZSBwRGV2aWNlKSB7CisgICAgaW50IGk7CisKKyAgICBmb3IgKGkgPSAwOyBpIDwgcERldmljZS0+c09wdHMublJ4RGVzY3MwOyBpKyspIHsKKyAgICAgICAgUFNSeERlc2MgICAgICAgIHBEZXNjID0mKHBEZXZpY2UtPmFSRDBSaW5nW2ldKTsKKyAgICAgICAgUERFVklDRV9SRF9JTkZPICBwUkRJbmZvID1wRGVzYy0+cFJESW5mbzsKKworICAgICAgICBwY2lfdW5tYXBfc2luZ2xlKHBEZXZpY2UtPnBjaWQscFJESW5mby0+c2tiX2RtYSwKKyAgICAgICAgICAgcERldmljZS0+cnhfYnVmX3N6LCBQQ0lfRE1BX0ZST01ERVZJQ0UpOworCisgICAgICAgIGRldl9rZnJlZV9za2IocFJESW5mby0+c2tiKTsKKworICAgICAgICBrZnJlZSgoUFZPSUQpcERlc2MtPnBSREluZm8pOworICAgIH0KKworfQorCitzdGF0aWMgdm9pZCBkZXZpY2VfZnJlZV9yZDFfcmluZyhQU0RldmljZSBwRGV2aWNlKSB7CisgICAgaW50IGk7CisKKworICAgIGZvciAoaSA9IDA7IGkgPCBwRGV2aWNlLT5zT3B0cy5uUnhEZXNjczE7IGkrKykgeworICAgICAgICBQU1J4RGVzYyAgICAgICAgcERlc2M9JihwRGV2aWNlLT5hUkQxUmluZ1tpXSk7CisgICAgICAgIFBERVZJQ0VfUkRfSU5GTyAgcFJESW5mbz1wRGVzYy0+cFJESW5mbzsKKworICAgICAgICBwY2lfdW5tYXBfc2luZ2xlKHBEZXZpY2UtPnBjaWQscFJESW5mby0+c2tiX2RtYSwKKyAgICAgICAgICAgcERldmljZS0+cnhfYnVmX3N6LCBQQ0lfRE1BX0ZST01ERVZJQ0UpOworCisgICAgICAgIGRldl9rZnJlZV9za2IocFJESW5mby0+c2tiKTsKKworICAgICAgICBrZnJlZSgoUFZPSUQpcERlc2MtPnBSREluZm8pOworICAgIH0KKworfQorCitzdGF0aWMgdm9pZCBkZXZpY2VfZnJlZV9mcmFnX2J1ZihQU0RldmljZSBwRGV2aWNlKSB7CisgICAgUFNEZUZyYWdDb250cm9sQmxvY2sgcERlRjsKKyAgICBpbnQgaTsKKworICAgIGZvciAoaSA9IDA7IGkgPCBDQl9NQVhfUlhfRlJBRzsgaSsrKSB7CisKKyAgICAgICAgcERlRiA9ICYocERldmljZS0+c1J4REZDQltpXSk7CisKKyAgICAgICAgaWYgKHBEZUYtPnNrYikKKyAgICAgICAgICAgIGRldl9rZnJlZV9za2IocERlRi0+c2tiKTsKKworICAgIH0KKworfQorCitzdGF0aWMgdm9pZCBkZXZpY2VfaW5pdF90ZDBfcmluZyhQU0RldmljZSBwRGV2aWNlKSB7CisgICAgaW50IGk7CisgICAgZG1hX2FkZHJfdCAgY3VycjsKKyAgICBQU1R4RGVzYyAgICAgICAgcERlc2M7CisKKyAgICBjdXJyID0gcERldmljZS0+dGQwX3Bvb2xfZG1hOworICAgIGZvciAoaSA9IDA7IGkgPCBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1swXTsgaSsrLCBjdXJyICs9IHNpemVvZihTVHhEZXNjKSkgeworICAgICAgICBwRGVzYyA9ICYocERldmljZS0+YXBURDBSaW5nc1tpXSk7CisgICAgICAgIHBEZXNjLT5wVERJbmZvID0gYWxsb2NfdGRfaW5mbygpOworICAgICAgICBBU1NFUlQocERlc2MtPnBUREluZm8pOworICAgICAgICBpZiAocERldmljZS0+ZmxhZ3MgJiBERVZJQ0VfRkxBR1NfVFhfQUxJR04pIHsKKyAgICAgICAgICAgIHBEZXNjLT5wVERJbmZvLT5idWYgPSBwRGV2aWNlLT50eDBfYnVmcyArIChpKSpQS1RfQlVGX1NaOworICAgICAgICAgICAgcERlc2MtPnBUREluZm8tPmJ1Zl9kbWEgPSBwRGV2aWNlLT50eF9idWZzX2RtYTAgKyAoaSkqUEtUX0JVRl9TWjsKKyAgICAgICAgfQorICAgICAgICBwRGVzYy0+bmV4dCA9JihwRGV2aWNlLT5hcFREMFJpbmdzWyhpKzEpICUgcERldmljZS0+c09wdHMublR4RGVzY3NbMF1dKTsKKyAgICAgICAgcERlc2MtPnBUREluZm8tPmN1cnJfZGVzYyA9IGNwdV90b19sZTMyKGN1cnIpOworICAgICAgICBwRGVzYy0+bmV4dF9kZXNjID0gY3B1X3RvX2xlMzIoY3VycitzaXplb2YoU1R4RGVzYykpOworICAgIH0KKworICAgIHBEZXZpY2UtPmFwVEQwUmluZ3NbaS0xXS5uZXh0X2Rlc2MgPSBjcHVfdG9fbGUzMihwRGV2aWNlLT50ZDBfcG9vbF9kbWEpOworICAgIHBEZXZpY2UtPmFwVGFpbFREWzBdID0gcERldmljZS0+YXBDdXJyVERbMF0gPSYocERldmljZS0+YXBURDBSaW5nc1swXSk7CisKK30KKworc3RhdGljIHZvaWQgZGV2aWNlX2luaXRfdGQxX3JpbmcoUFNEZXZpY2UgcERldmljZSkgeworICAgIGludCBpOworICAgIGRtYV9hZGRyX3QgIGN1cnI7CisgICAgUFNUeERlc2MgICAgcERlc2M7CisKKyAgICAvKiBJbml0IHRoZSBURCByaW5nIGVudHJpZXMgKi8KKyAgICBjdXJyPXBEZXZpY2UtPnRkMV9wb29sX2RtYTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcERldmljZS0+c09wdHMublR4RGVzY3NbMV07IGkrKywgY3Vycis9c2l6ZW9mKFNUeERlc2MpKSB7CisgICAgICAgIHBEZXNjPSYocERldmljZS0+YXBURDFSaW5nc1tpXSk7CisgICAgICAgIHBEZXNjLT5wVERJbmZvID0gYWxsb2NfdGRfaW5mbygpOworICAgICAgICBBU1NFUlQocERlc2MtPnBUREluZm8pOworICAgICAgICBpZiAocERldmljZS0+ZmxhZ3MgJiBERVZJQ0VfRkxBR1NfVFhfQUxJR04pIHsKKyAgICAgICAgICAgIHBEZXNjLT5wVERJbmZvLT5idWY9cERldmljZS0+dHgxX2J1ZnMrKGkpKlBLVF9CVUZfU1o7CisgICAgICAgICAgICBwRGVzYy0+cFRESW5mby0+YnVmX2RtYT1wRGV2aWNlLT50eF9idWZzX2RtYTErKGkpKlBLVF9CVUZfU1o7CisgICAgICAgIH0KKyAgICAgICAgcERlc2MtPm5leHQ9JihwRGV2aWNlLT5hcFREMVJpbmdzWyhpKzEpICUgcERldmljZS0+c09wdHMublR4RGVzY3NbMV1dKTsKKyAgICAgICAgcERlc2MtPnBUREluZm8tPmN1cnJfZGVzYyA9IGNwdV90b19sZTMyKGN1cnIpOworICAgICAgICBwRGVzYy0+bmV4dF9kZXNjID0gY3B1X3RvX2xlMzIoY3VycitzaXplb2YoU1R4RGVzYykpOworICAgIH0KKworICAgIHBEZXZpY2UtPmFwVEQxUmluZ3NbaS0xXS5uZXh0X2Rlc2MgPSBjcHVfdG9fbGUzMihwRGV2aWNlLT50ZDFfcG9vbF9kbWEpOworICAgIHBEZXZpY2UtPmFwVGFpbFREWzFdID0gcERldmljZS0+YXBDdXJyVERbMV0gPSAmKHBEZXZpY2UtPmFwVEQxUmluZ3NbMF0pOworfQorCisKKworc3RhdGljIHZvaWQgZGV2aWNlX2ZyZWVfdGQwX3JpbmcoUFNEZXZpY2UgcERldmljZSkgeworICAgIGludCBpOworICAgIGZvciAoaSA9IDA7IGkgPCBwRGV2aWNlLT5zT3B0cy5uVHhEZXNjc1swXTsgaSsrKSB7CisgICAgICAgIFBTVHhEZXNjICAgICAgICBwRGVzYz0mKHBEZXZpY2UtPmFwVEQwUmluZ3NbaV0pOworICAgICAgICBQREVWSUNFX1REX0lORk8gIHBUREluZm89cERlc2MtPnBUREluZm87CisKKyAgICAgICAgaWYgKHBUREluZm8tPnNrYl9kbWEgJiYgKHBUREluZm8tPnNrYl9kbWEgIT0gcFRESW5mby0+YnVmX2RtYSkpCisgICAgICAgICAgICBwY2lfdW5tYXBfc2luZ2xlKHBEZXZpY2UtPnBjaWQscFRESW5mby0+c2tiX2RtYSwKKyAgICAgICAgICAgICAgIHBUREluZm8tPnNrYi0+bGVuLCBQQ0lfRE1BX1RPREVWSUNFKTsKKworICAgICAgICBpZiAocFRESW5mby0+c2tiKQorICAgICAgICAgICAgZGV2X2tmcmVlX3NrYihwVERJbmZvLT5za2IpOworCisgICAgICAgIGtmcmVlKChQVk9JRClwRGVzYy0+cFRESW5mbyk7CisgICAgfQorfQorCitzdGF0aWMgdm9pZCBkZXZpY2VfZnJlZV90ZDFfcmluZyhQU0RldmljZSBwRGV2aWNlKSB7CisgICAgaW50IGk7CisKKyAgICBmb3IgKGkgPSAwOyBpIDwgcERldmljZS0+c09wdHMublR4RGVzY3NbMV07IGkrKykgeworICAgICAgICBQU1R4RGVzYyAgICAgICAgcERlc2M9JihwRGV2aWNlLT5hcFREMVJpbmdzW2ldKTsKKyAgICAgICAgUERFVklDRV9URF9JTkZPICBwVERJbmZvPXBEZXNjLT5wVERJbmZvOworCisgICAgICAgIGlmIChwVERJbmZvLT5za2JfZG1hICYmIChwVERJbmZvLT5za2JfZG1hICE9IHBUREluZm8tPmJ1Zl9kbWEpKQorICAgICAgICAgICAgcGNpX3VubWFwX3NpbmdsZShwRGV2aWNlLT5wY2lkLCBwVERJbmZvLT5za2JfZG1hLAorICAgICAgICAgICAgICAgcFRESW5mby0+c2tiLT5sZW4sIFBDSV9ETUFfVE9ERVZJQ0UpOworCisgICAgICAgIGlmIChwVERJbmZvLT5za2IpCisgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiKHBUREluZm8tPnNrYik7CisKKyAgICAgICAga2ZyZWUoKFBWT0lEKXBEZXNjLT5wVERJbmZvKTsKKyAgICB9CisKK30KKworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCitzdGF0aWMgaW50IGRldmljZV9yeF9zcnYoUFNEZXZpY2UgcERldmljZSwgVUlOVCB1SWR4KSB7CisgICAgUFNSeERlc2MgICAgcFJEOworICAgIGludCB3b3JrcyA9IDA7CisKKworICAgIGZvciAocFJEID0gcERldmljZS0+cEN1cnJSRFt1SWR4XTsKKyAgICAgICAgIHBSRC0+bV9yZDBSRDAuZjFPd25lciA9PSBPV05FRF9CWV9IT1NUOworICAgICAgICAgcFJEID0gcFJELT5uZXh0KSB7CisvLyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicERldmljZS0+cEN1cnJSRCA9ICV4LCB3b3JrcyA9ICVkXG4iLCBwUkQsIHdvcmtzKTsKKyAgICAgICAgaWYgKHdvcmtzKys+MTUpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgaWYgKGRldmljZV9yZWNlaXZlX2ZyYW1lKHBEZXZpY2UsIHBSRCkpIHsKKyAgICAgICAgICAgIGlmICghZGV2aWNlX2FsbG9jX3J4X2J1ZihwRGV2aWNlLHBSRCkpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfRVJSLCBLRVJOX0VSUgorICAgICAgICAgICAgICAgICAgICAiJXM6IGNhbiBub3QgYWxsb2NhdGUgcnggYnVmXG4iLCBwRGV2aWNlLT5kZXYtPm5hbWUpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBwUkQtPm1fcmQwUkQwLmYxT3duZXIgPSBPV05FRF9CWV9OSUM7CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgcmVmX3NldF9yeF9qaWZmaWVzKHBEZXZpY2UtPmRldik7CisjZWxzZQorICAgICAgICBwRGV2aWNlLT5kZXYtPmxhc3RfcnggPSBqaWZmaWVzOworI2VuZGlmCisgICAgfQorCisgICAgcERldmljZS0+cEN1cnJSRFt1SWR4XT1wUkQ7CisKKyAgICByZXR1cm4gd29ya3M7Cit9CisKKworc3RhdGljIEJPT0wgZGV2aWNlX2FsbG9jX3J4X2J1ZihQU0RldmljZSBwRGV2aWNlLCBQU1J4RGVzYyBwUkQpIHsKKworICAgIFBERVZJQ0VfUkRfSU5GTyBwUkRJbmZvPXBSRC0+cFJESW5mbzsKKworI2lmZGVmIFBSSVZBVEVfT0JKCisKKyAgICBwUkRJbmZvLT5za2I9ZGV2X2FsbG9jX3NrYihwRGV2aWNlLT5yeF9idWZfc3opOworICAgIGlmIChwUkRJbmZvLT5za2I9PU5VTEwpCisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICByZWZfc2tiX3JlbWFwKHBEZXZpY2UtPmRldiwgJihwUkRJbmZvLT5yZWZfc2tiKSwgcFJESW5mby0+c2tiKTsKKyAgICBwUkRJbmZvLT5za2JfZG1hID0gcGNpX21hcF9zaW5nbGUocERldmljZS0+cGNpZCwgcFJESW5mby0+cmVmX3NrYi50YWlsLCBwRGV2aWNlLT5yeF9idWZfc3osCisgICAgICAgICAgICAgICAgICAgICAgICBQQ0lfRE1BX0ZST01ERVZJQ0UpOworI2Vsc2UKKworICAgIHBSREluZm8tPnNrYiA9IGRldl9hbGxvY19za2IoKGludClwRGV2aWNlLT5yeF9idWZfc3opOworI2lmZGVmCVBMSUNFX0RFQlVHCisJLy9wcmludGsoImRldmljZV9hbGxvY19yeF9idWY6c2tiIGlzICV4XG4iLHBSREluZm8tPnNrYik7CisjZW5kaWYKKyAgICBpZiAocFJESW5mby0+c2tiPT1OVUxMKQorICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgQVNTRVJUKHBSREluZm8tPnNrYik7CisgICAgcFJESW5mby0+c2tiLT5kZXYgPSBwRGV2aWNlLT5kZXY7CisgICAgcFJESW5mby0+c2tiX2RtYSA9IHBjaV9tYXBfc2luZ2xlKHBEZXZpY2UtPnBjaWQsIHBSREluZm8tPnNrYi0+dGFpbCwgcERldmljZS0+cnhfYnVmX3N6LAorICAgICAgICAgICAgICAgICAgICAgICAgUENJX0RNQV9GUk9NREVWSUNFKTsKKyNlbmRpZgorICAgICooKFBVMzIpICYocFJELT5tX3JkMFJEMCkpID0gMDsKKworICAgIHBSRC0+bV9yZDBSRDAud1Jlc0NvdW50ID0gY3B1X3RvX2xlMTYocERldmljZS0+cnhfYnVmX3N6KTsKKyAgICBwUkQtPm1fcmQwUkQwLmYxT3duZXIgPSBPV05FRF9CWV9OSUM7CisgICAgcFJELT5tX3JkMVJEMS53UmVxQ291bnQgPSBjcHVfdG9fbGUxNihwRGV2aWNlLT5yeF9idWZfc3opOworICAgIHBSRC0+YnVmZl9hZGRyID0gY3B1X3RvX2xlMzIocFJESW5mby0+c2tiX2RtYSk7CisKKyAgICByZXR1cm4gVFJVRTsKK30KKworCisKK0JPT0wgZGV2aWNlX2FsbG9jX2ZyYWdfYnVmKFBTRGV2aWNlIHBEZXZpY2UsIFBTRGVGcmFnQ29udHJvbEJsb2NrIHBEZUYpIHsKKworI2lmZGVmIFBSSVZBVEVfT0JKCisKKyAgICBwRGVGLT5za2I9ZGV2X2FsbG9jX3NrYihwRGV2aWNlLT5yeF9idWZfc3opOworICAgIGlmIChwRGVGLT5za2I9PU5VTEwpCisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICByZWZfc2tiX3JlbWFwKHBEZXZpY2UtPmRldiwgJihwRGVGLT5yZWZfc2tiKSwgcERlRi0+c2tiKTsKKworI2Vsc2UKKyAgICBwRGVGLT5za2IgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKyAgICBpZiAocERlRi0+c2tiID09IE5VTEwpCisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICBBU1NFUlQocERlRi0+c2tiKTsKKyAgICBwRGVGLT5za2ItPmRldiA9IHBEZXZpY2UtPmRldjsKKyNlbmRpZgorCisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworCitzdGF0aWMgaW50IGRldmljZV90eF9zcnYoUFNEZXZpY2UgcERldmljZSwgVUlOVCB1SWR4KSB7CisgICAgUFNUeERlc2MgICAgICAgICAgICAgICAgIHBURDsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICAgYkZ1bGw9RkFMU0U7CisgICAgaW50ICAgICAgICAgICAgICAgICAgICAgIHdvcmtzID0gMDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgYnlUc3IwOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICBieVRzcjE7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgIHVGcmFtZVNpemUsIHVGSUZPSGVhZGVyU2l6ZTsKKyAgICBQU1R4QnVmSGVhZCAgICAgICAgICAgICAgcFR4QnVmSGVhZDsKKyAgICBzdHJ1Y3QgbmV0X2RldmljZV9zdGF0cyogcFN0YXRzID0gJnBEZXZpY2UtPnN0YXRzOworICAgIHN0cnVjdCBza19idWZmKiAgICAgICAgICBza2I7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgIHVOb2RlSW5kZXg7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICAgICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICByZWZfc2tfYnVmZiAgICAgICAgICAgICAgcmVmX3NrYjsKKyNlbmRpZgorCisKKyAgICBmb3IgKHBURCA9IHBEZXZpY2UtPmFwVGFpbFREW3VJZHhdOyBwRGV2aWNlLT5pVERVc2VkW3VJZHhdID4wOyBwVEQgPSBwVEQtPm5leHQpIHsKKworICAgICAgICBpZiAocFRELT5tX3RkMFREMC5mMU93bmVyID09IE9XTkVEX0JZX05JQykKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBpZiAod29ya3MrKz4xNSkKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGJ5VHNyMCA9IHBURC0+bV90ZDBURDAuYnlUU1IwOworICAgICAgICBieVRzcjEgPSBwVEQtPm1fdGQwVEQwLmJ5VFNSMTsKKworICAgICAgICAvL09ubHkgdGhlIHN0YXR1cyBvZiBmaXJzdCBURCBpbiB0aGUgY2hhaW4gaXMgY29ycmVjdAorICAgICAgICBpZiAocFRELT5tX3RkMVREMS5ieVRDUiAmIFRDUl9TVFApIHsKKworICAgICAgICAgICAgaWYgKChwVEQtPnBUREluZm8tPmJ5RmxhZ3MgJiBURF9GTEFHU19ORVRJRl9TS0IpICE9IDApIHsKKyAgICAgICAgICAgICAgICB1RklGT0hlYWRlclNpemUgPSBwVEQtPnBUREluZm8tPmR3SGVhZGVyTGVuZ3RoOworICAgICAgICAgICAgICAgIHVGcmFtZVNpemUgPSBwVEQtPnBUREluZm8tPmR3UmVxQ291bnQgLSB1RklGT0hlYWRlclNpemU7CisgICAgICAgICAgICAgICAgcFR4QnVmSGVhZCA9IChQU1R4QnVmSGVhZCkgKHBURC0+cFRESW5mby0+YnVmKTsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgICAgIHJlZl9za2JfcmVtYXAocERldmljZS0+ZGV2LCAmcmVmX3NrYiwgcFRELT5wVERJbmZvLT5za2IpOworI2VuZGlmCisgICAgICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBzdGF0aXN0aWNzIGJhc2VkIG9uIHRoZSBUcmFuc21pdCBzdGF0dXMKKyAgICAgICAgICAgICAgICAvLyBub3csIHdlIERPJ05UIGNoZWNrIFRTUjBfQ0RICisKKyAgICAgICAgICAgICAgICBTVEF2VXBkYXRlVERTdGF0Q291bnRlcigmcERldmljZS0+c2NTdGF0aXN0aWMsCisgICAgICAgICAgICAgICAgICAgICAgICBieVRzcjAsIGJ5VHNyMSwKKyAgICAgICAgICAgICAgICAgICAgICAgIChQQllURSkocFRELT5wVERJbmZvLT5idWYgKyB1RklGT0hlYWRlclNpemUpLAorICAgICAgICAgICAgICAgICAgICAgICAgdUZyYW1lU2l6ZSwgdUlkeCk7CisKKworICAgICAgICAgICAgICAgIEJTU3ZVcGRhdGVOb2RlVHhDb3VudGVyKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgYnlUc3IwLCBieVRzcjEsCisgICAgICAgICAgICAgICAgICAgICAgICAgKFBCWVRFKShwVEQtPnBUREluZm8tPmJ1ZiksCisgICAgICAgICAgICAgICAgICAgICAgICAgdUZJRk9IZWFkZXJTaXplCisgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgICAgICAgICAgICAgIGlmIChCSVRiSXNCaXRPZmYoYnlUc3IxLCBUU1IxX1RFUlIpKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChieVRzcjAgIT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIgVHhbJWRdIE9LIGJ1dCBoYXMgZXJyb3IuIHRzcjFbJTAyWF0gdHNyMFslMDJYXS5cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoSU5UKXVJZHgsIGJ5VHNyMSwgYnlUc3IwKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoKHBUeEJ1ZkhlYWQtPndGcmFnQ3RsICYgRlJBR0NUTF9FTkRGUkFHKSAhPSBGUkFHQ1RMX05PTkZSQUcpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnM4MDJfMTFDb3VudGVyLlRyYW5zbWl0dGVkRnJhZ21lbnRDb3VudCArKzsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwU3RhdHMtPnR4X3BhY2tldHMrKzsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgICAgICAgICBwU3RhdHMtPnR4X2J5dGVzICs9ICoocmVmX3NrYi5sZW4pOworI2Vsc2UKKyAgICAgICAgICAgICAgICAgICAgcFN0YXRzLT50eF9ieXRlcyArPSBwVEQtPnBUREluZm8tPnNrYi0+bGVuOworI2VuZGlmCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIgVHhbJWRdIGRyb3BwZWQgJiB0c3IxWyUwMlhdIHRzcjBbJTAyWF0uXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKElOVCl1SWR4LCBieVRzcjEsIGJ5VHNyMCk7CisgICAgICAgICAgICAgICAgICAgIHBTdGF0cy0+dHhfZXJyb3JzKys7CisgICAgICAgICAgICAgICAgICAgIHBTdGF0cy0+dHhfZHJvcHBlZCsrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKChwVEQtPnBUREluZm8tPmJ5RmxhZ3MgJiBURF9GTEFHU19QUklWX1NLQikgIT0gMCkgeworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iRW5hYmxlSG9zdGFwZCkgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJ0eCBjYWxsIGJhY2sgbmV0aWYuLiBcbiIpOworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgICAgICAgICAgICAgICAgIHJlZl9za2JfcmVtYXAocERldmljZS0+YXBkZXYsICYocmVmX3NrYiksIHBURC0+cFRESW5mby0+c2tiKTsKKwkgICAgICAgICAgICAgICAgcmVmX3NrYi5tYWMucmF3ID0gcmVmX3NrYi5kYXRhOworCSAgICAgICAgICAgICAgICAqKHJlZl9za2IucGt0X3R5cGUpID0gUEFDS0VUX09USEVSSE9TVDsKKyAgICAJICAgICAgICAgICAgLy8qKHJlZl9za2IucHJvdG9jb2wpID0gaHRvbnMoRVRIX1BfODAyXzIpOworCSAgICAgICAgICAgICAgICBtZW1zZXQocmVmX3NrYi5jYiwgMCwgc2l6ZW9mKHJlZl9za2IuY2IpKTsKKwkgICAgICAgICAgICAgICAgbmV0aWZfcngocmVmX3NrYi5za2IpOworI2Vsc2UKKyAgICAgICAgICAgICAgICAgICAgc2tiID0gcFRELT5wVERJbmZvLT5za2I7CisJICAgICAgICAgICAgICAgIHNrYi0+ZGV2ID0gcERldmljZS0+YXBkZXY7CisJCQkgICAgICAgIHNrYi0+bWFjX2hlYWRlciA9IHNrYi0+ZGF0YTsKKwkgICAgICAgICAgICAgICAgc2tiLT5wa3RfdHlwZSA9IFBBQ0tFVF9PVEhFUkhPU1Q7CisgICAgCSAgICAgICAgICAgIC8vc2tiLT5wcm90b2NvbCA9IGh0b25zKEVUSF9QXzgwMl8yKTsKKwkgICAgICAgICAgICAgICAgbWVtc2V0KHNrYi0+Y2IsIDAsIHNpemVvZihza2ItPmNiKSk7CisJICAgICAgICAgICAgICAgIG5ldGlmX3J4KHNrYik7CisjZW5kaWYKKwkgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChCSVRiSXNCaXRPbihieVRzcjEsIFRTUjFfVEVSUikpIHsKKyAgICAgICAgICAgIGlmICgocFRELT5wVERJbmZvLT5ieUZsYWdzICYgVERfRkxBR1NfUFJJVl9TS0IpICE9IDApIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIiBUeFslZF0gZmFpbCBoYXMgZXJyb3IuIHRzcjFbJTAyWF0gdHNyMFslMDJYXS5cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIChJTlQpdUlkeCwgYnlUc3IxLCBieVRzcjApOworICAgICAgICAgICAgfQorCisvLyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIiBUeFslZF0gZmFpbCBoYXMgZXJyb3IuIHRzcjFbJTAyWF0gdHNyMFslMDJYXS5cbiIsCisvLyAgICAgICAgICAgICAgICAgICAgICAgICAgKElOVCl1SWR4LCBieVRzcjEsIGJ5VHNyMCk7CisKKyAgICAgICAgICAgICAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgJiYKKyAgICAgICAgICAgICAgICAgICAgKHBURC0+cFRESW5mby0+YnlGbGFncyAmIFREX0ZMQUdTX05FVElGX1NLQikpIHsKKyAgICAgICAgICAgICAgICAgICAgV09SRCAgICB3QUlEOworICAgICAgICAgICAgICAgICAgICBCWVRFICAgIGJ5TWFza1s4XSA9IHsxLCAyLCA0LCA4LCAweDEwLCAweDIwLCAweDQwLCAweDgwfTsKKworICAgICAgICAgICAgICAgICAgICBza2IgPSBwVEQtPnBUREluZm8tPnNrYjsKKyAgICAgICAgICAgICAgICAgICAgaWYgKEJTU0RCYklzU1RBSW5Ob2RlREIocE1nbXQsIChQQllURSkoc2tiLT5kYXRhKSwgJnVOb2RlSW5kZXgpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iUFNFbmFibGUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5zVHhQU1F1ZXVlLCBza2IpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud0VuUXVldWVDbnQrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgdHggbWFwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0FJRCA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud0FJRDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5UFNUeE1hcFt3QUlEID4+IDNdIHw9ICBieU1hc2tbd0FJRCAmIDddOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBURC0+cFRESW5mby0+YnlGbGFncyAmPSB+KFREX0ZMQUdTX05FVElGX1NLQik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAidHhfc3J2OnR4IGZhaWwgcmUtcXVldWUgc3RhIGluZGV4PSAlZCwgUXVlQ250PSAlZFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLChJTlQpdU5vZGVJbmRleCwgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53RW5RdWV1ZUNudCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFN0YXRzLT50eF9lcnJvcnMtLTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwU3RhdHMtPnR4X2Ryb3BwZWQtLTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGRldmljZV9mcmVlX3R4X2J1ZihwRGV2aWNlLHBURCk7CisgICAgICAgICAgICBwRGV2aWNlLT5pVERVc2VkW3VJZHhdLS07CisgICAgICAgIH0KKyAgICB9CisKKworICAgIGlmICh1SWR4ID09IFRZUEVfQUMwRE1BKSB7CisgICAgICAgIC8vIFJFU0VSVl9BQzBETUEgcmVzZXJ2ZWQgZm9yIHJlbGF5CisKKyAgICAgICAgaWYgKEFWQUlMX1REKHBEZXZpY2UsIHVJZHgpIDwgUkVTRVJWX0FDMERNQSkgeworICAgICAgICAgICAgYkZ1bGwgPSBUUlVFOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiIEFDMERNQSBpcyBGdWxsID0gJWRcbiIsIHBEZXZpY2UtPmlURFVzZWRbdUlkeF0pOworICAgICAgICB9CisgICAgICAgIGlmIChuZXRpZl9xdWV1ZV9zdG9wcGVkKHBEZXZpY2UtPmRldikgJiYgKGJGdWxsPT1GQUxTRSkpeworICAgICAgICAgICAgbmV0aWZfd2FrZV9xdWV1ZShwRGV2aWNlLT5kZXYpOworICAgICAgICB9CisgICAgfQorCisKKyAgICBwRGV2aWNlLT5hcFRhaWxURFt1SWR4XSA9IHBURDsKKworICAgIHJldHVybiB3b3JrczsKK30KKworCitzdGF0aWMgdm9pZCBkZXZpY2VfZXJyb3IoUFNEZXZpY2UgcERldmljZSwgV09SRCBzdGF0dXMpIHsKKworICAgIGlmIChzdGF0dXMgJiBJU1JfRkVUQUxFUlIpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfRVJSLCBLRVJOX0VSUgorICAgICAgICAgICAgIiVzOiBIYXJkd2FyZSBmYXRhbCBlcnJvci5cbiIsCisgICAgICAgICAgICBwRGV2aWNlLT5kZXYtPm5hbWUpOworICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgIGRlbF90aW1lcigmcERldmljZS0+c1RpbWVyQ29tbWFuZCk7CisgICAgICAgIGRlbF90aW1lcigmKHBEZXZpY2UtPnBNZ210LT5zVGltZXJTZWNvbmRDYWxsYmFjaykpOworICAgICAgICBwRGV2aWNlLT5iQ21kUnVubmluZyA9IEZBTFNFOworICAgICAgICBNQUNiU2h1dGRvd24ocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgIHJldHVybjsKKyAgICB9CisKK30KKworc3RhdGljIHZvaWQgZGV2aWNlX2ZyZWVfdHhfYnVmKFBTRGV2aWNlIHBEZXZpY2UsIFBTVHhEZXNjIHBEZXNjKSB7CisgICAgUERFVklDRV9URF9JTkZPICBwVERJbmZvPXBEZXNjLT5wVERJbmZvOworICAgIHN0cnVjdCBza19idWZmKiBza2I9cFRESW5mby0+c2tiOworCisgICAgLy8gcHJlLWFsbG9jYXRlZCBidWZfZG1hIGNhbid0IGJlIHVubWFwcGVkLgorICAgIGlmIChwVERJbmZvLT5za2JfZG1hICYmIChwVERJbmZvLT5za2JfZG1hICE9IHBUREluZm8tPmJ1Zl9kbWEpKSB7CisgICAgICAgIHBjaV91bm1hcF9zaW5nbGUocERldmljZS0+cGNpZCxwVERJbmZvLT5za2JfZG1hLHNrYi0+bGVuLAorICAgICAgICAgICAgICBQQ0lfRE1BX1RPREVWSUNFKTsKKyAgICB9CisKKyAgICBpZiAoKHBUREluZm8tPmJ5RmxhZ3MgJiBURF9GTEFHU19ORVRJRl9TS0IpICE9IDApCisgICAgICAgIGRldl9rZnJlZV9za2JfaXJxKHNrYik7CisKKyAgICBwVERJbmZvLT5za2JfZG1hID0gMDsKKyAgICBwVERJbmZvLT5za2IgPSAwOworICAgIHBUREluZm8tPmJ5RmxhZ3MgPSAwOworfQorCisKKworLy9QTElDRV9ERUJVRyAtPgorVk9JRAlJbml0UnhNYW5hZ2VtZW50UXVldWUoUFNEZXZpY2UgIHBEZXZpY2UpCit7CisJcERldmljZS0+cnhNYW5lUXVldWUucGFja2V0X251bSA9IDA7CisJcERldmljZS0+cnhNYW5lUXVldWUuaGVhZCA9IHBEZXZpY2UtPnJ4TWFuZVF1ZXVlLnRhaWwgPSAwOworfQorLy9QTElDRV9ERUJVRzwtCisKKworCisKKworLy9QTElDRV9ERUJVRyAtPgorSU5UIE1sbWVUaHJlYWQoCisgICAgIHZvaWQgKiBDb250ZXh0KQoreworCVBTRGV2aWNlCXBEZXZpY2UgPSAgKFBTRGV2aWNlKSBDb250ZXh0OworCVBTUnhNZ210UGFja2V0CQkJcFJ4TWdtdFBhY2tldDsKKwkvLyBpbnQgaSA7CisJLy9jb21wbGV0ZSgmcERldmljZS0+bm90aWZ5KTsKKy8vcHJpbnRrKCJFbnRlciBNbmdXb3JrSXRlbSxRdWV1ZSBwYWNrZXQgbnVtIGlzICVkXG4iLHBEZXZpY2UtPnJ4TWFuZVF1ZXVlLnBhY2tldF9udW0pOworCisJLy9wcmludGsoIkVudGVyIE1sbWVUaHJlYWQscGFja2V0IF9udW0gaXMgJWRcbiIscERldmljZS0+cnhNYW5lUXVldWUucGFja2V0X251bSk7CisJLy9pID0gMDsKKyNpZiAxCisJd2hpbGUgKDEpCisJeworCisJLy9wcmludGsoIkRERERcbiIpOworCS8vZG93bigmcERldmljZS0+bWxtZV9zZW1hcGhvcmUpOworICAgICAgICAvLyBwUnhNZ210UGFja2V0ID0gIERlUXVldWUocERldmljZSk7CisjaWYgMQorCQlzcGluX2xvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKwkJIHdoaWxlKHBEZXZpY2UtPnJ4TWFuZVF1ZXVlLnBhY2tldF9udW0gIT0gMCkKKwkgCXsKKwkJCSBwUnhNZ210UGFja2V0ID0gIERlUXVldWUocERldmljZS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bGJhY2spKTsKKworCSNpZmRlZiBXUEFfU1VQUExJQ0FOVF9EUklWRVJfV0VYVF9TVVBQT1JUCisJLyoKKyAgICAgcERldmljZS0+YndleHRzdGVwMCA9IEZBTFNFOworICAgICBwRGV2aWNlLT5id2V4dHN0ZXAxID0gRkFMU0U7CisgICAgIHBEZXZpY2UtPmJ3ZXh0c3RlcDIgPSBGQUxTRTsKKyAgICAgcERldmljZS0+YndleHRzdGVwMyA9IEZBTFNFOworICAgICAqLworICAgICAgIHBEZXZpY2UtPmJ3ZXh0Y291bnQ9MDsKKyAgICAgcERldmljZS0+YldQQVN1cHBXZXh0RW5hYmxlZCA9IEZBTFNFOworI2VuZGlmCisgICAgcERldmljZS0+YnlSZUFzc29jQ291bnQgPSAwOworICAgcERldmljZS0+YldQQURFVlVwID0gRkFMU0U7CisgICAgLy8gUGF0Y2g6IGlmIFdFUCBrZXkgYWxyZWFkeSBzZXQgYnkgaXdjb25maWcgYnV0IGRldmljZSBub3QgeWV0IG9wZW4KKyAgICBpZiAoKHBEZXZpY2UtPmJFbmNyeXB0aW9uRW5hYmxlID09IFRSVUUpICYmIChwRGV2aWNlLT5iVHJhbnNtaXRLZXkgPT0gVFJVRSkpIHsKKyAgICAgICAgS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoRFdPUkQpKHBEZXZpY2UtPmJ5S2V5SW5kZXggfCAoMSA8PCAzMSkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVLZXlMZW5ndGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5hYnlLZXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgS0VZX0NUTF9XRVAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgIC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ycSgmcERldmljZS0+bG9jayk7CisgICAgICAgIHJldHVybiAwOworICAgIH0KKworICAgIGlmIChwRGV2aWNlLT5iU3RvcFR4MFBrdCA9PSBUUlVFKSB7CisgICAgICAgIGRldl9rZnJlZV9za2JfaXJxKHNrYik7CisgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgIHJldHVybiAwOworICAgIH07CisKKyNpZmRlZiBQUklWQVRFX09CSgorICAgIHJlZl9za2JfcmVtYXAocERldmljZS0+ZGV2LCAmcmVmX3NrYiwgc2tiKTsKKyAgICBjYk1QRFVMZW4gPSAqKHJlZl9za2IubGVuKTsKKyAgICBwYk1QRFUgPSByZWZfc2tiLmRhdGE7CisjZWxzZQorICAgIGNiTVBEVUxlbiA9IHNrYi0+bGVuOworICAgIHBiTVBEVSA9IHNrYi0+ZGF0YTsKKyNlbmRpZgorCisgICAgdkRNQTBfdHhfODAyMTEocERldmljZSwgc2tiLCBwYk1QRFUsIGNiTVBEVUxlbik7CisKKyAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCisgICAgcmV0dXJuIDA7CisKK30KKworCisKK0JPT0wgZGV2aWNlX2RtYTBfeG1pdChQU0RldmljZSBwRGV2aWNlLCBzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBVSU5UIHVOb2RlSW5kZXgpIHsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBQU1R4RGVzYyAgICAgICAgcEhlYWRURCwgcExhc3RURDsKKyAgICBVSU5UICAgICAgICAgICAgY2JGcmFtZUJvZHlTaXplOworICAgIFVJTlQgICAgICAgICAgICB1TUFDZnJhZ051bTsKKyAgICBCWVRFICAgICAgICAgICAgYnlQa3RUeXA7CisgICAgQk9PTCAgICAgICAgICAgIGJOZWVkRW5jcnlwdGlvbiA9IEZBTFNFOworICAgIFBTS2V5SXRlbSAgICAgICBwVHJhbnNtaXRLZXkgPSBOVUxMOworICAgIFVJTlQgICAgICAgICAgICBjYkhlYWRlclNpemU7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworICAgIFNLZXlJdGVtICAgICAgICBTVGVtcEtleTsKKy8vICAgIEJZVEUgICAgICAgICAgICBieUtleUluZGV4ID0gMDsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgIHJlZl9za19idWZmICAgICByZWZfc2tiOworI2VuZGlmCisKKworICAgIGlmIChwRGV2aWNlLT5iU3RvcFR4MFBrdCA9PSBUUlVFKSB7CisgICAgICAgIGRldl9rZnJlZV9za2JfaXJxKHNrYik7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9OworCisgICAgaWYgKEFWQUlMX1REKHBEZXZpY2UsIFRZUEVfVFhETUEwKSA8PSAwKSB7CisgICAgICAgIGRldl9rZnJlZV9za2JfaXJxKHNrYik7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRldmljZV9kbWEwX3htaXQsIHRkMCA8PTBcbiIpOworICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAocERldmljZS0+dUFzc29jQ291bnQgPT0gMCkgeworICAgICAgICAgICAgZGV2X2tmcmVlX3NrYl9pcnEoc2tiKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRldmljZV9kbWEwX3htaXQsIGFzc29jQ291bnQgPSAwXG4iKTsKKyAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgfQorICAgIH0KKworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgcmVmX3NrYl9yZW1hcChwRGV2aWNlLT5kZXYsICYocmVmX3NrYiksIHNrYik7CisjZW5kaWYKKyAgICBwSGVhZFREID0gcERldmljZS0+YXBDdXJyVERbV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UEhZX1RZUEVfMTFCKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+dUNvbm5lY3Rpb25SYXRlID49IFJBVEVfMTFNKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV8xMU07CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IChXT1JEKXBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT51Q29ubmVjdGlvblJhdGUgPj0gUkFURV81NE0pCisgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV81NE07CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gKFdPUkQpcERldmljZS0+dUNvbm5lY3Rpb25SYXRlOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBwRGV2aWNlLT53Q3VycmVudFJhdGUgPSBwRGV2aWNlLT5wTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndUeERhdGFSYXRlOworICAgIH0KKworICAgIC8vcHJlYW1ibGUgdHlwZQorICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmJTaG9ydFByZWFtYmxlKSB7CisgICAgICAgIHBEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlID0gcERldmljZS0+YnlTaG9ydFByZWFtYmxlOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgcERldmljZS0+YnlQcmVhbWJsZVR5cGUgPSBQUkVBTUJMRV9MT05HOworICAgIH0KKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRtYTA6IHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9ICVkIFxuIiwgcERldmljZS0+d0N1cnJlbnRSYXRlKTsKKworCisgICAgaWYgKHBEZXZpY2UtPndDdXJyZW50UmF0ZSA8PSBSQVRFXzExTSkgeworICAgICAgICBieVBrdFR5cCA9IFBLX1RZUEVfMTFCOworICAgIH0gZWxzZSBpZiAocERldmljZS0+ZUN1cnJlbnRQSFlUeXBlID09IFBIWV9UWVBFXzExQSkgeworICAgICAgICBieVBrdFR5cCA9IFBLX1RZUEVfMTFBOworICAgIH0gZWxzZSB7CisgICAgICAgIGlmIChwRGV2aWNlLT5iUHJvdGVjdE1vZGUgPT0gVFJVRSkgeworICAgICAgICAgICAgYnlQa3RUeXAgPSBQS19UWVBFXzExR0I7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBieVBrdFR5cCA9IFBLX1RZUEVfMTFHQTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGlmIChwRGV2aWNlLT5iRW5jcnlwdGlvbkVuYWJsZSA9PSBUUlVFKQorICAgICAgICBiTmVlZEVuY3J5cHRpb24gPSBUUlVFOworCisgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSB7CisgICAgICAgIHBUcmFuc21pdEtleSA9ICZTVGVtcEtleTsKKyAgICAgICAgcFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5ieUNpcGhlclN1aXRlOworICAgICAgICBwVHJhbnNtaXRLZXktPmR3S2V5SW5kZXggPSBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmR3S2V5SW5kZXg7CisgICAgICAgIHBUcmFuc21pdEtleS0+dUtleUxlbmd0aCA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVdlcEtleUxlbmd0aDsKKyAgICAgICAgcFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2ID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5kd1RTQzQ3XzE2OworICAgICAgICBwVHJhbnNtaXRLZXktPndUU0MxNV8wID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53VFNDMTVfMDsKKyAgICAgICAgbWVtY3B5KHBUcmFuc21pdEtleS0+YWJ5S2V5LAorICAgICAgICAgICAgJnBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYWJ5V2VwS2V5WzBdLAorICAgICAgICAgICAgcFRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoCisgICAgICAgICAgICApOworICAgIH0KKyAgICB2R2VuZXJhdGVGSUZPSGVhZGVyKHBEZXZpY2UsIGJ5UGt0VHlwLCBwRGV2aWNlLT5wYnlUbXBCdWZmLCBiTmVlZEVuY3J5cHRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICBjYkZyYW1lQm9keVNpemUsIFRZUEVfVFhETUEwLCBwSGVhZFRELAorICAgICAgICAgICAgICAgICAgICAgICAgJnBEZXZpY2UtPnNUeEV0aEhlYWRlciwgKFBCWVRFKXNrYi0+ZGF0YSwgcFRyYW5zbWl0S2V5LCB1Tm9kZUluZGV4LAorICAgICAgICAgICAgICAgICAgICAgICAgJnVNQUNmcmFnTnVtLAorICAgICAgICAgICAgICAgICAgICAgICAgJmNiSGVhZGVyU2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgIGlmIChNQUNiSXNSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19QU0NUTCwgUFNDVExfUFMpKSB7CisgICAgICAgIC8vIERpc2FibGUgUFMKKyAgICAgICAgTUFDYlBTV2FrZXVwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgIH0KKworICAgIHBEZXZpY2UtPmJQV0JpdE9uID0gRkFMU0U7CisKKyAgICBwTGFzdFREID0gcEhlYWRURDsKKyAgICBmb3IgKGlpID0gMDsgaWkgPCB1TUFDZnJhZ051bTsgaWkrKykgeworICAgICAgICAvLyBQb2xsIFRyYW5zbWl0IHRoZSBhZGFwdGVyCisgICAgICAgIHdtYigpOworICAgICAgICBwSGVhZFRELT5tX3RkMFREMC5mMU93bmVyPU9XTkVEX0JZX05JQzsKKyAgICAgICAgd21iKCk7CisgICAgICAgIGlmIChpaSA9PSAodU1BQ2ZyYWdOdW0gLSAxKSkKKyAgICAgICAgICAgIHBMYXN0VEQgPSBwSGVhZFREOworICAgICAgICBwSGVhZFREID0gcEhlYWRURC0+bmV4dDsKKyAgICB9CisKKyAgICAvLyBTYXZlIHRoZSBpbmZvcm1hdGlvbiBuZWVkZWQgYnkgdGhlIHR4IGludGVycnVwdCBoYW5kbGVyCisgICAgLy8gdG8gY29tcGxldGUgdGhlIFNlbmQgcmVxdWVzdAorICAgIHBMYXN0VEQtPnBUREluZm8tPnNrYiA9IHNrYjsKKyAgICBwTGFzdFRELT5wVERJbmZvLT5ieUZsYWdzID0gMDsKKyAgICBwTGFzdFRELT5wVERJbmZvLT5ieUZsYWdzIHw9IFREX0ZMQUdTX05FVElGX1NLQjsKKworICAgIHBEZXZpY2UtPmFwQ3VyclREW1RZUEVfVFhETUEwXSA9IHBIZWFkVEQ7CisKKyAgICBNQUN2VHJhbnNtaXQwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworCisKKyAgICByZXR1cm4gVFJVRTsKK30KKworLy9UWVBFX0FDMERNQSBkYXRhIHR4CisjaWZkZWYgUFJJVkFURV9PQkoKKworaW50ICBfX2RldmljZV94bWl0KEhBTkRMRSBwRXhEZXZpY2UsIHN0cnVjdCBza19idWZmICpza2IpIHsKKyAgICBQU0RldmljZV9pbmZvIHBEZXZpY2VfaW5mbyA9IChQU0RldmljZV9pbmZvKXBFeERldmljZTsKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKShwRGV2aWNlX2luZm8tPnBXRGV2aWNlKTsKKyAgICBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ID0gcERldmljZV9pbmZvLT5kZXY7CisgICAgcmVmX3NrX2J1ZmYgICAgIHJlZl9za2I7CisKKyNlbHNlCitzdGF0aWMgaW50ICBkZXZpY2VfeG1pdChzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KSB7CisgICAgUFNEZXZpY2UgcERldmljZT1uZXRkZXZfcHJpdihkZXYpOworCisjZW5kaWYKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBQU1R4RGVzYyAgICAgICAgcEhlYWRURCwgcExhc3RURDsKKyAgICBVSU5UICAgICAgICAgICAgdU5vZGVJbmRleCA9IDA7CisgICAgQllURSAgICAgICAgICAgIGJ5TWFza1s4XSA9IHsxLCAyLCA0LCA4LCAweDEwLCAweDIwLCAweDQwLCAweDgwfTsKKyAgICBXT1JEICAgICAgICAgICAgd0FJRDsKKyAgICBVSU5UICAgICAgICAgICAgdU1BQ2ZyYWdOdW0gPSAxOworICAgIFVJTlQgICAgICAgICAgICBjYkZyYW1lQm9keVNpemU7CisgICAgQllURSAgICAgICAgICAgIGJ5UGt0VHlwOworICAgIFVJTlQgICAgICAgICAgICBjYkhlYWRlclNpemU7CisgICAgQk9PTCAgICAgICAgICAgIGJOZWVkRW5jcnlwdGlvbiA9IEZBTFNFOworICAgIFBTS2V5SXRlbSAgICAgICBwVHJhbnNtaXRLZXkgPSBOVUxMOworICAgIFNLZXlJdGVtICAgICAgICBTVGVtcEtleTsKKyAgICBVSU5UICAgICAgICAgICAgaWk7CisgICAgQk9PTCAgICAgICAgICAgIGJUS0lQX1VzZUdUSyA9IEZBTFNFOworICAgIEJPT0wgICAgICAgICAgICBiTmVlZERlQXV0aCA9IEZBTFNFOworICAgIFBCWVRFICAgICAgICAgICBwYnlCU1NJRDsKKyAgICBCT09MICAgICAgICAgICAgYk5vZGVFeGlzdCA9IEZBTFNFOworCisKKworICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgIGlmIChwRGV2aWNlLT5iTGlua1Bhc3MgPT0gRkFMU0UpIHsKKyAgICAgICAgZGV2X2tmcmVlX3NrYl9pcnEoc2tiKTsKKyAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJTdG9wRGF0YVBrdCkgeworICAgICAgICBkZXZfa2ZyZWVfc2tiX2lycShza2IpOworICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICByZXR1cm4gMDsKKyAgICB9CisKKyNpZmRlZiBQUklWQVRFX09CSgorICAgIHJlZl9za2JfcmVtYXAocERldmljZS0+ZGV2LCAmcmVmX3NrYiwgc2tiKTsKKyNlbmRpZgorCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAocERldmljZS0+dUFzc29jQ291bnQgPT0gMCkgeworICAgICAgICAgICAgZGV2X2tmcmVlX3NrYl9pcnEoc2tiKTsKKyAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgfQorI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgICAgIGlmIChJU19NVUxUSUNBU1RfQUREUkVTUygoUEJZVEUpKHJlZl9za2IuZGF0YSkpKSB7CisjZWxzZQorICAgICAgICBpZiAoSVNfTVVMVElDQVNUX0FERFJFU1MoKFBCWVRFKShza2ItPmRhdGEpKSkgeworI2VuZGlmCisgICAgICAgICAgICB1Tm9kZUluZGV4ID0gMDsKKyAgICAgICAgICAgIGJOb2RlRXhpc3QgPSBUUlVFOworICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbMF0uYlBTRW5hYmxlKSB7CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmKHBNZ210LT5zTm9kZURCVGFibGVbMF0uc1R4UFNRdWV1ZSksIHJlZl9za2Iuc2tiKTsKKyNlbHNlCisgICAgICAgICAgICAgICAgc2tiX3F1ZXVlX3RhaWwoJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnNUeFBTUXVldWUpLCBza2IpOworI2VuZGlmCisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS53RW5RdWV1ZUNudCsrOworICAgICAgICAgICAgICAgIC8vIHNldCB0eCBtYXAKKyAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5UFNUeE1hcFswXSB8PSBieU1hc2tbMF07CisgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgICAgIH0KK31lbHNlIHsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgaWYgKEJTU0RCYklzU1RBSW5Ob2RlREIocE1nbXQsIChQQllURSkocmVmX3NrYi5kYXRhKSwgJnVOb2RlSW5kZXgpKSB7CisjZWxzZQorICAgICAgICAgICAgaWYgKEJTU0RCYklzU1RBSW5Ob2RlREIocE1nbXQsIChQQllURSkoc2tiLT5kYXRhKSwgJnVOb2RlSW5kZXgpKSB7CisjZW5kaWYKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iUFNFbmFibGUpIHsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5zVHhQU1F1ZXVlLCByZWZfc2tiLnNrYik7CisjZWxzZQorICAgICAgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5zVHhQU1F1ZXVlLCBza2IpOworI2VuZGlmCisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud0VuUXVldWVDbnQrKzsKKyAgICAgICAgICAgICAgICAgICAgLy8gc2V0IHR4IG1hcAorICAgICAgICAgICAgICAgICAgICB3QUlEID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53QUlEOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5UFNUeE1hcFt3QUlEID4+IDNdIHw9ICBieU1hc2tbd0FJRCAmIDddOworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJTZXQ6cE1nbXQtPmFieVBTVHhNYXBbJWRdPSAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHdBSUQgPj4gMyksIHBNZ210LT5hYnlQU1R4TWFwW3dBSUQgPj4gM10pOworICAgICAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iU2hvcnRQcmVhbWJsZSkgeworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVByZWFtYmxlVHlwZSA9IHBEZXZpY2UtPmJ5U2hvcnRQcmVhbWJsZTsKKworICAgICAgICAgICAgICAgIH1lbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlQcmVhbWJsZVR5cGUgPSBQUkVBTUJMRV9MT05HOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBiTm9kZUV4aXN0ID0gVFJVRTsKKworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYgKGJOb2RlRXhpc3QgPT0gRkFMU0UpIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0RFQlVHIlVua25vd24gU1RBIG5vdCBmb3VuZCBpbiBub2RlIERCIFxuIik7CisgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiX2lycShza2IpOworICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICB9CisgICAgfQorCisgICAgcEhlYWRURCA9IHBEZXZpY2UtPmFwQ3VyclREW1RZUEVfQUMwRE1BXTsKKworICAgIHBIZWFkVEQtPm1fdGQxVEQxLmJ5VENSID0gKFRDUl9FRFB8VENSX1NUUCk7CisKKworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgbWVtY3B5KHBEZXZpY2UtPnNUeEV0aEhlYWRlci5hYnlEc3RBZGRyLCAoUEJZVEUpKHJlZl9za2IuZGF0YSksIFVfSEVBREVSX0xFTik7CisgICAgY2JGcmFtZUJvZHlTaXplID0gKihyZWZfc2tiLmxlbikgLSBVX0hFQURFUl9MRU47CisjZWxzZQorICAgIG1lbWNweShwRGV2aWNlLT5zVHhFdGhIZWFkZXIuYWJ5RHN0QWRkciwgKFBCWVRFKShza2ItPmRhdGEpLCBVX0hFQURFUl9MRU4pOworICAgIGNiRnJhbWVCb2R5U2l6ZSA9IHNrYi0+bGVuIC0gVV9IRUFERVJfTEVOOworI2VuZGlmCisgICAgLy8gODAyLjFICisgICAgaWYgKG50b2hzKHBEZXZpY2UtPnNUeEV0aEhlYWRlci53VHlwZSkgPiBNQVhfREFUQV9MRU4pIHsKKyAgICAgICAgY2JGcmFtZUJvZHlTaXplICs9IDg7CisgICAgfQorCisKKyAgICBpZiAocERldmljZS0+YkVuY3J5cHRpb25FbmFibGUgPT0gVFJVRSkgeworICAgICAgICBiTmVlZEVuY3J5cHRpb24gPSBUUlVFOworICAgICAgICAvLyBnZXQgVHJhbnNtaXQga2V5CisgICAgICAgIGRvIHsKKyAgICAgICAgICAgIGlmICgocERldmljZS0+cE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX1NUQSkgJiYKKyAgICAgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQykpIHsKKyAgICAgICAgICAgICAgICBwYnlCU1NJRCA9IHBEZXZpY2UtPmFieUJTU0lEOworICAgICAgICAgICAgICAgIC8vIGdldCBwYWlyd2lzZSBrZXkKKyAgICAgICAgICAgICAgICBpZiAoS2V5YkdldFRyYW5zbWl0S2V5KCYocERldmljZS0+c0tleSksIHBieUJTU0lELCBQQUlSV0lTRV9LRVksICZwVHJhbnNtaXRLZXkpID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGdldCBncm91cCBrZXkKKyAgICAgICAgICAgICAgICAgICAgaWYoS2V5YkdldFRyYW5zbWl0S2V5KCYocERldmljZS0+c0tleSksIHBieUJTU0lELCBHUk9VUF9LRVksICZwVHJhbnNtaXRLZXkpID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJUS0lQX1VzZUdUSyA9IFRSVUU7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9ERUJVRyJHZXQgR1RLLlxuIik7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0RFQlVHIkdldCBQVEsuXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfWVsc2UgaWYgKHBEZXZpY2UtPnBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSB7CisKKyAgICAgICAgICAgICAgICBwYnlCU1NJRCA9IHBEZXZpY2UtPnNUeEV0aEhlYWRlci5hYnlEc3RBZGRyOyAgLy9UT19EUyA9IDAgYW5kIEZST01fRFMgPSAwIC0tPiA4MDIuMTEgTUFDIEFkZHJlc3MxCisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fREVCVUciSUJTUyBTZXJhY2ggS2V5OiBcbiIpOworICAgICAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaTwgNjsgaWkrKykKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fREVCVUciJXggXG4iLCAqKHBieUJTU0lEK2lpKSk7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fREVCVUciXG4iKTsKKworICAgICAgICAgICAgICAgIC8vIGdldCBwYWlyd2lzZSBrZXkKKyAgICAgICAgICAgICAgICBpZihLZXliR2V0VHJhbnNtaXRLZXkoJihwRGV2aWNlLT5zS2V5KSwgcGJ5QlNTSUQsIFBBSVJXSVNFX0tFWSwgJnBUcmFuc21pdEtleSkgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyBnZXQgZ3JvdXAga2V5CisgICAgICAgICAgICBwYnlCU1NJRCA9IHBEZXZpY2UtPmFieUJyb2FkY2FzdEFkZHI7CisgICAgICAgICAgICBpZihLZXliR2V0VHJhbnNtaXRLZXkoJihwRGV2aWNlLT5zS2V5KSwgcGJ5QlNTSUQsIEdST1VQX0tFWSwgJnBUcmFuc21pdEtleSkgPT0gRkFMU0UpIHsKKyAgICAgICAgICAgICAgICBwVHJhbnNtaXRLZXkgPSBOVUxMOworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5wTWdtdC0+ZUN1cnJNb2RlID09I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isgICAgaWYgKHBUcmFuc21pdEtleSAhPSBOVUxMKSB7CisgICAgICAgIGlmICgocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfV0VQKSAmJgorICAgICAgICAgICAgKHBUcmFuc21pdEtleS0+dUtleUxlbmd0aCA9PSBXTEFOX1dFUDIzMl9LRVlMRU4pKSB7CisgICAgICAgICAgICB1TUFDZnJhZ051bSA9IDE7IC8vV0VQMjU2IGRvZXNuJ3Qgc3VwcG9ydCBmcmFnbWVudAorICAgICAgICB9CisgICAgfQorCisgICAgYnlQa3RUeXAgPSAoQllURSlwRGV2aWNlLT5ieVBhY2tldFR5cGU7CisKKyAgICBpZiAocERldmljZS0+YkZpeFJhdGUpIHsKKyNpZmRlZglQTElDRV9ERUJVRworCXByaW50aygiRml4IFJhdGU6IFBoeVR5cGUgaXMgJWQsQ29ubmVjdGlvblJhdGUgaXMgJWRcbiIscERldmljZS0+ZUN1cnJlbnRQSFlUeXBlLHBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZSk7CisjZW5kaWYKKworICAgICAgICBpZiAocERldmljZS0+ZUN1cnJlbnRQSFlUeXBlID09IFBIWV9UWVBFXzExQikgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZSA+PSBSQVRFXzExTSkgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IFJBVEVfMTFNOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT53Q3VycmVudFJhdGUgPSAoV09SRClwRGV2aWNlLT51Q29ubmVjdGlvblJhdGU7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBpZiAoKHBEZXZpY2UtPmVDdXJyZW50UEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpICYmCisgICAgICAgICAgICAgICAgKHBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZSA8PSBSQVRFXzZNKSkgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IFJBVEVfNk07CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT51Q29ubmVjdGlvblJhdGUgPj0gUkFURV81NE0pCisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IFJBVEVfNTRNOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gKFdPUkQpcERldmljZS0+dUNvbm5lY3Rpb25SYXRlOworCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcERldmljZS0+YnlBQ0tSYXRlID0gKEJZVEUpIHBEZXZpY2UtPndDdXJyZW50UmF0ZTsKKyAgICAgICAgcERldmljZS0+YnlUb3BDQ0tCYXNpY1JhdGUgPSBSQVRFXzFNOworICAgICAgICBwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUgPSBSQVRFXzZNOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgLy9hdXRvIHJhdGUKKyAgICBpZiAocERldmljZS0+c1R4RXRoSGVhZGVyLndUeXBlID09IFRZUEVfUEtUXzgwMl8xeCkgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVDdXJyZW50UEhZVHlwZSAhPSBQSFlfVFlQRV8xMUEpIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT53Q3VycmVudFJhdGUgPSBSQVRFXzFNOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5QUNLUmF0ZSA9IFJBVEVfMU07CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlUb3BDQ0tCYXNpY1JhdGUgPSBSQVRFXzFNOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5VG9wT0ZETUJhc2ljUmF0ZSA9IFJBVEVfNk07CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IFJBVEVfNk07CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlBQ0tSYXRlID0gUkFURV82TTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVRvcENDS0Jhc2ljUmF0ZSA9IFJBVEVfMU07CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlUb3BPRkRNQmFzaWNSYXRlID0gUkFURV82TTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKwkJVk5UV0lGSXZHZXRUeFJhdGUoICBwRGV2aWNlLT5wTWdtdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+c1R4RXRoSGVhZGVyLmFieURzdEFkZHIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocERldmljZS0+d0N1cnJlbnRSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwRGV2aWNlLT5ieUFDS1JhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBEZXZpY2UtPmJ5VG9wQ0NLQmFzaWNSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUpKTsKKworI2lmIDAKK3ByaW50aygiYXV0byByYXRlOlJhdGUgOiAlZCxBY2tSYXRlOiVkLFRvcENDS1JhdGU6JWQsVG9wT0ZETVJhdGU6JWRcbiIsCitwRGV2aWNlLT53Q3VycmVudFJhdGUscERldmljZS0+YnlBQ0tSYXRlLAorcERldmljZS0+YnlUb3BDQ0tCYXNpY1JhdGUscERldmljZS0+YnlUb3BPRkRNQmFzaWNSYXRlKTsKKworI2VuZGlmCisKKyNpZiAwCisKKwlwRGV2aWNlLT53Q3VycmVudFJhdGUgPSAxMTsKKwlwRGV2aWNlLT5ieUFDS1JhdGUgPSA4OworCXBEZ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ICAgIGJOZWVkRW5jcnlwdGlvbiA9IEZBTFNFOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJQa3QgVHlwZT0lMDR4XG4iLCAocERldmljZS0+c1R4RXRoSGVhZGVyLndUeXBlKSk7CisgICAgICAgICAgICBpZiAoKHBEZXZpY2UtPnBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19TVEEpICYmIChwRGV2aWNlLT5wTWdtdC0+ZUN1cnJTdGF0ZSA9PSBXTUFDX1NUQVRFX0FTU09DKSkgeworICAgICAgICAgICAgICAgIGlmIChwVHJhbnNtaXRLZXkgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkRvbid0IEZpbmQgVFggS0VZXG4iKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChiVEtJUF9Vc2VHVEsgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJlcnJvcjogS0VZIGlzIEdUSyEhfn5cbiIpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJGaW5kIFBUSyBbJWxYXVxuIiwgcFRyYW5zbWl0S2V5LT5kd0tleUluZGV4KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJOZWVkRW5jcnlwdGlvbiA9IFRSVUU7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieUNudE1lYXN1cmUgPT0gMikgeworICAgICAgICAgICAgICAgIGJOZWVkRGVBdXRoID0gVFJVRTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5zODAyXzExQ291bnRlci5US0lQQ291bnRlck1lYXN1cmVzSW52b2tlZCsrOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RXRVApIHsKKyAgICAgICAgICAgICAgICBpZiAoKHVOb2RlSW5kZXggIT0gMCkgJiYKKyAgICAgICAgICAgICAgICAgICAgKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdLZXlJbmRleCAmIFBBSVJXSVNFX0tFWSkpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJGaW5kIFBUSyBbJWxYXVxuIiwgcFRyYW5zbWl0S2V5LT5kd0tleUluZGV4KTsKKyAgICAgICAgICAgICAgICAgICAgYk5lZWRFbmNyeXB0aW9uID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGlmIChwVHJhbnNtaXRLZXkgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icmV0dXJuIG5vIHR4IGtleVxuIik7CisgICAgICAgICAgICAgICAgZGV2X2tmcmVlX3NrYl9pcnEoc2tiKTsKKyAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisKKyNpZmRlZiBQUklWQVRFX09CSgorICAgIHZHZW5lcmF0ZUZJRk9IZWFkZXIocERldmljZSwgYnlQa3RUeXAsIHBEZXZpY2UtPnBieVRtcEJ1ZmYsIGJOZWVkRW5jcnlwdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgIGNiRnJhbWVCb2R5U2l6ZSwgVFlQRV9BQzBETUEsIHBIZWFkVEQsCisgICAgICAgICAgICAgICAgICAgICAgICAmcERldmljZS0+c1R4RXRoSGVhZGVyLCAoUEJZVEUpcmVmX3NrYi5kYXRhLCBwVHJhbnNtaXRLZXksIHVOb2RlSW5kZXgsCisgICAgICAgICAgICAgICAgICAgICAgICAmdU1BQ2ZyYWdOdW0sCisgICAgICAgICAgICAgICAgICAgICAgICAmY2JIZWFkZXJTaXplCisgICAgICAgICAgICAgICAgICAgICAgICApOworI2Vsc2UKKyNpZmRlZglQTElDRV9ERUJVRworCS8vaWYgKHNrYi0+bGVuID09IDk4KQorCS8veworCS8vCXByaW50aygicGluZzpsZW4gaXMgJWRcbiIpOworCS8vfQorI2VuZGlmCisgICAgdkdlbmVyYXRlRklGT0hlYWRlcihwRGV2aWNlLCBieVBrdFR5cCwgcERldmljZS0+cGJ5VG1wQnVmZiwgYk5lZWRFbmNyeXB0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgY2JGcmFtZUJvZHlTaXplLCBUWVBFX0FDMERNQSwgcEhlYWRURCwKKyAgICAgICAgICAgICAgICAgICAgICAgICZwRGV2aWNlLT5zVHhFdGhIZWFkZXIsIChQQllURSlza2ItPmRhdGEsIHBUcmFuc21pdEtleSwgdU5vZGVJbmRleCwKKyAgICAgICAgICAgICAgICAgICAgICAgICZ1TUFDZnJhZ051bSwKKyAgICAgICAgICAgICAgICAgICAgICAgICZjYkhlYWRlclNpemUKKyAgICAgICAgICAgICAgICAgICAgICAgICk7CisjZW5kaWYKKworICAgIGlmIChNQUNiSXNSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19QU0NUTCwgUFNDVExfUFMpKSB7CisgICAgICAgIC8vIERpc2FibGUgUFMKKyAgICAgICAgTUFDYlBTV2FrZXVwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgIH0KKyAgICBwRGV2aWNlLT5iUFdCaXRPbiA9IEZBTFNFOworCisgICAgcExhc3RURCA9IHBIZWFkVEQ7CisgICAgZm9yIChpaSA9IDA7IGlpIDwgdU1BQ2ZyYWdOdW07IGlpKyspIHsKKyAgICAgICAgLy8gUG9sbCBUcmFuc21pdCB0aGUgYWRhcHRlcgorICAgICAgICB3bWIoKTsKKyAgICAgICAgcEhlYWRURC0+bV90ZDBURDAuZjFPd25lcj1PV05FRF9CWV9OSUM7CisgICAgICAgIHdtYigpOworICAgICAgICBpZiAoaWkgPT0gdU1BQ2ZyYWdOdW0gLSAxKQorICAgICAgICAgICAgcExhc3RURCA9IHBIZWFkVEQ7CisgICAgICAgIHBIZWFkVEQgPSBwSGVhZFRELT5uZXh0OworICAgIH0KKworICAgIC8vIFNhdmUgdGhlIGluZm9ybWF0aW9uIG5lZWRlZCBieSB0aGUgdHggaW50ZXJydXB0IGhhbmRsZXIKKyAgICAvLyB0byBjb21wbGV0ZSB0aGUgU2VuZCByZXF1ZXN0CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICBwTGFzdFRELT5wVERJbmZvLT5za2IgPSByZWZfc2tiLnNrYjsKKyNlbHNlCisgICAgcExhc3RURC0+cFRESW5mby0+c2tiID0gc2tiOworI2VuZGlmCisgICAgcExhc3RURC0+cFRESW5mby0+YnlGbGFncyA9IDA7CisgICAgcExhc3RURC0+cFRESW5mby0+YnlGbGFncyB8PSBURF9GTEFHU19ORVRJRl9TS0I7CisjaWZkZWYgVHhJblNsZWVwCisgIHBEZXZpY2UtPm5UeERhdGFUaW1lQ291dD0wOyAvLzIwMDgtOC0yMSBjaGVzdGVyIDxhZGQ+IGZvciBzZW5kIG51bGwgcGFja2V0CisgICNlbmRpZgorICAgIGlmIChBVkFJTF9URChwRGV2aWNlLCBUWVBFX0FDMERNQSkgPD0gMSkgeworICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKGRldik7CisgICAgfQorCisgICAgcERldmljZS0+YXBDdXJyVERbV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vbF9WZXJzaW9uPT0yKSkgJiYKKwkgICAgICAgIChQYWNrZXRfVHlwZT09MykpIHsgIC8vODAyLjF4IE9SIGVhcG9sLWtleSBjaGFsbGVuZ2UgZnJhbWUgdHJhbnNmZXIKKyAgICAgICAgICAgICAgICAgICAgICAgIGJUeGVhcG9sX2tleSA9IFRSVUU7CisJCWlmKChEZXNjcmlwdG9yX3R5cGU9PTI1NCl8fChEZXNjcmlwdG9yX3R5cGU9PTIpKSB7ICAgICAgIC8vV1BBIG9yIFJTTgorICAgICAgICAgICAgICAgICAgICAgICBpZighKEtleV9pbmZvICYgQklUMykgJiYgICAvL2dyb3VwLWtleSBjaGFsbGVuZ2UKKwkJCSAgIChLZXlfaW5mbyAmIEJJVDgpICYmIChLZXlfaW5mbyAmIEJJVDkpKSB7ICAgIC8vc2VuZCAyLzIga2V5CisJCQkgIHBEZXZpY2UtPmZXUEFfQXV0aGVuZWQgPSBUUlVFOworCQkJICBpZihEZXNjcmlwdG9yX3R5cGU9PTI1NCkKKwkJCSAgICAgIHByaW50aygiV1BBICIpOworCQkJICBlbHNlCisJCQkgICAgICBwcmludGsoIldQQTIgIik7CisJCQkgIHByaW50aygiQXV0aGVudGljYXRpb24gY29tcGxldGVkISFcbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkgfQorICAgICAgICAgICAgIH0KKyAgIH0KK30KKworICAgIE1BQ3ZUcmFuc21pdEFDMChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKy8vICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImFjZG1hMDpwRGV2aWNlLT5hcEN1cnJURD0gJXBcbiIsIHBIZWFkVEQpOworCisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICByZWZfc2V0X3R4X2ppZmZpZXMocERldmljZS0+ZGV2KTsKKyNlbHNlCisgICAgZGV2LT50cmFuc19zdGFydCA9IGppZmZpZXM7CisjZW5kaWYKKworICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgcmV0dXJuIDA7CisKK30KKworI2lmZGVmIFBSSVZBVEVfT0JKCisKK2ludCBfX2RldmljZV9pbnRyKGludCBpcnEsIEhBTkRMRSBwRXhEZXZpY2UsIHN0cnVjdCBwdF9yZWdzICpyZWdzKSB7CisgICAgUFNEZXZpY2VfaW5mbyBwRGV2aWNlX2luZm8gPSAoUFNEZXZpY2VfaW5mbylwRXhEZXZpY2U7CisgICAgUFNEZXZpY2UgICAgcERldmljZSA9IChQU0RldmljZSkocERldmljZV9pbmZvLT5wV0RldmljZSk7CisKKworI2Vsc2UKK3N0YXRpYyAgaXJxcmV0dXJuX3QgIGRldmljZV9pbnRyKGludCBpcnEsICB2b2lkICpkZXZfaW5zdGFuY2UpIHsKKyAgICBzdHJ1Y3QgbmV0X2RldmljZSogZGV2PWRldl9pbnN0YW5jZTsKKyAgICBQU0RldmljZSAgICAgcERldmljZT0oUFNEZXZpY2UpIG5ldGRldl9wcml2KGRldik7CisjZW5kaWYKKworICAgIGludCAgICAgICAgICAgICBtYXhfY291bnQ9MDsKKyAgICBEV09SRCAgICAgICAgICAgZHdNSUJDb3VudGVyPTA7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisgICAgQllURSAgICAgICAgICAgIGJ5T3JnUGFnZVNlbD0wOworICAgIGludCAgICAgICAgICAgICBoYW5kbGVkID0gMDsKKyAgICBCWVRFICAgICAgICAgICAgYnlEYXRhID0gMDsKKyAgICBpbnQgICAgICAgICAgICAgaWk9IDA7CisvLyAgICBCWVRFICAgICAgICAgICAgYnlSU1NJOworCisKKyAgICBNQUN2UmVhZElTUihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAmcERldmljZS0+ZHdJc3IpOworCisgICAgaWYgKHBEZXZpY2UtPmR3SXNyID09IDApCisgICAgICAgIHJldHVybiBJUlFfUkVUVkFMKGhhbmRsZWQpOworCisgICAgaWYgKHBEZXZpY2U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AgICBlbHNlCisgICAgICAgIGJ5T3JnUGFnZVNlbCA9IDA7CisKKyAgICBNQUN2UmVhZE1JQkNvdW50ZXIocERldmljZS0+UG9ydE9mZnNldCwgJmR3TUlCQ291bnRlcik7CisgICAgLy8gVEJELi4uLgorICAgIC8vIE11c3QgZG8gdGhpcyBhZnRlciBkb2luZyByeC90eCwgY2F1c2UgSVNSIGJpdCBpcyBzbG93CisgICAgLy8gdGhhbiBSRC9URCB3cml0ZSBiYWNrCisgICAgLy8gdXBkYXRlIElTUiBjb3VudGVyCisgICAgU1RBdlVwZGF0ZTgwMl8xMUNvdW50ZXIoJnBEZXZpY2UtPnM4MDJfMTFDb3VudGVyLCAmcERldmljZS0+c2NTdGF0aXN0aWMgLCBkd01JQkNvdW50ZXIpOworICAgIHdoaWxlIChwRGV2aWNlLT5kd0lzciAhPSAwKSB7CisKKyAgICAgICAgU1RBdlVwZGF0ZUlzclN0YXRDb3VudGVyKCZwRGV2aWNlLT5zY1N0YXRpc3RpYywgcERldmljZS0+ZHdJc3IpOworICAgICAgICBNQUN2V3JpdGVJU1IocERldmljZS0+UG9ydE9mZnNldCwgcERldmljZS0+ZHdJc3IpOworCisgICAgICAgIGlmIChwRGV2aWNlLT5kd0lzciAmIElTUl9GRVRBTEVSUil7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgSVNSX0ZFVEFMRVJSIFxuIik7CisgICAgICAgICAgICBWTlN2T3V0UG9ydEIocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfU09GVFBXUkNUTCwgMCk7CisgICAgICAgICAgICBWTlN2T3V0UG9ydFcocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfU09GVFBXUkNUTCwgU09GVFBXUkNUTF9TV1BFQ1RJKTsKKyAgICAgICAgICAgIGRldmljZV9lcnJvcihwRGV2aWNlLCBwRGV2aWNlLT5kd0lzcik7CisgICAgICAgIH0KKworICAgICAgICBpZiAocERldmljZS0+YnlMb2NhbElEID4gUkVWX0lEX1ZUMzI1M19CMSkgeworCisgICAgICAgICAgICBpZiAoQklUYklzQml0T24ocERldmljZS0+ZHdJc3IsIElTUl9NRUFTVVJFU1RBUlQpKSB7CisgICAgICAgICAgICAgICAgLy8gODAyLjExaCBtZWFzdXJlIHN0YXJ0CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlPcmdDaGFubmVsID0gcERldmljZS0+YnlDdXJyZW50Q2g7CisgICAgICAgICAgICAgICAgVk5TdkluUG9ydEIocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfUkNSLCAmKHBEZXZpY2UtPmJ5T3JnUkNSKSk7CisgICAgICAgICAgICAgICAgVk5Tdk91dFBvcnRCKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JDUiwgKFJDUl9SWEFMTFRZUEUgfCBSQ1JfVU5JQ0FTVCB8IFJDUl9CUk9BRENBU1QgfCBSQ1JfTVVMVElDQVNUIHwgUkNSX1dQQUVSUikpOworICAgICAgICAgICAgICAgIE1BQ3ZTZWxlY3RQYWdlMShwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgICAgICBWTlN2SW5Qb3J0RChwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19NQVIwLCAmKHBEZXZpY2UtPmR3T3JnTUFSMCkpOworICAgICAgICAgICAgICAgIFZOU3ZJblBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX01BUjQsICYocERldmljZS0+ZHdPcmdNQVI0KSk7CisgICAgICAgICAgICAgICAgTUFDdlNlbGVjdFBhZ2UwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgLy94eHh4CisgICAgICAgICAgICAgICAvLyBXQ01EYkZsdXNoQ29tbWFuZFF1ZXVlKHBEZXZpY2UtPnBNZ210LCBUUlVFKTsKKyAgICAgICAgICAgICAgICBpZiAoQ0FSRGJTZXRDaGFubmVsKHBEZXZpY2UsIHBEZXZpY2UtPnBDdXJyTWVhc3VyZUVJRC0+c1JlcS5ieUNoYW5uZWwpID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+Yk1lYXN1cmVJblByb2dyZXNzID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgTUFDdlNlbGVjdFBhZ2UxKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgICAgICBNQUN2UmVnQml0c09uKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfTVNSQ1RMLCBNU1JDVExfUkVBRFkpOworICAgICAgICAgICAgICAgICAgICBNQUN2U2VsZWN0UGFnZTAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5QmFzaWNNYXAgPSAwOworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUNDQUZyYWN0aW9uID0gMDsKKyAgICAgICAgICAgICAgICAgICAgZm9yKGlpPTA7aWk8ODtpaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5kd1JQSXNbaWldID0gMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGNhbiBub3QgbWVhc3VyZSBiZWNhdXNlIHNldCBjaGFubmVsIGZhaWwKKyAgICAgICAgICAgICAgICAgICAvLyBXQ01EYlJlc2V0Q29tbWFuZFF1ZXVlKHBEZXZpY2UtPnBNZ210KTsKKyAgICAgICAgICAgICAgICAgICAgLy8gY2xlYXIgbWVhc3VyZSBjb250cm9sCisgICAgICAgICAgICAgICAgICAgIE1BQ3ZSZWdCaXRzT2ZmKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfTVNSQ1RMLCBNU1JDVExfRU4pOworICAgICAgICAgICAgICAgICAgICBzX3ZDb21wbGV0ZUN1cnJlbnRNZWFzdXJlKHBEZXZpY2UsIE1FQVNVUkVfTU9ERV9JTkNBUEFCTEUpOworICAgICAgICAgICAgICAgICAgICBNQUN2U2VsZWN0UGFnZTEocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgICAgIE1BQ3ZSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19NU1JDVEwrMSwgTVNSQ1RMMV9UWFBBVVNFKTsKKyAgICAgICAgICAgICAgICAgICAgTUFDdlNlbGVjdFBhZ2UwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmIChCSVRiSXNCaXRPbihwRGV2aWNlLT5kd0lzciwgSVNSX01FQVNVUkVFTkQpKSB7CisgICAgICAgICAgICAgICAgLy8gODAyLjExaCBtZWFzdXJlIGVuZAorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJNZWFzdXJlSW5Qcm9ncmVzcyA9IEZBTFNFOworICAgICAgICAgICAgICAgIFZOU3ZPdXRQb3J0QihwRGV2aWNlLT5Qb3J0T2Zmc2V0ICsgTUFDX1JFR19SQ1IsIHBEZXZpY2UtPmJ5T3JnUkNSKTsKKyAgICAgICAgICAgICAgICBNQUN2U2VsZWN0UGFnZTEocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX01BUjAsIHBEZXZpY2UtPmR3T3JnTUFSMCk7CisgICAgICAgICAgICAgICAgVk5Tdk91dFBvcnREKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX01BUjQsIHBEZXZpY2UtPmR3T3JnTUFSNCk7CisgICAgICAgICAgICAgICAgVk5TdkluUG9ydEIocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfTVNSQkJTVFMsICZieURhdGEpOworIC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AgICAgICAgICBzX3ZDb21wbGV0ZUN1cnJlbnRNZWFzdXJlKHBEZXZpY2UsIDApOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGNhbiBub3QgbWVhc3VyZSBiZWNhdXNlIG5vdCByZWFkeSBiZWZvcmUgZW5kIG9mIG1lYXN1cmUgdGltZQorICAgICAgICAgICAgICAgICAgICBzX3ZDb21wbGV0ZUN1cnJlbnRNZWFzdXJlKHBEZXZpY2UsIE1FQVNVUkVfTU9ERV9MQVRFKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoQklUYklzQml0T24ocERldmljZS0+ZHdJc3IsIElTUl9RVUlFVFNUQVJUKSkgeworICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgOworICAgICAgICAgICAgICAgIH0gd2hpbGUgKENBUkRiU3RhcnRRdWlldChwRGV2aWNlKSA9PSBGQUxTRSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAocERldmljZS0+ZHdJc3IgJiBJU1JfVEJUVCkgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVGaXJzdFF1aWV0ID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieVF1aWV0U3RhcnRDb3VudC0tOworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieVF1aWV0U3RhcnRDb3VudCA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJFbmFibGVGaXJzdFF1aWV0ID0gRkFMU0U7CisgICAgICAgICAgICAgICAgICAgIE1BQ3ZTZWxlY3RQYWdlMShwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgICAgICAgICAgTUFDdlJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX01TUkNUTCwgKE1TUkNUTF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CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BREhPQykgeworICAgICAgICAgICAgICAgIC8vcERldmljZS0+YkJlYWNvblNlbnQgPSBGQUxTRTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKChwRGV2aWNlLT5iVXBkYXRlQkJWR0EpICYmIChwRGV2aWNlLT5iTGlua1Bhc3MgPT0gVFJVRSkgJiYgKHBEZXZpY2UtPnVDdXJyUlNTSSAhPSAwKSkgeworICAgICAgICAgICAgICAgICAgICBMT05HICAgICAgICAgICAgbGRCbTsKKworICAgICAgICAgICAgICAgICAgICBSRnZSU1NJVG9kQm0ocERldmljZSwgKEJZVEUpIHBEZXZpY2UtPnVDdXJyUlNTSSwgJmxkQm0pOworICAgICAgICAgICAgICAgICAgICBmb3IgKGlpPTA7aWk8QkJfVkdBX0xFVkVMO2lpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsZEJtIDwgcERldmljZS0+bGRCbVRocmVzaG9sZFtpaV0pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUJCVkdBTmV3ID0gcERldmljZS0+YWJ5QkJWR0FbaWldOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieUJCVkdBTmV3ICE9IHBEZXZpY2UtPmJ5QkJWR0FDdXJyZW50KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT51QkJWR0FEaWZmQ291bnQrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT51QkJWR0FEaWZmQ291bnQgPT0gMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZpcnN0IFZHQSBkaWZmIGdhaW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCQnZTZXRWR0FHYWluT2Zmc2V0KHBEZXZpY2UsIHBEZXZpY2UtPmJ5QkJWR0FOZXcpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRmlyc3QgUlNTSVslZF0gTmV3R2FpblslZF0gT2xkR2FpblslZF0gQ291bnRbJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50KWxkQm0sIHBEZXZpY2UtPmJ5QkJWR0FOZXcsIHBEZXZpY2UtPmJ5QkJWR0FDdXJyZW50LCAoaW50KXBEZXZpY2UtPnVCQlZHQURpZmZDb3VudCk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAocERldmljZS0+dUJCVkdBRGlmZkNvdW50ID49IEJCX1ZHQV9DSEFOR0VfVEhSRVNIT0xEKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJSU1NJWyVkXSBOZXdHYWluWyVkXSBPbGRHYWluWyVkXSBDb3VudFslZF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnQpbGRCbSwgcERldmljZS0+YnlCQlZHQU5ldywgcERldmljZS0+YnlCQlZHQUN1cnJlbnQsIChpbnQpcERldmljZS0+dUJCVkdBRGlmZkNvdW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCQnZTZXRWR0FHYWluT2Zmc2V0KHBEZXZpY2UsIHBEZXZpY2UtPmJ5QkJWR0FOZXcpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+dUJCVkdBRGlmZkNvdW50ID0gMTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgcERldmljZS0+YkJlYWNvblNlbnQgPSBGQUxTRTsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iRW5hYmxlUFNNb2RlKSB7CisgICAgICAgICAgICAgICAgUFNiSXNOZXh0VEJUVFdha2VVcCgoSEFORExFKXBEZXZpY2UpOworICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgaWYgKChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApIHx8CisgICAgICAgICAgICAgICAgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BREhPQykpIHsKKworICAgICAgICAgICAgICAgIE1BQ3ZPbmVTaG90VGltZXIxTWljcm9TZWMocERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgIChwTWdtdC0+d0lCU1NCZWFjb25QZXJpb2QgLSBNQUtFX0JFQUNPTl9SRVNFUlZFRCkgPDwgMTApOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DICYmIHBEZXZpY2UtPnBNZ210LT53Q3VyckFUSU1XaW5kb3cgPiAwKSB7CisgICAgICAgICAgICAgICAgLy8gdG9kbyBhZGhvYyBQUyBtb2RlCisgICAgICAgICAgICB9OworCisgICAgICAgIH0KKworICAgICAgICBpZiAocERldmljZS0+ZHdJc3IgJiBJU1JfQk5UWCkgeworCisgICAgICAgICAgICBpZiAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+YklzQmVhY29uQnVmUmVhZHlTZXQgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5jYkJlYWNvbkJ1ZlJlYWR5U2V0Q250ID0gMDsKKyAgICAgICAgICAgIH07CisKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApIHsKKyAgICAgICAgICAgICAgICBpZihwTWdtdC0+YnlEVElNQ291bnQgPiAwKSB7CisgICAgICAgICAgICAgICAgICAgcE1nbXQtPmJ5RFRJTUNvdW50IC0tOworICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0uYlJ4UFNQb2xsID0gRkFMU0U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZihwTWdtdC0+YnlEVElNQ291bnQgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgbXV0bHRjYXN0IHR4IGJ1ZmZlcnJpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5ieURUSU1Db3VudCA9IHBNZ210LT5ieURUSU1QZXJpb2QgLSAxOworICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS5iUnhQU1BvbGwgPSBUUlVFOworICAgICAgICAgICAgICAgICAgICAgICAgYlNjaGVkdWxlQ29tbWFuZCgoSEFORExFKXBEZXZpY2UsIFdMQU5fQ01EX1JYX1BTUE9MTCwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBwRGV2aWNlLT5iQmVhY29uU2VudCA9IFRSVUU7CisKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iQ2hhbm5lbFN3aXRjaCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlDaGFubmVsU3dpdGNoQ291bnQtLTsKKyAgICAgICAgICAgICAgICBpZiAocERldmljZS0+YnlDaGFubmVsU3dpdGNoQ291bnQgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5iQ2hhbm5lbFN3aXRjaCA9IEZBTFNFOworICAgICAgICAgICAgICAgICAgICBDQVJEYlNldENoYW5uZWwocERldmljZSwgcERldmljZS0+YnlOZXdDaGFubmVsKTsKKyAgICAgICAgICAgICAgICAgICAgVk5UV0lGSWJDaGFubmVsU3dpdGNoKHBEZXZpY2UtPnBNZ210LCBwRGV2aWNlLT5ieU5ld0NoYW5uZWwpOworICAgICAgICAgICAgICAgICAgICBNQUN2U2VsZWN0UGFnZTEocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICAgICAgICAgIE1BQ3ZSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19NU1JDVEwrMSwgTVNSQ1RMMV9UWFBBVVNFKTsKKyAgICAgICAgICAgICAgICAgICAgTUFDdlNlbGVjdFBhZ2UwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgICAgICAvL1ZOVFdJRkliU2VuZEJlYWNvbihwRGV2aWNlLT5wTWdtdCk7CisgICAgICAgICAgICAgICAgICAgIENBUkRiU3RhcnRUeFBhY2tldChwRGV2aWNlLCBQS1RfVFlQRV84MDJfMTFfQUxMKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorCisgICAgICAgIGlmIChwRGV2aWNlLT5kd0lzciAmIElTUl9SWERNQTApIHsKKyAgICAgICAgICAgIG1heF9jb3VudCArPSBkZXZpY2Vfcnhfc3J2KHBEZXZpY2UsIFRZUEVfUlhETUEwKTsKKyAgICAgICAgfQorICAgICAgICBpZiAocERldmljZS0+ZHdJc3IgJiBJU1JfUlhETUExKSB7CisgICAgICAgICAgICBtYXhfY291bnQgKz0gZGV2aWNlX3J4X3NydihwRGV2aWNlLCBUWVBFX1JYRE1BMSk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmR3SXNyICYgSVNSX1RYRE1BMCl7CisgICAgICAgICAgICBtYXhfY291bnQgKz0gZGV2aWNlX3R4X3NydihwRGV2aWNlLCBUWVBFX1RYRE1BMCk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmR3SXNyICYgSVNSX0FDMERNQSl7CisgICAgICAgICAgICBtYXhfY291bnQgKz0gZGV2aWNlX3R4X3NydihwRGV2aWNlLCBUWVBFX0FDMERNQSk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmR3SXNyICYgSVNSX1NPRlRUSU1FUikgeworCisgICAgICAgIH0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmR3SXNyICYgSVNSX1NPRlRUSU1FUjEpIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApIHsKKyAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iU2hvcnRTbG90VGltZSkKKyAgICAgICAgICAgICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvIHw9IFdMQU5fU0VUX0NBUF9JTkZPX1NIT1JUU0xPVFRJTUUoMSk7CisgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbyAmPSB+KFdMQU5fU0VUX0NBUF9JTkZPX1NIT1JUU0xPVFRJTUUoMSkpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYk1nclByZXBhcmVCZWFjb25Ub1NlbmQocERldmljZSwgcE1nbXQpOworICAgICAgICAgICAgcERldmljZS0+YnlDbnRNZWFzdXJlID0gMDsKKyAgICAgICAgfQorCisgICAgICAgIE1BQ3ZSZWFkSVNSKHBEZXZpY2UtPlBvcnRPZmZzZXQsICZwRGV2aWNlLT5kd0lzcik7CisKKyAgICAgICAgTUFDdlJlY2VpdmUwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICBNQUN2UmVjZWl2ZTEocERldmljZS0+UG9ydE9mZnNldCk7CisKKyAgICAgICAgaWYgKG1heF9jb3VudD5wRGV2aWNlLT5zT3B0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BzdHJ1Y3QgaWZyZXEgKnJxLCBpbnQgY21kKSB7CisJUFNEZXZpY2UJICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKW5ldGRldl9wcml2KGRldik7CisjZW5kaWYKKworI2lmZGVmIFdJUkVMRVNTX0VYVAorCXN0cnVjdCBpd3JlcSAqd3JxID0gKHN0cnVjdCBpd3JlcSAqKSBycTsKKwlpbnQgICAgICAgICAgICAgICAgIHJjID0wOworI2VuZGlmCisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFBTQ21kUmVxdWVzdCAgICAgICAgcFJlcTsKKworCisgICAgaWYgKHBNZ210ID09IE5VTEwpIHsKKyAgICAgICAgcmMgPSAtRUZBVUxUOworICAgICAgICByZXR1cm4gcmM7CisgICAgfQorCisgICAgc3dpdGNoKGNtZCkgeworCisjaWZkZWYgV0lSRUxFU1NfRVhUCisvLyNpZiBXSVJFTEVTU19FWFQgPCAxMworCisJY2FzZSBTSU9DR0lXTkFNRToKKwkJcmMgPSBpd2N0bF9naXduYW1lKGRldiwgTlVMTCwgKGNoYXIgKikmKHdycS0+dS5uYW1lKSwgTlVMTCk7CisJCWJyZWFrOworCisJY2FzZSBTSU9DR0lXTldJRDogICAgIC8vMHg4YjAzICBzdXBwb3J0CisJI2lmZGVmICBXUEFfU1VQUExJQ0FOVF9EUklWRVJfV0VYVF9TVVBQT1JUCisgICAgICAgICAgcmMgPSBpd2N0bF9naXdud2lkKGRldiwgTlVMTCwgJih3cnEtPnUubndpZCksIE5VTEwpOworCSNlbHNlCisgICAgICAgIHJjID0gLUVPUE5PVFNVUFA7CisJI2VuZGlmCisJCWJyZWFrOworCisJCS8vIFNldCBmcmVxdWVuY3kvY2hhbm5lbAorCWNhc2UgU0lPQ1NJV0ZSRVE6CisJICAgIHJjID0gaXdjdGxfc2l3ZnJlcShkZXYsIE5VTEwsICYod3JxLT51LmZyZXEpLCBOVUxMKTsKKwkJYnJlYWs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nVmZmVyKTsKKwkJICAgICAgICBpZiAocmMgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKHdycS0+dS5kYXRhLnBvaW50ZXIsCisJCQkJCSAgICAgICAgICAgICAgICBidWZmZXIsCisJCQkJCSAgICAgICAgICAgICAgICh3cnEtPnUuZGF0YS5sZW5ndGggKiAoc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcikgKyAgc2l6ZW9mKHN0cnVjdCBpd19xdWFsaXR5KSkpCisJCQkJICAgICAgICApKQorCQkJCSAgICByYyA9IC1FRkFVTFQ7CisJCSAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisJCWJyZWFrOworCisKKyNpZmRlZiBXSVJFTEVTU19TUFkKKwkJLy8gU2V0IHRoZSBzcHkgbGlzdAorCWNhc2UgU0lPQ1NJV1NQWToKKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ1NJV1NQWSBcbiIpOworCQlyYyA9IC1FT1BOT1RTVVBQOworCQlicmVhazsKKworCQkvLyBHZXQgdGhlIHNweSBsaXN0CisJY2FzZSBTSU9DR0lXU1BZOgorCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBTSU9DU0lXU1BZIFxuIik7CisJCXJjID0gLUVPUE5PVFNVUFA7CisJCWJyZWFrOworCisjZW5kaWYgLy8gV0lSRUxFU1NfU1BZCisKKwljYXNlIFNJT0NHSVdQUklWOgorICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ0dJV1BSSVYgXG4iKTsKKwkJcmMgPSAtRU9QTk9UU1VQUDsKKy8qCisJCWlmKHdycS0+dS5kYXRhLnBvaW50ZXIpIHsKKwkJCXdycS0+dS5kYXRhLmxlbmd0aCA9IHNpemVvZihpd2N0bF9wcml2YXRlX2FyZ3MpIC8gc2l6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S5kYXRhKTsKKyNlbmRpZiAvLyBXSVJFTEVTU19FWFQgPiA4CisgICAgICAgIGJyZWFrOworCisJY2FzZSBTSU9DRVRIVE9PTDoKKyAgICAgICAgcmV0dXJuIGV0aHRvb2xfaW9jdGwoZGV2LCAodm9pZCAqKSBycS0+aWZyX2RhdGEpOworCS8vIEFsbCBvdGhlciBjYWxscyBhcmUgY3VycmVudGx5IHVuc3VwcG9ydGVkCisKKwlkZWZhdWx0OgorCQlyYyA9IC1FT1BOT1RTVVBQOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJJb2N0bCBjb21tYW5kIG5vdCBzdXBwb3J0Li4leFxuIiwgY21kKTsKKworCisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJDb21taXQpIHsKKyAgICAgICBpZiAocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0FQKSB7CisgICAgICAgICAgIG5ldGlmX3N0b3BfcXVldWUocERldmljZS0+ZGV2KTsKKyAgICAgICAgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgIGJTY2hlZHVsZUNvbW1hbmQoKEhBTkRMRSlwRGV2aWNlLCBXTEFOX0NNRF9SVU5fQVAsIE5VTEwpOworICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgIH0KKyAgICAgICBlbHNlIHsKKyAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiQ29tbWl0IHRoZSBzZXR0aW5nc1xuIik7CisgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICBwRGV2aWNlLT5iTGlua1Bhc3MgPSBGQUxTRTsKKyAgICAgICAgICAgbWVtc2V0KHBNZ210LT5hYnlDdXJyQlNTSUQsIDAsIDYpOworICAgICAgICAgICBwTWdtdC0+ZUN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KyNlbmRpZiAvLyNpZm5kZWYgUFJJVkFURV9PQkoKKworI2lmZGVmIFBSSVZBVEVfT0JKCisKKworaW50IF9fZGV2aWNlX2h3X3Jlc2V0KEhBTkRMRSBwRXhEZXZpY2UpeworICAgICBQU0RldmljZV9pbmZvIHBEZXZpY2VfaW5mbyA9IChQU0RldmljZV9pbmZvKXBFeERldmljZTsKKworICAgICByZXR1cm4gTUFDYlNvZnR3YXJlUmVzZXQocERldmljZV9pbmZvLT5wb3J0X29mZnNldCk7Cit9CisKKworaW50IF9fZGV2aWNlX2h3X2luaXQoSEFORExFIHBFeERldmljZSl7CisgICAgUFNEZXZpY2VfaW5mbyBwRGV2aWNlX2luZm8gPSAoUFNEZXZpY2VfaW5mbylwRXhEZXZpY2U7CisgICAgUFNEZXZpY2UgICAgcERldmljZTsKKworICAgIHBEZXZpY2UgPSAoUFNEZXZpY2Upa21hbGxvYyhzaXplb2YoREVWSUNFX0lORk8pLCAoaW50KUdGUF9BVE9NSUMpOworICAgIGlmIChwRGV2aWNlID09IE5VTEwpCisgICAgICAgIHJldHVybiBGQUxTRTsKKworICAgIG1lbXNldChwRGV2aWNlLCAwLCBzaXplb2YoREVWSUNFX0lORk8pKTsKKyAgICBwRGV2aWNlX2luZm8tPnBXRGV2aWNlID0gcERldmljZTsKKyAgICBwRGV2aWNlLT5Qb3J0T2Zmc2V0ID0gcERldmljZV9pbmZvLT5wb3J0X29mZnNldDsKKyAgICBwRGV2aWNlLT5kZXYgPSBwRGV2aWNlX2luZm8tPmRldjsKKyAgICBwRGV2aWNlLT5wY2lkID0gcERldmljZV9pbmZvLT5wY2lkOworICAgIHBEZXZpY2UtPmNoaXBfaWQgPSBwRGV2aWNlX2luZm8tPmNoaXBfaWQ7CisgICAgcERldmljZS0+bWVtYWRkciA9IHBEZXZpY2VfaW5mby0+bWVtX2FkZHI7CisgICAgcERldmljZS0+aW9hZGRyID0gcERldmljZV9pbmZvLT5pb19hZGRyOworICAgIHBEZXZpY2UtPmlvX3NpemUgPSBwRGV2aWNlX2luZm8tPmlvX3NpemU7CisgICAgcERldmljZS0+blR4UXVldWVzID0gcERldmljZV9pbmZvLT5uVHhRdWV1ZXM7CisgICAgcERldmljZS0+bXVsdGljYXN0X2xpbWl0ID0gcERldmljZV9pbmZvLT5tdWx0aWNhc3RfbGltaXQ7CisgICAgcERldmljZS0+c01nbXRPYmoucEFkYXB0ZXIgPSAoUFZPSUQpcERldmljZTsKKyAgICBwRGV2aWNlLT5wTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworICAgIE1BQ3ZJbml0aWFsaXplKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgIGRldmljZV9nZXRfb3B0aW9ucyhwRGV2aWNlLCAwICwgcERldmljZV9pbmZvLT5kZXYtPm5hbWUpOworICAgIGRldmljZV9zZXRfb3B0aW9ucyhwRGV2aWNlKTsKKyAgICBwRGV2aWNlLT5zT3B0cy5mbGFncyAmPSBwRGV2aWNlX2luZm8tPmZsYWdzOworICAgIHBEZXZpY2UtPmZsYWdzID0gcERldmljZS0+c09wdHMuZmxhZ3MgfCAocERldmljZV9pbmZvLT5mbGFncyAmIDB4RkYwMDAwMDBVTCk7CisgICAgc3Bpbl9sb2NrX2luaXQoJihwRGV2aWNlLT5sb2NrKSk7CisKKyAgICByZXR1cm4gVFJVRTsKK30KKworCit2b2lkIF9fZGV2aWNlX3JlYWRfbWFjKEhBTkRMRSBwRXhEZXZpY2UsIFBCWVRFIGRldl9hZGRyKXsKKyAgICBQU0RldmljZV9pbmZvIHBEZXZpY2VfaW5mbyA9IChQU0RldmljZV9pbmZvKXBFeERldmljZTsKKyAgICBQU0RldmljZSAgICBwRGV2aWNlID0gKFBTRGV2aWNlKShwRGV2aWNlX2luZm8tPnBXRGV2aWNlKTsKKworICAgIE1BQ3ZSZWFkRXRoZXJBZGRyZXNzKHBEZXZpY2UtPlBvcnRPZmZzZXQsIGRldl9hZGRyKTsKKyAgICByZXR1cm47Cit9CisKKworI2VuZGlmCis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ICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBzdHJ1Y3Qgc2tfYnVmZiogc2tiLAorICAgIElOIFVJTlQgICAgIEZyYW1lU2l6ZSwKKyAgICBJTiBVSU5UICAgICBjYkhlYWRlck9mZnNldCwKKyAgICBJTiBJTlQgICAgICBpU0FOb2RlSW5kZXgsCisgICAgSU4gSU5UICAgICAgaURBTm9kZUluZGV4CisgICAgKTsKKyNlbmRpZgorCisKK3N0YXRpYyBCT09MIHNfYkhhbmRsZVJ4RW5jcnlwdGlvbigKKyAgICBJTiBQU0RldmljZSAgICAgcERldmljZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5RnJhbWUsCisgICAgSU4gVUlOVCAgICAgICAgIEZyYW1lU2l6ZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5UnNyLAorICAgIE9VVCBQQllURSAgICAgICBwYnlOZXdSc3IsCisgICAgT1VUIFBTS2V5SXRlbSAgICpwS2V5T3V0LAorICAgIE9VVCBQQk9PTCAgICAgICBwYkV4dElWLAorICAgIE9VVCBQV09SRCAgICAgICBwd1J4VFNDMTVfMCwKKyAgICBPVVQgUERXT1JEICAgICAgcGR3UnhUU0M0N18xNgorICAgICk7CisKK3N0YXRpYyBCT09MIHNfYkhvc3RXZXBSeEVuY3J5cHRpb24oCisKKyAgICBJTiBQU0RldmljZSAgICAgcERldmljZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5RnJhbWUsCisgICAgSU4gVUlOVCAgICAgICAgIEZyYW1lU2l6ZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5UnNyLAorICAgIElOIEJPT0wgICAgICAgICBiT25GbHksCisgICAgSU4gUFNLZXlJdGVtICAgIHBLZXksCisgICAgT1VUIFBCWVRFICAgICAgIHBieU5ld1JzciwKKyAgICBPVVQgUEJPT0wgICAgICAgcGJFeHRJViwKKyAgICBPVVQgUFdPUkQgICAgICAgcHdSeFRTQzE1XzAsCisgICAgT1VUIFBEV09SRCAgICAgIHBkd1J4VFNDNDdfMTYKKworICAgICk7CisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qKworICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgVHJhbnNsYXRlIFJjdiA4MDIuMTEgaGVhZGVyIHRvIDgwMi4zIGhlYWRlciB3aXRoIFJ4IGJ1ZmZlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UKKyAqICAgICAgZHdSeEJ1ZmZlckFkZHIgIC0gQWRkcmVzcyBvZiBSY3YgQnVmZmVyCisgKiAgICAgIGNiUGFja2V0U2l6ZSAgICAtIFJjdiBQYWNrZXQgc2l6ZQorICogICAgICBiSXNXRVAgICAgICAgICAgLSBJZiBSY3Ygd2l0aCBXRVAKKyAqICBPdXQ6CisgKiAgICAgIHBjYkhlYWRlclNpemUgICAtIDgwMi4xMSBoZWFkZXIgc2l6ZQorICoKKyAqIFJldHVybiBWYWx1ZTogTm9uZQorICoKKy0qLworc3RhdGljCitWT0lECitzX3ZQcm9jZXNzUnhNQUNIZWFkZXIgKAorICAgIElOICBQU0RldmljZSBwRGV2aWNlLAorICAgIElOICBQQllURSBwYnlSeEJ1ZmZlckFkZHIsCisgICAgSU4gIFVJTlQgY2JQYWNrZXRTaXplLAorICAgIElOICBCT09MIGJJc1dFUCwKKyAgICBJTiAgQk9PTCBiRXh0SVYsCisgICAgT1VUIFBVSU5UIHBjYkhlYWRTaXplCisgICAgKQoreworICAgIFBCWVRFICAgICAgICAgICBwYnlSeEJ1ZmZlcjsKKyAgICBVSU5UICAgICAgICAgICAgY2JIZWFkZXJTaXplID0gMDsKKyAgICBQV09SRCAgICAgICAgICAgcHdUeXBlOworICAgIFBTODAyXzExSGVhZGVyICBwTUFDSGVhZGVyOworICAgIGludCAgICAgICAgICAgICBpaTsKKworCisgICAgcE1BQ0hlYWRlciA9IChQUzgwMl8xMUhlYWRlcikgKHBieVJ4QnVmZmVyQWRkciArIGNiSGVhZGVyU2l6ZSk7CisKKyAgICBzX3ZHZXREQVNBKChQQllURSlwTUFDSGVhZGVyLCAmY2JIZWFkZXJTaXplLCAmcERldmljZS0+c1J4RXRoSGVhZGVyKTsKKworICAgIGlmIChiSXNXRVApIHsKKyAgICAgICAgaWYgKGJFeHRJVikgeworICAgICAgICAgICAgLy8gc3RyaXAgSVYmRXh0SVYgLCBhZGQgOCBieXRlCisgICAgICAgICAgICBjYkhlYWRlclNpemUgKz0gKFdMQU5fSERSX0FERFIzX0xFTiArIDgpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy8gc3RyaXAgSVYgLCBhZGQgNCBieXRlCisgICAgICAgICAgICBjYkhlYWRlclNpemUgKz0gKFdMQU5fSERSX0FERFIzX0xFTiArIDQpOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBjYkhlYWRlclNpemUgKz0gV0xBTl9IRFJfQUREUjNfTEVOOworICAgIH07CisKKyAgICBwYnlSeEJ1ZmZlciA9IChQQllURSkgKHBieVJ4QnVmZmVyQWRkciArIGNiSGVhZGVyU2l6ZSk7CisgICAgaWYgKElTX0VUSF9BRERSRVNTX0VRVUFMKHBieVJ4QnVmZmVyLCAmcERldmljZS0+YWJ5U05BUF9CcmlkZ2V0dW5uZWxbMF0pKSB7CisgICAgICAgIGNiSGVhZGVyU2l6ZSArPSA2OworICAgIH0KKyAgICBlbHNlIGlmIChJU19FVEhfQUREUkVTU19FUVVBTChwYnlSeEJ1ZmZlciwgJnBEZXZpY2UtPmFieVNOQVBfUkZDMTA0MlswXSkpIHsKKyAgICAgICAgY2JIZWFkZXJTaXplICs9IDY7CisgICAgICAgIHB3VHlwZSA9IChQV09SRCkgKHBieVJ4QnVmZmVyQWRkciArIGNiSGVhZGVyU2l6ZSk7CisgICAgICAgIGlmICgoKnB3VHlwZSE9IFRZUEVfUEtUX0lQWCkgJiYgKCpwd1R5cGUgIT0gY3B1X3RvX2xlMTYoMHhGMzgwKSkpIHsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGNiSGVhZGVyU2l6ZSAtPSA4OworICAgICAgICAgICAgcHdUeXBlID0gKFBXT1JEKSAocGJ5UnhCdWZmZXJBZGRyICsgY2JIZWFkZXJTaXplKTsKKyAgICAgICAgICAgIGlmIChiSXNXRVApIHsKKyAgICAgICAgICAgICAgICBpZiAoYkV4dElWKSB7CisgICAgICAgICAgICAgICAgICAgICpwd1R5cGUgPSBodG9ucyhjYlBhY2tldFNpemUgLSBXTEFOX0hEUl9BRERSM19MRU4gLSA4KTsgICAgLy8gOCBpcyBJViZFeHRJVgorICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICpwd1R5cGUgPSBodG9ucyhjYlBhY2tldFNpemUgLSBXTEFOX0hEUl9BRERSM19MRU4gLSA0KTsgICAgLy8gNCBpcyBJVgorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICpwd1R5cGUgPSBodG9ucyhjYlBhY2tldFNpemUgLSBXTEFOX0hEUl9BRERSM19MRU4pOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBjYkhlYWRlclNpemUgLT0gMjsKKyAgICAgICAgcHdUeXBlID0gKFBXT1JEKSAocGJ5UnhCdWZmZXJBZGRyICsgY2JIZWFkZXJTaXplKTsKKyAgICAgICAgaWYgKGJJc1dFUCkgeworICAgICAgICAgICAgaWYgKGJFeHRJVikgeworICAgICAgICAgICAgICAgICpwd1R5cGUgPSBodG9ucyhjYlBhY2tldFNpemUgLSBXTEFOX0hEUl9BRERSM19MRU4gLSA4KTsgICAgLy8gOCBpcyBJViZFeHRJVgorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAqcHdUeXBlID0gaHRvbnMoY2JQYWNrZXRTaXplIC0gV0xBTl9IRFJfQUREUjNfTEVOIC0gNCk7ICAgIC8vIDQgaXMgSVYKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwd1R5cGUgPSBodG9ucyhjYlBhY2tldFNpemUgLSBXTEFOX0hEUl9BRERSM19MRU4pOworICAgICAgICB9CisgICAgfQorCisgICAgY2JIZWFkZXJTaXplIC09IChVX0VUSEVSX0FERFJfTEVOICogMik7CisgICAgcGJ5UnhCdWZmZXIgPSAoUEJZVEUpIChwYnlSeEJ1ZmZlckFkZHIgKyBjYkhlYWRlclNpemUpOworICAgIGZvcihpaT0wO2lpPFVfRVRIRVJfQUREUl9MRU47aWkrKykKKyAgICAgICAgKnBieVJ4QnVmZmVyKysgPSBwRGV2aWNlLT5zUnhFdGhIZWFkZXIuYWJ5RHN0QWRkcltpaV07CisgICAgZm9yKGlpPTA7aWk8VV9FVEhFUl9BRERSX0xFTjtpaSsrKQorICAgICAgICAqcGJ5UnhCdWZmZXIrKyA9IHBEZXZpY2UtPnNSeEV0aEhlYWRlci5hYnlTcmNBZGRyW2lpXTsKKworICAgICpwY2JIZWFkU2l6ZSA9IGNiSGVhZGVyU2l6ZTsKK30KKworCisKKworc3RhdGljIEJZVEUgc19ieUdldFJhdGVJZHggKElOIEJZVEUgYnlSYXRlKQoreworICAgIEJZVEUgICAgYnlSYXRlSWR4OworCisgICAgZm9yIChieVJhdGVJZHggPSAwOyBieVJhdGVJZHggPE1BWF9SQVRFIDsgYnlSYXRlSWR4KyspIHsKKyAgICAgICAgaWYgKGFjYnlSeFJhdGVbYnlSYXRlSWR4JU1BWF9SQVRFXSA9PSBieVJhdGUpCisgICAgICAgICAgICByZXR1cm4gYnlSYXRlSWR4OworICAgIH0KKyAgICByZXR1cm4gMDsKK30KKworCitzdGF0aWMKK1ZPSUQKK3NfdkdldERBU0EgKAorICAgIElOICBQQllURSBwYnlSeEJ1ZmZlckFkZHIsCisgICAgT1VUIFBVSU5UIHBjYkhlYWRlclNpemUsCisgICAgT1VUIFBTRXRoZXJuZXRIZWFkZXIgcHNFdGhIZWFkZXIKKyAgICApCit7CisgICAgVUlOVCAgICAgICAgICAgIGNiSGVhZGVyU2l6ZSA9IDA7CisgICAgUFM4MDJfMTFIZWFkZXIgIHBNQUNIZWFkZXI7CisgICAgaW50ICAgICAgICAgICAgIGlpOworCisgICAgcE1BQ0hlYWRlciA9IChQUzgwMl8xMUhlYWRlcikgKHBieVJ4QnVmZmVyQWRkciArIGNiSGVhZGVyU2l6ZSk7CisKKyAgICBpZiAoKHBNQUNIZWFkZXItPndGcmFtZUN0bCAmIEZDX1RPRFMpID09IDApIHsKKyAgICAgICAgaWYgKHBNQUNIZWFkZXItPndGcmFtZUN0bCAmIEZDX0ZST01EUykgeworICAgICAgICAgICAgZm9yKGlpPTA7aWk8VV9FVEhFUl9BRERSX0xFTjtpaSsrKSB7CisgICAgICAgICAgICAgICAgcHNFdGhIZWFkZXItPmFieURzdEFkZHJbaWldID0gcE1BQ0hlYWRlci0+YWJ5QWRkcjFbaWldOworICAgICAgICAgICAgICAgIHBzRXRoSGVhZGVyLT5hYnlTcmNBZGRyW2lpXSA9IHBNQUNIZWFkZXItPmFieUFkZHIzW2lpXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIC8vIElCU1MgbW9kZQorICAgICAgICAgICAgZm9yKGlpPTA7aWk8VV9FVEhFUl9BRERSX0xFTjtpaSsrKSB7CisgICAgICAgICAgICAgICAgcHNFdGhIZWFkZXItPmFieURzdEFkZHJbaWldID0gcE1BQ0hlYWRlci0+YWJ5QWRkcjFbaWldOworICAgICAgICAgICAgICAgIHBzRXRoSGVhZGVyLT5hYnlTcmNBZGRyW2lpXSA9IHBNQUNIZWFkZXItPmFieUFkZHIyW2lpXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgLy8gSXMgQVAgbW9kZS4uCisgICAgICAgIGlmIChwTUFDSGVhZGVyLT53RnJhbWVDdGwgJiBGQ19GUk9NRFMpIHsKKyAgICAgICAgICAgIGZvcihpaT0wO2lpPFVfRVRIRVJfQUREUl9MRU47aWkrKykgeworICAgICAgICAgICAgICAgIHBzRXRoSGVhZGVyLT5hYnlEc3RBZGRyW2lpXSA9IHBNQUNIZWFkZXItPmFieUFkZHIzW2lpXTsKKyAgICAgICAgICAgICAgICBwc0V0aEhlYWRlci0+YWJ5U3JjQWRkcltpaV0gPSBwTUFDSGVhZGVyLT5hYnlBZGRyNFtpaV07CisgICAgICAgICAgICAgICAgY2JIZWFkZXJTaXplICs9IDY7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBmb3IoaWk9MDtpaTxVX0VUSEVSX0FERFJfTEVOO2lpKyspIHsKKyAgICAgICAgICAgICAgICBwc0V0aEhlYWRlci0+YWJ5RHN0QWRkcltpaV0gPSBwTUFDSGVhZGVyLT5hYnlBZGRyM1tpaV07CisgICAgICAgICAgICAgICAgcHNFdGhIZWFkZXItPmFieVNyY0FkZHJbaWldID0gcE1BQ0hlYWRlci0+YWJ5QWRkcjJbaWldOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfTsKKyAgICAqcGNiSGVhZGVyU2l6ZSA9IGNiSGVhZGVyU2l6ZTsKK30KKworCisKKworLy9QTElDRV9ERUJVRyAtPgorCitWT0lECU1uZ1dvcmtJdGVtKFBWT0lEIENvbnRleHQpCit7CisJUFNSeE1nbXRQYWNrZXQJCQlwUnhNZ210UGFja2V0OworCVBTRGV2aWNlCXBEZXZpY2UgPSAgKFBTRGV2aWNlKSBDb250ZXh0OworCS8vcHJpbnRrKCJFbnRlciBNbmdXb3JrSXRlbSxRdWV1ZSBwYWNrZXQgbnVtIGlzICVkXG4iLHBEZXZpY2UtPnJ4TWFuZVF1ZXVl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AgICAgICBwYnlSc3I7CisgICAgUEJZVEUgICAgICAgICAgIHBieU5ld1JzcjsKKyAgICBQQllURSAgICAgICAgICAgcGJ5UlNTSTsKKyAgICBQUVdPUkQgICAgICAgICAgcHF3VFNGVGltZTsKKyAgICBQV09SRCAgICAgICAgICAgcHdGcmFtZVNpemU7CisgICAgUEJZVEUgICAgICAgICAgIHBieUZyYW1lOworICAgIEJPT0wgICAgICAgICAgICBiRGVGcmFnUnggPSBGQUxTRTsKKyAgICBCT09MICAgICAgICAgICAgYklzV0VQID0gRkFMU0U7CisgICAgVUlOVCAgICAgICAgICAgIGNiSGVhZGVyT2Zmc2V0OworICAgIFVJTlQgICAgICAgICAgICBGcmFtZVNpemU7CisgICAgV09SRCAgICAgICAgICAgIHdFdGhlclR5cGUgPSAwOworICAgIElOVCAgICAgICAgICAgICBpU0FOb2RlSW5kZXggPSAtMTsKKyAgICBJTlQgICAgICAgICAgICAgaURBTm9kZUluZGV4ID0gLTE7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworICAgIFVJTlQgICAgICAgICAgICBjYklWT2Zmc2V0OworICAgIEJPT0wgICAgICAgICAgICBiRXh0SVYgPSBGQUxTRTsKKyAgICBQQllURSAgICAgICAgICAgcGJ5UnhTdHM7CisgICAgUEJZVEUgICAgICAgICAgIHBieVJ4UmF0ZTsKKyAgICBQQllURSAgICAgICAgICAgcGJ5U1E7CisgICAgVUlOVCAgICAgICAgICAgIGNiSGVhZGVyU2l6ZTsKKyAgICBQU0tleUl0ZW0gICAgICAgcEtleSA9IE5VTEw7CisgICAgV09SRCAgICAgICAgICAgIHdSeFRTQzE1XzAgPSAwOworICAgIERXT1JEICAgICAgICAgICBkd1J4VFNDNDdfMTYgPSAwOworICAgIFNLZXlJdGVtICAgICAgICBTVGVtcEtleTsKKyAgICAvLyA4MDIuMTFoIFJQSQorICAgIERXT1JEICAgICAgICAgICBkd0R1cmF0aW9uID0gMDsKKyAgICBMT05HICAgICAgICAgICAgbGRCbSA9IDA7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LT4KKyNpZiAxCisJLy8gdXBkYXRlIHJlY2VpdmUgc3RhdGlzdGljIGNvdW50ZXIKKyAgICBTVEF2VXBkYXRlUkRTdGF0Q291bnRlcigmcERldmljZS0+c2NTdGF0aXN0aWMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnBieVJzciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcGJ5TmV3UnNyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICpwYnlSeFJhdGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJ5RnJhbWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJhbWVTaXplKTsKKworI2VuZGlmCisKKyAgcE1BQ0hlYWRlcj0oUFM4MDJfMTFIZWFkZXIpKChQQllURSkgKHNrYi0+ZGF0YSkrOCk7CisvL1BMSUNFX0RFQlVHPC0KKwlpZiAocERldmljZS0+Yk1lYXN1cmVJblByb2dyZXNzID09IFRSVUUpIHsKKyAgICAgICAgaWYgKCgqcGJ5UnNyICYgUlNSX0NSQ09LKSAhPSAwKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5ieUJhc2ljTWFwIHw9IDB4MDE7CisgICAgICAgIH0KKyAgICAgICAgZHdEdXJhdGlvbiA9IChGcmFtZVNpemUgPDwgNCk7CisgICAgICAgIGR3RHVyYXRpb24gLz0gYWNieVJ4UmF0ZVsqcGJ5UnhSYXRlJU1BWF9SQVRFXTsKKyAgICAgICAgaWYgKCpwYnlSeFJhdGUgPD0gUkFURV8xMU0pIHsKKyAgICAgICAgICAgIGlmIChCSVRiSXNCaXRPbigqcGJ5UnhTdHMsIDB4MDEpKSB7CisgICAgICAgICAgICAgICAgLy8gbG9uZyBwcmVhbWJsZQorICAgICAgICAgICAgICAgIGR3RHVyYXRpb24gKz0gMTkyOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBzaG9ydCBwcmVhbWJsZQorICAgICAgICAgICAgICAgIGR3RHVyYXRpb24gKz0gOTY7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBkd0R1cmF0aW9uICs9IDE2OworICAgICAgICB9CisgICAgICAgIFJGdlJTU0lUb2RCbShwRGV2aWNlLCAqcGJ5UlNTSSwgJmxkQm0pOworICAgICAgICBsZEJtVGhyZXNob2xkID0gLTU3OworICAgICAgICBmb3IgKGlpID0gNzsgaWkgPiAwOykgeworICAgICAgICAgICAgaWYgKGxkQm0gPiBsZEJtVGhyZXNob2xkKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBsZEJtVGhyZXNob2xkIC09IDU7CisgICAgICAgICAgICBpaS0tOworICAgICAgICB9CisgICAgICAgIHBEZXZpY2UtPmR3UlBJc1tpaV0gKz0gZHdEdXJhdGlvbjsKKyAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH0KKworICAgIGlmICghSVNfTVVMVElDQVNUX0FERFJFU1MocGJ5RnJhbWUpICYmICFJU19CUk9BRENBU1RfQUREUkVTUyhwYnlGcmFtZSkpIHsKKyAgICAgICAgaWYgKFdDVExiSXNEdXBsaWNhdGUoJihwRGV2aWNlLT5zRHVwUnhDYWNoZSksIChQUzgwMl8xMUhlYWRlcikgKHNrYi0+ZGF0YSArIDQpKSkgeworICAgICAgICAgICAgcERldmljZS0+czgwMl8xMUNvdW50ZXIuRnJhbWVEdXBsaWNhdGVDb3VudCsrOworICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICB9CisgICAgfQorCisKKyAgICAvLyBVc2UgZm9yIFRLSVAgTUlDCisgICAgc192R2V0REFTQShza2ItPmRhdGErNCwgJmNiSGVhZGVyU2l6ZSwgJnBEZXZpY2UtPnNSeEV0aEhlYWRlcik7CisKKyAgICAvLyBmaWx0ZXIgcGFja2V0IHNlbmQgZnJvbSBteXNlbGYKKyAgICBpZiAoSVNfRVRIX0FERFJFU1NfRVFVQUwoKFBCWVRFKSYocERldmljZS0+c1J4RXRoSGVhZGVyLmFieVNyY0FkZHJbMF0pLCBwRGV2aWNlLT5hYnlDdXJyZW50TmV0QWRkcikpCisgICAgICAgIHJldHVybiBGQUxTRTsKKworICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSB8fCAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfSUJTU19TVEEpKSB7CisgICAgICAgIGlmIChJU19DVExfUFNQT0xMKHBieUZyYW1lKSB8fCAhSVNfVFlQRV9DT05UUk9MKHBieUZyYW1lKSkgeworICAgICAgICAgICAgcDgwMl8xMUhlYWRlciA9IChQUzgwMl8xMUhlYWRlcikgKHBieUZyYW1lKTsKKyAgICAgICAgICAgIC8vIGdldCBTQSBOb2RlSW5kZXgKKyAgICAgICAgICAgIGlmIChCU1NEQmJJc1NUQUluTm9kZURCKHBNZ210LCAoUEJZVEUpKHA4MDJfMTFIZWFkZXItPmFieUFkZHIyKSwgJmlTQU5vZGVJbmRleCkpIHsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS51bExhc3RSeEppZmZlciA9IGdldF9qaWZmaWVzKCk7CisjZWxzZQorICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS51bExhc3RSeEppZmZlciA9IGppZmZpZXM7CisjZW5kaWYKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0udUluQWN0aXZlQ291bnQgPSAwOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAoc19iQVBNb2RlUnhDdGwocERldmljZSwgcGJ5RnJhbWUsIGlTQU5vZGVJbmRleCkgPT0gVFJVRSkgeworICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICB9CisgICAgfQorICAgIGlmIChJU19GQ19XRVAocGJ5RnJhbWUpKSB7CisgICAgICAgIEJPT0wgICAgIGJSeERlY3J5T0sgPSBGQUxTRTsKKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInJ4IFdFUCBwa3RcbiIpOworICAgICAgICBiSXNXRVAgPSBUUlVFOworICAgICAgICBpZiAoKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSAmJiAoaVNBTm9kZUluZGV4ID49IDApKSB7CisgICAgICAgICAgICBwS2V5ID0gJlNUZW1wS2V5OworICAgICAgICAgICAgcEtleS0+YnlDaXBoZXJTdWl0ZSA9IHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5ieUNpcGhlclN1aXRlOworICAgICAgICAgICAgcEtleS0+ZHdLZXlJbmRleCA9IHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5kd0tleUluZGV4OworICAgICAgICAgICAgcEtleS0+dUtleUxlbmd0aCA9IHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS51V2VwS2V5TGVuZ3RoOworICAgICAgICAgICAgcEtleS0+ZHdUU0M0N18xNiA9IHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5kd1RTQzQ3XzE2OworICAgICAgICAgICAgcEtleS0+d1RTQzE1XzAgPSBwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0ud1RTQzE1XzA7CisgICAgICAgICAgICBtZW1jcHkocEtleS0+YWJ5S2V5LAorICAgICAgICAgICAgICAgICZwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uYWJ5V2VwS2V5WzBdLAorICAgICAgICAgICAgICAgIHBLZXktPnVLZXlMZW5ndGgKKyAgICAgICAgICAgICAgICApOworCisgICAgICAgICAgICBiUnhEZWNyeU9LID0gc19iSG9zdFdlcFJ4RW5jcnlwdGlvbihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJ5RnJhbWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGcmFtZVNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlSc3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uYk9uRmx5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBieU5ld1JzciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZiRXh0SVYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmd1J4VFNDMTVfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkd1J4VFNDNDdfMTYpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgYlJ4RGVjcnlPSyA9IHNfYkhhbmRsZVJ4RW5jcnlwdGlvbihwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJ5RnJhbWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGcmFtZVNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlSc3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlOZXdSc3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcEtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZiRXh0SVYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmd1J4VFNDMTVfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkd1J4VFNDNDdfMTYpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGJSeERlY3J5T0spIHsKKyAgICAgICAgICAgIGlmICgoKnBieU5ld1JzciAmIE5FV1JTUl9ERUNSWVBUT0spID09IDApIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIklDViBGYWlsXG4iKTsKKyAgICAgICAgICAgICAgICBpZiAoIChwRGV2aWNlLT5wTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQSkgfHwKKyAgICAgICAgICAgICAgICAgICAgKHBEZXZpY2UtPnBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBUFNLKSB8fAorICAgICAgICAgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEFOT05FKSB8fAorICAgICAgICAgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSB8fAorICAgICAgICAgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyUFNLKSkgeworCisgICAgICAgICAgICAgICAgICAgIGlmICgocEtleSAhPSBOVUxMKSAmJiAocEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1RLSVApKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5zODAyXzExQ291bnRlci5US0lQSUNWRXJyb3JzKys7CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHBLZXkgIT0gTlVMTCkgJiYgKHBLZXktPmJ5Q2lwaGVyU3VpdGUgPT0gS0VZX0NUTF9DQ01QKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+czgwMl8xMUNvdW50ZXIuQ0NNUERlY3J5cHRFcnJvcnMrKzsKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocEtleSAhPSBOVUxMKSAmJiAocEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1dFUCkpIHsKKy8vICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnM4MDJfMTFDb3VudGVyLldFUElDVkVycm9yQ291bnQuUXVhZFBhcnQrKzsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIldFUCBGdW5jIEZhaWxcbiIpOworICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICB9CisgICAgICAgIGlmICgocEtleSAhPSBOVUxMKSAmJiAocEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX0NDTVApKQorICAgICAgICAgICAgRnJhbWVTaXplIC09IDg7ICAgICAgICAgLy8gTWVzc2FnZSBJbnRlZ3JpdHkgQ29kZQorICAgICAgICBlbHNlCisgICAgICAgICAgICBGcmFtZVNpemUgLT0gNDsgICAgICAgICAvLyA0IGlzIElDVgorICAgIH0KKworCisgICAgLy8KKyAgICAvLyBSWCBPSworICAgIC8vCisgICAgLy9yZW1vdmUgdGhlIENSQyBsZW5ndGgKKyAgICBGcmFtZVNpemUgLT0gVV9DUkNfTEVOOworCisgICAgaWYgKChCSVRiSXNBbGxCaXRzT2ZmKCpwYnlSc3IsIChSU1JfQUREUkJST0FEIHwgUlNSX0FERFJNVUxUSSkpKSAmJiAvLyB1bmljYXN0IGFkZHJlc3MKKyAgICAgICAgKElTX0ZSQUdNRU5UX1BLVCgoc2tiLT5kYXRhKzQpKSkKKyAgICAgICAgKSB7CisgICAgICAgIC8vIGRlZnJhZ21lbnQKKyAgICAgICAgYkRlRnJhZ1J4ID0gV0NUTGJIYW5kbGVGcmFnbWVudChwRGV2aWNlLCAoUFM4MDJfMTFIZWFkZXIpIChza2ItPmRhdGErNCksIEZyYW1lU2l6ZSwgYklzV0VQLCBiRXh0SVYpOworICAgICAgICBwRGV2aWNlLT5zODAyXzExQ291bnRlci5SZWNlaXZlZEZyYWdtZW50Q291bnQrKzsKKyAgICAgICAgaWYgKGJEZUZyYWdSeCkgeworICAgICAgICAgICAgLy8gZGVmcmFnIGNvbXBsZXRlCisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgICAgIHNrYiA9ICYocERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdLnJlZl9za2IpOworI2Vsc2UKKyAgICAgICAgICAgIHNrYiA9IHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS5za2I7CisjZW5kaWYKKyAgICAgICAgICAgIEZyYW1lU2l6ZSA9IHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS5jYkZyYW1lTGVuZ3RoOworCisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0KKyAgICB9CisKKworLy8gTWFuYWdlbWVudCAmIENvbnRyb2wgZnJhbWUgSGFuZGxlCisgICAgaWYgKChJU19UWVBFX0RBVEEoKHNrYi0+ZGF0YSs0KSkpID09IEZBTFNFKSB7CisgICAgICAgIC8vIEhhbmRsZSBDb250cm9sICYgTWFuYWdlIEZyYW1lCisKKyAgICAgICAgaWYgKElTX1RZUEVfTUdNVCgoc2tiLT5kYXRhKzQpKSkgeworICAgICAgICAgICAgUEJZVEUgcGJ5RGF0YTE7CisgICAgICAgICAgICBQQllURSBwYnlEYXRhMjsKKworICAgICAgICAgICAgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXIgPSAoUFVXTEFOXzgwMjExSERSKShza2ItPmRhdGErNCk7CisgICAgICAgICAgICBwUnhQYWNrZXQtPmNiTVBEVUxlbiA9IEZyYW1lU2l6ZTsKKyAgICAgICAgICAgIHBSeFBhY2tldC0+dVJTU0kgPSAqcGJ5UlNTSTsKKyAgICAgICAgICAgIHBSeFBhY2tldC0+YnlTUSA9ICpwYnlTUTsKKyAgICAgICAgICAgIEhJRFdPUkQocFJ4UGFja2V0LT5xd0xvY2FsVFNGKSA9IGNwdV90b19sZTMyKEhJRFdPUkQoKnBxd1RTRlRpbWUpKTsKKyAgICAgICAgICAgIExPRFdPUkQocFJ4UGFja2V0LT5xd0xvY2FsVFNGKSA9IGNwdV90b19sZTMyKExPRFdPUkQoKnBxd1RTRlRpbWUpKTsKKyAgICAgICAgICAgIGlmIChiSXNXRVApIHsKKyAgICAgICAgICAgICAgICAvLyBzdHJpcCBJVgorICAgICAgICAgICAgICAgIHBieURhdGExID0gV0xBTl9IRFJfQTNfREFUQV9QVFIoc2tiLT5kYXRhKzQpOworICAgICAgICAgICAgICAgIHBieURhdGEyID0gV0xBTl9IRFJfQTNfREFUQV9QVFIoc2tiLT5kYXRhKzQpICsgNDsKKyAgICAgICAgICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCAoRnJhbWVTaXplIC0gNCk7IGlpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgKnBieURhdGExID0gKnBieURhdGEyOworICAgICAgICAgICAgICAgICAgICAgcGJ5RGF0YTErKzsKKyAgICAgICAgICAgICAgICAgICAgIHBieURhdGEyKys7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgcFJ4UGFja2V0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kgICAgICAgICAgICBza2ItPmRldiA9IHBEZXZpY2UtPmFwZGV2OworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgICAgICAgICAgICAgcmVmX3NrYl9hZGRfb2Zmc2V0KHNrYi0+c2tiLCA0KTsKKyAgICAgICAgICAgICAgICByZWZfc2tiX3NldF9kZXYocERldmljZS0+YXBkZXYsIHNrYi0+c2tiKTsKKyAgICAgICAgICAgICAgICBza2JfcHV0KHNrYi0+c2tiLCBGcmFtZVNpemUpOworCSAgICAgICAgICAgIHNrYi0+bWFjX2hlYWRlciA9IHNrYi0+ZGF0YTsKKwkgICAgICAgICAgICAqKHNrYi0+cGt0X3R5cGUpID0gUEFDS0VUX09USEVSSE9TVDsKKyAgICAJICAgICAgICAqKHNrYi0+cHJvdG9jb2wpID0gaHRvbnMoRVRIX1BfODAyXzIpOworCSAgICAgICAgICAgIG1lbXNldChza2ItPmNiLCAwLCBzaXplb2Yoc2tiLT5jYikpOworCSAgICAgICAgICAgIG5ldGlmX3J4KHNrYi0+c2tiKTsKKyNlbHNlCisJICAgICAgICAgICAgc2tiLT5kYXRhICs9IDQ7CisJICAgICAgICAgICAgc2tiLT50YWlsICs9IDQ7CisgICAgICAgICAgICAgICAgICAgICBza2JfcHV0KHNrYiwgRnJhbWVTaXplKTsKKwkgICAgICAgICAgICBza2ItPm1hY19oZWFkZXIgPSBza2ItPmRhdGE7CisJICAgICAgICAgICAgc2tiLT5wa3RfdHlwZSA9IFBBQ0tFVF9PVEhFUkhPU1Q7CisgICAgCSAgICAgICAgc2tiLT5wcm90b2NvbCA9IGh0b25zKEVUSF9QXzgwMl8yKTsKKwkgICAgICAgICAgICBtZW1zZXQoc2tiLT5jYiwgMCwgc2l6ZW9mKHNrYi0+Y2IpKTsKKwkgICAgICAgICAgICBuZXRpZl9yeChza2IpOworI2VuZGlmCisgICAgICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisJICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAvLyBDb250cm9sIEZyYW1lCisgICAgICAgIH07CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisgICAgZWxzZSB7CisgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfQVApIHsKKyAgICAgICAgICAgIC8vSW4gQVAgbW9kZSwgaHcgb25seSBjaGVjayBhZGRyMShCU1NJRCBvciBSQSkgaWYgZXF1YWwgdG8gbG9jYWwgTUFDLgorICAgICAgICAgICAgaWYgKEJJVGJJc0JpdE9mZigqcGJ5UnNyLCBSU1JfQlNTSURPSykpIHsKKyAgICAgICAgICAgICAgICBpZiAoYkRlRnJhZ1J4KSB7CisgICAgICAgICAgICAgICAgICAgIGlmICghZGV2aWNlX2FsbG9jX2ZyYWdfYnVmKHBEZXZpY2UsICZwRGV2aWNlLT5zUnhERkNCW3BEZXZpY2UtPnVDdXJyZW50REZDQklkeF0pKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsS0VSTl9FUlIgIiVzOiBjYW4gbm90IGFsbG9jIG1vcmUgZnJhZyBidWZzXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAvLyBkaXNjYXJkIERBVEEgcGFja2V0IHdoaWxlIG5vdCBhc3NvY2lhdGUgfHwgQlNTSUQgZXJyb3IKKyAgICAgICAgICAgIGlmICgocERldmljZS0+YkxpbmtQYXNzID09IEZBTFNFKSB8fAorICAgICAgICAgICAgICAgIEJJVGJJc0JpdE9mZigqcGJ5UnNyLCBSU1JfQlNTSURPSykpIHsKKyAgICAgICAgICAgICAgICBpZiAoYkRlRnJhZ1J4KSB7CisgICAgICAgICAgICAgICAgICAgIGlmICghZGV2aWNlX2FsbG9jX2ZyYWdfYnVmKHBEZXZpY2UsICZwRGV2aWNlLT5zUnhERkNCW3BEZXZpY2UtPnVDdXJyZW50REZDQklkeF0pKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9FUlIsS0VSTl9FUlIgIiVzOiBjYW4gbm90IGFsbG9jIG1vcmUgZnJhZyBidWZzXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICB9CisKKyAgIC8vbWlrZSBhZGQ6c3RhdGlvbiBtb2RlIGNoZWNrIGVhcG9sLWtleSBjaGFsbGVuZ2UtLS0+CisgICAJICB7CisgICAJICAgIEJZVEUgIFByb3RvY29sX1ZlcnNpb247ICAgIC8vODAyLjF4IEF1dGhlbnRpY2F0aW9uCisJICAgIEJZVEUgIFBhY2tldF9UeXBlOyAgICAgICAgICAgLy84MDIuMXggQXV0aGVudGljYXRpb24KKyAgICAgICAgICAgICAgaWYgKGJJc1dFUCkKKyAgICAgICAgICAgICAgICAgIGNiSVZPZmZzZXQgPSA4OworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjYklWT2Zmc2V0ID0gMDsKKyAgICAgICAgICAgICAgd0V0aGVyVHlwZSA9IChza2ItPmRhdGFbY2JJVk9mZnNldCArIDggKyAyNCArIDZdIDw8IDgpIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLT5kYXRhW2NiSVZPZmZzZXQgKyA4ICsgMjQgKyA2ICsgMV07CisJICAgICAgUHJvdG9jb2xfVmVyc2lvbiA9IHNrYi0+ZGF0YVtjYklWT2Zmc2V0ICsgOCArIDI0ICsgNiArIDEgKzFdOworCSAgICAgIFBhY2tldF9UeXBlID0gc2tiLT5kYXRhW2NiSVZPZmZzZXQgKyA4ICsgMjQgKyA2ICsgMSArMSsxXTsKKwkgICAgIGlmICh3RXRoZXJUeXBlID09IEVUSF9QX1BBRSkgeyAgICAgICAgIC8vUHJvdG9jb2wgVHlwZSBpbiBMTEMtSGVhZGVyCisgICAgICAgICAgICAgICAgICBpZigoKFByb3RvY29sX1ZlcnNpb249PTEpIHx8KFByb3RvY29sX1ZlcnNpb249PTIpKSAmJgorCQkgICAgIChQYWNrZXRfVHlwZT09MykpIHsgIC8vODAyLjF4IE9SIGVhcG9sLWtleSBjaGFsbGVuZ2UgZnJhbWUgcmVjZWl2ZQorICAgICAgICAgICAgICAgICAgICAgICAgYlJ4ZWFwb2xfa2V5ID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgIH0KKwkgICAgICB9CisgICAJICB9CisgICAgLy9taWtlIGFkZDpzdGF0aW9uIG1vZGUgY2hlY2sgZWFwb2wta2V5IGNoYWxsZW5nZTwtLS0KKyAgICAgICAgfQorICAgIH0KKworLy8gRGF0YSBmcmFtZSBIYW5kbGUKKworICAgIGlmIChwRGV2aWNlLT5iRW5hYmxlUFNNb2RlKSB7CisgICAgICAgIGlmIChJU19GQ19NT1JFREFUQSgoc2tiLT5kYXRhKzQpKSkgeworICAgICAgICAgICAgaWYgKEJJVGJJc0JpdE9uKCpwYnlSc3IsIFJTUl9BRERST0spKSB7CisgICAgICAgICAgICAgICAgLy9QU2JTZW5kUFNQT0xMKChQU0RldmljZSlwRGV2aWNlKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5wTWdtdC0+YkluVElNV2FrZSA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+cE1nbXQtPmJJblRJTVdha2UgPSBGQUxTRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH07CisKKyAgICAvLyBO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T5kZXYgPSBwRGV2aWNlLT5hcGRldjsKKworICAgICAgICAgICAgaWYgKGJJc1dFUCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgLy8gc3RyaXAgSVYgaGVhZGVyKDgpCisgICAgICAgICAgICAgICAgbWVtY3B5KCZhYnlNYWNIZHJbMF0sIChza2ItPmRhdGEgKyA0KSwgMjQpOworICAgICAgICAgICAgICAgIG1lbWNweSgoc2tiLT5kYXRhICsgNCArIGNiSVZPZmZzZXQpLCAmYWJ5TWFjSGRyWzBdLCAyNCk7CisgICAgICAgICAgICB9CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgICAgIHJlZl9za2JfYWRkX29mZnNldChza2ItPnNrYiwgKGNiSVZPZmZzZXQgKyA0KSk7CisgICAgICAgICAgICByZWZfc2tiX3NldF9kZXYocERldmljZS0+YXBkZXYsIHNrYi0+c2tiKTsKKyAgICAgICAgICAgIHNrYl9wdXQoc2tiLT5za2IsIEZyYW1lU2l6ZSk7CisJCQlza2ItPm1hY19oZWFkZXIgPSBza2ItPmRhdGE7CisgICAgICAgICAgICAqKHNrYi0+cGt0X3R5cGUpID0gUEFDS0VUX09USEVSSE9TVDsKKwkgICAgICAgICooc2tiLT5wcm90b2NvbCkgPSBodG9ucyhFVEhfUF84MDJfMik7CisgICAgICAgICAgICBtZW1zZXQoc2tiLT5jYiwgMCwgc2l6ZW9mKHNrYi0+Y2IpKTsKKyAgICAgICAgICAgIG5ldGlmX3J4KHNrYi0+c2tiKTsKKyNlbHNlCisgICAgICAgICAgICBza2ItPmRhdGEgKz0gIChjYklWT2Zmc2V0ICsgNCk7CisgICAgICAgICAgICBza2ItPnRhaWwgKz0gIChjYklWT2Zmc2V0ICsgNCk7CisgICAgICAgICAgICBza2JfcHV0KHNrYiwgRnJhbWVTaXplKTsKKyAgICAgICAgICAgc2tiLT5tYWNfaGVhZGVyID0gc2tiLT5kYXRhOworCisJc2tiLT5wa3RfdHlwZSA9IFBBQ0tFVF9PVEhFUkhPU1Q7CisgICAgICAgICAgICBza2ItPnByb3RvY29sID0gaHRvbnMoRVRIX1BfODAyXzIpOworICAgICAgICAgICAgbWVtc2V0KHNrYi0+Y2IsIDAsIHNpemVvZihza2ItPmNiKSk7CisgICAgICAgICAgICBuZXRpZl9yeChza2IpOworI2VuZGlmCisgICAgICAgICAgICByZXR1cm4gVFJVRTsKKworfQorICAgICAgICAvLyBjaGVjayBpZiA4MDIuMXggYXV0aG9yaXplZAorICAgICAgICBpZiAoIShwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uZHdGbGFncyAmIFdMQU5fU1RBX0FVVEhPUklaRUQpKQorICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH0KKworCisgICAgaWYgKChwS2V5ICE9IE5VTEwpICYmIChwS2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfVEtJUCkpIHsKKyAgICAgICAgaWYgKGJJc1dFUCkgeworICAgICAgICAgICAgRnJhbWVTaXplIC09IDg7ICAvL01JQworICAgICAgICB9CisgICAgfQorCisgICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgIC8vIFNvZnQgTUlDCisgICAgaWYgKChwS2V5ICE9IE5VTEwpICYmIChwS2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfVEtJUCkpIHsKKyAgICAgICAgaWYgKGJJc1dFUCkgeworICAgICAgICAgICAgUERXT1JEICAgICAgICAgIHBkd01JQ19MOworICAgICAgICAgICAgUERXT1JEICAgICAgICAgIHBkd01JQ19SOworICAgICAgICAgICAgRFdPUkQgICAgICAgICAgIGR3TUlDX1ByaW9yaXR5OworICAgICAgICAgICAgRFdPUkQgICAgICAgICAgIGR3TUlDS2V5MCA9IDAsIGR3TUlDS2V5MSA9IDA7CisgICAgICAgICAgICBEV09SRCAgICAgICAgICAgZHdMb2NhbE1JQ19MID0gMDsKKyAgICAgICAgICAgIERXT1JEICAgICAgICAgICBkd0xvY2FsTUlDX1IgPSAwOworICAgICAgICAgICAgdmlhd2dldF93cGFfaGVhZGVyICp3cGFoZHI7CisKKworICAgICAgICAgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICAgICAgICAgIGR3TUlDS2V5MCA9IGNwdV90b19sZTMyKCooUERXT1JEKSgmcEtleS0+YWJ5S2V5WzI0XSkpOworICAgICAgICAgICAgICAgIGR3TUlDS2V5MSA9IGNwdV90b19sZTMyKCooUERXT1JEKSgmcEtleS0+YWJ5S2V5WzI4XSkpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPnBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBTk9ORSkgeworICAgICAgICAgICAgICAgICAgICBkd01JQ0tleTAgPSBjcHVfdG9fbGUzMigqKFBEV09SRCkoJnBLZXktPmFieUtleVsxNl0pKTsKKyAgICAgICAgICAgICAgICAgICAgZHdNSUNLZXkxID0gY3B1X3RvX2xlMzIoKihQRFdPUkQpKCZwS2V5LT5hYnlLZXlbMjBdKSk7CisgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocEtleS0+ZHdLZXlJbmRleCAmIEJJVDI4KSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgIGR3TUlDS2V5MCA9IGNwdV90b19sZTMyKCooUERXT1JEKSgmcEtleS0+YWJ5S2V5WzE2XSkpOworICAgICAgICAgICAgICAgICAgICBkd01JQ0tleTEgPSBjcHVfdG9fbGUzMigqKFBEV09SRCkoJnBLZXktPmFieUtleVsyMF0pKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBkd01JQ0tleTAgPSBjcHVfdG9fbGUzMigqKFBEV09SRCkoJnBLZXktPmFieUtleVsyNF0pKTsKKyAgICAgICAgICAgICAgICAgICAgZHdNSUNLZXkxID0gY3B1X3RvX2xlMzIoKihQRFdPUkQpKCZwS2V5LT5hYnlLZXlbMjhdKSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorCisgICAgICAgICAgICBNSUNfdkluaXQoZHdNSUNLZXkwLCBkd01JQ0tleTEpOworICAgICAgICAgICAgTUlDX3ZBcHBlbmQoKFBCWVRFKSYocERldmljZS0+c1J4RXRoSGVhZGVyLmFieURzdEFkZHJbMF0pLCAxMik7CisgICAgICAgICAgICBkd01JQ19Qcmlvcml0eSA9IDA7CisgICAgICAgICAgICBNSUNfdkFwcGVuZCgoUEJZVEUpJmR3TUlDX1ByaW9yaXR5LCA0KTsKKyAgICAgICAgICAgIC8vIDQgaXMgUmN2IGJ1ZmZlciBoZWFkZXIsIDI0IGlzIE1BQyBIZWFkZXIsIGFuZCA4IGlzIElWIGFuZCBFeHQgSVYuCisgICAgICAgICAgICBNSUNfdkFwcGVuZCgoUEJZVEUpKHNrYi0+ZGF0YSArIDQgKyBXTEFOX0hEUl9BRERSM19MRU4gKyA4KSwKKyAgICAgICAgICAgICAgICAgICAgICAgIEZyYW1lU2l6ZSAtIFdMQU5fSERSX0FERFIzX0xFTiAtIDgpOworICAgICAgICAgICAgTUlDX3ZHZXRNSUMoJmR3TG9jYWxNSUNfTCwgJmR3TG9jYWxNSUNfUik7CisgICAgICAgICAgICBNSUNfdlVuSW5pdCgpOworCisgICAgICAgICAgICBwZHdNSUNfTCA9IChQRFdPUkQpKHNrYi0+ZGF0YSArIDQgKyBGcmFtZVNpemUpOworICAgICAgICAgICAgcGR3TUlDX1IgPSAoUERXT1JEKShza2ItPmRhdGEgKyA0ICsgRnJhbWVTaXplICsgNCk7CisgICAgICAgICAgICAvL0RCR19QUk5fR1JQMTIoKCJSeEw6ICVseCwgUnhSOiAlbHhcbiIsICpwZHdNSUNfTCwgKnBkd01JQ19SKSk7CisgICAgICAgICAgICAvL0RCR19QUk5fR1JQMTIoKCJMb2NhbEw6ICVseCwgTG9jYWxSOiAlbHhcbiIsIGR3TG9jYWxNSUNfTCwgZHdMb2NhbE1JQ19SKSk7CisgICAgICAgICAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iZHdNSUNLZXkwPSAlbHgsZHdNSUNLZXkxPSAlbHggXG4iLCBkd01JQ0tleTAsIGR3TUlDS2V5MSk7CisKKworICAgICAgICAgICAgaWYgKChjcHVfdG9fbGUzMigqcGR3TUlDX0wpICE9IGR3TG9jYWxNSUNfTCkgfHwgKGNwdV90b19sZTMyKCpwZHdNSUNfUikgIT0gZHdMb2NhbE1JQ19SKSB8fAorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5iUnhNSUNGYWlsID09IFRSVUUpKSB7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJNSUMgY29tcGFyaXNvbiBpcyBmYWlsIVxuIik7CisgICAgICAgICAgICAgICAgcERldmljZS0+YlJ4TUlDRmFpbCA9IEZBTFNFOworICAgICAgICAgICAgICAgIC8vcERldmljZS0+czgwMl8xMUNvdW50ZXIuVEtJUExvY2FsTUlDRmFpbHVyZXMuUXVhZFBhcnQrKzsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5zODAyXzExQ291bnRlci5US0lQTG9jYWxNSUNGYWlsdXJlcysrOworICAgICAgICAgICAgICAgIGlmIChiRGVGcmFnUngpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCFkZXZpY2VfYWxsb2NfZnJhZ19idWYocERldmljZSwgJnBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0VSUixLRVJOX0VSUiAiJXM6IGNhbiBub3QgYWxsb2MgbW9yZSBmcmFnIGJ1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nNyY19hZGRyLnNhX2RhdGEsIHBNQUNIZWFkZXItPmFieUFkZHIyLCBFVEhfQUxFTik7CisJCQkJCW1lbXNldCgmd3JxdSwgMCwgc2l6ZW9mKHdycXUpKTsKKwkJCQkJd3JxdS5kYXRhLmxlbmd0aCA9IHNpemVvZihldik7CisJCQkJCXdpcmVsZXNzX3NlbmRfZXZlbnQocERldmljZS0+ZGV2LCBJV0VWTUlDSEFFTE1JQ0ZBSUxVUkUsICZ3cnF1LCAoY2hhciAqKSZldik7CisKKwkJCQl9CisgICAgICAgICAjZW5kaWYKKyAgICAgICAgICAgICAgICBpZiAoKHBEZXZpY2UtPmJXUEFERVZVcCkgJiYgKHBEZXZpY2UtPnNrYiAhPSBOVUxMKSkgeworICAgICAgICAgICAgICAgICAgICAgd3BhaGRyID0gKHZpYXdnZXRfd3BhX2hlYWRlciAqKXBEZXZpY2UtPnNrYi0+ZGF0YTsKKyAgICAgICAgICAgICAgICAgICAgIGlmICgocERldmljZS0+cE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX1NUQSkgJiYKKyAgICAgICAgICAgICAgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQykgJiYKKyAgICAgICAgICAgICAgICAgICAgICAgICAoKnBieVJzciAmIChSU1JfQUREUkJST0FEIHwgUlNSX0FERFJNVUxUSSkpID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAvL3M4MDJfMTFfU3RhdHVzLkZsYWdzID0gTkRJU184MDJfMTFfQVVUSF9SRVFVRVNUX1BBSVJXSVNFX0VSUk9SOworICAgICAgICAgICAgICAgICAgICAgICAgIHdwYWhkci0+dHlwZSA9IFZJQVdHRVRfUFRLX01JQ19NU0c7CisgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgIC8vczgwMl8xMV9TdGF0dXMuRmxhZ3MgPSBORElTXzgwMl8xMV9BVVRIX1JFUVVFU1RfR1JPVVBfRVJST1I7CisgICAgICAgICAgICAgICAgICAgICAgICAgd3BhaGRyLT50eXBlID0gVklBV0dFVF9HVEtfTUlDX01TRzsKKyAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIHdwYWhkci0+cmVzcF9pZV9sZW4gPSAwOworICAgICAgICAgICAgICAgICAgICAgd3BhaGRyLT5yZXFfaWVfbGVuID0gMDsKKyAgICAgICAgICAgICAgICAgICAgIHNrYl9wdXQocERldmljZS0+c2tiLCBzaXplb2Yodmlhd2dldF93cGFfaGVhZGVyKSk7CisgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2ItPmRldiA9IHBEZXZpY2UtPndwYWRldjsKKyAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+bWFjX2hlYWRlciA9IHBEZXZpY2UtPnNrYi0+ZGF0YTsKKyAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+cGt0X3R5cGUgPSBQQUNLRVRfSE9TVDsKKyAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+cHJvdG9jb2wgPSBodG9ucyhFVEhfUF84MDJfMik7CisgICAgICAgICAgICAgICAgICAgICBtZW1zZXQocERldmljZS0+c2tiLT5jYiwgMCwgc2l6ZW9mKHBEZXZpY2UtPnNrYi0+Y2IpKTsKKyAgICAgICAgICAgICAgICAgICAgIG5ldGlmX3J4KHBEZXZpY2UtPnNrYik7CisgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2IgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKyAgICAgICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfSAvLy0tLWVuZCBvZiBTT0ZUIE1JQy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisKKyAgICAvLyArKysrKysrKysrIFJlcGx5IENvdW50ZXIgQ2hlY2sgKysrKysrKysrKysrKworCisgICAgaWYgKChwS2V5ICE9IE5VTEwpICYmICgocEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1RLSVApIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAocEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX0NDTVApKSkgeworICAgICAgICBpZiAoYklzV0VQKSB7CisgICAgICAgICAgICBXT1JEICAgICAgICB3TG9jYWxUU0MxNV8wID0gMDsKKyAgICAgICAgICAgIERXT1JEICAgICAgIGR3TG9jYWxUU0M0N18xNiA9IDA7CisgICAgICAgICAgICBVTE9OR0xPTkcgICAgICAgUlNDID0gMDsKKyAgICAgICAgICAgIC8vIGVuZGlhbiBpc3N1ZXMKKyAgICAgICAgICAgIFJTQyA9ICooKFVMT05HTE9ORyAqKSAmKHBLZXktPktleVJTQykpOworICAgICAgICAgICAgd0xvY2FsVFNDMTVfMCA9IChXT1JEKSBSU0M7CisgICAgICAgICAgICBkd0xvY2FsVFNDNDdfMTYgPSAoRFdPUkQpIChSU0M+PjE2KTsKKworICAgICAgICAgICAgUlNDID0gZHdSeFRTQzQ3XzE2OworICAgICAgICAgICAgUlNDIDw8PSAxNjsKKyAgICAgICAgICAgIFJTQyArPSB3UnhUU0MxNV8wOworICAgICAgICAgICAgTUVNdkNvcHkoJihwS2V5LT5LZXlSU0MpLCAmUlNDLCAgc2l6ZW9mKFFXT1JEKSk7CisKKyAgICAgICAgICAgIGlmICggKHBEZXZpY2UtPnNNZ210T2JqLmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX1NUQSkgJiYKKyAgICAgICAgICAgICAgICAgKHBEZXZpY2UtPnNNZ210T2JqLmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQykpIHsKKyAgICAgICAgICAgICAgICAvLyBjaGVjayBSU0MKKyAgICAgICAgICAgICAgICBpZiAoICh3UnhUU0MxNV8wIDwgd0xvY2FsVFNDMTVfMCkgJiYKKyAgICAgICAgICAgICAgICAgICAgIChkd1J4VFNDNDdfMTYgPD0gZHdMb2NhbFRTQzQ3XzE2KSAmJgorICAgICAgICAgICAgICAgICAgICAgISgoZHdSeFRTQzQ3XzE2ID09IDApICYmIChkd0xvY2FsVFNDNDdfMTYgPT0gMHhGRkZGRkZGRikpKSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iVFNDIGlzIGlsbGVnYWx+fiFcbiAiKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBLZXktPmJ5Q2lwaGVyU3VpdGUgPT0gS0VZX0NUTF9US0lQKQorICAgICAgICAgICAgICAgICAgICAgICAgLy9wRGV2aWNlLT5zODAyXzExQ291bnRlci5US0lQUmVwbGF5cy5RdWFkUGFydCsrOworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+czgwMl8xMUNvdW50ZXIuVEtJUFJlcGxheXMrKzsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgLy9wRGV2aWNlLT5zODAyXzExQ291bnRlci5DQ01QUmVwbGF5cy5RdWFkUGFydCsrOworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+czgwMl8xMUNvdW50ZXIuQ0NNUFJlcGxheXMrKzsKKworICAgICAgICAgICAgICAgICAgICBpZiAoYkRlRnJhZ1J4KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRldmljZV9hbGxvY19mcmFnX2J1ZihwRGV2aWNlLCAmcERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0VSUixLRVJOX0VSUiAiJXM6IGNhbiBub3QgYWxsb2MgbW9yZSBmcmFnIGJ1ZnNcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmRldi0+bmFtZSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0gLy8gLS0tLS0gRW5kIG9mIFJlcGx5IENvdW50ZXIgQ2hlY2sgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKworCisKKyAgICBpZiAoKHBLZXkgIT0gTlVMTCkgJiYgKGJJc1dFUCkpIHsKKy8vICAgICAgcERldmljZS0+czgwMl8xMUNvdW50ZXIuRGVjcnlwdFN1Y2Nlc3NDb3VudC5RdWFkUGFydCsrOworICAgIH0KKworCisgICAgc192UHJvY2Vzc1J4TUFDSGVhZGVyKHBEZXZpY2UsIChQQllURSkoc2tiLT5kYXRhKzQpLCBGcmFtZVNpemUsIGJJc1dFUCwgYkV4dElWLCAmY2JIZWFkZXJPZmZzZXQpOworICAgIEZyYW1lU2l6ZSAtPSBjYkhlYWRlck9mZnNldDsKKyAgICBjYkhlYWRlck9mZnNldCArPSA0OyAgICAgICAgLy8gNCBpcyBSY3YgYnVmZmVyIGhlYWRlcgorCisgICAgLy8gTnVsbCBkYXRhLCBmcmFtZXNpemUgPSAxNAorICAgIGlmIChGcmFtZVNpemUgPCAxNSkKKyAgICAgICAgcmV0dXJuIEZBTFNFOworCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAoc19iQVBNb2RlUnhEYXRhKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyYW1lU2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYkhlYWRlck9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpU0FOb2RlSW5kZXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaURBTm9kZUluZGV4CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSA9PSBGQUxTRSkgeworCisgICAgICAgICAgICBpZiAoYkRlRnJhZ1J4KSB7CisgICAgICAgICAgICAgICAgaWYgKCFkZXZpY2VfYWxsb2NfZnJhZ19idWYocERldmljZSwgJnBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XSkpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfRVJSLEtFUk5fRVJSICIlczogY2FuIG5vdCBhbGxvYyBtb3JlIGZyYWcgYnVmc1xuIiwKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0KKworLy8gICAgICAgIGlmKHBEZXZpY2UtPmJSeE1JQ0ZhaWwgPT0gRkFMU0UpIHsKKy8vICAgICAgICAgICBmb3IgKGlpID0wOyBpaSA8IDEwMDsgaWkrKykKKy8vICAgICAgICAgICAgICAgIHByaW50aygiICUwMngiLCAqKHNrYi0+ZGF0YSArIGlpKSk7CisvLyAgICAgICAgICAgcHJpbnRrKCJcbiIpOworLy8JICAgIH0KKworICAgIH0KKworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgcmVmX3NrYl9hZGRfb2Zmc2V0KHNrYi0+c2tiLCBjYkhlYWRlck9mZnNldCk7CisgICAgc2tiX3B1dChza2ItPnNrYiwgRnJhbWVTaXplKTsKKyAgICAqKHNrYi0+cHJvdG9jb2wpPWV0aF90eXBlX3RyYW5zKHNrYi0+c2tiLCBza2ItPmRld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ICAgICAgICAgICB9CisJCQlyZXR1cm4gRkFMU0U7CisJCX0KKwl9CisqLworCisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAqKHNrYi0+aXBfc3VtbWVkKT1DSEVDS1NVTV9OT05FOworICAgIHBTdGF0cy0+cnhfYnl0ZXMgKz0qKHNrYi0+bGVuKTsKKyAgICBwU3RhdHMtPnJ4X3BhY2tldHMrKzsKKyAgICBuZXRpZl9yeChza2ItPnNrYik7CisjZWxzZQorICAgIHNrYi0+aXBfc3VtbWVkPUNIRUNLU1VNX05PTkU7CisgICAgcFN0YXRzLT5yeF9ieXRlcyArPXNrYi0+bGVuOworICAgIHBTdGF0cy0+cnhfcGFja2V0cysrOworICAgIG5ldGlmX3J4KHNrYik7CisjZW5kaWYKKworICAgIGlmIChiRGVGcmFnUngpIHsKKyAgICAgICAgaWYgKCFkZXZpY2VfYWxsb2NfZnJhZ19idWYocERldmljZSwgJnBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XSkpIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0VSUixLRVJOX0VSUiAiJXM6IGNhbiBub3QgYWxsb2MgbW9yZSBmcmFnIGJ1ZnNcbiIsCisgICAgICAgICAgICAgICAgcERldmljZS0+ZGV2LT5uYW1lKTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorICAgIHJldHVybiBUUlVFOworfQorCisKK3N0YXRpYyBCT09MIHNfYkFQTW9kZVJ4Q3RsICgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIFBCWVRFICAgIHBieUZyYW1lLAorICAgIElOIElOVCAgICAgIGlTQU5vZGVJbmRleAorICAgICkKK3sKKyAgICBQUzgwMl8xMUhlYWRlciAgICAgIHA4MDJfMTFIZWFkZXI7CisgICAgQ01EX1NUQVRVUyAgICAgICAgICBTdGF0dXM7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCisKKyAgICBpZiAoSVNfQ1RMX1BTUE9MTChwYnlGcmFtZSkgfHwgIUlTX1RZUEVfQ09OVFJPTChwYnlGcmFtZSkpIHsKKworICAgICAgICBwODAyXzExSGVhZGVyID0gKFBTODAyXzExSGVhZGVyKSAocGJ5RnJhbWUpOworICAgICAgICBpZiAoIUlTX1RZUEVfTUdNVChwYnlGcmFtZSkpIHsKKworICAgICAgICAgICAgLy8gRGF0YSAmIFBTLVBvbGwgcGFja2V0CisgICAgICAgICAgICAvLyBjaGVjayBmcmFtZSBjbGFzcworICAgICAgICAgICAgaWYgKGlTQU5vZGVJbmRleCA+IDApIHsKKyAgICAgICAgICAgICAgICAvLyBmcmFtZSBjbGFzcyAzIGZsaXRlciAmIGNoZWNraW5nCisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5lTm9kZVN0YXRlIDwgTk9ERV9BVVRIKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHNlbmQgZGVhdXRoIG5vdGlmaWNhdGlvbgorICAgICAgICAgICAgICAgICAgICAvLyByZWFzb24gPSAoNikgY2xhc3MgMiByZWNlaXZlZCBmcm9tIG5vbmF1dGggc3RhCisgICAgICAgICAgICAgICAgICAgIHZNZ3JEZUF1dGhlbkJlZ2luU3RhKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUEJZVEUpKHA4MDJfMTFIZWFkZXItPmFieUFkZHIyKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFdMQU5fTUdNVF9SRUFTT05fQ0xBU1MyX05PTkFVVEgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmU3RhdHVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRwYzogc2VuZCB2TWdyRGVBdXRoZW5CZWdpblN0YSAxXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpU0FOb2RlSW5kZXhdLmVOb2RlU3RhdGUgPCBOT0RFX0FTU09DKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHNlbmQgZGVhc3NvYyBub3RpZmljYXRpb24KKyAgICAgICAgICAgICAgICAgICAgLy8gcmVhc29uID0gKDcpIGNsYXNzIDMgcmVjZWl2ZWQgZnJvbSBub25hc3NvYyBzdGEKKyAgICAgICAgICAgICAgICAgICAgdk1nckRpc2Fzc29jQmVnaW5TdGEocERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQQllURSkocDgwMl8xMUhlYWRlci0+YWJ5QWRkcjIpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoV0xBTl9NR01UX1JFQVNPTl9DTEFTUzNfTk9OQVNTT0MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmU3RhdHVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRwYzogc2VuZCB2TWdyRGlzYXNzb2NCZWdpblN0YSAyXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uYlBTRW5hYmxlKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGRlbGNhcmUgcmVjZWl2ZWQgcHMtcG9sbCBldmVudAorICAgICAgICAgICAgICAgICAgICBpZiAoSVNfQ1RMX1BTUE9MTChwYnlGcmFtZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5iUnhQU1BvbGwgPSBUUlVFOworICAgICAgICAgICAgICAgICAgICAgICAgYlNjaGVkdWxlQ29tbWFuZCgoSEFORExFKXBEZXZpY2UsIFdMQU5fQ01EX1JYX1BTUE9MTCwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJkcGM6IFdMQU5fQ01EX1JYX1BTUE9MTCAxXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIERhdGEgUFMgc3RhdGUKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIFBXIGJpdCBvZmYsIHNlbmQgb3V0IGFsbCBQUyBidWZmZXJyaW5nIHBhY2tldHMuCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUlTX0ZDX1BPV0VSTUdUKHBieUZyYW1lKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5iUFNFbmFibGUgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uYlJ4UFNQb2xsID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBiU2NoZWR1bGVDb21tYW5kKChIQU5ETEUpcERldmljZSwgV0xBTl9DTURfUlhfUFNQT0xMLCBOVUxMKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJkcGM6IFdMQU5fQ01EX1JYX1BTUE9MTCAyXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICBpZiAoSVNfRkNfUE9XRVJNR1QocGJ5RnJhbWUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS5iUFNFbmFibGUgPSBUUlVFOworICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmNlIGlmIFNUQSBpbiBQUyBzdGF0ZSwgZW5hYmxlIG11bHRpY2FzdCBidWZmZXJyaW5nCisgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0uYlBTRW5hYmxlID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgLy8gY2xlYXIgYWxsIHBlbmRpbmcgUFMgZnJhbWUuCisgICAgICAgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbaVNBTm9kZUluZGV4XS53RW5RdWV1ZUNudCA+IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpU0FOb2RlSW5kZXhdLmJQU0VuYWJsZSA9IEZBTFNFOworICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lTQU5vZGVJbmRleF0uYlJ4UFNQb2xsID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgYlNjaGVkdWxlQ29tbWFuZCgoSEFORExFKXBEZXZpY2UsIFdMQU5fQ01EX1JYX1BTUE9MTCwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiZHBjOiBXTEFOX0NNRF9SWF9QU1BPTEwgM1xuIik7CisKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgdk1nckRlQXV0aGVuQmVnaW5TdGEocERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBCWVRFKShwODAyXzExSGVhZGVyLT5hYnlBZGRyMiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoV0xBTl9NR01UX1JFQVNPTl9DTEFTUzJfTk9OQVVUSCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmU3RhdHVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJkcGM6IHNlbmQgdk1nckRlQXV0aGVuQmVnaW5TdGEgM1xuIik7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkJTU0lEOiUwMngtJTAyeC0lMDJ4PSUwMngtJTAyeC0lMDJ4IFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjNbMF0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIzWzFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyM1syXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjNbM10sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIzWzRdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyM1s1XQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkFERFIyOiUwMngtJTAyeC0lMDJ4PSUwMngtJTAyeC0lMDJ4IFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjJbMF0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIyWzFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyMlsyXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjJbM10sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIyWzRdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyMls1XQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkFERFIxOiUwMngtJTAyeC0lMDJ4PSUwMngtJTAyeC0lMDJ4IFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjFbMF0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIxWzFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyMVsyXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcDgwMl8xMUhlYWRlci0+YWJ5QWRkcjFbM10sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHA4MDJfMTFIZWFkZXItPmFieUFkZHIxWzRdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwODAyXzExSGVhZGVyLT5hYnlBZGRyMVs1XQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImRwYzogd0ZyYW1lQ3RsPSAleFxuIiwgcDgwMl8xMUhlYWRlci0+d0ZyYW1lQ3RsICk7CisgICAgICAgICAgICAgICAgICAgIFZOU3ZJblBvcnRCKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX1JDUiwgJihwRGV2aWNlLT5ieVJ4TW9kZSkpOworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJkcGM6cERldmljZS0+YnlSeE1vZGUgPSAleFxuIiwgcERldmljZS0+YnlSeE1vZGUgKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIEZBTFNFOworCit9CisKK3N0YXRpYyBCT09MIHNfYkhhbmRsZVJ4RW5jcnlwdGlvbiAoCisgICAgSU4gUFNEZXZpY2UgICAgIHBEZXZpY2UsCisgICAgSU4gUEJZVEUgICAgICAgIHBieUZyYW1lLAorICAgIElOIFVJTlQgICAgICAgICBGcmFtZVNpemUsCisgICAgSU4gUEJZVEUgICAgICAgIHBieVJzciwKKyAgICBPVVQgUEJZVEUgICAgICAgcGJ5TmV3UnNyLAorICAgIE9VVCBQU0tleUl0ZW0gICAqcEtleU91dCwKKyAgICBPVVQgUEJPT0wgICAgICAgcGJFeHRJViwKKyAgICBPVVQgUFdPUkQgICAgICAgcHdSeFRTQzE1XzAsCisgICAgT1VUIFBEV09SRCAgICAgIHBkd1J4VFNDNDdfMTYKKyAgICApCit7CisgICAgVUlOVCAgICAgICAgICAgIFBheWxvYWRMZW4gPSBGcmFtZVNpemU7CisgICAgUEJZVEUgICAgICAgICAgIHBieUlWOworICAgIEJZVEUgICAgICAgICAgICBieUtleUlkeDsKKyAgICBQU0tleUl0ZW0gICAgICAgcEtleSA9IE5VTEw7CisgICAgQllURSAgICAgICAgICAgIGJ5RGVjTW9kZSA9IEtFWV9DVExfV0VQOworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCisKKyAgICAqcHdSeFRTQzE1XzAgPSAwOworICAgICpwZHdSeFRTQzQ3XzE2ID0gMDsKKworICAgIHBieUlWID0gcGJ5RnJhbWUgKyBXTEFOX0hEUl9BRERSM19MRU47CisgICAgaWYgKCBXTEFOX0dFVF9GQ19UT0RTKCooUFdPUkQpcGJ5RnJhbWUpICYmCisgICAgICAgICBXTEFOX0dFVF9GQ19GUk9NRFMoKihQV09SRClwYnlGcmFtZSkgKSB7CisgICAgICAgICBwYnlJViArPSA2OyAgICAgICAgICAgICAvLyA2IGlzIDgwMi4xMSBhZGRyZXNzNAorICAgICAgICAgUGF5bG9hZExlbiAtPSA2OworICAgIH0KKyAgICBieUtleUlkeCA9ICgqKHBieUlWKzMpICYgMHhjMCk7CisgICAgYnlLZXlJZHggPj49IDY7CisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJcbktleUlkeDogJWRcbiIsIGJ5S2V5SWR4KTsKKworICAgIGlmICgocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEpIHx8CisgICAgICAgIChwTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQVBTSykgfHwKKyAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBTk9ORSkgfHwKKyAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMikgfHwKKyAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykpIHsKKyAgICAgICAgaWYgKCgoKnBieVJzciAmIChSU1JfQUREUkJST0FEIHwgUlNSX0FERFJNVUxUSSkpID09IDApICYmCisgICAgICAgICAgICAocERldmljZS0+cE1nbXQtPmJ5Q1NTUEsgIT0gS0VZX0NUTF9OT05FKSkgeworICAgICAgICAgICAgLy8gdW5pY2FzdCBwa3QgdXNlIHBhaXJ3aXNlIGtleQorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJ1bmljYXN0IHBrdFxuIik7CisgICAgICAgICAgICBpZiAoS2V5YkdldEtleSgmKHBEZXZpY2UtPnNLZXkpLCBwRGV2aWNlLT5hYnlCU1NJRCwgMHhGRkZGRkZGRiwgJnBLZXkpID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBpZiAocERldmljZS0+cE1nbXQtPmJ5Q1NTUEsgPT0gS0VZX0NUTF9US0lQKQorICAgICAgICAgICAgICAgICAgICBieURlY01vZGUgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAocERldmljZS0+cE1nbXQtPmJ5Q1NTUEsgPT0gS0VZX0NUTF9DQ01QKQorICAgICAgICAgICAgICAgICAgICBieURlY01vZGUgPSBLRVlfQ1RMX0NDTVA7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInVuaWNhc3QgcGt0OiAlZCwgJXBcbiIsIGJ5RGVjTW9kZSwgcEtleSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvLyB1c2UgZ3JvdXAga2V5CisgICAgICAgICAgICBLZXliR2V0S2V5KCYocERldmljZS0+c0tleSksIHBEZXZpY2UtPmFieUJTU0lELCBieUtleUlkeCwgJnBLZXkpOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPnBNZ210LT5ieUNTU0dLID09IEtFWV9DVExfVEtJUCkKKyAgICAgICAgICAgICAgICBieURlY01vZGUgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICBlbHNlIGlmIChwRGV2aWNlLT5wTWdtdC0+YnlDU1NHSyA9PSBLRVlfQ1RMX0NDTVApCisgICAgICAgICAgICAgICAgYnlEZWNNb2RlID0gS0VZX0NUTF9DQ01QOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJncm91cCBwa3Q6ICVkLCAlZCwgJXBcbiIsIGJ5S2V5SWR4LCBieURlY01vZGUsIHBLZXkpOworICAgICAgICB9CisgICAgfQorICAgIC8vIG91ciBXRVAgb25seSBzdXBwb3J0IERlZmF1bHQgS2V5CisgICAgaWYgKHBLZXkgPT0gTlVMTCkgeworICAgICAgICAvLyB1c2UgZGVmYXVsdCBncm91cCBrZXkKKyAgICAgICAgS2V5YkdldEtleSgmKHBEZXZpY2UtPnNLZXkpLCBwRGV2aWNlLT5hYnlCcm9hZGNhc3RBZGRyLCBieUtleUlkeCwgJnBLZXkpOworICAgICAgICBpZiAocERldmljZS0+cE1nbXQtPmJ5Q1NTR0sgPT0gS0VZX0NUTF9US0lQKQorICAgICAgICAgICAgYnlEZWNNb2RlID0gS0VZX0NUTF9US0lQOworICAgICAgICBlbHNlIGlmIChwRGV2aWNlLT5wTWdtd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9ERUNSWVBUT0s7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9IGVsc2UgaWYgKChieURlY01vZGUgPT0gS0VZX0NUTF9US0lQKSB8fAorICAgICAgICAgICAgICAgKGJ5RGVjTW9kZSA9PSBLRVlfQ1RMX0NDTVApKSB7CisgICAgICAgIC8vIFRLSVAvQUVTCisKKyAgICAgICAgUGF5bG9hZExlbiAtPSAoV0xBTl9IRFJfQUREUjNfTEVOICsgOCArIDQpOyAvLyAyNCBpcyA4MDIuMTEgaGVhZGVyLCA4IGlzIElWJkV4dElWLCA0IGlzIGNyYworICAgICAgICAqcGR3UnhUU0M0N18xNiA9IGNwdV90b19sZTMyKCooUERXT1JEKShwYnlJViArIDQpKTsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJFeHRJVjogJWx4XG4iLCpwZHdSeFRTQzQ3XzE2KTsKKyAgICAgICAgaWYgKGJ5RGVjTW9kZSA9PSBLRVlfQ1RMX1RLSVApIHsKKyAgICAgICAgICAgICpwd1J4VFNDMTVfMCA9IGNwdV90b19sZTE2KE1BS0VXT1JEKCoocGJ5SVYrMiksICpwYnlJVikpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgKnB3UnhUU0MxNV8wID0gY3B1X3RvX2xlMTYoKihQV09SRClwYnlJVik7CisgICAgICAgIH0KKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJUU0MwXzE1OiAleFxuIiwgKnB3UnhUU0MxNV8wKTsKKworICAgICAgICBpZiAoKGJ5RGVjTW9kZSA9PSBLRVlfQ1RMX1RLSVApICYmCisgICAgICAgICAgICAocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQTEpKSB7CisgICAgICAgICAgICAvLyBTb2Z0d2FyZSBUS0lQCisgICAgICAgICAgICAvLyAxLiAzMjUzIEEKKyAgICAgICAgICAgIFBTODAyXzExSGVhZGVyICBwTUFDSGVhZGVyID0gKFBTODAyXzExSGVhZGVyKSAocGJ5RnJhbWUpOworICAgICAgICAgICAgVEtJUHZNaXhLZXkocEtleS0+YWJ5S2V5LCBwTUFDSGVhZGVyLT5hYnlBZGRyMiwgKnB3UnhUU0MxNV8wLCAqcGR3UnhUU0M0N18xNiwgcERldmljZS0+YWJ5UFJORyk7CisgICAgICAgICAgICByYzRfaW5pdCgmcERldmljZS0+U0JveCwgcERldmljZS0+YWJ5UFJORywgVEtJUF9LRVlfTEVOKTsKKyAgICAgICAgICAgIHJjNF9lbmNyeXB0KCZwRGV2aWNlLT5TQm94LCBwYnlJVis4LCBwYnlJVis4LCBQYXlsb2FkTGVuKTsKKyAgICAgICAgICAgIGlmIChFVEhiSXNCdWZmZXJDcmMzMk9rKHBieUlWKzgsIFBheWxvYWRMZW4pKSB7CisgICAgICAgICAgICAgICAgKnBieU5ld1JzciB8PSBORVdSU1JfREVDUllQVE9LOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iSUNWIE9LIVxuIik7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iSUNWIEZBSUwhISFcbiIpOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iUGF5bG9hZExlbiA9ICVkXG4iLCBQYXlsb2FkTGVuKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0vLyBlbmQgb2YgVEtJUC9BRVMKKworICAgIGlmICgoKihwYnlJViszKSAmIDB4MjApICE9IDApCisgICAgICAgICpwYkV4dElWID0gVFJVRTsKKyAgICByZXR1cm4gVFJVRTsKK30KKworCitzdGF0aWMgQk9PTCBzX2JIb3N0V2VwUnhFbmNyeXB0aW9uICgKKyAgICBJTiBQU0RldmljZSAgICAgcERldmljZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5RnJhbWUsCisgICAgSU4gVUlOVCAgICAgICAgIEZyYW1lU2l6ZSwKKyAgICBJTiBQQllURSAgICAgICAgcGJ5UnNyLAorICAgIElOIEJPT0wgICAgICAgICBiT25GbHksCisgICAgSU4gUFNLZXlJdGVtICAgIHBLZXksCisgICAgT1VUIFBCWVRFICAgICAgIHBieU5ld1JzciwKKyAgICBPVVQgUEJPT0wgICAgICAgcGJFeHRJViwKKyAgICBPVVQgUFdPUkQgICAgICAgcHdSeFRTQzE1XzAsCisgICAgT1VUIFBEV09SRCAgICAgIHBkd1J4VFNDNDdfMTYKKyAgICApCit7CisgICAgVUlOVCAgICAgICAgICAgIFBheWxvYWRMZW4gPSBGcmFtZVNpemU7CisgICAgUEJZVEUgICAgICAgICAgIHBieUlWOworICAgIEJZVEUgICAgICAgICAgICBieUtleUlkeDsKKyAgICBCWVRFICAgICAgICAgICAgYnlEZWNNb2RlID0gS0VZX0NUTF9XRVA7CisgICAgUFM4MDJfMTFIZWFkZXIgIHBNQUNIZWFkZXI7CisKKworCisgICAgKnB3UnhUU0MxNV8wID0gMDsKKyAgICAqcGR3UnhUU0M0N18xNiA9IDA7CisKKyAgICBwYnlJViA9IHBieUZyYW1lICsgV0xBTl9IRFJfQUREUjNfTEVOOworICAgIGlmICggV0xBTl9HRVRfRkNfVE9EUygqKFBXT1JEKXBieUZyYW1lKSAmJgorICAgICAgICAgV0xBTl9HRVRfRkNfRlJPTURTKCooUFdPUkQpcGJ5RnJhbWUpICkgeworICAgICAgICAgcGJ5SVYgKz0gNjsgICAgICAgICAgICAgLy8gNiBpcyA4MDIuMTEgYWRkcmVzczQKKyAgICAgICAgIFBheWxvYWRMZW4gLT0gNjsKKyAgICB9CisgICAgYnlLZXlJZHggPSAoKihwYnlJViszKSAmIDB4YzApOworICAgIGJ5S2V5SWR4ID4+PSA2OworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX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9jYWxJRCA8PSBSRVZfSURfVlQzMjUzX0ExKSB8fAorICAgICAgICAgICAgKCgoUFNLZXlUYWJsZSkocEtleS0+cHZLZXlUYWJsZSkpLT5iU29mdFdFUCA9PSBUUlVFKSB8fAorICAgICAgICAgICAgKGJPbkZseSA9PSBGQUxTRSkpIHsKKyAgICAgICAgICAgIC8vIFNvZnR3YXJlIFdFUAorICAgICAgICAgICAgLy8gMS4gMzI1M0EKKyAgICAgICAgICAgIC8vIDIuIFdFUCAyNTYKKyAgICAgICAgICAgIC8vIDMuIE5vdE9uRmx5CisKKyAgICAgICAgICAgIFBheWxvYWRMZW4gLT0gKFdMQU5fSERSX0FERFIzX0xFTiArIDQgKyA0KTsgLy8gMjQgaXMgODAyLjExIGhlYWRlciw0IGlzIElWLCA0IGlzIGNyYworICAgICAgICAgICAgTUVNdkNvcHkocERldmljZS0+YWJ5UFJORywgcGJ5SVYsIDMpOworICAgICAgICAgICAgTUVNdkNvcHkocERldmljZS0+YWJ5UFJORyArIDMsIHBLZXktPmFieUtleSwgcEtleS0+dUtleUxlbmd0aCk7CisgICAgICAgICAgICByYzRfaW5pdCgmcERldmljZS0+U0JveCwgcERldmljZS0+YWJ5UFJORywgcEtleS0+dUtleUxlbmd0aCArIDMpOworICAgICAgICAgICAgcmM0X2VuY3J5cHQoJnBEZXZpY2UtPlNCb3gsIHBieUlWKzQsIHBieUlWKzQsIFBheWxvYWRMZW4pOworCisgICAgICAgICAgICBpZiAoRVRIYklzQnVmZmVyQ3JjMzJPayhwYnlJVis0LCBQYXlsb2FkTGVuKSkgeworICAgICAgICAgICAgICAgICpwYnlOZXdSc3IgfD0gTkVXUlNSX0RFQ1JZUFRPSzsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0gZWxzZSBpZiAoKGJ5RGVjTW9kZSA9PSBLRVlfQ1RMX1RLSVApIHx8CisgICAgICAgICAgICAgICAoYnlEZWNNb2RlID09IEtFWV9DVExfQ0NNUCkpIHsKKyAgICAgICAgLy8gVEtJUC9BRVMKKworICAgICAgICBQYXlsb2FkTGVuIC09IChXTEFOX0hEUl9BRERSM19MRU4gKyA4ICsgNCk7IC8vIDI0IGlzIDgwMi4xMSBoZWFkZXIsIDggaXMgSVYmRXh0SVYsIDQgaXMgY3JjCisgICAgICAgICpwZHdSeFRTQzQ3XzE2ID0gY3B1X3RvX2xlMzIoKihQRFdPUkQpKHBieUlWICsgNCkpOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkV4dElWOiAlbHhcbiIsKnBkd1J4VFNDNDdfMTYpOworCisgICAgICAgIGlmIChieURlY01vZGUgPT0gS0VZX0NUTF9US0lQKSB7CisgICAgICAgICAgICAqcHdSeFRTQzE1XzAgPSBjcHVfdG9fbGUxNihNQUtFV09SRCgqKHBieUlWKzIpLCAqcGJ5SVYpKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICpwd1J4VFNDMTVfMCA9IGNwdV90b19sZTE2KCooUFdPUkQpcGJ5SVYpOworICAgICAgICB9CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iVFNDMF8xNTogJXhcbiIsICpwd1J4VFNDMTVfMCk7CisKKyAgICAgICAgaWYgKGJ5RGVjTW9kZSA9PSBLRVlfQ1RMX1RLSVApIHsKKyAgICAgICAgICAgIGlmICgocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQTEpIHx8IChiT25GbHkgPT0gRkFMU0UpKSB7CisgICAgICAgICAgICAgICAgLy8gU29mdHdhcmUgVEtJUAorICAgICAgICAgICAgICAgIC8vIDEuIDMyNTMgQQorICAgICAgICAgICAgICAgIC8vIDIuIE5vdE9uRmx5CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJzb2Z0IEtFWV9DVExfVEtJUCBcbiIpOworICAgICAgICAgICAgICAgIHBNQUNIZWFkZXIgPSAoUFM4MDJfMTFIZWFkZXIpIChwYnlGcmFtZSk7CisgICAgICAgICAgICAgICAgVEtJUHZNaXhLZXkocEtleS0+YWJ5S2V5LCBwTUFDSGVhZGVyLT5hYnlBZGRyMiwgKnB3UnhUU0MxNV8wLCAqcGR3UnhUU0M0N18xNiwgcERldmljZS0+YWJ5UFJORyk7CisgICAgICAgICAgICAgICAgcmM0X2luaXQoJnBEZXZpY2UtPlNCb3gsIHBEZXZpY2UtPmFieVBSTkcsIFRLSVBfS0VZX0xFTik7CisgICAgICAgICAgICAgICAgcmM0X2VuY3J5cHQoJnBEZXZpY2UtPlNCb3gsIHBieUlWKzgsIHBieUlWKzgsIFBheWxvYWRMZW4pOworICAgICAgICAgICAgICAgIGlmIChFVEhiSXNCdWZmZXJDcmMzMk9rKHBieUlWKzgsIFBheWxvYWRMZW4pKSB7CisgICAgICAgICAgICAgICAgICAgICpwYnlOZXdSc3IgfD0gTkVXUlNSX0RFQ1JZUFRPSzsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJJQ1YgT0shXG4iKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIklDViBGQUlMISEhXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJQYXlsb2FkTGVuID0gJWRcbiIsIFBheWxvYWRMZW4pOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIGlmIChieURlY01vZGUgPT0gS0VZX0NUTF9DQ01QKSB7CisgICAgICAgICAgICBpZiAoYk9uRmx5ID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgLy8gU29mdHdhcmUgQ0NNUAorICAgICAgICAgICAgICAgIC8vIE5vdE9uRmx5CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJzb2Z0IEtFWV9DVExfQ0NNUFxuIik7CisgICAgICAgICAgICAgICAgaWYgKEFFU2JHZW5DQ01QKHBLZXktPmFieUtleSwgcGJ5RnJhbWUsIEZyYW1lU2l6ZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgKnBieU5ld1JzciB8PSBORVdSU1JfREVDUllQVE9LOworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkNDTVAgTUlDIGNvbXBhcmUgT0shXG4iKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkNDTVAgTUlDIGZhaWwhXG4iKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgIH0vLyBlbmQgb2YgVEtJUC9BRVMKKworICAgIGlmICgoKihwYnlJViszKSAmIDB4MjApICE9IDApCisgICAgICAgICpwYkV4dElWID0gVFJVRTsKKyAgICByZXR1cm4gVFJVRTsKK30KKworCisKKworI2lmZGVmIFBSSVZBVEVfT0JKCisKK3N0YXRpYyBCT09MIHNfYkFQTW9kZVJ4RGF0YSAoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiByZWZfc2tfYnVmZiogc2tiLAorICAgIElOIFVJTlQgICAgIEZyYW1lU2l6ZSwKKyAgICBJTiBVSU5UICAgICBjYkhlYWRlck9mZnNldCwKKyAgICBJTiBJTlQgICAgICBpU0FOb2RlSW5kZXgsCisgICAgSU4gSU5UICAgICAgaURBTm9kZUluZGV4CisgICAgKQorCisjZWxzZQorCitzdGF0aWMgQk9PTCBzX2JBUE1vZGVSeERhdGEgKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gc3RydWN0IHNrX2J1ZmYqIHNrYiwKKyAgICBJTiBVSU5UICAgICBGcmFtZVNpemUsCisgICAgSU4gVUlOVCAgICAgY2JIZWFkZXJPZmZzZXQsCisgICAgSU4gSU5UICAgICAgaVNBTm9kZUluZGV4LAorICAgIElOIElOVCAgICAgIGlEQU5vZGVJbmRleAorICAgICkKKyNlbmRpZgoreworICAgIFBTTWdtdE9iamVjdCAgICAgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBCT09MICAgICAgICAgICAgICAgIGJSZWxheUFuZEZvcndhcmQgPSBGQUxTRTsKKyAgICBCT09MICAgICAgICAgICAgICAgIGJSZWxheU9ubHkgPSBGQUxTRTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5TWFza1s4XSA9IHsxLCAyLCA0LCA4LCAweDEwLCAweDIwLCAweDQwLCAweDgwfTsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdBSUQ7CisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICBzdHJ1Y3Qgc2tfYnVmZiogdG1wX3NrYjsKKyAgICByZWZfc2tfYnVmZiAgICAgc19yZWZfc2tiOworICAgIHJlZl9za19idWZmKiAgICBza2JjcHkgPSAmc19yZWZfc2tiOworI2Vsc2UKKyAgICBzdHJ1Y3Qgc2tfYnVmZiogc2tiY3B5ID0gTlVMTDsKKyNlbmRpZgorCisKKworICAgIGlmIChGcmFtZVNpemUgPiBDQl9NQVhfQlVGX1NJWkUpCisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAvLyBjaGVjayBEQQorICAgIGlmKElTX01VTFRJQ0FTVF9BRERSRVNTKChQQllURSkoc2tiLT5kYXRhK2NiSGVhZGVyT2Zmc2V0KSkpIHsKKyAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVswXS5iUFNFbmFibGUpIHsKKworI2lmZGVmIFBSSVZBVEVfT0JKCisgICAgICAgICAgIHRtcF9za2IgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKyAgICAgICAgICAgc2tiY3B5ID0gJnNfcmVmX3NrYjsKKyAgICAgICAgICAgcmVmX3NrYl9yZW1hcChwRGV2aWNlLT5kZXYsIHNrYmNweSwgdG1wX3NrYik7CisjZWxzZQorICAgICAgICAgICBza2JjcHkgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKyNlbmRpZgorICAgICAgICAvLyBpZiBhbnkgbm9kZSBpbiBQUyBtb2RlLCBidWZmZXIgcGFja2V0IHVudGlsIERUSU0uCisgICAgICAgICAgIGlmIChza2JjcHkgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfTk9USUNFLCBLRVJOX0lORk8gInJlbGF5IG11bHRpY2FzdCBubyBza2IgYXZhaWxhYmxlIFxuIik7CisgICAgICAgICAgIH0KKyAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICBza2JjcHktPmRldiA9IHBEZXZpY2UtPmRldjsKKyNpZmRlZiBQUklWQVRFX09CSgorICAgICAgICAgICAgICAgKihza2JjcHktPmxlbikgPSBGcmFtZVNpemU7CisgICAgICAgICAgICAgICBtZW1jcHkoc2tiY3B5LT5kYXRhLCBza2ItPmRhdGErY2JIZWFkZXJPZmZzZXQsIEZyYW1lU2l6ZSk7CisgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmKHBNZ210LT5zTm9kZURCVGFibGVbMF0uc1R4UFNRdWV1ZSksIHNrYmNweS0+c2tiKTsKKyNlbHNlCisgICAgICAgICAgICAgICBza2JjcHktPmxlbiA9IEZyYW1lU2l6ZTsKKyAgICAgICAgICAgICAgIG1lbWNweShza2JjcHktPmRhdGEsIHNrYi0+ZGF0YStjYkhlYWRlck9mZnNldCwgRnJhbWVTaXplKTsKKyAgICAgICAgICAgICAgIHNrYl9xdWV1ZV90YWlsKCYocE1nbXQtPnNOb2RlREJUYWJsZVswXS5zVHhQU1F1ZXVlKSwgc2tiY3B5KTsKKyNlbmRpZgorICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS53RW5RdWV1ZUNudCsrOworICAgICAgICAgICAgICAgLy8gc2V0IHR4IG1hcAorICAgICAgICAgICAgICAgcE1nbXQtPmFieVBTVHhNYXBbMF0gfD0gYnlNYXNrWzBdOworICAgICAgICAgICB9CisgICAgICAgfQorICAgICAgIGVsc2UgeworICAgICAgICAgICBiUmVsYXlBbmRGb3J3YXJkID0gVFJVRTsKKyAgICAgICB9CisgICAgfQorICAgIGVsc2UgeworICAgICAgICAvLyBjaGVjayBpZiByZWxheQorICAgICAgICBpZiAoQlNTREJiSXNTVEFJbk5vZGVEQihwTWdtdCwgKFBCWVRFKShza2ItPmRhdGErY2JIZWFkZXJPZmZzZXQpLCAmaURBTm9kZUluZGV4KSkgeworICAgICAgICAgICAgaWYgKHBNZ210LT5zTm9kZURCVGFibGVbaURBTm9kZUluZGV4XS5lTm9kZVN0YXRlID49IE5PREVfQVNTT0MpIHsKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpREFOb2RlSW5kZXhdLmJQU0VuYWJsZSkgeworICAgICAgICAgICAgICAgICAgICAvLyBxdWV1ZSB0aGlzIHNrYiB1bnRpbCBuZXh0IFBTIHR4LCBhbmQgdGhlbiByZWxlYXNlLgorCisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgICAgICAgICAgICAgcmVmX3NrYl9hZGRfb2Zmc2V0KHNrYi0+c2tiLCBjYkhlYWRlck9mZnNldCk7CisgICAgICAgICAgICAgICAgICAgIHNrYl9wdXQoc2tiLT5za2IsIEZyYW1lU2l6ZSk7CisgICAgICAgICAgICAgICAgICAgIHNrYl9xdWV1ZV90YWlsKCZwTWdtdC0+c05vZGVEQlRhYmxlW2lEQU5vZGVJbmRleF0uc1R4UFNRdWV1ZSwgc2tiLT5za2IpOworI2Vsc2UKKwkgICAgICAgICAgICAgICAgc2tiLT5kYXRhICs9IGNiSGVhZGVyT2Zmc2V0OworCSAgICAgICAgICAgICAgICBza2ItPnRhaWwgKz0gY2JIZWFkZXJPZmZzZXQ7CisgICAgICAgICAgICAgICAgICAgIHNrYl9wdXQoc2tiLCBGcmFtZVNpemUpOworICAgICAgICAgICAgICAgICAgICBza2JfcXVldWVfdGFpbCgmcE1nbXQtPnNOb2RlREJUYWJsZVtpREFOb2RlSW5kZXhdLnNUeFBTUXVldWUsIHNrYik7CisjZW5kaWYKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpREFOb2RlSW5kZXhdLndFblF1ZXVlQ250Kys7CisgICAgICAgICAgICAgICAgICAgIHdBSUQgPSBwTWdtdC0+c05vZGVEQlRhYmxlW2lEQU5vZGVJbmRleF0ud0FJRDsKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieVBTVHhNYXBbd0FJRCA+PiAzXSB8PSAgYnlNYXNrW3dBSUQgJiA3XTsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicmVsYXk6IGluZGV4PSAlZCwgcE1nbXQtPmFieVBTVHhNYXBbJWRdPSAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpREFOb2RlSW5kZXgsICh3QUlEID4+IDMpLCBwTWdtdC0+YWJ5UFNUeE1hcFt3QUlEID4+IDNdKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBiUmVsYXlPbmx5ID0gVFJVRTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH07CisgICAgfQorCisgICAgaWYgKGJSZWxheU9ubHkgfHwgYlJlbGF5QW5kRm9yd2FyZCkgeworICAgICAgICAvLyByZWxheSB0aGlzIHBhY2tldCByaWdodCBub3cKKyAgICAgICAgaWYgKGJSZWxheUFuZEZvcndhcmQpCisgICAgICAgICAgICBpREFOb2RlSW5kZXggPSAwOworCisgICAgICAgIGlmICgocERldmljZS0+dUFzc29jQ291bnQgPiAxKSAmJiAoaURBTm9kZUluZGV4ID49IDApKSB7CisgICAgICAgICAgICBST1VURWJSZWxheShwRGV2aWNlLCAoUEJZVEUpKHNrYi0+ZGF0YSArIGNiSGVhZGVyT2Zmc2V0KSwgRnJhbWVTaXplLCAoVUlOVClpREFOb2RlSW5kZXgpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGJSZWxheU9ubHkpCisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorICAgIC8vIG5vbmUgYXNzb2NpYXRlLCBkb24ndCBmb3J3YXJkCisgICAgaWYgKHBEZXZpY2UtPnVBc3NvY0NvdW50ID09IDApCisgICAgICAgIHJldHVybiBGQUxTRTsKKworICAgIHJldHVybiBUUlVFOworfQorCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU1L2RwYy5oIGIvZHJpdmVycy9zdGFnaW5nL3Z0NjY1NS9kcGMuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi42ODQ0N2M0Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3Z0NjY1NS9kcGMuaApAQCAtMCwwICsxLDc1IEBACisvKgorICogQ29weXJpZ2h0IChjKSAxOTk2LCAyMDAzIFZJQSBOZXR3b3JraW5nIFRlY2hub2xvZ2llcywgSW5jLgorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQorICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZ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ICoKKyAqLworCitzdGF0aWMgaW50IGhvc3RhcF9kaXNhYmxlX2hvc3RhcGQoUFNEZXZpY2UgcERldmljZSwgaW50IHJ0bmxfbG9ja2VkKQoreworCisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiJXM6IGRpc2FibGluZyBob3N0YXBkIG1vZGVcbiIsIHBEZXZpY2UtPmRldi0+bmFtZSk7CisKKyAgICBpZiAocERldmljZS0+YXBkZXYgJiYgcERldmljZS0+YXBkZXYtPm5hbWUgJiYgcERldmljZS0+YXBkZXYtPm5hbWVbMF0pIHsKKwkJaWYgKHJ0bmxfbG9ja2VkKQorCQkJdW5yZWdpc3Rlcl9uZXRkZXZpY2UocERldmljZS0+YXBkZXYpOworCQllbHNlCisJCQl1bnJlZ2lzdGVyX25ldGRldihwRGV2aWNlLT5hcGRldik7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIlczogTmV0ZGV2aWNlICVzIHVucmVnaXN0ZXJlZFxuIiwKKwkJICAgICAgIHBEZXZpY2UtPmRldi0+bmFtZSwgcERldmljZS0+YXBkZXYtPm5hbWUpOworCX0KKwlrZnJlZShwRGV2aWNlLT5hcGRldik7CisJcERldmljZS0+YXBkZXYgPSBOVUxMOworICAgIHBEZXZpY2UtPmJFbmFibGU4MDIxeCA9IEZBTFNFOworICAgIHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQID0gRkFMU0U7CisgICAgcERldmljZS0+YkVuY3J5cHRpb25FbmFibGUgPSBGQUxTRTsKKworLy80LjIwMDctMDExOC0wMyw8QWRkPiBieSBFaW5zbkxpdQorLy9leGVjdXRlIHNvbWUgY2xlYXIgd29yaworcERldmljZS0+cE1nbXQtPmJ5Q1NTUEs9S0VZX0NUTF9OT05FOworcERldmljZS0+cE1nbXQtPmJ5Q1NTR0s9S0VZX0NUTF9OT05FOworS2V5dkluaXRUYWJsZSgmcERldmljZS0+c0t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ydmVkIG5vZGUgaW5kZXggPTAgZm9yIG11bHRpY2FzdCBub2RlLgorICAgIEJTU3ZDbGVhck5vZGVEQlRhYmxlKHBEZXZpY2UsIDEpOworICAgIHBEZXZpY2UtPnVBc3NvY0NvdW50ID0gMDsKKworICAgIHJldHVybjsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBzZXQgZWFjaCBzdGF0aW9ucyBlbmNyeXB0aW9uIGtleQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAtCisgKiAgICAgIHBhcmFtICAgICAtCisgKiAgT3V0OgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqCisgKi8KK3N0YXRpYyBpbnQgaG9zdGFwX3NldF9lbmNyeXB0aW9uKFBTRGV2aWNlIHBEZXZpY2UsCisJCQkJICAgICAgIHN0cnVjdCB2aWF3Z2V0X2hvc3RhcGRfcGFyYW0gKnBhcmFtLAorCQkJCSAgICAgICBpbnQgcGFyYW1fbGVuKQoreworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIERXT1JEICAgZHdLZXlJbmRleCA9IDA7CisgICAgQllURSAgICBhYnlLZXlbTUFYX0tFWV9MRU5dOworICAgIEJZVEUgICAgYWJ5U2VxW01BWF9LRVlfTEVOXTsKKyAgICBORElTXzgwMl8xMV9LRVlfUlNDICAgS2V5UlNDOworICAgIEJZVEUgICAgYnlLZXlEZWNNb2RlID0gS0VZX0NUTF9XRVA7CisJaW50ICAgICByZXQgPSAwOworCWludCAgICAgaU5vZGVJbmRleCA9IC0xOworCWludCAgICAgaWk7CisJQk9PTCAgICBiS2V5VGFibGVGdWxsID0gRkFMU0U7CisJV09SRCAgICB3S2V5Q3RsID0gMDsKKworCisJcGFyYW0tPnUuY3J5cHQuZXJyID0gMDsKKy8qCisJaWYgKHBhcmFtX2xlbiAhPQorCSAgICAoaW50KSAoKGNoYXIgKikgcGFyYW0tP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ZUFRfRVJSX1VOS05PV05fQUREUjsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBIT1NUQVBfQ1JZUFRfRVJSX1VOS05PV05fQUREUlxuIik7CisJICAgICAgICByZXR1cm4gLUVJTlZBTDsKKwkgICAgfQorCX0KKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgaG9zdGFwX3NldF9lbmNyeXB0aW9uOiBzdGFfaW5kZXggJWQgXG4iLCBpTm9kZUluZGV4KTsKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgaG9zdGFwX3NldF9lbmNyeXB0aW9uOiBhbGcgJWQgXG4iLCBwYXJhbS0+dS5jcnlwdC5hbGcpOworCisJaWYgKHBhcmFtLT51LmNyeXB0LmFsZyA9PSBXUEFfQUxHX05PTkUpIHsKKworICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5iT25GbHkgPT0gVFJVRSkgeworICAgICAgICAgICAgaWYgKEtleWJSZW1vdmVLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0tPnN0YV9hZGRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmR3S2V5SW5kZXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPlBvcnRPZmZzZXQpID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiS2V5YlJlbW92ZUtleSBmYWlsIFxuIik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJPbkZseSA9IEZBTFNFOworICAgICAgICB9CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uYnlLZXlJbmRleCA9IDA7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uZHdLZXlJbmRleCA9IDA7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0udVdlcEtleUxlbmd0aCA9IDA7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uS2V5UlNDID0gMDsKKyAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5kd1RTQzQ3XzE2ID0gMDsKKyAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS53VFNDMTVfMCA9IDA7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uYnlDaXBoZXJTdWl0ZSA9IDA7CisgICAgICAgIG1lbXNldCgmcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5hYnlXZXBLZXlbMF0sCisgICAgICAgICAgICAgICAgMCwKKyAgICAgICAgICAgICAgICBNQVhfS0VZX0xFTgorICAgICAgICAgICAgICAgKTsKKworICAgICAgICByZXR1cm4gcmV0OworCX0KKworICAgIG1lbWNweShhYnlLZXksIHBhcmFtLT51LmNyeXB0LmtleSwgcGFyYW0tPnUuY3J5cHQua2V5X2xlbik7CisgICAgLy8gY29weSB0byBub2RlIGtleSB0YmwKKyAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJ5S2V5SW5kZXggPSBwYXJhbS0+dS5jcnlwdC5pZHg7CisgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS51V2VwS2V5TGVuZ3RoID0gcGFyYW0tPnUuY3J5cHQua2V5X2xlbjsKKyAgICBtZW1jcHkoJnBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uYWJ5V2VwS2V5WzBdLAorICAgICAgICAgICAgcGFyYW0tPnUuY3J5cHQua2V5LAorICAgICAgICAgICAgcGFyYW0tPnUuY3J5cHQua2V5X2xlbgorICAgICAgICAgICApOworCisgICAgZHdLZXlJbmRleCA9IChEV09SRCkocGFyYW0tPnUuY3J5cHQuaWR4KTsKKyAgICBpZiAocGFyYW0tPnUuY3J5cHQuZmxhZ3MgJiBIT1NUQVBfQ1JZUFRfRkxBR19TRVRfVFhfS0VZKSB7CisgICAgICAgIHBEZXZpY2UtPmJ5S2V5SW5kZXggPSAoQllURSlkd0tleUluZGV4OworICAgICAgICBwRGV2aWNlLT5iVHJhbnNtaXRLZXkgPSBUUlVFOworICAgICAgICBkd0tleUluZGV4IHw9ICgxIDw8IDMxKTsKKyAgICB9CisKKwlpZiAocGFyYW0tPnUuY3J5cHQuYWxnID09IFdQQV9BTEdfV0VQKSB7CisKKyAgICAgICAgaWYgKChwRGV2aWNlLT5iRW5hYmxlODAyMXggPT0gRkFMU0UpIHx8IChpTm9kZUluZGV4ID09IDApKSB7CisgICAgICAgICAgICBLZXliU2V0RGVmYXVsdEtleSgmKHBEZXZpY2UtPnNLZXkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkd0tleUluZGV4ICYgfihCSVQzMCB8IFVTRV9LRVlSU0MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS0+dS5jcnlwdC5rZXlfbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYnlLZXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtFWV9DVExfV0VQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5Qb3J0T2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUxvY2FsSUQpOworCisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvLyA4MDIxeCBlbmFibGUsIGluZGl2aWR1YWwga2V5CisgICAgICAgICAgICBkd0tleUluZGV4IHw9ICgxIDw8IDMwKTsgLy8gc2V0IHBhaXJ3aXNlIGtleQorICAgICAgICAgICAgaWYgKEtleWJTZXRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICZwYXJhbS0+c3RhX2FkZHJbMF0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICBkd0tleUluZGV4ICYgfihVU0VfS0VZUlNDKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLT51LmNyeXB0LmtleV9sZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFFXT1JEKSAmKEtleVJTQyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoUEJZVEUpYWJ5S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtFWV9DVExfV0VQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPlBvcnRPZmZzZXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlMb2NhbElEKSA9PSBUUlVFKSB7CisKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJPbkZseSA9IFRSVUU7CisKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgLy8gS2V5IFRhYmxlIEZ1bGwKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJPbkZseSA9IEZBTFNFOworICAgICAgICAgICAgICAgIGJLZXlUYWJsZUZ1bGwgPSBUUlVFOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID0gTmRpczgwMl8xMUVuY3J5cHRpb24xRW5hYmxlZDsKKyAgICA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ocGFyYW0tPnUuY3J5cHQuYWxnID09IFdQQV9BTEdfQ0NNUCkgeworCSAgICBpZiAoKHBhcmFtLT51LmNyeXB0LmtleV9sZW4gIT0gQUVTX0tFWV9MRU4pIHx8CisJICAgICAgICAocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQTEpKQorCSAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgIHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZDsKKyAgICAgICAgYnlLZXlEZWNNb2RlID0gS0VZX0NUTF9DQ01QOworICAgICAgICBwTWdtdC0+YnlDU1NQSyA9IEtFWV9DVExfQ0NNUDsKKyAgICAgICAgcE1nbXQtPmJ5Q1NTR0sgPSBLRVlfQ1RMX0NDTVA7CisgICAgfQorCisKKyAgICBpZiAoaU5vZGVJbmRleCA9PSAwKSB7CisgICAgICAgS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS0+dS5jcnlwdC5rZXlfbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBRV09SRCkgJihLZXlSU0MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgYWJ5S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgYnlLZXlEZWNNb2RlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5TG9jYWxJRCk7CisgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5iT25GbHkgPSBUUlVFOworCisgICAgfSBlbHNlIHsKKyAgICAgICAgZHdLZXlJbmRleCB8PSAoMSA8PCAzMCk7IC8vIHNldCBwYWlyd2lzZSBrZXkKKyAgICAgICAgaWYgKEtleWJTZXRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgJnBhcmFtLT5zdGFfYWRkclswXSwKKyAgICAgICAgICAgICAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0tPnUuY3J5cHQua2V5X2xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgKFBRV09SRCkgJihLZXlSU0MpLAorICAgICAgICAgICAgICAgICAgICAgICAoUEJZVEUpYWJ5S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgYnlLZXlEZWNNb2RlLAorICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5TG9jYWxJRCkgPT0gVFJVRSkgeworCisgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJPbkZseSA9IFRSVUU7CisKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIC8vIEtleSBUYWJsZSBGdWxsCisgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmJPbkZseSA9IEZBTFNFOworICAgICAgICAgICAgYktleVRhYmxlRnVsbCA9IFRSVUU7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgS2V5IFRhYmxlIEZ1bGxcbiIpOworICAgICAgICB9CisKKyAgICB9CisKKyAgICBpZiAoYktleVRhYmxlRnVsbCA9PSBUUlVFKSB7CisgICAgICAgIHdLZXlDdGwgJj0gMHg3RjAwOyAgICAgICAgICAgICAgLy8gY2xlYXIgYWxsIGtleSBjb250cm9sIGZpbGVkCisgICAgICAgIHdLZXlDdGwgfD0gKGJ5S2V5RGVjTW9kZSA8PCA0KTsKKyAgICAgICAg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b25zCisgKgorICogQXV0aG9yOiBMeW5kb24gQ2hlbgorICoKKyAqIERhdGU6IE1heSA4LCAyMDAyCisgKgorICovCisKKyNpZm5kZWYgX19JT0NNRF9IX18KKyNkZWZpbmUgX19JT0NNRF9IX18KKworI2lmICFkZWZpbmVkKF9fVFRZUEVfSF9fKQorI2luY2x1ZGUgInR0eXBlLmgiCisjZW5kaWYKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IERlZmluaXRpb25zIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjaWYgIWRlZmluZWQoREVGKQorI2RlZmluZSBERUYKKyNlbmRpZgorCisvL3R5cGVkZWYgaW50IEJPT0w7CisvL3R5cGVkZWYgdWludDMyX3QgdTMyOworLy90eXBlZGVmIHVpbnQxNl90IHUxNjsKKy8vdHlwZWRlZiB1aW50OF90IHU4OworCisKKy8vIGlvY3RsIENvbW1hbmQgY29kZQorI2RlZmluZSBNQUdJQ19DT0RFCSAgICAgICAgICAgICAgICAgMHgzMTQyCisjZGVmaW5lIElPQ1RMX0NNRF9URVNUCSAgICAgICAgICAgIChTSU9DREVWUFJJVkFURSArIDApCisjZGVmaW5lIElPQ1RMX0NNRF9TRVQJCQkgICAgKFNJT0NERVZQUklWQVRFICsgMSkKKyNkZWZpbmUgSU9DVExfQ01EX0hPU1RBUEQgICAgICAgICAgIChTSU9DREVWUFJJVkFURSArIDIpCisjZGVmaW5lIElPQ1RMX0NNRF9XUEEgICAgICAgICAgICAgICAoU0lPQ0RFVlBSSVZBVEUgKyAzKQorCisKK3R5cGVkZWYgZW51bSB0YWdXTUFDX0NNRCB7CisKKyAgICBXTEFOX0NNRF9CU1NfU0NBTiwKKyAgICBXTEFOX0NNRF9CU1NfSk9JTiwKKyAgICBXTEFOX0NNRF9ESVNBU1NPQywKKyAgICBXTEFOX0NNRF9TRVRfV0VQLAorICAgIFdMQU5fQ01EX0dFVF9MSU5LLAorICAgIFdMQU5fQ01EX0d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gU0NtZFpvbmVUeXBlU2V0LCAqUFNDbWRab25lVHlwZVNldDsKKworI2lmZGVmIFdQQV9TTV9UcmFuc3RhdHVzCit0eXBlZGVmIHN0cnVjdCB0YWdTV1BBUmVzdWx0IHsKKyAgICAgICAgIGNoYXIJaWZuYW1lWzEwMF07CisgICAgICAgICBVOAkJcHJvdG87CisgICAgICAgICBVOCAgIGtleV9tZ210OworICAgICAgICAgVTggICBlYXBfdHlwZTsKKyAgICAgICAgIEJPT0wgYXV0aGVudGljYXRlZDsKK30gU1dQQVJlc3VsdCwgKlBTV1BBUmVzdWx0OworI2VuZGlmCisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnU0NtZFN0YXJ0QVAgeworCisgICAgVTE2CSAgICB3QlNTVHlwZTsKKyAgICBVMTYgICAgIHdCQlBUeXBlOworICAgIFU4CSAgICBzc2lkW1NTSURfTUFYTEVOICsgMl07CisgICAgVTMyIAl1Q2hhbm5lbDsKKyAgICBVMzIgICAgIHVCZWFjb25JbnQ7CisgICAgQk9PTCAgICBiU2hhcmVLZXlBdXRoOworICAgIFU4ICAgICAgYnlCYXNpY1JhdGU7CisKK30gU0NtZFN0YXJ0QVAsICpQU0NtZFN0YXJ0QVA7CisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnU0NtZFNldFdFUCB7CisKKyAgICBCT09MICAgIGJFbmFibGVXZXA7CisgICAgVTggICAgICBieUtleUluZGV4OworICAgIFU4ICAgICAgYWJ5V2VwS2V5W1dFUF9OS0VZU11bV0VQX0tFWU1BWExFTl07CisgICAgQk9PTCAgICBiV2VwS2V5QXZhaWxhYmxlW1dFUF9OS0VZU107CisgICAgVTMyICAgICBhdVdlcEtleUxlbmd0aFtXRVBfTktFWVNdOworCit9IFNDbWRTZXRXRVAsICpQU0NtZFNldFdFUDsKKworCisKK3R5cGVkZWYgc3RydWN0IHRhZ1NCU1NJREl0ZW0geworCisJVTMyCSAgICB1Q2hhbm5lbDsKKyAgICBVOCAgICAgIGFieUJTU0lEW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0aWNhc3RUcmFuc21pdHRlZEZyYW1lQ291bnQ7CisgICAgVTMyIEZhaWxlZENvdW50OworICAgIFUzMiBSZXRyeUNvdW50OworICAgIFUzMiBNdWx0aXBsZVJldHJ5Q291bnQ7CisgICAgVTMyIFJUU1N1Y2Nlc3NDb3VudDsKKyAgICBVMzIgUlRTRmFpbHVyZUNvdW50OworICAgIFUzMiBBQ0tGYWlsdXJlQ291bnQ7CisgICAgVTMyIEZyYW1lRHVwbGljYXRlQ291bnQ7CisgICAgVTMyIFJlY2VpdmVkRnJhZ21lbnRDb3VudDsKKyAgICBVMzIgTXVsdGljYXN0UmVjZWl2ZWRGcmFtZUNvdW50OworICAgIFUzMiBGQ1NFcnJvckNvdW50OworfSBTRG90MTFNSUJDb3VudCwgREVGKiBQU0RvdDExTUlCQ291bnQ7CisKKworCisvLworLy8gc3RhdGlzdGljIGNvdW50ZXIKKy8vCit0eXBlZGVmIHN0cnVjdCB0YWdTU3RhdE1JQkNvdW50IHsKKyAgICAvLworICAgIC8vIElTUiBzdGF0dXMgY291bnQKKyAgICAvLworICAgIFUzMiAgIGR3SXNyVHgwT0s7CisgICAgVTMyICAgZHdJc3JUeDFPSzsKKyAgICBVMzIgICBkd0lzckJlYWNvblR4T0s7CisgICAgVTMyICAgZHdJc3JSeE9LOworICAgIFUzMiAgIGR3SXNyVEJUVEludDsKKyAgICBVMzIgICBkd0lzclNUSU1FUkludDsKKyAgICBVMzIgICBkd0lzclVucmVjb3ZlcmFibGVFcnJvcjsKKyAgICBVMzIgICBkd0lzclNvZnRJbnRlcnJ1cHQ7CisgICAgVTMyICAgZHdJc3JSeE5vQnVmOworICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKworICAgIFUzMiAgIGR3SXNyVW5rbm93bjsgICAgICAgICAgICAgICAvLyB1bmtub3duIGludGVycnVwdCBjb3VudAorCisgICAgLy8gUlNSIHN0YXR1cyBjb3VudAorICAgIC8vCisgICAgVTMy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VMzIgICB1bGxUeERpcmVjdGVkQnl0ZXNbMl07Cit9IFNTdGF0TUlCQ291bnQsIERFRiogUFNTdGF0TUlCQ291bnQ7CisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnU05vZGVJdGVtIHsKKyAgICAvLyBTVEEgaW5mbworICAgIFUxNiAgICAgICAgICAgIHdBSUQ7CisgICAgVTggICAgICAgICAgICAgYWJ5TUFDQWRkcls2XTsKKyAgICBVMTYgICAgICAgICAgICB3VHhEYXRhUmF0ZTsKKyAgICBVMTYgICAgICAgICAgICB3SW5BY3RpdmVDb3VudDsKKyAgICBVMTYgICAgICAgICAgICB3RW5RdWV1ZUNudDsKKyAgICBVMTYgICAgICAgICAgICB3RmxhZ3M7CisgICAgQk9PTCAgICAgICAgICAgYlBXQml0T247CisgICAgVTggICAgICAgICAgICAgYnlLZXlJbmRleDsKKyAgICBVMTYgICAgICAgICAgICB3V2VwS2V5TGVuZ3RoOworICAgIFU4ICAgICAgICAgICAgYWJ5V2VwS2V5W1dFUF9LRVlNQVhMRU5dOworICAgIC8vIEF1dG8gcmF0ZSBmYWxsYmFjayB2YXJzCisgICAgQk9PTCAgICAgICAgICAgYklzSW5GYWxsYmFjazsKKyAgICBVMzIgICAgICAgICAgICB1VHhGYWlsdXJlczsKKyAgICBVMzIgICAgICAgICAgICB1VHhBdHRlbXB0czsKKyAgICBVMTYgICAgICAgICAgICB3RmFpbHVyZVJhdGlvOworCit9IFNOb2RlSXRlbTsKKworCit0eXBlZGVmIHN0cnVjdCB0YWdTTm9kZUxpc3QgeworCisJVTMyCQkgICAgdUl0ZW07CisJU05vZGVJdGVtCXNOb2RlTGlzdFswXTsKKworfSBTTm9kZUxpc3QsICpQU05vZGVMaXN0OworCisKKwordHlwZWRlZiBzdHJ1Y3QgdGFnU0NtZFZhbHVlIHsKKworICAgIFUzMiAgICAgZHdWYWx1ZTsKKworfSBTQ21kVmFsdWUsICAqUFNDbWRWYWx1ZTsKKworCisvLworLy8gaG9zdGFwZCAm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3QpcnE7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCWludCAJCSAgICAgICAgcmVzdWx0ID0gMDsKKyAgICBQV0xBTl9JRV9TU0lEICAgICAgIHBJdGVtU1NJRDsKKyAgICBTQ21kQlNTSm9pbiAgICAgICAgIHNKb2luQ21kOworICAgIFNDbWRab25lVHlwZVNldCAgc1pvbmVUeXBlQ21kOworICAgIFNDbWRTY2FuICAgICAgICAgICAgc1NjYW5DbWQ7CisgICAgU0NtZFN0YXJ0QVAgICAgICAgICBzU3RhcnRBUENtZDsKKyAgICBTQ21kU2V0V0VQICAgICAgICAgIHNXRVBDbWQ7CisgICAgU0NtZFZhbHVlICAgICAgICAgICBzVmFsdWU7CisgICAgU0JTU0lETGlzdCAgICAgICAgICBzTGlzdDsKKyAgICBTTm9kZUxpc3QgICAgICAgICAgIHNOb2RlTGlzdDsKKyAgICBQU0JTU0lETGlzdCAgICAgICAgIHBMaXN0OworICAgIFBTTm9kZUxpc3QgICAgICAgICAgcE5vZGVMaXN0OworICAgIFVJTlQgICAgICAgICAgICAgICAgY2JMaXN0Q291bnQ7CisgICAgUEtub3duQlNTICAgICAgICAgICBwQlNTOworICAgIFBLbm93bk5vZGVEQiAgICAgICAgcE5vZGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICBpaSwgamo7CisgICAgU0NtZExpbmtTdGF0dXMgICAgICBzTGlua1N0YXR1czsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieVN1cHBSYXRlc1tdID0ge1dMQU5fRUlEX1NVUFBfUkFURVMsIDQsIDB4MDIsIDB4MDQsIDB4MEIsIDB4MTZ9OworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5TnVsbEFkZHJbXSA9IHsweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKyAgICBEV09SRCAgICAgICAgICAgICAgIGR3S2V5SW5kZXg9IDA7CisgICAgQllURSAgICAgICAgICAgICAgICBhYnlTY2FuU1NJRFtXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKyAxXTsKKyAgICBMT05HICAgICAgICAgICAgICAgIGxkQm07CisKKworICAgIHBSZXEtPndSZXN1bHQgPSAwOworCisgICAgc3dpdGNoKHBSZXEtPndDbWRDb2RlKSB7CisKKyAgICBjYXNlIFdMQU5fQ01EX0JTU19TQ0FOOgorCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIldMQU5fQ01EX0JTU19TQ0FOLi5iZWdpbiBcbiIpOworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoJnNTY2FuQ21kLCBwUmVxLT5kYXRhLCBzaXplb2YoU0NtZFNjYW4pKSkgeworCQkJcmVzdWx0ID0gLUVGQVVMVDsKKwkJCWJyZWFrOworCQl9OworCisgICAgICAgIHBJdGVtU1NJRCA9IChQV0xBTl9JRV9TU0lEKXNTY2FuQ21kLnNzaWQ7CisgICAgICAgIGlmIChwSXRlbVNTSUQtPmxlbiAhPSAwKSB7CisgICAgICAgICAgICBtZW1zZXQoYWJ5U2NhblNTSUQsIDAsIFdMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDEpOworICAgICAgICAgICAgbWVtY3B5KGFieVNjYW5TU0lELCBwSXRlbVNTSUQsIHBJdGVtU1NJRC0+bGVuICsgV0xBTl9JRUhEUl9MRU4pOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJNQUNTdXNwZW5kID09IFRSVUUpIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iUmFkaW9PZmYgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICBDQVJEYlJhZGlvUG93ZXJPbihwRGV2aWNlKTsKKyAgICAgICAgICAgIHZNZ3JUaW1lckluaXQocERldmljZSk7CisgICAgICAgICAgICBNQUN2SW50RW5hYmxlKHBEZXZpY2UtPlBvcnRPZmZzZXQsIEl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kJcmVzdWx0ID0gLUVGQVVMVDsKKwkJCWJyZWFrOworCQl9OworCisgICAgICAgICAgaWYoc1pvbmVUeXBlQ21kLmJXcml0ZT09VFJVRSkgeworCSAgLy8vLy8vd3JpdGUgem9uZXR5cGUKKyAgICAgICAgICAgICAgICBpZihzWm9uZVR5cGVDbWQuWm9uZVR5cGUgPT0gWm9uZVR5cGVfVVNBKSB7CisgICAgICAgICAgICAgICAgICAvL3NldCB0byBVU0EKKyAgICAgICAgICAgICAgICAgICBwcmludGsoInNldF9ab25lVHlwZTpVU0FcbiIpOworCQl9CisgICAgICAgICAgICAgICAgZWxzZSBpZihzWm9uZVR5cGVDbWQuWm9uZVR5cGUgPT0gWm9uZVR5cGVfSmFwYW4pIHsKKyAgICAgICAgICAgICAgICAgIC8vc2V0IHRvIEphcGFuCisgICAgICAgICAgICAgICAgICBwcmludGsoInNldF9ab25lVHlwZTpKYXBhblxuIik7CisJCX0KKwkgICAgICAgZWxzZSBpZihzWm9uZVR5cGVDbWQuWm9uZVR5cGUgPT0gWm9uZVR5cGVfRXVyb3BlKSB7CisgICAgICAgICAgICAgICAgICAvL3NldCB0byBFdXJvcGUKKyAgICAgICAgICAgICAgICAgIHByaW50aygic2V0X1pvbmVUeXBlOkV1cm9wZVxuIik7CisJCX0KKyAgICAgICAgICAgIH0KKwllbHNlIHsKKyAgICAgICAgICAvLy8vLy8vcmVhZCB6b25ldHlwZQorCSAgQllURSAgICAgICAgICAgICAgICAgICAgICAgem9uZXR5cGU9MDsKKworCisgICAgICAgICAgIGlmKHpvbmV0eXBlID09IDB4MDApICB7IC8vVVNBCisgICAgICAgICAgICAgc1pvbmVUeXBlQ21kLlpvbmVUeXBlID0gWm9uZVR5cGVfVVNBOworICAgICAgICAgICB9CisJIGVsc2UgaWYoem9uZXR5cGUgPT0gMHgwMSkgeyAvL0phcGFuCisgICAgICAgICAgICAgc1pvbmVUeXBlQ21kLlpvbmVUeXBlID0gWm9uZVR5cGVfSmFwYW47CisJICB9CisJIGVsc2UgaWYoem9uZXR5cGUgPT0gMHgwMikgeyAvL0V1cm9wZQorICAgICAgICAgICAgIHNab25lVHlwZUNtZC5ab25lVHlwZSA9IFpvbmVUeXBlX0V1cm9wZTsKKwkgfQorCSBlbHNlIHsgLy9Vbmtub3cgWm9uZVR5cGUKKwkgICAgICAgIHByaW50aygiRXJyb3I6Wm9uZVR5cGVbJXhdIFVua25vd24gPz8/XG4iLHpvbmV0eXBlKTsKKwkgICAgICAgICByZXN1bHQgPSAtRUZBVUxUOworCQlicmVhazsKKwkgfQorCSAgIGlmIChjb3B5X3RvX3VzZXIocFJlcS0+ZGF0YSwgJnNab25lVHlwZUNtZCwgc2l6ZW9mKFNDbWRab25lVHlwZVNldCkpKSB7CisJCQlyZXN1bHQgPSAtRUZBVUxUOworCQkJYnJlYWs7CisJCX07CisJfQorCisJICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfQlNTX0pPSU46CisKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJNQUNTdXNwZW5kID09IFRSVUUpIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iUmFkaW9PZmYgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICBDQVJEYlJhZGlvUG93ZXJPbihwRGV2aWNlKTsKKyAgICAgICAgICAgIHZNZ3JUaW1lckluaXQocERldmljZSk7CisgICAgICAgICAgICBNQUN2SW50RW5hYmxlKHBEZXZpY2UtPlBvcnRPZmZzZXQsIElNUl9NQVNLX1ZBTFVFKTsKKyAgICAgICAgICAgIGFkZF90aW1lcigmcE1nbXQtPnNUaW1lclNlY29uZENhbGxiYWNrKTsKKyAgICAgICAgICAgIHBEZXZpY2UtPmJNQUNTdXNwZW5kID0gRkFMU0U7CisgICAgICAgIH0KKworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoJnNKb2luQ21kLCBwUmVxLT5kYXRhLCBzaXplb2YoU0NtZEJTU0pvaW4pKSkgeworCQkJcmVzdWx0ID0gLUVGQVVMVDs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ZSAiZHdLZXlJbmRleCIgZXJyb3IKKwkvLyAgZHdLZXlJbmRleCB8PSAoMSA8PCAzMSk7CisJICBkd0tleUluZGV4ID1paXwoMSA8PCAzMSk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBkd0tleUluZGV4ID0gaWk7CisKKyAgICAgICAgICAgICAgICBLZXliU2V0RGVmYXVsdEtleSgmKHBEZXZpY2UtPnNLZXkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNXRVBDbWQuYXVXZXBLZXlMZW5ndGhbaWldLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQQllURSkmc1dFUENtZC5hYnlXZXBLZXlbaWldWzBdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgS0VZX0NUTF9XRVAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5Qb3J0T2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlMb2NhbElEKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBwRGV2aWNlLT5ieUtleUluZGV4ID0gc1dFUENtZC5ieUtleUluZGV4OworICAgICAgICBwRGV2aWNlLT5iVHJhbnNtaXRLZXkgPSBUUlVFOworICAgICAgICBwRGV2aWNlLT5iRW5jcnlwdGlvbkVuYWJsZSA9IFRSVUU7CisgICAgICAgIHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID0gTmRpczgwMl8xMUVuY3J5cHRpb24xRW5hYmxlZDsKKworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfR0VUX0xJTks6CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0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ud1R4RGF0YVJhdGU7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIiBMaW5rIFN1Y2Nlc3MgISBcbiIpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgc0xpbmtTdGF0dXMuYkxpbmsgPSBGQUxTRTsKKyAgICAgICAgfQorICAgICAgICBpZiAoY29weV90b191c2VyKHBSZXEtPmRhdGEsICZzTGlua1N0YXR1cywgc2l6ZW9mKFNDbWRMaW5rU3RhdHVzKSkpIHsKKwkJCXJlc3VsdCA9IC1FRkFVTFQ7CisJCQlicmVhazsKKwkJfTsKKworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfR0VUX0xJU1RMRU46CisJCWNiTGlzdENvdW50ID0gMDsKKwkJcEJTUyA9ICYocE1nbXQtPnNCU1NMaXN0WzBdKTsKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX0JTU19OVU07IGlpKyspIHsKKyAgICAgICAgICAgIHBCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFtpaV0pOworICAgICAgICAgICAgaWYgKCFwQlNTLT5iQWN0aXZlKQorICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgY2JMaXN0Q291bnQrKzsKKyAgICAgICAgfTsKKyAgICAgICAgc0xpc3QudUl0ZW0gPSBjYkxpc3RDb3VudDsKKyAgICAgICAgaWYgKGNvcHlfdG9fdXNlcihwUmVxLT5kYXRhLCAmc0xpc3QsIHNpemVvZihTQlNTSURMaXN0KSkpIHsKKwkJCXJlc3VsdCA9IC1FRkFVTFQ7CisJCQlicmVhazsKKwkJfTsKKyAgICAgICAgcFJlcS0+d1Jlc3VsdCA9IDA7CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBXTEFOX0NNRF9HRVRfTElTVDoKKyAgICAgICAgaWYgKGNvcHlfZnJvbV91c2VyKCZzTGlzdCwgcFJlcS0+ZGF0YSwgc2l6ZW9mKFNCU1NJRExpc3QpKSkgeworCQkJcmVzdWx0ID0gLUVGQVVMVDsKKwkJCWJyZWFrOworCQl9OworICAgICAgICBwTGlzdCA9IChQU0JTU0lETGlzdClrbWFsbG9jKHNpemVvZihTQlNTSURMaXN0KSArIChzTGlzdC51SXRlbSAqIHNpemVvZihTQlNTSURJdGVtKSksIChpbnQpR0ZQX0FUT01JQyk7CisgICAgICAgIGlmIChwTGlzdCA9PSBOVUxMKSB7CisgICAgICAgICAgICByZXN1bHQgPSAtRU5PTUVNOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKwkJcExpc3QtPnVJdGVtID0gc0xpc3QudUl0ZW07CisJCXBCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFswXSk7CisgICAgICAgIGZvciAoaWkgPSAwLCBqaiA9IDA7IGpqIDwgTUFYX0JTU19OVU0gOyBqaisrKSB7CisgICAgICAgICAgICBwQlNTID0gJihwTWdtdC0+c0JTU0xpc3RbampdKTsKKyAgICAgICAgICAgIGlmIChwQlNTLT5iQWN0aXZlKSB7CisgICAgCQkgICAgcExpc3QtPnNCU1NJRExpc3RbaWldLnVDaGFubmVsID0gcEJTUy0+dUNoYW5uZWw7CisgICAgCQkgICAgcExpc3QtPnNCU1NJRExpc3RbaWldLndCZWFjb25JbnRlcnZhbCA9IHBCU1MtPndCZWFjb25JbnRlcnZhbDsKKyAgICAJCSAgICBwTGlzdC0+c0JTU0lETGlzdFtpaV0ud0NhcEluZm8gPSBwQlNTLT53Q2FwSW5mbzsKKy8vICAgIAkJICAgIHBMaXN0LT5zQlNTSURMaXN0W2lpXS51UlNTSSA9IHBCU1MtPnVSU1NJOworICAgIAkJICAgIFJGdlJTU0lUb2RCbShwRGV2aWNlLCAoQllURSkocEJTUy0+dVJTU0kpLCAmbGRCbSk7CisgICAgCQkgICAgcExpc3QtPnNCU1NJRExpc3RbaWldLnVSU1NJID0gKFVJTlQpbGRCbTsKKyAgICAJCSAgICBtZW1jcHkocExpc3QtPnNCU1NJRExpc3RbaWldLmFieUJTU0lELCBwQlNTLT5hYnlCU1NJRCwgV0xBTl9CU1NJRF9MRU4pOworICAgIAkJICAgIHBJdGVtU1NJRCA9IChQV0xBTl9JRV9TU0lEKXBCU1MtPmFieVNTSUQ7CisgICAgCQkgICAgbWVtc2V0KHBMaXN0LT5zQlNTSURMaXN0W2lpXS5hYnlTU0lELCAwLCBXTEFOX1NTSURfTUFYTEVOICsgMSk7CisgICAgCQkgICAgbWVtY3B5KHBMaXN0LT5zQlNTSURMaXN0W2lpXS5hYnlTU0lELCBwSXRlbVNTSUQtPmFieVNTSUQsIHBJdGVtU1NJRC0+bGVuKTsKKyAgICAgICAgICAgICAgICBpZiAoV0xBTl9HRVRfQ0FQX0lORk9fRVNTKHBCU1MtPndDYXBJbmZvKSkgeworICAgIAkJICAgICAgICBwTGlzdC0+c0JTU0lETGlzdFtpaV0uYnlOZXRUeXBlID0gSU5GUkE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgIAkJICAgICAgICBwTGlzdC0+c0JTU0lETGlzdFtpaV0uYnlOZXRUeXBlID0gQURIT0M7CisgICAgCQkgICAgfQorICAgIAkJICAgIGlmIChXTEFOX0dFVF9DQVBfSU5GT19QUklWQUNZKHBCU1MtPndDYXBJbmZvKSkgeworICAgIAkJICAgICAgICBwTGlzdC0+c0JTU0lETGlzdFtpaV0uYldFUE9uID0gVFJVRTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgCQkgICAgICAgIHBMaXN0LT5zQlNTSURMaXN0W2lpXS5iV0VQT24gPSBGQUxTRTsKKyAgICAJCSAgICB9CisgICAgCQkgICAgaWkgKys7CisgICAgCQkgICAgaWYgKGlpID49IHBMaXN0LT51SXRlbSkKKyAgICAJCSAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAoY29weV90b191c2VyKHBSZXEtPm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EZBTFNFOworICAgICAgICBtZW1zZXQocE1nbXQtPmFieUN1cnJCU1NJRCwgMCwgNik7CisgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICBkZWxfdGltZXIoJnBEZXZpY2UtPnNUaW1lckNvbW1hbmQpOworICAgICAgICBkZWxfdGltZXIoJnBNZ210LT5zVGltZXJTZWNvbmRDYWxsYmFjayk7CisgICAgICAgIHBEZXZpY2UtPmJDbWRSdW5uaW5nID0gRkFMU0U7CisgICAgICAgIHBEZXZpY2UtPmJNQUNTdXNwZW5kID0gVFJVRTsKKyAgICAgICAgTUFDdkludERpc2FibGUocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisKKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFdMQU5fQ01EX1NUQVJUX01BQzoKKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJXTEFOX0NNRF9TVEFSVF9NQUNcbiIpOworCisgICAgICAgIGlmIChwRGV2aWNlLT5iTUFDU3VzcGVuZCA9PSBUUlVFKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+YlJhZGlvT2ZmID09IFRSVUUpCisgICAgICAgICAgICAgICAgQ0FSRGJSYWRpb1Bvd2VyT24ocERldmljZSk7CisgICAgICAgICAgICB2TWdyVGltZXJJbml0KHBEZXZpY2UpOworICAgICAgICAgICAgTUFDdkludEVuYWJsZShwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBJTVJfTUFTS19WQUxVRSk7CisgICAgICAgICAgICBhZGRfdGltZXIoJnBNZ210LT5zVGltZXJTZWNvbmRDYWxsYmFjayk7CisgICAgICAgICAgICBwRGV2aWNlLT5iTUFDU3VzcGVuZCA9IEZBTFNFOworICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBXTEFOX0NNRF9TRVRfSE9TVEFQRDoKKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJXTEFOX0NNRF9TRVRfSE9TVEFQRFxuIik7CisKKyAgICAgICAgaWYgKGNvcHlfZnJvbV91c2VyKCZzVmFsdWUsIHBSZXEtPmRhdGEsIHNpemVvZihTQ21kVmFsdWUpKSkgeworCQkJcmVzdWx0ID0gLUVGQVVMVDsKKwkJCWJyZWFrOworCQl9OworCQlpZiAoc1ZhbHVlLmR3VmFsdWUgPT0gMSkgeworICAgICAgICAgICAgaWYgKGhvc3RhcF9zZXRfaG9zdGFwZChwRGV2aWNlLCAxLCAxKSA9PSAwKXsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJFbmFibGUgSE9TVEFQXG4iKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworCQkJICAgIHJlc3VsdCA9IC1FRkFVTFQ7CisJCQkgICAgYnJlYWs7CisJCQl9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBob3N0YXBfc2V0X2hvc3RhcGQocERldmljZSwgMCwgMSk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJEaXNhYmxlIEhPU1RBUFxuIik7CisgICAgICAgIH0KKworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfU0VUX0hPU1RBUERfU1RBOgorCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIldMQU5fQ01EX1NFVF9IT1NUQVBEX1NUQVxuIik7CisKKyAgICAgICAgYnJlYWs7CisgICAgY2FzZSBXTEFOX0NNRF9TRVRfODAyXzFYOgorCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIldMQU5fQ01EX1NFVF84MDJfMVhcbiIpOworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoJnNWYWx1ZSwgcFJlcS0+ZGF0YSwgc2l6ZW9mKFNDbWRWYWx1ZSkpKSB7CisJCQlyZXN1bHQgPSAtRUZBVUxUOworCQkJYnJlYWs7CisJCX07CisKKwkJaWYgKHNWYWx1ZS5kd1ZhbHVlID09IDEpIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPmJFbmFibGU4MDIxeCA9IFRSVUU7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJFbmFibGUgODAyLjF4XG4iKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPmJFbmFibGU4MDIxeCA9IEZBTFNFOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiRGlzYWJsZSA4MDIuMXhcbiIpOworICAgICAgICB9CisKKyAgICAgICAgYnJlYWs7CisKKworICAgIGNhc2UgV0xBTl9DTURfU0VUX0hPU1RfV0VQOgorCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIldMQU5fQ01EX1NFVF9IT1NUX1dFUFxuIik7CisgICAgICAgIGlmIChjb3B5X2Zyb21fdXNlcigmc1ZhbHVlLCBwUmVxLT5kYXRhLCBzaXplb2YoU0NtZFZhbHVlKSkpIHsKKwkJCXJlc3VsdCA9IC1FRkFVTFQ7CisJCQlicmVhazsKKwkJfTsKKworCQlpZiAoc1ZhbHVlLmR3VmFsdWUgPT0gMSkgeworICAgICAgICAgICAgcERldmljZS0+YkVuYWJsZUhvc3RXRVAgPSBUUlVFOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiRW5hYmxlIEhvc3RXRVBcbiIpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgcERldmljZS0+YkVuYWJsZUhvc3RXRVAgPSBGQUxTRTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkRpc2FibGUgSG9zdFdFUFxuIik7CisgICAgICAgIH0KKworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfU0VUX1dQQToKKyAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIldMQU5fQ01EX1NFVF9XUEFcbiIpOworCisgICAgICAgIGlmIChjb3B5X2Zyb21fdXNlcigmc1ZhbHVlLCBwUmVxLT5kYXRhLCBzaXplb2YoU0NtZFZhbHVlKSkpIHsKKwkJCXJlc3VsdCA9IC1FRkFVTFQ7CisJCQlicmVhazsKKwkJfTsKKwkJaWYgKHNWYWx1ZS5kd1ZhbHVlID09IDEpIHsKKyAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInVwIHdwYWRldlxuIik7CisJCSAgIG1lbWNweShwRGV2aWNlLT53cGFkZXYtPmRldl9hZGRyLCBwRGV2aWNlLT5kZXYtPmRldl9hZGRyLCBVX0VUSEVSX0FERFJfTEVOKTsKKwkJICAgcERldmljZS0+YldQQURFVlVwID0gVFJVRTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImNsb3NlIHdwYWRldlxuIik7CisJICAgcERldmljZS0+YldQQURFVlVwID0gRkFMU0U7CisgICAgICAgIH0KKworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfQVBfU1RBUlQ6CisKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiV0xBTl9DTURfQVBfU1RBUlRcbiIpOworICAgICAgICBpZiAocERldmljZS0+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hdGUgJiBCSVQxKSB7CisgICAgICAgICAgICAgcE1nbXQtPmFieUlCU1NTdXBwUmF0ZXNbMl0gfD0gQklUNzsKKyAgICAgICAgfWVsc2UgeworICAgICAgICAgICAgLy9kZWZhdWx0IDEsMk0KKyAgICAgICAgICAgICBwTWdtdC0+YWJ5SUJTU1N1cHBSYXRlc1syXSB8PSBCSVQ3OworICAgICAgICAgICAgIHBNZ210LT5hYnlJQlNTU3VwcFJhdGVzWzNdIHw9IEJJVDc7CisgICAgICAgIH0KKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJTdXBwb3J0IFJhdGU9ICV4ICV4ICV4ICV4XG4iLAorICAgICAgICAgICAgICAgIHBNZ210LT5hYnlJQlNTU3VwcFJhdGVzWzJdLAorICAgICAgICAgICAgICAgIHBNZ210LT5hYnlJQlNTU3VwcFJhdGVzWzNdLAorICAgICAgICAgICAgICAgIHBNZ210LT5hYnlJQlNTU3VwcFJhdGVzWzRdLAorICAgICAgICAgICAgICAgIHBNZ210LT5hYnlJQlNTU3VwcFJhdGVzWzVdCisgICAgICAgICAgICAgICAgKTsKKworICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICBiU2NoZWR1bGVDb21tYW5kKChIQU5ETEUpcERldmljZSwgV0xBTl9DTURfUlVOX0FQLCBOVUxMKTsKKyAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIFdMQU5fQ01EX0dFVF9OT0RFX0NOVDoKKworCQljYkxpc3RDb3VudCA9IDA7CisJCXBOb2RlID0gJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdKTsKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgKE1BWF9OT0RFX05VTSArIDEpOyBpaSsrKSB7CisgICAgICAgICAgICBwTm9kZSA9ICYocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0pOworICAgICAgICAgICAgaWYgKCFwTm9kZS0+YkFjdGl2ZSkKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIGNiTGlzdENvdW50Kys7CisgICAgICAgIH07CisKKyAgICAgICAgc05vZGVMaXN0LnVJdGVtID0gY2JMaXN0Q291bnQ7CisgICAgICAgIGlmIChjb3B5X3RvX3VzZXIocFJlcS0+ZGF0YSwgJnNOb2RlTGlzdCwgc2l6ZW9mKFNOb2RlTGlzdCkpKSB7CisJCQlyZXN1bHQgPSAtRUZBVUxUOworCQkJYnJlYWs7CisJCX07CisgICAgICAgIHBSZXEtPndSZXN1bHQgPSAwOworICAgICAgICBicmVhazsKKworICAgIGNhc2UgV0xBTl9DTURfR0VUX05PREVfTElTVDoKKworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoJnNOb2RlTGlzdCwgcFJlcS0+ZGF0YSwgc2l6ZW9mKFNOb2RlTGlzdCkpKSB7CisJCQlyZXN1bHQgPSAtRUZBVUxUOworCQkJYnJlYWs7CisJCX07CisgICAgICAgIHBOb2RlTGlzdCA9IChQU05vZGVMaXN0KWttYWxsb2Moc2l6ZW9mKFNOb2RlTGlzdCkgKyAoc05vZGVMaXN0LnVJdGVtICogc2l6ZW9mKFNOb2RlSXRlbSkpLCAoaW50KUdGUF9BVE9NSUMpOworICAgICAgICBpZiAocE5vZGVMaXN0ID09IE5VTEwpIHsKKyAgICAgICAgICAgIHJlc3VsdCA9IC1FTk9NRU07CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCQlwTm9kZUxpc3QtPnVJdGVtID0gc05vZGVMaXN0LnVJdGVtOworCQlwTm9kZSA9ICYocE1nbXQtPnNOb2RlREJUYWJsZVswXSk7CisgICAgICAgIGZvciAoaWkgPSAwLCBqaiA9IDA7IGlpIDwgKE1BWF9OT0RFX05VTSArIDEpOyBp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9LRVlNQVhMRU4pOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gImtleT0gJTIuMlg6JTIuMlg6JTIuMlg6JTIuMlg6JTIuMlhcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE5vZGVMaXN0LT5zTm9kZUxpc3RbampdLmFieVdlcEtleVswXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTm9kZUxpc3QtPnNOb2RlTGlzdFtqal0uYWJ5V2VwS2V5WzFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBOb2RlTGlzdC0+c05vZGVMaXN0W2pqXS5hYnlXZXBLZXlbMl0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE5vZGVMaXN0LT5zTm9kZUxpc3RbampdLmFieVdlcEtleVszXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTm9kZUxpc3QtPnNOb2RlTGlzdFtqal0uYWJ5V2VwS2V5WzRdCisgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIAkJICAgIHBOb2RlTGlzdC0+c05vZGVMaXN0W2pqXS5iSXNJbkZhbGxiYWNrID0gcE5vZGUtPmJJc0luRmFsbGJhY2s7CisgICAgCQkgICAgcE5vZGVMaXN0LT5zTm9kZUxpc3RbampdLnVUeEZhaWx1cmVzID0gcE5vZGUtPnVUeEZhaWx1cmVzOworICAgIAkJICAgIHBOb2RlTGlzdC0+c05vZGVMaXN0W2pqXS51VHhBdHRlbXB0cyA9IHBOb2RlLT51VHhBdHRlbXB0czsKKyAgICAJCSAgICBwTm9kZUxpc3QtPnNOb2RlTGlzdFtqal0ud0ZhaWx1cmVSYXRpbyA9IChXT1JEKXBOb2RlLT51RmFpbHVyZVJhdGlvOworICAgIAkJICAgIGpqICsrOworICAgIAkJICAgIGlmIChqaiA+PSBwTm9kZUxpc3QtPnVJdGVtKQorICAgIAkJICAgICAgICBicmVhazsKKyAgICAJCX0KKwk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CisKKyAgICByZXR1cm4gcmVzdWx0OworfQorCisvKgorVk9JRAordkNvbmZpZ1dFUEtleSAoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBEV09SRCAgICBkd0tleUluZGV4LAorICAgIElOIFBCWVRFICAgIHBieUtleSwKKyAgICBJTiBVTE9ORyAgICB1S2V5TGVuZ3RoCisgICAgKQoreworICAgIGludCBpaTsKKworCisgICAgWkVST19NRU1PUlkoJnBEZXZpY2UtPmFieVdlcEtleVtkd0tleUluZGV4XVswXSwgV0xBTl9XRVBNQVhfS0VZTEVOKTsKKyAgICBNRU12Q29weSgmcERldmljZS0+YWJ5V2VwS2V5W2R3S2V5SW5kZXhdWzBdLCBwYnlLZXksIHVLZXlMZW5ndGgpOworCisgICAgcERldmljZS0+YldlcEtleUF2YWlsYWJsZVtkd0tleUluZGV4XSA9IFRSVUU7CisgICAgcERldmljZS0+YXVXZXBLZXlMZW5ndGhbZHdLZXlJbmRleF0gPSB1S2V5TGVuZ3RoOworCisgICAgTUFDdlNldERlZmF1bHRLZXlFbnRyeShwRGV2aWNlLT5Qb3J0T2Zmc2V0LCB1S2V5TGVuZ3RoLCBkd0tleUluZGV4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBEV09SRCkgJihwRGV2aWNlLT5hYnlXZXBLZXlbZHdLZXlJbmRleF1bMF0pLCBwRGV2aWNlLT5ieUxvY2FsSUQpOworCisgICAgaWYgKHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzIDwgTmRpczgwMl8xMUVuY3J5cHRpb25Ob3RTdXBwb3J0ZWQpIHsKKyAgICAgICAgZm9yKGlpPTA7IGlpPE1BWF9HUk9VUF9LRVk7IGlpKyspIHsKKyAgICAgICAgICAgIGlmICgocERldmljZS0+YldlcEtleUF2YWlsYWJsZVtpaV0gPT0gVFJVRSkgJiYKKyAgICAgICAgICAgICAgICAocERldmljZS0+YXVXZXBLZXlMZW5ndGhbaWldID09IFdMQU5fV0VQMjMy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V9zdHJlYW1fYWRkX2V2ZW50KGluZm8sY3VycmVudF9ldiwgZW5kX2J1ZiwgJml3ZSwgSVdfRVZfUVVBTF9MRU4pOworCisgICAgICAgICAgICBtZW1zZXQoJml3ZSwgMCwgc2l6ZW9mKGl3ZSkpOworICAgICAgICAgICAgaXdlLmNtZCA9IFNJT0NHSVdFTkNPREU7CisgICAgICAgICAgICBpd2UudS5kYXRhLmxlbmd0aCA9IDA7CisgICAgICAgICAgICBpZiAoV0xBTl9HRVRfQ0FQX0lORk9fUFJJVkFDWShwQlNTLT53Q2FwSW5mbykpIHsKKyAgICAgICAgICAgICAgICBpd2UudS5kYXRhLmZsYWdzID1JV19FTkNPREVfRU5BQkxFRCB8IElXX0VOQ09ERV9OT0tFWTsKKyAgICAgICAgICAgIH1lbHNlIHsKKyAgICAgICAgICAgICAgICBpd2UudS5kYXRhLmZsYWdzID0gSVdfRU5DT0RFX0RJU0FCTEVEOworICAgICAgICAgICAgfQorICAgICAgICAgICAgY3VycmVudF9ldiA9IGl3ZV9zdHJlYW1fYWRkX3BvaW50KGluZm8sY3VycmVudF9ldixlbmRfYnVmLCAmaXdlLCBwSXRlbVNTSUQtPmFieVNTSUQpOworCisgICAgICAgICAgICBtZW1zZXQoJml3ZSwgMCwgc2l6ZW9mKGl3ZSkpOworICAgICAgICAgICAgaXdlLmNtZCA9IFNJT0NHSVdSQVRFOworICAgICAgICAgICAJaXdlLnUuYml0cmF0ZS5maXhlZCA9IGl3ZS51LmJpdHJhdGUuZGlzYWJsZWQgPSAwOworICAgICAgCQljdXJyZW50X3ZhbCA9IGN1cnJlbnRfZXYgKyBJV19FVl9MQ1BfTEVOOworCisgICAgICAgCQlmb3IgKGtrID0gMCA7IGtrIDwgMTIgOyBraysrKSB7CisJCSAgICAgICAgaWYgKHBTdXBwUmF0ZXMtPmFieVJhdGVzW2trXSA9PSAwKQorCQkJICAgICAgICBicmVhazsKKwkJICAgICAgICAvLyBCaXQgcmF0ZSBnaXZlbiBpbiA1M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CBwQlNTLT53QmVhY29uSW50ZXJ2YWwpOworICAgICAgICAgICAgaXdlLnUuZGF0YS5sZW5ndGggPSBzdHJsZW4oYnVmKTsKKyAgICAgICAgICAgIGN1cnJlbnRfZXYgPSBpd2Vfc3RyZWFtX2FkZF9wb2ludChpbmZvLGN1cnJlbnRfZXYsIGVuZF9idWYsICZpd2UsIGJ1Zik7CisKKyNpZiBXSVJFTEVTU19FWFQgPiAxNworICAgICAgICAgICAgaWYgKChwQlNTLT53V1BBTGVuID4gMCkgJiYgKHBCU1MtPndXUEFMZW4gPD0gTUFYX1dQQV9JRV9MRU4pKSB7CisgICAgICAgICAgICAgICAgbWVtc2V0KCZpd2UsIDAsIHNpemVvZihpd2UpKTsKKyAgICAgICAgICAgICAgICBpd2UuY21kID0gSVdFVkdFTklFOworICAgICAgICAgICAgICAgIGl3ZS51LmRhdGEubGVuZ3RoID0gcEJTUy0+d1dQQUxlbjsKKyAgICAgICAgICAgICAgICBjdXJyZW50X2V2ID0gaXdlX3N0cmVhbV9hZGRfcG9pbnQoaW5mbyxjdXJyZW50X2V2LCBlbmRfYnVmLCAmaXdlLCBwQlNTLT5ieVdQQUlFKTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKChwQlNTLT53UlNOTGVuID4gMCkgJiYgKHBCU1MtPndSU05MZW4gPD0gTUFYX1dQQV9JRV9MRU4pKSB7CisgICAgICAgICAgICAgICAgbWVtc2V0KCZpd2UsIDAsIHNpemVvZihpd2UpKTsKKyAgICAgICAgICAgICAgICBpd2UuY21kID0gSVdFVkdFTklFOworICAgICAgICAgICAgICAgIGl3ZS51LmRhdGEubGVuZ3RoID0gcEJTUy0+d1JTTkxlbjsKKyAgICAgICAgICAgICAgICBjdXJyZW50X2V2ID0gaXdlX3N0cmVhbV9hZGRfcG9pbnQoaW5mbyxjdXJyZW50X2V2LCBlbmRfYnVmLCAmaXdlLCBwQlNTLT5ieVJTTklFKTsKKyAgICAgICAgICAgIH0KKworI2Vsc2UgLy8gV0lSRUxFU1NfRVhUID4gMTcKKyAgICAgICAgICAgIGlmICgocEJTUy0+d1dQQUxlbiA+IDApICYmIChwQlNTLT53V1BBTGVuIDw9IE1BWF9XUEFfSUVfTEVOKSkgeworICAgICAgICAgICAgICAgIHU4ICpwID0gYnVmOworICAgICAgICAgICAgICAgIG1lbXNldCgmaXdlLCAwLCBzaXplb2YoaXdlKSk7CisgICAgICAgICAgICAgICAgaXdlLmNtZCA9IElXRVZDVVNUT007CisJCSAgICAgICAgcCArPSBzcHJpbnRmKHAsICJ3cGFfaWU9Iik7CisJCSAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgcEJTUy0+d1dQQUxlbjsgaWkrKykgeworCQkJICAgICAgICBwICs9IHNwcmludGYocCwgIiUwMngiLCBwQlNTLT5ieVdQQUlFW2lpXSk7CisJCSAgICAgICAgfQorCQkgICAgICAgIGl3ZS51LmRhdGEubGVuZ3RoID0gc3RybGVuKGJ1Zik7CisgICAgICAgICAgICAgICAgY3VycmVudF9ldiA9IGl3ZV9zdHJlYW1fYWRkX3BvaW50KGluZm8sY3VycmVudF9ldiwgZW5kX2J1ZiwgJml3ZSwgYnVmKTsKKwkJICAgIH0KKworCisgICAgICAgICAgICBpZiAoKHBCU1MtPndSU05MZW4gPiAwKSAmJiAocEJTUy0+d1JTTkxlbiA8PSBNQVhfV1BBX0lFX0xFTikpIHsKKyAgICAgICAgICAgICAgICB1OCAqcCA9IGJ1ZjsKKyAgICAgICAgICAgICAgICBtZW1zZXQoJml3ZSwgMCwgc2l6ZW9mKGl3ZSkpOworICAgICAgICAgICAgICAgIGl3ZS5jbWQgPSBJV0VWQ1VTVE9NOworCQkgICAgICAgIHAgKz0gc3ByaW50ZihwLCAicnNuX2llPSIpOworCQkgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHBCU1MtPndSU05MZW47IGlpKyspIHsKKwkJCSAgICAgICAgcCArPSBzcHJpbnRmKHAsICIlMDJ4IiwgcEJTUy0+YnlSU05JRV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ICAgICAgIHN0cnVjdCBpd19mcmVxICp3cnEsCisgICAgICAgICAgICAgY2hhciAqZXh0cmEpCit7CisJUFNEZXZpY2UJICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKW5ldGRldl9wcml2KGRldik7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworCisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiIFNJT0NHSVdGUkVRIFxuIik7CisKKyNpZmRlZiBXRVhUX1VTRUNIQU5ORUxTCisJd3JxLT5tID0gKGludClwTWdtdC0+dUN1cnJDaGFubmVsOworCXdycS0+ZSA9IDA7CisjZWxzZQorCXsKKwkJaW50IGYgPSAoaW50KXBNZ210LT51Q3VyckNoYW5uZWwgLSAxOworCQlpZihmIDwgMCkKKwkJICAgZiA9IDA7CisJCXdycS0+bSA9IGZyZXF1ZW5jeV9saXN0W2ZdICogMTAwMDAwOworCQl3cnEtPmUgPSAxOworCX0KKyNlbmRpZgorCisJcmV0dXJuIDA7Cit9CisKKy8qCisgKiBXaXJlbGVzcyBIYW5kbGVyIDogc2V0IG9wZXJhdGlvbiBtb2RlCisgKi8KKworaW50IGl3Y3RsX3Npd21vZGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgIF9fdTMyICp3bW9kZSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSkKK3sKKwlQU0RldmljZQkgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpbmV0ZGV2X3ByaXYoZGV2KTsKKyAgICBQU01nbXRPYmplY3QgICAgICAgIHBNZ210ID0gJihwRGV2aWNlLT5zTWdtdE9iaik7CisgICAgaW50IHJjID0gMDsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBTSU9DU0lXTU9ERSBcbiIpOworCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCAmJiBwRGV2aWNlLT5iRW5hYmxlSG9zdGFwZCkgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkNhbid0IHNldCBvcGVyYXRpb24gbW9kZSwgaG9zdGFwZCBpcyBydW5uaW5nIFxuIik7CisgICAgICAgIHJldHVybiByYzsKKyAgICB9CisKKwlzd2l0Y2goKndtb2RlKSB7CisKKwljYXNlIElXX01PREVfQURIT0M6CisJICAgIGlmIChwTWdtdC0+ZUNvbmZpZ01vZGUgIT0gV01BQ19DT05GSUdfSUJTU19TVEEpIHsKKyAgICAgICAgICAgIHBNZ210LT5lQ29uZmlnTW9kZSA9IFdNQUNfQ09ORklHX0lCU1NfU1RBOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmZsYWdzICYgREVWSUNFX0ZMQUdTX09QRU5FRCkgeworCQkgICAgICAgIHBEZXZpY2UtPmJDb21taXQgPSBUUlVFOworICAgCQkgICAgfQorCQl9CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInNldCBtb2RlIHRvIGFkLWhvYyBcbiIpOworCQlicmVhazsKKwljYXNlIElXX01PREVfQVVUTzoKKwljYXNlIElXX01PREVfSU5GUkE6CisJICAgIGlmIChwTWdtdC0+ZUNvbmZpZ01vZGUgIT0gV01BQ19DT05GSUdfRVNTX1NUQSkgeworICAgICAgICAgICAgcE1nbXQtPmVDb25maWdNb2RlID0gV01BQ19DT05GSUdfRVNTX1NUQTsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5mbGFncyAmIERFVklDRV9GTEFHU19PUEVORUQpIHsKKwkJICAgICAgICBwRGV2aWNlLT5iQ29tbWl0ID0gVFJVRTsKKyAgIAkJICAgIH0KKwkJfQorICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJzZXQgbW9kZSB0byBpbmZyYXN0cnVjdHVyZSBcbiIpOworCQlicmVhazsKKwljYXNlIElXX01PREVfTUFTVEVSOgorCisgICAgICAgIHBNZ210LT5lQ29uZmlnTW9kZSA9IFdNQUNfQ09ORklHX0VTU19TVEE7CisJCXJjID0gLUVPUE5PVFNVUFA7CisJCWJyZWFrOworCisJICAgIGlmIChwTWdtdC0+ZUNvbmZpZ01vZGUgIT0gV01BQ19DT05GSUdfQVApIHsKKyAgICAgICAgICAgIHBNZ210LT5lQ29uZmlnTW9kZSA9IFdNQUNfQ09ORklHX0FQOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmZsYWdzICYgREVWSUNFX0ZMQUdTX09QRU5FRCkgeworCQkgICAgICAgIHBEZXZpY2UtPmJDb21taXQgPSBUUlVFOworICAgCQkgICAgfQorCQl9CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInNldCBtb2RlIHRvIEFjY2VzcyBQb2ludCBcbiIpOworCQlicmVhazsKKworCWNhc2UgSVdfTU9ERV9SRVBFQVQ6CisgICAgICAgIHBNZ210LT5lQ29uZmlnTW9kZSA9IFdNQUNfQ09ORklHX0VTU19TVEE7CisJCXJjID0gLUVPUE5PVFNVUFA7CisJCWJyZWFrOworCWRlZmF1bHQ6CisJCXJjID0gLUVJTlZBTDsKKwl9CisKKwlyZXR1cm4gcmM7Cit9CisKKy8qCisgKiBXaXJlbGVzcyBIYW5kbGVyIDogZ2V0IG9wZXJhdGlvbiBtb2RlCisgKi8KKworaW50IGl3Y3RsX2dpd21vZGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgIF9fdTMyICp3bW9kZSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSkKK3sKKwlQU0RldmljZQkgIC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6IHNldCBhcCBtYWMgYWRkcmVzcworICovCisKK2ludCBpd2N0bF9zaXdhcChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisJCQkgc3RydWN0IHNvY2thZGRyICp3cnEsCisgICAgICAgICAgICAgY2hhciAqZXh0cmEpCit7CisJUFNEZXZpY2UJICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKW5ldGRldl9wcml2KGRldik7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworICAgIGludCByYyA9IDA7CisgICAgICAgIEJZVEUgICAgICAgICAgICAgICAgIFplcm9CU1NJRFtXTEFOX0JTU0lEX0xFTl09ezB4MDAsMHgwMCwweDAwLDB4MDAsMHgwMCwweDAwfTsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBTSU9DU0lXQVAgXG4iKTsKK2lmIChwTWdtdC0+ZVNjYW5TdGF0ZSA9PSAgV01BQ19JU19TQ0FOTklORykgeworICAgICAgICAvLyBJbiBzY2FubmluZy4uCisgICAgIHByaW50aygiU0lPQ1NJV0FQKD8/KS0tPkluIHNjYW5uaW5nLi4uXG4iKTsKKyAgIC8vICByZXR1cm4gLUVBR0FJTjsKKyAgfQorCWlmICh3cnEtPnNhX2ZhbWlseSAhPSBBUlBIUkRfRVRIRVIpCisJCXJjID0gLUVJTlZBTDsKKwllbHNlIHsKKwkJbWVtc2V0KHBNZ210LT5hYnlEZXNpcmVCU1NJRCwgMHhGRiwgNik7CisJCW1lbWNweShwTWdtdC0+YWJ5RGVzaXJlQlNTSUQsIHdycS0+c2FfZGF0YSwgNik7CisJCSAgICAgICAgICAgICAgICAvLzIwMDgtMDQwOS0wNSwgPEFkZD4gYnkgRWluc24gTGl1CisJCWlmKChwRGV2aWNlLT5iTGlua1Bhc3MgPT0gVFJVRSkgJiYKKyAgICAgICAgICAgICAgICAgICAgIChtZW1jbXAocE1nbXQtPmFieURlc2lyZUJTU0lELCBwTWdtdC0+YWJ5Q3VyckJTU0lELCA2KT09IDApKXsKKwkJCXJldHVybiByYzsKKwkJCX0KKwkvL21pa2UgOmFkZAorCSBpZiAoKElTX0JST0FEQ0FTVF9BRERSRVNTKHBNZ210LT5hYnlEZXNpcmVCU1NJRCkpIHx8CisJICAgICAobWVtY21wKHBNZ210LT5hYnlEZXNpcmVCU1NJRCwgWmVyb0JTU0lELCA2KSA9PSAwKSl7CisJICAgICAgcHJpbnRrKCJTSU9DU0lXQVA6aW52YWxpZCBkZXNpcmVkIEJTU0lEIHJldHVybiFcbiIpOworICAgICAgICAgICAgICAgcmV0dXJuIHJjOworICAgICAgICAgfQorICAgICAgIC8vbWlrZSBhZGQ6IGlmIGRlc2lyZWQgQVAgaXMgaGlkZGVuIHNzaWQodGhlcmUgYXJlIHR3byBzYW1lIEJTU0lEIGluIGxpc3QpLAorICAgICAgIC8vICAgICAgICAgICAgICAgICAgdGhlbiBpZ25vcmUsYmVjYXVzZSB5b3UgZG9uJ3Qga25vd24gd2hpY2ggb25lIHRvIGJlIGNvbm5lY3Qgd2l0aD8/CisgICAgICAgCXsKKyAgICAgICAgICAgVUlOVCAgICAgICAgICAgIGlpICwgdVNhbWVCc3NpZE51bT0wOworICAgICAgICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX0JTU19OVU07IGlpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+c0JTU0xpc3RbaWldLmJBY3RpdmUgJiYKKyAgICAgICAgICAgICAgICAgICAgICAgIElTX0VUSF9BRERSRVNTX0VRVUFMKHBNZ210LT5zQlNTTGlzdFtpaV0uYWJ5QlNTSUQscE1nbXQtPmFieURlc2lyZUJTU0lEKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgdVNhbWVCc3NpZE51bSsrOworICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorCSAgICAgaWYodVNhbWVCc3NpZE51bSA+PSAyKSB7ICAvL2hpdDogZGVzaXJlZCBBUCBpcyBpbiBoaWRkZW4gc3NpZCBtb2RlISEhCisgICAgICAgICAgICAgICAgIHByaW50aygiU0lPQ1NJV0FQOmlnbm9yZSBmb3IgZGVzaXJlZCBBUCBpbiBoaWRkZW4gbW9kZVxuIik7CisJICAgICAgICByZXR1cm4gcmM7CisJICAgICB9CisgICAgICAgCX0KKyAgICAgICAgaWYgKHBEZXZpY2UtPmZsYWdzICYgREVWSUNFX0ZMQUdTX09QRU5FRCkgeworCQkgICAgcERldmljZS0+YkNvbW1pdCA9IFRSVUU7CisgICAJCX0KKwl9CisJcmV0dXJuIHJjOworfQorCisvKgorICogV2lyZWxlc3MgSGFuZGxlciA6IGdldCBhcCBtYWMgYWRkcmVzcworICovCisKK2ludCBpd2N0bF9naXdhcChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisJCQkgc3RydWN0IHNvY2thZGRyICp3cnEsCisgICAgICAgICAgICAgY2hhciAqZXh0cmEpCit7CisJUFNEZXZpY2UJICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKW5ldGRldl9wcml2KGRldik7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworCisKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ0dJV0FQIFxuIik7CisKKyAgICBtZW1jcHkod3JxLT5zYV9kYXRhLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCA2KTsKKyAgIC8vMjAwOC0wNDEwLDxNb2RpZnk+IGJ5IEVpbnNuIExpdQorICAgIGlmICgocERldmljZS0+YkxpbmtQYXNzID09IEZBTFNFKSAmJiAocE1nbXQtPmVDdXJyTW9kZSAhPSBXTUFDX01PREVfRVNTX0FQKSkKKyAgICAgICAgbWVtc2V0KHdycS0+c2FfZGF0YSwgMCwgNik7CisKKyAgICBpZiAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSB7CisgICAgICAgIG1lbWNweSh3cnEtPnNhX2RhdGEsIHBNZ210LT5hYnlDdXJyQlNTSUQsIDYpOworICAgIH0KKworCXdycS0+c2FfZmFtaWx5ID0gQVJQSFJEX0VUSEVSOworCisJcmV0dXJuIDA7CisKK30KKworCisvKgorICogV2lyZWxlc3MgSGFuZGxlciA6IGdldCBhcCBsaXN0CisgKi8KKworaW50IGl3Y3RsX2dpd2FwbGlzdChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgc3RydWN0IGl3X3BvaW50ICp3cnEsCisgICAgICAgICAgICAgY2hhciAqZXh0cmEpCit7CisJaW50IGlpLGpqLCByYyA9IDA7CisJc3RydWN0IHNvY2thZGRyIHNvY2tbSVdfTUFYX0FQXTsKKwlzdHJ1Y3QgaXdfcXVhbGl0eSBxdWFsW0lXX01BWF9BUF07CisJUFNEZXZpY2UJICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKW5ldGRldl9wcml2KGRldik7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworCisKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ0dJV0FQTElTVCBcbiIpOworCS8vIE9ubHkgc3VwZXItdXNlciBjYW4gc2VlIEFQIGxpc3QKKworCWlmICghY2FwYWJsZShDQVBfTkVUX0FETUlOKSkgeworCQlyYyA9IC1FUEVSTTsKKwkJcmV0dXJuIHJjOworCX0KKworCWlmICh3cnEtPnBvaW50ZXIpIHsKKworCQlQS25vd25CU1MgcEJTUyA9IC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yclNTSUQpLT5sZW47CisgICBpZigocERldmljZS0+YkxpbmtQYXNzID09IFRSVUUpICYmCisgIAkobWVtY21wKHBJdGVtU1NJRC0+YWJ5U1NJRCwoKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lEKS0+YWJ5U1NJRCxsZW4pPT0wKSkKKyAgICAgICAgIHJldHVybiAwOworCisgICAgICAgIC8vbWlrZTpuZWVkIGNsZWFyIGRlc2lyZWRCU1NJRAorICAgICBpZihwSXRlbVNTSUQtPmxlbj09MCkgeworICAgICAgICBtZW1zZXQocE1nbXQtPmFieURlc2lyZUJTU0lELCAweEZGLDYpOworICAgICAgICByZXR1cm4gMDsKKyAgICAgfQorCisjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorIC8vV2V4dCB3aWwgb3JkZXIgYW5vdGhlciBjb21tYW5kIG9mIHNpd2FwIHRvIGxpbmsgd2l0aCBkZXNpcmVkIEFQLAorIC8vc28gaGVyZSBuZWVkIG5vdCBhc3NvY2lhdGU/PworICBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09IFRSVUUpICB7CisgICAgICAgIC8qKioqKioqc2VhcmNoIGlmICBpbiBoaWRkZW4gc3NpZCBtb2RlICoqKiovCisgICAgICAgIHsKKyAgICAgICAgICAgUEtub3duQlNTICAgICAgIHBDdXJyID0gTlVMTDsKKyAgICAgICAgICAgQllURSAgICAgICAgICAgICAgICAgICBhYnlUbXBEZXNpcmVTU0lEW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDFdOworCSAgVUlOVCAgICAgICAgICAgIGlpICwgdVNhbWVCc3NpZE51bT0wOworCisJICBtZW1zZXQoYWJ5VG1wRGVzaXJlU1NJRCwwLHNpemVvZihhYnlUbXBEZXNpcmVTU0lEKSk7CisJICBtZW1jcHkoYWJ5VG1wRGVzaXJlU1NJRCxwTWdtdC0+YWJ5RGVzaXJlU1NJRCxzaXplb2YoYWJ5VG1wRGVzaXJlU1NJRCkpOworICAgICAgICAgICAgcEN1cnIgPSBCU1NwU2VhcmNoQlNTTGlzdChwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYnlUbXBEZXNpcmVTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+ZUNvbmZpZ1BIWU1vZGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgICAgICAgICAgaWYgKHBDdXJyID09IE5VTEwpeworICAgICAgICAgICAgICAgcHJpbnRrKCJTSU9DU0lXRVNTSUQ6aGlkZGVuIHNzaWQgc2l0ZSBzdXJ2ZXkgYmVmb3JlIGFzc29jaWF0ZS4uLi4uLi5cbiIpOworCSAgICAgIHZSZXNldENvbW1hbmRUaW1lcigoSEFORExFKSBwRGV2aWNlKTsKKwkgICAgICBwTWdtdC0+ZVNjYW5UeXBlID0gV01BQ19TQ0FOX0FDVElWRTsKKyAgICAgICAgICAgICAgIGJTY2hlZHVsZUNvbW1hbmQoKEhBTkRMRSkgcERldmljZSwgV0xBTl9DTURfQlNTSURfU0NBTiwgcE1nbXQtPmFieURlc2lyZVNTSUQpOworCSAgICAgIGJTY2hlZHVsZUNvbW1hbmQoKEhBTkRMRSkgcERldmljZSwgV0xBTl9DTURfU1NJRCwgcE1nbXQtPmFieURlc2lyZVNTSUQpOworICAgICAgICAgIH0KKwkgZWxzZSB7ICAvL21pa2U6dG8gZmluZCBvdXQgaWYgdGhhdCBkZXNpcmVkIFNTSUQgaXMgYSBoaWRkZW4tc3NpZCBBUCAsCisgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIGJ5IG1lYW5zIG9mIGp1ZGdpbmcgaWYgdGhlcmUgYXJlIHR3byBzYW1lIEJTU0lEIGV4aXN0IGluIGxpc3QgPworICAg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BGQUxTRTsKKyAgICAgICAgcERldmljZS0+dUNvbm5lY3Rpb25SYXRlID0gMTM7CisJcHJpbnRrKCJhdXRvIHJhdGU6Y29ubmVjdGlvbl9yYXRlIGlzIDEzXG4iKTsKK30KKworCXJldHVybiByYzsKK30KKworLyoKKyAqIFdpcmVsZXNzIEhhbmRsZXIgOiBnZXQgZGF0YSByYXRlCisgKi8KKworaW50IGl3Y3RsX2dpd3JhdGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworCVBTRGV2aWNlCSAgICAgICAgcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworLy8yMDA3LTAxMTgtMDUsPE1hcms+IGJ5IEVpbnNuTGl1CisvL01hcmsgdGhlIHVubmVjZXNzYXJ5IHNlbnRlbmNlcy4KKy8vICAgIFBTTWdtdE9iamVjdCAgICAgICAgcE1nbXQgPSAmKHBEZXZpY2UtPnNNZ210T2JqKTsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBTSU9DR0lXUkFURSBcbiIpOworICAgIHsKKyAgICAgICAgQllURSBhYnlTdXBwb3J0ZWRSYXRlc1sxM109IHsweDAyLCAweDA0LCAweDBCLCAweDE2LCAweDBjLCAweDEyLCAweDE4LCAweDI0LCAweDMwLCAweDQ4LCAweDYwLCAweDZDLCAweDkwfTsKKwkgICAgaW50IGJyYXRlID0gMDsKKy8vMjAwOC01LTggPG1vZGlmeT4gYnkgY2hlc3RlcgoraWYocERldmljZS0+YkxpbmtQYXNzKXsKK2lmKHBEZXZpY2UtPmJGaXhSYXRlID09IFRSVUUpeworCQlpZiAocERldmljZS0+dUNvbm5lY3Rpb25SYXRlIDwgMTMpIHsKKwkgICAgICAgIGJyYXRlID0gYWJ5U3VwcG9ydGVkUmF0ZXNbcERldmljZS0+dUNvbm5lY3Rpb25SYXRlXTsKKwkgICAgfWVsc2UgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJ5QkJUeXBlID09IEJCX1RZUEVfMTFCKQorCSAgICAgICAgICAgIGJyYXRlID0gMHgxNjsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieUJCVHlwZSA9PSBCQl9UWVBFXzExRykKKwkgICAgICAgICAgICBicmF0ZSA9IDB4NkM7CisgICAgICAgICAgICBpZiAocERldmljZS0+YnlCQlR5cGUgPT0gQkJfVFlQRV8xMUEpCisJICAgICAgICAgICAgYnJhdGUgPSAweDZDOworCSAgICB9Cit9CitlbHNlCit7CisKKyBicmF0ZSA9IGFieVN1cHBvcnRlZFJhdGVzW1R4UmF0ZV9pd2NvbmZpZ107Cit9Cit9CitlbHNlIGJyYXRlID0wOworLy8yMDA3LTAxMTgtMDUsPE1hcms+IGJ5IEVpbnNuTGl1CisvL01hcmsgdGhlIHVubmVjZXNzYXJ5IHNlbnRlbmNlcy4KKy8qCisJICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfQVApIHsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5ieUJCVHlwZSA9PSBCQl9UWVBFXzExQikKKwkgICAgICAgICAgICBicmF0ZSA9IDB4MTY7CisgICAgICAgICAgICBpZiAocERldmljZS0+YnlCQlR5cGUgPT0gQkJfVFlQRV8xMUcpCisJICAgICAgICAgICAgYnJhdGUgPSAweDZDOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJ5QkJUeXBlID09IEJCX1RZUEVfMTFBKQorCSAgICAgICAgICAgIGJyYXRlID0gMHg2QzsKKwkgICAgfQorKi8KKworLy8gICAgCQlpZiAocERldmljZS0+dUNvbm5lY3Rpb25SYXRlID09IDEzKQorLy8gICAgICAgICAgICAgICAgYnJhdGUgPSBhYnlTdXBwb3J0ZWRSYXRlc1twRGV2aWNlLT53Q3VycmVudFJhdGVdOworCSAgICB3cnEtPnZhbHVlID0gYnJhdGUgKiA1MDAwMDA7CisJICAgIC8vIElmIG1vcmUgdGhhbiBvbmUgcmF0ZSwgc2V0IGF1dG8KKwkgICAgaWYgKHBEZXZpY2UtPmJGaXhSYXRlID09IFRSVUUpCisJICAgICAgICB3cnEtPmZpeGVkID0gVFJVRTsKKyAgICB9CisKKworCXJldHVybiAwOworfQorCisKKworLyoKKyAqIFdpcmVsZXNzIEhhbmRsZXIgOiBzZXQgcnRzIHRocmVzaG9sZAorICovCisKK2ludCBpd2N0bF9zaXdydHMoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworCVBTRGV2aWNlCSAgICAgICAgcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworCWludCByYyA9IDA7CisKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ1NJV1JUUyBcbiIpOworCisJeworCSAgICBpbnQgcnRociA9IHdycS0+dmFsdWU7CisJICAgIGlmKHdycS0+ZGlzYWJsZWQpCisJCQlydGhyID0gMjMxMjsKKwkgICAgaWYoKHJ0aHIgPCAwKSB8fCAocnRociA+IDIzMTIpKSB7CisJCQlyYyA9IC1FSU5WQUw7CisgICAgCX1lbHNlIHsKKwkJICAgIHBEZXZpY2UtPndSVFNUaHJlc2hvbGQgPSBydGhyOworCSAgICB9CisgICAgfQorCisJcmV0dXJuIDA7Cit9CisKKy8qCisgKiBXaXJlbGVzcyBIYW5kbGVyIDogZ2V0IHJ0cworICovCisKK2ludCBpd2N0bF9naXdydHMoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworCVBTRGV2aWNlCSAgICAgICAgcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworCisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiIFNJT0NHSVdSVFMgXG4iKTsKKwl3cnEtPnZhbHVlID0gcERldmljZS0+d1JUU1RocmVzaG9sZDsKKwl3cnEtPmRpc2FibGVkID0gKHdycS0+dmFsdWUgPj0gMjMxMik7CisJd3JxLT5maXhlZCA9IDE7CisKKwlyZXR1cm4gMDsKK30KKworLyoKKyAqIFdpcmVsZXNzIEhhbmRsZXIgOiBzZXQgZnJhZ21lbnQgdGhyZXNob2xkCisgKi8KKworaW50IGl3Y3RsX3Npd2ZyYWcoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworICAgIFBTRGV2aWNlCSAgICAgICAgcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworICAgIGludCByYyA9IDA7CisgICAgaW50IGZ0aHIgPSB3cnEtPnZhbHVlOworCisKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgU0lPQ1NJV0ZSQUcgXG4iKTsKKworCisgICAgaWYgKHdycS0+ZGlzYWJsZWQpCisJCWZ0aHIgPSAyMzEyOworICAgIGlmKChmdGhyIDwgMjU2KSB8fCAoZnRociA+IDIzMTIpKSB7CisJCXJjID0gLUVJTlZBTDsKKyAgICB9ZWxzZSB7CisJCSBmdGhyICY9IH4weDE7CS8vIEdldCBhbiBldmVuIHZhbHVlCisJICAgICBwRGV2aWNlLT53RnJhZ21lbnRhdGlvblRocmVzaG9sZCA9ICh1MTYpZnRocjsKKyAgICB9CisKKwlyZXR1cm4gcmM7Cit9CisKKy8qCisgKiBXaXJlbGVzcyBIYW5kbGVyIDogZ2V0IGZyYWdtZW50IHRocmVzaG9sZAorICovCisKK2ludCBpd2N0bF9naXdmcmFnKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKwkJCSBzdHJ1Y3QgaXdfcGFyYW0gKndycSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSkKK3sKKyAgICBQU0RldmljZQkgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpbmV0ZGV2X3ByaXYoZGV2KTsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBTSU9DR0lXRlJBRyBcbiIpOworCXdycS0+dmFsdWUgPSBwRGV2aWNlLT53RnJhZ21lbnRhdGlvblRocmVzaG9sZDsKKwl3cnEtPmRpc2FibGVkID0gKHdycS0+dmFsdWUgPj0gMjMxMik7CisJd3JxLT5maXhlZCA9IDE7CisKKwlyZXR1cm4gMDsKK30KKworCisKKy8qCisgKiBXaXJlbGVzcyBIYW5kbGVyIDogc2V0IHJldHJ5IHRocmVzaG9sZAorICovCitpbnQgaXdjdGxfc2l3cmV0cnkoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworICAgIFBTRGV2aWNlCSAgICAgICAgcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworICAgIGludCByYyA9IDA7CisKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkV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ERUJVRywgS0VSTl9JTkZPICJTZXQgMTA0IGJpdCB3ZXAga2V5XG4iKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmICh3cnEtPmxlbmd0aCA9PSBXTEFOX1dFUDQwX0tFWUxFTikgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2V0IDQwIGJpdCB3ZXAga2V5LCBpbmRleD0gJWRcbiIsIChpbnQpZHdLZXlJbmRleCk7CisgICAgICAgIH1lbHNlIHsvL25vIHN1cHBvcnQgbGVuZ3RoCisJCXJjID0gLUVJTlZBTDsKKyAgICAgICAgcmV0dXJuIHJjOworCQl9CisgICAgICAgIG1lbXNldChwRGV2aWNlLT5hYnlLZXksIDAsIFdMQU5fV0VQMjMyX0tFWUxFTik7CisgICAgICAgIG1lbWNweShwRGV2aWNlLT5hYnlLZXksIGV4dHJhLCB3cnEtPmxlbmd0aCk7CisKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJhYnlLZXk6ICIpOworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCB3cnEtPmxlbmd0aDsgaWkrKykgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiJTAyeCAiLCBwRGV2aWNlLT5hYnlLZXlbaWldKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChwRGV2aWNlLT5mbGFncyAmIERFVklDRV9GTEFHU19PUEVORUQpIHsKKyAgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoRFdPUkQpKGR3S2V5SW5kZXggfCAoMSA8PCAzMSkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgCXdycS0+bGVuZ3RoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YWJ5S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtFWV9DVExfV0VQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPlBvcnRPZmZzZXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlMb2NhbElECisgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICB9CisgICAgICAgIHBEZXZpY2UtPmJ5S2V5SW5kZXggPSAoQllURSlkd0tleUluZGV4OworICAgICAgICBwRGV2aWNlLT51S2V5TGVuZ3RoID0gd3JxLT5sZW5ndGg7CisgICAgICAgIHBEZXZpY2UtPmJUcmFuc21pdEtleSA9IFRSVUU7CisgICAgICAgIHBEZXZpY2UtPmJFbmNyeXB0aW9uRW5hYmxlID0gVFJVRTsKKyAgICAgICAgcERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPSBOZGlzODAyXzExRW5jcnlwdGlvbjFFbmFibGVkOworCisJCX1lbHNlIGlmKGluZGV4PjApeworCS8vd2hlbiB0aGUgbGVuZ3RoIGlzIDAgdGhlIHJlcXVlc3Qgb25seSBjaGFuZ2VzIHRoZSBkZWZhdWx0IHRyYW5zbWl0IGtleSBpbmRleAorCS8vY2hlY2sgdGhlIG5ldyBrZXkgaGFzIGEgbm9uIHplcm8gbGVuZ2V0CisJaWYocERldmljZS0+YkVuY3J5cHRpb25FbmFibGU9PUZBTFNFKQorCXsKKwkJcmMgPSAtRUlOVkFMOworICAgICAgICAJcmV0dXJuIHJjOworCX0KKwlERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJKdXN0IHNldCBEZWZhdWx0IGtleSBJbmRleDpcbiIpOworCXBrZXl0YWI9JihwRG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AgICAgICAgICAgICAgIE1BQ3ZEaXNhYmxlS2V5RW50cnkocERldmljZS0+UG9ydE9mZnNldCwgdXUpOworICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgfQorfQorLy9FbmQgTW9kaWZ5LEVpbnNuCisKKy8qCisJREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiIFNJT0NTSVdFTkNPREUgXG4iKTsKKworCS8vIENoZWNrIHRoZSBzaXplIG9mIHRoZSBrZXkKKwlpZiAod3JxLT5sZW5ndGggPiBXTEFOX1dFUDIzMl9LRVlMRU4pIHsKKwkJcmMgPSAtRUlOVkFMOworICAgICAgICByZXR1cm4gcmM7CisJfQorCisJaWYgKGR3S2V5SW5kZXggPiBXTEFOX1dFUF9OS0VZUykgeworCQlyYyA9IC1FSU5WQUw7CisgICAgICAgIHJldHVybiByYzsKKyAgICB9CisKKyAgICBpZiAoZHdLZXlJbmRleCA+IDApCisJCWR3S2V5SW5kZXgtLTsKKworCS8vIFNlbmQgdGhlIGtleSB0byB0aGUgY2FyZAorCWlmICh3cnEtPmxlbmd0aCA+IDApIHsKKworICAgICAgICBpZiAod3JxLT5sZW5ndGggPT0gIFdMQU5fV0VQMjMyX0tFWUxFTikgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2V0IDIzMiBiaXQgd2VwIGtleVxuIik7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAod3JxLT5sZW5ndGggPT0gIFdMQU5fV0VQMTA0X0tFWUxFTikgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2V0IDEwNCBiaXQgd2VwIGtleVxuIik7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAod3JxLT5sZW5ndGggPT0gV0xBTl9XRVA0MF9LRVlMRU4pIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlNldCA0MCBiaXQgd2VwIGtleSwgaW5kZXg9ICVkXG4iLCAoaW50KWR3S2V5SW5kZXgpOworICAgICAgICB9CisgICAgICAgIG1lbXNldChwRGV2aWNlLT5hYnlLZXksIDAsIFdMQU5fV0VQMjMyX0tFWUxFTik7CisgICAgICAgIG1lbWNweShwRGV2aWNlLT5hYnlLZXksIGV4dHJhLCB3cnEtPmxlbmd0aCk7CisKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJhYnlLZXk6ICIpOworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCB3cnEtPmxlbmd0aDsgaWkrKykgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiJTAyeCAiLCBwRGV2aWNlLT5hYnlLZXlbaWldKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChwRGV2aWNlLT5mbGFncyAmIERFVklDRV9GTEFHU19PUEVORUQpIHsKKyAgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoRFdPUkQpKHBEZXZpY2UtPmJ5S2V5SW5kZXggfCAoMSA8PCAzMSkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnVLZXlMZW5ndGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5hYnlLZXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgS0VZX0NUTF9XRVAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUxvY2FsSUQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgIH0KKyAgICAgICAgcERldmljZS0+YnlLZXlJbmRleCA9IChCWVRFKWR3S2V5SW5kZXg7CisgICAgICAgIHBEZXZpY2UtPnVLZXlMZW5ndGggPSB3cnEtPmxlbmd0aDsKKyAgICAgICAgcERldmljZS0+YlRyYW5zbWl0S2V5ID0gVFJVRTsKKyAgICAgICAgcERldmljZS0+YkVuY3J5cHRpb25FbmFibGUgPSBUUlVFOworICAgICAgICBwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uMUVuYWJsZWQ7CisKKwkJLy8gRG8gd2Ugd2FudCB0byBqdXN0IHNldCB0aGUgdHJhbnNtaXQga2V5IGluZGV4ID8KKwkJaWYgKCBpbmRleCA8IDQgKSB7CisJCSAgICBwRGV2aWNlLT5ieUtleUluZGV4ID0gaW5kZXg7CisJCX0KKwkJZWxzZSBpZighd3JxLT5mbGFncyAmIElXX0VOQ09ERV9NT0RFKSB7CisJCQkJcmMgPSAtRUlOVkFMOworCQkJCXJldHVybiByYzsKKwkgICAgfQorCX0KKwkvLyBSZWFkIHRoZSBmbGFncworCWlmKHdycS0+ZmxhZ3MgJiBJV19FTkNPREVfRElTQUJMRUQpeworCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkRpc2FibGUgV0VQIGZ1bmN0aW9uXG4iKTsKKwkJcE1nbXQtPmJTaGFyZUtleUFsZ29yaXRobSA9IEZBTFNFOworICAgICAgICBwRGV2aWNlLT5iRW5jcnlwdGlvbkVuYWJsZSA9IEZBTFNFOworICAgICAgICBwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9IE5kaXM4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aWkrKykKKwlwcmludGsoIiUwMng6IixwYXJhbS0+dS53cGFfa2V5LnNlcVtpaV0pOworICAgICAgICAgcHJpbnRrKCJcbiIpOworCitwcmludGsoIi4uLi4uLi4uLi4uXG4iKTsKKyNlbmRpZgorLy8qKioqc2V0IGlmIGN1cnJlbnQgYWN0aW9uIGlzIE5ldHdvcmsgTWFuYWdlciBjb3VudD8/CisvLyoqKip0aGlzIG1ldGhvZCBpcyBzbyBmb29saXNoLGJ1dCB0aGVyZSBpcyBubyBvdGhlciB3YXk/Pz8KK2lmKHBhcmFtLT51LndwYV9rZXkuYWxnX25hbWUgPT0gV1BBX0FMR19OT05FKSB7CisgICBpZihwYXJhbS0+dS53cGFfa2V5LmtleV9pbmRleCA9PTApIHsKKyAgICAgcERldmljZS0+YndleHRjb3VudCsrOworICAgIH0KKyAgIGlmKChwRGV2aWNlLT5id2V4dGNvdW50ID09IDEpJiYocGFyYW0tPnUud3BhX2tleS5rZXlfaW5kZXggPT0xKSkgeworIHBEZXZpY2UtPmJ3ZXh0Y291bnQrKzsKKyAgICB9CisgICBpZigocERldmljZS0+YndleHRjb3VudCA9PTIpJiYocGFyYW0tPnUud3BhX2tleS5rZXlfaW5kZXggPT0yKSkgeworIHBEZXZpY2UtPmJ3ZXh0Y291bnQrKzsKKwl9CisgICBpZigocERldmljZS0+YndleHRjb3VudCA9PTMpJiYocGFyYW0tPnUud3BhX2tleS5rZXlfaW5kZXggPT0zKSkgeworIHBEZXZpY2UtPmJ3ZXh0Y291bnQrKzsKKyAgICAgICAgfQorCQkgfQoraWYoIHBEZXZpY2UtPmJ3ZXh0Y291bnQgPT0gNCkgeworICAgIHByaW50aygiU0lPQ1NJV0VOQ09ERUVYVDpFbmFibGUgV1BBIFdFWFQgU1VQUE9SVCEhISEhXG4iKTsKKyBwRGV2aWNlLT5id2V4dGNvdW50PTA7CisgICBwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID0gVFJVRTsKKwkJIH0KKy8vKioqKioqCisKKwkJc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgcmV0ID0gd3BhX3NldF9rZXlzKHBEZXZpY2UsIHBhcmFtLCBUUlVFKTsKKwkJc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKworZXJyb3I6CitrZnJlZShwYXJhbSk7CisJcmV0dXJuIHJldDsKK30KKworCisKK2ludCBpd2N0bF9naXdlbmNvZGVleHQoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgIHN0cnVjdCBpd19wb2ludCAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKQoreworCQlyZXR1cm4gLUVPUE5PVFNVUFA7OworfQorCitpbnQgaXdjdGxfc2l3bWxtZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorCQkJCXN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKiBpbmZvLAorCQkJCXN0cnVjdCBpd19wb2ludCAqd3JxLAorCQkJCWNoYXIgKmV4dHJhKQoreworCVBTRGV2aWNlCQkJcERldmljZSA9IChQU0RldmljZSluZXRkZXZfcHJpdihkZXYpOworCVBTTWdtdE9iamVjdAlwTWdtdCA9ICYocERldmljZS0+c01nbXRPYmopOworCXN0cnVjdCBpd19tbG1lICptbG1lID0gKHN0cnVjdCBpd19tbG1lICopZXh0cmE7CisJLy91MTYgcmVhc29uID0gY3B1X3RvX2xlMTYobWxtZS0+cmVhc29uX2NvZGUpOworCWludCByZXQgPSAwOworCisJaWYobWVtY21wKHBNZ210LT5hYnlDdXJyQlNTSUQsIG1sbWUtPmFkZHIuc2FfZGF0YSwgRVRIX0FMRU4pKXsKKwkJcmV0ID0gLUVJTlZBTDsKKwkJcmV0dXJuIHJldDsKKwl9CisJc3dpdGNoKG1sbWUtPmNtZCl7CisJY2FzZSBJV19NTE1FX0RFQVVUSDoKKwkJLy90aGlz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RldmljZSAqZGV2LAorICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgc3RydWN0IGl3X3BvaW50ICp3cnEsCisgICAgICAgICAgICAgY2hhciAqZXh0cmEpOworCitpbnQgaXdjdGxfc2l3ZXNzaWQoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgIHN0cnVjdCBpd19wb2ludCAqd3JxLAorICAgICAgICAgICAgIGNoYXIgKmV4dHJhKTsKKworaW50IGl3Y3RsX2dpd2Vzc2lkKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcG9pbnQgKndycSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSk7CisKK2ludCBpd2N0bF9zaXdyYXRlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKwkJCSBzdHJ1Y3QgaXdfcGFyYW0gKndycSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSk7CisKK2ludCBpd2N0bF9naXdyYXRlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcGFyYW0gKndycSwKKyAgICAgICAgICAgICBjaGFyICpleHRyYSk7CisKK2ludCBpd2N0bF9zaXdydHMoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJIHN0cnVjdCBpd19wYXJhbSAqd3JxLAorICAgICAgICAgICAg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S0tLS0tLS0tLS0tLS0tLSAgU3RhdGljIFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgU3RhdGljIEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworc3RhdGljIFZPSUQKK3NfdkNoZWNrS2V5VGFibGVWYWxpZCAoUFNLZXlNYW5hZ2VtZW50IHBUYWJsZSwgRFdPUkRfUFRSIGR3SW9CYXNlKQoreworICAgIGludCBpOworCisgICAgZm9yIChpPTA7aTxNQVhfS0VZX1RBQkxFO2krKykgeworICAgICAgICBpZiAoKHBUYWJsZS0+S2V5VGFibGVbaV0uYkluVXNlID09IFRSVUUpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5QYWlyd2lzZUtleS5iS2V5VmFsaWQgPT0gRkFMU0UpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVswXS5iS2V5VmFsaWQgPT0gRkFMU0UpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVsxXS5iS2V5VmFsaWQgPT0gRkFMU0UpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVsyXS5iS2V5VmFsaWQgPT0gRkFMU0UpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVszXS5iS2V5VmFsaWQgPT0gRkFMU0UpCisgICAgICAgICAgICApIHsKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uYkluVXNlID0gRkFMU0U7CisgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLndLZXlDdGwgPSAwOworICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5iU29mdFdFUCA9IEZBTFNFOworICAgICAgICAgICAgTUFDdkRpc2FibGVLZXlFbnRyeShkd0lvQmFzZSwgaSk7CisgICAgICAgIH0KKyAgICB9Cit9CisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisvKgorICogRGVzY3JpcHRpb246IEluaXQgS2V5IG1hbmFnZW1lbnQgdGFibGUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwVGFibGUgICAgICAgICAgLSBQb2ludGVyIHRvIEtleSB0YWJsZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLworVk9JRCBLZXl2SW5pdFRhYmxlIChQU0tleU1hbmFnZW1lbnQgcFRhYmxlLCBEV09SRF9QVFIgZHdJb0Jhc2UpCit7CisgICAgaW50IGk7CisgICAgaW50IGpqOworCisgICAgZm9yIChpPTA7aTxNQVhfS0VZX1RBQkxFO2krKykgeworICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLmJJblVzZSA9IEZBTFNFOworICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5LmJLZXlWYWxpZCA9IEZBTFNFOworICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5LnB2S2V5VGFibGUgPSAoUFZPSUQpJnBUYWJsZS0+S2V5VGFibGVbaV07CisgICAgICAgIGZvciAoamo9MDsgamogPCBNQVhfR1JPVVBfS0VZOyBqaisrKSB7CisgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5W2pqXS5iS2V5VmFsaWQgPSBGQUxTRTsKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uR3JvdXBLZXlbampdLnB2S2V5VGFibGUgPSAoUFZPSUQpJnBUYWJsZS0+S2V5VGFibGVbaV07CisgICAgICAgIH0KKyAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS53S2V5Q3RsID0gMDsKKyAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggPSAwOworICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLmJTb2Z0V0VQID0gRkFMU0U7CisgICAgICAgIE1BQ3ZEaXNhYmxlS2V5RW50cnkoZHdJb0Jhc2UsIGkpOworICAgIH0KK30KKworCisvKgorICogRGVzY3JpcHRpb246IEdldCBLZXkgZnJvbSB0YWJsZQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBUYWJsZSAgICAgICAgICAtIFBvaW50ZXIgdG8gS2V5IHRhYmxlCisgKiAgICAgIHBieUJTU0lEICAgICAgICAtIEJTU0lEIG9mIEtleQorICogICAgICBkd0tleUluZGV4ICAgICAgLSBLZXkgSW5kZXggKDB4RkZGRkZGRkYgbWVhbnMgcGFpcndpc2Uga2V5KQorICogIE91dDoKKyAqICAgICAgcEtleSAgICAgICAgICAgIC0gS2V5IHJldHVybgorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBmb3VuZCBvdGhlcndpc2UgRkFMU0UKKyAqCisgKi8KK0JPT0wgS2V5YkdldEtleSAoCisgICAgSU4gIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgSU4gIFBCWVRFICAgICAgICAgICBwYnlCU1NJRCwKKyAgICBJTiAgRFdPUkQgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgT1VUIFBTS2V5SXRlbSAgICAgICAqcEtleQorICAgICkKK3sKKyAgICBpbnQgaTsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iS2V5YkdldEtleSgpIFxuIik7CisKKyAgICAqcEtleSA9IE5VTEw7CisgICAgZm9yIChpPTA7aTxNQVhfS0VZX1RBQkxFO2krKykgeworICAgICAgICBpZiAoKHBUYWJsZS0+S2V5VGFibGVbaV0uYkluVXNlID09IFRSVUUpICYmCisgICAgICAgICAgICBJU19FVEhfQUREUkVTU19FUVVBTChwVGFibGUtPktleVRhYmxlW2ldLmFieUJTU0lELHBieUJTU0lEKSkgeworICAgICAgICAgICAgaWYgKGR3S2V5SW5kZXggPT0gMHhGRkZGRkZGRikgeworICAgICAgICAgICAgICAgIGlmIChwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5LmJLZXlWYWxpZCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgICpwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5KTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChUUlVFKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gZWxzZSBpZiAoZHdLZXlJbmRleCA8IE1BWF9HUk9VUF9LRVkpIHsKKyAgICAgICAgICAgICAgICBpZiAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVtkd0tleUluZGV4XS5iS2V5VmFsaWQgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgICAgICAqcEtleSA9ICYocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVtkd0tleUluZGV4XSk7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiAoVFJVRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gKEZBTFNFKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IFNldCBLZXkgdG8gdGFibGUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwVGFibGUgICAgICAgICAgLSBQb2ludGVyIHRvIEtleSB0YWJsZQorICogICAgICBwYnlCU1NJRCAgICAgICAgLSBCU1NJRCBvZiBLZXkKKyAqICAgICAgZHdLZXlJbmRleCAgICAgIC0gS2V5IGluZGV4IChyZWZlcmVuY2UgdG8gTkRJUyBEREspCisgKiAgICAgIHVLZXlMZW5ndGggICAgICAtIEtleSBsZW5ndGgKKyAqICAgICAgS2V5UlNDICAgICAgICAgIC0gS2V5IFJTQworICogICAgICBwYnlLZXkgICAgICAgICAgLSBQb2ludGVyIHRvIGtleQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBzdWNjZXNzIG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBLZXliU2V0S2V5ICgKKyAgICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIFBCWVRFICAgICAgICAgICBwYnlCU1NJRCwKKyAgICBEV09SRCAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICBVTE9ORyAgICAgICAgICAgdUtleUxlbmd0aCwKKyAgICBQUVdPUkQgICAgICAgICAgcEtleVJTQywKKyAgICBQQllURSAgICAgICAgICAgcGJ5S2V5LAorICAgIEJZVEUgICAgICAgICAgICBieUtleURlY01vZGUsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlLAorICAgIEJZVEUgICAgICAgICAgICBieUxvY2FsSUQKKyAgICApCit7CisgICAgaW50ICAgICAgICAgaSxqOworICAgIFVJTlQgICAgICAgIGlpOworICAgIFBTS2V5SXRlbSAgIHBLZXk7CisgICAgVUlOVCAgICAgICAgdUtleUlkeDsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRW50ZXIgS2V5YlNldEtleTogJWxYXG4iLCBkd0tleUluZGV4KTsKKworICAgIGogPSAoTUFYX0tFWV9UQUJMRS0xKTsKKyAgICBmb3IgKGk9MDtpPChNQVhfS0VZX1RBQkxFLTEpO2krKykgeworICAgICAgICBpZiAoKHBUYWJsZS0+S2V5VGFibGVbaV0uYkluVXNlID09IEZBTFNFKSAmJgorICAgICAgICAgICAgKGogPT0gKE1BWF9LRVlfVEFCTEUtMSkpKSB7CisgICAgICAgICAgICAvLyBmb3VuZCBlbXB0eSB0YWJsZQorICAgICAgICAgICAgaiA9IGk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKChwVGFibGUtPktleVRhYmxlW2ldLmJJblVzZSA9PSBUUlVFKSAmJgorICAgICAgICAgICAgSVNfRVRIX0FERFJFU1NfRVFVQUwocFRhYmxlLT5LZXlUYWJsZVtpXS5hYnlCU1NJRCxwYnlCU1NJRCkpIHsKKyAgICAgICAgICAgIC8vIGZvdW5kIHRhYmxlIGFscmVhZHkgZXhpc3QKKyAgICAgICAgICAgIGlmICgoZHdLZXlJbmRleCAmIFBBSVJXSVNFX0tFWSkgIT0gMCkgeworICAgICAgICAgICAgICAgIC8vIFBhaXJ3aXNlIGtleQorICAgICAgICAgICAgICAgIHBLZXkgPSAmKHBUYWJsZS0+S2V5VGFibGVbaV0uUGFpcndpc2VLZXkpOworICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCAmPSAweEZGRjA7ICAgICAgICAgIC8vIGNsZWFyIHBhaXJ3aXNlIGtleSBjb250cm9sIGZpbGVkCisgICAgICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS53S2V5Q3RsIHw9IGJ5S2V5RGVjTW9kZTsKKyAgICAgICAgICAgICAgICB1S2V5SWR4ID0gNDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB1c2UgSFcga2V5IGVudHJ5IDQgZm9yIHBhaXJ3aXNlIGtleQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBHcm91cCBrZXkKKyAgICAgICAgICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiAweDAwMDAwMEZGKSA+PSBNQVhfR1JPVVBfS0VZKQorICAgICAgICAgICAgICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICAgICAgICAgICAgICBwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5W2R3S2V5SW5kZXggJiAweDAwMDAwMEZGXSk7CisgICAgICAgICAgICAgICAgaWYgKChkd0tleUluZGV4ICYgVFJBTlNNSVRfS0VZKSAhPSAwKSAgeworICAgICAgICAgICAgICAgICAgICAvLyBHcm91cCB0cmFuc21pdCBrZXkKKyAgICAgICAgICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggPSBkd0tleUluZGV4OworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkdyb3VwIHRyYW5zbWl0IGtleShSKVslbFhdOiAlZFxuIiwgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXgsIGkpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLndLZXlDdGwgJj0gMHhGRjBGOyAgICAgICAgICAvLyBjbGVhciBncm91cCBrZXkgY29udHJvbCBmaWxlZAorICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCB8PSAoYnlLZXlEZWNNb2RlIDw8IDQpOworICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCB8PSAweDAwNDA7ICAgICAgICAgIC8vIHVzZSBncm91cCBrZXkgZm9yIGdyb3VwIGFkZHJlc3MKKyAgICAgICAgICAgICAgICB1S2V5SWR4ID0gKGR3S2V5SW5kZXggJiAweDAwMDAwMEZGKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCB8PSAweDgwMDA7ICAgICAgICAgICAgICAvLyBlbmFibGUgb24tZmx5CisKKyAgICAgICAgICAgIHBLZXktPmJLZXlWYWxpZCA9IFRSVUU7CisgICAgICAgICAgICBwS2V5LT51S2V5TGVuZ3RoID0gdUtleUxlbmd0aDsKKyAgICAgICAgICAgIHBLZXktPmR3S2V5SW5kZXggPSBkd0tleUluZGV4OworICAgICAgICAgICAgcEtleS0+YnlDaXBoZXJTdWl0ZSA9IGJ5S2V5RGVjTW9kZTsKKyAgICAgICAgICAgIE1FTXZDb3B5KHBLZXktPmFieUtleSwgcGJ5S2V5LCB1S2V5TGVuZ3RoKTsKKyAgICAgICAgICAgIGlmIChieUtleURlY01vZGUgPT0gS0VZX0NUTF9XRVApIHsKKyAgICAgICAgICAgICAgICBpZiAodUtleUxlbmd0aCA9PSBXTEFOX1dFUDQwX0tFWUxFTikKKyAgICAgICAgICAgICAgICAgICAgcEtleS0+YWJ5S2V5WzE1XSAmPSAweDdGOworICAgICAgICAgICAgICAgIGlmICh1S2V5TGVuZ3RoID09IFdMQU5fV0VQMTA0X0tFWUxFTikKKyAgICAgICAgICAgICAgICAgICAgcEtleS0+YWJ5S2V5WzE1XSB8PSAweDgwOworICAgICAgICAgICAgfQorICAgICAgICAgICAgTUFDdlNldEtleUVudHJ5KGR3SW9CYXNlLCBwVGFibGUtPktleVRhYmxlW2ldLndLZXlDdGwsIGksIHVLZXlJZHgsIHBieUJTU0lELCAoUERXT1JEKXBLZXktPmFieUtleSwgYnlMb2NhbElEKTsKKworICAgICAgICAgICAgaWYgKChkd0tleUluZGV4ICYgVVNFX0tFWVJTQykgPT0gMCkgeworICAgICAgICAgICAgICAgIC8vIFJTQyBzZXQgYnkgTklDCisgICAgICAgICAgICAgICAgWkVST19NRU1PUlkoJihwS2V5LT5LZXlSU0MpLCBzaXplb2YoUVdPUkQpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIE1FTXZDb3B5KCYocEtleS0+S2V5UlNDKSwgcEtleVJTQywgIHNpemVvZihRV09SRCkpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcEtleS0+ZHdUU0M0N18xNiA9IDA7CisgICAgICAgICAgICBwS2V5LT53VFNDMTVfMCA9IDA7CisKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iS2V5YlNldEtleShSKTogXG4iKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+YktleVZhbGlkOiAlZFxuICIsIHBLZXktPmJLZXlWYWxpZCk7CisgICAgICAgICAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+dUtleUxlbmd0aDogJWRcbiAiLCBwS2V5LT51S2V5TGVuZ3RoKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+YWJ5S2V5OiAiKTsKKyAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHBLZXktPnVLZXlMZW5ndGg7IGlpKyspIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIlMDJ4ICIsIHBLZXktPmFieUtleVtpaV0pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJcbiIpOworCisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInBLZXktPmR3VFNDNDdfMTY6ICVseFxuICIsIHBLZXktPmR3VFNDNDdfMTYpOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJwS2V5LT53VFNDMTVfMDogJXhcbiAiLCBwS2V5LT53VFNDMTVfMCk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInBLZXktPmR3S2V5SW5kZXg6ICVseFxuICIsIHBLZXktPmR3S2V5SW5kZXgpOworCisgICAgICAgICAgICByZXR1cm4gKFRSVUUpOworICAgICAgICB9CisgICAgfQorICAgIGlmIChqIDwgKE1BWF9LRVlfVEFCTEUtMSkpIHsKKyAgICAgICAgTUVNdkNvcHkocFRhYmxlLT5LZXlUYWJsZVtqXS5hYnlCU1NJRCxwYnlCU1NJRCxVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtqXS5iSW5Vc2UgPSBUUlVFOworICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiBQQUlSV0lTRV9LRVkpICE9IDApICB7CisgICAgICAgICAgICAvLyBQYWlyd2lzZSBrZXkKKyAgICAgICAgICAgIHBLZXkgPSAmKHBUYWJsZS0+S2V5VGFibGVbal0uUGFpcndpc2VLZXkpOworICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtqXS53S2V5Q3RsICY9IDB4RkZGMDsgICAgICAgICAgLy8gY2xlYXIgcGFpcndpc2Uga2V5IGNvbnRyb2wgZmlsZWQKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbal0ud0tleUN0bCB8PSBieUtleURlY01vZGU7CisgICAgICAgICAgICB1S2V5SWR4ID0gNDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB1c2UgSFcga2V5IGVudHJ5IDQgZm9yIHBhaXJ3aXNlIGtleQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy8gR3JvdXAga2V5CisgICAgICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiAweDAwMDAwMEZGKSA+PSBNQVhfR1JPVVBfS0VZKQorICAgICAgICAgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgICAgICAgICAgcEtleSA9ICYocFRhYmxlLT5LZXlUYWJsZVtqXS5Hcm91cEtleVtkd0tleUluZGV4ICYgMHgwMDAwMDBGRl0pOworICAgICAgICAgICAgaWYgKChkd0tleUluZGV4ICYgVFJBTlNNSVRfS0VZKSAhPSAwKSAgeworICAgICAgICAgICAgICAgIC8vIEdyb3VwIHRyYW5zbWl0IGtleQorICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbal0uZHdHVEtleUluZGV4ID0gZHdLZXlJbmRleDsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkdyb3VwIHRyYW5zbWl0IGtleShOKVslbFhdOiAlZFxuIiwgcFRhYmxlLT5LZXlUYWJsZVtqXS5kd0dUS2V5SW5kZXgsIGopOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtqXS53S2V5Q3RsICY9IDB4RkYwRjsgICAgICAgICAgLy8gY2xlYXIgZ3JvdXAga2V5IGNvbnRyb2wgZmlsZWQKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbal0ud0tleUN0bCB8PSAoYnlLZXlEZWNNb2RlIDw8IDQpOworICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtqXS53S2V5Q3RsIHw9IDB4MDA0MDsgICAgICAgICAgLy8gdXNlIGdyb3VwIGtleSBmb3IgZ3JvdXAgYWRkcmVzcworICAgICAgICAgICAgdUtleUlkeCA9IChkd0tleUluZGV4ICYgMHgwMDAwMDBGRik7CisgICAgICAgIH0KKyAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtqXS53S2V5Q3RsIHw9IDB4ODAwMDsgICAgICAgICAgICAgIC8vIGVuYWJsZSBvbi1mbHkKKworICAgICAgICBwS2V5LT5iS2V5VmFsaWQgPSBUUlVFOworICAgICAgICBwS2V5LT51S2V5TGVuZ3RoID0gdUtleUxlbmd0aDsKKyAgICAgICAgcEtleS0+ZHdLZXlJbmRleCA9IGR3S2V5SW5kZXg7CisgICAgICAgIHBLZXktPmJ5Q2lwaGVyU3VpdGUgPSBieUtleURlY01vZGU7CisgICAgICAgIE1FTXZDb3B5KHBLZXktPmFieUtleSwgcGJ5S2V5LCB1S2V5TGVuZ3RoKTsKKyAgICAgICAgaWYgKGJ5S2V5RGVjTW9kZSA9PSBLRVlfQ1RMX1dFUCkgeworICAgICAgICAgICAgaWYgKHVLZXlMZW5ndGggPT0gV0xBTl9XRVA0MF9LRVlMRU4pCisgICAgICAgICAgICAgICAgcEtleS0+YWJ5S2V5WzE1XSAmPSAweDdGOworICAgICAgICAgICAgaWYgKHVLZXlMZW5ndGggPT0gV0xBTl9XRVAxMDRfS0VZTEVOKQorICAgICAgICAgICAgICAgIHBLZXktPmFieUtleVsxNV0gfD0gMHg4MDsKKyAgICAgICAgfQorICAgICAgICBNQUN2U2V0S2V5RW50cnkoZHdJb0Jhc2UsIHBUYWJsZS0+S2V5VGFibGVbal0ud0tleUN0bCwgaiwgdUtleUlkeCwgcGJ5QlNTSUQsIChQRFdPUkQpcEtleS0+YWJ5S2V5LCBieUxvY2FsSUQpOworCisgICAgICAgIGlmICgoZHdLZXlJbmRleCAmIFVTRV9LRVlSU0MpID09IDApIHsKKyAgICAgICAgICAgIC8vIFJTQyBzZXQgYnkgTklDCisgICAgICAgICAgICBaRVJPX01FTU9SWSgmKHBLZXktPktleVJTQyksIHNpemVvZihRV09SRCkpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgTUVNdkNvcHkoJihwS2V5LT5LZXlSU0MpLCBwS2V5UlNDLCAgc2l6ZW9mKFFXT1JEKSk7CisgICAgICAgIH0KKyAgICAgICAgcEtleS0+ZHdUU0M0N18xNiA9IDA7CisgICAgICAgIHBLZXktPndUU0MxNV8wID0gMDsKKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIktleWJTZXRLZXkoTik6IFxuIik7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+YktleVZhbGlkOiAlZFxuICIsIHBLZXktPmJLZXlWYWxpZCk7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+dUtleUxlbmd0aDogJWRcbiAiLCAoaW50KXBLZXktPnVLZXlMZW5ndGgpOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInBLZXktPmFieUtleTogIik7CisgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHBLZXktPnVLZXlMZW5ndGg7IGlpKyspIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiUwMnggIiwgcEtleS0+YWJ5S2V5W2lpXSk7CisgICAgICAgIH0KKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJcbiIpOworCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+ZHdUU0M0N18xNjogJWx4XG4gIiwgcEtleS0+ZHdUU0M0N18xNik7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8icEtleS0+d1RTQzE1XzA6ICV4XG4gIiwgcEtleS0+d1RTQzE1XzApOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInBLZXktPmR3S2V5SW5kZXg6ICVseFxuICIsIHBLZXktPmR3S2V5SW5kZXgpOworCisgICAgICAgIHJldHVybiAoVFJVRSk7CisgICAgfQorICAgIHJldHVybiAoRkFMU0UpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogUmVtb3ZlIEtleSBmcm9tIHRhYmxlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcFRhYmxlICAgICAgICAgIC0gUG9pbnRlciB0byBLZXkgdGFibGUKKyAqICAgICAgcGJ5QlNTSUQgICAgICAgIC0gQlNTSUQgb2YgS2V5CisgKiAgICAgIGR3S2V5SW5kZXggICAgICAtIEtleSBJbmRleCAocmVmZXJlbmNlIHRvIE5ESVMgRERLKQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBzdWNjZXNzIG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBLZXliUmVtb3ZlS2V5ICgKKyAgICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIFBCWVRFICAgICAgICAgICBwYnlCU1NJRCwKKyAgICBEV09SRCAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICBEV09SRF9QVFIgICAgICAgZHdJb0Jhc2UKKyAgICApCit7CisgICAgaW50ICBpOworCisgICAgaWYgKElTX0JST0FEQ0FTVF9BRERSRVNTKHBieUJTU0lEKSkgeworICAgICAgICAvLyBkZWFsdGUgYWxsIGtleQorICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiBQQUlSV0lTRV9LRVkpICE9IDApIHsKKyAgICAgICAgICAgIGZvciAoaT0wO2k8TUFYX0tFWV9UQUJMRTtpKyspIHsKKyAgICAgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5LmJLZXlWYWxpZCA9IEZBTFNFOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc192Q2hlY2tLZXlUYWJsZVZhbGlkKHBUYWJsZSwgZHdJb0Jhc2UpOworICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoKGR3S2V5SW5kZXggJiAweDAwMDAwMEZGKSA8IE1BWF9HUk9VUF9LRVkpIHsKKyAgICAgICAgICAgIGZvciAoaT0wO2k8TUFYX0tFWV9UQUJMRTtpKyspIHsKKyAgICAgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5W2R3S2V5SW5kZXggJiAweDAwMDAwMEZGXS5iS2V5VmFsaWQgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiAweDdGRkZGRkZGKSA9PSAocFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggJiAweDdGRkZGRkZGKSkgeworICAgICAgICAgICAgICAgICAgICAvLyByZW1vdmUgR3JvdXAgdHJhbnNtaXQga2V5CisgICAgICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uZHdHVEtleUluZGV4ID0gMDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzX3ZDaGVja0tleVRhYmxlVmFsaWQocFRhYmxlLCBkd0lvQmFzZSk7CisgICAgICAgICAgICByZXR1cm4gVFJVRTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGZvciAoaT0wO2k8TUFYX0tFWV9UQUJMRTtpKyspIHsKKyAgICAgICAgaWYgKChwVGFibGUtPktleVRhYmxlW2ldLmJJblVzZSA9PSBUUlVFKSAmJgorICAgICAgICAgICAgSVNfRVRIX0FERFJFU1NfRVFVQUwocFRhYmxlLT5LZXlUYWJsZVtpXS5hYnlCU1NJRCxwYnlCU1NJRCkpIHsKKyAgICAgICAgICAgIGlmICgoZHdLZXlJbmRleCAmIFBBSVJXSVNFX0tFWSkgIT0gMCkgeworICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uUGFpcndpc2VLZXkuYktleVZhbGlkID0gRkFMU0U7CisgICAgICAgICAgICAgICAgc192Q2hlY2tLZXlUYWJsZVZhbGlkKHBUYWJsZSwgZHdJb0Jhc2UpOworICAgICAgICAgICAgICAgIHJldHVybiAoVFJVRSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICgoZHdLZXlJbmRleCAmIDB4MDAwMDAwRkYpIDwgTUFYX0dST1VQX0tFWSkgeworICAgICAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uR3JvdXBLZXlbZHdLZXlJbmRleCAmIDB4MDAwMDAwRkZdLmJLZXlWYWxpZCA9IEZBTFNFOworICAgICAgICAgICAgICAgIGlmICgoZHdLZXlJbmRleCAmIDB4N0ZGRkZGRkYpID09IChwVGFibGUtPktleVRhYmxlW2ldLmR3R1RLZXlJbmRleCAmIDB4N0ZGRkZGRkYpKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBHcm91cCB0cmFuc21pdCBrZXkKKyAgICAgICAgICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggPSAwOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBzX3ZDaGVja0tleVRhYmxlVmFsaWQocFRhYmxlLCBkd0lvQmFzZSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIChUUlVFKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAgIHJldHVybiAoRkFMU0UpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogUmVtb3ZlIEtleSBmcm9tIHRhYmxlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcFRhYmxlICAgICAgICAgIC0gUG9pbnRlciB0byBLZXkgdGFibGUKKyAqICAgICAgcGJ5QlNTSUQgICAgICAgIC0gQlNTSUQgb2YgS2V5CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2Nlc3Mgb3RoZXJ3aXNlIEZBTFNFCisgKgorICovCitCT09MIEtleWJSZW1vdmVBbGxLZXkgKAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgUEJZVEUgICAgICAgICAgIHBieUJTU0lELAorICAgIERXT1JEX1BUUiAgICAgICBkd0lvQmFzZQorICAgICkKK3sKKyAgICBpbnQgIGksdTsKKworICAgIGZvciAoaT0wO2k8TUFYX0tFWV9UQUJMRTtpKyspIHsKKyAgICAgICAgaWYgKChwVGFibGUtPktleVRhYmxlW2ldLmJJblVzZSA9PSBUUlVFKSAmJgorICAgICAgICAgICAgSVNfRVRIX0FERFJFU1NfRVFVQUwocFRhYmxlLT5LZXlUYWJsZVtpXS5hYnlCU1NJRCxwYnlCU1NJRCkpIHsKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0uUGFpcndpc2VLZXkuYktleVZhbGlkID0gRkFMU0U7CisgICAgICAgICAgICBmb3IodT0wO3U8TUFYX0dST1VQX0tFWTt1KyspIHsKKyAgICAgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5W3VdLmJLZXlWYWxpZCA9IEZBTFNFOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggPSAwOworICAgICAgICAgICAgc192Q2hlY2tLZXlUYWJsZVZhbGlkKHBUYWJsZSwgZHdJb0Jhc2UpOworICAgICAgICAgICAgcmV0dXJuIChUUlVFKTsKKyAgICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gKEZBTFNFKTsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBSZW1vdmUgV0VQIEtleSBmcm9tIHRhYmxlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcFRhYmxlICAgICAgICAgIC0gUG9pbnRlciB0byBLZXkgdGFibGUKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IFRSVUUgaWYgc3VjY2V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AgcmV0dXJuOworfQorCitWT0lEIEtleXZSZW1vdmVBbGxXRVBLZXkgKAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlCisgICAgKQoreworICAgIGludCBpOworCisgICAgZm9yKGk9MDtpPE1BWF9HUk9VUF9LRVk7aSsrKSB7CisgICAgICAgIEtleXZSZW1vdmVXRVBLZXkocFRhYmxlLCBpLCBkd0lvQmFzZSk7CisgICAgfQorfQorCisvKgorICogRGVzY3JpcHRpb246IEdldCBUcmFuc21pdCBLZXkgZnJvbSB0YWJsZQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBUYWJsZSAgICAgICAgICAtIFBvaW50ZXIgdG8gS2V5IHRhYmxlCisgKiAgICAgIHBieUJTU0lEICAgICAgICAtIEJTU0lEIG9mIEtleQorICogIE91dDoKKyAqICAgICAgcEtleSAgICAgICAgICAgIC0gS2V5IHJldHVybgorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBmb3VuZCBvdGhlcndpc2UgRkFMU0UKKyAqCisgKi8KK0JPT0wgS2V5YkdldFRyYW5zbWl0S2V5ICgKKyAgICBJTiAgUFNLZXlNYW5hZ2VtZW50IHBUYWJsZSwKKyAgICBJTiAgUEJZVEUgICAgICAgICAgIHBieUJTU0lELAorICAgIElOICBEV09SRCAgICAgICAgICAgZHdLZXlUeXBlLAorICAgIE9VVCBQU0tleUl0ZW0gICAgICAgKnBLZXkKKyAgICApCit7CisgICAgaW50IGksIGlpOworCisgICAgKnBLZXkgPSBOVUxMOworICAgIGZvciAoaT0wO2k8TUFYX0tFWV9UQUJMRTtpKyspIHsKKyAgICAgICAgaWYgKChwVGFibGUtPktleVRhYmxlW2ldLmJJblVzZSA9PSBUUlVFKSAmJgorICAgICAgICAgICAgSVNfRVRIX0FERFJFU1NfRVFVQUwocFRhYmxlLT5LZXlUYWJsZVtpXS5hYnlCU1NJRCxwYnlCU1NJRCkpIHsKKworICAgICAgICAgICAgaWYgKGR3S2V5VHlwZSA9PSBQQUlSV0lTRV9LRVkpIHsKKworICAgICAgICAgICAgICAgIGlmIChwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5LmJLZXlWYWxpZCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgICpwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5KTsKKworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIktleWJHZXRUcmFuc21pdEtleToiKTsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJQQUlSV0lTRV9LRVk6IEtleVRhYmxlLmFieUJTU0lEOiAiKTsKKyAgICAgICAgICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgNjsgaWkrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIleCAiLCBwVGFibGUtPktleVRhYmxlW2ldLmFieUJTU0lEW2lpXSk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJcbiIpOworCisKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChUUlVFKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iUGFpcndpc2VLZXkuYktleVZhbGlkID09IEZBTFNFXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSAvLyBFbmQgb2YgVHlwZSA9PSBQQUlSV0lTRQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKHBUYWJsZS0+S2V5VGFibGVbaV0uZHdHVEtleUluZGV4ID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJFUlJPUjogZHdHVEtleUluZGV4ID09IDAgISEhXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAocFRhYmxlLT5LZXlUYWJsZVtpXS5Hcm91cEtleVsocFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXgmMHgwMDAwMDBGRildLmJLZXlWYWxpZCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgICpwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5WyhwVGFibGUtPktleVRhYmxlW2ldLmR3R1RLZXlJbmRleCYweDAwMDAwMEZGKV0pOworCisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIktleWJHZXRUcmFuc21pdEtleToiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iR1JPVVBfS0VZOiBLZXlUYWJsZS5hYnlCU1NJRFxuIik7CisgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCA2OyBpaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIleCAiLCBwVGFibGUtPktleVRhYmxlW2ldLmFieUJTU0lEW2lpXSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlxuIik7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImR3R1RLZXlJbmRleDogJWxYXG4iLCBwVGFibGUtPktleVRhYmxlW2ldLmR3R1RLZXlJbmRleCk7CisKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChUUlVFKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iR3JvdXBLZXkuYktleVZhbGlkID09IEZBTFNFXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSAvLyBFbmQgb2YgVHlwZSA9IEdST1VQCisgICAgICAgIH0gLy8gQlNTSUQgbWF0Y2gKKyAgICB9CisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJFUlJPUjogTk8gTWF0Y2ggQlNTSUQgISEhICIpOworICAgIGZvciAoaWkgPSAwOyBpaSA8IDY7IGlpKyspIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIlMDJ4ICIsICoocGJ5QlNTSUQraWkpKTsKKyAgICB9CisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJcbiIpOworICAgIHJldHVybiAoRkFMU0UpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2hlY2sgUGFpcmV3aXNlIEtleQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBUYWJsZSAgICAgICAgICAtIFBvaW50ZXIgdG8gS2V5IHRhYmxlCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIGZvdW5kIG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBLZXliQ2hlY2tQYWlyZXdpc2VLZXkgKAorICAgIElOICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIE9VVCBQU0tleUl0ZW0gICAgICAgKnBLZXkKKyAgICApCit7CisgICAgaW50IGk7CisKKyAgICAqcEtleSA9IE5VTEw7CisgICAgZm9yIChpPTA7aTxNQVhfS0VZX1RBQkxFO2krKykgeworICAgICAgICBpZiAoKHBUYWJsZS0+S2V5VGFibGVbaV0uYkluVXNlID09IFRSVUUpICYmCisgICAgICAgICAgICAocFRhYmxlLT5LZXlUYWJsZVtpXS5QYWlyd2lzZUtleS5iS2V5VmFsaWQgPT0gVFJVRSkpIHsKKyAgICAgICAgICAgICpwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLlBhaXJ3aXNlS2V5KTsKKyAgICAgICAgICAgIHJldHVybiAoVFJVRSk7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIChGQUxTRSk7Cit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjogU2V0IEtleSB0byB0YWJsZQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBUYWJsZSAgICAgICAgICAtIFBvaW50ZXIgdG8gS2V5IHRhYmxlCisgKiAgICAgIGR3S2V5SW5kZXggICAgICAtIEtleSBpbmRleCAocmVmZXJlbmNlIHRvIE5ESVMgRERLKQorICogICAgICB1S2V5TGVuZ3RoICAgICAgLSBLZXkgbGVuZ3RoCisgKiAgICAgIEtleVJTQyAgICAgICAgICAtIEtleSBSU0MKKyAqICAgICAgcGJ5S2V5ICAgICAgICAgIC0gUG9pbnRlciB0byBrZXkKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IFRSVUUgaWYgc3VjY2VzcyBvdGhlcndpc2UgRkFMU0UKKyAqCisgKi8KK0JPT0wgS2V5YlNldERlZmF1bHRLZXkgKAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgRFdPUkQgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgVUxPTkcgICAgICAgICAgIHVLZXlMZW5ndGgsCisgICAgUFFXT1JEICAgICAgICAgIHBLZXlSU0MsCisgICAgUEJZVEUgICAgICAgICAgIHBieUtleSwKKyAgICBCWVRFICAgICAgICAgICAgYnlLZXlEZWNNb2RlLAorICAgIERXT1JEX1BUUiAgICAgICBkd0lvQmFzZSwKKyAgICBCWVRFICAgICAgICAgICAgYnlMb2NhbElECisgICAgKQoreworICAgIFVJTlQgICAgICAgIGlpOworICAgIFBTS2V5SXRlbSAgIHBLZXk7CisgICAgVUlOVCAgICAgICAgdUtleUlkeDsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRW50ZXIgS2V5YlNldERlZmF1bHRLZXk6ICUxeCwgJWQgXG4iLCAoaW50KWR3S2V5SW5kZXgsIChpbnQpdUtleUxlbmd0aCk7CisKKworICAgIGlmICgoZHdLZXlJbmRleCAmIFBBSVJXSVNFX0tFWSkgIT0gMCkgeyAgICAgICAgICAgICAgICAgIC8vIFBhaXJ3aXNlIGtleQorICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICB9IGVsc2UgaWYgKChkd0tleUluZGV4ICYgMHgwMDAwMDBGRikgPj0gTUFYX0dST1VQX0tFWSkgeworICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICB9CisKKyAgICBwVGFibGUtPktleVRhYmxlW01BWF9LRVlfVEFCTEUtMV0uYkluVXNlID0gVFJVRTsKKyAgICBmb3IoaWk9MDtpaTxVX0VUSEVSX0FERFJfTEVOO2lpKyspCisgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbTUFYX0tFWV9UQUJMRS0xXS5hYnlCU1NJRFtpaV0gPSAweEZGOworCisgICAgLy8gR3Jvd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FVMT05HICAgICAgICAgICB1S2V5TGVuZ3RoLAorICAgIFBRV09SRCAgICAgICAgICBwS2V5UlNDLAorICAgIFBCWVRFICAgICAgICAgICBwYnlLZXksCisgICAgQllURSAgICAgICAgICAgIGJ5S2V5RGVjTW9kZSwKKyAgICBEV09SRF9QVFIgICAgICAgZHdJb0Jhc2UsCisgICAgQllURSAgICAgICAgICAgIGJ5TG9jYWxJRAorICAgICkKK3sKKyAgICBpbnQgICAgICAgICBpOworICAgIFVJTlQgICAgICAgIGlpOworICAgIFBTS2V5SXRlbSAgIHBLZXk7CisgICAgVUlOVCAgICAgICAgdUtleUlkeDsKKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRW50ZXIgS2V5YlNldEFsbEdyb3VwS2V5OiAlbFhcbiIsIGR3S2V5SW5kZXgpOworCisKKyAgICBpZiAoKGR3S2V5SW5kZXggJiBQQUlSV0lTRV9LRVkpICE9IDApIHsgICAgICAgICAgICAgICAgICAvLyBQYWlyd2lzZSBrZXkKKyAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgfSBlbHNlIGlmICgoZHdLZXlJbmRleCAmIDB4MDAwMDAwRkYpID49IE1BWF9HUk9VUF9LRVkpIHsKKyAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgfQorCisgICAgZm9yIChpPTA7IGkgPCBNQVhfS0VZX1RBQkxFLTE7IGkrKykgeworICAgICAgICBpZiAocFRhYmxlLT5LZXlUYWJsZVtpXS5iSW5Vc2UgPT0gVFJVRSkgeworICAgICAgICAgICAgLy8gZm91bmQgdGFibGUgYWxyZWFkeSBleGlzdAorICAgICAgICAgICAgLy8gR3JvdXAga2V5CisgICAgICAgICAgICBwS2V5ID0gJihwVGFibGUtPktleVRhYmxlW2ldLkdyb3VwS2V5W2R3S2V5SW5kZXggJiAweDAwMDAwMEZGXSk7CisgICAgICAgICAgICBpZiAoKGR3S2V5SW5kZXggJiBUUkFOU01JVF9LRVkpICE9IDApICB7CisgICAgICAgICAgICAgICAgLy8gR3JvdXAgdHJhbnNtaXQga2V5CisgICAgICAgICAgICAgICAgcFRhYmxlLT5LZXlUYWJsZVtpXS5kd0dUS2V5SW5kZXggPSBkd0tleUluZGV4OworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iR3JvdXAgdHJhbnNtaXQga2V5KFIpWyVsWF06ICVkXG4iLCBwVGFibGUtPktleVRhYmxlW2ldLmR3R1RLZXlJbmRleCwgaSk7CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCAmPSAweEZGMEY7ICAgICAgICAgIC8vIGNsZWFyIGdyb3VwIGtleSBjb250cm9sIGZpbGVkCisgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLndLZXlDdGwgfD0gKGJ5S2V5RGVjTW9kZSA8PCA0KTsKKyAgICAgICAgICAgIHBUYWJsZS0+S2V5VGFibGVbaV0ud0tleUN0bCB8PSAweDAwNDA7ICAgICAgICAgIC8vIHVzZSBncm91cCBrZXkgZm9yIGdyb3VwIGFkZHJlc3MKKyAgICAgICAgICAgIHVLZXlJZHggPSAoZHdLZXlJbmRleCAmIDB4MDAwMDAwRkYpOworCisgICAgICAgICAgICBwVGFibGUtPktleVRhYmxlW2ldLndLZXlDdGwgfD0gMHg4MDAwOyAgICAgICAgICAgICAgLy8gZW5hYmxlIG9uLWZseQorCisgICAgICAgICAgICBwS2V5LT5iS2V5VmFsaWQgPSBUUlVFOworICAgICAgICAgICAgcEtleS0+dUtleUxlbmd0aCA9IHVLZXlMZW5ndGg7CisgICAgICAgICAgICBwS2V5LT5kd0tleUluZGV4ID0gZHdLZXlJbmRleDsKKyAgICAgICAgICAgIHBLZXktPmJ5Q2lwaGVyU3VpdGUgPSBieUtleURlY01vZGU7CisgICAgICAgICAgICBNRU12Q29weShwS2V5LT5hYnlLZXksIHBieUtleSwgdUtleUxlbmd0aCk7CisgICAgICAgICAgICBpZiAoYnlLZXlEZWNNb2RlID09IEtFWV9DVExfV0VQKSB7CisgICAgICAgICAgICAgICAgaWYgKHVLZXlMZW5ndGggPT0gV0xBTl9XRVA0MF9LRVlMRU4pCisgICAgICAgICAgICAgICAgICAgIHBLZXktPmFieUtleVsxNV0gJj0gMHg3RjsKKyAgICAgICAgICAgICAgICBpZiAodUtleUxlbmd0aCA9PSBXTEFOX1dFUDEwNF9LRVlMRU4pCisgICAgICAgICAgICAgICAgICAgIHBLZXktPmFieUtleVsxNV0gfD0gMHg4MDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIE1BQ3ZTZXRLZXlFbnRyeShkd0lvQmFzZSwgcFRhYmxlLT5LZXlUYWJsZVtpXS53S2V5Q3RsLCBpLCB1S2V5SWR4LCBwVGFibGUtPktleVRhYmxlW2ldLmFieUJTU0lELCAoUERXT1JEKXBLZXktPmFieUtleSwgYnlMb2NhbElEKTsKKworICAgICAgICAgICAgaWYgKChkd0tleUluZGV4ICYgVVNFX0tFWVJTQykgPT0gMCkgeworICAgICAgICAgICAgICAgIC8vIFJTQyBzZXQgYnkgTklDCisgICAgICAgICAgICAgICAgWkVST19NRU1PUlkoJihwS2V5LT5LZXlSU0MpLCBzaXplb2YoUVdPUkQpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIE1FTXZDb3B5KCYocEtleS0+S2V5UlNDKSwgcEtleVJTQywgIHNpemVvZihRV09SRCkpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcEtleS0+ZHdUU0M0N18xNiA9IDA7CisgICAgICAgICAgICBwS2V5LT53VFNDMTVfMCA9IDA7CisKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iS2V5YlNldEtleShSKTogXG4iKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQl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5TTUlUX0tFWSAgICAgICAgMHg4MDAwMDAwMAorCisjZGVmaW5lIEdST1VQX0tFWSAgICAgICAgICAgMHgwMDAwMDAwMAorCisjZGVmaW5lIEtFWV9DVExfV0VQICAgICAgICAgMHgwMAorI2RlZmluZSBLRVlfQ1RMX05PTkUgICAgICAgIDB4MDEKKyNkZWZpbmUgS0VZX0NUTF9US0lQICAgICAgICAweDAyCisjZGVmaW5lIEtFWV9DVExfQ0NNUCAgICAgICAgMHgwMworI2RlZmluZSBLRVlfQ1RMX0lOVkFMSUQgICAgIDB4RkYKKworCit0eXBlZGVmIHN0cnVjdCB0YWdTS2V5SXRlbQoreworICAgIEJPT0wgICAgICAgIGJLZXlWYWxpZDsKKyAgICBVTE9ORyAgICAgICB1S2V5TGVuZ3RoOworICAgIEJZVEUgICAgICAgIGFieUtleVtNQVhfS0VZX0xFTl07CisgICAgUVdPUkQgICAgICAgS2V5UlNDOworICAgIERXT1JEICAgICAgIGR3VFNDNDdfMTY7CisgICAgV09SRCAgICAgICAgd1RTQzE1XzA7CisgICAgQllURSAgICAgICAgYnlDaXBoZXJTdWl0ZTsKKyAgICBCWVRFICAgICAgICBieVJlc2VydmVkMDsKKyAgICBEV09SRCAgICAgICBkd0tleUluZGV4OworICAgIFBWT0lEICAgICAgIHB2S2V5VGFibGU7Cit9IFNLZXlJdGVtLCBERUYqIFBTS2V5SXRlbTsgLy82NAorCit0eXBlZGVmIHN0cnVjdCB0YWdTS2V5VGFibGUKK3sKKyAgICBCWVRFICAgICAgICBhYnlCU1NJRFtVX0VUSEVSX0FERFJfTEVOXTsgIC8vNgorICAgIEJZVEUgICAgICAgIGJ5UmVzZXJ2ZWQwWzJdOyAgICAgICAgICAgICAgLy84CisgICAgU0tleUl0ZW0gICAgUGFpcndpc2VLZXk7CisgICAgU0tleUl0ZW0gICAgR3JvdXBLZXlbTUFYX0dST1VQX0tFWV07IC8vNjQqNSA9IDMyMCwgMzIwKzg9MzI4CisgICAgRFdPUkQgICAgICAgZ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LS0tLS0tLS0tLSovCisjaWZkZWYgX19jcGx1c3BsdXMKK2V4dGVybiAiQyIgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBBc3N1bWUgQyBkZWNsYXJhdGlvbnMgZm9yIEMrKyAqLworI2VuZGlmIC8qIF9fY3BsdXNwbHVzICovCisKK1ZPSUQgS2V5dkluaXRUYWJsZShQU0tleU1hbmFnZW1lbnQgcFRhYmxlLCBEV09SRF9QVFIgZHdJb0Jhc2UpOworCitCT09MIEtleWJHZXRLZXkoCisgICAgSU4gIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgSU4gIFBCWVRFICAgICAgICAgICBwYnlCU1NJRCwKKyAgICBJTiAgRFdPUkQgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgT1VUIFBTS2V5SXRlbSAgICAgICAqcEtleQorICAgICk7CisKK0JPT0wgS2V5YlNldEtleSgKKyAgICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIFBCWVRFICAgICAgICAgICBwYnlCU1NJRCwKKyAgICBEV09SRCAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICBVTE9ORyAgICAgICAgICAgdUtleUxlbmd0aCwKKyAgICBQUVdPUkQgICAgICAgICAgcEtleVJTQywKKyAgICBQQllURSAgICAgICAgICAgcGJ5S2V5LAorICAgIEJZVEUgICAgICAgICAgICBieUtleURlY01vZGUsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlLAorICAgIEJZVEUgICAgICAgICAgICBieUxvY2FsSUQKKyAgICApOworCitCT09MIEtleWJTZXREZWZhdWx0S2V5KAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgRFdPUkQgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgVUxPTkcgICAgICAgICAgIHVLZXlMZW5ndGgsCisgICAgUFFXT1JEICAgICAgICAgIHBLZXlSU0MsCisgICAgUEJZVEUgICAgICAgICAgIHBieUtleSwKKyAgICBCWVRFICAgICAgICAgICAgYnlLZXlEZWNNb2RlLAorICAgIERXT1JEX1BUUiAgICAgICBkd0lvQmFzZSwKKyAgICBCWVRFICAgICAgICAgICAgYnlMb2NhbElECisgICAgKTsKKworQk9PTCBLZXliUmVtb3ZlS2V5KAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgUEJZVEUgICAgICAgICAgIHBieUJTU0lELAorICAgIERXT1JEICAgICAgICAgICBkd0tleUluZGV4LAorICAgIERXT1JEX1BUUiAgICAgICBkd0lvQmFzZQorICAgICk7CisKK0JPT0wgS2V5YkdldFRyYW5zbWl0S2V5KAorICAgIElOICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIElOICBQQllURSAgICAgICAgICAgcGJ5QlNTSUQsCisgICAgSU4gIERXT1JEICAgICAgICAgICBkd0tleVR5cGUsCisgICAgT1VUIFBTS2V5SXRlbSAgICAgICAqcEtleQorICAgICk7CisKK0JPT0wgS2V5YkNoZWNrUGFpcmV3aXNlS2V5KAorICAgIElOICBQU0tleU1hbmFnZW1lbnQgcFRhYmxlLAorICAgIE9VVCBQU0tleUl0ZW0gICAgICAgKnBLZXkKKyAgICApOworCitCT09MIEtleWJSZW1vdmVBbGxLZXkoCisgICAgUFNLZXlNYW5hZ2VtZW50IHBUYWJsZSwKKyAgICBQQllURSAgICAgICAgICAgcGJ5QlNTSUQsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlCisgICAgKTsKKworVk9JRCBLZXl2UmVtb3ZlV0VQS2V5KAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgRFdPUkQgICAgICAgICAgIGR3S2V5SW5kZXgsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlCisgICAgKTsKKworVk9JRCBLZXl2UmVtb3ZlQWxsV0VQS2V5KAorICAgIFBTS2V5TWFuYWdlbWVudCBwVGFibGUsCisgICAgRFdPUkRfUFRSICAgICAgIGR3SW9CYXNlCisgICAgKTsKKworQk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ICBWTlN2T3V0UG9ydEIoZHdJb0Jhc2UgKyBNQUNfUkVHX0ZDUjAsIGJ5T3JnVmFsdWUpOworfQorCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIEdldCBEbWEgTGVuZ3RoCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgLSBCYXNlIEFkZHJlc3MgZm9yIE1BQworICogIE91dDoKKyAqICAgICAgcGJ5RG1hTGVuZ3RoLSBEbWEgTGVuZ3RoIFZhbHVlIEdldAorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLwordm9pZCBNQUN2R2V0RG1hTGVuZ3RoIChEV09SRF9QVFIgZHdJb0Jhc2UsIFBCWVRFIHBieURtYUxlbmd0aCkKK3sKKyAgICAvLyBnZXQgRkNSMAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19GQ1IwLCBwYnlEbWFMZW5ndGgpOworICAgICpwYnlEbWFMZW5ndGggJj0gMHgwMzsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBTZXQgODAyLjExIFNob3J0IFJldHJ5IExpbWl0CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgLSBCYXNlIEFkZHJlc3MgZm9yIE1BQworICogICAgICBieVJldHJ5TGltaXQtIFJldHJ5IExpbWl0CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIE1BQ3ZTZXRTaG9ydFJldHJ5TGltaXQgKERXT1JEX1BUUiBkd0lvQmFzZSwgQllURSBieVJldHJ5TGltaXQpCit7CisgICAgLy8gc2V0IFNSVAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfU1JULCBieVJldHJ5TGltaXQpOworfQorCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIEdldCA4MD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ZSAgICAtIEJhc2UgQWRkcmVzcyBmb3IgTUFDCisgKiAgT3V0OgorICogICAgICBwYnlDeHRCdWYgICAtIENvbnRleHQgYnVmZmVyCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIE1BQ3ZTYXZlQ29udGV4dCAoRFdPUkRfUFRSIGR3SW9CYXNlLCBQQllURSBwYnlDeHRCdWYpCit7CisgICAgaW50ICAgICAgICAgaWk7CisKKyAgICAvLyByZWFkIHBhZ2UwIHJlZ2lzdGVyCisgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFDX01BWF9DT05URVhUX1NJWkVfUEFHRTA7IGlpKyspIHsKKyAgICAgICAgVk5TdkluUG9ydEIoKGR3SW9CYXNlICsgaWkpLCAocGJ5Q3h0QnVmICsgaWkpKTsKKyAgICB9CisKKyAgICBNQUN2U2VsZWN0UGFnZTEoZHdJb0Jhc2UpOworCisgICAgLy8gcmVhZCBwYWdlMSByZWdpc3RlcgorICAgIGZvciAoaWkgPSAwOyBpaSA8IE1BQ19NQVhfQ09OVEVYVF9TSVpFX1BBR0UxOyBpaSsrKSB7CisgICAgICAgIFZOU3ZJblBvcnRCKChkd0lvQmFzZSArIGlpKSwgKHBieUN4dEJ1ZiArIE1BQ19NQVhfQ09OVEVYVF9TSVpFX1BBR0UwICsgaWkpKTsKKyAgICB9CisKKyAgICBNQUN2U2VsZWN0UGFnZTAoZHdJb0Jhc2UpOworfQorCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIFJlc3RvcmUgTUFDIHJlZ2lzdGVycyBmcm9tIGNvbnRleHQgYnVmZmVyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgLSBCYXNlIEFkZHJlc3MgZm9yIE1BQworICogICAgICBwYnlDeHRCdWYgICAtIENvbnRleHQgYnVmZmVyCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovC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09SRCBkd0N1cnJEZXNjQWRkcikKK3sKK1dPUkQgICAgd3c7CitCWVRFICAgIGJ5RGF0YTsKK0JZVEUgICAgYnlPcmdETUFDdGw7CisKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFDVEwxLCAmYnlPcmdETUFDdGwpOworICAgIGlmIChCSVRiSXNBbGxCaXRzT24oYnlPcmdETUFDdGwsIERNQUNUTF9SVU4pKSB7CisgICAgICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFDVEwxKzIsIERNQUNUTF9SVU4pOworICAgIH0KKyAgICBmb3IgKHd3ID0gMDsgd3cgPCBXX01BWF9USU1FT1VUOyB3dysrKSB7CisgICAgICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19SWERNQUNUTDEsICZieURhdGEpOworICAgICAgICBpZiAoQklUYklzQWxsQml0c09mZihieURhdGEsIERNQUNUTF9SVU4pKQorICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIGlmICh3dyA9PSBXX01BWF9USU1FT1VUKSB7CisgICAgICAgIERCR19QT1JUODAoMHgxNCk7CisgICAgfQorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFQVFIxLCBkd0N1cnJEZXNjQWRkcik7CisgICAgaWYgKEJJVGJJc0FsbEJpdHNPbihieU9yZ0RNQUN0bCwgRE1BQ1RMX1JVTikpIHsKKyAgICAgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19SWERNQUNUTDEsIERNQUNUTF9SVU4pOworICAgIH0KK30KKworLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBTZXQgdGhlIGNoaXAgd2l0aCBjdXJyZW50IHR4MCBkZXNjcmlwdG9yIGFkZHJlc3MKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBkd0lvQmFzZSAgICAgICAgLSBCYX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DU1JfTkFDSyAgICAgICAgIDB4MDIKKyNkZWZpbmUgSTJNQ1NSX0RPTkUgICAgICAgICAweDAxCisKKy8vCisvLyBCaXRzIGluIHRoZSBQTUMxIHJlZ2lzdGVyCisvLworI2RlZmluZSBTUFNfUlNUICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgUENJU1RJS1kgICAgICAgICAgICAweDQwCisjZGVmaW5lIFBNRV9PVlIgICAgICAgICAgICAgMHgwMgorCisvLworLy8gQml0cyBpbiB0aGUgU1RJQ0tZSFcgcmVnaXN0ZXIKKy8vCisjZGVmaW5lIFNUSUNLSFdfRFMxX1NIQURPVyAgMHgwMgorI2RlZmluZSBTVElDS0hXX0RTMF9TSEFET1cgIDB4MDEKKworLy8KKy8vIEJpdHMgaW4gdGhlIFRNQ1RMIHJlZ2lzdGVyCisvLworI2RlZmluZSBUTUNUTF9UU1VTUCAgICAgICAgIDB4MDQKKyNkZWZpbmUgVE1DVExfVE1EICAgICAgICAgICAweDAyCisjZGVmaW5lIFRNQ1RMX1RFICAgICAgICAgICAgMHgwMQorCisvLworLy8gQml0cyBpbiB0aGUgVEZUQ1RMIHJlZ2lzdGVyCisvLworI2RlZmluZSBURlRDVExfSFdVVFNGICAgICAgIDB4ODAgICAgICAgIC8vCisjZGVmaW5lIFRGVENUTF9UQlRUU1lOQyAgICAgMHg0MAorI2RlZmluZSBURlRDVExfSFdVVFNGRU4gICAgIDB4MjAKKyNkZWZpbmUgVEZUQ1RMX1RTRkNOVFJSRCAgICAweDEwICAgICAgICAvLworI2RlZmluZSBURlRDVExfVEJUVFNZTkNFTiAgIDB4MDggICAgICAgIC8vCisjZGVmaW5lIFRGVENUTF9UU0ZTWU5DRU4gICAgMHgwNCAgICAgICAgLy8KKyNkZWZpbmUgVEZUQ1RMX1RTRkNOVFJTVCAgICAweDAyICAgICAgICAvLworI2RlZmluZSBURlRDVExfVFNGQ05UUkVOICAgIDB4MDEgICAgICAgIC8vCisKKy8vCisvLyBCaXRzIGluIH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5lIEVuQ0ZHX0JCVHlwZV9hICAgICAgMHgwMDAwMDAwMAorCisvLworLy8gQml0cyBpbiB0aGUgUGFnZTFTZWwgcmVnaXN0ZXIKKy8vCisjZGVmaW5lIFBBR0UxX1NFTCAgICAgICAgICAgMHgwMQorCisvLworLy8gQml0cyBpbiB0aGUgQ0ZHIHJlZ2lzdGVyCisvLworI2RlZmluZSBDRkdfVEtJUE9QVCAgICAgICAgIDB4ODAKKyNkZWZpbmUgQ0ZHX1JYRE1BT1BUICAgICAgICAweDQwCisjZGVmaW5lIENGR19UTU9UX1NXICAgICAgICAgMHgyMAorI2RlZmluZSBDRkdfVE1PVF9IV0xPTkcgICAgIDB4MTAKKyNkZWZpbmUgQ0ZHX1RNT1RfSFcgICAgICAgICAweDAwCisjZGVmaW5lIENGR19DRlBFTkRPUFQgICAgICAgMHgwOAorI2RlZmluZSBDRkdfQkNOU1VTRU4gICAgICAgIDB4MDQKKyNkZWZpbmUgQ0ZHX05PVFhUSU1FT1VUICAgICAweDAyCisjZGVmaW5lIENGR19OT0JVRk9QVCAgICAgICAgMHgwMQorCisvLworLy8gQml0cyBpbiB0aGUgVEVTVCByZWdpc3RlcgorLy8KKyNkZWZpbmUgVEVTVF9MQkVYVCAgICAgICAgICAweDgwICAgICAgICAvLworI2RlZmluZSBURVNUX0xCSU5UICAgICAgICAgIDB4NDAgICAgICAgIC8vCisjZGVmaW5lIFRFU1RfTEJOT05FICAgICAgICAgMHgwMCAgICAgICAgLy8KKyNkZWZpbmUgVEVTVF9TT0ZUSU5UICAgICAgICAweDIwICAgICAgICAvLworI2RlZmluZSBURVNUX0NPTlRUWCAgICAgICAgIDB4MTAgICAgICAgIC8vCisjZGVmaW5lIFRFU1RfVFhQRSAgICAgICAgICAgMHgwOCAgICAgICAgLy8KKyNkZWZpbmUgVEVTVF9OQVZESVMgICAgICAgICAweDA0ICAgICAgICAvLworI2RlZmluZSBURVNUX05PQ1RTICAgICAgICAgIDB4MDIgICAgICAgIC8vCisjZGVmaW5lIFRFU1RfTk9BQ0sgICAgICAgICAgMHgwMSAgICAgICAgLy8KKworLy8KKy8vIEJpdHMgaW4gdGhlIEhPU1RDUiByZWdpc3RlcgorLy8KKyNkZWZpbmUgSE9TVENSX1RYT05TVCAgICAgICAweDgwICAgICAgICAvLworI2RlZmluZSBIT1NUQ1JfUlhPTlNUICAgICAgIDB4NDAgICAgICAgIC8vCisjZGVmaW5lIEhPU1RDUl9BREhPQyAgICAgICAgMHgyMCAgICAgICAgLy8gTmV0d29yayBUeXBlIDEgPSBBZC1ob2MKKyNkZWZpbmUgSE9TVENSX0FQICAgICAgICAgICAweDEwICAgICAgICAvLyBQb3J0IFR5cGUgMSA9IEFQCisjZGVmaW5lIEhPU1RDUl9UWE9OICAgICAgICAgMHgwOCAgICAgICAgLy8wMDAwIDEwMDAKKyNkZWZpbmUgSE9TVENSX1JYT04gICAgICAgICAweDA0ICAgICAgICAvLzAwMDAgMDEwMAorI2RlZmluZSBIT1NUQ1JfTUFDRU4gICAgICAgIDB4MDIgICAgICAgIC8vMDAwMCAwMDEwCisjZGVmaW5lIEhPU1RDUl9TT0ZUUlNUICAgICAgMHgwMSAgICAgICAgLy8wMDAwIDAwMDEKKworLy8KKy8vIEJpdHMgaW4gdGhlIE1BQ0NSIHJlZ2lzdGVyCisvLworI2RlZmluZSBNQUNDUl9TWU5DRkxVU0hPSyAgIDB4MDQgICAgICAgIC8vCisjZGVmaW5lIE1BQ0NSX1NZTkNGTFVTSCAgICAgMHgwMiAgICAgICAgLy8KKyNkZWZpbmUgTUFDQ1JfQ0xSTkFWICAgICAgICAweDAxICAgICAgICAvLworCisvLyBCaXRzIGluIHRoZSBNQUNfUkVHX0dQSU9DVEwwIHJlZ2lzdGVyCisvLworI2RlZmluZSBMRURfQUNUU0VUICAgICAgICAgICAweDAxICAgICAgICAvLworI2RlZmluZSBMRURfUkZPRkYgICAgICAgICAgICAweDAyICAgICAgICAvLworI2RlZmluZSBMRURfTk9DT05ORUNUICAgICAgICAweDA0ICAgICAgICAvLworLy8KKy8vIEJpdHMgaW4gdGhlIFJDUiByZWdpc3RlcgorLy8KKyNkZWZpbmUgUkNSX1NTSUQgICAgICAgICAgICAweDgwCisjZGVmaW5lIFJDUl9SWEFMTFRZUEUgICAgICAgMHg0MCAgICAgICAgLy8KKyNkZWZpbmUgUkNSX1VOSUNBU1QgICAgICAgICAweDIwICAgICAgICAvLworI2RlZmluZSBSQ1JfQlJPQURDQVNUICAgICAgIDB4MTAgICAgICAgIC8vCisjZGVmaW5lIFJDUl9NVUxUSUNBU1QgICAgICAgMHgwOCAgICAgICAgLy8KKyNkZWZpbmUgUkNSX1dQQUVSUiAgICAgICAgICAweDA0ICAgICAgICAvLworI2RlZmluZSBSQ1JfRVJSQ1JDICAgICAgICAgIDB4MDIgICAgICAgIC8vCisjZGVmaW5lIFJDUl9CU1NJRCAgICAgICAgICAgMHgwMSAgICAgICAgLy8KKworLy8KKy8vIEJpdHMgaW4gdGhlIFRDUiByZWdpc3RlcgorLy8KKyNkZWZpbmUgVENSX1NZTkNEQ0ZPUFQgICAgICAweDAyICAgICAgICAvLworI2RlZmluZSBUQ1JfQVVUT0JDTlRYICAgICAgIDB4MDEgICAgICAgIC8vIEJlYWNvbiBhdXRvbWF0aWNhbGx5IHRyYW5zbWl0IGVuYWJsZQorCisvLworLy8gQml0cyBpbiB0aGUgSU1SIHJlZ2lzdGVyCisvLworI2RlZmluZSBJTVJfTUVBU1VSRVNUQVJUICAgIDB4ODAwMDAwMDAgICAgICAvLworI2RlZmluZSBJTVJfUVVJRVRTVEFSVCAgICAgIDB4MjAwMDAwMDAgICAgICAvLworI2RlZmluZSBJTVJfUkFEQVJERVRFQ1QgICAgIDB4MTAwMDAwMDAgICAgICAvLworI2RlZmluZSBJTVJfTUVBU1VSRUVORCAgICAgIDB4MDgwMDAwMDAgICAgICAvLworI2RlZmluZSBJTVJfU09GVFRJTUVSMSAgICAgIDB4MDAyMDAwMDAgICAgICAvLworLy8jZGVmaW5lIEl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9GRVRBTEVSUiAgICAgICAgMHgwMDAwMDEwMCAgICAgIC8vCisjZGVmaW5lIElNUl9XQVRDSERPRyAgICAgICAgMHgwMDAwMDA4MCAgICAgIC8vCisjZGVmaW5lIElNUl9TT0ZUVElNRVIgICAgICAgMHgwMDAwMDA0MCAgICAgIC8vCisjZGVmaW5lIElNUl9HUElPICAgICAgICAgICAgMHgwMDAwMDAyMCAgICAgIC8vCisjZGVmaW5lIElNUl9UQlRUICAgICAgICAgICAgMHgwMDAwMDAxMCAgICAgIC8vCisjZGVmaW5lIElNUl9SWERNQTAgICAgICAgICAgMHgwMDAwMDAwOCAgICAgIC8vCisjZGVmaW5lIElNUl9CTlRYICAgICAgICAgICAgMHgwMDAwMDAwNCAgICAgIC8vCisjZGVmaW5lIElNUl9BQzBETUEgICAgICAgICAgMHgwMDAwMDAwMiAgICAgIC8vCisjZGVmaW5lIElNUl9UWERNQTAgICAgICAgICAgMHgwMDAwMDAwMSAgICAgIC8vCisKKworLy8KKy8vIEJpdHMgaW4gdGhlIElTUiByZWdpc3RlcgorLy8KKworI2RlZmluZSBJU1JfTUVBU1VSRVNUQVJUICAgIDB4ODAwMDAwMDAgICAgICAvLworI2RlZmluZSBJU1JfUVVJRVRTVEFSVCAgICAgIDB4MjAwMDAwMDAgICAgICAvLworI2RlZmluZSBJU1JfUkFEQVJERVRFQ1QgICAgIDB4MTAwMDAwMDAgICAgICAvLworI2RlZmluZSBJU1JfTUVBU1VSRUVORCAgICAgIDB4MDgwMDAwMDAgICAgICAvLworI2RlZmluZSBJU1JfU09GVFRJTUVSMSAgICAgIDB4MDAyMDAwMDAgICAgICAvLworLy8jZGVmaW5lIElTUl9TWU5DRkxVU0hPSyAgICAgMHgwMDEwMDAwMCAgICAgIC8vMDAwMSAwMDAwIDAwMDAgMDAwMCAwMDAwIDAwMDAKKy8vI2RlZmluZSBJU1JfQVRJTUVORCAgICAgICAgIDB4MDAwODAwMDAgICAgICAvLzAwMDAgMTAwMCAwMDAwIDAwM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ElTUl9XQVRDSERPRyAgICAgICAgMHgwMDAwMDA4MCAgICAgIC8vCisjZGVmaW5lIElTUl9TT0ZUVElNRVIgICAgICAgMHgwMDAwMDA0MCAgICAgIC8vCisjZGVmaW5lIElTUl9HUElPICAgICAgICAgICAgMHgwMDAwMDAyMCAgICAgIC8vCisjZGVmaW5lIElTUl9UQlRUICAgICAgICAgICAgMHgwMDAwMDAxMCAgICAgIC8vCisjZGVmaW5lIElTUl9SWERNQTAgICAgICAgICAgMHgwMDAwMDAwOCAgICAgIC8vCisjZGVmaW5lIElTUl9CTlRYICAgICAgICAgICAgMHgwMDAwMDAwNCAgICAgIC8vCisjZGVmaW5lIElTUl9BQzBETUEgICAgICAgICAgMHgwMDAwMDAwMiAgICAgIC8vCisjZGVmaW5lIElTUl9UWERNQTAgICAgICAgICAgMHgwMDAwMDAwMSAgICAgIC8vCisKKworLy8KKy8vIEJpdHMgaW4gdGhlIFBTQ0ZHIHJlZ2lzdGVyCisvLworI2RlZmluZSBQU0NGR19QSElMSVBNRCAgICAgIDB4NDAgICAgICAgIC8vCisjZGVmaW5lIFBTQ0ZHX1dBS0VDQUxFTiAgICAgMHgyMCAgICAgICAgLy8KKyNkZWZpbmUgUFNDRkdfV0FLRVRNUkVOICAgICAweDEwICAgICAgICAvLworI2RlZmluZSBQU0NGR19CQlBTUFJPRyAgICAgIDB4MDggICAgICAgIC8vCisjZGVmaW5lIFBTQ0ZHX1dBS0VTWU4gICAgICAgMHgwNCAgICAgICAgLy8KKyNkZWZpbmUgUFNDRkdfU0xFRVBTWU4gICAgICAweDAyICAgICAgICAvLworI2RlZmluZSBQU0NGR19BVVRPU0xFRVAgICAgIDB4MDEgICAgICAgIC8vCisKKy8vCisvLyBCaXRzIGluIHRoZSBQU0NUTCByZWdpc3RlcgorLy8KKyNkZWZpbmUgUFNDVExfV0FLRURPTkUgICAgICAweDIwICAgICAgICAvLworI2RlZmluZSBQU0NUTF9QUyAgICAgICAgICAgIDB4MTAgICAgICAgIC8vCisjZGVmaW5lIFBTQ1RMX0dPMkRPWkUgICAgICAgMHgwOCAgICAgICAgLy8KKyNkZWZpbmUgUFNDVExfTE5CQ04gICAgICAgICAweDA0ICAgICAgICAvLworI2RlZmluZSBQU0NUTF9BTEJDTiAgICAgICAgIDB4MDIgICAgICAgIC8vCisjZGVmaW5lIFBTQ1RMX1BTRU4gICAgICAgICAgMHgwMSAgICAgICAgLy8KKworLy8KKy8vIEJpdHMgaW4gdGhlIFBTUFdTSUcgcmVnaXN0ZXIKKy8vCisjZGVmaW5lIFBTU0lHX1dQRTMgICAgICAgICAgMHg4MCAgICAgICAgLy8KKyNkZWZpbmUgUFNTSUdfV1BFMiAgICAgICAgICAweDQwICAgICAgICAvLworI2RlZmluZSBQU1NJR19XUEUxICAgICAgICAgIDB4MjAgICAgICAgIC8vCisjZGVmaW5lIFBTU0lHX1dSQURJT1BFICAgICAgMHgxMCAgICAgICAgLy8KKyNkZWZpbmUgUFNTSUdfU1BFMyAgICAgICAgICAweDA4ICAgICAgICAvLworI2RlZmluZSBQU1NJR19TUEUyICAgICAgICAgIDB4MDQgICAgICAgIC8vCisjZGVmaW5lIFBTU0lHX1NQRTEgICAgICAgICAgMHgwMiAgICAgICAgLy8KKyNkZWZpbmUgUFNTSUdfU1JBRElPUEUgICAgICAweDAxICAgICAgICAvLworCisvLworLy8gQml0cyBpbiB0aGUgQkJSRUdDVEwgcmVnaXN0ZXIKKy8vCisjZGVmaW5lIEJCUkVHQ1RMX0RPTkUgICAgICAgMHgwNCAgICAgICAgLy8KKyNkZWZpbmUgQkJSRUdDVExfUkVHUiAgICAgICAweDAyICAgICAgICAvLworI2RlZmluZSBCQlJFR0NUTF9SRUdXICAgICAgIDB4MDEgICAgICAgIC8vCisKKy8vCisvLyBCaXRzIGluIHRoZSBJRlJFR0NUTCByZWdpc3RlcgorLy8KKyNkZWZpbmUgSUZSRUdDVExfRE9ORSAgICAgICAweDA0ICAgICAgICAvLworI2RlZmluZSBJRlJFR0NUTF9JR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X0NSQyAgICAgIDB4MDIKKyNkZWZpbmUgUEtUX1RZUEVfQlNTSUQgICAgICAgICAgMHgwMQorCisjZGVmaW5lIERlZmF1bHRfQkkgICAgICAgICAgICAgIDB4MjAwCisKKworLy8gTWlzY0ZJRk8gT2Zmc2V0CisjZGVmaW5lIE1JU0NGSUZPX0tFWUVUUlkwICAgICAgIDMyCisjZGVmaW5lIE1JU0NGSUZPX0tFWUVOVFJZU0laRSAgIDIyCisjZGVmaW5lIE1JU0NGSUZPX1NZTklORk9fSURYICAgIDEwCisjZGVmaW5lIE1JU0NGSUZPX1NZTkRBVEFfSURYICAgIDExCisjZGVmaW5lIE1JU0NGSUZPX1NZTkRBVEFTSVpFICAgIDIxCisKKy8vIGVuYWJsZWQgbWFzayB2YWx1ZSBvZiBpcnEKKyNkZWZpbmUgSU1SX01BU0tfVkFMVUUgICAgIChJTVJfU09GVFRJTUVSMSB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVJfUlhETUExIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIElNUl9SWE5PQlVGIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIElNUl9NSUJORUFSRlVMTCB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVJfU09GVElOVCB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVJfRkVUQUxFUlIgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU1SX1dBVENIRE9HIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIElNUl9TT0ZUVElNRVIgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU1SX0dQSU8gfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU1SX1RCVFQgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU1SX1JYRE1BMCB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVJfQk5UWCB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVJfQUMwRE1BIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIElNUl9UWERNQTApCisKKy8vIG1heCB0aW1lIG91dCBkZWxheSB0aW1lCisjZGVmaW5lIFdfTUFYX1RJTUVPVVQgICAgICAgMHhGRkYwVSAgICAgLy8KKworLy8gd2FpdCB0aW1lIHdpdGhpbiBsb29wCisjZGVmaW5lIENCX0RFTEFZX0xPT1BfV0FJVCAgMTAgICAgICAgICAgLy8gMTBtcworCisvLworLy8gcmV2aXNpb24gaWQKKy8vCisjZGVmaW5lIFJFVl9JRF9WVDMyNTNfQTAgICAgMHgwMAorI2RlZmluZSBSRVZfSURfVlQzMjUzX0ExICAgIDB4MDEKKyNkZWZpbmUgUkVWX0lEX1ZUMzI1M19CMCAgICAweDA4CisjZGVmaW5lIFJFVl9JRF9WVDMyNTNfQjEgICAgMHgwOQorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFR5cGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IE1hY3JvcyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIE1BQ3ZSZWdCaXRzT24oZHdJb0Jhc2UsIGJ5UmVnT2ZzLCBieUJpdHMpICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgQllURSBieURhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEIoZHdJb0Jhc2UgKyBieVJlZ09mcywgJmJ5RGF0YSk7ICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgYnlSZWdPZnMsIGJ5RGF0YSB8IChieUJpdHMpKTsgICBcCit9CisKKyNkZWZpbmUgTUFDdldvcmRSZWdCaXRzT24oZHdJb0Jhc2UsIGJ5UmVnT2ZzLCB3Qml0cykgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBXT1JEIHdEYXRhOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Vyhkd0lvQmFzZSArIGJ5UmVnT2ZzLCAmd0RhdGEpOyAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydFcoZHdJb0Jhc2UgKyBieVJlZ09mcywgd0RhdGEgfCAod0JpdHMpKTsgICAgIFwKK30KKworI2RlZmluZSBNQUN2RFdvcmRSZWdCaXRzT24oZHdJb0Jhc2UsIGJ5UmVnT2ZzLCBkd0JpdHMpICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgYnlSZWdPZnMsICZkd0RhdGEpOyAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIGJ5UmVnT2ZzLCBkd0RhdGEgfCAoZHdCaXRzKSk7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZSZWdCaXRzT25FeChkd0lvQmFzZSwgYnlSZWdPZnMsIGJ5TWFzaywgYnlCaXRzKSBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgQllURSBieURhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEIoZHdJb0Jhc2UgKyBieVJlZ09mcywgJmJ5RGF0YSk7ICAgICAgICAgICAgICBcCisgICAgYnlEYXRhICY9IGJ5TWFzazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgYnlSZWdPZnMsIGJ5RGF0YSB8IChieUJpdHMpKTsgICBcCit9CisKKyNkZWZpbmUgTUFDdlJlZ0JpdHNPZmYoZHdJb0Jhc2UsIGJ5UmVnT2ZzLCBieUJpdHMpICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBCWVRFIGJ5RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIGJ5UmVnT2ZzLCAmYnlEYXRhKTsgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEIoZHdJb0Jhc2UgKyBieVJlZ09mcywgYnlEYXRhICYgfihieUJpdHMpKTsgIFwKK30KKworI2RlZmluZSBNQUN2V29yZFJlZ0JpdHNPZmYoZHdJb0Jhc2UsIGJ5UmVnT2ZzLCB3Qml0cykgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFdPUkQgd0RhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRXKGR3SW9CYXNlICsgYnlSZWdPZnMsICZ3RGF0YSk7ICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Vyhkd0lvQmFzZSArIGJ5UmVnT2ZzLCB3RGF0YSAmIH4od0JpdHMpKTsgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZEV29yZFJlZ0JpdHNPZmYoZHdJb0Jhc2UsIGJ5UmVnT2ZzLCBkd0JpdHMpICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgRFdPUkQgZHdEYXRhOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBieVJlZ09mcywgJmR3RGF0YSk7ICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgYnlSZWdPZnMsIGR3RGF0YSAmIH4oZHdCaXRzKSk7ICBcCit9CisKKyNkZWZpbmUgTUFDdkdldEN1cnJSeDBEZXNjQWRkcihkd0lvQmFzZSwgcGR3Q3VyckRlc2NBZGRyKSAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BUFRSMCwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKFBEV09SRClwZHdDdXJyRGVzY0FkZHIpOyAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdkdldEN1cnJSeDFEZXNjQWRkcihkd0lvQmFzZSwgcGR3Q3VyckRlc2NBZGRyKSAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFQVFIxLCAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAoUERXT1JEKXBkd0N1cnJEZXNjQWRkcik7ICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBNQUN2R2V0Q3VyclR4MERlc2NBZGRyKGR3SW9CYXNlLCBwZHdDdXJyRGVzY0FkZHIpICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19UWERNQVBUUjAsICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIChQRFdPUkQpcGR3Q3VyckRlc2NBZGRyKTsgICAgICAgICAgICAgICAgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZHZXRDdXJyQUMwRGVzY0FkZHIoZHdJb0Jhc2UsIHBkd0N1cnJEZXNjQWRkcikgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0FDMERNQVBUUiwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKFBEV09SRClwZHdDdXJyRGVzY0FkZHIpOyAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdkdldEN1cnJTeW5jRGVzY0FkZHIoZHdJb0Jhc2UsIHBkd0N1cnJEZXNjQWRkcikgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfU1lOQ0RNQVBUUiwgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAoUERXT1JEKXBkd0N1cnJEZXNjQWRkcik7ICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBNQUN2R2V0Q3VyckFUSU1EZXNjQWRkcihkd0lvQmFzZSwgcGR3Q3VyckRlc2NBZGRyKSAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19BVElNRE1BUFRSLCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIChQRFdPUkQpcGR3Q3VyckRlc2NBZGRyKTsgICAgICAgICAgICAgICAgICAgXAorfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCisvLyBzZXQgdGhlIGNoaXAgd2l0aCBjdXJyZW50IEJDTiB0eCBkZXNjcmlwdG9yIGFkZHJlc3MKKyNkZWZpbmUgTUFDdlNldEN1cnJCQ05UeERlc2NBZGRyKGR3SW9CYXNlLCBkd0N1cnJEZXNjQWRkcikgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0JDTkRNQVBUUiwgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAgZHdDdXJyRGVzY0FkZHIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworLy8gc2V0IHRoZSBjaGlwIHdpdGggY3VycmVudCBCQ04gbGVuZ3RoCisjZGVmaW5lIE1BQ3ZTZXRDdXJyQkNOTGVuZ3RoKGR3SW9CYXNlLCB3Q3VyckJDTkxlbmd0aCkgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Vyhkd0lvQmFzZSArIE1BQ19SRUdfQkNORE1BQ1RMKzIsICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgIHdDdXJyQkNOTGVuZ3RoKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBNQUN2UmVhZEJTU0lEQWRkcmVzcyhkd0lvQmFzZSwgcGJ5RXRoZXJBZGRyKSAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFHRTFTRUwsIDEpOyAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAsICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIChQQllURSlwYnlFdGhlckFkZHIpOyAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAxLCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHBieUV0aGVyQWRkciArIDEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAyLCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHBieUV0aGVyQWRkciArIDIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAzLCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHBieUV0aGVyQWRkciArIDMpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyA0LCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHBieUV0aGVyQWRkciArIDQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyA1LCAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHBieUV0aGVyQWRkciArIDUpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFHRTFTRUwsIDApOyAgICAgICAgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZXcml0ZUJTU0lEQWRkcmVzcyhkd0lvQmFzZSwgcGJ5RXRoZXJBZGRyKSAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQUdFMVNFTCwgMSk7ICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAsICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAxLCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAxKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAyLCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAyKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyAzLCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAzKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyA0LCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyA0KSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19CU1NJRDAgKyA1LCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyA1KSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQUdFMVNFTCwgMCk7ICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlJlYWRFdGhlckFkZHJlc3MoZHdJb0Jhc2UsIHBieUV0aGVyQWRkcikgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEIoZHdJb0Jhc2UgKyBNQUNfUkVHX1BBR0UxU0VMLCAxKTsgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCwgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAoUEJZVEUpcGJ5RXRoZXJBZGRyKTsgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCArIDEsICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwYnlFdGhlckFkZHIgKyAxKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCArIDIsICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwYnlFdGhlckFkZHIgKyAyKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCArIDMsICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwYnlFdGhlckFkZHIgKyAzKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCArIDQsICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwYnlFdGhlckFkZHIgKyA0KTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFSMCArIDUsICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwYnlFdGhlckFkZHIgKyA1KTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEIoZHdJb0Jhc2UgKyBNQUNfUkVHX1BBR0UxU0VMLCAwKTsgICAgICAgICAgIFwKK30KKworCisjZGVmaW5lIE1BQ3ZXcml0ZUV0aGVyQWRkcmVzcyhkd0lvQmFzZSwgcGJ5RXRoZXJBZGRyKSAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQUdFMVNFTCwgMSk7ICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwLCAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKnBieUV0aGVyQWRkcik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwICsgMSwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAxKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwICsgMiwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAyKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwICsgMywgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyAzKSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwICsgNCwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyA0KSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQVIwICsgNSwgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgKihwYnlFdGhlckFkZHIgKyA1KSk7ICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQUdFMVNFTCwgMCk7ICAgICAgICAgICBcCit9CisKKworI2RlZmluZSBNQUN2Q2xlYXJJU1IoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfSVNSLCBJTVJfTUFTS19WQUxVRSk7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZTdGFydChkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfSE9TVENSLCAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgIChIT1NUQ1JfTUFDRU4gfCBIT1NUQ1JfUlhPTiB8IEhPU1RDUl9UWE9OKSk7IFwKK30KKworI2RlZmluZSBNQUN2UngwUGVyUGt0TW9kZShkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFDVEwwLCBSWF9QRVJQS1QpOyAgXAorfQorCisjZGVmaW5lIE1BQ3ZSeDBCdWZmZXJGaWxsTW9kZShkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BQ1RMMCwgUlhfUEVSUEtUQ0xSKTsgICBcCit9CisKKyNkZWZpbmUgTUFDdlJ4MVBlclBrdE1vZGUoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BQ1RMMSwgUlhfUEVSUEtUKTsgIFwKK30KKworI2RlZmluZSBNQUN2UngxQnVmZmVyRmlsbE1vZGUoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19SWERNQUNUTDEsIFJYX1BFUlBLVENMUik7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZSeE9uKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBNQUN2UmVnQml0c09uKGR3SW9CYXNlLCBNQUNfUkVHX0hPU1RDUiwgSE9TVENSX1JYT04pOyAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlJlY2VpdmUwKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfUlhETUFDVEwwLCAmZHdEYXRhKTsgICAgICAgICBcCisgICAgaWYgKGR3RGF0YSAmIERNQUNUTF9SVU4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BQ1RMMCwgRE1BQ1RMX1dBS0UpO1wKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgZWxzZSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BQ1RMMCwgRE1BQ1RMX1JVTik7IFwKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlJlY2VpdmUxKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1JYRE1BQ1RMMSwgJmR3RGF0YSk7ICAgICAgICAgXAorICAgIGlmIChkd0RhdGEgJiBETUFDVExfUlVOKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19SWERNQUNUTDEsIERNQUNUTF9XQUtFKTtcCisgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19SWERNQUNUTDEsIERNQUNUTF9SVU4pOyBcCisgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZUeE9uKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBNQUN2UmVnQml0c09uKGR3SW9CYXNlLCBNQUNfUkVHX0hPU1RDUiwgSE9TVENSX1RYT04pOyAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlRyYW5zbWl0MChkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX1RYRE1BQ1RMMCwgJmR3RGF0YSk7ICAgICAgICAgXAorICAgIGlmIChkd0RhdGEgJiBETUFDVExfUlVOKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19UWERNQUNUTDAsIERNQUNUTF9XQUtFKTtcCisgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19UWERNQUNUTDAsIERNQUNUTF9SVU4pOyBcCisgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZUcmFuc21pdEFDMChkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBEV09SRCBkd0RhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19BQzBETUFDVEwsICZkd0RhdGEpOyAgICAgICAgIFwKKyAgICBpZiAoZHdEYXRhICYgRE1BQ1RMX1JVTikgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfQUMwRE1BQ1RMLCBETUFDVExfV0FLRSk7XAorICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfQUMwRE1BQ1RMLCBETUFDVExfUlVOKTsgXAorICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBNQUN2VHJhbnNtaXRTWU5DKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBEV09SRCBkd0RhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfU1lOQ0RNQUNUTCwgJmR3RGF0YSk7ICAgICAgICAgXAorICAgIGlmIChkd0RhdGEgJiBETUFDVExfUlVOKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfU1lOQ0RNQUNUTCwgRE1BQ1RMX1dBS0UpO1wKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfU1lOQ0RNQUNUTCwgRE1BQ1RMX1JVTik7IFwKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfQorCisjZGVmaW5lIE1BQ3ZUcmFuc21pdEFUSU0oZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3RGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19BVElNRE1BQ1RMLCAmZHdEYXRhKTsgICAgICAgICBcCisgICAgaWYgKGR3RGF0YSAmIERNQUNUTF9SVU4pIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19BVElNRE1BQ1RMLCBETUFDVExfV0FLRSk7XAorICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgZWxzZSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19BVElNRE1BQ1RMLCBETUFDVExfUlVOKTsgXAorICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlRyYW5zbWl0QkNOKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfQkNORE1BQ1RMLCBCRUFDT05fUkVBRFkpOyAgIFwKK30KKworI2RlZmluZSBNQUN2Q2xlYXJTdGNrRFMoZHdJb0Jhc2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIEJZVEUgYnlPcmdWYWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19TVElDS0hXLCAmYnlPcmdWYWx1ZSk7ICAgXAorICAgIGJ5T3JnVmFsdWUgPSBieU9yZ1ZhbHVlICYgMHhGQzsgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfU1RJQ0tIVywgYnlPcmdWYWx1ZSk7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZSZWFkSVNSKGR3SW9CYXNlLCBwZHdWYWx1ZSkgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfSVNSLCBwZHdWYWx1ZSk7ICBcCit9CisKKyNkZWZpbmUgTUFDdldyaXRlSVNSKGR3SW9CYXNlLCBkd1ZhbHVlKSAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfSVNSLCBkd1ZhbHVlKTsgIFwKK30KKworI2RlZmluZSBNQUN2SW50RW5hYmxlKGR3SW9CYXNlLCBkd01hc2spICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19JTVIsIGR3TWFzayk7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZJbnREaXNhYmxlKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0lNUiwgMCk7ICAgICAgICBcCit9CisKKyNkZWZpbmUgTUFDdlNlbGVjdFBhZ2UwKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFHRTFTRUwsIDApOyAgIFwKK30KKyNkZWZpbmUgTUFDdlNlbGVjdFBhZ2UxKGR3SW9CYXNlKSAgICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lvQmFzZSArIE1BQ19SRUdfUEFHRTFTRUwsIDEpOyAgIFwKK30KKworI2RlZmluZSBNQUN2UmVhZE1JQkNvdW50ZXIoZHdJb0Jhc2UsIHBkd0NvdW50ZXIpICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19NSUJDTlRSICwgcGR3Q291bnRlcik7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZQd3JFdm50RGlzYWJsZShkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Vyhkd0lvQmFzZSArIE1BQ19SRUdfV0FLRVVQRU4wLCAweDAwMDApOyBcCit9CisKKyNkZWZpbmUgTUFDdkVuYWJsZVByb3RlY3RNRChkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBEV09SRCBkd09yZ1ZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfRU5DRkcgLCAmZHdPcmdWYWx1ZSk7IFwKKyAgICBkd09yZ1ZhbHVlID0gZHdPcmdWYWx1ZSB8IEVuQ0ZHX1Byb3RlY3RNZDsgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0VOQ0ZHLCBkd09yZ1ZhbHVlKTsgIFwKK30KKworI2RlZmluZSBNQUN2RGlzYWJsZVByb3RlY3RNRChkd0lvQmFzZSkgICAgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3T3JnVmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfRU5DRkcgLCAmZHdPcmdWYWx1ZSk7IFwKKyAgICBkd09yZ1ZhbHVlID0gZHdPcmdWYWx1ZSAmIH5FbkNGR19Qcm90ZWN0TWQ7ICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0VOQ0ZHLCBkd09yZ1ZhbHVlKTsgIFwKK30KKworI2RlZmluZSBNQUN2RW5hYmxlQmFya2VyUHJlYW1ibGVNZChkd0lvQmFzZSkgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIERXT1JEIGR3T3JnVmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZJblBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19FTkNGRyAsICZkd09yZ1ZhbHVlKTsgXAorICAgIGR3T3JnVmFsdWUgPSBkd09yZ1ZhbHVlIHwgRW5DRkdfQmFya2VyUHJlYW07ICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfRU5DRkcsIGR3T3JnVmFsdWUpOyAgXAorfQorCisjZGVmaW5lIE1BQ3ZEaXNhYmxlQmFya2VyUHJlYW1ibGVNZChkd0lvQmFzZSkgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgRFdPUkQgZHdPcmdWYWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5TdkluUG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0VOQ0ZHICwgJmR3T3JnVmFsdWUpOyBcCisgICAgZHdPcmdWYWx1ZSA9IGR3T3JnVmFsdWUgJiB+RW5DRkdfQmFya2VyUHJlYW07ICAgICAgICBcCisgICAgVk5Tdk91dFBvcnREKGR3SW9CYXNlICsgTUFDX1JFR19FTkNGRywgZHdPcmdWYWx1ZSk7ICBcCit9CisKKyNkZWZpbmUgTUFDdlNldEJCVHlwZShkd0lvQmFzZSwgYnlUeXApICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBEV09SRCBkd09yZ1ZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0RChkd0lvQmFzZSArIE1BQ19SRUdfRU5DRkcgLCAmZHdPcmdWYWx1ZSk7IFwKKyAgICBkd09yZ1ZhbHVlID0gZHdPcmdWYWx1ZSAmIH5FbkNGR19CQlR5cGVfTUFTSzsgICAgICAgIFwKKyAgICBkd09yZ1ZhbHVlID0gZHdPcmdWYWx1ZSB8IChEV09SRCkgYnlUeXA7ICAgICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydEQoZHdJb0Jhc2UgKyBNQUNfUkVHX0VOQ0ZHLCBkd09yZ1ZhbHVlKTsgIFwKK30KKworI2RlZmluZSBNQUN2UmVhZEFUSU1XKGR3SW9CYXNlLCBwd0NvdW50ZXIpICAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBWTlN2SW5Qb3J0Vyhkd0lvQmFzZSArIE1BQ19SRUdfQUlEQVRJTSAsIHB3Q291bnRlcik7ICAgXAorfQorCisjZGVmaW5lIE1BQ3ZXcml0ZUFUSU1XKGR3SW9CYXNlLCB3Q291bnRlcikgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Vyhkd0lvQmFzZSArIE1BQ19SRUdfQUlEQVRJTSAsIHdDb3VudGVyKTsgICBcCit9CisKKyNkZWZpbmUgTUFDdldyaXRlQ1JDMTZfMTI4KGR3SW9CYXNlLCBieVJlZ09mcywgd0NSQykgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19QQUdFMVNFTCwgMSk7ICAgICAgICAgIFwKKyAgICBWTlN2T3V0UG9ydFcoZHdJb0Jhc2UgKyBieVJlZ09mcywgd0NSQyk7ICAgICAgICAgICAgICAgXAorICAgIFZOU3ZPdXRQb3J0Qihkd0lv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ICAgIHBTdGF0aXN0aWMgIC0gUG9pbnRlciB0byBTdGF0aXN0aWMgQ291bnRlciBEYXRhIFN0cnVjdHVyZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLwordm9pZCBTVEF2Q2xlYXJBbGxDb3VudGVyIChQU1N0YXRDb3VudGVyIHBTdGF0aXN0aWMpCit7CisgICAgLy8gc2V0IG1lbW9yeSB0byB6ZXJvCisgICAgWkVST19NRU1PUlkocFN0YXRpc3RpYywgc2l6ZW9mKFNTdGF0Q291bnRlcikpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogVXBkYXRlIElzciBTdGF0aXN0aWMgQ291bnRlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBTdGF0aXN0aWMgIC0gUG9pbnRlciB0byBTdGF0aXN0aWMgQ291bnRlciBEYXRhIFN0cnVjdHVyZQorICogICAgICB3aXNyICAgICAgICAtIEludGVycnVwdCBzdGF0dXMKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCisgKi8KK3ZvaWQgU1RBdlVwZGF0ZUlzclN0YXRDb3VudGVyIChQU1N0YXRDb3VudGVyIHBTdGF0aXN0aWMsIERXT1JEIGR3SXNyKQoreworICAgIC8qKioqKioqKioqKioqKioqKioqKioqLworICAgIC8qIEFCTk9STUFMIGludGVycnVwdCAqLworICAgIC8qKioqKioqKioqKioqKioqKioqKioqLworICAgIC8vIG5vdCBhbnkgSU1SIGJpdCBpbnZva2UgaXJxCisKKyAgICBpZiAoZHdJc3IgPT0gMCkgeworICAgICAgICBwU3RhdGlzdGljLT5JU1JTdGF0LmR3SXNyVW5rbm93bisrOworICAgICAgICByZXR1cm47CisgICAgfQorCisvL0FkZGVkIGJ5IEt5bGUKKyAgICBpZiAoQklUYklzQml0T24oZHdJc3IsIElTUl9UWERNQTApKSAg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0cpKSAgICAgICAgICAgICAvLyBJU1IsIGJpdDcKKyAgICAgICAgcFN0YXRpc3RpYy0+SVNSU3RhdC5kd0lzcldhdGNoRG9nKys7CisKKyAgICBpZiAoQklUYklzQml0T24oZHdJc3IsIElTUl9GRVRBTEVSUikpICAgICAgICAgICAgIC8vIElTUiwgYml0OAorICAgICAgICBwU3RhdGlzdGljLT5JU1JTdGF0LmR3SXNyVW5yZWNvdmVyYWJsZUVycm9yKys7CisKKyAgICBpZiAoQklUYklzQml0T24oZHdJc3IsIElTUl9TT0ZUSU5UKSkgICAgICAgICAgICAgIC8vIElTUiwgYml0OQorICAgICAgICBwU3RhdGlzdGljLT5JU1JTdGF0LmR3SXNyU29mdEludGVycnVwdCsrOyAgICAgLy8gc29mdHdhcmUgaW50ZXJydXB0CisKKyAgICBpZiAoQklUYklzQml0T24oZHdJc3IsIElTUl9NSUJORUFSRlVMTCkpICAgICAgICAgIC8vIElTUiwgYml0MTAKKyAgICAgICAgcFN0YXRpc3RpYy0+SVNSU3RhdC5kd0lzck1JQk5lYXJmdWxsKys7CisKKyAgICBpZiAoQklUYklzQml0T24oZHdJc3IsIElTUl9SWE5PQlVGKSkgICAgICAgICAgICAgIC8vIElTUiwgYml0MTEKKyAgICAgICAgcFN0YXRpc3RpYy0+SVNSU3RhdC5kd0lzclJ4Tm9CdWYrKzsgICAgICAgICAgIC8vIFJ4IE5vIEJ1ZmYKKworICAgIGlmIChCSVRiSXNCaXRPbihkd0lzciwgSVNSX1JYRE1BMSkpICAgICAgICAgICAgICAgLy8gSVNSLCBiaXQxMgorICAgICAgICBwU3RhdGlzdGljLT5JU1JTdGF0LmR3SXNyUngxT0srKzsgICAgICAgICAgICAgLy8gUngxIHN1Y2Nlc3NmdWwKKworLy8gICAgaWYgKEJJVGJJc0JpdE9uKGR3SXNyLCBJU1JfQVRJTVRYKSkgICAgICAgICAgICAgICAvLyBJU1IsIGJpdDEzCisvLyAgICAgICAgcFN0YXRpc3RpYy0+SVNSU3Rhd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ICAgICAgYnlSU1IgICAgICAgICAgIC0gUnggU3RhdHVzCisgKiAgICAgIGJ5TmV3UlNSICAgICAgICAtIFJ4IFN0YXR1cworICogICAgICBwYnlCdWZmZXIgICAgICAgLSBSeCBCdWZmZXIKKyAqICAgICAgY2JGcmFtZUxlbmd0aCAgIC0gUnggTGVuZ3RoCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIFNUQXZVcGRhdGVSRFN0YXRDb3VudGVyIChQU1N0YXRDb3VudGVyIHBTdGF0aXN0aWMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCWVRFIGJ5UlNSLCBCWVRFIGJ5TmV3UlNSLCBCWVRFIGJ5UnhSYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEUgcGJ5QnVmZmVyLCBVSU5UIGNiRnJhbWVMZW5ndGgpCit7CisgICAgLy9uZWVkIGNoYW5nZQorICAgIFBTODAyXzExSGVhZGVyIHBIZWFkZXIgPSAoUFM4MDJfMTFIZWFkZXIpcGJ5QnVmZmVyOworCisgICAgaWYgKEJJVGJJc0JpdE9uKGJ5UlNSLCBSU1JfQUREUk9LKSkKKyAgICAgICAgcFN0YXRpc3RpYy0+ZHdSc3JBRERST2srKzsKKyAgICBpZiAoQklUYklzQml0T24oYnlSU1IsIFJTUl9DUkNPSykpIHsKKyAgICAgICAgcFN0YXRpc3RpYy0+ZHdSc3JDUkNPaysrOworCisgICAgICAgIHBTdGF0aXN0aWMtPnVsbFJzck9LKys7CisKKyAgICAgICAgaWYgKGNiRnJhbWVMZW5ndGggPj0gVV9FVEhFUl9BRERSX0xFTikgeworICAgICAgICAgICAgLy8gdXBkYXRlIGNvdW50ZXJzIGluIGNhc2UgdGhhdCBzdWNjZXNzZnVsIHRyYW5zbWl0CisgICAgICAgICAgICBpZiAoQklUYklzQml0T24oYnlSU1IsIFJTUl9BRERSQlJPQUQpKSB7CisgICAgICAgICAgICAgICAgcFN0YXRpc3RpYy0+dWxsUnhCcm9hZGNhc3RGcmFtZXMrKzsKKyAgICAgICAgICAgICAgICBwU3RhdGlzdGljLT51bGxSeEJyb2FkY2FzdEJ5dGVzICs9IChVTE9OR0xPTkcpY2JGcmFtZUxlbmd0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKEJJVGJJc0JpdE9uKGJ5UlNSLCBSU1JfQUREUk1VTFRJKSkgeworICAgICAgICAgICAgICAgIHBTdGF0aXN0aWMtPnVsbFJ4TXVsdGljYXN0RnJhbWVzKys7CisgICAgICAgICAgICAgICAgcFN0YXRpc3RpYy0+dWxsUnhNdWx0aWNhc3RCeXRlcyArPSAoVUxPTkdMT05HKWNiRnJhbWVMZW5ndGg7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBwU3RhdGlzdGljLT51bGxSeERpcmVjdGVkRnJhbWVzKys7CisgICAgICAgICAgICAgICAgcFN0YXRpc3RpYy0+dWxsUnhEaXJlY3RlZEJ5dGVzICs9IChVTE9OR0xPTkcpY2JGcmFtZUxlbmd0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworICAgIGlmKGJ5UnhSYXRlPT0yMikgeworICAgICAgICBwU3RhdGlzdGljLT5DdXN0b21TdGF0LnVsbFJzcjExTSsrOworICAgICAgICBpZihCSVRiSXNCaXRPbihieVJTUiwgUlNSX0NSQ09LKSkgeworICAgICAgICAgICAgcFN0YXRpc3RpYy0+Q3VzdG9tU3RhdC51bGxSc3IxMU1DUkNPaysrOworICAgICAgICB9CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iMTFNOiBBTExbJWRdLCBPS1slZF06WyUwMnhdXG4iLCAoSU5UKXBTdGF0aXN0aWMtPkN1c3RvbVN0YXQudWxsUnNyMTFNLCAoSU5UKXBTdGF0aXN0aWMtPkN1c3RvbVN0Y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N0YXRpc3RpYyBDb3VudGVyIERhdGEgU3RydWN0dXJlCisgKiAgICAgIGJ5UlNSICAgICAgICAgICAtIFJ4IFN0YXR1cworICogICAgICBieU5ld1JTUiAgICAgICAgLSBSeCBTdGF0dXMKKyAqICAgICAgcGJ5QnVmZmVyICAgICAgIC0gUnggQnVmZmVyCisgKiAgICAgIGNiRnJhbWVMZW5ndGggICAtIFJ4IExlbmd0aAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLworCit2b2lkCitTVEF2VXBkYXRlUkRTdGF0Q291bnRlckV4ICgKKyAgICBQU1N0YXRDb3VudGVyICAgcFN0YXRpc3RpYywKKyAgICBCWVRFICAgICAgICAgICAgYnlSU1IsCisgICAgQllURSAgICAgICAgICAgIGJ5TmV3UlNSLAorICAgIEJZVEUgICAgICAgICAgICBieVJ4UmF0ZSwKKyAgICBQQllURSAgICAgICAgICAgcGJ5QnVmZmVyLAorICAgIFVJTlQgICAgICAgICAgICBjYkZyYW1lTGVuZ3RoCisgICAgKQoreworICAgIFNUQXZVcGRhdGVSRFN0YXRDb3VudGVyKAorICAgICAgICAgICAgICAgICAgICBwU3RhdGlzdGljLAorICAgICAgICAgICAgICAgICAgICBieVJTUiwKKyAgICAgICAgICAgICAgICAgICAgYnlOZXdSU1IsCisgICAgICAgICAgICAgICAgICAgIGJ5UnhSYXRlLAorICAgICAgICAgICAgICAgICAgICBwYnlCdWZmZXIsCisgICAgICAgICAgICAgICAgICAgIGNiRnJhbWVMZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgKTsKKworICAgIC8vIHJ4IGxlbmd0aAorICAgIHBTdGF0aXN0aWMtPmR3Q250UnhGcm1MZW5ndGggPSBjYkZyYW1lTGVuZ3RoOworICAgIC8vIHJ4IHBhdHRlcm4sIHdlIGp1c3Qgc2VlIDEwIGJ5dGVzIGZvciBzYW1wbGUKKyAgICBNRU12Q29weShwU3RhdGlzdGljLT5hYnlDbnRSeFBhdHRlcm4sIChQQllURSlwYnlCdWZmZXIsIDEwKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IFVwZGF0ZSBUeCBTdGF0aXN0aWMgQ291bnRlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBTdGF0aXN0aWMgICAgICAtIFBvaW50ZXIgdG8gU3RhdGlzdGljIENvdW50ZXIgRGF0YSBTdHJ1Y3R1cmUKKyAqICAgICAgYnlUU1IwICAgICAgICAgIC0gVHggU3RhdHVzCisgKiAgICAgIGJ5VFNSMSAgICAgICAgICAtIFR4IFN0YXR1cworICogICAgICBwYnlCdWZmZXIgICAgICAgLSBUeCBCdWZmZXIKKyAqICAgICAgY2JGcmFtZUxlbmd0aCAgIC0gVHggTGVuZ3RoCisgKiAgICAgIHVJZHggICAgICAgICAgICAtIEluZGV4IG9mIFR4IERNQQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLwordm9pZAorU1RBdlVwZGF0ZVREU3RhdENvdW50ZXIgKAorICAgIFBTU3RhdENvdW50ZXIgICBwU3RhdGlzdGljLAorICAgIEJZVEUgICAgICAgICAgICBieVRTUjAsCisgICAgQllURSAgICAgICAgICAgIGJ5VFNSMSwKKyAgICBQQllURSAgICAgICAgICAgcGJ5QnVmZmVyLAorICAgIFVJTlQgICAgICAgICAgICBjYkZyYW1lTGVuZ3RoLAorICAgIFVJTlQgICAgICAgICAgICB1SWR4CisgICAgKQoreworICAgIFBXTEFOXzgwMjExSERSX0E0ICAgcEhlYWRlcjsKKyAgICBQQllURSAgICAgICAgICAgICAgIHBieURlc3RBZGRyOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlUU1IwX05DUiA9IGJ5VFNSMCAmIFRTUjBfTkNSOworCisKKworICAgIHBIZWFkZXIgPSAoUFdMQU5fODAyMTFIRFJfQTQpIHBieUJ1ZmZlcjsKKyAgICBpZiAoV0xBTl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VRTUjEsIFRTUjFfVE1PKSkKKyAgICAgICAgICAgIHBTdGF0aXN0aWMtPmR3VHNyVHJhbnNtaXRUaW1lb3V0W3VJZHhdKys7CisgICAgICAgIGlmIChCSVRiSXNCaXRPbihieVRTUjEsIEFDS19EQVRBKSkKKyAgICAgICAgICAgIHBTdGF0aXN0aWMtPmR3VHNyQUNLRGF0YVt1SWR4XSsrOworICAgIH0KKworICAgIGlmIChJU19CUk9BRENBU1RfQUREUkVTUyhwYnlEZXN0QWRkcikpCisgICAgICAgIHBTdGF0aXN0aWMtPmR3VHNyQnJvYWRjYXN0W3VJZHhdKys7CisgICAgZWxzZSBpZiAoSVNfTVVMVElDQVNUX0FERFJFU1MocGJ5RGVzdEFkZHIpKQorICAgICAgICBwU3RhdGlzdGljLT5kd1Rzck11bHRpY2FzdFt1SWR4XSsrOworICAgIGVsc2UKKyAgICAgICAgcFN0YXRpc3RpYy0+ZHdUc3JEaXJlY3RlZFt1SWR4XSsrOworCit9CisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBVcGRhdGUgVHggU3RhdGlzdGljIENvdW50ZXIgYW5kIGNvcHkgVHggYnVmZmVyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcFN0YXRpc3RpYyAgICAgIC0gUG9pbnRlciB0byBTdGF0aXN0aWMgQ291bnRlciBEYXRhIFN0cnVjdHVyZQorICogICAgICBwYnlCdWZmZXIgICAgICAgLSBUeCBCdWZmZXIKKyAqICAgICAgY2JGcmFtZUxlbmd0aCAgIC0gVHggTGVuZ3RoCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkCitTVEF2VXBkYXRlVERTdGF0Q291bnRlckV4ICgKKyAgICBQU1N0YXRDb3VudGVyICAgcFN0YXRpc3RpYywKKyAgICBQQllURSAgICAgICAgICAgcGJ5QnVmZmVyLAorICAgIERXT1JEICAgICAgICAgICBjYkZyYW1lTGVuZ3RoCisgICAgKQoreworICAgIFVJTlQgICAgdVBrdExlbmd0aDsKKworICAgIHVQa3RMZW5ndGggPSAoVUlOVCljYkZyYW1lTGVuZ3RoOworCisgICAgLy8gdHggbGVuZ3RoCisgICAgcFN0YXRpc3RpYy0+ZHdDbnRUeEJ1Zkxlbmd0aCA9IHVQa3RMZW5ndGg7CisgICAgLy8gdHggcGF0dGVybiwgd2UganVzdCBzZWUgMTYgYnl0ZXMgZm9yIHNhbXBsZQorICAgIE1FTXZDb3B5KHBTdGF0aXN0aWMtPmFieUNudFR4UGF0dGVybiwgcGJ5QnVmZmVyLCAxNik7Cit9CisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBVcGRhdGUgODAyLjExIG1pYiBjb3VudGVyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcDgwMl8xMUNvdW50ZXIgIC0gUG9pbnRlciB0byA4MDIuMTEgbWliIGNvdW50ZXIKKyAqICAgICAgcFN0YXRpc3RpYyAgICAgIC0gUG9pbnRlciB0byBTdGF0aXN0aWMgQ291bnRlciBEYXRhIFN0cnVjdHVyZQorICogICAgICBkd0NvdW50ZXIgICAgICAgLSBoYXJkd2FyZSBjb3VudGVyIGZvciA4MDIuMTEgbWliCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkCitTVEF2VXBkYXRlODAyXzExQ291bnRlcigKKyAgICBQU0RvdDExQ291bnRlcnMgICAgICAgICBwODAyXzExQ291bnRlciwKKyAgICBQU1N0YXRDb3VudGVyICAgICAgICAgICBwU3RhdGlzdGljLAorICAgIERXT1JEICAgICAgICAgICAgICAgICAgIGR3Q291bnRlcgorICAgICkKK3sKKyAgICAvL3A4MDJfMTFDb3VudGVyLT5UcmFuc21pdHRlZEZyYWdtZW50Q291bnQKKyAgICBwODAyXzExQ291bnRlci0+TXVsdGljYXN0VHJhbnNtaXR0ZWRGcmFtZUNvdW50ID0gKFVMT05HTE9ORykgKHBTdGF0aXN0aWMtPmR3VHNyQnJvYWRjYXN0W1RZUEVfQUMwRE1BXSArCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwU3RhdGlzdGljLT5kd1RzckJyb2FkY2FzdFtUWVBFX1RYRE1BMF0gKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFN0YXRpc3RpYy0+ZHdUc3JNdWx0aWNhc3RbVFlQRV9BQzBETUFdICsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBTdGF0aXN0aWMtPmR3VHNyTXVsdGljYXN0W1RZUEVfVFhETUEwXSk7CisgICAgcDgwMl8xMUNvdW50ZXItPkZhaWxlZENvdW50ID0gKFVMT05HTE9ORykgKHBTdGF0aXN0aWMtPmR3VHNyRXJyW1RZUEVfQUMwRE1BXSArIHBTdGF0aXN0aWMtPmR3VHNyRXJyW1RZUEVfVFhETUEwXSk7CisgICAgcDgwMl8xMUNvdW50ZXItPlJldHJ5Q291bnQgPSAoVUxPTkdMT05HKSAocFN0YXRpc3RpYy0+ZHdUc3JSZXRyeVtUWVBFX0FDMERNQV0gKyBwU3RhdGlzdGljLT5kd1RzclJldHJ5W1RZUEVfVFhETUEwXSk7CisgICAgcDgwMl8xMUNvdW50ZXItPk11bHRpcGxlUmV0cnlDb3VudCA9IChVTE9OR0xPTkcpIChwU3RhdGlzdGljLT5kd1Rzck1vcmVUaGFuT25jZVJldHJ5W1RZUEVfQUMwRE1BXSArCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFN0YXRpc3RpYy0+ZHdUc3JNb3JlVGhhbk9uY2VSZXRyeVtUWVBFX1RYRE1BMF0pOworICAgIC8vcDgwMl8xMUNvdW50ZXItPkZyYW1lRHVwbGljYXRlQ291bnQKKyAgICBwODAyXzExQ291bnRlci0+UlRTU3VjY2Vzc0NvdW50ICs9IChVTE9OR0xPTkcpICAoZHdDb3VudGVyICYgMHgwMDAwMDBmZik7CisgICAgcDgwMl8xMUNvdW50ZXItPlJUU0ZhaWx1cmVDb3VudCArPSAoVUxPTkdMT05HKSAoKGR3Q291bnRlciAmIDB4MDAwMGZmMDApID4+IDgpOworICAgIHA4MDJfMTFDb3VudGVyLT5BQ0tGYWlsdXJlQ291bnQgKz0gKFVMT05HTE9ORykgKChkd0NvdW50ZXIgJiAweDAwZmYwMDAwKSA+PiAxNik7CisgICAgcDgwMl8xMUNvdW50ZXItPkZDU0Vycm9yQ291bnQgKz0gICAoVUxPTkdMT05HKSAoKGR3Q291bnRlciAmIDB4ZmYwMDAwMDApID4+IDI0KTsKKyAgICAvL3A4MDJfMTFDb3VudGVyLT5SZWNlaXZlZEZyYWdtZW50Q291bnQKKyAgICBwODAyXzExQ291bnRlci0+TXVsdGljYXN0UmVjZWl2ZWRGcmFtZUNvdW50ID0gKFVMT05HTE9ORykgKHBTdGF0aXN0aWMtPmR3UnNyQnJvYWRjYXN0ICsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBTdGF0aXN0aWMtPmR3UnNyTXVsdGljYXN0KTsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBDbGVhciA4MDIuMTEgbWliIGNvdW50ZXIKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwODAyXzExQ291bnRlciAgLSBQb2ludGVyIHRvIDgwMi4xMSBtaWIgY291bnRlcgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKyAqLwordm9pZAorU1RBdkNsZWFyODAyXzExQ291bnRlcihQU0RvdDExQ291bnRlcnMgcDgwMl8xMUNvdW50ZXIpCit7CisgICAgLy8gc2V0IG1lb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291bnQ7CisvLyAgICBVTE9OR0xPTkcgICBXRVBJQ1ZFcnJvckNvdW50OworLy8gICAgVUxPTkdMT05HICAgRGVjcnlwdFN1Y2Nlc3NDb3VudDsKKy8vICAgIFVMT05HTE9ORyAgIERlY3J5cHRGYWlsdXJlQ291bnQ7Cit9IFNEb3QxMUNvdW50ZXJzLCBERUYqIFBTRG90MTFDb3VudGVyczsKKworCisvLworLy8gTUlCMiBjb3VudGVyCisvLwordHlwZWRlZiBzdHJ1Y3QgdGFnU01pYjJDb3VudGVyIHsKKyAgICBMT05HICAgIGlmSW5kZXg7CisgICAgVENIQVIgICBpZkRlc2NyWzI1Nl07ICAgICAgICAgICAgICAgLy8gbWF4IHNpemUgMjU1IHBsdXMgemVybyBlbmRpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlLmcuICJpbnRlcmZhY2UgMSIKKyAgICBMT05HICAgIGlmVHlwZTsKKyAgICBMT05HICAgIGlmTXR1OworICAgIERXT1JEICAgaWZTcGVlZDsKKyAgICBCWVRFICAgIGlmUGh5c0FkZHJlc3NbVV9FVEhFUl9BRERSX0xFTl07CisgICAgTE9ORyAgICBpZkFkbWluU3RhdHVzOworICAgIExPTkcgICAgaWZPcGVyU3RhdHVzOworICAgIERXT1JEICAgaWZMYXN0Q2hhbmdlOworICAgIERXT1JEICAgaWZJbk9jdGV0czsKKyAgICBEV09SRCAgIGlmSW5VY2FzdFBrdHM7CisgICAgRFdPUkQgICBpZkluTlVjYXN0UGt0czsKKyAgICBEV09SRCAgIGlmSW5EaXNjYXJkczsKKyAgICBEV09SRCAgIGlmSW5FcnJvcnM7CisgICAgRFdPUkQgICBpZkluVW5rbm93blByb3RvczsKKyAgICBEV09SRCAgIGlmT3V0T2N0ZXRzOworICAgIERXT1JEICAgaWZPdXRVY2FzdFBrdHM7CisgICAgRFdPUkQgICBpZk91dE5VY2FzdFBrdHM7CisgICAgRFdPUkQgICBpZk91dERpc2NhcmRzOworICAgIERXT1JEICAgaWZPdXRFcnJvcnM7CisgICAgRFdPUkQgICBpZk91dFFMZW47CisgICAgRFdPUkQgICBpZlNwZWNpZmljOworfSBTTWliMkNvdW50ZXIsIERFRiogUFNNaWIyQ291bnRlcjsKKworLy8gVmFsdWUgaW4gdGhlIGlmVHlwZSBlbnRyeQorLy8jZGVmaW5lIEVUSEVSTkVUQ1NNQUNEICAgICAgNiAgICAgICAgICAgLy8KKyNkZWZpbmUgV0lSRUxFU1NMQU5JRUVFODAyMTFiICAgICAgNiAgICAgICAgICAgLy8KKworLy8gVmFsdWUgaW4gdGhlIGlmQWRtaW5TdGF0dXMvaWZPcGVyU3RhdHVzIGVudHJ5CisjZGVmaW5lIFVQICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgLy8KKyNkZWZpbmUgRE9XTiAgICAgICAgICAgICAgICAyICAgICAgICAgICAvLworI2RlZmluZSBURVNUSU5HICAgICAgICAgICAgIDMgICAgICAgICAgIC8vCisKKworLy8KKy8vIFJNT04gY291bnRlcgorLy8KK3R5cGVkZWYgc3RydWN0IHRhZ1NSbW9uQ291bnRlciB7CisgICAgTE9ORyAgICBldGhlclN0YXRzSW5kZXg7CisgICAgRFdPUkQgICBldGhlclN0YXRzRGF0YVNvdXJjZTsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNEcm9wRXZlbnRzOworICAgIERXT1JEICAgZXRoZXJTdGF0c09jdGV0czsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNQa3RzOworICAgIERXT1JEICAgZXRoZXJTdGF0c0Jyb2FkY2FzdFBrdHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzTXVsdGljYXN0UGt0czsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNDUkNBbGlnbkVycm9yczsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNVbmRlcnNpemVQa3RzOworICAgIERXT1JEICAgZXRoZXJTdGF0c092ZXJzaXplUGt0czsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNGcmFnbWVudHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzSmFiYmVyczsKKyAgICBEV09SRCAgIGV0aGVyU3RhdHNDb2xsaXNpb25zOworICAgIERXT1JEICAgZXRoZXJTdGF0c1BrdDY0T2N0ZXRzOworICAgIERXT1JEICAgZXRoZXJTdGF0c1BrdDY1dG8xMjdPY3RldHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzUGt0MTI4dG8yNTVPY3RldHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzUGt0MjU2dG81MTFPY3RldHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzUGt0NTEydG8xMDIzT2N0ZXRzOworICAgIERXT1JEICAgZXRoZXJTdGF0c1BrdDEwMjR0bzE1MThPY3RldHM7CisgICAgRFdPUkQgICBldGhlclN0YXRzT3duZXJzOworICAgIERXT1JEICAgZXRoZXJTdGF0c1N0YXR1czsKK30gU1Jtb25Db3VudGVyLCBERUYqIFBTUm1vbkNvdW50ZXI7CisKKy8vCisvLyBDdXN0b20gY291bnRlcgorLy8KK3R5cGVkZWYgc3RydWN0IHRhZ1NDdXN0b21Db3VudGVycyB7CisgICAgVUxPTkcgICAgICAgTGVuZ3RoOworCisgICAgVUxPTkdMT05HICAgdWxsVHNyQWxsT0s7CisKKyAgICBVTE9OR0xPTkcgICB1bGxSc3IxMU07CisgICAgVUxPTkdMT05HICAgdWxsUnNyNU07CisgICAgVUxPTkdMT05HICAgdWxsUnNyMk07CisgICAgVUxPTkdMT05HICAgdWxsUnNyMU07CisKKyAgICBVTE9OR0xPTkcgICB1bGxSc3IxMU1DUkNPazsKKyAgICBVTE9OR0xPTkcgICB1bGxSc3I1TUNSQ09rOworICAgIFVMT05HTE9ORyAgIHVsbFJzcjJNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyMU1DUkNPazsKKworICAgIFVMT05HTE9ORyAgIHVsbFJzcjU0TTsKKyAgICBVTE9OR0xPTkcgICB1bGxSc3I0OE07CisgICAgVUxPTkdMT05HICAgdWxsUnNyMzZNOworICAgIFVMT05HTE9ORyAgIHVsbFJzcjI0TTsKKyAgICBVTE9OR0xPTkcgICB1bGxSc3IxOE07CisgICAgVUxPTkdMT05HICAgdWxsUnNyMTJNOworICAgIFVMT05HTE9ORyAgIHVsbFJzcjlNOworICAgIFVMT05HTE9ORyAgIHVsbFJzcjZNOworCisgICAgVUxPTkdMT05HICAgdWxsUnNyNTRNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyNDhNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyMzZNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyMjRNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyMThNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyMTJNQ1JDT2s7CisgICAgVUxPTkdMT05HICAgdWxsUnNyOU1DUkNPazsKKyAgICBVTE9OR0xPTkcgICB1bGxSc3I2TUNSQ09rOworCit9IFNDdXN0b21Db3VudGVycywgREVGKiBQU0N1c3RvbUNvdW50ZXJzOworCisKKy8vCisvLyBDdXN0b20gY291bnRlcgorLy8KK3R5cGVkZWYgc3RydWN0IHRhZ1NJU1JDb3VudGVycyB7CisgICAgVUxPTkcgICBMZW5ndGg7CisKKyAgICBEV09SRCAgIGR3SXNyVHgwT0s7CisgICAgRFdPUkQgICBkd0lzckFDMFR4T0s7CisgICAgRFdPUkQgICBkd0lzckJlYWNvblR4T0s7CisgICAgRFdPUkQgICBkd0lzclJ4ME9LOworICAgIERXT1JEICAgZHdJc3JUQlRUSW50OworICAgIERXT1JEICAgZHdJc3JTVElNRVJJbnQ7CisgICAgRFdPUkQgICBkd0lzcldhdGNoRG9nOworICAgIERXT1JEICAgZHdJc3JVbnJlY292ZXJhYmxlRXJyb3I7CisgICAgRFdPUkQgICBkd0lzclNvZnRJbnRlcnJ1cHQ7CisgICAgRFdPUkQgICBkd0lzck1JQk5lYXJmdWxsOworICAgIERXT1JEICAgZHdJc3JSeE5vQnVmOworCisgICAgRFdPUkQgICBkd0lzclVua25vd247ICAgICAgICAgICAgICAgLy8gdW5rbm93biBpbnRlcnJ1cHQgY291bnQKKworICAgIERXT1JEICAgZHdJc3JSeDFPSzsKKyAgICBEV09SRCAgIGR3SXNyQVRJTVR4T0s7CisgICAgRFdPUkQgICBkd0lzclNZTkNUeE9LOworICAgIERXT1JEICAgZHdJc3JDRlBFbmQ7CisgICAgRFdPUkQgICBkd0lzckFUSU1FbmQ7CisgICAgRFdPUkQgICBkd0lzclNZTkNGbHVzaE9LOworICAgIERXT1JEICAgZHdJc3JTVElNRVIxSW50OworICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KK30gU0lTUkNvdW50ZXJzLCBERUYqIFBTSVNSQ291bnRlcnM7CisKKworLy8gVmFsdWUgaW4gdGhlIGV0aGVyU3RhdHNTdGF0dXMgZW50cnkKKyNkZWZpbmUgVkFMSUQgICAgICAgICAgICAgICAxICAgICAgICAgICAvLworI2RlZmluZSBDUkVBVEVfUkVRVUVTVCAgICAgIDIgICAgICAgICAgIC8vCisjZGVmaW5lIFVOREVSX0NSRUFUSU9OICAgICAgMyAgICAgICAgICAgLy8KKyNkZWZpbmUgSU5WQUxJRCAgICAgICAgICAgICA0ICAgICAgICAgICAvLworCisvLyNkZWZpbmUgTUFYX1JBVEUgICAgICAgICAgICAxMgorLy8KKy8vIHN0YXRpc3RpYyBjb3VudGVyCisvLwordHlwZWRlZiBzdHJ1Y3QgdGFnU1N0YXRDb3VudGVyIHsKKyAgICAvLworICAgIC8vIElTUiBzdGF0dXMgY291bnQKKyAgICAvLworCisKKyAgICAvLyBSU1Igc3RhdHVzIGNvdW50CisgICAgLy8KKyAgICBEV09SRCAgIGR3UnNyRnJtQWxnbkVycjsKKyAgICBEV09SRCAgIGR3UnNyRXJyOworICAgIERXT1JEICAgZHdSc3JDUkNFcnI7CisgICAgRFdPUkQgICBkd1JzckNSQ09rOworICAgIERXT1JEICAgZHdSc3JCU1NJRE9rOworICAgIERXT1JEICAgZHdSc3JBRERST2s7CisgICAgRFdPUkQgICBkd1JzckJDTlNTSURPazsKKyAgICBEV09SRCAgIGR3UnNyTEVORXJyOworICAgIERXT1JEICAgZHdSc3JUWVBFcnI7CisKKyAgICBEV09SRCAgIGR3TmV3UnNyREVDUllQVE9LOworICAgIERXT1JEICAgZHdOZXdSc3JDRlA7CisgICAgRFdPUkQgICBkd05ld1JzclVUU0Y7CisgICAgRFdPUkQgICBkd05ld1JzckhJVEFJRDsKKyAgICBEV09SRCAgIGR3TmV3UnNySElUQUlEMDsKKworICAgIERXT1JEICAgZHdSc3JMb25nOworICAgIERXT1JEICAgZHdSc3JSdW50OworCisgICAgRFdPUkQgICBkd1JzclJ4Q29udHJvbDsKKyAgICBEV09SRCAgIGR3UnNyUnhEYXRhOworICAgIERXT1JEICAgZHdSc3JSeE1hbmFnZTsKKworICAgIERXT1JEICAgZHdSc3JSeFBhY2tldDsKKyAgICBEV09SRCAgIGR3UnNyUnhPY3RldDsKKyAgICBEV09SRCAgIGR3UnNyQnJvYWRjYXN0OworICAgIERXT1JEICAgZHdSc3JNdWx0aWNhc3Q7CisgICAgRFdPUkQgICBkd1JzckRpcmVjdGVkOworICAgIC8vIDY0LWJpdCBPSUQKKyAgICBVTE9OR0xPTkcgICB1bGxSc3JPSzsKKworICAgIC8vIGZvciBzb21lIG9wdGlvbmFsIE9JRHMgKDY0IGJpdHMpIGFuZCBETUkgc3VwcG9ydAorICAgIFVMT05HTE9ORyAgIHVsbFJ4QnJvYWRjYXN0Qnl0ZXM7CisgICAgVUxPTkdMT05HICAgdWxsUnhNdWx0aWNhc3RCeXRlczsKKyAgICBVTE9OR0xPTkcgICB1bGxSeERpcmVjdGVkQnl0ZXM7CisgICAgVUxPTkdMT05HICAgdWxsUnhCcm9hZGNhc3RGcmFtZXM7CisgICAgVUxPTkdMT05HICAgdWxsUnhNdWx0aWNhc3RGcmFtZXM7Cisg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AgIERXT1JEICAgZHdBbGxUc3JPS1tUWVBFX01BWFREXTsKKyAgICBEV09SRCAgIGR3VHNyUmV0cnlUaW1lb3V0W1RZUEVfTUFYVERdOworICAgIERXT1JEICAgZHdUc3JUcmFuc21pdFRpbWVvdXRbVFlQRV9NQVhURF07CisKKyAgICBEV09SRCAgIGR3VHNyVHhQYWNrZXRbVFlQRV9NQVhURF07CisgICAgRFdPUkQgICBkd1RzclR4T2N0ZXRbVFlQRV9NQVhURF07CisgICAgRFdPUkQgICBkd1RzckJyb2FkY2FzdFtUWVBFX01BWFREXTsKKyAgICBEV09SRCAgIGR3VHNyTXVsdGljYXN0W1RZUEVfTUFYVERdOworICAgIERXT1JEICAgZHdUc3JEaXJlY3RlZFtUWVBFX01BWFREXTsKKworICAgIC8vIFJEL1REIGNvdW50CisgICAgRFdPUkQgICBkd0NudFJ4RnJtTGVuZ3RoOworICAgIERXT1JEICAgZHdDbnRUeEJ1Zkxlbmd0aDsKKworICAgIEJZVEUgICAgYWJ5Q250UnhQYXR0ZXJuWzE2XTsKKyAgICBCWVRFICAgIGFieUNudFR4UGF0dGVyblsxNl07CisKKworCisgICAgLy8gU29mdHdhcmUgY2hlY2suLi4uCisgICAgRFdPUkQgICBkd0NudFJ4RGF0YUVycjsgICAgICAgICAgICAgLy8gcnggYnVmZmVyIGRhdGEgc29mdHdhcmUgY29tcGFyZSBDUkMgZXJyIGNvdW50CisgICAgRFdPUkQgICBkd0NudERlY3J5cHRFcnI7ICAgICAgICAgICAgLy8gcnggYnVmZmVyIGRhdGEgc29mdHdhcmUgY29tcGFyZSBDUkMgZXJyIGNvdW50CisgICAgRFdPUkQgICBkd0NudFJ4SUNWRXJyOyAgICAgICAgICAgICAgLy8gcnggYnVmZmVyIGRhdGEgc29mdHdhcmUgY29tcGFyZSBDUkMgZXJyIGNvdW50CisgICAgVUlOVCAgICBpZHhSeEVycm9yRGVzY1tUWVBFX01BWFJEXTsgLy8gaW5kZXggZm9yIHJ4IGRhdGEgZX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UEJZVEUgcGJ5QnVmZmVyLCBVSU5UIGNiRnJhbWVMZW5ndGgpOworCit2b2lkIFNUQXZVcGRhdGVSRFN0YXRDb3VudGVyRXgoUFNTdGF0Q291bnRlciBwU3RhdGlzdGljLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQllURSBieVJTUiwgQllURSBieU5ld1JzciwgQllURSBieVJ4UmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBCWVRFIHBieUJ1ZmZlciwgVUlOVCBjYkZyYW1lTGVuZ3RoKTsKKwordm9pZCBTVEF2VXBkYXRlVERTdGF0Q291bnRlcihQU1N0YXRDb3VudGVyIHBTdGF0aXN0aWMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJZVEUgYnlUU1IwLCBCWVRFIGJ5VFNSMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEJZVEUgcGJ5QnVmZmVyLCBVSU5UIGNiRnJhbWVMZW5ndGgsIFVJTlQgdUlkeCApOworCit2b2lkIFNUQXZVcGRhdGVURFN0YXRDb3VudGVyRXgoCisgICAgUFNTdGF0Q291bnRlciAgIHBTdGF0aXN0aWMsCisgICAgUEJZVEUgICAgICAgICAgIHBieUJ1ZmZlciwKKyAgICBEV09SRCAgICAgICAgICAgY2JGcmFtZUxlbmd0aAorICAgICk7CisKK3ZvaWQgU1RBdlVwZGF0ZTgwMl8xMUNvdW50ZXIoCisgICAgUFNEb3QxMUNvdW50ZXJzIHA4MDJfMTFDb3VudGVyLAorICAgIFBTU3RhdENvdW50ZXIgICBwU3RhdGlzdGljLAorICAgIERXT1JEICAgICAgICAgICBkd0NvdW50ZXIKKyAgICApOworCit2b2lkIFNUQXZDbGVhcjgwMl8xMUNvdW50ZXIoUFNEb3QxMUNvdW50ZXJzIHA4MDJfMTFDb3VudGVyKTsKKworI2lmZGVmIF9fY3BsdXNwbHVzCit9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRW5kIG9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Ly8gQ29udmVydCBmcm9tIERXT1JEIHRvIEJZVEVbXSBpbiBhIHBvcnRhYmxlIHdheQoreworICAgIFVJTlQgaTsKKyAgICBmb3IoaT0wOyBpPDQ7IGkrKyApCisgICAgeworICAgICAgICAqcCsrID0gKEJZVEUpICh2YWwgJiAweGZmKTsKKyAgICAgICAgdmFsID4+PSA4OworICAgIH0KK30KKyovCisKK3N0YXRpYyBWT0lEIHNfdkNsZWFyICh2b2lkKQoreworICAgIC8vIFJlc2V0IHRoZSBzdGF0ZSB0byB0aGUgZW1wdHkgbWVzc2FnZS4KKyAgICBMID0gSzA7CisgICAgUiA9IEsxOworICAgIG5CeXRlc0luTSA9IDA7CisgICAgTSA9IDA7Cit9CisKK3N0YXRpYyBWT0lEIHNfdlNldEtleSAoRFdPUkQgZHdLMCwgRFdPUkQgZHdLMSkKK3sKKyAgICAvLyBTZXQgdGhlIGtleQorICAgIEswID0gZHdLMDsKKyAgICBLMSA9IGR3SzE7CisgICAgLy8gYW5kIHJlc2V0IHRoZSBtZXNzYWdlCisgICAgc192Q2xlYXIoKTsKK30KKworc3RhdGljIFZPSUQgc192QXBwZW5kQnl0ZSAoQllURSBiKQoreworICAgIC8vIEFwcGVuZCB0aGUgYnl0ZSB0byBvdXIgd29yZC1zaXplZCBidWZmZXIKKyAgICBNIHw9IGIgPDwgKDgqbkJ5dGVzSW5NKTsKKyAgICBuQnl0ZXNJbk0rKzsKKyAgICAvLyBQcm9jZXNzIHRoZSB3b3JkIGlmIGl0IGlzIGZ1bGwuCisgICAgaWYoIG5CeXRlc0luTSA+PSA0ICkKKyAgICB7CisgICAgICAgIEwgXj0gTTsKKyAgICAgICAgUiBePSBST0wzMiggTCwgMTcgKTsKKyAgICAgICAgTCArPSBSOworICAgICAgICBSIF49ICgoTCAmIDB4ZmYwMGZmMDApID4+IDgpIHwgKChMICYgMHgwMGZmMDBmZikgPDwgOCk7CisgICAgICAgIEwgKz0gUjsKKyAgICAgICAgUiBePSBST0wzMiggTCwgM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210OworCisgICAgLy8gZGlzYWJsZSBwb3dlciBzYXZpbmcgaHcgZnVuY3Rpb24KKyAgICBNQUNiUFNXYWtldXAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgLy9jbGVhciBBdXRvU2xlZXAKKyAgICBNQUN2UmVnQml0c09mZihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1BTQ0ZHLCBQU0NGR19BVVRPU0xFRVApOworICAgIC8vY2xlYXIgSFdVVFNGCisgICAgTUFDdlJlZ0JpdHNPZmYocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19URlRDVEwsIFRGVENUTF9IV1VUU0YpOworICAgIC8vIHNldCBhbHdheXMgbGlzdGVuIGJlYWNvbgorICAgIE1BQ3ZSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19QU0NUTCwgUFNDVExfQUxCQ04pOworCisgICAgcERldmljZS0+YkVuYWJsZVBTTW9kZSA9IEZBTFNFOworCisgICAgaWYgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9JTkZSQVNUUlVDVFVSRSkgeworICAgICAgICBQU2JTZW5kTnVsbFBhY2tldChwRGV2aWNlKTsKKyAgICB9CisgICAgcERldmljZS0+YlBXQml0T24gPSBGQUxTRTsKKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqIENvbnNpZGVyIHRvIHBvd2VyIGRvd24gd2hlbiBubyBtb3JlIHBhY2tldHMgdG8gdHggb3IgcnguCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgVFJVRSwgaWYgcG93ZXIgZG93biBzdWNjZXNzCisgKiAgICBGQUxTRSwgaWYgZmFpbAorLSovCisKKworQk9PTAorUFNiQ29uc2lkZXJQb3dlckRvd24oCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIEJPT0wgYkNoZWNrUnhETUEsCisgICAgSU4gQk9PTCBiQ2h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hETUEgJiYKKyAgICAgICAgKChwRGV2aWNlLT5kd0lzciYgSVNSX1JYRE1BMCkgIT0gMCkgJiYKKyAgICAgICAgKChwRGV2aWNlLT5kd0lzciAmIElTUl9SWERNQTEpICE9IDApKXsKKyAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH07CisKKyAgICBpZiAocE1nbXQtPmVDdXJyTW9kZSAhPSBXTUFDX01PREVfSUJTU19TVEEpIHsKKyAgICAgICAgaWYgKGJDaGVja0NvdW50VG9XYWtlVXAgJiYKKyAgICAgICAgICAgKHBNZ210LT53Q291bnRUb1dha2VVcCA9PSAwIHx8IHBNZ210LT53Q291bnRUb1dha2VVcCA9PSAxKSkgeworICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgfQorICAgIH0KKworICAgIC8vIG5vIFR4LCBubyBSeCBpc3IsIG5vdyBnbyB0byBEb3plCisgICAgTUFDdlJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1BTQ1RMLCBQU0NUTF9HTzJET1pFKTsKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJHbyB0byBEb3plIFpaWlpaWlpaWlpaWlpaWlxuIik7CisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogU2VuZCBQUy1QT0xMIHBhY2tldAorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworCitWT0lECitQU3ZTZW5kUFNQT0xMKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFBTVHhNZ210UGF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gZnJhbWUKKyAgICBpZiAoY3NNZ210X3htaXQocERldmljZSwgcFR4UGFja2V0KSAhPSBDTURfU1RBVFVTX1BFTkRJTkcpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2VuZCBQUy1Qb2xsIHBhY2tldCBmYWlsZWQuLlxuIik7CisgICAgfQorICAgIGVsc2UgeworLy8gICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlNlbmQgUFMtUG9sbCBwYWNrZXQgc3VjY2Vzcy4uXG4iKTsKKyAgICB9OworCisgICAgcmV0dXJuOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqIFNlbmQgTlVMTCBwYWNrZXQgdG8gQVAgZm9yIG5vdGlmaWNhdGlvbiBwb3dlciBzdGF0ZSBvZiBTVEEKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworQk9PTAorUFNiU2VuZE51bGxQYWNrZXQoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKQoreworICAgIFBTRGV2aWNlICAgICAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU1R4TWdtdFBhY2tldCAgICAgIHBUeFBhY2tldCA9IE5VTEw7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFVJTlQgICAgICAgICAgICAgICAgdUlkeDsKKworCisgICAgaWYgKHBEZXZpY2UtPmJMaW5rUGFzcyA9PSBGQUxTRSkgeworICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorICAgICNpZmRlZiBUeEluU2xlZXAKKyAgICAgaWYgKChwRGV2aWNlLT5iRW5hYmxlUFNNb2RlID09IEZBTFNFKSAmJgorCSAgKHBEZXZpY2UtPmZUeERhdGFJblNsZWVwID09IEZBTFNFKSl7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisjZWxzZQorICAgIGlmIChwRGV2aWNlLT5iRW5hYmxlUFNNb2RlID09IEZBTFNFKSB7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisjZW5kaWYKKyAgICBpZiAocERldmljZS0+YkVuYWJsZVBTTW9kZSkgeworICAgICAgICBmb3IgKHVJZHggPSAwOyB1SWR4IDwgVFlQRV9NQVhURDsgdUlkeCArKykgeworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmlURFVzZWRbdUlkeF0gIT0gMCkKKyAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBtZW1zZXQocE1nbXQtPnBieVBTUGFja2V0UG9vbCwgMCwgc2l6ZW9mKFNUeE1nbXRQYWNrZXQpICsgV0xBTl9OVUxMREFUQV9GUl9NQVhMRU4pOworICAgIHBUeFBhY2tldCA9IChQU1R4TWdtdFBhY2tldClwTWdtdC0+cGJ5UFNQYWNrZXRQb29sOworICAgIHBUeFBhY2tldC0+cDgwMjExSGVhZGVyID0gKFBVV0xBTl84MDIxMUhEUikoKFBCWVRFKXBUeFBhY2tldCArIHNpemVvZihTVHhNZ210UGFja2V0KSk7CisKKyAgICBpZiAocERldmljZS0+YkVuYWJsZVBTTW9kZSkgeworCisgICAgICAgIHBUeFBhY2tldC0+cDgwMjExSGVhZGVyLT5zQTMud0ZyYW1lQ3RsID0gY3B1X3RvX2xlMTYoCisgICAgICAgICAgICAgKAorICAgICAgICAgICAgV0xBTl9TRVRfRkNfRlRZUEUoV0xBTl9UWVBFX0RBVEEpIHwKKyAgICAgICAgICAgIFdMQU5fU0VUX0ZDX0ZTVFlQRShXTEFOX0ZTVFlQRV9OVUxMKSB8CisgICAgICAgICAgICBXTEFOX1NFVF9GQ19QV1JNR1QoMSkKKyAgICAgICAgICAgICkpOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgcFR4UG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0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2VuZCBOdWxsIFBhY2tldCBmYWlsZWQgIVxuIik7CisgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICB9CisgICAgZWxzZSB7CisKKy8vICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiU2VuZCBOdWxsIFBhY2tldCBzdWNjZXNzLi4uLlxuIik7CisgICAgfQorCisKKyAgICByZXR1cm4gVFJVRSA7Cit9CisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiBDaGVjayBpZiBOZXh0IFRCVFQgbXVzdCB3YWtlIHVwCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworQk9PTAorUFNiSXNOZXh0VEJUVFdha2VVcCgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApCit7CisKKyAgICBQU0RldmljZSAgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIEJPT0wgICAgICAgICAgICAgICAgYldha2VVcCA9IEZBTFNFOworCisgICAgaWYgKHBNZ210LT53TGlzdGVuSW50ZXJ2YWwgPj0gMikgeworICAgICAgICBpZiAocE1nbXQtPndDb3VudFRvV2FrZVVwID09IDApIHsKKyAgICAgICAgICAgIHBNZ210LT53Q291bnRUb1dha2VVcCA9IHBNZ210LT53TGlzdGVuSW50ZXJ2YWw7CisgICAgICAgIH0KKworICAgICAgICBwTWdtdC0+d0NvdW50VG9XYWtlVXAgLS07CisKKyAgICAgICAgaWYgKHBNZ210LT53Q291bnRUb1dha2VVcCA9PSAxKSB7CisgICAgICAgICAgICAvLyBUdXJuIG9uIHdha2UgdXAgdG8gbGlzdGVuIG5leHQgYmVhY29uCisgICAgICAgICAgICBNQUN2Um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QUwgICAgICAgICAgNCAgICAgICAgIC8vIE1BWCBwb3dlciBzYXZpbmcgbGlzdGVuIGludGVydmFsCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgQ2xhc3NlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBUeXBlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvLyBJTiBQU0RldmljZSBwRGV2aWNlCisvLyBJTiBQU0RldmljZSBoRGV2aWNlQ29udGV4dAorCitCT09MCitQU2JDb25zaWRlclBvd2VyRG93bigKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gQk9PTCBiQ2hlY2tSeERNQSwKKyAgICBJTiBCT09MIGJDaGVja0NvdW50VG9XYWtlVXAKKyAgICApOworCitWT0lECitQU3ZEaXNhYmxlUG93ZXJTYXZpbmcoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKTsKKworVk9JRAorUFN2RW5hYmxlUG93ZXJTYXZpbmcoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFdPUkQgd0xpc3RlbkludGVydmFsCisgICAgKTsKKworVk9JRAorUFN2U2VuZFBTUE9MTCgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApOworCitCT09MCitQU2JTZW5kTnVsbFBhY2tldCgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApOwor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bHMuCisgKgorICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcKKyAqIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sCisgKiA1MSBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEgVVNBLgorICoKKyAqIFB1cnBvc2U6CisgKgorICogRnVuY3Rpb25zOgorICoKKyAqIFJldmlzaW9uIEhpc3Rvcnk6CisgKgorICogQXV0aG9yOiBLeWxlIEhzdQorICoKKyAqIERhdGU6IFNlcCA0LCAyMDAyCisgKgorICovCisKKyNpZiAhZGVmaW5lZChfX1JDNF9IX18pCisjaW5jbHVkZSAicmM0LmgiCisjZW5kaWYKKworVk9JRCByYzRfaW5pdChQUkM0RXh0IHBSQzQsIFBCWVRFIHBieUtleSwgVUlOVCBjYktleV9sZW4pCit7CisgICAgVUlOVCAgdXN0MSwgdXN0MjsKKyAgICBVSU5UICBrZXlpbmRleDsKKyAgICBVSU5UICBzdGF0ZWluZGV4OworICAgIFBCWVRFIHBieXN0OworICAgIFVJTlQgIGlkeDsKKworICAgIHBieXN0ID0gcFJDNC0+YWJ5c3RhdGU7CisgICAgcFJDNC0+dXggPSAwOworICAgIHBSQzQtPnV5ID0gMDsKKyAgICBmb3IgKGlkeCA9IDA7IGlkeCA8IDI1NjsgaWR4KyspCisgICAgICAgIHBieXN0W2lkeF0gPSAoQllURSlpZHg7CisgICAga2V5aW5kZXggPSAwOworICAgIHN0YXRlaW5kZXggPSAwOworICAgIGZvciAoaWR4ID0gMDsgaWR4IDwgMjU2OyBpZHgrKykgeworICAgICAgICB1c3QxID0gcGJ5c3RbaWR4XTsKKyAgICAgICAgc3RhdGVpbmRleCA9IChzdGF0ZWluZGV4ICsgcGJ5S2V5W2tleWluZGV4XSArIHVzdDEpICYgMHhmZjsKKyAgICAgICAgdXN0MiA9IHBieXN0W3N0YXRlaW5kZXhdOworICAgICAgICBwYnlzdFtzdGF0ZWluZGV4XSA9IChCWVRFKXVzdDE7CisgICAgICAgIHBieXN0W2lkeF0gPSAoQllURSl1c3QyOworICAgICAgICBpZiAoKytrZXlpbmRleCA+PSBjYktleV9sZW4pCisgICAgICAgICAgICBrZXlpbmRleCA9IDA7CisgICAgfQorfQorCitVSU5UIHJjNF9ieXRlKFBSQzRFeHQgcFJDNCkKK3sKKyAgICBVSU5UIHV4OworICAgIFVJTlQgdXk7CisgICAgVUlOVCB1c3R4LCB1c3R5OworICAgIFBCWVRFIHBieXN0OworCisgICAgcGJ5c3QgPSBwUkM0LT5hYnlzdGF0ZTsKKyAgICB1eCA9IChwUkM0LT51eCArIDEpICYgMHhmZjsKKyAgICB1c3R4ID0gcGJ5c3RbdXhdOworICAgIHV5ID0gKHVzdHggKyBwUkM0LT51eSkgJiAweGZmOworICAgIHVzdHkgPSBwYnlzdFt1eV07CisgICAgcFJDNC0+dXggPSB1eDsKKyAgICBwUkM0LT51eSA9IHV5OworICAgIHBieXN0W3V5XSA9IChCWVRFKXVzdHg7CisgICAgcGJ5c3RbdXhdID0gKEJZVEUpdXN0eTsKKworICAgIHJldHVybiBwYnlzdFsodXN0eCArIHVzdHkpICYgMHhmZl07Cit9CisKK1ZPSUQgcmM0X2VuY3J5cHQoUFJDNEV4dCBwUkM0LCBQQllURSBwYnlEZXN0LAorICAgICAgICAgICAgICAgICAgICAgUEJZVEUgcGJ5U3JjLCBVSU5UIGNiRGF0YV9sZW4pCit7CisgICAgVUlOVCBpaTsKKyAgICBmb3IgKGlpID0gMDsgaWkgPCBjYkRhdGFfbGVuOyBpaSsrKQorICAgICAgICBwYnlEZXN0W2lpXSA9IChCWVRFKShwYnlTcmNbaWldIF4gcmM0X2J5dGUocFJDNCkpOworfQpkaWZmIC0tZ2l0IGEvZHJpdmV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KiAgSW46CisgKiAgICAgIGJ5QkJUeXBlCisgKiAgICAgIGJ5UkZUeXBlCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2NlZWRlZDsgRkFMU0UgaWYgZmFpbGVkLgorICoKKyAqLworQk9PTCBSRmJJbml0ICgKKyAgICBJTiAgUFNEZXZpY2UgIHBEZXZpY2UKKyAgICApCit7CitCT09MICAgIGJSZXN1bHQgPSBUUlVFOworICAgIHN3aXRjaCAocERldmljZS0+YnlSRlR5cGUpIHsKKyAgICAgICAgY2FzZSBSRl9BSVJPSEEgOgorICAgICAgICBjYXNlIFJGX0FMMjIzMFM6CisgICAgICAgICAgICBwRGV2aWNlLT5ieU1heFB3ckxldmVsID0gQUwyMjMwX1BXUl9JRFhfTEVOOworICAgICAgICAgICAgYlJlc3VsdCA9IFJGYkFMMjIzMEluaXQocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBSRl9BSVJPSEE3MjMwIDoKKyAgICAgICAgICAgIHBEZXZpY2UtPmJ5TWF4UHdyTGV2ZWwgPSBBTDcyMzBfUFdSX0lEWF9MRU47CisgICAgICAgICAgICBiUmVzdWx0ID0gc19iQUw3MjMwSW5pdChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIFJGX05PVEhJTkcgOgorICAgICAgICAgICAgYlJlc3VsdCA9IFRSVUU7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgZGVmYXVsdCA6CisgICAgICAgICAgICBiUmVzdWx0ID0gRkFMU0U7CisgICAgICAgICAgICBicmVhazsKKyAgICB9CisgICAgcmV0dXJuIGJSZXN1bHQ7Cit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjogUkYgU2h1dERvd24gZnVuY3Rpb24KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBieUJCVHlwZQorICogICAgICBieVJGVHlwZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogVFJVRSBpZiBzdWNjZWVkZWQ7IEZBTFNFIGlmIGZhaWxlZC4KKyAqCisgKi8KK0JPT0wgUkZiU2h1dERvd24gKAorICAgIElOICBQU0RldmljZSAgcERldmljZQorICAgICkKK3sKK0JPT0wgICAgYlJlc3VsdCA9IFRSVUU7CisKKyAgICBzd2l0Y2ggKHBEZXZpY2UtPmJ5UkZUeXBlKSB7CisgICAgICAgIGNhc2UgUkZfQUlST0hBNzIzMCA6CisgICAgICAgICAgICBiUmVzdWx0ID0gSUZSRmJXcml0ZUVtYmVkZWQgKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4MUFCQUVGMDArKEJZX0FMNzIzMF9SRUdfTEVOPDwzKStJRlJFR0NUTF9SRUdXKTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0IDoKKyAgICAgICAgICAgIGJSZXN1bHQgPSBUUlVFOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIHJldHVybiBiUmVzdWx0OworfQorCisvKgorICogRGVzY3JpcHRpb246IFNlbGVjdCBjaGFubmVsCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgYnlSRlR5cGUKKyAqICAgICAgYnlDaGFubmVsICAgIC0gQ2hhbm5lbCBudW1iZXIKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IFRSVUUgaWYgc3VjY2VlZGVkOyBGQUxTRSBpZiBmYWlsZWQuCisgKgorICovCitCT09MIFJGYlNlbGVjdENoYW5uZWwgKERXT1JEX1BUUiBkd0lvQmFzZSwgQllURSBieVJGVHlwZSwgQllURSBieUNoYW5uZWwpCit7CitCT09MICAgIGJSZXN1bHQgPSBUUlVFOworICAgIHN3aXRjaCAoYnlSRlR5cGUpIHsKKworICAgICAgICBjYXNlIFJGX0FJUk9IQSA6CisgICAgICAgIGNhc2UgUkZfQUwyMjMwUzoKKyAgICAgICAgICAgIGJSZXN1bHQgPSBSRmJBTDIyMzBTZWxlY3RDaGFubmVsKGR3SW9CYXNlLCBieUNoYW5uZWwpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIC8ve3sgUm9iZXJ0WXU6IDIwMDUwMTA0CisgICAgICAgIGNhc2UgUkZfQUlST0hBNzIzMCA6CisgICAgICAgICAgICBiUmVzdWx0ID0gc19iQUw3MjMwU2VsZWN0Q2hhbm5lbChkd0lvQmFzZSwgYnlDaGFubmVsKTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAvL319IFJvYmVydFl1CisgICAgICAgIGNhc2UgUkZfTk9USElORyA6CisgICAgICAgICAgICBiUmVzdWx0ID0gVFJVRTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgYlJlc3VsdCA9IEZBTFNFOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIHJldHVybiBiUmVzdWx0OworfQorCisvKgorICogRGVzY3JpcHRpb246IFdyaXRlIFdha2VQcm9nU3luCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgLSBJL08gYmFzZSBhZGRyZXNzCisgKiAgICAgIHVDaGFubmVsICAgIC0gY2hhbm5lbCBudW1iZXIKKyAqICAgICAgYnlTbGVlcENudCAgLSBTbGVlcFByb2dTeW4gY291bnQKKyAqCisgKiBSZXR1cm4gVmFsdWU6IE5vbmUuCisgKgorICovCitCT09MIFJGdldyaXRlV2FrZVByb2dTeW4gKERXT1JEX1BUUiBkd0lvQmFzZSwgQllURSBieVJGVHlwZSwgVUlOVCB1Q2hhbm5lbCkKK3sKKyAgICBpbnQgICBpaTsKKyAgICBCWVRFICBieUluaXRDb3VudCA9IDA7CisgICAgQllURSAgYnlTbGVlcENvdW50ID0gMDsKKworICAgIFZOU3ZPdXRQ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0pOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgLy97eyBSb2JlcnRZdTogMjAwNTAxMDQKKyAgICAgICAgLy8gTmVlZCB0byBjaGVjaywgUExMT04gbmVlZCB0byBiZSBsb3cgZm9yIGNoYW5uZWwgc2V0dGluZworICAgICAgICBjYXNlIFJGX0FJUk9IQTcyMzA6CisgICAgICAgICAgICBieUluaXRDb3VudCA9IENCX0FMNzIzMF9JTklUX1NFUSArIDM7IC8vIEluaXQgUmVnICsgQ2hhbm5lbCBSZWcgKDMpCisgICAgICAgICAgICBieVNsZWVwQ291bnQgPSAwOworICAgICAgICAgICAgaWYgKGJ5SW5pdENvdW50ID4gKE1JU0NGSUZPX1NZTkRBVEFTSVpFIC0gYnlTbGVlcENvdW50KSkgeworICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKHVDaGFubmVsIDw9IENCX01BWF9DSEFOTkVMXzI0RykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCBDQl9BTDcyMzBfSU5JVF9TRVE7IGlpKysgKSB7CisgICAgICAgICAgICAgICAgICAgIE1BQ3ZTZXRNSVNDRmlmbyhkd0lvQmFzZSwgKFdPUkQpKE1JU0NGSUZPX1NZTkRBVEFfSURYICsgaWkpLCBkd0FMNzIzMEluaXRUYWJsZVtpaV0pOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCBDQl9BTDcyMzBfSU5JVF9TRVE7IGlpKysgKSB7CisgICAgICAgICAgICAgICAgICAgIE1BQ3ZTZXRNSVNDRmlmbyhkd0lvQmFzZSwgKFdPUkQpKE1JU0NGSUZPX1NZTkRBVEFfSURYICsgaWkpLCBkd0FMNzIzMEluaXRUYWJsZUFNb2RlW2lpXSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorCisgICAgICAgICAgICBNQUN2U2V0TUlTQ0ZpZm8oZHdJb0Jhc2UsIChXT1JEKShNSVNDRklGT19TWU5EQVRBX0lEWCArIGlpKSwgZHdBTDcyMzBDaGFubmVsVGFibGUwW3VDaGFubmVsLTFdKTsKKyAgICAgICAgICAgIGlpICsrOworICAgICAgICAgICAgTUFDdlNldE1JU0NGaWZvKGR3SW9CYXNlLCAoV09SRCkoTUlTQ0ZJRk9fU1lOREFUQV9JRFggKyBpaSksIGR3QUw3MjMwQ2hhbm5lbFRhYmxlMVt1Q2hhbm5lbC0xXSk7CisgICAgICAgICAgICBpaSArKzsKKyAgICAgICAgICAgIE1BQ3ZTZXRNSVNDRmlmbyhkd0lvQmFzZSwgKFdPUkQpKE1JU0NGSUZPX1NZTkRBVEFfSURYICsgaWkpLCBkd0FMNzIzMENoYW5uZWxUYWJsZTJbdUNoYW5uZWwtMV0pOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIC8vfX0gUm9iZXJ0WXUKKworICAgICAgICBjYXNlIFJGX05PVEhJTkcgOgorICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorCisgICAgTUFDdlNldE1JU0NGaWZvKGR3SW9CYXNlLCBNSVNDRklGT19TWU5JTkZPX0lEWCwgKERXT1JEKU1BS0VXT1JEKGJ5U2xlZXBDb3VudCwgYnlJbml0Q291bnQpKTsKKworICAgIHJldHVybiBUUlVFOworfQorCisvKgorICogRGVzY3JpcHRpb246IFNldCBUeCBwb3dlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGR3SW9CYXNlICAgICAgIC0gSS9PIGJhc2UgYWRkcmVzcworICogICAgICBkd1JGUG93ZXJUYWJsZSAtIFJGIF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J5T0ZETVB3clRibFt1Q0hdOworICAgICAgICBpZiAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfVVcyNDUyKSB7CisgICAgICAgICAgICBieURlYyA9IGJ5UHdyICsgMTQ7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBieURlYyA9IGJ5UHdyICsgMTA7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGJ5RGVjID49IHBEZXZpY2UtPmJ5TWF4UHdyTGV2ZWwpIHsKKyAgICAgICAgICAgIGJ5RGVjID0gcERldmljZS0+YnlNYXhQd3JMZXZlbC0xOworICAgICAgICB9CisgICAgICAgIGlmIChwRGV2aWNlLT5ieVJGVHlwZSA9PSBSRl9VVzI0NTIpIHsKKyAgICAgICAgICAgIGJ5UHdyZEJtID0gYnlEZWMgLSBieVB3cjsKKyAgICAgICAgICAgIGJ5UHdyZEJtIC89IDM7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBieVB3cmRCbSA9IGJ5RGVjIC0gYnlQd3I7CisgICAgICAgICAgICBieVB3cmRCbSA+Pj0gMTsKKyAgICAgICAgfQorICAgICAgICBieVB3cmRCbSArPSBwRGV2aWNlLT5hYnlPRkRNRGVmYXVsdFB3clt1Q0hdOworICAgICAgICBieVB3ciA9IGJ5RGVjOworLy9QTElDRV9ERUJVRy0+CisJLy9ieVB3cis9NTsKKy8vUExJQ0VfREVCVUc8LQorCisvL3ByaW50aygiUmF0ZSA8MjQ6YnlQd3IgaXMgJWRcbiIsYnlQd3IpOworCQlicmVhazsKKyAgICBjYXNlIFJBVEVfMjRNOgorICAgIGNhc2UgUkFURV8zNk06CisgICAgY2FzZSBSQVRFXzQ4TToKKyAgICBjYXNlIFJBVEVfNTRNOgorICAgICAgICBieVB3ciA9IHBEZXZpY2UtPmFieU9GRE1Qd3JUYmxbdUNIXTsKKyAgICAgICAgYnlQd3JkQm0gPSBwRGV2aWNlLT5hYnlPRkRNRGVmYXVsdFB3clt1Q0hdOworLy9QTElDRV9ERUJVRy0+CisJLy9ieVB3cis9NTsKKy8vUExJQ0VfREVCVUc8LQorLy9wcmludGsoIlJhdGUgPCA1NDpieVB3ciBpcyAlZFxuIixieVB3cik7CisJCWJyZWFrOworICAgIH0KKworI2lmIDAKKworICAgIC8vIDgwMi4xMWggVFBDCisgICAgaWYgKHBEZXZpY2UtPmJMaW5rUGFzcyA9PSBUUlVFKSB7CisgICAgICAgIC8vIGRvIG5vdCBvdmVyIGxvY2FsIGNvbnN0cmFpbnQKKyAgICAgICAgaWYgKGJ5UHdyZEJtID4gcERldmljZS0+YWJ5TG9jYWxQd3JbdUNIXSkgeworICAgICAgICAgICAgcERldmljZS0+YnlDdXJQd3JkQm0gPSBwRGV2aWNlLT5hYnlMb2NhbFB3clt1Q0hdOworICAgICAgICAgICAgYnlEZWMgPSBieVB3cmRCbSAtIHBEZXZpY2UtPmFieUxvY2FsUHdyW3VDSF07CisgICAgICAgICAgICBpZiAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfVVcyNDUyKSB7CisgICAgICAgICAgICAgICAgYnlEZWMgKj0gMzsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgYnlEZWMgPDw9IDE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoYnlQd3IgPiBieURlYykgeworICAgICAgICAgICAgICAgIGJ5UHdyIC09IGJ5RGVjOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBieVB3ciA9IDA7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBwRGV2aWNlLT5ieUN1clB3cmRCbSA9IGJ5UHdyZEJtOworICAgICAgICB9CisgICAgfSBlbHNlIHsKKyAgICAgICAgLy8gZG8gbm90IG92ZXIgcmVndWxhdG9yeSBjb25zdHJhaW50CisgICAgICAgIGlmIChieVB3cmRCbSA+IHBEZXZpY2UtPmFieVJlZ1B3clt1Q0hdKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5ieUN1clB3cmRCbSA9IHBEZXZpY2UtPmFieVJlZ1B3clt1Q0hdOworICAgICAgICAgICAgYnlEZWMgPSBieVB3cmRCbSAtIHBEZXZpY2UtPmFieVJlZ1B3clt1Q0hdOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJ5UkZUeXBlID09IFJGX1VXMjQ1MikgeworICAgICAgICAgICAgICAgIGJ5RGVjICo9IDM7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGJ5RGVjIDw8PSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGJ5UHdyID4gYnlEZWMpIHsKKyAgICAgICAgICAgICAgICBieVB3ciAtPSBieURlYzsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgYnlQd3IgPSAwOworICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgcERldmljZS0+YnlDdXJQd3JkQm0gPSBieVB3cmRCbTsKKyAgICAgICAgfQorICAgIH0KKyNlbmRpZgorCisvLyAgICBpZiAocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQjEpIHsKKyAgICBpZiAocERldmljZS0+YnlDdXJQd3IgPT0gYnlQd3IpIHsKKyAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgfQorICAgIGJSZXN1bHQgPSBSRmJSYXdTZXRQb3dlcihwRGV2aWNlLCBieVB3ciwgdVJBVEUpOworLy8gICAgfQorICAgIGlmIChiUmVzdWx0ID09IFRSVUUpIHsKKyAgICAgICBwRGV2aWNlLT5ieUN1clB3ciA9IGJ5UHdyOworICAgIH0KKyAgICByZXR1cm4gYlJlc3VsdDsKK30KKworLyoKKyAqIERlc2NyaXB0aW9uOiBTZXQgVHggcG93ZXIKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBkd0lvQmFzZSAgICAgICAtIEkvTyBiYXNlIGFkZHJlc3MKKyAqICAgICAgZHdSRlBvd2VyVGFibGUgLSBSRiBUeCBQb3dlciBTZXR0aW5nCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2NlZWRlZDsgRkFMU0UgaWYgZmFpbGVkLgorICoKKyAqLworCitCT09MIFJGYlJhd1NldFBvd2VyICgKKyAgICBJTiAgUFNEZXZpY2UgIHBEZXZpY2UsCisgICAgSU4gIEJZVEUgICAgICBieVB3ciwKKyAgICBJTiAgVUlOVCAgICAgIHVSQVRFCisgICAgKQoreworQk9PTCAgICBiUmVzdWx0ID0gVFJVRTsKK0RXT1JEICAgZHdNYXg3MjMwUHdyID0gMDsKKworICAgIGlmIChieVB3ciA+PSAgcERldmljZS0+YnlNYXhQd3JMZXZlbCkgeworICAgICAgICByZXR1cm4gKEZBTFNFKTsKKyAgICB9CisgICAgc3dpdGNoIChwRGV2aWNlLT5ieVJGVHlwZSkgeworCisgICAgICAgIGNhc2UgUkZfQUlST0hBIDoKKyAgICAgICAgICAgIGJSZXN1bHQgJj0gSUZSRmJXcml0ZUVtYmVkZWQocERldmljZS0+UG9ydE9mZnNldCwgZHdBTDIyMzBQb3dlclRhYmxlW2J5UHdyXSk7CisgICAgICAgICAgICBpZiAodVJBVEUgPD0gUkFURV8xMU0pIHsKKyAgICAgICAgICAgICAgICBiUmVzdWx0ICY9IElGUkZiV3JpdGVFbWJlZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIDB4MDAwMUI0MDArKEJZX0FMMjIzMF9SRUdfTEVOPDwzKStJRlJFR0NUTF9SRUdXKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgYlJlc3VsdCAmPSBJRlJGYldyaXRlRW1iZWRlZChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCAweDAwMDVBNDAwKyhCWV9BTDIyMzBfUkVHX0xFTjw8MykrSUZSRUdDVExfUkVHVyk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBicmVhazsKKworCisgIC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IHwgKCAoYnlQd3IpIDw8IDEyICkgfAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZX0FMNzIzMF9SRUdfTEVOIDw8IDMgKSAgfCBJRlJFR0NUTF9SRUdXOworCisgICAgICAgICAgICBiUmVzdWx0ICY9IElGUkZiV3JpdGVFbWJlZGVkKHBEZXZpY2UtPlBvcnRPZmZzZXQsIGR3TWF4NzIzMFB3cik7CisgICAgICAgICAgICBicmVhazsKKworCisgICAgICAgIGRlZmF1bHQgOgorICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIHJldHVybiBiUmVzdWx0OworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgIFRyYW5zbGF0ZSBSU1NJIHRvIGRCbQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgICAgICAtIFRoZSBhZGFwdGVyIHRvIGJlIHRyYW5zbGF0ZWQKKyAqICAgICAgYnlDdXJyUlNTSSAgICAgIC0gUlNTSSB0byBiZSB0cmFuc2xhdGVkCisgKiAgT3V0OgorICogICAgICBwZHdkYm0gICAgICAgICAgLSBUcmFuc2xhdGVkIGRibSBudW1iZXIKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCistKi8KK1ZPSUQKK1JGdlJTU0lUb2RCbSAoCisgICAgSU4gIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gIEJZVEUgICAgIGJ5Q3VyclJTU0ksCisgICAgT1VUIFBMT05HICAgIHBsZEJtCisgICAgKQoreworICAgIEJZVEUgYnlJZHggPSAoKChieUN1cnJSU1NJICYgMHhDMCkgPj4gNikgJiAweDAzKTsKKyAgICBMT05HIGIgPSAoYnlDdXJyUlNTSSAmIDB4M0YpOworICAgIExPTkcgYSA9IDA7CisgICAgQllURSBhYnlBSVJPSEFSRls0XSA9IHswLCAxOCwgMCwgNDB9OworCisgICAgc3dpdGNoIChwRGV2aWNlLT5ieVJ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EgVVNBLgorICoKKyAqCisgKiBGaWxlOiByZi5oCisgKgorICogUHVycG9zZToKKyAqCisgKiBBdXRob3I6IEplcnJ5IENoZW4KKyAqCisgKiBEYXRlOiBGZWIuIDE5LCAyMDA0CisgKgorICovCisKKworI2lmbmRlZiBfX1JGX0hfXworI2RlZmluZSBfX1JGX0hfXworCisjaWYgIWRlZmluZWQoX19UVFlQRV9IX18pCisjaW5jbHVkZSAidHR5cGUuaCIKKyNlbmRpZgorI2lmICFkZWZpbmVkKF9fREVWSUNFX0hfXykKKyNpbmNsdWRlICJkZXZpY2UuaCIKKyNlbmRpZgorLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBEZWZpbml0aW9ucyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8vCisvLyBCYXNlYmFuZCBSRiBwYWlyIGRlZmluaXRpb24gaW4gZWVwcm9tIChCaXRzIDYuLjApCisvLworI2RlZmluZSBSRl9SRk1EMjk1OSAgICAgICAgICAgICAweDAxCisjZGVmaW5lIFJGX01BWElNQUcgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgUkZfQUlST0hBICAgICAgICAgICAgICAgMHgwMworCisvLyNkZWZpbmUgUkZfR0NUNTEwMyAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBSRl9VVzI0NTEgICAgICAgICAgICAgICAweDA1CisjZGVmaW5lIFJGX01BWElNRyAgICAgICAgICAgICAgIDB4MDYKKyNkZWZpbmUgUkZfTUFYSU0yODI5ICAgICAgICAgICAgMHgwNyAvLyBSb2JlcnRZdTogMjAwNDExMTgKKyNkZWZpbmUgUkZfVVcyNDUyICAgICAgICAgICAgICAgMHgwOCAvLyBSb2JlcnRZdTogMjAwNDEyMTAKKyNkZWZpbmUgUkZfQUlST0hBNzIzMCAgICAgICAgICAgMHgwYSAvLyBSb2JlcnRZdTogMjAwNTAxMDQKKyNkZWZpbmUgUkZfVVcyNDUzICAgICAgICAgICAgICAgMHgwYgorCis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AgIDkKKyNkZWZpbmUgREFUQURVUl9CICAgICAgIDEwCisjZGVmaW5lIERBVEFEVVJfQSAgICAgICAxMQorI2RlZmluZSBEQVRBRFVSX0FfRjAgICAgMTIKKyNkZWZpbmUgREFUQURVUl9BX0YxICAgIDEzCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBTdGF0aWMgRnVuY3Rpb25zICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworCitzdGF0aWMKK1ZPSUQKK3NfdkZpbGxUeEtleSgKKyAgICBJTiAgUFNEZXZpY2UgICBwRGV2aWNlLAorICAgIElOICBQQllURSAgICAgIHBieUJ1ZiwKKyAgICBJTiAgUEJZVEUgICAgICBwYnlJVkhlYWQsCisgICAgSU4gIFBTS2V5SXRlbSAgcFRyYW5zbWl0S2V5LAorICAgIElOICBQQllURSAgICAgIHBieUhkckJ1ZiwKKyAgICBJTiAgV09SRCAgICAgICB3UGF5bG9hZExlbiwKKyAgICBPVVQgUEJZVEUgICAgICBwTUlDSERSCisgICAgKTsKKworCisKK3N0YXRpYworVk9JRAorc192RmlsbFJUU0hlYWQoCisgICAgSU4gUFNEZXZpY2UgICAgICAgICBwRGV2aWNlLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlQa3RUeXAsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwdlJUUywKKyAgICBJTiBVSU5UICAgICAgICAgICAgIGNiRnJhbWVMZW5ndGgsCisgICAgSU4gQk9PTCAgICAgICAgICAgICBiTmVlZEFjaywKKyAgICBJTiBCT09MICAgICAgICAgICAgIGJEaXNDUkMsCisgICAgSU4gUFNFdGhlcm5ldEhlYWRlciBwc0V0aEhlYWRlciwKKyAgICBJTiBXT1JEICAgICAgICAgICAgIHdDdXJyZW50UmF0ZSwKKyAgICBJTiBCWVRFICAgICAgICAgICAgIGJ5RkJPcHRpb24KKyAgICApOworCitzdGF0aWMKK1ZPSUQKK3NfdkdlbmVyYXRlVHhQYXJhbWV0ZXIoCisgICAgSU4gUFNEZXZpY2UgICAgICAgICBwRGV2aWNlLAorICAgIElOICBCWVRFICAgICAgICAgICAgYnlQa3RUeXAsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwVHhCdWZIZWFkLAorICAgIElOIFBWT0lEICAgICAgICAgICAgcHZScnZUaW1lLAorICAgIElOIFBWT0lEICAgICAgICAgICAgcHZSVFMsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwdkNUUywKKyAgICBJTiBVSU5UICAgICAgICAgICAgIGNiRnJhbWVTaXplLAorICAgIElOIEJPT0wgICAgICAgICAgICAgYk5lZWRBQ0ssCisgICAgSU4gVUlOVCAgICAgICAgICAgICB1RE1BSWR4LAorICAgIElOIFBTRXRoZXJuZXRIZWFkZXIgcHNFdGhIZWFkZXIsCisgICAgSU4gV09SRCAgICAgICAgICAgICB3Q3VycmVudFJhdGUKKyAgICApOworCisKKworc3RhdGljIHZvaWQgc192RmlsbEZyYWdQYXJhbWV0ZXIoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQQllURSAgICBwYnlCdWZmZXIsCisgICAgSU4gVUlOVCAgICAgdVR4VHlwZSwKKyAgICBJTiBQVk9JRCAgICBwdnRkQ3VyciwKKyAgICBJTiBXT1JEICAgICB3RnJhZ1R5cGUsCisgICAgSU4gVUlOVCAgICAgY2JSZXFDb3VudAorICAgICk7CisKKworc3RhdGljCitVSU5UCitzX2NiRmlsbFR4QnVmSGVhZCAoCisgICAgSU4gIFBTRGV2aWNlICAgICAgICAgcERldmljZSwKKyAgICBJTiAgQllURSAgICAgICAgICAgICBieVBrdFR5cCwKKyAgICBJTiAgUEJZVEUgICAgICAgICAgICBwYnlUeEJ1ZmZlckFkZHIsCisgICAgSU4gIFVJTlQgICAgICAgICAgICAgY2JGcmFtZUJvZHlTaXplLAorICAgIElOICBVSU5UICAgICAgICAgICAgIHVETUFJZHgsCisgICAgSU4gIFBTVHhEZXNjICAgICAgICAgcEhlYWRURCwKKyAgICBJTiAgUFNFdGhlcm5ldEhlYWRlciBwc0V0aEhlYWRlciwKKyAgICBJTiAgUEJZVEUgICAgICAgICAgICBwUGFja2V0LAorICAgIElOICBCT09MICAgICAgICAgICAgIGJOZWVkRW5jcnlwdCwKKyAgICBJTiAgUFNLZXlJdGVtICAgICAgICBwVHJhbnNtaXRLZXksCisgICAgSU4gIFVJTlQgICAgICAgICAgICAgdU5vZGVJbmRleCwKKyAgICBPVVQgUFVJTlQgICAgICAgICAgICBwdU1BQ2ZyYWdOdW0KKyAgICApOworCisKK3N0YXRpYworVUlOVAorc191RmlsbERhdGFIZWFkICgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIEJZVEUgICAgIGJ5UGt0VHlwLAorICAgIElOIFBWT0lEICAgIHBUeERhdGFIZWFkLAorICAgIElOIFVJTlQgICAgIGNiRnJhbWVMZW5ndGgsCisgICAgSU4gVUlOVCAgICAgdURNQUlkeCwKKyAgICBJTiBCT09MICAgICBiTmVlZEFjaywKKyAgICBJTiBVSU5UICAgICB1RnJhZ0lkeCwKKyAgICBJTiBVSU5UICAgICBjYkxhc3RGcmFnbWVudFNpemUsCisgICAgSU4gVUlOVCAgICAgdU1BQ2ZyYWdOdW0sCisgICAgSU4gQllURSAgICAgYnlGQk9wdGlvbiwKKyAgICBJTiBXT1JEICAgICB3Q3VycmVudFJhdGUKKyAgICApOworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworCitzdGF0aWMKK1ZPSUQKK3NfdkZpbGxUeEtleSAoCisgICAgSU4gIFBTRGV2aWNlICAgcERldmljZSwKKyAgICBJTiAgUEJZVEUgICAgICBwYnlCdWYsCisgICAgSU4gIFBCWVRFICAgICAgcGJ5SVZIZWFkLAorICAgIElOICBQU0tleUl0ZW0gIHBUcmFuc21pdEtleSwKKyAgICBJTiAgUEJZVEUgICAgICBwYnlIZHJCdWYsCisgICAgSU4gIFdPUkQgICAgICAgd1BheWxvYWRMZW4sCisgICAgT1VUIFBCWVRFICAgICAgcE1JQ0hEUgorICAgICkKK3sKKyAgICBQRFdPUkQgICAgICAgICAgcGR3SVYgPSAoUERXT1JEKSBwYnlJVkhlYWQ7CisgICAgUERXT1JEICAgICAgICAgIHBkd0V4dElWID0gKFBEV09SRCkgKChQQllURSlwYnlJVkhlYWQrNCk7CisgICAgV09SRCAgICAgICAgICAgIHdWYWx1ZTsKKyAgICBQUzgwMl8xMUhlYWRlciAgcE1BQ0hlYWRlciA9IChQUzgwMl8xMUhlYWRlcilwYnlIZHJCdWY7CisgICAgRFdPUkQgICAgICAgICAgIGR3UmV2SVZDb3VudGVyOworICAgIEJZVEUgICAgICAgICAgICBieUtleUluZGV4ID0gMDsKKworCisKKyAgICAvL0ZpbGwgVFhLRVkKKyAgICBpZiAocFRyYW5zbWl0S2V5ID09IE5VTEwpCisgICAgICAgIHJldHVybjsKKworICAgIGR3UmV2SVZDb3VudGVyID0gY3B1X3RvX2xlMzIocERldmljZS0+ZHdJVkNvdW50ZXIpOworICAgICpwZHdJViA9IHBEZXZpY2UtPmR3SVZDb3VudGVyOworICAgIGJ5S2V5SW5kZXggPSBwVHJhbnNtaXRLZXktPmR3S2V5SW5kZXggJiAweGY7CisKKyAgICBpZiAocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfV0VQKSB7CisgICAgICAgIGlmIChwVHJhbnNtaXRLZXktPnVLZXlMZW5ndGggPT0gV0xBTl9XRVAyMzJfS0VZTEVOICl7CisgICAgICAgICAgICBNRU12Q29weShwRGV2aWNlLT5hYnlQUk5HLCAoUEJZVEUpJihkd1JldklWQ291bnRlciksIDMpOworICAgICAgICAgICAgTUVNdkNvcHkocERldmljZS0+YWJ5UFJORyszLCBwVHJhbnNtaXRLZXktPmFieUtleSwgcFRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KHBieUJ1ZiwgKFBCWVRFKSYoZHdSZXZJVkNvdW50ZXIpLCAzKTsKKyAgICAgICAgICAgIE1FTXZDb3B5KHBieUJ1ZiszLCBwVHJhbnNtaXRLZXktPmFieUtleSwgcFRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoKTsKKyAgICAgICAgICAgIGlmKHBUcmFuc21pdEtleS0+dUtleUxlbmd0aCA9PSBXTEFOX1dFUDQwX0tFWUxFTikgeworICAgICAgICAgICAgICAgIE1FTXZDb3B5KHBieUJ1Zis4LCAoUEJZVEUpJihkd1JldklWQ291bnRlciksIDMpOworICAgICAgICAgICAgICAgIE1FTXZDb3B5KHBieUJ1ZisxMSwgcFRyYW5zbWl0S2V5LT5hYnlLZXksIHBUcmFuc21pdEtleS0+dUtleUxlbmd0aCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBNRU12Q29weShwRGV2aWNlLT5hYnlQUk5HLCBwYnlCdWYsIDE2KTsKKyAgICAgICAgfQorICAgICAgICAvLyBBcHBlbmQgSVYgYWZ0ZXIgTWFjIEhlYWRlcgorICAgICAgICAqcGR3SVYgJj0gV0VQX0lWX01BU0s7Ly8wMDAwMDAwMCAxMTExMTExMSAxMTExMTExMSAxMTExMTExMQorICAgICAgICAqcGR3SVYgfD0gKGJ5S2V5SW5kZXggPDwgMzApOworICAgICAgICAqcGR3SVYgPSBjcHVfdG9fbGUzMigqcGR3SVYpOworICAgICAgICBwRGV2aWNlLT5kd0lWQ291bnRlcisrOworICAgICAgICBpZiAocERldmljZS0+ZHdJVkNvdW50ZXIgPiBXRVBfSVZfTUFTSykgeworICAgICAgICAgICAgcERldmljZS0+ZHdJVkNvdW50ZXIgPSAwOworICAgICAgICB9CisgICAgfSBlbHNlIGlmIChwVHJhbnNtaXRLZXktPmJ5Q2lwaGVyU3VpdGUgPT0gS0VZX0NUTF9US0lQKSB7CisgICAgICAgIHBUcmFuc21pdEtleS0+d1RTQzE1XzArKzsKKyAgICAgICAgaWYgKHBUcmFuc21pdEtleS0+d1RTQzE1XzAgPT0gMCkgeworICAgICAgICAgICAgcFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2Kys7CisgICAgICAgIH0KKyAgICAgICAgVEtJUHZNaXhLZXkocFRyYW5zbWl0S2V5LT5hYnlLZXksIHBEZXZpY2UtPmFieUN1cnJlbnROZXRBZGRyLAorICAgICAgICAgICAgICAgICAgICBwVHJhbnNtaXRLZXktPndUU0MxNV8wLCBwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYsIHBEZXZpY2UtPmFieVBSTkcpOworICAgICAgICBNRU12Q29weShwYnlCdWYsIHBEZXZpY2UtPmFieVBSTkcsIDE2KTsKKyAgICAgICAgLy8gTWFrZSBJVgorICAgICAgICBNRU12Q29weShwZHdJViwgcERldmljZS0+YWJ5UFJORywgMyk7CisKKyAgICAgICAgKihwYnlJVkhlYWQrMykgPSAoQllURSkoKChieUtleUluZGV4IDw8IDYpICYgMHhjMCkgfCAweDIwKTsgLy8gMHgyMCBpcyBFeHRJVgorICAgICAgICAvLyBBcHBlbmQgSVYmRXh0SVYgYWZ0ZXIgTWFjIEhlYWRlcgorICAgICAgICAqcGR3RXh0SVYgPSBjcHVfdG9fbGUzMihwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYpOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPInZGaWxsVHhLZXkoKS0tLS0gcGR3RXh0SVY6ICVseFxuIiwgKnBkd0V4dElWKTsKKworICAgIH0gZWxzZSBpZiAocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfQ0NNUCkgeworICAgICAgICBwVHJhbnNtaXRLZXktPndUU0MxNV8wKys7CisgICAgICAgIGlmIChwVHJhbnNtaXRLZXktPndUU0MxNV8wID09IDApIHsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNisrOworICAgICAgICB9CisgICAgICAgIE1FTXZDb3B5KHBieUJ1ZiwgcFRyYW5zbWl0S2V5LT5hYnlLZXksIDE2KTsKKworICAgICAgICAvLyBNYWtlIElWCisgICAgICAgICpwZHdJViA9IDA7CisgICAgICAgICoocGJ5SVZIZWFkKzMpID0gKEJZVEUpKCgoYnlLZXlJbmRleCA8PCA2KSAmIDB4YzApIHwgMHgyMCk7IC8vIDB4MjAgaXMgRXh0SVYKKyAgICAgICAgKnBkd0lWIHw9IGNwdV90b19sZTE2KChXT1JEKShwVHJhbnNtaXRLZXktPndUU0MxNV8wKSk7CisgICAgICAgIC8vQXBwZW5kIElWJkV4dElWIGFmdGVyIE1hYyBIZWFkZXIKKyAgICAgICAgKnBkd0V4dElWID0gY3B1X3RvX2xlMzIocFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2KTsKKworICAgICAgICAvL0ZpbGwgTUlDSERSMAorICAgICAgICAqcE1JQ0hEUiA9IDB4NTk7CisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzEpKSA9IDA7IC8vIFR4UHJpb3JpdHkKKyAgICAgICAgTUVNdkNvcHkocE1JQ0hEUisyLCAmKHBNQUNIZWFkZXItPmFieUFkZHIyWzBdKSwgNik7CisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzgpKSA9IEhJQllURShISVdPUkQocFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2KSk7CisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzkpKSA9IExPQllURShISVdPUkQocFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2KSk7CisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzEwKSkgPSBISUJZVEUoTE9XT1JEKHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNikpOworICAgICAgICAqKChQQllURSkocE1JQ0hEUisxMSkpID0gTE9CWVRFKExPV09SRChwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTYpKTsKKyAgICAgICAgKigoUEJZVEUpKHBNSUNIRFIrMTIpKSA9IEhJQllURShwVHJhbnNtaXRLZXktPndUU0MxNV8wKTsKKyAgICAgICAgKigoUEJZVEUpKHBNSUNIRFIrMTMpKSA9IExPQllURShwVHJhbnNtaXRLZXktPndUU0MxNV8wKTsKKyAgICAgICAgKigoUEJZVEUpKHBNSUNIRFIrMTQpKSA9IEhJQllURSh3UGF5bG9hZExlbik7CisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzE1KSkgPSBMT0JZVEUod1BheWxvYWRMZW4pOworCisgICAgICAgIC8vRmlsbCBNSUNIRFIxCisgICAgICAgICooKFBCWVRFKShwTUlDSERSKzE2KSkgPSAwOyAvLyBITEVOWzE1OjhdCisgICAgICAgIGlmIChwRGV2aWNlLT5iTG9uZ0hlYWRlcikgeworICAgICAgICAgICAgKigoUEJZVEUpKHBNSUNIRFIrMTcpKSA9IDI4OyAvLyBITEVOWzc6MF0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICooKFBCWVRFKShwTUlDSERSKzE3KSkgPSAyMjsgLy8gSExFTls3OjBdCisgICAgICAgIH0KKyAgICAgICAgd1ZhbHVlID0gY3B1X3RvX2xlMTYocE1BQ0hlYWRlci0+d0ZyYW1lQ3RsICYgMHhDNzhGKTsKKyAgICAgICAgTUVNdkNvcHkocE1JQ0hEUisxOCwgKFBCWVRFKSZ3VmFsdWUsIDIpOyAvLyBNU0tGUkFDVEwKKyAgICAgICAgTUVNdkNvcHkocE1JQ0hEUisyMCwgJihwTUFDSGVhZGVyLT5hYnlBZGRyMVswXSksIDYpOworICAgICAgICBNRU12Q29weShwTUlDSERSKzI2LCAmKHBNQUNIZWFkZXItPmFieUFkZHIyWzBdKSwgNik7CisKKyAgICAgICAgLy9GaWxsIE1JQ0hEUjIKKyAgICAgICAgTUVNdkNvcHkocE1JQ0hEUiszMiwgJihwTUFDSGVhZGVyLT5hYnlBZGRyM1swXSksIDYpOworICAgICAgICB3VmFsdWUgPSBwTUFDSGVhZGVyLT53U2VxQ3RsOworICAgICAgICB3VmFsdWUgJj0gMHgwMDBGOworICAgICAgICB3VmFsdWUgPSBjcHVfdG9fbGUxNih3VmFsdWUpOworICAgICAgICBNRU12Q29weShwTUlDSERSKzM4LCAoUEJZVEUpJndWYWx1ZSwgMik7IC8vIE1TS1NFUUNUTAorICAgICAgICBpZiAocERldmljZS0+YkxvbmdIZWFkZXIpIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KHBNSUNIRFIrNDAsICYocE1BQ0hlYWRlci0+YWJ5QWRkcjRbMF0pLCA2KTsKKyAgICAgICAgfQorICAgIH0KK30KKworCitzdGF0aWMKK1ZPSUQKK3NfdlNXZW5jcnlwdGlvbiAoCisgICAgSU4gIFBTRGV2aWNlICAgICAgICAgICAgcERldmljZSwKKyAgICBJTiAgUFNLZXlJdGVtICAgICAgICAgICBwVHJhbnNtaXRLZXksCisgICAgSU4gIFBCWVRFICAgICAgICAgICAgICAgcGJ5UGF5bG9hZEhlYWQsCisgICAgSU4gIFdPUkQgICAgICAgICAgICAgICAgd1BheWxvYWRTaXplCisgICAgKQoreworICAgIFVJTlQgICBjYklDVmxlbiA9IDQ7CisgICAgRFdPUkQgIGR3SUNWID0gMHhGRkZGRkZGRkw7CisgICAgUERXT1JEIHBkd0lDVjsKKworICAgIGlmIChwVHJhbnNtaXRLZXkgPT0gTlVMTCkKKyAgICAgICAgcmV0dXJuOworCisgICAgaWYgKHBUcmFuc21pdEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1dFUCkgeworICAgICAgICAvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgICAgICAgIC8vIEFwcGVuZCBJQ1YgYWZ0ZXIgcGF5bG9hZAorICAgICAgICBkd0lDViA9IENSQ2R3R2V0Q3JjMzJFeChwYnlQYXlsb2FkSGVhZCwgd1BheWxvYWRTaXplLCBkd0lDVik7Ly9JQ1YoUGF5bG9hZCkKKyAgICAgICAgcGR3SUNWID0gKFBEV09SRCkocGJ5UGF5bG9hZEhlYWQgKyB3UGF5bG9hZFNpemUpOworICAgICAgICAvLyBmaW5hbGx5LCB3ZSBtdXN0IGludmVydCBkd0NSQyB0byBnZXQgdGhlIGNvcnJlY3QgYW5zd2VyCisgICAgICAgICpwZHdJQ1YgPSBjcHVfdG9fbGUzMih+ZHdJQ1YpOworICAgICAgICAvLyBSQzQgZW5jcnlwdGlvbgorICAgICAgICByYzRfaW5pdCgmcERldmljZS0+U0JveCwgcERldmljZS0+YWJ5UFJORywgcFRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoICsgMyk7CisgICAgICAgIHJjNF9lbmNyeXB0KCZwRGV2aWNlLT5TQm94LCBwYnlQYXlsb2FkSGVhZCwgcGJ5UGF5bG9hZEhlYWQsIHdQYXlsb2FkU2l6ZStjYklDVmxlbik7CisgICAgICAgIC8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgICB9IGVsc2UgaWYgKHBUcmFuc21pdEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1RLSVApIHsKKyAgICAgICAgLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAgICAvL0FwcGVuZCBJQ1YgYWZ0ZXIgcGF5bG9hZAorICAgICAgICBkd0lDViA9IENSQ2R3R2V0Q3JjMzJFeChwYnlQYXlsb2FkSGVhZCwgd1BheWxvYWRTaXplLCBkd0lDVik7Ly9JQ1YoUGF5bG9hZCkKKyAgICAgICAgcGR3SUNWID0gKFBEV09SRCkocGJ5UGF5bG9hZEhlYWQgKyB3UGF5bG9hZFNpemUpOworICAgICAgICAvLyBmaW5hbGx5LCB3ZSBtdXN0IGludmVydCBkd0NSQyB0byBnZXQgdGhlIGNvcnJlY3QgYW5zd2VyCisgICAgICAgICpwZHdJQ1YgPSBjcHVfdG9fbGUzMih+ZHdJQ1YpOworICAgICAgICAvLyBSQzQgZW5jcnlwdGlvbgorICAgICAgICByYzRfaW5pdCgmcERldmljZS0+U0JveCwgcERldmljZS0+YWJ5UFJORywgVEtJUF9LRVlfTEVOKTsKKyAgICAgICAgcmM0X2VuY3J5cHQoJnBEZXZpY2UtPlNCb3gsIHBieVBheWxvYWRIZWFkLCBwYnlQYXlsb2FkSGVhZCwgd1BheWxvYWRTaXplK2NiSUNWbGVuKTsKKyAgICAgICAgLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgIH0KK30KKworCisKKworLypieVBrdFR5cCA6IFBLX1RZUEVfMTFBICAgICAwCisgICAgICAgICAgICAgUEtfVFlQRV8xMUIgICAgIDEKKyAgICAgICAgICAgICBQS19UWVBFXzExR0IgICAgMgorICAgICAgICAgICAgIFBLX1RZUEVfMTFHQSAgICAzCisqLworc3RhdGljCitVSU5UCitzX3VHZXRUeFJzdlRpbWUgKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gQllURSAgICAgYnlQa3RUeXAsCisgICAgSU4gVUlOVCAgICAgY2JGcmFtZUxlbmd0aCwKKyAgICBJTiBXT1JEICAgICB3UmF0ZSwKKyAgICBJTiBCT09MICAgICBiTmVlZEFjaworICAgICkKK3sKKyAgICBVSU5UIHVEYXRhVGltZSwgdUFja1RpbWU7CisKKyAgICB1RGF0YVRpbWUgPSBCQnVHZXRGcmFtZVRpbWUocERldmljZS0+YnlQcmVhbWJsZVR5cGUsIGJ5UGt0VHlwLCBjYkZyYW1lTGVuZ3RoLCB3UmF0ZSk7CisjaWZkZWYJUExJQ0VfREVCVUcKKwkvL3ByaW50aygic191R2V0VHhSc3ZUaW1lIGlzICVkXG4iLHVEYXRhVGltZSk7CisjZW5kaWYKKyAgICBpZiAoYnlQa3RUeXAgPT0gUEtfVFlQRV8xMUIpI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ICAgICBpZiAodUZyYWdJZHggPT0gKHVNQUNmcmFnTnVtLTIpKSB7CisgICAgICAgICAgICAJdU5leHRQa3RUaW1lID0gc191R2V0VHhSc3ZUaW1lKHBEZXZpY2UsIGJ5UGt0VHlwZSwgY2JMYXN0RnJhZ21lbnRTaXplLCB3UmF0ZSwgYk5lZWRBY2spOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3UmF0ZSwgYk5lZWRBY2spOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGJOZWVkQWNrKSB7CisgICAgICAgICAgICAJdUFja1RpbWUgPSBCQnVHZXRGcmFtZVRpbWUocERldmljZS0+YnlQcmVhbWJsZVR5cGUsIGJ5UGt0VHlwZSwgMTQsIHBEZXZpY2UtPmJ5VG9wQ0NLQmFzaWNSYXRlKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gKHBEZXZpY2UtPnVTSUZTICsgdUFja1RpbWUgKyB1TmV4dFBrdFRpbWUpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gKHBEZXZpY2UtPnVTSUZTICsgdU5leHRQa3RUaW1lKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBicmVhazsKKworICAgIGNhc2UgREFUQURVUl9BOiAgICAvL0RBVEFEVVJfQQorICAgICAgICBpZiAoKCh1TUFDZnJhZ051bT09MSkpIHx8IChiTGFzdEZyYWc9PTEpKSB7Ly9Ob24gRnJhZyBvciBMYXN0IEZyYWcKKyAgICAgICAgICAgIGlmKGJOZWVkQWNrKXsKKyAgICAgICAgICAgIAl1QWNrVGltZSA9IEJCdUdldEZyYW1lVGltZShwRGV2aWNlLT5ieVByZWFtYmxlVHlwZSwgYnlQa3RUeXBlLCAxNCwgcERldmljZS0+YnlUb3BPRkRNQmFzaWNSYXRlKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gKHBEZXZpY2UtPnVTSUZTICsgdUFja1RpbWUpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsvL0ZpcnN0IEZyYWcgb3IgTWlkIEZyYWcKKyAgICAgICAgICAgIGlmKHVGcmFnSWR4ID09ICh1TUFDZnJhZ051bS0yKSl7CisgICAgICAgICAgICAJdU5leHRQa3RUaW1lID0gc191R2V0VHhSc3ZUaW1lKHBEZXZpY2UsIGJ5UGt0VHlwZSwgY2JMYXN0RnJhZ21lbnRTaXplLCB3UmF0ZSwgYk5lZWRBY2spOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3UmF0ZSwgYk5lZWRBY2spOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYoYk5lZWRBY2speworICAgICAgICAgICAgCXVBY2tUaW1lID0gQkJ1R2V0RnJhbWVUaW1lKHBEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlLCBieVBrdFR5cGUsIDE0LCBwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUpOworICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1QWNrVGltZSArIHVOZXh0UGt0VGltZSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1TmV4dFBrdFRpbWUpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBEQVRBRFVSX0FfRjA6ICAgIC8vREFUQURVUl9BX0YwCisJICAgIGlmICgoKHVNQUNmcmFnTnVtPT0xKSkgfHwgKGJMYXN0RnJhZz09MSkpIHsvL05vbiBGcmFnIG9yIExhc3QgRnJhZworICAgICAgICAgICAgaWYoYk5lZWRBY2speworICAgICAgICAgICAgCXVBY2tUaW1lID0gQkJ1R2V0RnJhbWVUaW1lKHBEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlLCBieVBrdFR5cGUsIDE0LCBwRGV2aWNlLT5ieVRvcE9GRE1CYXNpY1JhdGUpOworICAgICAgICAgICAgICAgIHJldHVybiAocERldmljZS0+dVNJRlMgKyB1QWNrVGltZSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICAgICAgfQorICAgICAgICB9CisJICAgIGVsc2UgeyAvL0ZpcnN0IEZyYWcgb3IgTWlkIEZyYWcKKwkgICAgICAgIGlmIChieUZCT3B0aW9uID09IEFVVE9fRkJfMCkgeworICAgICAgICAgICAgICAgIGlmICh3UmF0ZSA8IFJBVEVfMThNKQorICAgICAgICAgICAgICAgICAgICB3UmF0ZSA9IFJBVEVfMThNOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKHdSYXRlID4gUkFURV81NE0pCisgICAgICAgICAgICAgICAgICAgIHdSYXRlID0gUkFURV81NE07CisKKwkgICAgICAgICAgICBpZih1RnJhZ0lkeCA9PSAodU1BQ2ZyYWdOdW0tMikpeworICAgICAgICAgICAgCSAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkxhc3RGcmFnbWVudFNpemUsIHdGQl9PcHQwW0ZCX1JBVEUwXVt3UmF0ZS1SQVRFXzE4TV0sIGJOZWVkQWNrKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3RkJfT3B0MFtGQl9SQVRFMF1bd1JhdGUtUkFURV8xOE1dLCBiTmVlZEFjayk7CisgICAgICAgICAgICAgICAgfQorCSAgICAgICAgfSBlbHNlIHsgLy8gKGJ5RkJPcHRpb24gPT0gQVVUT19GQl8xKQorICAgICAgICAgICAgICAgIGlmICh3UmF0ZSA8IFJBVEVfMThNKQorICAgICAgICAgICAgICAgICAgICB3UmF0ZSA9IFJBVEVfMThNOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKHdSYXRlID4gUkFURV81NE0pCisgICAgICAgICAgICAgICAgICAgIHdSYXRlID0gUkFURV81NE07CisKKwkgICAgICAgICAgICBpZih1RnJhZ0lkeCA9PSAodU1BQ2ZyYWdOdW0tMikpeworICAgICAgICAgICAgCSAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkxhc3RGcmFnbWVudFNpemUsIHdGQl9PcHQxW0ZCX1JBVEUwXVt3UmF0ZS1SQVRFXzE4TV0sIGJOZWVkQWNrKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICB1TmV4dFBrdFRpbWUgPSBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3RkJfT3B0MVtGQl9SQVRFMF1bd1JhdGUtUkFURV8xOE1dLCBiTmVlZEFjayk7CisgICAgICAgICAgICAgICAgfQorCSAgICAgICAgfQorCisJICAgICAgICBpZihiTmVlZEFjayl7CisgICAgICAgICAgICAJdUFja1RpbWUgPSBCQnVHZXRGcmFtZVRpbWUocERldmljZS0+YnlQcmVhbWJsZVR5cGUsIGJ5UGt0VHlwZSwgMTQsIHBEZXZpY2UtPmJ5VG9wT0ZETUJhc2ljUmF0ZSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIChwRGV2aWNlLT51U0lGUyArIHVBY2tUaW1lICsgdU5leHRQa3RUaW1lKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIChwRGV2aWNlLT51U0lGUyArIHVOZXh0UGt0VGltZSk7CisgICAgICAgICAgICB9CisJICAgIH0KKyAgICAgICAgYnJlYWs7CisKKyAgICBjYXNlIERBVEFEVVJfQV9GMTogICAgLy9EQVRBRFVSX0FfRjEKKyAgICAgICAgaWYgKCgodU1BQ2ZyYWdOdW09PTEpKSB8fCAoYkxhc3RGcmFnPT0xKSkgey8vTm9uIEZyYWcgb3IgTGFzdCBGcmFnCisgICAgICAgICAgICBpZihiTmVlZEFjayl7CisgICAgICAgICAgICAJdUFja1RpbWUgPSBCQnVHZXRGcmFtZVRpbWUocERldmljZS0+YnlQcmVhbWJsZVR5cGUsIGJ5UGt0VHlwZSwgMTQsIHBEZXZpY2UtPmJ5VG9wT0ZETUJhc2ljUmF0ZSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIChwRGV2aWNlLT51U0lGUyArIHVBY2tUaW1lKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKwkgICAgZWxzZSB7IC8vRmlyc3QgRnJhZyBvciBNaWQgRnJhZworCSAgICAgICAgaWYgKGJ5RkJPcHRpb24gPT0gQVVUT19GQl8wKSB7CisgICAgICAgICAgICAgICAgaWYgKHdSYXRlIDwgUkFURV8xOE0pCisgICAgICAgICAgICAgICAgICAgIHdSYXRlID0gUkFURV8xOE07CisgICAgICAgICAgICAgICAgZWxzZSBpZiAod1JhdGUgPiBSQVRFXzU0TSkKKyAgICAgICAgICAgICAgICAgICAgd1JhdGUgPSBSQVRFXzU0TTsKKworCSAgICAgICAgICAgIGlmKHVGcmFnSWR4ID09ICh1TUFDZnJhZ051bS0yKSl7CisgICAgICAgICAgICAJICAgIHVOZXh0UGt0VGltZSA9IHNfdUdldFR4UnN2VGltZShwRGV2aWNlLCBieVBrdFR5cGUsIGNiTGFzdEZyYWdtZW50U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9PSBBVVRPX0ZCXzApICYmICh3UmF0ZSA+PSBSQVRFXzE4TSkgJiYgKHdSYXRlIDw9UkFURV81NE0pKSB7CisgICAgICAgICAgICB1RHVyVGltZSA9IHBEZXZpY2UtPnVTSUZTICsgc191R2V0VHhSc3ZUaW1lKHBEZXZpY2UsIGJ5UGt0VHlwZSwgY2JGcmFtZUxlbmd0aCwgd0ZCX09wdDBbRkJfUkFURTFdW3dSYXRlLVJBVEVfMThNXSwgYk5lZWRBY2spOworICAgICAgICB9IGVsc2UgaWYgKChieUZCT3B0aW9uID09IEFVVE9fRkJfMSkgJiYgKHdSYXRlID49IFJBVEVfMThNKSAmJiAod1JhdGUgPD1SQVRFXzU0TSkpIHsKKyAgICAgICAgICAgIHVEdXJUaW1lID0gcERldmljZS0+dVNJRlMgKyBzX3VHZXRUeFJzdlRpbWUocERldmljZSwgYnlQa3RUeXBlLCBjYkZyYW1lTGVuZ3RoLCB3RkJfT3B0MVtGQl9SQVRFMV1bd1JhdGUtUkFURV8xOE1dLCBiTmVlZEFjayk7CisgICAgICAgIH0KKyAgICAgICAgYnJlYWs7CisKKyAgICBkZWZhdWx0OgorICAgICAgICBicmVhazsKKyAgICB9CisKKyAgICByZXR1cm4gdUR1clRpbWU7CisKK30KKworCisKK3N0YXRpYworVUlOVAorc191RmlsbERhdGFIZWFkICgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIEJZVEUgICAgIGJ5UGt0VHlwLAorICAgIElOIFBWT0lEICAgIHBUeERhdGFIZWFkLAorICAgIElOIFVJTlQgICAgIGNiRnJhbWVMZW5ndGgsCisgICAgSU4gVUlOVCAgICAgdURNQUlkeCwKKyAgICBJTiBCT09MICAgICBiTmVlZEFjaywKKyAgICBJTiBVSU5UICAgICB1RnJhZ0lkeCwKKyAgICBJTiBVSU5UICAgICBjYkxhc3RGcmFnbWVudFNpemUsCisgICAgSU4gVUlOVCAgICAgdU1BQ2ZyYWdOdW0sCisgICAgSU4gQllURSAgICAg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gICAgICAgICBwQnVmLT53VHJhbnNtaXRMZW5ndGhfYiA9IGNwdV90b19sZTE2KHdMZW4pOworICAgICAgICAgICAgLy9HZXQgRHVyYXRpb24gYW5kIFRpbWVTdGFtcAorICAgICAgICAgICAgcEJ1Zi0+d0R1cmF0aW9uX2EgPSBjcHVfdG9fbGUxNigoV09SRClzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9BLCBjYkZyYW1lTGVuZ3RoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnlQa3RUeXAsIHdDdXJyZW50UmF0ZSwgYk5lZWRBY2ssIHVGcmFnSWR4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JMYXN0RnJhZ21lbnRTaXplLCB1TUFDZnJhZ051bSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5RkJPcHRpb24pKTsgLy8xOiAyLjRHSHoKKyAgICAgICAgICAgIHBCdWYtPndEdXJhdGlvbl9iID0gY3B1X3RvX2xlMTYoKFdPUkQpc191R2V0RGF0YUR1cmF0aW9uKHBEZXZpY2UsIERBVEFEVVJfQiwgY2JGcmFtZUxlbmd0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBLX1RZUEVfMTFCLCBwRGV2aWNlLT5ieVRvcENDS0Jhc2ljUmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJOZWVkQWNrLCB1RnJhZ0lkeCwgY2JMYXN0RnJhZ21lbnRTaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdU1BQ2ZyYWdOdW0sIGJ5RkJPcHRpb24pKTsgLy8xOiAyLjQKKworICAg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HBCdWYtPndUcmFuc21pdExlbmd0aCA9IGNwdV90b19sZTE2KHdMZW4pOworICAgICAgICAgICAgLy9HZXQgRHVyYXRpb24gYW5kIFRpbWVTdGFtcE9mZgorCisgICAgICAgICAgICBwQnVmLT53RHVyYXRpb24gPSBjcHVfdG9fbGUxNigoV09SRClzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9BLCBjYkZyYW1lTGVuZ3RoLCBieVBrdFR5cCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3Q3VycmVudFJhdGUsIGJOZWVkQWNrLCB1RnJhZ0lkeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYkxhc3RGcmFnbWVudFNpemUsIHVNQUNmcmFnTnVtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5RkJPcHRpb24pKTsKKworICAgICAgICAgICAgcEJ1Zi0+d1RpbWVTdGFtcE9mZiA9IGNwdV90b19sZTE2KHdUaW1lU3RhbXBPZmZbcERldmljZS0+YnlQcmVhbWJsZVR5cGUlMl1bd0N1cnJlbnRSYXRlJU1BWF9SQVRFXSk7CisgICAgICAgICAgICByZXR1cm4gKHBCdWYtPndEdXJhdGlvbik7CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSB7CisgICAgICAgICAgICBQU1R4RGF0YUhlYWRfYWIgcEJ1ZiA9IChQU1R4RGF0YUhlYWRfYWIpcFR4RGF0YUhlYWQ7CisgICAgICAgICAgICAvL0dldCBTaWduYWxGaWVsZCxTZXJ2aWNlRmllbGQsTGVuZ3RoCisgICAgICAgICAgICBCQnZDYWN1bGF0ZVBhcmFtZXRlcihwRGV2aWNlLCBjYkZyYW1lTGVuZ3RoLCB3Q3VycmVudFJhdGUsIGJ5UGt0VHlwLAorICAgICAgICAgICAgICAgIChQV09SRCkmKHdMZW4pLCAoUEJZVEUpJihwQnVmLT5ieVNlcnZpY2VGaWVsZCksIChQQllURSkmKHBCdWYtPmJ5U2lnbmFsRmllbGQpCisgICAgICAgICAgICApOworICAgICAgICAgICAgcEJ1Zi0+d1RyYW5zbWl0TGVuZ3RoID0gY3B1X3RvX2xlMTYod0xlbik7CisgICAgICAgICAgICAvL0dldCBEdXJhdGlvbiBhbmQgVGltZVN0YW1wT2ZmCisgICAgICAgICAgICBwQnVmLT53RHVyYXRpb24gPSBjcHVfdG9fbGUxNigoV09SRClzX3VHZXREYXRhRHVyYXRpb24ocERldmljZSwgREFUQURVUl9CLCBjYkZyYW1lTGVuZ3RoLCBieVBrdFR5cCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3Q3VycmVudFJhdGUsIGJOZWVkQWNrLCB1RnJhZ0lkeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYkxhc3RGcmFnbWVudFNpemUsIHVNQUNmcmFnTnVtLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5RkJPcHRpb24pKTsKKyAgICAgICAgICAgIHBCdWYtPndUaW1lU3RhbXBPZmYgPSBjcHVfdG9fbGUxNih3VGltZVN0YW1wT2ZmW3BEZXZpY2UtPmJ5UHJlYW1ibGVUeXBlJTJdW3dDdXJyZW50UmF0ZSVNQVhfUkFURV0pOworICAgICAgICAgICAgcmV0dXJuIChwQnVmLT53RHVyYXRpb24pOworICAgIH0KKyAgICByZXR1cm4gMDsKK30KKworCitzdGF0aWMKK1ZPSUQKK3NfdkZpbGxSVFNIZWFkICgKKyAgICBJTiBQU0RldmljZSAgICAgICAgIHBEZXZpY2UsCisgICAgSU4gQllURSAgICAgICAgICAgICBieVBrdFR5cCwKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHB2UlRTLAorICAgIElOIFVJTlQgICAgICA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KHBzRXRoSGVhZGVyLT5hYnlEc3RBZGRyWzBdKSwgVV9FVEhFUl9BRERSX0xFTik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBNRU12Q29weSgmKHBCdWYtPkRhdGEuYWJ5UkFbMF0pLCAmKHBEZXZpY2UtPmFieUJTU0lEWzBdKSwgVV9FVEhFUl9BRERSX0xFTik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FQKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVRBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVRBWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5U3JjQWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICBQU1JUU19nX0ZCIHBCdWYgPSAoUFNSVFNfZ19GQilwdlJUUzsKKyAgICAgICAgICAgIC8vR2V0IFNpZ25hbEZpZWxkLFNlcnZpY2VGaWVsZCxMZW5ndGgKKyAgICAgICAgICAgIEJCdkNhY3VsYXRlUGFyYW1ldGVyKHBEZXZpY2UsIHVSVFNGcmFtZUxlbiwgcERldmljZS0+YnlUb3BDQ0tCYXNpY1JhdGUsIFBLX1RZUEVfMTFCLAorICAgICAgICAgICAgICAgIChQV09SRCkmKHdMZW4pLCAoUEJZVEUpJihwQnVmLT5ieVNlcnZpY2VGaWVsZF9iKSwgKFBCWVRFKSYocEJ1Zi0+YnlTaWduYWxGaWVsZF9iKQorICAgICAgICAgICAgKTsKKyAgICAgICAgICAgIHBCdWYtPndUcmFuc21pd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b19sZTE2KChXT1JEKXNfdUdldFJUU0NUU0R1cmF0aW9uKHBEZXZpY2UsIFJUU0RVUl9BQV9GMSwgY2JGcmFtZUxlbmd0aCwgYnlQa3RUeXAsIHdDdXJyZW50UmF0ZSwgYk5lZWRBY2ssIGJ5RkJPcHRpb24pKTsgICAgLy83OndSVFNEdXJhdGlvbl9hYV9mMSwgMToyLjRHLCAxOkNDS0RhdGEKKyAgICAgICAgICAgIHBCdWYtPkRhdGEud0R1cmF0aW9uSUQgPSBwQnVmLT53RHVyYXRpb25fYWE7CisgICAgICAgICAgICAvL0dldCBSVFMgRnJhbWUgYm9keQorICAgICAgICAgICAgcEJ1Zi0+RGF0YS53RnJhbWVDb250cm9sID0gVFlQRV9DVExfUlRTOy8vMHgwMEI0CisKKyAgICAgICAgICAgIGlmICgocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5RHN0QWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FQKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVRBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgIC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ICAgIHBCdWYtPkRhdGEud0R1cmF0aW9uSUQgPSBwQnVmLT53RHVyYXRpb247CisgICAgICAgICAgICAvL0dldCBSVFMgRnJhbWUgYm9keQorICAgICAgICAgICAgcEJ1Zi0+RGF0YS53RnJhbWVDb250cm9sID0gVFlQRV9DVExfUlRTOy8vMHgwMEI0CisKKyAgICAgICAgICAgIGlmICgocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5RHN0QWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FQKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVRBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVRBWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5U3JjQWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBQU1JUU19hX0ZCIHBCdWYgPSAoUFNSVFNfYV9GQilwdlJUUzsKKyAgICA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CBSVFNEVVJfQUFfRjEsIGNiRnJhbWVMZW5ndGgsIGJ5UGt0VHlwLCB3Q3VycmVudFJhdGUsIGJOZWVkQWNrLCBieUZCT3B0aW9uKSk7IC8vNzpSVFNEdXJhdGlvbl9hYV9mMSwgMDo1RywgMDoKKyAgICAJICAgIHBCdWYtPkRhdGEud0R1cmF0aW9uSUQgPSBwQnVmLT53RHVyYXRpb247CisgICAgCSAgICAvL0dldCBSVFMgRnJhbWUgYm9keQorICAgICAgICAgICAgcEJ1Zi0+RGF0YS53RnJhbWVDb250cm9sID0gVFlQRV9DVExfUlRTOy8vMHgwMEI0CisKKyAgICAgICAgICAgIGlmICgocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApKSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5RHN0QWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BUCkgeworICAgICAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlUQVswXSksICYocERldmljZS0+YWJ5QlNTSURbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlUQVswXSksICYocHNFdGhIZWFkZXItPmFieV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BPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAgICAgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BUCkpIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlSQVswXSksICYocHNFdGhIZWFkZXItPmFieURzdEFkZHJbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlSQVswXSksICYocERldmljZS0+YWJ5QlNTSURbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlUQVswXSksICYocERldmljZS0+YWJ5QlNTSURbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocEJ1Zi0+RGF0YS5hYnlUQVswXSksICYocHNFdGhIZWFkZXItPmFieVNyY0FkZHJbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgfQorICAgIH0KK30KKworc3RhdGljCitWT0lECitzX3ZGaWxsQ1RTSGVhZCAoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBVSU5UICAgICB1RE1BSWR4LAorICAgIElOIEJZVEUgICAgIGJ5UGt0VHlwLAorICAgIElOIFBWT0lEICAgIHB2Q1RTLAorICAgIElOIFVJTlQgICAgIGNiRnJhbWVMZW5ndGgsCisgICAgSU4gQk9PTCAgICAgYk5lZWRBY2ssCisgICAgSU4gQk9PTCAgICAgYkRpc0NSQywKKyAgICBJTiBXT1JEICAgICB3Q3VycmVudFJhdGUsCisgICAgSU4gQllURSAgICAgYnlGQk9wdG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UVNdkNvcHkoJihwQnVmLT5EYXRhLmFieVJBWzBdKSwgJihwRGV2aWNlLT5hYnlDdXJyZW50TmV0QWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICB9CisgICAgfQorfQorCisKKworCisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIEdlbmVyYXRlIEZJRk8gY29udHJvbCBmb3IgTUFDICYgQmFzZWJhbmQgY29udHJvbGxlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAgICAgICAtIFBvaW50ZXIgdG8gYWRwYXRlcgorICogICAgICBwVHhEYXRhSGVhZCAgICAgLSBUcmFuc21pdCBEYXRhIEJ1ZmZlcgorICogICAgICBwVHhCdWZIZWFkICAgICAgLSBwVHhCdWZIZWFkCisgKiAgICAgIHB2UnJ2VGltZSAgICAgICAgLSBwdlJydlRpbWUKKyAqICAgICAgcHZSVFMgICAgICAgICAgICAtIFJUUyBCdWZmZXIKKyAqICAgICAgcENUUyAgICAgICAgICAgIC0gQ1RTIEJ1ZmZlcgorICogICAgICBjYkZyYW1lU2l6ZSAgICAgLSBUcmFuc21pdCBEYXRhIExlbmd0aCAoSGRyK1BheWxvYWQrRkNTKQorICogICAgICBiTmVlZEFDSyAgICAgICAgLSBJZiBuZWVkIEFDSworICogICAgICB1RGVzY0lkeCAgICAgICAgLSBEZXNjIEluZGV4CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorLSovCisvLyBVSU5UICAgICAgICAgICAgY2JGcmFtZVNpemUsLy9IZHIrUGF5bG9hZCtGQ1MKK3N0YXRpYworVk9JRAorc192R2VuZXJhdGVUeFBhcmFtZXRlciAoCisgICAgSU4gUFNEZXZpY2UgICAgICAgICBwRGV2aWNlLAorICAgIElOIEJZVEUgICAgICAgICAgICAgYnlQa3RUeXAsCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwVHhCdWZ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0ZpbGwgUnN2VGltZQorICAgICAgICAgICAgaWYgKHB2UnJ2VGltZSkgeworICAgICAgICAgICAgICAgIFBTUnJ2VGltZV9hYiBwQnVmID0gKFBTUnJ2VGltZV9hYilwdlJydlRpbWU7CisgICAgICAgICAgICAgICAgcEJ1Zi0+d1JUU1R4UnJ2VGltZSA9IGNwdV90b19sZTE2KChXT1JEKXNfdUdldFJUU0NUU1JzdlRpbWUocERldmljZSwgMCwgYnlQa3RUeXAsIGNiRnJhbWVTaXplLCB3Q3VycmVudFJhdGUpKTsvLzA6UlRTVHhScnZUaW1lX2JiLCAxOjIuNEdIegorICAgICAgICAgICAgICAgIHBCdWYtPndUeFJydlRpbWUgPSBjcHVfdG9fbGUxNigoV09SRClzX3VHZXRUeFJzdlRpbWUocERldmljZSwgUEtfVFlQRV8xMUIsIGNiRnJhbWVTaXplLCB3Q3VycmVudFJhdGUsIGJOZWVkQUNLKSk7Ly8xOkNDSworICAgICAgICAgICAgfQorICAgICAgICAgICAgLy9GaWxsIFJUUworICAgICAgICAgICAgc192RmlsbFJUU0hlYWQocERldmljZSwgYnlQa3RUeXAsIHB2UlRTLCBjYkZyYW1lU2l6ZSwgYk5lZWRBQ0ssIGJEaXNDUkMsIHBzRXRoSGVhZGVyLCB3Q3VycmVudFJhdGUsIGJ5RkJPcHRpb24pOworICAgICAgICB9CisgICAgICAgIGVsc2UgeyAvL1JUU19uZWVkbGVzcywgbm9uIFBDRiBtb2RlCisgICAgICAgICAgICAvL0ZpbGwgUnN2VGltZQorICAgICAgICAgICAgaWYgKHB2UnJ2VGltZSkgeworICAgICAgICAgICAgICAgIFBTUnJ2VGltZV9hYiBwQnVmID0gKFBTUnJ2VGltZV9hYilwdlJydlRpbWU7CisgICAgICAgICAgICAgICAgcEJ1Zi0+d1R4UnJ2VGltZSA9IGNwdV90b19sZTE2KChXT1JEKXNfdUdldFR4UnN2VGltZShwRGV2aWNlLCBQS19UWVBFXzExQiwgY2JGcmFtZVNpemUsIHdDdXJyZ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FnTnVtCisgICAgKQoreworICAgIFVJTlQgICAgICAgICAgIGNiTUFDSGRMZW47CisgICAgVUlOVCAgICAgICAgICAgY2JGcmFtZVNpemU7CisgICAgVUlOVCAgICAgICAgICAgY2JGcmFnbWVudFNpemU7IC8vSGRyKyhJVikrcGF5b2FkKyhNSUMpKyhJQ1YpK0ZDUworICAgIFVJTlQgICAgICAgICAgIGNiRnJhZ1BheWxvYWRTaXplOworICAgIFVJTlQgICAgICAgICAgIGNiTGFzdEZyYWdtZW50U2l6ZTsgLy9IZHIrKElWKStwYXlvYWQrKE1JQykrKElDVikrRkNTCisgICAgVUlOVCAgICAgICAgICAgY2JMYXN0RnJhZ1BheWxvYWRTaXplOworICAgIFVJTlQgICAgICAgICAgIHVGcmFnSWR4OworICAgIFBCWVRFICAgICAgICAgIHBieVBheWxvYWRIZWFkOworICAgIFBCWVRFICAgICAgICAgIHBieUlWSGVhZDsKKyAgICBQQllURSAgICAgICAgICBwYnlNYWNIZHI7CisgICAgV09SRCAgICAgICAgICAgd0ZyYWdUeXBlOyAvLzAwOk5vbi1GcmFnLCAwMTpTdGFydCwgMTA6TWlkLCAxMTpMYXN0CisgICAgVUlOVCAgICAgICAgICAgdUR1cmF0aW9uOworICAgIFBCWVRFICAgICAgICAgIHBieUJ1ZmZlcjsKKy8vICAgIFVJTlQgICAgICAgICAgIHVLZXlFbnRyeUlkeCA9IE5VTV9LRVlfRU5UUlkrMTsKKy8vICAgIEJZVEUgICAgICAgICAgIGJ5S2V5U2VsID0gMHhGRjsKKyAgICBVSU5UICAgICAgICAgICBjYklWbGVuID0gMDsKKyAgICBVSU5UICAgICAgICAgICBjYklDVmxlbiA9IDA7CisgICAgVUlOVCAgICAgICAgICAgY2JNSUNsZW4gPSAwOworICAgIFVJTlQgICAgICAgICAgIGNiRkNTbGVuID0gNDsKKyAgICBVSU5UICAgICAgICAgICBjYjgwMl8xX0hfbGVuID0gMDsKKyAgICBVSU5UICAgICAgICAgICB1TGVuZ3RoID0gMDsKKyAgICBVSU5UICAgICAgICAgICB1VG1wTGVuID0gMDsKKy8vICAgIEJZVEUgICAgICAgICAgIGFieVRtcFs4XTsKKy8vICAgIERXT1JEICAgICAgICAgIGR3Q1JDOworICAgIFVJTlQgICAgICAgICAgIGNiTUlDSERSID0gMDsKKyAgICBEV09SRCAgICAgICAgICBkd01JQ0tleTAsIGR3TUlDS2V5MTsKKyAgICBEV09SRCAgICAgICAgICBkd01JQ19Qcmlvcml0eTsKKyAgICBQRFdPUkQgICAgICAgICBwZHdNSUNfTDsKKyAgICBQRFdPUkQgICAgICAgICBwZHdNSUNfUjsKKyAgICBEV09SRCAgICAgICAgICBkd1NhZmVNSUNfTCwgZHdTYWZlTUlDX1I7IC8vRml4ICJMYXN0IEZyYWcgU2l6ZSIgPCAiTUlDIGxlbmd0aCIuCisgICAgQk9PTCAgICAgICAgICAgYk1JQzJGcmFnID0gRkFMU0U7CisgICAgVUlOVCAgICAgICAgICAgdU1JQ0ZyYWdMZW4gPSAwOworICAgIFVJTlQgICAgICAgICAgIHVNQUNmcmFnTnVtID0gMTsKKyAgICBVSU5UICAgICAgICAgICB1UGFkZGluZyA9IDA7CisgICAgVUlOVCAgICAgICAgICAgY2JSZXFDb3VudCA9IDA7CisKKyAgICBCT09MICAgICAgICAgICBiTmVlZEFDSzsKKyAgICBCT09MICAgICAgICAgICBiUlRTOworICAgIEJPT0wgICAgICAgICAgIGJJc0FkaG9jOworICAgIFBCWVRFICAgICAgICAgIHBieVR5cGU7CisgICAgUFNUeERlc2MgICAgICAgcHRkQ3VycjsKKyAgICBQU1R4QnVmSGVhZCAgICBwc1R4QnVmSGQgPSAoUFNUeEJ1ZkhlYWQpIHBieVR4QnVmZmVyQWRkcjsKKy8vICAgIFVJTlQgICAgICAgICAgIHRtcERlc2NJZHg7CisgICAgVUlOVCAgICAgICAgICAgY2JIZWFkZXJMZW5ndGggPSAwOworICAgIFBWT0lEICAgICAgICAgIHB2UnJ2VGltZTsKKyAgICBQU01JQ0hEUkhlYWQgICBwTUlDSERSOworICAgIFBWT0lEICAgICAgICAgIHB2UlRTOworICAgIFBWT0lEICAgICAgICAgIHB2Q1RTOworICAgIFBWT0lEICAgICAgICAgIHB2VHhEYXRhSGQ7CisgICAgV09SRCAgICAgICAgICAgd1R4QnVmU2l6ZTsgICAvLyBGRmluZm8gc2l6ZQorICAgIFVJTlQgICAgICAgICAgIHVUb3RhbENvcHlMZW5ndGggPSAwOworICAgIEJZVEUgICAgICAgICAgIGJ5RkJPcHRpb24gPSBBVVRPX0ZCX05PTkU7CisgICAgQk9PTCAgICAgICAgICAgYklzV0VQMjU2ID0gRkFMU0U7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisKKworICAgIHB2UnJ2VGltZSA9IHBNSUNIRFIgPSBwdlJUUyA9IHB2Q1RTID0gcHZUeERhdGFIZCA9IE5VTEw7CisKKyAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8ic19jYkZpbGxUeEJ1ZkhlYWQuLi5cbiIpOworICAgIGlmICgocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FQKSkgeworCisgICAgICAgIGlmIChJU19NVUxUSUNBU1RfQUREUkVTUygmKHBzRXRoSGVhZGVyLT5hYnlEc3RBZGRyWzBdKSkgfHwKKyAgICAgICAgICAgIElTX0JST0FEQ0FTVF9BRERSRVNTKCYocHNFdGhIZWFkZXItPmFieURzdEFkZHJbMF0pKSkgeworICAgICAgICAgICAgYk5lZWRBQ0sgPSBGQUxTRTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGJOZWVkQUNLID0gVFJVRTsKKyAgICAgICAgfQorICAgICAgICBiSXNBZGhvYyA9IFRSVUU7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICAvLyBNU0RVcyBpbiBJbmZyYSBtb2RlIGFsd2F5cyBuZWVkIEFDSworICAgICAgICBiTmVlZEFDSyA9IFRSVUU7CisgICAgICAgIGJJc0FkaG9jID0gRkFMU0U7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJMb25nSGVhZGVyKQorICAgICAgICBjYk1BQ0hkTGVuID0gV0xBTl9IRFJfQUREUjNfTEVOICsgNjsKKyAgICBlbHNlCisgICAgICAgIGNiTUFDSGRMZW4gPSBXTEFOX0hEUl9BRERSM19MRU47CisKKworICAgIGlmICgoYk5lZWRFbmNyeXB0ID09IFRSVUUpICYmIChwVHJhbnNtaXRLZXkgIT0gTlVMTCkpIHsKKyAgICAgICAgaWYgKHBUcmFuc21pdEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1dFUCkgeworICAgICAgICAgICAgY2JJVmxlbiA9IDQ7CisgICAgICAgICAgICBjYklDVmxlbiA9IDQ7CisgICAgICAgICAgICBpZiAocFRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoID09IFdMQU5fV0VQMjMyX0tFWUxFTikgeworICAgICAgICAgICAgICAgIGJJc1dFUDI1NiA9IFRSVUU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBUcmFuc21pdEtleS0+YnlDaXBoZXJTdWl0ZSA9PSBLRVlfQ1RMX1RLSVApIHsKKyAgICAgICAgICAgIGNiSVZsZW4gPSA4Oy8vSVYrRXh0SVYKKyAgICAgICAgICAgIGNiTUlDbGVuID0gODsKKyAgICAgICAgICAgIGNiSUNWbGVuID0gNDsKKyAgICAgICAgfQorICAgICAgICBpZiAocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfQ0NNUCkgeworICAgICAgICAgICAgY2JJVmxlbiA9IDg7Ly9SU04gSGVhZGVyCisgICAgICAgICAgICBjYklDVmxlbiA9IDg7Ly9NSUMKKyAgICAgICAgICAgIGNiTUlDSERSID0gc2l6ZW9mKFNNSUNIRFJIZWFkKTsKKyAgICAgICAgfQorICAgICAgICBpZiAocERldmljZS0+YnlMb2NhbElEID4gUkVWX0lEX1ZUMzI1M19BMSkgeworICAgICAgICAgICAgLy9NQUMgSGVhZGVyIHNob3VsZCBiZSBwYWRkaW5nIDAgdG8gRFcgYWxpZ25tZW50LgorICAgICAgICAgICAgdVBhZGRpbmcgPSA0IC0gKGNiTUFDSGRMZW4lNCk7CisgICAgICAgICAgICB1UGFkZGluZyAlPSA0OworICAgICAgICB9CisgICAgfQorCisKKyAgICBjYkZyYW1lU2l6ZSA9IGNiTUFDSGRMZW4gKyBjYklWbGVuICsgKGNiRnJhbWVCb2R5U2l6ZSArIGNiTUlDbGVuKSArIGNiSUNWbGVuICsgY2JGQ1NsZW47CisKKyAgICBpZiAoKGJOZWVkQUNLID09IEZBTFNFKSB8fAorICAgICAgICAoY2JGcmFtZVNpemUgPCBwRGV2aWNlLT53UlRTVGhyZXNob2xkKSB8fAorICAgICAgICAoKGNiRnJhbWVTaXplID49IHBEZXZpY2UtPndGcmFnbWVudGF0aW9uVGhyZXNob2xkKSAmJiAocERldmljZS0+d0ZyYWdtZW50YXRpb25UaHJlc2hvbGQgPD0gcERldmljZS0+d1JUU1RocmVzaG9sZCkpCisgICAgICAgICkgeworICAgICAgICBiUlRTID0gRkFMU0U7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBiUlRTID0gVFJVRTsKKyAgICAgICAgcHNUeEJ1ZkhkLT53RklGT0N0bCB8PSAoRklGT0NUTF9SVFMgfCBGSUZPQ1RMX0xSRVRSWSk7CisgICAgfQorICAgIC8vCisgICAgLy8gVXNlIGZvciBBVVRPIEZBTEwgQkFDSworICAgIC8vCisgICAgaWYgKHBzVHhCdWZIZC0+d0ZJRk9DdGwgJiBGSUZPQ1RMX0FVVE9fRkJfMCkgeworICAgICAgICBieUZCT3B0aW9uID0gQVVUT19GQl8wOworICAgIH0KKyAgICBlbHNlIGlmIChwc1R4QnVmSGQtPndGSUZPQ3RsICYg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IpIChwYnlUeEJ1ZmZlckFkZHIgKyB3VHhCdWZTaXplICsgc2l6ZW9mKFNScnZUaW1lX2dDVFMpICsgY2JNSUNIRFIpOworICAgICAgICAgICAgICAgIHB2VHhEYXRhSGQgPSAoUFNUeERhdGFIZWFkX2dfRkIpIChwYnlUeEJ1ZmZlckFkZHIgKyB3VHhCdWZTaXplICsgc2l6ZW9mKFNScnZUaW1lX2dDVFMpICsgY2JNSUNIRFIgKyBzaXplb2YoU0NUU19GQikpOworICAgICAgICAgICAgICAgIGNiSGVhZGVyTGVuZ3RoID0gd1R4QnVmU2l6ZSArIHNpemVvZihTUnJ2VGltZV9nQ1RTKSArIGNiTUlDSERSICsgc2l6ZW9mKFNDVFNfRkIpICsgc2l6ZW9mKFNUeERhdGFIZWFkX2dfRkIpOworICAgICAgICAgICAgfQorICAgICAgICB9IC8vIEF1dG8gRmFsbCBCYWNrCisgICAgfQorICAgIGVsc2Ugey8vODAyLjExYS9iIHBhY2tldAorCisgICAgICAgIGlmIChieUZCT3B0aW9uID09IEFVVE9fRkJfTk9ORSkgeworICAgICAgICAgICAgaWYgKGJSVFMgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgIHB2UnJ2VGltZSA9IChQU1JydlRpbWVfYWIpIChwYnlUeEJ1ZmZlckFkZHIgKyB3VHhCdWZTaXplKTsKKyAgICAgICAgICAgICAgICBwTUlDSERSID0gKFBTTUlDSERSSGVhZCkgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUgKyBzaXplb2YoU1JydlRpbWVfYWIpKTsKKyAgICAgICAgICAgICAgICBwdlJUUyA9IChQU1JUU19hYikgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUgKyBzaXplb2YoU1JydlRpbWVfYWIpICsgY2JNSUNIRFIpOworICAgICAgICAgICAgICAgIHB2Q1RTID0gTlVMTDsKKyAgICAgICAgICAgICAgICBwdlR4RGF0YUhkID0gKFBTVHhEYXRhSGVhZF9hYikgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUgKyBzaXplb2YoUFNScnZUaW1lX2FiKSArIGNiTUlDSERSICsgc2l6ZW9mKFNSVFNfYWIpKTsKKyAgICAgICAgICAgICAgICBjYkhlYWRlckxlbmd0aCA9IHdUeEJ1ZlNpemUgKyBzaXplb2YoUFNScnZUaW1lX2FiKSArIGNiTUlDSERSICsgc2l6ZW9mKFNSVFNfYWIpICsgc2l6ZW9mKFNUeERhdGFIZWFkX2FiKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeyAvL1JUU19uZWVkbGVzcywgbmVlZCBNSUNIRFIKKyAgICAgICAgICAgICAgICBwdlJydlRpbWUgPSAoUFNScnZUaW1lX2FiKSAocGJ5VHhCdWZmZXJBZGRyICsgd1R4QnVmU2l6ZSk7CisgICAgICAgICAgICAgICAgcE1JQ0hEUiA9IChQU01JQ0hEUkhlYWQpIChwYnlUeEJ1ZmZlckFkZHIgKyB3VHhCdWZTaXplICsgc2l6ZW9mKFNScnZUaW1lX2FiKSk7CisgICAgICAgICAgICAgICAgcHZSVFMgPSBOVUxMOworICAgICAgICAgICAgICAgIHB2Q1RTID0gTlVMTDsKKyAgICAgICAgICAgICAgICBwdlR4RGF0YUhkID0gKFBTVHhEYXRhSGVhZF9hYikgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUgKyBzaXplb2YoU1JydlRpbWVfYWIpICsgY2JNSUNIRFIpOworICAgICAgICAgICAgICAgIGNiSGVhZGVyTGVuZ3RoID0gd1R4QnVmU2l6ZSArIHNpemVvZihTUnJ2VGltZV9hYikgKyBjYk1JQ0hEUiArIHNpemVvZihTVHhEYXRhSGVhZF9hYik7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvLyBBdXRvIEZhbGwgQmFjaworICAgICAgICAgICAgaWYgKGJSVFMgPT0gVFJVRSkgey8vUlRTX25lZWQKKyAgICAgICAgICAgICAgICBwdlJydlRpbWUgPSAoUFNScnZUaW1lX2FiKSAocGJ5VHhCdWZmZXJBZGRyICsgd1R4QnVmU2l6ZSk7CisgICAgICAgICAgICAgICAgcE1JQ0hEUiA9IChQU01JQ0hEUkhlYWQpIChwYnlUeEJ1ZmZlckFkZHIgKyB3VHhCdWZTaXplICsgc2l6ZW9mKFNScnZUaW1lX2FiKSk7CisgICAgICAgICAgICAgICAgcHZSVFMgPSAoUFNSVFNfYV9GQikgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUgKyBzaXplb2YoU1JydlRpbWVfYWIpICsgY2JNSUNIRFIpOworICAgICAgICAgICAgICAgIHB2Q1RTID0gTlVMTDsKKyAgICAgICAgICAgICAgICBwdlR4RGF0YUhkID0gKFBTVHhEYXRhSGVhZF9hX0ZCKSAocGJ5VHhCdWZmZXJBZGRyICsgd1R4QnVmU2l6ZSArIHNpemVvZihQU1JydlRpbWVfYWIpICsgY2JNSUNIRFIgKyBzaXplb2YoU1JUU19hX0ZCKSk7CisgICAgICAgICAgICAgICAgY2JIZWFkZXJMZW5ndGggPSB3VHhCdWZTaXplICsgc2l6ZW9mKFBTUnJ2VGltZV9hYikgKyBjYk1JQ0hEUiArIHNpemVvZihTUlRTX2FfRkIpICsgc2l6ZW9mKFNUeERhdGFIZWFkX2FfRkIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7IC8vUlRTX25lZWRsZXNzCisgICAgICAgICAgICAgICAgcHZScnZUaW1lID0gKFBTUnJ2VGltZV9hYikgKHBieVR4QnVmZmVyQWRkciArIHdUeEJ1ZlNpemUpOworICAgICAgICAgICAgICAgIHBNSUNIRFIgPSAoUFNNSUNIRFJIZWFkKSAocGJ5VHhCdWZmZXJBZGRyICsgd1R4QnVmU2l6ZSArIHNpemVvZihTUnJ2VGltZV9hYikpOworICAgICAgICAgICAgICAgIHB2UlRTID0gTlVMTDsKKyAgICAgICAgICAgICAgICBwdkNUUyA9IE5VTEw7CisgICAgICAgICAgICAgICAgcH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QrKE1JQykrKElDVikrRkNTXQorICAgICAgICBjYkxhc3RGcmFnbWVudFNpemUgPSBjYk1BQ0hkTGVuICsgY2JMYXN0RnJhZ1BheWxvYWRTaXplICsgY2JJVmxlbiArIGNiSUNWbGVuICsgY2JGQ1NsZW47CisKKyAgICAgICAgZm9yICh1RnJhZ0lkeCA9IDA7IHVGcmFnSWR4IDwgdU1BQ2ZyYWdOdW07IHVGcmFnSWR4ICsrKSB7CisgICAgICAgICAgICBpZiAodUZyYWdJZHggPT0gMCkgeworICAgICAgICAgICAgICAgIC8vPT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAgICAgICAgICAgIC8vICAgIFN0YXJ0IEZyYWdtZW50YXRpb24KKyAgICAgICAgICAgICAgICAvLz09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlN0YXJ0IEZyYWdtZW50YXRpb24uLi5cbiIpOworICAgICAgICAgICAgICAgIHdGcmFnVHlwZSA9IEZSQUdDVExfU1RBRlJBRzsKKworCisgICAgICAgICAgICAgICAgLy9GaWxsIEZJRk8sUnJ2VGltZSxSVFMsYW5kIENUUworICAgICAgICAgICAgICAgIHNfdkdlbmVyYXRlVHhQYXJhbWV0ZXIocERldmljZSwgYnlQa3RUeXAsIChQVk9JRClwc1R4QnVmSGQsIHB2UnJ2VGltZSwgcHZSVFMsIHB2Q1RTLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JGcmFnbWVudFNpemUsIGJOZWVkQUNLLCB1RE1BSWR4LCBwc0V0aEhlYWRlciwgcERldmljZS0+d0N1cnJlbnRSYXRlKTsKKyAgICAgICAgICAgICAgICAvL0ZpbGwgRGF0YUhlYWQKKyAgICAgICAgICAgICAgICB1RHVyYXRpb24gPSBzX3VGaWxsRGF0YUhlYWQocERldmljZSwgYnlQa3RUeXAsIHB2VHhEYXRhSGQsIGNiRnJhZ21lbnRTaXplLCB1RE1BSWR4LCBiTmVlZEFDSywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdUZyYWdJZHgsIGNiTGFzdEZyYWdtZW50U2l6ZSwgdU1BQ2ZyYWdOdW0sIGJ5RkJPcHRpb24sIHBEZXZpY2UtPndDdXJyZW50UmF0ZSk7CisgICAgICAgICAgICAgICAgLy8gR2VuZXJhdGUgVFggTUFDIEhlYWRlcgorICAgICAgICAgICAgICAgIHZHZW5lcmF0ZU1BQ0hlYWRlcihwRGV2aWNlLCBwYnlNYWNIZHIsIChXT1JEKXVEdXJhdGlvbiwgcHNFdGhIZWFkZXIsIGJOZWVkRW5jcnlwdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd0ZyYWdUeXBlLCB1RE1BSWR4LCB1RnJhZ0lkeCk7CisKKyAgICAgICAgICAgICAgICBpZiAoYk5lZWRFbmNyeXB0ID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICAgICAgLy9GaWxsIFRYS0VZCisgICAgICAgICAgICAgICAgICAgIHNfdkZpbGxUeEtleShwRGV2aWNlLCAoUEJZVEUpKHBzVHhCdWZIZC0+YWR3VHhLZXkpLCBwYnlJVkhlYWQsIHBUcmFuc21pdEtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBieU1hY0hkciwgKFdPUkQpY2JGcmFnUGF5bG9hZFNpemUsIChQQllURSlwTUlDSERSKTsKKyAgICAgICAgICAgICAgICAgICAgLy9GaWxsIElWKEV4dElWLFJTTkhEUikKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmR3VFNDNDdfMTYgPSBwVHJhbnNtaXRLZXktPmR3VFNDNDdfMTY7CisgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndUU0MxNV8wID0gcFRyYW5zbWl0S2V5LT53VFNDMTVfMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgLy8gODAyLjFICisgICAgICAgICAgICAgICAgaWYgKG50b2hzKHBzRXRoSGVhZGVyLT53VHlwZSkgPiBNQVhfREFUQV9MRU4pIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKChwc0V0aEhlYWRlci0+d1R5cGUgPT0gVFlQRV9QS1RfSVBYKSB8fAorICAgICAgICAgICAgICAgICAgICAgICAgKHBzRXRoSGVhZGVyLT53VHlwZSA9PSBjcHVfdG9fbGUxNigweEYzODApKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkoKFBCWVRFKSAocGJ5UGF5bG9hZEhlYWQpLCAmcERldmljZS0+YWJ5U05BUF9CcmlkZ2V0dW5uZWxbMF0sIDYpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkoKFBCWVRFKSAocGJ5UGF5bG9hZEhlYWQpLCAmcERldmljZS0+YWJ5U05BUF9SRkMxMDQyWzBdLCA2KTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwYnlUeXBlID0gKFBCWVRFKSAocGJ5UGF5bG9hZEhlYWQgKyA2KTsKKyAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkocGJ5VHlwZSwgJihwc0V0aEhlYWRlci0+d1R5cGUpLCBzaXplb2YoV09SRCkpOworICAgICAgICAgICAgICAgICAgICBjYjgwMl8xX0hfbGVuID0gODsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBjYlJlcUNvdW50ID0gY2JIZWFkZXJMZW5ndGggKyBjYk1BQ0hkTGVuICsgdVBhZGRpbmcgKyBjYklWbGVuICsgY2JGcmFnUGF5bG9hZFNpemU7CisgICAgICAgICAgICAgICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICAgICAgICAvLyBTL1cgb3IgSC9XIEVuY3J5cHRpb24KKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgICAgICAgICAgIC8vRmlsbCBNSUNIRFIKKyAgICAgICAgICAgICAgICAvL2lmIChwRGV2aWNlLT5iQUVTKSB7CisgICAgICAgICAgICAgICAgLy8gICAgc192RmlsbE1JQ0hEUihwRGV2aWNlLCAoUEJZVEUpcE1JQ0hEUiwgcGJ5TWFjSGRyLCAoV09SRCljYkZyYWdQYXlsb2FkU2l6ZSk7CisgICAgICAgICAgICAgICAgLy99CisgICAgICAgICAgICAgICAgLy9jYlJlcUNvdW50ICs9IHNfdURvRW5jcnlwdGlvbihwRGV2aWNlLCBwc0V0aEhlYWRlciwgKFBWT0lEKXBzVHhCdWZIZCwgYnlLZXlTZWwsCisgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBieVBheWxvYWRIZWFkLCAoV09SRCljYkZyYWdQYXlsb2FkU2l6ZSwgdURNQUlkeCk7CisKKworCisgICAgICAgICAgICAgICAgLy9wYnlCdWZmZXIgPSAoUEJZVEUpcERldmljZS0+YWFtVHhCdWZbdURNQUlkeF1bdURlc2NJZHhdLnBieVZBZGRyOworICAgICAgICAgICAgICAgIHBieUJ1ZmZlciA9IChQQllURSlwSGVhZFRELT5wVERJbmZvLT5idWY7CisKKyAgICAgICAgICAgICAgICB1TGVuZ3RoID0gY2JIZWFkZXJMZW5ndGggKyBjYk1BQ0hkTGVuICsgdVBhZGRpbmcgKyBjYklWbGVuICsgY2I4MDJfMV9IX2xlbjsKKyAgICAgICAgICAgICAgICAvL2NvcHkgVHhCdWZmZXJIZWFkZXIgKyBNYWNIZWFkZXIgdG8gZGVzYworICAgIC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ICAgICAgaWYgKGJOZWVkRW5jcnlwdCkgeworICAgICAgICAgICAgICAgICAgICAgICAgc192U1dlbmNyeXB0aW9uKHBEZXZpY2UsIHBUcmFuc21pdEtleSwgKHBieUJ1ZmZlciArIHVMZW5ndGggLSBjYjgwMl8xX0hfbGVuKSwgKFdPUkQpY2JGcmFnUGF5bG9hZFNpemUpOworICAgICAgICAgICAgICAgICAgICAgICAgY2JSZXFDb3VudCArPSBjYklDVmxlbjsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIHB0ZEN1cnIgPSAoUFNUeERlc2MpcEhlYWRURDsKKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgICAgLy8xLlNldCBUU1IxICYgUmVxQ291bnQgaW4gVHhEZXNjSGVhZAorICAgICAgICAgICAgICAgIC8vMi5TZXQgRnJhZ0N0bCBpbiBUeEJ1ZmZlckhlYWQKKyAgICAgICAgICAgICAgICAvLzMuU2V0IEZyYW1lIENvbnRyb2wKKyAgICAgICAgICAgICAgICAvLzQuU2V0IFNlcXVlbmNlIENvbnRyb2wKKyAgICAgICAgICAgICAgICAvLzUuR2V0IFMvVyBnZW5lcmF0ZSBGQ1MKKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgICAgc192RmlsbEZyYWdQYXJhbWV0ZXIocERldmljZSwgcGJ5QnVmZmVyLCB1RE1BSWR4LCAoUFZPSUQpcHRkQ3Vyciwgd0ZyYWdUeXBlLCBjYlJlcUNvdW50KTsKKworICAgICAgICAgICAgICAgIHB0ZEN1cnItPnBUREluZm8tPmR3UmVxQ291bnQgPSBjYlJlcUNvdW50IC0gdVBhZGRpbmc7CisgICAgICAgICAgICAgICAgcHRkQ3Vyci0+cFRESW5mby0+ZHdIZWFkZXJMZW5ndGggPSBjYkhlYWRlckxlbmd0aDsKKyAgICAgICAgICAgICAgICBwdGRDdXJyLT5wVERJbmZvLT5za2JfZG1hID0gcHRkQ3Vyci0+cFRESW5mby0+YnVmX2RtYTsKKyAgICAgICAgICAgICAgICBwdGRDdXJyLT5idWZmX2FkZHIgPSBjcHVfdG9fbGUzMihwdGRDdXJyLT5wVERJbmZvLT5za2JfZG1hKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5pVERVc2VkW3VETUFJZHhdKys7CisgICAgICAgICAgICAgICAgcEhlYWRURCA9IHB0ZEN1cnItPm5leHQ7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICh1RnJhZ0lkeCA9PSAodU1BQ2ZyYWdOdW0tMSkpIHsKKyAgICAgICAgICAgICAgICAvLz09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgICAgICAgICAgICAgICAvLyAgICBMYXN0IEZyYWdtZW50YXRpb24KKyAgICAgICAgICAgICAgICAvLz09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkxhc3QgRnJhZ21lbnRhdGlvbi4uLlxuIik7CisgICAgICAgICAgICAgICAgLy90bXBEZXNjSWR4ID0gKHVEZXNjSWR4ICsgdUZyYWdJZHgpICUgcERldmljZS0+Y2JURFt1RE1BSWR4XTsKKworICAgICAgICAgICAgICAgIHdGcmFnVHlwZSA9IEZSQUdDVExfRU5ERlJBRzsKKworICAgICAgICAgICAgICAgIC8vRmlsbCBGSUZPLFJydlRpbWUsUlRTLGFuZCBDVFMKKyAgICAgICAgICAgICAgICBzX3ZHZW5lcmF0ZVR4UGFyYW1ldGVyKHBEZXZpY2UsIGJ5UGt0VHlwLCAoUFZPSUQpcHNUeEJ1ZkhkLCBwdlJydlRpbWUsIHB2UlRTLCBwdkNUUywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNiTGFzdEZyYWdtZW50U2l6ZSwgYk5lZWRBQ0ssIHVETUFJZHgsIHBzRXRoSGVhZGVyLCBwRGV2aWNlLT53Q3VycmVudFJhdGUpOworICAgICAgICAgICAgICAgIC8vRmlsbCBEYXRhSGVhZAorICAgICAgICAgICAgICAgIHVEdXJhdGlvbiA9IHNfdUZpbGxEYXRhSGVhZChwRGV2aWNlLCBieVBrdFR5cCwgcHZUeERhdGFIZCwgY2JMYXN0RnJhZ21lbnRTaXplLCB1RE1BSWR4LCBiTmVlZEFDSywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdUZyYWdJZHgsIGNiTGFzdEZyYWdtZW50U2l6ZSwgdU1BQ2ZyYWdOdW0sIGJ5RkJPcHRpb24sIHBEZXZpY2UtPndDdXJyZW50UmF0ZSk7CisKKyAgICAgICAgICAgICAgICAvLyBHZW5lcmF0ZSBUWCBNQUMgSGVhZGVyCisgICAgICAgICAgICAgICAgdkdlbmVyYXRlTUFDSGVhZGVyKHBEZXZpY2UsIHBieU1hY0hkciwgKFdPUkQpdUR1cmF0aW9uLCBwc0V0aEhlYWRlciwgYk5lZWRFbmNyeXB0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3RnJhZ1R5cGUsIHVETUFJZHgsIHVGcmFnSWR4KTsKKworICAgICAgICAgICAgICAgIGlmIChiTmVlZEVuY3J5cHQgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgICAgICAvL0ZpbGwgVFhLRVkKKyAgICAgICAgICAgICAgICAgICAgc192RmlsbFR4S2V5KHBEZXZpY2UsIChQQllURSkocHNUeEJ1ZkhkLT5hZHdUeEtleSksIHBieUlWSGVhZCwgcFRyYW5zbWl0S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJ5TWFjSGRyLCAoV09SRCljYkxhc3RGcmFnUGF5bG9hZFNpemUsIChQQllURSlwTUlDSERSKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RXRVApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdUU0M0N18xNiA9IHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1RTQzE1XzAgPSBwVHJhbnNtaXRLZXktPndUU0MxNV8wOworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIGNiUmVxQ291bnQgPSBjYkhlYWRlckxlbmd0aCArIGNiTUFDSGRMZW4gKyB1UGFkZGluZyArIGNiSVZsZW4gKyBjYkxhc3RGcmFnUGF5bG9hZFNpemU7CisgICAgICAgICAgICAgICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICAgICAgICAvLyBTL1cgb3IgSC9XIEVuY3J5cHRpb24KKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCisKKworICAgICAgICAgICAgICAgIHBieUJ1ZmZlciA9IChQQllURSlwSGVhZFRELT5wVERJbmZvLT5idWY7CisgICAgICAgICAgICAgICAgLy9wYnlCdWZmZXIgPSAoUEJZVEUpcERldmljZS0+YWFtVHhCdWZbdURNQUlkeF1bdG1wRGVzY0lkeF0ucGJ5VkFkZHI7CisKKyAgICAgICAgICAgICAgICB1TGVuZ3RoID0gY2JIZWFkZXJMZW5ndGggKyBjYk1BQ0hkTGVuICsgdVBhZGRpbmcgKyBjYklWbGVuOworCisgICAgICAgICAgICAgICAgLy9jb3B5IFR4QnVmZmVySGVhZGVyICsgTWFjSGVhZGVyIHRvIGRlc2MKKyAgICAgICAgICAgICAgICBNRU12Q29weShwYnlCdWZmZXIsIChQVk9JRClwc1R4QnVmSGQsIHVMZW5ndGgpOworCisgICAgICAgICAgICAgICAgLy8gQ29weSB0aGUgUGFja2V0IGludG8gYSB0eCBCdWZmZXIKKyAgICAgICAgICAgICAgICBpZiAoYk1JQzJGcmFnID09IEZBTFNFKSB7CisKKyAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkoKHBieUJ1ZmZlciArIHVMZW5ndGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocFBhY2tldCArIDE0ICsgdVRvdGFsQ29weUxlbmd0aCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjYkxhc3RGcmFnUGF5bG9hZFNpemUgLSBjYk1JQ2xlbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgICAgICAgICAgLy9UT0RPIGNoZWNrIHVUbXBMZW4gIQorICAgICAgICAgICAgICAgICAgICB1VG1wTGVuID0gY2JMYXN0RnJhZ1BheWxvYWRTaXplIC0gY2JNSUNsZW47CisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKChiTmVlZEVuY3J5cHQgPT0gVFJVRSkgJiYgKHBUcmFuc21pdEtleSAhPSBOVUxMKSAmJiAocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfVEtJUCkpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJMQVNUOiB1TUlDRnJhZ0xlbjolZCwgY2JMYXN0RnJhZ1BheWxvYWRTaXplOiVkLCB1VG1wTGVuOiVkXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1TUlDRnJhZ0xlbiwgY2JMYXN0RnJhZ1BheWxvYWRTaXplLCB1VG1wTGVuKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoYk1JQzJGcmFnID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAodVRtcExlbiAhPSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1JQ192QXBwZW5kKChwYnlCdWZmZXIgKyB1TGVuZ3RoKSwgdVRtcExlbik7CisgICAgICAgICAgICAgICAgICAgICAgICBwZHdNSUNfTCA9IChQRFdPUkQpKHBieUJ1ZmZlciArIHVMZW5ndGggKyB1VG1wTGVuKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBkd01JQ19SID0gKFBEV09SRCkocGJ5QnVmZmVyICsgdUxlbmd0aCArIHVUbXBMZW4gKyA0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIE1JQ192R2V0TUlDKHBkd01JQ19MLCBwZHdNSUNfUik7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkxhc3QgTUlDOiVsWCwgJWxYXG4iLCAqcGR3TUlDX0wsICpwZHdNSUNfUik7CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAodU1JQ0ZyYWdMZW4gPj0gNCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1FTXZDb3B5KChwYnlCdWZmZXIgKyB1TGVuZ3RoKSwgKChQQllURSkmZHdTYWZlTUlDX1IgKyAodU1JQ0ZyYWdMZW4gLSA0KSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNiTUlDbGVuIC0gdU1JQ0ZyYWdMZW4pKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkxBU1Q6IHVNSUNGcmFnTGVuID49IDQ6ICVYLCAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKFBCWVRFKSgoUEJZVEUpJmR3U2FmZU1JQ19SICsgKHVNSUNGcmFnTGVuIC0gNCkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjYk1JQ2xlbiAtIHVNSUNGcmFnTGVuKSk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkoKHBieUJ1ZmZlciArIHVMZW5ndGgpLCAoKFBCWVRFKSZkd1NhZmVNSUNfTCArIHVNSUNGcmFnTGVuKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAtIHVNSUNGcmFnTGVuKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkoKHBieUJ1ZmZlciArIHVMZW5ndGggKyAoNCAtIHVNSUNGcmFnTGVuKSksICZkd1NhZmVNSUNfUiwgNCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJMQVNUOiB1TUlDRnJhZ0xlbiA8IDQ6ICVYLCAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKFBCWVRFKSgoUEJZVEUpJmR3U2FmZU1JQ19SICsgdU1JQ0ZyYWdMZW4gLSA0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2JNSUNsZW4gLSB1TUlDRnJhZ0xlbikpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IGNiTGFzdEZyYWdQYXlsb2FkU2l6ZSArIDggKyAyNDsgaWkrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iJTAyeCAiLCAqKChQQllURSkoKHBieUJ1ZmZlciArIHVMZW5ndGgpICsgaWkgLSA4IC0gMjQpKSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlxuXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgTUlDX3ZVbkluaXQoKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBBU1NFUlQodVRtcExlbiA9PSAoY2JMYXN0RnJhZ1BheWxvYWRTaXplIC0gY2JNSUNsZW4pKTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgICAgLy8gUy9XIEVuY3J5cHRpb24KKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgICAgICAgICAgIGlmICgocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQTEpKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChiTmVlZEVuY3J5cHQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNfdlNXZW5jcnlwdGlvbihwRGV2aWNlLCBwVHJhbnNtaXRLZXksIChwYnlCdWZmZXIgKyB1TGVuZ3RoKSwgKFdPUkQpY2JMYXN0RnJhZ1BheWxvYWRTaXplKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNiUmVxQ291bnQgKz0gY2JJQ1ZsZW47CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBwdGRDdXJyID0gKFBTVHhEZXNjKXBIZWFkVEQ7CisKKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgICAgLy8xLlNldCBUU1IxICYgUmVxQ291bnQgaW4gVHhEZXNjSGVhZAorICAgICAgICAgICAgICAgIC8vMi5TZXQgRnJhZ0N0bCBpbiBUeEJ1ZmZlckhlYWQKKyAgICAgICAgICAgICAgICAvLzMuU2V0IEZyYW1lIENvbnRyb2wKKyAgICAgICAgICAgICAgICAvLzQuU2V0IFNlcXVlbmNlIENvbnRyb2wKKyAgICAgICAgICAgICAgICAvLzUuR2V0IFMvVyBnZW5lcmF0ZSBGQ1MKKyAgICAgICAgICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tCisKKworICAgICAgICAgICAgICAgIHNfdkZpbGxGcmFnUGFyYW1ldGVyKHBEZXZpY2UsIHBieUJ1ZmZlciwgdURNQUlkeCwgKFBWT0lEKXB0ZEN1cnIsIHdGcmFnVHlwZSwgY2JSZXFDb3VudCk7CisKKyAgICAgICAgICAgICAgICBwdGRDdXJyLT5wVERJbmZvLT5kd1JlcUNvdW50ID0gY2JSZXFDb3VudCAtIHVQYWRkaW5nOworICAgICAgICAgICAgICAgIHB0ZEN1cnItPnBUREluZm8tPmR3SGVhZGVyTGVuZ3RoID0gY2JIZWFkZXJMZW5ndGg7CisgICAgICAgICAgICAgICAgcHRkQ3Vyci0+cFRESW5mby0+c2tiX2RtYSA9IHB0ZEN1cnItPnBUREluZm8tPmJ1Zl9kbWE7CisgICAgICAgICAgICAgICAgcHRkQ3Vyci0+YnVmZl9hZGRyID0gY3B1X3RvX2xlMzIocHRkQ3Vyci0+cFRESW5mby0+c2tiX2RtYSk7CisgICAgICAgICAgICAgICAgcERldmljZS0+aVREVXNlZFt1RE1BSWR4XSsrOworICAgICAgICAgICAgICAgIHBIZWFkVEQgPSBwdGRDdXJyLT5uZXh0OworCisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLz09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgICAgICAgICAgICAgICAvLyAgICBNaWRkbGUgRnJhZ21lbnRhdGlvbgorICAgICAgICAgICAgICAgIC8vPT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iTWlkZGxlIEZyYWdtZW50YXRpb24uLi5cbiIpOworICAgICAgICAgICAgICAgIC8vdG1wRGVzY0lkeCA9ICh1RGVzY0lkeCArIHVGcmFnSWR4KSAlIHBEZXZpY2UtPmNiVERbdURNQUlkeF07CisKKyAgICAgICAgICAgICAgICB3RnJhZ1R5cGUgPSBGUkFHQ1RMX01JREZSQUc7CisKKyAgICAgICAgICAgICAgICAvL0ZpbGwgRklGTyxScnZUaW1lLFJUUyxhbmQgQ1RTCisgICAgICAgICAgICAgICAgc192R2VuZXJhdGVUeFBhcmFtZXRlcihwRGV2aWNlLCBieVBrdFR5cCwgKFBWT0lEKXBzVHhCdWZIZCwgcHZScnZUaW1lLCBwdlJUUywgcHZDVFMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYkZyYWdtZW50U2l6ZSwgYk5lZWRBQ0ssIHVETUFJZHgsIHBzRXRoSGVhZGVyLCBwRGV2aWNlLT53Q3VycmVudFJhdGUpOworICAgICAgICAgICAgICAgIC8vRmlsbCBEYXRhSGVhZAorICAgICAgICAgICAgICAgIHVEdXJhdGlvbiA9IHNfdUZpbGxEYXRhSGVhZChwRGV2aWNlLCBieVBrdFR5cCwgcHZUeERhdGFIZCwgY2JGcmFnbWVudFNpemUsIHVETUFJZHgsIGJOZWVkQUNLLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1RnJhZ0lkeCwgY2JMYXN0RnJhZ21lbnRTaXplLCB1TUFDZnJhZ051bSwgYnlGQk9wdGlvbiwgcERldmljZS0+d0N1cnJlbnRSYXRlKTsKKworICAgICAgICAgICAgICAgIC8vIEdlbmVyYXRlIFRYIE1BQyBIZWFkZXIKKyAgICAgICAgICAgICAgICB2R2VuZXJhdGVNQUNIZWFkZXIocERldmljZSwgcGJ5TWFjSGRyLCAoV09SRCl1RHVyYXRpb24sIHBzRXRoSGVhZGVyLCBiTmVlZEVuY3J5cHQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdGcmFnVHlwZSwgdURNQUlkeCwgdUZyYWdJZHgpOworCisKKyAgICAgICAgICAgICAgICBpZiAoYk5lZWRFbmNyeXB0ID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICAgICAgLy9GaWxsIFRYS0VZCisgICAgICAgICAgICAgICAgICAgIHNfdkZpbGxUeEtleShwRGV2aWNlLCAoUEJZVEUpKHBzVHhCdWZIZC0+YWR3VHhLZXkpLCBwYnlJVkhlYWQsIHBUcmFuc21pdEtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBieU1hY0hkciwgKFdPUkQpY2JGcmFnUGF5bG9hZFNpemUsIChQQllURSlwTUlDSERSKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RXRVApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdUU0M0N18xNiA9IHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1RTQzE1XzAgPSBwVHJhbnNtaXRLZXktPndUU0MxNV8wOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgY2JSZXFDb3VudCA9IGNiSGVhZGVyTGVuZ3RoICsgY2JNQUNIZExlbiArIHVQYWRkaW5nICsgY2JJVmxlbiArIGNiRnJhZ1BheWxvYWRTaXplOworICAgICAgICAgICAgICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgICAgLy8gUy9XIG9yIEgvVyBFbmNyeXB0aW9uCisgICAgICAgICAgICAgICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICAgICAgICAvL0ZpbGwgTUlDSERSCisgICAgICAgICAgICAgICAgLy9pZiAocERldmljZS0+YkFFUykgeworICAgICAgICAgICAgICAgIC8vICAgIHNfdkZpbGxNSUNIRFIocERldmljZSwgKFBCWVRFKXBNSUNIRFIsIHBieU1hY0hkciwgKFdPUkQpY2JGcmFnUGF5bG9hZFNpemUpOworICAgICAgICAgICAgICAgIC8vfQorICAgICAgICAgICAgICAgIC8vY2JSZXFDb3VudCArPSBzX3VEb0VuY3J5cHRpb24ocERldmljZSwgcHNFdGhIZWFkZXIsIChQVk9JRClwc1R4QnVmSGQsIGJ5S2V5U2VsLAorICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGJ5UGF5bG9hZEhlYWQsIChXT1JEKWNiRnJhZ1BheWxvYWRTaXplLCB1RE1BSWR4KTsKKworCisgICAgICAgICAgICAgICAgcGJ5QnVmZmVyID0gKFBCWVRFKXBIZWFkVEQtPnBUREluZm8tPmJ1ZjsKKyAgICAgICAgICAgICAgICAvL3BieUJ1ZmZlciA9IChQQllURSlwRGV2aWNlLT5hYW1UeEJ1Zlt1RE1BSWR4XVt0bXBEZXNjSWR4XS5wYnlWQWRkcjsKKworCisgICAgICAgICAgICAgICAgdUxlbmd0aCA9IGNiSGVhZGVyTGVuZ3RoICsgY2JNQUNIZExlbiArIHVQYWRkaW5nICsgY2JJVmxlbjsKKworICAgICAgICAgICAgICAgIC8vY29weSBUeEJ1ZmZlckhlYWRlciArIE1hY0hlYWRlciB0byBkZXNjCisgICAgICAgICAgICAgICAgTUVNdkNvcHkocGJ5QnVmZmVyLCAoUFZPSUQpcHNUeEJ1ZkhkLCB1TGVuZ3RoKTsKKworICAgICAgICAgICAgICAgIC8vIENvcHkgdGhlIFBhY2tldCBpbnRvIGEgdHggQnVmZmVyCisgICAgICAgICAgICAgICAgTUVNdkNvcHkoKHBieUJ1ZmZlciArIHVMZW5ndGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgIChwUGFja2V0ICsgMTQgKyB1VG90YWxDb3B5TGVuZ3RoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjYkZyYWdQYXlsb2FkU2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgICAgICB1VG1wTGVuID0gY2JGcmFnUGF5bG9hZFNpemU7CisKKyAgICAgICAgICAgICAgICB1VG90YWxDb3B5TGVuZ3RoICs9IHVUbXBMZW47CisKKyAgICAgICAgICAgICAgICBpZiAoKGJOZWVkRW5jcnlwdCA9PSBUUlVFKSAmJiAocFRyYW5zbWl0S2V5ICE9IE5VTEwpICYmIChwVHJhbnNtaXRLZXktPmJ5Q2lwaGVyU3VpdGUgPT0gS0VZX0NUTF9US0lQKSkgeworCisgICAgICAgICAgICAgICAgICAgIE1JQ192QXBwZW5kKChwYnlCdWZmZXIgKyB1TGVuZ3RoKSwgdVRtcExlbik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKHVUbXBMZW4gPCBjYkZyYWdQYXlsb2FkU2l6ZSkgeworICAgICAgICAgICAgICAgICAgICAgICAgYk1JQzJGcmFnID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVNSUNGcmFnTGVuID0gY2JGcmFnUGF5bG9hZFNpemUgLSB1VG1wTGVuOworICAgICAgICAgICAgICAgICAgICAgICAgQVNTRVJUKHVNSUNGcmFnTGVuIDwgY2JNSUNsZW4pOworCisgICAgICAgICAgICAgICAgICAgICAgICBwZHdNSUNfTCA9IChQRFdPUkQpKHBieUJ1ZmZlciArIHVMZW5ndGggKyB1VG1wTGVuKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBkd01JQ19SID0gKFBEV09SRCkocGJ5QnVmZmVyICsgdUxlbmd0aCArIHVUbXBMZW4gKyA0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIE1JQ192R2V0TUlDKHBkd01JQ19MLCBwZHdNSUNfUik7CisgICAgICAgICAgICAgICAgICAgICAgICBkd1NhZmVNSUNfTCA9ICpwZHdNSUNfTDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGR3U2FmZU1JQ19SID0gKnBkd01JQ19SOworCisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIk1JRERMRTogdU1JQ0ZyYWdMZW46JWQsIGNiRnJhZ1BheWxvYWRTaXplOiVkLCB1VG1wTGVuOiVkXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdU1JQ0ZyYWdMZW4sIGNiRnJhZ1BheWxvYWRTaXplLCB1VG1wTGVuKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRmlsbCBNSUMgaW4gTWlkZGxlIGZyYWcgWyVkXVxuIiwgdU1JQ0ZyYWdMZW4pOworICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHVNSUNGcmFnTGVuOyBpaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIlMDJ4ICIsICooKFBCWVRFKSgocGJ5QnVmZmVyICsgdUxlbmd0aCArIHVUbXBMZW4pICsgaWkpKSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlxuIik7CisgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJHZXQgTUlDOiVsWCwgJWxYXG4iLCAqcGR3TUlDX0wsICpwZHdNSUNfUik7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJNaWRkbGUgZnJhZyBsZW46ICVkXG4iLCB1VG1wTGVuKTsKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgdVRtcExlbjsgaWkrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyIlMDJ4ICIsICooKFBCWVRFKSgocGJ5QnVmZmVyICsgdUxlbmd0aCkgKyBpaSkpKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlxuXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgKi8KKworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIEFTU0VSVCh1VG1wTGVuID09IChjYkZyYWdQYXlsb2FkU2l6ZSkpOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGlmICgocERldmljZS0+YnlMb2NhbElEIDw9IFJFVl9JRF9WVDMyNTNfQTEpKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChiTmVlZEVuY3J5cHQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNfdlNXZW5jcnlwdGlvbihwRGV2aWNlLCBwVHJhbnNtaXRLZXksIChwYnlCdWZmZXIgKyB1TGVuZ3RoKSwgKFdPUkQpY2JGcmFnUGF5bG9hZFNpemUpOworICAgICAgICAgICAgICAgICAgICAgICAgY2JSZXFDb3VudCArPSBjYklDVmxlbjsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIHB0ZEN1cnIgPSAoUFNUeERlc2MpcEhlYWRURDsKKworICAgICAgICAgICAgICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICAgICAgICAvLzEuU2V0IFRTUjEgJiBSZXFDb3VudCBpbiBUeERlc2NIZWFkCisgICAgICAgICAgICAgICAgLy8yLlNldCBGcmFnQ3RsIGluIFR4QnVmZmVySGVhZAorICAgICAgICAgICAgICAgIC8vMy5TZXQgRnJhbWUgQ29udHJvbAorICAgICAgICAgICAgICAgIC8vNC5TZXQgU2VxdWVuY2UgQ29udHJvbAorICAgICAgICAgICAgICAgIC8vNS5HZXQgUy9XIGdlbmVyYXRlIEZDUworICAgICAgICAgICAgICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0KKworICAgICAgICAgICAgICAgIHNfdkZpbGxGcmFnUGFyYW1ldGVyKHBEZXZpY2UsIHBieUJ1ZmZlciwgdURNQUlkeCwgKFBWT0lEKXB0ZEN1cnIsIHdGcmFnVHlwZSwgY2JSZXFDb3VudCk7CisKKyAgICAgICAgICAgICAgICBwdGRDdXJyLT5wVERJbmZvLT5kd1JlcUNvdW50ID0gY2JSZXFDb3VudCAtIHVQYWRkaW5nOworICAgICAgICAgICAgICAgIHB0ZEN1cnItPnBUREluZm8tPmR3SGVhZGVyTGVuZ3RoID0gY2JIZWFkZXJMZW5ndGg7CisgICAgICAgICAgICAgICAgcHRkQ3Vyci0+cFRESW5mby0+c2tiX2RtYSA9IHB0ZEN1cnItPnBUREluZm8tPmJ1Zl9kbWE7CisgICAgICAgICAgICAgICAgcHRkQ3Vyci0+YnVmZl9hZGRyID0gY3B1X3RvX2xlMzIocHRkQ3Vyci0+cFRESW5mby0+c2tiX2RtYSk7CisgICAgICAgICAgICAgICAgcERldmljZS0+aVREVXNlZFt1RE1BSWR4XSsrOworICAgICAgICAgICAgICAgIHBIZWFkVEQgPSBwdGRDdXJyLT5uZXh0OworICAgICAgICAgICAgfQorICAgICAgICB9ICAvLyBmb3IgKHVNQUNmcmFnTnVtKQorICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgLy89PT09PT09PT09PT09PT09PT09PT09PT09CisgICAgICAgIC8vICAgIE5vIEZyYWdtZW50YXRpb24KKyAgICAgICAgLy89PT09PT09PT09PT09PT09PT09PT09PT09CisgICAgICAgIC8vREVWSUNFX1BSVEdSUDAzKCgiTm8gRnJhZ21lbnRhdGlvbi4uLlxuIikpOworICAgICAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iTm8gRnJhZ21lbnRhdGlvbi4uLlxuIik7CisgICAgICAgIHdGcmFnVHlwZSA9IEZSQUdDVExfTk9ORlJBRzsKKworICAgICAgICAvL1NldCBGcmFnQ3RsIGluIFR4QnVmZmVySGVhZAorICAgICAgICBwc1R4QnVmSGQtPndGcmFnQ3RsIHw9IChXT1JEKXdGcmFnVHlwZTsKKworICAgICAgICAvL0ZpbGwgRklGTyxScnZUaW1lLFJUUyxhbmQgQ1RTCisgICAgICAgIHNfdkdlbmVyYXRlVHhQYXJhbWV0ZXIocERldmljZSwgYnlQa3RUeXAsIChQVk9JRClwc1R4QnVmSGQsIHB2UnJ2VGltZSwgcHZSVFMsIHB2Q1RTLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNiRnJhbWVTaXplLCBiTmVlZEFDSywgdURNQUlkeCwgcHNFdGhIZWFkZXIsIHBEZXZpY2UtPndDdXJyZW50UmF0ZSk7CisgICAgICAgIC8vRmlsbCBEYXRhSGVhZAorICAgICAgICB1RHVyYXRpb24gPSBzX3VGaWxsRGF0YUhlYWQocERldmljZSwgYnlQa3RUeXAsIHB2VHhEYXRhSGQsIGNiRnJhbWVTaXplLCB1RE1BSWR4LCBiTmVlZEFDSywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDAsIHVNQUNmcmFnTnVtLCBieUZCT3B0aW9uLCBwRGV2aWNlLT53Q3VycmVudFJhdGUpOworCisgICAgICAgIC8vIEdlbmVyYXRlIFRYIE1BQyBIZWFkZXIKKyAgICAgICAgdkdlbmVyYXRlTUFDSGVhZGVyKHBEZXZpY2UsIHBieU1hY0hkciwgKFdPUkQpdUR1cmF0aW9uLCBwc0V0aEhlYWRlciwgYk5lZWRFbmNyeXB0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgd0ZyYWdUeXBlLCB1RE1BSWR4LCAwKTsKKworICAgICAgICBpZiAoYk5lZWRFbmNyeXB0ID09IFRSVUUpIHsKKyAgICAgICAgICAgIC8vRmlsbCBUWEtFWQorICAgICAgICAgICAgc192RmlsbFR4S2V5KHBEZXZpY2UsIChQQllURSkocHNUeEJ1ZkhkLT5hZHdUeEtleSksIHBieUlWSGVhZCwgcFRyYW5zbWl0S2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgIHBieU1hY0hkciwgKFdPUkQpY2JGcmFtZUJvZHlTaXplLCAoUEJZVEUpcE1JQ0hEUik7CisKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iRW5hYmxlSG9zdFdFUCkgeworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdUU0M0N18xNiA9IHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNjsKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndUU0MxNV8wID0gcFRyYW5zbWl0S2V5LT53VFNDMTVfMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIC8vIDgwMi4xSAorICAgICAgICBpZiAobnRvaHMocHNFdGhIZWFkZXItPndUeXBlKSA+IE1BWF9EQVRBX0xFTikgeworICAgICAgICAgICAgaWYgKChwc0V0aEhlYWRlci0+d1R5cGUgPT0gVFlQRV9QS1RfSVBYKSB8fAorICAgICAgICAgICAgICAgIChwc0V0aEhlYWRlci0+d1R5cGUgPT0gY3B1X3RvX2xlMTYoMHhGMzgwKSkpIHsKKyAgICAgICAgICAgICAgICBNRU12Q29weSgoUEJZVEUpIChwYnlQYXlsb2FkSGVhZCksICZwRGV2aWNlLT5hYnlTTkFQX0JyaWRnZXR1bm5lbFswXSwgNik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBNRU12Q29weSgoUEJZVEUpIChwYnlQYXlsb2FkSGVhZCksICZwRGV2aWNlLT5hYnlTTkFQX1JGQzEwNDJbMF0sIDYpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcGJ5VHlwZSA9IChQQllURSkgKHBieVBheWxvYWRIZWFkICsgNik7CisgICAgICAgICAgICBNRU12Q29weShwYnlUeXBlLCAmKHBzRXRoSGVhZGVyLT53VHlwZSksIHNpemVvZihXT1JEKSk7CisgICAgICAgICAgICBjYjgwMl8xX0hfbGVuID0gODsKKyAgICAgICAgfQorCisgICAgICAgIGNiUmVxQ291bnQgPSBjYkhlYWRlckxlbmd0aCArIGNiTUFDSGRMZW4gKyB1UGFkZGluZyArIGNiSVZsZW4gKyAoY2JGcmFtZUJvZHlTaXplICsgY2JNSUNsZW4pOworICAgICAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgICAvLyBTL1cgb3IgSC9XIEVuY3J5cHRpb24KKyAgICAgICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgLy9GaWxsIE1JQ0hEUgorICAgICAgICAvL2lmIChwRGV2aWNlLT5iQUVTKSB7CisgICAgICAgIC8vICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRmlsbCBNSUNIRFIuLi5cbiIpOworICAgICAgICAvLyAgICBzX3ZGaWxsTUlDSERSKHBEZXZpY2UsIChQQllURSlwTUlDSERSLCBwYnlNYWNIZHIsIChXT1JEKWNiRnJhbWVCb2R5U2l6ZSk7CisgICAgICAgIC8vfQorCisgICAgICAgIHBieUJ1ZmZlciA9IChQQllURSlwSGVhZFRELT5wVERJbmZvLT5idWY7CisgICAgICAgIC8vcGJ5QnVmZmVyID0gKFBCWVRF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LCB1UGFkZGluZywgY2JJVmxlbik7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIk1JQzolbHgsICVseFxuIiwgKnBkd01JQ19MLCAqcGR3TUlDX1IpOworLyoKKyAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IDg7IGlpKyspIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIiUwMnggIiwgKigoKFBCWVRFKShwZHdNSUNfTCkgKyBpaSkpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iXG4iKTsKKyovCisKKyAgICAgICAgfQorCisKKyAgICAgICAgaWYgKChwRGV2aWNlLT5ieUxvY2FsSUQgPD0gUkVWX0lEX1ZUMzI1M19BMSkpeworICAgICAgICAgICAgaWYgKGJOZWVkRW5jcnlwdCkgeworICAgICAgICAgICAgICAgIHNfdlNXZW5jcnlwdGlvbihwRGV2aWNlLCBwVHJhbnNtaXRLZXksIChwYnlCdWZmZXIgKyB1TGVuZ3RoIC0gY2I4MDJfMV9IX2xlbiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChXT1JEKShjYkZyYW1lQm9keVNpemUgKyBjYk1JQ2xlbikpOworICAgICAgICAgICAgICAgIGNiUmVxQ291bnQgKz0gY2JJQ1ZsZW47CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworCisgICAgICAgIHB0ZEN1cnIgPSAoUFNUeERlc2MpcEhlYWRURDsKKworICAgICAgICBwdGRDdXJyLT5wVERJbmZvLT5kd1JlcUNvdW50ID0gY2JSZXFDb3VudCAtIHVQYWRkaW5nOworICAgICAgICBwdGRDdXJyLT5wVERJbmZvLT5kd0hlYWRlckxlbmd0aCA9IGNiSGVhZGVyTGVuZ3RoOworICAgICAgICBwdGRDdXJyLT5wVERJbmZvL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UeXAsCisgICAgSU4gIFBCWVRFICAgICAgICAgICAgcGJ5VHhCdWZmZXJBZGRyLAorICAgIElOICBCT09MICAgICAgICAgICAgIGJOZWVkRW5jcnlwdCwKKyAgICBJTiAgVUlOVCAgICAgICAgICAgICBjYlBheWxvYWRTaXplLAorICAgIElOICBVSU5UICAgICAgICAgICAgIHVETUFJZHgsCisgICAgSU4gIFBTVHhEZXNjICAgICAgICAgcEhlYWRURCwKKyAgICBJTiAgUFNFdGhlcm5ldEhlYWRlciBwc0V0aEhlYWRlciwKKyAgICBJTiAgUEJZVEUgICAgICAgICAgICBwUGFja2V0LAorICAgIElOICBQU0tleUl0ZW0gICAgICAgIHBUcmFuc21pdEtleSwKKyAgICBJTiAgVUlOVCAgICAgICAgICAgICB1Tm9kZUluZGV4LAorICAgIE9VVCBQVUlOVCAgICAgICAgICAgIHB1TUFDZnJhZ051bSwKKyAgICBPVVQgUFVJTlQgICAgICAgICAgICBwY2JIZWFkZXJTaXplCisgICAgKQoreworICAgIFVJTlQgICAgICAgICAgICB3VHhCdWZTaXplOyAgICAgICAvLyBGRmluZm8gc2l6ZQorICAgIEJPT0wgICAgICAgICAgICBiTmVlZEFDSzsKKyAgICBCT09MICAgICAgICAgICAgYklzQWRob2M7CisgICAgV09SRCAgICAgICAgICAgIGNiTWFjSGRMZW47CisgICAgUFNUeEJ1ZkhlYWQgICAgIHBUeEJ1ZkhlYWQgPSAoUFNUeEJ1ZkhlYWQpIHBieVR4QnVmZmVyQWRkcjsKKworICAgIHdUeEJ1ZlNpemUgPSBzaXplb2YoU1R4QnVmSGVhZCk7CisKKyAgICBaRVJPX01FTU9SWShwVHhCdWZIZWFkLCB3VHhCdWZTaXplKTsKKyAgICAvL1NldCBGSUZPQ1RMX05FRURBQ0sKKworICAgIGlmICgocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FESE9DKSB8fAorICAgICAgICAocERldmljZS0+ZU9QTW9kZSA9PSBPUF9NT0RFX0FQKSkgeworICAgIC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IGlmKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKQorICAgICAgICBwVHhCdWZIZWFkLT53RnJhZ0N0bCAmPSAgfihGUkFHQ1RMX1RLSVAgfCBGUkFHQ1RMX0xFR0FDWSB8RlJBR0NUTF9BRVMpOworKi8KKyAgICAqcGNiSGVhZGVyU2l6ZSA9IHNfY2JGaWxsVHhCdWZIZWFkKHBEZXZpY2UsIGJ5UGt0VHlwLCBwYnlUeEJ1ZmZlckFkZHIsIGNiUGF5bG9hZFNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVETUFJZHgsIHBIZWFkVEQsIHBzRXRoSGVhZGVyLCBwUGFja2V0LCBiTmVlZEVuY3J5cHQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBUcmFuc21pdEtleSwgdU5vZGVJbmRleCwgcHVNQUNmcmFnTnVtKTsKKworICAgIHJldHVybjsKK30KKworCisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIFRyYW5zbGF0ZSA4MDIuMyB0byA4MDIuMTEgaGVhZGVyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgIC0gUG9pbnRlciB0byBhZHBhdGVyCisgKiAgICAgIGR3VHhCdWZmZXJBZGRyICAtIFRyYW5zbWl0IEJ1ZmZlcgorICogICAgICBwUGFja2V0ICAgICAgICAgLSBQYWNrZXQgZnJvbSB1cHBlciBsYXllcgorICogICAgICBjYlBhY2tldFNpemUgICAgLSBUcmFuc21pdCBEYXRhIExlbmd0aAorICogIE91dDoKKyAqICAgICAgcGNiSGVhZFNpemUgICAgICAgICAtIEhlYWRlciBzaXplIG9mIE1BQyZCYXNlYmFuZCBjb250cm9sIGFuZCA4MDIuMTEgSGVhZGVyCisgKiAgICAgIHBjYkFwcGVuZFBheWxvYWQgICAgLSBzaXplIG9mIGFwcGVuZCBwYXlsb2FkIGZvciA4MDIuMUggdHJhbnNsYXRpb24KKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCistKi8KKworVk9JRAordkdlbmVyYXRlTUFDSGVhZGVyICgKKyAgICBJTiBQU0RldmljZSAgICAgICAgIHBEZXZpY2UsCisgICAgSU4gUEJZVEUgICAgICAgICAgICBwYnlCdWZmZXJBZGRyLAorICAgIElOIFdPUkQgICAgICAgICAgICAgd0R1cmF0aW9uLAorICAgIElOIFBTRXRoZXJuZXRIZWFkZXIgcHNFdGhIZWFkZXIsCisgICAgSU4gQk9PTCAgICAgICAgICAgICBiTmVlZEVuY3J5cHQsCisgICAgSU4gV09SRCAgICAgICAgICAgICB3RnJhZ1R5cGUsCisgICAgSU4gVUlOVCAgICAgICAgICAgICB1RE1BSWR4LAorICAgIElOIFVJTlQgICAgICAgICAgICAgdUZyYWdJZHgKKyAgICApCit7CisgICAgUFM4MDJfMTFIZWFkZXIgIHBNQUNIZWFkZXIgPSAoUFM4MDJfMTFIZWFkZXIpcGJ5QnVmZmVyQWRkcjsKKworICAgIFpFUk9fTUVNT1JZKHBNQUNIZWFkZXIsIChzaXplb2YoUzgwMl8xMUhlYWRlcikpKTsgIC8vLSBzaXplb2YocE1BQ0hlYWRlci0+ZHdJVikpKTsKKworICAgIGlmICh1RE1BSWR4ID09IFRZUEVfQVRJTURNQSkgeworICAgIAlwTUFDSGVhZGVyLT53RnJhbWVDdGwgPSBUWVBFXzgwMl8xMV9BVElNOworICAgIH0gZWxzZSB7CisgICAgICAgIHBNQUNIZWFkZXItPndGcmFtZUN0bCA9IFRZUEVfODAyXzExX0RBVEE7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BUCkgeworICAgICAgICBNRU12Q29weSgmKHBNQUNIZWFkZXItPmFieUFkZHIxWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5RHN0QWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICBNRU12Q29weSgmKHBNQUNIZWFkZXItPmFieUFkZHIyWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICBNRU12Q29weSgmKHBNQUNIZWFkZXItPmFieUFkZHIzWzBdKSwgJihwc0V0aEhlYWRlci0+YWJ5U3JjQWRkclswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICBwTUFDSGVhZGVyLT53RnJhbWVDdGwgfD0gRkNfRlJPTURTOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmVPUE1vZGUgPT0gT1BfTU9ERV9BREhPQykgeworICAgICAgICAgICAgTUVNdkNvcHkoJihwTUFDSGVhZGVyLT5hYnlBZGRyMVswXSksICYocHNFdGhIZWFkZXItPmFieURzdEFkZHJbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocE1BQ0hlYWRlci0+YWJ5QWRkcjJbMF0pLCAmKHBzRXRoSGVhZGVyLT5hYnlTcmNBZGRyWzBdKSwgVV9FVEhFUl9BRERSX0xFTik7CisgICAgICAgICAgICBNRU12Q29weSgmKHBNQUNIZWFkZXItPmFieUFkZHIzWzBdKSwgJihwRGV2aWNlLT5hYnlCU1NJRFswXSksIFVfRVRIRVJfQUREUl9MRU4pOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgTUVNdkNvcHkoJihwTUFDSGVhZGVyLT5hYnlBZGRyM1swXSksICYocHNFdGhIZWFkZXItPmFieURzdEFkZHJbMF0pLCBVX0VUSEVSX0FERFJfTEVOKTsKKyAgICAgICAgICAgIE1FTXZDb3B5KCYocE1BQ0hlYWRlci0+YWJ5QWRkcjJbMF0pLCAmKHBzRXRoSGVhZGVyLT5hYnlTcmNBZGRyWzBdKSwgVV9FVEhFUl9BRERSX0xFTik7CisgICAgICAgICAgICBNRU12Q29weSgmKHBNQUNIZWFkZXItPmFieUFkZHIxWzBdKSwgJihwRGV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weDBmZmYpCisgICAgICAgICAgICBwRGV2aWNlLT53U2VxQ291bnRlciA9IDA7CisgICAgfQorCisgICAgaWYgKCh3RnJhZ1R5cGUgPT0gRlJBR0NUTF9TVEFGUkFHKSB8fCAod0ZyYWdUeXBlID09IEZSQUdDVExfTUlERlJBRykpIHsgLy9TdGFydEZyYWcgb3IgTWlkRnJhZworICAgICAgICBwTUFDSGVhZGVyLT53RnJhbWVDdGwgfD0gRkNfTU9SRUZSQUc7CisgICAgfQorfQorCisKKworCisKKworQ01EX1NUQVRVUyBjc01nbXRfeG1pdChQU0RldmljZSBwRGV2aWNlLCBQU1R4TWdtdFBhY2tldCBwUGFja2V0KSB7CisKKyAgICBQU1R4RGVzYyAgICAgICAgcEZyc3RURDsKKyAgICBCWVRFICAgICAgICAgICAgYnlQa3RUeXA7CisgICAgUEJZVEUgICAgICAgICAgIHBieVR4QnVmZmVyQWRkcjsKKyAgICBQVk9JRCAgICAgICAgICAgcHZSVFM7CisgICAgUFNDVFMgICAgICAgICAgIHBDVFM7CisgICAgUFZPSUQgICAgICAgICAgIHB2VHhEYXRhSGQ7CisgICAgVUlOVCAgICAgICAgICAgIHVEdXJhdGlvbjsKKyAgICBVSU5UICAgICAgICAgICAgY2JSZXFDb3VudDsKKyAgICBQUzgwMl8xMUhlYWRlciAgcE1BQ0hlYWRlcjsKKyAgICBVSU5UICAgICAgICAgICAgY2JIZWFkZXJTaXplOworICAgIFVJTlQgICAgICAgICAgICBjYkZyYW1lQm9keVNpemU7CisgICAgQk9PTCAgICAgICAgICAgIGJOZWVkQUNLOworICAgIEJPT0wgICAgICAgICAgICBiSXNQU1BPTEwgPSBGQUxTRTsKKyAgICBQU1R4QnVmSGVhZCAgICAgcFR4QnVmSGVhZDsKKyAgICBVSU5UICAgICAgICAgICAgY2JGcmFtZVNpemU7CisgICAgVUlOVCAgICAgICAgICAgIGNiSVZsZW4gPSAwOworICAgIFVJTlQgICAgICAgICAgICBjYklDVmxlbiA9IDA7CisgICAgVUlOVCAgICAgICAgICAgIGNiTUlDbGVuID0gMDsKKyAgICBVSU5UICAgICAgICAgICAgY2JGQ1NsZW4gPSA0OworICAgIFVJTlQgICAgICAgICAgICB1UGFkZGluZyA9IDA7CisgICAgV09SRCAgICAgICAgICAgIHdUeEJ1ZlNpemU7CisgICAgVUlOVCAgICAgICAgICAgIGNiTWFjSGRMZW47CisgICAgU0V0aGVybmV0SGVhZGVyIHNFdGhIZWFkZXI7CisgICAgUFZPSUQgICAgICAgICAgIHB2UnJ2VGltZTsKKyAgICBQVk9JRCAgICAgICAgICAgcE1JQ0hEUjsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBXT1JEICAgICAgICAgICAgd0N1cnJlbnRSYXRlID0gUkFURV8xTTsKKworCisgICAgaWYgKEFWQUlMX1REKHBEZXZpY2UsIFRZUEVfVFhETUEwKSA8PSAwKSB7CisgICAgICAgIHJldHVybiBDTURfU1RBVFVTX1JFU09VUkNFUzsKKyAgICB9CisKKyAgICBwRnJzdFREID0gcERldmljZS0+YXBDdXJyVERbVFlQRV9UWERNQTBdOworICAgIHBieVR4QnVmZmVyQWRkciA9IChQQllURSlwRnJzdFRELT5wVERJbmZvLT5idWY7CisgICAgY2JGcmFtZUJvZHlTaXplID0gcFBhY2tldC0+Y2JQYXlsb2FkTGVuOworICAgIHBUeEJ1ZkhlYWQgPSAoUFNUeEJ1ZkhlYWQpIHBieVR4QnVmZmVyQWRkcjsKKyAgICB3VHhCdWZTaXplID0gc2l6ZW9mKFNUeEJ1ZkhlYWQpOworICAgIG1lbXNldChwVHhCdWZIZWFkLCAwLCB3VHhCdWZTaXplKTsKKworICAgIGlmIChwRGV2aWNlLT5lQ3VycmVudFBIWVR5cGUgPT0gUEhZX1RZUEVfMTFBKSB7CisgICAgICAgIHdDdXJyZW50UmF0ZSA9IFJBVEVfNk07CisgICAgICAgIGJ5UGt0VHlwID0gUEtfVFlQRV8xMUE7CisgICAgfS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rRXh0SVYKKyAgICAgICAgICAgIGNiTUlDbGVuID0gODsKKyAgICAgICAgICAgIGNiSUNWbGVuID0gNDsKKyAgICAJICAgIHBUeEJ1ZkhlYWQtPndGcmFnQ3RsIHw9IEZSQUdDVExfVEtJUDsKKyAgICAJICAgIC8vV2UgbmVlZCB0byBnZXQgc2VlZCBoZXJlIGZvciBmaWxsaW5nIFR4S2V5IGVudHJ5LgorICAgICAgICAgICAgLy9US0lQdk1peEtleShwVHJhbnNtaXRLZXktPmFieUtleSwgcERldmljZS0+YWJ5Q3VycmVudE5ldEFkZHIsCisgICAgICAgICAgICAvLyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+d1RTQzE1XzAsIHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNiwgcERldmljZS0+YWJ5UFJORyk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICAgICAgY2JJVmxlbiA9IDg7Ly9SU04gSGVhZGVyCisgICAgICAgICAgICBjYklDVmxlbiA9IDg7Ly9NSUMKKyAgICAgICAgICAgIHBUeEJ1ZkhlYWQtPndGcmFnQ3RsIHw9IEZSQUdDVExfQUVTOworICAgICAgICAgICAgcERldmljZS0+YkFFUyA9IFRSVUU7CisgICAgICAgIH0KKyAgICAgICAgLy9NQUMgSGVhZGVyIHNob3VsZCBiZSBwYWRkaW5nIDAgdG8gRFcgYWxpZ25tZW50LgorICAgICAgICB1UGFkZGluZyA9IDQgLSAoY2JNYWNIZExlbiU0KTsKKyAgICAgICAgdVBhZGRpbmcgJT0gNDsKKyAgICB9CisKKyAgICBjYkZyYW1lU2l6ZSA9IGNiTWFjSGRMZW4gKyBjYkZyYW1lQm9keVNpemUgKyBjYklWbGVuICsgY2JNSUNsZW4gKyBjYklDVmxlbiArIGNiRkNTbGVuOworCisgICAgLy9TZXQgRklGT0NUTF9H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mZmVyQWRkciwgcHZScnZUaW1lLCBwdlJUUywgcENUUywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNiRnJhbWVTaXplLCBiTmVlZEFDSywgVFlQRV9UWERNQTAsICZzRXRoSGVhZGVyLCB3Q3VycmVudFJhdGUpOworCisgICAgLy9GaWxsIERhdGFIZWFkCisgICAgdUR1cmF0aW9uID0gc191RmlsbERhdGFIZWFkKHBEZXZpY2UsIGJ5UGt0VHlwLCBwdlR4RGF0YUhkLCBjYkZyYW1lU2l6ZSwgVFlQRV9UWERNQTAsIGJOZWVkQUNLLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLCAwLCAxLCBBVVRPX0ZCX05PTkUsIHdDdXJyZW50UmF0ZSk7CisKKyAgICBwTUFDSGVhZGVyID0gKFBTODAyXzExSGVhZGVyKSAocGJ5VHhCdWZmZXJBZGRyICsgY2JIZWFkZXJTaXplKTsKKworICAgIGNiUmVxQ291bnQgPSBjYkhlYWRlclNpemUgKyBjYk1hY0hkTGVuICsgdVBhZGRpbmcgKyBjYklWbGVuICsgY2JGcmFtZUJvZHlTaXplOworCisgICAgaWYgKFdMQU5fR0VUX0ZDX0lTV0VQKHBQYWNrZXQtPnA4MDIxMUhlYWRlci0+c0E0LndGcmFtZUN0bCkgIT0gMCkgeworICAgICAgICBQQllURSAgICAgICAgICAgcGJ5SVZIZWFkOworICAgICAgICBQQllURSAgICAgICAgICAgcGJ5UGF5bG9hZEhlYWQ7CisgICAgICAgIFBCWVRFICAgICAgICAgICBwYnlCU1NJRDsKKyAgICAgICAgUFNLZXlJdGVtICAgICAgIHBUcmFuc21pdEtleSA9IE5VTEw7CisKKyAgICAgICAgcGJ5SVZIZWFkID0gKFBCWVRFKShwYnlUeEJ1ZmZlckFkZHIgKyBjYkhlYWRlclNpemUgKyBjYk1hY0hkTGVuICsgdVBhZGRpbmcpOworICAgICAgICBwYnlQYXlsb2FkSGVhZCA9IChQQllURSkocGJ5VHhCdWZmZXJBZGRyIC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PnNLZXkpLCBwYnlCU1NJRCwgUEFJUldJU0VfS0VZLCAmcFRyYW5zbWl0S2V5KSA9PSBGQUxTRSkgeworICAgICAgICAgICAgICAgICAgICAvLyBnZXQgZ3JvdXAga2V5CisgICAgICAgICAgICAgICAgICAgIGlmKEtleWJHZXRUcmFuc21pdEtleSgmKHBEZXZpY2UtPnNLZXkpLCBwYnlCU1NJRCwgR1JPVVBfS0VZLCAmcFRyYW5zbWl0S2V5KSA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkdldCBHVEsuXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJHZXQgUFRLLlxuIik7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIGdldCBncm91cCBrZXkKKyAgICAgICAgICAgIHBieUJTU0lEID0gcERldmljZS0+YWJ5QnJvYWRjYXN0QWRkcjsKKyAgICAgICAgICAgIGlmKEtleWJHZXRUcmFuc21pdEtleSgmKHBEZXZpY2UtPnNLZXkpLCBwYnlCU1NJRCwgR1JPVVBfS0VZLCAmcFRyYW5zbWl0S2V5KSA9PSBGQUxTRSkgeworICAgICAgICAgICAgICAgIHBUcmFuc21pdEtleSA9IE5VTEw7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJLRVkgaXMgTlVMTC4gT1AgTW9kZVslZF1cbiIsIHBEZXZpY2UtPmVPUE1vZGUpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBERVZJQ0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FtZUJvZHlTaXplLAorICAgIElOICBQU0V0aGVybmV0SGVhZGVyIHBzRXRoSGVhZGVyCisgICAgKQoreworICAgIFVJTlQgICAgICAgICAgIGNiTUFDSGRMZW47CisgICAgVUlOVCAgICAgICAgICAgY2JGcmFtZVNpemU7CisgICAgVUlOVCAgICAgICAgICAgY2JGcmFnbWVudFNpemU7IC8vSGRyKyhJVikrcGF5b2FkKyhNSUMpKyhJQ1YpK0ZDUworICAgIFVJTlQgICAgICAgICAgIGNiRnJhZ1BheWxvYWRTaXplOworICAgIFVJTlQgICAgICAgICAgIGNiTGFzdEZyYWdQYXlsb2FkU2l6ZTsKKyAgICBVSU5UICAgICAgICAgICBjYklWbGVuID0gMDsKKyAgICBVSU5UICAgICAgICAgICBjYklDVmxlbiA9IDA7CisgICAgVUlOVCAgICAgICAgICAgY2JNSUNsZW4gPSAwOworICAgIFVJTlQgICAgICAgICAgIGNiRkNTbGVuID0gNDsKKyAgICBVSU5UICAgICAgICAgICB1TUFDZnJhZ051bSA9IDE7CisgICAgQk9PTCAgICAgICAgICAgYk5lZWRBQ0s7CisKKworCisgICAgaWYgKChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQURIT0MpIHx8CisgICAgICAgIChwRGV2aWNlLT5lT1BNb2RlID09IE9QX01PREVfQVApKSB7CisgICAgICAgIGlmIChJU19NVUxUSUNBU1RfQUREUkVTUygmKHBzRXRoSGVhZGVyLT5hYnlEc3RBZGRyWzBdKSkgfHwKKyAgICAgICAgICAgIElTX0JST0FEQ0FTVF9BRERSRVNTKCYocHNFdGhIZWFkZXItPmFieURzdEFkZHJbMF0pKSkgeworICAgICAgICAgICAgYk5lZWRBQ0sgPSBGQUxTRTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGJOZWVkQUNLID0gVFJVRTsKKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgLy8gTVNEVXMgaW4gSW5mcmEgbW9kZSBhbHdheXMgbmVlZCBBQ0sKKyAgICAgICAgYk5lZWRBQ0sgPSBUUlVFOworICAgIH0KKworICAgIGlmIChwRGV2aWNlLT5iTG9uZ0hlYWRlcikKKyAgICAgICAgY2JNQUNIZExlbiA9IFdMQU5fSERSX0FERFIzX0xFTiArIDY7CisgICAgZWxzZQorICAgICAgICBjYk1BQ0hkTGVuID0gV0xBTl9IRFJfQUREUjNfTEVOOworCisKKyAgICBpZiAocERldmljZS0+YkVuY3J5cHRpb25FbmFibGUgPT0gVFJVRSkgeworCisgICAgICAgIGlmIChwVHJhbnNtaXRLZXkgPT0gTlVMTCkgeworICAgICAgICAgICAgaWYgKChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjFFbmFibGVkKSB8fAorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5wTWdtdC0+ZUF1dGhlbk1vZGUgPCBXTUFDX0FVVEhfV1BBKSkgeworICAgICAgICAgICAgICAgIGNiSVZsZW4gPSA0OworICAgICAgICAgICAgICAgIGNiSUNWbGVuID0gNDsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24yRW5hYmxlZCkgeworICAgICAgICAgICAgICAgIGNiSVZsZW4gPSA4Oy8vSVYrRXh0SVYKKyAgICAgICAgICAgICAgICBjYk1JQ2xlbiA9IDg7CisgICAgICAgICAgICAgICAgY2JJQ1ZsZW4gPSA0OworICAgICAgICAgICAgfSBlbHNlIGlmIChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkKSB7CisgICAgICAgICAgICAgICAgY2JJVmxlbiA9IDg7Ly9SU04gSGVhZGVyCisgICAgICAgICAgICAgICAgY2JJQ1ZsZW4gPSA4Oy8vTUlDCisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB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EJ1ZkhlYWQ7CisgICAgVUlOVCAgICAgICAgICAgIGNiRnJhbWVTaXplOworICAgIFVJTlQgICAgICAgICAgICBjYklWbGVuID0gMDsKKyAgICBVSU5UICAgICAgICAgICAgY2JJQ1ZsZW4gPSAwOworICAgIFVJTlQgICAgICAgICAgICBjYk1JQ2xlbiA9IDA7CisgICAgVUlOVCAgICAgICAgICAgIGNiRkNTbGVuID0gNDsKKyAgICBVSU5UICAgICAgICAgICAgdVBhZGRpbmcgPSAwOworICAgIFVJTlQgICAgICAgICAgICBjYk1JQ0hEUiA9IDA7CisgICAgVUlOVCAgICAgICAgICAgIHVMZW5ndGggPSAwOworICAgIERXT1JEICAgICAgICAgICBkd01JQ0tleTAsIGR3TUlDS2V5MTsKKyAgICBEV09SRCAgICAgICAgICAgZHdNSUNfUHJpb3JpdHk7CisgICAgUERXT1JEICAgICAgICAgIHBkd01JQ19MOworICAgIFBEV09SRCAgICAgICAgICBwZHdNSUNfUjsKKyAgICBXT1JEICAgICAgICAgICAgd1R4QnVmU2l6ZTsKKyAgICBVSU5UICAgICAgICAgICAgY2JNYWNIZExlbjsKKyAgICBTRXRoZXJuZXRIZWFkZXIgc0V0aEhlYWRlcjsKKyAgICBQVk9JRCAgICAgICAgICAgcHZScnZUaW1lOworICAgIFBWT0lEICAgICAgICAgICBwTUlDSERSOworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworICAgIFdPUkQgICAgICAgICAgICB3Q3VycmVudFJhdGUgPSBSQVRFXzFNOworICAgIFBVV0xBTl84MDIxMUhEUiAgcDgwMjExSGVhZGVyOworICAgIFVJTlQgICAgICAgICAgICAgdU5vZGVJbmRleCA9IDA7CisgICAgQk9PTCAgICAgICAgICAgIGJOb2RlRXhpc3QgPSBGQUxTRTsKKyAgICBTS2V5SXRlbSAgICAgICAgU1RlbXBLZXk7CisgICAgUFNLZXlJdGVtICAgICAgIHBUcmFuc21pdEtleSA9IE5VTEw7CisgICAgUEJZVEUgICAgICAgICAgIHBieUlWSGVhZDsKKyAgICBQQllURSAgICAgICAgICAgcGJ5UGF5bG9hZEhlYWQ7CisgICAgUEJZVEUgICAgICAgICAgIHBieU1hY0hkcjsKKworICAgIFVJTlQgICAgICAgICAgICBjYkV4dFN1cHBSYXRlID0gMDsKKy8vICAgIFBXTEFOX0lFICAgICAgICBwSXRlbTsKKworCisgICAgcHZScnZUaW1lID0gcE1JQ0hEUiA9IHB2UlRTID0gcHZDVFMgPSBwdlR4RGF0YUhkID0gTlVMTDsKKworICAgIGlmKGNiTVBEVUxlbiA8PSBXTEFOX0hEUl9BRERSM19MRU4pIHsKKyAgICAgICBjYkZyYW1lQm9keVNpemUgPSAwOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICBjYkZyYW1lQm9keVNpemUgPSBjYk1QRFVMZW4gLSBXTEFOX0hEUl9BRERSM19MRU47CisgICAgfQorICAgIHA4MDIxMUhlYWRlciA9IChQVVdMQU5fODAyMTFIRFIpcGJNUERVOworCisKKyAgICBwRnJzdFREID0gcERldmljZS0+YXBDdXJyVERbVFlQRV9UWERNQTBdOworICAgIHBieVR4QnVmZmVyQWRkciA9IChQQllURSlwRnJzdFRELT5wVERJbmZvLT5idWY7CisgICAgcFR4QnVmSGVhZCA9IChQU1R4QnVmSGVhZCkgcGJ5VHhCdWZmZXJBZGRyOworICAgIHdUeEJ1ZlNpemUgPSBzaXplb2YoU1R4QnVmSGVhZCk7CisgICAgbWVtc2V0KHBUeEJ1ZkhlYWQsIDAsIHdUeEJ1ZlNpemUpOworCisgICAgaWYgKHBEZXZpY2UtPmVDdXJyZW50UEhZVHlwZSA9PSBQSFlfVFlQRV8xMUEpIHsKKyAgICAgICAgd0N1cnJlbnRSYXRlID0gUkFURV82TTsKKyAgICAgICAgYnlQa3RUeXAgPSBQS19UWVBFXzExQTsKKyAgICB9IGVsc2UgeworICAgICAgICB3Q3VycmVudFJhdGUgPSBSQVRFXzFNOworICAgICAgICBieVBrdFR5cC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T5zQTMuYWJ5QWRkcjFbMF0pKSB8fAorICAgICAgICBJU19CUk9BRENBU1RfQUREUkVTUygmKHA4MDIxMUhlYWRlci0+c0EzLmFieUFkZHIxWzBdKSkpIHsKKyAgICAgICAgYk5lZWRBQ0sgPSBGQUxTRTsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSB7CisgICAgICAgICAgICB1Tm9kZUluZGV4ID0gMDsKKyAgICAgICAgICAgIGJOb2RlRXhpc3QgPSBUUlVFOworICAgICAgICB9OworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSB7CisgICAgICAgICAgICBpZiAoQlNTREJiSXNTVEFJbk5vZGVEQihwRGV2aWNlLT5wTWdtdCwgKFBCWVRFKShwODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMSksICZ1Tm9kZUluZGV4KSkKKyAgICAgICAgICAgICAgICBiTm9kZUV4aXN0ID0gVFJVRTsKKyAgICAgICAgfTsKKyAgICAgICAgYk5lZWRBQ0sgPSBUUlVFOworICAgICAgICBwVHhCdWZIZWFkLT53RklGT0N0bCB8PSBGSUZPQ1RMX05FRURBQ0s7CisgICAgfTsKKworICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSB8fAorICAgICAgICAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfSUJTU19TVEEpICkgeworCisgICAgICAgIHBUeEJ1ZkhlYWQtPndGSUZPQ3RsIHw9IEZJRk9DVExfTFJFVFJZOworICAgICAgICAvL1NldCBQcmVhbWJsZSB0eXBlIGFsd2F5cyBsb25nCisgICAgICAgIC8vcERldmljZS0+YnlQcmVhbWJsZVR5cGUgPSBQUkVBTUJMRV9MT05HOworCisgICAgICAgIC8vIHByb2JlLXJlc3BvbnNlIGRvbid0IHJldHJ5CisgICAgICAgIC8vaWYgKChwODAyMTFIZWFkZXItPnNBN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ZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24yRW5hYmxlZCkgeworICAgICAgICAgICAgY2JJVmxlbiA9IDg7Ly9JVitFeHRJVgorICAgICAgICAgICAgY2JNSUNsZW4gPSA4OworICAgICAgICAgICAgY2JJQ1ZsZW4gPSA0OworICAgIAkgICAgcFR4QnVmSGVhZC0+d0ZyYWdDdGwgfD0gRlJBR0NUTF9US0lQOworICAgIAkgICAgLy9XZSBuZWVkIHRvIGdldCBzZWVkIGhlcmUgZm9yIGZpbGxpbmcgVHhLZXkgZW50cnkuCisgICAgICAgICAgICAvL1RLSVB2TWl4S2V5KHBUcmFuc21pdEtleS0+YWJ5S2V5LCBwRGV2aWNlLT5hYnlDdXJyZW50TmV0QWRkciwKKyAgICAgICAgICAgIC8vICAgICAgICAgICAgcFRyYW5zbWl0S2V5LT53VFNDMTVfMCwgcFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2LCBwRGV2aWNlLT5hYnlQUk5HKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkKSB7CisgICAgICAgICAgICBjYklWbGVuID0gODsvL1JTTiBIZWFkZXIKKyAgICAgICAgICAgIGNiSUNWbGVuID0gODsvL01JQworICAgICAgICAgICAgY2JNSUNIRFIgPSBzaXplb2YoU01JQ0hEUkhlYWQpOworICAgICAgICAgICAgcFR4QnVmSGVhZC0+d0ZyYWdDdGwgfD0gRlJBR0NUTF9BRVM7CisgICAgICAgICAgICBwRGV2aWNlLT5iQUVTID0gVFJVRTsKKyAgICAgICAgfQorICAgICAgICAvL01BQyBIZWFkZXIgc2hvdWxkIGJlIHBhZGRpbmcgMCB0byBEVyBhbGlnbm1lbnQuCisgICAgICAgIHVQYWRkaW5nID0gNCAtIChjYk1hY0hkTGVuJTQpOwor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FRyYW5zbWl0S2V5LT51S2V5TGVuZ3RoID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51V2VwS2V5TGVuZ3RoOworICAgICAgICAgICAgcFRyYW5zbWl0S2V5LT5kd1RTQzQ3XzE2ID0gcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5kd1RTQzQ3XzE2OworICAgICAgICAgICAgcFRyYW5zbWl0S2V5LT53VFNDMTVfMCA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1RTQzE1XzA7CisgICAgICAgICAgICBtZW1jcHkocFRyYW5zbWl0S2V5LT5hYnlLZXksCisgICAgICAgICAgICAgICAgJnBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYWJ5V2VwS2V5WzBdLAorICAgICAgICAgICAgICAgIHBUcmFuc21pdEtleS0+dUtleUxlbmd0aAorICAgICAgICAgICAgICAgICk7CisgICAgICAgIH0KKworICAgICAgICBpZiAoKHBUcmFuc21pdEtleSAhPSBOVUxMKSAmJiAocFRyYW5zbWl0S2V5LT5ieUNpcGhlclN1aXRlID09IEtFWV9DVExfVEtJUCkpIHsKKworICAgICAgICAgICAgZHdNSUNLZXkwID0gKihQRFdPUkQpKCZwVHJhbnNtaXRLZXktPmFieUtleVsxNl0pOworICAgICAgICAgICAgZHdNSUNLZXkxID0gKihQRFdPUkQpKCZwVHJhbnNtaXRLZXktPmFieUtleVsyMF0pOworCisgICAgICAgICAgICAvLyBETyBTb2Z0d2FyZSBNaWNoYWVsCisgICAgICAgICAgICBNSUNfdkluaXQoZHdNSUNLZXkwLCBkd01JQ0tleTEpOworICAgICAgICAgICAgTUlDX3ZBcHBlbmQoKFBCWVRFKSYoc0V0aEhlYWRlci5hYnlEc3RBZGRyWzBdKSwgMTIpOworICAgICAgICAgICAgZHdNSUNfUHJpb3JpdHkgPSAwOworICAgICAgICAgICAgTUlDX3ZBcHBlbmQoKFBCWVRFKSZkd01JQ19Qcmlvcml0eSwgNCk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkRNQTBfdHhfODAyMTpNSUMgS0VZOiAlbFgsICVsWFxuIiwgZHdNSUNLZXkwLCBkd01JQ0tleTEpOworCisgICAgICAgICAgICB1TGVuZ3RoID0gY2JIZWFkZXJTaXplICsgY2JNYWNIZExlbiArIHVQYWRkaW5nICsgY2JJVmxlbjsKKworICAgICAgICAgICAgTUlDX3ZBcHBlbmQoKHBieVR4QnVmZmVyQWRkciArIHVMZW5ndGgpLCBjYkZyYW1lQm9keVNpemUpOworCisgICAgICAgICAgICBwZHdNSUNfTCA9IChQRFdPUkQpKHBieVR4QnVmZmVyQWRkciArIHVMZW5ndGggKyBjYkZyYW1lQm9keVNpemUpOworICAgICAgICAgICAgcGR3TUlDX1IgPSAoUERXT1JEKShwYnlUeEJ1ZmZlckFkZHIgKyB1TGVuZ3RoICsgY2JGcmFtZUJvZHlTaXplICsgNCk7CisKKyAgICAgICAgICAgIE1JQ192R2V0TUlDKHBkd01JQ19MLCBwZHdNSUNfUik7CisgICAgICAgICAgICBNSUNfdlVuSW5pdCgpOworCisgICAgICAgICAgICBpZiAocERldmljZS0+YlR4TUlDRmFpbCA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgKnBkd01JQ19MID0gMDsKKyAgICAgICAgICAgICAgICAqcGR3TUlDX1IgPSAwOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJUeE1JQ0ZhaWwgPSBGQUxTRTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJ1TGVuZ3RoOiAlZCwgJWRcbiIsIHVMZW5ndGgsIGNiRnJhbWVCb2R5U2l6ZSk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImNiUmVxQ291bnQ6JWQsICVkLCAlZCwgJWRcbiIsIGNiUmVxQ291bnQsIGNiSGVhZGVyU2l6ZSwgdVBhZGRpbmcsIGNiSVZsZW4pOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJNSUM6JWx4LCAlbHhcbiIsICpwZHdNSUNfTCwgKnBkd01JQ19SKTsKKworICAgICAgICB9CisKKworICAgICAgICBzX3ZGaWxsVHhLZXkocERldmljZSwgKFBCWVRFKShwVHhCdWZIZWFkLT5hZHdUeEtleSksIHBieUlWSGVhZCwgcFRyYW5zbWl0S2V5LAorICAgICAgICAgICAgICAgICAgICAgcGJ5TWFjSGRyLCAoV09SRCljYkZyYW1lQm9keVNpemUsIChQQllURSlwTUlDSERSKTsKKworICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RXRVApIHsKKyAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdUU0M0N18xNiA9IHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNjsKKyAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1RTQzE1XzAgPSBwVHJhbnNtaXRLZXktPndUU0MxNV8wOworICAgICAgICB9CisKKyAgICAgICAgaWYgKChwRGV2aWNlLT5ieUxvY2FsSUQgPD0gUkVWX0lEX1ZUMzI1M19BMSkpIHsKKyAgICAgICAgICAgIHNfdlNXZW5jcnlwdGlvbihwRGV2aWNlLCBwVHJhbnNtaXRLZXksIHBieVBheWxvYWRIZWFkLCAoV09SRCkoY2JGcmFtZUJvZHlTaXplICsgY2JNSUNsZW4pKTsKKyAgICAgICAgfQorICAgIH0KKworICAgIHBNQUNIZWFkZXItPndTZXFDdGwgPSBjcHVfdG9fbGUxNihwRGV2aWNlLT53U2VxQ291bnRlciA8PCA0KTsKKyAgICBwRGV2aWNlLT53U2VxQ291bnRlcisrIDsKKyAgICBpZiAocERldmljZS0+d1NlcUNvdW50ZXIg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fQorICAgIH0KKworCisgICAgLy8gZmlyc3QgVEQgaXMgdGhlIG9ubHkgVEQKKyAgICAvL1NldCBUU1IxICYgUmVxQ291bnQgaW4gVHhEZXNjSGVhZAorICAgIHBGcnN0VEQtPnBUREluZm8tPnNrYiA9IHNrYjsKKyAgICBwRnJzdFRELT5tX3RkMVREMS5ieVRDUiA9IChUQ1JfU1RQIHwgVENSX0VEUCB8IEVETVNEVSk7CisgICAgcEZyc3RURC0+cFRESW5mby0+c2tiX2RtYSA9IHBGcnN0VEQtPnBUREluZm8tPmJ1Zl9kbWE7CisgICAgcEZyc3RURC0+bV90ZDFURDEud1JlcUNvdW50ID0gY3B1X3RvX2xlMTYoY2JSZXFDb3VudCk7CisgICAgcEZyc3RURC0+YnVmZl9hZGRyID0gY3B1X3RvX2xlMzIocEZyc3RURC0+cFRESW5mby0+c2tiX2RtYSk7CisgICAgcEZyc3RURC0+cFRESW5mby0+YnlGbGFncyA9IDA7CisgICAgcEZyc3RURC0+cFRESW5mby0+YnlGbGFncyB8PSBURF9GTEFHU19QUklWX1NLQjsKKworICAgIGlmIChNQUNiSXNSZWdCaXRzT24ocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19QU0NUTCwgUFNDVExfUFMpKSB7CisgICAgICAgIC8vIERpc2FibGUgUFMKKyAgICAgICAgTUFDYlBTV2FrZXVwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgIH0KKyAgICBwRGV2aWNlLT5iUFdCaXRPbiA9IEZBTFNFOworCisgICAgd21iKCk7CisgICAgcEZyc3RURC0+bV90ZDBURDAuZjFPd25lciA9IE9XTkVEX0JZX05JQzsKKyAgICB3bWIoKTsKKworICAgIHBEZXZpY2UtPmlURFVzZWRbVFlQRV9UWERNQTBdKys7CisKKyAgICBpZiAoQVZBSUxfVEQocERldmljZSwgVFlQRV9UWERNQTApIDw9IDEpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAi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4gV09SRCAgICAgICAgICAgICB3RHVyYXRpb24sCisgICAgSU4gUFNFdGhlcm5ldEhlYWRlciBwc0V0aEhlYWRlciwKKyAgICBJTiBCT09MICAgICAgICAgICAgIGJOZWVkRW5jcnlwdCwKKyAgICBJTiBXT1JEICAgICAgICAgICAgIHdGcmFnVHlwZSwKKyAgICBJTiBVSU5UICAgICAgICAgICAgIHVETUFJZHgsCisgICAgSU4gVUlOVCAgICAgICAgICAgICB1RnJhZ0lkeAorICAgICk7CisKKworVUlOVAorY2JHZXRGcmFnQ291bnQoCisgICAgSU4gIFBTRGV2aWNlICAgICAgICAgcERldmljZSwKKyAgICBJTiAgUFNLZXlJdGVtICAgICAgICBwVHJhbnNtaXRLZXksCisgICAgSU4gIFVJTlQgICAgICAgICAgICAgY2JGcmFtZUJvZHlTaXplLAorICAgIElOICBQU0V0aGVybmV0SGVhZGVyIHBzRXRoSGVhZGVyCisgICAgKTsKKworCitWT0lECit2R2VuZXJhdGVGSUZPSGVhZGVyICgKKyAgICBJTiAgUFNEZXZpY2UgICAgICAgICBwRGV2aWNlLAorICAgIElOICBCWVRFICAgICAgICAgICAgIGJ5UGt0VHlwLAorICAgIElOICBQQllURSAgICAgICAgICAgIHBieVR4QnVmZmVyQWRkciwKKyAgICBJTiAgQk9PTCAgICAgICAgICAgICBiTmVlZEVuY3J5cHQsCisgICAgSU4gIFVJTlQgICAgICAgICAgICAgY2JQYXlsb2FkU2l6ZSwKKyAgICBJTiAgVUlOVCAgICAgICAgICAgICB1RE1BSWR4LAorICAgIElOICBQU1R4RGVzYyAgICAgICAgIHBIZWFkVEQsCisgICAgSU4gIFBTRXRoZXJuZXRIZWFkZXIgcHNFdGhIZWFkZXIsCisgICAgSU4gIFBCWVRFICAgICAgICAgICAgcFBhY2tldCwKKyAgICBJTiAgUFNLZXlJdGVtICAgICAgICBwVHJhbnNtaXRLZXksCisgICAgSU4gIFVJTlQgICAgICAgICAgICAgdU5vZGVJbmRleCwKKyAgICBPVVQgUFVJ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AgICAgICAgaWYgKEJJVGJJc0FueUJpdHNPbihieVdhaXQsIChJMk1DU1JfRE9ORSB8IEkyTUNTUl9OQUNLKSkpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBQQ0F2RGVsYXlCeUlPKENCX0RFTEFZX0xPT1BfV0FJVCk7CisgICAgICAgIH0KKworICAgICAgICBpZiAoKHdEZWxheSA8IFdfTUFYX1RJTUVPVVQpICYmCisgICAgICAgICAgICAgKEJJVGJJc0JpdE9mZihieVdhaXQsIEkyTUNTUl9OQUNLKSkpIHsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgfQorICAgIGlmICh3Tm9BQ0sgPT0gV19NQVhfSTJDUkVUUlkpIHsKKyAgICAgICAgVk5Tdk91dFBvcnRCKGR3SW9CYXNlICsgTUFDX1JFR19JMk1DRkcsIGJ5T3JnKTsKKyAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH0KKyAgICBWTlN2T3V0UG9ydEIoZHdJb0Jhc2UgKyBNQUNfUkVHX0kyTUNGRywgYnlPcmcpOworICAgIHJldHVybiBUUlVFOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogVHVybiBiaXRzIG9uIGluIGVlcHJvbQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGR3SW9CYXNlICAgICAgICAtIEkvTyBiYXNlIGFkZHJlc3MKKyAqICAgICAgYnlDb250bnRPZmZzZXQgIC0gYWRkcmVzcyBvZiBFRVBST00KKyAqICAgICAgYnlCaXRzICAgICAgICAgIC0gYml0cyB0byB0dXJuIG9uCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIFNST012UmVnQml0c09uIChEV09SRF9QVFIgZHdJb0Jhc2UsIEJZVEUgYnlDb250bnRPZmZzZXQsIEJZVEUgYnlCaXRzKQoreworICAgIEJZVEUgICAgYnlPcmdEYXRhOworCisgICAgYnlP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VGJJc0FsbEJpdHNPZmYoYnlPcmdEYXRhLCBieVRlc3RCaXRzKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246IFJlYWQgYWxsIGNvbnRlbnRzIG9mIGVlcHJvbSB0byBidWZmZXIKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBkd0lvQmFzZSAgICAgICAgLSBJL08gYmFzZSBhZGRyZXNzCisgKiAgT3V0OgorICogICAgICBwYnlFZXByb21SZWdzICAgLSBFRVBST00gY29udGVudCBCdWZmZXIKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCisgKi8KK3ZvaWQgU1JPTXZSZWFkQWxsQ29udGVudHMgKERXT1JEX1BUUiBkd0lvQmFzZSwgUEJZVEUgcGJ5RWVwcm9tUmVncykKK3sKKyAgICBpbnQgICAgIGlpOworCisgICAgLy8gaWkgPSBSb20gQWRkcmVzcworICAgIGZvciAoaWkgPSAwOyBpaSA8IEVFUF9NQVhfQ09OVEVYVF9TSVpFOyBpaSsrKSB7CisgICAgICAgICpwYnlFZXByb21SZWdzID0gU1JPTWJ5UmVhZEVtYmVkZGVkKGR3SW9CYXNlLChCWVRFKSBpaSk7CisgICAgICAgIHBieUVlcHJvbVJlZ3MrKzsKKyAgICB9Cit9CisKKworLyoKKyAqIERlc2NyaXB0aW9uOiBXcml0ZSBhbGwgY29udGVudHMgb2YgYnVmZmVyIHRvIGVlcHJvbQorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGR3SW9CYXNlICAgICAgICAtIEkvTyBiYXNlIGFkZHJlc3MKKyAqICAgICAgcGJ5RWVwcm9tUmVncyAgIC0gRUVQUk9NIGNvbnRlbnQgQnVmZmVyCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIFNST012V3JpdGVBbGxDb250ZW50cyAoRFdPUkRfUFRSIGR3SW9CYXNlLCBQQllURSBwYnlFZXByb21SZWdzKQoreworICAgIGludCAgICAgaWk7CisKKyAgICAvLyBpaSA9IFJvbSBBZGRyZXNzCisgICAgZm9yIChpaSA9IDA7IGlpIDwgRUVQX01BWF9DT05URVhUX1NJWkU7IGlpKyspIHsKKyAgICAgICAgU1JPTWJXcml0ZUVtYmVkZGVkKGR3SW9CYXNlLChCWVRFKSBpaSwgKnBieUVlcHJvbVJlZ3MpOworICAgICAgICBwYnlFZXByb21SZWdzKys7CisgICAgfQorfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogUmVhZCBFdGhlcm5ldCBBZGRyZXNzIGZyb20gZWVwcm9tIHRvIGJ1ZmZlcgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIGR3SW9CYXNlICAgICAgICAtIEkvTyBiYXNlIGFkZHJlc3MKKyAqICBPdXQ6CisgKiAgICAgIHBieUV0aGVyQWRkcmVzcyAtIEV0aGVybmV0IEFkZHJlc3MgYnVmZmVyCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCit2b2lkIFNST012UmVhZEV0aGVyQWRkcmVzcyAoRFdPUkRfUFRSIGR3SW9CYXNlLCBQQllURSBwYnlFdGhlckFkZHJlc3MpCit7CisgICAgQllURSAgICAgaWk7CisKKyAgICAvLyBpaSA9IFJvbSBBZGRyZXNzCisgICAgZm9yIChpaSA9IDA7IGlpIDwgVV9FVEhFUl9BRERSX0xFTjsgaWkrKykgeworICAgICAgICAqcGJ5RXRoZXJBZGRyZXNzID0gU1JPTWJ5UmVhZEVtYmVkZGVkKGR3SW9CYXNlLCBpaSk7CisgICAgICAgIHBieUV0aGVyQWRkcmVzcysrOworICAgIH0KK30KKworCisvKgorICogRGVzY3JpcHRpb246IFdyaXRlIEV0aGVybmV0IEFkZHJlc3MgZnJvbSBidWZmZXIgdG8gZWVwcm9tCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgZHdJb0Jhc2UgICAgICAgIC0gSS9PIGJ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WICAgICAgICAgIDB4MDQKKworLy8KKy8vIEJpdHMgaW4gRUVQX09GU19SQURJT0NUTAorLy8KKyNkZWZpbmUgRUVQX1JBRElPQ1RMX0VOQUJMRSAweDgwCisjZGVmaW5lIEVFUF9SQURJT0NUTF9JTlYgICAgMHgwMQorCisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBUeXBlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLy8gQVQyNEMwMiBlZXByb20gY29udGVudHMKKy8vICAgICAgMjA0OCBiaXRzID0gMjU2IGJ5dGVzID0gMTI4IHdvcmRzCisvLwordHlwZWRlZiBzdHJ1Y3QgdGFnU1Nyb21SZWcgeworICAgIEJZVEUgICAgYWJ5UEFSWzZdOyAgICAgICAgICAgICAgICAgIC8vIDB4MDAgKFdPUkQpCisKKyAgICBXT1JEICAgIHdTVUJfVklEOyAgICAgICAgICAgICAgICAgICAvLyAweDAzIChXT1JEKQorICAgIFdPUkQgICAgd1NVQl9TSUQ7CisKKyAgICBCWVRFICAgIGJ5QkNGRzA7ICAgICAgICAgICAgICAgICAgICAvLyAweDA1IChXT1JEKQorICAgIEJZVEUgICAgYnlCQ0ZHMTsKKworICAgIEJZVEUgICAgYnlGQ1IwOyAgICAgICAgICAgICAgICAgICAgIC8vIDB4MDYgKFdPUkQpCisgICAgQllURSAgICBieUZDUjE7CisgICAgQllURSAgICBieVBNQzA7ICAgICAgICAgICAgICAgICAgICAgLy8gMHgwNyAoV09SRCkKKyAgICBCWVRFICAgIGJ5UE1DMTsKKyAgICBCWVRFICAgIGJ5TUFYTEFUOyAgICAgICAgICAgICAgICAgICAvLyAweDA4IChXT1JEKQorICAgIEJZVEUgICAgYnlNSU5HTlQ7CisgICAgQllURSAgICBieUNGRzA7ICAgICAgICAgICAgICAgICAgICAgLy8gMHgwOSAoV09SRCkKKyAgICBCWVRFICAgIGJ5Q0ZHMTsKKyAgICBXT1JEICAgIHdDSVN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ENSQzMyCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqCQlwYnlNdWx0aUFkZHIgICAgLSBNdWx0aWNhc3QgQWRkcmVzcworICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogSGFzaCB2YWx1ZQorICoKKyAqLworQllURSBFVEhieUdldEhhc2hJbmRleEJ5Q3JjMzIgKFBCWVRFIHBieU11bHRpQWRkcikKK3sKKyAgICBpbnQgICAgIGlpOworICAgIEJZVEUgICAgYnlUbXBIYXNoOworICAgIEJZVEUgICAgYnlIYXNoID0gMDsKKworICAgIC8vIGdldCB0aGUgbGVhc3QgNi1iaXRzIGZyb20gQ1JDIGdlbmVyYXRvcgorICAgIGJ5VG1wSGFzaCA9IChCWVRFKShDUkNkd0NyYzMyKHBieU11bHRpQWRkciwgVV9FVEhFUl9BRERSX0xFTiwKKyAgICAgICAgICAgIDB4RkZGRkZGRkZMKSAmIDB4M0YpOworICAgIC8vIHJldmVyc2UgbW9zdCBiaXQgdG8gbGVhc3QgYml0CisgICAgZm9yIChpaSA9IDA7IGlpIDwgKHNpemVvZihieVRtcEhhc2gpICogOCk7IGlpKyspIHsKKyAgICAgICAgYnlIYXNoIDw8PSAxOworICAgICAgICBpZiAoQklUYklzQml0T24oYnlUbXBIYXNoLCAweDAxKSkKKyAgICAgICAgICAgIGJ5SGFzaCB8PSAxOworICAgICAgICBieVRtcEhhc2ggPj49IDE7CisgICAgfQorCisgICAgLy8gYWRqdXN0IDYtYml0cyB0byB0aGUgcmlnaHQgbW9zdAorICAgIHJldHVybiAoYnlIYXNoID4+IDIpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2hlY2sgQ1JDIHZhbHVlIG9mIHRoZSBidWZmZXIgaWYgT2sgb3Igbm90CisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqCQlwYnlCdWZmZXIJICAgIC0gcG9pbnRlciBvZiBidWZmZXIgKG5vcm1hbGx5IGlz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maW5lZChfX1RUWVBFX0hfXykKKyNpbmNsdWRlICJ0dHlwZS5oIgorI2VuZGlmCisKKworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgRGVmaW5pdGlvbnMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvLworLy8gY29uc3RhbnRzCisvLworI2RlZmluZSBVX0VUSEVSX0FERFJfTEVOICAgIDYgICAgICAgICAgIC8vIEV0aGVybmV0IGFkZHJlc3MgbGVuZ3RoCisjZGVmaW5lIFVfVFlQRV9MRU4gICAgICAgICAgMiAgICAgICAgICAgLy8KKyNkZWZpbmUgVV9DUkNfTEVOICAgICAgICAgICA0ICAgICAgICAgICAvLworI2RlZmluZSBVX0hFQURFUl9MRU4gICAgICAgIChVX0VUSEVSX0FERFJfTEVOICogMiArIFVfVFlQRV9MRU4pCisjZGVmaW5lIFVfRVRIRVJfQUREUl9TVFJfTEVOIChVX0VUSEVSX0FERFJfTEVOICogMiArIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRXRoZXJuZXQgYWRkcmVzcyBzdHJpbmcgbGVuZ3RoCisKKyNkZWZpbmUgTUlOX0RBVEFfTEVOICAgICAgICA0NiAgICAgICAgICAvLyBtaW4gZGF0YSBsZW5ndGgKKyNkZWZpbmUgTUFYX0RBVEFfTEVOICAgICAgICAxNTAwICAgICAgICAvLyBtYXggZGF0YSBsZW5ndGgKKworI2RlZmluZSBNSU5fUEFDS0VUX0xFTiAgICAgIChNSU5fREFUQV9MRU4gKyBVX0hFQURFUl9MRU4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gNjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtaW4gdG90YWwgcGFja2V0IGxlbmd0aCAodHgpCisjZGVmaW5lIE1BWF9QQUNLRVRfTEVOICAgICAgKE1BWF9EQVRBX0xFTiArIFVfSEVBREVSX0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KKworI2RlZmluZSBJU19OVUxMX0FERFJFU1MocGJ5RXRoZXJBZGRyKSAoICAgICAgICAgICAgIFwKKyAgICAoKihQRFdPUkQpKHBieUV0aGVyQWRkcikgPT0gMEwpICYmICAgICAgICAgICAgICBcCisgICAgKCooUFdPUkQpKChQQllURSkocGJ5RXRoZXJBZGRyKSArIDQpID09IDApICAgICAgXAorKQorCisjZGVmaW5lIElTX0VUSF9BRERSRVNTX0VRVUFMKHBieUFkZHIxLCBwYnlBZGRyMikgKCAgXAorICAgICgqKFBEV09SRCkocGJ5QWRkcjEpID09ICooUERXT1JEKShwYnlBZGRyMikpICYmIFwKKyAgICAoKihQV09SRCkoKFBCWVRFKShwYnlBZGRyMSkgKyA0KSA9PSAgICAgICAgICAgICBcCisgICAgKihQV09SRCkoKFBCWVRFKShwYnlBZGRyMikgKyA0KSkgICAgICAgICAgICAgICAgXAorKQorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IENsYXNzZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2lmZGVmIF9fY3BsdXNwbHVzCitleHRlcm4gIkMiIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogQXNzdW1lIEMgZGVjbGFyYXRpb25zIGZvciBDKysgKi8KKyNlbmRpZiAvKiBfX2NwbHVzcGx1cyAqLworCisKK0JZVEUgRVRIYnlHZXRIYXNoSW5kZXhCeUNyYzMyKFBCWVRFIHBieU11bHRpQWRkcik7CisvL0JZVEUgRVRIYnlHZXRIYXNoSW5kZXhCeUNyYyhQQllURSBwYnlNdWx0aU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WduZWQgaW50IGluZGV4KTsKK3Vuc2lnbmVkIGludCByb3RyMSh1bnNpZ25lZCBpbnQgYSk7CisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgVmFyaWFibGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiB0a2lwX3Nib3goKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogUmV0dXJucyBhIDE2IGJpdCB2YWx1ZSBmcm9tIGEgNjRLIGVudHJ5IHRhYmxlLiBUaGUgVGFibGUgKi8KKy8qIGlzIHN5bnRoZXNpemVkIGZyb20gdHdvIDI1NiBlbnRyeSBieXRlIHdpZGUgdGFibGVzLiAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgaW50IHRraXBfc2JveCh1bnNpZ25lZCBpbnQgaW5kZXgpCit7CisgICAgdW5zaWduZWQgaW50IGluZGV4X2xvdzsKKyAgICB1bnNpZ25lZCBpbnQgaW5kZXhfaGlnaDsKKyAgICB1bnNpZ25lZCBpbnQgbGVmdCwgcmlnaHQ7CisKKyAgICBpbmRleF9sb3cgPSAoaW5kZXggJSAyNTYpOworICAgIGluZGV4X2hpZ2ggPSAoKGluZGV4ID4+IDgpICUgMjU2KTsKKworICAgIGxlZnQgPSBUS0lQX1Nib3hfTG93ZXJbaW5kZXhfbG93XSArIChUS0lQX1Nib3hfVXBwZXJbaW5kZXhfbG93XSAqIDI1Nik7CisgICAgcmlnaHQgPSBUS0lQX1Nib3hfVXBwZXJbaW5kZXhfaGlnaF0gKyAoVEtJUF9TYm94X0xvd2VyW2luZGV4X2hpZ2hdICogMjU2KTsKKworICAgIHJldHVybiAobGVmdCBeIHJpZ2h0KTsKK307CisKKwordW5zaWduZWQgaW50IHJvdHIxKHVuc2lnbmVkIGludCBhKQoreworICAgIHVuc2lnbmVkIGludCBiOworCisgICAgaWYgKChhICYgMHgwMSkgPT0gMHgwMSkgeworICAgICAgICBiID0gKGEgPj4gMSkgfCAweDgwMDA7CisgICAgfSBlbHNlIHsKKyAgICAgICAgYiA9IChhID4+IDEpICYgMHg3ZmZmOworICAgIH0KKyAgICBiID0gYiAlIDY1NTM2OworICAgIHJldHVybiBiOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjogQ2FjdWxhdGUgUkM0S2V5IGZvbSBUSywgVEEsIGFuZCBUU0MKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwYnlUS2V5ICAgICAgICAgLSBUS2V5CisgKiAgICAgIHBieVRBICAgICAgICAgICAtIFRBCisgKiAgICAgIGR3VFNDICAgICAgICAgICAtIFRTQworICogIE91dDoKKyAqICAgICAgcGJ5UkM0S2V5ICAgICAgIC0gUkM0S2V5CisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitWT0lEIFRLSVB2TWl4S2V5KAorICAgIFBCWVRFICAgcGJ5VEtleSwKKyAgICBQQllURSAgIHBieVRBLAorICAgIFdPUkQgICAgd1RTQzE1XzAsCisgICAgRFdPUkQgICBkd1RTQzQ3XzE2LAorICAgIFBCWVRFICAgcGJ5UkM0S2V5CisgICAgKQoreworICAgIHVuc2lnbmVkIGludCBwMWtbNV07CisvLyAgICB1bnNpZ25lZCBpbnQgdHRhazAsIHR0YWsxLCB0dGFrMiwgdHRhazMsIHR0YWs0OworICAgIHVuc2lnbmVkIGludCB0c2MwLCB0c2MxLCB0c2MyOworICAgIHVuc2lnbmVkIGludCBwcGswLCBwcGsxLCBwcGsyLCBwcGszLCBwcGs0LCBwcGs1OworICAgIHVuc2lnbmVkIGxvbmcgaW50IHBubCxwbmg7CisKKyAgICBpbnQgaSwgajsKKworICAgIHBubCA9IHdUU0MxNV8wOworICAgIHBuaCA9IG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yB0a2lwX3Nib3goIChwcGs0IF4gKCgyNTYqcGJ5VEtleVsxMV0pICsgcGJ5VEtleVsxMF0pKSAlIDY1NTM2KTsKKworICAgIHBwazAgPSBwcGswICsgcm90cjEocHBrNSBeICgoMjU2KnBieVRLZXlbMTNdKSArIHBieVRLZXlbMTJdKSk7CisgICAgcHBrMSA9IHBwazEgKyByb3RyMShwcGswIF4gKCgyNTYqcGJ5VEtleVsxNV0pICsgcGJ5VEtleVsxNF0pKTsKKyAgICBwcGsyID0gcHBrMiArIHJvdHIxKHBwazEpOworICAgIHBwazMgPSBwcGszICsgcm90cjEocHBrMik7CisgICAgcHBrNCA9IHBwazQgKyByb3RyMShwcGszKTsKKyAgICBwcGs1ID0gcHBrNSArIHJvdHIxKHBwazQpOworCisgICAgLyogUGhhc2UgMiwgU3RlcCAzICovCisgICAgcGJ5UkM0S2V5WzBdID0gKHRzYzIgPj4gOCkgJSAyNTY7CisgICAgcGJ5UkM0S2V5WzFdID0gKCgodHNjMiA+PiA4KSAlIDI1NikgfCAweDIwKSAmIDB4N2Y7CisgICAgcGJ5UkM0S2V5WzJdID0gdHNjMiAlIDI1NjsKKyAgICBwYnlSQzRLZXlbM10gPSAoKHBwazUgXiAoKDI1NipwYnlUS2V5WzFdKSArIHBieVRLZXlbMF0pKSA+PiAxKSAlIDI1NjsKKworICAgIHBieVJDNEtleVs0XSA9IHBwazAgJSAyNTY7CisgICAgcGJ5UkM0S2V5WzVdID0gKHBwazAgPj4gOCkgJSAyNTY7CisKKyAgICBwYnlSQzRLZXlbNl0gPSBwcGsxICUgMjU2OworICAgIHBieVJDNEtleVs3XSA9IChwcGsxID4+IDgpICUgMjU2OworCisgICAgcGJ5UkM0S2V5WzhdID0gcHBrMiAlIDI1NjsKKyAgICBwYnlSQzRLZXlbOV0gPSAocHBrMiA+PiA4KSAlIDI1NjsKKworICAgIHBieVJDNEtleVsxMF0gPSBwcGszICUgMjU2OworICAgIHBieVJDNEtleVsxMV0gPSAocHBrMyA+P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aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwKKyAqIDUxIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAtMTMwMSBVU0EuCisgKgorICogRmlsZTogdG1hY3JvLmgKKyAqCisgKiBQdXJwb3NlOiBkZWZpbmUgYmFzaWMgY29tbW9uIHR5cGVzIGFuZCBtYWNyb3MKKyAqCisgKiBBdXRob3I6IFRldmluIENoZW4KKyAqCisgKiBEYXRlOiBNYXkgMjEsIDE5OTYKKyAqCisgKi8KKworCisjaWZuZGVmIF9fVE1BQ1JPX0hfXworI2RlZmluZSBfX1RNQUNST19IX18KKworCisjaWYgIWRlZmluZWQoX19UVFlQRV9IX18pCisjaW5jbHVkZSAidHR5cGUuaCIKKyNlbmRpZgorCisKKworCisvKioqKioqIENvbW1vbiBoZWxwZXIgbWFjcm9zICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWYgIWRlZmluZWQoTE9OSUJCTEUpCisjZGVmaW5lIExPTklCQkxFKGIpICAgICAgICAgKChCWVRFKShiKSAmIDB4MEYpCisjZW5kaWYKKyNpZiAhZGVmaW5lZChISU5JQkJMRSkKKyNkZWZpbmUgSElOSUJCTEUoYikgICAgICAgICAoKEJZVEUpKCgoV09SRCkoYikgPj4gNCkgJiAweDBGKSkKKyNlbmRpZgorCisjaWYgIWRlZmluZWQoTE9CWVRFKQorI2RlZmluZSBMT0JZVEUodykgICAgICAgICAgICgoQllURSkodykpCisjZW5kaWYKKyNpZiAhZGVmaW5lZChISUJZVEUpCisjZGVmaW5lIEhJQllURSh3KSAgICAgICAgICAgKChCWVRFKSgoKFdPUkQpKHcpID4+IDgpICYgMHhGRikpCisjZW5kaWYKKworI2lmICFkZWZpbmVkKExPV09SRCkKKyNkZWZpbmUgTE9XT1JEKGQpICAgICAgICAgIC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GVuZGlhbiB0byBsaXR0bGUgZW5kaWFuIGNvbnZlcnQKKyNpZiAhZGVmaW5lZChSRVZXT1JEKQorI2RlZmluZSBSRVZXT1JEKHcpICgoV09SRCkoICgoV09SRCkodykgPj4gOCkgfCAoKFdPUkQpKHcpIDw8IDgpICkpCisjZW5kaWYKKyNpZiAhZGVmaW5lZChSRVZEV09SRCkKKyNkZWZpbmUgUkVWRFdPUkQoZCkgKE1BS0VEV09SRChNQUtFV09SRChISUJZVEUoSElXT1JEKGQpKSxMT0JZVEUoSElXT1JEKGQpKSksTUFLRVdPUkQoSElCWVRFKExPV09SRChkKSksTE9CWVRFKExPV09SRChkKSkpKSkKKyNlbmRpZgorCisvKiBtYXAgdG8ga25vd24gbmV0d29yayBuYW1lcyAqLworLyoKKyNkZWZpbmUgbnRvaHMoeCkgICAgICAgIFJFVldPUkQoeCkKKyNkZWZpbmUgbnRvaGwoeCkgICAgICAgIFJFVkRXT1JEKHgpCisjZGVmaW5lIGh0b25zKHgpICAgICAgICBSRVZXT1JEKHgpCisjZGVmaW5lIGh0b25sKHgpICAgICAgICBSRVZEV09SRCh4KQorKi8KKworCisvKgorI2lmbmRlZiBOT01JTk1BWAorI2lmbmRlZiBtYXgKKyNkZWZpbmUgbWF4KGEsYikgICAgICAgICAgICAoKChhKSA+IChiKSkgPyAoYSkgOiAoYikpCisjZW5kaWYKKyNpZm5kZWYgbWluCisjZGVmaW5lIG1pbihhLGIpICAgICAgICAgICAgKCgoYSkgPCAoYikpID8gKGEpIDogKGIpKQorI2VuZGlmCisjZW5kaWYgLy8gTk9NSU5NQVgKKyovCisKKworCisvKioqKioqIE1pc2MgbWFjcm9zICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvLyBnZXQgdGhlIGZpZWxkIG9mZnNldCBpbiB0aGUgdHlwZShzdHJ1Y3QsIGNsYXNzLCAuLi4pCisjZGVmaW5lIE9GRlNFVCh0eXBlLCBmaWVsZ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ICAgICAgICAgMHgwNiAgICAvLworI2RlZmluZSBQQ0lfUkVHX1JFVl9JRCAgICAgICAgICAweDA4ICAgIC8vCisjZGVmaW5lIFBDSV9SRUdfQ0xBU1NfQ09ERSAgICAgIDB4MDkgICAgLy8KKyNkZWZpbmUgUENJX1JFR19DQUNIRUxJTkVfU0laRSAgMHgwQyAgICAvLworI2RlZmluZSBQQ0lfUkVHX0xBVF9USU1FUiAgICAgICAweDBEICAgIC8vCisjZGVmaW5lIFBDSV9SRUdfSERSX1RZUEUgICAgICAgIDB4MEUgICAgLy8KKyNkZWZpbmUgUENJX1JFR19CSVNUICAgICAgICAgICAgMHgwRiAgICAvLworCisjZGVmaW5lIFBDSV9SRUdfQkFSMCAgICAgICAgICAgIDB4MTAgICAgLy8KKyNkZWZpbmUgUENJX1JFR19CQVIxICAgICAgICAgICAgMHgxNCAgICAvLworI2RlZmluZSBQQ0lfUkVHX0JBUjIgICAgICAgICAgICAweDE4ICAgIC8vCisjZGVmaW5lIFBDSV9SRUdfQ0FSREJVU19DSVNfUFRSIDB4MjggICAgLy8KKworI2RlZmluZSBQQ0lfUkVHX1NVQl9WRU5fSUQgICAgICAweDJDICAgIC8vCisjZGVmaW5lIFBDSV9SRUdfU1VCX1NZU19JRCAgICAgIDB4MkUgICAgLy8KKyNkZWZpbmUgUENJX1JFR19FWFBfUk9NX0JBUiAgICAgMHgzMCAgICAvLworI2RlZmluZSBQQ0lfUkVHX0NBUCAgICAgICAgICAgICAweDM0ICAgIC8vCisKKyNkZWZpbmUgUENJX1JFR19JTlRfTElORSAgICAgICAgMHgzQyAgICAvLworI2RlZmluZSBQQ0lfUkVHX0lOVF9QSU4gICAgICAgICAweDNEICAgIC8vCisjZGVmaW5lIFBDSV9SRUdfTUlOX0dOVCAgICAgICAgIDB4M0UgICAgLy8KKyNkZWZpbmUgUENJX1JFR19NQVhfTEFUICAgICAgICAgMHgzRiAgICAvLworCisjZGVmaW5lIFBDSV9SRUdfTUFYX1NJWkUgICAgICAgIDB4MTAwICAgLy8gbWF4aW11biB0b3RhbCBQQ0kgcmVnaXN0ZXJzCisKKworLy8KKy8vIEJpdHMgaW4gdGhlIENPTU1BTkQgcmVnaXN0ZXIKKy8vCisjZGVmaW5lIENPTU1BTkRfQlVTTSAgICAgICAgMHgwNCAgICAgICAgLy8KKyNkZWZpbmUgQ09NTUFORF9XQUlUICAgICAgICAweDgwICAgICAgICAvLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFR5cGVzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IE1hY3JvcyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvLyBtYWNybyBNQUtFIEJ1cyBEZXYgRnVuIElEIGludG8gV09SRAorI2RlZmluZSBNQUtFX0JERl9UT19XT1JEKGJ5QnVzSWQsIGJ5RGV2SWQsIGJ5RnVuSWQpIFwKKyAgICBNQUtFV09SRCggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICgoKChCWVRFKShieURldklkKSkgJiAweDFGKSA8PCAzKSArICAgICAgICAgXAorICAgICAgICAgICAgKCgoQllURSkoYnlGdW5JZCkpICYgMHgwNyksICAgICAgICAgICAgIFwKKyAgICAgICAgKGJ5QnVzSWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICkKKworI2RlZmluZSBHRVRfQlVTSUQod0J1c0RldkZ1bklkKSBcCisgICAgSElCWVRFKHdCdXNEZXZGdW5JZCkKKworI2RlZmluZSBHRVRfREVWSUQod0J1c0RldkZ1bklkKSBcCisgICAgKExPQllURSh3QnVzRGV2RnVuSWQpID4+IDMpCisKKyNkZWZpbmUgR0VUX0ZVTklEKHdCdXNEZXZGdW5JZCkgXAorICAgIChMT0JZVEUod0J1c0RldkZ1bklkKSAmIDB4MDcpCisK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tYml0CisKKworCisjaWZuZGVmIF9UQ0hBUl9ERUZJTkVECit0eXBlZGVmIGNoYXIgICAgICAgICAgICBUQ0hBUjsKK3R5cGVkZWYgY2hhciogICAgICAgICAgIFBUQ0hBUjsKK3R5cGVkZWYgdW5zaWduZWQgY2hhciAgIFRCWVRFOwordHlwZWRlZiB1bnNpZ25lZCBjaGFyKiAgUFRCWVRFOworI2RlZmluZSBfVENIQVJfREVGSU5FRAorI2VuZGlmCisKKyNlbHNlICAgLy8gX19DUFU4MDUxCisKKyNkZWZpbmUgVTggICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIKKyNkZWZpbmUgVTE2ICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0CisjZGVmaW5lIFUzMiAgICAgICAgICAgICB1bnNpZ25lZCBsb25nCisKKyNkZWZpbmUgVVNIT1JUICAgICAgICAgIHVuc2lnbmVkIHNob3J0CisjZGVmaW5lIFVJTlQgICAgICAgICAgICB1bnNpZ25lZCBpbnQKKworI2RlZmluZSBCWVRFICAgICAgICAgICAgdW5zaWduZWQgY2hhcgorI2RlZmluZSBXT1JEICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQKKyNkZWZpbmUgRFdPUkQgICAgICAgICAgIHVuc2lnbmVkIGxvbmcKKworCisjZW5kaWYgIC8vIF9fQ1BVODA1MQorCisKKy8vIG1heWJlIHRoaXMgc2hvdWxkIGJlIGRlZmluZWQgaW4gPGxpbWl0cy5oPgorI2RlZmluZSBVOF9NQVggICAgICAgICAgMHhGRlUKKyNkZWZpbmUgVTE2X01BWCAgICAgICAgIDB4RkZGRlUKKyNkZWZpbmUgVTMyX01BWCAgICAgICAgIDB4RkZGRkZGRkZVTAorCisjZGVmaW5lIEJZVEVfTUFYICAgICAgICAweEZGVQorI2RlZmluZSBXT1JEX01BWCAgICAgICAgMHhGRkZGVQorI2RlZmluZSBEV09SRF9NQVggICAgICAgMHhGRkZGRkZGRlVMCisKKworCisKKy8qKioqKioqIDMyLWJpdCB2cy4gMTYtYml0IGRlZmluaXRpb25zIGFuZCB0eXBlZGVmcyAqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZiAhZGVmaW5lZChOVUxMKQorI2lmZGVmIF9fY3BsdXNwbHVzCisjZGVmaW5lIE5VTEwgICAgICAgICAgICAwCisjZWxzZQorI2RlZmluZSBOVUxMICAgICAgICAgICAgKCh2b2lkICopMCkKKyNlbmRpZiAvLyBfX2NwbHVzcGx1cworI2VuZGlmIC8vICFOVUxMCisKKworCisKKyNpZiBkZWZpbmVkKF9fV0lOMzIpIHx8IGRlZmluZWQoX19DUFU4MDUxKQorCisjaWYgIWRlZmluZWQoRkFSKQorI2RlZmluZSBGQVIKKyNlbmRpZgorI2lmICFkZWZpbmVkKE5FQVIpCisjZGVmaW5lIE5FQVIKKyNlbmRpZgorI2lmICFkZWZpbmVkKERFRikKKyNkZWZpbmUgREVGCisjZW5kaWYKKyNpZiAhZGVmaW5lZChDQUxMQkFDSykKKyNkZWZpbmUgQ0FMTEJBQ0sKKyNlbmRpZgorCisjZWxzZSAgLy8gIV9fV0lOMzJfXworCisjaWYgIWRlZmluZWQoRkFSKQorI2RlZmluZSBGQVIKKyNlbmRpZgorI2lmICFkZWZpbmVkKE5FQVIpCisjZGVmaW5lIE5FQVIKKyNlbmRpZgorI2lmICFkZWZpbmVkKERFRikKKy8vIGRlZmF1bHQgcG9pbnRlciB0eXBlIGlzIEZBUiwgaWYgeW91IHdhbnQgbmVhciBwb2ludGVyIGp1c3QgcmVkZWZpbmUgaXQgdG8gTkVBUgorI2RlZmluZSBERUYKKyNlbmRpZgorI2lmICFkZWZpbmVkKENBTExCQUNLKQorI2RlZmluZSBDQUxMQkFDSworI2VuZGlmCisKKyNlbmRpZiAvLyAhX19XSU4zMl9fCisKKworCisKKy8qKioqKiogQ29tbW9uIHBvaW50ZXIgdHlwZXMgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZiEgZGVmaW5lZChfX0NQVTgwNTEpCisKK3R5cGVkZWYgc2lnbmVkIGNoYXIgREVGKiAgICAgICAgUEk4OwordHlwZWRlZiBzaWduZWQgc2hvcnQgREVGKiAgICAgICBQSTE2OwordHlwZWRlZiBzaWduZWQgbG9uZyBERUYqICAgICAgICBQSTMyOworCit0eXBlZGVmIHVuc2lnbmVkIGNoYXIgREVGKiAgICAgIFBVODsKK3R5cGVkZWYgdW5zaWduZWQgc2hvcnQgREVGKiAgICAgUFUxNjsKK3R5cGVkZWYgdW5zaWduZWQgbG9uZyBERUYqICAgICAgUFUzMjsKKworI2lmIGRlZmluZWQoX19XSU4zMikKK3R5cGVkZWYgc2lnbmVkIF9faW50NjQgREVGKiAgICAgUEk2NDsKK3R5cGVkZWYgdW5zaWduZWQgX19pbnQ2NCBERUYqICAgUFU2NDsKKyNlbmRpZiAvLyBfX1dJTjMyCisKKyNpZiAhZGVmaW5lZChfV0lONjQpCit0eXBlZGVmIHVuc2lnbmVkIGxvbmcgICBVTE9OR19QVFI7ICAgICAgLy8gMzItYml0Cit0eXBlZGVmIHVuc2lnbmVkIGxvbmcgICBEV09SRF9QVFI7ICAgICAgLy8gMzItYml0CisjZW5kaWYgLy8gX1dJTjY0CisKKworLy8gYm9vbGVhbiBwb2ludGVyCit0eXBlZGVmIGludCBERUYqICAgICAgICAgICAgUEJPT0w7Cit0eXBlZGVmIGludCBORUFSKiAgICAgICAgICAgTlBCT09MOwordHlwZWRlZiBpbnQgRkFSKiAgICAgICAgICAgIExQQk9PTDsKKwordHlwZWRlZiBpbnQgREVGKiAgICAgICAgICAgIFBJTlQ7Cit0eXBlZGVmIGludCBORUFSKiAgICAgICAgICAgTlBJTlQ7Cit0eXBlZGVmIGludCBGQVIqICAgICAgICAgICAgTFBJTlQ7Cit0eXBlZGVmIGNvbnN0IGludCBERUYqICAgICAgUENJTlQ7Cit0eXBlZGVmIGNvbnN0IGludCBORUFSKiAgICAgTlBDSU5UOwordHlwZWRlZiBjb25zdCBpbnQgRkFSKiA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AgICAgICBOUERXT1JEOwordHlwZWRlZiBEV09SRCBGQVIqICAgICAgICAgIExQRFdPUkQ7Cit0eXBlZGVmIGNvbnN0IERXT1JEIERFRiogICAgUENEV09SRDsKK3R5cGVkZWYgY29uc3QgRFdPUkQgTkVBUiogICBOUENEV09SRDsKK3R5cGVkZWYgY29uc3QgRFdPUkQgRkFSKiAgICBMUENEV09SRDsKKwordHlwZWRlZiBRV09SRCBERUYqICAgICAgICAgIFBRV09SRDsKK3R5cGVkZWYgUVdPUkQgTkVBUiogICAgICAgICBOUFFXT1JEOwordHlwZWRlZiBRV09SRCBGQVIqICAgICAgICAgIExQUVdPUkQ7Cit0eXBlZGVmIGNvbnN0IFFXT1JEIERFRiogICAgUENRV09SRDsKK3R5cGVkZWYgY29uc3QgUVdPUkQgTkVBUiogICBOUENRV09SRDsKK3R5cGVkZWYgY29uc3QgUVdPUkQgRkFSKiAgICBMUENRV09SRDsKKwordHlwZWRlZiB2b2lkIERFRiogICAgICAgICAgIFBWT0lEOwordHlwZWRlZiB2b2lkIE5FQVIqICAgICAgICAgIE5QVk9JRDsKK3R5cGVkZWYgdm9pZCBGQVIqICAgICAgICAgICBMUFZPSUQ7CisKKy8vIGhhbmRsZSBkZWNsYXJhdGlvbgorI2lmZGVmIFNUUklDVAordHlwZWRlZiB2b2lkICpIQU5ETEU7CisjZWxzZQordHlwZWRlZiBQVk9JRCBIQU5ETEU7CisjZW5kaWYKKworLy8KKy8vIEFOU0kgKFNpbmdsZS1ieXRlIENoYXJhY3RlcikgdHlwZXMKKy8vCit0eXBlZGVmIGNoYXIgREVGKiAgICAgICAgICAgUENIOwordHlwZWRlZiBjaGFyIE5FQVIqICAgICAgICAgIE5QQ0g7Cit0eXBlZGVmIGNoYXIgRkFSKiAgICAgICAgICAgTFBDSDsKK3R5cGVkZWYgY29uc3QgY2hhciBERUYqICAgICBQQ0NIOwordHlwZWRlZiBjb25zdCBjaGFyIE5FQVIqICAgIE5QQ0NIOwordHlwZWRlZiBjb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ERlc3RpbmF0aW9uLExlbmd0aCkgeyAgICAgICBcCisgICAgICAgICAgICBtZW1zZXQoKFBWT0lEKShEZXN0aW5hdGlvbiksICAgICAgICBcCisgICAgICAgICAgICAwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAoVUxPTkcpKExlbmd0aCkgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgTUVNdkNvcHkocHZEZXN0LCBwdlNvdXJjZSwgdUNvdW50KSB7ICAgIFwKKyAgICAgICAgICAgIG1lbWNweSgoUFZPSUQpKHB2RGVzdCksICAgICAgICAgICAgIFwKKyAgICAgICAgICAgIChQVk9JRCkocHZTb3VyY2UpLCAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgIChVTE9ORykodUNvdW50KSAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworCisjZGVmaW5lIE1FTUVxdWFsTWVtb3J5KERlc3RpbmF0aW9uLFNvdXJjZSxMZW5ndGgpICAgKCFtZW1jbXAoKERlc3RpbmF0aW9uKSwoU291cmNlKSwoTGVuZ3RoKSkpCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IENsYXNzZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKworCisjZW5kaWYgLy8gX19VTUVNX0hfXworCisKZGlmZiAtLWdpdCBhL2Ry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ICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBWTlN2SW5Qb3J0RChkd0lPQWRkcmVzcywgcGR3RGF0YSkgeyAgICAgICAgICAgICAgICAgICAgIFwKKwkgICAgKihwZHdEYXRhKSA9IGlubChkd0lPQWRkcmVzcyk7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKworI2RlZmluZSBWTlN2T3V0UG9ydEIoZHdJT0FkZHJlc3MsIGJ5RGF0YSkgeyAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgb3V0YihieURhdGEsIGR3SU9BZGRyZXNzKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKworI2RlZmluZSBWTlN2T3V0UG9ydFcoZHdJT0FkZHJlc3MsIHdEYXRhKSB7ICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgb3V0dyh3RGF0YSwgZHdJT0FkZHJlc3MpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgVk5Tdk91dFBvcnREKGR3SU9BZGRyZXNzLCBkd0RhdGEpIHsgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIG91dGwoZHdEYXRhLCBkd0lPQWRkcmVzcyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfQorCisjZWxzZQorCisvLworLy8gIEZvciBtZW1vcnkgbWFwcGVkIElPCisvLworCisKKyNkZWZpbmUgVk5TdkluUG9ydEIoZHdJT0FkZHJlc3MsIHBieURhdGEpIHsgICAgICAgICAgICAgICAgICAgICBcCisJdm9sYXRpbGUgQllURSogcGJ5QWRkciA9ICgoUEJZVEUpKGR3SU9BZGRyZXNzKSk7ICAgICAgICAgICAgXAorCSoocGJ5RGF0YSkgPSByZWFkYihwYnlBZGRyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKworI2RlZmluZSBWTlN2SW5Qb3J0Vyhkd0lPQWRkcmVzcywgcHdEYXRhKSB7ICAgICAgICAgICAgICAgICAgICAgIFwKKwl2b2xhdGlsZSBXT1JEKiBwd0FkZHIgPSAoKFBXT1JEKShkd0lPQWRkcmVzcykpOyAgICAgICAgICAgICBcCisJKihwd0RhdGEpID0gcmVhZHcocHdBZGRyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSBWTlN2SW5Qb3J0RChkd0lPQWRkcmVzcywgcGR3RGF0YSkgeyAgICAgICAgICAgICAgICAgICAgIFwKKwl2b2xhdGlsZSBEV09SRCogcGR3QWRkciA9ICgoUERXT1JEKShkd0lPQWRkcmVzcykpOyAgICAgICAgICBcCisJKihwZHdEYXRhKSA9IHJlYWRsKHBkd0FkZHIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworCisjZGVmaW5lIFZOU3ZPdXRQb3J0Qihkd0lPQWRkcmVzcywgYnlEYXRhKSB7ICAgICAgICAgICAgICAgICAgICAgXAorICAgIHZvbGF0aWxlIEJZVEUqIHBieUFkZHIgPSAoKFBCWVRFKShkd0lPQWRkcmVzcykpOyAgICAgICAgICAgIFwKKyAgICB3cml0ZWIoKEJZVEUpYnlEYXRhLCBwYnlBZGRyKTsJCQkJCQkJXAorfQorCisKKyNkZWZpbmUgVk5Tdk91dFBvcnRXKGR3SU9BZGRyZXNzLCB3RGF0YSkgeyAgICAgICAgICAgICAgICAgICAgICBcCisgICAgdm9sYXRpbGUgV09SRCogcHdBZGRyID0gKChQV09SRCkoZHdJT0FkZHJlc3MpKTsgICAgICAgICAgICAgXAorICAgIHdyaXRldygoV09SRCl3RGF0YSwgcHdBZGRyKTsJCQkJCQkJXAorfQorCisjZGVmaW5lIFZOU3ZPdXRQb3J0RChkd0lPQWRkcmVzcywgZHdEYXRhKSB7ICAgICAgICAgICAgICAgICAgICAgXAorICAgIHZvbGF0aWxlIERXT1JEKiBwZHdBZGRyID0gKChQRFdPUkQpKGR3SU9BZGRyZXNzKSk7ICAgICAgICAgIFwKKyAgICB3cml0ZWwoKERXT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AgICAgICAgIFwKKyAgICBVTE9ORyAgIGlpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBpZiAodURlbGF5VW5pdCA8PSA1MCkgeyAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgdWRlbGF5KHVEZWxheVVuaXQpOyAgICAgICAgICAgICAgICAgICAgIFwKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgKHVEZWxheVVuaXQpOyBpaSsrKSAgIFwKKwkJICAgICBieURhdGEgPSBpbmIoMHg2MSk7CQkJCVwKKyAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30KKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IENsYXNzZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKworCisjZW5kaWYgLy8gX19VUENfSF9fCisKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy92dDY2NTUvdm50Y29uZmlndXJhdGlvbi5kYXQgYi9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU1L3ZudGNvbmZpZ3VyYXRpb24uZGF0Cm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjAwN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WdtdE9iamVjdCAgICAgICAgcE1nbXQgPSAoUFNNZ210T2JqZWN0KXBNZ210SGFuZGxlOworCisgICAgcE1nbXQtPndJQlNTQmVhY29uUGVyaW9kID0gd0JlYWNvblBlcmlvZDsKKyAgICBwTWdtdC0+d0lCU1NBVElNV2luZG93ID0gd0FUSU1XaW5kb3c7CisgICAgcE1nbXQtPnVJQlNTQ2hhbm5lbCA9IHVDaGFubmVsOworfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIEdldCBjdXJyZW50IFNTSUQKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwTWdtdEhhbmRsZSAtIHBvaW50ZXIgdG8gbWFuYWdlbWVudCBvYmplY3QKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IGN1cnJlbnQgU1NJRCBwb2ludGVyLgorICoKKy0qLworUFdMQU5fSUVfU1NJRAorVk5UV0lGSXBHZXRDdXJyZW50U1NJRCAoCisgICAgSU4gUFZPSUQgcE1nbXRIYW5kbGUKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpcE1nbXRIYW5kbGU7CisgICAgcmV0dXJuKChQV0xBTl9JRV9TU0lEKSBwTWdtdC0+YWJ5Q3VyclNTSUQpOworfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIEdldCBjdXJyZW50IGxpbmsgY2hhbm5lbAorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBNZ210SGFuZGxlIC0gcG9pbnRlciB0byBtYW5hZ2VtZW50IG9iamVjdAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogY3VycmVudCBDaGFubmVsLgorICoKKy0qLworVUlOVAorVk5UV0lGSXBHZXRDdXJyZW50Q2hhbm5lbCAoCisgICAgSU4gUFZPSUQg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RlOworICAgIEJZVEUgICAgYnlCYXNpY1JhdGU7CisgICAgVUlOVCAgICBpaTsKKworICAgIGlmIChieVJ4RGF0YVJhdGUgPD0gUkFURV8xMU0pIHsKKyAgICAgICAgYnlNYXhBY2tSYXRlID0gUkFURV8xTTsKKyAgICB9IGVsc2UgIHsKKyAgICAgICAgLy8gMjRNIGlzIG1hbmRhdG9yeSBmb3IgODAyLjExYSBhbmQgODAyLjExZworICAgICAgICBieU1heEFja1JhdGUgPSBSQVRFXzI0TTsKKyAgICB9CisgICAgaWYgKHBTdXBwb3J0UmF0ZUlFcykgeworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCBwU3VwcG9ydFJhdGVJRXMtPmxlbjsgaWkrKykgeworICAgICAgICAgICAgaWYgKHBTdXBwb3J0UmF0ZUlFcy0+YWJ5UmF0ZXNbaWldICYgMHg4MCkgeworICAgICAgICAgICAgICAgIGJ5QmFzaWNSYXRlID0gREFUQVJBVEVieUdldFJhdGVJZHgocFN1cHBvcnRSYXRlSUVzLT5hYnlSYXRlc1tpaV0pOworICAgICAgICAgICAgICAgIGlmICgoYnlCYXNpY1JhdGUgPD0gYnlSeERhdGFSYXRlKSAmJgorICAgICAgICAgICAgICAgICAgICAoYnlCYXNpY1JhdGUgPiBieU1heEFja1JhdGUpKSAgeworICAgICAgICAgICAgICAgICAgICBieU1heEFja1JhdGUgPSBieUJhc2ljUmF0ZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHBFeHRTdXBwb3J0UmF0ZUlFcykgeworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCBwRXh0U3VwcG9ydFJhdGVJRXMtPmxlbjsgaWkrKykgeworICAgICAgICAgICAgaWYgKHBFeHRTdXBwb3J0UmF0ZUlFcy0+YWJ5UmF0ZXNbaWldICYgMHg4MCkgeworICAgICAgICAgICAgICAgIGJ5QmFzaWNSYXRlID0gREFUQVJBVEVieUdldFJhdGVJZHgocEV4dFN1cHBvcnRSYXRlSUVzLT5hYnlSYXRlc1tpaV0pOworICAgICAgICAgICAgICAgIGlmICgoYnlCYXNpY1JhdGUgPD0gYnlSeERhdGFSYXRlKSAmJgorICAgICAgICAgICAgICAgICAgICAoYnlCYXNpY1JhdGUgPiBieU1heEFja1JhdGUpKSAgeworICAgICAgICAgICAgICAgICAgICBieU1heEFja1JhdGUgPSBieUJhc2ljUmF0ZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICByZXR1cm4gYnlNYXhBY2tSYXRlOworfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFNldCBBdXRoZW50aWNhdGlvbiBNb2RlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcE1nbXRIYW5kbGUgLSBwb2ludGVyIHRvIG1hbmFnZW1lbnQgb2JqZWN0CisgKiAgICAgIGVBdXRoTW9kZSAgIC0gQXV0aGVudGljYXRpb24gbW9kZQorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZQorICoKKy0qLworVk9JRAorVk5UV0lGSXZTZXRBdXRoZW50aWNhdGlvbk1vZGUgKAorICAgIElOIFBWT0lEIHBNZ210SGFuZGxlLAorICAgIElOIFdNQUNfQVVUSEVOVElDQVRJT05fTU9ERSBlQXV0aE1vZGUKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpcE1nbXRIYW5kbGU7CisKKyAgICBwTWdtdC0+ZUF1dGhlbk1vZGUgPSBlQXV0aE1vZGU7CisgICAgaWYgKChlQXV0aE1vZGUgPT0gV01BQ19BVVRIX1NIQVJFS0VZKSB8fAorICAgICAgICAoZUF1dGhNb2RlID09IFdNQUNfQVVUSF9BVVRPKSkgeworICAgICAgICBwTWdtdC0+YlNoYXJlS2V5QWxnb3JpdGhtID0gVFJVRTsKKyAgICB9IGVsc2UgeworICAgICAgICBwTWdtdC0+YlNoYXJlS2V5QWxnb3JpdGhtID0gRkFMU0U7CisgICAgfQorfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFNldCBFbmNyeXB0aW9uIE1vZGUKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwTWdtdEhhbmRsZSAtIHBvaW50ZXIgdG8gbWFuYWdlbWVudCBvYmplY3QKKyAqICAgICAgZUF1dGhNb2RlICAgLSBBdXRoZW50aWNhdGlvbiBtb2RlCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorLSovCitWT0lECitWTlRXSUZJdlNldEVuY3J5cHRpb25Nb2RlICgKKyAgICBJTiBQVk9JRCBwTWdtdEhhbmRsZSwKKyAgICBJTiBXTUFDX0VOQ1JZUFRJT05fTU9ERSBlRW5jcnlwdGlvbk1vZGUKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpcE1nbXRIYW5kbGU7CisKKyAgICBwTWdtdC0+ZUVuY3J5cHRpb25Nb2RlID0gZUVuY3J5cHRpb25Nb2RlOworICAgIGlmICgoZUVuY3J5cHRpb25Nb2RlID09IFdNQUNfRU5DUllQVElPTl9XRVBFbmFibGVkKSB8fAorICAgICAgICAoZUVuY3J5cHRpb25Nb2RlID09IFdNQUNfRU5DUllQVElPTl9US0lQRW5hYmxlZCkgfHwKKyAgICAgICAgKGVFbmNyeXB0aW9uTW9kZSA9PSBXTUFDX0VOQ1JZUFRJT05fQUVTRW5hYmxlZCkgKSB7CisgICAgICAgIHBNZ210LT5iUHJpdmFjeUludm9rZWQgPSBUUlVFOworICAgIH0gZWxzZSB7CisgICAgICAgIHBNZ210LT5iUHJpdmFjeUludm9rZWQgPSBGQUxTRTsKKyAgICB9Cit9CisKKworCitCT09MCitWTlRXSUZJYkNvb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0YWJhc2UgZXhjZXB0IGN1cnJlbnQgYXNzb2MgQlNTCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcE1nbXRIYW5kbGUgICAgIC0gTWFuYWdlbWVudCBPYmplY3Qgc3RydWN0dXJlCisgKiAgICAgIGJMaW5rUGFzcyAgICAgICAtIEN1cnJlbnQgTGluayBzdGF0dXMKKyAqICBPdXQ6CisgKgorICogUmV0dXJuIFZhbHVlOiBOb25lLgorICoKKy0qLworCisKKy8qKworICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBRdWVyeSBCU1MgTGlzdCBpbiBtYW5hZ2VtZW50IGRhdGFiYXNlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcE1nbXRIYW5kbGUgICAgIC0gTWFuYWdlbWVudCBPYmplY3Qgc3RydWN0dXJlCisgKiAgT3V0OgorICogICAgICBwdUJTU0NvdW50ICAgICAgLSBCU1MgY291bnQKKyAqICAgICAgcHZGaXJzdEJTUyAgICAgIC0gcG9pbnRlciB0byBmaXJzdCBCU1MKKyAqCisgKiBSZXR1cm4gVmFsdWU6IE5vbmUuCisgKgorLSovCisKK1ZPSUQKK1ZOVFdJRkl2UXVlcnlCU1NMaXN0ICgKKyAgICBJTiBQVk9JRCAgICBwTWdtdEhhbmRsZSwKKyAgICBPVVQgUFVJTlQgICBwdUJTU0NvdW50LAorICAgIE9VVCBQVk9JRCAgICpwdkZpcnN0QlNTCisgICAgKQoreworICAgIFVJTlQgICAgICAgICAgICBpaSA9IDA7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gKFBTTWdtdE9iamVjdClwTWdtdEhhbmRsZTsKKyAgICBQS25vd25CU1MgICAgICAgcEJTUyA9IE5VTEw7CisgICAgVUlOVCAgICAgICAgICAgIHVDb3VudCA9IDA7CisKKyAgICAqcHZGaXJzdEJTUyA9IE5VTEw7CisKKyAgICBmb3IgKGlpID0gMDsgaWkgPCBNQVhfQlNTX05VTTsgaWkrKykgeworICAgICAgICBwQlNTID0gJihwTWdtdC0+c0JTU0xpc3RbaWldKTsKKyAgICAgICAgaWYgKCFwQlNTLT5iQWN0aXZlKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoKnB2Rmlyc3RCU1MgPT0gTlVMTCkgeworICAgICAgICAgICAgKnB2Rmlyc3RCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFtpaV0pOworICAgICAgICB9CisgICAgICAgIHVDb3VudCsrOworICAgIH0KKyAgICAqcHVCU1NDb3VudCA9IHVDb3VudDsKK30KKworCisKKworVk9JRAorVk5UV0lGSXZHZXROZXh0QlNTICgKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHBNZ210SGFuZGxlLAorICAgIElOIFBWT0lEICAgICAgICAgICAgcHZDdXJyZW50QlNTLAorICAgIE9VVCBQVk9JRCAgICAgICAgICAgKnB2TmV4dEJTUworICAgICkKK3sKKyAgICBQS25vd25CU1MgICAgICAgcEJTUyA9IChQS25vd25CU1MpIHB2Q3VycmVudEJTUzsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAoUFNNZ210T2JqZWN0KXBNZ210SGFuZGxlOworCisgICAgKnB2TmV4dEJTUyA9IE5VTEw7CisKKyAgICB3aGlsZSAoKnB2TmV4dEJTUyA9PSBOVUxMKSB7CisgICAgICAgIHBCU1MrKzsKKyAgICAgICAgaWYgKHBCU1MgPiAmKHBNZ210LT5zQlNTTGlzdFtNQVhfQlNTX05VTV0pKSB7CisgICAgICAgICAgICByZXR1cm47CisgICAgICAgIH0KKyAgICAgICAgaWYgKHBCU1MtPmJBY3RpdmUgPT0gVFJVRSkgeworICAgICAgICAgICAgKnB2TmV4dEJTUyA9IHBCU1M7CisgICAgICAgICAgICByZXR1cm47CisgICAgICAgIH0KKyAgICB9Cit9CisKKworCisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIFVwZGF0ZSBUeCBhdHRlbXBzLCBUeCBmYWlsdXJlIGNvdW50ZXIgaW4gTm9kZSBEQgorICoKKyAqICBJbjoKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUKKyAqCistKi8KK1ZPSUQKK1ZOVFdJRkl2VXBkYXRlTm9kZVR4Q291bnRlcigKKyAgICBJTiBQVk9JRCAgICBwTWdtdEhhbmRsZSwKKyAgICBJTiBQQllURSAgICBwYnlEZXN0QWRkcmVzcywKKyAgICBJTiBCT09MICAgICBiVHhPaywKKyAgICBJTiBXT1JEICAgICB3UmF0ZSwKKyAgICBJTiBQQllURSAgICBwYnlUeEZhaWxDb3VudAorICAgICkKK3sKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAoUFNNZ210T2JqZWN0KXBNZ210SGFuZGxlOworICAgIFVJTlQgICAgICAgICAgICB1Tm9kZUluZGV4ID0gMDsKKyAgICBVSU5UICAgICAgICAgICAgaWk7CisKKyAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSB8fAorICAgICAgICAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSkgeworICAgICAgICBpZiAoQlNTREJiSXNTVEFJbk5vZGVEQihwTWdtdCwgcGJ5RGVzdEFkZHJlc3MsICZ1Tm9kZUluZGV4KSA9PSBGQUxTRSkgeworICAgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisgICAgfQorICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVR4QXR0ZW1wdHMrKzsKKyAgICBpZiAoYlR4T2sgPT0gVFJVRSkgeworICAgICAgICAvLyB0cmFuc21pdCBzdWNjZXNzLCBUeEF0dGVtcHRzIGF0IGxlYXN0IHBsdXMgb25lCisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVR4T2tbTUFYX1JBVEVdKys7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVR4T2tbd1JhdGVdKys7CisgICAgfSBlbHNlIHsKKyAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS51VHhGYWlsdXJlcysrOworICAgIH0KKyAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLnVUeFJldHJ5ICs9IHBieVR4RmFpbENvdW50W01BWF9SQVRFXTsKKyAgICBmb3IoaWk9MDtpaTxNQVhfUkFURTtpaSsrKSB7CisgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVR4RmFpbFtpaV0gKz0gcGJ5VHhGYWlsQ291bnRbaWldOworICAgIH0KKyAgICByZXR1cm47Cit9CisKKworVk9JRAorVk5UV0lGSXZHZXRUeFJhdGUoCisgICAgSU4gUFZPSUQgICAgcE1nbXRIYW5kbGUsCisgICAgSU4gUEJZVEUgICAgcGJ5RGVzdEFkZHJlc3MsCisgICAgT1VUIFBXT1JEICAgcHdUeERhdGFSYXRlLAorICAgIE9VVCBQQllURSAgIHBieUFDS1JhdGUsCisgICAgT1VUIFBCWVRFICAgcGJ5Q0NLQmFzaWNSYXRlLAorICAgIE9VVCBQQllURSAgIHBieU9GRE1CYXNpY1JhdGUKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpcE1nbXRIYW5kbGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICB1Tm9kZUluZGV4ID0gMDsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdUeERhdGFSYXRlID0gUkFURV8xTTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5QUNLUmF0ZSA9IFJBVEVfMU07CisgICAgQllURSAgICAgICAgICAgICAgICBieUNDS0Jhc2ljUmF0ZSA9IFJBVEVfMU07CisgICAgQllURSAgICAgICAgICAgICAgICBieU9GRE1CYXNpY1JhdGUgPSBS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YXRlID0gVk5UV0lGSWJ5R2V0QUNLVHhSYXRlKCAgKEJZVEUpIHdUeERhdGFSYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBTdXBwb3J0UmF0ZUlFcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRXh0U3VwcG9ydFJhdGVJRXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIGlmIChieUFDS1JhdGUgPiAoQllURSkgd1R4RGF0YVJhdGUpIHsKKyAgICAgICAgYnlBQ0tSYXRlID0gKEJZVEUpIHdUeERhdGFSYXRlOworICAgIH0KKyAgICBieUNDS0Jhc2ljUmF0ZSA9IFZOVFdJRklieUdldEFDS1R4UmF0ZSggUkFURV8xMU0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBTdXBwb3J0UmF0ZUlFcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEV4dFN1cHBvcnRSYXRlSUVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgYnlPRkRNQmFzaWNSYXRlID0gVk5UV0lGSWJ5R2V0QUNLVHhSYXRlKFJBVEVfNTRNLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwU3VwcG9ydFJhdGVJRXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBFeHRTdXBwb3J0UmF0ZUlFcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICpwd1R4RGF0YVJhdGUgPSB3VHhEYXRhUmF0ZTsKKyAgICAqcGJ5QUNLUmF0ZSA9IGJ5QUNLUmF0ZTsKKyAgICAqcGJ5Q0NLQmFzaWNSYXRlID0gYnlDQ0tCYXNpY1JhdGU7CisgICAgKnBieU9GRE1CYXNpY1JhdGUgPSBieU9GRE1CYXNpY1JhdGU7CisgICAgcmV0dXJuOworfQorCitCWVRFCitWTlRXSUZJYnlHZXRLZXlDeXBoZXIoCisgICAgSU4gUFZPSUQgICAgcE1nbXRIYW5kbGUsCisgICAgSU4gQk9PTCAgICAgYkdyb3VwS2V5CisgICAgKQoreworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpcE1nbXRIYW5kbGU7CisKKyAgICBpZiAoYkdyb3VwS2V5ID09IFRSVUUpIHsKKyAgICAgICAgcmV0dXJuIChwTWdtdC0+YnlDU1NHSyk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgcmV0dXJuIChwTWdtdC0+YnlDU1NQSyk7CisgICAgfQorfQorCisKKy8qCitCT09MCitWTlRXSUZJYkluaXQoCisgICAgSU4gUFZPSUQgICAgcEFkYXB0ZXJIYW5kbGVyLAorICAgIE9VVCBQVk9JRCAgICpwTWdtdEhhbmRsZXIKKyAgICApCit7CisKKyAgICBQU01nbXRPYmplY3QgICAgICAgIHBNZ210ID0gTlVMTDsKKyAgICBVSU5UICAgICAgICAgICAgICAgIGlpOworCisKKyAgICBwTWdtdCA9IChQU01nbXRPYmplY3Qpa21hbGxvYyhzaXplb2YoU01nbXRPYmplY3QpLCAoaW50KUdGUF9BVE9NSUMpOworICAgIGlmIChwTWdtdCA9PSBOVUxMKSB7CisgICAgICAgICpwTWdtdEhhbmRsZXIgPSBOVUxMOworICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorCisgICAgbWVtc2V0KHBNZ210LCAwLCBzaXplb2YoU01nbXRPYmplY3QpKTsKKyAgICBwTWdtdC0+cEFkYXB0ZXIgPSAoUFZPSUQpIHBBZGFwdGVySGFuZGxlcjsKKworICAgIC8vIHNob3VsZCBpbml0aWFsIE1BQyBhZGRyZXNzIGFieU1BQ0FkZHIKKyAgICBmb3IoaWk9MDtpaTxXTEFOX0JTU0lEX0xFTjtpaSsrKSB7CisgICAgICAgIHBNZ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SB1bENvdW50OworICAgIE1FTXZDb3B5KHBNZ210LT5nc1BNS0lEQ2FjaGUuQlNTSURJbmZvLCBwUE1LSURJbmZvLCAodWxDb3VudCpzaXplb2YoUE1LSURJbmZvKSkpOworICAgIHJldHVybiAoVFJVRSk7Cit9CisKKworCitXT1JECitWTlRXSUZJd0dldE1heFN1cHBvcnRSYXRlKAorICAgIElOIFBWT0lEIHBNZ210T2JqZWN0CisgICAgKQoreworICAgIFdPUkQgd1JhdGUgPSBSQVRFXzU0TTsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAoUFNNZ210T2JqZWN0KSBwTWdtdE9iamVjdDsKKworICAgIGZvcih3UmF0ZSA9IFJBVEVfNTRNOyB3UmF0ZSA+IFJBVEVfMU07IHdSYXRlLS0pIHsKKyAgICAgICAgaWYgKEJJVGJJc0JpdE9uKHBNZ210LT5zTm9kZURCVGFibGVbMF0ud1N1cHBSYXRlLCAoMTw8d1JhdGUpKSkgeworICAgICAgICAgICAgcmV0dXJuICh3UmF0ZSk7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHBNZ210LT5lQ3VycmVudFBIWU1vZGUgPT0gUEhZX1RZUEVfMTFBKSB7CisgICAgICAgIHJldHVybiAoUkFURV82TSk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgcmV0dXJuIChSQVRFXzFNKTsKKyAgICB9Cit9CisKKworVk9JRAorVk5UV0lGSXZTZXQxMWggKAorICAgIElOIFBWT0lEIHBNZ210T2JqZWN0LAorICAgIElOIEJPT0wgIGIxMWhFbmFibGUKKyAgICApCit7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gKFBTTWdtdE9iamVjdCkgcE1nbXRPYmplY3Q7CisKKyAgICBwTWdtdC0+YjExaEVuYWJsZSA9IGIxMWhFbmFibGU7Cit9CisKK0JPT0wKK1ZOVFdJRkliTWVhc3VyZVJlcG9ydCgKKyAgICBJTiBQVk9JRCBwTWdtdE9iamVjdCwKKyAgICBJTiBCT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SBwdk1lYXN1cmVFSUQpLT5ieVR5cGU7CisgICAgICAgIHN3aXRjaCAocE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+YnlUeXBlKSB7CisgICAgICAgICAgICBjYXNlIE1FQVNVUkVfVFlQRV9CQVNJQyA6CisgICAgICAgICAgICAgICAgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+bGVuICs9IHNpemVvZihNRUFTRVVSRV9SRVBfQkFTSUMpOworICAgICAgICAgICAgICAgIE1FTXZDb3B5KCAgICYocE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+c1JlcC5zQmFzaWMpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYoKChQV0xBTl9JRV9NRUFTVVJFX1JFUSkgcHZNZWFzdXJlRUlEKS0+c1JlcSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKE1FQVNFVVJFX1JFUSkpOworICAgICAgICAgICAgICAgIHBNZ210LT5wQ3Vyck1lYXN1cmVFSURSZXAtPnNSZXAuc0Jhc2ljLmJ5TWFwID0gYnlCYXNpY01hcDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgTUVBU1VSRV9UWVBFX0NDQSA6CisgICAgICAgICAgICAgICAgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+bGVuICs9IHNpemVvZihNRUFTRVVSRV9SRVBfQ0NBKTsKKyAgICAgICAgICAgICAgICBNRU12Q29weSggICAmKHBNZ210LT5wQ3Vyck1lYXN1cmVFSURSZXAtPnNSZXAuc0NDQSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJigoKFBXTEFOX0lFX01FQVNVUkVfUkVRKSBwdk1lYXN1cmVFSUQpLT5zUmVxKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoTUVBU0VVUkVfUkVRKSk7CisgICAgICAgICAgICAgICAgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+c1JlcC5zQ0NBLmJ5Q0NBQnVzeUZyYWN0aW9uID0gYnlDQ0FGcmFjdGlvbjsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgTUVBU1VSRV9UWVBFX1JQSSA6CisgICAgICAgICAgICAgICAgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+bGVuICs9IHNpemVvZihNRUFTRVVSRV9SRVBfUlBJKTsKKyAgICAgICAgICAgICAgICBNRU12Q29weSggICAmKHBNZ210LT5wQ3Vyck1lYXN1cmVFSURSZXAtPnNSZXAuc1JQSSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJigoKFBXTEFOX0lFX01FQVNVUkVfUkVRKSBwdk1lYXN1cmVFSUQpLT5zUmVxKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoTUVBU0VVUkVfUkVRKSk7CisgICAgICAgICAgICAgICAgTUVNdkNvcHkocE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+c1JlcC5zUlBJLmFieVJQSWRlbnNpdHksIHBieVJQSXMsIDgpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgZGVmYXVsdCA6CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgcGJ5Q3VycmVudEVJRCArPSAoMiArIHBNZ210LT5wQ3Vyck1lYXN1cmVFSURSZXAtPmxlbik7CisgICAgICAgIHBNZ210LT51TGVuZ3RoT2ZSZXBFSURzICs9ICgyICsgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcC0+bGVuKTsKKyAgICAgICAgcE1nbXQtPnBDdXJyTWVhc3VyZUVJRFJlcCA9IChQV0xBTl9JRV9NRUFTVVJFX1JFUCkgcGJ5Q3VycmVudEVJRDsKKyAgICB9CisgICAgaWYgKGJFbmRPZlJlcG9ydCA9PSBUUlVFKSB7CisgICAgICAgIElFRUUxMWhiTVNSUmVwVHgocE1nbXQpOworICAgIH0KKyAgICAvL3NwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgcmV0dXJuIChUUlVFKTsKK30KKworCitCT09MCitWTlRXSUZJYkNoYW5uZWxTd2l0Y2goCisgICAgSU4gUFZPSUQgcE1nbXRPYmplY3QsCisgICAgSU4gQllURSAgYnlOZXdDaGFubmVsCisgICAgKQoreworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpIHBNZ210T2JqZWN0OworCisgICAgLy9zcGluX2xvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICBwTWdtdC0+dUN1cnJDaGFubmVsID0gYnlOZXdDaGFubmVsOworICAgIHBNZ210LT5iU3dpdGNoQ2hhbm5lbCA9IEZBTFNFOworICAgIC8vc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICByZXR1cm4gVFJVRTsKK30KKworLyoKK0JPT0wKK1ZOVFdJRkliUmFkYXJQcmVzZW50KAorICAgIElOIFBWT0lEIHBNZ210T2JqZWN0LAorICAgIElOIEJZVEUgIGJ5Q2hhbm5lbAorICAgICkKK3sKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAoUFNNZ210T2JqZWN0KSBwTWdtdE9iamVjdDsKKyAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSAmJgorICAgICAgICAoYnlDaGFubmVsID09IChCWVRFKSBwTWdtdC0+dUN1cnJDaGFubmVsKSAmJgorICAgICAgICAocE1nbXQtPmJTd2l0Y2hDaGFubmVsICE9IFRSVUUpICYmCisgICAgICAgIChwTWdtdC0+YjExaEVuYWJsZSA9PSBUUlVFKSkgeworICAgICAgICBpZiAoSVNfRVRIX0FERFJFU1NfRVFVQUwocE1nbXQtPmFieUlCU1NERlNPd25lciwgQ0FSRHBHZXRDdXJyZW50QWRkcmVzcyhwTWdtdC0+cEFkYXB0ZXIpKSkgeworICAg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yNpZiAhZGVmaW5lZChfX0NBUkRfSF9fKQorI2luY2x1ZGUgImNhcmQuaCIKKyNlbmRpZgorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IERlZmluaXRpb25zIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2RlZmluZSBSQVRFXzFNICAgICAgICAgMAorI2RlZmluZSBSQVRFXzJNICAgICAgICAgMQorI2RlZmluZSBSQVRFXzVNICAgICAgICAgMgorI2RlZmluZSBSQVRFXzExTSAgICAgICAgMworI2RlZmluZSBSQVRFXzZNICAgICAgICAgNAorI2RlZmluZSBSQVRFXzlNICAgICAgICAgNQorI2RlZmluZSBSQVRFXzEyTSAgICAgICAgNgorI2RlZmluZSBSQVRFXzE4TSAgICAgICAgNworI2RlZmluZSBSQVRFXzI0TSAgICAgICAgOAorI2RlZmluZSBSQVRFXzM2TSAgICAgICAgOQorI2RlZmluZSBSQVRFXzQ4TSAgICAgICAxMAorI2RlZmluZSBSQVRFXzU0TSAgICAgICAxMQorI2RlZmluZSBSQVRFX0FVVE8gICAgICAxMgorI2RlZmluZSBNQVhfUkFURSAgICAgICAxMgorCisvLyBrZXkgQ2lwaGVyU3VpdGUKKyNkZWZpbmUgS0VZX0NUTF9XRVAgICAgICAgICAweDAwCisjZGVmaW5lIEtFWV9DVExfTk9ORSAgICAgICAgMHgwMQorI2RlZmluZSBLRVlfQ1RMX1RLSVAgICAgICAgIDB4MDIKKyNkZWZpbmUgS0VZX0NUTF9DQ01QICAgICAgICAweDAzCisjZGVmaW5lIEtFWV9DVExfSU5WQUxJRCAgICAgMHhGRgorCisjZGVmaW5lIENIQU5ORUxfTUFYXzI0RyAgICAgICAgIDE0CisKKyNkZWZpbmUgTUFYX0JTU19OVU0gICAgICAgICAgICAgNDIKKworI2RlZmluZSBNQVhfUE1LSURfQ0FDSEUgICAgICAgICAxNgorCisvLyBQcmUtY29uZmlndXJlZCBBdXRoZW50aWNhaXRvbiBNb2RlIChm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QSA9IDAsCisgICAgV01BQ19DT05GSUdfSUJTU19TVEEsCisgICAgV01BQ19DT05GSUdfQVVUTywKKyAgICBXTUFDX0NPTkZJR19BUAorCit9IFdNQUNfQ09ORklHX01PREUsICpQV01BQ19DT05GSUdfTU9ERTsKKworCisKK3R5cGVkZWYgZW51bSB0YWdXTUFDX1BPV0VSX01PREUgeworCisgICAgV01BQ19QT1dFUl9DQU0sCisgICAgV01BQ19QT1dFUl9GQVNULAorICAgIFdNQUNfUE9XRVJfTUFYCisKK30gV01BQ19QT1dFUl9NT0RFLCAqUFdNQUNfUE9XRVJfTU9ERTsKKworI2RlZmluZSBWTlRXSUZJYklzU2hvcnRTbG90VGltZSh3Q2FwSW5mbykgICAgICAgICAgICAgICBcCisgICAgICAgIFdMQU5fR0VUX0NBUF9JTkZPX1NIT1JUU0xPVFRJTUUod0NhcEluZm8pICAgICAgIFwKKworI2RlZmluZSBWTlRXSUZJYklzUHJvdGVjdE1vZGUoYnlFUlApICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICgoYnlFUlAgJiBXTEFOX0VJRF9FUlBfVVNFX1BST1RFQ1RJT04pICE9IDApICAgIFwKKworI2RlZmluZSBWTlRXSUZJYklzQmFya2VyTW9kZShieUVSUCkgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICgoYnlFUlAgJiBXTEFOX0VJRF9FUlBfQkFSS0VSX01PREUpICE9IDApICAgICAgIFwKKworI2RlZmluZSBWTlRXSUZJYklzU2hvcnRQcmVhbWJsZSh3Q2FwSW5mbykgICAgICAgICAgICAgICBcCisgICAgICAgIFdMQU5fR0VUX0NBUF9JTkZPX1NIT1JUUFJFQU1CTEUod0NhcEluZm8pICAgICAgIFwKKworI2RlZmluZSBWTlRXSUZJYklzRW5jcnlwdGlvbih3Q2FwSW5mbykgICAgICAgICAgICAgICAgICBcCisgICAgICAgIFdMQU5fR0VUX0NBUF9JTkZPX1BSSVZBQ1kod0NhcEluZm8pICAgICAgICAgICAgIFwKKworI2R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GSWJHZXRDb25maWdQaHlNb2RlKAorICAgIElOICBQVk9JRCBwTWdtdEhhbmRsZSwKKyAgICBPVVQgUFZPSUQgcGVQaHlUeXBlCisgICAgKTsKKworVk9JRAorVk5UV0lGSXZRdWVyeUJTU0xpc3QoCisgICAgSU4gUFZPSUQgICAgcE1nbXRIYW5kbGUsCisgICAgT1VUIFBVSU5UICAgcHVCU1NDb3VudCwKKyAgICBPVVQgUFZPSUQgICAqcHZGaXJzdEJTUworICAgICk7CisKKworCisKK1ZPSUQKK1ZOVFdJRkl2R2V0TmV4dEJTUyAoCisgICAgSU4gUFZPSUQgICAgICAgICAgICBwTWdtdEhhbmRsZSwKKyAgICBJTiBQVk9JRCAgICAgICAgICAgIHB2Q3VycmVudEJTUywKKyAgICBPVVQgUFZPSUQgICAgICAgICAgICpwdk5leHRCU1MKKyAgICApOworCisKKworVk9JRAorVk5UV0lGSXZVcGRhdGVOb2RlVHhDb3VudGVyKAorICAgIElOIFBWT0lEICAgIHBNZ210SGFuZGxlLAorICAgIElOIFBCWVRFICAgIHBieURlc3RBZGRyZXNzLAorICAgIElOIEJPT0wgICAgIGJUeE9rLAorICAgIElOIFdPUkQgICAgIHdSYXRlLAorICAgIElOIFBCWVRFICAgIHBieVR4RmFpbENvdW50CisgICAgKTsKKworCitWT0lECitWTlRXSUZJdkdldFR4UmF0ZSgKKyAgICBJTiBQVk9JRCAgICBwTWdtdEhhbmRsZSwKKyAgICBJTiBQQllURSAgICBwYnlEZXN0QWRkcmVzcywKKyAgICBPVVQgUFdPUkQgICBwd1R4RGF0YVJhdGUsCisgICAgT1VUIFBCWVRFICAgcGJ5QUNLUmF0ZSwKKyAgICBPVVQgUEJZVEUgICBwYnlDQ0tCYXNpY1JhdGUsCisgICAgT1VUIFBCWVRFICAgcGJ5T0ZETUJhc2ljUmF0ZQorICAgICk7CisvKgorQk9PTAorVk5UV0lGSWJJbml0KAorICAgIElOIFBWT0lEICAgIHBBZGFwdGVySGFuZGxlciwKKyAgICBP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210UGFja2V0CitzX01nck1ha2VQcm9iZVJlcXVlc3QoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUEJZVEUgcFNjYW5CU1NJRCwKKyAgICBJTiBQV0xBTl9JRV9TU0lEIHBTU0lELAorICAgIElOIFBXTEFOX0lFX1NVUFBfUkFURVMgcEN1cnJSYXRlcywKKyAgICBJTiBQV0xBTl9JRV9TVVBQX1JBVEVTIHBDdXJyRXh0U3VwcFJhdGVzCisgICAgKTsKKworc3RhdGljCitCT09MCitzX2JDb21tYW5kQ29tcGxldGUgKAorICAgIFBTRGV2aWNlIHBEZXZpY2UKKyAgICApOworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgRnVuY3Rpb25zICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBTdG9wIEFkSG9jIGJlYWNvbiBkdXJpbmcgc2NhbiBwcm9jZXNzCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgLSBQb2ludGVyIHRvIHRoZSBhZGFwdGVyCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitzdGF0aWMKK3ZvaWQKK3ZBZEhvY0JlYWNvblN0b3AoUFNEZXZpY2UgIHBEZXZpY2UpCit7CisKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAmKHBEZXZpY2UtPnNNZ210T2JqKTsKKyAgICBCT09MICAgICAgICAgICAgYlN0b3A7CisKKyAgICAvKgorICAgICAqIHRlbXBvcmFyaWx5IHN0b3AgQmVhY29uIHBhY2tldCBm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ml0c09mZihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1RDUiwgVENSX0FVVE9CQ05UWCk7CisgICAgfQorCit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgUmVzdGFydCBBZEhvYyBiZWFjb24gYWZ0ZXIgc2NhbiBwcm9jZXNzIGNvbXBsZXRlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgLSBQb2ludGVyIHRvIHRoZSBhZGFwdGVyCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lCisgKgorICovCitzdGF0aWMKK3ZvaWQKK3ZBZEhvY0JlYWNvblJlc3RhcnQoUFNEZXZpY2UgcERldmljZSkKK3sKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSAmKHBEZXZpY2UtPnNNZ210T2JqKTsKKworICAgIC8qCisgICAgICogUmVzdGFydCBCZWFjb24gcGFja2V0IGZvciBBZEhvYyBTZXJ2ZXIKKyAgICAgKiBpZiBhbGwgb2YgdGhlIGZvbGxvd2luZyBjb2RpdGlvbnMgYXJlIG1ldDoKKyAgICAgKiAgKDEpIFNUQSBpcyBpbiBBZEhvYyBtb2RlCisgICAgICogICgyKSBWVDMyNTMgaXMgcHJvZ3JhbW1lZCBhcyBhdXRvbWF0aWMgQmVhY29uIFRyYW5zbWl0dGluZworICAgICAqLworICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfSUJTU19TVEEpICYmCisgICAgKHBNZ210LT5lQ3VyclN0YXRlID49IFdNQUNfU1RBVEVfU1RBUlRFRCkpCisgICAgeworICAgICAgICAgTUFDdlJlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1RDUiwgVENSX0FVVE9CQ05UWCk7CisgICAgfQorCit9CisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgIFByZXBhcmUgYW5kIHNlbmQgcHJvYmUgcmVxdWVzdCBtYW5hZ2VtZW50IGZyYW1lcy4KKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgbm9uZS4KKyAqCistKi8KKworc3RhdGljCitWT0lECitzX3ZQcm9iZUNoYW5uZWwoCisgICAgSU4gUFNEZXZpY2UgcERldmljZQorICAgICkKK3sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8xTSwgICAyTSwgICA1TSwgICAxMU0sICAxOE0sICAyNE0sICAzNk0sICA1NE0KKyAgICBCWVRFIGFieUN1cnJTdXBwUmF0ZXNHW10gPSB7V0xBTl9FSURfU1VQUF9SQVRFUywgOCwgMHgwMiwgMHgwNCwgMHgwQiwgMHgxNiwgMHgyNCwgMHgzMCwgMHg0OCwgMHg2Q307CisgICAgQllURSBhYnlDdXJyRXh0U3VwcFJhdGVzR1tdID0ge1dMQU5fRUlEX0VYVFNVUFBfUkFURVMsIDQsIDB4MEMsIDB4MTIsIDB4MTgsIDB4NjB9OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLzZNLCAgIDlNLCAgIDEyTSwgIDQ4TQorICAgIEJZVEUgYWJ5Q3VyclN1cHBSYXRlc0FbXSA9IHtXTEFOX0VJRF9TVVBQX1JBVEVTLCA4LCAweDBDLCAweDEyLCAweDE4LCAweDI0LCAweDMwLCAweDQ4LCAweDYwLCAweDZDfTsKKyAgICBCWVRFIGFieUN1cnJTdXBwUmF0ZXNCW10gPSB7V0xBTl9FSURfU1VQUF9SQVRFUywgNCwgMHgwMiwgMHgwNCwgMHgwQiwgMHgxNn07CisgICAgUEJZVEUgICAgICAgICAgIHBieVJhdGU7CisgICAgUFNUeE1nbXRQYWNrZXQgIHBUeFBhY2tldDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBVSU5UICAgICAgICAgICAgaWk7CisKKworICAgIGlmIChwRGV2aWNlLT5lQ3VycmVudFBIWVR5cGUgPT0gUEhZX1RZUEVfMTFBKSB7CisgICAgICAgIHBieVJhdGUgPSAmYWJ5Q3VyclN1cHBSYXRlc0FbMF07CisgICAgfSBlbHNlIGlmIChwRGV2aWNlLT5lQ3VycmVudFBIWVR5cGUgPT0gUEhZX1RZUEVfMTFCKSB7CisgICAgICAgIHBieVJhdGUgPSAmYWJ5Q3VyclN1cHBSYXRlc0JbMF07CisgICAgfSBlbHNlIHsKKyAgICAgICAgcGJ5UmF0ZSA9ICZhYnlDdXJyU3VwcFJhdGVzR1swXTsKKyAgICB9CisgICAgLy8gYnVpbGQgYW4gYXNzb2NyZXEgZnJhbWUgYW5kIHNlbmQgaXQKKyAgICBwVHhQYWNrZXQgPSBzX01nck1ha2VQcm9iZVJlcXVlc3QKKyAgICAgICAgICAgICAgICAoCisgICAgICAgICAgICAgICAgICBwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5U2NhbkJTU0lELAorICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieVNjYW5TU0lELAorICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcGJ5UmF0ZSwKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKWFieUN1cnJFeHRTdXBwUmF0ZXNHCisgICAgICAgICAgICAgICAgKTsKKworICAgIGlmIChwVHhQYWNrZXQgIT0gTlVMTCApeworICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCAyIDsgaWkrKykgeworICAgICAgICAgICAgaWYgKGNzTWdtdF94bWl0KHBEZXZpY2UsIHBUeFBhY2tldCkgIT0gQ01EX1NUQVRVU19QRU5ESU5HKSB7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREV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2aWNlICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworCisgICAgaW5pdF90aW1lcigmcERldmljZS0+c1RpbWVyQ29tbWFuZCk7CisgICAgcERldmljZS0+c1RpbWVyQ29tbWFuZC5kYXRhID0gKFVMT05HKXBEZXZpY2U7CisgICAgcERldmljZS0+c1RpbWVyQ29tbWFuZC5mdW5jdGlvbiA9IChUaW1lckZ1bmN0aW9uKXZDb21tYW5kVGltZXI7CisgICAgLy8gUlVOX0FUIDoxIG1zZWMgfj0gKEhaLzEwMjQpCisgICAgcERldmljZS0+c1RpbWVyQ29tbWFuZC5leHBpcmVzID0gKFVJTlQpUlVOX0FUKChNU2Vjb25kICogSFopID4+IDEwKTsKKyAgICBhZGRfdGltZXIoJnBEZXZpY2UtPnNUaW1lckNvbW1hbmQpOworICAgIHJldHVybjsKK30KKworCisKK1ZPSUQKK3ZDb21tYW5kVGltZXIgKAorICAgIElOICBIQU5ETEUgICAgICBoRGV2aWNlQ29udGV4dAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBQV0xBTl9JRV9TU0lEICAgcEl0ZW1TU0lEOworICAgIFBXTEFOX0lFX1NTSUQgICBwSXRlbVNTSURDdXJyOworICAgIENNRF9TVEFUVVMgICAgICBTdGF0dXM7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworICAgIEJZVEUgICAgICAgICAgICBieU1hc2tbOF0gPSB7MSwgMiwgNCwgOCwgMHgxMCwgMHgyMCwgMHg0MCwgMHg4MH07CisgICAgc3RydWN0IHNrX2J1ZmYgICpza2I7CisKKworICAgIGlmIChwRGV2aWNlLT5kd0RpYWdSZWZDb3VudCAhPSAwKQorICAgICAgICByZXR1cm47CisgICAgaWYgKHBEZXZpY2UtPmJDbWRSdW5uaW5nICE9IFRSVUUpCisgICAgICAgIHJldHVybjsKKworICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCisgICAgc3dpdGNoICggcERldmljZS0+ZUNvbW1hbmRTdGF0ZSApIHsKKworICAgICAgICBjYXNlIFdMQU5fQ01EX1NDQU5fU1RBUlQ6CisKKwlwRGV2aWNlLT5ieVJlQXNzb2NDb3VudCA9IDA7CisgICAgICAgICAgICBpZiAocERldmljZS0+YlJhZGlvT2ZmID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfQVApIHsKKyAgICAgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICAgICAgQ0FSRGJTZXRCU1NJRChwTWdtdC0+cEFkYXB0ZXIsIHBNZ210LT5hYnlDdXJyQlNTSUQsIE9QX01PREVfQVApOworICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImVDb21tYW5kU3RhdGU9IFdMQU5fQ01EX1NDQU5fU1RBUlRcbiIpOworICAgICAgICAgICAgcEl0ZW1TU0lEID0gKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieVNjYW5TU0lEOworICAgICAgICAgICAgLy8gd2FpdCBhbGwgRGF0YSBURCBjb21wbGV0ZQorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmlURFVzZWRbVFlQRV9BQzBETUFdICE9IDApeworICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCAxMCk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgaWYgKHBNZ210LT51U2NhbkNoYW5uZWwgPT0gMCApIHsKKyAgICAgICAgICAgICAgICBwTWdtdC0+dVNjYW5DaGFubmVsID0gcERldmljZS0+YnlNaW5DaGFubmVsOworICAgICAgICAgICAgICAgIC8vIFNldCBCYXNlYmFuZCB0byBiZSBtb3JlIHNlbnNpdGl2ZS4KKworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKHBNZ210LT51U2NhbkNoYW5uZWwgPiBwRGV2aWNlLT5ieU1heENoYW5uZWwpIHsKKyAgICAgICAgICAgICAgICBwTWdtdC0+ZVNjYW5TdGF0ZSA9IFdNQUNfTk9fU0NBTk5JTkc7CisKKyAgICAgICAgICAgICAgICAvLyBTZXQgQmFzZWJhbmQncyBzZW5zaXRpdml0eSBiYWNrLgorICAgICAgICAgICAgICAgIC8vIFNldCBjaGFubmVsIGJhY2sKKyAgICAgICAgICAgICAgICBDQVJEYlNldENoYW5uZWwocE1nbXQtPnBBZGFwdGVyLCBwTWdtdC0+dUN1cnJDaGFubmVsKTsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJTY2FubmluZywgc2V0IGJhY2sgdG8gY2hhbm5lbDogWyVkXVxuIiwgcE1nbXQtPnVDdXJyQ2hhbm5lbCk7CisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSB7CisgICAgICAgICAgICAgICAgICAgIENBUkRiU2V0QlNTSUQocE1nbXQtPnBBZGFwdGVyLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBPUF9NT0RFX0FESE9DKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBDQVJEYlNldEJTU0lEKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPmFieUN1cnJCU1NJRCwgT1BfTU9ERV9JTkZSQVNUUlVDVFVSRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIHZBZEhvY0JlYWNvblJlc3RhcnQocERldmljZSk7CisgICAgICAgICAgICAgICAgc19iQ29tbWFuZENvbXBsZXRlKHBEZXZpY2UpOworCisgICAgICAgICAgICB9IGVsc2UgeworLy8yMDA4LTgtNCA8YWRkPiBieSBjaGVzdGVyCisgICAgICAgICAgICAgICAgIGlmICghQ2hhbm5lbFZhbGlkKHBEZXZpY2UtPmJ5Wm9uZVR5cGUsIHBNZ210LT51U2NhbkNoYW5uZWwpKSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkludmFsaWQgY2hhbm5lbCBwTWdtdC0+dVNjYW5DaGFubmVsID0gJWQgXG4iLHBNZ210LT51U2NhbkNoYW5uZWwpOworICAgICAgICAgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAgICB9CisvL3ByaW50aygiY2hlc3Rlci1wTWdtdC0+dVNjYW5DaGFubmVsPSVkLHBEZXZpY2UtPmJ5TWF4Q2hhbm5lbD0lZFxuIixwTWdtdC0+dVNjYW5DaGFubmVsLHBEZXZpY2UtPmJ5TWF4Q2hhbm5lbCk7CisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT51U2NhbkNoYW5uZWwgPT0gcERldmljZS0+YnlNaW5DaGFubmVsKSB7CisgICAgICAgICAgICAgICAgICAgIC8vcE1nbXQtPmVTY2FuVHlwZSA9IFdNQUNfU0NBTl9BQ1RJVkU7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlTY2FuQlNTSURbMF0gPSAweEZGOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5U2NhbkJTU0lEWzFdID0gMHhGRjsKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieVNjYW5CU1NJRFsyXSA9IDB4RkY7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlTY2FuQlNTSURbM10gPSAweEZGOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5U2NhbkJTU0lEWzRdID0gMHhGRjsKKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieVNjYW5CU1NJRFs1XSA9IDB4RkY7CisgICAgICAgICAgICAgICAgICAgIHBJdGVtU1NJRC0+YnlFbGVtZW50SUQgPSBXTEFOX0VJRF9TU0lEOworICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciBic3NpZCBsaXN0CisgICAgICAgICAgICAgICAgICAgIC8vIEJTU3ZDbGVhckJTU0xpc3QoKEhBTkRMRSlwRGV2aWNlLCBwRGV2aWNlLT5iTGlua1Bhc3MpOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+ZVNjYW5TdGF0ZSA9IFdNQUNfSVNfU0NBTk5JTkc7CisKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICB2QWRIb2NCZWFjb25TdG9wKHBEZXZpY2UpOworCisgICAgICAgICAgICAgICAgaWYgKENBUkRiU2V0Q2hhbm5lbChwTWdtdC0+cEFkYXB0ZXIsIHBNZ210LT51U2NhbkNoYW5uZWwpID09IFRSVUUpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJTQ0FOIENoYW5uZWw6ICVkXG4iLCBwTWdtdC0+dVNjYW5DaGFubmVsKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJ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faXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCBXQ01EX0FDVElWRV9TQ0FOX1RJTUUpOworICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCBXQ01EX1BBU1NJVkVfU0NBTl9USU1FKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fQ01EX1NDQU5fRU5EOgorCisgICAgICAgICAgICAvLyBTZXQgQmFzZWJhbmQncyBzZW5zaXRpdml0eSBiYWNrLgorICAgICAgICAgICAgLy8gU2V0IGNoYW5uZWwgYmFjaworICAgICAgICAgICAgQ0FSRGJTZXRDaGFubmVsKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPnVDdXJyQ2hhbm5lbCk7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJTY2FubmluZywgc2V0IGJhY2sgdG8gY2hhbm5lbDogWyVkXVxuIiwgcE1nbXQtPnVDdXJyQ2hhbm5lbCk7CisgICAgICAgICAgICBpZiAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfSUJTU19TVEEpIHsKKyAgICAgICAgICAgICAgICBDQVJEYlNldEJTU0lEKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPmFieUN1cnJCU1NJRCwgT1BfTU9ERV9BREhPQyk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIENBUkRi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ERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIlNlbmQgRGlzYXNzb2NpYXRpb24gUGFja2V0Li5cbiIpOworICAgICAgICAgICAgICAgIC8vIHJlYXNvbiA9IDggOiBkaXNhc3NvYyBiZWNhdXNlIHN0YSBoYXMgbGVmdAorICAgICAgICAgICAgICAgIHZNZ3JEaXNhc3NvY0JlZ2luU3RhKChIQU5ETEUpcERldmljZSwgcE1nbXQsIHBNZ210LT5hYnlDdXJyQlNTSUQsICg4KSwgJlN0YXR1cyk7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gRkFMU0U7CisgICAgICAgICAgICAgICAgLy8gdW5sb2NrIGNvbW1hbmQgYnVzeQorICAgICAgICAgICAgICAgIHBJdGVtU1NJRCA9IChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRDsKKyAgICAgICAgICAgICAgICBwSXRlbVNTSUQtPmxlbiA9IDA7CisgICAgICAgICAgICAgICAgbWVtc2V0KHBJdGVtU1NJRC0+YWJ5U1NJRCwgMCwgV0xBTl9TU0lEX01BWExFTik7CisgICAgICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS5iQWN0aXZlID0gRkFMU0U7CisvLyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iQmVhY29uQnVmUmVhZHkgPSBGQUxTRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG5ldGlmX3N0b3BfcXVldWUocERldmljZS0+ZGV2KTsKKyAgICAgICAgICAgIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPSBXTEFOX0RJU0FTU09DSUFURV9XQUlUOworICAgICAgICAgICAgLy8gd2FpdCBhbGwgQ29udHJvbCBURCBjb21wbGV0ZQorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmlURFVzZWRbVFlQRV9UWERNQTBdICE9IDApeworICAgICAgICAgICAgICAgIHZDb21tYW5kVGltZXJXYWl0KChIQU5ETEUpcERldmljZSwgMTApOworICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iIENBUkRiUmFkaW9Qb3dlck9mZlxuIik7CisJLy8yMDA4LTA5LTAyICA8bWFyaz4JYnkgY2hlc3RlcgorICAgICAgICAgICAvLyBDQVJEYlJhZGlvUG93ZXJPZmYocERldmljZSk7CisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fRElTQVNTT0NJQVRFX1dBSVQgOgorICAgICAgICAgICAgLy8gd2FpdCBhbGwgQ29udHJvbCBURCBjb21wbGV0ZQorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmlURFVzZWRbVFlQRV9UWERNQTBdICE9IDApeworICAgICAgICAgICAgICAgIHZDb21tYW5kVGltZXJXYWl0KChIQU5ETEUpcERldmljZSwgMTApOworICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfTsKKy8vMjAwOC0wOS0wMiAgPG1hcms+IGJ5IGNoZXN0ZXIKKyAgICAgICAgICAgLy8gQ0FSRGJSYWRpb1Bvd2VyT2ZmKHBEZXZpY2UpOworICAgICAgICAgICAgc19iQ29tbWFuZENvbXBsZXRlKHBEZXZpY2UpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0NNRF9TU0lEX1NUQVJUOgorICAgICAgICAJcERldmljZS0+YnlSZUFzc29jQ291bnQgPSAwOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJSYWRpb09mZiA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgc19iQ29tbWFuZENvbXBsZXRlKHBEZXZpY2UpOworICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfQorLy9wcmludGsoImNoZXN0ZXItY3Vycm1vZGU9JWRcbiIscE1nbXQtPmVDdXJyTW9kZSk7CitwcmludGsoImNoZXN0ZXItYWJ5RGVzaXJlU1NJRD0lc1xuIiwoKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieURlc2lyZVNTSUQpLT5hYnlTU0lEKTsKKyAgICAgICAgICAgICAgICAgICAgIC8vbWVtY3B5KHBNZ210LT5hYnlBZEhvY1NTSUQscE1nbXQtPmFieURlc2lyZVNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLygoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5RGVzaXJlU1NJRCktPmxlbiArIFdMQU5fSUVIRFJfTEVOKTsKKyAgICAgICAgICAgIHBJdGVtU1NJRCA9IChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlEZXNpcmVTU0lEOworICAgICAgICAgICAgcEl0ZW1TU0lEQ3VyciA9IChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRDsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iIGNtZDogZGVzaXJlIHNzaWQgPSAlc1xuIiwgcEl0ZW1TU0lELT5hYnlTU0lEKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iIGNtZDogY3VyciBzc2lkID0gJXN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gICAgICAgICAgICAgICAgICBpZiAobWVtY21wKHBJdGVtU1NJRC0+YWJ5U1NJRCwgcEl0ZW1TU0lEQ3Vyci0+YWJ5U1NJRCwgcEl0ZW1TU0lELT5sZW4pID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNfYkNvbW1hbmRDb21wbGV0ZShwRGV2aWNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gRkFMU0U7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyBzZXQgaW5pdGlhbCBzdGF0ZQorICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgICAgICBwTWdtdC0+ZUN1cnJNb2RlID0gV01BQ19NT0RFX1NUQU5EQlk7CisgICAgICAgICAgICBQU3ZEaXNhYmxlUG93ZXJTYXZpbmcoKEhBTkRMRSlwRGV2aWNlKTsKKyAgICAgICAgICAgIEJTU3ZDbGVhck5vZGVEQlRhYmxlKHBEZXZpY2UsIDApOworCisgICAgICAgICAgICB2TWdySm9pbkJTU0JlZ2luKChIQU5ETEUpcERldmljZSwgJlN0YXR1cyk7CisgICAgICAgICAgICAvLyBpZiBJbmZyYSBtb2RlCisgICAgICAgICAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19TVEEpICYmIChwTWdtdC0+ZUN1cnJTdGF0ZSA9PSBXTUFDX1NUQVRFX0pPSU5URUQpKSB7CisKKwkJLy8gQ2FsbCBtZ3IgdG8gYmVnaW4gdGhlIGRlYXV0aGVudGljYXRpb24KKyAgICAgICAgICAgICAgICAvLyByZWFzb24gPSAoMykgYmVhY3VzZSBzdGEgaGFzIGxlZnQgRVNTCisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5lQ3VyclN0YXRlPj0gV01BQ19TVEFURV9BVVRIKSB7CisgICAgICAgICAgICAgICAgICAgIHZNZ3JEZUF1dGhlbkJlZ2luU3RhKChIQU5ETEUpcERldmljZSwgcE1nbXQsIHBNZ210LT5hYnlDdXJyQlNTSUQsICgzKSwgJlN0YXR1cyk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8vIENhbGwgbWdyIHRvIGJlZ2luIHRoZSBhdXRoZW50aWNhdGlvbgorICAgICAgICAgICAgICAgIHZNZ3JBdXRoZW5CZWdpblN0YSgoSEFORExFKXBEZXZpY2UsIHBNZ210LCAmU3RhdHVzKTsKKyAgICAgICAgICAgICAgICBpZiAoU3RhdHVzID09IENNRF9TVEFUVVNfU1VDQ0VTUykgeworCQlwRGV2aWNlLT5ieUxpbmtXYWl0Q291bnQgPSAwOworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID0gV0xBTl9BVVRIRU5USUNBVEVfV0FJVDsKKyAgICAgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCBBVVRIRU5USUNBVEVfVElNRU9VVCk7CisgICAgICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iIFNldCBlQ29tbWFuZFN0YXRlID0gV0xBTl9BVVRIRU5USUNBVEVfV0FJVFxuIik7CisgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyBpZiBBZGhvYyBtb2RlCisgICAgICAgICAgICBlbHNlIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9JQlNTX1NUQSkgeworICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJTdGF0ZSA9PSBXTUFDX1NUQVRFX0pPSU5URUQpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKG5ldGlmX3F1ZXVlX3N0b3BwZWQocERldmljZS0+ZGV2KSl7CisgICAgICAgICAgICAgICAgICAgICAgICBuZXRpZl93YWtlX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gVFJVRTsKKworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJBY3RpdmUgPSBUUlVFOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVJbkFjdGl2ZUNvdW50ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgYkNsZWFyQlNTSURfU0NBTihwRGV2aWNlKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHN0YXJ0IG93biBJQlNTCisgICAgICAgICAgICAgICAgICAgIHZNZ3JDcmVhdGVPd25JQlNTKChIQU5ETEUpcERldmljZSwgJlN0YXR1cyk7CisgICAgICAgICAgICAgICAgICAgIGlmIChTdGF0dXMgIT0gQ01EX1NUQVRVU19TVUNDRVNTKXsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiBXTEFOX0NNRF9JQlNTX0NSRUFURSBmYWlsICEgXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgICAgICAgICAgQlNTdkFkZE11bHRpY2FzdE5vZGUocERldmljZSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gaWYgU1NJRCBub3QgZm91bmQKKyAgICAgICAgICAgIGVsc2UgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX1NUQU5EQlkpIHsKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0lCU1NfU1RBIHx8CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ29uZmlnTW9kZSA9PSBXTUFDX0NPTkZJR19BVVRPKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIHN0YXJ0IG93biBJQlNTCisgICAgICAgICAgICAgICAgICAgIHZNZ3JDcmVhdGVPd25JQlNTKChIQU5ETEUpcERldmljZSwgJlN0YXR1cyk7CisgICAgICAgICAgICAgICAgICAgIGlmIChTdGF0dXMgIT0gQ01EX1NUQVRVU19TVUNDRVNTKXsKKyAgICAgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iIFdMQU5fQ01EX0lCU1NfQ1JFQVRFIGZhaWwgISBcbiIpOworICAgICAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAgICAgICBCU1N2QWRkTXVsdGljYXN0Tm9kZShwRGV2aWNlKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKG5ldGlmX3F1ZXVlX3N0b3BwZWQocERldmljZS0+ZGV2KSl7CisgICAgICAgICAgICAgICAgICAgICAgICBuZXRpZl93YWtlX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gVFJVRTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkRpc2Nvbm5lY3QgU1NJRCBub25lXG4iKTsKKwkJICAjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorICAgICAgICAgICAgICAgICAgICAvLyBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09IFRSVUUpCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAJdW5pb24gaXdyZXFfZGF0YSAgd3JxdTsKKyAgICAgICAgICAgICAgICAgIAltZW1zZXQoJndycXUsIDAsIHNpemVvZiAod3JxdSkpOworICAgICAgICAgICAgICAgICAgICAgICAgICB3cnF1LmFwX2FkZHIuc2FfZmFtaWx5ID0gQVJQSFJEX0VUSEVSOworICAgICAgICAgICAgICAgICAgCXByaW50aygid2lyZWxlc3Nfc2VuZF9ldmVudC0tLT5TSU9DR0lXQVAoZGlzYXNzb2NpYXRlZDp2TWdySm9pbkJTU0JlZ2luIEZhaWwgISEpXG4iKTsKKyAgICAgICAgICAgICAgICAgIAl3aXJlbGVzc19zZW5kX2V2ZW50KHBEZXZpY2UtPmRldiwgU0lPQ0dJV0FQLCAmd3JxdSwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgI2VuZGlmCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fQVVUSEVOVElDQVRFX1dBSVQgOgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJlQ29tbWFuZFN0YXRlID09IFdMQU5fQVVUSEVOVElDQVRFX1dBSVRcbiIpOworICAgICAgICAgICAgaWYgKHBNZ210LT5lQ3VyclN0YXRlID09IFdNQUNfU1RBVEVfQVVUSCkgeworICAgICAgICAgICAgICAgIC8vIENhbGwgbWdyIHRvIGJlZ2luIHRoZSBhc3NvY2lhdGlvbgorICAgICAgICAgICAgICAgIAlwRGV2aWNlLT5ieUxpbmtXYWl0Q291bnQgPSAwOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iZUN1cnJTdGF0ZSA9PSBXTUFDX1NUQVRFX0FVVEhcbiIpOworICAgICAgICAgICAgICAgIHZNZ3JBc3NvY0JlZ2luU3RhKChIQU5ETEUpcERldmljZSwgcE1nbXQsICZTdGF0dXMpOworICAgICAgICAgICAgICAgIGlmIChTdGF0dXMgPT0gQ01EX1NUQVRVU19TVUNDRVNTKSB7CisJCXBEZXZpY2UtPmJ5TGlua1dhaXRDb3VudCA9IDA7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iZUNvbW1hbmRTdGF0ZSA9IFdMQU5fQVNTT0NJQVRFX1dBSVRcbiIpOworICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID0gV0xBTl9BU1NPQ0lBVEVfV0FJVDsKKyAgICAgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCBBU1NPQ0lBVEVfVElNRU9VVCk7CisgICAgICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisKKwllbHNlIGlmKHBNZ210LT5lQ3VyclN0YXRlIDwgV01BQ19TVEFURV9BVVRIUEVORElORykgeworICAgICAgICAgICAgICAgcHJpbnRrKCJXTEFOX0FVVEhFTlRJQ0FURV9XQUlUOkF1dGhlbiBGYWlsPz8/XG4iKTsKKwkgICB9CisJICAgZWxzZSAgaWYocERldmljZS0+YnlMaW5rV2FpdENvdW50IDw9IDQpeyAgICAvL21pa2UgYWRkOndhaXQgYW5vdGhlciAyIHNlYyBpZiBhdXRoZW50aWNhdGVkX2ZyYW1lIGRlbGF5IQorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5TGlua1dhaXRDb3VudCArKzsKKwkgICAgICAgcHJpbnRrKCJXTEFOX0FVVEhFTlRJQ0FURV9XQUlUOndhaXQgJWQgdGltZXMhIVxuIixwRGV2aWNlLT5ieUxpbmtXYWl0Q291bnQpOworCSAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCSAgICAgICB2Q29tbWFuZFRpbWVyV2FpdCgoSEFORExFKXBEZXZpY2UsIEFVVEhFTlRJQ0FURV9USU1FT1VULzIpOworCSAgICAgICByZXR1cm47CisJICAgfQorCSAgICAgICAgICBwRGV2aWNlLT5ieUxpbmtXYWl0Q291bnQgPSAwOworCQkgI2lmIDAKKyAgICAgICAgICAgICAgICAgICAgICNpZmRlZiBXUEFfU1VQUExJQ0FOVF9EUklWRVJfV0VYVF9TVVBQT1JUCisgICAgICAgICAgICAgICAgICAgIC8vIGlmKHBEZXZpY2UtPmJXUEFTdXBwV2V4dEVuYWJsZWQgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIAl1bmlvbiBpd3JlcV9kYXRhICB3cnF1OworICAgICAgICAgICAgICAgICAgCW1lbXNldCgmd3JxdSwgMCwgc2l6ZW9mICh3cnF1KSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHdycXUuYXBfYWRkci5zYV9mYW1pbHkgPSBBUlBIUkRfRVRIRVI7CisgICAgICAgICAgICAgICAgICAJcHJpbnRrKCJ3aXJlbGVzc19zZW5kX2V2ZW50LS0tPlNJT0NHSVdBUChkaXNhc3NvY2lhdGVkOkFVVEhFTlRJQ0FURV9XQUlUX3RpbWVvdXQpXG4iKTsKKyAgICAgICAgICAgICAgICAgIAl3aXJlbGVzc19zZW5kX2V2ZW50KHBEZXZpY2UtPmRldiwgU0lPQ0dJV0FQLCAmd3JxdSwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgI2VuZGlmCisJICAgICAgICAgI2VuZGlmCisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fQVNTT0NJQVRFX1dBSVQgOgorICAgICAgICAgICAgaWYgKHBNZ210LT5lQ3VyclN0YXRlID09IFdNQUNfU1RBVEVfQVNTT0MpIHsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQ1xuIik7CisgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVQU01vZGUgIT0gV01BQ19QT1dFUl9DQU0pIHsKKyAgICAgICAgICAgICAgICAgICAgUFN2RW5hYmxlUG93ZXJTYXZpbmcoKEhBTkRMRSlwRGV2aWNlLCBwTWdtdC0+d0xpc3RlbkludGVydmFsKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKHBNZ210LT5lQXV0aGVuTW9kZSA+PSBXTUFDX0FVVEhfV1BBKSB7CisgICAgICAgICAgICAgICAgICAgIEtleWJSZW1vdmVBbGxLZXkoJihwRGV2aWNlLT5zS2V5KSwgcERldmljZS0+YWJ5QlNTSUQsIHBEZXZpY2UtPlBvcnRPZmZzZXQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iTGlua1Bhc3MgPSBUUlVFOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJ5TGlua1dhaXRDb3VudCA9IDA7CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlSZUFzc29jQ291bnQgPSAwOworICAgICAgICAgICAgICAgIGJDbGVhckJTU0lEX1NDQU4ocERldmljZSk7CisgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmJ5Rk9FVHVuaW5nKSB7CisgICAgICAgICAgICAgICAgICAgIEJCdlNldEZPRShwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKyAgICAgICAgICAgICAgICAgICAgUFNiU2VuZE51bGxQYWNrZXQocERldmljZSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChuZXRpZl9xdWV1ZV9zdG9wcGVkKHBEZXZpY2UtPmRldikpeworICAgICAgICAgICAgICAgICAgICBuZXRpZl93YWtlX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgfQorCSAgICAgI2lmZGVmIFR4SW5TbGVlcAorCQkgaWYocERldmljZS0+SXNUeERhdGFUcmlnZ2VyICE9IEZBTFNFKSAgIHsgICAgLy9UeERhdGFUaW1lciBpcyBub3QgdHJpZ2dlcmVkIGF0IHRoZSBmaXJzdCB0aW1lCisgICAgICAgICAgICAgICAgICAgICAvLyBwcmludGsoIlJlLWluaXRpYWwgVHhEYXRhVGltZXIqKioqXG4iKTsKKwkJICAgIGRlbF90aW1lcigmcERldmljZS0+c1RpbWVyVHhEYXRhKTsKKyAgICAgICAgICAgICAgICAgICAgICBpbml0X3RpbWVyKCZwRGV2aWNlLT5zVGltZXJUeERhdGEpOworICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNUaW1lclR4RGF0YS5kYXRhID0gKFVMT05HKXBEZXZpY2U7CisgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+c1RpbWVyVHhEYXRhLmZ1bmN0aW9uID0gKFRpbWVyRnVuY3Rpb24pQlNTdlNlY29uZFR4RGF0YTsKKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5zVGltZXJUeERhdGEuZXhwaXJlcyA9IFJVTl9BVCgxMCpIWik7ICAgICAgLy8xMHMgY2FsbGJhY2sKKyAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5mVHhEY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kJI2lmIDAKKyAgICAgICAgICAgICAgICAgICAgICNpZmRlZiBXUEFfU1VQUExJQ0FOVF9EUklWRVJfV0VYVF9TVVBQT1JUCisgICAgICAgICAgICAgICAgICAgIC8vIGlmKHBEZXZpY2UtPmJXUEFTdXBwV2V4dEVuYWJsZWQgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIAl1bmlvbiBpd3JlcV9kYXRhICB3cnF1OworICAgICAgICAgICAgICAgICAgCW1lbXNldCgmd3JxdSwgMCwgc2l6ZW9mICh3cnF1KSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHdycXUuYXBfYWRkci5zYV9mYW1pbHkgPSBBUlBIUkRfRVRIRVI7CisgICAgICAgICAgICAgICAgICAJcHJpbnRrKCJ3aXJlbGVzc19zZW5kX2V2ZW50LS0tPlNJT0NHSVdBUChkaXNhc3NvY2lhdGVkOkFTU09DSUFURV9XQUlUX3RpbWVvdXQpXG4iKTsKKyAgICAgICAgICAgICAgICAgIAl3aXJlbGVzc19zZW5kX2V2ZW50KHBEZXZpY2UtPmRldiwgU0lPQ0dJV0FQLCAmd3JxdSwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgI2VuZGlmCisJCSNlbmRpZgorCisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fQ01EX0FQX01PREVfU1RBUlQgOgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJlQ29tbWFuZFN0YXRlID09IFdMQU5fQ01EX0FQX01PREVfU1RBUlRcbiIpOworCisgICAgICAgICAgICBpZiAocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0FQKSB7CisgICAgICAgICAgICAgICAgZGVsX3RpbWVyKCZwTWdtdC0+c1RpbWVyU2Vjb25kQ2FsbGJhY2spOworICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICAgICAgICAgIHBNZ210LT5lQ3Vyck1vZGUgPSBXTUFDX01PREVfU1RBTkRCWTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iTGlua1Bhc3MgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RXRVAgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICAgICAgQlNTdkNsZWFyTm9kZURCVGFibGUocERldmljZSwgMSk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBCU1N2Q2xlYXJOb2RlREJUYWJsZShwRGV2aWNlLCAwKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT51QXNzb2NDb3VudCA9IDA7CisgICAgICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgICAgICAgICAgcERldmljZS0+YkZpeFJhdGUgPSBGQUxTRTsKKworICAgICAgICAgICAgICAgIHZNZ3JDcmVhdGVPd25JQlNTKChIQU5ETEUpcERldmljZSwgJlN0YXR1cyk7CisgICAgICAgICAgICAgICAgaWYgKFN0YXR1cyAhPSBDTURfU1RBVFVTX1NVQ0NFU1MpeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIgdk1nckNyZWF0ZU93bklCU1MgZmFpbCAhIFxuIik7CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgICAgICAvLyBhbHdheSB0dXJuIG9mZiB1bmljYXN0IGJpdAorICAgICAgICAgICAgICAgIE1BQ3ZSZWdCaXRzT2ZmKHBEZXZpY2UtPlBvcnRPZmZzZXQsIE1BQ19SRUdfUkNSLCBSQ1JfVU5JQ0FTVCk7CisgICAgICAgICAgICAgICAgcERldmljZS0+YnlSeE1vZGUgJj0gflJDUl9VTklDQVNUOworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIndjbWQ6IHJ4X21vZGUgPSAleFxuIiwgcERldmljZS0+YnlSeE1vZGUgKTsKKyAgICAgICAgICAgICAgICBCU1N2QWRkTXVsdGljYXN0Tm9kZShwRGV2aWNlKTsKKyAgICAgICAgICAgICAgICBpZiAobmV0aWZfcXVldWVfc3RvcHBlZChwRGV2aWNlLT5kZXYpKXsKKyAgICAgICAgICAgICAgICAgICAgbmV0aWZfd2FrZV9xdWV1ZShwRGV2aWNlLT5kZXYpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iTGlua1Bhc3MgPSBUUlVFOworICAgICAgICAgICAgICAgIGFkZF90aW1lcigmcE1nbXQtPnNUaW1lclNlY29uZENhbGxiYWNrKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNfYkNvbW1hbmRDb21wbGV0ZShwRGV2aWNlKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgV0xBTl9DTURfVFhfUFNQQUNLRVRfU1RBUlQgOgorICAgICAgICAgICAgLy8gRFRJTSBNdWx0aWNhc3QgdHgKKyAgICAgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJSeFBTUG9sbCkgeworICAgICAgICAgICAgICAgIHdoaWxlICgoc2tiID0gc2tiX2RlcXVldWUoJnBNZ210LT5zTm9kZURCVGFibGVbMF0uc1R4UFNRdWV1ZSkpICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHNrYl9xdWV1ZV9lbXB0eSgmcE1nbXQtPnNOb2RlREJUYWJsZVswXS5zVHhQU1F1ZXVlKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieVBTVHhNYXBbMF0gJj0gfmJ5TWFza1swXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJNb3JlRGF0YSA9IEZBTFNFOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+Yk1vcmVEYXRhID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIWRldmljZV9kbWEwX3htaXQocERldmljZSwgc2tiLCAwKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTXVsdGljYXN0IHBzIHR4IGZhaWwgXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLndFblF1ZXVlQ250LS07CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgLy8gUFMgbm9kZXMgdHgKKyAgICAgICAgICAgIGZvciAoaWkgPSAxOyBpaSA8IChNQVhfTk9ERV9OVU0gKyAxKTsgaWkrKykgeworICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5iQWN0aXZlICYmCisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaWldLmJSeFBTUG9sbCkgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJJbmRleD0lZCBFbnF1ZXUgQ250PSAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpaSwgcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0ud0VuUXVldWVDbnQpOworICAgICAgICAgICAgICAgICAgICB3aGlsZSAoKHNrYiA9IHNrYl9kZXF1ZXVlKCZwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS5zVHhQU1F1ZXVlKSkgIT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNrYl9xdWV1ZV9lbXB0eSgmcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uc1R4UFNRdWV1ZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0eCBtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5UFNUeE1hcFtwTWdtdC0+c05vZGVEQlRhYmxlW2lpXS53QUlEID4+IDNdICY9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB+YnlNYXNrW3BNZ210LT5zTm9kZURCVGFibGVbaWldLndBSUQgJiA3XTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5iTW9yZURhdGEgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJNb3JlRGF0YSA9IFRSVUU7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRldmljZV9kbWEwX3htaXQocERldmljZSwgc2tiLCBpaSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJzdGEgcHMgdHggZmFpbCBcbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0ud0VuUXVldWVDbnQtLTsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIHN0YSBwcyBlbmFibGUsIHdhaXQgbmV4dCBwc3BvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHN0YSBwcyBkaXNhYmxlLCBzZW5kIGFsbCBwZW5kaW5nIGJ1ZmZlcnMuCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAocE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uYlBTRW5hYmxlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGlmIChza2JfcXVldWVfZW1wdHkoJnBNZ210LT5zTm9kZURCVGFibGVbaWldLnNUeFBTUXVldWUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0eCBtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlQU1R4TWFwW3BNZ210LT5zTm9kZURCVGFibGVbaWldLndBSUQgPj4gM10gJj0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH5ieU1hc2tbcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0ud0FJRCAmIDddOworICAgICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiSW5kZXg9JWQgUFMgcXVldWUgY2xlYXIgXG4iLCBpaSk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpaV0uYlJ4UFNQb2xsID0gRkFMU0U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworCisgICAgICAgIGNhc2UgV0xBTl9DTURfUkFESU9fU1RBUlQgOgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJlQ29tbWFuZFN0YXRlID09IFdMQU5fQ01EX1JBRElPX1NUQVJUXG4iKTsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iUmFkaW9DbWQgPT0gVFJVRSkKKyAgICAgICAgICAgICAgICBDQVJEYlJhZGlvUG93ZXJPbihwRGV2aWNlKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICBDQVJEYlJhZGlvUG93ZXJPZmYocERldmljZSk7CisKKyAgICAgICAgICAgIHNfYkNvbW1hbmRDb21wbGV0ZShwRGV2aWNlKTsKKyAgICAgICAgICAgIGJyZWFrOworCisKKyAgICAgICAgY2FzZSBXTEFOX0NNRF9DSEVDS19CQlNFTlNJVElWSVRZX0NIQU5HRSA6CisgICAgICAgICAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iZUNvbW1hbmRTdGF0ZSA9PSBXTEFOX0NNRF9DSEVDS19CQlNFTlNJVElWSVRZX1NUQVJUXG4iKTsKKyAgICAgICAgICAgIC8vIHdhaXQgYWxsIFREIGNvbXBsZXRlCisgICAgICAgICAgICBpZiAocERldmljZS0+aVREVXNlZFtUWVBFX0FDMERNQV0gIT0gMCl7CisgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCAxMCk7CisgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAocERldmljZS0+aVREVXNlZFtUWVBFX1RYRE1BMF0gIT0gMCl7CisgICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCAxMCk7CisgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgICAgICBwRGV2aWNlLT5ieUJCVkdBQ3VycmVudCA9IHBEZXZpY2UtPmJ5QkJWR0FOZXc7CisgICAgICAgICAgICBCQnZTZXRWR0FHYWluT2Zmc2V0KHBEZXZpY2UsIHBEZXZpY2UtPmJ5QkJWR0FDdXJyZW50KTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iU2V0VkdBR2Fpbk9mZnNldCAlMDJYXG4iLCBwRGV2aWNlLT5ieUJCVkdBQ3VycmVudCk7CisgICAgICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0IDoKKyAgICAgICAgICAgIHNfYkNvbW1hbmRDb21wbGV0ZShwRGV2aWNlKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgfSAvL3N3aXRjaAorICAgIHNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgcmV0dXJuOworCit9CisKKworc3RhdGljCitCT09MCitzX2JDb21tYW5kQ29tcGxldGUgKAorICAgIFBTRGV2aWNlIHBEZXZpY2UKKyAgICApCit7CisgICAgUFdMQU5fSUVfU1NJRCBwU1NJRDsKKyAgICBCT09MICAgICAgICAgIGJSYWRpb0NtZCA9IEZBTFNFOworICAgIC8vV09SRCAgICAgICAgICB3RGVBdXRoZW5SZWFzb24gPSAwOworICAgIEJPT0wgICAgICAgICAgYkZvcmNlU0NBTiA9IFRSVUU7CisgICAgUFNNZ210T2JqZWN0ICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCisKKyAgICBwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID0gV0xBTl9DTURfSURMRTsKKyAgICBpZiAocERldmljZS0+Y2JGcmVlQ21kUXVldWUgPT0gQ01EX1FfU0laRSkgeworICAgICAgICAvL0NvbW1hbmQgUXVldWUgRW1wdHkKKyAgICAgICAgcERldmljZS0+YkNtZFJ1bm5pbmcgPSBGQUxTRTsKKyAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBwRGV2aWNlLT5lQ29tbWFuZCA9IHB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5fU1NJRF9NQVhMRU4gKyAxKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBtZW1zZXQocE1nbXQtPmFieVNjYW5TU0lELCAwLCBXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKyAxKTsKKyAgICAgICAgICAgICAgICB9CisvKgorICAgICAgICAgICAgICAgIGlmICgoYkZvcmNlU0NBTiA9PSBGQUxTRSkgJiYgKHBEZXZpY2UtPmJMaW5rUGFzcyA9PSBUUlVFKSkgeworICAgICAgICAgICAgICAgICAgICBpZiAoKHBTU0lELT5sZW4gPT0gKChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRCktPmxlbikgJiYKKyAgICAgICAgICAgICAgICAgICAgICAgIChNRU1FcXVhbE1lbW9yeShwU1NJRC0+YWJ5U1NJRCwgKChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRCktPmFieVNTSUQsIHBTU0lELT5sZW4pKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+ZUNvbW1hbmRTdGF0ZSA9IFdMQU5fQ01EX0lETEU7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisqLworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0NNRF9TU0lEOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPSBXTEFOX0NNRF9TU0lEX1NUQVJUOworICAgICAgICAgICAgICAgIGlmIChwU1NJRC0+bGVuID4gV0xBTl9TU0lEX01BWExFTikKKyAgICAgICAgICAgICAgICAgICAgcFNTSUQtPmxlbiA9IFdMQU5fU1NJRF9NQVhMRU47CisgICAgICAgICAgICAgICAgaWYgKHBTU0lELT5sZW4gIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkocERldmljZS0+cE1nbXQtPmFieURlc2lyZVNTSUQsIHBTU0lELCBXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKyAxKTsKKyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImVDb21tYW5kU3RhdGU9IFdMQU5fQ01EX1NTSURfU1RBUlRcbiIpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0NNRF9ESVNBU1NPQ0lBVEU6CisgICAgICAgICAgICAgICAgcERldmljZS0+ZUNvbW1hbmRTdGF0ZSA9IFdMQU5fQ01EX0RJU0FTU09DSUFURV9TVEFSVDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9DTURfUlhfUFNQT0xMOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPSBXTEFOX0NNRF9UWF9QU1BBQ0tFVF9TVEFSVDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgV0xBTl9DTURfUlVOX0FQOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPSBXTEFOX0NNRF9BUF9NT0RFX1NUQVJUOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0NNRF9SQURJTzoKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID0gV0xBTl9DTURfUkFESU9fU1RBUlQ7CisgICAgICAgICAgICAgICAgcERldmljZS0+YlJhZGlvQ21kID0gYlJhZGlvQ21kOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBXTEFOX0NNRF9DSEFOR0VfQkJTRU5TSVRJVklUWToKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID0gV0xBTl9DTURfQ0hFQ0tfQkJTRU5TSVRJVklUWV9DSEFOR0U7CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgfQorCisgICAgICAgIHZDb21tYW5kVGltZXJXYWl0KChIQU5ETEUpcERldmljZSwgMCk7CisgICAgfQorCisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworCitCT09MIGJTY2hlZHVsZUNvbW1hbmQgKAorICAgIElOIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiBDTURfQ09ERSAgICBlQ29tbWFuZCwKKyAgICBJTiBQQllURSAgICAgICBwYnlJdGVtMAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKworCisgICAgaWYgKHBEZXZpY2UtPmNiRnJlZUNtZFF1ZXVlID09IDApIHsKKyAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgfQorICAgIHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uZUNtZCA9IGVDb21tYW5kOworICAgIHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uYkZvcmNlU0NBTiA9IFRSVUU7CisgICAgbWVtc2V0KHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uYWJ5Q21kRGVzaXJlU1NJRCwgMCAsIFdMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDEpOworCisgICAgaWYgKHBieUl0ZW0wICE9IE5VTEwpIHsKKyAgICAgICAgc3dpdGNoIChlQ29tbWFuZCkgeworCisgICAgICAgICAgICBjYXNlIFdMQU5fQ01EX0JTU0lEX1NDQU46CisgICAgICAgICAgICAgICAgTUVNdkNvcHkocERldmljZS0+ZUNtZFF1ZXVlW3BEZXZpY2UtPnVDbWRFbnF1ZXVlSWR4XS5hYnlDbWREZXNpcmVTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgIHBieUl0ZW0wLCBXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKyAxKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ21kUXVldWVbcERldmljZS0+dUNtZEVucXVldWVJZHhdLmJGb3JjZVNDQU4gPSBGQUxTRTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSBXTEFOX0NNRF9TU0lEOgorICAgICAgICAgICAgICAgIE1FTXZDb3B5KHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uYWJ5Q21kRGVzaXJlU1NJRCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBwYnlJdGVtMCwgV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1NTSURfTUFYTEVOICsgMSk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9DTURfRElTQVNTT0NJQVRFOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uYk5lZWRSYWRpb09GRiA9ICooKFBCT09MKXBieUl0ZW0wKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKy8qCisgICAgICAgICAgICBjYXNlIFdMQU5fQ01EX0RFQVVUSDoKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5lQ21kUXVldWVbcERldmljZS0+dUNtZEVucXVldWVJZHhdLndEZUF1dGhlblJlYXNvbiA9ICooKFBXT1JEKXBieUl0ZW0wKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyovCisKKyAgICAgICAgICAgIGNhc2UgV0xBTl9DTURfUlhfUFNQT0xMOgorICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlIFdMQU5fQ01EX1JBRElPOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDbWRRdWV1ZVtwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeF0uYlJhZGlvQ21kID0gKigoUEJPT0wpcGJ5SXRlbTApOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlIFdMQU5fQ01EX0NIQU5HRV9CQlNFTlNJVElWSVRZOgorICAgICAgICAgICAgICAgIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPSBXTEFOX0NNRF9DSEVDS19CQlNFTlNJVElWSVRZX0NIQU5HRTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKworICAgIEFERF9PTkVfV0lUSF9XUkFQX0FST1VORChwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeCwgQ01EX1FfU0laRSk7CisgICAgcERldmljZS0+Y2JGcmVlQ21kUXVldWUtLTsKKworICAgIGlmIChwRGV2aWNlLT5iQ21kUnVubmluZyA9PSBGQUxTRSkgeworICAgICAgICBzX2JDb21tYW5kQ29tcGxldGUocERldmljZSk7CisgICAgfQorICAgIGVsc2UgeworICAgIH0KKyAgICByZXR1cm4gKFRSVUUpOworCit9CisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgQ2xlYXIgQlNTSURfU0NBTiBjbWQgaW4gQ01EIFF1ZXVlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgIC0gUG9pbnRlciB0byB0aGUgYWRhcHRlcgorICogICAgICBlQ29tbWFuZCAgICAgICAgLSBDb21tYW5kCisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBUUlVFIGlmIHN1Y2Nlc3M7IG90aGVyd2lzZSBGQUxTRQorICoKKyAqLworQk9PTCBiQ2xlYXJCU1NJRF9TQ0FOICgKKyAgICBJTiBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgVUlOVCAgICAgICAgICAgIHVDbWREZXF1ZXVlSWR4ID0gcERldmljZS0+dUNtZERlcXVldWVJZHg7CisgICAgVUlOVCAgICAgICAgICAgIGlpOworCisgICAgaWYgKChwRGV2aWNlLT5jYkZyZWVDbWRRdWV1ZSA8IENNRF9RX1NJWkUpICYmICh1Q21kRGVxdWV1ZUlkeCAhPSBwRGV2aWNlLT51Q21kRW5xdWV1ZUlkeCkpIHsKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgKENNRF9RX1NJWkUgLSBwRGV2aWNlLT5jYkZyZWVDbWRRdWV1ZSk7IGlpICsrKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+ZUNtZFF1ZXVlW3VDbWREZXF1ZXVlSWR4XS5lQ21kID09IFdMQU5fQ01EX0JTU0lEX1NDQU4pCisgICAgICAgICAgICAgICAgcERldmljZS0+ZUNtZFF1ZXVlW3VDbWREZXF1ZXVlSWR4XS5lQ21kID0gV0xBTl9DTURfSURMRTsKKyAgICAgICAgICAgIEFERF9PTkVfV0lUSF9XUkFQX0FST1VORCh1Q21kRGVxdWV1ZUlkeCwgQ01EX1FfU0laRSk7CisgICAgICAgICAgICBpZiAodUNtZERlcXVldWVJZHggPT0gcERldmljZS0+dUNtZEVucXVldWVJZHgpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIFRSVUU7Cit9CisKKy8vbWlrZSBhZGQ6cmVzZXQgY29tbWFuZCB0aW1lcgorVk9JRAordlJlc2V0Q29tbWFuZFRpbWVyKAorICAgIElOIEhBTkRMRSAgICAgIGhEZXZpY2VDb250ZXh0CisgICAgKQoreworICBQU0RldmljZSAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDs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ja2V0IGluIERlZnJhZ21lbnQgRGF0YWJhc2UKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAtIFBvaW50ZXIgdG8gYWRhcHRlcgorICogICAgICBwTUFDSGVhZGVyICAtIDgwMi4xMSBNQUMgSGVhZGVyIG9mIHJlY2VpdmVkIHBhY2tldAorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogaW5kZXggbnVtYmVyIGluIERlZnJhZ21lbnQgRGF0YWJhc2UKKyAqCisgKi8KK1VJTlQgV0NUTHVTZWFyY2hERkNCIChQU0RldmljZSBwRGV2aWNlLCBQUzgwMl8xMUhlYWRlciBwTUFDSGVhZGVyKQoreworVUlOVCBpaTsKKworICAgIGZvcihpaT0wO2lpPHBEZXZpY2UtPmNiREZDQjtpaSsrKSB7CisgICAgICAgIGlmICgocERldmljZS0+c1J4REZDQltpaV0uYkluVXNlID09IFRSVUUpICYmCisgICAgICAgICAgICAoSVNfRVRIX0FERFJFU1NfRVFVQUwgKCYocERldmljZS0+c1J4REZDQltpaV0uYWJ5QWRkcjJbMF0pLCAmKHBNQUNIZWFkZXItPmFieUFkZHIyWzBdKSkpCisgICAgICAgICAgICApIHsKKyAgICAgICAgICAgIC8vCisgICAgICAgICAgICByZXR1cm4oaWkpOworICAgICAgICB9CisgICAgfQorICAgIHJldHVybihwRGV2aWNlLT5jYkRGQ0IpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgSW5zZXJ0IHJlY2VpdmVkIGZyYWdtZW50IHBhY2tldCBpbiBEZWZyYWdtZW50IERhdGFiYXNlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgLSBQb2ludGVyIHRvIGFkYXB0ZXIKKyAqICAgICAgcE1BQ0hlYWRlciAgLSA4MDIuMTEgTUFDIEhlYWRlciBvZiByZWNlaXZlZCBwYWNrZXQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IGluZGV4IG51bWJlciBpbiBEZWZyYWdtZW50IERhdGFiYXNlCisgKgorICovCitVSU5UIFdDVEx1SW5zZXJ0REZDQiAoUFNEZXZpY2UgcERldmljZSwgUFM4MDJfMTFIZWFkZXIgcE1BQ0hlYWRlcikKK3sKK1VJTlQgaWk7CisKKyAgICBpZiAocERldmljZS0+Y2JGcmVlREZDQiA9PSAwKQorICAgICAgICByZXR1cm4ocERldmljZS0+Y2JERkNCKTsKKyAgICBmb3IoaWk9MDtpaTxwRGV2aWNlLT5jYkRGQ0I7aWkrKykgeworICAgICAgICBpZiAocERldmljZS0+c1J4REZDQltpaV0uYkluVXNlID09IEZBTFNFKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5jYkZyZWVERkNCLS07CisgICAgICAgICAgICBwRGV2aWNlLT5zUnhERkNCW2lpXS51TGlmZXRpbWUgPSBwRGV2aWNlLT5kd01heFJlY2VpdmVMaWZldGltZTsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbaWldLmJJblVzZSA9IFRSVUU7CisgICAgICAgICAgICBwRGV2aWNlLT5zUnhERkNCW2lpXS53U2VxdWVuY2UgPSAocE1BQ0hlYWRlci0+d1NlcUN0bCA+PiA0KTsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbaWldLndGcmFnTnVtID0gKHBNQUNIZWFkZXItPndTZXFDdGwgJiAweDAwMEYpOworICAgICAgICAgICAgbWVtY3B5KCYocERldmljZS0+c1J4REZDQltpaV0uYWJ5QWRkcjJbMF0pLCAmKHBNQUNIZWFkZXItPmFieUFkZHIyWzBdKSwgVV9FVEhFUl9BRERSX0xFTik7CisgICAgICAgICAgICByZXR1cm4oaWkpOworICAgICAgICB9CisgICAgfQorICAgIHJldHVybihwRGV2aWNlLT5jYkRGQ0IpOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgSG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lcik7CisgICAgICAgIGlmIChwRGV2aWNlLT51Q3VycmVudERGQ0JJZHggPCBwRGV2aWNlLT5jYkRGQ0IpIHsKKyAgICAgICAgICAgIC8vIGR1cGxpY2F0ZSwgd2UgbXVzdCBmbHVzaCBwcmV2aW91cyBEQ0IKKyAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS51TGlmZXRpbWUgPSBwRGV2aWNlLT5kd01heFJlY2VpdmVMaWZldGltZTsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS53U2VxdWVuY2UgPSAocE1BQ0hlYWRlci0+d1NlcUN0bCA+PiA0KTsKKyAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS53RnJhZ051bSA9IChwTUFDSGVhZGVyLT53U2VxQ3RsICYgMHgwMDBGKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHBEZXZpY2UtPnVDdXJyZW50REZDQklkeCA9IFdDVEx1SW5zZXJ0REZDQihwRGV2aWNlLCBwTUFDSGVhZGVyKTsKKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT51Q3VycmVudERGQ0JJZHggPT0gcERldmljZS0+Y2JERkNCKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuKEZBTFNFKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAvLyByZXNlcnZlIDQgYnl0ZSB0byBtYXRjaCBNQUMgUlggQnVmZmVyCisjaWZkZWYgUFJJVkFURV9PQkoKKyAgICAgICAgcERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdLnBieVJ4QnVmZmVyID0gKFBCWVRFKSAocERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdLnJlZl9za2IuZGF0YSArIDQpOwor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IChwTUFDSGVhZGVyLT53U2VxQ3RsID4+IDQpKSAmJgorICAgICAgICAgICAgICAgIChwRGV2aWNlLT5zUnhERkNCW3BEZXZpY2UtPnVDdXJyZW50REZDQklkeF0ud0ZyYWdOdW0gPT0gKHBNQUNIZWFkZXItPndTZXFDdGwgJiAweDAwMEYpKSAmJgorICAgICAgICAgICAgICAgICgocERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdLmNiRnJhbWVMZW5ndGggKyBjYkZyYW1lTGVuZ3RoIC0gdUhlYWRlclNpemUpIDwgMjM0NikpIHsKKworICAgICAgICAgICAgICAgIG1lbWNweShwRGV2aWNlLT5zUnhERkNCW3BEZXZpY2UtPnVDdXJyZW50REZDQklkeF0ucGJ5UnhCdWZmZXIsICgoUEJZVEUpIChwTUFDSGVhZGVyKSArIHVIZWFkZXJTaXplKSwgKGNiRnJhbWVMZW5ndGggLSB1SGVhZGVyU2l6ZSkpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS5jYkZyYW1lTGVuZ3RoICs9IChjYkZyYW1lTGVuZ3RoIC0gdUhlYWRlclNpemUpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS5wYnlSeEJ1ZmZlciArPSAoY2JGcmFtZUxlbmd0aCAtIHVIZWFkZXJTaXplKTsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5zUnhERkNCW3BEZXZpY2UtPnVDdXJyZW50REZDQklkeF0ud0ZyYWdOdW0rKzsKKyAgICAgICAgICAgICAgICAvL0RFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlNlY29uZCBwRGV2aWNlLT51Q3VycmVudERGQ0JJZHg9ICVkXG4iLCBwRGV2aWNlLT51Q3VycmVudERGQ0JJZHgpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgLy8gc2VxIGVycm9yIG9yIGZyYWcgIyBlcnJvciBmbHVzaCBERkNCCisgICAgICAgICAgICAgICAgcERldmljZS0+Y2JGcmVlREZDQisrOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNSeERGQ0JbcERldmljZS0+dUN1cnJlbnRERkNCSWR4XS5iSW5Vc2UgPSBGQUxTRTsKKyAgICAgICAgICAgICAgICByZXR1cm4oRkFMU0UpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgcmV0dXJuKEZBTFNFKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoSVNfTEFTVF9GUkFHTUVOVF9QS1QocE1BQ0hlYWRlcikpIHsKKyAgICAgICAgICAgIC8vZW5xIGRlZnJhZ2NvbnRyb2xibG9jaworICAgICAgICAgICAgcERldmljZS0+Y2JGcmVlREZDQisrOworICAgICAgICAgICAgcERldmljZS0+c1J4REZDQltwRGV2aWNlLT51Q3VycmVudERGQ0JJZHhdLmJJblVzZSA9IEZBTFNFOworICAgICAgICAgICAgLy9ERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJMYXN0IHBEZXZpY2UtPnVDdXJyZW50REZDQklkeD0gJWRcbiIsIHBEZXZpY2UtPnVDdXJyZW50REZDQklkeCk7CisgICAgICAgICAgICByZXR1cm4oVFJVRSk7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuKEZBTFNFKTsKKyAgICB9Cit9CisKKwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3Z0NjY1NS93Y3RsLmggYi9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU1L3djdGwuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5mNzVjYTU5Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3Z0NjY1NS93Y3RsLmgKQEAgL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ggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAtMTMwMSBVU0EuCisgKgorICogRmlsZTogd2N0bC5oCisgKgorICogUHVycG9zZToKKyAqCisgKiBBdXRob3I6IEplcnJ5IENoZW4KKyAqCisgKiBEYXRlOiBKdW4uIDI3LCAyMDAyCisgKgorICovCisKKworI2lmbmRlZiBfX1dDVExfSF9fCisjZGVmaW5lIF9fV0NUTF9IX18KKworI2lmICFkZWZpbmVkKF9fVFRZUEVfSF9fKQorI2luY2x1ZGUgInR0eXBlLmgiCisjZW5kaWYKKyNpZiAhZGVmaW5lZChfX1RFVEhFUl9IX18pCisjaW5jbHVkZSAidGV0aGVyLmgiCisjZW5kaWYKKyNpZiAhZGVmaW5lZChfX0RFVklDRV9IX18pCisjaW5jbHVkZSAiZGV2aWNlLmgiCisjZW5kaWYKKworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgRGVmaW5pdGlvbnMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNkZWZpbmUgSVNfVFlQRV9EQVRBKHBNQUNIZWFkZXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgKCgoKFBTODAyXzExSGVhZGVyKSBwTUFDSGVhZGVyKS0+d0ZyYW1lQ3RsICYgVFlQRV84MDJfMTFfTUFTSykgPT0gVFlQRV84MDJfMTFfREFUQSkKKworI2RlZmluZSBJU19UWVBFX01HTVQocE1BQ0hlYWRlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAoKCgoUFM4MDJfMTFIZWFkZXIpIHBNQUNIZWFkZXIpLT53RnJhbWVDdGwgJiBUWVBFXzgwMl8xMV9NQVNLKSA9PSBUWVBFXzgwMl8xMV9NR01UKQorCisjZGVmaW5lIElTX1RZUEVfQ09OVFJPTChwTUFDSGVhZGVyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndGcmFtZUN0bCAmIFRZUEVfODAyXzExX01BU0spID09IFRZUEVfODAyXzExX0NUTCkKKworI2RlZmluZSBJU19GQ19NT1JFREFUQShwTUFDSGVhZGVyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAoKCgoUFM4MDJfMTFIZWFkZXIpIHBNQUNIZWFkZXIpLT53RnJhbWVDdGwgJiBGQ19NT1JFREFUQSkgPT0gRkNfTU9SRURBVEEpCisKKyNkZWZpbmUgSVNfRkNfUE9XRVJNR1QocE1BQ0hlYWRlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgKCgoKFBTODAyXzExSGVhZGVyKSBwTUFDSGVhZGVyKS0+d0ZyYW1lQ3RsICYgRkNfUE9XRVJNR1QpID09IEZDX1BPV0VSTUdUKQorCisjZGVmaW5lIElTX0ZDX1JFVFJZKHBNQUNIZWFkZXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndGcmFtZUN0bCAmIEZDX1JFVFJZKSA9PSBGQ19SRVRSWSkKKworI2RlZmluZSBJU19GQ19XRVAocE1BQ0hlYWRlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAoKCgoUFM4MDJfMTFIZWFkZXIpIHBNQUNIZWFkZXIpLT53RnJhbWVDdGwgJiBGQ19XRVApID09IEZDX1dFUCkKKworI2lmZGVmIF9fQklHX0VORElBTgorCisjZGVmaW5lIElTX0ZSQUdNRU5UX1BLVChwTUFDSGVhZGVyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKCgoUFM4MDJfMTFIZWFkZXIpIHBNQUNIZWFkZXIpLT53RnJhbWVDdGwgJiBGQ19NT1JFRlJBRykgIT0gMCkgfCAgICAgICAgICAgICAgICAgIFwKKyAgICAgKCgoKFBTODAyXzExSGVhZGVyKSBwTUFDSGVhZGVyKS0+d1NlcUN0bCAmIDB4MEYwMCkgIT0gMCkpCisKKyNkZWZpbmUgSVNfRklSU1RfRlJBR01FTlRfUEtUKHBNQUNIZWFkZXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgKCgoKFBTODAyXzExSGVhZGVyKSBwTUFDSGVhZGVyKS0+d1NlcUN0bCAmIDB4MEYwMCkgPT0gMCkKKworI2Vsc2UKKworI2RlZmluZSBJU19GUkFHTUVOVF9QS1QocE1BQ0hlYWRlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAoKCgoKFBTODAyXzExSGVhZGVyKSBwTUFDSGVhZGVyKS0+d0ZyYW1lQ3RsICYgRkNfTU9SRUZSQUcpICE9IDApIHwgICAgICAgICAgICAgICAgICBcCisgICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndTZXFDdGwgJiAweDAwMEYpICE9IDApKQorCisjZGVmaW5lIElTX0ZJUlNUX0ZSQUdNRU5UX1BLVChwTUFDSGVhZGVyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndTZXFDdGwgJiAweDAwMEYpID09IDApCisKKyNlbmRpZi8vI2lmZGVmIF9fQklHX0VORElBTgorCisjZGVmaW5lIElTX0xBU1RfRlJBR01FTlRfUEtUKHBNQUNIZWFkZXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndGcmFtZUN0bCAmIEZDX01PUkVGUkFHKSA9PSAwKQorCisjZGVmaW5lIElTX0NUTF9QU1BPTEwocE1BQ0hlYWRlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICgoKChQUzgwMl8xMUhlYWRlcikgcE1BQ0hlYWRlciktPndGcmFtZUN0bCAmIFRZUEVfU1VCVFlQRV9NQVNLKSA9PSBUWVBFX0NUTF9QU1BPTEwpCisKKworI2RlZmluZSBBRERfT05FX1dJVEhfV1JBUF9BUk9VTkQodVZhciwgdU1vZHVsbykgeyAgIFwKKyAgICBpZiAoKHVWYXIpID49ICgodU1vZHVsbykgLSAxKSkgICAgICAgICAgICAgICAgICBcCisgICAgICAgICh1VmFyKSA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgKHVWYXIpKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9CisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBDbGFzc2VzICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBWYXJpYWJsZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNpZmRlZiBfX2NwbHVzcGx1cworZXh0ZXJuICJDIiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEFzc3VtZSBDIGRlY2xhcmF0aW9ucyBmb3IgQysrICovCis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JRCwKKyAgICBJTiBQV0xBTl9JRV9TVVBQX1JBVEVTIHBDdXJyU3VwcFJhdGVzLAorICAgIElOIFBXTEFOX0lFX1NVUFBfUkFURVMgcEN1cnJFeHRTdXBwUmF0ZXMsCisgICAgSU4gQllURSBieVBIWVR5cGUKKyAgICApOworCisvLyByZWNlaXZlZCBzdGF0dXMKK3N0YXRpYworVk9JRAorc192TWdyTG9nU3RhdHVzKAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiBXT1JEIHdTdGF0dXMKKyAgICApOworCisKK3N0YXRpYworVk9JRAorc192TWdyU3luY2hCU1MgKAorICAgIElOIFBTRGV2aWNlICAgICAgcERldmljZSwKKyAgICBJTiBVSU5UICAgICAgICAgIHVCU1NNb2RlLAorICAgIElOIFBLbm93bkJTUyAgICAgcEN1cnIsCisgICAgT1VUIFBDTURfU1RBVFVTICBwU3RhdHVzCisgICAgKTsKKworCitzdGF0aWMgQk9PTAorc19iQ2lwaGVyTWF0Y2ggKAorICAgIElOIFBLbm93bkJTUyAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NOb2RlLAorICAgIElOIE5ESVNfODAyXzExX0VOQ1JZUFRJT05fU1RBVFVTICAgIEVuY1N0YXR1cywKKyAgICBPVVQgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlDQ1NQSywKKyAgICBPVVQgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlDQ1NHSworICAgICk7CisKKworIHN0YXRpYyBWT0lEICBFbmN5cHRpb25fUmVidWlsZCgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIFBLbm93bkJTUyBwQ3VycgorICk7CisvKgorc3RhdGljCitWT0lECitzX3ZQcm9iZUNoYW5uZWwoCisgICAgSU4gUFNEZXZpY2UgcERldmljZQorICAgICk7CisKK3N0YXRpYworVk9JRAorc192TGlzdGVuQ2hhbm5lbCgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlCis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sOworICAgIGZvcihpaT0wO2lpPFdMQU5fQlNTSURfTEVOO2lpKyspIHsKKyAgICAgICAgcE1nbXQtPmFieURlc2lyZUJTU0lEW2lpXSA9IDB4RkY7CisgICAgfQorICAgIHBNZ210LT5zQXNzb2NJbmZvLkFzc29jSW5mby5MZW5ndGggPSBzaXplb2YoTkRJU184MDJfMTFfQVNTT0NJQVRJT05fSU5GT1JNQVRJT04pOworICAgIC8vbWVtc2V0KHBNZ210LT5hYnlEZXNpcmVTU0lELCAwLCBXTEFOX0lFSERSX0xFTiArIFdMQU5fU1NJRF9NQVhMRU4gKzEpOworICAgIHBNZ210LT5ieUNTU1BLID0gS0VZX0NUTF9OT05FOworICAgIHBNZ210LT5ieUNTU0dLID0gS0VZX0NUTF9OT05FOworICAgIHBNZ210LT53SUJTU0JlYWNvblBlcmlvZCA9IERFRkFVTFRfSUJTU19CSTsKKyAgICBCU1N2Q2xlYXJCU1NMaXN0KChIQU5ETEUpcERldmljZSwgRkFMU0UpOworCisgICAgcmV0dXJuOworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgSW5pdGlhbGl6ZXMgdGltZXIgb2JqZWN0CisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTmRpc19zdGF1cy4KKyAqCistKi8KKwordm9pZAordk1nclRpbWVySW5pdCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKQoreworICAgIFBTRGV2aWNlICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCisKKyAgICBpbml0X3RpbWVyKCZwTWdtdC0+c1RpbWVyU2Vjb25kQ2FsbGJhY2spOworICAgIHBNZ210LT5zVGltZXJTZWNvbmRDYWxsYmFjay5kYXRhID0gKFVMT05HKXBEZXZpY2U7CisgICAgcE1nbXQtPnNUaW1lclNlY29uZENhbGx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LyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgIFJlc2V0IHRoZSBtYW5hZ2VtZW50IG9iamVjdCAgc3RydWN0dXJlLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JPYmplY3RSZXNldCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKQoreworICAgIFBTRGV2aWNlICAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU01nbXRPYmplY3QgICAgICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisKKyAgICBwTWdtdC0+ZUN1cnJNb2RlID0gV01BQ19NT0RFX1NUQU5EQlk7CisgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgcERldmljZS0+YkVuYWJsZVBTTW9kZSA9IEZBTFNFOworICAgIC8vIFRPRE86IHRpbWVyCisKKyAgICByZXR1cm47Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgIFN0YXJ0IHRoZSBzdGF0aW9uIGFzc29jaWF0aW9uIHByb2NlZHVyZS4gIE5hbWVseSwgc2VuZCBhbgorICogICAgYXNzb2NpYXRpb24gcmVxdWVzdCBmcmFtZSB0byB0aGUgQVAuCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworCitWT0lECit2TWdyQXNzb2NCZWdpblN0YSgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOICBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgT1VUIFBDTURfU1RBVFVTIHBTdGF0dXMKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgICAgICAgcERldmljZSA9IChQU0RldmljZSloRGV2aWNlQ29udGV4dDsKKyAgICBQU1R4TWdtdFBhY2tldCAgICAgICA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E9SVFNMT1RUSU1FKDEpOworICAgICAgICB9CisgICAgfSBlbHNlIGlmIChwTWdtdC0+ZUN1cnJlbnRQSFlNb2RlID09IFBIWV9UWVBFXzExQikgeworICAgICAgICBpZiAoQ0FSRGJJc1Nob3J0UHJlYW1ibGUocE1nbXQtPnBBZGFwdGVyKSA9PSBUUlVFKSB7CisgICAgICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvIHw9IFdMQU5fU0VUX0NBUF9JTkZPX1NIT1JUUFJFQU1CTEUoMSk7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHBNZ210LT5iMTFoRW5hYmxlID09IFRSVUUpCisgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8gfD0gV0xBTl9TRVRfQ0FQX0lORk9fU1BFQ1RSVU1NTkcoMSk7CisKKyAgICAvKiBidWlsZCBhbiBhc3NvY3JlcSBmcmFtZSBhbmQgc2VuZCBpdCAqLworICAgIHBUeFBhY2tldCA9IHNfTWdyTWFrZUFzc29jUmVxdWVzdAorICAgICAgICAgICAgICAgICgKKyAgICAgICAgICAgICAgICAgIHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICBwTWdtdCwKKyAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSUQsCisgICAgICAgICAgICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvLAorICAgICAgICAgICAgICAgICAgcE1nbXQtPndMaXN0ZW5JbnRlcnZhbCwKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRCwKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJFeHRTdXBwUmF0ZXMKKyAgICAgICAgICAgICAgICApOworCisgICAgaWYgKHBUeFBhY2tldCAhPSBOVUxMICl7CisgICAgICAgIC8qIHNlbmQgdGhlIGZyYW1lICovCisgICAgICAgICpwU3RhdHVzID0gY3NNZ210X3htaXQocERldmljZSwgcFR4UGFja2V0KTsKKyAgICAgICAgaWYgKCpwU3RhdHVzID09IENNRF9TVEFUVVNfUEVORElORykgeworICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0FTU09DUEVORElORzsKKyAgICAgICAgICAgICpwU3RhdHVzID0gQ01EX1NUQVRVU19TVUNDRVNTOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UKKyAgICAgICAgKnBTdGF0dXMgPSBDTURfU1RBVFVTX1JFU09VUkNFUzsKKworICAgIHJldHVybiA7Cit9CisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgIFN0YXJ0IHRoZSBzdGF0aW9uIHJlLWFzc29jaWF0aW9uIHByb2NlZHVyZS4KKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitWT0lECit2TWdyUmVBc3NvY0JlZ2luU3RhKAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBPVVQgUENNRF9TVEFUVVMgcFN0YXR1cworICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworICAgIFBTVHhNZ210UGFja2V0ICAgICAgICAgIHBUeFBhY2tldDsKKworCisKKyAgICBwTWdtdC0+d0N1cnJDYXBJbmZvID0gMDsKKyAgICBwTWdtdC0+d0N1cnJDYXBJbmZvIHw9IFdMQU5fU0VUX0NBUF9JTkZPX0VTUygxKTsKKyAgICBpZiAocERldmljZS0+YkVuY3J5cHRpb25FbmFibGUpIHsKKyAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbyB8PSBXTEFOX1NFVF9DQVBfSU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xKTsKKyAgICAgICAgfQorICAgIH0KKyAgICBpZiAocE1nbXQtPmIxMWhFbmFibGUgPT0gVFJVRSkKKyAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbyB8PSBXTEFOX1NFVF9DQVBfSU5GT19TUEVDVFJVTU1ORygxKTsKKworCisgICAgcFR4UGFja2V0ID0gc19NZ3JNYWtlUmVBc3NvY1JlcXVlc3QKKyAgICAgICAgICAgICAgICAoCisgICAgICAgICAgICAgICAgICBwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lELAorICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbywKKyAgICAgICAgICAgICAgICAgIHBNZ210LT53TGlzdGVuSW50ZXJ2YWwsCisgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5Q3VyclNTSUQsCisgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzCisgICAgICAgICAgICAgICAgKTsKKworICAgIGlmIChwVHhQYWNrZXQgIT0gTlVMTCApeworICAgICAgICAvKiBzZW5kIHRoZSBmcmFtZSAqLworICAgICAgICAqcFN0YXR1cyA9IGNzTWdtdF94bWl0KHBEZXZpY2UsIHBUeFBhY2tldCk7CisgICAgICAgIGlmICgqcFN0YXR1cyAhPSBDTURfU1RBVFVTX1BFTkRJTkcpIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIk1ndDpSZWFzc29jaWF0aW9uIHR4IGZhaWxlZC5cbiIpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OlJlYXNzb2NpYXRpb24gdHggc2VuZGluZy5cbiIpOworICAgICAgICB9CisgICAgfQorCisKKyAgICByZXR1cm4gOworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICAgU2VuZCBhbiBkaXMtYXNzb2NpYXRpb24gcmVxdWVzdCBmcmFtZSB0byB0aGUgQVAuCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgTm9uZS4KKyAqCistKi8KKworVk9JRAordk1nckRpc2Fzc29jQmVnaW5TdGEoCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiAgUFNNZ210T2JqZWN0IHBNZ210LAorICAgIElOICBQQllURSAgYWJ5RGVzdEFkZHJlc3MsCisgICAgSU4gIFdPUkQgICAgd1JlYXNvbiwKKyAgICBPVVQgUENNRF9TVEFUVVMgcFN0YXR1cworICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNUeE1nbXRQYWNrZXQgICAgICBwVHhQYWNrZXQgPSBOVUxMOworICAgIFdMQU5fRlJfRElTQVNTT0MgICAgc0ZyYW1lOworCisgICAgcFR4UGFja2V0ID0gKFBTVHhNZ210UGFja2V0KXBNZ210LT5wYnlNZ210UGFja2V0UG9vbDsKKyAgICBtZW1zZXQocFR4UGFja2V0LCAwLCBzaXplb2YoU1R4TWdtdFBhY2tldCkgKyBXTEFOX0RJU0FTU09DX0ZSX01BWExFTik7CisgICAgcFR4UGFja2V0LT5wODAyMTFIZWFkZXIgPSAoUFVXTEFOXzgwMjExSERSKSgoUEJZVEUpcFR4UGFja2V0ICsgc2l6ZW9mKFNUeE1nbXRQYWNrZXQpKTsKKworICAgIC8vIFNldHVwIHRoZSBzRnJhbWUgc3RydWN0dXJlCisgICAgc0ZyYW1lLnBCdW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YWNrZXQpOworICAgIGlmICgqcFN0YXR1cyA9PSBDTURfU1RBVFVTX1BFTkRJTkcpIHsKKyAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgICpwU3RhdHVzID0gQ01EX1NUQVRVU19TVUNDRVNTOworICAgIH07CisKKyAgICByZXR1cm47Cit9CisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOihBUCBmdW5jdGlvbikKKyAqICAgIEhhbmRsZSBpbmNvbWluZyBzdGF0aW9uIGFzc29jaWF0aW9uIHJlcXVlc3QgZnJhbWVzLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyUnhBc3NvY1JlcXVlc3QoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUFNSeE1nbXRQYWNrZXQgcFJ4UGFja2V0LAorICAgIElOIFVJTlQgdU5vZGVJbmRleAorICAgICkKK3sKKyAgICBXTEFOX0ZSX0FTU09DUkVRICAgIHNGcmFtZTsKKyAgICBDTURfU1RBVFVTICAgICAgICAgIFN0YXR1czsKKyAgICBQU1R4TWdtdFBhY2tldCAgICAgIHBUeFBhY2tldDsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdBc3NvY1N0YXR1cyA9IDA7CisgICAgV09SRCAgICAgICAgICAgICAgICB3QXNzb2NBSUQgPSAwOworICAgIFVJTlQgICAgICAgICAgICAgICAgdVJhdGVMZW4gPSBXTEFOX1JBVEVTX01BWExFTjsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGFieUN1cnJTdXBwUmF0ZXNbV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1JBVEVTX01BWExFTiArIDFdOworICAgIEJZVEUgICAgICAgICAgICAgICAgYWJ5Q3VyckV4dFN1cHBSYXRlc1tXTEFOX0lFS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QVRFUylzRnJhbWUucEV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKWFieUN1cnJFeHRTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1UmF0ZUxlbik7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBhYnlDdXJyRXh0U3VwcFJhdGVzWzFdID0gMDsKKyAgICAgICAgfQorCisKKyAgICAgICAgUkFURXZQYXJzZU1heFJhdGUoKFBWT0lEKXBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylhYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpYWJ5Q3VyckV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEZBTFNFLCAvLyBkbyBub3QgY2hhbmdlIG91ciBiYXNpYyByYXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heEJhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heFN1cHBSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmJ5VG9wQ0NLQmFzaWNSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5ieVRvcE9GRE1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bXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53TWF4U3VwcFJhdGUgPiBSQVRFXzExTSkKKyAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iRVJQRXhpc3QgPSBUUlVFOworCisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndNYXhTdXBwUmF0ZSA8PSBSQVRFXzExTSkgeworICAgICAgICAgICAgLy8gQiBvbmx5IFNUQSBqb2luCisgICAgICAgICAgICBwRGV2aWNlLT5iUHJvdGVjdE1vZGUgPSBUUlVFOworICAgICAgICAgICAgcERldmljZS0+Yk5vbkVSUFByZXNlbnQgPSBUUlVFOworICAgICAgICB9CisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmJTaG9ydFByZWFtYmxlID09IEZBTFNFKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5iQmFya2VyUHJlYW1ibGVNZCA9IFRSVUU7CisgICAgICAgIH0KKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9JTkZPLCBLRVJOX0lORk8gIkFzc29jaWF0ZSBBSUQ9ICVkIFxuIiwgd0Fzc29jQUlEKTsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfSU5GTywgS0VSTl9JTkZPICJNQUM9JTIuMlg6JTIuMlg6JTIuMlg6JTIuMlg6JTIuMlg6JTIuMlggXG4iLAorICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbMF0sCisgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMlsxXSwKKyAgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzJdLAorICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbM10sCisgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMls0XSwKKyAgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzVdCisgICAgICAgICAgICAgICAgICApIDsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfSU5GTywgS0VSTl9JTkZPICJNYXggU3VwcG9ydCByYXRlID0gJWQgXG4iLAorICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heFN1cHBSYXRlKTsKKyAgICB9Ly9lbHNlIHsgVE9ETzogcmVjZWl2ZWQgU1RBIHVuZGVyIHN0YXRlMSBoYW5kbGUgfQorICAgIGVsc2UgeworICAgICAgICByZXR1cm47CisgICAgfQorCisKKyAgICAvLyBhc3NvYyByZXNwb25zZSByZXBseS4uCisgICAgcFR4UGFja2V0ID0gc19NZ3JNYWtlQXNzb2NSZXNwb25zZQorICAgICAgICAgICAgICAgICgKKyAgICAgICAgICAgICAgICAgIHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICBwTWdtdCwKKyAgICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8sCisgICAgICAgICAgICAgICAgICB3QXNzb2NTdGF0dXMsCisgICAgICAgICAgICAgICAgICB3QXNzb2NBSUQsCisgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyLAorICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcworICAgICAgICAgICAgICAgICk7CisgICAgaWYgKHBUeFBhY2tldCAhPSBOVUxMICl7CisKKyAgICAgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0YXBkKSB7CisgICAgICAgICAgICByZXR1cm47CisgICAgICAgIH0KKyAgICAgICAgLyogc2VuZCB0aGUgZnJhbWUgKi8KKyAgICAgICAgU3RhdHVzID0gY3NNZ210X3htaXQocERldmljZSwgcFR4UGFja2V0KTsKKyAgICAgICAgaWYgKFN0YXR1cyAhPSBDTURfU1RBVFVTX1BFTkRJTkcpIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIk1ndDpBc3NvYyByZXNwb25zZSB0eCBmYWlsZWRcbiIpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OkFzc29jIHJlc3BvbnNlIHR4IHNlbmRpbmcuLlxuIik7CisgICAgICAgIH0KKworICAgIH0KKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjooQVAgZnVuY3Rpb24pCisgKiAgICAgIEhhbmRsZSBpbmNvbWluZyBzdGF0aW9uIHJlLWFzc29jaWF0aW9uIHJlcXVlc3QgZnJhbWVzLgorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBNZ210ICAgICAgICAgICAtIE1hbmFnZW1lbnQgT2JqZWN0IHN0cnVjdHVyZQorICogICAgICBwUnhQYWNrZXQgICAgICAgLSBSZWNlaXZlZCBQYWNrZXQKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IE5vbmUuCisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyUnhSZUFzc29jUmVxdWVzdCgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiBQU1J4TWdtdFBhY2tldCBwUnhQYWNrZXQsCisgICAgSU4gVUlOVCB1Tm9kZUluZGV4CisgICAgKQoreworICAgIFdMQU5fRlJfUkVBU1NPQ1JF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VJhdGVMZW4pOworICAgICAgICBhYnlDdXJyRXh0U3VwcFJhdGVzWzBdID0gV0xBTl9FSURfRVhUU1VQUF9SQVRFUzsKKyAgICAgICAgaWYgKHBEZXZpY2UtPmVDdXJyZW50UEhZVHlwZSA9PSBQSFlfVFlQRV8xMUcpIHsKKyAgICAgICAgICAgIGFieUN1cnJFeHRTdXBwUmF0ZXNbMV0gPSBSQVRFdVNldElFKChQV0xBTl9JRV9TVVBQX1JBVEVTKXNGcmFtZS5wRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpYWJ5Q3VyckV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVSYXRlTGVuKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGFieUN1cnJFeHRTdXBwUmF0ZXNbMV0gPSAwOworICAgICAgICB9CisKKworICAgICAgICBSQVRFdlBhcnNlTWF4UmF0ZSgoUFZPSUQpcERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpYWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpYWJ5Q3VyckV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEZBTFNFLCAvLyBkbyBub3QgY2hhbmdlIG91ciBiYXNpYyByYXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heEJhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heFN1cHBSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIC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ICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndBSUQgPSAoV09SRCl1Tm9kZUluZGV4OworICAgICAgICB3QXNzb2NTdGF0dXMgPSBXTEFOX01HTVRfU1RBVFVTX1NVQ0NFU1M7CisgICAgICAgIHdBc3NvY0FJRCA9IChXT1JEKXVOb2RlSW5kZXg7CisKKyAgICAgICAgLy8gaWYgc3VwcHVydCBFUlAKKyAgICAgICAgaWYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53TWF4U3VwcFJhdGUgPiBSQVRFXzExTSkKKyAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iRVJQRXhpc3QgPSBUUlVFOworCisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndNYXhTdXBwUmF0ZSA8PSBSQVRFXzExTSkgeworICAgICAgICAgICAgLy8gQiBvbmx5IFNUQSBqb2luCisgICAgICAgICAgICBwRGV2aWNlLT5iUHJvdGVjdE1vZGUgPSBUUlVFOworICAgICAgICAgICAgcERldmljZS0+Yk5vbkVSUFByZXNlbnQgPSBUUlVFOworICAgICAgICB9CisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmJTaG9ydFByZWFtYmxlID09IEZBTFNFKSB7CisgICAgICAgICAgICBwRGV2aWNlLT5iQmFya2VyUHJlYW1ibGVNZCA9IFRSVUU7CisgICAgICAgIH0KKworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9JTkZPLCBLRVJOX0lORk8gIlJ4IFJlQXNzb2NpYXRlIEFJRD0gJWQgXG4iLCB3QXNzb2NBSUQpOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9JTkZPLCBLRVJOX0lORk8gIk1BQz0lMi4yWDolMi4yWDolMi4yWDolMi4yWDolMi4yWDolMi4yWCBcbiIsCisgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMlswXSwKKyAgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzFdLAorICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbMl0sCisgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMlszXSwKKyAgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzRdLAorICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbNV0KKyAgICAgICAgICAgICAgICAgICkgOworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9JTkZPLCBLRVJOX0lORk8gIk1heCBTdXBwb3J0IHJhdGUgPSAlZCBcbiIsCisgICAgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53TWF4U3VwcFJhdGUpOworCisgICAgfQorCisKKyAgICAvLyBhc3NvYyByZXNwb25zZSByZXBseS4uCisgICAgcFR4UGFja2V0ID0gc19NZ3JNYWtlUmVBc3NvY1Jlc3BvbnNlCisgICAgICAgICAgICAgICAgKAorICAgICAgICAgICAgICAgICAgcERldmljZSwKKyAgICAgICAgICAgICAgICAgIHBNZ210LAorICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbywKKyAgICAgICAgICAgICAgICAgIHdBc3NvY1N0YXR1cywKKyAgICAgICAgICAgICAgICAgIHdBc3NvY0FJRCwKKyAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjIsCisgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzCisgICAgICAgICAgICAgICAgKTsKKworICAgIGlmIChwVHhQYWNrZXQgIT0gTlVMTCApeworICAgICAgICAvKiBzZW5kIHRoZSBmcmFtZSAqLworICAgICAgICBpZiAocERldmljZS0+YkVuYWJsZUhvc3RhcGQpIHsKKyAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorICAgICAgICBTdGF0dXMgPSBjc01nbXRfeG1pdChwRGV2aWNlLCBwVHhQYWNrZXQpOworICAgICAgICBpZiAoU3RhdHVzICE9IENNRF9TVEFUVVNfUEVORElORykgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OlJlQXNzb2MgcmVzcG9uc2UgdHggZmFpbGVkXG4iKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIk1ndDpSZUFzc29jIHJlc3BvbnNlIHR4IHNlbmRpbmcuLlxuIik7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuOworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgICBIYW5kbGUgaW5jb21pbmcgYXNzb2NpYXRpb24gcmVzcG9uc2UgZnJhbWVzLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyUnhBc3NvY1Jlc3BvbnNlKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gUFNNZ210T2JqZWN0IHBNZ210LAorICAgIElOIFBTUnhNZ210UGFja2V0IHBSeFBhY2tldCwKKyAgICBJTiBCT09MIGJSZUFzc29jVHlwZQorICAgICkKK3sKKyAgICBXTEFOX0ZSX0FTU09DUkVTUCAgIHNGcmFtZTsKKyAgICBQV0xBTl9JRV9TU0lEICAgcEl0Z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+c0Fzc29jSW5mby5Bc3NvY0luZm8uUmVxdWVzdElFTGVuZ3RoKSkgeyAgICAvL2RhdGEgcm9vbSBub3QgZW5vdWdoCisgICAgICAgICAgICAgICAgICAgICBkZXZfa2ZyZWVfc2tiKHBEZXZpY2UtPnNrYik7CisJCSAgIHBEZXZpY2UtPnNrYiA9IGRldl9hbGxvY19za2IoKGludClwRGV2aWNlLT5yeF9idWZfc3opOworCSAgICAgICAJfQorICAgICAgICAgICAgICAgIHdwYWhkciA9ICh2aWF3Z2V0X3dwYV9oZWFkZXIgKilwRGV2aWNlLT5za2ItPmRhdGE7CisgICAgICAgICAgICAgICAgd3BhaGRyLT50eXBlID0gVklBV0dFVF9BU1NPQ19NU0c7CisgICAgICAgICAgICAgICAgd3BhaGRyLT5yZXNwX2llX2xlbiA9IHBNZ210LT5zQXNzb2NJbmZvLkFzc29jSW5mby5SZXNwb25zZUlFTGVuZ3RoOworICAgICAgICAgICAgICAgIHdwYWhkci0+cmVxX2llX2xlbiA9IHBNZ210LT5zQXNzb2NJbmZvLkFzc29jSW5mby5SZXF1ZXN0SUVMZW5ndGg7CisgICAgICAgICAgICAgICAgbWVtY3B5KHBEZXZpY2UtPnNrYi0+ZGF0YSArIHNpemVvZih2aWF3Z2V0X3dwYV9oZWFkZXIpLCBwTWdtdC0+c0Fzc29jSW5mby5hYnlJRXMsIHdwYWhkci0+cmVxX2llX2xlbik7CisgICAgICAgICAgICAgICAgbWVtY3B5KHBEZXZpY2UtPnNrYi0+ZGF0YSArIHNpemVvZih2aWF3Z2V0X3dwYV9oZWFkZXIpICsgd3BhaGRyLT5yZXFfaWVfbGVuLAorICAgICAgICAgICAgICAgICAgICAgICBwYnlJRXMsCisgICAgICAgICAgICAgICAgICAgICAgIHdwYWhkci0+cmVzcF9pZV9sZW4KKyAgICAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgICAgICBza2JfcHV0KHBEZXZpY2UtPnNrYiwgc2l6ZW9mKHZpYXdnZXRfd3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eXBlKSB7CisgICAgICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBqdW1wIGJhY2sgdG8gdGhlIGF1dGggc3RhdGUgYW5kIGluZGljYXRlIHRoZSBlcnJvcgorICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9BVVRIOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc192TWdyTG9nU3RhdHVzKHBNZ210LGNwdV90b19sZTE2KCgqKHNGcmFtZS5wd1N0YXR1cykpKSk7CisgICAgICAgIH0KKworICAgIH0KKworI2lmZGVmIFdQQV9TVVBQTElDQU5UX0RSSVZFUl9XRVhUX1NVUFBPUlQKKy8vbmVlZCBjbGVhciBmbGFncyByZWxhdGVkIHRvIE5ldHdvcmttYW5hZ2VyCisKKyAgICAgICAgICAgICAgcERldmljZS0+YndleHRjb3VudCA9IDA7CisgICAgICAgICAgICAgIHBEZXZpY2UtPmJXUEFTdXBwV2V4dEVuYWJsZWQgPSBGQUxTRTsKKyNlbmRpZgorCisKK2lmKHBNZ210LT5lQ3VyclN0YXRlID09IFdNQUNfU1RBVEVfQVNTT0MpCisgICAgICB0aW1lcl9leHBpcmUocERldmljZS0+c1RpbWVyQ29tbWFuZCwgMCk7CisgICAgcmV0dXJuOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICAgIFN0YXJ0IHRoZSBzdGF0aW9uIGF1dGhlbnRpY2F0aW9uIHByb2NlZHVyZS4gIE5hbWVseSwgc2VuZCBhbgorICogICAgYXV0aGVudGljYXRpb24gZnJhbWUgdG8gdGhlIEFQLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK1ZPSUQKK3ZNZ3JBdXRoZW5CZWdpblN0YSgKKyAgICBJTiAgS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zRnJhbWUpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgIC8vQVAgZnVuY2l0b24KKyAgICAgICAgICAgIHNfdk1nclJ4QXV0aGVuU2VxdWVuY2VfMyhwRGV2aWNlLCBwTWdtdCwgJnNGcmFtZSk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSA0OgorICAgICAgICAgICAgc192TWdyUnhBdXRoZW5TZXF1ZW5jZV80KHBEZXZpY2UsIHBNZ210LCAmc0ZyYW1lKTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiQXV0aCBTZXF1ZW5jZSBlcnJvciwgc2VxID0gJWRcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICBjcHVfdG9fbGUxNigoKihzRnJhbWUucHdBdXRoU2VxdWVuY2UpKSkpOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIHJldHVybjsKK30KKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgIEhhbmRsZXMgaW5jb21pbmcgYXV0aGVuIGZyYW1lcyB3aXRoIHNlcXVlbmNlIDEuICBDdXJyZW50bHkKKyAqICAgYXNzdW1lcyB3ZSdyZSBhbiBBUC4gIFNvIGZhciwgbm8gb25lIGFwcGVhcnMgdG8gdXNlIGF1dGhlbnRpY2F0aW9uCisgKiAgIGluIEFkLUhvYyBtb2RlLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKKworc3RhdGljCitWT0lECitzX3ZNZ3JSeEF1dGhlblNlcXVlbmNlXzEoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUFdMQU5fRlJfQVVUSEVOIHBGcmFtZQorICAgICApCit7Cis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FQlVHLCBLRVJOX0lORk8gIk1ndDpBdXRocmVxX3JlcGx5IHNlcXVlbmNlXzEgdHguLiBcbiIpOworICAgIGlmIChjc01nbXRfeG1pdChwRGV2aWNlLCBwVHhQYWNrZXQpICE9IENNRF9TVEFUVVNfUEVORElORykgeworICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJNZ3Q6QXV0aHJlcV9yZXBseSBzZXF1ZW5jZV8xIHR4IGZhaWxlZC5cbiIpOworICAgIH0KKyAgICByZXR1cm47Cit9CisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICBIYW5kbGVzIGluY29taW5nIGF1dGggZnJhbWVzIHdpdGggc2VxdWVuY2UgbnVtYmVyIDIuICBDdXJyZW50bHkKKyAqICAgYXNzdW1lcyB3ZSdyZSBhIHN0YXRpb24uCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyUnhBdXRoZW5TZXF1ZW5jZV8yKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gUFNNZ210T2JqZWN0IHBNZ210LAorICAgIElOIFBXTEFOX0ZSX0FVVEhFTiBwRnJhbWUKKyAgICApCit7CisgICAgV0xBTl9GUl9BVVRIRU4gICAgICBzRnJhbWU7CisgICAgUFNUeE1nbXRQYWNrZXQgICAgICBwVHhQYWNrZXQgPSBOVUxMOworCisKKyAgICBzd2l0Y2ggKGNwdV90b19sZTE2KCgqKHBGcmFtZS0+cHdBdXRoQWxnb3JpdGhtKSkpKQorICAgIHsKKyAgICAgICAgY2FzZSBXTEFOX0FVVEhfQUxHX09QRU5TWVNURU06CisgICAgICAgICAgICBpZiAoIGNwdV90b19sZTE2KCgqKHBGcmFtZS0+cHdTdGF0dXMpKSkgPT0gV0xBTl9NR01UX1NUQVRVU19TVUNDRVNTICl7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfSU5GTywgS0VSTl9JTkZPICI4MDIuMTEgQXV0aGVuIChPUEVOKSBTdWNjZXNzZnVsLlxuIik7CisgICAgICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0FVVEg7CisJIHRpbWVyX2V4cGlyZShwRGV2aWNlLT5zVGltZXJDb21tYW5kLCAwKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0lORk8sIEtFUk5fSU5GTyAiODAyLjExIEF1dGhlbiAoT1BFTikgRmFpbGVkLlxuIik7CisgICAgICAgICAgICAgICAgc192TWdyTG9nU3RhdHVzKHBNZ210LCBjcHVfdG9fbGUxNigoKihwRnJhbWUtPnB3U3RhdHVzKSkpKTsKKyAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfSURMRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmIChwRGV2aWNlLT5lQ29tbWFuZFN0YXRlID09IFdMQU5fQVVUSEVOVElDQVRFX1dBSVQgKSB7CisvLyAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworLy8gICAgICAgICAgICAgICAgdkNvbW1hbmRUaW1lcldhaXQoKEhBTkRMRSlwRGV2aWNlLCAwKTsKKy8vICAgICAgICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fQVVUSF9BTEdfU0hBUkVES0VZOgorCisgICAgICAgICAgICBpZiAoY3B1X3RvX2xlMTYoKCoocEZyYW1lLT5wd1N0YXR1cykpKSA9PSBXTEFOX01HTVRfU1RBVFVTX1NVQ0NFU1MpIHsKKyAgICAgICAgICAgICAgICBwVHhQYWNrZXQgPSAoUFNUeE1nbXRQYWNrZXQpcE1nbXQtPnBieU1nbXRQYWNrZXRQb29sOworICAgICAgICAgICAgICAgIG1lbXNldChwVHhQYWNrZXQsIDAsIHNpemVvZihTVHhNZ210UGFja2V0KSArIFdMQU5fQVVUSEVOX0ZSX01BWExFTik7CisgICAgICAgICAgICAgICAgcFR4UGFja2V0LT5wODAyMTFIZWFkZXIgPSAoUFVXTEFOXzgwMjExSERSKSgoUEJZVEUpcFR4UGFja2V0ICsgc2l6ZW9mKFNUeE1nbXRQYWNrZXQpKTsKKyAgICAgICAgICAgICAgICBzRnJhbWUucEJ1ZiA9IChQQllURSlwVHhQYWNrZXQtPnA4MDIxMUhlYWRlcjsKKyAgICAgICAgICAgICAgICBzRnJhbWUubGVuID0gV0xBTl9BVVRIRU5fRlJfTUFYTEVOOworICAgICAgICAgICAgICAgIC8vIGZvcm1hdCBidWZmZXIgc3RydWN0dXJlCisgICAgICAgICAgICAgICAgdk1nckVuY29kZUF1dGhlbigmc0ZyYW1lKTsKKyAgICAgICAgICAgICAgICAvLyBpbnNlcnQgdmFsdWVzCisgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy53RnJhbWVDdGwgPSBjcHVfdG9fbGUxNigKKyAgICAgICAgICAgICAgICAgICAgICgKKyAgICAgICAgICAgICAgICAgICAgIFdMQU5fU0VUX0ZDX0ZUWVBFKFdMQU5fVFlQRV9NR1IpIHwKKyAgICAgICAgICAgICAgICAgICAgIFdMQU5fU0VUX0ZDX0ZTVFlQRShXTEFOX0ZTVFlQRV9BVVRIRU4pfAorICAgICAgICAgICAgICAgICAgICAgV0xBTl9TRVRfRkNfSVNXRVAoMSkKKyAgICAgICAgICAgICAgICAgICAgICkpOworICAgICAgICAgICAgICAgIG1lbWNweSggc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMSwgcE1nbXQtPmFieUN1cnJCU1NJRCwgV0xBTl9CU1NJRF9MRU4pOworICAgICAgICAgICAgICAgI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+Y2JNUERVTGVuID0gc0ZyYW1lLmxlbjsKKyAgICAgICAgICAgICAgICBwVHhQYWNrZXQtPmNiUGF5bG9hZExlbiA9IHNGcmFtZS5sZW4gLSBXTEFOX0hEUl9BRERSM19MRU47CisgICAgICAgICAgICAgICAgLy8gc2VuZCB0aGUgZnJhbWUKKyAgICAgICAgICAgICAgICBpZiAoY3NNZ210X3htaXQocERldmljZSwgcFR4UGFja2V0KSAhPSBDTURfU1RBVFVTX1BFTkRJTkcpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OkF1dGhfcmVwbHkgc2VxdWVuY2VfMiB0eCBmYWlsZWQuXG4iKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OkF1dGhfcmVwbHkgc2VxdWVuY2VfMiB0eCAuLi5cbiIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAJREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OnJ4IEF1dGhfcmVwbHkgc2VxdWVuY2VfMiBzdGF0dXMgZXJyb3IgLi4uXG4iKTsKKyAgICAgICAgICAgICAgICBpZiAoIHBEZXZpY2UtPmVDb21tYW5kU3RhdGUgPT0gV0xBTl9BVVRIRU5USUNBVEVfV0FJVCApIHsKKy8vICAgICAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworLy8gICAgICAgICAgICAgICAgICAgIHZDb21tYW5kVGltZXJXYWl0KChIQU5ETEUpcERldmljZSwgMCk7CisvLyAgICAgICAgICAgICAgICAgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIHNfdk1nckxvZ1N0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WVyV2FpdCgoSEFORExFKXBEZXZpY2UsIDApOworLy8gICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgIH0KKworfQorCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICBIYW5kbGVzIGluY29taW5nIGRpc2Fzc29jaWF0aW9uIGZyYW1lcworICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitzdGF0aWMKK1ZPSUQKK3Nfdk1nclJ4RGlzYXNzb2NpYXRpb24oCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUFNSeE1nbXRQYWNrZXQgcFJ4UGFja2V0CisgICAgKQoreworICAgIFdMQU5fRlJfRElTQVNTT0MgICAgc0ZyYW1lOworICAgIFVJTlQgICAgICAgIHVOb2RlSW5kZXggPSAwOworLy8gICAgQ01EX1NUQVRVUyAgICAgICAgICBDbWRTdGF0dXM7CisgICAgdmlhd2dldF93cGFfaGVhZGVyICp3cGFoZHI7CisKKyAgICBpZiAoIHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCApeworICAgICAgICAvLyBpZiBpcyBhY3RpbmcgYW4gQVAuLgorICAgICAgICAvLyBhIFNUQSBpcyBsZWF2aW5nIHRoaXMgQlNTLi4KKyAgICAgICAgc0ZyYW1lLmxlbiA9IHBSeFBhY2tldC0+Y2JNUERVTGVuOworICAgICAgICBzRnJhbWUucEJ1ZiA9IChQQllURSlwUnhQYWNrZXQtPnA4MDIxMUhlYWRlcjsKKyAgICAgICAgaWYgKEJTU0RCYklzU1RBSW5Ob2RlREIocE1nbXQsIHBSeFBhY2tldC0+cDgwMjExSGVhZGVyLT5zQTMuYWJ5QWRkcjIsICZ1Tm9kZUluZGV4KSkgeworICAgICAgICAgICAgQlNTdlJlbW92ZU9uZU5vZGUocERldmljZSwgdU5vZGVJbmRleCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJSeCBkaXNhc3NvYywgc3RhIG5vdCBmb3VuZFxuIik7CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX1NUQSApeworICAgICAgICBzRnJhbWUubGVuID0gcFJ4UGFja2V0LT5jYk1QRFVMZW47CisgICAgICAgIHNGcmFtZS5wQnVmID0gKFBCWVRFKXBSeFBhY2tldC0+cDgwMjExSGVhZGVyOworICAgICAgICB2TWdyRGVjb2RlRGlzYXNzb2NpYXRpb24oJnNGcmFtZSk7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJBUCBkaXNhc3NvY2lhdGVkIG1lLCByZWFzb249JWQuXG4iLCBjcHVfdG9fbGUxNigqKHNGcmFtZS5wd1JlYXNvbikpKTsKKyAgICAgICAgLy9UT0RPOiBkbyBzb21ldGhpbmcgbGV0IHVwcGVyIGxheWVyIGtub3cgb3IKKyAgICAgICAgLy90cnkgdG8gc2VuZCBhc3NvY2lhdGUgcGFja2V0IGFnYWluIGJlY2F1c2Ugb2YgaW5hY3Rpdml0eSB0aW1lb3V0CisgICAgICAvLyAgaWYgKHBNZ210LT5lQ3VyclN0YXRlID09IFdNQUNfU1RBVEVfQVNTT0MpIHsKKyAgICAgICAvLyAgICAgdk1nclJlQXNzb2NCZWdpblN0YSgoUFNEZXZpY2UpcERldmljZSwgcE1nbXQsICZDbWRTdGF0dXMpOworICAgICAgLy8gIH07CisgICAgICAgIGlmICgocERldmljZS0+YldQQURFVlVwKSAmJiAocERldmljZS0+c2tiICE9IE5VTEwpKSB7CisgICAgICAgICAgICAgd3BhaGRyID0gKHZpYXdnZXRfd3BhX2hlYWRlciAqKXBEZXZpY2UtPnNrYi0+ZGF0YTsKKyAgICAgICAgICAgICB3cGFoZHItPnR5cGUgPSBWSUFXR0VUX0RJU0FTU09DX01TRzsKKyAgICAgICAgICAgICB3cGFoZHItPnJlc3BfaWVfbGVuID0gMDsKKyAgICAgICAgICAgICB3cGFoZHItPnJlcV9pZV9sZW4gPSAwOworICAgICAgICAgICAgIHNrYl9wdXQocERldmljZS0+c2tiLCBzaXplb2Yodmlhd2dldF93cGFfaGVhZGVyKSk7CisgICAgICAgICAgICAgcERldmljZS0+c2tiLT5kZXYgPSBwRGV2aWNlLT53cGFkZXY7CisJICAgICAgICAgcERldmljZS0+c2tiLT5tYWNfaGVhZGVyID0gcERldmljZS0+c2tiLT5kYXRhOworCisgICAgICAgICAgICAgcERldmljZS0+c2tiLT5wa3RfdHlwZSA9IFBBQ0tFVF9IT1NUOworICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+cHJvdG9jb2wgPSBodG9ucyhFVEhfUF84MDJfMik7CisgICAgICAgICAgICAgbWVtc2V0KHBEZXZpY2UtPnNrYi0+Y2IsIDAsIHNpemVvZihwRGV2aWNlLT5za2ItPmNiKSk7CisgICAgICAgICAgICAgbmV0aWZfcngocERldmljZS0+c2tiKTsKKyAgICAgICAgICAgICBwRGV2aWNlLT5za2IgPSBkZXZfYWxsb2Nfc2tiKChpbnQpcERldmljZS0+cnhfYnVmX3N6KTsKKyAgICAgICAgIH07CisKKyAjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorICAvLyBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09IFRSVUUpCisgICAgICB7CisJdW5pb24gaXdyZXFfZGF0YSAgd3JxdTsKKwltZW1zZXQoJndycXUsIDAsIHNpemVvZiAod3JxdSkpOworICAgICAgICB3cnF1LmFwX2FkZHIuc2FfZmFtaWx5ID0gQVJQSFJEX0VUSEVSOworCXByaW50aygid2lyZWxlc3Nfc2VuZF9ldmVudC0tLT5TSU9DR0lXQVAoZGlzYXNzb2NpYXRlZClcbiIpOworCXdpcmVsZXNzX3NlbmRfZXZlbnQocERldmljZS0+ZGV2LCBTSU9DR0lXQVAsICZ3cnF1LCBOVUxMKTsKKyAgICAgfQorICAjZW5kaWYKKworICAgIH0KKyAgICAvKiBlbHNlLCBpZ25vcmUgaXQgKi8KKworICAgIHJldHVybjsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICBIYW5kbGVzIGluY29taW5nIGRlYXV0aGVudGljYXRpb24gZnJhbWVzCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIE5vbmUuCisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyUnhEZWF1dGhlbnRpY2F0aW9uKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gUFNNZ210T2JqZWN0IHBNZ210LAorICAgIElOIFBTUnhNZ210UGFja2V0IHBSeFBhY2tldAorICAgICkKK3sKKyAgICBXTEFOX0ZSX0RFQVVUSEVOICAgIHNGcmFtZTsKKyAgICBVSU5UICAgICAgICB1Tm9kZUluZGV4ID0gMDsKKyAgICB2aWF3Z2V0X3dwYV9oZWFkZXIgKndwYWhkcjsKKworCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCApeworICAgICAgICAvL1RvZG86CisgICAgICAgIC8vIGlmIGlzIGFjdGluZyBhbiBBUC4uCisgICAgICAgIC8vIGEgU1RBIGlzIGxlYXZpbmcgdGhpcyBCU1MuLgorICAgICAgICBzRnJhbWUubGVuID0gcFJ4UGFja2V0LT5jYk1QRFVMZW47CisgICAgICAgIHNGcmFtZS5wQnVmID0gKFBCWVRFKXBSeFBhY2tldC0+cDgwMjExSGVhZGVyOworICAgICAgICBpZiAoQlNTREJiSXNTVEFJbk5vZGVEQihwTWdtdCwgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMiwgJnVOb2RlSW5kZXgpKSB7CisgICAgICAgICAgICBCU1N2UmVtb3ZlT25lTm9kZShwRGV2aWNlLCB1Tm9kZUluZGV4KTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJSeCBkZWF1dGgsIHN0YSBub3QgZm91bmRcbiIpOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBpZiAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX1NUQSApIHsKKyAgICAgICAgICAgIHNGcmFtZS5sZW4gPSBwUnhQYWNrZXQtPmNiTVBEVUxlbjsKKyAgICAgICAgICAgIHNGcmFtZS5wQnVmID0gKFBCWVRFKXBSeFBhY2tldC0+cDgwMjExSGVhZGVyOworICAgICAgICAgICAgdk1nckRlY29kZURlYXV0aGVuKCZzRnJhbWUpOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfTk9USUNFLCBLRVJOX0lORk8gICJBUCBkZWF1dGhlZCBtZSwgcmVhc29uPSVkLlxuIiwgY3B1X3RvX2xlMTYoKCooc0ZyYW1lLnB3UmVhc29uKSkpKTsKKyAgICAgICAgICAgIC8vIFRPRE86IHVwZGF0ZSBCU1MgbGlzdCBmb3Igc3BlY2lmaWMgQlNTSUQgaWYgcHJlLWF1dGhlbnRpY2F0aW9uIGNhc2UKKyAgICAgICAgICAgIGlmIChJU19FVEhfQUREUkVTU19FUVVBTChzRnJhbWUucEhkci0+c0EzLmFieUFkZHIzLCBwTWdtdC0+YWJ5Q3VyckJTU0lEKSkgeworICAgICAgICAgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJTdGF0ZSA+PSBXTUFDX1NUQVRFX0FVVEhQRU5ESU5HKSB7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0uYkFjdGl2ZSA9IEZBTFNFOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJNb2RlID0gV01BQ19NT0RFX1NUQU5EQlk7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICAgICAgICAgICAgICBuZXRpZl9zdG9wX3F1ZXVlKHBEZXZpY2UtPmRldik7CisgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UtPmJMaW5rUGFzcyA9IEZBTFNFOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH07CisKKyAgICAgICAgICAgIGlmICgocERldmljZS0+YldQQURFVlVwKSAmJiAocERldmljZS0+c2tiICE9IE5VTEwpKSB7CisgICAgICAgICAgICAgICAgIHdwYWhkciA9ICh2aWF3Z2V0X3dwYV9oZWFkZXIgKilwRGV2aWNlLT5za2ItPmRhdGE7CisgICAgICAgICAgICAgICAgIHdwYWhkci0+dHlwZSA9IFZJQVdHRVRfRElTQVNTT0NfTVNHOworICAgICAgICAgICAgICAgICB3cGFoZHItPnJlc3BfaWVfbGVuID0gMDsKKyAgICAgICAgICAgICAgICAgd3BhaGRyLT5yZXFfaWVfbGVuID0gMDsKKyAgICAgICAgICAgICAgICAgc2tiX3B1dChwRGV2aWNlLT5za2IsIHNpemVvZih2aWF3Z2V0X3dwYV9oZWFkZXIpKTsKKyAgICAgICAgICAgICAgICAgcERldmljZS0+c2tiLT5kZXYgPSBwRGV2aWNlLT53cGFkZXY7CisgICAgICAgICAgICAgICAgIHBEZXZpY2UtPnNrYi0+bWFjX2hlYWRlciA9IHBEZXZpY2UtPnNrYi0+ZGF0YTsKKyAgICAgICAgICAgICAgICAgcERldmljZS0+c2tiLT5wa3RfdHlwZSA9IFBBQ0tFVF9IT1NUOworICAgICAgICAgICAgICAgICBwRGV2aWNlLT5za2ItPnByb3RvY29sID0gaHRvbnMoRVRIX1BfODAyXzIpOworICAgICAgICAgICAgICAgICBtZW1zZXQocERldmljZS0+c2tiLT5jYiwgMCwgc2l6ZW9mKHBEZXZpY2UtPnNrYi0+Y2IpKTsKKyAgICAgICAgICAgICAgICAgbmV0aWZfcngocERldmljZS0+c2tiKTsKKyAgICAgICAgICAgICAgICAgcERldmljZS0+c2tiID0gZGV2X2FsbG9jX3NrYigoaW50KXBEZXZpY2UtPnJ4X2J1Zl9zeik7CisgICAgICAgICAgIH07CisKKwkgICAjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorICAvLyBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09IFRSVUUpCisgICAgICB7CisJdW5pb24gaXdyZXFfZGF0YSAgd3JxdTsKKwltZW1zZXQoJndycXUsIDAsIHNpemVvZiAod3JxdSkpOworICAgICAgICB3cnF1LmFwX2FkZHIuc2FfZmFtaWx5ID0gQVJQSFJEX0VUSEVSOworCXByaW50aygid2lyZWxlc3Nfc2VuZF9ldmVudC0tLT5TSU9DR0lXQVAoZGlzYXV0aGVuKVxuIik7CisJd2lyZWxlc3Nfc2VuZF9ldmVudChwRGV2aWNlLT5kZXYsIFNJT0NHSVdBUCwgJndycXUsIE5VTEwpOworICAgICB9CisgICNlbmRpZgorCisgICAgICAgIH0KKyAgICAgICAgLyogZWxzZSwgaWdub3JlIGl0LiAgVE9ETzogSUJTUyBhdXRoZW50aWNhdGlvbiBzZXJ2aWNlCisgICAgICAgICAgICB3b3VsZCBiZSBpbXBsZW1lbnRlZCBoZXJlICovCisgICAgfTsKKyAgICByZXR1cm47Cit9CisKKworLy8yMDA4LTgtNCA8YWRkPiBieSBjaGVzdGVyCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogY2hlY2sgaWYgY3VycmVudCBjaGFubmVsIGlzIG1hdGNoIFpvbmVUeXBlLgorICpmb3IgVVNBOjF+MTE7CisgKiAgICAgIEphcGFuOjF+MTM7CisgKiAgICAgIEV1cm9wZToxfjEzCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICAgICAgICAgICAgIFRydWU6ZXhjZWVkOworICogICAgICAgICAgICAgICAgRmFsc2U6bm9ybWFsIGNhc2UKKy0qLworc3RhdGljIEJPT0wKK0NoYW5uZWxFeGNlZWRab25lVHlwZSgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIEJZVEUgYnlDdXJyQ2hhbm5lbAorICAgICkKK3sKKyAgQk9PTCBleGNlZWQ9RkFMU0U7CisKKyAgc3dpdGNoKHBEZXZpY2UtPmJ5Wm9uZVR5cGUpIHsKKyAgCWNhc2UgMHgwMDogICAgICAgICAgICAgICAgICAvL1VTQToxfjExCisgICAgICAgICAgICAgICAgICAgICBpZigoYnlDdXJyQ2hhbm5lbDwxKSB8fChieUN1cnJDaGFubmVsPjExKSkKKwkgICAgICAgICAgICAgICAgZXhjZWVkID0gVFJVRTsKKwkgICAgICAgICBicmVhazsKKwljYXNlIDB4MDE6ICAgICAgICAgICAgICAgICAgLy9KYXBhbjoxfjEzCisJY2FzZSAweDAyOiAgICAgICAgICAgICAgICAgIC8vRXVyb3BlOjF+MTMKKyAgICAgICAgICAgICAgICAgICAgIGlmKChieUN1cnJDaGFubmVsPDEpIHx8KGJ5Q3VyckNoYW5uZWw+MTMpKQorCSAgICAgICAgICAgICAgICBleGNlZWQgPSBUUlVFOworCSAgICAgICAgIGJyZWFrOworCWRlZmF1bHQ6ICAgICAgICAgICAgICAgICAgICAvL3Jlc2VydmUgZm9yIG90aGVyIHpvbmV0eXBlCisJCWJyZWFrOworICB9CisKKyAgcmV0dXJuIGV4Y2VlZDsKK30KKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogICBIYW5kbGVzIGFuZCBhbmFseXNpcyBpbmNvbWluZyBiZWFjb24gZnJhbWVzLgorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBOb25lLgorICoKKy0qLworCitzdGF0aWMKK1ZPSUQKK3Nfdk1nclJ4QmVhY29uKAorICAgIElOIFBTRGV2aWNlIHBEZXZpY2UsCisgICAgSU4gUFNNZ210T2JqZWN0IHBNZ210LAorICAgIElOIFBTUnhNZ210UGFja2V0IHBSeFBhY2tldCwKKyAgICBJTiBCT09MIGJJblNjYW4KKyAgICApCit7CisKKyAgICBQS25vd25CU1MgICAgICAgICAgIHBCU1NMaXN0OworICAgIFdMQU5fRlJfQkVBQ09OICAgICAgc0ZyYW1lOworICAgIFFXT1JEICAgICAgICAgICAgICAgcXdUU0ZPZmZzZXQ7CisgICAgQk9PTCAgICAgICAgICAgICAgICBiSXNCU1NJREVxdWFsID0gRkFMU0U7CisgICAgQk9PTCAgICAgICAgICAgICAgICBiSXNTU0lERXF1YWwgPSBGQUxTRTsKKyAgICBCT09MICAgICAgICAgICAgICAgIGJUU0ZMYXJnZURpZmYgPSBGQUxTRTsKKyAgICBCT09MICAgICAgICAgICAgICAgIGJUU0ZPZmZzZXRQb3N0aXZlID0gRkFMU0U7CisgICAgQk9PTCAgICAgICAgICAgICAgICBiVXBkYXRlVFNGID0gRkFMU0U7CisgICAgQk9PTCAgICAgICAgICAgICAgICBiSXNBUEJlYWNvbiA9IEZBTFNFOworICAgIEJPT0wgICAgICAgICAgICAgICAgYklzQ2hhbm5lbEVxdWFsID0gRkFMU0U7CisgICAgVUlOVCAgICAgICAgICAgICAgICB1TG9jYXRlQnl0ZUluZGV4OworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlUSU1CaXRPbiA9IDA7CisgICAgV09SRCAgICAgICAgICAgICAgICB3QUlETnVtYmVyID0gMDsKKyAgICBVSU5UICAgICAgICAgICAgICAgIHVOb2RlSW5kZXg7CisgICAgUVdPUkQgICAgICAgICAgICAgICBxd1RpbWVzdGFtcCwgcXdMb2NhbFRTRjsKKyAgICBRV09SRCAgICAgICAgICAgICAgIHF3Q3VyclRTRjsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdTdGFydEluZGV4ID0gMDsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdBSURJbmRleCA9IDA7CisgICAgQll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ID0gQlNTcEFkZHJJc0luQlNTTGlzdCgoSEFORExFKXBEZXZpY2UsIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjMsIHNGcmFtZS5wU1NJRCk7CisgICAgaWYgKHBCU1NMaXN0ID09IE5VTEwpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJCZWFjb24vaW5zZXJ0OiBSeENoYW5uZWwgPSA6ICVkXG4iLCBieUN1cnJDaGFubmVsKTsKKyAgICAgICAgQlNTYkluc2VydFRvQlNTTGlzdCgoSEFORExFKXBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc0ZyYW1lLnBxd1RpbWVzdGFtcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc0ZyYW1lLnB3QmVhY29uSW50ZXJ2YWwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNGcmFtZS5wd0NhcEluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnlDdXJyQ2hhbm5lbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucFNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBFeHRTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNFUlAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBSU04sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBJRV9Db3VudHJ5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSUVfUXVpZXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLmxlbiAtIFdMQU5fSERSX0FERFIzX0xFTiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0E0LmFieUFkZHI0LCAgIC8vIHBheWxvYWQgb2YgYmVhY29uCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEhBTkRMRSlwUnhQYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgfQorICAgIGVsc2UgeworLy8gICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8idXBkYXRlIGJjbjogUnhDaGFubmVsID0gOiAlZFxuIiwgYnlDdXJyQ2hhbm5lbCk7CisgICAgICAgIEJTU2JVcGRhdGVUb0JTU0xpc3QoKEhBTkRMRSlwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzRnJhbWUucHF3VGltZXN0YW1wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzRnJhbWUucHdCZWFjb25JbnRlcnZhbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqc0ZyYW1lLnB3Q2FwSW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUN1cnJDaGFubmVsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJDaGFubmVsSGl0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wU1NJRCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucEV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmc0VSUCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucFJTTiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucFJTTldQQSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucElFX0NvdW50cnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBJRV9RdWlldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTGlzdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUubGVuIC0gV0xBTl9IRFJfQUREUjNfTEVOLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTQuYWJ5QWRkcjQsICAgLy8gcGF5bG9hZCBvZiBwcm9icmVzcG9uc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoSEFORExFKXBSeFBhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgIH0KKworICAgIGlmIChiSW5TY2FuKSB7CisgICAgICAgIHJldHVybjsKKyAgICB9CisKKyAgICBpZihieUN1cnJDaGFubmVsID09IChCWVRFKXBNZ210LT51Q3VyckNoYW5uZWwpCisgICAgICAgYklzQ2hhbm5lbEVxdWFsID0gVFJVRTsKKworICAgIGlmIChiSXNDaGFubmVsRXF1YWwgJiYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkpIHsKKworICAgICAgICAvLyBpZiByeCBiZWFjb24gd2l0aG91dCBFUlAgZmllbGQKKyAgICAgICAgaWYgKHNFUlAuYkVSUEV4aXN0KSB7CisgICAgICAgICAgICBpZiAoV0xBTl9HRVRfRVJQX1VTRV9QUk9URUNUSU9OKHNFUlAuYnlFUlApKXsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUVSUEZsYWcgfD0gV0xBTl9TRVRfRVJQX1VTRV9QUk9URUNUSU9OKDEpOworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndVc2VQcm90ZWN0Q250RG93biA9IFVTRV9QUk9URUNUX1BFUklPRDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHBEZXZp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uYWJ5QWRkcjMsCisgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lELAorICAgICAgICAgICAgICAgV0xBTl9CU1NJRF9MRU4pID09IDApIHsKKworICAgICAgICBiSXNCU1NJREVxdWFsID0gVFJVRTsKKworLy8gMjAwOC0wNS0yMSA8YWRkPiBieSBSaWNoYXJkdGFpCisgICAgICAgIHBEZXZpY2UtPnVDdXJyUlNTSSA9IHBSeFBhY2tldC0+dVJTU0k7CisgICAgICAgIHBEZXZpY2UtPmJ5Q3VyclNRID0gcFJ4UGFja2V0LT5ieVNROworCisgICAgICAgIGlmIChwTWdtdC0+c05vZGVEQlRhYmxlWzBdLnVJbkFjdGl2ZUNvdW50ICE9IDApIHsKKyAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0udUluQWN0aXZlQ291bnQgPSAwOworICAgICAgICAgICAgLy9ERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkJDTjpXYWtlIENvdW50PSBbJWRdXG4iLCBwTWdtdC0+d0NvdW50VG9XYWtlVXApOworICAgICAgICB9CisgICAgfQorICAgIC8vIGNoZWNrIGlmIFNTSUQgdGhlIHNhbWUKKyAgICBpZiAoc0ZyYW1lLnBTU0lELT5sZW4gPT0gKChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRCktPmxlbikgeworICAgICAgICBpZiAobWVtY21wKHNGcmFtZS5wU1NJRC0+YWJ5U1NJRCwKKyAgICAgICAgICAgICAgICAgICAoKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lEKS0+YWJ5U1NJRCwKKyAgICAgICAgICAgICAgICAgICBzRnJhbWUucFNTSUQtPmxlbgorICAgICAgICAgICAgICAgICAgICkgPT0gMCkgeworICAgICAgICAgICAgYklzU1NJREVxdWFsID0gVFJVRTsKKyAgICAgICAgfTsKKyAgICB9CisKKyAgICBpZiAoKFdMQU5fR0VUX0NBUF9JTkZPX0VTUygqc0ZyYW1lLnB3Q2FwSW5mbyk9PSBUUlVFKSAmJgorICAgICAgICAoYklzQlNTSURFcXVhbCA9PSBUUlVFKSAmJgorICAgICAgICAoYklzU1NJREVxdWFsID09IFRSVUUpICYmCisgICAgICAgIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfU1RBKSAmJgorICAgICAgICAocE1nbXQtPmVDdXJyU3RhdGUgPT0gV01BQ19TVEFURV9BU1NPQykpIHsKKyAgICAgICAgLy8gYWRkIHN0YXRlIGNoZWNrIHRvIHByZXZlbnQgcmVjb25uZWN0IGZhaWwgc2luY2Ugd2UnbGwgcmVjZWl2ZSBCZWFjb24KKworICAgICAgICBiSXNBUEJlYWNvbiA9IFRSVUU7CisKKyAgICAgICAgaWYgKHBCU1NMaXN0ICE9IE5VTEwpIHsKKworICAgICAgICAgICAgLy8gQ29tcGFyZSBQSFkgcGFyYW1hdGVyIHNldHRpbmcKKyAgICAgICAgICAgIGlmIChwTWdtdC0+d0N1cnJDYXBJbmZvICE9IHBCU1NMaXN0LT53Q2FwSW5mbykgeworICAgICAgICAgICAgICAgIGJVcGRhdGVQaHlQYXJhbWV0ZXIgPSBUUlVFOworICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8gPSBwQlNTTGlzdC0+d0NhcEluZm87CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoc0ZyYW1lLnBFUlAgIT0gTlVMTCkgeworICAgICAgICAgICAgICAgIGlmICgoc0ZyYW1lLnBFUlAtPmJ5RWxlbWVudElEID09IFdMQU5fRUlEX0VSUCkgJiYKKyAgICAgICAgICAgICAgICAgICAgKHBNZ210LT5ieUVSUENvbnRleHQgIT0gc0ZyYW1lLnBFUlAtPmJ5Q29udGV4dCkpIHsKKyAgICAgICAgICAgICAgICAgICAgYlVwZGF0ZVBoeVBhcmFtZXRlciA9IFRSVUU7CisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5ieUVSUENvbnRleHQgPSBzRnJhbWUucEVSUC0+YnlDb250ZXh0OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vCisgICAgICAgICAgICAvLyBCYXNpYyBSYXRlIFNldCBtYXkgY2hhbmdlIGR5bmFtaWNsbHkKKyAgICAgICAgICAgIC8vCisgICAgICAgICAgICBpZiAocEJTU0xpc3QtPmVOZXR3b3JrVHlwZUluVXNlID09IFBIWV9UWVBFXzExQikgeworICAgICAgICAgICAgICAgIHVSYXRlTGVuID0gV0xBTl9SQVRFU19NQVhMRU5fMTFCOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXNbMV0gPSBSQVRFdVNldElFKChQV0xBTl9JRV9TVVBQX1JBVEVTKXBCU1NMaXN0LT5hYnlTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdVJhdGVMZW4pOworICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJFeHRTdXBwUmF0ZXNbMV0gPSBSQVRFdVNldElFKChQV0xBTl9JRV9TVVBQX1JBVEVTKXBCU1NMaXN0LT5hYnlFeHRTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJFeHRTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdVJhdGVMZW4pOworICAgICAgICAgICAgUkFURXZQYXJzZU1heFJhdGUoIChQVk9JRClwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRSVUUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdLndNYXhCYXNpY1JhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS53TWF4U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS53U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVswXS5ieVRvcENDS0Jhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJ5VG9wT0ZETUJhc2ljUmF0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisjaWZkZWYJUExJQ0VfREVCVUcKKwkJLy9wcmludGsoIlJ4QmVhY29uOk1heFN1cHBSYXRlIGlzICVkXG4iLHBNZ210LT5zTm9kZURCVGFibGVbMF0ud01heFN1cHBSYXRlKTsKKyNlbmRpZgorCQkJaWYgKGJVcGRhdGVQaHlQYXJhbWV0ZXIgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgIENBUkRiU2V0UGh5UGFyYW1ldGVyKCBwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VycmVudFBIWU1vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5ieUVSUENvbnRleHQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKHNGcmFtZS5wSUVfUG93ZXJDb25zdHJhaW50ICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBDQVJEdlNldFBvd2VyQ29uc3RyYWludChwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEJZVEUpIHBCU1NMaXN0LT51Q2hhbm5lbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucElFX1Bvd2VyQ29uc3RyYWludC0+YnlQb3dlcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoc0ZyYW1lLnBJRV9DSFNXICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBDQVJEYkNoYW5uZWxTd2l0Y2goIHBNZ210LT5wQWRhcHRlciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSUVfQ0hTVy0+YnlNb2RlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ0FSRGJ5R2V0Q2hhbm5lbE1hcHBpbmcocE1nbXQtPnBBZGFwdGVyLCBzRnJhbWUucElFX0NIU1ctPmJ5TW9kZSwgcE1nbXQtPmVDdXJyZW50UEhZTW9kZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucElFX0NIU1ctPmJ5Q291bnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisKKyAgICAgICAgICAgIH0gZWxzZSBpZiAoYklzQ2hhbm5lbEVxdWFsID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgQ0FSRGJTZXRDaGFubmVsKHBNZ210LT5wQWRhcHRlciwgcEJTU0xpc3QtPnVDaGFubmVsKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworLy8gICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJCZWFjb24gMiBcbiIpOworICAgIC8vIGNoZWNrIGlmIENGIGZpZWxkIGV4aXNpdAorICAgIGlmIChXTEFOX0dFVF9DQVBfSU5GT19FU1MoKnNGcmFtZS5wd0NhcEluZm8pKSB7CisgICAgICAgIGlmIChzRnJhbWUucENGUGFybXMtPndDRlBEdXJSZW1haW5pbmcgPiAwKSB7CisgICAgICAgICAgICAvLyBUT0RPOiBkZWFsIHdpdGggQ0ZQIHBlcmlvZCB0byBzZXQgTkFWCisgICAgICAgIH07CisgICAgfTsKKworICAgIEhJRFdPUkQocXdUaW1lc3RhbXApID0gY3B1X3RvX2xlMzIoSElEV09SRCgqc0ZyYW1lLnBxd1RpbWVzdGFtcCkpOworICAgIExPRFdPUkQocXdUaW1lc3RhbXApID0gY3B1X3RvX2xlMzIoTE9EV09SRCgqc0ZyYW1lLnBxd1RpbWVzdGFtcCkpOworICAgIEhJRFdPUkQocXdMb2NhbFRTRikgPSBISURXT1JEKHBSeFBhY2tldC0+cXdMb2NhbFRTRik7CisgICAgTE9EV09SRChxd0xvY2FsVFNGKSA9IExPRFdPUkQocFJ4UGFja2V0LT5xd0xvY2FsVFNGKTsKKworICAgIC8vIGNoZWNrIGlmIGJlYWNvbiBUU0YgbGFyZ2VyIG9yIHNtYWxsIHRoYW4gb3VyIGxvY2FsIFRTRgorICAgIGlmIChISURXT1JEKHF3VGltZXN0YW1w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UEJlYWNvbiA9PSBUUlVFKSB7CisKKyAgICAgICAgLy8gSW5mcmEgbW9kZTogTG9jYWwgVFNGIGFsd2F5cyBmb2xsb3cgQVAncyBUU0YgaWYgRGlmZmVyZW5jZSBodWdlLgorICAgICAgICBpZiAoYlRTRkxhcmdlRGlmZikKKyAgICAgICAgICAgIGJVcGRhdGVUU0YgPSBUUlVFOworCisgICAgICAgIGlmICgocERldmljZS0+YkVuYWJsZVBTTW9kZSA9PSBUUlVFKSAmJihzRnJhbWUucFRJTSAhPSAwKSkgeworCisgICAgICAgICAgICAvLyBkZWFsIHdpdGggRFRJTSwgYW5hbHlzaXMgVElNCisgICAgICAgICAgICBwTWdtdC0+Yk11bHRpY2FzdFRJTSA9IFdMQU5fTUdNVF9JU19NVUxUSUNBU1RfVElNKHNGcmFtZS5wVElNLT5ieUJpdE1hcEN0bCkgPyBUUlVFIDogRkFMU0UgOworICAgICAgICAgICAgcE1nbXQtPmJ5RFRJTUNvdW50ID0gc0ZyYW1lLnBUSU0tPmJ5RFRJTUNvdW50OworICAgICAgICAgICAgcE1nbXQtPmJ5RFRJTVBlcmlvZCA9IHNGcmFtZS5wVElNLT5ieURUSU1QZXJpb2Q7CisgICAgICAgICAgICB3QUlETnVtYmVyID0gcE1nbXQtPndDdXJyQUlEICYgfihCSVQxNHxCSVQxNSk7CisKKyAgICAgICAgICAgIC8vIGNoZWNrIGlmIEFJRCBpbiBUSU0gZmllbGQgYml0IG9uCisgICAgICAgICAgICAvLyB3U3RhcnRJbmRleCA9IE4xCisgICAgICAgICAgICB3U3RhcnRJbmRleCA9IFdMQU5fTUdNVF9HRVRfVElNX09GRlNFVChzRnJhbWUucFRJTS0+YnlCaXRNYXBDdGwpIDw8IDE7CisgICAgICAgICAgICAvLyBBSURJbmRleCA9IE4yCisgICAgICAgICAgICB3QUlESW5kZXggPSAod0FJRE51bWJlciA+PiAzKTsKKyAgICAgICAgICAgIGlmICgod0FJRE51bWJlciA+IDApICYmICh3QUlESW5kZXggPj0gd1N0YXJ0SW5kZXgpKSB7CisgICAgICAgICAgICAgICAgdUxvY2F0ZUJ5dGVJbmRleCA9IHdBSURJbmRleCAtIHdTdGFydEluZGV4OworICAgICAgICAgICAgICAgIC8vIGxlbiA9IGJ5RFRJTUNvdW50ICsgYnlEVElNUGVyaW9kICsgYnlEVElNUGVyaW9kICsgYnlWaXJ0Qml0TWFwWzB+MjUwXQorICAgICAgICAgICAgICAgIGlmIChzRnJhbWUucFRJTS0+bGVuID49ICh1TG9jYXRlQnl0ZUluZGV4ICsgNCkpIHsKKyAgICAgICAgICAgICAgICAgICAgYnlUSU1CaXRPbiAgPSAoMHgwMSkgPDwgKCh3QUlETnVtYmVyKSAlIDgpOworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YkluVElNID0gc0ZyYW1lLnBUSU0tPmJ5VmlydEJpdE1hcFt1TG9jYXRlQnl0ZUluZGV4XSAmIGJ5VElNQml0T24gPyBUUlVFIDogRkFMU0U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YkluVElNID0gRkFMU0U7CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIHBNZ210LT5iSW5USU0gPSBGQUxTRTsKKyAgICAgICAgICAgIH07CisKKyAgICAgICAgICAgIGlmIChwTWdtdC0+YkluVElNIHx8CisgICAgICAgICAgICAgICAgKHBNZ210LT5iTXVsdGljYXN0VElNICYmIChwTWdtdC0+YnlEVElNQ291bnQgPT0gMCkpKSB7CisgICAgICAgICAgICAgICAgcE1nbXQtPmJJblRJTVdha2UgPSBUUlVFOworICAgICAgICAgICAgICAgIC8vIHNlbmQgb3V0IHBzLXBvbGwgcGFja2V0CisvLyAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCQ046SW4gVElNXG4iKTsKKyAgICAgICAgICAgICAgICBpZiAocE1nbXQtPmJJblRJTSkgeworICAgICAgICAgICAgICAgICAgICBQU3ZTZW5kUFNQT0xMKChQU0RldmljZSlwRGV2aWNlKTsKKy8vICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCQ046UFMtUE9MTCBzZW50Li5cbiIpOworICAgICAgICAgICAgICAgIH07CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIHBNZ210LT5iSW5USU1XYWtlID0gRkFMU0U7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiQkNOOiBOb3QgSW4gVElNLi5cbiIpOworICAgICAgICAgICAgICAgIGlmIChwRGV2aWNlLT5iUFdCaXRPbiA9PSBGQUxTRSkgeworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCQ046IFNlbmQgTnVsbCBQYWNrZXRcbiIpOworICAgICAgICAgICAgICAgICAgICBpZiAoUFNiU2VuZE51bGxQYWNrZXQocERldmljZSkpCisgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5iUFdCaXRPbiA9IFRSVUU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmKFBTYkNvbnNpZGVyUG93ZXJEb3duKHBEZXZpY2UsIEZBTFNFLCBGQUxTRSkpIHsKKyAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJCQ046IFBvd2VyIGRvd24gbm93Li4uXG4iKTsKKyAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKworICAgIH0KKyAgICAvLyBpZiBhZGhvYyBtb2RlCisgICAgaWYgKChwTWdtdC0+ZUN1cnJNb2RlID09IF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BSYXRlc1sxXSA9IFJBVEV1U2V0SUUoKFBXTEFOX0lFX1NVUFBfUkFURVMpc0ZyYW1lLnBTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXTEFOX1JBVEVTX01BWExFTl8xMUIpOworICAgICAgICAgICAgICAgIFJBVEV2UGFyc2VNYXhSYXRlKCAoUFZPSUQpcERldmljZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRSVUUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53TWF4QmFzaWNSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndNYXhTdXBwUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS53U3VwcFJhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYnlUb3BDQ0tCYXNpY1JhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYnlUb3BPRkRNQmFzaWNSYXRlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iU2hvcnRQcmVhbWJsZSA9IFdMQU5fR0VUX0NBUF9JTkZPX1NIT1JUUFJFQU1CTEUoKnNGcmFtZS5wd0NhcEluZm8pOworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYlNob3J0U2xvdFRpbWUgPSBXTEFOX0dFVF9DQVBfSU5GT19TSE9SVFNMT1RUSU1FKCpzRnJhbWUucHdDYXBJbmZvKTsKKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLnVJbkFjdGl2ZUNvdW50ID0gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIC8vIFRvZG8sIGluaXRpYWwgTm9kZSBjb250ZW50CisgICAgICAgICAgICAgICAgQlNTdkNyZWF0ZU9uZU5vZGUoKFBTRGV2aWNlKXBEZXZpY2UsICZ1Tm9kZUluZGV4KTsKKworICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzWzFdID0gUkFURXVTZXRJRSgoUFdMQU5fSUVfU1VQUF9SQVRFUylzRnJhbWUucFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdMQU5fUkFURVNfTUFYTEVOXzExQik7CisgICAgICAgICAgICAgICAgUkFURXZQYXJzZU1heFJhdGUoIChQVk9JRClwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVFJVRSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndNYXhCYXNpY1JhdGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud01heFN1cHBSYXRlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndTdXBwUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5ieVRvcENDS0Jhc2ljUmF0ZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYocE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5ieVRvcE9GRE1CYXNpY1JhdGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOworCisgICAgICAgICAgICAgICAgbWVtY3B5KHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYWJ5TUFDQWRkciwgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMiwgV0xBTl9BRERSX0xFTik7CisgICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVt1Tm9kZUluZGV4XS5iU2hvcnRQcmVhbWJsZSA9IFdMQU5fR0VUX0NBUF9JTkZPX1NIT1JUUFJFQU1CTEUoKnNGcmFtZS5wd0NhcEluZm8pOworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1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gICAgICAgICAgICAgcERldmljZS0+YkxpbmtQYXNzID0gVFJVRTsKKyAgICAgICAgICAgICAgICBpZiAobmV0aWZfcXVldWVfc3RvcHBlZChwRGV2aWNlLT5kZXYpKXsKKyAgICAgICAgICAgICAgICAgICAgbmV0aWZfd2FrZV9xdWV1ZShwRGV2aWNlLT5kZXYpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlWzBdLmJBY3RpdmUgPSBUUlVFOworICAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbMF0udUluQWN0aXZlQ291bnQgPSAwOworCisgICAgICAgICAgICB9OworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGJJc1NTSURFcXVhbCkgeworCisgICAgICAgICAgICAvLyBTZWUgb3RoZXIgYWRob2Mgc3RhIHdpdGggdGhlIHNhbWUgU1NJRCBidXQgQlNTSUQgaXMgZGlmZmVyZW50LgorICAgICAgICAgICAgLy8gYWRwb3QgdGhpcyB2YXJzIG9ubHkgd2hlbiBUU0YgbGFyZ2VyIHRoZW4gdXMuCisgICAgICAgICAgICBpZiAoYlRTRkxhcmdlRGlmZiAmJiBiVFNGT2Zmc2V0UG9zdGl2ZSkgeworICAgICAgICAgICAgICAgICAvLyB3ZSBkb24ndCBzdXBwb3J0IEFUSU0gdW5kZXIgYWRob2MgbW9kZQorICAgICAgICAgICAgICAgLy8gaWYgKCBzRnJhbWUucElCU1NQYXJtcy0+d0FUSU1XaW5kb3cgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgLy8gYWRwb3QgdGhpcyB2YXJzCisgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiBjaGVjayBzRnJhbWUgY2FwIGlmIHByaXZhY3kgb24sIGFuZCBzdXBwb3J0IHJhdGUgc3luCisgICAgICAgICAgICAgICAgICAgICBtZW1jcHkocE1nbXQtPmFieUN1cnJCU1NJRCwgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMywgV0xBTl9CU1NJRF9MRU4pOworICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KHBEZXZpY2UtPmFieUJTU0lELCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBXTEFOX0JTU0lEX0xFTik7CisgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+d0N1cnJBVElNV2luZG93ID0gY3B1X3RvX2xlMTYoc0ZyYW1lLnBJQlNTUGFybXMtPndBVElNV2luZG93KTsKKyAgICAgICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckJlYWNvblBlcmlvZCA9IGNwdV90b19sZTE2KCpzRnJhbWUucHdCZWFjb25JbnRlcnZhbCk7CisgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlc1sxXSA9IFJBVEV1U2V0SUUoKFBXTEFOX0lFX1NVUFBfUkFURVMpc0ZyYW1lLnBTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdMQU5fUkFURVNfTUFYTEVOXzExQik7CisgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgSFcgYmVhY29uIGludGVydmFsIGFuZCByZS1zeW5jaHJvbml6aW5nLi4uLgorICAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiUmVqb2luaW5nIHRvIE90aGVyIEFkaG9jIGdyb3VwIHdpdGggc2FtZSBTU0lELi4uLi4uLi5cbiIpOworICAgICAgICAgICAgICAgICAgICAgVk5Tdk91dFBvcnRXKHBEZXZpY2UtPlBvcnRPZmZzZXQgKyBNQUNfUkVHX0JJLCBwTWdtdC0+d0N1cnJCZWFjb25QZXJpb2QpOworICAgICAgICAgICAgICAgICAgICAgQ0FSRGJVcGRhdGVUU0YocERldmljZSwgcFJ4UGFja2V0LT5ieVJ4UmF0ZSwgcXdUaW1lc3RhbXAsIHF3TG9jYWxUU0YpOworICAgICAgICAgICAgICAgICAgICAgQ0FSRHZVcGRhdGVOZXh0VEJUVChwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBxd1RpbWVzdGFtcCwgcE1nbXQtPndDdXJyQmVhY29uUGVyaW9kKTsKKyAgICAgICAgICAgICAgICAgICAgIC8vIFR1cm4gb2ZmIGJzc2lkIGZpbHRlciB0byBhdm9pZCBmaWx0ZXIgb3RoZXJzIGFkaG9jIHN0YXRpb24gd2hpY2ggYnNzaWQgaXMgZGlmZmVyZW50LgorICAgICAgICAgICAgICAgICAgICAgTUFDdldyaXRlQlNTSURBZGRyZXNzKHBEZXZpY2UtPlBvcnRPZmZzZXQsIHBNZ210LT5hYnlDdXJyQlNTSUQpOworCisgICAgICAgICAgICAgICAgICAgICBDQVJEYlNldFBoeVBhcmFtZXRlciAoICBwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VycmVudFBIWU1vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5ieUVSUENvbnRleHQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcyk7CisKKworICAgICAgICAgICAgICAgICAgICAgLy8gTUFDdlJlZ0JpdHNPZmYocERldmljZS0+UG9ydE9mZnNldCwgTUFDX1JFR19SQ1IsIF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RyaWJ1dGVzLiBOb3RlIHRoYXQgdGhpcyBpbXBsZW1lbnRhdGlvbiBvbmx5IHN1cHBvcnRzIEFkLUhvYworICogICBCU1MgY3JlYXRpb24uCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIENNRF9TVEFUVVMKKyAqCistKi8KK1ZPSUQKK3ZNZ3JDcmVhdGVPd25JQlNTKAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgT1VUIFBDTURfU1RBVFVTIHBTdGF0dXMKKyAgICApCit7CisgICAgUFNEZXZpY2UgICAgICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworICAgIFBTTWdtdE9iamVjdCAgICAgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBXT1JEICAgICAgICAgICAgICAgIHdNYXhCYXNpY1JhdGU7CisgICAgV09SRCAgICAgICAgICAgICAgICB3TWF4U3VwcFJhdGU7CisgICAgQllURSAgICAgICAgICAgICAgICBieVRvcENDS0Jhc2ljUmF0ZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5VG9wT0ZETUJhc2ljUmF0ZTsKKyAgICBRV09SRCAgICAgICAgICAgICAgIHF3Q3VyclRTRjsKKyAgICBVSU5UICAgICAgICAgICAgICAgIGlpOworICAgIEJZVEUgICAgYWJ5UkFURVtdID0gezB4ODIsIDB4ODQsIDB4OEIsIDB4OTYsIDB4MjQsIDB4MzAsIDB4NDgsIDB4NkMsIDB4MEMsIDB4MTIsIDB4MTgsIDB4NjB9OworICAgIEJZVEUgICAgYWJ5Q0NLX1JBVEVbXSA9IHsweDgyLCAweDg0LCAweDhCLCAweDk2fTsKKyAgICBCWVRFICAgIGFieU9GRE1fUkFURVtdID0gezB4MEMsIDB4MTIsIDB4MTgsIDB4MjQsIDB4MzAsIDB4NDgsIDB4NjAsIDB4NkN9OworICAgIFdPUkQgICAgICAgICAgICAgICAgd1N1cHBSYXRlOworCisgICA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IraWldID0gIGFieUNDS19SQVRFW2lpXTsKKyAgICAgICAgZm9yIChpaSA9IDQ7IGlpIDwgODsgaWkrKykKKyAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzWzIraWldID0gIGFieU9GRE1fUkFURVtpaS00XTsKKyAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgNDsgaWkrKykKKyAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzWzIraWldID0gIGFieU9GRE1fUkFURVtpaSs0XTsKKyAgICB9CisKKworICAgIC8vIERpc2FibGUgUHJvdGVjdCBNb2RlCisgICAgcERldmljZS0+YlByb3RlY3RNb2RlID0gMDsKKyAgICBNQUN2RGlzYWJsZVByb3RlY3RNRChwRGV2aWNlLT5Qb3J0T2Zmc2V0KTsKKworICAgIHBEZXZpY2UtPmJCYXJrZXJQcmVhbWJsZU1kID0gMDsKKyAgICBNQUN2RGlzYWJsZUJhcmtlclByZWFtYmxlTWQocERldmljZS0+UG9ydE9mZnNldCk7CisKKyAgICAvLyBLeWxlIFRlc3QgMjAwMy4xMS4wNAorCisgICAgLy8gc2V0IEhXIGJlYWNvbiBpbnRlcnZhbAorICAgIGlmIChwTWdtdC0+d0lCU1NCZWFjb25QZXJpb2QgPT0gMCkKKyAgICAgICAgcE1nbXQtPndJQlNTQmVhY29uUGVyaW9kID0gREVGQVVMVF9JQlNTX0JJOworCisKKyAgICBDQVJEYkdldEN1cnJlbnRUU0YocERldmljZS0+UG9ydE9mZnNldCwgJnF3Q3VyclRTRik7CisgICAgLy8gY2xlYXIgVFNGIGNvdW50ZXIKKyAgICBWTlN2T3V0UG9ydEIocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfVEZUQ1RMLCBURlRDVExfVFNGQ05UUlNUKTsKKyAgICAvLyBlbmFibGUgVFNGIGNvdW50ZXIKKyAgICBWTlN2T3V0UG9ydEIocERldmljZS0+UG9ydE9mZnNldCArIE1BQ19SRUdfVEZUQ1RMLCBURlRDVExfVFNGQ05UUkVOKTsKKworICAgIC8vIHNldCBOZXh0IFRCVFQKKyAgICBDQVJEdlNldEZpcnN0TmV4dFRCVFQocERldmljZS0+UG9ydE9mZnNldCwgcE1nbXQtPndJQlNTQmVhY29uUGVyaW9kKTsKKworICAgIHBNZ210LT51SUJTU0NoYW5uZWwgPSBwRGV2aWNlLT51Q2hhbm5lbDsKKworICAgIGlmIChwTWdtdC0+dUlCU1NDaGFubmVsID09IDApCisgICAgICAgIHBNZ210LT51SUJTU0NoYW5uZWwgPSBERUZBVUxUX0lCU1NfQ0hBTk5FTDsKKworCisgICAgLy8gc2V0IGJhc2ljIHJhdGUKKworICAgIFJBVEV2UGFyc2VNYXhSYXRlKChQVk9JRClwRGV2aWNlLCAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcywgVFJVRSwKKyAgICAgICAgICAgICAgICAgICAgICAmd01heEJhc2ljUmF0ZSwgJndNYXhTdXBwUmF0ZSwgJndTdXBwUmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAmYnlUb3BDQ0tCYXNpY1JhdGUsICZieVRvcE9GRE1CYXNpY1JhdGUpOworCisKKyAgICBpZiAocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0FQKSB7CisgICAgICAgIHBNZ210LT5lQ3Vyck1vZGUgPSBXTUFDX01PREVfRVNTX0FQOworICAgIH0KKworICAgIGlmIChwTWdtdC0+ZUNvbmZpZ01vZGUgPT0gV01BQ19DT05GSUdfSUJTU19TVEEpIHsKKyAgICAgICAgTUVNdkNvcHkocE1nbXQtPmFieUlCU1NERlNPd25lciwgcERldmljZS0+YWJ5Q3VycmVudE5ldEFkZHIsIDYpOworICAgICAgICBwTWdtdC0+YnlJQlNTREZTUmVj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NZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICAvLyBBUCBtb2RlIEJTU0lEID0gTUFDIGFkZHIKKyAgICAgICAgbWVtY3B5KHBNZ210LT5hYnlDdXJyQlNTSUQsIHBNZ210LT5hYnlNQUNBZGRyLCBXTEFOX0FERFJfTEVOKTsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfSU5GTywgS0VSTl9JTkZPIkFQIGJlYWNvbiBjcmVhdGVkIEJTU0lEOiUwMngtJTAyeC0lMDJ4LSUwMngtJTAyeC0lMDJ4IFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzBdLAorICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSURbMV0sCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJCU1NJRFsyXSwKKyAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzNdLAorICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSURbNF0sCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJCU1NJRFs1XQorICAgICAgICAgICAgICAgICAgICApOworICAgIH0KKworICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9JQlNTX1NUQSkgeworCisgICAgICAgIC8vIEJTU0lEIHNlbGVjdGVkIG11c3QgYmUgcmFuZG9taXplZCBhcyBzcGVjIDExLjEuMworICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzVdID0gKEJZVEUpIChMT0RXT1JEKHF3Q3VyclRTRikmIDB4MDAwMDAwZmYpOworICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzRdID0gKEJZVEUpKChMT0RXT1JEKHF3Q3VyclRTRikmIDB4MDAwMGZmMDApID4+IDgpOworICAgICAgICBwTWdtdC0+YW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3NpZDolMDJ4LSUwMngtJTAyeC0lMDJ4LSUwMngtJTAyeCBcbiIsCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJCU1NJRFswXSwKKyAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzFdLAorICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSURbMl0sCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJCU1NJRFszXSwKKyAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzRdLAorICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSURbNV0KKyAgICAgICAgICAgICAgICAgICAgKTsKKyAgICB9CisKKyAgICAvLyBTZXQgQ2FwYWJpbGl0eSBJbmZvCisgICAgcE1nbXQtPndDdXJyQ2FwSW5mbyA9IDA7CisKKyAgICBpZiAocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSB7CisgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8gfD0gV0xBTl9TRVRfQ0FQX0lORk9fRVNTKDEpOworICAgICAgICBwTWdtdC0+YnlEVElNUGVyaW9kID0gREVGQVVMVF9EVElNX1BFUklPRDsKKyAgICAgICAgcE1nbXQtPmJ5RFRJTUNvdW50ID0gcE1nbXQtPmJ5RFRJTVBlcmlvZCAtIDE7CisgICAgfQorCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSB7CisgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8gfD0gV0xBTl9TRVRfQ0FQX0lORk9fSUJTUygxKTsKKyAgICB9CisKKyAgICBpZiAocERldmljZS0+YkVuY3J5cHRpb25FbmFibGUpIHsKKyAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbyB8PSBXTEFOX1NFVF9DQVBfSU5GT19QUklWQUNZKDEpOworICAgICAgICBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEFOT05FKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICAgICAgICAgIHBNZ210LT5ieUNTU1BLID0gS0VZX0NUTF9DQ01QOworICAgICAgICAgICAgICAgIHBNZ210LT5ieUNTU0dLID0gS0VZX0NUTF9DQ01QOworICAgICAgICAgICAgfSBlbHNlIGlmIChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkKSB7CisgICAgICAgICAgICAgICAgcE1nbXQtPmJ5Q1NTUEsgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICAgICAgcE1nbXQtPmJ5Q1NTR0sgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBNZ210LT5ieUNTU1BLID0gS0VZX0NUTF9OT05FOworICAgICAgICAgICAgICAgIHBNZ210LT5ieUNTU0dLID0gS0VZX0NUTF9XRVA7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBwTWdtdC0+YnlDU1NQSyA9IEtFWV9DVExfV0VQOworICAgICAgICAgICAgcE1nbXQtPmJ5Q1NTR0sgPSBLRVlfQ1RMX1dFUDsKKyAgICAgICAgfQorICAgIH07CisKKyAgICBwTWdtdC0+YnlFUlBDb250ZXh0ID0gMDsKKworLy8gICAgbWVtY3B5KHBEZXZpY2UtPmFieUJTU0lELCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBXTEFOX0JTU0lEX0xFTik7CisKKyAgICBpZiAocE1nbXQtPmVDb25maWdNb2RlID09IFdNQUNfQ09ORklHX0FQKSB7CisgICAgICAgIENBUkRiU2V0QlNTSUQocE1nbXQtPnBBZGFwdGVyLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBPUF9NT0RFX0FQKTsKKyAgICB9IGVsc2UgeworICAgICAgICBDQVJEYlNldEJTU0lEKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPmFieUN1cnJCU1NJRCwgT1BfTU9ERV9BREhPQyk7CisgICAgfQorCisgICAgQ0FSRGJTZXRQaHlQYXJhbWV0ZXIoICAgcE1nbXQtPnBBZGFwdGVyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VycmVudFBIWU1vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YnlFUlBDb250ZXh0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgIENBUkRiU2V0QmVhY29uUGVyaW9kKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPndJQlNTQmVhY29uUGVyaW9kKTsKKyAgICAvLyBzZXQgY2hhbm5lbCBhbmQgY2xlYXIgTkFWCisgICAgQ0FSRGJTZXRDaGFubmVsKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPnVJQlNTQ2hhbm5lbCk7CisgICAgcE1nbXQtPnVDdXJyQ2hhbm5lbCA9IHBNZ210LT51SUJTU0NoYW5uZWw7CisKKyAgICBpZiAoQ0FSRGJJc1Nob3J0UHJlYW1ibGUocE1nbXQtPnBBZGFwdGVyKSkgeworICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvIHw9IFdMQU5fU0VUX0NBUF9JTkZPX1NIT1JUUFJFQU1CTEUoMSk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgcE1nbXQtP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SEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIE9VVCBQQ01EX1NUQVRVUyBwU3RhdHVzCisgICAgKQoreworCisgICAgUFNEZXZpY2UgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisgICAgUEtub3duQlNTICAgICAgIHBDdXJyID0gTlVMTDsKKyAgICBVSU5UICAgICAgICAgICAgaWksIHV1OworICAgIFBXTEFOX0lFX1NVUFBfUkFURVMgcEl0ZW1SYXRlcyA9IE5VTEw7CisgICAgUFdMQU5fSUVfU1VQUF9SQVRFUyBwSXRlbUV4dFJhdGVzID0gTlVMTDsKKyAgICBQV0xBTl9JRV9TU0lEICAgcEl0ZW1TU0lEOworICAgIFVJTlQgICAgICAgICAgICB1UmF0ZUxlbiA9IFdMQU5fUkFURVNfTUFYTEVOOworICAgIFdPUkQgICAgICAgICAgICB3TWF4QmFzaWNSYXRlID0gUkFURV8xTTsKKyAgICBXT1JEICAgICAgICAgICAgd01heFN1cHBSYXRlID0gUkFURV8xTTsKKyAgICBXT1JEICAgICAgICAgICAgd1N1cHBSYXRlOworICAgIEJZVEUgICAgICAgICAgICBieVRvcENDS0Jhc2ljUmF0ZSA9IFJBVEVfMU07CisgICAgQllURSAgICAgICAgICAgIGJ5VG9wT0ZETUJhc2ljUmF0ZSA9IFJBVEVfMU07CisKKworICAgIGZvciAoaWkgPSAwOyBpaSA8IE1BWF9CU1NfTlVNOyBpaSsrKSB7CisgICAgICAgIGlmIChwTWdtdC0+c0JTU0xpc3RbaWldLmJBY3RpdmUgPT0gVFJVRSkKKyAgICAgICAgICAgIGJyZWFrOworICAgIH0KKworICAgIGlmIChpaSA9PSBNQVhfQlNTX05VTSkgeworICAgICAgICpwU3RhdHVzID0gQ01EX1NUQVRVU19SRVNPVVJDRVM7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJCU1MgZmluZGluZzpCU1MgbGlzdCBpcyBlbXB0eS5cbiIpOworICAgICAgIHJldHVybjsKKyAgICB9OworCisgICAgLy8gbWVtc2V0KHBNZ210LT5hYnlEZXNpcmVCU1NJRCwgMCwgIFdMQU5fQlNTSURfTEVOKTsKKyAgICAvLyBTZWFyY2gga25vd24gQlNTIGxpc3QgZm9yIHByZWZlciBCU1NJRCBvciBTU0lECisKKyAgICBwQ3VyciA9IEJTU3BTZWFyY2hCU1NMaXN0KHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5RGVzaXJlQlNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5RGVzaXJlU1NJRCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ29uZmlnUEhZTW9kZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgIGlmIChwQ3VyciA9PSBOVUxMKXsKKyAgICAgICAqcFN0YXR1cyA9IENNRF9TVEFUVVNfUkVTT1VSQ0VTOworICAgICAgIHBJdGVtU1NJRCA9IChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlEZXNpcmVTU0lEOworICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJTY2FubmluZyBbJXNdIG5vdCBmb3VuZCwgZGlzY29ubmVjdGVkICFcbiIsIHBJdGVtU1NJRC0+YWJ5U1NJRCk7CisgICAgICAgcmV0dXJuOworICAgIH07CisKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9OT1RJQ0UsIEtFUk5fSU5GTyAiQVAoQlNTKSBmaW5kaW5nOkZvdW5kIGEgQVAoQlNTKS4uXG4iKTsKKyAgICBpZiAoV0xBTl9HRVRfQ0FQX0lORk9fRVNTKGNwdV90b19sZTE2KHBDdXJyLT53Q2FwSW5mbykpKXsKKworICAgICAgICBpZiAoKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBKXx8KHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBUFNLKSkgeworCisgICAgLy8gcGF0Y2ggZm9yIENJU0NPIG1pZ3JhdGlvbiBtb2RlCisvKgorICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uMkVuYWJsZWQpIHsKKyAgICAgICAgICAgICAgICBpZiAoV1BBX1NlYXJjaFJTTigwLCBXUEFfVEtJUCwgcEN1cnIpID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iTm8gbWF0Y2ggUlNOIGluZm8uICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK1xuIik7CisgICAgICAgICAgICAgICAgICAgIC8vIGVuY3J5cHRpb24gbW9kZSBlcnJvcgorICAgICAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfSURMRTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICAgICAgICAgIGlmIChXUEFfU2VhcmNoUlNOKDAsIFdQQV9BRVNDQ01QLCBwQ3VycikgPT0gRkFMU0UpIHsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJObyBtYXRjaCBSU04gaW5mby4gKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgLy8gZW5jcnlwdGlvbiBtb2RlIGVycm9yCisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorKi8KKyAgICAgICAgfQorCisjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAorCS8vaWYocERldmljZS0+YldQQVN1cHBXZXh0RW5hYmxlZCA9PSBUUlVFKQorICAgICAgICAgICAgRW5jeXB0aW9uX1JlYnVpbGQocERldmljZSwgcEN1cnIpOworI2VuZGlmCisgICAgICAgIC8vIEluZnJhc3RydWN0dXJlIEJTUworICAgICAgICBzX3ZNZ3JTeW5jaEJTUyhwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICBXTUFDX01PREVfRVNTX1NUQSwKKyAgICAgICAgICAgICAgICAgICAgICAgcEN1cnIsCisgICAgICAgICAgICAgICAgICAgICAgIHBTdGF0dXMKKyAgICAgICAgICAgICAgICAgICAgICAgKTsKKworICAgICAgICBpZiAoKnBTdGF0dXMgPT0gQ01EX1NUQVRVU19TVUNDRVNTKXsKKworICAgICAgICAgICAgLy8gQWRvcHQgdGhpcyBCU1Mgc3RhdGUgdmFycyBpbiBNZ210IE9iamVjdAorICAgICAgICAgICAgcE1nbXQtPnVDdXJyQ2hhbm5lbCA9IHBDdXJyLT51Q2hhbm5lbDsKKworICAgICAgICAgICAgbWVtc2V0KHBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLCAwICwgV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1JBVEVTX01BWExFTiArIDEpOworICAgICAgICAgICAgbWVtc2V0KHBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzLCAwICwgV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1JBVEVTX01BWExFTiArIDEpOworCisgICAgICAgICAgICBpZiAocEN1cnItPmVOZXR3b3JrVHlwZUluVXNlID09IFBIWV9UWVBFXzExQikgeworICAgICAgICAgICAgICAgIHVSYXRlTGVuID0gV0xBTl9SQVRFU19NQVhMRU5fMTFCOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBwSXRlbVJhdGVzID0gKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXM7CisgICAgICAgICAgICBwSXRlbUV4dFJhdGVzID0gKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJFeHRTdXBwUmF0ZXM7CisKKyAgICAgICAgICAgIC8vIFBhcnNlIFN1cHBvcnQgUmF0ZSBJRQorICAgICAgICAgICAgcEl0ZW1SYXRlcy0+YnlFbGVtZW50SUQgPSBXTEFOX0VJRF9TVVBQX1JBVEVTOworICAgICAgICAgICAgcEl0ZW1SYXRlcy0+bGVuID0gUkFURXVTZXRJRSgoUFdMQU5fSUVfU1VQUF9SQVRFUylwQ3Vyci0+YWJ5U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSXRlbVJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1UmF0ZUxlbik7CisKKyAgICAgICAgICAgIC8vIFBhcnNlIEV4dGVuc2lvbiBTdXBwb3J0IFJhdGUgSUUKKyAgICAgICAgICAgIHBJdGVtRXh0UmF0ZXMtPmJ5RWxlbWVudElEID0gV0xBTl9FSURfRVhUU1VQUF9SQVRFUzsKKyAgICAgICAgICAgIHBJdGVtRXh0UmF0ZXMtPmxlbiA9IFJBVEV1U2V0SUUoKFBXTEFOX0lFX1NVUFBfUkFURVMpcEN1cnItPmFieUV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcEl0ZW1FeHRSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdVJhdGVMZW4pOworICAgICAgICAgICAgLy8gU3R1ZmZpbmcgUmF0ZSBJRQorICAgICAgICAgICAgaWYgKChwSXRlbUV4dFJhdGVzLT5sZW4gPiAwKSAmJiAocEl0ZW1SYXRlcy0+bGVuIDwgOCkpIHsKKyAgICAgICAgICAgICAgICBmb3IgKGlpID0gMDsgaWkgPCAoVUlOVCkoOCAtIHBJdGVtUmF0ZXMtPmxlbik7ICkgeworICAgICAgICAgICAgICAgICAgICBwSXRlbVJhdGVzLT5hYnlSYXRlc1twSXRlbVJhdGVzLT5sZW4gKyBpaV0gPSBwSXRlbUV4dFJhdGVzLT5hYnlSYXRlc1tpaV07CisgICAgICAgICAgICAgICAgICAgIGlpICsrOworICAgICAgICAgICAgICAgICAgICBpZiAocEl0ZW1FeHRSYXRlcy0+bGVuIDw9IGlpKQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIHBJdGVtUmF0ZXMtPmxlbiArPSAoQllURSlpaTsKKyAgICAgICAgICAgICAgICBpZiAocEl0ZW1FeHRSYXRlcy0+bGVuIC0gaWkgPiAwKSB7CisgICAgICAgICAgICAgICAgICAgIHBJdGVtRXh0UmF0ZXMtPmxlbiAtPSAoQllURSlpaTsKKyAgICAgICAgICAgICAgICAgICAgZm9yICh1dSA9IDA7IHV1IDwgcEl0ZW1FeHRSYXRlcy0+bGVuOyB1dSArKykgeworICAgICAgICAgICAgICAgICAgICAgICAgcEl0ZW1FeHRSYXRlcy0+YWJ5UmF0ZXNbdXVdID0gcEl0ZW1FeHRSYXRlcy0+YWJ5UmF0ZXNbdXUgKyBpaV07CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICBwSXRlbUV4dFJhdGVzLT5sZW4gPSAwOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICA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lLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCAmcEN1cnItPnNSU05DYXBPYmopOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gUHJlYW1ibGUgdHlwZSBhdXRvLXN3aXRjaDogaWYgQVAgY2FuIHJlY2VpdmUgc2hvcnQtcHJlYW1ibGUgY2FwLAorICAgICAgICAgICAgLy8gd2UgY2FuIHR1cm4gb24gdG9vLgorCisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIkpvaW4gRVNTXG4iKTsKKworCisKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iRW5kIG9mIEpvaW4gQVAgLS0gQS9CL0cgQWN0aW9uXG4iKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICB9OworCisKKyAgICAgfQorICAgICBlbHNlIHsKKyAgICAgICAgLy8gYWQtaG9jIG1vZGUgQlNTCisgICAgICAgIGlmIChwTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQU5PTkUpIHsKKworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uMkVuYWJsZWQpIHsKKyAgICAgICAgICAgICAgICBpZiAoV1BBX1NlYXJjaFJTTigwLCBXUEFfVEtJUCwgcEN1cnIpID09IEZBTFNFKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGVuY3J5cHRpb24gbW9kZSBlcnJvcgorICAgICAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfSURMRTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICAgICAgICAgIGlmIChXUEFfU2VhcmNoUlNOKDAsIFdQQV9BRVNDQ01QLCBwQ3VycikgPT0gRkFMU0UpIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gZW5jcnlwdGlvbiBtb2RlIGVycm9yCisgICAgICAgICAgICAgICAgICAgIHBNZ210LT5lQ3VyclN0YXRlID0gV01BQ19TVEFURV9JRExFOworICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBlbmNyeXB0aW9uIG1vZGUgZXJyb3IKKyAgICAgICAgICAgICAgICBwTWdtdC0+ZUN1cnJTdGF0ZSA9IFdNQUNfU1RBVEVfSURMRTsKKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBzX3ZNZ3JTeW5jaEJTUyhwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICBXTUFDX01PREVfSUJTU19TVEEsCisgICAgICAgICAgICAgICAgICAgICAgIHBDdXJyLAorICAgICAgICAgICAgICAgICAgICAgICBwU3RhdHVzCisgICAgICAgICAgICAgICAgICAgICAgICk7CisKKyAgICAgICAgaWYgKCpwU3RhdHVzID09IENNRF9TVEFUVVNfU1VDQ0VTUyl7CisgICAgICAgICAgICAvLyBBZG9wdCB0aGlzIEJTUyBzdGF0ZSB2YXJzIGluIE1nbXQgT2JqZWN0CisgICAgICAgICAgICAvLyBUT0RPOiBjaGVjayBpZiBDYXBJbmZvIHByaXZhY3kgb24sIGJ1dCB3ZSBkb24ndC4uCisgICAgICAgICAgICBwTWdtdC0+dUN1cnJDaGFubmVsID0gcEN1cnItPnVDaGFubmVsOworCisKKyAgICAgICAgICAgIC8vIFBhcnNlIFN1cHBvcnQgUmF0ZSBJRQorICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXNbMF0gPSBXTEFOX0VJRF9TVVBQX1JBVEVTOworICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXNbMV0gPSBSQVRFdVNldElFKChQV0xBTl9JRV9TVVBQX1JBVEVTKXBDdXJyLT5hYnlTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV0xBTl9SQVRFU19NQVhMRU5fMTFCKTsKKyAgICAgICAgICAgIC8vIHNldCBiYXNpYyByYXRlCisgICAgICAgICAgICBSQVRFdlBhcnNlTWF4UmF0ZSgoUFZPSUQpcERldmljZSwgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBUUlVFLCAmd01heEJhc2ljUmF0ZSwgJndNYXhTdXBwUmF0ZSwgJndTdXBwUmF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZieVRvcENDS0Jhc2ljUmF0ZSwgJmJ5VG9wT0ZETUJhc2ljUmF0ZSk7CisKKyAgICAgICAgICAgIHBNZ210LT53Q3VyckNhcEluZm8gPSBwQ3Vyci0+d0NhcEluZm87CisgICAgICAgICAgICBwTWdtdC0+d0N1cnJCZWFjb25QZXJpb2QgPSBwQ3Vyci0+d0JlYWNvbkludGVydmFsOworICAgICAgICAgICAgbWVtc2V0KHBNZ210LT5hYnlDdXJyU1NJRCwgMCwgV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1NTSURfTUFYTEVOKTsKKyAgICAgICAgICAg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5Q3VyckJTU0lEWzJdLAorICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJCU1NJRFszXSwKKyAgICAgICAgICAgICAgICAgIHBNZ210LT5hYnlDdXJyQlNTSURbNF0sCisgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyckJTU0lEWzVdCisgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgIC8vIFByZWFtYmxlIHR5cGUgYXV0by1zd2l0Y2g6IGlmIEFQIGNhbiByZWNlaXZlIHNob3J0LXByZWFtYmxlIGNhcCwKKyAgICAgICAgICAgIC8vIGFuZCBpZiByZWdpc3RyeSBzZXR0aW5nIGlzIHNob3J0IHByZWFtYmxlIHdlIGNhbiB0dXJuIG9uIHRvby4KKworICAgICAgICAgICAgLy8gUHJlcGFyZSBiZWFjb24KKyAgICAgICAgICAgIGJNZ3JQcmVwYXJlQmVhY29uVG9TZW5kKChIQU5ETEUpcERldmljZSwgcE1nbXQpOworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgcE1nbXQtPmVDdXJyU3RhdGUgPSBXTUFDX1NUQVRFX0lETEU7CisgICAgICAgIH07CisgICAgIH07CisgICAgcmV0dXJuOworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqIFNldCBIVyB0byBzeW5jaHJvbml6ZSBhIHNwZWNpZmljIEJTUyBmcm9tIGtub3duIEJTUyBsaXN0LgorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBQQ01fU1RBVFVTCisgKgorLSovCitzdGF0aWMKK1ZPSUQKK3Nfdk1nclN5bmNoQlNTICgKKyAgICBJTiBQU0RldmljZSAgICAgIHBEZXZpY2UsCisgICAgSU4gVUlOVCAgICAgICAgICB1QlNTTW9kZSwKKyAgICBJTiBQS25vd25CU1MgICAgIHBDdXJyLAorICAgIE9VVCBQQ01EX1NUQVRVUyAgcFN0YXR1cworICAgICkKK3sKKyAgICBDQVJEX1BIWV9UWVBFICAgZVBoeVR5cGUgPSBQSFlfVFlQRV8xMUI7CisgICAgUFNNZ210T2JqZWN0ICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworLy8gICAgaW50ICAgICBpaTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8xTSwgICAyTSwgICA1TSwgICAxMU0sICAxOE0sICAyNE0sICAzNk0sICA1NE0KKyAgICBCWVRFIGFieUN1cnJTdXBwUmF0ZXNHW10gPSB7V0xBTl9FSURfU1VQUF9SQVRFUywgOCwgMHgwMiwgMHgwNCwgMHgwQiwgMHgxNiwgMHgyNCwgMHgzMCwgMHg0OCwgMHg2Q307CisgICAgQllURSBhYnlDdXJyRXh0U3VwcFJhdGVzR1tdID0ge1dMQU5fRUlEX0VYVFNVUFBfUkFURVMsIDQsIDB4MEMsIDB4MTIsIDB4MTgsIDB4NjB9OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLzZNLCAgIDlNLCAgIDEyTSwgIDQ4TQorICAgIEJZVEUgYWJ5Q3VyclN1cHBSYXRlc0FbXSA9IHtXTEFOX0VJRF9TVVBQX1JBVEVTLCA4LCAweDBDLCAweDEyLCAweDE4LCAweDI0LCAweDMwLCAweDQ4LCAweDYwLCAweDZDfTsKKyAgICBCWVRFIGFieUN1cnJTdXBwUmF0ZXNCW10gPSB7V0xBTl9FSURfU1VQUF9SQVRFUywgNCwgMHgwMiwgMHgwNCwgMHgwQiwgMHgxNn07CisKKworICAgICpwU3RhdHVzID0gQ01EX1NUQVRVU19GQUlMVVJFOworCisgICAgaWYgKHNfYkNpcGhlck1hdGNoKHBDdXJyLAorICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cywKKyAgICAgICAgICAgICAgICAgICAgICAgJihwTWdtdC0+YnlDU1NQSyksCisgICAgICAgICAgICAgICAgICAgICAgICYocE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JFKTsKKyAgICAgICAgLy8gQWRkIGN1cnJlbnQgQlNTIHRvIENhbmRpZGF0ZSBsaXN0CisgICAgICAgIC8vIFRoaXMgc2hvdWxkIG9ubHkgd29ya3MgZm9yIFdQQTIgQlNTLCBhbmQgV1BBMiBCU1MgY2hlY2sgbXVzdCBiZSBkb25lIGJlZm9yZS4KKyAgICAgICAgaWYgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMikgeworICAgICAgICAgICAgQ0FSRGJBZGRfUE1LSURfQ2FuZGlkYXRlKHBNZ210LT5wQWRhcHRlciwgcE1nbXQtPmFieUN1cnJCU1NJRCwgcEN1cnItPnNSU05DYXBPYmouYlJTTkNhcEV4aXN0LCBwQ3Vyci0+c1JTTkNhcE9iai53UlNOQ2FwKTsKKyAgICAgICAgfQorICAgIH0gZWxzZSB7CisgICAgICAgIENBUkRiU2V0QlNTSUQocE1nbXQtPnBBZGFwdGVyLCBwQ3Vyci0+YWJ5QlNTSUQsIE9QX01PREVfQURIT0MpOworICAgIH0KKworICAgIGlmIChDQVJEYlNldFBoeVBhcmFtZXRlciggICBwTWdtdC0+cEFkYXB0ZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVQaHlUeXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwQ3Vyci0+d0NhcEluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBDdXJyLT5zRVJQLmJ5RVJQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5Q3VyclN1cHBSYXRlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUN1cnJFeHRTdXBwUmF0ZXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICApICE9IFRSVUUpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiPC0tLS1zX2JTeW5jaEJTUyBTZXQgUGh5IE1vZGUgRmFpbCBbJWRdXG4iLCBlUGh5VHlwZSk7CisgICAgICAgIHJldHVybjsKKyAgICB9CisgICAgLy8gc2V0IGNoYW5uZWwgYW5kIGNsZWFyIE5BVgorICAgIGlmIChDQVJEYlNldENoYW5uZWwocE1nbXQtPnBBZGFwdGVyLCBwQ3Vyci0+dUNoYW5uZWwpID09IEZBTFNFKSB7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIjwtLS0tc19iU3luY2hCU1MgU2V0IENoYW5uZWwgWyVkXVxuIiwgcEN1cnItPnVDaGFubmVsKTsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworLyoKKyAgICBmb3IgKGlpPTA7aWk8QkJfVkdBX0xFVkVMO2lpKyspIHsKKyAgICAgICAgaWYgKHBDdXJyLT5sZEJtTUFYPCBwRGV2aWNlLT5sZEJtVGhyZXNob2xkW2lpXSkgeworICAgICAgICAgICAgcERldmljZS0+YnlCQlZHQU5ldyA9IHBEZXZpY2UtPmFieUJCVkdBW2lpXTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJ5QkJWR0FOZXcgIT0gcERldmljZS0+YnlCQlZHQUN1cnJlbnQpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJSU1NJWyVkXSBOZXdHYWluWyVkXSBPbGRHYWluWyVkXSBcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAoaW50KXBDdXJyLT5sZEJtTUFYLCBwRGV2aWNlLT5ieUJCVkdBTmV3LCBwRGV2aWNlLT5ieUJCVkdBQ3VycmVudCk7CisgICAgICAgIHByaW50aygiUlNTSVslZF0gTmV3R2FpblslZF0gT2xkR2FpblslZF0gXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgKGludClwQ3Vyci0+bGRCbU1BWCwgcERldmljZS0+Y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gPT0gV0xBTl8xMWlfQ1NTX0NDTVApIHsKKwkJICAgICAgICAgICBwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQ7ICAgIC8vQUVTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJFbmN5cHRpb25fUmVidWlsZC0tLT5zc2lkIHJlc2V0IGNvbmZpZyB0byBbV1BBMlBTSy1BRVNdXG4iKTsKKyAgICAgIAkJICAgICAgIAl9CisgICAgICAgICAgICAgICAJfQorICAgICAgICAgICAgICB9CisgICAgICAgIC8vICB9CisgICAgICByZXR1cm47CisgfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgRm9ybWF0IFRJTSBmaWVsZAorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBWT0lECisgKgorLSovCisKK3N0YXRpYworVk9JRAorc192TWdyRm9ybWF0VElNKAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiBQV0xBTl9JRV9USU0gcFRJTQorICAgICkKK3sKKyAgICBCWVRFICAgICAgICBieU1hc2tbOF0gPSB7MSwgMiwgNCwgOCwgMHgxMCwgMHgyMCwgMHg0MCwgMHg4MH07CisgICAgQllURSAgICAgICAgYnlNYXA7CisgICAgVUlOVCAgICAgICAgaWksIGpqOworICAgIEJPT0wgICAgICAgIGJTdGFydEZvdW5kID0gRkFMU0U7CisgICAgQk9PTCAgICAgICAgYk11bHRpY2FzdCA9IEZBTFNFOworICAgIFdPUkQgICAgICAgIHdTdGFydEluZGV4ID0gMDsKKyAgICBXT1JEICAgICAgICB3RW5kSW5kZXggPSAwOworCisKKyAgICAvLyBGaW5kIHNpemUgb2YgcGFydGlhbCB2aXJ0dWFsIGJpdG1hcAorICAgIGZvciAoaWkgPSAwOyBpaSA8IChNQVhfTk9ERV9OVU0gKyAxKTsgaWkrKykgeworICAgICAgICBieU1hcCA9IHBNZ210LT5hYnlQU1R4TWFwW2lpXTsKKyAgICAgICAgaWYgKCFpaSkgeworICAgICAgICAgICAgLy8gTWFzayBvdXQgdGhlIGJyb2FkY2FzdCBiaXQgd2hpY2ggaXMgaW5kaWNhdGVkIHNlcGFyYXRlbHkuCisgICAgICAgICAgICBiTXVsdGljYXN0ID0gKGJ5TWFwICYgYnlNYXNrWzBdKSAhPSAwOworICAgICAgICAgICAgaWYoYk11bHRpY2FzdCkgeworICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVswXS5iUnhQU1BvbGwgPSBUUlVFOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYnlNYXAgPSAwOworICAgICAgICB9CisgICAgICAgIGlmIChieU1hcCkgeworICAgICAgICAgICAgaWYgKCFiU3RhcnRGb3VuZCkgeworICAgICAgICAgICAgICAgIGJTdGFydEZvdW5kID0gVFJVRTsKKyAgICAgICAgICAgICAgICB3U3RhcnRJbmRleCA9IGlpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgd0VuZEluZGV4ID0gaWk7CisgICAgICAgIH0KKyAgICB9OworCisKKyAgICAvLyBSb3VuZCBzdGFydCBpbmRleCBkb3duIHRvIG5lYXJlc3QgZXZlbiBudW1iZXIKKyAgICB3U3RhcnRJbmRleCAmPSAgfkJJVDA7CisKKyAgICAvLyBSb3VuZCBlbmQgaW5kZXggdXAgdG8gbmVhcmVzdCBldmVuIG51bWJlcgorICAgIHdFbmRJbmRleCA9ICgod0VuZEluZGV4ICsgMSkgJiB+QklUMCk7CisKKyAgICAvLyBTaXplIG9mIGVsZW1lbnQgcGF5bG9hZAorCisgICAgcFRJTS0+bGVuID0gIDMgKyAod0VuZEluZGV4IC0gd1N0YXJ0SW5kZXgpICsgMTsKKworICAgIC8vIEZpbGwgaW4gdGhlIEZpeGVkIHBhcnRzIG9mIHRoZSBUSU0KKyAgICBwVElNLT5ieURUSU1Db3VudCA9IHBNZ210LT5ieURUSU1Db3VudDsKKyAgIC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XTEFOX0VJRF9SU05fV1BBOworICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmxlbiA9IDEyOworICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmFieU9VSVswXSA9IDB4MDA7CisgICAgICAgICAgICBzRnJhbWUucFJTTldQQS0+YWJ5T1VJWzFdID0gMHg1MDsKKyAgICAgICAgICAgIHNGcmFtZS5wUlNOV1BBLT5hYnlPVUlbMl0gPSAweGYyOworICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmFieU9VSVszXSA9IDB4MDE7CisgICAgICAgICAgICBzRnJhbWUucFJTTldQQS0+d1ZlcnNpb24gPSAxOworICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmFieU11bHRpY2FzdFswXSA9IDB4MDA7CisgICAgICAgICAgICBzRnJhbWUucFJTTldQQS0+YWJ5TXVsdGljYXN0WzFdID0gMHg1MDsKKyAgICAgICAgICAgIHNGcmFtZS5wUlNOV1BBLT5hYnlNdWx0aWNhc3RbMl0gPSAweGYyOworICAgICAgICAgICAgaWYgKHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQpCisgICAgICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmFieU11bHRpY2FzdFszXSA9IDB4MDQ7Ly9BRVMKKyAgICAgICAgICAgIGVsc2UgaWYgKHBEZXZpY2UtPmVFbmNyeXB0aW9uU3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uMkVuYWJsZWQpCisgICAgICAgICAgICAgICAgc0ZyYW1lLnBSU05XUEEtPmFieU11bHRpY2FzdFszXSA9IDB4MDI7Ly9US0lQCisgICAgICAgICAgICBlbHNlIGlmIChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjFFbmFibGVkKQorICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOV1BBLT5hYn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wSUJTU0RGUy0+YWJ5REZTT3duZXIsCisgICAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+YWJ5SUJTU0RGU093bmVyLAorICAgICAgICAgICAgICAgICAgICAgICAgNik7CisgICAgICAgICAgICBwSUJTU0RGUy0+YnlERlNSZWNvdmVyeSA9IHBNZ210LT5ieUlCU1NERlNSZWNvdmVyeTsKKyAgICAgICAgICAgIHBieUJ1ZmZlciArPSAoNykgKyBXTEFOX0lFSERSX0xFTjsKKyAgICAgICAgICAgIHVMZW5ndGggKz0gKDcpICsgV0xBTl9JRUhEUl9MRU47CisgICAgICAgICAgICBmb3IoaWk9Q0JfTUFYX0NIQU5ORUxfMjRHKzE7IGlpPD1DQl9NQVhfQ0hBTk5FTDsgaWkrKyApIHsKKyAgICAgICAgICAgICAgICBpZiAoQ0FSRGJHZXRDaGFubmVsTWFwSW5mbyhwTWdtdC0+cEFkYXB0ZXIsIGlpLCBwYnlCdWZmZXIsIHBieUJ1ZmZlcisxKSA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgICAgIHBieUJ1ZmZlciArPSAyOworICAgICAgICAgICAgICAgICAgICB1TGVuZ3RoICs9IDI7CisgICAgICAgICAgICAgICAgICAgIHBJQlNTREZTLT5sZW4gKz0gMjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgc0ZyYW1lLmxlbiArPSB1TGVuZ3RoOworICAgIH0KKworICAgIGlmIChwTWdtdC0+ZUN1cnJlbnRQSFlNb2RlID09IFBIWV9UWVBFXzExRykgeworICAgICAgICBzRnJhbWUucEVSUCA9IChQV0xBTl9JRV9FUlApKHNGcmFtZS5wQnVmICsgc0ZyYW1lLmxlbik7CisgICAgICAgIHNGcmFtZS5sZW4gKz0gMSArIFdMQU5fSUVIRFJfTEVOOworICAgICAgICBzRnJhbWUucEVSUC0+YnlFbGVtZW50SUQgPSBXTEFOX0VJRF9FUlA7CisgICAgICAgIHNGcmFtZS5wRVJQ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ZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgJiYgKHBEZXZpY2UtPmJFbmFibGVIb3N0YXBkID09IFRSVUUpKSB7CisgICAgICAgICBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEFOT05FKSB7CisgICAgICAgICAgICAgaWYgKHBNZ210LT53V1BBSUVMZW4gIT0gMCkgeworICAgICAgICAgICAgICAgICBzRnJhbWUucFJTTiA9IChQV0xBTl9JRV9SU04pKHNGcmFtZS5wQnVmICsgc0ZyYW1lLmxlbik7CisgICAgICAgICAgICAgICAgIG1lbWNweShzRnJhbWUucFJTTiwgcE1nbXQtPmFieVdQQUlFLCBwTWdtdC0+d1dQQUlFTGVuKTsKKyAgICAgICAgICAgICAgICAgc0ZyYW1lLmxlbiArPSBwTWdtdC0+d1dQQUlFTGVuOworICAgICAgICAgICAgIH0KKyAgICAgICAgIH0KKyAgICB9CisKKyAgICAvKiBBZGp1c3QgdGhlIGxlbmd0aCBmaWVsZHMgKi8KKyAgICBwVHhQYWNrZXQtPmNiTVBEVUxlbiA9IHNGcmFtZS5sZW47CisgICAgcFR4UGFja2V0LT5jYlBheWxvYWRMZW4gPSBzRnJhbWUubGVuIC0gV0xBTl9IRFJfQUREUjNfTEVOOworCisgICAgcmV0dXJuIHBUeFBhY2tldDsKK30KKworCisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICogIENvbnN0cnVjdHMgYW4gUHJvYi1yZXNwb25zZSBmcmFtZQorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBQVFIgdG8gZnJhbWU7IG9yIE5VTEwgb24gYWxsb2NhdGlvbiBmYWlsdWUKKyAqCistKi8KKworCisKKworUFNUeE1nbXRQYWNrZXQKK3NfTWdyTWFrZVByb2JlUmVzcG9uc2UoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3Q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BwYnlCdWZmZXIpLT5sZW4gPSAyOworICAgICAgICAoKFBXTEFOX0lFX1RQQ19SRVApIHBieUJ1ZmZlciktPmJ5VHhQb3dlciA9IENBUkRieUdldFRyYW5zbWl0UG93ZXIocE1nbXQtPnBBZGFwdGVyKTsKKyAgICAgICAgKChQV0xBTl9JRV9UUENfUkVQKSBwYnlCdWZmZXIpLT5ieUxpbmtNYXJnaW4gPSAwOworICAgICAgICBwYnlCdWZmZXIgKz0gKDIpICsgV0xBTl9JRUhEUl9MRU47CisgICAgICAgIHVMZW5ndGggKz0gKDIpICsgV0xBTl9JRUhEUl9MRU47CisgICAgICAgIC8vIElCU1MgREZTCisgICAgICAgIGlmIChwTWdtdC0+ZUN1cnJNb2RlICE9IFdNQUNfTU9ERV9FU1NfQVApIHsKKyAgICAgICAgICAgIHBJQlNTREZTID0gKFBXTEFOX0lFX0lCU1NfREZTKSBwYnlCdWZmZXI7CisgICAgICAgICAgICBwSUJTU0RGUy0+YnlFbGVtZW50SUQgPSBXTEFOX0VJRF9JQlNTX0RGUzsKKyAgICAgICAgICAgIHBJQlNTREZTLT5sZW4gPSA3OworICAgICAgICAgICAgTUVNdkNvcHkoICAgcElCU1NERlMtPmFieURGU093bmVyLAorICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPmFieUlCU1NERlNPd25lciwKKyAgICAgICAgICAgICAgICAgICAgICAgIDYpOworICAgICAgICAgICAgcElCU1NERlMtPmJ5REZTUmVjb3ZlcnkgPSBwTWdtdC0+YnlJQlNTREZTUmVjb3Zlcnk7CisgICAgICAgICAgICBwYnlCdWZmZXIgKz0gKDcpICsgV0xBTl9JRUhEUl9MRU47CisgICAgICAgICAgICB1TGVuZ3RoICs9ICg3KSArIFdMQU5fSUVIRFJfTEVOOworICAgICAgICAgICAgZm9yKGlpPUNCX01BWF9DSEFOTkVMXzI0RysxOyBpaTw9Q0JfTUFYX0NIQU5ORUw7IGlpKysgKSB7CisgICAgICAgICAgICAgICAgaWYgKENBUkRiR2V0Q2hhbm5lbE1hcEluZm8ocE1nbXQtPnBBZGFwdGVyLCBpaSwgcGJ5QnVmZmVyLCBwYnlCdWZmZXIrMSkgPT0gVFJVRSkgeworICAgICAgICAgICAgICAgICAgICBwYnlCdWZmZXIgKz0gMjsKKyAgICAgICAgICAgICAgICAgICAgdUxlbmd0aCArPSAyOworICAgICAgICAgICAgICAgICAgICBwSUJTU0RGUy0+bGVuICs9IDI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIHNGcmFtZS5sZW4gKz0gdUxlbmd0aDsKKyAgICB9CisKKworICAgIGlmICgoKFBXTEFOX0lFX1NVUFBfUkFURVMpcEN1cnJFeHRTdXBwUmF0ZXMpLT5sZW4gIT0gMCkgeworICAgICAgICBzRnJhbWUucEV4dFN1cHBSYXRlcyA9IChQV0xBTl9JRV9TVVBQX1JBVEVTKShzRnJhbWUucEJ1ZiArIHNGcmFtZS5sZW4pOworICAgICAgICBzRnJhbWUubGVuICs9ICgoUFdMQU5fSUVfU1VQUF9SQVRFUylwQ3VyckV4dFN1cHBSYXRlcyktPmxlbiArIFdMQU5fSUVIRFJfTEVOOworICAgICAgICBNRU12Q29weShzRnJhbWUucEV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICBwQ3VyckV4dFN1cHBSYXRlcywKKyAgICAgICAgICAgICAoKFBXTEFOX0lFX1NVUFBfUkFURVMpcEN1cnJFeHRTdXBwUmF0ZXMpLT5sZW4gKyBXTEFOX0lFSERSX0xFTgorICAgICAgICAgICAgICk7CisgICAgfQorCisgICAgLy8gaG9zdGFwZCB3cGEvd3BhMiBJRQorICAgIGlmICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfRVNTX0FQKSAmJiAocERldmljZS0+YkVuYWJsZUhvc3RhcGQgPT0gVFJVRSkpIHsKKyAgICAgICAgIGlmIChwTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQU5PTkUpIHsKKyAgICAgICAgICAgICBpZiAocE1nbXQtPndXUEFJRUxlbiAhPSAwKSB7CisgICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOID0gKFBXTEFOX0lFX1JTTikoc0ZyYW1lLnBCdWYgKyBzRnJhbWUubGVuKTsKKyAgICAgICAgICAgICAgICAgbWVtY3B5KHNGcmFtZS5wUlNOLCBwTWdtdC0+YWJ5V1BBSUUsIHBNZ210LT53V1BBSUVMZW4pOworICAgICAgICAgICAgICAgICBzRnJhbWUubGVuICs9IHBNZ210LT53V1BBSUVMZW47CisgICAgICAgICAgICAgfQorICAgICAgICAgfQorICAgIH0KKworICAgIC8vIEFkanVzdCB0aGUgbGVuZ3RoIGZpZWxkcworICAgIHBUeFBhY2tldC0+Y2JNUERVTGVuID0gc0ZyYW1lLmxlbjsKKyAgICBwVHhQYWNrZXQtPmNiUGF5bG9hZExlbiA9IHNGcmFtZS5sZW4gLSBXTEFOX0hEUl9BRERSM19MRU47CisKKyAgICByZXR1cm4gcFR4UGFja2V0OworfQorCisKKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjoKKyAqICBDb25zdHJ1Y3RzIGFuIGFzc29jaWF0aW9uIHJlcXVlc3QgZnJhbWUKKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgQSBwdHIgdG8gZnJhbWUgb3IgTlVMTCBvbiBhbGxvY2F0aW9uIGZhaWx1ZQorICoKKy0qLworCisKK1BTVHhNZ210UGFja2V0CitzX01nck1ha2VBc3NvY1JlcXVlc3QoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUEJZVEUgcERBZGRyLAorICAgIElOIFdPUkQgd0N1cnJDYXBJbmZvLAorICAgIElOIFdPUkQgd0xpc3RlbkludGVydmFsLAorICAgIElOIFBXTEFOX0lFX1NTSUQgcEN1cnJTU0lELAorICAgIElOIFBXTEFOX0lFX1NVUFBfUkFURVMgcE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ICAgICBlbHNlIHsKKyAgICAgICAgICAgICpwYnlSU04rKz1XUEFfTk9ORTsKKyAgICAgICAgfQorICAgICAgICBzRnJhbWUucFJTTldQQS0+bGVuICs9NjsKKworICAgICAgICAvLyBSU04gQ2FwYWJpbGl0ZXMKKyAgICAgICAgKnBieVJTTisrPTB4MDA7CisgICAgICAgICpwYnlSU04rKz0weDAwOworICAgICAgICBzRnJhbWUucFJTTldQQS0+bGVuICs9MjsKKyAgICAgICAgc0ZyYW1lLmxlbiArPSBzRnJhbWUucFJTTldQQS0+bGVuICsgV0xBTl9JRUhEUl9MRU47CisgICAgICAgIC8vIGNvcHkgdG8gQXNzb2NJbmZvLiBmb3IgT0lEXzgwMl8xMV9BU1NPQ0lBVElPTl9JTkZPUk1BVElPTgorICAgICAgICBwTWdtdC0+c0Fzc29jSW5mby5Bc3NvY0luZm8uUmVxdWVzdElFTGVuZ3RoICs9IHNGcmFtZS5wUlNOV1BBLT5sZW4gKyBXTEFOX0lFSERSX0xFTjsKKyAgICAgICAgTUVNdkNvcHkocGJ5SUVzLCBzRnJhbWUucFJTTldQQSwgc0ZyYW1lLnBSU05XUEEtPmxlbiArIFdMQU5fSUVIRFJfTEVOKTsKKyAgICAgICAgcGJ5SUVzICs9IHNGcmFtZS5wUlNOV1BBLT5sZW4gKyBXTEFOX0lFSERSX0xFTjsKKworICAgIH0gZWxzZSBpZiAoKChwTWdtdC0+ZUF1dGhlbk1vZGUgPT0gV01BQ19BVVRIX1dQQTIpIHx8CisgICAgICAgICAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykpICYmCisgICAgICAgICAgICAgICAocE1nbXQtPnBDdXJyQlNTICE9IE5VTEwpKSB7CisgICAgICAgIFVJTlQgICAgICAgICAgICAgICAgaWk7CisgICAgICAgIFBXT1JEICAgICAgICAgICAgICAgcHdQTUtJRDsKKworICAgICAgICAvLyBXUEEgSUUKKyAgICAgICAgc0ZyYW1lLnBSU04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5hYnlSU05bMTRdID0gMHhBQzsKKyAgICAgICAgaWYgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykgeworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxNV0gPSBXTEFOXzExaV9BS01TU19QU0s7CisgICAgICAgIH0gZWxzZSBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSB7CisgICAgICAgICAgICBzRnJhbWUucFJTTi0+YWJ5UlNOWzE1XSA9IFdMQU5fMTFpX0FLTVNTXzgwMl8xWDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHNGcmFtZS5wUlNOLT5hYnlSU05bMTVdID0gV0xBTl8xMWlfQUtNU1NfVU5LTk9XTjsKKyAgICAgICAgfQorICAgICAgICBzRnJhbWUucFJTTi0+bGVuICs9NjsKKworICAgICAgICAvLyBSU04gQ2FwYWJpbGl0ZXMKKyAgICAgICAgaWYgKHBNZ210LT5wQ3VyckJTUy0+c1JTTkNhcE9iai5iUlNOQ2FwRXhpc3QgPT0gVFJVRSkgeworICAgICAgICAgICAgTUVNdkNvcHkoJnNGcmFtZS5wUlNOLT5hYnlSU05bMTZdLCAmcE1nbXQtPnBDdXJyQlNTLT5zUlNOQ2FwT2JqLndSU05DYXAsIDIpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxNl0gPSAwOworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxN10gPSAwOworICAgICAgICB9CisgICAgICAgIHNGcmFtZS5wUlNOLT5sZW4gKz0yOworCisgICAgICAgIGlmICgocERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9Db3VudCA+IDApICYmIChwRGV2aWNlLT5iUm9hbWluZyA9PSBUUlVFKSAmJiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSkgeworICAgICAgICAgICAgLy8gUlNOIFBNS0lECisgICAgICAgICAgICBwYnlSU04gPSAmc0ZyYW1lLnBSU04tPmFieVJTTlsxOF07CisgICAgICAgICAgICBwd1BNS0lEID0gKFBXT1JEKXBieVJTTjsgLy8gUG9pbnQgdG8gUE1LSUQgY291bnQKKyAgICAgICAgICAgICpwd1BNS0lEID0gMDsgICAgICAgICAgICAvLyBJbml0aWFsaXplIFBNS0lEIGNvdW50CisgICAgICAgICAgICBwYnlSU04gKz0gMjsgICAgICAgICAgICAgLy8gUG9pbnQgdG8gUE1LSUQgbGlzdAorICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgcERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9Db3VudDsgaWkrKykgeworICAgICAgICAgICAgICAgIGlmIChNRU1FcXVhbE1lbW9yeSgmcERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9baWldLkJTU0lEWzBdLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBVX0VUSEVSX0FERFJfTEVOKSkgeworICAgICAgICAgICAgICAgICAgICAoKnB3UE1LSUQpICsrOworICAgICAgICAgICAgICAgICAgICBNRU12Q29weShwYnlSU04sIHBEZXZpY2UtPmdzUE1LSUQuQlNTSURJbmZvW2lpXS5QTUtJRCwgMTYpOworICAgICAgICAgICAgICAgICAgICBwYnlSU04gKz0gMTY7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCpwd1BNS0lEICE9IDApIHsKKyAgICAgICAgICAgICAgICBzRnJhbWUucFJTTi0+bGVuICs9ICgyICsgKCpwd1BNS0lEKSoxNik7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBzRnJhbWUubGVuICs9IHNGcmFtZS5wUlNOLT5sZW4gKyBXTEFOX0lFSERSX0xFTjsKKyAgICAgICAgLy8gY29weSB0byBBc3NvY0luZm8uIGZvciBPSURfODAyXzExX0FTU09DSUFUSU9OX0lORk9STUFUSU9OCisgICAgICAgIHBNZ210LT5zQXNzb2NJbmZvLkFzc29jSW5mby5SZXF1ZXN0SUVMZW5ndGggKz0gc0ZyYW1lLnBSU04tPmxlbiArIFdMQU5fSUVIRFJfTEVOOworICAgICAgICBNRU12Q29weShwYnlJRXMsIHNGcmFtZS5wUlNOLCBzRnJhbWUucFJTTi0+bGVuICsgV0xBTl9JRUhEUl9MRU4pOworICAgICAgICBwYnlJRXMgKz0gc0ZyYW1lLnBSU04tPmxlbiArIFdMQU5fSUVIRFJfTEVOOworICAgIH0KKworCisgICAgLy8gQWRqdXN0IHRoZSBsZW5ndGggZmllbGRzCisgICAgcFR4UGFja2V0LT5jYk1QRFVMZW4gPSBzRnJhbWUubGVuOworICAgIHBUeFBhY2tldC0+Y2JQYXlsb2FkTGVuID0gc0ZyYW1lLmxlbiAtIFdMQU5fSERSX0FERFIzX0xFTjsKKyAgICByZXR1cm4gcFR4UGFja2V0OworfQorCisKKworCisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgQ29uc3RydWN0cyBhbiByZS1hc3NvY2lhdGlvbiByZXF1ZXN0IGZyYW1lCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIEEgcHRyIHRvIGZyYW1lIG9yIE5VTEwgb24gYWxsb2NhdGlvbiBmYWlsdWUKKyAqCistKi8KKworCitQU1R4TWdtdFBhY2tldAorc19NZ3JNYWtlUmVBc3NvY1JlcXVlc3QoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUEJZVEUgcERBZGRyLAorICAgIElOIFdPUkQgd0N1cnJDYXBJbmZvLAorICAgIElOIFdPUkQgd0xpc3RlbkludGVydmFsLAorICAgIElOIFBXTEFOX0lFX1NTSUQgcEN1cnJTU0lELAorICAgIElOIFBXTEFOX0lFX1NVUFBfUkFURVMgcEN1cnJSYXRlcywKKyAgICBJTiBQV0xBTl9JRV9TVVBQX1JBVEVTI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KyAgICAgICAgaWYgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykgeworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxNV0gPSBXTEFOXzExaV9BS01TU19QU0s7CisgICAgICAgIH0gZWxzZSBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSB7CisgICAgICAgICAgICBzRnJhbWUucFJTTi0+YWJ5UlNOWzE1XSA9IFdMQU5fMTFpX0FLTVNTXzgwMl8xWDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHNGcmFtZS5wUlNOLT5hYnlSU05bMTVdID0gV0xBTl8xMWlfQUtNU1NfVU5LTk9XTjsKKyAgICAgICAgfQorICAgICAgICBzRnJhbWUucFJTTi0+bGVuICs9NjsKKworICAgICAgICAvLyBSU04gQ2FwYWJpbGl0ZXMKKyAgICAgICAgaWYgKHBNZ210LT5wQ3VyckJTUy0+c1JTTkNhcE9iai5iUlNOQ2FwRXhpc3QgPT0gVFJVRSkgeworICAgICAgICAgICAgTUVNdkNvcHkoJnNGcmFtZS5wUlNOLT5hYnlSU05bMTZdLCAmcE1nbXQtPnBDdXJyQlNTLT5zUlNOQ2FwT2JqLndSU05DYXAsIDIpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxNl0gPSAwOworICAgICAgICAgICAgc0ZyYW1lLnBSU04tPmFieVJTTlsxN10gPSAwOworICAgICAgICB9CisgICAgICAgIHNGcmFtZS5wUlNOLT5sZW4gKz0yOworCisgICAgICAgIGlmICgocERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9Db3VudCA+IDApICYmIChwRGV2aWNlLT5iUm9hbWluZyA9PSBUUlVFKSAmJiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSkgeworICAgICAgICAgICAgLy8gUlNOIFBNS0lECisgICAgICAgICAgICBwYnlSU04gPSAmc0ZyYW1lLnBSU04tPmFieVJTTlsxOF07CisgICAgICAgICAgICBwd1BNS0lEID0gKFBXT1JEKXBieVJTTjsgLy8gUG9pbnQgdG8gUE1LSUQgY291bnQKKyAgICAgICAgICAgICpwd1BNS0lEID0gMDsgICAgICAgICAgICAvLyBJbml0aWFsaXplIFBNS0lEIGNvdW50CisgICAgICAgICAgICBwYnlSU04gKz0gMjsgICAgICAgICAgICAgLy8gUG9pbnQgdG8gUE1LSUQgbGlzdAorICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgcERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9Db3VudDsgaWkrKykgeworICAgICAgICAgICAgICAgIGlmIChNRU1FcXVhbE1lbW9yeSgmcERldmljZS0+Z3NQTUtJRC5CU1NJREluZm9baWldLkJTU0lEWzBdLCBwTWdtdC0+YWJ5Q3VyckJTU0lELCBVX0VUSEVSX0FERFJfTEVOKSkgeworICAgICAgICAgICAgICAgICAgICAoKnB3UE1LSUQpICsrOworICAgICAgICAgICAgICAgICAgICBNRU12Q29weShwYnlSU04sIHBEZXZpY2UtPmdzUE1LSUQuQlNTSURJbmZvW2lpXS5QTUtJRCwgMTYpOworICAgICAgICAgICAgICAgICAgICBwYnlSU04gKz0gMTY7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCpwd1BNS0lEICE9IDApIHsKKyAgICAgICAgICAgICAgICBzRnJhbWUucFJTTi0+bGVuICs9ICgyICsgKCpwd1BNS0lEKSoxNik7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBzRnJhbWUubGVuICs9IHNGcmFtZS5wUlNOLT5sZW4gKyBXTEFOX0lFSERSX0xFTjsKKyAgICAgICAgLy8gY29weSB0byBBc3NvY0luZm8uIGZvciBPSURfODAyXzExX0FTU09DSUFUSU9OX0lORk9STUFUSU9OCisgICAgICAgIHBNZ210LT5zQXNzb2NJbmZvLkFzc29j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nJFeHRTdXBwUmF0ZXMsCisgICAgICAgICAgICAgKChQV0xBTl9JRV9TVVBQX1JBVEVTKXBDdXJyRXh0U3VwcFJhdGVzKS0+bGVuICsgV0xBTl9JRUhEUl9MRU4KKyAgICAgICAgICAgICApOworICAgIH0KKworICAgIC8vIEFkanVzdCB0aGUgbGVuZ3RoIGZpZWxkcworICAgIHBUeFBhY2tldC0+Y2JNUERVTGVuID0gc0ZyYW1lLmxlbjsKKyAgICBwVHhQYWNrZXQtPmNiUGF5bG9hZExlbiA9IHNGcmFtZS5sZW4gLSBXTEFOX0hEUl9BRERSM19MRU47CisKKyAgICByZXR1cm4gcFR4UGFja2V0OworfQorCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKiAgSGFuZGxlcyBwcm9iZSByZXNwb25zZSBtYW5hZ2VtZW50IGZyYW1lcy4KKyAqCisgKgorICogUmV0dXJuIFZhbHVlOgorICogICAgbm9uZS4KKyAqCistKi8KKworc3RhdGljCitWT0lECitzX3ZNZ3JSeFByb2JlUmVzcG9uc2UoCisgICAgSU4gUFNEZXZpY2UgcERldmljZSwKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gUFNSeE1nbXRQYWNrZXQgcFJ4UGFja2V0CisgICAgKQoreworICAgIFBLbm93bkJTUyAgICAgICAgICAgcEJTU0xpc3QgPSBOVUxMOworICAgIFdMQU5fRlJfUFJPQkVSRVNQICAgc0ZyYW1lOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlDdXJyQ2hhbm5lbCA9IHBSeFBhY2tldC0+YnlSeENoYW5uZWw7CisgICAgRVJQT2JqZWN0ICAgICAgICAgICBzRVJQOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlJRUNoYW5uZWwgPSAwOworICAgIEJPT0wgICAgICAgICAgICAgICAgYkNoYW5uZWxIaXQgPSBUUlVFOworCisKKyAgICBtZW1zZXQoJnNGcmFtZSwgMCwgc2l6ZW9mKFdMQU5fRl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Mywgc0ZyYW1lLnBTU0lEKTsKKyAgICBpZiAocEJTU0xpc3QpIHsKKyAgICAgICAgQlNTYlVwZGF0ZVRvQlNTTGlzdCgoSEFORExFKXBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNGcmFtZS5wcXdUaW1lc3RhbXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNGcmFtZS5wd0JlYWNvbkludGVydmFsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzRnJhbWUucHdDYXBJbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5Q3VyckNoYW5uZWwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYkNoYW5uZWxIaXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzRVJQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOV1BBLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSUVfQ291bnRyeSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucElFX1F1aWV0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NMaXN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5sZW4gLSBXTEFOX0hEUl9BRERSM19MRU4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBNC5hYnlBZGRyNCwgICAvLyBwYXlsb2FkIG9mIHByb2JyZXNwb25zZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChIQU5ETEUpcFJ4UGFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJQcm9iZSByZXNwL2luc2VydDogUnhDaGFubmVsID0gOiAlZFxuIiwgYnlDdXJyQ2hhbm5lbCk7CisgICAgICAgIEJTU2JJbnNlcnRUb0JTU0xpc3QoKEhBTkRMRSlwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNGcmFtZS5wcXdUaW1lc3RhbXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnNGcmFtZS5wd0JlYWNvbkludGVydmFsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICpzRnJhbWUucHdDYXBJbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5Q3VyckNoYW5uZWwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzRVJQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wUlNOV1BBLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSUVfQ291bnRyeSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzRnJhbWUucElFX1F1aWV0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5sZW4gLSBXTEFOX0hEUl9BRERSM19MRU4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBNC5hYnlBZGRyNCwgICAvLyBwYXlsb2FkIG9mIGJlYWNvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChIQU5ETEUpcFJ4UGFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICApOworICAgIH0KKyAgICByZXR1cm47CisKK30KKworLyorCisgKgorICogUm91dGluZSBEZXNjcmlwdGlvbjooQVApb3IoQWQtaG9jIFNUQSkKKyAqICBIYW5kbGVzIHByb2JlIHJlcXVlc3QgbWFuYWdlbWVudCBmcmFtZXMuCisgKgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIG5vbmUuCisgKgorLSovCisKKworc3RhdGljCitWT0lECitzX3ZNZ3JSeFByb2JlUmVxdWVzdCgKKyAgICBJTiBQU0RldmljZSBwRGV2aWNlLAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiBQU1J4TWdtdFBhY2tldCBwUnhQYWNrZXQKKyAgICApCit7CisgICAgV0xBTl9GUl9QUk9CRVJFUSAgICBzRnJhbWU7CisgICAgQ01EX1NUQVRVUyAgICAgICAgICBTdGF0dXM7CisgICAgUFNUeE1nbXRQYWNrZXQgICAgICBwVHhQYWNrZXQ7CisgICAgQllURSAgICAgICAgICAgICAgICBieVBIWVR5cGUgPSBCQl9UWVBFXzExQjsKKworICAgIC8vIFNUQSBpbiBBZC1ob2MgbW9kZTogd2hlbiBsYXRlc3QgVEJUVCBiZWFjb24gdHJhbnNtaXQgc3VjY2VzcywKKyAgICAvLyBTVEEgaGF2ZSB0byByZXNwb25zZSB0aGlzIHJlcXVlc3QuCisgICAgaWYgKChwTWdtdC0+ZUN1cnJNb2RlID09IFdNQUNfTU9ERV9FU1NfQVApIHx8CisgICAgICAgICgocE1nbXQtPmVDdXJyTW9kZSA9PSBXTUFDX01PREVfSUJTU19TVEEpICYmIHBEZXZpY2UtPmJCZWFjb25TZW50KSkgeworCisgICAgICAgIG1lbXNldCgmc0ZyYW1lLCAwLCBzaXplb2YoV0xBTl9GUl9QUk9CRVJFUSkpOworICAgICAgICAvLyBkZWNvZGUgdGhlIGZyYW1lCisgICAgICAgIHNGcmFtZS5sZW4gPSBwUnhQYWNrZXQtPmNiTVBEVUxlbjsKKyAgICAgICAgc0ZyYW1lLnBCdWYgPSAoUEJZVEUpcFJ4UGFja2V0LT5wODAyMTFIZWFkZXI7CisgICAgICAgIHZNZ3JEZWNvZGVQcm9iZVJlcXVlc3QoJnNGcmFtZSk7CisvKgorICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJQcm9iZSByZXF1ZXN0IHJ4Ok1BQyBhZGRyOiUwMngtJTAyeC0lMDJ4PSUwMngtJTAyeC0lMDJ4IFxuIiwKKyAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbMF0sCisgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzFdLAorICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMlsyXSwKKyAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjJbM10sCisgICAgICAgICAgICAgICAgICBzRnJhbWUucEhkci0+c0EzLmFieUFkZHIyWzRdLAorICAgICAgICAgICAgICAgICAgc0ZyYW1lLnBIZHItPnNBMy5hYnlBZGRyMls1XQorICAgICAgICAgICAgICAgICk7CisqLworICAgICAgICBpZiAoc0ZyYW1lLnBTU0lELT5sZW4gIT0gMCkgeworICAgICAgICAgICAgaWYgKHNGcmFtZS5wU1NJRC0+bGVuICE9ICgoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5Q3VyclNTSUQpLT5sZW4pCisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgaWYgKG1lbWNtcChzRnJhbWUucFNTSUQtPmFieVNTSUQsCisgICAgICAgICAgICAgICAgICAgICAgICgoUFdMQU5fSUVfU1NJRClwTWdtdC0+YWJ5Q3VyclNTSUQpLT5hYnlTU0lELAorICAgICAgICAgICAgICAgICAgICAgICAoKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lEKS0+bGVuKSAhPSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIGlmICgoc0ZyYW1lLnBTdXBwUmF0ZXMtPmxlbiA+IDQpIHx8IChzRnJhbWUucEV4dFN1cHBSYXRlcyAhPSBOVUxMKSkgeworICAgICAgICAgICAgYnlQSFlUeXBlID0gQkJfVFlQRV8xMUc7CisgICAgICAgIH0KKworICAgICAgICAvLyBQcm9iZSByZXNwb25zZSByZXBseS4uCisgICAgICAgIHBUeFBhY2tldCA9IHNfTWdyTWFrZVByb2JlUmVzcG9uc2UKKyAgICAgICAgICAgICAgICAgICAgKAorICAgICAgICAgICAgICAgICAgICAgIHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQ2FwSW5mbywKKyAgICAgICAgICAgICAgICAgICAgICBwTWdtdC0+d0N1cnJCZWFjb25QZXJpb2QsCisgICAgICAgICAgICAgICAgICAgICAgcE1nbXQtPnVDdXJyQ2hhbm5lbCwKKyAgICAgICAgICAgICAgICAgICAgICAwLAorICAgICAgICAgICAgICAgICAgICAgIHNGcmFtZS5wSGRyLT5zQTMuYWJ5QWRkcjIsCisgICAgICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lELAorICAgICAgICAgICAgICAgICAgICAgIChQQllURSlwTWdtdC0+YWJ5Q3VyckJTU0lELAorICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyU3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TVVBQX1JBVEVTKXBNZ210LT5hYnlDdXJyRXh0U3VwcFJhdGVzLAorICAgICAgICAgICAgICAgICAgICAgICBieVBIWVR5cGUKKyAgICAgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgaWYgKHBUeFBhY2tldCAhPSBOVUxMICl7CisgICAgICAgICAgICAvKiBzZW5kIHRoZSBmcmFtZSAqLworICAgICAgICAgICAgU3RhdHVzID0gY3NNZ210X3htaXQocERldmljZSwgcFR4UGFja2V0KTsKKyAgICAgICAgICAgIGlmIChTdGF0dXMgIT0gQ01EX1NUQVRVU19QRU5ESU5HKSB7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiTWd0OlByb2JlIHJlc3BvbnNlIHR4IGZhaWxlZFxuIik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKy8vICAgICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIk1ndDpQcm9iZSByZXNwb25zZSB0eCBzZW5kaW5nLi5cbiIpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgcmV0dXJuOworfQorCisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKgorICogIEVudHJ5IHBvaW50IGZvciB0aGUgcmVjZXB0aW9uIGFuZCBoYW5kbGluZyBvZiA4MDIuMTEgbWFuYWdlbWVudAorICogIGZyYW1lcy4gTWFrZXMgYSBkZXRlcm1pbmF0aW9uIG9mIHRoZSBmcmFtZSB0eXBlIGFuZCB0aGVuIGNhbGxzCisgKiAgdGhlIGFwcHJvcHJpYXRlIGZ1bmN0aW9uLgorICoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICBub25lLgorICoKKy0qLworCisKK1ZPSUQKK3ZNZ3JSeE1hbmFnZVBhY2tldCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiBQU1J4TWdtdFBhY2tldCBwUnhQYWNrZXQKKyAgICAgKQoreworICAgIFBTRGV2aWNlICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgQk9PTCAgICAgICAgYkluU2NhbiA9IEZBTFNFOworICAgIFVJTlQgICAgICAgIHVOb2RlSW5kZXggPSAwOworICAgIE5PREVfU1RBVEUgIGVOb2RlU3RhdGUgPSAwOworICAgIENNRF9TVEFUVVMgIFN0YXR1czsKKworCisgICAgaWYgKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0VTU19BUCkgeworICAgICAgICBpZiAoQlNTREJiSXNTVEFJbk5vZGVEQihwTWdtdCwgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMiwgJnVOb2RlSW5kZXgpKQorICAgICAgICAgICAgZU5vZGVTdGF0ZSA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZU5vZGVTdGF0ZTsKKyAgICB9CisKKyAgICBzd2l0Y2goIFdMQU5fR0VUX0ZDX0ZTVFlQRSgocFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy53RnJhbWVDdGwpKSApeworCisgICAgICAgIGNhc2UgV0xBTl9GU1RZUEVfQVNTT0NSRVE6CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDIKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IGFzc29jcmVxXG4iKTsKKyAgICAgICAgICAgIGlmIChlTm9kZVN0YXRlIDwgTk9ERV9BVVRIKSB7CisgICAgICAgICAgICAgICAgLy8gc2VuZCBkZWF1dGggbm90aWZpY2F0aW9uCisgICAgICAgICAgICAgICAgLy8gcmVhc29uID0gKDYpIGNsYXNzIDIgcmVjZWl2ZWQgZnJvbSBub25hdXRoIHN0YQorICAgICAgICAgICAgICAgIHZNZ3JEZUF1dGhlbkJlZ2luU3RhKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN0YXR1cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAid21ncjogc2VuZCB2TWdyRGVBdXRoZW5CZWdpblN0YSAxXG4iKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIHNfdk1nclJ4QXNzb2NSZXF1ZXN0KHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQsIHVOb2RlSW5kZXgpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0ZTVFlQRV9BU1NPQ1JFU1A6CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDIKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IGFzc29jcmVzcDFcbiIpOworICAgICAgICAgICAgc192TWdyUnhBc3NvY1Jlc3BvbnNlKHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQsIEZBTFNFKTsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IGFzc29jcmVzcDJcbiIpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0ZTVFlQRV9SRUFTU09DUkVROgorICAgICAgICAgICAgLy8gRnJhbWUgQ2xhc2UgPSAyCisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJyeCByZWFzc29jcmVxXG4iKTsKKyAgICAgICAgICAgIC8vIFRvZG86IHJlYXNzb2MKKyAgICAgICAgICAgIGlmIChlTm9kZVN0YXRlIDwgTk9ERV9BVVRIKSB7CisgICAgICAgICAgICAgICAgLy8gc2VuZCBkZWF1dGggbm90aWZpY2F0aW9uCisgICAgICAgICAgICAgICAgLy8gcmVhc29uID0gKDYpIGNsYXNzIDIgcmVjZWl2ZWQgZnJvbSBub25hdXRoIHN0YQorICAgICAgICAgICAgICAgIHZNZ3JEZUF1dGhlbkJlZ2luU3RhKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN0YXR1cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAid21ncjogc2VuZCB2TWdyRGVBdXRoZW5CZWdpblN0YSAyXG4iKTsKKworICAgICAgICAgICAgfQorICAgICAgICAgICAgc192TWdyUnhSZUFzc29jUmVxdWVzdChwRGV2aWNlLCBwTWdtdCwgcFJ4UGFja2V0LCB1Tm9kZUluZGV4KTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgV0xBTl9GU1RZUEVfUkVBU1NPQ1JFU1A6CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDIKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IHJlYXNzb2NyZXNwXG4iKTsKKyAgICAgICAgICAgIHNfdk1nclJ4QXNzb2NSZXNwb25zZShwRGV2aWNlLCBwTWdtdCwgcFJ4UGFja2V0LCBUUlVFKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgV0xBTl9GU1RZUEVfUFJPQkVSRVE6CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDAKKyAgICAgICAgICAgIC8vREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicnggcHJvYmVyZXFcbiIpOworICAgICAgICAgICAgc192TWdyUnhQcm9iZVJlcXVlc3QocERldmljZSwgcE1nbXQsIHBSeFBhY2tldCk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fRlNUWVBFX1BST0JFUkVTUDoKKyAgICAgICAgICAgIC8vIEZyYW1lIENsYXNlID0gMAorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicnggcHJvYmVyZXNwXG4iKTsKKworICAgICAgICAgICAgc192TWdyUnhQcm9iZVJlc3BvbnNlKHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0ZTVFlQRV9CRUFDT046CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDAKKyAgICAgICAgICAgIC8vIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IGJlYWNvblxuIik7CisgICAgICAgICAgICBpZiAocE1nbXQtPmVTY2FuU3RhdGUgIT0gV01BQ19OT19TQ0FOTklORykgeworICAgICAgICAgICAgICAgIGJJblNjYW4gPSBUUlVFOworICAgICAgICAgICAgfTsKKyAgICAgICAgICAgIHNfdk1nclJ4QmVhY29uKHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQsIGJJblNjYW4pOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0ZTVFlQRV9BVElNOgorICAgICAgICAgICAgLy8gRnJhbWUgQ2xhc2UgPSAxCisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJyeCBhdGltXG4iKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgV0xBTl9GU1RZUEVfRElTQVNTT0M6CisgICAgICAgICAgICAvLyBGcmFtZSBDbGFzZSA9IDIKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IGRpc2Fzc29jXG4iKTsKKyAgICAgICAgICAgIGlmIChlTm9kZVN0YXRlIDwgTk9ERV9BVVRIKSB7CisgICAgICAgICAgICAgICAgLy8gc2VuZCBkZWF1dGggbm90aWZpY2F0aW9uCisgICAgICAgICAgICAgICAgLy8gcmVhc29uID0gKDYpIGNsYXNzIDIgcmVjZWl2ZWQgZnJvbSBub25hdXRoIHN0YQorICAgICAgICAgICAgICAgIHZNZ3JEZUF1dGhlbkJlZ2luU3RhKHBEZXZpY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFJ4UGFja2V0LT5wODAyMTFIZWFkZXItPnNBMy5hYnlBZGRyMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlN0YXR1cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7CisgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAid21ncjogc2VuZCB2TWdyRGVBdXRoZW5CZWdpblN0YSAzXG4iKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNfdk1nclJ4RGlzYXNzb2NpYXRpb24ocERldmljZSwgcE1nbXQsIHBSeFBhY2tldCk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFdMQU5fRlNUWVBFX0FVVEhFTjoKKyAgICAgICAgICAgIC8vIEZyYW1lIENsYXNlID0gMQorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAgInJ4IGF1dGhlblxuIik7CisgICAgICAgICAgICBzX3ZNZ3JSeEF1dGhlbnRpY2F0aW9uKHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBXTEFOX0ZTVFlQRV9ERUFVVEhFTjoKKyAgICAgICAgICAgIC8vIEZyYW1lIENsYXNlID0gMQorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicnggZGVhdXRoZW5cbiIpOworICAgICAgICAgICAgc192TWdyUnhEZWF1dGhlbnRpY2F0aW9uKHBEZXZpY2UsIHBNZ210LCBwUnhQYWNrZXQpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gInJ4IHVua25vd24gbWdtdFxuIik7CisgICAgfQorCisgICAgcmV0dXJuOworfQorCisKKworCisvKisKKyAqCisgKiBSb3V0aW5lIERlc2NyaXB0aW9uOgorICoKKyAqCisgKiAgUHJlcGFyZSBiZWFjb24gdG8gc2VuZAorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIFRSVUUgaWYgc3VjY2VzczsgRkFMU0UgaWYgZmFpbGVkLgorICoKKy0qLworQk9PTAorYk1nclByZXBhcmVCZWFjb25Ub1NlbmQoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOIFBTTWdtdE9iamVjdCBwTWdtdAorICAgICkKK3sKKyAgICBQU0RldmljZSAgICAgICAgICAgIHBEZXZpY2UgPSAoUFNEZXZpY2UpaERldmljZUNvbnRleHQ7CisgICAgUFNUeE1nbXRQYWNrZXQgICAgICBwVHhQYWNrZXQ7CisKKy8vICAgIHBEZXZpY2UtPmJCZWFjb25CdWZSZWFkeSA9IEZBTFNFOworICAgIGlmIChwRGV2aWNlLT5iRW5jcnlwdGlvbkVuYWJsZSB8fCBwRGV2aWNlLT5iRW5hYmxlODAyMXgpeworICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvIHw9IFdMQU5fU0VUX0NBUF9JTkZPX1BSSVZBQ1koMSk7CisgICAgfQorICAgIGVsc2UgeworICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvICY9IH5XTEFOX1NFVF9DQVBfSU5GT19QUklWQUNZKDEpOworICAgIH0KKyAgICBwVHhQYWNrZXQgPSBzX01nck1ha2VCZWFjb24KKyAgICAgICAgICAgICAgICAoCisgICAgICAgICAgICAgICAgICBwRGV2aWNlLAorICAgICAgICAgICAgICAgICAgcE1nbXQsCisgICAgICAgICAgICAgICAgICBwTWdtdC0+d0N1cnJDYXBJbmZvLAorICAgICAgICAgICAgICAgICAgcE1nbXQtPndDdXJyQmVhY29uUGVyaW9kLAorICAgICAgICAgICAgICAgICAgcE1nbXQtPnVDdXJyQ2hhbm5lbCwKKyAgICAgICAgICAgICAgICAgIHBNZ210LT53Q3VyckFUSU1XaW5kb3csIC8vMCwKKyAgICAgICAgICAgICAgICAgIChQV0xBTl9JRV9TU0lEKXBNZ210LT5hYnlDdXJyU1NJRCwKKyAgICAgICAgICAgICAgICAgIChQQllURSlwTWdtdC0+YWJ5Q3VyckJTU0lELAorICAgICAgICAgICAgICAgICAgKFBXTEFOX0lFX1NVUFBfUkFURVMpcE1nbXQtPmFieUN1cnJTdXBwUmF0ZXMsCisgICAgICAgICAgICAgICAgICAoUFdMQU5fSUVfU1VQUF9SQVRFUylwTWdtdC0+YWJ5Q3VyckV4dFN1cHBSYXRlcworICAgICAgICAgICAgICAgICk7CisKKyAgICBpZiAoKHBNZ210LT5lQ3Vyck1vZGUgPT0gV01BQ19NT0RFX0lCU1NfU1RBKSAmJgorICAgICAgICAocE1nbXQtPmFieUN1cnJCU1NJRFswXSA9PSAwKSkKKyAgICAgICAgcmV0dXJuIEZBTFNFOworCisgICAgY3NCZWFjb25feG1pdChwRGV2aWNlLCBwVHhQYWNrZXQpOworCisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworCisKKy8qKworICoKKyAqIFJvdXRpbmUgRGVzY3JpcHRpb246CisgKgorICogIExvZyBhIHdhcm5pbmcgbWVzc2FnZSBiYXNlZCBvbiB0aGUgY29udGVudHMgb2YgdGhlIFN0YXR1cworICogIENvZGUgZmllbGQgb2YgYW4gODAyLjExIG1hbmFnZW1lbnQgZnJhbWUuICBEZWZpbmVzIGFyZQorICogIGRlcml2ZWQgZnJvbSA4MDIuMTEtMTk5NyBTUEVDLgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqICAgIG5vbmUuCisgKgorLSovCitzdGF0aWMKK1ZPSUQKK3Nfdk1nckxvZ1N0YXR1cygKKyAgICBJTiBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gV09SRCAgd1N0YXR1cworICAgICkKK3sKKyAgICBzd2l0Y2goIHdTdGF0dXMgKXsKKyAgICAgICAgY2FzZSBXTEFOX01HTVRfU1RBVFVTX1VOU1BFQ19GQUlMVVJFOgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfTk9USUNFLCBLRVJOX0lORk8gIlN0YXR1cyBjb2RlID09IFVuc3BlY2lmaWVkIGVycm9yLlxuIik7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBXTEFOX01HTVRfU1RBV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QUkVBTUJMRToKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJTdGF0dXMgY29kZSA9PSBBc3NvYyBkZW5pZWQsIHdlIGRvIG5vdCBzdXBwb3J0IHNob3J0IHByZWFtYmxlLlxuIik7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBXTEFOX01HTVRfU1RBVFVTX0FTU09DX0RFTklFRF9QQkNDOgorICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfTk9USUNFLCBLRVJOX0lORk8gIlN0YXR1cyBjb2RlID09IEFzc29jIGRlbmllZCwgd2UgZG8gbm90IHN1cHBvcnQgUEJDQy5cbiIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgV0xBTl9NR01UX1NUQVRVU19BU1NPQ19ERU5JRURfQUdJTElUWToKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX05PVElDRSwgS0VSTl9JTkZPICJTdGF0dXMgY29kZSA9PSBBc3NvYyBkZW5pZWQsIHdlIGRvIG5vdCBzdXBwb3J0IGNoYW5uZWwgYWdpbGl0eS5cbiIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9OT1RJQ0UsIEtFUk5fSU5GTyAiVW5rbm93biBzdGF0dXMgY29kZSAlZC5cbiIsIHdTdGF0dXMpOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorfQorCisKKy8qCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBBZGQgQlNTSUQgaW4gUE1LSUQgQ2FuZGlkYXRlIGxpc3QuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgICAgIHBieUJTU0lEIC0gQlNTSUQgYWRkcmVzcyBmb3I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H4oTkRJU184MDJfMTFfUE1LSURfQ0FORElEQVRFX1BSRUFVVEhfRU5BQkxFRCk7CisgICAgfQorICAgIE1FTXZDb3B5KHBDYW5kaWRhdGVMaXN0LT5CU1NJRCwgcGJ5QlNTSUQsIFVfRVRIRVJfQUREUl9MRU4pOworICAgIHBEZXZpY2UtPmdzUE1LSURDYW5kaWRhdGUuTnVtQ2FuZGlkYXRlcysrOworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iTnVtQ2FuZGlkYXRlczolZFxuIiwgKGludClwRGV2aWNlLT5nc1BNS0lEQ2FuZGlkYXRlLk51bUNhbmRpZGF0ZXMpOworICAgIHJldHVybiBUUlVFOworfQorCisvKgorICoKKyAqIERlc2NyaXB0aW9uOgorICogICAgRmx1c2ggUE1LSUQgQ2FuZGlkYXRlIGxpc3QuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgaERldmljZUNvbnRleHQgLSBkZXZpY2Ugc3RydWN0dXJlIHBvaW50CisgKiAgT3V0OgorICogICAgICBub25lCisgKgorICogUmV0dXJuIFZhbHVlOiBub25lLgorICoKKy0qLworVk9JRAordkZsdXNoX1BNS0lEX0NhbmRpZGF0ZSAoCisgICAgSU4gSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKQoreworICAgIFBTRGV2aWNlICAgICAgICBwRGV2aWNlID0gKFBTRGV2aWNlKWhEZXZpY2VDb250ZXh0OworCisgICAgaWYgKHBEZXZpY2UgPT0gTlVMTCkKKyAgICAgICAgcmV0dXJuOworCisgICAgWkVST19NRU1PUlkoJnBEZXZpY2UtPmdzUE1LSURDYW5kaWRhdGUsIHNpemVvZihTUE1LSURDYW5kaWRhdGVFdmVudCkpOworfQorCitzdGF0aWMgQk9PTAorc19iQ2lwaGVyTWF0Y2ggKAorICAgIElOIFBLbm93bkJTUyAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NOb2RlLAorICAgIElOIE5ESVNfODAyXzExX0VOQ1JZUFRJT05fU1RBVFVTICAgIEVuY1N0YXR1cywKKyAgICBPVVQgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlDQ1NQSywKKyAgICBPVVQgUEJZVEUgICAgICAgICAgICAgICAgICAgICAgICAgICBwYnlDQ1NHSworICAgICkKK3sKKyAgICBCWVRFIGJ5TXVsdGljYXN0Q2lwaGVyID0gS0VZX0NUTF9JTlZBTElEOworICAgIEJZVEUgYnlDaXBoZXJNYXNrID0gMHgwMDsKKyAgICBpbnQgaTsKKworICAgIGlmIChwQlNTTm9kZSA9PSBOVUxMKQorICAgICAgICByZXR1cm4gRkFMU0U7CisKKyAgICAvLyBjaGVjayBjYXAuIG9mIEJTUworCisgICAgaWYgKChXTEFOX0dFVF9DQVBfSU5GT19QUklWQUNZKHBCU1NOb2RlLT53Q2FwSW5mbykgIT0gMCkgJiYKKyAgICAgICAgIChFbmNTdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24xRW5hYmxlZCkpIHsKKyAgICAgICAgLy8gZGVmYXVsdCBpcyBXRVAgb25seQorICAgICAgICBieU11bHRpY2FzdENpcGhlciA9IEtFWV9DVExfV0VQOworICAgIH0KKworICAgIGlmICgoV0xBTl9HRVRfQ0FQX0lORk9fUFJJVkFDWShwQlNTTm9kZS0+d0NhcEluZm8pICE9IDApICYmCisgICAgICAgIChwQlNTTm9kZS0+YldQQTJWYWxpZCA9PSBUUlVFKSAmJgorICAgICAgICAoKEVuY1N0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjNFbmFibGVkKXx8KEVuY1N0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkKSkpIHsKKworICAgICAgICAvL1dQQTIKKyAgICAgICAgLy8gY2hlY2sgR3JvdXAgS2V5IENpcGhlcgorICAgICAgICBpZiAoKHBCU1NOb2RlLT5ieUNTU0dLID09IFdMQU5fMTFpX0NTU19XRVA0MCkgfHwKKyAgICAgICAg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GljYXN0Q2lwaGVyID0gS0VZX0NUTF9US0lQOworICAgICAgICB9IGVsc2UgaWYgKHBCU1NOb2RlLT5ieUdLVHlwZSA9PSBXUEFfQUVTQ0NNUCkgeworICAgICAgICAgICAgYnlNdWx0aWNhc3RDaXBoZXIgPSBLRVlfQ1RMX0NDTVA7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBieU11bHRpY2FzdENpcGhlciA9IEtFWV9DVExfSU5WQUxJRDsKKyAgICAgICAgfQorCisgICAgICAgIC8vIGNoZWNrIFBhaXJ3aXNlIEtleSBDaXBoZXIKKyAgICAgICAgZm9yKGk9MDtpPHBCU1NOb2RlLT53UEtDb3VudDtpKyspIHsKKyAgICAgICAgICAgIGlmIChwQlNTTm9kZS0+YWJ5UEtUeXBlW2ldID09IFdQQV9US0lQKSB7CisgICAgICAgICAgICAgICAgYnlDaXBoZXJNYXNrIHw9IDB4MDI7CisgICAgICAgICAgICB9IGVsc2UgaWYgKHBCU1NOb2RlLT5hYnlQS1R5cGVbaV0gPT0gV1BBX0FFU0NDTVApIHsKKyAgICAgICAgICAgICAgICBieUNpcGhlck1hc2sgfD0gMHgwNDsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAocEJTU05vZGUtPmFieVBLVHlwZVtpXSA9PSBXUEFfTk9ORSkgeworICAgICAgICAgICAgICAgIC8vIHVzZSBncm91cCBrZXkgb25seSBpZ25vcmUgYWxsIG90aGVycworICAgICAgICAgICAgICAgIGJ5Q2lwaGVyTWFzayA9IDA7CisgICAgICAgICAgICAgICAgaSA9IHBCU1NOb2RlLT53UEtDb3VudDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iJWQsICVkLCAlZCwgJWQsIEVuY1N0YXR1czolZFxuIiwKKyAgICAgICAgYnlNdWx0aWNhc3RDaXBoZXIsIGJ5Q2lwaGVyTWFzaywgcEJTU05vZGUtPmJXUEFWYWxpZCwgcEJTU05vZGUtPmJXUEEyVmFsaWQsIEVuY1N0YXR1cyk7CisKKyAgICAvLyBtYXNrIG91ciBjYXAuIHdpdGggQlNTCisgICAgaWYgKEVuY1N0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjFFbmFibGVkKSB7CisgICAgICAgIC8vIEZvciBzdXBwb3J0aW5nIENpc2NvIG1pZ3JhdGlvbiBtb2RlLCBkb24ndCBjYXJlIHBhaXJ3aXNlIGtleSBjaXBoZXIKKyAgICAgICAgaWYgKChieU11bHRpY2FzdENpcGhlciA9PSBLRVlfQ1RMX1dFUCkgJiYKKyAgICAgICAgICAgIChieUNpcGhlck1hc2sgPT0gMCkpIHsKKyAgICAgICAgICAgICpwYnlDQ1NHSyA9IEtFWV9DVExfV0VQOworICAgICAgICAgICAgKnBieUNDU1BLID0gS0VZX0NUTF9OT05FOworICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0KKworICAgIH0gZWxzZSBpZiAoRW5jU3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uMkVuYWJsZWQpIHsKKyAgICAgICAgaWYgKChieU11bHRpY2FzdENpcGhlciA9PSBLRVlfQ1RMX1RLSVApICYmCisgICAgICAgICAgICAoYnlDaXBoZXJNYXNrID09IDApKSB7CisgICAgICAgICAgICAqcGJ5Q0NTR0sgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICAqcGJ5Q0NTUEsgPSBLRVlfQ1RMX05PTkU7CisgICAgICAgICAgICByZXR1cm4gVFJVRTsKKyAgICAgICAgfSBlbHNlIGlmICgoYnlNdWx0aWNhc3RDaXBoZXIgPT0gS0VZX0NUTF9XRVApICYmCisgICAgICAgICAgICAgICAgICAgKChieUNpcGhlck1hc2sgJiAweDAyKSAhPSAwKSkgeworICAgICAgICAgICAgKnBieUNDU0dLID0gS0VZX0NUTF9XRVA7CisgICAgICAgICAgICAqcGJ5Q0NTUEsgPSBLRVlfQ1RMX1RLSVA7CisgICAgICAgICAgICByZXR1cm4gVFJVRTsKKyAgICAgICAgfSBlbHNlIGlmICgoYnlNdWx0aWNhc3RDaXBoZXIgPT0gS0VZX0NUTF9US0lQKSAmJgorICAgICAgICAgICAgICAgICAgICgoYnlDaXBoZXJNYXNrICYgMHgwMikgIT0gMCkpIHsKKyAgICAgICAgICAgICpwYnlDQ1NHSyA9IEtFWV9DVExfVEtJUDsKKyAgICAgICAgICAgICpwYnlDQ1NQSyA9IEtFWV9DVExfVEtJUDsKKyAgICAgICAgICAgIHJldHVybiBUUlVFOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICB9CisgICAgfSBlbHNlIGlmIChFbmNTdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICBpZiAoKGJ5TXVsdGljYXN0Q2lwaGVyID09IEtFWV9DVExfQ0NNUCkgJiYKKyAgICAgICAgICAgIChieUNpcGhlck1hc2sgPT0gMCkpIHsKKyAgICAgICAgICAgIC8vIFdoZW4gQ0NNUCBpcyBlbmFibGUsICJVc2UgZ3JvdXAgY2lwaGVyIHN1aXRlIiBzaGFsbCBub3QgYmUgYSB2YWxpZCBvcHRpb24uCisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0gZWxzZSBpZiAoKGJ5TXVsdGljYXN0Q2lwaGVyID09IEtFWV9DVExfV0VQKSAmJgorICAgICAgICAgICAgICAgICAgICgoYnlDaXBoZXJNYXNrICYgMHgwNCkgIT0gMCkpIHsKKyAgICAgICAgICAgICpwYnlDQ1NHSyA9IEtFWV9DVExfV0VQOworICAgICAgICAgICAgKnBieUNDU1BLID0gS0VZX0NUTF9DQ01QOworICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgIH0gZWxzZSBpZiAoKGJ5TXVsdGlj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ndGg7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgT2Zmc2V0UmVxdWVzdElFczsKKyAgICBVU0hPUlQgICAgICAgICAgICAgICAgICBBdmFpbGFibGVSZXNwb25zZUZpeGVkSUVzOworICAgIE5ESVNfODAyXzExX0FJX1JFU0ZJICAgIFJlc3BvbnNlRml4ZWRJRXM7CisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgUmVzcG9uc2VJRUxlbmd0aDsKKyAgICBVTE9ORyAgICAgICAgICAgICAgICAgICBPZmZzZXRSZXNwb25zZUlFczsKK30gTkRJU184MDJfMTFfQVNTT0NJQVRJT05fSU5GT1JNQVRJT04sICpQTkRJU184MDJfMTFfQVNTT0NJQVRJT05fSU5GT1JNQVRJT047CisKKworCit0eXBlZGVmIHN0cnVjdCB0YWdTQXNzb2NJbmZvIHsKKyAgICBORElTXzgwMl8xMV9BU1NPQ0lBVElPTl9JTkZPUk1BVElPTiAgICAgQXNzb2NJbmZvOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYnlJRXNbV0xBTl9CRUFDT05fRlJfTUFYTEVOK1dMQU5fQkVBQ09OX0ZSX01BWExFTl07CisgICAgLy8gc3RvcmUgUmVxSUVzIHNldCBieSBPSURfODAyXzExX0FTU09DSUFUSU9OX0lORk9STUFUSU9OCisgICAgVUxPTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlcXVlc3RJRUxlbmd0aDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWJ5UmVxSUVzW1dMQU5fQkVBQ09OX0ZSX01BWExFTl07Cit9IFNBc3NvY0luZm8sIERFRiogUFNBc3NvY0luZm87CisvLy0tLQorCisKKy8qCit0eXBlZGVmIGVudW0gdGFnV01BQ19BVVRIRU5USUNBVElPTl9NT0RFIHsKKworCisgICAgV01BQ19BVVRIX09QRU4sCisgICAgV01BQ19BVVRIX1NIQVJFS0VZLAorICAgIFd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TU19TVEEsCisgICAgV01BQ19NT0RFX0lCU1NfU1RBLAorICAgIFdNQUNfTU9ERV9FU1NfQVAKKworfSBXTUFDX0NVUlJFTlRfTU9ERSwgKlBXTUFDX0NVUlJFTlRfTU9ERTsKKworLyoKK3R5cGVkZWYgZW51bSB0YWdXTUFDX1BPV0VSX01PREUgeworCisgICAgV01BQ19QT1dFUl9DQU0sCisgICAgV01BQ19QT1dFUl9GQVNULAorICAgIFdNQUNfUE9XRVJfTUFYCisKK30gV01BQ19QT1dFUl9NT0RFLCAqUFdNQUNfUE9XRVJfTU9ERTsKKyovCisKKworLy8gVHggTWFuYWdtZW50IFBhY2tldCBkZXNjcmlwdG9yCit0eXBlZGVmIHN0cnVjdCB0YWdTVHhNZ210UGFja2V0IHsKKworICAgIFBVV0xBTl84MDIxMUhEUiAgICAgcDgwMjExSGVhZGVyOworICAgIFVJTlQgICAgICAgICAgICAgICAgY2JNUERVTGVuOworICAgIFVJTlQgICAgICAgICAgICAgICAgY2JQYXlsb2FkTGVuOworCit9IFNUeE1nbXRQYWNrZXQsIERFRiogUFNUeE1nbXRQYWNrZXQ7CisKKworLy8gUnggTWFuYWdtZW50IFBhY2tldCBkZXNjcmlwdG9yCit0eXBlZGVmIHN0cnVjdCB0YWdTUnhNZ210UGFja2V0IHsKKworICAgIFBVV0xBTl84MDIxMUhEUiAgICAgcDgwMjExSGVhZGVyOworICAgIFFXT1JEICAgICAgICAgICAgICAgcXdMb2NhbFRTRjsKKyAgICBVSU5UICAgICAgICAgICAgICAgIGNiTVBEVUxlbjsKKyAgICBVSU5UICAgICAgICAgICAgICAgIGNiUGF5bG9hZExlbjsKKyAgICBVSU5UICAgICAgICAgICAgICAgIHVSU1NJOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlTUTsKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5UnhSYXRlOworICAgIEJZVEUgICAgICAgICAgICAgICAgYnlSeENoYW5uZWw7CisKK30gU1J4TWdtdFBhY2tldCwgREVGKiBQU1J4TWdtdFBhY2tldDsKKworCisKK3R5cGVkZWYgc3RydWN0IHRhZ1NNZ210T2JqZWN0Cit7CisKKyAgICBQVk9JRCAgICAgICAgICAgICAgICAgICBwQWRhcHRlcjsKKyAgICAvLyBNQUMgYWRkcmVzcworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieU1BQ0FkZHJbV0xBTl9BRERSX0xFTl07CisKKyAgICAvLyBDb25maWd1cmF0aW9uIE1vZGUKKyAgICBXTUFDX0NPTkZJR19NT0RFICAgICAgICBlQ29uZmlnTW9kZTsgLy8gTUFDIHByZS1jb25maWdlZCBtb2RlCisgICAgQ0FSRF9QSFlfVFlQRSAgICAgICAgICAgZUN1cnJlbnRQSFlNb2RlOworICAgIENBUkRfUEhZX1RZUEUgICAgICAgICAgIGVDb25maWdQSFlNb2RlOworCisKKyAgICAvLyBPcGVyYXRpb24gc3RhdGUgdmFyaWFibGVzCisgICAgV01BQ19DVVJSRU5UX01PREUgICAgICAgZUN1cnJNb2RlOyAgIC8vIE1BQyBjdXJyZW50IGNvbm5lY3Rpb24gbW9kZQorICAgIFdNQUNfQlNTX1NUQVRFICAgICAgICAgIGVDdXJyU3RhdGU7ICAvLyBNQUMgY3VycmVudCBCU1Mgc3RhdGUKKworICAgIFBLbm93bkJTUyAgICAgICAgICAgICAgIHBDdXJyQlNTOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5Q1NTR0s7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlDU1NQSzsKKworLy8gICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5TmV3U3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU5dOworLy8gICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5TmV3RXh0U3VwcFJhdGVzW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9SQVRFU19NQVhMRU5dOworCisgICAgLy8gQ3VycmVudCBzdGF0ZSB2YXJzCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUN1cnJDaGFubmVsOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUN1cnJTdXBwUmF0ZXNbV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1JBVEVTX01BWExFTiArIDFdOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUN1cnJFeHRTdXBwUmF0ZXNbV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1JBVEVTX01BWExFTiArIDFdOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUN1cnJTU0lEW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDFdOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUN1cnJCU1NJRFtXTEFOX0JTU0lEX0xFTl07CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd0N1cnJDYXBJbmZvOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdDdXJyQUlEOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdDdXJyQVRJTVdpbmRvdzsKKyAgICBXT1JEICAgICAgICAgICAgICAgICAgICB3Q3VyckJlYWNvblBlcmlvZDsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiSXNEUzsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieUVSUENvbnRleHQ7CisKKyAgICBDTURfU1RBVEUgICAgICAgICAgICAgICBlQ29tbWFuZFN0YXRlOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVTY2FuQ2hhbm5lbDsKKworICAgIC8vIERlc2lyZSBqb2lubmluZyBCU1MgdmFycworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieURlc2lyZVNTSURbV0xBTl9JRUhEUl9MRU4gKyBXTEFOX1NTSURfTUFYTEVOICsgMV07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5RGVzaXJlQlNTSURbV0xBTl9CU1NJRF9MRU5dOworCisgICAgLy8gQWRob2Mgb3IgQVAgY29uZmlndXJhdGlvbiB2YXJzCisgIC8vQllURSAgICAgICAgICAgICAgICAgICAgYWJ5QWRIb2NTU0lEW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDFdOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdJQlNTQmVhY29uUGVyaW9kOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdJQlNTQVRJTVdpbmRvdzsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1SUJTU0NoYW5uZWw7CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5SUJTU1N1cHBSYXRlc1tXTEFOX0lFSERSX0xFTiArIFdMQU5fUkFURVNfTUFYTEVOICsgMV07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYnlBUEJCVHlwZTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlXUEFJRVtNQVhfV1BBX0lFX0xFTl07CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd1dQQUlFTGVuOworCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUFzc29jQ291bnQ7CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYk1vcmVEYXRhOworCisgICAgLy8gU2NhbiBzdGF0ZSB2YXJzCisgICAgV01BQ19TQ0FOX1NUQVRFICAgICAgICAgZVNjYW5TdGF0ZTsKKyAgICBXTUFDX1NDQU5fVFlQRSAgICAgICAgICBlU2NhblR5cGU7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdVNjYW5TdGFydENoOworICAgIFVJTlQgICAgICAgICAgICAgICAgICAgIHVTY2FuRW5kQ2g7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd1NjYW5TdGVwczsKKyAgICBVSU5UICAgICAgICAgICAgICAgICAgICB1U2NhbkJTU1R5cGU7CisgICAgLy8gRGVzaXJlIHNjYW5uaWcgdmFycworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieVNjYW5TU0lEW1dMQU5fSUVIRFJfTEVOICsgV0xBTl9TU0lEX01BWExFTiArIDFdOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieVNjYW5CU1NJRFtXTEFOX0JTU0lEX0xFTl07CisKKyAgICAvLyBQcml2YWN5CisgICAgV01BQ19BVVRIRU5USUNBVElPTl9NT0RFIGVBdXRoZW5Nb2RlOworICAgIFdNQUNfRU5DUllQVElPTl9NT0RFICAgIGVFbmNyeXB0aW9uTW9kZTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiU2hhcmVLZXlBbGdvcml0aG07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5Q2hhbGxlbmdlW1dMQU5fQ0hBTExFTkdFX0xFTl07CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYlByaXZhY3lJbnZva2VkOworCisgICAgLy8gUmVjZWl2ZWQgYmVhY29uIHN0YXRlIHZhcnMKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiSW5USU07CisgICAgQk9PTCAgICAgICAgICAgICAgICAgICAgYk11bHRpY2FzdFRJTTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieURUSU1Db3VudDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieURUSU1QZXJpb2Q7CisKKyAgICAvLyBQb3dlciBzYXZpbmcgc3RhdGUgdmFycworICAgIFdNQUNfUE9XRVJfTU9ERSAgICAgICAgIGVQU01vZGU7CisgICAgV09SRCAgICAgICAgICAgICAgICAgICAgd0xpc3RlbkludGVydmFsOworICAgIFdPUkQgICAgICAgICAgICAgICAgICAgIHdDb3VudFRvV2FrZVVwOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJJblRJTVdha2U7CisgICAgUEJZVEUgICAgICAgICAgICAgICAgICAgcGJ5UFNQYWNrZXRQb29sOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5UFNQYWNrZXRQb29sW3NpemVvZihTVHhNZ210UGFja2V0KSArIFdMQU5fTlVMTERBVEFfRlJfTUFYTEVOXTsKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiUnhCZWFjb25JblRCVFRXYWtlOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieVBTVHhNYXBbTUFYX05PREVfTlVNICsgMV07CisKKyAgICAvLyBtYW5hZ21lbnQgY29tbWFuZCByZWxhdGVkCisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUNtZEJ1c3k7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUNtZEhvc3RBUEJ1c3k7CisKKyAgICAvLyBtYW5hZ21lbnQgcGFja2V0IHBvb2wKKyAgICBQQllURSAgICAgICAgICAgICAgICAgICBwYnlNZ210UGFja2V0UG9vbDsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieU1nbXRQYWNrZXRQb29sW3NpemVvZihTVHhNZ210UGFja2V0KSArIFdMQU5fQTNGUl9NQVhMRU5dOworCisKKyAgICAvLyBPbmUgc2Vjb25kIGNhbGxiYWNrIHRpbWVyCisgICAgc3RydWN0IHRpbWVyX2xpc3QJICAgIHNUaW1lclNlY29uZENhbGxiYWNrOworCisgICAgLy8gVGVtcG9yYXJpbHkgUnggTWdtdCBQYWNrZXQgRGVzY3JpcHRvcgorICAgIFNSeE1nbXRQYWNrZXQgICAgICAgICAgIHNSeFBhY2tldDsKKworICAgIC8vIGxpbmsgbGlzdCBvZiBrbm93biBic3MncyAoc2NhbiByZXN1bHRzKQorICAgIEtub3duQlNTICAgICAgICAgICAgICAgIHNCU1NMaXN0W01BWF9CU1NfTlVNXTsKKworCisKKyAgICAvLyB0YWJsZSBsaXN0IG9mIGtub3duIG5vZGUKKyAgICAvLyBzTm9kZURCTGlzdFswXSBpcyByZXNlcnZlZCBmb3IgQVAgdW5kZXIgSW5mcmEgbW9kZQorICAgIC8vIHNOb2RlREJMaXN0WzBdIGlzIHJlc2VydmVkIGZvciBNdWx0aWNhc3QgdW5kZXIgYWRob2MvQVAgbW9kZQorICAgIEtub3duTm9kZURCICAgICAgICAgICAgIHNOb2RlREJUYWJsZVtNQVhfTk9ERV9OVU0gKyAxXTsKKworCisKKyAgICAvLyBXUEEyIFBNS0lEIENhY2hlCisgICAgU1BNS0lEQ2FjaGUgICAgICAgICAgICAgZ3NQTUtJRENhY2hlOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJSb2FtaW5nOworCisgICAgLy8gcmF0ZSBmYWxsIGJhY2sgdmFycworCisKKworICAgIC8vIGFzc29jaWF0ZSBpbmZvCisgICAgU0Fzc29jSW5mbyAgICAgICAgICAgICAgc0Fzc29jSW5mbzsKKworCisgICAgLy8gZm9yIDgwMi4xMWgKKyAgICBCT09MICAgICAgICAgICAgICAgICAgICBiMTFoRW5hYmxlOworICAgIEJPT0wgICAgICAgICAgICAgICAgICAgIGJTd2l0Y2hDaGFubmVsOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGJ5TmV3Q2hhbm5lbDsKKyAgICBQV0xBTl9JRV9NRUFTVVJFX1JFUCAgICBwQ3Vyck1lYXN1cmVFSURSZXA7CisgICAgVUlOVCAgICAgICAgICAgICAgICAgICAgdUxlbmd0aE9mUmVwRUlEczsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBhYnlDdXJyZW50TVNSUmVxW3NpemVvZihTVHhNZ210UGFja2V0KSArIFdMQU5fQTNGUl9NQVhMRU5dOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUN1cnJlbnRNU1JSZXBbc2l6ZW9mKFNUeE1nbXRQYWNrZXQpICsgV0xBTl9BM0ZSX01BWExFTl07CisgICAgQllURSAgICAgICAgICAgICAgICAgICAgYWJ5SUVDb3VudHJ5W1dMQU5fQTNGUl9NQVhMRU5dOworICAgIEJZVEUgICAgICAgICAgICAgICAgICAgIGFieUlCU1NERlNPd25lcls2XTsKKyAgICBCWVRFICAgICAgICAgICAgICAgICAgICBieUlCU1NERlNSZWNvdmVyeTsKKworICAgIHN0cnVjdCBza19idWZmICBza2I7CisKK30gU01nbXRPYmplY3QsIERFRiAqUFNNZ210T2JqZWN0OworCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBFeHBvcnQgTWFjcm9zIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIEV4cG9ydCBGdW5jdGlvbnMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCit2b2lkCit2TWdyT2JqZWN0SW5pdCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKTsKKwordm9pZAordk1nclRpbWVySW5pdCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0CisgICAgKTsKKworVk9JRAordk1nck9iamVjdFJlc2V0KAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQKKyAgICApOworCit2b2lkCit2TWdyQXNzb2NCZWdpblN0YSgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOICBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgT1VUIFBDTURfU1RBVFVTIHBTdGF0dXMKKyAgICApOworCitWT0lECit2TWdyUmVBc3NvY0JlZ2luU3RhKAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBPVVQgUENNRF9TVEFUVVMgcFN0YXR1cworICAgICk7CisKK1ZPSUQKK3ZNZ3JEaXNhc3NvY0JlZ2luU3RhKAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgSU4gIFBTTWdtdE9iamVjdCBwTWdtdCwKKyAgICBJTiAgUEJZVEUgIGFieURlc3RBZGRyZXNzLAorICAgIElOICBXT1JEICAgIHdSZWFzb24sCisgICAgT1VUIFBDTURfU1RBVFVTIHBTdGF0dXMKKyAgICApOworCitWT0lECit2TWdyQXV0aGVuQmVnaW5TdGEoCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiAgUFNNZ210T2JqZWN0IHBNZ210LAorICAgIE9VVCBQQ01EX1NUQVRVUyBwU3RhdHVzCisgICAgKTsKKworVk9JRAordk1nckNyZWF0ZU93bklCU1MoCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBPVVQgUENNRF9TVEFUVVMgcFN0YXR1cworICAgICk7CisKK1ZPSUQKK3ZNZ3JKb2luQlNTQmVnaW4oCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBPVVQgUENNRF9TVEFUVVMgcFN0YXR1cworICAgICk7CisKK1ZPSUQKK3ZNZ3JSeE1hbmFnZVBhY2tldCgKKyAgICBJTiAgSEFORExFIGhEZXZpY2VDb250ZXh0LAorICAgIElOICBQU01nbXRPYmplY3QgcE1nbXQsCisgICAgSU4gIFBTUnhNZ210UGFja2V0IHBSeFBhY2tldAorICAgICk7CisKKy8qCitWT0lECit2TWdyU2NhbkJlZ2luKAorICAgIElOICBIQU5ETEUgaERldmljZUNvbnRleHQsCisgICAgT1VUIFBDTURfU1RBVFVTIHBTdGF0dXMKKyAgICApOworKi8KKworVk9JRAordk1nckRlQXV0aGVuQmVnaW5TdGEoCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiAgUFNNZ210T2JqZWN0ICBwTWdtdCwKKyAgICBJTiAgUEJZVEUgICBhYnlEZXN0QWRkcmVzcywKKyAgICBJTiAgV09SRCAgICB3UmVhc29uLAorICAgIE9VVCBQQ01EX1NUQVRVUyBwU3RhdHVzCisgICAgKTsKKworQk9PTAorYk1nclByZXBhcmVCZWFjb25Ub1NlbmQoCisgICAgSU4gIEhBTkRMRSBoRGV2aWNlQ29udGV4dCwKKyAgICBJTiAgUFNNZ210T2JqZWN0IHBNZ210CisgICAgKTsKKworCitCT09MCitiQWRkX1BNS0lEX0NhbmRp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uaCIKKyNlbmRpZgorI2lmICFkZWZpbmVkKF9fVEVUSEVSX0hfXykKKyNpbmNsdWRlICJ0ZXRoZXIuaCIKKyNlbmRpZgorI2lmICFkZWZpbmVkKF9fREVWSUNFX0hfXykKKyNpbmNsdWRlICJkZXZpY2UuaCIKKyNlbmRpZgorI2lmICFkZWZpbmVkKF9fODAyMTFIRFJfSF9fKQorI2luY2x1ZGUgIjgwMjExaGRyLmgiCisjZW5kaWYKKyNpZiAhZGVmaW5lZChfX0JTU0RCX0hfXykKKyNpbmNsdWRlICJic3NkYi5oIgorI2VuZGlmCisjaWYgIWRlZmluZWQoX19XTUdSX0hfXykKKyNpbmNsdWRlICJ3bWdyLmgiCisjZW5kaWYKKyNpZiAhZGVmaW5lZChfX1dQQV9IX18pCisjaW5jbHVkZSAid3BhLmgiCisjZW5kaWYKKyNpZiAhZGVmaW5lZChfXzgwMjExTUdSX0hfXykKKyNpbmNsdWRlICI4MDIxMW1nci5oIgorI2VuZGlmCisKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0gIFN0YXRpYyBWYXJpYWJsZXMgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KK3N0YXRpYyBpbnQgICAgICAgICAgbXNnbGV2ZWwgICAgICAgICAgICAgICAgPU1TR19MRVZFTF9JTkZPOworCitjb25zdCBCWVRFIGFieU9VSTAwWzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDAwIH07Citjb25zdCBCWVRFIGFieU9VSTAxWzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDAxIH07Citjb25zdCBCWVRFIGFieU9VSTAyWzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDAyIH07Citjb25zdCBCWVRFIGFieU9VSTAzWzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDAzIH07Citjb25zdCBCWVRFIGFieU9VSTA0WzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDA0IH07Citjb25zdCBCWVRFIGFieU9VSTA1WzRdID0geyAweDAwLCAweDUwLCAweGYyLCAweDA1IH07CisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBDbGVhciBSU04gaW5mb3JtYXRpb24gaW4gQlNTTGlzdC4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwQlNTTGlzdCAtIEJTUyBsaXN0LgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZS4KKyAqCistKi8KKworVk9JRAorV1BBX0NsZWFyUlNOICgKKyAgICBJTiBQS25vd25CU1MgICAgICAgIHBCU1NMaXN0CisgICAgKQoreworICAgIGludCBpaTsKKyAgICBwQlNTTGlzdC0+YnlHS1R5cGUgPSBXUEFfVEtJUDsKKyAgICBmb3IgKGlpPTA7IGlpIDwgNDsgaWkgKyspCisgICAgICAgIHBCU1NMaXN0LT5hYnlQS1R5cGVbaWldID0gV1BBX1RLSVA7CisgICAgcEJTU0xpc3QtPndQS0NvdW50ID0gMDsKKyAgICBmb3IgKGlpPTA7IGlpIDwgNDsgaWkgKyspCisgICAgICAgIHBCU1NMaXN0LT5hYnlBdXRoVHlwZVtpaV0gPSBXUEFfQVVUSF9JRUVFODAyXzFYOworICAgIHBCU1NMaXN0LT53QXV0aENvdW50ID0gMDsKKyAgICBwQlNTTGlzdC0+YnlEZWZhdWx0S19hc19QSyA9IDA7CisgICAgcEJTU0xpc3QtPmJ5UmVwbGF5SWR4ID0gMDsKKyAgICBwQlNTTGlzdC0+c1JTTkNhcE9iai5iUlNOQ2FwRXhpc3QgPSBGQUxTRTsKKyAgICBwQlNTTGlzdC0+c1JTTkNhcE9iai53UlNOQ2FwID0gMDsKKyAgICBwQlNTTGlzdC0+YldQQVZhbGlkID0gRkFMU0U7Cit9CisKKworLyorCisgKgorICogRGVzY3JpcHRpb246CisgKiAgICBQYXJzZSBSU04gSUUuCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcEJTU0xpc3QgLSBC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OworICAgICAgICB9CisKKyAgICAgICAgaWYgKHBSU04tPmxlbiA+PSAxMikgLy9vdWkxKDQpK3ZlcigyKStHS1MoNCkrUEtTQ250KDIpCisgICAgICAgIHsKKyAgICAgICAgICAgIGogPSAwOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJ3UEtDb3VudDogJWQsIHNpemVvZihwQlNTTGlzdC0+YWJ5UEtUeXBlKTogJWRcbiIsIHBSU04tPndQS0NvdW50LCBzaXplb2YocEJTU0xpc3QtPmFieVBLVHlwZSkpOworICAgICAgICAgICAgZm9yKGkgPSAwOyAoaSA8IHBSU04tPndQS0NvdW50KSAmJiAoaiA8IHNpemVvZihwQlNTTGlzdC0+YWJ5UEtUeXBlKS9zaXplb2YoQllURSkpOyBpKyspIHsKKyAgICAgICAgICAgICAgICBpZihwUlNOLT5sZW4gPj0gMTIraSo0KzQpIHsgLy9vdWkxKDQpK3ZlcigyKStHS1MoNCkrUEtTQ250KDIpK1BLUyg0KmkpCisgICAgICAgICAgICAgICAgICAgIGlmIChNRU1FcXVhbE1lbW9yeShwUlNOLT5QS1NMaXN0W2ldLmFieU9VSSwgYWJ5T1VJMDAsIDQpKQorICAgICAgICAgICAgICAgICAgICAgICAgcEJTU0xpc3QtPmFieVBLVHlwZVtqKytdID0gV1BBX05PTkU7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKE1FTUVxdWFsTWVtb3J5KHBSU04tPlBLU0xpc3RbaV0uYWJ5T1VJLCBhYnlPVUkwMiwgNCkpCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTGlzdC0+YWJ5UEtUeXBlW2orK10gPSBXUEFfVEtJUDsKKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoTUVNRXF1YWxNZW1vcnkocFJTTi0+UEtTTGlzdFtpXS5hYnlPVUksIGFieU9VSTAzLCA0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NMaXN0LT5hYnlQS1R5cGVbaisrXSA9IFdQQV9BRVNXUkFQOworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwUlNOLT5QS1NMaXN0W2ldLmFieU9VSSwgYWJ5T1VJMDQsIDQpKQorICAgICAgICAgICAgICAgICAgICAgICAgcEJTU0xpc3QtPmFieVBLVHlwZVtqKytdID0gV1BBX0FFU0NDTVA7CisgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFueSB2ZW5kb3IgY2hlY2tzIGhlcmUKKyAgICAgICAgICAgICAgICAgICAgICAgIDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAvL0RCR19QUk5fR1JQMTQoKCJhYnlQS1R5cGVbJWRdOiAlWFxuIiwgai0xLCBwQlNTTGlzdC0+YWJ5UEtUeXBlW2otMV0pKTsKKyAgICAgICAgICAgIH0gLy9mb3IKKyAgICAgICAgICAgIHBCU1NMaXN0LT53UEtDb3VudCA9IChXT1JEKWo7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIndQS0NvdW50OiAlZFxuIiwgcEJTU0xpc3QtPndQS0NvdW50KTsKKyAgICAgICAgfQorCisgICAgICAgIG0gPSBwUlNOLT53UEtDb3VudDsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJtOiAlZFxuIiwgbSk7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iMTQrbSo0OiAlZFxuIiwgMTQrbSo0KTsKKworICAgICAgICBpZiAocFJTTi0+bGVuID49IDE0K20qNCkgeyAvL291aTEoNCkrdmVyKDIpK0dLUyg0KStQS1NDbnQoMikrUEtTKDQqbSkrQUtDKDIpCisgICAgICAgICAgICAvLyBvdmVybGF5IElFX1JTTl9BdXRoIHN0cnVjdHVyZSBpbnRvIGNvcnJlY3QgcGxhY2UKKyAgICAgICAgICAgIHBJRV9SU05fQXV0aCA9IChQV0xBTl9JRV9SU05fQVVUSCkgcFJTTi0+UEtTTGlzdFttXS5hYnlPVUk7CisgICAgICAgICAgICBqID0gMDsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8id0F1dGhDb3VudDogJWQsIHNpemVvZihwQlNTTGlzdC0+YWJ5QXV0aFR5cGUpOiAlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcElFX1JTTl9BdXRoLT53QXV0aENvdW50LCBzaXplb2YocEJTU0xpc3QtPmFieUF1dGhUeXBlKSk7CisgICAgICAgICAgICBmb3IoaSA9IDA7IChpIDwgcElFX1JTTl9BdXRoLT53QXV0aENvdW50KSAmJiAoaiA8IHNpemVvZihwQlNTTGlzdC0+YWJ5QXV0aFR5cGUpL3NpemVvZihCWVRFKSk7IGkrKykgeworICAgICAgICAgICAgICAgIGlmKHBSU04tPmxlbiA+PSAxNCs0KyhtK2kpKjQpIHsgLy9vdWkxKDQpK3ZlcigyKStHS1MoNCkrUEtTQ250KDIpK1BLUyg0Km0pK0FLQygyKStBS1MoNCppKQorICAgICAgICAgICAgICAgICAgICBpZiAoTUVNRXF1YWxNZW1vcnkocElFX1JTTl9BdXRoLT5BdXRoS1NMaXN0W2ldLmFieU9VSSwgYWJ5T1VJMDEsIDQpKQorICAgICAgICAgICAgICAgICAgICAgICAgcEJTU0xpc3QtPmFieUF1dGhUeXBlW2orK10gPSBXUEFfQVVUSF9JRUVFODAyXzFYOworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwSUVfUlNOX0F1dGgtPkF1dGhLU0xpc3RbaV0uYWJ5T1VJLCBhYnlPVUkwMiwgNCkpCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTGlzdC0+YWJ5QXV0aFR5cGVbaisrXSA9IFdQQV9BVVRIX1BTSzsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAvLyBhbnkgdmVuZG9yIGNoZWNrcyBoZXJlCisgICAgICAgICAgICAgICAgICAgIDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAvL0RCR19QUk5fR1JQMTQoKCJhYnlBdXRoVHlwZVslZF06ICVYXG4iLCBqLTEsIHBCU1NMaXN0LT5hYnlBdXRoVHlwZVtqLTFdKSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZihqID4gMCkKKyAgICAgICAgICAgICAgICBwQlNTTGlzdC0+d0F1dGhDb3VudCA9IChXT1JEKWo7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIndBdXRoQ291bnQ6ICVkXG4iLCBwQlNTTGlzdC0+d0F1dGhDb3VudCk7CisgICAgICAgIH0KKworICAgICAgICBpZiAocElFX1JTTl9BdXRoICE9IE5VTEwpIHsKKworICAgICAgICAgICAgbiA9IHBJRV9SU05fQXV0aC0+d0F1dGhDb3VudDsKKworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJuOiAlZFxuIiwgbik7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIjE0KzQrKG0rbikqNDogJWRcbiIsIDE0KzQrKG0rbikqNCk7CisKKyAgICAgICAgICAgIGlmKHBSU04tPmxlbisyID49IDE0KzQrKG0rbikqNCkgeyAvL291aTEoNCkrdmVyKDIpK0dLUyg0KStQS1NDbnQoMikrUEtTKDQqbSkrQUtDKDIpK0FLUyg0Km4pK0NhcCgyKQorICAgICAgICAgICAgICAgIHBieUNhcHMgPSA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lNTIGxpc3QKKyAqICBPdXQ6CisgKiAgICAgIG5vbmUKKyAqCisgKiBSZXR1cm4gVmFsdWU6IG5vbmUuCisgKgorLSovCitCT09MCitXUEFfU2VhcmNoUlNOICgKKyAgICBCWVRFICAgICAgICAgICAgICAgIGJ5Q21kLAorICAgIEJZVEUgICAgICAgICAgICAgICAgYnlFbmNyeXB0LAorICAgIElOIFBLbm93bkJTUyAgICAgICAgcEJTU0xpc3QKKyAgICApCit7CisgICAgaW50IGlpOworICAgIEJZVEUgYnlQS1R5cGUgPSBXUEFfTk9ORTsKKworICAgIGlmIChwQlNTTGlzdC0+YldQQVZhbGlkID09IEZBTFNFKQorICAgICAgICByZXR1cm4gRkFMU0U7CisKKyAgICBzd2l0Y2goYnlDbWQpIHsKKyAgICBjYXNlIDA6CisKKyAgICAgICAgaWYgKGJ5RW5jcnlwdCAhPSBwQlNTTGlzdC0+YnlHS1R5cGUpCisgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisKKyAgICAgICAgaWYgKHBCU1NMaXN0LT53UEtDb3VudCA+IDApIHsKKyAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHBCU1NMaXN0LT53UEtDb3VudDsgaWkgKyspIHsKKyAgICAgICAgICAgICAgICBpZiAocEJTU0xpc3QtPmFieVBLVHlwZVtpaV0gPT0gV1BBX0FFU0NDTVApCisgICAgICAgICAgICAgICAgICAgIGJ5UEtUeXBlID0gV1BBX0FFU0NDTVA7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoKHBCU1NMaXN0LT5hYnlQS1R5cGVbaWldID09IFdQQV9US0lQKSAmJiAoYnlQS1R5cGUgIT0gV1BBX0FFU0NDTVApKQorICAgICAgICAgICAgICAgICAgICAgYnlQS1R5cGUgPSBXUEFfVEtJUDsKKyAgICAgICAgICAgICAgICBlbHNlIGlmICgocEJTU0xpc3QtPmFieVBLVHlwZVtpaV0gPT0gV1BBX1dFUDQwKSAmJiAoYnlQS1R5cGUgIT0gV1BBX0FFU0NDTVApICYmIChieVBLVHlwZSAhPSBXUEFfVEtJUCkpCisgICAgICAgICAgICAgICAgICAgICBieVBLVHlwZSA9IFdQQV9XRVA0MDsKKyAgICAgICAgICAgICAgICBlbHNlIGlmICgocEJTU0xpc3QtPmFieVBLVHlwZVtpaV0gPT0gV1BBX1dFUDEwNCkgJiYgKGJ5UEtUeXBlICE9IFdQQV9BRVNDQ01QKSAmJiAoYnlQS1R5cGUgIT0gV1BBX1RLSVApKQorICAgICAgICAgICAgICAgICAgICAgYnlQS1R5cGUgPSBXUEFfV0VQMTA0OworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGJ5RW5jcnlwdCAhPSBieVBLVHlwZSkKKyAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIFRSVUU7CisvLyAgICAgICAgaWYgKHBCU1NMaXN0LT53QXV0aENvdW50ID4gMCkKKy8vICAgICAgICAgICAgZm9yIChpaT0wOyBpaSA8IHBCU1NMaXN0LT53QXV0aENvdW50OyBpaSArKykKKy8vICAgICAgICAgICAgICAgIGlmIChieUF1dGggPT0gcEJTU0xpc3QtPmFieUF1dGhUeXBlW2lpXSkKKy8vICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgYnJlYWs7CisKKyAgICBkZWZhdWx0OgorICAgICAgICBicmVhazsKKyAgICB9CisgICAgcmV0dXJuIEZBTFNFOworfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIENoZWNrIGlmIFJTTiBJRSBtYWtlcyBzZW5zZS4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwUlNOIC0gUG9pbnRlciB0byB0aGUgUlNOIElFLgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZS4KKyAqCistKi8KK0JPT0wKK1dQQWJfSXNfUlNOICgKKyAgICBJTiBQV0xBTl9JRV9SU05fRV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5Q1NTR0sgPSBXTEFOXzExaV9DU1NfQ0NNUDsKKyAgICBmb3IgKGlpPTA7IGlpIDwgNDsgaWkgKyspCisgICAgICAgIHBCU1NOb2RlLT5hYnlDU1NQS1tpaV0gPSBXTEFOXzExaV9DU1NfQ0NNUDsKKyAgICBwQlNTTm9kZS0+d0NTU1BLQ291bnQgPSAxOworICAgIGZvciAoaWk9MDsgaWkgPCA0OyBpaSArKykKKyAgICAgICAgcEJTU05vZGUtPmFieUFLTVNTQXV0aFR5cGVbaWldID0gV0xBTl8xMWlfQUtNU1NfODAyXzFYOworICAgIHBCU1NOb2RlLT53QUtNU1NBdXRoQ291bnQgPSAxOworICAgIHBCU1NOb2RlLT5zUlNOQ2FwT2JqLmJSU05DYXBFeGlzdCA9IEZBTFNFOworICAgIHBCU1NOb2RlLT5zUlNOQ2FwT2JqLndSU05DYXAgPSAwOworfQorCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFBhcnNlIFJTTiBJRS4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwQlNTTm9kZSAtIEJTUyBsaXN0LgorICogICAgICBwUlNOIC0gUG9pbnRlciB0byB0aGUgUlNOIElFLgorICogIE91dDoKKyAqICAgICAgbm9uZQorICoKKyAqIFJldHVybiBWYWx1ZTogbm9uZS4KKyAqCistKi8KK1ZPSUQKK1dQQTJ2UGFyc2VSU04gKAorICAgIElOIFBLbm93bkJTUyAgICAgICAgcEJTU05vZGUsCisgICAgSU4gUFdMQU5fSUVfUlNOICAgICBwUlNOCisgICAgKQoreworICAgIGludCAgICAgICAgICAgICAgICAgaSwgajsKKyAgICBXT1JEICAgICAgICAgICAgICAgIG0gPSAwLCBuID0gMDsKKyAgICBQQllURSAgICAgICAgICAgICAgIHBieU9VSTsKKyAgICBCT09MICAgICAgICAgICAgICAgIGJVc2VHSyA9IEZBTFNFOworCisgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU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ICAgICBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSUNDTVAsIDQpKQorICAgICAgICAgICAgcEJTU05vZGUtPmJ5Q1NTR0sgPSBXTEFOXzExaV9DU1NfQ0NNUDsKKyAgICAgICAgZWxzZSBpZiAoTUVNRXF1YWxNZW1vcnkocGJ5T1VJLCBhYnlPVUlXRVAxMDQsIDQpKQorICAgICAgICAgICAgcEJTU05vZGUtPmJ5Q1NTR0sgPSBXTEFOXzExaV9DU1NfV0VQMTA0OworICAgICAgICBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSUdLLCA0KSkgeworICAgICAgICAgICAgLy8gaW52YWxpZCBDU1MsIFA4MDIuMTFpL0QxMC4wLCBwMzIKKyAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAvLyBhbnkgdmVuZG9yIGNoZWNrcyBoZXJlCisgICAgICAgICAgICBwQlNTTm9kZS0+YnlDU1NHSyA9IFdMQU5fMTFpX0NTU19VTktOT1dOOworCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iODAyLjExaSBDU1M6ICVYXG4iLCBwQlNTTm9kZS0+YnlDU1NHSyk7CisKKyAgICAgICAgaWYgKHBSU04tPmxlbiA9PSA2KSB7CisgICAgICAgICAgICBwQlNTTm9kZS0+YldQQTJWYWxpZCA9IFRSVUU7CisgICAgICAgICAgICByZXR1cm47CisgICAgICAgIH0KKworICAgICAgICBpZiAocFJTTi0+bGVuID49IDgpIHsgLy8gdmVyKDIpICsgR0soNCkgKyBQSyBjb3VudCgyKQorICAgICAgICAgICAgcEJTU05vZGUtPndDU1NQS0NvdW50ID0gKigoUFdPUkQpICYocFJTTi0+YWJ5UlNOWzRdKSk7CisgICAgICAgICAgICBqID0gMDsKKyAgICAgICAgICAgIHBieU9VSSA9ICYocFJTTi0+YWJ5UlNOWzZdKTsKKworICAgICAgICAgICAgZm9yIChpID0gMDsgKGkgPCBwQlNTTm9kZS0+d0NTU1BLQ291bnQpICYmIChqIDwgc2l6ZW9mKHBCU1NOb2RlLT5hYnlDU1NQSykvc2l6ZW9mKEJZVEUpKTsgaSsrKSB7CisKKyAgICAgICAgICAgICAgICBpZiAocFJTTi0+bGVuID49IDgraSo0KzQpIHsgLy8gdmVyKDIpK0dLKDQpK1BLQ250KDIpK1BLUyg0KmkpCisgICAgICAgICAgICAgICAgICAgIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSUdLLCA0KSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcEJTU05vZGUtPmFieUNTU1BLW2orK10gPSBXTEFOXzExaV9DU1NfVVNFX0dST1VQOworICAgICAgICAgICAgICAgICAgICAgICAgYlVzZUdLID0gVFJVRTsKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSVdFUDQwLCA0KSkgeworICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW52aWFsaWQgQ1NTLCBjb250aW51ZSB0byBwYXJzaW5nCisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoTUVNRXF1YWxNZW1vcnkocGJ5T1VJLCBhYnlPVUlUS0lQLCA0KSkgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBCU1NOb2RlLT5ieUNTU0dLICE9IFdMQU5fMTFpX0NTU19DQ01QKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NOb2RlLT5hYnlDU1NQS1tqKytdID0gV0xBTl8xMWlfQ1NTX1RLSVA7CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOyAvLyBJbnZpYWxpZCBDU1MsIGNvbnRpbnVlIHRvIHBhcnNpbmcKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSUNDTVAsIDQpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTm9kZS0+YWJ5Q1NTUEtbaisrXSA9IFdMQU5fMTFpX0NTU19DQ01QOworICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKE1FTUVxdWFsTWVtb3J5KHBieU9VSSwgYWJ5T1VJV0VQMTA0LCA0KSkgeworICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW52aWFsaWQgQ1NTLCBjb250aW51ZSB0byBwYXJzaW5nCisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbnkgdmVuZG9yIGNoZWNrcyBoZXJlCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTm9kZS0+YWJ5Q1NTUEtbaisrXSA9IFdMQU5fMTFpX0NTU19VTktOT1dOOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHBieU9VSSArPSA0OworICAgICAgICAgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPImFieUNTU1BLWyVkXTogJVhcbiIsIGotMSwgcEJTU05vZGUtPmFieUNTU1BLW2otMV0pOworICAgICAgICAgICAgICAgIH0gZWxzZQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0gLy9mb3IKKworICAgICAgICAgICAgaWYgKGJVc2VHSyA9PSBUUlVFKSB7CisgICAgICAgICAgICAgICAgaWYgKGogIT0gMSkgeworICAgICAgICAgICAgICAgICAgICAvLyBpbnZhbGlkIENTUywgVGhpcyBzaG91bGQgYmUgb25seSBQSyBDU1MuCisgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKHBCU1NOb2RlLT5ieUNTU0dLID09IFdMQU5fMTFpX0NTU19DQ01QKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGludmFsaWQgQ1NTLCBJZiBDQ01QIGlzIGVuYWJsZSAsIFBLIGNhbid0IGJlIENTU0dLLgorICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKChwQlNTTm9kZS0+d0NTU1BLQ291bnQgIT0gMCkgJiYgKGogPT0gMCkpIHsKKyAgICAgICAgICAgICAgICAvLyBpbnZhbGlkIENTUywgTm8gdmFsaWQgUEsuCisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcEJTU05vZGUtPndDU1NQS0NvdW50ID0gKFdPUkQpajsKKyAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8id0NTU1BLQ291bnQ6ICVkXG4iLCBwQlNTTm9kZS0+d0NTU1BLQ291bnQpOworICAgICAgICB9CisKKyAgICAgICAgbSA9ICooKFBXT1JEKSAmKHBSU04tPmFieVJTTls0XSkpOworCisgICAgICAgIGlmIChwUlNOLT5sZW4gPj0gMTArbSo0KSB7IC8vIHZlcigyKSArIEdLKDQpICsgUEsgY291bnQoMikgKyBQS1MoNCptKSArIEFLTVNTIGNvdW50KDIpCisgICAgICAgICAgICBwQlNTTm9kZS0+d0FLTVNTQXV0aENvdW50ID0gKigoUFdPUkQpICYocFJTTi0+YWJ5UlNOWzYrNCptXSkpOzsKKyAgICAgICAgICAgIGogPSAwOworICAgICAgICAgICAgcGJ5T1VJID0gJihwUlNOLT5hYnlSU05bOCs0Km1dKTsKKyAgICAgICAgICAgIGZvciAoaSA9IDA7IChpIDwgcEJTU05vZGUtPndBS01TU0F1dGhDb3VudCkgJiYgKGogPCBzaXplb2YocEJTU05vZGUtPmFieUFLTVNTQXV0aFR5cGUpL3NpemVvZihCWVRFKSk7IGkrKykgeworICAgICAgICAgICAgICAgIGlmIChwUlNOLT5sZW4gPj0gMTArKG0raSkqNCs0KSB7IC8vIHZlcigyKStHSyg0KStQS0NudCgyKStQS1MoNCptKStBS01TUygyKStBS1MoNCppKQorICAgICAgICAgICAgICAgICAgICBpZiAoTUVNRXF1YWxNZW1vcnkocGJ5T1VJLCBhYnlPVUk4MDIxWCwgNCkpCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTm9kZS0+YWJ5QUtNU1NBdXRoVHlwZVtqKytdID0gV0xBTl8xMWlfQUtNU1NfODAyXzFYOworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChNRU1FcXVhbE1lbW9yeShwYnlPVUksIGFieU9VSVBTSywgNCkpCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTm9kZS0+YWJ5QUtNU1NBdXRoVHlwZVtqKytdID0gV0xBTl8xMWlfQUtNU1NfUFNLOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbnkgdmVuZG9yIGNoZWNrcyBoZXJlCisgICAgICAgICAgICAgICAgICAgICAgICBwQlNTTm9kZS0+YWJ5QUtNU1NBdXRoVHlwZVtqKytdID0gV0xBTl8xMWlfQUtNU1NfVU5LTk9XTjsKKyAgICAgICAgICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyJhYnlBS01TU0F1dGhUeXBlWyVkXTogJVhcbiIsIGotMSwgcEJTU05vZGUtPmFieUFLTVNTQXV0aFR5cGVbai0xXSk7CisgICAgICAgICAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcEJTU05vZGUtPndBS01TU0F1dGhDb3VudCA9IChXT1JEKWo7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPIndBS01TU0F1dGhDb3VudDogJWRcbiIsIHBCU1NOb2RlLT53QUtNU1NBdXRoQ291bnQpOworCisgICAgICAgICAgICBuID0gKigoUFdPUkQpICYocFJTTi0+YWJ5UlNOWzYrNCptXSkpOzsKKyAgICAgICAgICAgIGlmIChwUlNOLT5sZW4gPj0gMTIrNCptKzQqbikgeyAvLyB2ZXIoMikrR0soNCkrUEtDbnQoMikrUEtTKDQqbSkrQUtNU1NDbnQoMikrQUtNU1MoNCpuKStDYXAoMikKKyAgICAgICAgICAgICAgICBwQlNTTm9kZS0+c1JTTkNhcE9iai5iUlNOQ2FwRXhpc3QgPSBUUlVFOworICAgICAgICAgICAgICAgIHBCU1NOb2RlLT5zUlNOQ2FwT2JqLndSU05DYXAgPSAqKChQV09SRCkgJihwUlNOLT5hYnlSU05bOCs0Km0rNCpuXSkpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIC8vaWdub3JlIFBNS0lEIGxpc3RzIGJjcyBvbmx5IChSZSlBc3NvY3JlcXVlc3QgaGFzIHRoaXMgZmllbGQKKyAgICAgICAgcEJTU05vZGUtPmJXUEEyVmFsaWQgPSBUUlVFOworICAgIH0KK30KKworCisvKisKKyAqCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgIFNldCBXUEEgSUVzCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcE1nbXRIYW5kbGUgLSBQb2ludGVyIHRvIG1hbmFnZW1lbnQgb2JqZWN0CisgKiAgT3V0OgorICogICAgICBwUlNOSUVzICAgICAtIFBvaW50ZXIgdG8gdGhlIFJTTiBJRSB0byBzZXQuCisgKgorICogUmV0dXJuIFZhbHVlOiBsZW5ndGggb2YgSUVzLgorICoKKy0qLworVUlOVAorV1BBMnVTZXRJRXMoCisgICAgSU4gUFZPSUQgcE1nbXRIYW5kbGUsCisgICAgT1VUIFBXTEFOX0lFX1JTTiBwUlNOSUVzCisgICAgKQoreworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IChQU01nbXRPYmplY3QpIHBNZ210SGFuZGxlOworICAgIFBCWVRFICAgICAgICAgICBwYnlCdWZmZXIgPSBOVUxMOworICAgIFVJTlQgICAgICAgICAgICB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CisgICAgICAgICAgICBwUlNOSUVzLT5hYnlSU05bM10gPSBXTEFOXzExaV9DU1NfQ0NNUDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHBSU05JRXMtPmFieVJTTlszXSA9IFdMQU5fMTFpX0NTU19VTktOT1dOOworICAgICAgICB9CisKKyAgICAgICAgLy8gUGFpcndpc2UgS2V5IENpcGhlciBTdWl0ZQorICAgICAgICBwUlNOSUVzLT5hYnlSU05bNF0gPSAxOworICAgICAgICBwUlNOSUVzLT5hYnlSU05bNV0gPSAwOworICAgICAgICBwUlNOSUVzLT5hYnlSU05bNl0gPSAweDAwOworICAgICAgICBwUlNOSUVzLT5hYnlSU05bN10gPSAweDBGOworICAgICAgICBwUlNOSUVzLT5hYnlSU05bOF0gPSAweEFDOworICAgICAgICBpZiAocE1nbXQtPmJ5Q1NTUEsgPT0gS0VZX0NUTF9US0lQKSB7CisgICAgICAgICAgICBwUlNOSUVzLT5hYnlSU05bOV0gPSBXTEFOXzExaV9DU1NfVEtJUDsKKyAgICAgICAgfSBlbHNlIGlmIChwTWdtdC0+YnlDU1NQSyA9PSBLRVlfQ1RMX0NDTVApIHsKKyAgICAgICAgICAgIHBSU05JRXMtPmFieVJTTls5XSA9IFdMQU5fMTFpX0NTU19DQ01QOworICAgICAgICB9IGVsc2UgaWYgKHBNZ210LT5ieUNTU1BLID09IEtFWV9DVExfTk9ORSkgeworICAgICAgICAgICAgcFJTTklFcy0+YWJ5UlNOWzldID0gV0xBTl8xMWlfQ1NTX1VTRV9HUk9VUDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHBSU05JRXMtPmFieVJTTls5XSA9IFdMQU5fMTFpX0NTU19VTktOT1dOOworICAgICAgICB9CisgICAgICAgIHBSU05JRXMtPmxlbiArPSA2OworCisgICAgICAgIC8vIEF1dGggS2V5IE1hbmFnZW1lbnQgU3VpdGUKKyAgICAgICAgcFJTTklFcy0+YWJ5UlNOWzEwXSA9IDE7CisgICAgICAgIHBSU05JRXMtPmFieVJTTlsxMV0gPSAwOworICAgICAgICBwUlNOSUVzLT5hYnlSU05bMTJdID0gMHgwMDsKKyAgICAgICAgcFJTTklFcy0+YWJ5UlNOWzEzXSA9IDB4MEY7CisgICAgICAgIHBSU05JRXMtPmFieVJTTlsxNF0gPSAweEFDOworICAgICAgICBpZiAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyUFNLKSB7CisgICAgICAgICAgICBwUlNOSUVzLT5hYnlSU05bMTVdID0gV0xBTl8xMWlfQUtNU1NfUFNLOworICAgICAgICB9IGVsc2UgaWYgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMikgeworICAgICAgICAgICAgcFJTTklFcy0+YWJ5UlNOWzE1XSA9IFdMQU5fMTFpX0FLTVNTXzgwMl8xWDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHBSU05JRXMtPmFieVJTTlsxNV0gPSBXTEFOXzExaV9BS01TU19VTktOT1dOOworICAgICAgICB9CisgICAgICAgIHBSU05JRXMtPmxlbiArPTY7CisKKyAgICAgICAgLy8gUlNOIENhcGFiaWxpdGVzCisgICAgICAgIGlmIChwTWdtdC0+cEN1cnJCU1MtPnNSU05DYXBPYmouYlJTTkNhcEV4aXN0ID09IFRSVUUpIHsKKyAgICAgICAgICAgIE1FTXZDb3B5KCZwUlNOSUVzLT5hYnlSU05bMTZdLCAmcE1nbXQtPnBDdXJyQlNTLT5zUlNOQ2FwT2JqLndSU05DYXAsIDIpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgcFJTTklFcy0+YWJ5UlNOWzE2XSA9IDA7CisgICAgICAgICAgICBwUlNOSUVzLT5hYnlSU05bMTddID0gMDsKKyAgICAgICAgfQorICAgICAgICBwUlNOSUVzLT5sZW4gKz0yOworCisgICAgICAgIGlmICgocE1nbXQtPmdzUE1LSURDYWNoZS5CU1NJREluZm9Db3VudCA+IDApICYmCisgICAgICAgICAgICAocE1nbXQtPmJSb2FtaW5nID09IFRSVUUpICYmCisgICAgICAgICAgICAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSkgeworICAgICAgICAgICAgLy8gUlNOIFBNS0lECisgICAgICAgICAgICBwd1BNS0lEID0gKFBXT1JEKSgmcFJTTklFcy0+YWJ5UlNOWzE4XSk7ICAvLyBQb2ludCB0byBQTUtJRCBjb3VudAorICAgICAgICAgICAgKnB3UE1LSUQgPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbml0aWFsaXplIFBNS0lEIGNvdW50CisgICAgICAgICAgICBwYnlCdWZmZXIgPSAmcFJTTklFcy0+YWJ5UlNOWzIwXTsgICAgICAgICAgIC8vIFBvaW50IHRvIFBNS0lEIGxpc3QKKyAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IHBNZ210LT5nc1BNS0lEQ2FjaGUuQlNTSURJbmZvQ291bnQ7IGlpKyspIHsKKyAgICAgICAgICAgICAgICBpZiAoTUVNRXF1YWxNZW1vcnkoJnBNZ210LT5nc1BNS0lEQ2FjaGUuQlNTSURJbmZvW2lpXS5hYnlCU1NJRFswXSwgcE1nbXQtPmFieUN1cnJCU1NJRCwgVV9FVEhFUl9BRERSX0xFTikpIHsKKyAgICAgICAgICAgICAgICAgICAgKCpwd1BNS0lEKSArKzsKKyAgICAgICAgICAgICAgICAgICAgTUVNdkNvcHkocGJ5QnVmZmVyLCBwTWdtdC0+Z3NQTUtJRENhY2hlLkJTU0lESW5mb1tpaV0uYWJ5UE1LSUQsIDE2KTsKKyAgICAgICAgICAgICAgICAgICAgcGJ5QnVmZmVyICs9IDE2OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICgqcHdQTUtJRCAhPSAwKSB7CisgICAgICAgICAgICAgICAgcFJTTklFcy0+bGVuICs9ICgyICsgKCpwd1BNS0lEKSoxNik7CisgICAgICAgIC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tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvL3N0YXRpYyBpbnQgICAgICAgICAgbXNnbGV2ZWwgICAgICAgICAgICAgICAgPU1TR19MRVZFTF9ERUJVRzsKK3N0YXRpYyBpbnQgICAgICAgICAgbXNnbGV2ZWwgICAgICAgICAgICAgICAgPU1TR19MRVZFTF9JTkZPOworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgU3RhdGljIEZ1bmN0aW9ucyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKworCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgRXhwb3J0IFZhcmlhYmxlcyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKK3N0YXRpYyB2b2lkIHdwYWRldl9zZXR1cChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCWRldi0+dHlwZSAgICAgICAgICAgICAgID0gQVJQSFJEX0lFRUU4MDIxMTsKKwlkZXYtPmhhcmRfaGVhZGVyX2xlbiAgICA9IEVUSF9ITEVOOworCWRldi0+bXR1ICAgICAgICAgICAgICAgID0gMjA0ODsKKwlkZXYtPmFkZHJfbGVuICAgICAgICAgICA9IEVUSF9BTEVOOworCWRldi0+dHhfcXVldWVfbGVuICAgICAgID0gMTAwMDsKKworCW1lbXNldChkZXYtPmJyb2FkY2FzdCwweEZGLCBFVEhfQUxFTik7CisKKwlkZXYtPmZsYWdzICAgICAgICAgICAgICA9IElGRl9CUk9BRENBU1R8SUZGX01VTFRJQ0FTVDsKK30KKworCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgcmVnaXN0ZXIgbmV0ZGV2IGZvciB3cGEgc3VwcGxpY2FudCBkZWFtb24KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgICAgICAgICAgIC0KKyAqICAgICAgZW5hYmxlICAgICAgICAgICAgICAtCisgKiAgT3V0OgorICoKKyAqIFJldH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+c2tiID09IE5VTEwpIHsKKyAgICAgICAgcERldmljZS0+c2tiID0gZGV2X2FsbG9jX3NrYigoaW50KXBEZXZpY2UtPnJ4X2J1Zl9zeik7CisgICAgICAgIGlmIChwRGV2aWNlLT5za2IgPT0gTlVMTCkKKwkJICAgIHJldHVybiAtRU5PTUVNOworICAgIH0KKworICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIiVzOiBSZWdpc3RlcmVkIG5ldGRldiAlcyBmb3IgV1BBIG1hbmFnZW1lbnRcbiIsCisJICAgICAgIGRldi0+bmFtZSwgcERldmljZS0+d3BhZGV2LT5uYW1lKTsKKworCXJldHVybiAwOworfQorCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgdW5yZWdpc3RlciBuZXRfZGV2aWNlICh3cGFkZXYpCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAgICAtCisgKiAgT3V0OgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqCisgKi8KKworc3RhdGljIGludCB3cGFfcmVsZWFzZV93cGFkZXYoUFNEZXZpY2UgcERldmljZSkKK3sKKworICAgIGlmIChwRGV2aWNlLT5za2IpIHsKKyAgICAgICAgZGV2X2tmcmVlX3NrYihwRGV2aWNlLT5za2IpOworICAgICAgICBwRGV2aWNlLT5za2IgPSBOVUxMOworICAgIH0KKworICAgIGlmIChwRGV2aWNlLT53cGFkZXYpIHsKKyAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiJXM6IE5ldGRldmljZSAlcyB1bnJlZ2lzdGVyZWRcbiIsCisJICAgICAgIHBEZXZpY2UtPmRldi0+bmFtZSwgcERldmljZS0+d3BhZGV2LT5uYW1lKTsKKwl1bnJlZ2lzdGVyX25ldGRldihwRGV2aWNlLT53cGFkZXYpOworCWZyZWVfbmV0ZGV2KHBEZXZpY2UtPndwYWRldik7CisgICAgICAgICBwRGV2aWNlLT53cGFkZXYgPSBOVUxMOworICAgIH0KKworCXJldHVybiAwOworfQorCisKKworCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgU2V0IGVuYWJsZS9kaXNhYmxlIGRldiBmb3Igd3BhIHN1cHBsaWNhbnQgZGVhbW9uCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgICAgICAgICAgICAtCisgKiAgICAgIHZhbCAgICAgICAgICAgICAgICAgLQorICogIE91dDoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKgorICovCisKK2ludCB3cGFfc2V0X3dwYWRldihQU0RldmljZSBwRGV2aWNlLCBpbnQgdmFsKQoreworCisKKwlpZiAodmFsKQorCQlyZXR1cm4gd3BhX2luaXRfd3BhZGV2KHBEZXZpY2UpOworCWVsc2UKKwkJcmV0dXJuIHdwYV9yZWxlYXNlX3dwYWRldihwRGV2aWNlKTsKK30KKworCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIFNldCBXUEEgYWxnb3JpdGhtICYga2V5cworICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgLQorICogICAgICBwYXJhbSAtCisgKiAgT3V0OgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqCisgKi8KKworaW50IHdwYV9zZXRfa2V5cyhQU0RldmljZSBwRGV2aWNlLCB2b2lkICpjdHgsIEJPT0wgIGZjcGZrZXJuZWwpCit7Cisgc3RydWN0IHZpYXdnZXRfd3BhX3BhcmFtICpwYXJhbT1jdHg7CisgICAgUFNNZ210T2JqZWN0IHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisgICAgRFdPUkQgICBkd0tleUluZGV4ID0gMDsKKyAgICBCWVRFICAgIGFieUtleVtNQVhfS0VZX0xFTl07CisgICAgQllURSAgICBhYnlTZXFbTUFYX0tFWV9MRU5dOworICAgIFFXT1JEICAgS2V5UlNDOworLy8gICAgTkR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dLCBwYXJhbS0+dS53cGFfa2V5LmtleSwgcGFyYW0tPnUud3BhX2tleS5rZXlfbGVuKTsKKyAgICAgfQorICAgIGVsc2UgeworCXNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisJaWYgKHBhcmFtLT51LndwYV9rZXkua2V5ICYmCisJICAgIGNvcHlfZnJvbV91c2VyKCZhYnlLZXlbMF0sIHBhcmFtLT51LndwYV9rZXkua2V5LCBwYXJhbS0+dS53cGFfa2V5LmtleV9sZW4pKXsKKwkgICAgICAgIHNwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCSAgICByZXR1cm4gLUVJTlZBTDsKKyAgICAJfQorc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgCX0KKworICAgIGR3S2V5SW5kZXggPSAoRFdPUkQpKHBhcmFtLT51LndwYV9rZXkua2V5X2luZGV4KTsKKworCWlmIChwYXJhbS0+dS53cGFfa2V5LmFsZ19uYW1lID09IFdQQV9BTEdfV0VQKSB7CisgICAgICAgIGlmIChkd0tleUluZGV4ID4gMykgeworICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBpZiAocGFyYW0tPnUud3BhX2tleS5zZXRfdHgpIHsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUtleUluZGV4ID0gKEJZVEUpZHdLZXlJbmRleDsKKyAgICAgICAgICAgICAgICBwRGV2aWNlLT5iVHJhbnNtaXRLZXkgPSBUUlVFOworCQkgICAgICAgIGR3S2V5SW5kZXggfD0gKDEgPDwgMzEpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHdLZXlJbmRleCAmIH4oQklUMzAgfCBVU0VfS0VZUlNDKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0tPnUud3BhX2tleS5rZXlfbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYnlLZXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEtFWV9DVExfV0VQLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5Qb3J0T2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUxvY2FsSUQpOworCisgICAgICAgIH0KKyAgICAgICAgcERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPSBOZGlzODAyXzExRW5jcnlwdGlvbjFFbmFibGVkOworICAgICAgICBwRGV2aWNlLT5iRW5jcnlwdGlvbkVuYWJsZSA9IFRSVUU7CisgICAgICAgIHJldHVybiByZXQ7CisJfQorCisJICAgIC8vc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgaWYocGFyYW0tPnUud3BhX2tleS5zZXEgJiYgZmNwZmtlcm5lbCkgeworICAgICAgICAgICBtZW1jcHkoJmFieVNlcVswXSwgcGFyYW0tPnUud3BhX2tleS5zZXEsIHBhcmFtLT51LndwYV9rZXkuc2VxX2xlbik7CisgICAgICAgIAl9CisgICAgICAgZWxzZSB7CisJICAgCXNwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisJaWYgKHBhcmFtLT51LndwYV9rZXkuc2VxICYmCisJICAgIGNvcHlfZnJvbV91c2VyKCZhYnlTZXFbMF0sIHBhcmFtLT51LndwYV9rZXkuc2VxLCBwYXJhbS0+dS53cGFfa2V5LnNlcV9sZW4pKXsKKworCSBzcGluX2xvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKwkgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgCX0KK3NwaW5fbG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworfQor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3RhdHVzID09IE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQpCisgICAgICAgIGJ5S2V5RGVjTW9kZSA9IEtFWV9DVExfQ0NNUDsKKyAgICBlbHNlIGlmIChwRGV2aWNlLT5lRW5jcnlwdGlvblN0YXR1cyA9PSBOZGlzODAyXzExRW5jcnlwdGlvbjJFbmFibGVkKQorICAgICAgICBieUtleURlY01vZGUgPSBLRVlfQ1RMX1RLSVA7CisgICAgZWxzZQorICAgICAgICBieUtleURlY01vZGUgPSBLRVlfQ1RMX1dFUDsKKworICAgIC8vIEZpeCBIQ1QgdGVzdCB0aGF0IHNldCAyNTYgYml0cyBLRVkgYW5kIE5kaXM4MDJfMTFFbmNyeXB0aW9uM0VuYWJsZWQKKyAgICBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24zRW5hYmxlZCkgeworICAgICAgICBpZiAocGFyYW0tPnUud3BhX2tleS5rZXlfbGVuID09IE1BWF9LRVlfTEVOKQorICAgICAgICAgICAgYnlLZXlEZWNNb2RlID0gS0VZX0NUTF9US0lQOworICAgICAgICBlbHNlIGlmIChwYXJhbS0+dS53cGFfa2V5LmtleV9sZW4gPT0gV0xBTl9XRVA0MF9LRVlMRU4pCisgICAgICAgICAgICBieUtleURlY01vZGUgPSBLRVlfQ1RMX1dFUDsKKyAgICAgICAgZWxzZSBpZiAocGFyYW0tPnUud3BhX2tleS5rZXlfbGVuID09IFdMQU5fV0VQMTA0X0tFWUxFTikKKyAgICAgICAgICAgIGJ5S2V5RGVjTW9kZSA9IEtFWV9DVExfV0VQOworICAgIH0gZWxzZSBpZiAocERldmljZS0+ZUVuY3J5cHRpb25TdGF0dXMgPT0gTmRpczgwMl8xMUVuY3J5cHRpb24yRW5hYmxlZCkgeworICAgICAgICBpZiAocGFyYW0tPnUud3BhX2tleS5rZXlfbGVuID09IFdMQU5fV0VQNDBfS0VZTEVOKQorICAgICAgICAgICAgYn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0+bG9jayk7CisgICAgaWYgKElTX0JST0FEQ0FTVF9BRERSRVNTKCZwYXJhbS0+YWRkclswXSkgfHwgKHBhcmFtLT5hZGRyID09IE5VTEwpKSB7CisgICAgICAgIC8vIElmIElTX0JST0FEQ0FTVF9BRERSRVNTLCBzZXQgdGhlIGtleSBhcyBldmVyeSBrZXkgZW50cnkncyBncm91cCBrZXkuCisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkdyb3VwZSBLZXkgQXNzaWduLlxuIik7CisKKyAgICAgICAgaWYgKChLZXliU2V0QWxsR3JvdXBLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBkd0tleUluZGV4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLT51LndwYV9rZXkua2V5X2xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFFXT1JEKSAmKEtleVJTQyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBCWVRFKWFieUtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUtleURlY01vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUxvY2FsSUQpID09IFRSVUUpICYmCisgICAgICAgICAgICAoS2V5YlNldERlZmF1bHRLZXkoJihwRGV2aWNlLT5zS2V5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBkd0tleUluZGV4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLT51LndwYV9rZXkua2V5X2xlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUFFXT1JEKSAmKEtleVJTQyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFBCWVRFKWFieUtleSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBieUtleURlY01vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+UG9ydE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5ieUxvY2FsSUQpID09IFRSVUUpICkgeworICAgICAgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIkdST1VQIEtleSBBc3NpZ24uXG4iKTsKKworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy9EQkdfUFJOX1dMQU4wMygoInJldHVybiBORElTX1NUQVRVU19JTlZBTElEX0RBVEEgLUtleWJTZXREZWZhdWx0S2V5IEZhaWwuMFxuIikpOworICAgICAgICAgICAvLyBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgIH0KKworICAgIH0gZWxzZSB7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlBhaXJ3aXNlIEtleSBBc3NpZ24uXG4iKTsKKyAgICAgICAgLy8gQlNTSUQgbm90IDB4ZmZmZmZmZmZmZmZmCisgICAgICAgIC8vIFBhaXJ3aXNlIEtleSBjYW4ndCBiZSBXRVAKKyAgICAgICAgaWYgKGJ5S2V5RGVjTW9kZSA9PSBLRVlfQ1RMX1dFUCkgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAiUGFpcndpc2UgS2V5IGNhbid0IGJlIFdFUFxuIik7CisgICAgICAgICAgICAvL3NwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKKyAgICAgICAgfQorCisgICAgICAgIGR3S2V5SW5kZXggfD0gKDEgPDwgMzApOyAvLyBzZXQgcGFpcndpc2Uga2V5CisgICAgICAgIGlmIChwTWdtdC0+ZUNvbmZpZ01vZGUgPT0gV01BQ19DT05GSUdfSUJTU19TVEEpIHsKKyAgICAgICAgICAgIC8vREJHX1BSTl9XTEFOMDMoKCJyZXR1cm4gTkRJU19TVEFUVVNfSU5WQUxJRF9EQVRBIC0gV01BQ19DT05GSUdfSUJTU19TVEFcbiIpKTsKKyAgICAgICAgICAgIC8vc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKyAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOworICAgICAgICB9CisgICAgICAgIGlmIChLZXliU2V0S2V5KCYocERldmljZS0+c0tleSksCisgICAgICAgICAgICAgICAgICAgICAgICZwYXJhbS0+YWRkclswXSwKKyAgICAgICAgICAgICAgICAgICAgICAgZHdLZXlJbmRleCwKKyAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0tPnUud3BhX2tleS5rZXlfbGVuLAorICAgICAgICAgICAgICAgICAgICAgICAoUFFXT1JEKSAmKEtleVJTQyksCisgICAgICAgICAgICAgICAgICAgICAgIChQQllURSlhYnlLZXksCisgICAgICAgICAgICAgICAgICAgICAgICBieUtleURlY01vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT5Qb3J0T2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgcERldmljZS0+YnlMb2NhbElEKSA9PSBUUlVFKSB7CisgICAgICAgICAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICJQYWlyd2lzZSBLZXkgU2V0XG4iKTsKKworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy8gS2V5IFRhYmxlIEZ1bGwKKyAgICAgICAgICAgIGlmIChJU19FVEhfQUREUkVTU19FUVVBTCgmcGFyYW0tPmFkZHJbMF0sIHBEZXZpY2UtPmFieUJTU0lEKSkgeworICAgICAgICAgICAgICAgIC8vREJHX1BSTl9XTEFOMDMoKCJyZXR1cm4gTkRJU19TVEFUVVNfSU5WQUxJRF9EQVRBIC1LZXkgVGFibGUgRnVsbC4yXG4iKSk7CisgICAgICAgICAgICAgICAgLy9zcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOworCisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIC8vIFNhdmUgS2V5IGFuZCBjb25maWd1cmUganVzdCBiZWZvcmUgYXNzb2NpYXRlL3JlYXNzb2NpYXRlIHRvIEJTU0lECisgICAgICAgICAgICAgICAgLy8gd2UgZG8gbm90IGltcGxlbWVudCBub3cKKyAgICAgICAgICAgICAgICAvL3NwaW5fdW5sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9IC8vIEJTU0lEIG5vdCAweGZmZmZmZmZmZmZmZgorICAgIGlmICgocmV0ID09IDApICYmICgocGFyYW0tPnUud3BhX2tleS5zZXRfdHgpICE9IDApKSB7CisgICAgICAgIHBEZXZpY2UtPmJ5S2V5SW5kZXggPSAoQllURSlwYXJhbS0+dS53cGFfa2V5LmtleV9pbmRleDsKKyAgICAgICAgcERldmljZS0+YlRyYW5zbWl0S2V5ID0gVFJVRTsKKyAgICB9CisgICAgcERldmljZS0+YkVuY3J5cHRpb25FbmFibGUgPSBUUlVFOworICAgIC8vc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKworLyoKKyAgICBERVZJQ0VfUFJUKE1TR19MRVZFTF9ERUJVRywgS0VSTl9JTkZPICIga2V5PSV4LSV4LSV4LSV4LSV4LXh4eHh4IFxuIiwKKyAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uYWJ5V2VwS2V5W2J5S2V5SW5kZXhdWzBdLAorICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5hYnlXZXBLZXlbYnlLZXlJbmRleF1bMV0sCisgICAgICAgICAgICAgICBwTWdtdC0+c05vZGVEQlRhYmxlW2lOb2RlSW5kZXhdLmFieVdlcEtleVtieUtleUluZGV4XVsyXSwKKyAgICAgICAgICAgICAgIHBNZ210LT5zTm9kZURCVGFibGVbaU5vZGVJbmRleF0uYWJ5V2VwS2V5W2J5S2V5SW5kZXhdWzNdLAorICAgICAgICAgICAgICAgcE1nbXQtPnNOb2RlREJUYWJsZVtpTm9kZUluZGV4XS5hYnlXZXBLZXlbYnlLZXlJbmRleF1bNF0KKyAgICAgICAgICAgICAgKTsKKyovCisKKwlyZXR1cm4gcmV0OworCit9CisKKworLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBlbmFibGUgd3BhIGF1dGggJiBtb2RlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgIC0KKyAqICAgICAgcGFyYW0gICAgIC0KKyAqICBPdXQ6CisgKgorICogUmV0dXJuIFZhbHVlOgorICoKKyAqLworCitzdGF0aWMgaW50IHdwYV9zZXRfd3BhKFBTRGV2aWNlIHBEZXZpY2UsCisJCQkJICAgICBzdHJ1Y3Qgdmlhd2dldF93cGFfcGFyYW0gKnBhcmFtKQoreworCisgICAgUFNNZ210T2JqZWN0ICAgIHBNZ210ID0gcERldmljZS0+cE1nbXQ7CisJaW50IHJldCA9IDA7CisKKyAgICBwTWdtdC0+ZUF1dGhlbk1vZGUgPSBXTUFDX0FVVEhfT1BFTjsKKyAgICBwTWdtdC0+YlNoYXJlS2V5QWxnb3JpdGhtID0gRkFMU0U7CisKKyAgICByZXR1cm4gcmV0OworfQorCisKKworCisgLyoKKyAqIERlc2NyaXB0aW9uOgorICogICAgICBzZXQgZGlzYXNzb2NpYXRlCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgIC0KKyAqICAgICAgcGFyYW0gICAgIC0KKyAqICBPdXQ6CisgKgorICogUmV0dXJuIFZhbHVlOgorICoKKyAqLworCitzdGF0aWMgaW50IHdwYV9zZXRfZGlzYXNzb2NpYXRlKFBTRGV2aWNlIHBEZXZpY2UsCisJCQkJICAgICBzdHJ1Y3Qgdmlhd2dldF93cGFfcGFyYW0gKnBhcmFtKQoreworICAgIFBTTWdtdE9iamVjdCAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCWludCByZXQgPSAwOworCisgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgaWYgKHBEZXZpY2UtPmJMaW5rUGFzcykgeworICAgICAgICBpZiAoIW1lbWNtcChwYXJhbS0+YWRkciwgcE1nbXQtPmFieUN1cnJCU1NJRCwgNikpCisgICAgICAgICAgICBiU2NoZWR1bGVDb21tYW5kKChIQU5ETEUpcERldmljZSwgV0xBTl9DTURfRElTQVNTT0NJQVRFLCBOVUxMKTsKKyAgICB9CisgICAgc3Bpbl91bmxvY2tfaXJxKCZwRGV2aWNlLT5sb2NrKTsKKworICAgIHJldHVybiByZXQ7Cit9CisKKworCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIGVuYWJsZSBzY2FuIHByb2Nlc3MKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgLQorICogICAgICBwYXJhbSAgICAgLQorICogIE91dDoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKgorICovCisKK3N0YXRpYyBpbnQgd3BhX3NldF9zY2FuKFBTRGV2aWNlIHBEZXZpY2UsCisJCQkJICAgICBzdHJ1Y3Qgdmlhd2dldF93cGFfcGFyYW0gKnBhcmFtKQoreworCWludCByZXQgPSAwOworCisgICAgc3Bpbl9sb2NrX2lycSgmcERldmljZS0+bG9jayk7CisgICAgQlNTdkNsZWFyQlNTTGlzdCgoSEFORExFKXBEZXZpY2UsIHBEZXZpY2UtPmJMaW5rUGFzcyk7CisgICAgYlNjaGVkdWxlQ29tbWFuZCgoSEFORExFKSBwRGV2aWNlLCBXTEFOX0NNRF9CU1NJRF9TQ0FOLCBOVUxMKTsKKyAgICBzcGluX3VubG9ja19pcnEoJnBEZXZpY2UtPmxvY2spOworCisgICAgcmV0dXJuIHJldDsKK30KKworCisKKy8qCisgKiBEZXNjcmlwdGlvbjoKKyAqICAgICAgZ2V0IGJzc2lkCisgKgorICogUGFyYW1ldGVyczoKKyAqICBJbjoKKyAqICAgICAgcERldmljZSAgIC0KKyAqICAgICAgcGFyYW0gICAgIC0KKyAqICBPdXQ6CisgKgorICogUmV0dXJuIFZhbHVlOgorICoKKyAqLworCitzdGF0aWMgaW50IHdwYV9nZXRfYnNzaWQoUFNEZXZpY2UgcERldmljZSwKKwkJCQkgICAgIHN0cnVjdCB2aWF3Z2V0X3dwYV9wYXJhbSAqcGFyYW0pCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCWludCByZXQgPSAwOworCisJbWVtY3B5KHBhcmFtLT51LndwYV9hc3NvY2lhdGUuYnNzaWQsIHBNZ210LT5hYnlDdXJyQlNTSUQgLCA2KTsKKworICAgIHJldHVybiByZXQ7CisKK30KKworCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIGdldCBic3NpZAorICoKKyAqIFBhcmFtZXRlcnM6CisgKiAgSW46CisgKiAgICAgIHBEZXZpY2UgICAtCisgKiAgICAgIHBhcmFtICAgICAtCisgKiAgT3V0OgorICoKKyAqIFJldHVybiBWYWx1ZToKKyAqCisgKi8KKworc3RhdGljIGludCB3cGFfZ2V0X3NzaWQoUFNEZXZpY2UgcERldmljZSwKKwkJCQkgICAgIHN0cnVjdCB2aWF3Z2V0X3dwYV9wYXJhbSAqcGFyYW0pCit7CisgICAgUFNNZ210T2JqZWN0ICAgICAgICBwTWdtdCA9IHBEZXZpY2UtPnBNZ210OworCVBXTEFOX0lFX1NTSUQgICAgICAgcEl0ZW1TU0lEOworCWludCByZXQgPSAwOworCisgICAgcEl0ZW1TU0lEID0gKFBXTEFOX0lFX1NTSUQpcE1nbXQtPmFieUN1cnJTU0lEOworCisJbWVtY3B5KHBhcmFtLT51LndwYV9hc3NvY2lhdGUuc3NpZCwgcEl0ZW1TU0lELT5hYnlTU0lEICwgcEl0ZW1TU0lELT5sZW4pOworCXBhcmFtLT51LndwYV9hc3NvY2lhdGUuc3NpZF9sZW4gPSBwSXRlbVNTSUQtPmxlbjsKKworICAgIHJldHVybiByZXQ7Cit9CisKKworCisvKgorICogRGVzY3JpcHRpb246CisgKiAgICAgIGdldCBzY2FuIHJlc3VsdHMKKyAqCisgKiBQYXJhbWV0ZXJzOgorICogIEluOgorICogICAgICBwRGV2aWNlICAgLQorICogICAgICBwYXJhbSAgICAgLQorICogIE91dDoKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKgorICovCisKK3N0YXRpYyBpbnQgd3BhX2dldF9zY2FuKFBTRGV2aWNlIHBEZXZpY2UsCisJCQkJICAgICBzdHJ1Y3Qgdmlhd2dldF93cGFfcGFyYW0gKnBhcmFtKQoreworCXN0cnVjdCB2aWF3Z2V0X3NjYW5fcmVzdWx0ICpzY2FuX2J1ZjsKKyAgICBQU01nbXRPYmplY3QgICAgcE1nbXQgPSBwRGV2aWNlLT5wTWdtdDsKKyAgICBQV0xBTl9JRV9TU0lEICAgcEl0ZW1TU0lEOworICAgIFBLbm93bkJTUyBwQlNTOworCVBCWVRFICBwQnVmOworCWludCByZXQgPSAwOworCXUxNiBjb3VudCA9IDA7CisJdTE2IGlpLCBqajsKKyNpZiAxCisKKyAgICBQQllURSBwdGVtcEJTUzsKKworCisKKyAgICBwdGVtcEJTUyA9IGttYWxsb2Moc2l6ZW9mKEtub3duQlNTKSwgKGludClHRlBfQVRPTUlDKTsKKworICAgIGlmIChwdGVtcEJTUyA9PSBOVUxMKSB7CisKKyAgICAgICBwcmludGsoImJ1YmJsZSBzb3J0IGttYWxsb2MgbWVtb3J5IGZhaWxAQEBcbiIpOworCisgICAgICAgIHJldCA9IC1FTk9NRU07CisKKyAgICAgICAgcmV0dXJuIHJldDsKKworICAgIH0KKworICAgIGZvciAoaWkgPSAwOyBpaSA8IE1BWF9CU1NfTlVNOyBpaSsrKSB7CisKKyAgICAgICAgIGZvcihqaj0wO2pqPE1BWF9CU1NfTlVNLWlpLTE7amorKykgeworCisgICAgICAgICAgIGlmKChwTWdtdC0+c0JTU0xpc3RbampdLmJBY3RpdmUhPVRSVUUpIHx8CisKKyAgICAgICAgICAgICAgICAoKHBNZ210LT5zQlNTTGlzdFtqal0udVJTU0k+cE1nbXQtPnNCU1NMaXN0W2pqKzFdLnVSU1NJKSAmJihwTWdtdC0+c0JTU0xpc3RbamorMV0uYkFjdGl2ZSE9RkFMU0UpKSkgeworCisgICAgICAgICAgICAgICAgIG1lbWNweShwdGVtcEJTUywmcE1nbXQtPnNCU1NMaXN0W2pqXSxzaXplb2YoS25vd25CU1MpKTsKKworICAgICAgICAgICAgICAgICBtZW1jcHkoJnBNZ210LT5zQlNTTGlzdFtqal0sJnBNZ210LT5zQlNTTGlzdFtqaisxXSxzaXplb2YoS25vd25CU1MpKTsKKworICAgICAgICAgICAgICAgICBtZW1jcHkoJnBNZ210LT5zQlNTTGlzdFtqaisxXSxwdGVtcEJTUyxzaXplb2YoS25vd25CU1MpKTsKKworICAgICAgICAgICAgICB9CisKKyAgICAgICAgIH0KKworICAgIH07CisKKyAga2ZyZWUocHRlbXBCU1MpOworCisgLy8gcHJpbnRrKCJidWJibGUgc29ydCByZXN1bHQ6XG4iKTsKKworICAvL2ZvciAoaWkgPSAwOyBpaSA8IE1BWF9CU1NfTlVNOyBpaSsrKQorCisgIC8vICAgIHByaW50aygiJWQgWyVzXTpSU1NJPSVkXG4iLGlpLCgoUFdMQU5fSUVfU1NJRCkocE1nbXQtPnNCU1NMaXN0W2lpXS5hYnlTU0lEKSktPmFieVNTSUQsCisKKyAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBNZ210LT5zQlNTTGlzdFtpaV0udVJTU0kpOworCisgI2VuZGlmCisKKy8vKioqKioqbWlrZTpidWJibGUgc29ydCBieSBzdHJvbmdlciBSU1NJKioqKiovLworCisKKworCisJY291bnQgPSAwOworCXBCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFswXSk7CisgICAgZm9yIChpaSA9IDA7IGlpIDwgTUFYX0JTU19OVU07IGlpKyspIHsKKyAgICAgICAgcEJTUyA9ICYocE1nbXQtPnNCU1NMaXN0W2lpXSk7CisgICAgICAgIGlmICghcEJTUy0+YkFjdGl2ZSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICBjb3VudCsrOworICAgIH07CisKKyAgICBwQnVmID0ga21hbGxvYyhzaXplb2Yoc3RydWN0IHZpYXdnZXRfc2Nhbl9yZXN1bHQpICogY291bnQsIChpbnQpR0ZQX0FUT01JQyk7CisKKyAgICBpZiAocEJ1ZiA9PSBOVUxMKSB7CisgICAgICAgIHJldCA9IC1FTk9NRU07CisgICAgICAgIHJldHVybiByZXQ7CisgICAgfQorICAgCW1lbXNldChwQnVmLCAwLCBzaXplb2Yoc3RydWN0IHZpYXdnZXRfc2Nhbl9yZXN1bHQpICogY291bnQpOworICAgIHNjYW5fYnVmID0gKHN0cnVjdCB2aWF3Z2V0X3NjYW5fcmVzdWx0ICopcEJ1ZjsKKwlwQlNTID0gJihwTWdtdC0+c0JTU0xpc3RbMF0pOworICAgIGZvciAoaWkgPSAwLCBqaiA9IDA7IGlpIDwgTUFYX0JTU19OVU0gOyBpaSsrKSB7CisgICAgICAgIHBCU1MgPSAmKHBNZ210LT5zQlNTTGlzdFtpaV0pOworICAgICAgICBpZiAocEJTUy0+YkFjdGl2ZSkgeworICAgICAgICAgICAgaWYgKGpqID49IGNvdW50KQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgbWVtY3B5KHNjYW5fYnVmLT5ic3NpZCwgcEJTUy0+YWJ5QlNTSUQsIFdMQU5fQlNTSURfTEVOKTsKKyAgICAgICAgICAgIH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ICBCWVRFICAgICAgICAgICAgYnlQa3RUeXA7CisgICAgQk9PTCAgICAgICAgICAgIGJOZWVkRW5jcnlwdGlvbiA9IEZBTFNFOworICAgIFNLZXlJdGVtICAgICAgICBTVGVtcEtleTsKKyAgICBQU0tleUl0ZW0gICAgICAgcFRyYW5zbWl0S2V5ID0gTlVMTDsKKyAgICBVSU5UICAgICAgICAgICAgY2JIZWFkZXJTaXplOworICAgIFVJTlQgICAgICAgICAgICBpaTsKKyAgICBQQllURSAgICAgICAgICAgcGJ5QlNTSUQ7CisKKworCisKKyAgICBpZiAoQVZBSUxfVEQocERldmljZSwgVFlQRV9BQzBETUEpPD0wKSB7CisgICAgICAgIERFVklDRV9QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8gIlJlbGF5IGNhbid0IGFsbG9jYXRlIFREMS4uXG4iKTsKKyAgICAgICAgcmV0dXJuIEZBTFNFOworICAgIH0KKworICAgIHBIZWFkVEQgPSBwRGV2aWNlLT5hcEN1cnJURFtUWVBFX0FDMERNQV07CisKKyAgICBwSGVhZFRELT5tX3RkMVREMS5ieVRDUiA9IChUQ1JfRURQfFRDUl9TVFApOworCisgICAgbWVtY3B5KHBEZXZpY2UtPnNUeEV0aEhlYWRlci5hYnlEc3RBZGRyLCAoUEJZVEUpcGJ5U2tiRGF0YSwgVV9IRUFERVJfTEVOKTsKKworICAgIGNiRnJhbWVCb2R5U2l6ZSA9IHVEYXRhTGVuIC0gVV9IRUFERVJfTEVOOworCisgICAgaWYgKG50b2hzKHBEZXZpY2UtPnNUeEV0aEhlYWRlci53VHlwZSkgPiBNQVhfREFUQV9MRU4pIHsKKyAgICAgICAgY2JGcmFtZUJvZHlTaXplICs9IDg7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJFbmNyeXB0aW9uRW5hYmxlID09IFRSVUUpIHsKKyAgICAgICAgYk5lZWRFbmNyeXB0aW9uID0gVFJVRTsKKworICAgICAgICAvLyBnZXQgZ3JvdXAga2V5CisgICAgICAgIHBieUJTU0lEID0gcERldmljZS0+YWJ5QnJvYWRjYXN0QWRkcjsKKyAgICAgICAgaWYoS2V5YkdldFRyYW5zbWl0S2V5KCYocERldmljZS0+c0tleSksIHBieUJTU0lELCBHUk9VUF9LRVksICZwVHJhbnNtaXRLZXkpID09IEZBTFNFKSB7CisgICAgICAgICAgICBwVHJhbnNtaXRLZXkgPSBOVUxMOworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fREVCVUciS0VZIGlzIE5VTEwuIFslZF1cbiIsIHBEZXZpY2UtPnBNZ210LT5lQ3Vyck1vZGUpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgREVWSUNFX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fREVCVUciR2V0IEdUSy5cbiIpOworICAgICAgICB9CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPmJFbmFibGVIb3N0V0VQKSB7CisgICAgICAgIGlmICh1Tm9kZUluZGV4ID49IDApIHsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleSA9ICZTVGVtcEtleTsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+YnlDaXBoZXJTdWl0ZSA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uYnlDaXBoZXJTdWl0ZTsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+ZHdLZXlJbmRleCA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdLZXlJbmRleDsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+dUtleUxlbmd0aCA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0udVdlcEtleUxlbmd0aDsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+ZHdUU0M0N18xNiA9IHBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0uZHdUU0M0N18xNjsKKyAgICAgICAgICAgIHBUcmFuc21pdEtleS0+d1RTQzE1XzAgPSBwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLndUU0MxNV8wOworICAgICAgICAgICAgbWVtY3B5KHBUcmFuc21pdEtleS0+YWJ5S2V5LAorICAgICAgICAgICAgICAgICZwTWdtdC0+c05vZGVEQlRhYmxlW3VOb2RlSW5kZXhdLmFieVdlcEtleVswXSwKKyAgICAgICAgICAgICAgICBwVHJhbnNtaXRLZXktPnVLZXlMZW5ndGgKKyAgICAgICAgICAgICAgICApOworICAgICAgICB9CisgICAgfQorCisgICAgdU1BQ2ZyYWdOdW0gPSBjYkdldEZyYWdDb3VudChwRGV2aWNlLCBwVHJhbnNtaXRLZXksIGNiRnJhbWVCb2R5U2l6ZSwgJnBEZXZpY2UtPnNUeEV0aEhlYWRlcik7CisKKyAgICBpZiAodU1BQ2ZyYWdOdW0gPiBBVkFJTF9URChwRGV2aWNlLFRZUEVfQUMwRE1BKSkgeworICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgfQorICAgIGJ5UGt0VHlwID0gKEJZVEUpcERldmljZS0+YnlQYWNrZXRUeXBlOworCisgICAgaWYgKHBEZXZpY2UtPmJGaXhSYXRlKSB7CisgICAgICAgIGlmIChwRGV2aWNlLT5lQ3VycmVudFBIWVR5cGUgPT0gUEhZX1RZUEVfMTFCKSB7CisgICAgICAgICAgICBpZiAocERldmljZS0+dUNvbm5lY3Rpb25SYXRlID49IFJBVEVfMTFNKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV8xMU07CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IChXT1JEKXBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGlmICgocERldmljZS0+ZUN1cnJlbnRQSFlUeXBlID09IFBIWV9UWVBFXzExQSkgJiYKKyAgICAgICAgICAgICAgICAocERldmljZS0+dUNvbm5lY3Rpb25SYXRlIDw9IFJBVEVfNk0pKSB7CisgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV82TTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKHBEZXZpY2UtPnVDb25uZWN0aW9uUmF0ZSA+PSBSQVRFXzU0TSkKKyAgICAgICAgICAgICAgICAgICAgcERldmljZS0+d0N1cnJlbnRSYXRlID0gUkFURV81NE07CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICBwRGV2aWNlLT53Q3VycmVudFJhdGUgPSAoV09SRClwRGV2aWNlLT51Q29ubmVjdGlvblJhdGU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSB7CisgICAgICAgIHBEZXZpY2UtPndDdXJyZW50UmF0ZSA9IHBEZXZpY2UtPnBNZ210LT5zTm9kZURCVGFibGVbdU5vZGVJbmRleF0ud1R4RGF0YVJhdGU7CisgICAgfQorCisgICAgaWYgKHBEZXZpY2UtPndDdXJyZW50UmF0ZSA8PSBSQVRFXzExTSkKKyAgICAgICAgYnlQa3RUeXAgPSBQS19UWVBFXzExQjsKKworICAgIHZHZW5lcmF0ZUZJRk9IZWFkZXIocERldmljZSwgYnlQa3RUeXAsIHBEZXZpY2UtPnBieVRtcEJ1ZmYsIGJOZWVkRW5jcnlwdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgIGNiRnJhbWVCb2R5U2l6ZSwgVFlQRV9BQzBETUEsIHBIZWFkVEQsCisgICAgICAgICAgICAgICAgICAgICAgICAmcERldmljZS0+c1R4RXRoSGVhZGVyLCBwYnlTa2JEYXRhLCBwVHJhbnNtaXRLZXksIHVOb2RlSW5kZXgsCisgICAgICAgICAgICAgICAgICAgICAgICAmdU1BQ2ZyYWdOdW0sCisgICAgICAgICAgICAgICAgICAgICAgICAmY2JIZWFkZXJTaXplCisgICAgICAgICAgICAgICAgICAgICAgICApOworCisgICAgaWYgKE1BQ2JJc1JlZ0JpdHNPbihwRGV2aWNlLT5Qb3J0T2Zmc2V0LCBNQUNfUkVHX1BTQ1RMLCBQU0NUTF9QUykpIHsKKyAgICAgICAgLy8gRGlzYWJsZSBQUworICAgICAgICBNQUNiUFNXYWtldXAocERldmljZS0+UG9ydE9mZnNldCk7CisgICAgfQorCisgICAgcERldmljZS0+YlBXQml0T24gPSBGQUxTRTsKKworICAgIHBMYXN0VEQgPSBwSGVhZFREOworICAgIGZvciAoaWkgPSAwOyBpaSA8IHVNQUNmcmFnTnVtOyBpaSsrKSB7CisgICAgICAgIC8vIFBvbGwgVHJhbnNtaXQgdGhlIGFkYXB0ZXIKKyAgICAgICAgd21iKCk7CisgICAgICAgIHBIZWFkVEQtPm1fdGQwVEQwLmYxT3duZXI9T1dORURfQllfTklDOworICAgICAgICB3bWIoKTsKKyAgICAgICAgaWYgKGlpID09ICh1TUFDZnJhZ051bSAtIDEpKQorICAgICAgICAgICAgcExhc3RURCA9IHBIZWFkVEQ7CisgICAgICAgIHBIZWFkVEQgPSBwSGVhZFRELT5uZXh0OworICAgIH0KKworICAgIHBMYXN0VEQtPnBUREluZm8tPnNrYiA9IDA7CisgICAgcExhc3RURC0+cFRESW5mby0+YnlGbGFncyA9IDA7CisKKyAgICBwRGV2aWNlLT5hcEN1cnJURFtUWVBFX0FDMERNQV0gPSBwSGVhZFREOworCisgICAgTUFDdlRyYW5zbWl0QUMwKHBEZXZpY2UtPlBvcnRPZmZzZXQpOworCisgICAgcmV0dXJuIFRSVUU7Cit9CisKKworCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvdnQ2NjU1L3dyb3V0ZS5oIGIvZHJpdmVycy9zdGFnaW5nL3Z0NjY1NS93cm91dGUuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lYTVmNTg5Ci0tLSAvZGV2L251bGwK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2ZXJzL3N0YWdpbmcvd2xhbi1uZy9wODAyMTFoZHIuaAorKysgYi9kcml2ZXJzL3N0YWdpbmcvd2xhbi1uZy9wODAyMTFoZHIuaApAQCAtNjgsOCArNjgsNiBAQAogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIC8qIFByb2plY3QgSW5jbHVkZXMgKi8KIAotCi0KIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAvKiBDb25zdGFudHMgKi8KIApAQCAtMTg4LDcgKzE4Niw2IEBACiAJcDgwMjExX2hkcl9hNF90IGE0OwogfSBfX2F0dHJpYnV0ZV9fICgocGFja2VkKSkgcDgwMjExX2hkcl90OwogCi0KIC8qIEZyYW1lIGFuZCBoZWFkZXIgbGVuZ3RoIG1hY3JvcyAqLwogCiAjZGVmaW5lIFdMQU5fQ1RMX0ZSQU1FTEVOKGZzdHlwZSkgKFwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy93bGFuLW5nL3A4MDIxMW1ldGEuaCBiL2RyaXZlcnMvc3RhZ2luZy93bGFuLW5nL3A4MDIxMW1ldGEuaAppbmRleCAyZjNjOWZjLi5jMWE2NzdiIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvd2xhbi1uZy9wODAyMTFtZXRhLmgKKysrIGIvZHJpdmVycy9zdGFnaW5nL3dsYW4tbmcvcDgwMjExbWV0YS5oCkBAIC02MCw3ICs2MCw2IEBACiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogLyogUHJvamVjdCBJbmNsdWRlcyAqLwogCi0KIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAvKiBUeXBlcyAqLwogCmRpZmY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KSB8IDB4MTgwMDAwMDApCisjZGVmaW5lIERJRG1pYl9wMl9wMk5JQ19wMlBSSVN1cFJhbmdlIFwKKwkJCShQODAyMTFESURfTUtTRUNUSU9OKDUpIHwgXAorCQkJUDgwMjExRElEX01LR1JPVVAoNSkgfCBcCisJCQlQODAyMTFESURfTUtJVEVNKDYpIHwgMHgxMDAwMDAwMCkKICNkZWZpbmUgRElEbWliX3AyX3AyTUFDIFwKIAkJCShQODAyMTFESURfTUtTRUNUSU9OKDUpIHwgXAogCQkJUDgwMjExRElEX01LR1JPVVAoNikpCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvd2xhbi1uZy9wODAyMTFtZ210LmggYi9kcml2ZXJzL3N0YWdpbmcvd2xhbi1uZy9wODAyMTFtZ210LmgKaW5kZXggNjIzNWZlNy4uYzkyNWE0NSAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3dsYW4tbmcvcDgwMjExbWdtdC5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy93bGFuLW5nL3A4MDIxMW1nbXQuaApAQCAtMTAzLDEyICsxMDMsMTAgQEAKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAvKiBQcm9qZWN0IEluY2x1ZGVzICovCiAKLQogI2lmbmRlZiAgX1A4MDIxMUhEUl9ICiAjaW5jbHVkZSAicDgwMjExaGRyLmgiCiAjZW5kaWYKIAotCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogLyogQ29uc3RhbnRzICovCiAKQEAgLTUwNCwyNSArNTAyLDI1IEBACiAKIH0gd2xhbl9mcl9kZWF1dGhlbl90OwogCi12b2lkIHdsYW5fbWdtdF9lbmNvZGVfYmVhY29uKHdsYW5fZnJfYmVhY29uX3QgKmYpOwotdm9pZCB3bGFuX21nbXRfZGVjb2RlX2JlYWNvbih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y8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKiBMb2NhbCBNYWNyb3MgKi8KKworI2RlZmluZSBic3dhcF8xNih4KSBcCisgICAgIChfX2V4dGVuc2lvbl9fCQkJCQkJCSAgICAgIFwKKyAgICAgICh7IHJlZ2lzdGVyIHVuc2lnbmVkIHNob3J0IGludCBfX3YsIF9feCA9ICh4KTsJCQkgICAgICBcCisJICAgX19hc21fXyAoInJvcncgJDgsICV3MCIJCQkJCSAgICAgIFwKKwkJICAgIDogIj1yIiAoX192KQkJCQkJICAgICAgXAorCQkgICAgOiAiMCIgKF9feCkJCQkJCQkgICAgICBcCisJCSAgICA6ICJjYyIpOwkJCQkJCSAgICAgIFwKKwkgX192OyB9KSkKKworI2RlZmluZSBic3dhcF8zMih4KSBcCisgICAgIChfX2V4dGVuc2lvbl9fCQkJCQkJCSAgICAgIFwKKyAgICAgICh7IHJlZ2lzdGVyIHVuc2lnbmVkIGludCBfX3YsIF9feCA9ICh4KTsJCQkJICAgICAgXAorCSAgIF9fYXNtX18gKCJyb3J3ICQ4LCAldzA7IgkJCQkJICAgICAgXAorCQkgICAgInJvcmwgJDE2LCAlMDsiCQkJCQkgICAgICBcCisJCSAgICAicm9ydyAkOCwgJXcwIgkJCQkJICAgICAgXAorCQkgICAgOiAiPXIiIChfX3YpCQkJCQkgICAgICBcCisJCSAgICA6ICIwIiAoX194KQkJCQkJCSAgICAgIFwKKwkJICAgIDogImNjIik7CQkJCQkJICAgICAgXAorCSBfX3Y7IH0pKQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyogTG9jYWwgVHlwZXMgKi8KKwordHlwZWRlZiBzdHJ1Y3QgczNkYXRhcmVjIHsKKwl1MzIgbGVuOworCXUzMiBhZGRyOworCXU4IGNoZWNrc3VtOworCXU4ICpkYXRhOworfSBzM2RhdGFy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ZWFyZWEycHN0cihtaWJyZWNfdCAqIG1pYiwKIAkJCQkgICBpbnQgaXNnZXQsCi0JCQkJICAgd2xhbmRldmljZV90ICp3bGFuZGV2LAotCQkJCSAgIGhmYTM4NHhfdCAqaHcsCi0JCQkJICAgcDgwMjExbXNnX2RvdDExcmVxX21pYnNldF90ICptc2csCisJCQkJICAgd2xhbmRldmljZV90ICogd2xhbmRldiwKKwkJCQkgICBoZmEzODR4X3QgKiBodywKKwkJCQkgICBwODAyMTFtc2dfZG90MTFyZXFfbWlic2V0X3QgKiBtc2csCiAJCQkJICAgdm9pZCAqZGF0YSk7CiAKLXN0YXRpYyBpbnQgcHJpc20ybWliX3VpbnQzMihtaWJyZWNfdCAqbWliLAorc3RhdGljIGludCBwcmlzbTJtaWJfdWludDMyKG1pYnJlY190ICogbWliLAogCQkJICAgIGludCBpc2dldCwKLQkJCSAgICB3bGFuZGV2aWNlX3QgKndsYW5kZXYsCi0JCQkgICAgaGZhMzg0eF90ICpodywKLQkJCSAgICBwODAyMTFtc2dfZG90MTFyZXFfbWlic2V0X3QgKm1zZywgdm9pZCAqZGF0YSk7CisJCQkgICAgd2xhbmRldmljZV90ICogd2xhbmRldiwKKwkJCSAgICBoZmEzODR4X3QgKiBodywKKwkJCSAgICBwODAyMTFtc2dfZG90MTFyZXFfbWlic2V0X3QgKiBtc2csIHZvaWQgKmRhdGEpOwogCi1zdGF0aWMgaW50IHByaXNtMm1pYl9mbGFnKG1pYnJlY190ICptaWIsCitzdGF0aWMgaW50IHByaXNtMm1pYl9mbGFnKG1pYnJlY190ICogbWliLAogCQkJICBpbnQgaXNnZXQsCi0JCQkgIHdsYW5kZXZpY2VfdCAqd2xhbmRldiwKLQkJCSAgaGZhMzg0eF90ICpodywKLQkJCSAgcDgwMjExbXNnX2RvdDExcmVxX21pYnNldF90ICptc2csIHZvaWQgKmRhdGEpOworCQkJICB3bGFuZGV2aWNlX3QgKiB3bGFuZGV2LAorCQkJICBoZmEzODR4X3QgKiBodywKK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ZnNfaW5ldF9wdG9uKEFGX0lORVQsIHNyYywgJnM0LT5zaW5fYWRkci5zX2FkZHIpKSB7CisJCXM0LT5zaW5fZmFtaWx5ID0gQUZfSU5FVDsKKwkJcmV0dXJuIDE7CisJfQorCisJLyogdGVtcG9yYXJpbHkgdGVybWluYXRlIHN0cmluZyAqLworCXBjdCA9IHN0cmNocihzcmMsICclJyk7CisJaWYgKHBjdCkKKwkJKnBjdCA9ICdcMCc7CisKKwlyYyA9IGNpZnNfaW5ldF9wdG9uKEFGX0lORVQ2LCBzcmMsICZzNi0+c2luNl9hZGRyLnM2X2FkZHIpOworCisJLyogcmVwYWlyIHRlbXAgdGVybWluYXRpb24gKGlmIGFueSkgYW5kIG1ha2UgcGN0IHBvaW50IHRvIHNjb3BlaWQgKi8KKwlpZiAocGN0KQorCQkqcGN0KysgPSAnJSc7CisKKwlpZiAoIXJjKQorCQlyZXR1cm4gcmM7CisKKwlzNi0+c2luNl9mYW1pbHkgPSBBRl9JTkVUNjsKKwlpZiAocGN0KSB7CisJCXM2LT5zaW42X3Njb3BlX2lkID0gKHUzMikgc2ltcGxlX3N0cnRvdWwocGN0LCAmZW5kcCwgMCk7CisJCWlmICghKnBjdCB8fCAqZW5kcCkKKwkJCXJldHVybiAwOworCX0KKworCXJldHVybiByYzsKK30KKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiBjb252ZXJ0IGEgTlQgc3RhdHVzIGNvZGUgdG8gYSBkb3MgY2xhc3MvY29kZQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpkaWZmIC0tZ2l0IGEvZnMvY2lmcy9yZWFkZGlyLmMgYi9mcy9jaWZzL3JlYWRkaXIuYwppbmRleCA4NmQwMDU1Li5mODIzYTRhIDEwMDY0NAotLS0gYS9mcy9jaWZzL3JlY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CisJCXJldHVybiAwOworCisJcCA9IHhkcl9pbmxpbmVfZGVjb2RlKHhkciwgc2l6ZW9mKGVudHJpZXMpKTsKKwlpZiAodW5saWtlbHkocCA9PSBOVUxMKSkKKwkJcmV0dXJuIC1FSU87CisJZW50cmllcyA9IG50b2hsKCpwKTsKKwlkcHJpbnRrKCJORlM6IHJlY2VpdmVkICV1IGF1dGggZmxhdm9yc1xuIiwgZW50cmllcyk7CisJaWYgKGVudHJpZXMgPiBORlNfTUFYX1NFQ0ZMQVZPUlMpCisJCWVudHJpZXMgPSBORlNfTUFYX1NFQ0ZMQVZPUlM7CisKKwlwID0geGRyX2lubGluZV9kZWNvZGUoeGRyLCBzaXplb2YodTMyKSAqIGVudHJpZXMpOworCWlmICh1bmxpa2VseShwID09IE5VTEwpKQorCQlyZXR1cm4gLUVJTzsKKworCWlmIChlbnRyaWVzID4gKmNvdW50KQorCQllbnRyaWVzID0gKmNvdW50OworCisJZm9yIChpID0gMDsgaSA8IGVudHJpZXM7IGkrKykgeworCQlmbGF2b3JzW2ldID0gbnRvaGwoKnArKyk7CisJCWRwcmludGsoIk5GUzpcdGZsYXZvciAldTogJWRcbiIsIGksIGZsYXZvcnNbaV0pOworCX0KKwkqY291bnQgPSBpOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgbW50X2RlY19tb3VudHJlczMoc3RydWN0IHJwY19ycXN0ICpyZXEsIF9fYmUzMiAqcCwKKwkJCSAgICAgc3RydWN0IG1vdW50cmVzICpyZXMpCit7CisJc3RydWN0IHhkcl9zdHJlYW0geGRyOworCWludCBzdGF0dXM7CisKKwl4ZHJfaW5pdF9kZWNvZGUoJnhkciwgJnJlcS0+cnFfcmN2X2J1ZiwgcCk7CisKKwlzdGF0dXMgPSBkZWNvZGVfZmhzX3N0YXR1cygmeGRyLCByZXMpOworCWlmICh1bmxpa2VseShzdGF0dXMgIT0gMCB8fCByZXMtPmVycm5vICE9IDApKQorCQlyZXR1cm4gc3RhdHVzOworCX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CiAKLSNkZWZpbmUgQVNJQzNfRVhUQ0ZfU2VsZWN0ICAgICAgICAgMHgwMAotI2RlZmluZSBBU0lDM19FWFRDRl9SZXNldCAgICAgICAgICAweDA0CisjZGVmaW5lIEFTSUMzX0VYVENGX1NFTEVDVCAgICAgICAgMHgwMAorI2RlZmluZSBBU0lDM19FWFRDRl9SRVNFVCAgICAgICAgIDB4MDQKIAogI2RlZmluZSBBU0lDM19FWFRDRl9TTU9EMAkgICAgICAgICAoMSA8PCAwKSAgLyogc2xvdCBudW1iZXIgb2YgbW9kZSAwICovCiAjZGVmaW5lIEFTSUMzX0VYVENGX1NNT0QxCSAgICAgICAgICgxIDw8IDEpICAvKiBzbG90IG51bWJlciBvZiBtb2RlIDEgKi8KQEAgLTI3OSwyMjIgKzI4Niw5IEBACiAgKiAgU0RJT19DVFJMICAgICAgICAgQ29udHJvbCByZWdpc3RlcnMgZm9yIFNESU8gb3BlcmF0aW9ucwogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgQVNJQzNfU0RfQ09ORklHX0Jhc2UgICAgICAgICAgICAweDA0MDAgLyogQXNzdW1lcyAzMiBiaXQgYWRkcmVzc2luZyAqLwotCi0jZGVmaW5lIEFTSUMzX1NEX0NPTkZJR19Db21tYW5kICAgICAgICAgICAweDA4ICAgLyogUi9XOiBDb21tYW5kICovCi0KLS8qIFswOjhdIFNEIENvbnRyb2wgUmVnaXN0ZXIgQmFzZSBBZGRyZXNzICovCi0jZGVmaW5lIEFTSUMzX1NEX0NPTkZJR19BZGRyMCAgICAgICAgICAgICAweDIwCi0KLS8qIFs5OjMxXSBTRCBDb250cm9sIFJlZ2lzdGVyIEJhc2UgQWRkcmVzcyAqLwotI2RlZmluZSBBU0lDM19TRF9DT05GSUdfQWRkcjEgICAgICAgICAgICAgMHgyNAotCi0vKiBSL086IGludGVycnVwdCBhc3NpZ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KF9fZW50cnktPmRldiksIF9fZW50cnktPnRyYW5zYWN0aW9uLAorCQkgIF9fZW50cnktPnN5bmNfY29tbWl0KQorKTsKKworVFJBQ0VfRVZFTlQoamJkMl9jb21taXRfbG9nZ2luZywKKworCVRQX1BST1RPKGpvdXJuYWxfdCAqam91cm5hbCwgdHJhbnNhY3Rpb25fdCAqY29tbWl0X3RyYW5zYWN0aW9uKSwKKworCVRQX0FSR1Moam91cm5hbCwgY29tbWl0X3RyYW5zYWN0aW9uKSwKKworCVRQX1NUUlVDVF9fZW50cnkoCisJCV9fZmllbGQoCWRldl90LAlkZXYJCQkpCisJCV9fZmllbGQoCWNoYXIsCXN5bmNfY29tbWl0CQkgICkKKwkJX19maWVsZCgJaW50LAl0cmFuc2FjdGlvbgkJICApCisJKSwKKworCVRQX2Zhc3RfYXNzaWduKAorCQlfX2VudHJ5LT5kZXYJCT0gam91cm5hbC0+al9mc19kZXYtPmJkX2RldjsKKwkJX19lbnRyeS0+c3luY19jb21taXQgPSBjb21taXRfdHJhbnNhY3Rpb24tPnRfc3luY2hyb25vdXNfY29tbWl0OworCQlfX2VudHJ5LT50cmFuc2FjdGlvbgk9IGNvbW1pdF90cmFuc2FjdGlvbi0+dF90aWQ7CisJKSwKKworCVRQX3ByaW50aygiZGV2ICVzIHRyYW5zYWN0aW9uICVkIHN5bmMgJWQiLAorCQkgIGpiZDJfZGV2X3RvX25hbWUoX19lbnRyeS0+ZGV2KSwgX19lbnRyeS0+dHJhbnNhY3Rpb24sCisJCSAgX19lbnRyeS0+c3luY19jb21taXQpCispOworCitUUkFDRV9FVkVOVChqYmQyX2VuZF9jb21taXQsCisJVFBfUFJPVE8oam91cm5hbF90ICpqb3VybmFsLCB0cmFuc2FjdGlvbl90ICpjb21taXRfdHJhbnNhY3Rpb24pLAorCisJVFBfQVJHUyhqb3VybmFsLCBjb21taXRfdHJhbnNhY3Rpb24pLAorCisJVFBfU1RSVUNUX19lbnRyeSgKKwkJX19maWVsZCgJZGV2X3Q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AgICAgYml0IDAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0tLS0tLSAgICAgICAgLS0tLS0tLQorICogTm9ybWFsIHBhZ2UgICAgICAgICAgICAgICAgICAgICAwICAgICAgICAgICAgICAwCisgKiBQb2ludHMgdG8gaGVhZCBwYWdlICAgICAgICAgICAgIDAgICAgICAgICAgICAgIDEKKyAqIE5ldyBoZWFkIHBhZ2UgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgMAorICoKKyAqIE5vdGUgd2UgY2FuIG5vdCB0cnVzdCB0aGUgcHJldiBwb2ludGVyIG9mIHRoZSBoZWFkIHBhZ2UsIGJlY2F1c2U6CisgKgorICogKy0tLS0rICAgICAgICstLS0tLSsgICAgICAgICstLS0tLSsKKyAqIHwgICAgfC0tLS0tLT58ICBUICB8LS0tWC0tLT58ICBOICB8CisgKiB8ICAgIHw8LS0tLS0tfCAgICAgfCAgICAgICAgfCAgICAgfAorICogKy0tLS0rICAgICAgICstLS0tLSsgICAgICAgICstLS0tLSsKKyAqICAgXiAgICAgICAgICAgICAgICAgICAgICAgICAgIF4gfAorICogICB8ICAgICAgICAgICstLS0tLSsgICAgICAgICAgfCB8CisgKiAgICstLS0tLS0tLS0tfCAgUiAgfC0tLS0tLS0tLS0rIHwKKyAqICAgICAgICAgICAgICB8ICAgICB8PC0tLS0tLS0tLS0tKworICogICAgICAgICAgICAgICstLS0tLSsKKyAqCisgKiBLZXk6ICAtLS1YLS0+ICBIRUFEIGZsYWcgc2V0IGluIHBvaW50ZXIKKyAqICAgICAgICAgVCAgICAgIFRhaWwgcGFnZQorICogICAgICAgICBSICAgICAgUmVhZGVyIHBhZ2UKKyAqICAgICAgICAgTiAgICAgIE5leHQgcGFnZQorICoKKyAqIChzZWUgX19yYl9yZXNlcnZlX25leHQoKSB0byBzZWUgd2hlcmUgdGhpcyBoYXBwZW5zKQorICoKKyAqICBXaGF0IHRoZSBhYm92ZSBzaG93cyBpcyB0aGF0IHRoZSByZW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xlIGNvdW50cworICogaW1hX2NvdW50c19wdXQgLSBkZWNyZW1lbnQgZmlsZSBjb3VudHMKKyAqCisgKiBGaWxlIGNvdW50cyBhcmUgaW5jcmVtZW50ZWQgaW4gaW1hX3BhdGhfY2hlY2suIE9uIGZpbGUgb3BlbgorICogZXJyb3IsIHN1Y2ggYXMgRVRYVEJTWSwgZGVjcmVtZW50IHRoZSBjb3VudHMgdG8gcHJldmVudAorICogdW5uZWNlc3NhcnkgaW1iYWxhbmNlIG1lc3NhZ2VzLgorICovCit2b2lkIGltYV9jb3VudHNfcHV0KHN0cnVjdCBwYXRoICpwYXRoLCBpbnQgbWFzaykKK3sKKwlzdHJ1Y3QgaW5vZGUgKmlub2RlID0gcGF0aC0+ZGVudHJ5LT5kX2lub2RlOworCXN0cnVjdCBpbWFfaWludF9jYWNoZSAqaWludDsKKworCWlmICghaW1hX2luaXRpYWxpemVkIHx8ICFTX0lTUkVHKGlub2RlLT5pX21vZGUpKQorCQlyZXR1cm47CisJaWludCA9IGltYV9paW50X2ZpbmRfaW5zZXJ0X2dldChpbm9kZSk7CisJaWYgKCFpaW50KQorCQlyZXR1cm47CisKKwltdXRleF9sb2NrKCZpaW50LT5tdXRleCk7CisJaWludC0+b3BlbmNvdW50LS07CisJaWYgKChtYXNrICYgTUFZX1dSSVRFKSB8fCAobWFzayA9PSAwKSkKKwkJaWludC0+d3JpdGVjb3VudC0tOworCWVsc2UgaWYgKG1hc2sgJiAoTUFZX1JFQUQgfCBNQVlfRVhFQykpCisJCWlpbnQtPnJlYWRjb3VudC0tOworCW11dGV4X3VubG9jaygmaWludC0+bXV0ZXgpOworCisJa3JlZl9wdXQoJmlpbnQtPnJlZmNvdW50LCBpaW50X2ZyZWUpOworfQorCisvKgorICogaW1hX2NvdW50c19nZXQgLSBpbmNyZW1lbnQgZmlsZSBjb3VudHMKICAqCiAgKiAtIGZvciBJUEMgc2htIGFuZCBzaG1hdCBmaWxlLgogICogLSBmb3IgbmZzZCBleHBvcnRlZ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9iYXNlLAorCQkJICAgKHVuc2lnbmVkIGxvbmcpcnVudGltZS0+aHdfcHRyX2ludGVycnVwdCk7CisJfQorCiAJaHdfYmFzZSA9IHJ1bnRpbWUtPmh3X3B0cl9iYXNlOwogCW5ld19od19wdHIgPSBod19iYXNlICsgcG9zOwogCkBAIC05MDksNDcgKzk0MywyNCBAQAogaW50IHNuZF9pbnRlcnZhbF9saXN0KHN0cnVjdCBzbmRfaW50ZXJ2YWwgKmksIHVuc2lnbmVkIGludCBjb3VudCwgdW5zaWduZWQgaW50ICpsaXN0LCB1bnNpZ25lZCBpbnQgbWFzaykKIHsKICAgICAgICAgdW5zaWduZWQgaW50IGs7Ci0JaW50IGNoYW5nZWQgPSAwOworCXN0cnVjdCBzbmRfaW50ZXJ2YWwgbGlzdF9yYW5nZTsKIAogCWlmICghY291bnQpIHsKIAkJaS0+ZW1wdHkgPSAxOwogCQlyZXR1cm4gLUVJTlZBTDsKIAl9CisJc25kX2ludGVydmFsX2FueSgmbGlzdF9yYW5nZSk7CisJbGlzdF9yYW5nZS5taW4gPSBVSU5UX01BWDsKKwlsaXN0X3JhbmdlLm1heCA9IDA7CiAgICAgICAgIGZvciAoayA9IDA7IGsgPCBjb3VudDsgaysrKSB7CiAJCWlmIChtYXNrICYmICEobWFzayAmICgxIDw8IGspKSkKIAkJCWNvbnRpbnVlOwotICAgICAgICAgICAgICAgIGlmIChpLT5taW4gPT0gbGlzdFtrXSAmJiAhaS0+b3Blbm1pbikKLSAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gX2wxOwotICAgICAgICAgICAgICAgIGlmIChpLT5taW4gPCBsaXN0W2tdKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpLT5taW4gPSBsaXN0W2tdOwotCQkJaS0+b3Blbm1pbiA9IDA7Ci0JCQljaGFuZ2VkID0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gX2wxOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgIC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mYgbGlzdAorICBbLi4uXQorICBrbWVtOmttYWxsb2MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOmttZW1fY2FjaGVfYWxsb2MgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOmttYWxsb2Nfbm9kZSAgICAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOmttZW1fY2FjaGVfYWxsb2Nfbm9kZSAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOmtmcmVlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOmttZW1fY2FjaGVfZnJlZSAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2VfZnJlZV9kaXJlY3QgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2V2ZWNfZnJlZSAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2VfYWxsb2MgICAgICAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2VfYWxsb2Nfem9uZV9sb2NrZWQgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2VfcGNwdV9kcmFpbiAgICAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorICBrbWVtOm1tX3BhZ2VfYWxsb2NfZXh0ZnJhZyAgICAgICAgICAgICAgIFtUcmFjZXBvaW50IGV2ZW50XQorCitUaGVuIGFueSAob3IgYWxsKSBvZiB0aGUgYWJvdmUgZXZlbnQgc291cmNlcyBjYW4gYmUgYWN0aXZhdGVkIGFuZAorbWVhc3VyZWQuI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JlY29yZDogQ2FwdHVyZWQgYW5kIHdyb3RlIDAuMjY3IE1CIHBlcmYuZGF0YSAofjExNjc5IHNhbXBsZXMpIF0KKworVG8gY2hlY2sgd2hpY2ggZnVuY3Rpb25zIGdlbmVyYXRlZCBwYWdlIGFsbG9jYXRpb25zOgorCisgdGl0YW46fi9naXQ+IHBlcmYgcmVwb3J0CisgIyBTYW1wbGVzOiAxMDY0NgorICMKKyAjIE92ZXJoZWFkICAgICAgICAgIENvbW1hbmQgICAgICAgICAgICAgICBTaGFyZWQgT2JqZWN0CisgIyAuLi4uLi4uLiAgLi4uLi4uLi4uLi4uLi4uICAuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLgorICMKKyAgICAyMy41NyUgICAgICAgZ2l0LXJlcGFjayAgL2xpYjY0L2xpYmMtMi41LnNvCisgICAgMjEuODElICAgICAgICAgICAgICBnaXQgIC9saWI2NC9saWJjLTIuNS5zbworICAgIDE0LjU5JSAgICAgICAgICAgICAgZ2l0ICAuL2dpdAorICAgIDExLjc5JSAgICAgICBnaXQtcmVwYWNrICAuL2dpdAorICAgICA3LjEyJSAgICAgICAgICAgICAgZ2l0ICAvbGliNjQvbGQtMi41LnNvCisgICAgIDMuMTYlICAgICAgIGdpdC1yZXBhY2sgIC9saWI2NC9saWJwdGhyZWFkLTIuNS5zbworICAgICAyLjA5JSAgICAgICBnaXQtcmVwYWNrICAvYmluL2Jhc2gKKyAgICAgMS45NyUgICAgICAgICAgICAgICBybSAgL2xpYjY0L2xpYmMtMi41LnNvCisgICAgIDEuMzklICAgICAgICAgICAgICAgbXYgIC9saWI2NC9sZC0yLjUuc28KKyAgICAgMS4zNyUgICAgICAgICAgICAgICBtdiAgL2xpYjY0L2xpYmMtMi41LnNvCisgICAgIDEuMTIlICAgICAgIGdpdC1yZXBhY2sgIC9saWI2NC9sZC0yLjUuc28KKyAgICAgMC45NSUgICAgICAgICAgICAgICBybSAgL2xpYjY0L2xkLTIuNS5zbworICAgICAwLjkwJSAgZ2l0LXVwZGF0ZS1zZXJ2ICAvbGliNjQvbGliYy0yLjUuc28KKyAgICAgMC43MyUgIGdpdC11cGRhdGUtc2VydiAgL2xpYjY0L2xkLTIuNS5zbworICAgICAwLjY4JSAgICAgICAgICAgICBwZXJmICAvbGliNjQvbGlicHRocmVhZC0yLjUuc28KKyAgICAgMC42NCUgICAgICAgZ2l0LXJlcGFjayAgL3Vzci9saWI2NC9saWJ6LnNvLjEuMi4zCisKK09yIHRvIHNlZSBpdCBvbiBhIG1vcmUgZmluZWdyYWluZWQgbGV2ZWw6CisKK3RpdGFuOn4vZ2l0PiBwZXJmIHJlcG9ydCAtLXNvcnQgY29tbSxkc28sc3ltYm9sCisjIFNhbXBsZXM6IDEwNjQ2CisjCisjIE92ZXJoZWFkICAgICAgICAgIENvbW1hbmQgICAgICAgICAgICAgICBTaGFyZWQgT2JqZWN0ICBTeW1ib2wKKyMgLi4uLi4uLi4gIC4uLi4uLi4uLi4uLi4uLiAgLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4gIC4uLi4uLgorIworICAgICA5LjM1JSAgICAgICBnaXQtcmVwYWNrICAuL2dpdCAgICAgICAgICAgICAgICAgICAgICAgWy5dIGluc2VydF9vYmpfaGFzaAorICAgICA5LjEyJSAgICAgICAgICAgICAgZ2l0ICAuL2dpdCAgICAgICAgICAgICAgICAgICAgICAgWy5dIGluc2VydF9vYmpfaGFzaAorICAgICA3LjMxJSAgICAgICAgICAgICAgZ2l0ICAvbGliNjQvbGliYy0yLjUuc28gICAgICAgICAgWy5dIG1lbWNweQorICAgICA2LjM0JSAgICAgICBnaXQtcmVwYWNrICAvbGliNjQvbGliYy0yLjUuc28gICAgICAgICAgWy5dIF9pbnRfbWFsbG9jCisgICAgIDYuMjQlICAgICAgIGdpdC1yZXBhY2sgIC9saWI2NC9saWJjLTIuNS5zbyAgICAgICAgICBbLl0gbWVtY3B5CisgICAgIDUuODIlICAgICAgIGdpdC1yZXBhY2sgIC9saWI2NC9saWJ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uLi4uLi4uLi4KKyAjCisgICAgMjMuMjUlICAgICAgIGdpdC1yZXBhY2sgIC9saWI2NC9saWJjLTIuNS5zbworICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICB8LS01MC4wMCUtLSBfaW50X2ZyZWUKKyAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgfC0tMzcuNTAlLS0gX19HSV9fX2ZvcmsKKyAgICAgICAgICAgICAgICB8ICAgICAgICAgIG1ha2VfY2hpbGQKKyAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgfC0tMTIuNTAlLS0gcHRtYWxsb2NfdW5sb2NrX2FsbDIKKyAgICAgICAgICAgICAgICB8ICAgICAgICAgIG1ha2VfY2hpbGQKKyAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgIC0tNi4yNSUtLSBfX0dJX3N0cmNweQorICAgIDIxLjYxJSAgICAgICAgICAgICAgZ2l0ICAvbGliNjQvbGliYy0yLjUuc28KKyAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgfC0tMzAuMDAlLS0gX19HSV9yZWFkCisgICAgICAgICAgICAgICAgfCAgICAgICAgICB8CisgICAgICAgICAgICAgICAgfCAgICAgICAgICAgLS04My4zMyUtLSBnaXRfY29uZmlnX2Zyb21fZmlsZQorICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICBnaXRfY29uZmlnCisgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgIHwKKyAgIFsuLi5dCisKK09yIHlvdSBjYW4gb2JzZXJ2ZSB0aGUgd2hvbGUgc3lzdGVtJ3MgcGFnZSBhbGxvY2F0aW9ucyBmb3IgMTAKK3NlY29uZHM6CisKK3RpdGFuOn4vZ2l0PiBwZXJmIHN0YXQgLWEgLWUga21lbTptbV9wYWdlX3BjcHVfZHJhaW4gLWUKK2ttZW06bW1fcGFnZV9hbGxvYyAtZSBrbWVtOm1tX3BhZ2V2ZWNfZnJlZSAtZQora21lbT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orCQlldmVudC0+bG9zdC5sb3N0KTsKKworCXRvdGFsX2xvc3QgKz0gZXZlbnQtPmxvc3QubG9zdDsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCB0cmFjZV9ldmVudChldmVudF90ICpldmVudCkKK3sKKwl1bnNpZ25lZCBjaGFyICpyYXdfZXZlbnQgPSAodm9pZCAqKWV2ZW50OworCWNoYXIgKmNvbG9yID0gUEVSRl9DT0xPUl9CTFVFOworCWludCBpLCBqOworCisJaWYgKCFkdW1wX3RyYWNlKQorCQlyZXR1cm47CisKKwlkcHJpbnRmKCIuIik7CisJY2RwcmludGYoIlxuLiAuLi4gcmF3IGV2ZW50OiBzaXplICVkIGJ5dGVzXG4iLCBldmVudC0+aGVhZGVyLnNpemUpOworCisJZm9yIChpID0gMDsgaSA8IGV2ZW50LT5oZWFkZXIuc2l6ZTsgaSsrKSB7CisJCWlmICgoaSAmIDE1KSA9PSAwKSB7CisJCQlkcHJpbnRmKCIuIik7CisJCQljZHByaW50ZigiICAlMDR4OiAiLCBpKTsKKwkJfQorCisJCWNkcHJpbnRmKCIgJTAyeCIsIHJhd19ldmVudFtpXSk7CisKKwkJaWYgKCgoaSAmIDE1KSA9PSAxNSkgfHwgaSA9PSBldmVudC0+aGVhZGVyLnNpemUtMSkgeworCQkJY2RwcmludGYoIiAgIik7CisJCQlmb3IgKGogPSAwOyBqIDwgMTUtKGkgJiAxNSk7IGorKykKKwkJCQljZHByaW50ZigiICAgIik7CisJCQlmb3IgKGogPSAwOyBqIDwgKGkgJiAxNSk7IGorKykgeworCQkJCWlmIChpc3ByaW50KHJhd19ldmVudFtpLTE1K2pdKSkKKwkJCQkJY2RwcmludGYoIiVjIiwgcmF3X2V2ZW50W2ktMTUral0pOworCQkJCWVsc2UKKwkJCQkJY2RwcmludGYoIi4iKTsKKwkJCX0KKwkJCWNkcHJpbnRmKCJcbiIpOworCQl9CisJfQorCWRwcmludGYoIi5cbiIpOworfQorCitzdGF0aWMgc3RydWN0IH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aW50ZihzdGRvdXQsIHRvdGFsKTsKIAogCXJldHVybiByYzsKIH0KIAorc3RhdGljIGludAorcGFyc2VfY2FsbGNoYWluX29wdChjb25zdCBzdHJ1Y3Qgb3B0aW9uICpvcHQgX191c2VkLCBjb25zdCBjaGFyICphcmcsCisJCSAgICBpbnQgdW5zZXQgX191c2VkKQoreworCWNoYXIgKnRvazsKKwljaGFyICplbmRwdHI7CisKKwljYWxsY2hhaW4gPSAxOworCisJaWYgKCFhcmcpCisJCXJldHVybiAwOworCisJdG9rID0gc3RydG9rKChjaGFyICopYXJnLCAiLCIpOworCWlmICghdG9rKQorCQlyZXR1cm4gLTE7CisKKwkvKiBnZXQgdGhlIG91dHB1dCBtb2RlICovCisJaWYgKCFzdHJuY21wKHRvaywgImdyYXBoIiwgc3RybGVuKGFyZykpKQorCQljYWxsY2hhaW5fcGFyYW0ubW9kZSA9IENIQUlOX0dSQVBIX0FCUzsKKworCWVsc2UgaWYgKCFzdHJuY21wKHRvaywgImZsYXQiLCBzdHJsZW4oYXJnKSkpCisJCWNhbGxjaGFpbl9wYXJhbS5tb2RlID0gQ0hBSU5fRkxBVDsKKworCWVsc2UgaWYgKCFzdHJuY21wKHRvaywgImZyYWN0YWwiLCBzdHJsZW4oYXJnKSkpCisJCWNhbGxjaGFpbl9wYXJhbS5tb2RlID0gQ0hBSU5fR1JBUEhfUkVMOworCisJZWxzZSBpZiAoIXN0cm5jbXAodG9rLCAibm9uZSIsIHN0cmxlbihhcmcpKSkgeworCQljYWxsY2hhaW5fcGFyYW0ubW9kZSA9IENIQUlOX05PTkU7CisJCWNhbGxjaGFpbiA9IDA7CisKKwkJcmV0dXJuIDA7CisJfQorCisJZWxzZQorCQlyZXR1cm4gLTE7CisKKwkvKiBnZXQgdGhlIG1pbiBwZXJjZW50YWdlICovCisJdG9rID0gc3RydG9rKE5VTEwsICIsIik7CisJaWYgKCF0b2spCisJCWdvdG8gc2V0dXA7CisKKwljYWxsY2hhaW5fcGFyYW0ubWluX3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4gPCAwKSB7CiAJCWZvciAobGVuID0gMDsgIXNxX211c3RfcXVvdGUoc1tsZW5dKTsgbGVuKyspOwogCX0gZWxzZSB7CkBAIC0xOTIsMjIgKzE5NiwyMiBAQAogc3RhdGljIHNpemVfdCBxdW90ZV9jX3N0eWxlX2NvdW50ZWQoY29uc3QgY2hhciAqbmFtZSwgc3NpemVfdCBtYXhsZW4sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc3RyYnVmICpzYiwgRklMRSAqZnAsIGludCBub19kcSkKIHsKLSN1bmRlZiBFTUlUCi0jZGVmaW5lIEVNSVQoYykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmIChzYikgc3RyYnVmX2FkZGNoKHNiLCAoYykpOyAgICAgICAgICBcCi0JCWlmIChmcCkgZnB1dGMoKGMpLCBmcCk7ICAgICAgICAgICAgICAgICBcCi0JCWNvdW50Kys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JfSB3aGlsZSAoMCkKLSNkZWZpbmUgRU1JVEJVRihzLCBsKSAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaW50IF9fcmV0OwkJCQlcCi0JCWlmIChzYikgc3RyYnVmX2FkZChzYiwgKHMpLCAobCkpOyAgICAgICBcCi0JCWlmIChmcCkgX19yZXQgPSBmd3JpdGUoKHMpLCAobCksIDEsIGZwKTsgICAgICAgIFwKLQkJY291bnQgKz0gKGwpOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyNkZWZpbmUgRU1JVChjKQkJCQkJCQlcCisJZG8gewkJCQkJCQlcCisJCWlmIChzYikgc3RyYnVmX2FkZGNoKHNiLCAoYykpOwkJCVwKKwkJaWYgKGZwKSBmcHV0YygoYyksIGZw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