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ZyBhcmUgd2hhdCBpcyByZXF1aXJlZCBmb3IgQ1BVIGhvdHBsdWcgaW5mcmFzdHJ1Y3R1cmUgdG8gd29yaworICAgY29ycmVjdGx5LgorCisgICAgLSBNYWtlIHN1cmUgeW91IGhhdmUgYW4gZW50cnkgaW4gS2NvbmZpZyB0byBlbmFibGUgQ09ORklHX0hPVFBMVUdfQ1BVCisgICAgLSBfX2NwdV91cCgpICAgICAgICAtIEFyY2ggaW50ZXJmYWNlIHRvIGJyaW5nIHVwIGEgQ1BVCisgICAgLSBfX2NwdV9kaXNhYmxlKCkgICAtIEFyY2ggaW50ZXJmYWNlIHRvIHNodXRkb3duIGEgQ1BVLCBubyBtb3JlIGludGVycnVwdHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuIGJlIGhhbmRsZWQgYnkgdGhlIGtlcm5lbCBhZnRlciB0aGUgcm91dGluZQorICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5zLiBJbmNsdWRpbmcgbG9jYWwgQVBJQyB0aW1lcnMgZXRjIGFyZQorICAgICAgICAgICAgICAgICAgICAgICAgICBzaHV0ZG93bi4KKyAgICAgLSBfX2NwdV9kaWUoKSAgICAgIC0gVGhpcyBhY3R1YWxseSBzdXBwb3NlZCB0byBlbnN1cmUgZGVhdGggb2YgdGhlIENQVS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgQWN0dWFsbHkgbG9vayBhdCBzb21lIGV4YW1wbGUgY29kZSBpbiBvdGhlciBhcmNoCisgICAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQgaW1wbGVtZW50IENQVSBob3RwbHVnLiBUaGUgcHJvY2Vzc29yIGlzIHRha2VuCisgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd24gZnJvbSB0aGUgaWRsZSgpIGxvb3AgZm9yIHRoYXQgc3BlY2lmaWMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgYXJjaGl0ZWN0dXJlLiBfX2NwdV9kaWUoKSB0eXBpY2FsbHkgd2F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GVyQHVzLmlibS5jb20+LAorICAgICAgIFVscmljaCBXZWlnYW5kIDxVbHJpY2guV2VpZ2FuZEBkZS5pYm0uY29tPgorCitTRUUgQUxTTworICAgICAgIGNhcGFiaWxpdGllcyg3KSwgY2xvc2UoMiksIHNwdV9jcmVhdGUoMiksIHNwdV9ydW4oMiksIHNwdWZzKDcpCisKKworCitMaW51eCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjAwNS0wOS0yOCAgICAgICAgICAgICAgICAgICAgICAgICAgU1BVRlMoMikKKworLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisKK1NQVV9SVU4oMikgICAgICAgICAgICAgICAgIExpbnV4IFByb2dyYW1tZXIncyBNYW51YWwgICAgICAgICAgICAgICAgU1BVX1JVTigyKQorCisKKworTkFNRQorICAgICAgIHNwdV9ydW4gLSBleGVjdXRlIGFuIHNwdSBjb250ZXh0CisKKworU1lOT1BTSVMKKyAgICAgICAjaW5jbHVkZSA8c3lzL3NwdS5oPgorCisgICAgICAgaW50IHNwdV9ydW4oaW50IGZkLCB1bnNpZ25lZCBpbnQgKm5wYywgdW5zaWduZWQgaW50ICpldmVudCk7CisKK0RFU0NSSVBUSU9OCisgICAgICAgVGhlICBzcHVfcnVuIHN5c3RlbSBjYWxsIGlzIHVzZWQgb24gUG93ZXJQQyBtYWNoaW5lcyB0aGF0IGltcGxlbWVudCB0aGUKKyAgICAgICBDZWxsIEJyb2FkYmFuZCBFbmdpbmUgQXJjaGl0ZWN0dXJlIGluIG9yZGVyIHRvIGFjY2VzcyBTeW5lcmdpc3RpYyAgUHJvLQorICAgICAgIGNlc3NvciAgVW5pdHMgIChTUFVzKS4gIEl0ICB1c2VzIHRoZSBmZCB0aGF0IHdhcyByZXR1cm5lZCBmcm9tIHNwdV9jcmUtCisgICAgICAgYXRlKDIpIHRvIGFkZHJlc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pICAgICAgICAgICAgICAgICAgICAgICAgIFswMDcwOjEzZWJdCisxNDQgLT4gTWFnaWNUVgpkaWZmIC0tZ2l0IGEvRG9jdW1lbnRhdGlvbi92aWRlbzRsaW51eC9DQVJETElTVC5jeDg4IGIvRG9jdW1lbnRhdGlvbi92aWRlbzRsaW51eC9DQVJETElTVC5jeDg4CmluZGV4IGExMDE3ZDEuLjU2ZTE5NGYgMTAwNjQ0Ci0tLSBhL0RvY3VtZW50YXRpb24vdmlkZW80bGludXgvQ0FSRExJU1QuY3g4OAorKysgYi9Eb2N1bWVudGF0aW9uL3ZpZGVvNGxpbnV4L0NBUkRMSVNULmN4ODgKQEAgLTE2LDEwICsxNiwxMCBAQAogIDE1IC0+IERWaUNPIEZ1c2lvbkhEVFYgRFZCLVQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMThhYzpkYjAwXQogIDE2IC0+IEtXb3JsZCBMVFY4ODNSRgogIDE3IC0+IERWaUNPIEZ1c2lvbkhEVFYgMyBHb2xkLVEgICAgICAgICAgICAgICAgICAgICAgICAgICBbMThhYzpkODEwXQotIDE4IC0+IEhhdXBwYXVnZSBOb3ZhLVQgRFZCLVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMDA3MDo5MDAyXQorIDE4IC0+IEhhdXBwYXVnZSBOb3ZhLVQgRFZCLVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMDA3MDo5MDAyLDAwNzA6OTAwMV0KICAxOSAtPiBDb25leGFudCBEVkItVCByZWZlcmVuY2UgZGVzaWduICAgICAgICAgICAgICAgICAgICAgWzE0ZjE6MDE4N10KICAyMCAtPiBQcm92aWRlbyBQVjI1OSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzE1NDA6MjU4MF0KLSAyMSAtPiBEVmlDTyBGdXNpb25IRFRWIERWQi1UIFBsdXMgICAgICAgICAgICAgICAgICAgICAgICAgWzE4YWM6ZGIxMF0KKyAyMSAtPiBEVmlDTyBGdXNpb25IRFRWIERWQi1UIFBsdXMgICAgICAgICAgICAgICAgICAgICAgICAgWzE4YWM6ZGIxMCwxOGFjOmRiMTFdCiAgMjIgLT4gcGNIRFRWIEhEMzAwMCBIRFRWICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFs3MDYzOjMwMDBdCiAgMjMgLT4gZGlnaXRhbG5vdyBETlRWIExpdmUhIERWQi1UICAgICAgICAgICAgICAgICAgICAgICAgIFsxN2RlOmE4YTZdCiAgMjQgLT4gSGF1cHBhdWdlIFdpblRWIDI4eHh4IChSb3NseW4pIG1vZGVscyAgICAgICAgICAgICAgIFswMDcwOjI4MDFdCkBAIC0zNSwzICszNSwxMSBAQAogIDM0IC0+IEFUSSBIRFRWIFdvbmRlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTAwMjphMTAxXQogIDM1IC0+IFdpbkZhc3QgRFRWMTAwMC1UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTA3ZDo2NjVmXQogIDM2IC0+IEFWZXJUViAzMDMgKE0xMjYpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTQ2MTowMDBhXQorIDM3IC0+IEhhdXBwYXVnZSBOb3ZhLVMtUGx1cyBEVkItUyAgICAgICAgICAgICAgICAgICAgICAgICBbMDA3MDo5MjAxLDAwNzA6OTIwMl0KKyAzOCAtPiBIYXVwcGF1Z2UgTm92YS1TRTIgRFZCLVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzAwNzA6OTIwMF0KKyAzOSAtPiBLV29ybGQgRFZCLVMgMTAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzE3ZGU6MDhiMl0KKyA0MCAtPiBIYXVwcGF1Z2UgV2luVFYtSFZSMTEwMCBEVkItVC9IeWJyaWQgICAgICAgICAgICAgICAgWzAwNzA6OTQwMCwwMDcwOjk0MDJdCisgNDEgLT4gSGF1cHBhdWdlIFdpblRWLUhWUjExMDAgRFZCLV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XNlY3NfdG9famlmZmllcygxMCo2MCoxMDAwKSkgLyogMTAgbWluICovCisjZGVmaW5lIFNIQVJQU0xfQkFUQ0hLX1RJTUUgICAgICAgICAgICAgICAgICAgIChtc2Vjc190b19qaWZmaWVzKDE1KjEwMDApKSAgICAvKiAxNSBzZWMgKi8KKyNkZWZpbmUgU0hBUlBTTF9CQVRDSEtfVElNRV9TVVNQRU5EICAgICAgICAgICAgKDYwKjEwKSAgICAgICAgICAgICAgICAgICAgICAgIC8qIDEwIG1pbiAqLworI2RlZmluZSBTSEFSUFNMX1dBSVRfQ09fVElNRSAgICAgICAgICAgICAgICAgICAxNSAgLyogMTUgc2VjICovCisjZGVmaW5lIFNIQVJQU0xfV0FJVF9ESVNDSEFSR0VfT04gICAgICAgICAgICAgIDEwMCAvKiAxMDAgbXNlYyAqLworI2RlZmluZSBTSEFSUFNMX0NIRUNLX0JBVFRFUllfV0FJVF9USU1FX1RFTVAgICAxMCAgLyogMTAgbXNlYyAqLworI2RlZmluZSBTSEFSUFNMX0NIRUNLX0JBVFRFUllfV0FJVF9USU1FX1ZPTFQgICAxMCAgLyogMTAgbXNlYyAqLworI2RlZmluZSBTSEFSUFNMX0NIRUNLX0JBVFRFUllfV0FJVF9USU1FX0FDSU4gICAxMCAgLyogMTAgbXNlYyAqLworI2RlZmluZSBTSEFSUFNMX0NIQVJHRV9XQUlUX1RJTUUgICAgICAgICAgICAgICAxNSAgLyogMTUgbXNlYyAqLworI2RlZmluZSBTSEFSUFNMX0NIQVJHRV9DT19DSEVDS19USU1FICAgICAgICAgICA1ICAgLyogNSBtc2VjICovCisjZGVmaW5lIFNIQVJQU0xfQ0hBUkdFX1JFVFJZX0NOVCAgICAgICAgICAgICAgIDEgICAvKiBlcXYuIDEwIG1pbiAqLworCisjZGVmaW5lIFNIQVJQU0xfQ0hBUkdFX09OX1ZPTFQgICAgICAgICAweDk5ICAvKiAyLjlWICovCisjZGVmaW5lIFNIQVJQU0xfQ0hBUkdFX09OX1RFTVA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kxBVE1FTT15CitDT05GSUdfRkxBVF9OT0RFX01FTV9NQVA9eQorIyBDT05GSUdfU1BBUlNFTUVNX1NUQVRJQyBpcyBub3Qgc2V0CitDT05GSUdfU1BMSVRfUFRMT0NLX0NQVVM9NDA5NgorQ09ORklHX0xFRFM9eQorQ09ORklHX0xFRFNfVElNRVI9eQorIyBDT05GSUdfTEVEU19DUFUgaXMgbm90IHNldAorQ09ORklHX0FMSUdOTUVOVF9UUkFQPXkKKworIworIyBCb290IG9wdGlvbnMKKyMKK0NPTkZJR19aQk9PVF9ST01fVEVYVD0weDAKK0NPTkZJR19aQk9PVF9ST01fQlNTPTB4MAorQ09ORklHX0NNRExJTkU9Im1lbT0zMk0gY29uc29sZT10dHlTMCwxMTUyMDAgaW5pdHJkPTB4MjA0MTAwMDAsMzE0NTcyOCByb290PS9kZXYvcmFtMCBydyIKKyMgQ09ORklHX1hJUF9LRVJORUwgaXMgbm90IHNldAorCisjCisjIEZsb2F0aW5nIHBvaW50IGVtdWxhdGlvbgorIworCisjCisjIEF0IGxlYXN0IG9uZSBlbXVsYXRpb24gbXVzdCBiZSBzZWxlY3RlZAorIworQ09ORklHX0ZQRV9OV0ZQRT15CisjIENPTkZJR19GUEVfTldGUEVfWFAgaXMgbm90IHNldAorIyBDT05GSUdfRlBFX0ZBU1RGUEUgaXMgbm90IHNldAorCisjCisjIFVzZXJzcGFjZSBiaW5hcnkgZm9ybWF0cworIworQ09ORklHX0JJTkZNVF9FTEY9eQorIyBDT05GSUdfQklORk1UX0FPVVQgaXMgbm90IHNldAorIyBDT05GSUdfQklORk1UX01JU0MgaXMgbm90IHNldAorIyBDT05GSUdfQVJUSFVSIGlzIG5vdCBzZXQKKworIworIyBQb3dlciBtYW5hZ2VtZW50IG9wdGlvbnMKKyMKKyMgQ09ORklHX1BNIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JraW5nCisjCitDT05GSUdfTkVUPXkKKworIworIyBOZXR3b3JraW5nIG9wdGlvbnMKKyMKK0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m90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorQ09ORklHX01URF9BVDkxX0RBVEFGTEFTSD15CitDT05GSUdfTVREX0FUOTFfREFUQUZMQVNIX0NBUkQ9eQorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9MT09QIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfTkJEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfVUIgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9ODE5MgorQ09ORklHX0JMS19ERVZfSU5JVFJEPXkKKyMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAorIyBDT05GSUdfQVRBX09WRVJfRVRIIGlzIG5vdCBzZXQKKworIworIyBBVEEvQVRBUEkvTUZNL1JMTCBzdXBwb3J0CisjCisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSSBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGktZGV2aWNlIHN1cHBvcnQgKFJBSUQgYW5kIExWTSkKKyMKKyMgQ09ORklHX01EIGlzIG5vdCBzZXQKKworIworIyBGdXNpb24gTVBUIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19GVVNJT04gaXMgbm90IHNldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKworIworIyBOZXR3b3JrIGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfTkVUREVWSUNFUz15CisjIENPTkZJR19EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19CT05ESU5HIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VRVUFMSVpFUiBpcyBub3Qgc2V0CisjIENPTkZJR19UVU4gaXMgbm90IHNldAorCisjCisjIFBIWSBkZXZpY2Ugc3VwcG9ydAorIworIyBDT05GSUdfUEhZTElCIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAgb3IgMTAwTWJpdCkKKyMKK0NPTkZJR19ORVRfRVRIRVJORVQ9eQorQ09ORklHX01JST15CitDT05GSUdfQVJNX0FUOTFfRVRIRVI9eQorIyBDT05GSUdfU01DOTFYIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RNOTAwMCBpcyBub3Qgc2V0CisKKyMKKyMgRXRoZXJuZXQgKDEwMDAgTWJpdCkKKyMKKworIworIyBFdGhlcm5ldCAoMTAwMDAgTWJpdCkKKyMKKworIworIyBUb2tlbiBSaW5nIGRldmljZXMKKyMKKworIworIyBXaXJlbGVzcyBMQU4gKG5vbi1oYW1yYWRpbykKKyMKKyMgQ09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Qgc2V0CisjIENPTkZJR19VU0JfQVVFUlNXQUxEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9SSU81MDAgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0xFR09UT1dFUiBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfTENEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9MRUQgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0NZVEhFUk0gaXMgbm90IHNldAorIyBDT05GSUdfVVNCX1BISURHRVRLSVQgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX1BISURHRVRTRVJWTyBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfSURNT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfTEQgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX1RFU1QgaXMgbm90IHNldAorCisjCisjIFVTQiBEU0wgbW9kZW0gc3VwcG9ydAorIworCisjCisjIFVTQiBHYWRnZXQgU3VwcG9ydAorIworQ09ORklHX1VTQl9HQURHRVQ9eQorIyBDT05GSUdfVVNCX0dBREdFVF9ERUJVR19GSUxFUyBpcyBub3Qgc2V0CitDT05GSUdfVVNCX0dBREdFVF9TRUxFQ1RFRD15CisjIENPTkZJR19VU0JfR0FER0VUX05FVDIyODAgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9QWEEyWFggaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9HT0tVIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9HQURHRVRfTEg3QTQwWCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR0FER0VUX09NQVAgaXMgbm90IHNldAorQ09ORklHX1VTQl9HQURHRVRfQVQ5MT15CitDT05GSUdfVVNCX0FUOTE9eQorIyBDT05GSUdfVVNCX0dBREdFVF9EVU1NWV9IQ0QgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9EVUFMU1BFRUQgaXMgbm90IHNldAorI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9TQ0hFRCBpcyBub3Qgc2V0CisKKyMKKyMgTmV0d29yayB0ZXN0aW5nCisjCisjIENPTkZJR19ORVRfUEtUR0VOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hBTVJBRElPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lSREEgaXMgbm90IHNldAorIyBDT05GSUdfQlQgaXMgbm90IHNldAorIyBDT05GSUdfSUVFRTgwMjExIGlzIG5vdCBzZXQKKworIworIyBEZXZpY2UgRHJpdmVycworIworCisjCisjIEdlbmVyaWMgRHJpdmVyIE9wdGlvbnMKKyMKK0NPTkZJR19TVEFOREFMT05FPXkKK0NPTkZJR19QUkVWRU5UX0ZJUk1XQVJFX0JVSUxEPXkKKyMgQ09ORklHX0ZXX0xPQURFUiBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19EUklWRVIgaXMgbm90IHNldAorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKyMgQ09ORklHX0NPTk5FQ1RPUiBpcyBub3Qgc2V0CisKKyMKKyMgTWVtb3J5IFRlY2hub2xvZ3kgRGV2aWNlcyAoTVREKQorIworQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKyMgQ09ORklHX01URF9BRlNfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorQ09ORklHX01URF9KRURFQ1BST0JFPXkKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9DRklfQU1EU1REX1JFVFJZPTAKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9YSVAgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEhZU01BUD15CitDT05GSUdfTVREX1BIWVNNQVBfU1RBUlQ9MHgxMDAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDgwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0JBTktXSURUSD0yCisjIENPTkZJR19NVERfQVJNX0lOVEVHUkFUT1IgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0lNUEE3IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxLTVREIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQVQ5MV9EQVRBRkxBU0g9eQorQ09ORklHX01URF9BVDkxX0RBVEFGTEFTSF9DQVJEPXkKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgT25lTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFBhcmFsbGVsIHBvcnQgc3VwcG9ydAorIworIyBDT05GSUdfUEFSUE9SVCBpcyB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yMgQ09ORklHX1RVTiBpcyBub3Qgc2V0CisKKyMKKyMgUEhZIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19QSFlMSUIgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMCBvciAxMDBNYml0KQorIworQ09ORklHX05FVF9FVEhFUk5FVD15CitDT05GSUdfTUlJPXkKK0NPTkZJR19BUk1fQVQ5MV9FVEhFUj15CisjIENPTkZJR19TTUM5MVggaXMgbm90IHNldAorIyBDT05GSUdfRE05MDAwIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAwMCBNYml0KQorIworCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BQUCBpcyBub3Qgc2V0CisjIENPTkZJR19TTElQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NIQVBFUiBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRDT05TT0xFIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVFBPTEwgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX1BPTExfQ09OVFJPTExFUiBpcyBub3Qgc2V0CisKKyMKKyMgSVNETiBzdWJzeXN0ZW0KKyMKKyMgQ09ORklHX0lTRE4gaXMgbm90IHNldAorCisjCisjIElucHV0IGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfSU5QVVQ9eQorCisjCisjIFVzZXJsYW5kIGludGVyZmFjZXMKKyMKK0NPTkZJR19JTlBVVF9NT1VTRURFVj15CisjIENPTkZJR19JTlBVVF9NT1VTRURFVl9QU0FVWCBpcyBub3Qgc2V0CitDT05GSUdfSU5QVVRfTU9VU0VERVZfU0NSR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X0ZTIGlzIG5vdCBzZXQKKworIworIyBQYXJ0aXRpb24gVHlwZXMKKyMKKyMgQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRCBpcyBub3Qgc2V0CitDT05GSUdfTVNET1NfUEFSVElUSU9OPXkKKworIworIyBOYXRpdmUgTGFuZ3VhZ2UgU3VwcG9ydAorIworIyBDT05GSUdfTkxTIGlzIG5vdCBzZXQKKworIworIyBQcm9maWxpbmcgc3VwcG9ydAorIworIyBDT05GSUdfUFJPRklMSU5HIGlzIG5vdCBzZXQKKworIworIyBLZXJuZWwgaGFja2luZworIworIyBDT05GSUdfUFJJTlRLX1RJTUUgaXMgbm90IHNldAorQ09ORklHX0RFQlVHX0tFUk5FTD15CisjIENPTkZJR19NQUdJQ19TWVNSUSBpcyBub3Qgc2V0CitDT05GSUdfTE9HX0JVRl9TSElGVD0xNAorQ09ORklHX0RFVEVDVF9TT0ZUTE9DS1VQPXkKKyMgQ09ORklHX1NDSEVEU1RBVFMgaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfU0xBQiBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19TUElOTE9DSyBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19TUElOTE9DS19TTEVFUCBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19LT0JKRUNUIGlzIG5vdCBzZXQKK0NPTkZJR19ERUJVR19CVUdWRVJCT1NFPXkKKyMgQ09ORklHX0RFQlVHX0lORk8gaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfRlMgaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfVk0gaXMgbm90IHNldAorQ09ORklHX0ZSQU1FX1BPSU5URVI9eQorIyBDT05GSUdfUkNVX1RPUlRVUkVfVEVTVCBpcyBub3Qgc2V0CitDT05GSUdfREVCVUdfVVNFUj15CisjIENPTkZJR19ERUJVR19XQUlUUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19FUlJPUlMgaXMgbm90IHNldAorQ09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Fuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0lOVEVMRVhUPXkKKyMgQ09ORklHX01URF9DRklfQU1EU1REIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9YSVAgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFlTTUFQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BUk1fSU5URUdSQVRPUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NTQjMzNz15CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMS01URCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQVQ5MV9EQVRBRkxBU0ggaXMgbm90IHNldAorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHV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RlY2hub2xvZ3kgRGV2aWNlcyAoTVREKQorIworQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKyMgQ09ORklHX01URF9BRlNfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CisjIENPTkZJR19NVERfQ0ZJX0FNRFNURCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfWElQIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQVJNX0lOVEVHUkFUT1IgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorQ09ORklHX01URF9DU0I2Mzc9eQorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTEtNVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdf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gbm90IHNldAorIyBDT05GSUdfUENNQ0lBX1FMT0dJQyBpcyBub3Qgc2V0CisjIENPTkZJR19QQ01DSUFfU1lNNTNDNTAwIGlzIG5vdCBzZXQKKworIworIyBNdWx0aS1kZXZpY2Ugc3VwcG9ydCAoUkFJRCBhbmQgTFZNKQorIworIyBDT05GSUdfTUQgaXMgbm90IHNldAorCisjCisjIEZ1c2lvbiBNUFQgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZVU0lPTiBpcyBub3Qgc2V0CisKKyMKKyMgSUVFRSAxMzk0IChGaXJlV2lyZSkgc3VwcG9ydAorIworCisjCisjIEkyTyBkZXZpY2Ugc3VwcG9ydAorIworCisjCisjIE5ldHdvcmsgZGV2aWNlIHN1cHBvcnQKKyMKK0NPTkZJR19ORVRERVZJQ0VTPXkKKyMgQ09ORklHX0RVTU1ZIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JPTkRJTkcgaXMgbm90IHNldAorIyBDT05GSUdfRVFVQUxJWkVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RVTiBpcyBub3Qgc2V0CisKKyMKKyMgUEhZIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19QSFlMSUIgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMCBvciAxMDBNYml0KQorIworQ09ORklHX05FVF9FVEhFUk5FVD15CitDT05GSUdfTUlJPXkKK0NPTkZJR19BUk1fQVQ5MV9FVEhFUj15CisjIENPTkZJR19TTUM5MVggaXMgbm90IHNldAorIyBDT05GSUdfRE05MDAwIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAwMCBNYml0KQorIworCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBQQ01DSUEgbmV0d29yayBkZXZpY2Ugc3VwcG9ydAorIworIyBDT05GSUdfTkVUX1BDTUNJQSBpcyBub3Qgc2V0CisKKyMKKyMgV2FuIGludGVyZmFjZXMKKyMKKyMgQ09ORklHX1dBTiBpcyBub3Qgc2V0CisjIENPTkZJR19QUFAgaXMgbm90IHNldAorIyBDT05GSUdfU0xJUCBpcyBub3Qgc2V0CisjIENPTkZJR19TSEFQRVIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUQ09OU09MRSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRQT0xMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF9QT0xMX0NPTlRST0xMRVIgaXMgbm90IHNldAorCisjCisjIElTRE4gc3Vic3lzdGVtCisjCisjIENPTkZJR19JU0ROIGlzIG5vdCBzZXQKKworIworIyBJbnB1dCBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX0lOUFVUPXkKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCitDT05GSUdfSU5QVVRfTU9VU0VERVY9eQorQ09ORklHX0lOUFVUX01PVVNFREVWX1BTQVVYPXkKK0NPTkZJR19JTlBVVF9NT1VTRURFVl9TQ1JFRU5fWD0xMDI0CitDT05GSUdfSU5QVVRfTU9VU0VERVZfU0NSRUVOX1k9NzY4CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UT1VDSFNDUkVFT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U5TT1JTX1c4MzYyN0hGIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfVzgzNjI3RUhGIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hXTU9OX0RFQlVHX0NISVAgaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgQ2FwYWJpbGl0aWVzIFBvcnQgZHJpdmVycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBDb25zb2xlIGRpc3BsYXkgZHJpdmVyIHN1cHBvcnQKKyMKKyMgQ09ORklHX1ZHQV9DT05TT0xFIGlzIG5vdCBzZXQKK0NPTkZJR19EVU1NWV9DT05TT0xFPXkKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CitDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0k9eQorQ09ORklHX1VTQj15CitDT05GSUdfVVNCX0RFQlVHPXkKKworIworIyBNaXNjZWxsYW5lb3VzIFVTQiBvcHRpb25zCisjCitDT05GSUdfVVNCX0RFVklDRUZTPXkKKyMgQ09ORklHX1VTQl9CQU5EV0lEVEggaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0RZTkFNSUNfTUlOT1JTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9PVEcgaXMgbm90IHNldAorCisjCisjIFVTQiBIb3N0IENvbnRyb2xsZXIgRHJpdmVycworIworIyBDT05GSUdfVVNCX0lTUDExNlhfSENEIGlzIG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iKTsKIAkJcmV0dXJuIC0xOwogCX0KIAotCXNldF9pcnFfdHlwZShTUElUWl9JUlFfR1BJT19uU0RfREVURUNULCBJUlFUX0JPVEhFREdFKTsKLQogCXJldHVybiAwOwogfQogCkBAIC0zMzUsNiArMzM3LDM1IEBACiAKIAogLyoKKyAqIFVTQiBIb3N0IChPSENJKQorICovCitzdGF0aWMgaW50IHNwaXR6X29oY2lfaW5pdChzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisJLyogT25seSBQb3J0IDIgaXMgY29ubmVjdGVkICovCisJcHhhX2dwaW9fbW9kZShTUElUWl9HUElPX1VTQl9DT05ORUNUIHwgR1BJT19JTik7CisJcHhhX2dwaW9fbW9kZShTUElUWl9HUElPX1VTQl9IT1NUIHwgR1BJT19PVVQpOworCXB4YV9ncGlvX21vZGUoU1BJVFpfR1BJT19VU0JfREVWSUNFIHwgR1BJT19JTik7CisKKwkvKiBTZXR1cCBVU0IgUG9ydCAyIE91dHB1dCBDb250cm9sIFJlZ2lzdGVyICovCisJVVAyT0NSID0gVVAyT0NSX0hYUyB8IFVQMk9DUl9IWE9FIHwgVVAyT0NSX0RQUERFIHwgVVAyT0NSX0RNUERFOworCisJR1BTUihTUElUWl9HUElPX1VTQl9IT1NUKSA9IEdQSU9fYml0KFNQSVRaX0dQSU9fVVNCX0hPU1QpOworCisJVUhDSFIgPSAoVUhDSFIpICYKKwkJfihVSENIUl9TU0VQMSB8IFVIQ0hSX1NTRVAyIHwgVUhDSFJfU1NFUDMgfCBVSENIUl9TU0UpOworCisJVUhDUkhEQSB8PSBVSENSSERBX05PQ1A7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHN0cnVjdCBweGFvaGNpX3BsYXRmb3JtX2RhdGEgc3BpdHpfb2hjaV9wbGF0Zm9ybV9kYXRhID0geworCS5wb3J0X21vZGUJPSBQTU1fTlBTX01PREUsCisJLmluaXQJCT0gc3BpdHpfb2hjaV9pbml0LAorfTsKKworCisvKgogICogSXJkYQogICov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pbnQzMl90ICAgICAgICAgICAgICAgeGJfbDhfcnN0X2ZuYzsgICAgICAvKiAweDAwMDA4NCAqLwotICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgX3BhZF8wMDAwODA7Ci0gICAgdWludDMyX3QgICAgICAgICAgICAgICB4Yl9sOV9yc3RfZm5jOyAgICAgIC8qIDB4MDAwMDhjICovCi0gICAgdWludDMyX3QgICAgICAgICAgICAgICBfcGFkXzAwMDA4ODsKLSAgICB1aW50MzJfdCAgICAgICAgICAgICAgIHhiX2xhX3JzdF9mbmM7ICAgICAgLyogMHgwMDAwOTQgKi8KLSAgICB1aW50MzJfdCAgICAgICAgICAgICAgIF9wYWRfMDAwMDkwOwotICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgeGJfbGJfcnN0X2ZuYzsgICAgICAvKiAweDAwMDA5YyAqLwotICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgX3BhZF8wMDAwOTg7Ci0gICAgdWludDMyX3QgICAgICAgICAgICAgICB4Yl9sY19yc3RfZm5jOyAgICAgIC8qIDB4MDAwMGE0ICovCi0gICAgdWludDMyX3QgICAgICAgICAgICAgICBfcGFkXzAwMDBhMDsKLSAgICB1aW50MzJfdCAgICAgICAgICAgICAgIHhiX2xkX3JzdF9mbmM7ICAgICAgLyogMHgwMDAwYWMgKi8KLSAgICB1aW50MzJfdCAgICAgICAgICAgICAgIF9wYWRfMDAwMGE4OwotICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgeGJfbGVfcnN0X2ZuYzsgICAgICAvKiAweDAwMDBiNCAqLwotICAgIHVpbnQzMl90ICAgICAgICAgICAgICAgX3BhZF8wMDAwYjA7Ci0gICAgdWludDMyX3QgICAgICAgICAgICAgICB4Yl9sZl9yc3RfZm5jOyAgICAgIC8qIDB4MDAwMGJjICovCi0gICAgdWludDMyX3QgICAgICAgICAgICAgICBfcGFkXzAwMDBiODsKLSAgICB1aW50MzJfdCAgICAgICAgICAgICAgIHhiX2xvY2s7ICAgICAgIC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ICAgICAgICB8ICAgICAgfCAgICBFICAgIHwKLSAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8ICAgICAgICAgfAotICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgICstLS0tLS0tLS0rIDwtLSB3X2xvY2FsX0dQLmdldAotICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgIEIgICAgfCAgICAgIHwvLy8vLy8vLy98Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgfC8vLy9ELy8vL3wKLSAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8Ly8vLy8vLy8vfAotICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgICstLS0tLS0tLS0rIDwtLSB3X3JlbW90ZV9HUC5wdXQKLSAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8Ly8vL0MvLy8vfAotICogICAgICBsb2NhbF9HUC0+cHV0IC0tPiArLS0tLS0tLS0tKyAgICAgICstLS0tLS0tLS0rIDwtLSByZW1vdGVfR1AucHV0Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgfC8vLy8vLy8vL3wKLSAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBBICAgIHwgICAgICB8Ly8vLy8vLy8vfAotICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgIHwvLy8vLy8vLy98Ci0gKiAgICAgd19sb2NhbF9HUC5wdXQgLS0+ICstLS0tLS0tLS0rICAgICAgfC8vLy8vLy8vL3wKLSAqICAgICAgICAgICAgICAgICAgICAgICAgfC8vLy8vLy8vL3wgICAgICB8Ly8vLy8vLy8vfAotICoKLSAqCi0gKgkgICAgKCByZW1vdGVfR1AuW2dldHxwdXRdIGFyZSBjYWNoZWQgY29waWVzIG9mIHRoZSByZW1vdGUKLSAqCSAgICAgIHBh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W5pdHJkLnZtb2RlOiAkKGNhbGwgb2JqLXNlYywgJChyZXF1aXJlZCkgJChpbml0cmQpKSAkKG9iai1ib290KSAkKHNyY3RyZWUpLyQoc3JjKS96SW1hZ2UubGRzCi0JJChjYWxsIGNtZCxib290bGQsJChvYmotYm9vdCkpCisJJChjYWxsIGNtZCxib290bGQsJChvYmotYm9vdCksekltYWdlLmxkcykKIAotJChvYmopL3pJbWFnZTogJChvYmopL3pJbWFnZS52bW9kZSAkKG9iaikvYWRkbm90ZQorIyBGb3IgMzItYml0IHBvd2VybWFjcywgYnVpbGQgdGhlIENPRkYgYW5kIG1pYm9vdCBpbWFnZXMKKyMgYXMgd2VsbCBhcyB0aGUgRUxGIGltYWdlcy4KK2NvZmZpbWFnZS0kKENPTkZJR19QUENfUE1BQyktJChDT05GSUdfUFBDMzIpIDo9ICQob2JqKS96SW1hZ2UuY29mZgorY29mZnJkaW1nLSQoQ09ORklHX1BQQ19QTUFDKS0kKENPTkZJR19QUEMzMikgOj0gJChvYmopL3pJbWFnZS5pbml0cmQuY29mZgorbWlib290aW1nLSQoQ09ORklHX1BQQ19QTUFDKS0kKENPTkZJR19QUEMzMikgOj0gJChvYmopL21pYm9vdC5pbWFnZQorbWlicmRpbWctJChDT05GSUdfUFBDX1BNQUMpLSQoQ09ORklHX1BQQzMyKSAgOj0gJChvYmopL21pYm9vdC5pbml0cmQuaW1hZ2UKKworJChvYmopL3pJbWFnZTogJChvYmopL3pJbWFnZS52bW9kZSAkKG9iaikvYWRkbm90ZSAkKGNvZmZpbWFnZS15LXkpIFwKKwkJCSQobWlib290aW1nLXkteSkKIAlAY3AgLWYgJDwgJEAKIAkkKGNhbGwgaWZfY2hhbmdlZCxhZGRub3RlKQogCi0kKG9iaikvekltYWdlLmluaXRyZDogJChvYmopL3pJbWFnZS5pbml0cmQudm1vZGUgJChvYmopL2FkZG5vdGUKKyQob2JqKS96SW1hZ2UuaW5pdHJkOiAkKG9iaikvekltYWdlLmluaXRyZC52bW9kZ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ORklHX01PRFVMRV9GT1JDRV9VTkxPQUQgaXMgbm90IHNldAorQ09ORklHX09CU09MRVRFX01PRFBBUk09eQorIyBDT05GSUdfTU9EVkVSU0lPTlMgaXMgbm90IHNldAorIyBDT05GSUdfTU9EVUxFX1NSQ1ZFUlNJT05fQUxMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0tNT0QgaXMgbm90IHNldAorCisjCisjIEJsb2NrIGxheWVyCisjCisjIENPTkZJR19MQkQgaXMgbm90IHNldAorCisjCisjIElPIFNjaGVkdWxlcnMKKyMKK0NPTkZJR19JT1NDSEVEX05PT1A9eQorQ09ORklHX0lPU0NIRURfQVM9eQorQ09ORklHX0lPU0NIRURfREVBRExJTkU9eQorQ09ORklHX0lPU0NIRURfQ0ZRPXkKK0NPTkZJR19ERUZBVUxUX0FTPXkKKyMgQ09ORklHX0RFRkFVTFRfREVBRExJTkUgaXMgbm90IHNldAorIyBDT05GSUdfREVGQVVMVF9DRlEgaXMgbm90IHNldAorIyBDT05GSUdfREVGQVVMVF9OT09QIGlzIG5vdCBzZXQKK0NPTkZJR19ERUZBVUxUX0lPU0NIRUQ9ImFudGljaXBhdG9yeSIKK0NPTkZJR19QUENfR0VONTUwPXkKKyMgQ09ORklHX1dBTlRfRUFSTFlfU0VSSUFMIGlzIG5vdCBzZXQKKworIworIyBQbGF0Zm9ybSBzdXBwb3J0CisjCitDT05GSUdfTVBDODM0eF9TWVM9eQorQ09ORklHX01QQzgzNHg9eQorCisjCisjIEtlcm5lbCBvcHRpb25zCisjCisjIENPTkZJR19ISUdITUVNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0haXzEwMCBpcyBub3Qgc2V0CitDT05GSUdfSFpfMjUwPXkKKyMgQ09ORklHX0haXzEwMDAgaXMgbm90IHNldAorQ09ORklHX0haPTI1MAorQ09ORklHX1BSRUVNUFRfTk9ORT15CisjIENPTkZJR19QUkVFTVBUX1ZPTFVOVEFSWSBpcyBub3Qgc2V0CisjIENPTkZJR19QUkVFTV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2V0CisjIENPTkZJR19CTEtfREVWX05CRCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX1NYOCBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9SQU09eQorQ09ORklHX0JMS19ERVZfUkFNX0NPVU5UPTE2CitDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zMjc2OAorQ09ORklHX0JMS19ERVZfSU5JVFJEPXkKKyMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAorIyBDT05GSUdfQVRBX09WRVJfRVRIIGlzIG5vdCBzZXQKKworIworIyBBVEEvQVRBUEkvTUZNL1JMTCBzdXBwb3J0CisjCisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSSBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGktZGV2aWNlIHN1cHBvcnQgKFJBSUQgYW5kIExWTSkKKyMKKyMgQ09ORklHX01EIGlzIG5vdCBzZXQKKworIworIyBGdXNpb24gTVBUIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19GVVNJT04gaXMgbm90IHNldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKyMgQ09ORklHX0lFRUUxMzk0IGlzIG5vdCBzZXQKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX0kyTyBpcyBub3Qgc2V0CisKKyMKKyMgTWFjaW50b3NoIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19XSU5ERkFSTSBpcyBub3Qgc2V0CisKKyMKKyMgTmV0d29yayBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX05FVERFVklDRVM9eQorIyBDT05GSUdfRFVNTVkgaXMgbm90IHNldAorIyBDT05GSUdfQk9ORElORyBpcyBub3Qgc2V0CisjIENPTkZJR19FUV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AorQ09ORklHX05GU19WND15CisjIENPTkZJR19ORlNfRElSRUNUSU8gaXMgbm90IHNldAorIyBDT05GSUdfTkZTRCBpcyBub3Qgc2V0CitDT05GSUdfUk9PVF9ORlM9eQorQ09ORklHX0xPQ0tEPXkKK0NPTkZJR19MT0NLRF9WND15CitDT05GSUdfTkZTX0NPTU1PTj15CitDT05GSUdfU1VOUlBDPXkKK0NPTkZJR19TVU5SUENfR1NTPXkKK0NPTkZJR19SUENTRUNfR1NTX0tSQjU9eQorIyBDT05GSUdfUlBDU0VDX0dTU19TUEtNMyBpcyBub3Qgc2V0CisjIENPTkZJR19TTUJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ0lGUyBpcyBub3Qgc2V0CisjIENPTkZJR19OQ1BfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ09EQV9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19BRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfOVBfRlMgaXMgbm90IHNldAorCisjCisjIFBhcnRpdGlvbiBUeXBlcworIworQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRD15CisjIENPTkZJR19BQ09STl9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfT1NGX1BBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19BTUlHQV9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfQVRBUklfUEFSVElUSU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX01BQ19QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfTVNET1NfUEFSVElUSU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX0xETV9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfU0dJX1BBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19VTFRSSVhfUEFSVElUSU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NVTl9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfRUZ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9eQorIyBDT05GSUdfRFVNTVkgaXMgbm90IHNldAorIyBDT05GSUdfQk9ORElORyBpcyBub3Qgc2V0CisjIENPTkZJR19FUVVBTElaRVIgaXMgbm90IHNldAorIyBDT05GSUdfVFVOIGlzIG5vdCBzZXQKKworIworIyBBUkNuZXQgZGV2aWNlcworIworIyBDT05GSUdfQVJDTkVUIGlzIG5vdCBzZXQKKworIworIyBQSFkgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1BIWUxJQiBpcyBub3Qgc2V0CisKKyMKKyMgRXRoZXJuZXQgKDEwIG9yIDEwME1iaXQpCisjCitDT05GSUdfTkVUX0VUSEVSTkVUPXkKK0NPTkZJR19NSUk9eQorQ09ORklHX01BQ0U9eQorIyBDT05GSUdfTUFDRV9BQVVJX1BPUlQgaXMgbm90IHNldAorQ09ORklHX0JNQUM9eQorIyBDT05GSUdfSEFQUFlNRUFMIGlzIG5vdCBzZXQKK0NPTkZJR19TVU5HRU09eQorIyBDT05GSUdfQ0FTU0lOSSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfVkVORE9SXzNDT00gaXMgbm90IHNldAorCisjCisjIFR1bGlwIGZhbWlseSBuZXR3b3JrIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ORVRfVFVMSVAgaXMgbm90IHNldAorIyBDT05GSUdfSFAxMDAgaXMgbm90IHNldAorQ09ORklHX05FVF9QQ0k9eQorQ09ORklHX1BDTkVUMzI9eQorIyBDT05GSUdfQU1EODExMV9FVEggaXMgbm90IHNldAorIyBDT05GSUdfQURBUFRFQ19TVEFSRklSRSBpcyBub3Qgc2V0CisjIENPTkZJR19CNDQgaXMgbm90IHNldAorIyBDT05GSUdfRk9SQ0VERVRIIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RHUlMgaXMgbm90IHNldAorIyBDT05GSUdfRUVQUk8xMDAgaXMgbm90IHNldAorIyBDT05GSUdfRTEwMCBpcyBub3Qgc2V0CisjIENPTkZJR19GRUFMTlggaX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IHNldAorIyBDT05GSUdfQUlST19DUyBpcyBub3Qgc2V0CisjIENPTkZJR19QQ01DSUFfV0wzNTAxIGlzIG5vdCBzZXQKKworIworIyBQcmlzbSBHVC9EdWV0dGUgODAyLjExKGEvYi9nKSBQQ0kvQ2FyZGJ1cyBzdXBwb3J0CisjCitDT05GSUdfUFJJU001ND1tCisjIENPTkZJR19IT1NUQVAgaXMgbm90IHNldAorQ09ORklHX05FVF9XSVJFTEVTUz15CisKKyMKKyMgUENNQ0lBIG5ldHdvcmsgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX05FVF9QQ01DSUEgaXMgbm90IHNldAorCisjCisjIFdhbiBpbnRlcmZhY2VzCisjCisjIENPTkZJR19XQU4gaXMgbm90IHNldAorIyBDT05GSUdfRkRESSBpcyBub3Qgc2V0CisjIENPTkZJR19ISVBQSSBpcyBub3Qgc2V0CitDT05GSUdfUFBQPXkKK0NPTkZJR19QUFBfTVVMVElMSU5LPXkKKyMgQ09ORklHX1BQUF9GSUxURVIgaXMgbm90IHNldAorQ09ORklHX1BQUF9BU1lOQz15CitDT05GSUdfUFBQX1NZTkNfVFRZPW0KK0NPTkZJR19QUFBfREVGTEFURT15CitDT05GSUdfUFBQX0JTRENPTVA9bQorIyBDT05GSUdfUFBQX01QUEUgaXMgbm90IHNldAorIyBDT05GSUdfUFBQT0UgaXMgbm90IHNldAorIyBDT05GSUdfU0xJUCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfRkMgaXMgbm90IHNldAorIyBDT05GSUdfU0hBUEVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVENPTlNPTEUgaXMgbm90IHNldAorIyBDT05GSUdfTkVUUE9MTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfUE9MTF9DT05UUk9MTEVSIGlzIG5vdCBzZXQKKworIworIyBJU0ROIHN1YnN5c3RlbQorIworIyBDT05GSUdfSVNETiBpcyBub3Qgc2V0CisKKyMKKyMgVGVsZXBob255IFN1cHB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DwgMzIpIHwgKihjZWxsKyspOworCXJldHVybiByOworfQorCisvKiBDYWxsYmFja3MgZm9yIGJ1cyBzcGVjaWZpYyB0cmFuc2xhdG9ycyAqLworc3RydWN0IG9mX2J1cyB7CisJY29uc3QgY2hhcgkqbmFtZTsKKwljb25zdCBjaGFyCSphZGRyZXNzZXM7CisJaW50CQkoKm1hdGNoKShzdHJ1Y3QgZGV2aWNlX25vZGUgKnBhcmVudCk7CisJdm9pZAkJKCpjb3VudF9jZWxscykoc3RydWN0IGRldmljZV9ub2RlICpjaGlsZCwKKwkJCQkgICAgICAgaW50ICphZGRyYywgaW50ICpzaXplYyk7CisJdTY0CQkoKm1hcCkodTMyICphZGRyLCB1MzIgKnJhbmdlLCBpbnQgbmEsIGludCBucywgaW50IHBuYSk7CisJaW50CQkoKnRyYW5zbGF0ZSkodTMyICphZGRyLCB1NjQgb2Zmc2V0LCBpbnQgbmEpOworCXVuc2lnbmVkIGludAkoKmdldF9mbGFncykodTMyICphZGRyKTsKK307CisKKworLyoKKyAqIERlZmF1bHQgdHJhbnNsYXRvciAoZ2VuZXJpYyBidXMpCisgKi8KKworc3RhdGljIHZvaWQgb2ZfYnVzX2RlZmF1bHRfY291bnRfY2VsbHMoc3RydWN0IGRldmljZV9ub2RlICpkZXYsCisJCQkJICAgICAgIGludCAqYWRkcmMsIGludCAqc2l6ZWMpCit7CisJaWYgKGFkZHJjKQorCQkqYWRkcmMgPSBwcm9tX25fYWRkcl9jZWxscyhkZXYpOworCWlmIChzaXplYykKKwkJKnNpemVjID0gcHJvbV9uX3NpemVfY2VsbHMoZGV2KTsKK30KKworc3RhdGljIHU2NCBvZl9idXNfZGVmYXVsdF9tYXAodTMyICphZGRyLCB1MzIgKnJhbmdlLCBpbnQgbmEsIGludCBucywgaW50IHBuYSkKK3sKKwl1NjQgY3AsIHMsIGRhOworCisJY3AgPSBvZl9yZWFkX2FkZHIocmFuZ2UsIG5hKTsKKwlzICA9IG9mX3JlYWRfYWRkcihyYW5nZ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gyMCAqLworCX07CisKKwljb25zdCBsb25nIG1pbl9pZHNlbCA9IDB4MTEsIG1heF9pZHNlbCA9IDB4MjAsIGlycXNfcGVyX3Nsb3QgPSA0OworCXJldHVybiBQQ0lfSVJRX1RBQkxFX0xPT0tVUDsKK30KKworc3RhdGljIGludAorbXBjODN4eF9leGNsdWRlX2RldmljZSh1X2NoYXIgYnVzLCB1X2NoYXIgZGV2Zm4pCit7CisJaWYgKGJ1cyA9PSAwICYmIFBDSV9TTE9UKGRldmZuKSA9PSAwKQorCQlyZXR1cm4gUENJQklPU19ERVZJQ0VfTk9UX0ZPVU5EOworCWlmIChtcGM4M3h4X3BjaTJfYnVzbm8pCisJCWlmIChidXMgPT0gKG1wYzgzeHhfcGNpMl9idXNubykgJiYgUENJX1NMT1QoZGV2Zm4pID09IDApCisJCQlyZXR1cm4gUENJQklPU19ERVZJQ0VfTk9UX0ZPVU5EOworCXJldHVybiBQQ0lCSU9TX1NVQ0NFU1NGVUw7Cit9CisjZW5kaWYgLyogQ09ORklHX1BDSSAqLworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBTZXR1cCB0aGUgYXJjaGl0ZWN0dXJlCisgKgorICovCitzdGF0aWMgdm9pZCBfX2luaXQKK21wYzgzNHhfc3lzX3NldHVwX2FyY2godm9pZCkKK3sKKwlzdHJ1Y3QgZGV2aWNlX25vZGUgKm5wOworCisJaWYgKHBwY19tZC5wcm9ncmVzcykKKwkJcHBjX21kLnByb2dyZXNzKCJtcGM4MzR4X3N5c19zZXR1cF9hcmNoKCkiLCAwKTsKKworCW5wID0gb2ZfZmluZF9ub2RlX2J5X3R5cGUoTlVMTCwgImNwdSIpOworCWlmIChucCAhPSAwKSB7CisJCXVuc2lnbmVkIGludCAqZnAgPSAoaW50ICopIGdldF9wcm9wZXJ0eShucCwgImNsb2NrLWZyZXF1ZW5jeSIsIE5VTEwpOwor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ywgbW9kZSwgY3R4KTsKKwlpZiAocmV0KQorCQlnb3RvIG91dF9mcmVlX2N0eDsKKworCWRfaW5zdGFudGlhdGUoZGVudHJ5LCBpbm9kZSk7CisJZGdldChkZW50cnkpOworCWRpci0+aV9ubGluaysrOworCWRlbnRyeS0+ZF9pbm9kZS0+aV9ubGluaysrOworCWdvdG8gb3V0OworCitvdXRfZnJlZV9jdHg6CisJcHV0X3NwdV9jb250ZXh0KGN0eCk7CitvdXRfaXB1dDoKKwlpcHV0KGlub2RlKTsKK291dDoKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgaW50IHNwdWZzX2NvbnRleHRfb3BlbihzdHJ1Y3QgZGVudHJ5ICpkZW50cnksIHN0cnVjdCB2ZnNtb3VudCAqbW50KQoreworCWludCByZXQ7CisJc3RydWN0IGZpbGUgKmZpbHA7CisKKwlyZXQgPSBnZXRfdW51c2VkX2ZkKCk7CisJaWYgKHJldCA8IDApIHsKKwkJZHB1dChkZW50cnkpOworCQltbnRwdXQobW50KTsKKwkJZ290byBvdXQ7CisJfQorCisJZmlscCA9IGRlbnRyeV9vcGVuKGRlbnRyeSwgbW50LCBPX1JET05MWSk7CisJaWYgKElTX0VSUihmaWxwKSkgeworCQlwdXRfdW51c2VkX2ZkKHJldCk7CisJCXJldCA9IFBUUl9FUlIoZmlscCk7CisJCWdvdG8gb3V0OworCX0KKworCWZpbHAtPmZfb3AgPSAmc3B1ZnNfY29udGV4dF9mb3BzOworCWZkX2luc3RhbGwocmV0LCBmaWxwKTsKK291dDoKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgc3RydWN0IGZpbGVfc3lzdGVtX3R5cGUgc3B1ZnNfdHlwZTsKKworbG9uZyBzcHVmc19jcmVhdGVfdGhyZWFkKHN0cnVjdCBuYW1laWRhdGEgKm5kLAorCQkJIHVuc2lnbmVkIGludCBmbGFncywgbW9kZV90IG1vZGUpCit7CisJc3RydWN0IGRlbnRyeSAqZGVudHJ5OworCWludCByZXQ7CisK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lVMTCkgeworCQlwcmludGsoS0VSTl9FUlIgImxvd19pMmM6IENhbid0IG1hcCByZWdpc3RlcnMgZm9yICVzXG4iLAorCQkgICAgICAgbnAtPmZ1bGxfbmFtZSk7CisJCWtmcmVlKGhvc3QpOworCQlyZXR1cm4gTlVMTDsKKwl9CisKKwkvKiBNYWtlIHN1cmUgSVJBIGlzIGRpc2FibGVkICovCisJa3dfd3JpdGVfcmVnKHJlZ19pZXIsIDApOworCisJLyogUmVxdWVzdCBjaGlwIGludGVycnVwdCAqLworCWlmIChyZXF1ZXN0X2lycShob3N0LT5pcnEsIGt3X2kyY19pcnEsIFNBX1NISVJRLCAia2V5d2VzdCBpMmMiLCBob3N0KSkKKwkJaG9zdC0+aXJxID0gTk9fSVJROworCisJcHJpbnRrKEtFUk5fSU5GTyAiS2V5V2VzdCBpMmMgQDB4JTA4eCBpcnEgJWQgJXNcbiIsCisJICAgICAgICphZGRycCwgaG9zdC0+aXJxLCBucC0+ZnVsbF9uYW1lKTsKKworCXJldHVybiBob3N0OwogfQogCisKK3N0YXRpYyB2b2lkIF9faW5pdCBrd19pMmNfYWRkKHN0cnVjdCBwbWFjX2kyY19ob3N0X2t3ICpob3N0LAorCQkJICAgICAgc3RydWN0IGRldmljZV9ub2RlICpjb250cm9sbGVyLAorCQkJICAgICAgc3RydWN0IGRldmljZV9ub2RlICpidXNub2RlLAorCQkJICAgICAgaW50IGNoYW5uZWwpCit7CisJc3RydWN0IHBtYWNfaTJjX2J1cyAqYnVzOworCisJYnVzID0ga3phbGxvYyhzaXplb2Yoc3RydWN0IHBtYWNfaTJjX2J1cyksIEdGUF9LRVJORUwpOworCWlmIChidXMgPT0gTlVMTCkKKwkJcmV0dXJuOworCisJYnVzLT5jb250cm9sbGVyID0gb2Zfbm9kZV9nZXQoY29udHJvbGxlcik7CisJYnVzLT5idXNub2RlID0gb2Zfbm9kZV9nZXQoYnVzbm9kZSk7CisJYnVzLT50eXBlID0gcG1hY19pMmNfYnVzX2tleXdlc3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IG1hc3RlciA/IDEyOCA6IDEyNDsKKwljb25zdCBjaGFyICpuYW1lID0gbWFzdGVyID8gIiBNUElDIDEgICAiIDogIiBNUElDIDIgICAiOworCXN0cnVjdCByZXNvdXJjZSByOworCXN0cnVjdCBtcGljICptcGljOworCXVuc2lnbmVkIGludCBmbGFncyA9IG1hc3RlciA/IE1QSUNfUFJJTUFSWSA6IDA7CisJaW50IHJjOworCisJcmMgPSBvZl9hZGRyZXNzX3RvX3Jlc291cmNlKG5wLCAwLCAmcik7CisJaWYgKHJjKQorCQlyZXR1cm4gTlVMTDsKKworCXBtYWNfY2FsbF9mZWF0dXJlKFBNQUNfRlRSX0VOQUJMRV9NUElDLCBucCwgMCwgMCk7CisKKwlwcm9tX2dldF9pcnFfc2Vuc2VzKHNlbnNlcywgb2Zmc2V0LCBvZmZzZXQgKyBjb3VudCk7CisKKwlmbGFncyB8PSBNUElDX1dBTlRTX1JFU0VUOworCWlmIChnZXRfcHJvcGVydHkobnAsICJiaWctZW5kaWFuIiwgTlVMTCkpCisJCWZsYWdzIHw9IE1QSUNfQklHX0VORElBTjsKKworCS8qIFByaW1hcnkgQmlnIEVuZGlhbiBtZWFucyBIVCBpbnRlcnJ1cHRzLiBUaGlzIGlzIHF1aXRlIGRvZGd5CisJICogYnV0IHdvcmtzIHVudGlsIEkgZmluZCBhIGJldHRlciB3YXkKKwkgKi8KKwlpZiAobWFzdGVyICYmIChmbGFncyAmIE1QSUNfQklHX0VORElBTikpCisJCWZsYWdzIHw9IE1QSUNfQlJPS0VOX1UzOworCisJbXBpYyA9IG1waWNfYWxsb2Moci5zdGFydCwgZmxhZ3MsIDAsIG9mZnNldCwgY291bnQsIG1hc3RlciA/IDI1MiA6IDAsCisJCQkgIHNlbnNlcywgY291bnQsIG5hbWUpOworCWlmIChtcGljID09IE5VTEwpCisJCXJldHVybiBOVUxMOworCisJbXBpY19pbml0KG1waWMpOworCisJcmV0dXJuIG1waWM7CisgfQorCitzdGF0aWMgaW50IF9faW5p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0CisjIENPTkZJR19JUkRBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lFRUU4MDIxMSBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKyMgQ09ORklHX0NPTk5FQ1RPUiBpcyBub3Qgc2V0CisKKyMKKyMgTWVtb3J5IFRlY2hub2xvZ3kgRGV2aWNlcyAoTVREKQorIworQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorQ09ORklHX01URF9DT05DQVQ9eQorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ01ETElORV9QQVJUUz15CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURF9SRVRSWT0wCisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIWVNNQVAgaXMgbm90IHNldAorQ09ORklHX01URF9UUU04NXh4PXkKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9QTUM1NTEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTEtNVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0ZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19DUFFfREEgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0NQUV9DSVNTX0RBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfREFDOTYwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfVU1FTSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfTE9PUD15CisjIENPTkZJR19CTEtfREVWX0NSWVBUT0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9TWDggaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzI3NjgKK0NPTkZJR19CTEtfREVWX0lOSVRSRD15CisjIENPTkZJR19DRFJPTV9QS1RDRFZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUQV9PVkVSX0VUSCBpcyBub3Qgc2V0CisKKyMKKyMgQVRBL0FUQVBJL01GTS9STEwgc3VwcG9ydAorIworQ09ORklHX0lERT15CitDT05GSUdfQkxLX0RFVl9JREU9eQorCisjCisjIFBsZWFzZSBzZWUgRG9jdW1lbnRhdGlvbi9pZGUudHh0IGZvciBoZWxwL2luZm8gb24gSURFIGRyaXZlcworIworIyBDT05GSUdfQkxLX0RFVl9JREVfU0FUQSBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9JREVESVNLPXkKKyMgQ09ORklHX0lERURJU0tfTVVMVElfTU9ERSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUNEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFVEFQRSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUZMT1BQWSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CisKKyMKKyMgSURFIGNoaXBzZXQgc3VwcG9ydC9idWdmaXhlcworIworQ09ORklHX0lERV9HRU5FUklDPXkKK0NPTkZJR19CTEtfREVWX0lERVBDST15CitDT05GSUdfSURFUENJX1NIQVJFX0lSUT15CisjIENPTkZJR19CTEtfREVWX09GRkJPQVJEIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX0dFTkVSSUM9eQorIyBDT05GSUdfQkxLX0RFVl9PUFRJNjIxIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfU0w4M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FIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNldAorIyBDT05GSUdfUFBQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NMSVAgaXMgbm90IHNldAorIyBDT05GSUdfU0hBUEVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVENPTlNPTEUgaXMgbm90IHNldAorIyBDT05GSUdfTkVUUE9MTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfUE9MTF9DT05UUk9MTEVSIGlzIG5vdCBzZXQKKworIworIyBJU0ROIHN1YnN5c3RlbQorIworIyBDT05GSUdfSVNETiBpcyBub3Qgc2V0CisKKyMKKyMgVGVsZXBob255IFN1cHBvcnQKKyMKKyMgQ09ORklHX1BIT05FIGlzIG5vdCBzZXQKKworIworIyBJbnB1dCBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX0lOUFVUPXkKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCisjIENPTkZJR19JTlBVVF9NT1VTRURFViBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UT1VDSFNDUkVFTiBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NSVNDIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBJL08gcG9ydHMKKyMKKyMgQ09ORklHX1NFUklPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dBTUVQT1JUIGlzIG5vdCBzZXQKKworIworIyBDaGFyYWN0ZXIgZGV2aWNlcworIworIyBDT05GSUdfVlQgaXMgbm90IHNldAorIyBDT05GSUdfU0VSSUFMX05PTlNUQU5EQVJEIGlzIG5vdCBzZXQKKworIworIyBTZXJpYWwgZHJpdmVycworIworQ09ORklHX1NFUklBTF84MjUwPXkKK0NPTkZJR19TRVJJQUxfODI1MF9DT05TT0xFPXkKK0NPTkZJR19TRVJJQUxfODI1MF9OUl9VQVJUUz00CisjIENPTkZJR19TRVJJQUxfODI1MF9FWFRFTkRFRCBpcyBub3Qgc2V0CisKKyMKKyMgTm9uLTgyNTAgc2VyaWFsIHBvcnQgc3VwcG9ydAorIworQ09ORklHX1NFUklBTF9DT1JFPXkKK0NPTkZJR19TRVJJQUxfQ09SRV9DT05TT0xFPXkKKyMgQ09ORklHX1NFUklBTF9KU00gaXMgbm90IHNldAorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisjIENPTkZJR19OVlJBTSBpcyBub3Qgc2V0CitDT05GSUdfR0VOX1JUQz15CisjIENPTkZJR19HRU5fUlRDX1ggaXMgbm90IHNldAorIyBDT05GSUdfRFRMSyBpcyBub3Qgc2V0CisjIENPTkZJR19SMzk2NCBpcyBub3Qgc2V0CisjIENPTkZJ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Vsc3BhY2UgbGlua2VyCisjCisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorCisjCisjIE1lbW9yeSBUZWNobm9sb2d5IERldmljZXMgKE1URCkKKyMKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ09OQ0FUPXkKK0NPTkZJR19NVERfUEFSVElUSU9OUz15CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CitDT05GSUdfTVREX0NGSV9BTURTVERfUkVUUlk9MAorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFlTTUFQIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfVFFNODV4eD15CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfUE1DNTUxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxLTVREIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwM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NPTkZJR19JREU9eQorQ09ORklHX0JMS19ERVZfSURFPXkKKworIworIyBQbGVhc2Ugc2VlIERvY3VtZW50YXRpb24vaWRlLnR4dCBmb3IgaGVscC9pbmZvIG9uIElERSBkcml2ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfSURFX1NBVEEgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRElTSz15CisjIENPTkZJR19JREVESVNLX01VTFRJX01PREUgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9JREVDRCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERVRBUEUgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9JREVGTE9QUFkgaXMgbm90IHNldAorIyBDT05GSUdfSURFX1RBU0tfSU9DVEwgaXMgbm90IHNldAorCisjCisjIElERSBjaGlwc2V0IHN1cHBvcnQvYnVnZml4ZXMKKyMKK0NPTkZJR19JREVfR0VORVJJQz15CitDT05GSUdfQkxLX0RFVl9JREVQQ0k9eQorQ09ORklHX0lERVBDSV9TSEFSRV9JUlE9eQorIyBDT05GSUdfQkxLX0RFVl9PRkZCT0FSRCBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9HRU5FUklDPXkKKyMgQ09ORklHX0JMS19ERVZfT1BUSTYyMSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX1NMODJDMTA1IGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX0lERURNQV9QQ0k9eQorIyBDT05GSUdfQkxLX0RFVl9JREVETUFfRk9SQ0VEIGlzIG5vdCBzZXQKK0NPTkZJR19JREVETUFfUENJX0FVVE89eQorIyBDT05GSUdfSURFRE1BX09OTFlESVNLIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQUVDNjJYWCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0FMSTE1WDMgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9BTUQ3NFhYIGlzI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m90IHNldAorIyBDT05GSUdfVklBX1JISU5FIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZTX0VORVQgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMDAwIE1iaXQpCisjCisjIENPTkZJR19BQ0VOSUMgaXMgbm90IHNldAorIyBDT05GSUdfREwySyBpcyBub3Qgc2V0CisjIENPTkZJR19FMTAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19OUzgzODIwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hBTUFDSEkgaXMgbm90IHNldAorIyBDT05GSUdfWUVMTE9XRklOIGlzIG5vdCBzZXQKKyMgQ09ORklHX1I4MTY5IGlzIG5vdCBzZXQKKyMgQ09ORklHX1NJUzE5MCBpcyBub3Qgc2V0CisjIENPTkZJR19TS0dFIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NLOThMSU4gaXMgbm90IHNldAorIyBDT05GSUdfVklBX1ZFTE9DSVRZIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RJR09OMyBpcyBub3Qgc2V0CisjIENPTkZJR19CTlgyIGlzIG5vdCBzZXQKK0NPTkZJR19HSUFORkFSPXkKK0NPTkZJR19HRkFSX05BUEk9eQorCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworIyBDT05GSUdfQ0hFTFNJT19UMSBpcyBub3Qgc2V0CisjIENPTkZJR19JWEdCIGlzIG5vdCBzZXQKKyMgQ09ORklHX1MySU8gaXMgbm90IHNldAorCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworIyBDT05GSUdfVFIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNldAorIyBDT05GSUdfUFBQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NMSVAgaXMgbm90IHNldAorIyBDT05GSUdfU0hBUEVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVENPTlNPTEUgaXMgbm90IHNldAorIyBDT05GSUdfTkVUUE9MTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfUE9MTF9DT05UUk9MTEVSIGlzIG5vdCBzZXQKKworIworIyBJU0ROIHN1YnN5c3RlbQorIworIyBDT05GSUdfSVNETiBpcyBub3Qgc2V0CisKKyMKKyMgVGVsZXBob255IFN1cHBvcnQKKyMKKyMgQ09ORklHX1BIT05FIGlzIG5vdCBzZXQKKworIworIyBJbnB1dCBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX0lOUFVUPXkKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCisjIENPTkZJR19JTlBVVF9NT1VTRURFViBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UT1VDSFNDUkVFTiBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NSVNDIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBJL08gcG9ydHMKKyMKKyMgQ09ORklHX1NFUklPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dBTUVQT1JUIGlzIG5vdCBzZXQKKworIworIyBDaGFyYWN0Z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MgQ09ORklHX1NFTlNPUlNfTE04NyBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX0xNOTAgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19MTTkyIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfTUFYMTYxOSBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1BDODczNjAgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19TSVM1NTk1IGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfU01TQzQ3TTEgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19TTVNDNDdCMzk3IGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfVklBNjg2QSBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1c4Mzc4MUQgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM3OTJEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfVzgzTDc4NVRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfVzgzNjI3SEYgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM2MjdFSEYgaXMgbm90IHNldAorQ09ORklHX0hXTU9OX0RFQlVHX0NISVA9eQorCisjCisjIE1pc2MgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgQ2FwYWJpbGl0aWVzIFBvcnQgZHJpdmVycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjC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ENPTkZJR19LRVhFQyBpcyBub3Qgc2V0CisjIENPTkZJR19DUFVfRlJFUSBpcyBub3Qgc2V0CisjIENPTkZJR19XQU5UX0VBUkxZX1NFUklBTCBpcyBub3Qgc2V0CitDT05GSUdfUFBDX0dFTjU1MD15CitDT05GSUdfODV4eD15CitDT05GSUdfUFBDX0lORElSRUNUX1BDSV9CRT15CisKKyMKKyMgRnJlZXNjYWxlIDg1eHggb3B0aW9ucworIworIyBDT05GSUdfTVBDODU0MF9BRFMgaXMgbm90IHNldAorIyBDT05GSUdfTVBDODU0OF9DRFMgaXMgbm90IHNldAorIyBDT05GSUdfTVBDODU1NV9DRFMgaXMgbm90IHNldAorIyBDT05GSUdfTVBDODU2MF9BRFMgaXMgbm90IHNldAorIyBDT05GSUdfU0JDODU2MCBpcyBub3Qgc2V0CisjIENPTkZJR19TVFhfR1AzIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RRTTg1NDAgaXMgbm90IHNldAorIyBDT05GSUdfVFFNODU0MSBpcyBub3Qgc2V0CitDT05GSUdfVFFNODU1NT15CisjIENPTkZJR19UUU04NTYwIGlzIG5vdCBzZXQKK0NPTkZJR19NUEM4NTU1PXkKKworIworIyBQbGF0Zm9ybSBvcHRpb25zCisjCitDT05GSUdfQ1BNMj15CisjIENPTkZJR19QQ19LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19ISUdITUVNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0haXzEwMCBpcyBub3Qgc2V0CitDT05GSUdfSFpfMjUwPXkKKyMgQ09ORklHX0haXzEwMDAgaXMgbm90IHNldAorQ09ORklHX0haPTI1MAorQ09ORklHX1BSRUVNUFRfTk9ORT15CisjIENPTkZJR19QUkVFTVBUX1ZPTFVOVEFSWSBpcyBub3Qgc2V0CisjIENPTkZJR19QUkVFTVBUIGlzIG5vdCBzZXQKK0NPTkZJR19TRUxFQ1RfTUVNT1JZX01PREVMPXkKK0NPTkZJR19GTEFUTUVNX01BTlVBTD15Cis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EPXkKKyMgQ09ORklHX0ZXX0xPQURFUiBpcyBub3Qgc2V0CisKKyMKKyMgQ29ubmVjdG9yIC0gdW5pZmllZCB1c2Vyc3BhY2UgPC0+IGtlcm5lbHNwYWNlIGxpbmtlcgorIworIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKKworIworIyBNZW1vcnkgVGVjaG5vbG9neSBEZXZpY2VzIChNVEQpCisjCitDT05GSUdfTVREPXkKKyMgQ09ORklHX01URF9ERUJVRyBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NPTkNBVD15CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9DRklfQU1EU1REX1JFVFJZPTAKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1RRTTg1eHg9eQorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1BNQzU1MSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMS01URCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09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ORklHX0lERURNQV9BVVRPPXkKKyMgQ09ORklHX0JMS19ERVZfSEQgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSSBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGktZGV2aWNlIHN1cHBvcnQgKFJBSUQgYW5kIExWTSkKKyMKKyMgQ09ORklHX01EIGlzIG5vdCBzZXQKKworIworIyBGdXNpb24gTVBUIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19GVVNJT04gaXMgbm90IHNldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKyMgQ09ORklHX0lFRUUxMzk0IGlzIG5vdCBzZXQKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX0kyTyBpcyBub3Qgc2V0CisKKyMKKyMgTWFjaW50b3NoIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19XSU5ERkFSTSBpcyBub3Qgc2V0CisKKyMKKyMgTmV0d29yayBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX05FVERFVklDRVM9eQorIyBDT05GSUdfRFVNTVkgaXMgbm90IHNldAorIyBDT05GSUdfQk9ORElORyBpcyBub3Qgc2V0CisjIENPTkZJR19FUVVBTElaRVIgaXMgbm90IHNldAorIyBDT05GSUdfVFVOIGlzIG5vdCBzZXQKKworIworIyBBUkNuZXQgZGV2aWNlcworIworIyBDT05GSUdfQVJDTkVUIGlzIG5vdCBzZXQKKworIworIyBQSFkgZGV2aWNlIHN1cHBvcnQKKyMKK0NPTkZJR19QSFlMSUI9eQorCisjCisjIE1JSSBQSFkgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01BUlZFTExfUEhZIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RBVklDT01fUEhZIGlzIG5vdCBzZXQKKyMgQ09ORklHX1FTRU1JX1BIWSBpcyBub3Qgc2V0CisjIENPTkZJR19MWFRfUEhZIGlzIG5vdCBzZXQKKyMgQ09ORklHX0NJQ0FEQV9QSFkgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMCBvciAxMDBNYml0KQorIworQ09ORklHX05FVF9FVEhFUk5FVD15CitDT05GSUdfTUlJPXkKKyMgQ09ORklHX0hBUFBZTUVBTCBpcyBub3Qgc2V0CisjIENPTkZJR19TVU5HRU0gaXMgbm90IHNldAorIyBDT05GSUdfQ0FTU0lOSSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfVkVORE9SXzNDT00gaXMgbm90IHNldAorCisjCisjIFR1bGlwIGZhbWlseSBuZXR3b3JrIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ORVRfVFVMSVAgaXMgbm90IHNldAorIyBDT05GSUdfSFAxMDAgaXMgbm90IHNldAorQ09ORklHX05FVF9QQ0k9eQorIyBDT05GSUdfUENORVQzMiBpcyBub3Qgc2V0CisjIENPTkZJR19BTUQ4MTExX0VUSCBpcyBub3Qgc2V0CisjIENPTkZJR19BREFQVEVDX1NUQVJGSVJFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0I0NCBpcyBub3Qgc2V0CisjIENPTkZJR19GT1JDRURFVEggaXMgbm90IHNldAorIyBDT05GSUdfREdSUyBpcyBub3Qgc2V0CisjIENPTkZJR19FRVBSTzEwMCBpcyBub3Qgc2V0CitDT05GSUdfRTEwMD15CisjIENPTkZJR19GRUFMTlggaXMgbm90IHNldAorIyBDT05GSUdfTkFUU0VNSSBpcyBub3Qgc2V0CisjIENPTkZJR19ORTJLX1BDSSBpcyBub3Qgc2V0CisjIENPTkZJR184MTM5Q1AgaXMgbm90IHNldAorIyBDT05GSUdfODEzOVRPTyBpcyBub3Qgc2V0CisjIENPTkZJR19TSVM5MDAgaXMgbm90IHNldAorIyBDT05GSUdfRVBJQzEwMCBpcyBub3Qgc2V0CisjIENPTkZJR19TVU5EQU5DRS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gaXMgbm90IHNldAorCisjCisjIERDQ1AgQ29uZmlndXJhdGlvbiAoRVhQRVJJTUVOVEFMKQorIworIyBDT05GSUdfSVBfRENDUCBpcyBub3Qgc2V0CisKKyMKKyMgU0NUUCBDb25maWd1cmF0aW9uIChFWFBFUklNRU5UQUwpCisjCisjIENPTkZJR19JUF9TQ1RQIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUTSBpcyBub3Qgc2V0CisjIENPTkZJR19CUklER0UgaXMgbm90IHNldAorIyBDT05GSUdfVkxBTl84MDIxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX0RJVkVSVCBpcyBub3Qgc2V0CisjIENPTkZJR19FQ09ORVQgaXMgbm90IHNldAorIyBDT05GSUdfV0FOX1JPVVRFUiBpcyBub3Qgc2V0CisKKyMKKyMgUW9TIGFuZC9vciBmYWlyIHF1ZXVlaW5nCisjCisjIENPTkZJR19ORVRfU0NIRUQgaXMgbm90IHNldAorCisjCisjIE5ldHdvcmsgdGVzdGluZworIworIyBDT05GSUdfTkVUX1BLVEdFTiBpcyBub3Qgc2V0CisjIENPTkZJR19IQU1SQURJTyBpcyBub3Qgc2V0CisjIENPTkZJR19JUkRBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lFRUU4MDIxMSBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKyMgQ09ORklHX0NPTk5FQ1RPUiBpcyBub3Qgc2V0CisKKyMKKyMgTWVtb3J5IFRlY2hub2xvZ3kgRGV2aWNlcyAoTVREKQorIworQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorQ09ORklHX01URF9DT05DQVQ9eQorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ01ETElORV9QQVJUUz15CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURF9SRVRSWT0wCisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIWVNNQVAgaXMgbm90IHNldAorQ09ORklHX01URF9UUU04NXh4PXkKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9QTUM1NTEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTEtNVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0ZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19DUFFfREEgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0NQUV9DSVNTX0RBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfREFDOTYwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfVU1FTSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfTE9PUD15CisjIENPTkZJR19CTEtfREVWX0NSWVBUT0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9TWDggaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzI3NjgKK0NPTkZJR19CTEtfREVWX0lOSVRSRD15CisjIENPTkZJR19DRFJPTV9QS1RDRFZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUQV9PVkVSX0VUSCBpcyBub3Qgc2V0CisKKyMKKyMgQVRBL0FUQVBJL01GTS9STEwgc3VwcG9ydAorIworQ09ORklHX0lERT15CitDT05GSUdfQkxLX0RFVl9JREU9eQorCisjCisjIFBsZWFzZSBzZWUgRG9jdW1lbnRhdGlvbi9pZGUudHh0IGZvciBoZWxwL2luZm8gb24gSURFIGRyaXZlcworIworIyBDT05GSUdfQkxLX0RFVl9JREVfU0FUQSBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9JREVESVNLPXkKKyMgQ09ORklHX0lERURJU0tfTVVMVElfTU9ERSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUNEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFVEFQRSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUZMT1BQWSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CisKKyMKKyMgSURFIGNoaXBzZXQgc3VwcG9ydC9idWdmaXhlcworIworQ09ORklHX0lERV9HRU5FUklDPXkKK0NPTkZJR19CTEtfREVWX0lERVBDST15CitDT05GSUdfSURFUENJX1NIQVJFX0lSUT15CisjIENPTkZJR19CTEtfREVWX09GRkJPQVJEIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX0dFTkVSSUM9eQorIyBDT05GSUdfQkxLX0RFVl9PUFRJNjIxIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfU0w4MkMxMDUgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRE1BX1BDST15CisjIENPTkZJR19CTEtfREVWX0lERURNQV9GT1JDRUQgaXMgbm90IHNldAorQ09ORklHX0lERURNQV9QQ0lfQVVUTz15CisjIENPTkZJR19JREVETUFfT05MWURJU0sgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9BRUM2MlhYIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQ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VkaWEgQ2FwYWJpbGl0aWVzIFBvcnQgZHJpdmVycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CitDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0k9eQorIyBDT05GSUdfVVNCIGlzIG5vdCBzZXQKKworIworIyBOT1RFOiBVU0JfU1RPUkFHRSBlbmFibGVzIFNDU0ksIGFuZCAnU0NTSSBkaXNrIHN1cHBvcnQnCisjCisKKyMKKyMgVVNCIEdhZGdldCBTdXBwb3J0CisjCisjIENPTkZJR19VU0JfR0FER0VUIGlzIG5vdCBzZXQKKworIworIyBNTUMvU0QgQ2FyZCBzdXBwb3J0CisjCisjIENPTkZJR19NTUMgaXMgbm90IHNldAorCisjCisjIEluZmluaUJhbmQgc3VwcG9ydAorIworIyBDT05GSUdfSU5GSU5JQkFORCBpcyBub3Qgc2V0CisKKyMKKyMgU04gRGV2aWNlcworIworCisjCisjIEZpbGUgc3lzdGVtcworIworQ09ORklHX0VYVDJfRlM9eQorIyBDT05GSUdfRVhUMl9GU19YQVRUUiBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQyX0ZTX1hJUCBpcyBub3Qgc2V0CitDT05GSUdfRVhUM19GUz15CitDT05GSUdfRVhUM19GU19YQVRUUj15CisjIENPTkZJR19FWFQzX0ZTX1BPU0lYX0FDTCBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQzX0ZTX1NFQ1VSSVRZI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0lfREVWSUNFX0lEX1ZJQV84MkM1ODZfMiwgTlVMTCkpKSB7CiAgICAgICAgICAgICAgICAgZGV2LT5pcnEgPSAxMDsKICAgICAgICAgICAgICAgICBwY2lfd3JpdGVfY29uZmlnX2J5dGUoZGV2LCBQQ0lfSU5URVJSVVBUX0xJTkUsIDEwKTsKKwkJcGNpX2Rldl9wdXQoZGV2KTsKICAgICAgICAgfQogCi0gICAgICAgIGlmICgoZGV2ID0gcGNpX2ZpbmRfZGV2aWNlKFBDSV9WRU5ET1JfSURfVklBLAorCWlmICgoZGV2ID0gcGNpX2dldF9kZXZpY2UoUENJX1ZFTkRPUl9JRF9WSUEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUENJX0RFVklDRV9JRF9WSUFfODJDNTg2XzIsIGRldikpKSB7CiAgICAgICAgICAgICAgICAgZGV2LT5pcnEgPSAxMTsKICAgICAgICAgICAgICAgICBwY2lfd3JpdGVfY29uZmlnX2J5dGUoZGV2LCBQQ0lfSU5URVJSVVBUX0xJTkUsIDExKTsKKwkJcGNpX2Rldl9wdXQoZGV2KTsKICAgICAgICAgfQogfQogI2VuZGlmIC8qIENPTkZJR19QQ0kgKi8KIAogVE9EQ19BTExPQygpOwogCi1zdGF0aWMgY29uc3QgY2hhciAqR0ZBUl9QSFlfMCA9ICJwaHkwOjAiOwotc3RhdGljIGNvbnN0IGNoYXIgKkdGQVJfUEhZXzEgPSAicGh5MDoxIjsKLQogLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogU2V0dXAgdGhlIGFyY2hpdGVjdHVyZQpAQCAtNDU4LDM0ICs0NTgsMzcgQEAKIAltZGF0YS0+aXJxWzJdID0gLTE7CiAJbWRhdGEtPmlycVszXSA9IC0xOwogCW1kYXRhLT5pcnFbMzFdID0gLTE7Ci0JbWRhdGEtPnBhZGRyICs9IGJpbmZvLT5iaV9pb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bNF0gPQorCQkvKgorCQkgKiAgICAgIFBDSSBJRFNFTC9JTlRQSU4tPklOVExJTkUKKwkJICogICAgICAgQSAgICAgIEIgICAgICBDICAgICAgRAorCQkgKi8KKwkJeworCQkJe1BJUlFBLCBQSVJRQiwgMCwgMH0sCisJCX07CisKKwljb25zdCBsb25nIG1pbl9pZHNlbCA9IDB4MWMsIG1heF9pZHNlbCA9IDB4MWMsIGlycXNfcGVyX3Nsb3QgPSA0OworCXJldHVybiBQQ0lfSVJRX1RBQkxFX0xPT0tVUDsKK30KKworaW50IG1wYzg1eHhfZXhjbHVkZV9kZXZpY2UodV9jaGFyIGJ1cywgdV9jaGFyIGRldmZuKQoreworCWlmIChidXMgPT0gMCAmJiBQQ0lfU0xPVChkZXZmbikgPT0gMCkKKwkJcmV0dXJuIFBDSUJJT1NfREVWSUNFX05PVF9GT1VORDsKKwllbHNlCisJCXJldHVybiBQQ0lCSU9TX1NVQ0NFU1NGVUw7Cit9CisKKyNlbmRpZiAvKiBDT05GSUdfUENJICovCisKKyNpZmRlZiBDT05GSUdfUkFQSURJTwordm9pZCBwbGF0Zm9ybV9yaW9faW5pdCh2b2lkKQoreworCS8qIDUxMk1CIFJJTyBMQVcgYXQgMHhjMDAwMDAwMCAqLworCW1wYzg1eHhfcmlvX3NldHVwKDB4YzAwMDAwMDAsIDB4MjAwMDAwMDApOworfQorI2VuZGlmIC8qIENPTkZJR19SQVBJRElPICovCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwordm9pZCBfX2luaXQKK3BsYXRmb3JtX2luaXQodW5zaWduZWQgbG9uZyByMywgdW5zaWduZWQgbG9uZyByNCwgdW5zaWduZWQgbG9uZyByNSwKKwkgICAgICB1bnNpZ25lZCBsb25nIHI2LCB1bnNpZ25lZCBsb25nIHI3KQoreworCS8qIHBhcnNlX2Jvb3RpbmZvIG11c3QgYWx3YXlzIGJlIGNh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ID0gTlVMTDsKIHZvaWQgKCptYWNoX3Jlc2V0KSggdm9pZCApOwogbG9uZyBtYWNoX21heF9kbWFfYWRkcmVzcyA9IDB4MDBmZmZmZmY7IC8qIGRlZmF1bHQgc2V0IHRvIHRoZSBsb3dlciAxNk1CICovCi0jaWYgZGVmaW5lZChDT05GSUdfQU1JR0FfRkxPUFBZKQotdm9pZCAoKm1hY2hfZmxvcHB5X3NldHVwKSAoY2hhciAqLCBpbnQgKikgX19pbml0ZGF0YSA9IE5VTEw7Ci0jZW5kaWYKICNpZmRlZiBDT05GSUdfSEVBUlRCRUFUCiB2b2lkICgqbWFjaF9oZWFydGJlYXQpIChpbnQpID0gTlVMTDsKIGV4dGVybiB2b2lkIGFwdXNfaGVhcnRiZWF0ICh2b2lkKTsKQEAgLTc2LDcgKzczLDYgQEAKIAogc3RydWN0IG1lbV9pbmZvIHJhbWRpc2s7CiAKLWV4dGVybiB2b2lkIGFtaWdhX2Zsb3BweV9zZXR1cChjaGFyICosIGludCAqKTsKIGV4dGVybiB2b2lkIGNvbmZpZ19hbWlnYSh2b2lkKTsKIAogc3RhdGljIGludCBfXzYwbnNyYW0gPSAwOwpAQCAtMzA1LDE2ICszMDEsNiBAQAogewogfQogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogRkxPUFBZICovCi0jaWYgZGVmaW5lZChDT05GSUdfQU1JR0FfRkxPUFBZKQotX19pbml0Ci12b2lkIGZsb3BweV9zZXR1cChjaGFyICpzdHIsIGludCAqaW50cykKLXsKLQlpZiAobWFjaF9mbG9wcHlfc2V0dXApCi0JCW1hY2hfZmxvcHB5X3NldHVwIChzdHIsIGludHMpOwotfQotI2VuZGlmCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiBNRU1PUlkgKi8KICNkZWZpbmUgS01BUF9NQVggMzIKIHVuc2lnbmVkIGxvbmcga21hcF9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xX2h3W2ldLT5lbmFibGUpICYgYml0KQotICAgICAgICAgICAgICAgICE9IChwcGNfY2FjaGVkX2lycV9tYXNrW2ldICYgYml0KSk7Ci0Jc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcG1hY19waWNfbG9jaywgZmxhZ3MpOwotfQotCi1zdGF0aWMgdm9pZCBwbWFjX3NldF9pcnFfbWFzayh1bnNpZ25lZCBpbnQgaXJxX25yLCBpbnQgbm9raWNrbG9zdCkKLXsKLSAgICAgICAgdW5zaWduZWQgbG9uZyBiaXQgPSAxVUwgPDwgKGlycV9uciAmIDB4MWYpOwotICAgICAgICBpbnQgaSA9IGlycV9uciA+PiA1OwotICAgICAgICB1bnNpZ25lZCBsb25nIGZsYWdzOwotCi0gICAgICAgIGlmICgodW5zaWduZWQpaXJxX25yID49IG1heF9pcnFzKQotICAgICAgICAgICAgICAgIHJldHVybjsKLQotCXNwaW5fbG9ja19pcnFzYXZlKCZwbWFjX3BpY19sb2NrLCBmbGFncyk7Ci0gICAgICAgIC8qIGVuYWJsZSB1bm1hc2tlZCBpbnRlcnJ1cHRzICovCi0gICAgICAgIG91dF9sZTMyKCZwbWFjX2lycV9od1tpXS0+ZW5hYmxlLCBwcGNfY2FjaGVkX2lycV9tYXNrW2ldKTsKLQotICAgICAgICBkbyB7Ci0gICAgICAgICAgICAgICAgLyogbWFrZSBzdXJlIG1hc2sgZ2V0cyB0byBjb250cm9sbGVyIGJlZm9yZSB3ZQotICAgICAgICAgICAgICAgICAgIHJldHVybiB0byB1c2VyICovCi0gICAgICAgICAgICAgICAgbWIoKTsKLSAgICAgICAgfSB3aGlsZSgoaW5fbGUzMigmcG1hY19pcnFfaHdbaV0tPmVuYWJsZSkgJiBiaXQpCi0gICAgICAgICAgICAgICAgIT0gKHBwY19jYWNoZWRfaXJxX21hc2tbaV0gJiBiaXQpKTsKLQotICAgICAgICAvKgotICAgICAgICAgKiBVbmZvcnR1bmF0ZWx5LCBzZXR0aW5nIHRoZSBiaXQga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mNsdWRlIDxhc20vbWFjaHZlY19pbml0Lmg+Ci0KLSNpbmNsdWRlIDxhc20vaW8uaD4KLSNpbmNsdWRlIDxhc20vaGQ2NDQ2MS9oZDY0NDYxLmg+Ci0jaW5jbHVkZSA8YXNtL2lycS5oPgotCi0vKgotICogVGhlIE1hY2hpbmUgVmVjdG9yCi0gKi8KLQotc3RydWN0IHNoX21hY2hpbmVfdmVjdG9yIG12X2hwNjIwIF9faW5pdG12ID0gewotICAgICAgICAubXZfbnJfaXJxcyAgICAgICAgICAgICA9IEhENjQ0NjFfSVJRQkFTRStIRDY0NDYxX0lSUV9OVU0sCi0KLSAgICAgICAgLm12X2luYiAgICAgICAgICAgICAgICAgPSBoZDY0NDYxX2luYiwKLSAgICAgICAgLm12X2ludyAgICAgICAgICAgICAgICAgPSBoZDY0NDYxX2ludywKLSAgICAgICAgLm12X2lubCAgICAgICAgICAgICAgICAgPSBoZDY0NDYxX2lubCwKLSAgICAgICAgLm12X291dGIgICAgICAgICAgICAgICAgPSBoZDY0NDYxX291dGIsCi0gICAgICAgIC5tdl9vdXR3ICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9vdXR3LAotICAgICAgICAubXZfb3V0bCAgICAgICAgICAgICAgICA9IGhkNjQ0NjFfb3V0bCwKLQotICAgICAgICAubXZfaW5iX3AgICAgICAgICAgICAgICA9IGhkNjQ0NjFfaW5iX3AsCi0gICAgICAgIC5tdl9pbndfcCAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbncsCi0gICAgICAgIC5tdl9pbmxfcCAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbmwsCi0gICAgICAgIC5tdl9vdXRiX3AgICAgICAgICAgICAgID0gaGQ2NDQ2MV9vdXRiX3AsCi0gICAgICAgIC5tdl9vdXR3X3AgICAgICAgICAgICAgID0gaGQ2NDQ2MV9vdXR3LAotICAgICAgICAubXZfb3V0bF9wICAgICAgICAgICAgICA9IGhkNjQ0NjFfb3V0bCwKLQotICAgICAgICAub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nVjdCBzaF9tYWNoaW5lX3ZlY3RvciBtdl9ocDY5MCBfX2luaXRtdiA9IHsKLSAgICAgICAgLm12X25yX2lycXMgICAgICAgICAgICAgPSBIRDY0NDYxX0lSUUJBU0UrSEQ2NDQ2MV9JUlFfTlVNLAotCi0gICAgICAgIC5tdl9pbmIgICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbmIsCi0gICAgICAgIC5tdl9pbncgICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbncsCi0gICAgICAgIC5tdl9pbmwgICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbmwsCi0gICAgICAgIC5tdl9vdXRiICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9vdXRiLAotICAgICAgICAubXZfb3V0dyAgICAgICAgICAgICAgICA9IGhkNjQ0NjFfb3V0dywKLSAgICAgICAgLm12X291dGwgICAgICAgICAgICAgICAgPSBoZDY0NDYxX291dGwsCi0KLSAgICAgICAgLm12X2luYl9wICAgICAgICAgICAgICAgPSBoZDY0NDYxX2luYl9wLAotICAgICAgICAubXZfaW53X3AgICAgICAgICAgICAgICA9IGhkNjQ0NjFfaW53LAotICAgICAgICAubXZfaW5sX3AgICAgICAgICAgICAgICA9IGhkNjQ0NjFfaW5sLAotICAgICAgICAubXZfb3V0Yl9wICAgICAgICAgICAgICA9IGhkNjQ0NjFfb3V0Yl9wLAotICAgICAgICAubXZfb3V0d19wICAgICAgICAgICAgICA9IGhkNjQ0NjFfb3V0dywKLSAgICAgICAgLm12X291dGxfcCAgICAgICAgICAgICAgPSBoZDY0NDYxX291dGwsCi0KLSAgICAgICAgLm12X2luc2IgICAgICAgICAgICAgICAgPSBoZDY0NDYxX2luc2IsCi0gICAgICAgIC5tdl9pbnN3ICAgICAgICAgICAgICAgID0gaGQ2NDQ2MV9pbnN3LAotICAgICAgICAubXZfaW5zbCAgICAgICAgICAgICAgICA9IGhkNjQ0NjFfaW5zbCwKLSAgICAgICAgLm12X291dHNiICAgICAgICAgIC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DT05GSUdfSVNBPXkKKyMgQ09ORklHX1BDSSBpcyBub3Qgc2V0CisKKyMKKyMgUENDQVJEIChQQ01DSUEvQ2FyZEJ1cykgc3VwcG9ydAorIworQ09ORklHX1BDQ0FSRD15CisjIENPTkZJR19QQ01DSUFfREVCVUcgaXMgbm90IHNldAorQ09ORklHX1BDTUNJQT15CitDT05GSUdfUENNQ0lBX0xPQURfQ0lTPXkKK0NPTkZJR19QQ01DSUFfSU9DVEw9eQorCisjCisjIFBDLWNhcmQgYnJpZGdlcworIworIyBDT05GSUdfSTgyMzY1IGlzIG5vdCBzZXQKKyMgQ09ORklHX1RDSUMgaXMgbm90IHNldAorQ09ORklHX0hENjQ0NjFfUENNQ0lBPXkKK0NPTkZJR19IRDY0NDYxX1BDTUNJQV9TT0NLRVRTPTEKK0NPTkZJR19QQ01DSUFfUFJPQkU9eQorCisjCisjIFBDSSBIb3RwbHVnIFN1cHBvcnQKKyMKKworIworIyBFeGVjdXRhYmxlIGZpbGUgZm9ybWF0cworIworQ09ORklHX0JJTkZNVF9FTEY9eQorIyBDT05GSUdfQklORk1UX0ZMQVQgaXMgbm90IHNldAorIyBDT05GSUdfQklORk1UX01JU0MgaXMgbm90IHNldAorCisjCisjIE5ldHdvcmtpbmcKKyMKKyMgQ09ORklHX05FVCBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCisjIENPTkZJR19TVEFOREFMT05FIGlzIG5vdCBzZXQKK0NPTkZJR19QUkVWRU5UX0ZJUk1XQVJFX0JVSUxEPXkKK0NPTkZJR19GV19MT0FERVI9eQorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKworIworIyBNZW1vcnkgVGVjaG5vbG9neSBEZXZpY2VzIChNVEQpCisjCisjIENPTkZJR19NVEQgaXMgbm90IHNldAorCisjCisjIFBhcmFsbGVsIHBvcnQgc3VwcG9ydAorIworIyBDT05GSUdfUEFSUE9SVCBpcyBub3Qgc2V0CisKKyMKKyMgUGx1ZyBhbmQgUGxheSBzdXBwb3J0CisjCisjIENPTkZJR19QTlAgaXMgbm90IHNldAorCisjCisjIEJsb2NrIGRldmljZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9NDA5NgorQ09ORklHX0JMS19ERVZfSU5JVFJEPXkKKyMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAorCisjCisjIEFUQS9BVEFQSS9NRk0vUkxMIHN1cHBvcnQKKyMKK0NPTkZJR19JREU9eQorQ09ORklHX0lERV9NQVhfSFdJRlM9NAorQ09ORklHX0JMS19ERVZfSURFPXkKKworIworIyBQbGVhc2Ugc2VlIERvY3VtZW50YXRpb24vaWRlLnR4dCBmb3IgaGVscC9pbmZvIG9uIElERSBkcml2ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfSURFX1NBVEEgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRElTSz15CisjIENPTkZJR19JREVESVNLX01VTFRJX01PREUgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9JREVDUyBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUNEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFVEFQRSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lERUZMT1BQWSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CisKKyMKKyMgSURFIGNoaXBzZXQgc3VwcG9ydC9idWdmaXhlcworIworQ09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KworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCitDT05GSUdfSU5QVVRfTU9VU0VERVY9eQorQ09ORklHX0lOUFVUX01PVVNFREVWX1BTQVVYPXkKK0NPTkZJR19JTlBVVF9NT1VTRURFVl9TQ1JFRU5fWD0xMDI0CitDT05GSUdfSU5QVVRfTU9VU0VERVZfU0NSRUVOX1k9NzY4CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UT1VDSFNDUkVFTiBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NSVNDIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBJL08gcG9ydHMKKyMKK0NPTkZJR19TRVJJTz15CisjIENPTkZJR19TRVJJT19JODA0MiBpcyBub3Qgc2V0CisjIENPTkZJR19TRVJJT19TRVJQT1JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFUklPX1JBVyBpcyBub3Qgc2V0CisjIENPTkZJR19HQU1FUE9SVCBpcyBub3Qgc2V0CisKKyMKKyMgQ2hhcmFjdGVyIGRldmljZXMKKyMKK0NPTkZJR19WVD15CitDT05GSUdfVlRfQ09OU09MRT15CitDT05GSUdfSFdfQ09OU09MRT15CisjIENPTkZJR19TRVJJQUxfTk9OU1RBTkRBUkQgaXMgbm90IHNldAorCisjCisjIFNlcmlhbCBkcml2ZXJzCisjCisjIENPTkZJR19TRVJJQUxfODI1MCBp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ORklHX0ZPTlRfOHgxNiBpcyBub3Qgc2V0CisjIENPTkZJR19GT05UXzZ4MTEgaXMgbm90IHNldAorIyBDT05GSUdfRk9OVF83eDE0IGlzIG5vdCBzZXQKK0NPTkZJR19GT05UX1BFQVJMXzh4OD15CisjIENPTkZJR19GT05UX0FDT1JOXzh4OCBpcyBub3Qgc2V0CisjIENPTkZJR19GT05UX01JTklfNHg2IGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZPTlRfU1VOOHgxNiBpcyBub3Qgc2V0CisjIENPTkZJR19GT05UX1NVTjEyeDIyIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZPTlRfMTB4MTggaXMgbm90IHNldAorCisjCisjIExvZ28gY29uZmlndXJhdGlvbgorIworIyBDT05GSUdfTE9HTyBpcyBub3Qgc2V0CisjIENPTkZJR19CQUNLTElHSFRfTENEX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCitDT05GSUdfU09VTkQ9eQorCisjCisjIEFkdmFuY2VkIExpbnV4IFNvdW5kIEFyY2hpdGVjdHVyZQorIworIyBDT05GSUdfU05EIGlzIG5vdCBzZXQKKworIworIyBPcGVuIFNvdW5kIFN5c3RlbQorIworQ09ORklHX1NPVU5EX1BSSU1FPXkKKyMgQ09ORklHX09CU09MRVRFX09TU19EUklWRVIgaXMgbm90IHNldAorIyBDT05GSUdfU09VTkRfTVNORENMQVMgaXMgbm90IHNldAorIyBDT05GSUdfU09VTkRfTVNORFBJTiBpcyBub3Qgc2V0CitDT05GSUdfU09VTkRfU0hfREFDX0FVRElPPXkKK0NPTkZJR19TT1VORF9TSF9EQUNfQVVESU9fQ0hBTk5FTD0xCisKKyMKKyMgVVNCIHN1cHBvcnQKKyMKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19IQ0QgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0kgaXMgbm90IHNldAorCisjCisjIE5PVEU6IFVTQl9TVE9SQUdFIGVuYWJs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dCBzZXQKKyMgQ09ORklHX05MU19DT0RFUEFHRV85MzIgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzk0OSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfODc0IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzggaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTAgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0FTQ0lJIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8zIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV82IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzcgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19LT0k4X1UgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX1VURjggaXMgbm90IHNldAorCisjCisjIFByb2ZpbGluZyBzdXBwb3J0CisjCisjIENPTkZJR19QUk9GSUxJTkcgaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBoYWNraW5nCisjCisjIENPTkZJR19QUklOVEtfVElNRSB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ZWRcblx0IgorCQkgICAgICIgc3RjCXNyLCAlMFxuXHQiCisJCSAgICAgImFuZAklMSwgJTBcblx0IgorCQkgICAgICJvcgklMiwgJTBcblx0IgorCQkgICAgICJsZGMJJTAsIHNyXG4iCisJCSAgICAgIjE6IgorCQkgICAgIDogIj0meiIgKF9fZHVtbXkpCisJCSAgICAgOiAiciIgKH4weGYwKSwgInIiIChpcCA8PCA0KQorCQkgICAgIDogInQiKTsKK30KKworc3RhdGljIHZvaWQgZGlzYWJsZV9pbWFza19pcnEodW5zaWduZWQgaW50IGlycSkKK3sKKwljbGVhcl9iaXQoaXJxLCAmaW1hc2tfbWFzayk7CisJaWYgKGludGVycnVwdF9wcmlvcml0eSA8IElNQVNLX1BSSU9SSVRZIC0gaXJxKQorCQlpbnRlcnJ1cHRfcHJpb3JpdHkgPSBJTUFTS19QUklPUklUWSAtIGlycTsKKworCXNldF9pbnRlcnJ1cHRfcmVnaXN0ZXJzKGludGVycnVwdF9wcmlvcml0eSk7Cit9CisKK3N0YXRpYyB2b2lkIGVuYWJsZV9pbWFza19pcnEodW5zaWduZWQgaW50IGlycSkKK3sKKwlzZXRfYml0KGlycSwgJmltYXNrX21hc2spOworCWludGVycnVwdF9wcmlvcml0eSA9IElNQVNLX1BSSU9SSVRZIC0gZmZ6KGltYXNrX21hc2spOworCisJc2V0X2ludGVycnVwdF9yZWdpc3RlcnMoaW50ZXJydXB0X3ByaW9yaXR5KTsKK30KKworc3RhdGljIHZvaWQgbWFza19hbmRfYWNrX2ltYXNrKHVuc2lnbmVkIGludCBpcnEpCit7CisJZGlzYWJsZV9pbWFza19pcnEoaXJxKTsKK30KKworc3RhdGljIHZvaWQgZW5kX2ltYXNrX2lycSh1bnNpZ25lZCBpbnQgaXJxKQoreworCWlmICghKGlycV9kZXNjW2lycV0uc3RhdHVzICYgKElSUV9ESVNBQkxFRHxJUlFfSU5QUk9HUkVTUykpKQorCQllbmFibGVfaW1hc2tfaXJxKGlycSk7Cit9CisKK3N0YXR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pbWl6ZWQuCiAgKi8KLXZvaWQgIG1lbWNweV90b2lvKHVuc2lnbmVkIGxvbmcgdG8sIGNvbnN0IHZvaWQgKiBmcm9tLCB1bnNpZ25lZCBsb25nIGNvdW50KQordm9pZCBtZW1jcHlfdG9pbyh2b2xhdGlsZSB2b2lkIF9faW9tZW0gKnRvLCBjb25zdCB2b2lkICpmcm9tLCB1bnNpZ25lZCBsb25nIGNvdW50KQogewogCWNvbnN0IGNoYXIgKnAgPSBmcm9tOwogICAgICAgICB3aGlsZSAoY291bnQpIHsKICAgICAgICAgICAgICAgICBjb3VudC0tOwotICAgICAgICAgICAgICAgIHdyaXRlYigqcCwgdG8pOworICAgICAgICAgICAgICAgIHdyaXRlYigqcCwgKHZvaWQgX19pb21lbSAqKXRvKTsKICAgICAgICAgICAgICAgICBwKys7CiAgICAgICAgICAgICAgICAgdG8rKzsKICAgICAgICAgfQogfQotIAorRVhQT1JUX1NZTUJPTChtZW1jcHlfdG9pbyk7CisKIC8qCiAgKiAibWVtc2V0IiBvbiBJTyBtZW1vcnkgc3BhY2UuCiAgKiBUaGlzIG5lZWRzIHRvIGJlIG9wdGltaXplZC4KICAqLwotdm9pZCAgbWVtc2V0X2lvKHVuc2lnbmVkIGxvbmcgZHN0LCBpbnQgYywgdW5zaWduZWQgbG9uZyBjb3VudCkKK3ZvaWQgbWVtc2V0X2lvKHZvbGF0aWxlIHZvaWQgX19pb21lbSAqZHN0LCBpbnQgYywgdW5zaWduZWQgbG9uZyBjb3VudCkKIHsKICAgICAgICAgd2hpbGUgKGNvdW50KSB7CiAgICAgICAgICAgICAgICAgY291bnQtLTsKLSAgICAgICAgICAgICAgICB3cml0ZWIoYywgZHN0KTsKKyAgICAgICAgICAgICAgICB3cml0ZWIoYywgKHZvaWQgX19pb21lbSAqKWRzdCk7CiAgICAgICAgICAgICAgICAgZHN0Kys7CiAgICAgICAgIH0KIH0KLQotRVhQT1JUX1NZTUJPTChtZW1jcHlfZnJvbWlvKTsKLUVYUE9S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gPSBzdGFydF9hZGRyZXNzICAgICAgKi8KKwkvKiByNyA9IHZicl9yZWcgICAgICAgICAgICAqLworCisJbW92LmwJMTBmLHI4CSAgLyogNDA5NiAqLworCW1vdi5sCTExZixyOSAgICAvKiAweGEwMDAwMDAwICovCisKKwkvKiAgc3RhY2sgc2V0dGluZyAqLworCWFkZAlyOCxyNQorCW1vdglyNSxyMTUKKworCWJyYQkxZgorCW1vdglyNCxyMAkgIC8qIGNtZCA9IGluZGlyZWN0aW9uX3BhZ2UgKi8KKzA6CisJbW92LmwJQHI0KyxyMAkgIC8qIGNtZCA9ICppbmQrKyAqLworCisxOgkvKiBhZGRyID0gKGNtZCB8IDB4YTAwMDAwMDApICYgMHhmZmZmZmZmMCAqLworCW1vdglyMCxyMgorCW9yCXI5LHIyCisJbW92CSMtMTYscjEKKwlhbmQJcjEscjIKKworCS8qIGlmKGNtZCAmIElORF9ERVNUSU5BVElPTikgZHN0ID0gYWRkciAgKi8KKwl0c3QJIzEscjAKKwlidAkyZgorCWJyYQkwYgorCW1vdglyMixyNQorCisyOgkvKiBlbHNlIGlmKGNtZCAmIElORF9JTkRJUkVDVElPTikgaW5kID0gYWRkciAgKi8KKwl0c3QJIzIscjAKKwlidAkzZgorCWJyYQkwYgorCW1vdglyMixyNAorCiszOgkvKiBlbHNlIGlmKGNtZCAmIElORF9ET05FKSBnb3RvIDYgICovCisJdHN0CSM0LHIwCisJYnQJNGYKKwlicmEJNmYKKwlub3AKKworNDoJLyogZWxzZSBpZihjbWQgJiBJTkRfU09VUkNFKSBtZW1jcHkoZHN0LGFkZHIsUEFHRV9TSVpFKSAqLworCXRzdAkjOCxyMAorCWJ0CTBiCisKKwltb3YJcjgscjMKKwlzaGxyMglyMworCXNobHIyCXIzCis1OgorCWR0CXIzCisJbW92LmwJQHIyKyxyMSAgIC8qICAxNm4rMCAqLworCW1vdi5sCXIxLEByNQorCWFkZAkjNCxyNQorCW1vdi5sCUByMisscjEJICAvKiAgMTZuKzQgKi8KKw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05GSUdfTkxTX0NPREVQQUdFXzg2ND1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzg2NT1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzg2Nj1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzg2OT1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzkzNj1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzk1MD1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzkzMj1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzk0OT1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzg3ND1tCi1DT05GSUdfTkxTX0lTTzg4NTlfOD1tCi1DT05GSUdfTkxTX0NPREVQQUdFXzEyNTA9bQotQ09ORklHX05MU19DT0RFUEFHRV8xMjUxPW0KLUNPTkZJR19OTFNfQVNDSUk9bQotQ09ORklHX05MU19JU084ODU5XzE9bQotQ09ORklHX05MU19JU084ODU5XzI9bQotQ09ORklHX05MU19JU084ODU5XzM9bQotQ09ORklHX05MU19JU084ODU5XzQ9bQotQ09ORklHX05MU19JU084ODU5XzU9bQotQ09ORklHX05MU19JU084ODU5XzY9bQotQ09ORklHX05MU19JU084ODU5Xzc9bQotQ09ORklHX05MU19JU084ODU5Xzk9bQotQ09ORklHX05MU19JU084ODU5XzEzPW0KLUNPTkZJR19OTFNfSVNPODg1OV8xND1tCi1DT05GSUdfTkxTX0lTTzg4NTlfMTU9bQotQ09ORklHX05MU19LT0k4X1I9bQotQ09ORklHX05MU19LT0k4X1U9bQotQ09ORklHX05MU19VVEY4PW0KIAogIwogIyBNdWx0aW1lZGlhIGRldmljZXMKICMKLUNPTkZJR19WSURFT19ERVY9eQotCi0jCi0jIFZpZGVvIEZvciBMaW51eAotIwotCi0jCi0jIFZpZGVvIEFkYXB0ZXJzCi0jCi1DT05GSUdfVklERU9fQlQ4NDg9bQotQ09ORklHX1ZJREVPX0JXUUNBTT1tCi1DT05GSUdfVklERU9fQ1FDQU09bQotQ09ORklHX1ZJREVPX1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cmRfcmVhZF9zdGljayh2b2lkKQogewogCXVuc2lnbmVkIGxvbmcgcmV0LCB0bXAxLCB0bXAyLCB0bXAzOwotCXVuc2lnbmVkIGxvbmcgYWRkciA9IEhCSVJEX1NUSUNLX0FERFI7CisJdW5zaWduZWQgbG9uZyBhZGRyID0gSEJJUkRfU1RJQ0tfQUREUis4OwogCi0JX19hc21fXyBfX3ZvbGF0aWxlX18oImxkeGEJWyUxXSAlNSwgJTJcblx0IgotCQkJICAgICAiYWRkCSUxLCAweDgsICUxXG5cdCIKLQkJCSAgICAgImxkeGEJWyUxXSAlNSwgJTNcblx0IgorCV9fYXNtX18gX192b2xhdGlsZV9fKCJsZHhhCVslMV0gJTUsICUyXG4iCisJCQkgICAgICIxOlxuXHQiCiAJCQkgICAgICJzdWIJJTEsIDB4OCwgJTFcblx0IgorCQkJICAgICAibGR4YQlbJTFdICU1LCAlM1xuXHQiCisJCQkgICAgICJhZGQJJTEsIDB4OCwgJTFcblx0IgogCQkJICAgICAibGR4YQlbJTFdICU1LCAlNFxuXHQiCiAJCQkgICAgICJjbXAJJTQsICUyXG5cdCIKLQkJCSAgICAgImJsdSxhLHBuCSUleGNjLCAxZlxuXHQiCi0JCQkgICAgICIgYWRkCSUzLCAxLCAlM1xuIgotCQkJICAgICAiMTpcblx0IgotCQkJICAgICAic2xseAklMywgMzIsICUzXG5cdCIKKwkJCSAgICAgImJuZSxhLHBuCSUleGNjLCAxYlxuXHQiCisJCQkgICAgICIgbW92CSU0LCAlMlxuXHQiCisJCQkgICAgICJzbGx4CSU0LCAzMiwgJTRcblx0IgogCQkJICAgICAib3IJJTMsICU0LCAlMFxuXHQiCiAJCQkgICAgIDogIj0mciIgKHJldCksICI9JnIiIChhZGRyKSwKIAkJCSAgICAgICAiPSZyIiAodG1wMSksICI9JnIiICh0bXAyKSwgIj0mciIgKHRtcDMpCmRpZmYgLS1naXQgYS9hcmNoL3NwYXJjNjQva2VybmVsL3RyYXBzLmMgYi9hcmNoL3NwYXJj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G9uZyk7Ci0KLQltZW1jcHkoc3RhY2sgKyAxLCBkYXRhLCBkYXRhX2NvdW50ICogc2l6ZW9mKGxvbmcpKTsKLQotCSpzdHViX2FkZHIgPSAodm9pZCAqKSgoKHVuc2lnbmVkIGxvbmcpKHN0YWNrICsgMSkgJiB+UEFHRV9NQVNLKSArCi0JCQkgICAgICBVTUxfQ09ORklHX1NUVUJfREFUQSk7Ci0KLQlyZXR1cm4gMDsKLX0KLQotaW50IG1hcChzdHJ1Y3QgbW1faWQgKiBtbV9pZHAsIHVuc2lnbmVkIGxvbmcgdmlydCwgdW5zaWduZWQgbG9uZyBsZW4sCi0JaW50IHIsIGludCB3LCBpbnQgeCwgaW50IHBoeXNfZmQsIHVuc2lnbmVkIGxvbmcgbG9uZyBvZmZzZXQsCi0JaW50IGRvbmUsIHZvaWQgKipkYXRhKQotewotICAgICAgICBpbnQgcHJvdCwgcmV0OwotCi0gICAgICAgIHByb3QgPSAociA/IFBST1RfUkVBRCA6IDApIHwgKHcgPyBQUk9UX1dSSVRFIDogMCkgfAotICAgICAgICAgICAgICAgICh4ID8gUFJPVF9FWEVDIDogMCk7Ci0KLSAgICAgICAgaWYocHJvY19tbSl7Ci0gICAgICAgICAgICAgICAgc3RydWN0IHByb2NfbW1fb3AgbWFwOwotICAgICAgICAgICAgICAgIGludCBmZCA9IG1tX2lkcC0+dS5tbV9mZDsKLQotICAgICAgICAgICAgICAgIG1hcCA9ICgoc3RydWN0IHByb2NfbW1fb3ApIHsgLm9wCT0gTU1fTU1BUCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51CQk9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IC5tbWFwCT0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyAuYWRkcgk9IHZpcnQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmxlbgk9IGxlbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucHJvdAk9IHByb3QsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZsYWdzCT0gTUFQX1NIQVJFRCB8Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUFQX0ZJWEVELAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5mZAk9IHBoeXNfZmQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm9mZnNldD0gb2Zmc2V0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gfSB9ICk7Ci0JCXJldCA9IG9zX3dyaXRlX2ZpbGUoZmQsICZtYXAsIHNpemVvZihtYXApKTsKLQkJaWYocmV0ICE9IHNpemVvZihtYXApKQotCQkJcHJpbnRrKCJtYXAgOiAvcHJvYy9tbSBtYXAgZmFpbGVkLCBlcnIgPSAlZFxuIiwgLXJldCk7Ci0JCWVsc2UgcmV0ID0gMDsKLSAgICAgICAgfQotICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGFyZ3NbXSA9IHsgdmlydCwgbGVuLCBwcm90LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQVBfU0hBUkVEIHwgTUFQX0ZJWEVELCBwaHlzX2ZkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNTUFQX09GRlNFVChvZmZzZXQpIH07Ci0KLQkJcmV0ID0gcnVuX3N5c2NhbGxfc3R1YihtbV9pZHAsIFNUVUJfTU1BUF9OUiwgYXJncywgdmlydCwKLQkJCQkgICAgICAgZGF0YSwgZG9uZSk7Ci0gICAgICAgIH0KLQotCXJldHVybiByZXQ7Ci19Ci0KLWludCB1bm1hcChzdHJ1Y3QgbW1faWQgKiBtbV9pZHAsIHZvaWQgKmFkZHIsIHVuc2lnbmVkIGxvbmcgbGVuLCBpbnQgZG9uZSwKLQkgIHZvaWQgKipkYXRhKQotewotICAgICAgICBpbnQgcmV0OwotCi0gICAgICAgIGlmKHByb2NfbW0pewotICAgICAgICAgICAgICAgIHN0cnVjdCBwcm9jX21tX29wIHVubWFwOwotICAgICAgICAgICAgICAgIGludCBmZCA9IG1tX2lkcC0+dS5tbV9mZDsKLQotICAgICAgICAgICAgICAgIHVubWFwID0gKChzdHJ1Y3QgcHJvY19tbV9vcCkgeyAub3AJPSBNTV9NVU5NQVAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51CT0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyAubXVubWFwCT0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IC5hZGRyCT0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSBhZGRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmxlbgkJPSBsZW4gfSB9IH0gKTsKLQkJcmV0ID0gb3Nfd3JpdGVfZmlsZShmZCwgJnVubWFwLCBzaXplb2YodW5tYXApKTsKLQkJaWYocmV0ICE9IHNpemVvZih1bm1hcCkpCi0JCQlwcmludGsoInVubWFwIC0gcHJvY19tbSB3cml0ZSByZXR1cm5lZCAlZFxuIiwgcmV0KTsKLQkJZWxzZSByZXQgPSAwOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgYXJnc1tdID0geyAodW5zaWduZWQgbG9uZykgYWRkciwgbGVuLCAwLCAwLCAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIH07Ci0KLQkJcmV0ID0gcnVuX3N5c2NhbGxfc3R1YihtbV9pZHAsIF9fTlJfbXVubWFwLCBhcmdzLCAwLAotCQkJCSAgICAgICBkYXRhLCBkb25lKTsKLSAgICAgICAgICAgICAgICBpZihyZXQgPCAwKQotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJtdW5tYXAgc3R1YiBmYWlsZWQsIGVycm5vID0gJWRcbiIsIHJldCk7Ci0gICAgICAgIH0KLQotICAgICAgICByZXR1cm4gcmV0OwotfQotCi1pbnQgcHJvdGVjdChzdHJ1Y3QgbW1faWQgKiBtbV9pZHAsIHVuc2lnbmVkIGxvbmcgYWRkciwgdW5zaWduZWQgbG9uZyBsZW4sCi0JICAgIGludCByLCBpbnQgdywgaW50IHgsIGludCBkb25lLCB2b2lkICoqZGF0YSkKLXsKLSAgICAgICAgc3RydWN0IHByb2NfbW1fb3AgcHJvdGVjdDsKLSAgICAgICAgaW50IHByb3QsIHJldDsKLQotICAgICAgICBwcm90ID0gKHIgPyBQUk9UX1JFQUQgOiAwKSB8ICh3ID8gUFJPVF9XUklURSA6IDApIHwKLSAgICAgICAgICAgICAgICAoeCA/IFBST1RfRVhFQyA6IDApOwotCi0gICAgICAgIGlmKHByb2NfbW0pewotICAgICAgICAgICAgICAgIGludCBmZCA9IG1tX2lkcC0+dS5tbV9mZDsKLSAgICAgICAgICAgICAgICBwcm90ZWN0ID0gKChzdHJ1Y3QgcHJvY19tbV9vcCkgeyAub3AJPSBNTV9NUFJPVEVDVCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudQk9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyAubXByb3RlY3QJPQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyAuYWRkcgk9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSBhZGRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubGVuCT0gbGVuLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucHJvdAk9IHByb3QgfSB9IH0gKTsKLQotICAgICAgICAgICAgICAgIHJldCA9IG9zX3dyaXRlX2ZpbGUoZmQsICZwcm90ZWN0LCBzaXplb2YocHJvdGVjdCkpOwotICAgICAgICAgICAgICAgIGlmKHJldCAhPSBzaXplb2YocHJvdGVjdCkpCi0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoInByb3RlY3QgZmFpbGVkLCBlcnIgPSAlZCIsIC1yZXQpOwotICAgICAgICAgICAgICAgIGVsc2UgcmV0ID0gMDsKLSAgICAgICAgfQotICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGFyZ3NbXSA9IHsgYWRkciwgbGVuLCBwcm90LCAwLCAwLCAwIH07Ci0KLSAgICAgICAgICAgICAgICByZXQgPSBydW5fc3lzY2FsbF9zdHViKG1tX2lkcCwgX19OUl9tcHJvdGVjdCwgYXJncywgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEsIGRvbmUpOwotICAgICAgICB9Ci0KLSAgICAgICAgcmV0dXJuIHJldDsKLX0KLQotdm9pZCBiZWZvcmVfbWVtX3NrYXModW5zaWduZWQgbG9uZyB1bnVzZWQpCi17Ci19CmRpZmYgLS1naXQgYS9hcmNoL3VtL2tlcm5lbC9za2FzL21tdS5jIGIvYXJjaC91bS9rZXJuZWwvc2thcy9tbXUuYwppbmRleCA2Nzc4NzFmLi5jNWM5ODg1IDEwMDY0NAotLS0gYS9hcmNoL3VtL2tlcm5lbC9za2FzL21tdS5jCisrKyBiL2FyY2gvdW0va2VybmVsL3NrYXMvbW11LmM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0KKwkJaWYobiA+IDEpCisJCQlwcmludGsoIlxuIik7CisJfQorCWVsc2UgcmV0ID0gMDsKKworCSphZGRyID0gY2hlY2tfaW5pdF9zdGFjayhtbV9pZHAsIE5VTEwpOworCisJcmV0dXJuIHJldDsKK30KKworbG9uZyBydW5fc3lzY2FsbF9zdHViKHN0cnVjdCBtbV9pZCAqIG1tX2lkcCwgaW50IHN5c2NhbGwsCisJCSAgICAgIHVuc2lnbmVkIGxvbmcgKmFyZ3MsIGxvbmcgZXhwZWN0ZWQsIHZvaWQgKiphZGRyLAorCQkgICAgICBpbnQgZG9uZSkKK3sKKwl1bnNpZ25lZCBsb25nICpzdGFjayA9IGNoZWNrX2luaXRfc3RhY2sobW1faWRwLCAqYWRkcik7CisKKwlpZihkb25lICYmICphZGRyID09IE5VTEwpCisJCXNpbmdsZV9jb3VudCsrOworCisJKnN0YWNrICs9IHNpemVvZihsb25nKTsKKwlzdGFjayArPSAqc3RhY2sgLyBzaXplb2YobG9uZyk7CisKKwkqc3RhY2srKyA9IHN5c2NhbGw7CisJKnN0YWNrKysgPSBhcmdzWzBdOworCSpzdGFjaysrID0gYXJnc1sxXTsKKwkqc3RhY2srKyA9IGFyZ3NbMl07CisJKnN0YWNrKysgPSBhcmdzWzNdOworCSpzdGFjaysrID0gYXJnc1s0XTsKKwkqc3RhY2srKyA9IGFyZ3NbNV07CisJKnN0YWNrKysgPSBleHBlY3RlZDsKKwkqc3RhY2sgPSAwOworCW11bHRpX29wX2NvdW50Kys7CisKKwlpZighZG9uZSAmJiAoKCgodW5zaWduZWQgbG9uZykgc3RhY2spICYgflBBR0VfTUFTSykgPAorCQkgICAgIFBBR0VfU0laRSAtIDEwICogc2l6ZW9mKGxvbmcpKSl7CisJCSphZGRyID0gc3RhY2s7CisJCXJldHVybiAwOworCX0KKworCXJldHVybiBkb19zeXNjYWxsX3N0dWIobW1faWRwLCBhZGRyKTsKK30KKworbG9uZyBzeXNjYWxsX3N0dWJfZGF0YShzdHJ1Y3Q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I1NzU0NiAxMDA2NDQKLS0tIGEvYmxvY2svZ2VuaGQuYworKysgYi9ibG9jay9nZW5oZC5jCkBAIC0zOCwzNCArMzgsMTAwIEBACiAJcmV0dXJuIG1ham9yICUgTUFYX1BST0JFX0hBU0g7CiB9CiAKLSNpZmRlZiBDT05GSUdfUFJPQ19GUwotLyogZ2V0IGJsb2NrIGRldmljZSBuYW1lcyBpbiBzb21ld2hhdCByYW5kb20gb3JkZXIgKi8KLWludCBnZXRfYmxrZGV2X2xpc3QoY2hhciAqcCwgaW50IHVzZWQpCitzdHJ1Y3QgYmxrZGV2X2luZm8geworICAgICAgICBpbnQgaW5kZXg7CisgICAgICAgIHN0cnVjdCBibGtfbWFqb3JfbmFtZSAqYmQ7Cit9OworCisvKgorICogaXRlcmF0ZSBvdmVyIGEgbGlzdCBvZiBibGtkZXZfaW5mbyBzdHJ1Y3R1cmVzLiAgYWxsb3dzCisgKiB0aGUgbWFqb3JfbmFtZXMgYXJyYXkgdG8gYmUgaXRlcmF0ZWQgb3ZlciBmcm9tIG91dHNpZGUgdGhpcyBmaWxlCisgKiBtdXN0IGJlIGNhbGxlZCB3aXRoIHRoZSBibG9ja19zdWJzeXNfc2VtIGhlbGQKKyAqLwordm9pZCAqZ2V0X25leHRfYmxrZGV2KHZvaWQgKmRldikKK3sKKyAgICAgICAgc3RydWN0IGJsa2Rldl9pbmZvICppbmZvOworCisgICAgICAgIGlmIChkZXYgPT0gTlVMTCkgeworICAgICAgICAgICAgICAgIGluZm8gPSBrbWFsbG9jKHNpemVvZigqaW5mbyksIEdGUF9LRVJORUwpOworICAgICAgICAgICAgICAgIGlmICghaW5mbykKKyAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gb3V0OworICAgICAgICAgICAgICAgIGluZm8tPmluZGV4PTA7CisgICAgICAgICAgICAgICAgaW5mby0+YmQgPSBtYWpvcl9uYW1lc1tpbmZvLT5pbmRleF07CisgICAgICAgICAgICAgICAgaWYgKGluZm8tPmJkKQorICAgICAgICAgICAgICAgICAgICAgICAgZ290byBvdXQ7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaW5mbyA9IGRldjsKKyAgICAgICAgfQorCisgICAgICAgIHdoaWxlIChpbmZvLT5pbmRleCA8IEFSUkFZX1NJWkUobWFqb3JfbmFtZXMpKSB7CisgICAgICAgICAgICAgICAgaWYgKGluZm8tPmJkKQorICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+YmQgPSBpbmZvLT5iZC0+bmV4dDsKKyAgICAgICAgICAgICAgICBpZiAoaW5mby0+YmQpCisgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIG91dDsKKyAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAqIE5vIGRldmljZXMgb24gdGhpcyBjaGFpbiwgbW92ZSB0byB0aGUgbmV4dAorICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgIGluZm8tPmluZGV4Kys7CisgICAgICAgICAgICAgICAgaW5mby0+YmQgPSAoaW5mby0+aW5kZXggPCBBUlJBWV9TSVpFKG1ham9yX25hbWVzKSkgPworCQkJbWFqb3JfbmFtZXNbaW5mby0+aW5kZXhdIDogTlVMTDsKKyAgICAgICAgICAgICAgICBpZiAoaW5mby0+YmQpCisgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIG91dDsKKyAgICAgICAgfQorCitvdXQ6CisgICAgICAgIHJldHVybiBpbmZvOworfQorCit2b2lkICphY3F1aXJlX2Jsa2Rldl9saXN0KHZvaWQpCit7CisgICAgICAgIGRvd24oJmJsb2NrX3N1YnN5c19zZW0pOworICAgICAgICByZXR1cm4gZ2V0X25leHRfYmxrZGV2KE5VTEwpOworfQorCit2b2lkIHJlbGVhc2VfYmxrZGV2X2xpc3Qodm9pZCAqZGV2KQoreworICAgICAgICB1cCgmYmxvY2tfc3Vic3lzX3NlbSk7CisgICAgICAgIGtmcmVlKGRldik7Cit9CisKKworLyoKKyAqIENvdW50IHRoZSBudW1iZXIgb2YgcmVjb3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WNhMC4uZDg2MWFkZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2Rpc3BhdGNoZXIvZHNtZXRob2QuYworKysgYi9kcml2ZXJzL2FjcGkvZGlzcGF0Y2hlci9kc21ldGhvZC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAwNSwgUi4gQnlyb24gTW9vcmUKKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMDYsIFIuIEJ5cm9uIE1vb3JlCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtNDcsMTM1ICs0Nyw2NiBAQAogI2luY2x1ZGUgPGFjcGkvYWNkaXNwYXQuaD4KICNpbmNsdWRlIDxhY3BpL2FjaW50ZXJwLmg+CiAjaW5jbHVkZSA8YWNwaS9hY25hbWVzcC5oPgorI2luY2x1ZGUgPGFjcGkvYWNkaXNhc20uaD4KIAogI2RlZmluZSBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfRElTUEFUQ0hFUgogQUNQSV9NT0RVTEVfTkFNRSgiZHNtZXRob2QiKQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX3BhcnNlX21ldGhvZAorICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbWV0aG9kX2Vycm9yCiAgKgotICogUEFSQU1FVEVSUzogIE5vZGUgICAgICAgIC0gTWV0aG9kIG5vZGUKKyAqIFBBUkFNRVRFUlM6ICBTdGF0dXMgICAgIC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sKIAl9CiAKQEAgLTEwMCw2ICsxMDAsNDggQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBGVU5DVElPTjogICAgYWNwaV9ldl9pbnN0YWxsX2ZhZHRfZ3BlcworICoKKyAqIFBBUkFNRVRFUlM6ICBOb25lCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBDb21wbGV0ZXMgaW5pdGlhbGl6YXRpb24gb2YgdGhlIEZBRFQtZGVmaW5lZCBHUEUgYmxvY2tzCisgKiAgICAgICAgICAgICAgKDAgYW5kIDEpLiBUaGlzIGNhdXNlcyB0aGUgX1BSVyBtZXRob2RzIHRvIGJlIHJ1biwgc28gdGhlIEhXCisgKiAgICAgICAgICAgICAgbXVzdCBiZSBmdWxseSBpbml0aWFsaXplZCBhdCB0aGlzIHBvaW50LCBpbmNsdWRpbmcgZ2xvYmFsIGxvY2sKKyAqICAgICAgICAgICAgICBzdXBwb3J0LgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzIGFjcGlfZXZfaW5zdGFsbF9mYWR0X2dwZXModm9pZCkKK3sKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisKKwlBQ1BJX0ZVTkNUSU9OX1RSQUNFKCJldl9pbnN0YWxsX2ZhZHRfZ3BlcyIpOworCisJLyogTmFtZXNwYWNlIG11c3QgYmUgbG9ja2VkICovCisKKwlzdGF0dXMgPSBhY3BpX3V0X2FjcXVpcmVfbXV0ZXgoQUNQSV9NVFhfTkFNRVNQQUNFKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJcmV0dXJuIChzdGF0dXMpOworCX0KKworCS8qIEZBRFQgR1BFIEJsb2NrI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KwkJCSB1MzIgbGV2ZWwsIHUzMiBpbmRleCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogT2JqZWN0IERlc2NyaXB0b3IgaW5mbyB0YWJsZXMKKyAqCisgKiBOb3RlOiBUaGUgZmlyc3QgdGFibGUgZW50cnkgbXVzdCBiZSBhbiBJTklUIG9wY29kZSBhbmQgbXVzdCBjb250YWluCisgKiB0aGUgdGFibGUgbGVuZ3RoIChudW1iZXIgb2YgdGFibGUgZW50cmllcykKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgc3RydWN0IGFjcGlfZXhkdW1wX2luZm8gYWNwaV9leF9kdW1wX2ludGVnZXJbMl0gPSB7CisJe0FDUElfRVhEX0lOSVQsIEFDUElfRVhEX1RBQkxFX1NJWkUoYWNwaV9leF9kdW1wX2ludGVnZXIpLCBOVUxMfSwKKwl7QUNQSV9FWERfVUlOVDY0LCBBQ1BJX0VYRF9PRkZTRVQoaW50ZWdlci52YWx1ZSksICJWYWx1ZSJ9Cit9OworCitzdGF0aWMgc3RydWN0IGFjcGlfZXhkdW1wX2luZm8gYWNwaV9leF9kdW1wX3N0cmluZ1s0XSA9IHsKKwl7QUNQSV9FWERfSU5JVCwgQUNQSV9FWERfVEFCTEVfU0laRShhY3BpX2V4X2R1bXBfc3RyaW5nKSwgTlVMTH0sCisJe0FDUElfRVhEX1VJTlQzMiwgQUNQSV9FWERfT0ZGU0VUKHN0cmluZy5sZW5ndGgpLCAiTGVuZ3RoIn0sCisJe0FDUElfRVhEX1BPSU5URVIsIEFDUElfRVhEX09GRlNFVChzdHJpbmcucG9pbnRlciksICJQb2ludGVyIn0sCisJe0FDUElfRVhEX1NUUklORywgMCwgTlVMTH0KK307CisKK3N0YXRpYyBzdH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c3NfaGFuZGxlciwKKwlOVUxMLAorCU5VTEwsCisJTlVMTAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9leF9kdW1wX29iamVjdAorICoKKyAqIFBBUkFNRVRFUlM6ICBvYmpfZGVzYyAgICAgICAgICAgIC0gRGVzY3JpcHRvciB0byBkdW1wCisgKiAgICAgICAgICAgICAgSW5mbyAgICAgICAgICAgICAgICAtIEluZm8gdGFibGUgY29ycmVzcG9uZGluZyB0byB0aGlzIG9iamVjdAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogV2FsayB0aGUgaW5mbyB0YWJsZSBmb3IgdGhpcyBvYmplY3QKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorYWNwaV9leF9kdW1wX29iamVjdCh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYywKKwkJICAgIHN0cnVjdCBhY3BpX2V4ZHVtcF9pbmZvICppbmZvKQoreworCXU4ICp0YXJnZXQ7CisJY2hhciAqbmFtZTsKKwl1OCBjb3VudDsKKworCWlmICghaW5mbykgeworCQlhY3BpX29zX3ByaW50ZgorCQkgICAgKCJleF9kdW1wX29iamVjdDogRGlzcGxheSBub3QgaW1wbGVtZW50ZWQgZm9yIG9iamVjdCB0eXBlICVzXG4iLAorCQkgICAgIGFjcGlfdXRfZ2V0X29iamVjdF90eXBlX25hbWUob2JqX2Rlc2MpKTsKKwkJcmV0dXJuOworCX0KKworCS8qIEZpcnN0IHRhYmxlIGVudHJ5IG11c3QgY29udGFpbiB0aGUgdGFibGU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pbnRlZ2VyKGNoYXIgKnRpdGxlLCB1MzIgdmFsdWUpCi17Ci0JYWNwaV9vc19wcmludGYoIiUyMHMgOiAlLjJYXG4iLCB0aXRsZSwgdmFsdWUpOwotfQotCiBzdGF0aWMgdm9pZCBhY3BpX2V4X291dF9hZGRyZXNzKGNoYXIgKnRpdGxlLCBhY3BpX3BoeXNpY2FsX2FkZHJlc3MgdmFsdWUpCiB7CiAKQEAgLTQ4MiwxNiArODQyLDE2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfZXhfZHVtcF9ub2RlCisgKiBGVU5DVElPTjogICAgYWNwaV9leF9kdW1wX25hbWVzcGFjZV9ub2RlCiAgKgotICogUEFSQU1FVEVSUzogICpOb2RlICAgICAgICAgICAgICAgLSBEZXNjcmlwdG9yIHRvIGR1bXAKKyAqIFBBUkFNRVRFUlM6ICBOb2RlICAgICAgICAgICAgICAgIC0gRGVzY3JpcHRvciB0byBkdW1wCiAgKiAgICAgICAgICAgICAgRmxhZ3MgICAgICAgICAgICAgICAtIEZvcmNlIGRpc3BsYXkgaWYgVFJVRQogICoKICAqIERFU0NSSVBUSU9OOiBEdW1wcyB0aGUgbWVtYmVycyBvZiB0aGUgZ2l2ZW4uTm9kZQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQgYWNwaV9leF9kdW1wX25vZGUoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsIHUzMiBmbGFncykKK3ZvaWQgYWNwaV9leF9kdW1wX25hbWVzcGFjZV9ub2RlKHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlLCB1MzIgZmxhZ3MpCiB7CiAKIAlBQ1BJX0ZVTkN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aV9leF9kdW1wX3JlZmVyZW5jZV9vYmoKICAqCiAgKiBQQVJBTUVURVJTOiAgT2JqZWN0ICAgICAgICAgICAgICAtIERlc2NyaXB0b3IgdG8gZHVtcAogICoKQEAgLTUyNiwxNCArODg0LDE2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgYWNwaV9leF9kdW1wX3JlZmVyZW5jZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmpfZGVzYykKK3N0YXRpYyB2b2lkIGFjcGlfZXhfZHVtcF9yZWZlcmVuY2Vfb2JqKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjKQogewogCXN0cnVjdCBhY3BpX2J1ZmZlciByZXRfYnVmOwogCWFjcGlfc3RhdHVzIHN0YXR1czsKIAorCXJldF9idWYubGVuZ3RoID0gQUNQSV9BTExPQ0FURV9MT0NBTF9CVUZGRVI7CisKIAlpZiAob2JqX2Rlc2MtPnJlZmVyZW5jZS5vcGNvZGUgPT0gQU1MX0lOVF9OQU1FUEFUSF9PUCkgewogCQlhY3BpX29zX3ByaW50ZigiTmFtZWQgT2JqZWN0ICVwICIsIG9ial9kZXNjLT5yZWZlcmVuY2Uubm9kZSk7Ci0JCXJldF9idWYubGVuZ3RoID0gQUNQSV9BTExPQ0FURV9MT0NBTF9CVUZGRVI7CisKIAkJc3RhdHVzID0KIAkJICAgIGFjcGlfbnNfaGFuZGxlX3RvX3BhdGhuYW1lKG9ial9kZXNjLT5yZWZlcmVuY2Uubm9kZSwKIAkJCQkJICAgICAgICZyZXRfYnVmKTsKQEAgLTU1MSw5ICs5MTEsOSBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9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X3ByaW50ZigiTmFtZXNwYWNlIGxvb2t1cCBmYWlsdXJlLCAlc1xuIiwKIAkJICAgICAgIGFjcGlfZm9ybWF0X2V4Y2VwdGlvbihsb29rdXBfc3RhdHVzKSk7CiB9CiAKQEAgLTExOSwxMCArMTE2LDkgQEAKICAqCiAgKiBQQVJBTUVURVJTOiAgbW9kdWxlX25hbWUgICAgICAgICAtIENhbGxlcidzIG1vZHVsZSBuYW1lIChmb3IgZXJyb3Igb3V0cHV0KQogICogICAgICAgICAgICAgIGxpbmVfbnVtYmVyICAgICAgICAgLSBDYWxsZXIncyBsaW5lIG51bWJlciAoZm9yIGVycm9yIG91dHB1dCkKLSAqICAgICAgICAgICAgICBjb21wb25lbnRfaWQgICAgICAgIC0gQ2FsbGVyJ3MgY29tcG9uZW50IElEIChmb3IgZXJyb3Igb3V0cHV0KQogICogICAgICAgICAgICAgIE1lc3NhZ2UgICAgICAgICAgICAgLSBFcnJvciBtZXNzYWdlIHRvIHVzZSBvbiBmYWlsdXJlCiAgKiAgICAgICAgICAgICAgcHJlZml4X25vZGUgICAgICAgICAtIFByZWZpeCByZWxhdGl2ZSB0byB0aGUgcGF0aAotICogICAgICAgICAgICAgIFBhdGggICAgICAgICAgICAgICAgLSBQYXRoIHRvIHRoZSBub2RlCisgKiAgICAgICAgICAgICAgUGF0aCAgICAgICAgICAgICAgICAtIFBhdGggdG8gdGhlIG5vZGUgKG9wdGlvbmFsKQogICogICAgICAgICAgICAgIG1ldGhvZF9zdGF0dXMgICAgICAgLSBFeGVjdXRpb24gc3RhdHVzCiAgKgogICogUkVUVVJOOiAgICAgIE5vbmUKQEAgLTEzNCw3ICsxMzAsNiBAQAogdm9pZAogYWNwaV9uc19yZXBvcnRfbWV0aG9kX2Vycm9yKGNoYXIgKm1vZHVsZV9uYW1lLAogCQkJICAgIHUzMiBsaW5lX251bWJlciwKLQkJCSAgICB1MzIgY29tcG9uZW50X2lkLAogCQkJICAgIGNoYXIgKm1lc3NhZ2UsCiAJCQ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lIHBhdGggcHJlZml4IGNoYXJhY3RlciAqLwogCi0Jc3dpdGNoIChBQ1BJX0dFVDgoZW5kKSkgeworCXN3aXRjaCAoKmVuZCkgewogCWNhc2UgMDoKIAogCQkvKiBudWxsX25hbWUgKi8KQEAgLTE5OSw5ICsxODcsOSBAQAogCiAJY2FzZSBBTUxfTVVMVElfTkFNRV9QUkVGSVhfT1A6CiAKLQkJLyogTXVsdGlwbGUgbmFtZSBzZWdtZW50cywgNCBjaGFycyBlYWNoICovCisJCS8qIE11bHRpcGxlIG5hbWUgc2VnbWVudHMsIDQgY2hhcnMgZWFjaCwgY291bnQgaW4gbmV4dCBieXRlICovCiAKLQkJZW5kICs9IDIgKyAoKGFjcGlfc2l6ZSkgQUNQSV9HRVQ4KGVuZCArIDEpICogQUNQSV9OQU1FX1NJWkUpOworCQllbmQgKz0gMiArICgqKGVuZCArIDEpICogQUNQSV9OQU1FX1NJWkUpOwogCQlicmVhazsKIAogCWRlZmF1bHQ6CkBAIC0yMTIsNyArMjAwLDcgQEAKIAkJYnJlYWs7CiAJfQogCi0JcGFyc2VyX3N0YXRlLT5hbWwgPSAodTggKikgZW5kOworCXBhcnNlcl9zdGF0ZS0+YW1sID0gZW5kOwogCXJldHVybl9QVFIoKGNoYXIgKilzdGFydCk7CiB9CiAKQEAgLTIyNCw3ICsyMTIsNyBAQAogICogICAgICAgICAgICAgIEFyZyAgICAgICAgICAgICAgICAgLSBXaGVyZSB0aGUgbmFtZXBhdGggd2lsbCBiZSBzdG9yZWQKICAqICAgICAgICAgICAgICBhcmdfY291bnQgICAgICAgICAgIC0gSWYgdGhlIG5hbWVwYXRoIHBvaW50cyB0byBhIGNvbnRyb2wgbWV0aG9kCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBtZXRob2QncyBhcmd1bWVudCBpcyByZXR1cm5lZCBoZXJlLgotICogICAgICAgICAgICAgIG1ldGhvZF9jYWxsICAgICAgICAgLSBXaGV0aGVyIHRoZS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vcF90cmFjZShzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAqaW5mbyk7CisKIHN0YXRpYyBhY3BpX3N0YXR1cyBhY3BpX3BzX2V4ZWN1dGVfcGFzcyhzdHJ1Y3QgYWNwaV9wYXJhbWV0ZXJfaW5mbyAqaW5mbyk7CiAKIHN0YXRpYyB2b2lkCkBAIC01Nyw2ICs2MSwxMzYgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBGVU5DVElPTjogICAgYWNwaV9kZWJ1Z190cmFjZQorICoKKyAqIFBBUkFNRVRFUlM6ICBtZXRob2RfbmFtZSAgICAgLSBWYWxpZCBBQ1BJIG5hbWUgc3RyaW5nCisgKiAgICAgICAgICAgICAgZGVidWdfbGV2ZWwgICAgIC0gT3B0aW9uYWwgbGV2ZWwgbWFzay4gMCB0byB1c2UgZGVmYXVsdAorICogICAgICAgICAgICAgIGRlYnVnX2xheWVyICAgICAtIE9wdGlvbmFsIGxheWVyIG1hc2suIDAgdG8gdXNlIGRlZmF1bHQKKyAqICAgICAgICAgICAgICBGbGFncyAgICAgICAgICAgLSBiaXQgMTogb25lIHNob3QoMSkgb3IgcGVyc2lzdGVudCgwKQorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogRXh0ZXJuYWwgaW50ZXJmYWNlIHRvIGVuYWJsZSBkZWJ1ZyB0cmFjaW5nIGR1cmluZyBjb250cm9sCisgKiAgICAgICAgICAgICAgbWV0aG9kIGV4ZWN1dGlvbgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzCithY3BpX2RlYnVnX3RyYWNlKGNoYXIgKm5hbWUsIHUzMiBkZWJ1Z19sZXZlbCwgdTMyIGRlYnVnX2xheWVyLCB1MzIgZmxhZ3MpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCisJc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4KEFDUElfTVRYX05BTUVTUEFDRSk7CisJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CisJCXJldHVybiAoc3RhdHVzKTsKKwl9CisKKwkvKiBUQkRzOiBWYWxpZGF0ZSBuYW1lLCBhbGxvdyBmdWxsIHBhdGggb3IganVzdCBuYW1lc2VnICovCisKKwlhY3BpX2dibF90cmFjZV9tZXRob2RfbmFtZSA9ICpBQ1BJX0NBU1RfUFRSKHUzMiwgbmFtZSk7CisJYWNwaV9nYmxfdHJhY2VfZmxhZ3MgPSBmbGFnczsKKworCWlmIChkZWJ1Z19sZXZlbCkgeworCQlhY3BpX2dibF90cmFjZV9kYmdfbGV2ZWwgPSBkZWJ1Z19sZXZlbDsKKwl9CisJaWYgKGRlYnVnX2xheWVyKSB7CisJCWFjcGlfZ2JsX3RyYWNlX2RiZ19sYXllciA9IGRlYnVnX2xheWVyOworCX0KKworCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9OQU1FU1BBQ0UpOworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3BzX3N0YXJ0X3RyYWNlCisgKgorICogUEFSQU1FVEVSUzogIEluZm8gICAgICAgIC0gTWV0aG9kIGluZm8gc3RydWN0CisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogU3RhcnQgY29udHJvbCBtZXRob2QgZXhlY3V0aW9uIHRyYWNlCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9wc19zdG9wX3RyYWNlCisgKgorICogUEFSQU1FVEVSUzogIEluZm8gICAgICAgIC0gTWV0aG9kIGluZm8gc3RydWN0CisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogU3RvcCBjb250cm9sIG1ldGhvZCBleGVjdXRpb24gdHJhY2UKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBhY3BpX3BzX3N0b3BfdHJhY2Uoc3RydWN0IGFjcGlfcGFyYW1ldGVyX2luZm8gKmluZm8pCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJc3RhdHVzID0gYWNwaV91dF9hY3F1aXJlX211dGV4KEFDUElfTVRYX05BTUVTUEFDRSk7CisJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CisJCXJldHVybjsKKwl9CisKKwlpZiAoKCFhY3BpX2dibF90cmFjZV9tZXRob2RfbmFtZSkgfHwKKwkgICAgKGFjcGlfZ2JsX3RyYWNlX21ldGhvZF9uYW1lICE9IGluZm8tPm5vZGUtPm5hbWUuaW50ZWdlcikpIHsKKwkJZ290byBleGl0OworCX0KKworCS8qIERpc2FibGUgZnVydGhlciB0cmFjaW5nIGlmIHR5cGUgaXMgb25lLXNob3QgKi8KKworCWlmIChhY3BpX2dibF90cmFjZV9mbGFncyAmIDEpIHsKKwkJYWNwaV9nYmxfdHJhY2VfbWV0aG9kX25hbWUgPSAwOworCQlhY3BpX2dibF90cmFjZV9kYmdfbGV2ZWwgPSAwOworCQlhY3BpX2dibF90cmFjZV9kYmdfbGF5ZXIgPSAwOworCX0KKworCWFjcGlfZGJnX2xldmVsID0gYWNwa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2UKLSAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVybiBkYXRhIGJ1ZmZlcgotICogICAgICAgICAgICAgIHN0cnVjdHVyZV9zaXplICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUgcmV0dXJuIGRhdGEgc3RydWN0IGlzIHJldHVybmVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBUYWtlIHRoZSByZXNvdXJjZSBieXRlIHN0cmVhbSBhbmQgZmlsbCBvdXQgdGhlIGFwcHJvcHJpYXRlCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlIHBvaW50ZWQgdG8gYnkgdGhlIG91dHB1dF9idWZmZXIuIFJldHVybiB0aGUKLSAqICAgICAgICAgICAgICBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgZnJvbSB0aGUgYnl0ZSBzdHJlYW0uCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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SYW5nZSBNaW5pbXVtCisJICogQWRkcmVzcyBSYW5nZSBNYXhpbXVtCisJICogQWRkcmVzcyBUcmFuc2xhdGlvbiBPZmZzZXQKKwkgKiBBZGRyZXNzIExlbmd0aAorCSAqIFR5cGUtU3BlY2lmaWMgQXR0cmlidXRlCisJICovCisJe0FDUElfUlNDX01PVkU2NCwgQUNQSV9SU19PRkZTRVQoZGF0YS5leHRfYWRkcmVzczY0LmdyYW51bGFyaXR5KSwKKwkgQU1MX09GRlNFVChleHRfYWRkcmVzczY0LmdyYW51bGFyaXR5KSwKKwkgNn0KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogYWNwaV9yc19jb252ZXJ0X2dlbmVyYWxfZmxhZ3MgLSBGbGFncyBjb21tb24gdG8gYWxsIGFkZHJlc3MgZGVzY3JpcHRvcnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgc3RydWN0IGFjcGlfcnNjb252ZXJ0X2luZm8gYWNwaV9yc19jb252ZXJ0X2dlbmVyYWxfZmxhZ3NbNl0gPSB7CisJe0FDUElfUlNDX0ZMQUdJTklULCAwLCBBTUxfT0ZGU0VUKGFkZHJlc3MuZmxhZ3MpLAorCSBBQ1BJX1JTQ19UQUJMRV9TSVpFKGFjcGlfcnNfY29udmVydF9nZW5lcmFsX2ZsYWdzKX0sCisKKwkvKiBSZXNvdXJjZSBUeXBlIChNZW1vcnksIElvLCBidXNfbnVtYmVyLCBldGMuKSAqLworCisJe0FDUElfUlNDX01PVkU4LCBBQ1BJX1JTX09GRlNFVChkYXRhLmFkZHJlc3MucmVzb3VyY2VfdHlwZSksCisJIEFNTF9PRkZTRVQoYWRkcmVzcy5yZXNvdXJjZV90eXBlKSwKKwkgMX0sCisKKwkvKiBHZW5lcmFsIEZsYWdzIC0gQ29uc3VtZSwgRGVjb2RlLCBtaW5fZml4ZWQsIG1heF9maXhlZCAqLworCisJe0FDUElfUlNDXzFCSVRGTEFHLCBBQ1BJX1JTX09GRlNFVChkYXRhLmFkZHJlc3MucHJvZHVjZXJfY29uc3VtZXIpLAorCSBBTUxfT0ZGU0VUKGFkZHJlc3MuZmxhZ3MpLAorCSAwfSwKKworCXtBQ1BJX1JTQ18xQklURkxBRywgQUNQSV9SU19PRkZTRVQoZGF0YS5hZGRyZXNzLmRlY29kZSksCisJIEFNTF9PRkZTRVQoYWRkcmVzcy5mbGFncyksCisJIDF9LAorCisJe0FDUElfUlNDXzFCSVRGTEFHLCBBQ1BJX1JTX09GRlNFVChkYXRhLmFkZHJlc3MubWluX2FkZHJlc3NfZml4ZWQpLAorCSBBTUxfT0ZGU0VUKGFkZHJlc3MuZmxhZ3MpLAorCSAyfSwKKworCXtBQ1BJX1JTQ18xQklURkxBRywgQUNQSV9SU19PRkZTRVQoZGF0YS5hZGRyZXNzLm1heF9hZGRyZXNzX2ZpeGVkKSwKKwkgQU1MX09GRlNFVChhZGRyZXNzLmZsYWdzKSwKKwkgM30KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogYWNwaV9yc19jb252ZXJ0X21lbV9mbGFncyAtIEZsYWdzIGNvbW1vbiB0byBNZW1vcnkgYWRkcmVzcyBkZXNjcmlwdG9ycworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3QgYWNwaV9yc2NvbnZlcnRfaW5mbyBhY3BpX3JzX2NvbnZlcnRfbWVtX2ZsYWdzWzVdID0geworCXtBQ1BJX1JTQ19GTEFHSU5JVCwgMCwgQU1MX09GRlNFVChhZGRyZX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RhdGljIHN0cnVjdCBhY3BpX3JzY29udmVydF9pbmZvIGFjcGlfcnNfY29udmVydF9pb19mbGFnc1s0XSA9IHsKKwl7QUNQSV9SU0NfRkxBR0lOSVQsIDAsIEFNTF9PRkZTRVQoYWRkcmVzcy5zcGVjaWZpY19mbGFncyksCisJIEFDUElfUlNDX1RBQkxFX1NJWkUoYWNwaV9yc19jb252ZXJ0X2lvX2ZsYWdzKX0sCisKKwkvKiBJL08tc3BlY2lmaWMgZmxhZ3MgKi8KKworCXtBQ1BJX1JTQ18yQklURkxBRywgQUNQSV9SU19PRkZTRVQoZGF0YS5hZGRyZXNzLmluZm8uaW8ucmFuZ2VfdHlwZSksCisJIEFNTF9PRkZTRVQoYWRkcmVzcy5zcGVjaWZpY19mbGFncyksCisJIDB9LAorCisJe0FDUElfUlNDXzFCSVRGTEFHLCBBQ1BJX1JTX09GRlNFVChkYXRhLmFkZHJlc3MuaW5mby5pby50cmFuc2xhdGlvbiksCisJIEFNTF9PRkZTRVQoYWRkcmVzcy5zcGVjaWZpY19mbGFncyksCisJIDR9LAorCisJe0FDUElfUlNDXzFCSVRGTEFHLAorCSBBQ1BJX1JTX09GRlNFVChkYXRhLmFkZHJlc3MuaW5mby5pby50cmFuc2xhdGlvbl90eXBlKSwKKwkgQU1MX09GRlNFVChhZGRyZXNzLnNwZWNpZmljX2ZsYWdzKSwKKwkgNX0KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZ2V0X2FkZHJlc3NfY29tbW9uCisgKgorICogUEFSQU1FVEVSUzogIFJlc291cmNlICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBpbnRlcm5hbCByZXNvdXJjZSBzdHJ1Y3QKKyAqICAgICAgICAgICAgICBBbWwgICAgICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgQU1M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nN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKKwlyZXR1cm4gKFRSVUUpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2FkZHJlc3MxNl9zdHJlYW0KKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX3NldF9hZGRyZXNzX2NvbW1vbgogICoKLSAqIFBBUkFNRVRFUlM6ICBsaW5rZWRfbGlzdCAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGxpbmtlZCBsaXN0Ci0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSB1c2VyJ3MgcmV0dXJuIGJ1ZmZlcgotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VkIGluIHRoZSBvdXRwdXRfYnVmZmVyIGlzIHJldHVybmVkCisgKiBQQVJBTUVURVJTOiAgQW1sICAgICAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIEFNTCByZXNvdXJjZSBkZXNjcmlwdG9yCisgKiAgICAgICAgICAgICAgUmVzb3VyY2UgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIGludGVybmFsIHJlc291cmNlIHN0cnVjdAogICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqIFJFVFVSTjogICAgICBOb25lCiAgKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIGxpbmtlZCBsaXN0IHJlc291cmNlIHN0cnVjdHVyZSBhbmQgZmlsbHMga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zX2FkZHJlc3MzMl9yZXNvdXJjZQotICoKLSAqIFBBUkFNRVRFUlM6ICBieXRlX3N0cmVhbV9idWZmZXIgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGlucHV0IGJ5dGUKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemUgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSByZXR1cm4gZGF0YSBzdHJ1Y3QgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmUgcG9pbnRlZCB0byBieSB0aGUgb3V0cHV0X2J1ZmZlci4gUmV0dXJuIHRoZQotICogICAgICAgICAgICAgIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBmcm9tIHRoZSBieXRlIHN0cmVhbS4KLSAqCi0gKioqKioqKioqKioqK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mVzb3VyY2Vfc291cmNlLnN0cmluZ19wdHIgPSBOVUxMOworCQkvKiBHZW5lcmljIHJlc291cmNlIHR5cGUsIGp1c3QgY29weSB0aGUgdHlwZV9zcGVjaWZpYyBieXRlICovCisKKwkJYW1sLT5hZGRyZXNzLnNwZWNpZmljX2ZsYWdzID0KKwkJICAgIHJlc291cmNlLT5kYXRhLmFkZHJlc3MuaW5mby50eXBlX3NwZWNpZmljOwogCX0KLQotCS8qIFNldCB0aGUgTGVuZ3RoIHBhcmFtZXRlciAqLwotCi0Jb3V0cHV0X3N0cnVjdC0+bGVuZ3RoID0gKHUzMikgc3RydWN0X3NpemU7Ci0KLQkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwotCi0JKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19hZGRyZXNzMzJfc3RyZWFtCi0gKgotICogUEFSQU1FVEVSUzogIGxpbmtlZF9saXN0ICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgbGlua2VkIGxpc3QKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHVzZXIncyByZXR1cm4gYnVmZmVyCi0gKiAgICAgICAgICAgICAgYnl0ZXNfY29uc3VtZWQgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZWQgaW4gdGhlIG91dHB1dF9idWZmZXIgaXMgcmV0dXJuZWQKLSAqCi0gKiBSR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SBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgaW4gdGhpcyBvcGVyYXRpb24gKi8KLQotCSpieXRlc19jb25zdW1lZCA9IEFDUElfUFRSX0RJRkYoYnVmZmVyLCAqb3V0cHV0X2J1ZmZlcik7Ci0KLQkvKgotCSAqIFNldCB0aGUgbGVuZ3RoIGZpZWxkIHRvIHRoZSBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQKLQkgKiBtaW51cyB0aGUgaGVhZGVyIHNpemUgKDMgYnl0ZXMpCi0JICovCi0JKmxlbmd0aF9maWVsZCA9ICh1MTYpICgqYnl0ZXNfY29uc3VtZWQgLSAzKTsKLQlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2FkZHJlc3M2NF9yZXNvdXJjZQotICoKLSAqIFBBUkFNRVRFUlM6ICBieXRlX3N0cmVhbV9idWZmZXIgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGlucHV0IGJ5dGUKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAg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AodTgpIChpbmRleCArIDEpOwotCQkJc3RydWN0X3NpemUgKz0gQUNQSV9ST1VORF9VUF90b18zMl9iSVRTKHRlbXA4KTsKLQkJfQotCX0KLQotCS8qIFNldCB0aGUgTGVuZ3RoIHBhcmFtZXRlciAqLwotCi0Jb3V0cHV0X3N0cnVjdC0+bGVuZ3RoID0gKHUzMikgc3RydWN0X3NpemU7Ci0KLQkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwotCi0JKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19hZGRyZXNzNjRfc3RyZWFtCi0gKgotICogUEFSQU1FVEVSUzogIGxpbmtlZF9saXN0ICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgbGlua2VkIGxpc3QKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHVzZXIncyByZXR1cm4gYnVmZmVyCi0gKiAgICAgICAgICAgICAgYnl0ZXNfY29uc3VtZWQgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZWQgaW4gdGhlIG91dHB1dF9idWZmZXIgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIGxpbmtlZCBsaXN0IHJlc291cmNlIHN0cnVjdHVyZSBhbmQgZmlsbHMgaW4gdGhlCi0gKiAgICAgICAgICAgIC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Ck7CisKK3N0YXRpYyBhY3BpX3JzX2xlbmd0aAorYWNwaV9yc19zdHJ1Y3Rfb3B0aW9uX2xlbmd0aChzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zb3VyY2UgKnJlc291cmNlX3NvdXJjZSk7CisKK3N0YXRpYyB1MzIKK2FjcGlfcnNfc3RyZWFtX29wdGlvbl9sZW5ndGgodTMyIHJlc291cmNlX2xlbmd0aCwgdTMyIG1pbmltdW1fdG90YWxfbGVuZ3RoKTsKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19nZXRfYnl0ZV9zdHJlYW1fbGVuZ3RoCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19jb3VudF9zZXRfYml0cwogICoKLSAqIFBBUkFNRVRFUlM6ICBsaW5rZWRfbGlzdCAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgbGlua2VkIGxpc3QKLSAqICAgICAgICAgICAgICBzaXplX25lZWRlZCAgICAgICAgIC0gdTMyIHBvaW50ZXIgb2YgdGhlIHNpemUgYnVmZmVyIG5lZWRlZAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBwcm9wZXJseSByZXR1cm4gdGhlIHBhcnNlZCBkYXRhCisgKiBQQVJBTUVURVJTOiAgYml0X2ZpZWxkICAgICAgIC0gRmllbGQgaW4gd2hpY2ggdG8gY291bnQgYml0cworICoKKyAqIFJFVFVSTjogICAgICBOdW1iZXIgb2YgYml0cyBzZXQgd2l0aGluIHRoZSBmaWVsZAorICoKKyAqIERFU0NSSVBUSU9OOiBDb3VudCB0aGUgbnVtYmVyIG9mIGJpdHMgc2V0IGluIGEgcmVzb3VyY2UgZmllbGQuIFVzZWQgZm9yCisgKiAgICAgICAgICAgICAgKFNob3J0IGRlc2NyaXB0b3IpIGludGVycnVwdCBhbmQgRE1BIGxpc3RzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB1OCBhY3BpX3JzX2NvdW50X3NldF9iaXRzKHUxNiBiaXRfZmllbGQpCit7CisJdTggYml0c19zZXQ7CisKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CisKKwlmb3IgKGJpdHNfc2V0ID0gMDsgYml0X2ZpZWxkOyBiaXRzX3NldCsrKSB7CisJCS8qIFplcm8gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdCB0aGF0IGlzIHNldCAqLworCisJCWJpdF9maWVsZCAmPSAoYml0X2ZpZWxkIC0gMSk7CisJfQorCisJcmV0dXJuIChiaXRzX3NldCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfc3RydWN0X29wdGlvbl9sZW5ndGgKKyAqCisgKiBQQVJBTUVURVJTOiAgcmVzb3VyY2Vfc291cmNlICAgICAtIFBvaW50ZXIgdG8gb3B0aW9uYWwgZGVzY3JpcHRvciBmaWVsZAogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCi0gKiBERVNDUklQVElPTjogVGFrZXMgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBwYXJzZXMgaXQgb25jZSwgY2FsY3VsYXRpbmcKLSAqICAgICAgICAgICAgICB0aGUgc2l6ZSBidWZmZXIgbmVlZGVkIHRvIGhvbGQgdGhlIGxpbmtlZCBsaXN0IHRoYXQgY29udmV5cwotICogICAgICAgICAgICAgIHRoZSByZXNvdXJjZSBkYXRhLgorICogREVTQ1JJUFRJT046IENvbW1vbiBjb2RlIHRvIGhhbmRsZSBvcHRpb25hbCByZXNvdXJjZV9zb3VyY2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fcHRyKSB7CisJCXJldHVybiAoKGFjcGlfcnNfbGVuZ3RoKSAocmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfbGVuZ3RoICsgMSkpOworCX0KIAotCXdoaWxlICghZG9uZSkgewotCQkvKiBJbml0IHRoZSB2YXJpYWJsZSB0aGF0IHdpbGwgaG9sZCB0aGUgc2l6ZSB0byBhZGQgdG8gdGhlIHRvdGFsLiAqLworCXJldHVybiAoMCk7Cit9CiAKLQkJc2VnbWVudF9zaXplID0gMDsKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfc3RyZWFtX29wdGlvbl9sZW5ndGgKKyAqCisgKiBQQVJBTUVURVJTOiAgcmVzb3VyY2VfbGVuZ3RoICAgICAtIExlbmd0aCBmcm9tIHRoZSByZXNvdXJjZSBoZWFkZXIKKyAqICAgICAgICAgICAgICBtaW5pbXVtX3RvdGFsX2xlbmd0aCAtIE1pbmltdW0gbGVuZ3RoIG9mIHRoaXMgcmVzb3VyY2UsIGJlZm9yZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbnkgb3B0aW9uYWwgZmllbGRzLiBJbmNsdWRlcyBoZWFkZXIgc2l6ZQorICoKKyAqIFJFVFVSTjogICAgICBMZW5ndGggb2Ygb3B0aW9uYWwgc3RyaW5nICgwIGlmIG5vIHN0cmluZyBwcmVzZW50KQorICoKKyAqIERFU0NSSVBUSU9OOiBDb21tb24gY29kZSB0byBoYW5kbGUgb3B0aW9uYWwgcmVzb3VyY2Vfc291cmNlX2luZGV4IGFuZAorICogICAgICAgICAgICAgIHJlc291cmNlX3NvdXJjZSBmaWVsZHMgaW4gc29tZSBMYXJnZSBkZXNjcmlwdG9ycy4gVXNlZCBkdXJpbmcKKyAqICAgICAgICAgICAgICBzdHJlYW0tdG8tbGlzdCBjb252ZXJzaW9u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uCisJICovCisJaWYgKHJlc291cmNlX2xlbmd0aCA+IG1pbmltdW1fYW1sX3Jlc291cmNlX2xlbmd0aCkgeworCQkvKiBDb21wdXRlIHRoZSBsZW5ndGggb2YgdGhlIG9wdGlvbmFsIHN0cmluZyAqLworCisJCXN0cmluZ19sZW5ndGggPQorCQkgICAgcmVzb3VyY2VfbGVuZ3RoIC0gbWluaW11bV9hbWxfcmVzb3VyY2VfbGVuZ3RoIC0gMTsKKwl9CisKKwkvKiBSb3VuZCB1cCBsZW5ndGggdG8gMzIgYml0cyBmb3IgaW50ZXJuYWwgc3RydWN0dXJlIGFsaWdubWVudCAqLworCisJcmV0dXJuIChBQ1BJX1JPVU5EX1VQX3RvXzMyX2JJVFMoc3RyaW5nX2xlbmd0aCkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2dldF9hbWxfbGVuZ3RoCisgKgorICogUEFSQU1FVEVSUzogIFJlc291cmNlICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBsaW5rZWQgbGlzdAorICogICAgICAgICAgICAgIHNpemVfbmVlZGVkICAgICAgICAgLSBXaGVyZSB0aGUgcmVxdWlyZWQgc2l6ZSBpcyByZXR1cm5lZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogVGFrZXMgYSBsaW5rZWQgbGlzdCBvZiBpbnRlcm5hbCByZXNvdXJjZSBkZXNjcmlwdG9ycyBhbmQKKyAqICAgICAgICAgICAgICBjYWxjdWxhdGVzIHRoZSBzaXplIGJ1ZmZlciBuZWVkZWQgdG8gaG9sZCB0aGUgY29ycmVzcG9uZGluZworICogICAgICAgICAgICAgIGV4dGVybmFsIHJlc291cmNlIGJ5dGUgc3RyZWFtLgorICoKKyAqKioqKioqKioqKioqKioq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ICogICAgICAgICAgICAgIGJ5dGVfc3RyZWFtX2J1ZmZlcl9sZW5ndGggLSBTaXplIG9mIGJ5dGVfc3RyZWFtX2J1ZmZlcgotICogICAgICAgICAgICAgIHNpemVfbmVlZGVkICAgICAgICAgICAgIC0gdTMyIHBvaW50ZXIgb2YgdGhlIHNpemUgYnVmZmVyCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZWVkZWQgdG8gcHJvcGVybHkgcmV0dXJuIHRoZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VkIGRhdGEKKyAqIFBBUkFNRVRFUlM6ICBhbWxfYnVmZmVyICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgYnl0ZSBzdHJlYW0KKyAqICAgICAgICAgICAgICBhbWxfYnVmZmVyX2xlbmd0aCAgIC0gU2l6ZSBvZiBhbWxfYnVmZmVyCisgKiAgICAgICAgICAgICAgc2l6ZV9uZWVkZWQgICAgICAgICAtIFdoZXJlIHRoZSBzaXplIG5lZWRlZCBpcyByZXR1cm5lZAogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCi0gKiBERVNDUklQVElPTjogVGFrZXMgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBwYXJzZXMgaXQgb25jZSwgY2FsY3VsYXRpbmcKLSAqICAgICAgICAgICAgICB0aGUgc2l6ZSBidWZmZXIgbmVlZGVkIHRvIGhvbGQgdGhlIGxpbmtlZCBsaXN0IHRoYXQgY29udmV5cwotICogICAgICAgICAgICAgIHRoZSByZXNvdXJjZSBkYXRhLgorICogREVTQ1JJUFRJT046IFRha2VzIGFuIGV4dGVybmFsIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBjYWxjdWxhdGVzIHRoZSBzaXplCisgKiAgICAgICAgICAgICAgYnVmZmVyIG5lZWRlZCB0byBob2xkIHRoZSBjb3JyZXNwb25kaW5nIGludGVybmFsIHJl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sIGlycV9kYXRhLT5pbnRlcnJ1cHRzW2luZGV4XSk7Ci0JfQotCi0JYWNwaV9vc19wcmludGYoIilcbiIpOwotCXJldHVybjsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX2RtYQotICoKLSAqIFBBUkFNRVRFUlM6ICBEYXRhICAgICAgICAgICAgLSBwb2ludGVyIHRvIHRoZSByZXNvdXJjZSBzdHJ1Y3R1cmUgdG8gZHVtcC4KLSAqCi0gKiBSRVRVUk46ICAgICAgTm9uZQotICoKLSAqIERFU0NSSVBUSU9OOiBQcmludHMgb3V0IHRoZSB2YXJpb3VzIG1lbWJlcnMgb2YgdGhlIERhdGEgc3RydWN0dXJlIHR5cGUuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIHZvaWQgYWNwaV9yc19kdW1wX2RtYSh1bmlvbiBhY3BpX3Jlc291cmNlX2RhdGEgKmRhdGEpCi17Ci0Jc3RydWN0IGFjcGlfcmVzb3VyY2VfZG1hICpkbWFfZGF0YSA9IChzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9kbWEgKilkYXRhOwotCXU4IGluZGV4ID0gMDsKLQotCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKLQotCWFjcGlfb3NfcHJpbnRmKCJETUEgUmVzb3VyY2VcbiIpOwotCi0Jc3dpdGNoIChkbWFfZGF0YS0+dHlwZSkgewotCWNhc2UgQUNQSV9DT01QQVRJQklMSVRZOgotCQlhY3BpX29zX3ByaW50ZigiICBDb21wYXRpYmlsaXR5IG1vZGVcbiIpOwotCQlicmVhazsKLQotCWNhc2UgQUNQSV9UWVBFX0E6Ci0JCWFjcGlfb3NfcHJpbnRmKCIg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3BpX29zX3ByaW50ZigiVmVuZG9yIFNwZWNpZmljIFJlc291cmNlXG4iKTsKLQotCWFjcGlfb3NfcHJpbnRmKCIgIExlbmd0aDogJTA4WFxuIiwgdmVuZG9yX2RhdGEtPmxlbmd0aCk7Ci0KLQlmb3IgKGluZGV4ID0gMDsgaW5kZXggPCB2ZW5kb3JfZGF0YS0+bGVuZ3RoOyBpbmRleCsrKSB7Ci0JCWFjcGlfb3NfcHJpbnRmKCIgIEJ5dGUgJVg6ICUwOFhcbiIsCi0JCQkgICAgICAgaW5kZXgsIHZlbmRvcl9kYXRhLT5yZXNlcnZlZFtpbmRleF0pOwotCX0KLQotCXJldHVybjsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX21lbW9yeTI0Ci0gKgotICogUEFSQU1FVEVSUzogIERhdGEgICAgICAgICAgICAtIHBvaW50ZXIgdG8gdGhlIHJlc291cmNlIHN0cnVjdHVyZSB0byBkdW1wLgotICoKLSAqIFJFVFVSTjogICAgICBOb25lCi0gKgotICogREVTQ1JJUFRJT046IFByaW50cyBvdXQgdGhlIHZhcmlvdXMgbWVtYmVycyBvZiB0aGUgRGF0YSBzdHJ1Y3R1cmUgdHlwZS4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1zdGF0aWMgdm9pZCBhY3BpX3JzX2R1bXBfbWVtb3J5MjQodW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpkYXRhKQotewotCXN0cnVjdCBhY3BpX3Jlc291cmNlX21lbTI0ICptZW1vcnkyNF9kYXRhID0KLQkgICAgKHN0cnVjdCBhY3BpX3Jlc291cmNlX21lbTI0ICopZGF0YTsKLQotCUFDUElfRlVOQ1RJT05f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YnJlYWs7CiAKIAkJZGVmYXVsdDoKLQkJCWFjcGlfb3NfcHJpbnRmCi0JCQkgICAgKCIgIFR5cGUgU3BlY2lmaWM6IEludmFsaWQgY2FjaGUgYXR0cmlidXRlXG4iKTsKLQkJCWJyZWFrOworCQkJYWNwaV9vc19wcmludGYoIioqKiogSW52YWxpZCB0YWJsZSBvcGNvZGUgWyVYXSAqKioqXG4iLAorCQkJCSAgICAgICB0YWJsZS0+b3Bjb2RlKTsKKwkJCXJldHVybjsKIAkJfQogCi0JCWFjcGlfb3NfcHJpbnRmKCIgIFR5cGUgU3BlY2lmaWM6IFJlYWQlc1xuIiwKLQkJCSAgICAgICBBQ1BJX1JFQURfV1JJVEVfTUVNT1JZID09Ci0JCQkgICAgICAgYWRkcmVzczE2X2RhdGEtPmF0dHJpYnV0ZS5tZW1vcnkuCi0JCQkgICAgICAgcmVhZF93cml0ZV9hdHRyaWJ1dGUgPyAiL1dyaXRlIiA6ICIgT25seSIpOworCQl0YWJsZSsrOworCQljb3VudC0tOworCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX3Jlc291cmNlX3NvdXJjZQorICoKKyAqIFBBUkFNRVRFUlM6ICByZXNvdXJjZV9zb3VyY2UgICAgIC0gUG9pbnRlciB0byBhIFJlc291cmNlIFNvdXJjZSBzdHJ1Y3QKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBDb21tb24gcm91dGluZSBmb3IgZHVtcGluZyB0aGUgb3B0aW9uYWwgcmVzb3VyY2Vfc291cmNlIGFuZCB0aGUKKyAqICAgICAgICAgICAgICBjb3JyZXNwb25kaW5nIHJlc291cmNlX3NvdXJjZV9pbmRleC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorYWNwaV9yc19kdW1wX3Jlc291cmNlX3NvdXJjZShzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zb3VyY2UgKnJlc291cmNlX3NvdXJjZSkKK3sKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CisKKwlpZiAocmVzb3VyY2Vfc291cmNlLT5pbmRleCA9PSAweEZGKSB7CisJCXJldHVybjsKKwl9CisKKwlhY3BpX3JzX291dF9pbnRlZ2VyOCgiUmVzb3VyY2UgU291cmNlIEluZGV4IiwgcmVzb3VyY2Vfc291cmNlLT5pbmRleCk7CisKKwlhY3BpX3JzX291dF9zdHJpbmcoIlJlc291cmNlIFNvdXJjZSIsCisJCQkgICByZXNvdXJjZV9zb3VyY2UtPnN0cmluZ19wdHIgPworCQkJICAgcmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfcHRyIDogIltOb3QgU3BlY2lmaWVkXSIpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXBfYWRkcmVzc19jb21tb24KKyAqCisgKiBQQVJBTUVURVJTOiAgUmVzb3VyY2UgICAgICAgIC0gUG9pbnRlciB0byBhbiBpbnRlcm5hbCByZXNvdXJjZSBkZXNjcmlwdG9yCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogRHVtcCB0aGUgZmllbGRzIHRoYXQgYXJlIGNvbW1vbiB0byBhbGwgQWRkcmVzcyByZXNvdXJjZQorICogICAgICAgICAgICAgIGRlc2NyaXB0b3JzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljI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mVzcyBMZW5ndGg6ICUwOFhcbiIsCi0JCSAgICAgICBhZGRyZXNzMTZfZGF0YS0+YWRkcmVzc19sZW5ndGgpOwotCi0JaWYgKDB4RkYgIT0gYWRkcmVzczE2X2RhdGEtPnJlc291cmNlX3NvdXJjZS5pbmRleCkgewotCQlhY3BpX29zX3ByaW50ZigiICBSZXNvdXJjZSBTb3VyY2UgSW5kZXg6ICVYXG4iLAotCQkJICAgICAgIGFkZHJlc3MxNl9kYXRhLT5yZXNvdXJjZV9zb3VyY2UuaW5kZXgpOwotCi0JCWFjcGlfb3NfcHJpbnRmKCIgIFJlc291cmNlIFNvdXJjZTogJXNcbiIsCi0JCQkgICAgICAgYWRkcmVzczE2X2RhdGEtPnJlc291cmNlX3NvdXJjZS5zdHJpbmdfcHRyKTsKLQl9Ci0KLQlyZXR1cm47Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9hZGRyZXNzMzIKLSAqCi0gKiBQQVJBTUVURVJTOiAgRGF0YSAgICAgICAgICAgIC0gcG9pbnRlciB0byB0aGUgcmVzb3VyY2Ugc3RydWN0dXJlIHRvIGR1bXAuCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUKLSAqCi0gKiBERVNDUklQVElPTjogUHJpbnRzIG91dCB0aGUgdmFyaW91cyBtZW1iZXJzIG9mIHRoZSBEYXRhIHN0cnVjdHVyZSB0eXBlLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyB2b2lkIGFjcGlfcnNfZHVtcF9hZGRyZXNzMzIodW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpkYXRhKQotewotCXN0cnVjdCBhY3BpX3Jlc291cmNlX2FkZH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R5cGVfc3BlY2lmaWNfYXR0cmlidXRlcykpOwotCi0JaWYgKDB4RkYgIT0gYWRkcmVzczY0X2RhdGEtPnJlc291cmNlX3NvdXJjZS5pbmRleCkgewotCQlhY3BpX29zX3ByaW50ZigiICBSZXNvdXJjZSBTb3VyY2UgSW5kZXg6ICVYXG4iLAotCQkJICAgICAgIGFkZHJlc3M2NF9kYXRhLT5yZXNvdXJjZV9zb3VyY2UuaW5kZXgpOwotCi0JCWFjcGlfb3NfcHJpbnRmKCIgIFJlc291cmNlIFNvdXJjZTogJXNcbiIsCi0JCQkgICAgICAgYWRkcmVzczY0X2RhdGEtPnJlc291cmNlX3NvdXJjZS5zdHJpbmdfcHRyKTsKLQl9Ci0KLQlyZXR1cm47Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9leHRlbmRlZF9pcnEKLSAqCi0gKiBQQVJBTUVURVJTOiAgRGF0YSAgICAgICAgICAgIC0gcG9pbnRlciB0byB0aGUgcmVzb3VyY2Ugc3RydWN0dXJlIHRvIGR1bXAuCi0gKgotICogUkVUVVJOOiAgICAgIE5vbmUKLSAqCi0gKiBERVNDUklQVElPTjogUHJpbnRzIG91dCB0aGUgdmFyaW91cyBtZW1iZXJzIG9mIHRoZSBEYXRhIHN0cnVjdHVyZSB0eXBlLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyB2b2lkIGFjcGlfcnNfZHVtcF9leHRlbmRlZF9pcnEodW5pb24gYWNwaV9yZXNvdXJjZV9kYXRhICpkYXRhKQotewotCXN0cnVjdCBhY3BpX3Jlc291cmNlX2V4dF9pcnEgKmV4dF9pcnFfZGF0YSA9Ci0JICAgIChzdHJ1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T5pbnRlcnJ1cHRzW2luZGV4XSk7Ci0JfQotCi0JYWNwaV9vc19wcmludGYoIilcbiIpOwotCi0JaWYgKDB4RkYgIT0gZXh0X2lycV9kYXRhLT5yZXNvdXJjZV9zb3VyY2UuaW5kZXgpIHsKLQkJYWNwaV9vc19wcmludGYoIiAgUmVzb3VyY2UgU291cmNlIEluZGV4OiAlWCIsCi0JCQkgICAgICAgZXh0X2lycV9kYXRhLT5yZXNvdXJjZV9zb3VyY2UuaW5kZXgpOwotCi0JCWFjcGlfb3NfcHJpbnRmKCIgIFJlc291cmNlIFNvdXJjZTogJXMiLAotCQkJICAgICAgIGV4dF9pcnFfZGF0YS0+cmVzb3VyY2Vfc291cmNlLnN0cmluZ19wdHIpOwotCX0KLQotCXJldHVybjsKKwlhY3BpX3JzX2R1bXBfZGVzY3JpcHRvcihyZXNvdXJjZSwgYWNwaV9yc19kdW1wX2dlbmVyYWxfZmxhZ3MpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXBfcmVzb3VyY2VfbGlzdAogICoKLSAqIFBBUkFNRVRFUlM6ICBSZXNvdXJjZSAgICAgICAgLSBwb2ludGVyIHRvIHRoZSByZXNvdXJjZSBzdHJ1Y3R1cmUgdG8gZHVtcC4KKyAqIFBBUkFNRVRFUlM6ICByZXNvdXJjZV9saXN0ICAgICAgIC0gUG9pbnRlciB0byBhIHJlc291cmNlIGRlc2NyaXB0b3IgbGlzdAogICoKICAqIFJFVFVSTjogICAgICBOb25lCiAgKgpAQCAtOTY0LDE0OCArNTk0LDE3MSBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQgYWNwaV9yc19kdW1wX3Jlc291cmNlX2xp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dCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlLAorCQkJCQkgICBwcnRfZWxlbWVudCwgcHJ0X2VsZW1lbnQtPmxlbmd0aCk7CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX291dCoKKyAqCisgKiBQQVJBTUVURVJTOiAgVGl0bGUgICAgICAgLSBOYW1lIG9mIHRoZSByZXNvdXJjZSBmaWVsZAorICogICAgICAgICAgICAgIFZhbHVlICAgICAgIC0gVmFsdWUgb2YgdGhlIHJlc291cmNlIGZpZWxkCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogTWlzY2VsbGFuZW91cyBoZWxwZXIgZnVuY3Rpb25zIHRvIGNvbnNpc3RlbnRseSBmb3JtYXQgdGhlCisgKiAgICAgICAgICAgICAgb3V0cHV0IG9mIHRoZSByZXNvdXJjZSBkdW1wIHJvdXRpbmVzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfc3RyaW5nKGNoYXIgKnRpdGxlLCBjaGFyICp2YWx1ZSkKK3sKKwlhY3BpX29zX3ByaW50ZigiJTI3cyA6ICVzXG4iLCB0aXRsZSwgdmFsdWUpOworfQorCitzdGF0aWMgdm9pZCBhY3BpX3JzX291dF9pbnRlZ2VyOChjaGFyICp0aXRsZSwgdTggdmFsdWUpCit7CisJYWNwaV9vc19wcmludGYoIiUyN3MgOiAlMi4yWFxuIiwgdGl0bGUsIHZhbHVlKTsKK30KKworc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfaW50ZWdlcjE2KGNoYXIgKnRpdGxlLCB1MTYgdmFsdWUpCit7CisJYWNwaV9vc19wcmludGYoIiUyN3MgOiAlNC40WFxuIiwgdGl0bGUsIHZhbHVlKTsKK30KKworc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfaW50ZWdlcjMyKGNoYXIgKnRpdGxlLCB1MzIgdmFsdWUpCit7CisJYWNwaV9vc19wcmludGYoIiUyN3MgOiAlOC44WFxuIiwgdGl0bGUsIHZhbHVlKTsKK30KKworc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfaW50ZWdlcjY0KGNoYXIgKnRpdGxlLCB1NjQgdmFsdWUpCit7CisJYWNwaV9vc19wcmludGYoIiUyN3MgOiAlOC44WCU4LjhYXG4iLCB0aXRsZSwgQUNQSV9GT1JNQVRfVUlOVDY0KHZhbHVlKSk7Cit9CisKK3N0YXRpYyB2b2lkIGFjcGlfcnNfb3V0X3RpdGxlKGNoYXIgKnRpdGxlKQoreworCWFjcGlfb3NfcHJpbnRmKCIlMjdzIDogIiwgdGl0bGUpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXAqTGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICBMZW5ndGggICAgICAtIE51bWJlciBvZiBlbGVtZW50cyBpbiB0aGUgbGlzdAorICogICAgICAgICAgICAgIERhdGEgICAgICAgIC0gU3RhcnQgb2YgdGhlIGxpc3QKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBNaXNjZWxsYW5lb3VzIGZ1bmN0aW9ucyB0byBkdW1wIGxpc3RzIG9mIHJhdyBkYXRhCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgYWNwaV9yc19kdW1wX2J5dGVfbGlzdCh1MTYgbGVuZ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aXZlcnMvYWNwaS9yZXNvdXJjZXMvcnNpby5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyoKLSAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMDUsIFIuIEJ5cm9uIE1vb3JlCisgKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDA2LCBSLiBCeXJvbiBNb29yZQogICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAqCiAgKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKQEAgLTQ5LDQyOCArNDksMjA2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfaW9fcmVzb3VyY2UKLSAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVyb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cmUgKi8KLQotCSpzdHJ1Y3R1cmVfc2l6ZSA9IHN0cnVjdF9zaXplOwotCXJldHVybl9BQ1BJX1NUQVRVUyhBRV9PSyk7Ci19CisJe0FDUElfUlNDX01PVkUxNiwgQUNQSV9SU19PRkZTRVQoZGF0YS5pby5taW5pbXVtKSwKKwkgQU1MX09GRlNFVChpby5taW5pbXVtKSwKKwkgMn0KK307CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZml4ZWRfaW9fcmVzb3VyY2UKLSAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVybiBkYXRhIGJ1ZmZlcgotICogICAgICAgICAgICAgIHN0cnVjdHVyZV9zaXplICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUgcmV0dXJuIGRhdGEgc3RydWN0IGlzIHJldHVybmVkCi0g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nVmZmVyICs9IDI7Ci0JdGVtcDggPSAqYnVmZmVyOwotCi0Jb3V0cHV0X3N0cnVjdC0+ZGF0YS5maXhlZF9pby5yYW5nZV9sZW5ndGggPSB0ZW1wODsKLQotCS8qIFNldCB0aGUgTGVuZ3RoIHBhcmFtZXRlciAqLwotCi0Jb3V0cHV0X3N0cnVjdC0+bGVuZ3RoID0gKHUzMikgc3RydWN0X3NpemU7Ci0KLQkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwotCi0JKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKLX0KKwl7QUNQSV9SU0NfTU9WRTE2LCBBQ1BJX1JTX09GRlNFVChkYXRhLmZpeGVkX2lvLmFkZHJlc3MpLAorCSBBTUxfT0ZGU0VUKGZpeGVkX2lvLmFkZHJlc3MpLAorCSAxfQorfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19pb19zdHJlYW0KLSAqCi0gKiBQQVJBTUVURVJTOiAgbGlua2VkX2xpc3QgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBsaW5rZWQgbGlzdAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgdXNlcidzIHJldHVybiBidWZmZXIKLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlZCBpbiB0aGUgb3V0cHV0X2J1ZmZlciBpcyByZXR1cm5lZAotICoKLSAqIFJFVFVSTjogICAg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0cmVhbV9idWZmZXIgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGlucHV0IGJ5dGUKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemUgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSByZXR1cm4gZGF0YSBzdHJ1Y3QgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmUgcG9pbnRlZCB0byBieSB0aGUgb3V0cHV0X2J1ZmZlci4gUmV0dXJuIHRoZQotICogICAgICAgICAgICAgIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBmcm9tIHRoZSBieXRlIHN0cmVhbS4KKyAqIGFjcGlfcnNfY29udmVydF9lbmRfdGFnCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2lycV9yZXNvdXJjZQotICoKLSAqIFBBUkFNRVRFUlM6ICBieXRlX3N0cmVhbV9idWZmZXIgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGlucHV0IGJ5dGUKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemUgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSByZXR1cm4gZGF0YSBzdHJ1Y3QgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmUgcG9pbnRlZCB0byBieSB0aGUgb3V0cHV0X2J1ZmZlci4gUmV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IGFtbF9yZXNvdXJjZV9pcnFfbm9mbGFncyl9Cit9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2V4dGVuZGVkX2lycV9yZXNvdXJjZQotICoKLSAqIFBBUkFNRVRFUlM6ICBieXRlX3N0cmVhbV9idWZmZXIgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGlucHV0IGJ5dGUKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemUgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSByZXR1cm4gZGF0YSBzdHJ1Y3QgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdH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TX09GRlNFVChkYXRhLmV4dGVuZGVkX2lycS5yZXNvdXJjZV9zb3VyY2UpLAorCSBBQ1BJX1JTX09GRlNFVChkYXRhLmV4dGVuZGVkX2lycS5pbnRlcnJ1cHRzWzBdKSwKKwkgc2l6ZW9mKHN0cnVjdCBhbWxfcmVzb3VyY2VfZXh0ZW5kZWRfaXJxKX0KK307CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZXh0ZW5kZWRfaXJxX3N0cmVhbQotICoKLSAqIFBBUkFNRVRFUlM6ICBsaW5rZWRfbGlzdCAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGxpbmtlZCBsaXN0Ci0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSB1c2VyJ3MgcmV0dXJuIGJ1ZmZlcgotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VkIGluIHRoZSBvdXRwdXRfYnVmZmVyIGlzIHJldHVybmVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBUYWtlIHRoZSBsaW5rZWQgbGlzdCByZXNvdXJjZSBzdHJ1Y3R1cmUgYW5kIGZpbGxzIGluIHRoZQotICogICAgICAgICAgICAgIHRoZSBhcHByb3ByaWF0ZSBieXRlcyBpbiBhIGJ5dGUgc3RyZWFtCisgKiBhY3BpX3JzX2NvbnZlcnRfZG1hCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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FsaWQgdHlwZSAqLwotCQlicmVhazsKLQl9Ci0KLQlyZXR1cm4gKDB4RkYpOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2J5dGVfc3RyZWFtX3RvX2xpc3QKLSAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBieXRlIHN0cmVhbQotICogICAgICAgICAgICAgIGJ5dGVfc3RyZWFtX2J1ZmZlcl9sZW5ndGggLSBMZW5ndGggb2YgYnl0ZV9zdHJlYW1fYnVmZmVyCi0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBidWZmZXIgdGhhdCB3aWxsCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250YWluIHRoZSBvdXRwdXQgc3RydWN0dXJlcworICogUEFSQU1FVEVSUzogIEFtbCAgICAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBieXRlIHN0cmVhbQorICogICAgICAgICAgICAgIGFtbF9sZW5ndGggICAgICAgICAgLSBMZW5ndGggb2YgQW1sCisgKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAtIFBvaW50ZXIgdG8gdGhlIGJ1ZmZlciB0aGF0IHdpbGwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbiB0aGUgb3V0cHV0IHN0cnVjdHVyZXMKICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgpAQCAtMTAyLDI0MSArNjIsNzYgQEAKICAqICAgICAgICAgICAgICBsaW5rZWQgbGlzdCBvZiByZXNvdXJjZXMgaW4gdGhlIGNhbGxl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3BpX3JzX2dldF9ieXRlX3N0cmVhbV9sZW5ndGgoKQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIHNpemUgb2YgdGhlIG91dHB1dF9idWZmZXIgaXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGd1YXJhbnRlZWQgdG8gYmUgPj0KLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVfc3RyZWFtX3NpemVfbmVlZGVkCi0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBidWZmZXIgdGhhdCB3aWxsCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250YWluIHRoZSBieXRlIHN0cmVhbQorICogUEFSQU1FVEVSUzogIFJlc291cmNlICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBsaW5rZWQgbGlzdAorICogICAgICAgICAgICAgIGFtbF9zaXplX25lZWRlZCAgICAgLSBDYWxjdWxhdGVkIHNpemUgb2YgdGhlIGJ5dGUgc3RyZWFtCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5lZWRlZCBmcm9tIGNhbGxpbmcgYWNwaV9yc19nZXRfYW1sX2xlbmd0aCgpCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBzaXplIG9mIHRoZSBvdXRwdXRfYnVmZmVyIGlzCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGd1YXJhbnRlZWQgdG8gYmUgPj0gYW1sX3NpemVfbmVlZGVkCisgKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAtIFBvaW50ZXIgdG8gdGhlIGJ1ZmZlciB0aGF0IHdpbGwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbiB0aGUgYn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NvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVybiBkYXRhIGJ1ZmZlcgotICogICAgICAgICAgICAgIHN0cnVjdHVyZV9zaXplICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUgcmV0dXJuIGRhdGEgc3RydWN0IGlzIHJldHVybmVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBUYWtlIHRoZSByZXNvdXJjZSBieXRlIHN0cmVhbSBhbmQgZmlsbCBvdXQgdGhlIGFwcHJvcHJpYXRlCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlIHBvaW50ZWQgdG8gYnkgdGhlIG91dHB1dF9idWZmZXIuIFJldHVybiB0aGUKLSAqICAgICAgICAgICAgICBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgZnJvbSB0aGUgYnl0ZSBzdHJlYW0uCisgKiBhY3BpX3JzX2NvbnZlcnRfbWVtb3J5MjQKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotYWNwaV9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wkgKiBBZGRyZXNzIEJhc2UgQWxpZ25tZW50CisJICogUmFuZ2UgTGVuZ3RoCisJICovCisJe0FDUElfUlNDX01PVkUzMiwgQUNQSV9SU19PRkZTRVQoZGF0YS5tZW1vcnkzMi5taW5pbXVtKSwKKwkgQU1MX09GRlNFVChtZW1vcnkzMi5taW5pbXVtKSwKKwkgNH0KK307CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfbWVtb3J5MzJfcmFuZ2VfcmVzb3VyY2UKLSAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVybiBkYXRhIGJ1ZmZlcgotICogICAgICAgICAgICAgIHN0cnVjdHVyZV9zaXplICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUgcmV0dXJuIGRhdGEgc3RydWN0IGlzIHJldHVybmVkCi0gKgotICogU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LQlidWZmZXIgKz0gMjsKLQkqYnl0ZXNfY29uc3VtZWQgPSAoYWNwaV9zaXplKSB0ZW1wMTYgKyAzOworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBhY3BpX3JzX2dldF92ZW5kb3Jfc21hbGwKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0Jb3V0cHV0X3N0cnVjdC0+aWQgPSBBQ1BJX1JTVFlQRV9NRU0zMjsKK3N0cnVjdCBhY3BpX3JzY29udmVydF9pbmZvIGFjcGlfcnNfZ2V0X3ZlbmRvcl9zbWFsbFszXSA9IHsKKwl7QUNQSV9SU0NfSU5JVEdFVCwgQUNQSV9SRVNPVVJDRV9UWVBFX1ZFTkRPUiwKKwkgQUNQSV9SU19TSVpFKHN0cnVjdCBhY3BpX3Jlc291cmNlX3ZlbmRvciksCisJIEFDUElfUlNDX1RBQkxFX1NJWkUoYWNwaV9yc19nZXRfdmVuZG9yX3NtYWxsKX0sCisKKwkvKiBMZW5ndGggb2YgdGhlIHZlbmRvciBkYXRhIChieXRlIGNvdW50KSAqLworCisJe0FDUElfUlNDX0NPVU5UMTYsIEFDUElfUlNfT0ZGU0VUKGRhdGEudmVuZG9yLmJ5dGVfbGVuZ3RoKSwKKwkgMCwKKwkgc2l6ZW9mKHU4KX0KKwksCisKKwkvKiBWZW5kb3IgZGF0YSAqLworCisJe0FDUElfUlNDX01PVkU4LCBBQ1BJX1JTX09GRlNFVChkYXRhLnZlbmRvci5ieXRlX2RhdGFbMF0pLAorCSBzaXplb2Yoc3RydWN0IGFtbF9yZXNvdXJjZV9zbWFsbF9oZWFkZXIpLAorCSAwfQorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBhY3BpX3JzX2dldF92ZW5kb3JfbGFyZ2UKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdHJ1Y3QgYWNwaV9yc2NvbnZlcnRfaW5mbyBhY3BpX3JzX2dldF92ZW5kb3JfbGFyZ2VbM10gPSB7CisJe0FDUElfUlNDX0lOSVRHRVQsIEFDUElfUkVTT1VSQ0VfVFlQRV9WRU5ET1IsCisJIEFDUElfUlNfU0laRShzdHJ1Y3QgYWNwaV9yZXNvdXJjZV92ZW5kb3IpLAorCSBBQ1BJX1JTQ19UQUJMRV9TSVpFKGFjcGlfcnNfZ2V0X3ZlbmRvcl9sYXJnZSl9LAorCisJLyogTGVuZ3RoIG9mIHRoZSB2ZW5kb3IgZGF0YSAoYnl0ZSBjb3VudCkgKi8KKworCXtBQ1BJX1JTQ19DT1VOVDE2LCBBQ1BJX1JTX09GRlNFVChkYXRhLnZlbmRvci5ieXRlX2xlbmd0aCksCisJIDAsCisJIHNpemVvZih1OCl9CisJLAorCisJLyogVmVuZG9yIGRhdGEgKi8KKworCXtBQ1BJX1JTQ19NT1ZFOCwgQUNQSV9SU19PRkZTRVQoZGF0YS52ZW5kb3IuYnl0ZV9kYXRhWzBdKSwKKwkgc2l6ZW9mKHN0cnVjdCBhbWxfcmVzb3VyY2VfbGFyZ2VfaGVhZGVyKSwKKwkgMH0KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogYWNwaV9yc19zZXRfdmVuZG9yCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RydWN0IGFjcGlfcnNjb252ZXJ0X2luZm8gYW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AgICAgICAgICAgICAgICAgICBjb25zdW1lZCB0aGUgYnl0ZV9zdHJlYW1fYnVmZmVyIGlzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5lZAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmV0dXJuIGRhdGEgYnVmZmVyCi0gKiAgICAgICAgICAgICAgc3RydWN0dXJlX3NpemUgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSByZXR1cm4gZGF0YSBzdHJ1Y3QgaXMgcmV0dXJuZWQKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmUgcG9pbnRlZCB0byBieSB0aGUgb3V0cHV0X2J1ZmZlci4gUmV0dXJuIHRoZQotICogICAgICAgICAgICAgIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBmcm9tIHRoZSBieXRlIHN0cmVhbS4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9yc19maXhlZF9tZW1vcnkzMl9yZXNvdXJjZSh1OCAqIGJ5dGVfc3RyZWFtX2J1ZmZlciwKLQkJCQlhY3BpX3NpemUgKiBieXRlc19jb25zdW1lZCwKLQkJCQl1OCAqKiBvdXRwdXRfYnVmZmVyLCBhY3BpX3NpemUgKiBzdHJ1Y3R1cmVfc2l6ZSkKLXsKLQl1OCAqYnVmZmVyID0gYnl0Z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sKLQlidWZmZXIgKz0gNDsKLQotCS8qIEdldCByYW5nZV9sZW5ndGggKEJ5dGVzIDgtMTEpICovCi0KLQlBQ1BJX01PVkVfMzJfVE9fMzIoJm91dHB1dF9zdHJ1Y3QtPmRhdGEuZml4ZWRfbWVtb3J5MzIucmFuZ2VfbGVuZ3RoLAotCQkJICAgYnVmZmVyKTsKLQotCS8qIFNldCB0aGUgTGVuZ3RoIHBhcmFtZXRlciAqLwotCi0Jb3V0cHV0X3N0cnVjdC0+bGVuZ3RoID0gKHUzMikgc3RydWN0X3NpemU7Ci0KLQkvKiBSZXR1cm4gdGhlIGZpbmFsIHNpemUgb2YgdGhlIHN0cnVjdHVyZSAqLwotCi0JKnN0cnVjdHVyZV9zaXplID0gc3RydWN0X3NpemU7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19tZW1vcnkzMl9yYW5nZV9zdHJlYW0KLSAqCi0gKiBQQVJBTUVURVJTOiAgbGlua2VkX2xpc3QgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBsaW5rZWQgbGlzdAotICogICAgICAgICAgICAgIG91dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgdXNlcidzIHJldHVybiBidWZmZXIKLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlZCBpbiB0aGUgb3V0cHV0X2J1ZmZlciBpcyByZXR1cm5lZAotICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKLSAqCi0gKiBERVNDUklQVElPTjogVGFr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GVmaW5lIENPTVBBUkVfT1BDT0RFKGkpICAgICAgICAgICBpLT5yZXNvdXJjZV9vZmZzZXQKKyNkZWZpbmUgQ09NUEFSRV9UQVJHRVQoaSkgICAgICAgICAgIGktPmFtbF9vZmZzZXQKKyNkZWZpbmUgQ09NUEFSRV9WQUxVRShpKSAgICAgICAgICAgIGktPnZhbHVlCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2VuZF90YWdfcmVzb3VyY2UKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2NvbnZlcnRfYW1sX3RvX3Jlc291cmNlCiAgKgotICogUEFSQU1FVEVSUzogIGJ5dGVfc3RyZWFtX2J1ZmZlciAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgaW5wdXQgYnl0ZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtCi0gKiAgICAgICAgICAgICAgYnl0ZXNfY29uc3VtZWQgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN1bWVkIHRoZSBieXRlX3N0cmVhbV9idWZmZXIgaXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybmVkCi0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXR1cm4gZGF0YSBidWZmZXIKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmVfc2l6ZSAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIHJldHVybiBkYXRhIHN0cnVjdCBpcyByZXR1cm5lZAorICogUEFSQU1FVEVSUzogIFJlc291cmNlICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBkZXNjcmlwdG9yCisgKiAgICAgICAgICAgICAgQW1sICAgICAgICAgICAgICAgICAtIFdoZXJlIHRoZSBBTUwgZGVzY3JpcHRvciBpcyByZXR1cm5lZAorICogICAgICAgICAgICAgIEluZm8gICAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIGFwcHJvcHJpYXRlIGNvbnZlcnNpb24gdGFibGUKICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgotICogREVTQ1JJUFRJT046IFRha2UgdGhlIHJlc291cmNlIGJ5dGUgc3RyZWFtIGFuZCBmaWxsIG91dCB0aGUgYXBwcm9wcmlhdGUKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmUgcG9pbnRlZCB0byBieSB0aGUgb3V0cHV0X2J1ZmZlci4gUmV0dXJuIHRoZQotICogICAgICAgICAgICAgIG51bWJlciBvZiBieXRlcyBjb25zdW1lZCBmcm9tIHRoZSBieXRlIHN0cmVhbS4KKyAqIERFU0NSSVBUSU9OOiBDb252ZXJ0IGFuIGV4dGVybmFsIEFNTCByZXNvdXJjZSBkZXNjcmlwdG9yIHRvIHRoZSBjb3JyZXNwb25kaW5nCisgKiAgICAgICAgICAgICAgaW50ZXJuYWwgcmVzb3VyY2UgZGVzY3JpcHRvcgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBhY3BpX3N0YXR1cwotYWNwaV9yc19lbmRfdGFnX3Jlc291cmNlKHU4ICogYnl0ZV9zdHJlYW1fYnVmZmVyLAotCQkJIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkLAotCQkJIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZS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Q1BJX1JTQ19JTklUU0VUOgorCQkJYnJlYWs7CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfdmVuZG9yX3Jlc291cmNlCi0gKgotICogUEFSQU1FVEVSUzogIGJ5dGVfc3RyZWFtX2J1ZmZlciAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgaW5wdXQgYnl0ZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtCi0gKiAgICAgICAgICAgICAgYnl0ZXNfY29uc3VtZWQgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN1bWVkIHRoZSBieXRlX3N0cmVhbV9idWZmZXIgaXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybmVkCi0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXR1cm4gZGF0YSBidWZmZXIKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmVfc2l6ZSAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIHJldHVybiBkYXRhIHN0cnVjdCBpcyByZXR1cm5lZAotICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKLSAqCi0gKiBERVNDUklQVElPTjogVGFrZSB0aGUgcmVzb3VyY2UgYnl0ZSBzdHJlYW0gYW5kIGZpbGwgb3V0IHRoZSBhcHByb3ByaWF0ZQotICogICAgICAgICAgICAgIHN0cnVjdHVyZSBwb2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pX3JzX2RlY29kZV9iaXRtYXNrKHRlbXAxNiwgZGVzdGluYXRpb24pOworCQkJaWYgKGl0ZW1fY291bnQpIHsKKwkJCQlyZXNvdXJjZS0+bGVuZ3RoICs9IChpdGVtX2NvdW50IC0gMSk7CisJCQl9CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfdmVuZG9yX3N0cmVhbQotICoKLSAqIFBBUkFNRVRFUlM6ICBsaW5rZWRfbGlzdCAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGxpbmtlZCBsaXN0Ci0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSB1c2VyJ3MgcmV0dXJuIGJ1ZmZlcgotICogICAgICAgICAgICAgIGJ5dGVzX2NvbnN1bWVkICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VkIGluIHRoZSBvdXRwdXRfYnVmZmVyIGlzIHJldHVybmVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YXR1cwotICoKLSAqIERFU0NSSVBUSU9OOiBUYWtlIHRoZSBsaW5rZWQgbGlzdCByZXNvdXJjZSBzdHJ1Y3R1cmUgYW5kIGZpbGxzIGluIHRoZQotICogICAgICAgICAgICAgIHRoZSBhcHByb3ByaWF0ZSBieXRlcyBpbiBhIGJ5dGUgc3RyZWFtCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwkJCXRhcmdldCA9IEFDUElfQUREX1BUUihjaGFyLCByZXNvdXJjZSwgaW5mby0+dmF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mVyICs9IDE7Ci0JfQotCi0JLyogUmV0dXJuIHRoZSBudW1iZXIgb2YgYnl0ZXMgY29uc3VtZWQgaW4gdGhpcyBvcGVyYXRpb24gKi8KLQotCSpieXRlc19jb25zdW1lZCA9IEFDUElfUFRSX0RJRkYoYnVmZmVyLCAqb3V0cHV0X2J1ZmZlcik7Ci0JcmV0dXJuX0FDUElfU1RBVFVTKEFFX09LKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19zdGFydF9kZXBlbmRfZm5zX3Jlc291cmNlCi0gKgotICogUEFSQU1FVEVSUzogIGJ5dGVfc3RyZWFtX2J1ZmZlciAgICAgIC0gUG9pbnRlciB0byB0aGUgcmVzb3VyY2UgaW5wdXQgYnl0ZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtCi0gKiAgICAgICAgICAgICAgYnl0ZXNfY29uc3VtZWQgICAgICAgICAgLSBQb2ludGVyIHRvIHdoZXJlIHRoZSBudW1iZXIgb2YgYnl0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN1bWVkIHRoZSBieXRlX3N0cmVhbV9idWZmZXIgaXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybmVkCi0gKiAgICAgICAgICAgICAgb3V0cHV0X2J1ZmZlciAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXR1cm4gZGF0YSBidWZmZXIKLSAqICAgICAgICAgICAgICBzdHJ1Y3R1cmVfc2l6ZSAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIHJldHVybiBkYXRhIHN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OQ1RJT046ICAgIGFjcGlfcnNfY29udmVydF9yZXNvdXJjZV90b19hbWwKICAqCi0gKiBQQVJBTUVURVJTOiAgYnl0ZV9zdHJlYW1fYnVmZmVyICAgICAgLSBQb2ludGVyIHRvIHRoZSByZXNvdXJjZSBpbnB1dCBieXRlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0KLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3VtZWQgdGhlIGJ5dGVfc3RyZWFtX2J1ZmZlciBpcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQKLSAqICAgICAgICAgICAgICBvdXRwdXRfYnVmZmVyICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJldHVybiBkYXRhIGJ1ZmZlcgotICogICAgICAgICAgICAgIHN0cnVjdHVyZV9zaXplICAgICAgICAgIC0gUG9pbnRlciB0byB3aGVyZSB0aGUgbnVtYmVyIG9mIGJ5dGVzCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUgcmV0dXJuIGRhdGEgc3RydWN0IGlzIHJldHVybmVkCisgKiBQQVJBTUVURVJTOiAgUmVzb3VyY2UgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJlc291cmNlIGRlc2NyaXB0b3IKKyAqICAgICAgICAgICAgICBBbWwgICAgICAgICAgICAgICAgIC0gV2hlcmUgdGhlIEFNTCBkZXNjcmlwdG9yIGlzIHJldHVybmVkCisgKiAgICAgICAgICAgICAgSW5mbyAgICAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gYXBwcm9wcmlhdGUgY29udmVyc2lvbiB0YWJsZQogICoKICAqIFJFVFVSTjogICAgICBTdGF0d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dHB1dF9idWZmZXIgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgdXNlcidzIHJldHVybiBidWZmZXIKLSAqICAgICAgICAgICAgICBieXRlc19jb25zdW1lZCAgICAgICAgICAtIFBvaW50ZXIgdG8gd2hlcmUgdGhlIG51bWJlciBvZiBieXRlcwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlZCBpbiB0aGUgb3V0cHV0X2J1ZmZlciBpcyByZXR1cm5lZAotICoKLSAqIFJFVFVSTjogICAgICBTdGF0dXMKLSAqCi0gKiBERVNDUklQVElPTjogVGFrZSB0aGUgbGlua2VkIGxpc3QgcmVzb3VyY2Ugc3RydWN0dXJlIGFuZCBmaWxscyBpbiB0aGUKLSAqICAgICAgICAgICAgICB0aGUgYXBwcm9wcmlhdGUgYnl0ZXMgaW4gYSBieXRlIHN0cmVhbQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgMAorLyogUHJldmlvdXMgcmVzb3VyY2UgdmFsaWRhdGlvbnMgKi8KIAotYWNwaV9zdGF0dXMKLWFjcGlfcnNfZW5kX2RlcGVuZF9mbnNfc3RyZWFtKHN0cnVjdCBhY3BpX3Jlc291cmNlICpsaW5rZWRfbGlzdCwKLQkJCSAgICAgIHU4ICoqIG91dHB1dF9idWZmZXIsIGFjcGlfc2l6ZSAqIGJ5dGVzX2NvbnN1bWVkKQotewotCXU4ICpidWZmZXIgPSAqb3V0cHV0X2J1ZmZlcjsKLQotCUFDUElfRlVOQ1RJT05fVFJBQ0UoInJzX2VuZF9kZXBlbmRfZm5zX3N0cmVhbSIpOwotCi0JLyogVGhlIGRlc2NyaXB0b3IgZmllbGQgaXMgc3RhdGljICovCi0KLQkqYnVmZmVyID0gMHgzODsKLQlidWZmZXIgKz0gMTsKLQotCS8qIFJldHVybiB0aGUgbnVtYmVyIG9mIGJ5dGVzI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KioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZGVjb2RlX2JpdG1hc2sKKyAqCisgKiBQQVJBTUVURVJTOiAgTWFzayAgICAgICAgICAgIC0gQml0bWFzayB0byBkZWNvZGUKKyAqICAgICAgICAgICAgICBMaXN0ICAgICAgICAgICAgLSBXaGVyZSB0aGUgY29udmVydGVkIGxpc3QgaXMgcmV0dXJuZWQKKyAqCisgKiBSRVRVUk46ICAgICAgQ291bnQgb2YgYml0cyBzZXQgKGxlbmd0aCBvZiBsaXN0KQorICoKKyAqIERFU0NSSVBUSU9OOiBDb252ZXJ0IGEgYml0IG1hc2sgaW50byBhIGxpc3Qgb2YgdmFsdWVzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3U4IGFjcGlfcnNfZGVjb2RlX2JpdG1hc2sodTE2IG1hc2ssIHU4ICogbGlzdCkKK3sKKwlhY3BpX25hdGl2ZV91aW50IGk7CisJdTggYml0X2NvdW50OworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogRGVjb2RlIHRoZSBtYXNrIGJpdHMgKi8KKworCWZvciAoaSA9IDAsIGJpdF9jb3VudCA9IDA7IG1hc2s7IGkrKykgeworCQlpZiAobWFzayAmIDB4MDAwMSkgeworCQkJbGlzdFtiaXRfY291bnRdID0gKHU4KSBpOworCQkJYml0X2NvdW50Kys7CisJCX0KKworCQltYXNrID4+PSAxOworCX0KKworCXJldHVybiAoYml0X2NvdW50KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19lbmNvZGVfYml0bWFzaworICoKKyAqIFBBUkFNRVRFUlM6ICBMaXN0ICAgICAgICAgICAgLSBMaXN0IG9mIHZhbHVlcyB0byBlbmNvZGUKKyAqICAgICAgICAgICAgICBDb3VudCAgICAgICAgICAgLSBMZW5ndGggb2YgbGlzdAorICoKKyAqIFJFVFVSTjogICAgICBFbmNvZGVkIGJpdG1hc2sKKyAqCisgKiBERVNDUklQVElPTjogQ29udmVydCBhIGxpc3Qgb2YgdmFsdWVzIHRvIGFuIGVuY29kZWQgYml0bWFzaworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3UxNiBhY3BpX3JzX2VuY29kZV9iaXRtYXNrKHU4ICogbGlzdCwgdTggY291bnQpCit7CisJYWNwaV9uYXRpdmVfdWludCBpOworCXUxNiBtYXNrOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogRW5jb2RlIHRoZSBsaXN0IGludG8gYSBzaW5nbGUgYml0bWFzayAqLworCisJZm9yIChpID0gMCwgbWFzayA9IDA7IGkgPCBjb3VudDsgaSsrKSB7CisJCW1hc2sgfD0gKDB4MDAwMSA8PCBsaXN0W2ldKTsKKwl9CisKKwlyZXR1cm4gKG1hc2spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX21vdmVfZGF0YQorICoKKyAqIFBBUkFNRVRFUlM6ICBEZXN0aW5hdGlvbiAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgZGVzdGluYXRpb24gZGVzY3JpcHRvcgorICogICAgICAgICAgICAgIFNvdXJjZSAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBzb3VyY2UgZGVzY3JpcHRvcgorICogICAgICAgICAgICAgIGl0ZW1fY291bnQgICAgICAgICAgLSBIb3cgbWFueSBpdGVtcyB0byBtb3ZlCisgKiAgICAgICAgICAgICAgb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VuZ3RoICAgICAgICAtIExlbmd0aCBvZiB0aGUgQU1MIGRlc2NyaXB0b3IsIGluY2x1ZGluZworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgaGVhZGVyIGFuZCBsZW5ndGggZmllbGRzLgorICogICAgICAgICAgICAgIEFtbCAgICAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByYXcgQU1MIGRlc2NyaXB0b3IKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBTZXQgdGhlIHJlc291cmNlX2xlbmd0aCBmaWVsZCBvZiBhbiBBTUwKKyAqICAgICAgICAgICAgICByZXNvdXJjZSBkZXNjcmlwdG9yLCBib3RoIExhcmdlIGFuZCBTbWFsbCBkZXNjcmlwdG9ycyBhcmUKKyAqICAgICAgICAgICAgICBzdXBwb3J0ZWQgYXV0b21hdGljYWxseS4gTm90ZTogRGVzY3JpcHRvciBUeXBlIGZpZWxkIG11c3QKKyAqICAgICAgICAgICAgICBiZSB2YWxpZC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkCithY3BpX3JzX3NldF9yZXNvdXJjZV9sZW5ndGgoYWNwaV9yc2Rlc2Nfc2l6ZSB0b3RhbF9sZW5ndGgsCisJCQkgICAgdW5pb24gYW1sX3Jlc291cmNlICphbWwpCit7CisJYWNwaV9yc19sZW5ndGggcmVzb3VyY2VfbGVuZ3RoOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogTGVuZ3RoIGlzIHRoZSB0b3RhbCBkZXNjcmlwdG9yIGxlbmd0aCBtaW51cyB0aGUgaGVhZGVyIGxlbmd0aCAqLworCisJcmVzb3VyY2VfbGVuZ3RoID0gKGFjcGlfcnNfbGVuZ3RoKQorCSAgICAodG90YWxfbGVuZ3RoIC0gYWNwaV91dF9nZXRfcm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IHRvIGJlIGluc2VydGVkIGFzIHRoZSB0eXBlCisgKiAgICAgICAgICAgICAgdG90YWxfbGVuZ3RoICAgICAgICAtIExlbmd0aCBvZiB0aGUgQU1MIGRlc2NyaXB0b3IsIGluY2x1ZGluZworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgaGVhZGVyIGFuZCBsZW5ndGggZmllbGRzLgorICogICAgICAgICAgICAgIEFtbCAgICAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSByYXcgQU1MIGRlc2NyaXB0b3IKKyAqCisgKiBSRVRVUk46ICAgICAgTm9uZQorICoKKyAqIERFU0NSSVBUSU9OOiBTZXQgdGhlIGRlc2NyaXB0b3JfdHlwZSBhbmQgcmVzb3VyY2VfbGVuZ3RoIGZpZWxkcyBvZiBhbiBBTUwKKyAqICAgICAgICAgICAgICByZXNvdXJjZSBkZXNjcmlwdG9yLCBib3RoIExhcmdlIGFuZCBTbWFsbCBkZXNjcmlwdG9ycyBhcmUKKyAqICAgICAgICAgICAgICBzdXBwb3J0ZWQgYXV0b21hdGljYWxseQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQKK2FjcGlfcnNfc2V0X3Jlc291cmNlX2hlYWRlcih1OCBkZXNjcmlwdG9yX3R5cGUsCisJCQkgICAgYWNwaV9yc2Rlc2Nfc2l6ZSB0b3RhbF9sZW5ndGgsCisJCQkgICAgdW5pb24gYW1sX3Jlc291cmNlICphbWwpCit7CisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogU2V0IHRoZSBSZXNvdXJjZSBUeXBlICovCisKKwlhbWwtPnNtYWxsX2hlYWRlci5kZXNjcmlwdG9yX3R5cGUgPSBkZXNjcmlwdG9yX3R5cGU7CisKKwkvKiBTZXQgdGhlIFJlc291cmNlIExlbmd0aCAqLworCisJYWNwaV9yc19zZXRfcmVzb3VyY2VfbGVuZ3RoKHRvdGFsX2xlbmd0aCwgYW1sKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19zdHJjcHkKKyAqCisgKiBQQVJBTUVURVJTOiAgRGVzdGluYXRpb24gICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIGRlc3RpbmF0aW9uIHN0cmluZworICogICAgICAgICAgICAgIFNvdXJjZSAgICAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBzb3VyY2Ugc3RyaW5nCisgKgorICogUkVUVVJOOiAgICAgIFN0cmluZyBsZW5ndGgsIGluY2x1ZGluZyBOVUxMIHRlcm1pbmF0b3IKKyAqCisgKiBERVNDUklQVElPTjogTG9jYWwgc3RyaW5nIGNvcHkgdGhhdCByZXR1cm5zIHRoZSBzdHJpbmcgbGVuZ3RoLCBzYXZpbmcgYQorICogICAgICAgICAgICAgIHN0cmNweSBmb2xsb3dlZCBieSBhIHN0cmxlbi4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdTE2IGFjcGlfcnNfc3RyY3B5KGNoYXIgKmRlc3RpbmF0aW9uLCBjaGFyICpzb3VyY2UpCit7CisJdTE2IGk7CisKKwlBQ1BJX0ZVTkNUSU9OX0VOVFJZKCk7CisKKwlmb3IgKGkgPSAwOyBzb3VyY2VbaV07IGkrKykgeworCQlkZXN0aW5hdGlvbltpXSA9IHNvdXJjZVtpXTsKKwl9CisKKwlkZXN0aW5hdGlvbltpXSA9IDA7CisKKwkvKiBSZXR1cm4gc3RyaW5nIGxlbmd0aCBpbmNsdWRpbmcgdGhlIE5VTEwgdGVybWluYXRvciAqLworCisJcmV0dXJuICgodTE2KSAoaSArIDEpKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19nZXRfcmVzb3VyY2Vfc291cmNlCisgKgorICogUEFSQU1FVEVSUzogIHJlc291cmNlX2xlbmd0aCAgICAgLSBMZW5ndGggZmllbGQgb2YgdGhlIGRlc2NyaXB0b3IKKyAqICAgICAgICAgICAgICBtaW5pbXVtX2xlbmd0aCAgICAgIC0gTWluaW11bSBsZW5ndGggb2YgdGhlIGRlc2NyaXB0b3IgKG1pbnVzCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFueSBvcHRpb25hbCBmaWVsZHMpCisgKiAgICAgICAgICAgICAgcmVzb3VyY2Vfc291cmNlICAgICAtIFdoZXJlIHRoZSByZXNvdXJjZV9zb3VyY2UgaXMgcmV0dXJuZWQKKyAqICAgICAgICAgICAgICBBbWwgICAgICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmF3IEFNTCBkZXNjcmlwdG9yCisgKiAgICAgICAgICAgICAgc3RyaW5nX3B0ciAgICAgICAgICAtIChvcHRpb25hbCkgd2hlcmUgdG8gc3RvcmUgdGhlIGFjdHVhbAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZV9zb3VyY2Ugc3RyaW5nCisgKgorICogUkVUVVJOOiAgICAgIExlbmd0aCBvZiB0aGUgc3RyaW5nIHBsdXMgTlVMTCB0ZXJtaW5hdG9yLCByb3VuZGVkIHVwIHRvIDMyIGJpdAorICoKKyAqIERFU0NSSVBUSU9OOiBDb3B5IHRoZSBvcHRpb25hbCByZXNvdXJjZV9zb3VyY2UgZGF0YSBmcm9tIGEgcmF3IEFNTCBkZXNjcmlwdG9yCisgKiAgICAgICAgICAgICAgdG8gYW4gaW50ZXJuYWwgcmVzb3VyY2UgZGVzY3JpcHRvcgorICoKKyAqKio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0pICsKKwkJCQkJICAgICAxKTsKKwkJQUNQSV9NRU1TRVQocmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfcHRyLCAwLCB0b3RhbF9sZW5ndGgpOworCisJCS8qIENvcHkgdGhlIHJlc291cmNlX3NvdXJjZSBzdHJpbmcgdG8gdGhlIGRlc3RpbmF0aW9uICovCisKKwkJcmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfbGVuZ3RoID0KKwkJICAgIGFjcGlfcnNfc3RyY3B5KHJlc291cmNlX3NvdXJjZS0+c3RyaW5nX3B0ciwKKwkJCQkgICAoY2hhciAqKSZhbWxfcmVzb3VyY2Vfc291cmNlWzFdKTsKKworCQlyZXR1cm4gKChhY3BpX3JzX2xlbmd0aCkgdG90YWxfbGVuZ3RoKTsKKwl9CisKKwkvKiByZXNvdXJjZV9zb3VyY2UgaXMgbm90IHByZXNlbnQgKi8KKworCXJlc291cmNlX3NvdXJjZS0+aW5kZXggPSAwOworCXJlc291cmNlX3NvdXJjZS0+c3RyaW5nX2xlbmd0aCA9IDA7CisJcmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfcHRyID0gTlVMTDsKKwlyZXR1cm4gKDApOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX3NldF9yZXNvdXJjZV9zb3VyY2UKKyAqCisgKiBQQVJBTUVURVJTOiAgQW1sICAgICAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJhdyBBTUwgZGVzY3JpcHRvcgorICogICAgICAgICAgICAgIG1pbmltdW1fbGVuZ3RoICAgICAgLSBNaW5pbXVtIGxlbmd0aCBvZiB0aGUgZGVzY3JpcHRvciAobWludXMKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW55IG9wdGlvbmFsIGZpZWxkcykKKyAqICAgICAgICAgICAg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IGFtbCwgbWluaW11bV9sZW5ndGgpOworCisJCS8qIENvcHkgdGhlIHJlc291cmNlX3NvdXJjZV9pbmRleCAqLworCisJCWFtbF9yZXNvdXJjZV9zb3VyY2VbMF0gPSAodTgpIHJlc291cmNlX3NvdXJjZS0+aW5kZXg7CisKKwkJLyogQ29weSB0aGUgcmVzb3VyY2Vfc291cmNlIHN0cmluZyAqLworCisJCUFDUElfU1RSQ1BZKChjaGFyICopJmFtbF9yZXNvdXJjZV9zb3VyY2VbMV0sCisJCQkgICAgcmVzb3VyY2Vfc291cmNlLT5zdHJpbmdfcHRyKTsKKworCQkvKgorCQkgKiBBZGQgdGhlIGxlbmd0aCBvZiB0aGUgc3RyaW5nICgrIDEgZm9yIG51bGwgdGVybWluYXRvcikgdG8gdGhlCisJCSAqIGZpbmFsIGRlc2NyaXB0b3IgbGVuZ3RoCisJCSAqLworCQlkZXNjcmlwdG9yX2xlbmd0aCArPQorCQkgICAgKChhY3BpX3JzZGVzY19zaXplKSByZXNvdXJjZV9zb3VyY2UtPnN0cmluZ19sZW5ndGggKyAxKTsKKwl9CisKKwkvKiBSZXR1cm4gdGhlIG5ldyB0b3RhbCBsZW5ndGggb2YgdGhlIEFNTCBkZXNjcmlwdG9yICovCisKKwlyZXR1cm4gKGRlc2NyaXB0b3JfbGVuZ3RoKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9yc19nZXRfcHJ0X21ldGhvZF9kYXRhCiAgKgogICogUEFSQU1FVEVSUzogIEhhbmRsZSAgICAgICAgICAtIGEgaGFuZGxlIHRvIHRoZSBjb250YWluaW5nIG9iamVjdApAQCAtNjUsOCArNDQ4LDkgQEAKICAqICAgICAgICAgICAgICBhbmQgdGhlIGNvbnRlbnRzIG9mIHRoZSBjYWxsZXJzIGJ1ZmZlciBpcyB1bmRlZmlu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2RyaXZlcnMvYWNwaS9yZXNvdXJjZXMvcnN4ZmFjZS5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyoKLSAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMDUsIFIuIEJ5cm9uIE1vb3JlCisgKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDA2LCBSLiBCeXJvbiBNb29yZQogICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAqCiAgKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKQEAgLTU3LDEzICs1NywxNyBAQAogCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBkZWNvZGUpOyAgICAgICAgICAgICAgICAgICAgXAogCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBtaW5fYWRkcmVzc19maXhlZCk7ICAgICAgICAgXAogCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBtYXhfYWRkcmVzc19maXhlZCk7ICAgICAgICAgXAotCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBhdHRyaWJ1dGUpOyAgICAgICAgICAgICAgICAgXAorCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBpbmZvKTsgICAgICAgICAgICAgICAgICAgICAgXAogCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBncmFudWxhcml0eSk7ICAgICAgICAgICAgICAgXAotCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBtaW5fYWRkcmVzc19yYW5nZSk7ICAgICAgICAgXAotCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBtYXhfYWRkcmVzc19yYW5nZSk7ICAgICAgICAgXAotCUFDUElfQ09QWV9GSUVMRChvdXQsIGluLCBhZGRyZXNzX3RyYW5zbGF0aW9uX29mZnNldCk7IFwKKwlBQ1BJX0NPUFlfRklFTEQob3V0LCBpbiwgbWluaW11bSk7ICAgICAgICAgICAgICAgICAgIFwKKwlBQ1BJX0NPUFlfRklFTEQob3V0LCBpbiwgbWF4aW11bSk7ICAgICAgICAgICAgICAgICAgIFwKKwlBQ1BJX0NPUFlfRklFTEQob3V0LCBpbiwgdHJhbnNsYXRpb25fb2Zmc2V0KTsgICAgICAgIFwKIAlBQ1BJX0NPUFlfRklFTEQob3V0LCBpbiwgYWRkcmVzc19sZW5ndGgpOyAgICAgICAgICAgIFwKIAlBQ1BJX0NPUFlfRklFTEQob3V0LCBpbiwgcmVzb3VyY2Vfc291cmNlKTsKKy8qIExvY2FsIHByb3RvdHlwZXMgKi8KK3N0YXRpYyBhY3BpX3N0YXR1cworYWNwaV9yc19tYXRjaF92ZW5kb3JfcmVzb3VyY2Uoc3RydWN0IGFjcGlfcmVzb3VyY2UgKnJlc291cmNlLCB2b2lkICpjb250ZXh0KTsKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfaXJxX3JvdXRpbmdfdGFibGUKQEAgLTg2LDYgKzkwLDcgQEAKICAqICAgICAgICAgICAgICB0aGUgb2JqZWN0IGluZGljYXRlZCBieSB0aGUgcGFzc2VkIGRldmljZV9oYW5kbGUuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwogYWNwaV9zdGF0dXMKIGFjcGlfZ2V0X2lycV9yb3V0aW5nX3RhYmxlKGFjcGlfaGFuZGxlIGRldmljZV9oYW5kbGUsCiAJCQkgICBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJldF9idWZmZXIpCkBAIC0yMjIsMTIgKzIyNywxMiBAQAogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3dhbGtfcmVzb3VyY2VzCiAgKgotICogUEFSQU1FVEVSUzogIGRldmljZV9oYW5kbGUgICAtIGEgaGFuZGxlIHRvIHRoZSBkZXZpY2Ugb2JqZWN0IGZvciB0aGUKKyAqIFBBUkFNRVRFUlM6ICBkZXZpY2VfaGFuZGxlICAgLSBIYW5kbGUgdG8gdGhlIGRldmljZSBvYmplY3QgZm9yIHRoZQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldmljZSB3ZSBhcmUgcXVlcnlpbmcKLSAqICAgICAgICAgICAgICBQYXRoICAgICAgICAgICAgLSBtZXRob2QgbmFtZSBvZiB0aGUgcmVzb3VyY2VzIHdlIHdhbnQKKyAqICAgICAgICAgICAgICBOYW1lICAgICAgICAgICAgLSBNZXRob2QgbmFtZSBvZiB0aGUgcmVzb3VyY2VzIHdlIHdhbnQKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoTUVUSE9EX05BTUVfX0NSUyBvciBNRVRIT0RfTkFNRV9fUFJTKQotICogICAgICAgICAgICAgIHVzZXJfZnVuY3Rpb24gICAtIGNhbGxlZCBmb3IgZWFjaCByZXNvdXJjZQotICogICAgICAgICAgICAgIENvbnRleHQgICAgICAgICAtIHBhc3NlZCB0byB1c2VyX2Z1bmN0aW9uCisgKiAgICAgICAgICAgICAgdXNlcl9mdW5jdGlvbiAgIC0gQ2FsbGVkIGZvciBlYWNoIHJlc291cmNlCisgKiAgICAgICAgICAgICAgQ29udGV4dCAgICAgICAgIC0gUGFzc2VkIHRvIHVzZXJfZnVuY3Rpb24KICAqCiAgKiBSRVRVUk46ICAgICAgU3RhdHVzCiAgKgpAQCAtMjM5LDc5ICsyNDQsNzQgQEAKIAogYWNwaV9zdGF0dXMKIGFjcGlfd2Fsa19yZXNvdXJjZXMoYWNwaV9oYW5kbGUgZGV2aWNlX2hhbmRsZSwKLQkJICAgIGNoYXIgKnBhdGgsCisJCSAgICBjaGFyICpuYW1lLAogC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FlQRV9BRERSRVNTNjQ6CisJY2FzZSBBQ1BJX1JFU09VUkNFX1RZUEVfQUREUkVTUzY0OgogCiAJCS8qIFNpbXBsZSBjb3B5IGZvciA2NCBiaXQgc291cmNlICovCiAKQEAgLTQxMCwzICs0MTYsMTEzIEBACiB9CiAKIEVYUE9SVF9TWU1CT0woYWNwaV9yZXNvdXJjZV90b19hZGRyZXNzNjQpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2dldF92ZW5kb3JfcmVzb3VyY2UKKyAqCisgKiBQQVJBTUVURVJTOiAgZGV2aWNlX2hhbmRsZSAgICAgICAtIEhhbmRsZSBmb3IgdGhlIHBhcmVudCBkZXZpY2Ugb2JqZWN0CisgKiAgICAgICAgICAgICAgTmFtZSAgICAgICAgICAgICAgICAtIE1ldGhvZCBuYW1lIGZvciB0aGUgcGFyZW50IHJlc291cmNlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChNRVRIT0RfTkFNRV9fQ1JTIG9yIE1FVEhPRF9OQU1FX19QUlMpCisgKiAgICAgICAgICAgICAgVXVpZCAgICAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIFVVSUQgdG8gYmUgbWF0Y2hlZC4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZXMgYm90aCBzdWJ0eXBlIGFuZCAxNi1ieXRlIFVVSUQKKyAqICAgICAgICAgICAgICByZXRfYnVmZmVyICAgICAgICAgIC0gV2hlcmUgdGhlIHZlbmRvciByZXNvdXJjZSBpcyByZXR1cm5lZAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogV2FsayBhIHJlc291cmNlIHRlbXBsYXRlIGZvciB0aGUgc3BlY2lmaWVkIGV2aWNlIHRvIGZpb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sKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJcmV0dXJuIChzdGF0dXMpOworCX0KKworCXJldHVybiAoaW5mby5zdGF0dXMpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX21hdGNoX3ZlbmRvcl9yZXNvdXJjZQorICoKKyAqIFBBUkFNRVRFUlM6ICBBQ1BJX1dBTEtfUkVTT1VSQ0VfQ0FMTEJBQ0sKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IE1hdGNoIGEgdmVuZG9yIHJlc291cmNlIHZpYSB0aGUgQUNQSSAzLjAgVVVJRAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBhY3BpX3N0YXR1cworYWNwaV9yc19tYXRjaF92ZW5kb3JfcmVzb3VyY2Uoc3RydWN0IGFjcGlfcmVzb3VyY2UgKnJlc291cmNlLCB2b2lkICpjb250ZXh0KQoreworCXN0cnVjdCBhY3BpX3ZlbmRvcl93YWxrX2luZm8gKmluZm8gPSBjb250ZXh0OworCXN0cnVjdCBhY3BpX3Jlc291cmNlX3ZlbmRvcl90eXBlZCAqdmVuZG9yOworCXN0cnVjdCBhY3BpX2J1ZmZlciAqYnVmZmVyOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKworCS8qIElnbm9yZSBhbGwgZGVzY3JpcHRvcnMgZXhjZXB0IFZlbmRvciAqLworCisJaWYgKHJlc291cmNlLT50eXBlICE9IEFDUElfUkVTT1VSQ0VfVFlQRV9WRU5ET1IpIHsKKwkJcmV0dXJuIChBRV9PSyk7CisJfQorCisJdmVuZG9yID0gJnJlc291cmNlLT5kYXRhLnZlbmRvc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QT1JUX0VSUk9SKCgiQ291bGQgbm90IGFsbG9jYXRlIG5ldyBvd25lcl9pZCAoMjU1IG1heCksIEFFX09XTkVSX0lEX0xJTUlUXG4iKSk7CiAKICAgICAgIGV4aXQ6CiAJKHZvaWQpYWNwaV91dF9yZWxlYXNlX211dGV4KEFDUElfTVRYX0NBQ0hFUyk7CkBAIC0xMjMsNyArMTYwLDcgQEAKICAqICAgICAgICAgICAgICBjb250cm9sIG1ldGhvZCBvciB1bmxvYWRpbmcgYSB0YWJsZS4gRWl0aGVyIHdheSwgd2Ugd291bGQKICAqICAgICAgICAgICAgICBpZ25vcmUgYW55IGVycm9yIGFueXdheS4KICAqCi0gKiBERVNDUklQVElPTjogUmVsZWFzZSBhIHRhYmxlIG9yIG1ldGhvZCBvd25lciBJRC4gIFZhbGlkIElEcyBhcmUgMSAtIDY0CisgKiBERVNDUklQVElPTjogUmVsZWFzZSBhIHRhYmxlIG9yIG1ldGhvZCBvd25lciBJRC4gIFZhbGlkIElEcyBhcmUgMSAtIDI1NQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKQEAgLTEzMSw2ICsxNjgsOCBAQAogewogCWFjcGlfb3duZXJfaWQgb3duZXJfaWQgPSAqb3duZXJfaWRfcHRyOwogCWFjcGlfc3RhdHVzIHN0YXR1czsKKwlhY3BpX25hdGl2ZV91aW50IGluZGV4OworCXUzMiBiaXQ7CiAKIAlBQ1BJX0ZVTkNUSU9OX1RSQUNFX1UzMigidXRfcmVsZWFzZV9vd25lcl9pZCIsIG93bmVyX2lkKTsKIApAQCAtMTQwLDcgKzE3OSw3IEBACiAKIAkvKiBaZXJvIGlzIG5vdCBhIHZhbGlkIG93bmVyX2lEICovCiAKLQlpZiAoKG93bmVyX2lkID09IDApIHx8IChvd25lcl9pZCA+IDY0KSkgeworCWlmIChvd25lcl9pZCA9PSAwKSB7CiAJCUFDUElfUk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ZW5kIHRhZyBkZXNjcmlwdG9yLCBhbGwgZG9uZS4gKi8KLQotCQkJCXJldHVybiAoYnVmZmVyKTsKLQkJCX0KLQotCQkJLyogTGVuZ3RoIGlzIGluIHRoZSBoZWFkZXIgKi8KLQotCQkJYnVmZmVyICs9ICgoYnVmZmVyX2J5dGUgJiAweDA3KSArIDEpOwotCQl9Ci0JfQotCi0JLyogRW5kIHRhZyBub3QgZm91bmQgKi8KLQotCXJldHVybiAoTlVMTCk7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgogICogRlVOQ1RJT046ICAgIGFjcGlfdXRfcmVwb3J0X2Vycm9yCiAgKgogICogUEFSQU1FVEVSUzogIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZSAoZm9yIGVycm9yIG91dHB1dCkKICAqICAgICAgICAgICAgICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIgKGZvciBlcnJvciBvdXRwdXQpCi0gKiAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRCAoZm9yIGVycm9yIG91dHB1dCkKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQogICoKQEAgLTg1MCwxMCArODQ4LDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCBhY3BpX3V0X3JlcG9ydF9lcnJvcihjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyLCB1MzIgY29tcG9uZW50X2lkKQordm9pZCBhY3BpX3V0X3JlcG9ydF9lcnJvcihjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyKQogewogCi0JYWNwaV9vc19wcmludGYoIiU4cy0lMDRkOiAqKiogRXJyb3I6ICIsIG1vZHVsZV9uYW1lLCBsaW5lX251bWJlcik7CisJYWNwaV9vc19wcmludGYoIkFDUEkgRXJyb3IgKCVzLSUwNGQpOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtODYyLDcgKzg2MCw2IEBACiAgKgogICogUEFSQU1FVEVSUzogIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZSAoZm9yIGVycm9yIG91dHB1dCkKICAqICAgICAgICAgICAgICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIgKGZvciBlcnJvciBvdXRwdXQpCi0gKiAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRCAoZm9yIGVycm9yIG91dHB1dCkKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQogICoKQEAgLTg3MCwxMSArODY3LDEwIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZAotYWNwaV91dF9yZXBvcnRfd2FybmluZyhjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyLCB1MzIgY29tcG9uZW50X2lkKQordm9pZCBhY3BpX3V0X3JlcG9ydF93YXJuaW5nKGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgbGluZV9udW1iZXIpCiB7CiAKLQlhY3BpX29zX3ByaW50ZigiJThzLSUwNGQ6ICoqKiBXYXJuaW5nOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOworCWFjcGlfb3NfcHJpbnRmKCJBQ1BJIFdhcm5pbmcgKCVzLSUwNGQpOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtODgzLDcgKzg3OSw2IEBACiAgKgogICogUEFSQU1FVEVSUzogIG1vZHVsZV9uYW1lICAgICAgICAgLSBDYWxsZXIncyBtb2R1bGUgbmFtZSAoZm9yIGVycm9yIG91dHB1dCkKICAqICAgICAgICAgICAgICBsaW5lX251bWJlciAgICAgICAgIC0gQ2FsbGVyJ3MgbGluZSBudW1iZXIgKGZvciBlcnJvciBvdXRwdXQpCi0gKiAgICAgICAgICAgICAgY29tcG9uZW50X2lkICAgICAgICAtIENhbGxlcidzIGNvbXBvbmVudCBJRCAoZm9yIGVycm9yIG91dHB1dCkKICAqCiAgKiBSRVRVUk46ICAgICAgTm9uZQogICoKQEAgLTg5MSw4ICs4ODYsOCBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXZvaWQgYWNwaV91dF9yZXBvcnRfaW5mbyhjaGFyICptb2R1bGVfbmFtZSwgdTMyIGxpbmVfbnVtYmVyLCB1MzIgY29tcG9uZW50X2lkKQordm9pZCBhY3BpX3V0X3JlcG9ydF9pbmZvKGNoYXIgKm1vZHVsZV9uYW1lLCB1MzIgbGluZV9udW1iZXIpCiB7CiAKLQlhY3BpX29zX3ByaW50ZigiJThzLSUwNGQ6ICoqKiBJbmZvOiAiLCBtb2R1bGVfbmFtZSwgbGluZV9udW1iZXIpOworCWFjcGlfb3NfcHJpbnRmKCJBQ1BJICglcy0lMDRkKTogIiwgbW9kdWxlX25hbWUsIGxpbmVfbnVtYmVyKTsKIH0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS91dGlsaXRpZXMvdXRtdX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c291cmNlIGluZGV4IGlzIHJldHVybmVkLiBOVUxMCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgdGhlIGluZGV4IGlzIG5vdCByZXF1aXJlZC4KKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzLCBhbmQgb3B0aW9uYWxseSB0aGUgSW5kZXggaW50byB0aGUgZ2xvYmFsIHJlc291cmNlIHRhYmxlcworICoKKyAqIERFU0NSSVBUSU9OOiBWYWxpZGF0ZSBhbiBBTUwgcmVzb3VyY2UgZGVzY3JpcHRvciBieSBjaGVja2luZyB0aGUgUmVzb3VyY2UKKyAqICAgICAgICAgICAgICBUeXBlIGFuZCBSZXNvdXJjZSBMZW5ndGguIFJldHVybnMgYW4gaW5kZXggaW50byB0aGUgZ2xvYmFsCisgKiAgICAgICAgICAgICAgcmVzb3VyY2UgaW5mb3JtYXRpb24vZGlzcGF0Y2ggdGFibGVzIGZvciBsYXRlciB1c2UuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV91dF92YWxpZGF0ZV9yZXNvdXJjZSh2b2lkICphbWwsIHU4ICogcmV0dXJuX2luZGV4KQoreworCXU4IHJlc291cmNlX3R5cGU7CisJdTggcmVzb3VyY2VfaW5kZXg7CisJYWNwaV9yc19sZW5ndGggcmVzb3VyY2VfbGVuZ3RoOworCWFjcGlfcnNfbGVuZ3RoIG1pbmltdW1fcmVzb3VyY2VfbGVuZ3RoOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyoKKwkgKiAxKSBWYWxpZGF0ZSB0aGUgcmVzb3VyY2VfdHlwZSBmaWVsZCAoQnl0ZSAwKQorCSAqLworCXJlc291cmNlX3R5cGUgPSBBQ1BJX0dFVDgoYW1sKTsKKworCS8qCisJICogQnl0ZSAwIGNvbnRhaW5zIHRoZSBkZXNjcmlwd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xlbmd0aCkgeworCQkJcmV0dXJuIChBRV9BTUxfQkFEX1JFU09VUkNFX0xFTkdUSCk7CisJCX0KKwkJYnJlYWs7CisKKwljYXNlIEFDUElfU01BTExfVkFSSUFCTEVfTEVOR1RIOgorCisJCS8qIFNtYWxsIHZhcmlhYmxlIGxlbmd0aCByZXNvdXJjZSwgbGVuZ3RoIGNhbiBiZSAoTWluKSBvciAoTWluLTEpICovCisKKwkJaWYgKChyZXNvdXJjZV9sZW5ndGggPiBtaW5pbXVtX3Jlc291cmNlX2xlbmd0aCkgfHwKKwkJICAgIChyZXNvdXJjZV9sZW5ndGggPCAobWluaW11bV9yZXNvdXJjZV9sZW5ndGggLSAxKSkpIHsKKwkJCXJldHVybiAoQUVfQU1MX0JBRF9SRVNPVVJDRV9MRU5HVEgpOworCQl9CisJCWJyZWFrOworCisJZGVmYXVsdDoKKworCQkvKiBTaG91bGRuJ3QgaGFwcGVuIChiZWNhdXNlIG9mIHZhbGlkYXRpb24gZWFybGllciksIGJ1dCBiZSBzdXJlICovCisKKwkJcmV0dXJuIChBRV9BTUxfSU5WQUxJRF9SRVNPVVJDRV9UWVBFKTsKKwl9CisKKwkvKiBPcHRpb25hbGx5IHJldHVybiB0aGUgcmVzb3VyY2UgdGFibGUgaW5kZXggKi8KKworCWlmIChyZXR1cm5faW5kZXgpIHsKKwkJKnJldHVybl9pbmRleCA9IHJlc291cmNlX2luZGV4OworCX0KKworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9yZXNvdXJjZV90eXBlCisgKgorICogUEFSQU1FVEVSUzogIEFtbCAgICAgICAgICAgICAtIFBvaW50ZXIgdG8gdGhlIHJhdyBBTUwgcmVzb3VyY2UgZGVzY3JpcHRvcgorICoKKyAqIFJFVFVSTjogICAgICBUa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VuZ3RoICovCisKKwkJQUNQSV9NT1ZFXzE2X1RPXzE2KCZyZXNvdXJjZV9sZW5ndGgsIEFDUElfQUREX1BUUih1OCwgYW1sLCAxKSk7CisKKwl9IGVsc2UgeworCQkvKiBTbWFsbCBSZXNvdXJjZSB0eXBlIC0tIGJpdHMgMjowIG9mIGJ5dGUgMCBjb250YWluIHRoZSBsZW5ndGggKi8KKworCQlyZXNvdXJjZV9sZW5ndGggPSAodTE2KSAoQUNQSV9HRVQ4KGFtbCkgJgorCQkJCQkgQUNQSV9SRVNPVVJDRV9OQU1FX1NNQUxMX0xFTkdUSF9NQVNLKTsKKwl9CisKKwlyZXR1cm4gKHJlc291cmNlX2xlbmd0aCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZ2V0X3Jlc291cmNlX2hlYWRlcl9sZW5ndGgKKyAqCisgKiBQQVJBTUVURVJTOiAgQW1sICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmF3IEFNTCByZXNvdXJjZSBkZXNjcmlwdG9yCisgKgorICogUkVUVVJOOiAgICAgIExlbmd0aCBvZiB0aGUgQU1MIGhlYWRlciAoZGVwZW5kcyBvbiBsYXJnZS9zbWFsbCBkZXNjcmlwdG9yKQorICoKKyAqIERFU0NSSVBUSU9OOiBHZXQgdGhlIGxlbmd0aCBvZiB0aGUgaGVhZGVyIGZvciB0aGlzIHJlc291cmNlLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3U4IGFjcGlfdXRfZ2V0X3Jlc291cmNlX2hlYWRlcl9sZW5ndGgodm9pZCAqYW1sKQoreworCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKKworCS8qIEV4YW1pbmUgdGhlIGxhcmdlL3NtYWxsIGJpdCBpbiB0aGUgcmVzb3VyY2UgaGVhZGVyICovCisKKwlpZiAoQUNQSV9HRVQ4KGFtbCkgJiBBQ1BJX1JFU09VUkNFX05BTUVfTEFSR0UpIHsKKwkJcmV0dXJuIChzaXplb2Yoc3RydWN0IGFtbF9yZXNvdXJjZV9sYXJnZV9oZWFkZXIpKTsKKwl9IGVsc2UgeworCQlyZXR1cm4gKHNpemVvZihzdHJ1Y3QgYW1sX3Jlc291cmNlX3NtYWxsX2hlYWRlcikpOworCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9sZW5ndGgKKyAqCisgKiBQQVJBTUVURVJTOiAgQW1sICAgICAgICAgICAgIC0gUG9pbnRlciB0byB0aGUgcmF3IEFNTCByZXNvdXJjZSBkZXNjcmlwdG9yCisgKgorICogUkVUVVJOOiAgICAgIEJ5dGUgbGVuZ3RoCisgKgorICogREVTQ1JJUFRJT046IEdldCB0aGUgdG90YWwgYnl0ZSBsZW5ndGggb2YgYSByYXcgQU1MIGRlc2NyaXB0b3IsIGluY2x1ZGluZyB0aGUKKyAqICAgICAgICAgICAgICBsZW5ndGggb2YgdGhlIGRlc2NyaXB0b3IgaGVhZGVyIGFuZCB0aGUgbGVuZ3RoIGZpZWxkIGl0c2VsZi4KKyAqICAgICAgICAgICAgICBVc2VkIHRvIHdhbGsgZGVzY3JpcHRvciBsaXN0cy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit1MzIgYWNwaV91dF9nZXRfZGVzY3JpcHRvcl9sZW5ndGgodm9pZCAqYW1sKQoreworCUFDUElfRlVOQ1RJT05fRU5UUlkoKTsKKworCS8qCisJICogR2V0IHRoZSBSZXNvdXJjZSBMZW5ndGggKGRvZXMgbm90IGluY2x1ZGUgaGVhZGVyIGxlbmd0aCkgYW5kIGFkZAorCSAqIHRoZSBoZWFkZXIgbGVuZ3RoIChkZXBlbmRzIG9uIGlmIHRoaXMgaXMgYSBzbWFsbCBvciBsYXJnZSByZXNvdXJjZSkKKwkgKi8KKwlyZXR1cm4gKGFjcGlfdXRfZ2V0X3Jlc291cmNlX2xlbmd0aChhbWwpICsKKwkJYWNwaV91dF9nZXRfcmVzb3VyY2VfaGVhZGVyX2xlbmd0aChhbWwpKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfcmVzb3VyY2VfZW5kX3RhZworICoKKyAqIFBBUkFNRVRFUlM6ICBvYmpfZGVzYyAgICAgICAgLSBUaGUgcmVzb3VyY2UgdGVtcGxhdGUgYnVmZmVyIG9iamVjdAorICogICAgICAgICAgICAgIGVuZF90YWcgICAgICAgICAtIFdoZXJlIHRoZSBwb2ludGVyIHRvIHRoZSBlbmRfdGFnIGlzIHJldHVybmVkCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cywgcG9pbnRlciB0byB0aGUgZW5kIHRhZworICoKKyAqIERFU0NSSVBUSU9OOiBGaW5kIHRoZSBlbmRfdGFnIHJlc291cmNlIGRlc2NyaXB0b3IgaW4gYW4gQU1MIHJlc291cmNlIHRlbXBsYXRlCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMKK2FjcGlfdXRfZ2V0X3Jlc291cmNlX2VuZF90YWcodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqIG9ial9kZXNjLAorCQkJICAgICB1OCAqKiBlbmRfdGFnKQo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DA4MjBFMTEpIHx8CisJCShib2FyZF9pZCA9PSAweDQwODMwRTExKSkKKwkJZ290byBkZWZhdWx0X2ludF9tb2RlOworCisgICAgICAgIGlmIChwY2lfZmluZF9jYXBhYmlsaXR5KHBkZXYsIFBDSV9DQVBfSURfTVNJWCkpIHsKKyAgICAgICAgICAgICAgICBlcnIgPSBwY2lfZW5hYmxlX21zaXgocGRldiwgY2Npc3NfbXNpeF9lbnRyaWVzLCA0KTsKKyAgICAgICAgICAgICAgICBpZiAoIWVycikgeworICAgICAgICAgICAgICAgICAgICAgICAgYy0+aW50clswXSA9IGNjaXNzX21zaXhfZW50cmllc1swXS52ZWN0b3I7CisgICAgICAgICAgICAgICAgICAgICAgICBjLT5pbnRyWzFdID0gY2Npc3NfbXNpeF9lbnRyaWVzWzFdLnZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGMtPmludHJbMl0gPSBjY2lzc19tc2l4X2VudHJpZXNbMl0udmVjdG9yOworICAgICAgICAgICAgICAgICAgICAgICAgYy0+aW50clszXSA9IGNjaXNzX21zaXhfZW50cmllc1szXS52ZWN0b3I7CisgICAgICAgICAgICAgICAgICAgICAgICBjLT5tc2l4X3ZlY3RvciA9IDE7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChlcnIgPiAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9XQVJOSU5HICJjY2lzczogb25seSAlZCBNU0ktWCB2ZWN0b3JzICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiYXZhaWxhYmxlXG4iLCBlcnIpOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9XQVJOSU5HICJjY2lzczogTVNJLVggaW5pdCBmYWlsZWQgJWRcbiIsCisJCQkJCQllcnIpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBpZiAocGNpX2ZpbmRfY2FwYWJpbGl0eShwZGV2LCBQQ0lfQ0FQX0lEX01TSSkpIHsKKyAgICAgICAgICAgICAgICBpZiAoIXBjaV9lbmFibGVfbXNpKHBkZXYpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjLT5pbnRyW1NJTVBMRV9NT0RFX0lOVF0gPSBwZGV2LT5pcnE7CisgICAgICAgICAgICAgICAgICAgICAgICBjLT5tc2lfdmVjdG9yID0gMTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fV0FSTklORyAiY2Npc3M6IE1TSSBpbml0IGZhaWxlZFxuIik7CisgICAgICAgIAkJYy0+aW50cltTSU1QTEVfTU9ERV9JTlRdID0gcGRldi0+aXJxOworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorI2VuZGlmIC8qIENPTkZJR19QQ0lfTVNJICovCisJLyogaWYgd2UgZ2V0IGhlcmUgd2UncmUgZ29pbmcgdG8gdXNlIHRoZSBkZWZhdWx0IGludGVycnVwdCBtb2RlICovCitkZWZhdWx0X2ludF9tb2RlOgorICAgICAgICBjLT5pbnRyW1NJTVBMRV9NT0RFX0lOVF0gPSBwZGV2LT5pcnE7CisJcmV0dXJuOworfQorCiBzdGF0aWMgaW50IGNjaXNzX3BjaV9pbml0KGN0bHJfaW5mb190ICpjLCBzdHJ1Y3QgcGNpX2RldiAqcGRldikKIHsKIAl1c2hvcnQgc3Vic3lzdGVtX3ZlbmRvcl9pZCwgc3Vic3lzdGVtX2RldmljZV9pZCwgY29tbWFuZDsKQEAgLTI3MjEsNyArMjc5NCwxMCBAQAogCXByaW50aygiYm9hcmRfaWQgPSAleFxuIiwgYm9hcmRfaWQpOwogI2VuZGlmIC8qIENDSVNTX0RFQlVHICovI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ZmMDA7CisKKwkvKioKKwkgKiBTb21lIEdQSU8gcGlucworCSAqICAzMS0yOSwyMyA6IHJlc2VydmVkIChhbHdheXMgbWFzayBvdXQpCisJICogIDI4ICAgICAgIDogUG93ZXIgQnV0dG9uCisJICogIDI2ICAgICAgIDogUE1FIworCSAqICAyMi0xNiAgICA6IExQQworCSAqICAxNCwxNSAgICA6IFNNQnVzCisJICogIDksOCAgICAgIDogVUFSVDEKKwkgKiAgNyAgICAgICAgOiBQQ0kgSU5UQgorCSAqICAzLDQgICAgICA6IFVBUlQyL0REQworCSAqICAyICAgICAgICA6IElERV9JUlEwCisJICogIDAgICAgICAgIDogUENJIElOVEEKKwkgKgorCSAqIElmIGEgbWFzayB3YXMgbm90IHNwZWNpZmllZCwgYmUgY29uc2VydmF0aXZlIGFuZCBvbmx5IGFsbG93OgorCSAqICAxLDIsNSw2LDEwLTEzLDI0LDI1LDI3CisJICovCisJaWYgKG1hc2sgIT0gMCkKKwkJbWFzayAmPSAweDFmN2ZmZmZmOworCWVsc2UKKwkJbWFzayA9IDB4MGIwMDNjNjY7CisKKwlpZiAocmVxdWVzdF9yZWdpb24oZ3Bpb19iYXNlLCBDUzU1MzVfR1BJT19TSVpFLCBOQU1FKSA9PSAwKSB7CisJCXByaW50ayhLRVJOX0VSUiBOQU1FICI6IGNhbid0IGFsbG9jYXRlIEkvTyBmb3IgR1BJT1xuIik7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCWlmIChtYWpvcikgeworCQlkZXZfaWQgPSBNS0RFVihtYWpvciwgMCk7CisJCXJldHZhbCA9IHJlZ2lzdGVyX2NocmRldl9yZWdpb24oZGV2X2lkLCBDUzU1MzVfR1BJT19DT1VOVCwKKwkJCQkJCU5BTUUpOworCX0gZWxzZSB7CisJCXJldHZhbCA9IGFsbG9jX2NocmRldl9yZWdpb24oJmRldl9pZCwgMCwgQ1M1NTM1X0dQSU9fQ09VTlQsCisJCQkJCSAgICAgTkFNRSk7CisJCW1ham9yID0gTUFKT1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ewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dHktPmZsaXAuY291bnQrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHR5X2J1ZmZlcl9yZXF1ZXN0X3Jvb20odHR5LCAxKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmIGluZm8tPnJlYWRfc3RhdHVzX21hc2spewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YSAmIEN5QlJFQUspewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuZmxhZ19idWZfcHRyKysgPQotCSAgICAJCQkJCQkgICAgVFRZX0JSRUFLOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuY2hhcl9idWZfcHRyKysgPQotCQkJCQkgIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSksIFRUWV9CUkVBSyk7CiAJCQkJCWluZm8tPmljb3VudC5yeCsrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmZvLT5mbGFncyAmIEFTWU5DX1NBSyl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvX1NBSyh0dHkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRhdGEgJiBDeUZSQU1FKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdHR5LT5mbGlwLmZsYWdfYnVmX3B0cisrID0KLQkJCQkJCQkgICAgVFRZX0ZSQU1FOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuY2hhcl9idWZfcHRyKysgPQotCQkJCQkgIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSksIFRUWV9GUkFNRSk7CiAJCQkJCWluZm8tPmljb3VudC5yeCsrOwogCQkJCQlpbmZvLT5pZGxlX3N0YXRzLmZyYW1lX2VycnMrKzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRhdGEgJiBDeVBBUklUWSl7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnR0eS0+ZmxpcC5mbGFnX2J1Zl9wdHIrKyA9Ci0JCQkJCQkJICAgIFRUWV9QQVJJVFk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnR0eS0+ZmxpcC5jaGFyX2J1Zl9wdHIrKyA9Ci0JCQkJCSAgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSk7CisJCQkJCS8qIFBpZWNlcyBvZiBzZXZlbi4uLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSksIFRUWV9QQVJJVFkpOwogCQkJCQlpbmZvLT5pY291bnQucngrKzsKIAkJCQkJaW5mby0+aWRsZV9zdGF0cy5wYXJpdHlfZXJycysrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoZGF0YSAmIEN5T1ZFUlJVTil7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnR0eS0+ZmxpcC5mbGFnX2J1Zl9wdHIrKyA9Ci0JCQkJCQkJICAgIFRUWV9PVkVSUlVOOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuY2hhcl9idWZfcHRyKysgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgMCwgVFRZX09WRVJSVU4pOwogCQkJCQlpbmZvLT5pY291bnQucngrKzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBJZiB0aGUgZmxpcCBidWZmZXIgaXRzZWxmIGlzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3dpbmcsIHdlIHN0aWxsIGxvc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbmV4dCBpbmNvbWluZyBjaGFyYWN0ZXIuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHR5LT5mbGlwLmNvdW50Ci0JCQkJCSAgICAgICAgICAgPCBUVFlfRkxJUEJVRl9TSVpFKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHR5LT5mbGlwLmNvdW50Kys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuZmxhZ19idWZfcHRyKysgPQotCQkJCQkJCSAgICAgVFRZX05PUk1BTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqdHR5LT5mbGlwLmNoYXJfYnVmX3B0cisrID0KLQkJCQkJICAgIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpOwotCQkJCQkgICAgaW5mby0+aWNvdW50LnJ4Kys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSksIFRUWV9GUkFNRSk7CisJCQkJICAgICAgICBpbmZvLT5pY291bnQucngrKzsKIAkJCQkJaW5mby0+aWRsZV9zdGF0cy5vdmVycnVucysrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlc2UgdHdvIGNvbmRpdGlvbnMgbWF5IGltcGx5ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBhIG5vcm1hbCByZWFkIHNob3VsZCBiZSBkb25lLiAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogfWVsc2UgaWYoZGF0YSAmIEN5VElNRU9VVCl7ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB9ZWxzZSBpZihkYXRhICYgQ3lTUEVDSEFSKXsgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuZmxhZ19idWZfcHRyKysgPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuY2hhcl9idWZfcHRyKysgPSAwOwotCQkJCQlpbmZvLT5pY291bnQucngrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIHsKKwkJCQkJdHR5X2luc2VydF9mbGlwX2NoYXIodHR5LCAwLCBUVFlfTk9STUFMKTsKKwkJCQkgICAgICAgIGluZm8tPmljb3VudC5yeCsrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuZmxhZ19idWZfcHRyKysgPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnR0eS0+ZmxpcC5jaGFyX2J1Zl9wdHIrKyA9IDA7CisJCQkJICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgMCwgVFRZX05PUk1BTCk7CiAJCQkJICAgIGluZm8tPmljb3VudC5yeCsrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CkBAIC0xMjQwLDE0ICsxMjIxLDEwIEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+bW9uLmNoYXJfbWF4ID0gY2hhcl9jb3VudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT5tb24uY2hhcl9sYXN0ID0gY2hhcl9jb3VudDsKICNlbmRpZgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlKGNoYXJfY291bnQtLSl7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0dHktPmZsaXAuY291bnQgPj0gVFRZX0ZMSVBCVUZfU0laRSl7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHR5LT5mbGlwLmNvdW50Kys7CisJCQkgICAgbGVuID0gdHR5X2J1ZmZlcl9yZXF1ZXN0X3Jvb20odHR5LCBjaGFyX2NvdW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZShsZW4tLSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBjeV9yZWFkYihiYXNlX2FkZHIrKEN5UkRTUjw8aW5kZXgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKnR0eS0+ZmxpcC5mbGFnX2J1Zl9wdHIrKyA9IFRUWV9OT1JNQUw7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICp0dHktPmZsaXAuY2hhcl9idWZfcHRyKysgPSBkYXRhOworCQkJCXR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgZGF0YSwgVFRZX05PUk1BTCk7CiAJCQkJaW5mby0+aWRsZV9zdGF0cy5yZWN2X2J5dGVzKys7CiAJCQkJaW5mby0+aWNvdW50LnJ4Kys7CiAjaWZkZWYgQ1lfMTZZX0hBQ0sKQEAgLTEyNTYsNyArMTIzMyw3IEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT5pZGxlX3N0YXRzLnJlY3ZfaWRsZSA9IGppZmZpZXM7CiAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBzY2hlZHVsZV9kZWxheWVkX3dvcmsoJnR0eS0+ZmxpcC53b3JrLCAxKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNjaGVkdWxlX2RlbGF5ZWRfd29yaygmdHR5LT5idWYud29yaywgMSk7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgLyogZW5kIG9mIHNlcnZpY2UgKi8KICAgICAgICAgICAgICAgICAgICAgY3lfd3JpdGViKGJhc2VfYWRkcisoQ3lSSVI8PGluZGV4KSwgKHNhdmVfeGlyICYgMHgzZikpOwpAQCAtMTU1MSw2ICsxNTI4LDcgQEAKICAgc3RydWN0IGN5Y2xhZGVzX2NhcmQgKmNpbmZvID0gJmN5X2NhcmRbaW5mby0+Y2FyZF07CiAgIHN0cnVjdCB0dHlfc3RydWN0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KioqKioqKioqKioqKioqKioqKioqKi8KLXR5cGVkZWYgc3RydWN0IEJPT1RfUEtUIEJPT1RfUEtUIDsKK3R5cGVkZWYgc3RydWN0IEJPT1RfUEtUIEJPT1RfUEtUOwogc3RydWN0IEJPT1RfUEtUIHsKLSAgICAgICAgICAgICAgICAgICAgc2hvcnQgICAgIHNlcV9udW0gOwotICAgICAgICAgICAgICAgICAgICBjaGFyICAgICAgZGF0YVsxMF0gOwotICAgICAgICAgICAgICAgIH0gOworCXNob3J0IHNlcV9udW07CisJY2hhciBkYXRhWzEwXTsKK307CiAKIAogI2VuZGlmCiAKIC8qKioqKioqKioqKiBlbmQgb2YgZmlsZSAqKioqKioqKioqKi8KLQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL3Jpby9icmF0ZXMuaCBiL2RyaXZlcnMvY2hhci9yaW8vYnJhdGVzLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGJkNGZjODQuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9icmF0ZXMuaAorKysgL2Rldi9udWxsCkBAIC0xLDEwNyArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqCQlCUkFURVMuSAkJCQkgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBKZXJlbXkgUm9sbHMKLSBEYXRlICAgIDogMSBOb3YgMTk5MAotCi0gKg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KICAgIHVzZSBkYXRhWzRdIC8gZGF0YVszXSB0byBpbmRpY2F0ZSBjdXJyZW50IHN0YXRlIGFuZCBtb2RlbSBzdGF0dXMgcmVzcGVjdGl2ZWx5Ci0qLyAKKyovCiAKICNkZWZpbmUJQ09NUExFVEUJKDB4MjAgfCBQUkVfRU1QVElWRSkKIAkJCQkvKiBDb21tYW5kIGNvbXBsZXRlICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2NtZC5oIGIvZHJpdmVycy9jaGFyL3Jpby9jbWQuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggYzM2OWVkYS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL2NtZC5oCisrKyAvZGV2L251bGwKQEAgLTEsODQgKzAsMCBAQAotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgICAgIEMgTyBNIE0gQSBOIEQgICBQIEEgQyBLIEUgVCAgIEggRSBBIEQgRSBSIFMKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gQXV0aG9yICA6IElhbiBOYW5kaHJhCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0ZC4sIEJ5ZmxlZXQsIFN1cnJleSwgVUsuCi0gKgotICogICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z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J0KSA2KQotI2RlZmluZSBDTURfRkxVU0hfUlggICAgICAgICAgICAoICh1c2hvcnQpIDcpCi0jZGVmaW5lIENNRF9QQVJUSU9OX1BPUlQgICAgICAgICggKHVzaG9ydCkgOCkKLSNkZWZpbmUgQ01EX1JFU0VUX1BPUlQgICAgICAgICAgKCAodXNob3J0KSAweDBhKQotI2RlZmluZSBDTURfQk9PVF9VTklUICAgICAgICAgICAoICh1c2hvcnQpIDB4MGIpCi0jZGVmaW5lIENNRF9GT1VORF9VTklUICAgICAgICAgICggKHVzaG9ydCkgMHgwYykKLSNkZWZpbmUgQ01EX0FUVEFDSEVEX1JUQV8yICAgICAgKCAodXNob3J0KSAweDBkKQotI2RlZmluZSBDTURfUFJPVklERV9CT09UICAgICAgICAoICh1c2hvcnQpIDB4MGUpCi0jZGVmaW5lIENNRF9DSVJSVVMgICAgICAgICAgICAgICggKHVzaG9ydCkgMHgwZikKLQotI2RlZmluZSBGT1JNX1NUQVRVU19QS1QgICAgICAgICAoICh1c2hvcnQpIDEgKQotI2RlZmluZSBGT1JNX1BPTExfUEtUICAgICAgICAgICAoICh1c2hvcnQpIDIgKQotI2RlZmluZSBGT1JNX0xJTktfU1RBVFVTX1BLVCAgICAoICh1c2hvcnQpIDMgKQotCi0KLSNkZWZpbmUgQ01EX0RBVEFfUE9SVCAgICAgICAgICAgKCAodXNob3J0KSAxICkKLSNkZWZpbmUgQ01EX0RBVEEgICAgICAgICAgICAgICAgKCAodXNob3J0KSAyICkKLQotI2RlZmluZSBDTURfVFhfUEFSVCAgICAgICAgICAgICAoICh1c2hvcnQpIDIgKQotI2RlZmluZSBDTURfUlhfUEFSVCAgICAgICAgICAgICAoICh1c2hvcnQpIDMgKQotI2RlZmluZSBDTURfUlhfTElNSVQgICAgICAgICAgICAoICh1c2hvcnQpIDQgKQotCi0jZW5kaWYKLQotLyoqKioqKioqKioqIGVuZCBvZiBmaWxlICoqKioqKioqKioqLwotCmRpZmYgLS1naXQgYS9kcml2ZXJzL2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gICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICBFIE4gQSBCIEwgRSAgIEggRSBBIEQgRSBSIFMKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gQXV0aG9yICA6IElhbiBOYW5kaHJhCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0ZC4sIEJ5ZmxlZXQsIFN1cnJleSwgVUsuCi0gKgotICogICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQotICogICAgICBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQotICogICAgICB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvcgotICogICAgICAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCi0gKiAgICAgIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCi0gKiAgICAgIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgICBGIE8gUiBNICAgUCBBIEMgSyBFIFQgICBIIEUgQSBEIEUgUiAgIEYgSSBMIEUKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gQXV0aG9yICA6IElhbiBOYW5kaHJhCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0ZC4sIEJ5ZmxlZXQsIFN1cnJleSwgVUsuCi0gKgotICogICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQotICogICAgICBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQotICogICAgICB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvcgotICogICAgICAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCi0gKiAgICAgIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCi0gKiAgICAgIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBI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RfMSBGT1JNX0JPT1RfUEtUXzEgOwotc3RydWN0IEZPUk1fQk9PVF9QS1RfMSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICB1c2hvcnQgcGt0X251bWJlciA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICB1c2hvcnQgcGt0X3RvdGFsIDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzaG9ydCBib290X3RvcCA7Ci0gICAgICAgICAgICAgICAgICAgICAgIH0gOwotCi10eXBlZGVmIHN0cnVjdCBGT1JNX0JPT1RfUEtUXzIgRk9STV9CT09UX1BLVF8yIDsKLXN0cnVjdCBGT1JNX0JPT1RfUEtUXzIgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNob3J0IHBrdF9udW1iZXIgOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgIGJvb3RfZGF0YVsxMF0gOwotICAgICAgICAgICAgICAgICAgICAgICB9IDsKLQotCi10eXBlZGVmIHN0cnVjdCBGT1JNX0FUVEFDSF9SVEEgICBGT1JNX0FUVEFDSF9SVEEgOwotc3RydWN0IEZPUk1fQVRUQUNIX1JUQSAgewotICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgIGNtZF9jb2RlIDsKLSAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICBib290ZXJfc2VyaWFsWzRdIDsKLSAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICBib290ZXJfbGluayA7Ci0gICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgYm9vdGVlX3NlcmlhbFs0XSA7Ci0gICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgYm9vdGVlX2xpbmsgOwotICAgICAgICAgICAgICAgICAgIH0gOwotCi0KLXR5cGVkZWYgc3RydWN0IEZPUk1fQk9PVF9JRCAgIEZPUk1fQk9PVF9JRCA7Ci1zdHJ1Y3QgRk9STV9CT09UX0lEICB7Ci0gICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgY21kX2NvZGUgOwotICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgIGJvb3RlZV9zZXJpYWxbNF0gOwotICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgIGJvb3RlZV9wcm9kX2lkIDsKLSAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICBib290ZWVfbGluayA7Ci0gICAgICAgICAgICAgICAgICAgfSA7Ci0KLQotCi10eXBlZGVmIHN0cnVjdCBGT1JNX1JPVVRFXzEgICBGT1JNX1JPVVRFXzEgOwotc3RydWN0IEZPUk1fUk9VVEVfMSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgICBjbWRfY29kZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgICBwa3RfbnVtYmVyIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgIHRvdGFsX2luX3NlcXVlbmNlIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgIHVuaXRfaWQgOwotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgaG9zdF91bml0X2lkIDsKLSAgICAgICAgICAgICAgICAgICAgfSA7Ci0KLXR5cGVkZWYgc3RydWN0IEZPUk1fUk9VVEVfMiAgIEZPUk1fUk9VVEVfMiA7Ci1zdHJ1Y3QgRk9STV9ST1VURV8yIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICBjbWRfY29kZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgcGt0X251bWJlciA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgdG90YWxfaW5fc2VxdWVuY2UgOwotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgIHJvdXRlX2RhdGFbOV0gOwotICAgICAgICAgICAgICAgICAgICB9IDsKLQotdHlwZWRlZiBzdHJ1Y3QgRk9STV9ST1VURV9SRVEgICBGT1JNX1JPVVRFX1JFUSA7Ci1zdHJ1Y3QgRk9STV9ST1VURV9SRVEgewotICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgY21kX2NvZGUgOwotICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgcGt0X251bWJlciA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICB0b3RhbF9pbl9zZXF1ZW5jZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICByb3V0ZV9kYXRhWzEwXSA7Ci0gICAgICAgICAgICAgICAgICAgICAgfSA7Ci0KLQotdHlwZWRlZiBzdHJ1Y3QgRk9STV9FUlJPUiAgIEZPUk1fRVJST1IgOwotc3RydWN0IEZPUk1fRVJST1IgewotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgIGNtZF9jb2RlIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICBlcnJvcl9jb2RlIDsKLQotICAgICAgICAgICAgICAgICAgICB9IDsKLQotdHlwZWRlZiBzdHJ1Y3QgRk9STV9TVEFUVVMgICBGT1JNX1NUQVRVUyA7Ci1zdHJ1Y3QgRk9STV9TVEFUVVMgewotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgIGNtZF9jb2RlIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICBzdGF0dXNfY29kZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgbGFzdF9wYWNrZXRfdmFsaWQgOwotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgIHR4X2J1ZmZlciA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgcnhfYnVmZmVyIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICBwb3J0X3N0YXR1cyA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgcGhiX3N0YXR1cyA7Ci0gICAgICAgICAgICAgICAgICAgIH0gOwotCi0KLXR5cGVkZWYgc3RydWN0IEZPUk1fTElOS19TVEFUVVMgICBGT1JNX0xJTktfU1RBVFVTIDsKLXN0cnVjdCBGT1JNX0xJTktfU1RBVFVTIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgY21kX2NvZGUgOwotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICBzdGF0dXNfY29kZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgIGxpbmtfbnVtYmVyIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHVzaG9ydCAgcnhfZXJyb3JzIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHVzaG9ydCAgdHhfZXJyb3JzIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHVzaG9ydCAgY3N1bV9lcnJvcnMgOwotICAgICAgICAgICAgICAgICAgICAgICAgdXNob3J0ICBkaXNjb25uZWN0cyA7Ci0gICAgICAgICAgICAgICAgICAgIH0gOwotCi0KLQotdHlwZWRlZiBzdHJ1Y3QgRk9STV9QQVJUSVRJT04gRk9STV9QQVJUSVRJT04gOwotc3RydWN0IEZPUk1fUEFSVElUSU9OIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgY21kX2NvZGUgOwotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAgICBzdGF0dXNfY29kZSA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyICAgIHBvcnRfbnVtYmVyIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgdHhfbWF4IDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgcnhfbWF4IDsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgICAgcnhfbGltaXQgOwotICAgICAgICAgICAgICAgICAgICAgIH0gOwotCi0KLSNlbmRpZgotCi0vKioqKioqKioqKiogZW5kIG9mIGZpbGUgKioqKioqKioqKiovCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vZnVuYy5oIGIvZHJpdmVycy9jaGFyL3Jpby9mdW5jLmgKaW5kZXggMDE5ODdjNi4uYjQ3N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AgICAgICAgICBIb3N0TG9jazsgIC8qIExvY2sgc3RydWN0dXJlIGZvciBNUFggKi8KLSAgICAvKnN0cnVjdCBwY2lfZGV2aW5mbyAgICBQY2lEZXZJbmZvOyAqLy8qIFBDSSBCdXMvRGV2aWNlL0Z1bmN0aW9uIHN0dWZmICovCi0gICAgLypzdHJ1Y3QgbG9ja2IJICAgIEhvc3RMb2NrOyAgKi8vKiBMb2NrIHN0cnVjdHVyZSBmb3IgTVBYICovCi0gICAgdWludCAgICAgICAgICAgICAgICAgICAgV29ya1RvQmVEb25lOyAvKiBzZXQgdG8gdHJ1ZSBlYWNoIGludGVycnVwdCAqLwotICAgIHVpbnQgICAgICAgICAgICAgICAgICAgIEluSW50cjsgICAgLyogQmVpbmcgc2VydmljZWQ/ICovCi0gICAgdWludCAgICAgICAgICAgICAgICAgICAgSW50U3J2RG9uZTsvKiBob3N0J3MgaW50ZXJydXB0IGhhcyBiZWVuIHNlcnZpY2VkICovCi0gICAgaW50CQkJICAgICgqQ29weSkoIGNhZGRyX3QsIGNhZGRyX3QsIGludCApOyAvKiBjb3B5IGZ1bmMgKi8KLSAgICBzdHJ1Y3QgdGltZXJfbGlzdCB0aW1lcjsKLSAgICAvKgotICAgICoqICAgICAgICAgICAgICAgSSBNIFAgTyBSIFQgQSBOIFQgIQotICAgICoqCi0gICAgKiogVGhlIHJlc3Qgb2YgdGhpcyBkYXRhIHN0cnVjdHVyZSBpcyBjbGVhcmVkIHRvIHplcm8gYWZ0ZXIKLSAgICAqKiBhIFJJT19IT1NUX0ZPQUQgY29tbWFuZC4KLSAgICAqLwotICAgIAotICAgIHVsb25nICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgLyogV2hhdHMgZ29pbmcgZG93biAqLworc3RydWN0IEhvc3QgeworCXVjaGFyIFR5cGU7CQkvKiBSSU9fRUlTQSwgUklPX01DQSwgLi4uICovCisJdWNoYXIgSXZlYzsJCS8qIFBPTExFRCBvciBpdmVjIG51bWJlciAqLworCXVja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dHJ1Y3R1cmUgaXMgY2xlYXJlZCB0byB6ZXJvIGFmdGVyCisJICoqIGEgUklPX0hPU1RfRk9BRCBjb21tYW5kLgorCSAqLworCisJdWxvbmcgRmxhZ3M7CQkvKiBXaGF0cyBnb2luZyBkb3duICovCiAjZGVmaW5lIFJDX1dBSVRJTkcgICAgICAgICAgICAwCiAjZGVmaW5lIFJDX1NUQVJUVVAgICAgICAgICAgICAxCiAjZGVmaW5lIFJDX1JVTk5JTkcgICAgICAgICAgICAyCkBAIC05MywyNSArOTIsMjUgQEAKICNkZWZpbmUgUkNfQk9PVF9PV04gICAgICAgICAgIDB4MTAJLyogT25seSBib290IFJUQXMgYm91bmQgdG8gdGhpcyBzeXN0ZW0gKi8KICNkZWZpbmUgUkNfQk9PVF9OT05FICAgICAgICAgIDB4MjAJLyogRG9uJ3QgYm9vdCBhbnkgUlRBcyAoc2xhdmUgbW9kZSkgKi8KIAotICAgIHN0cnVjdCBUb3AJCSAgICBUb3BvbG9neVtMSU5LU19QRVJfVU5JVF07IC8qIG9uZSBwZXIgbGluayAqLwotICAgIHN0cnVjdCBNYXAgICAgICAgICAgICAgIE1hcHBpbmdbTUFYX1JVUF07ICAgICAvKiBNYXBwaW5ncyBmb3IgaG9zdCAqLwotICAgIHN0cnVjdCBQSEIJCSAgICAqUGhiUDsgICAgICAgICAgICAgICAgLyogUG9pbnRlciB0byB0aGUgUEhCIGFycmF5ICovCi0gICAgdXNob3J0ICAgICAgICAgICAJICAgICpQaGJOdW1QOyAgICAgICAgICAgICAvKiBQdHIgdG8gTnVtYmVyIG9mIFBIQidzICovCi0gICAgc3RydWN0IExQQiAJICAgICAgICAgICAgKkxpbmtTdHJQIDsgICAgICAgICAgIC8qIExpbmsgU3RydWN0dXJlIEFycmF5ICovCi0gICAgc3RydWN0IFJVUCAgICAgICAJICAgICpSdXBQOyAgICAgICAgICAgICAgICAvKiBTaXh0ZWVuIHJlYWwgcnVwcyBoZXJlICovCi0gICAgc3RydWN0IFBBUk1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4MDg2MCAgICAvKiB3aGF0IG5vdCB0byBleHBlY3QgKi8KKyNkZWZpbmUgUklPX0RVTUJQQVJNIDB4MDg2MAkvKiB3aGF0IG5vdCB0byBleHBlY3QgKi8KIAogI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2hvc3Rody5oIGIvZHJpdmVycy9jaGFyL3Jpby9ob3N0aHcuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZjZmMzFlYy4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL2hvc3Rody5oCisrKyAvZGV2L251bGwKQEAgLTEsNTcgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICBIIE8gUyBUICAgICAgSCBBIFIgRCBXIEEgUiBFCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYSAvIEplcmVteSBSb2xscwotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlc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ExJTktfQk9PVDIgICAgICAgICAoKHVzaG9ydCkgMikgICAgLyogVHJ5aW5nIHRvIHNlbmQgMm5kIHN0YWdlIGJvb3QgKi8KLSNkZWZpbmUgTElOS19CT09UMldBSVQgICAgICgodXNob3J0KSAzKSAgICAvKiBXYWl0aW5nIGZvciBzZWxmdGVzdCByZXN1bHRzICovCi0jZGVmaW5lIExJTktfQk9PVDMgICAgICAgICAoKHVzaG9ydCkgNCkgICAgLyogVHJ5aW5nIHRvIHNlbmQgM3JkIHN0YWdlIGJvb3RzICovCi0jZGVmaW5lIExJTktfU1lOQyAgICAgICAgICAoKHVzaG9ydCkgNSkgICAgLyogU3luY2luZyAqLworI2RlZmluZQlMSU5LX0RJU0NPTk5FQ1RFRCAgKCh1c2hvcnQpIDApCS8qIERpc2Nvbm5lY3RlZCAqLworI2RlZmluZSBMSU5LX0JPT1QxICAgICAgICAgKCh1c2hvcnQpIDEpCS8qIFRyeWluZyB0byBzZW5kIDFzdCBzdGFnZSBib290ICovCisjZGVmaW5lIExJTktfQk9PVDIgICAgICAgICAoKHVzaG9ydCkgMikJLyogVHJ5aW5nIHRvIHNlbmQgMm5kIHN0YWdlIGJvb3QgKi8KKyNkZWZpbmUgTElOS19CT09UMldBSVQgICAgICgodXNob3J0KSAzKQkvKiBXYWl0aW5nIGZvciBzZWxmdGVzdCByZXN1bHRzICovCisjZGVmaW5lIExJTktfQk9PVDMgICAgICAgICAoKHVzaG9ydCkgNCkJLyogVHJ5aW5nIHRvIHNlbmQgM3JkIHN0YWdlIGJvb3RzICovCisjZGVmaW5lIExJTktfU1lOQyAgICAgICAgICAoKHVzaG9ydCkgNSkJLyogU3luY2luZyAqLwogCi0jZGVmaW5lIExJTktfSU5UUk8gICAgICAgICAoKHVzaG9ydCkgMTApICAgIC8qIEludHJvZHVjdG9yeSBwYWNrZXQgKi8KLSNkZWZpbmUgTElOS19TVVBQTFlJRCAgICAgICgodXNob3J0KSAxMSkgICAgLyogVHJ5aW5nIHRvIHN1cH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Ch1c2hvcnQpIDApICAgIC8qIExFRCBvZmYgKi8KLSNkZWZpbmUgTEVEX1JFRCAgICAgICAgICAgICgodXNob3J0KSAxKSAgICAvKiBMRUQgUmVkICovCi0jZGVmaW5lIExFRF9HUkVFTiAgICAgICAgICAoKHVzaG9ydCkgMikgICAgLyogTEVEIEdyZWVuICovCi0jZGVmaW5lIExFRF9PUkFOR0UgICAgICAgICAoKHVzaG9ydCkgNCkgICAgLyogTEVEIE9yYW5nZSAqLwotI2RlZmluZSBMRURfMVRPOF9PUEVOICAgICAgKCh1c2hvcnQpIDEpICAgIC8qIFBvcnQgMS0+OCBMRUQgb24gKi8KLSNkZWZpbmUgTEVEXzlUTzE2X09QRU4gICAgICgodXNob3J0KSAyKSAgICAvKiBQb3J0IDktPjE2IExFRCBvbiAqLworI2RlZmluZSBMRURfT0ZGICAgICAgICAgICAgKCh1c2hvcnQpIDApCS8qIExFRCBvZmYgKi8KKyNkZWZpbmUgTEVEX1JFRCAgICAgICAgICAgICgodXNob3J0KSAxKQkvKiBMRUQgUmVkICovCisjZGVmaW5lIExFRF9HUkVFTiAgICAgICAgICAoKHVzaG9ydCkgMikJLyogTEVEIEdyZWVuICovCisjZGVmaW5lIExFRF9PUkFOR0UgICAgICAgICAoKHVzaG9ydCkgNCkJLyogTEVEIE9yYW5nZSAqLworI2RlZmluZSBMRURfMVRPOF9PUEVOICAgICAgKCh1c2hvcnQpIDEpCS8qIFBvcnQgMS0+OCBMRUQgb24gKi8KKyNkZWZpbmUgTEVEXzlUTzE2X09QRU4gICAgICgodXNob3J0KSAyKQkvKiBQb3J0IDktPjE2IExFRCBvbiAqLwogI2RlZmluZSBMRURfU0VUX0NPTE9VUihjb2xvdXIpCShsaW5rLT5sZWQgPSAoY29sb3VyKSkKICNkZWZpbmUgTEVEX09SX0NPTE9VUihjb2xvdXIpCShsaW5rLT5sZWQgfD0gKGNvbG91cikpCiAjZGVmaW5lIExFRF9USU1FT1VUKHRpbWUpICAgIChsaW5rLT5sZWRfdGltZW91dCA9IFJpb1RpbWVQbHVzKFJpb1RpbWUoKSwodGltZSkpKQpAQCAtMTE2LDcyICsxMTYsNzIgQEAKICNkZWZpbmUgTEVEX1NFVF9DT0xPVVIoY29sb3VyKQogI2RlZmluZSBMRURfT1JfQ09MT1VSKGNvbG91cikKICNkZWZpbmUgTEVEX1RJTUVPVVQodGltZSkKLSNlbmRpZiAvKiBSVEEgKi8KKyNlbmRpZgkJCQkvKiBSVEEgKi8KIAogc3RydWN0IExQQiB7Ci0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIGxpbmtfbnVtYmVyIDsgICAgICAgLyogTGluayBOdW1iZXIgKi8KLSAgICAgICAgICAgICAgIENoYW5uZWxfcHRyICAgaW5fY2ggOyAgICAgICAgICAgICAvKiBMaW5rIEluIENoYW5uZWwgKi8KLSAgICAgICAgICAgICAgIENoYW5uZWxfcHRyICAgb3V0X2NoIDsgICAgICAgICAgICAvKiBMaW5rIE91dCBDaGFubmVsICovCisJV09SRCBsaW5rX251bWJlcjsJLyogTGluayBOdW1iZXIgKi8KKwlDaGFubmVsX3B0ciBpbl9jaDsJLyogTGluayBJbiBDaGFubmVsICovCisJQ2hhbm5lbF9wdHIgb3V0X2NoOwkvKiBMaW5rIE91dCBDaGFubmVsICovCiAjaWZkZWYgUlRBCi0gICAgICAgICAgICAgICB1Y2hhciAgICAgICAgc3RhdF9sZWQgOyAgICAgICAgICAvKiBQb3J0IG9wZW4gbGVkcyAqLwotICAgICAgICAgICAgICAgdWNoYXIgICAgICAgIGxlZCA7ICAgICAgICAgICAgICAgLyogVHJ1ZSwgbGlnaHQgbGVkISAqLworCXVjaGFyIHN0YXRfbGVkOwkJLyogUG9ydCBvcGVuIGxlZHMgKi8KKwl1Y2hhciBsZWQ7CQkvKiBUcnVlLCBsaWdodCBsZWQhICovCiAjZW5kaWYKLSAgICAgICAgICAgICAgIEJZVEUgYXR0YWNoZWRfc2VyaWFsWzRdOyAvKiBBdHRhY2hlZCBzZXJpYWwgbnVtYmVyICovCi0gICAgICAgICAgICAgICBCWVRFIGF0dGFjaGVkX2hvc3Rfc2VyaWFsWzRdOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFNlcmlhbCBudW1iZXIgb2YgSG9zdCB3aG8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib290ZWQgdGhlIG90aGVyIGVuZCAqLwotICAgICAgICAgICAgICAgV09SRCAgICAgICAgICBkZXNjaGVkdWxlZCA7ICAgICAgIC8qIEN1cnJlbnRseSBEZXNjaGVkdWxlZCAqLwotICAgICAgICAgICAgICAgV09SRCAgICAgICAgICBzdGF0ZTsgICAgICAgICAgICAgIC8qIEN1cnJlbnQgc3RhdGUgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgc2VuZF9wb2xsIDsgICAgICAgICAvKiBTZW5kIGEgUG9sbCBQYWNrZXQgKi8KLSAgICAgICAgICAgICAgIFByb2Nlc3NfcHRyICAgbHR0X3AgOyAgICAgICAgICAgICAvKiBQcm9jZXNzIERlc2NyaXB0b3IgKi8KLSAgICAgICAgICAgICAgIFByb2Nlc3NfcHRyICAgbHJ0X3AgOyAgICAgICAgICAgICAvKiBQcm9jZXNzIERlc2NyaXB0b3IgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgbHJ0X3N0YXR1cyA7ICAgICAgICAvKiBDdXJyZW50IGxydCBzdGF0dXMgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgbHR0X3N0YXR1cyA7ICAgICAgICAvKiBDdXJyZW50IGx0dCBzdGF0dXMgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgdGltZW91dCA7ICAgICAgICAgICAvKiBUaW1lb3V0IHZhbHVlICovCi0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIHRvcG9sb2d5OyAgICAgICAgICAgLyogVG9wb2xvZ3kgYml0cyAqLw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OyAgICAgLyogTnVtYmVyIG9mIGF0dGFjaGVkIGxpbmsgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgY3N1bV9lcnJvcnMgOyAgICAgICAvKiBjc3VtIGVycm9ycyAqLwotICAgICAgICAgICAgICAgV09SRCAgICAgICAgICBudW1fZGlzY29ubmVjdHMgOyAgIC8qIG51bWJlciBvZiBkaXNjb25uZWN0cyAqLwotICAgICAgICAgICAgICAgV09SRCAgICAgICAgICBudW1fc3luY19yY3ZkIDsgICAgIC8qICMgc3luYydzIHJlY2VpdmVkICovCi0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIG51bV9zeW5jX3Jxc3QgOyAgICAgLyogIyBzeW5jIHJlcXVlc3RzICovCi0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIG51bV90eCA7ICAgICAgICAgICAgLyogTnVtIHBrdHMgc2VudCAqLwotICAgICAgICAgICAgICAgV09SRCAgICAgICAgICBudW1fcnggOyAgICAgICAgICAgIC8qIE51bSBwa3RzIHJlY2VpdmVkICovCi0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIG1vZHVsZV9hdHRhY2hlZDsgICAgLyogTW9kdWxlIHRweWVzIG9mIGF0dGFjaGVkICovCi0gICAgICAgICAgICAgICBXT1JEICAgICAgICAgIGxlZF90aW1lb3V0OyAgICAgICAgLyogTEVEIHRpbWVvdXQgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgZmlyc3RfcG9ydDsgICAgICAgICAvKiBGaXJzdCBwb3J0IHRvIHNlcnZpY2UgKi8KLSAgICAgICAgICAgICAgIFdPUkQgICAgICAgICAgbGFzdF9wb3J0OyAgICAgICAgICAvKiBMYXN0IHBvcnQgdG8gc2VydmljZSAqLwotICAgICAgICAgICB9IDsKKwlzdHJ1Y3QgUlVQIGxpbmtfcnVwOwkvKiBSVVAgZm9yIHRoZSBsaW5rIChQT0xMLAorCQkJCSAgIHRvcG9sb2d5IGV0Yy4pICovCisJV09SRCBhd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gob2xkc3BsKSA9PSAwKSBzcGwwKCkKICNlbmRpZgogCi0jZW5kaWYgLyogaWZuZGVmIF9saXN0LmggKi8KKyNlbmRpZgkJCQkvKiBpZm5kZWYgX2xpc3QuaCAqLwogLyoqKioqKioqKioqIGVuZCBvZiBmaWxlICoqKioqKioqKioqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL3Jpby9scnQuaCBiL2RyaXZlcnMvY2hhci9yaW8vbHJ0LmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGJiYWM4ZmEuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9scnQuaAorKysgL2Rldi9udWxsCkBAIC0xLDU1ICswLDAgQEAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgTCBSIFQKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCi0gQXV0aG9yICA6IElhbiBOYW5kaHJhIC8gSmVyZW15IFJvbGxzCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0ZC4sIEJ5ZmxlZXQsIFN1cnJleSwgVUsuCi0gKgotICogICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQotICogICAg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0tLS0tLS0tLS0KLSAgRGF0ZSAgICAgQnkgICAgICAgICAgICAgICAgRGVzY3JpcHRpb24KLSAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYgbGludAotI2lmZGVmIFNDQ1NfTEFCRUxTCi1zdGF0aWMgY2hhciAqX3Jpb19scnRfaF9zY2NzID0gIkAoIylscnQuaAkxLjEiIDsKLSNlbmRpZgotI2VuZGlmCi0KLQotI2lmZGVmIERDSVJSVVMKLSNkZWZpbmUgTFJUX1NUQUNLICAgICAgICh1bnNpZ25lZCBzaG9ydCkgNjAwCi0jZWxzZQotI2RlZmluZSBMUlRfU1RBQ0sgICAgICAgICh1c2hvcnQpIDIwMAotI2VuZGlmCi0KLQotCi0vKioqKioqKioqKiogZW5kIG9mIGZpbGUgKioqKioqKioqKiovCi0KLQotCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL2x0dC5oIGIvZHJpdmVycy9jaGFyL3Jpby9sdHQuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZjI3ZGNlYy4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL2x0dC5oCisrKyAvZGV2L251bGwKQEAgLTEsNTUgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICBMIFQgVAotICoqKioqKiogICAgICAgICAg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cml2ZXJzL2NoYXIvcmlvL2x0dHdha2UuaCBiL2RyaXZlcnMvY2hhci9yaW8vbHR0d2FrZS5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCBmZTE3ZDBlLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvY2hhci9yaW8vbHR0d2FrZS5oCisrKyAvZGV2L251bGwKQEAgLTEsNTMgKzAsMCBAQAotCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgIEwgVCBUICAgIFcgQSBLIEUgVSBQICAgIEggRSBBIEQgRSBSCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBJYW4gTmFuZGhyYQotIERhdGUgICAgOgotCi0gKgotICogIChDKSAxOTkwIC0gMjAwMCBTcGVjaWFsaXggSW50ZXJuYXRpb25hbCBMdGQuLCBCeWZsZWV0LCBTdXJyZXksIFVLLgotICoKLSAqICAgICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKLSAqICAgICAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKLSAqICAgICAgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gM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gICAgYm9vdGxvYWRlcl8xIDsgICAgICAgICAvKiAxc3QgU3RhZ2UgQm9vdCBMb2FkZXIgKi8KLUJZVEVfcHRyICAgICAgICAgIGJvb3Rsb2FkZXJfMiA7ICAgICAgICAgLyogMm5kIFN0YWdlIEJvb3QgTG9hZGVyICovCi1XT1JEX3B0ciAgICAgICAgICBwb3J0X3JvdXRlX21hcF9wdHIgOyAgIC8qIFBvcnQgUm91dGUgTWFwICovCi1ST1VURV9TVFJfcHRyICAgICByb3V0ZV9wdHIgOyAgICAgICAgICAgIC8qIFVuaXQgUm91dGUgTWFwICovCi1OVU1CRVJfcHRyICAgICAgICBtYXBfcHJlc2VudCA7ICAgICAgICAgIC8qIFJvdXRlIE1hcCBwcmVzZW50ICovCi1OVU1CRVIgICAgICAgICAgICBwa3RfbnVtIDsgICAgICAgICAgICAgICAvKiBUb3RhbCBudW1iZXIgb2YgcGFja2V0cyAqLwotTlVNQkVSICAgICAgICAgICAgcV9udW0gOyAgICAgICAgICAgICAgICAgLyogVG90YWwgbnVtYmVyIG9mIFEgcGFja2V0cyAqLwotV09SRCAgICAgICAgICAgICAgYnVmZmVyc19wZXJfcG9ydCA7ICAgICAgLyogTnVtYmVyIG9mIGJ1ZmZlcnMgcGVyIHBvcnQgKi8KLVdPUkQgICAgICAgICAgICAgIGhlYXBfc2l6ZSA7ICAgICAgICAgICAgIC8qIEluaXRpYWwgc2l6ZSBvZiBoZWFwICovCi1XT1JEICAgICAgICAgICAgICBoZWFwX2xlZnQgOyAgICAgICAgICAgICAvKiBDdXJyZW50IEhlYXAgbGVmdCAqLwotV09SRCAgICAgICAgICAgICAgZXJyb3IgOyAgICAgICAgICAgICAgICAgLyogRXJyb3IgY29kZSAqLwotV09SRCAgICAgICAgICAgICAgdHhfbWF4OyAgICAgICAgICAgICAgICAgLyogTWF4IG51bWJlciBvZiB0eCBwa3RzIHBlciBwaGIgKi8KLVdPUkQgICAgICAgICAgICAgIHJ4X21heDsgICAgICAgICAgICAgICAgIC8qIE1heCBudW1iZXIgb2YgcnggcGt0cyBwZXIgcGhiICovCi1XT1JEICAgICAgICAgICAgICByeF9saW1pdDsgICAgICAgICAgICAgICAvKiBGb3IgaGlnaCAvIGxvdyB3YXRlcm1hcmtzICovCi1OVU1CRVIgICAgICAgICAgICBsaW5rcyA7ICAgICAgICAgICAgICAgICAvKiBMaW5rcyB0byB1c2UgKi8KLU5VTUJFUiAgICAgICAgICAgIHRpbWVyIDsgICAgICAgICAgICAgICAgIC8qIEludGVycnVwdHMgcGVyIHNlY29uZCAqLwotUlVQX3B0ciAgICAgICAgICAgcnVwcyA7ICAgICAgICAgICAgICAgICAvKiBQb2ludGVyIHRvIHRoZSBSVVBzICovCi1XT1JEICAgICAgICAgICAgICBtYXhfcGhiIDsgICAgICAgICAgICAgIC8qIE1vc3RseSBmb3IgZGVidWdnaW5nICovCi1XT1JEICAgICAgICAgICAgICBsaXZpbmcgOyAgICAgICAgICAgICAgIC8qIEp1c3QgaW5jcmVtZW50cyEhICovCi1XT1JEICAgICAgICAgICAgICBpbml0X2RvbmUgOyAgICAgICAgICAgIC8qIEluaXRpYWxpc2F0aW9uIG92ZXIgKi8KLVdPUkQgICAgICAgICAgICAgIGJvb3RpbmdfbGluayA7Ci1XT1JEICAgICAgICAgICAgICBpZGxlX2NvdW50IDsgICAgICAgICAgIC8qIElkbGUgdGltZSBjb3VudGVyICovCi1XT1JEICAgICAgICAgICAgICBidXN5X2NvdW50IDsgICAgICAgICAgIC8qIEJ1c3kgY291bnRlciAqLwotV09SRCAgICAgICAgICAgICAgaWRsZV9jb250cm9sIDsgICAgICAgICAvKiBDb250cm9sIElkbGUgUHJvY2VzcyAqLworc3RydWN0IFBBUk1fTUFQIHsKKwlQSEJfcHRyIHBoYl9wdHI7CS8qIFBvaW50ZXIgdG8gdGhlIFBIQiBhcnJheSAqLworCVdPUkRfcHRyIHBoYl9udW1fcHRyOwkvKiBQdHIgdG8gTnVtYmVyIG9mIFBIQidzICovCisJRlJFRV9MS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qKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lIFBIQl9IQU5EU0hBS0VfU0VUICAgICAgKCh1c2hvcnQpIDB4MDAxKSAvKiBTZXQgYnkgTFJUICovCisjZGVmaW5lIFBIQl9IQU5EU0hBS0VfU0VUICAgICAgKCh1c2hvcnQpIDB4MDAxKQkvKiBTZXQgYnkgTFJUICovCiAKLSNkZWZpbmUgUEhCX0hBTkRTSEFLRV9SRVNFVCAgICAgKCh1c2hvcnQpIDB4MDAyKSAvKiBTZXQgYnkgSVNSIC8gZHJpdmVyICovCisjZGVmaW5lIFBIQl9IQU5EU0hBS0VfUkVTRVQgICAgICgodXNob3J0KSAweDAwMikJLyogU2V0IGJ5IElTUiAvIGRyaXZlciAqLwogCiAjZGVmaW5lIFBIQl9IQU5EU0hBS0VfRkxBR1MgICAgIChQSEJfSEFORFNIQUtFX1JFU0VUIHwgUEhCX0hBTkRTSEFLRV9TRVQpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBSZXNldCBieSBsdHQgKi8KKwkJCQkJCS8qIFJlc2V0IGJ5IGx0dCAqLwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBNYXhpbXVtIG51bWJlciBvZiBQSEIncwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpZiBkZWZpbmVkIChIT1NUKSB8fCBkZWZpbmVkIChJTktFUk5FTCkKLSNkZWZpbmUgTUFYX1BIQiAgICAgICAgICAgICAgICgodXNob3J0KSAxMjgpICAvKiByYW5nZSAwLTEyNyAqLworI2RlZmluZSBNQVhfUEhCICAgICAgICAgICAgICAgKCh1c2hvcnQpIDEyOCkJLyogcmFuZ2UgMC0xMjcgKi8KICNlbHNlCi0jZGVmaW5lIE1BWF9QSEIgICAgICAgICAgICAgICAoKHVzaG9ydCkgOCkgICAgLyogcmFuZ2UgMC03ICovCisjZGVmaW5lIE1BWF9QSEIgICAgICAgICAgICAgICAoKHVzaG9ydCkgOCkJLyogcmFuZ2UgMC03ICovCiAjZW5kaWYKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIERlZmluZXMgZm9yIHRoZSBtb2RlIGZpZWxkcwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgVFhQS1RfSU5DT01QTEVURSAgICAgICAgMHgwMDAxICAvKiBQcmV2aW91cyB0eCBwYWNrZXQgbm90IGNvbXBsZXRlZCAqLwotI2RlZmluZSBUWElOVFJfRU5BQkxFRCAgICAgICAgICAweDAwMDIgIC8qIFR4IGludGVycnVwdCBpcyBlbmFibGVkICovCi0jZGVmaW5lIFRYX1RBQjMgICAgICAgICAgICAgICAgIDB4MDAwNCAgLyogVEFCMyBtb2RlICovCi0jZGVmaW5lIFRYX09DUk5MICAgICAgICAgICAgICAgIDB4MDAwOCAgLyogT0NSTkwgbW9kZSAqLwotI2RlZmluZSBUWF9PTkxDUiAgICAgICAgICAgICAgICAweDAwMTAgIC8qIE9OTENSIG1vZGUgKi8KLSNkZWZpbmUgVFhfU0VORFNQQUNFUyAgICAgICAgICAgMHgwMDIwICAvKiBTZW5kIG4gc3BhY2VzIGNvbW1hbmQgbmVlZHMgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGluZyAqLwotI2RlZmluZSBUWF9TRU5ETlVMTCAgICAgICAgICAgICAweDAwNDAgIC8qIEVzY2FwaW5nIE5VTEwgbmVlZHMgY29tcGxldGluZyAqLwotI2RlZmluZSBUWF9TRU5ETEYgICAgICAgICAgICAgICAweDAwODAgIC8qIExGIC0+IENSIExGIG5lZWRzIGNvbXBsZXRpbmcgKi8KLSNkZWZpbmUgVFhfUEFSQUxMRUxCVUcgICAgICAgICAgMHgwMTAwICAvKiBDRDE0MDAgTEYgLT4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AgICAgICAgIHVuc2lnbmVkIGNoYXIgcG9ydDsgICAgIC8qIFNvdXJjZSBwb3J0ICovCi0gICAgICAgICAgICB9IHMyOwotICAgICAgICB9IHUyOworCXVuaW9uIHsKKwkJdXNob3J0IHNvdXJjZTsJLyogQ29tcGxldGUgc291cmNlICovCisJCXN0cnVjdCB7CisJCQl1bnNpZ25lZCBjaGFyIHVuaXQ7CS8qIFNvdXJjZSB1bml0ICovCisJCQl1bnNpZ25lZCBjaGFyIHBvcnQ7CS8qIFNvdXJjZSBwb3J0ICovCisJCX0gczI7CisJfSB1MjsKICNlbmRpZgotICAgICAgICBXT1JEICAgICAgaGFuZHNoYWtlIDsKLSAgICAgICAgV09SRCAgICAgIHN0YXR1cyA7Ci0gICAgICAgIE5VTUJFUiAgICAgICB0aW1lb3V0IDsgICAgICAgICAgIC8qIE1heGltdW0gb2YgMS45IHNlY29uZHMgKi8KLSAgICAgICAgV09SRCAgICAgIGxpbmsgOyAgICAgICAgICAgICAgLyogU2VuZCBkb3duIHRoaXMgbGluayAqLworCVdPUkQgaGFuZHNoYWtlOworCVdPUkQgc3RhdHVzOworCU5VTUJFUiB0aW1lb3V0OwkJLyogTWF4aW11bSBvZiAxLjkgc2Vjb25kcyAqLworCVdPUkQgbGluazsJCS8qIFNlbmQgZG93biB0aGlzIGxpbmsgKi8KICNpZmRlZiBJTktFUk5FTAotICAgICAgICBXT1JEICAgICAgZGVzdGluYXRpb247CisJV09SRCBkZXN0aW5hdGlvbjsKICNlbHNlCi0gICAgICAgIHVuaW9uICAgICAgIAotICAgICAgICB7Ci0gICAgICAgICAgICB1c2hvcnQgZGVzdGluYXRpb247ICAgICAgICAgLyogQ29tcGxldGUgZGVzdGluYXRpb24gKi8KLSAgICAgICAgICAgIHN0cnVjdAotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgdW5pdDsgICAgIC8qIERlc3RpbmF0aW9uIHVuaXQgKi8KLSAgICAgICAgICAgICAgICB1b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QgOyAgICAgLyogU291cmNlIFVuaXQgSWQgKi8KLSAgICAgICAgICAgICAgICAgICBCWVRFICAgIHNyY19wb3J0IDsgICAgIC8qIFNvdXJjZSBQT3J0ICovCisJQllURSBkZXN0X3VuaXQ7CQkvKiBEZXN0aW5hdGlvbiBVbml0IElkICovCisJQllURSBkZXN0X3BvcnQ7CQkvKiBEZXN0aW5hdGlvbiBQT3J0ICovCisJQllURSBzcmNfdW5pdDsJCS8qIFNvdXJjZSBVbml0IElkICovCisJQllURSBzcmNfcG9ydDsJCS8qIFNvdXJjZSBQT3J0ICovCiAjZWxzZQotICAgICAgICAgICAgICAgICAgIHVuaW9uICAgICAgIAotICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgdXNob3J0IGRlc3RpbmF0aW9uOyAgICAgICAgIC8qIENvbXBsZXRlIGRlc3RpbmF0aW9uICovCi0gICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdAotICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyIHVuaXQ7ICAgICAvKiBEZXN0aW5hdGlvbiB1bml0ICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyIHBvcnQ7ICAgICAvKiBEZXN0aW5hdGlvbiBwb3J0ICovCi0gICAgICAgICAgICAgICAgICAgICAgIH0gczE7Ci0gICAgICAgICAgICAgICAgICAgfSB1MTsKLSAgICAgICAgICAgICAgICAgICB1bmlvbiAgICAgICAKLSAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgIHVzaG9ydCBzb3VyY2U7ICAgICAgICAgICAgICAvKiBDb21wbGV0ZSBzb3VyY2UgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0Ci0gICAgICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgdW5pdDsgICAgIC8qIFNvdXJjZSB1bml0ICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyIHBvcnQ7ICAgICAvKiBTb3VyY2UgcG9ydCAqLwotICAgICAgICAgICAgICAgICAgICAgICB9IHMyOwotICAgICAgICAgICAgICAgICAgIH0gdTI7CisJdW5pb24geworCQl1c2hvcnQgZGVzdGluYXRpb247CS8qIENvbXBsZXRlIGRlc3RpbmF0aW9uICovCisJCXN0cnVjdCB7CisJCQl1bnNpZ25lZCBjaGFyIHVuaXQ7CS8qIERlc3RpbmF0aW9uIHVuaXQgKi8KKwkJCXVuc2lnbmVkIGNoYXIgcG9ydDsJLyogRGVzdGluYXRpb24gcG9ydCAqLworCQl9IHMxOworCX0gdTE7CisJdW5pb24geworCQl1c2hvcnQgc291cmNlOwkvKiBDb21wbGV0ZSBzb3VyY2UgKi8KKwkJc3RydWN0IHsKKwkJCXVuc2lnbmVkIGNoYXIgdW5pdDsJLyogU291cmNlIHVuaXQgKi8KKwkJCXVuc2lnbmVkIGNoYXIgcG9ydDsJLyogU291cmNlIHBvcnQgKi8KKwkJfSBzMjsKKwl9IHUyOwogI2VuZGlmCiAjaWZkZWYgSU5LRVJORUwKLSAgICAgICAgICAgICAgICAgICBCWVRFIGxlbiA7Ci0gICAgICAgICAgICAgICAgICAgQllURSBjb250cm9sOworCUJZVEUgbGVuOworCUJZVEUgY29udHJvbDsKICNlbHNlCi0gICAgICAgICAgICAgICAgICAgdW5pb24KLSAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICB1c2hvcnQgICAgICBjb250cm9sOwotICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0Ci0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciBsZW47Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciBjb250cm9sOwotICAgICAgICAgICAgICAgICAgICAgICAgfSBzMzsKLSAgICAgICAgICAgICAgICAgICAgfSB1MzsKKwl1bmlvbiB7CisJCXVzaG9ydCBjb250cm9sOworCQlzdHJ1Y3QgeworCQkJdW5zaWduZWQgY2hhciBsZW47CisJCQl1bnNpZ25lZCBjaGFyIGNvbnRyb2w7CisJCX0gczM7CisJfSB1MzsKICNlbmRpZgotICAgICAgICAgICAgICAgICAgIEJZVEUgICAgZGF0YVtQS1RfTUFYX0RBVEFfTEVOXSA7ICAgICAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEFjdHVhbCBkYXRhIDotKSAqLwotICAgICAgICAgICAgICAgICAgIFdPUkQgIGNzdW0gOyAgICAgICAgICAgICAgICAgIC8qIEMtU1VNICovCi0gICAgICAgICAgICAgICB9IDsKKwlCWVRFIGRhdGFbUEtUX01BWF9EQVRBX0xFTl07CisJLyogQWN0dWFsIGRhdGEgOi0pICovCisJV09SRCBjc3VtOwkJLyogQy1TVU0gKi8KK307CiAjZW5kaWYKIAogLyoqKioqKioqKioqIGVuZCBvZiBmaWxlICoqKioqKioqKioqLwotCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vcG9sbC5oIGIvZHJpdmVycy9jaGFyL3Jpby9wb2xsLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGQ5YjhlOTguLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9wb2xsLmgKKysrIC9kZXYvbnVsbApAQCAtMSw3NiArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgIFAgTyBMIEw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kZWZpbmUgUE9MTF9QRVJJT0QgICAgICAgICAgIChpbnQpIFNFQ09ORAotCi0vKiBUaGUgdmFyaW91cyBwb2xsIGNvbW1hbmRzICovCi0jZGVmaW5lIFBPTExfUE9MTCAgICAgICAgICAgICAwICAgICAgICAgICAgLyogV2UgYXJlIGNvbm5lY3RlZCBhbmQgaGFwcHkuLiAqLwotI2RlZmluZSBQT0xMX0lOVFJPICAgICAgICAgICAgMSAgICAgICAgICAgIC8qIEludHJvZHVjdGlvbiBwYWNrZXQgKi8KLSNkZWZpbmUgUE9MTF9UT1BPTE9HWSAgICAgICAgIDIgICAgICAgICAgICAvKiBUb3BvbG9neSB1cGRhdGUgKi8KLSNkZWZpbmUgUE9MTF9BU1NJR04gICAgICAgICAgIDMgICAgICAgICAgICAvKiBJRCBhc3NpZ24gKi8KLSNkZWZpbmUgUE9MTF9GT0FEICAgICAgICAgICAgIDQgICAgICAgICAgICAvKiBGKioqIE9mZiBBbmQgRGllICovCi0jZGVmaW5lIFBPTExfTE1ECSAgICAgIDUJCSAgIC8qIExldCBNZSBEaWUgKi8KLSNkZWZpbmUgUE9MTF9EWUIJICAgICAgNgkJICAgLyogRGllIFlvdSBCYSoqKioqICovCi0KLS8qIFRoZSB3YXkgZGF0YSBmaWVsZHMgYXJlIHNwbGl0IHVwIGZvciBQT0xMIHBhY2tldHMgKi8KLSNkZWZpbmUgUE9MTF9IT1NUX1NFUklBTCAgICAgIDIgICAgICAgICAgICAvKiBIb3N0IHdobyBib290ZWQgbWUgKi8KLSNkZWZpbmUgUE9MTF9NWV9TRVJJQUwgICAgICAgIDYgICAgICAgICAgICAvKiBNeSBzZXJpYWwgbnVtYmVyICovCi0jZGVmaW5lIFBPTExfWU9VUl9JRCAgICAgICAgICAxICAgICAgICAgICAgLyogWW91ciBJRCBudW1iZXIgKi8KLSNkZWZpbmUgUE9MTF9UT1BPTE9HWV9GSUVMRFMgIDIgICAgICAgICAgICAvKiBUb3BvbG9neSBtYXBzICovCi0KLSNl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TG9hZEJhc2UgKi8gICAgMHg3QzAwLAotICAvKiBYcEh6ICovICAgICAgICAgICAgNSwgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBYcHJpbnQgaGl0cyBwZXIgc2Vjb25kICovCi0gIC8qIFhwQ3BzICovICAgICAgICAgICAxMjAsICAgICAgICAgICAgLyogWHByaW50IGNoYXJhY3RlcnMgcGVyIHNlY29uZCAqLwotICAvKiBYcE9uICovICAgICAgICAgICAgIlwwMzNkIyIsICAgICAgIC8qIHN0YXJ0IFhwcmludCBmb3IgYSB3eXNlIDYwICovCi0gIC8qIFhwT2ZmICovICAgICAgICAgICAiXDAyNCIsICAgICAgICAgLyogZW5kIFhwcmludCBmb3IgYSB3eXNlIDYwICovCi0gIC8qIE1heFhwQ3BzICovICAgICAgICAyMDAwLCAgICAgICAgICAgLyogaGlnaGVzdCBYcHJpbnQgc3BlZWQgKi8KLSAgLyogTWluWHBDcHMgKi8gICAgICAgIDEwLCAgICAgICAgICAgICAvKiBzbG93ZXN0IFhwcmludCBzcGVlZCAqLwotICAvKiBTcGluQ21kcyAqLyAgICAgICAgMSwgICAgICAgICAgICAgIC8qIG5vbi16ZXJvIGZvciBtZWdhIGZhc3QgYm9vdHMgKi8KLSAgLyogRmlyc3QgQWRkciAqLyAgICAgIDB4MEEwMDAwLCAgICAgICAvKiBGaXJzdCBhZGRyZXNzIHRvIGxvb2sgYXQgKi8KLSAgLyogTGFzdCBBZGRyICovICAgICAgIDB4RkYwMDAwLCAgICAgICAvKiBMYXN0IGFkZHJlc3MgbG9va2VkIGF0ICovCi0gIC8qIEJ1ZmZlclNpemUgKi8gICAgICAxMDI0LCAgICAgICAgICAgLyogQnl0ZXMgcGVyIHBvcnQgb2YgYnVmZmVyaW5nICovCi0gIC8qIExvd1dhdGVyICovICAgICAgICAyNTYsICAgICAgICAgICAgLyogaG93IG11Y2ggZGF0YSBsZWZ0IGJlZm9yZSB3YWtldXAgKi8KLSAgLyogTGluZUxlbmd0aCAqLyAgICAg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JkZWxheWluZyAlZCBqaWZmaWVzXG4iLCBuamlmZmllcyk7CisJbXNsZWVwX2ludGVycnVwdGlibGUoamlmZmllc190b19tc2VjcyhuamlmZmllcykpOworCWZ1bmNfZXhpdCgpOwogCi0gIGlmIChzaWduYWxfcGVuZGluZyhjdXJyZW50KSkKLSAgICByZXR1cm4gUklPX0ZBSUw7Ci0gIGVsc2UKLSAgICByZXR1cm4gIVJJT19GQUlMOworCWlmIChzaWduYWxfcGVuZGluZyhjdXJyZW50KSkKKwkJcmV0dXJuIFJJT19GQUlMOworCWVsc2UKKwkJcmV0dXJuICFSSU9fRkFJTDsKIH0KIAogCi0vKiBEZWxheSBhIG51bWJlciBvZiBqaWZmaWVzLCBkaXNhbGxvd2luZyBhIHNpZ25hbCB0byBpbnRlcnJ1cHQgKi8gCi1pbnQgUklPRGVsYXlfbmkgKHN0cnVjdCBQb3J0ICpQb3J0UCwgaW50IG5qaWZmaWVzKQorLyogRGVsYXkgYSBudW1iZXIgb2YgamlmZmllcywgZGlzYWxsb3dpbmcgYSBzaWduYWwgdG8gaW50ZXJydXB0ICovCitpbnQgUklPRGVsYXlfbmkoc3RydWN0IFBvcnQgKlBvcnRQLCBpbnQgbmppZmZpZXMpCiB7Ci0gIGZ1bmNfZW50ZXIgKCk7CisJZnVuY19lbnRlcigpOwogCi0gIHJpb19kcHJpbnRrIChSSU9fREVCVUdfREVMQVksICJkZWxheWluZyAlZCBqaWZmaWVzIChuaSlcbiIsIG5qaWZmaWVzKTsgIAotICBtc2xlZXAoamlmZmllc190b19tc2VjcyhuamlmZmllcykpOwotICBmdW5jX2V4aXQoKTsKLSAgcmV0dXJuICFSSU9fRkFJTDsKKwlyaW9fZHByaW50ayhSSU9fREVCVUdfREVMQVksICJkZWxheWluZyAlZCBqaWZmaWVzIChuaSlcbiIsIG5qaWZmaWVzKTsKKwltc2xlZXAoamlmZmllc190b19tc2VjcyhuamlmZmllcykpOworCWZ1bmNfZXhpdCgpOworCXJldHVybiAhUklPX0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ZCAqKSBhcmcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZih1bnNpZ25lZCBpbnQpKSkgewotICAgICAgcmMgPSAwOwotICAgICAgaXZhbCA9IHJpb19nZXRzaWduYWxzKHBvcnQpOwotICAgICAgcHV0X3VzZXIoaXZhbCwgKHVuc2lnbmVkIGludCAqKSBhcmcpOwotICAgIH0KLSAgICBicmVhazsKLSAgY2FzZSBUSU9DTUJJUzoKLSAgICBpZiAoKHJjID0gZ2V0X3VzZXIoaXZhbCwgKHVuc2lnbmVkIGludCAqKSBhcmcpKSA9PSAwKSB7Ci0gICAgICByaW9fc2V0c2lnbmFscyhwb3J0LCAoKGl2YWwgJiBUSU9DTV9EVFIpID8gMSA6IC0xKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICgoaXZhbCAmIFRJT0NNX1JUUykgPyAxIDogLTEpKTsKLSAgICB9Ci0gICAgYnJlYWs7Ci0gIGNhc2UgVElPQ01CSUM6Ci0gICAgaWYgKChyYyA9IGdldF91c2VyKGl2YWwsICh1bnNpZ25lZCBpbnQgKikgYXJnKSkgPT0gMCkgewotICAgICAgcmlvX3NldHNpZ25hbHMocG9ydCwgKChpdmFsICYgVElPQ01fRFRSKSA/IDAgOiAtMSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAoKGl2YWwgJiBUSU9DTV9SVFMpID8gMCA6IC0xKSk7Ci0gICAgfQotICAgIGJyZWFrOwotICBjYXNlIFRJT0NNU0VUOgotICAgIGlmICgocmMgPSBnZXRfdXNlcihpdmFsLCAodW5zaWduZWQgaW50ICopIGFyZykpID09IDApIHsKLSAgICAgIHJpb19zZXRzaWduYWxzKHBvcnQsICgoaXZhbCAmIFRJT0NNX0RUUikgPyAxIDogMCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAoKGl2YWwgJiBUSU9DTV9SVFMpID8gMSA6IDApKTsKLSAgICB9Ci0gICAgYnJlYWs7Ci0jZW5kaWYKLSAgZGVmYXVsdDoKLSAg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vX3BjaWNvcHk7CisJCWhwLT5Nb2RlID0gUklPX1BDSV9CT09UX0ZST01fUkFNOworCQlzcGluX2xvY2tfaW5pdCgmaHAtPkhvc3RMb2NrKTsKKwkJcmlvX3Jlc2V0X2ludGVycnVwdChocCk7CisJCXJpb19zdGFydF9jYXJkX3J1bm5pbmcoaHApOwogCi0gICAgICByaW9fZHByaW50ayAoUklPX0RFQlVHX1BST0JFLCAiR29pbmcgdG8gdGVzdCBpdCAoJXAvJXApLlxuIiwKLSAgICAgICAgICAgICAgICAgICAodm9pZCAqKXAtPlJJT0hvc3RzW3AtPlJJT051bUhvc3RzXS5QYWRkclAsCi0gICAgICAgICAgICAgICAgICAgcC0+UklPSG9zdHNbcC0+UklPTnVtSG9zdHNdLkNhZGRyKTsKLSAgICAgIGlmIChSSU9Cb2FyZFRlc3QoIHAtPlJJT0hvc3RzW3AtPlJJT051bUhvc3RzXS5QYWRkclAsCi0gICAgICAgICAgICAgICAgICAgICAgICBwLT5SSU9Ib3N0c1twLT5SSU9OdW1Ib3N0c10uQ2FkZHIsIAotICAgICAgICAgICAgICAgICAgICAgICAgUklPX1BDSSwgMCApID09IFJJT19TVUNDRVNTKSB7Ci0gICAgICAgICAgICAgIHJpb19kcHJpbnRrIChSSU9fREVCVUdfSU5JVCwgIkRvbmUgUklPQm9hcmRUZXN0XG4iKTsKLSAgICAgICAgICAgICAgV0JZVEUocC0+UklPSG9zdHNbcC0+UklPTnVtSG9zdHNdLlJlc2V0SW50LCAweGZmKTsKLSAgICAgICAgICAgICAgcC0+UklPSG9zdHNbcC0+UklPTnVtSG9zdHNdLlVuaXF1ZU51bSAgPQotICAgICAgICAgICAgICAgICAgICAgICgoUkJZVEUocC0+UklPSG9zdHNbcC0+UklPTnVtSG9zdHNdLlVuaXF1ZVswXSkgJjB4RkYpPDwgMCl8Ci0gICAgICAgICAgICAgICAgICAgICAgKChSQllURShwLT5SSU9Ib3N0c1twLT5SSU9OdW1Ib3N0c10uVW5pcXVlWzFdKS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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xNjksOSArMTY5LDkgQEAKIC8qIENvbnRyb2wgUmVnaXN0ZXIgRGVmaW5pdGlvbnMuLi4gKi8KICNkZWZpbmUJUklPX01DQV9JREVOVAkiSkJKR1BHR0hJTlNNSlBKUiIKIAotI2RlZmluZQlSSU9fTUNBX0NGR19CT09UUkFNCTB4MDEJCS8qIEJvb3QgZnJvbSBSQU0sIGVsc2UgTGluayAqLwotI2RlZmluZQlSSU9fTUNBX0NGR19CVVNFTkFCTEUJMHgwMgkJLyogRW5hYmxlIHByb2Nlc3NvciBidXMgKi8KLSNkZWZpbmUJUklPX01DQV9DRkdfTElOSzIwCTB4NDAJCS8qIDIwTWJwcyBsaW5rLCBlbHNlIDEwTWJwcyAqLworI2RlZmluZQlSSU9fTUNBX0NGR19CT09UUkFNCTB4MDEJLyogQm9vdCBmcm9tIFJBTSwgZWxzZSBMaW5rICovCisjZGVmaW5lCVJJT19NQ0FfQ0ZHX0JVU0VOQUJMRQkweDAyCS8qIEVuYWJsZSBwcm9jZXNzb3IgYnVzICovCisjZGVmaW5lCVJJT19NQ0FfQ0ZHX0xJTksyMAkweDQwCS8qIDIwTWJwcyBsaW5rLCBlbHNlIDEwTWJwcyAqLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTg1LDM1ICsxODUsMzUgQEAKICNkZWZpbmUJRUlTQV9QUk9EVUNUX05VTUJFUgkweEM4MgogI2RlZmluZQlFSVNBX1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LworI2RlZmluZQkgIFJJT19TQlVTX0NGR19JUlE2CTB4MzAJLyogSW50ZXJydXB0IExldmVsIDYgKi8KKyNkZWZpbmUJICBSSU9fU0JVU19DRkdfSVJRNQkweDI4CS8qIEludGVycnVwdCBMZXZlbCA1ICovCisjZGVmaW5lCSAgUklPX1NCVVNfQ0ZHX0lSUTQJMHgyMAkvKiBJbnRlcnJ1cHQgTGV2ZWwgNCAqLworI2RlZmluZQkgIFJJT19TQlVTX0NGR19JUlEzCTB4MTgJLyogSW50ZXJydXB0IExldmVsIDMgKi8KKyNkZWZpbmUJICBSSU9fU0JVU19DRkdfSVJRMgkweDEwCS8qIEludGVycnVwdCBMZXZlbCAyICovCisjZGVmaW5lCSAgUklPX1NCVVNfQ0ZHX0lSUTEJMHgwOAkvKiBJbnRlcnJ1cHQgTGV2ZWwgMSAqLworI2RlZmluZQlSSU9fU0JVU19DRkdfTElOSzIwCTB4NDAJLyogMjBNYnBzIGxpbmssIGVsc2UgMTBNYnBzICovCisjZGVmaW5lCVJJT19TQlVTX0NGR19QUk9DMjUJMHg4MAkvKiAyNU1oeiBwcm9jZXNzb3IgY2xvY2ssIGVsc2UgMjBNaHogKi8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTI0OCwxOCArMjQ4LDE4IEBACiAvKiBDb250cm9sIFJlZ2lzdGVyIERlZmluaXRpb25zLi4uICovCiAjZGVmaW5lCVJJT19QQ0lfSURFTlQJIkVDRERQR0pHSkhKUkdTSyMiCiAKLSNkZWZpbmUJUklPX1BDSV9DRkdfQk9PVFJBTQkweDAxCQkvKiBCb290IGZyb20gUkFNLCBlbHNlIExpbmsgKi8KLSNkZWZpbmUJUklPX1BDSV9DRkdfQlVTRU5BQk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UC0+TW9kZW1TdGF0ZSA9IFJlcG9ydGVkTW9kZW1TdGF0dXM7CisJCX0gZWxzZSB7CisJCQlyaW9fZHByaW50ayhSSU9fREVCVUdfQ01ELCAiTW9kZW0gc3RhdHVzIGNoYW5nZSBmcm9tIDB4JXggdG8gMHgleFxuIiwgUG9ydFAtPk1vZGVtU3RhdGUsIFJlcG9ydGVkTW9kZW1TdGF0dXMpOworCQkJUG9ydFAtPk1vZGVtU3RhdGUgPSBSZXBvcnRlZE1vZGVtU3RhdHVzOwogI2lmZGVmIE1PREVNX1NVUFBPUlQKLQkJCQlpZiAoIFBvcnRQLT5NYXBwZWQgKSB7CisJCQlpZiAoUG9ydFAtPk1hcHBlZCkgewogCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKIAkJCQkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJCQkJKioqCQkJCQkJCQkJCQkJCSAgICoqKgpAQCAtNTI1LDY4ICs0ODgsNjcgQEAKIAkJCQkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJCQkJXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qCi0JCQkJKiogSWYgdGhlIGRldmljZSBpcyBhIG1vZGVtLCB0aGVuIGNoZWNrIHRoZSBtb2RlbQotCQkJCSoqIGNhcnJpZXIuCi0JCQkJKi8KKwkJCQkgKiogSWYgdGhlIGRldmljZSBpcyBhIG1vZGVtLCB0aGVuIGNoZWNrIHRoZSBtb2RlbQorCQkJCSAqKiBjYXJyaWVyLgorCQkJCSAqLwogCQkJCWlmIChQb3J0UC0+Z3MudHR5ID09IE5VTEwpCiAJCQkJCWJyZWFrOwogCQkJCWlmIChQb3J0UC0+Z3MudHR5LT50ZXJtaW9z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1cHRzICovCi0JdWludAkJCVJJT0ludENvdW50OwkJLyogIyBvZiBpbnRyIHNpbmNlIGxhc3QgY2hlY2sgKi8KLQl1aW50CQkJUklPVHhDb3VudDsJCS8qIG51bWJlciBvZiB4bWl0IGludHJzICAqLwotCXVpbnQJCQlSSU9SeENvdW50OwkJLyogbnVtYmVyIG9mIHJ4IGludHJzICovCi0JdWludAkJCVJJT1J1cENvdW50OwkJLyogbnVtYmVyIG9mIHJ1cCBpbnRycyAqLwotCWludAkJCVJJWFRpbWVyOyAKLQlpbnQJCQlSSU9CdWZmZXJTaXplOwkJLyogQnVmZmVyc2l6ZSAqLwotCWludAkJCVJJT0J1ZmZlck1hc2s7CQkvKiBCdWZmZXJzaXplICovCisJaW50IFJJT0hhbHRlZDsJCS8qIGhhbHRlZCA/ICovCisJaW50IFJJT1J0YURpc0NvbnM7CS8qIFJUQSBjb25uZWN0aW9ucy9kaXNjb25uZWN0aW9ucyAqLworCXVpbnQgUklPUmVhZENoZWNrOwkvKiBSaW8gcmVhZCBjaGVjayAqLworCXVpbnQgUklPTm9NZXNzYWdlOwkvKiBUbyBkaXNwbGF5IG1lc3NhZ2Ugb3Igbm90ICovCisJdWludCBSSU9OdW1Cb290UGt0czsJLyogaG93IG1hbnkgcGFja2V0cyBmb3IgYW4gUlRBICovCisJdWludCBSSU9Cb290Q291bnQ7CS8qIHNpemUgb2YgUlRBIGNvZGUgKi8KKwl1aW50IFJJT0Jvb3Rpbmc7CS8qIGNvdW50IG9mIG91dHN0YW5kaW5nIGJvb3RzICovCisJdWludCBSSU9TeXN0ZW1VcDsJLyogQm9vdGVkID8/ICovCisJdWludCBSSU9Db3VudGluZzsJLyogZm9yIGNvdW50aW5nIGludGVycnVwdHMgKi8KKwl1aW50IFJJT0ludENvdW50OwkvKiAjIG9mIGludHIgc2luY2UgbGFzdCBjaGVjayAqLworCXVpbnQgUklPVHhDb3VudDsJLyogbnVtYmVyIG9mIHhtaXQgaW50cnMgICovCisJdWludCBSSU9S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k5hbWUsIE1BWF9OQU1FX0xFTik7CiAJCQlyZXR1cm4gMDsKIAkJfQogCX0KIAlwLT5SSU9FcnJvci5FcnJvciA9IFVOS05PV05fSE9TVF9OVU1CRVI7Ci0JcmlvX2RwcmludGsgKFJJT19ERUJVR19UQUJMRSwgIlVua25vd24gaG9zdCAleFxuIiwgTWFwUC0+SG9zdFVuaXF1ZU51bSk7CisJcmlvX2RwcmludGsoUklPX0RFQlVHX1RBQkxFLCAiVW5rbm93biBob3N0ICV4XG4iLCBNYXBQLT5Ib3N0VW5pcXVlTnVtKTsKIAlyZXR1cm4gLUVOWElPOwogfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL3Jpby9yaW90aW1lLmggYi9kcml2ZXJzL2NoYXIvcmlvL3Jpb3RpbWUuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNjZkNTJiYzAuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9jaGFyL3Jpby9yaW90aW1lLmgKKysrIC9kZXYvbnVsbApAQCAtMSw2MyArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgICAgVCBJIE0gRQotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSBBdXRob3IgIDogSmVyZW15IFJvbGxzCi0gRGF0ZSAgICA6Ci0KLSAqCi0gKiAgKEMpIDE5OTAgLSAyMDAwIFNwZWNpYWxpeCBJbnRlcm5hdGlvbmFsIEx0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BWZXJzaW9uIDogMC4wMQotCi0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb2RzCi0gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotICBEYXRlICAgICBCeSAgICAgICAgICAgICAgICBEZXNjcmlwdGlvbgotIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmbmRlZiBfcmlvdGltZV9oCi0jZGVmaW5lIF9yaW90aW1lX2ggMQotCi0jaWZuZGVmIGxpbnQKLSNpZmRlZiBTQ0NTCi1zdGF0aWMgY2hhciAqX3Jpb19yaW90aW1lX2hfc2NjcyA9ICJAKCMpcmlvdGltZS5oCTEuMSIgOwotI2VuZGlmCi0jZW5kaWYKLQotI2RlZmluZSBUV09fUE9XRVJfRklGVEVFTiAodXNob3J0KTMyNzY4Ci0jZGVmaW5lIFJpb1RpbWUoKSAgICByaW90aW1lCi0jZGVmaW5lIFJpb1RpbWVBZnRlcih0aW1lMSx0aW1lMikgKCh1c2hvcnQpdGltZTEgLSAodXNob3J0KXRpbWUyKSA8IFRXT19QT1dFUl9GSUZURUVOCi0jZGVmaW5lIFJpb1RpbWVQbHVzKHRpbWUxLHRpbWUyKSAoKHVzaG9ydCl0aW1lMSArICh1c2hvcnQpdGltZTIpCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogQ29udmVydCBhIFJJTyB0aWNrICgxLzEwdGggc2Vjb25kKQotICogaW50byB0cmFuc3B1dGVyIGxvdyBwcmlvcml0eSB0aWNrcwotICoqKioqKioqKioqKioqK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SwgVVNBLgotICoJCQkJCQkJCQkqLwotLyoJRGVzY3JpcHRpb24JOglQcm90b3R5cGVzLCBzdHJ1Y3R1cmVzIGFuZCBkZWZpbml0aW9ucwkqLwotLyoJCQkJZGVzY3JpYmluZyBSSU8gaG9zdCBjYXJkIHNoYXJlZAltZW1vcnkJKi8KLS8qCQkJCXdpbmRvdyBpbnRlcmZhY2Ugc3RydWN0dXJlczoJCSovCi0vKgkJCQkJUEFSTU1BUAkJCQkqLwotLyoJCQkJCVJVUAkJCQkqLwotLyoJCQkJCVBIQgkJCQkqLwotLyoJCQkJCUxQQgkJCQkqLwotLyoJCQkJCVBLVAkJCQkqLwotLyoJCQkJCQkJCQkqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogSGlzdG9yeS4uLgotCi0xLjAuMAkwNy8wNi85OSBOUFYJQ3JlYXRpb24uIChiYXNlZCBvbiBQQVJNTUFQLkgpCi0KLSovCi0KLSNpZm5kZWYJX3Jpb3dpbmlmX2gJCQkJLyogSWYgUklPV0lORElGLkggbm90IGFscmVhZHkgZGVmaW5lZCAqLwotI2RlZmluZQlfcmlvd2luaWZfaCAgICAxCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIEdlbmVyYWwgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNkZWZpbmUJVFBOVUxMCQkoKF91MTYpKDB4ODAwMCkpCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIFBBUk1fTUFQICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIFRoZSBQQVJNX01BUCBzdHJ1Y3R1cmUgZGVmaW5lcyBnbG9iYWwgdmFsdWVzIHJlbGF0aW5nIHRvIHRoZSBIb3N0IENhcmQgLyBSVEEKLSAgIGFuZCBpcyB0aGUgbWFpbiBzdHJ1Y3R1cmUgZnJvbSB3aGljaCBhbGwgb3RoZXIgc3RydWN0dXJlcyBhcmUgcmVmZXJlbmNlZC4gKi8KLQotdHlwZWRlZglzdHJ1Y3QJX1BBUk1fTUFQCi17Ci0JX3UxNglwaGJfcHRyOwkJLyogMHgwMCBQb2ludGVyIHRvIHRoZSBQSEIgYXJyYXkgKi8KLQlfdTE2CXBoYl9udW1fcHRyOwkJLyogMHgwMiBQdHIgdG8gTnVtYmVyIG9mIFBIQidzICovCi0JX3UxNglmcmVlX2xpc3Q7CQkvKiAweDA0IEZyZWUgTGlzdCBwb2ludGVyICovCi0JX3UxNglmcmVlX2xpc3RfZW5kOwkJLyogMHgwNiBGcmVlIExpc3QgRW5kIHBvaW50ZXIgKi8KLQlfdTE2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I2RlZmluZQlFX0xSVF9BTExPQwkJMHg4NAotI2RlZmluZQlFX0NJUlJVUwkJMHg4NQotI2RlZmluZQlFX01PTklUT1IJCTB4ODYKLSNkZWZpbmUJRV9QSEJfQUxMT0MJCTB4ODcKLSNkZWZpbmUJRV9BUlJBWV9BTExPQwkJMHg4OAotI2RlZmluZQlFX1FCVUZfQUxMT0MJCTB4ODkKLSNkZWZpbmUJRV9QS1RfQUxMT0MJCTB4OGEKLSNkZWZpbmUJRV9HRVRfVFhfUV9CVUYJCTB4OGIKLSNkZWZpbmUJRV9HRVRfUlhfUV9CVUYJCTB4OGMKLSNkZWZpbmUJRV9NRU1fT1VUCQkweDhkCi0jZGVmaW5lCUVfTU1VX0lOSVQJCTB4OGUKLSNkZWZpbmUJRV9MVFRfSU5JVAkJMHg4ZgotI2RlZmluZQlFX0xSVF9JTklUCQkweDkwCi0jZGVmaW5lCUVfTElOS19SVU4JCTB4OTEKLSNkZWZpbmUJRV9NT05JVE9SX0FMTE9DCQkweDkyCi0jZGVmaW5lCUVfTU9OSVRPUl9JTklUCQkweDkzCi0jZGVmaW5lCUVfUE9MTF9JTklUCQkweDk0Ci0KLS8qIFBBUk1fTUFQLmxpbmtzIGRlZmluaXRpb25zLi4uICovCi0jZGVmaW5lCVJJT19MSU5LX0VOQUJMRQkweDgwRkYKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBSVVAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqK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CQkwCQkvKiBOb3RoaW5nIHJlY2VpdmVkICovCi0jZGVmaW5lCVJYX1BBQ0tFVF9SRUFEWQkJMQkJLyogUGFja2V0IHJlY2VpdmVkICovCi0KLSNkZWZpbmUJUlVQX05PX09XTkVSCQkweEZGCQkvKiBSVVAgbm90IG93bmVkIGJ5IGFueSBwcm9jZXNzICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgUEhCICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIFRoZSBQSEIgKFBvcnQgSGVhZGVyIEJsb2NrKSBzdHJ1Y3R1cmUgcmVsYXRlcyB0byB0aGUgc2VyaWFsIHBvcnRzIGF0dGFjaGVkCi0gICB0byB0aGUgc3lzdGVtIGFuZCB0aGVyZSBpcyBub3JtYWxseSBhbiBhcnJheSBvZiBNQVhfUEhCUyAoPTEyOCkgc3RydWN0dXJlcwotICAgaW4gYSBob3N0IGNhcmQsIGRlZmluZWQgYnkgUEFSTV9NQVAtPnBoYl9wdHIgYW5kIFBBUk1fTUFQLT5waGJfbnVtX3B0ci4gKi8KLQotdHlwZWRlZglzdHJ1Y3QJX1BIQgotewotCV91MTYJCXNvdXJjZTsJCQkvKiAweDAwIExvY2F0aW9uIG9mIHRoZSBQSEIgaW4gdGhlIGhvc3QgY2FyZCAqLwotCV91MTYJCW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VAkweDAwMDIJCS8qIFNldCBieSBJU1IgLyBkcml2ZXIgKi8KLSNkZWZpbmUJUEhCX0hBTkRTSEFLRV9GTEFHUwkoUEhCX0hBTkRTSEFLRV9SRVNFVHxQSEJfSEFORFNIQUtFX1NFVCkKLQkJCQkJCS8qIFJlc2V0IGJ5IGx0dCAqLwotCi0jZGVmaW5lCU1BWF9QSEIJCQkxMjgJCS8qIHJhbmdlIDAtMTI3ICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgTFBCICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIFRoZSBMUEIgKExpbmsgUGFyYW1ldGVyIEJsb2NrKSBzdHJ1Y3R1cmUgcmVsYXRlcyB0byBhIFJJTyBOZXR3b3JrIExpbmsKLSAgIGFuZCB0aGVyZSBpcyBub3JtYWxseSBhbiBhcnJheSBvZiBNQVhfTElOS1MgKD00KSBzdHJ1Y3R1cmVzIGluIGEgaG9zdCBjYXJkLAotICAgZGVmaW5lZCBieSBQQVJNX01BUC0+bGlua19zdHJfcHRyLiAqLwotCi10eXBlZGVmCXN0cnVjdAlfTFBCCi17Ci0JX3UxNgkJbGlua19udW1iZXI7CQkvKiAweDAwIExpbmsgTnVtYmVyICovCi0JX3UxNgkJaW5fY2g7CQkJLyogMHgwMiBMaW5rIEluIENoYW5u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251bV9kaXNjb25uZWN0cwkweDU2CQkvKiAweDU2IG51bWJlciBvZiBkaXNjb25uZWN0cyAqLwotI2RlZmluZQlMUEJfbnVtX3N5bmNfcmN2ZAkweDU4CQkvKiAweDU4ICMgc3luYydzIHJlY2VpdmVkICovCi0jZGVmaW5lCUxQQl9udW1fc3luY19ycXN0CTB4NUEJCS8qIDB4NUEgIyBzeW5jIHJlcXVlc3RzICovCi0jZGVmaW5lCUxQQl9udW1fdHgJCTB4NUMJCS8qIDB4NUMgTnVtIHBrdHMgc2VudCAqLwotI2RlZmluZQlMUEJfbnVtX3J4CQkweDVFCQkvKiAweDVFIE51bSBwa3RzIHJlY2VpdmVkICovCi0jZGVmaW5lCUxQQl9tb2R1bGVfYXR0YWNoZWQJMHg2MAkJLyogMHg2MCBNb2R1bGUgdHB5ZXMgb2YgYXR0YWNoZWQgKi8KLSNkZWZpbmUJTFBCX2xlZF90aW1lb3V0CQkweDYyCQkvKiAweDYyIExFRCB0aW1lb3V0ICovCi0jZGVmaW5lCUxQQl9maXJzdF9wb3J0CQkweDY0CQkvKiAweDY0IEZpcnN0IHBvcnQgdG8gc2VydmljZSAqLwotI2RlZmluZQlMUEJfbGFzdF9wb3J0CQkweDY2CQkvKiAweDY2IExhc3QgcG9ydCB0byBzZXJ2aWNlICovCi0jZGVmaW5lCXNpemVvZl9MUEIJCTB4NjgJCS8qIHN0cnVjdHVyZSBzaXplID0gMHg2OCAqLwotCi0jZGVmaW5lCUxJTktTX1BFUl9VTklUCQk0CQkvKiBudW1iZXIgb2YgbGlua3MgZnJvbSBhIGhvc3QgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgRlJFRV9MSVNUICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogVXNlZCB0byBvdmVybGF5IHBhY2tldCBoZWFkZXJzIHdoZW4gYWxsb2NhdGluZy9mcmVlaW5nIHBhY2tldHMgZnJvbSB0aGUgZnJlZSBsaXN0ICovCi0KLXR5cGVkZWYJc3RydWN0CV9GUkVFX0xJU1QKLXsKLQlfdTE2CQluZXh0OwkJCS8qIDB4MDAgb2Zmc2V0IG9mIG5leHQgbGlzdCBpdGVtICovCi0JX3UxNgkJcHJldjsJCQkvKiAweDAyIG9mZnNldCBvZiBwcmV2aW91cyBsaXN0IGl0ZW0gKi8KLQotfSBGUkVFX0xJU1Q7Ci0KLS8qIFNhbWUgdGhpbmcgYWdhaW4sIGJ1dCBkZWZpbmVkIGFzIG9mZnNldHMuLi4gKi8KLQotI2RlZmluZQlGTF9uZXh0CQkJMHgwMAkJLyogMHgwMCBvZmZzZXQgb2YgbmV4dCBsaXN0IGl0ZW0gKi8KLSNkZWZpbmUJRkxfcHJldgkJCTB4MDIJCS8qIDB4MDIgb2Zmc2V0IG9mIHByZXZpb3VzIGxpc3QgaXRlbSAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIFBLVCAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqK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QkweDAxCQkvKiAweDAxIERlc3RpbmF0aW9uIFBvcnQgKi8KLSNkZWZpbmUJUEtUX3NyY191bml0CQkweDAyCQkvKiAweDAyIFNvdXJjZSBVbml0IElkICovCi0jZGVmaW5lCVBLVF9zcmNfcG9ydAkJMHgwMwkJLyogMHgwMyBTb3VyY2UgUG9ydCAqLwotI2RlZmluZQlQS1RfbGVuCQkJMHgwNAkJLyogMHgwNCBMZW5ndGggKGluIGJ5dGVzKSBvZiBkYXRhIGZpZWxkICovCi0jZGVmaW5lCVBLVF9jb250cm9sCQkweDA1CQkvKiAweDA1ICovCi0jZGVmaW5lCVBLVF9kYXRhCQkweDA2CQkvKiAweDA2IEFjdHVhbCBkYXRhICovCi0jZGVmaW5lCVBLVF9jc3VtCQkweDRFCQkvKiAweDRFIEMtU1VNICovCi0jZGVmaW5lCXNpemVvZl9QS1QJCTB4NTAJCS8qIHN0cnVjdHVyZSBzaXplID0gMHg1MCAqLwotCi0vKiBQS1QubGVuIGRlZmluaXRpb25zLi4uICovCi0jZGVmaW5lCVBLVF9DTURfQklUCQkweDgwCi0jZGVmaW5lCVBLVF9DTURfREFUQQkJMHg4MAotI2RlZmluZQlQS1RfTEVOX01BU0sJCTB4N0YKLQotLyogUEtULmNvbnRyb2wgZGVmaW5pdGlvbnMuLi4gKi8KLSNkZWZpbmUJUEtUX0FDSwkJCTB4NDAKLSNkZWZpbmUJUEtUX1RHTAkJCTB4MjAKLSNkZWZpbmUJREFUQV9XTkRXCQkweDEwCi0jZGVmaW5lCVBLVF9UVExfTUFTSwkJMHgwRgotI2RlZmluZQlNQVhfVFRMCQkJMHgwRgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBDb250cm9sIFBhY2tldHMgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiBUaGUgZm9sbG93aW5nIGRlZmluaXRpb25zIGFuZCBzdHJ1Y3R1cmVzIGRlZmluZSB0aGUgY29udHJvbCBwYWNrZXRzIHNlbnQKLSAgIGJldHdlZW4gdGhlIGRyaXZlciBhbmQgUklPIFBvcnRzLCBSVEFzIGFuZCBIb3N0IENhcmRzLiAqLwotCi0jZGVmaW5lCVBSRV9FTVBUSVZFCQkweDgwCQkJLyogUHJlLWVtcHRpdmUgY29tbWFuZCAoc2VudCB2aWEgcG9ydCdzIFJVUCkgKi8KLQotLyogImluLWJhbmQiIGFuZCAicHJlLWVtcHRpdmUiIHBvcnQgY29tbWFuZHMuLi4gKi8KLSNkZWZpbmUJT1BFTgkJCTB4MDAJCQkvKiBEcml2ZXItPlJJTyBPcGVuIGEgcG9ydCAqLwotI2RlZmluZQlDT05GSUcJCQkweDAxCQkJLyogRHJpdmVyLT5SSU8gQ29uZmlndXJlIGEgcG9ydCAqLwotI2RlZmluZQlNT1BFTgkJCTB4MDIJCQkvKiBEcml2ZXItPlJJTyBNb2RlbSBvcGVuICh3YWl0IGZvciBEQ0QpICovCi0jZGVmaW5lCUNMT1NFCQkJMHgwMwkJCS8qIERyaXZlci0+UklPIENsb3NlIGEgcG9ydCAqLwotI2RlZmluZQlXRkxVU0gJCQkoMHgwNHxQUkVfRU1QVElWRSkJLyogRHJpdmVyLT5SSU8gV3JpdGUgZmx1c2ggKi8KLSNkZWZpbmUJUkZMVVNICQkJKDB4MDV8UFJFX0VNUFRJVkUpCS8qIERyaXZlci0+UklPIFJlYWQgZm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VzdCBhbiBJRCAqLwotI2RlZmluZQlST1VURV9GT0FECQkweDAxCQkJLyogRHJpdmVyLT5SSU8gU2h1dGRvd24vcmVib290IFJUQSAqLwotI2RlZmluZQlST1VURV9BTFJFQURZCQkweDAyCQkJLyogRHJpdmVyLT5SSU8gTm90IHVzZWQgKi8KLSNkZWZpbmUJUk9VVEVfVVNFRAkJMHgwMwkJCS8qIERyaXZlci0+UklPIE5vdCB1c2VkICovCi0jZGVmaW5lCVJPVVRFX0FMTE9DQVRFCQkweDA0CQkJLyogRHJpdmVyLT5SSU8gQWxsb2NhdGUgUlRBIFJVUCBudW1iZXJzICovCi0jZGVmaW5lCVJPVVRFX1JFUV9UT1AJCTB4MDUJCQkvKiBEcml2ZXItPlJJTyBOb3QgdXNlZCAqLwotI2RlZmluZSBST1VURV9UT1BPTE9HWQkJMHgwNgkJCS8qIFJJTy0+RHJpdmVyIFJvdXRlL1RvcG9sb2d5IHN0YXR1cyAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIE9QRU4gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8saW4tYmFuZCkKLQotICAgU2VudCB0byBvcGVuIGEgcG9ydC4gCi0gICBTdHJ1Y3R1cmUgb2YgY29uZmlndXJhdGlvbiBpbmZvIHVzZW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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBDT05GSUcgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxpbi1iYW5kKQotCi0gICBDT05GSUcgaXMgc2VudCBmcm9tIHRoZSBkcml2ZXIgdG8gY29uZmlndXJlIGFuIGFscmVhZHkgb3BlbmVkIHBvcnQuCi0gICBQYWNrZXQgc3RydWN0dXJlIGlzIHNhbWUgYXMgT1BFTi4gICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBNT1BFTiAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxpbi1iYW5kKQotCi0gICBNT1BFTiBpcyBzZW50IGZyb20gdGhlIGRyaXZlciB0byBvcGVuIGEgcG9ydCBhdHRhY2hlZCB0byBhIG1vZGVtLiAoaW4tYmFuZCkKLSAgIFBhY2tldCBzdHJ1Y3R1cmUgaXMgc2FtZSBhcyBPUEVOLiAgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIENMT1NFICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLGluLWJhbmQpCi0KLSAgIENMT1NFIGlzIHNlbnQgZnJvbSB0aGUgZHJpdmVyIHRvIGNsb3NlIGEgcHJldmlvdXNseSBvcGVuZWQgcG9ydC4KLSAgIE5vIHBhcmFtZXRlcnMuCi0gKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2VuZGlmCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgV0ZMVVNIICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIFdGTFVTSCBpcyBzZW50IHByZS1lbXB0aXZlbHkgZnJvbSB0aGUgZHJpdmVyIHRvIGZsdXNoIHRoZSB3cml0ZSBidWZmZXJzIGFuZAotICAgcGFja2V0cyBvZiBhIHBvcnQuICAocHJlLWVtcHRpdmUpCi0gICAKLSAgIFdGTFVTSCBpcyBhbHNvIHNlbnQgaW4tYmFuZCBmcm9tIHRoZSBkcml2ZXIgdG8gYSBwb3J0IGFzIGEgbWFya2VyIHRvIGVuZAotICAgd3JpdGUgZmx1c2hpbmcgcHJldmlvdXNseSBzdGFydGVkIGJ5IGEgcHJlLWVtcHRpdmUgV0ZMVVNIIHBhY2tldC4gKGluLWJhbmQpCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX1BoYk51bQkJKFBLVF9EYXRhKzEpCQkvKiBQb3J0IG51bWJlciB3cnQgUlRBICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBSRkxVU0ggICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxwcmUtZW1wdGl2ZSkKLQotICAgUkZMVVNIIGlzIHNlbnQgcHJlLWVtcHRpdmVseSBmcm9tIHRoZSBkcml2ZXIgdG8gZmx1c2ggdGhlIHJlYWQgYnVmZmVycyBhbmQKLSAgIHBhY2tldHMgb2YgYSBwb3J0LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgUkVTVU1FICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIFJFU1VNRSBpcyBzZW50IHByZS1lbXB0aXZlbHkgZnJvbSB0aGUgZHJpdmVyIHRvIGNhdXNlIGEgcG9ydCB0byByZXN1bWUgCi0gICB0cmFuc21pc3Npb24gb2YgZGF0YSBpZiBibG9ja2VkIGJ5IFhPRkYuICAoYXMgaWYgWE9OIGhhZCBiZWVuIHJlY2VpdmVkKQotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgU0JSRUFLICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8saW4tYmFuZCkKLQotICAgU0JSRUFLIGlzIHNlbnQgaW4tYmFuZCBmcm9tIHRoZSBkcml2ZXIgdG8gYSBwb3J0IHRvIHN1c3BlbmQgZGF0YSBhbmQgc3RhcnQKLSAgIGJyZWFrIHNpZ25hbCB0cmFuc21pc3Npb24uCi0KLSAgIElmIHRoZSBicmVhayBkZWxheSBpcyAwLCB0aGUgYnJlYWsgc2lnbmFsIHdpbGwgYmUgYWNrbm93bGVkZ2VkIHdpdGggYQotICAgUlVQX0NPTU1BTkQsIENPTVBMRVRFIHBhY2tldCBhbmQgY29udGludWUgdW50aWwgYW4gRUJSRUFLIHBhY2tldCBpcyByZWNlaXZlZC4KLQotICAgT3RoZXJ3aXNlLCB0aGVyZSBpcyBubyBhY2tub3dsZWRnZW1lbnQgYW5kIHRoZSBicmVhayBzaWduYWwgd2lsbCBsYXN0IGZvciB0aGUKLSAgIHNwZWNpZmllZCBudW1iZXIgb2YgbVMuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX0JyZWFrRGVsYXkJCShQS1RfRGF0YSsxKQkJLyogQnJlYWsgZGVsYXkgaW4gbVMgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIEVCUkVBSyAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLGluLWJhbmQpCi0KLSAgIEVCUkVBSyBpcyBzZW50IGluLWJhbmQgZnJvbSB0aGUgZHJpdmVyIHRvIGEgcG9ydCB0byBzdG9wIHRyYW5zbWlzc2lvbiBvZiBhCi0gICBicmVhayBzaWduYWwuCi0KLSAgIE5vIHBhcmFtZXRlcnMuICAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgU1VTUEVORCAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIFNVU1BFTkQgaXMgc2VudCBwcmUtZW1wdGl2ZWx5IGZyb20gdGhlIGRyaXZlciB0byBjYXVzZSBhIHBvcnQgdG8gc3VzcGVuZAotICAgdHJhbnNtaXNzaW9uIG9mIGRhdGEuICAoYXMgaWYgWE9GRiBoYWQgYmVlbiByZWNlaXZlZCkKLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNkZWZpbmUJUEtUX1BoYk51bQkJKFBLVF9EYXRhKzEpCQkvKiBQb3J0IG51bWJlciB3cnQgUlRBICovCi0jZW5kaWYKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIEZDTE9TRSAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBGQ0xPU0UgaXMgc2VudCBwcmUtZW1wdGl2ZWx5IGZyb20gdGhlIGRyaXZlciB0byBmb3JjZSBjbG9zZSBhIHBvcnQuCi0gICBBIGZvcmNlIGNsb3NlIGZsdXNoZXMgcmVjZWl2ZSBhbmQgdHJhbnNtaXQgcXVldWVzLCBhbmQgYWxzbyBsb3dlcnMgYWxsIG91dHB1dAotICAgbW9kZW0gc2lnbmFscyBpZiB0aGUgQ09SNV9IVVBDTCAoSGFuZyBVcCBPbiBDbG9zZSkgZmxhZyBpcyBzZXQuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZGVmaW5lCVBLVF9QaGJOdW0JCShQS1RfRGF0YSsxKQkJLyogUG9ydCBudW1iZXIgd3J0IFJUQSAqLwotI2VuZGlmCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBYUFJJTlQgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxpbi1iYW5kKQotCi0gICBYUFJJTlQgaXMgc2VudCBhcyBhIG5vcm1hbCBJL08gZGF0YSBwYWNrZXQgZXhjZXB0IHRoYXQgdGhlIFBLVF9DTURfQklUIG9mCi0gICB0aGUgImxlbiIgZmllbGQgaXMgc2V0LCBhbmQgdGhlIGZpcnN0ICJkYXRhIiBieXRlIGlzIFhQUklOVC4KLQotICAgVGhlIEkvTyBkYXRhIGluIHRoZSBYUFJJTlQgcGFja2V0IHdpbGwgY29udGFpbiB0aGUgZm9sbG93aW5nOgotICAgLQlUcmFuc3BhcmVudCBQcmludCBTdGFydCBTZXF1ZW5jZQotICAgLQlUcmFuc3BhcmVudCBQcmludCBEYXRhCi0gICAtCVRyYW5zcGFyZW50IFByaW50IFN0b3AgU2VxdWVuY2UuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZGVmaW5lCVBLVF9QaGJOdW0JCShQS1RfRGF0YSsxKQkJLyogUG9ydCBudW1iZXIgd3J0IFJUQSAqLwotI2VuZGlmCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgTUJJUyAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxwcmUtZW1wdGl2ZSkKLQotICAgTUJJUyBpcyBzZW50IHByZS1lbXB0aXZlbHkgZnJvbSB0aGUgZHJpdmVyIHRvIHNldCBhIHBvcnQncyBtb2RlbSBzaWduYWxzLgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfTW9kZW1TZXQJCShQS1RfRGF0YSs0KQkJLyogTW9kZW0gc2V0IHNpZ25hbHMgbWFzayAqLwotCi0vKiBNb2RlbVNldCBkZWZpbml0aW9ucy4uLiAqLwotI2RlZmluZQlNQklTX1JUUwkJMHgwMQkJCS8qIFJUUyBtb2RlbSBzaWduYWwgKi8KLSNkZWZpbmUJTUJJU19EVFIJCTB4MDIJCQkvKiBEVFIgbW9kZW0gc2lnbmFsICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgTUJJQyAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxwcmUtZW1wdGl2ZSkKLQotICAgTUJJQyBpcyBzZW50IHByZS1lbXB0aXZlbHkgZnJvbSB0aGUgZHJpdmVyIHRvIGNsZWFyIGEgcG9ydCdzIG1vZGVtIHNpZ25hbHMuCi0gICAqLwotI2lmIDAgICAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZGVmaW5lCVBLVF9QaGJOdW0JCShQS1RfRGF0YSsxKQkJLyogUG9ydCBudW1iZXIgd3J0IFJUQSAqLwotI2VuZGlmCi0KLSNkZWZpbmUJUEtUX01vZGVtQ2xlYXIJCShQS1RfRGF0YSs0KQkJLyogTW9kZW0gY2xlYXIgc2lnbmFscyBtYXNrICovCi0KLS8qIE1vZGVtQ2xlYXIgZGVmaW5pdGlvbnMuLi4gKi8KLSNkZWZpbmUJTUJJQ19SVFMJCTB4MDEJCQkvKiBSVFMgbW9kZW0gc2lnbmFsICovCi0jZGVmaW5lCU1CSUNfRFRSCQkweDAyCQkJLyogRFRSIG1vZGVtIHNpZ25hbCAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIE1TRVQgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIE1TRVQgaXMgc2VudCBwcmUtZW1wdGl2ZWx5IGZyb20gdGhlIGRyaXZlciB0byBzZXQvY2xlYXIgYSBwb3J0J3MgbW9kZW0gc2lnbmFscy4gKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNlbmRpZgotCi0jZGVmaW5lCVBLVF9Nb2RlbVNldAkJKFBLVF9EYXRhKzQpCQkvKiBNb2RlbSBzZXQgc2lnbmFscyBtYXNrICovCi0KLS8qIE1vZGVtU2V0IGRlZmluaXRpb25zLi4uICovCi0jZGVmaW5lCU1TRVRfUlRTCQkweDAxCQkJLyogUlRTIG1vZGVtIHNpZ25hbCAqLwotI2RlZmluZQlNU0VUX0RUUgkJMHgwMgkJCS8qIERUUiBtb2RlbSBzaWduYWwgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIFBDTE9TRSAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLGluLWJhbmQpCi0KLSAgIFBDTE9TRSBpcyBzZW50IGZyb20gdGhlIGRyaXZlciB0byBwc2V1ZG8gY2xvc2UgYSBwcmV2aW91c2x5IG9wZW5lZCBwb3J0LgotICAgCi0gICBUaGUgcG9ydCB3aWxsIGNsb3NlIHdoZW4gYWxsIGRhdGEgaGFzIGJlZW4gc2VudC9yZWNlaXZlZCwgaG93ZXZlciwgdGhlCi0gICBwb3J0J3MgdHJhbnNtaXQgLyByZWNlaXZlIGFuZCBtb2RlbSBzaWduYWxzIHdpbGwgYmUgbGVmdCBlbmFibGVkIGFuZCB0aGUKLSAgIHBvcnQgbWFya2VkIGludGVybmFsbHkgYXMgUHNldWRvIENsb3NlZC4gKi8KLQotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBNR0VUICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBNR0VUIGlzIHNlbnQgcHJlLWVtcHRpdmVseSBmcm9tIHRoZSBkcml2ZXIgdG8gcmVxdWVzdCB0aGUgcG9ydCdzIGN1cnJlbnQgbW9kZW0gc2lnbmFscy4gKi8KLQotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNkZWZpbmUJUEtUX1BoYk51bQkJKFBLVF9EYXRhKzEpCQkvKiBQb3J0IG51bWJlciB3cnQgUlRBICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBNRU1EVU1QICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxwcmUtZW1wdGl2ZSkKLQotICAgTUVNRFVNUCBpcyBzZW50IHByZS1lbXB0aXZlbHkgZnJvbSB0aGUgZHJpdmVyIHRvIHJlcXVlc3QgYSBkdW1wIG9mIDMyIGJ5dGVzCi0gICBvZiB0aGUgc3BlY2lmaWVkIHBvcnQncyBSVEEgYWRkcmVzcyBzcGFjZS4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNkZWZpbmUJUEtUX1N1YkNtZAkJKFBLVF9EYXRhKzUpCQkvKiBTdWIgQ29tbWFuZCAqLwotI2RlZmluZQlQS1RfQWRkcmVzcwkJKFBLVF9EYXRhKzYpCQkvKiBSZXF1ZXN0ZWQgYWRkcmVzcyAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgUkVBRF9SRUdJU1RFUiAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIFJFQURfUkVHSVNURVIgaXMgc2VudCBwcmUtZW1wdGl2ZWx5IGZyb20gdGhlIGRyaXZlciB0byByZXF1ZXN0IHRoZSBjb250ZW50cwotICAgb2YgdGhlIENEMTQwMCByZWdpc3RlciBzcGVjaWZpZWQgaW4gYWRkcmVzcy4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNkZWZpbmUJUEtUX1N1YkNtZAkJKFBLVF9EYXRhKzUpCQkvKiBTdWIgQ29tbWFuZCAqLwotI2RlZmluZQlQS1RfQWRkcmVzcwkJKFBLVF9EYXRhKzYpCQkvKiBSZXF1ZXN0ZWQgYWRkcmVzcyAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgQ09NTUFORF9SVVAgLSBDT01QTEVURSAgICoqKioqKioqKioqKioqKioqKioqKioqK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ECQkweDgwCQkJLyogTW9kZW0gc3RhdHVzIHBhY2tldCBwZW5kaW5nICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICBDT01NQU5EX1JVUCAtIENPTVBMRVRFICAgKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChSSU8tPkRyaXZlcixwcmUtZW1wdGl2ZSkKLQotICAgQ09NTUFORF9SVVAgLSBDT01QTEVURSBpcyBzZW50IGluIHJlc3BvbnNlIHRvIGFsbCBwb3J0IEkvTyBjb250cm9sIGNvbW1hbmQKLSAgIHBhY2tldHMsIGV4Y2VwdCBNRU1EVU1QIGFuZCBSRUFEX1JFR0lTVEVSLgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNkZWZpbmUJUEtUX0NtZDIJCShQS1RfRGF0YSsyKQkJLyogQ29tbWFuZCBjb2RlIGNvcHkgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfTW9kZW1TdGF0dXMJCShQS1RfRGF0YSszKQkJLyogTW9kZW0gc2lnbmFsIHN0YXR1cyAqLwotI2RlZmluZQlQS1RfUG9ydFN0YXR1c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Ci0jZGVmaW5lCVBPUlRfSVNQQVJBTExFTAkJMHgwOAkJCS8qIFBhcmFsbGVsIHBvcnQgKi8KLSNkZWZpbmUJUE9SVF9CUkVBSwkJMHgxMAkJCS8qIFBvcnQgb24gYnJlYWsgKi8KLSNkZWZpbmUJUE9SVF9TVEFUVVNQRU5ECQkwMDIwCQkJLyogU3RhdHVzIHBhY2tldCBwZW5kaW5nICovCi0jZGVmaW5lCVBPUlRfQlJFQUtQRU5ECQkweDQwCQkJLyogQnJlYWsgcGFja2V0IHBlbmRpbmcgKi8KLSNkZWZpbmUJUE9SVF9NT0RFTVBFTkQJCTB4ODAJCQkvKiBNb2RlbSBzdGF0dXMgcGFja2V0IHBlbmRpbmcgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqICAgQ09NTUFORF9SVVAgLSBDT01QTEVURSAtIE1FTURVTVAgICAqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKFJJTy0+RHJpdmVyLHByZS1lbXB0aXZlKQotCi0gICBDT01NQU5EX1JVUCAtIENPTVBMRVRFIC0gTUVNRFVNUCBpcyBzZW50IGFzIGFuIGFja25vd2xlZGdlbWVudCBmb3IgYSBNRU1EVU1QCi0gICBwb3J0IEkvTyBjb250cm9sIGNvbW1hbmQgcGFja2V0LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNkZWZpbmUJUEtUX0NtZDIJCShQS1RfRGF0YSsyKQkJLyogQ29tbWFuZCBjb2RlIGNvcHkgKi8KLSNkZWZpbmUJUEtUX01vZGVtU3RhdHVzCQkoUEtUX0RhdGErMykJCS8qIE1vZGVtIHNpZ25hbCBzdGF0dXMgKi8KLSNkZWZpbmUJUEtUX1BvcnRTdGF0dXMJCShQS1RfRGF0YSs0KQkJLyogUG9ydCBzaWduYWwgc3RhdHVzICovCi0jZGVmaW5lCVBLVF9TdWJDbWQJCShQS1RfRGF0YSs1KQkJLyogU3ViIENvbW1hbmQgKi8KLSNkZWZpbmUJUEtUX0FkZHJlc3MJCShQS1RfRGF0YSs2KQkJLyogUmVxdWVzdGVkIGFkZHJlc3MgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfRHVtcAkJKFBLVF9EYXRhKzgpCQkvKiAzMmJ5dGVzIG9mIHJlcXVlc3RlZCBkdW1wIGRhdGEgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqICAgQ09NTUFORF9SVVAgLSBDT01QTEVURSAtIFJFQURfUkVHSVNURVIgICAqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKFJJTy0+RHJpdmVyLHByZS1lbXB0aXZlKQotCi0gICBDT01NQU5EX1JVUCAtIENPTVBMRVRFIC0gUkVBRF9SRUdJU1RFUiBpcyBzZW50IGFzIGFuIGFja25vd2xlZGdlbWVudCBmb3IgYQotICAgUkVBRF9SRUdJU1RFUiBwb3J0IEkvTyBjb250cm9sIGNvbW1hbmQgcGFja2V0LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qQ29tbWFuZCBjb2RlICovCi0jZGVmaW5lCVBLVF9QaGJOdW0JCShQS1RfRGF0YSsxKQkJLypQb3J0IG51bWJlciB3cnQgUlRBICovCi0jZGVmaW5lCVBLVF9DbWQyCQkoUEtUX0RhdGErMikJCS8qIENvbW1hbmQgY29kZSBjb3B5ICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX1JlZ2lzdGVyVmFsdWUJKFBLVF9EYXRhKzMpCQkvKiBNb2RlbSBzaWduYWwgc3RhdHVzICovCi0jaWYgMAotI2RlZmluZQlQS1RfUG9ydFN0YXR1cwkJKFBLVF9EYXRhKzQpCQkvKiBQb3J0IHNpZ25hbCBzdGF0dXMgKi8KLSNkZWZpbmUJUEtUX1N1YkNtZAkJKFBLVF9EYXRhKzUpCQkvKiBTdWIgQ29tbWFuZCAqLwotI2VuZGlmCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKiogICBDT01NQU5EX1JVUCAtIEJSRUFLX1JFQ0VJVkVEICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChSSU8tPkRyaXZlcixwcmUtZW1wdGl2ZSkKLQotICAgQ09NTUFORF9SVVAgLSBCUkVBS19SRUNFSVZFRCBwYWNrZXRzIGFyZSBzZW50IHdoZW4gdGhlIHBvcnQgZGV0ZWN0cyBhIHJlY2VpdmUgQlJFQUsgc2lnbmFsLgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2RlZmluZQlQS1RfUGhiTnVtCQkoUEtUX0RhdGErMSkJCS8qIFBvcnQgbnVtYmVyIHdydCBSVEEgKi8KLSNkZWZpbmUJUEtUX0NtZDIJCShQS1RfRGF0YSsyKQkJLyogQ29tbWFuZCBjb2RlIGNvcHkgKi8KLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqICAgQ09NTUFORF9SVVAgLSBNT0RFTV9TVEFUVVMgICAqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoUklPLT5Ecml2ZXIscHJlLWVtcHRpdmUpCi0KLSAgIENPTU1BTkRfUlVQIC0gTU9ERU1fU1RBVFVTIHBhY2tldHMgYXJlIHNlbnQgd2hlbmV2ZXIgdGhlIHBvcnQgZGV0ZWN0cyBhCi0gICBjaGFuZ2UgaW4gdGhlIGlucHV0IG1vZGVtIHNpZ25hbCBzdGF0ZXMuCi0KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNkZWZpbmUJUEtUX1BoYk51bQkJKFBLVF9EYXRhKzEpCQkvKiBQb3J0IG51bWJlciB3cnQgUlRBICovCi0jZGVmaW5lCVBLVF9DbWQyCQkoUEtUX0RhdGErMikJCS8qIENvbW1hbmQgY29kZSBjb3B5ICovCi0jZGVmaW5lCVBLVF9Nb2RlbVN0YXR1cwkJKFBLVF9EYXRhKzMpCQkvKiBNb2RlbSBzaWduYWwgc3RhdHVzICovCi0jZW5kaWYKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgIEJPT1RfUlVQIC0gQk9PVF9SRVFVRVNUICAgKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKFJJTy0+RHJpdmVyLHByZS1lbXB0aXZlKQotCi0gICBCT09UX1JVUCAtIEJPT1RfUkVRVUVTVCBwYWNrZXRzIGFyZSBzZW50IHRvIHRoZSBEcml2ZXIgZnJvbSBSSU8gdG8gcmVxdWVzdAotICAgZmlybXdhcmUgY29kZSB0byBsb2FkIG9udG8gYXR0YWNoZWQgUlRBcy4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgQk9PVF9SVVAgLSBCT09UX1NFUVVFTkNFICAgKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIEJPT1RfUlVQIC0gQk9PVF9TRVFVRU5DRSBwYWNrZXRzIGFyZSBzZW50IGZyb20gdGhlIERyaXZlciB0byBSSU8gaW4gcmVzcG9uc2UKLSAgIHRvIGEgQk9PVF9SVVAgLSBCT09UX1JFUVVFU1QgcGFja2V0LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9OdW1QYWNrZXRzCQkoUEtUX0RhdGErMikJCS8qIFBhY2tldHMgcmVxdWlyZWQgdG8gbG9hZCBmaXJtd2FyZSAqLwotI2RlZmluZQlQS1RfTG9hZEJhc2UJCShQS1RfRGF0YSs0KQkJLyogUlRBIGZpcm13YXJlIGxvYWQgYWRkcmVzcyAqLwotI2RlZmluZQlQS1RfQ29kZVNpemUJCShQS1RfRGF0YSs2KQkJLyogU2l6ZSBvZiBmaXJtd2FyZSBpbiBieXRlcyAqLwotI2RlZmluZQlQS1RfQ21kU3RyaW5nCQkoUEtUX0RhdGErOCkJCS8qIENvbW1hbmQgc3RyaW5nICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICBCT09UX1JVUCAtIEJPT1RfQ09NUExFVEVEICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChSSU8tPkRyaXZlcixwcmUtZW1wdGl2ZSkKLQotICAgQk9PVF9SVVAgLSBCT09UX0NPTVBMRVRFIGlzIHNlbnQgdG8gdGhlIERyaXZlciBmcm9tIFJJTyB3aGVuIGRvd25sb2FkaW5nIG9mCi0gICBSVEEgZmlybXdhcmUgaGFzIGNvbXBsZXRlZC4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfTGlua051bWJlcgkJKFBLVF9EYXRhKzEpCQkvKiBMaW5rIG51bWJlciBSVEEgYm9vdGVkIG9uICovCi0jZGVmaW5lCVBLVF9TZXJpYWxOdW1iZXIJKFBLVF9EYXRhKzIpCQkvKiA0IGJ5dGUgc2VyaWFsIG51bWJlciAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgQk9PVF9SVVAgLSBQYWNrZXQgUmVxdWVzdCAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoUklPLT5Ecml2ZXIscHJlLWVtcHRpdmUpCi0KLSAgIEJPT1RfUlVQIHBhY2tldCB3aXRob3V0IHRoZSBQS1RfQ01EX0JJVCBzZXQgaW4gdGhlIFBLVC0+bGVuIGZpZWxkIGlzIHNlbnQKLSAgIGZyb20gUklPIHRvIHRoZSBEcml2ZXIgYXMgYSByZXF1ZXN0IGZvciBhIGZpcm13YXJlIGJvb3QgcGFja2V0LiAqLwotCi0jZGVmaW5lCVBLVF9TZXF1ZW5jZU51bWJlcgkoUEtUX0RhdGErMCkJCS8qIFBhY2tldCBzZXF1ZW5jZSBudW1iZXIgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqICAgQk9PVF9SVVAgLSBQYWNrZXQgUmVzcG9uc2UgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBJbiByZXNwb25zZSB0byBhIEJPT1RfUlVQIGJvb3QgcGFja2V0IHJlcXVlc3QsIHRoZSBkcml2ZXIgZmlsbHMgb3V0IHRoZSByZXNwb25zZQotICAgcGFja2V0IHdpdGggdGhlIDcwIGJ5dGVzIG9mIHRoZSByZXF1ZXN0ZWQgc2VxdWVuY2UuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX1NlcXVlbmNlTnVtYmVyCShQS1RfRGF0YSswKQkJLyogUGFja2V0IHNlcXVlbmNlIG51bWJlciAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9GaXJtd2FyZVBhY2tldAkoUEtUX0RhdGErMikJCS8qIEZpcm13YXJlIHBhY2tldCAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIEJPT1RfUlVQIC0gSUZPQUQgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIEJPT1RfUlVQIC0gSUZPQUQgcGFja2V0cyBhcmUgc2VudCBmcm9tIHRoZSBEcml2ZXIgdG8gYW4gUlRBIHRvIGNhdXNlIHRoZQotICAgUlRBIHRvIHNodXQgZG93biBhbmQgcmVib290LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9JZm9hZElkMQkJKFBLVF9EYXRhKzIpCQkvKiBJRk9BRCBJZCAxICovCi0jZGVmaW5lCVBLVF9JZm9hZElkMgkJKFBLVF9EYXRhKzMpCQkvKiBJRk9BRCBJZCAyICovCi0KLSNkZWZpbmUJSUZPQURJRDEJCTB4QUQKLSNkZWZpbmUJSUZPQURJRDIJCTB4RjAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqICAgQk9PVF9SVVAgLSBJREVOVElGWSAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBCT09UX1JVUCAtIElERU5USUZZIHBhY2tldHMgYXJlIHNlbnQgZnJvbSB0aGUgRHJpdmVyIHRvIGFuIFJUQSB0byBjYXVzZSB0aGUKLSAgIFJUQSB0byBmbGFzaCBpdHMgTEVEcyBmb3IgYSBwZXJpb2Qgb2YgdGltZS4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfSWRlbnRpZnlJZAkJKFBLVF9EYXRhKzIpCQkvKiBkZWZpbmVzIHBhdHRlcm4gdG8gZmxhc2ggKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBCT09UX1JVUCAtIFpPTUJJRSAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBCT09UX1JVUCAtIFpPTUJJRSBwYWNrZXRzIGFyZSBzZW50IGZyb20gdGhlIERyaXZlciB0byBhbiBSVEEgdG8gY2F1c2UgdGhlCi0gICBSVEEgdG8gc2h1dCBkb3duIGFuZCBmbGFzaCBpdCdzIExFRHMuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX1pvbWJpZUlkMQkJKFBLVF9EYXRhKzIpCQkvKiBaT01CSUUgSWQgMSAqLwotI2RlZmluZQlQS1RfWm9tYmllSWQyCQkoUEtUX0RhdGErMykJCS8qIFpPTUJJRSBJZCAyICovCi0KLSNkZWZpbmUJWk9NQklFSUQxCQkweDUyCi0jZGVmaW5lCVpPTUJJRUlEMgkJMHgyMQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIEJPT1RfUlVQIC0gVUZPQUQgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoRHJpdmVyLT5SSU8scHJlLWVtcHRpdmUpCi0KLSAgIEJPT1RfUlVQIC0gVUZPQUQgcGFja2V0cyBhcmUgc2VudCBmcm9tIHRoZSBEcml2ZXIgdG8gYW4gUlRBIHRvIGNhdXNlIHRoZSBSVEEKLSAgIHRvIGFzayBpdCdzIG5laWdoYm91cmluZyBSVEEgdG8gc2h1dCBkb3duIGFuZCByZWJvb3QuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZGVmaW5lCVBLVF9MaW5rTnVtYmVyCQkoUEtUX0RhdGErMSkJCS8qIExpbmsgbnVtYmVyIG9mIFJUQSB0byBVRk9BRCAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9VZm9hZElkMQkJKFBLVF9EYXRhKzIpCQkvKiBVRk9BRCBJZCAxICovCi0jZGVmaW5lCVBLVF9VZm9hZElkMgkJKFBLVF9EYXRhKzMpCQkvKiBVRk9BRCBJZCAyICovCi0KLSNkZWZpbmUJVUZPQURJRDEJCTB4MUUKLSNkZWZpbmUJVUZPQURJRDIJCTB4MEQKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKiogICBCT09UX1JVUCAtIElXQUlUICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBCT09UX1JVUCAtIElXQUlUIHBhY2tldHMgYXJlIHNlbnQgZnJvbSB0aGUgRHJpdmVyIHRvIGFuIFJUQSB0byBjYXVzZSB0aGUgUlRBCi0gICB0byBwYXVzZSBib290aW5nIG9uIHRoZSBzcGVjaWZpZWQgbGluayBmb3IgMzAgc2Vjb25kcy4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNkZWZpbmUJUEtUX0xpbmtOdW1iZXIJCShQS1RfRGF0YSsxKQkJLyogTGluayBudW1iZXIgb2YgUlRBIHRvIFVGT0FEICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX0l3YWl0SWQxCQkoUEtUX0RhdGErMikJCS8qIElXQUlUIElkIDEgKi8KLSNkZWZpbmUJUEtUX0l3YWl0SWQyCQkoUEtUX0RhdGErMykJCS8qIElXQUlUIElkIDIgKi8KLQotI2RlZmluZQlJV0FJVElEMQkJMHhERQotI2RlZmluZQlJV0FJVElEMgkJMHhCMQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqICAgUk9VVEVfUlVQIC0gUk9VVEVfUkVRVUVTVCAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiAoUklPLT5Ecml2ZXIscHJlLWVtcHRpdmUpCi0KLSAgIFJPVVRFX1JVUCAtIFJPVVRFX1JFUVVFU1QgcGFja2V0cyBhcmUgc2VudCBmcm9tIGEgbmV3bHkgYm9vdGVkIG9yIGNvbm5lY3RlZAotICAgUlRBIHRvIGEgRHJpdmVyIHRvIHJlcXVlc3QgYW4gSUQgKFJVUCBvciB1bml0IG51bWJlcikuCi0gICAqLwotI2lmIDAKLSNkZWZpbmUJUEtUX0NtZAkJCShQS1RfRGF0YSswKQkJLyogQ29tbWFuZCBjb2RlICovCi0jZW5kaWYKLSNkZWZpbmUJUEtUX1NlcmlhbE51bWJlcgkoUEtUX0RhdGErMikJCS8qIDQgYnl0ZSBzZXJpYWwgbnVtYmVyICovCi0jZGVmaW5lCVBLVF9Nb2R1bGVUeXBlcwkJKFBLVF9EYXRhKzYpCQkvKiBSVEEgTW9kdWxlIHR5cGVzICovCi0KLS8qIE1vZHVsZVR5cGVzIGRlZmluaXRpb25zLi4uICovCi0jZGVmaW5lCU1PRF9CTEFOSwkJMHgwRgkJCS8qIEJsYW5rIHBsYXRlIGF0dGFjaGVkICovCi0jZGVmaW5lCU1PRF9SUzIzMkRCMjUJCTB4MDAJCQkvKiBSUzIzMiBEQjI1IGNvbm5lY3RvciAqLwotI2RlZmluZQlNT0RfUlMyMzJSSjQ1CQkweDAxCQkJLyogUlMyMzIgUko0NSBjb25uZWN0b3IgKi8KLSNkZWZpbmUJTU9EX1JTNDIyREIyNQkJMHgwMgkJCS8qIFJTNDIyIERCMjUgY29ubmVjdG9yICovCi0jZGVmaW5lCU1PRF9SUzQ4NURCMjUJCTB4MDMJCQkvKiBSUzQ4NSBEQjI1IGNvbm5lY3RvciAqLwotI2RlZmluZQlNT0RfUEFSQUxMRUwJCTB4MDQJCQkvKiBDZW50cm9uaWNzIHBhcmFsbGVsICovCi0KLSNkZWZpbmUJTU9EMgkJCTB4MDgJCQkvKiBTZXQgdG8gaW5kaWNhdGUgUmV2MiBtb2R1bGUgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqKiogICBST1VURV9SVVAgLSBST1VURV9GT0FEICAgKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKERyaXZlci0+UklPLHByZS1lbXB0aXZlKQotCi0gICBST1VURV9SVVAgLSBST1VURV9GT0FEIHBhY2tldCBpcyBzZW50IGFzIGEgcmVzcG9uc2UgdG8gYSBST1VURV9SVVAgLSBST1VURV9SRVFVRVNUCi0gICBwYWNrZXQgdG8gY2F1c2UgdGhlIFJUQSB0byAiRmFsbCBPdmVyIEFuZCBEaWUiLiwgaS5lLiBzaHV0ZG93biBhbmQgcmVib290LgotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9Sb3V0ZUNtZFN0cmluZwkoUEtUX0RhdGErMikJCS8qIENvbW1hbmQgc3RyaW5nICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiAgIFJPVVRFX1JVUCAtIFJPVVRFX0FMTE9DQVRFICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIChEcml2ZXItPlJJTyxwcmUtZW1wdGl2ZSkKLQotICAgUk9VVEVfUlVQIC0gUk9VVEVfQUxMT0NBVEUgcGFja2V0IGlzIHNlbnQgYXMgYSByZXNwb25zZSB0byBhIFJPVVRFX1JVUCAtIFJPVVRFX1JFUVVFU1QKLSAgIHBhY2tldCB0byBhbGxvY2F0ZSB0aGUgUlRBJ3MgSWQgbnVtYmVyIChSVVAgbnVtYmVyIDEuLjE2KQotICAgKi8KLSNpZiAwCi0jZGVmaW5lCVBLVF9DbWQJCQkoUEtUX0RhdGErMCkJCS8qIENvbW1hbmQgY29kZSAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9JZE51bQkJKFBLVF9EYXRhKzEpCQkvKiBSVVAgbnVtYmVyIGZvciBwb3J0cyAxLi44ICovCi0jaWYgMAotI2RlZmluZQlQS1RfUm91dGVDbWRTdHJpbmcJKFBLVF9EYXRhKzIpCQkvKiBDb21tYW5kIHN0cmluZyAqLwotI2VuZGlmCi0jZGVmaW5lCVBLVF9JZE51bTIJCShQS1RfRGF0YSsweDE3KQkJLyogUlVQIG51bWJlciBmb3IgcG9ydHMgOS4uMTYgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioKLSoqKioqKioqKioqKioqKioqKioqKioqICAgUk9VVEVfUlVQIC0gUk9VVEVfVE9QT0xPR1kgICAqKioqKioqKioqKioqKioqKioqKioqKgotKioqKioqKioqKioqKioqKioqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogKFJJTy0+RHJpdmVyLHByZS1lbXB0aXZlKQotCi0gICBST1VURV9SVVAgLSBST1VURV9UT1BPTE9HWSBwYWNrZXQgaXMgc2VudCB0byBpbmZvcm0gdGhlIGRyaXZlciBvZiBhbiBSVEEncwotICAgY3VycmVudCBsaW5rIHN0YXR1cy4KLSAgICovCi0jaWYgMAotI2RlZmluZQlQS1RfQ21kCQkJKFBLVF9EYXRhKzApCQkvKiBDb21tYW5kIGNvZGUgKi8KLSNlbmRpZgotI2RlZmluZQlQS1RfTGluazFSdXAJCShQS1RfRGF0YSsyKQkJLyogTGluayAxIFJVUCBudW1iZXIgKi8KLSNkZWZpbmUJUEtUX0xpb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HggOwotICAgICAgICAgICAgICAgICBjaGFyICAgICAgIHBjYl9sZXR0ZXJfcmV2IDsKLSAgICAgICAgICAgICAgICAgY2hhciAgICAgICBwY2JfbnVtYmVyX3JldiA7Ci0gICAgICAgICAgICAgICAgIGNoYXIgICAgICAgc2VyaWFsWzRdIDsKLSAgICAgICAgICAgICAgICAgY2hhciAgICAgICB5ZWFyIDsKLSAgICAgICAgICAgICAgICAgY2hhciAgICAgICB3ZWVrIDsKLSAgICAgICAgICAgICB9IDsKK3R5cGVkZWYgc3RydWN0IFJPTSBST007CitzdHJ1Y3QgUk9NIHsKKwl1X3Nob3J0IHNseDsKKwljaGFyIHBjYl9sZXR0ZXJfcmV2OworCWNoYXIgcGNiX251bWJlcl9yZXY7CisJY2hhciBzZXJpYWxbNF07CisJY2hhciB5ZWFyOworCWNoYXIgd2VlazsKK307CiAKICNlbmRpZgogCkBAIC02MCw1ICs2MCwzIEBACiAjZGVmaW5lIFJPTV9MRU5HVEggIDB4MjAKIAogLyoqKioqKioqKioqIGVuZCBvZiBmaWxlICoqKioqKioqKioqLwotCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9yaW8vcm91dGUuaCBiL2RyaXZlcnMvY2hhci9yaW8vcm91dGUuaAppbmRleCBjNDJkYmI5Li43Njk3NDRlIDEwMDY0NAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL3JvdXRlLmgKKysrIGIvZHJpdmVycy9jaGFyL3Jpby9yb3V0ZS5oCkBAIC00NCwyNiArNDQsMjYgQEAKICNlbmRpZgogCiAjZGVmaW5lIE1BWF9MSU5LUyA0Ci0jZGVmaW5lIE1BWF9OT0RFUyAxNyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTWF4aW11bSBub2RlcyBpbiBhIHN1Ym5ldCAqLwotI2RlZmluZSBOT0RFX0JZVEVTICgoTUFYX05PREVTIC8gOCkgKyAxKSAgICAgIC8qIE51bWJlciBvZiBieXRlcyBuZWVkZWQgZm9yCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSBiaXQgcGVyIG5vZGUgKi8KLSNkZWZpbmUgUk9VVEVfREFUQV9TSVpFICAoTk9ERV9CWVRFUyArIDIpICAgICAvKiBOdW1iZXIgb2YgYnl0ZXMgZm9yIGNvbXBsZXRlIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm8gYWJvdXQgY29zdCBldGMuICovCisjZGVmaW5lIE1BWF9OT0RFUyAxNwkJLyogTWF4aW11bSBub2RlcyBpbiBhIHN1Ym5ldCAqLworI2RlZmluZSBOT0RFX0JZVEVTICgoTUFYX05PREVTIC8gOCkgKyAxKQkvKiBOdW1iZXIgb2YgYnl0ZXMgbmVlZGVkIGZvcgorCQkJCQkJICAgMSBiaXQgcGVyIG5vZGUgKi8KKyNkZWZpbmUgUk9VVEVfREFUQV9TSVpFICAoTk9ERV9CWVRFUyArIDIpCS8qIE51bWJlciBvZiBieXRlcyBmb3IgY29tcGxldGUKKwkJCQkJCSAgIGluZm8gYWJvdXQgY29zdCBldGMuICovCiAjZGVmaW5lIFJPVVRFU19QRVJfUEFDS0VUICgoUEtUX01BWF9EQVRBX0xFTiAtMikvIFJPVVRFX0RBVEFfU0laRSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBOdW1iZXIgb2Ygbm9kZXMgd2UgY2FuIHNxdWVlemUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRvIG9uZSBwYWNrZXQgKi8KKwkJCQkJICAgICAgLyogTnVtYmVyIG9mIG5vZGVzIHdlIGNhbiBzcXVlZXplCisJCQkJCSAgICAgICAgIGludG8gb25lIHBhY2tldCAqLwogI2RlZmluZSBNQVhfVE9QT0xPR1lfUEFDS0VUUyAoTUFYX05PREVTIC8gUk9VVEVTX1BFUl9QQUNLRVQgKyAxKQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogRGVmaW5lIHRoZSB0eXBlcyBvZiBjb21tYW5kIGZvciB0aGUgUk9VVEUgUlVQLgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgUk9VVEVfUkVRVUVTVCAgICAwICAgICAgICAgICAgICAgICAgICAvKiBSZXF1ZXN0IGFuIElEICovCi0jZGVmaW5lIFJPVVRFX0ZPQUQgICAgICAgMSAgICAgICAgICAgICAgICAgICAgLyogS2lsbCB0aGUgUlRBICovCi0jZGVmaW5lIFJPVVRFX0FMUkVBRFkgICAgMiAgICAgICAgICAgICAgICAgICAgLyogSUQgZ2l2ZW4gYWxyZWFkeSAqLwotI2RlZmluZSBST1VURV9VU0VEICAgICAgIDMgICAgICAgICAgICAgICAgICAgIC8qIEFsbCBJRCdzIHVzZWQgKi8KLSNkZWZpbmUgUk9VVEVfQUxMT0NBVEUgICA0ICAgICAgICAgICAgICAgICAgICAvKiBIZXJlIGl0IGlzICovCi0jZGVmaW5lIFJPVVRFX1JFUV9UT1AgICAgNSAgICAgICAgICAgICAgICAgICAgLyogSSBiZXQgeW91IGRpZG4ndCBleHBlY3QuLi4uCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIFRvcG9sb2dpY2FsIElucXVpc2l0aW9uICovCi0jZGVmaW5lIFJPVVRFX1RPUE9MT0dZICAgNiAgICAgICAgICAgICAgICAgICAgLyogVG9wb2xvZ3kgcmVxdWVzdCBhbnN3ZXJlZCBGRCAqLworI2RlZmluZSBST1VURV9SRVFVRVNUICAgIDAJLyogUmVxdWVzdCBhbiBJRCAqLworI2RlZmluZSBST1VURV9GT0FEICAgICAgIDEJLyogS2lsbCB0aGUgUlRBICovCisjZGVmaW5lIFJPVVRFX0FMUkVBRFkgICAgMgkvKiBJRCBnaXZlbiBhbHJlYWR5ICovCisjZGVmaW5lIFJPVVRFX1VTRUQgICAgICAgMwkvKiBBbGwgSUQncyB1c2VkICovCisjZGVmaW5lIFJPVVRFX0FMTE9DQVRFICAgNAkvKiBIZXJlIGl0IGlzICovCisjZGVmaW5lIFJPVVRFX1JFUV9UT1AgICAgNQkvKiBJIGJldCB5b3UgZGlkbid0IGV4cGVjdC4uLi4KKwkJCQkgICB0aGUgVG9wb2xvZ2ljYWwgSW5xdWlzaXRpb24gKi8KKyNkZWZpbmUgUk9VVEVfVE9QT0xPR1kgICA2CS8qIFRvcG9sb2d5IHJlcXVlc3QgYW5zd2VyZWQgRkQgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBEZWZpbmUgdGhlIFJvdXRlIE1hcCBTdHJ1Y3R1cmUKICAqCkBAIC03MiwyMiArNzIsMjIgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiB0eXBlZGVmIHN0cnVjdCBDT1NUX1JPVVRFIENPU1RfUk9VVEU7CiBzdHJ1Y3QgQ09TVF9ST1VURSB7Ci0gICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciBjb3N0OyAgICAgICAgLyogQ29zdCBkb3duIHRoaXMgbGluayAqLwotICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgcm91dGVbTk9ERV9CWVRFU107IC8qIE5vZGVzIHRob3JvdWdoIHRoaXMgcm91dGUgKi8KLSAgICAgICAgICAgICAgICAgIH0gOworCXVuc2lnbmVkIGNoYXIgY29zdDsJLyogQ29zdCBkb3duIHRoaXMgbGluayAqLworCXVuc2lnbmVkIGNoYXIgcm91dGVbTk9ERV9CWVRFU107CS8qIE5vZGVzIHRob3JvdWdoIHRoaXMgcm91dGUgKi8KK307CiAKLXR5cGVkZWYgc3RydWN0IFJPVVRFX1NUUiBST1VURV9TVFIgOwotc3RydWN0ICBST1VURV9TVFIgewotICAgICAgICAgICAgICAgICAgICAgIENPU1RfUk9VVEUgY29zdF9yb3V0ZVtNQVhfTElOS1NdOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29zdCAvIHJvdXRlIGZvciB0aGlzIGxpbmsgKi8KLSAgICAgICAgICAgICAgICAgICAgICB1c2hvcnQgZmF2b3VyZWQ7ICAgICAgICAgIC8qIGZhdm91cmVkIGxpbmsgKi8KLSAgICAgICAgICAgICAgICAgIH0gOwordHlwZWRlZiBzdHJ1Y3QgUk9VVEVfU1RSIFJPVVRFX1NUUjsKK3N0cnVjdCBST1VURV9TVFIgeworCUNPU1RfUk9VVEUgY29zdF9yb3V0ZVtNQVhfTElOS1NdOworCS8qIGNvc3QgLyByb3V0ZSBmb3IgdGhpcyBsaW5rICovCisJdXNob3J0IGZhdm91cmVkOwkvKiBmYXZvdXJlZCBsaW5rICovCit9OwogCiAKLSNkZWZpbmUgTk9fTElOSyAgICAgICAgICAgIChzaG9ydCkgNSAgICAgIC8qIExpbmsgdW5hdHRhY2hlZCAqLwotI2RlZmluZSBST1VURV9OT19JRCAgICAgICAgKHNob3J0KSAxMDAgICAgLyogTm8gSWQgKi8KLSNkZWZpbmUgUk9VVEVfRElTQ09OTkVDVCAgICh1c2hvcnQpIDB4ZmYgIC8qIE5vdCBjb25uZWN0ZWQgKi8KLSNkZWZpbmUgUk9VVEVfSU5URVJDT05ORUNUICh1c2hvcnQpIDB4NDAgIC8qIFN1Yi1uZXQgaW50ZXJjb25uZWN0ICovCisjZGVmaW5lIE5PX0xJTksgICAgICAgICAgICAoc2hvcnQpIDUJLyogTGluayB1bmF0dGFjaGVkICovCisjZGVmaW5lIFJPVVRFX05PX0lEICAgICAgICAoc2hvcnQpIDEwMAkvKiBObyBJZCAqLworI2RlZmluZSBST1VURV9ESVNDT05ORUNUICAgKHVzaG9ydCkgMHhmZgkvKiBOb3QgY29ubmVjdGVkICovCisjZGVmaW5lIFJPVVRFX0lOVEVSQ09OTkVDVCAodXNob3J0KSAweDQwCS8qIFN1Yi1uZXQgaW50ZXJjb25uZWN0ICovCiAKIAogI2RlZmluZSBTWU5DX1JVUCAgICAgICAgICh1c2hvcnQpIDI1NQpAQCAtOTksMTAgKzk5LDkgQEAKICNkZWZpbmUgU1RBVFVTX1JVUCAgICAgICAodXNob3J0KSAyNDkKICNkZWZpbmUgUE9XRVJfUlVQICAgICAgICAodXNob3J0KSAyNDgKIAotI2RlZmluZSBISUdIRVNUX1JVUCAgICAgICh1c2hvcnQpIDI1NSAgIC8qIFNldCB0byBUb3Agb25lICovCi0jZGVmaW5lIExPV0VTVF9SVVAgICAgICAgKHVzaG9ydCkgMjQ4ICAgLyogU2V0IHRvIGJvdHRvbSBvbmUgKi8KKyNkZWZpbmUgSElHSEVTVF9SVVAgICAgICAodXNob3J0KSAyNTUJLyogU2V0IHRvIFRvcCBvbmUgKi8KKyNkZWZpbmUgTE9XRVNUX1JVUCAgICAgICAodXNob3J0KSAyNDgJLyogU2V0IHRvIGJvdHRvbSBvbmUgKi8KIAogI2VuZGlmCiAKIC8qKioqKioqKioqKiBlbmQgb2YgZmlsZSAqKioqKioqKioqKi8KLQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL3Jpby9ydGFody5oIGIvZHJpdmVycy9jaGFyL3Jpby9ydGFody5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwNjg2MDExLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvY2hhci9yaW8vcnRhaHcuaAorKysgL2Rldi9udWxsCkBAIC0xLDc1ICswLDAgQEAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiA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ICAgICAgICAgICAgIDIgICAgICAgIC8qIFRyYW5zbWl0IHNpZGUgbG9ja2VkICovCisjZGVmaW5lIFRYX1JVUF9JTkFDVElWRSAgICAgICAgICAwCS8qIE5vdGhpbmcgdG8gdHJhbnNtaXQgKi8KKyNkZWZpbmUgVFhfUEFDS0VUX1JFQURZICAgICAgICAgIDEJLyogVHJhbnNtaXQgcGFja2V0IHJlYWR5ICovCisjZGVmaW5lIFRYX0xPQ0tfUlVQICAgICAgICAgICAgICAyCS8qIFRyYW5zbWl0IHNpZGUgbG9ja2VkICovCiAKLSNkZWZpbmUgUlhfUlVQX0lOQUNUSVZFICAgICAgICAgIDAgICAgICAgIC8qIE5vdGhpbmcgcmVjZWl2ZWQgKi8KLSNkZWZpbmUgUlhfUEFDS0VUX1JFQURZICAgICAgICAgIDEgICAgICAgIC8qIFBhY2tldCByZWNlaXZlZCAqLworI2RlZmluZSBSWF9SVVBfSU5BQ1RJVkUgICAgICAgICAgMAkvKiBOb3RoaW5nIHJlY2VpdmVkICovCisjZGVmaW5lIFJYX1BBQ0tFVF9SRUFEWSAgICAgICAgICAxCS8qIFBhY2tldCByZWNlaXZlZCAqLwogCi0jZGVmaW5lIFJVUF9OT19PV05FUiAgICAgICAgICAgICAweGZmICAgICAvKiBSVVAgbm90IG93bmVkIGJ5IGFueSBwcm9jZXNzICovCisjZGVmaW5lIFJVUF9OT19PV05FUiAgICAgICAgICAgICAweGZmCS8qIFJVUCBub3Qgb3duZWQgYnkgYW55IHByb2Nlc3MgKi8KIAogc3RydWN0IFJVUCB7Ci0gICAgICAgICAgICAgUEtUX3B0ciAgICB0eHBrdDsgICAgICAgICAgICAvKiBPdXRnb2luZyBwYWNrZXQgKi8KLSAgICAgICAgICAgICBQS1RfcHRyICAgIHJ4cGt0OyAgICAgICAgICAgIC8qIEluY29taW5nIHBhY2tldCAqLwotICAgICAgICAgICAgIFdPUkQgICAgICAgbGluazsgICAgICAgICAgICAgLyogV2hpY2ggbGluayB0byBzZW5kIGRvd24/ICovCi0gICAgICAgICAgICAgQllURSAgICAgICBydXBfZGVzdF91bml0WzJdOyAvKiBEZXN0aW5hdGlvbiB1bml0ICovCi0gICAgICAgICAgICAgV09SRCAgICAgICBoYW5kc2hha2U7ICAgICAgICAvKiBGb3IgaGFuZHNoYWtpbmcgKi8KLSAgICAgICAgICAgICBXT1JEICAgICAgIHRpbWVvdXQ7ICAgICAgICAgIC8qIFRpbWVvdXQgKi8KLSAgICAgICAgICAgICBXT1JEICAgICAgIHN0YXR1czsgICAgICAgICAgIC8qIFN0YXR1cyAqLwotICAgICAgICAgICAgIFdPUkQgICAgICAgdHhjb250cm9sOyAgICAgICAgLyogVHJhbnNtaXQgY29udHJvbCAqLwotICAgICAgICAgICAgIFdPUkQgICAgICAgcnhjb250cm9sOyAgICAgICAgLyogUmVjZWl2ZSBjb250cm9sICovCi0gICAgICAgICAgIH07Ci0gCisJUEtUX3B0ciB0eHBrdDsJCS8qIE91dGdvaW5nIHBhY2tldCAqLworCVBLVF9wdHIgcnhwa3Q7CQkvKiBJbmNvbWluZyBwYWNrZXQgKi8KKwlXT1JEIGxpbms7CQkvKiBXaGljaCBsaW5rIHRvIHNlbmQgZG93bj8gKi8KKwlCWVRFIHJ1cF9kZXN0X3VuaXRbMl07CS8qIERlc3RpbmF0aW9uIHVuaXQgKi8KKwlXT1JEIGhhbmRzaGFrZTsJCS8qIEZvciBoYW5kc2hha2luZyAqLworCVdPUkQgdGltZW91dDsJCS8qIFRpbWVvdXQgKi8KKwlXT1JEIHN0YXR1czsJCS8qIFN0YXR1cyAqLworCVdPUkQgdHhjb250cm9sOwkJLyogVHJhbnNtaXQgY29udHJvbCAqLworCVdPUkQgcnhjb250cm9sOwkJLyogUmVjZWl2ZSBjb250cm9sICovCit9OworCiAjZW5kaWYKIAogLyoqKioqKioqKioqIGVuZCBvZiBmaWxlICoqKioqKioqKioqLwotCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL3J1cHN0YXQuaCBiL2RyaXZlcnMvY2hhci9yaW8vcnVwc3RhdC5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCBiNGFhZmFmLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvY2hhci9yaW8vcnVwc3RhdC5oCisrKyAvZGV2L251bGwKQEAgLTEsNTEgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICBSVVBTVEFUCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKioqKioqKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQotIEF1dGhvciAgOiBKZXJlbXkgUm9sbHMKLSBEYXRlICAgIDoKLQotICoKLSAqICAoQykgMTk5MCAtIDIwMDAgU3BlY2lhbGl4IEludGVybmF0aW9uYWwgTHRkLiwgQnlmbGVldCwgU3VycmV5LCBVSy4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5Ci0gKiAgICAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Ci0gKiAgICAgIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yCi0gKiAgICAgIChhdCB5b3VyIG9wdG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3BhY2VfaF9fICovCisjZW5kaWYJCQkJLyogX19yaW9fc3BhY2VfaF9fICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvcmlvL3N5c21hcC5oIGIvZHJpdmVycy9jaGFyL3Jpby9zeXNtYXAuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZmRjNzMxMy4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvcmlvL3N5c21hcC5oCisrKyAvZGV2L251bGwKQEAgLTEsNjMgKzAsMCBAQAotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqICAgICAgICAgIFMgWSBTIFQgRSBNICAgTSBBIFAgICBIIEUgQSBEIEUgUgotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSBBdXRob3IgIDogSWFuIE5hbmRocmEKLSBEYXRlICAgIDoKLQotICoKLSAqICAoQykgMTk5MCAtIDIwMDAgU3BlY2lhbGl4IEludGVybmF0aW9uYWwgTHRkLiwgQnlmbGVldCwgU3VycmV5LCBVSy4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5Ci0gKiAgICAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Ci0gKiA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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmbmRlZiBsaW50Ci0jaWZkZWYgU0NDU19MQUJFTFMKLXN0YXRpYyBjaGFyICpfcmlvX3N5c21hcF9oX3NjY3MgPSAiQCgjKXN5c21hcC5oCTEuMSIgOwotI2VuZGlmCi0jZW5kaWYKLQotI2RlZmluZSBTWVNURU1fTUFQX0xFTiAgICAgNjQgICAgICAgICAgIC8qIExlbiBvZiBTeXN0ZW0gTWFwIGFycmF5ICovCi0KLQotdHlwZWRlZiBzdHJ1Y3QgU1lTX01BUCAgICAgICAgU1lTX01BUCA7Ci10eXBlZGVmIHN0cnVjdCBTWVNfTUFQX0xJTksgICBTWVNfTUFQX0xJTksgOwotCi1zdHJ1Y3QgU1lTX01BUF9MSU5LIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHNob3J0IGlkIDsgICAgICAgICAgLyogVW5pdCBJZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgc2hvcnQgbGluayA7ICAgICAgICAvKiBJZCdzIExpbmsgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHNob3J0IGJlZW5faGVyZSA7ICAgLyogVXNlZCBieSBtYXBfZ2VuICovCi0gICAgICAgICAgICAgICAgICAgIH0gOwotCi1zdHJ1Y3QgU1lTX01BUCB7Ci0gICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgIHNlcmlhbF9udW1bNF0gOwotICAgICAgICAgICAgICAgICAgIFNZU19NQVBfTElOSyBsaW5rWzRdIDsKLSAgICAgICAgICAgICAgIH0gOwotCi0KLS8qKioqKioqKioqKiBlbmQgb2YgZmlsZSAqKioqKioqKioqKi8KLQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL3Jpby90aW1lb3V0cy5oIGIvZHJpdmVycy9jaGFyL3Jpby90aW1lb3V0cy5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAxMWIzMTMzLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvY2hhci9yaW8vdGltZW91dHMuaAorKysgL2Rldi9udWxsCkBAIC0xLDUxICswLDAgQEAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqKioqKioqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKioqKioqCi0gKioqKioqKiAgICAgICAgICAgICAgICAgICAgIFQgSSBNIEUgTyBVIFQgUwotICoqKioqKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoqKioqKioKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0KLSBBdXRob3IgIDogSWFuIE5hbmRocmEKLSBEYXRlICAgIDoKLQotICoKLSAqICAoQykgMTk5MCAtIDIwMDAgU3BlY2lhbGl4IEludGVybmF0aW9uYWwgTHRkLiwgQnlmbGVldCwgU3VycmV5LCBVSy4KLSAqCi0gKiAgICAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5Ci0gKiAgICAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Ci0gKiAgICAgIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yCi0gKiAgICAgIChhdCB5b3VyIG9w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yoc3RsY29uZl90KTsKK3N0YXRpYyBpbnQJc3RsX25yYnJkcyA9IEFSUkFZX1NJWkUoc3RsX2JyZGNvbmYpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKQEAgLTQyNCw3ICs0MjQsNyBAQAogCXsgUENJX1ZFTkRPUl9JRF9OUywgUENJX0RFVklDRV9JRF9OU184NzQxMCwgQlJEX0VDSFBDSSB9LAogfTsKIAotc3RhdGljIGludAlzdGxfbnJwY2licmRzID0gc2l6ZW9mKHN0bF9wY2licmRzKSAvIHNpemVvZihzdGxwY2licmRfdCk7CitzdGF0aWMgaW50CXN0bF9ucnBjaWJyZHMgPSBBUlJBWV9TSVpFKHN0bF9wY2licmRzKTsKIAogI2VuZGlmCiAKQEAgLTcwNCw3ICs3MDQsNyBAQAogCTIzMDQwMCwgNDYwODAwLCA5MjE2MDAKIH07CiAKLSNkZWZpbmUJU0MyNjE5OF9OUkJBVURTCQkoc2l6ZW9mKHNjMjYxOThfYmF1ZHRhYmxlKSAvIHNpemVvZih1bnNpZ25lZCBpbnQpKQorI2RlZmluZQlTQzI2MTk4X05SQkFVRFMJCUFSUkFZX1NJWkUoc2MyNjE5OF9iYXVkdGFibGUpCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtNzM4LDcgKzczOCw3IEBACiAJc3RsX2luaXQoKTsKIAlyZXN0b3JlX2ZsYWdzKGZsYWdzKTsKIAotCXJldHVybigwKTsKKwlyZXR1cm4gMDsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtODg5LDcgKzg4OSw3IEBACiAJCX0KIAkJdmFsID0gKHZhbCAqIGJhc2UpICsgYzs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OwotCQlyZXR1cm4oMCk7CisJCXJldHVybiAwOwogCX0KIAogCWNvbmZwLT5icmR0eXBlID0gc3RsX2JyZHN0cltpXS50eXBlOwpAQCAtOTM2LDcgKzkzNSw3IEBACiAJfQogCWlmICgoYXJncFtpXSAhPSAoY2hhciAqKSBOVUxMKSAmJiAoKmFyZ3BbaV0gIT0gMCkpCiAJCWNvbmZwLT5pcnEgPSBzdGxfYXRvbChhcmdwW2ldKTsKLQlyZXR1cm4oMSk7CisJcmV0dXJuIDE7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTk0Nyw3ICs5NDYsNyBAQAogCiBzdGF0aWMgdm9pZCAqc3RsX21lbWFsbG9jKGludCBsZW4pCiB7Ci0JcmV0dXJuKCh2b2lkICopIGttYWxsb2MobGVuLCBHRlBfS0VSTkVMKSk7CisJcmV0dXJuICh2b2lkICopIGttYWxsb2MobGVuLCBHRlBfS0VSTkVMKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtOTY0LDEyICs5NjMsMTIgQEAKIAlpZiAoYnJkcCA9PSAoc3RsYnJkX3QgKikgTlVMTCkgewogCQlwcmludGsoIlNUQUxMSU9OOiBmYWlsZWQgdG8gYWxsb2NhdGUgbWVtb3J5IChzaXplPSVkKVxuIiwKIAkJCXNpemVvZihzdGxicmRfdCkpOwotCQlyZXR1cm4oKHN0bGJyZF90ICopIE5VTEwpOworCQlyZXR1cm4gKHN0bGJyZF90ICopIE5VTEw7CiAJfQogCiAJbWVtc2V0KGJyZHAsIDAsIHNpemVvZihzdGxicmRfdCkpOwogCWJyZHAtPm1hZ2ljID0gU1RMX0JPQVJETUFHSUM7Ci0JcmV0dXJuKGJyZHApOworCXJldHVybiBicmRwOwogfQogCiAvKioqKioq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ydHAtPm9wZW53YWl0Y250LS07CiAJcmVzdG9yZV9mbGFncyhmbGFncyk7CiAKLQlyZXR1cm4ocmMpOworCXJldHVybiByYzsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTIxMiwxMiArMTIxMSwxMiBAQAogCiAJaWYgKCh0dHkgPT0gKHN0cnVjdCB0dHlfc3RydWN0ICopIE5VTEwpIHx8CiAJICAgIChzdGxfdG1wd3JpdGVidWYgPT0gKGNoYXIgKikgTlVMTCkpCi0JCXJldHVybigwKTsKKwkJcmV0dXJuIDA7CiAJcG9ydHAgPSB0dHktPmRyaXZlcl9kYXRhOwogCWlmIChwb3J0cCA9PSAoc3RscG9ydF90ICopIE5VTEwpCi0JCXJldHVybigwKTsKKwkJcmV0dXJuIDA7CiAJaWYgKHBvcnRwLT50eC5idWYgPT0gKGNoYXIgKikgTlVMTCkKLQkJcmV0dXJuKDApOworCQlyZXR1cm4gMDsKIAogLyoKICAqCUlmIGNvcHlpbmcgZGlyZWN0IGZyb20gdXNlciBzcGFjZSB3ZSBtdXN0IGNhdGVyIGZvciBwYWdlIGZhdWx0cywKQEAgLTEyNTYsNyArMTI1NSw3IEBACiAJY2xlYXJfYml0KEFTWUlfVFhMT1csICZwb3J0cC0+aXN0YXRlKTsKIAlzdGxfc3RhcnRyeHR4KHBvcnRwLCAtMSwgMSk7CiAKLQlyZXR1cm4oY291bnQpOworCXJldHVybiBjb3VudDsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTMzNywxNiArMTMzNiwxNiBAQAogI2VuZGlmCiAKIAlpZiAodHR5ID09IChzdHJ1Y3QgdHR5X3N0cnVjdCAqKSBOVUxMKQotCQlyZXR1cm4oMCk7CisJCXJldHVybiAwOwogCXBvcnRwID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RVJJQUwpICYmCiAgCSAgICAoY21kICE9IENPTV9HRVRQT1JUU1RBVFMpICYmIChjbWQgIT0gQ09NX0NMUlBPUlRTVEFUUykpIHsKIAkJaWYgKHR0eS0+ZmxhZ3MgJiAoMSA8PCBUVFlfSU9fRVJST1IpKQotCQkJcmV0dXJuKC1FSU8pOworCQkJcmV0dXJuIC1FSU87CiAJfQogCiAJcmMgPSAwOwpAQCAtMTU2Nyw3ICsxNTY2LDcgQEAKIAkJYnJlYWs7CiAJfQogCi0JcmV0dXJuKHJjKTsKKwlyZXR1cm4gcmM7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTE4NzMsNyArMTg3Miw3IEBACiAJCXBvc1soTUFYTElORSAtIDIpXSA9ICcrJzsKIAlwb3NbKE1BWExJTkUgLSAxKV0gPSAnXG4nOwogCi0JcmV0dXJuKE1BWExJTkUpOworCXJldHVybiBNQVhMSU5FOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xOTU4LDcgKzE5NTcsNyBAQAogCiBzdGxfcmVhZGRvbmU6CiAJKnN0YXJ0ID0gcGFnZTsKLQlyZXR1cm4ocG9zIC0gcGFnZSk7CisJcmV0dXJuIChwb3MgLSBwYWdlKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjM1MCw3ICsyMzQ5LDcgQEAKIAl9IGVsc2UgewogCQlyYyA9IDA7CiAJfQotCXJldHVybihyYyk7CisJcmV0dXJuIHJjOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkB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bmIocG9ydHAtPmlvYWRkciArIEVSRUdfREFUQSk7CiB9CiAKIHN0YXRpYyB2b2lkIHN0bF9jZDE0MDBzZXRyZWcoc3RscG9ydF90ICpwb3J0cCwgaW50IHJlZ25yLCBpbnQgdmFsdWUpCkBAIC0zMTQ2LDkgKzMxNDYsOSBAQAogCW91dGIoKHJlZ25yICsgcG9ydHAtPnVhcnRhZGRyKSwgcG9ydHAtPmlvYWRkcik7CiAJaWYgKGluYihwb3J0cC0+aW9hZGRyICsgRVJFR19EQVRBKSAhPSB2YWx1ZSkgewogCQlvdXRiKHZhbHVlLCBwb3J0cC0+aW9hZGRyICsgRVJFR19EQVRBKTsKLQkJcmV0dXJuKDEpOworCQlyZXR1cm4gMTsKIAl9Ci0JcmV0dXJuKDApOworCXJldHVybiAwOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0zMjA2LDcgKzMyMDYsNyBAQAogCX0KIAogCUJSRERJU0FCTEUocGFuZWxwLT5icmRucik7Ci0JcmV0dXJuKGNoaXBtYXNrKTsKKwlyZXR1cm4gY2hpcG1hc2s7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTM1NTcsNyArMzU1Nyw3IEBACiAjZWxzZQogCXNpZ3MgfD0gVElPQ01fRFNSOwogI2VuZGlmCi0JcmV0dXJuKHNpZ3MpOworCXJldHVybiBzaWdzOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0zODMwLDkgKzM4MzAsOSBAQAogI2VuZGlmCiAKIAlpZiAocG9ydHAgPT0gKHN0bHBvcnRfdCAqKSBOVUxMKQotCQlyZXR1cm4oMCk7CisJCXJldHVybiA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ioqKioqKioqKioqKioqKiovCkBAIC00MjA1LDcgKzQxOTQsNyBAQAogc3RhdGljIGludCBzdGxfc2MyNjE5OGdldGdsb2JyZWcoc3RscG9ydF90ICpwb3J0cCwgaW50IHJlZ25yKQogewogCW91dGIocmVnbnIsIChwb3J0cC0+aW9hZGRyICsgWFBfQUREUikpOwotCXJldHVybihpbmIocG9ydHAtPmlvYWRkciArIFhQX0RBVEEpKTsKKwlyZXR1cm4gaW5iKHBvcnRwLT5pb2FkZHIgKyBYUF9EQVRBKTsKIH0KIAogI2lmIDAKQEAgLTQyNjMsNyArNDI1Miw3IEBACiAJfQogCiAJQlJERElTQUJMRShwYW5lbHAtPmJyZG5yKTsKLQlyZXR1cm4oY2hpcG1hc2spOworCXJldHVybiBjaGlwbWFzazsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtNDU1Nyw3ICs0NTQ2LDcgQEAKIAlzaWdzIHw9IChpcHIgJiBJUFJfRFRSKSA/IDA6IFRJT0NNX0RUUjsKIAlzaWdzIHw9IChpcHIgJiBJUFJfUlRTKSA/IDA6IFRJT0NNX1JUUzsKIAlzaWdzIHw9IFRJT0NNX0RTUjsKLQlyZXR1cm4oc2lncyk7CisJcmV0dXJuIHNpZ3M7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTQ4MzksOSArNDgyOCw5IEBACiAjZW5kaWYKIAogCWlmIChwb3J0cCA9PSAoc3RscG9ydF90ICopIE5VTEwpCi0JCXJldHVybigwKTsKKwkJcmV0dXJuIDA7CiAJaWYgKHRlc3RfYml0KEFTWUlfVFhCVVNZLCAmcG9ydHAtPmlzdGF0ZSkpCi0JCXJldHVybigxKTsKKwkJcmV0dXJuIDE7CiAKIAlzYXZlX2ZsYWdzKGZsY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luY19tb2RlKHN0cnVjdCBzbGd0X2luZm8gKmluZm8pCit7CisgIAl1bnNpZ25lZCBzaG9ydCB2YWw7CisKKwlzbGd0X2lycV9vZmYoaW5mbywgSVJRX0FMTCB8IElSUV9NQVNURVIpOworCXR4X3N0b3AoaW5mbyk7CisJcnhfc3RvcChpbmZvKTsKKworCS8qIFRDUiAodHggY29udHJvbCkKKwkgKgorCSAqIDE1Li4xMyAgbW9kZSwgMDEwPWFzeW5jCisJICogMTIuLjEwICBlbmNvZGluZywgMDAwPU5SWgorCSAqIDA5ICAgICAgcGFyaXR5IGVuYWJsZQorCSAqIDA4ICAgICAgMT1vZGQgcGFyaXR5LCAwPWV2ZW4gcGFyaXR5CisJICogMDcgICAgICAxPVJUUyBkcml2ZXIgY29udHJvbAorCSAqIDA2ICAgICAgMT1icmVhayBlbmFibGUKKwkgKiAwNS4uMDQgIGNoYXJhY3RlciBsZW5ndGgKKwkgKiAgICAgICAgIDAwPTUgYml0cworCSAqICAgICAgICAgMDE9NiBiaXRzCisJICogICAgICAgICAxMD03IGJpdHMKKwkgKiAgICAgICAgIDExPTggYml0cworCSAqIDAzICAgICAgMD0xIHN0b3AgYml0LCAxPTIgc3RvcCBiaXRzCisJICogMDIgICAgICByZXNldAorCSAqIDAxICAgICAgZW5hYmxlCisJICogMDAgICAgICBhdXRvLUNUUyBlbmFibGUKKwkgKi8KKwl2YWwgPSAweDQwMDA7CisKKwlpZiAoaW5mby0+aWZfbW9kZSAmIE1HU0xfSU5URVJGQUNFX1JUU19FTikKKwkJdmFsIHw9IEJJVDc7CisKKwlpZiAoaW5mby0+cGFyYW1zLnBhcml0eSAhPSBBU1lOQ19QQVJJVFlfTk9ORSkgeworCQl2YWwgfD0gQklUOTsKKwkJaWYgKGluZm8tPnBhcmFtcy5wYXJpdHkgPT0gQVNZTkNfUEFSSVRZX09ERCkKKwkJCXZhbCB8PSBCSVQ4OworCX0KKworCXN3aXRjaCAoaW5mby0+cGFyYW1zLmRhdGFfYml0cyk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7CisJfQorCXdyX3JlZzgoaW5mbywgVFBSLCAodW5zaWduZWQgY2hhcil2YWwpOworCisJLyogUkNSIChyeCBjb250cm9sKQorCSAqCisJICogMTUuLjEzICBtb2RlLCAwMDA9SERMQyAwMDE9cmF3IHN5bmMKKwkgKiAxMi4uMTAgIGVuY29kaW5nCisJICogMDkgICAgICBDUkMgZW5hYmxlCisJICogMDggICAgICBDUkMzMgorCSAqIDA3Li4wMyAgcmVzZXJ2ZWQsIG11c3QgYmUgMAorCSAqIDAyICAgICAgcmVzZXQKKwkgKiAwMSAgICAgIGVuYWJsZQorCSAqIDAwICAgICAgYXV0by1EQ0QgZW5hYmxlCisJICovCisJdmFsID0gMDsKKworCWlmIChpbmZvLT5wYXJhbXMubW9kZSA9PSBNR1NMX01PREVfUkFXKQorCQl2YWwgfD0gQklUMTM7CisKKwlzd2l0Y2goaW5mby0+cGFyYW1zLmVuY29kaW5nKQorCXsKKwljYXNlIEhETENfRU5DT0RJTkdfTlJaQjogICAgICAgICAgdmFsIHw9IEJJVDEwOyBicmVhazsKKwljYXNlIEhETENfRU5DT0RJTkdfTlJaSV9NQVJLOiAgICAgdmFsIHw9IEJJVDExOyBicmVhazsKKwljYXNlIEhETENfRU5DT0RJTkdfTlJaSTogICAgICAgICAgdmFsIHw9IEJJVDExICsgQklUMTA7IGJyZWFrOworCWNhc2UgSERMQ19FTkNPRElOR19CSVBIQVNFX01BUks6ICB2YWwgfD0gQklUMTI7IGJyZWFrOworCWNhc2UgSERMQ19FTkNPRElOR19CSVBIQVNFX1NQQUNFOiB2YWwgfD0gQklUMTIgKyBCSVQxMDsgYnJlYWs7CisJY2FzZSBIRExDX0VOQ09ESU5HX0JJUEhBU0VfTEVWRUw6IHZhbCB8PSBCSVQxMiArIEJJVDExOyBicmVhazsKKwljYXNlIEhETENfRU5DT0RJTkdfRElGRl9CSVBIQVNFX0xFVkVMOiB2YWwgfD0gQklUMTIgKyBCSVQxMSArIEJJVDEwOyBicmVhazsKKwl9CisKK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YgbnVsbCBieXRlLCB3ZSBhcmUgZG9uZSAqLworCWlmICghKipzKSB7CisJCSgqcykrKzsJLyoga2VlcCAqcyBtb3ZpbmcgKi8KKwkJcmV0dXJuIDA7CisJfQorCisJLyogc2tpcCBvdmVyIG5ld2xpbmVzICYgd2hpdGVzcGFjZSAqLworCWlmICgoKipzID09ICdcbicpIHx8IGlzc3BhY2UoKipzKSkgeworCQkoKnMpKys7CisJCXJldHVybiAwOworCX0KKworCWlmICghaXN4ZGlnaXQoKipzKSkgeworCQkoKnMpKys7CisJCXJldHVybiAwOworCX0KKworCS8qIHBhcnNlIHZlbmRvcl9pZCAqLworCXJ1bm5lciA9ICpzOworCXdoaWxlIChydW5uZXIgPCAqZSkgeworCQkvKiBzY2FuIGZvciB2ZW5kb3I6ZGV2aWNlIGRlbGltaXRlciAqLworCQlpZiAoKnJ1bm5lciA9PSAnOicpIHsKKwkJCSp2ZW5kb3JfaWQgPSBzaW1wbGVfc3RydG9sKChjaGFyKikgKnMsIChjaGFyKiopICZwLCAxNik7CisJCQlydW5uZXIgPSBwICsgMTsKKwkJCWJyZWFrOworCQl9CisJCXJ1bm5lcisrOworCX0KKworCWlmICghaXN4ZGlnaXQoKnJ1bm5lcikpIHsKKwkJKnMgPSArK3J1bm5lcjsKKwkJcmV0dXJuIDA7CisJfQorCisJLyogcGFyc2UgZGV2aWNlX2lkICovCisJaWYgKHJ1bm5lciA8ICplKSB7CisJCSpkZXZpY2VfaWQgPSBzaW1wbGVfc3RydG9sKChjaGFyKilydW5uZXIsIChjaGFyKiopJnAsIDE2KTsKKwkJcnVubmVyID0gcDsKKwl9CisKKwkqcyA9IHJ1bm5lcjsKKworCXJldHVybiAxOworfQorCitzdGF0aWMgc3NpemVfdCBlZGFjX3BjaV9saXN0X3N0cmluZ19zdG9yZSh2b2lkICpwdHIsIGNvbnN0IGNoYXIgKmJ1ZmZlciwKKwkJCQkJc2l6ZV90IGNvdW50KQoreworCXN0cnVjdCBsaXN0X2NvbnRyb2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KworCQkJCWF0b21pY19pbmMoJnBjaV9wYXJpdHlfY291bnQpOworCQkJfQorCQl9CisJfQorfQorCisvKgorICogY2hlY2tfZGV2X29uX2xpc3Q6IFNjYW4gZm9yIGEgUENJIGRldmljZSBvbiBhIHdoaXRlL2JsYWNrIGxpc3QKKyAqIEBsaXN0OglhbiBFREFDICAmZWRhY19wY2lfZGV2aWNlX2xpc3QgIHdoaXRlL2JsYWNrIGxpc3QgcG9pbnRlcgorICogQGZyZWVfaW5kZXg6CWluZGV4IG9mIG5leHQgZnJlZSBlbnRyeSBvbiB0aGUgbGlzdAorICogQHBjaV9kZXY6CVBDSSBEZXZpY2UgcG9pbnRlcgorICoKKyAqIHNlZSBpZiBsaXN0IGNvbnRhaW5zIHRoZSBkZXZpY2UuCisgKgorICogUmV0dXJuczogIAkwIG5vdCBmb3VuZAorICoJCTEgZm91bmQgb24gbGlzdAorICovCitzdGF0aWMgaW50IGNoZWNrX2Rldl9vbl9saXN0KHN0cnVjdCBlZGFjX3BjaV9kZXZpY2VfbGlzdCAqbGlzdCwgaW50IGZyZWVfaW5kZXgsCisJCQkJc3RydWN0IHBjaV9kZXYgKmRldikKK3sKKyAgICAgICAgaW50IGk7CisgICAgICAgIGludCByYyA9IDA7ICAgICAvKiBBc3N1bWUgbm90IGZvdW5kICovCisgICAgICAgIHVuc2lnbmVkIHNob3J0IHZlbmRvcj1kZXYtPnZlbmRvcjsKKyAgICAgICAgdW5zaWduZWQgc2hvcnQgZGV2aWNlPWRldi0+ZGV2aWNlOworCisgICAgICAgIC8qIFNjYW4gdGhlIGxpc3QsIGxvb2tpbmcgZm9yIGEgdmVuZG9yL2RldmljZSBtYXRjaAorICAgICAgICAgKi8KKyAgICAgICAgZm9yIChpID0gMDsgaSA8IGZyZWVfaW5kZXg7IGkrKywgbGlzdCsrICkgeworICAgICAgICAgICAgICAgIGlmICggICAgKGxpc3QtPnZlbmRvciA9PSB2ZW5kb3IgKSAmJgorICAgICAgICAgICAgICAgICAgICAgIC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CBhY3RjYXBpX21zbiB7CiAJX191OCBlYXo7CiAJX191OCBsZW47ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIExlbmd0aCBvZiBNU04gICAgICAgICAgICAgICAgKi8KLQlfX3U4IG1zblsxNV0gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOwotfSBhY3RjYXBpX21zbjsKKwlfX3U4IG1zblsxNV07Cit9ICBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBhY3RjYXBpX21zbjsKIAogdHlwZWRlZiBzdHJ1Y3QgYWN0Y2FwaV9kbHBkIHsKIAlfX3U4IGxlbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTGVuZ3RoIG9mIHN0cnVjdHVyZSAgICAgICAgICAqLwotCV9fdTE2IGRsZW4gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOyAvKiBEYXRhIExlbmd0aCAgICAgICAgICAgICAgICAgICovCi0JX191OCBsYWEgX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOyAgIC8qIExpbmsgQWRkcmVzcyBBICAgICAgICAgICAgICAgKi8KKwlfX3UxNiBkbGVuOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRGF0YSBMZW5ndGggICAgICAgICAgICAgICAgICAqLworCV9fdTggbGFhOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBMaW5rIEFkZHJlc3MgQSAgICAgICAgICAgICAgICovCiAJX191OCBsYWI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIExpbmsgQWRkcmVzcyBCICAgICAgICAgICAgICAgKi8KIAlfX3U4IG1vZHVsbzsgICAgICAgICAgICAgICAgICAgICAgICAgLyogTW9kdWxvIE1vZGUgICAgICAgICAgICAgICAgICAqLwogCV9fdTggd2luOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXaW5kb3cgc2l6ZSAgICAgICAgICAgICAgICAgICovCiAJX191OCB4aWRbMTAwXTsgICAgICAgICAgICAgICAgICAgICA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wgMHgzMSB9LAogCQkubm9fbXNwMzR4eCAgICAgPSAxLAogCQkucGxsICAgICAgICAgICAgPSBQTExfMjgsCiAJCS50dW5lcl90eXBlICAgICA9IFRVTkVSX1BISUxJUFNfTlRTQ19NLApAQCAtMjU3MywxMiArMjU3NiwxMiBAQAogCQkuYXVkaW9faW5wdXRzICAgPSAxLAogCQkudHVuZXIgICAgICAgICAgPSAwLAogCQkuc3ZocyAgICAgICAgICAgPSAyLAotCQkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDB9LAorCQkubXV4c2VsICAgICAgICAgPSB7IDIsIDMsIDEsIDAgfSwKIAkJLnR1bmVyX3R5cGUgICAgID0gVFVORVJfUEhJTElQU19OVFNDLAogCQkudHVuZXJfYWRkcgk9IEFERFJfVU5TRVQsCiAJCS5yYWRpb19hZGRyICAgICA9IEFERFJfVU5TRVQsCiAJCS5ncGlvbWFzayAgICAgICA9IDB4MDA4MDA3LAotCQkuYXVkaW9tdXggICAgICAgPSB7IDAsIDB4MDAwMDAxLDAsMCwgMH0sCisJCS5hdWRpb211eCAgICAgICA9IHsgMCwgMHgwMDAwMDEsMCwwLCAwIH0sCiAJCS5uZWVkc190dmF1ZGlvICA9IDEsCiAJCS5oYXNfcmFkaW8gICAgICA9IDEsCiAJfSwKQEAgLTI2NjksNyArMjY3Miw3IEBACiAJCS5hdWRpb19pbnB1dHMgICA9IDEsCiAJCS50dW5lciAgICAgICAgICA9IDAsCiAJCS5zdmhzICAgICAgICAgICA9IDIsCi0JCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMH0sCisJCS5tdXhzZWwgICAgICAgICA9IHsgMiwgMywgMSwgMCB9LAogCQkudHVuZXJfdHlwZSAgICAgPSAtMSwKIAkJLnR1bmVyX2FkZHIJPSBBRERSX1VOU0VULAogCQkucmFkaW9fYWRkciAgICAgPSBBRERSX1VOU0VULApAQCAtMjcwMyw3ICsyNzA2LDcgQEAKIAkJLnR1bmVyCQk9IDAsCiAJC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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKworc3RhdGljIHZvaWQgaXJfaGFuZGxlX2tleShzdHJ1Y3QgYnR0diAqYnR2KQoreworCXN0cnVjdCBidHR2X2lyICppciA9IGJ0di0+cmVtb3RlOworCXUzMiBncGlvLGRhdGE7CisKKwkvKiByZWFkIGdwaW8gdmFsdWUgKi8KKwlncGlvID0gYnR0dl9ncGlvX3JlYWQoJmJ0di0+Yyk7CisJaWYgKGlyLT5wb2xsaW5nKSB7CisJCWlmIChpci0+bGFzdF9ncGlvID09IGdwaW8pCisJCQlyZXR1cm47CisJCWlyLT5sYXN0X2dwaW8gPSBncGlvOworCX0KKworCS8qIGV4dHJhY3QgZGF0YSAqLworCWRhdGEgPSBpcl9leHRyYWN0X2JpdHMoZ3BpbywgaXItPm1hc2tfa2V5Y29kZSk7CisJZHByaW50ayhLRVJOX0lORk8gREVWTkFNRSAiOiBpcnEgZ3Bpbz0weCV4IGNvZGU9JWQgfCAlcyVzJXNcbiIsCisJCWdwaW8sIGRhdGEsCisJCWlyLT5wb2xsaW5nICAgICAgICAgICAgICAgPyAicG9sbCIgIDogImlycSIsCisJCShncGlvICYgaXItPm1hc2tfa2V5ZG93bikgPyAiIGRvd24iIDogIiIsCisJCShncGlvICYgaXItPm1hc2tfa2V5dXApICAgPyAiIHVwIiAgIDogIiIpOworCisJaWYgKChpci0+bWFza19rZXlkb3duICAmJiAgKDAgIT0gKGdwaW8gJiBpci0+bWFza19rZXlkb3duKSkpIHx8CisJICAgIChpci0+bWFza19rZXl1cCAgICAmJiAgKDAgPT0gKGdwaW8gJiBpci0+bWFza19rZXl1cCkpKSkgeworCQlpcl9pbnB1dF9rZXlkb3duKGlyLT5kZXYsJmlyLT5pcixkYXRhLGRhdGEpOworCX0gZWxzZSB7CisJCWlyX2lucHV0X25va2V5KGlyLT5kZXYsJmlyLT5pcik7CisJfQorCit9CisKK3ZvaWQgYnR0dl9pbnB1dF9pcnEoc3RydWN0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ZGRyZXNzIGxpc3QgKi8KICNkZWZpbmUgSTJDX1RTQTU1MjIgICAgICAgIDB4YzIKQEAgLTIxMCw2ICsyMTQsMzQgQEAKIAogc3RydWN0IGJ0dHY7CiAKKworc3RydWN0IGJ0dHZfaXIgeworCXN0cnVjdCBpbnB1dF9kZXYgICAgICAgICpkZXY7CisJc3RydWN0IGlyX2lucHV0X3N0YXRlICAgaXI7CisJY2hhciAgICAgICAgICAgICAgICAgICAgbmFtZVszMl07CisJY2hhciAgICAgICAgICAgICAgICAgICAgcGh5c1szMl07CisKKwkvKiBVc3VhbCBncGlvIHNpZ25hbGxpbmcgKi8KKworCXUzMiAgICAgICAgICAgICAgICAgICAgIG1hc2tfa2V5Y29kZTsKKwl1MzIgICAgICAgICAgICAgICAgICAgICBtYXNrX2tleWRvd247CisJdTMyICAgICAgICAgICAgICAgICAgICAgbWFza19rZXl1cDsKKwl1MzIgICAgICAgICAgICAgICAgICAgICBwb2xsaW5nOworCXUzMiAgICAgICAgICAgICAgICAgICAgIGxhc3RfZ3BpbzsKKwlzdHJ1Y3Qgd29ya19zdHJ1Y3QgICAgICB3b3JrOworCXN0cnVjdCB0aW1lcl9saXN0ICAgICAgIHRpbWVyOworCisJLyogUkM1IGdwaW8gKi8KKwl1MzIgcmM1X2dwaW87CisJc3RydWN0IHRpbWVyX2xpc3QgdGltZXJfZW5kOwkvKiB0aW1lcl9lbmQgZm9yIGNvZGUgY29tcGxldGlvbiAqLworCXN0cnVjdCB0aW1lcl9saXN0IHRpbWVyX2tleXVwOwkvKiB0aW1lcl9lbmQgZm9yIGtleSByZWxlYXNlICovCisJdTMyIGxhc3RfcmM1OwkJCS8qIGxhc3QgZ29vZCByYzUgY29kZSAqLworCXUzMiBsYXN0X2JpdDsJCQkvKiBsYXN0IHJhdyBiaXQgc2VlbiAqLworCXUzMiBjb2RlOwkJCS8qIHJhdyBjb2RlIHVuZGVyIGNvbnN0cnVjdGlvbiAqLworCXN0cnVjdCB0aW1ldmFsIGJhc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ApOworCQljb21wYXRpYmxlX2FyZyA9IDA7CisJCWJyZWFrOworCisJY2FzZSBWSURJT0NfR19GTVQ6CisJY2FzZSBWSURJT0NfU19GTVQ6CisJY2FzZSBWSURJT0NfVFJZX0ZNVDoKKwkJZXJyID0gZ2V0X3Y0bDJfZm9ybWF0MzIoJmthcmcudjJmLCB1cCk7CisJCWNvbXBhdGlibGVfYXJnID0gMDsKKwkJYnJlYWs7CisKKwljYXNlIFZJRElPQ19RVUVSWUJVRjoKKwljYXNlIFZJRElPQ19RQlVGOgorCWNhc2UgVklESU9DX0RRQlVGOgorCQllcnIgPSBnZXRfdjRsMl9idWZmZXIzMigma2FyZy52MmIsIHVwKTsKKwkJY29tcGF0aWJsZV9hcmcgPSAwOworCQlicmVhazsKKworCWNhc2UgVklESU9DX0VOVU1TVEQ6CisJCWVyciA9IGdldF92NGwyX3N0YW5kYXJkKCZrYXJnLnYycywgdXApOworCQljb21wYXRpYmxlX2FyZyA9IDA7CisJCWJyZWFrOworCisJY2FzZSBWSURJT0NfRU5VTVNURDMyOgorCQllcnIgPSBnZXRfdjRsMl9zdGFuZGFyZDMyKCZrYXJnLnYycywgdXApOworCQljb21wYXRpYmxlX2FyZyA9IDA7CisJCWJyZWFrOworCisJY2FzZSBWSURJT0NfRU5VTUlOUFVUOgorCQllcnIgPSBnZXRfdjRsMl9pbnB1dCgma2FyZy52MmksIHVwKTsKKwkJY29tcGF0aWJsZV9hcmcgPSAwOworCQlicmVhazsKKworCWNhc2UgVklESU9DX0VOVU1JTlBVVDMyOgorCQllcnIgPSBnZXRfdjRsMl9pbnB1dDMyKCZrYXJnLnYyaSwgdXApOworCQljb21wYXRpYmxlX2FyZyA9IDA7CisJCWJyZWFrOworCisJY2FzZSBWSURJT0NfR19UVU5FUjoKKwljYXNlIFZJRElPQ19TX1RVTkVSOgorCQllcnIgPSBnZXRfdjRsMl90dW5lcigma2FyZy52MnQsIHVwKTsKKwkJY29tcGF0aWJsZV9hcmcgPSAwOworCQlicmV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QsCisJCS50eXBlICAgICAgICAgID0gVjRMMl9DVFJMX1RZUEVfSU5URUdFUiwKKwkJLm5hbWUgICAgICAgICAgPSAiQ29udHJhc3QiLAorCQkubWluaW11bSAgICAgICA9IDAsCisJCS5tYXhpbXVtICAgICAgID0gMjU1LAorCQkuc3RlcCAgICAgICAgICA9IDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gNjQsCisJCS5mbGFncyAgICAgICAgID0gMCwKKwl9LCB7CisJCS5pZCAgICAgICAgICAgID0gVjRMMl9DSURfU0FUVVJBVElPTiwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJTYXR1cmF0aW9uIiwKKwkJLm1pbmltdW0gICAgICAgPSAwLAorCQkubWF4aW11bSAgICAgICA9IDI1NSwKKwkJLnN0ZXAgICAgICAgICAgPSAxLAorCQkuZGVmYXVsdF92YWx1ZSA9IDY0LAorCQkuZmxhZ3MgICAgICAgICA9IDAsCisJfSwgeworCQkuaWQgICAgICAgICAgICA9IFY0TDJfQ0lEX0hVRSwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJIdWUiLAorCQkubWluaW11bSAgICAgICA9IC0xMjgsCisJCS5tYXhpbXVtICAgICAgID0gMTI3LAorCQkuc3RlcCAgICAgICAgICA9IDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gMCwKKwkJLmZsYWdzIAkgICAgICAgPSAwLAorCX0sIHsKKwkJLmlkICAgICAgICAgICAgPSBWNEwyX0NJRF9BVURJT19WT0xVTUUsCisJCS50eXBlICAgICAgICAgID0gVjRMMl9DVFJMX1RZUEVfSU5URUdFUiwKKwkJLm5hbWUgICAgICAgICAgPSAiVm9sdW1lIiwKKwkJLm1pbmltdW0gICAgICAgPSAwLAorCQkubWF4aW11bSAgICAgICA9IDY1NTM1LAorCQkuc3RlcCAgICAgICAgICA9IDY1NTM1LzEwMCwKKwkJLmRlZmF1bHRfdmFsdWUgPSA1ODg4MCwKKwkJLmZsYWdzICAgICAgICAgPSAwLAorCX0sIHsKKwkJLmlkICAgICAgICAgICAgPSBWNEwyX0NJRF9BVURJT19CQUxBTkNFLAorCQkudHlwZSAgICAgICAgICA9IFY0TDJfQ1RSTF9UWVBFX0lOVEVHRVIsCisJCS5uYW1lICAgICAgICAgID0gIkJhbGFuY2UiLAorCQkubWluaW11bSAgICAgICA9IDAsCisJCS5tYXhpbXVtICAgICAgID0gNjU1MzUsCisJCS5zdGVwICAgICAgICAgID0gNjU1MzUvMTAwLAorCQkuZGVmYXVsdF92YWx1ZSA9IDMyNzY4LAorCQkuZmxhZ3MgICAgICAgICA9IDAsCisJfSwgeworCQkuaWQgICAgICAgICAgICA9IFY0TDJfQ0lEX0FVRElPX01VVEUsCisJCS50eXBlICAgICAgICAgID0gVjRMMl9DVFJMX1RZUEVfQk9PTEVBTiwKKwkJLm5hbWUgICAgICAgICAgPSAiTXV0ZSIsCisJCS5taW5pbXVtICAgICAgID0gMCwKKwkJLm1heGltdW0gICAgICAgPSAxLAorCQkuc3RlcCAgICAgICAgICA9IDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gMSwKKwkJLmZsYWdzICAgICAgICAgPSAwLAorCX0sIHsKKwkJLmlkICAgICAgICAgICAgPSBWNEwyX0NJRF9BVURJT19CQVNTLAorCQkudHlwZSAgICAgICAgICA9IFY0TDJfQ1RSTF9UWVBFX0lOVEVHRVIsCisJCS5uYW1lICAgICAgICAgID0gIkJhc3MiLAorCQkubWluaW11bSAgICAgICA9IDAsCisJCS5tYXhpbXVtICAgICAgID0gNjU1MzUsCisJCS5zdGVwICAgICAgICAgID0gNjU1MzUvMTAwLAorCQkuZGVmYXVsdF92YWx1ZSA9IDMyNzY4LAorCX0sIHsKKwkJLmlkICAgICAgICAgICAgPSBWNEwyX0NJRF9BVURJT19UUkVCTEUsCisJCS50eXBlICAgICAg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isjaW5jbHVkZSA8c291bmQvaW5pdHZhbC5oPgorCisjaW5jbHVkZSAiY3g4OC5oIgorI2luY2x1ZGUgImN4ODgtcmVnLmgiCisKKyNkZWZpbmUgZHByaW50ayhsZXZlbCxmbXQsIGFyZy4uLikJaWYgKGRlYnVnID49IGxldmVsKSBcCisJcHJpbnRrKEtFUk5fSU5GTyAiJXMvMTogIiBmbXQsIGNoaXAtPmNvcmUtPm5hbWUgLCAjIyBhcmcpCisKKyNkZWZpbmUgZHByaW50a19jb3JlKGxldmVsLGZtdCwgYXJnLi4uKQlpZiAoZGVidWcgPj0gbGV2ZWwpIFwKKwlwcmludGsoS0VSTl9ERUJVRyAiJXMvMTogIiBmbXQsIGNoaXAtPmNvcmUtPm5hbWUgLCAjIyBhcmcpCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwlEYXRhIHR5cGUgZGVjbGFyYXRpb25zIC0gQ2FuIGJlIG1vZGVkIHRvIGEgaGVhZGVyIGZpbGUgbGF0ZXIKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBUaGVzZSBjYW4gYmUgcmVwbGFjZWQgYWZ0ZXIgZG9uZSAqLworI2RlZmluZSBNSVhFUl9BRERSX0xBU1QgTUFYX0NYODhfSU5QVVQKKworc3RydWN0IGN4ODhfYXVkaW9fZGV2IHsKKwlzdHJ1Y3QgY3g4OF9jb3JlICAgICAgICAgICAqY29yZTsKKwlzdHJ1Y3QgY3g4OF9kbWFxdWV1ZSAgICAgICBxOworCisJLyogcGNpIGkvbyAqLworCXN0cnVjdCBwY2lfZGV2ICAgICAgICAgICAgICpwY2k7CisJdW5zaWduZWQgY2hhciAgICAgICAgICAgICAgcGNpX3JldixwY2lfbGF0OworCisJLyogYXVkaW8gY29udHJvbHMgKi8KKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBpcnE7CisKKwlzbmRfY2FyZF90ICAgICAgICAgICAgICAgICAqY2FyZDsKKworCXNwaW5sb2NrX3QgICAgICAgICAgICAgICAgIHJlZ19sb2NrOworCisJdW5zaWduZWQgaW50ICAgICAgICAgICAgICAgZG1hX3NpemU7CisJdW5zaWduZWQgaW50ICAgICAgICAgICAgICAgcGVyaW9kX3NpemU7CisJdW5zaWduZWQgaW50ICAgICAgICAgICAgICAgbnVtX3BlcmlvZHM7CisKKwlzdHJ1Y3QgdmlkZW9idWZfZG1hYnVmIGRtYV9yaXNjOworCisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgbWl4ZXJfdm9sdW1lW01JWEVSX0FERFJfTEFTVCsxXVsyXTsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBjYXB0dXJlX3NvdXJjZVtNSVhFUl9BRERSX0xBU1QrMV1bMl07CisKKwlsb25nIGludCByZWFkX2NvdW50OworCWxvbmcgaW50IHJlYWRfb2Zmc2V0OworCisJc3RydWN0IGN4ODhfYnVmZmVyICAgKmJ1ZjsKKworCWxvbmcgb3BlbmVkOworCXNuZF9wY21fc3Vic3RyZWFtX3QgKnN1YnN0cmVhbTsKKworfTsKK3R5cGVkZWYgc3RydWN0IGN4ODhfYXVkaW9fZGV2IHNuZF9jeDg4X2NhcmRfdDsKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJCQlNb2R1bGUgZ2xvYmFsIHN0YXRpYyB2YXJzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGludCBpbmRleFtTTkRSVl9DQVJEU10gPSBTTkRSVl9ERUZBVUxUX0lEWDsJLyogSW5kZXggMC1NQVggKi8KK3N0YXRpYyBjaGFyICppZFtTTkRSVl9DQVJEU10gPSBTTkRSVl9ERUZBVUxUX1NUUjsJLyogSUQgZm9yIHRoaXMgY2FyZCAqLworc3RhdGljIGludCBlbmFibGVbU05EUlZfQ0FSRFNdID0gezEsIFsxIC4uLiAoU05EUlZfQ0FSRFMgLSAxKV0gPSAxfTsKK3N0YXRpYyBzbmRfY2FyZF90ICpzbmRfY3g4OF9jYXJkc1tTTkRSVl9DQVJEU107CisKK21vZHVsZV9wYXJhbV9hcnJheShlbmFibGUsIGJvb2wsIE5VTEwsIDA0NDQpOworTU9EVUxFX1BBUk1fREVTQyhlbmFibGUsICJFbmFibGUgY3g4OHggc291bmRjYXJkLiBkZWZhdWx0IGVuYWJsZWQuIik7CisKK21vZHVsZV9wYXJhbV9hcnJheShpbmRleCwgaW50LCBOVUxMLCAwNDQ0KTsKK01PRFVMRV9QQVJNX0RFU0MoaW5kZXgsICJJbmRleCB2YWx1ZSBmb3IgY3g4OHggY2FwdHVyZSBpbnRlcmZhY2UocykuIik7CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkJCQlNb2R1bGUgbWFjcm9zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworTU9EVUxFX0RFU0NSSVBUSU9OKCJBTFNBIGRyaXZlciBtb2R1bGUgZm9yIGN4MjM4OHggYmFzZWQgVFYgY2FyZHMiKTsKK01PRFVMRV9BVVRIT1IoIlJpY2FyZG8gQ2VycXVlaXJhIik7CitNT0RVTEVfQVVUSE9SKCJNYXVybyBDYXJ2YWxobyBDaGVoYWIgPG1jaGVoYWJAYnJ0dXJiby5jb20uYnI+Iik7CitNT0RVTEVfTElDRU5TRSgiR1BMIik7CitNT0RVTEVfU1VQUE9SVEVEX0RFVklDRSgie3tDb25leGFudCwyMzg4MX0sIgorCQkJInt7Q29uZXhhbnQsMjM4ODJ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ZmZzZXQpOworCit9CisKKy8qCisgKiBvcGVyYXRvcnMKKyAqLworc3RhdGljIHNuZF9wY21fb3BzX3Qgc25kX2N4ODhfcGNtX29wcyA9IHsKKwkub3BlbiA9IHNuZF9jeDg4X3BjbV9vcGVuLAorCS5jbG9zZSA9IHNuZF9jeDg4X2Nsb3NlLAorCS5pb2N0bCA9IHNuZF9wY21fbGliX2lvY3RsLAorCS5od19wYXJhbXMgPSBzbmRfY3g4OF9od19wYXJhbXMsCisJLmh3X2ZyZWUgPSBzbmRfY3g4OF9od19mcmVlLAorCS5wcmVwYXJlID0gc25kX2N4ODhfcHJlcGFyZSwKKwkudHJpZ2dlciA9IHNuZF9jeDg4X2NhcmRfdHJpZ2dlciwKKwkucG9pbnRlciA9IHNuZF9jeDg4X3BvaW50ZXIsCit9OworCisvKgorICogY3JlYXRlIGEgUENNIGRldmljZQorICovCitzdGF0aWMgaW50IF9fZGV2aW5pdCBzbmRfY3g4OF9wY20oc25kX2N4ODhfY2FyZF90ICpjaGlwLCBpbnQgZGV2aWNlLCBjaGFyICpuYW1lKQoreworCWludCBlcnI7CisJc25kX3BjbV90ICpwY207CisKKwllcnIgPSBzbmRfcGNtX25ldyhjaGlwLT5jYXJkLCBuYW1lLCBkZXZpY2UsIDAsIDEsICZwY20pOworCWlmIChlcnIgPCAwKQorCQlyZXR1cm4gZXJyOworCXBjbS0+cHJpdmF0ZV9kYXRhID0gY2hpcDsKKwlzdHJjcHkocGNtLT5uYW1lLCBuYW1lKTsKKwlzbmRfcGNtX3NldF9vcHMocGNtLCBTTkRSVl9QQ01fU1RSRUFNX0NBUFRVUkUsICZzbmRfY3g4OF9wY21fb3BzKTsKKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCQkJCUNPTlRST0wgSU5URVJGQUNFCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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mVyLGRldm5vKTsKKworCWVyciA9IHNuZF9jYXJkX3JlZ2lzdGVyKGNhcmQpOworCWlmIChlcnIgPCAwKSB7CisJCXNuZF9jYXJkX2ZyZWUoY2FyZCk7CisJCXJldHVybiAoZXJyKTsKKwl9CisJc25kX2N4ODhfY2FyZHNbZGV2bm9dID0gY2FyZDsKKworCXBjaV9zZXRfZHJ2ZGF0YShwY2ksY2FyZCk7CisKKwlkZXZubysrOworCXJldHVybiAwOworfQorLyoKKyAqIEFMU0EgZGVzdHJ1Y3RvcgorICovCitzdGF0aWMgdm9pZCBfX2RldmV4aXQgY3g4OF9hdWRpb19maW5pZGV2KHN0cnVjdCBwY2lfZGV2ICpwY2kpCit7CisJc3RydWN0IGN4ODhfYXVkaW9fZGV2ICpjYXJkID0gcGNpX2dldF9kcnZkYXRhKHBjaSk7CisKKwlzbmRfY2FyZF9mcmVlKCh2b2lkICopY2FyZCk7CisKKwlwY2lfc2V0X2RydmRhdGEocGNpLCBOVUxMKTsKKworCWRldm5vLS07Cit9CisKKy8qCisgKiBQQ0kgZHJpdmVyIGRlZmluaXRpb24KKyAqLworCitzdGF0aWMgc3RydWN0IHBjaV9kcml2ZXIgY3g4OF9hdWRpb19wY2lfZHJpdmVyID0geworCS5uYW1lICAgICA9ICJjeDg4X2F1ZGlvIiwKKwkuaWRfdGFibGUgPSBjeDg4X2F1ZGlvX3BjaV90YmwsCisJLnByb2JlICAgID0gY3g4OF9hdWRpb19pbml0ZGV2LAorCS5yZW1vdmUgICA9IGN4ODhfYXVkaW9fZmluaWRldiwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJCQkJTElOVVggTU9EVUxFIElOSVQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogbW9kdWxlIGluaXQKKyAqLworc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CXJldHVybiByZXR2YWw7Cit9CisKK2ludCBtc3BfcmVhZF9kZW0oc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgaW50IGFkZHIpCit7CisJcmV0dXJuIG1zcF9yZWFkKGNsaWVudCwgSTJDX01TUF9ERU0sIGFkZHIpOworfQorCitpbnQgbXNwX3JlYWRfZHNwKHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsIGludCBhZGRyKQoreworCXJldHVybiBtc3BfcmVhZChjbGllbnQsIEkyQ19NU1BfRFNQLCBhZGRyKTsKK30KKworc3RhdGljIGludCBtc3Bfd3JpdGUoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgaW50IGRldiwgaW50IGFkZHIsIGludCB2YWwpCit7CisJaW50IGVycjsKKwl1OCBidWZmZXJbNV07CisKKwlidWZmZXJbMF0gPSBkZXY7CisJYnVmZmVyWzFdID0gYWRkciA+PiA4OworCWJ1ZmZlclsyXSA9IGFkZHIgJiAgMHhmZjsKKwlidWZmZXJbM10gPSB2YWwgID4+IDg7CisJYnVmZmVyWzRdID0gdmFsICAmICAweGZmOworCisJdjRsX2RiZygzLCBtc3BfZGVidWcsIGNsaWVudCwgIm1zcF93cml0ZSgweCV4LCAweCV4LCAweCV4KVxuIiwgZGV2LCBhZGRyLCB2YWwpOworCWZvciAoZXJyID0gMDsgZXJyIDwgMzsgZXJyKyspIHsKKwkJaWYgKGkyY19tYXN0ZXJfc2VuZChjbGllbnQsIGJ1ZmZlciwgNSkgPT0gNSkKKwkJCWJyZWFrOworCQl2NGxfd2FybihjbGllbnQsICJJL08gZXJyb3IgIyVkICh3cml0ZSAweCUwMngvMHglMDJ4KVxuIiwgZXJyLAorCQkgICAgICAgZGV2LCBhZGRyKTsKKwkJY3VycmVudC0+c3RhdGUgPSBUQVNLX0lOVEVSUlVQVElCTEU7CisJCXNjaGVkdWxlX3RpbWVvdXQobXNlY3NfdG9famlmZmllcygxMCkpOworCX0KKwlpZiAoZXJyID09IDMpIHsKKwkJd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AgICAgID0gMSwKKwkJLmRlZmF1bHRfdmFsdWUgPSAxMjgsCisJCS5mbGFncyAgICAgICAgID0gMCwKKwl9LCB7CisJCS5pZCAgICAgICAgICAgID0gVjRMMl9DSURfQ09OVFJBU1QsCisJCS50eXBlICAgICAgICAgID0gVjRMMl9DVFJMX1RZUEVfSU5URUdFUiwKKwkJLm5hbWUgICAgICAgICAgPSAiQ29udHJhc3QiLAorCQkubWluaW11bSAgICAgICA9IDAsCisJCS5tYXhpbXVtICAgICAgID0gMjU1LAorCQkuc3RlcCAgICAgICAgICA9IDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gNjQsCisJCS5mbGFncyAgICAgICAgID0gMCwKKwl9LCB7CisJCS5pZCAgICAgICAgICAgID0gVjRMMl9DSURfU0FUVVJBVElPTiwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJTYXR1cmF0aW9uIiwKKwkJLm1pbmltdW0gICAgICAgPSAwLAorCQkubWF4aW11bSAgICAgICA9IDI1NSwKKwkJLnN0ZXAgICAgICAgICAgPSAxLAorCQkuZGVmYXVsdF92YWx1ZSA9IDY0LAorCQkuZmxhZ3MgICAgICAgICA9IDAsCisJfSwgeworCQkuaWQgICAgICAgICAgICA9IFY0TDJfQ0lEX0hVRSwKKwkJLnR5cGUgICAgICAgICAgPSBWNEwyX0NUUkxfVFlQRV9JTlRFR0VSLAorCQkubmFtZSAgICAgICAgICA9ICJIdWUiLAorCQkubWluaW11bSAgICAgICA9IC0xMjgsCisJCS5tYXhpbXVtICAgICAgID0gMTI3LAorCQkuc3RlcCAgICAgICAgICA9IDEsCisJCS5kZWZhdWx0X3ZhbHVlID0gMCwKKwkJLmZsYWdzIAkgICAgICAgPSAwLAorCX0sCit9OworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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sCi0JW19JT0NfTlIoVklESU9DX1NfRkJVRildICAgICAgICAgPSAiVklESU9DX1NfRkJVRiIsCi0JW19JT0NfTlIoVklESU9DX09WRVJMQVkpXSAgICAgICAgPSAiVklESU9DX09WRVJMQVkiLAotCVtfSU9DX05SKFZJRElPQ19RQlVGKV0gICAgICAgICAgID0gIlZJRElPQ19RQlVGIiwKLQlbX0lPQ19OUihWSURJT0NfRFFCVUYpXSAgICAgICAgICA9ICJWSURJT0NfRFFCVUYiLAotCVtfSU9DX05SKFZJRElPQ19TVFJFQU1PTildICAgICAgID0gIlZJRElPQ19TVFJFQU1PTiIsCi0JW19JT0NfTlIoVklESU9DX1NUUkVBTU9GRildICAgICAgPSAiVklESU9DX1NUUkVBTU9GRiIsCi0JW19JT0NfTlIoVklESU9DX0dfUEFSTSldICAgICAgICAgPSAiVklESU9DX0dfUEFSTSIsCi0JW19JT0NfTlIoVklESU9DX1NfUEFSTSldICAgICAgICAgPSAiVklESU9DX1NfUEFSTSIsCi0JW19JT0NfTlIoVklESU9DX0dfU1REKV0gICAgICAgICAgPSAiVklESU9DX0dfU1REIiwKLQlbX0lPQ19OUihWSURJT0NfU19TVEQpXSAgICAgICAgICA9ICJWSURJT0NfU19TVEQiLAotCVtfSU9DX05SKFZJRElPQ19FTlVNU1REKV0gICAgICAgID0gIlZJRElPQ19FTlVNU1REIiwKLQlbX0lPQ19OUihWSURJT0NfRU5VTUlOUFVUKV0gICAgICA9ICJWSURJT0NfRU5VTUlOUFVUIiwKLQlbX0lPQ19OUihWSURJT0NfR19DVFJMKV0gICAgICAgICA9ICJWSURJT0NfR19DVFJMIiwKLQlbX0lPQ19OUihWSURJT0NfU19DVFJMKV0gICAgICAgICA9ICJWSURJT0NfU19DVFJMIiwKLQlbX0lPQ19OUihWSURJT0NfR19UVU5FUildICAgICAgICA9ICJWSURJT0NfR19UVU5FUiIsCi0JW19JT0NfTlIoVklESU9DX1NfVFVORVIpXSAgICAgICAgPSAiVklESU9DX1NfVFVORVIiLAotCVtfSU9DX05SKFZJRElPQ19HX0FVRElPKV0gICAgICAgID0gIlZJRElPQ19HX0FVRElPIiwKLQlbX0lPQ19OUihWSURJT0NfU19BVURJTyldICAgICAgICA9ICJWSURJT0NfU19BVURJTyIsCi0JW19JT0NfTlIoVklESU9DX1FVRVJZQ1RSTCldICAgICAgPSAiVklESU9DX1FVRVJZQ1RSTCIsCi0JW19JT0NfTlIoVklESU9DX1FVRVJZTUVOVSldICAgICAgPSAiVklESU9DX1FVRVJZTUVOVSIsCi0JW19JT0NfTlIoVklESU9DX0dfSU5QVVQpXSAgICAgICAgPSAiVklESU9DX0dfSU5QVVQiLAotCVtfSU9DX05SKFZJRElPQ19TX0lOUFVUKV0gICAgICAgID0gIlZJRElPQ19TX0lOUFVUIiwKLQlbX0lPQ19OUihWSURJT0NfR19PVVRQVVQpXSAgICAgICA9ICJWSURJT0NfR19PVVRQVVQiLAotCVtfSU9DX05SKFZJRElPQ19TX09VVFBVVCldICAgICAgID0gIlZJRElPQ19TX09VVFBVVCIsCi0JW19JT0NfTlIoVklESU9DX0VOVU1PVVRQVVQpXSAgICAgPSAiVklESU9DX0VOVU1PVVRQVVQiLAotCVtfSU9DX05SKFZJRElPQ19HX0FVRE9VVCldICAgICAgID0gIlZJRElPQ19HX0FVRE9VVCIsCi0JW19JT0NfTlIoVklESU9DX1NfQVVET1VUKV0gICAgICAgPSAiVklESU9DX1NfQVVET1VUIiwKLQlbX0lPQ19OUihWSURJT0NfR19NT0RVTEFUT1IpXSAgICA9ICJWSURJT0NfR19NT0RVTEFUT1IiLAotCVtfSU9DX05SKFZJRElPQ19TX01PRFVMQVRPUildICAgID0gIlZJRElPQ19TX01PRFVMQVRPUiIsCi0JW19JT0NfTlIoVklESU9DX0dfRlJFUVVFTkNZKV0gICAgPSAiVklESU9DX0dfRlJFUVVFTkNZIiwKLQlbX0lPQ19OUihWSURJT0NfU19GUkVRVUVOQ1kpXSAgICA9ICJWSURJT0NfU19GUkVRVUVOQ1kiLAotCVtfSU9DX05SKFZJRElPQ19DUk9QQ0FQKV0gICAgICAgID0gIlZJRElPQ19DUk9QQ0FQIiwKLQlbX0lPQ19OUihWSURJT0NfR19DUk9QKV0gICAgICAgICA9ICJWSURJT0NfR19DUk9QIiwKLQlbX0lPQ19OUihWSURJT0NfU19DUk9QKV0gICAgICAgICA9ICJWSURJT0NfU19DUk9QIiwKLQlbX0lPQ19OUihWSURJT0NfR19KUEVHQ09NUCldICAgICA9ICJWSURJT0NfR19KUEVHQ09NUCIsCi0JW19JT0NfTlIoVklESU9DX1NfSlBFR0NPTVApXSAgICAgPSAiVklESU9DX1NfSlBFR0NPTVAiLAotCVtfSU9DX05SKFZJRElPQ19RVUVSWVNURCldICAgICAgID0gIlZJRElPQ19RVUVSWVNURCIsCi0JW19JT0NfTlIoVklESU9DX1RSWV9GTVQpXSAgICAgICAgPSAiVklESU9DX1RSWV9GTVQiLAorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiBkZWJ1ZyBoZWxwIGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKworI2lmZGVmIEhBVkVfVjRMMQorc3RhdGljIGNvbnN0IGNoYXIgKnY0bDFfaW9jdGxzW10gPSB7CisJW19JT0NfTlIoVklESU9DR0NBUCldICAgICAgID0gIlZJRElPQ0dDQVAiLAorCVtfSU9DX05SKFZJRElPQ0dDSEFOKV0gICAgICA9ICJWSURJT0NHQ0hBTiIsCisJW19JT0NfTlIoVklESU9DU0NIQU4pXSAgICAgID0gIlZJRElPQ1NDSEFOIiwKKwlbX0lPQ19OUihWSURJT0NHVFVORVIpXSAgICAgPSAiVklESU9DR1RVTkVSIiwKKwlbX0lPQ19OUihWSURJT0NTVFVORVIpXSAgICAgPSAiVklESU9DU1RVTkVSIiwKKwlbX0lPQ19OUihWSURJT0NHUElDVCldICAgICAgPSAiVklESU9DR1BJQ1QiLAorCVtfSU9DX05SKFZJRElPQ1NQSUNUKV0gICAgICA9ICJWSURJT0NTUElDVCIsCisJW19JT0NfTlIoVklESU9DQ0FQVFVSRSldICAgID0gIlZJRElPQ0NBUFRVUkUiLAorCVtfSU9DX05SKFZJRElPQ0dXSU4pXSAgICAgICA9ICJWSURJT0NHV0lOIiwKKwlbX0lPQ19OUihWSURJT0NTV0lOKV0gICAgICAgPSAiVklESU9DU1dJTiIsCisJW19JT0NfTlIoVklESU9DR0ZCVUYpXSAgICAgID0gIlZJRElPQ0dGQlVGIiwKKwlbX0lPQ19OUihWSURJT0NTRkJVRildICAgICAgPSAiVklESU9DU0ZCVUYiLAorCVtfSU9DX05SKFZJRElPQ0tFWSldICAgICAgICA9ICJWSURJT0NLRVkiLAorCVtfSU9DX05SKFZJRElPQ0dGUkVRKV0gICAgICA9ICJWSURJT0NHRlJFUSIsCisJW19JT0NfTlIoVklESU9DU0ZSRVEpXSAgICAgID0gIlZJRElPQ1NGUkVRIiwKKwlbX0lPQ19OUihWSURJT0NHQVVESU8pXSAgICAgPSAiVklESU9DR0FVRElPIiwKKwlbX0lPQ19OUihWSURJT0NTQVVESU8pXSAgICAgPSAiVklESU9DU0FVRElPIiwKKwlbX0lPQ19OUihWSURJT0NTWU5DKV0gICAgICAgPSAiVklESU9DU1lOQyIsCisJW19JT0NfTlIoVklESU9DTUNBUFRVUkUpXSAgID0gIlZJRElPQ01DQVBUVVJFIiwKKwlbX0lPQ19OUihWSURJT0NHTUJVRildICAgICAgPSAiVklESU9DR01CVUYiLAorCVtfSU9DX05SKFZJRElPQ0dVTklUKV0gICAgICA9ICJWSURJT0NHVU5JVCIsCisJW19JT0NfTlIoVklESU9DR0NBUFRVUkUpXSAgID0gIlZJRElPQ0dDQVBUVVJFIiwKKwlbX0lPQ19OUihWSURJT0NTQ0FQVFVSRSldICAgPSAiVklESU9DU0NBUFRVUkUiLAorCVtfSU9DX05SKFZJRElPQ1NQTEFZTU9ERSldICA9ICJWSURJT0NTUExBWU1PREUiLAorCVtfSU9DX05SKFZJRElPQ1NXUklURU1PREUpXSA9ICJWSURJT0NTV1JJVEVNT0RFIiwKKwlbX0lPQ19OUihWSURJT0NHUExBWUlORk8pXSAgPSAiVklESU9DR1BMQVlJTkZPIiwKKwlbX0lPQ19OUihWSURJT0NTTUlDUk9DT0RFKV0gPSAiVklESU9DU01JQ1JPQ09ERSIsCisJW19JT0NfTlIoVklESU9DR1ZCSUZNVCldICAgID0gIlZJRElPQ0dWQklGTVQiLAorCVtfSU9DX05SKFZJRElPQ1NWQklGTVQpXSAgICA9ICJWSURJT0NTVkJJRk1UIgogfTsKKyNkZWZpbmUgVjRMMV9JT0NUTFMgQVJSQVlfU0laRSh2NGwxX2lvY3RscykKKyNlbmRpZgorCitzdGF0aWMgY29uc3QgY2hhciAqdjRsMl9pb2N0bHNbXSA9IHsKKwlbX0lPQ19OUihWSURJT0NfUVVFUllDQVApXSAgICAgICAgID0gIlZJRElPQ19RVUVSWUNBUCIsCisJW19JT0NfTlIoVklESU9DX1JFU0VSVkVEKV0gICAgICAgICA9ICJWSURJT0NfUkVTRVJWRUQiLAorCVtfSU9DX05SKFZJRElPQ19FTlVNX0ZNVCldICAgICAgICAgPSAiVklESU9DX0VOVU1fRk1UIiwKKwlbX0lPQ19OUihWSURJT0NfR19GTVQpXSAgICAgICAgICAgID0gIlZJRElPQ19HX0ZNVCIsCisJW19JT0NfTlIoVklESU9DX1NfRk1UKV0gICAgICAgICAgICA9ICJWSURJT0NfU19GTVQiLAorCVtfSU9DX05SKFZJRElPQ19HX01QRUdDT01QKV0gICAgICAgPSAiVklESU9DX0dfTVBFR0NPTVAiLAorCVtfSU9DX05SKFZJRElPQ19TX01QRUdDT01QKV0gICAgICAgPSAiVklESU9DX1NfTVBFR0NPTVAiLAorCVtfSU9DX05SKFZJRElPQ19SRVFCVUZTKV0gICAgICAgICAgPSAiVklESU9DX1JFUUJVRlMiLAorCVtfSU9DX05SKFZJRElPQ19RVUVSWUJVRildICAgICAgICAgPSAiVklESU9DX1FVRVJZQlVGIiwKKwlbX0lPQ19OUihWSURJT0NfR19GQlVGKV0gICAgICAgICAgID0gIlZJRElPQ19HX0ZCVUYiLAorCVtfSU9DX05SKFZJRElPQ19TX0ZCVUYpXSAgICAgICAgICAgPSAiVklESU9DX1NfRkJVRiIsCisJW19JT0NfTlIoVklESU9DX09WRVJMQVkpXSAgICAgICAgICA9ICJWSURJT0NfT1ZFUkxBWSIsCisJW19JT0NfTlIoVklESU9DX1FCVUYpXSAgICAgICAgICAgICA9ICJWSURJT0NfUUJVRiIsCisJW19JT0NfTlIoVklESU9DX0RRQlVGKV0gICAgICAgICAgICA9ICJWSURJT0NfRFFCVUYiLAorCVtfSU9DX05SKFZJRElPQ19TVFJFQU1PTildICAgICAgICAgPSAiVklESU9DX1NUUkVBTU9OIiwKKwlbX0lPQ19OUihWSURJT0NfU1RSRUFNT0ZGKV0gICAgICAgID0gIlZJRElPQ19TVFJFQU1PRkYiLAorCVtfSU9DX05SKFZJRElPQ19HX1BBUk0pXSAgICAgICAgICAgPSAiVklESU9DX0dfUEFSTSIsCisJW19JT0NfTlIoVklESU9DX1NfUEFSTSldICAgICAgICAgICA9ICJWSURJT0NfU19QQVJNIiwKKwlbX0lPQ19OUihWSURJT0NfR19TVEQpXSAgICAgICAgICAgID0gIlZJRElPQ19HX1NURCIsCisJW19JT0NfTlIoVklESU9DX1NfU1REKV0gICAgICAgICAgICA9ICJWSURJT0NfU19TVEQiLAorCVtfSU9DX05SKFZJRElPQ19FTlVNU1REKV0gICAgICAgICAgPSAiVklESU9DX0VOVU1TVEQiLAorCVtfSU9DX05SKFZJRElPQ19FTlVNSU5QVVQpXSAgICAgICAgPSAiVklESU9DX0VOVU1JTlBVVCIsCisJW19JT0NfTlIoVklESU9DX0dfQ1RSTCldICAgICAgICAgICA9ICJWSURJT0NfR19DVFJMIiwKKwlbX0lPQ19OUihWSURJT0NfU19DVFJMKV0gICAgICAgICAgID0gIlZJRElPQ19TX0NUUkwiLAorCVtfSU9DX05SKFZJRElPQ19HX1RVTkVSKV0gICAgICAgICAgPSAiVklESU9DX0dfVFVORVIiLAorCVtfSU9DX05SKFZJRElPQ19TX1RVTkVSKV0gICAgICAgICAgPSAiVklESU9DX1NfVFVORVIiLAorCVtfSU9DX05SKFZJRElPQ19HX0FVRElPKV0gICAgICAgICAgPSAiVklESU9DX0dfQVVESU8iLAorCVtfSU9DX05SKFZJRElPQ19TX0FVRElPKV0gICAgICAgICAgPSAiVklESU9DX1NfQVVESU8iLAorCVtfSU9DX05SKFZJRElPQ19RVUVSWUNUUkwpXSAgICAgICAgPSAiVklESU9DX1FVRVJZQ1RSTCIsCisJW19JT0NfTlIoVklESU9DX1FVRVJZTUVOVSldICAgICAgICA9ICJWSURJT0NfUVVFUllNRU5VIiwKKwlbX0lPQ19OUihWSURJT0NfR19JTlBVVCldICAgICAgICAgID0gIlZJRElPQ19HX0lOUFVUIiwKKwlbX0lPQ19OUihWSURJT0NfU19JTlBVVCldICAgICAgICAgID0gIlZJRElPQ19TX0lOUFVUIiwKKwlbX0lPQ19OUihWSURJT0NfR19PVVRQVVQpXSAgICAgICAgID0gIlZJRElPQ19HX09VVFBVVCIsCisJW19JT0NfTlIoVklESU9DX1NfT1VUUFVUKV0gICAgICAgICA9ICJWSURJT0NfU19PVVRQVVQiLAorCVtfSU9DX05SKFZJRElPQ19FTlVNT1VUUFVUKV0gICAgICAgPSAiVklESU9DX0VOVU1PVVRQVVQiLAorCVtfSU9DX05SKFZJRElPQ19HX0FVRE9VVCldICAgICAgICAgPSAiVklESU9DX0dfQVVET1VUIiwKKwlbX0lPQ19OUihWSURJT0NfU19BVURPVVQpXSAgICAgICAgID0gIlZJRElPQ19TX0FVRE9VVCIsCisJW19JT0NfTlIoVklESU9DX0dfTU9EVUxBVE9SKV0gICAgICA9ICJWSURJT0NfR19NT0RVTEFUT1IiLAorCVtfSU9DX05SKFZJRElPQ19TX01PRFVMQVRPUildICAgICAgPSAiVklESU9DX1NfTU9EVUxBVE9SIiwKKwlbX0lPQ19OUihWSURJT0NfR19GUkVRVUVOQ1kpXSAgICAgID0gIlZJRElPQ19HX0ZSRVFVRU5DWSIsCisJW19JT0NfTlIoVklESU9DX1NfRlJFUVVFTkNZKV0gICAgICA9ICJWSURJT0NfU19GUkVRVUVOQ1kiLAorCVtfSU9DX05SKFZJRElPQ19DUk9QQ0FQKV0gICAgICAgICAgPSAiVklESU9DX0NST1BDQVAiLAorCVtfSU9DX05SKFZJRElPQ19HX0NST1ApXSAgICAgICAgICAgPSAiVklESU9DX0dfQ1JPUCIsCisJW19JT0NfTlIoVklESU9DX1NfQ1JPUCldICAgICAgICAgICA9ICJWSURJT0NfU19DUk9QIiwKKwlbX0lPQ19OUihWSURJT0NfR19KUEVHQ09NUCldICAgICAgID0gIlZJRElPQ19HX0pQRUdDT01QIiwKKwlbX0lPQ19OUihWSURJT0NfU19KUEVHQ09NUCldICAgICAgID0gIlZJRElPQ19TX0pQRUdDT01QIiwKKwlbX0lPQ19OUihWSURJT0NfUVVFUllTVEQpXSAgICAgICAgID0gIlZJRElPQ19RVUVSWVNURCIsCisJW19JT0NfTlIoVklESU9DX1RSWV9GTVQpXSAgICAgICAgICA9ICJWSURJT0NfVFJZX0ZNVCIsCisJW19JT0NfTlIoVklESU9DX0VOVU1BVURJTyldICAgICAgICA9ICJWSURJT0NfRU5VTUFVRElPIiwKKwlbX0lPQ19OUihWSURJT0NfRU5VTUFVRE9VVCldICAgICAgID0gIlZJRElPQ19FTlVNQVVET1VUIiwKKwlbX0lPQ19OUihWSURJT0NfR19QUklPUklUWSldICAgICAgID0gIlZJRElPQ19HX1BSSU9SSVRZIiwKKwlbX0lPQ19OUihWSURJT0NfU19QUklPUklUWSldICAgICAgID0gIlZJRElPQ19TX1BSSU9SSVRZIiwKKyNpZiAxCisJW19JT0NfTlIoVklESU9DX0dfU0xJQ0VEX1ZCSV9DQVApXSA9ICJW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RFUl9TRVRfVkJJX0JZUEFTUyIsCisJW19JT0NfTlIoREVDT0RFUl9EVU1QKV0gICAgICAgICAgICAgICAgPSAiREVDT0RFUl9EVU1QIiwKKyNlbmRpZgorCVtfSU9DX05SKEFVRENfU0VUX1JBRElPKV0gICAgICAgICAgICAgID0gIkFVRENfU0VUX1JBRElPIiwKKwlbX0lPQ19OUihBVURDX1NFVF9JTlBVVCldICAgICAgICAgICAgICA9ICJBVURDX1NFVF9JTlBVVCIsCisJW19JT0NfTlIoTVNQX1NFVF9NQVRSSVgpXSAgICAgICAgICAgICAgPSAiTVNQX1NFVF9NQVRSSVgiLAorCisJW19JT0NfTlIoVFVORVJfU0VUX1RZUEVfQUREUildICAgICAgICAgPSAiVFVORVJfU0VUX1RZUEVfQUREUiIsCisJW19JT0NfTlIoVFVORVJfU0VUX1NUQU5EQlkpXSAgICAgICAgICAgPSAiVFVORVJfU0VUX1NUQU5EQlkiLAorCVtfSU9DX05SKFREQTk4ODdfU0VUX0NPTkZJRyldICAgICAgICAgID0gIlREQTk4ODdfU0VUX0NPTkZJRyIsCisKKwlbX0lPQ19OUihWSURJT0NfSU5UX1NfUkVHSVNURVIpXSAgICAgICA9ICJWSURJT0NfSU5UX1NfUkVHSVNURVIiLAorCVtfSU9DX05SKFZJRElPQ19JTlRfR19SRUdJU1RFUildICAgICAgID0gIlZJRElPQ19JTlRfR19SRUdJU1RFUiIsCisJW19JT0NfTlIoVklESU9DX0lOVF9SRVNFVCldICAgICAgICAgICAgPSAiVklESU9DX0lOVF9SRVNFVCIsCisJW19JT0NfTlIoVklESU9DX0lOVF9BVURJT19DTE9DS19GUkVRKV0gPSAiVklESU9DX0lOVF9BVURJT19DTE9DS19GUkVRIiwKKwlbX0lPQ19OUihWSURJT0NfSU5UX0RFQ09ERV9WQklfTElORSldICA9ICJWSURJT0NfSU5UX0RFQ09ERV9WQklfTElORSIsCisJW19JT0NfTlIoVklESU9DX0lOVF9TX1ZCSV9EQVRBKV0gICAgICAgPSA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X05BS19SRUNFSVZFRCAgICAgICAgKDB4MDA3MSkKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgQWRkaXRpb25hbCBGQ1AgdGFyZ2V0IHZhbHVlcyAob2Jzb2xldGUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KQEAgLTc0NSw3ICs3NDksNyBAQAogI2RlZmluZSBNUElfSU9DU1RBVFVTX0xBTl9DQU5DRUxFRCAgICAgICAgICAgICAgKDB4MDA4NykKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgU2VyaWFsIEF0dGFjaGVkIFNDU0kgdmFsdWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogIFNlcmlhbCBBdHRhY2hlZCBTQ1NJIHZhbHVlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2RlZmluZSBNUElfSU9DU1RBVFVTX1NBU19TTVBfUkVRVUVTVF9GQUlMRUQgICAgKDB4MDA5MCkKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbHNpL21waV9jbmZnLmggYi9kcml2ZXJzL21lc3NhZ2UvZnVzaW9uL2xzaS9tcGlfY25mZy5oCmluZGV4IGQ4MzM5ODkuLmIxYmVjZWMgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVzc2FnZS9mdXNpb24vbHNpL21waV9jbmZnLmgKKysrIGIvZHJpdmVycy9tZXNzYWdlL2Z1c2lvbi9sc2kvbXBpX2NuZmcuaApAQCAtNiw3ICs2LDcgQEAKICAqICAgICAgICAgIFRpdGxlOiAgTVBJIENvbmZpZyBtZXNzYWdlLCBzdHJ1Y3R1cmVzLCBhbmQgUGFnZXMKICAqICBDcmVhdGlvbiBEYXRlOiAgSnVseSAyNywgMjAwMAogICoKLSAqICAgIG1waV9jbmZnLmggVmVyc2lvbjogIDAxLjA1LjA5CisgKiAgICBtcGlfY25mZy5oIFZlcnNpb246ICAwMS4wNS4xMQogICoKICAqICBWZXJzaW9uIEhpc3RvcnkKICAqICAtLS0tLS0tLS0tLS0tLS0KQEAgLTI0OSw2ICsyNDksMjMgQEAKICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE93bmVyRGV2SGFuZGxlIGFuZCBGbGFncyBmaWVsZCB0byBTQVMgUEhZIFBhZ2UgMC4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIElPQyBHUElPIEZsYWdzIGRlZmluZSB0byBTQVMgRW5jbG9zdXJlIFBhZ2UgMC4KICAqICAgICAgICAgICAgICAgICAgICAgIEZpeGVkIHRoZSB2YWx1ZSBmb3IgTVBJX1NBU19JT1VOSVQxX0NPTlRST0xfREVWX1NBVEFfU1VQUE9SVC4KKyAqICAwOC0wMy0wNSAgMDEuMDUuMTAgIFJlbW92ZWQgSVNEYXRhU2NydWJSYXRlIGFuZCBJU1Jlc3luY1JhdGUgZnJvbQorICogICAgICAgICAgICAgICAgICAgICAgTWFudWZhY3R1cmluZyBQYWdlIDQuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfSU9VTklUUEFHRTFfU0FUQV9XUklURV9DQUNIRV9ESVNBQkxFIGJpdC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE51bURldnNQZXJFbmNsb3N1cmUgZmllbGQgdG8gU0FTIElPIFVuaXQgcGFnZSAyLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTVBJX1NBU19JT1VOSVQyX0ZMQUdTX0hPU1RfQVNTSUdORURfUEhZU19NQVAKKyAqICAgICAgICAgICAgICAgICAgICAgIGRlZmluZS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIEVuY2xvc3VyZUhhbmRsZSBmaWVsZCB0byBTQVMgRXhwYW5kZXIgcGFnZSAwLgorICogICAgICAgICAgICAgICAgICAgICAgUmVtb3ZlZCByZWR1bmRhbnQgTnVtVGFibGVFbnRyaWVzUHJvZyBmaWVsZCBmcm9tIFNBUworICogICAgICAgICAgICAgICAgICAgICAgRXhwYW5kZXIgUGFnZSAxLgorICogIDA4LTMwLTA1ICAwMS4wNS4xMSAgQWRkZWQgRGV2aWNlSUQgZm9yIEZDOTQ5RSBhbmQgY2hhbmdlZCB0aGUgRGV2aWNlSUQgZm9yCisgKiAgICAgICAgICAgICAgICAgICAgICBTQVMxMDc4LgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbW9yZSBkZWZpbmVzIGZvciBNYW51ZmFjdHVyaW5nIFBhZ2UgNCBGbGFncyBmaWVsZC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIG1vcmUgZGVmaW5lcyBmb3IgSU9DU2V0dGluZ3MgYW5kIGFkZGVkCisgKiAgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlclNwaW51cCBmaWVsZCB0byBCaW9zIFBhZ2UgMS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIHBvc3Rwb25lIFNBVEEgSW5pdCBiaXQgdG8gU0FTIElPIFVuaXQgUGFnZSAxCisgKiAgICAgICAgICAgICAgICAgICAgICBDb250cm9sRmxhZ3MuCisgKiAgICAgICAgICAgICAgICAgICAgICBDaGFuZ2VkIExvZ0VudHJ5IGZvcm1hdCBmb3IgTG9nIFBhZ2UgMC4KICAqICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICovCiAKQEAgLTQ5NCw3ICs1MTEsNyB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kgKzYxOSw3IEBACiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTVZvbHVtZVNldHRpbmdzOyAgIC8qIDUwaCAqLwogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAvKiA1NGggKi8KICAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgLyogNThoICovCi0gICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJU0RhdGFTY3J1YlJhdGU7ICAgIC8qIDVDaCAqLwotICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVNSZXN5bmNSYXRlOyAgICAgICAvKiA1RGggKi8KLSAgICBVMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNTsgICAgICAgICAgLyogNUVoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDU7ICAgICAgICAgIC8qIDVDaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU1FRGF0YVNjcnViUmF0ZTsgICAvKiA2MGggKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElNRVJlc3luY1JhdGU7ICAgICAgLyogNjFoICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDY7ICAgICAgICAgIC8qIDYyaCAqLwpAQCAtNjE2LDkgKzYzMSwxNCBAQAogfSBDT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzQsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzQsCiAgIE1hbnVmYWN0dXJpbmdQYWdlNF90LCBNUElfUE9JTlRFUiBwTWFudWZhY3R1cmluZ1BhZ2U0X3Q7CiAKLSNkZWZpbmUgTVBJX01BTlVGQUNUVVJJTkc0X1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgKDB4MDIpCisjZGVmaW5lIE1QSV9NQU5VRkFDVFVSSU5HNF9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgICgweDAzKQogCiAvKiBkZWZpbmVzIGZvciB0aGUgRmxhZ3MgZmllbGQgKi8KKyNkZWZpbmUgTVBJX01BTlBBR0U0X0lNRV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjApCisjZGVmaW5lIE1QSV9NQU5QQUdFNF9JTV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwKQorI2RlZmluZSBNUElfTUFOUEFHRTRfSVNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwOCkKKyNkZWZpbmUgTVBJX01BTlBBR0U0X0lSX01PREVQQUdFOF9ESVNBQkxFICAgICAgICAgICAgICAgKDB4MDQpCisjZGVmaW5lIE1QSV9NQU5QQUdFNF9JTV9SRVNZTkNfQ0FDSEVfRU5BQkxFICAgICAgICAgICAgICgweDAyKQogI2RlZmluZSBNUElfTUFOUEFHRTRfSVJfTk9fTUlYX1NBU19TQVRBICAgICAgICAgICAgICAgICAoMHgwMSkKIAogCkBAIC02NjksNyArNjg5LDcgQEAKIH0gQ09ORklHX1BBR0VfSU9fVU5JVF8xLCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfSU9fVU5JVF8xLAogICBJT1VuaXRQYWdlMV90LCBNUElfUE9JTlRFUiBwSU9Vbml0UGFnZTFfdDsKIAotI2RlZmluZSBNUElfSU9VTklUUEFHRTFfUEFHRVZFUlNJT04gICAgICAgICAgICAgICAgICAgICAoMHgwMSkKKyNkZWZpbmUgTVBJX0lPVU5JVFBBR0UxX1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgICAgKDB4MDIpCiAKIC8qIElPIFVuaXQgUGFnZSAxIEZsYWdzIGRlZmluZXMgKi8KICNkZWZpbmUgTVBJX0lPVU5JVFBBR0UxX01VTFRJX0ZVTkNUSU9OICAgICAgICAgICAgICAgICAgKDB4MDAwMDAwMDApCkBAIC02ODEsNyArNzAxLDcgQEAKICNkZWZpbmUgTVBJX0lPVU5JVFBBR0UxX0RJU0FCTEVfSVIgICAgICAgICAgICAgICAgICAgICAgKDB4MDAwMDAwNDApCiAjZGVmaW5lIE1QSV9JT1VOSVRQQUdFMV9GT1JDRV8zMiAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDAwMDgwKQogI2RlZmluZSBNUElfSU9VTklUUEFHRTFfTkFUSVZFX0NPTU1BTkRfUV9ESVNBQkxFICAgICAgICAoMHgwMDAwMDEwMCkKLQorI2RlZmluZSBNUElfSU9VTklUUEFHRTFfU0FUQV9XUklURV9DQUNIRV9ESVNBQkxFICAgICAgICAoMHgwMDAwMDIwMCkKIAogdHlwZWRlZiBzdHJ1Y3QgX01QSV9BREFQVEVSX0lORk8KIHsKQEAgLTk2OCw3ICs5ODgsOCBAQAogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAvKiAwQ2ggKi8KICAgICBVMzIgICAgICAgICAgICAgICAgICAgICBEZXZpY2VTZXR0aW5nczsgICAgICAgICAgICAgLyogMTBoICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgTnVtYmVyT2ZEZXZpY2VzOyAgICAgICAgICAgIC8qIDE0aCAqLwotICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAvKiAxNmggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlclNwaW51cDsgICAgICAgICAgICAgLyogMTZoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQyOyAgICAgICAgICAgICAgICAgIC8qIDE3aCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIElPVGltZW91dEJsb2NrRGV2aWNlc05vblJNOyAvKiAxOGggKi8KICAgICBVMTYgICAgIC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gICAoMHgwOCkKLSNkZWZpbmUgTVBJX1NBU19JT1VOSVQxX01JTl9SQVRFXzNfMCAgICAgICAgICAgICAgICAgICAgKDB4MDkpCisjZGVmaW5lIE1QSV9TQVNfSU9VTklUMV9NQVhfUkFURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAoMHhGMCkKKyNkZWZpbmUgTVBJX1NBU19JT1VOSVQxX01BWF9SQVRFXzFfNSAgICAgICAgICAgICAgICAgICAgICAgICgweDgwKQorI2RlZmluZSBNUElfU0FTX0lPVU5JVDFfTUFYX1JBVEVfM18wICAgICAgICAgICAgICAgICAgICAgICAgKDB4OTApCisjZGVmaW5lIE1QSV9TQVNfSU9VTklUMV9NSU5fUkFURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAoMHgwRikKKyNkZWZpbmUgTVBJX1NBU19JT1VOSVQxX01JTl9SQVRFXzFfNSAgICAgICAgICAgICAgICAgICAgICAgICgweDA4KQorI2RlZmluZSBNUElfU0FTX0lPVU5JVDFfTUlOX1JBVEVfM18wICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDkpCiAKIC8qIHNlZSBtcGlfc2FzLmggZm9yIHZhbHVlcyBmb3IgU0FTIElPIFVuaXQgUGFnZSAxIENvbnRyb2xsZXJQaHlEZXZpY2VJbmZvIHZhbHVlcyAqLwogCkBAIC0yNDE4LDE2ICsyNDUyLDE4IEBACiB0eXBlZGVmIHN0cnVjdCBfQ09ORklHX1BBR0VfU0FTX0lPX1VOSVRfMgogewogICAgIENPTkZJR19FWFRFTkRFRF9QQUdFX0hFQURFUiAgICAgICAgIEhlYWRlcjsgICAgICAgICAgICAgICAgIC8qIDAwaCAqLwotICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDA4aCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE51bURldnNQZXJFbmNsb3N1cmU7ICAgIC8qIDA4aCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDA5aCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgIC8qIDBBaCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1heFBlcnNpc3RlbnRJRHM7ICAgICAgIC8qIDBDaCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE51bVBlcnNpc3RlbnRJRHNVc2VkOyAgIC8qIDBFaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsgICAgICAgICAgICAgICAgIC8qIDEwaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAgICAgICAgICAgIC8qIDExaCAqLwotICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1heE51bVBoeXNpY2FsTWFwcGVkSURzOy8qIDEyaCAqLyAgICAgICAgICAgICAgLyogMTJoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWF4TnVtUGh5c2ljYWxNYXBwZWRJRHM7LyogMTJoICovCiB9IENPTkZJR19QQUdFX1NBU19JT19VTklUXzIsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9TQVNfSU9fVU5JVF8yLAogICBTYXNJT1VuaXRQYWdlMl90LCBNUElfUE9JTlRFUiBwU2FzSU9Vbml0UGFnZTJfdDsKIAotI2RlZmluZSBNUElfU0FTSU9VTklUUEFHRTJfUEFHRVZFUlNJT04gICAgICAoMHgwNCkKKyNkZWZpbmUgTVBJX1NBU0lPVU5JVFBBR0UyX1BBR0VWRVJTSU9OICAgICAgKDB4MDUpCiAKIC8qIHZhbHVlcyBmb3IgU0FTIElPIFVuaXQgUGFnZSAyIFN0YXR1cyBmaWVsZCAqLwogI2RlZmluZSBNUElfU0FTX0lPVU5JVDJfU1RBVFVTX0RJU0FCTEVEX1BFUlNJU1RFTlRfTUFQUElOR1MgKDB4MDIpCkBAIC0yNDQxLDYgKzI0NzcsNyBAQAogI2RlZmluZSBNUElfU0FTX0lPVU5JVDJfRkxBR1NfTk9fUEhZU19NQVAgICAgICAgICAgICAgICAgICAgKDB4MDApCiAjZGVmaW5lIE1QSV9TQVNfSU9VTklUMl9GTEFHU19ESVJFQ1RfQVRUQUNIX1BIWVNfTUFQICAgICAgICAoMHgwMSkKICNkZWZpbmUgTVBJX1NBU19JT1VOSVQyX0ZMQUdTX0VOQ0xPU1VSRV9TTE9UX1BIWVNfTUFQICAgICAgICgweDAyKQorI2RlZmluZSBNUElfU0FTX0lPVU5JVDJfRkxBR1NfSE9TVF9BU1NJR05FRF9QSFlTX01BUCAgICAgICAgKDB4MDcpCiAKICNkZWZpbmUgTVBJX1NBU19JT1VOSVQyX0ZMQUdTX1JFU0VSVkVfSURfMF9GT1JfQk9PVCAgICAgICAgICgweDEwKQogI2RlZmluZSBNUElfU0FTX0lPVU5JVDJfRkxBR1NfREFfU1RBUlRJTkdfU0xPVCAgICAgICAgICAgICAgKDB4MjApCkBAIC0yNDczLDcgKzI1MTAsNyBAQAogICAgIENPTkZJR19FWFRFTkRFRF9QQUdFX0hFQURFUiAgICAgICAgIEhlYWRlcjsgICAgICAgICAgICAgICAgIC8qIDAwaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBoeXNpY2FsUG9ydDsgICAgICAgICAgIC8qIDA4aCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgIC8qIDA5aCAqLwotICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgIC8qIDBBaCAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuY2xvc3VyZUhhbmRsZTsgICAgICAgIC8qIDBBaCAqLwogICAgIFU2NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNBU0FkZHJlc3M7ICAgICAgICAgICAgIC8qIDBDaCAqLwogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERpc2NvdmVyeVN0YXR1czsgICAgICAgIC8qIDE0aCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERldkhhbmRsZTsgICAgICAgICAgICAgIC8qIDE4aCAqLwpAQCAtMjQ4Nyw3ICsyNTI0LDcgQEAKIH0gQ09ORklHX1BBR0VfU0FTX0VYUEFOREVSXzAsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9TQVNfRVhQQU5ERVJfMCwKICAgU2FzRXhwYW5kZXJQYWdlMF90LCBNUElfUE9JTlRFUiBwU2FzRXhwYW5kZXJQYWdlMF90OwogCi0jZGVmaW5lIE1QSV9TQVNFWFBBTkRFUjBfUEFHRVZFUlNJT04gICAgICAgICgweDAyKQorI2RlZmluZSBNUElfU0FTRVhQQU5ERVIwX1BBR0VWRVJTSU9OICAgICAgICAoMHgwMykKIAogLyogdmFsdWVzIGZvciBTQVMgRXhwYW5kZXIgUGFnZSAwIERpc2NvdmVyeVN0YXR1cyBmaWVsZCAqLwogI2RlZmluZSBNUElfU0FTX0VYUEFOREVSMF9EU19MT09QX0RFVEVDVEVEICAgICAgICAgICAgICAoMHgwMDAwMDAwMSkKQEAgLTI1MjcsOSArMjU2NCw5IEBACiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIE5lZ290aWF0ZWRMaW5rUmF0ZTsgICAgIC8qIDFGaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICBQaHlJZGVudGlmaWVyOyAgICAgICAgICAvKiAyMGggKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgQXR0YWNoZWRQaHlJZGVudGlmaWVyOyAgLyogMjFoICovCi0gICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIE51bVRhYmxlRW50cmllc1Byb2c7ICAgIC8qIDIyaCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDM7ICAgICAgICAgICAgICAvKiAyMmggKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgRGlzY292ZXJ5SW5mbzsgICAgICAgICAgLyogMjNoICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMzsgICAgICAgICAgICAgIC8qIDI0aCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgICAgICAvKiAyNGggKi8KIH0gQ09ORklHX1BBR0VfU0FTX0VYUEFOREVSXzEsIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9TQVNfRVhQQU5ERVJfMSwKICAgU2FzRXhwYW5kZXJQYWdlMV90LCBNUElfUE9JTlRFUiBwU2FzRXhwYW5kZXJQYWdlMV90OwogCkBAIC0yNzY2LDE2ICsyODAzLDE1IEBACiAjZGVmaW5lIE1QSV9MT0dfMF9OVU1fTE9HX0VOVFJJRVMgICAgICAgICgxKQogI2VuZGlmCiAKLSNkZWZpbmUgTVBJX0xPR18wX0xPR19EQVRBX0xFTkdUSCAgICAgICAgKDIwKQorI2RlZmluZSBNUElfTE9HXzBfTE9HX0RBVEFfTEVOR1RIICAgICAgICAoMHgxQykKIAogdHlwZWRlZiBzdHJ1Y3QgX01QSV9MT0dfMF9FTlRSWQogewotICAgIFU2NCAgICAgICAgIFdXSUQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDAwaCAqLwotICAgIFUzMiAgICAgICAgIFRpbWVTdGFtcDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDA4aCAqLwotICAgIFUzMiAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDBDaCAqLwotICAgIFUxNiAgICAgICAgIExvZ1NlcXVlbmNlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIDEwaCAqLwotICAgIFUxNiAgICAgICAgIExvZ0VudHJ5UXVhbGlmaWVyOyAgICAgICAgICAgICAgICAgIC8qIDEyaCAqLwotICAgIFU4ICAgICAgICAgIExvZ0RhdGFbTVBJX0xPR18wX0xPR19EQVRBX0xFTkdUSF07IC8qIDE0aCAqLworICAgIFUzMiAgICAgICAgIFRpbWVTdGFtcDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFUzMiAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDA0aCAqLworICAgIFUxNiAgICAgICAgIExvZ1NlcXVlbmNlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIDA4aCAqLworICAgIFUxNiAgICAgICAgIExvZ0VudHJ5UXVhbGlmaWVyOyAgICAgICAgICAgICAgICAgIC8qIDBBaCAqLworICAgIFU4ICAgICAgICAgIExvZ0RhdGFbTVBJX0xPR18wX0xPR19EQVRBX0xFTkdUSF07IC8qIDBDaCAqLwogfSBNUElfTE9HXzBfRU5UUlksIE1QSV9QT0lOVEVSIFBUUl9NUElfTE9HXzBfRU5UUlksCiAgIE1waUxvZzBFbnRyeV90LCBNUElfUE9JTlRFUiBwTXBpTG9nMEVudHJ5X3Q7CiAKQEAgLTI3OTQsNyArMjgzMCw3IEBACiB9IENPTkZJR19QQUdFX0xPR18wLCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfTE9HXzAsCiAgIExvZ1BhZ2UwX3QsIE1QSV9QT0lOVEVSIHBMb2dQYWdlMF90OwogCi0jZGVmaW5lIE1QSV9MT0dfMF9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUElfTE9HXzBfUEFHRVZFUlNJT04gICAg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uaCAgICAgICAgICAgICAwMS4wNS4wOSAgICAgICAgICAgIDAxLjA1LjA4Ci0gbXBpX2luaXQuaCAgICAgICAgICAgICAwMS4wNS4wNSAgICAgICAgICAgIDAxLjA1LjA0Ci0gbXBpX3RhcmcuaCAgICAgICAgICAgICAwMS4wNS4wNSAgICAgICAgICAgIDAxLjA1LjA0CisgbXBpLmggICAgICAgICAgICAgICAgICAwMS4wNS4xMCAgICAgICAgICAgIDAxLjA1LjA5CisgbXBpX2lvYy5oICAgICAgICAgICAgICAwMS4wNS4xMCAgICAgICAgICAgIDAxLjA1LjA5CisgbXBpX2NuZmcuaCAgICAgICAgICAgICAwMS4wNS4xMSAgICAgICAgICAgIDAxLjA1LjEwCisgbXBpX2luaXQuaCAgICAgICAgICAgICAwMS4wNS4wNiAgICAgICAgICAgIDAxLjA1LjA2CisgbXBpX3RhcmcuaCAgICAgICAgICAgICAwMS4wNS4wNSAgICAgICAgICAgIDAxLjA1LjA1CiAgbXBpX2ZjLmggICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCiAgbXBpX2xhbi5oICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCiAgbXBpX3JhaWQuaCAgICAgICAgICAgICAwMS4wNS4wMiAgICAgICAgICAgIDAxLjA1LjAyCiAgbXBpX3Rvb2wuaCAgICAgICAgICAgICAwMS4wNS4wMyAgICAgICAgICAgIDAxLjA1LjAzCiAgbXBpX2luYi5oICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCi0gbXBpX3Nhcy5oICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCi0gbXBpX3R5cGUuaCAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCi0gbXBpX2hpc3RvcnkudHh0ICAgICAgICAwMS4wNS4wOSAgICAgICAgICAgIDAxLjA1LjA5CisgbXBpX3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gICAgICAgICAgICAgQWRkZWQgTnVtRGV2c1BlckVuY2xvc3VyZSBmaWVsZCB0byBTQVMgSU8gVW5pdCBwYWdlIDIuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfU0FTX0lPVU5JVDJfRkxBR1NfSE9TVF9BU1NJR05FRF9QSFlTX01BUAorICogICAgICAgICAgICAgICAgICAgICAgZGVmaW5lLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgRW5jbG9zdXJlSGFuZGxlIGZpZWxkIHRvIFNBUyBFeHBhbmRlciBwYWdlIDAuCisgKiAgICAgICAgICAgICAgICAgICAgICBSZW1vdmVkIHJlZHVuZGFudCBOdW1UYWJsZUVudHJpZXNQcm9nIGZpZWxkIGZyb20gU0FTCisgKiAgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlciBQYWdlIDEuCisgKiAgMDgtMzAtMDUgIDAxLjA1LjExICBBZGRlZCBEZXZpY2VJRCBmb3IgRkM5NDlFIGFuZCBjaGFuZ2VkIHRoZSBEZXZpY2VJRCBmb3IKKyAqICAgICAgICAgICAgICAgICAgICAgIFNBUzEwNzguCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBtb3JlIGRlZmluZXMgZm9yIE1hbnVmYWN0dXJpbmcgUGFnZSA0IEZsYWdzIGZpZWxkLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbW9yZSBkZWZpbmVzIGZvciBJT0NTZXR0aW5ncyBhbmQgYWRkZWQKKyAqICAgICAgICAgICAgICAgICAgICAgIEV4cGFuZGVyU3BpbnVwIGZpZWxkIHRvIEJpb3MgUGFnZSAxLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgcG9zdHBvbmUgU0FUQSBJbml0IGJpdCB0byBTQVMgSU8gVW5pdCBQYWdlIDEKKyAqICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xGbGFncy4KKyAqICAgICAgICAgICAgICAgICAgICAgIENoYW5nZWQgTG9nRW50cnkgZm9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lRSWSBpbiBtcGlfY25mZy5oICovCisjZGVmaW5lIE1QSV9FVkVOVF9EQVRBX0xPR19FTlRSWV9EQVRBX0xFTkdUSCAgICAoMHgxQykKK3R5cGVkZWYgc3RydWN0IF9FVkVOVF9EQVRBX0xPR19FTlRSWQoreworICAgIFUzMiAgICAgICAgIFRpbWVTdGFtcDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFUzMiAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDA0aCAqLworICAgIFUxNiAgICAgICAgIExvZ1NlcXVlbmNlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIDA4aCAqLworICAgIFUxNiAgICAgICAgIExvZ0VudHJ5UXVhbGlmaWVyOyAgICAgICAgICAgICAgICAgIC8qIDBBaCAqLworICAgIFU4ICAgICAgICAgIExvZ0RhdGFbTVBJX0VWRU5UX0RBVEFfTE9HX0VOVFJZX0RBVEFfTEVOR1RIXTsgLyogMENoICovCit9IEVWRU5UX0RBVEFfTE9HX0VOVFJZLCBNUElfUE9JTlRFUiBQVFJfRVZFTlRfREFUQV9MT0dfRU5UUlksCisgIE1waUV2ZW50RGF0YUxvZ0VudHJ5X3QsIE1QSV9QT0lOVEVSIHBNcGlFdmVudERhdGFMb2dFbnRyeV90OworCit0eXBlZGVmIHN0cnVjdCBfRVZFTlRfREFUQV9MT0dfRU5UUllfQURERUQKK3sKKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBMb2dTZXF1ZW5jZTsgICAgICAgICAgICAvKiAwMGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDE7ICAgICAgICAgICAgICAvKiAwMmggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgICAgICAvKiAwNGggKi8KKyAgICBFVkVOVF9EQVRBX0xPR19FTlRSWSAgICBMb2dFbnRyeTsgICAgICAgICAgICAgICAvKi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VNZTkNfVVBEQVRFCit7CisgICAgVTggICAgICAgICAgICAgICAgICAgICAgVm9sdW1lSUQ7ICAgICAgICAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIFZvbHVtZUJ1czsgICAgICAgICAgICAgICAgICAvKiAwMWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXN5bmNDb21wbGV0ZTsgICAgICAgICAgICAgLyogMDJoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgIC8qIDAzaCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMjsgICAgICAgICAgICAgICAgICAvKiAwNGggKi8KK30gTVBJX0VWRU5UX0RBVEFfSVJfUkVTWU5DX1VQREFURSwKKyAgTVBJX1BPSU5URVIgUFRSX01QSV9FVkVOVF9EQVRBX0lSX1JFU1lOQ19VUERBVEUsCisgIE1waUV2ZW50RGF0YUlyUmVzeW5jVXBkYXRlX3QsIE1QSV9QT0lOVEVSIHBNcGlFdmVudERhdGFJclJlc3luY1VwZGF0ZV90OworCisvKiBNUEkgSVIyIEV2ZW50IGRhdGEgKi8KKworLyogTVBJX0xEX1NUQVRFIG9yIE1QSV9QRF9TVEFURSAqLwordHlwZWRlZiBzdHJ1Y3QgX0lSMl9TVEFURV9DSEFOR0VECit7CisgICAgVTE2ICAgICAgICAgICAgICAgICBQcmV2aW91c1N0YXRlOyAgLyogMDBoICovCisgICAgVTE2ICAgICAgICAgICAgICAgICBOZXdTdGF0ZTsgICAgICAgLyogMDJoICovCit9IElSMl9TVEFURV9DSEFOR0VELCBNUElfUE9JTlRFUiBQVFJfSVIyX1NUQVRFX0NIQU5HRUQ7CisKK3R5cGVkZWYgc3RydWN0IF9JUjJfUERfSU5GTworeworICAgIFUxNiAgICAgICAgICAgICAgICAgRGV2aWNlSGFuZGxlOyAgICAgICAgICAgLyogMDBoICovCisgICAgVTggICAgICAgICAgICAgICAgICBUcnVuY0VuY2xvc3VyZUhhbmRsZTsgICAvKiAwMmggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgIFRydW5jYXRlZFNsb3Q7ICAgICAgICAgIC8qIDAzaCAqLworfSBJUjJfUERfSU5GTywgTVBJX1BPSU5URVIgUFRSX0lSMl9QRF9JTkZPOworCit0eXBlZGVmIHVuaW9uIF9NUElfSVIyX1JDX0VWRU5UX0RBVEEKK3sKKyAgICBJUjJfU1RBVEVfQ0hBTkdFRCAgIFN0YXRlQ2hhbmdlZDsKKyAgICBVMzIgICAgICAgICAgICAgICAgIExiYTsKKyAgICBJUjJfUERfSU5GTyAgICAgICAgIFBkSW5mbzsKK30gTVBJX0lSMl9SQ19FVkVOVF9EQVRBLCBNUElfUE9JTlRFUiBQVFJfTVBJX0lSMl9SQ19FVkVOVF9EQVRBOworCit0eXBlZGVmIHN0cnVjdCBfTVBJX0VWRU5UX0RBVEFfSVIyCit7CisgICAgVTggICAgICAgICAgICAgICAgICAgICAgVGFyZ2V0SUQ7ICAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIEJ1czsgICAgICAgICAgICAgICAgICAvKiAwMWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZWFzb25Db2RlOyAgICAgICAgICAgLyogMDJoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgUGh5c0Rpc2tOdW07ICAgICAgICAgIC8qIDAzaCAqLworICAgIE1QSV9JUjJfUkNfRVZFTlRfREFUQSAgIElSMkV2ZW50RGF0YTsgICAgICAgICAvKiAwNGggKi8KK30gTVBJX0VWRU5UX0RBVEFfSVIyLCBNUElfUE9JTlRFUiBQVFJfTVBJX0VWRU5UX0RBVEFfSVIyLAorICBNcGlFdmVudERhdGFJUjJfdCwgTVBJX1BPSU5URVIgcE1waUV2ZW50RGF0YUlSMl90OworCisvKiBNUEkgSVIyIEV2ZW50IGRhdGEgUmVhc29uQ29kZSB2YWx1ZXMgKi8KKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19MRF9TVEFURV9DSEFOR0VEICAgICAgICAgICAoMHgwMSkKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19QRF9TVEFURV9DSEFOR0VEICAgICAgICAgICAoMHgwMikKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19CQURfQkxPQ0tfVEFCTEVfRlVMTCAgICAgICAoMHgwMykKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19QRF9JTlNFUlRFRCAgICAgICAgICAgICAgICAoMHgwNCkKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19QRF9SRU1PVkVEICAgICAgICAgICAgICAgICAoMHgwNSkKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19GT1JFSUdOX0NGR19ERVRFQ1RFRCAgICAgICAoMHgwNikKKyNkZWZpbmUgTVBJX0VWRU5UX0lSMl9SQ19SRUJVSUxEX01FRElVTV9FUlJPUiAgICAgICAoMHgwNykKKworLyogZGVmaW5lcyBmb3IgbG9naWNhbCBkaXNrIHN0YXRlcyAqLworI2RlZmluZSBNUElfTERfU1RBVEVfT1BUSU1BTCAgICAgICAgICAgICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUElfTERfU1RBVEVfREVHUkFERUQgICAgICAgICAgICAgICAgICAgICAgICgweDAxKQorI2RlZmluZSBNUElfTERfU1RBVEVfRkFJTEVEICAgICAgICAgICAgICAgICAgICAgICAgICgweDAyKQorI2RlZmluZSBNUElfTERfU1RBVEVfTUlTU0lORyAgICAgICAgICAgICAgICAgICAgICAgICgweDAzKQorI2RlZmluZSBNUElfTERfU1RBVEVfT0ZGTElORSAgICAgICAgICAgICAgICAgICAgICAgICgweDA0KQorCisvKiBkZWZpbmVzIGZvciBwaHlzaWNhbCBkaXNrIHN0YXRlcyAqLworI2RlZmluZSBNUElfUERfU1RBVEVfT05MSU5FICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUElfUERfU1RBVEVfTUlTU0lORyAgICAgICAgICAgICAgICAgICAgICAgICgweDAxKQorI2RlZmluZSBNUElfUERfU1RBVEVfTk9UX0NPTVBBVElCTEUgICAgICAgICAgICAgICAgICgweDAyKQorI2RlZmluZSBNUElfUERfU1RBVEVfRkFJTEVEICAgICAgICAgICAgICAgICAgICAgICAgICgweDAzKQorI2RlZmluZSBNUElfUERfU1RBVEVfSU5JVElBTElaSU5HICAgICAgICAgICAgICAgICAgICgweDA0KQorI2RlZmluZSBNUElfUERfU1RBVEVfT0ZGTElORV9BVF9IT1NUX1JFUVVFU1QgICAgICAgICgweDA1KQorI2RlZmluZSBNUElfUERfU1RBVEVfRkFJTEVEX0FUX0hPU1RfUkVRVUVTVCAgICAgICAgICgweDA2KQorI2RlZmluZSBNUElfUERfU1RBVEVfT0ZGTElORV9GT1JfQU5PVEhFUl9SRUFTT04gICAgICgweEZGKQorCiAvKiBNUEkgTGluayBTdGF0dXMgQ2hhbmdlIEV2ZW50IGRhdGEgKi8KIAogdHlwZWRlZiBzdHJ1Y3QgX0VWRU5UX0RBVEFfTElOS19TVEFUVVMKQEAgLTY2MCw2ICs3NjUsMjAgQEAKICNkZWZpbmUgTVBJX0VWRU5UX1NBU19QTFNfTFJfUkFURV8xXzUgICAgICAgICAgICAgICAgICAgICAgICgweDA4KQogI2RlZmluZSBNUElfRVZFTlRfU0FTX1BMU19MUl9SQVRFXzNfMCAgICAgICAgICAgICAgICAgICAgICAgKDB4MDkpCiAKKy8qIFNBUyBEaXNjb3ZlcnkgRXZlbnQgZGF0YSAqLworCit0eXBlZGVmIHN0cnVjdCBfRVZFTlRfREFUQV9TQVNfRElTQ09WRVJZCit7CisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgRGlzY292ZXJ5U3RhdHVzOyAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAg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Zm9fdCBlbnVtCisgKgorICogVGhlc2UgMzIgYml0IHZhbHVlcyBhcmUgdXNlZCBpbiB0aGUgSU9DTG9nSW5mbyBmaWVsZCBvZiB0aGUgTVBJIHJlcGx5CisgKiBtZXNzYWdlcy4KKyAqIFRoZSB2YWx1ZSBpcyAweGFiY2NjY2NjIHdoZXJlCisgKiAgICAgICAgICBhID0gVGhlIHR5cGUgb2YgbG9nIGluZm8gYXMgcGVyIHRoZSBNUEkgc3BlYy4gU2luY2UgdGhlc2UgY29kZXMgYXJlCisgKiAgICAgICAgICAgICAgYWxsIGZvciBGaWJyZSBDaGFubmVsIHRoaXMgdmFsdWUgd2lsbCBhbHdheXMgYmUgMi4KKyAqICAgICAgICAgIGIgPSBTcGVjaWZpZXMgYSBzdWJjbGFzcyBvZiB0aGUgZmlybXdhcmUgd2hlcmUKKyAqICAgICAgICAgICAgICAgICAgMCA9IEZDUCBJbml0aWF0b3IKKyAqICAgICAgICAgICAgICAgICAgMSA9IEZDUCBUYXJnZXQKKyAqICAgICAgICAgICAgICAgICAgMiA9IExBTgorICogICAgICAgICAgICAgICAgICAzID0gTVBJIE1lc3NhZ2UgTGF5ZXIKKyAqICAgICAgICAgICAgICAgICAgNCA9IEZDIExpbmsKKyAqICAgICAgICAgICAgICAgICAgNSA9IENvbnRleHQgTWFuYWdlcgorICogICAgICAgICAgICAgICAgICA2ID0gSW52YWxpZCBGaWVsZCBPZmZzZXQKKyAqICAgICAgICAgICAgICAgICAgNyA9IFN0YXRlIENoYW5nZSBJbmZvCisgKiAgICAgICAgICAgICAgICAgIGFsbCBvdGhlcnMgYXJlIHJlc2VydmVkIGZvciBmdXR1cmUgdXNlCisgKiAgICAgICAgICBjID0gQSBzcGVjaWZpYyB2YWx1ZSB3aXRoaW4gdGhlIHN1YmNsYXNzLgorICoKKyAqIE5PVEU6IEFueSBuZXcgdmFsdWVzIHNob3VsZCBiZSBhZGRlZCB0byB0aGUgZW5kIG9mIGVhY2ggc3ViY2xhc3Mgc28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nVsbAorKysgYi9kcml2ZXJzL21lc3NhZ2UvZnVzaW9uL2xzaS9tcGlfbG9nX3Nhcy5oCkBAIC0wLDAgKzEsMTYyIEBACisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICBDb3B5cmlnaHQgMjAwMyBMU0kgTG9naWMgQ29ycG9yYXRpb24uICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICBUaGlzIGZpbGUgaXMgY29uZmlkZW50aWFsIGFuZCBhIHRyYWRlIHNlY3JldCBvZiBMU0kgTG9naWMuICBUaGUgICAgICAgICoKKyAqICByZWNlaXB0IG9mIG9yIHBvc3Nlc3Npb24gb2YgdGhpcyBmaWxlIGRvZXMgbm90IGNvbnZleSBhbnkgcmlnaHRzIHRvICAgICoKKyAqICByZXByb2R1Y2Ugb3IgZGlzY2xvc2UgaXRzIGNvbnRlbnRzIG9yIHRvIG1hbnVmYWN0dXJlLCB1c2UsIG9yIHNlbGwgICAgICoKKyAqICBhbnl0aGluZyBpdCBtYXkgZGVzY3JpYmUsIGluIHdob2xlLCBvciBpbiBwYXJ0LCB3aXRob3V0IHRoZSBzcGVjaWZpYyAgICoKKyAqICB3cml0dGVuIGNvbnNlbnQgb2YgTFNJIExvZ2ljIENvcnBvcmF0aW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiAgICAgICAgICAgTmFtZTogIGlvcGlJb2NMb2dJbmZvLmgKKyAqICAgICAgICAgIFRpdGxlOiAgU0FTIEZpcm13YXJlIElPUCBJbnRlcmZhY2UgSU9DIExvZyBJbmZvIERlZmluaXRpb25zCisgKiAgICAgUHJvZ3JhbW1lcjogIEd1eSBLZW5kYWxsCisgKiAgQ3JlYXRpb24gRGF0ZTogIFNlcHRlbWJlciAyNCwgMjAwMworICoKKyAqICBWZXJzaW9uIEhpc3RvcnkKKyAqICAtLS0tLS0tLS0tLS0tLS0KKyAqCisgKiAgTGFzdCBVcGRhdGVkCisgKiAgLS0tLS0tLS0tLS0tLQorICogIFZlcnNpb24gICAgICAgICAldmVyc2lvbjogMjIgJQorICogIERhdGUgVXBkYXRlZCAgICAlZGF0ZV9tb2RpZmllZDogJQorICogIFByb2dyYW1tZXIgICAgICAlY3JlYXRlZF9ieTogbnBlcnVjY2EgJQorICoKKyAqICBEYXRlICAgICAgV2hvICAgRGVzY3JpcHRpb24KKyAqICAtLS0tLS0tLSAgLS0tICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICogIDA5LzI0LzAzICBHV0sgICBJbml0aWFsIHZlcnNpb24KKyAqCisgKgorICogRGVzY3JpcHRpb24KKyAqIC0tLS0tLS0tLS0tLQorICogVGhpcyBpbmNsdWRlIGZpbGUgY29udGFpbnMgU0FTIGZpcm13YXJlIGludGVyZmFjZSBJT0MgTG9nIEluZm8gY29kZXMKKyAqCisgKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqLworCisjaWZuZGVmIElPUElfSU9DTE9HSU5GT19IX0lOQ0xVREVECisjZGVmaW5lIElPUElfSU9DTE9HSU5GT19IX0lOQ0xVREVECisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgSU9DIExPR0lORk8gZGVmaW5lcywgMHgwMDAwMDAwMCAtIDB4MEZGRkZGRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qICBGb3JtYXQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogICAgICBCaXRzIDMxLTI4OiBNUElfSU9DTE9HSU5GT19UWVBFX1NBUyAoMykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAgICAgIEJpdHMgMjctMjQ6IElPQ19MT0dJTkZPX09SSUdJTkFUT1I6IDA9SU9QLCAxPVBMLCAyPUlSICAgICAgICAgICAgICAgKi8KKy8qICAgICAgQml0cyAyMy0xNjogTE9HSU5GT19DT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogICAgICBCaXRzIDE1LTA6ICBMT0dJTkZPX0NPREUgU3BlY2lmaWMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBJT0NfTE9HSU5GT19PUklHSU5BVE9SIGRlZmluZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBJT0NfTE9HSU5GT19PUklHSU5BVE9SX0lPUCAgICAgICAgICAgICAgICAgICAgICAoMHgwMDAwMDAwMCkKKyNkZWZpbmUgSU9DX0xPR0lORk9fT1JJR0lOQVRPUl9QTCAgICAgICAgICAgICAgICAgICAgICAgKDB4MDEwMDAwMDApCisjZGVmaW5lIElPQ19MT0dJTkZPX09SSUdJTkFUT1JfSVIgICAgICAgICAgICAgICAgICAgICAgICgweDAyMDAwMDAwKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIExPR0lORk9fQ09ERSBkZWZpbmVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIElPQ19MT0dJTkZPX0NPREVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwRkYwMDAwKQorI2RlZmluZSBJT0NfTE9HSU5GT19DT0RFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgICAoMTYpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogSU9QIExPR0lORk9fQ09ERSBkZWZpbmVzLCB2YWxpZCBpZiBJT0NfTE9HSU5GT19PUklHSU5BVE9SID0gSU9QICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgSU9QX0xPR0lORk9fQ09ERV9JTlZBTElEX1NBU19BRERSRVNTICAgICAgICAgICAgKDB4MDAwMTAwMDApCisjZGVmaW5lIElPUF9MT0dJTkZPX0NPREVfVU5VU0VEMiAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDIwMDAwKQorI2R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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBQTCBMT0dJTkZPX0NPREUgZGVmaW5lcywgdmFsaWQgaWYgSU9DX0xPR0lORk9fT1JJR0lOQVRPUiA9IFBMICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfT1BFTl9GQUlMVVJFICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDAwMTAwMDApCisjZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9JTlZBTElEX1NHTCAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDAyMDAwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX1dST05HX1JFTF9PRkZfT1JfRlJBTUVfTEVOR1RIICAgICAgICgweDAwMDMwMDAwKQorI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfRlJBTUVfWEZFUl9FUlJPUiAgICAgICAgICAgICAgICAgICAgKDB4MDAwNDAwMDApCisjZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9UWF9GTV9DT05ORUNURURfTE9XICAgICAgICAgICAgICAgICAoMHgwMDA1MDAwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX1NBVEFfTk9OX05DUV9SV19FUlJfQklUX1NFVCAgICAgICAgICgweDAwMDYwMDAwKQorI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfU0FUQV9SRUFEX0xPR19SRUNFSVZFX0RBVEFfRVJSICAgICAgKDB4MDAwNzAwMDApCisjZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9TQVRBX05DUV9GQUlMX0FMTF9DTURTX0FGVFJfRVJSICAgICAoMHgwMDA4MDAwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX1NBVEFfRVJSX0lOX1JDVl9TRVRfREVWX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KiBObyBEZXZpY2UgRm91bmQgKi8KKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0NPTkZJR19JTlZBTElEX1BBR0VfRk9STSAgICAgICAgICAgICgweDAwMEYwNTAwKSAvKiBJbnZhbGlkIEZPUk0gKi8KKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0NPTkZJR19JTlZBTElEX1BBR0VfUEhZICAgICAgICAgICAgICgweDAwMEYwNjAwKSAvKiBJbnZhbGlkIFBoeSAqLworI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfQ09ORklHX0lOVkFMSURfUEFHRV9OT19PV05FUiAgICAgICAgKDB4MDAwRjA3MDApIC8qIE5vIE93bmVyIEZvdW5kICovCisjZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9EU0NWUllfU0FUQV9JTklUX1RJTUVPVVQgICAgICAgICAgICAoMHgwMDEwMDAwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX1JFU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMTEwMDAwKQorI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfQUJPUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDAxMjAwMDApCisjZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9JT19OT1RfWUVUX0VYRUNVVEVEICAgICAgICAgICAgICAgICAoMHgwMDEzMDAwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0lPX0VYRUNVVEVEICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMTQwMDAwKQorI2RlZmluZSBQTF9MT0dJTkZPX1NVQl9DT0RFX09QRU5fRkFJTFVSRSAgICAgICAgICAgICAgICAgICAgKDB4MDAwMDAxMDApCisjZGVmaW5lIFBMX0xPR0lORk9fU1VCX0NPREVfSU5WQUxJRF9TR0wgICAgICAgICAgICAgICAgICAgICAoMHgwMDAwMDIwMCkKKyNkZWZpbmUgUExfTE9HSU5GT19TVUJfQ09ERV9XUk9OR19S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Njc2kgc3RhdHVzICovCisjZGVmaW5lIFBMX0xPR0lORk9fREFfU0VQX0NIS1NVTV9FUlJPUl9BRlRFUl9TVE9QICAgICAgICAgICAoMHgwMDIwMDEwNykgLyogU0VQIHJldHVybmVkIGJhZCBjaGtzdW0gYWZ0ZXIgU1RPUCAqLworI2RlZmluZSBQTF9MT0dJTkZPX0RBX1NFUF9DSEtTVU1fRVJST1JfQUZURVJfU1RPUF9HRVREQVRBICAgKDB4MDAyMDAxMDgpIC8qIFNFUCByZXR1cm5lZCBiYWQgY2hrc3VtIGFmdGVyIFNUT1Agd2hpbGUgZ2V0dGluIGRhdGEqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogSVIgTE9HSU5GT19DT0RFIGRlZmluZXMsIHZhbGlkIGlmIElPQ19MT0dJTkZPX09SSUdJTkFUT1IgPSBJUiAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgSVJfTE9HSU5GT19DT0RFX1VOVVNFRDEgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDAwMTAwMDApCisjZGVmaW5lIElSX0xPR0lORk9fQ09ERV9VTlVTRUQyICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDIwMDAwKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIERlZmluZXMgZm9yIGNvbnZpZW5lbmNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIElPQ19MT0dJT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aW5lIE1QSV9TQVNfREVWSUNFX0lORk9fTFNJX0RFVklDRSAgICAgICAgICAoMHgwMDAwMTAwMCkKICNkZWZpbmUgTVBJX1NBU19ERVZJQ0VfSU5GT19ESVJFQ1RfQVRUQUNIICAgICAgICgweDAwMDAwODAwKQpAQCAtMjEyLDIwICsyMTYsMjYgQEAKICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBUYXJnZXRJRDsgICAgICAgICAgIC8qIDBDaCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIEJ1czsgICAgICAgICAgICAgICAgLyogMERoICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgUGh5TnVtOyAgICAgICAgICAgICAvKiAwRWggKi8KLSAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgIC8qIDBGaCAqLwotICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNTsgICAgICAgICAgLyogMTBoICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgUHJpbUZsYWdzOyAgICAgICAgICAvKiAwRmggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBQcmltaXRpdmU7ICAgICAgICAgIC8qIDEwaCAqLwogICAgIFU2NCAgICAgICAgICAgICAgICAgICAgIFNBU0FkZHJlc3M7ICAgICAgICAgLyogMTRoICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAvKiAxQ2ggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgIC8qIDFDaCAqLwogfSBNU0dfU0FTX0lPVU5JVF9DT05UUk9MX1JFUVVFU1QsIE1QSV9QT0lOVEVSIFBUUl9NU0dfU0FTX0lPVU5JVF9DT05UUk9MX1JFUVVFU1QsCiAgIFNhc0lvVW5pdENvbnRyb2xSZXF1ZXN0X3QsIE1QSV9QT0lOVEVSIHBTYXNJb1VuaXRDb250cm9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YX1JFQURZX1dBSVRfQ09VTlQJMTAwMDAwCisKKworI2lmZGVmIENPTkZJR19NVERfUEFSVElUSU9OUworI2RlZmluZQltdGRfaGFzX3BhcnRpdGlvbnMoKQkoMSkKKyNlbHNlCisjZGVmaW5lCW10ZF9oYXNfcGFydGl0aW9ucygpCSgwKQorI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdHJ1Y3QgbTI1cCB7CisJc3RydWN0IHNwaV9kZXZpY2UJKnNwaTsKKwlzdHJ1Y3Qgc2VtYXBob3JlCWxvY2s7CisJc3RydWN0IG10ZF9pbmZvCQltdGQ7CisJdW5zaWduZWQJCXBhcnRpdGlvbmVkOworCXU4CQkJY29tbWFuZFs0XTsKK307CisKK3N0YXRpYyBpbmxpbmUgc3RydWN0IG0yNXAgKm10ZF90b19tMjVwKHN0cnVjdCBtdGRfaW5mbyAqbXRkKQoreworCXJldHVybiBjb250YWluZXJfb2YobXRkLCBzdHJ1Y3QgbTI1cCwgbXRkKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBJbnRlcm5hbCBoZWxwZXIgZnVuY3Rpb25zCisgKi8KKworLyoKKyAqIFJlYWQgdGhlIHN0YXR1cyByZWdpc3RlciwgcmV0dXJuaW5nIGl0cyB2YWx1ZSBpbiB0aGUgbG9jYXRpb24KKyAqIFJldHVybiB0aGUgc3RhdHVzIHJlZ2lzdGVyIHZhbHVlLgorICogUmV0dXJucyBuZWdhdGl2ZSBpZiBlcnJvciBvY2N1cnJlZC4KKyAqLworc3RhdGljIGludCByZWFkX3NyKHN0cnVjdCBtMjVwICpmbGFzaCkKK3sKKwlzc2l6ZV90IHJldHZhbDsKKwl1OCBjb2RlID0gT1BDT0RFX1JEU1I7CisJdTggdmFsO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gVyAmIE0pKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQlEUFJJTlRLKERSViwgRVJSLCAicGF0dGVybiB0ZXN0IHJlZyAlMDRYIGZhaWxlZDogZ290ICIgXAogCQkJICAgICAgICAiMHglMDhYIGV4cGVjdGVkIDB4JTA4WFxuIiwgICAgICAgICAgICAgICAgICAgIFwKIAkJCSAgICAgICAgRTEwMDBfIyNSLCB2YWx1ZSwgKHRlc3RbcGF0XSAmIFcgJiBNKSk7ICAgICAgICBcCkBAIC03MjYsNyArNzQ1LDcgQEAKIAl1aW50MzJfdCB2YWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAlFMTAwMF9XUklURV9SRUcoJmFkYXB0ZXItPmh3LCBSLCBXICYgTSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAl2YWx1ZSA9IEUxMDAwX1JFQURfUkVHKCZhZGFwdGVyLT5odywgUik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlpZigoVyAmIE0pICE9ICh2YWx1ZSAmIE0pKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWlmICgoVyAmIE0pICE9ICh2YWx1ZSAmIE0pKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlEUFJJTlRLKERSViwgRVJSLCAic2V0L2NoZWNrIHJlZyAlMDRYIHRlc3QgZmFpbGVkOiBnb3QgMHglMDhYICJcCiAJCSAgICAgICAgImV4cGVjdGVkIDB4JTA4WFxuIiwgRTEwMDBfIyNSLCAodmFsdWUgJiBNKSwgKFcgJiBNKSk7IFwKIAkJKmRhdGEgPSAoYWRhcHRlci0+aHcubWFjX3R5cGUgPCBlMTAwMF84MjU0MykgPyAgICAgICAgICAgICAgICAgXApAQCAtNzYyLDcgKzc4MSw3IEBACiAJdmFsdWUgPSAoRTEwMDBf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NPTERfU0hJRlQ7CisgICAgdGN0bCB8PSBjb2xsX2Rpc3QgPDwgRTEwMDBfQ09MRF9TSElGVDsKIAogICAgIEUxMDAwX1dSSVRFX1JFRyhodywgVENUTCwgdGN0bCk7CiAgICAgRTEwMDBfV1JJVEVfRkxVU0goaHcpOwpAQCAtMjk4Miw2ICszMDAzLDggQEAKICAgICAgICAgCiAgICAgICAgIGlmIChody0+bWFjX3R5cGUgPCBlMTAwMF84MjU3MSkgCiAgICAgICAgICAgICBtc2VjX2RlbGF5KDEwKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgdWRlbGF5KDEwMCk7CiAgICAgICAgIAogICAgICAgICBFMTAwMF9XUklURV9SRUcoaHcsIENUUkwsIGN0cmwpOwogICAgICAgICBFMTAwMF9XUklURV9GTFVTSChodyk7CkBAIC0zODgxLDE3ICszOTA0LDE5IEBACiAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX0VFUFJPTTsKICAgICB9CiAKLSAgICAvKiBGTEFTSCByZWFkcyB3aXRob3V0IGFjcXVpcmluZyB0aGUgc2VtYXBob3JlIGFyZSBzYWZlIGluIDgyNTczLWJhc2VkCi0gICAgICogY29udHJvbGxlcnMuCi0gICAgICovCi0gICAgaWYgKChlMTAwMF9pc19vbmJvYXJkX252bV9lZXByb20oaHcpID09IFRSVUUpIHx8Ci0gICAgICAgIChody0+bWFjX3R5cGUgIT0gZTEwMDBfODI1NzMpKSB7Ci0gICAgICAgIC8qIFByZXBhcmUgdGhlIEVFUFJPTSBmb3IgcmVhZGluZyAgKi8KLSAgICAgICAgaWYoZTEwMDBfYWNxdWlyZV9lZXByb20oaHcpICE9IEUxMDAwX1NVQ0NFU1MpCi0gICAgICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9FRVBST007CisgICAgLyogRkxBU0ggcmVhZHMgd2l0aG91dCBhY3F1aXJpbmcgdGhlIHNlbWFwaG9yZSBhcmUgc2FmZSAqLworICAgIGlmIChlMTAwMF9pc19vbmJvYXJkX252bV9lZXByb20oaHcpID09IFRSVUUgJiYKKyAgICBody0+ZWVwcm9tLnVzZV9lZXJkID09IEZBTFNFKSB7CisgICAgICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAvKiBQcmVwYXJlIHRoZSBFRVBST00gZm9yIHJlYWRpbmcgICovCisgICAgICAgICAgICBpZiAoZTEwMDBfYWNxdWlyZV9lZXByb20oaHcpICE9IEUxMDAwX1NVQ0NFU1MpCisgICAgICAgICAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfRUVQUk9NOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KICAgICB9CiAKLSAgICBpZihlZXByb20tPnVzZV9lZXJkID09IFRSVUUpIHsKKyAgICBpZiAoZWVwcm9tLT51c2VfZWVyZCA9PSBUUlVFKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX2VlcHJvbV9lZXJkKGh3LCBvZmZzZXQsIHdvcmRzLCBkYXRhKTsKICAgICAgICAgaWYgKChlMTAwMF9pc19vbmJvYXJkX252bV9lZXByb20oaHcpID09IFRSVUUpIHx8CiAgICAgICAgICAgICAoaHctPm1hY190eXBlICE9IGUxMDAwXzgyNTczKSkKQEAgLTQzOTgsNyArNDQyMyw3IEBACiAgICAgICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9FRVBST007CiAgICAgICAgIH0KIAotCS8qIElmIFNUTSBvcGNvZGUgbG9jYXRlZCBpbiBiaXRzIDE1Ojggb2YgZmxvcCwgcmVzZXQgZmlybXdhcmUgKi8KKyAgICAgICAgLyogSWYgU1RNIG9wY29kZSBsb2NhdGVkIGluIGJpdHMgMTU6OCBvZiBmbG9wLCByZXNldCBmaXJtd2FyZSAqLwogICAgICAgICBpZiAoKGZsb3AgJiAweEZGMDApID09IEUxMDAwX1NUTV9PUENPREUpIHsKICAgICAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgSElDUiwgRT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NlKHBkZXYpKQogCQlnb3RvIG91dDsKICAKIAkvKiBDb25maWd1cmUgRE1BIGF0dHJpYnV0ZXMuICovCi0JaWYgKHBjaV9zZXRfZG1hX21hc2socGRldiwgRE1BXzY0QklUX01BU0spICYmCi0JICAgIHBjaV9zZXRfZG1hX21hc2socGRldiwgRE1BXzMyQklUX01BU0spKQotCQlnb3RvIG91dF9kaXNhYmxlX2RldmljZTsKKwlpZiAoc2l6ZW9mKGRtYV9hZGRyX3QpID4gc2l6ZW9mKHUzMikgJiYKKwkgICAgIShlcnJvciA9IHBjaV9zZXRfZG1hX21hc2socGRldiwgRE1BXzY0QklUX01BU0spKSkgeworCQl1c2luZ19kYWMgPSAxOworCQllcnJvciA9IHBjaV9zZXRfY29uc2lzdGVudF9kbWFfbWFzayhwZGV2LCBETUFfNjRCSVRfTUFTSyk7CisJCWlmIChlcnJvciA8IDApIHsKKwkJCXByaW50ayhLRVJOX0VSUiAic2s5OGxpbiAlcyB1bmFibGUgdG8gb2J0YWluIDY0IGJpdCBETUEgIgorCQkJICAgICAgICJmb3IgY29uc2lzdGVudCBhbGxvY2F0aW9uc1xuIiwgcGNpX25hbWUocGRldikpOworCQkJZ290byBvdXRfZGlzYWJsZV9kZXZpY2U7CisJCX0KKwl9IGVsc2UgeworCQllcnJvciA9IHBjaV9zZXRfZG1hX21hc2socGRldiwgRE1BXzMyQklUX01BU0spOworCQlpZiAoZXJyb3IpIHsKKwkJCXByaW50ayhLRVJOX0VSUiAic2s5OGxpbiAlcyBubyB1c2FibGUgRE1BIGNvbmZpZ3VyYXRpb25cbiIsCisJCQkgICAgICAgcGNpX25hbWUocGRldikpOworCQkJZ290byBvdXRfZGlzYWJsZV9kZXZpY2U7CisJCX0KKwl9CiAKLQotCWlmICgoZGV2ID0gYWxsb2NfZXRoZXJkZXYoc2l6ZW9mKERFVl9ORVQpKSkgPT0gTlVMTCkgewotCQlwcmludGsoS0VSTl9FUlIgIlVuYWJsZSB0byBhbGxvY2F0ZSBldGh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isKKy8qIE5JQyBwcm9iaW5nIGNvZGUgKi8KKworI2RlZmluZSBHUENSX01MQU5fRU4gICAgMHgwMDIwMDAwMCAgICAgIC8qIGVuYWJsZSBNQ1IgdG8gcGluIDggKi8KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBtY3JfcGFjayh1bnNpZ25lZCBwdWxzZSwgdW5zaWduZWQgc2FtcGxlKQoreworCXJldHVybiAocHVsc2UgPDwgMTApIHwgKHNhbXBsZSA8PCAyKTsKK30KKworc3RhdGljIGludCBuaWNfd2FpdChzdHJ1Y3QgaW9jM19kcml2ZXJfZGF0YSAqaWRkKQoreworCXZvbGF0aWxlIHVuc2lnbmVkIG1jcjsKKworICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgbWNyID0gKHZvbGF0aWxlIHVuc2lnbmVkKWlkZC0+dm1hLT5tY3I7CisgICAgICAgIH0gd2hpbGUgKCEobWNyICYgMikpOworCisgICAgICAgIHJldHVybiBtY3IgJiAxOworfQorCitzdGF0aWMgaW50IG5pY19yZXNldChzdHJ1Y3QgaW9jM19kcml2ZXJfZGF0YSAqaWRkKQoreworICAgICAgICBpbnQgcHJlc2VuY2U7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKworCWxvY2FsX2lycV9zYXZlKGZsYWdzKTsKKwlpZGQtPnZtYS0+bWNyID0gbWNyX3BhY2soNTAwLCA2NSk7CisJcHJlc2VuY2UgPSBuaWNfd2FpdChpZGQpOworCWxvY2FsX2lycV9yZXN0b3JlKGZsYWdzKTsKKworCXVkZWxheSg1MDApOworCisgICAgICAgIHJldHVybiBwcmVzZW5jZTsKK30KKworc3RhdGljIGlubGluZSBpbnQgbmljX3JlYWRfYml0KHN0cnVjdCBpb2MzX2RyaXZlcl9kYXRhICppZGQpCit7CisJaW50IHJlc3VsdDsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCisJbG9jYWxfaXJxX3NhdmUoZmxhZ3MpOworCWlkZC0+dm1hLT5tY3IgPSBtY3JfcGFjay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ICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgd2hpbGUoMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYoY3JjOF9hZGRyKGFkZHIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2goYWRkciAmIDB4RkYpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAweDBCOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRfbmljKGlkZCwgYWRkcik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMHgwOToKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAweDg5OgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDB4OTE6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhZF9tYWMoaWRkLCBhZGRyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgYWRkciA9IG5pY19maW5kKGlkZCwgJnNhdmUsIGFkZHIpOworICAgICAgICAgICAgICAgICAgICAgICAgaWYoYWRkciA9PSBmaXJzdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBsb29wcy0tOworICAgICAgICB9CisgICAgICAgIHByaW50ayhLRVJOX0VSUiAiSU9DMzogQ1JDIGVycm9yIGluIE5JQyBhZGRyZXNzXG4iKTsKK30KKwor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mljZV9pZCAqcGNpX2lkKQoreworCXN0cnVjdCBpb2MzX2RyaXZlcl9kYXRhICppZGQ7CisJdWludDMyX3QgcGNtZDsKKwlpbnQgcmV0LCBpZDsKKworCS8qIEVuYWJsZSBJT0MzIGFuZCB0YWtlIG93bmVyc2hpcCBvZiBpdCAqLworCWlmICgocmV0ID0gcGNpX2VuYWJsZV9kZXZpY2UocGRldikpKSB7CisJCXByaW50ayhLRVJOX1dBUk5JTkcKKwkJICAgICAgICIlczogRmFpbGVkIHRvIGVuYWJsZSBJT0MzIGRldmljZSBmb3IgcGNpX2RldiAlcy5cbiIsCisJCSAgICAgICBfX0ZVTkNUSU9OX18sIHBjaV9uYW1lKHBkZXYpKTsKKwkJZ290byBvdXQ7CisJfQorCXBjaV9zZXRfbWFzdGVyKHBkZXYpOworCisjaWZkZWYgVVNFXzY0QklUX0RNQQorICAgICAgICByZXQgPSBwY2lfc2V0X2RtYV9tYXNrKHBkZXYsIDB4ZmZmZmZmZmZmZmZmZmZmZlVMTCk7CisgICAgICAgIGlmICghcmV0KSB7CisgICAgICAgICAgICAgICAgcmV0ID0gcGNpX3NldF9jb25zaXN0ZW50X2RtYV9tYXNrKHBkZXYsIDB4ZmZmZmZmZmZmZmZmZmZmZlVMTCk7CisgICAgICAgICAgICAgICAgaWYgKHJldCA8IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX1dBUk5JTkcgIiVzOiBVbmFibGUgdG8gb2J0YWluIDY0IGJpdCBETUEgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJmb3IgY29uc2lzdGVudCBhbGxvY2F0aW9uc1xuIiwKKwkJCQlfX0ZVTkNUSU9OX18pOworICAgICAgICAgICAgICAgIH0KKwl9CisjZW5kaWYKKworCS8qIFNldCB1cCBwZXItSU9DMyBkYXRhICovCisJaWRkID0ga21hbGxvYyhzaXplb2Yoc3RydWN0IGlvYzNfZHJpdmVyX2RhdGEpLCBHRlBfS0VSTkVMKTsK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yAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwY21kIHwgUENJX0NPTU1BTkRfTUVNT1JZIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQ0lfQ09NTUFORF9QQVJJVFkgfCBQQ0lfQ09NTUFORF9TRVJSIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQ0lfU0NSX0RST1BfTU9ERV9FTik7CisKKwl3cml0ZV9pcmVnKGlkZCwgfjAsIElPQzNfV19JRUMpOworCXdyaXRlbCh+MCwgJmlkZC0+dm1hLT5zaW9faXIpOworCisJLyogU2V0IHVwIElSUXMgKi8KKwlpZihpZGQtPmNsYXNzID09IElPQzNfQ0xBU1NfQkFTRV9JUDMwCisJCQkJfHwgaWRkLT5jbGFzcyA9PSBJT0MzX0NMQVNTX0JBU0VfSVAyNykgeworCQl3cml0ZWwoMCwgJmlkZC0+dm1hLT5laWVyKTsKKwkJd3JpdGVsKH4wLCAmaWRkLT52bWEtPmVpc3IpOworCisJCWlkZC0+ZHVhbF9pcnEgPSAxOworCQlpZiAoIXJlcXVlc3RfaXJxKHBkZXYtPmlycSwgaW9jM19pbnRyX2V0aCwgU0FfU0hJUlEsCisJCQkJICJpb2MzLWV0aCIsICh2b2lkICopaWRkKSkgeworCQkJaWRkLT5pcnFfZXRoID0gcGRldi0+aXJxOworCQl9IGVsc2UgeworCQkJcHJpbnRrKEtFUk5fV0FSTklORworCQkJICAgICAgICIlcyA6IHJlcXVlc3RfaXJxIGZhaWxzIGZvciBJUlEgMHgleFxuICIsCisJCQkgICAgICAgX19GVU5DVElPTl9fLCBwZGV2LT5pcnEpOworCQl9CisJCWlmICghcmVxdWVzdF9pcnEocGRldi0+aXJxKzIsIGlvYzNfaW50cl9pbywgU0FfU0hJUlEsCisJCQkJICJpb2MzLWlvIiwgKHZvaWQgKilpZGQpKSB7CisJCQlpZGQtPmlycV9pbyA9IHBkZXYtPmlycSsyOworCQl9IGVsc2UgeworCQkJcHJpbnRrKEt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oaXMgaGFzIGJlZW4gZG9uZSwgd2Ugd29yayBhcm91bmQKKy8vIHRoZSBidWdzLgorLy8KKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworI2lmIChDWUJMQUZCX0tEX0dSQVBISUNTX1FVSVJLICYmIENZQkxBRkJfREVCVUcpCisJaWYgKGRpc2FibGVkKSB7IFwKKwkJcHJpbnRrKCIqKioqKioqKlxuIik7XAorCQlkdW1wX3N0YWNrKCk7XAorCQlyZXR1cm4gdmFsO1wKKwl9CisKKyNlbGlmIENZQkxBRkJfS0RfR1JBUEhJQ1NfUVVJUksKKyNkZWZpbmUgS0RfR1JBUEhJQ1NfUkVUVVJOKHZhbClcCisJaWYgKGRpc2FibGVkKSB7XAorCQlyZXR1cm4gdmFsO1wKKwl9CisjZWxzZQorI2RlZmluZSBLRF9HUkFQSElDU19SRVRVUk4odmFsKQorI2VuZGlmCiAKIC8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIC8vCkBAIC03OSwxMCArMTA3LDEwIEBACiAvLwogLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCi0jZGVmaW5lIG91dDgocix2KSB3cml0ZWIodixpb192aXJ0K3IpCi0jZGVmaW5lIG91dDMyKHIsdikgd3JpdGVsKHYsaW9fdmlydCtyKQotI2RlZmluZSBpbjgocikgcmVhZGIoaW9fdmlydCtyKQotI2RlZmluZSBpbjMyKHIpIHJlYWRsKGlvX3ZpcnQrcikKKyNkZWZpbmUgb3V0OChyLCB2KSB3cml0ZWIodiwgaW9fdmlydCArIHIpCisjZGVmaW5lIG91dDMyKHIsIHYpIHdyaXRlbCh2LCBpb192aXJ0ICsgcikKKyNkZWZpbmUgaW44KHIpIHJlYWRiKGlvX3ZpcnQgKyByKQorI2RlZmluZSBpbjMyKHIpIHJlYWRsKGlvX3ZpcnQgKyByKQogCiAvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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IHwgbSk7CisJZm9yIChtID0gMDsgbSA8IDY0OyBtKyspCisJCWZvciAobiA9IDA7IG4gPCAyNTA7IG4rKykgeworCQkJZmkgPSAoaW50KSgoKDU4NjQ3MjcgKiAobiArIDgpKSAvCisJCQkJICAgICgobSArIDIpICogKDEgPDwgaykpKSA+PiAxMik7CisJCQlpZiAoKGRpID0gYWJzKGZpIC0gZnJlcSkpIDwgZCkgeworCQkJCWQgPSBkaTsKKwkJCQlmID0gZmk7CisJCQkJbG8gPSAodTgpIG47CisJCQkJaGkgPSAodTgpICgoayA8PCA2KSB8IG0pOworCQkJfQogCQl9Ci0JfQotCXdyaXRlM0M0KFNSMTksaGkpOwotCXdyaXRlM0M0KFNSMTgsbG8pOwotCWlmKHZlcmJvc2l0eSA+IDEpCisJd3JpdGUzQzQoU1IxOSwgaGkpOworCXdyaXRlM0M0KFNSMTgsIGxvKTsKKwlpZiAodmVyYm9zaXR5ID4gMCkKIAkJb3V0cHV0KCJwaXhjbG9jayA9ICVkLiUwMmQgTUh6LCBrL20vbiAleCAleCAleFxuIiwKLQkJZnJlcS8xMDAsZnJlcSUxMDAsKGhpJjB4YzApPj42LGhpJjB4M2YsbG8pOworCQkgICAgICAgZnJlcSAvIDEwMCwgZnJlcSAlIDEwMCwgKGhpICYgMHhjMCkgPj4gNiwgaGkgJiAweDNmLCBsbyk7CiB9CiAKIC8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CkBAIC0xOTksODMgKzIzMSw4MyBAQAogLy8KIC8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKLXN0YXRpYyB2b2lkIGN5YmxhZmJfc2V0dXBfR0UoaW50IHBpdGNoLGludCBicHApCitzdGF0aWMgdm9pZCBjeWJsYWZiX3NldHVwX0dFKGludCBwaXRjaCwgaW50IGJwcCkKIHsKLQlpbnQgYmFzZSA9IChwaXRjaD4+Myk8PDIwOworCUtEX0dSQVBISUNTX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PT09PT09PQorLy8KKy8vIFNhdmUgU3RhdGUKKy8vCisvLyBUaGlzIGZ1bmN0aW9uIGlzIGNhbGxlZCB3aGlsZSBhIHN3aXRjaCB0byBLRF9URVhUIGlzIGluIHByb2dyZXNzLAorLy8gYmVmb3JlIGFueSBvZiB0aGUgb3RoZXIgZnVuY3Rpb25zIGFyZSBjYWxsZWQuCisvLworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCitzdGF0aWMgdm9pZCBjeWJsYWZiX3NhdmVfc3RhdGUoc3RydWN0IGZiX2luZm8gKmluZm8pCit7CisJc3RydWN0IGN5YmxhZmJfcGFyICpwYXIgPSBpbmZvLT5wYXI7CisJaWYgKHZlcmJvc2l0eSA+IDApCisJCW91dHB1dCgiU3dpdGNoaW5nIHRvIEtEX1RFWFRcbiIpOworCWRpc2FibGVkID0gMDsKKwlyZWdkdW1wKHBhcik7CisJZW5hYmxlX21taW8oKTsKKwlyZXR1cm47Cit9CisKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vCisvLyBSZXN0b3JlIFN0YXRlCisvLworLy8gVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgd2hpbGUgYSBzd2l0Y2ggdG8gS0RfR1JBUEhJQ1MgaXMgaW4gcHJvZ3Jlc3MsCisvLyBXZSBoYXZlIHRvIHR1cm4gb24gdmdhIHN0eWxlIHBhbm5pbmcgcmVnaXN0ZXJzIGFnYWluIGJlY2F1c2UgdGhlCisvLyB0cmlkZW50IGRyaXZlciBvZiBYIGRvZXMgbm90IGtub3cgYWJvdXQgR0UxMC4KKy8vCisvLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK3N0YXRpYyB2b2lkIGN5YmxhZmJfcmVzdG9yZV9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AgICAgKiAgICB1c2VzIG9mZnNldCA9IDAgJiYgbGVuZ3RoID0gREFDIHJlZ2lzdGVyIHdpZHRoLgogICAgICAqICAgIHZhci0+e2NvbG9yfS5vZmZzZXQgaXMgMAotICAgICAqICAgIHZhci0+e2NvbG9yfS5sZW5ndGggY29udGFpbnMgd2lkaHQgb2YgREFDCi0gICAgICogICAgY21hcCBpcyBub3QgdXNlZAotICAgICAqICAgIERBQ1tYXSBpcyBwcm9ncmFtbWVkIHRvIChyZWQsIGdyZWVuLCBibHVlKQorICAgICAqICAgIHZhci0+e2NvbG9yfS5sZW5ndGggY29udGFpbnMgd2lkdGggb2YgREFDIG9yIHRoZSBudW1iZXIgb2YgdW5pcXVlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICBjb2xvcnMgYXZhaWxhYmxlIChjb2xvciBkZXB0aCkKKyAgICAgKiAgICBwc2V1ZG9fcGFsZXR0ZSBpcyBub3QgdXNlZAorICAgICAqICAgIFJBTURBQ1tYXSBpcyBwcm9ncmFtbWVkIHRvIChyZWQsIGdyZWVuLCBibHVlKQorICAgICAqICAgIGNvbG9yIGRlcHRoID0gdmFyLT57Y29sb3J9Lmxlbmd0aAorICAgICAqCisgICAgICogU3RhdGljIHBzZXVkb2NvbG9yOgorICAgICAqICAgIHNhbWUgYXMgUHNldWRvY29sb3IsIGJ1dCB0aGUgUkFNREFDIGlzIG5vdCBwcm9ncmFtbWVkIChyZWFkLW9ubHkpCisgICAgICoKKyAgICAgKiBNb25vMDEvTW9ubzEwOgorICAgICAqICAgIEhhcyBvbmx5IDIgdmFsdWVzLCBibGFjayBvbiB3aGl0ZSBvciB3aGl0ZSBvbiBibGFjayAoZmcgb24gYmcpLAorICAgICAqICAgIHZhci0+e2NvbG9yfS5vZmZzZXQgaXMgMAorICAgICAqICAgIHdoaXRlID0gKDEgPDwgdmFyLT57Y29sb3J9Lmxlbmd0aCkgLSAxLCBibGFjayA9IDAKKyAgICAgKiAgICBwc2V1ZG9fcGFsZXR0ZSBpcyBub3QgdXNlZAorICAgICAqICAgIFJBTURBQyBkb2VzIG5vdCBleGlzdAorICAgICAqICAgIGNvbG9yIGRlcHRoIGlzIGFsd2F5cyAyCisgICAgICoKICAgICAgKiBUcnVlY29sb3I6CiAgICAgICogICAgZG9lcyBub3QgdXNlIFJBTURBQyAodXN1YWxseSBoYXMgMyBvZiB0aGVtKS4KICAgICAgKiAgICB2YXItPntjb2xvcn0ub2Zmc2V0IGNvbnRhaW5zIHN0YXJ0IG9mIGJpdGZpZWxkCiAgICAgICogICAgdmFyLT57Y29sb3J9Lmxlbmd0aCBjb250YWlucyBsZW5ndGggb2YgYml0ZmllbGQKLSAgICAgKiAgICBjbWFwIGlzIHByb2dyYW1tZWQgdG8gKHJlZCA8PCByZWQub2Zmc2V0KSB8IChncmVlbiA8PCBncmVlbi5vZmZzZXQpIHwKLSAgICAgKiAgICAgICAgICAgICAgICAgICAgICAoYmx1ZSA8PCBibHVlLm9mZnNldCkgfCAodHJhbnNwIDw8IHRyYW5zcC5vZmZzZXQpCisgICAgICogICAgcHNldWRvX3BhbGV0dGUgaXMgcHJvZ3JhbW1lZCB0byAocmVkIDw8IHJlZC5vZmZzZXQpIHwKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChncmVlbiA8PCBncmVlbi5vZmZzZXQpIHwKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChibHVlIDw8IGJsdWUub2Zmc2V0KSB8CisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodHJhbnNwIDw8IHRyYW5zcC5vZmZzZXQpCiAgICAgICogICAgUkFNREFDIGRvZXMgbm90IGV4aXN0CisgICAgICogICAgY29sb3IgZGVwdGggPSBTVU0odmFyLT57Y29sb3J9Lmxlbmd0aH0pCisgICAgICoKKyAgICAgKiAgVGhlIGNvbG9yIGRlcHRoIGlzIHVzZWQgYnkgZmJjb24gZm9yIGNob29zaW5nIHRoZSBs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AgaW50IGxlbjsKIAogICAgICAgICBsZW4gPSBzcHJpbnRmKHBhZ2UsICIlZFxuIiwgZXhwZXJpbUVuYWJsZWQpOwotLyogY291bGQgYWxzbyBjaGVjayBpZiBxdW90YXMgYXJlIGVuYWJsZWQgaW4ga2VybmVsCi0JYXMgYSB3aG9sZSBmaXJzdCAqLworCiAgICAgICAgIGxlbiAtPSBvZmY7CiAgICAgICAgICpzdGFydCA9IHBhZ2UgKyBvZmY7CiAKQEAgLTU5NiwyMSArNjA3LDIzIEBACiAgICAgICAgIHJldHVybiBsZW47CiB9CiBzdGF0aWMgaW50Ci1xdW90YUVuYWJsZWRfd3JpdGUoc3RydWN0IGZpbGUgKmZpbGUsIGNvbnN0IGNoYXIgX191c2VyICpidWZmZXIsCitleHBlcmltRW5hYmxlZF93cml0ZShzdHJ1Y3QgZmlsZSAqZmlsZSwgY29uc3QgY2hhciBfX3VzZXIgKmJ1ZmZlciwKICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBjb3VudCwgdm9pZCAqZGF0YSkKIHsKLSAgICAgICAgY2hhciBjOwotICAgICAgICBpbnQgcmM7CisJY2hhciBjOworCWludCByYzsKIAotICAgICAgICByYyA9IGdldF91c2VyKGMsIGJ1ZmZlcik7Ci0gICAgICAgIGlmIChyYykKLSAgICAgICAgICAgICAgICByZXR1cm4gcmM7Ci0gICAgICAgIGlmIChjID09ICcwJyB8fCBjID09ICduJyB8fCBjID09ICdOJykKLSAgICAgICAgICAgICAgICBleHBlcmltRW5hYmxlZCA9IDA7Ci0gICAgICAgIGVsc2UgaWYgKGMgPT0gJzEnIHx8IGMgPT0gJ3knIHx8IGMgPT0gJ1knKQotICAgICAgICAgICAgICAgIGV4cGVyaW1FbmFibGVkID0gMTsKKwlyYyA9IGdldF91c2VyKGMsIGJ1ZmZlcik7CisJaWYgKHJjKQorCQlyZXR1cm4gcmM7CisJaWYgKGMgPT0gJzAnIHx8IGMgPT0gJ24nIHx8IGMgPT0gJ04nKQ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LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogTlQgVHJhbnNhY3Qgc3RydWN0dXJlIGRlZmludGlvbnMgZm9sbG93ICAgICAgICAgICAgICovCisvKiBDdXJyZW50bHkgb25seSBpb2N0bCwgYWNsIChnZXQgc2VjdXJpdHkgZGVzY3JpcHRvcikgKi8gIAorLyogYW5kIG5vdGlmeSBhcmUgaW1wbGVtZW50ZWQgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3R5cGVkZWYgc3RydWN0IHNtYl9jb21fbnRyYW5zYWN0X3JlcSB7CisgICAgICAgIHN0cnVjdCBzbWJfaGRyIGhkcjsgLyogd2N0ID49IDE5ICovCisgICAgICAgIF9fdTggTWF4U2V0dXBDb3VudDsKKyAgICAgICAgX191MTYgUmVzZXJ2ZWQ7CisgICAgICAgIF9fbGUzMiBUb3RhbFBhcmFtZXRlckNvdW50OworICAgICAgICBfX2xlMzIgVG90YWxEYXRhQ291bnQ7CisgICAgICAgIF9fbGUzMiBNYXhQYXJhbWV0ZXJDb3VudDsKKyAgICAgICAgX19sZTMyIE1heERhdGFDb3VudDsKKyAgICAgICAgX19sZTMyIFBhcmFtZXRlckNvdW50OworICAgICAgICBfX2xlMzIgUGFyYW1ldGVyT2Zmc2V0OworICAgICAgICBfX2xlMzIgRGF0YUNvdW50OworICAgICAgICBfX2xlMzIgRGF0YU9mZnNldDsKKyAgICAgICAgX191OCBTZXR1cENvdW50OyAvKiBmb3VyIHNldHVwIHdvcmRzIGZvbGxvdyBzdWJjb21tYW5kICovCisgICAgICAgIC8qIFNOSUEgc3BlYyBpbmNvcnJlY3RseSBpbmNsdWRlZCBzcHVyaW91cyBwYWQgaGVyZSAqLworICAgICAgICBfX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ICAgICAgICAgICAgICAgICAgICJleHRlbnQtc3RhdGUgOiAleCBcbiIsCiAgICAgICAgICAgICAgICAgICAgICAgICAoaXAtPmlfbW91bnQpLT5tX2ZzbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgIChsb25nIGxvbmcpaXAtPmlfaW5vLAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0X2ltYXAtPmJyX3N0YXJ0YmxvY2ssIHJldF9pbWFwLT5icl9zdGFydG9mZiwKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldF9pbWFwLT5icl9ibG9ja2NvdW50LHJldF9pbWFwLT5icl9zdGF0ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKXJldF9pbWFwLT5icl9zdGFydGJsb2NrLAorCQkJKHVuc2lnbmVkIGxvbmcgbG9uZylyZXRfaW1hcC0+YnJfc3RhcnRvZmYsCisgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKXJldF9pbWFwLT5icl9ibG9ja2NvdW50LAorCQkJcmV0X2ltYXAtPmJyX3N0YXRlKTsKICAgICAgICAgfQogCXJldHVybiAwOwogCkBAIC01MDEsNiArNTY5LDYzIEBACiAJcmV0dXJuIFhGU19FUlJPUihlcnJvcik7CiB9CiAKKy8qCisgKiBJZiB0aGUgY2FsbGVyIGlzIGRvaW5nIGEgd3JpdGUgYXQgdGhlIGVuZCBvZiB0aGUgZmlsZSwKKyAqIHRoZW4gZXh0ZW5kIHRoZSBhbGxvY2F0aW9uIG91dCB0byB0aGUgZmlsZSBzeXN0ZW0ncyB3cml0ZQorICogaW9zaXplLiAgV2UgY2xlYW4gdXAgYW55IGV4dHJhIHNwYWNlIGxlZnQgb3ZlciB3aGVuIHRoZQorICogZmlsZSBpcyBjbG9zZWQgaW4geGZzX2luYWN0aXZlKCkuCisgKgorICogRm9yIHN5bmMgd3JpdGVzLCB3ZSBhcmUgZmx1c2hpbmcgZGVsYXllZCBhbGxvY2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mc19pb21hcF9lbnRlcl90cmFjZShYRlNfSU9NQVBfV1JJVEVfTk9TUEFDRSwKQEAgLTY4NSwxNyArNzE3LDIxIEBACiAJCWdvdG8gcmV0cnk7CiAJfQogCi0JKnJldF9pbWFwID0gaW1hcFswXTsKLQkqbm1hcHMgPSAxOwotCWlmICggIShpby0+aW9fZmxhZ3MgJiBYRlNfSU9DT1JFX1JUKSAgJiYgIXJldF9pbWFwLT5icl9zdGFydGJsb2NrKSB7CisJaWYgKCEoaW8tPmlvX2ZsYWdzICYgWEZTX0lPQ09SRV9SVCkgICYmICFyZXRfaW1hcC0+YnJfc3RhcnRibG9jaykgewogCQljbW5fZXJyKENFX1BBTklDLCJBY2Nlc3MgdG8gYmxvY2sgemVybzogIGZzIDwlcz4gaW5vZGU6ICVsbGQgIgogICAgICAgICAgICAgICAgICAgICAgICAgInN0YXJ0X2Jsb2NrIDogJWxseCBzdGFydF9vZmYgOiAlbGx4IGJsa2NudCA6ICVsbHggIgogICAgICAgICAgICAgICAgICAgICAgICAgImV4dGVudC1zdGF0ZSA6ICV4IFxuIiwKICAgICAgICAgICAgICAgICAgICAgICAgIChpcC0+aV9tb3VudCktPm1fZnNuYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgKGxvbmcgbG9uZylpcC0+aV9pbm8sCi0gICAgICAgICAgICAgICAgICAgICAgICByZXRfaW1hcC0+YnJfc3RhcnRibG9jaywgcmV0X2ltYXAtPmJyX3N0YXJ0b2ZmLAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0X2ltYXAtPmJyX2Jsb2NrY291bnQscmV0X2ltYXAtPmJyX3N0YXRlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpcmV0X2ltYXAtPmJyX3N0YXJ0YmxvY2ssCisJCQkodW5zaWduZWQgbG9uZyBsb25nKXJldF9pbWFwLT5icl9zdGFydG9mZiwKKyAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25n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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAwNSwgUi4gQnlyb24gTW9vcmUKKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMDYsIFIuIEJ5cm9uIE1vb3JlCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtMjc2LDYgKzI3NiwzNyBAQAogCXU4IGZpZWxkX3R5cGU7CiB9OwogCisvKgorICogQml0bWFwcGVkIEFDUEkgdHlwZXMuICBVc2VkIGludGVybmFsbHkgb25seQorICovCisjZGVmaW5lIEFDUElfQlRZUEVfQU5ZICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMAorI2RlZmluZSBBQ1BJX0JUWVBFX0lOVEVHRVIgICAgICAgICAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgQUNQSV9CVFlQRV9TVFJJTkcgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIEFDUElfQlRZUEVfQlVGRkVSICAgICAgICAgICAgICAgMHgwMDAwMDAwNAorI2RlZmluZSBBQ1BJX0JUWVBFX1BBQ0tBR0UgICAgICAgICAgICAgIDB4MDAwMDAwMDgKKyNkZWZpbmUgQUNQSV9CVFlQRV9GSUVMRF9VTklUICAgICAgICAgICAweDAwMDAwMDEwCisjZGVmaW5lIEFDUElfQlRZUEVfREVWSUNFICAgICAgICAgICAgICAgMHgwMDAwMDAyMAorI2RlZmluZSBBQ1BJX0JUWVBFX0VWRU5UICAgICAgICAgICAgICAgIDB4MDAwMDAwNDAKKyNkZWZpbmUgQUNQSV9CVFlQRV9NRVRIT0QgICAgICAgICAgICAgICAweDAwMDAwMDgwCisjZGVmaW5lIEFDUElfQlRZUEVfTVVURVggICAgICAgICAgICAgICAgMHgwMD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AgICAweDg3CisjZGVmaW5lIEFDUElfUkVTT1VSQ0VfTkFNRV9BRERSRVNTMTYgICAgICAgICAgICAweDg4CisjZGVmaW5lIEFDUElfUkVTT1VSQ0VfTkFNRV9FWFRFTkRFRF9JUlEgICAgICAgICAweDg5CisjZGVmaW5lIEFDUElfUkVTT1VSQ0VfTkFNRV9BRERSRVNTNjQgICAgICAgICAgICAweDhBCisjZGVmaW5lIEFDUElfUkVTT1VSQ0VfTkFNRV9FWFRFTkRFRF9BRERSRVNTNjQgICAweDhCCisjZGVmaW5lIEFDUElfUkVTT1VSQ0VfTkFNRV9MQVJHRV9NQVggICAgICAgICAgICAweDhCCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKQEAgLTc4MCw3ICs4MjEsNyBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0jZGVmaW5lIEFDUElfQVNDSUlfWkVSTyAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lIEFDUElfQVNDSUlfWkVSTyAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKZGlmZiAtLWdpdCBhL2luY2x1ZGUvYWNwaS9hY21hY3Jvcy5oIGIvaW5jbHVkZS9hY3BpL2FjbWFjcm9zLmgKaW5kZXggNzAyY2M0ZS4uNDliYTE1MSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9hY3BpL2FjbWFjcm9zLmgKKysrIGIvaW5jbHVkZS9hY3BpL2FjbWFjcm9zLmgKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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RPUkUgbWFjcm9zIGJlbG93LgorICogVXNlIHdpdGggY2FyZS4KICAqLwotI2RlZmluZSBBQ1BJX0dFVDgoYWRkcikgICAgICAgICAgICAgICAgICgqKHU4KikoYWRkcikpCisjZGVmaW5lIEFDUElfR0VUOChwdHIpICAgICAgICAgICAgICAgICAgKkFDUElfQ0FTVF9QVFIgKHU4LCBwdHIpCisjZGVmaW5lIEFDUElfR0VUMTYocHRyKSAgICAgICAgICAgICAgICAgKkFDUElfQ0FTVF9QVFIgKHUxNiwgcHRyKQorI2RlZmluZSBBQ1BJX0dFVDMyKHB0cikgICAgICAgICAgICAgICAgICpBQ1BJX0NBU1RfUFRSICh1MzIsIHB0cikKKyNkZWZpbmUgQUNQSV9HRVQ2NChwdHIpICAgICAgICAgICAgICAgICAqQUNQSV9DQVNUX1BUUiAodTY0LCBwdHIpCisjZGVmaW5lIEFDUElfU0VUOChwdHIpICAgICAgICAgICAgICAgICAgKkFDUElfQ0FTVF9QVFIgKHU4LCBwdHIpCisjZGVmaW5lIEFDUElfU0VUMTYocHRyKSAgICAgICAgICAgICAgICAgKkFDUElfQ0FTVF9QVFIgKHUxNiwgcHRyKQorI2RlZmluZSBBQ1BJX1NFVDMyKHB0cikgICAgICAgICAgICAgICAgICpBQ1BJX0NBU1RfUFRSICh1MzIsIHB0cikKKyNkZWZpbmUgQUNQSV9TRVQ2NChwdHIpICAgICAgICAgICAgICAgICAqQUNQSV9DQVNUX1BUUiAodTY0LCBwdHIpCiAKLS8qIFBvaW50ZXIgYXJpdGhtZXRpYyAqLwotCi0jZGVmaW5lIEFDUElfUFRSX0FERCh0LGEsYikgICAgICAgICAgICAgKHQgKikgKHZvaWQgKikoKGNoYXIgKikoYSkgKyAoYWNwaV9uYXRpdmVfdWludCkoYikpCi0jZGVmaW5lIEFDUElfUFRSX0RJRkYoYSxiKSAgICAgICAgICAgICAgKGFjcGlfbmF0aXZlX3VpbnQpICgoY2hhciAqKShhKSAtIChjaGFyICopKGIpKQorLyoKKy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ICAgICAgICAgICAgICA0CisjZGVmaW5lIEFDUElfUlNDX0NPVU5UICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBBQ1BJX1JTQ19DT1VOVDE2ICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgQUNQSV9SU0NfTEVOR1RIICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEFDUElfUlNDX01PVkU4ICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBBQ1BJX1JTQ19NT1ZFMTYgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgQUNQSV9SU0NfTU9WRTMyICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBBQ1BJX1JTQ19NT1ZFNjQgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEFDUElfUlNDX1NFVDggICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgQUNQSV9SU0NfREFUQTggICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBBQ1BJX1JTQ19BRERSRVNTICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEFDUElfUlNDX1NPVVJDRSAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgQUNQSV9SU0NfU09VUkNFWCAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBQ1BJX1JTQ19CSVRNQVNLICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEFDUElfUlNDX0JJVE1BU0sxNiAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgQUNQSV9SU0NfRVhJVF9ORSAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBBQ1BJX1JTQ19FWElUX0xFICAgICAgICAgICAgICAgIDIwCisKKy8qIFJlc291cmNlIENvbnZlcnNpb24gc3ViLW9wY29kZXMgKi8KKworI2RlZmluZSBBQ1BJX1JTQ19DT01QQVJFX0FNTF9MRU5HVEggICAgIDAKKyNkZWZpbmUgQUNQSV9SU0NfQ09NUEFSRV9WQUxVRSAgICAgICAgICAxCisKKyNkZWZpbmUgQUNQSV9SU0NfVEFCTEVfU0laRShkKSAgICAgICAgICAoc2l6ZW9mIChkKSAvIHNpemVvZiAoc3RydWN0IGFjcGlfcnNjb252ZXJ0X2luZm8pKQorCisjZGVmaW5lIEFDUElfUlNfT0ZGU0VUKGYpICAgICAgICAgICAgICAgKHU4KSBBQ1BJX09GRlNFVCAoc3RydWN0IGFjcGlfcmVzb3VyY2UsZikKKyNkZWZpbmUgQU1MX09GRlNFVChmKSAgICAgICAgICAgICAgICAgICAodTgpIEFDUElfT0ZGU0VUICh1bmlvbiBhbWxfcmVzb3VyY2UsZikKKwordHlwZWRlZiBjb25zdCBzdHJ1Y3QgYWNwaV9yc2R1bXBfaW5mbyB7CisJdTggb3Bjb2RlOworCXU4IG9mZnNldDsKKwljaGFyICpuYW1lOworCWNvbnN0IGNoYXIgKipwb2ludGVyOworCit9IGFjcGlfcnNkdW1wX2luZm87CisKKy8qIFZhbHVlcyBmb3IgdGhlIE9wY29kZSBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFDUElfUlNEX1RJVExFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1BJX1JTRF9MSVRFUkFMICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUNQSV9SU0RfU1RSSU5HICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFDUElfUlNEX1VJTlQ4ICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBQ1BJX1JTRF9VSU5UMTYgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQUNQSV9SU0RfVUlOVDMyICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEFDUElfUlNEX1VJTlQ2NCAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBBQ1BJX1JTRF8xQklURkxBRyAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQUNQSV9SU0RfMkJJVEZMQUcgICAgICAgICAgICAgICA4CisjZGVmaW5lIEFDUElfUlNEX1NIT1JUTElTVCAgICAgICAgICAgICAgOQorI2RlZmluZ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cyBmbGFnLgogICovCi10eXBlZGVmIHVuc2lnbmVkIGNoYXIgVUlOVDg7Ci10eXBlZGVmIHVuc2lnbmVkIGNoYXIgQk9PTEVBTjsKLXR5cGVkZWYgdW5zaWduZWQgaW50IFVJTlQxNjsKLXR5cGVkZWYgbG9uZyBJTlQzMjsKLXR5cGVkZWYgaW50IElOVDE2OwotdHlwZWRlZiB1bnNpZ25lZCBsb25nIFVJTlQzMjsKKyNpZiBkZWZpbmVkIChfX0lBNjRfXykgfHwgZGVmaW5lZCAoX19pYTY0X18pCisjZGVmaW5lIEFDUElfTUlTQUxJR05NRU5UX05PVF9TVVBQT1JURUQKKyNlbmRpZgogCi1zdHJ1Y3QgewotCVVJTlQzMiBMbzsKLQlVSU5UMzIgSGk7Ci19OworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUeXBlcyBzcGVjaWZpYyB0byAzMi1iaXQgdGFyZ2V0cworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNlbGlmIEFDUElfTUFDSElORV9XSURUSCA9PSAzMgorCisvKiEgW0JlZ2luXSBubyBzb3VyY2UgY29kZSB0cmFuc2xhdGlvbiAoa2VlcCB0aGUgdHlwZWRlZnMgYXMtaXMpICovCisKK3R5cGVkZWYgdW5zaWduZWQgaW50IFVJTlQzMjsKK3R5cGVkZWYgaW50IElOVDMyOworCisvKiEgW0VuZF0gbm8gc291cmNlIGNvZGUgdHJhbnNsYXRpb24gISovCisKK3R5cGVkZWYgdTMyIGFjcGlfbmF0aXZlX3VpbnQ7Cit0eXBlZGVmIHMzMiBhY3BpX25hdGl2ZV9pbnQ7CisKK3R5cGVkZWYgdTY0IGFjcGlfdGFibGVfcHRyOwordHlwZWRlZiB1MzIgYWNwaV9pb19hZGRyZXNzOwordHlwZWRlZiB1NjQgYWNwaV9waHlzaWNhbF9hZGRyZXNzOworCisjZGVmaW5lIEFDUElfTUFYX1BUUiAgICAgICAgICAgICAgICAgICAgQUNQSV9VSU5UMzJfTUFYCisjZGVmaW5lIEFDUElfU0laRV9NQVggICAgICAgICAgICAgICAgICAgQUNQSV9VSU5UMzJfTUFYCisKKyNkZWZpbmUgQUxJR05FRF9BRERSRVNTX0JPVU5EQVJZICAgICAgICAweDAwMDAwMDA0CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVHlwZXMgc3BlY2lmaWMgdG8gMTYtYml0IHRhcmdldHMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZWxpZiBBQ1BJX01BQ0hJTkVfV0lEVEggPT0gMTYKKworLyohIFtCZWdpbl0gbm8gc291cmNlIGNvZGUgdHJhbnNsYXRpb24gKGtlZXAgdGhlIHR5cGVkZWZzIGFzLWlzKSAqLworCit0eXBlZGVmIHVuc2lnbmVkIGxvbmcgVUlOVDMyOwordHlwZWRlZiBzaG9ydCBJTlQxNjsKK3R5cGVkZWYgbG9uZyBJTlQzMjsKIAogLyohIFtFbmRdIG5vIHNvdXJjZSBjb2RlIHRyYW5zbGF0aW9uICEqLwogCkBAIC0xNDgsNjEgKzIxOSw1NyBAQAogdHlwZWRlZiB1MzIgYWNwaV90YWJsZV9wdHI7CiB0eXBlZGVmIHUzMiBhY3BpX2lvX2FkZHJlc3M7CiB0eXBlZGVmIGNoYXIgKmFjcGlfcGh5c2ljYWxfYWRkcmVzczsKLXR5cGVkZWYgdTE2IGFjcGlfc2l6ZTsKIAotI2RlZmluZSBBTElHTkVEX0FERFJFU1NfQk9VTkRBUlkgICAgICAgIDB4MDAwMDAwMDIKLSNkZWZpbmUgQUNQSV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ZWQgaW50IFVJTlQzMjsKLXR5cGVkZWYgQ09NUElMRVJfREVQRU5ERU5UX0lOVDY0IElOVDY0OwotdHlwZWRlZiBDT01QSUxFUl9ERVBFTkRFTlRfVUlOVDY0IFVJTlQ2NDsKLQotLyohIFtFbmRdIG5vIHNvdXJjZSBjb2RlIHRyYW5zbGF0aW9uICEqLwotCi10eXBlZGVmIHMzMiBhY3BpX25hdGl2ZV9pbnQ7Ci10eXBlZGVmIHUzMiBhY3BpX25hdGl2ZV91aW50OwotCi10eXBlZGVmIHU2NCBhY3BpX3RhYmxlX3B0cjsKLXR5cGVkZWYgdTMyIGFjcGlfaW9fYWRkcmVzczsKLXR5cGVkZWYgdTY0IGFjcGlfcGh5c2ljYWxfYWRkcmVzczsKLXR5cGVkZWYgdTMyIGFjcGlfc2l6ZTsKLQotI2RlZmluZSBBTElHTkVEX0FERFJFU1NfQk9VTkRBUlkgICAgICAgIDB4MDAwMDAwMDQKLSNkZWZpbmUgQUNQSV9NSVNBTElHTkVEX1RSQU5TRkVSUwotI2RlZmluZSBBQ1BJX01BWF9QVFIgICAgICAgICAgICAgICAgICAgIEFDUElfVUlOVDMyX01BWAotI2RlZmluZSBBQ1BJX1NJWkVfTUFYICAgICAgICAgICAgICAgICAgIEFDUElfVUlOVDMyX01BWAotCiAjZWxzZQorCisvKiBBQ1BJX01BQ0hJTkVfV0lEVEggbXVzdCBiZSBlaXRoZXIgNjQsIDMyLCBvciAxNiAqLworCiAjZXJyb3IgdW5rbm93biBBQ1BJX01BQ0hJTkVfV0lEVEgKICNlbmRpZgogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE9TLSBvciBjb21waWxlci1kZXBlbmRlbnQgdHlwZXMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL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ICg2NF9rLTEpKzMgKi8KIAogLyoKICAqICBNZW1vcnkgQXR0cmlidXRlcwpAQCAtOTE2LDcgKzk1Miw5IEBACiAjZGVmaW5lIEFDUElfSVNBX09OTFlfUkFOR0VTICAgICAgICAgICAgKHU4KSAweDAyCiAjZGVmaW5lIEFDUElfRU5USVJFX1JBTkdFICAgICAgICAgICAgICAgKEFDUElfTk9OX0lTQV9PTkxZX1JBTkdFUyB8IEFDUElfSVNBX09OTFlfUkFOR0VTKQogCi0jZGVmaW5lIEFDUElfU1BBUlNFX1RSQU5TTEFUSU9OICAgICAgICAgKHU4KSAweDAzCisvKiBUeXBlIG9mIHRyYW5zbGF0aW9uIC0gMT1TcGFyc2UsIDA9RGVuc2UgKi8KKworI2RlZmluZSBBQ1BJX1NQQVJTRV9UUkFOU0xBVElPTiAgICAgICAgICh1OCkgMHgwMQogCiAvKgogICogIElPIFBvcnQgRGVzY3JpcHRvciBEZWNvZGUKQEAgLTkyNyw4ICs5NjUsOCBAQAogLyoKICAqICBJUlEgQXR0cmlidXRlcwogICovCi0jZGVmaW5lIEFDUElfRURHRV9TRU5TSVRJVkUgICAgICAgICAgICAgKHU4KSAweDAwCi0jZGVmaW5lIEFDUElfTEVWRUxfU0VOU0lUSVZFICAgICAgICAgICAgKHU4KSAweDAxCisjZGVmaW5lIEFDUElfTEVWRUxfU0VOU0lUSVZFICAgICAgICAgICAgKHU4KSAweDAwCisjZGVmaW5lIEFDUElfRURHRV9TRU5TSVRJVkUgICAgICAgICAgICAgKHU4KSAweDAxCiAKICNkZWZpbmUgQUNQSV9BQ1RJVkVfSElHSCAgICAgICAgICAgICAgICAodTgpIDB4MDAKICNkZWZpbmUgQUNQSV9BQ1RJVkVfTE9XICAgICAgICAgICAgICAgICAodTgpIDB4MDEKQEAgLTk3NSwyNyArMTAxMyw0NSBAQAogI2RlZmluZSBBQ1BJX0NPTlNVTUVSICAgICAgICAgICAgICAgICAgICh1OCkgMHgwMQogCiAvKgorICogSWYgcG9zc2libG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fbGVuZ3RoOwogCWNoYXIgKnN0cmluZ19wdHI7CiB9OwogCiAvKiBGaWVsZHMgY29tbW9uIHRvIGFsbCBhZGRyZXNzIGRlc2NyaXB0b3JzLCAxNi8zMi82NCBiaXQgKi8KIAogI2RlZmluZSBBQ1BJX1JFU09VUkNFX0FERFJFU1NfQ09NTU9OIFwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZV90eXBlOyBcCi0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvZHVjZXJfY29uc3VtZXI7IFwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNvZGU7IFwKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5fYWRkcmVzc19maXhlZDsgXAotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heF9hZGRyZXNzX2ZpeGVkOyBcCi0JdW5pb24gYWNwaV9yZXNvdXJjZV9hdHRyaWJ1dGUgICAgICAgYXR0cmlidXRlOworCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlX3R5cGU7IFwKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9kdWNlcl9jb25zdW1lcjsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlY29kZTsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbl9hZGRyZXNzX2ZpeGVkOyBcCisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4X2FkZHJlc3NfZml4ZWQ7IFwKKwl1bmlvbiBhY3BpX3Jlc291cmNlX2F0dHJpYnV0ZSAgICAgICBpbmZvOwogCiBzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9hZGRyZXNzIHsKIEFDUElfUkVTT1VSQ0VfQUREUkVTU19DT01NT059OwogCiBzdHJ1Y3QgYW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bmRpZiAvKiBfX0VUSEVSMDBfSCAqLwpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20tYXJtL2FyY2gtZXB4YTEwZGIvZXhjYWxpYnVyLmggYi9pbmNsdWRlL2FzbS1hcm0vYXJjaC1lcHhhMTBkYi9leGNhbGlidXIuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNWM5MWRkNi4uMDAwMDAwMAotLS0gYS9pbmNsdWRlL2FzbS1hcm0vYXJjaC1lcHhhMTBkYi9leGNhbGlidXIuaAorKysgL2Rldi9udWxsCkBAIC0xLDkxICswLDAgQEAKLS8qIG1lZ2FmdW5jdGlvbiB3aXphcmQ6ICVBUk0tQmFzZWQgRXhjYWxpYnVyJQotICAgR0VORVJBVElPTjogU1RBTkRBUkQKLSAgIFZFUlNJT046IFdNMS4wCi0gICBNT0RVTEU6IEFSTS1CYXNlZCBFeGNhbGlidXIKLSAgIFBST0pFQ1Q6IGV4Y2FsaWJ1cgotICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gICBGaWxlIE5hbWU6IHY6XGVtYmVkZGVkXGxpbnV4XGJvb3RsZHJcZXhjYWxpYnVyLmgKLSAgIE1lZ2FmdW5jdGlvbiBOYW1lKHMpOiBBUk0tQmFzZWQgRXhjYWxpYnVyCi0gICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLQotICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gICBUSElTIElTIEEgV0laQVJELUdFTkVSQVRFRCBGSUxFLiBETyBOT1QgRURJVCBUSElTIEZJTEUhCi0gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYJRVhDQUxJQlVSX0hfSU5DTFVERUQKLSNk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aWMgTGljZW5zZQotICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKLSAqIEZvdW5kYXRpb24sIEluYy4sIDU5IFRlbXBsZSBQbGFjZSwgU3VpdGUgMzMwLCBCb3N0b24sIE1BICAwMjExMS0xMzA3ICBVU0EKLSAqLwotCi0vKiBVc2UgdGhlIEV4Y2FsaWJ1ciBjaGlwIGRlZmluaXRpb25zICovCi0jZGVmaW5lIElOVF9DVFJMMDBfVFlQRQotI2luY2x1ZGUgImFzbS9hcmNoL2ludF9jdHJsMDAuaCIKLQotCi0jZGVmaW5lIElSUV9QTEQwICAgICAgICAgICAgICAgICAgICAgSU5UX01TX1AwX09GU1QKLSNkZWZpbmUgSVJRX1BMRDEgICAgICAgICAgICAgICAgICAgICBJTlRfTVNfUDFfT0ZTVAotI2RlZmluZSBJUlFfUExEMiAgICAgICAgICAgICAgICAgICAgIElOVF9NU19QMl9PRlNUCi0jZGVmaW5lIElSUV9QTEQzICAgICAgICAgICAgICAgICAgICAgSU5UX01TX1AzX09GU1QKLSNkZWZpbmUgSVJRX1BMRDQgICAgICAgICAgICAgICAgICAgICBJTlRfTVNfUDRfT0ZTVAotI2RlZmluZSBJUlFfUExENSAgICAgICAgICAgICAgICAgICAgIElOVF9NU19QNV9PRlNUCi0jZGVmaW5lIElSUV9FWFQgICAgICAgICAgICAgICAgICAgICAgSU5UX01TX0lQX09GU1QKLSNkZWZpbmUgSVJRX1VBUlQgICAgICAgICAgICAgICAgICAgICBJTlRfTVNfVUFfT0ZTVAotI2RlZmluZSBJUlFfVElNRVIwICAgICAgICAgICAgICAgICAgIElOVF9NU19UMF9PRlNUCi0jZGVmaW5lIElSUV9USU1FUjEgICAgICAgICAgICAgICAgICAgSU5UX01TX1QxX09GU1QKLSNkZWZpbmUgSVJRX1BMTCAgICAgICAgICAgICAgICAgICAgICBJTlRfTVNfUExMX09GU1QKLSNkZWZpbmUgS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LCBCb3N0b24sIE1BICAwMjExMS0xMzA3ICBVU0EKLSAqLwotCi0jaWZuZGVmIF9fVERLUEhZX0gKLSNkZWZpbmUgX19UREtQSFlfSAotCi0vKgotICogUmVnaXN0ZXIgZGVmaW5pdGlvbnMgZm9yIHRoZSBUREsgNzhRMjEyMCBQSFkgCi0gKiB3aGljaCBpcyBvbiB0aGUgQ2FtZWxvdCBib2FyZAotICovCi0KLS8qCi0gKiBDb3B5cmlnaHQgKGMpIEFsdGVyYSBDb3Jwb3JhdGlvbiAyMDAwLgotICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KLSAqLwotI2RlZmluZSBQSFlfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCkKLSNkZWZpbmUgUEhZX0NPTlRST0xfQ09MVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MCkKLSNkZWZpbmUgUEhZX0NPTlRST0xfQ09MVF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNykKLSNkZWZpbmUgUEhZX0NPTlRST0xfRFVQTEVYX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX0RVUExFWF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgpCi0jZGVmaW5lIFBIWV9DT05UUk9MX1JBTkVHX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwKQotI2RlZmluZSBQSFlfQ09OVFJPTF9SQU5FR19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg5KQotI2RlZmluZSBQSFlfQ09OVFJPTF9JU09fTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NDAwKQotI2RlZmluZSBQSFlfQ09OVFJPTF9JU09fT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxMCkKLSNkZWZpbmUgUEhZX0NPTlRST0xfUFdSRE5fTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX1BXUkROX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDExKQotI2RlZmluZSBQSFlfQ09OVFJPTF9BTkVHRU5fTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwMDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX0FORUdFTl9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEyKQotI2RlZmluZSBQSFlfQ09OVFJPTF9TUEVFRFNMX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDIwMDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX1NQRUVEU0xfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEzKQotI2RlZmluZSBQSFlfQ09OVFJPTF9MT09QQktfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX0xPT1BCS19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0KQotI2RlZmluZSBQSFlfQ09OVFJPTF9SRVNFVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCi0jZGVmaW5lIFBIWV9DT05UUk9MX1JFU0VUX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE1KQotCi0jZGVmaW5lIFBIWV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxKQotI2RlZmluZSBQSFlfU1RBVFVTX0VUWERfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MSkKLSNkZWZpbmUgUEhZX1NUQVRVU19FWFREX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCkKLSNkZWZpbmUgUEhZX1NUQVRVU19KQUJfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDIpCi0jZGVmaW5lIFBIWV9TVEFUVVNfSkFCX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSkKLSNkZWZpbmUgUEhZX1NUQVRVU19MSU5LX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQpCi0jZGVmaW5lIFBIWV9TVEFUVVNfTElOS19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDIpCi0jZGVmaW5lIFBIWV9TVEFUVVNfQU5FR0FfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4OCkKLSNkZWZpbmUgUEhZX1NUQVRVU19BTkVHQV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMykKLSNkZWZpbmUgUEhZX1NUQVRVU19SRkFVTFRfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMCkKLSNkZWZpbmUgUEhZX1NUQVRVU19SRkFVTFRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCkKLSNkZWZpbmUgUEhZX1NUQVRVU19BTkVHQ19NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMCkKLSNkZWZpbmUgUEhZX1NUQVRVU19BTkVHQ19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSkKLSNkZWZpbmUgUEhZX1NUQVRVU18xMFRfSF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDApCi0jZGVmaW5lIFBIWV9TVEFUVVNfMTBUX0hfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDExKQotI2RlZmluZSBQSFlfU1RBVFVTXzEwVF9GX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwMDApCi0jZGVmaW5lIFBIWV9TVEFUVVNfMTBUX0ZfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEyKQotI2RlZmluZSBQSFlfU1RBVFVTXzEwMF9YX0hfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDIwMDApCi0jZGVmaW5lIFBIWV9TVEFUVVNfMTAwX1hfSF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEzKQotI2RlZmluZSBQSFlfU1RBVFVTXzEwMF9YX0ZfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCi0jZGVmaW5lIFBIWV9TVEFUVVNfMTAwX1hfRl9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0KQotI2RlZmluZSBQSFlfU1RBVFVTXzEwMFQ0X01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCi0jZGVmaW5lIFBIWV9TVEFUVVNfMTAwVDRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE1KQotCi0jZGVmaW5lIFBIWV9JRDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgyKQotI2RlZmluZSBQSFlfSUQxX09VSV9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4RkZGRikKLSNkZWZpbmUgUEhZX0lEMV9PVUlfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwKQotCi0jZGVmaW5lIFBIWV9JRDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgzKQotI2RlZmluZSBQSFlfSUQyX1JOX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4RikKLSNkZWZpbmUgUEhZX0lEMl9STl9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwKQotI2RlZmluZSBQSFlfSUQyX01OX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4M0YwKQotI2RlZmluZSBQSFlfSUQyX01OX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDQpCi0jZGVmaW5lIFBIWV9JRDJfT1VJX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHhGQzAwKQotI2RlZmluZSBQSFlfSUQyX09VSV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEwKQotCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDQpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UX1NFTEVDVE9SX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxRikKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0FEVkVSVElTRU1FTlRfU0VMRUNUT1JfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICgwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9BMF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMCkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0FEVkVSVElTRU1FTlRfQTBfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDUpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UX0ExX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9BMV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNikKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0FEVkVSVElTRU1FTlRfQTJfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODApCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UX0EyX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg3KQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9BM19NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDApCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UX0EzX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg4KQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9BNF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDApCi0jZGVmaW5lIFBIWV9BVVRPX05FR19BRFZFUlRJU0VNRU5UX0E0X09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg5KQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9UQUZfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxRkUwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9UQUZfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0FEVkVSVElTRU1FTlRfUkZfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwMCkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0FEVkVSVElTRU1FTlRfUkZfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEzKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9SU1ZEX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9SVlNEX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0KQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9OUF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfQURWRVJUSVNFTUVOVF9OUF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTUpCi0KLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0xJTktfUEFSVE5FUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0xJTktfUEFSVE5FUl9TNF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MUYpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19MSU5LX1BBUlRORVJfUzRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfTElOS19QQVJUTkVSX0E3X01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxRkUwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfTElOS19QQVJUTkVSX0E3X09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0xJTktfUEFSVE5FUl9SRl9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwMCkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0xJTktfUEFSVE5FUl9SRl9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEzKQotI2RlZmluZSBQSFlfQVVUT19ORUdfTElOS19QQVJUTkVSX0FDS19NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQotI2RlZmluZSBQSFlfQVVUT19ORUdfTElOS19QQVJUTkVSX0FDS19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTQpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19MSU5LX1BBUlRORVJfTlBfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCi0jZGVmaW5lIFBIWV9BVVRPX05FR19MSU5LX1BBUlRORVJfTlBfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxNSkKLQotI2RlZmluZSBQSFlfQVVUT19ORUdfRVhQQU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg2KQotI2RlZmluZSBQSFlfQVVUT19ORUdfRVhQQU5TSU9OX0xQQU5FR0FfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxKQotI2RlZmluZSBQSFlfQVVUT19ORUdfRVhQQU5TSU9OX0xQQU5FR0FfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCkKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0VYUEFOU0lPTl9QUlhfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MikKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0VYUEFOU0lPTl9QUlhfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19FWFBBTlNJT05fTlBBX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQpCi0jZGVmaW5lIFBIWV9BVVRPX05FR19FWFBBTlNJT05fTlBBX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgyKQotI2RlZmluZSBQSFlfQVVUT19ORUdfRVhQQU5TSU9OX0xQTlBBX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4KQotI2RlZmluZSBQSFlfQVVUT19ORUdfRVhQQU5TSU9OX0xQTlBBX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMykKLSNkZWZpbmUgUEhZX0FVVE9fTkVHX0VYUEFOU0lPTl9QREZfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTApCi0jZGVmaW5lIFBIWV9BVVRPX05FR19FWFBBTlNJT05fUERGX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg0KQotCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTYpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfUlhDQ19NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfUlhDQ19PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwKQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX1BDU0JQX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyKQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX1BDU0JQX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19SVlNQT0xfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTApCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfUlZTUE9MX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg0KQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX0FQT0xfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMCkgIAotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX0FQT0xfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19HUElPMF9ESVJfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NDApCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfR1BJTzBfRElSX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg2KQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX0dQSU8wX0RBVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19HUElPMF9EQVRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDcpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfR1BJTzFfRElSX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwMCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19HUElPMV9ESVJfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfR1BJTzFfREFUX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDIwMCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19HUElPMV9EQVRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDkpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfMTBCVF9OQVRVUkFMX0xPT1BCQUNLX0RBVF9NU0sgICAgICAgKDB4NDAwKQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDXzEwQlRfTkFUVVJBTF9MT09QQkFDS19EQVRfT0ZTVCAgICAgICgxMCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ18xMEJUX1NRRV9URVNUX0lOSElCSVRfTVNLICAgICAgICAgICAoMHg4MDApCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfMTBCVF9TUUVfVEVTVF9JTkhJQklUX09GU1QgICAgICAgICAgKDExKQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX1RYSElNX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBQSFlfVkVORE9SX1NQRUNJRklDX1RYSElNX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTIpCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfSU5UX0xFVkVMX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCi0jZGVmaW5lIFBIWV9WRU5ET1JfU1BFQ0lGSUNfSU5UX0xFVkVMX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxNCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19SUFRSX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODAwMCkKLSNkZWZpbmUgUEhZX1ZFTkRPUl9TUEVDSUZJQ19SUFRSX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE1KQotCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTcpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9BTkVHX0NPTVBfSU5UX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9BTkVHX0NPTVBfSU5UX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUkZBVUxUX0lOVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUkZBVUxUX0lOVF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX0xTX0NIR19JTlRfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX0xTX0NIR19JTlRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDIpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9MUF9BQ0tfSU5UX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9MUF9BQ0tfSU5UX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgzKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUERGX0lOVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUERGX0lOVF9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX1BSWF9JTlRfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX1BSWF9JTlRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDUpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9SWEVSX0lOVF9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUlhFUl9JTlRfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNikKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX0pBQkJFUl9JTlRfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODApCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9KQUJCRVJfSU5UX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg3KQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfQU5FR19DT01QX0lFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDApCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9BTkVHX0NPTVBfSUVfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg4KQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfUkZBVUxUX0lFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDApCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9SRkFVTFRfSUVfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg5KQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfTFNfQ0hHX0lFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDApCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9MU19DSEdfSUVfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxMCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX0xQX0FDS19JRV9NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODAwKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfTFBfQUNLX0lFX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTEpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9QREZfSUVfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTAwMCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX1BERl9JRV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTIpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9QUlhfSUVfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwMCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX1BSWF9JRV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTMpCi0jZGVmaW5lIFBIWV9JUlFfQ09OVFJPTF9SWEVSX0lFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NDAwMCkKLSNkZWZpbmUgUEhZX0lSUV9DT05UUk9MX1JYRVJfSUVfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0KQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfSkFCQkVSX0lFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQotI2RlZmluZSBQSFlfSVJRX0NPTlRST0xfSkFCQkVSX0lFX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTUpCi0KLSNkZWZpbmUgUEhZX0RJQUdOT1NUSUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxOCkKLSNkZWZpbmUgUEhZX0RJQUdOT1NUSUNfUlhfTE9DS19NU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDApCi0jZGVmaW5lIFBIWV9ESUFHTk9TVElDX1JYX0xPQ0tfT0ZTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgpCi0jZGVmaW5lIFBIWV9ESUFHTk9TVElDX1JYX1BBU1NfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwKQotI2RlZmluZSBQSFlfRElBR05PU1RJQ19SWF9QQVNTX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg5KQotI2RlZmluZSBQSFlfRElBR05PU1RJQ19SQVRFX01TSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMCkKLSNkZWZpbmUgUEhZX0RJQUdOT1NUSUNfUkFURV9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMTApCi0jZGVmaW5lIFBIWV9ESUFHTk9TVElDX0RQTFhfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODAwKQotI2RlZmluZSBQSFlfRElBR05PU1RJQ19EUExYX09GU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxMSkKLSNkZWZpbmUgUEhZX0RJQUdOT1NUSUNfQU5FR0ZfTVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBQSFlfRElBR05PU1RJQ19BTkVHRl9PRlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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VEJfUElOCTEwCisjZGVmaW5lIE5BUzEwMERfUENJX0lOVENfUElOCTkKKyNkZWZpbmUgTkFTMTAwRF9QQ0lfSU5URF9QSU4JOAorI2RlZmluZSBOQVMxMDBEX1BDSV9JTlRFX1BJTgk3CisKKy8qIEdQSU8gKi8KKworI2RlZmluZSBOQVMxMDBEX0dQSU8wICAgICAgICAgICAwCisjZGVmaW5lIE5BUzEwMERfR1BJTzEgICAgICAgICAgIDEKKyNkZWZpbmUgTkFTMTAwRF9HUElPMiAgICAgICAgICAgMgorI2RlZmluZSBOQVMxMDBEX0dQSU8zICAgICAgICAgICAzCisjZGVmaW5lIE5BUzEwMERfR1BJTzQgICAgICAgICAgIDQKKyNkZWZpbmUgTkFTMTAwRF9HUElPNSAgICAgICAgICAgNQorI2RlZmluZSBOQVMxMDBEX0dQSU82ICAgICAgICAgICA2CisjZGVmaW5lIE5BUzEwMERfR1BJTzcgICAgICAgICAgIDcKKyNkZWZpbmUgTkFTMTAwRF9HUElPOCAgICAgICAgICAgOAorI2RlZmluZSBOQVMxMDBEX0dQSU85ICAgICAgICAgICA5CisjZGVmaW5lIE5BUzEwMERfR1BJTzEwICAgICAgICAgIDEwCisjZGVmaW5lIE5BUzEwMERfR1BJTzExICAgICAgICAgIDExCisjZGVmaW5lIE5BUzEwMERfR1BJTzEyICAgICAgICAgIDEyCisjZGVmaW5lIE5BUzEwMERfR1BJTzEzICAgICAgICAgIDEzCisjZGVmaW5lIE5BUzEwMERfR1BJTzE0ICAgICAgICAgIDE0CisjZGVmaW5lIE5BUzEwMERfR1BJTzE1ICAgICAgICAgIDE1CisKKworLyogQnV0dG9ucyAqLworCisjZGVmaW5lIE5BUzEwMERfUEJfR1BJTyAgICAgICAgIE5BUzEwMERfR1BJTzE0CisjZGVmaW5lIE5BUzEwMERfUkJfR1BJTyAgICAgICAgIE5BUzEwMERfR1BJTzQKKyNkZWZpbmUgTkFTMTAwRF9QT19HUElPICAgICAgICAgTkFTMTAwRF9HUElPMTIgIC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gICAgICAgICAgICAgICAgICAgMHgyMAotI2RlZmluZSBWSUNfVkVDVF9BRERSICAgICAgICAgICAgICAgICAgIDB4MzAKLSNkZWZpbmUgVklDX0RFRl9WRUNUX0FERFIgICAgICAgICAgICAgICAweDM0Ci0jZGVmaW5lIFZJQ19WRUNUX0FERFIwICAgICAgICAgICAgICAgICAgMHgxMDAJLyogMCB0byAxNSAqLwotI2RlZmluZSBWSUNfVkVDVF9DTlRMMCAgICAgICAgICAgICAgICAgIDB4MjAwCS8qIDAgdG8gMTUgKi8KLSNkZWZpbmUgVklDX0lUQ1IgICAgICAgICAgICAgICAgICAgICAgICAweDMwMCAgIC8qIFZJQyB0ZXN0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KLQotI2RlZmluZSBWSUNfRklRX1JBV19TVEFUVVMgICAgICAgICAgICAgIDB4MDgKLSNkZWZpbmUgVklDX0ZJUV9FTkFCTEUgICAgICAgICAgICAgICAgICAweDEwCS8qIDEgPSBlbmFibGUsIDAgPSBkaXNhYmxlICovCi0jZGVmaW5lIFZJQ19GSVFfRU5BQkxFX0NMRUFSICAgICAgICAgICAgMHgxNAotI2RlZmluZSBWSUNfRklRX1NPRlQgICAgICAgICAgICAgICAgICAgIDB4MTgKLSNkZWZpbmUgVklDX0ZJUV9TT0ZUX0NMRUFSICAgICAgICAgICAgICAweDFDCisvKiBWSUMgZGVmaW5pdGlvbnMgaW4gaW5jbHVkZS9hc20tYXJtL2hhcmR3YXJlL3ZpYy5oICovCiAKICNkZWZpbmUgU0lDX0lSUV9TVEFUVVMgICAgICAgICAgICAgICAgICAwCiAjZGVmaW5lIFNJQ19JUlFfUkFXX1NUQVRVUyAgICAgICAgICAgICAgMHgwNApAQCAtMzI1LDggKzMwNiw2IEBACiAjZGVmaW5lIFNJQ19JTlRfUElDX0VOQUJMRVMgICAgICAgICAgICAgMHgyMAkvKiBzZXQgaW50ZXJydXB0IHBhc3MgdGhyb3VnaCBiaXRzICovCiAjZGVmaW5lIFNJQ19JT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yAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCJtb3ZsICUlZXNpLCUwIiA6ICI9bSIobmV3cmVncy0+ZXNpKSk7CisgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygibW92bCAlJWVkaSwlMCIgOiAiPW0iKG5ld3JlZ3MtPmVkaSkpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIm1vdmwgJSVlYnAsJTAiIDogIj1tIihuZXdyZWdzLT5lYnApKTsKKyAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCJtb3ZsICUlZWF4LCUwIiA6ICI9bSIobmV3cmVncy0+ZWF4KSk7CisgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygibW92bCAlJWVzcCwlMCIgOiAiPW0iKG5ld3JlZ3MtPmVzcCkpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIm1vdncgJSVzcywgJSVheDsiIDoiPWEiKG5ld3JlZ3MtPnhzcykpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIm1vdncgJSVjcywgJSVheDsiIDoiPWEiKG5ld3JlZ3MtPnhjcykpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIm1vdncgJSVkcywgJSVheDsiIDoiPWEiKG5ld3JlZ3MtPnhkcykpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIm1vdncgJSVlcywgJSVheDsiIDoiPWEiKG5ld3JlZ3MtPnhlcykpOworICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oInB1c2hmbDsgcG9wbCAlMCIgOiI9bSIobmV3cmVncy0+ZWZsYWdzKSk7CisKKyAgICAgICAgICAgICAgIG5ld3JlZ3MtPmVpcCA9ICh1bnNpZ25lZCBsb25nKWN1cnJlbnRfdGV4dF9hZGRyKCk7CisgICAgICAgfQorf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ZmluZSB0YXNrX3B0X3JlZ3ModGFzaykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAoeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgICBzdHJ1Y3QgcHRfcmVncyAqX19yZWdzX187ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgIF9fcmVnc19fID0gKHN0cnVjdCBwdF9yZWdzICopS1NUS19UT1AoKHRhc2spLT50aHJlYWRfaW5mbyk7ICAgICBcCisgICAgICAgX19yZWdzX18gPSAoc3RydWN0IHB0X3JlZ3MgKikoS1NUS19UT1AodGFza19zdGFja19wYWdlKHRhc2spKS04KTsgXAogICAgICAgIF9fcmVnc19fIC0gMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiB9KQogCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FzbS1pMzg2L3B0cmFjZS5oIGIvaW5jbHVkZS9hc20taTM4Ni9wdHJhY2UuaAppbmRleCA3ZTBmMjk0Li5mMzI0YzUzIDEwMDY0NAotLS0gYS9pbmNsdWRlL2FzbS1pMzg2L3B0cmFjZS5oCisrKyBiL2luY2x1ZGUvYXNtLWkzODYvcHRyYWNlLmgKQEAgLTU0LDYgKzU0LDkgQEAKICNkZWZpbmUgUFRSQUNFX0dFVF9USFJFQURfQVJFQSAgICAyNQogI2RlZmluZSBQVFJBQ0VfU0VUX1RIUkVBRF9BUkVBICAgIDI2CiAKKyNkZWZpbmUgUFRSQUNFX1NZU0VNVQkJICAzMQorI2RlZmluZSBQVFJBQ0VfU1lTRU1VX1NJTkdMRVNURVAgIDMyCisKICNpZmRlZiBfX0tFUk5FTF9fCiAKICNpbmNsdWRlIDxhc20vdm04Ni5oPgpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20taTM4Ni9zaWduYWwuaCBiL2lu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U0UgJiYgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodWludDY0X3QpKHgpID49IFBDSTMyX01BUFBFRF9CQVNFKQotI2RlZmluZSBJU19QQ0kzMl9ESVJFQ1QoeCkgICAgICAgICAgICAgICgodWludDY0X3QpKHgpID49IFBDSTMyX01BUFBFRF9CQVNFKQorI2RlZmluZSBJU19QQ0kzMl9NQVBQRUQoeCkgICAgICAgICAgICAgICgodTY0KSh4KSA8IFBDSTMyX0RJUkVDVF9CQVNFICYmIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHU2NCkoeCkgPj0gUENJMzJfTUFQUEVEX0JBU0UpCisjZGVmaW5lIElTX1BDSTMyX0RJUkVDVCh4KSAgICAgICAgICAgICAgKCh1NjQpKHgpID49IFBDSTMyX01BUFBFRF9CQVNFKQogCiAKIC8qCkBAIC02Myw3ICs2Myw3IEBACiAJKElPUEcoSU9QR09GRihhZGRyKSArIChzaXplKSAtIDEpID09IElPUEcoKHNpemUpIC0gMSkpCiAKICNkZWZpbmUgTUlOSU1BTF9BVEVfRkxBRyhhZGRyLCBzaXplKSBcCi0JKE1JTklNQUxfQVRFU19SRVFVSVJFRCgodWludDY0X3QpYWRkciwgc2l6ZSkgPyAxIDogMCkKKwkoTUlOSU1BTF9BVEVTX1JFUVVJUkVEKCh1NjQpYWRkciwgc2l6ZSkgPyAxIDogMCkKIAogLyogYml0IDI5IG9mIHRoZSBwY2kgYWRkcmVzcyBpcyB0aGUgU1dBUCBiaXQgKi8KICNkZWZpbmUgQVRFX1NXQVBTSElGVCAgICAgICAgICAgICAgICAgICAyOQpAQCAtOTAsMjcgKzkwLDI3IEBACiAgKiBQTVUgcmVzb3VyY2VzLgogICovCiBzdHJ1Y3QgYXRlX3Jlc291cmNlewotCXVpbnQ2NF90ICphdGU7Ci0JdWludDY0X3QgbnVtX2F0ZTsKLQl1aW50NjRfdCBsb3dlc3RfZnJlZV9pbmRleDsKKw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MgYSBkZXNjcmlwdGlvbiBvZiB0aGUgR2V0L1B1dCBwb2ludGVycyB1c2VkIHRvIG1hbmFnZSB0aGVzZQorICogdHdvIG1lc3NhZ2UgcXVldWVzLiBDb25zaWRlciB0aGUgbG9jYWxfbXNncXVldWUgdG8gYmUgb24gb25lIHBhcnRpdGlvbgorICogYW5kIHRoZSByZW1vdGVfbXNncXVldWUgdG8gYmUgaXRzIGNhY2hlZCBjb3B5IG9uIGFub3RoZXIgcGFydGl0aW9uLiBBCisgKiBkZXNjcmlwdGlvbiBvZiB3aGF0IGVhY2ggb2YgdGhlIGxldHRlcmVkIGFyZWFzIGNvbnRhaW5zIGlzIGluY2x1ZGVkLgorICoKKyAqCisgKiAgICAgICAgICAgICAgICAgICAgIGxvY2FsX21zZ3F1ZXVlICAgICAgcmVtb3RlX21zZ3F1ZXVlCisgKgorICogICAgICAgICAgICAgICAgICAgICAgICB8Ly8vLy8vLy8vfCAgICAgIHwvLy8vLy8vLy98CisgKiAgICB3X3JlbW90ZV9HUC5nZXQgLS0+ICstLS0tLS0tLS0rICAgICAgfC8vLy8vLy8vL3wKKyAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBGICAgIHwgICAgICB8Ly8vLy8vLy8vfAorICogICAgIHJlbW90ZV9HUC5nZXQgIC0tPiArLS0tLS0tLS0tKyAgICAgICstLS0tLS0tLS0rIDwtLSBsb2NhbF9HUC0+Z2V0CisgKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgfCAgICAgICAgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8ICAgIEUgICAgfAorICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgIHwgICAgICAgICB8CisgKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgKy0tLS0tLS0tLSsgPC0tIHdfbG9jYWxfR1AuZ2V0CisgKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgQiAgICB8ICAgICAgfC8vLy8vLy8vL3wKKyAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8Ly8vL0QvLy8vfAorICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgIHwvLy8vLy8vLy98CisgKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgKy0tLS0tLS0tLSsgPC0tIHdfcmVtb3RlX0dQLnB1dAorICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgIHwvLy8vQy8vLy98CisgKiAgICAgIGxvY2FsX0dQLT5wdXQgLS0+ICstLS0tLS0tLS0rICAgICAgKy0tLS0tLS0tLSsgPC0tIHJlbW90ZV9HUC5wdXQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIHwgICAgICB8Ly8vLy8vLy8vfAorICogICAgICAgICAgICAgICAgICAgICAgICB8ICAgIEEgICAgfCAgICAgIHwvLy8vLy8vLy98CisgKiAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICB8ICAgICAgfC8vLy8vLy8vL3wKKyAqICAgICB3X2xvY2FsX0dQLnB1dCAtLT4gKy0tLS0tLS0tLSsgICAgICB8Ly8vLy8vLy8vfAorICogICAgICAgICAgICAgICAgICAgICAgICB8Ly8vLy8vLy8vfCAgICAgIHwvLy8vLy8vLy98CisgKgorICoKKyAqCSAgICAoIHJlbW90ZV9HUC5bZ2V0fHB1dF0gYXJlIGNhY2hlZCBjb3BpZXMgb2YgdGhlIHJlbW90ZQorICoJICAgICAgcGFydGl0aW9uJ3MgbG9jYWxfR1AtPltnZXR8cHV0XSwgYW5kIHRodXMgdGhlaXIgdmFsdWVzIGNhbgorICoJICAgICAgbGFnIGJlaGluZCB0aGVpciBjb3VudGVycGFydHMgb24gdGhlIHJlbW90ZSBwYXJ0aXRpb24uICkKKyAqCisgKgorICogIEEgLSBNZXNzYWdlcyB0aGF0IGhhdmUg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worICAgIGNhc2UgQUdfSVNBOiByZXR1cm4gKHUxNiBfX2lvbWVtICopQUdfSVNBX0lPX1coYWRkcik7CiAjZW5kaWYKLSAgICBkZWZhdWx0OiByZXR1cm4gMDsgLyogYXZvaWQgd2FybmluZ3MsIGp1c3QgaW4gY2FzZSAqLworICAgIGRlZmF1bHQ6IHJldHVybiBOVUxMOyAvKiBhdm9pZCB3YXJuaW5ncywganVzdCBpbiBjYXNlICovCiAgICAgfQogfQotc3RhdGljIGlubGluZSB1OCAqaXNhX210Yih1bnNpZ25lZCBsb25nIGFkZHIpCitzdGF0aWMgaW5saW5lIHU4IF9faW9tZW0gKmlzYV9tdGIodW5zaWduZWQgbG9uZyBhZGRyKQogewogICBzd2l0Y2goSVNBX1RZUEUpCiAgICAgewogI2lmZGVmIENPTkZJR19RNDAKLSAgICBjYXNlIFE0MF9JU0E6IHJldHVybiAodTggKilRNDBfSVNBX01FTV9CKGFkZHIpOworICAgIGNhc2UgUTQwX0lTQTogcmV0dXJuICh1OCBfX2lvbWVtICopUTQwX0lTQV9NRU1fQihhZGRyKTsKICNlbmRpZgogI2lmZGVmIENPTkZJR19HRzIKLSAgICBjYXNlIEdHMl9JU0E6IHJldHVybiAodTggKilHRzJfSVNBX01FTV9CKGFkZHIpOworICAgIGNhc2UgR0cyX0lTQTogcmV0dXJuICh1OCBfX2lvbWVtICopR0cyX0lTQV9NRU1fQihhZGRyKTsKICNlbmRpZgogI2lmZGVmIENPTkZJR19BTUlHQV9QQ01DSUEKLSAgICBjYXNlIEFHX0lTQTogcmV0dXJuICh1OCAqKWFkZHI7CisgICAgY2FzZSBBR19JU0E6IHJldHVybiAodTggX19pb21lbSAqKWFkZHI7CiAjZW5kaWYKLSAgICBkZWZhdWx0OiByZXR1cm4gMDsgLyogYXZvaWQgd2FybmluZ3MsIGp1c3QgaW4gY2FzZSAqLworICAgIGRlZmF1bHQ6IHJldHVybiBOVUxMOyAvKiBhdm9pZCB3YXJuaW5ncywganVzdCBpbiBjYX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gIHRoZSBmcmFtZSBidWZmZXIgKGZvciB1c2UgYnkgZWFybHkgYm9vdCBtZXNzYWdlKSAqLworICAgIF9fdTgqICAgICAgIGxvZ2ljYWxEaXNwbGF5QmFzZTsKKworICAgIC8qIE5FVyAodmVycy4gNCkgQXBwbGUncyBtYWNoaW5lIGlkZW50aWZpY2F0aW9uICovCisgICAgX191MzIgICAgICAgbWFjaGluZUlEOworCisgICAgLyogTkVXICh2ZXJzLiA0KSBEZXRlY3RlZCBodyBhcmNoaXRlY3R1cmUgKi8KKyAgICBfX3UzMiAgICAgICBhcmNoaXRlY3R1cmU7CisKKyAgICAvKiBUaGUgZGV2aWNlIHRyZWUgKGludGVybmFsIGFkZHJlc3NlcyByZWxhdGl2ZSB0byB0aGUgYmVnaW5uaW5nIG9mIHRoZSB0cmVlLAorICAgICAqIGRldmljZSB0cmVlIG9mZnNldCByZWxhdGl2ZSB0byB0aGUgYmVnaW5uaW5nIG9mIHRoaXMgc3RydWN0dXJlKS4KKyAgICAgKiBPbiBwcmUtUENJIG1hY2ludG9zaCAoQk9PVF9BUkNIX1BDSSBiaXQgc2V0IHRvIDAgaW4gYXJjaGl0ZWN0dXJlKSwgdGhpcworICAgICAqIGZpZWxkIGlzIDAuCisgICAgICovCisgICAgX191MzIgICAgICAgZGV2aWNlVHJlZU9mZnNldDsgICAgICAgIC8qIERldmljZSB0cmVlIG9mZnNldCAqLworICAgIF9fdTMyICAgICAgIGRldmljZVRyZWVTaXplOyAgICAgICAgICAvKiBTaXplIG9mIHRoZSBkZXZpY2UgdHJlZSAqLworCisgICAgLyogU29tZSBpbmZvcyBhYm91dCB0aGUgY3VycmVudCBNYWNPUyBkaXNwbGF5ICovCisgICAgX191MzIgICAgICAgZGlzcERldmljZVJlY3RbNF07ICAgICAgIC8qIGxlZnQsdG9wLHJpZ2h0LGJvdHRvbSAqLworICAgIF9fdTMyICAgICAgIGRpc3BEZXZpY2VEZXB0aDsgICAgICAgICAvKiAoOCwgMTYgb3IgMzIpICovCisgICAgX191OCogICAgICAgZGlzcERldmljZUJhc2U7ICAgICAgICAgIC8qIGJhc2UgYWRkcmVzcyAocGh5c2ljYWwpICovCisgICAgX191MzIgICAgICAgZGlzcERldmljZVJvd0J5dGVzOyAgICAgIC8qIHJvd2J5dGVzIChpbiBieXRlcykgKi8KKyAgICBfX3UzMiAgICAgICBkaXNwRGV2aWNlQ29sb3JzT2Zmc2V0OyAgLyogQ29sb3JtYXAgKDggYml0cyBvbmx5KSBvciAwICgqKSAqLworICAgIC8qIE9wdGlvbmFsIG9mZnNldCBpbiB0aGUgcmVnaXN0cnkgdG8gdGhlIGN1cnJlbnQKKyAgICAgKiBNYWNPUyBkaXNwbGF5LiAoQ2FuIGJlIDAgd2hlbiBub3QgZGV0ZWN0ZWQpICovCisgICAgIF9fdTMyICAgICAgZGlzcERldmljZVJlZ0VudHJ5T2Zmc2V0OworCisgICAgLyogT3B0aW9uYWwgcG9pbnRlciB0byBib290IHJhbWRpc2sgKG9mZnNldCBmcm9tIHRoaXMgc3RydWN0dXJlKSAqLworICAgIF9fdTMyICAgICAgIHJhbURpc2s7CisgICAgX191MzIgICAgICAgcmFtRGlza1NpemU7ICAgICAgICAgICAgIC8qIHNpemUgb2YgcmFtZGlzayBpbWFnZSAqLworCisgICAgLyogS2VybmVsIGNvbW1hbmQgbGluZSBhcmd1bWVudHMgKG9mZnNldCBmcm9tIHRoaXMgc3RydWN0dXJlKSAqLworICAgIF9fdTMyICAgICAgIGtlcm5lbFBhcmFtc09mZnNldDsKKworICAgIC8qIEFMTCBCRUxPVyBORVcgKHZlcnMuIDQpICovCisKKyAgICAvKiBUaGlzIGRlZmluZXMgdGhlIHBoeXNpY2FsIG1lbW9yeS4gVmFsaWQgd2l0aCBCT09UX0FSQ0hfTlVCVVMgZmxhZworICAgICAgIChub24tUENJKSBvbmx5LiBPbiBQQ0ksIG1lbW9yeSBpcyBjb250aWd1b3VzIGFuZCBpdCdzIHNpemUgaXMgaW4gdGhlCisgICAgICAgZGV2aWNlLXRyZWUuICovCisgICAgYm9vdF9pbmZvX21hcF9lbnRyeV90CisgICAgCSAgICAgICAgcGh5c01lbW9yeU1hcFtNQVhfTUVNX01BUF9TSVpFXTsgLyogV2hlcmUgdGhlIHBoeXMgbWVtb3J5IGlzICovCisgICAgX191MzIgICAgICAgcGh5c01lbW9yeU1hcFNpemU7ICAgICAgICAgICAgICAgLyogSG93IG1hbnkgZW50cmllcyBpbiBtYXAgKi8KKworCisgICAgLyogVGhlIGZyYW1lYnVmZmVyIHNpemUgKG9wdGlvbmFsLCBjdXJyZW50bHkgMCkgKi8KKyAgICBfX3UzMiAgICAgICBmcmFtZUJ1ZmZlclNpemU7ICAgICAgICAgLyogUmVwcmVzZW50cyBhIG1heCBzaXplLCBjYW4gYmUgMC4gKi8KKworICAgIC8qIE5FVyAodmVycy4gNSkgKi8KKworICAgIC8qIFRvdGFsIHBhcmFtcyBzaXplIChhcmdzICsgY29sb3JtYXAgKyBkZXZpY2UgdHJlZSArIHJhbWRpc2spICovCisgICAgX191MzIgICAgICAgdG90YWxQYXJhbXNTaXplOworCit9IGJvb3RfaW5mb3NfdDsKKworI2lmZGVmIF9fS0VSTkVMX18KKy8qICgqKSBUaGUgZm9ybWF0IG9mIHRoZSBjb2xvcm1hcCBpcyAyNTYgKiAzICogMiBieXRlcy4gRWFjaCBjb2xvciBpbmRleAorICogaXMgcmVwcmVzZW50ZWQgYnkgMyBzaG9ydCB3b3JkcyBjb250YWluaW5nIGEgMTYgYml0cyAodW5zaWduZWQpIGNvbG9yCisgKiBjb21wb25lbnQuIExhdGVyIHZlcnNpb25zIG1heSBjb250YWluIHRoZSBnYW1tYSB0YWJsZSBmb3IgZGlyZWN0LWNvbG9yCisgKiBkZXZpY2VzIGhlcmUuCisgKi8KKyNkZWZpbmUgQk9PVFhfQ09MT1JUQUJMRV9TSVpFICAgICgyNTZVTCozVUwqMlVMKQorCisvKiBCb290WCBwYXNzZXMgdGhlIGRldmljZS10cmVlIHVzaW5nIG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KVxuIgorCQkJInN0ZCAgICAxMywxMDQoJTIpXG4iCisJCQkic3RkICAgIDE0LDExMiglMilcbiIKKwkJCSJzdGQgICAgMTUsMTIwKCUyKVxuIgorCQkJInN0ZCAgICAxNiwxMjgoJTIpXG4iCisJCQkic3RkICAgIDE3LDEzNiglMilcbiIKKwkJCSJzdGQgICAgMTgsMTQ0KCUyKVxuIgorCQkJInN0ZCAgICAxOSwxNTIoJTIpXG4iCisJCQkic3RkICAgIDIwLDE2MCglMilcbiIKKwkJCSJzdGQgICAgMjEsMTY4KCUyKVxuIgorCQkJInN0ZCAgICAyMiwxNzYoJTIpXG4iCisJCQkic3RkICAgIDIzLDE4NCglMilcbiIKKwkJCSJzdGQgICAgMjQsMTkyKCUyKVxuIgorCQkJInN0ZCAgICAyNSwyMDAoJTIpXG4iCisJCQkic3RkICAgIDI2LDIwOCglMilcbiIKKwkJCSJzdGQgICAgMjcsMjE2KCUyKVxuIgorCQkJInN0ZCAgICAyOCwyMjQoJTIpXG4iCisJCQkic3RkICAgIDI5LDIzMiglMilcbiIKKwkJCSJzdGQgICAgMzAsMjQwKCUyKVxuIgorCQkJInN0ZCAgICAzMSwyNDgoJTIpXG4iCisJCQkibWZtc3IgICUwXG4iCisJCQkic3RkICAgICUwLCAyNjQoJTIpXG4iCisJCQkibWZjdHIgICUwXG4iCisJCQkic3RkICAgICUwLCAyODAoJTIpXG4iCisJCQkibWZsciAgICUwXG4iCisJCQkic3RkICAgICUwLCAyODgoJTIpXG4iCisJCQkiYmwgICAgIDFmXG4iCisJCSIxOiAgICAgbWZsciAgICUxXG4iCisJCQkic3RkICAgICUxLCAyNTYoJTIpXG4iCisJCQkibXRsciAgICUwXG4iCisJCQkibWZ4ZXIgICUwXG4iCisJCQkic3RkICAgICUwLCAyOTYoJTIpXG4iCisJCQk6ICI9JnIiICh0bXAxKSwgIj0mciIgKHRtcDIpCisJCQk6ICJiIiAobmV3cmVncykpOworCX0KK30KKyNlbHNlCisvKgorICogUHJvdmlk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2VycGMvcGFycG9ydC5oCisrKyBiL2luY2x1ZGUvYXNtLXBvd2VycGMvcGFycG9ydC5oCkBAIC04LDExICs4LDM3IEBACiAKICNpZm5kZWYgX0FTTV9QT1dFUlBDX1BBUlBPUlRfSAogI2RlZmluZSBfQVNNX1BPV0VSUENfUEFSUE9SVF9ICisjaWZkZWYgX19LRVJORUxfXwogCi1zdGF0aWMgaW50IF9fZGV2aW5pdCBwYXJwb3J0X3BjX2ZpbmRfaXNhX3BvcnRzIChpbnQgYXV0b2lycSwgaW50IGF1dG9kbWEpOworI2luY2x1ZGUgPGFzbS9wcm9tLmg+CisKK2V4dGVybiBzdHJ1Y3QgcGFycG9ydCAqcGFycG9ydF9wY19wcm9iZV9wb3J0ICh1bnNpZ25lZCBsb25nIGludCBiYXNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgaW50IGJhc2VfaGksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGlycSwgaW50IGRtYSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgcGNpX2RldiAqZGV2KTsKKwogc3RhdGljIGludCBfX2RldmluaXQgcGFycG9ydF9wY19maW5kX25vbnBjaV9wb3J0cyAoaW50IGF1dG9pcnEsIGludCBhdXRvZG1hKQogewotCXJldHVybiBwYXJwb3J0X3BjX2ZpbmRfaXNhX3BvcnRzIChhdXRvaXJxLCBhdXRvZG1hKTsKKwlzdHJ1Y3QgZGV2aWNlX25vZGUgKm5wOworCXUzMiAqcHJvcDsKKwl1MzIgaW8xLCBpbzI7CisJaW50IHByb3BzaXplOworCWludCBjb3VudCA9IDA7CisJZm9yIChucCA9IE5VTEw7IChucCA9IG9mX2ZpbmRfY29tcGF0aWJsZV9ub2RlKG5wLAorCQkJCQkJICAgICAgInBhcmFsbGVsIiwKKwkJCQkJCSAgICAgICJwbnB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AZ290KHIyKQorI2RlZmluZSBMT0FEX1JFR19BRERSKHJlZyxuYW1lKQkJCVwKKwlsZAkocmVnKSxuYW1lQGdvdChyMikKIAotI2RlZmluZSBPRkYobmFtZSkJMAotCi0jZGVmaW5lIFNFVF9SRUdfVE9fQ09OU1QocmVnLCB2YWx1ZSkJICAgICAgICAgCVwKLQlsaXMgICAgIHJlZywoKCh2YWx1ZSk+PjQ4KSYweEZGRkYpOyAgICAgICAgICAgICBcCi0Jb3JpICAgICByZWcscmVnLCgoKHZhbHVlKT4+MzIpJjB4RkZGRik7ICAgICAgICAgXAotCXJsZGljciAgcmVnLHJlZywzMiwzMTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlvcmlzICAgIHJlZyxyZWcsKCgodmFsdWUpPj4xNikmMHhGRkZGKTsgICAgICAgICBcCi0Jb3JpICAgICByZWcscmVnLCgodmFsdWUpJjB4RkZGRik7Ci0KLSNkZWZpbmUgU0VUX1JFR19UT19MQUJFTChyZWcsIGxhYmVsKQkgICAgICAgICAJXAotCWxpcyAgICAgcmVnLChsYWJlbClAaGlnaGVzdDsgICAgICAgICAgICAgICAgICAgIFwKLQlvcmkgICAgIHJlZyxyZWcsKGxhYmVsKUBoaWdoZXI7ICAgICAgICAgICAgICAgICBcCi0JcmxkaWNyICByZWcscmVnLDMyLDMxOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCW9yaXMgICAgcmVnLHJlZywobGFiZWwpQGg7ICAgICAgICAgICAgICAgICAgICAgIFwKLQlvcmkgICAgIHJlZyxyZWcsKGxhYmVsKUBsOworI2RlZmluZSBMT0FEX1JFR19BRERSQkFTRShyZWcsbmFtZSkJTE9BRF9SRUdfQUREUihyZWcsbmFtZSkKKyNkZWZpbmUgQUREUk9GRihuYW1lKQkJCTAKIAogLyogb2Zmc2V0cyBmb3Igc3RhY2sgZnJhbWUgbGF5b3V0ICovCiAjZGVmaW5lIExSU0FWRQkxNgogCiAjZWxzZSAvKiAzMi1iaXQgKi8KL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yMQorI2RlZmluZSBNRkNfUFVURlNfQ01EICAgICAgICAgICAweDJBCisjZGVmaW5lIE1GQ19QVVRCU19DTUQgICAgICAgICAgIDB4MjkKKyNkZWZpbmUgTUZDX1BVVFJGX0NNRCAgICAgICAgICAgMHgzMgorI2RlZmluZSBNRkNfUFVUUkJfQ01EICAgICAgICAgICAweDMxCisjZGVmaW5lIE1GQ19QVVRMX0NNRCAgICAgICAgICAgIDB4MjQKKyNkZWZpbmUgTUZDX1BVVFJMX0NNRCAgICAgICAgICAgMHgzNAorI2RlZmluZSBNRkNfUFVUTEZfQ01EICAgICAgICAgICAweDI2CisjZGVmaW5lIE1GQ19QVVRMQl9DTUQgICAgICAgICAgIDB4MjUKKyNkZWZpbmUgTUZDX1BVVFJMRl9DTUQgICAgICAgICAgMHgzNgorI2RlZmluZSBNRkNfUFVUUkxCX0NNRCAgICAgICAgICAweDM1CisKKyNkZWZpbmUgTUZDX0dFVF9DTUQgICAgICAgICAgICAgMHg0MAorI2RlZmluZSBNRkNfR0VUU19DTUQgICAgICAgICAgICAweDQ4CisjZGVmaW5lIE1GQ19HRVRGX0NNRCAgICAgICAgICAgIDB4NDIKKyNkZWZpbmUgTUZDX0dFVEJfQ01EICAgICAgICAgICAgMHg0MQorI2RlZmluZSBNRkNfR0VURlNfQ01EICAgICAgICAgICAweDRBCisjZGVmaW5lIE1GQ19HRVRCU19DTUQgICAgICAgICAgIDB4NDkKKyNkZWZpbmUgTUZDX0dFVExfQ01EICAgICAgICAgICAgMHg0NAorI2RlZmluZSBNRkNfR0VUTEZfQ01EICAgICAgICAgICAweDQ2CisjZGVmaW5lIE1GQ19HRVRMQl9DTUQgICAgICAgICAgIDB4NDUKKworI2RlZmluZSBNRkNfU0RDUlRfQ01EICAgICAgICAgICAweDgwCisjZGVmaW5lIE1GQ19TRENSVFNUX0NNRCAgICAgICAgIDB4ODEKKyNkZWZpbmUgTUZDX1NEQ1JaX0NNRCAgICAgICAgICAgMHg4OQorI2RlZmluZSBNR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faW5sKChwKSkKLSMgZGVmaW5lIF9fb3V0Yih4LHApCXNoX212Lm12X291dGIoKHgpLChwKSkKLSMgZGVmaW5lIF9fb3V0dyh4LHApCXNoX212Lm12X291dHcoKHgpLChwKSkKLSMgZGVmaW5lIF9fb3V0bCh4LHApCXNoX212Lm12X291dGwoKHgpLChwKSkKKyNkZWZpbmUgX19pbmIocCkJc2hfbXYubXZfaW5iKChwKSkKKyNkZWZpbmUgX19pbncocCkJc2hfbXYubXZfaW53KChwKSkKKyNkZWZpbmUgX19pbmwocCkJc2hfbXYubXZfaW5sKChwKSkKKyNkZWZpbmUgX19vdXRiKHgscCkJc2hfbXYubXZfb3V0YigoeCksKHApKQorI2RlZmluZSBfX291dHcoeCxwKQlzaF9tdi5tdl9vdXR3KCh4KSwocCkpCisjZGVmaW5lIF9fb3V0bCh4LHApCXNoX212Lm12X291dGwoKHgpLChwKSkKIAotIyBkZWZpbmUgX19pbmJfcChwKQlzaF9tdi5tdl9pbmJfcCgocCkpCi0jIGRlZmluZSBfX2lud19wKHApCXNoX212Lm12X2lud19wKChwKSkKLSMgZGVmaW5lIF9faW5sX3AocCkJc2hfbXYubXZfaW5sX3AoKHApKQotIyBkZWZpbmUgX19vdXRiX3AoeCxwKQlzaF9tdi5tdl9vdXRiX3AoKHgpLChwKSkKLSMgZGVmaW5lIF9fb3V0d19wKHgscCkJc2hfbXYubXZfb3V0d19wKCh4KSwocCkpCi0jIGRlZmluZSBfX291dGxfcCh4LHApCXNoX212Lm12X291dGxfcCgoeCksKHApKQorI2RlZmluZSBfX2luYl9wKHApCXNoX212Lm12X2luYl9wKChwKSkKKyNkZWZpbmUgX19pbndfcChwKQlzaF9tdi5tdl9pbndfcCgocCkpCisjZGVmaW5lIF9faW5sX3AocCkJc2hfbXYubXZfaW5sX3AoKHApKQorI2RlZmluZSBfX291dGJfcCh4LHApCXNoX212Lm12X291dGJfcCgoeCksKHApKQorI2RlZmluZSBfX291dHdfcCh4LHApCXNoX212Lm12X291dHdfcCgoeCksKHApKQorI2RlZmluZSBfX291dGxfcCh4LHApCXNoX212Lm12X291dGxfcCgoeCksKHApKQogCi0jIGRlZmluZSBfX2luc2IocCxiLGMpCXNoX212Lm12X2luc2IoKHApLCAoYiksIChjKSkKLSMgZGVmaW5lIF9faW5zdyhwLGIsYykJc2hfbXYubXZfaW5zdygocCksIChiKSwgKGMpKQotIyBkZWZpbmUgX19pbnNsKHAsYixjKQlzaF9tdi5tdl9pbnNsKChwKSwgKGIpLCAoYykpCi0jIGRlZmluZSBfX291dHNiKHAsYixjKQlzaF9tdi5tdl9vdXRzYigocCksIChiKSwgKGMpKQotIyBkZWZpbmUgX19vdXRzdyhwLGIsYykJc2hfbXYubXZfb3V0c3coKHApLCAoYiksIChjKSkKLSMgZGVmaW5lIF9fb3V0c2wocCxiLGMpCXNoX212Lm12X291dHNsKChwKSwgKGIpLCAoYykpCisjZGVmaW5lIF9faW5zYihwLGIsYykJc2hfbXYubXZfaW5zYigocCksIChiKSwgKGMpKQorI2RlZmluZSBfX2luc3cocCxiLGMpCXNoX212Lm12X2luc3coKHApLCAoYiksIChjKSkKKyNkZWZpbmUgX19pbnNsKHAsYixjKQlzaF9tdi5tdl9pbnNsKChwKSwgKGIpLCAoYykpCisjZGVmaW5lIF9fb3V0c2IocCxiLGMpCXNoX212Lm12X291dHNiKChwKSwgKGIpLCAoYykpCisjZGVmaW5lIF9fb3V0c3cocCxiLGMpCXNoX212Lm12X291dHN3KChwKSwgKGIpLCAoYykpCisjZGVmaW5lIF9fb3V0c2wocCxiLGMpCXNoX212Lm12X291dHNsKChwKSwgKGIpLCAoYykpCiAKLSMgZGVmaW5lIF9fcmVhZGIoYSkJc2hfbXYubXZfcmVhZGIoKGEpKQotIyBkZWZpbmUgX19yZWFkdyhhKQlzaF9tdi5tdl9yZWFkdygoYSkpCi0jIGRlZmluZSBfX3JlYWRsKGEpCXNoX212Lm12X3JlYWRsKChhKSkKLSMgZGVmaW5lIF9fd3JpdGViKHYsYSkJc2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G5vdyktPmppZmZpZXMgPSBqaWZmaWVzOwotI2RlZmluZSBwb3NpeF90aW1lX2JlZm9yZSh0aW1lciwgbm93KSBcCi0gICAgICAgICAgICAgICAgICAgICAgdGltZV9iZWZvcmUoKHRpbWVyKS0+ZXhwaXJlcywgKG5vdyktPmppZmZpZXMpCit2b2lkIHBvc2l4X2NwdV90aW1lcl9zY2hlZHVsZShzdHJ1Y3Qga19pdGltZXIgKnRpbWVyKTsKIAotI2RlZmluZSBwb3NpeF9idW1wX3RpbWVyKHRpbXIsIG5vdykJCQkJCVwKLSAgICAgICAgIGRvIHsJCQkJCQkJCVwKLSAgICAgICAgICAgICAgbG9uZyBkZWx0YSwgb3J1bjsJCQkJCQlcCi0JICAgICAgZGVsdGEgPSBub3cuamlmZmllcyAtICh0aW1yKS0+aXQucmVhbC50aW1lci5leHBpcmVzOwlcCi0gICAgICAgICAgICAgIGlmIChkZWx0YSA+PSAwKSB7CQkJCQkJXAotCSAgICAgICAgICAgb3J1biA9IDEgKyAoZGVsdGEgLyAodGltciktPml0LnJlYWwuaW5jcik7CQlcCi0JICAgICAgICAgICh0aW1yKS0+aXQucmVhbC50aW1lci5leHBpcmVzICs9CQkJXAotCQkJIG9ydW4gKiAodGltciktPml0LnJlYWwuaW5jcjsJCQlcCi0gICAgICAgICAgICAgICAgICAodGltciktPml0X292ZXJydW4gKz0gb3J1bjsJCQkJXAotICAgICAgICAgICAgICB9CQkJCQkJCQlcCi0gICAgICAgICAgICB9d2hpbGUgKDApCit2b2lkIHJ1bl9wb3NpeF9jcHVfdGltZXJzKHN0cnVjdCB0YXNrX3N0cnVjdCAqdGFzayk7Cit2b2lkIHBvc2l4X2NwdV90aW1lcnNfZXhpdChzdHJ1Y3QgdGFza19zdHJ1Y3QgKnRhc2spOwordm9pZCBwb3NpeF9jcHVfdGltZXJzX2V4aXRfZ3JvdXAoc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrKTsKIAotaW50IHBvc2l4X2NwdV9jbG9ja19nZX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19DTURfRFVNUF9MT0cgICAgICAgICAgMHg0MTBCICAgIC8qIHR4IG5vbmUsIHJ4IHVsdHJhX3N0cmluZyAqLworI2RlZmluZSAgVElQQ19DTURfUkVTRVRfTElOS19TVEFUUyAgMHg0MTBDICAgIC8qIHR4IGxpbmtfbmFtZSwgcnggbm9uZSAqLworCisjaWYgMAorI2RlZmluZSAgVElQQ19DTURfQ1JFQVRFX0xJTksgICAgICAgMHg0MTAzICAgIC8qIHR4IGxpbmtfY3JlYXRlLCByeCBub25lICovCisjZGVmaW5lICBUSVBDX0NNRF9SRU1PVkVfTElOSyAgICAgICAweDQxMDQgICAgLyogdHggbGlua19uYW1lLCByeCBub25lICovCisjZGVmaW5lICBUSVBDX0NNRF9CTE9DS19MSU5LICAgICAgICAweDQxMDUgICAgLyogdHggbGlua19uYW1lLCByeCBub25lICovCisjZGVmaW5lICBUSVBDX0NNRF9VTkJMT0NLX0xJTksgICAgICAweDQxMDYgICAgLyogdHggbGlua19uYW1lLCByeCBub25lICovCisjZW5kaWYKKworLyogCisgKiBQcml2YXRlIGNvbW1hbmRzOgorICogTWF5IG9ubHkgYmUgaXNzdWVkIGJ5ICJuZXR3b3JrIGFkbWluaXN0cmF0aW9uIGNhcGFibGUiIHByb2Nlc3MuCisgKiBBY2NlcHRlZCBieSBvd24gbm9kZSBvbmx5OyBjYW5ub3QgYmUgdXNlZCBvbiBhIHJlbW90ZSBub2RlLiAgICAgICAgICAgICAgICAgICAgICAgCisgKi8KKworI2RlZmluZSAgVElQQ19DTURfU0VUX05PREVfQUREUiAgICAgMHg4MDAxICAgIC8qIHR4IG5ldF9hZGRyLCByeCBub25lICovCisjaWYgMAorI2RlZmluZSAgVElQQ19DTURfU0VUX1pPTkVfTUFTVEVSICAgMHg4MDAyICAgIC8qIHR4IG5vbmUsIHJ4IG5vbmUgKi8KKyNlbmRpZgorI2RlZmluZSAgVElQQ19DTURfU0VUX1JFTU9URV9NTkcgICAgMHg4MDAzICAgIC8qIHR4IHVuc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Z25lZCBjaGFyICAgaWRbNl0gICAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgaWluZm8gICAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBzaG9ydCAgYmxrc2l6ZSAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgYXJlYSAgICAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgc2VlZFs4XSAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgbmVpZ2hib3JbNl0gICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBzaG9ydCAgdGltZXIgICAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgbXBkICAgICAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgZGF0YWxlbiAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotICAgICAgICB1bnNpZ25lZCBjaGFyICAgZGF0YVsyXSAgICAgICAgIF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwotfTsKKwl1bnNpZ25lZCBjaGFyICAgbXNnZmxnOworCXVuc2lnbmVkIGNoYXIgICB0aXZlclszXTsKKwl1bnNpZ25lZCBjaGFyICAgaWRbNl07CisJdW5zaWduZWQgY2hhciAgIGlpbmZvOworCXVuc2lnbmVkIHNob3J0ICBibGtzaXplOworCXVuc2lnbmVkIGNoYXIgICBhcmVhOworCXVuc2lnbmVkIGNoYXIgICBzZWVkWzhdOworCXVuc2lnbmVkIGNoYXIgICBuZWln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WF0LCB2ZXJzaW9uIDI6CisKKworICAgICAgIDEgMCA5IDggNyA2IDUgNHwzIDIgMSAwIDkgOCA3IDZ8NSA0IDMgMiAxIDAgOSA4fDcgNiA1IDQgMyAyIDEgMCAKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3MDp8dmVycyB8IHVzZXIgIHxoZHIgc3ogfG58ZHxzfC18ICAgICAgICAgIG1lc3NhZ2Ugc2l6ZSAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHcxOnxtc3R5cHwgZXJyb3IgfHJlciBjbnR8bHNjfG9wdCBwfCAgICAgIGJyb2FkY2FzdCBhY2sgbm8gICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzI6fCAgICAgICAgbGluayBsZXZlbCBhY2sgbm8gICAgICB8ICAgYnJvYWRjYXN0L2xpbmsgbGV2ZWwgc2VxIG5vIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3Mzp8ICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91cyBub2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHc0OnwgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYXRpbmcgcG9ydCAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzU6fCAgICAgICAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbiBwb3J0ICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rICAgIAorICAgdzY6fCAgICAgICAgICAgICAgICAgICAgICBvcmlnaW5hdGluZyBub2RlICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3Nzp8ICAgICAgICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uIG5vZGUgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHc4OnwgICAgICAgICAgICBuYW1lIHR5cGUgLyB0cmFuc3BvcnQgc2VxdWVuY2UgbnVtYmVyICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzk6fCAgICAgICAgICAgICAgbmFtZSBpbnN0YW5jZS9tdWx0aWNhc3QgbG93ZXIgYm91bmQgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rICAgIAorICAgd0E6fCAgICAgICAgICAgICAgICAgICAgbXVsdGljYXN0IHVwcGVyIGJvdW5kICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rICAgIAorICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgIFwgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworKi8KKworI2RlZmluZSBUSVBDX0NPTk5fTVNHCTAKKyNkZWZpbmUgVElQQ19NQ0FTVF9NU0cJMQorI2RlZmluZSBUSVBDX05BTUVEX01TRwkyCisjZGVmaW5lIFRJUENfRElSRUNUX01TRwkzCisKKworc3RhdGljIGlubGluZSB1MzIgbXNnX3dvcmQoc3RydWN0IHRpcGNfbXNnICptLCB1MzIgcG9zKQoreworCXJldHVybiBudG9obChtLT5oZHJbcG9zXSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTMyIG1zZ19iaXRzKHN0cnVjdCB0aXBjX21zZyAqbSwgdTMyIHcsIHUzMiBwb3MsIHUzMiBtYXNrKQoreworCXJldHVybiAobXNnX3dvcmQobSwgdykgPj4gcG9zKSAmIG1hc2s7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTMyIG1zZ19pbXBvcnRhbmNlKHN0cnVjdCB0aXBjX21zZyAqbSkKK3sKKwlyZXR1cm4gbXNnX2JpdHMobSwgMCwgMjUsIDB4Zik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTMyIG1zZ19oZHJfc3ooc3RydWN0IHRpcGNfbXNnICptKQoreworCXJldHVybiBtc2dfYml0cyhtLCAwLCAyMSwgMHhmKSA8PCAyOworfQorCitzdGF0aWMgaW5saW5lIGludCBtc2dfc2hvcnQoc3RydWN0IHRpcGNfbX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hlIHRyYWNpbmcgY29kZSB3aGVuIGRvaW5nIGVycm9yIHByaW50ayBvcgorICogZXhlY3V0aW5nIGEgQlVHKCk6CisgKi8KK2ludCBkZWJ1Z19tdXRleF9vbiA9IDE7CisKK3N0YXRpYyB2b2lkIHByaW50a190YXNrKHN0cnVjdCB0YXNrX3N0cnVjdCAqcCkKK3sKKwlpZiAocCkKKwkJcHJpbnRrKCIlMTZzOiU1ZCBbJXAsICUzZF0iLCBwLT5jb21tLCBwLT5waWQsIHAsIHAtPnByaW8pOworCWVsc2UKKwkJcHJpbnRrKCI8bm9uZT4iKTsKK30KKworc3RhdGljIHZvaWQgcHJpbnRrX3RpKHN0cnVjdCB0aHJlYWRfaW5mbyAqdGkpCit7CisJaWYgKHRpKQorCQlwcmludGtfdGFzayh0aS0+dGFzayk7CisJZWxzZQorCQlwcmludGsoIjxub25lPiIpOworfQorCitzdGF0aWMgdm9pZCBwcmludGtfdGFza19zaG9ydChzdHJ1Y3QgdGFza19zdHJ1Y3QgKnApCit7CisJaWYgKHApCisJCXByaW50aygiJXMvJWQgWyVwLCAlM2RdIiwgcC0+Y29tbSwgcC0+cGlkLCBwLCBwLT5wcmlvKTsKKwllbHNlCisJCXByaW50aygiPG5vbmU+Iik7Cit9CisKK3N0YXRpYyB2b2lkIHByaW50a19sb2NrKHN0cnVjdCBtdXRleCAqbG9jaywgaW50IHByaW50X293bmVyKQoreworCXByaW50aygiIFslcF0geyVzfVxuIiwgbG9jaywgbG9jay0+bmFtZSk7CisKKwlpZiAocHJpbnRfb3duZXIgJiYgbG9jay0+b3duZXIpIHsKKwkJcHJpbnRrKCIuLiBoZWxkIGJ5OiAgIik7CisJCXByaW50a190aShsb2NrLT5vd25lcik7CisJCXByaW50aygiXG4iKTsKKwl9CisJaWYgKGxvY2stPm93bmVyKSB7CisJCXByaW50aygiLi4uIGFjcXVpcmVkIGF0OiAgICAgICAgICAgICAgICIpOworCQlwcmludF9zeW1ib2woIiVzXG4iLCBsb2NrLT5hY3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cCkKK3sKKwlzdHJ1Y3QgbXV0ZXggKmxvY2tibGs7CisJc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrOworCisJaWYgKCFkZWJ1Z19tdXRleF9vbikKKwkJcmV0dXJuIDA7CisKKwl0aSA9IGxvY2stPm93bmVyOworCWlmICghdGkpCisJCXJldHVybiAwOworCisJdGFzayA9IHRpLT50YXNrOworCWxvY2tibGsgPSBOVUxMOworCWlmICh0YXNrLT5ibG9ja2VkX29uKQorCQlsb2NrYmxrID0gdGFzay0+YmxvY2tlZF9vbi0+bG9jazsKKworCS8qIFNlbGYtZGVhZGxvY2s6ICovCisJaWYgKGN1cnJlbnQgPT0gdGFzaykgeworCQlERUJVR19PRkYoKTsKKwkJaWYgKGRlcHRoKQorCQkJcmV0dXJuIDE7CisJCXByaW50aygiXG49PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworCQlwcmludGsoICAiWyBCVUc6IGxvY2sgcmVjdXJzaW9uIGRlYWRsb2NrIGRldGVjdGVkISB8XG4iKTsKKwkJcHJpbnRrKCAgIi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuIik7CisJCXJlcG9ydF9kZWFkbG9jayh0YXNrLCBsb2NrLCBOVUxMLCBpcCk7CisJCXJldHVybiAwOworCX0KKworCS8qIFVnaCwgc29tZXRoaW5nIGNvcnJ1cHRlZCB0aGUgbG9jayBkYXRhIHN0cnVjdHVyZT8gKi8KKwlpZiAoZGVwdGggPiAyMCkgeworCQlERUJVR19PRkYoKTsKKwkJcHJpbnRrKCJcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworCQlwcmludGsoICAiWyBCVUc6IGluZmluaXRlIGxvY2sgZGVwZW5kZW5jeSBkZXRlY3RlZCE/IHxcbiIpOworCQlwcmludGsoICAiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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JtLAogCWNvbnN0IEJ5dGUgKmRpY3Rpb25hcnksCkBAIC0yOTcsNiArMjk4LDcgQEAKICAgICBpZiAoaGFzaF9oZWFkKSBoYXNoX2hlYWQgPSAwOyAgLyogdG8gbWFrZSBjb21waWxlciBoYXBweSAqLwogICAgIHJldHVybiBaX09LOwogfQorI2VuZGlmICAvKiAgMCAgKi8KIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogaW50IHpsaWJfZGVmbGF0ZVJlc2V0KApAQCAtMzMwLDYgKzMzMiw3IEBACiB9CiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKyNpZiAwCiBpbnQgemxpYl9kZWZsYXRlUGFyYW1zKAogCXpfc3RyZWFtcCBzdHJtLAogCWludCBsZXZlbCwKQEAgLTM2NSw2ICszNjgsNyBAQAogICAgIHMtPnN0cmF0ZWd5ID0gc3RyYXRlZ3k7CiAgICAgcmV0dXJuIGVycjsKIH0KKyNlbmRpZiAgLyogIDAgICovCiAKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqIFB1dCBhIHNob3J0IGluIHRoZSBwZW5kaW5nIGJ1ZmZlci4gVGhlIDE2LWJpdCB2YWx1ZSBpcyBwdXQgaW4gTVNCIG9yZGVyLgpAQCAtNTcyLDYgKzU3Niw3IEBACiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgKiBDb3B5IHRoZSBzb3VyY2Ugc3RhdGUgdG8gdGhlIGRlc3RpbmF0aW9uIHN0YXRlLgogICovCisjaWYgMAogaW50IHpsaWJfZGVmbGF0ZUNvcHkgKAogCXpfc3RyZWFt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uKSB7Ci0gICAgICAgICAgICAgICAgaWYgKG1lbWNtcChtYWNfYWRkciwgdG9fcmV0dXJuLT5tYWNfYWRkciwgRVRIX0FMRU4pID09IDApIHsKKyAgICAgICAgICAgICAgICBpZiAoIWNvbXBhcmVfZXRoZXJfYWRkcihtYWNfYWRkciwgdG9fcmV0dXJuLT5tYWNfYWRkcikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0b19yZXR1cm47CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIHRvX3JldHVybiA9IHRvX3JldHVybi0+bmV4dDsKQEAgLTE4MTEsOCArMTgxMiw3IEBACiB7CiAgICAgICAgIHN0cnVjdCBsZWNfYXJwX3RhYmxlICp0b19yZXR1cm47CiAKLSAgICAgICAgdG9fcmV0dXJuID0gKHN0cnVjdCBsZWNfYXJwX3RhYmxlICopIGttYWxsb2Moc2l6ZW9mKHN0cnVjdCBsZWNfYXJwX3RhYmxlKSwKLQkJCQkJCSAgICAgR0ZQX0FUT01JQyk7CisgICAgICAgIHRvX3JldHVybiA9IGttYWxsb2Moc2l6ZW9mKHN0cnVjdCBsZWNfYXJwX3RhYmxlKSwgR0ZQX0FUT01JQyk7CiAgICAgICAgIGlmICghdG9fcmV0dXJuKSB7CiAgICAgICAgICAgICAgICAgcHJpbnRrKCJMRUM6IEFycCBlbnRyeSBrbWFsbG9jIGZhaWxlZFxuIik7CiAgICAgICAgICAgICAgICAgcmV0dXJuIE5VTEw7CkBAIC0yMDAyLDcgKzIwMDIsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByaXYtPm1jYXN0X3ZjYzsKICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIGNhc2UgMjogIC8qIExBTkUyIHdhbnRzIGFycCBmb3IgbXVsdGljYXN0IGFkZHJlc3NlcyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBtZW1jbXAobWFjX3RvX2Zpbm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XdfY2FsbGlkKSk7CisJCW50b2hzKCoodV9pbnQxNl90ICopcHB0cFJlcSArIGNpZF9vZmYpLCBudG9ocyhuZXdfY2FsbGlkKSk7CiAKIAkvKiBtYW5nbGUgcGFja2V0ICovCiAJaWYgKGlwX25hdF9tYW5nbGVfdGNwX3BhY2tldChwc2tiLCBjdCwgY3RpbmZvLAotCQkodm9pZCAqKWNpZCAtICgodm9pZCAqKWN0bGggLSBzaXplb2Yoc3RydWN0IHBwdHBfcGt0X2hkcikpLAotCQkJCSAJc2l6ZW9mKG5ld19jYWxsaWQpLCAKLQkJCQkJKGNoYXIgKikmbmV3X2NhbGxpZCwKLQkJCQkgCXNpemVvZihuZXdfY2FsbGlkKSkgPT0gMCkKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZF9vZmYgKyBzaXplb2Yoc3RydWN0IHBwdHBfcGt0X2hkcikgKworCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKHN0cnVjdCBQcHRwQ29udHJvbEhlYWRlciksCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YobmV3X2NhbGxpZCksIChjaGFyICopJm5ld19jYWxsaWQsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YobmV3X2NhbGxpZCkpID09IDApCiAJCXJldHVybiBORl9EUk9QOwogCiAJcmV0dXJuIE5GX0FDQ0VQVDsKQEAgLTI5OSwzMSArMjk2LDMwIEBACiAJCSB1bmlvbiBwcHRwX2N0cmxfdW5pb24gKnBwdHBSZXEpCiB7CiAJc3RydWN0IGlwX25hdF9wcHRwICpuYXRfcHB0cF9pbmZvID0gJmN0LT5uYXQuaGVscC5uYXRfcHB0cF9pbmZvOwotCXVfaW50MTZfdCBtc2csIG5ld19jaWQgPSAwLCBuZXdfcGNpZCwgKnBjaWQgPSBOVUxMLCAqY2lkID0gTlVMTDsKLQotCWludCByZXQgPSBORl9BQ0NFUFQsIHJ2OworCXVfaW50MTZfdCBtc2csI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X2VsZW0gKmU7CisJc3RydWN0IGRzdF9lbnRyeSAqZHN0ID0gc2tiLT5kc3Q7CisJaW50IHN0cmljdCA9IGluZm8tPmZsYWdzICYgSVBUX1BPTElDWV9NQVRDSF9TVFJJQ1Q7CisJaW50IGksIHBvczsKKworCWlmIChkc3QtPnhmcm0gPT0gTlVMTCkKKwkJcmV0dXJuIC0xOworCisJZm9yIChpID0gMDsgZHN0ICYmIGRzdC0+eGZybTsgZHN0ID0gZHN0LT5jaGlsZCwgaSsrKSB7CisJCXBvcyA9IHN0cmljdCA/IGkgOiAwOworCQlpZiAocG9zID49IGluZm8tPmxlbikKKwkJCXJldHVybiAwOworCQllID0gJmluZm8tPnBvbFtwb3NdOworCisJCWlmIChtYXRjaF94ZnJtX3N0YXRlKGRzdC0+eGZybSwgZSkpIHsKKwkJCWlmICghc3RyaWN0KQorCQkJCXJldHVybiAxOworCQl9IGVsc2UgaWYgKHN0cmljdCkKKwkJCXJldHVybiAwOworCX0KKworCXJldHVybiBzdHJpY3QgPyAxIDogMDsKK30KKworc3RhdGljIGludCBtYXRjaChjb25zdCBzdHJ1Y3Qgc2tfYnVmZiAqc2tiLAorICAgICAgICAgICAgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqaW4sCisgICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBuZXRfZGV2aWNlICpvdXQsCisgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQgKm1hdGNoaW5mbywKKyAgICAgICAgICAgICAgICAgaW50IG9mZnNldCwKKyAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IHByb3RvZmYsCisgICAgICAgICAgICAgICAgIGludCAqaG90ZHJvcCkKK3sKKwljb25zdCBzdHJ1Y3QgaXB0X3BvbGljeV9pbmZvICppbmZvID0gbWF0Y2hpbmZvOworCWludCByZXQ7CisKKwlpZiAoaW5mby0+ZmxhZ3MgJiBJUFRfUE9MSUNZX01BVENIX0lOKQorCQlyZXQgPSBtYXRjaF9w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ZHJvcCA9IDE7CisJCXJldHVybiAwOworCX0KIAotICAgICAgIGhkcmxlbiA9IGlwdjZfb3B0bGVuKG9oKTsKLSAgICAgICBpZiAoc2tiLT5sZW4gLSBwdHIgPCBoZHJsZW4pewotCSAgICAgICAvKiBQYWNrZXQgc21hbGxlciB0aGFuIGl0J3MgbGVuZ3RoIGZpZWxkICovCi0gICAgICAgCQlyZXR1cm4gMDsKLSAgICAgICB9CisJaGRybGVuID0gaXB2Nl9vcHRsZW4ob2gpOworCWlmIChza2ItPmxlbiAtIHB0ciA8IGhkcmxlbikgeworCQkvKiBQYWNrZXQgc21hbGxlciB0aGFuIGl0J3MgbGVuZ3RoIGZpZWxkICovCisJCXJldHVybiAwOworCX0KIAotICAgICAgIERFQlVHUCgiSVB2NiBPUFRTIExFTiAldSAldSAiLCBoZHJsZW4sIG9oLT5oZHJsZW4pOworCURFQlVHUCgiSVB2NiBPUFRTIExFTiAldSAldSAiLCBoZHJsZW4sIG9oLT5oZHJsZW4pOwogCi0gICAgICAgREVCVUdQKCJsZW4gJTAyWCAlMDRYICUwMlggIiwKLSAgICAgICAJCW9wdGluZm8tPmhkcmxlbiwgaGRybGVuLAotICAgICAgIAkJKCEob3B0aW5mby0+ZmxhZ3MgJiBJUDZUX09QVFNfTEVOKSB8fAotICAgICAgICAgICAgICAgICAgICAgICAgICAgKChvcHRpbmZvLT5oZHJsZW4gPT0gaGRybGVuKSBeCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAhIShvcHRpbmZvLT5pbnZmbGFncyAmIElQNlRfT1BUU19JTlZfTEVOKSkpKTsKKwlERUJVR1AoImxlbiAlMDJYICUwNFggJTAyWCAiLAorCSAgICAgICBvcHRpbmZvLT5oZHJsZW4sIGhkcmxlbiwKKwkgICAgICAgKCEob3B0aW5mby0+ZmxhZ3MgJiBJUDZUX09QVFNfTEVOKSB8fAorCQkoKG9wdGluZm8tPmhkcmxlbiA9PSBoZHJsZW4pIF4KKwkJICEhKG9wdGluZm8tPmludmZsYWdzICYgSVA2VF9PUFRTX0lOVl9MRU4pKSkpOwogCi0gICAgICAgcmV0ID0gKG9oICE9IE5VTEwpCi0gICAgICAgCQkmJgotCSAgICAgIAkoIShvcHRpbmZvLT5mbGFncyAmIElQNlRfT1BUU19MRU4pIHx8Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAoKG9wdGluZm8tPmhkcmxlbiA9PSBoZHJsZW4pIF4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICEhKG9wdGluZm8tPmludmZsYWdzICYgSVA2VF9PUFRTX0lOVl9MRU4pKSk7CisJcmV0ID0gKG9oICE9IE5VTEwpICYmCisJICAgICAgKCEob3B0aW5mby0+ZmxhZ3MgJiBJUDZUX09QVFNfTEVOKSB8fAorCSAgICAgICAoKG9wdGluZm8tPmhkcmxlbiA9PSBoZHJsZW4pIF4KKwkJISEob3B0aW5mby0+aW52ZmxhZ3MgJiBJUDZUX09QVFNfSU5WX0xFTikpKTsKIAotICAgICAgIHB0ciArPSAyOwotICAgICAgIGhkcmxlbiAtPSAyOwotICAgICAgIGlmICggIShvcHRpbmZvLT5mbGFncyAmIElQNlRfT1BUU19PUFRTKSApewotCSAgICAgICByZXR1cm4gcmV0OworCXB0ciArPSAyOworCWhkcmxlbiAtPSAyOworCWlmICghKG9wdGluZm8tPmZsYWdzICYgSVA2VF9PUFRTX09QVFMpKSB7CisJCXJldHVybiByZXQ7CiAJfSBlbHNlIGlmIChvcHRpbmZvLT5mbGFncyAmIElQNlRfT1BUU19OU1RSSUNUKSB7CiAJCURFQlVHUCgiTm90IHN0cmljdCAtIG5vdCBpbXBsZW1lbnRlZCIpOwogCX0gZWxzZSB7CiAJCURFQlVHUCgiU3RyaWN0ICIpOwotCQlERUJVR1AoIiMlZCAiLG9wdGluZm8tPm9wdHNucik7Ci0JCWZvcih0ZW1wPTA7IHRlbXA8b3B0aW5mby0+b3B0c25yOyB0ZW1wKyspeworCQlERUJVR1AoIiMlZCAiLCBvcHRpbmZvLT5vcH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c2lnbmVkIGludCBtYXRjaGluZm9zaXplLAotICAgICAgICAgIHVuc2lnbmVkIGludCBob29rX21hc2spCisJICAgY29uc3Qgdm9pZCAqaW5mbywKKwkgICB2b2lkICptYXRjaGluZm8sCisJICAgdW5zaWduZWQgaW50IG1hdGNoaW5mb3NpemUsCisJICAgdW5zaWduZWQgaW50IGhvb2tfbWFzaykKIHsKLSAgICAgICBjb25zdCBzdHJ1Y3QgaXA2dF9vcHRzICpvcHRzaW5mbyA9IG1hdGNoaW5mbzsKKwljb25zdCBzdHJ1Y3QgaXA2dF9vcHRzICpvcHRzaW5mbyA9IG1hdGNoaW5mbzsKIAotICAgICAgIGlmIChtYXRjaGluZm9zaXplICE9IElQNlRfQUxJR04oc2l6ZW9mKHN0cnVjdCBpcDZ0X29wdHMpKSkgewotICAgICAgICAgICAgICBERUJVR1AoImlwNnRfb3B0czogbWF0Y2hzaXplICV1ICE9ICV1XG4iLAotICAgICAgICAgICAgICAgICAgICAgIG1hdGNoaW5mb3NpemUsIElQNlRfQUxJR04oc2l6ZW9mKHN0cnVjdCBpcDZ0X29wdHMpKSk7Ci0gICAgICAgICAgICAgIHJldHVybiAwOwotICAgICAgIH0KLSAgICAgICBpZiAob3B0c2luZm8tPmludmZsYWdzICYgfklQNlRfT1BUU19JTlZfTUFTSykgewotICAgICAgICAgICAgICBERUJVR1AoImlwNnRfb3B0czogdW5rbm93biBmbGFncyAlWFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICBvcHRzaW5mby0+aW52ZmxhZ3MpOwotICAgICAgICAgICAgICByZXR1cm4gMDsKLSAgICAgICB9CisJaWYgKG1hdGNoaW5mb3NpemUgIT0gSVA2VF9BTElHTihzaXplb2Yoc3RydWN0IGlwNnRfb3B0cykpKSB7CisJCURFQlVHUCgiaXA2dF9vcHRzOiBtYXRjaHNpemUgJXUgIT0gJXVcbiIsCisJCSAgICAgICBtYXRjaGluZm9zaXplLCBJUDZUX0FMSUdOKHNpemVvZihzdHJ1Y3QgaX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AgISEob3B0aW5mby0+aW52ZmxhZ3MgJiBJUDZUX09QVFNfSU5WX0xFTikpKSk7CisJREVCVUdQKCJsZW4gJTAyWCAlMDRYICUwMlggIiwKKwkgICAgICAgb3B0aW5mby0+aGRybGVuLCBoZHJsZW4sCisJICAgICAgICghKG9wdGluZm8tPmZsYWdzICYgSVA2VF9PUFRTX0xFTikgfHwKKwkJKChvcHRpbmZvLT5oZHJsZW4gPT0gaGRybGVuKSBeCisJCSAhIShvcHRpbmZvLT5pbnZmbGFncyAmIElQNlRfT1BUU19JTlZfTEVOKSkpKTsKIAotICAgICAgIHJldCA9IChvaCAhPSBOVUxMKQotICAgICAgIAkJJiYKLQkgICAgICAJKCEob3B0aW5mby0+ZmxhZ3MgJiBJUDZUX09QVFNfTEVOKSB8fAotICAgICAgICAgICAgICAgICAgICAgICAgICAgKChvcHRpbmZvLT5oZHJsZW4gPT0gaGRybGVuKSBeCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAhIShvcHRpbmZvLT5pbnZmbGFncyAmIElQNlRfT1BUU19JTlZfTEVOKSkpOworCXJldCA9IChvaCAhPSBOVUxMKSAmJgorCSAgICAgICghKG9wdGluZm8tPmZsYWdzICYgSVA2VF9PUFRTX0xFTikgfHwKKwkgICAgICAgKChvcHRpbmZvLT5oZHJsZW4gPT0gaGRybGVuKSBeCisJCSEhKG9wdGluZm8tPmludmZsYWdzICYgSVA2VF9PUFRTX0lOVl9MRU4pKSk7CiAKLSAgICAgICBwdHIgKz0gMjsKLSAgICAgICBoZHJsZW4gLT0gMjsKLSAgICAgICBpZiAoICEob3B0aW5mby0+ZmxhZ3MgJiBJUDZUX09QVFNfT1BUUykgKXsKLQkgICAgICAgcmV0dXJuIHJldDsKKwlwdHIgKz0gMjsKKwloZHJsZW4gLT0gMjsKKwlpZiAoIShvcHRpbmZvLT5mbGFncyAmIElQNlRfT1BUU19PUFRTKSkgeworCQlyZXR1cm4gcmV0OwogCX0gZWxzZSBpZiAob3B0aW5mby0+Zm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CBoZHJsZW47CiAKIAkJLyogSXMgdGhlcmUgZW5vdWdoIHNwYWNlIGZvciB0aGUgbmV4dCBleHQgaGVhZGVyPyAqLwotICAgICAgICAgICAgICAgIGlmIChsZW4gPCAoaW50KXNpemVvZihzdHJ1Y3QgaXB2Nl9vcHRfaGRyKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwOworCQlpZiAobGVuIDwgKGludClzaXplb2Yoc3RydWN0IGlwdjZfb3B0X2hkcikpCisJCQlyZXR1cm4gMDsKIAkJLyogTm8gbW9yZSBleHRoZHIgLT4gZXZhbHVhdGUgKi8KLSAgICAgICAgICAgICAgICBpZiAobmV4dGhkciA9PSBORVhUSERSX05PTkUpIHsKKwkJaWYgKG5leHRoZHIgPT0gTkVYVEhEUl9OT05FKSB7CiAJCQl0ZW1wIHw9IE1BU0tfTk9ORTsKIAkJCWJyZWFrOwogCQl9CiAJCS8qIEVTUCAtPiBldmFsdWF0ZSAqLwotICAgICAgICAgICAgICAgIGlmIChuZXh0aGRyID09IE5FWFRIRFJfRVNQKSB7CisJCWlmIChuZXh0aGRyID09IE5FWFRIRFJfRVNQKSB7CiAJCQl0ZW1wIHw9IE1BU0tfRVNQOwogCQkJYnJlYWs7CiAJCX0KQEAgLTcyLDQzICs3Miw0MyBAQAogCQlCVUdfT04oaHAgPT0gTlVMTCk7CiAKIAkJLyogQ2FsY3VsYXRlIHRoZSBoZWFkZXIgbGVuZ3RoICovCi0gICAgICAgICAgICAgICAgaWYgKG5leHRoZHIgPT0gTkVYVEhEUl9GUkFHTUVOVCkgewotICAgICAgICAgICAgICAgICAgICAgICAgaGRybGVuID0gODsKLSAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5leHRoZHIgPT0gTkVYVEhEUl9BVVRIKQotICAgICAgICAgICAgICAgICAgICAgICAgaGRybGVuID0gKGhwLT5oZHJsZW4rMik8PDI7Ci0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgaGR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RybGVuLCBoZHJsZW4sCisJICAgICAgICghKHJ0aW5mby0+ZmxhZ3MgJiBJUDZUX1JUX0xFTikgfHwKKwkJKChydGluZm8tPmhkcmxlbiA9PSBoZHJsZW4pIF4KKwkJICEhKHJ0aW5mby0+aW52ZmxhZ3MgJiBJUDZUX1JUX0lOVl9MRU4pKSkpOworCURFQlVHUCgicmVzICUwMlggJTAyWCAlMDJYICIsCisJICAgICAgIChydGluZm8tPmZsYWdzICYgSVA2VF9SVF9SRVMpLAorCSAgICAgICAoKHN0cnVjdCBydDBfaGRyICopcmgpLT5yZXNlcnZlZCwKKwkgICAgICAgISgocnRpbmZvLT5mbGFncyAmIElQNlRfUlRfUkVTKSAmJgorCQkgKCgoc3RydWN0IHJ0MF9oZHIgKilyaCktPnJlc2VydmVkKSkpOwogCi0gICAgICAgcmV0ID0gKHJoICE9IE5VTEwpCi0gICAgICAgCQkmJgotICAgICAgIAkJKHNlZ3NsZWZ0X21hdGNoKHJ0aW5mby0+c2Vnc2xlZnRbMF0sIHJ0aW5mby0+c2Vnc2xlZnRbMV0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICByaC0+c2VnbWVudHNfbGVmdCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICEhKHJ0aW5mby0+aW52ZmxhZ3MgJiBJUDZUX1JUX0lOVl9TR1MpKSkKLQkJJiYKLQkgICAgICAJKCEocnRpbmZvLT5mbGFncyAmIElQNlRfUlRfTEVOKSB8fAotICAgICAgICAgICAgICAgICAgICAgICAgICAgKChydGluZm8tPmhkcmxlbiA9PSBoZHJsZW4pIF4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICEhKHJ0aW5mby0+aW52ZmxhZ3MgJiBJUDZUX1JUX0lOVl9MRU4pKSkKLQkJJiYKLSAgICAgICAJCSghKHJ0aW5mby0+ZmxhZ3MgJiBJUDZUX1JUX1RZUCkgfHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICgocnRpbmZvLT5ydF90eXBlID09IHJoL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2JqLSQoQ09ORklHX05GX0NUX1BST1RPX1NDVFApICs9IG5mX2Nvbm50cmFja19wcm90b19zY3RwLm8KIAogIyBuZXRsaW5rIGludGVyZmFjZSBmb3IgbmZfY29ubnRyYWNrCiBvYmotJChDT05GSUdfTkZfQ1RfTkVUTElOSykgKz0gbmZfY29ubnRyYWNrX25ldGxpbmsubworCisjIGNvbm5lY3Rpb24gdHJhY2tpbmcgaGVscGVycworb2JqLSQoQ09ORklHX05GX0NPTk5UUkFDS19GVFApICs9IG5mX2Nvbm50cmFja19mdHAubworCisjIGdlbmVyaWMgWCB0YWJsZXMgCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUQUJMRVMpICs9IHhfdGFibGVzLm8geHRfdGNwdWRwLm8KKworIyB0YXJnZXRzCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX1RBUkdFVF9DTEFTU0lGWSkgKz0geHRfQ0xBU1NJRlkubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9UQVJHRVRfQ09OTk1BUkspICs9IHh0X0NPTk5NQVJLLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfVEFSR0VUX01BUkspICs9IHh0X01BUksubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9UQVJHRVRfTkZRVUVVRSkgKz0geHRfTkZRVUVVRS5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX1RBUkdFVF9OT1RSQUNLKSArPSB4dF9OT1RSQUNLLm8KKworIyBtYXRjaGVzCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTU1FTlQpICs9IHh0X2NvbW1lbnQubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9DT05OQllURVMpICs9IHh0X2Nvbm5ieXRlcy5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTk5NQVJLKSArPSB4dF9jb25ubWFyay5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTk5UUkFDSykgKz0geHRfY29ubnRyYWNrLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfRENDUCkgKz0geHRfZGNjcC5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0hFTFBFUikgKz0geHRfaGVscGVyLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfTEVOR1RIKSArPSB4dF9sZW5ndGgubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9MSU1JVCkgKz0geHRfbGltaXQubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9NQUMpICs9IHh0X21hYy5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX01BUkspICs9IHh0X21hcmsubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9QS1RUWVBFKSArPSB4dF9wa3R0eXBlLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfUkVBTE0pICs9IHh0X3JlYWxtLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfU0NUUCkgKz0geHRfc2N0cC5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1NUQVRFKSArPSB4dF9zdGF0ZS5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1NUUklORykgKz0geHRfc3RyaW5nLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfVENQTVNTKSArPSB4dF90Y3Btc3Mubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9QSFlTREVWKSArPSB4dF9waHlzZGV2Lm8KZGlmZiAtLWdpdCBhL25ldC9uZXRmaWx0ZXIvbmZfY29ubnRyYWNrX2Z0cC5jIGIvbmV0L25ldGZpbHRlci9uZl9jb25udHJhY2tfZnRwLmMKaW5kZXggZDVhNmVhZi4uYWIwYzkyMCAxMDA2NDQKLS0t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mbzsKKworCWlmKCgqcHNrYiktPm5mbWFyayAhPSBtYXJraW5mby0+bWFyaykKKwkJKCpwc2tiKS0+bmZtYXJrID0gbWFya2luZm8tPm1hcms7CisKKwlyZXR1cm4gWFRfQ09OVElOVUU7Cit9CisKK3N0YXRpYyB1bnNpZ25lZCBpbnQKK3RhcmdldF92MShzdHJ1Y3Qgc2tfYnVmZiAqKnBza2IsCisJICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqaW4sCisJICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAorCSAgdW5zaWduZWQgaW50IGhvb2tudW0sCisJICBjb25zdCB2b2lkICp0YXJnaW5mbywKKwkgIHZvaWQgKnVzZXJpbmZvKQoreworCWNvbnN0IHN0cnVjdCB4dF9tYXJrX3RhcmdldF9pbmZvX3YxICptYXJraW5mbyA9IHRhcmdpbmZvOworCWludCBtYXJrID0gMDsKKworCXN3aXRjaCAobWFya2luZm8tPm1vZGUpIHsKKwljYXNlIFhUX01BUktfU0VUOgorCQltYXJrID0gbWFya2luZm8tPm1hcms7CisJCWJyZWFrOworCQkKKwljYXNlIFhUX01BUktfQU5EOgorCQltYXJrID0gKCpwc2tiKS0+bmZtYXJrICYgbWFya2luZm8tPm1hcms7CisJCWJyZWFrOworCQkKKwljYXNlIFhUX01BUktfT1I6CisJCW1hcmsgPSAoKnBza2IpLT5uZm1hcmsgfCBtYXJraW5mby0+bWFyazsKKwkJYnJlYWs7CisJfQorCisJaWYoKCpwc2tiKS0+bmZtYXJrICE9IG1hcmspCisJCSgqcHNrYiktPm5mbWFyayA9IG1hcms7CisKKwlyZXR1cm4gWFRfQ09OVElOVUU7Cit9CisKKworc3RhdGljIGludAorY2hlY2tlbnRyeV92MChjb25zdCBjaGFyICp0YWJsZW5hbWUsCisJICAgICAgY29uc3Qgdm9pZCAqZW50cnksCisJICAgICAgdm9pZCAqdGFyZ2luZm8sCisJICAgICAgdW5zaWduZWQgaW50IHRhcmdpbmZvc2l6Z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X0FVVEhPUigiQnJhZCBGaXNoZXIgPGJyYWRAaW5mby1saW5rLm5ldD4iKTsKK01PRFVMRV9ERVNDUklQVElPTigiaXB0YWJsZXMgY29tbWVudCBtYXRjaCBtb2R1bGUiKTsKK01PRFVMRV9MSUNFTlNFKCJHUEwiKTsKK01PRFVMRV9BTElBUygiaXB0X2NvbW1lbnQiKTsKK01PRFVMRV9BTElBUygiaXA2dF9jb21tZW50Iik7CisKK3N0YXRpYyBpbnQKK21hdGNoKGNvbnN0IHN0cnVjdCBza19idWZmICpza2IsCisgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqaW4sCisgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAorICAgICAgY29uc3Qgdm9pZCAqbWF0Y2hpbmZvLAorICAgICAgaW50IG9mZnNldCwKKyAgICAgIHVuc2lnbmVkIGludCBwcm90b29mZiwKKyAgICAgIGludCAqaG90ZHJvcCkKK3sKKwkvKiBXZSBhbHdheXMgbWF0Y2ggKi8KKwlyZXR1cm4gMTsKK30KKworc3RhdGljIGludAorY2hlY2tlbnRyeShjb25zdCBjaGFyICp0YWJsZW5hbWUsCisgICAgICAgICAgIGNvbnN0IHZvaWQgKmlwLAorICAgICAgICAgICB2b2lkICptYXRjaGluZm8sCisgICAgICAgICAgIHVuc2lnbmVkIGludCBtYXRjaHNpemUsCisgICAgICAgICAgIHVuc2lnbmVkIGludCBob29rX21hc2spCit7CisJLyogQ2hlY2sgdGhlIHNpemUgKi8KKwlpZiAobWF0Y2hzaXplICE9IFhUX0FMSUdOKHNpemVvZihzdHJ1Y3QgeHRfY29tbWVudF9pbmZvKSkpCisJCXJldHVybiAwOworCXJldHVybiAxOworfQorCitzdGF0aWMgc3RydWN0IHh0X21hdGNoIGNvbW1lbnRfbWF0Y2ggPSB7CisJLm5hbWUJCT0gImNvbW1lbnQiLAorCS5tYXRjaAkJPSBtYXRjaCwKKwkuY2hlY2tlbnRyeQk9IGNoZWNrZW50cn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XR1cm4gKCgoKmN0bWFyaykgJiBpbmZvLT5tYXNrKSA9PSBpbmZvLT5tYXJrKSBeIGluZm8tPmludmVydDsKK30KKworc3RhdGljIGludAorY2hlY2tlbnRyeShjb25zdCBjaGFyICp0YWJsZW5hbWUsCisJICAgY29uc3Qgdm9pZCAqaXAsCisJICAgdm9pZCAqbWF0Y2hpbmZvLAorCSAgIHVuc2lnbmVkIGludCBtYXRjaHNpemUsCisJICAgdW5zaWduZWQgaW50IGhvb2tfbWFzaykKK3sKKwlzdHJ1Y3QgeHRfY29ubm1hcmtfaW5mbyAqY20gPSAKKwkJCQkoc3RydWN0IHh0X2Nvbm5tYXJrX2luZm8gKiltYXRjaGluZm87CisJaWYgKG1hdGNoc2l6ZSAhPSBYVF9BTElHTihzaXplb2Yoc3RydWN0IHh0X2Nvbm5tYXJrX2luZm8pKSkKKwkJcmV0dXJuIDA7CisKKwlpZiAoY20tPm1hcmsgPiAweGZmZmZmZmZmIHx8IGNtLT5tYXNrID4gMHhmZmZmZmZmZikgeworCQlwcmludGsoS0VSTl9XQVJOSU5HICJjb25ubWFyazogb25seSBzdXBwb3J0IDMyYml0IG1hcmtcbiIpOworCQlyZXR1cm4gMDsKKwl9CisKKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHN0cnVjdCB4dF9tYXRjaCBjb25ubWFya19tYXRjaCA9IHsKKwkubmFtZSA9ICJjb25ubWFyayIsCisJLm1hdGNoID0gJm1hdGNoLAorCS5jaGVja2VudHJ5ID0gJmNoZWNrZW50cnksCisJLm1lID0gVEhJU19NT0RVTEUKK307CitzdGF0aWMgc3RydWN0IHh0X21hdGNoIGNvbm5tYXJrNl9tYXRjaCA9IHsKKwkubmFtZSA9ICJjb25ubWFyayIsCisJLm1hdGNoID0gJm1hdGNoLAorCS5jaGVja2VudHJ5ID0gJmNoZWNrZW50cnksCisJLm1lID0gVEhJU19NT0RVTEUKK307CisKKworc3RhdGljIGludCBfX2luaXQgaW5pdCh2b2lkKQoreworCWludCByZ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aXBjX25vZGUodGlwY19vd25fYWRkcik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTMyIG93bl9jbHVzdGVyKHZvaWQpCit7CisJcmV0dXJuIHRpcGNfY2x1c3Rlcih0aXBjX293bl9hZGRyKTsKK30KKworc3RhdGljIGlubGluZSB1MzIgb3duX3pvbmUodm9pZCkKK3sKKwlyZXR1cm4gdGlwY196b25lKHRpcGNfb3duX2FkZHIpOworfQorCitzdGF0aWMgaW5saW5lIGludCBpbl9vd25fY2x1c3Rlcih1MzIgYWRkcikKK3sKKwlyZXR1cm4gISgoYWRkciBeIHRpcGNfb3duX2FkZHIpID4+IDEyKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgaW5fb3duX3pvbmUodTMyIGFkZHIpCit7CisJcmV0dXJuICEoKGFkZHIgXiB0aXBjX293bl9hZGRyKSA+PiAyNCk7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IGlzX3NsYXZlKHUzMiBhZGRyKQoreworCXJldHVybiBhZGRyICYgMHg4MDA7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IG1heV9yb3V0ZSh1MzIgYWRkcikKK3sKKwlyZXR1cm4oYWRkciBeIHRpcGNfb3duX2FkZHIpID4+IDExOworfQorCitzdGF0aWMgaW5saW5lIGludCBpbl9zY29wZSh1MzIgZG9tYWluLCB1MzIgYWRkcikKK3sKKwlpZiAoIWRvbWFpbiB8fCAoZG9tYWluID09IGFkZHIpKQorCQlyZXR1cm4gMTsKKwlpZiAoZG9tYWluID09IChhZGRyICYgMHhmZmZmZjAwMHUpKSAvKiBkb21haW4gPFouQy4wPiAqLworCQlyZXR1cm4gMTsKKwlpZiAoZG9tYWluID09IChhZGRyICYgMHhmZjAwMDAwMHUpKSAvKiBkb21haW4gPFouMC4wPiAqLworCQlyZXR1cm4gMTsKKwlyZXR1cm4gMDsKK30KKworLyoqCisgKiBhZGRyX3Njb3BlIC0gY29udmVydCBtZXNzYWdlIGxvb2t1cCBkb21haW4gdG8gZXF1aXZhbGVudCAyLWJpdCBzY29wZSB2YWx1ZQorICovCisKK3N0YXRpYyBpbmxpbmUgaW50IGFkZHJfc2NvcGUodTMyIGRvbWFpbikKK3sKKwlpZiAobGlrZWx5KCFkb21haW4pKQorCQlyZXR1cm4gVElQQ19aT05FX1NDT1BFOworCWlmICh0aXBjX25vZGUoZG9tYWluKSkKKwkJcmV0dXJuIFRJUENfTk9ERV9TQ09QRTsKKwlpZiAodGlwY19jbHVzdGVyKGRvbWFpbikpCisJCXJldHVybiBUSVBDX0NMVVNURVJfU0NPUEU7CisJcmV0dXJuIFRJUENfWk9ORV9TQ09QRTsKK30KKworLyoqCisgKiBhZGRyX2RvbWFpbiAtIGNvbnZlcnQgMi1iaXQgc2NvcGUgdmFsdWUgdG8gZXF1aXZhbGVudCBtZXNzYWdlIGxvb2t1cCBkb21haW4KKyAqICAKKyAqIE5lZWRlZCB3aGVuIGFkZHJlc3Mgb2YgYSBuYW1lZCBtZXNzYWdlIG11c3QgYmUgbG9va2VkIHVwIGEgc2Vjb25kIHRpbWUgCisgKiBhZnRlciBhIG5ldHdvcmsgaG9wLgorICovCisKK3N0YXRpYyBpbmxpbmUgaW50IGFkZHJfZG9tYWluKGludCBzYykKK3sKKwlpZiAobGlrZWx5KHNjID09IFRJUENfTk9ERV9TQ09QRSkpCisJCXJldHVybiB0aXBjX293bl9hZGRyOworCWlmIChzYyA9PSBUSVBDX0NMVVNURVJfU0NPUEUpCisJCXJldHVybiB0aXBjX2FkZHIodGlwY196b25lKHRpcGNfb3duX2FkZHIpLAorCQkJCSB0aXBjX2NsdXN0ZXIodGlwY19vd25fYWRkciksIDApOworCXJldHVybiB0aXBjX2FkZHIodGlwY196b25lKHRpcGNfb3duX2FkZHIpLCAwLCAwKTsKK30KKworc3RhdGljIGlubGluZSBjaGFyICphZGRyX3N0cmluZ19maWxsKGNoYXIgKnN0cmluZywgdTMyIGFkZHIpCit7CisJc25wcmludGYoc3RyaW5nLCAxNiwgIjwldS4ldS4ldT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mRlZiBDT05GSUdfVElQQ19aT05FUworI2RlZmluZSBDT05GSUdfVElQQ19aT05FUyAzCisjZW5kaWYKKworI2lmbmRlZiBDT05GSUdfVElQQ19DTFVTVEVSUworI2RlZmluZSBDT05GSUdfVElQQ19DTFVTVEVSUyAxCisjZW5kaWYKKworI2lmbmRlZiBDT05GSUdfVElQQ19OT0RFUworI2RlZmluZSBDT05GSUdfVElQQ19OT0RFUyAyNTUKKyNlbmRpZgorCisjaWZuZGVmIENPTkZJR19USVBDX1NMQVZFX05PREVTCisjZGVmaW5lIENPTkZJR19USVBDX1NMQVZFX05PREVTIDAKKyNlbmRpZgorCisjaWZuZGVmIENPTkZJR19USVBDX1BPUlRTCisjZGVmaW5lIENPTkZJR19USVBDX1BPUlRTIDgxOTEKKyNlbmRpZgorCisjaWZuZGVmIENPTkZJR19USVBDX0xPRworI2RlZmluZSBDT05GSUdfVElQQ19MT0cgMAorI2VuZGlmCisKKy8qIGdsb2JhbCB2YXJpYWJsZXMgdXNlZCBieSBtdWx0aXBsZSBzdWItc3lzdGVtcyB3aXRoaW4gVElQQyAqLworCitpbnQgdGlwY19tb2RlID0gVElQQ19OT1RfUlVOTklORzsKK2ludCB0aXBjX3JhbmRvbTsKK2F0b21pY190IHRpcGNfdXNlcl9jb3VudCA9IEFUT01JQ19JTklUKDApOworCitjb25zdCBjaGFyIHRpcGNfYWxwaGFiZXRbXSA9IAorCSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OV8iOworCisvKiBjb25maWd1cmFibGUgVElQQyBwYXJhbWV0ZXJzICovCisKK3UzMiB0aXBjX293bl9hZGRyOworaW50IHRpcGNfbWF4X3pvbmVzOworaW50IHRpcGNfbWF4X2NsdXN0ZXJzOworaW50IHRpcGNfbWF4X25vZGVzOworaW50IHRpcGNfbWF4X3NsYXZlczsKK2ludCB0aXBjX21heF9wb3J0czsKK2ludCB0aXBjX21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SBoYXMgYmVlbiBsb3N0LCBsaW5lYXJpemUgYnVmZmVyIGFuZCBwcmVwZW5kIGFuIGVycm9yIG1lc3NhZ2UKKyAqIAorICogUmV0dXJucyBsZW5ndGggb2YgcHJpbnQgYnVmZmVyIGRhdGEgc3RyaW5nIChpbmNsdWRpbmcgdHJhaWxpbmcgTlVMTCkKKyAqLworCitpbnQgdGlwY19wcmludGJ1Zl92YWxpZGF0ZShzdHJ1Y3QgcHJpbnRfYnVmICpwYikKK3sKKyAgICAgICAgY2hhciAqZXJyID0gIiAgICAgICAgICAgICAqKiogUFJJTlQgQlVGRkVSIFdSQVBQRUQgQVJPVU5EICoqKlxuIjsKKyAgICAgICAgY2hhciAqY3BfYnVmOworICAgICAgICBzdHJ1Y3QgcHJpbnRfYnVmIGNiOworCisJaWYgKCFwYiB8fCAhcGItPmJ1ZikKKwkJcmV0dXJuIDA7CisKKwlpZiAocGItPmJ1ZltwYi0+c2l6ZSAtIDFdID09ICdcMCcpIHsKKyAgICAgICAgICAgICAgICBjcF9idWYgPSBrbWFsbG9jKHBiLT5zaXplLCBHRlBfQVRPTUlDKTsKKyAgICAgICAgICAgICAgICBpZiAoY3BfYnVmICE9IE5VTEwpeworICAgICAgICAgICAgICAgICAgICAgICAgdGlwY19wcmludGJ1Zl9pbml0KCZjYiwgY3BfYnVmLCBwYi0+c2l6ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX3ByaW50YnVmX21vdmUoJmNiLCBwYik7CisgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX3ByaW50YnVmX21vdmUocGIsICZjYik7CisgICAgICAgICAgICAgICAgICAgICAgICBrZnJlZShjcF9idWYpOworICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KHBiLT5idWYsIGVyciwgc3RybGVuKGVycikpOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX3ByaW50YnVmX3Jlc2V0KHBiKTsKKyAgICAgICAgIC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ocHJpbnRfc3RyaW5nKTsKKwkJZWxzZSBpZiAocGItPmJ1ZikgeworCQkJY2hhcnNfbGVmdCA9IHBiLT5idWYgKyBwYi0+c2l6ZSAtIHBiLT5jcnMgLSAxOworCQkJaWYgKGNoYXJzX3RvX2FkZCA8PSBjaGFyc19sZWZ0KSB7CisJCQkJc3RyY3B5KHBiLT5jcnMsIHByaW50X3N0cmluZyk7CisJCQkJcGItPmNycyArPSBjaGFyc190b19hZGQ7CisJCQl9IGVsc2UgeworCQkJCXN0cmNweShwYi0+YnVmLCBwcmludF9zdHJpbmcgKyBjaGFyc19sZWZ0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZV9jaGFyID0gcHJpbnRfc3RyaW5nW2NoYXJzX2xlZnRdOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludF9zdHJpbmdbY2hhcnNfbGVmdF0gPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJjcHkocGItPmNycywgcHJpbnRfc3RyaW5nKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRfc3RyaW5nW2NoYXJzX2xlZnRdID0gc2F2ZV9jaGFyOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYi0+Y3JzID0gcGItPmJ1ZiArIGNoYXJzX3RvX2FkZCAtIGNoYXJzX2xlZnQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorCQlwYl9uZXh0ID0gcGItPm5leHQ7CisJCXBiLT5uZXh0ID0gMDsKKwkJcGIgPSBwYl9uZXh0OworCX0KKwlzcGluX3VubG9ja19iaCgmcHJpbnRfbG9jayk7Cit9CisKKy8qKgorICogVElQQ19URUUgLSBwZXJmb3JtIG5leHQgb3V0cHV0IG9wZXJhdGlvbiBvbiBib3RoIHByaW50IGJ1ZmZlcnMgIAorICovCisKK3N0cnVjdCBwcmludF9idWYgKlRJUENfVEVFKHN0cnVjdC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3sKKwlpbnQgbGVuOworCisJLyogRHVtcCBwcmludCBidWZmZXIgZnJvbSBjaGFyIGFmdGVyIGN1cnNvciB0byBlbmQgKGlmIHVzZWQpICovCisJbGVuID0gcGItPmJ1ZiArIHBiLT5zaXplIC0gcGItPmNycyAtIDI7CisJaWYgKChwYi0+YnVmW3BiLT5zaXplIC0gMV0gPT0gMCkgJiYgKGxlbiA+IDApKQorCQlwcmludF90b19jb25zb2xlKHBiLT5jcnMgKyAxLCBsZW4pOworCisJLyogRHVtcCBwcmludCBidWZmZXIgZnJvbSBzdGFydCB0byBjdXJzb3IgKGFsd2F5cykgKi8KKwlsZW4gPSBwYi0+Y3JzIC0gcGItPmJ1ZjsKKwlwcmludF90b19jb25zb2xlKHBiLT5idWYsIGxlbik7Cit9CisKKy8qKgorICogdGlwY19kdW1wIC0gZHVtcCBub24tY29uc29sZSBwcmludCBidWZmZXIocykgdG8gY29uc29sZQorICovCisKK3ZvaWQgdGlwY19kdW1wKHN0cnVjdCBwcmludF9idWYgKnBiLCBjb25zdCBjaGFyICpmbXQsIC4uLikKK3sKKwlpbnQgbGVuOworCisJc3Bpbl9sb2NrX2JoKCZwcmludF9sb2NrKTsKKwlGT1JNQVQoVElQQ19DT05TLT5idWYsIGxlbiwgZm10KTsKKwlwcmludGsoVElQQ19DT05TLT5idWYpOworCisJZm9yICg7IHBiOyBwYiA9IHBiLT5uZXh0KSB7CisJCWlmIChwYiA9PSBUSVBDX0NPTlMpCisJCQljb250aW51ZTsKKwkJcHJpbnRrKCJcbi0tLS0gU3RhcnQgb2YgZHVtcCwlcyBsb2cgLS0tLVxuXG4iLCAKKwkJICAgICAgIChwYiA9PSBUSVBDX0xPRykgPyAiZ2xvYmFsIiA6ICJsb2NhbCIpOworCQlwcmludGJ1Zl9kdW1wKHBiKTsKKwkJdGlwY19wcmludGJ1Zl9yZXNldChwYik7CisJCXByaW50aygiXG4tLS0tLS0tLSBFbmQgb2YgZHVtcCAtLS0tLS0tLVxuIik7CisJfQ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JfcHRyLCBidWYsICZsX3B0ci0+bWVkaWFfYWRkcikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIENhdGNoIGlmIHJldHJhbnNtaXNzaW9ucyBmYWlsIHJlcGVhdGVkbHk6ICovCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAobF9wdHItPmxhc3RfcmV0cmFuc21pdHRlZCA9PSBtc2dfc2Vxbm8obXNnKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKytsX3B0ci0+c3RhbGVfY291bnQgPiAxMDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX21zZ19wcmludChUSVBDX0NPTlMsIGJ1Zl9tc2coYnVmKSwgIj5SRVRSPiIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm8oIi4uLlJldHJhbnNtaXR0ZWQgJXUgdGltZXNcbiIsCisJCQkJCSAgICAgbF9wdHItPnN0YWxlX2NvdW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rX3ByaW50KGxfcHRyLCBUSVBDX0NPTlMsICJSZXNldHRpbmcgTGlua1xuIik7OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfbGlua19yZXNldChsX3B0cik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxfcHRyLT5zdGFsZV9jb3VudCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bGFzdF9yZXRyYW5zbWl0dGVkID0gbXNnX3NlcW5vKG1zZyk7CisKKwkJCW1zZ19kYmcoYnVmX21zZyhidWYpL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+bWF4X3BrdF9wcm9iZXMgPT0gMTApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bWF4X3BrdF90YXJnZXQgPSAobXNnX3NpemUgLSA0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bWF4X3BrdF9wcm9iZXMgPSAwOworCQkJCQltc2dfc2l6ZSA9IChtdHUgKyAobF9wdHItPm1heF9wa3RfdGFyZ2V0IC0gbXR1KS8yICsgMikgJiB+MzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkJCWxfcHRyLT5tYXhfcGt0X3Byb2JlcysrOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisJCQlsX3B0ci0+c3RhdHMuc2VudF9wcm9iZXMrKzsKKyAgICAgICAgICAgICAgICB9CisJCWxfcHRyLT5zdGF0cy5zZW50X3N0YXRlcysrOworCX0gZWxzZSB7CQkvKiBSRVNFVF9NU0cgb3IgQUNUSVZBVEVfTVNHICovCisJCW1zZ19zZXRfYWNrKG1zZywgbW9kKGxfcHRyLT5yZXNldF9jaGVja3BvaW50IC0gMSkpOworCQltc2dfc2V0X3NlcV9nYXAobXNnLCAwKTsKKwkJbXNnX3NldF9uZXh0X3NlbnQobXNnLCAxKTsKKwkJbXNnX3NldF9saW5rX3RvbGVyYW5jZShtc2csIGxfcHRyLT50b2xlcmFuY2UpOworCQltc2dfc2V0X2xpbmtwcmlvKG1zZywgbF9wdHItPnByaW9yaXR5KTsKKwkJbXNnX3NldF9tYXhfcGt0KG1zZywgbF9wdHItPm1heF9wa3RfdGFyZ2V0KTsKKwl9CisKKwlpZiAodGlwY19ub2RlX2hhc19yZWR1bmRhbnRfbGlua3MobF9wdHItPm93bmVyKSkgeworCQltc2dfc2V0X3JlZHVuZGFudF9saW5rKG1zZyk7CisJfSBlbHNlIHsKKwkJbXNnX2NsZWFyX3JlZHVuZGFudF9saW5rKG1zZyk7CisJfQor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fcGt0LCBtYXhfcGt0X2Fjayk7CisgICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bWF4X3BrdCA9IG1heF9wa3RfYWNrOworICAgICAgICAgICAgICAgICAgICAgICAgbF9wdHItPm1heF9wa3RfcHJvYmVzID0gMDsKKyAgICAgICAgICAgICAgICB9CisKKwkJbWF4X3BrdF9hY2sgPSAwOworICAgICAgICAgICAgICAgIGlmIChtc2dfcHJvYmUobXNnKSkgeworCQkJbF9wdHItPnN0YXRzLnJlY3ZfcHJvYmVzKys7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAobXNnX3NpemUobXNnKSA+IHNpemVvZihsX3B0ci0+cHJvdG9fbXNnKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfcGt0X2FjayA9IG1zZ19zaXplKG1zZyk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorCisJCS8qIFByb3RvY29sIG1lc3NhZ2UgYmVmb3JlIHJldHJhbnNtaXRzLCByZWR1Y2UgbG9zcyByaXNrICovCisKKwkJdGlwY19iY2xpbmtfY2hlY2tfZ2FwKGxfcHRyLT5vd25lciwgbXNnX2xhc3RfYmNhc3QobXNnKSk7CisKKwkJaWYgKHJlY19nYXAgfHwgKG1zZ19wcm9iZShtc2cpKSkgeworCQkJdGlwY19saW5rX3NlbmRfcHJvdG9fbXNnKGxfcHRyLCBTVEFURV9NU0csCisJCQkJCQkgMCwgcmVjX2dhcCwgMCwgMCwgbWF4X3BrdF9hY2spOworCQl9CisJCWlmIChtc2dfc2VxX2dhcChtc2cpKSB7CisJCQltc2dfZGJnKG1zZywgIldpdGggR2FwOiIpOworCQkJbF9wdHItPnN0YXRzLnJlY3ZfbmFja3MrKzsKKwkJCXRpcGNfbGlua19yZXRyYW5zbWl0KGxfcHRyLCBsX3B0ci0+Zmlyc3Rfb3V0LAorCQkJCQkgICAgIG1zZ19zZXFfZ2FwKG1zZykpOworCQl9CisJCWJyZWFr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ZGF0YShtKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIG1zZ19leHBhbmQoc3RydWN0IHRpcGNfbXNnICptLCB1MzIgZGVzdG5vZGUpIAoreworCWlmICghbXNnX3Nob3J0KG0pKQorCQlyZXR1cm47CisJbXNnX3NldF9oZHJfc3oobSwgTE9OR19IX1NJWkUpOworCW1zZ19zZXRfb3JpZ25vZGUobSwgbXNnX3ByZXZub2RlKG0pKTsKKwltc2dfc2V0X2Rlc3Rub2RlKG0sIGRlc3Rub2RlKTsKKwltZW1zZXQoJm0tPmhkcls4XSwgMCwgMTIpOworfQorCisKKworLyoKKwkJVElQQyBpbnRlcm5hbCBtZXNzYWdlIGhlYWRlciBmb3JtYXQsIHZlcnNpb24gMgorCisgICAgICAgMSAwIDkgOCA3IDYgNSA0fDMgMiAxIDAgOSA4IDcgNnw1IDQgMyAyIDEgMCA5IDh8NyA2IDUgNCAzIDIgMSAwIAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHcwOnx2ZXJzIHxtc2cgdXNyfGhkciBzeiB8bnxyZXNydnwgICAgICAgICAgICBwYWNrZXQgc2l6ZSAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzE6fG0gdHlwfHJzdj0wfCAgIHNlcXVlbmNlIGdhcCAgICB8ICAgICAgIGJyb2FkY2FzdCBhY2sgbm8gICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3Mjp8IGxpbmsgbGV2ZWwgYWNrIG5vL2JjX2dhcF9mcm9tIHwgICAgIHNlcSBubyAvIGJjYXN0X2dhcF90byAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHczOnwgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzIG5vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzQ6fCAgbmV4dCBzZW50IGJyb2FkY2FzdC9mcmFnbSBubyB8IG5leHQgc2VudCBwa3QvIGZyYWdtIG1zZyBubyAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3NTp8ICAgICAgICAgIHNlc3Npb24gbm8gICAgICAgICAgIHxyc3Y9MHxyfGJlcmlkfGxpbmsgcHJpb3xuZXRwbHxwfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHc2OnwgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYXRpbmcgbm9kZSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgdzc6fCAgICAgICAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbiBub2RlICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB3ODp8ICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydCBzZXF1ZW5jZSBudW1iZXIgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHc5OnwgICBtc2cgY291bnQgLyBiY2FzdCB0YWcgICAgICAgfCAgICAgICBsaW5rIHRvbGVyYW5jZSAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgXCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICBVc2VyIFNwZWNpZmljIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICBcICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgTkI6IENPTk5fTUFOQUdFUiB1c2UgZGF0YSBtZXNzYWdlIGZvcm1hdC4gTElOS19DT05GSUcgaGFzIG93biBmb3JtYXQuCisqLyAgIAorCisvKiAKKyAqIEludGVybmFsIHVzZXJzCisgKi8KKworI2RlZmluZSAgQkNBU1RfUFJPVE9DT0wgICAgICAgNQorI2RlZmluZSAgTVNHX0JVTkRMRVIgICAgICAgICAgNgorI2RlZmluZSAgTElOS19QUk9UT0NPTCAgICAgICAgNworI2RlZmluZSAgQ09OTl9NQU5BR0VSICAgICAgICAgOAorI2RlZmluZSAgUk9VVEVfRElTVFJJQlVUT1IgICAgOQorI2RlZmluZSAgQ0hBTkdFT1ZFUl9QUk9UT0NPTCAgMTAKKyNkZWZpbmUgIE5BTUVfRElTVFJJQlVUT1IgICAgIDExCisjZGVmaW5lICBNU0dfRlJBR01FTlRFUiAgICAgICAxMgorI2RlZmluZSAgTElOS19DT05GSUcgICAgICAgICAgMTMKKyNkZWZpbmUgIElOVF9IX1NJWkUgICAgICAgICAgIDQwCisjZGVmaW5lICBEU0NfSF9TSVpFICAgICAgICAgICA0MAorCisvKiAKKyAqICBDb25uZWN0aW9uIG1hbmFnZW1lbnQgcHJvdG9jb2wgbWVzc2FnZXMKKyAqLworCisjZGVmaW5lIENPTk5fUFJPQkUgICAgICAgIDAKKyNkZWZpbmUgQ09OTl9QUk9CRV9SRVBMWSAgMQorI2RlZmluZSBDT05OX0FDSyAgICAgICAgICAyCisKKy8qIAorICogTmFtZSBkaXN0cmlidXRvciBtZXNzYWdlcworICovCisKKyNkZWZpbmUgUFVCTElDQVRJT04gICAgICAgMAorI2RlZmluZSBXSVRIRFJBV0FMICAgICAgICAxCisKKworLyogCisgKiBXb3JkIDEKKyAqLworCitzdGF0aWMgaW5saW5lIHUzMiBtc2dfc2VxX2dhcChzdHJ1Y3QgdGlwY19tc2cgKm0pCit7CisJcmV0dXJuIG1zZ19iaXRzKG0sIDEsIDE2LCAweGZmKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIG1zZ19zZXRfc2VxX2dhcChzdHJ1Y3QgdGlwY19tc2cgKm0sIHUzMiBuKQoreworCW1zZ19zZXRfYml0cyhtLCAxLCAxNiwgMHhmZiwgbik7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTMyIG1zZ19yZXFfbGlua3Moc3RydWN0IHRpcGNfbXNnICptKQoreworCXJldHVybiBtc2dfYml0cyhtLCAxLCAxNiwgMHhmZmYpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgbXNnX3NldF9yZXFfbGlua3Moc3RydWN0IHRpcGNfbXNnICptLCB1MzIgbikgCit7CisJbXNnX3NldF9iaXRzKG0sIDEsIDE2LCAweGZmZiwgbik7Cit9CisKKworLyogCisgKiBXb3JkIDIKKyAqLworCitzdGF0aWMgaW5saW5lIHUzMiBtc2dfZGVzdF9kb21haW4oc3RydWN0IHRpcGNfbXNnICptKQoreworCXJldHVybiBtc2dfd29yZChtLCA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mICghdGlwY19uZXQuem9uZXNbel9udW1dKQorCQkJY29udGludWU7CisJCXRpcGNfem9uZV9yZW1vdmVfYXNfcm91dGVyKHRpcGNfbmV0LnpvbmVzW3pfbnVtXSwgcm91dGVyKTsKKwl9Cit9CisKK3ZvaWQgdGlwY19uZXRfc2VuZF9leHRlcm5hbF9yb3V0ZXModTMyIGRlc3QpCit7CisJdTMyIHpfbnVtOworCisJZm9yICh6X251bSA9IDE7IHpfbnVtIDw9IHRpcGNfbWF4X3pvbmVzOyB6X251bSsrKSB7CisJCWlmICh0aXBjX25ldC56b25lc1t6X251bV0pCisJCQl0aXBjX3pvbmVfc2VuZF9leHRlcm5hbF9yb3V0ZXModGlwY19uZXQuem9uZXNbel9udW1dLCBkZXN0KTsKKwl9Cit9CisKK3N0YXRpYyBpbnQgbmV0X2luaXQodm9pZCkKK3sKKwl1MzIgc3ogPSBzaXplb2Yoc3RydWN0IF96b25lICopICogKHRpcGNfbWF4X3pvbmVzICsgMSk7CisKKwltZW1zZXQoJnRpcGNfbmV0LCAwLCBzaXplb2YodGlwY19uZXQpKTsKKwl0aXBjX25ldC56b25lcyA9IChzdHJ1Y3QgX3pvbmUgKiopa21hbGxvYyhzeiwgR0ZQX0FUT01JQyk7CisJaWYgKCF0aXBjX25ldC56b25lcykgeworCQlyZXR1cm4gLUVOT01FTTsKKwl9CisJbWVtc2V0KHRpcGNfbmV0LnpvbmVzLCAwLCBzeik7CisJcmV0dXJuIFRJUENfT0s7Cit9CisKK3N0YXRpYyB2b2lkIG5ldF9zdG9wKHZvaWQpCit7CisJdTMyIHpfbnVtOworCisJaWYgKCF0aXBjX25ldC56b25lcykKKwkJcmV0dXJuOworCisJZm9yICh6X251bSA9IDE7IHpfbnVtIDw9IHRpcGNfbWF4X3pvbmVzOyB6X251bSsrKSB7CisJCXRpcGNfem9uZV9kZWxldGUodGlwY19uZXQuem9uZXNbel9udW1dKTsKKwl9CisJa2ZyZWUodGlwY19uZXQuem9uZXMpOworCXRpcGNf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5fcHRyLT5sb2NrID0gIFNQSU5fTE9DS19VTkxPQ0tFRDsJCisgICAgICAgICAgICAgICAgSU5JVF9MSVNUX0hFQUQoJm5fcHRyLT5uc3ViKTsKKwkKKwkJY19wdHIgPSB0aXBjX2NsdHJfZmluZChhZGRyKTsKKyAgICAgICAgICAgICAgICBpZiAoY19wdHIgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgICAgIGNfcHRyID0gdGlwY19jbHRyX2NyZWF0ZShhZGRyKTsKKyAgICAgICAgICAgICAgICBpZiAoY19wdHIgIT0gTlVMTCkgeworICAgICAgICAgICAgICAgICAgICAgICAgbl9wdHItPm93bmVyID0gY19wdHI7CisgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX2NsdHJfYXR0YWNoX25vZGUoY19wdHIsIG5fcHRyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIG5fcHRyLT5sYXN0X3JvdXRlciA9IC0xOworCisgICAgICAgICAgICAgICAgICAgICAgICAvKiBJbnNlcnQgbm9kZSBpbnRvIG9yZGVyZWQgbGlzdCAqLworICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjdXJyX25vZGUgPSAmdGlwY19ub2RlczsgKmN1cnJfbm9kZTsgCisJCQkgICAgIGN1cnJfbm9kZSA9ICYoKmN1cnJfbm9kZSktPm5leHQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFkZHIgPCAoKmN1cnJfbm9kZSktPmFkZHIpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuX3B0ci0+bmV4dCA9ICpjdXJyX25vZGU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICgqY3Vycl9ub2RlKSA9IG5fcHRyOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBrZnJlZShuX3B0cik7CisgICAgICAgICAgICAgICAgICAgICAgICBuX3B0ciA9IE5VTEw7CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisJcmV0dXJuIG5fcHRyOworfQorCit2b2lkIHRpcGNfbm9kZV9kZWxldGUoc3RydWN0IG5vZGUgKm5fcHRyKQoreworCWlmICghbl9wdHIpCisJCXJldHVybjsKKworI2lmIDAKKwkvKiBOb3QgbmVlZGVkIGJlY2F1c2UgbGlua3MgYXJlIGFscmVhZHkgZGVsZXRlZCB2aWEgdGlwY19iZWFyZXJfc3RvcCgpICovCisKKwl1MzIgbF9udW07CisKKwlmb3IgKGxfbnVtID0gMDsgbF9udW0gPCBNQVhfQkVBUkVSUzsgbF9udW0rKykgeworCQlsaW5rX2RlbGV0ZShuX3B0ci0+bGlua3NbbF9udW1dKTsKKwl9CisjZW5kaWYKKworCWRiZygibm9kZSAleCBkZWxldGVkXG4iLCBuX3B0ci0+YWRkcik7CisJa2ZyZWUobl9wdHIpOworfQorCisKKy8qKgorICogdGlwY19ub2RlX2xpbmtfdXAgLSBoYW5kbGUgYWRkaXRpb24gb2YgbGluaworICogCisgKiBMaW5rIGJlY29tZXMgYWN0aXZlIChhbG9uZSBvciBzaGFyZWQpIG9yIHN0YW5kYnksIGRlcGVuZGluZyBvbiBpdHMgcHJpb3JpdHkuCisgKi8KKwordm9pZCB0aXBjX25vZGVfbGlua191cChzdHJ1Y3Qgbm9kZSAqbl9wdHIsIHN0cnVjdCBsaW5rICpsX3B0cikKK3sKKwlzdHJ1Y3QgbGluayAqKmFjdGl2ZSA9ICZuX3B0ci0+YWN0aXZlX2xpbmtzWzBdOworCisJaW5mbygiRXN0YWJsaXNoZWQgbGluayA8JXM+IG9uIG5ldHdvcmsgcGxhbmUgJWNcbiIsCisJICAgICBsX3B0ci0+bmFtZSwgbF9wdHItPmJfcHRyLT5uZXRfcGxhbmUpOworCQorCWlmICghYWN0a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ayAqbF9wdHIpCit7CisJc3RydWN0IG5vZGUgKm5fcHRyID0gdGlwY19ub2RlX2ZpbmQobF9wdHItPmFkZHIpOworCisJaWYgKCFuX3B0cikKKwkJbl9wdHIgPSB0aXBjX25vZGVfY3JlYXRlKGxfcHRyLT5hZGRyKTsKKyAgICAgICAgaWYgKG5fcHRyKSB7CisJCXUzMiBiZWFyZXJfaWQgPSBsX3B0ci0+Yl9wdHItPmlkZW50aXR5OworCQljaGFyIGFkZHJfc3RyaW5nWzE2XTsKKworICAgICAgICAgICAgICAgIGFzc2VydChiZWFyZXJfaWQgPCBNQVhfQkVBUkVSUyk7CisgICAgICAgICAgICAgICAgaWYgKG5fcHRyLT5saW5rX2NudCA+PSAyKSB7CisJCQljaGFyIGFkZHJfc3RyaW5nWzE2XTsKKworICAgICAgICAgICAgICAgICAgICAgICAgZXJyKCJBdHRlbXB0IHRvIGNyZWF0ZSB0aGlyZCBsaW5rIHRvICVzXG4iLAorCQkJICAgIGFkZHJfc3RyaW5nX2ZpbGwoYWRkcl9zdHJpbmcsIG5fcHRyLT5hZGRyKSk7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBpZiAoIW5fcHRyLT5saW5rc1tiZWFyZXJfaWRdKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBuX3B0ci0+bGlua3NbYmVhcmVyX2lkXSA9IGxfcHRyOworICAgICAgICAgICAgICAgICAgICAgICAgdGlwY19uZXQuem9uZXNbdGlwY196b25lKGxfcHRyLT5hZGRyKV0tPmxpbmtzKys7CisgICAgICAgICAgICAgICAgICAgICAgICBuX3B0ci0+bGlua19jbnQrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuX3B0cjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZXJyKCJBdHRlbXB0IHRvIGVzdGFibGlzaCBzZWNvbmQgbGluayBvbiA8JXM+IHRvIDw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9zY29wZShkb21haW4sIG5fcHRyLT5hZGRyKSkKKwkJCWNvbnRpbnVlOworICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBNQVhfQkVBUkVSUzsgaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW5fcHRyLT5saW5rc1tpXSkgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICAgICAgbGlua19pbmZvLmRlc3QgPSBodG9ubChuX3B0ci0+YWRkcik7CisgICAgICAgICAgICAgICAgICAgICAgICBsaW5rX2luZm8udXAgPSBodG9ubCh0aXBjX2xpbmtfaXNfdXAobl9wdHItPmxpbmtzW2ldKSk7CisgICAgICAgICAgICAgICAgICAgICAgICBzdHJjcHkobGlua19pbmZvLnN0ciwgbl9wdHItPmxpbmtzW2ldLT5uYW1lKTsKKwkJCXRpcGNfY2ZnX2FwcGVuZF90bHYoYnVmLCBUSVBDX1RMVl9MSU5LX0lORk8sIAorCQkJCQkgICAgJmxpbmtfaW5mbywgc2l6ZW9mKGxpbmtfaW5mbykpOworICAgICAgICAgICAgICAgIH0KKwl9CisKKwlyZXR1cm4gYnVmOworfQpkaWZmIC0tZ2l0IGEvbmV0L3RpcGMvbm9kZS5oIGIvbmV0L3RpcGMvbm9kZS5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjI5ZjdhZTYKLS0tIC9kZXYvbnVsbAorKysgYi9uZXQvdGlwYy9ub2RlLmgKQEAgLTAsMCArMSwxNDQgQEAKKy8qCisgKiBuZXQvdGlwYy9ub2RlLmg6IEluY2x1ZGUgZmlsZSBmb3IgVElQQyBub2RlIG1hbmFnZW1lbnQgcm91dGluZXMKKyAqIAorICogQ29weXJpZ2h0IChjKSAyMDAwLTIwMDYsIEVyaWNzc29uIEFCCisgKiBDb3B5cmlnaHQgKGMpIDIwMDUsIFdpbmQgUml2ZXIgU3lzdGVtcworICogQWx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wkJCX0KKwkJfQorCQlpZiAobXNnX3R5cGUobXNnKSA9PSBDT05OX0FDSykgeworCQkJaW50IHdha2V1cCA9IHRpcGNfcG9ydF9jb25nZXN0ZWQocF9wdHIpICYmIAorCQkJCSAgICAgcF9wdHItPnB1YmwuY29uZ2VzdGVkICYmCisJCQkJICAgICBwX3B0ci0+d2FrZXVwOworCQkJcF9wdHItPmFja2VkICs9IG1zZ19tc2djbnQobXNnKTsKKwkJCWlmICh0aXBjX3BvcnRfY29uZ2VzdGVkKHBfcHRyKSkKKwkJCQlnb3RvIGV4aXQ7CisJCQlwX3B0ci0+cHVibC5jb25nZXN0ZWQgPSAwOworCQkJaWYgKCF3YWtldXApCisJCQkJZ290byBleGl0OworCQkJcF9wdHItPndha2V1cCgmcF9wdHItPnB1YmwpOworCQkJZ290byBleGl0OworCQl9CisJfSBlbHNlIGlmIChwX3B0ci0+cHVibC5wdWJsaXNoZWQpIHsKKwkJZXJyID0gVElQQ19FUlJfTk9fUE9SVDsKKwl9CisJaWYgKGVycikgeworCQlyX2J1ZiA9IHBvcnRfYnVpbGRfcHJvdG9fbXNnKG1zZ19vcmlncG9ydChtc2cpLAorCQkJCQkgICAgIG1zZ19vcmlnbm9kZShtc2cpLCAKKwkJCQkJICAgICBtc2dfZGVzdHBvcnQobXNnKSwgCisJCQkJCSAgICAgdGlwY19vd25fYWRkciwKKwkJCQkJICAgICBEQVRBX0hJR0gsCisJCQkJCSAgICAgVElQQ19DT05OX01TRywKKwkJCQkJICAgICBlcnIsCisJCQkJCSAgICAgMCwKKwkJCQkJICAgICAwKTsKKwkJZ290byBleGl0OworCX0KKworCS8qIEFsbCBpcyBmaW5lICovCisJaWYgKG1zZ190eXBlKG1zZykgPT0gQ09OTl9QUk9CRSkgeworCQlyX2J1ZiA9IHBvcnRfYnVpbGRfcHJvdG9fbXNnKG1zZ19vcmlncG9ydChtc2cpLCAKKwkJCQkJICAgICBtc2dfb3JpZ25vZGUobXNnKSwgCisJCQkJCSAgICAgb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KyAgICAgICAgICAgICAgICB1MzIgZGVzdG5vZGUgPSBwb3J0X3BlZXJub2RlKHBfcHRyKTsKKworICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRmKGJ1ZiwgIiBjb25uZWN0ZWQgdG8gPCV1LiV1LiV1OiV1PiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlwY196b25lKGRlc3Rub2RlKSwgdGlwY19jbHVzdGVyKGRlc3Rub2RlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXBjX25vZGUoZGVzdG5vZGUpLCBkcG9ydCk7CisgICAgICAgICAgICAgICAgaWYgKHBfcHRyLT5wdWJsLmNvbm5fdHlwZSAhPSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgdGlwY19wcmludGYoYnVmLCAiIHZpYSB7JXUsJXV9IiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfcHRyLT5wdWJsLmNvbm5fdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfcHRyLT5wdWJsLmNvbm5faW5zdGFuY2UpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHBfcHRyLT5wdWJsLnB1Ymxpc2hlZCkgeworICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRmKGJ1ZiwgIiBib3VuZCB0byIpOworICAgICAgICAgICAgICAgIGxpc3RfZm9yX2VhY2hfZW50cnkocHVibCwgJnBfcHRyLT5wdWJsaWNhdGlvbnMsIHBwb3J0X2xpc3QpIHsKKwkJCWlmIChwdWJsLT5sb3dlciA9PSBwdWJsLT51cHBlcikKKwkJCQl0aXBjX3ByaW50ZihidWYsICIgeyV1LCV1fSIsIHB1YmwtPnR5cGUsCisJCQkJCSAgICBwdWJsLT5sb3dlcik7CisJCQllbHNlCisJCQkJdGlwY19wcmludGYoYnVmLCAiIHsldSwldSwldX0iLCBwdWJsLT50eXBlLCAKKwkJCQkJICAgIHB1YmwtPmxvd2VyLCBwdWJsL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Y29ubmVjdGlvbiBhdHRlbXB0cyAodmVyeSB1bmxpa2VseSkgKi8KKworCQl3aGlsZSAoKGJ1ZiA9IHNrYl9kZXF1ZXVlKCZzb2NrLT5zay0+c2tfcmVjZWl2ZV9xdWV1ZSkpKSB7CisJCQl0aXBjX3JlamVjdF9tc2coYnVmLCBUSVBDX0VSUl9OT19QT1JUKTsKKwkJCWF0b21pY19kZWMoJnRpcGNfcXVldWVfc2l6ZSk7CisJCX0KKworCQlzb2NrLT5zdGF0ZSA9IFNTX0NPTk5FQ1RJTkc7CisJfQorCisgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX05BTUUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocmVzID0gZGVzdF9uYW1lX2NoZWNrKGRlc3QsIG0pKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBleGl0OworICAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gdGlwY19zZW5kMm5hbWUodHNvY2stPnAtPnJlZiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkZXN0LT5hZGRyLm5hbWUubmFtZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3QtPmFkZHIubmFtZS5kb21haW4sIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbS0+bXNnX2lvdmxlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3YpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmIChkZXN0LT5hZGRydHlwZSA9PSBUSVBDX0FERFJfSUQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9IHRpcGNfc2VuZDJwb3J0KHRzb2NrLT5wLT5yZWYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZGVzdC0+YWRkci5pZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3ZsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtLT5tc2dfaW92KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX01DQVNUKSB7CisJCQlpZiAobmVlZHNfY29ubikgeworCQkJCXJlcyA9IC1FT1BOT1RTVVBQOworCQkJCWdvdG8gZXhpdDsKKwkJCX0KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocmVzID0gZGVzdF9uYW1lX2NoZWNrKGRlc3QsIG0pKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBleGl0OworICAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gdGlwY19tdWx0aWNhc3QodHNvY2stPnAtPnJlZiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkZXN0LT5hZGRyLm5hbWVzZXEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbS0+bXNnX2lvdmxlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3YpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAobGlrZWx5KHJlcyAhPSAtRUxJTktDT05HKSkgeworZXhpdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgdXAoJnRzb2NrLT5zZW0pOworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlczsKKyAgICAgICAgICAgICAgICB9CisJ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HNvY2thZGRyX3RpcGMgKiltLT5tc2dfbmFtZTsKKwlpbnQgcmVzOworCisJLyogSGFuZGxlIGltcGxpZWQgY29ubmVjdGlvbiBlc3RhYmxpc2htZW50ICovCisKKwlpZiAodW5saWtlbHkoZGVzdCkpCisJCXJldHVybiBzZW5kX21zZyhpb2NiLCBzb2NrLCBtLCB0b3RhbF9sZW4pOworCisJaWYgKGRvd25faW50ZXJydXB0aWJsZSgmdHNvY2stPnNlbSkpIHsKKwkJcmV0dXJuIC1FUkVTVEFSVFNZUzsKKyAgICAgICAgfQorCisgICAgICAgIGlmICh1bmxpa2VseShzb2NrLT5zdGF0ZSAhPSBTU19DT05ORUNURUQpKSB7CisgICAgICAgICAgICAgICAgaWYgKHNvY2stPnN0YXRlID09IFNTX0RJU0NPTk5FQ1RJTkcpCisgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAtRVBJUEU7ICAgCisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gLUVOT1RDT05OOworICAgICAgICAgICAgICAgIGdvdG8gZXhpdDsKKyAgICAgICAgfQorCisgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICByZXMgPSB0aXBjX3NlbmQodHNvY2stPnAtPnJlZiwgbS0+bXNnX2lvdmxlbiwgbS0+bXNnX2lvdik7CisgICAgICAgICAgICAgICAgaWYgKGxpa2VseShyZXMgIT0gLUVMSU5LQ09ORykpIHsKK2V4aXQ6CisgICAgICAgICAgICAgICAgICAgICAgICB1cCgmdHNvY2stPnNlbSk7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzOworICAgICAgICAgICAgICAgIH0KKwkJaWYgKG0tPm1zZ19mbGFncyAmIE1TR19ET05UV0FJVCkgeworCQkJcmVzID0gLUVXT1VMREJMT0NLOworCQkJZ290byBleGl0OworCQl9CisgICAgICAgICAgICAgICAgaWYgKHdhaXRfZXZlbnRfaW50ZXJydXB0aWJsZSgqc29jay0+c2stPnNrX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vY2IsIHNvY2ssIG0sIHRvdGFsX2xlbik7CisKKwkvKiBDYW4gb25seSBzZW5kIGxhcmdlIGRhdGEgc3RyZWFtcyBpZiBhbHJlYWR5IGNvbm5lY3RlZCAqLworCisgICAgICAgIGlmICh1bmxpa2VseShzb2NrLT5zdGF0ZSAhPSBTU19DT05ORUNURUQpKSB7CisgICAgICAgICAgICAgICAgaWYgKHNvY2stPnN0YXRlID09IFNTX0RJU0NPTk5FQ1RJTkcpCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVQSVBFOyAgIAorICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PVENPTk47CisgICAgICAgIH0KKworCS8qIAorCSAqIFNlbmQgZWFjaCBpb3ZlYyBlbnRyeSB1c2luZyBvbmUgb3IgbW9yZSBtZXNzYWdlcworCSAqCisJICogTm90ZTogVGhpcyBhbGdvcml0aG0gaXMgZ29vZCBmb3IgdGhlIG1vc3QgbGlrZWx5IGNhc2UgCisJICogKGkuZS4gb25lIGxhcmdlIGlvdmVjIGVudHJ5KSwgYnV0IGNvdWxkIGJlIGltcHJvdmVkIHRvIHBhc3Mgc2V0cworCSAqIG9mIHNtYWxsIGlvdmVjIGVudHJpZXMgaW50byBzZW5kX3BhY2tldCgpLgorCSAqLworCisJbXlfbXNnID0gKm07CisJY3Vycl9pb3YgPSBteV9tc2cubXNnX2lvdjsKKwljdXJyX2lvdmxlbiA9IG15X21zZy5tc2dfaW92bGVuOworCW15X21zZy5tc2dfaW92ID0gJm15X2lvdjsKKwlteV9tc2cubXNnX2lvdmxlbiA9IDE7CisKKwl3aGlsZSAoY3Vycl9pb3ZsZW4tLSkgeworCQljdXJyX3N0YXJ0ID0gY3Vycl9pb3YtPmlvdl9iYXNlOworCQljdXJyX2xlZnQgPSBjdXJyX2lvdi0+aW92X2xlbjsKKworCQl3aGlsZSAoY3Vycl9sZWZ0KSB7CisJCQlieXRlc190b19zZW5kID0gK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hdGUgIT0gU1NfVU5DT05ORUNURUQpCisgICAgICAgICAgIHJldHVybiAtRUlTQ09OTjsKKworICAgaWYgKChkc3QtPmZhbWlseSAhPSBBRl9USVBDKSB8fAorICAgICAgICgoZHN0LT5hZGRydHlwZSAhPSBUSVBDX0FERFJfTkFNRSkgJiYgKGRzdC0+YWRkcnR5cGUgIT0gVElQQ19BRERSX0lEKSkpCisgICAgICAgICAgIHJldHVybiAtRUlOVkFMOworCisgICAvKiBTZW5kIGEgJ1NZTi0nIHRvIGRlc3RpbmF0aW9uICovCisKKyAgIG0ubXNnX25hbWUgPSBkZXN0OworICAgaWYgKChyZXMgPSBzZW5kX21zZygwLCBzb2NrLCAmbSwgMCkpIDwgMCkgeworCSAgIHNvY2stPnN0YXRlID0gU1NfRElTQ09OTkVDVElORzsKKwkgICByZXR1cm4gcmVzOworICAgfQorCisgICBpZiAoZG93bl9pbnRlcnJ1cHRpYmxlKCZ0c29jay0+c2VtKSkgCisgICAgICAgICAgIHJldHVybiAtRVJFU1RBUlRTWVM7CisJCisgICAvKiBXYWl0IGZvciBkZXN0aW5hdGlvbidzICdBQ0snIHJlc3BvbnNlICovCisKKyAgIHJlcyA9IHdhaXRfZXZlbnRfaW50ZXJydXB0aWJsZV90aW1lb3V0KCpzb2NrLT5zay0+c2tfc2xlZXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2JfcXVldWVfbGVuKCZzb2NrLT5zay0+c2tfcmVjZWl2ZV9xdWV1ZSksCisJCQkJCSAgc29jay0+c2stPnNrX3JjdnRpbWVvKTsKKyAgIGJ1ZiA9IHNrYl9wZWVrKCZzb2NrLT5zay0+c2tfcmVjZWl2ZV9xdWV1ZSk7CisgICBpZiAocmVzID4gMCkgeworCSAgIG1zZyA9IGJ1Zl9tc2coYnVmKTsKKyAgICAgICAgICAgcmVzID0gYXV0b19jb25uZWN0KHNvY2ssIHRzb2NrLCBtc2cpOworICAgICAgICAgICBpZiAoIXJlcykgewor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XNnKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1zZ2hkciBtID0gezAsfTsKKworICAgICAgICAgICAgICAgICAgICAgICAgc2VuZF9wYWNrZXQoMCwgbmV3c29jaywgJm0sIDApOyAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgYWR2YW5jZV9xdWV1ZSh0c29jayk7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKwkJCXNvY2tfbG9jayh0c29jayk7CisJCQlza2JfZGVxdWV1ZSgmc29jay0+c2stPnNrX3JlY2VpdmVfcXVldWUpOworCQkJc29ja191bmxvY2sodHNvY2spOworCQkJc2tiX3F1ZXVlX2hlYWQoJm5ld3NvY2stPnNrLT5za19yZWNlaXZlX3F1ZXVlLCBidWYpOworCQl9CisJfQorZXhpdDoKKwl1cCgmdHNvY2stPnNlbSk7CisJcmV0dXJuIHJlczsKK30KKworLyoqCisgKiBzaHV0ZG93biAtIHNodXRkb3duIHNvY2tldCBjb25uZWN0aW9uCisgKiBAc29jazogc29ja2V0IHN0cnVjdHVyZQorICogQGhvdzogZGlyZWN0aW9uIHRvIGNsb3NlIChhbHdheXMgdHJlYXRlZCBhcyByZWFkICsgd3JpdGUpCisgKgorICogVGVybWluYXRlcyBjb25uZWN0aW9uIChpZiBuZWNlc3NhcnkpLCB0aGVuIHB1cmdlcyBzb2NrZXQncyByZWNlaXZlIHF1ZXVlLgorICogCisgKiBSZXR1cm5zIDAgb24gc3VjY2VzcywgZXJybm8gb3RoZXJ3aXNlCisgKi8KKworc3RhdGljIGludCBzaHV0ZG93bihzdHJ1Y3Qgc29ja2V0ICpzb2NrLCBpbnQgaG93KQoreworCXN0cnVjdCB0aXBjX3NvY2sqIHRzb2NrID0gdGlwY19zayhzb2NrLT5zayk7CisJc3RydWN0IHNrX2J1ZmYgKmJ1ZjsKKwlpbnQgcmVzOworCisJLyogQ291bGQgcmV0dXJuIC1FSU5WQUwgZm9yIGFuIGludmFsaWQgImhvdyIsIGJ1dCB3aH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2V5Y3RsX25lZ2F0ZV9rZXkoKSAqLwpAQCAtOTY3LDYgKzk4NCw4OCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKgorICogc2V0IG9yIGNsZWFyIHRoZSB0aW1lb3V0IGZvciBhIGtleQorICovCitsb25nIGtleWN0bF9zZXRfdGltZW91dChrZXlfc2VyaWFsX3QgaWQsIHVuc2lnbmVkIHRpbWVvdXQpCit7CisJc3RydWN0IHRpbWVzcGVjIG5vdzsKKwlzdHJ1Y3Qga2V5ICprZXk7CisJa2V5X3JlZl90IGtleV9yZWY7CisJdGltZV90IGV4cGlyeTsKKwlsb25nIHJldDsKKworCWtleV9yZWYgPSBsb29rdXBfdXNlcl9rZXkoTlVMTCwgaWQsIDEsIDEsIEtFWV9TRVRBVFRSKTsKKwlpZiAoSVNfRVJSKGtleV9yZWYpKSB7CisJCXJldCA9IFBUUl9FUlIoa2V5X3JlZik7CisJCWdvdG8gZXJyb3I7CisJfQorCisJa2V5ID0ga2V5X3JlZl90b19wdHIoa2V5X3JlZik7CisKKwkvKiBtYWtlIHRoZSBjaGFuZ2VzIHdpdGggdGhlIGxvY2tzIGhlbGQgdG8gcHJldmVudCByYWNlcyAqLworCWRvd25fd3JpdGUoJmtleS0+c2VtKTsKKworCWV4cGlyeSA9IDA7CisJaWYgKHRpbWVvdXQgPiAwKSB7CisJCW5vdyA9IGN1cnJlbnRfa2VybmVsX3RpbWUoKTsKKwkJZXhwaXJ5ID0gbm93LnR2X3NlYyArIHRpbWVvdXQ7CisJfQorCisJa2V5LT5leHBpcnkgPSBleHBpcnk7CisKKwl1cF93cml0ZSgma2V5LT5zZW0pOworCWtleV9wdXQoa2V5KTsKKworCXJldCA9IDA7CitlcnJvcjoKKwlyZXR1cm4gcmV0OworCit9IC8qIGVuZCBrZXljdGxfc2V0X3RpbWVvdXQoKSAqLworCisvKioqKioqKioqKioq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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoKLSAqIGRpc3Bvc2Ugb2YgYSBrZXlyaW5nIGxpc3QgYWZ0ZXIgdGhlIFJDVSBncmFjZSBwZXJpb2QsIGZyZWVpbmcgdGhlIHVubGlua2VkCi0gKiBrZXkKLSAqLwotc3RhdGljIHZvaWQga2V5cmluZ191bmxpbmtfcmN1X2Rpc3Bvc2FsKHN0cnVjdCByY3VfaGVhZCAqcmN1KQotewotCXN0cnVjdCBrZXlyaW5nX2xpc3QgKmtsaXN0ID0KLQkJY29udGFpbmVyX29mKHJjdSwgc3RydWN0IGtleXJpbmdfbGlzdCwgcmN1KTsKLQotCWtleV9wdXQoa2xpc3QtPmtleXNba2xpc3QtPmRlbGtleV0pOwotCWtmcmVlKGtsaXN0KTsKLQotfSAvKiBlbmQga2V5cmluZ191bmxpbmtfcmN1X2Rpc3Bvc2FsKCkgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoKICAqIHVubGluayB0aGUgZmlyc3QgbGluayB0byBhIGtleSBmcm9tIGEga2V5cmluZwogICovCiBpbnQga2V5X3VubGluayhzdHJ1Y3Qga2V5ICprZXlyaW5nLCBzdHJ1Y3Qga2V5ICprZXkpCmRpZmYgLS1naXQgYS9zZWN1cml0eS9rZXlzL3Blcm1pc3Npb24uYyBiL3NlY3VyaXR5L2tleXMvcGVybWlzc2lvbi5jCmluZGV4IGU3ZjU3OWMuLjNiNDFmOWI1IDEwMDY0NAotLS0gYS9zZWN1cml0eS9rZXlzL3Blcm1pc3Npb24uYworKysgYi9zZWN1cml0eS9rZXlzL3Blcm1pc3Npb24uYwpAQCAtNzMsMyArNzMsMzUgQEAKIH0gLyogZW5kIGtleV90YXNrX3Blcm1pc3Npb24oKSAqLwogCiBFWFBPUlRfU1lNQk9MKGtleV90YX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GlkKTsKKwlzZXFfcHJpbnRmKG0sICIgcGlkOiVkIGNpOiV6dSIsIHJrYS0+cGlkLCBzdHJsZW4ocmthLT5jYWxsb3V0X2luZm8pKTsKIAogfSAvKiBlbmQgcmVxdWVzdF9rZXlfYXV0aF9kZXNjcmliZSgpICovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qCisgKiByZWFkIHRoZSBjYWxsb3V0X2luZm8gZGF0YQorICogLSB0aGUga2V5J3Mgc2VtYXBob3JlIGlzIHJlYWQtbG9ja2VkCisgKi8KK3N0YXRpYyBsb25nIHJlcXVlc3Rfa2V5X2F1dGhfcmVhZChjb25zdCBzdHJ1Y3Qga2V5ICprZXksCisJCQkJICBjaGFyIF9fdXNlciAqYnVmZmVyLCBzaXplX3QgYnVmbGVuKQoreworCXN0cnVjdCByZXF1ZXN0X2tleV9hdXRoICpya2EgPSBrZXktPnBheWxvYWQuZGF0YTsKKwlzaXplX3QgZGF0YWxlbjsKKwlsb25nIHJldDsKKworCWRhdGFsZW4gPSBzdHJsZW4ocmthLT5jYWxsb3V0X2luZm8pOworCXJldCA9IGRhdGFsZW47CisKKwkvKiB3ZSBjYW4gcmV0dXJuIHRoZSBkYXRhIGFzIGlzICovCisJaWYgKGJ1ZmZlciAmJiBidWZsZW4gPiAwKSB7CisJCWlmIChidWZsZW4gPiBkYXRhbGVuKQorCQkJYnVmbGVuID0gZGF0YWxlbjsKKworCQlpZiAoY29weV90b191c2VyKGJ1ZmZlciwgcmthLT5jYWxsb3V0X2luZm8sIGJ1ZmxlbikgIT0gMCkKKwkJCXJldCA9IC1FRkFVTFQ7CisJfQorCisJcmV0dXJuIHJldDsKKworfSAvKiBlbmQgcmVxdWVzdF9rZXlfYXV0aF9yZWFkKCkgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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