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3VtZW50YXRpb24vZmIvZnJhbWVidWZmZXIudHh0IGIvRG9jdW1lbnRhdGlvbi9mYi9mcmFtZWJ1ZmZlci50eHQKaW5kZXggNjEwZTc4MC4uYjNlM2EwMyAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlvbi9mYi9mcmFtZWJ1ZmZlci50eHQKKysrIGIvRG9jdW1lbnRhdGlvbi9mYi9mcmFtZWJ1ZmZlci50eHQKQEAgLTIxNSwxMSArMjE1LDExIEBACiB2c3luYyBsZW5ndGguCiAKICAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0rLS0tLS0tLSsKLSAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIF4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgIHwKKyAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIOKGkSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAogICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAgfHVwcGVyX21hcmdpbiAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAotICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAgpSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAorICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAg4oaTICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICB8CiAgICstLS0tLS0tLS0tIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMtLS0tLS0tLS0tKy0tLS0tLS0rCi0gIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICBeICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgICAgICAgICAgfCAgICAgICB8CisgIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICDihpEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgICAgICAgICB8ICAgICAgIHwKICAgfCAgICAgICAgICAjICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgICAgICAgICB8ICAgICAgIHwKICAgfCAgICAgICAgICAjICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgICAgICAgICB8ICAgICAgIHwKICAgfCAgICAgICAgICAjICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgICAgICAgICB8ICAgICAgIHwKQEAgLTIzOCwxNSArMjM4LDE1IEBACiAgIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgICAgICAgICAgfCAgICAgICB8CiAgIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgICAgICAgICAgfCAgICAgICB8CiAgIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgICAgICAgICAgfCAgICAgICB8Ci0gIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICClICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgICAgICAgICAgfCAgICAgICB8CisgIHwgICAgICAgICAgIyAgICAgICAgICAgICAgICDihpMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgICAgICAgICB8ICAgICAgIHwKICAgKy0tLS0tLS0tLS0jIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy0tLS0tLS0tLS0rLS0tLS0tLSsKLSAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIF4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgIHwKKyAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIOKGkSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAogICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAgfGxvd2VyX21hcmdpbiAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAotICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAgpSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAorICB8ICAgICAgICAgIHwgICAgICAgICAgICAgICAg4oaTICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICB8CiAgICstLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tKy0tLS0tLS0rCi0gIHwgICAgICAgICAgfCAgICAgICAgICAgICAgICBeICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICB8CisgIHwgICAgICAgICAgfCAgICAgICAgICAgICAgICDihpEgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgIHwKICAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIHx2c3luY19sZW4gICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgIHwKLSAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIKUgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgIHwKKyAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgIOKGkyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgfAogICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLSstLS0tLS0tKwogCiBUaGUgZnJhbWUgYnVmZmVyIGRldmljZSBleHBlY3RzIGFsbCBob3Jpem9udGFsI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pbmcvdG1zMzgwdHIudHh0CisrKyBiL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy90bXMzODB0ci50eHQKQEAgLTcxLDI0ICs3MSwyNCBAQAogICBDSEFQVEVSIDEgICAgIExPQ0FUSU9OIE9GIERJUC1TV0lUQ0gKICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAotVcTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExL8KLf5VxMTExMTEvyAgICAgICAgICAgICAgICAgICAgICAgICBVxMTExMS/ICAgICAgICAgICAgVcTExL8gICAgICAgICD+Ci3+QcTExMTExFUgICAgICAgICAgICAgICAgICAgICAgVzEgQcTExMTEVSAgICAgVcTExMS/IP4gICD+ICAgICAgICAg/got/lXExMTExMS/ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIP4gICAg/iD+ICAg/iAgICAgIFXExMW/Ci3+QcTExMTExFUgICAgICAgICAgICAgIFXExMTExMTExMTExL8gICAgICAgICAgQcTExMRVIP4gICD+ICAgICAg/iAg/v4KLf5VxMTExMTEvyAgICAgICAgICAgICAg/iAgICAgICAgICAg/iAgICAgICAgICBVxMTEvyAgQcTExFUgICAgICBBxMTFVQot/kHExMTExMRVICAgICAgICAgICAgICD+IFRNUzM4MEMyNiD+ICAgICAgICAgIP4gICD+ICAgICAgICAgICAgICAgIP4KLf5VxMTExMTEvyAgICAgICAgICAgICAg/iAgICAgICAgICAg/iAgICAgICAgICBBxMTEVSAgICAgICAgICAgICAgICBBxL8KLf5BxMTExMTEVSAgICAgICAgICAgICAg/iAgICAgICAgICAg/iAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD+IP4KLf4gICAgICAgICAgICAgICAgICAgICAgQcTExMTExMTExMTEVSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD+IP4KLf4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD+IP4KLf4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBxFUKLf4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD+Ci3+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg/got/iAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIP4KLf4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD+Ci1BxMTExMTExMTExMTEQcTExMTExMTExMTExMTExMRBxMRBxMTExMTExMTExMTExMTExMTExMTExMRBxMTExMTExMTEVQotICAgICAgICAgICAgIEHExMTExMTExMTExMTExMTEVSAgQcTExMTExMTExMTExMTExMTExMTExMTEVQorVcOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMK/CivDvlXDhMOEw4TDhMOEw4TCvyAgICAgICAgICAgICAgICAgICAgICAgICBVw4TDhMOEw4TDhMK/ICAgICAgICAgICAgVcOEw4TDhMK/ICAgICAgICAgw74KK8O+QcOEw4TDhMOEw4TDhFUgICAgICAgICAgICAgICAgICAgICAgVzEgQcOEw4TDhMOEw4RVICAgICBVw4TDhMOEw4TCvyDDviAgIMO+ICAgICAgICAgw74KK8O+VcOEw4TDhMOEw4TDhMK/ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIMO+ICAgIMO+IMO+ICAgw74gICAgICBVw4TDhMOFwr8KK8O+QcOEw4TDhMOEw4TDhFUgICAgICAgICAgICAgIFXDhMOEw4TDhMOEw4TDhMOEw4TDhMOEwr8gICAgICAgICAgQcOEw4TDhMOEVSDDviAgIMO+ICAgICAgw74gIMO+w74KK8O+VcOEw4TDhMOEw4TDhMK/ICAgICAgICAgICAgICDDviAgICAgICAgICAgw74gICAgICAgICAgVcOEw4TDhMK/ICBBw4TDhMOEVSAgICAgIEHDhMOEw4VVCivDvkHDhMOEw4TDhMOEw4RVICAgICAgICAgICAgICDDviBUTVMzODBDMjYgw74gICAgICAgICAgw74gICDDviAgICAgICAgICAgICAgICDDvgorw75Vw4TDhMOEw4TDhMOEwr8gICAgICAgICAgICAgIMO+ICAgICAgICAgICDDviAgICAgICAgICBBw4TDhMOEVSAgICAgICAgICAgICAgICBBw4TCvworw75Bw4TDhMOEw4TDhMOEVSAgICAgICAgICAgICAgw74gICAgICAgICAgIMO+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIMO+IMO+CivDviAgICAgICAgICAgICAgICAgICAgICBBw4TDhMOEw4TDhMOEw4TDhMOEw4TDhFUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgw74gw74KK8O+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgw74gw74KK8O+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQcOEVQorw74gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDDvgorw74gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDDvgorw74gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDDvgorw74gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDDvgorQcOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhEHDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhEHDhMOEQcOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4RBw4TDhMOEw4TDhMOEw4TDhMOEVQorICAgICAgICAgICAgIEHDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhFUgIEHDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEw4TDhMOEVQogCiAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgIENIQVBURVIgMiAgICAgREVGQVVMVCBTRVRUSU5HUwpAQCAtMTA4LDkgKzEwOCw5IEBACiAgIENIQVBURVIgMyAgICAgRElQIFNXSVRDSCBXMSBERVNDUklQVElPTgogICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCi0gICAgICBVxMTEQcTExEHExMRBxMTEQcTExEHExMRBxMTEQcTExL8gIE9OCi0gICAgICD+IDEg/iAyIP4gMyD+IDQg/iA1IP4gNiD+IDcg/iA4IP4KLSAgICAgIEHExMRBxMTEQcTExEHExMRBxMTEQcTExEHExMRBxMTEVSAgT0ZGCisgICAgICBVw4TDhMOEQcOEw4TDhEHDhMOEw4RBw4TDhMOEQcOEw4TDhEHDhMOEw4RBw4TDhMOEQcOEw4TDhMK/ICBPTgorICAgICAgw74gMSDDviAyIMO+IDMgw74gNCDDviA1IMO+IDYgw74gNyDDviA4IMO+CisgICAgICBBw4TDhMOEQcOEw4TDhEHDhMOEw4RBw4TDhMOEQcOEw4TDhEHDhMOEw4RBw4TDhMOEQcOEw4TDhFUgIE9GRgogICAgICAgfEFEIHwgQm9vdFJPTSBBZGRyLi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U9eQorQ09ORklHX1JXU0VNX1hDSEdBRERfQUxHT1JJVEhNPXkKK0NPTkZJR19BUkNIX0hBU19JTE9HMl9VMzI9eQorQ09ORklHX0dFTkVSSUNfSFdFSUdIVD15CitDT05GSUdfR0VORVJJQ19DQUxJQlJBVEVfREVMQVk9eQorQ09ORklHX0dFTkVSSUNfRklORF9ORVhUX0JJVD15CitDT05GSUdfUFBDPXkKK0NPTkZJR19FQVJMWV9QUklOVEs9eQorQ09ORklHX0dFTkVSSUNfTlZSQU09eQorQ09ORklHX1NDSEVEX05PX05PX09NSVRfRlJBTUVfUE9JTlRFUj15CitDT05GSUdfQVJDSF9NQVlfSEFWRV9QQ19GREM9eQorQ09ORklHX1BQQ19PRj15CisjIENPTkZJR19QUENfVURCR18xNjU1MCBpcyBub3Qgc2V0CisjIENPTkZJR19HRU5FUklDX1RCU1lOQyBpcyBub3Qgc2V0CitDT05GSUdfQVVESVRfQVJDSD15CitDT05GSUdfR0VORVJJQ19CVUc9eQorIyBDT05GSUdfREVGQVVMVF9VSU1BR0UgaXMgbm90IHNldAorCisjCisjIFByb2Nlc3NvciBzdXBwb3J0CisjCisjIENPTkZJR19DTEFTU0lDMzIgaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzgyeHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzgzeHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzg1eHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzg2eHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzh4eCBpcyBub3Qgc2V0CisjIENPTkZJR180MHggaXMgbm90IHNldAorQ09ORklHXzQ0eD15CisjIENPTkZJR19FMjAwIGlzIG5vdCBzZXQKK0NPTkZJR19QUENfRENSX05BVElWRT15CisjIENPTkZJR19QUENfRENSX01NSU8gaXMgbm90IHNldAorQ09ORklHX1BQQ19EQ1I9eQorQ09ORklHXzR4eD15CitDT05GSUdfQk9PS0U9eQorQ09ORklHX1BURV82NEJJVD15CitDT05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Mgbm90IHNldAorIyBDT05GSUdfTkVURklMVEVSIGlzIG5vdCBzZXQKKworIworIyBEQ0NQIENvbmZpZ3VyYXRpb24gKEVYUEVSSU1FTlRBTCkKKyMKKyMgQ09ORklHX0lQX0RDQ1AgaXMgbm90IHNldAorCisjCisjIFNDVFAgQ29uZmlndXJhdGlvbiAoRVhQRVJJTUVOVEFMKQorIworIyBDT05GSUdfSVBfU0NUUCBpcyBub3Qgc2V0CisKKyMKKyMgVElQQyBDb25maWd1cmF0aW9uIChFWFBFUklNRU5UQUwpCisjCisjIENPTkZJR19USVBDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUTSBpcyBub3Qgc2V0CisjIENPTkZJR19CUklER0UgaXMgbm90IHNldAorIyBDT05GSUdfVkxBTl84MDIxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorCisjCisjIFFvUyBhbmQvb3IgZmFpciBxdWV1ZWluZworIworIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfSVJEQSBpcyBub3Qgc2V0CisjIENPTkZJR19CVCBpcyBub3Qgc2V0CisjIENPTkZJR19BRl9SWFJQQyBpcyBub3Qgc2V0CisKKyMKKyMgV2lyZWxlc3MKKyMKKyMgQ09ORklHX0NGRzgwMjExIGlzIG5vdCBzZXQ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IQVNfSENEPXkKK0NPTkZJR19VU0JfQVJDSF9IQVNfT0hDST15CitDT05GSUdfVVNCX0FSQ0hfSEFTX0VIQ0k9eQorIyBDT05GSUdfVVNCIGlzIG5vdCBzZXQKKworIworIyBOT1RFOiBVU0JfU1RPUkFHRSBlbmFibGVzIFNDU0ksIGFuZCAnU0NTSSBkaXNrIHN1cHBvcnQnCisjCisKKyMKKyMgVVNCIEdhZGdldCBTdXBwb3J0CisjCisjIENPTkZJR19VU0JfR0FER0VUIGlzIG5vdCBzZXQKKworIworIyBNTUMvU0QgQ2FyZCBzdXBwb3J0CisjCisjIENPTkZJR19NTUMgaXMgbm90IHNldAorCisjCisjIExFRCBkZXZpY2VzCisjCisjIENPTkZJR19ORVdfTEVEUyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRyaXZlcnMKKyMKKworIworIyBMRUQgVHJpZ2dlcnMKKyMKKworIworIyBJbmZpbmlCYW5kIHN1cHBvcnQKKyMKKyMgQ09ORklHX0lORklOSUJBTkQgaXMgbm90IHNldAorCisjCisjIEVEQUMgLSBlcnJvciBkZXRlY3Rpb24gYW5kIHJlcG9ydGluZyAoUkFTKSAoRVhQRVJJTUVOVEFMKQorIworCisjCisjIFJlYWwgVGltZSBDbG9jaworIworIyBDT05GSUdfUlRDX0NMQVNTIGlzIG5vdCBzZXQKKworIworIyBETUEgRW5naW5lIHN1cHBvcnQKKyMKKyMgQ09ORklHX0RNQV9FTkdJTkUgaXMgbm90IHNldAorCisjCisjIERNQSBDbGllbnRzCisjCisKKyMKKyMgRE1BIERldmljZXMKKyMKKworIworIyBBdXhpbGlhcnkgRGlzcGxheSBzdXBwb3J0CisjCisKKyMKKyMgVmlydHVhbGl6YXRpb24KKyMKKworIworIyBGaWxlIHN5c3RlbXMKKyMKK0NPTkZJR19FWFQyX0ZTPXkKKyMgQ09ORklHX0VYVDJfRlNfWEFUVFIgaXMgbm90IHNldAorIyBDT05GSUdfRVhUMl9GU19YSVAgaXMgbm90IHNldAorQ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JR19ORlNEIGlzIG5vdCBzZXQKK0NPTkZJR19ST09UX05GUz15CitDT05GSUdfTE9DS0Q9eQorQ09ORklHX05GU19DT01NT049eQorQ09ORklHX1NVTlJQQz15CisjIENPTkZJR19SUENTRUNfR1NTX0tSQjUgaXMgbm90IHNldAorIyBDT05GSUdfUlBDU0VDX0dTU19TUEtNMyBpcyBub3Qgc2V0CisjIENPTkZJR19TTUJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ0lGUyBpcyBub3Qgc2V0CisjIENPTkZJR19OQ1BfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ09EQV9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19BRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfOVBfRlMgaXMgbm90IHNldAorCisjCisjIFBhcnRpdGlvbiBUeXBlcworIworQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRD15CisjIENPTkZJR19BQ09STl9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfT1NGX1BBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19BTUlHQV9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfQVRBUklfUEFSVElUSU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX01BQ19QQVJUSVRJT04gaXMgbm90IHNldAorQ09ORklHX01TRE9TX1BBUlRJVElPTj15CisjIENPTkZJR19CU0RfRElTS0xBQkVMIGlzIG5vdCBzZXQKKyMgQ09ORklHX01JTklYX1NVQlBBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19TT0xBUklTX1g4Nl9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfVU5JWFdBUkVfRElTS0xBQkVMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0xETV9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfU0dJX1BBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19VTFRSSVhfUEFSVElUSU9OIGlzIG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4KKyAqCisgKi8KKworI2lmZGVmIENPTkZJR19QQ0lfTVNJCitleHRlcm4gdm9pZCBtcGljX21zaV9yZXNlcnZlX2h3aXJxKHN0cnVjdCBtcGljICptcGljLCBpcnFfaHdfbnVtYmVyX3QgaHdpcnEpOworZXh0ZXJuIGludCBtcGljX21zaV9pbml0X2FsbG9jYXRvcihzdHJ1Y3QgbXBpYyAqbXBpYyk7CitleHRlcm4gaXJxX2h3X251bWJlcl90IG1waWNfbXNpX2FsbG9jX2h3aXJxcyhzdHJ1Y3QgbXBpYyAqbXBpYywgaW50IG51bSk7CitleHRlcm4gdm9pZCBtcGljX21zaV9mcmVlX2h3aXJxcyhzdHJ1Y3QgbXBpYyAqbXBpYywgaW50IG9mZnNldCwgaW50IG51bSk7CitleHRlcm4gaW50IG1waWNfdTNtc2lfaW5pdChzdHJ1Y3QgbXBpYyAqbXBpYyk7CisjZWxzZQorc3RhdGljIGlubGluZSB2b2lkIG1waWNfbXNpX3Jlc2VydmVfaHdpcnEoc3RydWN0IG1waWMgKm1waWMsCisJCQkJCSAgaXJxX2h3X251bWJlcl90IGh3aXJxKQoreworCXJldHVybjsKK30KKworc3RhdGljIGlubGluZSBpbnQgbXBpY191M21zaV9pbml0KHN0cnVjdCBtcGljICptcGljKQoreworCXJldHVybiAtMTsKK30KKyNlbmRpZgorCitleHRlcm4gaW50IG1waWNfc2V0X2lycV90eXBlKHVuc2lnbmVkIGludCB2aXJxLCB1bnNpZ25lZCBpbnQgZmxvd190eXBlKTsKK2V4dGVybiB2b2lkIG1waWNfZW5kX2lycSh1bnNpZ25lZCBpbnQgaXJxKTsKK2V4dGVybiB2b2lkIG1waWNfbWFza19pcnEodW5zaWduZWQgaW50IGlycSk7CitleHRlcm4gdm9pZCBtcGljX3VubWFza19pcnEodW5zaWduZWQgaW50IGlycSk7CisKKyNlbmRpZiAvKiBfUE9XRVJQQ19TWVNERVZfTVBJQ19IICovCmRpZmYgLS1naXQgYS9hcmNoL3Bvd2VycGMvc3l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ktYXZhaWxhYmxlLXJhbmdlcyIsICZsZW4pOworCWlmICghcCkgeworCQlwcl9kZWJ1ZygibXBpYzogbm8gbXNpLWF2YWlsYWJsZS1yYW5nZXMgcHJvcGVydHkgZm91bmQgb24gJXNcbiIsCisJCQkgIG1waWMtPm9mX25vZGUtPmZ1bGxfbmFtZSk7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCWlmIChsZW4gJSA4ICE9IDApIHsKKwkJcHJpbnRrKEtFUk5fV0FSTklORyAibXBpYzogTWFsZm9ybWVkIG1zaS1hdmFpbGFibGUtcmFuZ2VzICIKKwkJICAgICAgICJwcm9wZXJ0eSBvbiAlc1xuIiwgbXBpYy0+b2Zfbm9kZS0+ZnVsbF9uYW1lKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJYml0bWFwX2FsbG9jYXRlX3JlZ2lvbihtcGljLT5od2lycV9iaXRtYXAsIDAsCisJCQkgICAgICAgZ2V0X2NvdW50X29yZGVyKG1waWMtPmlycV9jb3VudCkpOworCisJLyogRm9ybWF0IGlzOiAoPHUzMiBzdGFydD4gPHUzMiBjb3VudD4pKyAqLworCWxlbiAvPSBzaXplb2YodTMyKTsKKwlmb3IgKGkgPSAwOyBpIDwgbGVuIC8gMjsgaSsrLCBwICs9IDIpCisJCW1waWNfbXNpX2ZyZWVfaHdpcnFzKG1waWMsICpwLCAqKHAgKyAxKSk7CisKKwlyZXR1cm4gMDsKK30KKworaW50IG1waWNfbXNpX2luaXRfYWxsb2NhdG9yKHN0cnVjdCBtcGljICptcGljKQoreworCWludCByYywgc2l6ZTsKKworCUJVR19PTihtcGljLT5od2lycV9iaXRtYXApOworCXNwaW5fbG9ja19pbml0KCZtcGljLT5iaXRtYXBfbG9jayk7CisKKwlzaXplID0gQklUU19UT19MT05HUyhtcGljLT5pcnFfY291bnQpICogc2l6ZW9mKGxvbmcpOworCXByX2RlYnVnKCJtcGljOiBhbGxvY2F0b3IgYml0bWFwIHNpemUgaXMgMHgleCBieXRl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BpcnFfY3JlYXRlX21hcHBpbmcobXNpX21waWMtPmlycWhvc3QsIGh3aXJxKTsKKwkJaWYgKHZpcnEgPT0gTk9fSVJRKSB7CisJCQlwcl9kZWJ1ZygidTNtc2k6IGZhaWxlZCBtYXBwaW5nIGh3aXJxIDB4JWx4XG4iLCBod2lycSk7CisJCQltcGljX21zaV9mcmVlX2h3aXJxcyhtc2lfbXBpYywgaHdpcnEsIDEpOworCQkJcmMgPSAtRU5PU1BDOworCQkJZ290byBvdXRfZnJlZTsKKwkJfQorCisJCXNldF9pcnFfbXNpKHZpcnEsIGVudHJ5KTsKKwkJc2V0X2lycV9jaGlwKHZpcnEsICZtcGljX3UzbXNpX2NoaXApOworCQlzZXRfaXJxX3R5cGUodmlycSwgSVJRX1RZUEVfRURHRV9SSVNJTkcpOworCisJCXUzbXNpX2NvbXBvc2VfbXNpX21zZyhwZGV2LCB2aXJxLCAmbXNnKTsKKwkJd3JpdGVfbXNpX21zZyh2aXJxLCAmbXNnKTsKKworCQlod2lycSsrOworCX0KKworCXJldHVybiAwOworCisgb3V0X2ZyZWU6CisJdTNtc2lfdGVhcmRvd25fbXNpX2lycXMocGRldik7CisJcmV0dXJuIHJjOworfQorCitpbnQgbXBpY191M21zaV9pbml0KHN0cnVjdCBtcGljICptcGljKQoreworCWludCByYzsKKworCXJjID0gbXBpY19tc2lfaW5pdF9hbGxvY2F0b3IobXBpYyk7CisJaWYgKHJjKSB7CisJCXByX2RlYnVnKCJ1M21zaTogRXJyb3IgYWxsb2NhdGluZyBiaXRtYXAhXG4iKTsKKwkJcmV0dXJuIHJjOworCX0KKworCXByX2RlYnVnKCJ1M21zaTogUmVnaXN0ZXJpbmcgTVBJQyBVMyBNU0kgY2FsbGJhY2tzLlxuIik7CisKKwlCVUdfT04obXNpX21waWMpOworCW1zaV9tcGljID0gbXBpYzsKKworCVdBUk5fT04ocHBjX21kLnNldHVwX21zaV9pcnFzKTsKKwlwcGNfbWQuc2V0dXBfbXNpX2lycXMgPSB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b2xsLAorfTsKKworc3RhdGljIGlycXJldHVybl90IHBoYW50b21faXNyKGludCBpcnEsIHZvaWQgKmRhdGEpCit7CisJc3RydWN0IHBoYW50b21fZGV2aWNlICpkZXYgPSBkYXRhOworCisJaWYgKCEoaW9yZWFkMzIoZGV2LT5pYWRkciArIFBITl9DT05UUk9MKSAmIFBITl9DVExfSVJRKSkKKwkJcmV0dXJuIElSUV9OT05FOworCisJaW93cml0ZTMyKDAsIGRldi0+aWFkZHIpOworCWlvd3JpdGUzMigweGMwLCBkZXYtPmlhZGRyKTsKKworCWF0b21pY19pbmMoJmRldi0+Y291bnRlcik7CisJd2FrZV91cF9pbnRlcnJ1cHRpYmxlKCZkZXYtPndhaXQpOworCisJcmV0dXJuIElSUV9IQU5ETEVEOworfQorCisvKgorICogSW5pdCBhbmQgZGVpbml0IGRyaXZlcgorICovCisKK3N0YXRpYyB1bnNpZ25lZCBpbnQgX19kZXZpbml0IHBoYW50b21fZ2V0X2ZyZWUodm9pZCkKK3sKKwl1bnNpZ25lZCBpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCBQSEFOVE9NX01BWF9NSU5PUlM7IGkrKykKKwkJaWYgKHBoYW50b21fZGV2aWNlc1tpXSA9PSAwKQorCQkJYnJlYWs7CisKKwlyZXR1cm4gaTsKK30KKworc3RhdGljIGludCBfX2RldmluaXQgcGhhbnRvbV9wcm9iZShzdHJ1Y3QgcGNpX2RldiAqcGRldiwKKwljb25zdCBzdHJ1Y3QgcGNpX2RldmljZV9pZCAqcGNpX2lkKQoreworCXN0cnVjdCBwaGFudG9tX2RldmljZSAqcGh0OworCXVuc2lnbmVkIGludCBtaW5vcjsKKwlpbnQgcmV0dmFsOworCisJcmV0dmFsID0gcGNpX2VuYWJsZV9kZXZpY2UocGRldik7CisJaWYgKHJldHZhbCkKKwkJZ290byBlcnI7CisKKwltaW5vciA9IHBoYW50b21fZ2V0X2ZyZWUoKTsKKwlpZiAobWlub3IgPT0gUEhBTlRPTV9NQVhfT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mFzZTsKKwl1OCBkbWEsIGlycTsKKworCWlmICghKHBucF9wb3J0X3ZhbGlkKGRldiwgMCkgJiYgcG5wX3BvcnRfdmFsaWQoZGV2LCAxKSAmJgorCSAgICAgIHBucF9kbWFfdmFsaWQoZGV2LCAwKSAmJiBwbnBfaXJxX3ZhbGlkKGRldiwgMCkpKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCXNpcmJhc2UgPSBwbnBfcG9ydF9zdGFydChkZXYsIDApOworCWZpcmJhc2UgPSBwbnBfcG9ydF9zdGFydChkZXYsIDEpOworCWRtYSA9IHBucF9kbWEoZGV2LCAwKTsKKwlpcnEgPSBwbnBfaXJxKGRldiwgMCk7CisKKwlpZiAoc21zY19pcmNjX29wZW4oZmlyYmFzZSwgc2lyYmFzZSwgZG1hLCBpcnEpKQorCQlyZXR1cm4gLUVOT0RFVjsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IHBucF9kcml2ZXIgc21zY19pcmNjX3BucF9kcml2ZXIgPSB7CisJLm5hbWUJCT0gInNtc2MtaXJjYzIiLAorCS5pZF90YWJsZQk9IHNtc2NfaXJjY19wbnBfdGFibGUsCisJLnByb2JlCQk9IHNtc2NfaXJjY19wbnBfcHJvYmUsCit9OwogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0zNzksNiArNDEyLDM1IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKK3N0YXRpYyBpbnQgX19pbml0IHNtc2NfaXJjY19sZWdhY3lfcHJvYmUodm9pZCkKK3sKKwlpbnQgcmV0ID0gMDsKKworCWlmIChpcmNjX2ZpciA+IDAgJiYgaXJjY19zaXIgPiAwKSB7CisJCUlSREFfTUVTU0FHRSgiIE92ZXJyaWRpbmcgRklSIGFkZ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Vycy9uZXQvc21jOTF4LmggYi9kcml2ZXJzL25ldC9zbWM5MXguaAppbmRleCA3MDUzMDI2Li4xMTFmMjNkIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC9zbWM5MXguaAorKysgYi9kcml2ZXJzL25ldC9zbWM5MXguaApAQCAtMjc5LDYgKzI3OSw0MCBAQAogI2RlZmluZSBTTUNfaW5zdyhhLCByLCBwLCBsKQlpbnN3KChhKSArIChyKSwgcCwgbCkKICNkZWZpbmUgU01DX291dHN3KGEsIHIsIHAsIGwpCW91dHN3KChhKSArIChyKSwgcCwgbCkKIAorI2VsaWYgICBkZWZpbmVkKENPTkZJR19TVVBFUkgpCisKKyNpZiBkZWZpbmVkKENPTkZJR19TSF83NzgwX1NPTFVUSU9OX0VOR0lORSkgfHwgZGVmaW5lZChDT05GSUdfU0hfNzcyMl9TT0xVVElPTl9FTkdJTkUpCisjZGVmaW5lIFNNQ19DQU5fVVNFXzhCSVQgICAgICAgMAorI2RlZmluZSBTTUNfQ0FOX1VTRV8xNkJJVCAgICAgIDEKKyNkZWZpbmUgU01DX0NBTl9VU0VfMzJCSVQgICAgICAwCisjZGVmaW5lIFNNQ19JT19TSElGVCAgICAgICAgICAgMAorI2RlZmluZSBTTUNfTk9XQUlUICAgICAgICAgICAgIDEKKworI2RlZmluZSBTTUNfaW5iKGEsIHIpICAgICAgICAgIChpbncoKGEpICsgKChyKSZ+MSkpID4+ICg4KihyJTIpKSkmMHhmZgorI2RlZmluZSBTTUNfaW53KGEsIHIpICAgICAgICAgIGludygoYSkgKyAocikpCisjZGVmaW5lIFNNQ19vdXRiKHYsIGEsIHIpICAgICAgb3V0dygoKGludygoYSkrKChyKSZ+MSkpKigweGZmPDw4KihyJTIpKSkpIHwgKCh2KTw8KDgqKHImMikpKSksIChhKSArICgocikmfjEpKQorCisjZGVmaW5lIFNNQ19vdXR3KHYsIGEsIHIpICAgICAgb3V0dyh2LCAoYSkgKyAocikpCisjZGVmaW5lIFNNQ19pbnN3KG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fQorCisJc2NzcHRyMV9kYXRhICY9IH5TREFfT0VOOwkvKiBTREE6b3V0cHV0IGRpc2FibGUgKi8KKwljdHJsX291dGIoc2NzcHRyMV9kYXRhLCBTQ1NQVFIxKTsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgcnM1YzMxM19yZWFkX2RhdGEodm9pZCkKK3sKKwlpbnQgaTsKKwl1bnNpZ25lZCBjaGFyIGRhdGE7CisKKwlmb3IgKGkgPSAwOyBpIDwgODsgaSsrKSB7CisJCW5kZWxheSg3MDApOworCQkvKiBTREE6UmVhZCBEYXRhICovCisJCWRhdGEgfD0gKChjdHJsX2luYihTQ1NQVFIxKSAmIFNEQSkgPj4gMikgPDwgKDcgLSBpKTsKKwkJc2NzcHRyMV9kYXRhICY9IH5TQ0w7CS8qIFNDTDpMICovCisJCWN0cmxfb3V0YihzY3NwdHIxX2RhdGEsIFNDU1BUUjEpOworCQluZGVsYXkoNzAwKTsKKwkJc2NzcHRyMV9kYXRhIHw9IFNDTDsJLyogU0NMOkggKi8KKwkJY3RybF9vdXRiKHNjc3B0cjFfZGF0YSwgU0NTUFRSMSk7CisJfQorCXJldHVybiBkYXRhICYgMHgwRjsKK30KKworI2VuZGlmIC8qIENPTkZJR19TSF9MQU5ESVNLICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIG1hY2hpbmUgaW5kZXBlbmRlbmNlIHBhcnQgb2YgUlM1QzMxMyAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogUklDT0ggUlM1QzMxMyBhZGRyZXNzICovCisjZGVmaW5lIFJTNUMzMTNfQUREUl9TRUMJMHgwMAorI2RlZmluZSBSUzVDMzEzX0FERFJfU0VDMTAJMHgwMQorI2RlZmluZSBSUzVDMzEzX0FERFJfTUlOCTB4MDIKKyNkZWZpbmUgUlM1QzMxM19B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ICAgID0gMHgwMiwKLQlJUEFfQ01EX1NFVFZNQUMgCSAgICAgID0gMHgyMSwKLQlJUEFfQ01EX0RFTFZNQUMgCSAgICAgID0JMHgyMiwKLQlJUEFfQ01EX1NFVEdNQUMgIAkgICAgICA9IDB4MjMsCi0JSVBBX0NNRF9ERUxHTUFDIAkgICAgICA9IDB4MjQsCi0JSVBBX0NNRF9TRVRWTEFOIAkgICAgICA9IDB4MjUsCi0JSVBBX0NNRF9ERUxWTEFOIAkgICAgICA9IDB4MjYsCi0JSVBBX0NNRF9TRVRDQ0lEICAgICAgICAgICAgICAgPSAweDQxLAotCUlQQV9DTURfREVMQ0NJRCAgICAgICAgICAgICAgID0gMHg0MiwKLQlJUEFfQ01EX01PRENDSUQgICAgICAgICAgICAgICA9IDB4NDMsCi0JSVBBX0NNRF9TRVRJUCAgICAgICAgICAgICAgICAgPSAweGIxLAotCUlQQV9DTURfREVMSVAgICAgICAgICAgICAgICAgID0gMHhiNywKLQlJUEFfQ01EX1FJUEFTU0lTVCAgICAgICAgICAgICA9IDB4YjIsCi0JSVBBX0NNRF9TRVRBU1NQQVJNUyAgICAgICAgICAgPSAweGIzLAotCUlQQV9DTURfU0VUSVBNICAgICAgICAgICAgICAgID0gMHhiNCwKLQlJUEFfQ01EX0RFTElQTSAgICAgICAgICAgICAgICA9IDB4YjUsCi0JSVBBX0NNRF9TRVRSVEcgICAgICAgICAgICAgICAgPSAweGI2LAotCUlQQV9DTURfU0VUQURBUFRFUlBBUk1TICAgICAgID0gMHhiOCwKLQlJUEFfQ01EX0lQRlJBTUUgICAgICAgICAgICAgICA9IDB4YjksCi0JSVBBX0NNRF9BRERfQUREUl9FTlRSWSAgICAgICAgPSAweGMxLAotCUlQQV9DTURfREVMRVRFX0FERFJfRU5UUlkgICAgID0gMHhjMiwKLQlJUEFfQ01EX0NSRUFURV9BRERSICAgICAgICAgICA9IDB4YzMsCi0JSVBBX0NNRF9ERVNUUk9ZX0FERFIgICAgICAgICAgPSAweGM0LA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gICAgICAgICAgICAgIHpmY3BfZ2V0X2J1c2lkX2J5X2FkYXB0ZXIoYWRhcHRlciksIGRfaWQpOwogICAgICAgICAgICAgICAgIGdvdG8gZmFpbGVkX3JlcTsKIAl9CkBAIC0xNzA4LDcgKzE3MDgsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWkZDUF9NQVhfU0JBTFNfUEVSX0VMU19SRVEpOwogICAgICAgICAgICAgICAgIGlmIChieXRlcyA8PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICBaRkNQX0xPR19JTkZPKCJlcnJvcjogY3JlYXRpb24gb2YgRUxTIHJlcXVlc3QgZmFpbGVkICIKLQkJCQkgICAgICAiKGFkYXB0ZXIgJXMsIHBvcnQgZF9pZDogMHglMDh4KVxuIiwKKwkJCQkgICAgICAiKGFkYXB0ZXIgJXMsIHBvcnQgZF9pZDogMHglMDZ4KVxuIiwKIAkJCQkgICAgICB6ZmNwX2dldF9idXNpZF9ieV9hZGFwdGVyKGFkYXB0ZXIpLCBkX2lkKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChieXRlcyA9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9IC1FTk9NRU07CkBAIC0xNzI1LDcgKzE3MjUsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWkZDUF9NQVhfU0JBTFNfUEVSX0VMU19SRVEpOwogICAgICAgICAgICAgICAgIGlmIChieXRlcyA8PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICBaRkNQX0xPR19JTkZPKCJlcnJvcjogY3JlYXRpb24gb2YgRUxTIHJlcXVlc3QgZmFpbGVkICIKLQkJCQkgICAgICAiKGFkYXB0ZXIgJXMsIHBvcnQgZF9pZDogMHglMDh4KVxuIiwKKwkJCQkgICAgICAiKGFkYXB0ZXIgJXMsIHBvcnQgZF9pZDogMHglMDZ4KVx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L2xwZmMuaAppbmRleCBhN2RlMGJjLi44MmU4ZjkwIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjLmgKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmYy5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA3IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC0yNywxMCArMjcsNiBAQAogCQkJCQkgICByZXF1ZXN0cyAqLwogI2RlZmluZSBMUEZDX01BWF9OU19SRVRSWQkzCS8qIE51bWJlciBvZiByZXRyeSBhdHRlbXB0cyB0byBjb250YWN0CiAJCQkJCSAgIHRoZSBOYW1lU2VydmVyICBiZWZvcmUgZ2l2aW5nIHVwLiAqLwotI2RlZmluZSBMUEZDX0RGVF9IQkFfUV9ERVBUSAkyMDQ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qYnVmOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19hdHRyLmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2F0dHIuYwppbmRleCBmMjQ3ZTc4Li45NWZlNzdlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2F0dHIuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2F0dHIuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA2IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMjAsNiArMjAsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpbmNsdWRlIDxsaW51eC9j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yBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA3IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0xOCw2ICsxOCw4IEBACiAgKiBpbmNsdWRlZCB3aXRoIHRoaXMgcGFja2FnZS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKK3R5cGVkZWYgaW50ICgqbm9kZV9maWx0ZXIpKHN0cnVjdCBscGZjX25vZGVsaXN0ICpuZGxwLCB2b2lkICpwYXJhbSk7CisKIHN0cnVjdCBmY19ycG9ydDsKIHZvaWQgbHBmY19kdW1wX21lbShzdHJ1Y3QgbHBmY19oYmEgKiwgTFBGQ19NQk9YUV90ICosIHVpbnQxNl90KTsKIHZvaWQgbHBm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bHBmY19jdC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA3IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0zMzQsMjEgKzMzNCwyMiBAQAogCiAJbHBmY19zZXRfZGlzY3RtbyhwaGJhKTsKIAotCUNudCA9IFNpemUgID4gRkNFTFNTSVpFID8gRkNFTFNTSVpFIDogU2l6ZTsKIAogCWxpc3RfYWRkX3RhaWwoJmhlYWQsICZtcC0+bGlzdCk7CiAJbGlzdF9mb3JfZWFjaF9lbnRyeV9zYWZlKG1wLCBuZXh0X21wLCAmaGVhZCwgbGlzdCkgewogCQltbGFzdCA9IG1wOwogCisJCUNudCA9IFNpemUgID4gRkNFTFNTSVpFID8gRkNFTFNTSVpFIDogU2l6ZTsKKwogCQlTaXplIC09IENudDsKIAotCQlpZiAoIWN0cHRy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9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Rpc2MuaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGlzYy5oCmluZGV4IDk3NjZmOTAuLjQ5ODA1OWYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGlzYy5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGlzYy5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA3IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0zMSw2ICszMSw3IEBACiAvKiB3b3JrZXIgdGhyZWFkIGV2ZW50cyAqLwogZW51bSBscGZjX3dvcmtfdHlwZSB7CiAJTFBGQ19FVlRfT05MSU5FLAorCUxQRkNfRVZUX09GRkxJTkVfUFJFUCwKIAlMUEZDX0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c2kvbHBmYy9scGZjX2hiYWRpc2MuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaGJhZGlzYy5jCmluZGV4IGMzOTU2NGUuLjYxY2FhOGQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaGJhZGlzYy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaGJhZGlzYy5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA3IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC0xMDksNiArMTA5LDkgQEAKIAkJcmV0dXJuOwogCX0KIAorCWlmIChuZGxwLT5ubHBfc3RhdGUgPT0gTkxQX1NURV9NQVBQRURfTk9ERSkKKwkJcmV0dXJuOworCiAJbmFtZSA9ICh1aW50OF90ICop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qIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTEwNzgsNiArMTA3OCw4IEBACiAvKiBTdGFydCBGaXJlRmx5IFJlZ2lzdGVyIGRlZmluaXRpb25zICovCiAjZGVmaW5lIFBDSV9WRU5ET1JfSURfRU1VTEVYICAgICAgICAweDEwZGYKICNkZWZpbmUgUENJX0RFVklDRV9JRF9GSVJFRkxZICAgICAgIDB4MWFlNQorI2RlZmluZSBQQ0lfREVWSUNFX0lEX1NBVF9TTUIgICAgICAgMHhmMDExCisjZGVmaW5lIFBDSV9ERVZJQ0VfSURfU0FUX01JRCAgICAgICAweGYwMTUKICNkZWZpbmUgUENJX0RFVklDRV9JRF9SRkxZICAgICAgICAgIDB4ZjA5NQogI2RlZmluZSBQQ0lfREVWSUNFX0lEX1BGTFkgICAgICAgICAgMHhmMDk4CiAjZGVmaW5lIFBDSV9ERVZJQ0VfSURfTFAxMDEgICAgICAgICAweGYwYTEKQEAgLTEwODksNiArMTA5MSw5IEBACiAjZGVmaW5lIFBDSV9ERVZJQ0VfSURfTkVQVFVORSAgICAgICAweGYwZjUKICNkZWZpbmUgUENJX0RFVklDRV9JRF9ORVBUVU5FX1NDU1AgIDB4ZjBmNgogI2RlZmluZSBQQ0lfREVWSUNFX0lEX05FUFRVTkVfRENTUCAgMHhmMGY3CisjZGVmaW5lIFBDSV9ERVZJQ0VfSURfU0FUICAgICAgICAgICAweGYxMDAKKyNkZWZpbmUgUENJX0RFVklDRV9JRF9TQVRfU0NTUCAgICAgIDB4ZjExMQorI2RlZmluZSBQQ0lfREVWSUNFX0lEX1NBVF9EQ1NQICA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T5oYmFfc3RhdGUgIT0gTFBGQ19IQkFfUkVBRFkpIHx8Ci0JICAgICAgIChwaGJhLT5udW1fZGlzY19ub2RlcykgfHwgKHBoYmEtPmZjX3BybGlfc2VudCkgfHwKLQkgICAgICAgKChwaGJhLT5mY19tYXBfY250ID09IDApICYmIChpPDIpKSB8fAotCSAgICAgICAocGhiYS0+c2xpLnNsaV9mbGFnICYgTFBGQ19TTElfTUJPWF9BQ1RJVkUpKSB7Ci0JCS8qIENoZWNrIGV2ZXJ5IHNlY29uZCBmb3IgMzAgcmV0cmllcy4gKi8KLQkJaSsrOwotCQlpZiAoaSA+IDMwKSB7Ci0JCQlyZXR1cm4gLUVUSU1FRE9VVDsKLQkJfQotCQlpZiAoKGkgPj0gMTUpICYmIChwaGJhLT5oYmFfc3RhdGUgPD0gTFBGQ19MSU5LX0RPV04pKSB7Ci0JCQkvKiBUaGUgbGluayBpcyBkb3duLiAgU2V0IGxpbmtkb3duIHRpbWVvdXQgKi8KLQkJCXJldHVybiAtRVRJTUVET1VUOwotCQl9Ci0KLQkJLyogRGVsYXkgZm9yIDEgc2Vjb25kIHRvIGdpdmUgZGlzY292ZXJ5IHRpbWUgdG8gY29tcGxldGUuICovCi0JCW1zbGVlcCgxMDAwKTsKLQotCX0KLQotCXJldHVybiAwOwotfQotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qICAgIGxwZmNfaGJhX2Rvd25fcHJlcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCkBAIC01NTAsMTIgKzUyMywxNSBAQAogCQkgKiBUaGVyZSB3YXMgYSBmaXJtd2FyZSBlcnJvci4gIFRha2UgdGhlIGhiYSBvZmZsaW5lIGFuZCB0aGVuCiAJ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oKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMjEyLDYgKzIxMiw3IEBACiAJCQljYXNlIExJTktfU1BFRURfMUc6CiAJCQljYXNlIExJTktfU1BFRURfMkc6CiAJCQljYXNlIExJTktfU1BFRURfNEc6CisJCQljYXNlIExJTktfU1BFRURfOEc6CiAJCQkJbWItPnVuLnZhckluaXRMbmsubGlua19mbGFncyB8PQogCQkJCQkJCUZMQUdTX0xJTktfU1BFRUQ7CiAJCQkJbWItPnVuLnZhckluaXRMbmsubGlua19zcGVlZCA9IGxpbmtzcGVlZDsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbnBvcnRkaXNjLmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX25wb3J0ZGlzYy5jCmluZGV4IDBjN2U3MzEuLmIzMDk4NDEgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbnBvcnRkaXNjLmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA2IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICA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kudGhpc19pZAkJPSAtMSwKIAkuc2dfdGFibGVzaXplCQk9IExQRkNfU0dfU0VHX0NOVCwKIAkuY21kX3Blcl9sdW4JCT0gTFBGQ19DTURfUEVSX0xVTiwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5jCmluZGV4IDlmYjY5NjAuLmExZTcyMTQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA2IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtNTI4LDYgKzUy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c2kvbHBmYy9scGZjX3NsaS5oCmluZGV4IGE0MzU0OTkuLjQxYzM4ZDMgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmgKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA2IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMzksOSArMzksMTAgQEAKIAlJT0NCX3QgaW9jYjsJCS8qIElPQ0IgY21kICovCiAJdWludDhfdCByZXRyeTsJCS8qIHJldHJ5IGNvdW50ZXIgZm9yIElPQ0IgY21kIC0gaWYgbmVlZGVkICovCiAJdWludDhfdCBpb2NiX2ZsYWc7Ci0jZGVmaW5lIExQRkNfSU9fTElCREZDCTEJLyogbGliZGZjIGlvY2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wogCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdmVyc2lvbi5oCmluZGV4IGE2MWVmM2QxLi45MmE5MTA3IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3ZlcnNpb24uaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDA2IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMTgsMTIgKzE4LDEyIEBACiAgKiBpbmNsdWRlZCB3aXRoIHRoaXMgcGFja2FnZS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKio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FURSkgICAgICAgICAgICArPSB2Z2FzdGF0ZS5vCiBvYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gZmJfbm90aWZ5Lm8KIG9iai0kKENPTkZJR19GQikgICAgICAgICAgICAgICAgICArPSBmYi5vCiBmYi15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOj0gZmJtZW0ubyBmYm1vbi5vIGZiY21hcC5vIGZic3lzZnMubyBcCkBAIC0xMiwxNCArMTMsMTkgQEAKIAogb2JqLSQoQ09ORklHX1ZUKQkJICArPSBjb25zb2xlLwogb2JqLSQoQ09ORklHX0xPR08pCQkgICs9IGxvZ28vCi1vYmoteQkJCQkgICs9IGJhY2tsaWdodC8KK29iai15CQkJCSAgKz0gYmFja2xpZ2h0LyBkaXNwbGF5LwogCiBvYmotJChDT05GSUdfRkJfQ0ZCX0ZJTExSRUNUKSAgKz0gY2ZiZmlsbHJlY3Qubwogb2JqLSQoQ09ORklHX0ZCX0NGQl9DT1BZQVJFQSkgICs9IGNmYmNvcHlhcmVhLm8KIG9iai0kKENPTkZJR19GQl9DRkJfSU1BR0VCTElUKSArPSBjZmJpbWdibHQubworb2JqLSQoQ09ORklHX0ZCX1NZU19GSUxMUkVDVCkgICs9IHN5c2ZpbGxyZWN0Lm8KK29iai0kKENPTkZJR19GQl9TWVNfQ09QWUFSRUEpICArPSBzeXNjb3B5YXJlYS5vCitvYmotJChDT05GSUdfRkJfU1lTX0lNQUdFQkxJVCkgKz0gc3lzaW1nYmx0Lm8KK29iai0kKENPTkZJR19GQl9TWVNfRk9QUykgICAgICArPSBmYl9zeXNfZm9wcy5vCiBvYmotJChDT05GSUdfRkJfU1ZHQUxJQikgICAgICAgKz0gc3ZnYWxpYi5vCiBvYmotJChDT05GSUdfRkJfTUFDTU9ERVMpICAgICAgKz0gbWFjbW9kZXMubwogb2JqLSQoQ09ORklHX0ZCX0REQykgICAgICAgICAgICs9IGZiX2RkYy5vCitvYmotJChDT05GSUdfRkJfREVGRVJSRURfSU8pICAgKz0gZmJfZGVmaW8ubwogCiAjIEhhcmR3YXJlIHNwZWNpZmljIGRyaXZlcnMgZ28gZmlyc3QKIG9iai0kKENPTkZJR19GQl9BTUlHQSkgICAgICAgICAgICArPSBhbWlmYi5vIGMycC5vCkBAIC0zMCw3ICszNiw3IEBACiBvYmotJChDT05GSUdfRkJfUE0zKQkJICArPSBwbTNmYi5vCiAKIG9iai0kKENPTkZJR19GQl9NQVRST1gpCQkgICs9IG1hdHJveC8KLW9iai0kKENPTkZJR19GQl9SSVZBKQkJICArPSByaXZhLyB2Z2FzdGF0ZS5vCitvYmotJChDT05GSUdfRkJfUklWQSkJCSAgKz0gcml2YS8KIG9iai0kKENPTkZJR19GQl9OVklESUEpCQkgICs9IG52aWRpYS8KIG9iai0kKENPTkZJR19GQl9BVFkpCQkgICs9IGF0eS8gbWFjbW9kZXMubwogb2JqLSQoQ09ORklHX0ZCX0FUWTEyOCkJCSAgKz0gYXR5LyBtYWNtb2Rlcy5vCkBAIC00MCw4ICs0Niw3IEBACiBvYmotJChDT05GSUdfRkJfU0FWQUdFKQkJICArPSBzYXZhZ2UvCiBvYmotJChDT05GSUdfRkJfR0VPREUpCQkgICs9IGdlb2RlLwogb2JqLSQoQ09ORklHX0ZCX01CWCkJCSAgKz0gbWJ4Lwotb2JqLSQoQ09ORklHX0ZCX0k4MTApICAgICAgICAgICAgICs9IHZnYXN0YXRlLm8KLW9iai0kKENPTkZJR19GQl9ORU9NQUdJQykgICAgICAgICArPSBuZW9mYi5vIHZnYXN0YXRlLm8KK29iai0kKENPTkZJR19GQl9ORU9NQUdJQykgICAgICAgICArPSBuZW9mYi5vCiBvYmotJChDT05GSUdfRkJfM0RGWCkgICAgICAgICAgICAgKz0gdGRmeGZiLm8KIG9iai0kKENPTkZJR19GQl9DT05UUk9MKSAgICAgICAgICArPSBjb250cm9sZmIubwogb2JqLSQoQ09ORklHX0ZCX1BMQVRJTlVNKSAgICAgICAgICs9IHBsYXRpbnVtZmIubwpAQCAtNDksOSArNTQsMTIgQEAKIG9iai0kKENPTkZJR19GQl9DVDY1NTUwKSAgICAgICAgICArPSBjaGlwc2ZiLm8KIG9iai0kKENPTkZJR19GQl9JTVNUVCkgICAgICAgICAgICArPSBpbXN0dGZiLm8KIG9iai0kKENPTkZJR19GQl9GTTIpICAgICAgICAgICAgICArPSBmbTJmYi5vCitvYmotJChDT05GSUdfRkJfVlQ4NjIzKSAgICAgICAgICAgKz0gdnQ4NjIzZmIubwogb2JqLSQoQ09ORklHX0ZCX0NZQkxBKSAgICAgICAgICAgICs9IGN5YmxhZmIubwogb2JqLSQoQ09ORklHX0ZCX1RSSURFTlQpICAgICAgICAgICs9IHRyaWRlbnRmYi5vCi1vYmotJChDT05GSUdfRkJfUzMpICAgICAgICAgICAgICAgKz0gczNmYi5vIHZnYXN0YXRlLm8KK29iai0kKENPTkZJR19GQl9MRTgwNTc4KSAgICAgICAgICArPSB2ZXJtaWxpb24vCitvYmotJChDT05GSUdfRkJfUzMpICAgICAgICAgICAgICAgKz0gczNmYi5vCitvYmotJChDT05GSUdfRkJfQVJLKSAgICAgICAgICAgICAgKz0gYXJrZmIubwogb2JqLSQoQ09ORklHX0ZCX1NUSSkgICAgICAgICAgICAgICs9IHN0aWZiLm8KIG9iai0kKENPTkZJR19GQl9GRkIpICAgICAgICAgICAgICArPSBmZmIubyBzYnVzbGliLm8KIG9iai0kKENPTkZJR19GQl9DRzYpICAgICAgICAgICAgICArPSBjZzYubyBzYnVzbGliLm8KQEAgLTY2LDYgKzc0LDcgQEAKIG9iai0kKENPTkZJR19GQl9BVEFSSSkgICAgICAgICAgICArPSBhdGFmYi5vIGMycC5vIGF0YWZiX21mYi5vIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdGFmYl9pcGxhbjJwMi5vIGF0YWZiX2lwbGFuMnA0Lm8gYXRhZmJfaXBsYW4ycDgubwogb2JqLSQoQ09ORklHX0ZCX01BQykgICAgICAgICAgICAgICs9IG1hY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jsKKworCWlmIChwID49IHRvdGFsX3NpemUpCisJCXJldHVybiAwOworCisJaWYgKGNvdW50ID49IHRvdGFsX3NpemUpCisJCWNvdW50ID0gdG90YWxfc2l6ZTsKKworCWlmIChjb3VudCArIHAgPiB0b3RhbF9zaXplKQorCQljb3VudCA9IHRvdGFsX3NpemUgLSBwOworCisJc3JjID0gKHZvaWQgX19mb3JjZSAqKShpbmZvLT5zY3JlZW5fYmFzZSArIHApOworCisJaWYgKGluZm8tPmZib3BzLT5mYl9zeW5jKQorCQlpbmZvLT5mYm9wcy0+ZmJfc3luYyhpbmZvKTsKKworCWlmIChjb3B5X3RvX3VzZXIoYnVmLCBzcmMsIGNvdW50KSkKKwkJZXJyID0gLUVGQVVMVDsKKworCWlmICAoIWVycikKKwkJKnBwb3MgKz0gY291bnQ7CisKKwlyZXR1cm4gKGVycikgPyBlcnIgOiBjb3VudDsKK30KK0VYUE9SVF9TWU1CT0xfR1BMKGZiX3N5c19yZWFkKTsKKworc3NpemVfdCBmYl9zeXNfd3JpdGUoc3RydWN0IGZiX2luZm8gKmluZm8sIGNvbnN0IGNoYXIgX191c2VyICpidWYsCisJCSAgICAgc2l6ZV90IGNvdW50LCBsb2ZmX3QgKnBwb3MpCit7CisJdW5zaWduZWQgbG9uZyBwID0gKnBwb3M7CisJdm9pZCAqZHN0OworCWludCBlcnIgPSAwOworCXVuc2lnbmVkIGxvbmcgdG90YWxfc2l6ZTsKKworCWlmIChpbmZvLT5zdGF0ZSAhPSBGQklORk9fU1RBVEVfUlVOTklORykKKwkJcmV0dXJuIC1FUEVSTTsKKworCXRvdGFsX3NpemUgPSBpbmZvLT5zY3JlZW5fc2l6ZTsKKworCWlmICh0b3RhbF9zaXplID09IDApCisJCXRvdGFsX3NpemUgPSBpbmZvLT5maXguc21lbV9sZW47CisKKwlpZiAocCA+IHRvdGFsX3NpemUpCisJCXJldHVybiAtRUZCSUc7CisKKwlpZiAoY291bnQgPiB0b3RhbF9zaXplKSB7CisJCWVyciA9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pLS0gJiYgKCotLXMgPT0gMHgyMCkpICpzID0gMDsKIH0KIAorc3RhdGljIGludCBlZGlkX2lzX3NlcmlhbF9ibG9jayh1bnNpZ25lZCBjaGFyICpibG9jaykKK3sKKwlpZiAoKGJsb2NrWzBdID09IDB4MDApICYmIChibG9ja1sxXSA9PSAweDAwKSAmJgorCSAgICAoYmxvY2tbMl0gPT0gMHgwMCkgJiYgKGJsb2NrWzNdID09IDB4ZmYpICYmCisJICAgIChibG9ja1s0XSA9PSAweDAwKSkKKwkJcmV0dXJuIDE7CisJZWxzZQorCQlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBlZGlkX2lzX2FzY2lpX2Jsb2NrKHVuc2lnbmVkIGNoYXIgKmJsb2NrKQoreworCWlmICgoYmxvY2tbMF0gPT0gMHgwMCkgJiYgKGJsb2NrWzFdID09IDB4MDApICYmCisJICAgIChibG9ja1syXSA9PSAweDAwKSAmJiAoYmxvY2tbM10gPT0gMHhmZSkgJiYKKwkgICAgKGJsb2NrWzRdID09IDB4MDApKQorCQlyZXR1cm4gMTsKKwllbHNlCisJCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGVkaWRfaXNfbGltaXRzX2Jsb2NrKHVuc2lnbmVkIGNoYXIgKmJsb2NrKQoreworCWlmICgoYmxvY2tbMF0gPT0gMHgwMCkgJiYgKGJsb2NrWzFdID09IDB4MDApICYmCisJICAgIChibG9ja1syXSA9PSAweDAwKSAmJiAoYmxvY2tbM10gPT0gMHhmZCkgJiYKKwkgICAgKGJsb2NrWzRdID09IDB4MDApKQorCQlyZXR1cm4gMTsKKwllbHNlCisJCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGVkaWRfaXNfbW9uaXRvcl9ibG9jayh1bnNpZ25lZCBjaGFyICpibG9jaykKK3sKKwlpZiAoKGJsb2NrWzBdID09IDB4MDApICYmIChibG9ja1sxXSA9PSAweDAwKSAmJgorCSAgICAoYmxvY2tbMl0gPT0gMHgwMCkgJiYgKGJsb2NrWzNd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KIH0KIAotc3RhdGljIHZvaWQgX19leGl0IHJpdmFmYl9yZW1vdmUoc3RydWN0IHBjaV9kZXYgKnBkKQorc3RhdGljIHZvaWQgX19kZXZleGl0IHJpdmFmYl9yZW1vdmUoc3RydWN0IHBjaV9kZXYgKnBkKQogewogCXN0cnVjdCBmYl9pbmZvICppbmZvID0gcGNpX2dldF9kcnZkYXRhKHBkKTsKIAlzdHJ1Y3Qgcml2YV9wYXIgKnBhciA9IGluZm8tPnBhcjsKQEAgLTIxODUsNyArMjE4Nyw3IEBACiAJLm5hbWUJCT0gInJpdmFmYiIsCiAJLmlkX3RhYmxlCT0gcml2YWZiX3BjaV90YmwsCiAJLnByb2JlCQk9IHJpdmFmYl9wcm9iZSwKLQkucmVtb3ZlCQk9IF9fZXhpdF9wKHJpdmFmYl9yZW1vdmUpLAorCS5yZW1vdmUJCT0gX19kZXZleGl0X3Aocml2YWZiX3JlbW92ZSksCiB9OwogCiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvdmlkZW8vcml2YS9udjRyZWYuaCBiL2RyaXZlcnMvdmlkZW8vcml2YS9udjRyZWYuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggM2I1ZjkxMS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL3ZpZGVvL3JpdmEvbnY0cmVmLmgKKysrIC9kZXYvbnVsbApAQCAtMSwyNDQ1ICswLDAgQEAKLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgICAgQ29weXJpZ2h0IDE5OTMtMTk5OCBOVklESUEsIENvcnBvcmF0aW9uLiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgIE5PVElDRSBUTyBVU0VSOiAgIFRoZSBzb3VyY2UgY29kZSAgaXMgY29weXJpZ2h0ZWQgdW5kZXIgIFUuUy4gYW5kICAgICAqfAotfCogICAgIGludGVybmF0aW9uYWwgbGF3cy4gIFVzZXJzIGFuZCBwb3NzZXNzb3JzIG9mIHRoaXMgc291cmNlIGNvZGUgYXJlICAgICAqfAotfCogICAgIGhlcmVieSBncmFudGVkIGEgbm9uZXhjbHVzaXZlLCAgcm95YWx0eS1mcmVlIGNvcHlyaWdodCBsaWNlbnNlIHRvICAgICAqfAotfCogICAgIHVzZSB0aGlzIGNvZGUgaW4gaW5kaXZpZHVhbCBhbmQgY29tbWVyY2lhbCBzb2Z0d2FyZS4gICAgICAgICAgICAgICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgIEFueSB1c2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBtdXN0IGluY2x1ZGUsICBpbiB0aGUgdXNlciBkb2N1bWVudGEtICAgICAqfAotfCogICAgIHRpb24gYW5kICBpbnRlcm5hbCBjb21tZW50cyB0byB0aGUgY29kZSwgIG5vdGljZXMgdG8gdGhlIGVuZCB1c2VyICAgICAqfAotfCogICAgIGFzIGZvbGxvd3M6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgICAgQ29weXJpZ2h0IDE5OTMtMTk5OCBOVklESUEsIENvcnBvcmF0aW9uLiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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GICAgICAqfAotfCogICAgIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SIFBFUkZPUk1BTkNFIE9GIFRISVMgU09VUkNFIENPREUuICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgIFUuUy4gR292ZXJubWVudCAgRW5kICBVc2Vycy4gICBUaGlzIHNvdXJjZSBjb2RlICBpcyBhICJjb21tZXJjaWFsICAgICAqfAotfCogICAgIGl0ZW0sIiAgYXMgdGhhdCAgdGVybSBpcyAgZGVmaW5lZCBhdCAgNDggQy5GLlIuIDIuMTAxIChPQ1QgMTk5NSksICAgICAqfAotfCogICAgIGNvbnNpc3RpbmcgIG9mICJjb21tZXJjaWFsICBjb21wdXRlciAgc29mdHdhcmUiICBhbmQgICJjb21tZXJjaWFsICAgICAqfAotfCogICAgIGNvbXB1dGVyICBzb2Z0d2FyZSAgZG9jdW1lbnRhdGlvbiwiICBhcyBzdWNoICB0ZXJtcyAgYXJlICB1c2VkIGluICAgICAqfAotfCogICAgIDQ4IEMuRi5SLiAxMi4yMTIgKFNFUFQgMTk5NSkgIGFuZCBpcyBwcm92aWRlZCB0byB0aGUgVS5TLiBHb3Zlcm4tICAgICAqfAotfCogICAgIG1lbnQgb25seSBhcyAgYSBjb21tZXJjaWFsIGVuZCBpdGVtLiAgIENvbnNpc3RlbnQgd2l0aCAgNDggQy5GLlIuICAgICAqfAotfCogICAgIDEyLjIxMiBhbmQgIDQ4IEMuRi5SLiAyMjcuNzIwMi0xIHRocm91Z2ggIDIyNy43MjAyLTQgKEpVTkUgMTk5NSksICAgICAqfAotfCogICAgIGFsbCBVLlMuIEdvdmVybm1lbnQgRW5kIFVzZXJzICBhY3F1aXJlIHRoZSBzb3VyY2UgY29kZSAgd2l0aCBvbmx5ICAgICAqfAotfCogICAgIHRob3NlIHJpZ2h0cyBzZXQgZm9ydGggaGVyZWluLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotfCogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqfAotIFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKiBHUEwgbGljZW5zaW5nIG5vdGUgLS0gblZpZGlhIGlzIGFsbG93aW5nIGEgbGliZXJhbCBpbnRlcnByZXRhdGlvbiBvZgotICogdGhlIGRvY3VtZW50YXRpb24gcmVzdHJpY3Rpb24gYWJvdmUsIHRvIG1lcmVseSBzYXkgdGhhdCB0aGlzIG5WaWRpYSdzCi0gKiBjb3B5cmlnaHQgYW5kIGRpc2NsYWltZXIgc2hvdWxkIGJlIGluY2x1ZGVkIHdpdGggYWxsIGNvZGUgZGVyaXZlZAotICogZnJvbSB0aGlzIHNvdXJjZS4gIC0tIEplZmYgR2FyemlrIDxqZ2FyemlrQHBvYm94LmNvbT4sIDAxL05vdi85OSAKLSAqLwotCi0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlwKLXwqICAgICAgICAgICAgTW9kaWZpZWQgMTk5OSBieSBGcmVkcmlrIFJlaXRlIChmcmVkcmlrQHJlaXRlLmNvbSkgICAgICAgICAgICAgKnwKLSBcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KLSNpZm5kZWYgX19OVjRSRUZfSF9fCi0jZGVmaW5lIF9fTlY0UkVGX0hfXwotCi0vKiBNYWdpYyB2YWx1ZXMgdG8gbG9jay91bmxvY2sgZXh0ZW5kZWQgcmVncyAqLwotI2RlZmluZSBOVl9DSU9fU1JfTE9DS19JTkRFWAkJCQkgICAgIDB4MDAwMDAwMUYgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfQ0lPX1NSX1VOTE9DS19SV19WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDU3IC8qICAgICAgICovCi0jZGVmaW5lIE5WX0NJT19TUl9VTkxPQ0tfUk9fVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA3NSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9DSU9fU1JfTE9DS19WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwOTkgLyogICAgICAgKi8KLQotI2RlZmluZSBVTkxPQ0tfRVhUX01BR0lDIDB4NTcKLSNkZWZpbmUgTE9DS19FWFRfTUFHSUMgMHg5OSAvKiBBbnkgdmFsdWUgb3RoZXIgdGhhbiAweDU3IHdpbGwgZG8gKi8KLQotI2RlZmluZSBMT0NLX0VYVF9JTkRFWCAweDYKLQotI2RlZmluZSBOVl9QQ1JUQ19IT1JJWl9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgTlZfUENSVENfSE9SSVpfRElTUExBWV9FTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0JMQU5LX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgotCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0JMQU5LX0VORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMwotI2RlZmluZSBOVl9QQ1JUQ19IT1JJWl9CTEFOS19FTkRfRVZSQSAgICAgICAgICAgICAgICAgICAgICAgIDc6NwotI2RlZmluZSBOVl9QQ1JUQ19IT1JJWl9CTEFOS19FTkRfRElTUExBWV9FTkRfU0tFVyAgICAgICAgICAgIDY6NQotI2RlZmluZSBOVl9QQ1JUQ19IT1JJWl9CTEFOS19FTkRfSE9SSVpfQkx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1JUQ19PVkVSRkxPV19WRVJUX1JFVFJBQ0VfU1RBUlRfOCAgICAgICAgICAgICAgIDI6MgotI2RlZmluZSBOVl9QQ1JUQ19PVkVSRkxPV19WRVJUX0RJU1BMQVlfRU5EXzggICAgICAgICAgICAgICAgIDE6MQotI2RlZmluZSBOVl9QQ1JUQ19PVkVSRkxPV19WRVJUX1RPVEFMXzggICAgICAgICAgICAgICAgICAgICAgIDA6MAotCi0jZGVmaW5lIE5WX1BDUlRDX1BSRVNFVF9ST1dfU0NBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAotCi0jZGVmaW5lIE5WX1BDUlRDX01BWF9TQ0FOX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOQotI2RlZmluZSBOVl9QQ1JUQ19NQVhfU0NBTl9MSU5FX0RPVUJMRV9TQ0FOICAgICAgICAgICAgICAgICAgIDc6NwotI2RlZmluZSBOVl9QQ1JUQ19NQVhfU0NBTl9MSU5FX0xJTkVfQ09NUEFSRV85ICAgICAgICAgICAgICAgIDY6NgotI2RlZmluZSBOVl9QQ1JUQ19NQVhfU0NBTl9MSU5FX1ZFUlRfQkxBTktfU1RBUlRfOSAgICAgICAgICAgIDU6NQotI2RlZmluZSBOVl9QQ1JUQ19NQVhfU0NBTl9MSU5FX01BWF9TQ0FOX0xJTkUgICAgICAgICAgICAgICAgIDQ6MAotCi0jZGVmaW5lIE5WX1BDUlRDX0NVUlNPUl9TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwQQotI2RlZmluZSBOVl9QQ1JUQ19DVVJTT1JfRU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEIKLSNkZWZpbmUgTlZfUENSVENfU1RBUlRfQUREUl9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBDCi0jZGVmaW5lIE5WX1BDUlRDX1NUQVJUX0FERFJfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRAotI2RlZmluZSBOVl9QQ1JUQ19DVVJTT1JfTE9DQVRJT05fSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDB4MEUKLSNkZWZpbmUgTlZfUENSVENfQ1VSU09SX0xPQ0FUSU9OX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAweDBGCi0KLSNkZWZpbmUgTlZfUENSVENfVkVSVF9SRVRSQUNFX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCi0jZGVmaW5lIE5WX1BDUlRDX1ZFUlRfUkVUUkFDRV9FTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMQotI2RlZmluZSBOVl9QQ1JUQ19WRVJUX0RJU1BMQVlfRU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTIKLSNkZWZpbmUgTlZfUENSVENfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEzCi0jZGVmaW5lIE5WX1BDUlRDX1VOREVSTElORV9MT0NBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNAotI2RlZmluZSBOVl9QQ1JUQ19WRVJUX0JMQU5LX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTUKLSNkZWZpbmUgTlZfUENSVENfVkVSVF9CTEFOS19FTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE2Ci0jZGVmaW5lIE5WX1BDUlRDX01PREVfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNwotI2RlZmluZSBOVl9QQ1JUQ19MSU5FX0NPTVBBUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgKLQotLyogRXh0ZW5kZWQgb2Zmc2V0IGFuZCBzdGFydCBhZGRyZXNzICovCi0jZGVmaW5lIE5WX1BDUlRDX1JFUEFJTlQwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOQotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMF9PRkZTRVRfMTBfOCAgICAgICAgICAgICAgICAgICAgICAgIDc6NSAKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDBfU1RBUlRfQUREUl8yMF8xNiAgICAgICAgICAgICAgICAgICA0OjAKLQotLyogSG9yaXpvbmFsIGV4dGVuZGVkIGJpdHMgKi8KLSNkZWZpbmUgTlZfUENSVENfSE9SSVpfRVhUUkEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJkCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0VYVFJBX0lOVEVSX0hBTEZfU1RBUlRfOCAgICAgICAgICAgICAgNDo0Ci0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0VYVFJBX0hPUklaX1JFVFJBQ0VfU1RBUlRfOCAgICAgICAgICAgMzozCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0VYVFJBX0hPUklaX0JMQU5LX1NUQVJUXzggICAgICAgICAgICAgMjoyCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0VYVFJBX0RJU1BMQVlfRU5EXzggICAgICAgICAgICAgICAgICAgMToxCi0jZGVmaW5lIE5WX1BDUlRDX0hPUklaX0VYVFJBX0RJU1BMQVlfVE9UQUxfOCAgICAgICAgICAgICAgICAgMDowCi0KLS8qIEFzc29ydGVkIGV4dHJhIGJpdHMgKi8KLSNkZWZpbmUgTlZfUENSVENfRVhUUkEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI1Ci0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX09GRlNFVF8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1Ci0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX0hPUklaX0JMQU5LX0VORF82ICAgICAgICAgICAgICAgICAgICAgNDo0Ci0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX1ZFUlRfQkxBTktfU1RBUlRfMTAgICAgICAgICAgICAgICAgICAgMzozCi0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX1ZFUlRfUkVUUkFDRV9TVEFSVF8xMCAgICAgICAgICAgICAgICAgMjoyCi0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX1ZFUlRfRElTUExBWV9FTkRfMTAgICAgICAgICAgICAgICAgICAgMToxCi0jZGVmaW5lIE5WX1BDUlRDX0VYVFJBX1ZFUlRfVE9UQUxfMTAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCi0KLS8qIENvbnRyb2xzIGhvdyBtdWNoIGRhdGEgdGhlIHJlZnJlc2ggZmlmbyByZXF1ZXN0cyAqLwotI2RlZmluZSBOVl9QQ1JUQ19GSUZPX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWIKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX1VOREVSRkxPV19XQVJOICAgICAgICAgICAgICAgICA3OjcKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSCAgICAgICAgICAgICAgICAgICAyOjAKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSF84ICAgICAgICAgICAgICAgICAweDAKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSF8zMiAgICAgICAgICAgICAgICAweDEKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSF82NCAgICAgICAgICAgICAgICAweDIKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSF8xMjggICAgICAgICAgICAgICAweDMKLSNkZWZpbmUgTlZfUENSVENfRklGT19DT05UUk9MX0JVUlNUX0xFTkdUSF8yNTYgICAgICAgICAgICAgICAweDQKLQotLyogV2hlbiB0aGUgZmlmbyBvY2N1cGFuY3kgZmFsbHMgYmVsb3cgKnR3aWNlKiB0aGUgd2F0ZXJtYXJrLAotICogdGhlIHJlZnJlc2ggZmlmbyB3aWxsIHN0YXJ0IHRvIGJlIHJlZmlsbGVkLiBJZiB0aGlzIHZhbHVlIGlzIAotICogdG9vIGxvdywgeW91IHdpbGwgZ2V0IGp1bmsgb24gdGhlIHNjcmVlbi4gVG9vIGhpZ2gsIGFuZCBwZXJmb3JtYW5jZQotICogd2lsbCBzdWZmZXIuIFdhdGVybWFyayBpbiB1bml0cyBvZiA4IGJ5dGVzCi0gKi8KLSNkZWZpbmUgTlZfUENSVENfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCi0jZGVmaW5lIE5WX1BDUlRDX0ZJRk9fUkVTRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3Ci0jZGVmaW5lIE5WX1BDUlRDX0ZJRk9fV0FURVJNQVJLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTowCi0KLS8qIFZhcmlvdXMgZmxhZ3MgKi8KLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhCi0jZGVmaW5lIE5WX1BDUlRDX1JFUEFJTlQxX0hTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3Ci0jZGVmaW5lIE5WX1BDUlRDX1JFUEFJTlQxX0hZU05DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgMHgwMQotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9IWVNOQ19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDFfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDFfVllTTkNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAweDAxCi0jZGVmaW5lIE5WX1BDUlRDX1JFUEFJTlQxX1ZZU05DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMHgwMAotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9DT01QQVRJQkxFX1RFWFQgICAgICAgICAgICAgICAgICAgIDQ6NAotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9DT01QQVRJQkxFX1RFWFRfRU5BQkxFICAgICAgICAgICAgIDB4MDEKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDFfQ09NUEFUSUJMRV9URVhUX0RJU0FCTEUgICAgICAgICAgICAweDAwCi0jZGVmaW5lIE5WX1BDUlRDX1JFUEFJTlQxX0xBUkdFX1NDUkVFTiAgICAgICAgICAgICAgICAgICAgICAgMjoyIAotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9MQVJHRV9TQ1JFRU5fRElTQUJMRSAgICAgICAgICAgICAgIDB4MDEKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDFfTEFSR0VfU0NSRUVOX0VOQUJMRSAgICAgICAgICAgICAgICAweDAwIC8qID49MTI4MCAqLwotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9QQUxFVFRFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDE6MQotI2RlZmluZSBOVl9QQ1JUQ19SRVBBSU5UMV9QQUxFVFRFX1dJRFRIXzhCSVRTICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgTlZfUENSVENfUkVQQUlOVDFfUEFMRVRURV9XSURUSF82QklUUyAgICAgICAgICAgICAgICAweDAxCi0KLSNkZWZpbmUgTlZfUENSVENfR1JDVVJTT1IwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCi0jZGVmaW5lIE5WX1BDUlRDX0dSQ1VSU09SMF9TVEFSVF9BRERSXzIxXzE2ICAgICAgICAgICAgICAgICAgNTowCi0KLSNkZWZpbmUgTlZfUENSVENfR1JDVVJTT1IxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMxCi0jZGVmaW5lIE5WX1BDUlRDX0dSQ1VSU09SMV9TVEFSVF9BRERSXzE1XzExICAgICAgICAgICAgICAgICAgNzozCi0jZGVmaW5lIE5WX1BDUlRDX0dSQ1VSU09SMV9TQ0FOX0RCTCAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCi0jZGVmaW5lIE5WX1BDUlRDX0dSQ1VSU09SMV9TQ0FOX0RCTF9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAotI2RlZmluZSBOVl9QQ1JUQ19HUkNVUlNPUjFfU0NBTl9EQkxfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgTlZfUENSVENfR1JDVVJTT1IxX0NVUlNPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKLSNkZWZpbmUgTlZfUENSVENfR1JDVVJTT1IxX0NVUlNPUl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwIAotI2RlZmluZSBOVl9QQ1JUQ19HUkNVUlNPUjFfQ1VSU09SX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKLQotLyogQ29udHJvbHMgd2hhdCB0aGUgZm9ybWF0IG9mIHRoZSBmcmFtZWJ1ZmZlciBpcyAqLwotI2RlZmluZSBOVl9QQ1JUQ19QSVhFTCAgICAgICAgICAgICAgICAgICAgICAgMHgyOAotI2RlZmluZSBOVl9QQ1JUQ19QSVhFTF9NT0RFICAgICAgICAgICAgICAgICAgNzo3Ci0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX01PREVfVFYgICAgICAgICAgICAgICAweDAxCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX01PREVfVkdBICAgICAgICAgICAgICAweDAwCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX1RWX01PREUgICAgICAgICAgICAgICA2OjYKLSNkZWZpbmUgTlZfUENSVENfUElYRUxfVFZfTU9ERV9OVFNDICAgICAgICAgIDB4MDAKLSNkZWZpbmUgTlZfUENSVENfUElYRUxfVFZfTU9ERV9QQUwgICAgICAgICAgIDB4MDEKLSNkZWZpbmUgTlZfUENSVENfUElYRUxfVFZfSE9SSVpfQURKVVNUICAgICAgIDU6MwotI2RlZmluZSBOVl9QQ1JUQ19QSVhFTF9GT1JNQVQgICAgICAgICAgICAgICAgMTowCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX0ZPUk1BVF9WR0EgICAgICAgICAgICAweDAwCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX0ZPUk1BVF84QlBQICAgICAgICAgICAweDAxCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX0ZPUk1BVF8xNkJQUCAgICAgICAgICAweDAyCi0jZGVmaW5lIE5WX1BDUlRDX1BJWEVMX0ZPUk1BVF8zMkJQUCAgICAgICAgICAweDAzCi0KLS8qIFJBTURBQyByZWdpc3RlcnMgYW5kIGZpZWxkcyAqLwotI2RlZmluZSBOVl9QUkFNREFDICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA2ODBGRkY6MHgwMDY4MDAwMCAvKiBSVy0tRCAqLwotI2RlZmluZSBOVl9QUkFNREFDX0dSQ1VSU09SX1NUQVJUX1BPUyAgICAgICAgICAgICAgICAgICAgMHgwMDY4MDMwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QUkFNREFDX0dSQ1VSU09SX1NUQVJUX1BPU19YICAgICAgICAgICAgICAgICAgICAgICAgMTE6MCAvKiBSV1hTRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX0dSQ1VSU09SX1NUQVJUX1BPU19ZICAgICAgICAgICAgICAgICAgICAgICAyNzoxNiAvKiBSV1hTRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX05WUExMX0NPRUZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDY4MDUwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QUkFNREFDX05WUExMX0NPRUZGX01ESVYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX05WUExMX0NPRUZGX05ESVYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6OCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX05WUExMX0NPRUZGX1BESVYgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX01QTExfQ09FRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDY4MDUwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QUkFNREFDX01QTExfQ09FRkZfTURJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX01QTExfQ09FRkZfTkRJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6OCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX01QTExfQ09FRkZfUERJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1ZQTExfQ09FRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDY4MDUwOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1ZQTExfQ09FRkZfTURJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1ZQTExfQ09FRkZfTkRJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6OCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1ZQTExfQ09FRkZfUERJViAgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1BMTF9DT0VGRl9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgMHgwMDY4MDUwQyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QUkFNREFDX1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wMDAwMCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01JTk9SX1JFVklTSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MCAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01JTk9SX1JFVklTSU9OXzAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BSk9SX1JFVklTSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NCAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BSk9SX1JFVklTSU9OX0EgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BSk9SX1JFVklTSU9OX0IgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0lNUExFTUVOVEFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OCAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0lNUExFTUVOVEFUSU9OX05WNF8wICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMiAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRV9OVjAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRV9OVjEgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRV9OVjIgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRV9OVjMgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMyAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0FSQ0hJVEVDVFVSRV9OVjQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZJQl9SRVZJU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOToxNiAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZJQl9SRVZJU0lPTl8wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BU0tfUkVWSVNJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMCAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BU0tfUkVWSVNJT05fQSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BU0tfUkVWSVNJT05fQiAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BTlVGQUNUVVJFUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNCAvKiBDLS1VRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX01BTlVGQUNUVVJFUl9OVklESUEgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZPVU5EUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToyOCAvKiBDLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZPVU5EUllfU0dTICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZPVU5EUllfSEVMSU9TICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtLS0tViAqLwotI2RlZmluZSBOVl9QTUNfQk9PVF8wX0ZPVU5EUllfVFNNQyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBDLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDEwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BNRURJQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BNRURJQV9OT1RfUEVORElORyAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BNRURJQV9QRU5ESU5HICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BGSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BGSUZPX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BGSUZPX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BHUkFQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BHUkFQSF9OT1RfUEVORElORyAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BHUkFQSF9QRU5ESU5HICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BWSURFTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BWSURFT19OT1RfUEVORElORyAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BWSURFT19QRU5ESU5HICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BUSU1FUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BUSU1FUl9OT1RfUEVORElORyAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BUSU1FUl9QRU5ESU5HICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BDUlRDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BDUlRDX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BDUlRDX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BCVVNfTk9UX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1BCVVNfUEVORElORyAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1NPRlRXQVJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1NPRlRXQVJFX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl8wX1NPRlRXQVJFX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9FTl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDE0MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9FTl8wX0lOVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9FTl8wX0lOVEFfRElTQUJMRUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9FTl8wX0lOVEFfSEFSRFdBUkUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9FTl8wX0lOVEFfU09GVFdBUkUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9SRUFEXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDE2MCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9SRUFEXzBfSU5UQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9SRUFEXzBfSU5UQV9MT1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfSU5UUl9SRUFEXzBfSU5UQV9ISUdIICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDIwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BNRURJQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BNRURJQV9ESVNBQkxFRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BNRURJQV9FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGSUZPX0RJU0FCTEVEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGSUZPX0VOQUJMRUQgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BHUkFQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BHUkFQSF9ESVNBQkxFRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BHUkFQSF9FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BQTUkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BQTUlfRElTQUJMRUQgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BQTUlfRU5BQkxFRCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGQl9ESVNBQkxFRCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BGQl9FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BDUlRDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BDUlRDX0RJU0FCTEVEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BDUlRDX0VOQUJMRUQgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BWSURFTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BWSURFT19ESVNBQkxFRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QTUNfRU5BQkxFX1BWSURFT19FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotCi0vKiBkZXZfdGltZXIucmVmICovCi0jZGVmaW5lIE5WX1BUSU1FUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwOUZGRjoweDAwMDA5MDAwIC8qIFJXLS1EICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5MTAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSXzBfQUxBUk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowIC8qIFJXWFZGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSXzBfQUxBUk1fTk9UX1BFTkRJTkcgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFItLS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSXzBfQUxBUk1fUEVORElORyAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFItLS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSXzBfQUxBUk1fUkVTRVQgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIC1XLS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSX0VOXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5MTQwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSX0VOXzBfQUxBUk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowIC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSX0VOXzBfQUxBUk1fRElTQUJMRUQgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9JTlRSX0VOXzBfQUxBUk1fRU5BQkxFRCAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9OVU1FUkFUT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5MjAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9OVU1FUkFUT1JfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9OVU1FUkFUT1JfVkFMVUVfMCAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9ERU5PTUlOQVRPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5MjEwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9ERU5PTUlOQVRPUl9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9ERU5PTUlOQVRPUl9WQUxVRV8wICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BUSU1FUl9USU1FXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5NDAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9USU1FXzBfTlNFQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTo1IC8qIFJXWFVGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9USU1FXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5NDEwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9USU1FXzFfTlNFQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODowIC8qIFJXWFVGICovCi0jZGVmaW5lIE5WX1BUSU1FUl9BTEFSTV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA5NDIwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BUSU1FUl9BTEFSTV8wX05TRUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTo1IC8qIFJXWFVGICovCi0KLS8qIGRldl9maWZvLnJlZiAqLwotI2RlZmluZSBOVl9QRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDNGRkY6MHgwMDAwMjAwMCAvKiBSVy0tRCAqLwotI2RlZmluZSBOVl9QRklGT19ERUxBWV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA0MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19ERUxBWV8wX1dBSVRfUkVUUlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19ERUxBWV8wX1dBSVRfUkVUUllfMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA0NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVF8xICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVF8xNksgICAgICAgICAgICAgICAgMHgwMDAwM2ZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVF8zMksgICAgICAgICAgICAgICAgMHgwMDAwN2ZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVF82NEsgICAgICAgICAgICAgICAgMHgwMDAwZmZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1NFTEVDVF8xMjhLICAgICAgICAgICAgICAgMHgwMDAxZmZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1RJTUVPVVQgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1RJTUVPVVRfRElTQUJMRUQgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfVElNRVNMSUNFX1RJTUVPVVRfRU5BQkxFRCAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA0OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVF8xICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVF8xNksgICAgICAgICAgICAgICAgMHgwMDAwM2ZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVF8zMksgICAgICAgICAgICAgICAgMHgwMDAwN2ZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVF82NEsgICAgICAgICAgICAgICAgMHgwMDAwZmZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1NFTEVDVF8xMjhLICAgICAgICAgICAgICAgMHgwMDAxZmZmZiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1RJTUVPVVQgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1RJTUVPVVRfRElTQUJMRUQgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19QSU9fVElNRVNMSUNFX1RJTUVPVVRfRU5BQkxFRCAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19USU1FU0xJQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA0QyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19USU1FU0xJQ0VfVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19USU1FU0xJQ0VfVElNRVJfRVhQSVJFRCAgICAgICAgICAgICAgICAgMHgwMDAzRkZGRiAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA1MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfQ0hJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfTU9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfTU9ERV9QSU8gICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfTU9ERV9ETUEgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfU1dJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfU1dJVENIX05PVF9QRU5ESU5HICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ORVhUX0NIQU5ORUxfU1dJVENIX1BFTkRJTkcgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjA4MCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMF9OT1RfUEVORElORyAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMF9QRU5ESU5HICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMSAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMV9OT1RfUEVORElORyAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19ERUJVR18wX0NBQ0hFX0VSUk9SMV9QRU5ESU5HICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjEwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfQ0FDSEVfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfQ0FDSEVfRVJST1JfTk9UX1BFTkRJTkcgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfQ0FDSEVfRVJST1JfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfQ0FDSEVfRVJST1JfUkVTRVQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX1JFU0VUICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX09WRVJGTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX09WRVJGTE9XX05PVF9QRU5ESU5HICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX09WRVJGTE9XX1BFTkRJTkcgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfUlVOT1VUX09WRVJGTE9XX1JFU0VUICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BVU0hFUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BVU0hFUl9OT1RfUEVORElORyAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BVU0hFUl9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BVU0hFUl9SRVNFVCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BUX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BUX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSXzBfRE1BX1BUX1JFU0VUICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjE0MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfQ0FDSEVfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfQ0FDSEVfRVJST1JfRElTQUJMRUQgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfQ0FDSEVfRVJST1JfRU5BQkxFRCAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUX0RJU0FCTEVEICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUX0VOQUJMRUQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUX09WRVJGTE9XICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUX09WRVJGTE9XX0RJU0FCTEVEICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfUlVOT1VUX09WRVJGTE9XX0VOQUJMRUQgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BVU0hFUiAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BVU0hFUl9ESVNBQkxFRCAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BVU0hFUl9FTkFCTEVEICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BUX0RJU0FCTEVEICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19JTlRSX0VOXzBfRE1BX1BUX0VOQUJMRUQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjIxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6NCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9CQVNFX0FERFJFU1NfMTAwMDAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNiAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TSVpFXzRLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TSVpFXzhLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TSVpFXzE2SyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TSVpFXzMySyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TRUFSQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TRUFSQ0hfMTYgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TRUFSQ0hfMzIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TRUFSQ0hfNjQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1IVF9TRUFSQ0hfMTI4ICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1GQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjIxNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1GQ19CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6MSAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1GQ19CQVNFX0FERFJFU1NfMTEwMDAgICAgICAgICAgICAgICAgMHgwMDAwMDA4OCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1STyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjIxOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6MSAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19CQVNFX0FERFJFU1NfMTEyMDAgICAgICAgICAgICAgICAgMHgwMDAwMDA4OSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19CQVNFX0FERFJFU1NfMTIwMDAgICAgICAgICAgICAgICAgMHgwMDAwMDA5MCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19TSVpFXzUxMiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19SQU1ST19TSVpFXzhLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjUwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfUkVBU1NJR04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfUkVBU1NJR05fRElTQUJMRUQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfUkVBU1NJR05fRU5BQkxFRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfRE1BX1NVU1BFTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfRE1BX1NVU1BFTkRfSURMRSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRVNfRE1BX1NVU1BFTkRfQlVTWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjUwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMF9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMF9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMV9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMV9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMl9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMl9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfM19QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfM19ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNF9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNF9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNV9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNV9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNl9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNl9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfN19QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfN19ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOF9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOF9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOV9QSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfOV9ETUEgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTBfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTBfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTFfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTFfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTJfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTJfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTNfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTNfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTRfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTRfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTVfUElPICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19NT0RFX0NIQU5ORUxfMTVfRE1BICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjUwOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8wX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8wX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8yX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8yX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8zX05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8zX1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF80ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF80X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF80X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF81X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF81X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF82ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF82X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF82X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF83ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF83X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF83X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF84ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF84X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF84X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF85ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF85X05PVF9QRU5ESU5HICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF85X1BFTkRJTkcgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMF9OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMF9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMV9OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMV9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMl9OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMl9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xM19OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xM19QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNF9OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNF9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNV9OT1RfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19ETUFfQ0hBTk5FTF8xNV9QRU5ESU5HICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjUwQyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMF8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMF81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMV8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMV81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMl8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMl81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfM18xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfM181MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNF8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNF81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNV8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNV81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNl8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNl81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfN18xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfN181MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOF8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOF81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOV8xMjRfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfOV81MTJfQllURVMgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTBfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTBfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTFfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTFfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTJfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTJfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTNfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTNfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTRfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTRfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTVfMTI0X0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19TSVpFX0NIQU5ORUxfMTVfNTEyX0JZVEVTICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzAwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDBfQUNDRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDBfQUNDRVNTX0RJU0FCTEVEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDBfQUNDRVNTX0VOQUJMRUQgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDBfQUNDRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDBfQUNDRVNTX0RJU0FCTEVEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDBfQUNDRVNTX0VOQUJMRUQgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzAwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVTSDFfQ0hJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDFfQ0hJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDFfTU9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDFfTU9ERV9QSU8gICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVTSDFfTU9ERV9ETUEgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0ggICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIyMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQUNDRVNTICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQUNDRVNTX0RJU0FCTEVEICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQUNDRVNTX0VOQUJMRUQgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVEUgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVEVfSURMRSAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVEVfQlVTWSAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQlVGRkVSICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQlVGRkVSX05PVF9FTVBUWSAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfQlVGRkVSX0VNUFRZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVFVTX1JVTk5JTkcgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVU0hfU1RBVFVTX1NVU1BFTkRFRCAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIyNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUcgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MyAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfOF9CWVRFUyAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfMTZfQllURVMgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfMjRfQllURVMgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfMzJfQllURVMgICAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfNDBfQllURVMgICAgICAgICAgMHgwMDAwMDAwNCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX1RSSUdfNDhfQllURVMgICAgICAgICA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lZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzUgICAgICAgICAgICAgMHgwMDAwMDAwNSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzYgICAgICAgICAgICAgMHgwMDAwMDAwNiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzcgICAgICAgICAgICAgMHgwMDAwMDAwNyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzggICAgICAgICAgICAgMHgwMDAwMDAwOCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzkgICAgICAgICAgICAgMHgwMDAwMDAwOSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzEwICAgICAgICAgICAgMHgwMDAwMDAwQSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzExICAgICAgICAgICAgMHgwMDAwMDAwQiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzEyICAgICAgICAgICAgMHgwMDAwMDAwQyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzEzICAgICAgICAgICAgMHgwMDAwMDAwRCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzE0ICAgICAgICAgICAgMHgwMDAwMDAwRSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0ZFVENIX01BWF9SRVFTXzE1ICAgICAgICAgICAgMHgwMDAwMDAwRiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI0MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1BVVF9PRkZTRVQgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0dFVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI0NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0dFVF9PRkZTRVQgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIyOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFX01FVEhPRCAgICAgICAgICAgICAgICAgICAgICAgMTI6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFX1NVQkNIQU5ORUwgICAgICAgICAgICAgICAgICAxNToxMyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFX01FVEhPRF9DT1VOVCAgICAgICAgICAgICAgICAyODoxOCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFX01FVEhPRF9DT1VOVF8wICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1NUQVRFX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAzMTozMCAvKiBSV1hVRiAqLwotI2RlZmluZSBOV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y00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX0xJTUlUX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgMjg6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9UQUcgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIzOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9UQUdfQUREUkVTUyAgICAgICAgICAgICAgICAgICAyODoxMiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9UQUdfU1RBVEUgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9UQUdfU1RBVEVfSU5WQUxJRCAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9UQUdfU1RBVEVfVkFMSUQgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9QVEUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIzQyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRE1BX1RMQl9QVEVfRlJBTUVfQUREUkVTUyAgICAgICAgICAgICAzMToxMiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzA1MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfQUNDRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfQUNDRVNTX0RJU0FCTEVEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfQUNDRVNTX0VOQUJMRUQgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSF9TVUNDRUVERUQgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSF9GQUlMRUQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfREVWSUNFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfREVWSUNFX0hBUkRXQVJFICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfREVWSUNFX1NPRlRXQVJFICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSF9TVEFURSAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSF9TVEFURV9JRExFICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDBfSEFTSF9TVEFURV9CVVNZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI1MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfQUNDRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfQUNDRVNTX0RJU0FCTEVEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfQUNDRVNTX0VOQUJMRUQgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSF9TVUNDRUVERUQgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSF9GQUlMRUQgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfREVWSUNFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfREVWSUNFX0hBUkRXQVJFICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfREVWSUNFX1NPRlRXQVJFICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSF9TVEFURSAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSF9TVEFURV9JRExFICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDBfSEFTSF9TVEFURV9CVVNZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzA1NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDFfRU5HSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDFfRU5HSU5FX1NXICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDFfRU5HSU5FX0dSQVBISUNTICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVMTDFfRU5HSU5FX0RWRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI1NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDFfRU5HSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDFfRU5HSU5FX1NXICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDFfRU5HSU5FX0dSQVBISUNTICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVMTDFfRU5HSU5FX0RWRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfSEFTSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzA1OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfSEFTSF9JTlNUQU5DRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfSEFTSF9WQUxJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfSEFTSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI1OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfSEFTSF9JTlNUQU5DRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfSEFTSF9WQUxJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzAxNCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0xPV19NQVJLICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0xPV19NQVJLX05PVF9FTVBUWSAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0xPV19NQVJLX0VNUFRZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0hJR0hfTUFSSyAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0hJR0hfTUFSS19OT1RfRlVMTCAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfU1RBVFVTX0hJR0hfTUFSS19GVUxMICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIxNCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0xPV19NQVJLICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0xPV19NQVJLX05PVF9FTVBUWSAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0xPV19NQVJLX0VNUFRZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0hJR0hfTUFSSyAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0hJR0hfTUFSS19OT1RfRlVMTCAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTX0hJR0hfTUFSS19GVUxMICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTMSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIxOCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTMV9SQU5PVVQgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTMV9SQU5PVVRfRkFMU0UgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfU1RBVFVTMV9SQU5PVVRfVFJVRSAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzAxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfUFVUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzIxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfUFVUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfR0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzA3MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfR0VUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfR0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI3MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfR0VUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzA4MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzBfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzBfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzBfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzFfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzFfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzFfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzJfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzJfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzJfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzNfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzNfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzNfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzRfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzRfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzRfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzVfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzVfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzVfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzZfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzZfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzZfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzdfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzdfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfRU5HSU5FXzdfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzI4MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzBfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzBfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzBfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzFfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzFfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzFfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzJfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzJfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzJfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzNfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzNfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzNfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzRfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzRfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzRfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzVfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzVfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzVfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzZfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzZfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzZfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzdfU1cgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzdfR1JBUEhJQ1MgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfRU5HSU5FXzdfRFZEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfTUVUSE9EKGkpICAgICAgICAgICAgICAgICgweDAwMDAzMTAwKyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfTUVUSE9EX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfTUVUSE9EX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfTUVUSE9EX1NVQkNIQU5ORUwgICAgICAgICAgICAgICAgICAgICAxNToxMyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EKGkpICAgICAgICAgICAgICAgICgweDAwMDAzODAwKyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MiAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EX1NVQkNIQU5ORUwgICAgICAgICAgICAgICAgICAgICAxNToxMyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EX0FMSUFTKGkpICAgICAgICAgICgweDAwMDAzQzAwKyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfTUVUSE9EX0FMSUFTX19TSVpFXzEgICAgICAgICAgICAgICAgICAgIDEyOCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfREFUQShpKSAgICAgICAgICAgICAgICAgICgweDAwMDAzMTA0KyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfREFUQV9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTBfREFUQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfREFUQShpKSAgICAgICAgICAgICAgICAgICgweDAwMDAzODA0KyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfREFUQV9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfREFUQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfREFUQV9BTElBUyhpKSAgICAgICAgICAgICgweDAwMDAzQzA0KyhpKSo4KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QRklGT19DQUNIRTFfREFUQV9BTElBU19fU0laRV8xICAgICAgICAgICAgICAgICAgICAgIDEyOCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0UoaSkgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDAyODAwKyhpKSo0KSAvKiBSLS00QSAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0VfX1NJWkVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0VfQ0hJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MCAvKiBSLS1VRiAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0VfU1dJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0VfU1dJVENIX1VOQVZBSUxBQkxFICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19ERVZJQ0VfU1dJVENIX0FWQUlMQUJMRSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQwMCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX1JBTk9VVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX1JBTk9VVF9GQUxTRSAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX1JBTk9VVF9UUlVFICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0xPV19NQVJLICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0xPV19NQVJLX05PVF9FTVBUWSAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0xPV19NQVJLX0VNUFRZICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0hJR0hfTUFSSyAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLS1WRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0hJR0hfTUFSS19OT1RfRlVMTCAgICAgICAgMHgwMDAwMDAwMCAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfU1RBVFVTX0hJR0hfTUFSS19GVUxMICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfUFVUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfUFVUX0FERFJFU1NfX1NJWkVfMCAgICAgICAgICAgICAgICAgICAgIDg6MyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfUFVUX0FERFJFU1NfX1NJWkVfMSAgICAgICAgICAgICAgICAgICAgMTI6MyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfR0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQyMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QRklGT19SVU5PVVRfR0VUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MyAvKiBSV1hVRiAqLwotLyogZGV2X2dyYXBoaWNzLnJlZiAqLwotI2RlZmluZSBOVl9QR1JBUEggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDFGRkY6MHgwMDQwMDAwMCAvKiBSVy0tRCAqLwotI2RlZmluZSBOVl9QR1JBUEhfREVCVUdfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDA4MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfREVCVUdfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDA4NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfREVCVUdfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDA4OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfREVCVUdfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDA4QyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfSU5UUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDEwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfSU5UUl9OT1RJRlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfSU5UUl9OT1RJRllfTk9UX1BFTkRJTkcgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfSU5UUl9OT1RJRllfUEVORElORyAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfSU5UUl9OT1RJRllfUkVTRVQgICAgICAgICA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TlNUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDEwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19TVEFURV9JTl9VU0UgICAgICAgICAgICAgICAgICAgICAgICAxMToxMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19TVEFURV9JTl9VU0VfTk9UX1BFTkRJTkcgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19TVEFURV9JTl9VU0VfUEVORElORyAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19JTlZBTElEX1NUQVRFICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19JTlZBTElEX1NUQVRFX05PVF9QRU5ESU5HICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19JTlZBTElEX1NUQVRFX1BFTkRJTkcgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19CQURfQVJHVU1FTlQgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19CQURfQVJHVU1FTlRfTk9UX1BFTkRJTkcgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19CQURfQVJHVU1FTlRfUEVORElORyAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTlNUQVRVU19QUk9URUNUSU9OX0ZBVUxUICAgICAgICAgICAgICAg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CTEVEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX0NPTlRST0xfREVWSUNFX0VOQUJMRUQgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX1VTRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDE3NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX1VTRVJfU1VCQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX1VTRVJfU1VCQ0hfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX1VTRVJfQ0hJRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ1RYX1VTRVJfQ0hJRF8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcyMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRklGT19BQ0NFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRklGT19BQ0NFU1NfRElTQUJMRUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRklGT19BQ0NFU1NfRU5BQkxFRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZ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SV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcwMCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1NUQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1NUQVRFX0lETEUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1NUQVRFX0JVU1kgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1hZX0xPR0lDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1hZX0xPR0lDX0lETEUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1hZX0xPR0lDX0JVU1kgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0ZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NSAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0ZFX0lETEUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0ZFX0JVU1kgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JBU1RFUklaRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NiAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JBU1RFUklaRVJfSURMRSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JBU1RFUklaRVJfQlVTWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfTk9USUZZICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfTk9USUZZX0lETEUgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfTk9USUZZX0JVU1kgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfUkVHSVNURVIgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfUkVHSVNURVJfSURMRSAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfUkVHSVNURVJfQlVTWSAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfRE1BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfRE1BX0lETEUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwot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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNCAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0QzRF9JRExFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0QzRF9CVVNZICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0NBQ0hFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNSAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0NBQ0hFX0lETEUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0NBQ0hFX0JVU1kgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0xJR0hUSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNiAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0xJR0hUSU5HX0lETEUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX0xJR0hUSU5HX0JVU1kgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BSRVJPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNyAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BSRVJPUF9JRExFICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BSRVJPUF9CVVNZICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoyOCAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JPUF9JRExFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1JPUF9CVVNZICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfVVNFUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOSAvKiBSLUlWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfVVNFUl9JRExFICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSLUktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVFVTX1BPUlRfVVNFUl9CVVNZICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSLS0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9BRERSICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcwNCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9BRERSX01USEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MiAvKiBSLVhVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9BRERSX1NVQkNIICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMyAvKiBSLVhVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9BRERSX0NISUQgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNCAvKiBSLVhVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcwOCAvKiBSLS00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfVFJBUFBFRF9EQVRBX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1VSRkFDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcwQyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1VSRkFDRV9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1VSRkFDRV9UWVBFX0lOVkFMSUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1VSRkFDRV9UWVBFX05PTl9TV0laWkxFICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1VSRkFDRV9UWVBFX1NXSVpaTEUgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcxNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9SRVEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9SRVFfTk9UX1BFTkRJTkcgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9SRVFfUEVORElORyAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9TVFlMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9TVFlMRV9XUklURV9PTkxZICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX0JVRkZFUl9TVFlMRV9XUklURV9USEVOX0FXQUtFTiAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1JFUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1JFUV9OT1RfUEVORElORyAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1JFUV9QRU5ESU5HICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1NUWUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1NUWUxFX1dSSVRFX09OTFkgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTk9USUZZX1NUWUxFX1dSSVRFX1RIRU5fQVdBS0VOICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVChpKSAgICAgICAgICAgICAgICAgICAgICgweDAwNDAwNjQwKyhpKSo0KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVF9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVF9MSU5BRFJTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVF9MSU5BRFJTXzAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY0MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDBfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCgwKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDBfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDBfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY0NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDFfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCgxKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDFfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDFfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY0OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDJfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCgyKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDJfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDJfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY0QyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDNfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCgzKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDNfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDNfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY1MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDRfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCg0KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDRfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDRfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY1NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDVfX0FMSUFTXzEgICAgICAgICAgICBOVl9QR1JBUEhfQk9GRlNFVCg1KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDVfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQk9GRlNFVDVfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UoaSkgICAgICAgICAgICAgICAgICAgICAgICgweDAwNDAwNjU4KyhpKSo0KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0VfX1NJWkVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0VfTElOQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0VfTElOQURSU18wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY1OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UwX19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSgwKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UwX0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UwX0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY1YyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UxX19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSgxKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UxX0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UxX0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY2MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UyX19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSgyKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UyX0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UyX0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY2NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UzX19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSgzKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UzX0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0UzX0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY2OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U0X19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSg0KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U0X0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U0X0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY2QyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U1X19BTElBU18xICAgICAgICAgICAgICAgIE5WX1BHUkFQSF9CQkFTRSg1KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U1X0xJTkFEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkJBU0U1X0xJTkFEUlNfMCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIKGkpICAgICAgICAgICAgICAgICAgICAgICgweDAwNDAwNjcwKyhpKSo0KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIX1ZBTFVFXzAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY3MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMF9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JQSVRDSCgwKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMF9WQUxVRV8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY3NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMV9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JQSVRDSCgxKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMV9WQUxVRV8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY3OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMl9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JQSVRDSCgyKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMl9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMl9WQUxVRV8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY3QyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIM19fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JQSVRDSCgzKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIM19WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENIM19WQUxVRV8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENINCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY4MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENINF9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JQSVRDSCg0KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENINF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJVENINF9WQUxVRV8wICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUKGkpICAgICAgICAgICAgICAgICAgICAgICgweDAwNDAwNjg0KyhpKSo0KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUX1RZUEVfSU5fTUVNT1JZICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUX1RZUEVfTlVMTCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY4NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMF9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCgwKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMF9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMF9UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMF9UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY4OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMV9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCgxKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMV9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMV9UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMV9UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY4YyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMl9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCgyKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMl9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMl9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMl9UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMl9UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY5MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUM19fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCgzKSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUM19WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUM19UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUM19UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUM19UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY5NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNF9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCg0KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNF9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNF9UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNF9UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY5OCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNV9fQUxJQVNfMSAgICAgICAgICAgICAgTlZfUEdSQVBIX0JMSU1JVCg1KSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNV9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNV9UWVBFX0lOX01FTU9SWSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxJTUlUNV9UWVBFX05VTEwgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEUyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDY5YyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEUyX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOToxNiAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEUyX1dJRFRIXzAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEUyX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNCAvKiBSV0lVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEUyX0hFSUdIVF8wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEU1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDZhMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlNXSVpaTEU1X1dJRFRIICAgICAgICAgICAgICAgICAgIC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MDAwMDBiIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEgyX0E4UjhHOEI4ICAgICAgICAgICAgICAgICAweDAwMDAwMDBjIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEgyX1kzMiAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBkIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEgyX1Y4WUI4VThZQTggICAgICAgICAgICAgICAweDAwMDAwMDBlIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEgyX1lCOFY4WUE4VTggICAgICAgICAgICAgICAweDAwMDAwMDBmIC8qIFJXLS1WICovIAotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIM19JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIM19ZOCAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIM19YMVI1RzVCNV9aMVI1RzVCNSAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIM19YMVI1RzVCNV9PMVI1RzVCNSAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQlBJWEVMX0RFUFRIM19BMVI1RzVCNSAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1J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ovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEg1X0E4UjhHOEI4ICAgICAgICAgICAgICAgICAweDAwMDAwMDBjIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEg1X1kzMiAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDBkIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEg1X1Y4WUI4VThZQTggICAgICAgICAgICAgICAweDAwMDAwMDBlIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BHUkFQSF9CUElYRUxfREVQVEg1X1lCOFY4WUE4VTggICAgICAgICAgICAgICAweDAwMDAwMDBmIC8qIFJXLS1WICovIAotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVggICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfQURSU18wICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfQkxJVCAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfQkxJVF9OT19WSU9MICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfQkxJVF9WSU9MICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfTElNSVQgICAgICAgICAgICAgICAgICAgICAgICAzMDozMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfTElNSVRfTk9fVklPTCAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfTElNSVRfVklPTCAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfT1ZSRkxXICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfT1ZSRkxXX05PX1ZJT0wgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9QSVhfT1ZSRkxXX1ZJT0wgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYxNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX0FEUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX0FEUlNfMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX0xJTUlUICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX0xJTUlUX05PX1ZJT0wgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX0xJTUlUX1ZJT0wgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX09WUkZMVyAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX09WUkZMV19OT19WSU9MICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTElNSVRfVklPTF9aX09WUkZMV19WSU9MICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzBfSU5WQUxJRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzBfVkFMSUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzFfSU5WQUxJRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzFfVkFMSUQgICAgICAgICAgICAgICAgICAg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l9QR1JBUEhfU1RBVEVfQlVGRkVSXzVfSU5WQUxJRCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQlVGRkVSXzVfVkFMSUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMF9JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMF9WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMV9JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMV9WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMl9JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMl9WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMSAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfM19JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfM19WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfNF9JTlZBTElEICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUElUQ0hfNF9WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQ0hST01BX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNiAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQ0hST01BX0NPTE9SX0lOVkFMSUQgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQ0hST01BX0NPTE9SX1ZBTElEICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfQ0hST01BX0NPTE9SRk1UICAgICAgICAgICAgICAgICAgICAgICAxNzoxNyAvKiBSV0lWRiAqLwotI2RlZmlu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EVSTl9QQVRUMSAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNyAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUEFUVEVSTl9QQVRUMV9JTlZBTElEICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RBVEVfUEFUVEVSTl9QQVRUMV9WQUxJRCAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcyOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQkFOSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQkFOS18xMCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQkFOS18zMiAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MyAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfQURSU18xMDI0ICAgICAgICAgICAgICAgICAgMHgwMDAwMDQwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxMyAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfT1BfV1JfQ0FDSEUgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfT1BfUkRfQ0FDSEUgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfSU5ERVhfT1BfUkRfSU5ERVggICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDcyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0FDSEVfUkFNX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRE1BX1BJVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDc2MCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRE1BX1BJVENIX1MwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MCAvKiBSV1hTRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRE1BX1BJVENIX1MxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNiAvKiBSV1hTRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFZEX0NPTE9SRk1UICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDc2NCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFZEX0NPTE9SRk1UX0lNQUdFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6MCAvKiBSV05WRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFZEX0NPT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KSAvKiBSLS00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVF9DT0xPUlJBTV9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICA2NCAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVF9DT0xPUlJBTV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSLS1VRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTihpKSAgICAgICAgICAgICAgICAgICAgICgweDAwNDAwODA4KyhpKSo0KSAvKiBSVy00QSAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9CSVRNQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgxMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9WQUxVRV84WF84WSAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9WQUxVRV82NFhfMVkgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9WQUxVRV8xWF82NFkgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9TRUxFQ1RfMkNPTE9SICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfUEFUVEVSTl9TSEFQRV9TRUxFQ1RfRlVMTENPTE9SICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfTU9OT19DT0xPUjAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYwMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfTU9OT19DT0xPUjBfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUk9QMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYwNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfUk9QM19WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0hST01BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgxNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ0hST01BX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkVUQV9BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYwOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkVUQV9BTkRfVkFMVUVfRlJBQ1RJT04gICAgICAgICAgICAgICAgICAgICAzMDoyMyAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkVUQV9QUkVNVUxUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYwYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkVUQV9QUkVNVUxUX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hVRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ09OVFJPTDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgxOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ09OVFJPTDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgxYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQ09OVFJPTDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfQkxFTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyNCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fSU5ERVhfQURSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6MCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fSU5ERVhfQURSU18wICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fSU5ERVhfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6OCAvKiBSV0lWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fSU5ERVhfU0VMRUNUX0FEUlNfMCAgICAgIC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qLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQURSU18wX19BTElBU18xICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQURSU18wX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQURSU18xICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQURSU18xX19BTElBU18xICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQURSU18xX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8wX19BTElBU18xICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8wX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8xX19BTElBU18xICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fREFUQV8xX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMF9fQUxJQVNfMSAgICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMV9fQUxJQVNfMSAgICAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fV0VfMV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMF9fQUxJQVNfMSAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgyYyAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMV9fQUxJQVNfMSAgICAgICBOVl9QR1JBUEhfRFBSQU1fREFUQSAvKiAgICAgICAqLwotI2RlZmluZSBOVl9QR1JBUEhfRFBSQU1fQUxQSEFfMV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RPUkVEX0ZNVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDgzMCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RPUkVEX0ZNVF9NT05PMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6MCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RPUkVEX0ZNVF9QQVRUMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6OCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RPUkVEX0ZNVF9QQVRUMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToxNiAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfU1RPUkVEX0ZNVF9DSFJPTUEgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyNCAvKiBSV1hWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDYxOCAvKiBSVy00UiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfWTggICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfUkdCMTUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfUkdCMTYgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfWTE2ICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMyAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfSU5WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNCAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfUkdCMjQgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNSAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfUkdCMzAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNiAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19ST1BfWTMyICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNyAvKiAtVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6NCAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfSU5WQUxJRCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWTggICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDE2QThZOCAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDI0WTggICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfQTFSNUc1QjUgICAgICAgICAgICAgICAgMHgwMDAwMDAwNiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDFSNUc1QjUgICAgICAgICAgICAgICAgMHgwMDAwMDAwNyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDE2QTFSNUc1QjUgICAgICAgICAgICAgMHgwMDAwMDAwOCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDE3UjVHNUI1ICAgICAgICAgICAgICAgMHgwMDAwMDAwOSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfUjVHNkI1ICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwQSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfQTE2UjVHNkI1ICAgICAgICAgICAgICAgMHgwMDAwMDAwQiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDE2UjVHNkI1ICAgICAgICAgICAgICAgMHgwMDAwMDAwQyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfQThSOEc4QjggICAgICAgICAgICAgICAgMHgwMDAwMDAwRCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDhSOEc4QjggICAgICAgICAgICAgICAgMHgwMDAwMDAwRSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWTE2ICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwRiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfQTE2WTE2ICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWDE2WTE2ICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfVjhZQjhVOFlBOCAgICAgICAgICAgICAgMHgwMDAwMDAxMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWUI4VjhZQThVOCAgICAgICAgICAgICAgMHgwMDAwMDAxMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19TUkNfTEVfWTMyICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxNCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxMiAvKiBSLVhWRiAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9JTlZBTElEICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMCAvKiBSV0ktViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9ZOCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YMVI1RzVCNV9aMVI1RzVCNSAgICAgICAgICAgMHgwMDAwMDAwMiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YMVI1RzVCNV9PMVI1RzVCNSAgICAgICAgICAgMHgwMDAwMDAwMyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9BMVI1RzVCNSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9SNUc2QjUgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9ZMTYgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YOFI4RzhCOF9aOFI4RzhCOCAgICAgICAgICAgMHgwMDAwMDAwNyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YOFI4RzhCOF9PMVo3UjhHOEI4ICAgICAgICAgMHgwMDAwMDAwOCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YMUE3UjhHOEI4X1oxQTdSOEc4QjggICAgICAgMHgwMDAwMDAwOSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YMUE3UjhHOEI4X08xQTdSOEc4QjggICAgICAgMHgwMDAwMDAwYSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9YOFI4RzhCOF9POFI4RzhCOCAgICAgICAgICAgMHgwMDAwMDAwYiAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9BOFI4RzhCOCAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwYyAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9ZMzIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwZCAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9WOFlCOFU4WUE4ICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwZSAvKiBSVy0tViAqLwotI2RlZmluZSBOVl9QR1JBUEhfRk9STUFUU19GQl9ZQjhWOFlBOFU4ICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwZiAvKiBSVy0tViAqLyAKLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19YX1JBTShpKSAgICAgICAgICAgICAgICAgICAoMHgwMDQwMDQwMCsoaSkqNCkgLyogUlctNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19YX1JBTV9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19YX1JBTV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfUkFNX0JQT1JUKGkpICAgICAgICAgICAgICAgICAoMHgwMDQwMGMwMCsoaSkqNCkgLyogUi0tNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfUkFNX0JQT1JUX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfUkFNX0JQT1JUX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUi0tVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19ZX1JBTShpKSAgICAgICAgICAgICAgICAgICAoMHgwMDQwMDQ4MCsoaSkqNCkgLyogUlctNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19ZX1JBTV9fU0laRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19ZX1JBTV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfUkFNX0JQT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SVUUgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hZX0xPR0lDX01JU0MzX1RFWFRfRElNWCAgICAgICAgICAgICAgICAgICAgMjI6MTYgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hZX0xPR0lDX01JU0MzX1RFWFRfRElNWF8wICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hZX0xPR0lDX01JU0MzX1RFWFRfV0RJTVggICAgICAgICAgICAgICAgICAgMzA6MjQgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hZX0xPR0lDX01JU0MzX1RFWFRfV0RJTVhfMCAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1MDAgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18wXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18xXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18yXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19CSVQzM18zXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8wXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8xXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8yXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19SQU5HRV8zXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19BRERFUl9PVVRQVVQgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjggLyogUldYVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19BRERFUl9PVVRQVVRfRVFfMCAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19BRERFUl9PVVRQVVRfTFRfMCAgICAgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1hfTUlTQ19BRERFUl9PVVRQVVRfR1RfMCAgICAgICAgICAgICAgIDB4MDAwMDAwMDIgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1MDQgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18wXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18xXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18yXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19CSVQzM18zXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8wXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8xXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8yXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1lfTUlTQ19SQU5HRV8zXzAgICAgICAgICAgICAgICAgICAgICAgIDB4M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AgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1MEMgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1NPVVJDRV9DT0xPUl9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1NPVVJDRV9DT0xPUl9WQUxVRV8wICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1MDggLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9WTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjAgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9WTERfMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01JTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MjggLyogUldJVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01JTl9OT19FUlJPUiAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldJLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01JTl9PTkxZICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkgLyogUldJVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NSU5fTk9fRVJST1IgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldJLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NSU5fT05MWSAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzA6MzAgLyogUldJVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01BWF9OT19FUlJPUiAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldJLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQX01BWF9PTkxZICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NQVggICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEgLyogUldJVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NQVhfTk9fRVJST1IgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldJLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMV9DTElQQV9NQVhfT05MWSAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEgLyogUlctLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1NzggLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMl9WTEQyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjAgLyogUldOVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZBTElEMl9WTEQyXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAgLyogUldOLVYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0FCU19JQ0xJUF9YTUFYICAg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ctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01JU0MyNF8xX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01JU0MyNF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1NzQgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01JU0MyNF8yX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1N0MgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzBfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1ODAgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzFfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDA1ODQgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1BBU1NUSFJVXzJfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1VfUkFNKGkpICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDQwMGQwMCsoaSkqNCkgLyogUlctNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1VfUkFNX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1VfUkFNX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjYgLyogUldYRkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZfUkFNKGkpICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDQwMGQ0MCsoaSkqNCkgLyogUlctNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZfUkFNX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX1ZfUkFNX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjYgLyogUldYRkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01fUkFNKGkpICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDQwMGQ4MCsoaSkqNCkgLyogUlctNEEgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01fUkFNX19TSVpFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYgLyogICAgICAgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX01fUkFNX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjYgLyogUldYRkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9TVEFSVF8wICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMDAgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9TVEFSVF8wX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9TVEFSVF8xICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMDQgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9TVEFSVF8xX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9MRU5HVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMDggLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9MRU5HVEhfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9NSVNDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMEMgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9NSVNDX0NPVU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9NSVNDX0ZNVF9TUkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTYgLyogUldYVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9NSVNDX0ZNVF9EU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjAgLyogUldYVkYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9EQVRBXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMjAgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9EQVRBXzBfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAgLyogUldYVUYgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9EQVRBXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwMjQgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9EQVRBXzFfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgIC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9CX1lfU0laRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA0MDEwQTAgLyogUlctNFIgKi8KLSNkZWZpbmUgTlZfUEdSQVBIX0RNQV9CX1lfU0laRV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAgLyogUldYVUYgKi8KLQotLyogRnJhbWVidWZmZXIgcmVnaXN0ZXJzICovCi0jZGVmaW5lIE5WX1BGQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwMEZGRjoweDAwMTAwMDAwIC8qIFJXLS1EICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAwMDAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX0FNT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTowIC8qIFJXLVZGICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX0FNT1VOVF8zMk1CICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX0FNT1VOVF80TUIgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX0FNT1VOVF84TUIgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX0FNT1VOVF8xNk1CICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAzIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1dJRFRIXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyIC8qIFJXLVZGICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1dJRFRIXzEyOF9PRkYgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1dJRFRIXzEyOF9PTiAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDozIC8qIFJXLVZGICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1RZUEVfMjU2SyAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1RZUEVfNTEyS18yQkFOSyAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1RZUEVfNTEyS180QkFOSyAgICAgICAgICAgICAgICAweDAwMDAwMDAyIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9CT09UXzBfUkFNX1RZUEVfMTAyNEtfMkJBTksgICAgICAgICAgICAgICAweDAwMDAwMDAzIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAwMjAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDowIC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfRklYRURfOEJQUCAgICAgICAgICAweDAwMDAwMTIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfRklYRURfMTZCUFAgICAgICAgICAweDAwMDAwMjIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfRklYRURfMzJCUFAgICAgICAgICAweDAwMDAwMzIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfVkFSXzhCUFAgICAgICAgICAgICAweDAwMDA0MTIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfVkFSXzE2QlBQICAgICAgICAgICAweDAwMDA0MjIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX09MRDEwMjRfVkFSXzMyQlBQICAgICAgICAgICAweDAwMDA0MzIwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX1RFVFJJUyAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9UWVBFX05PVElMSU5HICAgICAgICAgICAgICAgICAgICAweDAwMDAxMTE0IC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE1IC8qIFJXSS1GICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV9QQVNTICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV8xICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV8yICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV8zICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAzIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV80ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA0IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV81ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA1IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV82ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA2IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfTU9ERV83ICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA3IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE4IC8qIFJXSS1GICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfU0hJRlRfMCAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfU0hJRlRfMSAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9URVRSSVNfU0hJRlRfMiAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9CQU5LX1NXQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIwIC8qIFJXSS1GICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9CQU5LX1NXQVBfT0ZGICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9CQU5LX1NXQVBfMU0gICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9CQU5LX1NXQVBfMk0gICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA1IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9CQU5LX1NXQVBfNE0gICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDA3IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9VTlVTRUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzIC8qIFJXLVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9TQ1JBTUJMRV9FTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5IC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9TQ1JBTUJMRV9FTl9JTklUICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9TQ1JBTUJMRV9BQ1RJVkUgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4IC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1JfSU5JVCAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1JfRElTQUJMRUQgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1JfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI0IC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1JfTUFTS19JTklUICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9QUkFNSU5fV1JfTUFTS19DTEVBUiAgICAgICAgICAgICAweDAwMDAwMDBmIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAwMjA0IC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BGQl9SVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAwMzAwIC8qIFJXLTRSICovCi0jZGVmaW5lIE5WX1BGQl9SVExfSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BGQl9SVExfSF9ERUZBVUxUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9SVExfTUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BGQl9SVExfTUNfREVGQVVMVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9SVExfViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BGQl9SVExfVl9ERUZBVUxUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9SVExfRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozIC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BGQl9SVExfR19ERUZBVUxUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9SVExfR0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0IC8qIFJXSVVGICovCi0jZGVmaW5lIE5WX1BGQl9SVExfR0JfREVGQVVMVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTowIC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzMyMF9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDBhIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzQwMF9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDBkIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzQ4MF9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDBmIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzUxMl9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDEwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzY0MF9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDE0IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUSU9OXzgwMF9QSVhFTFMgICAgICAgICAgICAweDAwMDAwMDE5IC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9SRVNPTFVUS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AxIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9USUxJTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyIC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9USUxJTkdfRU5BQkxFRCAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMF9USUxJTkdfRElTQUJMRUQgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMV9TR1JBTTEwMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozIC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMV9TR1JBTTEwMF9FTkFCTEVEICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXSS1WICovCi0jZGVmaW5lIE5WX1BGQl9DT05GSUdfMV9TR1JBTTEwMF9ESVNBQkxFRCAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9ERUJVR18wX0NLRV9BTFdBWVNPTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5IC8qIFJXSVZGICovCi0jZGVmaW5lIE5WX1BGQl9ERUJVR18wX0NLRV9BTFdBWVNPTl9PRkYgICAgICAgICAgICAgICAgICAweDAwMDAwMDAwIC8qIFJXLS1WICovCi0jZGVmaW5lIE5WX1BGQl9ERUJVR18wX0NLRV9BTFdBWVNPTl9PTiAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxIC8qIFJXSS1WICovCi0KLSNkZWZpbmUgTlZfUEVYVERFViAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTAxRkZGOjB4MDAxMDEwMDAgLyogUlctLUQgKi8KLSNkZWZpbmUgTlZfUEVYVERFVl9CT09UXzAgICAgICA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E5WX1BOVk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMUZGRkZGRjoweDAxMDAwMDAwIC8qIFJXLS1NICovCi0vKiNkZWZpbmUgTlZfUE5WTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwQkZGRkZGOjB4MDA4MDAwMDAqLwotI2RlZmluZSBOVl9DSEFOMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MGZmZmY6MHgwMDgwMDAwMAotCi0vKiBGSUZPIHN1YmNoYW5uZWxzICovCi0jZGVmaW5lIE5WX1VST1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MwotI2RlZmluZSBOVl9VQ0hST01BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTcKLSNkZWZpbmUgTlZfVUNMSVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE5Ci0jZGVmaW5lIE5WX1VQQVRUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOAotI2RlZmluZSBOVl9VTElOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NUMKLSNkZWZpbmUgTlZfVVRSSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDVECi0jZGVmaW5lIE5WX1VSRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1RQotI2RlZmluZSBOVl9VQkxJVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NUYKLSNkZWZpbmUgTlZfVUdMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDRCCi0KLSNlbmRpZiAvKl9fTlY0UkVGX0hfXyovCi0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvdmlkZW8vcml2YS9udl9kcml2ZXIuYyBiL2RyaXZlcnMvdmlkZW8vcml2YS9udl9kcml2ZXIuYwppbmRleCBiZTYzMGEwLi5hMTEwMjY4IDEwMDY0NAotLS0gYS9kcml2ZXJzL3ZpZGVvL3JpdmEvbnZfZHJpdm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5oPgorI2luY2x1ZGUgPGxpbnV4L3ZlcnNpb24uaD4KKyNpbmNsdWRlIDxsaW51eC9wY2kuaD4KKyNpbmNsdWRlIDxhc20vYXRvbWljLmg+CisjaW5jbHVkZSA8bGludXgvbXV0ZXguaD4KKworI2RlZmluZSBWTUxfREVWSUNFX0dQVSAweDUwMDIKKyNkZWZpbmUgVk1MX0RFVklDRV9WREMgMHg1MDA5CisKKyNkZWZpbmUgVk1MX1ZSQU1fQVJFQVMgMworI2RlZmluZSBWTUxfTUFYX1hSRVMgMTAyNAorI2RlZmluZSBWTUxfTUFYX1lSRVMgNzY4CisjZGVmaW5lIFZNTF9NQVhfWFJFU19WSVJUVUFMIDEwNDAKKworLyoKKyAqIERpc3BsYXkgY29udHJvbGxlciByZWdpc3RlcnM6CisgKi8KKworLyogRGlzcGxheSBjb250cm9sbGVyIDEwLWJpdCBjb2xvciByZXByZXNlbnRhdGlvbiAqLworCisjZGVmaW5lIFZNTF9SX01BU0sgICAgICAgICAgICAgICAgICAgMHgzRkYwMDAwMAorI2RlZmluZSBWTUxfUl9TSElGVCAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIFZNTF9HX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDBGRkMwMAorI2RlZmluZSBWTUxfR19TSElGVCAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFZNTF9CX01BU0sgICAgICAgICAgICAgICAgICAgMHgwMDAwMDNGRgorI2RlZmluZSBWTUxfQl9TSElGVCAgICAgICAgICAgICAgICAgIDAKKworLyogR3JhcGhpY3MgcGxhbmUgY29udHJvbCAqLworI2RlZmluZSBWTUxfRFNQQ0NOVFIgICAgICAgICAgICAgICAgIDB4MDAwNzIxODAKKyNkZWZpbmUgVk1MX0dGWF9FTkFCTEUgICAgICAgICAgICAgICAweDgwMDAwMDAwCisjZGVmaW5lIFZNTF9HRlhfR0FNTUFCWVBBU1MgICAgICAgICAgMHg0MDAwMDAwMAorI2RlZmluZSBWTUxfR0Z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KQpAQCAtMjczLDggKzMwOSw5IEBACiAJaW50IGVycjsKIAogCWVyciA9IHVubGluayhmaWxlKTsKLQlpZihlcnIpIHJldHVybigtZXJybm8pOwotCXJldHVybigwKTsKKwlpZihlcnIpCisJCXJldHVybiAtZXJybm87CisJcmV0dXJuIDA7CiB9CiAKIGludCBkb19ta2Rpcihjb25zdCBjaGFyICpmaWxlLCBpbnQgbW9kZSkKQEAgLTI4Miw4ICszMTksOSBAQAogCWludCBlcnI7CiAKIAllcnIgPSBta2RpcihmaWxlLCBtb2RlKTsKLQlpZihlcnIpIHJldHVybigtZXJybm8pOwotCXJldHVybigwKTsKKwlpZihlcnIpCisJCXJldHVybiAtZXJybm87CisJcmV0dXJuIDA7CiB9CiAKIGludCBkb19ybWRpcihjb25zdCBjaGFyICpmaWxlKQpAQCAtMjkxLDggKzMyOSw5IEBACiAJaW50IGVycjsKIAogCWVyciA9IHJtZGlyKGZpbGUpOwotCWlmKGVycikgcmV0dXJuKC1lcnJubyk7Ci0JcmV0dXJuKDApOworCWlmKGVycikKKwkJcmV0dXJuIC1lcnJubzsKKwlyZXR1cm4gMDsKIH0KIAogaW50IGRvX21rbm9kKGNvbnN0IGNoYXIgKmZpbGUsIGludCBtb2RlLCB1bnNpZ25lZCBpbnQgbWFqb3IsIHVuc2lnbmVkIGludCBtaW5vcikKQEAgLTMwMCw4ICszMzksOSBAQAogCWludCBlcnI7CiAKIAllcnIgPSBta25vZChmaWxlLCBtb2RlLCBtYWtlZGV2KG1ham9yLCBtaW5vcikpOwotCWlmKGVycikgcmV0dXJuKC1lcnJubyk7Ci0JcmV0dXJuKDApOworCWlmKGVycikKKwkJcmV0dXJuIC1lcnJubzsKKwlyZXR1cm4gMDsKIH0KIAogaW50IGxpbmtfZmlsZShjb25zdCBjaGFyICp0bywgY29uc3QgY2hhciAqZnJvbSkKQEAgLTMwOSw4ICszNDksOSBAQAogCWludCBlcnI7CiAKIAllcnIgPSBsaW5rKHRvLCBmcm9tKTsKLQlpZihlcnIpIHJldHVybigtZXJybm8pOwotCXJldHVybigwKTsKKwlpZihlcnIpCisJCXJldHVybiAtZXJybm87CisJcmV0dXJuIDA7CiB9CiAKIGludCBkb19yZWFkbGluayhjaGFyICpmaWxlLCBjaGFyICpidWYsIGludCBzaXplKQpAQCAtMzE5LDEwICszNjAsMTAgQEAKIAogCW4gPSByZWFkbGluayhmaWxlLCBidWYsIHNpemUpOwogCWlmKG4gPCAwKQotCQlyZXR1cm4oLWVycm5vKTsKKwkJcmV0dXJuIC1lcnJubzsKIAlpZihuIDwgc2l6ZSkKIAkJYnVmW25dID0gJ1wwJzsKLQlyZXR1cm4obik7CisJcmV0dXJuIG47CiB9CiAKIGludCByZW5hbWVfZmlsZShjaGFyICpmcm9tLCBjaGFyICp0bykKQEAgLTMzMCw4ICszNzEsOSBAQAogCWludCBlcnI7CiAKIAllcnIgPSByZW5hbWUoZnJvbSwgdG8pOwotCWlmKGVyciA8IDApIHJldHVybigtZXJybm8pOwotCXJldHVybigwKTsKKwlpZihlcnIgPCAwKQorCQlyZXR1cm4gLWVycm5vOworCXJldHVybiAwOwogfQogCiBpbnQgZG9fc3RhdGZzKGNoYXIgKnJvb3QsIGxvbmcgKmJzaXplX291dCwgbG9uZyBsb25nICpibG9ja3Nfb3V0LApAQCAtMzQ0LDcgKzM4Niw5IEBACiAJaW50IGVycjsKIAogCWVyciA9IHN0YXRmczY0KHJvb3QsICZidWYpOwotCWlmKGVyciA8IDApIHJldHVybigtZXJybm8pOworCWlmKGVyciA8IDApCisJCXJldHVybiAtZXJybm87CisKIAkqYnNpemVfb3V0ID0gYnVmLmZfYnNpemU7CiAJKmJsb2Nrc19vdXQgPSBidWYuZl9ibG9ja3M7CiAJKmJmcmVlX291dCA9IGJ1Zi5mX2JmcmVlOwpAQCAtMzYwLDE2ICs0MDQsNSBAQAogCXNwYXJlX291dFsyXSA9IGJ1Zi5mX3NwYXJlWzJdOwogCXNwYXJlX291dFszXSA9IGJ1Zi5mX3NwYXJlWzN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pdmVuIHZhbHVlCisgKiBAdjogcG9pbnRlciBvZiB0eXBlIGF0b21pY190CisgKiBAYTogdGhlIGFtb3VudCB0byBhZGQgdG8gdi4uLgorICogQHU6IC4uLnVubGVzcyB2IGlzIGVxdWFsIHRvIHUuCisgKgorICogQXRvbWljYWxseSBhZGRzIEBhIHRvIEB2LCBzbyBsb25nIGFzIGl0IHdhcyBub3QgQHUuCisgKiBSZXR1cm5zIG5vbi16ZXJvIGlmIEB2IHdhcyBub3QgQHUsIGFuZCB6ZXJvIG90aGVyd2lzZS4KKyAqLworc3RhdGljIF9faW5saW5lX18gaW50IGF0b21pY19hZGRfdW5sZXNzKGF0b21pY190ICp2LCBpbnQgYSwgaW50IHUpCit7CisJaW50IGMsIG9sZDsKKwljID0gYXRvbWljX3JlYWQodik7CisJZm9yICg7OykgeworCQlpZiAodW5saWtlbHkoYyA9PSAodSkpKQorCQkJYnJlYWs7CisJCW9sZCA9IGF0b21pY19jbXB4Y2hnKCh2KSwgYywgYyArIChhKSk7CisJCWlmIChsaWtlbHkob2xkID09IGMpKQorCQkJYnJlYWs7CisJCWMgPSBvbGQ7CisJfQorCXJldHVybiBjICE9ICh1KTsKK30KKwogI2RlZmluZSBhdG9taWNfaW5jX25vdF96ZXJvKHYpIGF0b21pY19hZGRfdW5sZXNzKCh2KSwgMSwgMCkKIAorLyoqCisgKiBhdG9taWM2NF9hZGRfdW5sZXNzIC0gYWRkIHVubGVzcyB0aGUgbnVtYmVyIGlzIGEgZ2l2ZW4gdmFsdWUKKyAqIEB2OiBwb2ludGVyIG9mIHR5cGUgYXRvbWljNjRfdAorICogQGE6IHRoZSBhbW91bnQgdG8gYWRkIHRvIHYuLi4KKyAqIEB1OiAuLi51bmxlc3MgdiBpcyBlcXVhbCB0byB1LgorICoKKyAqIEF0b21pY2FsbHkgYWRkcyBAYSB0byBAdiwgc28gbG9uZyBhcyBpdCB3YXMgbm90IEB1LgorICogUmV0dXJucyBub24temVybyBpZiBAdiB3YXMgbm90IE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KzE3LDcgQEAKICAqICAgICAgICAgICAgICAgICBmcm9tIC5zIGZpbGUgYnkgYXdrIC1mIHMyaC5hd2sKICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAqIENvcHlyaWdodCCpIEFSTSBMaW1pdGVkIDE5OTguICBBbGwgcmlnaHRzIHJlc2VydmVkLgorICogKiBDb3B5cmlnaHQgwqkgQVJNIExpbWl0ZWQgMTk5OC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLWFybS9hcmNoLWlvcDMyeC9nbGFudGFuay5oIGIvaW5jbHVkZS9hc20tYXJtL2FyY2gtaW9wMzJ4L2dsYW50YW5rLmgKaW5kZXggM2IwNjU2MS4uYmYwNjY1YSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9hc20tYXJtL2FyY2gtaW9wMzJ4L2dsYW50YW5rLmgKKysrIGIvaW5jbHVkZS9hc20tYXJtL2FyY2gtaW9wMzJ4L2dsYW50YW5rLmgKQEAgLTEsNSArMSw1IEBACiAvKgotICogaW5jbHVkZS9hc20vYXJjaC1pb3AzMngvZ2xhbnRhbmsuaAorICogaW5jbHVkZS9hc20tYXJtL2FyY2gtaW9wMzJ4L2dsYW50YW5rLmgKICAqCiAgKiBJTy1EYXRhIEdMQU4gVGFuayBib2FyZCByZWdpc3RlcnMKICAqLwpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20tYXJtL2FyY2gtaW9wMzJ4L24yMTAwLmggYi9pbmNsdWRlL2FzbS1hcm0vYXJjaC1pb3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WljNjRfZGVjX2FuZF90ZXN0KHYpOworfQorCitzdGF0aWMgaW5saW5lIGludCBhdG9taWNfbG9uZ19pbmNfYW5kX3Rlc3QoYXRvbWljX2xvbmdfdCAqbCkKK3sKKwlhdG9taWM2NF90ICp2ID0gKGF0b21pYzY0X3QgKilsOworCisJcmV0dXJuIGF0b21pYzY0X2luY19hbmRfdGVzdCh2KTsKK30KKworc3RhdGljIGlubGluZSBpbnQgYXRvbWljX2xvbmdfYWRkX25lZ2F0aXZlKGxvbmcgaSwgYXRvbWljX2xvbmdfdCAqbCkKK3sKKwlhdG9taWM2NF90ICp2ID0gKGF0b21pYzY0X3QgKilsOworCisJcmV0dXJuIGF0b21pYzY0X2FkZF9uZWdhdGl2ZShpLCB2KTsKK30KKworc3RhdGljIGlubGluZSBsb25nIGF0b21pY19sb25nX2FkZF9yZXR1cm4obG9uZyBpLCBhdG9taWNfbG9uZ190ICpsKQoreworCWF0b21pYzY0X3QgKnYgPSAoYXRvbWljNjRfdCAqKWw7CisKKwlyZXR1cm4gKGxvbmcpYXRvbWljNjRfYWRkX3JldHVybihpLCB2KTsKK30KKworc3RhdGljIGlubGluZSBsb25nIGF0b21pY19sb25nX3N1Yl9yZXR1cm4obG9uZyBpLCBhdG9taWNfbG9uZ190ICpsKQoreworCWF0b21pYzY0X3QgKnYgPSAoYXRvbWljNjRfdCAqKWw7CisKKwlyZXR1cm4gKGxvbmcpYXRvbWljNjRfc3ViX3JldHVybihpLCB2KTsKK30KKworc3RhdGljIGlubGluZSBsb25nIGF0b21pY19sb25nX2luY19yZXR1cm4oYXRvbWljX2xvbmdfdCAqbCkKK3sKKwlhdG9taWM2NF90ICp2ID0gKGF0b21pYzY0X3QgKilsOworCisJcmV0dXJuIChsb25nKWF0b21pYzY0X2luY19yZXR1cm4odik7Cit9CisKK3N0YXRpYyBpbmxpbmUgbG9uZyBhdG9taWNfbG9uZ19kZWNfcmV0dXJuKGF0b21pY19sb25nX3QgKmwpCit7CisJYXRvbWljNjRfdCAqdiA9IChhdG9taWM2NF90ICopbDsKKworCXJldHVybiAobG9uZylhdG9taWM2NF9kZWNfcmV0dXJuKHYpOworfQorCitzdGF0aWMgaW5saW5lIGxvbmcgYXRvbWljX2xvbmdfYWRkX3VubGVzcyhhdG9taWNfbG9uZ190ICpsLCBsb25nIGEsIGxvbmcgdSkKK3sKKwlhdG9taWM2NF90ICp2ID0gKGF0b21pYzY0X3QgKilsOworCisJcmV0dXJuIChsb25nKWF0b21pYzY0X2FkZF91bmxlc3ModiwgYSwgdSk7Cit9CisKKyNkZWZpbmUgYXRvbWljX2xvbmdfaW5jX25vdF96ZXJvKGwpIGF0b21pYzY0X2luY19ub3RfemVybygoYXRvbWljNjRfdCAqKShsKSkKKworI2RlZmluZSBhdG9taWNfbG9uZ19jbXB4Y2hnKGwsIG9sZCwgbmV3KSBcCisJKGF0b21pY19jbXB4Y2hnKChhdG9taWM2NF90ICopKGwpLCAob2xkKSwgKG5ldykpKQorI2RlZmluZSBhdG9taWNfbG9uZ194Y2hnKHYsIG5ldykgXAorCShhdG9taWNfeGNoZygoYXRvbWljNjRfdCAqKShsKSwgKG5ldykpKQorCiAjZWxzZSAgLyogIEJJVFNfUEVSX0xPTkcgPT0gNjQgICovCiAKIHR5cGVkZWYgYXRvbWljX3QgYXRvbWljX2xvbmdfdDsKQEAgLTExMyw2ICsxODMsNzYgQEAKIAlhdG9taWNfc3ViKGksIHYpOwogfQogCitzdGF0aWMgaW5saW5lIGludCBhdG9taWNfbG9uZ19zdWJfYW5kX3Rlc3QobG9uZyBpLCBhdG9taWNfbG9uZ190ICpsKQoreworCWF0b21pY190ICp2ID0gKGF0b21pY190ICopbDsKKworCXJldHVybiBhdG9taWNfc3ViX2FuZF90ZXN0KGksIHYpOworfQorCitzdGF0aWMgaW5saW5lIGludCBhdG9taWNfbG9uZ19kZWNfYW5kX3Rlc3QoYXRvbWljX2xvbmdfdCAqbCkKK3sKKwlhdG9taWNfdCAqdiA9IChhdG9taWNfdCAqKWw7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BvbGQ7CisJYyA9IGF0b21pY19yZWFkKHYpOworCWZvciAoOzspIHsKKwkJaWYgKHVubGlrZWx5KGMgPT0gKHUpKSkKKwkJCWJyZWFrOworCQlvbGQgPSBhdG9taWNfY21weGNoZygodiksIGMsIGMgKyAoYSkpOworCQlpZiAobGlrZWx5KG9sZCA9PSBjKSkKKwkJCWJyZWFrOworCQljID0gb2xkOworCX0KKwlyZXR1cm4gYyAhPSAodSk7Cit9CisKICNkZWZpbmUgYXRvbWljX2luY19ub3RfemVybyh2KSBhdG9taWNfYWRkX3VubGVzcygodiksIDEsIDApCiAKK3N0YXRpYyBfX2lubGluZV9fIGludCBhdG9taWM2NF9hZGRfdW5sZXNzKGF0b21pYzY0X3QgKnYsIGxvbmcgYSwgbG9uZyB1KQoreworCWxvbmcgYywgb2xkOworCWMgPSBhdG9taWM2NF9yZWFkKHYpOworCWZvciAoOzspIHsKKwkJaWYgKHVubGlrZWx5KGMgPT0gKHUpKSkKKwkJCWJyZWFrOworCQlvbGQgPSBhdG9taWM2NF9jbXB4Y2hnKCh2KSwgYywgYyArIChhKSk7CisJCWlmIChsaWtlbHkob2xkID09IGMpKQorCQkJYnJlYWs7CisJCWMgPSBvbGQ7CisJfQorCXJldHVybiBjICE9ICh1KTsKK30KKworI2RlZmluZSBhdG9taWM2NF9pbmNfbm90X3plcm8odikgYXRvbWljNjRfYWRkX3VubGVzcygodiksIDEsIDApCisKICNkZWZpbmUgYXRvbWljX2FkZF9yZXR1cm4oaSx2KQkJCQkJCVwKICh7CQkJCQkJCQkJXAogCWludCBfX2lhNjRfYWFyX2kgPSAoaSk7CQkJCQkJXApkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20taWE2NC9rZGVidWcuaCBiL2luY2x1ZGUvYXNtLWlhNjQva2RlYnVnLmgKaW5kZXggYWVkNzE0Mi4uYmEyMTFlMCAxMDA2NDQKLS0tIGEvaW5jbHVkZS9hc20taWE2NC9rZGVidWcuaAorKysgYi9pbmNsdWRlL2Fzb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SBhdG9taWNfYWRkX3VubGVzcyh2LCBhLCB1KQkJCQlcCi0oewkJCQkJCQkJXAotCWludCBjLCBvbGQ7CQkJCQkJXAotCWMgPSBhdG9taWNfcmVhZCh2KTsJCQkJCVwKLQl3aGlsZSAoYyAhPSAodSkgJiYgKG9sZCA9IGF0b21pY19jbXB4Y2hnKCh2KSwgYywgYyArIChhKSkpICE9IGMpIFwKLQkJYyA9IG9sZDsJCQkJCVwKLQljICE9ICh1KTsJCQkJCQlcCi19KQorc3RhdGljIF9faW5saW5lX18gaW50IGF0b21pY19hZGRfdW5sZXNzKGF0b21pY190ICp2LCBpbnQgYSwgaW50IHUpCit7CisJaW50IGMsIG9sZDsKKwljID0gYXRvbWljX3JlYWQodik7CisJZm9yICg7OykgeworCQlpZiAodW5saWtlbHkoYyA9PSAodSkpKQorCQkJYnJlYWs7CisJCW9sZCA9IGF0b21pY19jbXB4Y2hnKCh2KSwgYywgYyArIChhKSk7CisJCWlmIChsaWtlbHkob2xkID09IGMpKQorCQkJYnJlYWs7CisJCWMgPSBvbGQ7CisJfQorCXJldHVybiBjICE9ICh1KTsKK30KICNkZWZpbmUgYXRvbWljX2luY19ub3RfemVybyh2KSBhdG9taWNfYWRkX3VubGVzcygodiksIDEsIDApCiAKICNkZWZpbmUgYXRvbWljX2RlY19yZXR1cm4odikgYXRvbWljX3N1Yl9yZXR1cm4oMSwodikpCkBAIC02ODEsNiArNjg4LDM2IEBACiAJcmV0dXJuIHJlc3VsdDsKIH0KIAorI2RlZmluZSBhdG9taWM2NF9jbXB4Y2hnKHYsIG8sIG4pIFwKKwkoKChfX3R5cGVvZl9fKCh2KS0+Y291bnRlcikpKWNtcHhjaGcoJigodiktPmNvdW50ZXIpLCAobyksIChuKSkpCisjZGVmaW5lIGF0b21pYzY0X3hjaGcodiwgbmV3KSAoeGNoZygmKCh2KS0+Y291bnRlciksIChuZXcpKSkKKworLyoqCisgKiBhdG9taWM2NF9hZGRfdW5sZXNzIC0gYWRkIHVubGVzc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NoZygodiksIGMsIGMgKyAoYSkpKSAhPSBjKSBcCi0JCWMgPSBvbGQ7CQkJCQlcCi0JYyAhPSAodSk7CQkJCQkJXAotfSkKK3N0YXRpYyBfX2lubGluZV9fIGludCBhdG9taWNfYWRkX3VubGVzcyhhdG9taWNfdCAqdiwgaW50IGEsIGludCB1KQoreworCWludCBjLCBvbGQ7CisJYyA9IGF0b21pY19yZWFkKHYpOworCWZvciAoOzspIHsKKwkJaWYgKHVubGlrZWx5KGMgPT0gKHUpKSkKKwkJCWJyZWFrOworCQlvbGQgPSBhdG9taWNfY21weGNoZygodiksIGMsIGMgKyAoYSkpOworCQlpZiAobGlrZWx5KG9sZCA9PSBjKSkKKwkJCWJyZWFrOworCQljID0gb2xkOworCX0KKwlyZXR1cm4gYyAhPSAodSk7Cit9CisKICNkZWZpbmUgYXRvbWljX2luY19ub3RfemVybyh2KSBhdG9taWNfYWRkX3VubGVzcygodiksIDEsIDApCiAKICNkZWZpbmUgYXRvbWljX2FkZChpLHYpCSgodm9pZCkoX19hdG9taWNfYWRkX3JldHVybiggKChpbnQpaSksKHYpKSkpCkBAIC0yNzAsNiArMjc3LDM3IEBACiAjZGVmaW5lIGF0b21pYzY0X2RlY19hbmRfdGVzdCh2KQkoYXRvbWljNjRfZGVjX3JldHVybih2KSA9PSAwKQogI2RlZmluZSBhdG9taWM2NF9zdWJfYW5kX3Rlc3QoaSx2KQkoYXRvbWljNjRfc3ViX3JldHVybigoaSksKHYpKSA9PSAwKQogCisvKiBleHBvcnRlZCBpbnRlcmZhY2UgKi8KKyNkZWZpbmUgYXRvbWljNjRfY21weGNoZyh2LCBvLCBuKSBcCisJKChfX3R5cGVvZl9fKCh2KS0+Y291bnRlcikpY21weGNoZygmKCh2KS0+Y291bnRlciksIChvKSwgKG4pKSkKKyNkZWZpbmUgYXRvbWljNjRfeGNoZyh2LCBuZXcpICh4Y2hnKCYoKHYpLT5jb3VudGVyKSwgbmV3KSkKKworLyoqCisgKiBhdG9taWM2NF9h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IG9sZDsKK30KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBsb25nIF9fY21weGNoZ19sb2NhbCh2b2xhdGlsZSB2b2lkICpwdHIsCisJCQl1bnNpZ25lZCBsb25nIG9sZCwgdW5zaWduZWQgbG9uZyBuZXcsIGludCBzaXplKQoreworCXVuc2lnbmVkIGxvbmcgcHJldjsKKwlzd2l0Y2ggKHNpemUpIHsKKwljYXNlIDE6CisJCV9fYXNtX18gX192b2xhdGlsZV9fKCJjbXB4Y2hnYiAlYjEsJTIiCisJCQkJICAgICA6ICI9YSIocHJldikKKwkJCQkgICAgIDogInEiKG5ldyksICJtIigqX194ZyhwdHIpKSwgIjAiKG9sZCkKKwkJCQkgICAgIDogIm1lbW9yeSIpOworCQlyZXR1cm4gcHJldjsKKwljYXNlIDI6CisJCV9fYXNtX18gX192b2xhdGlsZV9fKCJjbXB4Y2hndyAldzEsJTIiCisJCQkJICAgICA6ICI9YSIocHJldikKKwkJCQkgICAgIDogInIiKG5ldyksICJtIigqX194ZyhwdHIpKSwgIjAiKG9sZCkKKwkJCQkgICAgIDogIm1lbW9yeSIpOworCQlyZXR1cm4gcHJldjsKKwljYXNlIDQ6CisJCV9fYXNtX18gX192b2xhdGlsZV9fKCJjbXB4Y2hnbCAlazEsJTIiCisJCQkJICAgICA6ICI9YSIocHJldikKKwkJCQkgICAgIDogInIiKG5ldyksICJtIigqX194ZyhwdHIpKSwgIjAiKG9sZCkKKwkJCQkgICAgIDogIm1lbW9yeSIpOworCQlyZXR1cm4gcHJldjsKKwljYXNlIDg6CisJCV9fYXNtX18gX192b2xhdGlsZV9fKCJjbXB4Y2hncSAlMSwlMiIKKwkJCQkgICAgIDogIj1hIihwcmV2KQorCQkJCSAgICAgOiAiciIobmV3KSwgIm0iKCpfX3hnKHB0cikpLCAiMCIob2xkKQorCQkJCSAgICAgOiAibWVtb3J5Iik7CisJCXJldHVybiBwcmV2OworCX0KKwlyZXR1cm4gb2xkOworfQorCisjZGVmaW5lIGNtcH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19uc3AtPnV0c19ucyA9IGNvcHlfdXRzbmFtZShmbGFncywgdHNrLT5uc3Byb3h5LT51dHNfbnMpOworCWlmIChJU19FUlIobmV3X25zcC0+dXRzX25zKSkKKwkJZ290byBvdXRfdXRzOworCisJbmV3X25zcC0+aXBjX25zID0gY29weV9pcGNzKGZsYWdzLCB0c2stPm5zcHJveHktPmlwY19ucyk7CisJaWYgKElTX0VSUihuZXdfbnNwLT5pcGNfbnMpKQorCQlnb3RvIG91dF9pcGM7CisKKwluZXdfbnNwLT5waWRfbnMgPSBjb3B5X3BpZF9ucyhmbGFncywgdHNrLT5uc3Byb3h5LT5waWRfbnMpOworCWlmIChJU19FUlIobmV3X25zcC0+cGlkX25zKSkKKwkJZ290byBvdXRfcGlkOworCisJcmV0dXJuIG5ld19uc3A7CisKK291dF9waWQ6CisJaWYgKG5ld19uc3AtPmlwY19ucykKKwkJcHV0X2lwY19ucyhuZXdfbnNwLT5pcGNfbnMpOworb3V0X2lwYzoKKwlpZiAobmV3X25zcC0+dXRzX25zKQorCQlwdXRfdXRzX25zKG5ld19uc3AtPnV0c19ucyk7CitvdXRfdXRzOgorCWlmIChuZXdfbnNwLT5tbnRfbnMpCisJCXB1dF9tbnRfbnMobmV3X25zcC0+bW50X25zKTsKK291dF9uczoKKwlrZnJlZShuZXdfbnNwKTsKKwlyZXR1cm4gRVJSX1BUUigtRU5PTUVNKTsKIH0KIAogLyoKQEAgLTkyLDQ3ICsxMTMsMjEgQEAKIAlpZiAoIShmbGFncyAmIChDTE9ORV9ORVdOUyB8IENMT05FX05FV1VUUyB8IENMT05FX05FV0lQQykpKQogCQlyZXR1cm4gMDsKIAotCW5ld19ucyA9IGNsb25lX25hbWVzcGFjZXMob2xkX25zKTsKLQlpZiAoIW5ld19ucykgewotCQllcnIgPSAtRU5PTUVNOworCWlmICghY2FwYWJsZShDQVBfU1lTX0FETUlOKSkgeworCQllcnIgPSAtRVBFUk07CisJCWdvdG8gb3V0OworCX0KKworCW5ld19ucyA9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