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AgICBlZHggPSAweDRkLgorTm90ZSB0aGF0IHRoaXMgdmFsdWUgaW4gZWJ4LCBlY3ggYW5kIGVkeCBjb3JyZXNwb25kcyB0byB0aGUgc3RyaW5nICJLVk1LVk1LVk0iLgorVGhpcyBmdW5jdGlvbiBxdWVyaWVzIHRoZSBwcmVzZW5jZSBvZiBLVk0gY3B1aWQgbGVhZnMuCisKKworZnVuY3Rpb246IGRlZmluZSBLVk1fQ1BVSURfRkVBVFVSRVMgKDB4NDAwMDAwMDEpCityZXR1cm5zIDogZWJ4LCBlY3gsIGVkeCA9IDAKKyAgICAgICAgICBlYXggPSBhbmQgT1InZWQgZ3JvdXAgb2YgKDEgPDwgZmxhZyksIHdoZXJlIGVhY2ggZmxhZ3MgaXM6CisKKworZmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCB2YWx1ZSB8fCBtZWFuaW5nCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorS1ZNX0ZFQVRVUkVfQ0xPQ0tTT1VSQ0UgICAgICAgICAgICB8fCAgICAgMCB8fCBrdm1jbG9jayBhdmFpbGFibGUgYXQgbXNycworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAgICAgICB8fCAweDExIGFuZCAweDEyLgorLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCitLVk1fRkVBVFVSRV9OT1BfSU9fREVMQVkgICAgICAgICAgIHx8ICAgICAxIHx8IG5vdCBuZWNlc3NhcnkgdG8gcGVyZm9ybSBkZWxheXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgICAgICAgfHwgb24gUElPIG9wZXJhdGlvbnMuCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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SUdfU1RBTkRBTE9ORT15CiBDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CiBDT05GSUdfRldfTE9BREVSPXkKQEAgLTczMCw5ICs4NTEsOSBAQAogIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKIENPTkZJR19NVEQ9eQogIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9URVNUUyBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfQ09OQ0FUIGlzIG5vdCBzZXQKIENPTkZJR19NVERfUEFSVElUSU9OUz15Ci0jIENPTkZJR19NVERfVEVTVFMgaXMgbm90IHNldAogQ09ORklHX01URF9SRURCT09UX1BBUlRTPXkKIENPTkZJR19NVERfUkVEQk9PVF9ESVJFQ1RPUllfQkxPQ0s9LTEKIENPTkZJR19NVERfUkVEQk9PVF9QQVJUU19VTkFMTE9DQVRFRD15CkBAIC03NTIsNiArODczLDcgQEAKICMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKICMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAogIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfU01fRlRMIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKIAogIwpAQCAtNzkzLDYgKzkxNSw3IEBACiAjCiAjIENPTkZJR19NVERfREFUQUZMQVNIIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9NMjVQODAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NTVDI1TCBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAogIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldApAQCAtODA1LDkgKzkyOCwxMiBAQAogIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAogIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKIENPTkZJR19NVERfTkFORD15Ci0jIENPTkZJR19NVERfTkFORF9WRVJJRllfV1JJVEUgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0VDQz15CiAjIENPTkZJR19NVERfTkFORF9FQ0NfU01DIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1ZFUklGWV9XUklURSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU01fQ09NTU9OIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9OQU5EX01VU0VVTV9JRFMgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0RFTkFMSV9TQ1JBVENIX1JFR19BRERSPTB4RkYxMDgwMTgKICMgQ09ORklHX01URF9OQU5EX0dQSU8gaXMgbm90IHNldAogQ09ORklHX01URF9OQU5EX0lEUz15CiBDT05GSUdfTVREX05BTkRfUzNDMjQxMD15CkBAIC04NDMsNiArOTY5LDEwIEBACiAjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAogQ09ORklHX0JMS19ERVZfTE9PUD15CiAjIENPTkZJR19CTEtfREVWX0NSWVBUT0xPT1AgaXMgbm90IHNldAorCisjCisjIERSQkQgZGlzYWJsZWQgYmVjYXVzZSBQUk9DX0ZTLCBJTkVUIG9yIENPTk5FQ1RPUiBub3Qgc2VsZWN0ZWQKKyMKIENPTkZJR19CTEtfREVWX05CRD1tCiBDT05GSUdfQkxLX0RFVl9VQj1tCiBDT05GSUdfQkxLX0RFVl9SQU09eQpAQCAtODUxLDE5ICs5ODEsMjYgQEAKICMgQ09ORklHX0JMS19ERVZfWElQIGlzIG5vdCBzZXQKICMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAogQ09ORklHX0FUQV9PVkVSX0VUSD1tCisjIENPTkZJR19NR19ESVNLIGlzIG5vdCBzZXQKIENPTkZJR19NSVNDX0RFVklDRVM9eQorIyBDT05GSUdfQUQ1MjVYX0RQT1QgaXMg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yMKKyMgQ09ORklHX01URF9EQVRBRkxBU0ggaXMgbm90IHNldAorIyBDT05GSUdfTVREX00yNVA4MCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU1NUMjVMIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkQ9eQorQ09ORklHX01URF9OQU5EX0VDQz15CisjIENPTkZJR19NVERfTkFORF9FQ0NfU01DIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1ZFUklGWV9XUklURSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU01fQ09NTU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX01VU0VVTV9JRFMgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0RFTkFMSV9TQ1JBVENIX1JFR19BRERSPTB4RkYxMDgwMTgKKyMgQ09ORklHX01URF9OQU5EX0dQSU8gaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0lEUz15CitDT05GSUdfTVREX05BTkRfUzNDMjQxMD15CisjIENPTkZJR19NVERfTkFORF9TM0MyNDEwX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1MzQzI0MTBfSFdFQ0MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfUzNDMjQxMF9DTEtTVE9QIGlzIG5vdCBzZXQKKyMgQ09ORklH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dfU05EX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9SQVdNSURJX1NFUSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfT1BMM19MSUJfU0VRIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9PUEw0X0xJQl9TRVEgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1NCQVdFX1NFUSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfRU1VMTBLMV9TRVEgaXMgbm90IHNldAorQ09ORklHX1NORF9EUklWRVJTPXkKKyMgQ09ORklHX1NORF9EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfTVRQQVYgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1NFUklBTF9VMTY1NTAgaXMgbm90IHNldAorIyBDT05GSUdfU05EX01QVTQwMSBpcyBub3Qgc2V0CitDT05GSUdfU05EX0FSTT15CitDT05GSUdfU05EX1NQST15CitDT05GSUdfU05EX1VTQj15CisjIENPTkZJR19TTkRfVVNCX0FVRElPIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9VU0JfVUExMDEgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1VTQl9DQUlBUSBpcyBub3Qgc2V0CitDT05GSUdfU05EX1NPQz1tCitDT05GSUdfU05EX1NPQ19BQzk3X0JVUz15CitDT05GSUdfU05EX1MzQzI0WFhfU09DPW0KK0NPTkZJR19TTkRfUzNDX1NPQ19BQzk3PW0KKyMgQ09ORklHX1NORF9TM0M2NFhYX1NPQ19XTTg1ODAgaXMgbm90IHNldAorQ09ORklHX1NORF9TT0NfU01ES19XTTk3MTM9bQorQ09ORklHX1NORF9TT0NfSTJDX0FORF9TUEk9bQorIyBDT05GSUdfU05EX1NPQ19BTExfQ09ERUNTIGlzIG5vdCBzZXQKK0NPTkZJR19TTkRfU09DX1dNOTcxMz1tCisjIENPTkZJR19TT1VORF9QUklNRSBpcyBub3Qgc2V0CitDT05GSUdfQUM5N19CVVM9bQogQ09ORklHX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Ci0JCS51Y29uCSAgICAgPSAweDNjNSwKLQkJLnVsY29uCSAgICAgPSAweDAzLAotCQkudWZjb24JICAgICA9IDB4NTEsCisJCS51Y29uCSAgICAgPSBTNVBDMTAwX1VDT05fREVGQVVMVCwKKwkJLnVsY29uCSAgICAgPSBTNVBDMTAwX1VMQ09OX0RFRkFVTFQsCisJCS51ZmNvbgkgICAgID0gUzVQQzEwMF9VRkNPTl9ERUZBVUxULAogCX0sCiAJWzFdID0gewogCQkuaHdwb3J0CSAgICAgPSAxLAogCQkuZmxhZ3MJICAgICA9IDAsCi0JCS51Y29uCSAgICAgPSAweDNjNSwKLQkJLnVsY29uCSAgICAgPSAweDAzLAotCQkudWZjb24JICAgICA9IDB4NTEsCisJCS51Y29uCSAgICAgPSBTNVBDMTAwX1VDT05fREVGQVVMVCwKKwkJLnVsY29uCSAgICAgPSBTNVBDMTAwX1VMQ09OX0RFRkFVTFQsCisJCS51ZmNvbgkgICAgID0gUzVQQzEwMF9VRkNPTl9ERUZBVUxULAogCX0sCiAJWzJdID0gewogCQkuaHdwb3J0CSAgICAgPSAyLAogCQkuZmxhZ3MJICAgICA9IDAsCi0JCS51Y29uCSAgICAgPSAweDNjNSwKLQkJLnVsY29uCSAgICAgPSAweDAzLAotCQkudWZjb24JICAgICA9IDB4NTEsCisJCS51Y29uCSAgICAgPSBTNVBDMTAwX1VDT05fREVGQVVMVCwKKwkJLnVsY29uCSAgICAgPSBTNVBDMTAwX1VMQ09OX0RFRkFVTFQsCisJCS51ZmNvbgkgICAgID0gUzVQQzEwMF9VRkNPTl9ERUZBVUxULAogCX0sCiAJWzNdID0gewogCQkuaHdwb3J0CSAgICAgPSAzLAogCQkuZmxhZ3MJICAgICA9IDAsCi0JCS51Y29uCSAgICAgPSAweDNjNSwKLQkJLnVsY29uCSAgICAgPSAweDAzLAotCQkudWZjb24JICAgICA9IDB4NTEsCisJCS51Y29uCSAgICAgPSBTNVBDMTAwX1VDT05fREVGQVVMVCwKKwkJLnVsY29u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JxX2Rlc2MgKmRlc2MpCit7CisJczVwX2lycV9kZW11eF9laW50KElSUV9FSU5UKDE2KSk7CisJczVwX2lycV9kZW11eF9laW50KElSUV9FSU5UKDI0KSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCBzNXBfaXJxX3ZpY19laW50X21hc2sodW5zaWduZWQgaW50IGlycSkKK3sKKwl2b2lkIF9faW9tZW0gKmJhc2UgPSBnZXRfaXJxX2NoaXBfZGF0YShpcnEpOworCisJczVwX2lycV9laW50X21hc2soaXJxKTsKKwl3cml0ZWwoMSA8PCBFSU5UX09GRlNFVChpcnEpLCBiYXNlICsgVklDX0lOVF9FTkFCTEVfQ0xFQVIpOworfQorCitzdGF0aWMgdm9pZCBzNXBfaXJxX3ZpY19laW50X3VubWFzayh1bnNpZ25lZCBpbnQgaXJxKQoreworCXZvaWQgX19pb21lbSAqYmFzZSA9IGdldF9pcnFfY2hpcF9kYXRhKGlycSk7CisKKwlzNXBfaXJxX2VpbnRfdW5tYXNrKGlycSk7CisJd3JpdGVsKDEgPDwgRUlOVF9PRkZTRVQoaXJxKSwgYmFzZSArIFZJQ19JTlRfRU5BQkxFKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHM1cF9pcnFfdmljX2VpbnRfYWNrKHVuc2lnbmVkIGludCBpcnEpCit7CisJX19yYXdfd3JpdGVsKGVpbnRfaXJxX3RvX2JpdChpcnEpLCBTNVBfRUlOVF9QRU5EKEVJTlRfUkVHX05SKGlycSkpKTsKK30KKworc3RhdGljIHZvaWQgczVwX2lycV92aWNfZWludF9tYXNrYWNrKHVuc2lnbmVkIGludCBpcnEpCit7CisJczVwX2lycV92aWNfZWludF9tYXNrKGlycSk7CisJczVwX2lycV92aWNfZWludF9hY2soaXJxKTsKK30KKworc3RhdGljIHN0cnVjdCBpcnFfY2hpcCBzNXBfaXJxX3ZpY19laW50ID0geworCS5uYW1lCQk9ICJzNXBfdmljX2VpbnQiLAorCS5tYXNrCQk9IHM1cF9pcnFfd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Ql3cml0ZWwoMSA8PCByZWFsLCBiYXNlICsgVklDX0lOVF9FTkFCTEUpOwotfQotCi1zdGF0aWMgaW5saW5lIHZvaWQgczNjX2lycV92aWNfZWludF9hY2sodW5zaWduZWQgaW50IGlycSkKLXsKLQl1MzIgYml0OwotCXUzMiBiYW5rID0gczNjX2dldF9iYW5rKGlycSk7Ci0KLQliaXQgPSBzM2NfZWludF90b19iaXQoaXJxKTsKLQlfX3Jhd193cml0ZWwoYml0LCBTNVBDMVhYX1dLVVBfSU5UX1BFTkQoYmFuaykpOwotfQotCi1zdGF0aWMgdm9pZCBzM2NfaXJxX3ZpY19laW50X21hc2thY2sodW5zaWduZWQgaW50IGlycSkKLXsKLQkvKiBjb21waWxlciBzaG91bGQgaW4tbGluZSB0aGVzZSAqLwotCXMzY19pcnFfdmljX2VpbnRfbWFzayhpcnEpOwotCXMzY19pcnFfdmljX2VpbnRfYWNrKGlycSk7Ci19Ci0KLXN0YXRpYyBzdHJ1Y3QgaXJxX2NoaXAgczNjX2lycV92aWNfZWludCA9IHsKLQkubmFtZQkJPSAiRUlOVCIsCi0JLm1hc2sJCT0gczNjX2lycV92aWNfZWludF9tYXNrLAotCS51bm1hc2sJCT0gczNjX2lycV92aWNfZWludF91bm1hc2ssCi0JLm1hc2tfYWNrCT0gczNjX2lycV92aWNfZWludF9tYXNrYWNrLAotCS5hY2sJCT0gczNjX2lycV92aWNfZWludF9hY2ssCi0JLnNldF90eXBlCT0gczNjX2lycV9laW50X3NldF90eXBlLAotCS5zZXRfd2FrZQk9IHMzY19pcnFleHRfd2FrZSwKLX07Ci0KLXN0YXRpYyBpbnQgX19pbml0IHM1cGMxeHhfaW5pdF9pcnFfZWludCh2b2lkKQotewotCWludCBpcnE7Ci0KLQlmb3IgKGlycSA9IElSUV9FSU5UMDsgaXJxIDw9IElSUV9FSU5UMTU7IGlycSsrKSB7Ci0JCXNldF9pcnFfY2hpcChpcnEsICZzM2NfaXJxX3ZpY19laW50KTsKLQkJc2V0X2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NkZWZpbmUgQlJDQ19CX2JpdHMgICAgICAgICAgICAgMTAKKyNkZWZpbmUgQlJDQ19CX21hc2sgICAgICAgICAgICAgMHgxCisjZGVmaW5lIEJSQ0NfVF9iaXRzICAgICAgICAgICAgIDExCisjZGVmaW5lIEJSQ0NfVF9tYXNrICAgICAgICAgICAgIDB4MQorI2RlZmluZSBCUkNDX2NvZGVfYml0cyAgICAgICAgICAxMgorI2RlZmluZSBCUkNDX2NvZGVfbWFzayAgICAgICAgICAweGYKKworc3RhdGljIHZvaWQgZGVjb2RlX0JSQ0NfMCh1bnNpZ25lZCBpbnQgb3Bjb2RlKQoreworCWludCBCID0gKChvcGNvZGUgPj4gQlJDQ19CX2JpdHMpICYgQlJDQ19CX21hc2spOworCWludCBUID0gKChvcGNvZGUgPj4gQlJDQ19UX2JpdHMpICYgQlJDQ19UX21hc2spOworCisJcHJfY29udCgiSUYgJXNDQyBKVU1QIHBjcmVsICVzIiwgVCA/ICIiIDogIiEiLCBCID8gIihCUCkiIDogIiIpOworfQorCisjZGVmaW5lIENBTExhX29wY29kZSAgICAweGUyMDAwMDAwCisjZGVmaW5lIENBTExhX2FkZHJfYml0cyAwCisjZGVmaW5lIENBTExhX2FkZHJfbWFzayAweGZmZmZmZgorI2RlZmluZSBDQUxMYV9TX2JpdHMgICAgMjQKKyNkZWZpbmUgQ0FMTGFfU19tYXNrICAgIDB4MQorI2RlZmluZSBDQUxMYV9jb2RlX2JpdHMgMjUKKyNkZWZpbmUgQ0FMTGFfY29kZV9tYXNrIDB4N2YKKworc3RhdGljIHZvaWQgZGVjb2RlX0NBTExhXzAodW5zaWduZWQgaW50IG9wY29kZSkKK3sKKwlpbnQgUyAgID0gKChvcGNvZGUgPj4gKENBTExhX1NfYml0cyAtIDE2KSkgJiBDQUxMYV9TX21hc2spOworCisJaWYgKFMpCisJCXByX2NvbnQoIkNBTEwgcGNyZWwiKTsKKwllbHNlCisJCXByX2NvbnQoIkpVTVAuTCIpOworfQorCisjZGVmaW5lIExvb3BTZXR1cF9vcGNvZGUgICAgICAgICAgICAgICAgMHhlMDgwMDAwMAorI2RlZmluZSBMb29wU2V0dXBfZW9mZnNldF9iaXRzICAgICAgICAgIDAKKyNkZWZpbmUgTG9vcFNldHVwX2VvZmZzZXRfbWFzayAgICAgICAgICAweDNmZgorI2RlZmluZSBMb29wU2V0dXBfZG9udGNhcmVfYml0cyAgICAgICAgIDEwCisjZGVmaW5lIExvb3BTZXR1cF9kb250Y2FyZV9tYXNrICAgICAgICAgMHgzCisjZGVmaW5lIExvb3BTZXR1cF9yZWdfYml0cyAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgTG9vcFNldHVwX3JlZ19tYXNrICAgICAgICAgICAgICAweGYKKyNkZWZpbmUgTG9vcFNldHVwX3NvZmZzZXRfYml0cyAgICAgICAgICAxNgorI2RlZmluZSBMb29wU2V0dXBfc29mZnNldF9tYXNrICAgICAgICAgIDB4ZgorI2RlZmluZSBMb29wU2V0dXBfY19iaXRzICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIExvb3BTZXR1cF9jX21hc2sgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIExvb3BTZXR1cF9yb3BfYml0cyAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgTG9vcFNldHVwX3JvcF9tYXNrICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgTG9vcFNldHVwX2NvZGVfYml0cyAgICAgICAgICAgICAyMworI2RlZmluZSBMb29wU2V0dXBfY29kZV9tYXNrICAgICAgICAgICAgIDB4MWZmCisKK3N0YXRpYyB2b2lkIGRlY29kZV9Mb29wU2V0dXBfMCh1bnNpZ25lZCBpbnQgb3Bjb2RlKQoreworCWludCBjICAgPSAoKG9wY29kZSA+PiBMb29wU2V0dXBfY19iaXRzKSAgICYgTG9vcFNldHVwX2NfbWFzayk7CisJaW50IHJlZyA9ICgob3Bjb2RlID4+IExvb3BTZXR1cF9yZWdfYml0cykgJiBMb29wU2V0dXBfcmVnX21hc2spOworCWludCByb3AgPSAoKG9wY29kZSA+PiBMb29wU2V0dXBfcm9wX2JpdHMpICYgTG9vcFNldHVwX3JvcF9tYXNrKTsKKworCXByX2NvbnQoIkxTRVRVUCA8PiBMQyVpIiwgYyk7CisJaWYgKChyb3AgJiAxKSA9PSAxKQorCQlwcl9jb250KCI9IFAlaSIsIHJlZyk7CisJaWYgKChyb3AgJiAyKSA9PSAyKQorCQlwcl9jb250KCIgPj4gMHgxIik7Cit9CisKKyNkZWZpbmUgRHNwTERTVF9vcGNvZGUgICAgICAgICAgMHg5YzAwCisjZGVmaW5lIERzcExEU1RfcmVnX2JpdHMgICAgICAgIDAKKyNkZWZpbmUgRHNwTERTVF9yZWdfbWFzayAgICAgICAgMHg3CisjZGVmaW5lIERzcExEU1RfaV9iaXRzICAgICAgICAgIDMKKyNkZWZpbmUgRHNwTERTVF9pX21hc2sgICAgICAgICAgMHgzCisjZGVmaW5lIERzcExEU1RfbV9iaXRzICAgICAgICAgIDUKKyNkZWZpbmUgRHNwTERTVF9tX21hc2sgICAgICAgICAgMHgzCisjZGVmaW5lIERzcExEU1RfYW9wX2JpdHMgICAgICAgIDcKKyNkZWZpbmUgRHNwTERTVF9hb3BfbWFzayAgICAgICAgMHgzCisjZGVmaW5lIERzcExEU1RfV19iaXRzICAgICAgICAgIDkKKyNkZWZpbmUgRHNwTERTVF9XX21hc2sgICAgICAgICAgMHgxCisjZGVmaW5lIERzcExEU1RfY29kZV9iaXRzICAgICAgIDEwCisjZGVmaW5lIERzcExEU1RfY29kZV9tYXNrICAgICAgIDB4M2YKKworc3RhdGljIHZvaWQgZGVjb2RlX2RzcExEU1RfMCh1bnNpZ25lZCBpbnQgb3Bjb2RlKQoreworCWludCBpICAgPSAoKG9wY29kZSA+PiBEc3BMRFNUX2lfYml0cykgJiBEc3BMRFNUX2lfbWFzayk7CisJaW50IG0gICA9ICgob3Bjb2RlID4+IERzcExEU1RfbV9iaXRzKSAmIERzcExEU1RfbV9tYXNrKTsKKwlpbnQgVyAgID0gKChvcGNvZGUgPj4gRHNwTERTVF9XX2JpdHMpICYgRHNwTERTVF9XX21hc2spOworCWludCBhb3AgPSAoKG9wY29kZSA+PiBEc3BMRFNUX2FvcF9iaXRzKSAmIERzcExEU1RfYW9wX21hc2spOworCWludCByZWcgPSAoKG9wY29kZSA+PiBEc3BMRFNUX3JlZ19iaXRzKSAmIERzcExEU1RfcmVnX21hc2spOworCisJaWYgKFcgPT0gMCkgeworCQlwcl9jb250KCJSJWkiLCByZWcpOworCQlzd2l0Y2ggKG0pIHsKKwkJY2FzZSAwOgorCQkJcHJfY29udCgiID0gIik7CisJCQlicmVhazsKKwkJY2FzZSAxOgorCQkJcHJfY29udCgiLkwgPSAiKTsKKwkJCWJyZWFrOworCQljYXNlIDI6CisJCQlwcl9jb250KCIuVyA9ICIpOworCQkJYnJlYWs7CisJCX0KKwl9CisKKwlwcl9jb250KCJbIEklaSIsIGkpOworCisJc3dpdGNoIChhb3ApIHsKKwljYXNlIDA6CisJCXByX2NvbnQoIisrIF0iKTsKKwkJYnJlYWs7CisJY2FzZSAxOgorCQlwcl9jb250KCItLSBdIik7CisJCWJyZWFrOworCX0KKworCWlmIChXID09IDEpIHsKKwkJcHJfY29udCgiID0gUiVpIiwgcmVnKTsKKwkJc3dpdGNoIChtKSB7CisJCWNhc2UgMToKKwkJCXByX2NvbnQoIi5MID0gIik7CisJCQlicmVhazsKKwkJY2FzZSAyOgorCQkJcHJfY29udCgiLlcgPSAiKTsKKwkJCWJyZWFrOworCQl9CisJfQorfQorCisjZGVmaW5lIExEU1Rfb3Bjb2RlICAgICAgICAgICAgIDB4OTAwMAorI2RlZmluZSBMRFNUX3JlZ19iaXRzICAgICAgICAgICAwCisjZGVmaW5lIExEU1RfcmVnX21hc2sgICAgICAgICAgIDB4NworI2RlZmluZSBMRFNUX3B0cl9iaXRzICAgICAgICAgICAzCisjZGVmaW5lIExEU1RfcHRyX21hc2sgICAgICAgICAgIDB4NworI2RlZmluZSBMRFNUX1pfYml0cyAgICAgICAgICAgICA2CisjZGVmaW5lIExEU1RfWl9tYXNrICAgICAgICAgICAgIDB4MQorI2RlZmluZSBMRFNUX2FvcF9iaXRzICAgICAgICAgICA3CisjZGVmaW5lIExEU1RfYW9wX21hc2sgICAgICAgICAgIDB4MworI2RlZmluZSBMRFNUX1dfYml0cyAgICAgICAgICAgICA5CisjZGVmaW5lIExEU1RfV19tYXNrICAgICAgICAgICAgIDB4MQorI2RlZmluZSBMRFNUX3N6X2JpdHMgICAgICAgICAgICAxMAorI2RlZmluZSBMRFNUX3N6X21hc2sgICAgICAgICAgICAweDMKKyNkZWZpbmUgTERTVF9jb2RlX2JpdHMgICAgICAgICAgMTIKKyNkZWZpbmUgTERTVF9jb2RlX21hc2sgICAgICAgICAgMHhmCisKK3N0YXRpYyB2b2lkIGRlY29kZV9MRFNUXzAodW5zaWduZWQgaW50IG9wY29kZSkKK3sKKwlpbnQgWiAgID0gKChvcGNvZGUgPj4gTERTVF9aX2JpdHMpICYgTERTVF9aX21hc2spOworCWludCBXICAgPSAoKG9wY29kZSA+PiBMRFNUX1dfYml0cykgJiBMRFNUX1dfbWFzayk7CisJaW50IHN6ICA9ICgob3Bjb2RlID4+IExEU1Rfc3pfYml0cykgJiBMRFNUX3N6X21hc2spOworCWludCBhb3AgPSAoKG9wY29kZSA+PiBMRFNUX2FvcF9iaXRzKSAmIExEU1RfYW9wX21hc2spOworCWludCByZWcgPSAoKG9wY29kZSA+PiBMRFNUX3JlZ19iaXRzKSAmIExEU1RfcmVnX21hc2spOworCWludCBwdHIgPSAoKG9wY29kZSA+PiBMRFNUX3B0cl9iaXRzKSAmIExEU1RfcHRyX21hc2spOworCisJaWYgKFcgPT0gMCkKKwkJcHJfY29udCgiJXMlaSA9ICIsIChzeiA9PSAwICYmIFogPT0gMSkgPyAiUCIgOiAiUiIsIHJlZyk7CisKKwlzd2l0Y2ggKHN6KSB7CisJY2FzZSAxOgorCQlwcl9jb250KCJXIik7CisJCWJyZWFrOworCWNhc2UgMjoKKwkJcHJfY29udCgiQiIpOworCQlicmVhazsKKwl9CisKKwlwcl9jb250KCJbUCVpIiwgcHRyKTsKKworCXN3aXRjaCAoYW9wKSB7CisJY2FzZSAwOgorCQlwcl9jb250KCIrKyIpOworCQlicmVhazsKKwljYXNlIDE6CisJCXByX2NvbnQoIi0tIik7CisJCWJyZWFrOworCX0KKwlwcl9jb250KCJdIik7CisKKwlpZiAoVyA9PSAxKQorCQlwcl9jb250KCIgPSAlcyVpICIsIChzeiA9PSAwICYmIFogPT0gMSkgPyAiUCIgOiAiUiIsIHJlZyk7CisKKwlpZiAoc3opIHsKKwkJaWYgKFopCisJCQlwcl9jb250KCIgKFgpIik7CisJCWVsc2UKKwkJCXByX2NvbnQoIiAoWikiKTsKKwl9Cit9CisKKyNkZWZpbmUgTERTVGlpX29wY29kZSAgICAgICAgICAgMHhhMDAwCisjZGVmaW5lIExEU1RpaV9yZWdfYml0ICAgICAgICAgIDAKKyNkZWZpbmUgTERTVGlpX3JlZ19tYXNrICAgICAgICAgMHg3CisjZGVmaW5lIExEU1RpaV9wdHJfYml0ICAgICAgICAgIDMKKyNkZWZpbmUgTERTVGlpX3B0cl9tYXNrICAgICAgICAgMHg3CisjZGVmaW5lIExEU1RpaV9vZmZzZXRfYml0ICAgICAgIDYKKyNkZWZpbmUgTERTVGlpX29mZnNldF9tYXNrICAgICAgMHhmCisjZGVmaW5lIExEU1RpaV9vcF9iaXQgICAgICAgICAgIDEwCisjZGVmaW5lIExEU1RpaV9vcF9tYXNrICAgICAgICAgIDB4MworI2RlZmluZSBMRFNUaWlfV19iaXQgICAgICAgICAgICAxMgorI2RlZmluZSBMRFNUaWlfV19tYXNrICAgICAgICAgICAweDEKKyNkZWZpbmUgTERTVGlpX2NvZGVfYml0ICAgICAgICAgMTMKKyNkZWZpbmUgTERTVGlpX2NvZGVfbWFzayAgICAgICAgMHg3CisKK3N0YXRpYyB2b2lkIGRlY29kZV9MRFNUaWlfMCh1bnNpZ25lZCBpbnQ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9iaXRzICAgICAgIDE5CisjZGVmaW5lIExEU1RpZHhJX3B0cl9tYXNrICAgICAgIDB4NworI2RlZmluZSBMRFNUaWR4SV9zel9iaXRzICAgICAgICAyMgorI2RlZmluZSBMRFNUaWR4SV9zel9tYXNrICAgICAgICAweDMKKyNkZWZpbmUgTERTVGlkeElfWl9iaXRzICAgICAgICAgMjQKKyNkZWZpbmUgTERTVGlkeElfWl9tYXNrICAgICAgICAgMHgxCisjZGVmaW5lIExEU1RpZHhJX1dfYml0cyAgICAgICAgIDI1CisjZGVmaW5lIExEU1RpZHhJX1dfbWFzayAgICAgICAgIDB4MQorI2RlZmluZSBMRFNUaWR4SV9jb2RlX2JpdHMgICAgICAyNgorI2RlZmluZSBMRFNUaWR4SV9jb2RlX21hc2sgICAgICAweDNmCisKK3N0YXRpYyB2b2lkIGRlY29kZV9MRFNUaWR4SV8wKHVuc2lnbmVkIGludCBvcGNvZGUpCit7CisJaW50IFogICAgICA9ICgob3Bjb2RlID4+IExEU1RpZHhJX1pfYml0cykgICAgICAmIExEU1RpZHhJX1pfbWFzayk7CisJaW50IFcgICAgICA9ICgob3Bjb2RlID4+IExEU1RpZHhJX1dfYml0cykgICAgICAmIExEU1RpZHhJX1dfbWFzayk7CisJaW50IHN6ICAgICA9ICgob3Bjb2RlID4+IExEU1RpZHhJX3N6X2JpdHMpICAgICAmIExEU1RpZHhJX3N6X21hc2spOworCWludCByZWcgICAgPSAoKG9wY29kZSA+PiBMRFNUaWR4SV9yZWdfYml0cykgICAgJiBMRFNUaWR4SV9yZWdfbWFzayk7CisJaW50IHB0ciAgICA9ICgob3Bjb2RlID4+IExEU1RpZHhJX3B0cl9iaXRzKSAgICAmIExEU1RpZHhJX3B0cl9tYXNrKTsKKwlpbnQgb2Zmc2V0ID0gKChvcGNvZGUgPj4gTERTVGlkeElfb2Zmc2V0X2JpdHMpICYgTERTVGlkeElfb2Zmc2V0X21hc2spOworCisJaWYgKFcgPT0gMCkKKwkJcHJfY29udCgiJXMl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0aW5hdGlvbiBzdHJpbmcgZGVzdAorICovCisKKyNpZmRlZiBDT05GSUdfU1RSTkNNUF9MMQorLnNlY3Rpb24gLmwxLnRleHQKKyNlbHNlCisudGV4dAorI2VuZGlmCisKKy5hbGlnbiAyCisKK0VOVFJZKF9zdHJuY21wKQorCUNDID0gUjIgPT0gMDsKKwlpZiBDQyBKVU1QIDVmOworCisJUDAgPSBSMCA7ICAgICAgIC8qIHMxICovCisJUDEgPSBSMSA7ICAgICAgIC8qIHMyICovCisxOgorCVIwID0gQltQMCsrXSAoWik7ICAgICAgLyogZ2V0ICpzMSAqLworCVIxID0gQltQMSsrXSAoWik7ICAgICAgLyogZ2V0ICpzMiAqLworCUNDID0gUjAgPT0gUjE7ICAgICAgICAgLyogY29tcGFyZSBhIGJ5dGUgKi8KKwlpZiAhIGNjIGp1bXAgM2Y7ICAgICAgIC8qIG5vdCBlcXVhbCwgYnJlYWsgb3V0ICovCisJQ0MgPSBSMDsgICAgICAgICAgICAgICAvKiBhdCBlbmQgb2YgczE/ICovCisJaWYgISBjYyBqdW1wIDRmOyAgICAgICAvKiB5ZXMsIGFsbCBkb25lICovCisJUjIgKz0gLTE7ICAgICAgICAgICAgICAvKiBubywgYWRqdXN0IGNvdW50ICovCisJQ0MgPSBSMiA9PSAwOworCWlmICEgY2MganVtcCAxYiAoYnApOyAgLyogbW9yZSB0byBkbywga2VlcCBnb2luZyAqLworMjoKKwlSMCA9IDA7ICAgICAgICAgICAgICAgIC8qIHN0cmluZ3MgYXJlIGVxdWFsICovCisJanVtcC5zIDRmOworMzoKKwlSMCA9IFIwIC0gUjE7ICAgICAgICAgIC8qICpzMSAtICpzMiAqLworNDoKKwlSVFM7CisKKzU6CisJUjAgPSAwOworCVJUUzsKKworRU5EUFJPQyhfc3RybmNtcCkKZGlmZiAtLWdpdCBhL2FyY2gvYmxhY2tmaW4vbGliL3N0cm5jbXAuYyBiL2FyY2gvYmxhY2tmaW4vbGliL3N0cm5jbXAuYwpkZWxldGVk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gICovCi0jZGVmaW5lCUFCTwkJCTB4MDAwNAkvKiBBdXRvLUJ1cyBPbiBFbmFibGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVRYUFJJTwkJMHgwMDA4CS8qIFRYIFByaW9yaXR5IChQcmlvcml0eS9NYWlsYm94KikgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdCQQkJCTB4MDAxMAkvKiBXYWtlLVVwIE9uIENBTiBCdXMgQWN0aXZpdHkgRW5hYmxlICAgKi8KLSNkZWZpbmUJU01SCQkJMHgwMDIwCS8qIFNsZWVwIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ1NSCQkJMHgwMDQwCS8qIENBTiBTdXNwZW5kIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0NSCQkJMHgwMDgwCS8qIENBTiBDb25maWd1cmF0aW9uIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICovCi0KLS8qIENBTl9TVEFUVVMgTWFza3MJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlXVAkJCTB4MDAwMQkvKiBUWCBXYXJuaW5nIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdSCQkJMHgwMDAyCS8qIFJYIFdhcm5pbmcgRmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVAJCQkweDAwMDQJLyogRXJyb3IgUGFzc2l2ZSBNb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRUJPCQkJMHgwMDA4CS8qIEVycm9yIEJ1cyBPZmYgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVNNQQkJCTB4MDAyMAkvKiBTbGVlcCBNb2RlIEFja25vd2xlZGdlICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlDU0EJCQkweDAwNDAJLyogU3VzcGVuZCBNb2RlIEFja25vd2xlZGdlICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0NBCQkJMHgwMDgwCS8qIENvbmZpZ3VyYXRpb24gTW9kZSBBY2tub3dsZWRnZSAgICAgICAqLwotI2RlZmluZQlNQlBUUgkJMHgxRjAwCS8qIE1haWxib3ggUG9pbnRlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVFJNCQkJMHg0MDAwCS8qIFRyYW5zbWl0IE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJUkVDCQkJMHg4MDAwCS8qIFJlY2VpdmUgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0NMT0NLIE1hc2tzCQkJCQkJCQkJKi8KLSNkZWZpbmUJQlJQCQkJMHgwM0ZGCS8qIEJpdC1SYXRlIFByZS1TY2FsZXIgICovCi0KLS8qIENBTl9USU1JTkcgTWFza3MJCQkJCQkJCQkJCSovCi0jZGVmaW5lCVRTRUcxCQkweDAwMEYJLyogVGltZSBTZWdtZW50IDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVFNFRzIJCTB4MDA3MAkvKiBUaW1lIFNlZ21lbnQgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlTQU0JCQkweDAwODAJLyogU2FtcGxpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlTSlcJCQkweDAzMDAJLyogU3luY2hyb25pemF0aW9uIEp1bXAgV2lkdGggICAqLwotCi0vKiBDQU5fREVCVUcgTWFza3MJCQkJCQkJCQkJCSovCi0jZGVmaW5lCURFQwkJCTB4MDAw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HQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVNNQUNLCQkweDAwMDgJLyogU2xlZXAgTW9kZSBBY2tub3dsZWRnZSAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUNBTlRYCQkweDAwNDAJLyogQ0FOIFRYIEJ1cyBWYWx1ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0FOUlgJCTB4MDA4MAkvKiBDQU4gUlggQnVzIFZhbHVlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fTUJ4eF9JRDEgYW5kIENBTl9NQnh4X0lEMCBNYXNrcwkJCQkJCQkJCQkqLwotI2RlZmluZSBERkMJCQkweEZGRkYJLyogRGF0YSBGaWx0ZXJpbmcgQ29kZSAoSWYgRW5hYmxlZCkgKElEMCkgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFWFRJRF9MTwkweEZGRkYJLyogTG93ZXIgMTYgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChJRDApICAgKi8KLSNkZWZpbmUJRVhUSURfSEkJMHgwMDAzCS8qIFVwcGVyIDIgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChJRDEpICAgICovCi0jZGVmaW5lCUJBU0VJRAkJMHgxRkZDCS8qIEJhc2UgSWRlbnRpZmllciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJSURFCQkJMHgyMDAwCS8qIElkZW50aWZpZXIgRXh0ZW5zaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVJUUgkJCTB4NDAwMAkvKiBSZW1vdGUgRnJhbWUgVHJhbnNtaXNzaW9uIFJlcXVlc3QgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUFNRQkJCTB4ODAwMAkvKiBBY2NlcHRhbmNlIE1hc2sgRW5hYmxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fTUJ4eF9USU1FU1RBTVAgTWFza3MJCQkJCSovCi0jZGVmaW5lIFRTVgkJCTB4RkZGRgkvKiBUaW1lc3RhbXAgICAgKi8KLQotLyogQ0FOX01CeHhfTEVOR1RIIE1hc2tzCQkJCQkJKi8KLSNkZWZpbmUgRExDCQkJMHgwMDBGCS8qIERhdGEgTGVuZ3RoIENvZGUgICAgICovCi0KLS8qIENBTl9BTXh4SCBhbmQgQ0FOX0FNeHhMIE1hc2tzCQkJCQkJCQkJCQkJKi8KLSNkZWZpbmUgREZNCQkJMHhGRkZGCS8qIERhdGEgRmllbGQgTWFzayAoSWYgRW5hYmxlZCkgKENBTl9BTXh4TCkgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFWFRJRF9MTwkweEZGRkYJLyogTG93ZXIgMTYgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChDQU5fQU14eEwpICAgICAqLwotI2RlZmluZQlFWFRJRF9ISQkweDAwMDMJLyogVXBwZXIgMiBCaXRzIG9mIEV4dGVuZGVkIElkZW50aWZpZXIgKENBTl9BTXh4SCkgICAgICAqLwotI2RlZmluZQlCQVNFSUQJCTB4MUZGQwkvKiBCYXNlIElkZW50aWZpZXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQU1JREUJCTB4MjAwMAkvKiBBY2NlcHRhbmNlIE1hc2sgSUQgRXh0ZW5zaW9uIEVuYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRk1ECQkJMHg0MDAwCS8qIEZ1bGwgTWFzayBEYXRhIEZpZWxkIEVuYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUZERgkJC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IEZvciBNYWlsYm94IDMxICAgICAgICAqLwotCi0vKiBDQU5fTUJUSUYxIE1hc2tzCQkJCQkJCQkJCQkJCSovCi0jZGVmaW5lCU1CVElGMAkJMHgwMDAxCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAwICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMQkJMHgwMDAyCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAxICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMgkJMHgwMDA0CS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAyICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMwkJMHgwMDA4CS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAzICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNAkJMHgwMDEwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA0ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNQkJMHgwMDIwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA1ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNgkJMHgwMDQwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA2ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNwkJMHgwMDgwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA3ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGOAkJMHgwMTAwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA4ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGOQkJMHgwMjAwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA5ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMTAJCTB4MDQwMAkvKiBUWCBJbnRlcnJ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dCBBY3RpdmUgSW4gTWFpbGJveCAxICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGMgkJMHgwMDA0CS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAyICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGMwkJMHgwMDA4CS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAzICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGNAkJMHgwMDEwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA0ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGNQkJMHgwMDIwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA1ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGNgkJMHgwMDQwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA2ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGNwkJMHgwMDgwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA3ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGOAkJMHgwMTAwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA4ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGOQkJMHgwMjAwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA5ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CUklGMTAJCTB4MDQwMAkvKiBSWCBJbnRlcnJ1cHQgQWN0aXZlIEluIE1haWxib3ggMTAgICAgKi8KLSNkZWZpbmUJTUJSSUYxMQkJMHgwODAwCS8qIFJYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAxMSAgICAqLwotI2RlZmluZQlNQlJJRjEyCQkweDEwMDAJLyogUlggSW50ZXJydXB0IEFjdGl2ZSBJbiBNYWlsYm94IDEyICAgICovCi0jZGVmaW5l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EZvciBNYWlsYm94IDI4ICAgICAgKi8KLSNkZWZpbmUJTUJJTTI5CQkweDIwMDAJLyogRW5hYmxlIEludGVycnVwdCBGb3IgTWFpbGJveCAyOSAgICAgICovCi0jZGVmaW5lCU1CSU0zMAkJMHg0MDAwCS8qIEVuYWJsZSBJbnRlcnJ1cHQgRm9yIE1haWxib3ggMzAgICAgICAqLwotI2RlZmluZQlNQklNMzEJCTB4ODAwMAkvKiBFbmFibGUgSW50ZXJydXB0IEZvciBNYWlsYm94IDMxICAgICAgKi8KLQotLyogQ0FOX0dJTSBNYXNrcwkJCQkJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlFV1RJTQkJMHgwMDAxCS8qIEVuYWJsZSBUWCBFcnJvciBDb3VudCBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVXUklNCQkweDAwMDIJLyogRW5hYmxlIFJYIEVycm9yIENvdW50IEludGVycnVwdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVBJTQkJMHgwMDA0CS8qIEVuYWJsZSBFcnJvci1QYXNzaXZlIE1vZGUgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlCT0lNCQkweDAwMDgJLyogRW5hYmxlIEJ1cyBPZmYgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlXVUlNCQkweDAwMTAJLyogRW5hYmxlIFdha2UtVXAgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVSUFJTQkJMHgwMDIwCS8qIEVuYWJsZSBBY2Nlc3MgVG8gVW5pbXBsZW1lbnRlZCBBZGRyZXNzIEludGVycnVwdCAgICAgKi8KLSNkZWZpbmUJQUFJTQkJMHgwMDQwCS8qIEVuYWJsZSBBYm9ydCBBY2tub3dsZWRnZSBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlSTUxJTQkJMHgwMDgwCS8qIEVuYWJsZSBSWCBNZXNzYWdlIExvc3QgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVVDRUlNCQkweDAxMDAJLyogRW5hYmxlIFVuaXZlcnNhbCBDb3VudGVyIE92ZXJmbG93IEludGVycnVwdCAgICAgICAgICAqLwotI2RlZmluZQlFWFRJTQkJMHgwMjAwCS8qIEVuYWJsZSBFeHRlcm5hbCBUcmlnZ2VyIE91dHB1dCBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlBRElNCQkweDA0MDAJLyogRW5hYmxlIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0dJUyBNYXNrcwkJCQkJCQkJCQkJCQkJCSovCi0jZGVmaW5lCUVXVElTCQkweDAwMDEJLyogVFggRXJyb3IgQ291bnQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVXUklTCQkweDAwMDIJLyogUlggRXJyb3IgQ291bnQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVQSVMJCTB4MDAwNAkvKiBFcnJvci1QYXNzaXZlIE1vZGUgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQk9JUwkJMHgwMDA4CS8qIEJ1cyBPZmYgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdVSVMJCTB4MDAxMAkvKiBXYWtlLVVwIElSUSBTdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVSUFJUwkJMHgwMDIwCS8qIEFjY2VzcyBUbyBVbmltcGxlbWVudGVkIEFkZHJlc3MgSVJRIFN0YXR1cyAgICovCi0jZGVmaW5lCUFBSVMJCTB4MDA0MAkvKiBBYm9ydCBBY2tub3dsZWRnZSBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJUk1MSVMJCTB4MDA4MAkvKiBSWCBNZXNzYWdlIExvc3QgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNFSVMJCTB4MDEwMAkvKiBVbml2ZXJzYWwgQ291bnRlciBPdmVyZmxvdyBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVYVElTCQkweDAyMDAJLyogRXh0ZXJuYWwgVHJpZ2dlciBPdXRwdXQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlBRElTCQkweDA0MDAJLyogQWNjZXNzIERlbmllZCBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0dJRiBNYXNrcwkJCQkJCQkJCQkJCQkJCSovCi0jZGVmaW5lCUVXVElGCQkweDAwMDEJLyogVFggRXJyb3IgQ291bnQgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVdSSUYJCTB4MDAwMgkvKiBSWCBFcnJvciBDb3VudCBJUlEgRmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFUElGCQkweDAwMDQJLyogRXJyb3ItUGFzc2l2ZSBNb2RlIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUJPSUYJCTB4MDAwOAkvKiBCdXMgT2ZmIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdVSUYJCTB4MDAxMAkvKiBXYWtlLVVwIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVVJQUlGCQkweDAwMjAJLyogQWNjZXNzIFRvIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJUlEgRmxhZyAgICAgICAgICAgICAqLwotI2RlZmluZQlBQUlGCQkweDAwNDAJLyogQWJvcnQgQWNrbm93bGVkZ2UgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVJNTElGCQkweDAwODAJLyogUlggTWVzc2FnZSBMb3N0IElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNFSUYJCTB4MDEwMAkvKiBVbml2ZXJzYWwgQ291bnRlciBPdmVyZmxvdyBJUlEgRmxhZyAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVYVElGCQkweDAyMDAJLyogRXh0ZXJuYWwgVHJpZ2dlciBPdXRwdXQgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUFESUYJCTB4MDQwMAkvKiBBY2Nlc3MgRGVuaWVkIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fVUNDTkYgTWFza3MJCQkJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlVQ0NORgkJMHgwMDBGCS8qIFVuaXZlcnNhbCBDb3VudGVyIE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1NUQU1QCTB4MDAwMQkvKiAgICAgICAgICAgICAgVGltZXN0YW1wIE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1dET0cJCTB4MDAwMgkvKiAgICAgICAgICAgICAgV2F0Y2hkb2cgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX0FVVE9UWAkweDAwMDMJLyogICAgICAgICAgICAgIEF1dG8tVHJhbnNtaXQgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19FUlJPUgkweDAwMDYJLyogICAgICAgICAgICAgIENBTiBFcnJvciBGcmFtZSBDb3VudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgVUNfT1ZFUgkJMHgwMDA3CS8qICAgICAgICAgICAgICBDQU4gT3ZlcmxvYWQgRnJhbWUgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX0xPU1QJCTB4MDAwOAkvKiAgICAgICAgICAgICAgQXJiaXRyYXRpb24gTG9zdCBEdXJpbmcgVFggQ291bnQgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgVUNfQUEJCTB4MDAwOQkvKiAgICAgICAgICAgICAgVFggQWJvcnQgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1RBCQkweDAwMEEJLyogICAgICAgICAgICAgIFRYIFN1Y2Nlc3NmdWwgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19SRUpFQ1QJMHgwMDBCCS8qICAgICAgICAgICAgICBSWCBNZXNzYWdlIFJlamVjdGVkIENvdW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JNTAkJMHgwMDBDCS8qICAgICAgICAgICAgICBSWCBNZXNzYWdlIExvc3QgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JYCQkweDAwMEQJLyogICAgICAgICAgICAgIFRvdGFsIFN1Y2Nlc3NmdWwgUlggTWVzc2FnZXMgQ291bnQgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JNUAkJMHgwMDBFCS8qICAgICAgICAgICAgICBTdWNjZXNzZnVsIFJYIFcvTWF0Y2hpbmcgSUQgQ291bnQgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19BTEwJCTB4MDAwRgkvKiAgICAgICAgICAgICAgQ29ycmVjdCBNZXNzYWdlIE9uIENBTiBCdXMgTGluZSBDb3VudCAgICovCi0jZGVmaW5lCVVDUkMJCTB4MDAyMAkvKiBVbml2ZXJzYWwgQ291bnRlciBSZWxvYWQvQ2xlYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNDVAkJMHgwMDQwCS8qIFVuaXZlcnNhbCBDb3VudGVyIENBTiBUcmlnZ2VyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVQ0UJCQkweDAwODAJLyogVW5pdmVyc2FsIENvdW50ZXIgRW5hYmxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0VTUiBNYXNrcwkJCQkJCQkJCQkqLwotI2RlZmluZQlBQ0tFCQkweDAwMDQJLyogQWNrbm93bGVkZ2UgRXJyb3IgICAgICAgICAgICAqLwotI2RlZmluZQlTRVIJCQkweDAwMDgJLyogU3R1ZmYgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICovCi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ICAgICAgIEROTSAgMHgyICAgICAgICAvKiBEZXZpY2VOZXQgTW9kZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgQUJPICAweDQgICAgICAgIC8qIEF1dG8gQnVzIE9uICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBXQkEgIDB4MTAgICAgICAgLyogV2FrZXVwIE9uIENBTiBCdXMgQWN0aXZpdHkgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNNUiAgMHgyMCAgICAgICAvKiBTbGVlcCBNb2RlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIENTUiAgMHg0MCAgICAgICAvKiBDQU4gU3VzcGVuZCBNb2RlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIENDUiAgMHg4MCAgICAgICAvKiBDQU4gQ29uZmlndXJhdGlvbiBNb2RlIFJlcXVlc3QgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1NUQVRVUyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICAgV1QgIDB4MSAgICAgICAgLyogQ0FOIFRyYW5zbWl0IFdhcm5pbmcgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgIFdSICAweDIgICAgICAgIC8qIENBTiBSZWNlaXZlIFdhcm5pbmcgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgIEVQICAweDQgICAgICAgIC8qIENBTiBFcnJvciBQYXNzaXZlIE1vZGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEVCTyAgMHg4ICAgICAgICAvKiBDQU4gRXJyb3IgQnVzIE9mZiBNb2RlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBDU0EgIDB4NDAgICAgICAgLyogQ0FOIFN1c3BlbmQgTW9kZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgQ0NBICAweDgwICAgICAgIC8qIENBTiBDb25maWd1cmF0aW9uIE1vZGUgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQlBUUiAgMHgxZjAwICAgICAvKiBNYWlsYm94IFBvaW50ZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFRSTSAgMHg0MDAwICAgICAvKiBUcmFuc21pdCBNb2RlIFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgUkVDICAweDgwMDAgICAgIC8qIFJlY2VpdmUgTW9kZSBTdGF0dXMgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0RFQlVHICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERFQyAgMHgxICAgICAgICAvKiBEaXNhYmxlIFRyYW5zbWl0L1JlY2VpdmUgRXJyb3IgQ291bnRlcnMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERSSSAgMHgyICAgICAgICAvKiBEaXNhYmxlIENBTlJYIElucHV0IFBpbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgRFRPICAweDQgICAgICAgIC8qIERpc2FibGUgQ0FOVFggT3V0cHV0IFBpbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgRElMICAweDggICAgICAgIC8qIERpc2FibGUgSW50ZXJuYWwgTG9vcCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUFBICAweDEwICAgICAgIC8qIE1vZGUgQXV0by1BY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTVJCICAweDIwICAgICAgIC8qIE1vZGUgUmVhZCBCYWNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBDREUgIDB4ODAwMCAgICAgLyogQ0FOIERlYnVnIE1vZGUgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9DTE9DSyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBCUlAgIDB4M2ZmICAgICAgLyogQ0FOIEJpdCBSYXRlIFByZXNjYWxlciAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfVElNSU5HICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNKVyAgMHgzMDAgICAgICAvKiBTeW5jaHJvbml6YXRpb24gSnVtcCBXaWR0aCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgU0FNICAweDgwICAgICAgIC8qIFNhbXBsaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFNFRzIgIDB4NzAgICAgICAgLyogVGltZSBTZWdtZW50IDIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUU0VHMSAgMHhmICAgICAgICAvKiBUaW1lIFNlZ21lbnQgMSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfSU5UUiAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgQ0FOUlggIDB4ODAgICAgICAgLyogU2VyaWFsIElucHV0IEZyb20gVHJhbnNjZWl2ZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBDQU5UWCAgMHg0MCAgICAgICAvKiBTZXJpYWwgT3V0cHV0IFRvIFRyYW5zY2VpdmVyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgU01BQ0sgIDB4OCAgICAgICAgLyogU2xlZXAgTW9kZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBHSVJRICAweDQgICAgICAgIC8qIEdsb2JhbCBJbnRlcnJ1cHQgUmVxdWVzdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElSUSAgMHgyICAgICAgICAvKiBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBSZXF1ZXN0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJUlEgIDB4MSAgICAgICAgLyogTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBSZXF1ZXN0ICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9HSU0gKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEVXVElNICAweDEgICAgICAgIC8qIEVycm9yIFdhcm5pbmcgVHJhbnNtaXQgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBFV1JJTSAgMHgyICAgICAgICAvKiBFcnJvciBXYXJuaW5nIFJlY2VpdmUgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJTSAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEJPSU0gIDB4OCAgICAgICAgLyogQnVzIE9mZiBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBXVUlNICAweDEwICAgICAgIC8qIFdha2V1cCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlNICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQUlNICAweDQwICAgICAgIC8qIEFib3J0IEFja25vd2xlZGdlIEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MSU0gIDB4ODAgICAgICAgLyogUmVjZWl2ZSBNZXNzYWdlIExvc3QgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJTSAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBRElNICAweDQwMCAgICAgIC8qIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0IE1hc2sgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0dJUyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgRVdUSVMgIDB4MSAgICAgICAgLyogRXJyb3IgV2FybmluZyBUcmFuc21pdCBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgRVdSSVMgIDB4MiAgICAgICAgLyogRXJyb3IgV2FybmluZyBSZWNlaXZlIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJUyAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQk9JUyAgMHg4ICAgICAgICAvKiBCdXMgT2ZmIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgV1VJUyAgMHgxMCAgICAgICAvKiBXYWtldXAgSW50ZXJydXB0IFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlTICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBSVMgIDB4NDAgICAgICAgLyogQWJvcnQgQWNrbm93bGVkZ2UgSW50ZXJydXB0IFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTElTICAweDgwICAgICAgIC8qIFJlY2VpdmUgTWVzc2FnZSBMb3N0IEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJUyAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFESVMgIDB4NDAwICAgICAgLyogQWNjZXNzIERlbmllZCBJbnRlcnJ1cHQgU3RhdHVzICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9HSUYgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEVXVElGICAweDEgICAgICAgIC8qIEVycm9yIFdhcm5pbmcgVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBFV1JJRiAgMHgyICAgICAgICAvKiBFcnJvciBXYXJuaW5nIFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJRiAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEJPSUYgIDB4OCAgICAgICAgLyogQnVzIE9mZiBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBXVUlGICAweDEwICAgICAgIC8qIFdha2V1cCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlGICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQUlGICAweDQwICAgICAgIC8qIEFib3J0IEFja25vd2xlZGdlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MSUYgIDB4ODAgICAgICAgLyogUmVjZWl2ZSBNZXNzYWdlIExvc3QgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJRiAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBRElGICAweDQwMCAgICAgIC8qIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0IEZsYWcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CVEQgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgVERSICAweDgwICAgICAgIC8qIFRlbXBvcmFyeSBEaXNhYmxlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFREQSAgMHg0MCAgICAgICAvKiBUZW1wb3JhcnkgRGlzYWJsZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFREUFRSICAweDFmICAgICAgIC8qIFRlbXBvcmFyeSBEaXNhYmxlIFBvaW50ZXIgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1VDQ05GICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0NORiAgMHhmICAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBDb25maWd1cmF0aW9uICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFVDUkMgIDB4MjAgICAgICAgLyogVW5pdmVyc2FsIENvdW50ZXIgUmVsb2FkL0NsZWFyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFVDQ1QgIDB4NDAgICAgICAgLyogVW5pdmVyc2FsIENvdW50ZXIgQ0FOIFRyaWdnZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFVDRSAgMHg4MCAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFbmFibGUgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0NFQyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBSWEVDTlQgIDB4ZmYgICAgICAgLyogUmVjZWl2ZSBFcnJvciBDb3VudGVyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBUWEVDTlQgIDB4ZmYwMCAgICAgLyogVHJhbnNtaXQgRXJyb3IgQ291bnRlciAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfRVNSICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEZFUiAgMHg4MCAgICAgICAvKiBGb3JtIEVycm9yICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBCRUYgIDB4NDAgICAgICAgLyogQml0IEVycm9yIEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNBMCAgMHgyMCAgICAgICAvKiBTdHVjayBBdCBEb21pbmFudCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBDUkNFICAweDEwICAgICAgIC8qIENSQyBFcnJvciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgU0VSICAweDggICAgICAgIC8qIFN0dWZmIEJpdCBFcnJvciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQ0tFICAweDQgICAgICAgIC8qIEFja25vd2xlZGdlIEVycm9yICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9FV1IgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgRVdMVEVDICAweGZmMDAgICAgIC8qIFRyYW5zbWl0IEVycm9yIFdhcm5pbmcgTGltaXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIEVXTFJFQyAgMHhmZiAgICAgICAvKiBSZWNlaXZlIEVycm9yIFdhcm5pbmcgTGltaXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0FNeHhfSCAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBGREYgIDB4ODAwMCAgICAgLyogRmlsdGVyIE9uIERhdGEgRmllbGQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEZNRCAgMHg0MDAwICAgICAvKiBGdWxsIE1hc2sgRGF0YSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEFNSURFICAweDIwMDAgICAgIC8qIEFjY2VwdGFuY2UgTWFzayBJZGVudGlmaWVyIEV4dGVuc2lvbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgQkFTRUlEICAweDFmZmMgICAgIC8qIEJhc2UgSWRlbnRpZmllciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgIEVYVElEX0hJICAweDMgICAgICAgIC8qIEV4dGVuZGVkIElkZW50aWZpZXIgSGlnaCBCaXRzICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9BTXh4X0wgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgIEVYVElEX0xPICAweGZmZmYgICAgIC8qIEV4dGVuZGVkIElkZW50aWZpZXIgTG93IEJpdHMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERGTSAgMHhmZmZmICAgICAvKiBEYXRhIEZpZWxkIE1hc2sgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CeHhfSUQxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEFNRSAgMHg4MDAwICAgICAvKiBBY2NlcHRhbmNlIE1hc2sgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBSVFIgIDB4NDAwMCAgICAgLyogUmVtb3RlIFRyYW5zbWlzc2lvbiBSZXF1ZXN0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBJREUgIDB4MjAwMCAgICAgLyogSWRlbnRpZmllciBFeHRlbnNpb24gKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIEJBU0VJRCAgMHgxZmZjICAgICAvKiBCYXNlIElkZW50aWZpZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAg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otCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTQgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFNSAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgNSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMCAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTYgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDYgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFNyAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgNyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUMxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUMyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUM1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUM4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9NQzIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjYgIDB4NDAwICAgICAgLyogTWFpbGJveCAyNiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjkgIDB4MjAwMCAgICAgLyogTWFpbGJveCAyOSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9NRDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZWNlaXZlIEVuYWJsZSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUQyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDE4ICAweDQgICAgICAgIC8qIE1haWxib3ggMTggUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDIxICAweDIwICAgICAgIC8qIE1haWxib3ggMjEgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDI0ICAweDEwMCAgICAgIC8qIE1haWxib3ggMjQgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjYgIDB4NDAwICAgICAgLyogTWFpbGJveCAyNiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDI3ICAweDgwMCAgICAgIC8qIE1haWxib3ggMjcgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjkgIDB4MjAwMCAgICAgLyogTWFpbGJveCAyOSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDMwICAweDQwMDAgICAgIC8qIE1haWxib3ggMzAgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQzMSAgMHg4MDAwICAgICAvKiB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IFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUk1QOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAxMCAgMHg0MDAgICAgICAvKiBNYWlsYm94IDEwIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAxMyAgMHgyMDAwICAgICAvKiBNYWlsYm94IDEzIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JNUDIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JNTDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfUk1MMiAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTYgIDB4MSAgICAgICAgLyogTWFpbGJveCAxNiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTkgIDB4OCAgICAgICAgLyogTWFpbGJveCAxOSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMjIgIDB4NDAgICAgICAgLyogTWFpbGJveCAyMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAg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UgICAgICAgICAgICAgICAgICAgICBPUFNTMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgT3ZlcndyaXRlIFByb3RlY3Rpb24vU2luZ2xlLVNob3QgVHJhbnNtaXNzaW9uIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1MzICAweDggICAgICAgIC8qIE1haWxib3ggMyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgT1BTUzQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IE92ZXJ3cml0ZSBQcm90ZWN0aW9uL1NpbmdsZS1TaG90IFRyYW5zbWlzc2lvbiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBPUFNTNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgT3ZlcndyaXRlIFByb3RlY3Rpb24vU2luZ2xlLVNob3QgVHJhbnNtaXNzaW9uIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1M2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgT1BTUzcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IE92ZXJ3cml0ZSBQcm90ZWN0aW9uL1NpbmdsZS1TaG90IFRyYW5zbWlzc2lvbiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBPUFNTOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggT3ZlcndyaXRlIFByb3RlY3Rpb24vU2luZ2xlLVNob3QgVHJhbnNtaXNzaW9uIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1M5ICAweDIwMCAg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MTYgIDB4MSAgICAgICAgLyogTWFpbGJveCAxNiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTkgIDB4OCAgICAgICAgLyogTWFpbGJveCAxOSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjIgIDB4NDAgICAgICAgLyogTWFpbGJveCAyMiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjUgIDB4MjAwICAgICAgLyogTWFpbGJveCAyNSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjYgIDB4NDAwICAgICAgLyogTWFpbGJveCAyNiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjggIDB4MTAwMCAgICAgLyogTWFpbGJveCAyOCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjkgIDB4MjAwMCAgICAgLyogTWFpbGJveCAyOSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU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BTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJTOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJTOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxMCAgMHg0MDAgICAgICAvKiBNYWlsYm94IDEwIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxMyAgMHgyMDAwICAgICAvKiBNYWlsYm94IDEzIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RSUzIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RSUjEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlIwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlIzICAweDggICAgICAgIC8qIE1haWxib3ggMyBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlI2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlI5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAg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iBNYWlsYm94IDI0IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0FBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IEFib3J0IEFja25vd2xlZGdlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9BQTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9UQTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JGSDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkgwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZIMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkgzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZINSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkg2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZIOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkg5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9SRkgyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CSU0xICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU0xICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU00ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU03ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJJTTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE4ICAweDQgICAgICAgIC8qIE1haWxib3ggMTggTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIxICAweDIwICAgICAgIC8qIE1haWxib3ggMjEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI0ICAweDEwMCAgICAgIC8qIE1haWxib3ggMjQgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI2ICAweDQwMCAgICAgIC8qIE1haWxib3ggMjYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI3ICAweDgwMCAgICAgIC8qIE1haWxib3ggMjcgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI5ICAweDIwMDAgICAgIC8qIE1haWxib3ggMjkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTMwICAweDQwMDAgICAgIC8qIE1haWxib3ggMzAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJUSUYxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUYxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUY0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUY3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJUSUYyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CUklGMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUYxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUY0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUY3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJSSUYyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjI2ICAweDQwMCAgICAgIC8qIE1haWxib3ggMjYgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjI5ICAweDIwMDAgICAgIC8qIE1haWxib3ggMjkgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIE1haWxib3ggUmVjZWl2ZSBJbnR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kZS9hc20vbTUyOHhzaW0uaAppbmRleCBlMmFkMWY0Li44OTFjYmVkIDEwMDY0NAotLS0gYS9hcmNoL202OGsvaW5jbHVkZS9hc20vbTUyOHhzaW0uaAorKysgYi9hcmNoL202OGsvaW5jbHVkZS9hc20vbTUyOHhzaW0uaApAQCAtMjksNiArMjksNyBAQAogCiAjZGVmaW5lCU1DRklOVF9WRUNCQVNFCQk2NAkJLyogVmVjdG9yIGJhc2UgbnVtYmVyICovCiAjZGVmaW5lCU1DRklOVF9VQVJUMAkJMTMJCS8qIEludGVycnVwdCBudW1iZXIgZm9yIFVBUlQwICovCisjZGVmaW5lCU1DRklOVF9RU1BJCQkxOAkJLyogSW50ZXJydXB0IG51bWJlciBmb3IgUVNQSSAqLwogI2RlZmluZQlNQ0ZJTlRfUElUMQkJNTUJCS8qIEludGVycnVwdCBudW1iZXIgZm9yIFBJVDEgKi8KIAogLyoKQEAgLTI0OSw3MCArMjUwLDQgQEAKICNkZWZpbmUgTUNGNTI4Ml9JMkNfSTJTUl9SWEFLICAgKDB4MDEpICAvLyByZWNlaXZlZCBhY2tub3dsZWRnZQogCiAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKgotKiBRdWV1ZWQgU2VyaWFsIFBlcmlwaGVyYWwgSW50ZXJmYWNlIChRU1BJKSBNb2R1bGUKLSoKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIERlcmVrIC0gMjEgRmViIDIwMDUgKi8KLS8qIGNoYW5nZSB0byB0aGUgZm9ybWF0IHVzZWQgaW4gSTJDICovCi0vKiBSZWFkL1dyaXRlIGFjY2VzcyBtYWNyb3MgZm9yIGdlbmVyYWwgdXNlICovCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RTVIgICAgICAgIE1DRl9JUFNCQVIgKyAweDAzNDAKLSNk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VE8gICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0NTSVYgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0VORFFQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw4KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0NQVFFQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw0KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX05FV1FQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpKQotCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRkIgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEIgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEwgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRkUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDA4MDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDA0MDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfU1BJRkUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAxMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRiAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDgpCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDQpCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfU1BJRiAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDEpCi0KLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FBUl9BRERSKHgpICAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDNGKSkKLQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUURSX0NPTU1BTkQoeCkgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweEZGMDApKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RBVEEoeCkgICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwRkYpPDw4KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0NPTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0JJVFNFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RTQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw4KQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNlbmRpZgkvKiBtNTI4eHNpbV9oICovCmRpZmYgLS1naXQgYS9hcmNoL202OGsvaW5jbHVkZS9hc20vbTUzMnhzaW0uaCBiL2FyY2gvbTY4ay9pbmNsdWRlL2FzbS9tNTMyeHNpbS5oCmluZGV4IDM2YmYxNWEuLmM0YmYxYzggMTAwNjQ0Ci0tLSBhL2FyY2gvbTY4ay9pbmNsdWRlL2FzbS9tNTMyeHNpbS5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ArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyoKLSAqCW1jZnNtYy5oIC0tIFNNQyBldGhlcm5ldCBzdXBwb3J0IGZvciBDb2xkRmlyZSBlbnZpcm9ubWVudHMuCi0gKgotICoJKEMpIENvcHlyaWdodCAxOTk5LTIwMDIsIEdyZWcgVW5nZXJlciAoZ2VyZ0BzbmFwZ2Vhci5jb20pCi0gKgkoQykgQ29weXJpZ2h0IDIwMDAsIExpbmVvIEluYy4gKHd3dy5saW5lby5jb20pIAotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmbmRlZgltY2ZzbWNfaAotI2RlZmluZQltY2ZzbWNfaAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKglOb25lIG9mIHRoZSBjdXJyZW50IENvbGRGaXJlIHRhcmdldHMgdGhhdCB1c2UgdGhlIFNNQzkxeDExMQotICoJYWxsb3cgOCBiaXQgYWNjZXNzZXMuIFNvIHRoaXMgY29kZSBpcyAxNmJpdCBhY2Nlc3Mgb25seS4KLSAqLwotCi0KLSN1bmRlZglvdXRiCi0jdW5kZWYJaW5iCi0jdW5kZWYJb3V0dwotI3VuZGVmCW91dHdkCi0jdW5kZWYJaW53CQotI3VuZGVmCW91dGwKLSN1bmRlZglpbmwKLQotI3VuZGVmCW91dHNiCi0jdW5kZWYJb3V0c3cKLSN1bmRlZglvdXRzbAotI3VuZGVmCWluc2IKLSN1bmRlZglpbnN3Ci0jdW5kZWYJaW5zbAotCi0vKgotICoJUmUtZGVmaW5lcyBmb3IgQ29sZEZpcmUgZW52aXJvbm1lbnQuLi4gVGhlIFNNQyBwYXJ0IGlzCi0g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aXJxIHNldHVwICovCisJd3JpdGViKE1DRlNJTV9JQ1JfQVVUT1ZFQyB8IE1DRlNJTV9JQ1JfTEVWRUw0IHwgTUNGU0lNX0lDUl9QUkkwLAorCSAgICAgICBNQ0ZfTUJBUiArIE1DRlNJTV9RU1BJSUNSKTsKKwltY2ZfbWFwaXJxMmltcihNQ0ZfSVJRX1FTUEksIE1DRklOVENfUVNQSSk7Cit9CisjZW5kaWYgLyogZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUEkpIHx8IGRlZmluZWQoQ09ORklHX1NQSV9DT0xERklSRV9RU1BJX01PRFVMRSkgKi8KKworCiBzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSAqbTUyNDlfZGV2aWNlc1tdIF9faW5pdGRhdGEgPSB7CiAJJm01MjQ5X3VhcnQsCisjaWZkZWYgQ09ORklHX001MjQ5QzMKKwkmbTUyNDlfc21jOTF4LAorI2VuZGlmCisjaWYgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUEkpIHx8IGRlZmluZWQoQ09ORklHX1NQSV9DT0xERklSRV9RU1BJX01PRFVMRSkKKwkmbTUyNDlfcXNwaSwKKyNlbmRpZgogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTY3LDYgKzI1OCwyNCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisjaWZkZWYgQ09ORklHX001MjQ5QzMKKworc3RhdGljIHZvaWQgX19pbml0IG01MjQ5X3NtYzkxeF9pbml0KHZvaWQpCit7CisJdTMyICBncGlvOworCisJLyogU2V0IHRoZSBHUElPIGxpbmUgYXMgaW50ZXJydXB0IHNvdXJjZSBmb3Igc21jOTF4IGRldmljZSAqLworCWdwaW8gPSByZWFkbChNQ0ZfTU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gfHwgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUElfTU9EVUxFKQorCSZtNTI3eF9xc3BpLAorI2VuZGlmCiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTg3LDYgKzM2Niw5IEBACiAJbWFjaF9yZXNldCA9IG01Mjd4X2NwdV9yZXNldDsKIAltNTI3eF91YXJ0c19pbml0KCk7CiAJbTUyN3hfZmVjX2luaXQoKTsKKyNpZiBkZWZpbmVkKENPTkZJR19TUElfQ09MREZJUkVfUVNQSSkgfHwgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUElfTU9EVUxFKQorCW01Mjd4X3FzcGlfaW5pdCgpOworI2VuZGlmCiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81Mjh4L2NvbmZpZy5jIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNTI4eC9jb25maWcuYwppbmRleCA2ZTYwOGQxLi43NmI3NDMzIDEwMDY0NAotLS0gYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81Mjh4L2NvbmZpZy5jCisrKyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzUyOHgvY29uZmlnLmMKQEAgLTE3LDEwICsxNywxMyBAQAogI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4KICNpbmNsdWRlIDxsaW51eC9wbGF0Zm9ybV9kZXZpY2UuaD4KICNpbmNsdWRlIDxsaW51eC9pby5oPgorI2luY2x1ZGUgPGxpbnV4L3NwaS9zcGkuaD4KKyNpbmNsdWRlIDxsaW51eC9ncGlvLmg+CiAjaW5jbHVkZSA8YXNtL21hY2hkZXAuaD4KICNpbmNsdWRlID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gY2hpcCBzZWxlY3QgdGltaW5nIGZvciBTTUM5MTk2IGFjY2Vzc2VzICovCisJd3JpdGV3KDB4MTE4MCwgTUNGX01CQVIgKyBNQ0ZTSU1fQ1NDUjMpOworCisJLyogU2V0IHRoZSBTTUMgaW50ZXJydXB0cyB0byBiZSBhdXRvLXZlY3RvcmVkICovCisJbWNmX2F1dG92ZWN0b3IoTkVUVEVMX1NNQzBfSVJRKTsKKwltY2ZfYXV0b3ZlY3RvcihORVRURUxfU01DMV9JUlEpOworCisJLyogU2V0IE1BQyBhZGRyZXNzZXMgZnJvbSBmbGFzaCBmb3IgYm90aCBpbnRlcmZhY2VzICovCisJbmV0dGVsX3NtYzkxeF9zZXRtYWMoTkVUVEVMX1NNQzBfQUREUiwgMHhmMDAwNjAwMCk7CisJbmV0dGVsX3NtYzkxeF9zZXRtYWMoTkVUVEVMX1NNQzFfQUREUiwgMHhmMDAwNjAwNik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0IGluaXRfbmV0dGVsKHZvaWQpCit7CisJbmV0dGVsX3NtYzkxeF9pbml0KCk7CisJcGxhdGZvcm1fYWRkX2RldmljZXMobmV0dGVsX2RldmljZXMsIEFSUkFZX1NJWkUobmV0dGVsX2RldmljZXMpKTsKKwlyZXR1cm4gMDsKK30KKworYXJjaF9pbml0Y2FsbChpbml0X25ldHRlbCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81MzJ4L2NvbmZpZy5jIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNTMyeC9jb25maWcuYwppbmRleCBkNjMyOTQ4Li5jYTUxMzIzIDEwMDY0NAotLS0gYS9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lIEZvdW5kYXRpb24uCisgKgorICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCisgKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgorICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQorICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KKyAqCisgKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQorICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKKyAqIEZvdW5kYXRpb24sIDUxIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgIDAyMTEwLTEzMDEsIFVTQS4KKyAqCisgKiBDb3B5cmlnaHQgU1VTRSBMaW51eCBQcm9kdWN0cyBHbWJIIDIwMDkKKyAqCisgKiBBdXRob3JzOiBBbGV4YW5kZXIgR3JhZiA8YWdyYWZAc3VzZS5kZT4KKyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnRyeSBjb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy5tYWNybyBMT0FEX0dVRVNUX1NFR01FTlRTCisKKwkvKiBSZXF1aXJlZCBzdGF0ZToKKwkgKgorCSAqIE1TUiA9IH5JUnxEUgorCSAqIFIxID0gaG9zdCBSMQorCSAqIFIyID0gaG9zdCBSMgorCSAqIFIzID0gc2hhZG93IHZjcHUKKwkgKiBhbGwgb3RoZXIgdm9sYXRpbGUgR1BSUyA9IGZyZWUKKwkgKiBTVkNQVVtDUl0gID0gZ3Vlc3QgQ1IKKwkgKiBTVkNQVVtYRVJdID0gZ3Vlc3QgWEVSCisJICogU1ZDUFVbQ1RSXSA9IGd1ZXN0IENUUgorCSAqIFNWQ1BVW0xSXSAgPSBndWVzdCBMUgorCSAqLworCisjZGVmaW5lIFhDSEdfU1IobikJbHd6CXI5LCAoU1ZDUFVfU1IrKG4qNCkpKHIzKTsgIFwKKwkJCW10c3IJbiwgcjkKKworCVhDSEdfU1IoMCkKKwlYQ0hHX1NSKDEpCisJWENIR19TUigyKQorCVhDSEdfU1IoMykKKwlYQ0hHX1NSKDQpCisJWENIR19TUig1KQorCVhDSEdfU1IoNikKKwlYQ0hHX1NSKDcpCisJWENIR19TUig4KQorCVhDSEdfU1IoOSkKKwlYQ0hHX1NSKDEwKQorCVhDSEdfU1IoMTEpCisJWENIR19TUigxMikKKwlYQ0hHX1NSKDEzKQorCVhDSEdfU1IoMTQpCisJWENIR19TUigxNSkKKworCS8qIENsZWFyIEJBVHMuICovCisKKyNkZWZpbmUgS1ZNX0tJTExfQkFUKG4sIHJlZykJCVwKKyAgICAgICAgbXRzcHIgICBTUFJOX0lCQVQjI24jI1UscmVnOwlcCisgICAgICAgIG10c3ByICAgU1BSTl9JQkFUIyNuIyNMLHJlZzsJXAorICAgICAgICBtdHNwciAgIFNQUk5fREJBVCMjbiMjVSxyZWc7CVwKKyAgICAgICAgbXRzcHIgICBTUFJOX0RCQVQjI24jI0wscmVnOwlcCisKKyAgICAgICAgbGkJcjksIDAKKwlLVk1fS0lMTF9CQVQoMCwgcjkpCisJS1ZNX0tJTExfQkFUKDEsIHI5KQorCUtWTV9LSUxMX0JBVCgyLCByOSkKKwlLVk1fS0lMTF9CQVQoMywgcjkpCisKKy5lbmRtCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEV4aXQgY29kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLm1hY3JvIExPQURfSE9TVF9TRUdNRU5UUworCisJLyogUmVnaXN0ZXIgdXNhZ2UgYXQgdGhpcyBwb2ludDoKKwkgKgorCSAqIFIxICAgICAgICAgPSBob3N0IFIxCisJICogUjIgICAgICAgICA9IGhvc3QgUjIKKwkgKiBSMTIgICAgICAgID0gZXhpdCBoYW5kbGVyIGlkCisJICogUjEzICAgICAgICA9IHNoYWRvdyB2Y3B1IC0gU0hBRE9XX1ZDUFVfT0ZGCisJICogU1ZDUFUuKiAgICA9IGd1ZXN0ICoKKwkgKiBTVkNQVVtDUl0gID0gZ3Vlc3QgQ1IKKwkgKiBTVkNQVVtYRVJdID0gZ3Vlc3QgWEVSCisJICogU1ZDUFVb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FfS1ZNX1IxMSkocjEzKQotCWxkCXIxMywgKFBBQ0FfS1ZNX1IxMykocjEzKQotCi0JUkZJCi1rdm1wcGNfaGFuZGxlcl90cmFtcG9saW5lX2VudGVyX2VuZDoKLQotCisuZW5kbQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0xNjIsOTkgKzEyOCwyMiBAQAogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0uZ2xvYmFsIGt2bXBwY19oYW5kbGVyX3RyYW1wb2xpbmVfZXhpdAota3ZtcHBjX2hhbmRsZXJfdHJhbXBvbGluZV9leGl0OgorLm1hY3JvIExPQURfSE9TVF9TRUdNRU5UUwogCiAJLyogUmVnaXN0ZXIgdXNhZ2UgYXQgdGhpcyBwb2ludDoKIAkgKgotCSAqIFNQUkdfU0NSQVRDSDAgICAgID0gZ3Vlc3QgUjEzCi0JICogUjEyICAgICAgICAgICAgICAgPSBleGl0IGhhbmRsZXIgaWQKLQkgKiBSMTMgICAgICAgICAgICAgICA9IFBBQ0EKLQkgKiBQQUNBLktWTS5TQ1JBVENIMCA9IGd1ZXN0IFIxMgotCSAqIFBBQ0EuS1ZNLlNDUkFUQ0gxID0gZ3Vlc3QgQ1IKKwkgKiBSMSAgICAgICAgID0gaG9zdCBSMQorCSAqIFIyICAgICAgICAgPSBob3N0IFIyCisJICogUjEyICAgICAgICA9IGV4aXQgaGFuZGxlciBpZAorCSAqIFIxMyAgICAgICAgPSBzaGFkb3cg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pb24tNjRzLmg+CisjZW5kaWYKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTMwLDYgKzMzLDM5IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisjaWYgZGVmaW5lZChDT05GSUdfUFBDX0JPT0szU182NCkKKworI2RlZmluZSBMT0FEX1NIQURPV19WQ1BVKHJlZykJCQkJXAorCW1mc3ByCXJlZywgU1BSTl9TUFJHX1BBQ0EKKworI2RlZmluZSBTSEFET1dfVkNQVV9PRkYJCVBBQ0FfS1ZNX1NWQ1BVCisjZGVmaW5lIE1TUl9OT0lSUQkJTVNSX0tFUk5FTCAmIH4oTVNSX0lSIHwgTVNSX0RSKQorI2RlZmluZSBGVU5DKG5hbWUpIAkJR0xVRSguLG5hbWUpCisKKyNlbGlmIGRlZmluZWQoQ09ORklHX1BQQ19CT09LM1NfMzIpCisKKyNkZWZpbmUgTE9BRF9TSEFET1dfVkNQVShyZWcpCQkJCQkJXAorCW1mc3ByCXJlZywgU1BSTl9TUFJHX1RIUkVBRDsJCQkJCVwKKwlsd3oJcmVnLCBUSFJFQURfS1ZNX1NWQ1BVKHJlZyk7CQkJCVwKKwkvKiBQUEMzMiBjYW4gaGF2ZSBhIE5VTEwgcG9pbnRlciAtIGxldCdzIGNoZWNrIGZvciB0aGF0ICovCVwKKwltdHNwciAgIFNQUk5fU1BSR19TQ1JBVENIMSwgcjEyOwkvKiBTYXZlIHIxMiAqLwkJXAorCW1mY3IJc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WcpCisKKyNlbmRpZgorCisvKiBEaXNhYmxlIGZvciBuZXN0ZWQgS1ZNICovCisjZGVmaW5lIFVTRV9RVUlDS19MQVNUX0lOU1QKKworCisvKiBHZXQgaGVscGVyIGZ1bmN0aW9ucyBmb3Igc3ViYXJjaCBzcGVjaWZpYyBmdW5jdGlvbmFsaXR5ICovCisKKyNpZiBkZWZpbmVkKENPTkZJR19QUENfQk9PSzNTXzY0KQorI2luY2x1ZGUgImJvb2szc182NF9zbGIuUyIKKyNlbGlmIGRlZmluZWQoQ09ORklHX1BQQ19CT09LM1NfMzIpCisjaW5jbHVkZSAiYm9vazNzXzMyX3NyLlMiCisjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW50cnkgY29kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisuZ2xvYmFsIGt2bXBwY19oYW5kbGVyX3RyYW1wb2xpbmVfZW50ZXIKK2t2bXBwY19oYW5kbGVyX3RyYW1wb2xpbmVfZW50ZXI6CisKKwkvKiBSZXF1aXJlZCBzdGF0ZToKKwkgKgorCSAqIE1TUiA9IH5JUnxEUgorCSAqIFIxMyA9IFBBQ0EKKwkgKiBSMSA9IGhvc3QgUjEKKwkgKiBSMiA9IGhvc3QgUjIKKwkgKiBSMTAgPSBndWVzdCBNU1IKKwkgKiBhbGwgb3RoZ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KHIzKQorCVBQQ19MTAlyNiwgKFNWQ1BVX1I2KShyMykKKwlQUENfTEwJcjcsIChTVkNQVV9SNykocjMpCisJUFBDX0xMCXI4LCAoU1ZDUFVfUjgpKHIzKQorCVBQQ19MTAlyOSwgKFNWQ1BVX1I5KShyMykKKwlQUENfTEwJcjEwLCAoU1ZDUFVfUjEwKShyMykKKwlQUENfTEwJcjExLCAoU1ZDUFVfUjExKShyMykKKwlQUENfTEwJcjEyLCAoU1ZDUFVfUjEyKShyMykKKwlQUENfTEwJcjEzLCAoU1ZDUFVfUjEzKShyMykKKworCVBQQ19MTAlyMywgKFNWQ1BVX1IzKShyMykKKworCVJGSQora3ZtcHBjX2hhbmRsZXJfdHJhbXBvbGluZV9lbnRlcl9lbmQ6CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFeGl0IGNvZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy5nbG9iYWwga3ZtcHBjX2hhbmRsZXJfdHJhbXBvbGluZV9leGl0Citrdm1wcGNfaGFuZGxlcl90cmFtcG9saW5lX2V4aXQ6CisKKwkvKiBSZWdpc3RlciB1c2FnZSBhdCB0aGlzIHBvaW50OgorCSAqCisJICogU1BSR19TQ1JBVENIMCAgPSBndWVzdCBSMTMKKwkgKiBSMTIgICAgICAgICAgICA9IGV4aXQ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dF9vZmZzZXQsIG91dF9jb3VudCAtIG91dF9vZmZzZXQsCiAJCQkgICAgICAgImhvc3RfY29ubmVjdGVkOiAlZFxuIiwgcG9ydC0+aG9zdF9jb25uZWN0ZWQpOwogCW91dF9vZmZzZXQgKz0gc25wcmludGYoYnVmICsgb3V0X29mZnNldCwgb3V0X2NvdW50IC0gb3V0X29mZnNldCwKKwkJCSAgICAgICAib3V0dnFfZnVsbDogJWRcbiIsIHBvcnQtPm91dHZxX2Z1bGwpOworCW91dF9vZmZzZXQgKz0gc25wcmludGYoYnVmICsgb3V0X29mZnNldCwgb3V0X2NvdW50IC0gb3V0X29mZnNldCwKIAkJCSAgICAgICAiaXNfY29uc29sZTogJXNcbiIsCiAJCQkgICAgICAgaXNfY29uc29sZV9wb3J0KHBvcnQpID8gInllcyIgOiAibm8iKTsKIAlvdXRfb2Zmc2V0ICs9IHNucHJpbnRmKGJ1ZiArIG91dF9vZmZzZXQsIG91dF9jb3VudCAtIG91dF9vZmZzZXQsCkBAIC04NzUsNiArOTQ3LDE1MyBAQAogCS5yZWFkICA9IGRlYnVnZnNfcmVhZCwKIH07CiAKK3N0YXRpYyB2b2lkIHNldF9jb25zb2xlX3NpemUoc3RydWN0IHBvcnQgKnBvcnQsIHUxNiByb3dzLCB1MTYgY29scykKK3sKKwlpZiAoIXBvcnQgfHwgIWlzX2NvbnNvbGVfcG9ydChwb3J0KSkKKwkJcmV0dXJuOworCisJcG9ydC0+Y29ucy53cy53c19yb3cgPSByb3dzOworCXBvcnQtPmNvbnMud3Mud3NfY29sID0gY29sczsKK30KKworc3RhdGljIHVuc2lnbmVkIGludCBmaWxsX3F1ZXVlKHN0cnVjdCB2aXJ0cXVldWUgKnZxLCBzcGlubG9ja190ICpsb2NrKQoreworCXN0cnVjdCBwb3J0X2J1ZmZlciAqYnVmOworCXVuc2lnbmVkIGludCBucl9hZGRlZF9idWZzOworCWludCByZXQ7CisKKwlucl9hZGRlZF9idWZzID0gMDsKKwlkbyB7CisJCWJ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za19FcnJJbnRNYXNrXzFfUk1BU0sgMHgxCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX0xTQiAweDFFCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX01TQiAweDFFCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX1JNQVNLIDB4MQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX0VyckludE1hc2tfTFNCIDB4MUQKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19FcnJJbnRNYXNrX01TQiAweDFECisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza19STUFTSyAweDEKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19Bc3NlcnRHUElPSW50TWFza19MU0IgMHgxQworI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX0Fzc2VydEdQSU9JbnRNYXNrX01TQiAweDFDCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfQXNzZXJ0R1BJT0ludE1hc2tfUk1BU0sgMHgxCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfU2VuZERvbmVJbnRNYXNrXzFfTFNCIDB4MTkKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kRG9uZUludE1hc2tfMV9NU0IgMHgxOQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX1NlbmREb25lSW50TWFza18xX1JNQVNLIDB4MQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX1NlbmREb25lSW50TWFza18wX0xTQiAweDE4CisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfU2VuZERvbmVJbnRNYXNrXzBfTVNCIDB4MTgKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kRG9uZUludE1hc2tfMF9STUFTSyAweDEKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kQnVmQXZhaWxJbnRNYXNrX0xTQiAweDE3Cisj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wZWMtPnBvcnRjbnRycykKKwkJcWliX2Rldl9lcnIoZGQsICJGYWlsZWQgYWxsb2NhdGlvbiBmb3IgcG9ydGNvdW50ZXJzXG4iKTsKK30KKworc3RhdGljIHUzMiBxaWJfcmVhZF82MTIwY250cnMoc3RydWN0IHFpYl9kZXZkYXRhICpkZCwgbG9mZl90IHBvcywgY2hhciAqKm5hbWVwLAorCQkJICAgICAgdTY0ICoqY250cnApCit7CisJdTMyIHJldDsKKworCWlmIChuYW1lcCkgeworCQlyZXQgPSBkZC0+Y3NwZWMtPmNudHJuYW1lbGVuOworCQlpZiAocG9zID49IHJldCkKKwkJCXJldCA9IDA7IC8qIGZpbmFsIHJlYWQgYWZ0ZXIgZ2V0dGluZyBldmVyeXRoaW5nICovCisJCWVsc2UKKwkJCSpuYW1lcCA9IChjaGFyICopY250cjYxMjBuYW1lczsKKwl9IGVsc2UgeworCQl1NjQgKmNudHIgPSBkZC0+Y3NwZWMtPmNudHJzOworCQlpbnQgaTsKKworCQlyZXQgPSBkZC0+Y3NwZWMtPm5jbnRycyAqIHNpemVvZih1NjQpOworCQlpZiAoIWNudHIgfHwgcG9zID49IHJldCkgeworCQkJLyogZXZlcnl0aGluZyByZWFkLCBvciBjb3VsZG4ndCBnZXQgbWVtb3J5ICovCisJCQlyZXQgPSAwOworCQkJZ290byBkb25lOworCQl9CisJCWlmIChwb3MgPj0gcmV0KSB7CisJCQlyZXQgPSAwOyAvKiBmaW5hbCByZWFkIGFmdGVyIGdldHRpbmcgZXZlcnl0aGluZyAqLworCQkJZ290byBkb25lOworCQl9CisJCSpjbnRycCA9IGNudHI7CisJCWZvciAoaSA9IDA7IGkgPCBkZC0+Y3NwZWMtPm5jbnRyczsgaSsrKQorCQkJKmNudHIrKyA9IHJlYWRfNjEyMF9jcmVnMzIoZGQsIGNudHI2MTIwaW5kaWNlc1tpXSk7CisJfQorZG9uZToKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgdTMyIHFpYl9yZWFkXzYxMj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sgLyogTW9sZXggMm0gMjhhd2cgTm9FcSAqLworCQl7IDB4MDAsIDB4MDksIDB4M0EgfSwgIjc0NzU3LTIyMDEgICAgICAiLAorCQl7ICAwLCAgMCwgIDAsICA2IH0sIHsgIDAsICAwLCAgMCwgIDkgfSwgeyAgMCwgIDEsICAxLCAxNSB9LAorCX0sCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19zZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMCwgIDAsICAxIH0sCS8qICAyIGRCICovCisJeyAgMCwgMCwgIDAsICAyIH0sCS8qICAzIGRCICovCisJeyAgMCwgMCwgIDAsICAzIH0sCS8qICA0IGRCICovCisJeyAgMCwgMCwgIDAsICA0IH0sCS8qICA1IGRCICovCisJeyAgMCwgMCwgIDAsICA1IH0sCS8qICA2IGRCICovCisJeyAgMCwgMCwgIDAsICA2IH0sCS8qICA3IGRCICovCisJeyAgMCwgMCwgIDAsICA3IH0sCS8qICA4IGRCICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICA5IGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qIDEwIGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qIDExIGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qIDEyIGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDEzIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDE0IGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE1IGRCICovCisJeyAgMCwgMCwgIDAsIDE1IH0sCS8qIDE2IGRCICovCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19kZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICAyIGRCICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICAzIGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qICA0IGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qICA1IGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qICA2IGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qICA3IGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qICA4IGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qICA5IGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDEwIGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDExIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDEyIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDEzIGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE0IGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE1IGRCICovCisJeyAgMCwgMCwgIDAsIDE1IH0sCS8qIDE2IGRCICovCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19xZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMSwgIDAsICA3IH0sCS8qICAyIGRCIChhbHNvIFFNSDczNDIpICovCisJeyAgMCwgMSwgIDAsICA5IH0sCS8qICAzIGRCIChhbHNvIFFNSDczNDIpICovCisJeyAgMCwgMSwgIDAsIDExIH0sCS8qICA0IGRCICovCisJeyAgMCwgMSwgIDAsIDEzIH0sCS8qICA1IGRCICovCisJeyAgMCwg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klUU19QRVJfUEFHRSwgb2ZmKTsKKwlyZXR1cm4gb2ZmOworfQorCisvKgorICogQ29udmVydCB0aGUgQUVUSCBjcmVkaXQgY29kZSBpbnRvIHRoZSBudW1iZXIgb2YgY3JlZGl0cy4KKyAqLworc3RhdGljIHUzMiBjcmVkaXRfdGFibGVbMzFdID0geworCTAsICAgICAgICAgICAgICAgICAgICAgIC8qIDAgKi8KKwkxLCAgICAgICAgICAgICAgICAgICAgICAvKiAxICovCisJMiwgICAgICAgICAgICAgICAgICAgICAgLyogMiAqLworCTMsICAgICAgICAgICAgICAgICAgICAgIC8qIDMgKi8KKwk0LCAgICAgICAgICAgICAgICAgICAgICAvKiA0ICovCisJNiwgICAgICAgICAgICAgICAgICAgICAgLyogNSAqLworCTgsICAgICAgICAgICAgICAgICAgICAgIC8qIDYgKi8KKwkxMiwgICAgICAgICAgICAgICAgICAgICAvKiA3ICovCisJMTYsICAgICAgICAgICAgICAgICAgICAgLyogOCAqLworCTI0LCAgICAgICAgICAgICAgICAgICAgIC8qIDkgKi8KKwkzMiwgICAgICAgICAgICAgICAgICAgICAvKiBBICovCisJNDgsICAgICAgICAgICAgICAgICAgICAgLyogQiAqLworCTY0LCAgICAgICAgICAgICAgICAgICAgIC8qIEMgKi8KKwk5NiwgICAgICAgICAgICAgICAgICAgICAvKiBEICovCisJMTI4LCAgICAgICAgICAgICAgICAgICAgLyogRSAqLworCTE5MiwgICAgICAgICAgICAgICAgICAgIC8qIEYgKi8KKwkyNTYsICAgICAgICAgICAgICAgICAgICAvKiAxMCAqLworCTM4NCwgICAgICAgICAgICAgICAgICAgIC8qIDExICovCisJNTEyLCAgICAgICAgICAgICAgICAgICAgLyogMTIgKi8KKwk3NjgsICAgICAgICAgICAgICAgICAgICAvKiAxMyAqLworCTEwMjQsICAgICAgICAgICAgICAgICAgIC8qIDE0ICovCisJMTUzNiwgICAgICAgICAgICAgICAgICAgLyogMTUgKi8KKwkyMDQ4LCAgICAgICAgICAgICAgICAgICAvKiAxNiAqLworCTMwNzIsICAgICAgICAgICAgICAgICAgIC8qIDE3ICovCisJNDA5NiwgICAgICAgICAgICAgICAgICAgLyogMTggKi8KKwk2MTQ0LCAgICAgICAgICAgICAgICAgICAvKiAxOSAqLworCTgxOTIsICAgICAgICAgICAgICAgICAgIC8qIDFBICovCisJMTIyODgsICAgICAgICAgICAgICAgICAgLyogMUIgKi8KKwkxNjM4NCwgICAgICAgICAgICAgICAgICAvKiAxQyAqLworCTI0NTc2LCAgICAgICAgICAgICAgICAgIC8qIDFEICovCisJMzI3NjggICAgICAgICAgICAgICAgICAgLyogMUUgKi8KK307CisKK3N0YXRpYyB2b2lkIGdldF9tYXBfcGFnZShzdHJ1Y3QgcWliX3Fwbl90YWJsZSAqcXB0LCBzdHJ1Y3QgcXBuX21hcCAqbWFwKQoreworCXVuc2lnbmVkIGxvbmcgcGFnZSA9IGdldF96ZXJvZWRfcGFnZShHRlBfS0VSTkVMKTsKKworCS8qCisJICogRnJlZSB0aGUgcGFnZSBpZiBzb21lb25lIHJhY2VkIHdpdGggdXMgaW5zdGFsbGluZyBpdC4KKwkgKi8KKworCXNwaW5fbG9jaygmcXB0LT5sb2NrKTsKKwlpZiAobWFwLT5wYWdlKQorCQlmcmVlX3BhZ2UocGFnZSk7CisJZWxzZQorCQltYXAtPnBhZ2UgPSAodm9pZCAqKXBhZ2U7CisJc3Bpbl91bmxvY2soJnFwdC0+bG9jayk7Cit9CisKKy8qCisgKiBBbGxvY2F0ZSB0aGUgbmV4dCBhdmFpbGFibGUgUVBOIG9yCisgKiB6ZXJvL29uZSBmb3IgUVAgdHlwZSBJQl9RUFRfU01JL0lCX1FQVF9HU0kuCisgKi8KK3N0YXRpYyBpbnQgYWxsb2NfcXBuKHN0cnVjdCBxaWJfZGV2ZGF0YSAqZGQsIHN0cnVjdCBxaWJfcXBuX3RhYmxlICpxcHQsCisJCSAgICAgZW51bSBpYl9xcF90eXBlIHR5cGUsIHU4IHBvcnQpCit7CisJdTMyIGksIG9m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nJvcl9jb3VudGVyOyAgICAgICAgICAgICAvKiBzdGFydGluZyBjb3VudCBmb3IgUE1BICovCisJdTY0IHpfbGlua19lcnJvcl9yZWNvdmVyeV9jb3VudGVyOyAgICAgIC8qIHN0YXJ0aW5nIGNvdW50IGZvciBQTUEgKi8KKwl1NjQgel9saW5rX2Rvd25lZF9jb3VudGVyOyAgICAgICAgICAgICAgLyogc3RhcnRpbmcgY291bnQgZm9yIFBNQSAqLworCXU2NCB6X3BvcnRfcmN2X2Vycm9yczsgICAgICAgICAgICAgICAgICAvKiBzdGFydGluZyBjb3VudCBmb3IgUE1BICovCisJdTY0IHpfcG9ydF9yY3ZfcmVtcGh5c19lcnJvcnM7ICAgICAgICAgIC8qIHN0YXJ0aW5nIGNvdW50IGZvciBQTUEgKi8KKwl1NjQgel9wb3J0X3htaXRfZGlzY2FyZHM7ICAgICAgICAgICAgICAgLyogc3RhcnRpbmcgY291bnQgZm9yIFBNQSAqLworCXU2NCB6X3BvcnRfeG1pdF9kYXRhOyAgICAgICAgICAgICAgICAgICAvKiBzdGFydGluZyBjb3VudCBmb3IgUE1BICovCisJdTY0IHpfcG9ydF9yY3ZfZGF0YTsgICAgICAgICAgICAgICAgICAgIC8qIHN0YXJ0aW5nIGNvdW50IGZvciBQTUEgKi8KKwl1NjQgel9wb3J0X3htaXRfcGFja2V0czsgICAgICAgICAgICAgICAgLyogc3RhcnRpbmcgY291bnQgZm9yIFBNQSAqLworCXU2NCB6X3BvcnRfcmN2X3BhY2tldHM7ICAgICAgICAgICAgICAgICAvKiBzdGFydGluZyBjb3VudCBmb3IgUE1BICovCisJdTMyIHpfbG9jYWxfbGlua19pbnRlZ3JpdHlfZXJyb3JzOyAgICAgIC8qIHN0YXJ0aW5nIGNvdW50IGZvciBQTUEgKi8KKwl1MzIgel9leGNlc3NpdmVfYnVmZmVyX292ZXJydW5fZXJyb3JzOyAgLyogc3RhcnRpbmcgY291bnQgZm9yIFBNQSAqLworCXUzMiB6X3ZsMTVfZHJ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KyNkZWZpbmUgSUJfUEhZU1BPUlRTVEFURV9SRUNPVkVSWV9JRExFIDB4RgorI2RlZmluZSBJQl9QSFlTUE9SVFNUQVRFX0NGR19FTkggMHgxMAorI2RlZmluZSBJQl9QSFlTUE9SVFNUQVRFX0NGR19XQUlUX0VOSCAweDEzCisKK2V4dGVybiBjb25zdCBpbnQgaWJfcWliX3N0YXRlX29wc1tdOworCitleHRlcm4gX19iZTY0IGliX3FpYl9zeXNfaW1hZ2VfZ3VpZDsgICAgLyogaW4gbmV0d29yayBvcmRlciAqLworCitleHRlcm4gdW5zaWduZWQgaW50IGliX3FpYl9sa2V5X3RhYmxlX3NpemU7CisKK2V4dGVybiB1bnNpZ25lZCBpbnQgaWJfcWliX21heF9jcWVzOworCitleHRlcm4gdW5zaWduZWQgaW50IGliX3FpYl9tYXhfY3FzOworCitleHRlcm4gdW5zaWduZWQgaW50IGliX3FpYl9tYXhfcXBfd3JzOworCitleHRlcm4gdW5zaWduZWQgaW50IGliX3FpYl9tYXhfcXBzOworCitleHRlcm4gdW5zaWduZWQgaW50IGliX3FpYl9tYXhfc2dlczsKKworZXh0ZXJuIHVuc2lnbmVkIGludCBpYl9xaWJfbWF4X21jYXN0X2dycHM7CisKK2V4dGVybiB1bnNpZ25lZCBpbnQgaWJfcWliX21heF9tY2FzdF9xcF9hdHRhY2hlZDsKKworZXh0ZXJuIHVuc2lnbmVkIGludCBpYl9xaWJfbWF4X3NycXM7CisKK2V4dGVybiB1bnNpZ25lZCBpbnQgaWJfcWliX21heF9zcnFfc2dlczsKKworZXh0ZXJuIHVuc2lnbmVkIGludCBpYl9xaWJfbWF4X3NycV93cnM7CisKK2V4dGVybiBjb25zdCB1MzIgaWJfcWliX3Jucl90YWJsZVtdOworCitleHRlcm4gc3RydWN0IGliX2RtYV9tYXBwaW5nX29wcyBxaWJfZG1hX21hcHBpbmdfb3BzOworCisjZW5kaWYgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFFJQl9WRVJCU19IICovCm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VsbCByZWd1bGF0b3JfZGV2c1tdID0gewotCVBNODYwN19SRUdfREVWUyhidWNrMSwgQlVDSzEpLAotCVBNODYwN19SRUdfREVWUyhidWNrMiwgQlVDSzIpLAotCVBNODYwN19SRUdfREVWUyhidWNrMywgQlVDSzMpLAotCVBNODYwN19SRUdfREVWUyhsZG8xLCAgTERPMSksCi0JUE04NjA3X1JFR19ERVZTKGxkbzIsICBMRE8yKSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvMywgIExETzMpLAotCVBNODYwN19SRUdfREVWUyhsZG80LCAgTERPNCksCi0JUE04NjA3X1JFR19ERVZTKGxkbzUsICBMRE81KSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvNiwgIExETzYpLAotCVBNODYwN19SRUdfREVWUyhsZG83LCAgTERPNyksCi0JUE04NjA3X1JFR19ERVZTKGxkbzgsICBMRE84KSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvOSwgIExETzkpLAotCVBNODYwN19SRUdfREVWUyhsZG8xMCwgTERPMTApLAotCVBNODYwN19SRUdfREVWUyhsZG8xMiwgTERPMTIpLAotCVBNODYwN19SRUdfREVWUyhsZG8xNCwgTERPMTQpLAorCVBNODYwN19SRUdfREVWUyhCVUNLMSksCisJUE04NjA3X1JFR19ERVZTKEJVQ0syKSwKKwlQTTg2MDdfUkVHX0RFVlMoQlVDSzMpLAorCVBNODYwN19SRUdfREVWUyhMRE8xKSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPMiksCisJUE04NjA3X1JFR19ERVZTKExETzMpLAorCVBNODYwN19SRUdfREVWUyhMRE80KSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPNSksCisJUE04NjA3X1JFR19ERVZTKExETzYpLAorCVBNODYwN19SRUdfREVWUyhMRE83KSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPOCksCisJUE04NjA3X1JFR19ERVZTKExETzkpLAorCVBNODYwN19SRUdfREVWUyhMRE8xMCksCisJUE04NjA3X1JFR19ERVZTKExETzEyKSw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gsNiArMjUyMCw3IEBACiAJZW51bSBpeGdiZV9zbWFydF9zcGVlZCAgICAgICAgICBzbWFydF9zcGVlZDsKIAlib29sICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNtYXJ0X3NwZWVkX2FjdGl2ZTsKIAlib29sICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpc3BlZWRfZmliZXI7CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNldF9pZl9vdmVydGVtcDsKIH07CiAKICNpbmNsdWRlICJpeGdiZV9tYnguaCIKQEAgLTI2MDUsNiArMjYwOCw3IEBACiAjZGVmaW5lIElYR0JFX0VSUl9GRElSX1JFSU5JVF9GQUlMRUQgICAgICAgICAgICAtMjMKICNkZWZpbmUgSVhHQkVfRVJSX0VFUFJPTV9WRVJTSU9OICAgICAgICAgICAgICAgIC0yNAogI2RlZmluZSBJWEdCRV9FUlJfTk9fU1BBQ0UgICAgICAgICAgICAgICAgICAgICAgLTI1CisjZGVmaW5lIElYR0JFX0VSUl9PVkVSVEVNUCAgICAgICAgICAgICAgICAgICAgICAtMjYKICNkZWZpbmUgSVhHQkVfTk9UX0lNUExFTUVOVEVEICAgICAgICAgICAgICAgICAgIDB4N0ZGRkZGRkYKIAogI2VuZGlmIC8qIF9JWEdCRV9UWVBFX0hfICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC9sbF90ZW1hYy5oIGIvZHJpdmVycy9uZXQvbGxfdGVtYWMuaAppbmRleCBjMDMzNTg0Li41MjJhYmUyIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC9sbF90ZW1hYy5oCisrKyBiL2RyaXZlcnMvbmV0L2xsX3RlbWFjLmgKQEAgLTI5NSw2ICsyOTUsMTAgQEAKIAogI2RlZmluZSBNVUxUSUNBU1RfQ0FNX1RBQkxFX05VTSA0CiAKKy8qIFRFTUFDIFN5bnRoZXNpcyBmZWF0dXJlcyAqLworI2RlZmluZSBURU1BQ19GRUFUVVJFX1JYX0NTV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LCBMRE8xMCwgMCwgNCwgU1VQUExJRVNfRU4xMSwgNCksCi0JUE04NjA3X0xETygxMiwgMTIwMCwgMzMwMCwgMCwgTERPMTIsIDAsIDQsIFNVUFBMSUVTX0VOMTEsIDUpLAotCVBNODYwN19MRE8oMTQsIDE4MDAsIDMzMDAsIDAsIExETzE0LCAwLCAzLCBTVVBQTElFU19FTjExLCA2KSwKKwlQTTg2MDdfTERPKCAxLCAgICAgICAgIExETzEsIDAsIDIsIFNVUFBMSUVTX0VOMTEsIDMpLAorCVBNODYwN19MRE8oIDIsICAgICAgICAgTERPMiwgMCwgMywgU1VQUExJRVNfRU4xMSwgNCksCisJUE04NjA3X0xETyggMywgICAgICAgICBMRE8zLCAwLCAzLCBTVVBQTElFU19FTjExLCA1KSwKKwlQTTg2MDdfTERPKCA0LCAgICAgICAgIExETzQsIDAsIDMsIFNVUFBMSUVTX0VOMTEsIDYpLAorCVBNODYwN19MRE8oIDUsICAgICAgICAgTERPNSwgMCwgMiwgU1VQUExJRVNfRU4xMSwgNyksCisJUE04NjA3X0xETyggNiwgICAgICAgICBMRE82LCAwLCAzLCBTVVBQTElFU19FTjEyLCAwKSwKKwlQTTg2MDdfTERPKCA3LCAgICAgICAgIExETzcsIDAsIDMsIFNVUFBMSUVTX0VOMTIsIDEpLAorCVBNODYwN19MRE8oIDgsICAgICAgICAgTERPOCwgMCwgMywgU1VQUExJRVNfRU4xMiwgMiksCisJUE04NjA3X0xETyggOSwgICAgICAgICBMRE85LCAwLCAzLCBTVVBQTElFU19FTjEyLCAzKSwKKwlQTTg2MDdfTERPKDEwLCAgICAgICAgTERPMTAsIDAsIDMsIFNVUFBMSUVTX0VOMTIsIDQpLAorCVBNODYwN19MRE8oMTIsICAgICAgICBMRE8xMiwgMCwgNCwgU1VQUExJRVNfRU4xMiwgNSksCisJUE04NjA3X0xETygxMywgVklCUkFUT1JfU0VULCAxLCAzLCAgVklCUkFUT1JfU0VULCAwKSwKKwlQTTg2MDdfTERPKDE0LCA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bGllbnQsIGludCByZWcsIHVpbnQ4X3QgKnZhbCkKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gaTJjX3NtYnVzX3JlYWRfYnl0ZV9kYXRhKGNsaWVudCwgcmVnKTsKKwlpZiAocmV0IDwgMCkgeworCQlkZXZfZXJyKCZjbGllbnQtPmRldiwgImZhaWxlZCByZWFkaW5nIGF0IDB4JTAyeFxuIiwgcmVnKTsKKwkJcmV0dXJuIHJldDsKKwl9CisKKwkqdmFsID0gKHVpbnQ4X3QpcmV0OworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGFkcDg4NjBfd3JpdGUoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTggcmVnLCB1OCB2YWwpCit7CisJcmV0dXJuIGkyY19zbWJ1c193cml0ZV9ieXRlX2RhdGEoY2xpZW50LCByZWcsIHZhbCk7Cit9CisKK3N0YXRpYyBpbnQgYWRwODg2MF9zZXRfYml0cyhzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50LCBpbnQgcmVnLCB1aW50OF90IGJpdF9tYXNrKQoreworCXN0cnVjdCBhZHA4ODYwX2JsICpkYXRhID0gaTJjX2dldF9jbGllbnRkYXRhKGNsaWVudCk7CisJdWludDhfdCByZWdfdmFsOworCWludCByZXQ7CisKKwltdXRleF9sb2NrKCZkYXRhLT5sb2NrKTsKKworCXJldCA9IGFkcDg4NjBfcmVhZChjbGllbnQsIHJlZywgJnJlZ192YWwpOworCisJaWYgKCFyZXQgJiYgKChyZWdfdmFsICYgYml0X21hc2spID09IDApKSB7CisJCXJlZ192YWwgfD0gYml0X21hc2s7CisJCXJldCA9IGFkcDg4NjBfd3JpdGUoY2xpZW50LCByZWcsIHJlZ192YWwpOworCX0KKworCW11dGV4X3VubG9jaygmZGF0YS0+bG9jayk7CisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBhZHA4ODYwX2Nscl9iaXRzKHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsIGludCByZWcsIHV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MHgxYSwKKwlEQVRBX09OTFksIDB4MzMsCisJREFUQV9PTkxZLCAweDBkLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9ESVNQTEFZX0NPTkRJVElPTl9TRVRbXSA9IHsKKwkweGYyLCAweDAyLAorCURBVEFfT05MWSwgMHgwMywKKwlEQVRBX09OTFksIDB4MWMsCisJREFUQV9PTkxZLCAweDEwLAorCURBVEFfT05MWSwgMHgxMCwKKworCTB4ZjcsIDB4MDMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0dBTU1BX1NFVFRJTkdbXSA9IHsKKwkweGZhLCAweDAwLAorCURBVEFfT05MWSwgMHgxOCwKKwlEQVRBX09OTFksIDB4MDgsCisJREFUQV9PTkxZLCAweDI0LAorCURBVEFfT05MWSwgMHg2NCwKKwlEQVRBX09OTFksIDB4NTYsCisJREFUQV9PTkxZLCAweDMzLAorCURBVEFfT05MWSwgMHhiNiwKKwlEQVRBX09OTFksIDB4YmEsCisJREFUQV9PTkxZLCAweGE4LAorCURBVEFfT05MWSwgMHhhYywKKwlEQVRBX09OTFksIDB4YjEsCisJREFUQV9PTkxZLCAweDlkLAorCURBVEFfT05MWSwgMHhjMSwKKwlEQVRBX09OTFksIDB4YzEsCisJREFUQV9PTkxZLCAweGI3LAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4OWMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHg5ZiwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweGQ2LAorCisJMHhmYSwgMHgwMSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0VUQ19DT05ESVRJT05fU0VUW10gPSB7CisJMHhmNiwgMHgwMCwKKwlEQVRBX09OTFksIDB4OGMsCisJREFUQV9PTkxZLCAweDA3LAorCisJMHhiMywgMHhjLAorCisJMHhiNSwgMHgyYywKKwlEQVRBX09OTFksIDB4MTIsCisJREFUQV9PTkxZLCAweDBjLAorCURBVEFfT05MWSwgMHgwYSwKKwlEQVRBX09OTFksIDB4MTAsCisJREFUQV9PTkxZLCAweDBlLAorCURBVEFfT05MWSwgMHgxNywKKwlEQVRBX09OTFksIDB4MTMsCisJREFUQV9PTkxZLCAweDFmLAorCURBVEFfT05MWSwgMHgxYSwKKwlEQVRBX09OTFksIDB4MmEsCisJREFUQV9PTkxZLCAweDI0LAorCURBVEFfT05MWSwgMHgxZiwKKwlEQVRBX09OTFksIDB4MWIsCisJREFUQV9PTkxZLCAweDFhLAorCURBVEFfT05MWSwgMHgxNywKKworCURBVEFfT05MWSwgMHgyYiwKKwlEQVRBX09OTFksIDB4MjYsCisJREFUQV9PTkxZLCAweDIyLAorCURBVEFfT05MWSwgMHgyMCwKKwlEQVRBX09OTFksIDB4M2EsCisJREFUQV9PTkxZLCAweDM0LAorCURBVEFfT05MWSwgMHgzMCwKKwlEQVRBX09OTFksIDB4MmMsCisJREFUQV9PTkxZLCAweDI5LAorCURBVEFfT05MWSwgMHgyNiwKKwlEQVRBX09OTFksIDB4MjUsCisJREFUQV9PTkxZLCAweDIzLAorCURBVEFfT05MWSwgMHgyMSwKKwlEQVRBX09OTFksIDB4MjAsCisJREFUQV9PTkxZLCAweDFlLAorCURBVEFfT05MWSwgMHgxZSwKKworCTB4YjYsIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgxMSwKKwlEQVRBX09OTFksIDB4MjIsCisJREFUQV9PTkxZLCAweDMzLAorCURBVEFfT05MWSwgMHg0NCwKKwlEQVRBX09OTFksIDB4NDQsCisJREFUQV9PTkxZLCAweDQ0LAorCisJREFUQV9PTkxZLCAweDU1LAorCURBVEFfT05MWSwgMHg1NSwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKworCTB4YjcsIDB4MmMsCisJREFUQV9PTkxZLCAweDEyLAorCURBVEFfT05MWSwgMHgwYywKKwlEQVRBX09OTFksIDB4MGEsCisJREFUQV9PTkxZLCAweDEwLAorCURBVEFfT05MWSwgMHgwZSwKKwlEQVRBX09OTFksIDB4MTcsCisJREFUQV9PTkxZLCAweDEzLAorCURBVEFfT05MWSwgMHgxZiwKKwlEQVRBX09OTFksIDB4MWEsCisJREFUQV9PTkxZLCAweDJhLAorCURBVEFfT05MWSwgMHgyNCwKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDFiLAorCURBVEFfT05MWSwgMHgxYSwKKwlEQVRBX09OTFksIDB4MTcsCisKKwlEQVRBX09OTFksIDB4MmIsCisJREFUQV9PTkxZLCAweDI2LAorCURBVEFfT05MWSwgMHgyMiwKKwlEQVRBX09OTFksIDB4MjAsCisJREFUQV9PTkxZLCAweDNhLAorCURBVEFfT05MWSwgMHgzNCwKKwlEQVRBX09OTFksIDB4MzAsCisJREFUQV9PTkxZLCAweDJjLAorCURBVEFfT05MWSwgMHgyOSwKKwlEQVRBX09OTFksIDB4MjYsCisJREFUQV9PTkxZLCAweDI1LAorCURBVEFfT05MWSwgMHgyMywKKwlEQVRBX09OTFksIDB4MjEsCisJREFUQV9PTkxZLCAweDIwLAorCURBVEFfT05MWSwgMHgxZSwKKwlEQVRBX09OTFksIDB4MWUsCisKKwkweGI4LCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MTEsCisJREFUQV9PTkxZLCAweDIyLAorCURBVEFfT05MWSwgMHgzMywKKwlEQVRBX09OTFksIDB4NDQsCisJREFUQV9PTkxZLCAweDQ0LAorCURBVEFfT05MWSwgMHg0NCwKKworCURBVEFfT05MWSwgMHg1NSwKKwlEQVRBX09OTFksIDB4NTUsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisKKwkweGI5LCAweDJjLAorCURBVEFfT05MWSwgMHgxMiwKKwlEQVRBX09OTFksIDB4MGMsCisJREFUQV9PTkxZLCAweDBhLAorCURBVEFfT05MWSwgMHgxMCwKKwlEQVRBX09OTFksIDB4MGUsCisJREFUQV9PTkxZLCAweDE3LAorCURBVEFfT05MWSwgMHgxMywKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDFhLAorCURBVEFfT05MWSwgMHgyYSwKKwlEQVRBX09OTFksIDB4MjQsCisJREFUQV9PTkxZLCAweDFmLAorCURBVEFfT05MWSwgMHgxYiwKKwlEQVRBX09OTFksIDB4MWEsCisJREFUQV9PTkxZLCAweDE3LAorCisJREFUQV9PTkxZLCAweDJiLAorCURBVEFfT05MWSwgMHgyNiwKKwlEQVRBX09OTFksIDB4MjIsCisJREFUQV9PTkxZLCAweDIwLAorCURBVEFfT05MWSwgMHgzYSwKKwlEQVRBX09OTFksIDB4MzQsCisJREFUQV9PTkxZLCAweDMwLAorCURBVEFfT05MWSwgMHgyYywKKwlEQVRBX09OTFksIDB4MjksCisJREFUQV9PTkxZLCAweDI2LAorCURBVEFfT05MWSwgMHgyNSwKKwlEQVRBX09OTFksIDB4MjMsCisJREFUQV9PTkxZLCAweDIxLAorCURBVEFfT05MWSwgMHgyMCwKKwlEQVRBX09OTFksIDB4MWUsCisJREFUQV9PTkxZLCAweDFlLAorCisJMHhiYSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDExLAorCURBVEFfT05MWSwgMHgyMiwKKwlEQVRBX09OTFksIDB4MzMsCisJREFUQV9PTkxZLCAweDQ0LAorCURBVEFfT05MWSwgMHg0NCwKKwlEQVRBX09OTFksIDB4NDQsCisKKwlEQVRBX09OTFksIDB4NTUsCisJREFUQV9PTkxZLCAweDU1LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCisJMHhjMSwgMHg0ZCwKKwlEQVRBX09OTFksIDB4OTYsCisJREFUQV9PTkxZLCAweDFkLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAxLAorCURBVEFfT05MWSwgMHhkZiwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDMsCisJREFUQV9PTkxZLCAweDA2LAorCURBVEFfT05MWSwgMHgwOSwKKwlEQVRBX09OTFksIDB4MGQsCisJREFUQV9PTkxZLCAweDBmLAorCURBVEFfT05MWSwgMHgxMiwKKwlEQVRBX09OTFksIDB4MTUsCisJREFUQV9PTkxZLCAweDE4LAorCisJMHhiMiwgMHgxMCwKKwlEQVRBX09OTFksIDB4MTAsCisJREFUQV9PTkxZLCAweDBiLAorCURBVEFfT05MWSwgMHgwNSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0FDTF9PTltdID0geworCS8qIEFDTCBvbiAqLworCTB4YzAsIDB4MDEsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9BQ0xfT0ZGW10gPSB7CisJLyogQUNMIG9mZiAqLworCTB4YzAsIDB4MDAsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9FTFZTU19PTltdID0geworCS8qIEVMVlNTIG9uICovCisJMHhiMSwgMHgwYiwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0VMVlNTX09GRltdID0geworCS8qIEVMVlNTIG9mZiAqLworCTB4YjEsIDB4MGEsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9TVEFORF9CWV9PRkZbXSA9IHsKKwkweDExLCBDT01NQU5EX09OTFksCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9TVEFORF9CWV9PTltdID0geworCTB4MTAsIENPTU1BTkRfT05MWSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0RJU1BMQVlfT05bXSA9IHsKKwkweDI5LCBDT01NQU5EX09OTFksCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworCitzdGF0aWMgaW50IHM2ZTYzbTBfc3BpX3dyaXRlX2J5dGUoc3RydWN0IHM2ZTYzbTAgKmxjZCwgaW50IGFkZHIsIGludCBkYXRhKQoreworCXUxNiBidWZbMV07CisJc3RydWN0IHNwaV9tZXNzYWdlIG1zZzsKKworCXN0cnVjdCBzcGlfdHJhbnNm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yb290ICpyb290LAorCQkJCXN0cnVjdCBidHJmc19zcGFjZV9pbmZvICpzaW5mbywgdTY0IG51bV9ieXRlcykKK3sKKwlpbnQgcmV0OworCWludCBlbmRfdHJhbnMgPSAwOworCisJaWYgKHNpbmZvLT5mdWxsKQorCQlyZXR1cm4gMDsKKworCXNwaW5fbG9jaygmc2luZm8tPmxvY2spOworCXJldCA9IHNob3VsZF9hbGxvY19jaHVuayhzaW5mbywgbnVtX2J5dGVzICsgMiAqIDEwMjQgKiAxMDI0KTsKKwlzcGluX3VubG9jaygmc2luZm8tPmxvY2spOworCWlmICghcmV0KQorCQlyZXR1cm4gMDsKKworCWlmICghdHJhbnMpIHsKKwkJdHJhbnMgPSBidHJmc19qb2luX3RyYW5zYWN0aW9uKHJvb3QsIDEpOworCQlCVUdfT04oSVNfRVJSKHRyYW5zKSk7CisJCWVuZF90cmFucyA9IDE7CisJfQorCisJcmV0ID0gZG9fY2h1bmtfYWxsb2ModHJhbnMsIHJvb3QtPmZzX2luZm8tPmV4dGVudF9yb290LAorCQkJICAgICBudW1fYnl0ZXMgKyAyICogMTAyNCAqIDEwMjQsCisJCQkgICAgIGdldF9hbGxvY19wcm9maWxlKHJvb3QsIHNpbmZvLT5mbGFncyksIDApOworCisJaWYgKGVuZF90cmFucykKKwkJYnRyZnNfZW5kX3RyYW5zYWN0aW9uKHRyYW5zLCByb290KTsKKworCXJldHVybiByZXQgPT0gMSA/IDEgOiAwOworfQorCisvKgorICogc2hyaW5rIG1ldGFkYXRhIHJlc2VydmF0aW9uIGZvciBkZWxhbGxvYworICovCitzdGF0aWMgaW50IHNocmlua19kZWxhbGxvYyhzdHJ1Y3QgYnRyZnNfdHJhbnNfaGFuZGxlICp0cmFucywKKwkJCSAgIHN0cnVjdCBidHJmc19yb290ICpyb290LCB1NjQgdG9fcmVjbGFpbSkKK3sKKwlzdHJ1Y3QgYnRyZnNfYmxvY2tfcnN2ICpibG9ja19yc3Y7CisJdTY0IHJlc2VydmVkOworCXU2N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sIDApOworCWlmIChyZXQgPCAwKSB7CisJCWVyciA9IHJldDsKKwkJZ290byBvdXQ7CisJfQorCWlmIChyZXQgPT0gMCkgeworCQlpZiAoY2hlY2tfcGF0aF9zaGFyZWQocm9vdCwgcGF0aCkpCisJCQlnb3RvIG91dDsKKwl9IGVsc2UgeworCQljaGVja19saW5rID0gMDsKKwl9CisJYnRyZnNfcmVsZWFzZV9wYXRoKHJvb3QsIHBhdGgpOworCisJcmV0ID0gYnRyZnNfbG9va3VwX2lub2RlKHRyYW5zLCByb290LCBwYXRoLAorCQkJCSZCVFJGU19JKGlub2RlKS0+bG9jYXRpb24sIDApOworCWlmIChyZXQgPCAwKSB7CisJCWVyciA9IHJldDsKKwkJZ290byBvdXQ7CisJfQorCWlmIChyZXQgPT0gMCkgeworCQlpZiAoY2hlY2tfcGF0aF9zaGFyZWQocm9vdCwgcGF0aCkpCisJCQlnb3RvIG91dDsKKwl9IGVsc2UgeworCQljaGVja19saW5rID0gMDsKKwl9CisJYnRyZnNfcmVsZWFzZV9wYXRoKHJvb3QsIHBhdGgpOworCisJaWYgKHJldCA9PSAwICYmIFNfSVNSRUcoaW5vZGUtPmlfbW9kZSkpIHsKKwkJcmV0ID0gYnRyZnNfbG9va3VwX2ZpbGVfZXh0ZW50KHRyYW5zLCByb290LCBwYXRoLAorCQkJCQkgICAgICAgaW5vZGUtPmlfaW5vLCAodTY0KS0xLCAwKTsKKwkJaWYgKHJldCA8IDApIHsKKwkJCWVyciA9IHJldDsKKwkJCWdvdG8gb3V0OworCQl9CisJCUJVR19PTihyZXQgPT0gMCk7CisJCWlmIChjaGVja19wYXRoX3NoYXJlZChyb290LCBwYXRoKSkKKwkJCWdvdG8gb3V0OworCQlidHJmc19yZWxlYXNlX3BhdGgocm9vdCwgcGF0aCk7CisJfQorCisJaWYgKCFjaGVja19saW5rKSB7CisJCWVyciA9IDA7CisJCWdvdG8gb3V0OworCX0KKworCWRpID0gYnRyZnNfbG9va3VwX2Rpcl9pdGVtKH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Vsb2NfY29udHJvbCh2b2lkKQoreworCXN0cnVjdCByZWxvY19jb250cm9sICpyYzsKKworCXJjID0ga3phbGxvYyhzaXplb2YoKnJjKSwgR0ZQX05PRlMpOworCWlmICghcmMpCisJCXJldHVybiBOVUxMOworCisJSU5JVF9MSVNUX0hFQUQoJnJjLT5yZWxvY19yb290cyk7CisJYmFja3JlZl9jYWNoZV9pbml0KCZyYy0+YmFja3JlZl9jYWNoZSk7CisJbWFwcGluZ190cmVlX2luaXQoJnJjLT5yZWxvY19yb290X3RyZWUpOworCWV4dGVudF9pb190cmVlX2luaXQoJnJjLT5wcm9jZXNzZWRfYmxvY2tzLCBOVUxMLCBHRlBfTk9GUyk7CisJcmV0dXJuIHJjOworfQorCiAvKgogICogZnVuY3Rpb24gdG8gcmVsb2NhdGUgYWxsIGV4dGVudHMgaW4gYSBibG9jayBncm91cC4KICAqLwpAQCAtMzUxNCwyNCArMzg2MCwyNiBAQAogCXN0cnVjdCBidHJmc19mc19pbmZvICpmc19pbmZvID0gZXh0ZW50X3Jvb3QtPmZzX2luZm87CiAJc3RydWN0IHJlbG9jX2NvbnRyb2wgKnJjOwogCWludCByZXQ7CisJaW50IHJ3ID0gMDsKIAlpbnQgZXJyID0gMDsKIAotCXJjID0ga3phbGxvYyhzaXplb2YoKnJjKSwgR0ZQX05PRlMpOworCXJjID0gYWxsb2NfcmVsb2NfY29udHJvbCgpOwogCWlmICghcmMpCiAJCXJldHVybiAtRU5PTUVNOwogCi0JbWFwcGluZ190cmVlX2luaXQoJnJjLT5yZWxvY19yb290X3RyZWUpOwotCWV4dGVudF9pb190cmVlX2luaXQoJnJjLT5wcm9jZXNzZWRfYmxvY2tzLCBOVUxMLCBHRlBfTk9GUyk7Ci0JSU5JVF9MSVNUX0hFQUQoJnJjLT5yZWxvY19yb290cyk7CisJcmMtPmV4dGVudF9yb290ID0gZXh0ZW50X3Jvb3Q7CiAKIAlyYy0+YmxvY2tfZ3JvdXAgPSBidHJmc19sb29rdXBfYmx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Y2sgb3JkZXJpbmcgYnkgdGhlIE1EUwogICogIC0gYSBmZXcgb2YgdGhlc2UgYXJlIGludGVybmFsIHRvIHRoZSBtZHMKICAqLwotI2RlZmluZSBDRVBIX0xPQ0tfRE4gICAgICAgICAgMQotI2RlZmluZSBDRVBIX0xPQ0tfSVNOQVAgICAgICAgMgotI2RlZmluZSBDRVBIX0xPQ0tfSVZFUlNJT04gICAgNCAgICAgLyogbWRzIGludGVybmFsICovCi0jZGVmaW5lIENFUEhfTE9DS19JRklMRSAgICAgICA4ICAgICAvKiBtZHMgaW50ZXJuYWwgKi8KLSNkZWZpbmUgQ0VQSF9MT0NLX0lBVVRIICAgICAgIDMyCi0jZGVmaW5lIENFUEhfTE9DS19JTElOSyAgICAgICA2NAotI2RlZmluZSBDRVBIX0xPQ0tfSURGVCAgICAgICAgMTI4ICAgLyogZGlyIGZyYWcgdHJlZSAqLwotI2RlZmluZSBDRVBIX0xPQ0tfSU5FU1QgICAgICAgMjU2ICAgLyogbWRzIGludGVybmFsICovCi0jZGVmaW5lIENFUEhfTE9DS19JWEFUVFIgICAgICA1MTIKLSNkZWZpbmUgQ0VQSF9MT0NLX0lOTyAgICAgICAgIDIwNDggIC8qIGltbXV0YWJsZSBpbm9kZSBiaXRzOyBub3QgYSBsb2NrICovCisjZGVmaW5lIENFUEhfTE9DS19EVkVSU0lPTiAgICAxCisjZGVmaW5lIENFUEhfTE9DS19ETiAgICAgICAgICAyCisjZGVmaW5lIENFUEhfTE9DS19JU05BUCAgICAgICAxNgorI2RlZmluZSBDRVBIX0xPQ0tfSVZFUlNJT04gICAgMzIgICAgLyogbWRzIGludGVybmFsICovCisjZGVmaW5lIENFUEhfTE9DS19JRklMRSAgICAgICA2NAorI2RlZmluZSBDRVBIX0xPQ0tfSUFVVEggICAgICAgMTI4CisjZGVmaW5lIENFUEhfTE9DS19JTElOSyAgICAgICAyNTYKKyNkZWZpbmUgQ0VQSF9MT0NLX0lERlQgICAgICAgIDUxMiAgIC8qIGRp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9pZCBzZXRfbnVtYV9tZW0oaW50IG5vZGUpCit7CisJcGVyY3B1X3dyaXRlKF9udW1hX21lbV8sIG5vZGUpOworfQorI2VuZGlmCisKKyNpZm5kZWYgbnVtYV9tZW1faWQKKy8qIFJldHVybnMgdGhlIG51bWJlciBvZiB0aGUgbmVhcmVzdCBOb2RlIHdpdGggbWVtb3J5ICovCitzdGF0aWMgaW5saW5lIGludCBudW1hX21lbV9pZCh2b2lkKQoreworCXJldHVybiBfX3RoaXNfY3B1X3JlYWQoX251bWFfbWVtXyk7Cit9CisjZW5kaWYKKworI2lmbmRlZiBjcHVfdG9fbWVtCitzdGF0aWMgaW5saW5lIGludCBjcHVfdG9fbWVtKGludCBjcHUpCit7CisJcmV0dXJuIHBlcl9jcHUoX251bWFfbWVtXywgY3B1KTsKK30KKyNlbmRpZgorCisjaWZuZGVmIHNldF9jcHVfbnVtYV9tZW0KK3N0YXRpYyBpbmxpbmUgdm9pZCBzZXRfY3B1X251bWFfbWVtKGludCBjcHUsIGludCBub2RlKQoreworCXBlcl9jcHUoX251bWFfbWVtXywgY3B1KSA9IG5vZGU7Cit9CisjZW5kaWYKKworI2Vsc2UJLyogIUNPTkZJR19IQVZFX01FTU9SWUxFU1NfTk9ERVMgKi8KKworc3RhdGljIGlubGluZSB2b2lkIHNldF9udW1hX21lbShpbnQgbm9kZSkge30KKworc3RhdGljIGlubGluZSB2b2lkIHNldF9jcHVfbnVtYV9tZW0oaW50IGNwdSwgaW50IG5vZGUpIHt9CisKKyNpZm5kZWYgbnVtYV9tZW1faWQKKy8qIFJldHVybnMgdGhlIG51bWJlciBvZiB0aGUgbmVhcmVzdCBOb2RlIHdpdGggbWVtb3J5ICovCitzdGF0aWMgaW5saW5lIGludCBudW1hX21lbV9pZCh2b2lkKQoreworCXJldHVybiBudW1hX25vZGVfaWQoKTsKK30KKyNlbmRpZgorCisjaWZuZGVmIGNwdV90b19tZW0KK3N0YXRpYyBpbmxpbmUgaW50IGNwdV90b19tZW0oaW50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lOworCisJaWYgKG5pZCA8IDAgfHwgbmlkID49IG5yX25vZGVfaWRzIHx8ICFub2RlX29ubGluZShuaWQpKQorCQlyZXR1cm4gLUVJTlZBTDsKKwlwZ2RhdCA9IE5PREVfREFUQShuaWQpOworCisJLyogRmx1c2ggcGVuZGluZyB1cGRhdGVzIHRvIHRoZSBMUlUgbGlzdHMgKi8KKwlscnVfYWRkX2RyYWluX2FsbCgpOworCisJZm9yICh6b25laWQgPSAwOyB6b25laWQgPCBNQVhfTlJfWk9ORVM7IHpvbmVpZCsrKSB7CisJCXN0cnVjdCBjb21wYWN0X2NvbnRyb2wgY2MgPSB7CisJCQkubnJfZnJlZXBhZ2VzID0gMCwKKwkJCS5ucl9taWdyYXRlcGFnZXMgPSAwLAorCQkJLm9yZGVyID0gLTEsCisJCX07CisKKwkJem9uZSA9ICZwZ2RhdC0+bm9kZV96b25lc1t6b25laWRdOworCQlpZiAoIXBvcHVsYXRlZF96b25lKHpvbmUpKQorCQkJY29udGludWU7CisKKwkJY2Muem9uZSA9IHpvbmU7CisJCUlOSVRfTElTVF9IRUFEKCZjYy5mcmVlcGFnZXMpOworCQlJTklUX0xJU1RfSEVBRCgmY2MubWlncmF0ZXBhZ2VzKTsKKworCQljb21wYWN0X3pvbmUoem9uZSwgJmNjKTsKKworCQlWTV9CVUdfT04oIWxpc3RfZW1wdHkoJmNjLmZyZWVwYWdlcykpOworCQlWTV9CVUdfT04oIWxpc3RfZW1wdHkoJmNjLm1pZ3JhdGVwYWdlcykpOworCX0KKworCXJldHVybiAwOworfQorCisvKiBDb21wYWN0IGFsbCBub2RlcyBpbiB0aGUgc3lzdGVtICovCitzdGF0aWMgaW50IGNvbXBhY3Rfbm9kZXModm9pZCkKK3sKKwlpbnQgbmlkOworCisJZm9yX2VhY2hfb25saW5lX25vZGUobmlkKQorCQljb21wYWN0X25vZGUobmlkKTsKKworCXJldHVybiBDT01QQUNUX0NPTVBMRVRFOworfQorCisvKiBUaGUgd3JpdHRlbiB2YWx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