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KKzwhW0NEQVRBWwora2VybmVsIGNyeXB0byBBUEkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICBJUFNFQyBMYXllcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKystLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICB8ICAgICAgICAgICAgKDEpCit8IGdpdmNpcGhlciB8IDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgZXNwX291dHB1dAorfCAgKHNlcWl2KSAgfCAtLS0rCisrLS0tLS0tLS0tLS0rICAgIHwKKyAgICAgICAgICAgICAgICAgfCAoMikKKystLS0tLS0tLS0tLSsgICAgfAorfCAgICAgICAgICAgfCA8LS0rICAgICAgICAgICAgICAgICgyKQorfCAgIGFlYWQgICAgfCA8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gIGVzcF9pbnB1dAorfCAgIChnY20pICAgfCAtLS0tLS0tLS0tLS0rCisrLS0tLS0tLS0tLS0rICAgICAgICAgICAgIHwKKyAgICAgIHwgKDMpICAgICAgICAgICAgICAgfCAoNSkKKyAgICAgIHYgICAgICAgICAgICAgICAgICAgdgorKy0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCit8ICAgICAgICAgICB8ICAgICAgIHwgICAgICAgICAgIHwKK3wgYWJsa2NpcGhlcnwgICAgICAgfCAgIGFoYXNoICAgfAorfCAgIChjdHIpICAgfCAtLS0rICB8ICAoZ2hhc2gpICB8CisrLS0tLS0tLS0tLS0rICAgIHwgICstLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgICAgfAorKy0tLS0tLS0tLS0tKyAgICB8ICg0KQorfCAgICAgICAgICAgfCA8LS0rCit8ICAgY2lwaGVyICB8Cit8ICAgKGFlcykgICB8CisrLS0tLS0tLS0tLS0rCitdXT4KKyAgICA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UgYWZ0ZXIKKyAgICAgICAgICAgICAgICAgICAgdHVybmluZyBvbiB0aGUgZHJpdmVycyBpbiBkZXRlY3Rpb24gbW9kZS4KKyAgICAgICAgICAgICAgICAgICAgVmFsaWQgdmFsdWVzOiAwLTExCisgICAgICAgICAgICAgICAgICAgIDAgPSAgMC4wMDggbXMKKyAgICAgICAgICAgICAgICAgICAgMSA9ICAwLjAxIG1zCisgICAgICAgICAgICAgICAgICAgIDIgPSAgMC4wMiBtcworICAgICAgICAgICAgICAgICAgICAzID0gIDAuMDQgbXMKKyAgICAgICAgICAgICAgICAgICAgNCA9ICAwLjA4IG1zCisgICAgICAgICAgICAgICAgICAgIDUgPSAgMC4xNiBtcworICAgICAgICAgICAgICAgICAgICA2ID0gIDAuMzIgbXMKKyAgICAgICAgICAgICAgICAgICAgNyA9ICAwLjY0IG1zCisgICAgICAgICAgICAgICAgICAgIDggPSAgMS4yOCBtcworICAgICAgICAgICAgICAgICAgICA5ID0gIDIuNTYgbXMKKyAgICAgICAgICAgICAgICAgICAxMCA9ICA1LjEyIG1zCisgICAgICAgICAgICAgICAgICAgMTEgPSAxMC4yNCBtcworLSB0b3VjaF90aW1lb3V0OiBUaGUgY29udGludW91cyBudW1iZXIgb2Ygc2NhbiBwZXJpb2RzIGluIHdoaWNoIHRvdWNoIGlzCisgICAgICAgICAgICAgICAgbm90IGRldGVjdGVkIGJlZm9yZSB0aGUgY29udHJvbGxlciByZXR1cm5zIHRvIGlkbGUgc3RhdGUuCisgICAgICAgICAgICAgICAgVmFsaWQgdmFsdWVzIDAtMjU1LgorLSBhdmVyYWdlX2RhdGE6IE51bWJlciBvZiBkYXRhIHNhbXBsZXMgd2hpY2ggYXJlIGF2ZXJhZ2VkIGJlZm9yZSBhIGZpbmFsCisgICAgICAgICAgICAgICAgZGF0YSBwb2ludCBpcyBwbGFjZWQgaW50byB0aGUgRklGTworICAgICAgICAgICAgICAgIFZhbGlkIHZhbHVlcyAwLTcKKyAgICAgICAgICAgICAgICAwID0gICAxIHNhbXBsZQorICAgICAgICAgICAgICAgIDEgPSAgIDIgc2FtcGxlcworICAgICAgICAgICAgICAgIDIgPSAgIDQgc2FtcGxlcworICAgICAgICAgICAgICAgIDMgPSAgIDggc2FtcGxlcworICAgICAgICAgICAgICAgIDQgPSAgMTYgc2FtcGxlcworICAgICAgICAgICAgICAgIDUgPSAgMzIgc2FtcGxlcworICAgICAgICAgICAgICAgIDYgPSAgNjQgc2FtcGxlcworICAgICAgICAgICAgICAgIDcgPSAxMjggc2FtcGxlcworLSBmaWZvX3RocmVzaG9sZDogSW50ZXJydXB0IGlzIGdlbmVyYXRlZCB3aGVuZXZlciB0aGUgbnVtYmVyIG9mIGZpZm8KKyAgICAgICAgICAgICAgICBlbnRyaWVzIGV4Y2VlZHMgdGhpcyB2YWx1ZQorICAgICAgICAgICAgICAgIFZhbGlkIHZhbHVlcyAwLTMxCistIHRvdWNoc2NyZWVuLXNpemUteDogaG9yaXpvbnRhbCByZXNvbHV0aW9uIG9mIHRvdWNoc2NyZWVuIChpbiBwaXhlbHMpCistIHRvdWNoc2NyZWVuLXNpemUteTogdmVydGljYWwgcmVzb2x1dGlvbiBvZiB0b3VjaHNjcmVlbiAoaW4gcGl4ZWxzKQorLSB0b3VjaHNjcmVlbi1mdXp6LXg6IGhvcml6b250YWwgbm9pc2UgdmFsdWUgb2YgdGhlIGFic29sdXRlIGlucHV0CisgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlIChpbiBwaXhlbHMpCistIHRvdWNoc2NyZWVuLWZ1enoteTogdmVydGljYWwgbm9pc2UgdmFsdWUgb2YgdGhlIGFic29sdXRlIGlucHV0CisgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlIChpbiBwaXhlbHMpCistIHRvdWNoc2NyZWVuLWludmVydGVkLXg6IFggYXhpcyBpcyBpbnZlcnRlZCAoYm9vbGVhbikKKy0gdG91Y2hzY3JlZW4taW52ZXJ0ZWQteTogWSBheGlzIGlzIGludmVydGVkIChib29sZWFu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NwbWktcG1pYyIuCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTQxIiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg4NDEiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtYTgwODQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODAxOSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04MjI2IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgxMTAiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtYTgwODQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtaTg5NjIiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtZDk2MzUiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODk5NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1pODk5NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTE2IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgwMDQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODkwOSIsCisgICAgICAgICAgICAgICAgICAgb3IgZ2VuZXJhbGl6ZWQgInFjb20sc3BtaS1wbWljIi4KIC0gcmVnOiAgICAgICAgICAgICBTcGVjaWZpZXMgdGhlIFNQTUkgVVNJRCBzbGF2ZSBhZGRyZXNzIGZvciB0aGlzIGRldmljZS4KICAgICAgICAgICAgICAgICAgICBGb3IgbW9yZSBpbmZvcm1hdGlvbiBzZWU6CiAgICAgICAgICAgICAgICAgICAgRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3NwbWkvc3BtaS50eHQKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9tZmQvcWNvbS1ycG0udHh0IGIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL21mZC9xY29tLXJwbS50eHQKaW5kZXggODVlMzE5OC4uNWU5N2E5NSAxMDA2NDQKL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iOiAicHdtMV9ncnAiCisKKyJwd20yIjogInB3bTJfZ3JwIgorCisicHdtMyI6ICJwd20zX2dycCIKKworInB3bTQiOiAicHdtNF9ncnAiCisKKyJwd201IjogInB3bTVfZ3JwIgorCisia2V5IjogImtleTBfZ3JwIiwgImtleTFfZ3JwIiwgImtleTJfZ3JwIiwgImtleTNfZ3JwIiwgImtleTRfZ3JwIiwgImtleTVfZ3JwIiwKKyJrZXk2X2dycCIsICJrZXk3X2dycCIsICJrZXk4X2dycCIsICJrZXk5X2dycCIsICJrZXkxMF9ncnAiLCAia2V5MTFfZ3JwIiwKKyJrZXkxMl9ncnAiLCAia2V5MTNfZ3JwIiwgImtleTE0X2dycCIsICJrZXkxNV9ncnAiCisKKyJhdWRpb19kdGUiOiAiYXVkaW9fZHRlMF9ncnAiLCAiYXVkaW9fZHRlMV9ncnAiLCAiYXVkaW9fZHRlMl9ncnAiLCAiYXVkaW9fZHRlM19ncnAiCisKKyJzbWFydF9jYXJkMCI6ICJzbWFydF9jYXJkMF9ncnAiLCAic21hcnRfY2FyZDBfZmNiX2dycCIKKworInNtYXJ0X2NhcmQxIjogInNtYXJ0X2NhcmQxX2dycCIsICJzbWFydF9jYXJkMV9mY2JfZ3JwIgorCisic3BpMCI6ICJzcGkwX2dycCIKKworInNwaTEiOiAic3BpMV9ncnAiCisKKyJzcGkyIjogInNwaTJfZ3JwIgorCisic3BpMyI6ICJzcGkzX2dycCIKKworInNwaTQiOiAic3BpNF8wX2dycCIsICJzcGk0XzFfZ3JwIgorCisic3BpNSI6ICJzcGk1X2dycCIKKworInN3X2xlZDAiOiAic3dfbGVkMF8wX2dycCIsICJzd19sZWQwXzFfZ3JwIgorCisic3dfbGVkMSI6ICJzd19sZWQxX2dycCIKKworInN3X2xlZDIiOiAic3dfbGVkMl8wX2dycCIsICJzd19sZWQyXzFfZ3JwIgorCisiZDF3IjogImQxd19ncnAiCisKKyJsY2QiOiAibGNkX2dycCIKKworInNyYW0iOiAic3JhbV8wX2dyc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gICAgICAgUElEIG9mIHByb2Nlc3MgdHJhY2luZyB0aGlzIHByb2Nlc3MgKDAgaWYgbm90KQpAQCAtMjIwLDYgKzIyMSwxMCBAQAogIEdpZCAgICAgICAgICAgICAgICAgICAgICAgICBSZWFsLCBlZmZlY3RpdmUsIHNhdmVkIHNldCwgYW5kICBmaWxlIHN5c3RlbSBHSURzCiAgRkRTaXplICAgICAgICAgICAgICAgICAgICAgIG51bWJlciBvZiBmaWxlIGRlc2NyaXB0b3Igc2xvdHMgY3VycmVudGx5IGFsbG9jYXRlZAogIEdyb3VwcyAgICAgICAgICAgICAgICAgICAgICBzdXBwbGVtZW50YXJ5IGdyb3VwIGxpc3QKKyBOU3RnaWQgICAgICAgICAgICAgICAgICAgICAgZGVzY2VuZGFudCBuYW1lc3BhY2UgdGhyZWFkIGdyb3VwIElEIGhpZXJhcmNoeQorIE5TcGlkICAgICAgICAgICAgICAgICAgICAgICBkZXNjZW5kYW50IG5hbWVzcGFjZSBwcm9jZXNzIElEIGhpZXJhcmNoeQorIE5TcGdpZCAgICAgICAgICAgICAgICAgICAgICBkZXNjZW5kYW50IG5hbWVzcGFjZSBwcm9jZXNzIGdyb3VwIElEIGhpZXJhcmNoeQorIE5Tc2lkICAgICAgICAgICAgICAgICAgICAgICBkZXNjZW5kYW50IG5hbWVzcGFjZSBzZXNzaW9uIElEIGhpZXJhcmNoeQogIFZtUGVhayAgICAgICAgICAgICAgICAgICAgICBwZWFrIHZpcnR1YWwgbWVtb3J5IHNpemUKICBWbVNpemUgICAgICAgICAgICAgICAgICAgICAgdG90YWwgcHJvZ3JhbSBzaXplCiAgVm1MY2sgICAgICAgICAgICAgICAgICAgICAgIGxvY2tlZCBtZW1vcnkgc2l6ZQpAQCAtMTI1NSw5ICsxMjYwLDkgQEAKIHNpbmNlIHRoZSBzeXN0ZW0gZmlyc3QgYm9vdGVkLiAgRm9yIGEgcXVpY2sgbG9vaywgc2ltcGx5IGNhdCB0aGUgZmlsZToKIAogICA+IGNhd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2l6ZSBvZgotICAgdGhlIGRhdGEgaXMgd3JpdHRlbiBpbnRvICoobGN0LT5yZXNsZW4pLgotCi0gICBSRVRVUk5TCi0KLSAgIFRoaXMgZnVuY3Rpb24gcmV0dXJucyAwIGlmIG5vIGVycm9ycyBvY2N1ci4gSWYgYW4gZXJyb3Igb2NjdXJzLCAtMQotICAgaXMgcmV0dXJuZWQgYW5kIGVycm5vIGlzIHNldCBhcHByb3ByaWF0ZWx5OgotCi0gICAgICBFRkFVTFQgICAgICBJbnZhbGlkIHVzZXIgc3BhY2UgcG9pbnRlciB3YXMgcGFzc2VkCi0gICAgICBFTlhJTyAgICAgICBJbnZhbGlkIElPUCBudW1iZXIKLSAgICAgIEVOT0JVRlMgICAgIEJ1ZmZlciBub3QgbGFyZ2UgZW5vdWdoLiAgSWYgdGhpcyBvY2N1cnMsIHRoZSByZXF1aXJlZAotICAgICAgICAgICAgICAgICAgYnVmZmVyIGxlbmd0aCBpcyB3cml0dGVuIGludG8gKihsY3QtPnJlc2xlbikKLQotVkkuIFNldHRpbmcgUGFyYW1ldGVycwotCi0gICBTWU5PUFNJUwotCi0gICBpb2N0bChmZCwgSTJPUEFSTVNFVCwgc3RydWN0IGkyb19wYXJtX3NldGdldCAqb3BzKTsKLQotICAgICAgc3RydWN0IGkyb19jbWRfcHNldGdldAotICAgICAgewotICAgICAgICAgdTMyICAgaW9wOyAgICAgIC8qIElPUCB1bml0IG51bWJlciAqLwotICAgICAgICAgdTMyICAgdGlkOyAgICAgIC8qIFRhcmdldCBkZXZpY2UgVElEICovCi0gICAgICAgICB2b2lkICAqb3BidWY7ICAgLyogT3BlcmF0aW9uIExpc3QgYnVmZmVyICovCi0gICAgICAgICB1MzIgICBvcGxlbjsgICAgLyogT3BlcmF0aW9uIExpc3QgYnVmZmVyIGxlbmd0aCBpbiBieXRlcyAqLwotICAgICAgICAgdm9pZCAgKnJlc2J1ZjsgIC8qIFJlc3VsdCBMaXN0IGJ1ZmZlciAqLwotICAgICAgICAg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XJuZWQgbWVzc2FnZSBmbGFncwogCiAgIFdoZW4gdXNpbmcgcmVjdm1zZygpIGNhbGwsIHRoZSBtc2ctPm1zZ19mbGFncyBtYXkgY29udGFpbiBmb2xsb3dpbmcgZmxhZ3M6CiAKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0IGIvRG9jdW1lbnRhdGlvbi9uZXR3b3JraW5nL2ZpbHRlci50eHQKaW5kZXggOTkzMGVjZmIuLjEzNTU4MWYgMTAwNjQ0Ci0tLSBhL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0CisrKyBiL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0CkBAIC0yODAsNyArMjgwLDggQEAKICAgcnhoYXNoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmhhc2gKICAgY3B1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdfc21wX3Byb2Nlc3Nvcl9pZCgpCiAgIHZsYW5fdGNpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiX3ZsYW5fdGFnX2dldChza2IpCi0gIHZsYW5fcHIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiX3ZsYW5fdGFnX3ByZXNlbnQoc2tiKQorICB2bGFuX2F2YWlsICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNrYl92bGFuX3RhZ19wcmVzZW50KHNrYikKKyAgdmxhbl90cGlkICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPnZsYW5fcHJvdG8KICAgcmFuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmFuZG9tX3UzMigpCiAKIFRoZXNlIGV4dGVuc2lvbnMgY2FuIGFsc28gYmUgcHJlZml4ZWQgd2l0aCAnIycuCmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL25ldHdvcmtpbmcvaWdiLnR4dCBiL0RvY3VtZW50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lIGhhdmUgdGhlIHNpdHVhdGlvbiBpbiBGaWd1cmUgMS4wLCB3aGVyZQorICBzZWdtZW50cyBbdG90YWxfVkZzLCAyNTVdIG9mIHRoZSBNNjQgd2luZG93IG1heSBtYXAgdG8gc29tZSBNTUlPIHJhbmdlIG9uCisgIG90aGVyIGRldmljZXM6CisKKyAgICAgMCAgICAgIDEgICAgICAgICAgICAgICAgICAgICB0b3RhbF9WRnMgLSAxCisgICAgICstLS0tLS0rLS0tLS0tKy0gICAgIC0rLS0tLS0tKy0tLS0tLSsKKyAgICAgfCAgICAgIHwgICAgICB8ICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFZGKG4pIEJBUiBzcGFjZQorCisgICAgIDAgICAgICAxICAgICAgICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMSAgICAgICAgICAgICAgICAyNTUKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCAgICAgIHwgICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgTTY0IHdpbmRvdworCisJCUZpZ3VyZSAxLjAgRGlyZWN0IG1hcCBWRihuKSBCQVIgc3BhY2UKKworICBPdXIgY3VycmVudCBzb2x1dGlvbiBpcyB0byBhbGxvY2F0ZSAyNTYgc2VnbWVudHMgZXZlbiBpZiB0aGUgVkYobikgQkFSCisgIHNwYWNlIGRvZXNuJ3QgbmVlZCB0aGF0IG11Y2gsIGFzIHNob3duIGluIEZpZ3VyZSAxLjE6CisKKyAgICAgMCAgICAgIDEgICAgICAgICAgICAgICAgICAgICB0b3RhbF9WRnMgLSAxICAgICAgICAgICAgICAgIDI1NQorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKyAgICAgfCAgICAgIHwgICAgICB8ICAuLi4gIHwgICAgICB8ICAgICAgfCAgIC4uLiAgfCAgICAgIHwgICAgICB8CisgICAgICstLS0tLS0rLS0tLS0tKy0gICAgIC0rLS0tLS0tKy0tLS0tLSstICAgICAgLSstLS0tLS0rLS0tLS0tKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICBWRihuKSBCQVIgc3BhY2UgKyBleHRyYQorCisgICAgIDAgICAgICAxICAgICAgICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMSAgICAgICAgICAgICAgICAyNTUKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCAgICAgIHwgICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKworCQkJICAgTTY0IHdpbmRvdworCisJCUZpZ3VyZSAxLjEgTWFwIFZGKG4pIEJBUiBzcGFjZSArIGV4dHJhCisKKyAgQWxsb2NhdGluZyB0aGUgZXh0cmEgc3BhY2UgZW5zdXJlcyB0aGF0IHRoZSBlbnRpcmUgTTY0IHdpbmRvdyB3aWxsIGJlCisgIGFzc2lnbmVkIHRvIHRoaXMgb25lIFNSLUlPViBkZXZpY2UgYW5kIG5vbmUgb2YgdGhlIHNwYWNlIHdpbGwgYmUKKyAgYXZhaWxhYmxlIGZvciBvdGhlciBkZXZpY2VzLiAgTm90ZSB0aGF0IHRoaXMgb25seSBleHBhbmR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W1lCisgIF4gICAgICAgICAgICAgICBeICAgICAgICAgICAgICBeICAgICAgICAgICAgICAgIF4gICAgICAgICAgIF4KKyAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgfAorIGFuYWxvZyAgICAgICAgIGxpbmsgICAgICAgICAgICBkbWEgICAgICAgICAgICAgIGFwcCAgICAgICBGdWxsQnVmZmVyCisgdGltZSAgICAgICAgICAgdGltZSAgICAgICAgICAgdGltZSAgICAgICAgICAgICAgdGltZSAgICAgICAgdGltZQorICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICB8CisgIHw8IGNvZGVjIGRlbGF5ID58PC0taHcgZGVsYXktLT58PHF1ZXVlZCBzYW1wbGVzPnw8LS0tYXZhaWwtPnwKKyAgfDwtLS0tLS0tLS0tLS0tLS0tLSBkZWxheS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0+fCAgICAgICAgICAgfAorCQkJICAgICAgICAgfDwtLS0tcmluZyBidWZmZXIgbGVuZ3RoLS0tLT58CisKK1RoZSBhbmFsb2cgdGltZSBpcyB0YWtlbiBhdCB0aGUgbGFzdCBzdGFnZSBvZiB0aGUgcGxheWJhY2ssIGFzIGNsb3NlCithcyBwb3NzaWJsZSB0byB0aGUgYWN0dWFsIHRyYW5zZHVjZXIKKworVGhlIGxpbmsgdGltZSBpcyB0YWtlbiBhdCB0aGUgb3V0cHV0IG9mIHRoZSBTT0MvY2hpcHNldCBhcyB0aGUgc2FtcGxlcworYXJlIHB1c2hlZCBvbiBhIGxpbmsuIFRoZSBsaW5rIHRpbWUgY2FuIGJlIGRpcmVjdGx5IG1lYXN1cmVkIGlmCitzdXBwb3J0ZWQgaW4gaGFyZHdhcmUgYnkgc2FtcGxlIGNvdW50ZXJzIG9yIHdhbGxjbG9ja3MgKGUuZy4gd2l0aAorSERBdWRpbyAyNE1IeiBvciBQVFAgY2xvY2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5bCPLCDlsI/nq6/mqKHlvI8gKi8KKyAgdTY0IGZsYWdzOwkJCS8qIOWGheaguOaXl+aghywg5bCP56uv5qih5byPICoKICAgdTY0IHJlczIJPSAwOwkJLyog5L+d55WZICovCiAgIHU2NCByZXMzCT0gMDsJCS8qIOS/neeVmSAqLwogICB1NjQgcmVzNAk9IDA7CQkvKiDkv53nlZkgKi8KICAgdTMyIG1hZ2ljCT0gMHg2NDRkNTI0MTsJLyog6a2U5pWwLCDlsI/nq68sICJBUk1ceDY0IiAqLwotICB1MzIgcmVzNSA9IDA7ICAgICAgCQkvKiDkv53nlZkgKi8KKyAgdTMyIHJlczU7ICAgICAgCQkvKiDkv53nlZkg77yI55So5LqOIFBFIENPRkYg5YGP56e777yJICovCiAKIAog5pig5YOP5aS05rOo6YeK77yaCiAKKy0g6IeqIHYzLjE3IOi1t++8jOmZpOmdnuWPpuacieivtOaYju+8jOaJgOacieWfn+mDveaYr+Wwj+err+aooeW8j+OAggorCiAtIGNvZGUwL2NvZGUxIOi0n+i0o+i3s+i9rOWIsCBzdGV4dC4KIAot5pig5YOP5b+F6aG75L2N5LqO57O757ufIFJBTSDotbflp4vlpITnmoTnibnlrprlgY/np7vvvIjlvZPliY3mmK8gMHg4MDAwMO+8ieOAguezu+e7nyBSQU0KLeeahOi1t+Wni+WcsOWdgOW/hemhu+aYr+S7pSAyTUIg5a+56b2Q55qE44CCCistIOW9k+mAmui/hyBFRkkg5ZCv5Yqo5pe277yMIOacgOWInSBjb2RlMC9jb2RlMSDooqvot7Pov4fjgIIKKyAgcmVzNSDmmK/liLAgUEUg5paH5Lu25aS055qE5YGP56e777yM6ICMIFBFIOaWh+S7tuWktOWQq+aciSBFRkkg55qE5ZCv5Yqo5YWl5Y+j54K5IO+8iGVmaV9zdHViX2VudHJ577yJ44CCCisgIOW9kyBzdHViIOS7o+eggeWujOaIkOS6huWug+eahOS9v+WRve+8jOWug+S8mui3s+i9rOWIsCBjb2RlMCDnu6fnu63mraPluLjnmoTl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foioLlpITvvIzlubbku47pgqPph4zooqvosIPnlKjjgIIKK+W9k+WJje+8jOWvuSBMaW51eCDmnaXor7TlnKjmraTln7rlnYDku6XkuIvnmoTlhoXlrZjmmK/ml6Dms5Xkvb/nlKjnmoTvvIzlm6DmraTlvLrng4jlu7rorq7lsIbns7vnu5/lhoXlrZjnmoTotbflp4vkvZzkuLrov5nkuKrln7rlnYDjgIIKK+S7juaYoOWDj+i1t+Wni+WcsOWdgOeul+i1t++8jOacgOWwkeW/hemhu+S4uuWGheaguOmHiuaUvuWHuiBpbWFnZV9zaXplIOWtl+iKgueahOepuumXtOOAggorCivku7vkvZXmj5Dkvpvnu5nlhoXmoLjnmoTlhoXlrZjvvIjnlJroh7PlnKggMk1CIOWvuem9kOeahOWfuuWcsOWdgOS5i+WJje+8ie+8jOiLpeacquS7juWGheaguOS4reagh+iusOS4uuS/neeVmQorKOWmguWcqOiuvuWkh+agke+8iGR0Yu+8ieeahCBtZW1yZXNlcnZlIOWMuuWfn++8ie+8jOmDveWwhuiiq+iupOS4uuWvueWGheaguOaYr+WPr+eUqOOAggogCiDlnKjot7PovazlhaXlhoXmoLjliY3vvIzlv4XpobvnrKblkIjku6XkuIvnirbmgIHvvJoKIApAQCAtMTI0LDggKzE0OCwxMiBAQAogLSDpq5jpgJ/nvJPlrZjjgIFNTVUKICAgTU1VIOW/hemhu+WFs+mXreOAggogICDmjIfku6TnvJPlrZjlvIDlkK/miJblhbPpl63pg73lj6/ku6XjgIIKLSAg5pWw5o2u57yT5a2Y5b+F6aG75YWz6Zet5LiU5peg5pWI44CCCi0gIOWklumDqOmrmOmAn+e8k+WtmO+8iOWmguaenOWtmOWcqO+8ieW/hemhu+mFjee9ruW5tuemgeeUqOOAggorICDlt7Lovb3lhaXnmoTlhoXmoLjmmKDlg4/nmoTnm7jlupTlhoXlrZjljLrlv4XpobvooqvmuIXnkIbvvIzku6Xovr7liLDnvJPlrZjkuIDoh7TmgKfngrnvvIhQb0PvvInjgIIKKyAg5b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+WJjeWcqCBFTDMg77yaCisgICAgSUNDX1NSRV9FTDMuRW5hYmxlICjkvY0gMykg5b+F6aG75Yid5aeL5YyW5Li6IDBiMeOAggorICAgIElDQ19TUkVfRUwzLlNSRSAo5L2NIDApIOW/hemhu+WIneWni+WMluS4uiAwYjHjgIIKKyAgLSDoi6XlhoXmoLjov5DooYzlnKggRUwx77yaCisgICAgSUNDX1NSRV9FTDIuRW5hYmxlICjkvY0gMykg5b+F6aG75Yid5aeL5YyW5Li6IDBiMeOAggorICAgIElDQ19TUkVfRUwyLlNSRSAo5L2NIDApIOW/hemhu+WIneWni+WMluS4uiAwYjHjgIIKKwog5Lul5LiK5a+55LqOIENQVSDmqKHlvI/jgIHpq5jpgJ/nvJPlrZjjgIFNTVXjgIHmnrbmnoTorqHml7blmajjgIHkuIDoh7TmgKfjgIHns7vnu5/lr4TlrZjlmajnmoQKIOW/heimgeadoeS7tuaPj+i/sOmAgueUqOS6juaJgOaciSBDUFXjgILmiYDmnIkgQ1BVIOW/hemhu+WcqOWQjOS4gOW8guW4uOe6p+WIq+i3s+WFpeWGheaguOOAggogCkBAIC0xNzAsNyArMjA2LDcgQEAKICAgQVJNIERFTiAwMDIyQe+8mueUqOS6jiBBUk0g5LiK55qE55S15rqQ54q25oCB5Y2P6LCD5o6l5Y+j57O757uf6L2v5Lu277yJ5Lit5o+P6L+w55qECiAgIENQVV9PTiDosIPnlKjmnaXlsIYgQ1BVIOW4puWFpeWGheaguOOAggogCi0gICror5HogIXms6g65Yiw5paH5qGj57+76K+R5pe277yM5q2k5paH5qGj5bey5pu05paw5Li6IEFSTSBERU4gMDAyMkLjgIIKKyAgKuivkeiAheazqDogQVJNIERFTiAwMDIyQSDlt7Lmm7TmlrDliLAgQVJNIERFTiAwMDIyQ+OAggogCiAgIOiuvuWkh+agkeW/hemhu+WMheWQq+S4gOS4qiDigJhwc2Np4oCZIOiKgueCue+8jOivt+WPguiAg+S7peS4i+aWh+aho++8mgogICBEb2N1bWVudGF0aW9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XjgIIKIAor5pys5paH57+76K+R5o+Q5Lqk5pe255qEIEdpdCDmo4Dlh7rngrnkuLrvvJogYmM0NjVhYTlkMDQ1ZmViMGUxM2I0YThmMzJjYzMzYzE5NDNmNjJkNgorCiDoi7HmlofniYjnu7TmiqTogIXvvJogQ2F0YWxpbiBNYXJpbmFzIDxjYXRhbGluLm1hcmluYXNAYXJtLmNvbT4KIOS4reaWh+eJiOe7tOaKpOiAhe+8miDlgoXngpwgIEZ1IFdlaSA8d2VmdUByZWRoYXQuY29tPgog5Lit5paH54mI57+76K+R6ICF77yaIOWCheeCnCAgRnUgV2VpIDx3ZWZ1QHJlZGhhdC5jb20+CkBAIC0yNiw2OSArMjgsNTMgQEAKIAkJICAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAog5L2c6ICFOiBDYXRhbGluIE1hcmluYXMgPGNhdGFsaW4ubWFyaW5hc0Bhcm0uY29tPgot5pel5pyfOiAyMDEyIOW5tCAwMiDmnIggMjAg5pelCiAKIOacrOaWh+aho+aPj+i/sCBBQXJjaDY0IExpbnV4IOWGheaguOaJgOS9v+eUqOeahOiZmuaLn+WGheWtmOW4g+WxgOOAguatpOaehOaetuWPr+S7peWunueOsAog6aG15aSn5bCP5Li6IDRLQiDnmoQgNCDnuqfovazmjaLooajlkozpobXlpKflsI/kuLogNjRLQiDnmoQgMyDnuqfovazmjaLooajjgIIKIAotQUFyY2g2NCBMaW51eCDkvb/nlKjpobXlpKflsI/kuLogNEtCIOeahCAzIOe6p+i9rOaNouihqOmFjee9ru+8jOWvueS6jueUqOaIt+WSjOWGheaguAot6YO95pyJIDM5LWJpdCAoNTEyR0IpIOeahOiZmuaLn+WcsOWdgOepuumXtOOAguWvueS6jumhteWkp+Wwj+S4uiA2NEtC55qE6YWN572u77yM5LuFCi3kvb/nlKggMiDnuqfovazmjaLooajvvIzkvYblhoXlrZjluIPlsYDnm7jlkIzjgIIKK0FBcmNoNjQgTGludXgg5L2/55SoIDMg57qn5oiWIDQg57q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ZmZmZmZmZmZgkgICAyVEIJCeWGheaguOmAu+i+keWGheWtmOaYoOWwhAor5pu06K+m57uG55qE5YaF5qC46Jma5ouf5YaF5a2Y5biD5bGA77yM6K+35Y+C6ZiF5YaF5qC45ZCv5Yqo5L+h5oGv44CCCiAKIAogNEtCIOmhteWkp+Wwj+eahOi9rOaNouihqOafpeaJvu+8mgpAQCAtMTAyLDcgKzg4LDcgQEAKICB8ICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgICAgIHwgICAgICAgICArLT4gWzIwOjEyXSBMMyDntKLlvJUKICB8ICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgICAgICstLS0tLS0tLS0tLT4gWzI5OjIxXSBMMiDntKLlvJUKICB8ICAgICAgICAgICAgICAgICB8ICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzM4OjMwXSBMMSDntKLlvJUKLSB8ICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzQ3OjM5XSBMMCDntKLlvJUgKOacquS9v+eUqCkKKyB8ICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzQ3OjM5XSBMMCDntKLlvJUKICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzYzXSBUVEJSMC8xCiAKIApAQCAtMTE1LDEwICsxMDEsMTEgQEAKICB8ICAgICAgICAgICAgICAgICB8ICAgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB2CiAgfCAgICAgICAgICAgICAgICAgfCAgICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgIFsxNTowXSAg6aG15YaF5YGP56e7CiAgfCAgICAgICAgICAgICAgICAgfCAgICB8ICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0+IFsyODoxNl0gTDMg57Si5byVCi0gfCAgICAgICAgICA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gLyBzaXplb2YodTMyKTsKKwlzdHJ1Y3QgYWVzX2Jsb2NrICprZXlfZW5jLCAqa2V5X2RlYzsKKwlpbnQgaSwgajsKKworCWlmIChrZXlfbGVuICE9IEFFU19LRVlTSVpFXzEyOCAmJgorCSAgICBrZXlfbGVuICE9IEFFU19LRVlTSVpFXzE5MiAmJgorCSAgICBrZXlfbGVuICE9IEFFU19LRVlTSVpFXzI1NikKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwltZW1jcHkoY3R4LT5rZXlfZW5jLCBpbl9rZXksIGtleV9sZW4pOworCWN0eC0+a2V5X2xlbmd0aCA9IGtleV9sZW47CisKKwlrZXJuZWxfbmVvbl9iZWdpbigpOworCWZvciAoaSA9IDA7IGkgPCBzaXplb2YocmNvbik7IGkrKykgeworCQl1MzIgKnJraSA9IGN0eC0+a2V5X2VuYyArIChpICoga3dvcmRzKTsKKwkJdTMyICpya28gPSBya2kgKyBrd29yZHM7CisKKwkJcmtvWzBdID0gcm9yMzIoY2VfYWVzX3N1Yihya2lba3dvcmRzIC0gMV0pLCA4KTsKKwkJcmtvWzBdID0gcmtvWzBdIF4gcmtpWzBdIF4gcmNvbltpXTsKKwkJcmtvWzFdID0gcmtvWzBdIF4gcmtpWzFdOworCQlya29bMl0gPSBya29bMV0gXiBya2lbMl07CisJCXJrb1szXSA9IHJrb1syXSBeIHJraVszXTsKKworCQlpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8xOTIpIHsKKwkJCWlmIChpID49IDcpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBya29bM10gXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lbNV07CisJCX0gZWxzZSBpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8yNTYpIHsKKwkJCWlmIChpID49IDYpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBjZV9hZXNfc3ViKHJrb1szXSkgXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lb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yNixyNixyMgorCWVvcglyMixyNCxyNQorCWVvcglyMCxyMTEscjExLHJvciM1CisJYWRkCXI3LHI3LHIzCisJYW5kCXIyLHIyLHIxMQorCWVvcglyMyxyMCxyMTEscm9yIzE5CisJZW9yCXIwLHI3LHI3LHJvciMxMQorCWVvcglyMixyMixyNQorCWFkZAlyNixyNixyMyxyb3IjNgorCWVvcglyMyxyNyxyOAorCWVvcglyMCxyMCxyNyxyb3IjMjAKKwlhZGQJcjYscjYscjIKKwlsZHIJcjIsW3NwLCM1Nl0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyMTAscjEwLHI2CisJYWRkCXI2LHI2LHIwLHJvciMyCisJZW9yCXIxMixyMTIscjgKKwlhZGQJcjUscjUscjIKKwllb3IJcjIscjExLHI0CisJZW9yCXIwLHIxMCxyMTAscm9yIzUKKwlhZGQJcjYscjYscjEyCisJYW5kCXIyLHIyLHIxMAorCWVvcglyMTIscjAscjEwLHJvciMxOQorCWVvcglyMCxyNixyNixyb3IjMTEKKwllb3IJcjIscjIscjQKKwlhZGQJcjUscjUscjEyLHJvciM2CisJZW9yCXIxMixyNixyNworCWVvcglyMCxyMCxyNixyb3IjMjAKKwlhZGQJcjUscjUscjIKKwlsZHIJcjIsW3NwLCM2MF0KKwlhbmQJcjMscjMscjEyCisJYWRkCXI5LHI5LHI1CisJYWRkCXI1LHI1LHIwLHJvciMyCisJZW9yCXIzLHIzLHI3CisJYWRkCXI0LHI0LHIyCisJZW9yCXIyLHIxMCxyMTEKKwllb3IJcjAscjkscjkscm9yIzUKKwlhZGQJcjUscjUscjMKKwlhbmQJcjIscjIscjkKKwllb3IJcjMscjAscjkscm9yIzE5CisJZW9yCXIwLHI1LHI1LHJvciMxMQorCWVvcglyMixyMixyMTEKKwlhZGQJcjQscjQscjMscm9yIzYKKwllb3IJcjMscjUscjYKKwllb3IJcjAscjAscjUscm9yIzIwCisJYWRkCXI0LHI0LHIyCisJbGRyCXIyLFtzcCwjNjRdCisJYW5kCXIxMix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WlmIChzdHJjbXAoc2VjbmFtZXMgKyBzZWNoZHJzW2ldLnNoX25hbWUsIG5hbWUpID09IDApIHsKKwkJCWlmIChzaXplKQorCQkJCSpzaXplID0gc2VjaGRyc1tpXS5zaF9zaXplOworCQkJcmV0dXJuICh2b2lkICopZWhkciArIHNlY2hkcnNbaV0uc2hfb2Zmc2V0OworCQl9CisJfQorCisJaWYgKHNpemUpCisJCSpzaXplID0gMDsKKwlyZXR1cm4gTlVMTDsKK30KKworc3RhdGljIEVsZjMyX1N5bSAqIF9faW5pdCBmaW5kX3N5bWJvbChzdHJ1Y3QgZWxmaW5mbyAqbGliLCBjb25zdCBjaGFyICpzeW1uYW1lKQoreworCXVuc2lnbmVkIGludCBpOworCisJZm9yIChpID0gMDsgaSA8IChsaWItPmR5bnN5bXNpemUgLyBzaXplb2YoRWxmMzJfU3ltKSk7IGkrKykgeworCQljaGFyIG5hbWVbTUFYX1NZTU5BTUVdLCAqYzsKKworCQlpZiAobGliLT5keW5zeW1baV0uc3RfbmFtZSA9PSAwKQorCQkJY29udGludWU7CisJCXN0cmxjcHkobmFtZSwgbGliLT5keW5zdHIgKyBsaWItPmR5bnN5bVtpXS5zdF9uYW1lLAorCQkJTUFYX1NZTU5BTUUpOworCQljID0gc3RyY2hyKG5hbWUsICdAJyk7CisJCWlmIChjKQorCQkJKmMgPSAwOworCQlpZiAoc3RyY21wKHN5bW5hbWUsIG5hbWUpID09IDApCisJCQlyZXR1cm4gJmxpYi0+ZHluc3ltW2ldOworCX0KKwlyZXR1cm4gTlVMTDsKK30KKworc3RhdGljIHZvaWQgX19pbml0IHZkc29fbnVsbHBhdGNoX29uZShzdHJ1Y3QgZWxmaW5mbyAqbGliLCBjb25zdCBjaGFyICpzeW1uYW1lKQoreworCUVsZjMyX1N5bSAqc3ltOworCisJc3ltID0gZmluZF9zeW1ib2wobGliLCBzeW1uYW1lKTsKKwlpZiAoIXN5bSkKKwkJcmV0dXJuOworCisJc3ltLT5zdF9uYW1lID0gMD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XBlID0gImNwdSI7CisJCQlyZWcgPSA8MD47CisJCX07CisKKwkJY3B1QDEgeworCQkJY29tcGF0aWJsZSA9ICJicmNtLGJtaXBzNDM1MCI7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJcmVnID0gPDE+OworCQl9OworCX07CisKKwljbG9ja3MgeworCQlwZXJpcGhfY2xrOiBwZXJpcGhfY2xrIHsKKwkJCWNvbXBhdGlibGUgPSAiZml4ZWQtY2xvY2siOworCQkJI2Nsb2NrLWNlbGxzID0gPDA+OworCQkJY2xvY2stZnJlcXVlbmN5ID0gPDUwMDAwMDAwPjsKKwkJfTsKKwl9OworCisJYWxpYXNlcyB7CisJCXVhcnQwID0gJnVhcnQwOworCX07CisKKwljcHVfaW50YzogY3B1X2ludGMgeworCQkjYWRkcmVzcy1jZWxscyA9IDwwPjsKKwkJY29tcGF0aWJsZSA9ICJtdGksY3B1LWludGVycnVwdC1jb250cm9sbGVyIjsKKworCQlpbnRlcnJ1cHQtY29udHJvbGxlcjsKKwkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKwl9OworCisJdWJ1cyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwxPjsKKworCQljb21wYXRpYmxlID0gInNpbXBsZS1idXMiOworCQlyYW5nZXM7CisKKwkJcGVyaXBoX2ludGM6IHBlcmlwaF9pbnRjQDEwMDAwMDIwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY20zMzgwLWwyLWludGMiOworCQkJcmVnID0gPDB4MTAwMDAwMjQgMHg0IDB4MTAwMDAwMmMgMHg0PiwKKwkJCSAgICAgIDwweDEwMDAwMDIwIDB4NCAweDEwMDAwMDI4IDB4ND47CisKKwkJCWludGVycnVwdC1jb250cm9sbGVyOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmY3B1X2ludGM+OworCQkJaW50ZXJydXB0cyA9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MTI1LmR0c2kgYi9hcmNoL21pcHMvYm9vdC9kdHMvYnJjbS9iY203MTI1LmR0c2kKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMWE3ZWZhOAotLS0gL2Rldi9udWxsCisrKyBiL2FyY2gvbWlwcy9ib290L2R0cy9icmNtL2JjbTcxMjUuZHRzaQpAQCAtMCwwICsxLDEzOSBAQAorLyB7CisJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJI3NpemUtY2VsbHMgPSA8MT47CisJY29tcGF0aWJsZSA9ICJicmNtLGJjbTcxMjUiOworCisJY3B1cyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwwPjsKKworCQltaXBzLWhwdC1mcmVxdWVuY3kgPSA8MjAyNTAwMDAwPjsKKworCQljcHVAMCB7CisJCQljb21wYXRpYmxlID0gImJyY20sYm1pcHM0MzgwIjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8MD47CisJCX07CisKKwkJY3B1QDEgeworCQkJY29tcGF0aWJsZSA9ICJicmNtLGJtaXBzNDM4MCI7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJcmVnID0gPDE+OworCQl9OworCX07CisKKwlhbGlhc2VzIHsKKwkJdWFydDAgPSAmdWFydDA7CisJfTsKKworCWNwdV9pbnRjOiBjcHVfaW50YyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDA+OworCQljb21wYXRpYmxlID0gIm10aSxjcHUtaW50ZXJydXB0LWNvbnRyb2xsZXIiOworCisJCWludGVycnVwdC1jb250cm9sbGVyOworCQkjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCX07CisKKwljbG9ja3MgeworCQl1YXJ0X2NsazogdWFydF9jbGsgeworCQkJY29tcGF0aWJsZSA9ICJmaXhlZC1jbG9jayI7CisJCQkjY2xvY2stY2VsbHMgPSA8MD47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8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PjsKKwkJCWJyY20sZ2lzYi1hcmItbWFzdGVyLW5hbWVzID0gInNzcF8wIiwgImNwdV8wIiwgInBjaV8wIiwKKwkJCQkJCSAgICAgImJzcF8wIiwgInJkY18wIiwgInJwdGRfMCIsCisJCQkJCQkgICAgICJhdmRfMCIsICJqdGFnXzAiOworCQl9OworCisJCXVwZ19pcnEwX2ludGM6IHVwZ19pcnEwX2ludGNANDA2NzgwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203MTIwLWwyLWludGMiOworCQkJcmVnID0gPDB4NDA2NzgwIDB4OD47CisKKwkJCWJyY20saW50LW1hcC1tYXNrID0gPDB4NDQ+OworCQkJYnJjbSxpbnQtZndkLW1hc2sgPSA8MHg3MDAwMD47CisKKwkJCWludGVycnVwdC1jb250cm9sbGVyOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmcGVyaXBoX2ludGM+OworCQkJaW50ZXJydXB0cyA9IDwxOD47CisJCX07CisKKwkJc3VuX3RvcF9jdHJsOiBzeXNjb25ANDA0MDAwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203MTI1LXN1bi10b3AtY3RybCIsICJzeXNjb24iOworCQkJcmVnID0gPDB4NDA0MDAwIDB4NjBjPjsKKwkJCWxpdHRsZS1lbmRpYW47CisJCX07CisKKwkJcmVib290IHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203MDM4LXJlYm9vdCI7CisJCQlzeXNjb24gPSA8JnN1bl90b3BfY3RybCAweDggMHgxND47CisJCX07CisKKwkJdWFydDA6IHNlcmlhbEA0MDZiMDAgeworCQkJY29tcGF0aWJsZSA9ICJuczE2NTUwYSI7CisJCQlyZWcgPSA8MHg0MDZiMDAgMHgyMD47CisJCQlyZWctaW8td2lkdGggPSA8MHg0PjsKKwkJCXJlZy1zaGlmdCA9IDwweDI+OworCQkJbmF0aXZlLWVuZGlhbjsKKwkJCWludGVycnV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gPSA8MT47CisJI3NpemUtY2VsbHMgPSA8MT47CisJY29tcGF0aWJsZSA9ICJicmNtLGJjbTczNjIiOworCisJY3B1cyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwwPjsKKworCQltaXBzLWhwdC1mcmVxdWVuY3kgPSA8Mzc1MDAwMDAwPjsKKworCQljcHVAMCB7CisJCQljb21wYXRpYmxlID0gImJyY20sYm1pcHM0MzgwIjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8MD47CisJCX07CisKKwkJY3B1QDEgeworCQkJY29tcGF0aWJsZSA9ICJicmNtLGJtaXBzNDM4MCI7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJcmVnID0gPDE+OworCQl9OworCX07CisKKwlhbGlhc2VzIHsKKwkJdWFydDAgPSAmdWFydDA7CisJfTsKKworCWNwdV9pbnRjOiBjcHVfaW50YyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDA+OworCQljb21wYXRpYmxlID0gIm10aSxjcHUtaW50ZXJydXB0LWNvbnRyb2xsZXIiOworCisJCWludGVycnVwdC1jb250cm9sbGVyOworCQkjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCX07CisKKwljbG9ja3MgeworCQl1YXJ0X2NsazogdWFydF9jbGsgeworCQkJY29tcGF0aWJsZSA9ICJmaXhlZC1jbG9jayI7CisJCQkjY2xvY2stY2VsbHMgPSA8MD47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8ODEwMDAwMDA+OworCQl9OworCX07CisKKwlyZGIgeworCQkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkJI3NpemUtY2VsbHMgPSA8MT47CisKKwkJY29tcGF0aWJsZSA9ICJzaW1wbGUtYnVzIjsKKwkJcmFuZ2VzID0gPDAgMHgxMDAwMDAwMCAweDAxMDAwMDAwPjsKKworCQlwZXJpcGhfaW50YzogcGVyaXBoX2ludGNANDExNDAwIHsKKwkJCWNv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CisJCSNhZGRyZXNzLWNlbGxzID0gPDA+OworCQljb21wYXRpYmxlID0gIm10aSxjcHUtaW50ZXJydXB0LWNvbnRyb2xsZXIiOworCisJCWludGVycnVwdC1jb250cm9sbGVyOworCQkjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCX07CisKKwljbG9ja3MgeworCQl1YXJ0X2NsazogdWFydF9jbGsgeworCQkJY29tcGF0aWJsZSA9ICJmaXhlZC1jbG9jayI7CisJCQkjY2xvY2stY2VsbHMgPSA8MD47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8ODEwMDAwMDA+OworCQl9OworCX07CisKKwlyZGIgeworCQkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkJI3NpemUtY2VsbHMgPSA8MT47CisKKwkJY29tcGF0aWJsZSA9ICJzaW1wbGUtYnVzIjsKKwkJcmFuZ2VzID0gPDAgMHgxMDAwMDAwMCAweDAxMDAwMDAwPjsKKworCQlwZXJpcGhfaW50YzogcGVyaXBoX2ludGNANDQxNDAwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203MDM4LWwxLWludGMiOworCQkJcmVnID0gPDB4NDQxNDAwIDB4MzA+LCA8MHg0NDE2MDAgMHgzMD47CisKKwkJCWludGVycnVwdC1jb250cm9sbGVyOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmY3B1X2ludGM+OworCQkJaW50ZXJydXB0cyA9IDwyPiwgPDM+OworCQl9OworCisJCXN1bl9sMl9pbnRjOiBzdW5fbDJfaW50Y0A0MDE4MDAgeworCQkJY29tcGF0aWJsZSA9ICJicmNtLGwyLWludGMiOworCQkJcmVnID0gPDB4NDAxODAwIDB4MzA+OworCQkJaW50ZXJydXB0LWNvbnRyb2xsZXI7CisJCQkjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmcGVyaXBoX2ludGM+OworCQkJaW50ZXJydXB0c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kY29tIEJDTTk3MzU4U1ZNQiI7CisKKwltZW1vcnlAMCB7CisJCWRldmljZV90eXBlID0gIm1lbW9yeSI7CisJCXJlZyA9IDwweDAwMDAwMDAwIDB4MTAwMDAwMDA+OworCX07CisKKwljaG9zZW4geworCQlib290YXJncyA9ICJjb25zb2xlPXR0eVMwLDExNTIwMCI7CisJCXN0ZG91dC1wYXRoID0gJnVhcnQwOworCX07Cit9OworCismdWFydDAgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZlbmV0MCB7CisJc3RhdHVzID0gIm9rYXkiOworfTsKKworJmVoY2kwIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismb2hjaTAgeworCXN0YXR1cyA9ICJva2F5IjsKK307CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvYm9vdC9kdHMvYnJjbS9iY205NzM2MHN2bWIuZHRzIGIvYXJjaC9taXBzL2Jvb3QvZHRzL2JyY20vYmNtOTczNjBzdm1iLmR0cwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi40ZmU1MTU1Ci0tLSAvZGV2L251bGwKKysrIGIvYXJjaC9taXBzL2Jvb3QvZHRzL2JyY20vYmNtOTczNjBzdm1iLmR0cwpAQCAtMCwwICsxLDM0IEBACisvZHRzLXYxLzsKKworL2luY2x1ZGUvICJiY203MzYwLmR0c2kiCisKKy8geworCWNvbXBhdGlibGUgPSAiYnJjbSxiY205NzM2MHN2bWIiLCAiYnJjbSxiY203MzYwIjsKKwltb2RlbCA9ICJCcm9hZGNvbSBCQ005NzM2MFNWTUIiOworCisJbWVtb3J5QDAgeworCQlkZXZpY2VfdHlwZSA9ICJtZW1vcnkiOworCQlyZWcgPSA8MHgwMDAwMDAwMCAweDEwMDAwMDAwPjsKKwl9OworCisJY2hvc2VuIHsKKwkJYm9vdGFyZ3MgPSAiY29uc29sZT10dHlTMCwxMTUyMDAiOworCQlzdGRvdXQtcGF0aCA9ICZ1YXJ0MDsKKwl9OworfTsKKworJnVhcnQwIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismZW5ldDAgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZlaGNpMCB7CisJc3RhdHVzID0gIm9rYXkiOworfTsKKworJm9oY2kwIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OwpkaWZmIC0tZ2l0IGEvYXJjaC9taXBzL2Jvb3QvZHRzL2JyY20vYmNtOTczNjJzdm1iLmR0cyBiL2FyY2gvbWlwcy9ib290L2R0cy9icmNtL2JjbTk3MzYyc3ZtYi5kdHMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYjdiODhlNQotLS0gL2Rldi9udWxsCisrKyBiL2FyY2gvbWlwcy9ib290L2R0cy9icmNtL2JjbTk3MzYyc3ZtYi5kdHMKQEAgLTAsMCArMSwzNCBAQAorL2R0cy12MS87CisKKy9pbmNsdWRlLyAiYmNtNzM2Mi5kdHNpIgorCisvIHsKKwljb21wYXRpYmxlID0gImJyY20sYmNtOTczNjJzdm1iIiwgImJyY20sYmNtNzM2MiI7CisJbW9kZWwgPSAiQnJvYWRjb20gQkNNOTczNjJTVk1CIjsKKworCW1lbW9yeUAwIHsKKwkJZGV2aWNlX3R5cGUgPSAibWVtb3J5IjsKKwkJcmVnID0gPDB4MDAwMDAwMDAgMHgxMDAwMDAwMD4sIDwweDIwMDAwMDAwIDB4MzAwMDAwMDA+OworCX07CisKKwljaG9zZW4geworCQlib290YXJncyA9ICJjb25zb2xlPXR0eVMwLDExNTIwMCI7CisJCXN0ZG91dC1wYXRoID0gJnVhcnQwOworCX07Cit9OworCismdWFydDAgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZlbmV0MCB7CisJc3RhdHVzID0gIm9rYXkiOworfTsKKworJmVoY2kwIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismb2hjaTAgeworCXN0YXR1cyA9ICJva2F5IjsKK307CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvYm9v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Gxpc3QgZW50ZXJlZCBvbiBTV1RBR19GVUxMKS4KIAkJICovCiAJCXVpbnQ2NF90IHdxcDozNjsKKyNlbHNlCisJICAgICAgICB1aW50NjRfdCB3cXA6MzY7CisJICAgICAgICB1aW50NjRfdCBncnA6NDsKKwkgICAgICAgIHVpbnQ2NF90IGluZGV4OjExOworCSAgICAgICAgdWludDY0X3QgbGlua19pbmRleDoxMTsKKwkgICAgICAgIHVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisjZW5kaWYKIAl9IHNfc3N0YXR1czQ7CiAKICAgICAvKioKQEAgLTY0OSw2ICs3OTAsNyBAQAogICAgICAqIGdldF9yZXY9PTEpCiAgICAgICovCiAJc3RydWN0IHsKKyNpZmRlZiBfX0JJR19FTkRJQU5fQklURklFTEQKIAkJdWludDY0X3QgcmVzZXJ2ZWRfNjJfNjM6MjsKIAkJLyoKIAkJICogUG9pbnRzIHRvIHRoZSBwcmlvciBQT1cgZW50cnkgaW4gdGhlIHRhZyBsaXN0IHdoZW4KQEAgLTY2OSwxMiArODExLDIwIEBACiAJCSAqIGxpc3QgZW50ZXJlZCBvbiBTV1RBR19GVUxMKS4KIAkJICovCiAJCXVpbnQ2NF90IHdxcDozNjsKKyNlbHNlCisJICAgICAgICB1aW50NjRfdCB3cXA6MzY7CisJICAgICAgICB1aW50NjRfdCBncnA6NDsKKwkgICAgICAgIHVpbnQ2NF90IGluZGV4OjExOworCSAgICAgICAgdWludDY0X3QgcmV2bGlua19pbmRleDoxMTsKKwkgICAgICAgIHVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisjZW5kaWYKIAl9IHNfc3N0YXR1czU7CiAKICAgICAvKioKICAgICAgKiBSZXN1bHQgRm9yIFBPVyBNZW1vcnkgTG9hZCAoZ2V0X2RlcyA9PSAwIGFuZCBnZXRfd3FwID09IDApCiAgICAgICovCiAJc3RydWN0IHsKKyNpZmRlZiBfX0JJR19FTkRJQU5fQklURklFTEQKIAkJdWludDY0X3Qgcm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wkgICAgICAgIHVpbnQ2NF90IHJtdF9oZWFkOjM2OworCSAgICAgICAgdWludDY0X3Qgcm10X29uZToxOworCSAgICAgICAgdWludDY0X3Qgcm10X3ZhbDoxOworCSAgICAgICAgdWludDY0X3Qgcm10X2lzX2hlYWQ6MTsKKwkgICAgICAgIHVpbnQ2NF90IHJlc2VydmVkXzM5XzYzOjI1OworI2VuZGlmCiAJfSBzaW5kZXhsb2FkMjsKIAogICAgIC8qKgpAQCAtODg0LDYgKzExMDAsNyBAQAogICAgICAqIDEvZ2V0X2Rlc19nZXRfdGFpbCA9PSAxKQogICAgICAqLwogCXN0cnVjdCB7CisjaWZkZWYgX19CSUdfRU5ESUFOX0JJVEZJRUxECiAJCXVpbnQ2NF90IHJlc2VydmVkXzM5XzYzOjI1OwogCQkvKgogCQkgKiBzZXQgd2hlbiB0aGlzIERSQU0gbGlzdCBpcyB0aGUgY3VycmVudCBoZWFkCkBAIC05MTIsMTIgKzExMjksMjAgQEAKIAkJICogcW9zZ3JwLgogCQkgKi8KIAkJdWludDY0X3Qgcm10X3RhaWw6MzY7CisjZWxzZQorCSAgICAgICAgdWludDY0X3Qgcm10X3RhaWw6MzY7CisJICAgICAgICB1aW50NjRfdCBybXRfb25lOjE7CisJICAgICAgICB1aW50NjRfdCBybXRfdmFsOjE7CisJICAgICAgICB1aW50NjRfdCBybXRfaXNfaGVhZDoxOworCSAgICAgICAgdWludDY0X3QgcmVzZXJ2ZWRfMzlfNjM6MjU7CisjZW5kaWYKIAl9IHNpbmRleGxvYWQzOwogCiAgICAgLyoqCiAgICAgICogUmVzcG9uc2UgdG8gTlVMTF9SRCByZXF1ZXN0IGxvYWRzCiAgICAgICovCiAJc3RydWN0IHsKKyNpZmRlZiBfX0JJR19FTkRJQU5fQklURklFTEQKIAkJdWludDY0X3QgdW51c2VkOjYyOwogCQkvKiBvZiB0eXBlIGN2bXhfcG93X3RhZ190eXBlX3QuIHN0YXRlIGlzIG9uZSBvZiB0aGUKIAkJICogZm9s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6MTsKKwkgICAgICAgIHVpbnQ2NF90IGlzX21jYXN0OjE7CisJICAgICAgICB1aW50NjRfdCBpc19iY2FzdDoxOworCSAgICAgICAgdWludDY0X3QgaXNfYXJwOjE7CisJICAgICAgICB1aW50NjRfdCBpc19yYXJwOjE7CisJICAgICAgICB1aW50NjRfdCB1bmFzc2lnbmVkMzoxOworCSAgICAgICAgdWludDY0X3Qgc29mdHdhcmU6MTsKKwkgICAgICAgIHVpbnQ2NF90IHVuYXNzaWduZWQyOjQ7CisJICAgICAgICB1aW50NjRfdCB1bmFzc2lnbmVkMmE6ODsKKwkgICAgICAgIHVpbnQ2NF90IHByOjQ7CisJICAgICAgICB1aW50NjRfdCB2bGFuX2lkOjEyOworCSAgICAgICAgdWludDY0X3Qgdmxhbl9jZmk6MTsKKwkgICAgICAgIHVpbnQ2NF90IHVuYXNzaWduZWQ6MTsKKwkgICAgICAgIHVpbnQ2NF90IHZsYW5fc3RhY2tlZDoxOworCSAgICAgICAgdWludDY0X3Qgdmxhbl92YWxpZDoxOworCSAgICAgICAgdWludDY0X3QgdW51c2VkOjg7CisJICAgICAgICB1aW50NjRfdCBidWZzOjg7CisjZW5kaWYKIAl9IHNub2lwOwogCiB9IGN2bXhfcGlwX3dxZV93b3JkMjsKQEAgLTMxMiw2ICszNjcsNyBAQAogICAgICAqCUhXIFdSSVRFOiB0aGUgZm9sbG93aW5nIDY0IGJpdHMgYXJlIGZpbGxlZCBieSBIVyB3aGVuIGEgcGFja2V0IGFycml2ZXMKICAgICAgKi8KIAorI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogICAgIC8qKgogICAgICAqIHJhdyBjaGtzdW0gcmVzdWx0IGdlbmVyYXRlZCBieSB0aGUgSFcKICAgICAgKi8KQEAgLTMyNywxMiArMzgzLDE4IEBACiAgICAgICogKE9ubHkgMzYgYml0cyB1c2VkIGluIE9jdGVvbiAxKQogICAgICAqLwogCXVpbnQ2NF90IG5leHRfcHRyOjQwOworI2Vsc2UKKwl1aW50NjRfdCBuZXh0X3B0cjo0MDsKKwl1aW50OF90IHVudXNlZDsKKwl1aW50MTZfdCBod19jaGtzdW07CisjZW5kaWYKIAogICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgICAqIFdPUkQgMQogICAgICAqCUhXIFdSSVRFOiB0aGUgZm9sbG93aW5nIDY0IGJpdHMgYXJlIGZpbGxlZCBieSBIVyB3aGVuIGEgcGFja2V0IGFycml2ZXMKICAgICAgKi8KIAorI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogICAgIC8qKgogICAgICAqIEhXIHNldHMgdG8gdGhlIHRvdGFsIG51bWJlciBvZiBieXRlcyBpbiB0aGUgcGFja2V0CiAgICAgICovCkBAIC0zNTksNiArNDIxLDE1IEBACiAgICAgICogdGhlIHN5bmNocm9uaXphdGlvbi9vcmRlcmluZyB0YWcKICAgICAgKi8KIAl1aW50NjRfdCB0YWc6MzI7CisjZWxzZQorCXVpbnQ2NF90IHRhZzozMjsKKwl1aW50NjRfdCB0YWdfdHlwZToyOworCXVpbnQ2NF90IHplcm9fMjoxOworCXVpbnQ2NF90IGdycDo0OworCXVpbnQ2NF90IHFvczozOworCXVpbnQ2NF90IGlwcHJ0OjY7CisJdWludDY0X3QgbGVuOjE2OworI2VuZGlmCiAKICAgICAvKioKICAgICAgKiBXT1JEIDIgSFcgV1JJVEU6IHRoZSBmb2xsb3dpbmcgNjQtYml0cyBhcmUgZmlsbGVkIGluIGJ5CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvaW5jbHVkZS9hc20vb2N0ZW9uL2N2bXguaCBiL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS9vY3Rlb24vY3ZteC5oCmluZGV4IDMzZGIxYzguLjc3NGJiNDUgMTAwNjQ0Ci0tLSBhL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS9vY3Rlb24vY3ZteC5oCisrKyBiL2FyY2gvb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GFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKIAogI2lmbmRlZiBDT05GSUdfQ1BVX01JUFNSNgotI2RlZmluZSAgICAgTG9hZFcoYWRkciwgdmFsdWUsIHJlcykgICBcCisjZGVmaW5lICAgICBfTG9hZFcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIiglMikiKSJcbiIgICAgXAotCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCIgXAorCQkJIjE6XHQidHlwZSMjX2x3bCgiJTAiLCAiKCUyKSIpIlxuIiAgIFwKKwkJCSIyOlx0InR5cGUjI19sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCJcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLmluc25cblx0IiAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xNDYsMjEgKzE0NywyNCBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJOiAiPSZyIiAodmFsdWUpLCAiPXIiIChyZXMpICAgICAgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKKwogI2Vsc2UKIC8qIE1JUFNSNiBoYXMgbm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iLCAxMWJcblx0IgkJICAgIFwKIAkJCSIucHJldmlvdXMiCQkJICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKQkgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKKwogI2VuZGlmIC8qIENPTkZJR19DUFVfTUlQU1I2ICovCiAKLSNkZWZpbmUgICAgIExvYWRIV1UoYWRkciwgdmFsdWUsIHJlcykgXAorI2RlZmluZSAgICAgX0xvYWRIV1UoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIuc2V0XHRub2F0XG4iICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfbGJ1KCIlMCIsICIwKCUyKSIpIlxuIiAgIFwKLQkJCSIyOlx0InVzZXJfbGJ1KCIkMSIsICIxKCUyKSIpIlxuXHQiIFwKKwkJCSIxOlx0InR5cGUjI19sYnUoIiUwIiwgIjAoJTIpIikiXG4iIFwKKwkJCSIyOlx0InR5cGUjI19sYnUoIiQxIiwgIjEoJTIpIikiXG5cdCJcCiAJCQkic2xsXHQlMCwgMHg4XG5cdCIgICAgICAgICAgICAgICAgICBcCiAJCQkib3JcdCUwLCAkMVxuXHQiICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0yMDEsMTMgKzIwOCwxNSBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJOiAiPSZyIiAodmFsdWUpLCAiPXIiIChyZXMpICAgICAgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKIAogI2lmbmRlZiBDT05GSUdfQ1BVX01JUFNSNgotI2RlZmluZSAgICAgTG9hZFdVKGFkZHIsIHZhbHVlLCByZXMpICBcCisjZGVmaW5lICAgICBfTG9hZFdVKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIiglMikiKSJcbiIgICAgXAotCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCIgXAorCQkJIjE6XHQidHlwZSMjX2x3bCgiJTAiLCAiKCUyKSIpIlxuIiAgXAorCQkJIjI6XHQidHlwZSMjX2x3cigiJTAiLCAiMyglMikiKSJcblx0IlwKIAkJCSJkc2xsXHQlMCwgJTAsIDMyXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSJkc3JsXHQlMCwgJTAsIDMyXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSJsaVx0JTEsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTIyMiw5ICsyMzEsMTEgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKLSNkZWZpbmUgICAgIExvYWREVyhhZGRyLCB2YWx1ZSwgcmVzKSAgXAorI2RlZmluZSAgICAgX0xvYWREVyhhZGRyLCB2YWx1ZSwgcmVzKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIxOlx0bGRsXHQlMCwgKCUyKVxuIiAgICAgICAgICAgICAgIFwKIAkJCSIyOlx0bGRyXHQlMCwgNyglMilcblx0IiAgICAgICAgICAgIFwKQEAgLTI0MCwyMSArMjUxLDI0IEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykgICAgICAgICBcCi0JCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgICAgICAgXAorfSB3aGlsZSgwKQorCiAjZWxzZQogLyogTUlQU1I2IGhhcyBub3QgbHdsIGFuZCBsZGwgaW5zdHJ1Y3Rpb25zICovCi0jZGVmaW5lCSAgICBMb2FkV1UoYWRkciwgdmFsdWUsIHJlcykgXAorI2RlZmluZQkgICAgX0xvYWRXVShhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICgJCQkgICAgXAogCQkJIi5zZXRcdHB1c2hcblx0IgkJICAgIFwKIAkJCSIuc2V0XHRub2F0XG5cdCIJCSAgICBcCi0JCQkiMToidXNlcl9sYnUoI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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKAkJCSAgICBcCiAJCQkiLnNldFx0cHVzaFxuXHQiCQkgICAgXAogCQkJIi5zZXRcdG5vYXRcblx0IgkJICAgIFwKQEAgLTMxOSwxNiArMzM1LDE5IEBACiAJCQlTVFIoUFRSKSJcdDhiLCAxMWJcblx0IgkJICAgIFwKIAkJCSIucHJldmlvdXMiCQkJICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKQkgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKKwogI2VuZGlmIC8qIENPTkZJR19DUFVfTUlQU1I2ICovCiAKIAotI2RlZmluZSAgICAgU3RvcmVIVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCisjZGVmaW5lICAgICBfU3RvcmVIVyhhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5zZXRcdG5vYXRcbiIgICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHQidXNlcl9zYigiJTEiLCAiMSglMikiKSJcbiIgICAgXAorCQkJIjE6XHQidHlwZSMjX3NiKCIlMSIsICIxKCUyKSIpIlxuIiAgXAogCQkJInNybFx0JDEsICUxLCAweDhcbiIgICAgICAgICAgICAgICAgXAotCQkJIjI6XHQidXNlcl9zYigiJDEiLCAiMCglMikiKSJcbiIgICAgXAorCQkJIjI6XHQidHlwZSMjX3NiKCIkMSIsICIwKCUyKSIpIlxuIiAgXAogCQkJIi5zZXRcdGF0XG5cdCIgICAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMCwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzQyLDEzICszNjEsMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj1yIiAocmVzKSAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7XAorfSB3aGlsZSgwKQogCiAjaWZuZGVmIENPTkZJR19DUFVfTUlQU1I2Ci0jZGVmaW5lICAgICBTdG9yZVcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9TdG9yZVcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX3N3bCgiJTEiLCAiKCUyKSIpIlxuIiAgICBcCi0JCQkiMjpcdCJ1c2VyX3N3cigiJTEiLCAiMyglMikiKSJcblx0IiBcCisJCQkiMTpcdCJ0eXBlIyNfc3dsKCIlMSIsICIoJTIpIikiXG4iICBcCisJCQkiMjpcdCJ0eXBlIyNfc3dyKCIlMSIsICIzKCUyKSIpIlxuXHQiXAogCQkJImxpXHQlMCwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5pbnNuXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzYxLDkgKzM4MiwxMSBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQk6ICI9ciIgKHJlcykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgXAorfSB3aGlsZSgwKQogCi0jZGVmaW5lICAgICBTdG9yZURXKGFkZHIsIHZhbHVlLCByZXMpIFwKKyNkZWZpbmUgICAgIF9TdG9yZURXKGFkZHIsIHZhbHVlLCByZXMpIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMTpcdHNkbFx0JTEsKCUyKVxuIiAgICAgICAgICAgICAgICBcCiAJCQkiMjpcdHNkclx0JTEsIDcoJTIpXG5cdCIgICAgICAgICAgICBcCkBAIC0zNzksMjAgKzQwMiwyMyBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQk6ICI9ciIgKHJlcykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgXAorfSB3aGlsZSgwKQorCiAjZWxzZQogLyogTUlQU1I2IGhhcyBubyBzd2wgYW5kIHNkbCBpbnN0cnVjdGlvbnMgKi8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ykJCQkgICAgCSAgICBcCiAJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkgICAgXAotCQk6ICJtZW1vcnkiKTsKKwkJOiAibWVtb3J5Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9IHdoaWxlKDApCiAKICNkZWZpbmUgICAgIFN0b3JlRFcoYWRkciwgdmFsdWUsIHJlcykgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIuc2V0XHRwdXNoXG5cdCIJCSAgICBcCiAJCQkiLnNldFx0bm9hdFxuXHQiCQkgICAgXApAQCAtNDUxLDE1ICs0NzksMTggQEAKIAkJCSIucHJldmlvdXMiCQkJICAgIFwKIAkJOiAiPSZyIiAocmVzKQkJCSAgICAJICAgIFwKIAkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSAgICBcCi0JCTogIm1lbW9yeSIpOworCQk6ICJtZW1vcnkiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUoMCkKKwogI2VuZGlmIC8qIENPTkZJR19DUFVfTUlQU1I2ICovCiAKICNlbHNlIC8qIF9fQklHX0VORElBTiAqLwogCi0jZGVmaW5lICAgICBMb2FkSFcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9Mb2FkSFcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCIuc2V0XHRub2F0XG4iICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2xiKCIlMCIsICIxKCUyKSIpIlxuIiAgICBcCi0JCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMCglMikiKSJcblx0IiBcCisJCQkiMTpcdCJ0eXBlIyNfbGIoIiUwIiwgIjEoJTIpIikiXG4iICBcCisJCQkiMjpcdCJ0eXBlIyNfbGJ1KCIkMSIsICIwKCUyKSIpIlxuXHQiXAogCQkJInNsbFx0JTAsIDB4OFxuXHQiICAgICAgICAgICAgICAgICAgXAogCQkJIm9yXHQlMCwgJDFcblx0IiAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtNDc0LDEzICs1MDUsMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKICNpZm5kZWYgQ09ORklHX0NQVV9NSVBTUjYKLSNkZWZpbmUgICAgIExvYWRXKGFkZHIsIHZhbHVlLCByZXMpICAgXAorI2RlZmluZSAgICAgX0xvYWRXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfbHdsKCIlMCIsICIzKCUyKSIpIlxuIiAgIFwKLQkJCSIyOlx0InVzZXJfbHdyKCIlMCIsICIoJTIpIikiXG5cdCIgIFwKKwkJCSIxOlx0InR5cGUjI19sd2woIiUwIiwgIjMoJTIpIikiXG4iIFwKKwkJCSIyOlx0InR5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IiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2xidSgiJTAiLCAiMSglMikiKSJcbiIgICBcCi0JCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMCglMikiKSJcblx0IiBcCisJCQkiMTpcdCJ0eXBlIyNfbGJ1KCIlMCIsICIxKCUyKSIpIlxuIiBcCisJCQkiMjpcdCJ0eXBlIyNfbGJ1KCIkMSIsICIwKCUyKSIpIlxuXHQiXAogCQkJInNsbFx0JTAsIDB4OFxuXHQiICAgICAgICAgICAgICAgICAgXAogCQkJIm9yXHQlMCwgJDFcblx0IiAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtNTQ5LDEzICs1ODgsMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKICNpZm5kZWYgQ09ORklHX0NQVV9NSVBTUjYKLSNkZWZpbmUgICAgIExvYWRXVShhZGRyLCB2YWx1ZSwgcmVzKSAgXAorI2RlZmluZSAgICAgX0xvYWRXVShhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfbHdsKCIlMCIsICIzKCUyKSIpIlxuIiAgIFwKLQkJCSIyOlx0InVzZXJfbHdyKCIlMCIsICIoJTIpIikiXG5cdCIgIFwKKwkJCSIxOlx0InR5cGUjI19sd2woIiUwIiwgIjMoJTIpIikiXG4iIFwKKwkJCSIyOlx0InR5cGUjI19sd3IoIiUwIiwgIiglMikiKSJcblx0IlwKIAkJCSJkc2xsXHQlMCwgJTAsIDMyXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSJkc3JsXHQlMCwgJTAsIDMyXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSJsaVx0JTEsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTU3MCw5ICs2MTEsMTEgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKLSNkZWZpbmUgICAgIExvYWREVyhhZGRyLCB2YWx1ZSwgcmVzKSAgXAorI2RlZmluZSAgICAgX0xvYWREVyhhZGRyLCB2YWx1ZSwgcmVzKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIxOlx0bGRsXHQlMCwgNyglMilcbiIgICAgICAgICAgICAgIFwKIAkJCSIyOlx0bGRyXHQlMCwgKCUyKVxuXHQiICAgICAgICAgICAgIFwKQEAgLTU4OCwyMSArNjMxLDI0IEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6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hbHVlLCByZXMpIFwKKyNkZWZpbmUgICAgIF9TdG9yZUhXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX3NiKCIlMSIsICIwKCUyKSIpIlxuIiAgICBcCisJCQkiMTpcdCJ0eXBlIyNfc2IoIiUxIiwgIjAoJTIpIikiXG4iICBcCiAJCQkic3JsXHQkMSwlMSwgMHg4XG4iICAgICAgICAgICAgICAgICBcCi0JCQkiMjpcdCJ1c2VyX3NiKCIkMSIsICIxKCUyKSIpIlxuIiAgICBcCisJCQkiMjpcdCJ0eXBlIyNfc2IoIiQxIiwgIjEoJTIpIikiXG4iICBcCiAJCQkiLnNldFx0YXRcblx0IiAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUwLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC02ODksMTIgKzczOSwxNSBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJOiAiPXIiIChyZXMpICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTtcCit9IHdoaWxlKDApCisKICNpZm5kZWYgQ09ORklHX0NQVV9NSVBTUjYKLSNkZWZpbmUgICAgIFN0b3JlVyhhZGRyLCB2YWx1ZSwgcmVzKSAgXAorI2RlZmluZSAgICAgX1N0b3JlVyhhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfc3dsKCIlMSIsICIzKCUyKSIpIlxuIiAgIFwKLQkJCSIyOlx0InVzZXJfc3dyKCIlMSIsICIoJTIpIikiXG5cdCIgIFwKKwkJCSIxOlx0InR5cGUjI19zd2woIiUxIiwgIjMoJTIpIikiXG4iIFwKKwkJCSIyOlx0InR5cGUjI19zd3IoIiUxIiwgIiglMikiKSJcblx0IlwKIAkJCSJsaVx0JTAsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIzOlxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIuaW5zblxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTcwNyw5ICs3NjAsMTEgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiPXIiIChyZXMpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgIFwKK30gd2hpbGUoMCkKIAotI2RlZmluZSAgICAgU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCisjZGVmaW5lICAgICBfU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjE6XHRzZGxcdCUxLCA3KCUyKVxuIiAgICAgICAgICAgICAgXAogCQkJIjI6XHRzZHJcdCUxLCAoJTIpXG5cdCIgICAgICAgICAgICAgXApAQCAtNzI1LDIwICs3ODAsMjMgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiPXIiIChyZXMpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgIFwKK30gd2hpbGUoMCkKKwogI2Vsc2UKIC8qIE1JUFNSNiBoYXMgbm8gc3dsIGFuZCBzZGwgaW5zdHJ1Y3Rpb25zICovCi0jZGVmaW5lICAgICBTdG9yZVcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9TdG9yZVcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0cHVzaFxuXHQiCQkgICAgXAogCQkJIi5zZXRcdG5vYXRcblx0IgkJICAgIFwKLQkJCSIxOiJ1c2VyX3NiKCIlMSIsICIwKCUyKSIpIlxuXHQiICAgIFwKKwkJCSIxOiJ0eXBlIyNfc2IoIiUxIiwgIjAoJTIpIikiXG5cdCIgIFwKIAkJCSJzcmxcdCQxLCAlMSwgMHg4XG5cdCIJCSAgICBcCi0JCQkiMjoidX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NBVkVfSVYockkxLCA0KQorCVNBVkVfSVYockkyLCA4KQorCVNBVkVfSVYockkzLCAxMikKKwlGSU5BTElaRV9DUllQVCg0KQorCWJscgorCisvKgorICogcHBjX2VuY3J5cHRfeHRzKHU4ICpvdXQsIGNvbnN0IHU4ICppbiwgdTMyICprZXlfZW5jLAorICoJCSAgIHUzMiByb3VuZHMsIHUzMiBieXRlcywgdTggKml2LCB1MzIgKmtleV90d2spOworICoKKyAqIGNhbGxlZCBmcm9tIGdsdWUgbGF5ZXIgdG8gZW5jcnlwdCBtdWx0aXBsZSBibG9ja3MgdmlhIFhUUworICogSWYga2V5X3R3ayBpcyBnaXZlbiwgdGhlIGluaXRpYWwgSVYgZW5jcnlwdGlvbiB3aWxsIGJlCisgKiBwcm9jZXNzZWQgdG9vLiBSb3VuZCB2YWx1ZXMgYXJlIEFFUzEyOCA9IDQsIEFFUzE5MiA9IDUsCisgKiBBRVMyNTYgPSA2CisgKgorICovCitfR0xPQkFMKHBwY19lbmNyeXB0X3h0cykKKwlJTklUSUFMSVpFX0NSWVBUKFBQQ19BRVNfNEtfRU5DVEFCLCA4KQorCUxPQURfSVYockkwLCAwKQorCUxPQURfSVYockkxLCA0KQorCUxPQURfSVYockkyLCA4KQorCWNtcHdpCQlyS1QsMAorCUxPQURfSVYockkzLCAxMikKKwlidAkJZXEscHBjX2VuY3J5cHRfeHRzX25vdHdlYWsKKwltcgkJcktQLHJLVAorCVNUQVJUX0tFWShySTAsIHJJMSwgckkyLCBySTMpCisJYmwJCXBwY19lbmNyeXB0X2Jsb2NrCisJeG9yCQlySTAsckQwLHJXMAorCXhvcgkJckkxLHJEMSxyVzEKKwl4b3IJCXJJMixyRDIsclcyCisJeG9yCQlySTMsckQzLHJXMworcHBjX2VuY3J5cHRfeHRzX25vdHdlYWs6CisJRU5ESUFOX1NXQVAockcwLCByRzEsIHJJMCwgckkxKQorCUVORElBTl9TV0FQKHJHMiwgckczLCBySTIsIHJJMykKK3BwY19lbmNyeXB0X3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gPSBFICsgRgkJCSovIFwKKwlhZGQJCWQsZCxyVDAJCS8qIDI6IEUgPSBFICsgQScJCSovCisKKyNkZWZpbmUgUl82MF83OShhLCBiLCBjLCBkLCBlLCB3MCwgdzEsIHc0LCB3NiwgdzcsIGspIFwKKwlSXzIwXzM5KGEsIGIsIGMsIGQsIGUsIHcwLCB3MSwgdzQsIHc2LCB3NywgaykKKworX0dMT0JBTChwcGNfc3BlX3NoYTFfdHJhbnNmb3JtKQorCUlOSVRJQUxJWkUKKworCWx3egkJckgwLDAockhQKQorCWx3egkJckgxLDQockhQKQorCW10Y3RyCQlyNQorCWx3egkJckgyLDgockhQKQorCWxpcwkJcktQLFBQQ19TUEVfU0hBMV9LQGgKKwlsd3oJCXJIMywxMihySFApCisJb3JpCQlyS1AscktQLFBQQ19TUEVfU0hBMV9LQGwKKwlsd3oJCXJINCwxNihySFApCisKK3BwY19zcGVfc2hhMV9tYWluOgorCVJfMDBfMTUockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXMSwgclcwLCAxLCAwKQorCVJfMDBfMTUockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMiwgclcxLCAwLCA4KQorCVJfMDBfMTUockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXMywgclcyLCAwLCAxNikKKwlSXzAwXzE1KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzQsIHJXMywgMCwgMjQpCisJUl8wMF8xNShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclc1LCByVzQsIDAsIDMyKQorCVJfMDBfMTUockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXNiwgclc1LCAwLCA0MCkKKwlSXzAwXzE1KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVDMsIHJXNiwgMCwgNDgpCisJUl8wMF8xNShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclQzLCByVzcsIDAsIDU2KQorCisJUl8xNl8xOShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclcwLCByVzEsIHJXNCwgclc2LCByVzcsIDApCisJUl8xNl8xOShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclcxLCByVzIsIHJXNSwgclc3LCByVzAsIDIpCisKKwlSXzIwXzM5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzIsIHJXMywgclc2LCByVzAsIHJXMSwgMCkKKwlSXzIwXzM5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzMsIHJXNCwgclc3LCByVzEsIHJXMiwgMCkKKwlSXzIwXzM5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzQsIHJXNSwgclcwLCByVzIsIHJXMywgMCkKKwlSXzIwXzM5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzUsIHJXNiwgclcxLCByVzMsIHJXNCwgMCkKKwlSXzIwXzM5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzYsIHJXNywgclcyLCByVzQsIHJXNSwgMCkKKwlSXzIwXzM5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzcsIHJXMCwgclczLCByVzUsIHJXNiwgMCkKKwlSXzIwXzM5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzIwXzM5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzEsIHJXMiwgclc1LCByVzcsIHJXMCwgMCkKKwlSXzIwXzM5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzIsIHJXMywgclc2LCByVzAsIHJXMSwgMCkKKwlSXzIwXzM5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzMsIHJXNCwgclc3LCByVzEsIHJXMiwgMykKKworCVJfNDBfNTkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXNCwgclc1LCByVzAsIHJXMiwgclczLCAwKQorCVJfNDBfNTkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXNSwgclc2LCByVzEsIHJXMywgclc0LCAwKQorCVJfNDBfNTkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXNiwgclc3LCByVzIsIHJXNCwgclc1LCAwKQorCVJfNDBfNTkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNywgclcwLCByVzMsIHJXNSwgclc2LCAwKQorCVJfNDBfNTkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXMCwgclcxLCByVzQsIHJXNiwgclc3LCAwKQorCVJfNDBfNTkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXMSwgclcyLCByVzUsIHJXNywgclcwLCAwKQorCVJfNDBfNTkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfNDBfNTkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAwKQorCVJfNDBfNTkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNCwgclc1LCByVzAsIHJXMiwgclczLCAwKQorCVJfNDBfNTkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXNSwgclc2LCByVzEsIHJXMywgclc0LCA0KQorCisJUl82MF83OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc2LCByVzcsIHJXMiwgclc0LCByVzUsIDApCisJUl82MF83OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclc3LCByVzAsIHJXMywgclc1LCByVzYsIDApCisJUl82MF83OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclcwLCByVzEsIHJXNCwgclc2LCByVzcsIDApCisJUl82MF83OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclcxLCByVzIsIHJXNSwgclc3LCByVzAsIDApCisJUl82MF83OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclcyLCByVzMsIHJXNiwgclcwLCByVzEsIDApCisJUl82MF83OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclczLCByVzQsIHJXNywgclcxLCByVzIsIDApCisJUl82MF83OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJbHd6CQlyVDMsMChySFApCisJUl82MF83OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDApCisJbHd6CQlyVzEsNChySFApCisJUl82MF83OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc2LCByVzcsIHJXMiwgclc0LCByVzUsIDApCisJbHd6CQlyVzIsOChySFApCisJUl82MF83OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclc3LCByVzAsIHJXMywgclc1LCByVzYsIDApCisJbHd6CQlyVzMsMTIockhQKQorCU5FWFRfQkxPQ0sKKwlsd3oJCXJXNCwxNihySFApCisKKwlhZGQJCXJIMCxySDAsclQzCisJc3R3CQlySDAsMChySFApCisJYWRkCQlySDEsckgxLHJXMQorCXN0dwkJckgxLDQockhQKQorCWFkZAkJckgyLHJIMixyVzIKKwlzdHcJCXJIMiw4KHJIUCkKKwlhZGQJCXJIMyxySDMsclczCisJc3R3CQlySDMsMTIockhQKQorCWFkZAkJckg0LHJINCxyVzQKKwlzdHcJCXJINCwxNihySFApCisKKwliZG56CQlwcGNfc3BlX3NoYTFfbWFpbgorCisJRklOQUxJWkUKKwlibHIKKworLmRhdGEKKy5hbGlnbiA0CitQUENfU1BFX1NIQTFfSzoKKwkubG9uZyAweDVBODI3OTk5LDB4NkVEOUVCQTEsMHg4RjFCQkNEQywweENBNjJDMUQ2CmRpZmYgLS1naXQgYS9hcmNoL3Bvd2VycGMvY3J5cHRvL3NoYTEtc3BlLWdsdWUuYyBiL2FyY2gvcG93ZXJwYy9jcnlwdG8vc2hhMS1zcGUtZ2x1ZS5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjNlMWQyMjIKLS0tIC9kZXYvbnVsbAorKysgYi9hcmNoL3Bvd2VycGMvY3J5cHRvL3NoYTEtc3BlLWdsdWUuYwpAQCA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yS1AscktQLFBQQ19TUEVfU0hBMjU2X0tAbAorCisJUl9MT0FEX1cockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJXMCwgMCkKKwlSX0xPQURfVyhySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgclcxLCA4KQorCVJfTE9BRF9XKHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCByVzIsIDE2KQorCVJfTE9BRF9XKHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCByVzMsIDI0KQorCVJfTE9BRF9XKHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCByVzQsIDMyKQorCVJfTE9BRF9XKHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCByVzUsIDQwKQorCVJfTE9BRF9XKHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCByVzYsIDQ4KQorCVJfTE9BRF9XKHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCByVzcsIDU2KQorcHBjX3NwZV9zaGEyNTZfMTZfcm91bmRzOgorCWFkZGkJCXJLUCxyS1AsNjQKKwlSX0NBTENfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywKKwkJIHJXMCwgclcxLCByVzQsIHJXNSwgclc3LCBOLCAwKQorCVJfQ0FMQ19XKHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LAorCQkgclcxLCByVzIsIHJXNSwgclc2LCByVzAsIE4sIDgpCisJUl9DQUxDX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsCisJCSByVzIsIHJXMywgclc2LCByVzcsIHJXMSwgTiwgMTYpCisJUl9DQUxDX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsCisJCSByVzMsIHJXNCwgclc3LCByVzAsIHJXMiwgTiwgMjQpCisJUl9DQUxDX1cockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsCisJCSByVzQsIHJXNSwgclcwLCByVzEsIHJXMywgTiwgMzIpCisJUl9DQUxDX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsCisJCSByVzUsIHJXNiwgclcxLCByVzIsIHJXNCwgTiwgNDApCisJUl9DQUxDX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsCisJCSByVzYsIHJXNywgclcyLCByVzMsIHJXNSwgTiwgNDgpCisJUl9DQUxDX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsCisJCSByVzcsIHJXMCwgclczLCByVzQsIHJXNiwgQywgNTYpCisJYnQJCWd0LHBwY19zcGVfc2hhMjU2XzE2X3JvdW5kcworCisJbHd6CQlyVzAsMChySFApCisJTkVYVF9CTE9DSworCWx3egkJclcxLDQockhQKQorCWx3egkJclcyLDgockhQKQorCWx3egkJclczLDEyKHJIUCkKKwlsd3oJCXJXNCwxNihySFApCisJbHd6CQlyVzUsMjAockhQKQorCWx3egkJclc2LDI0KHJIUCkKKwlsd3oJCXJXNywyOChySFApCisKKwlhZGQJCXJIMCxySDAsclcwCisJc3R3CQlySDAsMChySFApCisJYWRkCQlySDEsckgxLHJXMQorCXN0dwkJckgxLDQockhQKQorCWFkZAkJckgyLHJIMixyVzIKKwlzdHcJCXJIMiw4KHJIUCkKKwlhZGQJCXJIMyxySDMsclczCisJc3R3CQlySDMsMTIockhQKQorCWFkZAkJckg0LHJINCxyVzQKKwlzdHcJCXJINCwxNihySFApCisJYWRkCQlySDUsckg1LHJXNQorCXN0dwkJckg1LDIwKHJIUCkKKwlhZGQJCXJINixySDYsclc2CisJc3R3CQlySDYsMjQockhQKQorCWFkZAkJckg3LHJINyxyVzcKKwlzdHcJCXJINywyOChySF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wb3dlcm52X2VlaF9yZXNldCwKLQkud2FpdF9zdGF0ZSAgICAgICAgICAgICA9IHBvd2VybnZfZWVoX3dhaXRfc3RhdGUsCi0JLmdldF9sb2cgICAgICAgICAgICAgICAgPSBwb3dlcm52X2VlaF9nZXRfbG9nLAotCS5jb25maWd1cmVfYnJpZGdlICAgICAgID0gcG93ZXJudl9lZWhfY29uZmlndXJlX2JyaWRnZSwKLQkuZXJyX2luamVjdAkJPSBwb3dlcm52X2VlaF9lcnJfaW5qZWN0LAotCS5yZWFkX2NvbmZpZyAgICAgICAgICAgID0gcG93ZXJudl9lZWhfcmVhZF9jb25maWcsCi0JLndyaXRlX2NvbmZpZyAgICAgICAgICAgPSBwb3dlcm52X2VlaF93cml0ZV9jb25maWcsCi0JLm5leHRfZXJyb3IJCT0gcG93ZXJudl9lZWhfbmV4dF9lcnJvciwKLQkucmVzdG9yZV9jb25maWcJCT0gcG93ZXJudl9lZWhfcmVzdG9yZV9jb25maWcKKwkuaW5pdCAgICAgICAgICAgICAgICAgICA9IHBudl9lZWhfaW5pdCwKKwkucG9zdF9pbml0ICAgICAgICAgICAgICA9IHBudl9lZWhfcG9zdF9pbml0LAorCS5wcm9iZQkJCT0gcG52X2VlaF9wcm9iZSwKKwkuc2V0X29wdGlvbiAgICAgICAgICAgICA9IHBudl9lZWhfc2V0X29wdGlvbiwKKwkuZ2V0X3BlX2FkZHIgICAgICAgICAgICA9IHBudl9lZWhfZ2V0X3BlX2FkZHIsCisJLmdldF9zdGF0ZSAgICAgICAgICAgICAgPSBwbnZfZWVoX2dldF9zdGF0ZSwKKwkucmVzZXQgICAgICAgICAgICAgICAgICA9IHBudl9lZWhfcmVzZXQsCisJLndhaXRfc3RhdGUgICAgICAgICAgICAgPSBwbnZfZWVoX3dhaXRfc3RhdGUsCisJLmdldF9sb2cgICAgICAgICAgICAgICAgPSBwbnZfZWVoX2dldF9sb2csCisJLmNvbmZpZ3VyZV9icmlkZ2UgICAgICAgPSBwbnZfZWVoX2N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G9jKTsKKwkJCXBkbi0+bTY0X3dpbnNbaV1bal0gPSBJT0RBX0lOVkFMSURfTTY0OworCQl9CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBwbnZfcGNpX3ZmX2Fzc2lnbl9tNjQoc3RydWN0IHBjaV9kZXYgKnBkZXYsIHUxNiBudW1fdmZzKQoreworCXN0cnVjdCBwY2lfYnVzICAgICAgICAqYnVzOworCXN0cnVjdCBwY2lfY29udHJvbGxlciAqaG9zZTsKKwlzdHJ1Y3QgcG52X3BoYiAgICAgICAgKnBoYjsKKwlzdHJ1Y3QgcGNpX2RuICAgICAgICAgKnBkbjsKKwl1bnNpZ25lZCBpbnQgICAgICAgICAgIHdpbjsKKwlzdHJ1Y3QgcmVzb3VyY2UgICAgICAgKnJlczsKKwlpbnQgICAgICAgICAgICAgICAgICAgIGksIGo7CisJaW50NjRfdCAgICAgICAgICAgICAgICByYzsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHRvdGFsX3ZmczsKKwlyZXNvdXJjZV9zaXplX3QgICAgICAgIHNpemUsIHN0YXJ0OworCWludCAgICAgICAgICAgICAgICAgICAgcGVfbnVtOworCWludCAgICAgICAgICAgICAgICAgICAgdmZfZ3JvdXBzOworCWludCAgICAgICAgICAgICAgICAgICAgdmZfcGVyX2dyb3VwOworCisJYnVzID0gcGRldi0+YnVzOworCWhvc2UgPSBwY2lfYnVzX3RvX2hvc3QoYnVzKTsKKwlwaGIgPSBob3NlLT5wcml2YXRlX2RhdGE7CisJcGRuID0gcGNpX2dldF9wZG4ocGRldik7CisJdG90YWxfdmZzID0gcGNpX3NyaW92X2dldF90b3RhbHZmcyhwZGV2KTsKKworCS8qIEluaXRpYWxpemUgdGhlIG02NF93aW5zIHRvIElPREFfSU5WQUxJRF9NNjQgKi8KKwlmb3IgKGkgPSAwOyBpIDwgUENJX1NSSU9WX05VTV9CQVJTOyBpKyspCisJCWZvciAoaiA9IDA7IGogPCBNNjRfUEVSX0lPVjsgaisrKQorCQ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fRlBJTlRfUk9VTkRfUyhYKQlfRlBfVE9fRlBJTlRfUk9VTkQoUywxLFgpCi0jZGVmaW5lIEZQX1RPX0ZQSU5UX1JPVU5EX0QoWCkJX0ZQX1RPX0ZQSU5UX1JPVU5EKEQsMixYKQotI2RlZmluZSBGUF9UT19GUElOVF9ST1VORF9RKFgpCV9GUF9UT19GUElOVF9ST1VORChRLDQsWCkKLQotdHlwZWRlZiB1bmlvbiB7Ci0gICAgICAgIGxvbmcgZG91YmxlIGxkOwotICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgICAgIF9fdTY0IGhpZ2g7Ci0gICAgICAgICAgICAgICAgX191NjQgbG93OwotICAgICAgICB9IHc7Ci19IG1hdGhlbXVfbGRjdjsKLQotI2lmZGVmIENPTkZJR19TWVNDVEwKLWludCBzeXNjdGxfaWVlZV9lbXVsYXRpb25fd2FybmluZ3M9MTsKLSNlbmRpZgotCi0jZGVmaW5lIG1hdGhlbXVfcHV0X3VzZXIoeCwgcCkgXAotICAgICAgICBkbyB7IFwKLSAgICAgICAgICAgICAgICBpZiAocHV0X3VzZXIoKHgpLChwKSkpIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCi0gICAgICAgIH0gd2hpbGUgKDApCi0KLSNkZWZpbmUgbWF0aGVtdV9nZXRfdXNlcih4LCBwKSBcCi0gICAgICAgIGRvIHsgXAotICAgICAgICAgICAgICAgIGlmIChnZXRfdXNlcigoeCksKHApKSkgXAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNJR1NFR1Y7IFwKLSAgICAgICAgfSB3aGlsZSAoMCkKLQotI2RlZmluZSBtYXRoZW11X2NvcHlfZnJvbV91c2VyKGQsIHMsIG4pXAotICAgICAgICBkbyB7IFwKLSAgICAgICAgICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoKGQpLChzKSwobikpICE9IDApIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCi0gICAgICAgIH0gd2hpbGUgKDApCi0KLSNkZWZpbmUgbWF0aGVtdV9jb3B5X3RvX3VzZXIoZCwgcywgbikgXAotICAgICAgICBkbyB7IFwKLSAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKChkKSwocyksKG4pKSAhPSAwKSBcCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU0lHU0VHVjsgXAotICAgICAgICB9IHdoaWxlICgwKQotCi1zdGF0aWMgdm9pZCBkaXNwbGF5X2VtdWxhdGlvbl9ub3RfaW1wbGVtZW50ZWQoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGNoYXIgKmluc3RyKQotewotICAgICAgICBfX3UxNiAqbG9jYXRpb247Ci0gICAgICAgIAotI2lmZGVmIENPTkZJR19TWVNDVEwKLSAgICAgICAgaWYoc3lzY3RsX2llZWVfZW11bGF0aW9uX3dhcm5pbmdzKQotI2VuZGlmCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBsb2NhdGlvbiA9IChfX3UxNiAqKShyZWdzLT5wc3cuYWRkci1TMzkwX2xvd2NvcmUucGdtX2lsYyk7Ci0gICAgICAgICAgICAgICAgcHJpbnRrKCIlcyBpZWVlIGZwdSBpbnN0cnVjdGlvbiBub3QgZW11bGF0ZWQgIgotICAgICAgICAgICAgICAgICAgICAgICAicHJvY2VzcyBuYW1lOiAlcyBwaWQ6ICVkIFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgaW5zdHIsIGN1cnJlbnQtPmNvbW0sIGN1cnJlbnQtPnBpZCk7Ci0gICAgICAgICAgICAgICAgcHJpbnRrKCIlcydzIFBTVzogICAgJTA4bHggJTA4bHhcbiIsIGluc3RyLAotICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgcmVncy0+cHN3Lm1hc2ssCi0gICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSBsb2NhdGlvbik7Ci0gICAgICAgIH0KLX0KLQotc3RhdGlj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ICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgcmV0dXJuIDA7Ci19Ci0KLS8qIENvbXBhcmUgZG91YmxlICovCi1zdGF0aWMgaW50IGVtdV9jZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICByZXR1cm4gMDsKLX0KLQotLyogQ29tcGFyZSBkb3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2NkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKLSAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgcmV0dXJuIDA7Ci19Ci0KLS8qIENvbXBhcmUgZmxvYXQgKi8KLXN0YXRpYyBpbnQgZW11X2NlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgewotICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmYpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX1NQKFNCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZik7Ci0gICAgICAgIEZQX0NNUF9TKElSLCBTQSwgU0IsIDMpOwotICAgICAgICAvKgotICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAotICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAotICAgICAgICAgKi8KLSAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7Ci0gICAgICAgIHJldHVybiAwOwotfQotCi0vKiBDb21wYXJlIGZsb2F0ICovCi1zdGF0aWMgaW50IG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AgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS51aTsKLSAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeSsyXS51aTsKLSAgICAgICAgRlBfVU5QQUNLX1FQKFFCLCAmY3Z0LmxkKTsKLSAgICAgICAgRlBfQ01QX1EoSVIsIFFBLCBRQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgaWYgKElSID09IDMpCi0gICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7Ci0gICAgICAgIHJldHVybiBfZmV4OwotfQotCi0vKiBDb21wYXJlIGFuZCBzaWduYWwgZG91YmxlICovCi1zdGF0aWMgaW50IGVtdV9rZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgRlBfREVDTF9FWDsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICBpZiAoSVIgPT0gMykKLSAgICAgICAgICAgICAgICBGUF9TRVRfRVhDRVBUSU9OIChGUF9FWF9JTlZBTElEKTsKLSAgICAgICAgcmV0dXJuIF9mZXg7Ci19Ci0KLS8qIENvbXBhcmUgYW5kIHNpZ25hbCBkb3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2tkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgRlBfREVDTF9FWDsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKLSAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgaWYgKElSID09IDMpCi0gICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRV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ICAgICAgICAgIFsweDA2XSA9IGVtdV9seGVicixbMHgwN10gPSBlbXVfbXhkYnIsWzB4MDhdID0gZW11X2tlYnIsCi0gICAgICAgICAgICAgICAgWzB4MDldID0gZW11X2NlYnIsIFsweDBhXSA9IGVtdV9hZWJyLCBbMHgwYl0gPSBlbXVfc2ViciwKLSAgICAgICAgICAgICAgICBbMHgwY10gPSBlbXVfbWRlYnIsWzB4MGRdID0gZW11X2RlYnIsIFsweDBlXSA9IGVtdV9tYWViciwKLSAgICAgICAgICAgICAgICBbMHgwZl0gPSBlbXVfbXNlYnIsWzB4MTBdID0gZW11X2xwZGJyLFsweDExXSA9IGVtdV9sbmRiciwgCi0gICAgICAgICAgICAgICAgWzB4MTJdID0gZW11X2x0ZGJyLFsweDEzXSA9IGVtdV9sY2RicixbMHgxNF0gPSBlbXVfc3FlYnIsCi0gICAgICAgICAgICAgICAgWzB4MTVdID0gZW11X3NxZGJyLFsweDE2XSA9IGVtdV9zcXhicixbMHgxN10gPSBlbXVfbWVlYnIsCi0gICAgICAgICAgICAgICAgWzB4MThdID0gZW11X2tkYnIsIFsweDE5XSA9IGVtdV9jZGJyLCBbMHgxYV0gPSBlbXVfYWRiciwKLSAgICAgICAgICAgICAgICBbMHgxYl0gPSBlbXVfc2RiciwgWzB4MWNdID0gZW11X21kYnIsIFsweDFkXSA9IGVtdV9kZGJyLCAgCi0gICAgICAgICAgICAgICAgWzB4MWVdID0gZW11X21hZGJyLFsweDFmXSA9IGVtdV9tc2RicixbMHg0MF0gPSBlbXVfbHB4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDFdID0gZW11X2xueGJyLFsweDQyXSA9IGVtdV9sdHhicixbMHg0M10gPSBlbXVfbGN4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDRdID0gZW11X2xlZGJyLFsweDQ1XSA9IGVtdV9sZHhicixbMHg0Nl0gPSBlbXVfbGV4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDddID0gZW11X2ZpeGJyLFsweDQ4XSA9IGVtdV9reGJyLCBbMHg0OV0gPSBlbXVfY3hiciwgIAotICAgICAgICAgICAgICAgIFsweDRhXSA9IGVtdV9heGJyLCBbMHg0Yl0gPSBlbXVfc3hiciwgWzB4NGNdID0gZW11X214YnIsCi0gICAgICAgICAgICAgICAgWzB4NGRdID0gZW11X2R4YnIsIFsweDUzXSA9IGVtdV9kaWVicixbMHg1N10gPSBlbXVfZmllYnIsCi0gICAgICAgICAgICAgICAgWzB4NWJdID0gZW11X2RpZGJyLFsweDVmXSA9IGVtdV9maWRicixbMHg4NF0gPSBlbXVfc2ZwYywKLSAgICAgICAgICAgICAgICBbMHg4Y10gPSBlbXVfZWZwYywgWzB4OTRdID0gZW11X2NlZmJyLFsweDk1XSA9IGVtdV9jZGZiciwgCi0gICAgICAgICAgICAgICAgWzB4OTZdID0gZW11X2N4ZmJyLFsweDk4XSA9IGVtdV9jZmVicixbMHg5OV0gPSBlbXVfY2ZkYnIsCi0gICAgICAgICAgICAgICAgWzB4OWFdID0gZW11X2NmeGJyCi0gICAgICAgIH07Ci0KLSAgICAgICAgc3dpdGNoIChmb3JtYXRfdGFibGVbb3Bjb2RlWzFdXSkgewotICAgICAgICBjYXNlIDE6IC8qIFJSRSBmb3JtYXQsIGxvbmcgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAweDIyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMjogLyogUlJFIGZvcm1hdCwgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgI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E1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgNTogLyogUlJGIGZvcm1hdCwgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMl0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZ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ogLyogUlJFIGZvcm1hdCwgY3hmYnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMCkKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA4OiAvKiBSUkUgZm9ybWF0LCBjZGZiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA5OiAvKiBSUkUgZm9ybWF0LCBjZWZiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSAxMDogLyogUlJGIGZvcm1hdCwgY2Z4YnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsyXSAmIDEyOCkgPT0gMTI4IHx8IChvcGNvZGVbMl0gJiA5NikgPT0gMzIpCi0JCQkvKiBtYXNrIG9mIHsgMiwzLDgtMTUgfSBpcyBpbnZhbGlkICovCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDExOiAvKiBSUkYgZm9ybWF0LCBjZmRiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmICgob3Bjb2RlWzJdICYgMTI4KSA9PSAxMjggfHwgKG9wY29kZVsyXSAmIDk2KSA9PSAzMikKLQkJCS8qIG1hc2sgb2YgeyAyLDMsOC0xNSB9IGlzIGludmFsaWQgKi8KLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDEyOiAvKiBSUkYgZm9ybWF0LCBjZmViciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmICgob3Bjb2RlWzJdICYgMTI4KSA9PSAxMjggfHwgKG9wY29kZVsyXSAmIDk2KSA9PSAzMikKLQkJCS8qIG1hc2sgb2YgeyAyLDMsOC0xNSB9IGlzIGludmFsaWQgKi8KLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Uob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDEzOiAvKiBSUkUgZm9ybWF0LCBsZHhiciAmIG1keGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZG91YmxlIHN0b3JlIGJ1dCBsb25nIGRvdWJsZSBsb2FkICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDB4MjApCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICAmIDE1KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDE0OiAvKiBSUkUgZm9ybWF0LCBsZHhiciAmIG1keGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZmxvYXQgc3RvcmUgYnV0IGxvbmcgZG91YmxlIGxvYWQgKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMCkKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZShvcGNvZGVbM10gICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMTU6IC8qIFJSRSBmb3JtYXQsIGxkZWJyICYgbWRlYnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICAvKiBmbG9hdCBzdG9yZSBidXQgZG91YmxlIGxvYWQgKi8KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAgJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDE2OiAvKiBSUkUgZm9ybWF0LCBsZHhiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGxvbmcgZG91YmxlIHN0b3JlIGJ1dCBkb3VibGUgbG9hZCAqLwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDE3OiAvKiBSUkUgZm9ybWF0LCBsZHhiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGxvbmcgZG91YmxlIHN0b3JlIGJ1dCBmbG9hdCBsb2FkICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTg6IC8qIFJSRSBmb3JtYXQsIGxlZGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZG91YmxlIHN0b3JlIGJ1dCBmbG9hdCBsb2FkICovCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDE5OiAvKiBSUkUgZm9ybWF0LCBlZnBjICYgc2ZwYyBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8qIGludmFsaWQgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgfQotCWlmIChfZmV4ICE9IDApIHsKLQkJY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjIHw9IF9mZXg7Ci0JCWlmIChjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAoX2ZleCA8PCA4KSkKLQkJCXJldHVybiBTSUdGUEU7Ci0JfQotCXJldHVybiAwOwotfQotCi1zdGF0aWMgdm9pZCogY2FsY19hZGRyKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByYiwgaW50IGRpc3ApCi17Ci0gICAgICAgIGFkZHJfdCBhZGRyOwotCi0gICAgICAgIHJ4ICY9IDE1OwotICAgICAgICByYiAmPSAxNTsKLSAgICAgICAgYWRkciA9IGRpc3AgJiAweGZmZjsKLSAgICAgICAgYWRkciArPSAocnggIT0gMCkgPyByZWdzLT5ncHJzW3J4XSA6IDA7ICAvKiArIGluZGV4ICovCi0gICAgICAgIGFkZHIgKz0gKHJiICE9IDApID8gcmVncy0+Z3Byc1tyYl0gOiAwOyAgLyogKyBiYXNlICAqLwotICAgICAgICByZXR1cm4gKHZvaWQqKSBhZGRyOwotfQotICAgIAotaW50IG1hdGhfZW11X2VkKF9fdTggKm9wY29kZSwgc3RydWN0IHB0X3JlZ3MgKiByZWdzKSB7Ci0gICAgICAgIGludCBfZmV4ID0gMDsKLQotICAgICAgICBzdGF0aWMgY29uc3QgX191OCBmb3JtYXRfdGFibGVbMjU2XSA9IHsKLSAgICAgICAgICAgICAgICBbMHgwNF0gPSAweDA2LFsweDA1XSA9IDB4MDUsWzB4MDZdID0gMHgwNyxbMHgwN10gPSAweDA1LAotCQlbMHgwOF0gPSAweDAyLFsweDA5XSA9IDB4MDIsWzB4MGFdID0gMHgwMixbMHgwYl0gPSAweDAyLAotCQlbMHgwY10gPSAweDA2LFsweDBkXSA9IDB4MDIsWzB4MGVdID0gMHgwNCxbMHgwZl0gPSAweDA0LAotICAgICAgICAgICAgICAgIFsweDEwXSA9IDB4MDgsWzB4MTFdID0gMHgwOSxbMHgxMl0gPSAweDBhLFsweDE0XSA9IDB4MDIsCi0JCVsweDE1XSA9IDB4MDEsWzB4MTddID0gMHgwMixbMHgxOF0gPSAweDAxLFsweDE5XSA9IDB4MDEsCi0JCVsweDFhXSA9IDB4MDEsWzB4MWJdID0gMHgwMSxbMHgxY10gPSAweDAxLFsweDFkXSA9IDB4MDEsCi0gICAgICAgICAgICAgICAgWzB4MWVdID0gMHgwMyxbMHgxZl0gPSAweDAzLAotICAgICAgICB9OwotICAgICAgICBzdGF0aWMgY29uc3Qgdm9pZCAqanVtcF90YWJsZVtdPSB7Ci0gICAgICAgICAgICAgICAgWzB4MDRdID0gZW11X2xkZWIsWzB4MDVdID0gZW11X2x4ZGIsWzB4MDZdID0gZW11X2x4ZWIsCi0gICAgICAgICAgICAgICAgWzB4MDddID0gZW11X214ZGIsWzB4MDhdID0gZW11X2tlYiwgWzB4MDldID0gZW11X2NlYiwKLSAgICAgICAgICAgICAgICBbMHgwYV0gPSBlbXVfYWViLCBbMHgwYl0gPSBlbXVfc2ViLCBbMHgwY10gPSBlbXVfbWRlYiwKLSAgICAgICAgICAgICAgICBbMHgwZF0gPSBlbXVfZGViLCBbMHgwZV0gPSBlbXVfbWFlYixbMHgwZl0gPSBlbXVfbXNlYiwKLSAgICAgICAgICAgICAgICB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SAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgMjogLyogUlhFIGZvcm1hdCwgZmxvYXQgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTMyICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSAzOiAvKiBSWEYgZm9ybWF0LCBkb3VibGUgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0ICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzRdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0ICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2NvcHlfZnJvbV91c2VyKCZ0ZW1wLCBkeGIsIDgpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBkb3VibGUgKiwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCwgb3Bjb2RlWzRdID4+IDQpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDQ6IC8qIFJYRiBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovIHsKLSAgICAgICAgICAgICAgICBfX3UzMiAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLQotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVs0XSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqLCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXAsIG9wY29kZVs0XSA+PiA0KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbNF0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA1OiAvKiBSWEUgZm9ybWF0LCBkb3VibGUgY29uc3RhbnQgKi8KLSAgICAgICAgICAgICAgICAvKiBzdG9yZSBkb3VibGUgYW5kIGxvYWQgbG9uZyBkb3VibGUgKi8gCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBfX3U2NCAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsxXSA+PiA0KSAmIDB4MjApCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIG1hdGhlbXVfY29weV9mcm9tX3VzZXIoJnRlbXAsIGR4YiwgOCk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGRvdWJsZSAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbMV0gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDY6IC8qIFJYRSBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovCi0gICAgICAgICAgICAgICAgLyogc3RvcmUgZmxvYXQgYW5kIGxvYWQgZG91YmxlICovIAotICAgICAgICB7Ci0gICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA3OiAvKiBSWEUgZm9ybWF0LCBmbG9hdCBjb25zdGFudCAqLwotICAgICAgICAgICAgICAgIC8qIHN0b3JlIGZsb2F0IGFuZCBsb2FkIGxvbmcgZG91YmxlICovIAotICAgICAgICB7Ci0gICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0gICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMV0gPj4gNCkgJiAweDIwKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTMyICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2dldF91c2VyKHRlbXAsIGR4Yik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGZsb2F0ICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXApOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzFdID4+IDQpICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA4OiAvKiBSWEUgZm9ybWF0LCBSWCBhZGRyZXNzIHVzZWQgYXMgaW50IHZhbHVlICovIHsKLSAgICAgICAgICAgICAgICBfX3U2NCBkeGI7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCkgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBsb25nKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgZHhiKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDk6IC8qIFJYRSBmb3JtYXQsIFJYIGFkZHJlc3MgdXNlZCBhcyBpbnQgdmFsdWUgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0IGR4YjsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0KSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGxvbmcpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCBkeGIpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgMTA6IC8qIFJYRSBmb3JtYXQsIFJYIGFkZHJlc3MgdXNlZCBhcyBpbnQgdmFsdWUgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0IGR4YjsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsxXSA+PiA0KSAmIDIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci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IEtTVEtfVE9QKGluZm8pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgIHVuc2lnbmVkIGxvbmcgKl9fcHRyID0gKHVuc2lnbmVkIGxvbmcgKikoaW5mbyk7ICAgICAgICAgICAgICAgICBcCi0gICAgICAgKHVuc2lnbmVkIGxvbmcpKCZfX3B0cltUSFJFQURfU0laRV9MT05HU10pOyAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KIC8qCi0gKiBUaGUgYmVsb3cgLTggaXMgdG8gcmVzZXJ2ZSA4IGJ5dGVzIG9uIHRvcCBvZiB0aGUgcmluZzAgc3RhY2suCisgKiBUT1BfT0ZfS0VSTkVMX1NUQUNLX1BBRERJTkcgcmVzZXJ2ZXMgOCBieXRlcyBvbiB0b3Agb2YgdGhlIHJpbmcwIHN0YWNrLgogICogVGhpcyBpcyBuZWNlc3NhcnkgdG8gZ3VhcmFudGVlIHRoYXQgdGhlIGVudGlyZSAic3RydWN0IHB0X3JlZ3MiCiAgKiBpcyBhY2Nlc3NpYmxlIGV2ZW4gaWYgdGhlIENQVSBoYXZlbid0IHN0b3JlZCB0aGUgU1MvRVNQIHJlZ2lzdGVycwogICogb24gdGhlIHN0YWNrIChpbnRlcnJ1cHQgZ2F0ZSBkb2VzIG5vdCBzYXZlIHRoZXNlIHJlZ2lzdGVycwpAQCAtODUwLDExICs4NTksMTEgQEAKICAqICJzdHJ1Y3QgcHRfcmVncyIgaXMgcG9zc2libGUsIGJ1dCB0aGV5IG1heSBjb250YWluIHRoZQogICogY29tcGxldGVseSB3cm9uZyB2YWx1ZXMuCiAgKi8KLSNkZWZpbmUgdGFza19wdF9yZWdzKHRhc2spICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgc3RydWN0IHB0X3JlZ3MgKl9fcmVnc19fOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICBfX3JlZ3NfXyA9IChzdHJ1Y3QgcHRfcmVncyAqKShLU1RLX1RPUCh0YXNrX3N0YWNrX3BhZ2UodGFzaykpLTgpOyBcCi0gICAgICAgX19yZWdzX18gLSAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyNkZWZpbmUgdGFza19wdF9yZWdzKHRhc2spIFwKKyh7CQkJCQkJCQkJXAorCXVuc2lnbmVkIGxvbmcgX19wdHIgPSAodW5zaWduZWQgbG9uZyl0YXNrX3N0YWNrX3BhZ2UodGFzayk7CVwKKwlfX3B0ciArPSBUSFJFQURfU0laRSAtIFRPUF9PRl9LRVJORUxfU1RBQ0tfUEFERElORzsJCVwKKwkoKHN0cnVjdCBwdF9yZWdzICopX19wdHIpIC0gMTsJCQkJCVwKIH0pCiAKICNkZWZpbmUgS1NUS19FU1AodGFzaykJCSh0YXNrX3B0X3JlZ3ModGFzayktPnNwKQpAQCAtODg2LDExICs4OTUsNyBAQAogI2RlZmluZSBTVEFDS19UT1BfTUFYCQlUQVNLX1NJWkVfTUFYCiAKICNkZWZpbmUgSU5JVF9USFJFQUQgIHsgXAotCS5zcDAgPSAodW5zaWduZWQgbG9uZykmaW5pdF9zdGFjayArIHNpemVvZihpbml0X3N0YWNrKSBcCi19Ci0KLSNkZWZpbmUgSU5JVF9UU1MgIHsgXAotCS54ODZfdHNzLnNwMCA9ICh1bnNpZ25lZCBsb25nKSZpbml0X3N0YWNrICsgc2l6ZW9mKGluaXRfc3RhY2spIFwKKwkuc3AwID0gVE9QX09GX0lOSVRfU1RBQ0sgXAogfQogCiAvKgpAQCAtOTAyLDExICs5MDcsNiBAQAogI2RlZmluZSB0Y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pIHx8IGRlZmluZWQoQUNQSV9ERUJVR0dFUikKKy8qCisgKiBBbGwgZnVuY3Rpb25zIGluIHRoaXMgbW9kdWxlIGFyZSB1c2VkIGJ5IHRoZSBBTUwgRGVidWdnZXIgb25seQorICovCisjaWYgZGVmaW5lZChBQ1BJX0RFQlVHR0VSKQogLyogTG9jYWwgcHJvdG90eXBlcyAqLwogc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfc3RyaW5nKGNoYXIgKnRpdGxlLCBjaGFyICp2YWx1ZSk7CiAKQEAgLTgwLDYgKzgzLDExNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXBfcmVzb3VyY2VfbGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICByZXNvdXJjZV9saXN0ICAgICAgIC0gUG9pbnRlciB0byBhIHJlc291cmNlIGRlc2NyaXB0b3IgbGlzdAorICoKKyAqIFJFVFVSTjogICAgICBOb25lCisgKgorICogREVTQ1JJUFRJT046IERpc3BhdGNoZXMgdGhlIHN0cnVjdHVyZSB0byB0aGUgY29ycmVjdCBkdW1wIHJvdXRpbmUuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBhY3BpX3JzX2R1bXBfcmVzb3VyY2VfbGlzdChzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqcmVzb3VyY2VfbGlzdCkKK3sKKwl1MzIgY291bnQgPSAwOworCXUzMiB0eXBlOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KKworCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTL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0YS4KKwkJCQkJCSBjb21tb25fc2VyaWFsX2J1cy50eXBlXSk7CisJCX0gZWxzZSB7CisJCQlhY3BpX3JzX2R1bXBfZGVzY3JpcHRvcigmcmVzb3VyY2VfbGlzdC0+ZGF0YSwKKwkJCQkJCWFjcGlfZ2JsX2R1bXBfcmVzb3VyY2VfZGlzcGF0Y2gKKwkJCQkJCVt0eXBlXSk7CisJCX0KKworCQkvKiBQb2ludCB0byB0aGUgbmV4dCByZXNvdXJjZSBzdHJ1Y3R1cmUgKi8KKworCQlyZXNvdXJjZV9saXN0ID0gQUNQSV9ORVhUX1JFU09VUkNFKHJlc291cmNlX2xpc3QpOworCisJCS8qIEV4aXQgd2hlbiBFTkRfVEFHIGRlc2NyaXB0b3IgaXMgcmVhY2hlZCAqLworCisJfSB3aGlsZSAodHlwZSAhPSBBQ1BJX1JFU09VUkNFX1RZUEVfRU5EX1RBRyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9pcnFfbGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICByb3V0ZV90YWJsZSAgICAgLSBQb2ludGVyIHRvIHRoZSByb3V0aW5nIHRhYmxlIHRvIGR1bXAuCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogUHJpbnQgSVJRIHJvdXRpbmcgdGFibGUKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkIGFjcGlfcnNfZHVtcF9pcnFfbGlzdCh1OCAqcm91dGVfdGFibGUpCit7CisJc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUgKnBydF9lbGVtZW50OworCXU4IGNvdW50OworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KKworCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTLCBfQ09NUE9ORU5UKSkgeworCQlyZXR1cm47CisJfQorCisJcHJ0X2VsZW1lbnQgPSBBQ1BJX0NBU1RfUFRSKHN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlLCByb3V0ZV90YWJsZSk7CisKKwkvKiBEdW1wIGFsbCB0YWJsZSBlbGVtZW50cywgRXhpdCBvbiB6ZXJvIGxlbmd0aCBlbGVtZW50ICovCisKKwlmb3IgKGNvdW50ID0gMDsgcHJ0X2VsZW1lbnQtPmxlbmd0aDsgY291bnQrKykgeworCQlhY3BpX29zX3ByaW50ZigiXG5bJTAyWF0gUENJIElSUSBSb3V0aW5nIFRhYmxlIFBhY2thZ2VcbiIsCisJCQkgICAgICAgY291bnQpOworCQlhY3BpX3JzX2R1bXBfZGVzY3JpcHRvcihwcnRfZWxlbWVudCwgYWNwaV9yc19kdW1wX3BydCk7CisKKwkJcHJ0X2VsZW1lbnQgPSBBQ1BJX0FERF9QVFIoc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUsCisJCQkJCSAgIHBydF9lbGVtZW50LCBwcnRfZWxlbWVudC0+bGVuZ3RoKTsKKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9kZXNjcmlwdG9yCiAgKgogICogUEFSQU1FVEVSUzogIHJlc291cmNlICAgICAgICAgICAgLSBCdWZmZXIgY29udGFpbmluZyB0aGUgcmVzb3VyY2UKQEAgLTM1NywxMTYgKzQ3MCw2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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WFRfUkVTT1VSQ0UocmVzb3VyY2VfbGlzdCk7Ci0KLQkJLyogRXhpdCB3aGVuIEVORF9UQUcgZGVzY3JpcHRvciBpcyByZWFjaGVkICovCi0KLQl9IHdoaWxlICh0eXBlICE9IEFDUElfUkVTT1VSQ0VfVFlQRV9FTkRfVEFHKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX2lycV9saXN0Ci0gKgotICogUEFSQU1FVEVSUzogIHJvdXRlX3RhYmxlICAgICAtIFBvaW50ZXIgdG8gdGhlIHJvdXRpbmcgdGFibGUgdG8gZHVtcC4KLSAqCi0gKiBSRVRVUk46ICAgICAgTm9uZQotICoKLSAqIERFU0NSSVBUSU9OOiBQcmludCBJUlEgcm91dGluZyB0YWJsZQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXZvaWQgYWNwaV9yc19kdW1wX2lycV9saXN0KHU4ICogcm91dGVfdGFibGUpCi17Ci0Jc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUgKnBydF9lbGVtZW50OwotCXU4IGNvdW50OwotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSgpOwotCi0JLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KLQotCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTLCBfQ09NUE9ORU5UKSkgewotCQlyZXR1cm47Ci0JfQotCi0JcHJ0X2VsZW1lbnQgPSBBQ1BJX0NBU1RfUFRSKHN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlLCByb3V0ZV90YWJsZSk7Ci0KLQkvKiBEdW1wIGFsbCB0YWJs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cGlfbmFtZSh0YWJsZV9kZXNjLT4KIAkJCQkJCQkJc2lnbmF0dXJlLgogCQkJCQkJCQlhc2NpaSkgPwogCQkJCQl0YWJsZV9kZXNjLT5zaWduYXR1cmUuYXNjaWkgOiAiPz8/PyIsCi0JCQkJCUFDUElfRk9STUFUX1RPX1VJTlQodGFibGVfZGVzYy0+Ci0JCQkJCQkJICAgIGFkZHJlc3MpKSk7CisJCQkJCUFDUElfRk9STUFUX1VJTlQ2NCh0YWJsZV9kZXNjLT4KKwkJCQkJCQkgICBhZGRyZXNzKSkpOwogCQkJZ290byBpbnZhbGlkYXRlX2FuZF9leGl0OwogCQl9CiAJfQpAQCAtNDgzLDE5ICs0ODQsMjMgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfbmV4dF9yb290X2luZGV4CisgKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfbmV4dF90YWJsZV9kZXNjcmlwdG9yCiAgKgogICogUEFSQU1FVEVSUzogIHRhYmxlX2luZGV4ICAgICAgICAgLSBXaGVyZSB0YWJsZSBpbmRleCBpcyByZXR1cm5lZAorICogICAgICAgICAgICAgIHRhYmxlX2Rlc2MgICAgICAgICAgLSBXaGVyZSB0YWJsZSBkZXNjcmlwdG9yIGlzIHJldHVybmVkCiAgKgotICogUkVUVVJOOiAgICAgIFN0YXR1cyBhbmQgdGFibGUgaW5kZXguCisgKiBSRVRVUk46ICAgICAgU3RhdHVzIGFuZCB0YWJsZSBpbmRleC9kZXNjcmlwdG9yLgogICoKICAqIERFU0NSSVBUSU9OOiBBbGxvY2F0ZSBhIG5ldyBBQ1BJIHRhYmxlIGVudHJ5IHRvIHRoZSBnbG9iYWwgdGFibGUgbGlzdAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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PTjogICAgYWNwaV90Yl9zdG9yZV90YWJsZQotICoKLSAqIFBBUkFNRVRFUlM6ICBhZGRyZXNzICAgICAgICAgICAgIC0gVGFibGUgYWRkcmVzcwotICogICAgICAgICAgICAgIHRhYmxlICAgICAgICAgICAgICAgLSBUYWJsZSBoZWFkZXIKLSAqICAgICAgICAgICAgICBsZW5ndGggICAgICAgICAgICAgIC0gVGFibGUgbGVuZ3RoCi0gKiAgICAgICAgICAgICAgZmxhZ3MgICAgICAgICAgICAgICAtIEluc3RhbGwgZmxhZ3MKLSAqICAgICAgICAgICAgICB0YWJsZV9pbmRleCAgICAgICAgIC0gV2hlcmUgdGhlIHRhYmxlIGluZGV4IGlzIHJldHVybmVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cyBhbmQgdGFibGUgaW5kZXguCi0gKgotICogREVTQ1JJUFRJT046IEFkZCBhbiBBQ1BJIHRhYmxlIHRvIHRoZSBnbG9iYWwgdGFibGUgbGlzdAotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWFjcGlfc3RhdHVzCi1hY3BpX3RiX3N0b3JlX3RhYmxlKGFjcGlfcGh5c2ljYWxfYWRkcmVzcyBhZGRyZXNzLAotCQkgICAgc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyICogdGFibGUsCi0JCSAgICB1MzIgbGVuZ3RoLCB1OCBmbGFncywgdTMyICp0YWJsZV9pbmRleCkKLXsKLQlhY3BpX3N0YXR1cyBzdGF0dXM7Ci0Jc3RydWN0IGFjcGlfdGFibGVfZGVzYyAqdGFibGVfZGVzYzsKLQotCXN0YXR1cyA9IGFjcGlfdGJfZ2V0X25leHRfcm9vdF9pbmRleCh0YWJsZV9pbmRleCk7Ci0JaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7Ci0JCXJldHVybiAoc3RhdHVzKTsKLQl9Ci0KLQkvKiBJbml0aWF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CiAKIAkJZG8gewpkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dHN0YXRlLmMgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0c3RhdGUuYwppbmRleCA4Mjc0Y2MxLi5mMjAxMTcxIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0c3RhdGUuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0c3RhdGUuYwpAQCAtNDksMzkgKzQ5LDYgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoCi0gKgotICogUEFSQU1FVEVSUzogIG9iamVjdCAgICAgICAgICAtIE9iamVjdCB0byBiZSBhZGRlZCB0byB0aGUgbmV3IHN0YXRlCi0gKiAgICAgICAgICAgICAgYWN0aW9uICAgICAgICAgIC0gSW5jcmVtZW50L0RlY3JlbWVudAotICogICAgICAgICAgICAgIHN0YXRlX2xpc3QgICAgICAtIExpc3QgdGhlIHN0YXRlIHdpbGwgYmUgYWRkZWQgdG8KLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IENyZWF0ZSBhIG5ldyBzdGF0ZSBhbmQgcHVzaCBpdAotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1hY3BpX3N0YXR1cwotYWNwaV91dF9jcmVhdGVfcGtnX3N0YXRlX2FuZF9wdXNoKHZvaWQgKmludGVybmFsX29iamVjdCwKLQkJCQkgIHZvaWQgKmV4dGVybmFsX29iamVjdCwKLQkJCQkgIHUxNiBpbmRleCwKLQkJCQkgIHVuaW9uIGFjcGlfZ2VuZXJpY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ArMTUxLDM5IEBACiB9CiAjZW5kaWYgLyogQ09ORklHX0JDTUFfRFJJVkVSX1BDSV9IT1NUTU9ERSAqLwogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIGRyaXZlcl9taXBzLmMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmZGVmIENPTkZJR19CQ01BX0RSSVZFUl9NSVBTCit1bnNpZ25lZCBpbnQgYmNtYV9jb3JlX21pcHNfaXJxKHN0cnVjdCBiY21hX2RldmljZSAqZGV2KTsKK3ZvaWQgYmNtYV9jb3JlX21pcHNfZWFybHlfaW5pdChzdHJ1Y3QgYmNtYV9kcnZfbWlwcyAqbWNvcmUpOwordm9pZCBiY21hX2NvcmVfbWlwc19pbml0KHN0cnVjdCBiY21hX2Rydl9taXBzICptY29yZSk7CisjZWxzZQorc3RhdGljIGlubGluZSB1bnNpZ25lZCBpbnQgYmNtYV9jb3JlX21pcHNfaXJxKHN0cnVjdCBiY21hX2RldmljZSAqZGV2KQoreworCXJldHVybiAwOworfQorc3RhdGljIGlubGluZSB2b2lkIGJjbWFfY29yZV9taXBzX2Vhcmx5X2luaXQoc3RydWN0IGJjbWFfZHJ2X21pcHMgKm1jb3JlKQoreworfQorc3RhdGljIGlubGluZSB2b2lkIGJjbWFfY29yZV9taXBzX2luaXQoc3RydWN0IGJjbWFfZHJ2X21pcHMgKm1jb3JlKQoreworfQorI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogZHJpdmVyX2dtYWNfY21uLmMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmZGVmIENPTkZJR19CQ01BX0RSSVZFUl9HTUFDX0NNTgordm9pZCBiY21hX2NvcmVfZ21hY19jbW5faW5pdChzdHJ1Y3QgYmNtYV9kcnZf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2lvbjsKKwl1OCBmd192YXJpYW50OworCXU4IGZ3X3JldmlzaW9uOworCXU4IGZ3X2J1aWxkX251bTsKKwl1OCBmd19idWlsZF93dzsKKwl1OCBmd19idWlsZF95eTsKKwl1OCBmd19wYXRjaF9udW07Cit9IF9fcGFja2VkOworCitzdHJ1Y3QgaW50ZWxfYm9vdF9wYXJhbXMgeworCV9fdTggICAgIHN0YXR1czsKKwlfX3U4ICAgICBvdHBfZm9ybWF0OworCV9fdTggICAgIG90cF9jb250ZW50OworCV9fdTggICAgIG90cF9wYXRjaDsKKwlfX2xlMTYgICBkZXZfcmV2aWQ7CisJX191OCAgICAgc2VjdXJlX2Jvb3Q7CisJX191OCAgICAga2V5X2Zyb21faGRyOworCV9fdTggICAgIGtleV90eXBlOworCV9fdTggICAgIG90cF9sb2NrOworCV9fdTggICAgIGFwaV9sb2NrOworCV9fdTggICAgIGRlYnVnX2xvY2s7CisJYmRhZGRyX3Qgb3RwX2JkYWRkcjsKKwlfX3U4ICAgICBtaW5fZndfYnVpbGRfbm47CisJX191OCAgICAgbWluX2Z3X2J1aWxkX2N3OworCV9fdTggICAgIG1pbl9md19idWlsZF95eTsKKwlfX3U4ICAgICBsaW1pdGVkX2NjZTsKKwlfX3U4ICAgICB1bmxvY2tlZF9zdGF0ZTsKK30gX19wYWNrZWQ7CisKK3N0cnVjdCBpbnRlbF9ib290dXAgeworCV9fdTggICAgIHplcm87CisJX191OCAgICAgbnVtX2NtZHM7CisJX191OCAgICAgc291cmNlOworCV9fdTggICAgIHJlc2V0X3R5cGU7CisJX191OCAgICAgcmVzZXRfcmVhc29uOworCV9fdTggICAgIGRkY19zdGF0dXM7Cit9IF9fcGFja2VkOworCitzdHJ1Y3QgaW50ZWxfc2VjdXJlX3NlbmRfcmVzdWx0IHsKKwlfX3U4ICAgICByZXN1bHQ7CisJX19sZTE2ICAgb3Bjb2RlOworCV9fdTggICAgIHN0YXR1czsKK30gX19wYWNrZWQ7CisKKyNpZiBJU19FTkFCTEV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NvdXJjZSBpbmZvXG4iKTsKKwkJZXJyID0gaXJxOworCQlnb3RvIHJlc19lcnI7CisJfQorCisJZXJyID0gZGV2bV9yZXF1ZXN0X2lycShkZXYsIGlycSwgaW1nX2lycV9oYW5kbGVyLCAwLAorCQkJICAgICAgIGRldl9uYW1lKGRldiksIGhkZXYpOworCWlmIChlcnIpIHsKKwkJZGV2X2VycihkZXYsICJ1bmFibGUgdG8gcmVxdWVzdCBpcnFcbiIpOworCQlnb3RvIHJlc19lcnI7CisJfQorCWRldl9kYmcoZGV2LCAidXNpbmcgSVJRIGNoYW5uZWwgJWRcbiIsIGlycSk7CisKKwloZGV2LT5oYXNoX2NsayA9IGRldm1fY2xrX2dldCgmcGRldi0+ZGV2LCAiaGFzaCIpOworCWlmIChJU19FUlIoaGRldi0+aGFzaF9jbGspKSB7CisJCWRldl9lcnIoZGV2LCAiY2xvY2sgaW5pdGlhbGl6YXRpb24gZmFpbGVkLlxuIik7CisJCWVyciA9IFBUUl9FUlIoaGRldi0+aGFzaF9jbGspOworCQlnb3RvIHJlc19lcnI7CisJfQorCisJaGRldi0+c3lzX2NsayA9IGRldm1fY2xrX2dldCgmcGRldi0+ZGV2LCAic3lzIik7CisJaWYgKElTX0VSUihoZGV2LT5zeXNfY2xrKSkgeworCQlkZXZfZXJyKGRldiwgImNsb2NrIGluaXRpYWxpemF0aW9uIGZhaWxlZC5cbiIpOworCQllcnIgPSBQVFJfRVJSKGhkZXYtPnN5c19jbGspOworCQlnb3RvIHJlc19lcnI7CisJfQorCisJZXJyID0gY2xrX3ByZXBhcmVfZW5hYmxlKGhkZXYtPmhhc2hfY2xrKTsKKwlpZiAoZXJyKQorCQlnb3RvIHJlc19lcnI7CisKKwllcnIgPSBjbGtfcHJlcGFyZV9lbmFibGUoaGRldi0+c3lzX2Nsayk7CisJaWYgKGVycikKKwkJZ290byBjbGtfZXJyOworCisJZXJyID0gaW1nX2hhc2hfZG1hX2luaXQoaGRldik7CisJaWYgKGVycikKKwkJZ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TsKKworICAgIGlmIChJTl9JTlRFUlJVUFQpIHsKKyAgICAgICAgcmV0dXJuIGNyeXB0b19zaGFzaF91cGRhdGUoJmRjdHgtPmZhbGxiYWNrX2Rlc2MsIHNyYywgc3JjbGVuKTsKKyAgICB9IGVsc2UgeworICAgICAgICBpZiAoZGN0eC0+Ynl0ZXMpIHsKKyAgICAgICAgICAgIGlmIChkY3R4LT5ieXRlcyArIHNyY2xlbiA8IEdIQVNIX0RJR0VTVF9TSVpFKSB7CisgICAgICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciArIGRjdHgtPmJ5dGVzLCBzcmMsIHNyY2xlbik7CisgICAgICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgKz0gc3JjbGVuOworICAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICAgICAgfQorICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciArIGRjdHgtPmJ5dGVzLCBzcmMsCisgICAgICAgICAgICAgICAgICAgIEdIQVNIX0RJR0VTVF9TSVpFIC0gZGN0eC0+Ynl0ZXMpOworICAgICAgICAgICAgcGFnZWZhdWx0X2Rpc2FibGUoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfYWx0aXZlYygpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9mcCgpOworICAgICAgICAgICAgZ2NtX2doYXNoX3A4KGRjdHgtPnNoYXNoLCBjdHgtPmh0YWJsZSwgZGN0eC0+YnVmZmVyLAorICAgICAgICAgICAgICAgICAgICBHSEFTSF9ESUdFU1RfU0laRSk7CisgICAgICAgICAgICBwYWdlZmF1bHRfZW5hYmxlKCk7CisgICAgICAgICAgICBzcmMgKz0gR0hBU0hfRElHRVNUX1NJWkUgLSBkY3R4LT5ieXRlczsKKyAgICAgICAgICAgIHNyY2xlbiAtPSBHSEFTSF9ESUdFU1RfU0laRSAtIGRjdHgtPmJ5dGVzOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSAwOworICAgICAgICB9CisgICAgICAgIGxlbiA9IHNyY2xlbiAmIH4oR0hBU0hfRElHRVNUX1NJWkUgLSAxKTsKKyAgICAgICAgaWYgKGxlbikgeworICAgICAgICAgICAgcGFnZWZhdWx0X2Rpc2FibGUoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfYWx0aXZlYygpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9mcCgpOworICAgICAgICAgICAgZ2NtX2doYXNoX3A4KGRjdHgtPnNoYXNoLCBjdHgtPmh0YWJsZSwgc3JjLCBsZW4pOworICAgICAgICAgICAgcGFnZWZhdWx0X2VuYWJsZSgpOworICAgICAgICAgICAgc3JjICs9IGxlbjsKKyAgICAgICAgICAgIHNyY2xlbiAtPSBsZW47CisgICAgICAgIH0KKyAgICAgICAgaWYgKHNyY2xlbikgeworICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciwgc3JjLCBzcmNsZW4pOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSBzcmNsZW47CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorfQorCitzdGF0aWMgaW50IHA4X2doYXNoX2ZpbmFsKHN0cnVjdCBzaGFzaF9kZXNjICpkZXNjLCB1OCAqb3V0KQoreworICAgIGludCBpOworICAgIHN0cnVjdCBwOF9naGFzaF9jdHggKmN0eCA9IGNyeXB0b190Zm1fY3R4KGNyeXB0b19zaGFzaF90Zm0oZGVzYy0+dGZtKSk7CisgICAgc3RydWN0IHA4X2doYXNoX2Rlc2NfY3R4ICpkY3R4ID0gc2hhc2hfZGVzY19jdHgoZGVzYyk7CisKKyAgICBpZiAoSU5fSU5URVJSVVBUKSB7CisgICAgICAgIHJldHVybiBjcnlwdG9fc2hhc2hfZmluYWwoJmRjdHgtPmZhbGxiYWNrX2Rlc2MsIG91dCk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgaWYgKGRjdHgtPmJ5dGVzKSB7CisgICAgICAgICAgICBmb3IgKGkgPSBkY3R4LT5ieXRlczsgaSA8IEdIQVNIX0RJR0VTVF9TSVpFOyBpKyspCisgICAgICAgICAgICAgICAgZGN0eC0+YnVmZmVyW2ldID0gMDsKKyAgICAgICAgICAgIHBhZ2VmYXVsdF9kaXNhYmxlKCk7CisgICAgICAgICAgICBlbmFibGVfa2VybmVsX2FsdGl2ZWMoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfZnAoKTsKKyAgICAgICAgICAgIGdjbV9naGFzaF9wOChkY3R4LT5zaGFzaCwgY3R4LT5odGFibGUsIGRjdHgtPmJ1ZmZlciwKKyAgICAgICAgICAgICAgICAgICAgR0hBU0hfRElHRVNUX1NJWkUpOworICAgICAgICAgICAgcGFnZWZhdWx0X2VuYWJsZSgpOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSAwOworICAgICAgICB9CisgICAgICAgIG1lbWNweShvdXQsIGRjdHgtPnNoYXNoLCBHSEFTSF9ESUdFU1RfU0laRSk7CisgICAgICAgIHJldHVybiAwOworICAgIH0KK30KKworc3RydWN0IHNoYXNoX2FsZyBwOF9naGFzaF9hbGcgPSB7CisgICAgLmRpZ2VzdHNpemUgPSBHSEFTSF9ESUdFU1RfU0laRSwKKyAgICAuaW5pdCAgICAgICA9IHA4X2doYXNoX2luaXQsCisgICAgLnVwZGF0ZSAgICAgPSBwOF9naGFzaF91cGRhdGUsCisgICAgLmZpbmFsICAgICAgPSBwOF9naGFzaF9maW5hbCwKKyAgICAuc2V0a2V5ICAgICA9IHA4X2doYXNoX3NldGtleSwKKyAgICAuZGVzY3NpemUgICA9IHNpemVvZihzdHJ1Y3QgcDhfZ2hhc2hfZGVzY19jdHgpLAorICAgIC5iYXNlICAgICAgID0geworICAgICAgICAuY3JhX25hbWUgPSAiZ2hhc2giLAorICAgICAgICAuY3JhX2RyaXZlcl9uYW1lID0gInA4X2doYXNoIiwKKyAgICAgICAgLmNyYV9wcmlvcml0eSA9IDEwMDAsCisgICAgICAgI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5pdCh2b2lkKQoreworICAgIGludCByZXQgPSAwOworICAgIHN0cnVjdCBjcnlwdG9fYWxnICoqYWxnX2l0OworCisgICAgaWYgKCEoY3VyX2NwdV9zcGVjLT5jcHVfdXNlcl9mZWF0dXJlczIgJiBQUENfRkVBVFVSRTJfVkVDX0NSWVBUTykpCisgICAgICAgIHJldHVybiAtRU5PREVWOworCisgICAgZm9yIChhbGdfaXQgPSBhbGdzOyAqYWxnX2l0OyBhbGdfaXQrKykgeworICAgICAgICByZXQgPSBjcnlwdG9fcmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICBwcmludGsoS0VSTl9JTkZPICJjcnlwdG9fcmVnaXN0ZXJfYWxnICclcycgPSAlZFxuIiwKKyAgICAgICAgICAgICAgICAoKmFsZ19pdCktPmNyYV9uYW1lLCByZXQpOworICAgICAgICBpZiAocmV0KSB7CisgICAgICAgICAgICBmb3IgKGFsZ19pdC0tOyBhbGdfaXQgPj0gYWxnczsgYWxnX2l0LS0pCisgICAgICAgICAgICAgICAgY3J5cHRvX3VucmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHJldCkKKyAgICAgICAgcmV0dXJuIHJldDsKKworICAgIHJldCA9IGNyeXB0b19yZWdpc3Rlcl9zaGFzaCgmcDhfZ2hhc2hfYWxnKTsKKyAgICBpZiAocmV0KSB7CisgICAgICAgIGZvciAoYWxnX2l0ID0gYWxnczsgKmFsZ19pdDsgYWxnX2l0KyspCisgICAgICAgICAgICBjcnlwdG9fdW5yZWdpc3Rlcl9hbGcoKmFsZ19pdCk7CisgICAgfQorICAgIHJldHVybiByZXQ7Cit9CisKK3ZvaWQgX19leGl0IHA4X2V4aXQodm9pZCkKK3sKKyAgICBzdHJ1Y3QgY3J5cHRvX2FsZyAqKmFsZ19pdDsKKworICAgIGZvciAoYWxnX2l0ID0gYWxnczsgKmFsZ19pdDsgYWxnX2l0KyspIHs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ICAgICAgKi8KLQkweEExLCAweDAxLCAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAgICAgICAgICovCi0JMHg4NSwgMHgwNywgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDcpLCAgICAgICAgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MjAsICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFN0eWx1cyksICAgICAgICAgICAgICAgICAgICAgKi8KLQkweEEwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIENvbGxlY3Rpb24gKFBoeXNpY2FsKSwgICAgICAgICAgICAgICovCi0JMHgxNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICAqLwotCTB4MjUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAgICAgKi8KLQkweDc1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgICAgICovCi0JMHgwOSwgMHg0MiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRpcCBTd2l0Y2gpLCAgICAgICAgICAgICAqLwotCTB4MDksIDB4NDQsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChCYXJyZWwgU3dpdGNoKSwgICAgICAgICAgKi8KLQkweDA5LCAweDQ2LCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGFibGV0IFBpY2spLCAgICAgICAgICAgICovCi0JMHg5NSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KLQkweDk1LCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDMpLCAgICAgICAgICAgICAgICovCi0JMHg4MSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgICAqLwotCTB4MDksIDB4MzIsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChJbiBSYW5nZSksICAgICAgICAgICAgICAgKi8KLQkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCi0JMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KLQkweDgxLCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoQ29uc3RhbnQsIFZhcmlhYmxlKSwgICAgICovCi0JMHg3NSwgMHgxMCwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDE2KSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KLQkweEE0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQdXNoLCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgwNSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLwotCTB4NjUsIDB4MTMsICAgICAgICAgICAgIC8qICAgICAgICAgIFVuaXQgKEluY2gpLCAgICAgICAgICAgICAgICAgICAgKi8KLQkweDU1LCAweEZELCAgICAgICAgICAgICAvKiAgICAgICAgICBVbml0IEV4cG9uZW50ICgtMyksICAgICAgICAgICAgICovCi0JMHgzNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAqLwotCTB4MDksIDB4MzAsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAgICAgKi8KLQkweDI3LCBIVUlPTl9QSChYX0xNKSwgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCi0JMHg0NywgSFVJT05fUEgoWF9QTSksICAgLyogICAgICAgICAgUGh5c2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KLQkweDA5LCAweDMxLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgyNywgSFVJT05fUEgoWV9MTSksICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLwotCTB4NDcsIEhVSU9OX1BIKFlfUE0pLCAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgKi8KLQkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCi0JMHhCNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUG9wLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MzAsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUaXAgUHJlc3N1cmUpLCAgICAgICAgICAgKi8KLQkweDI3LAotCUhVSU9OX1BIKFBSRVNTVVJFX0xNKSwgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVI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gMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvaGlkL2hpZC1reWUuYworKysgYi9kcml2ZXJzL2hpZC9oaWQta3llLmMKQEAgLTI2OCw2ICsyNjgsMTM3IEBACiAJMHhDMCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uICAgICAgICAgICAgICAgICAgKi8KIH07CiAKKworLyogT3JpZ2luYWwgUGVuU2tldGNoIE05MTIgcmVwb3J0IGRlc2NyaXB0b3Igc2l6ZSAqLworI2RlZmluZSBQRU5TS0VUQ0hfTTkxMl9SREVTQ19PUklHX1NJWkUJNDgyCisKKy8qIEZpeGVkIFBlblNrZXRjaCBNOTEyIHJlcG9ydCBkZXNjcmlwdG9yICovCitzdGF0aWMgX191OCBwZW5za2V0Y2hfbTkxMl9yZGVzY19maXhlZFtdID0geworCTB4MDUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgICAgICovCisJMHgwOCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlICgwMGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MDUsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoNSksICAgICAgICAgICAgICAgICovCisJMHgwNiwgMHgwMCwgMHhGRiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgUGFnZSAoRkYwMGgpLCAgICAgICAgICAgKi8KKwkweDA5LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICBVc2FnZSAoMDFoKSwgICAgICAgICAgICAgICAgICAqLworCTB4MTUsIDB4ODEsICAgICAgICAgICAgICAgICAgIC8qICAgIExvZ2ljYWwgTWluaW11bSAoLTEyNyksICAgICAgICovCisJMHgyNSwgMHg3RiwgICAgICAgICAgICAgICAgICAgLyogICAgTG9naWNhbCBNYXhpbXVtICgxMjcpLCAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDcsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBDb3VudCAoNyksICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEQsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEaWdpdGl6ZXIpLCAgICAgICAgICovCisJMHgwOSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChQZW4pLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTAsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTYpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMCwgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgKFN0eWx1cyksICAgICAgICAgICAgICAgKi8KKwkweEEwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAqLworCTB4MDksIDB4NDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFRpcCBTd2l0Y2gpLCAgICAgICAgICovCisJMHgwOSwgMHg0NCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoQmFycmVsIFN3aXRjaCksICAgICAgKi8KKwkweDA5LCAweDQ2LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChUYWJsZXQgUGljayksICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDc1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDA0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICovCisJMHgwOSwgMHgzMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHg3NSwgMHgxMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4QTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgKi8KKwkweDU1LCAweEZELCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVuaXQgRXhwb25lbnQgKC0zKSwgICAgICAgICAqLworCTB4NjUsIDB4MTMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVW5pdCAoSW5jaCksICAgICAgICAgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDM0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFgpLCAgICAgICAgICAgICAgICAgICovCisJMHgyNywgMHgwMCwgMHhGMCwgMHgwMCwgMHgwMCwgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDYxNDQwKSwgICAgKi8KKwkweDQ2LCAweEUwLCAweDJFLCAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDEyMDAwKSwgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgKi8KKwkweDI3LCAweDAwLCAweEI0LCAweDAwLCAweDAwLCAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoNDYwODApLCAgICAqLworCTB4NDYsIDB4MjgsIDB4MjMsICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWF4aW11bSAoOTAwMCksICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEI0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFRpcCBQcmVzc3VyZSksICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDI2LCAweEZGLCAweDA3LCAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMjA0NyksICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEQsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEaWdpdGl6ZXIpLCAgICAgICAgICovCisJMHgwOSwgMHgyMSwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChQdWNrKSwgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTEsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTcpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMSwgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgKFB1Y2spLCAgICAgICAgICAgICAgICAgKi8KKwkweEEwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAqLworCTB4MDUsIDB4MDksICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoQnV0dG9uKSwgICAgICAgICovCisJMHg3NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgKi8KKwkweDE5LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIE1pbmltdW0gKDAxaCksICAgICAgICAqLworCTB4MjksIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgTWF4aW11bSAoMDNoKSwgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDA0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAqLworCTB4ODEsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKENvbnN0YW50KSwgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgKi8KKwkweDBCLCAweDMyLCAweDAwLCAweDBELCAweDAwLCAvKiAgICAgIFVzYWdlIChEaWdpdGl6ZXIgSW4gUmFuZ2UpLCAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4QTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgKi8KKwkweDc1LCAweDEwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICgxNiksICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICovCisJMHg1NSwgMHhGRCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVbml0IEV4cG9uZW50ICgtMyksICAgICAgICAgKi8KKwkweDY1LCAweDEzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVuaXQgKEluY2gpLCAgICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgzNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNaW5pbXVtICgwKSwgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIDB4MDAsIDB4RjAsIDB4MDAsIDB4MDAsIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICg2MTQ0MCksICAgICovCisJMHg0NiwgMHhFMCwgMHgyRSwgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICgxMjAwMCksICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4MDksIDB4MzEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFkpLCAgICAgICAgICAgICAgICAgICovCisJMHgyNywgMHgwMCwgMHhCNCwgMHgwMCwgMHgwMCwgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDQ2MDgwKSwgICAgKi8KKwkweDQ2LCAweDI4LCAweDIzLCAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDkwMDApLCAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzOCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoV2hlZWwpLCAgICAgICAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICg4KSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICovCisJMHgxNSwgMHhGRiwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKC0xKSwgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAqLworCTB4MzQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICovCisJMHg0NCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICgwKSwgICAgICAgKi8KKwkweDgxLCAweDA2LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSwgUmVsYXRpdmUpLCAqLworCTB4QjQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUG9wLCAgICAgICAgICAgICAgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEMsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChDb25zdW1lciksICAgICAgICAgICovCisJMHgwOSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChDb25zdW1lciBDb250cm9sKSwgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTIsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTgpLCAgICAgICAgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgICAqLworCTB4NzUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwOCwgICAgICAgICAgICAgICAgICAgLyogICAgUmVwb3J0IENvdW50ICg4KSwgICAgICAgICAgICAgKi8KKwkweDA1LCAweDBDLCAgICAgICAgICAgICAgICAgICAvKiAgICBVc2FnZSBQYWdlIChDb25zdW1lciksICAgICAgICAqLworCTB4MEEsIDB4NkEsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBEZWxldGUpLCAgICAgICAgICAgICovCisJMHgwQSwgMHgxQSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIFVuZG8pLCAgICAgICAgICAgICAgKi8KKwkweDBBLCAweDAxLCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgTmV3KSwgICAgICAgICAgICAgICAqLworCTB4MEEsIDB4MkYsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBab29tKSwgICAgICAgICAgICAgICovCisJMHgwQSwgMHgyNSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIEZvcndhcmQpLCAgICAgICAgICAgKi8KKwkweDBBLCAweDI0LCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgQmFjayksICAgICAgICAgICAgICAqLworCTB4MEEsIDB4MkQsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBab29tIEluKSwgICAgICAgICAgICovCisJMHgwQSwgMHgyRSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIFpvb20gT3V0KSwgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4OTUsIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBDb3VudCAoNDgpLCAgICAgICAgICAgICovCisJMHg4MSwgMHgwMywgICAgICAgICAgICAgICAgICAgLyogICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgKi8KKwkweEMwICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgR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3KSwgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIwLCAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChTdHlsdXMpLCAgICAgICAgICAgICAgICAgICAgICovCisJMHhBMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgICAgICovCisJMHg3NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDEpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4NDIsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUaXAgU3dpdGNoKSwgICAgICAgICAgICAgKi8KKwkweDA5LCAweDQ0LCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoQmFycmVsIFN3aXRjaCksICAgICAgICAgICovCisJMHgwOSwgMHg0NiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRhYmxldCBQaWNrKSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAgICAgKi8KKwkweDA5LCAweDMyLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgICAqLworCTB4NzUsIDB4MTAsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICgxNiksICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisJMHhBNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAgICAgKi8KKwkweDY1LCAweDEzLCAgICAgICAgICAgICAvKiAgICAgICAgICBVbml0IChJbmNoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg1NSwgMHhGRCwgICAgICAgICAgICAgLyogICAgICAgICAgVW5pdCBFeHBvbmVudCAoLTMpLCAgICAgICAgICAgICAqLworCTB4MzQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWCksICAgICAgICAgICAgICAgICAgICAgICovCisJMHgyNywgVUNMT0dJQ19QSChYX0xNKSwgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLworCTB4NDcsIFVDTE9HSUNfUEgoWF9QTSksIC8qICAgICAgICAgIFBoeXNpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFkpLCAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIFVDTE9HSUNfUEgoWV9MTSksIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAgKi8KKwkweDQ3LCBVQ0xPR0lDX1BIKFlfUE0pLCAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4QjQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGlwIFByZXNzdXJlKSwgICAgICAgICAgICovCisJMHgyNywKKwlVQ0xPR0lDX1BIKFBSRVNTVVJFX0xNKSwvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4QzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICA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ICogRGF0YSBzaGVldDoKKyAqICBodHRwOi8vd3d3Lm1lYXMtc3BlYy5jb20vZG93bmxvYWRzL01TNTYxMS0wMUJBMDMucGRmCisgKgorICovCisKKyNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KKyNpbmNsdWRlIDxsaW51eC9paW8vaWlvLmg+CisjaW5jbHVkZSA8bGludXgvZGVsYXkuaD4KKworI2luY2x1ZGUgIm1zNTYxMS5oIgorCitzdGF0aWMgYm9vbCBtczU2MTFfcHJvbV9pc192YWxpZCh1MTYgKnByb20sIHNpemVfdCBsZW4pCit7CisJaW50IGksIGo7CisJdWludDE2X3QgY3JjID0gMCwgY3JjX29yaWcgPSBwcm9tWzddICYgMHgwMDBGOworCisJcHJvbVs3XSAmPSAweEZGMDA7CisKKwlmb3IgKGkgPSAwOyBpIDwgbGVuICogMjsgaSsrKSB7CisJCWlmIChpICUgMiA9PSAxKQorCQkJY3JjIF49IHByb21baSA+PiAxXSAmIDB4MDBGRjsKKwkJZWxzZQorCQkJY3JjIF49IHByb21baSA+PiAxXSA+PiA4OworCisJCWZvciAoaiA9IDA7IGogPCA4OyBqKyspIHsKKwkJCWlmIChjcmMgJiAweDgwMDApCisJCQkJY3JjID0gKGNyYyA8PCAxKSBeIDB4MzAwMDsKKwkJCWVsc2UKKwkJCQljcmMgPDw9IDE7CisJCX0KKwl9CisKKwljcmMgPSAoY3JjID4+IDEyKSAmIDB4MDAwRjsKKworCXJldHVybiBjcmNfb3JpZyAhPSAweDAwMDAgJiYgY3JjID09IGNyY19vcmlnOworfQorCitzdGF0aWMgaW50IG1zNTYxMV9yZWFkX3Byb20oc3RydWN0IGlpb19kZXYgKmluZGlvX2RldikKK3sKKwlpbnQgcmV0LCBpOworCXN0cnVjdCBtczU2MTFfc3RhdGUgKnN0ID0gaWlvX3ByaXYoaW5kaW9fZGV2KTsKKworCWZvciAoaSA9IDA7IGkgPCBNUzU2MTFfUFJPTV9XT1JEU19OQjsgaSsrKSB7CisJCXJldCA9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cGh5cyA9IHlfcGl0Y2ggKiAobnVtX3lfZWxlY3Ryb2RlIC0gMSk7IC8qIEluIDAuMSBtbSB1bml0cyAqLworCisJcHJpdi0+eF9yZXMgPSBwcml2LT54X21heCAqIDEwIC8geF9waHlzOyAvKiB1bml0cyAvIG1tICovCisJcHJpdi0+eV9yZXMgPSBwcml2LT55X21heCAqIDEwIC8geV9waHlzOyAvKiB1bml0cyAvIG1tICovCisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBhbHBzX3VwZGF0ZV9idG5faW5mb19zczRfdjIodW5zaWduZWQgY2hhciBvdHBbXVs0XSwKKwkJCQkgICAgICAgc3RydWN0IGFscHNfZGF0YSAqcHJpdikKK3sKKwl1bnNpZ25lZCBjaGFyIGlzX2J0bmxlc3M7CisKKwlpc19idG5sZXNzID0gKG90cFsxXVsxXSA+PiAzKSAmIDB4MDE7CisKKwlpZiAoaXNfYnRubGVzcykKKwkJcHJpdi0+ZmxhZ3MgfD0gQUxQU19CVVRUT05QQUQ7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBhbHBzX3NldF9kZWZhdWx0c19zczRfdjIoc3RydWN0IHBzbW91c2UgKnBzbW91c2UsCisJCQkJICAgIHN0cnVjdCBhbHBzX2RhdGEgKnByaXYpCit7CisJdW5zaWduZWQgY2hhciBvdHBbMl1bNF07CisKKwltZW1zZXQob3RwLCAwLCBzaXplb2Yob3RwKSk7CisKKwlpZiAoYWxwc19nZXRfb3RwX3ZhbHVlc19zczRfdjIocHNtb3VzZSwgMCwgJm90cFswXVswXSkgfHwKKwkgICAgYWxwc19nZXRfb3RwX3ZhbHVlc19zczRfdjIocHNtb3VzZSwgMSwgJm90cFsxXVswXSkpCisJCXJldHVybiAtMTsKKworCWFscHNfdXBkYXRlX2RldmljZV9hcmVhX3NzNF92MihvdHAsIHByaXYpOworCisJYWxwc191cGRhdGVfYnRuX2luZm9fc3M0X3YyKG90cCwgcHJpdik7CisKKwlyZXR1cm4gMDsKK30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BPU0lUSVZFIDgxNzYKIAorLyogbWF4aW11bSBBQlNfTVRfUE9TSVRJT04gZGlzcGxhY2VtZW50IChpbiBtbSkgKi8KKyNkZWZpbmUgRE1BWCAxMAorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCVN0dWZmIHdlIG5lZWQgZXZlbiB3aGVuIHdlIGRvIG5vdCB3YW50IG5hdGl2ZSBTeW5hcHRpY3Mgc3VwcG9ydAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMDMsNiArMjA2LDEzIEBACiAJTlVMTAogfTsKIAorLyogVGhpcyBsaXN0IGhhcyBiZWVuIGtpbmRseSBwcm92aWRlZCBieSBTeW5hcHRpY3MuICovCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGZvcmNlcGFkX3BucF9pZHNbXSA9IHsKKwkiU1lOMzAwRCIsCisJIlNZTjMwMTQiLAorCU5VTEwKK307CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoJU3luYXB0aWNzIGNvbW11bmljYXRpb25zIGZ1bmN0aW9ucwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC02ODcsOCArNjk3LDYgQEAKIAlody0+ZXh0X2J1dHRvbnMgfD0gKGJ1Zls1XSAmIGV4dF9tYXNrKSA8PCBleHRfYml0czsKIH0KIAotc3RhdGljIGJvb2wgaXNfZm9yY2VwYWQ7Ci0KIHN0YXRpYyBpbnQgc3luYXB0aWNzX3BhcnNlX2h3X3N0YXRlKGNvbnN0IHVuc2lnbmVkIGNoYXIgYnVmW10sCiAJCQkJICAgIHN0cn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ViaS0+Zm1fd29ya19zY2hlZHVsZWQgPSAxOworCQkJc2NoZWR1bGVfd29yaygmdWJpLT5mbV93b3JrKTsKKwkJfQorCQlyZXR1cm4gTlVMTDsKKwl9CisKKwlwbnVtID0gcG9vbC0+cGVic1twb29sLT51c2VkKytdOworCXJldHVybiB1YmktPmxvb2t1cHRibFtwbnVtXTsKK30KKworLyoqCisgKiB1YmlfZW5zdXJlX2FuY2hvcl9wZWJzIC0gc2NoZWR1bGUgd2Vhci1sZXZlbGluZyB0byBwcm9kdWNlIGFuIGFuY2hvciBQRUIuCisgKiBAdWJpOiBVQkkgZGV2aWNlIGRlc2NyaXB0aW9uIG9iamVjdAorICovCitpbnQgdWJpX2Vuc3VyZV9hbmNob3JfcGVicyhzdHJ1Y3QgdWJpX2RldmljZSAqdWJpKQoreworCXN0cnVjdCB1Ymlfd29yayAqd3JrOworCisJc3Bpbl9sb2NrKCZ1YmktPndsX2xvY2spOworCWlmICh1YmktPndsX3NjaGVkdWxlZCkgeworCQlzcGluX3VubG9jaygmdWJpLT53bF9sb2NrKTsKKwkJcmV0dXJuIDA7CisJfQorCXViaS0+d2xfc2NoZWR1bGVkID0gMTsKKwlzcGluX3VubG9jaygmdWJpLT53bF9sb2NrKTsKKworCXdyayA9IGttYWxsb2Moc2l6ZW9mKHN0cnVjdCB1Ymlfd29yayksIEdGUF9OT0ZTKTsKKwlpZiAoIXdyaykgeworCQlzcGluX2xvY2soJnViaS0+d2xfbG9jayk7CisJCXViaS0+d2xfc2NoZWR1bGVkID0gMDsKKwkJc3Bpbl91bmxvY2soJnViaS0+d2xfbG9jayk7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCXdyay0+YW5jaG9yID0gMTsKKwl3cmstPmZ1bmMgPSAmd2Vhcl9sZXZlbGluZ193b3JrZXI7CisJc2NoZWR1bGVfdWJpX3dvcmsodWJpLCB3cmspOworCXJldHVybiAwOworfQorCisvKioKKyAqIHViaV93bF9wdXRfZm1fcGViIC0gcmV0dXJucyB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3ICs2ODQsNyBAQAogKglXaWxsIHJldHVybiB0aGUgUEJGIEVUUyByZWdpc3RlcnMgdG8gaW5pdCB2YWx1ZXMuRXhjZXB0CiAqCWNyZWRpdF91cHBlcl9ib3VuZC4KICoJVGhhdCBpc24ndCB1c2VkIGluIHRoaXMgY29uZmlndXJhdGlvbiAoTm8gV0ZRIGlzIGVuYWJsZWQpIGFuZCB3aWxsIGJlCi0qCWNvbmZpZ3VyZWQgYWNvcmRpbmcgdG8gc3BlYworKgljb25maWd1cmVkIGFjY29yZGluZyB0byBzcGVjCiAqLgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHZvaWQgYm54MnhfZXRzX2UzYjBfcGJmX2Rpc2FibGVkKGNvbnN0IHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zKQpAQCAtNzM4LDcgKzc0Miw3IEBACiB9CiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIERlc2NyaXB0aW9uOgotKglFM0IwIGRpc2FibGUgd2lsbCByZXR1cm4gYmFzaWNseSB0aGUgdmFsdWVzIHRvIGluaXQgdmFsdWVzLgorKglFM0IwIGRpc2FibGUgd2lsbCByZXR1cm4gYmFzaWNhbGx5IHRoZSB2YWx1ZXMgdG8gaW5pdCB2YWx1ZXMuCiAqLgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIGludCBibngyeF9ldHNfZTNiMF9kaXNhYmxlZChjb25zdCBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKQEAgLTc2MSw3ICs3NjUsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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5ZDZjLAotCQkweDlkODAsIDB4OWRlYywKLQkJMHg5ZTAwLCAweDllNmMsCi0JCTB4OWU4MCwgMHg5ZWVjLAotCQkweDlmMDAsIDB4OWY2YywKLQkJMHg5ZjgwLCAweGEwMjAsCi0JCTB4ZDAwNCwgMHhkMDNjLAotCQkweGRmYzAsIDB4ZGZlMCwKLQkJMHhlMDAwLCAweDExMDg4LAotCQkweDExMDljLCAweDExMTEwLAotCQkweDExMTE4LCAweDExMTdjLAotCQkweDExMTkwLCAweDExMjA0LAotCQkweDE5MDQwLCAweDE5MDZjLAotCQkweDE5MDc4LCAweDE5MDgwLAotCQkweDE5MDhjLCAweDE5MTI0LAotCQkweDE5MTUwLCAweDE5MWIwLAotCQkweDE5MWQwLCAweDE5MWU4LAotCQkweDE5MjM4LCAweDE5MjkwLAotCQkweDE5M2Y4LCAweDE5NDc0LAotCQkweDE5NDkwLCAweDE5NGNjLAotCQkweDE5NGYwLCAweDE5NGY4LAotCQkweDE5YzAwLCAweDE5YzYwLAotCQkweDE5Yzk0LCAweDE5ZTEwLAotCQkweDE5ZTUwLCAweDE5ZjM0LAotCQkweDE5ZjQwLCAweDE5ZjUwLAotCQkweDE5ZjkwLCAweDE5ZmU0LAotCQkweDFhMDAwLCAweDFhMDZjLAotCQkweDFhMGIwLCAweDFhMTIwLAotCQkweDFhMTI4LCAweDFhMTM4LAotCQkweDFhMTkwLCAweDFhMWM0LAotCQkweDFhMWZjLCAweDFhMWZjLAotCQkweDFlMDA4LCAweDFlMDBjLAotCQkweDFlMDQwLCAweDFlMDRjLAotCQkweDFlMjg0LCAweDFlMjkwLAotCQkweDFlMmMwLCAweDFlMmMwLAotCQkweDFlMmUwLCAweDFlMmUwLAotCQkweDFlMzAwLCAweDFlMzg0LAotCQkweDFlM2MwLCAweDFlM2M4LAotCQkweDFlNDA4LCAweDFlNDBjLAotCQkweDFlNDQwLCAweDFlNDRjLAotCQkweDFlNjg0LCAweDFlNjkwLAotCQkweDFlNmMwLCAweDFlNmMwLAotCQkweDFlNmUwLCAweDFlNmUwLAotCQkweDFlNzAwLCAweDFlNzg0LAotCQkweDFlN2MwLCAweDFlN2M4LAotCQkweDFlODA4LCAweDFlODBjLAotCQkweDFlODQwLCAweDFlODRjLAotCQkweDFlYTg0LCAweDFlYTkwLAotCQkweDFlYWMwLCAweDFlYWMwLAotCQkweDFlYWUwLCAweDFlYWUwLAotCQkweDFlYjAwLCAweDFlYjg0LAotCQkweDFlYmMwLCAweDFlYmM4LAotCQkweDFlYzA4LCAweDFlYzBjLAotCQkweDFlYzQwLCAweDFlYzRjLAotCQkweDFlZTg0LCAweDFlZTkwLAotCQkweDFlZWMwLCAweDFlZWMwLAotCQkweDFlZWUwLCAweDFlZWUwLAotCQkweDFlZjAwLCAweDFlZjg0LAotCQkweDFlZmMwLCAweDFlZmM4LAotCQkweDFmMDA4LCAweDFmMDBjLAotCQkweDFmMDQwLCAweDFmMDRjLAotCQkweDFmMjg0LCAweDFmMjkwLAotCQkweDFmMmMwLCAweDFmMmMwLAotCQkweDFmMmUwLCAweDFmMmUwLAotCQkweDFmMzAwLCAweDFmMzg0LAotCQkweDFmM2MwLCAweDFmM2M4LAotCQkweDFmNDA4LCAweDFmNDBjLAotCQkweDFmNDQwLCAweDFmNDRjLAotCQkweDFmNjg0LCAweDFmNjkwLAotCQkweDFmNmMwLCAweDFmNmMwLAotCQkweDFmNmUwLCAweDFmNmUwLAotCQkweDFmNzAwLCAweDFmNzg0LAotCQkweDFmN2MwLCAweDFmN2M4LAotCQkweDFmODA4LCAweDFmODBjLAotCQkweDFmODQwLCAweDFmODRjLAotCQkweDFmYTg0LCAweDFmYTkwLAotCQkweDFmYWMwLCAweDFmYWMwLAotCQkweDFmYWUwLCAweDFmYWUwLAotCQkweDFmYjAwLCAweDFmYjg0LAotCQkweDFmYmMwLCAweDFmYmM4LAotCQkweDFmYzA4LCAweDFmYzBjLAotCQkweDFmYzQwLCAweDFmYzRjLAotCQkweDFmZTg0LCAweDFmZTkwLAotCQkweDFmZWMwLCAweDFmZWMwLAotCQkweDFmZWUwLCAweDFmZWUwLAotCQkweDFmZjAwLCAweDFmZjg0LAotCQkweDFmZmMwLCAweDFmZmM4LAotCQkweDMwMDAwLCAweDMwMDMwLAotCQkweDMwMTAwLCAweDMwMTQ0LAotCQkweDMwMTkwLCAweDMwMWQwLAotCQkweDMwMjAwLCAweDMwMzE4LAotCQkweDMwNDAwLCAweDMwNTJjLAotCQkweDMwNTQwLCAweDMwNjFjLAotCQkweDMwODAwLCAweDMwODM0LAotCQkweDMwOGMwLCAweDMwOTA4LAotCQkweDMwOTEwLCAweDMwOWFjLAotCQkweDMwYTAwLCAweDMwYTA0LAotCQkweDMwYTBjLCAweDMwYTJjLAotCQkweDMwYTQ0LCAweDMwYTUwLAotCQkweDMwYTc0LCAweDMwYzI0LAotCQkweDMwZDA4LCAweDMwZDE0LAotCQkweDMwZDFjLCAweDMwZDIwLAotCQkweDMwZDNjLCAweDMwZDUwLAotCQkweDMxMjAwLCAweDMxMjBjLAotCQkweDMxMjIwLCAweDMxMjIwLAotCQkweDMxMjQwLCAweDMxMjQwLAotCQkweDMxNjAwLCAweDMxNjAwLAotCQkweDMxNjA4LCAweDMxNjBjLAotCQkweDMxYTAwLCAweDMxYTFjLAotCQkweDMxZTA0LCAweDMxZTIwLAotCQkweDMxZTM4LCAweDMxZTNjLAotCQkweDMxZTgwLCAweDMxZTgwLAotCQkweDMxZTg4LCAweDMxZWE4LAotCQkweDMxZWIwLCAweDMxZWI0LAotCQkweDMxZWM4LCAweDMxZWQ0LAotCQkweDMxZmI4LCAweDMyMDA0LAotCQkweDMyMjA4LCAweDMyMjNjLAotCQkweDMyNjAwLCAweDMyNjMwLAotCQkweDMyYTAwLCAweDMyYWJjLAotCQkweDMyYjAwLCAweDMyYjcwLAotCQkweDMzMDAwLCAweDMzMDQ4LAotCQkweDMzMDYwLCAweDMzMDljLAotCQkweDMzMGYwLCAweDMzMTQ4LAotCQkweDMzMTYwLCAweDMzMTljLAotCQkweDMzMWYwLCAweDMzMmU0LAotCQkweDMzMmY4LCAweDMzM2U0LAotCQkweDMzM2Y4LCAweDMzNDQ4LAotCQkweDMzNDYwLCAweDMzNDljLAotCQkweDMzNGYwLCAweDMzNTQ4LAotCQkweDMzNTYwLCAweDMzNTljLAotCQkweDMzNWYwLCAweDMzNmU0LAotCQkweDMzNmY4LCAweDMzN2U0LAotCQkweDMzN2Y4LCAweDMzN2ZjLAotCQkweDMzODE0LCAweDMzODE0LAotCQkweDMzODJjLCAweDMzODJjLAotCQkweDMzODgwLCAweDMzODhjLAotCQkweDMzOGU4LCAweDMzOGVjLAotCQkweDMzOTAwLCAweDMzOTQ4LAotCQkweDMzOTYwLCAweDMzOTljLAotCQkweDMzOWYwLCAweDMzYWU0LAotCQkweDMzYWY4LCAweDMzYjEwLAotCQkweDMzYjI4LCAweDMzYjI4LAotCQkweDMzYjNjLCAweDMzYjUwLAotCQkweDMzYmYwLCAweDMzYzEwLAotCQkweDMzYzI4LCAweDMzYzI4LAotCQkweDMzYzNjLCAweDMzYzUwLAotCQkweDMzY2YwLCAweDMzY2ZjLAotCQkweDM0MDAwLCAweDM0MDMwLAotCQkweDM0MTAwLCAweDM0MTQ0LAotCQkweDM0MTkwLCAweDM0MWQwLAotCQkweDM0MjAwLCAweDM0MzE4LAotCQkweDM0NDAwLCAweDM0NTJjLAotCQkweDM0NTQwLCAweDM0NjFjLAotCQkweDM0ODAwLCAweDM0ODM0LAotCQkweDM0OGMwLCAweDM0OTA4LAotCQkweDM0OTEwLCAweDM0OWFjLAotCQkweDM0YTAwLCAweDM0YTA0LAotCQkweDM0YTBjLCAweDM0YTJjLAotCQkweDM0YTQ0LCAweDM0YTUwLAotCQkweDM0YTc0LCAweDM0YzI0LAotCQkweDM0ZDA4LCAweDM0ZDE0LAotCQkweDM0ZDFjLCAweDM0ZDIwLAotCQkweDM0ZDNjLCAweDM0ZDUwLAotCQkweDM1MjAwLCAweDM1MjBjLAotCQkweDM1MjIwLCAweDM1MjIwLAotCQkweDM1MjQwLCAweDM1MjQwLAotCQkweDM1NjAwLCAweDM1NjAwLAotCQkweDM1NjA4LCAweDM1NjBjLAotCQkweDM1YTAwLCAweDM1YTFjLAotCQkweDM1ZTA0LCAweDM1ZTIwLAotCQkweDM1ZTM4LCAweDM1ZTNjLAotCQkweDM1ZTgwLCAweDM1ZTgwLAotCQkweDM1ZTg4LCAweDM1ZWE4LAotCQkweDM1ZWIwLCAweDM1ZWI0LAotCQkweDM1ZWM4LCAweDM1ZWQ0LAotCQkweDM1ZmI4LCAweDM2MDA0LAotCQkweDM2MjA4LCAweDM2MjNjLAotCQkweDM2NjAwLCAweDM2NjMwLAotCQkweDM2YTAwLCAweDM2YWJjLAotCQkweDM2YjAwLCAweDM2YjcwLAotCQkweDM3MDAwLCAweDM3MDQ4LAotCQkweDM3MDYwLCAweDM3MDljLAotCQkweDM3MGYwLCAweDM3MTQ4LAotCQkweDM3MTYwLCAweDM3MTljLAotCQkweDM3MWYwLCAweDM3MmU0LAotCQkweDM3MmY4LCAweDM3M2U0LAotCQkweDM3M2Y4LCAweDM3NDQ4LAotCQkweDM3NDYwLCAweDM3NDljLAotCQkweDM3NGYwLCAweDM3NTQ4LAotCQkweDM3NTYwLCAweDM3NTljLAotCQkweDM3NWYwLCAweDM3NmU0LAotCQkweDM3NmY4LCAweDM3N2U0LAotCQkweDM3N2Y4LCAweDM3N2ZjLAotCQkweDM3ODE0LCAweDM3ODE0LAotCQkweDM3ODJjLCAweDM3ODJjLAotCQkweDM3ODgwLCAweDM3ODhjLAotCQkweDM3OGU4LCAweDM3OGVjLAotCQkweDM3OTAwLCAweDM3OTQ4LAotCQkweDM3OTYwLCAweDM3OTljLAotCQkweDM3OWYwLCAweDM3YWU0LAotCQkweDM3YWY4LCAweDM3YjEwLAotCQkweDM3YjI4LCAweDM3YjI4LAotCQkweDM3YjNjLCAweDM3YjUwLAotCQkweDM3YmYwLCAweDM3YzEwLAotCQkweDM3YzI4LCAweDM3YzI4L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LAotCQkweDNiMmY4LCAweDNiM2U0LAotCQkweDNiM2Y4LCAweDNiNDQ4LAotCQkweDNiNDYwLCAweDNiNDljLAotCQkweDNiNGYwLCAweDNiNTQ4LAotCQkweDNiNTYwLCAweDNiNTljLAotCQkweDNiNWYwLCAweDNiNmU0LAotCQkweDNiNmY4LCAweDNiN2U0LAotCQkweDNiN2Y4LCAweDNiN2ZjLAotCQkweDNiODE0LCAweDNiODE0LAotCQkweDNiODJjLCAweDNiODJjLAotCQkweDNiODgwLCAweDNiODhjLAotCQkweDNiOGU4LCAweDNiOGVjLAotCQkweDNiOTAwLCAweDNiOTQ4LAotCQkweDNiOTYwLCAweDNiOTljLAotCQkweDNiOWYwLCAweDNiYWU0LAotCQkweDNiYWY4LCAweDNiYjEwLAotCQkweDNiYjI4LCAweDNiYjI4LAotCQkweDNiYjNjLCAweDNiYjUwLAotCQkweDNiYmYwLCAweDNiYzEwLAotCQkweDNiYzI4LCAweDNiYzI4LAotCQkweDNiYzNjLCAweDNiYzUwLAotCQkweDNiY2YwLCAweDNiY2ZjLAotCQkweDNjMDAwLCAweDNjMDMwLAotCQkweDNjMTAwLCAweDNjMTQ0LAotCQkweDNjMTkwLCAweDNjMWQwLAotCQkweDNjMjAwLCAweDNjMzE4LAotCQkweDNjNDAwLCAweDNjNTJjLAotCQkweDNjNTQwLCAweDNjNjFjLAotCQkweDNjODAwLCAweDNjODM0LAotCQkweDNjOGMwLCAweDNjOTA4LAotCQkweDNjOTEwLCAweDNjOWFjLAotCQkweDNjYTAwLCAweDNjYTA0LAotCQkweDNjYTBjLCAweDNjYTJjLAotCQkweDNjYTQ0LCAweDNjYTUwLAotCQkweDNjYTc0LCAweDNjYzI0LAotCQkweDNjZDA4LCAweDNjZDE0LAotCQkweDNjZDFjLCAweDNjZDIwLAotCQkweDNjZDNjLCAweDNjZDUwLAotCQkweDNkMjAwLCAweDNkMjBjLAotCQkweDNkMjIwLCAweDNkMjIwLAotCQkweDNkMjQwLCAweDNkMjQwLAotCQkweDNkNjAwLCAweDNkNjAwLAotCQkweDNkNjA4LCAweDNkNjBjLAotCQkweDNkYTAwLCAweDNkYTFjLAotCQkweDNkZTA0LCAweDNkZTIwLAotCQkweDNkZTM4LCAweDNkZTNjLAotCQkweDNkZTgwLCAweDNkZTgwLAotCQkweDNkZTg4LCAweDNkZWE4LAotCQkweDNkZWIwLCAweDNkZWI0LAotCQkweDNkZWM4LCAweDNkZWQ0LAotCQkweDNkZmI4LCAweDNlMDA0LAotCQkweDNlMjA4LCAweDNlMjNjLAotCQkweDNlNjAwLCAweDNlNjMwLAotCQkweDNlYTAwLCAweDNlYWJjLAotCQkweDNlYjAwLCAweDNlYjcwLAotCQkweDNmMDAwLCAweDNmMDQ4LAotCQkweDNmMDYwLCAweDNmMDljLAotCQkweDNmMGYwLCAweDNmMTQ4LAotCQkweDNmMTYwLCAweDNmMTljLAotCQkweDNmMWYwLCAweDNmMmU0LAotCQkweDNmMmY4LCAweDNmM2U0LAotCQkweDNmM2Y4LCAweDNmNDQ4LAotCQkweDNmNDYwLCAweDNmNDljLAotCQkweDNmNGYwLCAweDNmNTQ4LAotCQkweDNmNTYwLCAweDNmNTljLAotCQkweDNmNWYwLCAweDNmNmU0LAotCQkweDNmNmY4LCAweDNmN2U0LAotCQkweDNmN2Y4LCAweDNmN2ZjLAotCQkweDNmODE0LCAweDNmODE0LAotCQkweDNmODJjLCAweDNmODJjLAotCQkweDNmODgwLCAweDNmODhjLAotCQkweDNmOGU4LCAweDNmOGVjLAotCQkweDNmOTAwLCAweDNmOTQ4LAotCQkweDNmOTYwLCAweDNmOTljLAotCQkweDNmOWYwLCAweDNmYWU0LAotCQkweDNmYWY4LCAweDNmYjEwLAotCQkweDNmYjI4LCAweDNmYjI4LAotCQkweDNmYjNjLCAweDNmYjUwLAotCQkweDNmYmYwLCAweDNmYzEwLAotCQkweDNmYzI4LCAweDNmYzI4LAotCQkweDNmYzNjLCAweDNmYzUwLAotCQkweDNmY2YwLCAweDNmY2ZjL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wLCAweDE5MDZjLAorCQkweDE5MDc4LCAweDE5MDgwLAorCQkweDE5MDhjLCAweDE5MTI0LAorCQkweDE5MTUwLCAweDE5MWIwLAorCQkweDE5MWQwLCAweDE5MWU4LAorCQkweDE5MjM4LCAweDE5MjRjLAorCQkweDE5M2Y4LCAweDE5NDc0LAorCQkweDE5NDkwLCAweDE5NGY4LAorCQkweDE5ODAwLCAweDE5ZjMwLAorCQkweDFhMDAwLCAweDFhMDZjLAorCQkweDFhMGIwLCAweDFhMTIwLAorCQkweDFhMTI4LCAweDFhMTM4LAorCQkweDFhMTkwLCAweDFhMWM0LAorCQkweDFhMWZjLCAweDFhMWZjLAorCQkweDFlMDQwLCAweDFlMDRjLAorCQkweDFlMjg0LCAweDFlMjhjLAorCQkweDFlMmMwLCAweDFlMmMwLAorCQkweDFlMmUwLCAweDFlMmUwLAorCQkweDFlMzAwLCAweDFlMzg0LAorCQkweDFlM2MwLCAweDFlM2M4LAorCQkweDFlNDQwLCAweDFlNDRjLAorCQkweDFlNjg0LCAweDFlNjhjLAorCQkweDFlNmMwLCAweDFlNmMwLAorCQkweDFlNmUwLCAweDFlNmUwLAorCQkweDFlNzAwLCAweDFlNzg0LAorCQkweDFlN2MwLCAweDFlN2M4LAorCQkweDFlODQwLCAweDFlODRjLAorCQkweDFlYTg0LCAweDFlYThjLAorCQkweDFlYWMwLCAweDFlYWMwLAorCQkweDFlYWUwLCAweDFlYWUwLAorCQkweDFlYjAwLCAweDFlYjg0LAorCQkweDFlYmMwLCAweDFlYmM4LAorCQkweDFlYzQwLCAweDFlYzRjLAorCQkweDFlZTg0LCAweDFlZThjLAorCQkweDFlZWMwLCAweDFlZWMwLAorCQkweDFlZWUwLCAweDFlZWUwLAorCQkweDFlZjAwLCAweDFlZjg0LAorCQkweDFlZmMwLCAweDFlZmM4LAorCQkweDFmMDQwLCAweDFmMDRjLAorCQkweDFmMjg0LCAweDFmMjhjLAorCQkweDFmMmMwLCAweDFmMmMwLAorCQkweDFmMmUwLCAweDFmMmUwLAorCQkweDFmMzAwLCAweDFmMzg0LAorCQkweDFmM2MwLCAweDFmM2M4LAorCQkweDFmNDQwLCAweDFmNDRjLAorCQkweDFmNjg0LCAweDFmNjhjLAorCQkweDFmNmMwLCAweDFmNmMwLAorCQkweDFmNmUwLCAweDFmNmUwLAorCQkweDFmNzAwLCAweDFmNzg0LAorCQkweDFmN2MwLCAweDFmN2M4LAorCQkweDFmODQwLCAweDFmODRjLAorCQkweDFmYTg0LCAweDFmYThjLAorCQkweDFmYWMwLCAweDFmYWMwLAorCQkweDFmYWUwLCAweDFmYWUwLAorCQkweDFmYjAwLCAweDFmYjg0LAorCQkweDFmYmMwLCAweDFmYmM4LAorCQkweDFmYzQwLCAweDFmYzRjLAorCQkweDFmZTg0LCAweDFmZThjLAorCQkweDFmZWMwLCAweDFmZWMwLAorCQkweDFmZWUwLCAweDFmZWUwLAorCQkweDFmZjAwLCAweDFmZjg0LAorCQkweDFmZmMwLCAweDFmZmM4LAorCQkweDIwMDAwLCAweDIwMDJjLAorCQkweDIwMTAwLCAweDIwMTNjLAorCQkweDIwMTkwLCAweDIwMWM4LAorCQkweDIwMjAwLCAweDIwMzE4LAorCQkweDIwNDAwLCAweDIwNTI4LAorCQkweDIwNTQwLCAweDIwNjE0LAorCQkweDIxMDAwLCAweDIxMDQwLAorCQkweDIxMDRjLCAweDIxMDYwLAorCQkweDIxMGMwLCAweDIxMGVjLAorCQkweDIxMjAwLCAweDIxMjY4LAorCQkweDIxMjcwLCAweDIxMjg0LAorCQkweDIxMmZjLCAweDIxMzg4LAorCQkweDIxNDAwLCAweDIxNDA0LAorCQkweDIxNTAwLCAweDIxNTE4LAorCQkweDIxNTJjLCAweDIxNTNjLAorCQkweDIxNTUwLCAweDIxNTU0LAorCQkweDIxNjAwLCAweDIxNjAwLAorCQkweDIxNjA4LCAweDIxNjI4LAorCQkweDIxNjMwLCAweDIxNjNjLAorCQkweDIxNzAwLCAweDIxNzFjLAorCQkweDIxNzgwLCAweDIxNzhjLAorCQkweDIxODAwLCAweDIxYzM4LAorCQkweDIxYzgwLCAweDIxZDdjLAorCQkweDIxZTAwLCAweDIxZTA0LAorCQkweDIyMDAwLCAweDIyMDJjLAorCQkweDIyMTAwLCAweDIyMTNjLAorCQkweDIyMTkwLCAweDIyMWM4LAorCQkweDIyMjAwLCAweDIyMzE4LAorCQkweDIyNDAwLCAweDIyNTI4LAorCQkweDIyNTQwLCAweDIyNjE0LAorCQkweDIzMDAwLCAweDIzMDQwLAorCQkweDIzMDRjLCAweDIzMDYwLAorCQkweDIzMGMwLCAweDIzMGVjLAorCQkweDIzMjAwLCAweDIzMjY4LAorCQkweDIzMjcwLCAweDIzMjg0LAorCQkweDIzMmZjLCAweDIzMzg4LAorCQkweDIzNDAwLCAweDIzNDA0LAorCQkweDIzNTAwLCAweDIzNTE4LAorCQkweDIzNTJjLCAweDIzNTNjLAorCQkweDIzNTUwLCAweDIzNTU0LAorCQkweDIzNjAwLCAweDIzNjAwLAorCQkweDIzNjA4LCAweDIzNjI4LAorCQkweDIzNjMwLCAweDIzNjNjLAorCQkweDIzNzAwLCAweDIzNzFjLAorCQkweDIzNzgwLCAweDIzNzhjLAorCQkweDIzODAwLCAweDIzYzM4LAorCQkweDIzYzgwLCAweDIzZDdjLAorCQkweDIzZTAwLCAweDIzZTA0LAorCQkweDI0MDAwLCAweDI0MDJjLAorCQkweDI0MTAwLCAweDI0MTNjLAorCQkweDI0MTkwLCAweDI0MWM4LAorCQkweDI0MjAwLCAweDI0MzE4LAorCQkweDI0NDAwLCAweDI0NTI4LAorCQkweDI0NTQwLCAweDI0NjE0LAorCQkweDI1MDAwLCAweDI1MDQwLAorCQkweDI1MDRjLCAweDI1MDYwLAorCQkweDI1MGMwLCAweDI1MGVjLAorCQkweDI1MjAwLCAweDI1MjY4LAorCQkweDI1MjcwLCAweDI1Mjg0LAorCQkweDI1MmZjLCAweDI1Mzg4LAorCQkweDI1NDAwLCAweDI1NDA0LAorCQkweDI1NTAwLCAweDI1NTE4LAorCQkweDI1NTJjLCAweDI1NTNjLAorCQkweDI1NTUwLCAweDI1NTU0LAorCQkweDI1NjAwLCAweDI1NjAwLAorCQkweDI1NjA4LCAweDI1NjI4LAorCQkweDI1NjMwLCAweDI1NjNjLAorCQkweDI1NzAwLCAweDI1NzFjLAorCQkweDI1NzgwLCAweDI1NzhjLAorCQkweDI1ODAwLCAweDI1YzM4LAorCQkweDI1YzgwLCAweDI1ZDdjLAorCQkweDI1ZTAwLCAweDI1ZTA0LAorCQkweDI2MDAwLCAweDI2MDJjLAorCQkweDI2MTAwLCAweDI2MTNjLAorCQkweDI2MTkwLCAweDI2MWM4LAorCQkweDI2MjAwLCAweDI2MzE4LAorCQkweDI2NDAwLCAweDI2NTI4LAorCQkweDI2NTQwLCAweDI2NjE0LAorCQkweDI3MDAwLCAweDI3MDQwLAorCQkweDI3MDRjLCAweDI3MDYwLAorCQkweDI3MGMwLCAweDI3MGVjLAorCQkweDI3MjAwLCAweDI3MjY4LAorCQkweDI3MjcwLCAweDI3Mjg0LAorCQkweDI3MmZjLCAweDI3Mzg4LAorCQkweDI3NDAwLCAweDI3NDA0LAorCQkweDI3NTAwLCAweDI3NTE4LAorCQkweDI3NTJjLCAweDI3NTNjLAorCQkweDI3NTUwLCAweDI3NTU0LAorCQkweDI3NjAwLCAweDI3NjAwLAorCQkweDI3NjA4LCAweDI3NjI4LAorCQkweDI3NjMwLCAweDI3NjNjLAorCQkweDI3NzAwLCAweDI3NzFjLAorCQkweDI3NzgwLCAweDI3NzhjLAorCQkweDI3ODAwLCAweDI3YzM4LAorCQkweDI3YzgwLCAweDI3ZDdjLAorCQkweDI3ZTAwLCAweDI3ZTA0CisJfTsKKworCXN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdDVfcmVnX3Jhbmdlc1tdID0geworCQkweDEwMDgsIDB4MTE0OCwKKwkJMHgxMTgwLCAweDExYjQsCisJCTB4MTFmYywgMHgxMjNjLAorCQkweDEyODAsIDB4MTczY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iBTZXR0aW5nIERFQlVHX1NISVJRIGluIHRoZSBrZXJuZWwgbWFrZXMgaXQgZmlyZSBhbiBpbnRlcnJ1cHQKIAkgKiBhcyBzb29uIGFzIHdlIGNhbGwgcGNpX3JlcXVlc3RfaXJxLCBzbyB3ZSBoYXZlIHRvIHNldHVwIG91cgogCSAqIGNsZWFuX3J4IGhhbmRsZXIgYmVmb3JlIHdlIGRvIHNvLgpAQCAtMTcyNSw2ICsxNzI4LDcgQEAKIAogCXJldHVybiAwOwogfQorCiAvKioKICAqIGlnYnZmX3NldF9tYWMgLSBDaGFuZ2UgdGhlIEV0aGVybmV0IEFkZHJlc3Mgb2YgdGhlIE5JQwogICogQG5ldGRldjogbmV0d29yayBpbnRlcmZhY2UgZGV2aWNlIHN0cnVjdHVyZQpAQCAtMTc1MywxNSArMTc1NywxNSBAQAogCXJldHVybiAwOwogfQogCi0jZGVmaW5lIFVQREFURV9WRl9DT1VOVEVSKHJlZywgbmFtZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJdTMyIGN1cnJlbnRfY291bnRlciA9IGVyMzIocmVnKTsgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmIChjdXJyZW50X2NvdW50ZXIgPCBhZGFwdGVyLT5zdGF0cy5sYXN0XyMjbmFtZSkgICAgICAgXAotCQkJYWRhcHRlci0+c3RhdHMubmFtZSArPSAweDEwMDAwMDAwMExMOyAgICAgICAgICAgXAotCQlhZGFwdGVyLT5zdGF0cy5sYXN0XyMjbmFtZSA9IGN1cnJlbnRfY291bnRlcjsgICAgICAgICAgIFwKLQkJYWRhcHRlci0+c3RhdHMubmFtZSAmPSAweEZGRkZGRkZGMDAwMDAwMDBMTDsgICAgICAgICAgICBcCi0JCWFkYXB0ZXItPnN0YXRzLm5hbWUgfD0gY3VycmVudF9jb3VudGVyOyAg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GlwX2hkcihza2IpOworCiAJCWlwaC0+dG90X2xlbiA9IDA7CiAJCWlwaC0+Y2hlY2sgPSAwOwogCQl0Y3BfaGRyKHNrYiktPmNoZWNrID0gfmNzdW1fdGNwdWRwX21hZ2ljKGlwaC0+c2FkZHIsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXBoLT5kYWRkciwgMCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJUFBST1RPX1RDUCwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKTsKKwkJCQkJCQkgaXBoLT5kYWRkciwgMCwKKwkJCQkJCQkgSVBQUk9UT19UQ1AsCisJCQkJCQkJIDApOwogCX0gZWxzZSBpZiAoc2tiX2lzX2dzb192Nihza2IpKSB7CiAJCWlwdjZfaGRyKHNrYiktPnBheWxvYWRfbGVuID0gMDsKIAkJdGNwX2hkcihza2IpLT5jaGVjayA9IH5jc3VtX2lwdjZfbWFnaWMoJmlwdjZfaGRyKHNrYiktPnNhZGRyLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaXB2Nl9oZHIoc2tiKS0+ZGFkZHIsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIElQUFJPVE9fVENQLCAwKTsKKwkJCQkJCSAgICAgICAmaXB2Nl9oZHIoc2tiKS0+ZGFkZHIsCisJCQkJCQkgICAgICAgMCwgSVBQUk9UT19UQ1AsIDApOwogCX0KIAogCWkgPSB0eF9yaW5nLT5uZXh0X3RvX3VzZTsKQEAgLTE5ODQsNyArMTk4Nyw3IEBACiB9CiAKIHN0YXRpYyBpbmxpbmUgYm9vbCBpZ2J2Zl90eF9jc3VtKHN0cnVjdCBpZ2J2Zl9hZGFwdGVyICphZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGlnYnZmX3JpbmcgKnR4X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ICgweDAyODAwICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwQzAwMCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9SREJBSChfbikgICAgICAoKF9uKSA8IDQgPyAoMHgwMjgwNCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEMwMDQgKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfUkRMRU4oX24pICAgICAgKChfbikgPCA0ID8gKDB4MDI4MDggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBDMDA4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1NSUkNUTChfbikgICAgICgoX24pIDwgNCA/ICgweDAyODBDICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwQzAwQyArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9SREgoX24pICAgICAgICAoKF9uKSA8IDQgPyAoMHgwMjgxMCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEMwMTAgKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfUkRUKF9uKSAgICAgICAgKChfbikgPCA0ID8gKDB4MDI4MTggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBDMDE4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1JYRENUTChfbikgICAgICgoX24pIDwgNCA/ICgweDAyODI4ICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwQzAyOCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9UREJBTChfbikgICAgICAoKF9uKSA8IDQgPyAoMHgwMzgwMCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEUwMDAgKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfVERCQUgoX24pICAgICAgKChfbikgPCA0ID8gKDB4MDM4MDQgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBFMDA0ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1RETEVOKF9uKSAgICAgICgoX24pIDwgNCA/ICgweDAzODA4ICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRTAwOCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9UREgoX24pICAgICAgICAoKF9uKSA8IDQgPyAoMHgwMzgxMCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEUwMTAgKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfVERUKF9uKSAgICAgICAgKChfbikgPCA0ID8gKDB4MDM4MTggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBFMDE4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1RYRENUTChfbikgICAgICgoX24pIDwgNCA/ICgweDAzODI4ICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRTAyOCArICgoX24pICogMHg0MCkp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IFwKKwkJCSAoMHgwQzAxMCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9SRFQoX24pCSgoX24pIDwgNCA/ICgweDAyODE4ICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJICgweDBDMDE4ICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1JYRENUTChfbikJKChfbikgPCA0ID8gKDB4MDI4MjggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkJICgweDBDMDI4ICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1REQkFMKF9uKQkoKF9uKSA8IDQgPyAoMHgwMzgwMCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCSAoMHgwRTAwMCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9UREJBSChfbikJKChfbikgPCA0ID8gKDB4MDM4MDQgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkgKDB4MEUwMDQgKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfVERMRU4oX24pCSgoX24pIDwgNCA/ICgweDAzODA4ICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJICgweDBFMDA4ICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1RESChfbikJKChfbikgPCA0ID8gKDB4MDM4MTAgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkgKDB4MEUwMTAgKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfVERUKF9uKQkoKF9uKSA8IDQgPyAoMHgwMzgxOCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCSAoMHgwRTAxOCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9UWERDVEwoX24pCSgoX24pIDwgNCA/ICgweDAzODI4ICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJCSAoMHgwRTAyOCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9EQ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EZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEgVVNBLgorICB0aGlzIHByb2dyYW07IGlmIG5vdCwgc2VlIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4KIAogICBUaGUgZnVsbCBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCBpbiB0aGlzIGRpc3RyaWJ1dGlvbiBpbgogICB0aGUgZmlsZSBjYWxsZWQgIkNPUFlJTkciLgpAQCAtMjUsNyArMjQsNiBAQAogCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICBDb3B5cmlnaHQgKGMpMjAwNiAtIDIwMDcgTXlyaWNvbSwgSW5jLiBmb3Igc29tZSBMUk8gc3BlY2lmaWMgY29kZQogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTcwLDEyICsxNjgsMTMgQEAKICAqIEBkaXJlY3Rpb246IDAgZm9yIFJ4LCAxIGZvciBUeCwgLTEgZm9yIG90aGVyIGNhdXNlcwogICogQHF1ZXVlOiBxdWV1ZSB0byBtYXAgdGhlIGNvcnJlc3BvbmRpbmcgaW50ZXJydXB0IHRvCiAgKiBAbXNpeF92ZWN0b3I6IHRoZSB2ZWN0b3IgdG8gbWFwIHRvIHRoZSBjb3JyZXNwb25kaW5nIHF1ZXVlCi0gKi8KKyAqKi8KIHN0YXRpYyB2b2lkIGl4Z2JldmZfc2V0X2l2YXIoc3RydWN0IGl4Z2JldmZfYWRhcHRlciAqYWRhcHRlciwgczggZGlyZWN0aW9uLAogCQkJICAgICB1OCBxdWV1ZSwgdTggbX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AgICBNVk5FVEFfQ1BVX1JYUV9BQ0NFU1NfQUxMX01BU0sgICAgICAweDAwMDAwMGZmCkBAIC0xMjIsNiArMTI0LDcgQEAKICNkZWZpbmUgICAgICBNVk5FVEFfVFhfSU5UUl9NQVNLX0FMTCAgICAgICAgICAgICAoMHhmZiA8PCAwKQogI2RlZmluZSAgICAgIE1WTkVUQV9SWF9JTlRSX01BU0sobnJfcnhxcykgICAgICAgICgoKDEgPDwgbnJfcnhxcykgLSAxKSA8PCA4KQogI2RlZmluZSAgICAgIE1WTkVUQV9SWF9JTlRSX01BU0tfQUxMICAgICAgICAgICAgICgweGZmIDw8IDgpCisjZGVmaW5lICAgICAgTVZORVRBX01JU0NJTlRSX0lOVFJfTUFTSyAgICAgICAgICAgQklUKDMxKQogCiAjZGVmaW5lIE1WTkVUQV9JTlRSX09MRF9DQVVTRSAgICAgICAgICAgICAgICAgICAgMHgyNWE4CiAjZGVmaW5lIE1WTkVUQV9JTlRSX09MRF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgyNWFjCkBAIC0xNjUsNiArMTY4LDcgQEAKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19NQVhfUlhfU0laRV9NQVNLICAgICAgICAweDdmZmMKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQzBfUE9SVF9FTkFCTEUgICAgICAgICAgICBCSVQoMCkKICNkZWZpbmUgTVZORVRBX0dNQUNfQ1RSTF8yICAgICAgICAgICAgICAgICAgICAgICAweDJjMDgKKyNkZWZpbmUgICAgICBNVk5FVEFfR01BQzJfSU5CQU5EX0FOX0VOQUJMRSAgICAgICBCSVQoMCkKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQzJfUENTX0VOQUJMRSAgICAgICAgICAgICBCSVQoMykKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQzJfUE9SVF9SR01JSSAgICAgICAgICAgICBCSVQoNCkKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQzJfUE9SVF9SRVNFVCAgICAgICAgICAgICBCSVQoNikKQEAgLTE4MCw5ICsxODQsMTEgQEAKICNkZWZpbmUgTVZORVRBX0dNQUNfQVVUT05FR19DT05GSUcgICAgICAgICAgICAgICAweDJjMGMKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19GT1JDRV9MSU5LX0RPV04gICAgICAgICBCSVQoMCkKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19GT1JDRV9MSU5LX1BBU1MgICAgICAgICBCSVQoMSkKKyNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19JTkJBTkRfQU5fRU5BQkxFICAgICAgICBCSVQoMikKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19DT05GSUdfTUlJX1NQRUVEICAgICAgICBCSVQoNSkKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19DT05GSUdfR01JSV9TUEVFRCAgICAgICBCSVQoNikKICNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19BTl9TUEVFRF9FTiAgICAgICAgICAgICBCSVQoNykKKyNkZWZpbmUgICAgICBNVk5FVEFfR01BQ19BTl9GTE9XX0NUUkxfRU4gICAgICAgICBCSVQoMTEpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX0ZVTExfRFVQTEVYICAgICAgQklUKDEyKQogI2RlZmluZSAgICAgIE1WTkVUQV9HTUFDX0FOX0RVUExFWF9FTiAgICAgICAgICAgIEJJVCgxMykKICNkZWZpbmUgTVZORVRBX01JQl9DT1VOVEVSU19CQVNFICAgICAgICAgICAgICAgICAweDMwODAKQEAgLTMwNCw2ICszMTAsNyBAQAogCXVuc2lnbmVkIGludCBsaW5rOwogCXVuc2lnbmVkIGludCBkdXBsZXg7CiAJdW5zaWduZWQgaW50IHNwZWVkOworCWludCB1c2VfaW5iYW5kX3N0YXR1czoxOwogfTsKIAogLyogVGhlIG12bmV0YV90eF9kZXNjIGFuZCBtdm5ldGFfcnhfZGVzYyBzdHJ1Y3R1cmVzIGRlc2NyaWJlIHRoZQpAQCAtO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GV2ICpkZXYsIHU4IHBvcnQsCisJCQkgIHUxNiAqYXZhaWxpYmxlX3ZwcCwgdTggKnZwcF9wX3VwKQoreworCWludCBpOworCWludCBlcnI7CisJc3RydWN0IG1seDRfY21kX21haWxib3ggKm1haWxib3g7CisJc3RydWN0IG1seDRfYWxsb2NfdnBwX3BhcmFtICpvdXRfcGFyYW07CisKKwltYWlsYm94ID0gbWx4NF9hbGxvY19jbWRfbWFpbGJveChkZXYpOworCWlmIChJU19FUlIobWFpbGJveCkpCisJCXJldHVybiBQVFJfRVJSKG1haWxib3gpOworCisJb3V0X3BhcmFtID0gbWFpbGJveC0+YnVmOworCisJZXJyID0gbWx4NF9jbWRfYm94KGRldiwgMCwgbWFpbGJveC0+ZG1hLCBwb3J0LAorCQkJICAgTUxYNF9BTExPQ0FURV9WUFBfUVVFUlksCisJCQkgICBNTFg0X0NNRF9BTExPQ0FURV9WUFAsCisJCQkgICBNTFg0X0NNRF9USU1FX0NMQVNTX0EsCisJCQkgICBNTFg0X0NNRF9OQVRJVkUpOworCWlmIChlcnIpCisJCWdvdG8gb3V0OworCisJLyogVG90YWwgbnVtYmVyIG9mIHN1cHBvcnRlZCBWUFBzICovCisJKmF2YWlsaWJsZV92cHAgPSAodTE2KWJlMzJfdG9fY3B1KG91dF9wYXJhbS0+YXZhaWxpYmxlX3ZwcCk7CisKKwlmb3IgKGkgPSAwOyBpIDwgTUxYNF9OVU1fVVA7IGkrKykKKwkJdnBwX3BfdXBbaV0gPSAodTgpYmUzMl90b19jcHUob3V0X3BhcmFtLT52cHBfcF91cFtpXSk7CisKK291dDoKKwltbHg0X2ZyZWVfY21kX21haWxib3goZGV2LCBtYWlsYm94KTsKKworCXJldHVybiBlcnI7Cit9CitFWFBPUlRfU1lNQk9MKG1seDRfQUxMT0NBVEVfVlBQX2dldCk7CisKK2ludCBtbHg0X0FMTE9DQVRFX1ZQUF9zZXQoc3RydWN0IG1seDRfZGV2ICpkZXYsIHU4IHBvcnQsIHU4ICp2cH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GFibGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBGbG93LCBncm91cCwgRkRCLCBpbnRlcm5hbCBWTEFOIGFuZCBuZWlnaCB0YWJsZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBpbnQgcm9ja2VyX2luaXRfdGJscyhzdHJ1Y3Qgcm9ja2VyICpyb2NrZXIpCiB7CkBAIC0yMTYzLDYgKzIyNDgsOSBAQAogCWhhc2hfaW5pdChyb2NrZXItPmludGVybmFsX3ZsYW5fdGJsKTsKIAlzcGluX2xvY2tfaW5pdCgmcm9ja2VyLT5pbnRlcm5hbF92bGFuX3RibF9sb2NrKTsKIAorCWhhc2hfaW5pdChyb2NrZXItPm5laWdoX3RibCk7CisJc3Bpbl9sb2NrX2luaXQoJnJvY2tlci0+bmVpZ2hfdGJsX2xvY2spOworCiAJcmV0dXJuIDA7CiB9CiAKQEAgLTIxNzMsNiArMjI2MSw3IEBACiAJc3RydWN0IHJvY2tlcl9ncm91cF90YmxfZW50cnkgKmdyb3VwX2VudHJ5OwogCXN0cnVjdCByb2NrZXJfZmRiX3RibF9lbnRyeSAqZmRiX2VudHJ5OwogCXN0cnVjdCByb2NrZXJfaW50ZXJuYWxfdmxhbl90YmxfZW50cnkgKmludGVybmFsX3ZsYW5fZW50cnk7CisJc3RydWN0IHJvY2tlcl9uZWlnaF90YmxfZW50cnkgKm5laWdoX2VudHJ5OwogCXN0cnVjdCBobGlzdF9ub2RlICp0bXA7CiAJaW50IGJrdDsKIApAQCAtMjE5NiwxNiArMjI4NSwyMiBAQAogCQkJICAgdG1wLCBpbnRlcm5hbF92bGFuX2VudHJ5LCBlbnRyeSkKIAkJaGFzaF9kZWwoJmludGVybmFsX3ZsYW5fZW50cnktPmVudHJ5KTsKIAlzcG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mluZF9zb2NrX3dvcmsoc3RydWN0IHdvcmtfc3RydWN0ICp3b3JrKQoreworCXN0cnVjdCBwcHBveF9zb2NrICpwbyA9IGNvbnRhaW5lcl9vZih3b3JrLCBzdHJ1Y3QgcHBwb3hfc29jaywKKwkJCQkJICAgICBwcm90by5wcHBvZS5wYWR0X3dvcmspOworCXN0cnVjdCBzb2NrICpzayA9IHNrX3BwcG94KHBvKTsKKworCWxvY2tfc29jayhzayk7CisJcHBwb3hfdW5iaW5kX3NvY2soc2spOworCXJlbGVhc2Vfc29jayhzayk7CisJc29ja19wdXQoc2spOworfQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogUmVjZWl2ZSBhIFBQUG9FIERpc2NvdmVyeSBmcmFtZS4KQEAgLTUwMCw3ICs1MTIsOCBAQAogCQl9CiAKIAkJYmhfdW5sb2NrX3NvY2soc2spOwotCQlzb2NrX3B1dChzayk7CisJCWlmICghc2NoZWR1bGVfd29yaygmcG8tPnByb3RvLnBwcG9lLnBhZHRfd29yaykpCisJCQlzb2NrX3B1dChzayk7CiAJfQogCiBhYm9ydDoKQEAgLTYxMyw2ICs2MjYsOCBAQAogCiAJbG9ja19zb2NrKHNrKTsKIAorCUlOSVRfV09SSygmcG8tPnByb3RvLnBwcG9lLnBhZHRfd29yaywgcHBwb2VfdW5iaW5kX3NvY2tfd29yayk7CisKIAllcnJvciA9IC1FSU5WQUw7CiAJaWYgKHNwLT5zYV9wcm90b2NvbCAhPSBQWF9QUk9UT19PRSkKIAkJZ290byBlbmQ7CkBAIC04MjAsOCArODM1LDggQEAKIAlyZXR1cm4gZXJyOwogfQogCi1zdGF0aWMgaW50IHBwcG9lX3NlbmRtc2coc3RydWN0IGtpb2NiICppb2NiLCBzdHJ1Y3Qgc29ja2V0ICpzb2NrLAotCQkgIHN0cnVjdCBtc2doZHIgKm0sIHNpemVfdCB0b3RhbF9sZW4p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zBfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0YjApCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF8xX0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGI0KQorI2RlZmluZSBBUl9QSFlfQUlDX0NUUkxfMl9CMCAgICAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDRiOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19DVFJMXzNfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0YmMpCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF80X0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGMwKQorCisjZGVmaW5lIEFSX1BIWV9BSUNfU1RBVF8wX0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGM0KQorI2RlZmluZSBBUl9QSFlfQUlDX1NUQVRfMV9CMCAgICAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDRjOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVEFUXzJfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0Y2MpCisKKyNkZWZpbmUgQVJfUEhZX0FJQ19DVFJMXzBfQjEgICAgICAgICAgICAgICAgICAgIChBUl9TTTFfQkFTRSArIDB4NGIwKQorI2RlZmluZSBBUl9QSFlfQUlDX0NUUkxfMV9CMSAgICAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg0YjQpCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF80X0IxICAgICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDRjMCkKKworI2RlZmluZSBBUl9QSFlfQUlDX1NUQVRfMF9CMSAgICAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg0YzQpCisjZGVmaW5lIEFSX1BIWV9BSUNfU1RBVF8xX0IxICAgICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDRjOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVEFUXzJfQjEgICAgICAgICAgICAgICAgICAgIChBUl9TTTFfQkFTRSArIDB4NGNjKQorCisjZGVmaW5lIEFSX1BIWV9BSUNfU1JBTV9BRERSX0IwICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NWYwKQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fREFUQV9CMCAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDVmNCkKKworI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fQUREUl9CMSAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg1ZjApCisjZGVmaW5lIEFSX1BIWV9BSUNfU1JBTV9EQVRBX0IxICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDVmNCkKKworI2RlZmluZSBBUl9QSFlfQlRfQ09FWF80ICAgICAgICAgICAgICAgICAgICAgICAgKEFSX0FHQ19CQVNFICsgMHg2MCkKKyNkZWZpbmUgQVJfUEhZX0JUX0NPRVhfNSAgICAgICAgICAgICAgICAgICAgICAgIChBUl9BR0NfQkFTRSArIDB4NjQpCisKKy8qIEFJQyBmaWVsZHMgKi8KKyNkZWZpbmUgQVJfUEhZX0FJQ19NT05fRU5BQkxFICAgICAgICAgICAgICAgICAgIDB4ODAwMDAwMDAKKyNkZWZpbmUgQVJfUEhZX0FJQ19NT05fRU5BQkxFX1MgICAgICAgICAgICAgICAgIDMxCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX01BWF9IT1BfQ09VTlQgICAgICAgICAgICAweDdGMDAwMDAwCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX01BWF9IT1BfQ09VTlRfUyAgICAgICAgICAyNAorI2RlZmluZSBBUl9QSFlfQUlDX0NBTF9NSU5fVkFMSURfQ09VTlQgICAgICAgICAgMHgwMEZFMDAwMAor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bmUgQVJfUEhZX0FJQ19TVERCWV9DT05EICAgICAgICAgICAgICAgICAgIDB4MDAwNjAwMDAKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVERCWV9DT05EX1MgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEFSX1BIWV9BSUNfU1REQllfUk9UX0FUVF9EQiAgICAgICAgICAgICAweDAwMDFGODAwCisjZGVmaW5lIEFSX1BIWV9BSUNfU1REQllfUk9UX0FUVF9EQl9TICAgICAgICAgICAxMQorI2RlZmluZSBBUl9QSFlfQUlDX1NUREJZX0NPTV9BVFRfREIgICAgICAgICAgICAgMHgwMDAwMDcwMAorI2RlZmluZSBBUl9QSFlfQUlDX1NUREJZX0NPTV9BVFRfREJfUyAgICAgICAgICAgOAorI2RlZmluZSBBUl9QSFlfQUlDX1JTU0lfTUFYICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDBGMAorI2RlZmluZSBBUl9QSFlfQUlDX1JTU0lfTUFYX1MgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBUl9QSFlfQUlDX1JTU0lfTUlOICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwRgorI2RlZmluZSBBUl9QSFlfQUlDX1JTU0lfTUlOX1MgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9QSFlfQUlDX1JBRElPX0RFTEFZICAgICAgICAgICAgICAgICAgMHg3RjAwMDAwMAorI2RlZmluZSBBUl9QSFlfQUlDX1JBRElPX0RFTEFZX1MgICAgICAgICAgICAgICAgMjQKKyNkZWZpbmUgQVJfUEhZX0FJQ19DQUxfU1RFUF9TSVpFX0NPUlIgICAgICAgICAgIDB4MDBGMDAwMDAKKyNkZWZpbmUgQVJfUEhZX0FJQ19DQUxfU1RFUF9TSVpFX0NPUlJfUyAgICAgICAgIDIwCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX1JPVF9JRFhfQ09SUiAgICAgICAgICAgICAweDAwMEY4MDAwCisjZGVmaW5lIEFSX1BI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ICAgICAgICAxCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX0FDVElWRSAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX0FDVElWRV9TICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQVJfUEhZX0FJQ19NRUFTX01BR19NSU4gICAgICAgICAgICAgICAgIDB4RkZDMDAwMDAKKyNkZWZpbmUgQVJfUEhZX0FJQ19NRUFTX01BR19NSU5fUyAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEFSX1BIWV9BSUNfTU9OX1NUQUxFX0NPVU5UICAgICAgICAgICAgICAweDAwM0Y4MDAwCisjZGVmaW5lIEFSX1BIWV9BSUNfTU9OX1NUQUxFX0NPVU5UX1MgICAgICAgICAgICAxNQorI2RlZmluZSBBUl9QSFlfQUlDX01PTl9IT1BfQ09VTlQgICAgICAgICAgICAgICAgMHgwMDAwN0YwMAorI2RlZmluZSBBUl9QSFlfQUlDX01PTl9IT1BfQ09VTlRfUyAgICAgICAgICAgICAgOAorI2RlZmluZSBBUl9QSFlfQUlDX0NBTF9BSUNfU00gICAgICAgICAgICAgICAgICAgMHgwMDAwMDBGOAorI2RlZmluZSBBUl9QSFlfQUlDX0NBTF9BSUNfU01fUyAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBUl9QSFlfQUlDX1NNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNworI2RlZmluZSBBUl9QSFlfQUlDX1NNX1MgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkFMSUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkFMSURfUyAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fUk9UX1FVQURfQVRUX0RCICAgICAgICAgMHgwMDAwMDA3RQorI2RlZmluZS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JTUVTVEFNUCAgICAgICAgICAgICAgIDB4MjAwMAorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDBfRElTQUJMRV9USU1FU1RBTVBfUyAgICAgICAgICAgICAxMworCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwNAorCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwOAorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDJfUkVTRVRfVFggICAgICAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMl9SRVNFVF9UWF9TICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQVJfTUNJX0NPTU1BTkQyX1JFU0VUX1JYICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDJfUkVTRVRfUlhfUyAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMl9SRVNFVF9SWF9OVU1fQ1lDTEVTICAgICAgICAgICAgIDB4M0ZDCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMl9SRVNFVF9SWF9OVU1fQ1lDTEVTX1MgICAgICAgICAgIDIKKyNkZWZpbmUgQVJfTUNJX0NPTU1BTkQyX1JFU0VUX1JFUV9XQUtFVVAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgQVJfTUNJX0NPTU1BTkQyX1JFU0VUX1JFUV9XQUtFVVBfUyAgICAgICAgICAgICAgMTAKKworI2RlZmluZSBBUl9NQ0lfUlhfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MGMKKworI2RlZmluZSBBUl9NQ0lfVFhfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MTAKKy8qCisgKiAwID0gbm8gZGl2aXNpb24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01TR19BVFRSSUJVVEVTX1RBQkxFX0lOVkFMSURfSERSX1MgICAgICAgMTYKKworI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MTgKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODFjCisjZGVmaW5lIEFSX01DSV9HUE1fMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgyMAorI2RlZmluZSBBUl9NQ0lfR1BNXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MjQKKyNkZWZpbmUgQVJfTUNJX0dQTV9XUklURV9QVFIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGMDAwMAorI2RlZmluZSBBUl9NQ0lfR1BNX1dSSVRFX1BUUl9TICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBUl9NQ0lfR1BNX0JVRl9MRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBGRkZGCisjZGVmaW5lIEFSX01DSV9HUE1fQlVGX0xFTl9TICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JBVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MjgKKworI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MmMKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9TV19NU0dfRE9ORSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1NXX01TR19ET05FX1MgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQ1BVX0lOVF9NU0cgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMD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fSU5URVJSVVBUX1JYX01TRyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMjAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1MgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SRU1PVEVfU0xFRVBfVVBEQVRFICAgICAgICAgICAgMHgwMDAwMDQwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JFTU9URV9TTEVFUF9VUERBVEVfUyAgICAgICAgICAxMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX1BSSSAgICAgICAgICAgICAgICAgICAgICAgICAweDA3ZmZmODAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfUFJJX1MgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfUFJJX1RIUkVTSCAgICAgICAgICAgICAgICAgIDB4MDgwMDAwMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CVF9QUklfVEhSRVNIX1MgICAgICAgICAgICAgICAgMjcKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CVF9GUkVRICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMDAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX0ZSRVFfUyAgICAgICAgICAgICAgICAgICAgICAyOAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX1NUT01QICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAwMDAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfU1RPTVBfUyAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQkJfQUlDX0lSUSAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDAwMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CQl9BSUNfSVJRX1MgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9DT05UX0lORk9fVElNRU9VVCAgICAgICAgICAgICAgMHg4MDAwMDAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0NPTlRfSU5GT19USU1FT1VUX1MgICAgICAgICAgICAzMQorCisjZGVmaW5lIEFSX01DSV9SRU1PVEVfQ1BVX0lOVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgzMAorI2RlZmluZSBBUl9NQ0lfUkVNT1RFX0NQVV9JTlRfRU4gICAgICAgICAgICAgICAgICAgICAgICAweDE4MzQKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfUkFXICAgICAgICAgICAgICAgICAgICAgMHgxODM4CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0VOICAgICAgICAgICAgICAgICAgICAgIDB4MTgzYworI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19SRU1PVEVfUkVTRVQgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1JFTU9URV9SRVNFVF9TICAgICAgICAgIDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfTE5BX0NPTlRST0wgICAgICAgICAgICAgMHgwMDAwMDAwMgorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19MTkFfQ09OVFJPTF9TICAgICAgICAgICAxCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0NPTlRfTkFDSyAgICAgICAgICAgICAgIDB4MDAwMDAwMDQKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfQ09OVF9OQUNLX1MgICAgICAgICAgICAgMgorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19DT05UX0lORk8gICAgICAgIC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VmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19XQUtJTkcgICAgICAgICAgICAgIDB4MDAwMDA4MDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfU1lTX1dBS0lOR19TICAgICAgICAgICAgMTEKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfUkVRX1dBS0UgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19SRVFfV0FLRV9TICAgICAgICAgICAgICAxMgorCisjZGVmaW5lIEFSX01DSV9DUFVfSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MAorCisjZGVmaW5lIEFSX01DSV9SWF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0NAorI2RlZmluZSBBUl9NQ0lfUlhfTEFTVF9TQ0hEX01TR19JTkRFWCAgICAgICAgICAgICAgICAgICAweDAwMDAwRjAwCisjZGVmaW5lIEFSX01DSV9SWF9MQVNUX1NDSERfTVNHX0lOREVYX1MgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVJfTUNJX1JYX1JFTU9URV9TTEVFUCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBBUl9NQ0lfUlhfUkVNT1RFX1NMRUVQX1MgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBUl9NQ0lfUlhfTUNJX0NMS19SRVEgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyMDAwCisjZGVmaW5lIEFSX01DSV9SWF9NQ0lfQ0xLX1JFUV9TICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisKKyNkZWZpbmUgQVJfTUNJX0NPTlRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODQ4CisjZGVmaW5lIEFSX01DSV9DT05UX1JTU0lfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwRkYKKyNkZWZpbmUgQVJfTUNJX0NPTlRfUlNTSV9QT1dFUl9TICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9NQ0lfQ09OVF9QUklPUklUWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBGRjAwCisjZGVmaW5lIEFSX01DSV9DT05UX1BSSU9SSVRZX1MgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVJfTUNJX0NPTlRfVFhSWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDAwMAorI2RlZmluZSBBUl9NQ0lfQ09OVF9UWFJYX1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorCisjZGVmaW5lIEFSX01DSV9CVF9QUkkwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0YworI2RlZmluZSBBUl9NQ0lfQlRfUFJJMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NTAKKyNkZWZpbmUgQVJfTUNJX0JUX1BSSTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODU0CisjZGVmaW5lIEFSX01DSV9CVF9QUkkzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1OAorI2RlZmluZSBBUl9NQ0lfQlRfUFJJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NWMKKyNkZWZpbmUgQVJfTUNJX1dMX0ZSRVEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwCisjZGVmaW5lIEFSX01DSV9XTF9GUkVRMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2NAorI2RlZmluZSBBUl9NQ0lfV0xfRlJFUTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjgKKyNkZWZpbmUgQVJfTUNJX0dBSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODZjCisjZGVmaW5lIEFSX01DSV9XQlRJTUVSMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MAorI2RlZmluZSBBUl9NQ0lfV0JUSU1FUjIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzQKKyNkZWZpbmUgQVJfTUNJX1dCVElNRVIzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODc4CisjZGVmaW5lIEFSX01DSV9XQlRJTUVSNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3YworI2RlZmluZSBBUl9NQ0lfTUFYR0FJTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4ODAKKyNkZWZpbmUgQVJfTUNJX0hXX1NDSERfVEJMX0NUTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODg0CisjZGVmaW5lIEFSX01DSV9IV19TQ0hEX1RCTF9EMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg4OAorI2RlZmluZSBBUl9NQ0lfSFdfU0NIRF9UQkxfRDEgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4OGMKKyNkZWZpbmUgQVJfTUNJX0hXX1NDSERfVEJMX0QyICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODkwCisjZGVmaW5lIEFSX01DSV9IV19TQ0hEX1RCTF9EMyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg5NAorI2RlZmluZSBBUl9NQ0lfVFhfUEFZTE9BRDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4OTgKKyNkZWZpbmUgQVJfTUNJX1RYX1BBWUxPQUQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODljCisjZGVmaW5lIEFSX01DSV9UWF9QQVlMT0FEMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThhMAorI2RlZmluZSBBUl9NQ0lfVFhfUEFZTE9BRDMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YTQKKyNkZWZpbmUgQVJfQlRDT0VYX1dCVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGE4CisKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGFjCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX0FSOTQ2Ml9NT0RFICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfQVI5NDYyX01PREVfUyAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9XQlRJTUVSX0VOICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1dCVElNRVJfRU5fUyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfTUNJX01PREVfRU4gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9NQ0lfTU9ERV9FTl9TICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX0xOQV9TSEFSRUQgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDgKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfTE5BX1NIQVJFRF9TICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9QQV9TSEFSRUQgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEwCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1BBX1NIQVJFRF9TICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfT05FX1NURVBfTE9PS19BSEVBRF9FTiAg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DIwCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1dBSVRfQkFfTUFSR0lOICAgICAgICAgICAgICAgICAgIDB4MUZFMDAwMDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfV0FJVF9CQV9NQVJHSU5fUyAgICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfUkVEVUNFX1RYUFdSICAgICAgICAgICAgICAgICAgICAgMHgyMDAwMDAwMAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9SRURVQ0VfVFhQV1JfUyAgICAgICAgICAgICAgICAgICAyOQorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9TUERUX0VOQUJMRV8xMCAgICAgICAgICAgICAgICAgICAweDQwMDAwMDAwCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1NQRFRfRU5BQkxFXzEwX1MgICAgICAgICAgICAgICAgIDMwCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1NQRFRfUE9MQVJJVFkgICAgICAgICAgICAgICAgICAgIDB4ODAwMDAwMDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfU1BEVF9QT0xBUklUWV9TICAgICAgICAgICAgICAgICAgMzEKKworI2RlZmluZSBBUl9CVENPRVhfV0xfV0VJR0hUUzAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YjAKKyNkZWZpbmUgQVJfQlRDT0VYX1dMX1dFSUdIVFMxICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGI0CisjZGVmaW5lIEFSX0JUQ09FWF9XTF9XRUlHSFRTMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThiOAorI2RlZmluZSBBUl9CVENPRVhfV0xfV0VJR0hUUzMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YmMKKworI2RlZmluZSBBUl9CVENPRVhfTUFYX1RYUFdSKF94KSAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxOGMwICsgKChfeCkgPDwgMikpCisjZGVmaW5lIEFSX0JUQ09FWF9XTF9MTkEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTk0MAorI2RlZmluZSBBUl9CVENPRVhfUkZHQUlOX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE5NDQKKyNkZWZpbmUgQVJfQlRDT0VYX1dMX0xOQV9USU1FT1VUICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDNGRkZGRgorI2RlZmluZSBBUl9CVENPRVhfV0xfTE5BX1RJTUVPVVRfUyAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTQ4CisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMl9UWFBXUl9USFJFU0ggICAgICAgICAgICAgICAgICAgIDB4MDAwN0Y4MDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyX1RYUFdSX1RIUkVTSF9TICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyX1RYX0NIQUlOX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDM4MDAwMAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTDJfVFhfQ0hBSU5fTUFTS19TICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBBUl9CVENPRVhfQ1RSTDJfUlhfREVXRUlHSFQgICAgICAgICAgICAgICAgICAgICAweDAwNDAwMDAwCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMl9SWF9ERVdFSUdIVF9TICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMl9HUElPX09CU19TRUwgICAgICAgICAgICAgICAgICAgIDB4MDA4MDAwMDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyX0dQSU9fT0JTX1NFTF9TICAgICAgICAgICAgICAgICAgMjMKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwy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yAgICAgICAgICAgICAgICAgICAgICAgIDE4CisKKyNkZWZpbmUgQVJfQlRDT0VYX1JDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTRjCisjZGVmaW5lIEFSX0JUQ09FWF9NQVhfUkZHQUlOKF94KSAgICAgICAgICAgICAgICAgICAgICAgICgweDE5NTAgKyAoKF94KSA8PCAyKSkKKyNkZWZpbmUgQVJfQlRDT0VYX0RCRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxYTUwCisjZGVmaW5lIEFSX01DSV9MQVNUX0hXX01TR19IRFIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE1NAorI2RlZmluZSBBUl9NQ0lfTEFTVF9IV19NU0dfQkRZICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNTgKKworI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNWMKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMl9NRU1fQkFTRUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8yX01FTV9CQVNFRF9TICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9TQ0hEX1RBQkxFXzJfSFdfQkFTRUQgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMl9IV19CQVNFRF9TICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE2MAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTDNfQ09OVF9JTkZPX1RJTUVPVVQgICAgICAgICAgICAgICAweDAwMDAwZmZmCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMM19DT05UX0lORk9fVElNRU9VVF9TICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9HTEJfU1dSRUdfRElTQ09OVF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAweDIwMDJjCisjZGVmaW5lIEFSX0dMQl9TV1JFR19ESVNDT05UX0VOX0JUX1dMQU4gICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIEFSX01DSV9NSVNDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE3NAorI2RlZmluZSBBUl9NQ0lfTUlTQ19IV19GSVhfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEFSX01DSV9NSVNDX0hXX0ZJWF9FTl9TICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9NQ0lfREJHX0NOVF9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNzgKKyNkZWZpbmUgQVJfTUNJX0RCR19DTlRfQ1RSTF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9NQ0lfREJHX0NOVF9DVFJMX0VOQUJMRV9TICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9EQkdfQ05UX0NUUkxfQlRfTElOS0lEICAgICAgICAgICAgICAgICAgIDB4MDAwMDA3ZjgKKyNkZWZpbmUgQVJfTUNJX0RCR19DTlRfQ1RSTF9CVF9MSU5LSURfUyAgICAgICAgICAgICAgICAgMworCisjZGVmaW5lIE1DSV9TVEFUX0FMTF9CVF9MSU5LSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZmZmZgorCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfREVGQVVMVCAoQVJfTUNJX0lOVEVSUlVQVF9TV19NU0dfRE9ORSAgICAgICAgIHwgXAorCQkJCSAgQVJfTUNJX0lOVEVSUlVQVF9SWF9JTlZBTElEX0hEUiAgICAgIHwgXAorCQkJCSAgQVJfTUNJX0lOVEVSUlV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OVF9OQUNLICAgfCBcCisJCQkJCSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19DT05UX0lORk8gICB8IFwKKwkJCQkJIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0NPTlRfUlNUKQorCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0RFRkFVTFQgKEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0dQTSAgICAgICAgICAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1JFTU9URV9SRVNFVCAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19XQUtJTkcgICAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19TTEVFUElORyAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1JFUV9XQUtFKQorCisjZW5kaWYgLyogUkVHX01DSV9IICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC93aXJlbGVzcy9hdGgvYXRoOWsvcmVnX3dvdy5oIGIvZHJpdmVycy9uZXQvd2lyZWxlc3MvYXRoL2F0aDlrL3JlZ193b3cuaAppbmRleCAzYWJmY2E1Li40NTMwNTQwIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC93aXJlbGVzcy9hdGgvYXRoOWsvcmVnX3dvdy5oCisrKyBiL2RyaXZlcnMvbmV0L3dpcmVsZXNzL2F0aC9hdGg5ay9yZWdfd293LmgKQEAgLTcyLDcgKzcyLDcgQEAKICNkZWZpbmUgQVJfV09XX01BQ19JTlRSX0VOICAgICAgICAgICAgICAweDAwMDQwMDAwCiAjZGVmaW5lIEFSX1dPV19NQUdJQ19FTiAgICAgICAgICAgICAgICAgMHgwMDAxMDAwMAogI2RlZmluZSBBUl9XT1dfUEFUVEVSTl9FTih4KSAgICAgICAgICAgICh4ICYgMHhmZikKLSNkZWZpbmUgQVJfV09XX1BBVF9GT1VORF9TSElGVCAgOAorI2RlZmluZSBBUl9XT1dfUEFUX0ZPVU5EX1NISUZUICAgICAgICAgIDgKICNkZWZpbmUgQVJfV09XX1BBVFRFUk5fRk9VTkQoeCkgICAgICAgICAoeCAmICgweGZmIDw8IEFSX1dPV19QQVRfRk9VTkRfU0hJRlQpKQogI2RlZmluZSBBUl9XT1dfUEFUVEVSTl9GT1VORF9NQVNLICAgICAgICgoMHhmZikgPDwgQVJfV09XX1BBVF9GT1VORF9TSElGVCkKICNkZWZpbmUgQVJfV09XX01BR0lDX1BBVF9GT1VORCAgICAgICAgICAweDAwMDIwMDAwCkBAIC05MCw2ICs5MCwxNCBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUl9XT1dfQkVBQ09OX0ZBSUwgfAlcCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX1dPV19LRUVQX0FMSVZFX0ZBSUwpKQogCisjZGVmaW5lIEFSX1dPVzJfUEFUVEVSTl9FTih4KSAgICAgICAgICAgKCh4ICYgMHhmZikgPDwgMCkKKyNkZWZpbmUgQVJfV09XMl9QQVRURVJOX0ZPVU5EX1NISUZUICAgICA4CisjZGVmaW5lIEFSX1dPVzJfUEFUVEVSTl9GT1VORCh4KSAgICAgICAgKHggJiAoMHhmZiA8PCBBUl9XT1cyX1BBVFRFUk5fRk9VTkRfU0hJRlQpKQorI2RlZmluZSBBUl9XT1cyX1BBVFRFUk5fRk9VTkRfTUFTSyAgICAgICgoMHhmZikgPDwgQVJfV09XMl9QQVRURVJOX0ZPVU5EX1NISUZUKQorCisjZGVmaW5lIEFSX1dPV19TVEFUVVMyKHgpICAgICAgICAgICAgICAgKHggJ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HJ1Y3QgbnhwX25jaV9pbmZvICppbmZvID0gbmNpX2dldF9kcnZkYXRhKG5kZXYpOworCWludCByID0gMDsKKworCW11dGV4X2xvY2soJmluZm8tPmluZm9fbG9jayk7CisKKwlpZiAoaW5mby0+cGh5X29wcy0+c2V0X21vZGUpCisJCXIgPSBpbmZvLT5waHlfb3BzLT5zZXRfbW9kZShpbmZvLT5waHlfaWQsIE5YUF9OQ0lfTU9ERV9DT0xEKTsKKworCWluZm8tPm1vZGUgPSBOWFBfTkNJX01PREVfQ09MRDsKKworCW11dGV4X3VubG9jaygmaW5mby0+aW5mb19sb2NrKTsKKwlyZXR1cm4gcjsKK30KKworc3RhdGljIGludCBueHBfbmNpX3NlbmQoc3RydWN0IG5jaV9kZXYgKm5kZXYsIHN0cnVjdCBza19idWZmICpza2IpCit7CisJc3RydWN0IG54cF9uY2lfaW5mbyAqaW5mbyA9IG5jaV9nZXRfZHJ2ZGF0YShuZGV2KTsKKwlpbnQgcjsKKworCWlmICghaW5mby0+cGh5X29wcy0+d3JpdGUpIHsKKwkJciA9IC1FTk9UU1VQUDsKKwkJZ290byBzZW5kX2V4aXQ7CisJfQorCisJaWYgKGluZm8tPm1vZGUgIT0gTlhQX05DSV9NT0RFX05DSSkgeworCQlyID0gLUVJTlZBTDsKKwkJZ290byBzZW5kX2V4aXQ7CisJfQorCisJciA9IGluZm8tPnBoeV9vcHMtPndyaXRlKGluZm8tPnBoeV9pZCwgc2tiKTsKKwlpZiAociA8IDApCisJCWtmcmVlX3NrYihza2IpOworCitzZW5kX2V4aXQ6CisJcmV0dXJuIHI7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgbmNpX29wcyBueHBfbmNpX29wcyA9IHsKKwkub3BlbiA9IG54cF9uY2lfb3BlbiwKKwkuY2xvc2UgPSBueHBfbmNpX2Nsb3NlLAorCS5zZW5kID0gbnhwX25jaV9zZW5kLAorCS5md19kb3dubG9hZCA9IG54cF9uY2lfZndfZG93bmxvYWQsCit9OworCitpbnQg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c3QgKi8KK3N0YXRpYyB1MTYgbnhwX25jaV9md19jcmModTggY29uc3QgKmJ1ZmZlciwgc2l6ZV90IGxlbikKK3sKKwl1MTYgY3JjID0gMHhmZmZmOworCisJd2hpbGUgKGxlbi0tKSB7CisJCWNyYyA9ICgoY3JjID4+IDgpIHwgKGNyYyA8PCA4KSkgXiAqYnVmZmVyKys7CisJCWNyYyBePSAoY3JjICYgMHhmZikgPj4gNDsKKwkJY3JjIF49IChjcmMgJiAweGZmKSA8PCAxMjsKKwkJY3JjIF49IChjcmMgJiAweGZmKSA8PCA1OworCX0KKworCXJldHVybiBjcmM7Cit9CisKK3N0YXRpYyBpbnQgbnhwX25jaV9md19zZW5kX2NodW5rKHN0cnVjdCBueHBfbmNpX2luZm8gKmluZm8pCit7CisJc3RydWN0IG54cF9uY2lfZndfaW5mbyAqZndfaW5mbyA9ICZpbmZvLT5md19pbmZvOworCXUxNiBoZWFkZXIsIGNyYzsKKwlzdHJ1Y3Qgc2tfYnVmZiAqc2tiOworCXNpemVfdCBjaHVua19sZW47CisJc2l6ZV90IHJlbWFpbmluZ19sZW47CisJaW50IHI7CisKKwlza2IgPSBuY2lfc2tiX2FsbG9jKGluZm8tPm5kZXYsIGluZm8tPm1heF9wYXlsb2FkLCBHRlBfS0VSTkVMKTsKKwlpZiAoIXNrYikgeworCQlyID0gLUVOT01FTTsKKwkJZ290byBjaHVua19leGl0OworCX0KKworCWNodW5rX2xlbiA9IGluZm8tPm1heF9wYXlsb2FkIC0gTlhQX05DSV9GV19IRFJfTEVOIC0gTlhQX05DSV9GV19DUkNfTEVOOworCXJlbWFpbmluZ19sZW4gPSBmd19pbmZvLT5mcmFtZV9zaXplIC0gZndfaW5mby0+d3JpdHRlbjsKKworCWlmIChyZW1haW5pbmdfbGVuID4gY2h1bmtfbGVuKSB7CisJCWhlYWRlciA9IE5YUF9OQ0lfRldfQ0hVTktfRkxBRzsKKwl9IGVsc2UgeworCQljaHVua19sZW4gPSByZW1haW5pbmdfbGVuOworCQloZWFkZXIgPSAweDAwMDA7CisJfQorCisJaGVhZGVyIHw9IGNodW5rX2xlbiAmIE5YUF9OQ0lfRldfRlJBTUVfTEVOX01BU0s7CisJcHV0X3VuYWxpZ25lZF9iZTE2KGhlYWRlciwgc2tiX3B1dChza2IsIE5YUF9OQ0lfRldfSERSX0xFTikpOworCisJbWVtY3B5KHNrYl9wdXQoc2tiLCBjaHVua19sZW4pLCBmd19pbmZvLT5kYXRhICsgZndfaW5mby0+d3JpdHRlbiwKKwkgICAgICAgY2h1bmtfbGVuKTsKKworCWNyYyA9IG54cF9uY2lfZndfY3JjKHNrYi0+ZGF0YSwgY2h1bmtfbGVuICsgTlhQX05DSV9GV19IRFJfTEVOKTsKKwlwdXRfdW5hbGlnbmVkX2JlMTYoY3JjLCBza2JfcHV0KHNrYiwgTlhQX05DSV9GV19DUkNfTEVOKSk7CisKKwlyID0gaW5mby0+cGh5X29wcy0+d3JpdGUoaW5mby0+cGh5X2lkLCBza2IpOworCWlmIChyID49IDApCisJCXIgPSBjaHVua19sZW47CisKKwlrZnJlZV9za2Ioc2tiKTsKKworY2h1bmtfZXhpdDoKKwlyZXR1cm4gcjsKK30KKworc3RhdGljIGludCBueHBfbmNpX2Z3X3NlbmQoc3RydWN0IG54cF9uY2lfaW5mbyAqaW5mbykKK3sKKwlzdHJ1Y3QgbnhwX25jaV9md19pbmZvICpmd19pbmZvID0gJmluZm8tPmZ3X2luZm87CisJbG9uZyBjb21wbGV0aW9uX3JjOworCWludCByOworCisJcmVpbml0X2NvbXBsZXRpb24oJmZ3X2luZm8tPmNtZF9jb21wbGV0aW9uKTsKKworCWlmIChmd19pbmZvLT53cml0dGVuID09IDApIHsKKwkJZndfaW5mby0+ZnJhbWVfc2l6ZSA9IGdldF91bmFsaWduZWRfYmUxNihmd19pbmZvLT5kYXRhKSAmCisJCQkJICAgICAgTlhQX05DSV9GV19GUkFNRV9MRU5fTUFTSzsKKwkJZndfaW5mby0+ZGF0YSArPSBOWFBfTk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V4L29mX3BsYXRmb3JtLmg+CisjaW5jbHVkZSA8bGludXgvcGh5L3BoeS5oPgorCisjaW5jbHVkZSAicGNpZS1pcHJvYy5oIgorCisjZGVmaW5lIENMS19DT05UUk9MX09GRlNFVCAgICAgICAgICAgMHgwMDAKKyNkZWZpbmUgRVBfTU9ERV9TVVJWSVZFX1BFUlNUX1NISUZUICAxCisjZGVmaW5lIEVQX01PREVfU1VSVklWRV9QRVJTVCAgICAgICAgQklUKEVQX01PREVfU1VSVklWRV9QRVJTVF9TSElGVCkKKyNkZWZpbmUgUkNfUENJRV9SU1RfT1VUUFVUX1NISUZUICAgICAwCisjZGVmaW5lIFJDX1BDSUVfUlNUX09VVFBVVCAgICAgICAgICAgQklUKFJDX1BDSUVfUlNUX09VVFBVVF9TSElGVCkKKworI2RlZmluZSBDRkdfSU5EX0FERFJfT0ZGU0VUICAgICAgICAgIDB4MTIwCisjZGVmaW5lIENGR19JTkRfQUREUl9NQVNLICAgICAgICAgICAgMHgwMDAwMWZmYworCisjZGVmaW5lIENGR19JTkRfREFUQV9PRkZTRVQgICAgICAgICAgMHgxMjQKKworI2RlZmluZSBDRkdfQUREUl9PRkZTRVQgICAgICAgICAgICAgIDB4MWY4CisjZGVmaW5lIENGR19BRERSX0JVU19OVU1fU0hJRlQgICAgICAgMjAKKyNkZWZpbmUgQ0ZHX0FERFJfQlVTX05VTV9NQVNLICAgICAgICAweDBmZjAwMDAwCisjZGVmaW5lIENGR19BRERSX0RFVl9OVU1fU0hJRlQgICAgICAgMTUKKyNkZWZpbmUgQ0ZHX0FERFJfREVWX05VTV9NQVNLICAgICAgICAweDAwMGY4MDAwCisjZGVmaW5lIENGR19BRERSX0ZVTkNfTlVNX1NISUZUICAgICAgMTIKKyNkZWZpbmUgQ0ZHX0FERFJfRlVOQ19OVU1fTUFTSyAgICAgICAweDAwMDA3MDAwCisjZGVmaW5lIENGR19BRERSX1JFR19OVU1fU0hJRlQgICAgICAgMgorI2RlZmluZSBDRkdfQUREUl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0RFU0MoQkNNMjgxWFhfUElOX1ZDX0NBTTNfU0RBLCAidmNfY2FtM19zZGEiLCBpMmMpLAorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBiY20yODF4eF9hbHRfZ3JvdXBzW10gPSB7CisJImFkY3N5bmMiLAorCSJiYXRfcm0iLAorCSJic2MxX3NjbCIsCisJImJzYzFfc2RhIiwKKwkiYnNjMl9zY2wiLAorCSJic2MyX3NkYSIsCisJImNsYXNzZ3B3ciIsCisJImNsa19jeDgiLAorCSJjbGtvdXRfMCIsCisJImNsa291dF8xIiwKKwkiY2xrb3V0XzIiLAorCSJjbGtvdXRfMyIsCisJImNsa3JlcV9pbl8wIiwKKwkiY2xrcmVxX2luXzEiLAorCSJjd3Nfc3lzX3JlcTEiLAorCSJjd3Nfc3lzX3JlcTIiLAorCSJjd3Nfc3lzX3JlcTMiLAorCSJkaWdtaWMxX2NsayIsCisJImRpZ21pYzFfZHEiLAorCSJkaWdtaWMyX2NsayIsCisJImRpZ21pYzJfZHEiLAorCSJncGVuMTMiLAorCSJncGVuMTQiLAorCSJncGVuMTUiLAorCSJncGlvMDAiLAorCSJncGlvMDEiLAorCSJncGlvMDIiLAorCSJncGlvMDMiLAorCSJncGlvMDQiLAorCSJncGlvMDUiLAorCSJncGlvMDYiLAorCSJncGlvMDciLAorCSJncGlvMDgiLAorCSJncGlvMDkiLAorCSJncGlvMTAiLAorCSJncGlvMTEiLAorCSJncGlvMTIiLAorCSJncGlvMTMiLAorCSJncGlvMTQiLAorCSJncHNfcGFibGFuayIsCisJImdwc190bWFyayIsCisJImhkbWlfc2NsIiwKKwkiaGRtaV9zZGEiLAorCSJpY19kbSIsCisJImljX2RwIiwKKwkia3BfY29sX2lwXzAiLAorCSJrcF9jb2xfaXBfMSIsCisJImtwX2NvbF9pcF8yIiwKKwkia3BfY29sX2lwXzMiLAorCSJrcF9yb3dfb3BfMCIsCisJImtwX3Jvd19vcF8xIiwKKwkia3Bfcm93X29wXzIiL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c1tdID0geworCSJncGlvMCIsCisJImdwaW8xIiwKKwkiZ3BpbzIiLAorCSJncGlvMyIsCisJImdwaW80IiwKKwkiZ3BpbzUiLAorCSJncGlvNiIsCisJImdwaW83IiwKKwkiZ3BpbzgiLAorCSJncGlvOSIsCisJImdwaW8xMCIsCisJImdwaW8xMSIsCisJImdwaW8xMiIsCisJImdwaW8xMyIsCisJImdwaW8xNCIsCisJImdwaW8xNSIsCisJImdwaW8xNiIsCisJImdwaW8xNyIsCisJImdwaW8xOCIsCisJImdwaW8xOSIsCisJImdwaW8yMCIsCisJImdwaW8yMSIsCisJImdwaW8yMiIsCisJImdwaW8yMyIsCisJImdwaW8yNCIsCisJImdwaW8yNSIsCisJImdwaW8yNiIsCisJImdwaW8yNyIsCisJImdwaW8yOCIsCisJImdwaW8yOSIsCisJImdwaW8zMCIsCisJImdwaW8zMSIsCisJImdwaW8zMiIsCisJImdwaW8zMyIsCisJImdwaW8zNCIsCisJImdwaW8zNSIsCisJImdwaW8zNiIsCisJImdwaW8zNyIsCisJImdwaW8zOCIsCisJImdwaW8zOSIsCisJImdwaW80MCIsCisJImdwaW80MSIsCisJImdwaW80MiIsCisJImdwaW80MyIsCisJImdwaW80NCIsCisJImdwaW80NSIsCisJImdwaW80NiIsCisJImdwaW80NyIsCisJImdwaW80OCIsCisJImdwaW80OSIsCisJImdwaW81MCIsCisJImdwaW81MSIsCisJImdwaW81MiIsCisJImdwaW81MyIsCit9OworCitlbnVtIGJjbTI4MzVfZnNlbCB7CisJQkNNMjgzNV9GU0VMX0dQSU9fSU4gPSAwLAorCUJDTTI4MzVfRlNFTF9HUElPX09VVCA9IDEsCisJQkNNMjgzNV9GU0VMX0FMVDAgPSA0LAorCUJDTTI4MzVfRlNFTF9BTFQxID0gNSwKKwlCQ00yODM1X0ZTRUxfQUxUMiA9IDYsCisJQkNNMjgzNV9GU0VMX0FMVDMgPSA3LAorCUJDTTI4MzVfRlNFTF9BTFQ0ID0gMywKKwlCQ00yODM1X0Z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UElOX0RFU0MoMTUsICJncGlvMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxNiwgImdwaW80IiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDE3LCAiZ3BpbzUiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMTgsICJncGlvNiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxOSwgImdwaW83IiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDIwLCAiZ3BpbzgiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMjEsICJncGlvOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMiwgImdwaW8xMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMywgImdwaW8xMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNCwgImdwaW8xMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNSwgImdwaW8xMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNiwgImdwaW8xNCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNywgImdwaW8xNSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOCwgImdwaW8xNiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOSwgImdwaW8xNyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMCwgImdwaW8xOCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMSwgImdwaW8xOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMiwgImdwaW8yMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMywgImdwaW8yMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNCwgImdwaW8yMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNSwgImdwaW8yMyIsIDAsIDAsID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HlfY29udGV4dCB7CisJdTMyICppbnRtYXNrOworfTsKKworc3RydWN0IGludGVsX3BpbmN0cmxfY29udGV4dCB7CisJc3RydWN0IGludGVsX3BhZF9jb250ZXh0ICpwYWRzOworCXN0cnVjdCBpbnRlbF9jb21tdW5pdHlfY29udGV4dCAqY29tbXVuaXRpZXM7Cit9OworCisvKioKKyAqIHN0cnVjdCBpbnRlbF9waW5jdHJsIC0gSW50ZWwgcGluY3RybCBwcml2YXRlIHN0cnVjdHVyZQorICogQGRldjogUG9pbnRlciB0byB0aGUgZGV2aWNlIHN0cnVjdHVyZQorICogQGxvY2s6IExvY2sgdG8gc2VyaWFsaXplIHJlZ2lzdGVyIGFjY2VzcworICogQHBjdGxkZXNjOiBQaW4gY29udHJvbGxlciBkZXNjcmlwdGlvbgorICogQHBjdGxkZXY6IFBvaW50ZXIgdG8gdGhlIHBpbiBjb250cm9sbGVyIGRldmljZQorICogQGNoaXA6IEdQSU8gY2hpcCBpbiB0aGlzIHBpbiBjb250cm9sbGVyCisgKiBAc29jOiBTb0MvUENIIHNwZWNpZmljIHBpbiBjb25maWd1cmF0aW9uIGRhdGEKKyAqIEBjb21tdW5pdGllczogQWxsIGNvbW11bml0aWVzIGluIHRoaXMgcGluIGNvbnRyb2xsZXIKKyAqIEBuY29tbXVuaXRpZXM6IE51bWJlciBvZiBjb21tdW5pdGllcyBpbiB0aGlzIHBpbiBjb250cm9sbGVyCisgKiBAY29udGV4dDogQ29uZmlndXJhdGlvbiBzYXZlZCBvdmVyIHN5c3RlbSBzbGVlcAorICovCitzdHJ1Y3QgaW50ZWxfcGluY3RybCB7CisJc3RydWN0IGRldmljZSAqZGV2OworCXNwaW5sb2NrX3QgbG9jazsKKwlzdHJ1Y3QgcGluY3RybF9kZXNjIHBjdGxkZXNjOworCXN0cnVjdCBwaW5jdHJsX2RldiAqcGN0bGRldjsKKwlzdHJ1Y3QgZ3Bpb19jaGlwIGNoaXA7CisJY29uc3Qgc3RydWN0IGludGVsX3BpbmN0cmxfc29jX2RhdGEgKnNvYzsKKwlzdHJ1Y3QgaW50ZWxfY29tbXVuaXR5ICpjb21tdW5pdGllczsKKwlzaXplX3QgbmNvbW11bml0aWVzOworCXN0cnVjdCBpbnRlbF9waW5jdHJsX2NvbnRleHQgY29udGV4dDsKK307CisKKyNkZWZpbmUgZ3Bpb2NoaXBfdG9fcGluY3RybChjKQljb250YWluZXJfb2YoYywgc3RydWN0IGludGVsX3BpbmN0cmwsIGNoaXApCisjZGVmaW5lIHBpbl90b19wYWRubyhjLCBwKQkoKHApIC0gKGMpLT5waW5fYmFzZSkKKworc3RhdGljIHN0cnVjdCBpbnRlbF9jb21tdW5pdHkgKmludGVsX2dldF9jb21tdW5pdHkoc3RydWN0IGludGVsX3BpbmN0cmwgKnBjdHJsLAorCQkJCQkJICAgdW5zaWduZWQgcGluKQoreworCXN0cnVjdCBpbnRlbF9jb21tdW5pdHkgKmNvbW11bml0eTsKKwlpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCBwY3RybC0+bmNvbW11bml0aWVzOyBpKyspIHsKKwkJY29tbXVuaXR5ID0gJnBjdHJsLT5jb21tdW5pdGllc1tpXTsKKwkJaWYgKHBpbiA+PSBjb21tdW5pdHktPnBpbl9iYXNlICYmCisJCSAgICBwaW4gPCBjb21tdW5pdHktPnBpbl9iYXNlICsgY29tbXVuaXR5LT5ucGlucykKKwkJCXJldHVybiBjb21tdW5pdHk7CisJfQorCisJZGV2X3dhcm4ocGN0cmwtPmRldiwgImZhaWxlZCB0byBmaW5kIGNvbW11bml0eSBmb3IgcGluICV1XG4iLCBwaW4pOworCXJldHVybiBOVUxMOworfQorCitzdGF0aWMgdm9pZCBfX2lvbWVtICppbnRlbF9nZXRfcGFkY2ZnKHN0cnVjdCBpbnRlbF9waW5jdHJsICpwY3RybCwgdW5zaWduZWQgcGluLAorCQkJCSAgICAgIHVuc2lnbmVkIHJlZykKK3sKKwljb25zdCBzdHJ1Y3QgaW50ZWxfY29tbXVuaXR5ICpjb21tdW5pdHk7CisJdW5zaWduZWQgcGFkbm87CisKKwljb21tdW5pdHkgPSBpbnRlbF9nZXRfY29tbXVuaXR5KHBjdHJsLCBwaW4pOworCWlmICghY29tbXVuaXR5KQorCQlyZXR1cm4gTlVMTDsKKworCXBhZG5vID0gcGluX3RvX3BhZG5vKGNvbW11bml0eSwgcGluKTsKKwlyZXR1cm4gY29tbXVuaXR5LT5wYWRfcmVncyArIHJlZyArIHBhZG5vICogODsKK30KKworc3RhdGljIGJvb2wgaW50ZWxfcGFkX293bmVkX2J5X2hvc3Qoc3RydWN0IGludGVsX3BpbmN0cmwgKnBjdHJsLCB1bnNpZ25lZCBwaW4pCit7CisJY29uc3Qgc3RydWN0IGludGVsX2NvbW11bml0eSAqY29tbXVuaXR5OworCXVuc2lnbmVkIHBhZG5vLCBncHAsIGdwcF9vZmZzZXQsIG9mZnNldDsKKwl2b2lkIF9faW9tZW0gKnBhZG93bjsKKworCWNvbW11bml0eSA9IGludGVsX2dldF9jb21tdW5pdHkocGN0cmwsIHBpbik7CisJaWYgKCFjb21tdW5pdHkpCisJCXJldHVybiBmYWxzZTsKKwlpZiAoIWNvbW11bml0eS0+cGFkb3duX29mZnNldCkKKwkJcmV0dXJuIHRydWU7CisKKwlwYWRubyA9IHBpbl90b19wYWRubyhjb21tdW5pdHksIHBpbik7CisJZ3BwID0gcGFkbm8gLyBOUEFEU19JTl9HUFA7CisJZ3BwX29mZnNldCA9IHBhZG5vICUgTlBBRFNfSU5fR1BQOworCW9mZnNldCA9IGNvbW11bml0eS0+cGFkb3duX29mZnNldCArIGdwcCAqIDE2ICsgKGdwcF9vZmZzZXQgLyA4KSAqIDQ7CisJcGFkb3duID0gY29tbXVuaXR5LT5yZWdzICsgb2Zmc2V0OworCisJcmV0dXJuICEocmVhZGwocGFkb3duKSAmIFBBRE9XTl9NQVNLKHBhZG5vKSk7Cit9CisKK3N0YXRpYyBib29sIGludGVsX3BhZF9yZXNlcnZlZF9mb3JfYWNwaShzdHJ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iAoIXBhZHMpCisJCXJldHVybiAtRU5PTUVNOworCisJY29tbXVuaXRpZXMgPSBkZXZtX2tjYWxsb2MocGN0cmwtPmRldiwgcGN0cmwtPm5jb21tdW5pdGllcywKKwkJCQkgICBzaXplb2YoKmNvbW11bml0aWVzKSwgR0ZQX0tFUk5FTCk7CisJaWYgKCFjb21tdW5pdGllcykKKwkJcmV0dXJuIC1FTk9NRU07CisKKworCWZvciAoaSA9IDA7IGkgPCBwY3RybC0+bmNvbW11bml0aWVzOyBpKyspIHsKKwkJc3RydWN0IGludGVsX2NvbW11bml0eSAqY29tbXVuaXR5ID0gJnBjdHJsLT5jb21tdW5pdGllc1tpXTsKKwkJdTMyICppbnRtYXNrOworCisJCWludG1hc2sgPSBkZXZtX2tjYWxsb2MocGN0cmwtPmRldiwgY29tbXVuaXR5LT5uZ3BwcywKKwkJCQkgICAgICAgc2l6ZW9mKCppbnRtYXNrKSwgR0ZQX0tFUk5FTCk7CisJCWlmICghaW50bWFzaykKKwkJCXJldHVybiAtRU5PTUVNOworCisJCWNvbW11bml0aWVzW2ldLmludG1hc2sgPSBpbnRtYXNrOworCX0KKworCXBjdHJsLT5jb250ZXh0LnBhZHMgPSBwYWRzOworCXBjdHJsLT5jb250ZXh0LmNvbW11bml0aWVzID0gY29tbXVuaXRpZXM7CisjZW5kaWYKKworCXJldHVybiAwOworfQorCitpbnQgaW50ZWxfcGluY3RybF9wcm9iZShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2LAorCQkJY29uc3Qgc3RydWN0IGludGVsX3BpbmN0cmxfc29jX2RhdGEgKnNvY19kYXRhKQoreworCXN0cnVjdCBpbnRlbF9waW5jdHJsICpwY3RybDsKKwlpbnQgaSwgcmV0LCBpcnE7CisKKwlpZiAoIXNvY19kYXRhKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCXBjdHJsID0gZGV2bV9remFsbG9jKCZwZGV2LT5kZXYsIHNpemVvZigqcGN0cmwpLCBHRlBfS0VSTkV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wgYml0X3B1cGQpOworCisJYml0X3IwID0gQklUKHNwZWNfcHVwZF9waW4tPnIwX2JpdCk7CisJYml0X3IxID0gQklUKHNwZWNfcHVwZF9waW4tPnIxX2JpdCk7CisKKwlzd2l0Y2ggKHIxcjApIHsKKwljYXNlIE1US19QVVBEX1NFVF9SMVIwXzAwOgorCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfcnN0LCBiaXRfcjApOworCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfcnN0LCBiaXRfcjEpOworCQlicmVhazsKKwljYXNlIE1US19QVVBEX1NFVF9SMVIwXzAxOgorCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfc2V0LCBiaXRfcjApOworCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfcnN0LCBiaXRfcjEpOworCQlicmVhazsKKwljYXNlIE1US19QVVBEX1NFVF9SMVIwXzEwOgorCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfcnN0LCBiaXRfcjApOworCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfc2V0LCBiaXRfcjEpOworCQlicmVhazsKKwljYXNlIE1US19QVVBEX1NFVF9SMVIwXzExOgorCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfc2V0LCBiaXRfcjApOworCQlyZWdtYXBfd3JpdGUocmVnbWFwLCByZWdfc2V0LCBiaXRfcjEpOworCQlicmVhazsKKwlkZWZhdWx0OgorCQlyZXR1cm4gLUVJTlZBTDsKKwl9CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGNvbnN0IHN0cnVjdCBtdGtfcGluX2llc19zbXRfc2V0IG10ODE3M19pZXNfc210X3NldFtdID0geworCU1US19QSU5fSUVTX1NNVF9TRVQoMCwgNCwgMHg5MzAsIDEpLAorCU1US19QSU5fSUVTX1NNVF9TRVQoNSwgOSwgMHg5MzAsIDIpLAorCU1US19QSU5fSUVTX1NNVF9TRVQoMTAsIDEzLCAweDkzMCwgMTApLAorCU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VkICpudW1fbWFwcykKK3sKKwlib29sIHJldDsKKworCWlmICgqbnVtX21hcHMgPT0gKnJlc2VydmVkX21hcHMpCisJCXJldHVybiAtRU5PU1BDOworCisJKCptYXApWypudW1fbWFwc10udHlwZSA9IFBJTl9NQVBfVFlQRV9NVVhfR1JPVVA7CisJKCptYXApWypudW1fbWFwc10uZGF0YS5tdXguZ3JvdXAgPSBncnAtPm5hbWU7CisKKwlyZXQgPSBtdGtfcGN0cmxfaXNfZnVuY3Rpb25fdmFsaWQocGN0bCwgcGluLCBmbnVtKTsKKwlpZiAoIXJldCkgeworCQlkZXZfZXJyKHBjdGwtPmRldiwgImludmFsaWQgZnVuY3Rpb24gJWQgb24gcGluICVkIC5cbiIsCisJCQkJZm51bSwgcGluKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJKCptYXApWypudW1fbWFwc10uZGF0YS5tdXguZnVuY3Rpb24gPSBtdGtfZ3Bpb19mdW5jdGlvbnNbZm51bV07CisJKCpudW1fbWFwcykrKzsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG10a19wY3RybF9kdF9zdWJub2RlX3RvX21hcChzdHJ1Y3QgcGluY3RybF9kZXYgKnBjdGxkZXYsCisJCQkJICAgICAgc3RydWN0IGRldmljZV9ub2RlICpub2RlLAorCQkJCSAgICAgIHN0cnVjdCBwaW5jdHJsX21hcCAqKm1hcCwKKwkJCQkgICAgICB1bnNpZ25lZCAqcmVzZXJ2ZWRfbWFwcywKKwkJCQkgICAgICB1bnNpZ25lZCAqbnVtX21hcHMpCit7CisJc3RydWN0IHByb3BlcnR5ICpwaW5zOworCXUzMiBwaW5mdW5jLCBwaW4sIGZ1bmM7CisJaW50IG51bV9waW5zLCBudW1fZnVuY3MsIG1hcHNfcGVyX3BpbjsKKwl1bnNpZ25lZCBsb25nICpjb25maWdzOworCXVuc2lnbmVkIGludCBudW1fY29uZmlnczsKKwlib29sIGhhc19jb25maWcgPSAwOworCWludCBpLCBlcnI7CisJdW5zaWduZWQgcmVzZXJ2ZSA9IDA7CisJc3RydWN0IG10a19waW5jdHJsX2dyb3VwICpncnA7CisJc3RydWN0IG10a19waW5jdHJsICpwY3RsID0gcGluY3RybF9kZXZfZ2V0X2RydmRhdGEocGN0bGRldik7CisKKwlwaW5zID0gb2ZfZmluZF9wcm9wZXJ0eShub2RlLCAicGlubXV4IiwgTlVMTCk7CisJaWYgKCFwaW5zKSB7CisJCWRldl9lcnIocGN0bC0+ZGV2LCAibWlzc2luZyBwaW5zIHByb3BlcnR5IGluIG5vZGUgJXMgLlxuIiwKKwkJCQlub2RlLT5uYW1lKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJZXJyID0gcGluY29uZl9nZW5lcmljX3BhcnNlX2R0X2NvbmZpZyhub2RlLCBwY3RsZGV2LCAmY29uZmlncywKKwkJJm51bV9jb25maWdzKTsKKwlpZiAobnVtX2NvbmZpZ3MpCisJCWhhc19jb25maWcgPSAxOworCisJbnVtX3BpbnMgPSBwaW5zLT5sZW5ndGggLyBzaXplb2YodTMyKTsKKwludW1fZnVuY3MgPSBudW1fcGluczsKKwltYXBzX3Blcl9waW4gPSAwOworCWlmIChudW1fZnVuY3MpCisJCW1hcHNfcGVyX3BpbisrOworCWlmIChoYXNfY29uZmlnICYmIG51bV9waW5zID49IDEpCisJCW1hcHNfcGVyX3BpbisrOworCisJaWYgKCFudW1fcGlucyB8fCAhbWFwc19wZXJfcGluKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCXJlc2VydmUgPSBudW1fcGlucyAqIG1hcHNfcGVyX3BpbjsKKworCWVyciA9IHBpbmN0cmxfdXRpbHNfcmVzZXJ2ZV9tYXAocGN0bGRldiwgbWFwLAorCQkJcmVzZXJ2ZWRfbWFwcywgbnVtX21hcHMsIHJlc2VydmUpOworCWlmIChlcnIgPCAwKQorCQlnb3RvIGZhaWw7CisKKwlmb3IgKGkgPSAwOyBpIDwgbnVtX3BpbnM7IGkrKykgeworCQllcnIgPSBvZl9wc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XVuc2lnbmVkIGludCBlaW50X251bSkKK3sKKwl1bnNpZ25lZCBpbnQgc2VuczsKKwl1bnNpZ25lZCBpbnQgYml0ID0gQklUKGVpbnRfbnVtICUgMzIpOworCWNvbnN0IHN0cnVjdCBtdGtfZWludF9vZmZzZXRzICplaW50X29mZnNldHMgPQorCQkmcGN0bC0+ZGV2ZGF0YS0+ZWludF9vZmZzZXRzOworCisJdm9pZCBfX2lvbWVtICpyZWcgPSBtdGtfZWludF9nZXRfb2Zmc2V0KHBjdGwsIGVpbnRfbnVtLAorCQkJZWludF9vZmZzZXRzLT5zZW5zKTsKKworCWlmIChyZWFkbChyZWcpICYgYml0KQorCQlzZW5zID0gTVRfTEVWRUxfU0VOU0lUSVZFOworCWVsc2UKKwkJc2VucyA9IE1UX0VER0VfU0VOU0lUSVZFOworCisJaWYgKChlaW50X251bSA8IHBjdGwtPmRldmRhdGEtPmRiX2NudCkgJiYgKHNlbnMgIT0gTVRfRURHRV9TRU5TSVRJVkUpKQorCQlyZXR1cm4gMTsKKwllbHNlCisJCXJldHVybiAwOworfQorCisvKgorICogbXRrX2VpbnRfZ2V0X21hc2s6IFRvIGdldCB0aGUgZWludCBtYXNrCisgKiBAZWludF9udW06IHRoZSBFSU5UIG51bWJlciB0byBnZXQKKyAqLworc3RhdGljIHVuc2lnbmVkIGludCBtdGtfZWludF9nZXRfbWFzayhzdHJ1Y3QgbXRrX3BpbmN0cmwgKnBjdGwsCisJdW5zaWduZWQgaW50IGVpbnRfbnVtKQoreworCXVuc2lnbmVkIGludCBiaXQgPSBCSVQoZWludF9udW0gJSAzMik7CisJY29uc3Qgc3RydWN0IG10a19laW50X29mZnNldHMgKmVpbnRfb2Zmc2V0cyA9CisJCSZwY3RsLT5kZXZkYXRhLT5laW50X29mZnNldHM7CisKKwl2b2lkIF9faW9tZW0gKnJlZyA9IG10a19laW50X2dldF9vZmZzZXQocGN0bCwgZWludF9udW0sCisJCQllaW50X29mZnNldHMtPm1hc2spOworCisJcmV0dX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RfRlVOQ1RJT04oMCwgMTQpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU8xNCIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkNNREFUMCIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkNNQ1NEMCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00yIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzZfIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDE1LCAiRUlOVDE1IiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE1IiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQxIiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QxIiksCisJCU1US19GVU5DVElPTigzLCAiQ01GTEFTSCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00zIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzI5XyIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNiwgIklERElHIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNiksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE2IiksCisJCU1US19GVU5DVElPTigxLCAiSURESUciKSwKKwkJTVRLX0ZVTkNUSU9OKDIsICJDTUZMQVNIIiksCisJCU1US19GVU5DVElPTig0LCAiUFdNNSIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNywgIldBVENIRE9HIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE3IiksCisJCU1US19GVU5DVElPTigxLCAiV0FUQ0hET0dfQU8iKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMTgsICJDR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QlOVUxMLCAibXQ4MTczIiwKKwkJTVRLX0VJTlRfRlVOQ1RJT04oMCwgNTEpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU81MSIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkNNREFUNiIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTig1MiwgIlJDUF9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1MiksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzUyIiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ3IikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDUzLCAiUkROMl9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1MyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzUzIiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ4IiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QzIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDU0LCAiUkRQMl9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1NCksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzU0IiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ5IiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QyIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDU1LCAiUkROM19BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1NSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzU1IiksCisJCU1US19GVU5DVElPTigxLCAiQ01IU1lOQyIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkNNQ1NEMSIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTig1NiwgIlJEUDNfQSIpLAorC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9fMTIpLAotCU1FU09OX1BJTihHUElPQU9fMTMpLAotCU1FU09OX1BJTihHUElPX0JTRF9FTiksCi0JTUVTT05fUElOKEdQSU9fVEVTVF9OKSwKKwlNRVNPTl9QSU4oR1BJT1hfMCwgMCksCisJTUVTT05fUElOKEdQSU9YXzEsIDApLAorCU1FU09OX1BJTihHUElPWF8yLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMywgMCksCisJTUVTT05fUElOKEdQSU9YXzQsIDApLAorCU1FU09OX1BJTihHUElPWF81LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfNiwgMCksCisJTUVTT05fUElOKEdQSU9YXzcsIDApLAorCU1FU09OX1BJTihHUElPWF84LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfOSwgMCksCisJTUVTT05fUElOKEdQSU9YXzEwLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTEsIDApLAorCU1FU09OX1BJTihHUElPWF8xMiwgMCksCisJTUVTT05fUElOKEdQSU9YXzEzLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTQsIDApLAorCU1FU09OX1BJTihHUElPWF8xNSwgMCksCisJTUVTT05fUElOKEdQSU9YXzE2LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTcsIDApLAorCU1FU09OX1BJTihHUElPWF8xOCwgMCksCisJTUVTT05fUElOKEdQSU9YXzE5LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMjAsIDApLAorCU1FU09OX1BJTihHUElPWF8yMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzAsIDApLAorCU1FU09OX1BJTihHUElPWV8xLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMiwgMCksCisJTUVTT05fUElOKEdQSU9ZXzMsIDApLAorCU1FU09OX1BJTihHUElPWV80LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfNSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzYsIDApLAorCU1FU09OX1BJTihHUElPWV83LCAwKSwKK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0JR1BJT19HUk9VUChHUElPSF8xKSwKLQlHUElPX0dST1VQKEdQSU9IXzIpLAotCUdQSU9fR1JPVVAoR1BJT0hfMyksCi0JR1BJT19HUk9VUChHUElPSF80KSwKLQlHUElPX0dST1VQKEdQSU9IXzUpLAotCUdQSU9fR1JPVVAoR1BJT0hfNiksCi0JR1BJT19HUk9VUChHUElPSF83KSwKLQlHUElPX0dST1VQKEdQSU9IXzgpLAotCUdQSU9fR1JPVVAoR1BJT0hfOSksCi0JR1BJT19HUk9VUChHUElPWl8wKSwKLQlHUElPX0dST1VQKEdQSU9aXzEpLAotCUdQSU9fR1JPVVAoR1BJT1pfMiksCi0JR1BJT19HUk9VUChHUElPWl8zKSwKLQlHUElPX0dST1VQKEdQSU9aXzQpLAotCUdQSU9fR1JPVVAoR1BJT1pfNSksCi0JR1BJT19HUk9VUChHUElPWl82KSwKLQlHUElPX0dST1VQKEdQSU9aXzcpLAotCUdQSU9fR1JPVVAoR1BJT1pfOCksCi0JR1BJT19HUk9VUChHUElPWl85KSwKLQlHUElPX0dST1VQKEdQSU9aXzEwKSwKLQlHUElPX0dST1VQKEdQSU9aXzExKSwKLQlHUElPX0dST1VQKEdQSU9aXzEyKSwKLQlHUElPX0dST1VQKEdQSU9aXzEzKSwKLQlHUElPX0dST1VQKEdQSU9aXzE0KSwKLQlHUElPX0dST1VQKEdQSU9BT18wKSwKLQlHUElPX0dST1VQKEdQSU9BT18xKSwKLQlHUElPX0dST1VQKEdQSU9BT18yKSwKLQlHUElPX0dST1VQKEdQSU9BT18zKSwKLQlHUElPX0dST1VQKEdQSU9BT180KSwKLQlHUElPX0dST1VQKEdQSU9BT181KSwKLQlHUElPX0dST1VQKEdQSU9BT182KSwKLQlHUElPX0dST1VQKEdQSU9BT183KSwKLQlHUElPX0dST1VQKEdQSU9BT184KSwKLQlHUElPX0dST1VQKEdQSU9BT185KSwKLQlHUElPX0dST1VQKEdQSU9BT18xMCksCi0JR1BJT19HUk9VUChHUElPQU9fMTEpL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ZXzgsIDApLAorCU1FU09OX1BJTihHUElPWV85LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTAsIDApLAorCU1FU09OX1BJTihHUElPWV8xMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzEyLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTMsIDApLAorCU1FU09OX1BJTihHUElPWV8xNCwgMCksCisKKwlNRVNPTl9QSU4oR1BJT0RWXzksIDApLAorCU1FU09OX1BJTihHUElPRFZfMjQsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjUsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjYsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjcsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjgsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjksIDApLAorCisJTUVTT05fUElOKEdQSU9IXzAsIDApLAorCU1FU09OX1BJTihHUElPSF8xLCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfMiwgMCksCisJTUVTT05fUElOKEdQSU9IXzMsIDApLAorCU1FU09OX1BJTihHUElPSF80LCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfNSwgMCksCisJTUVTT05fUElOKEdQSU9IXzYsIDApLAorCU1FU09OX1BJTihHUElPSF83LCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfOCwgMCksCisJTUVTT05fUElOKEdQSU9IXzksIDApLAorCisJTUVTT05fUElOKENBUkRfMCwgMCksCisJTUVTT05fUElOKENBUkRfMSwgMCksCisJTUVTT05fUElOKENBUkRfMiwgMCksCisJTUVTT05fUElOKENBUkRfMywgMCksCisJTUVTT05fUElOKENBUkRfNCwgMCksCisJTUVTT05fUElOKENBUkRfNSwgMCksCisJTUVTT05fUElOKENBUkRfNiwgMCksCisKKwlNRVNPTl9QSU4oQk9PVF8wLCAwKSwKKwlNRVNPTl9QSU4oQk9PVF8xLCAwKSwKKwlNRVNPTl9QSU4oQk9PVF8yLCAwKSwKKwlNRVNPTl9QSU4oQk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50IHBjbV9vdXRfYV9waW5zW10JPSB7IFBJTihHUElPWF80LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBwY21faW5fYV9waW5zW10JPSB7IFBJTihHUElPWF81LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBwY21fZnNfYV9waW5zW10JPSB7IFBJTihHUElPWF82LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBwY21fY2xrX2FfcGluc1tdCT0geyBQSU4oR1BJT1hfNywgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2R4Y19jbGtfYV9waW5zW10JPSB7IFBJTihHUElPWF84LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZHhjX2NtZF9hX3BpbnNbXQk9IHsgUElOKEdQSU9YXzksIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHB3bV92c18wX3BpbnNbXQk9IHsgUElOKEdQSU9YXzEwLCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBwd21fZV9waW5zW10JCT0geyBQSU4oR1BJT1hfMTAsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHB3bV92c18xX3BpbnNbXQk9IHsgUElOKEdQSU9YXzExLCAwKSB9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHVhcnRfdHhfYV9waW5zW10JPSB7IFBJTihHUElPWF80LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0X3J4X2FfcGluc1tdCT0geyBQSU4oR1BJT1hfNSwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgdWFydF9jdHNfYV9waW5zW10JPSB7IFBJTihHUElPWF82LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCB1YXJ0X3J0c19hX3BpbnNbXQk9IHsgUElOKEdQSU9YXzcsIDApI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29fMV9waW5zW10JPSB7IFBJTihHUElPSF80LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzcGlfbW9zaV8xX3BpbnNbXQk9IHsgUElOKEdQSU9IXzUsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNwaV9zY2xrXzFfcGluc1tdCT0geyBQSU4oR1BJT0hfNiwgMCkgfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhkM19waW5zW10JPSB7IFBJTihHUElPSF83LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhkMl9waW5zW10JPSB7IFBJTihHUElPSF84LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhfY2xrX3BpbnNbXQk9IHsgUElOKEdQSU9IXzksIDApIH07CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaTJjX3NkYV9iMV9waW5zW10JPSB7IFBJTihHUElPSF8zLCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpMmNfc2NrX2IxX3BpbnNbXQk9IHsgUElOKEdQSU9IXzQsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGkyY19zZGFfYzFfcGluc1tdCT0geyBQSU4oR1BJT0hfNSwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaTJjX3Nja19jMV9waW5zW10JPSB7IFBJTihHUElPSF82LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBpMmNfc2RhX2QxX3BpbnNbXQk9IHsgUElOKEdQSU9IXzcsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGkyY19zY2tfZDFfcGluc1tdCT0geyBQSU4oR1BJT0hfOCwgMCkgfTsKKworLyogYmFuayBCT09UICovCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG5hbmRfaW9fcGluc1tdCT0ge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Qk9IHsgUElOKERJRl8xX04sIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGV0aF90eGQwXzFfcGluc1tdCT0geyBQSU4oRElGXzJfUCwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgZXRoX3R4ZDFfMV9waW5zW10JPSB7IFBJTihESUZfMl9OLCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhfZW5fcGluc1tdCT0geyBQSU4oRElGXzNfUCwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgZXRoX3JlZl9jbGtfcGluc1tdCT0geyBQSU4oRElGXzNfTiwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgZXRoX21kY19waW5zW10JPSB7IFBJTihESUZfNF9QLCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfbWRpb19lbl9waW5zW10JPSB7IFBJTihESUZfNF9OLCAwKSB9OworCitzdGF0aWMgc3RydWN0IG1lc29uX3BteF9ncm91cCBtZXNvbjhiX2dyb3Vwc1tdID0geworCUdQSU9fR1JPVVAoR1BJT1hfMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfMywgMCksCisJR1BJT19HUk9VUChHUElPWF80LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzUsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfNiwgMCksCisJR1BJT19HUk9VUChHUElPWF83LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzgsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNiwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNywgMCksCisJR1BJT19HUk9VUChHUElPWF8xOCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9ZXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMSwgMCksCisJR1BJT19HUk9VUChHUElPWV8zLCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfNywgMCksCisJR1BJT19HUk9VUChHUElPWV84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzksIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTEsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTMsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTQsIDApLAorCisJR1BJT19HUk9VUChHUElPRFZfOSwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjQsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI1LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yNiwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjcsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI4LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yOSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9IXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfMSwgMCksCisJR1BJT19HUk9VUChHUElPSF8yLCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzMsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNCwgMCksCisJR1BJT19HUk9VUChHUElPSF81LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNywgMCksCisJR1BJT19HUk9VUChHUElPSF84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzksIDApLAorCisJR1BJT19HUk9VUChESUZfMF9QLCAwKSwKKwlHUElPX0dST1VQKERJRl8wX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzFfUCwgMCksCisJR1BJT19HUk9VUChESUZfMV9OLCAwKSwKKwlHUElPX0dST1VQKERJRl8yX1AsIDApLAorCUdQSU9fR1JPVVAoRElGXzJfTiwgMCksCisJR1BJT19HUk9VUChESUZfM19QLCAwKSwKKwlHUElPX0dST1VQKERJRl8zX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzRfUCwgMCksCisJR1BJT19HUk9VUChESUZfNF9OLCAwKSwKKworCUdQSU9fR1JPVVAoR1BJT0FPXzAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMSwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT18yLCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzMsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNCwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT181LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzYsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNywgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT184LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzksIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTEsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTIsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTMsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPX0JTRF9FTiwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9fVEVTVF9OLCBBT19PRkYpLAorCisJLyogYmFuayBYICovCisJR1JPVVAoc2RfZDBf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FydF9ydHNfYW9fYSIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcmVtb3RlX2dyb3Vwc1tdID0geworCSJyZW1vdGVfaW5wdXQiLCAiaXJfYmxhc3RlciIsICJpcl9yZW1vdGVfb3V0IgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBpMmNfc2xhdmVfYW9fZ3JvdXBzW10gPSB7CisJImkyY19zY2tfYW8iLCAiaTJjX3NkYV9hbyIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgdWFydF9hb19iX2dyb3Vwc1tdID0geworCSJ1YXJ0X3R4X2FvX2IwIiwgInVhcnRfcnhfYW9fYjAiLCAidWFydF90eF9hb19iMSIsICJ1YXJ0X3J4X2FvX2IxIiwKKwkidWFydF9jdHNfYW9fYiIsICJ1YXJ0X3J0c19hb19iIgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBpMmNfbXN0X2FvX2dyb3Vwc1tdID0geworCSJpMmNfbXN0X3Nja19hbyIsICJpMmNfbXN0X3NkYV9hbyIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgY2xrX2dyb3Vwc1tdID0geworCSJjbGtfMjRtX291dCIsICJjbGtfMzJrX2luX291dCIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3Qgc3BkaWZfZ3JvdXBzW10gPSB7CisJInNwZGlmX291dF8xIiwgInNwZGlmX291dF8wIgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBpMnNfZ3JvdXBzW10gPSB7CisJImkyc19hbV9jbGtfb3V0IiwgImkyc19hb19jbGtfb3V0IiwgImkyc19scl9jbGtfb3V0IiwKKwkiaTJzX291dF8wMSIsICJpMnNfaW5fY2gwMSIsICJpMnNfYW9fY2xrX2luIiwKKwkiaTJzX2xyX2Nsa19pbiIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcHdtX2JfZ3JvdXBzW10gP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1RJT04oaTJjX2MpLAorCUZVTkNUSU9OKGhkbWkpLAorCUZVTkNUSU9OKHNwaSksCisJRlVOQ1RJT04oZXRoZXJuZXQpLAorCUZVTkNUSU9OKGkyY19hKSwKKwlGVU5DVElPTihpMmNfYiksCisJRlVOQ1RJT04oc2RfYyksCisJRlVOQ1RJT04oc2R4Y19jKSwKKwlGVU5DVElPTihuYW5kKSwKKwlGVU5DVElPTihub3IpLAorCUZVTkNUSU9OKHNkX2IpLAorCUZVTkNUSU9OKHNkeGNfYiksCisJRlVOQ1RJT04odWFydF9hbyksCisJRlVOQ1RJT04ocmVtb3RlKSwKKwlGVU5DVElPTihpMmNfc2xhdmVfYW8pLAorCUZVTkNUSU9OKHVhcnRfYW9fYiksCisJRlVOQ1RJT04oaTJjX21zdF9hbyksCisJRlVOQ1RJT04oY2xrKSwKKwlGVU5DVElPTihzcGRpZiksCisJRlVOQ1RJT04oaTJzKSwKKwlGVU5DVElPTihwd21fYiksCisJRlVOQ1RJT04ocHdtX2MpLAorCUZVTkNUSU9OKHB3bV9kKSwKKwlGVU5DVElPTihwd21fZSksCisJRlVOQ1RJT04ocHdtX3ZzKSwKKwlGVU5DVElPTih0c2luX2EpLAorCUZVTkNUSU9OKHRzaW5fYiksCit9OworCitzdGF0aWMgc3RydWN0IG1lc29uX2JhbmsgbWVzb244Yl9iYW5rc1tdID0geworCS8qICAgbmFtZSAgICBmaXJzdCAgICAgICAgICAgICAgICAgICAgICBsYXN0ICAgICAgICAgICAgICAgICAgIHB1bGxlbiAgcHVsbCAgICBkaXIgICAgIG91dCAgICAgaW4gICovCisJQkFOSygiWCIsICAgIFBJTihHUElPWF8wLCAwKSwJCVBJTihHUElPWF8yMSwgMCksICAgICAgNCwgIDAsICA0LCAgMCwgIDAsICAwLCAgMSwgIDAsICAyLCAgMCksCisJQkFOSygiWSIsICAgIFBJTihHUElPWV8wLCAwKSwJCVBJTihHUElPWV8xNCwgMCksICAgICAgMywgIDAsICAzLCAgMCwgIDMsICA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mVkIHVhcnQzX2N0c19wZDRfcGluc1tdID0geworCVRFR1JBX1BJTl9VQVJUM19DVFNfUEQ0LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMxX2Nsa19wZTBfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDMV9DTEtfUEUwLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMxX2RhdF9wZTFfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDMV9EQVRfUEUxLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMyX2Nsa19wZTJfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDMl9DTEtfUEUyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMyX2RhdF9wZTNfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDMl9EQVRfUEUzLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMzX2Nsa19wZTRfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDM19DTEtfUEU0LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRtaWMzX2RhdF9wZTVfcGluc1tdID0geworCVRFR1JBX1BJTl9ETUlDM19EQVRfUEU1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBlNl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BFNiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwZTdfcGluc1tdID0geworCVRFR1JBX1BJTl9QRTcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZ2VuM19pMmNfc2NsX3BmMF9waW5zW10gPSB7CisJVEVHUkFfUElOX0dFTjNfSTJDX1NDTF9QRjAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZ2VuM19pMmNfc2RhX3BmMV9waW5zW10gPSB7CisJVEVHUkFfUElOX0dFTjNfSTJDX1NEQV9QRjEsCit9OworCitz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OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGs0X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs0LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrNV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwazZfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzYsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGs3X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs3LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBsMF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BMMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwbDFfcGluc1tdID0geworCVRFR1JBX1BJTl9QTDEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2RtbWMxX2Nsa19wbTBfcGluc1tdID0geworCVRFR1JBX1BJTl9TRE1NQzFfQ0xLX1BNMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzZG1tYzFfY21kX3BtMV9waW5zW10gPSB7CisJVEVHUkFfUElOX1NETU1DMV9DTURfUE0xLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNkbW1jMV9kYXQzX3BtMl9waW5zW10gPSB7CisJVEVHUkFfUElOX1NETU1DMV9EQVQzX1BNMiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzZG1tYzFfZGF0Ml9wbTNfcGluc1tdID0geworCVRFR1JBX1BJTl9TRE1NQzFfREFUMl9QTTMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2RtbWMxX2RhdDFfcG00X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fU0RNTUMxX0RBVDFfUE00LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNkbW1jMV9kYXQwX3BtNV9waW5zW10gPSB7CisJVEV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7CisJVEVHUkFfUElOX1BXUl9JMkNfU0NMX1BZMywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwd3JfaTJjX3NkYV9weTRfcGluc1tdID0geworCVRFR1JBX1BJTl9QV1JfSTJDX1NEQV9QWTQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgY2xrXzMya19vdXRfcHk1X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fQ0xLXzMyS19PVVRfUFk1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHB6MF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BaMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwejFfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcHoyX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFoyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHB6M19waW5zW10gPSB7CisJVEVHUkFfUElOX1BaMywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwejRfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcHo1X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFo1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDJfZnNfcGFhMF9waW5zW10gPSB7CisJVEVHUkFfUElOX0RBUDJfRlNfUEFBMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkYXAyX3NjbGtfcGFhMV9waW5zW10gPSB7CisJVEVHUkFfUElOX0RBUDJfU0NMS19QQUExLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDJfZGluX3BhYTJfcGluc1tdID0geworCVRFR1JBX1BJTl9EQVAyX0RJTl9QQUEyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDJfZG91dF9wYWEzX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fREFQMl9ET1VUX1BBQTMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgYXVkX21jbGtfcGJiMF9waW5zW10gPSB7CisJVEVHUkFfUElOX0FVRF9NQ0xLX1BCQjAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHZmc19wd21fcGJiMV9waW5zW10gPSB7CisJVEVHUkFfUElOX0RWRlNfUFdNX1BCQjEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHZmc19jbGtfcGJiMl9waW5zW10gPSB7CisJVEVHUkFfUElOX0RWRlNfQ0xLX1BCQjIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZ3Bpb194MV9hdWRfcGJiM19waW5zW10gPSB7CisJVEVHUkFfUElOX0dQSU9fWDFfQVVEX1BCQjMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZ3Bpb194M19hdWRfcGJiNF9waW5zW10gPSB7CisJVEVHUkFfUElOX0dQSU9fWDNfQVVEX1BCQjQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaGRtaV9jZWNfcGNjMF9waW5zW10gPSB7CisJVEVHUkFfUElOX0hETUlfQ0VDX1BDQzAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaGRtaV9pbnRfZHBfaHBkX3BjYzFfcGluc1tdID0geworCVRFR1JBX1BJTl9IRE1JX0lOVF9EUF9IUERfUENDMSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzcGRpZl9vdXRfcGNjMl9waW5zW10gPSB7CisJVEVHUkFfUElOX1NQRElGX09VVF9QQ0MyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNwZGlmX2luX3BjYzNfcGluc1tdID0geworCVRFR1JBX1BJTl9TUERJRl9JTl9QQ0MzLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHVzYl92YnVzX2VuMF9wY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JTzNfUEVFNSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBjb3JlX3B3cl9yZXFfcGluc1tdID0geworCVRFR1JBX1BJTl9DT1JFX1BXUl9SRVEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgY3B1X3B3cl9yZXFfcGluc1tdID0geworCVRFR1JBX1BJTl9DUFVfUFdSX1JFUSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwd3JfaW50X25fcGluc1tdID0geworCVRFR1JBX1BJTl9QV1JfSU5UX04sCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgY2xrXzMya19pbl9waW5zW10gPSB7CisJVEVHUkFfUElOX0NMS18zMktfSU4sCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQganRhZ19ydGNrX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fSlRBR19SVENLLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGJhdHRfYmNsX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fQkFUVF9CQ0wsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgY2xrX3JlcV9waW5zW10gPSB7CisJVEVHUkFfUElOX0NMS19SRVEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2h1dGRvd25fcGluc1tdID0geworCVRFR1JBX1BJTl9TSFVURE9XTiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wYTZfcGluc1tdID0geworCVRFR1JBX1BJTl9QQTYsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGNjN19waW5zW10gPSB7CisJVEVHUkFfUElOX1BDQzcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGU2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEU2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BlN19waW5zW10gPSB7CisJVEVHUkFfUElOX1BFNywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9waDZfcGluc1tdID0geworCVRFR1JBX1BJTl9QSDYsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGswX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEswLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrMV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazJfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGszX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEszLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrNF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazVfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGs2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrN19waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wbDBfcGluc1tdID0geworCVRFR1JBX1BJTl9QTDAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGwxX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEwxLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3B6MF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BaMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wejF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gICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzFfY21kX3BtMSwgICAgICAgU0RNTUMxLCAgICAgU1BJMywgICBSU1ZEMiwgUlNWRDMsIDB4MzAwNCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jMV9kYXQzX3BtMiwgICAgICBTRE1NQzEsICAgICBTUEkzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMDA4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMxX2RhdDJfcG0zLCAgICAgIFNETU1DMSwgICAgIFNQSTMsICAgUlNWRDIsIFJTVkQzLCAweDMwMGMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzFfZGF0MV9wbTQsICAgICAgU0RNTUMxLCAgICAgU1BJMywgICBSU1ZEMiwgUlNWRDMsIDB4MzAxMCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jMV9kYXQwX3BtNSwgICAgICBTRE1NQzEsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDE0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2Nsa19wcDAsICAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMWMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfY21kX3BwMSwgICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAyMCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19kYXQwX3BwNSwgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDI0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2RhdDFfcHA0LCAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMjgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfZGF0Ml9wcDMsICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAyYywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19kYXQzX3BwMiwgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDMwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGV4X2wwX3JzdF9uX3BhMCwgICAgIFBFMCwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMzgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZXhfbDBfY2xrcmVxX25fcGExLCAgUEUwLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAzYywgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE1OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBleF93YWtlX25fcGEyLCAgICAgICBQRSwgICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDQwLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTY4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGV4X2wxX3JzdF9uX3BhMywgICAgIFBFMSwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNDQsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZXhfbDFfY2xrcmVxX25fcGE0LCAgUEUxLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA0OCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE2MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNhdGFfbGVkX2FjdGl2ZV9wYTUsICBTQVRBLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDRjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTk0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc3BpMV9tb3NpX3BjMCwgICAgICAgIFNQSTEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNTAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZTAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTFfbWlzb19wYzEsICAgICAgICBTUEkxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDU0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWRjLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkxX3Nja19wYzIsICAgICAgICAgU1BJMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA1OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFlNCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMV9jczBfcGMzLCAgICAgICAgIFNQSTEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNWMsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZDQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTFfY3MxX3BjNCwgICAgICAgICBTUEkxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDYwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWQ4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkyX21vc2lfcGI0LCAgICAgICAgU1BJMiwgICAgICAgRFRWLCAgICBSU1ZEMiwgUlNWRDMsIDB4MzA2NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFmNCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMl9taXNvX3BiNSwgICAgICAgIFNQSTIsICAgICAgIERUViwgICAgUlNWRDIsIFJTVkQzLCAweDMwNjgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZjAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTJfc2NrX3BiNiwgICAgICAgICBTUEkyLCAgICAgICBEVFYsICAgIFJTVkQyLCBSU1ZEMywgMHgzMDZjLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWY4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkyX2NzMF9wYjcsICAgICAgICAgU1BJMiwgICAgICAgRFRWLCAgICBSU1ZEMiwgUlNWRDMsIDB4MzA3MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFlOCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMl9jczFfcGRkMCwgICAgICAgIFNQSTIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNzQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZWMsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTRfbW9zaV9wYzcsICAgICAgICBTUEk0LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDc4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YjA0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGk0X21pc29fcGQwLCAgICAgICAgU1BJNCwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA3YywgWSwgICBZLCAgICAgICBOLCAgICAgICAweGIwMCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpNF9zY2tfcGM1LCAgICAgICAgIFNQSTQsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwODAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhiMDgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTRfY3MwX3BjNiwgICAgICAgICBTUEk0LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDg0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWZjLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChxc3BpX3Nja19wZWUwLCAgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA4OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGE5MCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAocXNwaV9jc19uX3BlZTEsICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwOGMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChxc3BpX2lvMF9wZWUyLCAgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA5MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHFzcGlfaW8xX3BlZTMsICAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDk0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocXNwaV9pbzJfcGVlNCwgICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwOTgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChxc3BpX2lvM19wZWU1LCAgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA5YywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMxX2Nsa19wZTAsICAgICAgICBETUlDMSwgICAgICBJMlMzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMGE0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTg0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzFfZGF0X3BlMSwgICAgICAgIERNSUMxLCAgICAgIEkyUzMsICAgUlNWRDIsIFJTVkQzLCAweDMwYTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5ODgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljMl9jbGtfcGUyLCAgICAgICAgRE1JQzIsICAgICAgSTJTMywgICBSU1ZEMiwgUlNWRDMsIDB4MzBhYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk4YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMyX2RhdF9wZTMsICAgICAgICBETUlDMiwgICAgICBJMlMzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMGIwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTkwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzNfY2xrX3BlNCwgICAgICAgIERNSUMzLCAgICAgIEkyUzVBLCAgUlNWRDIsIFJTVkQzLCAweDMwYjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5OTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljM19kYXRfcGU1LCAgICAgICAgRE1JQzMsICAgICAgSTJTNUEsICBSU1ZEMiwgUlNWRDMsIDB4MzBiOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk5OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjFfaTJjX3NjbF9wajEsICAgICBJMkMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGJjLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWE4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuMV9pMmNfc2RhX3BqMCwgICAgIEkyQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwYzAsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4yX2kyY19zY2xfcGoyLCAgICAgSTJDMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBjNCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDliMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjJfaTJjX3NkYV9wajMsICAgICBJMkMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGM4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWI0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuM19pMmNfc2NsX3BmMCwgICAgIEkyQzMsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwY2MsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4zX2kyY19zZGFfcGYxLCAgICAgSTJDMywgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBkMCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDliYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbV9pMmNfc2NsX3BzMiwgICAgICBJMkMzLCAgICAgICBJMkNWSSwgIFJTVkQyLCBSU1ZEMywgMHgzMGQ0LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OTM0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtX2kyY19zZGFfcHMzLCAgICAgIEkyQzMsICAgICAgIEkyQ1ZJLCAgUlNWRDIsIFJTVkQzLCAweDMwZDgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5MzgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwd3JfaTJjX3NjbF9weTMsICAgICAgSTJDUE1VLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBkYywgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE2YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB3cl9pMmNfc2RhX3B5NCwgICAgICBJMkNQTVUsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGUwLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTcwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDFfdHhfcHUwLCAgICAgICAgIFVBUlRBLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0MV9yeF9wdTEsICAgICAgICAgVUFSVEEsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBlOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIyNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQxX3J0c19wdTIsICAgICAgICBVQVJUQSwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGVjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjIwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDFfY3RzX3B1MywgICAgICAgIFVBUlRBLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0Ml90eF9wZzAsICAgICAgICAgVUFSVEIsICAgICAgSTJTNEEsICBTUERJRiwgVUFSVCwgIDB4MzBmNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIzOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQyX3J4X3BnMSwgICAgICAgICBVQVJUQiwgICAgICBJMlM0QSwgIFNQRElGLCBVQVJULCAgMHgzMGY4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjM0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDJfcnRzX3BnMiwgICAgICAgIFVBUlRCLCAgICAgIEkyUzRBLCAgUlNWRDIsIFVBUlQsICAweDMwZmMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMzAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0Ml9jdHNfcGczLCAgICAgICAgVUFSVEIsICAgICAgSTJTNEEsICBSU1ZEMiwgVUFSVCwgIDB4MzEwMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIyYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQzX3R4X3BkMSwgICAgICAgICBVQVJUQywgICAgICBTUEk0LCAgIFJTVkQyLCBSU1ZEMywgMHgzMTA0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjQ4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDNfcnhfcGQyLCAgICAgICAgIFVBUlRDLCAgICAgIFNQSTQsICAgUlNWRDIsIFJTVkQzLCAweDMxMDgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNDQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0M19ydHNfcGQzLCAgICAgICAgVUFSVEMsICAgICAgU1BJNCwgICBSU1ZEMiwgUlNWRDMsIDB4MzEwYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI0MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQzX2N0c19wZDQsICAgICAgICBVQVJUQywgICAgICBTUEk0LCAgIFJTVkQyLCBSU1ZEMywgMHgzMTEwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjNjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDRfdHhfcGk0LCAgICAgICAgIFVBUlRELCAgICAgIFVBUlQsICAgUlNWRDIsIFJTVkQzLCAweDMxMTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0NF9yeF9waTUsICAgICAgICAgVUFSVEQsICAgICAgVUFSVCwgICBSU1ZEMiwgUlNWRDMsIDB4MzExOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI1NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQ0X3J0c19waTYsICAgICAgICBVQVJURCwgICAgICBVQVJULCAgIFJTVkQyLCBSU1ZEMywgMHgzMTFjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjUwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDRfY3RzX3BpNywgICAgICAgIFVBUlRELCAgICAgIFVBUlQsICAgUlNWRDIsIFJTVkQzLCAweDMxMjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkYXAxX2ZzX3BiMCwgICAgICAgICAgSTJTMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEyNCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk1YywgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMV9kaW5fcGIxLCAgICAgICAgIEkyUzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMjgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NTQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDFfZG91dF9wYjIsICAgICAgICBJMlMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTJjLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTU4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAxX3NjbGtfcGIzLCAgICAgICAgSTJTMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEzMCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk2MCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMl9mc19wYWEwLCAgICAgICAgIEkyUzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMzQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NmMsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDJfZGluX3BhYTIsICAgICAgICBJMlMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTM4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTY0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAyX2RvdXRfcGFhMywgICAgICAgSTJTMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEzYywgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk2OCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMl9zY2xrX3BhYTEsICAgICAgIEkyUzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNDAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NzAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDRfZnNfcGo0LCAgICAgICAgICBJMlM0QiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTQ0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTdjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZGFwNF9kaW5fcGo1LCAgICAgICAgIEkyUzRCLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNDgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NzQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkYXA0X2RvdXRfcGo2LCAgICAgICAgSTJTNEIsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE0YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk3OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRhcDRfc2Nsa19wajcsICAgICAgICBJMlM0QiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTUwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTgwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtMV9tY2xrX3BzMCwgICAgICAgIEVYVFBFUklQSDMsIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW0yX21jbGtfcHMxLCAgICAgICAgRVhUUEVSSVBIMywgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE1OCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkyNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGp0YWdfcnRjaywgICAgICAgICAgICBKVEFHLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTVjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTJjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2xrXzMya19pbiwgICAgICAgICAgIENMSywgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NDAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjbGtfMzJrX291dF9weTUsICAgICAgU09DLCAgICAgICAgQkxJTkssICBSU1ZEMiwgUlNWRDMsIDB4MzE2NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk0NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJhdHRfYmNsLCAgICAgICAgICAgICBCQ0wsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTY4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OGY4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2xrX3JlcSwgICAgICAgICAgICAgIFNZUywgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNmMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NDgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjcHVfcHdyX3JlcSwgICAgICAgICAgQ1BVLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE3MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk1MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB3cl9pbnRfbiwgICAgICAgICAgICBQTUksICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTc0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTc0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2h1dGRvd24sICAgICAgICAgICAgIFNIVVRET1dOLCAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNzgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhYzgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjb3JlX3B3cl9yZXEsICAgICAgICAgQ09SRSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE3YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk0YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGF1ZF9tY2xrX3BiYjAsICAgICAgICBBVUQsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTgwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGY0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZHZmc19wd21fcGJiMSwgICAgICAgIFJTVkQwLCAgICAgIENMRFZGUywgU1BJMywgIFJTVkQzLCAweDMxODQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5YTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkdmZzX2Nsa19wYmIyLCAgICAgICAgUlNWRDAsICAgICAgQ0xEVkZTLCBTUEkzLCAgUlNWRDMsIDB4MzE4OCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDlhMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdwaW9feDFfYXVkX3BiYjMsICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFNQSTMsICBSU1ZEMywgMHgzMThjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTE0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ3Bpb194M19hdWRfcGJiNCwgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgU1BJMywgIFJTVkQzLCAweDMxOTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwY2M3LCAgICAgICAgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE5NCwgTiwgICBOLCAgICAgICBZLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGhkbWlfY2VjX3BjYzAsICAgICAgICBDRUMsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTk4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTI0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoaGRtaV9pbnRfZHBfaHBkX3BjYzEsIERQLCAgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxOWMsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhMjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzcGRpZl9vdXRfcGNjMiwgICAgICAgU1BESUYsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFhMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGFkMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNwZGlmX2luX3BjYzMsICAgICAgICBTUERJRiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWE0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YWNjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodXNiX3ZidXNfZW4wX3BjYzQsICAgIFVTQiwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYTgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhiNWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1c2JfdmJ1c19lbjFfcGNjNSwgICAgVVNCLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFhYywgTiwgICBOLCAgICAgICBZLCAgICAgICAweGI2MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRwX2hwZDBfcGNjNiwgICAgICAgICBEUCwgICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWIwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTljLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAod2lmaV9lbl9waDAsICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh3aWZpX3JzdF9waDEsICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFiOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI2OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHdpZmlfd2FrZV9hcF9waDIsICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWJjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjZjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYXBfd2FrZV9idF9waDMsICAgICAgIFJTVkQwLCAgICAgIFVBUlRCLCAgU1BESUYsIFJTVkQzLCAweDMxYzAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidF9yc3RfcGg0LCAgICAgICAgICAgUlNWRDAsICAgICAgVUFSVEIsICBTUERJRiwgUlNWRDMsIDB4MzFjNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhmYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ0X3dha2VfYXBfcGg1LCAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWM4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTAwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYXBfd2FrZV9uZmNfcGg3LCAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxY2MsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChuZmNfZW5fcGkwLCAgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFkMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE1MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKG5mY19pbnRfcGkxLCAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWQ0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTU0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ3BzX2VuX3BpMiwgICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZDgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChncHNfcnN0X3BpMywgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFkYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEyMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbV9yc3RfcHM0LCAgICAgICAgICBWR1AxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWUwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTNjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtX2FmX2VuX3BzNSwgICAgICAgIFZJTUNMSywgICAgIFZHUDIsICAgUlNWRDIsIFJTVkQzLCAweDMxZTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW1fZmxhc2hfZW5fcHM2LCAgICAgVklNQ0xLLCAgICAgVkdQMywgICBSU1ZEMiwgUlNWRDMsIDB4MzFlOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkzMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbTFfcHdkbl9wczcsICAgICAgICBWR1A0LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWVjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTFjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtMl9wd2RuX3B0MCwgICAgICAgIFZHUDUsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW0xX3N0cm9iZV9wdDEsICAgICAgVkdQNiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFmNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkyMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF90ZV9weTIsICAgICAgICAgICBESVNQTEFZQSwgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWY4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTQ0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX2JsX3B3bV9wdjAsICAgICAgIERJU1BMQVlBLCAgIFBXTTAsICAgU09SMCwgIFJTVkQzLCAweDMxZmMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMzQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfYmxfZW5fcHYxLCAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIwMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEzMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF9yc3RfcHYyLCAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjA0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTQwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX2dwaW8xX3B2MywgICAgICAgIERJU1BMQVlCLCAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMDgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMzgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfZ3BpbzJfcHY0LCAgICAgICAgRElTUExBWUIsICAgUFdNMSwgICBSU1ZEMiwgU09SMSwgIDB4MzIwYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEzYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGFwX3JlYWR5X3B2NSwgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjEwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGU4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodG91Y2hfcnN0X3B2NiwgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh0b3VjaF9jbGtfcHY3LCAgICAgICAgVE9VQ0gsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIxOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIxMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKG1vZGVtX3dha2VfYXBfcHgwLCAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjFjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTQ4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodG91Y2hfaW50X3B4MSwgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChtb3Rpb25faW50X3B4MiwgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIyNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE0YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGFsc19wcm94X2ludF9weDMsICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjI4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGU0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodGVtcF9hbGVydF9weDQsICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMmMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidXR0b25fcG93ZXJfb25fcHg1LCAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIzMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkwOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ1dHRvbl92b2xfdXBfcHg2LCAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjM0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTE0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnV0dG9uX3ZvbF9kb3duX3B4NywgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMzgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidXR0b25fc2xpZGVfc3dfcHkwLCAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIzYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkwYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ1dHRvbl9ob21lX3B5MSwgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjQwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTA0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGE2LCAgICAgICAgICAgICAgICAgIFNBVEEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNDQsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZTYsICAgICAgICAgICAgICAgICAgUlNWRDAsICAgICAgSTJTNUEsICBQV00yLCAgUlNWRDMsIDB4MzI0OCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBlNywgICAgICAgICAgICAgICAgICBSU1ZEMCwgICAgICBJMlM1QSwgIFBXTTMsICBSU1ZEMywgMHgzMjRjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGg2LCAgICAgICAgICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazAsICAgICAgICAgICAgICAgICAgSVFDMCwgICAgICAgSTJTNUIsICBSU1ZEMiwgUlNWRDMsIDB4MzI1NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrMSwgICAgICAgICAgICAgICAgICBJUUMwLCAgICAgICBJMlM1QiwgIFJTVkQyLCBSU1ZEMywgMHgzMjU4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGsyLCAgICAgICAgICAgICAgICAgIElRQzAsICAgICAgIEkyUzVCLCAgUlNWRDIsIFJTVkQzLCAweDMyNWMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazMsICAgICAgICAgICAgICAgICAgSVFDMCwgICAgICAgSTJTNUIsICBSU1ZEMiwgUlNWRDMsIDB4MzI2MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrNCwgICAgICAgICAgICAgICAgICBJUUMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjY0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGs1LCAgICAgICAgICAgICAgICAgIElRQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNjgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazYsICAgICAgICAgICAgICAgICAgSVFDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI2YywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrNywgICAgICAgICAgICAgICAgICBJUUMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjcwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGwwLCAgICAgICAgICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNzQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwbDEsICAgICAgICAgICAgICAgICAgU09DLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI3OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB6MCwgICAgICAgICAgICAgICAgICBWSU1DTEsyLCAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjdjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHoxLCAgICAgICAgICAgICAgICAgIFZJTUNMSzIsICAgIFNETU1DMSwgUlNWRDIsIFJTVkQzLCAweDMyODAsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejIsICAgICAgICAgICAgICAgICAgU0RNTUMzLCAgICAgQ0NMQSwgICBSU1ZEMiwgUlNWRDMsIDB4MzI4NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB6MywgICAgICAgICAgICAgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjg4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHo0LCAgICAgICAgICAgICAgICAgIFNETU1DMSwgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyOGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejUsICAgICAgICAgICAgICAgICAgU09DLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI5MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCisJLyogcGdfbmFtZSwgciwgZHJ2ZG5fYiwgZHJ2ZG5fdywgZHJ2dXBfYiwgZHJ2dXBfdywgc2x3cl9iLCBzbHdyX3csIHNsd2ZfYiwgc2x3Zl93ICovCisJRFJWX1BJTkdST1VQKHBhNiwgICAgMHg5YzAsIDEyLCA1LCAgMjAsID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KTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfY2N3LAotCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcocHJpdnB0ci0+cF9idWZmX2Njd19udW0pKTsKLSAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSA8IFBBR0VfU0laRSkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfcmVhZCwKLQkJCSAgICAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCSAgICAgICAJCXByaXZwdHItPnBfYnVmZl9yZWFkX251bSkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkJICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJICAgICAgCXByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJyZWFkICkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1Zi0+bmV4dDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfZW52LT53cml0ZV9zaXplIDwgUEFHRV9TSVpFICkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfd3JpdGUsCi0JCQkgICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJICAgICAJcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bSkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBfYnVmIT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyZWVfcGFnZXMoKHVuc2lnbmVkIGxvbmcpcF9idWYtPnBfYnVmZmVyLAotCQkJCSAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJICAgICAJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcndyaXRlICkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1Zi0+bmV4dDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0JCXByaXZwdHItPmJ1ZmZzX2FsbG9jID0gMDsKLQkJcHJpdnB0ci0+Y2hhbm5lbFtSRUFEX0NIQU5ORUxdLmZsYWcgPSAweDAwOwotCQlwcml2cHRyLT5jaGFubmVsW1dSSVRFX0NIQU5ORUxdLmZsYWcgPSAweDAwOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9TlVMTDsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfcmVhZD1OVUxMOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl93cml0ZT1OVUxMOwotICAgICAgICAgICAgICAgIGNsYXdfY2xlYXJfYnVzeShkZXYpOwotCQlDTEFXX0RCRl9URVhUKDIsIHRyYWNlLCAib3BlbiBFSU8iKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUVJTzsKLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgU2VuZCBTeXN0ZW1WYWxpZGF0ZSBjb21tYW5kICovCi0KLSAgICAgICAgY2xhd19jbGVhcl9idXN5KGRldik7Ci0JQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgIm9wZW5vayIpOwotICAgICAgICByZXR1cm4gMDsKLX0gICAgLyogICAgIGVuZCBvZiBjbGF3X29wZW4gICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICBjbGF3X2lycV9oYW5kbGVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLXN0YXRpYyB2b2lkCi1jbGF3X2lycV9oYW5kbGVyKHN0cnVjdCBjY3dfZGV2aWNlICpjZGV2LAotCXVuc2lnbmVkIGxvbmcgaW50cGFybSwgc3RydWN0IGlyYiAqaXJiKQotewotICAgICAgICBzdHJ1Y3QgY2hiayAqcF9jaCA9IE5VTEw7Ci0gICAgICAgIHN0cnVjdCBjbGF3X3ByaXZiayAqcHJpdnB0ciA9IE5VTEw7Ci0gICAgICAgIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBOVUxMOwotICAgICAgICBzdHJ1Y3QgY2xhd19lbnYgICpwX2VudjsKLSAgICAgICAgc3RydWN0IGNo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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgIGNsYXdfaXJxX3Rhc2tsZXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotc3RhdGljIHZvaWQKLWNsYXdfaXJxX3Rhc2tsZXQgKCB1bnNpZ25lZCBsb25nIGRhdGEgKQotewotCXN0cnVjdCBjaGJrICogcF9jaDsKLSAgICAgICAgc3RydWN0IG5ldF9kZXZpY2UgICpkZXY7Ci0KLQlwX2NoID0gKHN0cnVjdCBjaGJrICopIGRhdGE7Ci0gICAgICAgIGRldiA9IChzdHJ1Y3QgbmV0X2RldmljZSAqKXBfY2gtPm5kZXY7Ci0JQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgIklSUXRhc2siKTsKLSAgICAgICAgdW5wYWNrX3JlYWQoZGV2KTsKLSAgICAgICAgY2xlYXJfYml0KENMQVdfQkhfQUNUSVZFLCAodm9pZCAqKSZwX2NoLT5mbGFnX2EpOwotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJUc2tsZXRYdCIpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgIC8qICAgIGVuZCBvZiBjbGF3X2lycV9iaCAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgIGNsYXdfcmVsZWFzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotc3RhdGljIGludAotY2xhd19yZWxlYXNlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCi17Ci0gICAgICAgIGludCAgICAgICAgICAgICAgICByYzsKLSAgICAgICAgaW50ICAgICAgICAgICAgICAgIGk7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICBzYXZlZmxhZ3M7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICBwYXJtOwotICAgICAgICBzdHJ1Y3QgY2xhd19wcml2YmsgKnByaXZwdHI7Ci0gICAgICAgIERFQ0xBUkVfV0FJVFFVRVVFKHdhaXQsIGN1cnJlbnQpOwotICAgICAgICBzdHJ1Y3QgY2N3YmsqICAgICAgICAgICAgIHBfdGhpc19jY3c7Ci0gICAgICAgIHN0cnVjdCBjY3diayogICAgICAgICAgICAgcF9idWY7Ci0KLQlpZiAoIWRldikKLSAgICAgICAgICAgICAgICByZXR1cm4gMDsKLQlwcml2cHRyID0gKHN0cnVjdCBjbGF3X3ByaXZiayAqKWRldi0+bWxfcHJpdjsKLSAgICAgICAgaWYgKCFwcml2cHRyKQotICAgICAgICAgICAgICAgIHJldHVybiAwOwotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJyZWxlYXNlIik7Ci0gICAgICAgIHByaXZwdHItPnJlbGVhc2VfcGVuZD0xOwotICAgICAgICBjbGF3X3NldGJpdF9idXN5KFRCX1NUT1AsZGV2KTsKLSAgICAgICAgZm9yICggaSA9IDE7IGkgPj0wIDsgIGktLSkgewotICAgICAgICAgICAgICAgIHNwaW5fbG9ja19pcnFzYXZlKAotCQkJZ2V0X2Njd2Rldl9sb2NrKHByaXZwdHItPmNoYW5uZWxbaV0uY2RldiksIHNhdmVmbGFncyk7Ci0JICA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gICAgfQotICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICBwX2J1Zj1wcml2cHRyLT5wX3JlYWRfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgIHdoaWxlIChwX2J1ZiE9TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkgICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJICAgICAJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcnJlYWQgKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1Zi0+bmV4dDsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgIH0KLQkgQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgImZyZWV3cml0Iik7Ci0gICAgICAgIGlmIChwcml2cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZSA8IFBBR0VfU0laRSApIHsKLSAgICAgICAgICAgICAgICBmcmVlX3BhZ2VzKCh1bnNpZ25lZCBsb25nKXByaXZwdHItPnBfYnVmZl93cml0ZSwKLQkJICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcocHJpdnB0ci0+cF9idWZmX3dyaXRlX251bSkpOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgIHdoaWxlIChwX2J1ZiE9TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkgICAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCSAgICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJ3cml0ZSApKTsKLSAgICAgICAgICAgICAgICAgICAgICA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190eChwa19za2IsIGRldiwgMSk7Ci0JCQlpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudCA+IDApIHsKLQkgICAJCQlwa19za2IgPSBjbGF3X3BhY2tfc2tiKHByaXZwdHIpOwotCQkJfSBlbHNlCi0JCQkJcGtfc2tiID0gTlVMTDsKLQkJfQotCX0KLSAgICAgICAgaWYgKHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0IT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgY2xhd19zdHJ0X291dF9JTyhkZXYpOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybjsKLX0gICAgICAvKiBlbmQgb2YgY2xhd193cml0ZV9uZXh0ICAgICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICBjbGF3X3RpbWVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RhdGljIHZvaWQKLWNsYXdfdGltZXIgKCBzdHJ1Y3QgY2hiayAqIHBfY2ggKQotewotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJ0aW1lciIpOwotICAgICAgICBwX2NoLT5mbGFnIHw9IENMQVdfVElNRVI7Ci0gICAgICAgIHdha2VfdXAoJnBfY2gtPndhaXQpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgLyogZW5kIG9mIGNsYXdfdGltZXIgICovCi0KLS8qCi0qCi0qICAgICAgIGZ1bmN0aW9ucwotKi8KLQotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICBwYWdlc190b19vcmRlcl9vZl9tYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgIHRha2VzIGEgbnVtYmVyIG9mIHBhZ2VzIGZyb20gMSB0byA1MTIgYW5kIHJldHVybnMgdGhlICAgICAgICAgICAqCi0qICAgIGxvZyhudW1fcGFnZXMpL2xvZygyKSBnZXRfZnJlZV9wYWdlcygpIG5lZWRzIGEgYmFzZSAyIG9yZGVyICAgICAqCi0qICAgIG9mIG1hZ25pdHVkZSBnZXRfZnJlZV9wYWdlcygpIGhhcyBhbiB1cHBlciBvcmRlciBvZiA5ICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgaW50Ci1wYWdlc190b19vcmRlcl9vZl9tYWcoaW50IG51bV9vZl9wYWdlcykKLXsKLQlpbnQJb3JkZXJfb2ZfbWFnPTE7CQkvKiBhc3N1bWUgMiBwYWdlcyAqLwotCWludAludW1wOwotCi0JQ0xBV19EQkZfVEVYVF8oNSwgdHJhY2UsICJwYWdlcyVkIiwgbnVtX29mX3BhZ2VzKTsKLQlpZiAobnVtX29mX3BhZ2VzID09IDEpICAge3JldHVybiAwOyB9ICAvKiBtYWduaXR1ZGUgb2YgMCA9IDEgcGFnZSAqLwotCS8qIDUxMiBwYWdlcyA9IDJNZWcgb24gNGsgcGFnZSBzeXN0ZW1zICovCi0JaWY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CXByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3QgPSBwX2ZpcnN0OyAgLyogIHNldCBuZXcgZmlyc3QgKi8KLQkJcHJpdnB0ci0+cF9yZWFkX2FjdGl2ZV9sYXN0ICA9IHBfbGFzdDsgICAvKiAgc2V0IG5ldyBsYXN0ICAqLwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotCi0gICAgICAgICAgICAgICAgLyogc2V0IHVwIFRJQyBjY3cgICovCi0gICAgICAgICAgICAgICAgdGVtcF9jY3cuY2RhPSAoX191MzIpX19wYSgmcF9maXJzdC0+cmVhZCk7Ci0gICAgICAgICAgICAgICAgdGVtcF9jY3cuY291bnQ9MDsKLSAgICAgICAgICAgICAgICB0ZW1wX2Njdy5mbGFncz0wOwotICAgICAgICAgICAgICAgIHRlbXBfY2N3LmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1RJQzsKLQotCi0gICAgICAgICAgICAgICAgaWYgKHBfZW5kLT5yZWFkMSkgewotCi0gICAgICAgICAgICAgICAvKiBmaXJzdCBzZXQgb2YgQ0NXJ3MgaXMgY2hhaW5lZCB0byB0aGUgbmV3IHJlYWQgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAvKiBjaGFpbiwgc28gdGhlIHNlY29uZCBzZXQgaXMgY2hhaW5lZCB0byB0aGUgYWN0aXZlIGNoYWluLiAgICovCi0gICAgICAgICAgICAgICAvKiBUaGVyZWZvcmUgbW9kaWZ5IHRoZSBzZWNvbmQgc2V0IHRvIHBvaW50IHRvIHRoZSBuZXcgICAgICAgICovCi0gICAgICAgICAgICAgICAvKiByZWFkIGNoYWluIHNldCB1cCBUSUMgQ0NXcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAvKiBtYWtlIHN1cmUgd2UgdXBkYXRlIHRoZSBDQ1cgc28gY2hhbm5lbCBkb2Vzbid0IGZldGNoIGl0ICAgICovCi0gICAgICAgICAgICAgICAvKiB3aGVuIGl0J3Mgb25seSBoYWxmIGRvbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoICZwX2VuZC0+cmVhZDJfbm9wMiwgJnRlbXBfY2N3ICwKLQkJCQlzaXplb2Yoc3RydWN0IGNjdzEpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfcmVhZF9hY3RpdmVfbGFzdC0+cl9USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBfZmlyc3QtPnJlYWQpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9yZWFkX2FjdGl2ZV9sYXN0LT5yX1RJQ18yLmNkYT0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdC0+cmVhZCk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgLyogbWFrZSBzdXJlIHdlIHVwZGF0ZSB0aGUgQ0NXIHNvIGNoYW5uZWwgZG9lc24ndCAgICovCi0JCQkvKiBmZXRjaCBpdCB3aGVuIGl0IGlzIG9ubHkgaGFsZiBkb25lICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIG1lbWNweSggJnBfZW5kLT5yZWFkMV9ub3AyLCAmdGVtcF9jY3cgLAotCQkJCXNpemVvZihzdHJ1Y3QgY2N3MSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9yZWFkX2FjdGl2ZV9sYXN0LT5yX1RJQ18xLmNkYT0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdC0+cmVhZCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3JlYWRfYWN0aXZlX2xhc3QtPnJfVElDXzIuY2RhPQotCQkJCShfX3UzMilfX3BhKCZwX2ZpcnN0LT5yZWFkKTsKLSAgICAgICAgICAgICAgICB9Ci0JCS8qICAgICAgY2hhaW4gaW4gbmV3IHNldCBvZiBibG9ja3MgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3JlYWRfYWN0aXZlX2xhc3QtPm5leHQgPSBwX2ZpcnN0OwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfcmVhZF9hY3RpdmVfbGFzdD1wX2xhc3Q7Ci0gICAgICAgIH0gLyogZW5kIG9mIGlmICggcHJpdnB0ci0+IHBfcmVhZF9hY3RpdmVfZmlyc3QgPT1OVUxMKSAgKi8KLQlDTEFXX0RCRl9URVhUKDQsIHRyYWNlLCAiYWRkZXhpdCIpOwotICAgICAgICByZXR1cm4gMDsKLX0gICAgLyogICAgIGVuZCBvZiBhZGRfY2xhd19yZWFkcyAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSAqICAgY2N3X2NoZWNrX3JldHVybl9jb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0YXRpYyB2b2lkCi1jY3dfY2hlY2tfcmV0dXJuX2NvZGUoc3RydWN0IGNjd19kZXZpY2UgKmNkZXYsIGludCByZXR1cm5fY29kZSkKLXsKLQlDTEFXX0RCRl9URVhUKDQsIHRyYWNlLCAiY2N3cmV0Iik7Ci0gICAgICAgIGlmIChyZXR1cm5fY29kZSAhPSAwKSB7Ci0gICAgICAgICAgICAgICAgc3dpdGNoIChyZXR1cm5fY29kZSkgewotCQljYXNlIC1FQlVTWTogLyogQlV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lQX05BTUUsIGhvc3RfbmFtZSwgOCkhPTApIHx8Ci0JCQkgICAgKG1lbWNtcChXU19BUFBMX05BTUVfSVBfTkFNRSwgd3NfbmFtZSwgOCkhPTAgKSkKLSAgICAgICAgCSAgICAgICAgCXJjID0gRUlOVkFMOwotCQkJYnJlYWs7Ci0JCWRlZmF1bHQ6Ci0JICAgICAgIAkJaWYgKChtZW1jbXAoSE9TVF9BUFBMX05BTUUsIGhvc3RfbmFtZSwgOCkhPTApIHx8Ci0JCSAgICAJICAgIChtZW1jbXAocF9lbnYtPmFwaV90eXBlICwgd3NfbmFtZSwgOCkhPTApKQotICAgICAgICAJICAgICAgICAJcmMgPSBFSU5WQUw7Ci0JCQlicmVhazsKLQl9Ci0KLQlyZXR1cm4gcmM7Ci19ICAgIC8qICAgIGVuZCBvZiBmaW5kX2xpbmsgICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotICogICBjbGF3X2h3X3R4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RhdGljIGludAotY2xhd19od190eChzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBsb25nIGxpbmtpZCkKLXsKLSAgICAgICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYz0wOwotICAgICAgICBzdHJ1Y3QgY2xhd19wcml2YmsgCQkqcHJpdnB0cjsKLSAgICAgICAgc3RydWN0IGNjd2JrICAgICAgICAgICAqcF90aGlzX2NjdzsKLSAgICAgICAgc3RydWN0IGNjd2JrICAgICAgICAgICAqcF9maXJzdF9jY3c7Ci0gICAgICAgIHN0cnVjdCBjY3diayAgICAgICAgICAgKnBfbGFzdF9jY3c7Ci0gICAgICAgIF9fdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtQnVmZmVyczsKLSAgICAgICAgc2lnbmVkIGxvbmcgICAgICAgICAgICAgICAgICAgICBsZW5fb2ZfZGF0YTsKLSAgICAgICAgdW5zaWduZWQgbG9uZyAgICAgICAgICAgICAgICAgICBieXRlc0luVGhpc0J1ZmZlcjsKLSAgICAgICAgdW5zaWduZWQgY2hhciAgICAgICAgICAgICAgICAgICAqcERhdGFBZGRyZXNzOwotICAgICAgICBzdHJ1Y3QgZW5kY2N3ICAgICAgICAgICAgICAgICAgICpwRW5kOwotICAgICAgICBzdHJ1Y3QgY2N3MSAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1c7Ci0Jc3RydWN0IGNsYXdfZW52CQkJKnBfZW52OwotCXN0cnVjdCBjbGF3cGgJCQkqcGtfaGVhZDsKLQlzdHJ1Y3QgY2hiawkJCSpjaDsKLQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJod190eCIpOwotCXByaXZwdHIgPSAoc3RydWN0IGNsYXdfcHJpdmJrICopKGRldi0+bWxfcHJpdik7Ci0JcF9lbnYgPXByaXZwdHItPnBfZW52OwotCWNsYXdfZnJlZV93cnRfYnVmKGRldik7CS8qIENsZWFuIHVwIGZyZWUgY2hhaW4gaWYgcG9zaWJsZSAqLwotICAgICAgICAvKiAgc2NhbiB0aGUgd3JpdGUgcXVldWUgdG8gZnJlZSBhbnkgY29tcGxldGVkIHdyaXRlIHBhY2tldHMgICAqLwotICAgICAgICBwX2ZpcnN0X2Njdz1OVUxMOwotICAgICAgICBwX2xhc3RfY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gICAgICAgICAgICAgY2xhd19mcmVlX3dydF9idWYoIGRldiApOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudD09MCkgewotCQkJCQljaCA9ICZwcml2cHRyLT5jaGFubmVsW1dSSVRFX0NIQU5ORUxdOwotCQkJCQlhdG9taWNfaW5jKCZza2ItPnVzZXJzKTsKLQkJCQkJc2tiX3F1ZXVlX3RhaWwoJmNoLT5jb2xsZWN0X3F1ZXVlLCBza2IpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJZ290byBEb25lOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJY2xhd19jbGVhcl9idXN5KGRldik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgLyogIHR4IGxvY2sgICovCi0gICAgICAgICAgICAgICAgaWYgKGNsYXdfdGVzdF9hbmRfc2V0Yml0X2J1c3koVEJfVFgsZGV2KSkgeyAvKiBzZXQgdG8gYnVzeSAqLwotCQkJY2ggPSAmcHJpdnB0ci0+Y2hhbm5lbFtXUklURV9DSEFOTkVMXTsKLQkJCWF0b21pY19pbmMoJnNrYi0+dXNlcnMpOwotCQkJc2tiX3F1ZXVlX3RhaWwoJmNoLT5jb2xsZWN0X3F1ZXVlLCBza2IpOwotICAgICAgICAgICAgICAgICAgICAgICAgY2xhd19zdHJ0X291dF9JTyhkZXYgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJjPS1FQlVTWTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gRG9uZTI7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAgIC8qICAgICAgU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gICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+d3JpdGUuY291bnQ9Ynl0ZXNJblRoaXNCdWZmZXI7Ci0gICAgICAgICAgICAgICAgLyogICAgICBub3cgYWRkIHRvIGVuZCBvZiB0aGlzIGNoYWluICAgICovCi0gICAgICAgICAgICAgICAgaWYgKHBfZmlyc3RfY2N3PT1OVUxMKSAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZpcnN0X2Njdz1wX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAocF9sYXN0X2NjdyE9TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+bmV4dD1wX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVElDIGNjd3MgICAgICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+d19USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBfdGhpc19jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcF9sYXN0X2Njdz1wX3RoaXNfY2N3OyAgICAgIC8qIHNhdmUgbmV3IGxhc3QgYmxvY2sgKi8KLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgICAgRmlyc3RDQ1cgYW5kIExhc3RDQ1cgbm93IGNvbnRhaW4gYSBuZXcgc2V0IG9mIHdyaXRlIGNoYW5uZWwKLSAgICAgICAgKiAgICAgICBwcm9ncmFtcyB0byBhcHBlbmQgdG8gdGhlIHJ1bm5pbmcgY2hhbm5lbCBwcm9ncmFtCi0gICAgICAgICovCi0KLSAgICAgICAgaWYgKHBfZmlyc3RfY2N3IT1OVUxMKSB7Ci0JCS8qICAgICAgc2V0dXAgZW5kaW5nIGNjdyBzZXF1ZW5jZSBmb3IgdGhpcyBzZWdtZW50ICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIHBFbmQ9cHJpdnB0ci0+cF9lbmRfY2N3OwotICAgICAgICAgICAgICAgIGlmIChwRW5kLT53cml0ZTEpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMT0weDAwOyAgIC8qIHNlY29uZCBlbmQgY2N3IGlzIG5vdyBhY3RpdmUgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgc2V0IHVwIFRpYyBDQ1dzICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9jY3ctPndfVElDXzEuY2RhPQotCQkJCShfX3UzMilfX3BhKCZwRW5kLT53cml0ZTJfbm9wMSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTJfbm9wMi5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9SRUFERkY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTJfbm9wMi5mbGFncyAgICA9Ci0JCQkJQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfU0tJUDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMl9ub3AyLmNkYT0wOwotICAgICAgICAgICAgICAgICAgICAgICAgcEVuZC0+d3JpdGUyX25vcDIuY291bnQ9MTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSB7ICAvKiAgZW5kIG9mIGlmIChwRW5kLT53cml0ZTEpKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMT0weDAxOyAgIC8qIGZpcnN0IGVuZCBjY3cgaXMgbm93IGFjdGl2ZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVGljIENDV3MgICAgICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+d19USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBFbmQtPndyaXRlMV9ub3AxKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMV9ub3AyLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMV9ub3AyLmZsYWdzICAgID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICAgICAgICAgICAgICAgICAgcEVuZC0+d3JpdGUxX25vcDIuY2RhPTA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTFfbm9wMi5jb3VudD0xOwotICAgICAgICAgICAgICAgIH0gIC8qIGVuZCBpZiBpZiAocEVuZC0+d3JpdGUxKSAqLwotCi0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0PT1OVUxMICkgewotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfZmlyc3Q9cF9maXJzdF9jY3c7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2FjdGl2ZV9sYXN0PXBfbGFzdF9jY3c7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVGljIENDV3MgICAgICAgICAqLwotCi0gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wQ0NXLmNkYT0oX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuY291bnQ9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuZmxhZ3M9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuY21kX2NvZGU9Q0NXX0NMQVdfQ01EX1RJQzsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBFbmQtPndyaXRlMSkgewotCi0gICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICogZmlyc3Qgc2V0IG9mIGVuZGluZyBDQ1cncyBpcyBjaGFpbmVkIHRvIHRoZSBuZXcgd3JpdGUKLSAgICAgICAgICAgICAgICAgKiBjaGFpbiwgc28gdGhlIHNlY29uZCBzZXQgaXMgY2hhaW5lZCB0byB0aGUgYWN0aXZlIGNoYWluCi0gICAgICAgICAgICAgICAgICogVGhlcmVmb3JlIG1vZGlmeSB0aGUgc2Vjb25kIHNldCB0byBwb2ludCB0aGUgbmV3IHdyaXRlIGNoYWluLgotICAgICAgICAgICAgICAgICAqIG1ha2Ugc3VyZSB3ZSB1cGRhdGUgdGhlIENDVyBhdG9taWNhbGx5Ci0gICAgICAgICAgICAgICAgICogc28gY2hhbm5lbCBkb2VzIG5vdCBmZXRjaCBpdCB3aGVuIGl0J3Mgb25seSBoYWxmIGRvbmUKLSAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCAmcEVuZC0+d3JpdGUyX25vcDIsICZ0ZW1wQ0NXICwKLQkJCQkJc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2xhc3QtPndfVElDXzEuY2RhPQotCQkJCQkoX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKm1ha2Ugc3VyZSB3ZSB1cGRhdGUgdGhlIENDVyBhdG9taWNhbGx5Ci0gICAgICAgICAgICAgICAgICAgICAgICAgKnNvIGNoYW5uZWwgZG9lcyBub3QgZmV0Y2ggaXQgd2hlbiBpdCdzIG9ubHkgaGFsZiBkb25lCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCZwRW5kLT53cml0ZTFfbm9wMiwgJnRlbXBDQ1cgLAotCQkJCQlzaXplb2Yoc3RydWN0IGNjdzEpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfbGFzdC0+d19USUNfMS5jZGE9Ci0JCQkJICAgICAgICAoX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgfSAvKiBlbmQgaWYgaWYgKHBFbmQtPndyaXRlMSkgKi8KLQotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfbGFzdC0+bmV4dD1wX2ZpcnN0X2NjdzsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2xhc3Q9cF9sYXN0X2NjdzsKLSAgICAgICAgICAgICAgICB9Ci0KLSAgICAgICAgfSAvKiBlbmRpZiAocF9maXJzdF9jY3chPU5VTEwpICAqLwotICAgICAgICBkZXZfa2ZyZWVfc2tiX2FueShza2IpOwotICAgICAgICBjbGF3X3N0cnRfb3V0X0lPKGRldiApOwotICAgICAgICAvKiAgICAgIGlmIHdyaXRlIGZyZWUgY291bnQgaXMgemVybyAsIHNldCBOT0JVRkZFUiAgICAgICAqLwotCWlmIChwcml2cHRyLT53cml0ZV9mcmVlX2NvdW50PT0wKSB7Ci0JCWNsYXdfc2V0Yml0X2J1c3koVEJfTk9CVUZGRVIsZGV2KTsKLSAgICAgICAgfQotRG9uZTI6Ci0JY2xhd19jbGVhcmJpdF9idXN5KFRCX1RYLGRldik7Ci1Eb25lOgotCXJldHVybihyYyk7Ci19ICAgIC8qICAgIGVuZCBvZiBjbGF3X2h3X3R4ICAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgIGluaXRfY2N3X2JrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0YXRpYyBpbnQKLWluaXRfY2N3X2JrKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCi17Ci0KLSAgICAgICAgX191MzIgICBjY3dfYmxvY2tzX3JlcXVpcmVkOwotICAgICAgICBfX3UzMiAgIGNjd19ibG9ja3NfcGVycGFnZTsKLSAgICAgICAgX191MzIgICBjY3dfcGFnZXNfcmVxdWlyZWQ7Ci0gICAgICAgIF9fdTMyICAgY2xhd19yZWFkc19wZXJwYWdlPTE7Ci0gICAgICAgIF9fdTMyICAgY2xhd19yZWFkX3BhZ2VzOwotICAgICAgICBfX3UzMiAgIGNsYXdfd3JpdGVzX3BlcnBhZ2U9MTsKLSAgICAgICAgX191MzIgICBjbGF3X3dyaXRlX3BhZ2VzOwotICAgICAgICB2b2lkICAgICpwX2J1ZmY9TlVMTDsKLSAgICAgICAgc3RydWN0IGNjd2JrKnBfZnJlZV9jaGFpbjsKLQlzdHJ1Y3QgY2N3YmsqcF9idWY7Ci0Jc3RydWN0IGNjd2JrKnBfbGFzdF9DQ1dCOwotCXN0cnVjdCBjY3diaypwX2ZpcnN0X0NDV0I7Ci0gICAgICAgIHN0cnVjdCBlbmRjY3cgKnBfZW5kY2N3PU5VTEw7Ci0JYWRkcl90ICBy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0laRSAvIHByaXZwdHItPnBfZW52LT53cml0ZV9zaXplOwotCQljbGF3X3dyaXRlX3BhZ2VzID0gRElWX1JPVU5EX1VQKHByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzLAotCQkJCQkJY2xhd193cml0ZXNfcGVycGFnZSk7Ci0KLSAgICAgICAgfQotICAgICAgICBlbHNlIHsgICAgICAvKiA+ICBvciBlcXVhbCAgKi8KLQkJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcndyaXRlID0KLQkJCURJVl9ST1VORF9VUChwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplLCBQQUdFX1NJWkUpOwotCQljbGF3X3dyaXRlX3BhZ2VzID0gcHJpdnB0ci0+cF9lbnYtPndyaXRlX2J1ZmZlcnMgKgotCQkJCQlwcml2cHRyLT5wX2J1ZmZfcGFnZXNfcGVyd3JpdGU7Ci0gICAgICAgIH0KLSAgICAgICAgLyoKLSAgICAgICAgKiAgICAgICAgICAgICAgIGFsbG9jYXRlIGNjd19wYWdlc19yZXF1aXJlZAotICAgICAgICAqLwotICAgICAgICBpZiAocHJpdnB0ci0+cF9idWZmX2Njdz09TlVMTCkgewotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9Ci0JCQkodm9pZCAqKV9fZ2V0X2ZyZWVfcGFnZXMoX19HRlBfRE1BLAotCQkgICAgICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKGNjd19wYWdlc19yZXF1aXJlZCApKTsKLSAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9idWZmX2Njdz09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3dfbnVtPWNjd19wYWdlc19yZXF1aXJlZDsKLSAgICAgICAgfQotICAgICAgICBtZW1zZXQocHJpdnB0ci0+cF9idWZmX2NjdywgMHgwMCwKLQkJcHJpdnB0ci0+cF9idWZmX2Njd19udW0gKiBQQUdFX1NJWkUpOwotCi0gICAgICAgIC8qCi0gICAgICAgICogICAgICAgICAgICAgICBvYnRhaW4gZW5kaW5nIGNjdyBibG9jayBhZGRyZXNzCi0gICAgICAgICoKLSAgICAgICAgKi8KLSAgICAgICAgcHJpdnB0ci0+cF9lbmRfY2N3ID0gKHN0cnVjdCBlbmRjY3cgKikmcHJpdnB0ci0+ZW5kX2NjdzsKLSAgICAgICAgcmVhbF9hZGRyZXNzICA9IChfX3UzMilfX3BhKHByaXZwdHItPnBfZW5kX2Njdyk7Ci0gICAgICAgIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5pdGlhbGl6ZSBlbmRpbmcgQ0NXIGJsb2NrICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3PXByaXZwdHItPnBfZW5kX2NjdzsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWw9cmVhbF9hZGRyZXNzOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUxPTB4MDA7Ci0gICAgICAgIHBfZW5kY2N3LT5yZWFkMT0weDAwOwotCi0gICAgICAgIC8qICAgICAgd3JpdGUxX25vcDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMV9ub3AxLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX05PUDsKLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMV9ub3AxLmZsYWdzICAgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgIHBfZW5kY2N3LT53cml0ZTFfbm9wMS5jb3VudCAgICAgICA9IDE7Ci0gICAgICAgIHBfZW5kY2N3LT53cml0ZTFfbm9wMS5jZGEgICAgICAgICA9IDA7Ci0KLSAgICAgICAgLyogICAgICB3cml0ZTFfbm9wMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUxX25vcDIuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREZGOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUxX25vcDIuZmxhZ3MgICAgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfU0tJUDsKLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMV9ub3AyLmNvdW50ICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUxX25vcDIuY2RhICAgICAgICA9IDA7Ci0KLSAgICAgICAgLyogICAgICB3cml0ZTJfbm9wMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUyX25vcDEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfTk9QOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUyX25vcDEuZmxhZ3MgICAgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgIHBfZW5kY2N3LT53cml0ZTJfbm9wMS5jb3VudCAgICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUyX25vcDEuY2RhICAgICAgICAgID0gMDsKLQotICAgICAgICAvKiAgICAgIHdyaXRlMl9ub3AyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3LT53cml0ZTJfbm9wMi5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9SRUFERkY7Ci0gICAgICAgIHBfZW5kY2N3LT53cml0ZTJfbm9wMi5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUyX25vcDIuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMl9ub3AyLmNkYSAgICAgICAgICA9IDA7Ci0KLSAgICAgICAgLyogICAgICByZWFkMV9ub3AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9OT1A7Ci0gICAgICAgIHBfZW5kY2N3LT5yZWFkMV9ub3AxLmZsYWdzICAgICAgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jb3VudCAgICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jZGEgICAgICAgICAgPSAwOwotCi0gICAgICAgIC8qICAgICAgcmVhZDFfbm9wMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPnJlYWQxX25vcDIuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREZGOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5jb3VudCAgICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5jZGEgICAgICAgICAgPSAwOwotCi0gICAgICAgIC8qICAgICAgcmVhZDJfbm9wMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfTk9QOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDJfbm9wMS5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQzsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY2RhICAgICAgICAgID0gMDsKLQotICAgICAgICAvKiAgICAgIHJlYWQyX25vcDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3LT5yZWFkMl9ub3AyLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuZmxhZ3MgICAgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfU0tJUDsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuY2RhICAgICAgICAgID0gMDsKLQotICAgICAgICAvKgotICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkIGEgY2hhaW4gb2YgQ0NXcwotICAgICAgICAqCi0gICAgICAgICovCi0gICAgICAgIHBfYnVmZj1wcml2cHRyLT5wX2J1ZmZfY2N3OwotCi0gICAgICAgIHBfZnJlZV9jaGFpbj1OVUxMOwotICAgICAgICBmb3IgKGk9MCA7IGkgPCBjY3dfcGFnZXNfcmVxdWlyZWQ7IGkrKyApIHsKLSAgICAgICAgICAgICAgICByZWFsX2FkZHJlc3MgID0gKF9fdTMyKV9fcGEocF9idWZmKTsKLSAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1ZmY7Ci0gICAgICAgICAgICAgICAgZm9yIChqPTAgOyBqIDwgY2N3X2Jsb2Nrc19wZXJwYWdlIDsgaisrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dCAgPSBwX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZyZWVfY2hhaW4gPSBwX2J1ZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5yZWFsPShfX3UzMilfX3BhKHBfYnVmKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICsrcF9idWY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIHBfYnVmZis9UEFHRV9TSVpFOwotICAgICAgICB9Ci0gICAgICAgIC8qCi0gICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5pdGlhbGl6ZSBDbGF3U2lnbmFsQmxvY2sKLSAgICAgICAgKgotICAgICAgICAqLwotICAgICAgICBpZiAocHJpdnB0ci0+cF9jbGF3X3NpZ25hbF9ibGs9PU5VTEwpIHsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2NsYXdfc2lnbmFsX2Jsaz1wX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluPXBfZnJlZV9jaGFpbi0+bmV4dDsKLSAgICAgICAgICAgICAgICBwQ2xhd0g9KHN0cnVjdCBjbGF3aCAqKXByaXZwdHItPnBfY2xhd19zaWduYWxfYmxrOwotICAgICAgICAgICAgICAgIHBDbGF3SC0+bGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICBwQ2xhd0gtPm9wY29kZT0weGZmOwotICAgICAgICAgICAgICAgIHBDbGF3SC0+ZmxhZz1DTEFXX0JVU1k7Ci0gICAgICAgIH0KLQotICAgICAgICAvKgotICAgICAgICAqICAgICAgICAgICAgICAgYWxsb2NhdGUgd3JpdGVfcGFnZXNfcmVxdWlyZWQgYW5kIGFkZCB0byBmcmVlIGNoYWluCi0gICAgICAgICovCi0gICAgICAgIGlmIChwcml2cHRyLT5wX2J1ZmZfd3JpdGU9PU5VTEwpIHsKLSAgICAgICAgICAgIGlmIChwcml2cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZSA8IFBBR0VfU0laRSkgewotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl93cml0ZT0KLQkJCSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZyhjbGF3X3dyaXRlX3BhZ2VzICkpOwotICAgICAgICAgICAgICAgIGlmIChwcml2cHRyLT5wX2J1ZmZfd3JpdGU9PU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9TlVMTDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PTUVNOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVpbGQgQ0xBVyB3cml0ZSBmcmVlIGNoYWluCi0gICAgICAgICAgICAgICAgKgotICAgICAgICAgICAgICAgICovCi0KLSAgICAgICAgICAgICAgICBtZW1zZXQocHJpdnB0ci0+cF9idWZmX3dyaXRlLCAweDAwLAotCQkJY2N3X3BhZ2VzX3JlcXVpcmVkICogUEFHRV9TSVpFKTsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW49TlVMTDsKLQotICAgICAgICAgICAgICAgIHBfYnVmZj1wcml2cHRyLT5wX2J1ZmZfd3JpdGU7Ci0KLSAgICAgICAgICAgICAgICBmb3IgKGk9MCA7IGk8IHByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZiAgICAgICAgPSBwX2ZyZWVfY2hhaW47ICAgICAgLyogIGdldCBhIENDVyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluID0gcF9idWYtPm5leHQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dCAgPXByaXZwdHItPnBfd3JpdGVfZnJlZV9jaGFpbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfZnJlZV9jaGFpbiA9IHBfYnVmOwotICAgICAgICAgICAgICAgIC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C0gMSkgJiBQQUdFX01BU0spKSB7Ci0JCQkJcF9idWZmID0gcF9idWZmK3ByaXZwdHItPnBfZW52LT53cml0ZV9zaXplOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgfQotICAgICAgICAgICBlbHNlICAgICAgLyogIEJ1ZmZlcnMgYXJlID0+IFBBR0VfU0laRS4gMSBidWZmIHBlciBnZXRfZnJlZV9wYWdlcyAqLwotICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW49TlVMTDsKLSAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGk8IHByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgcF9idWZmPSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCSAgICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQlwcml2cHRyLT5wX2J1ZmZfcGFnZXNfcGVyd3JpdGUpICk7Ci0gICAgICAgICAgICAgICAgICAgaWYgKHBfYnVmZj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfY2N3LAotCQkJICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkgICAgICAJCXByaXZwdHItPnBfYnVmZl9jY3dfbnVtKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfY2N3PU5VTEw7Ci0JCQlwX2J1Zj1wcml2cHRyLT5wX2J1ZmZfd3JpdGU7Ci0gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZykKLQkJCQkJcF9idWYtPnBfYnVmZmVyLAotCQkJCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCQkJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcndyaXRlKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgICAgfSAgLyogRXJyb3Igb24gZ2V0X3BhZ2VzICAgKi8KLSAgICAgICAgICAgICAgICAgICBtZW1zZXQocF9idWZmLCAweDAwLCBwcml2cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZSApOwotICAgICAgICAgICAgICAgICAgIHBfYnVmICAgICAgICAgPSBwX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluICA9IHBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0ICAgPSBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9mcmVlX2NoYWluID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPnBfYnVmZmVyPShzdHJ1Y3QgY2xhd2J1ZiAqKXBfYnVmZjsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdyaXRlLmNkYSAgICAgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd3JpdGUuZmxhZ3MgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5mbGFncyAgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19yZWFkX0ZGLmNvdW50ICAgID0gMTsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5jZGEgICAgICA9Ci0JCQkoX191MzIpX19wYSgmcF9idWYtPiBoZWFkZXIuZmxhZyk7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPiB3X1RJQ18xLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1RJQzsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfVElDXzEuZmxhZ3MgICA9IDA7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPiB3X1RJQ18xLmNvdW50ICAgPSAwOwotICAgICAgICAgICAgICAgfSAgLyogZm9yIGFsbCB3cml0ZV9idWZmZXJzICAgKi8KLQotICAgICAgICAgICB9ICAgIC8qIGVsc2UgYnVmZmVycyBhcmUgUEFHRV9TSVpFIG9yIGJpZ2dlciAqLwotCi0gICAgICAgIH0KLSAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bT1jbGF3X3dyaXRlX3BhZ2VzOwotICAgICAgICBwcml2cHRyLT53cml0ZV9mcmVlX2NvdW50PXByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzOwotCi0KLSAgICAgICAgLyoKLSAgICAgICAgKiAgICAgICAgICAgICAgIGFsbG9jYXRlIHJlYWRfcGFnZXNfcmVxdWlyZWQgYW5kIGNoYWluIHRvIGZyZWUgY2hhaW4KLSAgICAgICAgKi8KLSAgICAgICAgaWYgKHByaXZwdHItPnBfYnVmZl9yZWFkPT1OVUxMKSB7Ci0gICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSA8IFBBR0VfU0laRSkgIHsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfcmVhZD0KLQkJCSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZyhjbGF3X3JlYWRfcGFnZXMpICk7Ci0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfYnVmZl9yZWFkPT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmcmVlX3BhZ2VzKCh1bnNpZ25lZCBsb25nKXByaXZwdHItPnBfYnVmZl9jY3csCi0JCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJCXByaXZwdHItPnBfYnVmZl9jY3dfbnVtKSk7Ci0JCQkvKiBmcmVlIHRoZSB3cml0ZSBwYWdlcyBzaXplIGlzIDwgcGFnZSBzaXplICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfd3JpdGUsCi0JCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX2Njdz1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlPU5VTEw7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgbWVtc2V0KHByaXZwdHItPnBfYnVmZl9yZWFkLCAweDAwLCBjbGF3X3JlYWRfcGFnZXMgKiBQQUdFX1NJWkUpOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9yZWFkX251bT1jbGF3X3JlYWRfcGFnZXM7Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkIENMQVcgcmVhZCBmcmVlIGNoYWluCi0gICAgICAgICAgICAgICAgKgotICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgcF9idWZmPXByaXZwdHItPnBfYnVmZl9yZWFkOwotICAgICAgICAgICAgICAgIGZvciAoaT0wIDsgaTwgcHJpdnB0ci0+cF9lbnYtPnJlYWRfYnVmZmVycyA7IGkrKykgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYgICAgICAgID0gcF9mcmVlX2NoYWluOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluID0gcF9idWYtPm5leHQ7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwX2xhc3RfQ0NXQj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dD1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsX1RJQ19hZGRyZXNzPTA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9DQ1dCPXBfYnVmOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0PXBfZmlyc3RfQ0NXQjsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhbF9USUNfYWRkcmVzcz0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdF9DQ1dCIC0+IHJlYWQgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9DQ1dCPXBfYnVmOwotCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+cF9idWZmZXI9KHN0cnVjdCBjbGF3YnVmICopcF9idWZmOwotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcmVhZCBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZC5jZGEgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkLmZsYWdzID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY291bnQgICAgICAgPSBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSByZWFkX2ggY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREhFQURFUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZF9oLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwX2J1Zi0+aGVhZGVyKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWRfaC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY291bnQgICAgICA9IHNpemVvZihzdHJ1Y3QgY2xhd2gpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSBTaWduYWwgY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfU0lHTkFMX1NNT0Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5jZGEgPQotCQkJCShfX3UzMilfX3BhKCYocENsYXdILT5mbGFnKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY291bnQgICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9USUNfMSBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJfVElDXzEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfVElDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmNkYSA9IChfX3UzMilyZWFsX1RJQ19hZGRyZXNzOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9USUNfMS5jb3VudCAgICAgID0gMDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9yZWFkX0ZGIGNvbW1hbmQgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwQ2xhd0gtPmZsYWcpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmZsYWdzID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQyB8IENDV19GTEFHX1BDSTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNvdW50ICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgaW5pdGlhbGl6ZSByX1RJQ18yICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfYnVmLT5yX1RJQ18yLAotCQkJCSZwX2J1Zi0+cl9USUNfMSwgc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICBpbml0aWFsaXplIEhlYWRlciAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+aGVhZGVyLmZsYWc9Q0xBV19QRU5ESU5HOwotCi0JCQlpZiAoKCh1bnNpZ25lZCBsb25nKXBfYnVmZitwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKSA+PQotCQkJICAoKHVuc2lnbmVkIGxvbmcpKHBfYnVmZisyKihwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKQotCQkJCSAtMSkKLQkJCSAgICYgUEFHRV9NQVNLKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZmY9IHBfYnVmZitwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmZj0KLQkJCQkodm9pZCAqKSgodW5zaWduZWQgbG9uZykKLQkJCQkJKHBfYnVmZisyKihwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKS0xKQotCQkJCQkgJiBQQUdFX01BU0spIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9ICAgLyogZm9yIHJlYWRfYnVmZmVycyAgICovCi0gICAgICAgICAgfSAgICAgICAgIC8qIHJlYWRfc2l6ZSA8IFBBR0VfU0laRSAgKi8KLSAgICAgICAgICBlbHNlIHsgIC8qIHJlYWQgU2l6ZSA+PSBQQUdFX1NJWkUgICovCi0gICAgICAgICAgICAgICAgZm9yIChpPTAgOyBpPCBwcml2cHRyLT5wX2Vudi0+cmVhZF9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZmYgPSAodm9pZCAqKV9fZ2V0X2ZyZWVfcGFnZXMoX19HRlBfRE1BLAotCQkJCShpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJCQlwcml2cHRyLT5wX2J1ZmZfcGFnZXNfcGVycmVhZCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBfYnVmZj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcmVlX3BhZ2VzKCh1bnNpZ25lZCBsb25nKXByaXZwdHItPnBfYnVmZl9jY3csCi0JCQkJCShpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKHByaXZwdHItPgotCQkJCQlwX2J1ZmZfY2N3X251bSkpOwotCQkJCS8qIGZyZWUgdGhlIHdyaXRlIHBhZ2VzICAqLwotCSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfYnVmZl93cml0ZTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBfYnVmIT1OVUxMKSB7Ci0JCQkJCWZyZWVfcGFnZXMoCi0JCQkJCSAgICAodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkJCSAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCQkJICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJ3cml0ZSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0JCQkJLyogZnJlZSBhbnkgcmVhZCBwYWdlcyBhbHJlYWR5IGFsbG9jICAqLwotCSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfYnVmZl9yZWFkOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLQkJCQkJZnJlZV9wYWdlcygKLQkJCQkJICAgICh1bnNpZ25lZCBsb25nKXBfYnVmLT5wX2J1ZmZlciwKLQkJCQkJICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJCQkgICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJyZWFkKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9idWY9cF9idWYtPm5leHQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX2Njdz1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfd3JpdGU9TlVMTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQocF9idWZmLCAweDAwLCBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmICAgICAgICA9IHBfZnJlZV9jaGFpbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9yZWFkID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZyZWVfY2hhaW4gPSBwX2J1Zi0+bmV4dDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBfbGFzdF9DQ1dCPT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0PU5VTEw7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWxfVElDX2FkZHJlc3M9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X0NDV0I9cF9idWY7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPm5leHQ9cF9maXJzdF9DQ1dCOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsX1RJQ19hZGRyZXNzPQotCQkJCQkoYWRkcl90KV9fcGEoCi0JCQkJCQkmcF9maXJzdF9DQ1dCIC0+IHJlYWQgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9DQ1dCPXBfYnVmOwotCQkJCS8qIHNhdmUgYnVmZiBhZGRyZXNzICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+cF9idWZmZXI9KHN0cnVjdCBjbGF3YnVmICopcF9idWZmOwotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcmVhZCBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZC5jZGEgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkLmZsYWdzID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY291bnQgICAgICAgPSBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSByZWFkX2ggY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREhFQURFUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZF9oLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwX2J1Zi0+aGVhZGVyKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWRfaC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY291bnQgICAgICA9IHNpemVvZihzdHJ1Y3QgY2xhd2gpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSBTaWduYWwgY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfU0lHTkFMX1NNT0Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5jZGEgPQotCQkJCShfX3UzMilfX3BhKCYocENsYXdILT5mbGFnKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY291bnQgICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9USUNfMSBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJfVElDXzEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfVElDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmNkYSA9IChfX3UzMilyZWFsX1RJQ19hZGRyZXNzOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9USUNfMS5jb3VudCAgICAgID0gMDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9yZWFkX0ZGIGNvbW1hbmQgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwQ2xhd0gtPmZsYWcpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmZsYWdzID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQyB8IENDV19GTEFHX1BDSTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNvdW50ICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgaW5pdGlhbGl6ZSByX1RJQ18yICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfYnVmLT5yX1RJQ18yLCAmcF9idWYtPnJfVElDXzEsCi0JCQkJc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICBpbml0aWFsaXplIEhlYWRlciAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+aGVhZGVyLmZsYWc9Q0xBV19QRU5ESU5HOwotCi0gICAgICAgICAgICAgICAgfSAgICAvKiBGb3IgcmVhZF9idWZmZXJzICAgKi8KLSAgICAgICAgICB9ICAgICAvKiAgcmVhZF9zaXplID49IFBBR0VfU0laRSAgICovCi0gICAgICAgIH0gICAgICAgLyogIHBCdWZmcmVhZCA9IE5VTEwgKi8KLSAgICAgICAgYWRkX2NsYXdfcmVhZHMoIGRldiAgLHBfZmlyc3RfQ0NXQiAsIHBfbGFzdF9DQ1dCKTsKLQlwcml2cHRyLT5idWZmc19hbGxvYyA9IDE7Ci0KLSAgICAgICAgcmV0dXJuIDA7Ci19ICAgIC8qICAgIGVuZCBvZiBpbml0X2Njd19iayAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgIHByb2JlX2Vycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgdm9pZAotcHJvYmVfZXJyb3IoIHN0cnVjdCBjY3dncm91cF9kZXZpY2UgKmNnZGV2KQotewotCXN0cnVjdCBjbGF3X3ByaXZiayAqcHJpdnB0cjsKLQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJwcm9iZXJyIik7Ci0JcHJpdnB0ciA9IGRldl9nZXRfZHJ2ZGF0YSgmY2dkZXYtPmRldik7Ci0JaWYgKHByaXZwdHIgIT0gTlVMTCkgewotCQlkZXZfc2V0X2RydmRhdGEoJmNnZGV2LT5kZXYsIE5VTEwpOwotCQlrZnJlZShwcml2cHRyLT5wX2Vudik7Ci0JCWtmcmVlKHByaXZwdHItPnBfbXRjX2VudmVsb3BlKTsKLQkJa2ZyZWUocHJpdnB0cik7Ci0JfQotfSAgICAvKiAgICBwcm9iZV9lcnJvciAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgIGNsYXdfcHJvY2Vzc19jb250cm9sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgaW50Ci1jbGF3X3Byb2Nlc3NfY29udHJvbCggc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGNjd2JrICogcF9jY3cpCi17Ci0KLSAgICAgICAgc3RydWN0IGNsYXdidWYgKnBfYnVmOwotICAgICAgICBzdHJ1Y3QgY2xhd2N0bCAgY3RsYms7Ci0gICAgICAgIHN0cnVjdCBjbGF3Y3RsICpwX2N0bGJrOwotICAgICAgICBjaGFyICAgIHRlbXBfaG9zdF9uYW1lWzhdOwotICAgICAgICBjaGFyICAgIHRlbXBfd3NfbmFtZVs4XT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lIERJU0NPTk5FQ1Q6Ci0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfc3lzdmFsLT5ob3N0X25hbWUsIGxvY2FsX25hbWUsIDgpOwotICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCZwX3N5c3ZhbC0+V1NfbmFtZSwgcmVtb3RlX25hbWUsIDgpOwotCQkJaWYgKHByaXZwdHItPnBfZW52LT5wYWNraW5nID4gMCkgewotCQkJLyogSG93IGJpZyBpcyB0aGUgYmlnZ2VzdCBwYWNrZXQgKi8KLQkJCQlwX2Nvbm5lY3QtPnJlc2VydmVkMVswXT1DTEFXX0ZSQU1FX1NJWkU7Ci0gICAgICAgICAgICAgICAgICAgICAgICAJcF9jb25uZWN0LT5yZXNlcnZlZDFbMV09Q0xBV19GUkFNRV9TSVpFOwotCQkJfSBlbHNlIHsKLQkgICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQoJnBfY29ubmVjdC0+cmVzZXJ2ZWQxLCAweDAwLCA0KTsKLSAgICAgICAgCSAgICAgICAgICAgICAgICBtZW1zZXQoJnBfY29ubmVjdC0+cmVzZXJ2ZWQyLCAweDAwLCA0KTsKLQkJCX0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgICAgd3JpdGUgQ29udHJvbCBSZWNvcmQgdG8gdGhlIGRldmljZSAgICAgICAgICAgICAgICAgICAqLwotCi0KLSAgICAgICAgc2tiID0gZGV2X2FsbG9jX3NrYihzaXplb2Yoc3RydWN0IGNsYXdjdGwpKTsKLSAgICAgICAgaWYgKCFza2IpIHsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsKLSAgICAgICAgfQotCW1lbWNweShza2JfcHV0KHNrYiwgc2l6ZW9mKHN0cnVjdCBjbGF3Y3RsKSksCi0JCXBfY3Rs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Y3RsICpwX2N0bCwgX191MzIgcmV0dXJuX2NvZGUpCi17Ci0gICAgICAgIHN0cnVjdCBjbGF3X2VudiAqICBwX2VudjsKLSAgICAgICAgc3RydWN0IGNsYXdfcHJpdmJrICpwcml2cHRyOwotICAgICAgICBpbnQgICAgcmM7Ci0KLQlDTEFXX0RCRl9URVhUKDIsIHNldHVwLCAiY2hrcmVzcCIpOwotCXByaXZwdHIgPSBkZXYtPm1sX3ByaXY7Ci0gICAgICAgIHBfZW52PXByaXZwdHItPnBfZW52OwotICAgICAgICByYz1jbGF3X3NlbmRfY29udHJvbChkZXYsIFNZU1RFTV9WQUxJREFURV9SRVNQT05TRSwKLQkJcF9jdGwtPmxpbmtpZCwKLQkJcF9jdGwtPmNvcnJlbGF0b3IsCi0gICAgICAgICAgICAgICAgcmV0dXJuX2NvZGUsCi0JCXBfZW52LT5ob3N0X25hbWUsCi0JCXBfZW52LT5hZGFwdGVyX25hbWUgICk7Ci0gICAgICAgIHJldHVybiByYzsKLX0gICAgIC8qICAgIGVuZCBvZiBjbGF3X3NuZF9zeXNfdmFsaWRhdGVfcnNwICAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSogICAgICAgICAgICAgICBjbGF3X3N0cnRfY29ubl9yZXEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0YXRpYyBpbnQKLWNsYXdfc3RydF9jb25uX3JlcShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ICkKLXsKLSAgICAgICAgaW50IHJjOwotCi0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bHNlCi0JICAgICAgICAgICAgICAgIGxpbmtfbnVtPXBfdGhpc19jY3ctPmhlYWRlci5vcGNvZGUgLyA4OwotICAgICAgICAgICAgICAgIGlmICgocF90aGlzX2Njdy0+aGVhZGVyLm9wY29kZSAmIE1PUkVfdG9fQ09NRV9GTEFHKSE9MCkgewotICAgICAgICAgICAgICAgICAgICAgICAgbXRjX3RoaXNfZnJtPTE7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAocF90aGlzX2Njdy0+aGVhZGVyLmxlbmd0aCE9Ci0JCQkJcHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSApIHsKLQkJCQlkZXZfd2FybihwX2RldiwKLQkJCQkJIlRoZSBjb21tdW5pY2F0aW9uIHBlZXIgb2YgJXMiCi0JCQkJCSIgc2VudCBhIGZhdWx0eSIKLQkJCQkJIiBmcmFtZSBvZiBsZW5ndGggJTAyeFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXYtPm5hbWUsIHBfdGhpc19jY3ctPmhlYWRlci5sZW5ndGgpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIGlmIChwcml2cHRyLT5tdGNfc2tpcHBpbmcpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICAgICAgICAqICAgV2UncmUgaW4gdGhlIG1vZGUgb2Ygc2tpcHBpbmcgcGFzdCBhCi0JCQkqICAgbXVsdGktZnJhbWUgbWVzc2FnZQotICAgICAgICAgICAgICAgICAgICAgICAgKiAgIHRoYXQgd2UgY2FuJ3QgcHJvY2VzcyBmb3Igc29tZSByZWFzb24gb3Igb3RoZXIuCi0gICAgICAgICAgICAgICAgICAgICAgICAqICAgVGhlIGZpcnN0IGZyYW1lIHdpdGhvdXQgdGhlIE1vcmUtVG8tQ29tZSBmbGFnIGlzCi0JCQkqICAgdGhlIGxhc3QgZnJhbWUgb2YgdGhlIHNraXBwZWQgbWVzc2FnZS4KLSAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW4gY2FzZSBvZiBNb3JlLVRvLUNvbWUgbm90IHNldCBpbiB0aGlzIGZyYW1lICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobXRjX3RoaXNfZnJtPT0wKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19za2lwcGluZz0wOyAvKiBPaywgdGhlIGVuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5tdGNfbG9naWNhbF9saW5rPS0xOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZ290byBOZXh0RnJhbWU7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKGxpbmtfbnVtPT0wKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjbGF3X3Byb2Nlc3NfY29udHJvbChkZXYsIHBfdGhpc19jY3cpOwotCQkJQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgIlVucGtDbnRsIik7Ci0gICAgICAgICAgICAgICAgICAgICAgICBnb3RvIE5leHRGcmFtZTsKLSAgICAgICAgICAgICAgICB9Ci11bnBhY2tfbmV4dDoKLQkJaWYgKHBfZW52LT5wYWNraW5nID09IERPX1BBQ0tFRCkgewotCQkJaWYgKHBhY2tfb2ZmID4gcF9lbnYtPnJlYWRfc2l6ZSkKLQkJCQlnb3RvIE5leHRGcmFtZTsKLQkJCXBfcGFja2QgPSBwX3RoaXNfY2N3LT5wX2J1ZmZlcitwYWNrX29mZjsKLQkJCXBfcGFja2ggPSAoc3RydWN0IGNsYXdwaCAqKSBwX3BhY2tkOwotCQkJaWYgKChwX3BhY2toLT5sZW4gPT0gMCkgfHwgLyogZG9uZSB3aXRoIHRoaXMgZnJhbWU/ICovCi0JCQkgICAgKHBfcGFja2gtPmZsYWcgIT0gMCkpCi0JCQkJZ290byBOZXh0RnJhbWU7Ci0JCQlieXRlc190b19tb3YgPSBwX3BhY2toLT5sZW47Ci0JCQlwYWNrX29mZiArPSBieXRlc190b19tb3Yrc2l6ZW9mKHN0cnVjdCBjbGF3cGgpOwotCQkJcCsrOwotCQl9IGVsc2UgewotICAgICAgICAgICAgICAgIAlieXRlc190b19tb3Y9cF90aGlzX2Njdy0+aGVhZGVyLmxlbmd0aDsKLQkJfQotICAgICAgICAgICAgICAgIGlmIChwcml2cHRyLT5tdGNfbG9naWNhbF9saW5rPDApIHsKLQotICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgKiAgaWYgTW9yZS1Uby1Db21lIGlzIHNldCBpbiB0aGlzIGZyYW1lIHRoZW4gd2UgZG9uJ3Qga25vdwotICAgICAgICAgICAgICAgICogIGxlbmd0aCBvZiBlbnRpcmUgbWVzc2FnZSwgYW5kIGhlbmNlIGhhdmUgdG8gYWxsb2NhdGUKLQkJKiAgbGFyZ2UgYnVmZmVyICAgKi8KLQotICAgICAgICAgICAgICAgIC8qICAgICAgV2UgYXJlIHN0YXJ0aW5nIGEgbmV3IGVudmVsb3BlICAqLwotICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19vZmZzZXQ9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19sb2dpY2FsX2xpbms9bGlua19udW07Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKGJ5dGVzX3RvX21vdiA+IChNQVhfRU5WRUxPUEVfU0laRS0gcHJpdnB0ci0+bXRjX29mZnNldCkgKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIGVycm9yICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+c3RhdHMucnhfZnJhbWVfZXJyb3JzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBnb3RvIE5leHRGcmFtZTsKLSAgICAgICAgICAgICAgICB9Ci0JCWlmIChwX2Vudi0+cGFja2luZyA9PSBET19QQUNLRUQpIHsKLQkJCW1lbWNweSggcHJpdnB0ci0+cF9tdGNfZW52ZWxvcGUrIHByaXZwdHItPm10Y19vZmZzZXQsCi0JCQkJcF9wYWNrZCtzaXplb2Yoc3RydWN0IGNsYXdwaCksIGJ5dGVzX3RvX21vdik7Ci0KLQkJfSBlbHNlCXsKLSAgICAgICAgICAgICAgICAJbWVtY3B5KCBwcml2cHRyLT5wX210Y19lbnZlbG9wZSsgcHJpdnB0ci0+bXRjX29mZnNldCwKLSAgICAgICAgICAgICAgICAgICAgICAgIAlwX3RoaXNfY2N3LT5wX2J1ZmZlciwgYnl0ZXNfdG9fbW92KTsKLQkJfQotICAgICAgICAgICAgICAgIGlmIChtdGNfdGhpc19mcm09PTApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxlbl9vZl9kYXRhPXByaXZwdHItPm10Y19vZmZzZXQrYnl0ZXNfdG9fbW92OwotICAgICAgICAgICAgICAgICAgICAgICAgc2tiPWRldl9hbGxvY19za2IobGVuX29mX2RhdGEpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNrYikgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoc2tiX3B1dChza2IsbGVuX29mX2RhdGEpLAotCQkJCQlwcml2cHRyLT5wX210Y19lbnZlbG9wZSwKLQkJCQkJbGVuX29mX2RhdGEpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmRldj1kZXY7Ci0JCQkJc2tiX3Jlc2V0X21hY19oZWFkZXIoc2tiKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLT5wcm90b2NvbD1odG9ucyhFVEhfUF9JUCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNrYi0+aXBfc3VtbWVkPUNIRUNLU1VNX1VOTkVDRVNTQVJZOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5zdGF0cy5yeF9wYWNrZXRzKys7Ci0JCQkJcHJpdnB0ci0+c3RhdHMucnhfYnl0ZXMrPWxlbl9vZl9kYXRhOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXRpZl9yeChza2IpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0JCQkJZGV2X2luZm8ocF9kZXYsICJBbGxvY2F0aW5nIGEgYnVmZmVyIGZvciIKLQkJCQkJIiBpbmNvbWluZyBkYXRhIGZhaWxlZFxuIik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnN0YXRzLnJ4X2Ryb3BwZWQrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19vZmZzZXQ9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19sb2dpY2FsX2xpbms9LTE7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+bXRjX29mZnNldCs9Ynl0ZXNfdG9fbW92OwotICAgICAgICAgICAgICAgIH0KLQkJaWYgKHBfZW52LT5wYWNraW5nID09IERPX1BBQ0tFRCkKLQkJCWdvdG8gdW5wYWNrX25leHQ7Ci1OZXh0RnJhbWU6Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgUmVtb3ZlIFRoaXNDQ1dibG9jayBmcm9tIGFjdGl2ZSByZWFkIHF1ZXVlLCBhbmQgYWRkIGl0Ci0gICAgICAgICAgICAgICAgKiAgIHRvIHF1ZXVlIG9mIGZyZWUgYmxvY2tzIHRvIGJlIHJldXNlZC4KLSAgICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGkrKzsKLSAgICAgICAgICAgICAgICBwX3RoaXNfY2N3LT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICBwX3RoaXNfY2N3LT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgICAgIGFkZCB0aGlzIG9uZSB0byB0aGUgZnJlZSBxdWV1ZSBmb3IgbGF0ZXIgcmV1c2UKLSAgICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGlmIChwX2ZpcnN0X2Njdz09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9jY3cgPSBwX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9jY3ctPm5leHQgPSBwX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBwX2xhc3RfY2N3ID0gcF90aGlzX2NjdzsKLSAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICogICAgICAgY2hhaW4gdG8gbmV4dCBibG9jayBvbiBhY3RpdmUgcmVhZCBxdWV1ZQotICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgcF90aGlzX2NjdyA9IHByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3Q7Ci0JCUNMQVdfREJGX1RFWFRfKDQsIHRyYWNlLCAicnhwa3QgJWQiLCBwKTsKLSAgICAgICAgfSAvKiBlbmQgb2Ygd2hpbGUgKi8KLQotICAgICAgICAvKiAgICAgIGNoZWNrIHZhbGlkaXR5ICAgICAgICAgICAgICAgICAgKi8KLQotCUNMQVdfREJGX1RFWFRfKDQsIHRyYWNlLCAicnhmcm0gJWQiLCBpKTsKLSAgICAgICAgYWRkX2NsYXdfcmVhZHMoZGV2LCBwX2ZpcnN0X2NjdywgcF9sYXN0X2Njdyk7Ci0gICAg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2NvZGUocF9jaC0+Y2RldiwgcmMpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotCWVsc2UgewotCQlDTEFXX0RCRl9URVhUKDIsIHRyYWNlLCAiUmVhZEFjdCIpOwotCX0KLQotICAgICAgICBpZiAobG9jaz09TE9DS19ZRVMpIHsKLSAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlKGdldF9jY3dkZXZfbG9jayhwX2NoLT5jZGV2KSwgc2F2ZWZsYWdzKTsKLSAgICAgICAgfQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJTdFJkRXhpdCIpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgIC8qICAgIGVuZCBvZiBjbGF3X3N0cnRfcmVhZCAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgIGNsYXdfc3RydF9vdXRfSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgdm9pZAotY2xhd19zdHJ0X291dF9JTyggc3RydWN0IG5ldF9kZXZpY2UgKmRldiApCi17Ci0gICAgICAgIGludCAgICAgICAgICAgICAJcmMgPSAwOwotICAgICAgICB1bnNpZ25lZCBsb25nICAgCXBhcm07Ci0gICAgICAgIHN0cnVjdCBjbGF3X3ByaXZiayAJKnByaXZwdHI7Ci0gICAgICAgIHN0cnVjdCBjaGJrICAgICAJKnBfY2g7Ci0gICAgICAgIHN0cnVjdCBjY3diayAgIAkqcF9maXJzdF9jY3c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T1DTEFXX1BFTkRJTkcpKSB8fAotICAgICAgICAgICAgICAgICAgICAoKHBfdGhpc19jY3cgPT0gcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfbGFzdCkgJiYKLSAgICAgICAgICAgICAgICAgICAgIChwX3RoaXNfY2N3LT5oZWFkZXIuZmxhZyE9Q0xBV19QRU5ESU5HKSkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qIFRoZSBuZXh0IENDVyBpcyBPSyBvciB0aGlzIGlzICAqLwotCQkJLyogdGhlIGxhc3QgQ0NXLi4uZnJlZSBpdCAgIEBBMUEgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2FjdGl2ZV9maXJzdD1wX3RoaXNfY2N3LT5uZXh0OwotCQkJcF90aGlzX2Njdy0+aGVhZGVyLmZsYWc9Q0xBV19QRU5ESU5HOwotICAgICAgICAgICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+bmV4dD1wcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW47Ci0JCQlwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW49cF90aGlzX2NjdzsKLSAgICAgICAgICAgICAgICAgICAgICAgICsrcHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudDsKLQkJCXByaXZwdHItPnN0YXRzLnR4X2J5dGVzKz0gcF90aGlzX2Njdy0+d3JpdGUuY291bnQ7Ci0JCQlwX3RoaXNfY2N3PXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+c3RhdHMudHhfcGFja2V0cysrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLQkJCWJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgICBpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudCE9MCkgewotICAgICAgICAgICAgICAgIGNsYXdfY2x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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICBDQ1cgY29tbWFuZCBjb2RlcyBmb3IgQ0xBVyBwcm90b2NvbCAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1dSSVRFICAgICAgICAgICAweDAxICAgICAgLyogd3JpdGUgLSBub3QgaW5jbHVkaW5nIGxpbmsgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1JFQUQgICAgICAgICAgICAweDAyICAgICAgLyogcmVhZCAqLwotI2RlZmluZSBDQ1dfQ0xBV19DTURfTk9QICAgICAgICAgICAgIDB4MDMgICAgICAvKiBOT1AgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1NFTlNFICAgICAgICAgICAweDA0ICAgICAgLyogU2Vuc2UgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1NJR05BTF9TTU9EICAgICAweDA1ICAgICAgLyogU2lnbmFsIFN0YXR1cyBNb2RpZmllciAqLwotI2RlZmluZSBDQ1dfQ0xBV19DTURfVElDICAgICAgICAgICAgIDB4MDggICAgICAvKiBUSUMgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1JFQURIRUFERVIgICAgICAweDEyICAgICAgLyogcmVhZCBoZWFkZXIgZGF0YSAqLwotI2RlZmluZSBDQ1dfQ0xBV19DTURfUkVBREZGICAgICAgICAgIDB4MjIgICAgICAvKiByZWFkIGFuIEZ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MQVdfREJGX0hFWChsZXZlbCxuYW1lLGFkZHIsbGVuKSBcCi1kbyB7IFwKLQlkZWJ1Z19ldmVudChjbGF3X2RiZl8jI25hbWUsbGV2ZWwsKHZvaWQqKShhZGRyKSxsZW4pOyBcCi19IHdoaWxlICgwKQotCi0jZGVmaW5lIENMQVdfREJGX1RFWFRfKGxldmVsLG5hbWUsdGV4dC4uLikgXAotCWRvIHsgXAotCQlpZiAoZGVidWdfbGV2ZWxfZW5hYmxlZChjbGF3X2RiZl8jI25hbWUsIGxldmVsKSkgeyBcCi0JCQlzcHJpbnRmKGRlYnVnX2J1ZmZlciwgdGV4dCk7IFwKLQkJCWRlYnVnX3RleHRfZXZlbnQoY2xhd19kYmZfIyNuYW1lLCBsZXZlbCwgXAotCQkJCQkJZGVidWdfYnVmZmVyKTsgXAotCQl9IFwKLQl9IHdoaWxlICgwKQotCi0vKioKLSAqIEVudW0gZm9yIGNsYXNzaWZ5aW5nIGRldGVjdGVkIGRldmljZXMuCi0gKi8KLWVudW0gY2xhd19jaGFubmVsX3R5cGVzIHsKLQkvKiBEZXZpY2UgaXMgbm90IGEgY2hhbm5lbCAgKi8KLQljbGF3X2NoYW5uZWxfdHlwZV9ub25lLAotCi0JLyogRGV2aWNlIGlzIGEgQ0xBVyBjaGFubmVsIGRldmljZSAqLwotCWNsYXdfY2hhbm5lbF90eXBlX2NsYXcKLX07Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogIERlZmluZSBDb250cm9sIEJsb2NrcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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HJ1Y3QgY2N3YmsgewotICAgICAgICB2b2lkICAgKm5leHQ7ICAgICAgICAvKiBwb2ludGVyIHRvIG5leHQgY2N3IGJsb2NrICovCi0gICAgICAgIF9fdTMyICAgICByZWFsOyAgICAgICAgIC8qIHJlYWwgYWRkcmVzcyBvZiB0aGlzIGNjdyAqLwotICAgICAgICB2b2lkICAgICAgKnBfYnVmZmVyOyAgICAvKiB2aXJ0dWFsIGFkZHJlc3Mgb2YgZGF0YSAqLwotICAgICAgICBzdHJ1Y3QgY2xhd2ggICAgIGhlYWRlcjsgICAgICAgLyogY2xhdyBoZWFkZXIgKi8KLSAgICAgICAgc3RydWN0IGNjdzEgICAgd3JpdGU7ICAgLyogd3JpdGUgQ0NXICAgICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHdfcmVhZF9GRjsgLyogcmVhZCBGRiAqLwotICAgICAgICBzdHJ1Y3QgY2N3MSAgICB3X1RJQ18xOyAgICAgICAgLyogVElDICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHJlYWQ7ICAgICAgICAgLyogcmVhZCBDQ1cgICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHJlYWRfaDsgICAgICAgIC8qIHJlYWQgaGVhZGVyICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHNpZ25hbDsgICAgICAgLyogc2lnbmFsIFNNT0QgICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHJfVElDXzE7ICAgICAgICAvKiBUSUMxICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHJfcmVhZF9GRjsgICAgICAvKiByZWFkIEZGICAqLwotICAgICAgICBzdHJ1Y3QgY2N3MSAgICByX1RJQ18yOyAgICAgICAgLyogVElDMiAqLwotfTsKLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotLyogICAgIENMQVcgY29udHJvbCBibG9jayAgICAgICAgICAgICAgICAgICAgICA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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICBDTEFXICBlbnZpcm9ubWVudCBibG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0cnVjdCBjbGF3X2VudiB7Ci0gICAgICAgIHVuc2lnbmVkIGludCAgICAgICAgICAgIGRldm5vWzJdOyAgICAgICAvKiBkZXZpY2UgbnVtYmVyICovCi0gICAgICAgIGNoYXIgICAgICAgICAgICAgICAgICAgIGhvc3RfbmFtZVs5XTsgICAvKiBIb3N0IG5hbWUgKi8KLSAgICAgICAgY2hhciAgICAgICAgICAgICAgICAgICAgYWRhcHRlcl9uYW1lIFs5XTsgLyogYWRhcHRlciBuYW1lICovCi0gICAgICAgIGNoYXIgICAgICAgICAgICAgICAgICAgIGFwaV90eXBlWzldOyAgICAvKiBUQ1BJUCwgQVBJIG9yIFBBQ0tFRCAqLwotICAgICAgICB2b2lkICAgICAgICAgICAgICAgICAgICAqcF9wcml2OyAgICAgICAgLyogcHJpdnB0ciAqLwotICAgICAgICBfX3UxNiAgICAgICAgICAgICAgICAgICByZWFkX2J1ZmZlcnM7ICAgLyogcmVhZCBidWZmZXIgbnVtYmVyICovCi0gICAgICAgIF9fdTE2ICAgICAgICAgICAgICAgICAgIHdyaXRlX2J1ZmZlcnM7ICAvKiB3cml0ZSBidWZmZXIgbnVtYmVyICovCi0gICAgICAgIF9fdTE2ICAgICAgICAgICAgICAgICAgIHJlYWRfc2l6ZTsgICAgICAvKiByZWFkIGJ1ZmZlciBzaXplICovCi0gICAgICAgIF9fdTE2ICAgICAgICAgICAgICAgICAgIHdyaXRlX3NpemU7ICAgICAvKiB3cml0ZSBidWZmZXIgc2l6ZSAqLwotICAgICAgICBfX3UxNiAgICAgICAgICAgICAgICAgICBkZXZfaWQ7ICAgICAgICAg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b2lkICAgICAgICpwX210Y19lbnZlbG9wZTsKLQlzdHJ1Y3QJICAgc2tfYnVmZgkqcGtfc2tiOwkvKiBwYWNraW5nIGJ1ZmZlciAgICAqLwotCWludAkgICBwa19jbnQ7Ci0gICAgICAgIHN0cnVjdCBjbGF3Y3RsIGN0bF9iazsKLSAgICAgICAgc3RydWN0IGNsYXdfZW52ICpwX2VudjsKLSAgICAgICAgX191OCAgICAgICBzeXN0ZW1fdmFsaWRhdGVfY29tcDsKLSAgICAgICAgX191OCAgICAgICByZWxlYXNlX3BlbmQ7Ci0gICAgICAgIF9fdTggICAgICBjaGVja3N1bV9yZWNlaXZlZF9pcF9wa3RzOwotCV9fdTggICAgICBidWZmc19hbGxvYzsKLSAgICAgICAgc3RydWN0IGVuZGNjdyAgZW5kX2NjdzsKLSAgICAgICAgdW5zaWduZWQgbG9uZyAgdGJ1c3k7Ci0KLX07Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIGRlZmluZSBnbG9iYWwgY29uc3RhbnRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIENDV0JLX1NJWkUgc2l6ZW9mKHN0cnVjdCBjY3diaykKLQotCmRpZmYgLS1naXQgYS9kcml2ZXJzL3MzOTAvbmV0L2N0Y21fbXBjLmMgYi9kcml2ZXJzL3MzOTAvbmV0L2N0Y21fbXBjLmMKaW5kZXggMmRiYzc3Yi4uZWRmMTZiZiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zMzkwL25ldC9jdGNtX21wYy5jCisrKyBiL2RyaXZlcnMvczM5MC9uZXQvY3RjbV9tcGMuYwpAQCAtMTMwLDExICsxMzAsNyBAQAogCV9fdTMyCWN0LCBzdywgcm0sIGR1cDsKIAljaGFyCSpwdHIsICpycH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FbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC00MDYsOCArNDA2LDEzIEBACiAJc3RydWN0IFNjc2lfSG9zdCAgKnNob3N0ID0gY2xhc3NfdG9fc2hvc3QoZGV2KTsKIAlzdHJ1Y3QgbHBmY192cG9ydCAqdnBvcnQgPSAoc3RydWN0IGxwZmNfdnBvcnQgKikgc2hvc3QtPmhvc3RkYXRhOwogCXN0cnVjdCBscGZjX2hiYSAgICpwaGJhID0gdnBvcnQtPnBoYmE7CisJY2hhciBmd3JldltGV19SRVZfU1RSX1NJWkVdOwogCi0JcmV0dXJuIHNucHJpbnRmKGJ1ZiwgUEFHRV9TSVpFLCAiJXNcbiIsIHBoYmEtPk9wdGlvblJPTVZlcnNpb24pOworCWlmIChwaGJhLT5zbGlfcmV2IDwgTFBGQ19TTElfUkVWNCkKKwkJcmV0dXJuIHNucHJpbnRmKGJ1ZiwgUEFHRV9TSVpFLCAiJXNcbiIsIHBoYmEtPk9wdGlvblJPTVZlcnNpb24pOworC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gICoKKyAqIENvcHlyaWdodCAoQykgMjAwOS0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0zMTk0LDYgKzMxOTQsNyBAQAogCQljbWQtPnVuc2xpMy5yY3ZzbGkzLm94X2lkID0gMHhmZmZmOwogCX0KIAljbWRpb2NicS0+aW9jYl9mbGFnIHw9IExQRkNfSU9fTElCREZDOworCWNtZGlvY2JxLT5pb2NiX2ZsYWcgfD0gTFBGQ19JT19MT09QQkFDSzsKIAljbWRpb2NicS0+dnBvcnQgPSBwaGJhLT5wcG9ydDsKIAljbWRpb2NicS0+aW9jYl9jbXBsID0gTlVMTDsKIAlpb2NiX3N0YXQgPSBscGZjX3NsaV9pc3N1ZV9pb2NiX3dhaXQocGhiYSwgTFBGQ19FTFNfUklORywgY21kaW9jYnEsCkBAIC00MTc5LDYgKzQxODAsNyBAQAogCQkJc3dpdGNoIChvcGNvZGUpIHsKIAkJCWNhc2UgQ09NTl9PUENPREVfR0VUX0NOVExfQURETF9BVFRSSUJVVEVTOgogCQkJY2FzZSBDT01OX09QQ09ERV9HRVRfQ05UTF9BVFRSSUJVVEVTOgorCQkJY2FzZSBDT01OX09QQ09ERV9HRVRfUFJPRklMRV9DT05GSUc6CiAJCQkJbHBmY19wcmludGZfbG9nKHBoYmEsIEtFUk5fSU5GTywgTE9HX0xJQkRGQywKIAkJCQkJCSIzMTA2IEhhbmRsZWQgU0xJX0NPTkZJRyAiCiAJCQkJCQkic3Vic3lzX2NvbW4sIG9wY29kZTp4JXhcbiIsCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2JzZy5oIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ic2cuaAppbmRleCA5MjhlZjYwLi5lNTU3YmNkIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2JzZy5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfYnNnLmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMTAtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMTAtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0yNDYsNiArMjQ2LDcgQEAKICNkZWZpbmUgbHBmY19lbWIxX3N1YmNtbmRfc3Vic3lzX1dPUkQJd29yZDYKIC8qIFN1YnN5c3RlbSBDT01OICgweDAxKSBPcENvZGVzICovCi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3RydWN0IGZjX2Z1bmN0aW9uX3RlbXBsYXRlIGxwZmNfdHJhbnNwb3J0X2Z1bmN0aW9uczsKIGV4dGVybiBzdHJ1Y3QgZmNfZnVuY3Rpb25fdGVtcGxhdGUgbHBmY192cG9ydF90cmFuc3BvcnRfZnVuY3Rpb25zOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jCmluZGV4IDYxYTMyY2QuLmFmMTI5OTYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3QuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2N0LmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxMyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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xwZmNfZGVidWdmcy5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19kZWJ1Z2ZzLmMKaW5kZXggNTYzM2U3ZC4uNTEzZWRjYiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19kZWJ1Z2ZzLmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19kZWJ1Z2ZzLmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDctMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA3LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZWxzLmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Vscy5jCmluZGV4IGM2NjA4OGQuLjg1MWU4ZWYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZWxzLmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19lbHMuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMjI0Myw4ICsyMjQzLDcgQEAKIAkqLwogCWlmICh2cG9ydC0+cG9ydF9zdGF0ZSA8IExQRkNfVlBPUlRfUkVBRFkpIHsKIAkJLyogSWYgd2UgZ2V0IGhlcmUsIHRoZXJlIGlzIG5vdGhpbmcgdG8gQURJU0MgKi8KLQkJaWYgKHZwb3J0LT5wb3J0X3R5cGUgPT0gTFBGQ19QSFlTSUNBTF9QT1JUKQotCQkJbHBmY19pc3N1ZV9jbGVhcl9sYShwaGJhLCB2cG9ydCk7CisJCWxwZmNfaX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y9scGZjX2hiYWRpc2MuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMzQzOSw2ICszNDM5LDExIEBACiAJcG1iLT5jb250ZXh0MSA9IE5VTEw7CiAJcG1iLT5jb250ZXh0MiA9IE5VTEw7CiAKKwlscGZjX3ByaW50Zl92bG9nKHZwb3J0LCBLRVJOX0lORk8sIExPR19TTEksCisJCQkgIjAwMDIgcnBpOiV4IERJRDoleCBmbGc6JXggJWQgbWFwOiV4ICVwXG4iLAorCQkJIG5kbHAtPm5scF9ycGksIG5kbHAtPm5scF9ESUQsIG5kbHAtPm5scF9mbGFnLAorCQkJIGF0b21pY19yZWFkKCZuZGxwLT5rcmVmLnJlZmNvdW50KSwKKwkJCSBuZGx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bnQgKi8KIAogLyoKICAqICBCZWdpbiBIQkEgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzLgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19odzQuaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHc0LmgKaW5kZXggZjQzMmVjMS4uMTgxM2M0NSAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19odzQuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3NC5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA5LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA5LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMzA4NSw2ICszMDg1LDkgQEAKICNkZWZpbmUgTFBGQ19BU1lOQ19MSU5LX1NQRUVEXzE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FBGQ19TTElfRVZFTlRfVFlQRV9NSVNDT05GSUdVUkVECTB4OQorI2RlZmluZSBMUEZDX1NMSV9FVkVOVF9UWVBFX1JFTU9URV9EUE9SVAkweEEKIH07CiAKIC8qCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaW5pdC5jCmluZGV4IDBiMmM1M2EuLmU4YzhjMWUgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaW5pdC5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaW5pdC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC0xMzMwLDE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k9ERVY7CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX21ib3guYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbWJveC5jCmluZGV4IDA2MjQxZjUuLjgxNmY1OTYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbWJveC5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbWJveC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTMgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX25wb3J0ZGlzYy5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYwppbmRleCA1Y2MxMTAzLi40Y2I5ODgyIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX25wb3J0ZGlzYy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbnBvcnRkaXNjLmMKQEAgLTEsNyArMSw3IEBACiAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTMgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC0yNzYsNiArMjc2LDcgQEAKIAlzdHJ1Y3QgU2NzaV9Ib3N0ICAgKnNob3N0ID0gbHBmY19zaG9zdF9mcm9tX3Zwb3J0KHZwb3J0KTsKIAlzdHJ1Y3QgbHBmY19oYmEgICAgKnBoYmEgPSB2cG9ydC0+cGhiYTsKIAlzdHJ1Y3QgbHBmY19kbWFidWYgKnBjbWQ7CisJdWludDY0X3QgbmxwX3BvcnR3d24gPSA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Njc2kuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5jCmluZGV4IDRmOTIyMmUuLmNiNzNjZjkgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC0xMTMwLDYgKzExMzAsMjUgQEAKIH0KIAogLyoqCisgKiBscGZjX2ZjcGNtZF90b19pb2NiIC0gY29weSB0aGUgZmNwX2NtZCBkYXRhIGludG8gdGhlIElPQ0IKKyAqIEBkYXRhOiBBIHBvaW50ZXIgdG8gdGhlIGltbWVkaWF0ZSBjb21tYW5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GVtcGxhdGUgPSB7CiAJLm1vZHVsZQkJCT0gVEhJU19NT0RVTEUsCiAJLm5hbWUJCQk9IExQRkNfRFJJVkVSX05BTUUsCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5oCmluZGV4IDAzODlhYzEuLjQ3NGUzMGMgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2NzaS5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYwppbmRleCAyMDdhNDNkLi41NmY3MzY4IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9ydGlvbnMgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDUgQ2hyaXN0b3BoIEhlbGx3aWcgICAgICAgICAgICAgICoKQEAgLTkxOCwxMiArOTE4LDE2IEBACiAJCWxwZmNfY21kID0gKHN0cnVjdCBscGZjX3Njc2lfYnVmICopIHBpb2NicS0+Y29udGV4dDE7CiAJCW5kbHAgPSBscGZjX2NtZC0+cmRhdGEtPnBub2RlOwogCX0gZWxzZSAgaWYgKChwaW9jYnEtPmlvY2IudWxwQ29t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JIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTgwLDYgKzgwLDcgQEAKIAogI2RlZmluZSBMUEZDX0lPX09BUwkJMHgxMDAwMCAvKiBPQVMgRkNQIElPICovCiAjZGVmaW5lIExQRkNfSU9fRk9GCQkweDIwMDAwIC8qIEZPRiBGQ1AgSU8gKi8KKyNkZWZpbmUgTFBGQ19JT19MT09QQkFDSwkweDQwMDAwIC8qIExvb3BiYWNrIElPICovCiAKIAl1aW50MzJfdCBkcnZyVGltZW91dDsJLyogZHJpdmVyIHRpbWVvdXQgaW4gc2Vjb25kcyAqLwogCXVpbnQzMl90IGZjcF93cWlkeDsJLyogaW5kZXggdG8gRkNQIHdvcmsgcXVldWUgKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpNC5oIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGk0LmgKaW5kZXggMjJjZWIyYi4uNmVjYTNiOCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGk0LmgKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGk0LmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDktMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA5LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTY3MSw3ICs2NzEsNyBAQAogCQkJdWludDMyX3QpOwogdm9pZCBscGZjX3NsaTRfcXVldWVfZnJlZShzdHJ1Y3QgbHBmY19xdWV1ZSAqKTsKIGludCBscGZjX2VxX2NyZWF0ZShzdHJ1Y3QgbHBmY19oYmEgKiwgc3RydWN0IGxwZmNfcXVldWUgKiwgdWludDMyX3QpOwotaW50IGxwZmNfbW9kaWZ5X2ZjcF9lcV9kZWxheShzdHJ1Y3QgbHBmY19oYmEgKiwgdWludDE2X3QpOworaW50IGxwZmNfbW9kaWZ5X2ZjcF9lcV9kZWxheShzdHJ1Y3QgbHBmY19oYmEgKiwgdWludDMyX3QpOwogaW50IGxwZmNfY3FfY3JlYXRlKHN0cnVjdCBscGZjX2hiYSAqLCBzdHJ1Y3QgbHBmY19xdWV1ZSAqLAogCQkJc3RydWN0IGxwZmNfcXVldWUgKiwgdWludDMyX3QsIHVpbnQzMl90KTsKIGludDMyX3QgbHBmY19tcV9jcmVhdGUoc3RydWN0IGxwZmNfaGJhICosIHN0cnVjdCBscGZjX3F1ZXVlICosCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdmVyc2lvbi5oCmluZGV4IDg5NDEzYWQuLmMzN2JiOWY5IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMTgsNyArMTgsNyBAQAogICogaW5jbHVkZWQgd2l0aCB0aGlzIHBhY2thZ2UuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0jZGVmaW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ICB8ICAgICBIb2xlcwl8CiAgKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxN2QgICAgICAgfCAweDAxNDQsMHgwMTQ2CXwKKyAqIHwgTW9kdWxlIEluaXQgYW5kIFByb2JlICAgICAgICB8ICAgICAgIDB4MDE3ZiAgICAgICB8IDB4MDE0NiAgICAgICAgIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MDE1Yi0weDAxNjAJfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgwMTZlLTB4MDE3MAl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDAxNmUtMHgwMTcwICB8CiAgKiB8IE1haWxib3ggY29tbWFuZHMgICAgICAgICAgICAgfCAgICAgICAweDExOGQgICAgICAgfCAweDExMTUtMHgxMTE2CXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MTExYS0weDExMWIgIHwKICAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjAxNiAgICAgICB8IDB4MjAyMC0weDIwMjIsIHwKQEAgLTYwLDcgKzYwLDcgQEAKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEzYy0weGIxNDAgIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjE0OQkJfAogICogfCBNdWx0aVEgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhjMDBjICAgICAgIHwJCXwKLSAqIHwgTWlzYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4ZDIxMyAgICAgICB8IDB4ZDAxMS0weGQwMTcJfAorICogfCBNaXNjICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhkMzAwICAgICAgIHwgMHhkMDE2LTB4ZDAxNwl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMjEsMHhkMDI0CXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDAyNSwweGQwMjkJfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhkMDJhLDB4ZDAyZQl8CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvcWxhMnh4eC9xbGFfZGVmLmggYi9kcml2ZXJzL3Njc2kvcWxhMnh4eC9xbGFfZGVmLmgKaW5kZXggNWY2YjI5Ni4uZTg2MjAxZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL3FsYTJ4eHgvcWxhX2RlZi5oCisrKyBiL2RyaXZlcnMvc2NzaS9xbGEyeHh4L3FsYV9kZWYuaApAQCAtMjE2Myw3ICsyMTYzLDcgQEAKIAkJdWludDhfdCBub2RlX25hbWVbV1dOX1NJWkVdOwogCQl1aW50OF90IG1hbnVmYWN0dXJlcls2NF07CiAJCXVpbnQ4X3Qgc2VyaWFsX251bVszMl07Ci0JCXVpbnQ4X3QgbW9kZWxbMTZdOworCQl1aW50OF90IG1vZGVsWzE2KzFdOwogCQl1aW50OF90IG1vZGVsX2Rlc2NbODBdOwogCQl1aW50OF90IGh3X3ZlcnNpb25bMzJdOwogCQl1aW50OF90IGRyaXZlcl92ZXJzaW9uWzMyXTsKQEAgLTIxODQsOSArMjE4NCw5IEBACiAJdWludDE2X3QgbGVuOwog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VmaW5lIF9fREdOQ19DTFNfSAogCi0jaW5jbHVkZSAiZGduY190eXBlcy5oIgotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFBlciBjaGFubmVsL3BvcnQgQ2xhc3NpYyBVQVJUIHN0cnVjdHVyZQkJCQkqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0zNSwxNSArMjUsMjUgQEAKICAqCQkJVSA9IFVudXNlZC4JCQkJCSoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKy8qCisgKiB0eHJ4ICAgIDogV1IgUkhSL1RIUiAtIEhvbGRpbmcgcmVnCisgKiBpZXIgICAgIDogV1IgSUVSIC0gSW50ZXJydXB0IEVuYWJsZSBSZWcKKyAqIGlzcl9mY3IgOiBXUiBJU1IvRkNSIC0gSW50ZXJydXB0IFN0YXR1cyBSZWcvRmlmbyBDb250cm9sIFJlZworICogbGNyICAgICA6IFdSIExDUiAtIExpbmUgQ29udHJvbCBSZWcKKyAqIG1jciAgICAgOiBXUiBNQ1IgLSBNb2RlbSBDb250cm9sIFJlZworICogbHNyICAgICA6IFdSIExTUiAtIExpbmUgU3RhdHVzIFJlZworICogbXNyICAgICA6IFdSIE1TRyAtIE1vZGVtIFN0YXR1cyBSZWcKKyAqIHNwciAgICAgOiBXUiBTUFIgLSBTY3JhdGNoIHBhZCBSZWcKKyAqLwogc3RydWN0IGNsc191YXJ0X3N0cnVjdCB7Ci0JdTggdHhyeDsJCS8qIFdSICBSSFIvVEhSIC0gSG9sZGluZyBSZWcgKi8KLQl1OCBpZXI7CQkvKiBXUiAgSUVSIC0gSW50ZXJydXB0IEVuYWJsZSBSZWcgKi8KLQl1OCBpc3JfZmNyOwkJLyogV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UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIKLSAqIFBVUlBPU0UuICBTZWUgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCi0gKgotICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKLSAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCi0gKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4KLSAqCi0gKglOT1RFOiBUSElTIElTIEEgU0hBUkVEIEhFQURFUi4gRE8gTk9UIENIQU5HRSBDT0RJTkcgU1RZTEUhISEKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIFRoaXMgZmlsZSBpcyBpbnRlbmRlZCB0byBjb250YWluIGFsbCB0aGUga2VybmVsICJkaWZmZXJlbmNlcyIgYmV0d2VlbiB0aGUKLSAqIHZhcmlvdXMga2VybmVscyB0aGF0IHdlIHN1cHBvcnQuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYgX19ER05DX0tDT01QQVRfSAotI2RlZmluZSBfX0RHTkNfS0NPTVBBVF9ICi0KLSNpZiAhZGVmaW5lZChUVFlfRkxJUEJVRl9TSVpFKQotIyBkZWZpbmUgVFRZX0ZMSVBCVUZfU0laRSA1MTIKLSNlbmRpZgotCi0KLS8qIFNwYXJzZSBzdHVmZiAqLwotIyBpZm5kZWYgX191c2VyCi0jICBkZWZpbmUgX191c2VyCi0jICBkZW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RoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKLSAqIEZvdW5kYXRpb24sIEluYy4sIDY3NSBNYXNzIEF2ZSwgQ2FtYnJpZGdlLCBNQSAwMjEzOSwgVVNBLgotICoKLSAqCU5PVEU6IFRISVMgSVMgQSBTSEFSRUQgSEVBREVSLiBETyBOT1QgQ0hBTkdFIENPRElORyBTVFlMRSEhIQogICovCiAKICNpZm5kZWYgX19ESUdJX0gKICNkZWZpbmUgX19ESUdJX0gKIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKglEZWZpbml0aW9ucyBmb3IgRGlnaSBkaXR0eSgxKSBjb21tYW5kLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi0vKgotICogQ29weXJpZ2h0IChjKSAxOTg4LTk2IERpZ2kgSW50ZXJuYXRpb25hbCBJbmMuLCBBbGwgUmlnaHRzIFJlc2VydmVkLgotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFRoaXMgbW9kdWxlIHByb3ZpZGVzIGFwcGxpY2F0aW9uIGFjY2VzcyB0byBzcGVjaWFsIERpZ2kKLSAqIHNlcmlhbCBsaW5lIGVuaGFuY2VtZW50cyB3aGljaCBhcmUgbm90IHN0YW5kYXJkIFVOSVgodG0pIGZlYXR1cmVzLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmICFkZWZpbmVkKFRJT0NNT0RHKQotCi0jZGVmaW5lCVRJ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b29rZWQgcHJvY2Vzc2luZyBkb25lIGluIEZFUCAqLwogI2RlZmluZSBESUdJX0ZPUkNFRENECTB4MDEwMAkJLyogRm9yY2UgY2FycmllcgkJKi8KICNkZWZpbmUJRElHSV9BTFRQSU4JMHgwMjAwCQkvKiBBbHRlcm5hdGUgUkotNDUgcGluIGNvbmZpZwkqLwotI2RlZmluZQlESUdJX0FJWE9OCTB4MDQwMAkJLyogQXV4IGZsb3cgY29udHJvbCBpbiBmZXAJKi8KICNkZWZpbmUJRElHSV9QUklOVEVSCTB4MDgwMAkJLyogSG9sZCBwb3J0IG9wZW4gZm9yIGZsb3cgY250cmwqLwotI2RlZmluZSBESUdJX1BQX0lOUFVUCTB4MTAwMAkJLyogQ2hhbmdlIHBhcmFsbGVsIHBvcnQgdG8gaW5wdXQqLwogI2RlZmluZSBESUdJX0RUUl9UT0dHTEUJMHgyMDAwCQkvKiBTdXBwb3J0IERUUiBUb2dnbGUgICAgICAgICAgICovCi0jZGVmaW5lIERJR0lfNDIyCTB4NDAwMAkJLyogZm9yIDQyMi8yMzIgc2VsZWN0YWJsZSBwYW5lbCAqLwogI2RlZmluZSBESUdJX1JUU19UT0dHTEUJMHg4MDAwCQkvKiBTdXBwb3J0IFJUUyBUb2dnbGUJCSovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFRoZXNlIG9wdGlvbnMgYXJlIG5vdCBzdXBwb3J0ZWQgb24gdGhlIGNvbXhpLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUJRElHSV9DT01YSQkoRElHSV9GQVNUfERJR0lfQ09PS3xEU1JQQUNFfERDRFBBQ0V8RFRSUEFDRSkKLQogI2RlZmluZSBESUdJX1BMRU4JMjgJCS8qIFN0cmluZyBsZW5ndGgJCSovCiAjZGVmaW5lCURJR0lfVFNJWgkxMAkJLyogVGVybWluYWwgc3RyaW5nIGxlbgkJKi8KIApAQCAtMTYzLDc2ICs3Nyw2IEBACiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBLTUUgZGVmaW5pdGlvbnMgYW5kIHN0cnVjdHVyZXMuCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZQlSV19JRExFCQkwCS8qIE9wZXJhdGlvbiBjb21wbGV0ZQkJCSovCi0jZGVmaW5lCVJXX1JFQUQJCTEJLyogUmVhZCBDb25jZW50cmF0b3IgTWVtb3J5CQkqLwotI2RlZmluZQlSV19XUklURQkyCS8qIFdyaXRlIENvbmNlbnRyYXRvciBNZW1vcnkJCSovCi0KLXN0cnVjdCByd190IHsKLQl1bnNpZ25lZCBjaGFyCXJ3X3JlcTsJCS8qIFJlcXVlc3QgdHlwZQkJCSovCi0JdW5zaWduZWQgY2hhcglyd19ib2FyZDsJLyogSG9zdCBBZGFwdGVyIGJvYXJkIG51bWJlcgkqLwotCXVuc2lnbmVkIGNoYXIJcndfY29uYzsJLyogQ29uY2VudHJhdG9yIG51bWJlcgkJKi8KLQl1bnNpZ25lZCBjaGFyCXJ3X3Jlc2VydmVkOwkvKiBSZXNlcnZlZCBmb3IgZXhwYW5zaW9uCSovCi0JdW5zaWduZWQgaW50CXJ3X2FkZHI7CS8qIEFkZHJlc3MgaW4gY29uY2VudHJhdG9yCSovCi0JdW5zaWduZWQgc2hvcnQJcndfc2l6ZTsJLyogUmVhZC93cml0ZSByZXF1ZXN0IGxlbmd0aAkqLwotCXVuc2lnbmVkIGNoYXIJcndfZGF0YVsxMjhdOwkvKiBEYXRhIHRvIHJlYWQvd3JpdGUJCSovCi19OwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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0NCkJLyogZ2V0IGJvYXJkIGluZm8gICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBTdHJ1Y3R1cmUgdXNlZCB3aXRoIGlvY3RsIGNvbW1hbmRzIGZvciBwZXItY2hhbm5lbCBpbmZvcm1hdGlvbgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdHJ1Y3QgZGlnaV9jaCB7Ci0JdW5zaWduZWQgaW50CWluZm9fYmRudW07CQkvKiBCb2FyZCBudW1iZXIgKDAgYmFzZWQpICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2NoYW5uZWw7CQkvKiBDaGFubmVsIGluZGV4IG51bWJlciAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2NoX2NmbGFnOwkJLyogQ2hhbm5lbCBjZmxhZwkgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2NoX2lmbGFnOwkJLyogQ2hhbm5lbCBpZmxhZwkgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2NoX29mbGFnOwkJLyogQ2hhbm5lbCBvZmxhZwkgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2Noc2l6ZTsJCS8qIENoYW5uZWwgc3RydWN0dXJlIHNpemUgICovCi0JdW5zaWduZWQgaW50CWluZm9fc2xlZXBfc3RhdDsJLyogc2xlZXAgc3RhdHVzCQkgICAqLwotCWRldl90CQlpbmZvX2RldjsJCS8qIGRldmljZSBudW1iZXIJICAgKi8KLQl1bnNpZ25lZCBjaGFyCWluZm9faW5pdHN0YXRlOwkJLyogQ2hhbm5lbCBpbml0IHN0YXRlCSAgICovCi0JdW5zaWduZWQgY2hhcglpbmZvX3J1bm5pbmc7CQkvKiBDaGFubmVsIHJ1bm5pbmcgc3RhdGUgICAqLwotCWludAkJcmVzZXJ2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xMAotI2RlZmluZSBUX0NYICAgICAgICAgICAgMDAyMAotI2RlZmluZSBUX0VQQyAgICAgICAgICAgMDAzMAotI2RlZmluZSBUX1BDTElURSAgICAgICAgMDA0MAotI2RlZmluZSBUX1NQWFggICAgICAgICAgMDA1MAotI2RlZmluZSBUX0FWWFggICAgICAgICAgMDA2MAotI2RlZmluZSBUX0RYQiAgICAgICAgICAgMDA3MAotI2RlZmluZSBUX0EyS180XzggICAgICAgMDA3MAotCi0jZGVmaW5lIEJVU1RZUEUgICAgICAgICAwNzAwCi0jZGVmaW5lIFRfSVNBQlVTICAgICAgICAwMDAwCi0jZGVmaW5lIFRfTUNCVVMgICAgICAgICAwMTAwCi0jZGVmaW5lIFRfRUlTQUJVUyAgICAgICAwMjAwCi0jZGVmaW5lIFRfUENJQlVTICAgICAgICAwNDAwCi0KLS8qIEJvYXJkIFN0YXRlIERlZmluaXRpb25zICovCi0KLSNkZWZpbmUgQkRfUlVOTklORyAgICAgIDB4MAotI2RlZmluZSBCRF9SRUFTT04gICAgICAgMHg3ZgotI2RlZmluZSBCRF9OT1RGT1VORCAgICAgMHgxCi0jZGVmaW5lIEJEX05PSU9QT1JUICAgICAweDIKLSNkZWZpbmUgQkRfTk9NRU0gICAgICAgIDB4MwotI2RlZmluZSBCRF9OT0JJT1MgICAgICAgMHg0Ci0jZGVmaW5lIEJEX05PRkVQICAgICAgICAweDUKLSNkZWZpbmUgQkRfRkFJTEVEICAgICAgIDB4NgotI2RlZmluZSBCRF9BTExPQ0FURUQgICAgMHg3Ci0jZGVmaW5lIEJEX1RSSUJPT1QgICAgICAweDgKLSNkZWZpbmUgQkRfQkFES01FICAgICAgIDB4ODAKLQotI2RlZmluZSBESUdJX0FJWE9OICAgICAgMHgwNDAwICAgICAgICAgIC8qIEF1eCBmbG93IGNvbnRyb2wgaW4gZmVwICovCi0KLS8qIElvY3RscyBuZWVkZWQgZm9yIGRwYSBvcGVyYXRpb24gKi8KLQotI2RlZmluZSBESUdJX0dFVERE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wkJZGV2X2VycihwYXItPmluZm8tPmRldmljZSwgIndyaXRlIGZhaWxlZCBhbmQgcmV0dXJuZWQ6ICVkXG4iLAorCQkJcmV0KTsKIAogCXJldHVybiByZXQ7CiB9CmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvZmJ0ZnQvZmJfcmE4ODc1LmMgYi9kcml2ZXJzL3N0YWdpbmcvZmJ0ZnQvZmJfcmE4ODc1LmMKaW5kZXggYzMyM2MwNi4uMmM0ZDRkYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL2ZidGZ0L2ZiX3JhODg3NS5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9mYnRmdC9mYl9yYTg4NzUuYwpAQCAtMTEsNyArMTEsNyBAQAogCQkJCQkJICAqKioqKiAgICAgICogICAqCiAgIERhdGUgICAgOiAxMC4wNi4yMDE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqICAgKgogICBWZXJzaW9uIDogVjEuMTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKgotICBSZXZpc29uIDogNQorICBSZXZpc2lvbiA6IDUKIAogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKQEAgLTc5LDExMiArNzksMTEyIEBACiAKIAlpZiAoKHBhci0+aW5mby0+dmFyLnhyZXMgPT0gMzIwKSAmJiAocGFyLT5pbmZvLT52YXIueXJlcyA9PSAyNDApKSB7CiAJCS8qIFBMTCBjbG9jayBmcmVxdWVuY3kgKi8KLQkJd3JpdGVfcmVnKHBhciwgMHg4OCAsIDB4MEEpOwotCQl3cml0ZV9yZWcocGFyLCAweDg5ICwgMHgwMik7CisJCXdyaXRlX3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KIAkvKiBTTFBPVVQgLSBTbGVlcCBvdXQgJiBib29zdGVyIG9uICovCi0JLTEsIDB4MTEsICAgICAgICAgICAgICAgICAgICAgICAgICAKKwktMSwgMHgxMSwKIAktMiwgNTAwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkZWxheSAqLwogCiAJLyogRlJNQ1RSMSAtIGZyYW1lIHJhdGUgY29udHJvbDogbm9ybWFsIG1vZGUKIAkgICAgIGZyYW1lIHJhdGUgPSBmb3NjIC8gKDEgeCAyICsgNDApICogKExJTkUgKyAyQyArIDJEKSAqLwotCS0xLCAweEIxLCAweDAxLCAweDJDLCAweDJELCAKKwktMSwgMHhCMSwgMHgwMSwgMHgyQywgMHgyRCwKIAogCS8qIEZSTUNUUjIgLSBmcmFtZSByYXRlIGNvbnRyb2w6IGlkbGUgbW9kZQogCSAgICAgZnJhbWUgcmF0ZSA9IGZvc2MgLyAoMSB4IDIgKyA0MCkgKiAoTElORSArIDJDICsgMkQpICovCi0JLTEsIDB4QjIsIDB4MDEsIDB4MkMsIDB4MkQsIAorCS0xLCAweEIyLCAweDAxLCAweDJDLCAweDJELAogCiAJLyogRlJNQ1RSMyAtIGZyYW1lIHJhdGUgY29udHJvbCAtIHBhcnRpYWwgbW9kZQogCSAgICAgZG90IGludmVyc2lvbiBtb2RlLCBsaW5lIGludmVyc2lvbiBtb2RlICovCkBAIC02OCw3ICs2OCw3IEBACiAKIAkvKiBQV0NUUjQgLSBQb3dlciBDb250cm9sCiAJICAgICBCQ0xLLzIsIE9wYW1wIGN1cnJlbnQgc21hbGwgJiBNZWRpdW0gbG93ICovCi0JLTEsIDB4QzMsMHg4QSwweDJBLAorCS0xLCAweEMzLCAweDhBLCAweDJBLAogCiAJLyogUFdDVFI1IC0gUG93ZXIgQ29udHJvbCAqLwogCS0xLCAweEM0LCAweDhBLCAweEVFLApAQCAtOTEsNyArOTEsNyBAQAogCS0yLCAxMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL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ZmJ0ZnRvcHMud3JpdGVfcmVnaXN0ZXIocGFyLCBOVU1BUkdTKF9fVkFfQVJHU19fKSwgX19WQV9BUkdTX18pCiAKIC8qIGZidGZ0LWNvcmUuYyAqLwogZXh0ZXJuIHZvaWQgZmJ0ZnRfZGJnX2hleChjb25zdCBzdHJ1Y3QgZGV2aWNlICpkZXYsCkBAIC0zMjYsOCArMzI0LDggQEAKIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCQkJCQkJCSAgIFwKIHN0YXRpYyBjb25zdCBzdHJ1Y3Qgb2ZfZGV2aWNlX2lkIGR0X2lkc1tdID0geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgeyAuY29tcGF0aWJsZSA9IF9jb21wYXRpYmxlIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAge30sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl7IC5jb21wYXRpYmxlID0gX2NvbXBhdGlibGUgfSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXt9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkJCQkJCQkgICBcCiBNT0RVTEVfREVWSUNFX1RBQkxFKG9mLCBkdF9pZHMpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0zMzcsNyArMzM1LDcgQEAKIAkuZHJpdmVyID0geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkubmFtZSAgID0gX25hbWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJLm93bmVyICA9IFRISVNfTU9EVUxFLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgLm9mX21hdGNoX3RhYmxlID0gb2ZfbWF0Y2hfcHRyKGR0X2lkcyksICAgICAgICAgICAgICAgICAgICBcCisJCS5vZl9tYXRjaF90YWJsZSA9IG9mX21hdGNoX3B0cihkdF9pZHMpLCAgICAgICAgICAgICAgICAgICAgXAogCX0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLnByb2JlICA9IGZidGZ0X2RyaXZlcl9wcm9iZV9zcGksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkucmVtb3ZlID0gZmJ0ZnRfZHJpdmVyX3JlbW92ZV9zcGksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzQ3LDcgKzM0NSw3IEBACiAJLmRyaXZlciA9IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJLm5hbWUgICA9IF9uYW1lLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCS5vd25lciAgPSBUSElTX01PRFVMRSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIC5vZl9tYXRjaF90YWJsZSA9IG9mX21hdGNoX3B0cihkdF9pZHMpLCAgICAgICAgICAgICAgICAgICAgXAorCQkub2ZfbWF0Y2hfdGFibGUgPSBvZl9tYXRjaF9wdHIoZHRfaWRzKSwgICAgICAgICAgICAgICAgICAgIFwKIAl9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5wcm9iZSAgPS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QgZXJyOworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfT1BFTiwKKwkJCQkJICBNQ19DTURfUFJJX0xPVywgMCk7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMCwgMzIsIGRwYnBfaWQpOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwllcnIgPSBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworCWlmIChlcnIpCisJCXJldHVybiBlcnI7CisKKwkvKiByZXRyaWV2ZSByZXNwb25zZSBwYXJhbWV0ZXJzICovCisJKnRva2VuID0gTUNfQ01EX0hEUl9SRUFEX1RPS0VOKGNtZC5oZWFkZXIpOworCisJcmV0dXJuIGVycjsKK30KK0VYUE9SVF9TWU1CT0woZHBicF9vcGVuKTsKKworaW50IGRwYnBfY2xvc2Uoc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sIHVpbnQxNl90IHRva2VuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfQ0xPU0UsIE1DX0NNRF9QUklfSElHSCwKKwkJCQkJICB0b2tlbik7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCXJldHVybiBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorRVhQT1JUX1NZTUJPTChkcGJwX2Nsb3NlKTsKKworaW50IGRwYnBfY3JlYXRlKHN0cnVjdCBmc2xfbWNfaW8gKm1jX2lvLAorCQljb25zdCBzdHJ1Y3QgZHBicF9jZmcgKmNmZywKKwkJdWludDE2X3QgKnRva2VuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCWludCBlcnI7CisKKwkodm9pZCkoY2ZnKTsgLyogd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ycV9pbmRleCwKKwkJCXVpbnQzMl90ICpzdGF0dXMpCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisJaW50IGVycjsKKworCS8qIHByZXBhcmUgY29tbWFuZCAqLworCWNtZC5oZWFkZXIgPSBtY19lbmNvZGVfY21kX2hlYWRlcihEUE1DUF9DTURJRF9HRVRfSVJRX1NUQVRVUywKKwkJCQkJICBNQ19DTURfUFJJX0xPVywgdG9rZW4pOworCWNtZC5wYXJhbXNbMF0gfD0gbWNfZW5jKDMyLCA4LCBpcnFfaW5kZXgpOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwllcnIgPSBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworCWlmIChlcnIpCisJCXJldHVybiBlcnI7CisKKwkvKiByZXRyaWV2ZSByZXNwb25zZSBwYXJhbWV0ZXJzICovCisJKnN0YXR1cyA9ICh1aW50MzJfdCltY19kZWMoY21kLnBhcmFtc1swXSwgMCwgMzIpOworCXJldHVybiAwOworfQorCitpbnQgZHBtY3BfY2xlYXJfaXJxX3N0YXR1cyhzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJCSAgIHVpbnQxNl90IHRva2VuLAorCQkJICB1aW50OF90IGlycV9pbmRleCwKKwkJCSAgdWludDMyX3Qgc3RhdHVzKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQTUNQX0NNRElEX0NMRUFSX0lSUV9TVEFUVVMsCisJCQkJCSAgTUNfQ01EX1BSSV9MT1csIHRva2VuKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygwLCAzMiwgc3RhdHVzKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygzMiwgOCwgaXJxX2luZGV4KTsKKworCS8qIHNlbmQgY29tbWFuZCB0byBtYyovCisJcmV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bnQgZHBtY3Bfc2V0X2lycV9tYXNrKHN0cnVjdCBmc2xfbWNfaW8JKm1jX2lvLAorCQkgICAgICAgdWludDE2X3QJCXRva2VuLAorCQkgICAgICB1aW50OF90CQlpcnFfaW5kZXgsCisJCSAgICAgIHVpbnQzMl90CQltYXNrKTsKKworLyoqCisgKiBkcG1jcF9nZXRfaXJxX21hc2soKSAtIEdldCBpbnRlcnJ1cHQgbWFzay4KKyAqIEBtY19pbzoJUG9pbnRlciB0byBNQyBwb3J0YWwncyBJL08gb2JqZWN0CisgKiBAdG9rZW46CVRva2VuIG9mIERQTUNQIG9iamVjdAorICogQGlycV9pbmRleDoJVGhlIGludGVycnVwdCBpbmRleCB0byBjb25maWd1cmUKKyAqIEBtYXNrOglSZXR1cm5lZCBldmVudCBtYXNrIHRvIHRyaWdnZXIgaW50ZXJydXB0CisgKgorICogRXZlcnkgaW50ZXJydXB0IGNhbiBoYXZlIHVwIHRvIDMyIGNhdXNlcyBhbmQgdGhlIGludGVycnVwdCBtb2RlbCBzdXBwb3J0cworICogbWFza2luZy91bm1hc2tpbmcgZWFjaCBjYXVzZSBpbmRlcGVuZGVudGx5CisgKgorICogUmV0dXJuOgknMCcgb24gU3VjY2VzczsgRXJyb3IgY29kZSBvdGhlcndpc2UuCisgKi8KK2ludCBkcG1jcF9nZXRfaXJxX21hc2soc3RydWN0IGZzbF9tY19pbwkqbWNfaW8sCisJCSAgICAgICB1aW50MTZfdAkJdG9rZW4sCisJCSAgICAgIHVpbnQ4X3QJCWlycV9pbmRleCwKKwkJICAgICAgdWludDMyX3QJCSptYXNrKTsKKworLyoqCisgKiBkcG1jcF9nZXRfaXJxX3N0YXR1cygpIC0gR2V0IHRoZSBjdXJyZW50IHN0YXR1cyBvZiBhbnkgcGVuZGluZyBpbnRlcnJ1cHRzLgorICoKKyAqIEBtY19pbzoJUG9pbnRlciB0byBNQyBwb3J0YWwncyBJL08gb2JqZWN0CisgKiBAdG9rZW46CVRva2VuIG9mIERQTUNQIG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UFRJT04pIEhPV0VWRVIgQ0FVU0VEIEFORCBPTiBBTlkgVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTgorICogQ09OVFJBQ1QsIFNUUklDVCBMSUFCSUxJVFksIE9SIFRPUlQgKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkKKyAqIEFSSVNJTkcgSU4gQU5ZIFdBWSBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFCisgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KKyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8vKgorIGRwcmMtY21kLmgKKworIGRlZmluZXMgZHByYyBwb3J0YWwgY29tbWFuZHMKKworICovLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9GU0xfRFBSQ19DTURfSAorI2RlZmluZSBfRlNMX0RQUkNfQ01EX0gKKworLyogRFBSQyBWZXJzaW9uICovCisjZGVmaW5lIERQUkNfVkVSX01BSk9SCQkJCTMKKyNkZWZpbmUgRFBSQ19WRVJfTUlOT1IJCQkJMAorCisvKiBDb21tYW5kIElEcyAqLworI2RlZmluZSBEUFJDX0NNRElEX0NMT1NFCQkJMHg4MDAKKyNkZWZpbmUgRFBSQ19DTURJRF9PUEVOCQkJCTB4ODA1CisjZGVmaW5lIERQUkNfQ01ESURfQ1JFQVRFCQkJMHg5MDUKKworI2RlZmluZSBEUFJDX0NNRElEX0dFVF9BVFRSCQkJMHgwMDQKKyNkZWZpbmUgRFBSQ19DTURJRF9SRVNFVF9DT05UCQkJMHgwMDUKKworI2RlZmluZSBEUFJDX0NNRElEX1NFVF9JUlEJCQkweDAxMAorI2RlZmluZSBEUFJDX0NN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FLAorCQkJCQkgIE1DX0NNRF9QUklfTE9XLCB0b2tlbik7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMCwgOCwgZW4pOworCWNtZC5wYXJhbXNbMF0gfD0gbWNfZW5jKDMyLCA4LCBpcnFfaW5kZXgpOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwlyZXR1cm4gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKK30KKworaW50IGRwcmNfZ2V0X2lycV9tYXNrKHN0cnVjdCBmc2xfbWNfaW8gKm1jX2lvLAorCQkgICAgICB1aW50MTZfdCB0b2tlbiwKKwkJICAgICAgdWludDhfdCBpcnFfaW5kZXgsCisJCSAgICAgIHVpbnQzMl90ICptYXNrKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCWludCBlcnI7CisKKwkvKiBwcmVwYXJlIGNvbW1hbmQgKi8KKwljbWQuaGVhZGVyID0gbWNfZW5jb2RlX2NtZF9oZWFkZXIoRFBSQ19DTURJRF9HRVRfSVJRX01BU0ssCisJCQkJCSAgTUNfQ01EX1BSSV9MT1csIHRva2VuKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygzMiwgOCwgaXJxX2luZGV4KTsKKworCS8qIHNlbmQgY29tbWFuZCB0byBtYyovCisJZXJyID0gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKKwlpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJLyogcmV0cmlldmUgcmVzcG9uc2UgcGFyYW1ldGVycyAqLworCSptYXNrID0gbWNfZGVjKGNtZC5wYXJhbXNbMF0sIDAsIDMyKTsKKworCXJldHVybiAwOworfQorCitpbnQgZHByY19zZXRfaXJxX21hc2soc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sCisJCSAgICAgIHVpbnQxNl90IHRva2VuLAorCQkgICAgICB1aW50OF90IGlycV9pbmRleCwKKwkJICAgICAgdWludDMyX3QgbWFzaykKK3sKKw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vKioKKyAqIGRwYnBfZ2V0X2lycV9tYXNrKCkgLSBHZXQgaW50ZXJydXB0IG1hc2suCisgKiBAbWNfaW86CVBvaW50ZXIgdG8gTUMgcG9ydGFsJ3MgSS9PIG9iamVjdAorICogQHRva2VuOglUb2tlbiBvZiBEUEJQIG9iamVjdAorICogQGlycV9pbmRleDoJVGhlIGludGVycnVwdCBpbmRleCB0byBjb25maWd1cmUKKyAqIEBtYXNrOglSZXR1cm5lZCBldmVudCBtYXNrIHRvIHRyaWdnZXIgaW50ZXJydXB0CisgKgorICogRXZlcnkgaW50ZXJydXB0IGNhbiBoYXZlIHVwIHRvIDMyIGNhdXNlcyBhbmQgdGhlIGludGVycnVwdCBtb2RlbCBzdXBwb3J0cworICogbWFza2luZy91bm1hc2tpbmcgZWFjaCBjYXVzZSBpbmRlcGVuZGVudGx5CisgKgorICogUmV0dXJuOgknMCcgb24gU3VjY2VzczsgRXJyb3IgY29kZSBvdGhlcndpc2UuCisgKi8KK2ludCBkcGJwX2dldF9pcnFfbWFzayhzdHJ1Y3QgZnNsX21jX2lvCSptY19pbywKKwkJICAgICAgdWludDE2X3QJCXRva2VuLAorCQkgICAgICB1aW50OF90CQlpcnFfaW5kZXgsCisJCSAgICAgIHVpbnQzMl90CQkqbWFzayk7CisKKy8qKgorICogZHBicF9nZXRfaXJxX3N0YXR1cygpIC0gR2V0IHRoZSBjdXJyZW50IHN0YXR1cyBvZiBhbnkgcGVuZGluZyBpbnRlcnJ1cHRzLgorICoKKyAqIEBtY19pbzoJUG9pbnRlciB0byBNQyBwb3J0YWwncyBJL08gb2JqZWN0CisgKiBAdG9rZW46CVRva2VuIG9mIERQQlAgb2JqZWN0CisgKiBAaXJxX2luZGV4OglUaGUgaW50ZXJydXB0IGluZGV4IHRvIGNvbmZpZ3VyZQorICogQHN0YXR1czoJUmV0dXJuZWQgaW50ZXJydXB0cyBzdGF0dXMgLSBvbmUgYml0IHBlciBjYXVzZToKKyAqCQkJMCA9IG5vIGludGVycnVw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yArMTY1MSwxMiBAQAogCX0KIH0KIAotc3RhdGljIGludAota2libG5kX2luaXRfcG9vbHNldChraWJfcG9vbHNldF90ICpwcywgaW50IGNwdCwKLQkJICAgIGtpYl9uZXRfdCAqbmV0LCBjaGFyICpuYW1lLCBpbnQgc2l6ZSwKLQkJICAgIGtpYl9wc19wb29sX2NyZWF0ZV90IHBvX2NyZWF0ZSwKLQkJICAgIGtpYl9wc19wb29sX2Rlc3Ryb3lfdCBwb19kZXN0cm95LAotCQkgICAga2liX3BzX25vZGVfaW5pdF90IG5kX2luaXQsCi0JCSAgICBraWJfcHNfbm9kZV9maW5pX3QgbmRfZmluaSkKK3N0YXRpYyBpbnQga2libG5kX2luaXRfcG9vbHNldChraWJfcG9vbHNldF90ICpwcywgaW50IGNwdCwKKwkJCSAgICAgICBraWJfbmV0X3QgKm5ldCwgY2hhciAqbmFtZSwgaW50IHNpemUsCisJCQkgICAgICAga2liX3BzX3Bvb2xfY3JlYXRlX3QgcG9fY3JlYXRlLAorCQkJICAgICAgIGtpYl9wc19wb29sX2Rlc3Ryb3lfdCBwb19kZXN0cm95LAorCQkJICAgICAgIGtpYl9wc19ub2RlX2luaXRfdCBuZF9pbml0LAorCQkJICAgICAgIGtpYl9wc19ub2RlX2ZpbmlfdCBuZF9maW5pKQogewogCWtpYl9wb29sX3QJKnBvb2w7CiAJaW50CQlyYzsKQEAgLTE3MjcsOCArMTY4Niw3IEBACiAJcmV0dXJuIHJjOwogfQogCi1zdGF0aWMgaW50Ci1raWJsbmRfcG9vbF9pc19pZGxlKGtpYl9wb29sX3QgKnBvb2wsIHVuc2lnbmVkIGxvbmcgbm93KQorc3RhdGljIGludCBraWJsbmRfcG9vbF9pc19pZGxlKGtpYl9wb29sX3QgKnBvb2wsIHVuc2lnbmVkIGxvbmcgbm93KQogewogCWlmIChwb29sLT5wb19hbGxvY2F0ZWQgIT0gMCkgLyogc3RpbGwgaW4gdXNlICovCiAJCXJldHVybiAwOwpAQCAtMTczNywxMCArMT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A9IGNvbm4tPmtzbmNfdHhfY2FycmllcjsKQEAgLTE4NSw3ICsxODUsNyBAQAogCiAJaWYgKHR4LT50eF9tc2cua3NtX3pjX2Nvb2tpZXNbMV0gPT0gU09DS05BTF9LRUVQQUxJVkVfUElORykgewogCQkvKiByZXBsYWNlIHRoZSBrZWVwYWxpdmUgUElORyB3aXRoIGEgcmVhbCBBQ0sgKi8KLQkJTEFTU0VSVCAodHgtPnR4X21zZy5rc21femNfY29va2llc1swXSA9PSAwKTsKKwkJTEFTU0VSVCh0eC0+dHhfbXNnLmtzbV96Y19jb29raWVzWzBdID09IDApOwogCQl0eC0+dHhfbXNnLmtzbV96Y19jb29raWVzWzFdID0gY29va2llOwogCQlyZXR1cm4gMTsKIAl9CkBAIC0yMjAsNyArMjIwLDcgQEAKIAkJX191NjQgICB0bXAgPSAwOwogCiAJCS8qIHR3byBzZXBhcmF0ZWQgY29va2llczogKGErMiwgYSkgb3IgKGErMSwgYSkgKi8KLQkJTEFTU0VSVCAodHgtPnR4X21zZy5rc21femNfY29va2llc1swXSAtCisJCUxBU1NFUlQodHgtPnR4X21zZy5rc21femNfY29va2llc1swXSAtCiAJCQkgdHgtPnR4X21zZy5rc21femNfY29va2llc1sxXSA8PSAyKTsKIAogCQlpZiAodHgtPnR4X21zZy5rc21femNfY29va2llc1swXSAtCkBAIC00MDgsNyArNDA4LDcgQEAKIAlrc29ja19wZWVyX3QgICAgICAqcGVlciA9IGNvbm4tPmtzbmNfcGVlcjsKIAlrc29ja190eF90CSp0eDsKIAlrc29ja190eF90CSp0bXA7Ci0JTElTVF9IRUFEICAgICAoemxpc3QpOworCUxJU1RfSEVBRCh6bGlzdCk7CiAJaW50CQljb3VudDsKIAogCWlmIChjb29raWUxID09IDApCkBAIC00NTAsNyArNDUwLDcgQEAKIH0KIAogc3RhdGljIGludAota3NvY2tuYWxfc2VuZF9oZWxsb192MSAoa3NvY2tfY29ubl90ICpjb25uLCBrc29ja19oZWxsb19tc2dfdCAqaGVsbG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ByYzsKKworCWlmICh3cml0ZSkgeworCQkqcHBvcyArPSAqbGVucDsKKwl9IGVsc2UgeworCQkqbGVucCA9IHJjOworCQkqcHBvcyArPSByYzsKKwl9CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgX19wcm9jX2RvYml0bWFza3Modm9pZCAqZGF0YSwgaW50IHdyaXRlLAorCQkJICAgICBsb2ZmX3QgcG9zLCB2b2lkIF9fdXNlciAqYnVmZmVyLCBpbnQgbm9iKQoreworCWNvbnN0IGludCAgICAgdG1wc3RybGVuID0gNTEyOworCWNoYXIJICp0bXBzdHI7CisJaW50CSAgIHJjOworCXVuc2lnbmVkIGludCAqbWFzayA9IGRhdGE7CisJaW50CSAgIGlzX3N1YnN5cyA9IChtYXNrID09ICZsaWJjZnNfc3Vic3lzdGVtX2RlYnVnKSA/IDEgOiAwOworCWludAkgICBpc19wcmludGsgPSAobWFzayA9PSAmbGliY2ZzX3ByaW50aykgPyAxIDogMDsKKworCXJjID0gY2ZzX3RyYWNlX2FsbG9jYXRlX3N0cmluZ19idWZmZXIoJnRtcHN0ciwgdG1wc3RybGVuKTsKKwlpZiAocmMgPCAwKQorCQlyZXR1cm4gcmM7CisKKwlpZiAoIXdyaXRlKSB7CisJCWxpYmNmc19kZWJ1Z19tYXNrMnN0cih0bXBzdHIsIHRtcHN0cmxlbiwgKm1hc2ssIGlzX3N1YnN5cyk7CisJCXJjID0gc3RybGVuKHRtcHN0cik7CisKKwkJaWYgKHBvcyA+PSByYykgeworCQkJcmMgPSAwOworCQl9IGVsc2UgeworCQkJcmMgPSBjZnNfdHJhY2VfY29weW91dF9zdHJpbmcoYnVmZmVyLCBub2IsCisJCQkJCQkgICAgICB0bXBzdHIgKyBwb3MsICJcbiIpOworCQl9CisJfSBlbHNlIHsKKwkJcmMgPSBjZnNfdHJhY2VfY29weWluX3N0cmluZyh0bXBzdHIsIHRtcHN0cmxlbiwgYnVmZmVyLCBub2IpOworCQlpZiAocmMgPCAwKSB7CisJCQ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lkdW1teS5kYXRhID0gJm1pbl9kZWxheV9jczsKKwlkdW1teS5wcm9jX2hhbmRsZXIgPSAmcHJvY19kb2ludHZlYzsKKworCWlmICghd3JpdGUpIHsgLyogcmVhZCAqLworCQltaW5fZGVsYXlfY3MgPSBjZnNfZHVyYXRpb25fc2VjKGxpYmNmc19jb25zb2xlX21pbl9kZWxheSAqIDEwMCk7CisJCXJjID0gcHJvY19kb2ludHZlYygmZHVtbXksIHdyaXRlLCBidWZmZXIsIGxlbnAsIHBwb3MpOworCQlyZXR1cm4gcmM7CisJfQorCisJLyogd3JpdGUgKi8KKwltaW5fZGVsYXlfY3MgPSAwOworCXJjID0gcHJvY19kb2ludHZlYygmZHVtbXksIHdyaXRlLCBidWZmZXIsIGxlbnAsIHBwb3MpOworCWlmIChyYyA8IDApCisJCXJldHVybiByYzsKKwlpZiAobWluX2RlbGF5X2NzIDw9IDApCisJCXJldHVybiAtRUlOVkFMOworCisJZCA9IGNmc190aW1lX3NlY29uZHMobWluX2RlbGF5X2NzKSAvIDEwMDsKKwlpZiAoZCA9PSAwIHx8IGQgPiBsaWJjZnNfY29uc29sZV9tYXhfZGVsYXkpCisJCXJldHVybiAtRUlOVkFMOworCWxpYmNmc19jb25zb2xlX21pbl9kZWxheSA9IGQ7CisKKwlyZXR1cm4gcmM7Cit9CisKK3N0YXRpYyBpbnQgcHJvY19jb25zb2xlX2JhY2tvZmYoc3RydWN0IGN0bF90YWJsZSAqdGFibGUsIGludCB3cml0ZSwKKwkJCQl2b2lkIF9fdXNlciAqYnVmZmVyLCBzaXplX3QgKmxlbnAsIGxvZmZfdCAqcHBvcykKK3sKKwlpbnQgcmMsIGJhY2tvZmY7CisJc3RydWN0IGN0bF90YWJsZSBkdW1teSA9ICp0YWJsZTsKKworCWR1bW15LmRhdGEgPSAmYmFja29mZjsKKwlkdW1teS5wcm9jX2hhbmRsZXIgPSAmcHJvY19kb2ludHZlYzsKKworCWlmICghd3JpdGUpIHsgLyogcmVhZCAqLworCQli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ZlYworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9tYXhfZGVsYXlfY2VudGlzZWNzIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX21heF9kZWxheV9jcworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9taW5fZGVsYXlfY2VudGlzZWNzIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX21pbl9kZWxheV9jcworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9iYWNrb2ZmIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX2JhY2tvZmYKKwl9LAorCisJeworCQkucHJvY25hbWUgPSAiZGVidWdfcGF0aCIsCisJCS5kYXRhICAgICA9IGxpYmNmc19kZWJ1Z19maWxlX3BhdGhfYXJyLAorCQkubWF4bGVuICAgPSBzaXplb2YobGliY2ZzX2RlYnVnX2ZpbGVfcGF0aF9hcnIpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfZG9zdHJpbmcsCisJfSwKKworCXsKKwkJLnByb2NuYW1lID0gImNwdV9wYXJ0aXRpb25fdGFibGUiLAorCQkubWF4bGVuICAgPSAxMjgsCisJCS5tb2RlICAgICA9IDA0NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jcHRfdGFibGUsCisJfSwKKworCXsKKwkJLnByb2NuYW1lID0gInVwY2FsbCIsCisJCS5kYXRhICAgICA9IGxuZXRfdXBjYWxsLAorCQkubWF4bGVuICAgPSBzaXplb2YobG5ldF91cGNhbGwpLAorCQkub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eCAgIHwKKyAqICAgICAgfC0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS18LS0tLS0tfAorICogZGVzYyB8IF4tdmVyLV4gIHwgIF50eXBlLV4gIHwgIF4tLS0tLXN1YnR5cGUtLS0tLV4gIHwgdG8gIHxmcm9tIHxtb3JlIHxyZXRyeXwgcHdyIHxtb3JlIHx3ZXAgICB8CisgKiAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCB4PTAgZGF0YSx4PTEgZGF0YSthY2sgfCBEUyAgfCBEUyAgfGZyYWcgfCAgICAgfCBtZ20gfGRhdGEgfCAgICAgIHwKKyAqICAgICAgJy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tJworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvXAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiA4MDIuMTEgRGF0YSBGcmFtZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICAgICwtLS0tLS0tLS0gJ2N0cmwnIGV4cGFuZHMgdG8gPi0tLS0tLS0tLS0tJworICogICAgICAgICAgfAorICogICAgICAgLC0tJy0tLSwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLgorICogQnl0ZXMgfCAgMiAgIHwgIDIgICB8ICAgIDYgICAgfCAgICA2ICAgIHwgICAgNiAgICB8ICAyICAgfCAwLi4yMzEyIHwgICA0ICB8CisgKiAgICAgICB8LS0tLS0tfC0tLS0tLXwtLS0tLS0tLS18LS0tLS0tLS0tfC0tLS0tLS0tLXwtLS0tLS18LS0tLS0tLS0tfC0tLS0tLXwKKyAqIERlc2MuIHwgY3RybCB8IGR1cmEgfCAgREEvUkEgIHwgICBUQSAgICB8ICAgIFNBICAgfCBTZXF1IHwgIEZyYW1lICB8ICBmY3MgfAorICogICAgICAgfCAgICAgIHwgdGlvbiB8IChCU1NJRCkgfCAgICAgICAgIHwgICAgICAgICB8IGVuY2UgfCAgZGF0YSAgIHwgICAgICB8CisgKiAgICAgICBgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18ICAgICAgICAgfC0tLS0tLScKKyAqIFRvdGFsOiAyOCBub24tZGF0YSBieXRlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAtLS0tLi0tLS0nCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICAuLSAnRnJhbWUgZGF0YScgZXhwYW5kcyB0byA8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tJworICogICAgICAgIHwKKyAqICAgICAgICBWCisgKiAgICAgICAsLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLgorICogQnl0ZXMgfCAgMSAgIHwgIDEgICB8ICAgIDEgICAgfCAgICAzICAgICB8ICAyICAgfCAgMC0yMzA0IHwKKyAqICAgICAgIHwtLS0tLS18LS0tLS0tfC0tLS0tLS0tLXwtLS0tLS0tLS0tfC0tLS0tLXwtLS0tLS0tLS18CisgKiBEZXNjLiB8IFNOQVAgfCBTTkFQIHwgQ29udHJvbCB8RXRoIFR1bm5lbHwgVHlwZSB8IElQICAgICAgfAorICogICAgICAgfCBEU0FQIHwgU1NBUCB8ICAgICAgICAgfCAgICAgICAgICB8ICAgICAgfCBQYWNrZXQgIHwKKyAqICAgICAgIHwgMHhBQSB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W5nLCBfUHRyLCBfTGVuKQkJCQkJXAotCQkJaWYoKF9Db21wKSAmIGxldmVsKQkJCQkJCQlcCi0JCQl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJaW50ICAgICAgICAgICAgIF9faTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQl1OCAgYnVmZmVyW01BWF9TVFJfTEVOXTsJCQkJCVwKLQkJCQlpbnQgbGVuZ3RoID0gKF9MZW48TUFYX1NUUl9MRU4pPyBfTGVuIDogKE1BWF9TVFJfTEVOLTEpIDsJXAotCQkJCW1lbXNldChidWZmZXIsIDAsIE1BWF9TVFJfTEVOKTsJCQkJCVwKLQkJCQltZW1jcHkoYnVmZmVyLCAodTggKilfUHRyLCBsZW5ndGggKTsJCQkJXAotCQkJCWZvciggX19pPTA7IF9faTxNQVhfU1RSX0xFTjsgX19pKysgKSAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQkgICAgIGlmKCAhUFJJTlRBQkxFKGJ1ZmZlcltfX2ldKSApICAgYnVmZmVyW19faV0gPSAnPyc7CQlcCi0JCQkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQlidWZmZXJbbGVuZ3RoXSA9ICdcMCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCXByaW50aygiUnRsODE5eDogIik7CQkJCQkJXAotCQkJCXByaW50ayhfVGl0bGVTdHJpbmcpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCXByaW50aygiOiAlZCwgPCVzPlxuIiwgX0xlbiwgYnVmZmVyKT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WVlZTgwMjExL3J0bDgxOXhfSFRQcm9jLmMKaW5kZXggZTYwZDkyNi4uYzI1ODhmOCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJ1L2llZWU4MDIxMS9ydGw4MTl4X0hUUHJvYy5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkydS9pZWVlODAyMTEvcnRsODE5eF9IVFByb2MuYwpAQCAtNDcxLDEyICs0NzEsMTAgQEAKIHN0YXRpYyBib29sIEhUSU9UQWN0SXNEaXNhYmxlTUNTVHdvU3BhdGlhbFN0cmVhbShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKIAkJCQkJCSB1OCAqUGVlck1hY0FkZHIpCiB7Ci0JYm9vbCByZXRWYWx1ZSA9IGZhbHNlOwotCiAjaWZkZWYgVE9ETwogCS8vIEFwcGx5IGZvciA4MTl1IG9ubHkKICNlbmRpZgotCXJldHVybiByZXRWYWx1ZTsKKwlyZXR1cm4gZmFsc2U7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNDg4LDExICs0ODYsOCBAQAogICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHU4IEhUSU9UQWN0SXNEaXNhYmxlRURDQVR1cmJvKHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLAogCQkJCSAgICAgdTggKlBlZXJNYWNBZGRyKQotewotCXU4CXJldFZhbHVlID0gZmFsc2U7CS8vIGRlZmF1bHQgZW5hYmxlIEVEQ0EgVHVyYm8gbW9kZS4KLQkvLyBTZXQgc3BlY2lmaWMgRUR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fQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC00NzgsNyArNDc2LDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIGZ1bmN0aW9uOiAgVGhpcyBmdW5jdGlvbiByZWFkcyBCQiBwYXJhbWV0ZXJzIGZyb20gaGVhZGVyIGZpbGUgd2UgZ2VuZXJhdGUsCiAgKiAgICAgICAgICAgIGFuZCBkbyByZWdpc3RlciByZWFkL3dyaXRlCi0gKiBpbnB1dDogICAgIG5ldF9kZXZpY2UgCSpkZXYKKyAqIGlucHV0OiAgICAgbmV0X2RldmljZQkqZGV2CiAgKiBvdXRwdXQ6ICAgIG5vbmUKICAqIHJldHVybjogICAgbm9uZQogICogbm90aWNlOiAgICBCQiBwYXJhbWV0ZXJzIG1heSBjaGFuZ2UgYWxsIHRoZSB0aW1lLCBzbyBwbGVhc2UgbWFrZQpAQCAtODI1LDggKzgyMyw4IEBACiAJd3JpdGVfbmljX2J5dGVfRShkZXYsIDB4NWUsIDB4MDApOwogCWlmIChwcml2LT5jYXJkXzgxOTJfdmVyc2lvbiA9PSAodTgpVkVSU0lPTl84MTl4VV9BKSB7CiAJCS8qIEFudGVubmEgZ2FpbiBvZmZzZXQgZnJvbSBCL0MvRCB0byBBICovCi0JCXJlZ191MzIgPSAocHJpdi0+QW50ZW5uYVR4UHdEaWZmWzFdPDw0IHwKLQkJCSAgIHByaXYtPkFudGVubmFUeFB3RGlmZlswXSk7CisJCXJlZ191MzIgPSBwcml2LT5BbnRlbm5hVHhQd0RpZmZbMV08PDQgfAorCQkJICAgcHJpdi0+QW50ZW5uYVR4UHdEaWZmWzBdOwogCQlydGw4MTkyX3NldEJCcmVnKGRldiwgckZQR0EwX1R4R2FpblN0YWdlLCAoYlhCVHhBR0N8YlhD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ljX2hlYWRlcjFbMTJdID0gbXBkdVsxMl07CiAJbWljX2hlYWRlcjFbMTNdID0gbXBkdVsxM107CkBAIC0xMDQ2LDcgKzEwNTEsNyBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCS8qIGNvbnN0cnVjdF9taWNfaGVhZGVyMigpICAgICAgICAgICAgICAgICAgICAgICovCisvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKSAgICAgICAgICAgICAgICAgICAgICAqLwogLyogQnVpbGRzIHRoZSBsYXN0IE1JQyBoZWFkZXIgYmxvY2sgZnJvbSAgICAgICAgKi8KIC8qIGhlYWRlciBmaWVsZHMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTA1NSw5ICsxMDYwLDEwIEBACiB7CiAJaW50IGk7CiAKLQlmb3IgKGkgPSAwOyBpPDE2OyBpKyspIG1pY19oZWFkZXIyW2ldPSAweDAwOworCWZvciAoaSA9IDA7IGkgPCAxNjsgaSsrKQorCQltaWNfaGVhZGVyMltpXSA9IDB4MDA7CiAKLQltaWNfaGVhZGVyMlswXSA9IG1wZHVbMTZdOyAgICAvKiBBMyAqLworCW1pY19oZWFkZXIyWzBdID0gbXBkdVsxNl07IC8qIEEzICovCiAJbWljX2hlYWRlcjJbMV0gPSBtcGR1WzE3XTsKIAltaWNfaGVhZGVyMlsyXSA9IG1wZHVbMThdOwogCW1pY19oZWFkZXIyWzNdID0gbXBkdVsxOV07CkBAIC0xMDY4LDggKzEwNzQsOCBAQAogCW1pY19oZWFkZXIyWzddID0gMHgwMDsgLyogbXBkdVsyM107ICovCiAKIAlpZiAoIXFjX2V4aXN0cyAmJiBhNF9leGlzdHMpIHsKLQkJZm9yIChpID0gMDtpPDY7aSsrKSBtaWNfaGVhZGVyMls4K2ldID0gbXBkdVsyNCtpXTsgICAvKi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NjljZS4uYjBjZDkzNSAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3NrZWluL3NrZWluX2Jsb2NrLmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3NrZWluL3NrZWluX2Jsb2NrLmMKQEAgLTY4LDkgKzY4LDcgQEAKIAogI2lmIFNLRUlOX1VOUk9MTF8yNTYgPT0gMAogI2RlZmluZSBSMjU2KHAwLCBwMSwgcDIsIHAzLCBST1QsIHJfbnVtKSAvKiBmdWxseSB1bnJvbGxlZCAqLyBcCi1kbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlST1VORDI1NihwMCwgcDEsIHAyLCBwMywgUk9ULCByX251bSk7ICAgICAgICAgICAgICAgICBcCi19IHdoaWxlICgwKQorCVJPVU5EMjU2KHAwLCBwMSwgcDIsIHAzLCBST1QsIHJfbnVtKQogCiAjZGVmaW5lIEkyNTYoUikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMTUyLDkgKzE1MCw3IEBACiAKICNpZiBTS0VJTl9VTlJPTExfNTEyID09IDAKICNkZWZpbmUgUjUxMihwMCwgcDEsIHAyLCBwMywgcDQsIHA1LCBwNiwgcDcsIFJPVCwgcl9udW0pIC8qIHVucm9sbGVkICovIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlST1VORDUxMihwMCwgcDEsIHAyLCBwMywgcDQsIHA1LCBwNiwgcDcsIFJPVCwgcl9udW0pOyAgICAgICAgICAgXAotfSB3aGlsZSAoMCkKKwlST1VORDUxMihwMCwgcDEsIHAyLCBwMywgcDQsIHA1LCBwNiwgcDcsI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nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdGhlcnMgPSB0aGUgbmV3IG1haW4gY2hpcCBjbG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgdW5zaWduZWQgc2hvcnQgbWVtQ2xvY2s7ICAgICAvKiBTcGVlZCBvZiBtZW1vcnkgY2xvY2sgaW4gTUh6IHVuaXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBrZWVwIHRoZSBjdXJyZW50IGNsb2NrIHNldHRpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE90aGVycyA9IHRoZSBuZXcgbWVtb3J5IGNsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICB1bnNpZ25lZCBzaG9ydCBtYXN0ZXJDbG9jazsgIC8qIFNwZWVkIG9mIG1hc3RlciBjbG9jayBpbiBNSHogdW5pdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IGtlZXAgdGhlIGN1cnJlbnQgY2xvY2sgc2V0dGluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3RoZXJzID0gdGhlIG5ldyBtYXN0ZXIgY2xvY2sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgIHVuc2lnbmVkIHNob3J0IHNldEFsbEVuZ09mZjsgLyogMCA9IGxlYXZlIGFsbCBlbmdpbmUgc3RhdGUgdW50b3VjaGVkLgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IG1ha2Ugc3VyZSB0aGV5IGFyZSBvZmY6IDJELCBPdmVybGF5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8gYWxwaGEsIGFscGhhLCBoYXJkd2FyZSBjdXJzb3JzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgIHVuc2lnbmVkIGNoYXIgcm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GludCBjdHJsLGludCBkZWxheSkKK3sKKwl1bnNpZ25lZCBpbnQgc3RhdHVzOworCWlmKCFjdHJsKXsKKwkJLyogcHJpbWFyeSBjb250cm9sbGVyICovCisKKyAgICAgICAgLyogRG8gbm90IHdhaXQgd2hlbiB0aGUgUHJpbWFyeSBQTEwgaXMgb2ZmIG9yIGRpc3BsYXkgY29udHJvbCBpcyBhbHJlYWR5IG9mZi4KKwkgICAgICAgICAgIFRoaXMgd2lsbCBwcmV2ZW50IHRoZSBzb2Z0d2FyZSB0byB3YWl0IGZvcmV2ZXIuICovCisJCWlmICgoRklFTERfR0VUKFBFRUszMihQQU5FTF9QTExfQ1RSTCksIFBBTkVMX1BMTF9DVFJMLCBQT1dFUikgPT0KKwkJCSBQQU5FTF9QTExfQ1RSTF9QT1dFUl9PRkYpIHx8CisJCQkoRklFTERfR0VUKFBFRUszMihQQU5FTF9ESVNQTEFZX0NUUkwpLCBQQU5FTF9ESVNQTEFZX0NUUkwsIFRJTUlORykgPT0KKwkJCSBQQU5FTF9ESVNQTEFZX0NUUkxfVElNSU5HX0RJU0FCTEUpKQorCQl7CisJCQlyZXR1cm47CisJCX0KKworICAgICAgICB3aGlsZSAoZGVsYXktLSA+IDApCisgICAgICAgIHsKKyAgICAgICAgICAgIC8qIFdhaXQgZm9yIGVuZCBvZiB2c3luYy4gKi8KKyAgICAgICAgICAgIGRvCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RhdHVzID0gRklFTERfR0VUKFBFRUszMihTWVNURU1fQ1RSTCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNZU1RFTV9DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQU5FTF9WU1lOQyk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICB3aGlsZSAoc3RhdHVzID09IFNZU1RFTV9DVFJMX1BBTkVMX1ZTWU5DX0FDVElWRSk7CisKKyAgICAgICAgICAgIC8qIFdhaXQgZm9yIH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GF0IHRoZSBzeXN0ZW0gaXMgaW4gRHVhbCBDUlQgTW9uaXRvciBjb25maWd1cmF0aW9uLiAqLworCisgICAgLyogRGUtc2tldyBlbmFibGVkIHdpdGggZGVmYXVsdCAxMTFiIHZhbHVlLgorICAgICAgIFRoaXMgd2lsbCBmaXggc29tZSBhcnRpZmFjdHMgcHJvYmxlbSBpbiBzb21lIG1vZGUgb24gYm9hcmQgMi4yLgorICAgICAgIFNvbWVob3cgdGhpcyBmaXggZG9lcyBub3QgYWZmZWN0IGJvYXJkIDIuMS4KKyAgICAgKi8KKyAgICBpZiAoKGR2aUluaXQoMSwgIC8qIFNlbGVjdCBSaXNpbmcgRWRnZSAqLworICAgICAgICAgICAgICAgIDEsICAvKiBTZWxlY3QgMjQtYml0IGJ1cyAqLworICAgICAgICAgICAgICAgIDAsICAvKiBTZWxlY3QgU2luZ2xlIEVkZ2UgY2xvY2sgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIEhTeW5jIGFzIGlzICovCisgICAgICAgICAgICAgICAgMSwgIC8qIEVuYWJsZSBWU3luYyBhcyBpcyAqLworICAgICAgICAgICAgICAgIDEsICAvKiBFbmFibGUgRGUtc2tldyAqLworICAgICAgICAgICAgICAgIDcsICAvKiBTZXQgdGhlIGRlLXNrZXcgc2V0dGluZyB0byBtYXhpbXVtIHNldHVwICovCisgICAgICAgICAgICAgICAgMSwgIC8qIEVuYWJsZSBjb250aW51b3VzIFN5bmMgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIFBMTCBGaWx0ZXIgKi8KKyAgICAgICAgICAgICAgICA0ICAgLyogVXNlIHRoZSByZWNvbW1lbmRlZCB2YWx1ZSBmb3IgUExMIEZpbHRlciB2YWx1ZSAqLworICAgICAgICApICE9IDApICYmIChkdmlHZXRWZW5kb3JJRCgpICE9IDB4MDAwMCkgJiYgKGR2aUdldERldmljZUlEKCkgIT0gMHgwMDAwKSkKKyAgICB7CisgICAgICAgIHJldHVybi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AgICAgICAgICAgICAgIHZzeW5jRW5hYmxlLCBkZXNrZXdFbmFibGUsIGRlc2tld1NldHRpbmcsIGNvbnRpbnVvdXNTeW5jRW5hYmxlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxsRmlsdGVyRW5hYmxlLCBwbGxGaWx0ZXJWYWx1ZSk7CisJfQorCXJldHVybiAtMTsvL2Vycm9yCit9CisKKworLyoKKyAqICBkdmlHZXRWZW5kb3JJRAorICogICAgICBUaGlzIGZ1bmN0aW9uIGdldHMgdGhlIHZlbmRvciBJRCBvZiB0aGUgRFZJIGNvbnRyb2xsZXIgY2hpcC4KKyAqCisgKiAgT3V0cHV0OgorICogICAgICBWZW5kb3IgSUQKKyAqLwordW5zaWduZWQgc2hvcnQgZHZpR2V0VmVuZG9ySUQodm9pZCkKK3sKKyAgICBkdmlfY3RybF9kZXZpY2VfdCAqcEN1cnJlbnREdmlDdHJsOworCisgICAgLy9wQ3VycmVudER2aUN0cmwgPSBnZXREdmlDdHJsKCk7CisgICAgcEN1cnJlbnREdmlDdHJsID0gZ19kY2Z0U3VwcG9ydGVkRHZpQ29udHJvbGxlcjsKKyAgICBpZiAocEN1cnJlbnREdmlDdHJsICE9IChkdmlfY3RybF9kZXZpY2VfdCAqKTApCisgICAgICAgIHJldHVybiBwQ3VycmVudER2aUN0cmwtPnBmbkdldFZlbmRvcklkKCk7CisKKyAgICByZXR1cm4gMHgwMDAwOworfQorCisKKy8qCisgKiAgZHZpR2V0RGV2aWNlSUQKKyAqICAgICAgVGhpcyBmdW5jdGlvbiBnZXRzIHRoZSBkZXZpY2UgSUQgb2YgdGhlIERWSSBjb250cm9sbGVyIGNoaXAuCisgKgorICogIE91dHB1dDoKKyAqICAgICAgRGV2aWNlIElECisgKi8KK3Vuc2lnbmVkIHNob3J0IGR2aUdldERldmljZUlEKHZvaWQpCit7CisgICAgZHZpX2N0cmxfZGV2aWNlX3QgKnBDdXJyZW50RHZpQ3RybDsKKworLy8gICAgcEN1cnJ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gZG8KKyAgICB7CisgICAgICAgIC8qIFJlc2V0IEkyQyBieSB3cml0aW5nIDAgdG8gSTJDX1JFU0VUIHJlZ2lzdGVyIHRvIGNsZWFyIGFsbCB0aGUgc3RhdHVzLiAqLworICAgICAgICBQT0tFMzIoSTJDX1JFU0VULCAwKTsKKworICAgICAgICAvKiBTZXQgdGhlIG51bWJlciBvZiBieXRlcyB0byBiZSByZWFkICovCisgICAgICAgIGlmIChsZW5ndGggPD0gTUFYX0hXSTJDX0ZJRk8pCisgICAgICAgICAgICBjb3VudCA9IGxlbmd0aCAtIDE7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvdW50ID0gTUFYX0hXSTJDX0ZJRk8gLSAxOworICAgICAgICBQT0tFMzIoSTJDX0JZVEVfQ09VTlQsIGNvdW50KTsKKworICAgICAgICAvKiBTdGFydCB0aGUgSTJDICovCisgICAgICAgIFBPS0UzMihJMkNfQ1RSTCwgRklFTERfU0VUKFBFRUszMihJMkNfQ1RSTCksIEkyQ19DVFJMLCBDVFJMLCBTVEFSVCkpOworCisgICAgICAgIC8qIFdhaXQgdW50aWwgdHJhbnNhY3Rpb24gZG9uZS4gKi8KKyAgICAgICAgaWYgKGh3STJDV2FpdFRYRG9uZSgpICE9IDApCisgICAgICAgICAgICBicmVhazsKKworICAgICAgICAvKiBTYXZlIHRoZSBkYXRhIHRvIHRoZSBnaXZlbiBidWZmZXIgKi8KKyAgICAgICAgZm9yIChpID0gMDsgaSA8PSBjb3VudDsgaSsrKQorCQkgICAgKnBCdWZmZXIrKyA9IFBFRUszMihJMkNfREFUQTAgKyBpKTsKKworICAgICAgICAvKiBTdWJzdHJhY3QgbGVuZ3RoIGJ5IDE2ICovCisgICAgICAgIGxlbmd0aCAtPSAoY291bnQgKyAxKTsKKworICAgICAgICAvKiBOdW1iZXIgb2YgYnl0ZXMgcmVhZC4gKi8KKyAgICAgICAgdG90YWxCeXRlcyArPSAoY291bnQgKyAxKTsKKworICAgIH0gd2hpbGUgKGxlbmd0aCA+IDApOworCisgICAgcmV0dXJuIHRvdGFsQnl0ZXM7Cit9CisKKworCisKKy8qCisgKiAgVGhpcyBmdW5jdGlvbiByZWFkcyB0aGUgc2xhdmUgZGV2aWNlJ3MgcmVnaXN0ZXIKKyAqCisgKiAgUGFyYW1ldGVyczoKKyAqICAgICAgZGV2aWNlQWRkcmVzcyAgIC0gaTJjIFNsYXZlIGRldmljZSBhZGRyZXNzIHdoaWNoIHJlZ2lzdGVyCisgKiAgICAgICAgICAgICAgICAgICAgICAgIHRvIGJlIHJlYWQgZnJvbQorICogICAgICByZWdpc3RlckluZGV4ICAgLSBTbGF2ZSBkZXZpY2UncyByZWdpc3RlciB0byBiZSByZWFkCisgKgorICogIFJldHVybiBWYWx1ZToKKyAqICAgICAgUmVnaXN0ZXIgdmFsdWUKKyAqLwordW5zaWduZWQgY2hhciBod0kyQ1JlYWRSZWcoCisgICAgdW5zaWduZWQgY2hhciBkZXZpY2VBZGRyZXNzLAorICAgIHVuc2lnbmVkIGNoYXIgcmVnaXN0ZXJJbmRleAorKQoreworICAgIHVuc2lnbmVkIGNoYXIgdmFsdWUgPSAoMHhGRik7CisKKyAgICBpZiAoaHdJMkNXcml0ZURhdGEoZGV2aWNlQWRkcmVzcywgMSwgJnJlZ2lzdGVySW5kZXgpID09IDEpCisgICAgICAgIGh3STJDUmVhZERhdGEoZGV2aWNlQWRkcmVzcywgMSwgJnZhbHVlKTsKKworICAgIHJldHVybiB2YWx1ZTsKK30KKworCisKKworCisvKgorICogIFRoaXMgZnVuY3Rpb24gd3JpdGVzIGEgdmFsdWUgdG8gdGhlIHNsYXZlIGRldmljZSdzIHJlZ2lzdGVyCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGRldmljZUFkZHJlc3MgICAtIGkyYyBTbGF2ZSBkZXZpY2UgYWRkcmVzcyB3aGljaCByZWdpc3RlcgorICogICAgICAgICAgICAgICAgICAgICAgICB0byBiZSB3cml0dGVuCisgKiAgICAgIHJlZ2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ZSkKK3sKKyAgICB1bnNpZ25lZCBpbnQgY29udHJvbF92YWx1ZSA9IDA7CisKKyAgICBjb250cm9sX3ZhbHVlID0gUEVFSzMyKFBPV0VSX01PREVfQ1RSTCk7CisKKwlpZihnZXRDaGlwVHlwZSgpID09IFNNNzUwTEUpCisJCXJldHVybjsKKworICAgIHN3aXRjaCAocG93ZXJNb2RlKQorICAgIHsKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMDoKKyAgICAgICAgICAgIGNvbnRyb2xfdmFsdWUgPSBGSUVMRF9TRVQoY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCBNT0RFLCBNT0RFMCk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIFBPV0VSX01PREVfQ1RSTF9NT0RFX01PREUxOgorICAgICAgICAgICAgY29udHJvbF92YWx1ZSA9IEZJRUxEX1NFVChjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE1PREUsIE1PREUxKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgUE9XRVJfTU9ERV9DVFJMX01PREVfU0xFRVA6CisgICAgICAgICAgICBjb250cm9sX3ZhbHVlID0gRklFTERfU0VUKGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgTU9ERSwgU0xFRVApOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgIGJyZWFrOworICAgIH0KKworICAgIC8qIFNldCB1cCBvdGhlciBmaWVsZHMgaW4gUG93ZXIgQ29udHJvbCBSZWdpc3RlciAqLworICAgIGlmIChwb3dlck1vZGUgPT0gUE9XRVJfTU9ERV9DVFJMX01PREVfU0xFRVApCisgICAgeworICAgICAgICBjb250cm9sX3ZhbHVlID0KKyNpZmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAgICAgICAgIEZJRUxEX1NFVCggIGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgMzM2Q0xLLCBPRkYpIHwKKyNlbmRpZgorICAgICAgICAgICAgRklFTERfU0VUKCAgY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCBPU0NfSU5QVVQsICBPRkYpOworICAgIH0KKyAgICBlbHNlCisgICAgeworICAgICAgICBjb250cm9sX3ZhbHVlID0KKyNpZmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAgICAgICAgIEZJRUxEX1NFVCggIGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgMzM2Q0xLLCBPTikgfAorI2VuZGlmCisgICAgICAgICAgICBGSUVMRF9TRVQoICBjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE9TQ19JTlBVVCwgIE9OKTsKKyAgICB9CisKKyAgICAvKiBQcm9ncmFtIG5ldyBwb3dlciBtb2RlLiAqLworICAgIFBPS0UzMihQT1dFUl9NT0RFX0NUUkwsIGNvbnRyb2xfdmFsdWUpOworfQorCit2b2lkIHNldEN1cnJlbnRHYXRlKHVuc2lnbmVkIGludCBnYXRlKQoreworICAgIHVuc2lnbmVkIGludCBnYXRlX3JlZzsKKyAgICB1bnNpZ25lZCBpbnQgbW9kZTsKKworICAgIC8qIEdldCBjdXJyZW50IHBvd2VyIG1vZGUuICovCisgICAgbW9kZSA9IGdldFBvd2VyTW9kZSgpOworCisgICAgc3dpdGNoIChtb2RlKQorICAgIHsKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMDoKKyAgICAgICAgICAgIGdhdGVfcmVnID0gTU9ERTBfR0FURTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgUE9XRVJfTU9ERV9DVFJMX01PREVfTU9ERTE6CisgICAgICAgICAgICBnYXRlX3JlZyA9IE1PREUxX0dBVEU7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICA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ICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVEUxX0RFX0FCT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBERV9TVEFURTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNTgKKyNkZWZpbmUgREVfU1RBVEUyX0RFX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBERV9TVEFURTJfREVfRklGT19OT1RFTVBUWSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFURTJfREVfRklGT19FTVBUWSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVEFURTJfREVfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIERFX1NUQVRFMl9ERV9TVEFUVVNfSURMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRFMl9ERV9TVEFUVVNfQlVTWSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRFMl9ERV9NRU1fRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgREVfU1RBVEUyX0RFX01FTV9GSUZPX05PVEVNUFRZICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVEUyX0RFX01FTV9GSUZPX0VNUFRZICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RBVEUyX0RFX1JFU0VSVkVEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorCisKKworI2RlZmluZSBTWVNURU1fQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RQTVNfVlBIUCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RQTVNfVlBITiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RQTVNfVk5IUCAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RQTVNfVk5ITiAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVCAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfQlVSU1RfT0ZGICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfQlVSU1RfT04gICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfTUFTVEVSICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX01BU1RFUl9PRkYgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX01BU1RFUl9PTiAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfTEFURU5DWV9USU1FUiAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIFNZU1RFTV9DVFJMX0xBVEVOQ1lfVElNRVJfT04gICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0xBVEVOQ1lfVElNRVJfT0ZGICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9GSUZPX05PVEVNUFRZICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9GSUZPX0VNUFRZICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfU1RBVFVTX0lETEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfU1RBVFVTX0JVU1kgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfTUVNX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX01FTV9GSUZPX05PVEVNUFRZICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX01FTV9GSUZPX0VNUFRZICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NTQ19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBTWVNURU1fQ1RSTF9DU0NfU1RBVFVTX0lETEUgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9DU0NfU1RBVFVTX0JVU1kgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9DUlRfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgU1lTVEVNX0NUUkxfQ1JUX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfQ1JUX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUEFORUxfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIFNZU1RFTV9DVFJMX1BBTkVMX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BBTkVMX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NVUlJFTlRfQlVGRkVSICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBTWVNURU1fQ1RSTF9DVVJSRU5UX0JVRkZFUl9OT1JNQUwgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9DVVJSRU5UX0JVRkZFUl9GTElQX1BFTkRJTkcgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9ETUFfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRE1BX1NUQVRVU19JRExFICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRE1BX1NUQVRVU19CVVNZICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX0JVUlNUX1JFQUQgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9SRUFEX09GRiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9SRUFEX09OICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9BQk9SVF9PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9BQk9SVF9PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfU1VCU1lTX0lEX0xPQ0sgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgU1lTVEVNX0NUUk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AgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lNRU1fVFJJU1RBVEVfT04gICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9MT0NBTE1FTV9UUklTVEFURSAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0xPQ0FMTUVNX1RSSVNUQVRFX09GRiAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0xPQ0FMTUVNX1RSSVNUQVRFX09OICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BBTkVMX1RSSVNUQVRFICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUEFORUxfVFJJU1RBVEVfT0ZGICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUEFORUxfVFJJU1RBVEVfT04gICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBNSVNDX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDQKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fUkVSRVNIX0NPVU5UICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFUkVTSF9DT1VOVF8xUk9XICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFUkVTSF9DT1VOVF8zUk9XICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFRlJFU0hfVElNRSAgICAgICAgICAgICAgICAgICAyNjoyNQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9SRUZSRVNIX1RJTUVfOCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9SRUZSRVNIX1RJTUVfMTYgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9SRUZSRVNIX1RJTUVfMzIgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9SRUZSRVNIX1RJTUVfNjQgICAgICAgICAgICAgICAgMworI2RlZmluZSBNSVNDX0NUUkxfSU5UX09VVFBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgTUlTQ19DVFJMX0lOVF9PVVRQVVRfTk9STUFMICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0lOVF9PVVRQVVRfSU5WRVJUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX1BMTF9DTEtfQ09VTlQgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIE1JU0NfQ1RSTF9QTExfQ0xLX0NPVU5UX09GRiAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9QTExfQ0xLX0NPVU5UX09OICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EQUNfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBNSVNDX0NUUkxfREFDX1BPV0VSX09OICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfREFDX1BPV0VSX09GRiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfQ0xLX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgTUlTQ19DVFJMX0NMS19TRUxFQ1RfT1NDICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0NMS19TRUxFQ1RfVEVTVENMSyAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fQ09MVU1OX1NJWkUgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX0NPTFVNTl9TSVpFXzI1NiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX0NPTFVNTl9TSVpFXzUxMiAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX0NPTFVNTl9TSVpFXzEwMjQgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU0laRV84TSAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU0laRV8xNk0gICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU0laRV8zMk0gICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU0laRV82NE0gICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1RSICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdUUl8yQ0xLICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdUUl8xQ0xLICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdSICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RXUl8zQ0xLICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RXUl8yQ0xLICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSUCAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJQXzNDTEsgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJQXzRDTEsgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJGQyAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUkZDXzEyQ0xLICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUkZDXzE0Q0xLICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUkFTICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSQVNfN0NMSyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSQVNfOENMSyAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9SRVNFVCAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1JFU0VUX1JFU0VUICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1JFU0VUX05PUk1BTCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1NUQVRFICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU1RBVEVfQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU1RBVEVfSU5BQ1RJVkUgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfQ1BVX0NBU19MQVRFTkNZICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIE1JU0NfQ1RSTF9DUFVfQ0FTX0xBVEVOQ1lfMkNMSyAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9DUFVfQ0FTX0xBVEVOQ1lfM0NMSyAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9ETEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgTUlTQ19DVFJMX0RMTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RMTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9PVVRQVVRfTE9XICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9PVVRQVVRfSElHSCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fQlVTX1NJWkUgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9CVVNfU0laRV8zMiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9CVVNfU0laRV82NCAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9FTUJFRERFRF9MT0NBTE1FTSAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgTUlTQ19DVFJMX0VNQkVEREVEX0xPQ0FMTUVNX09OICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0VNQkVEREVEX0xPQ0FMTUVNX09GRiAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBHUElPX01VWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDgKKyNkZWZpbmUgR1BJT19NVVhfMzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIEdQSU9fTVVYXzMxX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzMxX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzMwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBHUElPX01VWF8zMF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8zMF9JMkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgR1BJT19NVVhfMjlfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjlfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEdQSU9fTVVYXzI4X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI4X1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBHUElPX01VWF8yN19HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yN19TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgR1BJT19NVVhfMjZfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjZfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIEdQSU9fTVVYXzI1X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI1X1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBHUElPX01VWF8yNF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yNF9TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgR1BJT19NVVhfMjNfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjNfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fTVVYXzIyX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzIyX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzIxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX01VWF8yMV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yMV9TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MjAKKyNkZWZpbmUgR1BJT19NVVhfMjBfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjBfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fTVVYXzE5X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE5X1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX01VWF8xOF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xOF9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgR1BJT19NVVhfMTdfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTdfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIEdQSU9fTVVYXzE2X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE2X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBHUElPX01VWF8xNV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xNV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgR1BJT19NVVhfMTRfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTRfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIEdQSU9fTVVYXzEzX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzEzX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBHUElPX01VWF8xMl9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xMl9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgR1BJT19NVVhfMTFfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTFfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIEdQSU9fTVVYXzEwX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzEwX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgR1BJT19NVVhfOV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfOV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBHUElPX01VWF84X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF84X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF83ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIEdQSU9fTVVYXzdfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzdfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgR1BJT19NVVhfNl9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfNl9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBHUElPX01VWF81X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF81X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF80ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEdQSU9fTVVYXzRfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzRfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgR1BJT19NVVhfM19HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfM19URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBHUElPX01VWF8yX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEdQSU9fTVVYXzFfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzFfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgR1BJT19NVVhfMF9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMF9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMEMKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUk9UQVRFICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PRkYgICAgICAgICAgICAgICAwCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PTiAgICAgICAgICAgICAgICAxCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQSAgICAgICAgICAgICAgICAgICAgICAyNjoyNAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfT0ZGICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMSAgICAgICAgICAgMQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMiAgICAgICAgICAgMgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMyAgICAgICAgICAgMworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfNCAgICAgICAgICAgNAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfNSAgICAgICAgICAgNQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9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E1FTV9BUkJJVFJBVElPTl9WSURFTyAgICAgICAgICAgICAgICAgICAgMTA6OAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19PRkYgICAgICAgICAgICAgICAgMAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8xICAgICAgICAgMQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8yICAgICAgICAgMgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8zICAgICAgICAgMworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV80ICAgICAgICAgNAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV81ICAgICAgICAgNQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV82ICAgICAgICAgNgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV83ICAgICAgICAgNworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9QQU5FTCAgICAgICAgICAgICAgICAgICAgNjo0CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1BBTkVMX09GRiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzEgICAgICAgICAxCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzIgICAgICAgICAyCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzMgICAgICAgICAzCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzQgICAgICAgICA0CisjZGVmaW5lIExPQ0FMTUVNX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9ST1RBVEVfT0ZGICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9ST1RBVEVfT04gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0EgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX09GRiAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzEgICAgICAgICAgICAgMQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzIgICAgICAgICAgICAgMgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzMgICAgICAgICAgICAgMworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzQgICAgICAgICAgICAgNAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzUgICAgICAgICAgICAgNQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzYgICAgICAgICAgICAgNgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVkdBX1BSSU9SSVRZXzcgICAgICAgICAgICAgNworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fRE1BICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0RNQV9QUklPUklUWV8xICAgICAgICAgICAgIDEKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0RNQV9QUklPUklUWV8yICAgICAgICAgICAgIDIKKyNkZWZpbmUgUENJTUVNX0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DoxMgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9PRkYgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV8xICAgICAgICAgMQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV8yICAgICAgICAgMgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV8zICAgICAgICAgMworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV80ICAgICAgICAgNAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV81ICAgICAgICAgNQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV82ICAgICAgICAgNgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fWlZQT1JUMF9QUklPUklUWV83ICAgICAgICAgNworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU8gICAgICAgICAgICAgICAgICAgICAgMTA6OAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fT0ZGICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfMSAgICAgICAgICAgMQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfMiAgICAgICAgICAgMgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfMyAgICAgICAgICAgMworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfNCAgICAgICAgICAgNAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfNSAgICAgICAgICAgNQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfNiAgICAgICAgICAgNgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fVklERU9fUFJJT1JJVFlfNyAgICAgICAgICAgNworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fUEFORUwgICAgICAgICAgICAgICAgICAgICAgNjo0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9PRkYgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV8xICAgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV8yICAgICAgICAgICAyCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV8zICAgICAgICAgICAzCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV80ICAgICAgICAgICA0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV81ICAgICAgICAgICA1CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV82ICAgICAgICAgICA2CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTF9QUklPUklUWV83ICAgICAgICAgICA3CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9DUlQgICAgICAgICAgICAgICAgICAgICAgICAyOjAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9PRkYgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV8xICAgICAgICAgICAgIDEKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV8yICAgICAgICAgICAgIDIKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV8zICAgICAgICAgICAgIDMKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV80ICAgICAgICAgICAgIDQKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV81ICAgICAgICAgICAgIDUKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV82ICAgICAgICAgICAgIDYKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX0NSVF9QUklPUklUWV83ICAgICAgICAgICAgIDcKKworI2RlZmluZSBSQVdfSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjAKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQxX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBSQVdfSU5UX1pWUE9SVDFfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBSQVdfSU5UX1pWUE9SVDFfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1pWUE9SVDFfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1pWUE9SVDBfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMF9WU1lOQ19DTEVBUiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfQ1JUX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgUkFXX0lOVF9DUlRfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUkFXX0lOVF9DUlRfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9DUlRfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9QQU5FTF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBSQVdfSU5UX1BBTkVMX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBSQVdfSU5UX1BBTkVMX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1BBTkVMX1ZTWU5DX0NMRUFSICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1ZHQV9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIFJBV19JTlRfVkdBX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfVkdBX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfVkdBX1ZTWU5DX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSU5UX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDI0CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMzBfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMzBfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI5X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI5X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yOF9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yOF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjdfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjdfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI2X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI2X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yNV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yNV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgSU5UX1NUQVRVU19JMkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19JMkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIElOVF9TVEFUVVNfUFdNX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfUFdNX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBJTlRfU1RBVFVTX0RNQTFfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0RNQTFfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0RNQTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMF9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfUENJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgSU5UX1NUQVRVU19QQ0lfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19QQ0lfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBJTlRfU1RBVFVTX1NTUDFfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX1NTUDFfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMF9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgSU5UX1NUQVRVU19ERV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19ERV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19aVlBPUlQxX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBJTlRfU1RBVFVTX1pWUE9SVDFfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX1pWUE9SVDFfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1pWUE9SVDBfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfQ1JUX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgSU5UX1NUQVRVU19DUlRfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19DUlRfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19QQU5FTF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBJTlRfU1RBVFVTX1BBTkVMX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX1BBTkVMX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1ZHQV9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIElOVF9TVEFUVVNfVkdBX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfVkdBX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSU5UX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDI4CisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBJTlRfTUFTS19HUElPMzFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMzFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzMwX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzMwX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOAorI2RlZmluZSBJTlRfTUFTS19HUElPMjhfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMjhfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMjcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI3X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI3X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBJTlRfTUFTS19HUElPMjVfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMjVfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19JMkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgSU5UX01BU0tfSTJDX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfSTJDX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIElOVF9NQVNLX1BXTV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1BXTV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0RNQTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBJTlRfTUFTS19ETUExX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19ETUExX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIElOVF9NQVNLX0RNQV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0RNQV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1BDSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgSU5UX01BU0tfUENJX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfUENJX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBJTlRfTUFTS19TU1AxX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19TU1AxX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIElOVF9NQVNLX1NTUDBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1NTUDBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgSU5UX01BU0tfREVfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfREVfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfWlZQT1JUMV9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBJTlRfTUFTS19aVlBPUlQxX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19aVlBPUlQxX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19aVlBPUlQwX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDBfVlNZTkNfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDBfVlNZTkNfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0NSVF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgSU5UX01BU0tfQ1JUX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfQ1JUX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfUEFORUxfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBJTlRfTUFTS19QQU5FTF9WU1lOQ19ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19QQU5FTF9WU1lOQ19FTkFCTEUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19WR0FfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIElOVF9NQVNLX1ZHQV9WU1lOQ19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1ZHQV9WU1lOQ19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDQwCisjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfMTEyTUhaICAgICAgICAgICAgICAgICAgICAgIDAKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgICAxCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS181Nk1IWiAgICAgICAgICAgICAgICAgICAgICAgMgorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfNDJNSFogICAgICAgICAgICAgICAgICAgICAgIDMKKyNlbHNlCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS19ESVZfMyAgICAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfRElWXzQgICAgICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLX0RJVl82ICAgICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS19ESVZfOCAgICAgICAgICAgICAgICAgICAgICAgMworI2VuZGlmCisjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS18zMzZNSFogICAgICAgICAgICAgICAgICAgIDAKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfMTY4TUhaICAgICAgICAgICAgICAgICAgICAxCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLXzExMk1IWiAgICAgICAgICAgICAgICAgICAgMgorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS184NE1IWiAgICAgICAgICAgICAgICAgICAgIDMKKyNlbHNlCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLX0RJVl8xICAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS19ESVZfMiAgICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfRElWXzMgICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLX0RJVl80ICAgICAgICAgICAgICAgICAgICAgMworI2VuZGlmCisjZGVmaW5lIENVUlJFTlRfR0FURV9WR0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfVkdBX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfVkdBX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIENVUlJFTlRfR0FURV9QV01fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9QV01fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9JMkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0kyQ19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0kyQ19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1NTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBDVVJSRU5UX0dBVEVfU1NQX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfU1NQX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIENVUlJFTlRfR0FURV9HUElPX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9HUElPX09OICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1pWUE9SVF9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1pWUE9SVF9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBDVVJSRU5UX0dBVEVfQ1NDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfQ1NDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIENVUlJFTlRfR0FURV9ERV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9ERV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9ESVNQTEFZICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RJU1BMQVlfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RJU1BMQVlfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0xPQ0FMTUVNICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBDVVJSRU5UX0dBVEVfTE9DQUxNRU1fT0ZGICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfTE9DQUxNRU1fT04gICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfRE1BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIENVUlJFTlRfR0FURV9ETUFfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9ETUFfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgTU9ERTBfR0FURSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDQ0CisjZGVmaW5lIE1PREUwX0dBVEVfTUNMSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2RlZmluZSBNT0RFMF9HQVRFX01DTEtfMTEyTUhaICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX01DTEtfODRNSFogICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX01DTEtfNTZNSFogICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNT0RFMF9HQVRFX01DTEtfNDJNSFogICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBNT0RFMF9HQVRFX00yWENMSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNkZWZpbmUgTU9ERTBfR0FURV9NMlhDTEtfMzM2TUhaICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9NMlhDTEtfMTY4TUhaICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9NMlhDTEtfMTEyTUhaICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgTU9ERTBfR0FURV9NMlhDTEtfODRNSFogICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgTU9ERTBfR0FURV9WR0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIE1PREUwX0dBVEVfVkdBX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfVkdBX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgTU9ERTBfR0FURV9QV01fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9QV01fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9JMkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBNT0RFMF9HQVRFX0kyQ19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0kyQ19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX1NTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIE1PREUwX0dBVEVfU1NQX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfU1NQX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgTU9ERTBfR0FURV9HUElPX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9HUElPX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBNT0RFMF9HQVRFX1pWUE9SVF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX1pWUE9SVF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIE1PREUwX0dBVEVfQ1NDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfQ1NDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgTU9ERTBfR0FURV9ERV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9ERV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9ESVNQTEFZICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBNT0RFMF9HQVRFX0RJU1BMQVlfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0RJU1BMQVlfT04gICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0xPQ0FMTUVNICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIE1PREUwX0dBVEVfTE9DQUxNRU1fT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfTE9DQUxNRU1fT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfRE1BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgTU9ERTBfR0FURV9ETUFfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9ETUFfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBNT0RFMV9HQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDgKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1PREUxX0dBVEVfTUNMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfTUNMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfTUNMS181Nk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1PREUxX0dBVEVfTUNMS180Mk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNT0RFMV9HQVRFX00yWENMS18zMzZNSFogICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX00yWENMS18xNjhNSFogICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX00yWENMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNT0RFMV9HQVRFX00yWENMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBNT0RFMV9HQVRFX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgTU9ERTFfR0FURV9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9WR0FfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBNT0RFMV9HQVRFX1BXTV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX1BXTV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIE1PREUxX0dBVEVfSTJDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfSTJDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfU1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgTU9ERTFfR0FURV9TU1BfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9TU1BfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBNT0RFMV9HQVRFX0dQSU9fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0dQSU9fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIE1PREUxX0dBVEVfWlZQT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfWlZQT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfQ1NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgTU9ERTFfR0FURV9DU0NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9DU0NfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBNT0RFMV9HQVRFX0RFX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0RFX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0RJU1BMQVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIE1PREUxX0dBVEVfRElTUExBWV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfRElTUExBWV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfTE9DQUxNRU0gICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgTU9ERTFfR0FURV9MT0NBTE1FTV9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9MT0NBTE1FTV9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBNT0RFMV9HQVRFX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0RNQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0QworI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMXzMzNkNMSyAgICAgICAgICAgICAgICAgICAgNDo0CisgICAgI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfMzM2Q0xLX09GRiAgICAgICAgICAgICAgICAwCisgICAgI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfMzM2Q0xLX09OICAgICAgICAgICAgICAgICAxCisjZW5kaWYKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX09TQ19JTlBVVCAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfT1NDX0lOUFVUX09GRiAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfT1NDX0lOUFVUX09OICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfQUNQSSAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9BQ1BJX09GRiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9BQ1BJX09OICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAxOjAKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX01PREVfTU9ERTAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX01PREVfTU9ERTEgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX01PREVfU0xFRVAgICAgICAgICAgICAgICAgICAgIDIKKworI2RlZmluZSBQQ0lfTUFTVEVSX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNTAKKyNkZWZpbmUgUENJX01BU1RFUl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIERFVklDRV9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA1NAorI2RlZmluZSBERVZJQ0VfSURfREVWSUNFX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVWSUNFX0lEX1JFVklTSU9OX0lEICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFBMTF9DTEtfQ09VTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA1OAorI2RlZmluZSBQTExfQ0xLX0NPVU5UX0NPVU5URVIgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA1QworI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9CWVBBU1MgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfQllQQVNTX09GRiAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfQllQQVNTX09OICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX1BPV0VSX09GRiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX1BPV0VSX09OICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0lOUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9JTlBVVF9PU0MgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9JTlBVVF9URVNUQ0xLICAgICAgICAgICAgICAgICAgMQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgUEFORUxfUExMX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNlbHNlCisgICAgI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9QT0QgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorICAgICNkZWZpbmUgUEFORUxfUExMX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNlbmRpZgorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDYwCisjZGVmaW5lIENSVF9QTExfQ1RSTF9CWVBBU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBDUlRfUExMX0NUUkxfQllQQVNTX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfUExMX0NUUkxfQllQQVNTX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfUExMX0NUUkxfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX1BPV0VSX09GRiAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX1BPV0VSX09OICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0lOUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIENSVF9QTExfQ1RSTF9JTlBVVF9PU0MgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9QTExfQ1RSTF9JTlBVVF9URVNUQ0xLICAgICAgICAgICAgICAgICAgICAxCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDUlRfUExMX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2Vsc2UKKyAgICAjZGVmaW5lIENSVF9QTExfQ1RSTF9QT0QgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisgICAgI2RlZmluZSBDUlRfUExMX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2VuZGlmCisjZGVmaW5lIENSVF9QTExfQ1RSTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMTo4CisjZGVmaW5lIENSVF9QTExfQ1RSTF9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBWR0FfUExMMF9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNjQKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9CWVBBU1MgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfQllQQVNTX09GRiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfQllQQVNTX09OICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBWR0FfUExMMF9DVFJMX1BPV0VSX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMF9DVFJMX1BPV0VSX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWR0FfUExMMF9DVFJMX0lOUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9JTlBVVF9PU0MgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9JTlBVVF9URVNUQ0xLICAgICAgICAgICAgICAgICAgIDEKKyNpZmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAjZGVmaW5lIFZHQV9QTEwwX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZWxzZQorICAgICNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9QT0QgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyAgICAjZGVmaW5lIFZHQV9QTEwwX0NUUkxfT0QgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZW5kaWYKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjgKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZHQV9QTEwxX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA2OAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBWR0FfUExMMV9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAgMQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNlbHNlCisgICAgI2RlZmluZSBWR0FfUExMMV9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorICAgICNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNlbmRpZgorI2RlZmluZSBWR0FfUExMMV9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBWR0FfUExMMV9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgU0NSQVRDSF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDZjCisKKyNpZm5kZWYgVkFMSURBVElPTl9DSElQCisKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDcwCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNWENMS19QTExfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjgKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA4OAorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9VU0VSX0RFRklORSAgICAgICAgICAgICAgICAgNTo0CisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX1BMTCAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT05fUExMX1ZHQSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT05fUExMX1BBTkVMICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT05fTU9ERSAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9NT0RFX1RFWFQgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9NT0RFX0dSQVBISUMgICAgICAgICAgICAgICAgMQorCisjZW5kaWYKKworI2RlZmluZSBHUElPX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAwMAorI2RlZmluZSBHUElPX0RBVEFfMzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBHUElPX0RBVEFfMzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBHUElPX0RBVEFfMjkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBHUElPX0RBVEFfMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOAorI2RlZmluZSBHUElPX0RBVEFfMjcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBHUElPX0RBVEFfMjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBHUElPX0RBVEFfMjUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBHUElPX0RBVEFfMjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBHUElPX0RBVEFfMjMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBHUElPX0RBVEFfMjIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBHUElPX0RBVEFfMjEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0RBVEFfMjAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX0RBVEFfMTkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOToxOQorI2RlZmluZSBHUElPX0RBVEFfMTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX0RBVEFfMTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBHUElPX0RBVEFfMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBHUElPX0RBVEFfMTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBHUElPX0RBVEFfMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBHUElPX0RBVEFfMTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBHUElPX0RBVEFfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBHUElPX0RBVEFfMTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBHUElPX0RBVEFfMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBHUElPX0RBVEFfOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgR1BJT19EQVRBXzggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIEdQSU9fREFUQV83ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBHUElPX0RBVEFfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgR1BJT19EQVRBXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIEdQSU9fREFUQV80ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBHUElPX0RBVEFfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgR1BJT19EQVRBXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEdQSU9fREFUQV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBHUElPX0RBVEFfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAwNAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMxICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMxX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzFfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zMF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMwX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjkgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjlfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI4ICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI4X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjhfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yN19JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI3X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjYgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjZfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNl9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI1ICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI1X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjVfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNCAgICAgICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI0X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjMgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjNfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yM19PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIyICAgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIyX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjJfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMSAgICAgICAgICAgICAgICAgICAgICAgICAgMjE6MjEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIxX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjIwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjBfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE5ICAgICAgICAgICAgICAgICAgICAgICAgICAxOToxOQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE5X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTlfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xOCAgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xOF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE4X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTcgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTdfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xN19PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE2X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTZfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNSAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE1X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTQgICAgICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTRfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEzICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEzX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTNfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMl9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEyX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTEgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTFfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEwICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEwX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTBfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl85ICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fOV9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl85X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzggICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl84X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzhfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNyAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzdfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fN19PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl82ICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNl9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl82X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzUgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl81X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzVfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNCAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzRfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNF9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fM19JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zX09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzJfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzFfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMV9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMF9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8wX09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDA4CisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMzEgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMzFfRURHRSAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMV9MRVZFTCAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzMwICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzMwX0VER0UgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMzBfTEVWRUwgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8yOSAgICAgICAgICAgICAgICAgMjA6MjAKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8yOV9FREdFICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzI5X0xFVkVMICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMjggICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHR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F9TVEFUVVNfMzFfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMV9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMwICAgICAgICAgICAgICAgICAgICAgICAgMjE6MjEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMwX0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzBfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMF9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI5ICAgICAgICAgICAgICAgICAgICAgICAgMjA6MjAKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI5X0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjlfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOV9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI4ICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI4X0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjhfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOF9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI3ICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI3X0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjdfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yN19SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI2ICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI2X0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjZfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNl9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI1ICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI1X0lOQUNUSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjVfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNV9SRVNFVCAgICAgICAgICAgICAgICAgIDEKKworCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAwMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLICAgICAgICAgICAgMzE6MzAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1JFU0VSVkVEXzFfT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1RSTF9HQU1NQV9ESVNBQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9HQU1NQV9FTkFCTEUgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9QTEFORSAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1BMQU5FX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1BMQU5FX0VOQUJMRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfRk9STUFUXzggICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfRk9STUFUXzE2ICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfRk9STUFUXzMyICAgICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIFBBTkVMX1BBTl9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAwNAorI2RlZmluZSBQQU5FTF9QQU5fQ1RSTF9WRVJUSUNBTF9QQU4gICAgICAgICAgICAgICAgICAgMzE6MjQKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkxfVkVSVElDQUxfVlNZTkMgICAgICAgICAgICAgICAgIDIxOjE2CisjZGVmaW5lIFBBTkVMX1BBTl9DVFJMX0hPUklaT05UQUxfUEFOICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIFBBTkVMX1BBTl9DVFJMX0hPUklaT05UQUxfVlNZTkMgICAgICAgICAgICAgICA1OjAKKworI2RlZmluZSBQQU5FTF9DT0xPUl9LRVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMDgKKyNkZWZpbmUgUEFORUxfQ09MT1JfS0VZX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFBBTkVMX0NPTE9SX0tFWV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDBDCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBQQU5FTF9GQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMTAKKyNkZWZpbmUgUEFORUxfRkJfV0lEVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjE2CisjZGVmaW5lIFBBTkVMX0ZCX1dJRFRIX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAxMzowCisKKyNkZWZpbmUgUEFORUxfV0lORE9XX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDE0CisjZGVmaW5lIFBBTkVMX1dJTkRPV19XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBQQU5FTF9XSU5ET1dfV0lEVEhfWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFBBTkVMX1dJTkRPV19IRUlHSFQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAxOAorI2RlZmluZSBQQU5FTF9XSU5ET1dfSEVJR0hUX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgUEFORUxfV0lORE9XX0hFSUdIVF9ZICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBQQU5FTF9QTEFORV9UTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMUMKKyNkZWZpbmUgUEFORUxfUExBTkVfVExfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX1BMQU5FX1RMX0xFRlQgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgUEFORUxfUExBTkVfQlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDIwCisjZGVmaW5lIFBBTkVMX1BMQU5FX0JSX0JPVFRPTSAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBQQU5FTF9QTEFORV9CUl9SSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAyNAorI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1RPVEFMX1RPVEFMICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9UT1RBTF9ESVNQTEFZX0VORCAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1NZTkMgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMjgKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9TWU5DX1dJRFRIICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfU1lOQ19TVEFSVCAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDJDCisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1RPVEFMX1RPVEFMICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9UT1RBTF9ESVNQTEFZX0VORCAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1NZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAzMAorI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9TWU5DX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgMjE6MTYKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfU1lOQ19TVEFSVCAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBQQU5FTF9DVVJSRU5UX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMzQKKyNkZWZpbmUgUEFORUxfQ1VSUkVOVF9MSU5FX0xJTkUgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworLyogVmlkZW8gQ29udHJvbCAqLworCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDQwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9MSU5FX0JVRkZFUiAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9MSU5FX0JVRkZFUl9ESVNBQkxFICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0xJTkVfQlVGRkVSX0VOQUJMRSAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNgorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRklGT18xICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPXzMgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZJRk9fNyAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRklGT18xMSAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9CVUZGRVIgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9CVUZGRVJfMCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JVRkZFUl8xICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfQ0FQVFVSRSAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfQ0FQVFVSRV9ESVNBQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9DQVBUVVJFX0VOQUJMRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0RPVUJMRV9CVUZGRVIgICAgICAgICAgICAgICAgMTM6MTMKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0RPVUJMRV9CVUZGRVJfRElTQUJMRSAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0N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1RSTF9IT1JJWk9OVEFMX01PREVfUkVQTElDQVRFICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0hPUklaT05UQUxfTU9ERV9JTlRFUlBPTEFURSAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfUElYRUwgICAgICAgICAgICAgICAgICAgICAgICA3OjQKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0dBTU1BICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9HQU1NQV9ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0dBTU1BX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfUExBTkUgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX1BMQU5FX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfUExBTkVfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRk9STUFUXzggICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZPUk1BVF8zMiAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRk9STUFUX1lVViAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDQ0CisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBWSURFT19GQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNDgKKyNkZWZpbmUgVklERU9fRkJfV0lEVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjE2CisjZGVmaW5lIFZJREVPX0ZCX1dJRFRIX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAxMzowCisKKyNkZWZpbmUgVklERU9fRkJfMF9MQVNUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDRDCisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8wX0xBU1RfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8wX0xBU1RfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8wX0xBU1RfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFZJREVPX1BMQU5FX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA1MAorI2RlZmluZSBWSURFT19QTEFORV9UTF9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgVklERU9fUExBTkVfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBWSURFT19QTEFORV9CUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNTQKKyNkZWZpbmUgVklERU9fUExBTkVfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFZJREVPX1BMQU5FX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgVklERU9fU0NBTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDU4CisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX01PREUgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBWSURFT19TQ0FMRV9WRVJUSUNBTF9NT0RFX0VYUEFORCAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19TQ0FMRV9WRVJUSUNBTF9NT0RFX1NIUklOSyAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19TQ0FMRV9WRVJUSUNBTF9TQ0FMRSAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9NT0RFICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIFZJREVPX1NDQUxFX0hPUklaT05UQUxfTU9ERV9FWFBBTkQgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX1NDQUxFX0hPUklaT05UQUxfTU9ERV9TSFJJTksgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX1NDQUxFX0hPUklaT05UQUxfU0NBTEUgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgVklERU9fSU5JVElBTF9TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDVDCisjZGVmaW5lIFZJREVPX0lOSVRJQUxfU0NBTEVfRkJfMSAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBWSURFT19JTklUSUFMX1NDQUxFX0ZCXzAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFZJREVPX1lVVl9DT05TVEFOVFMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA2MAorI2RlZmluZSBWSURFT19ZVVZfQ09OU1RBTlRTX1kgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MjQKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UU19SICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIFZJREVPX1lVVl9DT05TVEFOVFNfRyAgICAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIFZJREVPX1lVVl9DT05TVEFOVFNfQiAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNjQKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFZJREVPX0ZCXzFfTEFTVF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA2OAorI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgVklERU9fRkJfMV9MQVNUX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRkJfMV9MQVNUX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRkJfMV9MQVNUX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgIDI1OjAKKworLyogVmlkZW8gQWxwaGEgQ29udHJvbCAqLworCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDgwCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9TRUxFQ1QgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9TRUxFQ1RfUEVSX1BJWEVMICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9BTFBIQSAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfQUxQSEEgICAgICAgICAgICAgICAgICAyNzoyNAorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfRklGTyAgICAgICAgICAgICAgICAgICAxNzoxNgorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfR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AgICAgICAgICAgICAgICAgICAgMHgwODAwODQKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19BTFBIQV9GQl9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9GQl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9GQl9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA4OAorI2RlZmluZSBWSURFT19BTFBIQV9GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBWSURFT19BTFBIQV9GQl9MQVNUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgMHgwODAwOEMKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0VYVCAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0xBU1RfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0xBU1RfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0xBU1RfQUREUkVTU19BRERSRVNTICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfVEwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDkwCisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA5NAorI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9CUl9CT1RUT00gICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwOTgKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfTU9ERSAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFX1ZFUlRJQ0FMX01PREVfRVhQQU5EICAgICAgICAwCisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFX1ZFUlRJQ0FMX01PREVfU0hSSU5LICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFX1ZFUlRJQ0FMX1NDQUxFICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX01PREUgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfSE9SSVpPTlRBTF9NT0RFX0VYUEFORCAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfSE9SSVpPTlRBTF9NT0RFX1NIUklOSyAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfSE9SSVpPTlRBTF9TQ0FMRSAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBWSURFT19BTFBIQV9JTklUSUFMX1NDQUxFICAgICAgICAgICAgICAgICAgICAgMHgwODAwOUMKKyNkZWZpbmUgVklERU9fQUxQSEFfSU5JVElBTF9TQ0FMRV9WRVJUSUNBTCAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0lOSVRJQUxfU0NBTEVfSE9SSVpPTlRBTCAgICAgICAgICAxMTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ0hST01BX0tFWSAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMEEwCisjZGVmaW5lIFZJREVPX0FMUEhBX0NIUk9NQV9LRVlfTUFTSyAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DSFJPTUFfS0VZX1ZBTFVFICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMSAgICAgICAgICAgICAgICAgICAweDA4MDBBNAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMSAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8wX0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8wX0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjMgICAgICAgICAgICAgICAgICAgMHgwODAwQTgKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzMgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18zX1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfM19HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yX1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfMl9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfMl9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1ICAgICAgICAgICAgICAgICAgIDB4MDgwMEFDCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV81ICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV81X0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNCAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzRfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzRfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82NyAgICAgICAgICAgICAgICAgICAweDA4MDBCMAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfNyAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N183X0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfN19CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzYgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N182X0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N182X0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODkgICAgICAgICAgICAgICAgICAgMHgwODAwQjQKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzkgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV85X1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOV9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84ICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84X1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOF9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOF9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0FCICAgICAgICAgICAgICAgICAgIDB4MDgwMEI4CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9CICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9SRUQgICAgICAgICAgICAgMz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UVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9DRF9DX0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUYgICAgICAgICAgICAgICAgICAgMHgwODAwQzAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0YgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9GX1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRl9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0ZfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRV9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRV9CTFVFICAgICAgICAgICAgNDowCisKKy8qIFBhbmVsIEN1cnNvciBDb250cm9sICovCisKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMEYwCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FTkFCTEVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FTkFCTEVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjQKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1RPUCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTl9UT1BfSU5TSURFICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTl9UT1BfT1VUU0lERSAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fTEVGVCAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX0xFRlRfSU5TSURFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX0xFRlRfT1VUU0lERSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjgKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzEyXzJfUkdCNTY1ICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8xMl8xX1JHQjU2NSAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMEZDCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8zX1JHQjU2NSAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKy8qIE9sZCBEZWZpbml0aW9ucyArKysgKi8KKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMEY4CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8xX1JFRCAgICAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDFfMV9HUkVFTiAgICAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxXzFfQkxVRSAgICAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8wX1JFRCAgICAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDFfMF9HUkVFTiAgICAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDFfMF9CTFVFICAgICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMEZDCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8yX1JFRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMl9HUkVFTiAgICAgICAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMl9CTFVFICAgICAgICAgICAgICAgICAgICAgICAgNDowCisvKiBPbGQgRGVmaW5pdGlvbnMgLS0tICovCisKKy8qIEFscGhhIENvbnRyb2wgKi8KKworI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9TRUxFQ1RfUEVSX1BJWEVMICAgICAgICAgICAwCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9TRUxFQ1RfQUxQSEEgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAyNzoyNAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGTyAgICAgICAgICAgICAgICAgICAgICAgMTc6MTYKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0ZJRk9fMSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0ZJRk9fNyAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0ZJRk9fMTEgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1BJWEVMICAgICAgICAgICAgICAgICAgICAgIDc6NAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfQ0hST01BX0tFWSAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9DSFJPTUFfS0VZX0RJU0FCTEUgICAgICAgICAwCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9DSFJPTUFfS0VZX0VOQUJMRSAgICAgICAgICAxCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9QTEFORSAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FX0VOQUJMRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUXzE2ICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUX0FMUEhBXzRfNCAgICAgICAgICAgMgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUX0FMUEhBXzRfNF80XzQgICAgICAgMworCisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEwNAorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQUxQSEFfRkJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTA4CisjZGVmaW5lIEFMUEhBX0ZCX1dJRFRIX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBBTFBIQV9GQl9XSURUSF9PRkZTRVQgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIEFMUEhBX1BMQU5FX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEwQworI2RlZmluZSBBTFBIQV9QTEFORV9UTF9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgQUxQSEFfUExBTkVfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBBTFBIQV9QTEFORV9CUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMTAKKyNkZWZpbmUgQUxQSEFfUExBTkVfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIEFMUEhBX1BMQU5FX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgQUxQSEFfQ0hST01BX0tFWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTE0CisjZGVmaW5lIEFMUEhBX0NIUk9NQV9LRVlfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DSFJPTUFfS0VZX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMSAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDExOAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMSAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8wX0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8wX0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjMgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMUMKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzMgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18zX1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfM19HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yX1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfMl9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfMl9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1ICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTIwCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV81ICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV81X0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNCAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzRfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzRfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82NyAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEyNAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfNyAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N183X0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfN19CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzYgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N182X0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N182X0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODkgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMjgKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzkgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV85X1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOV9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84ICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84X1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOF9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOF9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTJDCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9CICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0JfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9CX0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQSAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0FfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0FfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRCAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEzMAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfRCAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0RfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9EX0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfRF9CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0MgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9DX0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9DX0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfRUYgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMzQKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0YgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9GX1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfRUZfRl9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0ZfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9FICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX1JFRCAgICAgIC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gICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9WU1lOQ19QSEFTRV9BQ1RJVkVfTE9XICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9IU1lOQ19QSEFTRSAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfSFNZTkNfUEhBU0VfQUNUSVZFX0hJR0ggICAgICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfSFNZTkNfUEhBU0VfQUNUSVZFX0xPVyAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfQkxBTksgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0JMQU5LX09GRiAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0JMQU5LX09OICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX1RJTUlORyAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfVElNSU5HX0RJU0FCTEUgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfVElNSU5HX0VOQUJMRSAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUElYRUwgICAgICAgICAgICAgICAgICAgICAgICA3OjQKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9HQU1NQSAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0dBTU1BX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0dBTU1BX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX1BMQU5FICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUExBTkVfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfRk9STUFUICAgICAgICAgICAgICAgICAgICAgICAxOjAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9SRVNFUlZFRF9CSVRTX01BU0sgICAgICAgICAgIDB4RkYwMDAyMDAKKworI2RlZmluZSBDUlRfRkJfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMDQKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBDUlRfRkJfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRkJfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRkJfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIENSVF9GQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIwOAorI2RlZmluZSBDUlRfRkJfV0lEVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgQ1JUX0ZCX1dJRFRIX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMEMKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjEwCisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1NZTkNfV0lEVEggICAgICAgICAgICAgICAgICAgICAyMzoxNgorI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9TWU5DX1NUQVJUICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIENSVF9WRVJUSUNBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIxNAorI2RlZmluZSBDUlRfVkVSVElDQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBDUlRfVkVSVElDQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMTgKKyNkZWZpbmUgQ1JUX1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JTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIyMAorI2RlZmluZSBDUlRfQ1VSUkVOVF9MSU5FX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIyNAorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX1ZBTFVFX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX1ZBTFVFX0VOQUJMRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9FTkFCTEVfRElTQUJMRSAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9FTkFCTEVfRU5BQkxFICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9SRUQgICAgICAgICAgICAgICAgICAgICAgICAyMzoxNgorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfR1JFRU4gICAgICAgICAgICAgICAgICAgICAgMTU6OAorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfQkxVRSAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgQ1JUX1NDQUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjI4CisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDUlRfU0NBTEVfVkVSVElDQUxfTU9ERV9FWFBBTkQgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfU0NBTEVfVkVSVElDQUxfTU9ERV9TSFJJTksgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfU0NBTEVfVkVSVElDQUxfU0NBTEUgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfTU9ERSAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIENSVF9TQ0FMRV9IT1JJWk9OVEFMX01PREVfRVhQQU5EICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9TQ0FMRV9IT1JJWk9OVEFMX01PREVfU0hSSU5LICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9TQ0FMRV9IT1JJWk9OVEFMX1NDQUxFICAgICAgICAgICAgICAgICAgICAxMTowCisKKy8qIENSVCBDdXJzb3IgQ29udHJvbCAqLworCisjZGVmaW5lIENSVF9IV0NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIzMAorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VOQUJMRV9ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VOQUJMRV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENSVF9IV0NfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9IV0NfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9IV0NfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjM0CisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OX1RPUF9JTlNJREUgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OX1RPUF9PVVRTSURFICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fTEVGVF9JTlNJREUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fTEVGVF9PVVRTSURFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjM4CisjZGVmaW5lIENSVF9IV0NfQ09MT1JfMTJfMl9SR0I1NjUgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBDUlRfSFdDX0NPTE9SXzEyXzFfUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENSVF9IV0NfQ09MT1JfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIzQworI2RlZmluZSBDUlRfSFdDX0NPTE9SXzNfUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisvKiBPbGQgRGVmaW5pdGlvbnMgKysrLiBOZWVkIHRvIGJlIHJlbW92ZWQgaWYgbm8gYXBwbGljYXRpb24gdXNlIGl0LiAqLworI2lmIDAKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDEgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjM4CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzFfUkVEICAgICAgICAgICAgICAgICAgICAzMToyNworICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMV8xX0dSRUVOICAgICAgICAgICAgICAgICAgMjY6MjEKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDFfMV9CTFVFICAgICAgICAgICAgICAgICAgIDIwOjE2CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzBfUkVEICAgICAgICAgICAgICAgICAgICAxNToxMQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMV8wX0dSRUVOICAgICAgICAgICAgICAgICAgMTA6NQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMV8wX0JMVUUgICAgICAgICAgICAgICAgICAgNDowCisKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjNDCisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzJfUkVEICAgICAgICAgICAgICAgICAgICAgICAxNToxMQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8yX0dSRUVOICAgICAgICAgICAgICAgICAgICAgMTA6NQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8yX0JMVUUgICAgICAgICAgICAgICAgICAgICAgNDowCisjZW5kaWYKKy8qIE9sZCBEZWZpbml0aW9ucyAtLS0gKi8KKworLyogVGhpcyB2ZXJ0aWNhbCBleHBhbnNpb24gYmVsb3cgc3RhcnQgYXQgMHgwODAyNDAgfiAweDA4MDI2NCAqLworI2RlZmluZSBDUlRfVkVSVElDQUxfRVhQQU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyNDAKKyNpZm5kZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDUlRfVkVSVElDQUxfQ0VOVEVSSU5HX1ZBTFVFICAgICAgICAgICAgICAzMToyNAorI2VuZGlmCisjZGVmaW5lIENSVF9WRVJUSUNBTF9FWFBBTlNJT05fQ09NUEFSRV9WQUxVRSAgICAgICAgICAyMzoxNgorI2RlZmluZSBDUlRfVkVSVElDQUxfRVhQQU5TSU9OX0xJTkVfQlVGRkVSICAgICAgICAgICAgMTU6MTIKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX0VYUEFOU0lPTl9TQ0FMRV9GQUNUT1IgICAgICAgICAgIDExOjAKKworLyogVGhpcyBob3Jpem9udGFsIGV4cGFuc2lvbiBiZWxvdyBzdGFydCBhdCAweDA4MDI2OCB+IDB4MDgwMjdDICovCisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX0VYUEFOU0lPTiAgICAgICAgICAgICAgICAgICAgICAweDA4MDI2OAorI2lmbmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAjZGVmaW5lIENSVF9IT1JJWk9OVEFMX0NFTlRFUklOR19WQUxVRSAgICAgICAgICAgIDMxOjI0CisjZW5kaWYKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfRVhQQU5TSU9OX0NPTVBBUkVfVkFMVUUgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX0VYUEFOU0lPTl9TQ0FMRV9GQUNUT1IgICAgICAgICAxMTowCisKKyNpZm5kZWYgVkFMSURBVElPTl9DSElQCisgICAgLyogQXV0byBDZW50ZXJpbmcgKi8KKyAgICAjZGVmaW5lIENSVF9BVVRPX0NFTlRFUklOR19UTCAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjgwCisgICAgI2RlZmluZSBDUlRfQVVUT19DRU5URVJJTkdfVExfVE9QICAgICAgICAgICAgICAgICAyNjoxNgorICAgICNkZWZpbmUgQ1JUX0FVVE9fQ0VOVEVSSU5HX1RMX0xFRlQgICAgICAgICAgICAgICAgMTA6MAorCisgICAgI2RlZmluZSBDUlRfQVVUT19DRU5URVJJTkdfQlIgICAgICAgICAgICAgICAgICAgICAweDA4MDI4NAorICAgICNkZWZpbmUgQ1JUX0FVVE9fQ0VOVEVSSU5HX0JSX0JPVFRPTSAgICAgICAgICAgICAgMjY6MTYKKyAgICAjZGVmaW5lIENSVF9BVVRPX0NFTlRFUklOR19CUl9SSUdIVCAgICAgICAgICAgICAgIDEwOjAKKyNlbmRpZgorCisvKiBzbTc1MGxlIG5ldyByZWdpc3RlciB0byBjb250cm9sIHBhbmVsIG91dHB1dCAqLworI2RlZmluZSBESVNQTEFZX0NPTlRST0xfNzUwTEUgCTB4ODAyODgKKy8qIFBhbGV0dGUgUkFNICovCisKKy8qIFBhbmVsIFBhbGxldGUgcmVnaXN0ZXIgc3RhcnRzIGF0IDB4MDgwNDAwIH4gMHgwODA3RkMgKi8KKyNkZWZpbmUgUEFORUxfUEFMRVRURV9SQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwNDAwCisKKy8qIFBhbmVsIFBhbGxldGUgcmVnaXN0ZXIgc3RhcnRzIGF0IDB4MDgwQzAwIH4gMHgwODBGRkMgKi8KKyNkZWZpbmUgQ1JUX1BBTEVUVEVfUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwQzAwCisKKy8qIDJEIHJlZ2lzdGVycworICogbW92ZSB0aGVpciBkZWZpbmF0aW9uIGludG8gZ2VuZXJhbCBseW54X2FjY2VsLmggZmlsZQorICogYmVjYXVzZSBhbGwgc21pIGdyYXBoaWMgY2hpcCBzaGFyZSB0aGUgc2FtZSBkcmF3aW5nIGVuZ2luZQorICogcmVnaXN0ZXIgZm9ybWF0ICovCisjaWYgMAorI2RlZmluZSBERV9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAwMAorI2RlZmluZSBERV9TT1VSQ0VfV1JBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBERV9TT1VSQ0VfV1JBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworLyoKKyAqIFRoZSBmb2xsb3dpbmcgZGVmaW5pdGlvbnMgYXJlIHVzZWQgaW4gZGlmZmVyZW50IHNldHRpbmcKKyAqLworCisvKiBVc2UgdGhlc2UgZGVmaW5pdGlvbnMgaW4gWFkgYWRkcmVzc2luZyBtb2RlIG9yIGxpbmVhciBhZGRyZXNzaW5nIG1vZGUuICovCisjZGVmaW5lIERFX1NPVVJDRV9YX0sxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIERFX1NPVVJDRV9ZX0syICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKworLyogVXNlIHRoaXMgZGVmaW5pdGlvbiBpbiBob3N0IHdyaXRlIG1vZGUgZm9yIG1vbm8uIFRoZSBZX0syIGlzIG5vdCB1c2VkCisgICBpbiBob3N0IHdyaXRlIG1vZGUuICovCisjZGVmaW5lIERFX1NPVVJDRV9YX0sxX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjE2CisKKy8qIFVzZSB0aGVzZSBkZWZpbml0aW9ucyBpbiBCcmVzZW5oYW0gbGluZSBkcmF3aW5nIG1vZGUuICovCisjZGVmaW5lIERFX1NPVVJDRV9YX0sxX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjE2CisjZGVmaW5lIERFX1NPVVJDRV9ZX0syX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBERV9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAwNAorI2RlZmluZSBERV9ERVNUSU5BVElPTl9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBERV9ERVNUSU5BVElPTl9XUkFQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNpZiAxCisgICAgI2RlZmluZSBERV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisgICAgI2RlZmluZSBERV9ERVNUSU5BVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKyNlbHNlCisgICAgI2RlZmluZSBERV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisgICAgI2RlZmluZSBERV9ERVNUSU5BVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNlbmRpZgorCisjZGVmaW5lIERFX0RJTUVOU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDA4CisjZGVmaW5lIERFX0RJTUVOU0lPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX0RJTUVOU0lPTl9ZX0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBERV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAwQworI2RlZmluZSBERV9DT05UUk9MX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBERV9DT05UUk9MX1NUQVRVU19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9QQVRURVJOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgREVfQ09OVFJPTF9QQVRURVJOX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk5fQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVVBEQVRFX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIERFX0NPTlRST0xfVVBEQVRFX0RFU1RJTkFUSU9OX1hfRElTQUJMRSAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWF9FTkFCTEUgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1FVSUNLX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOAorI2RlZmluZSBERV9DT05UUk9MX1FVSUNLX1NUQVJUX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlRfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ESVJFQ1RJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgREVfQ09OVFJPTF9ESVJFQ1RJT05fTEVGVF9UT19SSUdIVCAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTl9SSUdIVF9UT19MRUZUICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTUFKT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERFX0NPTlRST0xfTUFKT1JfWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWF9QT1NJVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YX05FR0FUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1lfUE9TSVRJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWV9ORUdBVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU1RSRVRDSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIERFX0NPTlRST0xfU1RSRVRDSF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0hPU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBERV9DT05UUk9MX0hPU1RfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVF9NT05PICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9MQVNUX1BJWEVMICAgICAgICAgICAgICAgICAgICAgICAgICAgMjE6MjEKKyNkZWZpbmUgREVfQ09OVFJPTF9MQVNUX1BJWEVMX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUxfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9CSVRCTFQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1JFQ1RBTkdMRV9GSUxMICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfREVfVElMRSAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9UUkFQRVpPSURfRklMTCAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0FMUEhBX0JMRU5EICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUkxFX1NUUklQICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9TSE9SVF9TVFJPS0UgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0xJTkVfRFJBVyAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9XUklURSAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1JFQUQgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfV1JJVEVfQk9UVE9NX1VQICAgICAgICAgMTAKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1JPVEFURSAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0ZPTlQgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1RFWFRVUkVfTE9BRCAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1BfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1BfU0VMRUNUX1JPUDMgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1RfUk9QMiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUk9QMl9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIERFX0NPTlRST0xfUk9QMl9TT1VSQ0VfQklUTUFQICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRV9QQVRURVJOICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV9OT1RfUEFDS0VEICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzhfUEFDS0VEICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfMTZfUEFDS0VEICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV8zMl9QQUNLRUQgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIERFX0NPTlRST0xfUkVQRUFUX1JPVEFURSAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIERFX0NPTlRST0xfUkVQRUFUX1JPVEFURV9ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9NQVRDSCAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9NQVRDSF9PUEFRVUUgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIX1RSQU5TUEFSRU5UICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX1NFTEVDVF9TT1VSQ0UgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUX0RFU1RJTkFUSU9OICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWSAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfRElTQUJMRSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9FTkFCTEUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUk9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisvKiBQc2V1ZG8gZmllbGRzLiAqLworCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUiAgICAgICAgICAgICAgICAgICAgIDI3OjI0CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8yMjUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzEzNSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMzE1ICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl80NSAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzI3MCAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfOTAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8xODAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjQKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzI3MCAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fOTAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl8xODAgICAgICAgICAgICAgICAgICAgICAgICAgMworCisjZGVmaW5lIERFX1BJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDEwCisjZGVmaW5lIERFX1BJVENIX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX1BJVENIX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9GT1JFR1JPVU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAxNAorI2RlZmluZSBERV9GT1JFR1JPVU5EX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfQkFDS0dST1VORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMTgKKyNkZWZpbmUgREVfQkFDS0dST1VORF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDFDCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWFkgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWFlfTk9STUFMICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWV9PVkVSV1JJVEUgICAgICAgICAgMQorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1kgICAgICAgICAgICAgICAgICAgICAyOToyNworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1ggICAgICAgICAgICAgICAgICAgICAyNToyMworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVQgICAgICAgICAgICAgICAgICAyMToyMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF8xNiAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzMyICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9BRERSRVNTSU5HICAgICAgICAgICAgICAgICAgICAxOToxNgorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9BRERSRVNTSU5HX1hZICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfTElORUFSICAgICAgICAgICAgIDE1CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1NPVVJDRV9IRUlHSFQgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAyMAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfQ09MT1JfQ09NUEFSRV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMjQKKyNkZWZpbmUgREVfQ09MT1JfQ09NUEFSRV9NQVNLX01BU0tTICAgICAgICAgICAgICAgICAgICAgMjM6MAorCisjZGVmaW5lIERFX01BU0tTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDI4CisjZGVmaW5lIERFX01BU0tTX0JZVEVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX01BU0tTX0JJVF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBERV9DTElQX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAyQworI2RlZmluZSBERV9DTElQX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9DTElQX1RMX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBERV9DTElQX1RMX1NUQVRVU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9JTkhJQklUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgREVfQ0xJUF9UTF9JTkhJQklUX09VVFNJREUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfSU5TSURFICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NMSVBfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBERV9DTElQX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAzMAorI2RlZmluZSBERV9DTElQX0JSX0JPVFRPTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9DTElQX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMzQKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0xPV19QQVRURVJOICAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX01PTk9fUEFUVEVSTl9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDM4CisjZGVmaW5lIERFX01PTk9fUEFUVEVSTl9ISUdIX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9XSU5ET1dfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAzQworI2RlZmluZSBERV9XSU5ET1dfV0lEVEhfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9XSU5ET1dfV0lEVEhfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNDAKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0UgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNDQKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0NTICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0NTXzAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9BRERSRVNTICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgREVfQUxQSEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNDgKKyNkZWZpbmUgREVfQUxQSEFfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgREVfV1JBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNEMKKyNkZWZpbmUgREVfV1JBUF9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfV1JBUF9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDUwCisjZGVmaW5lIERFX1NUQVRVU19DU0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU19DU0NfTk9UX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVEFUVVNfMkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgREVfU1RBVFVTXzJEX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfMkRfTk9UX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU18yRF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNlbmRpZgorLyogQ29sb3IgU3BhY2UgQ29udmVyc2lvbiByZWdpc3RlcnMuICovCisKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwQzgKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1NDX0NPTlNUQU5UUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwQ0MKKyNkZWZpbmUgQ1NDX0NPTlNUQU5UU19ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MjQKKyNkZWZpbmUgQ1NDX0NPTlNUQU5UU19SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgQ1NDX0NPTlNUQU5UU19HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6OAorI2RlZmluZSBDU0NfQ09OU1RBTlRTX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBDU0NfWV9TT1VSQ0VfWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBEMAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWF9JTlRFR0VSICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWF9GUkFDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAxNTozCisKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRDQKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX1lfSU5URUdFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX1lfRlJBQ1RJT04gICAgICAgICAgICAgICAgICAgICAgICAgMTU6MworCisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEQ4CisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMERDCisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIENTQ19TT1VSQ0VfRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEUwCisjZGVmaW5lIENTQ19TT1VSQ0VfRElNRU5TSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19TT1VSQ0VfRElNRU5TSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfU09VUkNFX1BJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBFNAorI2RlZmluZSBDU0NfU09VUkNFX1BJVENIX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBDU0NfU09VUkNFX1BJVENIX1VWICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRTgKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1dSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1dSQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fV1JBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT05fRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBFQworI2RlZmluZSBDU0NfREVTVElOQVRJT05fRElNRU5TSU9OX1ggICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBDU0NfREVTVElOQVRJT05fRElNRU5TSU9OX1kgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1BJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRjAKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1BJVENIX1ggICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1BJVENIX1kgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENTQ19TQ0FMRV9GQUNUT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEY0CisjZGVmaW5lIENTQ19TQ0FMRV9GQUNUT1JfSE9SSVpPTlRBTCAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19TQ0FMRV9GQUNUT1JfVkVSVElDQUwgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBGOAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9FWFQgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9DU18xICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBDU0NfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBGQworI2RlZmluZSBDU0NfQ09OVFJPTF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDU0NfQ09OVFJPTF9TVEFUVVNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19DT05UUk9MX1NUQVRVU19TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0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hPUklaT05UQUxfRklMVEVSX0VOQUJMRSAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0xfVkVSVElDQUxfRklMVEVSICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgQ1NDX0NPTlRST0xfVkVSVElDQUxfRklMVEVSX0RJU0FCTEUgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfQ09OVFJPTF9WRVJUSUNBTF9GSUxURVJfRU5BQkxFICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19DT05UUk9MX0JZVEVfT1JERVIgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIENTQ19DT05UUk9MX0JZVEVfT1JERVJfWVVZViAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0NPTlRST0xfQllURV9PUkRFUl9VWVZZICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIERFX0RBVEFfUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTEwMDAwCisKKyNkZWZpbmUgSTJDX0JZVEVfQ09VTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDAKKyNkZWZpbmUgSTJDX0JZVEVfQ09VTlRfQ09VTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzowCisKKyNkZWZpbmUgSTJDX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDEKKyNkZWZpbmUgSTJDX0NUUkxfSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEkyQ19DVFJMX0lOVF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX0NUUkxfSU5UX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfQ1RSTF9ESVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSTJDX0NUUkxfRElSX1dSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9ESVJfUkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19DVFJMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJMkNfQ1RSTF9DVFJMX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19DVFJMX0NUUkxfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX0NUUkxfTU9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEkyQ19DVFJMX01PREVfU1RBTkRBUkQgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX0NUUkxfTU9ERV9GQVNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfQ1RSTF9FTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSTJDX0NUUkxfRU5fRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9FTl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSTJDX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDIKKyNkZWZpbmUgSTJDX1NUQVRVU19UWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIEkyQ19TVEFUVVNfVFhfUFJPR1JFU1MgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX1NUQVRVU19UWF9DT01QTEVURUQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfVFhfRE9ORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4CisjZGVmaW5lIEkyQ19TVEFUVVNfRVJSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJMkNfU1RBVFVTX0VSUl9OT1JNQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfRVJSX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX1NUQVRVU19FUlJfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfU1RBVFVTX0FDSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgSTJDX1NUQVRVU19BQ0tfUkVDRUlWRUQgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfU1RBVFVTX0FDS19OT1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19TVEFUVVNfQlNZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBJMkNfU1RBVFVTX0JTWV9JRExFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfQlNZX0JVU1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJMkNfUkVTRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MgorI2RlZmluZSBJMkNfUkVTRVRfQlVTX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgSTJDX1JFU0VUX0JVU19FUlJPUl9DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgMAorCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDQzCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDc6MQorI2RlZmluZSBJMkNfU0xBVkVfQUREUkVTU19SVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSTJDX1NMQVZFX0FERFJFU1NfUldfVyAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfU0xBVkVfQUREUkVTU19SV19SICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSTJDX0RBVEEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDQKKyNkZWZpbmUgSTJDX0RBVEExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDUKKyNkZWZpbmUgSTJDX0RBVEEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDYKKyNkZWZpbmUgSTJDX0RBVEEzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDcKKyNkZWZpbmUgSTJDX0RBVEE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDgKKyNkZWZpbmUgSTJDX0RBVEE1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDkKKyNkZWZpbmUgSTJDX0RBVEE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEEKKyNkZWZpbmUgSTJDX0RBVEE3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEIKKyNkZWZpbmUgSTJDX0RBVEE4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEMKKyNkZWZpbmUgSTJDX0RBVEE5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEQKKyNkZWZpbmUgSTJDX0RBVEExMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEUKKyNkZWZpbmUgSTJDX0RBVEExMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNEYKKyNkZWZpbmUgSTJDX0RBVEExMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNTAKKyNkZWZpbmUgSTJDX0RBVEExMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNTEKKyNkZWZpbmUgSTJDX0RBVEExNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNTIKKyNkZWZpbmUgSTJDX0RBVEExNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNTMKKworCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRklFTERfSU5QVVQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRklFTERfSU5QVVRfRVZFTl9GSUVMRCAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GSUVMRF9JTlBVVF9PRERfRklFTEQgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1NDQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1NDQU5fUFJPR1JFU1NJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfU0NBTl9JTlRFUkxBQ0UgICAgICAgICA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gICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WU0tfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hTS19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFNLX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GRF9SSVNJTkcgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZEX0ZBTExJTkcgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfVlAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfVlBfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFBfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfVVZTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfVVZTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9VVlNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQlNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ1NfMTYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DU184ICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NGICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DRl9ZVVYgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NGX1JHQiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRlNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9XRUFWRSAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfV0VBVkVfRElTQUJMRSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9XRUFWRV9FTkFCTEUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JPQiAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9CT0JfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JPQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfREIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0RCX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfREJfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0NfQ09OVElOVUUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQ19DT05ESVRJT04gICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1JHQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9SR0JfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1JHQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfNjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMXzY1Nl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfNjU2X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0FQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDA0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVBfWUNMSVBfRVZFTl9GSUVMRCAgICAgICAgICAgICAgICAyNToxNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DTElQX1lDTElQICAgICAgICAgICAgICAgICAgICAgICAgICAyNToxNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DTElQX1hDTElQICAgICAgICAgICAgICAgICAgICAgICAgICA5OjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAwOAorI2RlZmluZSBaVjBfQ0FQVFVSRV9TSVpFX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9TSVpFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMEMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfQ1MgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfQ1NfMCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19DU18xICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JV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U0VUX09GRlNFVCAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMTgKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgMjowCisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18yICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzMgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNCAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT181ICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzYgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNyAgICAgICAgICAgICAgICAgICAgNworCisjZGVmaW5lIFpWMF9DQVBUVVJFX1lSR0JfQ09OU1QgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDFDCisjZGVmaW5lIFpWMF9DQVBUVVJFX1lSR0JfQ09OU1RfWSAgICAgICAgICAgICAgICAgICAgICAgIDMxOjI0CisjZGVmaW5lIFpWMF9DQVBUVVJFX1lSR0JfQ09OU1RfUiAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX1lSR0JfQ09OU1RfRyAgICAgICAgICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9CICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfTElORV9DT01QICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMjAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfTElORV9DT01QX0xDICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisvKiBaVjEgKi8KKworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAwMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZJRUxEX0lOUFVUICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZJRUxEX0lOUFVUX0VWRU5fRklFTEQgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRklFTERfSU5QVVRfT0REX0ZJRUxEICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9TQ0FOICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9TQ0FOX1BST0dSRVNTSVZFICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1NDQU5fSU5URVJMQUNFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1VSUkVOVF9CVUZGRVIgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1VSUkVOVF9CVUZGRVJfMCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DVVJSRU5UX0JVRkZFUl8xICAgICAgICAgICA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ICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZTS19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSFNLICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSFNLX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IU0tfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZEX1JJU0lORyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRkRfRkFMTElORyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9WUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9WUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSFBfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1BfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9VVlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9VVlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1VWU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DU18xNiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NTXzggICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0YgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NGX1lVViAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0ZfUkdCICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1dFQVZFICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9XRUFWRV9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1dFQVZFX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQk9CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0JPQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQk9CX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfREJfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9EQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DQ19DT05USU5VRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NDX0NPTkRJVElPTiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUkdCICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1JHQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUkdCX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF82NTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfNjU2X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF82NTZfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ0xJUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMDQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ0xJUF9ZQ0xJUCAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MTYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ0xJUF9YQ0xJUCAgICAgICAgICAgICAgICAgICAgICAgICAgOTowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfU0laRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMDgKKyNkZWZpbmUgWlYxX0NBUFRVUkVfU0laRV9IRUlHSFQgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfU0laRV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDBDCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAxMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19DUyAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19DU18wICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0NTXzEgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMTQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGX09GRlNFVF9PRkZTRVQgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDE4CisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgICAgIDI6MAorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18wICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzEgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMiAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18zICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzQgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNSAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT182ICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzcgICAgICAgICAgICAgICAgICAgIDcKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9ZUkdCX0NPTlNUICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAxQworI2RlZmluZSBaVjFfQ0FQVFVSRV9ZUkdCX0NPTlNUX1kgICAgICAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9ZUkdCX0NPTlNUX1IgICAgICAgICAgICAgICAgICAgICAgICAyMzoxNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9ZUkdCX0NPTlNUX0cgICAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfQiAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIERNQV8xX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEQwMDEwCisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTU19DUyAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTU19DU18wICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0NTXzEgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEQwMDE0CisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIERNQV8xX1NJWkVfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEQwMDE4CisjZGVmaW5lIERNQV8xX1NJWkVfQ09OVFJPTF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERNQV8xX1NJWkVfQ09OVFJPTF9TVEFUVVNfSURMRSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MX1NUQVRVU19BQ1RJVkUgICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9TSVpFX0NPTlRST0xfU0laRSAgICAgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMjAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9BQk9SVF8xICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfQUJPUlRfMV9FTkFCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9BQk9SVF8xX0FCT1JUICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9BQk9SVF8wX0VOQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzBfQUJPUlQgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfSU5UXzEgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0lOVF8xX0NMRUFSICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfSU5UXzFfRklOSVNIRUQgICAgICAgICAgICAgIDEKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMCAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfSU5UXzBfQ0xFQVIgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMF9GSU5JU0hFRCAgICAgICAgICAgICAgMQorCisKKworCisKKy8qIERlZmF1bHQgaTJjIENMSyBhbmQgRGF0YSBHUElPLiBUaGVzZSBhcmUgdGhlIGRlZmF1bHQgaTJjIHBpbnMgKi8KKyNkZWZpbmUgREVGQVVMVF9JMkNfU0NMICAgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgREVGQVVMVF9JMkNfU0RBICAgICAgICAgICAgICAgICAgICAgMzEKKworCisjZGVmaW5lIEdQSU9fREFUQV9TTTc1MExFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDIwMDE4CisjZGVmaW5lIEdQSU9fREFUQV9TTTc1MExFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBHUElPX0RBVEFfU003NTBMRV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OX1NNNzUwTEUgICAgICAgICAgICAgICAgICAgICAweDAyMDAxQworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OX1NNNzUwTEVfMSAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl9TTTc1MExFXzFfSU5QVVQgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OX1NNNzUwTEVfMV9P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GxlciBjaGlwLgorICoKKyAqICBPdXRwdXQ6CisgKiAgICAgIERldmljZSBJRAorICovCit1bnNpZ25lZCBzaG9ydCBzaWkxNjRHZXREZXZpY2VJRCh2b2lkKQoreworICAgIHVuc2lnbmVkIHNob3J0IGRldmljZUlEOworCisgICAgZGV2aWNlSUQgPSAoKHVuc2lnbmVkIHNob3J0KSBpMmNSZWFkUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0RFVklDRV9JRF9ISUdIKSA8PCA4KSB8CisgICAgICAgICAgICAgICAgKHVuc2lnbmVkIHNob3J0KSBpMmNSZWFkUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0RFVklDRV9JRF9MT1cpOworCisgICAgcmV0dXJuIGRldmljZUlEOworfQorCisKKworLyogRFZJLkMgd2lsbCBoYW5kbGUgYWxsIFNpSTE2NCBjaGlwIHN0dWZmcyBhbmQgdHJ5IGl0IGJlc3QgdG8gbWFrZSBjb2RlIG1pbmltYWwgYW5kIHVzZWZ1bCAqLworCisvKgorICogIHNpaTE2NEluaXRDaGlwCisgKiAgICAgIFRoaXMgZnVuY3Rpb24gaW5pdGlhbGl6ZSBhbmQgZGV0ZWN0IHRoZSBEVkkgY29udHJvbGxlciBjaGlwLgorICoKKyAqICBJbnB1dDoKKyAqICAgICAgZWRnZVNlbGVjdCAgICAgICAgICAtIEVkZ2UgU2VsZWN0OgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gSW5wdXQgZGF0YSBpcyBmYWxsaW5nIGVkZ2UgbGF0Y2hlZCAoZmFsbGluZyBlZGdlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXRjaGVkIGZpcnN0IGluIGR1YWwgZWRnZSBtb2RlKQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gSW5wdXQgZGF0YSBpcyByaXNpbmcgZWRnZSBsYXRjaGVkIChyaXNpbmcgZWRnZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF0Y2hlZCBmaXJzdCBpbiBkdWFsIGVkZ2UgbW9kZSkKKyAqICAgICAgYnVzU2VsZWN0ICAgICAgICAgICAtIElucHV0IEJ1cyBTZWxlY3Q6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBJbnB1dCBkYXRhIGJ1cyBpcyAxMi1iaXRzIHdpZGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IElucHV0IGRhdGEgYnVzIGlzIDI0LWJpdHMgd2lkZQorICogICAgICBkdWFsRWRnZUNsa1NlbGVjdCAgIC0gRHVhbCBFZGdlIENsb2NrIFNlbGVjdAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gSW5wdXQgZGF0YSBpcyBzaW5nbGUgZWRnZSBsYXRjaGVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSBJbnB1dCBkYXRhIGlzIGR1YWwgZWRnZSBsYXRjaGVkCisgKiAgICAgIGhzeW5jRW5hYmxlICAgICAgICAgLSBIb3Jpem9udGFsIFN5bmMgRW5hYmxlOgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gSFNZTkMgaW5wdXQgaXMgdHJhbnNtaXR0ZWQgYXMgZml4ZWQgTE9XCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSBIU1lOQyBpbnB1dCBpcyB0cmFuc21pdHRlZCBhcyBpcworICogICAgICB2c3luY0VuYWJsZSAgICAgICAgIC0gVmVydGljYWwgU3luYyBFbmFibGU6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBWU1lOQyBpbnB1dCBpcyB0cmFuc21pdHRlZCBhcyBmaXhlZCBMT1cKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IFZTWU5DIGlucHV0IGlzIHRyYW5zbWl0dGVkIGFzIGlzCisgKiAgICAgIGRlc2tld0VuYWJsZSAgICAgICAgLSBEZS1za2V3aW5nIEVuYWJsZToKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IERlLXNrZXcgZGlzYWJsZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IERlLXNrZXcgZW5hYmxlZAorICogICAgICBkZXNrZXdTZXR0aW5nICAgICAgIC0gRGUtc2tld2luZyBTZXR0aW5nIChpbmNyZW1lbnQgb2YgMjYwcHNlYykKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IDEgc3RlcCAtLT4gbWluaW11bSBzZXR1cCAvIG1heGltdW0gaG9sZAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gMiBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgPSAzIHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMyA9IDQgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ID0gNSBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUgPSA2IHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiA9IDcgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3ID0gOCBzdGVwIC0tPiBtYXhpbXVtIHNldHVwIC8gbWluaW11bSBob2xkCisgKiAgICAgIGNvbnRpbnVvdXNTeW5jRW5hYmxlLSBTWU5DIENvbnRpbnVvdXM6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBEaXNhYmxlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSBFbmFibGUKKyAqICAgICAgcGxsRmlsdGVyRW5hYmxlICAgICAtIFBMTCBGaWx0ZXIgRW5hYmxlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBEaXNhYmxlIFBMTCBGaWx0ZXIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IEVuYWJsZSBQT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NMLCBERUZBVUxUX0kyQ19TREEpOworI2VuZGlmCisKKyAgICAvKiBDaGVjayBpZiBTSUkxNjQgQ2hpcCBleGlzdHMgKi8KKyAgICBpZiAoKHNpaTE2NEdldFZlbmRvcklEKCkgPT0gU0lJMTY0X1ZFTkRPUl9JRCkgJiYgKHNpaTE2NEdldERldmljZUlEKCkgPT0gU0lJMTY0X0RFVklDRV9JRCkpCisgICAgeworCisjaWZkZWYgRERLREVCVUcKKyAgICAgICAgLy9zaWkxNjRQcmludFJlZ2lzdGVyVmFsdWVzKCk7CisjZW5kaWYKKyAgICAgICAgLyoKKyAgICAgICAgICogIEluaXRpYWxpemUgU0lJMTY0IGNvbnRyb2xsZXIgY2hpcC4KKyAgICAgICAgICovCisKKyAgICAgICAgLyogU2VsZWN0IHRoZSBlZGdlICovCisgICAgICAgIGlmIChlZGdlU2VsZWN0ID09IDApCisgICAgICAgICAgICBjb25maWcgPSBTSUkxNjRfQ09ORklHVVJBVElPTl9MQVRDSF9GQUxMSU5HOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgPSBTSUkxNjRfQ09ORklHVVJBVElPTl9MQVRDSF9SSVNJTkc7CisKKyAgICAgICAgLyogU2VsZWN0IGJ1cyB3aWRlICovCisgICAgICAgIGlmIChidXNTZWxlY3QgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9CVVNfMTJCSVRTOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0NPTkZJR1VSQVRJT05fQlVTXzI0QklUUzsKKworICAgICAgICAvKiBTZWxlY3QgRHVhbC9TaW5nbGUgRWRnZSBDbG9jayAqLworICAgICAgICBpZiAoZHVhbEVkZ2VDbGtTZWxlY3QgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9DTE9DS19TSU5HTEU7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9DTE9DS19EVUFMOworCisgICAgICAgIC8qIFNlbGVjdCBIU3luYyBFbmFibGUgKi8KKyAgICAgICAgaWYgKGhzeW5jRW5hYmxlID09IDApCisgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0NPTkZJR1VSQVRJT05fSFNZTkNfRk9SQ0VfTE9XOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0NPTkZJR1VSQVRJT05fSFNZTkNfQVNfSVM7CisKKyAgICAgICAgLyogU2VsZWN0IFZTeW5jIEVuYWJsZSAqLworICAgICAgICBpZiAodnN5bmNFbmFibGUgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9WU1lOQ19GT1JDRV9MT1c7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9WU1lOQ19BU19JUzsKKworICAgICAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9DT05GSUdVUkFUSU9OLCBjb25maWcpOworCisgICAgICAgIC8qIERlLXNrZXcgZW5hYmxlZCB3aXRoIGRlZmF1bHQgMTExYiB2YWx1ZS4KKyAgICAgICAgICAgVGhpcyB3aWxsIGZpeCBzb21lIGFydGlmYWN0cyBwcm9ibGVtIGluIHNvbWUgbW9kZSBvbiBib2FyZCAyLjIuCisgICAgICAgICAgIFNvbWVob3cgdGhpcyBmaXggZG9lcyBub3QgYWZmZWN0IGJvYXJkIDIuMS4KKyAgICAgICAgICovCisgICAgICAgIGlmIChkZXNrZXdFbmFibGUgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9ERVNLRVdfRElTQUJMRTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY29uZmlnID0gU0lJMTY0X0RFU0tFV19FTkFCTEU7CisKKyAgICAgICAgc3dpdGNoIChkZXNrZXdTZXR0aW5nKQorICAgICAgICB7CisgICAgICAgICAgICBjYXNlIDA6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfMV9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxOgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzJfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV18zX1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDM6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfNF9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0OgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzVfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNToKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV182X1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDY6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfN19TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3OgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzhfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9ERVNLRVcsIGNvbmZpZyk7CisKKyAgICAgICAgLyogRW5hYmxlL0Rpc2FibGUgQ29udGludW91cyBTeW5jLiAqLworICAgICAgICBpZiAoY29udGludW91c1N5bmNFbmFibGUgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9QTExfRklMVEVSX1NZTkNfQ09OVElOVU9VU19ESVNBQkxFOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgPSBTSUkxNjRfUExMX0ZJTFRFUl9TWU5DX0NPTlRJTlVPVVNfRU5BQkxFOworCisgICAgICAgIC8qIEVuYWJsZS9EaXNhYmxlIFBMTCBGaWx0ZXIgKi8KKyAgICAgICAgaWYgKHBsbEZpbHRlckVuYWJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9QTExfRklMVEVSX0RJU0FCTEU7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfUExMX0ZJTFRFUl9FTkFCTEU7CisKKyAgICAgICAgLyogU2V0IHRoZSBQTEwgRmlsdGVyIHZhbHVlICovCisgICAgICAgIGNvbmZpZyB8PSAoKHBsbEZpbHRlclZhbHVlICYgMHgwNykgPDwgMSk7CisKKyAgICAgICAgaTJjV3JpdGVSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfUExMLCBjb25maWcpOworCisgICAgICAgIC8qIFJlY292ZXIgZnJvbSBQb3dlciBEb3duIGFuZCBlbmFibGUgb3V0cHV0LiAqLworICAgICAgICBjb25maWcgPSBpMmNSZWFkUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0NPTkZJR1VSQVRJT04pOworICAgICAgICBjb25maWcgfD0gU0lJMTY0X0NPTkZJR1VSQVRJT05fUE9XRVJfTk9STUFMOworICAgICAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9DT05GSUdVUkFUSU9OLCBjb25maWcpOworCisjaWZkZWYgRERLREVCVUcKKyAgICAgICAgLy9zaWkxNjRQcmludFJl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wCisgKi8KK3ZvaWQgc2lpMTY0U2V0UG93ZXIoCisgICAgdW5zaWduZWQgY2hhciBwb3dlclVwCispCit7CisgICAgdW5zaWduZWQgY2hhciBjb25maWc7CisKKyAgICBjb25maWcgPSBpMmNSZWFkUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0NPTkZJR1VSQVRJT04pOworICAgIGlmIChwb3dlclVwID09IDEpCisgICAgeworICAgICAgICAvKiBQb3dlciB1cCB0aGUgY2hpcCAqLworICAgICAgICBjb25maWcgJj0gflNJSTE2NF9DT05GSUdVUkFUSU9OX1BPV0VSX01BU0s7CisgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9OT1JNQUw7CisgICAgICAgIGkyY1dyaXRlUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0NPTkZJR1VSQVRJT04sIGNvbmZpZyk7CisgICAgfQorICAgIGVsc2UKKyAgICB7CisgICAgICAgIC8qIFBvd2VyIGRvd24gdGhlIGNoaXAgKi8KKyAgICAgICAgY29uZmlnICY9IH5TSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9NQVNLOworICAgICAgICBjb25maWcgfD0gU0lJMTY0X0NPTkZJR1VSQVRJT05fUE9XRVJfRE9XTjsKKyAgICAgICAgaTJjV3JpdGVSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfQ09ORklHVVJBVElPTiwgY29uZmlnKTsKKyAgICB9Cit9CisKKworLyoKKyAqICBzaWkxNjRTZWxlY3RIb3RQbHVnRGV0ZWN0aW9uTW9kZQorICogICAgICBUaGlzIGZ1bmN0aW9uIHNlbGVjdHMgdGhlIG1vZGUgb2YgdGhlIGhvdCBwbHVnIGRldGVjdGlvbi4KKyAqLworc3RhdGljIHZvaWQgc2lpMTY0U2VsZWN0SG90UGx1Z0RldGVjdGlvbk1vZGUoCisgICAgc2lpMTY0X2hvdF9wbHVnX21vZGVfdCBob3RQbH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gICAgICAgICAgICAgICAweDA3CisKKy8qCisgKiBQb3dlciBEb3duIGFuZCBJbnB1dCBTaWduYWwgQ29uZmlndXJhdGlvbiByZWdpc3RlcnMKKyAqLworI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTiAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgKKworLyogUG93ZXIgZG93biAoUEQpICovCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX1BPV0VSX0RPV04gICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9OT1JNQUwgICAgICAgICAgIDB4MDEKKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fUE9XRVJfTUFTSyAgICAgICAgICAgICAweDAxCisKKy8qIElucHV0IEVkZ2UgTGF0Y2ggU2VsZWN0IChFREdFKSAqLworI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9MQVRDSF9GQUxMSU5HICAgICAgICAgIDB4MDAKKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fTEFUQ0hfUklTSU5HICAgICAgICAgICAweDAyCisKKy8qIEJ1cyBTZWxlY3QgKEJTRUwpICovCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX0JVU18xMkJJVFMgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9CVVNfMjRCSVRTICAgICAgICAgICAgIDB4MDQKKworLyogRHVhbCBFZGdlIENsb2NrIFNlbGVjdCAoRFNFTCkgKi8KKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fQ0xPQ0tfU0lOR0xFICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX0NMT0NLX0RVQUwgICAgICAgICAgICAgMHgwOAorCisvKiBIb3Jpem9udGFsIFN5bmMgRW5hYmxlIChIRU4pICovCisjZGVmaW5lIFNJST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aW5lIFNJSTE2NF9ERVNLRVdfR0VORVJBTF9QVVJQT1NFX0lOUFVUX01BU0sgICAgMHgwRQorCisvKiBEZS1za2V3aW5nIEVuYWJsZSBiaXQgKERLRU4pICovCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfREVTS0VXX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworLyogRGUtc2tld2luZyBTZXR0aW5nIChES1szOjFdKSovCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfMV9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzJfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV18zX1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfNF9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHg2MAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzVfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV182X1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweEEwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfN19TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzhfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4RTAKKworLyoKKyAqIFVzZXIgQ29uZmlndXJhdGlvbiBEYXRhIHJlZ2lzdGVycyAoQ0ZHIDc6MCkKKyAqLworI2RlZmluZSBTSUkxNjRfVVNFUl9DT05GSUdVUkFUSU9OICAgICAgICAgICAgICAgICAgIDB4MEIKKworLyoKKyAqIFBMTCByZWdpc3RlcnMKKyAqLworI2RlZmluZSBTSUkxNjR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0IGlzIHByb2hpYml0ZWQKKyogIHdpdGhvdXQgdGhlIHdyaXR0ZW4gY29uc2VudCBvZiB0aGUgY29weXJpZ2h0IG93bmVyLgorKgorKiAgc3dpMmMuYyAtLS0gU003NTAvU003MTggRERLCisqICBUaGlzIGZpbGUgY29udGFpbnMgdGhlIHNvdXJjZSBjb2RlIGZvciBJMkMgdXNpbmcgc29mdHdhcmUKKyogIGltcGxlbWVudGF0aW9uLgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpbmNsdWRlICJkZGs3NTBfaGVscC5oIgorI2luY2x1ZGUgImRkazc1MF9yZWcuaCIKKyNpbmNsdWRlICJkZGs3NTBfc3dpMmMuaCIKKyNpbmNsdWRlICJkZGs3NTBfcG93ZXIuaCIKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogSTJDIFNvZnR3YXJlIE1hc3RlciBEcml2ZXI6CisgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIEVhY2ggaTJjIGN5Y2xlIGlzIHNwbGl0IGludG8gNCBzZWN0aW9ucy4gRWFjaCBvZiB0aGVzZSBzZWN0aW9uIG1hcmtzCisgKiBhIHBvaW50IGluIHRpbWUgd2hlcmUgdGhlIFNDTCBvciBTREEgbWF5IGJlIGNoYW5nZWQuCisgKgorICogMSBDeWNsZSA9PSB8ICBTZWN0aW9uIEkuIHwgIFNlY3Rpb24gMi4gfCAgU2VjdGlvbiAzLiB8ICBTZWN0aW9uIDQuIHwKKyAqICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgIHwgU0NMIHNldCBMT1cgfFNDTCBubyBjaGFuZ2V8IFNDTCBzZXQgSElHSHxTQ0wgbm8gY2hhbmdlfAorICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19fX19fX19fX19fIF9fX19fX19fX19fX18KKyAqIFNDTCA9PSBYWFhYIF9fX19fX19fX19fX18gX19fX19fX19fX19fIC8KKyAqCisgKiBJLmUuIHRoZSBTQ0wgbWF5IG9ubHkgYmUgY2hhbmdlZCBpbiBzZWN0aW9uIDEuIGFuZCBzZWN0aW9uIDMuIHdoaWxlCisgKiB0aGUgU0RBIG1heSBvbmx5IGJlIGNoYW5nZWQgaW4gc2VjdGlvbiAyLiBhbmQgc2VjdGlvbiA0LiBUaGUgdGFibGUKKyAqIGJlbG93IGdpdmVzIHRoZSBjaGFuZ2VzIGZvciB0aGVzZSAyIGxpbmVzIGluIHRoZSB2YXJpb3Mgc2VjdGlvbnMuCisgKgorICogU2VjdGlvbiBjaGFuZ2VzIFRhYmxlOgorICogPT09PT09PT09PT09PT09PT09PT09PQorICogYmxhbmsgPSBubyBjaGFuZ2UsIEwgPSBzZXQgYml0IExPVywgSCA9IHNldCBiaXQgSElHSAorICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDEufCAyLnwgMy58IDQufAorICogICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLSstLS0rLS0tKy0tLSstLS0rCisgKiAgICAgICAgICAgICAgICAgVHggU3RhcnQgICBTREEgfCAgIHwgSCB8ICAgfCBMIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNDTCB8IEwgfCAgIHwgSCB8ICAgfAorICogICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLSstLS0rLS0tKy0tLSstLS0rCisgKiAgICAgICAgICAgICAgICAgVHggU3RvcCAgICBTREEgfCAgIHwgTCB8ICAgfCBIIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNDTCB8IEwgfCAgIHwgSCB8ICAgfAorICogICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLSstLS0rLS0tKy0tLSstLS0rCisgKiAgICAgICAgICAgICAgICAgVHggYml0IEggICBTREEgfCAgIHwgSCB8ICAgfCAgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNDTCB8IEwgfCAgIHwgSCB8ICAgfAorICogICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLSstLS0rLS0tKy0tLSstLS0rCisgKiAgICAgICAgICAgICAgICAgVHggYml0IEwgICBTREEgfCAgIHwgTCB8ICAgfCAgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNDTCB8IEwgfCAgIHwgSCB8ICAgfAorICogICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLSstLS0rLS0tKy0tLSstLS0rCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogR1BJTyBwaW5zIHVzZWQgZm9yIHRoaXMgSTJDLiBJdCByYW5nZXMgZnJvbSAwIHRvIDYzLiAqLworc3RhdGljIHVuc2lnbmVkIGNoYXIgZ19pMmNDbG9ja0dQSU8gPSBERUZBVUxUX0kyQ19TQ0w7CitzdGF0aWMgdW5zaWduZWQgY2hhciBnX2kyY0RhdGFHUElPID0gREVGQVVMVF9JMkNfU0RBOworCisvKgorICogIEJlbG93IGlzIHRoZSB2YXJpYWJsZSBkZWNsYXJhdGlvbiBmb3IgdGhlIEdQSU8gcGluIHJlZ2lzdGVyIHVzYWdlCisgKiAgZm9yIHRoZSBpMmMgQ2xvY2sgYW5kIGkyYyBEYXRhLgorICoKKyAqICBOb3RlOgorICogICAgICBOb3RpY2UgdGhhdCB0aGUgR1BJTyB1c2FnZSBmb3IgdGhlIGkyYyBjbG9jayBhbmQgaTJjIERhdGEgYXJlCisgKiAgICAgIHNlcGFyYXRlZC4gVGhpcyBpcyB0byBtYWtlIHRoaXMgY29kZSBmbGV4aWJsZSBlbm91Z2ggd2hlbgorICogICAgICB0d28g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c2lnbmFsIHRvIGFsd2F5cyBoaWdoLgorICovCit2b2lkIHN3STJDU0NMKHVuc2lnbmVkIGNoYXIgdmFsdWUpCit7CisgICAgdW5zaWduZWQgbG9uZyB1bEdQSU9EYXRhOworICAgIHVuc2lnbmVkIGxvbmcgdWxHUElPRGlyZWN0aW9uOworCisgICAgdWxHUElPRGlyZWN0aW9uID0gUEVFSzMyKGdfaTJjQ2xrR1BJT0RhdGFEaXJSZWcpOworICAgIGlmICh2YWx1ZSkgICAgICAvKiBIaWdoICovCisgICAgeworICAgICAgICAvKiBTZXQgZGlyZWN0aW9uIGFzIGlucHV0LiBUaGlzIHdpbGwgYXV0b21hdGljYWxseSBwdWxsIHRoZSBzaWduYWwgdXAuICovCisgICAgICAgIHVsR1BJT0RpcmVjdGlvbiAmPSB+KDEgPDwgZ19pMmNDbG9ja0dQSU8pOworICAgICAgICBQT0tFMzIoZ19pMmNDbGtHUElPRGF0YURpclJlZywgdWxHUElPRGlyZWN0aW9uKTsKKyAgICB9CisgICAgZWxzZSAgICAgICAgICAgIC8qIExvdyAqLworICAgIHsKKyAgICAgICAgLyogU2V0IHRoZSBzaWduYWwgZG93biAqLworICAgICAgICB1bEdQSU9EYXRhID0gUEVFSzMyKGdfaTJjQ2xrR1BJT0RhdGFSZWcpOworICAgICAgICB1bEdQSU9EYXRhICY9IH4oMSA8PCBnX2kyY0Nsb2NrR1BJTyk7CisgICAgICAgIFBPS0UzMihnX2kyY0Nsa0dQSU9EYXRhUmVnLCB1bEdQSU9EYXRhKTsKKworICAgICAgICAvKiBTZXQgZGlyZWN0aW9uIGFzIG91dHB1dCAqLworICAgICAgICB1bEdQSU9EaXJlY3Rpb24gfD0gKDEgPDwgZ19pMmNDbG9ja0dQSU8pOworICAgICAgICBQT0tFMzIoZ19pMmNDbGtHUElPRGF0YURpclJlZywgdWxHUElPRGlyZWN0aW9uKTsKKyAgICB9Cit9CisKKy8qCisgKiAgVGhpcyBmdW5jdGlvbiBzZXQvcmVzZXQgd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TsKKworICAgIC8qIFNldCB0aGUgU0NMIEhpZ2ggZm9yIGFjayAqLworICAgIHN3STJDV2FpdCgpOworICAgIHN3STJDU0NMKDEpOworICAgIHN3STJDV2FpdCgpOworCisgICAgLyogUmVhZCBTREEsIHVudGlsIFNEQT09MCAqLworICAgIGZvcihpPTA7IGk8MHhmZjsgaSsrKQorICAgIHsKKyAgICAgICAgaWYgKCFzd0kyQ1JlYWRTREEoKSkKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIHN3STJDU0NMKDApOworICAgICAgICBzd0kyQ1dhaXQoKTsKKyAgICAgICAgc3dJMkNTQ0woMSk7CisgICAgICAgIHN3STJDV2FpdCgpOworICAgIH0KKworICAgIC8qIFNldCB0aGUgU0NMIExvdyBhbmQgU0RBIEhpZ2ggKi8KKyAgICBzd0kyQ1NDTCgwKTsKKyAgICBzd0kyQ1NEQSgxKTsKKworICAgIGlmIChpPDB4ZmYpCisgICAgICAgIHJldHVybiAwOworICAgIGVsc2UKKyAgICAgICAgcmV0dXJuIC0xOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gcmVhZHMgb25lIGJ5dGUgZnJvbSB0aGUgc2xhdmUgZGV2aWNlCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGFjayAgICAtIEZsYWcgdG8gaW5kaWNhdGUgZWl0aGVyIHRvIHNlbmQgdGhlIGFja25vd2xlZGdlCisgKiAgICAgICAgICAgIG1lc3NhZ2UgdG8gdGhlIHNsYXZlIGRldmljZSBvciBub3QKKyAqCisgKiAgUmV0dXJuIFZhbHVlOgorICogICAgICBPbmUgYnl0ZSBkYXRhIHJlYWQgZnJvbSB0aGUgU2xhdmUgZGV2aWNlCisgKi8KK3N0YXRpYyB1bnNpZ25lZCBjaGFyIHN3STJDUmVhZEJ5dGUodW5zaWduZWQgY2hhciBhY2spCit7CisgICAgaW50IGk7CisgICAgdW5zaWduZWQgY2hhciBkYXRhID0gMDsKKworICAgIGZvcihpPTc7IGk+PTA7IGktLSkKKyAgICB7CisgICAgICAgIC8qIFNldCB0aGUgU0NMIHRvIExvdyBhbmQgU0RBIHRvIEhpZ2ggKElucHV0KSAqLworICAgICAgICBzd0kyQ1NDTCgwKTsKKyAgICAgICAgc3dJMkNTREEoMSk7CisgICAgICAgIHN3STJDV2FpdCgpOworCisgICAgICAgIC8qIFNldCB0aGUgU0NMIEhpZ2ggKi8KKyAgICAgICAgc3dJMkNTQ0woMSk7CisgICAgICAgIHN3STJDV2FpdCgpOworCisgICAgICAgIC8qIFJlYWQgZGF0YSBiaXRzIGZyb20gU0RBICovCisgICAgICAgIGRhdGEgfD0gKHN3STJDUmVhZFNEQSgpIDw8IGkpOworICAgIH0KKworICAgIGlmIChhY2spCisgICAgICAgIHN3STJDQWNrKCk7CisKKyAgICAvKiBTZXQgdGhlIFNDTCBMb3cgYW5kIFNEQSBIaWdoICovCisgICAgc3dJMkNTQ0woMCk7CisgICAgc3dJMkNTREEoMSk7CisKKyAgICByZXR1cm4gZGF0YTsKK30KKworLyoKKyAqIFRoaXMgZnVuY3Rpb24gaW5pdGlhbGl6ZXMgR1BJTyBwb3J0IGZvciBTVyBJMkMgY29tbXVuaWNhdGlvbi4KKyAqCisgKiBQYXJhbWV0ZXJzOgorICogICAgICBpMmNDbGtHUElPICAgICAgLSBUaGUgR1BJTyBwaW4gdG8gYmUgdXNlZCBhcyBpMmMgU0NMCisgKiAgICAgIGkyY0RhdGFHUElPICAgICAtIFRoZSBHUElPIHBpbiB0byBiZSB1c2VkIGFzIGkyYyBTREEKKyAqCisgKiBSZXR1cm4gVmFsdWU6CisgKiAgICAgIC0xICAgLSBGYWlsIHRvIGluaXRpYWxpemUgdGhlIGkyYworICogICAgICAgMCAgIC0gU3VjY2VzcworICovCitzdGF0aWMgbG9uZyBzd0kyQ0luaXRfU003NTBMRSh1bnNpZ25lZCBjaGFyIGkyY0Nsa0dQSU8sCisJCQkgICAgICB1bnNpZ25lZCBjaGFyIGkyY0RhdGFHUElPKQoreworICAg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pbiBmb3IgdGhlIGkyYyBEYXRhIFJlZ2lzdGVyICovCisgICAgZ19pMmNEYXRhR1BJT011eFJlZyA9IEdQSU9fTVVYOworICAgIGdfaTJjRGF0YUdQSU9EYXRhUmVnID0gR1BJT19EQVRBOworICAgIGdfaTJjRGF0YUdQSU9EYXRhRGlyUmVnID0gR1BJT19EQVRBX0RJUkVDVElPTjsKKworICAgIC8qIEluaXRpYWxpemUgdGhlIERhdGEgR1BJTyBPZmZzZXQgKi8KKyAgICBnX2kyY0RhdGFHUElPID0gaTJjRGF0YUdQSU87CisKKyAgICAvKiBFbmFibGUgdGhlIEdQSU8gcGlucyBmb3IgdGhlIGkyYyBDbG9jayBhbmQgRGF0YSAoR1BJTyBNVVgpICovCisgICAgUE9LRTMyKGdfaTJjQ2xrR1BJT011eFJlZywKKyAgICAgICAgICAgICAgICAgICAgICBQRUVLMzIoZ19pMmNDbGtHUElPTXV4UmVnKSAmIH4oMSA8PCBnX2kyY0Nsb2NrR1BJTykpOworICAgIFBPS0UzMihnX2kyY0RhdGFHUElPTXV4UmVnLAorICAgICAgICAgICAgICAgICAgICAgIFBFRUszMihnX2kyY0RhdGFHUElPTXV4UmVnKSAmIH4oMSA8PCBnX2kyY0RhdGFHUElPKSk7CisKKyAgICAvKiBFbmFibGUgR1BJTyBwb3dlciAqLworICAgIGVuYWJsZUdQSU8oMSk7CisKKyAgICAvKiBDbGVhciB0aGUgaTJjIGxpbmVzLiAqLworICAgIGZvcihpPTA7IGk8OTsgaSsrKQorICAgICAgICBzd0kyQ1N0b3AoKTsKKworICAgIHJldHVybiAwOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gcmVhZHMgdGhlIHNsYXZlIGRldmljZSdzIHJlZ2lzdGVyCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGRldmljZUFkZHJlc3MgICAtIGkyYyBTbGF2ZSBkZXZpY2UgYWRkcmVzcyB3aGljaCByZWdpc3RlcgorICogICAgICAgICAgICAgICAgICAgICA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IGNhc2VzICovCisgICAgaWYgKHNCYXNlID09IGRCYXNlICYmIHNQaXRjaCA9PSBkUGl0Y2gpCisgICAgeworICAgICAgICAvKiBEZXRlcm1pbmUgZGlyZWN0aW9uIG9mIG9wZXJhdGlvbiAqLworICAgICAgICBpZiAoc3kgPCBkeSkKKyAgICAgICAgeworICAgICAgICAgICAgLyogKy0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICB8UyAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHwgICArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHwgICB8ICAgICAgfCAgIHwKKyAgICAgICAgICAgICAgIHwgICB8ICAgICAgfCAgIHwKKyAgICAgICAgICAgICAgICstLS18LS0tLS0tKyAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgRHwKKyAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLSsgKi8KKworICAgICAgICAgICAgbkRpcmVjdGlvbiA9IEJPVFRPTV9UT19UT1A7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoc3kgPiBkeSkKKyAgICAgICAgeworICAgICAgICAgICAgLyogKy0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICB8RCAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHwgICArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHwgICB8ICAgICAgfCAgIHwKKyAgICAgICAgICAgICAgIHwgICB8ICAgICAgfCAgIHwKKyAgICAgICAgICAgICAgICstLS18LS0tLS0tKyAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgU3wKKyAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLSsgKi8KKworICAgICAgICAgICAgbkRpcmVjdGlvbiA9IFRPUF9UT19CT1RUT007CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICB7CisgICAgICAgICAgICAvKiBzeSA9PSBkeSAqLworCisgICAgICAgICAgICBpZiAoc3ggPD0gZHgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogKy0tLS0tLSstLS0rLS0tLS0tKworICAgICAgICAgICAgICAgICAgIHxTICAgICB8ICAgfCAgICAgRHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgfCAgIHwgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAgIHwKKyAgICAgICAgICAgICAgICAgICArLS0tLS0tKy0tLSstLS0tLS0rICovCisKKyAgICAgICAgICAgICAgICBuRGlyZWN0aW9uID0gUklHSFRfVE9fTEVGVDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBzeCA+IGR4ICovCisKKyAgICAgICAgICAgICAgICAvKiArLS0tLS0tKy0tLSstLS0tLS0rCisgICAgICAgICAgICAgICAgICAgfEQgICAgIHwgICB8ICAgICBTfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgfCAgIHwgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0rLS0tKy0tLS0tLSsgKi8KKworICAgICAgICAgICAgICAgIG5EaXJlY3Rpb24gPSBMRUZUX1RPX1JJR0hUOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgaWYgKChuRGlyZWN0aW9uID09IEJPVFRPTV9UT19UT1ApIHx8IChuRGlyZWN0aW9uID09IFJJR0hUX1RPX0xFRlQpKQorICAgIHsKKyAgICAgICAgc3ggKz0gd2lkdGggLSAxOworICAgICAgICBzeSArPSBoZWlnaHQgLSAxOworICAgICAgICBkeCArPSB3aWR0aCAtIDE7CisgICAgICAgIGR5ICs9IGhlaWdodCAtIDE7CisgICAgICAgIG9wU2lnbiA9ICgtMSk7CisgICA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gRklFTERfVkFMVUUoMCwgREVfU09VUkNFLCBYX0sxLCBzeCkgICB8CisgICAgICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9TT1VSQ0UsIFlfSzIsIHN5KSk7Ly9kcHIwCisgICAgICAgIHdyaXRlX2RwcihhY2NlbCxERV9ERVNUSU5BVElPTiwKKyAgICAgICAgICAgIEZJRUxEX1NFVCAgKDAsIERFX0RFU1RJTkFUSU9OLCBXUkFQLCBESVNBQkxFKSB8CisgICAgICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ERVNUSU5BVElPTiwgWCwgICAgZHgpICB8CisgICAgICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ERVNUSU5BVElPTiwgWSwgICAgZHkpKTsvL2RwcjA0CisgICAgICAgIHdyaXRlX2RwcihhY2NlbCxERV9ESU1FTlNJT04sCisgICAgICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ESU1FTlNJT04sIFgsICAgIHdpZHRoKSB8CisgICAgICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ESU1FTlNJT04sIFlfRVQsIGhlaWdodCkpOy8vZHByMDgKKworICAgICAgICBkZV9jdHJsID0KKyAgICAgICAgICAgIEZJRUxEX1ZBTFVFKDAsIERFX0NPTlRST0wsIFJPUCwgcm9wMikgfAorICAgICAgICAgICAgRklFTERfU0VUKDAsIERFX0NPTlRST0wsIFJPUF9TRUxFQ1QsIFJPUDIpIHwKKyAgICAgICAgICAgIEZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBDT01NQU5ELCBCSVRCTFQpIHwKKyAgICAgICAgICAgICgobkRpcmVjdGlvbiA9PSBSSUdIVF9UT19MRUZUKSA/CisgICAgICAgICAgICBGSUVMRF9TRVQoMCwgREVfQ09OVFJPTCwgRElSRUNUSU9OLCBSSUdIVF9UT19MRUZUKQorICAgICAgICAgICAgOiBGSUVMRF9TRVQoMCwgREVfQ09OVFJPTCwgRElSRUNUSU9OLCBMRUZUX1RPX1JJR0hUKSkgf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gICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBERV9TT1VSQ0VfV1JBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfU09VUkNFX1hfSzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgREVfU09VUkNFX1lfSzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBERV9TT1VSQ0VfWF9LMV9NT05PIAkJCQkJCQkyMDoxNgorCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSBERV9ERVNUSU5BVElPTl9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBERV9ERVNUSU5BVElPTl9XUkFQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfREVTVElOQVRJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfREVTVElOQVRJT05fWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0RJTUVOU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSBERV9ESU1FTlNJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9ESU1FTlNJT05fWV9FVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk5fTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTl9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWCAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWF9ESVNBQkxFICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YX0VOQUJMRSAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlRfRElTQUJMRSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVF9FTkFCTEUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTl9MRUZUX1RPX1JJR0hUICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OX1JJR0hUX1RPX0xFRlQgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX01BSk9SX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YX1BPU0lUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1hfTkVHQVRJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWV9QT1NJVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZX05FR0FUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0hfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUwgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUxfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTF9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0JJVEJMVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUkVDVEFOR0xFX0ZJTEwgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9ERV9USUxFICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1RSQVBFWk9JRF9GSUxMICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfQUxQSEFfQkxFTkQgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9STEVfU1RSSVAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1NIT1JUX1NUUk9LRSAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfTElORV9EUkFXICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1dSSVRFICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfUkVBRCAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9XUklURV9CT1RUT01fVVAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfRk9OVCAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfVEVYVFVSRV9MT0FEICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1RfUk9QMyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVF9ST1AyICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRV9CSVRNQVAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFX1BBVFRFUk4gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBX05PVF9QQUNLRUQgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfOF9QQUNLRUQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV8xNl9QQUNLRUQgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzMyX1BBQ0tFRCAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEVfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIX09QQVFVRSAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0hfVFJBTlNQQVJFTlQgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1QgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUX1NPVVJDRSAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1RfREVTVElOQVRJT04gICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9ESVNBQkxFICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX0VOQUJMRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKy8vIFBzZXVkbyBmaWVsZHMuCisKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSICAgICAgICAgICAgICAgICAgICAgMjc6MjQKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzIyNSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMTM1ICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8zMTUgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzQ1ICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMjcwICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl85MCAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzE4MCAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMCAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMjcwICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl85MCAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzE4MCAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgREVfUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAKKyNkZWZpbmUgREVfUElUQ0hfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfUElUQ0hfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MAorCisjZGVmaW5lIERFX0ZPUkVHUk9VTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDE0CisjZGVmaW5lIERFX0ZPUkVHUk9VTkRfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9CQUNLR1JPVU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxOAorI2RlZmluZSBERV9CQUNLR1JPVU5EX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMUMKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWSAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWV9OT1JNQUwgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZX09WRVJXUklURSAgICAgICAgICAxCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWSAgICAgICAgICAgICAgICAgICAgIDI5OjI3CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWCAgICAgICAgICAgICAgICAgICAgIDI1OjIzCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVCAgICAgICAgICAgICAgICAgIDIxOjIwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF84ICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzE2ICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF8yNCAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9BRERSRVNTSU5HICAgICAgICAgICAgICAgICAgICAxOToxNgorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9BRERSRVNTSU5HX1hZICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfTElORUFSICAgICAgICAgICAgIDE1CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1NPVVJDRV9IRUlHSFQgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyMAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfQ09MT1JfQ09NUEFSRV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQKKyNkZWZpbmUgREVfQ09MT1JfQ09NUEFSRV9NQVNLX01BU0tTICAgICAgICAgICAgICAgICAgICAgMjM6MAorCisjZGVmaW5lIERFX01BU0tTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDI4CisjZGVmaW5lIERFX01BU0tTX0JZVEVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX01BU0tTX0JJVF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBERV9DTElQX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyQworI2RlZmluZSBERV9DTElQX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9DTElQX1RMX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBERV9DTElQX1RMX1NUQVRVU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9JTkhJQklUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgREVfQ0xJUF9UTF9JTkhJQklUX09VVFNJREUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfSU5TSURFICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NMSVBfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBERV9DTElQX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAzMAorI2RlZmluZSBERV9DTElQX0JSX0JPVFRPTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9DTElQX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzQKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0xPV19QQVRURVJOICAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX01PTk9fUEFUVEVSTl9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDM4CisjZGVmaW5lIERFX01PTk9fUEFUVEVSTl9ISUdIX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9XSU5ET1dfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAzQworI2RlZmluZSBERV9XSU5ET1dfV0lEVEhfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9XSU5ET1dfV0lEVEhfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDAKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0UgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDQKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0NTICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0NTXzAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9BRERSRVNTICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgREVfQUxQSEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDgKKyNkZWZpbmUgREVfQUxQSEFfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgREVfV1JBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNEMKKyNkZWZpbmUgREVfV1JBUF9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfV1JBUF9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDUwCisjZGVmaW5lIERFX1NUQVRVU19DU0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU19DU0NfTk9UX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVEFUVVNfMkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgREVfU1RBVFVTXzJEX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfMkRfTk9UX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU18yRF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworCisKKy8qIGJsdCBkaXJlY3Rpb24gKi8KKyNkZWZpbmUgVE9QX1RPX0JPVFRPTSAwCisjZGVmaW5lIExFRlRfVE9fUklHSFQgMAorI2RlZmluZSBCT1RUT01fVE9fVE9QIDEKKyNkZWZpbmUgUklHSFRfVE9fTEVGVCAxCisKK3ZvaWQgaHdfc2V0MmRmb3JtYXQoc3RydWN0IGx5bnhfYWNjZWwgKiBhY2NlbCxpbnQgZm10KTsKKwordm9pZCBod19kZV9pbml0KHN0cnVjdCBseW54X2FjY2VsICogYWNjZWwpOworCitpbnQgaHdfZmlsbHJlY3Qoc3RydWN0IGx5bnhfYWNjZWwgKiBhY2NlbCwKKwkJCQl1MzIgYmFzZSx1MzIgcGl0Y2gsdTMyIEJwcCwKKwkJCQl1MzIgeCx1MzIgeSx1MzIgd2lkdGgsdTMyIGhlaWdodCwKKwkJCQl1MzIgY29sb3IsdTMyIHJvcCk7CisKK2ludCBod19jb3B5YXJlYSgKK3N0cnVjdCBseW54X2FjY2VsICogYWNjZWwsCit1bnNpZ25lZCBpbnQgc0Jhc2UsICAvKiBBZGRyZXNzIG9mIHNvdXJjZTogb2Zmc2V0IGluIGZyYW1lIGJ1ZmZlciAqLwordW5zaWduZW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ERFJFU1NfRU5BQkxFX0RJU0FCTEUgICAgICAgICAgMAorI2RlZmluZSBIV0NfQUREUkVTU19FTkFCTEVfRU5BQkxFICAgICAgICAgICAxCisjZGVmaW5lIEhXQ19BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEhXQ19BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFdDX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgMQorI2RlZmluZSBIV0NfQUREUkVTU19DUyAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBIV0NfQUREUkVTU19DU18wICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhXQ19BRERSRVNTX0NTXzEgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSFdDX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIEhXQ19MT0NBVElPTiAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSBIV0NfTE9DQVRJT05fVE9QICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBIV0NfTE9DQVRJT05fVE9QX0lOU0lERSAgICAgICAgICAgICAwCisjZGVmaW5lIEhXQ19MT0NBVElPTl9UT1BfT1VUU0lERSAgICAgICAgICAgIDEKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX0xFRlQgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX0xFRlRfSU5TSURFICAgICAgICAgICAgMAorI2RlZmluZSBIV0NfTE9DQVRJT05fTEVGVF9PVVRTSURFICAgICAgICAgICAxCisjZGVmaW5lIEhXQ19MT0NBVElPTl9YICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBIV0NfQ09MT1JfMTIgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgSFdDX0NPTE9SXzEyXzJfUkdCNTY1ICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgSFdDX0NPTE9SXzEyXzFfUkdCNTY1ICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIEhXQ19DT0xPUl8zICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSBIV0NfQ09MT1JfM19SR0I1NjUgICAgICAgICAgICAgICAgICAxNTowCisKKworLyogaHdfY3Vyc29yX3h4eCB3b3JrcyBmb3Igdm95YWdlciw3MTggYW5kIDc1MCAqLwordm9pZCBod19jdXJzb3JfZW5hYmxlKHN0cnVjdCBseW54X2N1cnNvciAqIGN1cnNvcikKK3sKKwl1MzIgcmVnOworCXJlZyA9IEZJRUxEX1ZBTFVFKDAsSFdDX0FERFJFU1MsQUREUkVTUyxjdXJzb3ItPm9mZnNldCl8CisJCQlGSUVMRF9TRVQoMCxIV0NfQUREUkVTUyxFWFQsTE9DQUwpfAorCQkJRklFTERfU0VUKDAsSFdDX0FERFJFU1MsRU5BQkxFLEVOQUJMRSk7CisJUE9LRTMyKEhXQ19BRERSRVNTLHJlZyk7Cit9Cit2b2lkIGh3X2N1cnNvcl9kaXNhYmxlKHN0cnVjdCBseW54X2N1cnNvciAqIGN1cnNvcikKK3sKKwlQT0tFMzIoSFdDX0FERFJFU1MsMCk7Cit9CisKK3ZvaWQgaHdfY3Vyc29yX3NldFNpemUoc3RydWN0IGx5bnhfY3Vyc29yICogY3Vyc29yLAorCQkJCQkJaW50IHcsaW50IGgpCit7CisJY3Vyc29yLT53ID0gdzsKKwljdXJzb3ItPmggPSBoOworfQordm9pZCBod19jdXJzb3Jfc2V0UG9zKHN0cnVjdCBseW54X2N1cnNvciAqIGN1cnNvciwKKwkJCQkJCWludCB4LGludCB5KQoreworCXUzMiByZWc7CisJcmVnID0gRklFTERfVkFMVUUoMCxIV0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gICAgICAgICAgICAgICAgIEZJRUxEIE1BQ1JPUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCitcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgX0xTQihmKSAgICAgICAgICAgICAoMCA/IGYpCisjZGVmaW5lIF9NU0IoZikgICAgICAgICAgICAgKDEgPyBmKQorI2RlZmluZSBfQ09VTlQoZikgICAgICAgICAgIChfTVNCKGYpIC0gX0xTQihmKSArIDEpCisKKyNkZWZpbmUgUkFXX01BU0soZikgICAgICAgICAoMHhGRkZGRkZGRiA+PiAoMzIgLSBfQ09VTlQoZikpKQorI2RlZmluZSBHRVRfTUFTSyhmKSAgICAgICAgIChSQVdfTUFTSyhmKSA8PCBfTFNCKGYpKQorI2RlZmluZSBHRVRfRklFTEQoZCxmKSAgICAgICgoKGQpID4+IF9MU0IoZikpICYgUkFXX01BU0soZikpCisjZGVmaW5lIFRFU1RfRklFTEQoZCxmLHYpICAgKEdFVF9GSUVMRChkLGYpID09IGYgIyMgXyAjIyB2KQorI2RlZmluZSBTRVRfRklFTEQoZCxmLHYpICAgICgoKGQpICYgfkdFVF9NQVNLKGYpKSB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChmICMjIF8gIyMgdikgJiBSQVdfTUFTSyhmKSkgPDwgX0xTQihmKSkpCisjZGVmaW5lIFNFVF9GSUVMRFYoZCxmLHYpICAgKCgoZCkgJiB+R0VUX01BU0soZikpIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKHYpICYgUkFXX01BU0soZikpIDw8IF9MU0IoZikpKQorCisKKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gSW50ZXJuYWwgbWFjcm9zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLworCisjZGVmaW5lIF9GX1NUQVJUKGYpICAgICAgICAgICAgICgwID8gZikKKyNkZWZpbmUgX0ZfRU5EKGYpICAgICAgICAgICAgICAgKDEgPyBmKQorI2RlZmluZSBfRl9TSVpFKGYpICAgICAgICAgICAgICAoMSArIF9GX0VORChmKSAtIF9GX1NUQVJUKGYpKQorI2RlZmluZSBfRl9NQVNLKGYpICAgICAgICAgICAgICAoKCgxIDw8IF9GX1NJWkUoZikpIC0gMSkgPDwgX0ZfU1RBUlQoZikpCisjZGVmaW5lIF9GX05PUk1BTElaRSh2LCBmKSAgICAgICgoKHYpICYgX0ZfTUFTSyhmKSkgPj4gX0ZfU1RBUlQoZikpCisjZGVmaW5lIF9GX0RFTk9STUFMSVpFKHYsIGYpICAgICgoKHYpIDw8IF9GX1NUQVJUKGYpKSAmIF9GX01BU0soZikpCisKKworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyBHbG9iYWwgbWFjcm9zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisKKyNkZWZpbmUgRklFTERfR0VUKHgsIHJlZywgZmllbGQpIFwKKyggXAorICAgIF9GX05PUk1BTElaRSgoeCksIHJlZyAjIyBfICMjIGZpZWxkKSBcCispCisKKyNkZWZpbmUgRklFTERfU0VUKHgsIHJlZywgZmllbGQsIHZhbHVlKSBcCisoIFwKKyAgICAoeCAmIH5fRl9NQVNLKHJlZyAjIyBfICMjIGZpZWxkKSkgXAorICAgIHwgX0ZfREVOT1JNQUxJWkUocmVnICMjIF8gIyMgZmllbGQgIyMgXyAjIyB2YWx1ZSwgcmVnICMjIF8gIyMgZmllbGQpIFwKKykKKworI2RlZmluZSBGSUVMRF9WQUxVRSh4LCByZWcsIGZpZWxkLCB2YWx1ZSkgXAorKCBcCisgICAgKHggJiB+X0ZfTUFTSyhyZWcgIyMgXyAjIyBmaWVsZCkpIFwKKyAgICB8IF9GX0RFTk9STUFMSVpFKHZhbHVlLCByZWcgIyMgXyAjIyBmaWVsZCkgXAorKQorCisjZGVmaW5lIEZJRUxEX0NMRUFSKHJlZywgZmllbGQpIFwKKyggXAorICAgIH4gX0ZfTUFTSyhyZWcgIyMgXyAjIyBmaWVsZCkgXAorKQorCisKKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gRmllbGQgTWFjcm9zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLworCisjZGVmaW5lIEZJRUxEX1NUQVJUKGZpZWxkKSAgICAgICAgICAgICAgKDAgPyBmaWVsZCkKKyNkZWZpbmUgRklFTERfRU5EKGZpZWxkKSAgICAgICAgICAgICAgICAoMSA/IGZpZWxkKQorI2RlZmluZSBGSUVMRF9TSVpFKGZpZWxkKSAgICAgICAgICAgICAgICgxICsgRklFTERfRU5EKGZpZWxkKSAtIEZJRUxEX1NUQVJUKGZpZWxkKSkKKyNkZWZpbmUgRklFTERfTUFTSyhmaWVsZCkgICAgICAgICAgICAgICAoKCgxIDw8IChGSUVMRF9TSVpFKGZpZWxkKS0xKSkgfCAoKDEgPDwgKEZJRUxEX1NJWkUoZmllbGQpLTEpKSAtIDEpKSA8PCBGSUVMRF9TVEFSVChmaWVsZCkpCisjZGVmaW5lIEZJRUxEX05PUk1BTElaRShyZWcsIGZpZWxkKSAgICAgKCgocmVnKSAmIEZJRUxEX01BU0soZmllbGQpKSA+PiBGSUVMRF9TVEFSVChmaWVsZCkpCisjZGVmaW5lIEZJRUxEX0RFTk9STUFMSVpFKGZpZWxkLCB2YWx1ZSkgKCgodmFsdWUpIDw8IEZJRUxEX1NUQVJUKGZpZWxkKSkgJiBGSUVMRF9NQVNLKGZpZWxkKSkKKworI2RlZmluZSBGSUVMRF9JTklUKHJlZywgZmllbGQsIHZhbHVlKSAgIEZJRUxEX0RFTk9STUFMSVpFKHJlZyAjIyBfICMjIGZpZWxkLCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnICMjIF8gIyMgZmllbGQgIyMgXyAjIyB2YWx1ZSkKKyNkZWZpbmUgRklFTERfSU5JVF9WQUwocmVnLCBmaWVsZCwgdmFsdWUpIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoRklFTERfREVOT1JNQUxJWkUocmVnICMjIF8gIyMgZmllbGQsIHZhbHVlKSkKKyNkZWZpbmUgRklFTERfVkFMX1NFVCh4LCByLCBmLCB2KSAgICAgICB4ID0geCAmIH5GSUVMRF9NQVNLKHIgIyMgXyAjIyBmKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBGSUVMRF9ERU5PUk1BTElaRShyICMjIF8gIyMgZiwgciAjIyBfICMjIGYgIyMgXyAjIyB2KQorCisjZGVmaW5lIFJHQihyLCBnLCBiKSBcCisoIFwKKyAgICAodW5zaWduZWQgbG9uZykgKCgocikgPDwgMTYpIHwgKChnKSA8PCA4KSB8IChiKSkgXAorKQorCisjZGVmaW5lIFJHQjE2KHIsIGcsIGIpIFwKKyggXAorICAgICh1bnNpZ25lZCBzaG9ydCkgKCgoKHIpICYgMHhGOCkgPDwgOCkgfCAoKChnKSAmIDB4RkMpIDw8IDMpIHwgKCgoYikgJiAweEY4KSA+PiAzKSkgXAorKQorCitzdGF0aWMgaW5saW5lIHVuc2lnbmVkIGludCBhYnNEaWZmKHVuc2lnbmVkIGludCBhLHVuc2lnbmVkIGludCBiKQoreworCWlmKGE8YikKKwkJcmV0dXJuIGItYTsKKwllbHNlCisJCXJldHVybiBhLWI7Cit9CisKKy8qIG4gLyBkICsgMSAvIDIgPSAoMm4gKyBkKSAvIDJkICovCisjZGVmaW5lIHJvdW5kZWREaXYobnVtLGRlbm9tKQkoKDIgKiAobnVtKSArIChkZW5vbSkpIC8gKDIgKiAoZGVub20pKSkKKyNkZWZpbmUgTUIoeCkgKCh4KT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aW5pdGlhbGl6ZWQgZGlmZmVyZW50bHkuCisgICAgICAgICAqLworICAgICAgICBpZiAoc3dJMkNSZWFkUmVnKDB4ZWMsIDB4NGEpID09IDB4OTUpCisgICAgICAgIHsKKyAgICAgICAgICAgIC8qIFRoZSBmb2xsb3dpbmcgcmVnaXN0ZXIgdmFsdWVzIGZvciBDSDczMDEgYXJlIGZyb20KKyAgICAgICAgICAgICAgIENocm9udGVsIGFwcCBub3RlIGFuZCBvdXIgZXhwZXJpbWVudC4KKyAgICAgICAgICAgICAqLworCQkJcHJfaW5mbygieWVzLENINzMwMSBEVkkgY2hpcCBmb3VuZFxuIik7CisgICAgICAgICAgICBzd0kyQ1dyaXRlUmVnKDB4ZWMsIDB4MWQsIDB4MTYpOworICAgICAgICAgICAgc3dJMkNXcml0ZVJlZygweGVjLCAweDIxLCAweDkpOworICAgICAgICAgICAgc3dJMkNXcml0ZVJlZygweGVjLCAweDQ5LCAweEMwKTsKKwkJCXByX2luZm8oIm9rYXksQ0g3MzAxIERWSSBjaGlwIHNldHVwIGRvbmVcbiIpOworICAgICAgICB9CisJfQorCisJLyogaW5pdCAyZCBlbmdpbmUgKi8KKwlpZighc2hhcmUtPmFjY2VsX29mZil7CisJCWh3X3NtNzUwX2luaXRBY2NlbChzaGFyZSk7CisvLwkJc2hhcmUtPmFjY2VsLmRlX3dhaXQgPSBod19zbTc1MF9kZVdhaXQ7CisJfQorCisJcmV0dXJuIDA7Cit9CisKKworcmVzb3VyY2Vfc2l6ZV90IGh3X3NtNzUwX2dldFZNU2l6ZShzdHJ1Y3QgbHlueF9zaGFyZSAqIHNoYXJlKQoreworCXJlc291cmNlX3NpemVfdCByZXQ7CisJCisJcmV0ID0gZGRrNzUwX2dldFZNU2l6ZSgpOworCXJldHVybiByZXQ7Cit9CisKKworCitpbnQgaHdfc203NTBfb3V0cHV0X2NoZWNrTW9kZShzdHJ1Y3QgbHlueGZiX291dHB1dCogb3V0cHV0LCBzdHJ1Y3QgZmJfdmFyX3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ICAgICAgICAgICBCSVQoMjQpCmRpZmYgLS1naXQgYS9kcml2ZXJzL3VzYi9jaGlwaWRlYS9jaS5oIGIvZHJpdmVycy91c2IvY2hpcGlkZWEvY2kuaAppbmRleCA2NTkxM2Q0Li42ZDYyMDBlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3VzYi9jaGlwaWRlYS9jaS5oCisrKyBiL2RyaXZlcnMvdXNiL2NoaXBpZGVhL2NpLmgKQEAgLTI5LDYgKzI5LDE1IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBSRUdJU1RFUlMKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIElkZW50aWZpY2F0aW9uIFJlZ2lzdGVycyAqLworI2RlZmluZSBJRF9JRAkJCQkweDAKKyNkZWZpbmUgSURfSFdHRU5FUkFMCQkJMHg0CisjZGVmaW5lIElEX0hXSE9TVAkJCTB4OAorI2RlZmluZSBJRF9IV0RFVklDRQkJCTB4YworI2RlZmluZSBJRF9IV1RYQlVGCQkJMHgxMAorI2RlZmluZSBJRF9IV1JYQlVGCQkJMHgxNAorI2RlZmluZSBJRF9TQlVTQ0ZHCQkJMHg5MAorCiAvKiByZWdpc3RlciBpbmRpY2VzICovCiBlbnVtIGNpX2h3X3JlZ3MgewogCUNBUF9DQVBMRU5HVEgsCkBAIC05Nyw2ICsxMDYsMTggQEAKIAlDSV9ST0xFX0VORCwKIH07CiAKK2VudW0gY2lfcmV2aXNpb24geworCUNJX1JFVklTSU9OXzFYID0gMTAsCS8qIFJldmlzaW9uIDEueCAqLworCUNJX1JFVklTSU9OXzIwID0gMjAsIC8qIFJldmlzaW9uIDIuMCAqLworCUNJX1JFVklTSU9OXzIxLCAvKiBSZXZpc2lvbiAyLjEgKi8KKwlDSV9SRVZJU0lPTl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WYgKGNtZCA9PSBWRklPX0RFVklDRV9SRVNFVCkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlyZXR1cm4gLUVOT1RUWTsKK30KKworc3RhdGljIHNzaXplX3QgdmZpb19wbGF0Zm9ybV9yZWFkX21taW8oc3RydWN0IHZmaW9fcGxhdGZvcm1fcmVnaW9uIHJlZywKKwkJCQkgICAgICAgY2hhciBfX3VzZXIgKmJ1Ziwgc2l6ZV90IGNvdW50LAorCQkJCSAgICAgICBsb2ZmX3Qgb2ZmKQoreworCXVuc2lnbmVkIGludCBkb25lID0gMDsKKworCWlmICghcmVnLmlvYWRkcikgeworCQlyZWcuaW9hZGRyID0KKwkJCWlvcmVtYXBfbm9jYWNoZShyZWcuYWRkciwgcmVnLnNpemUpOworCisJCWlmICghcmVnLmlvYWRkcikKKwkJCXJldHVybiAtRU5PTUVNOworCX0KKworCXdoaWxlIChjb3VudCkgeworCQlzaXplX3QgZmlsbGVkOworCisJCWlmIChjb3VudCA+PSA0ICYmICEob2ZmICUgNCkpIHsKKwkJCXUzMiB2YWw7CisKKwkJCXZhbCA9IGlvcmVhZDMyKHJlZy5pb2FkZHIgKyBvZmYpOworCQkJaWYgKGNvcHlfdG9fdXNlcihidWYsICZ2YWwsIDQpKQorCQkJCWdvdG8gZXJyOworCisJCQlmaWxsZWQgPSA0OworCQl9IGVsc2UgaWYgKGNvdW50ID49IDIgJiYgIShvZmYgJSAyKSkgeworCQkJdTE2IHZhbDsKKworCQkJdmFsID0gaW9yZWFkMTYocmVnLmlvYWRkciArIG9mZik7CisJCQlpZiAoY29weV90b191c2VyKGJ1ZiwgJnZhbCwgMikpCisJCQkJZ290byBlcnI7CisKKwkJCWZpbGxlZCA9IDI7CisJCX0gZWxzZSB7CisJCQl1OCB2YWw7CisKKwkJCXZhbCA9IGlvcmVhZDgocmVnLmlvYWRkciArIG9mZik7CisJCQlpZiAoY29weV90b191c2VyKGJ1ZiwgJnZhbCwgMSkpCisJCQkJZ290byBlcnI7CisK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OIDEKIAogLyogTm9ybWFsIFVCSUZTIG1lc3NhZ2VzICovCi0jZGVmaW5lIHViaWZzX21zZyhmbXQsIC4uLikgcHJfbm90aWNlKCJVQklGUzogIiBmbXQgIlxuIiwgIyNfX1ZBX0FSR1NfXykKKyNkZWZpbmUgdWJpZnNfbXNnKGMsIGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX25vdGljZSgiVUJJRlMgKHViaSVkOiVkKTogIiBmbXQgIlxuIiwgICAgICAgICAgICAgICAgICAgIFwKKwkJICAoYyktPnZpLnViaV9udW0sIChjKS0+dmkudm9sX2lkLCAjI19fVkFfQVJHU19fKQogLyogVUJJRlMgZXJyb3IgbWVzc2FnZXMgKi8KLSNkZWZpbmUgdWJpZnNfZXJyKGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX2VycigiVUJJRlMgZXJyb3IgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCBjdXJyZW50LT5waWQsIFwKKyNkZWZpbmUgdWJpZnNfZXJyKGMsIGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX2VycigiVUJJRlMgZXJyb3IgKHViaSVkOiVkIHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgICAgIFwKKwkgICAgICAgKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgY3VycmVudC0+cGlkLCAgICAgICBcCiAJICAgICAgIF9fZnVuY19fLCAjI19fVkFfQVJHU19fKQogLyogVUJJRlMgd2FybmluZyBtZXNzYWdlcyAqLwotI2RlZmluZSB1Ymlmc193YXJuKGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JcHJfd2FybigiVUJJRlMgd2FybmluZyAocGlkICVkKTogJXM6ICIgZm10ICJcbiIsICAgICAgICAgICAgXAotCQljdXJyZW50LT5waWQsIF9fZnVuY19fLCAjI19fVkFfQVJHU19fKQorI2RlZmluZSB1Ymlmc193YXJuKGMsIGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJcHJfd2FybigiVUJJRlMgd2FybmluZyAodWJpJWQ6JWQgcGlkICVkKTogJXM6ICIgZm10ICJcbiIsICAgXAorCQkoYyktPnZpLnViaV9udW0sIChjKS0+dmkudm9sX2lkLCBjdXJyZW50LT5waWQsICAgICAgXAorCQlfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKIC8qCiAgKiBBIHZhcmlhbnQgb2YgJ3ViaWZzX2VycigpJyB3aGljaCB0YWtlcyB0aGUgVUJJRlMgZmlsZS1zeXRlbSBkZXNjcmlwdGlvbgogICogb2JqZWN0IGFzIGFuIGFyZ3VtZW50LgpAQCAtNTksNyArNjMsNyBAQAogI2RlZmluZSB1Ymlmc19lcnJjKGMsIGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlpZiAoIShjKS0+cHJvYmluZykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJdWJpZnNfZXJyKGZtdCwgIyNfX1ZBX0FSR1NfXyk7ICAgICAgICAgICAgICBcCisJCQl1Ymlmc19lcnIoYywgZm10LCAjI19fVkFfQVJHU19fKTsgICAgICAgICAgIFwKIAl9IHdoaWxlICgwKQogCiAvKiBVQklGUyBmaWxlIHN5c3RlbSBWRlMgbWFnaWMgbnVtYmVyICovCkBAIC0xNTgsNyArMTYyLDcgQEAKICNkZWZpbmUgV09SU1RfQ09NUFJfRkFDVE9SIDIKIAogLyoKLSAqIEhvdyBtdWNoIG1lbW9yeSBpcyBuZWVkZWQgZm9yIGEgYnVmZmVyIHdoZXJlIHdlIGNvbXJlc3MgYSBkYXRhIG5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01UTVIgICAgICAgICAgICJNVE1SIgkvKiBNSUQgVGltZXIgdGFibGUgKi8KICNkZWZpbmUgQUNQSV9TSUdfU0xJQyAgICAgICAgICAgIlNMSUMiCS8qIFNvZnR3YXJlIExpY2Vuc2luZyBEZXNjcmlwdGlvbiBUYWJsZSAqLwogI2RlZmluZSBBQ1BJX1NJR19TUENSICAgICAgICAgICAiU1BDUiIJLyogU2VyaWFsIFBvcnQgQ29uc29sZSBSZWRpcmVjdGlvbiB0YWJsZSAqLwpAQCAtODQ1LDcgKzg0Niw4IEBACiAKIGVudW0gYWNwaV9scGl0X3R5cGUgewogCUFDUElfTFBJVF9UWVBFX05BVElWRV9DU1RBVEUgPSAweDAwLAotCUFDUElfTFBJVF9UWVBFX1NJTVBMRV9JTyA9IDB4MDEKKwlBQ1BJX0xQSVRfVFlQRV9TSU1QTEVfSU8gPSAweDAxLAorCUFDUElfTFBJVF9UWVBFX1JFU0VSVkVEID0gMHgwMgkvKiAyIGFuZCBhYm92ZSBhcmUgcmVzZXJ2ZWQgKi8KIH07CiAKIC8qIE1hc2tzIGZvciBGbGFncyBmaWVsZCBhYm92ZSAgKi8KQEAgLTkzNSw2ICs5MzcsMjEgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBNU0RNIC0gTWljcm9zb2Z0IERhdGEgTWFuYWdlbWVudCB0YWJsZQorICoKKyAqIENvbmZvcm1zIHRvICJNaWNyb3NvZnQgU29mdHdhcmUgTGljZW5zaW5nIFRhYmxlcyAoU0xJQyBhbmQgTVNETSkiLAorICogTm92ZW1iZXIgMjksIDIwMTEuIENvcHlyaWdodCAyMDExIE1pY3Jvc29mdAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIEJhc2ljIE1TRE0gdGFibGUgaXMgb25seSB0aGUgY29tbW9uIEFDUEkgaGVhZGVyICovCisKK3N0cnVjdCBhY3BpX3RhYmxlX21zZG0geworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCiAgKiBNVE1SIC0gTUlEIFRpbWVyIFRhYmxlCiAgKiAgICAgICAgVmVyc2lvbiAxCiAgKgpAQCAtOTU5LDEwICs5NzYsOSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBTTElDIC0gU29mdHdhcmUgTGljZW5zaW5nIERlc2NyaXB0aW9uIFRhYmxlCi0gKiAgICAgICAgVmVyc2lvbiAxCiAgKgotICogQ29uZm9ybXMgdG8gIk9FTSBBY3RpdmF0aW9uIDIuMCBmb3IgV2luZG93cyBWaXN0YSBPcGVyYXRpbmcgU3lzdGVtcyIsCi0gKiBDb3B5cmlnaHQgMjAwNgorICogQ29uZm9ybXMgdG8gIk1pY3Jvc29mdCBTb2Z0d2FyZSBMaWNlbnNpbmcgVGFibGVzIChTTElDIGFuZCBNU0RNKSIsCisgKiBOb3ZlbWJlciAyOSwgMjAxMS4gQ29weXJpZ2h0IDIwMTEgTWljcm9zb2Z0CiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtOTcyLDUyICs5ODgsNiBAQAogCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLwogfTsKIAotLyogQ29tbW9uIFNMS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NkZWZpbmUgQVJJWk9OQV9HUF9GTl9JUlExICAgICAgICAgICAgICAgICAgICAgICAweDAyCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fSVJRMiAgICAgICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmluZSBBUklaT05BX0dQX0ZOX09QQ0xLICAgICAgICAgICAgICAgICAgICAgIDB4MDQKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9GTEwxX09VVCAgICAgICAgICAgICAgICAgICAweDA1CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMl9PVVQgICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBBUklaT05BX0dQX0ZOX1BXTTEgICAgICAgICAgICAgICAgICAgICAgIDB4MDgKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9QV00yICAgICAgICAgICAgICAgICAgICAgICAweDA5CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fU1lTQ0xLX1VOREVSQ0xPQ0tFRCAgICAgICAgMHgwQQorI2RlZmluZSBBUklaT05BX0dQX0ZOX0FTWU5DQ0xLX1VOREVSQ0xPQ0tFRCAgICAgIDB4MEIKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9GTEwxX0xPQ0sgICAgICAgICAgICAgICAgICAweDBDCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMl9MT0NLICAgICAgICAgICAgICAgICAgMHgwRAorI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDFfQ0xPQ0tfT0sgICAgICAgICAgICAgIDB4MEYKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9GTEwyX0NMT0NLX09LICAgICAgICAgICAgICAweDEwCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fSEVBRFBIT05FX0RFVCAgICAgICAgICAgICAgMHgxMgorI2RlZmluZSBBUklaT05BX0dQX0ZOX01JQ19ERVQgICAgICAgICAgICAgICAgICAgIDB4MTMKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9XU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UE5fRElSICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fUFUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fUEQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHICAgICAgICAgICAgICAgICAgICAgICAweDAyMDAKKyNkZWZpbmUgQVJJWk9OQV9HUE5fREIgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAKKworLyogUHJvdmlkZSBzb21lIGRlZmluZXMgZm9yIHRoZSBtb3N0IGNvbW1vbiBjb25maWdzICovCisjZGVmaW5lIEFSSVpPTkFfR1BfREVGQVVMVCAgICAgICAgICAgICAweGZmZmZmZmZmCisjZGVmaW5lIEFSSVpPTkFfR1BfT1VUUFVUICAgICAgICAgICAgICAoQVJJWk9OQV9HUF9GTl9HUElPKQorI2RlZmluZSBBUklaT05BX0dQX0lOUFVUICAgICAgICAgICAgICAgKEFSSVpPTkFfR1BfRk5fR1BJTyB8IFwKKwkJCQkJQVJJWk9OQV9HUE5fRElSKQorCisjZGVmaW5lIEFSSVpPTkFfMzJLWl9NQ0xLMSAxCisjZGVmaW5lIEFSSVpPTkFfMzJLWl9NQ0xLMiAyCisjZGVmaW5lIEFSSVpPTkFfMzJLWl9OT05FICAzCisKKyNkZWZpbmUgQVJJWk9OQV9ETUlDX01JQ1ZERCAgIDAKKyNkZWZpbmUgQVJJWk9OQV9ETUlDX01JQ0JJQVMxIDEKKyNkZWZpbmUgQVJJWk9OQV9ETUlDX01JQ0JJQVMyIDIKKyNkZWZpbmUgQVJJWk9OQV9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JfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxNSAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9ESVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTQgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUERfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX01BU0sgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX1NISUZUICAgICAgICAgIC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ICAgICAgICAgICAgICAgICAgIDE1ICAvKiBHUE5fRElSICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDQwMDAgIC8qIEdQTl9QVSAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxNCAgLyogR1BOX1BVICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUEQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QRF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMCAgLyogR1BOX1BEICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDEzICAvKiBHUE5fUEQgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUERfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMSAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0wgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkcgICAgICAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgOSAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogR1BOX0RCICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RCX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBHUE5fREIgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fREJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEdQTl9EQ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ZW50cnktPnBnb2ZzID0gcGdvZnM7CisJCV9fZW50cnktPmJsayA9IGJsa2FkZHI7CisJKSwKKworCVRQX3ByaW50aygiZGV2ID0gKCVkLCVkKSwgaW5vID0gJWx1LCBwZ29mcyA9ICV1LCBibGthZGRyID0gJXUiLAorCQlzaG93X2Rldl9pbm8oX19lbnRyeSksCisJCV9fZW50cnktPnBnb2ZzLAorCQlfX2VudHJ5LT5ibGspCispOworCitUUkFDRV9FVkVOVChmMmZzX3Nocmlua19leHRlbnRfdHJlZSwKKworCVRQX1BST1RPKHN0cnVjdCBmMmZzX3NiX2luZm8gKnNiaSwgdW5zaWduZWQgaW50IG5vZGVfY250LAorCQkJCQkJdW5zaWduZWQgaW50IHRyZWVfY250KSwKKworCVRQX0FSR1Moc2JpLCBub2RlX2NudCwgdHJlZV9jbnQpLAorCisJVFBfU1RSVUNUX19lbnRyeSgKKwkJX19maWVsZChkZXZfdCwJZGV2KQorCQlfX2ZpZWxkKHVuc2lnbmVkIGludCwgbm9kZV9jbnQpCisJCV9fZmllbGQodW5zaWduZWQgaW50LCB0cmVlX2NudCkKKwkpLAorCisJVFBfZmFzdF9hc3NpZ24oCisJCV9fZW50cnktPmRldiA9IHNiaS0+c2ItPnNfZGV2OworCQlfX2VudHJ5LT5ub2RlX2NudCA9IG5vZGVfY250OworCQlfX2VudHJ5LT50cmVlX2NudCA9IHRyZWVfY250OworCSksCisKKwlUUF9wcmludGsoImRldiA9ICglZCwlZCksIHNocnVuazogbm9kZV9jbnQgPSAldSwgdHJlZV9jbnQgPSAldSIsCisJCXNob3dfZGV2KF9fZW50cnkpLAorCQlfX2VudHJ5LT5ub2RlX2NudCwKKwkJX19lbnRyeS0+dHJlZV9jbnQpCispOworCitUUkFDRV9FVkVOVChmMmZzX2Rlc3Ryb3lfZXh0ZW50X3RyZWUsCisKKwlUUF9QUk9UTyhzdHJ1Y3QgaW5vZGUgKmlub2RlLCB1bnNpZ25lZCBpbnQgbm9kZV9jbnQpLAorCisJVFB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RlID0gMDsKKwlpbnQgbGVuID0gc3RybGVuKG1hcC0+ZW51bV9zdHJpbmcpOworCisJZm9yIChwdHIgPSBjYWxsLT5wcmludF9mbXQ7ICpwdHI7IHB0cisrKSB7CisJCWlmICgqcHRyID09ICdcXCcpIHsKKwkJCXB0cisrOworCQkJLyogcGFyYW5vaWQgKi8KKwkJCWlmICghKnB0cikKKwkJCQlicmVhazsKKwkJCWNvbnRpbnVlOworCQl9CisJCWlmICgqcHRyID09ICciJykgeworCQkJcXVvdGUgXj0gMTsKKwkJCWNvbnRpbnVlOworCQl9CisJCWlmIChxdW90ZSkKKwkJCWNvbnRpbnVlOworCQlpZiAoaXNkaWdpdCgqcHRyKSkgeworCQkJLyogc2tpcCBudW1iZXJzICovCisJCQlkbyB7CisJCQkJcHRyKys7CisJCQkJLyogQ2hlY2sgZm9yIGFscGhhIGNoYXJzIGxpa2UgVUxMICovCisJCQl9IHdoaWxlIChpc2FsbnVtKCpwdHIpKTsKKwkJCS8qCisJCQkgKiBBIG51bWJlciBtdXN0IGhhdmUgc29tZSBraW5kIG9mIGRlbGltaXRlciBhZnRlcgorCQkJICogaXQsIGFuZCB3ZSBjYW4gaWdub3JlIHRoYXQgdG9vLgorCQkJICovCisJCQljb250aW51ZTsKKwkJfQorCQlpZiAoaXNhbHBoYSgqcHRyKSB8fCAqcHRyID09ICdfJykgeworCQkJaWYgKHN0cm5jbXAobWFwLT5lbnVtX3N0cmluZywgcHRyLCBsZW4pID09IDAgJiYKKwkJCSAgICAhaXNhbG51bShwdHJbbGVuXSkgJiYgcHRyW2xlbl0gIT0gJ18nKSB7CisJCQkJcHRyID0gZW51bV9yZXBsYWNlKHB0ciwgbWFwLCBsZW4pOworCQkJCS8qIEhtbSwgZW51bSBzdHJpbmcgc21hbGxlciB0aGFuIHZhbHVlICovCisJCQkJaWYgKFdBUk5fT05fT05DRSghcHRyKSkKKwkJCQkJcmV0dXJuOworCQkJCS8qCisJCQkJICogTm8gbmVlZCB0byBkZWNyZW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gIiwiIDogIiIsCisJCQkJdGFza19waWRfbnIod29ya2VyLT50YXNrKSwKKwkJCQl3b3JrZXIgPT0gcHdxLT53cS0+cmVzY3VlciA/ICIoUkVTQ1VFUikiIDogIiIsCisJCQkJd29ya2VyLT5jdXJyZW50X2Z1bmMpOworCQkJbGlzdF9mb3JfZWFjaF9lbnRyeSh3b3JrLCAmd29ya2VyLT5zY2hlZHVsZWQsIGVudHJ5KQorCQkJCXByX2NvbnRfd29yayhmYWxzZSwgd29yayk7CisJCQljb21tYSA9IHRydWU7CisJCX0KKwkJcHJfY29udCgiXG4iKTsKKwl9CisKKwlsaXN0X2Zvcl9lYWNoX2VudHJ5KHdvcmssICZwb29sLT53b3JrbGlzdCwgZW50cnkpIHsKKwkJaWYgKGdldF93b3JrX3B3cSh3b3JrKSA9PSBwd3EpIHsKKwkJCWhhc19wZW5kaW5nID0gdHJ1ZTsKKwkJCWJyZWFrOworCQl9CisJfQorCWlmIChoYXNfcGVuZGluZykgeworCQlib29sIGNvbW1hID0gZmFsc2U7CisKKwkJcHJfaW5mbygiICAgIHBlbmRpbmc6Iik7CisJCWxpc3RfZm9yX2VhY2hfZW50cnkod29yaywgJnBvb2wtPndvcmtsaXN0LCBlbnRyeSkgeworCQkJaWYgKGdldF93b3JrX3B3cSh3b3JrKSAhPSBwd3EpCisJCQkJY29udGludWU7CisKKwkJCXByX2NvbnRfd29yayhjb21tYSwgd29yayk7CisJCQljb21tYSA9ICEoKndvcmtfZGF0YV9iaXRzKHdvcmspICYgV09SS19TVFJVQ1RfTElOS0VEKTsKKwkJfQorCQlwcl9jb250KCJcbiIpOworCX0KKworCWlmICghbGlzdF9lbXB0eSgmcHdxLT5kZWxheWVkX3dvcmtzKSkgeworCQlib29sIGNvbW1hID0gZmFsc2U7CisKKwkJcHJfaW5mbygiICAgIGRlbGF5ZWQ6Iik7CisJCWxpc3RfZm9yX2VhY2hfZW50cnkod29yaywgJnB3cS0+ZGVsYXllZF93b3JrcywgZW50cnkpIHsK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7CiAJY2hhciB0bXBbOF07CisJY29uc3QgY2hhciAqdW5pdDsKIAogCXRtcFswXSA9ICdcMCc7CiAJaSA9IDA7Ci0JaWYgKHNpemUgPj0gZGl2aXNvclt1bml0c10pIHsKLQkJd2hpbGUgKHNpemUgPj0gZGl2aXNvclt1bml0c10pIHsKLQkJCXJlbWFpbmRlciA9IGRvX2RpdihzaXplLCBkaXZpc29yW3VuaXRzXSk7Ci0JCQlpKys7Ci0JCX0KKwlpZiAoIXNpemUpCisJCWdvdG8gb3V0OwogCi0JCXNmX2NhcCA9IHNpemU7Ci0JCWZvciAoaiA9IDA7IHNmX2NhcCoxMCA8IDEwMDA7IGorKykKLQkJCXNmX2NhcCAqPSAxMDsKLQotCQlpZiAoaikgewotCQkJcmVtYWluZGVyICo9IDEwMDA7Ci0JCQlyZW1haW5kZXIgLz0gZGl2aXNvclt1bml0c107Ci0JCQlzbnByaW50Zih0bXAsIHNpemVvZih0bXApLCAiLiUwM3UiLCByZW1haW5kZXIpOwotCQkJdG1wW2orMV0gPSAnXDAnOwotCQl9CisJd2hpbGUgKGJsa19zaXplID49IGRpdmlzb3JbdW5pdHNdKSB7CisJCXJlbWFpbmRlciA9IGRvX2RpdihibGtfc2l6ZSwgZGl2aXNvclt1bml0c10pOworCQlpKys7CiAJfQogCisJZXhwID0gZGl2aXNvclt1bml0c10gLyAodTMyKWJsa19zaXplOworCWlmIChzaXplID49IGV4cCkgeworCQlyZW1haW5kZXIgPSBkb19kaXYoc2l6ZSwgZGl2aXNvclt1bml0c10pOworCQlyZW1haW5kZXIgKj0gYmxrX3NpemU7CisJCWkrKzsKKwl9IGVsc2UgeworCQlyZW1haW5kZXIgKj0gc2l6ZTsKKwl9CisKKwlzaXplICo9IGJsa19zaXplOworCXNpemUgKz0gcmVtYWluZGVyIC8gZGl2aXNvclt1bml0c107CisJcmVtYWluZGVyICU9IGRpdmlzb3JbdW5pdHNdOworCisJd2hpbGUgKHNpemUgPj0gZGl2aXNvclt1bml0c10pIH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EpLCBfKDkyKSwgXyg5MyksIF8oOTQpLCBfKDk1KSwgXyg5NiksIF8oOTcpLCBfKDk4KSwgXyg5OSksCisjdW5kZWYgXworfTsKIAotCS8qCi0JICogUG9zc2libGUgd2F5cyB0byBhcHByb3guIGRpdmlkZSBieSAxMAotCSAqICh4ICogMHgxOTk5OTk5YSkgPj4gMzIgeCA8IDEwNzM3NDE4MjkgKG11bHRpcGx5IG11c3QgYmUgNjQtYml0KQotCSAqICh4ICogMHhjY2NkKSA+PiAxOSAgICAgeCA8ICAgICAgODE5MjAgKHggPCAyNjIxNDkgd2hlbiA2NC1iaXQgbXVsKQotCSAqICh4ICogMHg2NjY3KSA+PiAxOCAgICAgeCA8ICAgICAgNDM2OTkKLQkgKiAoeCAqIDB4MzMzNCkgPj4gMTcgICAgIHggPCAgICAgIDE2Mzg5Ci0JICogKHggKiAweDE5OWEpID4+IDE2ICAgICB4IDwgICAgICAxNjM4OQotCSAqICh4ICogMHgwY2NkKSA+PiAxNSAgICAgeCA8ICAgICAgMTYzODkKLQkgKiAoeCAqIDB4MDY2NykgPj4gMTQgICAgIHggPCAgICAgICAyNzM5Ci0JICogKHggKiAweDAzMzQpID4+IDEzICAgICB4IDwgICAgICAgMTAyOQotCSAqICh4ICogMHgwMTlhKSA+PiAxMiAgICAgeCA8ICAgICAgIDEwMjkKLQkgKiAoeCAqIDB4MDBjZCkgPj4gMTEgICAgIHggPCAgICAgICAxMDI5IHNob3J0ZXIgY29kZSB0aGFuICogMHg2NyAob24gaTM4NikKLQkgKiAoeCAqIDB4MDA2NykgPj4gMTAgICAgIHggPCAgICAgICAgMTc5Ci0JICogKHggKiAweDAwMzQpID4+ICA5ICAgICB4IDwgICAgICAgICA2OSBzYW1lCi0JICogKHggKiAweDAwMWEpID4+ICA4ICAgICB4IDwgICAgICAgICA2OSBzYW1lCi0JICogKHggKiAweDAwMGQpID4+ICA3ICAgICB4IDwgICAgICAgICA2OSBzYW1lLCBzaG9ydGVzdCBjb2RlIChvbi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CXEgICAgICA9IChyICogMHgxOTlhKSA+PiAxNjsJLyogciA8PSA5OTk5ICovCi0JKmJ1ZisrID0gKHIgLSAxMCAqIHEpICArICcwJzsKLQlpZiAocSA9PSAwKQotCQlyZXR1cm4gYnVmOwotCXIgICAgICA9IChxICogMHhjZCkgPj4gMTE7CS8qIHEgPD0gOTk5ICovCi0JKmJ1ZisrID0gKHEgLSAxMCAqIHIpICArICcwJzsKLQlpZiAociA9PSAwKQotCQlyZXR1cm4gYnVmOwotCXEgICAgICA9IChyICogMHhjZCkgPj4gMTE7CS8qIHIgPD0gOTkgKi8KLQkqYnVmKysgPSAociAtIDEwICogcSkgKyAnMCc7Ci0JaWYgKHEgPT0gMCkKLQkJcmV0dXJuIGJ1ZjsKLQkqYnVmKysgPSBxICsgJzAnOwkJIC8qIHEgPD0gOSAqLworCS8qIDEwMCA8PSByIDwgMTBeOCAqLworCXEgPSAociAqICh1NjQpMHgyOGY1YzI5KSA+PiAzMjsKKwkqKCh1MTYgKilidWYpID0gZGVjcGFpcltyIC0gMTAwKnFdOworCWJ1ZiArPSAyOworCisJLyogMSA8PSBxIDwgMTBeNiAqLworCWlmIChxIDwgMTAwKQorCQlnb3RvIG91dF9xOworCisJLyogIDEwMCA8PSBxIDwgMTBeNiAqLworCXIgPSAocSAqICh1NjQpMHgyOGY1YzI5KSA+PiAzMjsKKwkqKCh1MTYgKilidWYpID0gZGVjcGFpcltxIC0gMTAwKnJdOworCWJ1ZiArPSAyOworCisJLyogMSA8PSByIDwgMTBeNCAqLworCWlmIChyIDwgMTAwKQorCQlnb3RvIG91dF9yOworCisJLyogMTAwIDw9IHIgPCAxMF40ICovCisJcSA9IChyICogMHgxNDdiKSA+PiAxOTsKKwkqKCh1MTYgKilidWYpID0gZGVjcGFpcltyIC0gMTAwKnFdOworCWJ1ZiArPSAyOworb3V0X3E6CisJLyogMSA8PSBxIDwgMTAwICovCisJciA9IHE7CitvdXRfcjoKKwkvKiAxIDw9IHIgPCAxMDAgKi8KK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9sb2NrKTsKIAogc3RhdGljIGF0b21pY190IG1vbml0b3JfcHJvbWlzYyA9IEFUT01JQ19JTklUKDApOwogCkBAIC00NCwxMSArNTAsMzIgQEAKIAlzdHJ1Y3QgaGNpX2ZpbHRlciBmaWx0ZXI7CiAJX191MzIgICAgICAgICAgICAgY21zZ19tYXNrOwogCXVuc2lnbmVkIHNob3J0ICAgIGNoYW5uZWw7CisJdW5zaWduZWQgbG9uZyAgICAgZmxhZ3M7CiB9OwogCi1zdGF0aWMgaW5saW5lIGludCBoY2lfdGVzdF9iaXQoaW50IG5yLCB2b2lkICphZGRyKQordm9pZCBoY2lfc29ja19zZXRfZmxhZyhzdHJ1Y3Qgc29jayAqc2ssIGludCBucikKIHsKLQlyZXR1cm4gKigoX191MzIgKikgYWRkciArIChuciA+PiA1KSkgJiAoKF9fdTMyKSAxIDw8IChuciAmIDMxKSk7CisJc2V0X2JpdChuciwgJmhjaV9waShzayktPmZsYWdzKTsKK30KKwordm9pZCBoY2lfc29ja19jbGVhcl9mbGFnKHN0cnVjdCBzb2NrICpzaywgaW50IG5yKQoreworCWNsZWFyX2JpdChuciwgJmhjaV9waShzayktPmZsYWdzKTsKK30KKworaW50IGhjaV9zb2NrX3Rlc3RfZmxhZyhzdHJ1Y3Qgc29jayAqc2ssIGludCBucikKK3sKKwlyZXR1cm4gdGVzdF9iaXQobnIsICZoY2lfcGkoc2spLT5mbGFncyk7Cit9CisKK3Vuc2lnbmVkIHNob3J0IGhjaV9zb2NrX2dldF9jaGFubmVsKHN0cnVjdCBzb2NrICpzaykKK3sKKwlyZXR1cm4gaGNpX3BpKHNrKS0+Y2hhbm5lbDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaGNpX3Rlc3RfYml0KGludCBuciwgY29uc3Qgdm9pZCAqYWRkcikKK3sKKwlyZXR1cm4gKigoY29uc3QgX191MzIgKikgYWRkciArIChuciA+PiA1KSkgJiAoKF9fdTMyKSAxIDw8IChuciAmIDMxKSk7CiB9CiAKIC8qI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dWxsX3JhbmdlID0gZmFsc2U7Citib29sIHRleHRfb25seSA9IGZhbHNlOworCitzdGF0aWMgdm9pZCBwcmludF9iYW5uZXIodm9pZCkKK3sKKwlpZiAoZnVsbF9yYW5nZSkKKwkJcHJpbnRmKCJ8MW5zICAgICB8MTBucyAgICAgfDEwMG5zICAgIHwxdXMgICAgICB8MTB1cyAgICAgfDEwMHVzIgorCQkgICAgICAgIiAgICB8MW1zICAgICAgfDEwbXMgICAgIHwxMDBtcyAgICB8MXMgICAgICAgfDEwc1xuIik7CisJZWxzZQorCQlwcmludGYoInwxdXMgICAgICB8MTB1cyAgICAgfDEwMHVzICAgIHwxbXMgICAgICB8MTBtcyAgICAgIgorCQkgICAgICAgInwxMDBtcyAgICB8MXMgICAgICAgfDEwc1xuIik7Cit9CisKK3N0YXRpYyB2b2lkIHByaW50X2hpc3QoaW50IGZkKQoreworCV9fdTMyIGtleTsKKwlfX3U2NCB2YWx1ZTsKKwlfX3U2NCBjbnRbU0xPVFNdOworCV9fdTY0IG1heF9jbnQgPSAwOworCV9fdTY0IHRvdGFsX2V2ZW50cyA9IDA7CisKKwlmb3IgKGtleSA9IDA7IGtleSA8IFNMT1RTOyBrZXkrKykgeworCQl2YWx1ZSA9IDA7CisJCWJwZl9sb29rdXBfZWxlbShmZCwgJmtleSwgJnZhbHVlKTsKKwkJY250W2tleV0gPSB2YWx1ZTsKKwkJdG90YWxfZXZlbnRzICs9IHZhbHVlOworCQlpZiAodmFsdWUgPiBtYXhfY250KQorCQkJbWF4X2NudCA9IHZhbHVlOworCX0KKwljbGVhcl9zdGF0cyhmZCk7CisJZm9yIChrZXkgPSBmdWxsX3JhbmdlID8gMCA6IDI5OyBrZXkgPCBTTE9UUzsga2V5KyspIHsKKwkJaW50IGMgPSBudW1fY29sb3JzICogY250W2tleV0gLyAobWF4X2NudCArIDEpOworCisJCWlmICh0ZXh0X29ubHkpCisJCQlwcmludGYoIiVzIiwgc3ltW2NdKTsKKwkJZWxzZQorCQkJcH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mZpZyAuY29uZmlnOwkJCVwKLQkJCSQob2JqKS9jb25mIC0tc2lsZW50b2xkY29uZmlnICQoS2NvbmZpZyk7CVwKKwkJCSQob2JqKS9jb25mICQoc2lsZW50KSAtLXNpbGVudG9sZGNvbmZpZyAkKEtjb25maWcpOyBcCiAJZmkKIAkkKFEpcm0gLWYgLnRtcC5jb25maWcKIAogIyBDcmVhdGUgbmV3IGxpbnV4LnBvdCBmaWxlCiAjIEFkanVzdCBjaGFyc2V0IHRvIFVURi04IGluIC5wbyBmaWxlIHRvIGFjY2VwdCBVVEYtOCBpbiBLY29uZmlnIGZpbGVzCiB1cGRhdGUtcG8tY29uZmlnOiAkKG9iaikva3hnZXR0ZXh0ICQob2JqKS9nY29uZi5nbGFkZS5oCi0JJChRKWVjaG8gIiAgR0VOICAgICBjb25maWcucG90IgorCSQoUSkkKGtlY2hvKSAiICBHRU4gICAgIGNvbmZpZy5wb3QiCiAJJChRKXhnZXR0ZXh0IC0tZGVmYXVsdC1kb21haW49bGludXggICAgICAgICAgICAgICAgICAgICAgICAgXAogCSAgICAtLWFkZC1jb21tZW50cyAtLWtleXdvcmQ9XyAtLWtleXdvcmQ9Tl8gICAgICAgICAgICAgICAgIFwKIAkgICAgLS1mcm9tLWNvZGU9VVRGLTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC02NSw2MSArNjYsNTggQEAKIAkkKFEpKGZvciBpIGluIGBscyAkKHNyY3RyZWUpL2FyY2gvKi9LY29uZmlnICAgICAgXAogCSAgICAkKHNyY3RyZWUpL2FyY2gvKi91bS9LY29uZmlnYDsgICAgICAgICAgICAgICBcCiAJICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJZWNobyAiICBHRU4gICAgICQkaSI7ICAgICAgICAgICAgICAgICAgICBcCisJCSQoa2VjaG8pICIgIEdFTiAgICAgJCRpIjsgICAgICAgICAgICAgICAgICAgIFwKIAkJJChvYmopL2t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XJldHVybiBjaGFuZ2VkOworfQorCisvKiBjaGVjayB0aGUgamFjayBzdGF0dXMgZm9yIHBvd2VyIGNvbnRyb2wgKi8KK3N0YXRpYyBib29sIGRldGVjdF9waW5fc3RhdGUoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMsIGhkYV9uaWRfdCBwaW4pCit7CisJaWYgKCFpc19qYWNrX2RldGVjdGFibGUoY29kZWMsIHBpbikpCisJCXJldHVybiB0cnVlOworCXJldHVybiBzbmRfaGRhX2phY2tfZGV0ZWN0X3N0YXRlKGNvZGVjLCBwaW4pICE9IEhEQV9KQUNLX05PVF9QUkVTRU5UOworfQorCisvKiBwb3dlciB1cC9kb3duIHRoZSBwYXRocyBvZiB0aGUgZ2l2ZW4gcGluIGFjY29yZGluZyB0byB0aGUgamFjayBzdGF0ZTsKKyAqIHBvd2VyID0gMC8xIDogb25seSBwb3dlciB1cC9kb3duIGlmIGl0IG1hdGNoZXMgd2l0aCB0aGUgamFjayBzdGF0ZSwKKyAqICAgICAgIDwgMCAgIDogZm9yY2UgcG93ZXIgdXAvZG93biB0byBmb2xsb3cgdGhlIGphY2sgc2F0ZQorICoKKyAqIHJldHVybnMgdGhlIGxhc3QgY2hhbmdlZCBOSUQsIG9yIHplcm8gaWYgdW5jaGFuZ2VkLgorICovCitzdGF0aWMgaGRhX25pZF90IHNldF9waW5fcG93ZXJfamFjayhzdHJ1Y3QgaGRhX2NvZGVjICpjb2RlYywgaGRhX25pZF90IHBpbiwKKwkJCQkgICAgaW50IHBvd2VyKQoreworCWJvb2wgb247CisKKwlpZiAoIWNvZGVjLT5wb3dlcl9zYXZlX25vZGUpCisJCXJldHVybiAwOworCisJb24gPSBkZXRlY3RfcGluX3N0YXRlKGNvZGVjLCBwaW4pOworCisJaWYgKHBvd2VyID49IDAgJiYgb24gIT0gcG93ZXIpCisJCXJldHVybiAwOworCXJldHVybiBzZXRfcGF0aF9wb3dlcihjb2RlYywgcGluLCBvbiwgLTEpOworfQorCitzdGF0aWM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KK307CisKK3N0YXRpYyB2b2lkIG1mbGRfamFja19jaGVjayh1bnNpZ25lZCBpbnQgaW50cl9zdGF0dXMpCit7CisJc3RydWN0IG1mbGRfamFja19kYXRhIGphY2tfZGF0YTsKKworCWlmICghbWZsZF9jb2RlYykKKwkJcmV0dXJuOworCisJamFja19kYXRhLm1mbGRfamFjayA9ICZtZmxkX2phY2s7CisJamFja19kYXRhLmludHJfaWQgPSBpbnRyX3N0YXR1czsKKworCXNuOTUwMzFfamFja19kZXRlY3Rpb24obWZsZF9jb2RlYywgJmphY2tfZGF0YSk7CisJLyogVE9ETzogYWRkIGFtZXJpY2FuIGhlYWRzZXQgZGV0ZWN0aW9uIHBvc3QgZ3Bpb2xpYiBzdXBwb3J0ICovCit9CisKK3N0YXRpYyBpbnQgbWZsZF9pbml0KHN0cnVjdCBzbmRfc29jX3BjbV9ydW50aW1lICpydW50aW1lKQoreworCXN0cnVjdCBzbmRfc29jX2RhcG1fY29udGV4dCAqZGFwbSA9ICZydW50aW1lLT5jYXJkLT5kYXBtOworCWludCByZXRfdmFsOworCisJLyogZGVmYXVsdCBpcyBlYXJwaWVjZSBwaW4sIHVzZXJzcGFjZSBzZXRzIGl0IGV4cGxjaXRseSAqLworCXNuZF9zb2NfZGFwbV9kaXNhYmxlX3BpbihkYXBtLCAiSGVhZHBob25lcyIpOworCS8qIGRlZmF1bHQgaXMgbGluZW91dCBOQywgdXNlcnNwYWNlIHNldHMgaXQgZXhwbGNpdGx5ICovCisJc25kX3NvY19kYXBtX2Rpc2FibGVfcGluKGRhcG0sICJMSU5FT1VUTCIpOworCXNuZF9zb2NfZGFwbV9kaXNhYmxlX3BpbihkYXBtLCAiTElORU9VVFIiKTsKKwlsb19kYWMgPSAzOworCWhzX3N3aXRjaCA9IDA7CisJLyogd2UgZG9udCB1c2UgbGluZWluIGluIHRoaXMgc28gc2V0IHRvIE5DICovCisJc25kX3NvY19kYXBtX2Rpc2FibGVfcGluKGRhcG0sICJMSU5FSU5MIik7Cis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k9IDEsCisJCS5jaGFubmVsc19tYXgJPSA4LAorCX0sCisJLnByb2JlCT0gJmxwYXNzX2NwdV9kYWlfcHJvYmUsCisJLm9wcyAgICA9ICZscGFzc19jcHVfZGFpX29wcywKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3Qgc25kX3NvY19jb21wb25lbnRfZHJpdmVyIGxwYXNzX2NwdV9jb21wX2RyaXZlciA9IHsKKwkubmFtZSA9ICJscGFzcy1jcHUiLAorfTsKKworc3RhdGljIGJvb2wgbHBhc3NfY3B1X3JlZ21hcF93cml0ZWFibGUoc3RydWN0IGRldmljZSAqZGV2LCB1bnNpZ25lZCBpbnQgcmVnKQoreworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IExQQUlGX0kyU19QT1JUX05VTTsgKytpKQorCQlpZiAocmVnID09IExQQUlGX0kyU0NUTF9SRUcoaSkpCisJCQlyZXR1cm4gdHJ1ZTsKKworCWZvciAoaSA9IDA7IGkgPCBMUEFJRl9JUlFfUE9SVF9OVU07ICsraSkgeworCQlpZiAocmVnID09IExQQUlGX0lSUUVOX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX0lSUUNMRUFSX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCX0KKworCWZvciAoaSA9IDA7IGkgPCBMUEFJRl9SRE1BX0NIQU5fTlVNOyArK2kpIHsKKwkJaWYgKHJlZyA9PSBMUEFJRl9SRE1BQ1RMX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFCQVNFX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFCVUZGX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFQRVJfUkVHKGkpKQorCQkJcmV0dXJuIHRydWU7CisJfQorCisJcmV0dXJuIGZhbHNlOworfQorCitzdGF0aWMgYm9vbCBsc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HNuZF9zb2NfZGFpX2xpbmsgKmRhaV9saW5rOworCWludCBudW1fbGlua3M7CisKKwlmb3IgKG51bV9saW5rcyA9IDAsIGRhaV9saW5rID0gY2FyZC0+ZGFpX2xpbms7CisJICAgICBudW1fbGlua3MgPCBjYXJkLT5udW1fbGlua3M7CisJICAgICBudW1fbGlua3MrKywgZGFpX2xpbmsrKykgeworCQlvZl9ub2RlX3B1dChkYWlfbGluay0+Y3B1X29mX25vZGUpOworCQlvZl9ub2RlX3B1dChkYWlfbGluay0+Y29kZWNfb2Zfbm9kZSk7CisJfQorCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJzcmNfY2FyZF9wcm9iZShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQoreworCXN0cnVjdCByc3JjX2NhcmRfcHJpdiAqcHJpdjsKKwlzdHJ1Y3Qgc25kX3NvY19kYWlfbGluayAqZGFpX2xpbms7CisJc3RydWN0IGRldmljZV9ub2RlICpucCA9IHBkZXYtPmRldi5vZl9ub2RlOworCXN0cnVjdCBkZXZpY2UgKmRldiA9ICZwZGV2LT5kZXY7CisJaW50IHJldDsKKworCS8qIEFsbG9jYXRlIHRoZSBwcml2YXRlIGRhdGEgKi8KKwlwcml2ID0gZGV2bV9remFsbG9jKGRldiwgc2l6ZW9mKCpwcml2KSwgR0ZQX0tFUk5FTCk7CisJaWYgKCFwcml2KQorCQlyZXR1cm4gLUVOT01FTTsKKworCS8qIEluaXQgc25kX3NvY19jYXJkICovCisJcHJpdi0+c25kX2NhcmQub3duZXIgPSBUSElTX01PRFVMRTsKKwlwcml2LT5zbmRfY2FyZC5kZXYgPSBkZXY7CisJZGFpX2xpbmsgPSBwcml2LT5kYWlfbGluazsKKwlwcml2LT5zbmRfY2FyZC5kYWlfbGluayA9IGRhaV9saW5rOworCXByaXYtPnNuZF9jYXJkLm51bV9saW5rcyA9IFJTUkNfRkJfTlVNOworCXByaXYtPnNuZF9jYXJkLmNvZGVjX2NvbmYgPSAmc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LwotaW50IHNuZF9zb2NfamFja19uZXcoc3RydWN0IHNuZF9zb2NfY29kZWMgKmNvZGVjLCBjb25zdCBjaGFyICppZCwgaW50IHR5cGUsCi0JCSAgICAgc3RydWN0IHNuZF9zb2NfamFjayAqamFjaykKK2ludCBzbmRfc29jX2NhcmRfamFja19uZXcoc3RydWN0IHNuZF9zb2NfY2FyZCAqY2FyZCwgY29uc3QgY2hhciAqaWQsIGludCB0eXBlLAorCXN0cnVjdCBzbmRfc29jX2phY2sgKmphY2ssIHN0cnVjdCBzbmRfc29jX2phY2tfcGluICpwaW5zLAorCXVuc2lnbmVkIGludCBudW1fcGlucykKIHsKKwlpbnQgcmV0OworCiAJbXV0ZXhfaW5pdCgmamFjay0+bXV0ZXgpOwotCWphY2stPmNvZGVjID0gY29kZWM7CisJamFjay0+Y2FyZCA9IGNhcmQ7CiAJSU5JVF9MSVNUX0hFQUQoJmphY2stPnBpbnMpOwogCUlOSVRfTElTVF9IRUFEKCZqYWNrLT5qYWNrX3pvbmVzKTsKIAlCTE9DS0lOR19JTklUX05PVElGSUVSX0hFQUQoJmphY2stPm5vdGlmaWVyKTsKIAotCXJldHVybiBzbmRfamFja19uZXcoY29kZWMtPmNvbXBvbmVudC5jYXJkLT5zbmRfY2FyZCwgaWQsIHR5cGUsICZqYWNrLT5qYWNrKTsKKwlyZXQgPSBzbmRfamFja19uZXcoY2FyZC0+c25kX2NhcmQsIGlkLCB0eXBlLCAmamFjay0+amFjayk7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKKworCWlmIChudW1fcGlucykKKwkJcmV0dXJuIHNuZF9zb2NfamFja19hZGRfcGlucyhqYWNrLCBudW1fcGlucywgcGlucyk7CisKKwlyZXR1cm4gMDsKIH0KLUVYUE9SVF9TWU1CT0xfR1BMKHNuZF9zb2NfamFja19uZXcpOworRVhQT1JUX1NZTUJPTF9HUEwoc25kX3NvY19jYXJkX2phY2tfbmV3KTsKIAogLyoqCiAgKiBzbmRfc29jX2phY2tfc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EhPTkUsCisJCQkJICAgICAgJnRlZ3JhX21heDk4MDkwX2hwX2phY2ssCisJCQkJICAgICAgdGVncmFfbWF4OTgwOTBfaHBfamFja19waW5zLAorCQkJCSAgICAgIEFSUkFZX1NJWkUodGVncmFfbWF4OTgwOTBfaHBfamFja19waW5zKSk7CiAKIAkJdGVncmFfbWF4OTgwOTBfaHBfamFja19ncGlvLmdwaW8gPSBtYWNoaW5lLT5ncGlvX2hwX2RldDsKIAkJc25kX3NvY19qYWNrX2FkZF9ncGlvcygmdGVncmFfbWF4OTgwOTBfaHBfamFjaywKQEAgLTE1OSwxMSArMTYxLDExIEBACiAJfQogCiAJaWYgKGdwaW9faXNfdmFsaWQobWFjaGluZS0+Z3Bpb19taWNfZGV0KSkgewotCQlzbmRfc29jX2phY2tfbmV3KGNvZGVjLCAiTWljIEphY2siLCBTTkRfSkFDS19NSUNST1BIT05FLAotCQkJCSAmdGVncmFfbWF4OTgwOTBfbWljX2phY2spOwotCQlzbmRfc29jX2phY2tfYWRkX3BpbnMoJnRlZ3JhX21heDk4MDkwX21pY19qYWNrLAotCQkJCSAgICAgIEFSUkFZX1NJWkUodGVncmFfbWF4OTgwOTBfbWljX2phY2tfcGlucyksCi0JCQkJICAgICAgdGVncmFfbWF4OTgwOTBfbWljX2phY2tfcGlucyk7CisJCXNuZF9zb2NfY2FyZF9qYWNrX25ldyhydGQtPmNhcmQsICJNaWMgSmFjayIsCisJCQkJICAgICAgU05EX0pBQ0tfTUlDUk9QSE9ORSwKKwkJCQkgICAgICAmdGVncmFfbWF4OTgwOTBfbWljX2phY2ssCisJCQkJICAgICAgdGVncmFfbWF4OTgwOTBfbWljX2phY2tfcGlucywKKwkJCQkgICAgICBBUlJBWV9TSVpFKHRlZ3JhX21heDk4MDkwX21pY19qYWNrX3BpbnMpKTsKIAogCQl0ZWdyYV9tYXg5ODA5MF9taWNfamFja19ncGlvLmdwaW8gPSBtYWNoaW5lLT5ncGlvX21pY19kZXQ7CiAJCXNuZF9zb2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hhcyBjaGFuZ2VkIGFuZCB1cGRhdGUKKyMgICAgICAgICAgICAgICAgICAgZGVwZW5kZW5jaWVzIGluIHRoZSBjbWQgZmlsZQoraWZfY2hhbmdlZF9kZXAgPSAkKGlmICQoc3RyaXAgJChhbnktcHJlcmVxKSAkKGFyZy1jaGVjaykpLCAgICAgICAgIFwKKwlAc2V0IC1lOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkkKGVjaG8tY21kKSAkKGNtZF8kKDEpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwljYXQgJChkZXBmaWxlKSA+ICQoZG90LXRhcmdldCkuY21kOyAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcmludGYgJyVzXG4nICdjbWRfJEAgOj0gJChtYWtlLWNtZCknID4+ICQoZG90LXRhcmdldCkuY21kKQorCisjIGlmX2NoYW5nZWQgICAgICAtIGV4ZWN1dGUgY29tbWFuZCBpZiBhbnkgcHJlcmVxdWlzaXRlIGlzIG5ld2VyIHRoYW4KKyMgICAgICAgICAgICAgICAgICAgdGFyZ2V0LCBvciBjb21tYW5kIGxpbmUgaGFzIGNoYW5nZWQKK2lmX2NoYW5nZWQgPSAkKGlmICQoc3RyaXAgJChhbnktcHJlcmVxKSAkKGFyZy1jaGVjaykpLCAgICAgICAgICAgICBcCisJQHNldCAtZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJJChlY2hvLWNtZCkgJChjbWRfJCgxKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJcHJpbnRmICclc1xuJyAnY21kXyRAIDo9ICQobWFrZS1jbWQpJyA+ICQoZG90LXRhcmdldCkuY21kKQorCisjIyMKKyMgQyBmbGFncyB0byBiZSB1c2VkIGluIHJ1bGUgZGVmaW5pdGlvbnMsIGluY2x1ZGVzOgorIyAtIGRlcGZpbGUgZ2VuZXJhdGlv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uZWxzW2tdLnNjYWxlKTsKKworCQkJfQorCQkJYnJlYWs7CisJCWNhc2UgODoKKwkJCWlmIChjaGFubmVsc1trXS5pc19zaWduZWQpIHsKKwkJCQlpbnQ2NF90IHZhbCA9ICooaW50NjRfdCAqKQorCQkJCQkoZGF0YSArCisJCQkJCSBjaGFubmVsc1trXS5sb2NhdGlvbik7CisJCQkJaWYgKCh2YWwgPj4gY2hhbm5lbHNba10uYml0c191c2VkKSAmIDEpCisJCQkJCXZhbCA9ICh2YWwgJiBjaGFubmVsc1trXS5tYXNrKSB8CisJCQkJCQl+Y2hhbm5lbHNba10ubWFzazsKKwkJCQkvKiBzcGVjaWFsIGNhc2UgZm9yIHRpbWVzdGFtcCAqLworCQkJCWlmIChjaGFubmVsc1trXS5zY2FsZSA9PSAxLjBmICYmCisJCQkJICAgIGNoYW5uZWxzW2tdLm9mZnNldCA9PSAwLjBmKQorCQkJCQlwcmludGYoIiUiIFBSSWQ2NCAiICIsIHZhbCk7CisJCQkJZWxzZQorCQkJCQlwcmludGYoIiUwNWYgIiwgKChmbG9hdCl2YWwgKworCQkJCQkJCSBjaGFubmVsc1trXS5vZmZzZXQpKgorCQkJCQkgICAgICAgY2hhbm5lbHNba10uc2NhbGUpOworCQkJfQorCQkJYnJlYWs7CisJCWRlZmF1bHQ6CisJCQlicmVhazsKKwkJfQorCXByaW50ZigiXG4iKTsKK30KKworaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KQoreworCXVuc2lnbmVkIGxvbmcgbnVtX2xvb3BzID0gMjsKKwl1bnNpZ25lZCBsb25nIHRpbWVkZWxheSA9IDEwMDAwMDA7CisJdW5zaWduZWQgbG9uZyBidWZfbGVuID0gMTI4OworCisJaW50IHJldCwgYywgaSwgaiwgdG9yZWFkOworCWludCBmcDsKKworCWludCBudW1fY2hhbm5lbHM7CisJY2hhciAqdHJpZ2dlcl9uYW1lID0gTlVMTCwgKmRldmljZV9uYW1lID0gTlVMTDsKKwljaGFyICpkZX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UFVUKWxpYmxvY2tkZXAuYSAkKE9VVFBVVClsaWJsb2NrZGVwLnNvLiQoTElCTE9DS0RFUF9WRVJTSU9OKQogCiBDT05GSUdfSU5DTFVERVMgPQogQ09ORklHX0xJQlMJPQpAQCAtMTA4LDMzICs3NywyMyBAQAogCiAjIFNldCBjb21waWxlIG9wdGlvbiBDRkxBR1MgaWYgbm90IHNldCBlbHNld2hlcmUKIENGTEFHUyA/PSAtZyAtRENPTkZJR19MT0NLREVQIC1EQ09ORklHX1NUQUNLVFJBQ0UgLURDT05GSUdfUFJPVkVfTE9DS0lORyAtREJJVFNfUEVSX0xPTkc9X19XT1JEU0laRSAtRExJQkxPQ0tERVBfVkVSU0lPTj0nIiQoTElCTE9DS0RFUF9WRVJTSU9OKSInIC1yZHluYW1pYyAtTzAgLWcKK0NGTEFHUyArPSAtZlBJQwogCiBvdmVycmlkZSBDRkxBR1MgKz0gJChDT05GSUdfRkxBR1MpICQoSU5DTFVERVMpICQoUExVR0lOX0RJUl9TUSkKIAogaWZlcSAoJChWRVJCT1NFKSwxKQogICBRID0KLSAgcHJpbnRfY29tcGlsZSA9Ci0gIHByaW50X2FwcF9idWlsZCA9Ci0gIHByaW50X2ZwaWNfY29tcGlsZSA9CiAgIHByaW50X3NoYXJlZF9saWJfY29tcGlsZSA9CiAgIHByaW50X2luc3RhbGwgPQogZWxzZQogICBRID0gQAotICBwcmludF9jb21waWxlID0JCWVjaG8gJyAgQ0MgICAgICAgICAgICAgICAgICckKE9CSik7Ci0gIHByaW50X2FwcF9idWlsZCA9CQllY2hvICcgIEJVSUxEICAgICAgICAgICAgICAnJChPQkopOwotICBwcmludF9mcGljX2NvbXBpbGUgPQkJZWNobyAnICBDQyBGUElDICAgICAgICAgICAgJyQoT0JKKTsKLSAgcHJpbnRfc2hhcmVkX2xpYl9jb21waWxlID0JZWNobyAnICBCVUlMRCBTSEFSRUQgTElCICAgJyQoT0JKKTsKLSAgcHJpbnRfc3RhdGljX2xpYl9idWlsZCA9C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ICAgICAgIFBZVEhPTl9DT05GSUdfU1EgOj0gJChjYWxsIHNoZWxsLXNxLCQoUFlUSE9OX0NPTkZJRykpCkBAIC01NDAsNyArNDU3LDcgQEAKICAgICAgIEZMQUdTX1BZVEhPTl9FTUJFRCA6PSAkKFBZVEhPTl9FTUJFRF9DQ09QVFMpICQoUFlUSE9OX0VNQkVEX0xET1BUUykKIAogICAgICAgaWZuZXEgKCQoZmVhdHVyZS1saWJweXRob24pLCAxKQotICAgICAgICAkKGNhbGwgZGlzYWJsZS1weXRob24sUHl0aG9uLmggKGZvciBQeXRob24gMi54KSkKKyAgICAgICAgJChjYWxsIGRpc2FibGUtcHl0aG9uLE5vICdQeXRob24uaCcgKGZvciBQeXRob24gMi54IHN1cHBvcnQpIHdhcyBmb3VuZDogZGlzYWJsZXMgUHl0aG9uIHN1cHBvcnQgLSBwbGVhc2UgaW5zdGFsbCBweXRob24tZGV2ZWwvcHl0aG9uLWRldikKICAgICAgIGVsc2UKIAogICAgICAgICBpZm5lcSAoJChmZWF0dXJlLWxpYnB5dGhvbi12ZXJzaW9uKSwgMSkKQEAgLTU2MCw2ICs0NzcsNyBAQAogICAgICAgICAgIExERkxBR1MgKz0gJChQWVRIT05fRU1CRURfTERGTEFHUykKICAgICAgICAgICBFWFRMSUJTICs9ICQoUFlUSE9OX0VNQkVEX0xJQkFERCkKICAgICAgICAgICBMQU5HX0JJTkRJTkdTICs9ICQob2JqLXBlcmYpcHl0aG9uL3BlcmYuc28KKyAgICAgICAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX0xJQlBZVEhPTikKICAgICAgICAgZW5kaWYKICAgICAgIGVuZGlmCiAgICAgZW5kaWYKQEAgLTYwMCw3ICs1MTgsNyBAQAogICAgICAgICAgICAgRVhUTElCUyArPSAtbGliZXJ0eQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ESEFWRV9DUExVU19ERU1BTkdMRV9TVVBQT1JUCiAgICAgICAgICAgZWxzZQotICAgICAgICAgICAg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ncm91cC5vCitsaWJwZXJmLXkgKz0gdGFyZ2V0Lm8KK2xpYnBlcmYteSArPSByYmxpc3QubworbGlicGVyZi15ICs9IGludGxpc3QubworbGlicGVyZi15ICs9IHZkc28ubworbGlicGVyZi15ICs9IHN0YXQubworbGlicGVyZi15ICs9IHJlY29yZC5vCitsaWJwZXJmLXkgKz0gc3JjbGluZS5vCitsaWJwZXJmLXkgKz0gZGF0YS5vCitsaWJwZXJmLSQoQ09ORklHX1g4NikgKz0gdHNjLm8KK2xpYnBlcmYteSArPSBjbG9leGVjLm8KK2xpYnBlcmYteSArPSB0aHJlYWQtc3RhY2subworCitsaWJwZXJmLSQoQ09ORklHX0xJQkVMRikgKz0gc3ltYm9sLWVsZi5vCitsaWJwZXJmLSQoQ09ORklHX0xJQkVMRikgKz0gcHJvYmUtZXZlbnQubworCitpZm5kZWYgQ09ORklHX0xJQkVMRgorbGlicGVyZi15ICs9IHN5bWJvbC1taW5pbWFsLm8KK2VuZGlmCisKK2xpYnBlcmYtJChDT05GSUdfRFdBUkYpICs9IHByb2JlLWZpbmRlci5vCitsaWJwZXJmLSQoQ09ORklHX0RXQVJGKSArPSBkd2FyZi1hdXgubworCitsaWJwZXJmLSQoQ09ORklHX0xJQkRXX0RXQVJGX1VOV0lORCkgKz0gdW53aW5kLWxpYmR3Lm8KK2xpYnBlcmYtJChDT05GSUdfTElCVU5XSU5EKSAgICAgICAgICArPSB1bndpbmQtbGlidW53aW5kLm8KKworbGlicGVyZi0kKENPTkZJR19MSUJCQUJFTFRSQUNFKSArPSBkYXRhLWNvbnZlcnQtYnQubworCitsaWJwZXJmLXkgKz0gc2NyaXB0aW5nLWVuZ2luZXMvCisKK2xpYnBlcmYtJChDT05GSUdfUEVSRl9SRUdTKSArPSBwZXJmX3JlZ3MubworbGlicGVyZi0kKENPTkZJR19aTElCKSArPSB6bGliLm8KK2xpYnBlcmYtJChDT05GSUdfTFpNQSkgKz0gbHptYS5vCisKK0NGTEFHU19jb25maWcubyAgICs9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aCgiIiwgbW50KTsKKworCXJldHVybiBtbnQ7Cit9CisKK3N0YXRpYyBjb25zdCBjaGFyICpfX3BlcmZfZGVidWdmc19tb3VudChjb25zdCBjaGFyICptb3VudHBvaW50KQogewogCWNvbnN0IGNoYXIgKm1udDsKIApAQCAtMzE3LDcgKzMzNywyMCBAQAogCWlmICghbW50KQogCQlyZXR1cm4gTlVMTDsKIAotCXNldF90cmFjaW5nX2V2ZW50c19wYXRoKG1udCk7CisJc2V0X3RyYWNpbmdfZXZlbnRzX3BhdGgoInRyYWNpbmcvIiwgbW50KTsKKworCXJldHVybiBtbnQ7Cit9CisKK2NvbnN0IGNoYXIgKnBlcmZfZGVidWdmc19tb3VudChjb25zdCBjaGFyICptb3VudHBvaW50KQoreworCWNvbnN0IGNoYXIgKm1udDsKKworCW1udCA9IF9fcGVyZl90cmFjZWZzX21vdW50KG1vdW50cG9pbnQpOworCWlmIChtbnQpCisJCXJldHVybiBtbnQ7CisKKwltbnQgPSBfX3BlcmZfZGVidWdmc19tb3VudChtb3VudHBvaW50KTsKIAogCXJldHVybiBtbnQ7CiB9CkBAIC0zMjUsMTIgKzM1OCwxOSBAQAogdm9pZCBwZXJmX2RlYnVnZnNfc2V0X3BhdGgoY29uc3QgY2hhciAqbW50cHQpCiB7CiAJc25wcmludGYoZGVidWdmc19tb3VudHBvaW50LCBzdHJsZW4oZGVidWdmc19tb3VudHBvaW50KSwgIiVzIiwgbW50cHQpOwotCXNldF90cmFjaW5nX2V2ZW50c19wYXRoKG1udHB0KTsKKwlzZXRfdHJhY2luZ19ldmVudHNfcGF0aCgidHJhY2luZy8iLCBtbnRwdCk7Cit9CisKK3N0YXRpYyBjb25zdCBjaGFyICpmaW5kX3RyYWNlZnModm9pZCkKK3sKKwljb25zdCBjaGFyICpwYXRoID0gX19wZXJmX3RyYWNlZnNfbW91bnQoTlVMTCk7CisKKwlyZXR1cm4gcGF0aDsKIH0KIAogc3RhdGljIGNvbnN0IGNoYXIgKmZpbmRfZGVidW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VIEF2Z19NSHogICAlQnVzeSBCenlfTUh6IFRTQ19NSHogICAgIFNNSSAgQ1BVJWMxICBDUFUlYzMgIENQVSVjNiAgQ1BVJWM3IENvcmVUbXAgIFBrZ1RtcCBQa2clcGMyIFBrZyVwYzMgUGtnJXBjNiBQa2clcGM3IFBrZ1dhdHQgQ29yV2F0dCBHRlhXYXR0IAotICAgICAgIC0gICAgICAgLSAgICAgICA2ICAgIDAuMzYgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC41OSAgICAwLjAxICAgOTkuMDQgICAgMC4wMCAgICAgIDIzICAgICAgMjQgICAyMy44MiAgICAwLjAxICAgNzIuNDcgICAgMC4wMCAgICA2LjQwICAgIDEuMDEgICAgMC4wMAotICAgICAgIDAgICAgICAgMCAgICAgICA5ICAgIDAuNTggICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC4yOCAgICAwLjAxICAgOTkuMTMgICAgMC4wMCAgICAgIDIzICAgICAgMjQgICAyMy44MiAgICAwLjAxICAgNzIuNDcgICAgMC4wMCAgICA2LjQwICAgIDEuMDEgICAgMC4wMAotICAgICAgIDAgICAgICAgNCAgICAgICAxICAgIDAuMDcgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC43OQotICAgICAgIDEgICAgICAgMSAgICAgIDEwICAgIDAuNjUgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC41OSAgICAwLjAwICAgOTguNzYgICAgMC4wMCAgICAgIDIzCi0gICAgICAgMSAgICAgICA1ICAgICAgIDUgICAgMC4yOCAgICAxNTk2ICAgIDM0OTIgICAgICAgMCAgICAwLjk1Ci0gICAgICAgMiAgICAgICAyICAgICAgMTAgICAgMC42NiAgICAxNTk2ICAgIDM0OTIgICAgICAgMCAgICAwLjQxICAgIDAuMDEgICA5OC45MiAgICAwLjAwICAgICAgMjMKLSAgICAgICAyICAgICAgIDYgICAgICAgMiAgICAwLjEwICAgIDE1OTcgICAgMzQ5MiAgICAgICAwICAgIDAuOTcKL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42NSAgICAwLjAwCi0gICAgICAgMCAgICAgICAwICAgICAgMjIgICAgMC41NyAgICAzODMwICAgIDM0OTIgICAgICAgMCAgICAwLjgzICAgIDAuMDIgICA5OC41OSAgICAwLjAwICAgICAgMjcgICAgICAzNiAgICAwLjAwICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgMjMuMTUgICAxNy42NSAgICAwLjAwCi0gICAgICAgMCAgICAgICA0ICAgICAgIDkgICAgMC4yNCAgICAzODI5ICAgIDM0OTIgICAgICAgMCAgICAxLjE1Ci0gICAgICAgMSAgICAgICAxICAgICAgIDQgICAgMC4wOSAgICAzNzgzICAgIDM0OTIgICAgICAgMCAgIDk5LjkxICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgICAgMzYKLSAgICAgICAxICAgICAgIDUgICAgMzg4MCAgIDk5LjgyICAgIDM4ODggICAgMzQ5MiAgICAgICAwICAgIDAuMTgKLSAgICAgICAyICAgICAgIDIgICAgICAxNyAgICAwLjQ0ICAgIDM4MTMgICAgMzQ5MiAgICAgICAwICAgIDAuNzcgICAgMC4wNCAgIDk4Ljc1ICAgIDAuMDAgICAgICAyOAotICAgICAgIDIgICAgICAgNiAgICAgIDEyICAgIDAuMzIgICAgMzgyMyAgICAzNDkyICAgICAgIDAgICAgMC44OQotICAgICAgIDMgICAgICAgMyAgICAgIDE2ICAgIDAuNDMgICAgMzg0NCAgICAzNDkyICAgICAgIDAgICAgMC42MyAgICAwLjExICAgOTguODQgICAgMC4wMCAgICAgIDMwCi0gICAgICAgMyAgICAgICA3ICAgICAgIDQgICAgMC4xMSAgICAzODI3ICAgIDM0OTIgICAgICAgMCAgICAwLjk0Ci0zMC4zNzIyNDMgc2VjCisgICAgIENQVSBBdmdfTUh6ICAgJUJ1c3kgQnp5X01IeiBUU0NfTUh6CisgICAgICAgLSAgICAgNDgyICAgMTIuNTEgICAgMzg1NCAgICAzNDk4CisgICAgICAgMCAgICAgICAwICAgIDAuMDEgICAgMTk2MCAgICAzNDk4C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SxyMTUsMzIJIyBjaGVjayBMUgorCW1mbHIgICAgcjEwCisJY21wZCAgICByOSxyMTAKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsNQkjIGNoZWNrIHI1CisJY21wZCAgICByOSxyNQorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSw2CSMgY2hlY2sgcjYKKwljbXBkICAgIHI5LHI2CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDcJIyBjaGVjayByNworCWNtcGQgICAgcjkscjcKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsOAkjIGNoZWNrIHI4CisJY21wZCAgICByOSxyOAorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxMwkjIGNoZWNrIHIxMworCWNtcGQgICAgcjkscjEzCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDE0CSMgY2hlY2sgcjE0CisJY21wZCAgICByOSxyMTQKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTYJIyBjaGVjayByMTYKKwljbXBkICAgIHI5LHIxNgorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxNwkjIGNoZWNrIHIxNworCWNtcGQgICAgcjkscjE3CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDE4CSMgY2hlY2sgcjE4CisJY21wZCAgICByOSxyMTgKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTkJIyBjaGVjayByMTkKKwljbXBkICAgIHI5LHIxOQorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyMAkjIGNoZWNrIHIyMAorCWNtcGQgICAgcjkscjIwCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDIxCSMgY2hlY2sgcjIxCisJY21wZCAgICByOSxyMjEKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjIJIyBjaGVjayByMjIKKwljbXBkICAgIHI5LHIyMgorCWJuZSAgICAgMWYKKw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7Cit9CitzdGF0aWMgaW5saW5lIGludCBrc2Z0X2V4aXRfZmFpbCh2b2lkKQoreworCWV4aXQoMSk7Cit9CisjZW5kaWYKKworaW50IHNldF90YWkoaW50IG9mZnNldCkKK3sKKwlzdHJ1Y3QgdGltZXggdHg7CisKKwltZW1zZXQoJnR4LCAwLCBzaXplb2YodHgpKTsKKworCXR4Lm1vZGVzID0gQURKX1RBSTsKKwl0eC5jb25zdGFudCA9IG9mZnNldDsKKworCXJldHVybiBhZGp0aW1leCgmdHgpOworfQorCitpbnQgZ2V0X3RhaSh2b2lkKQoreworCXN0cnVjdCB0aW1leCB0eDsKKworCW1lbXNldCgmdHgsIDAsIHNpemVvZih0eCkpOworCisJYWRqdGltZXgoJnR4KTsKKwlyZXR1cm4gdHgudGFpOworfQorCitpbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpCit7CisJaW50IGksIHJldDsKKworCXJldCA9IGdldF90YWkoKTsKKwlwcmludGYoInRhaSBvZmZzZXQgc3RhcnRlZCBhdCAlaVxuIiwgcmV0KTsKKworCXByaW50ZigiQ2hlY2tpbmcgdGFpIG9mZnNldHMgY2FuIGJlIHByb3Blcmx5IHNldDogIik7CisJZm9yIChpID0gMTsgaSA8PSA2MDsgaSsrKSB7CisJCXJldCA9IHNldF90YWkoaSk7CisJCXJldCA9IGdldF90YWkoKTsKKwkJaWYgKHJldCAhPSBpKSB7CisJCQlwcmludGYoIltGQUlMRURdIGV4cGVjdGVkOiAlaSBnb3QgJWlcbiIsIGksIHJldCk7CisJCQlyZXR1cm4ga3NmdF9leGl0X2ZhaWwoKTsKKwkJfQorCX0KKwlwcmludGYoIltPS11cbiIpOworCXJldHVybiBrc2Z0X2V4aXRfcGFzcygpOworfQpkaWZmIC0tZ2l0IGEvdG9vbHMvdGVzdGluZy9zZWxmdGVzdHMvdGltZXJzL3NldC10aW1lci1sYXQuYyBiL3Rvb2xzL3Rlc3Rpbmcvc2VsZnRlc3RzL3RpbWVycy9zZXQtd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yZWdzLCBzaXplb2YoZ3JlZ3NldF90KSk7CisKKwlzaWdfdHJhcHBlZCA9IHNpZzsKK30KKworLyoKKyAqIENoZWNrcyBhIGdpdmVuIHNlbGVjdG9yIGZvciBpdHMgY29kZSBiaXRuZXNzIG9yIHJldHVybnMgLTEgaWYgaXQncyBub3QKKyAqIGEgdXNhYmxlIGNvZGUgc2VnbWVudCBzZWxlY3Rvci4KKyAqLworaW50IGNzX2JpdG5lc3ModW5zaWduZWQgc2hvcnQgY3MpCit7CisJdWludDMyX3QgdmFsaWQgPSAwLCBhcjsKKwlhc20gKCJsYXIgJVtjc10sICVbYXJdXG5cdCIKKwkgICAgICJqbnogMWZcblx0IgorCSAgICAgIm1vdiAkMSwgJVt2YWxpZF1cblx0IgorCSAgICAgIjE6IgorCSAgICAgOiBbYXJdICI9ciIgKGFyKSwgW3ZhbGlkXSAiK3JtIiAodmFsaWQpCisJICAgICA6IFtjc10gInIiIChjcykpOworCisJaWYgKCF2YWxpZCkKKwkJcmV0dXJuIC0xOworCisJYm9vbCBkYiA9IChhciAmICgxIDw8IDIyKSk7CisJYm9vbCBsID0gKGFyICYgKDEgPDwgMjEpKTsKKworCWlmICghKGFyICYgKDE8PDExKSkpCisJICAgIHJldHVybiAtMTsJLyogTm90IGNvZGUuICovCisKKwlpZiAobCAmJiAhZGIpCisJCXJldHVybiA2NDsKKwllbHNlIGlmICghbCAmJiBkYikKKwkJcmV0dXJuIDMyOworCWVsc2UgaWYgKCFsICYmICFkYikKKwkJcmV0dXJuIDE2OworCWVsc2UKKwkJcmV0dXJuIC0xOwkvKiBVbmtub3duIGJpdG5lc3MuICovCit9CisKKy8qIEZpbmRzIGEgdXNhYmxlIGNvZGUgc2VnbWVudCBvZiB0aGUgcmVxdWVzdGVkIGJpdG5lc3MuICovCitpbnQgZmluZF9jcyhpbnQgYml0bmVzcykKK3sKKwl1bnNpZ25lZCBzaG9ydCBteV9jczsKKworCWFzbSAoIm1vdiAlJWNzLCUwIiA6ICAiPX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SURUIjsKKwkJCWVsc2UKKwkJCQl0YWJsZSA9ICI/Pz8iOworCisJCQlzcHJpbnRmKGVycmRlc2MsICIlcyVzIGluZGV4ICVkLCAiLAorCQkJCXRhYmxlLCBzcmMsIHNpZ19lcnIgPj4gMyk7CisJCX0KKworCQljaGFyIHRyYXBuYW1lWzMyXTsKKwkJaWYgKHNpZ190cmFwbm8gPT0gMTMpCisJCQlzdHJjcHkodHJhcG5hbWUsICJHUCIpOworCQllbHNlIGlmIChzaWdfdHJhcG5vID09IDExKQorCQkJc3RyY3B5KHRyYXBuYW1lLCAiTlAiKTsKKwkJZWxzZSBpZiAoc2lnX3RyYXBubyA9PSAxMikKKwkJCXN0cmNweSh0cmFwbmFtZSwgIlNTIik7CisJCWVsc2UgaWYgKHNpZ190cmFwbm8gPT0gMzIpCisJCQlzdHJjcHkodHJhcG5hbWUsICJJUkVUIik7ICAvKiBYODZfVFJBUF9JUkVUICovCisJCWVsc2UKKwkJCXNwcmludGYodHJhcG5hbWUsICIlZCIsIHNpZ190cmFwbm8pOworCisJCXByaW50ZigiW09LXVx0R290ICMlcygweCVseCkgKGkuZS4gJXMlcylcbiIsCisJCSAgICAgICB0cmFwbmFtZSwgKHVuc2lnbmVkIGxvbmcpc2lnX2VyciwKKwkJICAgICAgIGVycmRlc2MsIHN0cnNpZ25hbChzaWdfdHJhcHBlZCkpOworCQlyZXR1cm4gMDsKKwl9IGVsc2UgeworCQlwcmludGYoIltGQUlMXVx0RGlkIG5vdCBnZXQgU0lHU0VHVlxuIik7CisJCXJldHVybiAxOworCX0KK30KKworaW50IG1haW4oKQoreworCWludCB0b3RhbF9uZXJycyA9IDA7CisJdW5zaWduZWQgc2hvcnQgbXlfY3MsIG15X3NzOworCisJYXNtIHZvbGF0aWxlICgibW92ICUlY3MsJTAiIDogIj1yIiAobXlfY3MpKTsKKwlhc20gdm9sYXRpbGUgKCJtb3YgJSVzcywlMCIgOiAiPXIiIChteV9zcykpOworCXNldHVwX2xkdCgpOworCisJ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