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AgICBlZHggPSAweDRkLgorTm90ZSB0aGF0IHRoaXMgdmFsdWUgaW4gZWJ4LCBlY3ggYW5kIGVkeCBjb3JyZXNwb25kcyB0byB0aGUgc3RyaW5nICJLVk1LVk1LVk0iLgorVGhpcyBmdW5jdGlvbiBxdWVyaWVzIHRoZSBwcmVzZW5jZSBvZiBLVk0gY3B1aWQgbGVhZnMuCisKKworZnVuY3Rpb246IGRlZmluZSBLVk1fQ1BVSURfRkVBVFVSRVMgKDB4NDAwMDAwMDEpCityZXR1cm5zIDogZWJ4LCBlY3gsIGVkeCA9IDAKKyAgICAgICAgICBlYXggPSBhbmQgT1InZWQgZ3JvdXAgb2YgKDEgPDwgZmxhZyksIHdoZXJlIGVhY2ggZmxhZ3MgaXM6CisKKworZmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCB2YWx1ZSB8fCBtZWFuaW5nCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorS1ZNX0ZFQVRVUkVfQ0xPQ0tTT1VSQ0UgICAgICAgICAgICB8fCAgICAgMCB8fCBrdm1jbG9jayBhdmFpbGFibGUgYXQgbXNycworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAgICAgICB8fCAweDExIGFuZCAweDEyLgorLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCitLVk1fRkVBVFVSRV9OT1BfSU9fREVMQVkgICAgICAgICAgIHx8ICAgICAxIHx8IG5vdCBuZWNlc3NhcnkgdG8gcGVyZm9ybSBkZWxheXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgICAgICAgfHwgb24gUElPIG9wZXJhdGlvbnMuCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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SUdfU1RBTkRBTE9ORT15CiBDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CiBDT05GSUdfRldfTE9BREVSPXkKQEAgLTczMCw5ICs4NTEsOSBAQAogIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKIENPTkZJR19NVEQ9eQogIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9URVNUUyBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfQ09OQ0FUIGlzIG5vdCBzZXQKIENPTkZJR19NVERfUEFSVElUSU9OUz15Ci0jIENPTkZJR19NVERfVEVTVFMgaXMgbm90IHNldAogQ09ORklHX01URF9SRURCT09UX1BBUlRTPXkKIENPTkZJR19NVERfUkVEQk9PVF9ESVJFQ1RPUllfQkxPQ0s9LTEKIENPTkZJR19NVERfUkVEQk9PVF9QQVJUU19VTkFMTE9DQVRFRD15CkBAIC03NTIsNiArODczLDcgQEAKICMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKICMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAogIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfU01fRlRMIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKIAogIwpAQCAtNzkzLDYgKzkxNSw3IEBACiAjCiAjIENPTkZJR19NVERfREFUQUZMQVNIIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9NMjVQODAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NTVDI1TCBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAogIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldApAQCAtODA1LDkgKzkyOCwxMiBAQAogIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAogIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKIENPTkZJR19NVERfTkFORD15Ci0jIENPTkZJR19NVERfTkFORF9WRVJJRllfV1JJVEUgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0VDQz15CiAjIENPTkZJR19NVERfTkFORF9FQ0NfU01DIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1ZFUklGWV9XUklURSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU01fQ09NTU9OIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9OQU5EX01VU0VVTV9JRFMgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0RFTkFMSV9TQ1JBVENIX1JFR19BRERSPTB4RkYxMDgwMTgKICMgQ09ORklHX01URF9OQU5EX0dQSU8gaXMgbm90IHNldAogQ09ORklHX01URF9OQU5EX0lEUz15CiBDT05GSUdfTVREX05BTkRfUzNDMjQxMD15CkBAIC04NDMsNiArOTY5LDEwIEBACiAjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAogQ09ORklHX0JMS19ERVZfTE9PUD15CiAjIENPTkZJR19CTEtfREVWX0NSWVBUT0xPT1AgaXMgbm90IHNldAorCisjCisjIERSQkQgZGlzYWJsZWQgYmVjYXVzZSBQUk9DX0ZTLCBJTkVUIG9yIENPTk5FQ1RPUiBub3Qgc2VsZWN0ZWQKKyMKIENPTkZJR19CTEtfREVWX05CRD1tCiBDT05GSUdfQkxLX0RFVl9VQj1tCiBDT05GSUdfQkxLX0RFVl9SQU09eQpAQCAtODUxLDE5ICs5ODEsMjYgQEAKICMgQ09ORklHX0JMS19ERVZfWElQIGlzIG5vdCBzZXQKICMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAogQ09ORklHX0FUQV9PVkVSX0VUSD1tCisjIENPTkZJR19NR19ESVNLIGlzIG5vdCBzZXQKIENPTkZJR19NSVNDX0RFVklDRVM9eQorIyBDT05GSUdfQUQ1MjVYX0RQT1QgaXMg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yMKKyMgQ09ORklHX01URF9EQVRBRkxBU0ggaXMgbm90IHNldAorIyBDT05GSUdfTVREX00yNVA4MCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU1NUMjVMIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkQ9eQorQ09ORklHX01URF9OQU5EX0VDQz15CisjIENPTkZJR19NVERfTkFORF9FQ0NfU01DIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1ZFUklGWV9XUklURSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU01fQ09NTU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX01VU0VVTV9JRFMgaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0RFTkFMSV9TQ1JBVENIX1JFR19BRERSPTB4RkYxMDgwMTgKKyMgQ09ORklHX01URF9OQU5EX0dQSU8gaXMgbm90IHNldAorQ09ORklHX01URF9OQU5EX0lEUz15CitDT05GSUdfTVREX05BTkRfUzNDMjQxMD15CisjIENPTkZJR19NVERfTkFORF9TM0MyNDEwX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EX1MzQzI0MTBfSFdFQ0MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfUzNDMjQxMF9DTEtTVE9QIGlzIG5vdCBzZXQKKyMgQ09ORklH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dfU05EX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9SQVdNSURJX1NFUSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfT1BMM19MSUJfU0VRIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9PUEw0X0xJQl9TRVEgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1NCQVdFX1NFUSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfRU1VMTBLMV9TRVEgaXMgbm90IHNldAorQ09ORklHX1NORF9EUklWRVJTPXkKKyMgQ09ORklHX1NORF9EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfTVRQQVYgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1NFUklBTF9VMTY1NTAgaXMgbm90IHNldAorIyBDT05GSUdfU05EX01QVTQwMSBpcyBub3Qgc2V0CitDT05GSUdfU05EX0FSTT15CitDT05GSUdfU05EX1NQST15CitDT05GSUdfU05EX1VTQj15CisjIENPTkZJR19TTkRfVVNCX0FVRElPIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NORF9VU0JfVUExMDEgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1VTQl9DQUlBUSBpcyBub3Qgc2V0CitDT05GSUdfU05EX1NPQz1tCitDT05GSUdfU05EX1NPQ19BQzk3X0JVUz15CitDT05GSUdfU05EX1MzQzI0WFhfU09DPW0KK0NPTkZJR19TTkRfUzNDX1NPQ19BQzk3PW0KKyMgQ09ORklHX1NORF9TM0M2NFhYX1NPQ19XTTg1ODAgaXMgbm90IHNldAorQ09ORklHX1NORF9TT0NfU01ES19XTTk3MTM9bQorQ09ORklHX1NORF9TT0NfSTJDX0FORF9TUEk9bQorIyBDT05GSUdfU05EX1NPQ19BTExfQ09ERUNTIGlzIG5vdCBzZXQKK0NPTkZJR19TTkRfU09DX1dNOTcxMz1tCisjIENPTkZJR19TT1VORF9QUklNRSBpcyBub3Qgc2V0CitDT05GSUdfQUM5N19CVVM9bQogQ09ORklHX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bgkgICAgID0gUzVQQzEwMF9VTENPTl9ERUZBVUxULAorCQkudWZjb24JICAgICA9IFM1UEMxMDBfVUZDT05fREVGQVVMVCwKIAl9LAogCVsxXSA9IHsKIAkJLmh3cG9ydAkgICAgID0gMSwKIAkJLmZsYWdzCSAgICAgPSAwLAotCQkudWNvbgkgICAgID0gMHgzYzUsCi0JCS51bGNvbgkgICAgID0gMHgwMywKLQkJLnVmY29uCSAgICAgPSAweDUxLAorCQkudWNvbgkgICAgID0gUzVQQzEwMF9VQ09OX0RFRkFVTFQsCisJCS51bGNvbgkgICAgID0gUzVQQzEwMF9VTENPTl9ERUZBVUxULAorCQkudWZjb24JICAgICA9IFM1UEMxMDBfVUZDT05fREVGQVVMVCwKIAl9LAogCVsyXSA9IHsKIAkJLmh3cG9ydAkgICAgID0gMiwKIAkJLmZsYWdzCSAgICAgPSAwLAotCQkudWNvbgkgICAgID0gMHgzYzUsCi0JCS51bGNvbgkgICAgID0gMHgwMywKLQkJLnVmY29uCSAgICAgPSAweDUxLAorCQkudWNvbgkgICAgID0gUzVQQzEwMF9VQ09OX0RFRkFVTFQsCisJCS51bGNvbgkgICAgID0gUzVQQzEwMF9VTENPTl9ERUZBVUxULAorCQkudWZjb24JICAgICA9IFM1UEMxMDBfVUZDT05fREVGQVVMVCwKIAl9LAogCVszXSA9IHsKIAkJLmh3cG9ydAkgICAgID0gMywKIAkJLmZsYWdzCSAgICAgPSAwLAotCQkudWNvbgkgICAgID0gMHgzYzUsCi0JCS51bGNvbgkgICAgID0gMHgwMywKLQkJLnVmY29uCSAgICAgPSAweDUxLAorCQkudWNvbgkgICAgID0gUzVQQzEwMF9VQ09OX0RFRkFVTFQsCisJCS51bGNvbgkgICAgID0gUzVQQzEwMF9VTENPTl9ERUZBVUxULAorCQkudWZjb24JICAgICA9IFM1UEMxMDBfVUZDT05fREVGQVVMVCwKIAl9LAogfTsKIApAQCAtMTE4LDggKzEyOCw3IEBACiBzdGF0aWMgc3RydWN0IHMzY19mYl9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gTG9vcFNldHVwX2VvZmZzZXRfYml0cyAgICAgICAgICAwCisjZGVmaW5lIExvb3BTZXR1cF9lb2Zmc2V0X21hc2sgICAgICAgICAgMHgzZmYKKyNkZWZpbmUgTG9vcFNldHVwX2RvbnRjYXJlX2JpdHMgICAgICAgICAxMAorI2RlZmluZSBMb29wU2V0dXBfZG9udGNhcmVfbWFzayAgICAgICAgIDB4MworI2RlZmluZSBMb29wU2V0dXBfcmVnX2JpdHMgICAgICAgICAgICAgIDEyCisjZGVmaW5lIExvb3BTZXR1cF9yZWdfbWFzayAgICAgICAgICAgICAgMHhmCisjZGVmaW5lIExvb3BTZXR1cF9zb2Zmc2V0X2JpdHMgICAgICAgICAgMTYKKyNkZWZpbmUgTG9vcFNldHVwX3NvZmZzZXRfbWFzayAgICAgICAgICAweGYKKyNkZWZpbmUgTG9vcFNldHVwX2NfYml0cyAgICAgICAgICAgICAgICAyMAorI2RlZmluZSBMb29wU2V0dXBfY19tYXNrICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBMb29wU2V0dXBfcm9wX2JpdHMgICAgICAgICAgICAgIDIxCisjZGVmaW5lIExvb3BTZXR1cF9yb3BfbWFzayAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIExvb3BTZXR1cF9jb2RlX2JpdHMgICAgICAgICAgICAgMjMKKyNkZWZpbmUgTG9vcFNldHVwX2NvZGVfbWFzayAgICAgICAgICAgICAweDFmZgorCitzdGF0aWMgdm9pZCBkZWNvZGVfTG9vcFNldHVwXzAodW5zaWduZWQgaW50IG9wY29kZSkKK3sKKwlpbnQgYyAgID0gKChvcGNvZGUgPj4gTG9vcFNldHVwX2NfYml0cykgICAmIExvb3BTZXR1cF9jX21hc2spOworCWludCByZWcgPSAoKG9wY29kZSA+PiBMb29wU2V0dXBfcmVnX2JpdHMpICYgTG9vcFNldHVwX3JlZ19tYXNrKTsKKwlpbnQgcm9wID0gKChvcGNvZGUgPj4gTG9vcFNldHVwX3JvcF9iaXRzKSAmIExvb3BTZXR1cF9yb3BfbWFzayk7CisKKwlwcl9jb250KCJMU0VUVVAgPD4gTEMlaSIsIGMpOworCWlmICgocm9wICYgMSkgPT0gMSkKKwkJcHJfY29udCgiPSBQJWkiLCByZWcpOworCWlmICgocm9wICYgMikgPT0gMikKKwkJcHJfY29udCgiID4+IDB4MSIpOworfQorCisjZGVmaW5lIERzcExEU1Rfb3Bjb2RlICAgICAgICAgIDB4OWMwMAorI2RlZmluZSBEc3BMRFNUX3JlZ19iaXRzICAgICAgICAwCisjZGVmaW5lIERzcExEU1RfcmVnX21hc2sgICAgICAgIDB4NworI2RlZmluZSBEc3BMRFNUX2lfYml0cyAgICAgICAgICAzCisjZGVmaW5lIERzcExEU1RfaV9tYXNrICAgICAgICAgIDB4MworI2RlZmluZSBEc3BMRFNUX21fYml0cyAgICAgICAgICA1CisjZGVmaW5lIERzcExEU1RfbV9tYXNrICAgICAgICAgIDB4MworI2RlZmluZSBEc3BMRFNUX2FvcF9iaXRzICAgICAgICA3CisjZGVmaW5lIERzcExEU1RfYW9wX21hc2sgICAgICAgIDB4MworI2RlZmluZSBEc3BMRFNUX1dfYml0cyAgICAgICAgICA5CisjZGVmaW5lIERzcExEU1RfV19tYXNrICAgICAgICAgIDB4MQorI2RlZmluZSBEc3BMRFNUX2NvZGVfYml0cyAgICAgICAxMAorI2RlZmluZSBEc3BMRFNUX2NvZGVfbWFzayAgICAgICAweDNmCisKK3N0YXRpYyB2b2lkIGRlY29kZV9kc3BMRFNUXzAodW5zaWduZWQgaW50IG9wY29kZSkKK3sKKwlpbnQgaSAgID0gKChvcGNvZGUgPj4gRHNwTERTVF9pX2JpdHMpICYgRHNwTERTVF9pX21hc2spOworCWludCBtICAgPSAoKG9wY29kZSA+PiBEc3BMRFNUX21fYml0cykgJiBEc3BMRFNUX21fbWFzayk7CisJaW50IFcgICA9ICgob3Bjb2RlID4+IERzcExEU1RfV19iaXRzKSAmIERzcExEU1RfV19tYXNrKTsKKwlpbnQgYW9wID0gKChvcGNvZGUgPj4gRHNwTERTVF9hb3BfYml0cykgJiBEc3BMRFNUX2FvcF9tYXNrKTsKKwlpbnQgcmVnID0gKChvcGNvZGUgPj4gRHNwTERTVF9yZWdfYml0cykgJiBEc3BMRFNUX3JlZ19tYXNrKTsKKworCWlmIChXID09IDApIHsKKwkJcHJfY29udCgiUiVpIiwgcmVnKTsKKwkJc3dpdGNoIChtKSB7CisJCWNhc2UgMDoKKwkJCXByX2NvbnQoIiA9ICIpOworCQkJYnJlYWs7CisJCWNhc2UgMToKKwkJCXByX2NvbnQoIi5MID0gIik7CisJCQlicmVhazsKKwkJY2FzZSAyOgorCQkJcHJfY29udCgiLlcgPSAiKTsKKwkJCWJyZWFrOworCQl9CisJfQorCisJcHJfY29udCgiWyBJJWkiLCBpKTsKKworCXN3aXRjaCAoYW9wKSB7CisJY2FzZSAwOgorCQlwcl9jb250KCIrKyBdIik7CisJCWJyZWFrOworCWNhc2UgMToKKwkJcHJfY29udCgiLS0gXSIpOworCQlicmVhazsKKwl9CisKKwlpZiAoVyA9PSAxKSB7CisJCXByX2NvbnQoIiA9IFIlaSIsIHJlZyk7CisJCXN3aXRjaCAobSkgeworCQljYXNlIDE6CisJCQlwcl9jb250KCIuTCA9ICIpOworCQkJYnJlYWs7CisJCWNhc2UgMjoKKwkJCXByX2NvbnQoIi5XID0gIik7CisJCQlicmVhazsKKwkJfQorCX0KK30KKworI2RlZmluZSBMRFNUX29wY29kZSAgICAgICAgICAgICAweDkwMDAKKyNkZWZpbmUgTERTVF9yZWdfYml0cyAgICAgICAgICAgMAorI2RlZmluZSBMRFNUX3JlZ19tYXNrICAgICAgICAgICAweDcKKyNkZWZpbmUgTERTVF9wdHJfYml0cyAgICAgICAgICAgMworI2RlZmluZSBMRFNUX3B0cl9tYXNrICAgICAgICAgICAweDcKKyNkZWZpbmUgTERTVF9aX2JpdHMgICAgICAgICAgICAgNgorI2RlZmluZSBMRFNUX1pfbWFzayAgICAgICAgICAgICAweDEKKyNkZWZpbmUgTERTVF9hb3BfYml0cyAgICAgICAgICAgNworI2RlZmluZSBMRFNUX2FvcF9tYXNrICAgICAgICAgICAweDMKKyNkZWZpbmUgTERTVF9XX2JpdHMgICAgICAgICAgICAgOQorI2RlZmluZSBMRFNUX1dfbWFzayAgICAgICAgICAgICAweDEKKyNkZWZpbmUgTERTVF9zel9iaXRzICAgICAgICAgICAgMTAKKyNkZWZpbmUgTERTVF9zel9tYXNrICAgICAgICAgICAgMHgzCisjZGVmaW5lIExEU1RfY29kZV9iaXRzICAgICAgICAgIDEyCisjZGVmaW5lIExEU1RfY29kZV9tYXNrICAgICAgICAgIDB4ZgorCitzdGF0aWMgdm9pZCBkZWNvZGVfTERTVF8wKHVuc2lnbmVkIGludCBvcGNvZGUpCit7CisJaW50IFogICA9ICgob3Bjb2RlID4+IExEU1RfWl9iaXRzKSAmIExEU1RfWl9tYXNrKTsKKwlpbnQgVyAgID0gKChvcGNvZGUgPj4gTERTVF9XX2JpdHMpICYgTERTVF9XX21hc2spOworCWludCBzeiAgPSAoKG9wY29kZSA+PiBMRFNUX3N6X2JpdHMpICYgTERTVF9zel9tYXNrKTsKKwlpbnQgYW9wID0gKChvcGNvZGUgPj4gTERTVF9hb3BfYml0cykgJiBMRFNUX2FvcF9tYXNrKTsKKwlpbnQgcmVnID0gKChvcGNvZGUgPj4gTERTVF9yZWdfYml0cykgJiBMRFNUX3JlZ19tYXNrKTsKKwlpbnQgcHRyID0gKChvcGNvZGUgPj4gTERTVF9wdHJfYml0cykgJiBMRFNUX3B0cl9tYXNrKTsKKworCWlmIChXID09IDApCisJCXByX2NvbnQoIiVzJWkgPSAiLCAoc3ogPT0gMCAmJiBaID09IDEpID8gIlAiIDogIlIiLCByZWcpOworCisJc3dpdGNoIChzeikgeworCWNhc2UgMToKKwkJcHJfY29udCgiVyIpOworCQlicmVhazsKKwljYXNlIDI6CisJCXByX2NvbnQoIkIiKTsKKwkJYnJlYWs7CisJfQorCisJcHJfY29udCgiW1AlaSIsIHB0cik7CisKKwlzd2l0Y2ggKGFvcCkgeworCWNhc2UgMDoKKwkJcHJfY29udCgiKysiKTsKKwkJYnJlYWs7CisJY2FzZSAxOgorCQlwcl9jb250KCItLSIpOworCQlicmVhazsKKwl9CisJcHJfY29udCgiXSIpOworCisJaWYgKFcgPT0gMSkKKwkJcHJfY29udCgiID0gJXMlaSAiLCAoc3ogPT0gMCAmJiBaID09IDEpID8gIlAiIDogIlIiLCByZWcpOworCisJaWYgKHN6KSB7CisJCWlmIChaKQorCQkJcHJfY29udCgiIChYKSIpOworCQllbHNlCisJCQlwcl9jb250KCIgKFopIik7CisJfQorfQorCisjZGVmaW5lIExEU1RpaV9vcGNvZGUgICAgICAgICAgIDB4YTAwMAorI2RlZmluZSBMRFNUaWlfcmVnX2JpdCAgICAgICAgICAwCisjZGVmaW5lIExEU1RpaV9yZWdfbWFzayAgICAgICAgIDB4NworI2RlZmluZSBMRFNUaWlfcHRyX2JpdCAgICAgICAgICAzCisjZGVmaW5lIExEU1RpaV9wdHJfbWFzayAgICAgICAgIDB4NworI2RlZmluZSBMRFNUaWlfb2Zmc2V0X2JpdCAgICAgICA2CisjZGVmaW5lIExEU1RpaV9vZmZzZXRfbWFzayAgICAgIDB4ZgorI2RlZmluZSBMRFNUaWlfb3BfYml0ICAgICAgICAgICAxMAorI2RlZmluZSBMRFNUaWlfb3BfbWFzayAgICAgICAgICAweDMKKyNkZWZpbmUgTERTVGlpX1dfYml0ICAgICAgICAgICAgMTIKKyNkZWZpbmUgTERTVGlpX1dfbWFzayAgICAgICAgICAgMHgxCisjZGVmaW5lIExEU1RpaV9jb2RlX2JpdCAgICAgICAgIDEzCisjZGVmaW5lIExEU1RpaV9jb2RlX21hc2sgICAgICAgIDB4NworCitzdGF0aWMgdm9pZCBkZWNvZGVfTERTVGlpXzAodW5zaWduZWQgaW50IG9wY29kZSkKK3sKKwlpbnQgcmVnID0gKChvcGNvZGUgPj4gTERTVGlpX3JlZ19iaXQpICYgTERTVGlpX3JlZ19tY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eElfc3pfYml0cyAgICAgICAgMjIKKyNkZWZpbmUgTERTVGlkeElfc3pfbWFzayAgICAgICAgMHgzCisjZGVmaW5lIExEU1RpZHhJX1pfYml0cyAgICAgICAgIDI0CisjZGVmaW5lIExEU1RpZHhJX1pfbWFzayAgICAgICAgIDB4MQorI2RlZmluZSBMRFNUaWR4SV9XX2JpdHMgICAgICAgICAyNQorI2RlZmluZSBMRFNUaWR4SV9XX21hc2sgICAgICAgICAweDEKKyNkZWZpbmUgTERTVGlkeElfY29kZV9iaXRzICAgICAgMjYKKyNkZWZpbmUgTERTVGlkeElfY29kZV9tYXNrICAgICAgMHgzZgorCitzdGF0aWMgdm9pZCBkZWNvZGVfTERTVGlkeElfMCh1bnNpZ25lZCBpbnQgb3Bjb2RlKQoreworCWludCBaICAgICAgPSAoKG9wY29kZSA+PiBMRFNUaWR4SV9aX2JpdHMpICAgICAgJiBMRFNUaWR4SV9aX21hc2spOworCWludCBXICAgICAgPSAoKG9wY29kZSA+PiBMRFNUaWR4SV9XX2JpdHMpICAgICAgJiBMRFNUaWR4SV9XX21hc2spOworCWludCBzeiAgICAgPSAoKG9wY29kZSA+PiBMRFNUaWR4SV9zel9iaXRzKSAgICAgJiBMRFNUaWR4SV9zel9tYXNrKTsKKwlpbnQgcmVnICAgID0gKChvcGNvZGUgPj4gTERTVGlkeElfcmVnX2JpdHMpICAgICYgTERTVGlkeElfcmVnX21hc2spOworCWludCBwdHIgICAgPSAoKG9wY29kZSA+PiBMRFNUaWR4SV9wdHJfYml0cykgICAgJiBMRFNUaWR4SV9wdHJfbWFzayk7CisJaW50IG9mZnNldCA9ICgob3Bjb2RlID4+IExEU1RpZHhJX29mZnNldF9iaXRzKSAmIExEU1RpZHhJX29mZnNldF9tYXNrKTsKKworCWlmIChXID09IDApCisJCXByX2NvbnQoIiVzJWkgPSAiLCBzeiA9PSAwICYmIFogPT0gMSA/ICJQIiA6ICJSIiwgcmVnKTsKKworCWlmIChzeiA9PSAxKQorCQlwcl9jb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FRYIFByaW9yaXR5IChQcmlvcml0eS9NYWlsYm94KikgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdCQQkJCTB4MDAxMAkvKiBXYWtlLVVwIE9uIENBTiBCdXMgQWN0aXZpdHkgRW5hYmxlICAgKi8KLSNkZWZpbmUJU01SCQkJMHgwMDIwCS8qIFNsZWVwIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ1NSCQkJMHgwMDQwCS8qIENBTiBTdXNwZW5kIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0NSCQkJMHgwMDgwCS8qIENBTiBDb25maWd1cmF0aW9uIE1vZGUgUmVxdWVzdCAgICAgICAgICAgICAgICovCi0KLS8qIENBTl9TVEFUVVMgTWFza3MJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlXVAkJCTB4MDAwMQkvKiBUWCBXYXJuaW5nIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdSCQkJMHgwMDAyCS8qIFJYIFdhcm5pbmcgRmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVAJCQkweDAwMDQJLyogRXJyb3IgUGFzc2l2ZSBNb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRUJPCQkJMHgwMDA4CS8qIEVycm9yIEJ1cyBPZmYgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVNNQQkJCTB4MDAyMAkvKiBTbGVlcCBNb2RlIEFja25vd2xlZGdlICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlDU0EJCQkweDAwNDAJLyogU3VzcGVuZCBNb2RlIEFja25vd2xlZGdlICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0NBCQkJMHgwMDgwCS8qIENvbmZpZ3VyYXRpb24gTW9kZSBBY2tub3dsZWRnZSAgICAgICAqLwotI2RlZmluZQlNQlBUUgkJMHgxRjAwCS8qIE1haWxib3ggUG9pbnRlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVFJNCQkJMHg0MDAwCS8qIFRyYW5zbWl0IE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJUkVDCQkJMHg4MDAwCS8qIFJlY2VpdmUgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0NMT0NLIE1hc2tzCQkJCQkJCQkJKi8KLSNkZWZpbmUJQlJQCQkJMHgwM0ZGCS8qIEJpdC1SYXRlIFByZS1TY2FsZXIgICovCi0KLS8qIENBTl9USU1JTkcgTWFza3MJCQkJCQkJCQkJCSovCi0jZGVmaW5lCVRTRUcxCQkweDAwMEYJLyogVGltZSBTZWdtZW50IDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVFNFRzIJCTB4MDA3MAkvKiBUaW1lIFNlZ21lbnQgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlTQU0JCQkweDAwODAJLyogU2FtcGxpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlTSlcJCQkweDAzMDAJLyogU3luY2hyb25pemF0aW9uIEp1bXAgV2lkdGggICAqLwotCi0vKiBDQU5fREVCVUcgTWFza3MJCQkJCQkJCQkJCSovCi0jZGVmaW5lCURFQwkJCTB4MDAwMQkvKiBEaXNhYmxlIENBTiBFcnJvciBDb3VudGVycyAgICovCi0jZGVmaW5lCURSSQkJCTB4MDAwMgkvKiBEaXNhYmxlIENBTiBSWCBJbnB1dCAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJ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DAwNDAJLyogQ0FOIFRYIEJ1cyBWYWx1ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQ0FOUlgJCTB4MDA4MAkvKiBDQU4gUlggQnVzIFZhbHVlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fTUJ4eF9JRDEgYW5kIENBTl9NQnh4X0lEMCBNYXNrcwkJCQkJCQkJCQkqLwotI2RlZmluZSBERkMJCQkweEZGRkYJLyogRGF0YSBGaWx0ZXJpbmcgQ29kZSAoSWYgRW5hYmxlZCkgKElEMCkgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFWFRJRF9MTwkweEZGRkYJLyogTG93ZXIgMTYgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChJRDApICAgKi8KLSNkZWZpbmUJRVhUSURfSEkJMHgwMDAzCS8qIFVwcGVyIDIgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChJRDEpICAgICovCi0jZGVmaW5lCUJBU0VJRAkJMHgxRkZDCS8qIEJhc2UgSWRlbnRpZmllciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJSURFCQkJMHgyMDAwCS8qIElkZW50aWZpZXIgRXh0ZW5zaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVJUUgkJCTB4NDAwMAkvKiBSZW1vdGUgRnJhbWUgVHJhbnNtaXNzaW9uIFJlcXVlc3QgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUFNRQkJCTB4ODAwMAkvKiBBY2NlcHRhbmNlIE1hc2sgRW5hYmxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fTUJ4eF9USU1FU1RBTVAgTWFza3MJCQkJCSovCi0jZGVmaW5lIFRTVgkJCTB4RkZGRgkvKiBUaW1lc3RhbXAgICAgKi8KLQotLyogQ0FOX01CeHhfTEVOR1RIIE1hc2tzCQkJCQkJKi8KLSNkZWZpbmUgRExDCQkJMHgwMDBGCS8qIERhdGEgTGVuZ3RoIENvZGUgICAgICovCi0KLS8qIENBTl9BTXh4SCBhbmQgQ0FOX0FNeHhMIE1hc2tzCQkJCQkJCQkJCQkJKi8KLSNkZWZpbmUgREZNCQkJMHhGRkZGCS8qIERhdGEgRmllbGQgTWFzayAoSWYgRW5hYmxlZCkgKENBTl9BTXh4TCkgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFWFRJRF9MTwkweEZGRkYJLyogTG93ZXIgMTYgQml0cyBvZiBFeHRlbmRlZCBJZGVudGlmaWVyIChDQU5fQU14eEwpICAgICAqLwotI2RlZmluZQlFWFRJRF9ISQkweDAwMDMJLyogVXBwZXIgMiBCaXRzIG9mIEV4dGVuZGVkIElkZW50aWZpZXIgKENBTl9BTXh4SCkgICAgICAqLwotI2RlZmluZQlCQVNFSUQJCTB4MUZGQwkvKiBCYXNlIElkZW50aWZpZXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQU1JREUJCTB4MjAwMAkvKiBBY2NlcHRhbmNlIE1hc2sgSUQgRXh0ZW5zaW9uIEVuYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRk1ECQkJMHg0MDAwCS8qIEZ1bGwgTWFzayBEYXRhIEZpZWxkIEVuYWJsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUZERgkJCTB4ODAwMAkvKiBGaWx0ZXIgT24gRGF0YSBGaWVsZCBFbmFibGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fTUMxIE1hc2tzCQkJCQkJCQkJKi8K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UgSW4gTWFpbGJveCAwICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMQkJMHgwMDAyCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAxICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMgkJMHgwMDA0CS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAyICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMwkJMHgwMDA4CS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAzICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNAkJMHgwMDEwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA0ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNQkJMHgwMDIwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA1ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNgkJMHgwMDQwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA2ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGNwkJMHgwMDgwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA3ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGOAkJMHgwMTAwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA4ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGOQkJMHgwMjAwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCA5ICAgICAgICAgICAgICovCi0jZGVmaW5lCU1CVElGMTAJCTB4MDQwMAkvKiBUWCBJbnRlcnJ1cHQgQWN0aXZlIEluIE1haWxib3ggMTAgICAgKi8KLSNkZWZpbmUJTUJUSUYxMQkJMHgwODAwCS8qIFRYIEludGVycnVwdCBBY3RpdmUgSW4gTWFpbGJveCAxMSAgICAqLwotI2RlZmluZQlNQl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MDAwCS8qIEVuYWJsZSBJbnRlcnJ1cHQgRm9yIE1haWxib3ggMzAgICAgICAqLwotI2RlZmluZQlNQklNMzEJCTB4ODAwMAkvKiBFbmFibGUgSW50ZXJydXB0IEZvciBNYWlsYm94IDMxICAgICAgKi8KLQotLyogQ0FOX0dJTSBNYXNrcwkJCQkJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlFV1RJTQkJMHgwMDAxCS8qIEVuYWJsZSBUWCBFcnJvciBDb3VudCBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVXUklNCQkweDAwMDIJLyogRW5hYmxlIFJYIEVycm9yIENvdW50IEludGVycnVwdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVBJTQkJMHgwMDA0CS8qIEVuYWJsZSBFcnJvci1QYXNzaXZlIE1vZGUgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlCT0lNCQkweDAwMDgJLyogRW5hYmxlIEJ1cyBPZmYgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlXVUlNCQkweDAwMTAJLyogRW5hYmxlIFdha2UtVXAgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVSUFJTQkJMHgwMDIwCS8qIEVuYWJsZSBBY2Nlc3MgVG8gVW5pbXBsZW1lbnRlZCBBZGRyZXNzIEludGVycnVwdCAgICAgKi8KLSNkZWZpbmUJQUFJTQkJMHgwMDQwCS8qIEVuYWJsZSBBYm9ydCBBY2tub3dsZWRnZSBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlSTUxJTQkJMHgwMDgwCS8qIEVuYWJsZSBSWCBNZXNzYWdlIExvc3QgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVVDRUlNCQkweDAxMDAJLyogRW5hYmxlIFVuaXZlcnNhbCBDb3VudGVyIE92ZXJmbG93IEludGVycnVwdCAgICAgICAgICAqLwotI2RlZmluZQlFWFRJTQkJMHgwMjAwCS8qIEVuYWJsZSBFeHRlcm5hbCBUcmlnZ2VyIE91dHB1dCBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlBRElNCQkweDA0MDAJLyogRW5hYmxlIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0dJUyBNYXNrcwkJCQkJCQkJCQkJCQkJCSovCi0jZGVmaW5lCUVXVElTCQkweDAwMDEJLyogVFggRXJyb3IgQ291bnQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVXUklTCQkweDAwMDIJLyogUlggRXJyb3IgQ291bnQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVQSVMJCTB4MDAwNAkvKiBFcnJvci1QYXNzaXZlIE1vZGUgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJQk9JUwkJMHgwMDA4CS8qIEJ1cyBPZmYgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdVSVMJCTB4MDAxMAkvKiBXYWtlLVVwIElSUSBTdGF0dXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVSUFJUwkJMHgwMDIwCS8qIEFjY2VzcyBUbyBVbmltcGxlbWVudGVkIEFkZHJlc3MgSVJRIFN0YXR1cyAgICovCi0jZGVmaW5lCUFBSVMJCTB4MDA0MAkvKiBBYm9ydCBBY2tub3dsZWRnZSBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJUk1MSVMJCTB4MDA4MAkvKiBSWCBNZXNzYWdlIExvc3QgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNFSVMJCTB4MDEwMAkvKiBVbml2ZXJzYWwgQ291bnRlciBPdmVyZmxvdyBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVYVElTCQkweDAyMDAJLyogRXh0ZXJuYWwgVHJpZ2dlciBPdXRwdXQgSVJRIFN0YXR1cyAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlBRElTCQkweDA0MDAJLyogQWNjZXNzIERlbmllZCBJUlEgU3RhdHVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0dJRiBNYXNrcwkJCQkJCQkJCQkJCQkJCSovCi0jZGVmaW5lCUVXVElGCQkweDAwMDEJLyogVFggRXJyb3IgQ291bnQgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJRVdSSUYJCTB4MDAwMgkvKiBSWCBFcnJvciBDb3VudCBJUlEgRmxhZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlFUElGCQkweDAwMDQJLyogRXJyb3ItUGFzc2l2ZSBNb2RlIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUJPSUYJCTB4MDAwOAkvKiBCdXMgT2ZmIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVdVSUYJCTB4MDAxMAkvKiBXYWtlLVVwIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVVJQUlGCQkweDAwMjAJLyogQWNjZXNzIFRvIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJUlEgRmxhZyAgICAgICAgICAgICAqLwotI2RlZmluZQlBQUlGCQkweDAwNDAJLyogQWJvcnQgQWNrbm93bGVkZ2UgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCVJNTElGCQkweDAwODAJLyogUlggTWVzc2FnZSBMb3N0IElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNFSUYJCTB4MDEwMAkvKiBVbml2ZXJzYWwgQ291bnRlciBPdmVyZmxvdyBJUlEgRmxhZyAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUVYVElGCQkweDAyMDAJLyogRXh0ZXJuYWwgVHJpZ2dlciBPdXRwdXQgSVJRIEZsYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUFESUYJCTB4MDQwMAkvKiBBY2Nlc3MgRGVuaWVkIElSUSBGbGFnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCi0vKiBDQU5fVUNDTkYgTWFza3MJCQkJCQkJCQkJCQkJCQkqLwotI2RlZmluZQlVQ0NORgkJMHgwMDBGCS8qIFVuaXZlcnNhbCBDb3VudGVyIE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1NUQU1QCTB4MDAwMQkvKiAgICAgICAgICAgICAgVGltZXN0YW1wIE1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1dET0cJCTB4MDAwMgkvKiAgICAgICAgICAgICAgV2F0Y2hkb2cgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX0FVVE9UWAkweDAwMDMJLyogICAgICAgICAgICAgIEF1dG8tVHJhbnNtaXQgTW9kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19FUlJPUgkweDAwMDYJLyogICAgICAgICAgICAgIENBTiBFcnJvciBGcmFtZSBDb3VudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgVUNfT1ZFUgkJMHgwMDA3CS8qICAgICAgICAgICAgICBDQU4gT3ZlcmxvYWQgRnJhbWUgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX0xPU1QJCTB4MDAwOAkvKiAgICAgICAgICAgICAgQXJiaXRyYXRpb24gTG9zdCBEdXJpbmcgVFggQ291bnQgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgVUNfQUEJCTB4MDAwOQkvKiAgICAgICAgICAgICAgVFggQWJvcnQgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1RBCQkweDAwMEEJLyogICAgICAgICAgICAgIFRYIFN1Y2Nlc3NmdWwgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19SRUpFQ1QJMHgwMDBCCS8qICAgICAgICAgICAgICBSWCBNZXNzYWdlIFJlamVjdGVkIENvdW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JNTAkJMHgwMDBDCS8qICAgICAgICAgICAgICBSWCBNZXNzYWdlIExvc3QgQ291bnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JYCQkweDAwMEQJLyogICAgICAgICAgICAgIFRvdGFsIFN1Y2Nlc3NmdWwgUlggTWVzc2FnZXMgQ291bnQgICAgICAgICAgICAgICovCi0jZGVmaW5lIFVDX1JNUAkJMHgwMDBFCS8qICAgICAgICAgICAgICBTdWNjZXNzZnVsIFJYIFcvTWF0Y2hpbmcgSUQgQ291bnQgICAgICAgICAgICAgICAqLwotI2RlZmluZSBVQ19BTEwJCTB4MDAwRgkvKiAgICAgICAgICAgICAgQ29ycmVjdCBNZXNzYWdlIE9uIENBTiBCdXMgTGluZSBDb3VudCAgICovCi0jZGVmaW5lCVVDUkMJCTB4MDAyMAkvKiBVbml2ZXJzYWwgQ291bnRlciBSZWxvYWQvQ2xlYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJVUNDVAkJMHgwMDQwCS8qIFVuaXZlcnNhbCBDb3VudGVyIENBTiBUcmlnZ2VyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZQlVQ0UJCQkweDAwODAJLyogVW5pdmVyc2FsIENvdW50ZXIgRW5hYmxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotLyogQ0FOX0VTUiBNYXNrcwkJCQkJCQkJCQkqLwotI2RlZmluZQlBQ0tFCQkweDAwMDQJLyogQWNrbm93bGVkZ2UgRXJyb3IgICAgICAgICAgICAqLwotI2RlZmluZQlTRVIJCQkweDAwMDgJLyogU3R1ZmYgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lCUNSQ0UJCTB4MDAxMAkvKiBDUkMgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUJU0EwCQkJMHgwMDIwCS8qIFN0dWNrIEF0IERvbWluYW50IEVyc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ICAgICAgICAgICAgICAgICAgICAgICBXQkEgIDB4MTAgICAgICAgLyogV2FrZXVwIE9uIENBTiBCdXMgQWN0aXZpdHkgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNNUiAgMHgyMCAgICAgICAvKiBTbGVlcCBNb2RlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIENTUiAgMHg0MCAgICAgICAvKiBDQU4gU3VzcGVuZCBNb2RlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIENDUiAgMHg4MCAgICAgICAvKiBDQU4gQ29uZmlndXJhdGlvbiBNb2RlIFJlcXVlc3QgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1NUQVRVUyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICAgV1QgIDB4MSAgICAgICAgLyogQ0FOIFRyYW5zbWl0IFdhcm5pbmcgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgIFdSICAweDIgICAgICAgIC8qIENBTiBSZWNlaXZlIFdhcm5pbmcgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgIEVQICAweDQgICAgICAgIC8qIENBTiBFcnJvciBQYXNzaXZlIE1vZGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEVCTyAgMHg4ICAgICAgICAvKiBDQU4gRXJyb3IgQnVzIE9mZiBNb2RlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBDU0EgIDB4NDAgICAgICAgLyogQ0FOIFN1c3BlbmQgTW9kZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgQ0NBICAweDgwICAgICAgIC8qIENBTiBDb25maWd1cmF0aW9uIE1vZGUgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQlBUUiAgMHgxZjAwICAgICAvKiBNYWlsYm94IFBvaW50ZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFRSTSAgMHg0MDAwICAgICAvKiBUcmFuc21pdCBNb2RlIFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgUkVDICAweDgwMDAgICAgIC8qIFJlY2VpdmUgTW9kZSBTdGF0dXMgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0RFQlVHICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERFQyAgMHgxICAgICAgICAvKiBEaXNhYmxlIFRyYW5zbWl0L1JlY2VpdmUgRXJyb3IgQ291bnRlcnMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERSSSAgMHgyICAgICAgICAvKiBEaXNhYmxlIENBTlJYIElucHV0IFBpbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgRFRPICAweDQgICAgICAgIC8qIERpc2FibGUgQ0FOVFggT3V0cHV0IFBpbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgRElMICAweDggICAgICAgIC8qIERpc2FibGUgSW50ZXJuYWwgTG9vcCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUFBICAweDEwICAgICAgIC8qIE1vZGUgQXV0by1BY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTVJCICAweDIwICAgICAgIC8qIE1vZGUgUmVhZCBCYWNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBDREUgIDB4ODAwMCAgICAgLyogQ0FOIERlYnVnIE1vZGUgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9DTE9DSyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBCUlAgIDB4M2ZmICAgICAgLyogQ0FOIEJpdCBSYXRlIFByZXNjYWxlciAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfVElNSU5HICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNKVyAgMHgzMDAgICAgICAvKiBTeW5jaHJvbml6YXRpb24gSnVtcCBXaWR0aCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgU0FNICAweDgwICAgICAgIC8qIFNhbXBsaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFNFRzIgIDB4NzAgICAgICAgLyogVGltZSBTZWdtZW50IDIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUU0VHMSAgMHhmICAgICAgICAvKiBUaW1lIFNlZ21lbnQgMSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfSU5UUiAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgQ0FOUlggIDB4ODAgICAgICAgLyogU2VyaWFsIElucHV0IEZyb20gVHJhbnNjZWl2ZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBDQU5UWCAgMHg0MCAgICAgICAvKiBTZXJpYWwgT3V0cHV0IFRvIFRyYW5zY2VpdmVyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgU01BQ0sgIDB4OCAgICAgICAgLyogU2xlZXAgTW9kZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBHSVJRICAweDQgICAgICAgIC8qIEdsb2JhbCBJbnRlcnJ1cHQgUmVxdWVzdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElSUSAgMHgyICAgICAgICAvKiBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBSZXF1ZXN0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJUlEgIDB4MSAgICAgICAgLyogTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBSZXF1ZXN0ICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9HSU0gKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEVXVElNICAweDEgICAgICAgIC8qIEVycm9yIFdhcm5pbmcgVHJhbnNtaXQgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBFV1JJTSAgMHgyICAgICAgICAvKiBFcnJvciBXYXJuaW5nIFJlY2VpdmUgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJTSAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEJPSU0gIDB4OCAgICAgICAgLyogQnVzIE9mZiBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBXVUlNICAweDEwICAgICAgIC8qIFdha2V1cCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlNICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQUlNICAweDQwICAgICAgIC8qIEFib3J0IEFja25vd2xlZGdlIEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MSU0gIDB4ODAgICAgICAgLyogUmVjZWl2ZSBNZXNzYWdlIExvc3QgSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJTSAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBRElNICAweDQwMCAgICAgIC8qIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0IE1hc2sgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0dJUyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgRVdUSVMgIDB4MSAgICAgICAgLyogRXJyb3IgV2FybmluZyBUcmFuc21pdCBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgRVdSSVMgIDB4MiAgICAgICAgLyogRXJyb3IgV2FybmluZyBSZWNlaXZlIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJUyAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQk9JUyAgMHg4ICAgICAgICAvKiBCdXMgT2ZmIEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgV1VJUyAgMHgxMCAgICAgICAvKiBXYWtldXAgSW50ZXJydXB0IFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlTICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBSVMgIDB4NDAgICAgICAgLyogQWJvcnQgQWNrbm93bGVkZ2UgSW50ZXJydXB0IFN0YXR1cyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTElTICAweDgwICAgICAgIC8qIFJlY2VpdmUgTWVzc2FnZSBMb3N0IEludGVycnVwdCBTdGF0dXMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJUyAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgU3RhdHVzICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFESVMgIDB4NDAwICAgICAgLyogQWNjZXNzIERlbmllZCBJbnRlcnJ1cHQgU3RhdHVzICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9HSUYgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEVXVElGICAweDEgICAgICAgIC8qIEVycm9yIFdhcm5pbmcgVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBFV1JJRiAgMHgyICAgICAgICAvKiBFcnJvciBXYXJuaW5nIFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgRVBJRiAgMHg0ICAgICAgICAvKiBFcnJvciBQYXNzaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEJPSUYgIDB4OCAgICAgICAgLyogQnVzIE9mZiBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBXVUlGICAweDEwICAgICAgIC8qIFdha2V1cCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFVJQUlGICAweDIwICAgICAgIC8qIFVuaW1wbGVtZW50ZWQgQWRkcmVzcyBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQUlGICAweDQwICAgICAgIC8qIEFib3J0IEFja25vd2xlZGdlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MSUYgIDB4ODAgICAgICAgLyogUmVjZWl2ZSBNZXNzYWdlIExvc3QgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0VJRiAgMHgxMDAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFeGNlZWRlZCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBRElGICAweDQwMCAgICAgIC8qIEFjY2VzcyBEZW5pZWQgSW50ZXJydXB0IEZsYWcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CVEQgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgVERSICAweDgwICAgICAgIC8qIFRlbXBvcmFyeSBEaXNhYmxlIFJlcXVlc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFREQSAgMHg0MCAgICAgICAvKiBUZW1wb3JhcnkgRGlzYWJsZSBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFREUFRSICAweDFmICAgICAgIC8qIFRlbXBvcmFyeSBEaXNhYmxlIFBvaW50ZXIgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1VDQ05GICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBVQ0NORiAgMHhmICAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBDb25maWd1cmF0aW9uICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFVDUkMgIDB4MjAgICAgICAgLyogVW5pdmVyc2FsIENvdW50ZXIgUmVsb2FkL0NsZWFyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFVDQ1QgIDB4NDAgICAgICAgLyogVW5pdmVyc2FsIENvdW50ZXIgQ0FOIFRyaWdnZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFVDRSAgMHg4MCAgICAgICAvKiBVbml2ZXJzYWwgQ291bnRlciBFbmFibGUgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0NFQyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBSWEVDTlQgIDB4ZmYgICAgICAgLyogUmVjZWl2ZSBFcnJvciBDb3VudGVyICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBUWEVDTlQgIDB4ZmYwMCAgICAgLyogVHJhbnNtaXQgRXJyb3IgQ291bnRlciAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfRVNSICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEZFUiAgMHg4MCAgICAgICAvKiBGb3JtIEVycm9yICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBCRUYgIDB4NDAgICAgICAgLyogQml0IEVycm9yIEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFNBMCAgMHgyMCAgICAgICAvKiBTdHVjayBBdCBEb21pbmFudCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBDUkNFICAweDEwICAgICAgIC8qIENSQyBFcnJvciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgU0VSICAweDggICAgICAgIC8qIFN0dWZmIEJpdCBFcnJvciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQ0tFICAweDQgICAgICAgIC8qIEFja25vd2xlZGdlIEVycm9yICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9FV1IgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgRVdMVEVDICAweGZmMDAgICAgIC8qIFRyYW5zbWl0IEVycm9yIFdhcm5pbmcgTGltaXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIEVXTFJFQyAgMHhmZiAgICAgICAvKiBSZWNlaXZlIEVycm9yIFdhcm5pbmcgTGltaXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0FNeHhfSCAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBGREYgIDB4ODAwMCAgICAgLyogRmlsdGVyIE9uIERhdGEgRmllbGQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEZNRCAgMHg0MDAwICAgICAvKiBGdWxsIE1hc2sgRGF0YSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIEFNSURFICAweDIwMDAgICAgIC8qIEFjY2VwdGFuY2UgTWFzayBJZGVudGlmaWVyIEV4dGVuc2lvbiAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgQkFTRUlEICAweDFmZmMgICAgIC8qIEJhc2UgSWRlbnRpZmllciAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgIEVYVElEX0hJICAweDMgICAgICAgIC8qIEV4dGVuZGVkIElkZW50aWZpZXIgSGlnaCBCaXRzICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9BTXh4X0wgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgIEVYVElEX0xPICAweGZmZmYgICAgIC8qIEV4dGVuZGVkIElkZW50aWZpZXIgTG93IEJpdHMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERGTSAgMHhmZmZmICAgICAvKiBEYXRhIEZpZWxkIE1hc2sgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CeHhfSUQxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIEFNRSAgMHg4MDAwICAgICAvKiBBY2NlcHRhbmNlIE1hc2sgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBSVFIgIDB4NDAwMCAgICAgLyogUmVtb3RlIFRyYW5zbWlzc2lvbiBSZXF1ZXN0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBJREUgIDB4MjAwMCAgICAgLyogSWRlbnRpZmllciBFeHRlbnNpb24gKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIEJBU0VJRCAgMHgxZmZjICAgICAvKiBCYXNlIElkZW50aWZpZXIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICBFWFRJRF9ISSAgMHgzICAgICAgICAvKiBFeHRlbmRlZCBJZGVudGlmaWVyIEhpZ2ggQml0cyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9JRDAgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgIEVYVElEX0xPICAweGZmZmYgICAgIC8qIEV4dGVuZGVkIElkZW50aWZpZXIgTG93IEJpdHMgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIERGTSAgMHhmZmZmICAgICAvKiBEYXRhIEZpZWxkIE1hc2sgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CeHhfVElNRVNUQU1QICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIFRTViAgMHhmZmZmICAgICAvKiBUaW1lIFN0YW1wIFZhbHVlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9NQnh4X0xFTkdUSCAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBETEMgIDB4ZiAgICAgICAgLyogRGF0YSBMZW5ndGggQ29kZSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMyAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTAgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDAgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFMSAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgMSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMiAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTIgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDIgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFMyAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgMyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTQgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFNSAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgNSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJ4eF9EQVRBMCAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICBDQU5fQllURTYgIDB4ZmYwMCAgICAgLyogRGF0YSBGaWVsZCBCeXRlIDYgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgIENBTl9CWVRFNyAgMHhmZiAgICAgICAvKiBEYXRhIEZpZWxkIEJ5dGUgNyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUMxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUMyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUM1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBNQzcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUM4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgIE1DOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9NQzIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjYgIDB4NDAwICAgICAgLyogTWFpbGJveCAyNiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1DMjkgIDB4MjAwMCAgICAgLyogTWFpbGJveCAyOSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUMzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNQzMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9NRDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICAgTUQ5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZWNlaXZlIEVuYWJsZSAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUQyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDE4ICAweDQgICAgICAgIC8qIE1haWxib3ggMTggUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDIxICAweDIwICAgICAgIC8qIE1haWxib3ggMjEgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDI0ICAweDEwMCAgICAgIC8qIE1haWxib3ggMjQgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjYgIDB4NDAwICAgICAgLyogTWFpbGJveCAyNiBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDI3ICAweDgwMCAgICAgIC8qIE1haWxib3ggMjcgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFJlY2VpdmUgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIE1EMjkgIDB4MjAwMCAgICAgLyogTWFpbGJveCAyOSBSZWNlaXZlIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBNRDMwICAweDQwMDAgICAgIC8qIE1haWxib3ggMzAgUmVjZWl2ZSBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgTUQzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIFJlY2VpdmUgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9STVAxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUk1QMCAgMHgxICAgICAgICAvK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ICAgICAgICAgICAgICAgICAgICBSTVAxMCAgMHg0MDAgICAgICAvKiBNYWlsYm94IDEwIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAxMyAgMHgyMDAwICAgICAvKiBNYWlsYm94IDEzIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JNUDIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTVAyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFJlY2VpdmUgTWVzc2FnZSBQZW5kaW5nICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1QMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBSZWNlaXZlIE1lc3NhZ2UgUGVuZGluZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNUDMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgUmVjZWl2ZSBNZXNzYWdlIFBlbmRpbmcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JNTDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwyICAweDQgICAgICAgIC8qIE1haWxib3ggMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUwzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw1ICAweDIwICAgICAgIC8qIE1haWxib3ggNSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw4ICAweDEwMCAgICAgIC8qIE1haWxib3ggOCBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSTUw5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxMSAgMHg4MDAgICAgICAvKiBNYWlsYm94IDExIFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxNCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDE0IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfUk1MMiAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTYgIDB4MSAgICAgICAgLyogTWFpbGJveCAxNiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMTkgIDB4OCAgICAgICAgLyogTWFpbGJveCAxOSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMjIgIDB4NDAgICAgICAgLyogTWFpbGJveCAyMiBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgUmVjZWl2ZSBNZXNzYWdlIExvc3QgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSTUwyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IFJlY2VpdmUgTWVzc2FnZSBMb3N0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUk1MMjUgIDB4MjAwICAgICAgLyogTWFpbGJveCAyNSBSZWNlaXZlIE1lc3NhZ2UgTG9zdCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFJNTDI2ICAweDQwMCAgICAgIC8qIE1haW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RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1MzICAweDggICAgICAgIC8qIE1haWxib3ggMyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgT1BTUzQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IE92ZXJ3cml0ZSBQcm90ZWN0aW9uL1NpbmdsZS1TaG90IFRyYW5zbWlzc2lvbiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBPUFNTNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgT3ZlcndyaXRlIFByb3RlY3Rpb24vU2luZ2xlLVNob3QgVHJhbnNtaXNzaW9uIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1M2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgT1BTUzcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IE92ZXJ3cml0ZSBQcm90ZWN0aW9uL1NpbmdsZS1TaG90IFRyYW5zbWlzc2lvbiBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBPUFNTOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggT3ZlcndyaXRlIFByb3RlY3Rpb24vU2luZ2xlLVNob3QgVHJhbnNtaXNzaW9uIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE9QU1M5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTAgIDB4N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BPUFNTMTcgIDB4MiAgICAgICAgLyogTWFpbGJveCAxNyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMTkgIDB4OCAgICAgICAgLyogTWFpbGJveCAxOSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjAgIDB4MTAgICAgICAgLyogTWFpbGJveCAyMCBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjIgIDB4NDAgICAgICAgLyogTWFpbGJveCAyMiBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjMgIDB4ODAgICAgICAgLyogTWFpbGJveCAyMyBPdmVyd3JpdGUgUHJvdGVjdGlvbi9TaW5nbGUtU2hvdCBUcmFuc21pc3Npb24gRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBPUFNTMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAy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ICAgICAgICAgVFJTOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxMCAgMHg0MDAgICAgICAvKiBNYWlsYm94IDEwIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxMyAgMHgyMDAwICAgICAvKiBNYWlsYm94IDEzIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RSUzIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlMyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IFJlcXVlc3QgU2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJTMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBUcmFuc21pdCBSZXF1ZXN0IFNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIFRSUzMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgVHJhbnNtaXQgUmVxdWVzdCBTZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RSUjEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlIwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlIzICAweDggICAgICAgIC8qIE1haWxib3ggMyBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlI2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRSUjcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVFJSOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggVHJhbnNtaXQgUmVxdWVzdCBSZXNldCAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUUlI5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgVFJSMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBUcmFuc21pdCBSZXF1ZXN0IFJlc2V0ICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9UUlIyICovCi0KLSNkZWZpbmUgIC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lcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBUUlIzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIFRyYW5zbWl0IFJlcXVlc3QgUmVzZXQgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX0FBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBBQTkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IEFib3J0IEFja25vd2xlZGdlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9BQTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUExNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggQWJvcnQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgQUEyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IEFib3J0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIEFBMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBBYm9ydCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBBQTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgQWJvcnQgQWNrbm93bGVkZ2UgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1RBMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgICBUQTkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9UQTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEExNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgVEEyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFRyYW5zbWl0IEFja25vd2xlZGdlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFRBMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBUcmFuc21pdCBBY2tub3dsZWRnZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBUQTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgVHJhbnNtaXQgQWNrbm93bGVkZ2UgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX1JGSDEgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkgwICAweDEgICAgICAgIC8qIE1haWxib3ggMCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDEgIDB4MiAgICAgICAgLyogTWFpbGJveCAxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZIMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkgzICAweDggICAgICAgIC8qIE1haWxib3ggMyBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDQgIDB4MTAgICAgICAgLyogTWFpbGJveCA0IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZINSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkg2ICAweDQwICAgICAgIC8qIE1haWxib3ggNiBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgIFJGSDcgIDB4ODAgICAgICAgLyogTWFpbGJveCA3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgUkZIOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggUmVtb3RlIEZyYW1lIEhhbmRsaW5nIEVuYWJsZSAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgICBSRkg5ICAweDIwMCAgICAgIC8qIE1haWxib3ggOSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTAgIDB4NDAwICAgICAgLyogTWFpbGJveCAxMCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTIgIDB4MTAwMCAgICAgLyogTWFpbGJveCAxMiBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTMgIDB4MjAwMCAgICAgLyogTWFpbGJveCAxMyBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgUkZIMTUgIDB4ODAwMCAgICAgLyogTWFpbGJveCAxNSBSZW1vdGUgRnJhbWUgSGFuZGxpbmcgRW5hYmxlICovCi0KLS8qIEJpdCBtYXNrcyBmb3IgQ0FOMF9SRkgyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBSRkgzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIFJlbW90ZSBGcmFtZSBIYW5kbGluZyBFbmFibGUgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CSU0xICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU0xICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU00ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgIE1CSU03ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IEludGVycnVwdCBNYXNrICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICAgTUJJTTggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IE1haWxib3ggSW50ZXJydXB0IE1hc2sgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgICBNQklNOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJJTTIgKi8KLQotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE2ICAweDEgICAgICAgIC8qIE1haWxib3ggMTYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE4ICAweDQgICAgICAgIC8qIE1haWxib3ggMTggTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTE5ICAweDggICAgICAgIC8qIE1haWxib3ggMTkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIxICAweDIwICAgICAgIC8qIE1haWxib3ggMjEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIyICAweDQwICAgICAgIC8qIE1haWxib3ggMjIgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI0ICAweDEwMCAgICAgIC8qIE1haWxib3ggMjQgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI1ICAweDIwMCAgICAgIC8qIE1haWxib3ggMjUgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI2ICAweDQwMCAgICAgIC8qIE1haWxib3ggMjYgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI3ICAweDgwMCAgICAgIC8qIE1haWxib3ggMjcgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI4ICAweDEwMDAgICAgIC8qIE1haWxib3ggMjggTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTI5ICAweDIwMDAgICAgIC8qIE1haWxib3ggMjkgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTMwICAweDQwMDAgICAgIC8qIE1haWxib3ggMzAgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJJTTMxICAweDgwMDAgICAgIC8qIE1haWxib3ggMzEgTWFpbGJveCBJbnRlcnJ1cHQgTWFzayAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJUSUYxICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGMCAgMHgxICAgICAgICAvKiBNYWlsYm94IDAgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUYxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjIgIDB4NCAgICAgICAgLyogTWFpbGJveCAyIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGMyAgMHg4ICAgICAgICAvKiBNYWlsYm94IDMgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUY0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjUgIDB4MjAgICAgICAgLyogTWFpbGJveCA1IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGNiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDYgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJUSUY3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IFRyYW5zbWl0IEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlRJRjggIDB4MTAwICAgICAgLyogTWFpbGJveCA4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CVElGOSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDkgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjExICAweDgwMCAgICAgIC8qIE1haWxib3ggMTEgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEyICAweDEwMDAgICAgIC8qIE1haWxib3ggMTIgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjE0ICAweDQwMDAgICAgIC8qIE1haWxib3ggMTQgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlRJRjE1ICAweDgwMDAgICAgIC8qIE1haWxib3ggMTUgTWFpbGJveCBUcmFuc21pdCBJbnRlcnJ1cHQgRmxhZyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJUSUYyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxNyAgMHgyICAgICAgICAvKiBNYWlsYm94IDE3IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxOCAgMHg0ICAgICAgICAvKiBNYWlsYm94IDE4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMCAgMHgxMCAgICAgICAvKiBNYWlsYm94IDIwIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDIxIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyMyAgMHg4MCAgICAgICAvKiBNYWlsYm94IDIzIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDI0IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNiAgMHg0MDAgICAgICAvKiBNYWlsYm94IDI2IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyNyAgMHg4MDAgICAgICAvKiBNYWlsYm94IDI3IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYyOSAgMHgyMDAwICAgICAvKiBNYWlsYm94IDI5IE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYzMCAgMHg0MDAwICAgICAvKiBNYWlsYm94IDMwIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJUSUYzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIE1haWxib3ggVHJhbnNtaXQgSW50ZXJydXB0IEZsYWcgKi8KLQotLyogQml0IG1hc2tzIGZvciBDQU4wX01CUklGMSAqLwotCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjAgIDB4MSAgICAgICAgLyogTWFpbGJveCAwIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUYxICAweDIgICAgICAgIC8qIE1haWxib3ggMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGMiAgMHg0ICAgICAgICAvKiBNYWlsYm94IDIgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjMgIDB4OCAgICAgICAgLyogTWFpbGJveCAzIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUY0ICAweDEwICAgICAgIC8qIE1haWxib3ggNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGNSAgMHgyMCAgICAgICAvKiBNYWlsYm94IDUgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjYgIDB4NDAgICAgICAgLyogTWFpbGJveCA2IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICAgTUJSSUY3ICAweDgwICAgICAgIC8qIE1haWxib3ggNyBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgIE1CUklGOCAgMHgxMDAgICAgICAvKiBNYWlsYm94IDggTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgICBNQlJJRjkgIDB4MjAwICAgICAgLyogTWFpbGJveCA5IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjEwICAweDQwMCAgICAgIC8qIE1haWxib3ggMTAgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTEgIDB4ODAwICAgICAgLyogTWFpbGJveCAxMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxMiAgMHgxMDAwICAgICAvKiBNYWlsYm94IDEyIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjEzICAweDIwMDAgICAgIC8qIE1haWxib3ggMTMgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTQgIDB4NDAwMCAgICAgLyogTWFpbGJveCAxNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxNSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDE1IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotCi0vKiBCaXQgbWFza3MgZm9yIENBTjBfTUJSSUYyICovCi0KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxNiAgMHgxICAgICAgICAvKiBNYWlsYm94IDE2IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjE3ICAweDIgICAgICAgIC8qIE1haWxib3ggMTcgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMTggIDB4NCAgICAgICAgLyogTWFpbGJveCAxOCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYxOSAgMHg4ICAgICAgICAvKiBNYWlsYm94IDE5IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjIwICAweDEwICAgICAgIC8qIE1haWxib3ggMjAgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjEgIDB4MjAgICAgICAgLyogTWFpbGJveCAyMSBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyMiAgMHg0MCAgICAgICAvKiBNYWlsYm94IDIyIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjIzICAweDgwICAgICAgIC8qIE1haWxib3ggMjMgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjQgIDB4MTAwICAgICAgLyogTWFpbGJveCAyNCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyNSAgMHgyMDAgICAgICAvKiBNYWlsYm94IDI1IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjI2ICAweDQwMCAgICAgIC8qIE1haWxib3ggMjYgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMjcgIDB4ODAwICAgICAgLyogTWFpbGJveCAyNyBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYyOCAgMHgxMDAwICAgICAvKiBNYWlsYm94IDI4IE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotI2RlZmluZSAgICAgICAgICAgICAgICAgICBNQlJJRjI5ICAweDIwMDAgICAgIC8qIE1haWxib3ggMjkgTWFpbGJveCBSZWNlaXZlIEludGVycnVwdCBGbGFnICovCi0jZGVmaW5lICAgICAgICAgICAgICAgICAgIE1CUklGMzAgIDB4NDAwMCAgICAgLyogTWFpbGJveCAzMCBNYWlsYm94IFJlY2VpdmUgSW50ZXJydXB0IEZsYWcgKi8KLSNkZWZpbmUgICAgICAgICAgICAgICAgICAgTUJSSUYzMSAgMHg4MDAwICAgICAvKiBNYWlsYm94IDMxIE1haWxib3ggUmVjZWl2ZSBJbnRlcnJ1cHQgRmxhZyAqLwotCiAvKiBCaXQgbWFza3MgZm9yIEVQUEl4X1NUQVRVUyAqLwogCiAjZGVmaW5lICAgICAgICAgICAgICAgICBDRklGT19FUlIgIDB4MSAgICAgICAgLyogQ2hyb21hIEZ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gICAgICAgICAgKDB4MzQwMCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FNUl9CSVRTXzE0ICAgICAgICAgICAgICAgICAgICAgICAgKDB4MzgwMCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FNUl9CSVRTXzE1ICAgICAgICAgICAgICAgICAgICAgICAgKDB4M0MwMCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FNUl9DUE9MICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDIwMCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FNUl9DUEhBICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDEwMCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FNUl9CQVVEKHgpICAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMEZGKSkKLQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUURMWVJfU1BFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FETFlSX1FDRCh4KSAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDdGKTw8OCkKLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FETFlSX0RUTCh4KSAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMEZGKSkKLQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0hBTFQgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX1dSRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX1dSVE8gICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0NTSVYgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0VORFFQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw4KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX0NQVFFQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw0KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUVdSX05FV1FQKHgpICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpKQotCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRkIgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEIgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEwgICAgICAgICAgICAgICAgICAgICAgICAgICgweDEwMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRkUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDA4MDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVEUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDA0MDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfU1BJRkUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAxMDApCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfV0NFRiAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDgpCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfQUJSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDQpCi0jZGVmaW5lIE1DRjUyODJfUVNQSV9RSVJfU1BJRiAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDEpCi0KLSNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FBUl9BRERSKHgpICAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDNGKSkKLQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUURSX0NPTU1BTkQoeCkgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweEZGMDApKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RBVEEoeCkgICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwRkYpPDw4KQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0NPTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0JJVFNFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgyMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0RTQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQotI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCh4KSYweDAwMEYpPDw4KQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNlbmRpZgkvKiBtNTI4eHNpbV9oICovCmRpZmYgLS1naXQgYS9hcmNoL202OGsvaW5jbHVkZS9hc20vbTUzMnhzaW0uaCBiL2FyY2gvbTY4ay9pbmNsdWRlL2FzbS9tNTMyeHNpbS5oCmluZGV4IDM2YmYxNWEuLmM0YmYxYzggMTAwNjQ0Ci0tLSBhL2FyY2gvbTY4ay9pbmNsdWRlL2FzbS9tNTMyeHNpbS5oCisrKyBiL2FyY2gvbTY4ay9pbmNsdWRlL2FzbS9tNTMyeHNpbS5oCkBAIC0xNyw2ICsxNyw3IEBACiAjZGVmaW5lIE1DRklOVF9VQVJUMCAgICAgICAgMjYgICAgICAgICAgLyogSW50ZXJ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DRl9HUElPX1BBUl9RU1BJKTsKKwkvKiBtYWtlIFUxQ1RTIGFuZCBVMlJUUyBncGlvIGZvciBjc19jb250cm9sICovCisJcGFyID0gcmVhZHcoTUNGX0lQU0JBUiArIE1DRl9HUElPX1BBUl9VQVJUKTsKKwlwYXIgJj0gMHgwMGZmOworCXdyaXRldyhwYXIsIE1DRl9JUFNCQVIgKyBNQ0ZfR1BJT19QQVJfVUFSVCk7Cit9CisjZW5kaWYgLyogZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUEkpIHx8IGRlZmluZWQoQ09ORklHX1NQSV9DT0xERklSRV9RU1BJX01PRFVMRSkgKi8KKworCiBzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSAqbTUyMHhfZGV2aWNlc1tdIF9faW5pdGRhdGEgPSB7CiAJJm01MjB4X3VhcnQsCiAJJm01MjB4X2ZlYywKKyNpZiBkZWZpbmVkKENPTkZJR19TUElfQ09MREZJUkVfUVNQSSkgfHwgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUElfTU9EVUxFKQorCSZtNTIweF9xc3BpLAorI2VuZGlmCiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTQ3LDYgKzI5Myw5IEBACiAJbWFjaF9yZXNldCA9IG01MjB4X2NwdV9yZXNldDsKIAltNTIweF91YXJ0c19pbml0KCk7CiAJbTUyMHhfZmVjX2luaXQoKTsKKyNpZiBkZWZpbmVkKENPTkZJR19TUElfQ09MREZJUkVfUVNQSSkgfHwgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUElfTU9EVUxFKQorCW01MjB4X3FzcGlfaW5pdCgpOworI2VuZGlmCiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRp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JTV9RU1BJSUNSKTsKKwltY2ZfbWFwaXJxMmltcihNQ0ZfSVJRX1FTUEksIE1DRklOVENfUVNQSSk7Cit9CisjZW5kaWYgLyogZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUEkpIHx8IGRlZmluZWQoQ09ORklHX1NQSV9DT0xERklSRV9RU1BJX01PRFVMRSkgKi8KKworCiBzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSAqbTUyNDlfZGV2aWNlc1tdIF9faW5pdGRhdGEgPSB7CiAJJm01MjQ5X3VhcnQsCisjaWZkZWYgQ09ORklHX001MjQ5QzMKKwkmbTUyNDlfc21jOTF4LAorI2VuZGlmCisjaWYgZGVmaW5lZChDT05GSUdfU1BJX0NPTERGSVJFX1FTUEkpIHx8IGRlZmluZWQoQ09ORklHX1NQSV9DT0xERklSRV9RU1BJX01PRFVMRSkKKwkmbTUyNDlfcXNwaSwKKyNlbmRpZgogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTY3LDYgKzI1OCwyNCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisjaWZkZWYgQ09ORklHX001MjQ5QzMKKworc3RhdGljIHZvaWQgX19pbml0IG01MjQ5X3NtYzkxeF9pbml0KHZvaWQpCit7CisJdTMyICBncGlvOworCisJLyogU2V0IHRoZSBHUElPIGxpbmUgYXMgaW50ZXJydXB0IHNvdXJjZSBmb3Igc21jOTF4IGRldmljZSAqLworCWdwaW8gPSByZWFkbChNQ0ZfTUJBUjIgKyBNQ0ZTSU0yX0dQSU9JTlRFTkFCTEUpOworCXdyaXRlbChncGlvIHwgMHg0MCwgTUNGX01CQVIyICsgTUNGU0lNMl9HUElPSU5URU5BQkxFKTsKKworCWdwaW8gPSByZWFkbChNQ0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aW50ZXJydXB0cyB0byBiZSBhdXRvLXZlY3RvcmVkICovCisJbWNmX2F1dG92ZWN0b3IoTkVUVEVMX1NNQzBfSVJRKTsKKwltY2ZfYXV0b3ZlY3RvcihORVRURUxfU01DMV9JUlEpOworCisJLyogU2V0IE1BQyBhZGRyZXNzZXMgZnJvbSBmbGFzaCBmb3IgYm90aCBpbnRlcmZhY2VzICovCisJbmV0dGVsX3NtYzkxeF9zZXRtYWMoTkVUVEVMX1NNQzBfQUREUiwgMHhmMDAwNjAwMCk7CisJbmV0dGVsX3NtYzkxeF9zZXRtYWMoTkVUVEVMX1NNQzFfQUREUiwgMHhmMDAwNjAwNik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0IGluaXRfbmV0dGVsKHZvaWQpCit7CisJbmV0dGVsX3NtYzkxeF9pbml0KCk7CisJcGxhdGZvcm1fYWRkX2RldmljZXMobmV0dGVsX2RldmljZXMsIEFSUkFZX1NJWkUobmV0dGVsX2RldmljZXMpKTsKKwlyZXR1cm4gMDsKK30KKworYXJjaF9pbml0Y2FsbChpbml0X25ldHRlbCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81MzJ4L2NvbmZpZy5jIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNTMyeC9jb25maWcuYwppbmRleCBkNjMyOTQ4Li5jYTUxMzIzIDEwMDY0NAotLS0gYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS81MzJ4L2NvbmZpZy5jCisrKyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzUzMngvY29uZmlnLmMKQEAgLTIxLDEyICsyMSwxNSBAQAogI2luY2x1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RlbXA7Ci19Ci0KLXN0YXRpYyBpbmxpbmUgaW50IGF0b21pY19hZGRfbmVnYXRpdmUoaW50IGksIGF0b21pY190ICp2KQotewotCXJldHVybiBhdG9taWNfYWRkX3JldHVybihpLCB2KSA8IDA7Ci19Ci0KLXN0YXRpYyBpbmxpbmUgdm9pZCBhdG9taWNfYWRkKGludCBpLCBhdG9taWNfdCAqdikKLXsKLQlhdG9taWNfYWRkX3JldHVybihpLCB2KTsKLX0KLQotc3RhdGljIGlubGluZSB2b2lkIGF0b21pY19zdWIoaW50IGksIGF0b21pY190ICp2KQotewotCWF0b21pY19zdWJfcmV0dXJuKGksIHYpOwotfQotCi1zdGF0aWMgaW5saW5lIHZvaWQgYXRvbWljX2luYyhhdG9taWNfdCAqdikKLXsKLQlhdG9taWNfYWRkX3JldHVybigxLCB2KTsKLX0KLQotc3RhdGljIGlubGluZSB2b2lkIGF0b21pY19kZWMoYXRvbWljX3QgKnYpCi17Ci0JYXRvbWljX3N1Yl9yZXR1cm4oMSwgdik7Ci19Ci0KLSNkZWZpbmUgYXRvbWljX2RlY19yZXR1cm4odikJCWF0b21pY19zdWJfcmV0dXJuKDEsICh2KSkKLSNkZWZpbmUgYXRvbWljX2luY19yZXR1cm4odikJCWF0b21pY19hZGRfcmV0dXJuKDEsICh2KSkKLQotI2RlZmluZSBhdG9taWNfc3ViX2FuZF90ZXN0KGksIHYpCShhdG9taWNfc3ViX3JldHVybigoaSksICh2KSkgPT0gMCkKLSNkZWZpbmUgYXRvbWljX2RlY19hbmRfdGVzdCh2KQkJKGF0b21pY19zdWJfcmV0dXJuKDEsICh2KSkgPT0gMCkKLSNkZWZpbmUgYXRvbWljX2luY19hbmRfdGVzdCh2KQkJKGF0b21pY19hZGRfcmV0dXJuKDEsICh2KSkgPT0gMCkKLQotI2RlZmluZSBhdG9taWNfYWRkX3VubGVzcyh2LCBhLCB1KQkJCQlcCi0oewkJCQkJCQkJXAotCWludCBjLCBvbGQ7CQkJCQkJXAotCWMgPS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F1dGhvcnM6IEFsZXhhbmRlciBHcmFmIDxhZ3JhZkBzdXNlLmRlPgorICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudHJ5IGNvZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLm1hY3JvIExPQURfR1VFU1RfU0VHTUVOVFMKKworCS8qIFJlcXVpcmVkIHN0YXRlOgorCSAqCisJICogTVNSID0gfklSfERSCisJICogUjEgPSBob3N0IFIxCisJICogUjIgPSBob3N0IFIyCisJICogUjMgPSBzaGFkb3cgdmNwdQorCSAqIGFsbCBvdGhlciB2b2xhdGlsZSBHUFJTID0gZnJlZQorCSAqIFNWQ1BVW0NSXSAgPSBndWVzdCBDUgorCSAqIFNWQ1BVW1hFUl0gPSBndWVzdCBYRVIKKwkgKiBTVkNQVVtDVFJdID0gZ3Vlc3QgQ1RSCisJICogU1ZDUFVbTFJdICA9IGd1ZXN0IExSCisJICovCisKKyNkZWZpbmUgWENIR19TUihuKQlsd3oJcjksIChTVkNQVV9TUisobio0KSkocjMpOyAgXAorCQkJbXRzcgluLCByOQorCisJWENIR19TUigwKQorCVhDSEdfU1IoMSkKKwlYQ0hHX1NSKDIpCisJWENIR19TUigzKQorCVhDSEdfU1IoNCkKKwlYQ0hHX1NSKDUpCisJWENIR19TUig2KQorCVhDSEdfU1IoNykKKwlYQ0hHX1NSKDgpCisJWENIR19TUig5KQorCVhDSEdfU1IoMTApCisJWENIR19TUigxMSkKKwlYQ0hHX1NSKDEyKQorCVhDSEdfU1IoMTMpCisJWENIR19TUigxNCkKKwlYQ0hHX1NSKDE1KQorCisJLyogQ2xlYXIgQkFUcy4gKi8KKworI2RlZmluZSBLVk1fS0lMTF9CQVQobiwgcmVnKQkJXAorICAgICAgICBtdHNwciAgIFNQUk5fSUJBVCMjbiMjVSxyZWc7CVwKKyAgICAgICAgbXRzcHIgICBTUFJOX0lCQVQjI24jI0wscmVnOwlcCisgICAgICAgIG10c3ByICAgU1BSTl9EQkFUIyNuIyNVLHJlZzsJXAorICAgICAgICBtdHNwciAgIFNQUk5fREJBVCMjbiMjTCxyZWc7CVwKKworICAgICAgICBsaQlyOSwgMAorCUtWTV9LSUxMX0JBVCgwLCByOSkKKwlLVk1fS0lMTF9CQVQoMSwgcjkpCisJS1ZNX0tJTExfQkFUKDIsIHI5KQorCUtWTV9LSUxMX0JBVCgzLCByOSkKKworLmVuZG0KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRXhpdCBjb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisubWFjcm8gTE9BRF9IT1NUX1NFR01FTlRTCisKKwkvKiBSZWdpc3RlciB1c2FnZSBhdCB0aGlzI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QlsZAlyOCwgKFBBQ0FfS1ZNX1I4KShyMTMpCi0JbGQJcjksIChQQUNBX0tWTV9SOSkocjEzKQotCWxkCXIxMCwgKFBBQ0FfS1ZNX1IxMCkocjEzKQotCWxkCXIxMiwgKFBBQ0FfS1ZNX1IxMikocjEzKQotCi0JbHd6CXIxMSwgKFBBQ0FfS1ZNX0NSKShyMTMpCi0JbXRjcglyMTEKLQotCWxkCXIxMSwgKFBBQ0FfS1ZNX1hFUikocjEzKQotCW10eGVyCXIxMQotCi0JbGQJcjExLCAoUEFDQV9LVk1fUjExKShyMTMpCi0JbGQJcjEzLCAoUEFDQV9LVk1fUjEzKShyMTMpCi0KLQlSRkkKLWt2bXBwY19oYW5kbGVyX3RyYW1wb2xpbmVfZW50ZXJfZW5kOgotCi0KKy5lbmRtCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTE2Miw5OSArMTI4LDIyIEBACiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLS5nbG9iYWwga3ZtcHBjX2hhbmRsZXJfdHJhbXBvbGluZV9leGl0Ci1rdm1wcGNfaGFuZGxlcl90cmFtcG9saW5lX2V4aXQ6CisubWFjcm8gTE9BRF9IT1NUX1NFR01FTlRTCiAKIAkvKiBSZWdpc3RlciB1c2FnZSBhdCB0aGlzIHBvaW50OgogCSAqCi0JICogU1BSR19TQ1JBVENIMCAgICAgPSBndWVzdCBSMTMKLQkgKiBSMTIgICAgICAgICAgICAgICA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9vdXQsICZwczFfaW4xLCAmcHMxX2luMik7CisKKwlpZiAoIShzY2FsYXIgJiBTQ0FMQVJfTk9fUFMxKSkgeworCQlxcHJbcmVnX291dF0gPSBwczFfb3V0OworCisJCWRwcmludGsoS0VSTl9JTkZPICJQUzIgcHMxIC0+IGYoMHgleCwgMHgleCkgPSAweCV4XG4iLAorCQkJCSAgcHMxX2luMSwgcHMxX2luMiwgcXByW3JlZ19vdXRdKTsKKwl9CisKKwlyZXR1cm4gRU1VTEFURV9ET05FOworfQorCitzdGF0aWMgaW50IGt2bXBwY19wc19vbmVfaW4oc3RydWN0IGt2bV92Y3B1ICp2Y3B1LCBib29sIHJjLAorCQkJCSAgICBpbnQgcmVnX291dCwgaW50IHJlZ19pbiwKKwkJCQkgICAgdm9pZCAoKmZ1bmMpKHN0cnVjdCB0aHJlYWRfc3RydWN0ICp0LAorCQkJCQkJIHUzMiAqZHN0LCB1MzIgKnNyYzEpKQoreworCXUzMiAqcXByID0gdmNwdS0+YXJjaC5xcHI7CisJdTY0ICpmcHIgPSB2Y3B1LT5hcmNoLmZwcjsKKwl1MzIgcHMwX291dCwgcHMwX2luOworCXUzMiBwczFfaW47CisJc3RydWN0IHRocmVhZF9zdHJ1Y3QgdDsKKwl0LmZwc2NyLnZhbCA9IHZjcHUtPmFyY2guZnBzY3I7CisKKwkvKiBSQyAqLworCVdBUk5fT04ocmMpOworCisJLyogUFMwICovCisJY3Z0X2RmKChkb3VibGUqKSZmcHJbcmVnX2luXSwgKGZsb2F0KikmcHMwX2luLCAmdCk7CisJZnVuYygmdCwgJnBzMF9vdXQsICZwczBfaW4pOworCisJZHByaW50ayhLRVJOX0lORk8gIlBTMSBwczAgLT4gZigweCV4KSA9IDB4JXhcbiIsCisJCQkgIHBzMF9pbiwgcHMwX291dCk7CisKKwljdnRfZmQoKGZsb2F0KikmcHMwX291dCwgKGRvdWJsZSopJmZwcltyZWdfb3V0XSwgJnQpOworCisJLyogUFMxICovCisJcHMxX2luID0gcXByW3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2NDQKLS0tIGEvYXJjaC9wb3dlcnBjL2t2bS9ib29rM3NfNjRfcm1oYW5kbGVycy5TCisrKyBiL2FyY2gvcG93ZXJwYy9rdm0vYm9vazNzX3JtaGFuZGxlcnMuUwpAQCAtMjIsNyArMjIsMTAgQEAKICNpbmNsdWRlIDxhc20vcmVnLmg+CiAjaW5jbHVkZSA8YXNtL3BhZ2UuaD4KICNpbmNsdWRlIDxhc20vYXNtLW9mZnNldHMuaD4KKworI2lmZGVmIENPTkZJR19QUENfQk9PSzNTXzY0CiAjaW5jbHVkZSA8YXNtL2V4Y2VwdGlvbi02NHMuaD4KKyNlbmRpZgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMzAsNiArMzMsMzkgQEAKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKyNpZiBkZWZpbmVkKENPTkZJR19QUENfQk9PSzNTXzY0KQorCisjZGVmaW5lIExPQURfU0hBRE9XX1ZDUFUocmVnKQkJCQlcCisJbWZzcHIJcmVnLCBTUFJOX1NQUkdfUEFDQQorCisjZGVmaW5lIFNIQURPV19WQ1BVX09GRgkJUEFDQV9LVk1fU1ZDUFUKKyNkZWZpbmUgTVNSX05PSVJRCQlNU1JfS0VSTkVMICYgfihNU1JfSVIgfCBNU1JfRFIpCisjZGVmaW5lIEZVTkMobmFtZSkgCQlHTFVFKC4sbmFtZSkKKworI2VsaWYgZGVmaW5lZChDT05GSUdfUFBDX0JPT0szU18zMikKKworI2RlZ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sIFBBQ0FfS1ZNX1NWQ1BVCisKKyNlbGlmIGRlZmluZWQoQ09ORklHX1BQQ19CT09LM1NfMzIpCisKKyNkZWZpbmUgR0VUX1NIQURPV19WQ1BVKHJlZykgICAgCQkJXAorCXRvcGh5cyhyZWcsIHIyKTsgICAgICAgCQkJXAorCWx3eiAgICAgcmVnLCAoVEhSRUFEICsgVEhSRUFEX0tWTV9TVkNQVSkocmVnKTsJXAorCXRvcGh5cyhyZWcsIHJlZykKKworI2VuZGlmCisKKy8qIERpc2FibGUgZm9yIG5lc3RlZCBLVk0gKi8KKyNkZWZpbmUgVVNFX1FVSUNLX0xBU1RfSU5TVAorCisKKy8qIEdldCBoZWxwZXIgZnVuY3Rpb25zIGZvciBzdWJhcmNoIHNwZWNpZmljIGZ1bmN0aW9uYWxpdHkgKi8KKworI2lmIGRlZmluZWQoQ09ORklHX1BQQ19CT09LM1NfNjQpCisjaW5jbHVkZSAiYm9vazNzXzY0X3NsYi5TIgorI2VsaWYgZGVmaW5lZChDT05GSUdfUFBDX0JPT0szU18zMikKKyNpbmNsdWRlICJib29rM3NfMzJfc3IuUyIKKyNlbmRpZgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnRyeSBjb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy5nbG9iYWwga3ZtcHBjX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jMpCisKKwltdGN0cglyNAorCW10bHIJcjUKKwltdGNyCXI2CisJbXR4ZXIJcjcKKworCVBQQ19MTAlyMCwgKFNWQ1BVX1IwKShyMykKKwlQUENfTEwJcjEsIChTVkNQVV9SMSkocjMpCisJUFBDX0xMCXIyLCAoU1ZDUFVfUjIpKHIzKQorCVBQQ19MTAlyNCwgKFNWQ1BVX1I0KShyMykKKwlQUENfTEwJcjUsIChTVkNQVV9SNSkocjMpCisJUFBDX0xMCXI2LCAoU1ZDUFVfUjYpKHIzKQorCVBQQ19MTAlyNywgKFNWQ1BVX1I3KShyMykKKwlQUENfTEwJcjgsIChTVkNQVV9SOCkocjMpCisJUFBDX0xMCXI5LCAoU1ZDUFVfUjkpKHIzKQorCVBQQ19MTAlyMTAsIChTVkNQVV9SMTApKHIzKQorCVBQQ19MTAlyMTEsIChTVkNQVV9SMTEpKHIzKQorCVBQQ19MTAlyMTIsIChTVkNQVV9SMTIpKHIzKQorCVBQQ19MTAlyMTMsIChTVkNQVV9SMTMpKHIzKQorCisJUFBDX0xMCXIzLCAoU1ZDUFVfUjMpKHIzKQorCisJUkZJCitrdm1wcGNfaGFuZGxlcl90cmFtcG9saW5lX2VudGVyX2VuZDoKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEV4aXQgY29kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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wOworfQorCisjaWZkZWYgQ09ORklHX1BNCitzdGF0aWMgaW50IHRtcDEwMl9zdXNwZW5kKHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50ID0gdG9faTJjX2NsaWVudChkZXYpOworCWludCBjb25maWc7CisKKwljb25maWcgPSB0bXAxMDJfcmVhZF9yZWcoY2xpZW50LCBUTVAxMDJfQ09ORl9SRUcpOworCWlmIChjb25maWcgPCAwKQorCQlyZXR1cm4gY29uZmlnOworCisJY29uZmlnIHw9IFRNUDEwMl9DT05GX1NEOworCXJldHVybiB0bXAxMDJfd3JpdGVfcmVnKGNsaWVudCwgVE1QMTAyX0NPTkZfUkVHLCBjb25maWcpOworfQorCitzdGF0aWMgaW50IHRtcDEwMl9yZXN1bWUoc3RydWN0IGRldmljZSAqZGV2KQoreworCXN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQgPSB0b19pMmNfY2xpZW50KGRldik7CisJaW50IGNvbmZpZzsKKworCWNvbmZpZyA9IHRtcDEwMl9yZWFkX3JlZyhjbGllbnQsIFRNUDEwMl9DT05GX1JFRyk7CisJaWYgKGNvbmZpZyA8IDApCisJCXJldHVybiBjb25maWc7CisKKwljb25maWcgJj0gflRNUDEwMl9DT05GX1NEOworCXJldHVybiB0bXAxMDJfd3JpdGVfcmVnKGNsaWVudCwgVE1QMTAyX0NPTkZfUkVHLCBjb25maWcpOworfQorCitzdGF0aWMgY29uc3Qgc3RydWN0IGRldl9wbV9vcHMgdG1wMTAyX2Rldl9wbV9vcHMgPSB7CisJLnN1c3BlbmQJPSB0bXAxMDJfc3VzcGVuZCwKKwkucmVzdW1lCQk9IHRtcDEwMl9yZXN1bWUsCit9OworCisjZGVmaW5lIFRNUDEwMl9ERVZfUE1fT1BTICgmdG1wMTAyX2Rldl9wbV9vcHMpCisjZWxzZQorI2RlZmluZQlUTVAxMDJfREVWX1BNX09QUyBOVUxMCisjZW5kaWYgLyogQ09ORklHX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RNYXNrXzFfUk1BU0sgMHgxCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX0xTQiAweDFFCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX01TQiAweDFFCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza18wX1JNQVNLIDB4MQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX0VyckludE1hc2tfTFNCIDB4MUQKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19FcnJJbnRNYXNrX01TQiAweDFECisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfRXJySW50TWFza19STUFTSyAweDEKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19Bc3NlcnRHUElPSW50TWFza19MU0IgMHgxQworI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX0Fzc2VydEdQSU9JbnRNYXNrX01TQiAweDFDCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfQXNzZXJ0R1BJT0ludE1hc2tfUk1BU0sgMHgxCisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfU2VuZERvbmVJbnRNYXNrXzFfTFNCIDB4MTkKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kRG9uZUludE1hc2tfMV9NU0IgMHgxOQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX1NlbmREb25lSW50TWFza18xX1JNQVNLIDB4MQorI2RlZmluZSBRSUJfNzMyMl9JbnRNYXNrX1NlbmREb25lSW50TWFza18wX0xTQiAweDE4CisjZGVmaW5lIFFJQl83MzIyX0ludE1hc2tfU2VuZERvbmVJbnRNYXNrXzBfTVNCIDB4MTgKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kRG9uZUludE1hc2tfMF9STUFTSyAweDEKKyNkZWZpbmUgUUlCXzczMjJfSW50TWFza19TZW5kQnVmQXZhaWxJbnRNYXNrX0xTQiAweDE3CisjZGVmaW5lI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RycykKKwkJcWliX2Rldl9lcnIoZGQsICJGYWlsZWQgYWxsb2NhdGlvbiBmb3IgcG9ydGNvdW50ZXJzXG4iKTsKK30KKworc3RhdGljIHUzMiBxaWJfcmVhZF82MTIwY250cnMoc3RydWN0IHFpYl9kZXZkYXRhICpkZCwgbG9mZl90IHBvcywgY2hhciAqKm5hbWVwLAorCQkJICAgICAgdTY0ICoqY250cnApCit7CisJdTMyIHJldDsKKworCWlmIChuYW1lcCkgeworCQlyZXQgPSBkZC0+Y3NwZWMtPmNudHJuYW1lbGVuOworCQlpZiAocG9zID49IHJldCkKKwkJCXJldCA9IDA7IC8qIGZpbmFsIHJlYWQgYWZ0ZXIgZ2V0dGluZyBldmVyeXRoaW5nICovCisJCWVsc2UKKwkJCSpuYW1lcCA9IChjaGFyICopY250cjYxMjBuYW1lczsKKwl9IGVsc2UgeworCQl1NjQgKmNudHIgPSBkZC0+Y3NwZWMtPmNudHJzOworCQlpbnQgaTsKKworCQlyZXQgPSBkZC0+Y3NwZWMtPm5jbnRycyAqIHNpemVvZih1NjQpOworCQlpZiAoIWNudHIgfHwgcG9zID49IHJldCkgeworCQkJLyogZXZlcnl0aGluZyByZWFkLCBvciBjb3VsZG4ndCBnZXQgbWVtb3J5ICovCisJCQlyZXQgPSAwOworCQkJZ290byBkb25lOworCQl9CisJCWlmIChwb3MgPj0gcmV0KSB7CisJCQlyZXQgPSAwOyAvKiBmaW5hbCByZWFkIGFmdGVyIGdldHRpbmcgZXZlcnl0aGluZyAqLworCQkJZ290byBkb25lOworCQl9CisJCSpjbnRycCA9IGNudHI7CisJCWZvciAoaSA9IDA7IGkgPCBkZC0+Y3NwZWMtPm5jbnRyczsgaSsrKQorCQkJKmNudHIrKyA9IHJlYWRfNjEyMF9jcmVnMzIoZGQsIGNudHI2MTIwaW5kaWNlc1tpXSk7CisJfQorZG9uZToKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgdTMyIHFpYl9yZWFkXzYxMjBwb3J0Y250cnMoc3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gMjhhd2cgTm9FcSAqLworCQl7IDB4MDAsIDB4MDksIDB4M0EgfSwgIjc0NzU3LTIyMDEgICAgICAiLAorCQl7ICAwLCAgMCwgIDAsICA2IH0sIHsgIDAsICAwLCAgMCwgIDkgfSwgeyAgMCwgIDEsICAxLCAxNSB9LAorCX0sCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19zZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMCwgIDAsICAxIH0sCS8qICAyIGRCICovCisJeyAgMCwgMCwgIDAsICAyIH0sCS8qICAzIGRCICovCisJeyAgMCwgMCwgIDAsICAzIH0sCS8qICA0IGRCICovCisJeyAgMCwgMCwgIDAsICA0IH0sCS8qICA1IGRCICovCisJeyAgMCwgMCwgIDAsICA1IH0sCS8qICA2IGRCICovCisJeyAgMCwgMCwgIDAsICA2IH0sCS8qICA3IGRCICovCisJeyAgMCwgMCwgIDAsICA3IH0sCS8qICA4IGRCICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICA5IGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qIDEwIGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qIDExIGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qIDEyIGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDEzIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDE0IGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE1IGRCICovCisJeyAgMCwgMCwgIDAsIDE1IH0sCS8qIDE2IGRCICovCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19kZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICAyIGRCICovCisJeyAgMCwgMCwgIDAsICA4IH0sCS8qICAzIGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qICA0IGRCICovCisJeyAgMCwgMCwgIDAsICA5IH0sCS8qICA1IGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qICA2IGRCICovCisJeyAgMCwgMCwgIDAsIDEwIH0sCS8qICA3IGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qICA4IGRCICovCisJeyAgMCwgMCwgIDAsIDExIH0sCS8qICA5IGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDEwIGRCICovCisJeyAgMCwgMCwgIDAsIDEyIH0sCS8qIDExIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDEyIGRCICovCisJeyAgMCwgMCwgIDAsIDEzIH0sCS8qIDEzIGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE0IGRCICovCisJeyAgMCwgMCwgIDAsIDE0IH0sCS8qIDE1IGRCICovCisJeyAgMCwgMCwgIDAsIDE1IH0sCS8qIDE2IGRCICovCit9OworCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4ZGRzX2VudCB0eGRkc19xZHJbVFhERFNfVEFCTEVfU1pdID0geworCS8qIGFtcCwgcHJlLCBtYWluLCBwb3N0ICovCisJeyAgMiwgMiwgMTUsICA2IH0sCS8qIExvb3BiYWNrICovCisJeyAgMCwgMSwgIDAsICA3IH0sCS8qICAyIGRCIChhbHNvIFFNSDczNDIpICovCisJeyAgMCwgMSwgIDAsICA5IH0sCS8qICAzIGRCIChhbHNvIFFNSDczNDIpICovCisJeyAgMCwgMSwgIDAsIDExIH0sCS8qICA0IGRCICovCisJeyAgMCwgMSwgIDAsIDEzIH0sCS8qICA1IGRCICovCisJeyAgMCwgMSwgIDAsIDE1IH0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orCQkJICAgICJyZXNldDogJWRcbiIsIHIpOworfQorCisvKiBjb2RlIHRvIGFkanVzdCBQQ0llIGNhcGFiaWxpdGllcy4gKi8KKworc3RhdGljIGludCBmbGQydmFsKGludCB3ZCwgaW50IG1hc2spCit7CisJaW50IGxzYm1hc2s7CisKKwlpZiAoIW1hc2spCisJCXJldHVybiAwOworCXdkICY9IG1hc2s7CisJbHNibWFzayA9IG1hc2sgXiAobWFzayAmIChtYXNrIC0gMSkpOworCXdkIC89IGxzYm1hc2s7CisJcmV0dXJuIHdkOworfQorCitzdGF0aWMgaW50IHZhbDJmbGQoaW50IHdkLCBpbnQgbWFzaykKK3sKKwlpbnQgbHNibWFzazsKKworCWlmICghbWFzaykKKwkJcmV0dXJuIDA7CisJbHNibWFzayA9IG1hc2sgXiAobWFzayAmIChtYXNrIC0gMSkpOworCXdkICo9IGxzYm1hc2s7CisJcmV0dXJuIHdkOworfQorCitzdGF0aWMgaW50IHFpYl9wY2llX2NvYWxlc2NlOworbW9kdWxlX3BhcmFtX25hbWVkKHBjaWVfY29hbGVzY2UsIHFpYl9wY2llX2NvYWxlc2NlLCBpbnQsIFNfSVJVR08pOworTU9EVUxFX1BBUk1fREVTQyhwY2llX2NvYWxlc2NlLCAidHVuZSBQQ0llIGNvbGVzY2luZyBvbiBzb21lIEludGVsIGNoaXBzZXRzIik7CisKKy8qCisgKiBFbmFibGUgUENJZSBjb21wbGV0aW9uIGFuZCBkYXRhIGNvYWxlc2NpbmcsIG9uIEludGVsIDV4MDAgYW5kIDczMDAKKyAqIGNoaXBzZXRzLiAgIFRoaXMgaXMga25vd24gdG8gYmUgdW5zYWZlIGZvciBzb21lIHJldmlzaW9ucyBvZiBzb21lCisgKiBvZiB0aGVzZSBjaGlwc2V0cywgd2l0aCBzb21lIEJJT1Mgc2V0dGluZ3MsIGFuZCBlbmFibGluZyBpdCBvbiB0aG9zZQorICogc3lzdGVtcyBtYXkgcmVzdWx0IGluIHRoZSBzeXN0ZW0gY3Jhc2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SVRTX1BFUl9QQUdFLCBvZmYpOworCXJldHVybiBvZmY7Cit9CisKKy8qCisgKiBDb252ZXJ0IHRoZSBBRVRIIGNyZWRpdCBjb2RlIGludG8gdGhlIG51bWJlciBvZiBjcmVkaXRzLgorICovCitzdGF0aWMgdTMyIGNyZWRpdF90YWJsZVszMV0gPSB7CisJMCwgICAgICAgICAgICAgICAgICAgICAgLyogMCAqLworCTEsICAgICAgICAgICAgICAgICAgICAgIC8qIDEgKi8KKwkyLCAgICAgICAgICAgICAgICAgICAgICAvKiAyICovCisJMywgICAgICAgICAgICAgICAgICAgICAgLyogMyAqLworCTQsICAgICAgICAgICAgICAgICAgICAgIC8qIDQgKi8KKwk2LCAgICAgICAgICAgICAgICAgICAgICAvKiA1ICovCisJOCwgICAgICAgICAgICAgICAgICAgICAgLyogNiAqLworCTEyLCAgICAgICAgICAgICAgICAgICAgIC8qIDcgKi8KKwkxNiwgICAgICAgICAgICAgICAgICAgICAvKiA4ICovCisJMjQsICAgICAgICAgICAgICAgICAgICAgLyogOSAqLworCTMyLCAgICAgICAgICAgICAgICAgICAgIC8qIEEgKi8KKwk0OCwgICAgICAgICAgICAgICAgICAgICAvKiBCICovCisJNjQsICAgICAgICAgICAgICAgICAgICAgLyogQyAqLworCTk2LCAgICAgICAgICAgICAgICAgICAgIC8qIEQgKi8KKwkxMjgsICAgICAgICAgICAgICAgICAgICAvKiBFICovCisJMTkyLCAgICAgICAgICAgICAgICAgICAgLyogRiAqLworCTI1NiwgICAgICAgICAgICAgICAgICAgIC8qIDEwICovCisJMzg0LCAgICAgICAgICAgICAgICAgICAgLyogMTEgKi8KKwk1MTIsICAgICAgICAgICAgICAgICAgICAvKiAxMiAqLworCTc2OCwgICAgICAgICAgICAgICAgICAgIC8qIDEzICovCisJMTAyNCwgICAgICAgICAgICAgICAgICAgLyogMTQgKi8KKwkxNTM2LCAgICAgICAgICAgICAgICAgICAvKiAxNSAqLworCTIwNDgsICAgICAgICAgICAgICAgICAgIC8qIDE2ICovCisJMzA3MiwgICAgICAgICAgICAgICAgICAgLyogMTcgKi8KKwk0MDk2LCAgICAgICAgICAgICAgICAgICAvKiAxOCAqLworCTYxNDQsICAgICAgICAgICAgICAgICAgIC8qIDE5ICovCisJODE5MiwgICAgICAgICAgICAgICAgICAgLyogMUEgKi8KKwkxMjI4OCwgICAgICAgICAgICAgICAgICAvKiAxQiAqLworCTE2Mzg0LCAgICAgICAgICAgICAgICAgIC8qIDFDICovCisJMjQ1NzYsICAgICAgICAgICAgICAgICAgLyogMUQgKi8KKwkzMjc2OCAgICAgICAgICAgICAgICAgICAvKiAxRSAqLworfTsKKworc3RhdGljIHZvaWQgZ2V0X21hcF9wYWdlKHN0cnVjdCBxaWJfcXBuX3RhYmxlICpxcHQsIHN0cnVjdCBxcG5fbWFwICptYXApCit7CisJdW5zaWduZWQgbG9uZyBwYWdlID0gZ2V0X3plcm9lZF9wYWdlKEdGUF9LRVJORUwpOworCisJLyoKKwkgKiBGcmVlIHRoZSBwYWdlIGlmIHNvbWVvbmUgcmFjZWQgd2l0aCB1cyBpbnN0YWxsaW5nIGl0LgorCSAqLworCisJc3Bpbl9sb2NrKCZxcHQtPmxvY2spOworCWlmIChtYXAtPnBhZ2UpCisJCWZyZWVfcGFnZShwYWdlKTsKKwllbHNlCisJCW1hcC0+cGFnZSA9ICh2b2lkICopcGFnZTsKKwlzcGluX3VubG9jaygmcXB0LT5sb2NrKTsKK30KKworLyoKKyAqIEFsbG9jYXRlIHRoZSBuZXh0IGF2YWlsYWJsZSBRUE4gb3IKKyAqIHplcm8vb25lIGZvciBRUCB0eXBlIElCX1FQVF9TTUkvSUJfUVBUX0dTSS4KKyAqLworc3RhdGljIGludCBhbGxvY19xcG4oc3RydWN0IHFpYl9kZXZkYXRhICpkZCwgc3RydWN0IHFpYl9xcG5fdGFibGUgKnFwdCwKKwkJICAgICBlbnVtIGliX3FwX3R5cGUgdHlwZSwgdTggcG9ydCkKK3sKKwl1MzIgaSwgb2Zmc2V0LCBt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c2dfbGlzdCAqLworCXU4IHNfcmV0cnlfY250OyAgICAgICAgIC8qIG51bWJlciBvZiB0aW1lcyB0byByZXRyeSAqLworCXU4IHNfcm5yX3JldHJ5X2NudDsKKwl1OCBzX3JldHJ5OyAgICAgICAgICAgICAvKiByZXF1ZXN0ZXIgcmV0cnkgY291bnRlciAqLworCXU4IHNfcm5yX3JldHJ5OyAgICAgICAgIC8qIHJlcXVlc3RlciBSTlIgcmV0cnkgY291bnRlciAqLworCXU4IHNfcGtleV9pbmRleDsgICAgICAgIC8qIFBLRVkgaW5kZXggdG8gdXNlICovCisJdTggc19hbHRfcGtleV9pbmRleDsgICAgLyogQWx0ZXJuYXRlIHBhdGggUEtFWSBpbmRleCB0byB1c2UgKi8KKwl1OCBzX21heF9yZF9hdG9taWM7ICAgICAvKiBtYXggbnVtYmVyIG9mIFJETUEgcmVhZC9hdG9taWMgdG8gc2VuZCAqLworCXU4IHNfbnVtX3JkX2F0b21pYzsgICAgIC8qIG51bWJlciBvZiBSRE1BIHJlYWQvYXRvbWljIHBlbmRpbmcgKi8KKwl1OCBzX3RhaWxfYWNrX3F1ZXVlOyAgICAvKiBpbmRleCBpbnRvIHNfYWNrX3F1ZXVlW10gKi8KKwl1OCBzX3NyYXRlOworCXU4IHNfZHJhaW5pbmc7CisJdTggc19taWdfc3RhdGU7CisJdTggdGltZW91dDsgICAgICAgICAgICAgLyogVGltZW91dCBmb3IgdGhpcyBRUCAqLworCXU4IGFsdF90aW1lb3V0OyAgICAgICAgIC8qIEFsdGVybmF0ZSBwYXRoIHRpbWVvdXQgZm9yIHRoaXMgUVAgKi8KKwl1OCBwb3J0X251bTsKKwllbnVtIGliX210dSBwYXRoX210dTsKKwl1MzIgcmVtb3RlX3FwbjsKKwl1MzIgcWtleTsgICAgICAgICAgICAgICAvKiBRS0VZIGZvciB0aGlzIFFQIChmb3IgVUQgb3IgUkQpICovCisJdTMyIHNfc2l6ZTsgICAgICAgICAgICAgLyogc2VuZCB3b3JrIHF1ZXVlIHNpemUgKi8KKwl1MzIgc19oZWFkOyAgICAgICAgICAgICAvKiBuZXcgZW50cmllcyBhZGRlZCBoZXJlICovCisJdTMyIHNfdGFpbDsgICAgICAgICAgICAgLyogbmV4dCBlbnRyeSB0byBwcm9jZXNzICovCisJdTMyIHNfY3VyOyAgICAgICAgICAgICAgLyogY3VycmVudCB3b3JrIHF1ZXVlIGVudHJ5ICovCisJdTMyIHNfYWNrZWQ7ICAgICAgICAgICAgLyogbGFzdCB1bi1BQ0snZWQgZW50cnkgKi8KKwl1MzIgc19sYXN0OyAgICAgICAgICAgICAvKiBsYXN0IGNvbXBsZXRlZCBlbnRyeSAqLworCXUzMiBzX3NzbjsgICAgICAgICAgICAgIC8qIFNTTiBvZiB0YWlsIGVudHJ5ICovCisJdTMyIHNfbHNuOyAgICAgICAgICAgICAgLyogbGltaXQgc2VxdWVuY2UgbnVtYmVyIChjcmVkaXQpICovCisJc3RydWN0IHFpYl9zd3FlICpzX3dxOyAgLyogc2VuZCB3b3JrIHF1ZXVlICovCisJc3RydWN0IHFpYl9zd3FlICpzX3dxZTsKKwlzdHJ1Y3QgcWliX3JxIHJfcnE7ICAgICAgICAgICAgIC8qIHJlY2VpdmUgd29yayBxdWV1ZSAqLworCXN0cnVjdCBxaWJfc2dlIHJfc2dfbGlzdFswXTsgICAgLyogdmVyaWZpZWQgU0dFcyAqLworfTsKKworLyoKKyAqIEF0b21pYyBiaXQgZGVmaW5pdGlvbnMgZm9yIHJfYWZsYWdzLgorICovCisjZGVmaW5lIFFJQl9SX1dSSURfVkFMSUQgICAgICAgIDAKKyNkZWZpbmUgUUlCX1JfUkVXSU5EX1NHRSAgICAgICAgMQorCisvKgorICogQml0IGRlZmluaXRpb25zIGZvciByX2ZsYWdzLgorICovCisjZGVmaW5lIFFJQl9SX1JFVVNFX1NHRSAweDAxCisjZGVmaW5lIFFJQl9SX1JETUFSX1NFUSAweDAyCisjZGVmaW5lIFFJQl9SX1JTUF9OQUsgICAweDA0CisjZ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lQTTg2MDdfUkVHX0RFVlMoYnVjazEsIEJVQ0sxKSwKLQlQTTg2MDdfUkVHX0RFVlMoYnVjazIsIEJVQ0syKSwKLQlQTTg2MDdfUkVHX0RFVlMoYnVjazMsIEJVQ0szKSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvMSwgIExETzEpLAotCVBNODYwN19SRUdfREVWUyhsZG8yLCAgTERPMiksCi0JUE04NjA3X1JFR19ERVZTKGxkbzMsICBMRE8zKSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvNCwgIExETzQpLAotCVBNODYwN19SRUdfREVWUyhsZG81LCAgTERPNSksCi0JUE04NjA3X1JFR19ERVZTKGxkbzYsICBMRE82KSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvNywgIExETzcpLAotCVBNODYwN19SRUdfREVWUyhsZG84LCAgTERPOCksCi0JUE04NjA3X1JFR19ERVZTKGxkbzksICBMRE85KSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvMTAsIExETzEwKSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvMTIsIExETzEyKSwKLQlQTTg2MDdfUkVHX0RFVlMobGRvMTQsIExETzE0KSwKKwlQTTg2MDdfUkVHX0RFVlMoQlVDSzEpLAorCVBNODYwN19SRUdfREVWUyhCVUNLMiksCisJUE04NjA3X1JFR19ERVZTKEJVQ0szKSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPMSksCisJUE04NjA3X1JFR19ERVZTKExETzIpLAorCVBNODYwN19SRUdfREVWUyhMRE8zKSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPNCksCisJUE04NjA3X1JFR19ERVZTKExETzUpLAorCVBNODYwN19SRUdfREVWUyhMRE82KSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPNyksCisJUE04NjA3X1JFR19ERVZTKExETzgpLAorCVBNODYwN19SRUdfREVWUyhMRE85KSwKKwlQTTg2MDdfUkVHX0RFVlMoTERPMTApLAorCVBNODYwN19SRUdfREVWUyhMRE8xMiksCisJUE04NjA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FpbGJveC0+c3RhdHVzKSAhPSBJUENfRldfVFhISUdIKQorCQlnb3RvIHVwZGF0ZV9lbmQ7CisKKwlidWZmZXIgPSBidWZmZXIgKyAweDIwMDAwOworCW1lbWNweV90b2lvKGZ3X3VwZGF0ZV9iYXNlLCBidWZmZXIsIDB4MjAwMDApOworCXdyaXRlbCgwLCAmbWFpbGJveC0+ZHJpdmVyX2ZsYWcpOworCisJd2hpbGUgKG1haWxib3gtPnNjdV9mbGFnID09IDApIHsKKwkJcm1iKCk7CisJCW1kZWxheSgxKTsKKwl9CisKKwkvKiBjaGVjayBmb3IgJ0JBRE4nICovCisJaWYgKHJlYWRsKCZtYWlsYm94LT5zdGF0dXMpID09IElQQ19GV19VUERBVEVfQkFETikKKwkJZ290byB1cGRhdGVfZW5kOworCisJaWYgKHJlYWRsKCZtYWlsYm94LT5zdGF0dXMpID09IElQQ19GV19UWExPVykgeworCQkrK3JldHJ5X2NudDsKKwkJZ290byB1cGRhdGVfcmV0cnk7CisJfQorCit1cGRhdGVfZW5kOgorCXN0YXR1cyA9IHJlYWRsKCZtYWlsYm94LT5zdGF0dXMpOworCisJaW91bm1hcChmd191cGRhdGVfYmFzZSk7CisJaW91bm1hcChtYWlsYm94KTsKKwltdXRleF91bmxvY2soJmlwY2xvY2spOworCisJaWYgKHN0YXR1cyA9PSBJUENfRldfVVBEQVRFX1NVQ0NFU1MpCisJCXJldHVybiAwOworCXJldHVybiAtMTsKK30KK0VYUE9SVF9TWU1CT0woaW50ZWxfc2N1X2lwY19md191cGRhdGUpOworCisvKgorICogSW50ZXJydXB0IGhhbmRsZXIgZ2V0cyBjYWxsZWQgd2hlbiBpb2MgYml0IG9mIElQQ19DT01NQU5EX1JFRyBzZXQgdG8gMQorICogV2hlbiBpb2MgYml0IGlzIHNldCB0byAxLCBjYWxsZXIgYXBpIG11c3Qgd2FpdCBmb3IgaW50ZXJydXB0IGhhbmRsZXIgY2FsbGVkCisgKiB3aGljaCBpbiB0dXJuIHVubG9ja3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UzMiBmYW5fY3RybF9zdGF0dXNfdW5kZWY6MTsKQEAgLTM2Myw2ICszNjksOSBAQAogCXVuc2lnbmVkIGludCBsZWQ7CiB9OwogCisvKiBicmlnaHRuZXNzIGxldmVsIGNhcGFiaWxpdGllcyAqLworc3RhdGljIHVuc2lnbmVkIGludCBicmlnaHRfbWF4bHZsOwkvKiAwID0gdW5rbm93biAqLworCiAjaWZkZWYgQ09ORklHX1RISU5LUEFEX0FDUElfREVCVUdGQUNJTElUSUVTCiBzdGF0aWMgaW50IGRiZ193bHN3ZW11bDsKIHN0YXRpYyBpbnQgdHBhY3BpX3dsc3dfZW11bHN0YXRlOwpAQCAtNDgwLDYgKzQ4OSwxNSBAQAogCXJldHVybiAwOwogfQogCitzdGF0aWMgaW5saW5lIGJvb2wgX19wdXJlIF9faW5pdCB0cGFjcGlfaXNfbGVub3ZvKHZvaWQpCit7CisJcmV0dXJuIHRoaW5rcGFkX2lkLnZlbmRvciA9PSBQQ0lfVkVORE9SX0lEX0xFTk9WTzsKK30KKworc3RhdGljIGlubGluZSBib29sIF9fcHVyZSBfX2luaXQgdHBhY3BpX2lzX2libSh2b2lkKQoreworCXJldHVybiB0aGlua3BhZF9pZC52ZW5kb3IgPT0gUENJX1ZFTkRPUl9JRF9JQk07Cit9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNDk0LDIxICs1MTIsMTMgQEAKICAqLwogCiBzdGF0aWMgYWNwaV9oYW5kbGUgcm9vdF9oYW5kbGU7CitzdGF0aWMgYWNwaV9oYW5kbGUgZWNfaGFuZGxlOwogCiAjZGVmaW5lIFRQQUNQSV9IQU5ETEUob2JqZWN0LCBwYXJlbnQsIHBhdGhzLi4uKQkJCVwKIAlzdGF0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BzeXNmc19jcmVhdGVfYmluX2ZpbGUodGFibGVzX2tvYmosCisJCQkJICAmdGJsX2F0dHItPmF0dHIpOworCWlmIChyZXQpCisJCWtmcmVlKHRibF9hdHRyKTsKKworCXNmaV91bm1hcF90YWJsZSh0aCk7CisJcmV0dXJuIHRibF9hdHRyOworfQorCitzdGF0aWMgaW50IF9faW5pdCBzZmlfc3lzZnNfaW5pdCh2b2lkKQoreworCWludCB0YmxfY250LCBpOworCisJaWYgKHNmaV9kaXNhYmxlZCkKKwkJcmV0dXJuIDA7CisKKwlzZmlfa29iaiA9IGtvYmplY3RfY3JlYXRlX2FuZF9hZGQoInNmaSIsIGZpcm13YXJlX2tvYmopOworCWlmICghc2ZpX2tvYmopCisJCXJldHVybiAwOworCisJdGFibGVzX2tvYmogPSBrb2JqZWN0X2NyZWF0ZV9hbmRfYWRkKCJ0YWJsZXMiLCBzZmlfa29iaik7CisJaWYgKCF0YWJsZXNfa29iaikgeworCQlrb2JqZWN0X3B1dChzZmlfa29iaik7CisJCXJldHVybiAwOworCX0KKworCXNmaV9zeXNmc19pbnN0YWxsX3RhYmxlKHN5c3RfcGEpOworCisJdGJsX2NudCA9IFNGSV9HRVRfTlVNX0VOVFJJRVMoc3lzdF92YSwgdTY0KTsKKworCWZvciAoaSA9IDA7IGkgPCB0YmxfY250OyBpKyspCisJCXNmaV9zeXNmc19pbnN0YWxsX3RhYmxlKHN5c3RfdmEtPnBlbnRyeVtpXSk7CisKKwlzZmlfYWNwaV9zeXNmc19pbml0KCk7CisJa29iamVjdF91ZXZlbnQoc2ZpX2tvYmosIEtPQkpfQUREKTsKKwlrb2JqZWN0X3VldmVudCh0YWJsZXNfa29iaiwgS09CSl9BREQpOworCXByX2luZm8oIlNGSSBzeXNmcyBpbnRlcmZhY2VzIGluaXQgc3VjY2Vzc1xuIik7CisJcmV0dXJuIDA7Cit9CisKIHZvaWQgX19pbml0IHNmaV9pbml0KHZvaWQpCiB7CiAJaWYgKCFhY3BpX2Rpc2Fib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cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsIGludCByZWcsIHVpbnQ4X3QgKnZhbCkKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gaTJjX3NtYnVzX3JlYWRfYnl0ZV9kYXRhKGNsaWVudCwgcmVnKTsKKwlpZiAocmV0IDwgMCkgeworCQlkZXZfZXJyKCZjbGllbnQtPmRldiwgImZhaWxlZCByZWFkaW5nIGF0IDB4JTAyeFxuIiwgcmVnKTsKKwkJcmV0dXJuIHJldDsKKwl9CisKKwkqdmFsID0gKHVpbnQ4X3QpcmV0OworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGFkcDg4NjBfd3JpdGUoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTggcmVnLCB1OCB2YWwpCit7CisJcmV0dXJuIGkyY19zbWJ1c193cml0ZV9ieXRlX2RhdGEoY2xpZW50LCByZWcsIHZhbCk7Cit9CisKK3N0YXRpYyBpbnQgYWRwODg2MF9zZXRfYml0cyhzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50LCBpbnQgcmVnLCB1aW50OF90IGJpdF9tYXNrKQoreworCXN0cnVjdCBhZHA4ODYwX2JsICpkYXRhID0gaTJjX2dldF9jbGllbnRkYXRhKGNsaWVudCk7CisJdWludDhfdCByZWdfdmFsOworCWludCByZXQ7CisKKwltdXRleF9sb2NrKCZkYXRhLT5sb2NrKTsKKworCXJldCA9IGFkcDg4NjBfcmVhZChjbGllbnQsIHJlZywgJnJlZ192YWwpOworCisJaWYgKCFyZXQgJiYgKChyZWdfdmFsICYgYml0X21hc2spID09IDApKSB7CisJCXJlZ192YWwgfD0gYml0X21hc2s7CisJCXJldCA9IGFkcDg4NjBfd3JpdGUoY2xpZW50LCByZWcsIHJlZ192YWwpOworCX0KKworCW11dGV4X3VubG9jaygmZGF0YS0+bG9jayk7CisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBhZHA4ODYwX2Nscl9iaXRzKHN0cnVjdCBpMmNfY2xpZW50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CAweDg2LAorCURBVEFfT05MWSwgMHgxYSwKKwlEQVRBX09OTFksIDB4MzMsCisJREFUQV9PTkxZLCAweDBkLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9ESVNQTEFZX0NPTkRJVElPTl9TRVRbXSA9IHsKKwkweGYyLCAweDAyLAorCURBVEFfT05MWSwgMHgwMywKKwlEQVRBX09OTFksIDB4MWMsCisJREFUQV9PTkxZLCAweDEwLAorCURBVEFfT05MWSwgMHgxMCwKKworCTB4ZjcsIDB4MDMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0dBTU1BX1NFVFRJTkdbXSA9IHsKKwkweGZhLCAweDAwLAorCURBVEFfT05MWSwgMHgxOCwKKwlEQVRBX09OTFksIDB4MDgsCisJREFUQV9PTkxZLCAweDI0LAorCURBVEFfT05MWSwgMHg2NCwKKwlEQVRBX09OTFksIDB4NTYsCisJREFUQV9PTkxZLCAweDMzLAorCURBVEFfT05MWSwgMHhiNiwKKwlEQVRBX09OTFksIDB4YmEsCisJREFUQV9PTkxZLCAweGE4LAorCURBVEFfT05MWSwgMHhhYywKKwlEQVRBX09OTFksIDB4YjEsCisJREFUQV9PTkxZLCAweDlkLAorCURBVEFfT05MWSwgMHhjMSwKKwlEQVRBX09OTFksIDB4YzEsCisJREFUQV9PTkxZLCAweGI3LAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4OWMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHg5ZiwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweGQ2LAorCisJMHhmYSwgMHgwMSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0VUQ19DT05ESVRJT05fU0VUW10gPSB7CisJMHhmNiwgMHgwMCwKKwlEQVRBX09OTFksIDB4OGMsCisJREFUQV9PTkxZLCAweDA3LAorCisJMHhiMywgMHhjLAorCisJMHhiNSwgMHgyYywKKwlEQVRBX09OTFksIDB4MTIsCisJREFUQV9PTkxZLCAweDBjLAorCURBVEFfT05MWSwgMHgwYSwKKwlEQVRBX09OTFksIDB4MTAsCisJREFUQV9PTkxZLCAweDBlLAorCURBVEFfT05MWSwgMHgxNywKKwlEQVRBX09OTFksIDB4MTMsCisJREFUQV9PTkxZLCAweDFmLAorCURBVEFfT05MWSwgMHgxYSwKKwlEQVRBX09OTFksIDB4MmEsCisJREFUQV9PTkxZLCAweDI0LAorCURBVEFfT05MWSwgMHgxZiwKKwlEQVRBX09OTFksIDB4MWIsCisJREFUQV9PTkxZLCAweDFhLAorCURBVEFfT05MWSwgMHgxNywKKworCURBVEFfT05MWSwgMHgyYiwKKwlEQVRBX09OTFksIDB4MjYsCisJREFUQV9PTkxZLCAweDIyLAorCURBVEFfT05MWSwgMHgyMCwKKwlEQVRBX09OTFksIDB4M2EsCisJREFUQV9PTkxZLCAweDM0LAorCURBVEFfT05MWSwgMHgzMCwKKwlEQVRBX09OTFksIDB4MmMsCisJREFUQV9PTkxZLCAweDI5LAorCURBVEFfT05MWSwgMHgyNiwKKwlEQVRBX09OTFksIDB4MjUsCisJREFUQV9PTkxZLCAweDIzLAorCURBVEFfT05MWSwgMHgyMSwKKwlEQVRBX09OTFksIDB4MjAsCisJREFUQV9PTkxZLCAweDFlLAorCURBVEFfT05MWSwgMHgxZSwKKworCTB4YjYsIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgxMSwKKwlEQVRBX09OTFksIDB4MjIsCisJREFUQV9PTkxZLCAweDMzLAorCURBVEFfT05MWSwgMHg0NCwKKwlEQVRBX09OTFksIDB4NDQsCisJREFUQV9PTkxZLCAweDQ0LAorCisJREFUQV9PTkxZLCAweDU1LAorCURBVEFfT05MWSwgMHg1NSwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKworCTB4YjcsIDB4MmMsCisJREFUQV9PTkxZLCAweDEyLAorCURBVEFfT05MWSwgMHgwYywKKwlEQVRBX09OTFksIDB4MGEsCisJREFUQV9PTkxZLCAweDEwLAorCURBVEFfT05MWSwgMHgwZSwKKwlEQVRBX09OTFksIDB4MTcsCisJREFUQV9PTkxZLCAweDEzLAorCURBVEFfT05MWSwgMHgxZiwKKwlEQVRBX09OTFksIDB4MWEsCisJREFUQV9PTkxZLCAweDJhLAorCURBVEFfT05MWSwgMHgyNCwKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDFiLAorCURBVEFfT05MWSwgMHgxYSwKKwlEQVRBX09OTFksIDB4MTcsCisKKwlEQVRBX09OTFksIDB4MmIsCisJREFUQV9PTkxZLCAweDI2LAorCURBVEFfT05MWSwgMHgyMiwKKwlEQVRBX09OTFksIDB4MjAsCisJREFUQV9PTkxZLCAweDNhLAorCURBVEFfT05MWSwgMHgzNCwKKwlEQVRBX09OTFksIDB4MzAsCisJREFUQV9PTkxZLCAweDJjLAorCURBVEFfT05MWSwgMHgyOSwKKwlEQVRBX09OTFksIDB4MjYsCisJREFUQV9PTkxZLCAweDI1LAorCURBVEFfT05MWSwgMHgyMywKKwlEQVRBX09OTFksIDB4MjEsCisJREFUQV9PTkxZLCAweDIwLAorCURBVEFfT05MWSwgMHgxZSwKKwlEQVRBX09OTFksIDB4MWUsCisKKwkweGI4LCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MTEsCisJREFUQV9PTkxZLCAweDIyLAorCURBVEFfT05MWSwgMHgzMywKKwlEQVRBX09OTFksIDB4NDQsCisJREFUQV9PTkxZLCAweDQ0LAorCURBVEFfT05MWSwgMHg0NCwKKworCURBVEFfT05MWSwgMHg1NSwKKwlEQVRBX09OTFksIDB4NTUsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisKKwkweGI5LCAweDJjLAorCURBVEFfT05MWSwgMHgxMiwKKwlEQVRBX09OTFksIDB4MGMsCisJREFUQV9PTkxZLCAweDBhLAorCURBVEFfT05MWSwgMHgxMCwKKwlEQVRBX09OTFksIDB4MGUsCisJREFUQV9PTkxZLCAweDE3LAorCURBVEFfT05MWSwgMHgxMywKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDFhLAorCURBVEFfT05MWSwgMHgyYSwKKwlEQVRBX09OTFksIDB4MjQsCisJREFUQV9PTkxZLCAweDFmLAorCURBVEFfT05MWSwgMHgxYiwKKwlEQVRBX09OTFksIDB4MWEsCisJREFUQV9PTkxZLCAweDE3LAorCisJREFUQV9PTkxZLCAweDJiLAorCURBVEFfT05MWSwgMHgyNiwKKwlEQVRBX09OTFksIDB4MjIsCisJREFUQV9PTkxZLCAweDIwLAorCURBVEFfT05MWSwgMHgzYSwKKwlEQVRBX09OTFksIDB4MzQsCisJREFUQV9PTkxZLCAweDMwLAorCURBVEFfT05MWSwgMHgyYywKKwlEQVRBX09OTFksIDB4MjksCisJREFUQV9PTkxZLCAweDI2LAorCURBVEFfT05MWSwgMHgyNSwKKwlEQVRBX09OTFksIDB4MjMsCisJREFUQV9PTkxZLCAweDIxLAorCURBVEFfT05MWSwgMHgyMCwKKwlEQVRBX09OTFksIDB4MWUsCisJREFUQV9PTkxZLCAweDFlLAorCisJMHhiYSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDExLAorCURBVEFfT05MWSwgMHgyMiwKKwlEQVRBX09OTFksIDB4MzMsCisJREFUQV9PTkxZLCAweDQ0LAorCURBVEFfT05MWSwgMHg0NCwKKwlEQVRBX09OTFksIDB4NDQsCisKKwlEQVRBX09OTFksIDB4NTUsCisJREFUQV9PTkxZLCAweDU1LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCURBVEFfT05MWSwgMHg2NiwKKwlEQVRBX09OTFksIDB4NjYsCisJREFUQV9PTkxZLCAweDY2LAorCisJMHhjMSwgMHg0ZCwKKwlEQVRBX09OTFksIDB4OTYsCisJREFUQV9PTkxZLCAweDFkLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAxLAorCURBVEFfT05MWSwgMHhkZiwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwlEQVRBX09OTFksIDB4MWYsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDMsCisJREFUQV9PTkxZLCAweDA2LAorCURBVEFfT05MWSwgMHgwOSwKKwlEQVRBX09OTFksIDB4MGQsCisJREFUQV9PTkxZLCAweDBmLAorCURBVEFfT05MWSwgMHgxMiwKKwlEQVRBX09OTFksIDB4MTUsCisJREFUQV9PTkxZLCAweDE4LAorCisJMHhiMiwgMHgxMCwKKwlEQVRBX09OTFksIDB4MTAsCisJREFUQV9PTkxZLCAweDBiLAorCURBVEFfT05MWSwgMHgwNSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0FDTF9PTltdID0geworCS8qIEFDTCBvbiAqLworCTB4YzAsIDB4MDEsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9BQ0xfT0ZGW10gPSB7CisJLyogQUNMIG9mZiAqLworCTB4YzAsIDB4MDAsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9FTFZTU19PTltdID0geworCS8qIEVMVlNTIG9uICovCisJMHhiMSwgMHgwYiwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0VMVlNTX09GRltdID0geworCS8qIEVMVlNTIG9mZiAqLworCTB4YjEsIDB4MGEsCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9TVEFORF9CWV9PRkZbXSA9IHsKKwkweDExLCBDT01NQU5EX09OTFksCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IFNFUV9TVEFORF9CWV9PTltdID0geworCTB4MTAsIENPTU1BTkRfT05MWSwKKworCUVORERFRiwgMHgwMDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgU0VRX0RJU1BMQVlfT05bXSA9IHsKKwkweDI5LCBDT01NQU5EX09OTFksCisKKwlFTkRERUYsIDB4MDAwMAorfTsKKworCitzdGF0aWMgaW50IHM2ZTYzbTBfc3BpX3dyaXRlX2J5dGUoc3RydWN0IHM2ZTYzbTAgKmxjZCwgaW50IGFkZHIsIGludCBkYXRhKQoreworCXUxNiBidWZbMV07CisJc3RydWN0IHNwaV9tZXNzYWdlIG1zZzsKKworC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bG9iYWxfYmxvY2tfcnN2OworCXJldHVybiB0cmFuczsKK30KKworc3RhdGljIHZvaWQgX191bmxpbmtfZW5kX3RyYW5zKHN0cnVjdCBidHJmc190cmFuc19oYW5kbGUgKnRyYW5zLAorCQkJICAgICAgIHN0cnVjdCBidHJmc19yb290ICpyb290KQoreworCWlmICh0cmFucy0+YmxvY2tfcnN2ID09ICZyb290LT5mc19pbmZvLT5nbG9iYWxfYmxvY2tfcnN2KSB7CisJCUJVR19PTighcm9vdC0+ZnNfaW5mby0+ZW5vc3BjX3VubGluayk7CisJCXJvb3QtPmZzX2luZm8tPmVub3NwY191bmxpbmsgPSAwOworCX0KKwlidHJmc19lbmRfdHJhbnNhY3Rpb25fdGhyb3R0bGUodHJhbnMsIHJvb3QpOworfQorCiBzdGF0aWMgaW50IGJ0cmZzX3VubGluayhzdHJ1Y3QgaW5vZGUgKmRpciwgc3RydWN0IGRlbnRyeSAqZGVudHJ5KQogewotCXN0cnVjdCBidHJmc19yb290ICpyb290OworCXN0cnVjdCBidHJmc19yb290ICpyb290ID0gQlRSRlNfSShkaXIpLT5yb290OwogCXN0cnVjdCBidHJmc190cmFuc19oYW5kbGUgKnRyYW5zOwogCXN0cnVjdCBpbm9kZSAqaW5vZGUgPSBkZW50cnktPmRfaW5vZGU7CiAJaW50IHJldDsKIAl1bnNpZ25lZCBsb25nIG5yID0gMDsKIAotCXJvb3QgPSBCVFJGU19JKGRpciktPnJvb3Q7Ci0KLQkvKgotCSAqIDUgaXRlbXMgZm9yIHVubGluayBpbm9kZQotCSAqIDEgZm9yIG9ycGhhbgotCSAqLwotCXJldCA9IGJ0cmZzX3Jlc2VydmVfbWV0YWRhdGFfc3BhY2Uocm9vdCwgNik7Ci0JaWYgKHJldCkKLQkJcmV0dXJuIHJldDsKLQotCXRyYW5zID0gYnRyZnNfc3RhcnRfdHJhbnNhY3Rpb24ocm9vdCwgMSk7Ci0JaWYgKElTX0VSUih0cmFucykpIHsKLQkJYnRyZnNfdW5yZXN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