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AgICAgICAgICAgInFjb20scG04OTQxIiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg4NDEiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtYTgwODQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODAxOSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04MjI2IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgxMTAiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtYTgwODQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtaTg5NjIiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtZDk2MzUiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODk5NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1pODk5NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTE2IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgwMDQiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODkwOSIsCisgICAgICAgICAgICAgICAgICAgb3IgZ2VuZXJhbGl6ZWQgInFjb20sc3BtaS1wbWljIi4KIC0gcmVnOiAgICAgICAgICAgICBTcGVjaWZpZXMgdGhlIFNQTUkgVVNJRCBzbGF2ZSBhZGRyZXNzIGZvciB0aGlzIGRldmljZS4KICAgICAgICAgICAgICAgICAgICBGb3IgbW9yZSBpbmZvcm1hdGlvbiBzZWU6CiAgICAgICAgICAgICAgICAgICAgRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3NwbWkvc3BtaS50eHQKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9tZmQvcWNvbS1ycG0udHh0IGIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL21mZC9xY29tLXJwbS50eHQKaW5kZXggODVlMzE5OC4uNWU5N2E5NSAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlv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OworCQlzdGF0dXMgPSAib2theSI7CisJfTsKKworCXRoZXJtYWwtem9uZXMgeworCQljcHVfdGhlcm1hbDogY3B1LXRoZXJtYWwgeworCQkJY29vbGluZy1tYXBzIHsKKwkJCQltYXAwIHsKKwkJCQkgICAgIC8qIENvcnJlc3BvbmRzIHRvIDgwME1IeiBhdCBmcmVxX3RhYmxlICovCisJCQkJICAgICBjb29saW5nLWRldmljZSA9IDwmY3B1MCA3IDc+OworCQkJCX07CisJCQkJbWFwMSB7CisJCQkJICAgICAvKiBDb3JyZXNwb25kcyB0byAyMDBNSHogYXQgZnJlcV90YWJsZSAqLworCQkJCSAgICAgY29vbGluZy1kZXZpY2UgPSA8JmNwdTAgMTMgMTM+OworCQkJICAgICAgIH07CisJCSAgICAgICB9OworCQl9OworCX07CisKKwltaXhlcjogbWl4ZXJAMTJDMTAwMDAgeworCQlzdGF0dXMgPSAib2theSI7CisJfTsKKworCWhkbWlAMTJEMDAwMDAgeworCQlocGQtZ3BpbyA9IDwmZ3B4MyA3IDA+OworCQlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCQlwaW5jdHJsLTAgPSA8JmhkbWlfaHBkPjsKKwkJdmRkLXN1cHBseSA9IDwmbGRvOF9yZWc+OworCQl2ZGRfb3NjLXN1cHBseSA9IDwmbGRvMTBfcmVnPjsKKwkJdmRkX3BsbC1zdXBwbHkgPSA8JmxkbzhfcmVnPjsKKwkJZGRjID0gPCZoZG1pX2RkYz47CisJCXN0YXR1cyA9ICJva2F5IjsKKwl9OworCisJaGRtaV9kZGM6IGkyY0AxMzg4MDAwMCB7CisJCXN0YXR1cyA9ICJva2F5IjsKKwkJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwkJcGluY3RybC0wID0gPCZpMmMyX2J1cz47CisJfTsKKworCWkyY0AxMzhFMDAwMCB7CisJCXN0YXR1cyA9ICJva2F5IjsKKwl9OwogfTsKIAogJnBpbmN0cmxfMSB7CkBAIC00MjUsNCArNDg0LDk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bW11LmMgYi9hcmNoL3Bvd2VycGMva2VybmVsL2lvbW11LmMKaW5kZXggNWQzOTY4Yy4uYjA1NGYzMyAxMDA2NDQKLS0tIGEvYXJjaC9wb3dlcnBjL2tlcm5lbC9pb21tdS5jCisrKyBiL2FyY2gvcG93ZXJwYy9rZXJuZWwvaW9tbXUuYwpAQCAtMTE3NSw0ICsxMTc1LDMwIEBACiB9CiBFWFBPUlRfU1lNQk9MX0dQTChpb21tdV9kZWxfZGV2aWNlKTsKIAorc3RhdGljIGludCB0Y2VfaW9tbXVfYnVzX25vdGlmaWVyKHN0cnVjdCBub3RpZmllcl9ibG9jayAqbmIsCisgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBhY3Rpb24sIHZvaWQgKmRhdGEpCit7CisgICAgICAgIHN0cnVjdCBkZXZpY2UgKmRldiA9IGRhdGE7CisKKyAgICAgICAgc3dpdGNoIChhY3Rpb24pIHsKKyAgICAgICAgY2FzZSBCVVNfTk9USUZZX0FERF9ERVZJQ0U6CisgICAgICAgICAgICAgICAgcmV0dXJuIGlvbW11X2FkZF9kZXZpY2UoZGV2KTsKKyAgICAgICAgY2FzZSBCVVNfTk9USUZZX0RFTF9ERVZJQ0U6CisgICAgICAgICAgICAgICAgaWYgKGRldi0+aW9tbXVfZ3JvdXApCisgICAgICAgICAgICAgICAgICAgICAgICBpb21tdV9kZWxfZGV2aWNlKGRldik7CisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgIH0KK30KKworc3RhdGljIHN0cnVjdCBub3RpZmllcl9ibG9jayB0Y2VfaW9tbXVfYnVzX25iID0geworICAgICAgICAubm90aWZpZXJfY2FsbCA9IHRjZV9pb21tdV9idXNfbm90aWZpZXIsCit9OworCitpbnQgX19pbml0IHRjZV9pb21tdV9idXNfbm90aWZpZXJfaW5pdCh2b2lkKQoreworICAgICAgICBidXNfcmVnaXN0ZX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F9pbnN0ciAqYSwgdTggKm9yaWdfaW5zbiwgdTggKnJlcGxfaW5zbiwgdTggKmluc25idWYpCit7CisJdTggKm5leHRfcmlwLCAqdGd0X3JpcDsKKwlzMzIgbl9kc3BsLCBvX2RzcGw7CisJaW50IHJlcGxfbGVuOworCisJaWYgKGEtPnJlcGxhY2VtZW50bGVuICE9IDUpCisJCXJldHVybjsKKworCW9fZHNwbCA9ICooczMyICopKGluc25idWYgKyAxKTsKKworCS8qIG5leHRfcmlwIG9mIHRoZSByZXBsYWNlbWVudCBKTVAgKi8KKwluZXh0X3JpcCA9IHJlcGxfaW5zbiArIGEtPnJlcGxhY2VtZW50bGVuOworCS8qIHRhcmdldCByaXAgb2YgdGhlIHJlcGxhY2VtZW50IEpNUCAqLworCXRndF9yaXAgID0gbmV4dF9yaXAgKyBvX2RzcGw7CisJbl9kc3BsID0gdGd0X3JpcCAtIG9yaWdfaW5zbjsKKworCURQUklOVEsoInRhcmdldCBSSVA6ICVwLCBuZXdfZGlzcGw6IDB4JXgiLCB0Z3RfcmlwLCBuX2RzcGwpOworCisJaWYgKHRndF9yaXAgLSBvcmlnX2luc24gPj0gMCkgeworCQlpZiAobl9kc3BsIC0gMiA8PSAxMjcpCisJCQlnb3RvIHR3b19ieXRlX2ptcDsKKwkJZWxzZQorCQkJZ290byBmaXZlX2J5dGVfam1wOworCS8qIG5lZ2F0aXZlIG9mZnNldCAqLworCX0gZWxzZSB7CisJCWlmICgoKG5fZHNwbCAtIDIpICYgMHhmZikgPT0gKG5fZHNwbCAtIDIpKQorCQkJZ290byB0d29fYnl0ZV9qbXA7CisJCWVsc2UKKwkJCWdvdG8gZml2ZV9ieXRlX2ptcDsKKwl9CisKK3R3b19ieXRlX2ptcDoKKwluX2RzcGwgLT0gMjsKKworCWluc25idWZbMF0gPSAweGViOworCWluc25idWZbMV0gPSAoczgpbl9kc3BsOworCWFkZF9ub3BzKGluc25idWYgKyAyLCAzKTsKKworCXJlcGxfbGVuID0gMjsKKwlnb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BpbnQgdmFsKSwKKworCVRQX0FSR1MobWFwLCByZWcsIHZhbCkKKworKTsKKworREVGSU5FX0VWRU5UKHJlZ21hcF9yZWcsIHJlZ21hcF9yZWdfcmVhZF9jYWNoZSwKKworCVRQX1BST1RPKHN0cnVjdCByZWdtYXAgKm1hcCwgdW5zaWduZWQgaW50IHJlZywKKwkJIHVuc2lnbmVkIGludCB2YWwpLAorCisJVFBfQVJHUyhtYXAsIHJlZywgdmFsKQorCispOworCitERUNMQVJFX0VWRU5UX0NMQVNTKHJlZ21hcF9ibG9jaywKKworCVRQX1BST1RPKHN0cnVjdCByZWdtYXAgKm1hcCwgdW5zaWduZWQgaW50IHJlZywgaW50IGNvdW50KSwKKworCVRQX0FSR1MobWFwLCByZWcsIGNvdW50KSwKKworCVRQX1NUUlVDVF9fZW50cnkoCisJCV9fc3RyaW5nKAluYW1lLAkJcmVnbWFwX25hbWUobWFwKQkpCisJCV9fZmllbGQoCXVuc2lnbmVkIGludCwJcmVnCQkJKQorCQlfX2ZpZWxkKAlpbnQsCQljb3VudAkJCSkKKwkpLAorCisJVFBfZmFzdF9hc3NpZ24oCisJCV9fYXNzaWduX3N0cihuYW1lLCByZWdtYXBfbmFtZShtYXApKTsKKwkJX19lbnRyeS0+cmVnID0gcmVnOworCQlfX2VudHJ5LT5jb3VudCA9IGNvdW50OworCSksCisKKwlUUF9wcmludGsoIiVzIHJlZz0leCBjb3VudD0lZCIsIF9fZ2V0X3N0cihuYW1lKSwKKwkJICAodW5zaWduZWQgaW50KV9fZW50cnktPnJlZywKKwkJICAoaW50KV9fZW50cnktPmNvdW50KQorKTsKKworREVGSU5FX0VWRU5UKHJlZ21hcF9ibG9jaywgcmVnbWFwX2h3X3JlYWRfc3RhcnQsCisKKwlUUF9QUk9UTyhzdHJ1Y3QgcmVnbWFwICptYXAsIHVuc2lnbmVkIGludCByZWcsIGludCBjb3VudCksCisKKwlUUF9BUkdTKG1hcCwgcmVnLCBjb3VudCkKKyk7CisKK0RFRklORV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ICAgICAgICAgKi8KLQkweDg1LCAweDA3LCAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoNyksICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgwOSwgMHgyMCwgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoU3R5bHVzKSwgICAgICAgICAgICAgICAgICAgICAqLwotCTB4QTAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgQ29sbGVjdGlvbiAoUGh5c2ljYWwpLCAgICAgICAgICAgICAgKi8KLQkweDE0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCi0JMHgyNSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICAgICAqLwotCTB4NzUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAgICAgKi8KLQkweDA5LCAweDQyLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGlwIFN3aXRjaCksICAgICAgICAgICAgICovCi0JMHgwOSwgMHg0NCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKEJhcnJlbCBTd2l0Y2gpLCAgICAgICAgICAqLwotCTB4MDksIDB4NDYsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUYWJsZXQgUGljayksICAgICAgICAgICAgKi8KLQkweDk1LCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDMpLCAgICAgICAgICAgICAgICovCi0JMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAgICAgKi8KLQkweDgxLCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoQ29uc3RhbnQsIFZhcmlhYmxlKSwgICAgICovCi0JMHgwOSwgMHgzMiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKEluIFJhbmdlKSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KLQkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCi0JMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLwotCTB4ODEsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAgICAgKi8KLQkweDc1LCAweDEwLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgICAgICovCi0JMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLwotCTB4QTQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFB1c2gsICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkweDA1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgICAgICovCi0JMHg2NSwgMHgxMywgICAgICAgICAgICAgLyogICAgICAgICAgVW5pdCAoSW5jaCksICAgICAgICAgICAgICAgICAgICAqLwotCTB4NTUsIDB4RkQsICAgICAgICAgICAgIC8qICAgICAgICAgIFVuaXQgRXhwb25lbnQgKC0zKSwgICAgICAgICAgICAgKi8KLQkweDM0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQaHlzaWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICovCi0JMHgwOSwgMHgzMCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFgpLCAgICAgICAgICAgICAgICAgICAgICAqLwotCTB4MjcsIEhVSU9OX1BIKFhfTE0pLCAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAgKi8KLQkweDQ3LCBIVUlPTl9QSChYX1BNKSwgICAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICovCi0JMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MzEsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICAgICAgKi8KLQkweDI3LCBIVUlPTl9QSChZX0xNKSwgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCi0JMHg0NywgSFVJT05fUEgoWV9QTSksICAgLyogICAgICAgICAgUGh5c2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KLQkweEI0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQb3AsICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgwOSwgMHgzMCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRpcCBQcmVzc3VyZSksICAgICAgICAgICAqLwotCTB4MjcsCi0JSFVJT05fUEgoUFJFU1NVUkVfTE0pLCAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJ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KKwkweDg1LCAweDA1LCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgSUQgKDUpLCAgICAgICAgICAgICAgICAqLworCTB4MDYsIDB4MDAsIDB4RkYsICAgICAgICAgICAgIC8qICAgIFVzYWdlIFBhZ2UgKEZGMDBoKSwgICAgICAgICAgICovCisJMHgwOSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgKDAxaCksICAgICAgICAgICAgICAgICAgKi8KKwkweDE1LCAweDgxLCAgICAgICAgICAgICAgICAgICAvKiAgICBMb2dpY2FsIE1pbmltdW0gKC0xMjcpLCAgICAgICAqLworCTB4MjUsIDB4N0YsICAgICAgICAgICAgICAgICAgIC8qICAgIExvZ2ljYWwgTWF4aW11bSAoMTI3KSwgICAgICAgICovCisJMHg3NSwgMHgwOCwgICAgICAgICAgICAgICAgICAgLyogICAgUmVwb3J0IFNpemUgKDgpLCAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDA3LCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgQ291bnQgKDcpLCAgICAgICAgICAgICAqLworCTB4QjEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDBELCAgICAgICAgICAgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoRGlnaXRpemVyKSwgICAgICAgICAqLworCTB4MDksIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSAoUGVuKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhBMSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgKi8KKwkweDg1LCAweDEwLCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgSUQgKDE2KSwgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjAsICAgICAgICAgICAgICAgICAgIC8qICAgIFVzYWdlIChTdHlsdXMpLCAgICAgICAgICAgICAgICovCisJMHhBMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgQ29sbGVjdGlvbiAoUGh5c2ljYWwpLCAgICAgICAgKi8KKwkweDA5LCAweDQyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChUaXAgU3dpdGNoKSwgICAgICAgICAqLworCTB4MDksIDB4NDQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKEJhcnJlbCBTd2l0Y2gpLCAgICAgICovCisJMHgwOSwgMHg0NiwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoVGFibGV0IFBpY2spLCAgICAgICAgKi8KKwkweDE0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAqLworCTB4MjUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICovCisJMHg3NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgKi8KKwkweDk1LCAweDAzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHg5NSwgMHgwNCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDQpLCAgICAgICAgICAgKi8KKwkweDgxLCAweDAzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAqLworCTB4MDksIDB4MzIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKEluIFJhbmdlKSwgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4NzUsIDB4MTAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDE2KSwgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgKi8KKwkweEE0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFB1c2gsICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICovCisJMHg1NSwgMHhGRCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVbml0IEV4cG9uZW50ICgtMyksICAgICAgICAgKi8KKwkweDY1LCAweDEzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVuaXQgKEluY2gpLCAgICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgzNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNaW5pbXVtICgwKSwgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIDB4MDAsIDB4RjAsIDB4MDAsIDB4MDAsIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICg2MTQ0MCksICAgICovCisJMHg0NiwgMHhFMCwgMHgyRSwgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICgxMjAwMCksICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4MDksIDB4MzEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFkpLCAgICAgICAgICAgICAgICAgICovCisJMHgyNywgMHgwMCwgMHhCNCwgMHgwMCwgMHgwMCwgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDQ2MDgwKSwgICAgKi8KKwkweDQ2LCAweDI4LCAweDIzLCAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDkwMDApLCAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHhCNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQb3AsICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChUaXAgUHJlc3N1cmUpLCAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNiwgMHhGRiwgMHgwNywgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDIwNDcpLCAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4QzAsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDBELCAgICAgICAgICAgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoRGlnaXRpemVyKSwgICAgICAgICAqLworCTB4MDksIDB4MjEsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSAoUHVjayksICAgICAgICAgICAgICAgICAgICovCisJMHhBMSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgKi8KKwkweDg1LCAweDExLCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgSUQgKDE3KSwgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjEsICAgICAgICAgICAgICAgICAgIC8qICAgIFVzYWdlIChQdWNrKSwgICAgICAgICAgICAgICAgICovCisJMHhBMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgQ29sbGVjdGlvbiAoUGh5c2ljYWwpLCAgICAgICAgKi8KKwkweDA1LCAweDA5LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIFBhZ2UgKEJ1dHRvbiksICAgICAgICAqLworCTB4NzUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDEpLCAgICAgICAgICAgICovCisJMHgxOSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSBNaW5pbXVtICgwMWgpLCAgICAgICAgKi8KKwkweDI5LCAweDAzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIE1heGltdW0gKDAzaCksICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDk1LCAweDAzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHg5NSwgMHgwNCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDQpLCAgICAgICAgICAgKi8KKwkweDgxLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChDb25zdGFudCksICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICovCisJMHgwQiwgMHgzMiwgMHgwMCwgMHgwRCwgMHgwMCwgLyogICAgICBVc2FnZSAoRGlnaXRpemVyIEluIFJhbmdlKSwgKi8KKwkweDE0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAqLworCTB4MjUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEE0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFB1c2gsICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICovCisJMHg3NSwgMHgxMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4NTUsIDB4RkQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVW5pdCBFeHBvbmVudCAoLTMpLCAgICAgICAgICovCisJMHg2NSwgMHgxMywgICAgICAgICAgICAgICAgICAgLyogICAgICBVbml0IChJbmNoKSwgICAgICAgICAgICAgICAgKi8KKwkweDE0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAqLworCTB4MzQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICovCisJMHgwOSwgMHgzMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoWCksICAgICAgICAgICAgICAgICAgKi8KKwkweDI3LCAweDAwLCAweEYwLCAweDAwLCAweDAwLCAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoNjE0NDApLCAgICAqLworCTB4NDYsIDB4RTAsIDB4MkUsICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWF4aW11bSAoMTIwMDApLCAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDA5LCAweDMxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIDB4MDAsIDB4QjQsIDB4MDAsIDB4MDAsIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICg0NjA4MCksICAgICovCisJMHg0NiwgMHgyOCwgMHgyMywgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICg5MDAwKSwgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4MDksIDB4MzgsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFdoZWVsKSwgICAgICAgICAgICAgICovCisJMHg3NSwgMHgwOCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4MTUsIDB4RkYsICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgtMSksICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDM0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAqLworCTB4NDQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWF4aW11bSAoMCksICAgICAgICovCisJMHg4MSwgMHgwNiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUsIFJlbGF0aXZlKSwgKi8KKwkweEI0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4QzAsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDBDLCAgICAgICAgICAgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoQ29uc3VtZXIpLCAgICAgICAgICAqLworCTB4MDksIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSAoQ29uc3VtZXIgQ29udHJvbCksICAgICAgICovCisJMHhBMSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgKi8KKwkweDg1LCAweDEyLCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgSUQgKDE4KSwgICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICAgKi8KKwkweDc1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDgsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBDb3VudCAoOCksICAgICAgICAgICAgICovCisJMHgwNSwgMHgwQywgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgUGFnZSAoQ29uc3VtZXIpLCAgICAgICAgKi8KKwkweDBBLCAweDZBLCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgRGVsZXRlKSwgICAgICAgICAgICAqLworCTB4MEEsIDB4MUEsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBVbmRvKSwgICAgICAgICAgICAgICovCisJMHgwQSwgMHgwMSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIE5ldyksICAgICAgICAgICAgICAgKi8KKwkweDBBLCAweDJGLCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgWm9vbSksICAgICAgICAgICAgICAqLworCTB4MEEsIDB4MjUsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBGb3J3YXJkKSwgICAgICAgICAgICovCisJMHgwQSwgMHgyNCwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIEJhY2spLCAgICAgICAgICAgICAgKi8KKwkweDBBLCAweDJELCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgWm9vbSBJbiksICAgICAgICAgICAqLworCTB4MEEsIDB4MkUsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBab29tIE91dCksICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDk1LCAweDMwLCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgQ291bnQgKDQ4KSwgICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAgICovCisJMHhDMCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uICAgICAgICAgICAgICAgICAgKi8KK307CisKIHN0YXRpYyBfX3U4ICpreWVfY29uc3VtZXJfY29udHJvbF9maXh1cChzdHJ1Y3QgaGlkX2RldmljZSAqaGRldiwgX191OCAqcmRlc2MsCiAJCXVuc2lnbmVkIGludCAqcnNpemUsIGludCBvZmZzZXQsIGNvbnN0IGNoYXIgKmRldmljZV9uYW1lKSB7CiAJLyoKQEAgLTMzNSw2ICs0NjYsMTIgQEAKIAkJCSpyc2l6ZSA9IHNpemVvZihlYXN5cGVuX202MTB4X3JkZXNjX2ZpeGVkKTsKIAkJfQogCQlicmVhazsKKwljYXNlIFVTQl9ERVZJQ0VfSURfS1lFX1BFTlNLRVRDSF9NOTEyOgorCQlpZiAoKnJzaXplID09IFBFTlNLRVRDSF9NOTEyX1JERVNDX09SSUdfU0laRSkgeworCQkJcmRlc2MgPSBwZW5za2V0Y2hfbTkxMl9yZGVzY19maXhlZDsKKwkJCSpyc2l6ZSA9IHNpemVvZihwZW5za2V0Y2hfbTkxMl9yZGVzY19maXhlZCk7CisJCX0KKwkJYnJlYWs7CiAJY2FzZSBVU0JfREVWSUNFX0lEX0dFTklVU19HSUxBX0dBTUlOR19NT1VTRToKIAkJcmRlc2MgPSBreWVfY29uc3VtZ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bXBsYXRlIHBsYWNlaG9sZGVyIElEcyAqLworZW51bSB1Y2xvZ2ljX3BoX2lkIHsKKwlVQ0xPR0lDX1BIX0lEX1hfTE0sCisJVUNMT0dJQ19QSF9JRF9YX1BNLAorCVVDTE9HSUNfUEhfSURfWV9MTSwKKwlVQ0xPR0lDX1BIX0lEX1lfUE0sCisJVUNMT0dJQ19QSF9JRF9QUkVTU1VSRV9MTSwKKwlVQ0xPR0lDX1BIX0lEX05VTQorfTsKKworLyogUmVwb3J0IGRlc2NyaXB0b3IgdGVtcGxhdGUgcGxhY2Vob2xkZXIgKi8KKyNkZWZpbmUgVUNMT0dJQ19QSChfSUQpIFVDTE9HSUNfUEhfSEVBRCwgVUNMT0dJQ19QSF9JRF8jI19JRAorI2RlZmluZSBVQ0xPR0lDX1BFTl9SRVBPUlRfSUQJMHgwNworCisvKiBGaXhlZCByZXBvcnQgZGVzY3JpcHRvciB0ZW1wbGF0ZSAqLworc3RhdGljIGNvbnN0IF9fdTggdWNsb2dpY190YWJsZXRfcmRlc2NfdGVtcGxhdGVbXSA9IHsKKwkweDA1LCAweDBELCAgICAgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoRGlnaXRpemVyKSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgwMiwgICAgICAgICAgICAgLyogIFVzYWdlIChQZW4pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4QTEsIDB4MDEsICAgICAgICAgICAgIC8qICBDb2xsZWN0aW9uIChBcHBsaWNhdGlvbiksICAgICAgICAgICAgICAgKi8KKwkweDg1LCAweDA3LCAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoNyksICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMCwgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoU3R5bHVzKSwgICAgICAgICAgICAgICAgICAgICAqLworCTB4QTAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgQ29sbGVjdGlvbiAoUGh5c2ljYWwpLCAgICAgICAgICAgICAgKi8KKwkweDE0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtICgxKSwgICAgICAgICAgICAqLworCTB4NzUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDQyLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGlwIFN3aXRjaCksICAgICAgICAgICAgICovCisJMHgwOSwgMHg0NCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKEJhcnJlbCBTd2l0Y2gpLCAgICAgICAgICAqLworCTB4MDksIDB4NDYsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUYWJsZXQgUGljayksICAgICAgICAgICAgKi8KKwkweDk1LCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDMpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoQ29uc3RhbnQsIFZhcmlhYmxlKSwgICAgICovCisJMHgwOSwgMHgzMiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKEluIFJhbmdlKSwgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAgICAgKi8KKwkweDc1LCAweDEwLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLworCTB4QTQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFB1c2gsICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgICAgICovCisJMHg2NSwgMHgxMywgICAgICAgICAgICAgLyogICAgICAgICAgVW5pdCAoSW5jaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4NTUsIDB4RkQsICAgICAgICAgICAgIC8qICAgICAgICAgIFVuaXQgRXhwb25lbnQgKC0zKSwgICAgICAgICAgICAgKi8KKwkweDM0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQaHlzaWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzMCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFgpLCAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIFVDTE9HSUNfUEgoWF9MTSksIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAgKi8KKwkweDQ3LCBVQ0xPR0lDX1BIKFhfUE0pLCAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzEsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDI3LCBVQ0xPR0lDX1BIKFlfTE0pLCAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCisJMHg0NywgVUNMT0dJQ19QSChZX1BNKSwgLyogICAgICAgICAgUGh5c2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweEI0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQb3AsICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMCwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRpcCBQcmVzc3VyZSksICAgICAgICAgICAqLworCTB4MjcsCisJVUNMT0dJQ19QSChQUkVTU1VSRV9MTSksLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIEVuZCBDb2xsZWN0aW9uLCAgICAgICAgICAgICAgICAgICAgICovCisJMHhDMCAgICAgICAgICAgICAgICAgICAgLyogIEVuZCBDb2xsZWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAqLworfTsKKworLyogUGFyYW1ldGVyIGluZGljZXMgKi8KK2VudW0gdWNsb2dpY19wcm0geworCVVDTE9HSUN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zdXJlIGRldmljZSByZWFsbHkgaGFzIGNvbXBsZXRlZCByZWFkaW5nICovCisJaWYgKHJlc3VsdF9yZWdzWzFdICYgREE5MTUwX0dQQURDX1JVTl9NQVNLKSB7CisJCWRldl9lcnIoZ3BhZGMtPmRldiwgIlRpbWVvdXQgb24gY2hhbm5lbCAlZCBvZiBHUEFEQ1xuIiwKKwkJCWh3X2NoYW4pOworCQlyZXR1cm4gLUVUSU1FRE9VVDsKKwl9CisKKwkvKiBMU0JzIC0gMiBiaXRzICovCisJcmVzdWx0ID0gKHJlc3VsdF9yZWdzWzFdICYgREE5MTUwX0dQQURDX1JFU19MX01BU0spID4+CisJCSBEQTkxNTBfR1BBRENfUkVTX0xfU0hJRlQ7CisJLyogTVNCcyAtIDggYml0cyAqLworCXJlc3VsdCB8PSByZXN1bHRfcmVnc1swXSA8PCBEQTkxNTBfR1BBRENfUkVTX0xfQklUUzsKKworCXJldHVybiByZXN1bHQ7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGRhOTE1MF9ncGFkY19ncGlvXzZ2X3ZvbHRhZ2Vfbm93KGludCByYXdfdmFsKQoreworCS8qIENvbnZlcnQgdG8gbVYgKi8KKwlyZXR1cm4gKDYgKiAoKHJhd192YWwgKiAxMDAwKSArIDUwMCkpIC8gMTAyNDsKK30KKworc3RhdGljIGlubGluZSBpbnQgZGE5MTUwX2dwYWRjX2lidXNfY3VycmVudF9hdmcoaW50IHJhd192YWwpCit7CisJLyogQ29udmVydCB0byBtQSAqLworCXJldHVybiAoNCAqICgocmF3X3ZhbCAqIDEwMDApICsgNTAwKSkgLyAyMDQ4OworfQorCitzdGF0aWMgaW5saW5lIGludCBkYTkxNTBfZ3BhZGNfdmJ1c18yMXZfdm9sdGFnZV9ub3coaW50IHJhd192YWwpCit7CisJLyogQ29udmVydCB0byBtViAqLworCXJldHVybiAoMjEgKiAoKHJhd192YWwgKiAxMDAwKSArIDUwMCkpIC8gMTAyNDsKK30KKworc3RhdGljIGlubGluZSB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fUE9TSVRJVkUgODE3NgogI2RlZmluZSBZX01BWF9QT1NJVElWRSA4MTc2CiAKLS8qIG1heGltdW0gQUJTX01UX1BPU0lUSU9OIGRpc3BsYWNlbWVudCAoaW4gbW0pICovCi0jZGVmaW5lIERNQVggMTAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKglTdHVmZiB3ZSBuZWVkIGV2ZW4gd2hlbiB3ZSBkbyBub3Qgd2FudCBuYXRpdmUgU3luYXB0aWNzIHN1cHBvcnQKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTIzLDMyICsxMjAsNDYgQEAKIAogc3RhdGljIGJvb2wgY3I0OF9wcm9maWxlX3NlbnNvcjsKIAorI2RlZmluZSBBTllfQk9BUkRfSUQgMAogc3RydWN0IG1pbl9tYXhfcXVpcmsgewogCWNvbnN0IGNoYXIgKiBjb25zdCAqcG5wX2lkczsKKwlzdHJ1Y3QgeworCQl1bnNpZ25lZCBsb25nIGludCBtaW4sIG1heDsKKwl9IGJvYXJkX2lkOwogCWludCB4X21pbiwgeF9tYXgsIHlfbWluLCB5X21heDsKIH07CiAKIHN0YXRpYyBjb25zdCBzdHJ1Y3QgbWluX21heF9xdWlyayBtaW5fbWF4X3BucGlkX3RhYmxlW10gPSB7CiAJewogCQkoY29uc3QgY2hhciAqIGNvbnN0IFtdKXsiTEVOMDAzMyIsIE5VTEx9LAorCQl7QU5ZX0JPQVJEX0lELCBBTllfQk9BUkRfSUR9LAogCQkxMDI0LCA1MDUyLCAyMjU4LCA0ODMyCiAJfSwKIAl7Ci0JCShjb25zdCBjaGFyICogY29uc3QgW10peyJMRU4wMDM1IiwgIkxFTjAwNDIiLCBOVUxMfSwKKwkJKGNvbnN0IGNoYXIgKiBjb25zdCBbXSl7IkxFTjAwNDIi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aV0ucG5wX2lkczsgaSsrKSB7CisJCWlmICghcHNtb3VzZV9tYXRjaGVzX3BucF9pZChwc21vdXNlLAorCQkJCQkgICAgbWluX21heF9wbnBpZF90YWJsZVtpXS5wbnBfaWRzKSkKKwkJCWNvbnRpbnVlOworCisJCWlmIChtaW5fbWF4X3BucGlkX3RhYmxlW2ldLmJvYXJkX2lkLm1pbiAhPSBBTllfQk9BUkRfSUQgJiYKKwkJICAgIHByaXYtPmJvYXJkX2lkIDwgbWluX21heF9wbnBpZF90YWJsZVtpXS5ib2FyZF9pZC5taW4pCisJCQljb250aW51ZTsKKworCQlpZiAobWluX21heF9wbnBpZF90YWJsZVtpXS5ib2FyZF9pZC5tYXggIT0gQU5ZX0JPQVJEX0lEICYmCisJCSAgICBwcml2LT5ib2FyZF9pZCA+IG1pbl9tYXhfcG5waWRfdGFibGVbaV0uYm9hcmRfaWQubWF4KQorCQkJY29udGludWU7CisKKwkJcHJpdi0+eF9taW4gPSBtaW5fbWF4X3BucGlkX3RhYmxlW2ldLnhfbWluOworCQlwcml2LT54X21heCA9IG1pbl9tYXhfcG5waWRfdGFibGVbaV0ueF9tYXg7CisJCXByaXYtPnlfbWluID0gbWluX21heF9wbnBpZF90YWJsZVtpXS55X21pbjsKKwkJcHJpdi0+eV9tYXggPSBtaW5fbWF4X3BucGlkX3RhYmxlW2ldLnlfbWF4OworCQlwc21vdXNlX2luZm8ocHNtb3VzZSwKKwkJCSAgICAgInF1aXJrZWQgbWluL21heCBjb29yZGluYXRlczogeCBbJWQuLiVkXSwgeSBbJWQuLiVkXVxuIiwKKwkJCSAgICAgcHJpdi0+eF9taW4sIHByaXYtPnhfbWF4LAorCQkJICAgICBwcml2LT55X21pbiwgcHJpdi0+eV9tYXgpOworCQlicmVhazsKKwl9Cit9CisKIHN0YXRpYyBpbnQgc3luYXB0aWNzX3F1ZXJ5X2hhcmR3YXJlKHN0cnVjdCBwc21vdXNlICpwc21vdXNlKQogewogCWlmIChzeW5hcHRpY3NfaW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xyX2RvbWFpbl9mcmVlLAorfTsKKworc3RhdGljIGludCBfX2luaXQgdGVncmFfaWN0bHJfaW5pdChzdHJ1Y3QgZGV2aWNlX25vZGUgKm5vZGUsCisJCQkJICAgc3RydWN0IGRldmljZV9ub2RlICpwYXJlbnQpCit7CisJc3RydWN0IGlycV9kb21haW4gKnBhcmVudF9kb21haW4sICpkb21haW47CisJY29uc3Qgc3RydWN0IG9mX2RldmljZV9pZCAqbWF0Y2g7CisJY29uc3Qgc3RydWN0IHRlZ3JhX2ljdGxyX3NvYyAqc29jOworCXVuc2lnbmVkIGludCBpOworCWludCBlcnI7CisKKwlpZiAoIXBhcmVudCkgeworCQlwcl9lcnIoIiVzOiBubyBwYXJlbnQsIGdpdmluZyB1cFxuIiwgbm9kZS0+ZnVsbF9uYW1lKTsKKwkJcmV0dXJuIC1FTk9ERVY7CisJfQorCisJcGFyZW50X2RvbWFpbiA9IGlycV9maW5kX2hvc3QocGFyZW50KTsKKwlpZiAoIXBhcmVudF9kb21haW4pIHsKKwkJcHJfZXJyKCIlczogdW5hYmxlIHRvIG9idGFpbiBwYXJlbnQgZG9tYWluXG4iLCBub2RlLT5mdWxsX25hbWUpOworCQlyZXR1cm4gLUVOWElPOworCX0KKworCW1hdGNoID0gb2ZfbWF0Y2hfbm9kZShpY3Rscl9tYXRjaGVzLCBub2RlKTsKKwlpZiAoIW1hdGNoKQkJLyogU2hvdWxkIG5ldmVyIGhhcHBlbi4uLiAqLworCQlyZXR1cm4gLUVOT0RFVjsKKworCXNvYyA9IG1hdGNoLT5kYXRhOworCisJbGljID0ga3phbGxvYyhzaXplb2YoKmxpYyksIEdGUF9LRVJORUwpOworCWlmICghbGljKQorCQlyZXR1cm4gLUVOT01FTTsKKworCWZvciAoaSA9IDA7IGkgPCBURUdSQV9NQVhfTlVNX0lDVExSUzsgaSsrKSB7CisJCXZvaWQgX19pb21lbSAqYmFzZTsKKworCQliYXNlID0gb2ZfaW9tYXAobm9kZSwgaSk7CisJCWlmICgh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W5jbHVkZSA8bGludXgvc2xhYi5oPgorI2luY2x1ZGUgPGxpbnV4L2RlbGF5Lmg+CisjaW5jbHVkZSA8bGludXgvaW50ZXJydXB0Lmg+CisjaW5jbHVkZSA8bGludXgvcGxhdGZvcm1fZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvb2ZfYWRkcmVzcy5oPgorI2luY2x1ZGUgPGxpbnV4L29mX3BjaS5oPgorI2luY2x1ZGUgPGxpbnV4L29mX2lycS5oPgorI2luY2x1ZGUgPGxpbnV4L29mX3BsYXRmb3JtLmg+CisjaW5jbHVkZSA8bGludXgvcGh5L3BoeS5oPgorCisjaW5jbHVkZSAicGNpZS1pcHJvYy5oIgorCisjZGVmaW5lIENMS19DT05UUk9MX09GRlNFVCAgICAgICAgICAgMHgwMDAKKyNkZWZpbmUgRVBfTU9ERV9TVVJWSVZFX1BFUlNUX1NISUZUICAxCisjZGVmaW5lIEVQX01PREVfU1VSVklWRV9QRVJTVCAgICAgICAgQklUKEVQX01PREVfU1VSVklWRV9QRVJTVF9TSElGVCkKKyNkZWZpbmUgUkNfUENJRV9SU1RfT1VUUFVUX1NISUZUICAgICAwCisjZGVmaW5lIFJDX1BDSUVfUlNUX09VVFBVVCAgICAgICAgICAgQklUKFJDX1BDSUVfUlNUX09VVFBVVF9TSElGVCkKKworI2RlZmluZSBDRkdfSU5EX0FERFJfT0ZGU0VUICAgICAgICAgIDB4MTIwCisjZGVmaW5lIENGR19JTkRfQUREUl9NQVNLICAgICAgICAgICAgMHgwMDAwMWZmYworCisjZGVmaW5lIENGR19JTkRfREFUQV9PRkZTRVQgICAgICAgICAgMHgxMjQKKworI2RlZmluZSBDRkdfQUREUl9PRkZTRVQgICAgICAgICAgICAgIDB4MWY4CisjZGVmaW5lIENGR19BRERSX0JVU19OVU1fU0hJRlQgICAgICAgMjAKKyNkZWZpbmUgQ0ZHX0FERFJfQlVTX05VTV9NQVNLICAgICAgICAweDBmZjAwMDAwCisjZGVmaW5lIENGR19BRERS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V9NQVhfQkFUVEVSSUVTXTsKIAotI2RlZmluZSB0b19wbXVfYmF0dGVyeV9kZXYoeCkgY29udGFpbmVyX29mKHgsIHN0cnVjdCBwbXVfYmF0dGVyeV9kZXYsIGJhdCkKKyNkZWZpbmUgdG9fcG11X2JhdHRlcnlfZGV2KHgpIHBvd2VyX3N1cHBseV9nZXRfZHJ2ZGF0YSh4KQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgkJUG93ZXIKQEAgLTQ5LDcgKzUwLDcgQEAKIAlQT1dFUl9TVVBQTFlfUFJPUF9PTkxJTkUsCiB9OwogCi1zdGF0aWMgc3RydWN0IHBvd2VyX3N1cHBseSBwbXVfYWMgPSB7CitzdGF0aWMgY29uc3Qgc3RydWN0IHBvd2VyX3N1cHBseV9kZXNjIHBtdV9hY19kZXNjID0gewogCS5uYW1lID0gInBtdS1hYyIsCiAJLnR5cGUgPSBQT1dFUl9TVVBQTFlfVFlQRV9NQUlOUywKIAkucHJvcGVydGllcyA9IHBtdV9hY19wcm9wcywKQEAgLTU3LDYgKzU4LDggQEAKIAkuZ2V0X3Byb3BlcnR5ID0gcG11X2dldF9hY19wcm9wLAogfTsKIAorc3RhdGljIHN0cnVjdCBwb3dlcl9zdXBwbHkgKnBtdV9hYzsKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoJCUJhdHRlcnkgcHJvcGVydGllcwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTE0Miw3ICsxNDUsNyBAQAogCiBzdGF0aWMgaW50IF9faW5pdCBwbXVfYmF0X2luaXQodm9pZCkKIHsKLQlpbnQgcmV0OworCWludCByZXQgPSAwOwogCWludCBpOwogCiAJYmF0X3BkZXYgPSBwbGF0Zm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xNDU5LDIzICsxMzY4LDIyIEBACiAJaWYgKCFpbmwoZGV2LT5pb2Jhc2UgKyBNRTQwMDBfRElPX0RJUl9SRUcpKSB7CiAJCXMtPmlvX2JpdHMgfD0gMHhGRjsKIAkJb3V0bChNRTQwMDBfRElPX0NUUkxfQklUX01PREVfMCwKLQkJCWRldi0+aW9iYXNlICsgTUU0MDAwX0RJT19ESVJfUkVHKTsKKwkJICAgICBkZXYtPmlvYmFzZSArIE1FNDAwMF9ESU9fRElSX1JFRyk7CiAJfQogCi0gICAgLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICAgICBDb3VudGVyIHN1YmRldmljZQotICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLQorCS8qIENvdW50ZXIgc3ViZGV2aWNlICg4MjU0KSAqLwogCXMgPSAmZGV2LT5zdWJkZXZpY2VzWzNdOwotCiAJaWYgKHRoaXNib2FyZC0+aGFzX2NvdW50ZXIpIHsKLQkJcy0+dHlwZSA9IENPTUVESV9TVUJEX0NPVU5URVI7Ci0JCXMtPnN1YmRldl9mbGFncyA9IFNERl9SRUFEQUJMRSB8IFNERl9XUklUQUJMRTsKLQkJcy0+bl9jaGFuID0gMzsKLQkJcy0+bWF4ZGF0YSA9IDB4RkZGRjsJLyogIDE2IGJpdCBjb3VudGVycyAqLwotCQlzLT5pbnNuX3JlYWQgPSBtZTQwMDBfY250X2luc25fcmVhZDsKLQkJcy0+aW5zbl93cml0ZSA9IG1lNDAwMF9jbnRfaW5zbl93cml0ZTsKLQkJcy0+aW5zbl9jb25maWcgPSBtZTQwMDBfY250X2luc25fY29uZmlnOworCQl1bnNpZ25lZCBsb25nIHRpbWVyX2Jhc2UgPSBwY2lfcmVzb3VyY2Vfc3RhcnQocGNpZGV2LCAzKTsKKworCQlpZiAoIXR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ogUFVSUE9TRS4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KLSAqCi0gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKLSAqIEZvdW5kYXRpb24sIEluYy4sIDY3NSBNYXNzIEF2ZSwgQ2FtYnJpZGdlLCBNQSAwMjEzOSwgVVNBLgotICoKLSAqCU5PVEU6IFRISVMgSVMgQSBTSEFSRUQgSEVBREVSLiBETyBOT1QgQ0hBTkdFIENPRElORyBTVFlMRSEhIQotICoKICAqLwogCiAjaWZuZGVmIF9fREdOQ19DTFNfSAogI2RlZmluZSBfX0RHTkNfQ0xTX0gKIAotI2luY2x1ZGUgImRnbmNfdHlwZXMuaCIKLQotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBQZXIgY2hhbm5lbC9wb3J0IENsYXNzaWMgVUFSVCBzdHJ1Y3R1cmUJCQkJKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMzUsMTUgKzI1LDI1IEBACiAgKgkJCVUgPSBVbnVzZWQuCQkJCQkqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisvKgorICogdHhyeCAgICA6IFdSIFJIUi9USFIgLSBIb2xkaW5nIHJlZworICogaWVyICAgICA6IFdSIElFUiAtIEludGVycnVwdCBFbmFibGUgUmVnCisgKiBpc3JfZmNyIDogV1IgSVNSL0ZDUiAtIEludG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ZSAgICAgICAgICAgKi8KLSNkZWZpbmUgRElHSV80MjIJMHg0MDAwCQkvKiBmb3IgNDIyLzIzMiBzZWxlY3RhYmxlIHBhbmVsICovCiAjZGVmaW5lIERJR0lfUlRTX1RPR0dMRQkweDgwMDAJCS8qIFN1cHBvcnQgUlRTIFRvZ2dsZQkJKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVGhlc2Ugb3B0aW9ucyBhcmUgbm90IHN1cHBvcnRlZCBvbiB0aGUgY29teGkuCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZQlESUdJX0NPTVhJCShESUdJX0ZBU1R8RElHSV9DT09LfERTUlBBQ0V8RENEUEFDRXxEVFJQQUNFKQotCiAjZGVmaW5lIERJR0lfUExFTgkyOAkJLyogU3RyaW5nIGxlbmd0aAkJKi8KICNkZWZpbmUJRElHSV9UU0laCTEwCQkvKiBUZXJtaW5hbCBzdHJpbmcgbGVuCQkqLwogCkBAIC0xNjMsNzYgKzc3LDYgQEAKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEtNRSBkZWZpbml0aW9ucyBhbmQgc3RydWN0dXJlcy4KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lCVJXX0lETEUJCTAJLyogT3BlcmF0aW9uIGNvbXBsZXRlCQkJKi8KLSNkZWZpbmUJUldfUkVBRAkJMQkvKiBSZWFkIENvbmNlbnRyYXRvciBNZW1vcnkJCSovCi0jZGVmaW5lCVJXX1dSSVRFCTIJLyogV3JpdGUgQ29uY2VudHJhdG9yIE1lbW9yeQkJKi8KLQot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b19pZmxhZzsJCS8qIGlmbGFnIGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgaW50CWluZm9fb2ZsYWc7CQkvKiBvZmxhZyBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX21zdGF0OwkJLyogbXN0YXQgZm9yIGNoYW5uZWwgICAgICAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb190eF9kYXRhOwkJLyogdHhfZGF0YSBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX3J4X2RhdGE7CQkvKiByeF9kYXRhIGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgaW50CWluZm9faGZsb3c7CQkvKiBoZmxvdyBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX3Jlc2VydmVkWzhdOwkvKiBmb3IgZnV0dXJlIGV4cGFuc2lvbiAgICAqLwotfTsKLQotI2RlZmluZQlESUdJX0dFVFNUQVQJKCgnZCc8PDgpIHwgMjQ0KQkvKiBnZXQgYm9hcmQgaW5mbyAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1jaGFubmVsIGluZm9ybWF0aW9uCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBkaWdpX2NoIHsKLQl1bnNpZ25lZCBpbnQJaW5mb19iZG51bTsJCS8qIEJvYXJkIG51bWJlciAoMCBiYXNlZCkgICovCi0JdW5zaWduZWQgaW50CWluZm9fY2hhbm5lbDsJCS8qIENoYW5uZWwgaW5kZXggbnVtYmVyICAgICovCi0JdW5zaWduZWQgaW50CWluZm9fY2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GJ5IGNvcmUKICAqIEBpbml0X3NlcXVlbmNlOiBQb2ludGVyIHRvIExDRCBpbml0aWFsaXphdGlvbiBhcnJheQogICogQGdhbW1hLmxvY2s6IE11dGV4IGZvciBHYW1tYSBjdXJ2ZSBsb2NraW5nCiAgKiBAZ2FtbWEuY3VydmVzOiBQb2ludGVyIHRvIEdhbW1hIGN1cnZlIGFycmF5CkBAIC0yNTksOSArMjU5LDcgQEAKICNkZWZpbmUgTlVNQVJHUyguLi4pICAoc2l6ZW9mKChpbnRbXSl7X19WQV9BUkdTX199KS9zaXplb2YoaW50KSkKIAogI2RlZmluZSB3cml0ZV9yZWcocGFyLCAuLi4pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JcGFyLT5mYnRmdG9wcy53cml0ZV9yZWdpc3RlcihwYXIsIE5VTUFSR1MoX19WQV9BUkdTX18pLCBfX1ZBX0FSR1NfXyk7IFwKLX0gd2hpbGUgKDApCisJcGFyLT5mYnRmdG9wcy53cml0ZV9yZWdpc3RlcihwYXIsIE5VTUFSR1MoX19WQV9BUkdTX18pLCBfX1ZBX0FSR1NfXykKIAogLyogZmJ0ZnQtY29yZS5jICovCiBleHRlcm4gdm9pZCBmYnRmdF9kYmdfaGV4KGNvbnN0IHN0cnVjdCBkZXZpY2UgKmRldiwKQEAgLTMyNiw4ICszMjQsOCBAQAogfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJCQkJCQkJICAgXAogc3RhdGljIGNvbnN0IHN0cnVjdCBvZl9kZXZpY2VfaWQgZHRfaWRzW10gPSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB7IC5jb21wYXRpYmxlID0gX2NvbXBhdGlibGUgfSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB7fSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXsgLmNvbXBhdGlibGUgPSBfY29tcGF0aWJsZSB9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJe30sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIH07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCQkJCQkJCSAgIFwKIE1PRFVMRV9ERVZJQ0VfVEFCTEUob2YsIGR0X2lkcyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTMzNyw3ICszMzUsNyBAQAogCS5kcml2ZXIgPSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCS5uYW1lICAgPSBfbmFtZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkub3duZXIgID0gVEhJU19NT0RVTEUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAub2ZfbWF0Y2hfdGFibGUgPSBvZl9tYXRjaF9wdHIoZHRfaWRzKSwgICAgICAgICAgICAgICAgICAgIFwKKwkJLm9mX21hdGNoX3RhYmxlID0gb2ZfbWF0Y2hfcHRyKGR0X2lkcyksICAgICAgICAgICAgICAgICAgICBcCiAJfSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkucHJvYmUgID0gZmJ0ZnRfZHJpdmVyX3Byb2JlX3NwaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5yZW1vdmUgPSBmYnRmdF9kcml2ZXJfcmVtb3ZlX3NwaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0zNDcsNyArMzQ1LDcgQEAKIAkuZHJpdmVyID0geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkubmFtZSAgID0gX25hbWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJLm93bmVyICA9IFRISVNfTU9EVUxFLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgLm9mX21hdGNoX3RhYmxlID0gb2ZfbWF0Y2hfcHRyKGR0X2lkcyksICAgICAgICAgICAgICAgICAgICBcCisJCS5vZl9tYXRjaF90YWJsZSA9IG9mX21hdGNoX3B0cihkdF9pZHMpLCAgICAgICAgICAgICAgICAgICAgXAogCX0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLnByb2JlICA9IGZidGZ0X2RyaXZlcl9wcm9iZV9wZGV2LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkucmVtb3ZlID0gZmJ0ZnRfZHJpdmVyX3JlbW92ZV9wZGV2LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL2ZidGZ0L2ZidGZ0X2RldmljZS5jIGIvZHJpdmVycy9zdGFnaW5nL2ZidGZ0L2ZidGZ0X2RldmljZS5jCmluZGV4IGI5ZjRjMzAuLmRmNmNkNzcgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9mYnRmdC9mYnRmdF9kZXZpY2UuYworKysgYi9kcml2ZXJzL3N0YWdpbmcvZmJ0ZnQvZmJ0ZnRfZGV2aWNlLmMKQEAgLTI5LDggKzI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1Y3QgZnNsX21jX2lvICptY19pbywgdWludDE2X3QgdG9rZW4pCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisKKwkvKiBwcmVwYXJlIGNvbW1hbmQgKi8KKwljbWQuaGVhZGVyID0gbWNfZW5jb2RlX2NtZF9oZWFkZXIoRFBCUF9DTURJRF9ERVNUUk9ZLAorCQkJCQkgIE1DX0NNRF9QUklfTE9XLCB0b2tlbik7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCXJldHVybiBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorCitpbnQgZHBicF9lbmFibGUoc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sIHVpbnQxNl90IHRva2VuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfRU5BQkxFLCBNQ19DTURfUFJJX0xPVywKKwkJCQkJICB0b2tlbik7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCXJldHVybiBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorRVhQT1JUX1NZTUJPTChkcGJwX2VuYWJsZSk7CisKK2ludCBkcGJwX2Rpc2FibGUoc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sIHVpbnQxNl90IHRva2VuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfRElTQUJMRSwKKwkJCQkJICBNQ19DTURfUFJJX0xPVywgdG9rZW4pOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwlyZXR1cm4gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKK30KK0VYUE9SVF9TWU1CT0woZHBicF9kaXNhYmxlKTsKKworaW50IGRwYnBfaXNfZW5hYmxlZChzdHJ1Y3QgZnNsX21jX2lvICptY19pbywgdWludDE2X3QgdG9rZW4sIGludCAqZW4pCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisJaW50IGVycjsKKwkvKiBwcmVwYXJlIGNvbW1hbmQgKi8KKwljbWQuaGVhZGVyID0gbWNfZW5jb2RlX2NtZF9oZWFkZXIoRFBCUF9DTURJRF9JU19FTkFCTEVELCBNQ19DTURfUFJJX0xPVywKKwkJCQkJICB0b2tlbik7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCWVyciA9IG1jX3NlbmRfY29tbWFuZChtY19pbywgJmNtZCk7CisJaWYgKGVycikKKwkJcmV0dXJuIGVycjsKKworCS8qIHJldHJpZXZlIHJlc3BvbnNlIHBhcmFtZXRlcnMgKi8KKwkqZW4gPSAoaW50KW1jX2RlYyhjbWQucGFyYW1zWzBdLCAwLCAxKTsKKworCXJldHVybiAwOworfQorCitpbnQgZHBicF9yZXNldChzdHJ1Y3QgZnNsX21jX2lvICptY19pbywgdWludDE2X3QgdG9rZW4pCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisKKwkvKiBwcmVwYXJlIGNvbW1hbmQgKi8KKwljbWQuaGVhZGVyID0gbWNfZW5jb2RlX2NtZF9oZWFkZXIoRFBCUF9DTURJRF9SRVNFVCwKKwkJCQkJICBNQ19DTURfUFJJX0xPVywgdG9rZW4pOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwlyZXR1cm4gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKK30KKworaW50IGRwYnBfc2V0X2lycShzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJIHVpbnQxNl90IHRva2VuLAorCQkgdWludDhfdCBpcnFfaW5kZXgsCisJCSB1aW50NjRfdCBpcnFfcGFkZHIsCisJC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hbmQgdG8gbWMqLworCWVyciA9IG1jX3NlbmRfY29tbWFuZChtY19pbywgJmNtZCk7CisJaWYgKGVycikKKwkJcmV0dXJuIGVycjsKKworCS8qIHJldHJpZXZlIHJlc3BvbnNlIHBhcmFtZXRlcnMgKi8KKwkqaXJxX3ZhbCA9ICh1aW50MzJfdCltY19kZWMoY21kLnBhcmFtc1swXSwgMCwgMzIpOworCSppcnFfcGFkZHIgPSAodWludDY0X3QpbWNfZGVjKGNtZC5wYXJhbXNbMV0sIDAsIDY0KTsKKwkqdXNlcl9pcnFfaWQgPSAoaW50KW1jX2RlYyhjbWQucGFyYW1zWzJdLCAwLCAzMik7CisJKnR5cGUgPSAoaW50KW1jX2RlYyhjbWQucGFyYW1zWzJdLCAzMiwgMzIpOworCXJldHVybiAwOworfQorCitpbnQgZHBicF9zZXRfaXJxX2VuYWJsZShzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJCXVpbnQxNl90IHRva2VuLAorCQkJdWludDhfdCBpcnFfaW5kZXgsCisJCQl1aW50OF90IGVuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfU0VUX0lSUV9FTkFCTEUsCisJCQkJCSAgTUNfQ01EX1BSSV9MT1csIHRva2VuKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygwLCA4LCBlbik7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMzIsIDgsIGlycV9pbmRleCk7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCXJldHVybiBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorCitpbnQgZHBicF9nZXRfaXJxX2VuYWJsZShzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJCXVpbnQxNl90IHRva2VuLAorCQkJdWludDhfdCBpcnFfaW5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2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorCitpbnQgZHBicF9nZXRfaXJxX21hc2soc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sCisJCSAgICAgIHVpbnQxNl90IHRva2VuLAorCQkgICAgICB1aW50OF90IGlycV9pbmRleCwKKwkJICAgICAgdWludDMyX3QgKm1hc2spCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisJaW50IGVycjsKKworCS8qIHByZXBhcmUgY29tbWFuZCAqLworCWNtZC5oZWFkZXIgPSBtY19lbmNvZGVfY21kX2hlYWRlcihEUEJQX0NNRElEX0dFVF9JUlFfTUFTSywKKwkJCQkJICBNQ19DTURfUFJJX0xPVywgdG9rZW4pOworCWNtZC5wYXJhbXNbMF0gfD0gbWNfZW5jKDMyLCA4LCBpcnFfaW5kZXgpOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwllcnIgPSBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworCWlmIChlcnIpCisJCXJldHVybiBlcnI7CisKKwkvKiByZXRyaWV2ZSByZXNwb25zZSBwYXJhbWV0ZXJzICovCisJKm1hc2sgPSAodWludDMyX3QpbWNfZGVjKGNtZC5wYXJhbXNbMF0sIDAsIDMyKTsKKwlyZXR1cm4gMDsKK30KKworaW50IGRwYnBfZ2V0X2lycV9zdGF0dXMoc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sCisJCQl1aW50MTZfdCB0b2tlbiwKKwkJCXVpbnQ4X3QgaXJxX2luZGV4LAorCQkJdWludDMyX3QgKnN0YXR1cykKK3sKKwlzdHJ1Y3QgbWNfY29tbWFuZCBjbWQgPSB7IDAgfTsKKwlpbnQgZXJyOworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQQlBfQ01ESURfR0VUX0lSUV9TVEFUVVMsCisJCQkJCSAgTUNfQ01EX1BSSV9MT1csIHRva2VuKTsK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tlbik7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMzIsIDgsIGlycV9pbmRleCk7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCWVyciA9IG1jX3NlbmRfY29tbWFuZChtY19pbywgJmNtZCk7CisJaWYgKGVycikKKwkJcmV0dXJuIGVycjsKKworCS8qIHJldHJpZXZlIHJlc3BvbnNlIHBhcmFtZXRlcnMgKi8KKwkqZW4gPSAodWludDhfdCltY19kZWMoY21kLnBhcmFtc1swXSwgMCwgOCk7CisJcmV0dXJuIDA7Cit9CisKK2ludCBkcG1jcF9zZXRfaXJxX21hc2soc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sCisJCSAgICAgICB1aW50MTZfdCB0b2tlbiwKKwkJICAgICAgdWludDhfdCBpcnFfaW5kZXgsCisJCSAgICAgIHVpbnQzMl90IG1hc2spCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisKKwkvKiBwcmVwYXJlIGNvbW1hbmQgKi8KKwljbWQuaGVhZGVyID0gbWNfZW5jb2RlX2NtZF9oZWFkZXIoRFBNQ1BfQ01ESURfU0VUX0lSUV9NQVNLLAorCQkJCQkgIE1DX0NNRF9QUklfTE9XLCB0b2tlbik7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMCwgMzIsIG1hc2spOworCWNtZC5wYXJhbXNbMF0gfD0gbWNfZW5jKDMyLCA4LCBpcnFfaW5kZXgpOworCisJLyogc2VuZCBjb21tYW5kIHRvIG1jKi8KKwlyZXR1cm4gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKK30KKworaW50IGRwbWNwX2dldF9pcnFfbWFzayhzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJICAgICAgIHVpbnQxNl90IHRva2VuLAorCQkgICAgICB1aW50OF90IGlycV9pbmRleCwKKwkJICAgICAgdWludDMyX3QgKm1hc2spCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07C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ICogQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUKKyAqIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFLgorICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLy8qCisgZHBtbmctY21kLmgKKworIGRlZmluZXMgcG9ydGFsIGNvbW1hbmRzCisKKyAqLy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfX0ZTTF9EUE1OR19DTURfSAorI2RlZmluZSBfX0ZTTF9EUE1OR19DTURfSAorCisvKiBDb21tYW5kIElEcyAqLworI2RlZmluZSBEUE1OR19DTURJRF9HRVRfQ09OVF9JRAkJCTB4ODMwCisjZGVmaW5lIERQTU5HX0NNRElEX0dFVF9WRVJTSU9OCQkJMHg4MzEKKworI2VuZGlmIC8qIF9fRlNMX0RQTU5HX0NNRF9IICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvZnNsLW1jL2J1cy9kcG1uZy5jIGIvZHJpdmVycy9zdGFnaW5nL2ZzbC1tYy9idXMvZHBtbmcuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41ODMyOGU4Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL2ZzbC1tYy9idXMvZHBtbmcuYwpAQCAtMCwwICsxLDc4IEBACisvKiBDb3B5cmlnaHQgMjAxMy0yMDE0IEZyZWVzY2FsZSBTZW1pY29uZHVjdG9yIEluYy4KKyoKKyogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CisqIG1vZGl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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLy8qCisgZHByYy1jbWQuaAorCisgZGVmaW5lcyBkcHJjIHBvcnRhbCBjb21tYW5kcworCisgKi8vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZm5kZWYgX0ZTTF9EUFJDX0NNRF9ICisjZGVmaW5lIF9GU0xfRFBSQ19DTURfSAorCisvKiBEUFJDIFZlcnNpb24gKi8KKyNkZWZpbmUgRFBSQ19WRVJfTUFKT1IJCQkJMworI2RlZmluZSBEUFJDX1ZFUl9NSU5PUgkJCQkwCisKKy8qIENvbW1hbmQgSURzICovCisjZGVmaW5lIERQUkNfQ01ESURfQ0xPU0UJCQkweDgwMAorI2RlZmluZSBEUFJDX0NNRElEX09QRU4JCQkJMHg4MDUKKyNkZWZpbmUgRFBSQ19DTURJRF9DUkVBVEUJCQkweDkwNQorCisjZGVmaW5lIERQUkNfQ01ESURfR0VUX0FUVFIJCQkweDAwNAorI2RlZmluZSBEUFJDX0NNRElEX1JFU0VUX0NPTlQJCQkweDAwNQorCisjZGVmaW5lIERQUkNfQ01ESURfU0VUX0lSUQkJCTB4MDEwCisjZGVmaW5lIERQUkNfQ01ESURfR0VUX0lSUQkJCTB4MDExCisjZGVmaW5lIERQUkNfQ01ESURfU0VUX0lSUV9FTkFCTEUJCTB4MDEyCisjZGVmaW5lIERQUkNfQ01ESURfR0VUX0lSUV9FTkFCTEUJCTB4MDEzCisjZGVmaW5lIERQUkNfQ01ESURfU0VUX0lSUV9NQVNLCQkJMHgwMTQKKyNkZWZpbmUgRFBSQ19DTURJRF9HRVRfSVJRX01BU0sJCQkweDAxNQorI2RlZmluZSBEUFJDX0NNRElEX0dFVF9JUlFfU1RBVFVTCQkweDAxNgorI2RlZmluZSBEUFJDX0NNRElEX0NMRUFSX0lSUV9TVEFUVVMJCTB4MD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SV9MT1csIHRva2VuKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygzMiwgOCwgaXJxX2luZGV4KTsKKworCS8qIHNlbmQgY29tbWFuZCB0byBtYyovCisJZXJyID0gbWNfc2VuZF9jb21tYW5kKG1jX2lvLCAmY21kKTsKKwlpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJLyogcmV0cmlldmUgcmVzcG9uc2UgcGFyYW1ldGVycyAqLworCSplbiA9IG1jX2RlYyhjbWQucGFyYW1zWzBdLCAwLCA4KTsKKworCXJldHVybiAwOworfQorCitpbnQgZHByY19zZXRfaXJxX2VuYWJsZShzdHJ1Y3QgZnNsX21jX2lvICptY19pbywKKwkJCXVpbnQxNl90IHRva2VuLAorCQkJdWludDhfdCBpcnFfaW5kZXgsCisJCQl1aW50OF90IGVuKQoreworCXN0cnVjdCBtY19jb21tYW5kIGNtZCA9IHsgMCB9OworCisJLyogcHJlcGFyZSBjb21tYW5kICovCisJY21kLmhlYWRlciA9IG1jX2VuY29kZV9jbWRfaGVhZGVyKERQUkNfQ01ESURfU0VUX0lSUV9FTkFCTEUsCisJCQkJCSAgTUNfQ01EX1BSSV9MT1csIHRva2VuKTsKKwljbWQucGFyYW1zWzBdIHw9IG1jX2VuYygwLCA4LCBlbik7CisJY21kLnBhcmFtc1swXSB8PSBtY19lbmMoMzIsIDgsIGlycV9pbmRleCk7CisKKwkvKiBzZW5kIGNvbW1hbmQgdG8gbWMqLworCXJldHVybiBtY19zZW5kX2NvbW1hbmQobWNfaW8sICZjbWQpOworfQorCitpbnQgZHByY19nZXRfaXJxX21hc2soc3RydWN0IGZzbF9tY19pbyAqbWNfaW8sCisJCSAgICAgIHVpbnQxNl90IHRva2VuLAorCQkgICAgICB1aW50OF90IGlycV9pbmRleCwKKwkJICAgICAgdWludDMyX3QgKm1hc2spCit7CisJc3RydWN0IG1jX2NvbW1hbmQgY21kID0geyAwIH07CisJaW50IGVycjsKKworCS8qIHByZXBhcmUgY29tbWFuZCA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cmMpOworCQlwcl9lcnIoIkx1c3RyZUVycm9yOiBsaWJjZnNfZGVidWdfY2xlYW51cDogJWRcbiIsIHJjKTsKIAogCWxpYmNmc19hcmNoX2NsZWFudXAoKTsKIH0KIAorc3RhdGljIGludCBwcm9jX2NhbGxfaGFuZGxlcih2b2lkICpkYXRhLCBpbnQgd3JpdGUsIGxvZmZfdCAqcHBvcywKKwkJdm9pZCBfX3VzZXIgKmJ1ZmZlciwgc2l6ZV90ICpsZW5wLAorCQlpbnQgKCpoYW5kbGVyKSh2b2lkICpkYXRhLCBpbnQgd3JpdGUsCisJCWxvZmZfdCBwb3MsIHZvaWQgX191c2VyICpidWZmZXIsIGludCBsZW4pKQoreworCWludCByYyA9IGhhbmRsZXIoZGF0YSwgd3JpdGUsICpwcG9zLCBidWZmZXIsICpsZW5wKTsKKworCWlmIChyYyA8IDApCisJCXJldHVybiByYzsKKworCWlmICh3cml0ZSkgeworCQkqcHBvcyArPSAqbGVucDsKKwl9IGVsc2UgeworCQkqbGVucCA9IHJjOworCQkqcHBvcyArPSByYzsKKwl9CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgX19wcm9jX2RvYml0bWFza3Modm9pZCAqZGF0YSwgaW50IHdyaXRlLAorCQkJICAgICBsb2ZmX3QgcG9zLCB2b2lkIF9fdXNlciAqYnVmZmVyLCBpbnQgbm9iKQoreworCWNvbnN0IGludCAgICAgdG1wc3RybGVuID0gNTEyOworCWNoYXIJICp0bXBzdHI7CisJaW50CSAgIHJjOworCXVuc2lnbmVkIGludCAqbWFzayA9IGRhdGE7CisJaW50CSAgIGlzX3N1YnN5cyA9IChtYXNrID09ICZsaWJjZnNfc3Vic3lzdGVtX2RlYnVnKSA/IDEgOiAwOworCWludAkgICBpc19wcmludGsgPSAobWFzayA9PSAmbGliY2ZzX3ByaW50aykgPyAxIDogMDsKKworCXJjID0gY2ZzX3RyYWNlX2FsbG9jYXRlX3N0cmluZ19idWZmZXIoJnRtcHN0ciwgdG1wc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KwkJTEJVRygpOworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHByb2NfZmFpbF9sb2Moc3RydWN0IGN0bF90YWJsZSAqdGFibGUsIGludCB3cml0ZSwKKwkJCSB2b2lkIF9fdXNlciAqYnVmZmVyLAorCQkJIHNpemVfdCAqbGVucCwgbG9mZl90ICpwcG9zKQoreworCWludCByYzsKKwlsb25nIG9sZF9mYWlsX2xvYyA9IGNmc19mYWlsX2xvYzsKKworCXJjID0gcHJvY19kb3Vsb25ndmVjX21pbm1heCh0YWJsZSwgd3JpdGUsIGJ1ZmZlciwgbGVucCwgcHBvcyk7CisJaWYgKG9sZF9mYWlsX2xvYyAhPSBjZnNfZmFpbF9sb2MpCisJCXdha2VfdXAoJmNmc19yYWNlX3dhaXRxKTsKKwlyZXR1cm4gcmM7Cit9CisKK3N0YXRpYyBpbnQgX19wcm9jX2NwdF90YWJsZSh2b2lkICpkYXRhLCBpbnQgd3JpdGUsCisJCQkgICAgbG9mZl90IHBvcywgdm9pZCBfX3VzZXIgKmJ1ZmZlciwgaW50IG5vYikKK3sKKwljaGFyICpidWYgPSBOVUxMOworCWludCAgIGxlbiA9IDQwOTY7CisJaW50ICAgcmMgID0gMDsKKworCWlmICh3cml0ZSkKKwkJcmV0dXJuIC1FUEVSTTsKKworCUxBU1NFUlQoY2ZzX2NwdF90YWJsZSAhPSBOVUxMKTsKKworCXdoaWxlICgxKSB7CisJCUxJQkNGU19BTExPQyhidWYsIGxlbik7CisJCWlmIChidWYgPT0gTlVMTCkKKwkJCXJldHVybiAtRU5PTUVNOworCisJCXJjID0gY2ZzX2NwdF90YWJsZV9wcmludChjZnNfY3B0X3RhYmxlLCBidWYsIGxlbik7CisJCWlmIChyYyA+PSAwKQorCQkJYnJlYWs7CisKKwkJaWYgKHJjID09IC1FRkJJRykgeworCQkJTElCQ0ZTX0ZSRUUoYnVmLCBsZW4pOworCQkJbGVuIDw8PSAxOworCQkJY29udGludWU7CisJCX0KKwkJZ290byBvdXQ7Cis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isJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19kb2JpdG1hc2tzLAorCX0sCisJeworCQkucHJvY25hbWUgPSAicHJpbnRrIiwKKwkJLmRhdGEgICAgID0gJmxpYmNmc19wcmludGssCisJCS5tYXhsZW4gICA9IHNpemVvZihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfZG9iaXRtYXNrcywKKwl9LAorCXsKKwkJLnByb2NuYW1lID0gImNvbnNvbGVfcmF0ZWxpbWl0IiwKKwkJLmRhdGEgICAgID0gJmxpYmNmc19jb25zb2xlX3JhdGVsaW1pdCwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19kb2ludHZlYworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9tYXhfZGVsYXlfY2VudGlzZWNzIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX21heF9kZWxheV9jcworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9taW5fZGVsYXlfY2VudGlzZWNzIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX21pbl9kZWxheV9jcworCX0sCisJeworCQkucHJvY25hbWUgPSAiY29uc29sZV9iYWNrb2ZmIiwKKwkJLm1heGxlbiAgID0gc2l6ZW9mKGludCksCisJCS5tb2RlICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgPSAmcHJvY19jb25zb2xlX2JhY2tvZmYKKwl9LAorCisJeworCQkucHJvY25hbWUgPSAiZGVidWdfcGF0aCIsCisJCS5k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3RydWN0IHNlcV9maWxlICptLCB2b2lkICp2KQogewotCWludCAgICAgcmM7Ci0KIAlzcGluX2xvY2soJnBhZ2VfcG9vbHMuZXBwX2xvY2spOwogCi0JcmMgPSBzZXFfcHJpbnRmKG0sCi0JCSAgICAgICJwaHlzaWNhbCBwYWdlczoJICAlbHVcbiIKLQkJICAgICAgInBhZ2VzIHBlciBwb29sOgkgICVsdVxuIgotCQkgICAgICAibWF4IHBhZ2VzOgkgICAgICAgJWx1XG4iCi0JCSAgICAgICJtYXggcG9vbHM6CSAgICAgICAldVxuIgotCQkgICAgICAidG90YWwgcGFnZXM6CSAgICAgJWx1XG4iCi0JCSAgICAgICJ0b3RhbCBmcmVlOgkgICAgICAlbHVcbiIKLQkJICAgICAgImlkbGUgaW5kZXg6CSAgICAgICVsdS8xMDBcbiIKLQkJICAgICAgImxhc3Qgc2hyaW5rOgkgICAgICVsZHNcbiIKLQkJICAgICAgImxhc3QgYWNjZXNzOgkgICAgICVsZHNcbiIKLQkJICAgICAgIm1heCBwYWdlcyByZWFjaGVkOiAgICAgICAlbHVcbiIKLQkJICAgICAgImdyb3dzOgkJICAgJXVcbiIKLQkJICAgICAgImdyb3dzIGZhaWx1cmU6CSAgICV1XG4iCi0JCSAgICAgICJzaHJpbmtzOgkJICV1XG4iCi0JCSAgICAgICJjYWNoZSBhY2Nlc3M6CSAgICAlbHVcbiIKLQkJICAgICAgImNhY2hlIG1pc3Npbmc6CSAgICVsdVxuIgotCQkgICAgICAibG93IGZyZWUgbWFyazoJICAgJWx1XG4iCi0JCSAgICAgICJtYXggd2FpdHF1ZXVlIGRlcHRoOiAgICAgJXVcbiIKLQkJICAgICAgIm1heCB3YWl0IHRpbWU6CSAgICJDRlNfVElNRV9UIi8ldVxuIgotCQkgICAgICAsCi0JCSAgICAgIHRvdGFscmFtX3BhZ2VzLAotCQkgICAgICBQQUdFU19QRVJfUE9PTCwKLQkJICAgICAgcGFnZV9wb29scy5lcHBfbWF4X3BhZ2VzLAotCQk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EZJRUxEX0ZJRUxEKHVpbnQzMl90IHNlc3NyZXFpbnRtc2sJCTogMSwKKwkJX19CSVRGSUVMRF9GSUVMRCh1aW50MzJfdCBkaXNjb25uaW50bXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgY29uaWRzdHNjaG5nbXNrCTogMSwKKwkJX19CSVRGSUVMRF9GSUVMRCh1aW50MzJfdCByZXNlcnZlZF8yN18yNwk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgcHR4ZmVtcG1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IGhjaGludG1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IHBydGludG1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IHJlc2VydmVkXzIzXzIzCTogMSwKKwkJX19CSVRGSUVMRF9GSUVMRCh1aW50MzJfdCBmZXRzdXNwbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgaW5jb21wbHBtc2sJCTogMSwKKwkJX19CSVRGSUVMRF9GSUVMRCh1aW50MzJfdCBpbmNvbXBpc29pbm1zawk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3Qgb2VwaW50bXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgaW5lcGludG1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IGVwbWlzbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgcmVzZXJ2ZWRfMTZfMTYJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IGVvcGZtc2sJCTogMSwKKwkJX19CSVRGSUVMRF9GSUVMRCh1aW50MzJfdCBpc29vdXRkcm9wbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgZW51bWRvbmVtc2sJCTogMSwKKwkJX19CS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IHRvICB8ZnJvbSB8bW9yZSB8cmV0cnl8IHB3ciB8bW9yZSB8d2VwICAgfAorICogICAgICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgeD0wIGRhdGEseD0xIGRhdGErYWNrIHwgRFMgIHwgRFMgIHxmcmFnIHwgICAgIHwgbWdtIHxkYXRhIHwgICAgICB8CisgKiAgICAgICctLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLScKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL1wKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICogODAyLjExIERhdGEgRnJhbWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICAgICAgICAsLS0tLS0tLS0tICdjdHJsJyBleHBhbmRzIHRvID4tLS0tLS0tLS0tLScKKyAqICAgICAgICAgIHwKKyAqICAgICAgICwtLSctLS0sLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS4KKyAqIEJ5dGVzIHwgIDIgICB8ICAyICAgfCAgICA2ICAgIHwgICAgNiAgICB8ICAgIDYgICAgfCAgMiAgIHwgMC4uMjMxMiB8ICAgNCAgfAorICogICAgICAgfC0tLS0tLXwtLS0tLS18LS0tLS0tLS0tfC0tLS0tLS0tLXwtLS0tLS0tLS18LS0tLS0tfC0tLS0tLS0tLXwtLS0tLS18CisgKiBEZXNjLiB8IGN0cmwgfCBkdXJhIHwgIERBL1JBICB8ICAgVEEgICAgfCAgICBTQSAgIHwgU2VxdSB8ICBGcmFtZSAgfCAgZmNzIHwKKyAqICAgICAgIHwgICAgICB8IHRpb24gfCAoQlNTSUQpIHwgICAgICAgICB8ICAgICAgICAgfCBlbmNlIHwgIGRhdGEgICB8ICAgICAgfAorICogICAgICAgYC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCAgICAgICAgIHwtLS0tLS0nCisgKiBUb3RhbDogMjggbm9uLWRhdGEgYnl0ZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgLS0tLS4tLS0tJworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICAgICAgLi0gJ0ZyYW1lIGRhdGEnIGV4cGFuZHMgdG8gPC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLScKKyAqICAgICAgICB8CisgKiAgICAgICAgVgorICogICAgICAgLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS4KKyAqIEJ5dGVzIHwgIDEgICB8ICAxICAgfCAgICAxICAgIHwgICAgMyAgICAgfCAgMiAgIHwgIDAtMjMwNCB8CisgKiAgICAgICB8LS0tLS0tfC0tLS0tLXwtLS0tLS0tLS18LS0tLS0tLS0tLXwtLS0tLS18LS0tLS0tLS0tfAorICogRGVzYy4gfCBTTkFQIHwgU05BUCB8IENvbnRyb2wgfEV0aCBUdW5uZWx8IFR5cGUgfCBJUCAgICAgIHwKKyAqICAgICAgIHwgRFNBUCB8IFNTQVAgfCAgICAgICAgIHwgICAgICAgICAgfCAgICAgIHwgUGFja2V0ICB8CisgKiAgICAgICB8IDB4QUEgfCAweEFBIHwweDAzIChVSSl8MHgwMC0wMC1GOHwgICAgICB8ICAgICAgICAgfAorICogICAgICAgYC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCAgICAgICAgIHwKKyAqIFRvdGFsOiA4IG5vbi1kYXRhIGJ5dGVzICAgICAgICAgICAgICAgICAgICAgICAgIGAtLS0tLi0tLS0nCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICAuLSAnSVAgUGFja2V0JyBleHBhbmRzLCBpZiBXRVAgZW5hYmxlZCwgdG8gPC0tJworICogICAgICAgIHwKKyAqICAgICAgICBWCisgKiAgICAgICAsLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0uCisgKiBCeXRlcyB8ICA0ICB8ICAgMC0yMjk2ICB8ICA0ICB8CisgKiAgICAgICB8LS0tLS18LS0tLS0tLS0tLS18LS0tLS18CisgKiBEZXNjLiB8IElWICB8IEVuY3J5cHRlZCB8IElDViB8CisgKiAgICAgICB8ICAgICB8IElQIFBhY2tldCB8ICAgICB8CisgKiAgICAgICBgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0nCisgKiBUb3RhbDogOCBub24tZGF0YSBieXRlcworICoKKyAqCisgKiA4MDIuMyBFdGhlcm5ldCBEYXRhIEZyYW1lCisgKgorICogICAgICAgLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLgorICogQnl0ZXMgfCAgIDYgICB8ICAgNiAgIHwgIDIgICB8ICBWYXJpYWJsZSB8ICAgNCAgfAorICogICAgICAgfC0tLS0tLS18LS0tLS0tLXwtLS0tLS18LS0tLS0tLS0tLS18LS0tLS0tfAorICogRGVzYy4gfCBEZXN0LiB8IFNvdXJjZXwgVHlwZSB8IElQIFBhY2tldCB8ICBmY3MgfAorICogICAgICAgfCAgTUFDICB8ICBNQUMgIHwgICAgICB8CSAgIHwgICAgICB8CisgKiAgICAgICBgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0nCisgKiBUb3RhbDogMTggbm9uLWRhdGEgYnl0ZXMKKyAqCisgKiBJbiB0aGUgZXZlbnQgdGhhdCBmcmFnbWVudGF0aW9uIGlzIHJlcXVpcmVkLCB0aGUgaW5jb21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AgICAgICAgICBfX2k7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJdTggIGJ1ZmZlcltNQVhfU1RSX0xFTl07CQkJCQlcCi0JCQkJaW50IGxlbmd0aCA9IChfTGVuPE1BWF9TVFJfTEVOKT8gX0xlbiA6IChNQVhfU1RSX0xFTi0xKSA7CVwKLQkJCQltZW1zZXQoYnVmZmVyLCAwLCBNQVhfU1RSX0xFTik7CQkJCQlcCi0JCQkJbWVtY3B5KGJ1ZmZlciwgKHU4ICopX1B0ciwgbGVuZ3RoICk7CQkJCVwKLQkJCQlmb3IoIF9faT0wOyBfX2k8TUFYX1NUUl9MRU47IF9faSsrICkgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJICAgICBpZiggIVBSSU5UQUJMRShidWZmZXJbX19pXSkgKSAgIGJ1ZmZlcltfX2ldID0gJz8nOwkJXAotCQkJCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJYnVmZmVyW2xlbmd0aF0gPSAnXDAnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQlwcmludGsoIlJ0bDgxOXg6ICIpOwkJCQkJCVwKLQkJCQlwcmludGsoX1RpdGxlU3RyaW5nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCQlwcmludGsoIjogJWQsIDwlcz5cbiIsIF9MZW4sIGJ1ZmZlcik7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCX0KLSNlbHNlCi0jZGVmaW5lIElFRUU4MDIxMV9QUklOVF9TVFIoX0NvbXAsIF9UaXRsZVN0cmluZywgX1B0ciwgX0xlbikgIGRvIHt9IHdoaWxlICgwKQotI2VuZ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TgwMjExL3J0bDgxOXhfSFRQcm9jLmMKQEAgLTQ3MSwxMiArNDcxLDEwIEBACiBzdGF0aWMgYm9vbCBIVElPVEFjdElzRGlzYWJsZU1DU1R3b1NwYXRpYWxTdHJlYW0oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCiAJCQkJCQkgdTggKlBlZXJNYWNBZGRyKQogewotCWJvb2wgcmV0VmFsdWUgPSBmYWxzZTsKLQogI2lmZGVmIFRPRE8KIAkvLyBBcHBseSBmb3IgODE5dSBvbmx5CiAjZW5kaWYKLQlyZXR1cm4gcmV0VmFsdWU7CisJcmV0dXJuIGZhbHNlOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTQ4OCwxMSArNDg2LDggQEAKICAgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyB1OCBIVElPVEFjdElzRGlzYWJsZUVEQ0FUdXJibyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKIAkJCQkgICAgIHU4ICpQZWVyTWFjQWRkcikKLXsKLQl1OAlyZXRWYWx1ZSA9IGZhbHNlOwkvLyBkZWZhdWx0IGVuYWJsZSBFRENBIFR1cmJvIG1vZGUuCi0JLy8gU2V0IHNwZWNpZmljIEVEQ0EgcGFyYW1ldGVyIGZvciBkaWZmZXJlbnQgQVAgaW4gRE0gaGFuZGxlci4KLQotCXJldHVybiByZXRWYWx1ZTsKK3sJLyogZGVmYXVsdCBlbmFibGUgRURDQSBUdXJibyBtb2RlLiAqLworCXJldHVybiBmYWxzZTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKio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worCQlydHN4X3RyYWNlKGNoaXApOworCQlyZXR1cm4gU1RBVFVTX0ZBSUw7CisJfQogCiAJcmV0dXJuIFNUQVRVU19TVUNDRVNTOwogfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NrZWluL3NrZWluX2Jsb2NrLmMgYi9kcml2ZXJzL3N0YWdpbmcvc2tlaW4vc2tlaW5fYmxvY2suYwppbmRleCA5YmQ2OWNlLi5iMGNkOTM1IDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvc2tlaW4vc2tlaW5fYmxvY2suYworKysgYi9kcml2ZXJzL3N0YWdpbmcvc2tlaW4vc2tlaW5fYmxvY2suYwpAQCAtNjgsOSArNjgsNyBAQAogCiAjaWYgU0tFSU5fVU5ST0xMXzI1NiA9PSAwCiAjZGVmaW5lIFIyNTYocDAsIHAxLCBwMiwgcDMsIFJPVCwgcl9udW0pIC8qIGZ1bGx5IHVucm9sbGVkICovIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCVJPVU5EMjU2KHAwLCBwMSwgcDIsIHAzLCBST1QsIHJfbnVtKTsgICAgICAgICAgICAgICAgIFwKLX0gd2hpbGUgKDApCisJUk9VTkQyNTYocDAsIHAxLCBwMiwgcDMsIFJPVCwgcl9udW0pCiAKICNkZWZpbmUgSTI1NihSKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xNTIsOSArMTUwLDcgQEAKIAogI2lmIFNLRUlOX1VOUk9MTF81MTIgPT0gMAogI2RlZmluZSBSNTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSkgLyogdW5yb2xsZWQgKi8gXAotZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCVJPVU5ENTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSk7ICAgICAgICAgICBcCi19IHdoaWxlICgwKQorCVJPVU5ENTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSkKIAogI2RlZmluZSBJNTEyKFIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9zbGljb3NzL3NsaWNvc3MuYyBiL2RyaXZlcnMvc3RhZ2luZy9zbGljb3NzL3NsaWNvc3MuYwppbmRleCA0MmQ2MmVmLi5jMmJkYTFkIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvc2xpY29zcy9zbGljb3NzLmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3NsaWNvc3Mvc2xpY29zcy5jCkBAIC04NCw3ICs4NCw2IEBACiAjaW5jbHVkZSA8bGludXgvc2VxX2ZpbGUuaD4KICNpbmNsdWRlIDxsaW51eC9rdGhyZWFkLmg+CiAjaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+Ci0jaW5jbHVkZSA8bGludXgvbW9kdWxlcGFyYW0uaD4KIAogI2luY2x1ZGUgPGxpbnV4L2Zpcm13YXJlLmg+CiAjaW5jbHVkZSA8bGludXgvdHlwZXMuaD4KQEAgLTk5LDggKzk4LDcgQEAKICNpbmNsdWRlICJzbGljLmgiCiAKIHN0YXRpYyB1aW50IHNsaWNfZmlyc3RfaW5pdCA9IDE7Ci1zdGF0aWMgY2hhciAqc2xpY19iYW5uZXIgPSA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tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwLmggYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTAuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yYzEwYTA4Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwLmgKQEAgLTAsMCArMSwyNCBAQAorI2lmbmRlZiBEREs3NTBfSF9fCisjZGVmaW5lIERESzc1MF9IX18KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqCisqICAgICAgICAgQ29weXJpZ2h0IChjKSAyMDA3IGJ5IFNpbGljb24gTW90aW9uLCBJbmMuIChTTUkpCisqCisqICBBbGwgcmlnaHRzIGFyZSByZXNlcnZlZC4gUmVwcm9kdWN0aW9uIG9yIGluIHBhcnQgaXMgcHJvaGliaXRlZAorKiAgd2l0aG91dCB0aGUgd3JpdHRlbiBjb25zZW50IG9mIHRoZSBjb3B5cmlnaHQgb3duZXIuCisqCisqICBSZWdTQy5oIC0tLSBTTTcxOCBTREsKKyogIFRoaXMgZmlsZSBjb250YWlucyB0aGUgZGVmaW5pdGlvbnMgZm9yIHRoZSBTeXN0ZW0gQ29uZmlndXJhdGlvbiByZWdpc3RlcnMuCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2luY2x1ZGUgImRkazc1MF9yZWcuaCIKKyNpbmNsdWRlICJkZGs3NTBfbW9kZS5oIgorI2luY2x1ZGUgImRkazc1MF9jaGlwLmgiCisjaW5jbHVkZSAiZGRrNzUwX2Rpc3BsYXkuaCIKKyNpbmNsdWRlICJkZGs3NTBfcG93ZXIuaCIKKyNpbmNsdWRlICJkZGs3NTBfaGVscC5oIgorI2lmZGVmIFVTRV9IV19JMkM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CBvZiBtYWluIGNoaXAgY2xvY2sgaW4gTUh6IHVuaXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBrZWVwIHRoZSBjdXJyZW50IGNsb2NrIHNldHRpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE90aGVycyA9IHRoZSBuZXcgbWFpbiBjaGlwIGNsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICB1bnNpZ25lZCBzaG9ydCBtZW1DbG9jazsgICAgIC8qIFNwZWVkIG9mIG1lbW9yeSBjbG9jayBpbiBNSHogdW5pdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IGtlZXAgdGhlIGN1cnJlbnQgY2xvY2sgc2V0dGluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3RoZXJzID0gdGhlIG5ldyBtZW1vcnkgY2xvY2sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgIHVuc2lnbmVkIHNob3J0IG1hc3RlckNsb2NrOyAgLyogU3BlZWQgb2YgbWFzdGVyIGNsb2NrIGluIE1IeiB1bml0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0ga2VlcCB0aGUgY3VycmVudCBjbG9jayBzZXR0aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdGhlcnMgPSB0aGUgbmV3IG1hc3RlciBjbG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgdW5zaWduZWQgc2hvcnQgc2V0QWxsRW5nT2ZmOyAvKiAwID0gbGVhdmUgYWxsIGVuZ2luZSBzdGF0ZSB1bnRvdWNoZWQuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gbWFrZSBzdXJlIHRoZXkgYXJlIG9mZjogMkQsIE92ZXJsYXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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KyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHdoaWxlIChzdGF0dXMgPT0gU1lTVEVNX0NUUkxfUEFORUxfVlNZTkNfQUNUSVZFKTsKKworICAgICAgICAgICAgLyogV2FpdCBmb3Igc3RhcnQgb2YgdnN5bmMuICovCisgICAgICAgICAgICBkbworICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0YXR1cyA9IEZJRUxEX0dFVChQRUVLMzIoU1lTVEVNX0NUUkwpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTWVNURU1fQ1RSTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEFORUxfVlNZTkMpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgd2hpbGUgKHN0YXR1cyA9PSBTWVNURU1fQ1RSTF9QQU5FTF9WU1lOQ19JTkFDVElWRSk7CisgICAgICAgIH0KKworCX1lbHNleworCisJCS8qIERvIG5vdCB3YWl0IHdoZW4gdGhlIFByaW1hcnkgUExMIGlzIG9mZiBvciBkaXNwbGF5IGNvbnRyb2wgaXMgYWxyZWFkeSBvZmYuCisJCQkgICBUaGlzIHdpbGwgcHJldmVudCB0aGUgc29mdHdhcmUgdG8gd2FpdCBmb3JldmVyLiAqLworCQlpZiAoKEZJRUxEX0dFVChQRUVLMzIoQ1JUX1BMTF9DVFJMKSwgQ1JUX1BMTF9DVFJMLCBQT1dFUikgPT0KKwkJCSBDUlRfUExMX0NUUkxfUE9XRVJfT0ZGKSB8fAorCQkJKEZJRUxEX0dFVChQRUVLMzIoQ1JUX0RJU1BMQVlfQ1RSTCksIENSVF9ESVNQTEFZX0NUUkwsIFRJTUlORykgPT0KKwkJCSBDUlRfRElTUExBWV9DVFJMX1RJTUlOR19ESVNBQkxFKSkKKwkJeworCQkJcmV0dXJuOworCQl9CisKKwkJd2hpbGUgKGRlbGF5LS0gPiAwKQorCQl7CisJCQkvKiBXYWl0IGZvciBlbmQgb2YgdnN5bmMuICovCisJCQlkbworCQ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RCBhcmUKKyAgICAgICBub3QgemVyb2VkLCB0aGVuIHNldCB0aGUgZmFpbHVyZSBmbGFnLiBJZiBpdCBpcyB6ZXJvZSwgaXQgbWlnaHQgbWVhbgorICAgICAgIHRoYXQgdGhlIHN5c3RlbSBpcyBpbiBEdWFsIENSVCBNb25pdG9yIGNvbmZpZ3VyYXRpb24uICovCisKKyAgICAvKiBEZS1za2V3IGVuYWJsZWQgd2l0aCBkZWZhdWx0IDExMWIgdmFsdWUuCisgICAgICAgVGhpcyB3aWxsIGZpeCBzb21lIGFydGlmYWN0cyBwcm9ibGVtIGluIHNvbWUgbW9kZSBvbiBib2FyZCAyLjIuCisgICAgICAgU29tZWhvdyB0aGlzIGZpeCBkb2VzIG5vdCBhZmZlY3QgYm9hcmQgMi4xLgorICAgICAqLworICAgIGlmICgoZHZpSW5pdCgxLCAgLyogU2VsZWN0IFJpc2luZyBFZGdlICovCisgICAgICAgICAgICAgICAgMSwgIC8qIFNlbGVjdCAyNC1iaXQgYnVzICovCisgICAgICAgICAgICAgICAgMCwgIC8qIFNlbGVjdCBTaW5nbGUgRWRnZSBjbG9jayAqLworICAgICAgICAgICAgICAgIDEsICAvKiBFbmFibGUgSFN5bmMgYXMgaXMgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIFZTeW5jIGFzIGlzICovCisgICAgICAgICAgICAgICAgMSwgIC8qIEVuYWJsZSBEZS1za2V3ICovCisgICAgICAgICAgICAgICAgNywgIC8qIFNldCB0aGUgZGUtc2tldyBzZXR0aW5nIHRvIG1heGltdW0gc2V0dXAgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIGNvbnRpbnVvdXMgU3luYyAqLworICAgICAgICAgICAgICAgIDEsICAvKiBFbmFibGUgUExMIEZpbHRlciAqLworICAgICAgICAgICAgICAgIDQgICAvKiBVc2UgdGhlIHJlY29tbWVuZGVkIHZhbHVlIGZvciBQTEwgRmlsdGVyIHZhbHVlICovCisgICAgICAgICkgIT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1NlbGVjdCwgZHVhbEVkZ2VDbGtTZWxlY3QsIGhzeW5jRW5hYmxlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnN5bmNFbmFibGUsIGRlc2tld0VuYWJsZSwgZGVza2V3U2V0dGluZywgY29udGludW91c1N5bmNFbmFibGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGxGaWx0ZXJFbmFibGUsIHBsbEZpbHRlclZhbHVlKTsKKwl9CisJcmV0dXJuIC0xOy8vZXJyb3IKK30KKworCisvKgorICogIGR2aUdldFZlbmRvcklECisgKiAgICAgIFRoaXMgZnVuY3Rpb24gZ2V0cyB0aGUgdmVuZG9yIElEIG9mIHRoZSBEVkkgY29udHJvbGxlciBjaGlwLgorICoKKyAqICBPdXRwdXQ6CisgKiAgICAgIFZlbmRvciBJRAorICovCit1bnNpZ25lZCBzaG9ydCBkdmlHZXRWZW5kb3JJRCh2b2lkKQoreworICAgIGR2aV9jdHJsX2RldmljZV90ICpwQ3VycmVudER2aUN0cmw7CisKKyAgICAvL3BDdXJyZW50RHZpQ3RybCA9IGdldER2aUN0cmwoKTsKKyAgICBwQ3VycmVudER2aUN0cmwgPSBnX2RjZnRTdXBwb3J0ZWREdmlDb250cm9sbGVyOworICAgIGlmIChwQ3VycmVudER2aUN0cmwgIT0gKGR2aV9jdHJsX2RldmljZV90ICopMCkKKyAgICAgICAgcmV0dXJuIHBDdXJyZW50RHZpQ3RybC0+cGZuR2V0VmVuZG9ySWQoKTsKKworICAgIHJldHVybiAweDAwMDA7Cit9CisKKworLyoKKyAqICBkdmlHZXREZXZpY2VJRAorICogICAgICBUaGlzIGZ1bmN0aW9uIGdldHMgdGhlIGRldmljZSBJRCBvZiB0aGUgRFZJIGNvbnRyb2xsZXIgY2hpcC4KKyAqCisgKiAgT3V0cHV0OgorICogICAgICBEZXZpY2UgSUQKKyAqLwordW5zaWduZWQgc2hvcnQgZHZpR2V0RGV2aWNlSUQodm9pZCkKK3sKKyAgICBkdmlf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pdHRlbiB0byB0aGUgZGV2aWNlCisgKiAgICAgIHBCdWZmZXIgICAgICAgICAtIFRoZSBidWZmZXIgdGhhdCBjb250YWlucyB0aGUgZGF0YSB0byBiZSB3cml0dGVuIHRvIHRoZQorICogICAgICAgICAgICAgICAgICAgICBpMmMgZGV2aWNlLgorICoKKyAqICBSZXR1cm4gVmFsdWU6CisgKiAgICAgIFRvdGFsIG51bWJlciBvZiBieXRlcyB0aG9zZSBhcmUgYWN0dWFsbHkgd3JpdHRlbi4KKyAqLworc3RhdGljIHVuc2lnbmVkIGludCBod0kyQ1dyaXRlRGF0YSgKKyAgICB1bnNpZ25lZCBjaGFyIGRldmljZUFkZHJlc3MsCisgICAgdW5zaWduZWQgaW50IGxlbmd0aCwKKyAgICB1bnNpZ25lZCBjaGFyICpwQnVmZmVyCispCit7CisgICAgdW5zaWduZWQgY2hhciBjb3VudCwgaTsKKyAgICB1bnNpZ25lZCBpbnQgdG90YWxCeXRlcyA9IDA7CisKKyAgICAvKiBTZXQgdGhlIERldmljZSBBZGRyZXNzICovCisgICAgUE9LRTMyKEkyQ19TTEFWRV9BRERSRVNTLCBkZXZpY2VBZGRyZXNzICYgfjB4MDEpOworCisgICAgLyogV3JpdGUgZGF0YS4KKyAgICAgKiBOb3RlOgorICAgICAqICAgICAgT25seSAxNiBieXRlIGNhbiBiZSBhY2Nlc3NlZCBwZXIgaTJjIHN0YXJ0IGluc3RydWN0aW9uLgorICAgICAqLworICAgIGRvCisgICAgeworICAgICAgICAvKiBSZXNldCBJMkMgYnkgd3JpdGluZyAwIHRvIEkyQ19SRVNFVCByZWdpc3RlciB0byBjbGVhciB0aGUgcHJldmlvdXMgc3RhdHVzLiAqLworICAgICAgICBQT0tFMzIoSTJDX1JFU0VULCAwKTsKKworICAgICAgICAvKiBTZXQgdGhlIG51bWJlciBvZiBieXRlcyB0byBiZSB3cml0dGVuICovCisgICAgICAgIGlmIChsZW5ndGggPCBNQVhfSFdJMkNfRklGTykKKyAgICAgICAgICAgIGNvdW50ID0gbGVuZ3RoIC0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY291bnQgPSBNQVhfSFdJMkNfRklGTyAtIDE7CisgICAgICAgIFBPS0UzMihJMkNfQllURV9DT1VOVCwgY291bnQpOworCisgICAgICAgIC8qIE1vdmUgdGhlIGRhdGEgdG8gdGhlIEkyQyBkYXRhIHJlZ2lzdGVyICovCisJICAgIGZvciAoaSA9IDA7IGkgPD0gY291bnQ7IGkrKykKKyAgICAgICAgICAgIFBPS0UzMihJMkNfREFUQTAgKyBpLCAqcEJ1ZmZlcisrKTsKKworICAgICAgICAvKiBTdGFydCB0aGUgSTJDICovCisgICAgICAgIFBPS0UzMihJMkNfQ1RSTCwgRklFTERfU0VUKFBFRUszMihJMkNfQ1RSTCksIEkyQ19DVFJMLCBDVFJMLCBTVEFSVCkpOworCisgICAgICAgIC8qIFdhaXQgdW50aWwgdGhlIHRyYW5zZmVyIGlzIGNvbXBsZXRlZC4gKi8KKyAgICAgICAgaWYgKGh3STJDV2FpdFRYRG9uZSgpICE9IDApCisgICAgICAgICAgICBicmVhazsKKworICAgICAgICAvKiBTdWJzdHJhY3QgbGVuZ3RoICovCisgICAgICAgIGxlbmd0aCAtPSAoY291bnQgKyAxKTsKKworICAgICAgICAvKiBUb3RhbCBieXRlIHdyaXR0ZW4gKi8KKyAgICAgICAgdG90YWxCeXRlcyArPSAoY291bnQgKyAxKTsKKworICAgIH0gd2hpbGUgKGxlbmd0aCA+IDApOworCisgICAgcmV0dXJuIHRvdGFsQnl0ZXM7Cit9CisKKworCisKKy8qCisgKiAgVGhpcyBmdW5jdGlvbiByZWFkcyBkYXRhIGZyb20gdGhlIHNsYXZlIGRldmljZSBhbmQgc3RvcmVzIHRoZW0KKyAqICBpbiB0aGUgZ2l2ZW4gYnVmZmVyCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGRldmljZUFkZHJlc3MgICAtIGkyYyBTbGF2ZSBkZXZpY2UgYWRkcmVzc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worICAgIHsKKyAgICAgICAgLyogUmVzZXQgSTJDIGJ5IHdyaXRpbmcgMCB0byBJMkNfUkVTRVQgcmVnaXN0ZXIgdG8gY2xlYXIgYWxsIHRoZSBzdGF0dXMuICovCisgICAgICAgIFBPS0UzMihJMkNfUkVTRVQsIDApOworCisgICAgICAgIC8qIFNldCB0aGUgbnVtYmVyIG9mIGJ5dGVzIHRvIGJlIHJlYWQgKi8KKyAgICAgICAgaWYgKGxlbmd0aCA8PSBNQVhfSFdJMkNfRklGTykKKyAgICAgICAgICAgIGNvdW50ID0gbGVuZ3RoIC0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY291bnQgPSBNQVhfSFdJMkNfRklGTyAtIDE7CisgICAgICAgIFBPS0UzMihJMkNfQllURV9DT1VOVCwgY291bnQpOworCisgICAgICAgIC8qIFN0YXJ0IHRoZSBJMkMgKi8KKyAgICAgICAgUE9LRTMyKEkyQ19DVFJMLCBGSUVMRF9TRVQoUEVFSzMyKEkyQ19DVFJMKSwgSTJDX0NUUkwsIENUUkwsIFNUQVJUKSk7CisKKyAgICAgICAgLyogV2FpdCB1bnRpbCB0cmFuc2FjdGlvbiBkb25lLiAqLworICAgICAgICBpZiAoaHdJMkNXYWl0VFhEb25lKCkgIT0gMCkKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIC8qIFNhdmUgdGhlIGRhdGEgdG8gdGhlIGdpdmVuIGJ1ZmZlciAqLworICAgICAgICBmb3IgKGkgPSAwOyBpIDw9IGNvdW50OyBpKyspCisJCSAgICAqcEJ1ZmZlcisrID0gUEVFSzMyKEkyQ19EQVRBMCArIGkpOworCisgICAgICAgIC8qIFN1YnN0cmFjdCBsZW5ndGggYnkgMTYgKi8KKyAgICAgICAgbGVuZ3RoIC09IChjb3VudCArIDEpOworCisgICAgICAgIC8qIE51bWJlciBvZiBieXRlcyByZWFkLiAqLworICAgICAgICB0b3RhbEJ5dGVzICs9IChjb3VudCArIDEpOworCisgICAgfSB3aGlsZS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mFsdWUgPSBQRUVLMzIoUE9XRVJfTU9ERV9DVFJMKTsKKworCWlmKGdldENoaXBUeXBlKCkgPT0gU003NTBMRSkKKwkJcmV0dXJuOworCisgICAgc3dpdGNoIChwb3dlck1vZGUpCisgICAgeworICAgICAgICBjYXNlIFBPV0VSX01PREVfQ1RSTF9NT0RFX01PREUwOgorICAgICAgICAgICAgY29udHJvbF92YWx1ZSA9IEZJRUxEX1NFVChjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE1PREUsIE1PREUwKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgUE9XRVJfTU9ERV9DVFJMX01PREVfTU9ERTE6CisgICAgICAgICAgICBjb250cm9sX3ZhbHVlID0gRklFTERfU0VUKGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgTU9ERSwgTU9ERTEpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUDoKKyAgICAgICAgICAgIGNvbnRyb2xfdmFsdWUgPSBGSUVMRF9TRVQoY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCBNT0RFLCBTTEVFUCk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgYnJlYWs7CisgICAgfQorCisgICAgLyogU2V0IHVwIG90aGVyIGZpZWxkcyBpbiBQb3dlciBDb250cm9sIFJlZ2lzdGVyICovCisgICAgaWYgKHBvd2VyTW9kZSA9PSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUCkKKyAgICB7CisgICAgICAgIGNvbnRyb2xfdmFsdWUgPQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICAgICAgICAgRklFTERfU0VUKCAgY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCAzMzZDTEssIE9GRikgfAorI2VuZGlmCisgICAgICAgICAgICBGSUVMRF9TRVQoICBjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE9TQ19JTlBVVCwgIE9GRik7CisgICAgfQorICAgIGVsc2UKKyAgICB7CisgICAgICAgIGNvbnRyb2xfdmFsdWUgPQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICAgICAgICAgRklFTERfU0VUKCAgY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCAzMzZDTEssIE9OKSB8CisjZW5kaWYKKyAgICAgICAgICAgIEZJRUxEX1NFVCggIGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgT1NDX0lOUFVULCAgT04pOworICAgIH0KKworICAgIC8qIFByb2dyYW0gbmV3IHBvd2VyIG1vZGUuICovCisgICAgUE9LRTMyKFBPV0VSX01PREVfQ1RSTCwgY29udHJvbF92YWx1ZSk7Cit9CisKK3ZvaWQgc2V0Q3VycmVudEdhdGUodW5zaWduZWQgaW50IGdhdGUpCit7CisgICAgdW5zaWduZWQgaW50IGdhdGVfcmVnOworICAgIHVuc2lnbmVkIGludCBtb2RlOworCisgICAgLyogR2V0IGN1cnJlbnQgcG93ZXIgbW9kZS4gKi8KKyAgICBtb2RlID0gZ2V0UG93ZXJNb2RlKCk7CisKKyAgICBzd2l0Y2ggKG1vZGUpCisgICAgeworICAgICAgICBjYXNlIFBPV0VSX01PREVfQ1RSTF9NT0RFX01PREUwOgorICAgICAgICAgICAgZ2F0ZV9yZWcgPSBNT0RFMF9HQVRFOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMToKKyAgICAgICAgICAgIGdhdGVfcmVnID0gTU9ERTFfR0FURTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBnYXRlX3JlZyA9IE1PREUwX0dBVEU7CisgICAgICAgICAgICBicmVhazsKKyAgICB9CisgIC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FibGUpOworCisvKgorICogVGhpcyBmdW5jdGlvbiBlbmFibGUvZGlzYWJsZSB0aGUgUFdNIEVuZ2luZQorICovCit2b2lkIGVuYWJsZVBXTSh1bnNpZ25lZCBpbnQgZW5hYmxlKTsKKworLyoKKyAqIFRoaXMgZnVuY3Rpb24gZW5hYmxlL2Rpc2FibGUgdGhlIEkyQyBFbmdpbmUKKyAqLwordm9pZCBlbmFibGVJMkModW5zaWduZWQgaW50IGVuYWJsZSk7CisKKy8qCisgKiBUaGlzIGZ1bmN0aW9uIGVuYWJsZS9kaXNhYmxlIHRoZSBTU1AuCisgKi8KK3ZvaWQgZW5hYmxlU1NQKHVuc2lnbmVkIGludCBlbmFibGUpOworCisKKyNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3JlZy5oIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3JlZy5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjIwMTZmOTcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfcmVnLmgKQEAgLTAsMCArMSwyNjE2IEBACisjaWZuZGVmIERESzc1MF9SRUdfSF9fCisjZGVmaW5lIERESzc1MF9SRUdfSF9fCisKKy8qIE5ldyByZWdpc3RlciBmb3IgU003NTBMRSAqLworI2RlZmluZSBERV9TVEFURTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNTQKKyNkZWZpbmUgREVfU1RBVEUxX0RFX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBERV9TVEFURTFfREVfQUJPUlRfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFURTFfREVfQUJPUlRfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIERFX1NUQVRFMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA1OAorI2RlZmluZSBERV9TVEFURTJfREVfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIERFX1NUQVRFMl9ERV9GSUZPX05PVEVNUFRZICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRFMl9ERV9GSUZPX0VNUFRZICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRFMl9ERV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgREVfU1RBVEUyX0RFX1NUQVRVU19JRExFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVEUyX0RFX1NUQVRVU19CVVNZICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RBVEUyX0RFX01FTV9GSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBERV9TVEFURTJfREVfTUVNX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFURTJfREVfTUVNX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVEFURTJfREVfUkVTRVJWRUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisKKworCisjZGVmaW5lIFNZU1RFTV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMAorI2RlZmluZSBTWVNURU1fQ1RSTF9EUE1TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WUEhQICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WUEhOICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WTkhQICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WTkhOICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX0JVUlNUICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9NQVNURVIgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfTUFTVEVSX09GRiAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfTUFTVEVSX09OICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9MQVRFTkNZX1RJTUVSICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgU1lTVEVNX0NUUkxfTEFURU5DWV9USU1FUl9PTiAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfTEFURU5DWV9USU1FUl9PRkYgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9TVEFUVVNfSURMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9TVEFUVVNfQlVTWSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9NRU1fRklGTyAgICAgICAgICAgICAgICAgICAgICAgMjE6MjEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfTUVNX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfTUVNX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfQ1NDX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgIDIwOjIwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NTQ19TVEFUVVNfSURMRSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NTQ19TVEFUVVNfQlVTWSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NSVF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAxOToxOQorI2RlZmluZSBTWVNURU1fQ1RSTF9DUlRfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9DUlRfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQU5FTF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUEFORUxfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUEFORUxfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfQ1VSUkVOVF9CVUZGRVIgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIFNZU1RFTV9DVFJMX0NVUlJFTlRfQlVGRkVSX05PUk1BTCAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0NVUlJFTlRfQlVGRkVSX0ZMSVBfUEVORElORyAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RNQV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBTWVNURU1fQ1RSTF9ETUFfU1RBVFVTX0lETEUgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9ETUFfU1RBVFVTX0JVU1kgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfQlVSU1RfUkVBRCAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX0JVUlNUX1JFQURfT0ZGICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX0JVUlNUX1JFQURfT04gICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfQUJPUlQgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0FCT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0FCT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9TVUJTWVNfSURfTE9DSyAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfU1VCU1lTX0lEX0xPQ0tfT0ZGICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfU1VCU1l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fVElNRV82NCAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1JU0NfQ1RSTF9JTlRfT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBNSVNDX0NUUkxfSU5UX09VVFBVVF9OT1JNQUwgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfSU5UX09VVFBVVF9JTlZFUlQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfUExMX0NMS19DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgTUlTQ19DVFJMX1BMTF9DTEtfQ09VTlRfT0ZGICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX1BMTF9DTEtfQ09VTlRfT04gICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RBQ19QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjIwCisjZGVmaW5lIE1JU0NfQ1RSTF9EQUNfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EQUNfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9DTEtfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBNSVNDX0NUUkxfQ0xLX1NFTEVDVF9PU0MgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfQ0xLX1NFTEVDVF9URVNUQ0xLICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9DT0xVTU5fU0laRSAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fQ09MVU1OX1NJWkVfMjU2ICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fQ09MVU1OX1NJWkVfNTEyICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fQ09MVU1OX1NJWkVfMTAyNCAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1NJWkUgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TSVpFXzhNICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TSVpFXzE2TSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TSVpFXzMyTSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TSVpFXzY0TSAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RXVFIgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1RSXzJDTEsgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1RSXzFDTEsgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdSXzNDTEsgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdSXzJDTEsgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUlBfM0NMSyAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUlBfNENMSyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUkZDICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSRkNfMTJDTEsgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSRkNfMTRDTEsgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSQVMgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJBU183Q0xLICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJBU184Q0xLICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1JFU0VUICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fUkVTRVRfUkVTRVQgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fUkVTRVRfTk9STUFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU1RBVEUgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TVEFURV9BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TVEFURV9JTkFDVElWRSAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9DUFVfQ0FTX0xBVEVOQ1kgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgTUlTQ19DVFJMX0NQVV9DQVNfTEFURU5DWV8yQ0xLICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0NQVV9DQVNfTEFURU5DWV8zQ0xLICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RMTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBNSVNDX0NUUkxfRExMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRExMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9PVVRQVVQgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX09VVFBVVF9MT1cgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX09VVFBVVF9ISUdIICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9CVVNfU0laRSAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX0JVU19TSVpFXzMyICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX0JVU19TSVpFXzY0ICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0VNQkVEREVEX0xPQ0FMTUVNICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBNSVNDX0NUUkxfRU1CRURERURfTE9DQUxNRU1fT04gICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRU1CRURERURfTE9DQUxNRU1fT0ZGICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEdQSU9fTVVYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwOAorI2RlZmluZSBHUElPX01VWF8zMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgR1BJT19NVVhfMzFfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMzFfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIEdQSU9fTVVYXzMwX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzMwX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBHUElPX01VWF8yOV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yOV9TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgR1BJT19NVVhfMjhfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjhfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEdQSU9fTVVYXzI3X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI3X1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBHUElPX01VWF8yNl9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yNl9TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgR1BJT19NVVhfMjVfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjVfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIEdQSU9fTVVYXzI0X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI0X1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzIzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBHUElPX01VWF8yM19HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yM19TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgR1BJT19NVVhfMjJfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjJfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIEdQSU9fTVVYXzIxX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzIxX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzIwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX01VWF8yMF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yMF9TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgR1BJT19NVVhfMTlfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTlfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIEdQSU9fTVVYXzE4X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE4X1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBHUElPX01VWF8xN19HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xN19QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgR1BJT19NVVhfMTZfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTZfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIEdQSU9fTVVYXzE1X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE1X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBHUElPX01VWF8xNF9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xNF9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTMKKyNkZWZpbmUgR1BJT19NVVhfMTNfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTNfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIEdQSU9fTVVYXzEyX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzEyX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBHUElPX01VWF8xMV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xMV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgR1BJT19NVVhfMTBfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTBfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBHUElPX01VWF85X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF85X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF84ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIEdQSU9fTVVYXzhfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzhfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgR1BJT19NVVhfN19HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfN19URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBHUElPX01VWF82X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF82X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIEdQSU9fTVVYXzVfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzVfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgR1BJT19NVVhfNF9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfNF9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBHUElPX01VWF8zX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8zX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEdQSU9fTVVYXzJfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzJfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgR1BJT19NVVhfMV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBHUElPX01VWF8wX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8wX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwQworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9ST1RBVEUgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUk9UQVRFX09GRiAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUk9UQVRFX09OICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fVkdBICAgICAgICAgICAgICAgICAgICAgIDI2OjI0CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9PRkYgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV8xICAgICAgICAgICAxCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV8yICAgICAgICAgICAyCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV8zICAgICAgICAgICAzCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV80ICAgICAgICAgICA0CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV81ICAgICAgICAgICA1CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV82ICAgICAgICAgICA2CisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OX1ZHQV9QUklPUklUWV83ICAgICAgICAgICA3CisjZGVmaW5lIExPQ0FMT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05fUEFORUxfUFJJT1JJVFlfNiAgICAgICAgIDYKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUEFORUxfUFJJT1JJVFlfNyAgICAgICAgIDcKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fQ1JUICAgICAgICAgICAgICAgICAgICAgIDI6MAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfT0ZGICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfMSAgICAgICAgICAgMQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfMiAgICAgICAgICAgMgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfMyAgICAgICAgICAgMworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNCAgICAgICAgICAgNAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNSAgICAgICAgICAgNQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNiAgICAgICAgICAgNgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNyAgICAgICAgICAgNworCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxMAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fUk9UQVRFICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PRkYgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PTiAgICAgICAgICAgICAgICAgIDEKKyNkZW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5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzEgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzIgICAgICAgICAyCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzMgICAgICAgICAzCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzQgICAgICAgICA0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzUgICAgICAgICA1CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzYgICAgICAgICA2CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9aVlBPUlQwX1BSSU9SSVRZXzcgICAgICAgICA3CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFTyAgICAgICAgICAgICAgICAgICAgICAxMDo4CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19PRkYgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8xICAgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8yICAgICAgICAgICAyCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8zICAgICAgICAgICAzCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV80ICAgICAgICAgICA0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV81ICAgICAgICAgICA1CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV82ICAgICAgICAgICA2CisjZ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9SSVRZXzMgICAgICAgICAgICAgMworI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fQ1JUX1BSSU9SSVRZXzQgICAgICAgICAgICAgNAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fQ1JUX1BSSU9SSVRZXzUgICAgICAgICAgICAgNQorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fQ1JUX1BSSU9SSVRZXzYgICAgICAgICAgICAgNgorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fQ1JUX1BSSU9SSVRZXzcgICAgICAgICAgICAgNworCisjZGVmaW5lIFJBV19JTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyMAorI2RlZmluZSBSQVdfSU5UX1pWUE9SVDFfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19DTEVBUiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0NMRUFSICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9DUlRfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1BBTkVMX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfVkdBX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJTlRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMxX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMxX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMF9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjlfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjlfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI4X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI4X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yN19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yN19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjZfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjZfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI1X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI1X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBJTlRfU1RBVFVTX0kyQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0kyQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgSU5UX1NUQVRVU19QV01fSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19QV01fQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUEwX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUEwX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19QQ0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBJTlRfU1RBVFVTX1BDSV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX1BDSV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgSU5UX1NUQVRVU19TU1AwX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19TU1AwX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBJTlRfU1RBVFVTX0RFX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0RFX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1pWUE9SVDFfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMV9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMV9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSU5UX1NUQVRVU19aVlBPUlQwX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19aVlBPUlQwX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19DUlRfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJTlRfU1RBVFVTX0NSVF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0NSVF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1BBTkVMX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIElOVF9TVEFUVVNfUEFORUxfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfUEFORUxfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfVkdBX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSU5UX1NUQVRVU19WR0FfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19WR0FfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJTlRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjgKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBJTlRfTUFTS19HUElPMzBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMzBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMjkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI5X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI5X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBJTlRfTUFTS19HUElPMjdfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMjdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI2X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI2X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBJTlRfTUFTS19JMkNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19JMkNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgSU5UX01BU0tfUFdNX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfUFdNX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfRE1BMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIElOVF9NQVNLX0RNQTFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0RNQTFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgSU5UX01BU0tfRE1BX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfRE1BX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfUENJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBJTlRfTUFTS19QQ0lfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19QQ0lfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIElOVF9NQVNLX1NTUDFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1NTUDFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgSU5UX01BU0tfU1NQMF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfU1NQMF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBJTlRfTUFTS19ERV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19ERV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19aVlBPUlQxX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDFfVlNZTkNfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDFfVlNZTkNfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDBfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSU5UX01BU0tfWlZQT1JUMF9WU1lOQ19ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfWlZQT1JUMF9WU1lOQ19FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfQ1JUX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJTlRfTUFTS19DUlRfVlNZTkNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19DUlRfVlNZTkNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19QQU5FTF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIElOVF9NQVNLX1BBTkVMX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1BBTkVMX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1ZHQV9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSU5UX01BU0tfVkdBX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfVkdBX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBDVVJSRU5UX0dBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfODRNSFogICAgICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLXzU2TUhaICAgICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS180Mk1IWiAgICAgICAgICAgICAgICAgICAgICAgMworI2Vsc2UKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLX0RJVl8zICAgICAgICAgICAgICAgICAgICAgICAwCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS19ESVZfNCAgICAgICAgICAgICAgICAgICAgICAgMQorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfRElWXzYgICAgICAgICAgICAgICAgICAgICAgIDIKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLX0RJVl84ICAgICAgICAgICAgICAgICAgICAgICAzCisjZW5kaWYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMSyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLXzMzNk1IWiAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS18xNjhNSFogICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfMTEyTUhaICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgMworI2Vsc2UKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfRElWXzEgICAgICAgICAgICAgICAgICAgICAwCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLX0RJVl8yICAgICAgICAgICAgICAgICAgICAgMQorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS19ESVZfMyAgICAgICAgICAgICAgICAgICAgIDIKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfRElWXzQgICAgICAgICAgICAgICAgICAgICAzCisjZW5kaWYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIENVUlJFTlRfR0FURV9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9WR0FfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1BXTV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1BXTV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBDVVJSRU5UX0dBVEVfSTJDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfSTJDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfU1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIENVUlJFTlRfR0FURV9TU1BfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9TU1BfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0dQSU9fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0dQSU9fT04gICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBDVVJSRU5UX0dBVEVfWlZQT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfWlZQT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfQ1NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIENVUlJFTlRfR0FURV9DU0NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9DU0NfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RFX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RFX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RJU1BMQVkgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBDVVJSRU5UX0dBVEVfRElTUExBWV9PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfRElTUExBWV9PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfTE9DQUxNRU0gICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIENVUlJFTlRfR0FURV9MT0NBTE1FTV9PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9MT0NBTE1FTV9PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RNQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBNT0RFMF9HQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDQKKyNkZWZpbmUgTU9ERTBfR0FURV9NQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS181Nk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS180Mk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1PREUwX0dBVEVfTTJYQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18zMzZNSFogICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18xNjhNSFogICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBNT0RFMF9HQVRFX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgTU9ERTBfR0FURV9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9WR0FfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBNT0RFMF9HQVRFX1BXTV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX1BXTV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIE1PREUwX0dBVEVfSTJDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfSTJDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfU1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgTU9ERTBfR0FURV9TU1BfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9TU1BfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBNT0RFMF9HQVRFX0dQSU9fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0dQSU9fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIE1PREUwX0dBVEVfWlZQT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfWlZQT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfQ1NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgTU9ERTBfR0FURV9DU0NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9DU0NfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBNT0RFMF9HQVRFX0RFX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0RFX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0RJU1BMQVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIE1PREUwX0dBVEVfRElTUExBWV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfRElTUExBWV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfTE9DQUxNRU0gICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgTU9ERTBfR0FURV9MT0NBTE1FTV9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9MT0NBTE1FTV9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBNT0RFMF9HQVRFX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0RNQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIE1PREUxX0dBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0OAorI2RlZmluZSBNT0RFMV9HQVRFX01DTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzExMk1IWiAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzU2TUhaICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzQyTUhaICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgTU9ERTFfR0FURV9NMlhDTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzMzNk1IWiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzE2OE1IWiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzExMk1IWiAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1PREUxX0dBVEVfVkdBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBNT0RFMV9HQVRFX1ZHQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX1ZHQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIE1PREUxX0dBVEVfUFdNX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfUFdNX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgTU9ERTFfR0FURV9JMkNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9JMkNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9TU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBNT0RFMV9HQVRFX1NTUF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX1NTUF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIE1PREUxX0dBVEVfR1BJT19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfR1BJT19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgTU9ERTFfR0FURV9aVlBPUlRfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9aVlBPUlRfT04gICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9DU0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBNT0RFMV9HQVRFX0NTQ19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0NTQ19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIE1PREUxX0dBVEVfREVfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfREVfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfRElTUExBWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgTU9ERTFfR0FURV9ESVNQTEFZX09GRiAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9ESVNQTEFZX09OICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9MT0NBTE1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBNT0RFMV9HQVRFX0xPQ0FMTUVNX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0xPQ0FMTUVNX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIE1PREUxX0dBVEVfRE1BX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfRE1BX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDRDCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfMzM2Q0xLICAgICAgICAgICAgICAgICAgICA0OjQKKyAgICAjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF8zMzZDTEtfT0ZGICAgICAgICAgICAgICAgIDAKKyAgICAjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF8zMzZDTEtfT04gICAgICAgICAgICAgICAgIDEKKyNlbmRpZgorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfT1NDX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9PU0NfSU5QVVRfT0ZGICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9PU0NfSU5QVVRfT04gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9BQ1BJICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX0FDUElfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX0FDUElfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX01PREUgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUCAgICAgICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIFBDSV9NQVNURVJfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA1MAorI2RlZmluZSBQQ0lfTUFTVEVSX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgREVWSUNFX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDU0CisjZGVmaW5lIERFVklDRV9JRF9ERVZJQ0VfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERVZJQ0VfSURfUkVWSVNJT05fSUQgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgUExMX0NMS19DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDU4CisjZGVmaW5lIFBMTF9DTEtfQ09VTlRfQ09VTlRFUiAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgUEFORUxfUExMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDVDCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAxCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2Vsc2UKKyAgICAjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisgICAgI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2VuZGlmCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMTo4CisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBDUlRfUExMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNjAKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIENSVF9QTExfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9QTExfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9QTExfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBDUlRfUExMX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfUExMX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfUExMX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAgIDEKKyNpZmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAjZGVmaW5lIENSVF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZWxzZQorICAgICNkZWZpbmUgQ1JUX1BMTF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyAgICAjZGVmaW5lIENSVF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZW5kaWYKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjgKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZHQV9QTEwwX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA2NAorI2RlZmluZSBWR0FfUExMMF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBWR0FfUExMMF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAgMQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNlbHNlCisgICAgI2RlZmluZSBWR0FfUExMMF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorICAgICNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNlbmRpZgorI2RlZmluZSBWR0FfUExMMF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBWR0FfUExMMF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDY4CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfQllQQVNTICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0JZUEFTU19PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0JZUEFTU19PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWR0FfUExMMV9DVFJMX1BPV0VSICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9QT1dFUl9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9QT1dFUl9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfSU5QVVRfT1NDICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfSU5QVVRfVEVTVENMSyAgICAgICAgICAgICAgICAgICAxCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBWR0FfUExMMV9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2Vsc2UKKyAgICAjZGVmaW5lIFZHQV9QTEwxX0NUUkxfUE9EICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisgICAgI2RlZmluZSBWR0FfUExMMV9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2VuZGlmCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMTo4CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBTQ1JBVENIX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNmMKKworI2lmbmRlZiBWQUxJREFUSU9OX0NISVAKKworI2RlZmluZSBNWENMS19QTExfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNzAKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfQllQQVNTICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0JZUEFTU19PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0JZUEFTU19PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX1BPV0VSICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBNWENMS19QTExfQ1RSTF9QT1dFUl9PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9QT1dFUl9PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNWENMS19QTExfQ1RSTF9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfSU5QVVRfT1NDICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfSU5QVVRfVEVTVENMSyAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfUE9EICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNWENMS19QTExfQ1RSTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDg4CisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX1VTRVJfREVGSU5FICAgICAgICAgICAgICAgICA1OjQKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT05fUExMICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9QTExfVkdBICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9QTExfUEFORUwgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9NT0RFICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX01PREVfVEVYVCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX01PREVfR1JBUEhJQyAgICAgICAgICAgICAgICAxCisKKyNlbmRpZgorCisjZGVmaW5lIEdQSU9fREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDAwCisjZGVmaW5lIEdQSU9fREFUQV8zMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIEdQSU9fREFUQV8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIEdQSU9fREFUQV8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIEdQSU9fREFUQV8yOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEdQSU9fREFUQV8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEdQSU9fREFUQV8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIEdQSU9fREFUQV8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIEdQSU9fREFUQV8yNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIEdQSU9fREFUQV8yMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIEdQSU9fREFUQV8yMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fREFUQV8yMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIEdQSU9fREFUQV8yMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjIwCisjZGVmaW5lIEdQSU9fREFUQV8xOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fREFUQV8xOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIEdQSU9fREFUQV8xNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIEdQSU9fREFUQV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIEdQSU9fREFUQV8xNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIEdQSU9fREFUQV8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIEdQSU9fREFUQV8xMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIEdQSU9fREFUQV8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIEdQSU9fREFUQV8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIEdQSU9fREFUQV8xMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIEdQSU9fREFUQV85ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBHUElPX0RBVEFfOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgR1BJT19EQVRBXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIEdQSU9fREFUQV82ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBHUElPX0RBVEFfNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgR1BJT19EQVRBXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEdQSU9fREFUQV8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBHUElPX0RBVEFfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgR1BJT19EQVRBXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEdQSU9fREFUQV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDA0CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzEgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzFfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zMV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMwICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMwX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzBfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI5X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjggICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjhfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI3ICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI3X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjdfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNl9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI2X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjUgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjVfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI0ICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI0X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjRfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMyAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yM19JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIzX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjIgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjJfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMl9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIxICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIxX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjFfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMCAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MjAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIwX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTkgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTlfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xOV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE4ICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE4X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMThfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNyAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xN19JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE3X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTYgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTZfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNl9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE1ICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE1X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTVfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE0X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTMgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTNfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xM19PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEyICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEyX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTJfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzExX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTBfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzkgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl85X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzlfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzhfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fOF9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl83ICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fN19JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl83X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzYgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl82X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzZfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNSAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzVfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNV9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl80ICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNF9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl80X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzNfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzJfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMl9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMV9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xX09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8wX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzBfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwMDgKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMSAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMV9FREdFICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzMxX0xFVkVMICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMzAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMzBfRURHRSAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMF9MRVZFTCAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzI5ICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9UUklHR0VSXzI5X0VER0UgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX1RSSUdHRVJfMjlfTEVWRUwgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8yOCAgICA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fSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMxX1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzBfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMF9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMwX1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjkgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjlfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI5X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjggICAgICAgICAgICAgICAgICAgICAgICAxOToxOQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjhfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOF9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI4X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjcgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjdfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yN19BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI3X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjYgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjZfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNl9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI2X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjUgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjVfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI1X1JFU0VUICAgICAgICAgICAgICAgICAgMQorCisKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9SRVNFUlZFRF8xX01BU0sgICAgICAgICAgICAzMTozMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0RJU0FCTEUgICAgMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0VOQUJMRSAgICAgMworI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgMjk6MjgKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9QQU5FTCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9WR0EgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9DUlQgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0ZQRU4gICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GUEVOX0xPVyAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GUEVOX0hJR0ggICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9WQklBU0VOICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfVkJJQVNFTl9MT1cgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfVkJJQVNFTl9ISUdIICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0RBVEFfRElTQUJMRSAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0RBVEFf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QVlfQ1RSTF9HQU1NQSAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0dBTU1BX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX0dBTU1BX0VOQUJMRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1BMQU5FICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUExBTkVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfRk9STUFUICAgICAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAgICAyCisKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDA0CisjZGVmaW5lIFBBTkVMX1BBTl9DVFJMX1ZFUlRJQ0FMX1BBTiAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBQQU5FTF9QQU5fQ1RSTF9WRVJUSUNBTF9WU1lOQyAgICAgICAgICAgICAgICAgMjE6MTYKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkxfSE9SSVpPTlRBTF9QQU4gICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkxfSE9SSVpPTlRBTF9WU1lOQyAgICAgICAgICAgICAgIDU6MAorCisjZGVmaW5lIFBBTkVMX0NPTE9SX0tFWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAwOAorI2RlZmluZSBQQU5FTF9DT0xPUl9LRVlfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgUEFORUxfQ09MT1JfS0VZX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMEMKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFBBTkVMX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAxMAorI2RlZmluZSBQQU5FTF9GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgUEFORUxfRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBQQU5FTF9XSU5ET1dfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMTQKKyNkZWZpbmUgUEFORUxfV0lORE9XX1dJRFRIX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFBBTkVMX1dJTkRPV19XSURUSF9YICAgICAgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgUEFORUxfV0lORE9XX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDE4CisjZGVmaW5lIFBBTkVMX1dJTkRPV19IRUlHSFRfSEVJR0hUICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBQQU5FTF9XSU5ET1dfSEVJR0hUX1kgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFBBTkVMX1BMQU5FX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAxQworI2RlZmluZSBQQU5FTF9QTEFORV9UTF9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgUEFORUxfUExBTkVfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBQQU5FTF9QTEFORV9CUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMjAKKyNkZWZpbmUgUEFORUxfUExBTkVfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX1BMQU5FX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDI0CisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAyOAorI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1NZTkNfV0lEVEggICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9TWU5DX1NUQVJUICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMkMKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDMwCisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1NZTkNfSEVJR0hUICAgICAgICAgICAgICAgICAgICAyMToxNgorI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9TWU5DX1NUQVJUICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX0NVUlJFTlRfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAzNAorI2RlZmluZSBQQU5FTF9DVVJSRU5UX0xJTkVfTElORSAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisvKiBWaWRlbyBDb250cm9sICovCisKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0xJTkVfQlVGRkVSICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0xJTkVfQlVGRkVSX0RJU0FCTEUgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfTElORV9CVUZGRVJfRU5BQkxFICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE2CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPXzEgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPXzExICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JVRkZFUiAgICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JVRkZFUl8wICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfQlVGRkVSXzEgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9DQVBUVVJFICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9DQVBUVVJFX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0NBUFRVUkVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRE9VQkxFX0JVRkZFUiAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBWSURFT19ESVNQTEFZX0NUU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VNQTEFZX0NUUkxfSE9SSVpPTlRBTF9NT0RFICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0hPUklaT05UQUxfTU9ERV9SRVBMSUNBVEUgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfSE9SSVpPTlRBTF9NT0RFX0lOVEVSUE9MQVRFICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9QSVhFTCAgICAgICAgICAgICAgICAgICAgICAgIDc6NAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfR0FNTUEgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0dBTU1BX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfR0FNTUFfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9QTEFORSAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9QTEFORV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZPUk1BVF8xNiAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRk9STUFUXzMyICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVRfWVVWICAgICAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNDQKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFZJREVPX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA0OAorI2RlZmluZSBWSURFT19GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgVklERU9fRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBWSURFT19GQl8wX0xBU1RfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNEMKKyNkZWZpbmUgVklERU9fRkJfMF9MQVNUX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fUExBTkVfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDUwCisjZGVmaW5lIFZJREVPX1BMQU5FX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBWSURFT19QTEFORV9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFZJREVPX1BMQU5FX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA1NAorI2RlZmluZSBWSURFT19QTEFORV9CUl9CT1RUT00gICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgVklERU9fUExBTkVfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBWSURFT19TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNTgKKyNkZWZpbmUgVklERU9fU0NBTEVfVkVSVElDQUxfTU9ERSAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX01PREVfRVhQQU5EICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX01PREVfU0hSSU5LICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX1NDQUxFICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBWSURFT19TQ0FMRV9IT1JJWk9OVEFMX01PREUgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9NT0RFX0VYUEFORCAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9NT0RFX1NIUklOSyAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9TQ0FMRSAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBWSURFT19JTklUSUFMX1NDQUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNUMKKyNkZWZpbmUgVklERU9fSU5JVElBTF9TQ0FMRV9GQl8xICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFZJREVPX0lOSVRJQUxfU0NBTEVfRkJfMCAgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDYwCisjZGVmaW5lIFZJREVPX1lVVl9DT05TVEFOVFNfWSAgICAgICAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBWSURFT19ZVVZfQ09OU1RBTlRTX1IgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UU19HICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UU19CICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA2NAorI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fRkJfMV9MQVNUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDY4CisjZGVmaW5lIFZJREVPX0ZCXzFfTEFTVF9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgMjU6MAorCisvKiBWaWRlbyBBbHBoYSBDb250cm9sICovCisKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwODAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVCAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9QRVJfUElYRUwgICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfU0VMRUNUX0FMUEhBICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9BTFBIQSAgICAgICAgICAgICAgICAgIDI3OjI0CisjZGVmaW5lIFZJREVPX0FMUEhB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FfRElTUExBWV9DVFJMX0ZPUk1BVF9BTFBIQV80XzRfNF80ICAgMworCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA4NAorI2RlZmluZSBWSURFT19BTFBIQV9GQl9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDg4CisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX1dJRFRIX1dJRFRIICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBWSURFT19BTFBIQV9GQl9XSURUSF9PRkZTRVQgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0xBU1RfQUREUkVTUyAgICAgICAgICAgICAgICAgICAweDA4MDA4QworI2RlZmluZSBWSURFT19BTFBIQV9GQl9MQVNUX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9UTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwOTAKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfVExfVE9QICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX1RMX0xFRlQgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfQlIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDk0CisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX0JSX0JPVFRPTSAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9CUl9SSUdIVCAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA5OAorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9WRVJUSUNBTF9NT0RFICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfTU9ERV9FWFBBTkQgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfTU9ERV9TSFJJTksgICAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfU0NBTEUgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFX0hPUklaT05UQUxfTU9ERSAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX01PREVfRVhQQU5EICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX01PREVfU0hSSU5LICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX1NDQUxFICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0lOSVRJQUxfU0NBTEUgICAgICAgICAgICAgICAgICAgICAweDA4MDA5QworI2RlZmluZSBWSURFT19BTFBIQV9JTklUSUFMX1NDQUxFX1ZFUlRJQ0FMICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfSU5JVElBTF9TQ0FMRV9IT1JJWk9OVEFMICAgICAgICAgIDExOjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwQTAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ0hST01BX0tFWV9NQVNLICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NIUk9NQV9LRVlfVkFMVUUgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxICAgICAgICAgICAgICAgICAgIDB4MDgwMEE0CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8xICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMCAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMF9SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yMyAgICAgICAgICAgICAgICAgICAweDA4MDBBOAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfMyAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18zX0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfM19CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzIgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzJfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDUgICAgICAgICAgICAgICAgICAgMHgwODAwQUMKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzUgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV81X1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV80ICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV80X1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3ICAgICAgICAgICAgICAgICAgIDB4MDgwMEIwCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N183ICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfN19SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N183X0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfNiAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfNl9SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OSAgICAgICAgICAgICAgICAgICAweDA4MDBCNAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOSAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV85X0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOV9CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzggICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzhfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84X0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84X0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUIgICAgICAgICAgICAgICAgICAgMHgwODAwQjgKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0IgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9CX1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0JfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9BICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9BX1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEICAgICAgICAgICAgICAgICAgIDB4MDgwMEJDCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9DRF9EICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfRF9SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0RfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9DRF9EX0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfQyAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfQ19SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRiAgICAgICAgICAgICAgICAgICAweDA4MDBDMAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRiAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0ZfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9GX0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRl9CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0UgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0VfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0JMVUUgICAgICAgICAgICA0OjAKKworLyogUGFuZWwgQ3Vyc29yIENvbnRyb2wgKi8KKworI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjAKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1NfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VOQUJMRV9ESVNBQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VOQUJMRV9FTkFCTEUgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDBGNAorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fVE9QICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1RPUF9JTlNJREUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1RPUF9PVVRTSURFICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTl9MRUZUICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fTEVGVF9JTlNJREUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fTEVGVF9PVVRTSURFICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDBGOAorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMTJfMl9SR0I1NjUgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzEyXzFfUkdCNTY1ICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRkMKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzNfUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworLyogT2xkIERlZmluaXRpb25zICsrKyAqLworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjgKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxXzFfUkVEICAgICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8xX0dSRUVOICAgICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDFfMV9CTFVFICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxXzBfUkVEICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8wX0dSRUVOICAgICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8wX0JMVUUgICAgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRkMKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzJfUkVEICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8yX0dSRUVOICAgICAgICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8yX0JMVUUgICAgICAgICAgICAgICAgICAgICAgICA0OjAKKy8qIE9sZCBEZWZpbml0aW9ucyAtLS0gKi8KKworLyogQWxwaGEgQ29udHJvbCAqLworCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEwMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9QRVJfUElYRUwgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9BTFBIQSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0FMUEhBICAgICAgICAgICAgICAgICAgICAgIDI3OjI0CisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgICAgICAxNzoxNgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18xICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18zICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18xMSAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUElYRUwgICAgICAgICAgICAgICAgICAgICAgNzo0CisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0NIUk9NQV9LRVlfRElTQUJMRSAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0NIUk9NQV9LRVlfRU5BQkxFICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUExBTkVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUICAgICAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfQUxQSEFfNF80ICAgICAgICAgICAyCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfQUxQSEFfNF80XzRfNCAgICAgICAzCisKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTA0CisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBBTFBIQV9GQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMDgKKyNkZWZpbmUgQUxQSEFfRkJfV0lEVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjE2CisjZGVmaW5lIEFMUEhBX0ZCX1dJRFRIX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAxMzowCisKKyNkZWZpbmUgQUxQSEFfUExBTkVfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTBDCisjZGVmaW5lIEFMUEhBX1BMQU5FX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBBTFBIQV9QTEFORV9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIEFMUEhBX1BMQU5FX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDExMAorI2RlZmluZSBBTFBIQV9QTEFORV9CUl9CT1RUT00gICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgQUxQSEFfUExBTkVfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBBTFBIQV9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMTQKKyNkZWZpbmUgQUxQSEFfQ0hST01BX0tFWV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NIUk9NQV9LRVlfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTE4CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8xICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMCAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMF9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yMyAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDExQworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfMyAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18zX0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfM19CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzIgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzJfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzUgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV81X1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV80ICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV80X1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3ICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTI0CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N183ICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfN19SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N183X0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfNiAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfNl9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OSAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEyOAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOSAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV85X0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOV9CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzggICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzhfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84X0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84X0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMkMKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0IgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9CX1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0JfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9BICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9BX1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTMwCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9EICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfRF9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0RfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9EX0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfQyAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfQ19SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRiAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEzNAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfRUZfRiAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0ZfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9GX0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfRUZfRl9CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0UgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0VfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworLyogQ1JUIEdyYXBoaWNzIENvbnRyb2wgKi8KKworI2RlZmluZSBDUlRfRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9SRVNFUlZFRF8xX01BU0sgIAkJCSAgMzE6MjcKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9SRVNFUlZFRF8xX01BU0tfRElTQUJMRSAgCQkJICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0VOQUJMRSAJCQkgIDB4MUYKKworLyogU003NTBMRSBkZWZpbml0aW9uICovCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfRFBNUyAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMiAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMyAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0NMSyAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjcKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9D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FZX0NUUkxfR0FNTUFfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUExBTkUgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9QTEFORV9ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9QTEFORV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF84ICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF8xNiAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF8zMiAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX1JFU0VSVkVEX0JJVFNfTUFTSyAgICAgICAgICAgMHhGRjAwMDIwMAorCisjZGVmaW5lIENSVF9GQl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIwNAorI2RlZmluZSBDUlRfRkJfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1JUX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjA4CisjZGVmaW5lIENSVF9GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBDUlRfRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1RPVEFMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIwQworI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9UT1RBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfVE9UQUxfRElTUExBWV9FTkQgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMTAKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfU1lOQ19XSURUSCAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1NZTkNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX1RPVEFMICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjE0CisjZGVmaW5lIENSVF9WRVJUSUNBTF9UT1RBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBDUlRfVkVSVElDQUxfVE9UQUxfRElTUExBWV9FTkQgICAgICAgICAgICAgICAgMTA6MAorC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VF9TSUdOQVRVUkVfQU5BTFlaRVJfU09VUkNFX0JMVUUgICAgICAgICAgICAyCisKKyNkZWZpbmUgQ1JUX0NVUlJFTlRfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjIwCisjZGVmaW5lIENSVF9DVVJSRU5UX0xJTkVfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjI0CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfVkFMVUVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfVkFMVUVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX0VOQUJMRV9ESVNBQkxFICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX0VOQUJMRV9FTkFCTEUgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX1JFRCAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9HUkVFTiAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9CTFVFICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBDUlRfU0NBTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMjgKKyNkZWZpbmUgQ1JUX1NDQUxFX1ZFUlRJQ0FMX01PREUgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9NT0RFX0VYUEFORCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9NT0RFX1NIUklOSyAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBDUlRfU0NBTEVfSE9SSVpPTlRBTF9NT0RFICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfTU9ERV9FWFBBTkQgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfTU9ERV9TSFJJTksgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfU0NBTEUgICAgICAgICAgICAgICAgICAgIDExOjAKKworLyogQ1JUIEN1cnNvciBDb250cm9sICovCisKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjMwCisjZGVmaW5lIENSVF9IV0NfQUREUkVTU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRU5BQkxFX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRU5BQkxFX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzQKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fVE9QX0lOU0lERSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fVE9QX09VVFNJREUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OX0xFRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9MRUZUX0lOU0lERSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9MRUZUX09VVFNJREUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBDUlRfSFdDX0NPTE9SXzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzgKKyNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8xMl8yX1JHQjU2NSAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENSVF9IV0NfQ09MT1JfMTJfMV9SR0I1NjUgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjNDCisjZGVmaW5lIENSVF9IV0NfQ09MT1JfM19SR0I1NjUgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKy8qIE9sZCBEZWZpbml0aW9ucyArKysuIE5lZWQgdG8gYmUgcmVtb3ZlZCBpZiBubyBhcHBsaWNhdGlvbiB1c2UgaXQuICovCisjaWYgMAorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzgKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDFfMV9SRUQgICAgICAgICAgICAgICAgICAgIDMxOjI3CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzFfR1JFRU4gICAgICAgICAgICAgICAgICAyNjoyMQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMV8xX0JMVUUgICAgICAgICAgICAgICAgICAgMjA6MTYKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDFfMF9SRUQgICAgICAgICAgICAgICAgICAgIDE1OjExCisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzBfR1JFRU4gICAgICAgICAgICAgICAgICAxMDo1CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzBfQkxVRSAgICAgICAgICAgICAgICAgICA0OjAKKworICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8yICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyM0MKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMl9SRUQgICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzJfR1JFRU4gICAgICAgICAgICAgICAgICAgICAxMDo1CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzJfQkxVRSAgICAgICAgICAgICAgICAgICAgICA0OjAKKyNlbmRpZgorLyogT2xkIERlZmluaXRpb25zIC0tLSAqLworCisvKiBUaGlzIHZlcnR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1RMICAgICAgICAgICAgICAgICAgICAgMHgwODAyODAKKyAgICAjZGVmaW5lIENSVF9BVVRPX0NFTlRFUklOR19UTF9UT1AgICAgICAgICAgICAgICAgIDI2OjE2CisgICAgI2RlZmluZSBDUlRfQVVUT19DRU5URVJJTkdfVExfTEVGVCAgICAgICAgICAgICAgICAxMDowCisKKyAgICAjZGVmaW5lIENSVF9BVVRPX0NFTlRFUklOR19CUiAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjg0CisgICAgI2RlZmluZSBDUlRfQVVUT19DRU5URVJJTkdfQlJfQk9UVE9NICAgICAgICAgICAgICAyNjoxNgorICAgICNkZWZpbmUgQ1JUX0FVVE9fQ0VOVEVSSU5HX0JSX1JJR0hUICAgICAgICAgICAgICAgMTA6MAorI2VuZGlmCisKKy8qIHNtNzUwbGUgbmV3IHJlZ2lzdGVyIHRvIGNvbnRyb2wgcGFuZWwgb3V0cHV0ICovCisjZGVmaW5lIERJU1BMQVlfQ09OVFJPTF83NTBMRSAJMHg4MDI4OAorLyogUGFsZXR0ZSBSQU0gKi8KKworLyogUGFuZWwgUGFsbGV0ZSByZWdpc3RlciBzdGFydHMgYXQgMHgwODA0MDAgfiAweDA4MDdGQyAqLworI2RlZmluZSBQQU5FTF9QQUxFVFRFX1JBTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODA0MDAKKworLyogUGFuZWwgUGFsbGV0ZSByZWdpc3RlciBzdGFydHMgYXQgMHgwODBDMDAgfiAweDA4MEZGQyAqLworI2RlZmluZSBDUlRfUEFMRVRURV9SQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODBDMDAKKworLyogMkQgcmVnaXN0ZXJzCisgKiBtb3ZlIHRoZWlyIGRlZmluYXRpb24gaW50byBnZW5lcmFsIGx5bnhfYWNjZWwuaCBmaWxlCisgKiBiZWNhdXNlIGFsbCBzbWkgZ3JhcGhpYyBjaGlwIHNoYXJlIHRoZSBzYW1lIGRyYXdpbmcgZW5naW5lCisgKiByZWdpc3RlciBmb3JtYXQgKi8KKyNpZiAwCisjZGVmaW5lIERFX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU09VUkNFX1dSQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisvKgorICogVGhlIGZvbGxvd2luZyBkZWZpbml0aW9ucyBhcmUgdXNlZCBpbiBkaWZmZXJlbnQgc2V0dGluZworICovCisKKy8qIFVzZSB0aGVzZSBkZWZpbml0aW9ucyBpbiBYWSBhZGRyZXNzaW5nIG1vZGUgb3IgbGluZWFyIGFkZHJlc3NpbmcgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgREVfU09VUkNFX1lfSzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisvKiBVc2UgdGhpcyBkZWZpbml0aW9uIGluIGhvc3Qgd3JpdGUgbW9kZSBmb3IgbW9uby4gVGhlIFlfSzIgaXMgbm90IHVzZWQKKyAgIGluIGhvc3Qgd3JpdGUgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzFfTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKworLyogVXNlIHRoZXNlIGRlZmluaXRpb25zIGluIEJyZXNlbmhhbSBsaW5lIGRyYXdpbmcgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzFfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgREVfU09VUkNFX1lfSzJfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDA0CisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfREVTVElOQVRJT05fV1JBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2lmIDEKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorI2Vsc2UKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2VuZGlmCisKKyNkZWZpbmUgREVfRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMDgKKyNkZWZpbmUgREVfRElNRU5TSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfRElNRU5TSU9OX1lfRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDBDCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk5fTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTl9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWCAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWF9ESVNBQkxFICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YX0VOQUJMRSAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlRfRElTQUJMRSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVF9FTkFCTEUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTl9MRUZUX1RPX1JJR0hUICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OX1JJR0hUX1RPX0xFRlQgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX01BSk9SX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YX1BPU0lUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1hfTkVHQVRJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWV9QT1NJVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZX05FR0FUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0hfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUwgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUxfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTF9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0JJVEJMVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUkVDVEFOR0xFX0ZJTEwgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9ERV9USUxFICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1RSQVBFWk9JRF9GSUxMICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfQUxQSEFfQkxFTkQgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9STEVfU1RSSVAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1NIT1JUX1NUUk9LRSAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfTElORV9EUkFXICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1dSSVRFICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfUkVBRCAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9XUklURV9CT1RUT01fVVAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfRk9OVCAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfVEVYVFVSRV9MT0FEICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1RfUk9QMyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVF9ST1AyICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRV9CSVRNQVAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFX1BBVFRFUk4gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBX05PVF9QQUNLRUQgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfOF9QQUNLRUQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV8xNl9QQUNLRUQgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzMyX1BBQ0tFRCAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEVfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIX09QQVFVRSAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0hfVFJBTlNQQVJFTlQgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1QgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUX1NPVVJDRSAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1RfREVTVElOQVRJT04gICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9ESVNBQkxFICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX0VOQUJMRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKy8qIFBzZXVkbyBmaWVsZHMuICovCisKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSICAgICAgICAgICAgICAgICAgICAgMjc6MjQKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzIyNSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMTM1ICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8zMTUgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzQ1ICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMjcwICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl85MCAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzE4MCAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMCAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMjcwICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl85MCAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzE4MCAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgREVfUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMTAKKyNkZWZpbmUgREVfUElUQ0hfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfUElUQ0hfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MAorCisjZGVmaW5lIERFX0ZPUkVHUk9VTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDE0CisjZGVmaW5lIERFX0ZPUkVHUk9VTkRfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9CQUNLR1JPVU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAxOAorI2RlZmluZSBERV9CQUNLR1JPVU5EX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMUMKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWSAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWV9OT1JNQUwgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZX09WRVJXUklURSAgICAgICAgICAxCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWSAgICAgICAgICAgICAgICAgICAgIDI5OjI3CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWCAgICAgICAgICAgICAgICAgICAgIDI1OjIzCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVCAgICAgICAgICAgICAgICAgIDIxOjIwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF84ICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzE2ICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkcgICAgICAgICAgICAgICAgICAgIDE5OjE2CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfWFkgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfQUREUkVTU0lOR19MSU5FQVIgICAgICAgICAgICAgMTUKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfU09VUkNFX0hFSUdIVCAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDIwCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkVfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAyNAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0tfTUFTS1MgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfTUFTS1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMjgKKyNkZWZpbmUgREVfTUFTS1NfQllURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfTUFTS1NfQklUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NMSVBfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDJDCisjZGVmaW5lIERFX0NMSVBfVExfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ0xJUF9UTF9TVEFUVVNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfT1VUU0lERSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfSU5ISUJJVF9JTlNJREUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NMSVBfQlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDMwCisjZGVmaW5lIERFX0NMSVBfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAzNAorI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMzgKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0hfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX1dJTkRPV19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDNDCisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0MAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRSAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0NAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFQgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9DU18xICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0OAorI2RlZmluZSBERV9BTFBIQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBERV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0QworI2RlZmluZSBERV9XUkFQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9XUkFQX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNTAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERFX1NUQVRVU19DU0NfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRVU18yRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBERV9TVEFUVVNfMkRfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU18yRF9OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTXzJEX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2VuZGlmCisvKiBDb2xvciBTcGFjZSBDb252ZXJzaW9uIHJlZ2lzdGVycy4gKi8KKworI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBDOAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9FWFQgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9DU18xICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBDU0NfQ09OU1RBTlRTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBDQworI2RlZmluZSBDU0NfQ09OU1RBTlRTX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBDU0NfQ09OU1RBTlRTX1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoxNgorI2RlZmluZSBDU0NfQ09OU1RBTlRTX0cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIENTQ19DT05TVEFOVFNfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEQwCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YX0lOVEVHRVIgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YX0ZSQUNUSU9OICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjMKKworI2RlZmluZSBDU0NfWV9TT1VSQ0VfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBENAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWV9JTlRFR0VSICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWV9GUkFDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAxNTozCisKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRDgKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwREMKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRTAKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT05fWSAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEU0CisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0hfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0hfVVYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBFOAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fV1JBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDU0NfREVTVElOQVRJT05fV1JBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9XUkFQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT04gICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEVDCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT05fWCAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT05fWSAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBGMAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0hfWCAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0hfWSAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRjQKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUl9IT1JJWk9OVEFMICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUl9WRVJUSUNBTCAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEY4CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIENTQ19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEZDCisjZGVmaW5lIENTQ19DT05UUk9MX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIENTQ19DT05UUk9MX1NUQVRVU19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU1RBVFVTX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUICAgICAgICAgICAgICAgICAgICAgICAzMDoyOAorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1lVVjQyMiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfWVVWNDIwSSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU09VUkNFX0ZPUk1BVF9ZVVY0MjAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1lWVTkgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfSVlVMSAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU09VUkNFX0ZPUk1BVF9JWVUyICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1JHQjU2NSAgICAgICAgICAgICAgICA2CisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfUkdCODg4OCAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQ1NDX0NPTlRST0xfREVTVElOQVRJT05fRk9STUFUICAgICAgICAgICAgICAgICAgMjc6MjYKKyNkZWZpbmUgQ1NDX0NPTlRST0xfREVTVElOQVRJT05fRk9STUFUX1JHQjU2NSAgICAgICAgICAgMAorI2RlZmluZSBDU0NfQ09OVFJPTF9ERVNUSU5BVElPTl9GT1JNQVRfUkdCODg4OCAgICAgICAgICAxCisjZGVmaW5lIENTQ19DT05UUk9MX0hPUklaT05UQUxfRklMVEVSICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIENTQ19DT05UUk9MX0hPUklaT05UQUxfRklMVEVSX0RJU0FCTEUgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0NPTlRST0xfSE9SSVpPTlRBTF9GSUxURVJfRU5BQkxFICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfQ09OVFJPTF9WRVJUSUNBTF9GSUxURVIgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBDU0NfQ09OVFJPTF9WRVJUSUNBTF9GSUxURVJfRElTQUJMRSAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19DT05UUk9MX1ZFUlRJQ0FMX0ZJTFRFUl9FTkFCTEUgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0xfQllURV9PUkRFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgQ1NDX0NPTlRST0xfQllURV9PUkRFUl9ZVVlWICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfQ09OVFJPTF9CWVRFX09SREVSX1VZVlkgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgREVfREFUQV9QT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMTAwMDAKKworI2RlZmluZSBJMkNfQllURV9DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MAorI2RlZmluZSBJMkNfQllURV9DT1VOVF9DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjAKKworI2RlZmluZSBJMkNfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MQorI2RlZmluZSBJMkNfQ1RSTF9JTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgSTJDX0NUUkxfSU5UX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9JTlRfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19DVFJMX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBJMkNfQ1RSTF9ESVJfV1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19DVFJMX0RJUl9SRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX0NUUkxfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEkyQ19DVFJMX0NUUkxfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX0NUUkxfQ1RSTF9TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfQ1RSTF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgSTJDX0NUUkxfTU9ERV9TVEFOREFSRCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9NT0RFX0ZBU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19DVFJMX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBJMkNfQ1RSTF9FTl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19DVFJMX0VOX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJMkNfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MgorI2RlZmluZSBJMkNfU1RBVFVTX1RYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSTJDX1NUQVRVU19UWF9QUk9HUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfU1RBVFVTX1RYX0NPTVBMRVRFRCAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19UWF9ET05FICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgKKyNkZWZpbmUgSTJDX1NUQVRVU19FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEkyQ19TVEFUVVNfRVJSX05PUk1BTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX1NUQVRVU19FUlJfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfU1RBVFVTX0VSUl9DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfQUNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBJMkNfU1RBVFVTX0FDS19SRUNFSVZFRCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfQUNLX05PVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX1NUQVRVU19CU1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIEkyQ19TVEFUVVNfQlNZX0lETEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX1NUQVRVU19CU1lfQlVTWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEkyQ19SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDQyCisjZGVmaW5lIEkyQ19SRVNFVF9CVVNfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJMkNfUkVTRVRfQlVTX0VSUk9SX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgSTJDX1NMQVZFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDMKKyNkZWZpbmUgSTJDX1NMQVZFX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgNzoxCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTX1JXICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBJMkNfU0xBVkVfQUREUkVTU19SV19XICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTX1JXX1IgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJMkNfREFUQTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NAorI2RlZmluZSBJMkNfREFUQTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NQorI2RlZmluZSBJMkNfREFUQTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NgorI2RlZmluZSBJMkNfREFUQTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NworI2RlZmluZSBJMkNfREFUQTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0OAorI2RlZmluZSBJMkNfREFUQTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0OQorI2RlZmluZSBJMkNfREFUQTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QQorI2RlZmluZSBJMkNfREFUQTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QgorI2RlZmluZSBJMkNfREFUQTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QworI2RlZmluZSBJMkNfREFUQTkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RAorI2RlZmluZSBJMkNfREFUQTEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RQorI2RlZmluZSBJMkNfREFUQTExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RgorI2RlZmluZSBJMkNfREFUQTEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MAorI2RlZmluZSBJMkNfREFUQTEzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MQorI2RlZmluZSBJMkNfREFUQTE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MgorI2RlZmluZSBJMkNfREFUQTE1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MworCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GSUVMRF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GSUVMRF9JTlBVVF9FVkVOX0ZJRUxEICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZJRUxEX0lOUFVUX09ERF9GSUVMRCAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfU0NBTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfU0NBTl9QUk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WU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WU0tfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1ZTS19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFNLICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFNLX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9IU0tfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZEX1JJU0lORyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRkRfRkFMTElORyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1ZQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFBfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9IUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ1BfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9VVlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9VVlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1VWU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9CU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DU18xNiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NTXzggICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0YgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NGX1lVViAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0ZfUkdCICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1dFQVZFICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9XRUFWRV9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1dFQVZFX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQk9CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JPQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQk9CX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfREJfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9EQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQ19DT05USU5VRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NDX0NPTkRJVElPTiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfUkdCICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1JHQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfUkdCX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF82NTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfNjU2X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF82NTZfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ0xJUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMDQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ0xJUF9ZQ0xJUF9FVkVOX0ZJRUxEICAgICAgICAgICAgICAgIDI1OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVBfWUNMSVAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVBfWENMSVAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6MAorCisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDA4CisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkVfSEVJR0hUICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAwQworI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19DUyAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjBfQUREUkVTU19DU18wICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMF9BRERSRVNTX0NTXzEgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSB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fQlVGX09GRlNFVF9ZQ0xJUF9PRERfRklFTEQgICAgICAyNToxNgorI2VuZGlmCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRl9PRkZTRVRfT0ZGU0VUICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAxOAorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGTyAgICAgICAgICAgICAgICAgICAgICAyOjAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18xICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzIgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT180ICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzUgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNiAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICA3CisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMUMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9ZICAgICAgICAgICAgICAgICAgICAgICAgMzE6MjQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9SICAgICAgICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9HICAgICAgICAgICAgICAgICAgICAgICAgMTU6OAorI2RlZmluZSBaVjBfQ0FQVFVSRV9ZUkdCX0NPTlNUX0IgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9MSU5FX0NPTVAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAyMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9MSU5FX0NPTVBfTEMgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKy8qIFpWMSAqLworCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRklFTERfSU5QVVQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRklFTERfSU5QVVRfRVZFTl9GSUVMRCAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GSUVMRF9JTlBVVF9PRERfRklFTEQgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1NDQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1NDQU5fUFJPR1JFU1NJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfU0NBTl9JTlRFUkxBQ0UgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DVVJSRU5UX0JVRkZFUiAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DVVJSRU5UX0JVRkZFUl8wICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NVUlJFTlRfQlVGRkVSXzEgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVkVSVElDQUxfU1lOQyAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVkVSVElDQUxfU1lOQ19JTkFDVElWRSAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9WRVJUSUNBTF9TWU5DX0FDVElWRSAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1BBTkVMICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1BBTkVMX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUEFORUxfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9BREogICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9BREpfTk9STUFMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0FESl9ERUxBWSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSEFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IQV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZTS19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVlNLX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IU0tfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0hTS19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRkRfUklTSU5HICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GRF9GQUxMSU5HICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVlBfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0hQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1BfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1VWUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1VWU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVVZTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0JTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NTXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1NfOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0ZfWVVWICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DRl9SR0IgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfV0VBVkUgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1dFQVZFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfV0VBVkVfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CT0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQk9CX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CT0JfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9EQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0RCX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NDX0NPTlRJTlVFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0NfQ09ORElUSU9OICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9SR0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUkdCX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9SR0JfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMXzY1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF82NTZfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMXzY1Nl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0FQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0FQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAwNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQX1lDTElQICAgICAgICAgICAgICAgICAgICAgICAgICAyNToxNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQX1hDTElQICAgICAgICAgICAgICAgICAgICAgICAgICA5OjAKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAwOAorI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMEMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfQ1MgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJFU1NfQ1NfMCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjBfQUREUkVTU19DU18xICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDEwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUZfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAxNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUZfT0ZGU0VUX09GRlNFVCAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMTgKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgMjowCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18yICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzMgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNCAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT181ICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzYgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNyAgICAgICAgICAgICAgICAgICAgNworCisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1QgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDFDCisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfWSAgICAgICAgICAgICAgICAgICAgICAgIDMxOjI0CisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfUiAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfRyAgICAgICAgICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgWlYxX0NBUFRVUkVfWVJHQl9DT05TVF9CICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgRE1BXzFfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTAKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTQKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfQ1MgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfQ1NfMCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19DU18xICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTgKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MX1NUQVRVU19JRExFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9TSVpFX0NPTlRST0xfU1RBVFVTX0FDVElWRSAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX1NJWkVfQ09OVFJPTF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBEMDAyMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzEgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9BQk9SVF8xX0VOQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzFfQUJPUlQgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfQUJPUlRfMCAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzBfRU5BQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfQUJPUlRfMF9BQk9SVCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMSAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfSU5UXzFfQ0xFQVIgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMV9GSU5JU0hFRCAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0lOVF8wICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMF9DTEVBUiAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0lOVF8wX0ZJTklTSEVEICAgICAgICAgICAgICAxCisKKworCisKKworLyogRGVmYXVsdCBpMmMgQ0xLIGFuZCBEYXRhIEdQSU8uIFRoZXNlIGFyZSB0aGUgZGVmYXVsdCBpMmMgcGlucyAqLworI2RlZmluZSBERUZBVUxUX0kyQ19TQ0wgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBERUZBVUxUX0kyQ19TREEgICAgICAgICAgICAgICAgICAgICAzMQorCisKKyNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwMTgKKyNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEdQSU9fREFUQV9TTTc1MExFXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRSAgICAgICAgICAgICAgICAgICAgIDB4MDIwMDFDCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRV8xICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OX1NNNzUwTEVfMV9JT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pCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSBJbnB1dCBkYXRhIGlzIHJpc2luZyBlZGdlIGxhdGNoZWQgKHJpc2luZyBlZGdlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXRjaGVkIGZpcnN0IGluIGR1YWwgZWRnZSBtb2RlKQorICogICAgICBidXNTZWxlY3QgICAgICAgICAgIC0gSW5wdXQgQnVzIFNlbGVjdDoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IElucHV0IGRhdGEgYnVzIGlzIDEyLWJpdHMgd2lkZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gSW5wdXQgZGF0YSBidXMgaXMgMjQtYml0cyB3aWRlCisgKiAgICAgIGR1YWxFZGdlQ2xrU2VsZWN0ICAgLSBEdWFsIEVkZ2UgQ2xvY2sgU2VsZWN0CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBJbnB1dCBkYXRhIGlzIHNpbmdsZSBlZGdlIGxhdGNoZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IElucHV0IGRhdGEgaXMgZHVhbCBlZGdlIGxhdGNoZWQKKyAqICAgICAgaHN5bmNFbmFibGUgICAgICAgICAtIEhvcml6b250YWwgU3luYyBFbmFibGU6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBIU1lOQyBpbnB1dCBpcyB0cmFuc21pdHRlZCBhcyBmaXhlZCBMT1cKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IEhTWU5DIGlucHV0IGlzIHRyYW5zbWl0dGVkIGFzIGlzCisgKiAgICAgIHZzeW5jRW5hYmxlICAgICAgICAgLSBWZXJ0aWNhbCBTeW5jIEVuYWJsZToKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IFZTWU5DIGlucHV0IGlzIHRyYW5zbWl0dGVkIGFzIGZpeGVkIExPVworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gVlNZTkMgaW5wdXQgaXMgdHJhbnNtaXR0ZWQgYXMgaXMKKyAqICAgICAgZGVza2V3RW5hYmxlICAgICAgICAtIERlLXNrZXdpbmcgRW5hYmxlOgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gRGUtc2tldyBkaXNhYmxlZAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gRGUtc2tldyBlbmFibGVkCisgKiAgICAgIGRlc2tld1NldHRpbmcgICAgICAgLSBEZS1za2V3aW5nIFNldHRpbmcgKGluY3JlbWVudCBvZiAyNjBwc2VjKQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gMSBzdGVwIC0tPiBtaW5pbXVtIHNldHVwIC8gbWF4aW11bSBob2xkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSAyIHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA9IDMgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzID0gNCBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgPSA1IHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSA9IDYgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2ID0gNyBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgPSA4IHN0ZXAgLS0+IG1heGltdW0gc2V0dXAgLyBtaW5pbXVtIGhvbGQKKyAqICAgICAgY29udGludW91c1N5bmNFbmFibGUtIFNZTkMgQ29udGludW91czoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IERpc2FibGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IEVuYWJsZQorICogICAgICBwbGxGaWx0ZXJFbmFibGUgICAgIC0gUExMIEZpbHRlciBFbmFibGUKKyAqICAgICAgICAgICAgICAg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WJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnID0gU0lJMTY0X0RFU0tFV19ESVNBQkxFOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgPSBTSUkxNjRfREVTS0VXX0VOQUJMRTsKKworICAgICAgICBzd2l0Y2ggKGRlc2tld1NldHRpbmcpCisgICAgICAgIHsKKyAgICAgICAgICAgIGNhc2UgMDoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV18xX1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfMl9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzNfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV180X1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfNV9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1OgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzZfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV183X1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDc6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfOF9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGkyY1dyaXRlUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0RFU0tFVywgY29uZmlnKTsKKworICAgICAgICAvKiBFbmFibGUvRGlzYWJsZSBDb250aW51b3VzIFN5bmMuICovCisgICAgICAgIGlmIChjb250aW51b3VzU3luY0VuYWJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnID0gU0lJMTY0X1BMTF9GSUxURVJfU1lOQ19DT05USU5VT1VTX0RJU0FCTEU7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9QTExfRklMVEVSX1NZTkNfQ09OVElOVU9VU19FTkFCTEU7CisKKyAgICAgICAgLyogRW5hYmxlL0Rpc2FibGUgUExMIEZpbHRlciAqLworICAgICAgICBpZiAocGxsRmlsdGVyRW5hYmxlID09IDApCisgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X1BMTF9GSUxURVJfRElTQUJMRTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9QTExfRklMVEVSX0VOQUJMRTsKKworICAgICAgICAvKiBTZXQgdGhlIFBMTCBGaWx0ZXIgdmFsdWUgKi8KKyAgICAgICAgY29uZmlnIHw9ICgocGxsRmlsdGVyVmFsdWUgJiAweDA3KSA8PCAxKTsKKworICAgICAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9QTEwsIGNvbmZpZyk7CisKKyAgICAgICAgLyogUmVjb3ZlciBmcm9tIFBvd2VyIERvd24gYW5kIGVuYWJsZSBvdXRwdXQuICovCisgICAgICAgIGNvbmZpZyA9IGkyY1JlYWRSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfQ09ORklHVVJBVElPTik7CisgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9OT1JNQUw7CisgICAgICAgIGkyY1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90IHBsdWcgZGV0ZWN0aW9uLgorICovCitzdGF0aWMgdm9pZCBzaWkxNjRTZWxlY3RIb3RQbHVnRGV0ZWN0aW9uTW9kZSgKKyAgICBzaWkxNjRfaG90X3BsdWdfbW9kZV90IGhvdFBsdWdNb2RlCispCit7CisgICAgdW5zaWduZWQgY2hhciBkZXRlY3RSZWc7CisKKyAgICBkZXRlY3RSZWcgPSBpMmNSZWFkUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0RFVEVDVCkgJiB+U0lJMTY0X0RFVEVDVF9NT05JVE9SX1NFTlNFX09VVFBVVF9GTEFHOworICAgIHN3aXRjaCAoaG90UGx1Z01vZGUpCisgICAgeworICAgICAgICBjYXNlIFNJSTE2NF9IT1RQTFVHX0RJU0FCTEU6CisgICAgICAgICAgICBkZXRlY3RSZWcgfD0gU0lJMTY0X0RFVEVDVF9NT05JVE9SX1NFTlNFX09VVFBVVF9ISUdIOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgU0lJMTY0X0hPVFBMVUdfVVNFX01ESToKKyAgICAgICAgICAgIGRldGVjdFJlZyAmPSB+U0lJMTY0X0RFVEVDVF9JTlRFUlJVUFRfTUFTSzsKKyAgICAgICAgICAgIGRldGVjdFJlZyB8PSBTSUkxNjRfREVURUNUX0lOVEVSUlVQVF9CWV9IVFBMR19QSU47CisgICAgICAgICAgICBkZXRlY3RSZWcgfD0gU0lJMTY0X0RFVEVDVF9NT05JVE9SX1NFTlNFX09VVFBVVF9NREk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBTSUkxNjRfSE9UUExVR19VU0VfUlNFTjoKKyAgICAgICAgICAgIGRldGVjdFJlZyB8PSBTSUkxNjRfREVURUNUX01PTklUT1JfU0VOU0VfT1VUUFVUX1JTRU47CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBTSUkxNjRfSE9UUExVR19VU0VfSFRQTEc6CisgICAgICAgICAgICBkZXRlY3RSZW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m9pZCk7CitjaGFyICpzaWkxNjRHZXRDaGlwU3RyaW5nKHZvaWQpOwordm9pZCBzaWkxNjRTZXRQb3dlcih1bnNpZ25lZCBjaGFyIHBvd2VyVXApOwordm9pZCBzaWkxNjRFbmFibGVIb3RQbHVnRGV0ZWN0aW9uKHVuc2lnbmVkIGNoYXIgZW5hYmxlSG90UGx1Zyk7Cit1bnNpZ25lZCBjaGFyIHNpaTE2NElzQ29ubmVjdGVkKHZvaWQpOwordW5zaWduZWQgY2hhciBzaWkxNjRDaGVja0ludGVycnVwdCh2b2lkKTsKK3ZvaWQgc2lpMTY0Q2xlYXJJbnRlcnJ1cHQodm9pZCk7CisjZW5kaWYKKy8qIGJlbG93IHJlZ2lzdGVyIGRlZmluaW5hdGlvbiBpcyB1c2VkIGZvciBTaWxpY29uIEltYWdlIFNpSTE2NCBEVkkgY29udHJvbGxlciBjaGlwICovCisvKgorICogVmVuZG9yIElEIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9WRU5ET1JfSURfTE9XICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfVkVORE9SX0lEX0hJR0ggICAgICAgICAgICAgICAgICAgICAgIDB4MDEKKworLyoKKyAqIERldmljZSBJRCByZWdpc3RlcnMKKyAqLworI2RlZmluZSBTSUkxNjRfREVWSUNFX0lEX0xPVyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgU0lJMTY0X0RFVklDRV9JRF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAweDAzCisKKy8qCisgKiBEZXZpY2UgUmV2aXNpb24KKyAqLworI2RlZmluZSBTSUkxNjRfREVWSUNFX1JFVklTSU9OICAgICAgICAgICAgICAgICAgICAgIDB4MDQKKworLyoKKyAqIEZyZXF1ZW5jeSBMaW1pdGF0aW9uIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9GUkVRVUVOQ1lfTElNSVRfTE9XICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBTSUkxNjRfRlJFUVVFTkNZX0xJTUlUX0hJR0ggICAgICAgICAgICAgICAgIDB4MDcKKworLyoKKyAqIFBvd2VyIERvd24gYW5kIElucHV0IFNpZ25hbCBDb25maWd1cmF0aW9uIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorCisvKiBQb3dlciBkb3duIChQRCkgKi8KKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fUE9XRVJfRE9XTiAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX1BPV0VSX05PUk1BTCAgICAgICAgICAgMHgwMQorI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9NQVNLICAgICAgICAgICAgIDB4MDEKKworLyogSW5wdXQgRWRnZSBMYXRjaCBTZWxlY3QgKEVER0UpICovCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX0xBVENIX0ZBTExJTkcgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9MQVRDSF9SSVNJTkcgICAgICAgICAgIDB4MDIKKworLyogQnVzIFNlbGVjdCAoQlNFTCkgKi8KKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fQlVTXzEyQklUUyAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX0JVU18yNEJJVFMgICAgICAgICAgICAgMHgwNAorCisvKiBEdWFsIEVkZ2UgQ2xvY2sgU2VsZWN0IChEU0VMKSAqLworI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9DTE9DS19TSU5HTEUgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fQ0xPQ0tfRFVBTCAgICAgICAgICAgICAweDA4CisKK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hbCBQdXJwb3NlIElucHV0IChDVExbMzoxXSkgKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV19HRU5FUkFMX1BVUlBPU0VfSU5QVVRfTUFTSyAgICAweDBFCisKKy8qIERlLXNrZXdpbmcgRW5hYmxlIGJpdCAoREtFTikgKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisvKiBEZS1za2V3aW5nIFNldHRpbmcgKERLWzM6MV0pKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV18xX1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfMl9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzNfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV180X1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweDYwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfNV9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzZfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4QTAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV183X1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfOF9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHhFMAorCisvKgorICogVXNlciBDb25maWd1cmF0aW9uIERhdGEgcmVnaXN0ZXJzIChDRkcgNzowKQorICovCisjZGVmaW5lIFNJSTE2NF9VU0VSX0NPTkZJR1VSQVRJT04gICAgICAgICAgICAgICAgICAgMHgwQgorCisvKgorICogUExMIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9QTEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwQworCisvKiBQTEwgRmlsdGVyIFZhbHVlIChQTExGKSAqLworI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9WQUxVRV9NQVNLICAgICAgICAgICAgICAgIDB4MEUKKworLyogUExMIEZpbHRlciBFbmFibGUgKFBGRU4pICovCisjZGVmaW5lIFNJSTE2NF9QTExfRklMVEVSX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9FTkFCTEUgICAgICAgICAgICAgICAgICAgIDB4MDEKKworLyogU3luYyBDb250aW51b3VzIChTQ05UKSAqLworI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9TWU5DX0NPTlRJTlVPVVNfRElTQUJMRSAgIDB4MDAKKyNkZWZpbmUgU0lJMTY0X1BMTF9GSUxURVJfU1lOQ19DT05USU5VT1VTX0VOQUJMRSAgICAweDgwCisKKyNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3N3aTJjLmMgYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfc3dpMmMuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45MDFiMzczCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3N3aTJjLmMKQEAgLTAsMCArMSw1MjIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqCisqICAgICAgICAgQ29weXJpZ2h0IChjKSAyMDA3IGJ5IFNpbGljb24gTW90aW9uLCBJbmMuIChTTUkpCisqCisqICBBbGwgcmlnaHRzIGFyZSByZXNlcnZlZC4gUmVwcm9kdWN0aW9uIG9yIGluIHBhcnQgaXMgcHJvaGliaXRlZAorKiAgd2l0aG91dCB0aGUgd3JpdHRlbiBjb25zZW50IG9mIHRoZSBjb3B5cmlnaHQgb3duZXIuCisqCisqICBzd2kyYy5jIC0tLSBTTTc1MC9TTTcxOCBEREsKKyogIFRoaXMgZmlsZSBjb250YWlucyB0aGUgc291cmNlIGNvZGUgZm9yIEkyQyB1c2luZyBzb2Z0d2FyZQorKiAgaW1wbGVtZW50YXRpb24uCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2luY2x1ZGUgImRkazc1MF9oZWxwLmgiCisjaW5jbHVkZSAiZGRrNzUwX3JlZy5oIgorI2luY2x1ZGUgImRkazc1MF9zd2kyYy5oIgorI2luY2x1ZGUgImRkazc1MF9wb3dlci5oIgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBJMkMgU29mdHdhcmUgTWFzdGVyIERyaXZlcjoKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogRWFjaCBpMmMgY3ljbGUgaXMgc3BsaXQgaW50byA0IHNlY3Rpb25zLiBFYWNoIG9mIHRoZXNlIHNlY3Rpb24gbWFya3MKKyAqIGEgcG9pbnQgaW4gdGltZSB3aGVyZSB0aGUgU0NMIG9yIFNEQSBtYXkgYmUgY2hhbmdlZC4KKyAqCisgKiAxIEN5Y2xlID09IHwgIFNlY3Rpb24gSS4gfCAgU2VjdGlvbiAyLiB8ICBTZWN0aW9uIDMuIHwgIFNlY3Rpb24gNC4gfAorICogICAgICAgICAgICArLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgfCBTQ0wgc2V0IExPVyB8U0NMIG5vIGNoYW5nZXwgU0NMIHNldCBISUdIfFNDTCBubyBjaGFuZ2V8CisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX19fX19fX19fX18gX19fX19fX19fX19fXworICogU0NMID09IFhYWFggX19fX19fX19fX19fXyBfX19fX19fX19fX18gLworICoKKyAqIEkuZS4gdGhlIFNDTCBtYXkgb25seSBiZSBjaGFuZ2VkIGluIHNlY3Rpb24gMS4gYW5kIHNlY3Rpb24gMy4gd2hpbGUKKyAqIHRoZSBTREEgbWF5IG9ubHkgYmUgY2hhbmdlZCBpbiBzZWN0aW9uIDIuIGFuZCBzZWN0aW9uIDQuIFRoZSB0YWJsZQorICogYmVsb3cgZ2l2ZXMgdGhlIGNoYW5nZXMgZm9yIHRoZXNlIDIgbGluZXMgaW4gdGhlIHZhcmlvcyBzZWN0aW9ucy4KKyAqCisgKiBTZWN0aW9uIGNoYW5nZXMgVGFibGU6CisgKiA9PT09PT09PT09PT09PT09PT09PT09CisgKiBibGFuayA9IG5vIGNoYW5nZSwgTCA9IHNldCBiaXQgTE9XLCBIID0gc2V0IGJpdCBISUdICisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMS58IDIufCAzLnwgNC58CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBTdGFydCAgIFNEQSB8ICAgfCBIIHwgICB8IEwgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBTdG9wICAgIFNEQSB8ICAgfCBMIHwgICB8IEggfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBiaXQgSCAgIFNEQSB8ICAgfCBIIHwgICB8ICAgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBiaXQgTCAgIFNEQSB8ICAgfCBMIHwgICB8ICAgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBHUElPIHBpbnMgdXNlZCBmb3IgdGhpcyBJMkMuIEl0IHJhbmdlcyBmcm9tIDAgdG8gNjMuICovCitzdGF0aWMgdW5zaWduZWQgY2hhciBnX2kyY0Nsb2NrR1BJTyA9IERFRkFVTFRfSTJDX1NDTDsKK3N0YXRpYyB1bnNpZ25lZCBjaGFyIGdfaTJjRGF0YUdQSU8gPSBERUZBVUxUX0kyQ19TREE7CisKKy8qCisgKiAgQmVsb3cgaXMgdGhlIHZhcmlhYmxlIGRlY2xhcmF0aW9uIGZvciB0aGUgR1BJTyBwaW4gcmVnaXN0ZXIgdXNhZ2UKKyAqICBmb3IgdGhlIGkyYyBDbG9jayBhbmQgaTJjIERhdGEuCisgKgorICogIE5vdGU6CisgKiAgICAgIE5vdGljZSB0aGF0IHRoZSBHUElPIHVzYWdlIGZvciB0aGUgaTJjIGNsb2NrIGFuZCBpMmMgRGF0YSBhcmUKKyAqICAgICAgc2VwYXJhdGVkLiBUaGlzIGlzIHRvIG1ha2UgdGhpcyBjb2RlIGZsZXhpYmxlIGVub3Vna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ICgxIDw8IGdfaTJjRGF0YUdQSU8pKSAhPSAofigxIDw8IGdfaTJjRGF0YUdQSU8pKSkKKyAgICB7CisgICAgICAgIHVsR1BJT0RpcmVjdGlvbiAmPSB+KDEgPDwgZ19pMmNEYXRhR1BJTyk7CisgICAgICAgIFBPS0UzMihnX2kyY0RhdGFHUElPRGF0YURpclJlZywgdWxHUElPRGlyZWN0aW9uKTsKKyAgICB9CisKKyAgICAvKiBOb3cgcmVhZCB0aGUgU0RBIGxpbmUgKi8KKyAgICB1bEdQSU9EYXRhID0gUEVFSzMyKGdfaTJjRGF0YUdQSU9EYXRhUmVnKTsKKyAgICBpZiAodWxHUElPRGF0YSAmICgxIDw8IGdfaTJjRGF0YUdQSU8pKQorICAgICAgICByZXR1cm4gMTsKKyAgICBlbHNlCisgICAgICAgIHJldHVybiAwOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gc2VuZHMgQUNLIHNpZ25hbAorICovCitzdGF0aWMgdm9pZCBzd0kyQ0Fjayh2b2lkKQoreworICAgIHJldHVybjsgIC8qIFNpbmdsZSBieXRlIHJlYWQgaXMgb2sgd2l0aG91dCBpdC4gKi8KK30KKworLyoKKyAqICBUaGlzIGZ1bmN0aW9uIHNlbmRzIHRoZSBzdGFydCBjb21tYW5kIHRvIHRoZSBzbGF2ZSBkZXZpY2UKKyAqLworc3RhdGljIHZvaWQgc3dJMkNTdGFydCh2b2lkKQoreworICAgIC8qIFN0YXJ0IEkyQyAqLworICAgIHN3STJDU0RBKDEpOworICAgIHN3STJDU0NMKDEpOworICAgIHN3STJDU0RBKDApOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gc2VuZHMgdGhlIHN0b3AgY29tbWFuZCB0byB0aGUgc2xhdmUgZGV2aWNlCisgKi8KK3N0YXRpYyB2b2lkIHN3STJDU3RvcCh2b2lkKQoreworICAgIC8qIFN0b3AgdGhlIEkyQyAqLworICAgIHN3STJDU0NMKDEpOworICAgIHN3STJDU0RBKDApOworICAgIHN3STJDU0RBKDEpOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gd3JpdGVzIG9uZSBieXRlIHRvIHRoZSBzbGF2ZSBkZXZpY2UKKyAqCisgKiAgUGFyYW1ldGVyczoKKyAqICAgICAgZGF0YSAgICAtIERhdGEgdG8gYmUgd3JpdGUgdG8gdGhlIHNsYXZlIGRldmljZQorICoKKyAqICBSZXR1cm4gVmFsdWU6CisgKiAgICAgICAwICAgLSBTdWNjZXNzCisgKiAgICAgIC0xICAgLSBGYWlsIHRvIHdyaXRlIGJ5dGUKKyAqLworc3RhdGljIGxvbmcgc3dJMkNXcml0ZUJ5dGUodW5zaWduZWQgY2hhciBkYXRhKQoreworICAgIHVuc2lnbmVkIGNoYXIgdmFsdWUgPSBkYXRhOworICAgIGludCBpOworCisgICAgLyogU2VuZGluZyB0aGUgZGF0YSBiaXQgYnkgYml0ICovCisgICAgZm9yIChpPTA7IGk8ODsgaSsrKQorICAgIHsKKyAgICAgICAgLyogU2V0IFNDTCB0byBsb3cgKi8KKyAgICAgICAgc3dJMkNTQ0woMCk7CisKKyAgICAgICAgLyogU2VuZCBkYXRhIGJpdCAqLworICAgICAgICBpZiAoKHZhbHVlICYgMHg4MCkgIT0gMCkKKyAgICAgICAgICAgIHN3STJDU0RBKDEpOworICAgICAgICBlbHNlCisgICAgICAgICAgICBzd0kyQ1NEQSgwKTsKKworICAgICAgICBzd0kyQ1dhaXQoKTsKKworICAgICAgICAvKiBUb2dnbGUgY2xrIGxpbmUgdG8gb25lICovCisgICAgICAgIHN3STJDU0NMKDEpOworICAgICAgICBzd0kyQ1dhaXQoKTsKKworICAgICAgICAvKiBTaGlmdCBieXRlIHRvIGJlIHNlbnQgKi8KKyAgICAgICAgdmFsdWUgPSB2YWx1ZSA8PCAxOworICAgIH0KKworICAgIC8qIFNldCB0aGUgU0NMIExvdyBhbmQgU0RBIEhpZ2ggKHByZXBhcmUgdG8gZ2V0IGlucHV0KSAqLworICAgIHN3STJDU0NMKDApOworICAgI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Ygb3BlcmF0aW9uICovCisgICAgICAgIGlmIChzeSA8IGR5KQorICAgICAgICB7CisgICAgICAgICAgICAvKiArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHxTICAgICAgICAgfAorICAgICAgICAgICAgICAgfCAgICstLS0tLS0tLS0tKworICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgKy0tLXwtLS0tLS0rICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICBEfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tKyAqLworCisgICAgICAgICAgICBuRGlyZWN0aW9uID0gQk9UVE9NX1RPX1RPUDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChzeSA+IGR5KQorICAgICAgICB7CisgICAgICAgICAgICAvKiArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHxEICAgICAgICAgfAorICAgICAgICAgICAgICAgfCAgICstLS0tLS0tLS0tKworICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgKy0tLXwtLS0tLS0rICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICBTfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tKyAqLworCisgICAgICAgICAgICBuRGlyZWN0aW9uID0gVE9QX1RPX0JPVFRPTTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICAgIC8qIHN5ID09IGR5ICovCisKKyAgICAgICAgICAgIGlmIChzeCA8PSBkeCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiArLS0tLS0tKy0tLSstLS0tLS0rCisgICAgICAgICAgICAgICAgICAgfFMgICAgIHwgICB8ICAgICBEfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgfCAgIHwgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0rLS0tKy0tLS0tLSsgKi8KKworICAgICAgICAgICAgICAgIG5EaXJlY3Rpb24gPSBSSUdIVF9UT19MRUZUOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIHN4ID4gZHggKi8KKworICAgICAgICAgICAgICAgIC8qICstLS0tLS0rLS0tKy0tLS0tLSsKKyAgICAgICAgICAgICAgICAgICB8RCAgICAgfCAgIHwgICAgIFN8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgfCAgIHwgICAgICB8CisgICAgICAgICAgICAgICAgICAgKy0tLS0tLSstLS0rLS0tLS0tKyAqLworCisgICAgICAgICAgICAgICAgbkRpcmVjdGlvbiA9IExFRlRfVE9fUklHSFQ7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICBpZiAoKG5EaXJlY3Rpb24gPT0gQk9UVE9NX1RPX1RPUCkgfHwgKG5EaXJlY3Rpb24gPT0gUklHSFRfVE9fTEVGVCkpCisgICAgeworICAgICAgICBzeCArPSB3aWR0aCAtIDE7CisgICAgICAgIHN5ICs9IGhlaWdodCAtIDE7CisgICAgICAgIGR4ICs9IHdpZHRoIC0gMTsKKyAgICAgICAgZHkgKz0gaGVpZ2h0IC0gMTsKKyAgICAgICAgb3BTaWduID0gKC0xKTsKKyAgICB9CisKKyAgICAvKiBOb3RlOgorICAgICAgIERFX0ZPUkVHUk9VTkQgYXJlIERFX0JBQ0tHUk9VTkQgYXJlIGRvbid0IGNhcmUuCisgICAgICAgREVfQ09MT1JfQ09NUEFSRSBhb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SQVAsIERJU0FCTEUpICAgICAgIHwKKyAgICAgICAgRklFTERfVkFMVUUoMCwgREVfU09VUkNFLCBYX0sxX01PTk8sIHN0YXJ0Qml0KSk7Ly9kcHIwMAorCisgICAgd3JpdGVfZHByKGFjY2VsLERFX0RFU1RJTkFUSU9OLAorICAgICAgICBGSUVMRF9TRVQgICgwLCBERV9ERVNUSU5BVElPTiwgV1JBUCwgRElTQUJMRSkgfAorICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ERVNUSU5BVElPTiwgWCwgICAgZHgpICAgIHwKKyAgICAgICAgRklFTERfVkFMVUUoMCwgREVfREVTVElOQVRJT04sIFksICAgIGR5KSk7Ly9kcHIwNAorCisgICAgd3JpdGVfZHByKGFjY2VsLERFX0RJTUVOU0lPTiwKKyAgICAgICAgRklFTERfVkFMVUUoMCwgREVfRElNRU5TSU9OLCBYLCAgICB3aWR0aCkgfAorICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ESU1FTlNJT04sIFlfRVQsIGhlaWdodCkpOy8vZHByMDgKKworICAgIHdyaXRlX2RwcihhY2NlbCxERV9GT1JFR1JPVU5ELCBmQ29sb3IpOworICAgIHdyaXRlX2RwcihhY2NlbCxERV9CQUNLR1JPVU5ELCBiQ29sb3IpOworCisJZGVfY3RybCA9IEZJRUxEX1ZBTFVFKDAsIERFX0NPTlRST0wsIFJPUCwgcm9wMikgICAgICAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBST1BfU0VMRUNULCBST1AyKSAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBDT01NQU5ELCBIT1NUX1dSSVRFKSB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBIT1NULCBNT05PKSAgICAgICAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBTVEFUVVMsIFNUQVJUKTsKKworCXdyaXRlX2RwcihhY2NlbCxERV9DT05UUk9MLCBkZV9jdHJsIHwgZGVHZXR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xFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TT1VSQ0VfWF9LMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBERV9TT1VSQ0VfWV9LMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIERFX1NPVVJDRV9YX0sxX01PTk8gCQkJCQkJCTIwOjE2CisKKyNkZWZpbmUgREVfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfREVTVElOQVRJT05fV1JBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9ERVNUSU5BVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lIERFX0RJTUVOU0lPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX0RJTUVOU0lPTl9ZX0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBERV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUQVRVU19TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTl9NT05PICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9QQVRURVJOX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YX0RJU0FCTEUgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVVBEQVRFX0RFU1RJTkFUSU9OX1hfRU5BQkxFICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVF9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1FVSUNLX1NUQVJUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OX0xFRlRfVE9fUklHSFQgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ESVJFQ1RJT05fUklHSFRfVE9fTEVGVCAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01BSk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBERV9DT05UUk9MX01BSk9SX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTUFKT1JfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1hfUE9TSVRJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWF9ORUdBVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZX1BPU0lUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1lfTkVHQVRJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0hfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RSRVRDSF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0hPU1RfTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTF9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9MQVNUX1BJWEVMX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfQklUQkxUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9SRUNUQU5HTEVfRklMTCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0RFX1RJTEUgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfVFJBUEVaT0lEX0ZJTEwgICAgICAgICAgICAgICAzCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9BTFBIQV9CTEVORCAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1JMRV9TVFJJUCAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfU0hPUlRfU1RST0tFICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9MSU5FX0RSQVcgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfV1JJVEUgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9SRUFEICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1dSSVRFX0JPVFRPTV9VUCAgICAgICAgIDEwCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9ST1RBVEUgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9GT05UICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9URVhUVVJFX0xPQUQgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVF9ST1AzICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1BfU0VMRUNUX1JPUDIgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFX0JJVE1BUCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9QMl9TT1VSQ0VfUEFUVEVSTiAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfTk9UX1BBQ0tFRCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV84X1BBQ0tFRCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzE2X1BBQ0tFRCAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfMzJfUEFDS0VEICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEUgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEVfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUkVQRUFUX1JPVEFURV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0ggICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0hfT1BBUVVFICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9NQVRDSF9UUkFOU1BBUkVOVCAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX1NFTEVDVCAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1RfU09VUkNFICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX1NFTEVDVF9ERVNUSU5BVElPTiAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1kgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX0RJU0FCTEUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfRU5BQkxFICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworLy8gUHNldWRvIGZpZWxkcy4KKworI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVIgICAgICAgICAgICAgICAgICAgICAyNzoyNAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMjI1ICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8xMzUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzMxNSAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfNDUgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8yNzAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzkwICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMTgwICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8wICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI0CisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl8yNzAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzkwICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMTgwICAgICAgICAgICAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBERV9QSVRDSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxMAorI2RlZmluZSBERV9QSVRDSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9QSVRDSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfRk9SRUdST1VORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTQKKyNkZWZpbmUgREVfRk9SRUdST1VORF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX0JBQ0tHUk9VTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDE4CisjZGVmaW5lIERFX0JBQ0tHUk9VTkRfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxQworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZX05PUk1BTCAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWFlfT1ZFUldSSVRFICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9ZICAgICAgICAgICAgICAgICAgICAgMjk6MjcKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YICAgICAgICAgICAgICAgICAgICAgMjU6MjMKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUICAgICAgICAgICAgICAgICAgMjE6MjAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzggICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF8zMiAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzI0ICAgICAgICAgICAgICAgMworCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkcgICAgICAgICAgICAgICAgICAgIDE5OjE2CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfWFkgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfQUREUkVTU0lOR19MSU5FQVIgICAgICAgICAgICAgMTUKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfU09VUkNFX0hFSUdIVCAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDIwCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkVfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyNAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0tfTUFTS1MgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfTUFTS1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjgKKyNkZWZpbmUgREVfTUFTS1NfQllURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfTUFTS1NfQklUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NMSVBfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDJDCisjZGVmaW5lIERFX0NMSVBfVExfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ0xJUF9UTF9TVEFUVVNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfT1VUU0lERSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfSU5ISUJJVF9JTlNJREUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NMSVBfQlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDMwCisjZGVmaW5lIERFX0NMSVBfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAzNAorI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzgKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0hfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX1dJTkRPV19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDNDCisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0MAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRSAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0NAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFQgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9DU18xICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0OAorI2RlZmluZSBERV9BTFBIQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBERV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0QworI2RlZmluZSBERV9XUkFQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9XUkFQX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNTAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERFX1NUQVRVU19DU0NfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVma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gICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgSFdDX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgMAorI2RlZmluZSBIV0NfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAxCisjZGVmaW5lIEhXQ19BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIEhXQ19BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFdDX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBIV0NfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIEhXQ19MT0NBVElPTl9UT1AgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEhXQ19MT0NBVElPTl9UT1BfSU5TSURFICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX1RPUF9PVVRTSURFICAgICAgICAgICAgMQorI2RlZmluZSBIV0NfTE9DQVRJT05fWSAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBIV0NfTE9DQVRJT05fTEVGVCAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBIV0NfTE9DQVRJT05fTEVGVF9JTlNJREUgICAgICAgICAgICAwCisjZGVmaW5lIEhXQ19MT0NBVElPTl9MRUZUX09VVFNJREUgICAgICAgICAgIDEKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIEhXQ19DT0xPUl8xMiAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSBIV0NfQ09MT1JfMTJfMl9SR0I1NjUgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBIV0NfQ09MT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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBfTFNCKGYpICAgICAgICAgICAgICgwID8gZikKKyNkZWZpbmUgX01TQihmKSAgICAgICAgICAgICAoMSA/IGYpCisjZGVmaW5lIF9DT1VOVChmKSAgICAgICAgICAgKF9NU0IoZikgLSBfTFNCKGYpICsgMSkKKworI2RlZmluZSBSQVdfTUFTSyhmKSAgICAgICAgICgweEZGRkZGRkZGID4+ICgzMiAtIF9DT1VOVChmKSkpCisjZGVmaW5lIEdFVF9NQVNLKGYpICAgICAgICAgKFJBV19NQVNLKGYpIDw8IF9MU0IoZikpCisjZGVmaW5lIEdFVF9GSUVMRChkLGYpICAgICAgKCgoZCkgPj4gX0xTQihmKSkgJiBSQVdfTUFTSyhmKSkKKyNkZWZpbmUgVEVTVF9GSUVMRChkLGYsdikgICAoR0VUX0ZJRUxEKGQsZikgPT0gZiAjIyBfICMjIHYpCisjZGVmaW5lIFNFVF9GSUVMRChkLGYsdikgICAgKCgoZCkgJiB+R0VUX01BU0soZikpIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGYgIyMgXyAjIyB2KSAmIFJBV19NQVNLKGYpKSA8PCBfTFNCKGYpKSkKKyNkZWZpbmUgU0VUX0ZJRUxEVihkLGYsdikgICAoKChkKSAmIH5HRVRfTUFTSyhmKSkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgodikgJiBSQVdfTUFTSyhmKSkgPDwgX0xTQihmKSkpCisKKworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyBJbnRlcm5hbCBtYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisKKyNkZWZpbmUgX0ZfU1RBUlQoZikgICAgICAgICAgICAgKDAgPyBmKQorI2RlZmluZSBfRl9FTkQoZikgICAgICAgICAgICAgICAoMSA/IGYpCisjZGVmaW5lIF9GX1NJWkUoZikgICAgICAgICAgICAgICgxICsgX0ZfRU5EKGYpIC0gX0ZfU1RBUlQoZikpCisjZGVmaW5lIF9GX01BU0soZikgICAgICAgICAgICAgICgoKDEgPDwgX0ZfU0laRShmKSkgLSAxKSA8PCBfRl9TVEFSVChmKSkKKyNkZWZpbmUgX0ZfTk9STUFMSVpFKHYsIGYpICAgICAgKCgodikgJiBfRl9NQVNLKGYpKSA+PiBfRl9TVEFSVChmKSkKKyNkZWZpbmUgX0ZfREVOT1JNQUxJWkUodiwgZikgICAgKCgodikgPDwgX0ZfU1RBUlQoZikpICYgX0ZfTUFTSyhmKSkKKworCisvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vIEdsb2JhbCBtYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKworI2RlZmluZSBGSUVMRF9HRVQoeCwgcmVnLCBmaWVsZCkgXAorKCBcCisgICAgX0ZfTk9STUFMSVpFKCh4KSwgcmVnICMjIF8gIyMgZmllbGQpIFwKKykKKworI2RlZmluZSBGSUVMRF9TRVQoeCwgcmVnLCBmaWVsZCwgdmFsdWUpIFwKKyggXAorICAgICh4ICYgfl9GX01BU0socmVnICMjIF8gIyMgZmllbGQpKSBcCisgICAgfCBfRl9ERU5PUk1BTElaRShyZWcgIyMgXyAjIyBmaWVsZCAjIyBfICMjIHZhbHVlLCByZWcgIyMgXyAjIyBmaWVsZCkgXAorKQorCisjZGVmaW5lIEZJRUxEX1ZBTFVFKHgsIHJlZywgZmllbGQsIHZhbHVlKSBcCisoIFwKKyAgICAoeCAmIH5fRl9NQVNLKHJlZyAjIyBfICMjIGZpZWxkKSkgXAorICAgIHwgX0ZfREVOT1JNQUxJWkUodmFsdWUsIHJlZyAjIyBfICMjIGZpZWxkKSBcCispCisKKyNkZWZpbmUgRklFTERfQ0xFQVIocmVnLCBmaWVsZCkgXAorKCBcCisgICAgfiBfRl9NQVNLKHJlZyAjIyBfICMjIGZpZWxkKSBcCispCisKKworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyBGaWVsZCBNYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisKKyNkZWZpbmUgRklFTERfU1RBUlQoZmllbGQpICAgICAgICAgICAgICAoMCA/IGZpZWxkKQorI2RlZmluZSBGSUVMRF9FTkQoZmllbGQpICAgICAgICAgICAgICAgICgxID8gZmllbGQpCisjZGVmaW5lIEZJRUxEX1NJWkUoZmllbGQpICAgICAgICAgICAgICAgKDEgKyBGSUVMRF9FTkQoZmllbGQpIC0gRklFTERfU1RBUlQoZmllbGQpKQorI2RlZmluZSBGSUVMRF9NQVNLKGZpZWxkKSAgICAgICAgICAgICAgICgoKDEgPDwgKEZJRUxEX1NJWkUoZmllbGQpLTEpKSB8ICgoMSA8PCAoRklFTERfU0laRShmaWVsZCktMSkpIC0gMSkpIDw8IEZJRUxEX1NUQVJUKGZpZWxkKSkKKyNkZWZpbmUgRklFTERfTk9STUFMSVpFKHJlZywgZmllbGQpICAgICAoKChyZWcpICYgRklFTERfTUFTSyhmaWVsZCkpID4+IEZJRUxEX1NUQVJUKGZpZWxkKSkKKyNkZWZpbmUgRklFTERfREVOT1JNQUxJWkUoZmllbGQsIHZhbHVlKSAoKCh2YWx1ZSkgPDwgRklFTERfU1RBUlQoZmllbGQpKSAmIEZJRUxEX01BU0soZmllbGQpKQorCisjZGVmaW5lIEZJRUxEX0lOSVQocmVnLCBmaWVsZCwgdmFsdWUpICAgRklFTERfREVOT1JNQUxJWkUocmVnICMjIF8gIyMgZmllbGQsIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWcgIyMgXyAjIyBmaWVsZCAjIyBfICMjIHZhbHVlKQorI2RlZmluZSBGSUVMRF9JTklUX1ZBTChyZWcsIGZpZWxkLCB2YWx1ZSkgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChGSUVMRF9ERU5PUk1BTElaRShyZWcgIyMgXyAjIyBmaWVsZCwgdmFsdWUpKQorI2RlZmluZSBGSUVMRF9WQUxfU0VUKHgsIHIsIGYsIHYpICAgICAgIHggPSB4ICYgfkZJRUxEX01BU0sociAjIyBfICMjIGYpIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IEZJRUxEX0RFTk9STUFMSVpFKHIgIyMgXyAjIyBmLCByICMjIF8gIyMgZiAjIyBfICMjIHYpCisKKyNkZWZpbmUgUkdCKHIsIGcsIGIpIFwKKyggXAorICAgICh1bnNpZ25lZCBsb25nKSAoKChyKSA8PCAxNikgfCAoKGcpIDw8IDgpIHwgKGIpKSBcCispCisKKyNkZWZpbmUgUkdCMTYociwgZywgYikgXAorKCBcCisgICAgKHVuc2lnbmVkIHNob3J0KSAoKCgocikgJiAweEY4KSA8PCA4KSB8ICgoKGcpICYgMHhGQykgPDwgMykgfCAoKChiKSAmIDB4RjgpID4+IDMpKSBcCispCisKK3N0YXRpYyBpbmxpbmUgdW5zaWduZWQgaW50IGFic0RpZmYodW5zaWduZWQgaW50IGEsdW5zaWduZWQgaW50IGIpCit7CisJaWYoYTxiKQorCQlyZXR1cm4gYi1hOworCWVsc2UKKwkJcmV0dXJuIGEtYjsKK30KKworLyogbiAvIGQgKyAxIC8gMiA9ICgybiArIGQpIC8gMmQgKi8KKyNkZWZpbmUgcm91bmRlZERpdihudW0sZGVub20pCSgoMiAqIChudW0pICsgKGRlbm9tKSkgLyAoMiAqIChkZW5vbSkpKQorI2RlZmluZSBNQih4KSAoKHgpPDwyMCkKKyNkZWZpbmUgS0IoeCkgKCh4KTw8MTApCisjZGVmaW5lIE1Ieih4KSAoKHgpICogMTAwMDAwMCkKKworCisKKworI2VuZGlmCmRpZmYgLS1naXQgY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ZSBjb250ZXh0IHRoYXQgd2FzIG9yaWdpbmFsbHkKLSAqICBwYXNzZWQgdG8gdmlzb3JfZWFzeXByb2NfSW5pdERldmljZSgpLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqLwotCi0jaW5jbHVkZSA8bGludXgvcHJvY19mcy5oPgotCi0jaW5jbHVkZSAidW5pa2xvZy5oIgotI2luY2x1ZGUgInRpbXNrbW9kLmgiCi0jaW5jbHVkZSAiZWFzeXByb2MuaCIKLQotI2RlZmluZSBNWURSVk5BTUUgImVhc3lwcm9jIgotCi0KLQotLyoKLSAqICAgL3Byb2MvPFByb2NJZD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQcm9jRGlyCi0gKiAgIC9wcm9jLzxQcm9jSWQ+L2RyaXZlciAgICAgICAgICAgICAgICAgICAgICAgUHJvY0RyaXZlckRpcgotICogICAvcHJvYy88UHJvY0lkPi9kcml2ZXIvZGlhZyAgICAgICAgICAgICAgICAgIFByb2NEcml2ZXJEaWFnRmlsZQotICogICAvcHJvYy88UHJvY0lkPi9kZXZpY2UgICAgICAgICAgICAgICAgICAgICAgIFByb2NEZXZpY2VEaXIKLSAqICAgL3Byb2MvPFByb2NJZD4vZGV2aWNlLzAgICAgICAgICAgICAgICAgICAgICBwcm9jRGV2aWNleERpcgotICogICAvcHJvYy88UHJvY0lkPi9kZXZpY2UvMC9kaWFnICAgICAgICAgICAgICAgIHByb2NEZXZpY2V4RGlhZ0ZpbGUKLSAqLwotCi0KLXN0YXRpYyBzc2l6ZV90IHByb2Nfd3JpdGVfZGV2aWNlKHN0cnVjdCBmaWxlICpmaWxlLCBjb25zdCBjaGFyIF9fdXNlciAqYnVmZmVyLAotCQkJCSBzaXplX3QgY291bnQsIGxvZmZfdCAqcHBvcyk7Ci1zdGF0aWMgc3NpemVfdCBwcm9jX3dyaXRlX2RyaXZlcihzdHJ1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UKDkpCiAjZGVmaW5lIFBPUlRTQ19QUCAgICAgICAgICAgICBCSVQoMTIpCiAjZGVmaW5lIFBPUlRTQ19QVEMgICAgICAgICAgICAoMHgwRlVMIDw8IDE2KQorI2RlZmluZSBQT1JUU0NfV0tDTiAgICAgICAgICAgQklUKDIwKQogI2RlZmluZSBQT1JUU0NfUEhDRChkKQkgICAgICAoKGQpID8gQklUKDIyKSA6IEJJVCgyMykpCiAvKiBQVFMgYW5kIFBUVyBmb3Igbm9uIGxwbSB2ZXJzaW9uIG9ubHkgKi8KICNkZWZpbmUgUE9SVFNDX1BGU0MgICAgICAgICAgIEJJVCgyNCkKZGlmZiAtLWdpdCBhL2RyaXZlcnMvdXNiL2NoaXBpZGVhL2NpLmggYi9kcml2ZXJzL3VzYi9jaGlwaWRlYS9jaS5oCmluZGV4IDY1OTEzZDQuLjZkNjIwMGUgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvdXNiL2NoaXBpZGVhL2NpLmgKKysrIGIvZHJpdmVycy91c2IvY2hpcGlkZWEvY2kuaApAQCAtMjksNiArMjksMTUgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFJFR0lTVEVSUwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogSWRlbnRpZmljYXRpb24gUmVnaXN0ZXJzICovCisjZGVmaW5lIElEX0lECQkJCTB4MAorI2RlZmluZSBJRF9IV0dFTkVSQUwJCQkweDQKKyNkZWZpbmUgSURfSFdIT1NUCQkJMHg4CisjZGVmaW5lIElEX0hXREVWSUNFCQkJMHhjCisjZGVmaW5lIElEX0hXVFhCVUYJCQkweDEwCisjZGVmaW5lIElEX0hXUlhCVUYJCQkweDE0CisjZGVmaW5lIElEX1NCVVNDRkcJCQkweDkwCisKIC8qIHJlZ2lzdG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aGlzIGhhcHBlbnMgd2hlbiB3ZSByZW5hbWUgYSBkaXJlY3RvcnkgdG8gdGhlIG9sZCBuYW1lICh0aGUgbmFtZQorICogaW4gdGhlIHBhcmVudCByb290KSBvZiBzb21lIG90aGVyIHVucmVsYXRlZCBkaXJlY3RvcnkgdGhhdCBnb3QgaXRzIHJlbmFtZQorICogZGVsYXllZCBkdWUgdG8gc29tZSBhbmNlc3RvciB3aXRoIGhpZ2hlciBudW1iZXIgdGhhdCBnb3QgcmVuYW1lZC4KKyAqCisgKiBFeGFtcGxlOgorICoKKyAqIFBhcmVudCBzbmFwc2hvdDoKKyAqIC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5vIDI1NikKKyAqIHwtLS0tIGEvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5vIDI1NykKKyAqIHwgICAgIHwtLS0tIGZpbGUgICAgICAgICAgICAgICAgICAgICAgICAoaW5vIDI2MCkKKyAqIHwKKyAqIHwtLS0tIGIvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5vIDI1OCkKKyAqIHwtLS0tIGMvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5vIDI1OSkKKyAqCisgKiBTZW5kIHNuYXBzaG90OgorICogLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbm8gMjU2KQorICogfC0tLS0gYS8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbm8gMjU4KQorICogfC0tLS0geC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbm8gMjU5KQorICogICAgICAgfC0tLS0geS8gICAgICAgICAgICAgICAgICAgICAgICAgIChpbm8gMjU3KQorICogICAgICAgICAgICAgfC0tLS0tIGZpbGUgICAgICAgICAgICAgICAgIChpbm8gMjYwKQorICoKKyAqIEhlcmUgd2UgY2FuIG5vdCByZW5hbWUgMjU4IGZyb20gJ2InIHRvICdhJyB3aXRob3V0IHRoZSByZ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MgTGljZW5zZSB2ZXJzaW9uIDIgYXMKKyAqIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLgorICovCisKKyNpZm5kZWYgX0RUX0JJTkRJTkdTX01GRF9BUklaT05BX0gKKyNkZWZpbmUgX0RUX0JJTkRJTkdTX01GRF9BUklaT05BX0gKKworLyogR1BJTyBGdW5jdGlvbiBEZWZpbml0aW9ucyAqLworI2RlZmluZSBBUklaT05BX0dQX0ZOX1RYTFJDTEsgICAgICAgICAgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9HUElPICAgICAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fSVJRMSAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBBUklaT05BX0dQX0ZOX0lSUTIgICAgICAgICAgICAgICAgICAgICAgIDB4MDMKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9PUENMSyAgICAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9PVVQgICAgICAgICAgICAgICAgICAgMHgwNQorI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDJfT1VUICAgICAgICAgICAgICAgICAgIDB4MDYKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9QV00xICAgICAgICAgICAgICAgICAgICAgICAweDA4CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fUFdNMiAgICAgICAgICAgICAgICAgICAgICAgMHgwOQorI2RlZmluZSBBUklaT05BX0dQX0ZOX1NZU0NMS19VTkRFUkNMT0NLRUQgICAgICAgIDB4MEEKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ0NMS19VTkRFUkNMT0NLRUQgICAgICAweDBCCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9MT0NLICAgICAgICAgICAgICAgICAgMHgwQworI2RlZmluZS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AgIDB4M0QKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9CT09UX0RPTkUgICAgICAgICAgICAgICAgICAweDQ0CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRFNQMV9SQU1fUkVBRFkgICAgICAgICAgICAgMHg0NQorI2RlZmluZSBBUklaT05BX0dQX0ZOX1NZU0NMS19FTkFfU1RBVFVTICAgICAgICAgIDB4NEIKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ0NMS19FTkFfU1RBVFVTICAgICAgICAweDRDCisKKy8qIEdQSU8gQ29uZmlndXJhdGlvbiBCaXRzICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX0xWTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGRyAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwCisKKy8qIFByb3ZpZGUgc29tZSBkZWZpbmVzIGZvciB0aGUgbW9zdCBjb21tb24gY29uZmlncyAqLworI2RlZmluZSBBUklaT05BX0dQX0RFRkFVTFQgICAgICAgICAgICAgMHhmZmZmZmZmZgorI2RlZmluZSBBUklaT05BX0dQX09VVFBVVCAgICAgICAgICAgICAgKEFSSVpPTkFfR1BfRk5fR1BJTykKKyNkZWZpbmUgQVJJWk9OQV9HUF9JTlBVVCAgICA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JWk9OQV9HUF9GTl9EU1BfSVJRMiAgICAgICAgICAgICAgICAgICAweDM2Ci0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fQVNZTkNfT1BDTEsgICAgICAgICAgICAgICAgMHgzRAotI2RlZmluZSBBUklaT05BX0dQX0ZOX0JPT1RfRE9ORSAgICAgICAgICAgICAgICAgIDB4NDQKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9EU1AxX1JBTV9SRUFEWSAgICAgICAgICAgICAweDQ1Ci0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fU1lTQ0xLX0VOQV9TVEFUVVMgICAgICAgICAgMHg0QgotI2RlZmluZSBBUklaT05BX0dQX0ZOX0FTWU5DQ0xLX0VOQV9TVEFUVVMgICAgICAgIDB4NEMKLQotI2RlZmluZSBBUklaT05BX0dQTl9ESVIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9ESVJfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9ESVJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxNSAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9ESVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTQgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUERfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX01BU0sgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTEgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9MVkwgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0MDAgIC8qIEdQTl9QT0wgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX01BU0sgICAgICAgICAgICAgICAgICAgICAweDA0MDAgIC8qIEdQTl9QT0wgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTAgIC8qIEdQTl9QT0wgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUE9MX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QT0wgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHICAgICAgICAgICAgICAgICAgICAgICAweDAyMDAgIC8qIEdQTl9PUF9DRkcgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX01BU0sgICAgICAgICAgICAgICAgICAweDAyMDAgIC8qIEdQTl9PUF9DRkcgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDkgIC8qIEdQTl9PUF9DRkcgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fT1BfQ0ZHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9PUF9DRkcgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fREIgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RCX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fREJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9GTl9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MDA3RiAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0ZOX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAwICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRk5fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDcgIC8qIEdQTl9EQiAqLwotCi0jZW5kaWYKZGlmZiAtLWdpdCBhL2luY2x1ZGUvbGludXgvbWZkL2FyaXpvbmEvcGRhdGEuaCBiL2luY2x1ZGUvbGludXgvbWZkL2FyaXpvbmEvcGRhdGEuaAppbmRleCA0NTc4YzcyLi4xNzg5Y2IwIDEwMDY0NAotLS0gYS9pbmNsdWRlL2xpbnV4L21mZC9hcml6b25hL3BkYXRhLmgKKysrIGIvaW5jbHVkZS9saW51eC9tZmQvYXJpem9uYS9wZGF0YS5oCkBAIC0xMSwzMSArMTEsMjYgQEAKICNpZm5kZWYgX0FSSVpPTkFfUERBVEFfSAogI2RlZmluZSBfQVJJWk9OQV9QREFUQV9ICiAKLSNkZWZpbmUgQVJJWk9OQV9HUE5fRElSICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMDAgIC8qIEdQTl9ESVIgKi8KKyNpbmNsdWRlIDxkdC1iaW5kaW5ncy9tZmQvYXJpem9uYS5oPgorCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9NQVNLICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBHUE5fRElSICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDE1ICAvKiBHUE5fRElSICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDQwMDAgIC8qIEdQTl9QVSAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxNCAgLyogR1BOX1BVICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUEQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QRF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMCAgLyogR1BOX1BEICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDEzICAvKiBHUE5fUEQgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUERfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMSAgLyogR1BOX0xWTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9MVkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0wgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMCAgLyogR1BOX1BPTCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkcgICAgICAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgOSAgLyogR1BOX09QX0NGRyAqLwogI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogR1BOX0RCICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RCX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBHUE5fREIgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fREJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEdQTl9EQiAqLwogI2RlZmluZSBBUklaT05BX0dQTl9EQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RCICovCkBAIC00NSwyMyArNDAsMTAgQEAKIAogI2RlZmluZSBBUklaT05BX01BWF9HUElPIDUKIAotI2RlZmluZSBBUklaT05BXzMyS1pfTUNMSzEgMQotI2RlZmluZSBBUklaT05BXzMyS1pfTUNMSzIgMgotI2RlZmluZSBBUklaT05BXzMyS1pfTk9ORSAgMwotCiAjZGVmaW5lIEFSSVpPTkFfTUFYX0lOUFVUIDQKIAotI2RlZmluZSBBUklaT05BX0RNSUNfTUlDVkREICAgMAotI2RlZmluZSBBUklaT05BX0RNSUNfTUlDQklBUzEgMQotI2RlZmluZSBBUklaT05BX0RNSUNfTUlDQklBUzIgMgotI2RlZmluZSBBUklaT05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SBwcm9jX3dhdGNoZG9nX3RocmVzaCwKIAkJLmV4dHJhMQkJPSAmemVybywKIAkJLmV4dHJhMgkJPSAmc2l4dHksCiAJfSwKIAl7CisJCS5wcm9jbmFtZSAgICAgICA9ICJubWlfd2F0Y2hkb2ciLAorCQkuZGF0YSAgICAgICAgICAgPSAmbm1pX3dhdGNoZG9nX2VuYWJsZWQsCisJCS5tYXhsZW4gICAgICAgICA9IHNpemVvZiAoaW50KSwKKwkJLm1vZGUgICAgICAgICAgID0gMDY0NCwKKwkJLnByb2NfaGFuZGxlciAgID0gcHJvY19ubWlfd2F0Y2hkb2csCisJCS5leHRyYTEJCT0gJnplcm8sCisjaWYgZGVmaW5lZChDT05GSUdfSEFWRV9OTUlfV0FUQ0hET0cpIHx8IGRlZmluZWQoQ09ORklHX0hBUkRMT0NLVVBfREVURUNUT1IpCisJCS5leHRyYTIJCT0gJm9uZSwKKyNlbHNlCisJCS5leHRyYTIJCT0gJnplcm8sCisjZW5kaWYKKwl9LAorCXsKKwkJLnByb2NuYW1lICAgICAgID0gInNvZnRfd2F0Y2hkb2ciLAorCQkuZGF0YSAgICAgICAgICAgPSAmc29mdF93YXRjaGRvZ19lbmFibGVkLAorCQkubWF4bGVuICAgICAgICAgPSBzaXplb2YgKGludCksCisJCS5tb2RlICAgICAgICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgICA9IHByb2Nfc29mdF93YXRjaGRvZywKKwkJLmV4dHJhMQkJPSAmemVybywKKwkJLmV4dHJhMgkJPSAmb25lLAorCX0sCisJewogCQkucHJvY25hbWUJPSAic29mdGxvY2t1cF9wYW5pYyIsCiAJCS5kYXRhCQk9ICZzb2Z0bG9ja3VwX3BhbmljLAogCQkubWF4bGVuCQk9IHNpemVvZihpbnQpLApAQCAtODc5LDE1ICs5MDIsNiBAQAogCQkuZXh0cmEyCQk9ICZvbmUsCiAJfSwKICNlbmRpZiAvKiBDT05GSUdfU01QICovCi0JewotCQkucHJvY25hbWUgICAgICAg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WMgdTY0IGJwZl9rdGltZV9nZXRfbnModTY0IHIxLCB1NjQgcjIsIHU2NCByMywgdTY0IHI0LCB1NjQgcjUpCit7CisJLyogTk1JIHNhZmUgYWNjZXNzIHRvIGNsb2NrIG1vbm90b25pYyAqLworCXJldHVybiBrdGltZV9nZXRfbW9ub19mYXN0X25zKCk7Cit9CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgYnBmX2Z1bmNfcHJvdG8gYnBmX2t0aW1lX2dldF9uc19wcm90byA9IHsKKwkuZnVuYwkJPSBicGZfa3RpbWVfZ2V0X25zLAorCS5ncGxfb25seQk9IHRydWUsCisJLnJldF90eXBlCT0gUkVUX0lOVEVHRVIsCit9OworCisvKgorICogbGltaXRlZCB0cmFjZV9wcmludGsoKQorICogb25seSAlZCAldSAleCAlbGQgJWx1ICVseCAlbGxkICVsbHUgJWxseCAlcCBjb252ZXJzaW9uIHNwZWNpZmllcnMgYWxsb3dlZAorICovCitzdGF0aWMgdTY0IGJwZl90cmFjZV9wcmludGsodTY0IHIxLCB1NjQgZm10X3NpemUsIHU2NCByMywgdTY0IHI0LCB1NjQgcjUpCit7CisJY2hhciAqZm10ID0gKGNoYXIgKikgKGxvbmcpIHIxOworCWludCBtb2RbM10gPSB7fTsKKwlpbnQgZm10X2NudCA9IDA7CisJaW50IGk7CisKKwkvKgorCSAqIGJwZl9jaGVjaygpLT5jaGVja19mdW5jX2FyZygpLT5jaGVja19zdGFja19ib3VuZGFyeSgpCisJICogZ3VhcmFudGVlcyB0aGF0IGZtdCBwb2ludHMgdG8gYnBmIHByb2dyYW0gc3RhY2ssCisJICogZm10X3NpemUgYnl0ZXMgb2YgaXQgd2VyZSBpbml0aWFsaXplZCBhbmQgZm10X3NpemUgPiAwCisJICovCisJaWYgKGZtdFstLWZtdF9zaXplXSAhPSAwKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCS8qIGNoZWNrIGZvcm1hdCBzdHJpbmcgZm9yIGFsbG93ZWQgc3BlY2lmaWVycy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GlyZWN0b3JpZXMuCisKK0Fzc3VtZSB3ZSBoYXZlIHRoZSBmb2xsb3dpbmcgcHJvamVjdCBzdHJ1Y3R1cmU6CisKKyAgZXgvYS5jCisgICAgL2IuYworICAgIC9jLmMKKyAgICAvZC5jCisgICAgL2FyY2gvZS5jCisgICAgL2FyY2gvZi5jCisKK091dCBvZiB3aGljaCB5b3UgYnVpbGQgdGhlICdleCcgYmluYXJ5ICcgYW5kIHRoZSAnbGliZXguYScgbGlicmFyeToKKworICAnZXgnICAgICAgLSBjb25zaXN0cyBvZiAnYS5vJywgJ2IubycgYW5kIGxpYmV4LmEKKyAgJ2xpYmV4LmEnIC0gY29uc2lzdHMgb2YgJ2MubycsICdkLm8nLCAnZS5vJyBhbmQgJ2YubycKKworVGhlIGJ1aWxkIGZyYW1ld29yayBkb2VzIG5vdCBjcmVhdGUgdGhlICdleCcgYW5kICdsaWJleC5hJyBiaW5hcmllcyBmb3IgeW91LCBpdAorb25seSBwcmVwYXJlcyBwcm9wZXIgb2JqZWN0cyB0byBiZSBjb21waWxlZCBhbmQgZ3JvdXBlZCB0b2dldGhlci4KKworVG8gZm9sbG93IHRoZSBhYm92ZSBleGFtcGxlLCB0aGUgdXNlciBwcm92aWRlcyBmb2xsb3dpbmcgJ0J1aWxkJyBmaWxlczoKKworICBleC9CdWlsZDoKKyAgICBleC15ICs9IGEubworICAgIGV4LXkgKz0gYi5vCisKKyAgICBsaWJleC15ICs9IGMubworICAgIGxpYmV4LXkgKz0gZC5vCisgICAgbGliZXgteSArPSBhcmNoLworCisgIGV4L2FyY2gvQnVpbGQ6CisgICAgbGliZXgteSArPSBlLm8KKyAgICBsaWJleC15ICs9IGYubworCithbmQgcnVuczoKKworICAkIG1ha2UgLWYgdG9vbHMvYnVpbGQvTWFrZWZpbGUuYnVpbGQgZGlyPS4gb2JqPWV4CisgICQgbWFrZSAtZiB0b29scy9idWlsZC9NYWtlZmlsZS5idWlsZCBkaXI9LiBvYmo9bGliZXgKKword2hpY2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ZWZpbml0aW9ucworYnVpbGQtZmlsZSA6PSAkKGRpcikvQnVpbGQKK2luY2x1ZGUgJChidWlsZC1maWxlKQorCitxdWlldF9jbWRfZmxleCAgPSBGTEVYICAgICAkQAorcXVpZXRfY21kX2Jpc29uID0gQklTT04gICAgJEAKKworIyBDcmVhdGUgZGlyZWN0b3J5IHVubGVzcyBpdCBleGlzdHMKK3F1aWV0X2NtZF9ta2RpciA9IE1LRElSICAgICQoZGlyICRAKQorICAgICAgY21kX21rZGlyID0gbWtkaXIgLXAgJChkaXIgJEApCisgICAgIHJ1bGVfbWtkaXIgPSAkKGlmICQod2lsZGNhcmQgJChkaXIgJEApKSwsQCQoY2FsbCBlY2hvLWNtZCxta2RpcikgJChjbWRfbWtkaXIpKQorCisjIENvbXBpbGUgY29tbWFuZAorcXVpZXRfY21kX2NjX29fYyA9IENDICAgICAgICRACisgICAgICBjbWRfY2Nfb19jID0gJChDQykgJChjX2ZsYWdzKSAtYyAtbyAkQCAkPAorCitxdWlldF9jbWRfY2NfaV9jID0gQ1BQICAgICAgJEAKKyAgICAgIGNtZF9jY19pX2MgPSAkKENDKSAkKGNfZmxhZ3MpIC1FIC1vICRAICQ8CisKK3F1aWV0X2NtZF9jY19zX2MgPSBBUyAgICAgICAkQAorICAgICAgY21kX2NjX3NfYyA9ICQoQ0MpICQoY19mbGFncykgLVMgLW8gJEAgJDwKKworIyBMaW5rIGFncmVnYXRlIGNvbW1hbmQKKyMgSWYgdGhlcmUncyBub3RoaW5nIHRvIGxpbmssIGNyZWF0ZSBlbXB0eSAkQCBvYmplY3QuCitxdWlldF9jbWRfbGRfbXVsdGkgPSBMRCAgICAgICAkQAorICAgICAgY21kX2xkX211bHRpID0gJChpZiAkKHN0cmlwICQob2JqLXkpKSxcCisJCSAgICAgICAkKExEKSAtciAtbyAkQCAkKG9iai15KSxybSAtZiAkQDsgJChBUikgcmNzICRAKQorCisjIEJ1aWxkIHJ1bGVzCiskKE9VVFBVVCklLm86ICUuYyBGT1J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1MgPz0gLWcgLURDT05GSUdfTE9DS0RFUCAtRENPTkZJR19TVEFDS1RSQUNFIC1EQ09ORklHX1BST1ZFX0xPQ0tJTkcgLURCSVRTX1BFUl9MT05HPV9fV09SRFNJWkUgLURMSUJMT0NLREVQX1ZFUlNJT049JyIkKExJQkxPQ0tERVBfVkVSU0lPTikiJyAtcmR5bmFtaWMgLU8wIC1nCitDRkxBR1MgKz0gLWZQSUMKIAogb3ZlcnJpZGUgQ0ZMQUdTICs9ICQoQ09ORklHX0ZMQUdTKSAkKElOQ0xVREVTKSAkKFBMVUdJTl9ESVJfU1EpCiAKIGlmZXEgKCQoVkVSQk9TRSksMSkKICAgUSA9Ci0gIHByaW50X2NvbXBpbGUgPQotICBwcmludF9hcHBfYnVpbGQgPQotICBwcmludF9mcGljX2NvbXBpbGUgPQogICBwcmludF9zaGFyZWRfbGliX2NvbXBpbGUgPQogICBwcmludF9pbnN0YWxsID0KIGVsc2UKICAgUSA9IEAKLSAgcHJpbnRfY29tcGlsZSA9CQllY2hvICcgIENDICAgICAgICAgICAgICAgICAnJChPQkopOwotICBwcmludF9hcHBfYnVpbGQgPQkJZWNobyAnICBCVUlMRCAgICAgICAgICAgICAgJyQoT0JKKTsKLSAgcHJpbnRfZnBpY19jb21waWxlID0JCWVjaG8gJyAgQ0MgRlBJQyAgICAgICAgICAgICckKE9CSik7Ci0gIHByaW50X3NoYXJlZF9saWJfY29tcGlsZSA9CWVjaG8gJyAgQlVJTEQgU0hBUkVEIExJQiAgICckKE9CSik7Ci0gIHByaW50X3N0YXRpY19saWJfYnVpbGQgPQllY2hvICcgIEJVSUxEIFNUQVRJQyBMSUIgICAnJChPQkopOwotICBwcmludF9pbnN0YWxsID0JCWVjaG8gJyAgSU5TVEFMTCAgICAgJyQxJwl0bwkkKERFU1RESVJfU1EpJDInOworICBwcmludF9zaGFyZWRfbGliX2NvbXBpbGUgPQllY2hvICcgIExEICAgICAgICckKE9CSik7CisgIHByaW50X3N0YXRpY19saWJfYnV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2FueV9maWVsZChldmVudCwgc3RyKTsKKwkJCQlpZiAoIWZpZWxkKQorCQkJCQlnb3RvIG91dF93YXJuaW5nX2ZpZWxkOworCQkJCWFyZy0+aW50X2FycmF5LmZpZWxkLT5maWVsZC5maWVsZCA9IGZpZWxkOworCQkJfQorCQkJbnVtID0gZGF0YSArIGZpZWxkLT5vZmZzZXQ7CisJCX0KKwkJbGVuID0gZXZhbF9udW1fYXJnKGRhdGEsIHNpemUsIGV2ZW50LCBhcmctPmludF9hcnJheS5jb3VudCk7CisJCWVsX3NpemUgPSBldmFsX251bV9hcmcoZGF0YSwgc2l6ZSwgZXZlbnQsCisJCQkJICAgICAgIGFyZy0+aW50X2FycmF5LmVsX3NpemUpOworCQlmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKKwkJCWlmIChpKQorCQkJCXRyYWNlX3NlcV9wdXRjKHMsICcgJyk7CisKKwkJCWlmIChlbF9zaXplID09IDEpIHsKKwkJCQl0cmFjZV9zZXFfcHJpbnRmKHMsICIldSIsICoodWludDhfdCAqKW51bSk7CisJCQl9IGVsc2UgaWYgKGVsX3NpemUgPT0gMikgeworCQkJCXRyYWNlX3NlcV9wcmludGYocywgIiV1IiwgKih1aW50MTZfdCAqKW51bSk7CisJCQl9IGVsc2UgaWYgKGVsX3NpemUgPT0gNCkgeworCQkJCXRyYWNlX3NlcV9wcmludGYocywgIiV1IiwgKih1aW50MzJfdCAqKW51bSk7CisJCQl9IGVsc2UgaWYgKGVsX3NpemUgPT0gOCkgeworCQkJCXRyYWNlX3NlcV9wcmludGYocywgIiVsdSIsICoodWludDY0X3QgKiludW0pOworCQkJfSBlbHNlIHsKKwkJCQl0cmFjZV9zZXFfcHJpbnRmKHMsICJCQUQgU0laRTolZCAweCV4IiwKKwkJCQkJCSBlbF9zaXplLCAqKHVpbnQ4X3QgKiludW0pOworCQkJCWVsX3NpemUgPSAxOworCQkJfQorCisJCQludW0gKz0gZWxfc2l6ZTsKKwkJfQorCQlicmVhazs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KQEAgLTYwMCw3ICs1MTgsNyBAQAogICAgICAgICAgICAgRVhUTElCUyArPSAtbGliZXJ0eQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ESEFWRV9DUExVU19ERU1BTkdMRV9TVVBQT1JUCiAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIGluc3RhbGwgYmludXRpbHMtZGV2W2VsXS96bGliLXN0YXRpYyB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQorICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIHBsZWFzZSBpbnN0YWxsIGJpbnV0aWxzLWRldltlbF0vemxpYi1zdGF0aWMvbGliaWJlcnR5LWRldiB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ETk9fREVNQU5HTEUKICAgICAgICAgICBlbmRpZgogICAgICAgICBlbmRpZgpAQCAtNjE3LDExICs1MzUsMjMgQEAKICAgaWZlcSAoJChmZWF0dXJlLXpsaWIpLCAxKQogICAgIENGTEFHUyArPSAtREhBVkVfWkxJQl9TVVBQT1JUCiAgICAgRVhUTElCUyArPSAtbHoKKyAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX1pMSUIpCiAgIGVsc2UKICAgICBOT19aTElCIDo9IDEKICAgZW5kaWYKIGVuZGlmCiAKK2lmbmRlZiBOT19MWk1BCisgIGlmZXEgKCQoZmVhdHVyZS1sem1hKSwgMSkKKyAgICBDRkxBR1MgKz0gLURIQVZFX0xaTUFfU1VQUE9SVAorICAgIEVYVExJQlMgKz0gLWxsem1hCisgICAgJChjYWxsIGRldGVjdGVkLENPTkZJR19MWk1BKQorICBlbHNlCisgICAgbXNnIDo9ICQod2FybmluZyBObyBsaWJsem1hIGZvdW5kLCBkaXNhYmxlcyB4eiBrZXJuZWwgbW9kdWxlIGRlY29tcH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CBjb25zdCBjaGFyICptb3VudHBvaW50KQogewotCXNucHJpbnRmKHRyYWNpbmdfZXZlbnRzX3BhdGgsIHNpemVvZih0cmFjaW5nX2V2ZW50c19wYXRoKSwgIiVzLyVzIiwKLQkJIG1vdW50cG9pbnQsICJ0cmFjaW5nL2V2ZW50cyIpOworCXNucHJpbnRmKHRyYWNpbmdfZXZlbnRzX3BhdGgsIHNpemVvZih0cmFjaW5nX2V2ZW50c19wYXRoKSwgIiVzLyVzJXMiLAorCQkgbW91bnRwb2ludCwgdHJhY2luZywgImV2ZW50cyIpOwogfQogCi1jb25zdCBjaGFyICpwZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKK3N0YXRpYyBjb25zdCBjaGFyICpfX3BlcmZfdHJhY2Vmc19tb3VudChjb25zdCBjaGFyICptb3VudHBvaW50KQoreworCWNvbnN0IGNoYXIgKm1udDsKKworCW1udCA9IHRyYWNlZnNfbW91bnQobW91bnRwb2ludCk7CisJaWYgKCFtbnQpCisJCXJldHVybiBOVUxMOworCisJc2V0X3RyYWNpbmdfZXZlbnRzX3BhdGgoIiIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitzdGF0aWMgY29uc3QgY2hhciAqX19wZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKIHsKIAljb25zdCBjaGFyICptbnQ7CiAKQEAgLTMxNyw3ICszMzcsMjAgQEAKIAlpZiAoIW1udCkKIAkJcmV0dXJuIE5VTEw7CiAKLQlzZXRfdHJhY2luZ19ldmVudHNfcGF0aChtbnQpOworCXNldF90cmFjaW5nX2V2ZW50c19wYXRoKCJ0cmFjaW5nLyIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitjb25zdCBjaGFyICpwZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKK3sKKwljb25zdCBjaGFyICptbnQ7CisKKwltbnQgPSBfX3BlcmZfdHJh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2lkKQoreworCXJldHVybiAoc2l6ZW9mKGxvbmcpID09IDQpOworfQorCitpbnQgc2V0dGltZShsb25nIGxvbmcgdGltZSkKK3sKKwlzdHJ1Y3QgdGltZXZhbCBub3c7CisJaW50IHJldDsKKworCW5vdy50dl9zZWMgPSAodGltZV90KXRpbWU7CisJbm93LnR2X3VzZWMgID0gMDsKKworCXJldCA9IHNldHRpbWVvZmRheSgmbm93LCBOVUxMKTsKKworCXByaW50ZigiU2V0dGluZyB0aW1lIHRvIDB4JWx4OiAlZFxuIiwgKGxvbmcpdGltZSwgcmV0KTsKKwlyZXR1cm4gcmV0OworfQorCitpbnQgZG9fdGVzdHModm9pZCkKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gc3lzdGVtKCJkYXRlIik7CisJcmV0ID0gc3lzdGVtKCIuL2luY29uc2lzdGVuY3ktY2hlY2sgLWMgMCAtdCAyMCIpOworCXJldCB8PSBzeXN0ZW0oIi4vbmFub3NsZWVwIik7CisJcmV0IHw9IHN5c3RlbSgiLi9uc2xlZXAtbGF0Iik7CisJcmV0dXJuIHJldDsKKworfQorCitpbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKQoreworCWludCByZXQgPSAwOworCWludCBvcHQsIGRhbmdlcm91cyA9IDA7CisJdGltZV90IHN0YXJ0OworCisJLyogUHJvY2VzcyBhcmd1bWVudHMgKi8KKwl3aGlsZSAoKG9wdCA9IGdldG9wdChhcmdjLCBhcmd2LCAiZCIpKSAhPSAtMSkgeworCQlzd2l0Y2ggKG9wdCkgeworCQljYXNlICdkJzoKKwkJCWRhbmdlcm91cyA9IDE7CisJCX0KKwl9CisKKwlzdGFydCA9IHRpbWUoMCk7CisKKwkvKiBGaXJzdCB0ZXN0IHRoYXQgY3JhenkgdmFsdWVzIGRvbid0IHdvcmsgKi8KKwlpZiAoIXNldHRpbWUoWUVBUl8xOTAxKSkgeworCQlyZXQgPSAtMTsKKwkJZ290byBvdXQ7CisJfQorCWlmICghc2V0dGltZShZR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