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ZWQgaW4gdGltZSB1bml0cyBidXQgbXVzdCBmYWN0b3IgaW4gZW5lcmd5IGNvbnN1bXB0aW9uIGNvZWZmaWNpZW50cy4KKworVGhlIGVuZXJneSBjb25zdW1wdGlvbiBvZiBhIGNwdSB3aGVuIGl0IGVudGVycyBhIHBvd2VyIHN0YXRlIGNhbiBiZSByb3VnaGx5CitjaGFyYWN0ZXJpc2VkIGJ5IHRoZSBmb2xsb3dpbmcgZ3JhcGg6CisKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgZSAgIHwKKyAgICAgICAgICAgbiAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8tLS0KKyAgICAgICAgICAgZSAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy0tLS0tLQorICAgICAgICAgICByICAgfCAgICAgICAgICAgICAgICAgICAgICAgIC8tLS0tLS0KKyAgICAgICAgICAgZyAgIHwgICAgICAgICAgICAgICAgICAvLS0tLS0KKyAgICAgICAgICAgeSAgIHwgICAgICAgICAgIC8tLS0tLS0KKyAgICAgICAgICAgICAgIHwgICAgICAgLS0tLQorICAgICAgICAgICAgICAgfCAgICAgIC98CisgICAgICAgICAgICAgICB8ICAgICAvIHwKKyAgICAgICAgICAgICAgIHwgICAgLyAgfAorICAgICAgICAgICAgICAgfCAgIC8gICB8CisgICAgICAgICAgICAgICB8ICAvICAgIHwKKyAgICAgICAgICAgICAgIHwgLyAgICAgfAorICAgICAgICAgICAgICAgfC8gICAgICB8CisgICAgICAgICAgLS0tLS18LS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgICAgIDB8ICAgICAgIDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lKG1zKQorCisJCUdyYXBoIDE6IEVuZXJneSB2cyB0aW1lIGV4YW1wbGUKKworVGhlIGdyYXBoIG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RTEsCithbmQgSURMRTI6CisKKyAgICAgICAgICB8CisgICAgICAgICAgfAorICAgICAgICAgIHwKKyAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLS0gSURMRTEKKyAgICAgICBlICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8tLS0KKyAgICAgICBuICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLS0tLQorICAgICAgIGUgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy0tLQorICAgICAgIHIgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8tLS0tLS8tLS0tLS0tLS0gSURMRTIKKyAgICAgICBnICB8ICAgICAgICAgICAgICAgICAgICAvLS0tLS0tLS8tLS0tLS0tLS0KKyAgICAgICB5ICB8ICAgICAgICAtLS0tLS0tLS0tLS0gICAgLy0tLXwKKyAgICAgICAgICB8ICAgICAgIC8gICAgICAgICAgIC8tLS0tICAgIHwKKyAgICAgICAgICB8ICAgICAgLyAgICAgICAgLy0tLSAgICAgICAgIHwKKyAgICAgICAgICB8ICAgICAvICAgIC8tLS0tICAgICAgICAgICAgIHwKKyAgICAgICAgICB8ICAgIC8gLy0tLSAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICB8ICAgLS0tICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICB8ICAvICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICB8IC8gICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICB8LyAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICB0aW1lCisgICAgICAgLS0tLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAgfElETEUxLWVuZXJneSA8IElETEUyL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XMgPSA8MTUwMD47CisJCQltaW4tcmVzaWRlbmN5LXVzID0gPDI1MDA+OworCQkJd2FrZXVwLWxhdGVuY3ktdXMgPSA8MTcwMD47CisJCX07CisKKwkJQ1BVX1NMRUVQXzFfMDogY3B1LXNsZWVwLTEtMCB7CisJCQljb21wYXRpYmxlID0gImFybSxpZGxlLXN0YXRlIjsKKwkJCWxvY2FsLXRpbWVyLXN0b3A7CisJCQllbnRyeS1sYXRlbmN5LXVzID0gPDMwMD47CisJCQlleGl0LWxhdGVuY3ktdXMgPSA8NTAwPjsKKwkJCW1pbi1yZXNpZGVuY3ktdXMgPSA8OTAwPjsKKwkJCXdha2V1cC1sYXRlbmN5LXVzID0gPDYwMD47CisJCX07CisKKwkJQ0xVU1RFUl9TTEVFUF8xOiBjbHVzdGVyLXNsZWVwLTEgeworCQkJY29tcGF0aWJsZSA9ICJhcm0saWRsZS1zdGF0ZSI7CisJCQlsb2NhbC10aW1lci1zdG9wOworCQkJZW50cnktbGF0ZW5jeS11cyA9IDw4MDA+OworCQkJZXhpdC1sYXRlbmN5LXVzID0gPDIwMDA+OworCQkJbWluLXJlc2lkZW5jeS11cyA9IDw2NTAwPjsKKwkJCXdha2V1cC1sYXRlbmN5LXVzID0gPDIzMDA+OworCQl9OworCX07CisKK307CisKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKzUgLSBSZWZlcmVuY2VzCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK1sxXSBBUk0gTGludXggS2VybmVsIGRvY3VtZW50YXRpb24gLSBDUFVzIGJpbmRpbmdzCisgICAgRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL2FybS9jcHVzLnR4dAorCitbMl0gQVJNIExpbnV4IEtlcm5lbCBkb2N1bWVudGF0aW9uIC0gUFNDSSBiaW5kaW5ncworICAgIERvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9hcm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Rub3RpZnlfdGVzdApkaWZmIC0tZ2l0IGEvRG9jdW1lbnRhdGlvbi9maWxlc3lzdGVtcy9mMmZzLnR4dCBiL0RvY3VtZW50YXRpb24vZmlsZXN5c3RlbXMvZjJmcy50eHQKaW5kZXggYTIwNDZhNy4uMmNjYTVhMiAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlvbi9maWxlc3lzdGVtcy9mMmZzLnR4dAorKysgYi9Eb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL2YyZnMudHh0CkBAIC0xOTIsMTUgKzE5MiwyMiBAQAogCiAgaXB1X3BvbGljeSAgICAgICAgICAgICAgICAgICBUaGlzIHBhcmFtZXRlciBjb250cm9scyB0aGUgcG9saWN5IG9mIGluLXBsYWNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVzIGluIGYyZnMuIFRoZXJlIGFyZSBmaXZlIHBvbGljaWVzOgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6IEYyRlNfSVBVX0ZPUkNFLCAxOiBGMkZTX0lQVV9TU1IsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjogRjJGU19JUFVfVVRJTCwgIDM6IEYyRlNfSVBVX1NTUl9VVElMLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6IEYyRlNfSVBVX0RJU0FCTEUuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTogRjJGU19JUFVfRk9SQ0UsIDB4MDI6IEYyRlNfSVBVX1NTUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA0OiBGMkZTX0lQVV9VVElMLCAgMHgwODogRjJGU19JUFVfU1NSX1VUSUwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDogRjJGU19JUFVfRlNZTkMuCiAKICBtaW5faXB1X3V0aWwgICAgICAgICAgICAgICAgIFRoaXMgcGFyYW1ldGVyIGNvbnRyb2xzIHRoZSB0aHJlc2hv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KworICAgICAgICAgICAwIDAgMCAwIEQgRCBTIFMgICgwLi4xNSkgIDogY29weSAzIGJ5dGVzIGZyb20gMi4uMyBrQiBkaXN0YW5jZQorICAgICAgICAgICBsZW5ndGggPSAzCisgICAgICAgICAgIHN0YXRlID0gUyAoY29weSBTIGxpdGVyYWxzIGFmdGVyIHRoaXMgYmxvY2spCisgICAgICAgICBBbHdheXMgZm9sbG93ZWQgYnkgZXhhY3RseSBvbmUgYnl0ZSA6IEggSCBIIEggSCBIIEggSAorICAgICAgICAgICBkaXN0YW5jZSA9IChIIDw8IDIpICsgRCArIDIwNDkKKworICAgICAgMCAwIDAgMSBIIEwgTCBMICAoMTYuLjMxKQorICAgICAgICAgICBDb3B5IG9mIGEgYmxvY2sgd2l0aGluIDE2Li40OGtCIGRpc3RhbmNlIChwcmVmZXJhYmx5IGxlc3MgdGhhbiAxMEIpCisgICAgICAgICAgIGxlbmd0aCA9IDIgKyAoTCA/OiA3ICsgKHplcm9fYnl0ZXMgKiAyNTUpICsgbm9uX3plcm9fYnl0ZSkKKyAgICAgICAgQWx3YXlzIGZvbGxvd2VkIGJ5IGV4YWN0bHkgb25lIExFMTYgOiAgRCBEIEQgRCBEIEQgRCBEIDogRCBEIEQgRCBEIEQgUyBTCisgICAgICAgICAgIGRpc3RhbmNlID0gMTYzODQgKyAoSCA8PCAxNCkgKyBECisgICAgICAgICAgIHN0YXRlID0gUyAoY29weSBTIGxpdGVyYWxzIGFmdGVyIHRoaXMgYmxvY2spCisgICAgICAgICAgIEVuZCBvZiBzdHJlYW0gaXMgcmVhY2hlZCBpZiBkaXN0YW5jZSA9PSAxNjM4NAorCisgICAgICAwIDAgMSBMIEwgTCBMIEwgICgzMi4uNjMpCisgICAgICAgICAgIENvcHkgb2Ygc21hbGwgYmxvY2sgd2l0aGluIDE2a0IgZGlzdGFuY2UgKHByZWZlcmFibHkgbGVzcyB0aGFuIDM0QikKKyAgICAgICAgICAgbGVuZ3RoID0gMiArIChMID86IDMxICsgKHpl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0xBSU0sIERBTUFHRVMgT1IgT1RIRVIgTElBQklMSVRZLAorICogICAgIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORworICogICAgIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IKKyAqICAgICBPVEhFUiBERUFMSU5HUyBJTiBUSEUgU09GVFdBUkUuCisgKi8KKy9kdHMtdjEvOworI2luY2x1ZGUgInNhbWE1ZDQuZHRzaSIKKworLyB7CisJbW9kZWwgPSAiQXRtZWwgU0FNQTVENC1FSyI7CisJY29tcGF0aWJsZSA9ICJhdG1lbCxzYW1hNWQ0ZWsiLCAiYXRtZWwsc2FtYTVkNCIsICJhdG1lbCxzYW1hNSI7CisKKwljaG9zZW4geworCQlib290YXJncyA9ICJjb25zb2xlPXR0eVMwLDExNTIwMCBpZ25vcmVfbG9nbGV2ZWwgZWFybHlwcmludGsiOworCX07CisKKwltZW1vcnkgeworCQlyZWcgPSA8MHgyMDAwMDAwMCAweDIwMDAwMDAwPjsKKwl9OworCisJY2xvY2tzIHsKKwkJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJCSNzaXplLWNlbGxzID0gPDE+OworCQlyYW5nZXM7CisKKwkJbWFpbl9jbG9jazogY2xvY2tAMCB7CisJCQljb21wYXRpYmxlID0gImF0bWVsLG9zYyIsICJmaXhlZC1jbG9jayI7CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MTIwMDAwMDA+OworCQl9OworCisJCXNsb3dfeHRhbCB7CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MzI3Njg+OworCQl9OworCisJCW1haW5feHRhbCB7CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MTIwMDAwMDA+OworCQl9OworCX07CisKKwlhaGIgeworCQlhcGIgeworCQkJbGNkX2J1c0BmMDAwMDAwMCB7CisJCQkJc3RhdHVz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IGZ1bmN0aW9uOiAgICAgIDAgLSBQcmltYXJ5IGZ1bmN0aW9uCisgKiAgICAgICAgICAgICAgICAxIC0gQWx0ZXJuYXRlIGZ1bmN0aW9uCisgKiAgICAgICAgICAgICAgICAyIC0gR1BJTworICogZGlyZWN0aW9uOiAgICAgMCAtIElucHV0CisgKiAgICAgICAgICAgICAgICAxIC0gT3V0cHV0CisgKiBncGlvX29jb25mOiAgICAwIC0gQV9JTgorICogICAgICAgICAgICAgICAgMSAtIEJfSU4KKyAqICAgICAgICAgICAgICAgIDIgLSBBX09VVAorICogICAgICAgICAgICAgICAgMyAtIERhdGEgUmVnaXN0ZXIKKyAqIGdwaW9faWNvbmZhL2I6IDAgLSBHUElPX0lOCisgKiAgICAgICAgICAgICAgICAxIC0gSW50ZXJydXB0IFN0YXR1cyBSZWdpc3RlcgorICogICAgICAgICAgICAgICAgMiAtIDAKKyAqICAgICAgICAgICAgICAgIDMgLSAxCisgKgorICogJ3BpbicgaXMgYW4gaW50ZWdlciBiZXR3ZWVuIDAgYW5kIDB4YmYuIGkuTVgxIGhhcyA0IHBvcnRzIHdpdGggMzIgY29uZmlndXJhYmxlCisgKiBjb25maWd1cmFibGUgcGlucyBlYWNoLiAncGluJyBpcyBQT1JUICogMzIgKyBQT1JUX1BJTiwgUE9SVF9QSU4gaXMgdGhlIHBpbgorICogbnVtYmVyIG9uIHRoZSBzcGVjaWZpYyBwb3J0IChiZXR3ZWVuIDAgYW5kIDMxKS4KKyAqLworCisjZGVmaW5lIE1YMV9QQURfQTI0X19BMjQJCQkweDAwIDB4MDA0CisjZGVmaW5lIE1YMV9QQURfQTI0X19HUElPMV8wCQkJMHgwMCAweDAzMgorI2RlZmluZSBNWDFfUEFEX0EyNF9fU1BJMl9DTEsJCQkweDAwIDB4MDA2CisjZGVmaW5lIE1YMV9QQURfVElOX19USU4JCQkweDAxIDB4MDAwCisjZGVmaW5lIE1YMV9QQURfVElOX19HUElPMV8xCQkJMHgwMSAweDAzMgorI2RlZ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KK307CiAKKyZwY2llIHsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCXBpbmN0cmwtMCA9IDwmcGluY3RybF9wY2llPjsKKwlyZXNldC1ncGlvID0gPCZncGlvMSAyOSBHUElPX0FDVElWRV9MT1c+OworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZwd200IHsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCXBpbmN0cmwtMCA9IDwmcGluY3RybF9wd200PjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismc3NpMSB7CisJZnNsLG1vZGUgPSAiaTJzLXNsYXZlIjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdWFydDEgeworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZwaW5jdHJsX3VhcnQxPjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdWFydDIgeworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZwaW5jdHJsX3VhcnQyPjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdWFydDUgeworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZwaW5jdHJsX3VhcnQ1PjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdXNib3RnIHsKKwl2YnVzLXN1cHBseSA9IDwmcmVnX3VzYl9vdGdfdmJ1cz47CisJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwlwaW5jdHJsLTAgPSA8JnBpbmN0cmxfdXNib3RnPjsKKwlkaXNhYmxlLW92ZXItY3VycmVudDsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdXNiaDEgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZ1c2RoYzMgeworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZwaW5jdHJsX3VzZGhjMz47Cis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jRjMDIiOworCQlyZWcgPSA8MHg1MT47CisJCXBhZ2VzaXplID0gPDE2PjsKKwl9OworCisJZWVwcm9tMzogZWVwcm9tQDUyIHsKKwkJY29tcGF0aWJsZSA9ICJhdG1lbCwyNGMwMiI7CisJCXJlZyA9IDwweDUyPjsKKwkJcGFnZXNpemUgPSA8MTY+OworCX07CisKKwllZXByb200OiBlZXByb21ANTMgeworCQljb21wYXRpYmxlID0gImF0bWVsLDI0YzAyIjsKKwkJcmVnID0gPDB4NTM+OworCQlwYWdlc2l6ZSA9IDwxNj47CisJfTsKKworCWdwaW86IHBjYTk1NTVAMjMgeworCQljb21wYXRpYmxlID0gIm54cCxwY2E5NTU1IjsKKwkJcmVnID0gPDB4MjM+OworCQlncGlvLWNvbnRyb2xsZXI7CisJCSNncGlvLWNlbGxzID0gPDI+OworCX07CisKKwlydGM6IGRzMTY3MkA2OCB7CisJCWNvbXBhdGlibGUgPSAiZGFsbGFzLGRzMTY3MiI7CisJCXJlZyA9IDwweDY4PjsKKwl9OworfTsKKworJmkyYzIgeworCWNsb2NrLWZyZXF1ZW5jeSA9IDwxMDAwMDA+OworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZwaW5jdHJsX2kyYzI+OworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZpMmMzIHsKKwljbG9jay1mcmVxdWVuY3kgPSA8MTAwMDAwPjsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCXBpbmN0cmwtMCA9IDwmcGluY3RybF9pMmMzPjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismcGNpZSB7CisJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwlwaW5jdHJsLTAgPSA8JnBpbmN0cmxfcGNpZT47CisJcmVzZXQtZ3BpbyA9IDwmZ3BpbzEgMjkgR1BJT19BQ1RJVkVfTE9XPjsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdWFydDIgeworCXBp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SAiZGlzYWJsZWQiOworfTsKKworJmkyYzMgeworCWNsb2NrLWZyZXF1ZW5jeSA9IDwxMDAwMDA+OworCisJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwlwaW5jdHJsLTAgPSA8JmkyYzNfcGlucz47Cit9OworCisvKiBOZWVkZWQgdG8gcG93ZXIgdGhlIERQSSBwaW5zICovCismdnBsbDIgeworCXJlZ3VsYXRvci1hbHdheXMtb247Cit9OworCismZHNzIHsKKwlzdGF0dXMgPSAib2siOworCisJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwlwaW5jdHJsLTAgPSA8JmRzc19kcGlfcGlucz47CisKKwlwb3J0IHsKKwkJZHBpX291dDogZW5kcG9pbnQgeworCQkJcmVtb3RlLWVuZHBvaW50ID0gPCZsY2RfaW4+OworCQkJZGF0YS1saW5lcyA9IDwyND47CisJCX07CisJfTsKK307CisKKy8geworCWFsaWFzZXMgeworCQlkaXNwbGF5MCA9ICZsY2QwOworCX07CisKKwlsY2QwOiBkaXNwbGF5QDAgeworCQljb21wYXRpYmxlID0gInBhbmVsLWRwaSI7CisJCWxhYmVsID0gImxjZCI7CisKKwkJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwkJcGluY3RybC0wID0gPCZsdGU0MzBfcGlucz47CisJCWVuYWJsZS1ncGlvcyA9IDwmZ3BpbzUgMTAgR1BJT19BQ1RJVkVfTE9XPjsJLyogZ3Bpb18xMzggKi8KKworCQlwb3J0IHsKKwkJCWxjZF9pbjogZW5kcG9pbnQgeworCQkJCXJlbW90ZS1lbmRwb2ludCA9IDwmZHBpX291dD47CisJCQl9OworCQl9OworCisJCXBhbmVsLXRpbWluZyB7CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MzEyNTAwMDA+OworCQkJaGFjdGl2ZSA9IDw4MDA+OworCQkJdmFjdGl2ZSA9IDw0ODA+OworCQkJaGZyb250LXBvcmNoID0gPDQwPjsKKwkJCWhiYWNrLXBvcmNoID0g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KK307CisKKy8vIFdpRmkgKE1hcnZlbGwgODhXODY4Nikgb24gTU1DMi9TRElPCismbW1jMiB7CisJcGluY3RybC1uYW1lcyA9ICJkZWZhdWx0IjsKKwlwaW5jdHJsLTAgPSA8Jm1tYzJfcGlucz47CisJdm1tYy1zdXBwbHkgPSA8Jm1tYzJfc2Rpb19wb3dlcm9uPjsKKwlub24tcmVtb3ZhYmxlOworCWJ1cy13aWR0aCA9IDw0PjsKKwljYXAtcG93ZXItb2ZmLWNhcmQ7Cit9OworCismbW1jMyB7CisJc3RhdHVzID0gImRpc2FibGVkIjsKK307CisKKyZ1c2Joc2hvc3QgeworCXBvcnQyLW1vZGUgPSAiZWhjaS1waHkiOworfTsKKworJnVzYmhzZWhjaSB7CisJcGh5cyA9IDwwICZoc3VzYjJfcGh5PjsKK307CisKKyZ0d2xfZ3BpbyB7CisJdGksdXNlLWxlZHM7CisJLyogcHVsbHVwczogQklUKDEpICovCisJdGkscHVsbHVwcyA9IDwweDAwMDAwMj47CisJLyoKKwkgKiBwdWxsZG93bnM6CisJICogQklUKDIpLCBCSVQoNiksIEJJVCg3KSwgQklUKDgpLCBCSVQoMTMpCisJICogQklUKDE1KSwgQklUKDE2KSwgQklUKDE3KQorCSAqLworCXRpLHB1bGxkb3ducyA9IDwweDAzYTFjND47Cit9OworCismdWFydDMgeworCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJcGluY3RybC0wID0gPCZ1YXJ0M19waW5zPjsKK307CisKKyZtY2JzcDMgeworCXN0YXR1cyA9ICJva2F5IjsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCXBpbmN0cmwtMCA9IDwmbWNic3AzX3BpbnM+OworfTsKKworJmdwbWMgeworCXJhbmdlcyA9IDwwIDAgMHgwMDAwMDAwMCAweDAxMDAwMDAwPjsKKworCW5hbmRAMCwwIHsKKwkJcmVnID0gPDAgMCAwPjsgLyogQ1MwLCBvZmZzZXQgMCAqLworCQluYW5kLWJ1cy13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isKIAkvKiBIUyBVU0IgSG9zdCBQSFkgb24gUE9SVCAyICovCiAJaHN1c2IyX3BoeTogaHN1c2IyX3BoeSB7CiAJCWNvbXBhdGlibGUgPSAidXNiLW5vcC14Y2VpdiI7CkBAIC02Niw2ICs3OSwxMDUgQEAKIAkJCWRlZmF1bHQtc3RhdGUgPSAib2ZmIjsKIAkJfTsKIAl9OworCisJbGNkMDogZGlzcGxheSB7CisgICAgICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJzdGFydGVrLHN0YXJ0ZWsta2QwNTBjIiwgInBhbmVsLWRwaSI7CisgICAgICAgICAgICAgICAgbGFiZWwgPSAibGNkIjsKKworICAgICAgICAgICAgICAgIHBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisgICAgICAgICAgICAgICAgcGluY3RybC0wID0gPCZsY2RfcGlucz47CisKKyAgICAgICAgICAgICAgICBlbmFibGUtZ3Bpb3MgPSA8JmdwaW84IDMgR1BJT19BQ1RJVkVfSElHSD47CisKKyAgICAgICAgICAgICAgICBwYW5lbC10aW1pbmcgeworICAgICAgICAgICAgICAgICAgICAgICAgY2xvY2stZnJlcXVlbmN5ID0gPDMzMDAwMDAwPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGhhY3RpdmUgPSA8ODAwPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHZhY3RpdmUgPSA8NDgwPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGhmcm9udC1wb3JjaCA9IDw0MD47CisgICAgICAgICAgICAgICAgICAgICAgICBoYmFjay1wb3JjaCA9IDw0MD47CisgICAgICAgICAgICAgICAgICAgICAgICBoc3luYy1sZW4gPSA8NDM+OworICAgICAgICAgICAgICAgICAgICAgICAgdmJhY2stcG9yY2ggPSA8Mjk+OworICAgICAgICAgICAgICAgICAgICAgICAgdmZyb250LXBvcmNoID0gPDEzPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHZzeW5jLWxlbiA9IDwzPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGhzeW5jLWFjdGl2ZSA9IDwwPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHZzeW5jLWFjdGl2ZSA9IDwwPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGRlLWFjdGl2ZSA9IDwxPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVsY2xrLWFjdGl2ZSA9IDwxPjsKKyAgICAgICAgICAgICAgICB9OworCisgICAgICAgICAgICAgICAgcG9ydCB7CisgICAgICAgICAgICAgICAgICAgICAgICBsY2RfaW46IGVuZHBvaW50IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3RlLWVuZHBvaW50ID0gPCZkcGlfbGNkX291dD47CisgICAgICAgICAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAgIH07CisgICAgICAgIH07CisKKwloZG1pMDogY29ubmVjdG9yQDAgeworCQljb21wYXRpYmxlID0gImhkbWktY29ubmVjdG9yIjsKKwkJbGFiZWwgPSAiaGRtaSI7CisKKwkJdHlwZSA9ICJhIjsKKworCQlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCQlwaW5jdHJsLTAgPSA8JmhkbWlfY29ubl9waW5zPjsKKworCQlocGQtZ3Bpb3MgPSA8JmdwaW83IDEgR1BJT19BQ1RJVkVfSElHSD47IC8qIEdQSU8gMTkzLCBIUEQgKi8KKworCQlwb3J0IHsKKwkJCWhkbWlfY29ubmVjdG9yX2luOiBlbmRwb2ludCB7CisJCQkJcmVtb3RlLWVuZHBvaW50ID0gPCZoZG1pX291dD47CisJCQl9OworCQl9OworCX07CisKKwl0ZnA0MTA6IGVuY29kZXJAMCB7CisJCWNvbXBhdGlibGUgPSAidGksdGZwNDEwIjsKKworCQlwb3J0cyB7CisJCQkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkJCSNzaXplLWNlbGxzID0gPDA+OworCisJCQlwb3J0QDAgeworCQkJCXJlZyA9IDwwPjsKKworCQkJCXRmcDQxMF9pb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jeSA9IDwxMjI4ODAwMD47CisJCX07CisJfTsKK307CisKKyZldGhlciB7CisJcGluY3RybC0wID0gPCZldGhlcl9waW5zPjsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCisJcGh5LWhhbmRsZSA9IDwmcGh5MD47CisJc3RhdHVzID0gIm9rIjsKKworCXBoeTA6IGV0aGVybmV0LXBoeUAwIHsKKwkJcmVnID0gPDA+OworCX07Cit9OworCismZXh0YWwxX2NsayB7CisJY2xvY2stZnJlcXVlbmN5ID0gPDI1MDAwMDAwPjsKK307CismZXh0YWwyX2NsayB7CisJY2xvY2stZnJlcXVlbmN5ID0gPDQ4MDAwMDAwPjsKK307CismZnNpYmNrX2NsayB7CisJY2xvY2stZnJlcXVlbmN5ID0gPDEyMjg4MDAwPjsKK307CismY3BnX2Nsb2NrcyB7CisJcmVuZXNhcyxtb2RlID0gPDB4MDU+OyAvKiBNRF9DSzAgfCBNRF9DSzIgKi8KK307CisKKyZjbXQxIHsKKwlzdGF0dXMgPSAib2siOworfTsKKworJmkyYzAgeworCXN0YXR1cyA9ICJva2F5IjsKKwl0b3VjaHNjcmVlbkA1NSB7CisJCWNvbXBhdGlibGUgPSAic2l0cm9uaXgsc3QxMjMyIjsKKwkJcmVnID0gPDB4NTU+OworCQlpbnRlcnJ1cHQtcGFyZW50ID0gPCZpcnFwaW4xPjsKKwkJaW50ZXJydXB0cyA9IDwyIElSUV9UWVBFX0xFVkVMX0xPVz47CisJCXBpbmN0cmwtMCA9IDwmc3QxMjMyX3BpbnM+OworCQlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCQlncGlvcyA9IDwmcGZjIDE2NiBHUElPX0FDVElWRV9MT1c+OworCX07CisKKwl3bTg5Nzg6IHdtODk3OEAxYSB7CisJCSNzb3VuZC1kYWktY2VsbHMgPSA8MD47CisJCWNvbXBhdGlibGUgPSAid2xmLHdtODk3OCI7CisJCXJlZyA9IDwweDFhPjsKKwl9OworfTsKKworJmkyYzIgewor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09GPXkKK0NPTkZJR19NVERfTTI1UDgwPXkKK0NPTkZJR19NVERfTkFORD15CitDT05GSUdfTVREX05BTkRfUFhBM3h4PXkKK0NPTkZJR19NVERfU1BJX05PUj15CiBDT05GSUdfQkxLX0RFVl9TRD15CiBDT05GSUdfQVRBPXkKIENPTkZJR19BSENJX01WRUJVPXkKIENPTkZJR19TQVRBX01WPXkKIENPTkZJR19ORVRERVZJQ0VTPXkKK0NPTkZJR19NVjY0M1hYX0VUSD15CiBDT05GSUdfTVZORVRBPXkKIENPTkZJR19NVlBQMj15CiBDT05GSUdfTUFSVkVMTF9QSFk9eQpAQCAtNTgsNDcgKzY5LDM2IEBACiBDT05GSUdfS0VZQk9BUkRfR1BJTz15CiBDT05GSUdfU0VSSUFMXzgyNTA9eQogQ09ORklHX1NFUklBTF84MjUwX0NPTlNPTEU9eQorQ09ORklHX1NFUklBTF84MjUwX0RXPXkKIENPTkZJR19TRVJJQUxfT0ZfUExBVEZPUk09eQogQ09ORklHX0kyQz15CitDT05GSUdfSTJDX01WNjRYWFg9eQogQ09ORklHX1NQST15CiBDT05GSUdfU1BJX09SSU9OPXkKLUNPTkZJR19JMkNfTVY2NFhYWD15Ci1DT05GSUdfTVREPXkKLUNPTkZJR19NVERfQ0hBUj15Ci1DT05GSUdfTVREX00yNVA4MD15Ci1DT05GSUdfTVREX1NQSV9OT1I9eQotQ09ORklHX01URF9DRkk9eQotQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQotQ09ORklHX01URF9DRklfQU1EU1REPXkKLUNPTkZJR19NVERfQ0ZJX1NUQUE9eQotQ09ORklHX01URF9QSFlTTUFQX09GPXkKLUNPTkZJR19NVERfTkFORD15Ci1DT05GSUdfTVREX05BTkRfUFhBM3h4PXkKLUNPTkZJR19TRVJJQUxfODI1MF9EVz15Ci1DT05GSUdfR1BJT0xJQj15CiBDT05GSUdfR1BJT19TWVNGUz15CitDT05GSUdfU0VOU09SU19HUElPX0ZBTj15CiBDT05GSUdfVEhFUk1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WZjb25maWcKaW5kZXggNDQxNDk5MC4uYzkwODljOSAxMDA2NDQKLS0tIGEvYXJjaC9hcm0vY29uZmlncy9zYW1hNV9kZWZjb25maWcKKysrIGIvYXJjaC9hcm0vY29uZmlncy9zYW1hNV9kZWZjb25maWcKQEAgLTE5LDkgKzE5LDkgQEAKIENPTkZJR19BUkNIX0FUOTE9eQogQ09ORklHX1NPQ19TQU1fVjc9eQogQ09ORklHX1NPQ19TQU1BNUQzPXkKK0NPTkZJR19TT0NfU0FNQTVEND15CiBDT05GSUdfTUFDSF9TQU1BNV9EVD15CiBDT05GSUdfQUVBQkk9eQotIyBDT05GSUdfT0FCSV9DT01QQVQgaXMgbm90IHNldAogQ09ORklHX1VBQ0NFU1NfV0lUSF9NRU1DUFk9eQogQ09ORklHX1pCT09UX1JPTV9URVhUPTB4MAogQ09ORklHX1pCT09UX1JPTV9CU1M9MHgwCkBAIC02NSwxNSArNjUsMTQgQEAKICMgQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQgaXMgbm90IHNldAogQ09ORklHX01URD15CiBDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQotQ09ORklHX01URF9DSEFSPXkKIENPTkZJR19NVERfQkxPQ0s9eQogQ09ORklHX01URF9DRkk9eQogQ09ORklHX01URF9NMjVQODA9eQogQ09ORklHX01URF9OQU5EPXkKIENPTkZJR19NVERfTkFORF9BVE1FTD15CitDT05GSUdfTVREX1NQSV9OT1I9eQogQ09ORklHX01URF9VQkk9eQogQ09ORklHX01URF9VQklfR0xVRUJJPXkKLUNPTkZJR19QUk9DX0RFVklDRVRSRUU9eQogQ09ORklHX0JMS19ERVZfTE9PUD15CiBDT05GSUdfQkxLX0RFVl9SQU09eQogQ09ORklHX0JMS19ERVZfUkFNX0NPVU5UPTQKQEAgLTgzLDEwICs4Miw4IEBACiBDT05GSUdfRUVQUk9NX0FUMjQ9eQogQ09ORklHX1NDU0k9eQogQ09ORklHX0JMS19ERVZfU0Q9eQotQ09OR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2F0ZTIoInNwYmEiLCAgICAgICAgICAiaXBnIiwgICAgICAgICAgICAgICBiYXNlICsgMHg3YywgMTIpOwogCWNsa1tJTVg2UURMX0NMS19TUERJRl0gICAgICAgID0gaW14X2Nsa19nYXRlMigic3BkaWYiLCAgICAgICAgICJzcGRpZl9wb2RmIiwgICAgICAgIGJhc2UgKyAweDdjLCAxNCk7Ci0JY2xrW0lNWDZRRExfQ0xLX1NTSTFfSVBHXSAgICAgPSBpbXhfY2xrX2dhdGUyKCJzc2kxX2lwZyIsICAgICAgImlwZyIsICAgICAgICAgICAgICAgYmFzZSArIDB4N2MsIDE4KTsKLQljbGtbSU1YNlFETF9DTEtfU1NJMl9JUEddICAgICA9IGlteF9jbGtfZ2F0ZTIoInNzaTJfaXBnIiwgICAgICAiaXBnIiwgICAgICAgICAgICAgICBiYXNlICsgMHg3YywgMjApOwotCWNsa1tJTVg2UURMX0NMS19TU0kzX0lQR10gICAgID0gaW14X2Nsa19nYXRlMigic3NpM19pcGciLCAgICAgICJpcGciLCAgICAgICAgICAgICAgIGJhc2UgKyAweDdjLCAyMik7CisJY2xrW0lNWDZRRExfQ0xLX1NTSTFfSVBHXSAgICAgPSBpbXhfY2xrX2dhdGUyX3NoYXJlZCgic3NpMV9pcGciLCAgICAgICJpcGciLCAgICAgICAgYmFzZSArIDB4N2MsIDE4LCAmc2hhcmVfY291bnRfc3NpMSk7CisJY2xrW0lNWDZRRExfQ0xLX1NTSTJfSVBHXSAgICAgPSBpbXhfY2xrX2dhdGUyX3NoYXJlZCgic3NpMl9pcGciLCAgICAgICJpcGciLCAgICAgICAgYmFzZSArIDB4N2MsIDIwLCAmc2hhcmVfY291bnRfc3NpMik7CisJY2xrW0lNWDZRRExfQ0xLX1NTSTNfSVBHXSAgICAgPSBpbXhfY2xrX2dhdGUyX3NoYXJlZCgic3NpM19pcGciLCAgICAgICJpcGciLCAgICAgICAgYmFzZSArIDB4N2MsIDIyLCAmc2hhcmVfY291bnRfc3NpMyk7CisJY2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X211eCgicGVyaXBoX2NsazJfc2VsIiwgIGJhc2UgKyAweDE4LCAxMiwgMiwgcGVyaXBoX2NsazJfc2VscywgIEFSUkFZX1NJWkUocGVyaXBoX2NsazJfc2VscykpOwotCWNsa3NbSU1YNlNMX0NMS19DU0lfU0VMXSAgICAgICAgICA9IGlteF9jbGtfbXV4KCJjc2lfc2VsIiwgICAgICAgICAgYmFzZSArIDB4M2MsIDksICAyLCBjc2lfbGNkaWZfc2VscywgICAgQVJSQVlfU0laRShjc2lfbGNkaWZfc2VscykpOwotCWNsa3NbSU1YNlNMX0NMS19MQ0RJRl9BWElfU0VMXSAgICA9IGlteF9jbGtfbXV4KCJsY2RpZl9heGlfc2VsIiwgICAgYmFzZSArIDB4M2MsIDE0LCAyLCBjc2lfbGNkaWZfc2VscywgICAgQVJSQVlfU0laRShjc2lfbGNkaWZfc2VscykpOworCWNsa3NbSU1YNlNMX0NMS19DU0lfU0VMXSAgICAgICAgICA9IGlteF9jbGtfbXV4KCJjc2lfc2VsIiwgICAgICAgICAgYmFzZSArIDB4M2MsIDksICAyLCBjc2lfc2VscywgICAgICAgICAgQVJSQVlfU0laRShjc2lfc2VscykpOworCWNsa3NbSU1YNlNMX0NMS19MQ0RJRl9BWElfU0VMXSAgICA9IGlteF9jbGtfbXV4KCJsY2RpZl9heGlfc2VsIiwgICAgYmFzZSArIDB4M2MsIDE0LCAyLCBsY2RpZl9heGlfc2VscywgICAgQVJSQVlfU0laRShsY2RpZl9heGlfc2VscykpOwogCWNsa3NbSU1YNlNMX0NMS19VU0RIQzFfU0VMXSAgICAgICA9IGlteF9jbGtfZml4dXBfbXV4KCJ1c2RoYzFfc2VsIiwgYmFzZSArIDB4MWMsIDE2LCAxLCB1c2RoY19zZWxzLCAgICAgICAgQVJSQVlfU0laRSh1c2RoY19zZWxzKSwgIGlteF9jc2NtcjFfZml4dXApOwogCWNsa3NbSU1YNlNMX0NMS19VU0RIQzJfU0VMXSAgICAgICA9IGlteF9jbGtfZml4dXBf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BzZWNvbmQgICAgICAgICAgICAgICAgICovCi0JX191NjQgeHRpbWVfY2xvY2tfbnNlYzsgLyogS2VybmVsIHRpbWUgbmFub3NlY29uZCAgICAgICAgICAgICAqLwotCV9fdTY0IHd0b21fY2xvY2tfc2VjOyAgIC8qIFdhbGwgdG8gbW9ub3RvbmljIGNsb2NrIHNlY29uZCAgICAgKi8KLQlfX3U2NCB3dG9tX2Nsb2NrX25zZWM7ICAvKiBXYWxsIHRvIG1vbm90b25pYyBjbG9jayBuYW5vc2Vjb25kICovCisJc2VxY291bnRfdCB0el9zZXE7CS8qIFRpbWV6b25lIHNlcWxvY2sgICAgICAgICAgICAgICAgICAgKi8KKwlzZXFjb3VudF90IHRiX3NlcTsJLyogVGltZWJhc2Ugc2VxbG9jayAgICAgICAgICAgICAgICAgICAqLworCV9fdTY0IGN5Y2xlX2xhc3Q7ICAgICAgIC8qIFRPRCBjbG9jayBmb3IgeHRpbWUgICAgICAgICAgICAgICAgKi8KKwlfX3U2NCBtYXNrOyAgICAgICAgICAgICAvKiBDeWNsZSBtYXNrICAgICAgICAgICAgICAgICAgICAgICAgICovCiAJX191MzIgbXVsdDsgICAgICAgICAgICAgLyogQ3ljbGUgdG8gbmFub3NlY29uZCBtdWx0aXBsaWVyICAgICAqLwogCV9fdTMyIHNoaWZ0OyAgICAgICAgICAgIC8qIEN5Y2xlIHRvIG5hbm9zZWNvbmQgZGl2aXNvciAocG93ZXIgb2YgdHdvKSAqLworCV9fdTY0IHdhbGxfdGltZV9zZWM7CisJX191NjQgd2FsbF90aW1lX3Nuc2VjOworCV9fdTY0IG1vbm90b25pY190aW1lX3NlYzsKKwlfX3U2NCBtb25vdG9uaWNfdGltZV9zbnNlYzsKKwlfX3U2NCB3YWxsX3RpbWVfY29hcnNlX3NlYzsKKwlfX3U2NCB3YWxsX3RpbWVfY29hcnNlX25zZWM7CisJX191NjQgbW9ub3RvbmljX3RpbWVfY29hcnNlX3NlYzsKKwlfX3U2NCBtb25vdG9uaWNf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ucworI2RlZmluZSBzdGF0ZSAgIGFyZzEKKyNkZWZpbmUgam9iICAgICBhcmcyCisjZGVmaW5lIGxlbjIgICAgYXJnMgorCisjIGlkeCBtdXN0IGJlIGEgcmVnaXN0ZXIgbm90IGNsb2JiZXJlZCBieSBzaGExX3g4X2F2eDIKKyNkZWZpbmUgaWR4CQklcjgKKyNkZWZpbmUgRFdPUkRfaWR4CSVyOGQKKworI2RlZmluZSB1bnVzZWRfbGFuZXMgICAgJXJieAorI2RlZmluZSBsYW5lX2RhdGEgICAgICAgJXJieAorI2RlZmluZSB0bXAyICAgICAgICAgICAgJXJieAorI2RlZmluZSB0bXAyX3cJCSVlYngKKworI2RlZmluZSBqb2JfcmF4ICAgICAgICAgJXJheAorI2RlZmluZSB0bXAxICAgICAgICAgICAgJXJheAorI2RlZmluZSBzaXplX29mZnNldCAgICAgJXJheAorI2RlZmluZSB0bXAgICAgICAgICAgICAgJXJheAorI2RlZmluZSBzdGFydF9vZmZzZXQgICAgJXJheAorCisjZGVmaW5lIHRtcDMgICAgICAgICAgICAlYXJnMQorCisjZGVmaW5lIGV4dHJhX2Jsb2NrcyAgICAlYXJnMgorI2RlZmluZSBwICAgICAgICAgICAgICAgJWFyZzIKKworCisjIFNUQUNLX1NQQUNFIG5lZWRzIHRvIGJlIGFuIG9kZCBtdWx0aXBsZSBvZiA4CitfWE1NX1NBVkVfU0laRSAgPSAxMCoxNgorX0dQUl9TQVZFX1NJWkUgID0gOCo4CitfQUxJR05fU0laRSAgICAgPSA4CisKK19YTU1fU0FWRSAgICAgICA9IDAKK19HUFJfU0FWRSAgICAgICA9IF9YTU1fU0FWRSArIF9YTU1fU0FWRV9TSVpFCitTVEFDS19TUEFDRSAgICAgPSBfR1BSX1NBVkUgKyBfR1BSX1NBVkVfU0laRSArIF9BTElHTl9TSVpFCisKKy5tYWNybyBMQUJFTCBwcmVmaXggbgorXHByZWZpeFxuXCgpOgorLmVuZG0KKworLm1hY3JvIEpORV9TS0lQIGkKK2puZ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CitZTU1fU0FWRSA9ICgxNS0xNSkqMzIKK0ZSQU1FU1ogPSAzMioxNiArIFlNTV9TQVZFCitfWU1NICA9ICAgRlJBTUVTWiAtIFlNTV9TQVZFCisKKyNkZWZpbmUgVk1PVlBTICAgdm1vdnVwcworCitJRFggID0gJXJheAoraW5wMCA9ICVyOQoraW5wMSA9ICVyMTAKK2lucDIgPSAlcjExCitpbnAzID0gJXIxMgoraW5wNCA9ICVyMTMKK2lucDUgPSAlcjE0CitpbnA2ID0gJXIxNQoraW5wNyA9ICVyY3gKK2FyZzEgPSAlcmRpCithcmcyID0gJXJzaQorUlNQX1NBVkUgPSAlcmR4CisKKyMgeW1tMCBBCisjIHltbTEgQgorIyB5bW0yIEMKKyMgeW1tMyBECisjIHltbTQgRQorIyB5bW01ICAgICAgICAgRiAgICAgICBBQQorIyB5bW02ICAgICAgICAgVDAgICAgICBCQgorIyB5bW03ICAgICAgICAgVDEgICAgICBDQworIyB5bW04ICAgICAgICAgVDIgICAgICBERAorIyB5bW05ICAgICAgICAgVDMgICAgICBFRQorIyB5bW0xMCAgICAgICAgICAgICAgICBUNCAgICAgIFRNUAorIyB5bW0xMSAgICAgICAgICAgICAgICBUNSAgICAgIEZVTgorIyB5bW0xMiAgICAgICAgICAgICAgICBUNiAgICAgIEsKKyMgeW1tMTMgICAgICAgICAgICAgICAgVDcgICAgICBXMTQKKyMgeW1tMTQgICAgICAgICAgICAgICAgVDggICAgICBXMTUKKyMgeW1tMTUgICAgICAgICAgICAgICAgVDkgICAgICBXMTYKKworCitBICA9ICAgICAleW1tMAorQiAgPSAgICAgJXltbTEKK0MgID0gICAgICV5bW0yCitEICA9ICAgICAleW1tMworRSAgPSAgICAgJXltbTQKK0YgID0gICAgICV5bW01CitUMCA9CSAleW1tNgorVDEgPSAgICAgJXltbTcKK1QyID0gICAgICV5bW04CitUMyA9ICAgICAleW1tOQorVDQgPSAgICAgJXltbTEwCitUNSA9ICAgICAleW1tMTEKK1Q2ID0gICAgICV5bW0xMgorVDcgPSAgICAgJXltbTEzCitUOCAgPSAgICAgJXltbTE0CitUOSAgPSAgICAgJXltbTE1CisKK0FBICA9ICAgICAleW1tNQorQkIgID0gICAgICV5bW02CitDQyAgPSAgICAgJXltbTcKK0REICA9ICAgICAleW1tOAorRUUgID0gICAgICV5bW05CitUTVAgPSAgICAgJXltbTEwCitGVU4gPSAgICAgJXltbTExCitLICAgPSAgICAgJXltbTEyCitXMTQgPSAgICAgJXltbTEzCitXMTUgPSAgICAgJXltbTE0CitXMTYgPSAgICAgJXltbTE1CisKKy5tYWNybyBST1RBVEVfQVJHUworIFRNUF8gPSBFCisgRSA9IEQKKyBEID0gQworIEMgPSBCCisgQiA9IEEKKyBBID0gVE1QXworLmVuZG0KKworLm1hY3JvIFJPVEFURV9XCitUTVBfICA9IFcxNgorVzE2ICA9IFcxNQorVzE1ICA9IFcxNAorVzE0ICA9IFRNUF8KKy5lbmRtCisKKyMgOCBzdHJlYW1zIHggNSAzMmJpdCB3b3JkcyBwZXIgZGlnZXN0IHggNCBieXRlcyBwZXIgd29yZAorI2RlZmluZSBESUdFU1RfU0laRSAoOCo1KjQpCisKKy5hbGlnbiAzMgorCisjIHZvaWQgc2hhMV94OF9hdngyKHZvaWQgKippbnB1dF9kYXRhLCBVSU5UMTI4ICpkaWdlc3QsIFVJTlQzMiBzaXplKQorIyBhcmcgMSA6IHBvaW50ZXIgdG8gYXJyYXlbNF0gb2YgcG9pbnRlciB0byBpbnB1dCBkYXRhCisjIGFyZyAyIDogc2l6ZSAoaW4gYmxvY2tzKSA7OyBhc3N1bWVkIHRvIGJlID49IDEKKyMKK0VOVFJZKHNoYTFfeDhfYXZ4MikKKworCXB1c2gJUlNQX1NBVkUKKworCSNzYXZlIHJzcAorCW1vdgklcnNwLCBSU1BfU0FWRQorCXN1YiAgICAgJEZSQU1FU1osICVyc3AKKworCSNhbGlnbiByc3AgdG8gMzIgQnl0ZXMKKwlhbmQJJH4weDFGLCAlcnNwCisKKwkjIyBJbml0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b3cgICAgICAgICApCisJCV9fZmllbGQoICAgICAgICB1bnNpZ25lZCBpbnQsICAgdmNwdV9pZCAgICAgICAgICkKKwkJX19maWVsZCggICAgICAgICAgICAgICAgIGludCwgICAgICAgbmV3ICAgICAgICAgKQorCQlfX2ZpZWxkKCAgICAgICAgICAgICAgICAgaW50LCAgICAgICBvbGQgICAgICAgICApCisJKSwKKworCVRQX2Zhc3RfYXNzaWduKAorCQlfX2VudHJ5LT5ncm93ICAgICAgICAgICA9IGdyb3c7CisJCV9fZW50cnktPnZjcHVfaWQgICAgICAgID0gdmNwdV9pZDsKKwkJX19lbnRyeS0+bmV3ICAgICAgICAgICAgPSBuZXc7CisJCV9fZW50cnktPm9sZCAgICAgICAgICAgID0gb2xkOworCSksCisKKwlUUF9wcmludGsoInZjcHUgJXU6IHBsZV93aW5kb3cgJWQgKCVzICVkKSIsCisJICAgICAgICAgIF9fZW50cnktPnZjcHVfaWQsCisJICAgICAgICAgIF9fZW50cnktPm5ldywKKwkgICAgICAgICAgX19lbnRyeS0+Z3JvdyA/ICJncm93IiA6ICJzaHJpbmsiLAorCSAgICAgICAgICBfX2VudHJ5LT5vbGQpCispOworCisjZGVmaW5lIHRyYWNlX2t2bV9wbGVfd2luZG93X2dyb3codmNwdV9pZCwgbmV3LCBvbGQpIFwKKwl0cmFjZV9rdm1fcGxlX3dpbmRvdyh0cnVlLCB2Y3B1X2lkLCBuZXcsIG9sZCkKKyNkZWZpbmUgdHJhY2Vfa3ZtX3BsZV93aW5kb3dfc2hyaW5rKHZjcHVfaWQsIG5ldywgb2xkKSBcCisJdHJhY2Vfa3ZtX3BsZV93aW5kb3coZmFsc2UsIHZjcHVfaWQsIG5ldywgb2xkKQorCiAjZW5kaWYgLyogX1RSQUNFX0tWTV9IICovCiAKICN1bmRlZiBUUkFDRV9JTkNMVURFX1BBVEgKZGlmZiAtLWdpdCBhL2FyY2gveDg2L2t2bS92bXguYyBiL2FyY2gveDg2L2t2bS92bXguYwppbmRleCBiZmU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lbV90eXBlID09IDIgfHwgZXB0X21lbV90eXBlID09IDMgfHwKQEAgLTU2NzYsMTIgKzU3MDYsODUgQEAKIAlyZXR1cm4gcmV0OwogfQogCitzdGF0aWMgaW50IF9fZ3Jvd19wbGVfd2luZG93KGludCB2YWwpCit7CisJaWYgKHBsZV93aW5kb3dfZ3JvdyA8IDEpCisJCXJldHVybiBwbGVfd2luZG93OworCisJdmFsID0gbWluKHZhbCwgcGxlX3dpbmRvd19hY3R1YWxfbWF4KTsKKworCWlmIChwbGVfd2luZG93X2dyb3cgPCBwbGVfd2luZG93KQorCQl2YWwgKj0gcGxlX3dpbmRvd19ncm93OworCWVsc2UKKwkJdmFsICs9IHBsZV93aW5kb3dfZ3JvdzsKKworCXJldHVybiB2YWw7Cit9CisKK3N0YXRpYyBpbnQgX19zaHJpbmtfcGxlX3dpbmRvdyhpbnQgdmFsLCBpbnQgbW9kaWZpZXIsIGludCBtaW5pbXVtKQoreworCWlmIChtb2RpZmllciA8IDEpCisJCXJldHVybiBwbGVfd2luZG93OworCisJaWYgKG1vZGlmaWVyIDwgcGxlX3dpbmRvdykKKwkJdmFsIC89IG1vZGlmaWVyOworCWVsc2UKKwkJdmFsIC09IG1vZGlmaWVyOworCisJcmV0dXJuIG1heCh2YWwsIG1pbmltdW0pOworfQorCitzdGF0aWMgdm9pZCBncm93X3BsZV93aW5kb3coc3RydWN0IGt2bV92Y3B1ICp2Y3B1KQoreworCXN0cnVjdCB2Y3B1X3ZteCAqdm14ID0gdG9fdm14KHZjcHUpOworCWludCBvbGQgPSB2bXgtPnBsZV93aW5kb3c7CisKKwl2bXgtPnBsZV93aW5kb3cgPSBfX2dyb3dfcGxlX3dpbmRvdyhvbGQpOworCisJaWYgKHZteC0+cGxlX3dpbmRvdyAhPSBvbGQpCisJCXZteC0+cGxlX3dpbmRvd19kaXJ0eSA9IHRydWU7CisKKwl0cmFjZV9rdm1fcGxlX3dpbmRvd19ncm93KHZjcHUtPnZjcHVfaWQsIHZteC0+cG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ZSwgcmVhZF9yZWcsIHJvdywgYmFuaywgY29sLCBjcywgd2lkdGg7CisKKwlpZiAocmVnbWFwX3JlYWQobWNfdmJhc2UsIERSQU1BRERSV19PRlNULCAmcmVhZF9yZWcpIDwgMCkKKwkJcmV0dXJuIDA7CisKKwlpZiAocmVnbWFwX3JlYWQobWNfdmJhc2UsIERSQU1JRldJRFRIX09GU1QsICZ3aWR0aCkgPCAwKQorCQlyZXR1cm4gMDsKKworCWNvbCA9IChyZWFkX3JlZyAmIERSQU1BRERSV19DT0xCSVRfTUFTSykgPj4KKwkJRFJBTUFERFJXX0NPTEJJVF9TSElGVDsKKwlyb3cgPSAocmVhZF9yZWcgJiBEUkFNQUREUldfUk9XQklUX01BU0spID4+CisJCURSQU1BRERSV19ST1dCSVRfU0hJRlQ7CisJYmFuayA9IChyZWFkX3JlZyAmIERSQU1BRERSV19CQU5LQklUX01BU0spID4+CisJCURSQU1BRERSV19CQU5LQklUX1NISUZUOworCWNzID0gKHJlYWRfcmVnICYgRFJBTUFERFJXX0NTQklUX01BU0spID4+CisJCURSQU1BRERSV19DU0JJVF9TSElGVDsKKworCS8qIENvcnJlY3QgZm9yIEVDQyBhcyBpdHMgbm90IGFkZHJlc3NpYmxlICovCisJaWYgKHdpZHRoID09IERSQU1JRldJRFRIXzMyQl9FQ0MpCisJCXdpZHRoID0gMzI7CisJaWYgKHdpZHRoID09IERSQU1JRldJRFRIXzE2Ql9FQ0MpCisJCXdpZHRoID0gMTY7CisKKwkvKiBjYWxjdWxhdGUgdGhlIFNEUkFNIHNpemUgYmFzZSBvbiB0aGlzIGluZm8gKi8KKwlzaXplID0gMSA8PCAocm93ICsgYmFuayArIGNvbCk7CisJc2l6ZSA9IHNpemUgKiBjcyAqICh3aWR0aCAvIDgpOworCXJldHVybiBzaXplOworfQorCitzdGF0aWMgaW50IGFsdHJfc2RyYW1fcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldikKK3sKKwlzdHJ1Y3QgZWRh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QgKGMpIDIwMTQgRnJhbmsgUHJhem5payA8ZnJhbmsucHJhem5pa0BnbWFpbC5jb20+CiAgKi8KIAogLyoKQEAgLTE3Niw3ICsxNzcsNyBAQAogCTB4NzUsIDB4MDYsICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoNiksICAgICAgICAgICAgICAgICovCiAJMHg5NSwgMHgwMSwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KIAkweDE1LCAweDAwLCAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICAqLwotCTB4MjUsIDB4N0YsICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEyNyksICAgICAgICAgICovCisJMHgyNSwgMHgzRiwgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoNjMpLCAgICAgICAgICAgKi8KIAkweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwogCTB4MDUsIDB4MDEsICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgICAgICovCiAJMHgwOSwgMHgzMywgICAgICAgICAvKiAgICAgIFVzYWdlIChSeCksICAgICAgICAgICAgICAgICAgICAgKi8KQEAgLTIwMCwxNCArMjAxLDE0IEBACiAJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KIAkweDE5LCAweDQzLCAgICAgICAgIC8qICAgICAgVXNhZ2UgTWluaW11bSAoNDNoKSwgICAgICAgICAgICAqLwogCTB4MjksIDB4NDUsICAgICAgICAgLyogICAgICBVc2FnZSBNYXhpbXVtICg0NWgpLCAgICAgICAgICAgICovCi0JMHgxNiwgMHhGRiwgMHhCRiwgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoLTE2Mzg1KSwgICAgICAgKi8KLQkweDI2LCAweDAwLCAweDQwLCAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICgxNjM4NCksICAgICAgICAqLworCTB4MTYsIDB4MDAsIDB4RTAsICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKC04MTkyKSwgICAgICAgICovCisJMHgyNiwgMHhGRiwgMHgxRiwgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoODE5MSksICAgICAgICAgKi8KIAkweDk1LCAweDAzLCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLwogCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCiAJMHgwNiwgMHgwMCwgMHhGRiwgICAvKiAgICAgIFVzYWdlIFBhZ2UgKEZGMDBoKSwgICAgICAgICAgICAgKi8KIAkweDA5LCAweDIxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIxaCksICAgICAgICAgICAgICAgICAgICAqLwogCTB4MTUsIDB4MDAsICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCi0JMHgyNSwgMHhGRiwgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMjU1KSwgICAgICAgICAgKi8KKwkweDI2LCAweEZGLCAweDAwLCAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICgyNTUpLCAgICAgICAgICAqLwogCTB4NzUsIDB4MDgsICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgICAgICovCiAJMHg5NSwgMHgyNywgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMzkpLCAgICAgICAgICAgICAgKi8KIAkweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwpAQCAtMzk1LDExICszOTYsMTEgQEAKIAogLyoKICAqI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2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAgICAgKi8KQEAgLTUwOSw4ICs1MTAsOCBAQAogCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCiAJMHgxOSwgMHg0MywgICAgICAgICAvKiAgICAgIFVzYWdlIE1pbmltdW0gKDQzaCksICAgICAgICAgICAgKi8KIAkweDI5LCAweDQ1LCAgICAgICAgIC8qICAgICAgVXNhZ2UgTWF4aW11bSAoNDVoKSwgICAgICAgICAgICAqLwotCTB4MTYsIDB4RkYsIDB4QkYsICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKC0xNjM4NSksICAgICAgICovCi0JMHgyNiwgMHgwMCwgMHg0MCwgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTYzODQpLCAgICAgICAgKi8KKwkweDE2LCAweDAwLCAweEUwLCAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgtODE5MiksICAgICAgICAqLworCTB4MjYsIDB4RkYsIDB4MUYsICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDgxOTEpLCAgICAgICAgICovCiAJMHg5NSwgMHgwMywgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAgICAgKi8KIAkweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwogCTB4MDYsIDB4MDAsIDB4RkYsICAgLyogICAgICBVc2FnZSBQYWdlIChGRjAwaCksICAgICAgICAgICAgICovCkBAIC05MzUsMTIgKzkzNiwxMyBAQAogCWlmIChyZFszMF0gPj0gMHhlZSkgewogCQliYXR0ZXJ5X2NhcGFjaXR5ID0gMTAwOwogCQliYXR0ZXJ5X2NoYXJnaW5nID0gIShyZFszMF0gJiAweDAxKTsKKwkJY2FibGVfc3RhdGUgPSAxOwogCX0gZWxzZSB7CiAJCV9fdTggaW5kZXggPSBy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7CisJdTMyIGlycW5yID0gMDsKKwlpbnQgaGFuZGxlZF9pcnEgPSAwOworCWludCBpOworCisJZG8geworCQlmb3IgKGkgPSAwOyBpIDwgb21hcF9ucl9wZW5kaW5nOyBpKyspIHsKKwkJCWlycW5yID0gaW50Y19yZWFkbChJTlRDX1BFTkRJTkdfSVJRMCArICgweDIwICogaSkpOworCQkJaWYgKGlycW5yKQorCQkJCWdvdG8gb3V0OworCQl9CisKK291dDoKKwkJaWYgKCFpcnFucikKKwkJCWJyZWFrOworCisJCWlycW5yID0gaW50Y19yZWFkbChJTlRDX1NJUik7CisJCWlycW5yICY9IEFDVElWRUlSUV9NQVNLOworCisJCWlmIChpcnFucikgeworCQkJaXJxbnIgPSBpcnFfZmluZF9tYXBwaW5nKGRvbWFpbiwgaXJxbnIpOworCQkJaGFuZGxlX0lSUShpcnFuciwgcmVncyk7CisJCQloYW5kbGVkX2lycSA9IDE7CisJCX0KKwl9IHdoaWxlIChpcnFucik7CisKKwkvKgorCSAqIElmIGFuIGlycSBpcyBtYXNrZWQgb3IgZGVhc3NlcnRlZCB3aGlsZSBhY3RpdmUsIHdlIHdpbGwKKwkgKiBrZWVwIGVuZGluZyB1cCBoZXJlIHdpdGggbm8gaXJxIGhhbmRsZWQuIFNvIHJlbW92ZSBpdCBmcm9tCisJICogdGhlIElOVEMgd2l0aCBhbiBhY2suCisJICovCisJaWYgKCFoYW5kbGVkX2lycSkKKwkJb21hcF9hY2tfaXJxKE5VTEwpOworfQorCit2b2lkIF9faW5pdCBvbWFwMl9pbml0X2lycSh2b2lkKQoreworCW9tYXBfbnJfaXJxcyA9IDk2OworCW9tYXBfbnJfcGVuZGluZyA9IDM7CisJb21hcF9pbml0X2lycShPTUFQMjRYWF9JQ19CQVNFLCBOVUxMKTsKKwlzZXRfaGFuZGxlX2lycShvbWFwX2ludGNfaGFuZGxlX2lycSk7Cit9CisKK3ZvaWQgX19pbml0IG9tYXAzX2luaXRfaXJxKHZvaWQpCit7CisJb21hcF9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gICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuaW9fcmVnID0gMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl9jZmdfcmVnID0gMCwgICAgICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl9zdGF0dXNfcmVnID0gMCwgICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl90YXJnZXRfcmVnID0gMCwgICAgICAgICAgICAgICAgICAgXAorCQkubXV4X2JpdCA9IC0xLCAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkucHVsbF9iaXQgPSBwdWxsLCAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuZHJ2X2JpdCA9IGRydiwgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkub2VfYml0ID0gLTEsICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuaW5fYml0ID0gLTEsICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkub3V0X2JpdCA9IC0xLCAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl9lbmFibGVfYml0ID0gLTEsICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl9zdGF0dXNfYml0ID0gLTEsICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl90YXJnZXRfYml0ID0gLTEsICAgICAgICAgICAgICAgICAgXAorCQkuaW50cl90YXJnZXRfa3Bzc192YWwgPSAtMSwJCVwKKwkJLmludHJfcmF3X3N0YXR1c19iaXQgPSAtMSwgICAgICAgICAgICAgIFwKKwkJLmludHJfcG9sYXJpdHlfYml0ID0gLTEsICAgICAgICAgICAgICAgIFwKKwkJLmludHJfZGV0ZWN0aW9uX2JpdCA9IC0xLCAgICAgICAgICAgICAgIFwKKwkJLmludHJfZGV0ZWN0aW9uX3dpZHRoID0gLTEsICAgICAgICAgICAgIFwKKwl9CisKK2VudW0gYXBxODA4NF9mdW5jdGlvbnMgeworCUFQUV9NVVhfYWRzcF9leHQsCisJQVBRX01VWF9hdWRpb19yZWYsCisJQ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sIE9DUCBhbmQgU1MgKi8KKwlpbnQgcmVxdWVzdF9sZW47Cit9OworCisjZGVmaW5lIEZPUkNFX01PREVfSVNfMl9CSVRTKHJlZykgXAorCSgoKHJlZyktPnBhcnRzLT5mbS5tYXNrID4+IChyZWcpLT5wYXJ0cy0+Zm0uc2hpZnQpID09IDMpCisKK3N0cnVjdCBxY29tX3JwbV9yZWcgeworCXN0cnVjdCBxY29tX3JwbSAqcnBtOworCisJc3RydWN0IG11dGV4IGxvY2s7CisJc3RydWN0IGRldmljZSAqZGV2OworCXN0cnVjdCByZWd1bGF0b3JfZGVzYyBkZXNjOworCWNvbnN0IHN0cnVjdCBycG1fcmVnX3BhcnRzICpwYXJ0czsKKworCWludCByZXNvdXJjZTsKKwl1MzIgdmFsW01BWF9SRVFVRVNUX0xFTl07CisKKwlpbnQgdVY7CisJaW50IGlzX2VuYWJsZWQ7CisKKwlib29sIHN1cHBvcnRzX2ZvcmNlX21vZGVfYXV0bzsKKwlib29sIHN1cHBvcnRzX2ZvcmNlX21vZGVfYnlwYXNzOworfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBycG1fcmVnX3BhcnRzIHJwbTg2NjBfbGRvX3BhcnRzID0geworCS5yZXF1ZXN0X2xlbiAgICA9IDIsCisJLm1WICAgICAgICAgICAgID0geyAwLCAweDAwMDAwRkZGLCAgMCB9LAorCS5pcCAgICAgICAgICAgICA9IHsgMCwgMHgwMEZGRjAwMCwgMTIgfSwKKwkuZm0gICAgICAgICAgICAgPSB7IDAsIDB4MDMwMDAwMDAsIDI0IH0sCisJLnBjICAgICAgICAgICAgID0geyAwLCAweDNDMDAwMDAwLCAyNiB9LAorCS5wZiAgICAgICAgICAgICA9IHsgMCwgMHhDMDAwMDAwMCwgMzAgfSwKKwkucGQgICAgICAgICAgICAgPSB7IDEsIDB4MDAwMDAwMDEsICAwIH0sCisJLmlhICAgICAgICAgICAgID0geyAxLCAweDAwMDAxRkZFLCAgMSB9LAorfTsKKworc3RhdGljIGN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ZW4gICAgPSAxLAorCS5tViAgICAgICAgICAgICA9IHsgMCwgMHgwMDAwMEZGRiwgIDAgfSwKKwkuZW5hYmxlX3N0YXRlICAgPSB7IDAsIDB4MDAwMDEwMDAsIDEyIH0sCisJLmNvbXBfbW9kZSAgICAgID0geyAwLCAweDAwMDAyMDAwLCAxMyB9LAorCS5mcmVxICAgICAgICAgICA9IHsgMCwgMHgwMDNGQzAwMCwgMTQgfSwKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgcnBtX3JlZ19wYXJ0cyBycG04OTYwX2xkb19wYXJ0cyA9IHsKKwkucmVxdWVzdF9sZW4gICAgPSAyLAorCS51ViAgICAgICAgICAgICA9IHsgMCwgMHgwMDdGRkZGRiwgIDAgfSwKKwkucGQgICAgICAgICAgICAgPSB7IDAsIDB4MDA4MDAwMDAsIDIzIH0sCisJLnBjICAgICAgICAgICAgID0geyAwLCAweDBGMDAwMDAwLCAyNCB9LAorCS5wZiAgICAgICAgICAgICA9IHsgMCwgMHhGMDAwMDAwMCwgMjggfSwKKwkuaXAgICAgICAgICAgICAgPSB7IDEsIDB4MDAwMDAzRkYsICAwIH0sCisJLmlhICAgICAgICAgICAgID0geyAxLCAweDAwMEZGQzAwLCAxMCB9LAorCS5mbSAgICAgICAgICAgICA9IHsgMSwgMHgwMDcwMDAwMCwgMjAgfSwKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgcnBtX3JlZ19wYXJ0cyBycG04OTYwX3NtcHNfcGFydHMgPSB7CisJLnJlcXVlc3RfbGVuICAgID0gMiwKKwkudVYgICAgICAgICAgICAgPSB7IDAsIDB4MDA3RkZGRkYsICAwIH0sCisJLnBkICAgICAgICAgICAgID0geyAwLCAweDAwODAwMDAwLCAyMyB9LAorCS5wYyAgICAgICAgICAgICA9IHsgMCwgMHgwRjAwMDAwMCwgMjQgfSwKKwkucGYgICAgICAgICAgICAgPSB7IDAsIDB4RjAwMDAwMDAsIDI4IH0sCisJLmlwICAgICAgICAgICA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KKworc3RhdGljIGludCBycG1fcmVnX21WX2Rpc2FibGUoc3RydWN0IHJlZ3VsYXRvcl9kZXYgKnJkZXYpCit7CisJc3RydWN0IHFjb21fcnBtX3JlZyAqdnJlZyA9IHJkZXZfZ2V0X2RydmRhdGEocmRldik7CisJY29uc3Qgc3RydWN0IHJwbV9yZWdfcGFydHMgKnBhcnRzID0gdnJlZy0+cGFydHM7CisJY29uc3Qgc3RydWN0IHJlcXVlc3RfbWVtYmVyICpyZXEgPSAmcGFydHMtPm1WOworCWludCByZXQ7CisKKwlpZiAocmVxLT5tYXNrID09IDApCisJCXJldHVybiAtRUlOVkFMOworCisJbXV0ZXhfbG9jaygmdnJlZy0+bG9jayk7CisJcmV0ID0gcnBtX3JlZ193cml0ZSh2cmVnLCByZXEsIDApOworCWlmICghcmV0KQorCQl2cmVnLT5pc19lbmFibGVkID0gMDsKKwltdXRleF91bmxvY2soJnZyZWctPmxvY2spOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBycG1fcmVnX3VWX2Rpc2FibGUoc3RydWN0IHJlZ3VsYXRvcl9kZXYgKnJkZXYpCit7CisJc3RydWN0IHFjb21fcnBtX3JlZyAqdnJlZyA9IHJkZXZfZ2V0X2RydmRhdGEocmRldik7CisJY29uc3Qgc3RydWN0IHJwbV9yZWdfcGFydHMgKnBhcnRzID0gdnJlZy0+cGFydHM7CisJY29uc3Qgc3RydWN0IHJlcXVlc3RfbWVtYmVyICpyZXEgPSAmcGFydHMtPnVWOworCWludCByZXQ7CisKKwlpZiAocmVxLT5tYXNrID09IDApCisJCXJldHVybiAtRUlOVkFMOworCisJbXV0ZXhfbG9jaygmdnJlZy0+bG9jayk7CisJcmV0ID0gcnBtX3JlZ193cml0ZSh2cmVnLCByZXEsIDApOworCWlmICghcmV0KQorCQl2cmVnLT5pc19lbmFibGVkID0gMDsKKwltdXRleF91bmxvY2soJnZyZWctPmxvY2spOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBycG1f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ODAKICAjZW5kaWYKKyNpZm5kZWYgUENJX0RFVklDRV9JRF9BUkVDQV8xMjE0CisJI2RlZmluZSBQQ0lfREVWSUNFX0lEX0FSRUNBXzEyMTQJMHgxMjE0CisjZW5kaWYKIC8qCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqKgpAQCAtMTAwLDEwICsxMDcsMTEgQEAKICoqICAgICAgICBJT1AgTWVzc2FnZSBUcmFuc2ZlciBEYXRhIGZvciB1c2VyIHNwYWNlCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqLworI2RlZmluZQlBUkNNU1JfQVBJX0RBVEFfQlVGTEVOCTEwMzIKIHN0cnVjdCBDTURfTUVTU0FHRV9GSUVMRAogewogICAgIHN0cnVjdCBDTURfTUVTU0FHRQkJCWNtZG1lc3NhZ2U7Ci0gICAgdWludDhfdAkJCQltZXNzYWdlZGF0YWJ1ZmZlclsxMDMyXTsKKyAgICB1aW50OF90CQkJCW1lc3NhZ2VkYXRhYnVmZmVyW0FSQ01TUl9BUElfREFUQV9CVUZMRU5dOwogfTsKIC8qIElPUCBtZXNzYWdlIHRyYW5zZmVyICovCiAjZGVmaW5lIEFSQ01TUl9NRVNTQUdFX0ZBSUwJCQkweDAwMDEKQEAgLTMzNyw2ICszNDUsNTYgQEAKICNkZWZpbmUgQVJDTVNSX0hCQ01VX01FU1NBR0VfRklSTVdBUkVfT0sJCQkweDgwMDAwMDAwCiAvKgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiogICAgICAgICAgICAgICAgU1BFQy4gZm9yIEFyZWNhIFR5cGUgRCBhZGFwdGVyCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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ICAgQVJFQ0EgU0NTSSBDT01NQU5EIERFU0NSSVBUT1IgQkxPQ0sgc2l6ZSAweDFGOCAoNTA0KQogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKi8KQEAgLTM1Nyw3ICs0MTUsNyBAQAogI2RlZmluZSBBUkNNU1JfQ0RCX0ZMQUdfT1JERVJFRFEgICAgICAgICAgIDB4MTAKIAogCXVpbnQ4X3QJCQkJCQkJbXNnUGFnZXM7Ci0JdWludDMyX3QJCQkJCQlDb250ZXh0OworCXVpbnQzMl90CQkJCQkJbXNnQ29udGV4dDsKIAl1aW50MzJfdAkJCQkJCURhdGFMZW5ndGg7CiAJdWludDhfdAkJCQkJCQlDZGJbMTZdOwogCXVpbnQ4X3QJCQkJCQkJRGV2aWNlU3RhdHVzOwpAQCAtNDk0LDYgKzU1Miw1NiBAQAogCXVpbnQzMl90CW1zZ2NvZGVfcndidWZmZXJbMjU2XTsJCQkvKjIyMDAgMjNGRiovCiB9OwogLyoKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiogICAgIE1lc3NhZ2luZyBVbml0IChNVSkgb2YgVHlwZSBEIHByb2Nlc3NvcgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqLworc3RydWN0IEluQm91bmRfU1JCIHsKKwl1aW50MzJfdCBhZGRyZXNzTG93OyAvKiBwb2ludGVyIHRvIFNSQiBibG9jayAqLworCXVpbnQzMl90IGFkZHJlc3NIaWdoOworCXVpbnQzMl90IGxlbmd0aDsgLyogaW4gRFdPUkRzICovCisJdWludDMyX3QgcmVzZXJ2ZWQwOworfTsKKworc3RydWN0IE91dEJvdW5kX1NSQiB7CisJdWludDMyX3QgYWRkcmVzc0xvdzsgLyogcG9pbnRlciB0byB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LmMKQEAgLTIsMTEgKzIsMTAgQEAKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICoqICAgICAgICBPLlMgICA6IExpbnV4CiAqKiAgIEZJTEUgTkFNRSAgOiBhcmNtc3JfaGJhLmMKLSoqICAgICAgICBCWSAgICA6IE5pY2sgQ2hlbmcKLSoqICAgRGVzY3JpcHRpb246IFNDU0kgUkFJRCBEZXZpY2UgRHJpdmVyIGZvcgotKiogICAgICAgICAgICAgICAgQVJFQ0EgUkFJRCBIb3N0IGFkYXB0ZXIKKyoqICAgICAgICBCWSAgICA6IE5pY2sgQ2hlbmcsIEMuTC4gSHVhbmcKKyoqICAgRGVzY3JpcHRpb246IFNDU0kgUkFJRCBEZXZpY2UgRHJpdmVyIGZvciBBcmVjYSBSQUlEIENvbnRyb2xsZXIKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqIENvcHlyaWdodCAoQykgMjAwMiAtIDIwMDUsIEFyZWNhIFRlY2hub2xvZ3kgQ29ycG9yYXRpb24gQWxsIHJpZ2h0cyByZXNlcnZlZAorKiogQ29weXJpZ2h0IChDKSAyMDAyIC0gMjAxNCwgQXJlY2EgVGVjaG5vbG9neSBDb3Jwb3JhdGlvbiBBbGwgcmlnaHRzIHJlc2VydmVkCiAqKgogKiogICAgIFdlYiBzaXRlOiB3d3cuYXJlY2EuY29tLnR3CiAqKiAgICAgICBFLW1haWw6IHN1cHBvcnRAYXJlY2EuY29tLnR3CkBAIC01OSw2ICs1OCw3IEBACiAjaW5jbHVkZSA8bGludXgvc2xhYi5oPgogI2luY2x1ZGUgPGxpbnV4L3BjaS5oPgogI2luY2x1ZGUgPGxpbnV4L2Flci5oPgorI2luY2x1ZGUgPGxpbnV4L2NpcmNfYnVmLmg+CiAjaW5jbHVkZSA8YXNtL2R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l1MzIgICAgICAgICBtYXhMZDsKKwkJdTMyICAgICAgICAgbWF4U3BhbkRlcHRoOworCQl1MzIgICAgICAgICBtYXhSb3dTaXplOworCQl1MzIgICAgICAgICBtYXhQZENvdW50OworCQl1MzIgICAgICAgICBtYXhBcnJheXM7CisJfSB2YWxpZGF0aW9uSW5mbzsKKwl1MzIgICAgICAgICAgICAgdmVyc2lvbls1XTsKKwl9OworCisJdTggICAgICAgICAgICAgICAgICBmcFBkSW9UaW1lb3V0U2VjOworCXU4ICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQyWzddOworCisJdTE2ICAgICAgICAgICAgICAgICBsZENvdW50OworCXUxNiAgICAgICAgICAgICAgICAgYXJDb3VudDsKKwl1MTYgICAgICAgICAgICAgICAgIHNwYW5Db3VudDsKKwl1MTYgICAgICAgICAgICAgICAgIHJlc2VydmUzOworCisJc3RydWN0IE1SX0RFVl9IQU5ETEVfSU5GTyAgZGV2SG5kbEluZm9bTUFYX1JBSURNQVBfUEhZU0lDQUxfREVWSUNFU107CisJdTggICAgICAgICAgICAgICAgICBsZFRndElkVG9MZFtNQVhfTE9HSUNBTF9EUklWRVNfRVhUXTsKKwlzdHJ1Y3QgTVJfQVJSQVlfSU5GTyAgICAgICBhck1hcEluZm9bTUFYX0FQSV9BUlJBWVNfRVhUXTsKKwlzdHJ1Y3QgTVJfTERfU1BBTl9NQVAgICAgICBsZFNwYW5NYXBbTUFYX0xPR0lDQUxfRFJJVkVTX0VYVF07Cit9OworCiBzdHJ1Y3QgZnVzaW9uX2NvbnRleHQgewogCXN0cnVjdCBtZWdhc2FzX2NtZF9mdXNpb24gKipjbWRfbGlzdDsKIAlzdHJ1Y3QgbGlzdF9oZWFkIGNtZF9wb29sOwogCi0Jc3BpbmxvY2tfdCBjbWRfcG9vbF9sb2NrOworCXNwaW5sb2NrX3QgbXB0X3Bvb2xfbG9jazsKIAogCWRtYV9hZGRyX3QgcmVxX2ZyYW1lc19kZXNjX3BoeXM7CiAJdTggKnJ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kZWZpbmUgTVBJMl9JT1VOSVRQQUdFNV9ETUFfQ0FQX01BU0tfTUFYX1JFUVVFU1RTICAgICAgKDB4RkZGRjAwMDApCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTVfRE1BX0NBUF9TSElGVF9NQVhfUkVRVUVTVFMgICAgICgxNikKIAogI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U1X0RNQV9DQVBfRUVEUCAgICAgICAgICAgICAgICAgICAoMHgwMDA4KQpAQCAtODg1LDEzICs4OTIsMTcgQEAKICAgICBVMTYgICAgICAgICAgICAgICAgICAgICBJT0NUZW1wZXJhdHVyZTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogMHgxMCAqLwogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIElPQ1RlbXBlcmF0dXJlVW5pdHM7ICAgICAgICAgICAgICAgICAgICAvKiAweDEyICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgSU9DU3BlZWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTMgKi8KLQlVMTYgICAgICAgICAgICAgICAgICAgICBCb2FyZFRlbXBlcmF0dXJlOyAgICAgICAgICAgICAgLyogMHgxNCAqLwotCVU4ICAgICAgICAgICAgICAgICAgICAgIEJvYXJkVGVtcGVyYXR1cmVVbml0czsgICAgICAgICAvKiAweDE2ICovCi0JVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTcgKi8KKwlVMTYgICAgICAgICAgICAgICAgICAgICBCb2FyZFRlbXBlcmF0dXJlOwkJICAgIC8qIDB4MTQgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBCb2FyZFRlbXBlcmF0dXJlVW5pdHM7CQkgICAgLyogMHgxNiAqLworCVU4ICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMzsJCQkgICAgLyogMHgxNyAqLworCVUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTggKi8KKwlVMzIgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDU7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDFDICovCisJVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMHgyMCAqLworCVUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNzsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MjQgKi8KIH0gTVBJMl9DT05GSUdfUEFHRV9JT19VTklUXzcsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9DT05GSUdfUEFHRV9JT19VTklUXzcsCiAgIE1waTJJT1VuaXRQYWdlN190LCBNUEkyX1BPSU5URVIgcE1waTJJT1VuaXRQYWdlN190OwogCi0jZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfUEFHRVZFUlNJT04gICAgICAgICAgICAgICAgICAgICgweDAyKQorI2RlZmluZSBNUEkyX0lPVU5JVFBBR0U3X1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgICAoMHgwNCkKIAogLyogZGVmaW5lcyBmb3IgSU8gVW5pdCBQYWdlIDcgUENJZVdpZHRoIGZpZWxkICovCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTdfUENJRV9XSURUSF9YMSAgICAgICAgICAgICAgKDB4MDEpCkBAIC0xODAxLDYgKzE4MTIsNyBAQAogI2RlZmluZSBNUEkyX1NBU19QUkFURV9NQVhfUkFURV8xXzUgICAgICAgICAgICAgICAgICAgICAoMHg4MCkKICNkZWZpbmUgTVBJMl9TQVNfUFJBVEVfTUFYX1JBVEVfM18wICAgICAgICAgICAgICAgICAgICAgKDB4OTApCiAjZGVmaW5lIE1QSTJfU0FTX1BSQVRFX01BWF9SQVRFXzZfMCAgICAgICAgICAgICAgICAgICAgICgweEEwKQorI2RlZmluZSBNUEkyNV9TQVNfUFJBVEVfTUFYX1JBVEVfMTJfMCAgICAgICAgICAgICAgICAgICAoMHhCMCkKICNkZWZpbmUgTVBJMl9TQVNfUFJBVEVfTUlOX1JBVEVfTUFTSyAgICAgICAgICAgICAgICAgICAgKDB4MEYpCiAjZGVmaW5lIE1QSTJfU0FTX1BSQVRFX01JTl9SQVRFX05PVF9QUk9HUkFNTUFCTEUgICAgICAgICgweDAwKQogI2RlZmluZSBNUEkyX1NBU19QUkFURV9NSU5fUkFURV8xXzUgICAgICAgICAgICAgICAgICAgICAoMHgwOCkKQEAgLTE4MTMsNiArMTgyNSw3IEBACiAjZGVmaW5lIE1QSTJfU0FTX0hXUkFURV9NQVhfUkFURV8xXzUgICAgICAgICAgICAgICAgICAgICgweDgwKQogI2RlZmluZSBNUEkyX1NBU19IV1JBVEVfTUFYX1JBVEVfM18wICAgICAgICAgICAgICAgICAgICAoMHg5MCkKICNkZWZpbmUgTVBJMl9TQVNfSFdSQVRFX01BWF9SQVRFXzZfMCAgICAgICAgICAgICAgICAgICAgKDB4QTApCisjZGVmaW5lIE1QSTI1X1NBU19IV1JBVEVfTUFYX1JBVEVfMTJfMCAgICAgICAgICAgICAgICAgICgweEIwKQogI2RlZmluZSBNUEkyX1NBU19IV1JBVEVfTUlOX1JBVEVfTUFTSyAgICAgICAgICAgICAgICAgICAoMHgwRikKICNkZWZpbmUgTVBJMl9TQVNfSFdSQVRFX01JTl9SQVRFXzFfNSAgICAgICAgICAgICAgICAgICAgKDB4MDgpCiAjZGVmaW5lIE1QSTJfU0FTX0hXUkFURV9NSU5fUkFURV8zXzAgICAgICAgICAgICAgICAgICAgICgweDA5KQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL21wdDJzYXMvbXBpL21waTJfaW5pdC5oIGIvZHJpdmVycy9zY3NpL21wdDJzYXMvbXBpL21waTJfaW5pdC5oCmluZGV4IDlkMjg0ZGEuLmVlYTFhMTYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgKi8KIApAQCAtMjM0LDcgKzIzNiw3IEBACiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgU2Vuc2VDb3VudDsgICAgICAgICAgICAgICAgICAgICAvKiAweDE4ICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzcG9uc2VJbmZvOyAgICAgICAgICAgICAgICAgICAvKiAweDFDICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgVGFza1RhZzsgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDIwICovCi0gICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ0OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDIyICovCisJVTE2ICAgICAgICAgICAgICAgICAgICAgU0NTSVN0YXR1c1F1YWxpZmllcjsJICAgICAvKiAweDIyICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgQmlkaXJlY3Rpb25hbFRyYW5zZmVyQ291bnQ7ICAgICAvKiAweDI0ICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ1OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDI4ICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDJDICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbXB0MnNhcy9tcGkvbXBpMl9pb2MuaCBiL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCmluZGV4IGQxNTljNWYuLjJjM2IwZjIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCisrKyBiL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCkBAIC0xLDEyICsxLDEyIEBACiAvKgotICogIENvcHlyaWdodCAoYykgMjAwMC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MgZm9yIEhhc2hBbGdvcml0aG0gKi8KKyNkZWZpbmUgTVBJMjVfSEFTSF9BTEdPUklUSE1fVU5VU0VEICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUEkyNV9IQVNIX0FMR09SSVRITV9TSEEyNTYgICAgICAgICAgICAgKDB4MDEpCisKKy8qIHZhbHVlcyBmb3IgRW5jcnlwdGlvbkFsZ29yaXRobSAqLworI2RlZmluZSBNUEkyNV9FTkNSWVBUSU9OX0FMR19VTlVTRUQgICAgICAgICAgICAgKDB4MDApCisjZGVmaW5lIE1QSTI1X0VOQ1JZUFRJT05fQUxHX1JTQTI1NiAgICAgICAgICAgICAoMHgwMSkKKwordHlwZWRlZiBzdHJ1Y3QgX01QSTI1X0VOQ1JZUFRFRF9IQVNIX0RBVEEgeworCVU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW1hZ2VWZXJzaW9uOyAgICAgICAgICAgLyogMHgwMCAqLworCVU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTnVtSGFzaDsgICAgICAgICAgICAgICAgLyogMHgwMSAqLworCVUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgLyogMHgwMiAqLworCVUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQyOyAgICAgICAgICAgICAgLyogMHgwNCAqLworCU1QSTI1X0VOQ1JZUFRFRF9IQVNIX0VOVFJZICAgICAgRW5jcnlwdGVkSGFzaEVudHJ5WzFdOyAgLyogMHgwOCAqLworfSBNUEkyNV9FTkNSWVBURURfSEFTSF9EQVRBLCBNUEkyX1BPSU5URVIgUFRSX01QSTI1X0VOQ1JZUFRFRF9IQVNIX0RBVEEsCitNcGkyNUVuY3J5cHRlZEhhc2hEYXRhX3QsIE1QSTJfUE9JTlRFUiBwTXBpMjVFbmNyeXB0ZWRIYXNoRGF0YV90OworCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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pb246ICAwMi4wMC4xMAorICogICAgbXBpMl90b29sLmggVmVyc2lvbjogIDAyLjAwLjExCiAgKgogICogIFZlcnNpb24gSGlzdG9yeQogICogIC0tLS0tLS0tLS0tLS0tLQpAQCAtMjksNiArMjksNyBAQAogICogICAgICAgICAgICAgICAgICAgICAgTVBJMl9UT09MQk9YX0lTVFdJX1JFQURfV1JJVEVfUkVRVUVTVC4KICAqICAwNy0yNi0xMiAgMDIuMDAuMTAgIE1vZGlmaWVkIE1QSTJfVE9PTEJPWF9ESUFHTk9TVElDX0NMSV9SRVFVRVNUIHNvIHRoYXQKICAqCQkJaXQgdXNlcyBNUEkgQ2hhaW4gU0dFIGFzIHdlbGwgYXMgTVBJIFNpbXBsZSBTR0UuCisgKiAwOC0xOS0xMyAgMDIuMDAuMTEgIEFkZGVkIE1QSTJfVE9PTEJPWF9URVhUX0RJU1BMQVlfVE9PTCBhbmQgcmVsYXRlZCBpbmZvLgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgKi8KIApAQCAtNDgsNiArNDksNyBAQAogI2RlZmluZSBNUEkyX1RPT0xCT1hfSVNUV0lfUkVBRF9XUklURV9UT09MICAgICAgICAgICgweDAzKQogI2RlZmluZSBNUEkyX1RPT0xCT1hfQkVBQ09OX1RPT0wgICAgICAgICAgICAgICAgICAgICgweDA1KQogI2RlZmluZSBNUEkyX1RPT0xCT1hfRElBR05PU1RJQ19DTElfVE9PTCAgICAgICAgICAgICgweDA2KQorI2RlZmluZSBNUEkyX1RPT0xCT1hfVEVYVF9ESVNQTEFZX1RPT0wgICAgICAgICAgICAgICgweDA3KQogCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0zMjEsNiArMzIzLDQ0IEBACiAgIE1QSTJfUE9JTlRFUiBwTXBpMlRvb2xib3hEaWFnbm9zdGljQ2xpUmVwbHlfdDsKIAogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgVG9vbGJveCBDb25zb2xlIFRleHQgRGlzcGxheSBUb29sCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBUb29sYm94IENvbnNvbGUgVGV4dCBEaXNwbGF5IFRvb2wgcmVxdWVzdCBtZXNzYWdlICovCit0eXBlZGVmIHN0cnVjdCBfTVBJMl9UT09MQk9YX1RFWFRfRElTUExBWV9SRVFVRVNUIHsKKwlVOCAgICAgICAgICAgICAgICAgICAgICBUb29sOyAgICAgICAgICAgICAgIC8qIDB4MDAgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDE7ICAgICAgICAgIC8qIDB4MDEgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBDaGFpbk9mZnNldDsgICAgICAgIC8qIDB4MDIgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBGdW5jdGlvbjsgICAgICAgICAgIC8qIDB4MDMgKi8KKwlVMTYgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgIC8qIDB4MDQgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDM7ICAgICAgICAgIC8qIDB4MDYgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBNc2dGbGFnczsgICAgICAgICAgIC8qIDB4MDcgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBWUF9JRDsgICAgICAgICAgICAgIC8qIDB4MDggKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBWRl9JRDsgICAgICAgICAgICAgIC8qIDB4MDkgKi8KKwlVMTYgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgIC8qIDB4MEEgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBDb25zb2xlOyAgICAgICAgICAgIC8qIDB4MEMgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgIC8qIDB4MEQgKi8KKwlVMTYgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDY7ICAgICAgICAgIC8qIDB4MEUgKi8KKwlVOCAgICAgICAgICAgICAgICAgICAgICBUZXh0VG9EaXNwbGF5WzRdOyAgIC8qIDB4MTAgKi8KK30gTVBJMl9UT09MQk9YX1RFWFRfRElTUExBWV9SRVFVRVNULAorTVBJMl9QT0lOVEVSIFBUUl9NUEkyX1RPT0xCT1hfVEVYVF9ESVNQTEFZX1JFUVVFU1QsCitNcGkyVG9vbGJveFRleHREaXNwbGF5UmVxdWVzdF90LAorTVBJMl9QT0lOVEVSIHBNcGkyVG9vbGJveFRleHREaXNwbGF5UmVxdWVzdF90OworCisvKiBkZWZpbmVzIGZvciB0aGUgQ29uc29sZSBmaWVsZCAqLworI2RlZmluZSBNUEkyX1RPT0xCT1hfQ09OU09MRV9UWVBFX01BU0sgICAgICAgICAgKDB4RjApCisjZGVmaW5lIE1QSTJfVE9PTEJPWF9DT05TT0xFX1RZUEVfREVGQVVMVCAgICAgICAoMHgwMCkKKyNkZWZpbmUgTVBJMl9UT09MQk9YX0NPTlNPTEVfVFlQRV9VQVJUICAgICAgICAgICgweDEwKQorI2RlZmluZSBNUEkyX1RPT0xCT1hfQ09OU09MRV9UWVBFX0VUSEVSTkVUICAgICAgKDB4MjApCisKKyNkZWZpbmUgTVBJMl9UT09MQk9YX0NPTlNPTEVfTlVNQkVSX01BU0sgICAgICAgICgweDBGKQorCisvKiBkZWZpbmVzIGZvciB0aGUgRmxhZ3MgZmllbGQgKi8KKyNkZWZpbmUgTVBJMl9UT09MQk9YX0NPTlNPTEVfRkxBR19USU1FU1RBTVAgICAgICgweDAxKQorCisKK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EkyX1RPT0xCT1hfSVNUV0lfUkVBRF9XUklURV9UT09MICAgICAgICAgICgweDAzKQogI2RlZmluZSBNUEkyX1RPT0xCT1hfQkVBQ09OX1RPT0wgICAgICAgICAgICAgICAgICAgICgweDA1KQogI2RlZmluZSBNUEkyX1RPT0xCT1hfRElBR05PU1RJQ19DTElfVE9PTCAgICAgICAgICAgICgweDA2KQorI2RlZmluZSBNUEkyX1RPT0xCT1hfVEVYVF9ESVNQTEFZX1RPT0wgICAgICAgICAgICAgICgweDA3KQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiBUb29sYm94IHJlcGx5CkBAIC0zMzEsNiArMzMzLDQ1IEBACiAJTXBpMlRvb2xib3hEaWFnbm9zdGljQ2xpUmVwbHlfdCwKIAkqcE1waTJUb29sYm94RGlhZ25vc3RpY0NsaVJlcGx5X3Q7CiAKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogIFRvb2xib3ggQ29uc29sZSBUZXh0IERpc3BsYXkgVG9vbAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogVG9vbGJveCBDb25zb2xlIFRleHQgRGlzcGxheSBUb29sIHJlcXVlc3QgbWVzc2FnZSAqLwordHlwZWRlZiBzdHJ1Y3QgX01QSTJfVE9PTEJPWF9URVhUX0RJU1BMQVlfUkVRVUVTVCB7CisJVTgJCQlUb29sOwkJCS8qIDB4MDAgKi8KKwlVOAkJCVJlc2VydmVkMTsJCS8qIDB4MDEgKi8KKwlVOAkJCUNoYWluT2Zmc2V0OwkJLyogMHgwMiAqLworCVU4CQkJRnVuY3Rpb247CQkvKiAweDAzICovCisJVTE2CQkJUmVzZXJ2ZWQyOwkJLyogMHgwNCA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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxN2QgICAgICAgfCAweDAwNGIsMHgwMTQxCXwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MDE0NCwweDAxNDYJfAorICogfCBNb2R1bGUgSW5pdCBhbmQgUHJvYmUgICAgICAgIHwgICAgICAgMHgwMTdkICAgICAgIHwgMHgwMTQ0LDB4MDE0Ngl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDAxNWItMHgwMTYwCXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MDE2ZS0weDAxNzAJfAotICogfCBNYWlsYm94IGNvbW1hbmRzICAgICAgICAgICAgIHwgICAgICAgMHgxMThkICAgICAgIHwgMHgxMDE4LTB4MTAxOQl8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDEwY2EgICAgICAgICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExMTUtMHgxMTE2ICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExMWEtMHgxMTFiCXwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MTE1NS0weDExNTggIHwKLSAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjA5NSAgICAgICB8IDB4MjAyMC0weDIwMjIsIHwKKyAqIHwgTWFpbGJveCBjb21tYW5kcyAgICAgICAgICAgICB8ICAgICAgIDB4MTE4ZCAgICAgICB8IDB4MTExNS0weDExMTYJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgxMTFhLTB4MTExYiAgfAorICogfCBEZXZpY2UgRGlzY292ZXJ5ICAgICAgICAgICAgIHwgICAgICAgMHgyMDE2ICAgICAgIHwgMHgyMDIwLTB4MjAyMiwgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgyMDExLTB4MjAxMiwgfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgyMDE2ICAgICAgICAgfAotICogfCBRdWV1ZSBDb21tYW5kIGFuZCBJTyB0cmFjaW5nIHwgICAgICAgMHgzMDU5ICAgICAgIHwgMHgzMDA2LTB4MzAwYiAgfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgyMDk5LTB4MjBhNCAgfAorICogfCBRdWV1ZSBDb21tYW5kIGFuZCBJTyB0cmFjaW5nIHwgICAgICAgMHgzMDU5ICAgICAgIHwgMHgzMDBiICAgICAgICAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgzMDI3LTB4MzAyOCAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgzMDNkLTB4MzA0MSAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgzMDJkLDB4MzAzMyAgfApAQCAtMzEsMTAgKzI3LDEwIEBACiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDMwM2EJCXwKICAqIHwgRFBDIFRocmVhZCAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4NDAyMyAgICAgICB8IDB4NDAwMiwweDQwMTMgIHwKICAqIHwgQXN5bmMgRXZlbnRzICAgICAgICAgICAgICAgICB8ICAgICAgIDB4NTA4NyAgICAgICB8IDB4NTAyYi0weDUwMmYgIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NTA0NywweDUwNTIgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NTA0NwkJfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg1MDg0LDB4NTA3NQl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwM2QsMHg1MDQ0ICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwN2IJCXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NTA3YiwweDUwNWYJfAogICogfCBUaW1lciBSb3V0aW5lcyAgICAgICAgICAgICAgIHwgICAgICAgMHg2MDEyICAgICAgIHwgICAgICAgICAgICAgICAgfAogICogfCBVc2VyIFNwYWNlIEludGVyYWN0aW9ucyAgICAgIHwgICAgICAgMHg3MGUyICAgICAgIHwgMHg3MDE4LDB4NzAyZSAgfAogICogfAkJCQkgIHwJCSAgICAgICB8IDB4NzAyMCwweDcwMjQgIHwKQEAgLTY0LDEzICs2MCwxNSBAQAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhiMTNjLTB4YjE0MCAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhiMTQ5CQl8CiAgKiB8IE11bHRpUSAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAweGMwMGMgICAgICAgfAkJfAotICogfCBNaXNjICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhkMjEyICAgICAgIHwgMHhkMDE3LTB4ZDAxOQl8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMjAJCXwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDAzMC0weGQwZmYJfAorICogfCBNaXNjICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhkMjEzICAgICAgIHwgMHhkMDExLTB4ZDAxNwl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMjEsMHhkMDI0CXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDAyNSwweGQwMjkJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhkMDJhLDB4ZDAyZQl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMzEtMHhkMGZmCXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDEwMS0weGQxZmUJfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhkMjEzLTB4ZDJmZQl8Ci0gKiB8IFRhcmdldCBNb2RlCQkgIHwJICAweGUwNzggICAgICAgfAkJfAotICogfCBUYXJnZXQgTW9kZSBNYW5hZ2VtZW50CSAgfAkgIDB4ZjA3MiAgIC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fQ01EX1RJTUVPVVQJNTAwCkBAIC01OCwxNiArNjIsNDQgQEAKIC8qIFRhc2sgbWFuYWdlbWVudCBjb21tYW5kIHRpbWVvdXQgKi8KICNkZWZpbmUgVE1fQ01EX1RJTUVPVVQJMTAwIC8qIG1zZWNzICovCiAKKy8qIG1heGltdW0gbnVtYmVyIG9mIGxpbmstc3RhcnR1cCByZXRyaWVzICovCisjZGVmaW5lIERNRV9MSU5LU1RBUlRVUF9SRVRSSUVTIDMKKworLyogbWF4aW11bSBudW1iZXIgb2YgcmVzZXQgcmV0cmllcyBiZWZvcmUgZ2l2aW5nIHVwICovCisjZGVmaW5lIE1BWF9IT1NUX1JFU0VUX1JFVFJJRVMgNQorCiAvKiBFeHBvc2UgdGhlIGZsYWcgdmFsdWUgZnJvbSB1dHBfdXBpdV9xdWVyeS52YWx1ZSAqLwogI2RlZmluZSBNQVNLX1FVRVJZX1VQSVVfRkxBR19MT0MgMHhGRgogCiAvKiBJbnRlcnJ1cHQgYWdncmVnYXRpb24gZGVmYXVsdCB0aW1lb3V0LCB1bml0OiA0MHVzICovCiAjZGVmaW5lIElOVF9BR0dSX0RFRl9UTwkweDAyCiAKKyNkZWZpbmUgdWZzaGNkX3RvZ2dsZV92cmVnKF9kZXYsIF92cmVnLCBfb24pCQkJCVwKKwkoeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlpbnQgX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKF9vbikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQlfcmV0ID0gdWZzaGNkX2VuYWJsZV92cmVnKF9kZXYsIF92cmVnKTsgICAgICAgICBcCisJCWVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJX3JldCA9IHVmc2hjZF9kaXN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qYnVmOworCXNpemVfdCBsZWZ0OworCisJaWYgKHQtPnR4X2J1ZikgeworCQlidWYgPSAodTggKil0LT50eF9idWY7CisJCWxlZnQgPSB0LT5sZW47CisJCXdoaWxlIChsZWZ0KSB7CisJCQlzaXplX3QgdG9fd3JpdGUgPSBtaW5fdChzaXplX3QsIDE2LCBsZWZ0KTsKKwkJCWJvb2wgY29udCA9IGxlZnQgLSB0b193cml0ZSA+IDA7CisKKwkJCWJjbTUzeHhzcGlfYnVmX3dyaXRlKGI1M3NwaSwgYnVmLCB0b193cml0ZSwgY29udCk7CisJCQlsZWZ0IC09IHRvX3dyaXRlOworCQkJYnVmICs9IHRvX3dyaXRlOworCQl9CisJfQorCisJaWYgKHQtPnJ4X2J1ZikgeworCQlidWYgPSAodTggKil0LT5yeF9idWY7CisJCWxlZnQgPSB0LT5sZW47CisJCXdoaWxlIChsZWZ0KSB7CisJCQlzaXplX3QgdG9fcmVhZCA9IG1pbl90KHNpemVfdCwgMTYgLSBiNTNzcGktPnJlYWRfb2Zmc2V0LAorCQkJCQkgICAgICAgbGVmdCk7CisJCQlib29sIGNvbnQgPSBsZWZ0IC0gdG9fcmVhZCA+IDA7CisKKwkJCWJjbTUzeHhzcGlfYnVmX3JlYWQoYjUzc3BpLCBidWYsIHRvX3JlYWQsIGNvbnQpOworCQkJbGVmdCAtPSB0b19yZWFkOworCQkJYnVmICs9IHRvX3JlYWQ7CisJCX0KKwl9CisKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBCQ01BCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3Qgc3BpX2JvYXJkX2luZm8gYmNtNTN4eF9pbmZvID0geworCS5tb2RhbGlhcwk9ICJiY201M3h4c3BpZmxhc2giLAorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBiY21hX2Rld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KiAxIGZvciBPVVQgbW9kZSwgMCBmb3IgSU4gbW9kZSAqLwotCXVuc2lnbmVkIGludCB1aUdQSU9NYXNrOyAgICAvKiBHUElPIG1hc2sgdG8gc2V0IG1vZGUgKi8KKwl1bnNpZ25lZCBpbnQgdWlHUElPTW9kZTsgLyogMSBmb3IgT1VUIG1vZGUsIDAgZm9yIElOIG1vZGUgKi8KKwl1bnNpZ25lZCBpbnQgdWlHUElPTWFzazsgLyogR1BJTyBtYXNrIHRvIHNldCBtb2RlICovCiB9IF9fcGFja2VkOwogCiAjZW5kaWYKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9iY20vTGVha3lCdWNrZXQuYyBiL2RyaXZlcnMvc3RhZ2luZy9iY20vTGVha3lCdWNrZXQuYwppbmRleCA4YzQwMzBkLi5kNmI1NWY5IDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvYmNtL0xlYWt5QnVja2V0LmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL2JjbS9MZWFreUJ1Y2tldC5jCkBAIC0xLDIwICsxLDE2IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiAJCQlMRUFLWUJVQ0tFVC5DCisqCQkJTEVBS1lCVUNLRVQuQwogKglUaGlzIGZpbGUgY29udGFpbnMgdGhlIHJvdXRpbmVzIHJlbGF0ZWQgdG8gTGVha3kgQnVja2V0IEFsZ29yaXRobS4KICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2luY2x1ZGUgImhlYWRlcnMuaCIKIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBGdW5jdGlvbiAgICAtIFVwZGF0ZVRva2VuQ291bnQoKQotKgotKiBEZXNjcmlwdGlvbiAtI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cGFja2V0X2luZm8gKnBzU0YpCiB7CiAJQkNNX0RFQlVHX1BSSU5UKEFkYXB0ZXIsIERCR19UWVBFX1RYLCBUT0tFTl9DT1VOVFMsIERCR19MVkxfQUxMLApAQCAtMjU2LDE4ICsyNDgsMTQgQEAKIAl9CiB9CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogRnVuY3Rpb24gICAgLSBDaGVja0FuZFNlbmRQYWNrZXRGcm9tSW5kZXgoKQotKgotKiBEZXNjcmlwdGlvbiAtIFRoaXMgZnVuY3Rpb24gZGVxdWV1ZXMgdGhlIGRhdGEvY29udHJvbCBwYWNrZXQgZnJvbSB0aGUKLSoJCQkJc3BlY2lmaWVkIHF1ZXVlIGZvciB0cmFuc21pc3Npb24uCi0qCi0qIFBhcmFtZXRlcnMgIC0gQWRhcHRlciA6IFBvaW50ZXIgdG8gdGhlIGRyaXZlciBjb250cm9sIHN0cnVjdHVyZS4KLSogCQkJICAtIGlRSW5kZXggOiBUaGUgcXVldWUgSWRlbnRpZmllci4KLSoKLSogUmV0dXJucyAgICAgLSBOb25lLgotKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKgorICogQ2hlY2tBbmRTZW5kUGFja2V0RnJvbUluZGV4KCkgLSBUaGlzIGZ1bmN0aW9uIGRlcXVldWVzIHRoZQorICogZGF0YS9jb250cm9sIHBhY2tldCBmcm9tIHRoZSBzcGVjaWZpZWQgcXVldWUgZm9yIHRyYW5zbWlzc2lvbi4KKyAqIEBBZGFwdGVyOglQb2ludGVyIHRvIHRoZSBkcml2ZXIgY29udHJvbCBzdHJ1Y3R1cmUuCisgKiBAaVFJbmRleDoJVGhlIHF1ZXVlIElkZW50aWZpZXIuCisgKgorICogUmV0dXJuczogTm9uZS4KKyAqLwogc3RhdGljIFZPSUQ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VjdCBjb21lZGlfaW5zbiAqaW5zbiwgdW5zaWduZWQgaW50ICpkYXRhKQorc3RhdGljIGludCBuaV82NzB4X2FvX2luc25fd3JpdGUoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKKwkJCQkgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsCisJCQkJIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiwKKwkJCQkgdW5zaWduZWQgaW50ICpkYXRhKQogewotCXN0cnVjdCBuaV82NzB4X3ByaXZhdGUgKmRldnByaXYgPSBkZXYtPnByaXZhdGU7CisJdW5zaWduZWQgaW50IGNoYW4gPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKKwl1bnNpZ25lZCBpbnQgdmFsID0gcy0+cmVhZGJhY2tbY2hhbl07CiAJaW50IGk7Ci0JaW50IGNoYW4gPSBDUl9DSEFOKGluc24tPmNoYW5zcGVjKTsKIAotCS8qIENoYW5uZWwgbnVtYmVyIG1hcHBpbmcgOgotCi0JICAgTkkgNjcwMy8gTkkgNjcwNCAgICAgfCBOSSA2NzA0IE9ubHkKLQkgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0JICAgdmNoKDApICAgICAgIDogICAgICAgMCAgICAgICB8IGljaCgxNikgICAgICAgOiAgICAgICAxCi0JICAgdmNoKDEpICAgICAgIDogICAgICAgMiAgICAgICB8IGljaCgxNykgICAgICAgOiAgICAgICAzCi0JICAgLiAgICA6ICAgICAgIC4gICAgICAgfCAgIC4gICAgICAgICAgICAgICAgICAgLgotCSAgIC4gICAgOiAgICAgICAuICAgICAgIHwgICAuICAgICAgICAgICAgICAgICAgIC4KLQkgICAuICAgIDogICAgICAgLiAgICAgICB8ICAgLiAgICAgICAgICAgICAgICAgICAuCi0JICAgdmNoKDE1KSAgICAgIDogICAgICAgMzAgICAgICB8IGljaCgzMSkgICAgICAgOiAgICAgICAzMSAgICAgIC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iX2ludGVyZmFjZSAqaW50ZiA9IGNvbWVkaV90b191c2JfaW50ZXJmYWNlKGRldik7CisJc3RydWN0IG5pNjUwMV9wcml2YXRlICpkZXZwcml2OworCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzOworCWludCByZXQ7CisKKwlkZXZwcml2ID0gY29tZWRpX2FsbG9jX2RldnByaXYoZGV2LCBzaXplb2YoKmRldnByaXYpKTsKKwlpZiAoIWRldnByaXYpCisJCXJldHVybiAtRU5PTUVNOworCisJcmV0ID0gbmk2NTAxX2ZpbmRfZW5kcG9pbnRzKGRldik7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKKworCXJldCA9IG5pNjUwMV9hbGxvY191c2JfYnVmZmVycyhkZXYpOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisKKwlzZW1hX2luaXQoJmRldnByaXYtPnNlbSwgMSk7CisJdXNiX3NldF9pbnRmZGF0YShpbnRmLCBkZXZwcml2KTsKKworCXJldCA9IGNvbWVkaV9hbGxvY19zdWJkZXZpY2VzKGRldiwgMik7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKKworCS8qIERpZ2l0YWwgSW5wdXQvT3V0cHV0IHN1YmRldmljZSAqLworCXMgPSAmZGV2LT5zdWJkZXZpY2VzWzBdOworCXMtPnR5cGUJCT0gQ09NRURJX1NVQkRfRElPOworCXMtPnN1YmRldl9mbGFncwk9IFNERl9SRUFEQUJMRSB8IFNERl9XUklUQUJMRTsKKwlzLT5uX2NoYW4JPSAyNDsKKwlzLT5tYXhkYXRhCT0gMTsKKwlzLT5yYW5nZV90YWJsZQk9ICZyYW5nZV9kaWdpdGFsOworCXMtPmluc25fYml0cwk9IG5pNjUwMV9kaW9faW5zbl9iaXRzOworCXMtPmluc25fY29uZmlnCT0gbmk2NTAxX2Rpb19pbnNuX2NvbmZpZzsKKworCS8qIENvdW50ZXIgc3ViZGV2aWNlICovCisJcyA9ICZkZXYtPnN1YmRldmljZXNbMV07CisJcy0+dH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lcnIoJnBkZXYtPmRldiwgImNvbmMgZmlsZSAlcyBub3QgZm91bmRcbiIsCiAJCQkJZndfaW5mb1tjYXJkX3R5cGVdLmNvbl9uYW1lKTsKIAkJCXJldHVybiByZXQ7CiAJCX0KQEAgLTEwMjcsOSArMTAxMywxNSBAQAogCiBzdGF0aWMgdm9pZCBkZ2FwX3JlbGVhc2VfcmVtYXAoc3RydWN0IGJvYXJkX3QgKmJyZCkKIHsKLQlyZWxlYXNlX21lbV9yZWdpb24oYnJkLT5tZW1iYXNlLCAweDIwMDAwMCk7Ci0JcmVsZWFzZV9tZW1fcmVnaW9uKGJyZC0+bWVtYmFzZSArIFBDSV9JT19PRkZTRVQsIDB4MjAwMDAwKTsKLQlpb3VubWFwKGJyZC0+cmVfbWFwX21lbWJhc2UpOworCWlmIChicmQtPnJlX21hcF9tZW1iYXNlKSB7CisJCXJlbGVhc2VfbWVtX3JlZ2lvbihicmQtPm1lbWJhc2UsIDB4MjAwMDAwKTsKKwkJaW91bm1hcChicmQtPnJlX21hcF9tZW1iYXNlKTsKKwl9CisKKwlpZiAoYnJkLT5yZV9tYXBfcG9ydCkgeworCQlyZWxlYXNlX21lbV9yZWdpb24oYnJkLT5tZW1iYXNlICsgUENJX0lPX09GRlNFVCwgMHgyMDAwMDApOworCQlpb3VubWFwKGJyZC0+cmVfbWFwX3BvcnQpOworCX0KIH0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKgpAQCAtMTIwMiwyNiArMTE5NCw2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBVdGlsaXR5IGZ1bmN0aW9ucwotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKiBkZ2FwX21zX3NsZWVwKCkKLSAqCi0gKiBQdXQgdGhlIGRyaXZlciB0byBzbGVlcCBmb3IgeCBtcydzCi0gKgotICogUmV0dXJucyAwIGlmIHRpbWVkIG91dCwgITAgKHNob3dpbmcgc2lnbmFsKSBpZiBpbnRlcnJ1cHRlZCBieSBhIHNpZ25hbC4KLSAqLwotc3RhdGljIGludCBkZ2FwX21zX3NsZWVwKHVsb25nIG1zKQotewotCWN1cnJlbnQtPnN0YXRlID0gVEFTS19JTlRFUlJVUFRJQkxFOwotCXNjaGVkdWxlX3RpbWVvdXQoKG1zICogSFopIC8gMTAwMCk7Ci0JcmV0dXJuIHNpZ25hbF9wZW5kaW5nKGN1cnJlbnQpOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgogICogVFRZIEluaXRpYWxpemF0aW9uL0NsZWFudXAgRnVuY3Rpb25zCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTEzMTYsMTEgKzEyODgsOSBAQAogCWlmIChyYyA8IDApCiAJCWdvdG8gdW5yZWdpc3Rlcl9zZXJpYWxfZHJ2OwogCi0JYnJkLT5kZ2FwX21ham9yX3NlcmlhbF9yZWdpc3RlcmVkID0gVFJVRTsKIAlkZ2FwX2JvYXJkc19ieV9tYWpvclticmQtPnNlcmlhbF9kcml2ZXItPm1ham9yXSA9IGJyZDsKIAlicmQtPmRnYXBfc2VyaWFsX21ham9yID0gYnJkLT5zZXJpYWxfZHJpdmVyLT5tYWpvcjsKIAotCWJyZC0+ZGdhcF9tYWpvcl90cmFuc3BhcmVudF9wcmludF9yZWdpc3RlcmVkID0gVFJVRTsKIAlkZ2FwX2JvYXJkc19ieV9tYWpvclticmQtPnByaW50X2RyaXZlci0+bWFqb3JdID0gYnJkOwogCWJyZC0+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Cx9CQkJCQkJLyogMCB0ZXJtaW5hdGVkIGxpc3QuICovCiB9OwogTU9EVUxFX0RFVklDRV9UQUJMRShwY2ksIGRnbmNfcGNpX3RibCk7CiAKIHN0cnVjdCBib2FyZF9pZCB7Ci0JdWNoYXIgKm5hbWU7CisJdW5zaWduZWQgY2hhciAqbmFtZTsKIAl1aW50IG1heHBvcnRzOwogCXVuc2lnbmVkIGludCBpc19wY2lfZXhwcmVzczsKIH07CkBAIC0xNzYsNyArMTQ3LDYgQEAKIAkubmFtZQkJPSAiZGduYyIsCiAJLnByb2JlCQk9IGRnbmNfaW5pdF9vbmUsCiAJLmlkX3RhYmxlICAgICAgID0gZGduY19wY2lfdGJsLAotCS5yZW1vdmUJCT0gZGduY19yZW1vdmVfb25lLAogfTsKIAogCkBAIC0xODYsMTIgKzE1Niw2IEBACiAJIkJvYXJkIFJFQURZIiwKIH07CiAKLWNoYXIgKmRnbmNfZHJpdmVyX3N0YXRlX3RleHRbXSA9IHsKLQkiRHJpdmVyIEluaXRpYWxpemVkIiwKLQkiRHJpdmVyIFJlYWR5LiIKLX07Ci0KLQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMTk5LDEzICsxNjMsNDcgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCisvKgorICogZGduY19jbGVhbnVwX21vZHVsZSgpCisgKgorICogTW9kdWxlIHVubG9hZC4gIFRoaXMgaXMgd2hlcmUgaXQgYWxsIGVuZHMuCisgKi8KK3N0YXRpYyB2b2lkIGRnbmNfY2xlYW51cF9tb2R1bGUodm9pZCkKK3sKKwlpbnQgaTsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCisJc3Bpbl9sb2NrX2lycXNhdmUoJmRnbmNfcG9sbF9sb2NrLCBmbGFncyk7CisJ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CwgUEFUSF9NQVgtMSk7CisJCWxpYmNmc19kZWJ1Z19maWxlX3BhdGhfYXJyW1BBVEhfTUFYIC0gMV0gPSAnXDAnOwogCX0KIAogCS8qIElmIGxpYmNmc19kZWJ1Z19tYiBpcyBzZXQgdG8gYW4gaW52YWxpZCB2YWx1ZSBvciB1bmluaXRpYWxpemVkCkBAIC00NDIsOSArNDQxLDExIEBACiAjZGVmaW5lIERFQlVHX1NVQlNZU1RFTSBTX1VOREVGSU5FRAogaW50IGxpYmNmc19kZWJ1Z19tYXJrX2J1ZmZlcihjb25zdCBjaGFyICp0ZXh0KQogewotCUNERUJVRyhEX1RSQUNFLCIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiIpOworCUNERUJVRyhEX1RSQUNFLAorCSAgICAgICAiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iKTsKIAlMQ09OU09MRShEX1dBUk5JTkcsICJERUJVRyBNQVJLRVI6ICVzXG4iLCB0ZXh0KTsKLQlDREVCVUcoRF9UUkFDRSwiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iKTsKKwlDREVCVUcoRF9UUkFDRSwKKwkgICAgICAgIioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuIik7CiAKIAlyZXR1cm4gMDsKIH0KQEAgLTQ1Myw3ICs0NTQsNyBAQAogCiB2b2lkIGxpYmNmc19kZWJ1Z19zZXRfbGV2ZWwodW5zaWduZWQgaW50IGRlYnVnX2xldmVsKQogewotCXByaW50ayhLRVJOX1dBUk5JTkcgIkx1c3RyZTogU2V0dGluZyBwb3J0YWxzIGRlYnVnIGxldmVsIHRvICUwOHhcbiIsCisJcHJfd2FybigiTHVzdHJlOiBTZXR0aW5nIHBvcnRhbHMgZGVidWcgbGV2ZWwgdG8gJTA4eFxuIiwKIAkgICAgICAgZ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ICAgYnJlYWs7Ci0+ICsgICAgICAgICAgICAgfSAgIAotPiArICAgICB9Ci0KLUFueWJvZHkgZXZlcnkgaGVhcmQgb2YgbWVtY21wIG9yIGJhY21wIGFuZCBCREFERFJfQU5ZPwotCi0+ICsgICAgICAgICAgICAgaWYgKG5vdF92YWxpZCkgewotPiArICAgICAgICAgICAgICAgICAgICAgZGV2X2luZm8oaW5mby0+ZGV2LCAiVmFsaWQgYmx1ZXRvb3RoIGFkZHJlc3Mgbm90IGZvdW5kLCIKLT4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiIHNldHRpbmcgc29tZSByYW5kb21cbiIpOwotPiArICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiBhZGRyZXNzIGlzIG5vdCB2YWxpZCwgdXNlIHNvbWUgcmFuZG9tICovCi0+ICsgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoaW5mby0+YmRfYWRkciwgbm9raWFfb3VpLCAzKTsKLT4gKyAgICAgICAgICAgICAgICAgICAgIGdldF9yYW5kb21fYnl0ZXMoaW5mby0+YmRfYWRkciArIDMsIDMpOwotPiArICAgICAgICAgICAgIH0KLQotCi1BbmQgd2h5IGRvZXMgZXZlcnkgc2luZ2xlIGNoaXAgZmlybXdhcmUgZG9lcyB0aGlzIGRpZmZlcmVudGx5LiBTZXJpb3VzbHksIHRoaXMgaXMgYSBtZXNzLgotCi0+ICt2b2lkIGhjaV9oNHBfcGFyc2VfZndfZXZlbnQoc3RydWN0IGhjaV9oNHBfaW5mbyAqaW5mbywgc3RydWN0IHNrX2J1ZmYgKnNrYikKLT4gK3sKLT4gKyAgICAgc3dpdGNoIChpbmZvLT5tYW5faWQpIHsKLT4gKyAgICAgY2FzZSBINFBfSURfQ1NSOgotPiArICAgICAgICAgICAgIGhjaV9oNHBfYmM0X3BhcnNlX2Z3X2V2ZW50KGluZm8sIHNrYik7Ci0+ICsgICAgICAgICAgICAgYnJlYWs7Ci0uLi4KLT4gK30KLQotV2UgaG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KLQlpZiAoY29uZGl0aW9uID09IDB4Q0RDRENEQ0QpCi0JCXJldHVybiB0cnVlOwotCi0JY29uZCA9IGNvbmRpdGlvbiAmIDB4MDAwMDAwRkY7Ci0JaWYgKChfYm9hcmQgPT0gY29uZCkgJiYgY29uZCAhPSAweDAwKQotCQlyZXR1cm4gZmFsc2U7Ci0KLQljb25kID0gY29uZGl0aW9uICYgMHgwMDAwRkYwMDsKLQljb25kID0gY29uZCA+PiA4OwotCWlmICgoX2ludGVyZmFjZSAmIGNvbmQpID09IDAgJiYgY29uZCAhPSAweDA3KQotCQlyZXR1cm4gZmFsc2U7Ci0KLQljb25kID0gY29uZGl0aW9uICYgMHgwMEZGMDAwMDsKLQljb25kID0gY29uZCA+PiAxNjsKLQlpZiAoKF9wbGF0Zm9ybSAmIGNvbmQpID09IDAgJiYgY29uZCAhPSAweDBGKQotCQlyZXR1cm4gZmFsc2U7Ci0JcmV0dXJuIHRydWU7Ci19Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgIE1BQ19SRUcuVFhUCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyB1MzIgYXJyYXlfTUFDX1JFR184MTg4RVtdID0gewotCQkweDAyNiwgMHgwMDAwMDA0MSwKLQkJMHgwMjcsIDB4MDAwMDAwMzUsCi0JCTB4NDI4LCAweDAwMDAwMDBBLAotCQkweDQyOSwgMHgwMDAwMDAxMCwKLQkJMHg0MzAsIDB4MDAwMDAwMDAsCi0JCTB4NDMxLCAweDAwMDAwMDAxLAotCQkweDQzMiwgMHgwMDAwMDAwMiwKLQkJMHg0MzMsIDB4MDAwMDAwMDQsCi0JCTB4NDM0LCAweDAwMDAwMDA1LAotCQkweDQzNSwg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DApID4+IDg7Ci0JdTMyIF9wbGF0Zm9ybSAgPSAoSGV4ICYgMHgwMEZGMDAwMCkgPj4gMTY7Ci0JdTMyIGNvbmQgPSBDb25kaXRpb247Ci0KLQlpZiAoQ29uZGl0aW9uID09IDB4Q0RDRENEQ0QpCi0JCXJldHVybiB0cnVlOwotCi0JY29uZCA9IENvbmRpdGlvbiAmIDB4MDAwMDAwRkY7Ci0JaWYgKChfYm9hcmQgPT0gY29uZCkgJiYgY29uZCAhPSAweDAwKQotCQlyZXR1cm4gZmFsc2U7Ci0KLQljb25kID0gQ29uZGl0aW9uICYgMHgwMDAwRkYwMDsKLQljb25kID0gY29uZCA+PiA4OwotCWlmICgoX2ludGVyZmFjZSAmIGNvbmQpID09IDAgJiYgY29uZCAhPSAweDA3KQotCQlyZXR1cm4gZmFsc2U7Ci0KLQljb25kID0gQ29uZGl0aW9uICYgMHgwMEZGMDAwMDsKLQljb25kID0gY29uZCA+PiAxNjsKLQlpZiAoKF9wbGF0Zm9ybSAmIGNvbmQpID09IDAgJiYgY29uZCAhPSAweDBGKQotCQlyZXR1cm4gZmFsc2U7Ci0JcmV0dXJuIHRydWU7Ci19Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFJhZGlvQV8xVC5UWFQKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIHUzMiBBcnJheV9SYWRpb0FfMVRfODE4OEVbXSA9IHsKLQkJMHgwMDAsIDB4MDAwMzAwMDAsCi0JCTB4MDA4LCAweDAwMDg0MDAwLAotCQkweDAxOCwgMHgwMDAwMDQwNywKLQkJMHgwMTksIDB4MDAwMDAwMTIsCi0JCTB4MDFFLCAweDAwMDgwMDA5LAotCQkweDAxRiwgM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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotZW51bSBIQUxfU1RBVFVTIE9ETV9SZWFkQW5kQ29uZmlnX0FHQ19UQUJfMVRfODE4OEUoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKm9kbSk7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogICAgICAgICAgICAgICAgICAgICAgICAgICBQSFlfUkVHXzFULlRYVAotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1lbnVtIEhBTF9TVEFUVVMgT0RNX1JlYWRBbmRDb25maWdfUEhZX1JFR18xVF84MTg4RShzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqb2RtKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFBIWV9SRUdfUEcuVFhUCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXZvaWQgT0RNX1JlYWRBbmRDb25maWdfUEhZX1JFR19QR184MTg4RShzdHJ1Y3Qgb2RtX2RtX3N0cnVjdCAqZG1fb2RtKTsKLQotI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsSFdJbWc4MTg4RV9NQUMuaCBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTg4ZXUvaW5jbHVkZS9IYWxIV0ltZzgxODhFX01BQy5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCBhY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G8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwKLSogNTEgRnJhbmtsaW4gU3RyZWV0LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQSAwMjExMCwgVVNBCi0qCi0qCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYgX19JTkNfTUFDXzgxODhFX0hXX0lNR19ICi0jZGVmaW5lIF9fSU5DX01BQ184MTg4RV9IV19JTUdfSAotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgTUFDX1JFRy5UWFQKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotZW51bSBIQUxfU1RBVFVTIE9ETV9SZWFkQW5kQ29uZmlnX01BQ19SRUdfODE4OEUoc3RydWN0IG9kbV9kbV9zdHJ1Y3QgKnBETV9PZG0pOwotCi0jZW5kaWYgLyogIGVuZCBvZiBIV0lNR19TVVBQT1JUICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsSFdJbWc4MTg4RV9SRi5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxODhldS9pbmNsdWRlL0hhbEhXSW1nODE4OEVfUkYuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggOGVjYjQwZC4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsSFdJbWc4MTg4RV9SRi5oCisrKyAvZGV2L251bGwKQEAgLTEsMzAgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqK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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYgX19JTkNfUkZfODE4OEVfSFdfSU1HX0gKLSNkZWZpbmUgX19JTkNfUkZfODE4OEVfSFdfSU1HX0gKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICBSYWRpb0FfMVQuVFhUCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1lbnVtIEhBTF9TVEFUVVMgT0RNX1JlYWRBbmRDb25maWdfUmFkaW9BXzFUXzgxODhFKHN0cnVjdCBvZG1fZG1fc3RydWN0ICpvZG0pOwotCi0jZW5kaWYgLyogIGVuZCBvZiBIV0lNR19TVVBQT1JUICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE4OGV1L2luY2x1ZGUvSGFsUGh5UmZfODE4OGUuaCBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTg4ZXUvaW5jbHVkZS9IYWxQaHlSZl84MTg4ZS5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCA5MGEyNmMxLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTg4ZXUvaW5jbHVkZS9IYWxQaHlSZl84MTg4ZS5oCisrKyAvZGV2L251bGwKQEAgLTEsNjEgKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIENvcHlyaWdodChjKSAyMDA3IC0gMjAxMSBSZWFsdGVrIENvcnBvcmF0aW9uLiBBbGwgcmlnaHRzIHJlc2VydmVkLgotICoKLSAqIFRoaXMgcH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gUlRMODE5MkUgQ28tZXhpc3QgbWVjaGFuaXNtCi0gKgotICogSGlzdG9yeQotICogMjAxMi8xMS8xNSBDb3NhIGZpcnN0IGNoZWNrIGluLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIGluY2x1ZGUgZmlsZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpbmNsdWRlICJoYWxidF9wcmVjb21wLmgiCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICAgR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0YXRpYyBzdHJ1Y3QgY29leF9kbV84MTkyZV8yYW50IGdsY29leF9kbV84MTkyZV8yYW50Owotc3RhdGljIHN0cnVjdCBjb2V4X2RtXzgxOTJlXzJhbnQgKmNvZXhfZG0gPSAmZ2xjb2V4X2RtXzgxOTJlXzJhbnQ7Ci1zdGF0aWMgc3RydWN0IGNvZXhfc3RhXzgxOTJlXzJhbnQgZ2xjb2V4X3N0YV84MTkyZV8yYW50Owotc3RhdGljIHN0cnVjdCBjb2V4X3N0YV84MTkyZV8yYW50ICpjb2V4X3N0YSA9ICZnbGNvZXhfc3RhXzgxOTJlXzJhbnQ7Ci0KLXN0YXRpYyBjb25zdCBjaGFyICpjb25zdCBnbGJ0X2luZm9zcmM4MTkyZTJhbnRbXSA9IHsKLQkiQlQgSW5mb1t3aWZpIGZ3XSIsCi0JIkJUIEluZm9bYnQgcnNwXSIsCi0JIkJUIEluZm9bYnQgYXV0byByZXBvcnRdIiwKLX07Ci0KLXN0YXRpYyB1MzIgZ2xjb2V4X3Zlcl9kYXRlXzgxOTJlXzJhbnQgPSAyMDEzMDkwMjsKLXN0YXRpYyB1MzIgZ2xjb2V4X3Zlcl84MTkyZV8yYW50ID0gMHgzNDsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIGxvY2FsIGZ1bmN0aW9uIHByb3RvIHR5cGUgaWYgbmVlZGVkCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICAgbG9jYWwgZnVuY3Rpb24gc3RhcnQgd2l0aCBoYWxidGM4MTkyZTJhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgdTggaGFsYnRjODE5MmUyYW50X2J0cnNzaV9zdGF0ZSh1OCBsZXZlbF9udW0sIHU4IHJzc2lfdGhyZXNoLAotCQkJCSAgICAgICB1OCByc3NpX3RocmVzaDEpCi17Ci0JaW50IGJ0cnNzaSA9IDA7Ci0JdTggYnRyc3NpX3N0YXRlID0gY29leF9zdGEtPnByZV9idF9yc3NpX3N0YXRlOwotCi0JYnRyc3NpID0gY29leF9zdGEtPmJ0X3Jzc2k7Ci0KLQlpZiAobGV2ZWxfbnVtID09IDIpIHsKLQkJaWYgKChjb2V4X3N0YS0+cHJlX2J0X3Jzc2lfc3RhdGUgPT0gQlRDX1JTU0lfU1RBVEVfTE9XKSB8fAotCQkgICAgKGNvZXhfc3RhLT5wcmVfYnRfcnNzaV9zdGF0ZSA9PSBCVENfUlNTSV9TVEFURV9TVEFZX0xPVykpIHsKLQkJCUJUQ19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19yZWFkXzFieXRlKGJ0Y29leGlzdCwgMHgxMDEpOwotCXU4dG1wIHw9IEJJVCg0KTsKLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZShidGNvZXhpc3QsIDB4MTAxLCB1OHRtcCk7Ci0KLQkvKiBlbmFibGUgYnQgY2xvY2sgd2hlbiB3aWZpIGlzIGRpc2FibGVkLiAqLwotCXU4dG1wID0gYnRjb2V4aXN0LT5idGNfcmVhZF8xYnl0ZShidGNvZXhpc3QsIDB4OTMpOwotCXU4dG1wIHw9IEJJVCgwKTsKLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZShidGNvZXhpc3QsIDB4OTMsIHU4dG1wKTsKLQkvKiBlbmFibGUgYnQgY2xvY2sgd2hlbiBzdXNwZW5kLiAqLwotCXU4dG1wID0gYnRjb2V4aXN0LT5idGNfcmVhZF8xYnl0ZShidGNvZXhpc3QsIDB4Nyk7Ci0JdTh0bXAgfD0gQklUKDApOwotCWJ0Y29leGlzdC0+YnRjX3dyaXRlXzFieXRlKGJ0Y29leGlzdCwgMHg3LCB1OHRtcCk7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIHdvcmsgYXJvdW5kIGZ1bmN0aW9uIHN0YXJ0IHdpdGggd2FfaGFsYnRjODE5MmUyYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICAgZXh0ZXJuIGZ1bmN0aW9uIHN0YXJ0IHdpdGggRVhoYWxidGM4MTkyZTJhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkIGV4X2hhbGJ0YzgxOTJlMmFudF9pb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leGlzdCk7CmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmVlL2J0Y29leGlzdC9oYWxidGM4NzIzYjFhbnQuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZWUvYnRjb2V4aXN0L2hhbGJ0Yzg3MjNiMWFudC5jCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAxNTMwNDhmLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZWUvYnRjb2V4aXN0L2hhbGJ0Yzg3MjNiMWFudC5jCisrKyAvZGV2L251bGwKQEAgLTEsMzE0NiArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBEZXNjcmlwdGlvbjoKLSAqCi0gKiBUaGlzIGZpbGUgaXMgZm9yIFJUTDg3MjNCIENvLWV4aXN0IG1lY2hhbmlzbQotICoKLSAqIEhpc3RvcnkKLSAqIDIwMTIvMTEvMTUgQ29zYSBmaXJzdCBjaGVjayBpbi4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBpbmNsdWRlIGZpbGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2luY2x1ZGUgImhhbGJ0X3ByZWNvbXAuaCIKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEdsb2JhbCB2YXJpYWJsZXMsIHRoZXNlIGFyZSBzdGF0aWMgdmFyaWFibGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIHN0cnVjdCBjb2V4X2RtXzg3MjNiXzFhbnQgZ2xjb2V4X2RtXzg3MjNiXzFhbnQ7Ci1zdGF0aWMgc3RydWN0IGNvZXhfZG1fODcyM2JfMWFudCAqY29leF9kbSA9ICZnbGNvZXhfZG1fODcyM2JfMWFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9zdGFfODcyM2JfMWFudCBnbGNvZXhfc3RhXzg3MjNiXzFhbnQ7Ci1zdGF0aWMgc3RydWN0IGNvZXhfc3RhXzg3MjNiXzFhbnQgKmNvZXhfc3RhID0gJmdsY29leF9zdGFfODcyM2JfMWFudDsKLQotc3RhdGljIGNvbnN0IGNoYXIgKmNvbnN0IGdsYl9pbmZvc3JjODcyM2IxYW50W10gPSB7Ci0JIkJUIEluZm9bd2lmaSBmd10iLAotCSJCVCBJbmZvW2J0IHJzcF0iLAotCSJCVCBJbmZvW2J0IGF1dG8gcmVwb3J0XSIsCi19OwotCi1zdGF0aWMgdTMyIGdsY29leF92ZXJfZGF0ZV84NzIzYl8xYW50ID0gMjAxMzA5MTg7Ci1zdGF0aWMgdTMyIGdsY29leF92ZXJfODcyM2JfMWFudCA9IDB4NDc7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIGxvY2FsIGZ1bmN0aW9uIHByb3RvIHR5cGUgaWYgbmVlZGVkCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogbG9jYWwgZnVuY3Rpb24gc3RhcnQgd2l0aCBoYWxidGM4NzIzYjFhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc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otCWJ0Y29leGlzdC0+YnRjX3dyaXRlXzFieXRlKGJ0Y29leGlzdCwgMHg3NmUsIDB4NCk7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogd29yayBhcm91bmQgZnVuY3Rpb24gc3RhcnQgd2l0aCB3YV9oYWxidGM4NzIzYjFhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIGV4dGVybiBmdW5jdGlvbiBzdGFydCB3aXRoIEVYaGFsYnRjODcyM2IxYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkIGV4X2hhbGJ0Yzg3MjNiMWFudF9pbml0X2h3Y29uZmlnKHN0cnVjdCBidGNfY29leGlzdCAqYnRjb2V4aXN0KQotewotCWluaXRfaHdfY29uZmlnKGJ0Y29leGlzdCwgdHJ1ZSk7Ci19Ci0KLXZvaWQgZXhfaGFsYnRjODcyM2IxYW50X2luaXRfY29leF9kbShzdHJ1Y3QgYnRjX2NvZXhpc3QgKmJ0Y29leGlzdCkKLXsKLQlCVENfUFJJTlQoQlRDX01TR19JTlRFUkZBQ0UsIElOVEZfSU5JVCwKLQkJICAiW0JUQ29leF0sIENvZXggTWVjaGFuaXNtIEluaXQhIVxuIik7Ci0KLQlidGNvZXhpc3QtPnN0b3BfY29leF9kbSA9IGZhbHNlOwotCi0JaGFsYnRjODcyM2IxYW50X2luaXRfY29leF9kbShidGNvZXhpc3QpOwotCi0JaGFsYnRjODcyM2IxYW50X3F1ZXJ5X2J0X2luZm8oYnRjb2V4aXN0KTsKLX0KLQotdm9pZCBleF9oYWxidGM4NzIzYjFhbnRfZGlzcGxheV9jb2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xlIG1vZGUgMTAwNjQ0CmluZGV4IDgzNjIwNjMuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlZS9idGNvZXhpc3QvaGFsYnRjODcyM2IyYW50LmMKKysrIC9kZXYvbnVsbApAQCAtMSwzOTI5ICswLDAgQEAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIERlc2NyaXB0aW9uOgotICoKLSAqIFRoaXMgZmlsZSBpcyBmb3IgUlRMODcyM0IgQ28tZXhpc3QgbWVjaGFuaXNtCi0gKgotICogSGlzdG9yeQotICogMjAxMi8xMS8xNSBDb3NhIGZpcnN0IGNoZWNrIGluLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogaW5jbHVkZSBmaWxlcwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2luY2x1ZGUgImhhbGJ0X3ByZWNvbXAuaCIKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0YXRpYyBzdHJ1Y3QgY29leF9kbV84NzIzYl8yYW50IGdsY29leF9kbV84NzIzYl8yYW50Owotc3RhdGljIHN0cnVjdCBjb2V4X2RtXzg3MjNiXzJhbnQgKmNvZXhfZG0gPSAmZ2xjb2V4X2RtXzg3MjNiXzJhbnQ7Ci1zdGF0aWMgc3RydWN0IGN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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgd29yayBhcm91bmQgZnVuY3Rpb24gc3RhcnQgd2l0aCB3YV9oYWxidGM4NzIzYjJhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogIGV4dGVybiBmdW5jdGlvbiBzdGFydCB3aXRoIEVYaGFsYnRjODcyM2IyYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgZXg5MmVfaGFsYnRjODcyM2IyYW50X2luaXRfaHdjb25maWcoc3RydWN0IGJ0Y19jb2V4aXN0ICpidGNvZXhpc3QpCi17Ci0JdTggdTh0bXAgPSAwOwotCi0JQlRDX1BSSU5UKEJUQ19NU0dfSU5URVJGQUNFLCBJTlRGX0lOSVQsCi0JCSAgIltCVENvZXhdLCAyQW50IEluaXQgSFcgQ29uZmlnISFcbiIpOwotCWNvZXhfZG0tPmJ0X3JmMHgxZV9iYWNrdXAgPQotCQlidGNvZXhpc3QtPmJ0Y19nZXRfcmZfcmVnKGJ0Y29leGlzdCwgQlRDX1JGX0EsIDB4MWUsIDB4ZmZmZmYpOwotCi0JLyogMHg3OTBbNTowXSA9IDB4NSAqLwotCXU4dG1wID0gYnRjb2V4aXN0LT5idGNfcmVhZF8xYnl0ZShidGNvZXhpc3QsIDB4NzkwKTsKLQl1OHRtcCAmPSAweGMwOwotCXU4dG1wIHw9IDB4NTsKLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZShidGNvZXhpc3QsIDB4NzkwLCB1OHRtcCk7Ci0KLQkvKkFudGVubmEgY29uZmlnCSovCi0JaGFsYnRjODcyM2IyYW50X3NldF9hbnRfcGF0aChid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CWJyZWFrOwotCQljYXNlIE1HTl85TToKLQkJCXJldCA9IERFU0M5MF9SQVRFOU07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fMTJNOgotCQkJcmV0ID0gREVTQzkwX1JBVEUxMk07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fMThNOgotCQkJcmV0ID0gREVTQzkwX1JBVEUxOE07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fMjRNOgotCQkJcmV0ID0gREVTQzkwX1JBVEUyNE07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fMzZNOgotCQkJcmV0ID0gREVTQzkwX1JBVEUzNk07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fNDhNOgotCQkJcmV0ID0gREVTQzkwX1JBVEU0OE07Ci0JCQlicmVhazsKLQkJY2FzZSBNR05fNTRNOgotCQkJcmV0ID0gREVTQzkwX1JBVEU1NE07Ci0JCQlicmVhazsKKwljYXNlIE1HTl8xTToKKwkJcmV0ID0gREVTQzkwX1JBVEUxTTsKKwkJYnJlYWs7CisJY2FzZSBNR05fMk06CisJCXJldCA9IERFU0M5MF9SQVRFMk07CisJCWJyZWFrOworCWNhc2UgTUdOXzVfNU06CisJCXJldCA9IERFU0M5MF9SQVRFNV81TTsKKwkJYnJlYWs7CisJY2FzZSBNR05fMTFNOgorCQlyZXQgPSBERVNDOTBfUkFURTExTTsKKwkJYnJlYWs7CisJY2FzZSBNR05fNk06CisJCXJldCA9IERFU0M5MF9SQVRFNk07CisJCWJyZWFrOworCWNhc2UgTUdOXzlNOgorCQlyZXQgPSBERVNDOTBfUkFURTlNOworCQlicmVhazsKKwljYXNlIE1HTl8xMk06CisJCXJldCA9IERFU0M5MF9SQVRFMTJNOworCQlicmVhazsKKwljYXNlIE1HTl8xOE06CisJCXJldCA9IERFU0M5MF9SQVRFMThNOworCQlicmVhazsKKwljYXNlIE1HTl8yNE06CisJCXJldCA9IERFU0M5MF9SQVRFMjRNOworCQlicmVhazsKKwljYXNlIE1HTl8zN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BR2FpbiAgICAgICAgICAgICAgMHg3YzAwCiAKLS8vcGFnZSBkCisvKiBwYWdlIGQgKi8KICNkZWZpbmUgYlNUQkNFbiAgICAgICAgICAgICAgICAgIDB4NAogI2RlZmluZSBiQW50ZW5uYU1hcHBpbmcgICAgICAgICAgMHgxMAogI2RlZmluZSBiTnNzICAgICAgICAgICAgICAgICAgICAgMHgyMApAQCAtNjYyLDEyICs2NjYsMTMgQEAKICNkZWZpbmUgYk9GRE1Db250aW51ZVR4ICAgICAgICAgIDB4MTAwMDAwMDAKICNkZWZpbmUgYk9GRE1TaW5nbGVDYXJyaWVyICAgICAgIDB4MjAwMDAwMDAKICNkZWZpbmUgYk9GRE1TaW5nbGVUb25lICAgICAgICAgIDB4NDAwMDAwMDAKLS8vI2RlZmluZSBiUnhQYXRoMSAgICAgICAgICAgICAgICAgMHgwMQotLy8jZGVmaW5lIGJSeFBhdGgyICAgICAgICAgICAgICAgICAweDAyCi0vLyNkZWZpbmUgYlJ4UGF0aDMgICAgICAgICAgICAgICAgIDB4MDQKLS8vI2RlZmluZSBiUnhQYXRoNCAgICAgICAgICAgICAgICAgMHgwOAotLy8jZGVmaW5lIGJUeFBhdGgxICAgICAgICAgICAgICAgICAweDEwCi0vLyNkZWZpbmUgYlR4UGF0aDIgICAgICAgICAgICAgICAgIDB4MjAKKy8qICNkZWZpbmUgYlJ4UGF0aDEgICAgICAgICAgICAgICAgIDB4MDEKKyAqICNkZWZpbmUgYlJ4UGF0aDIgICAgICAgICAgICAgICAgIDB4MDIKKyAqICNkZWZpbmUgYlJ4UGF0aDMgICAgICAgICAgICAgICAgIDB4MDQKKyAqICNkZWZpbmUgYlJ4UGF0aDQgICAgICAgICAgICAgICAgIDB4MDgKKyAqICNkZWZpbmUgYlR4UGF0aDEgICAgICAgICAgICAgICAgIDB4MTAKKyAqICNkZWZpbmUgYlR4UGF0aDIgICAgICAgICAgICAgICAgIDB4MjAKKyAqLwogI2RlZmluZSBiSFREZXRlY3QgICAgICAgIC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ExQRkJXICAgICAgICAgIDB4YwogI2RlZmluZSBiUlRMODI1OF9SeExQRkJXICAgICAgICAgIDB4YzAwCiAjZGVmaW5lIGJSVEw4MjU4X1JTU0lMUEZCVyAgICAgICAgMHhjMAogCi0vL2J5dGUgZW5kYWJsZSBmb3Igc2Jfd3JpdGUKKy8qIGJ5dGUgZW5kYWJsZSBmb3Igc2Jfd3JpdGUgKi8KICNkZWZpbmUgYkJ5dGUwICAgICAgICAgICAgICAgICAgICAweDEKICNkZWZpbmUgYkJ5dGUxICAgICAgICAgICAgICAgICAgICAweDIKICNkZWZpbmUgYkJ5dGUyICAgICAgICAgICAgICAgICAgICAweDQKQEAgLTgxMiw3ICs4MTgsNyBAQAogI2RlZmluZSBiV29yZDEgICAgICAgICAgICAgICAgICAgIDB4YwogI2RlZmluZSBiRFdvcmQgICAgICAgICAgICAgICAgICAgIDB4ZgogCi0vL2ZvciBQdXRSZWdzZXR0aW5nICYgR2V0UmVnU2V0dGluZyBCaXRNYXNrCisvKiBmb3IgUHV0UmVnc2V0dGluZyAmIEdldFJlZ1NldHRpbmcgQml0TWFzayAqLwogI2RlZmluZSBiTWFza0J5dGUwICAgICAgICAgICAgICAgIDB4ZmYKICNkZWZpbmUgYk1hc2tCeXRlMSAgICAgICAgICAgICAgICAweGZmMDAKICNkZWZpbmUgYk1hc2tCeXRlMiAgICAgICAgICAgICAgICAweGZmMDAwMApAQCAtODIxLDcgKzgyNyw3IEBACiAjZGVmaW5lIGJNYXNrTFdvcmQgICAgICAgICAgICAgICAgMHgwMDAwZmZmZgogI2RlZmluZSBiTWFza0RXb3JkICAgICAgICAgICAgICAgIDB4ZmZmZmZmZmYKIAotLy9mb3IgUHV0UkZSZWdzZXR0aW5nICYgR2V0UkZSZWdTZXR0aW5nIEJpdE1hc2sKKy8qIGZvciBQdXRSRlJlZ3NldHRpbmcgJiBHZXRSRlJlZ1NldHRpbmcgQml0TWFzayAqLwogI2RlZmluZSBiTWFzazEyQml0cyAgICAgICAgICAg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mh3LCBzdHJ1Y3QgaWVlZTgwMjExX3ZpZiAqdmlmKTsKLSNlbmRpZgotI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODgyMWFlL2J0Y29leGlzdC9IYWxCdGM4ODEyYTFBbnQuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4ODIxYWUvYnRjb2V4aXN0L0hhbEJ0Yzg4MTJhMUFudC5jCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCBjZjhjMzgyLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4ODIxYWUvYnRjb2V4aXN0L0hhbEJ0Yzg4MTJhMUFudC5jCisrKyAvZGV2L251bGwKQEAgLTEsMzk3NiArMCwwIEBACi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gRGVzY3JpcHRpb246Ci0vLwotLy8gVGhpcyBmaWxlIGlzIGZvciA4ODEyYTFhbnQgQ28tZXhpc3QgbWVjaGFuaXNtCi0vLwotLy8gSGlzdG9yeQotLy8gMjAxMi8xMS8xNSBDb3NhIGZpcnN0IGNoZWNrIGluLgotLy8KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBpbmNsdWRlIGZpbGVzCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotI2luY2x1ZGUgImhhbGJ0X3ByZWNvbXAuaCIKLSNpZiAxCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1zdGF0aWMgQ09FWF9ETV84ODEyQV8xQU5UCQlHTENvZXhEbTg4MTJhMUFudDsKLXN0YXRpYyBQQ09FWF9ETV84ODEyQV8xQU5UIAljb2V4X2RtPSZHTENvZXhEbTg4MTJhMUFudDsKLXN0YXRpYyBDT0VYX1NUQV84ODEyQV8xQU5UCQlHTENvZXhTdGE4ODEyYTFBbnQ7Ci1zdGF0aWMgUENPRVhfU1RBXzg4MTJBXzFBTlQJY29leF9zdGE9JkdMQ29leFN0YTg4MTJhMUFudDsKLQotY29uc3QgY2hhciAqY29uc3QgR0xCdEluZm9TcmM4ODEyYTFBbnRbXT17Ci0JIkJUIEluZm9bd2lmaSBmd10iLAotCSJCVCBJbmZvW2J0IHJzcF0iLAotCSJCVCBJbmZvW2J0IGF1dG8gcmVwb3J0XSIsCi19OwotCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gbG9jYWwgZnVuY3Rpb24gcHJvdG8gdHlwZSBpZiBuZWVkZWQKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gbG9jYWwgZnVuY3Rpb24gc3RhcnQgd2l0aCBoYWxidGM4ODEyYTFhbnRfCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotI2lmIDAKLXZvaWQKLWhhbGJ0Yzg4MTJhMWFudF9SZWcweDU1MEJpdDMoCi0JIAlQQlRDX0NPRVhJU1QJCWJ0Y29leGlzdCwKLQkgCUJPT0xFQU4JCQliU2V0Ci0JKQotewotCXUxQnl0ZQl1MXR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J0Yzg3MjNhMWFudC5jCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCA4ZTQyOTNhLi4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4ODIxYWUvYnRjb2V4aXN0L2hhYnRjODcyM2ExYW50LmMKKysrIC9kZXYvbnVsbApAQCAtMSwxNjE0ICswLDAgQEAKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBEZXNjcmlwdGlvbjoKLS8vCi0vLyBUaGlzIGZpbGUgaXMgZm9yIFJUTDg3MjNBIENvLWV4aXN0IG1lY2hhbmlzbQotLy8KLS8vIEhpc3RvcnkKLS8vIDIwMTIvMDgvMjIgQ29zYSBmaXJzdCBjaGVjayBpbi4KLS8vIDIwMTIvMTEvMTQgQ29zYSBSZXZpc2UgZm9yIDg3MjNBIDFBbnQgb3V0IHNvdXJjaW5nLgotLy8KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBpbmNsdWRlIGZpbGVzCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotI2luY2x1ZGUgIk1wX1ByZWNvbXAuaCIKLSNpZihCVF8zMF9TVVBQT1JUID09IDEpCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1zdGF0aWMgQ09FWF9ETV84NzIzQV8xQU5UCUdMQ29leERtODcyM2ExQW50Owotc3RhdGljIFBDT0VYX0RNXzg3MjNBXzFBTlQgCXBDb2V4RG09JkdMQ29leERtODcyM2ExQW50Owotc3RhdGljIENPRVhfU1RBXzg3MjNBXzFBTlQJR0xDb2V4U3RhODcyM2ExQW50Owotc3RhdGljIFBDT0VYX1NUQV84NzIzQV8xQU5UCXBDb2V4U3RhPSZHTENvZXhTdGE4NzIzYTFBbnQ7Ci0KLWNvbnN0IGNoYXIgKmNvbnN0IEdMQnRJbmZvU3JjODcyM2ExQW50W109ewotCSJCVCBJbmZvW3dpZmkgZnddIiwKLQkiQlQgSW5mb1tidCByc3BdIiwKLQkiQlQgSW5mb1tidCBhdXRvIHJlcG9ydF0iLAotfTsKLQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIGxvY2FsIGZ1bmN0aW9uIHByb3RvIHR5cGUgaWYgbmVlZGVkCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIGxvY2FsIGZ1bmN0aW9uIHN0YXJ0IHdpdGggaGFsYnRjODcyM2ExYW50XwotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLVZPSUQKLWhhbGJ0Yzg3MjNhMWFudF9SZWcweDU1MEJpdDMoCi0JSU4JUEJUQ19DT0VYSVNUCQlwQnRDb2V4aXN0LAotCUlOCUJPT0xFQU4JCQliU2V0Ci0JKQotewotCXUxQnl0ZQl1MXRtcD0wOwotCQotCXUxdG1wID0gcEJ0Q29leGlzdC0+YnRjX3JlYWRfMWJ5dGUocEJ0Q29leGlzdCwgMHg1NTApOwotCWlmKGJTZXQpCi0JewotCQl1MXRtcCB8PSBCSVQzOwotCX0K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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0jaW5jbHVkZSAiTXBfUHJlY29tcC5oIgotI2lmKEJUXzMwX1NVUFBPUlQgPT0gMSkKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBHbG9iYWwgdmFyaWFibGVzLCB0aGVzZSBhcmUgc3RhdGljIHZhcmlhYmxlcwotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLXN0YXRpYyBDT0VYX0RNXzgxOTJFXzFBTlQJCUdMQ29leERtODE5MmUxQW50Owotc3RhdGljIFBDT0VYX0RNXzgxOTJFXzFBTlQgCXBDb2V4RG09JkdMQ29leERtODE5MmUxQW50Owotc3RhdGljIENPRVhfU1RBXzgxOTJFXzFBTlQJCUdMQ29leFN0YTgxOTJlMUFudDsKLXN0YXRpYyBQQ09FWF9TVEFfODE5MkVfMUFOVAlwQ29leFN0YT0mR0xDb2V4U3RhODE5MmUxQW50OwotCi1jb25zdCBjaGFyICpjb25zdCBHTEJ0SW5mb1NyYzgxOTJlMUFudFtdPXsKLQkiQlQgSW5mb1t3aWZpIGZ3XSIsCi0JIkJUIEluZm9bYnQgcnNwXSIsCi0JIkJUIEluZm9bYnQgYXV0byByZXBvcnRdIiwKLX07Ci0KLXU0Qnl0ZQlHTENvZXhWZXJEYXRlODE5MmUxQW50PTIwMTMwNzI5OwotdTRCeXRlCUdMQ29leFZlcjgxOTJlMUFudD0weDEwOwotCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gbG9jYWwgZnVuY3Rpb24gcHJvdG8gdHlwZSBpZiBuZWVkZWQKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLz09PT09PT09PT09P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W50X1N3aXRjaFNzVHlwZShwQnRDb2V4aXN0LCBGT1JDRV9FWEVDLCAyKTsKLQotCWhhbGJ0YzgxOTJlMWFudF9Qc1RkbWEocEJ0Q29leGlzdCwgRk9SQ0VfRVhFQywgRkFMU0UsIDgpOwotCWhhbGJ0YzgxOTJlMWFudF9Db2V4VGFibGVXaXRoVHlwZShwQnRDb2V4aXN0LCBGT1JDRV9FWEVDLCAwKTsKLX0KLQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIHdvcmsgYXJvdW5kIGZ1bmN0aW9uIHN0YXJ0IHdpdGggd2FfaGFsYnRjODE5MmUxYW50XwotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBleHRlcm4gZnVuY3Rpb24gc3RhcnQgd2l0aCBFWGhhbGJ0YzgxOTJlMWFudF8KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1WT0lECi1FWGhhbGJ0YzgxOTJlMWFudF9Jbml0SHdDb25maWcoCi0JSU4JUEJUQ19DT0VYSVNUCQlwQnRDb2V4aXN0Ci0JKQotewotCXU0Qnl0ZQl1NFRtcD0wOwotCXUxNgl1MlRtcD0wOwotCXUxQnl0ZQl1MVRtcD0wOwotCi0JQlRDX1BSSU5UKEJUQ19NU0dfSU5URVJGQUNFLCBJTlRGX0lOSVQsICgiW0JUQ29leF0sIDFBbnQgSW5pdCBIVyBDb25maWchIVxuIikpOwotCi0JLy8gYmFja3VwIHJmIDB4MWUgdmFsdWUKLQlwQ29leERtLT5idFJmMHgxZUJhY2t1cCA9IAotCQlwQnRDb2V4aXN0LT5idGNfZ2V0X3JmX3JlZyhwQnRDb2V4aXN0LCB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Z2luZy9ydGw4ODIxYWUvYnRjb2V4aXN0L2hhbGJ0YzgxOTJlMmFudC5jCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCBkMjM4MTc5Li4wMDAwMDAwCi0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4ODIxYWUvYnRjb2V4aXN0L2hhbGJ0YzgxOTJlMmFudC5jCisrKyAvZGV2L251bGwKQEAgLTEsNDExOCArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIERlc2NyaXB0aW9uOgotICoKLSAqIFRoaXMgZmlsZSBpcyBmb3IgUlRMODE5MkUgQ28tZXhpc3QgbWVjaGFuaXNtCi0gKgotICogSGlzdG9yeQotICogMjAxMi8xMS8xNSBDb3NhIGZpcnN0IGNoZWNrIGluLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIGluY2x1ZGUgZmlsZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpbmNsdWRlICJoYWxidF9wcmVjb21wLmgiCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICBHbG9iYWwgdmFyaWFibGVzLCB0aGVzZSBhcmUgc3RhdGljIHZhcmlhYmxlcwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIHN0cnVjdCBjb2V4X2RtXzgxOTJlXzJhbnQgZ2xjb2V4X2RtXzgxOTJlXzJhbnQ7Ci1zdGF0aWMgc3RydWN0IGNvZXhfZG1fODE5MmVfMmFudCAqY29leF9kbSA9ICZnbGNvZXhfZG1fODE5MmVfMmFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9zdGFfODE5MmVfMmFudCBnbGNvZXhfc3RhXzgxOTJlXzJhbnQ7Ci1zdGF0aWMgc3RydWN0IGNvZXhfc3RhXzgxOTJlXzJhbnQgKmNvZXhfc3RhID0gJmdsY29leF9zdGFfODE5MmVfMmFudDsKLQotc3RhdGljIGNvbnN0IGNoYXIgKmNvbnN0IEdMQnRJbmZvU3JjODE5MmUyQW50W10gPSB7Ci0JIkJUIEluZm9bd2lmaSBmd10iLAotCSJCVCBJbmZvW2J0IHJzcF0iLAotCSJCVCBJbmZvW2J0IGF1dG8gcmVwb3J0XSIsCi19OwotCi1zdGF0aWMgdTMyIGdsY29leF92ZXJfZGF0ZV84MTkyZV8yYW50ID0gMjAxMzA5MDI7Ci1zdGF0aWMgdTMyIGdsY29leF92ZXJfODE5MmVfMmFudCA9IDB4MzQ7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICBsb2NhbCBmdW5jdGlvbiBwcm90byB0eXBlIGlmIG5lZWRlZAotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIGxvY2FsIGZ1bmN0aW9uIHN0YXJ0IHdpdGggaGFsYnRjODE5MmUyYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIHU4IGhhbGJ0YzgxOTJlMmFudF9idHJzc2lfc3RhdGUodTggbGV2ZWxfbnVtLCB1OCByc3NpX3RocmVzaCwKLQkJCQkgICAgICAgdTggcnNzaV90aHJlc2gxKQotewotCWludCBidHJ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2V4aXN0LT5idGNfcmVhZF8xYnl0ZShidGNvZXhpc3QsIDB4MTAxKTsKLQl1OHRtcCB8PSBCSVQ0OwotCWJ0Y29leGlzdC0+YnRjX3dyaXRlXzFieXRlKGJ0Y29leGlzdCwgMHgxMDEsIHU4dG1wKTsKLQotCS8qIGVuYWJsZSBidCBjbG9jayB3aGVuIHdpZmkgaXMgZGlzYWJsZWQuICovCi0JdTh0bXAgPSBidGNvZXhpc3QtPmJ0Y19yZWFkXzFieXRlKGJ0Y29leGlzdCwgMHg5Myk7Ci0JdTh0bXAgfD0gQklUMDsKLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZShidGNvZXhpc3QsIDB4OTMsIHU4dG1wKTsKLQkvKiBlbmFibGUgYnQgY2xvY2sgd2hlbiBzdXNwZW5kLiAqLwotCXU4dG1wID0gYnRjb2V4aXN0LT5idGNfcmVhZF8xYnl0ZShidGNvZXhpc3QsIDB4Nyk7Ci0JdTh0bXAgfD0gQklUMDsKLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZShidGNvZXhpc3QsIDB4NywgdTh0bXApOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICB3b3JrIGFyb3VuZCBmdW5jdGlvbiBzdGFydCB3aXRoIHdhX2hhbGJ0YzgxOTJlMmFudF8KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgIGV4dGVybiBmdW5jdGlvbiBzdGFydCB3aXRoIEVYaGFsYnRjODE5MmUyYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdm9pZCBleF9oYWxidGM4MTkyZTJhbnRfaW5pdF9od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xlIG1vZGUgMTAwNjQ0CmluZGV4IDNmNWM0ZmQuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDg4MjFhZS9idGNvZXhpc3QvaGFsYnRjODcyM2EyYW50LmMKKysrIC9kZXYvbnVsbApAQCAtMSwzNzgwICswLDAgQEAKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBEZXNjcmlwdGlvbjoKLS8vCi0vLyBUaGlzIGZpbGUgaXMgZm9yIFJUTDg3MjNBIENvLWV4aXN0IG1lY2hhbmlzbQotLy8KLS8vIEhpc3RvcnkKLS8vIDIwMTIvMDgvMjIgQ29zYSBmaXJzdCBjaGVjayBpbi4KLS8vIDIwMTIvMTEvMTQgQ29zYSBSZXZpc2UgZm9yIDg3MjNBIDJBbnQgb3V0IHNvdXJjaW5nLgotLy8KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0KLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0vLyBpbmNsdWRlIGZpbGVzCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotI2luY2x1ZGUgIk1wX1ByZWNvbXAuaCIKLSNpZihCVF8zMF9TVVBQT1JUID09IDEpCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy8gR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLS8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1zdGF0aWMgQ09FWF9ETV84NzIzQV8yQU5UCUdMQ29leERtODcyM2EyQW50Owotc3RhdGljIFBDT0VYX0RNXzg3MjNBXzJBTlQgCXBDb2V4RG09JkdMQ29leERtODcyM2EyQW50Owotc3RhdGljIENPRVhfU1RBXzg3MjNBXzJBTlQJR0xDb2V4U3RhODcyM2EyQW50Owotc3RhdGljIFBDT0VYX1NUQV84NzIzQV8yQU5UCXBDb2V4U3RhPSZHTENvZXhTdGE4NzIzYTJBbnQ7Ci0KLWNvbnN0IGNoYXIgKmNvbnN0IEdMQnRJbmZvU3JjODcyM2EyQW50W109ewotCSJCVCBJbmZvW3dpZmkgZnddIiwKLQkiQlQgSW5mb1tidCByc3BdIiwKLQkiQlQgSW5mb1tidCBhdXRvIHJlcG9ydF0iLAotfTsKLQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIGxvY2FsIGZ1bmN0aW9uIHByb3RvIHR5cGUgaWYgbmVlZGVkCi0vLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIGxvY2FsIGZ1bmN0aW9uIHN0YXJ0IHdpdGggaGFsYnRjODcyM2EyYW50XwotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUJPT0xFQU4KLWhhbGJ0Yzg3MjNhMmFudF9Jc1dpZmlJZGxlKAotCUlOCVBCVENfQ09FWElTVAkJcEJ0Q29leGlzdAotCSkKLXsKLQlCT09MRUFOCQliV2lmaUNvbm5lY3RlZD1GQUxTRSwgYlNjYW49RkFMU0UsIGJMaW5rPUZBTFNFLCBiUm9hbT1GQUxTRTsKLQotCXBCdENvZXhpc3QtPmJ0Y19nZXQocEJ0Q29leGlzdCwgQlRDX0dFVF9CTF9XSUZJX0NPTk5FQ1RFRCwgJmJXaWZpQ29ubmVjdGVkKTsKLQlwQn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LQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogaW5jbHVkZSBmaWxlcwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpbmNsdWRlICJoYWxidF9wcmVjb21wLmgiCi0jaWYgMQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogR2xvYmFsIHZhcmlhYmxlcywgdGhlc2UgYXJlIHN0YXRpYyB2YXJpYWJsZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgc3RydWN0IGNvZXhfZG1fODcyM2JfMWFudCBnbGNvZXhfZG1fODcyM2JfMWFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9kbV84NzIzYl8xYW50ICpjb2V4X2RtID0gJmdsY29leF9kbV84NzIzYl8xYW50Owotc3RhdGljIHN0cnVjdCBjb2V4X3N0YV84NzIzYl8xYW50IGdsY29leF9zdGFfODcyM2JfMWFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9zdGFfODcyM2JfMWFudCAqY29leF9zdGEgPSAmZ2xjb2V4X3N0YV84NzIzYl8xYW50OwotCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgR0xCdEluZm9TcmM4NzIzYjFBbnRbXSA9IHsKLQkiQlQgSW5mb1t3aWZpIGZ3XSIsCi0JIkJUIEluZm9bYnQgcnNwXSIsCi0JIkJUIEluZm9bYnQgYXV0byByZXBvcnRdIiwKLX07Ci0KLXN0YXRpYyB1MzIgZ2xjb2V4X3Zlcl9kYXRlXzg3MjNiXzFhbnQgPSAyMDEzMDkwNjsKLXN0YXRpYyB1MzIgZ2xjb2V4X3Zlcl84NzIzYl8xYW50ID0gMHg0NTsKLQotLyoqKioqKioqKioqKio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0MCwgMHgyMCwgMHgxKTsKLQotCS8qQW50ZW5uYSBjb25maWcgKi8KLQloYWxidGM4NzIzYjFhbnRfU2V0QW50UGF0aChidGNvZXhpc3QsIEJUQ19BTlRfUEFUSF9QVEEsIHRydWUsIGZhbHNlKTsKLQkvKiBQVEEgcGFyYW1ldGVyICovCi0JaGFsYnRjODcyM2IxYW50X2NvZXhfdGFibGVfd2l0aF90eXBlKGJ0Y29leGlzdCwgRk9SQ0VfRVhFQywgMCk7Ci0KLX0KLQotc3RhdGljIHZvaWQgaGFsYnRjODcyM2IxYW50X3dpZmlfb2ZmX2h3X2NmZyhzdHJ1Y3QgYnRjX2NvZXhpc3QgKmJ0Y29leGlzdCkKLXsKLQkvKiBzZXQgd2xhbl9hY3QgdG8gbG93ICovCi0JYnRjb2V4aXN0LT5idGNfd3JpdGVfMWJ5dGUoYnRjb2V4aXN0LCAweDc2ZSwgMCk7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogd29yayBhcm91bmQgZnVuY3Rpb24gc3RhcnQgd2l0aCB3YV9oYWxidGM4NzIzYjFhbnRfCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIGV4dGVybiBmdW5jdGlvbiBzdGFydCB3aXRoIEVYaGFsYnRjODcyM2IxYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi12b2lkIGV4X2hhbGJ0Yzg3MjNiMWFudF9pbml0X2h3Y29uZmlnKHN0cnVjdCBidGNfY29leGlzdCAqYnRjb2V4aXN0KQotewotCWhhbGJ0Yzg3MjNiMWFudF9pbml0X2h3X2NvbmZpZyhidGNvZXhpc3QsIHR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ioqKioqKioqKioqKioqLwotI2luY2x1ZGUgImhhbGJ0X3ByZWNvbXAuaCIKLSNpZiAxCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEdsb2JhbCB2YXJpYWJsZXMsIHRoZXNlIGFyZSBzdGF0aWMgdmFyaWFibGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgc3RydWN0IGNvZXhfZG1fODcyM2JfMmFudCBnbGNvZXhfZG1fODcyM2JfMmFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9kbV84NzIzYl8yYW50ICpjb2V4X2RtID0gJmdsY29leF9kbV84NzIzYl8yYW50Owotc3RhdGljIHN0cnVjdCBjb2V4X3N0YV84NzIzYl8yYW50IGdsY29leF9zdGFfODcyM2JfMmFudDsKLXN0YXRpYyBzdHJ1Y3QgY29leF9zdGFfODcyM2JfMmFudCAqY29leF9zdGEgPSAmZ2xjb2V4X3N0YV84NzIzYl8yYW50OwotCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgZ2xidF9pbmZvX3NyY184NzIzYl8yYW50W10gPSB7Ci0JIkJUIEluZm9bd2lmaSBmd10iLAotCSJCVCBJbmZvW2J0IHJzcF0iLAotCSJCVCBJbmZvW2J0IGF1dG8gcmVwb3J0XSIsCi19OwotCi1zdGF0aWMgdTMyIGdsY29leF92ZXJfZGF0ZV84NzIzYl8yYW50ID0gMjAxMzExMTM7Ci1zdGF0aWMgdTMyIGdsY29leF92ZXJfODcyM2JfMmFudCA9IDB4M2Y7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogbG9jYWwgZnVuY3Rpb24gcHJvdG8gdHlwZSBpZiBuZWVkZWQKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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Ck7Ci0JLyogRm9yY2UgR05UX0JUIHRvIEhpZ2ggKi8KLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZV9iaXRtYXNrKGJ0Y29leGlzdCwgMHg3NjUsIDB4MTgsIDB4Myk7Ci0JLyogQlQgc2VsZWN0IHMwL3MxIGlzIGNvbnRyb2xsZWQgYnkgQlQgKi8KLQlidGNvZXhpc3QtPmJ0Y193cml0ZV8xYnl0ZV9iaXRtYXNrKGJ0Y29leGlzdCwgMHg2NywgMHgyMCwgMHgwKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogIHdvcmsgYXJvdW5kIGZ1bmN0aW9uIHN0YXJ0IHdpdGggd2FfaGFsYnRjODcyM2IyYW50XwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICBleHRlcm4gZnVuY3Rpb24gc3RhcnQgd2l0aCBFWGhhbGJ0Yzg3MjNiMmFudF8KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIGV4X2hhbGJ0Yzg3MjNiMmFudF9pbml0X2h3Y29uZmlnKHN0cnVjdCBidGNfY29leGlzdCAqYnRjb2V4aXN0KQotewotCXU4IHU4dG1wID0gMDsKLQotCUJUQ19QUklOVChCVENfTVNHX0lOVEVSRkFDRSwgSU5URl9JTklULAotCQkgICJbQlRDb2V4XSwgMkFudCBJbml0IEhXIENvbmZpZyEhXG4iKTsKLQljb2V4X2RtLT5idF9yZjB4MWVfYmFja3VwID0KLQkJYnRjb2V4aXN0LT5idGNfZ2V0X3JmX3JlZyhidGNvZXhpc3QsIEJUQ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dhcmUgRm91bmRhdGlvbiwgSW5jLiwKLSAqIDUxIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAsIFVTQQotICoKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jaW5jbHVkZSAiaGFsYnRfcHJlY29tcC5oIgotCi0vKiNpZihCVF8zMF9TVVBQT1JUID09IDEpKi8KLSNpZiAxCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCQlHbG9iYWwgdmFyaWFibGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgYnRfcHJvZmlsZV9zdHJpbmdbXSA9IHsKLQkiTk9ORSIsCi0JIkEyRFAiLAotCSJQQU4iLAotCSJISUQiLAotCSJTQ08iLAotfTsKLQotc3RhdGljIGNvbnN0IGNoYXIgKmNvbnN0IGJ0X3NwZWNfc3RyaW5nW10gPSB7Ci0JIjEuMGIiLAotCSIxLjEiLAotCSIxLjIiLAotCSIyLjArRURSIiwKLQkiMi4xK0VEUiIsCi0JIjMuMCtIUyIsCi0JIjQuMCIsCi19OwotCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgYnRfbGlua19yb2xlX3N0cmluZ1tdID0gewotCSJNYXN0ZXIiLAotCSJTbGF2ZSIsCi19OwotCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgaDJjX3N0YXRlX3N0cmluZ1tdID0gewotCSJzdWNjZXNzZnVsIiwKLQkiaDJjIGJ1c3kiLAotCSJyZiBvZmYiLAotCSJmdyBub3QgcmVhZCIsCi19OwotCi1zdGF0aWMgY29uc3QgY2hhciAqY29uc3QgaW9fc3RhdGVfc3RyaW5nW10gPSB7Ci0JIklPX1NUQVRVU19TV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fcmV0cnkrKzsKLQkJCQkJaWYgKGNhbDBfcmV0cnkgPT0gMTApCi0JCQkJCWJyZWFrOwotCQkJCX0KLQkJCQlpZiAoIShyeDFfZmFpbCB8fCByeDFfZmluaXNoKSAmJiB0eDFfZmluaXNoKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXJ0bF93cml0ZV9kd29yZChydGxwcml2LCAweGViOCwgMHgwNjAwMDAwMCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlyeF94MVtyeDFfYXZlcmFnZV0gPSBydGxfZ2V0X2JicmVnKGh3LCAweGQ0MCwgMHgwN2ZmMDAwMCkgPDwgMjE7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlydGxfd3JpdGVfZHdvcmQocnRscHJpdiwgMHhlYjgsIDB4MDgwMDAwMDApOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJcnhfeTFbcngxX2F2ZXJhZ2VdID0gcnRsX2dldF9iYnJlZyhodywgMHhkNDAsIDB4MDdmZjAwMDApIDw8IDIxOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJcngxaXFrb2sgPSB0cnVlOwotCQkJCQlSVF9UUkFDRShDT01QX0lRSywgREJHX0xPVUQsCi0JCQkJCQkoIlJYX1gxWyVkXSA9ICV4IDs7IFJYX1kxWyVkXSA9ICV4XG4iLAotCQkJCQkJcngxX2F2ZXJhZ2UsIChyeF94MVtyeDFfYXZlcmFnZV0pID4+IDIxICYgMHgwMDAwMDdmZiwKLQkJCQkJCXJ4MV9hdmVyYWdlLCAocnhfeTFbcngxX2F2ZXJhZ2VdKSA+PiAyMSAmIDB4MDAwMDA3ZmYpKTsKLQotCQkJCQlyeDFfYXZlcmFnZSsrOwotICAgICAgICAgICAgICAgICAgICAgICAgCX0KLSAgICAgICAgICAgICAgICAgICAgICAgIAllbHNlewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJcngxaXFrb2s9IGZhbHNlOwotICAgICAgICAgICAg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maW5lCUJYRFRYQUdDICAgICAgICAgICAgICAgICAgCTB4ZjAwMDAKLQotI2RlZmluZQlCUEFTVEFSVCAgICAgICAgICAgICAgICAgIAkweGYwMDAwMDAwCi0jZGVmaW5lCUJUUlNUQVJUICAgICAgICAgICAgICAgICAgCTB4MDBmMDAwMDAKLSNkZWZpbmUJQlJGU1RBUlQgICAgICAgICAgICAgICAgICAJMHgwMDAwZjAwMAotI2RlZmluZQlCQkJTVEFSVCAgICAgICAgICAgICAgICAgIAkweDAwMDAwMGYwCi0jZGVmaW5lCUJCQkNDS1NUQVJUICAgICAgICAgICAgICAgCTB4MDAwMDAwMGYKLSNkZWZpbmUJQlBBRU5EICAgICAgICAgICAgICAgICAgICAJMHhmCi0jZGVmaW5lCUJUUkVORCAgICAgICAgICAgICAgICAgICAgCTB4MGYwMDAwMDAKLSNkZWZpbmUJQlJGRU5EICAgICAgICAgICAgICAgICAgICAJMHgwMDBmMDAwMAotI2RlZmluZQlCQ0NBTUFTSyAgICAgICAgICAgICAgICAgIAkweDAwMDAwMGYwCi0jZGVmaW5lCUJSMlJDQ0FNQVNLICAgICAgICAgICAgICAgCTB4MDAwMDBmMDAKLSNkZWZpbmUJQkhTU0lfUjJUREVMQVkgICAgICAgICAgICAJMHhmODAwMDAwMAotI2RlZmluZQlCSFNTSV9UMlJERUxBWSAgICAgICAgICAgIAkweGY4MDAwMAotI2RlZmluZQlCQ09OVFhIU1NJICAgICAgICAgICAgICAgCTB4NDAwCi0jZGVmaW5lCUJJR0ZST01DQ0sgICAgICAgICAgICAgICAgCTB4MjAwCi0jZGVmaW5lCUJBR0NBRERSRVNTICAgICAgICAgICAgICAgCTB4M2YKLSNkZWZpbmUJQlJYSFBUWCAgICAgICAgICAgICAgICAgICAJMHg3MDAwCi0jZGVmaW5lCUJSWEhQMlJYICAgICAgICAgICAgICAgICAgCTB4MzgwMDAKLSNkZWZpbmUJQlJYSFBDQ0tJTkkgICAgICAgICAgICAgICAJMHhjMDAwMAotI2RlZmluZQlCQUdDVFhDT0RFICAgICAgICAgICAgICAgIAkweGMwMDAwMAotI2RlZmluZQlCQUdDUlhDT0RFICAgICAgICAgICAgICAgIAkweDMwMDAwMAotCi0jZGVmaW5lCUIzV0lSRURBVEFMRU5HVEggICAgICAgICAgCTB4ODAwCi0jZGVmaW5lCUIzV0lSRUFERFJFQUFMRU5HVEggICAgICAgCTB4NDAwCi0KLSNkZWZpbmUJQjNXSVJFUkZQT1dFUkRPV04gICAgICAgICAJMHgxCi0jZGVmaW5lCUI1R1BBUEVQT0xBUklUWSAgICAgICAgICAgCTB4NDAwMDAwMDAKLSNkZWZpbmUJQjJHUEFQRVBPTEFSSVRZICAgICAgICAgICAJMHg4MDAwMDAwMAotI2RlZmluZQlCUkZTV19UWERFRkFVTFRBTlQgICAgICAgIAkweDMKLSNkZWZpbmUJQlJGU1dfVFhPUFRJT05BTlQgICAgICAgICAJMHgzMAotI2RlZmluZQlCUkZTV19SWERFRkFVTFRBTlQgICAgICAgIAkweDMwMAotI2RlZmluZQlCUkZTV19SWE9QVElPTkFOVCAgICAgICAgIAkweDMwMDAKLSNkZWZpbmUJQlJGU0lfM1dJUkVEQVRBICAgICAgICAgICAJMHgxCi0jZGVmaW5lCUJSRlNJXzNXSVJFQ0xPQ0sgICAgICAgICAgCTB4MgotI2RlZmluZQlCUkZTSV8zV0lSRUxPQUQgICAgICAgICAgIAkweDQKLSNkZWZpbmUJQlJGU0lfM1dJUkVSVyAgICAgICAgICAgICAJMHg4Ci0jZGVmaW5lCUJSRlNJXzNXSVJFICAgICAgICAgICAgICAgCTB4ZgotCi0jZGVmaW5lCUJSRlNJX1JGRU5WICAgICAgICAgICAgICAgCTB4MTAKLQotI2RlZmluZQlCUkZTSV9UUlNXICAgICAgICAgICAgICAgIAkweDIwCi0jZGVmaW5lCUJSRlNJX1RSU1dCICAgICAgICAgICAgICAgCTB4NDAKLSNkZWZpbmUJQlJGU0lfQU5UU1cgICAgICAgICAgICAgICAJMHgxMDAKLSNkZ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BVEhfQSAgICAgICAgICAgICAgICAgCTB4MQotI2RlZmluZQlCVFhQQVRIX0IgICAgICAgICAgICAgICAgIAkweDIKLSNkZWZpbmUJQlRYUEFUSF9DICAgICAgICAgICAgICAgICAJMHg0Ci0jZGVmaW5lCUJUWFBBVEhfRCAgICAgICAgICAgICAgICAgCTB4OAotI2RlZmluZQlCVFJTU0lfRlJFUSAgICAgICAgICAgICAgIAkweDIwMAotI2RlZmluZQlCQURDX0JBQ0tPRkYgICAgICAgICAgICAgIAkweDMwMDAKLSNkZWZpbmUJQkRGSVJfQkFDS09GRiAgICAgICAgICAgICAJMHhjMDAwCi0jZGVmaW5lCUJUUlNTSV9MQVRDSF9QSEFTRSAgICAgICAgIAkweDEwMDAwCi0jZGVmaW5lCUJSWF9MRENfT0ZGU0VUICAgICAgICAgICAgIAkweGZmCi0jZGVmaW5lCUJSWF9RRENfT0ZGU0VUICAgICAgICAgICAgIAkweGZmMDAKLSNkZWZpbmUJQlJYX0RGSVJfTU9ERSAgICAgICAgICAgICAgCTB4MTgwMDAwMAotI2RlZmluZQlCUlhfRENORl9UWVBFICAgICAgICAgICAgICAJMHhlMDAwMDAwCi0jZGVmaW5lCUJSWElRSU1CX0EgICAgICAgICAgICAgICAJMHgzZmYKLSNkZWZpbmUJQlJYSVFJTUJfQiAgICAgICAgICAgICAgIAkweGZjMDAKLSNkZWZpbmUJQlJYSVFJTUJfQyAgICAgICAgICAgICAgIAkweDNmMDAwMAotI2RlZmluZQlCUlhJUUlNQl9EICAgICAgICAgICAgICAgCTB4ZmZjMDAwMDAKLSNkZWZpbmUJQkRDX0RDX05PVENIICAgICAgICAgICAgIAkweDYwMDAwCi0jZGVmaW5lCUJSWE5CX05PVENIICAgICAgICAgICAgICAJMHgxZjAwMDAwMAotI2RlZmluZQlCUERfVEggICAgICAgICAgICAgICAgICAgCTB4ZgotI2RlZmluZQlCUERfVEhfT1BUMiAgICAgICAgICAgICAgCTB4YzAwMAotI2RlZmluZQlCUFdFRF9USCAgICAgICAgICAgICAgICAgCTB4NzAwCi0jZGVmaW5lCUJJRk1GX1dJTl9MICAgICAgICAgICAgICAJMHg4MDAKLSNkZWZpbmUJQlBEX09QVElPTiAgICAgICAgICAgICAgIAkweDEwMDAKLSNkZWZpbmUJQk1GX1dJTl9MICAgICAgICAgICAgICAgIAkweGUwMDAKLSNkZWZpbmUJQkJXX1NFQVJDSF9MICAgICAgICAgICAgIAkweDMwMDAwCi0jZGVmaW5lCUJXSU5fRU5IX0wgICAgICAgICAgICAgICAJMHhjMDAwMAotI2RlZmluZQlCQldfVEggICAgICAgICAgICAgICAgICAgCTB4NzAwMDAwCi0jZGVmaW5lCUJFRF9USDIgICAgICAgICAgICAgICAgICAJMHgzODAwMDAwCi0jZGVmaW5lCUJCV19PUFRJT04gICAgICAgICAgICAgICAJMHg0MDAwMDAwCi0jZGVmaW5lCUJSQURJT19USCAgICAgICAgICAgICAgICAJMHgxODAwMDAwMAotI2RlZmluZQlCV0lORE9XX0wgICAgICAgICAgICAgICAgCTB4ZTAwMDAwMDAKLSNkZWZpbmUJQlNCRF9PUFRJT04gICAgICAgICAgICAgIAkweDEKLSNkZWZpbmUJQkZSQU1FX1RIICAgICAgICAgICAgICAgIAkweDFjCi0jZGVmaW5lCUJGU19PUFRJT04gICAgICAgICAgICAgICAJMHg2MAotI2RlZmluZQlCRENfU0xPUEVfQ0hFQ0sgICAgICAgICAgCTB4ODAKLSNkZWZpbmUJQkZHVUFSRF9DT1VOVEVSX0RDX0wgICAgIAkweGUwMAotI2RlZmluZQlCRlJBTUVfV0VJR0hUX1NIT1JUICAgICAgCTB4NzAwMAotI2RlZmluZQlCU1VCX1RVTkUgICAgICAgICAgICAgICAgCTB4ZTAwMDAwCi0jZGVmaW5lCUJGUkFNRV9EQ19MRU5HVEggICAgICAgICAJMHhlMDAwMDAwCi0jZGVmaW5lCUJTQkRfU1RBUlRfT0ZGU0VUICAgICAgICAJMHgzMDAwMDAwMAotI2RlZmluZQlCRlJBTUVfVEhfMiAgICAgICAgICAgICAgCTB4NwotI2RlZmluZQlCRlJBTUVfR0kyX1RIICAgICAgICAgICAgCTB4MzgKLSNkZWZpbmUJQkdJMl9TWU5DX0VOICAgICAgICAgICAgIAkweDQwCi0jZGVmaW5lCUJTQVJDSF9TSE9SVF9FQVJMWSAgICAgICAJMHgzMDAKLSNkZWZpbmUJQlNBUkNIX1NIT1JUX0xBVEUgICAgICAgIAkweGMwMAotI2RlZmluZQlCU0FSQ0hfR0kyX0xBVEUgICAgICAgICAgCTB4NzAwMDAKLSNkZWZpbmUJQkNGT0FOVFNVTSAgICAgICAgICAgICAgIAkweDEKLSNkZWZpbmUJQkNGT0FDQyAgICAgICAgICAgICAgICAgIAkweDIKLSNkZWZpbmUJQkNGT1NUQVJUT0ZGU0VUICAgICAgICAgIAkweGMKLSNkZWZpbmUJQkNGT0xPT1BCQUNLICAgICAgICAgICAgIAkweDcwCi0jZGVmaW5lCUJDRk9TVU1XRUlHSFQgICAgICAgICAgICAJMHg4MAotI2RlZmluZQlCREFHQ0VOQUJMRSAgICAgICAgICAgICAgCTB4MTAwMDAKLSNkZWZpbmUJQlRYSVFJTUJfQSAgICAgICAgICAgICAgIAkweDNmZgotI2RlZmluZQlCVFhJUUlNQl9iICAgICAgICAgICAgICAgCTB4ZmMwMAotI2RlZmluZQlCVFhJUUlNQl9DICAgICAgICAgICAgICAgCTB4M2YwMDAwCi0jZGVmaW5lCUJUWElRSU1CX0QgICAgICAgICAgICAgICAJMHhmZmMwMDAwMAotI2RlZmluZQlCVFhJRENPRkZTRVQgICAgICAgICAgICAgCTB4ZmYKLSNkZWZpbmUJQlRYSVFEQ09GRlNFVCAgICAgICAgICAgICAJMHhmZjAwCi0jZGVmaW5lCUJUWERGSVJNT0RFICAgICAgICAgICAgICAJMHgxMDAwMAotI2RlZmluZQlCVFhQRVNVRE9fTk9JU0VPTiAgICAgICAgIAkweDQwMDAwMDAKLSNkZWZpbmUJQlRYUEVTVURPX05PSVNFX0EgICAgICAgIC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gICAgICAgICAJMHgyMDAwMDAwMAotI2RlZmluZQlCUlhBR0NfRlJFRVpFX1RIUkVTX01PREUgICAgMHg0MDAwMDAwMAotI2RlZmluZQlCUlhfT1ZFUkZMT1dfQ0hFQ0tUWVBFICAgICAJMHg4MDAwMDAwMAotI2RlZmluZQlCUlhfQUdDU0hJRlQgICAgICAgICAgICAgIAkweDdmCi0jZGVmaW5lCUJUUlNXX1RSSV9PTkxZICAgICAgICAgICAJMHg4MAotI2RlZmluZQlCUE9XRVJfVEhSRVMgICAgICAgICAgICAgIAkweDMwMAotI2RlZmluZQlCUlhBR0NfRU4gICAgICAgICAgICAgICAgIAkweDEKLSNkZWZpbmUJQlJYQUdDX1RPR0VUSEVSX0VOICAgICAgICAgCTB4MgotI2RlZmluZQlCUlhBR0NfTUlOICAgICAgICAgICAgICAgIAkweDQKLSNkZWZpbmUJQlJYSFBfSU5JICAgICAgICAgICAgICAgIAkweDcKLSNkZWZpbmUJQlJYSFBfVFJMTkEgICAgICAgICAgICAgIAkweDcwCi0jZGVmaW5lCUJSWEhQX1JTU0kgICAgICAgICAgICAgICAJMHg3MDAKLSNkZWZpbmUJQlJYSFBfQkJQMSAgICAgICAgICAgICAgIAkweDcwMDAKLSNkZWZpbmUJQlJYSFBfQkJQMiAgICAgICAgICAgICAgIAkweDcwMDAwCi0jZGVmaW5lCUJSWEhQX0JCUDMgICAgICAgICAgICAgICAJMHg3MDAwMDAKLSNkZWZpbmUJQlJTU0lfSCAgICAgICAgICAgICAgICAgIAkweDdmMDAwMAotI2RlZmluZQlCUlNTSV9HRU4gICAgICAgICAgICAgICAgCTB4N2YwMDAwMDAKLSNkZWZpbmUJQlJYU0VUVExFX1RSU1cgICAgICAgICAgIAkweDcKLSNkZWZpbmUJQlJYU0VUVExFX0xOQSAgICAgICAgICAgIAkweDM4Ci0jZGVmaW5lCUJSWFNFVFRMRV9SU1NJICAgICAgICAgICAJMHgxYzAKLSNkZWZpbmUJQlJYU0VUVExFX0JCUCAgICAg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ICAgCTEyCi0jZGVmaW5lCUJOT0lTRV9FTl9QV0RCICAgICAgICAgICAgIAkweGZmZmYKLSNkZWZpbmUJQkNDX1BPV0VSX0RCICAgICAgICAgICAgIAkweGZmZmYwMDAwCi0jZGVmaW5lCUJNT0lTRV9QV0RCICAgICAgICAgICAgICAJMHhmZmZmCi0jZGVmaW5lCUJQT1dFUk1FQVNUX0xFTkdUSCAgICAgICAgCTEwCi0jZGVmaW5lCUJQT1dFUk1FQVNGX0xFTkdUSCAgICAgICAgCTMKLSNkZWZpbmUJQlJYX0hUX0JXICAgICAgICAgICAgICAgIAkweDEKLSNkZWZpbmUJQlJYU0MgICAgICAgICAgICAgICAgICAgIAkweDYKLSNkZWZpbmUJQlJYX0hUICAgICAgICAgICAgICAgICAgIAkweDgKLSNkZWZpbmUJQk5CX0lOVEZfREVUX09OICAgICAgICAgIAkweDEKLSNkZWZpbmUJQklOVEZfV0lOX0xFTl9DRkcgICAgICAgIAkweDMwCi0jZGVmaW5lCUJOQl9JTlRGX1RIX0NGRyAgICAgICAgICAJMHgxYzAKLSNkZWZpbmUJQlJGR0FJTiAgICAgICAgICAgICAgICAgIAkweDNmCi0jZGVmaW5lCUJUQUJMRVNFTCAgICAgICAgICAgICAgICAJMHg0MAotI2RlZmluZQlCVFJTVyAgICAgICAgICAgICAgICAgICAgCTB4ODAKLSNkZWZpbmUJQlJYU05SX0EgICAgICAgICAgICAgICAgIAkweGZmCi0jZGVmaW5lCUJSWFNOUl9CICAgICAgICAgICAgICAgICAJMHhmZjAwCi0jZGVmaW5lCUJSWFNOUl9DICAgICAgICAgICAgICAgICAJMHhmZjAwMDAKLSNkZWZpbmUJQlJYU05SX0QgICAgICAgICAgICAgICAgIAkweGZmMDAwMDAwCi0jZGVmaW5lCUJTTlJfRVZNVF9MRU5HVEggICAgICAgICAgIAk4Ci0jZGVmaW5lCUJTTlJfRVZNRl9MRU5HVEggICAgICAgICAgIAkxCi0jZGVmaW5lCUJDU0kxU1QgICAgICAgICAg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0hTTU9PVEhfQ0ZHMiAgICAgICAgICAgIAkweDFjMAotI2RlZmluZQlCQ0hTTU9PVEhfQ0ZHMyAgICAgICAgICAgIAkweGUwMAotI2RlZmluZQlCQ0hTTU9PVEhfQ0ZHNCAgICAgICAgICAgIAkweDcwMDAKLSNkZWZpbmUJQk1SQ01PREUgICAgICAgICAgICAgICAgIAkweDgwMDAwMAotI2RlZmluZQlCVEhFVk1DRkcgICAgICAgICAgICAgICAgCTB4NzAwMDAwMAotCi0jZGVmaW5lCUJMT09QX0ZJVF9UWVBFICAgICAgICAgICAgIAkweDEKLSNkZWZpbmUJQlVQRF9DRk8gICAgICAgICAgICAgICAgICAJMHg0MAotI2RlZmluZQlCVVBEX0NGT19PRkZEQVRBICAgICAgICAgICAJMHg4MAotI2RlZmluZQlCQURWX1VQRF9DRk8gICAgICAgICAgICAgICAJMHgxMDAKLSNkZWZpbmUJQkFEVl9USU1FX0NUUkwgICAgICAgICAgICAgCTB4ODAwCi0jZGVmaW5lCUJVUERfQ0xLTyAgICAgICAgICAgICAgICAgCTB4MTAwMAotI2RlZmluZQlCRkMgICAgICAgICAgICAgICAgICAgICAgCTB4NjAwMAotI2RlZmluZQlCVFJBQ0tJTkdfTU9ERSAgICAgICAgICAgIAkweDgwMDAKLSNkZWZpbmUJQlBIQ01QX0VOQUJMRSAgICAgICAgICAgICAJMHgxMDAwMAotI2RlZmluZQlCVVBEX0NMS09fTFRGICAgICAgICAgICAgICAJMHgyMDAwMAotI2RlZmluZQlCQ09NX0NIX0NGTyAgICAgICAgICAgICAgICAJMHg0MDAwMAotI2RlZmluZQlCQ1NJX0VTVElfTU9ERSAgICAgICAgICAgICAJMHg4MDAwMAotI2RlZmluZQlCQURWX1VQRF9FUVogICAgICAgICAgICAgICAJMHgxMDAwMDAKLSNkZWZpbmUJQlVDSENGRyAgICAgICAgICAgICAgICAgIAkweDcwMDAwMDAKLSNkZWZpbmUJQlVQREVRWiAgICAgICAgICAgICAgICAgIAkweDgwMDAwMD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MAotI2RlZmluZQlCUlRMODI1NlJFR19NT0RFX0NUUkwwICAgICAgMHg0MAotI2RlZmluZQlCUlRMODI1NlJFR19UWExQRkJXICAgICAgICAgMHgxOAotI2RlZmluZQlCUlRMODI1NlJFR19SWExQRkJXICAgICAgICAgMHg2MDAKLQotI2RlZmluZQlCUlRMODI1OF9UWExQRkJXICAgICAgICAgIAkweGMKLSNkZWZpbmUJQlJUTDgyNThfUlhMUEZCVyAgICAgICAgICAJMHhjMDAKLSNkZWZpbmUJQlJUTDgyNThfUlNTSUxQRkJXICAgICAgICAJMHhjMAotCi0jZGVmaW5lCUJCWVRFMCAgICAgICAgICAgICAgICAgICAgCTB4MQotI2RlZmluZQlCQllURTEgICAgICAgICAgICAgICAgICAgIAkweDIKLSNkZWZpbmUJQkJZVEUyICAgICAgICAgICAgICAgICAgICAJMHg0Ci0jZGVmaW5lCUJCWVRFMyAgICAgICAgICAgICAgICAgICAgCTB4OAotI2RlZmluZQlCV09SRDAgICAgICAgICAgICAgICAgICAgIAkweDMKLSNkZWZpbmUJQldPUkQxICAgICAgICAgICAgICAgICAgICAJMHhjCi0jZGVmaW5lCUJXT1JEICAgICAgICAgICAgICAgICAgICAJMHhmCi0KLSNkZWZpbmUJTUFTS0JZVEUwICAgICAgICAgICAgICAgIAkweGZmCi0jZGVmaW5lCU1BU0tCWVRFMSAgICAgICAgICAgICAgICAJMHhmZjAwCi0jZGVmaW5lCU1BU0tCWVRFMiAgICAgICAgICAgICAgICAJMHhmZjAwMDAKLSNkZWZpbmUJTUFTS0JZVEUzICAgICAgICAgICAgICAgIAkweGZmMDAwMDAwCi0jZGVmaW5lCU1BU0tIV09SRCAgICAgICAgICAgICAgICAJMHhmZmZmMDAwMAotI2RlZmluZQlNQVNLTFdPUkQgICAgICAgICAgICAgICAgCTB4MDAwMGZmZmYKLSNkZWZpbmUJTUFTS0RXT1JECQkJCQkweGZmZmZmZmZmCi0jZGVmaW5lCU1BU0sxMkJJVFMJCQkJCTB4ZmZmC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gMC4KICAqICBAcGFyYW0geCB0aGUgZXhwcmVzc2lvbiB0byB0cnkKQEAgLTE2Nyw3ICsxMTQsNiBAQAogI2RlZmluZSBJTkZPREVWWChkZXZubywgZm10LCBhcmdzLi4uKSAgICAgTE9HSU5GREVWWChkZXZubywgZm10LCAjIyBhcmdzKQogI2RlZmluZSBERUJVR0RFVihkZXZuYW1lLCBmbXQsIGFyZ3MuLi4pICAgREJHSU5GREVWKGRldm5hbWUsIGZtdCwgIyMgYXJncykKIAotCiAvKiBAfSAqLwogCiAvKiogVmVyaWZpZXMgdGhlIGNvbnNpc3RlbmN5IG9mIHlvdXIgUFJJVkFURURFVklDRURBVEEgc3RydWN0dXJlIHVzaW5nCkBAIC0xOTIsOTQgKzEzOCw2IEBACiAJICgoZmQpLT5zaWcxID09IHNpemVvZihQUklWQVRFRklMRURBVEEpKSAmJiAgICBcCiAJICgoZmQpLT5zaWcyID09IGZkKSkKIAotLyoqIExvY2tzIGRkLT5sb2NrRGV2IGlmIHlvdSBoYXZuJ3QgYWxyZWFkeSBsb2NrZWQgaXQgKi8KLSNkZWZpbmUgTE9DS0RFVihkZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKCFsb2NrZWREZXYpIHsJCQkJICAgICAgIFwKLQkJCXNwaW5fbG9jaygmZGQtPmxvY2tEZXYpOwkJICAgICAgIFwKLQkJCWxvY2tlZERldiA9IFRSVUU7CQkJICAgICAgIFwKLQkJfQkJCQkJCSAgICAgICBcCi0JfQotCi0vKiogVW5sb2NrcyBkZC0+bG9ja0RldiBpZiB5b3UgcHJldmlvdXNseSBsb2NrZWQgaXQgKi8KLSNkZWZpbmUgVU5MT0NLREVWKGRkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKGxvY2tlZERldikgewkJCQkgICAgICAgXAotCQkJc3Bpbl91bmxvY2soJmRkLT5sb2NrRGV2KTsJCSAgICAgICBcCi0JCQlsb2NrZWREZXYgPSBGQUxTRTsJCQkgICAgICAgXAotCQl9CQkJCQkJICAgICAgIFwKLQl9Ci0KLS8qKiBMb2NrcyBkZC0+bG9ja0RldklTUiBpZiB5b3UgaGF2bid0IGFscmVhZHkgbG9ja2VkIGl0ICovCi0jZGVmaW5lIExPQ0tERVZJU1IoZGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWlmICghbG9ja2VkRGV2SVNSKSB7CQkJCSAgICAgICBcCi0JCQlzcGluX2xvY2tfaXJxc2F2ZSgmZGQtPmxvY2tEZXZJU1IsIGZsYWdzKTsgICAgIFwKLQkJCWxvY2tlZERldklTUiA9IFRSVUU7CQkJICAgICAgIFwKLQkJfQkJCQkJCSAgICAgICBcCi0JfQotCi0vKiogVW5sb2NrcyBkZC0+bG9ja0RldklTUiBpZiB5b3UgcHJldmlvdXNseSBsb2NrZWQgaXQgKi8KLSNkZWZpbmUgVU5MT0NLREVWSVNSKGRkKQkJCQkJCVwKLQl7CQkJCQkJCQlcCi0JCWlmIChsb2NrZWREZXZJU1IpIHsJCQkJCVwKLQkJCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJmRkLT5sb2NrRGV2SVNSLCBmbGFncyk7IFwKLQkJCWxvY2tlZERldklTUiA9IEZBTFNFOwkJCQlcCi0JCX0JCQkJCQkJXAotCX0KLQotLyoqIExvY2tzIExvY2tHbG9iYWxJU1IgaWYgeW91IGhhdm4ndCBhbHJlYWR5IGxvY2tlZCBpdCAqLwotI2RlZmluZSBMT0NLR0xPQkFMSVNSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlpZiAoIWxvY2tlZEdsb2JhbElTUikgewkJCQkgICAgICAgXAotCQkJc3Bpbl9sb2NrX2lycXNhdmUoJkxvY2tHbG9iYWxJU1IsIGZsYWdzKTsgICAgICBcCi0JCQlsb2NrZWRHbG9iYWxJU1IgPSBUUlVFOwkJCSAgICAgICBcCi0JCX0JCQkJCQkgICAgICAgXAotCX0KLQotLyoqIFVubG9ja3MgTG9ja0dsb2JhbElTUiBpZiB5b3UgcHJldmlvdXNseSBsb2NrZWQgaXQgKi8KLSNkZWZpbmUgVU5MT0NLR0xPQkFMSVNSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKGxvY2tlZEdsb2JhbElTUikgewkJCQkgICAgICAgXAotCQkJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmTG9ja0dsb2JhbElTUiwgZmxhZ3MpOyBcCi0JCQlsb2NrZWRHbG9iYWxJU1IgPSBGQUxTRTsJCSAgICAgICBcCi0JCX0JCQkJCQkgICAgICAgXAotCX0KLQotLyoqIExvY2tzIExvY2tHbG9iYWwgaWYgeW91IGhhdm4ndCBhbHJlYWR5IGxvY2tlZCBpdCAqLwotI2RlZmluZSBMT0NLR0xPQkFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlpZiAoIWxvY2tlZEdsb2JhbCkgewkJCQkgICAgICAgXAotCQk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