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KKyAgICAgICAgICAgICAgICBjb3JyZXNwb25kaW5nIGNvbWJpbmVyIG91dHB1dCBpcyB3aXJlZC4KKworICBPcHRpb25hbCBwcm9wZXJ0aWVzOgorICAtLS0tLS0tLS0tLS0tLS0tLS0tLQorICAtIHRpLGM2NHgrbWVnYW1vZC1waWMtbXV4OiBBcnJheSBvZiAxMiBjZWxscyBjb3JyZXNwbmRpbmcgdG8gdGhlIDEyIGNvcmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpb3JpdHkgaW50ZXJydXB0cy4gVGhlIGZpcnN0IGNlbGwgY29ycmVzcG9uZHMgdG8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29yZSBwcmlvcml0eSA0IGFuZCB0aGUgbGFzdCBjZWxsIGNvcnJlc3BvbmRzIHRvCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcmUgcHJpb3JpdHkgMTUuIFRoZSB2YWx1ZSBvZiBlYWNoIGNlbGwgaXMgdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lZ2Ftb2R1bGUgaW50ZXJydXB0IHNvdXJjZSB3aGljaCBpcyBNVVhlZCB0bworICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgY29yZSBpbnRlcnJ1cHQgY29ycmVzcG9uZGluZyB0byB0aGUgY2VsbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbi4gQWxsb3dlZCB2YWx1ZXMgYXJlIDQgLSAxMjcuIE1hcHBpbmcgZm9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdHMgMCAtIDMgKGNvbWJpbmVkIGludGVycnVwdCBzb3VyY2VzKSBhcmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlZC4KKworICBJbnRlcnJ1cHQgU3BlY2lmaWVyIERlZmluaXRpb24KKyAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgIFNpbmdsZSBjZW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gU1cyCSAgICAocmVnaXN0ZXIgMjUsIGJpdCAwKQorICAgIHN3MyAgICAgICA6IHJlZ3VsYXRvciBTVzMJICAgIChyZWdpc3RlciAyNiwgYml0IDApCisgICAgc3c0ICAgICAgIDogcmVndWxhdG9yIFNXNAkgICAgKHJlZ2lzdGVyIDI3LCBiaXQgMCkKKyAgICBzd2JzdCAgICAgOiByZWd1bGF0b3IgU1dCU1QJICAgIChyZWdpc3RlciAyOSwgYml0IDIwKQorICAgIHZnZW4xICAgICA6IHJlZ3VsYXRvciBWR0VOMQkgICAgKHJlZ2lzdGVyIDMyLCBiaXQgMCkKKyAgICB2aW9oaSAgICAgOiByZWd1bGF0b3IgVklPSEkJICAgIChyZWdpc3RlciAzMiwgYml0IDMpCisgICAgdmRpZyAgICAgIDogcmVndWxhdG9yIFZESUcJICAgIChyZWdpc3RlciAzMiwgYml0IDkpCisgICAgdmdlbjIgICAgIDogcmVndWxhdG9yIFZHRU4yCSAgICAocmVnaXN0ZXIgMzIsIGJpdCAxMikKKyAgICB2cGxsICAgICAgOiByZWd1bGF0b3IgVlBMTAkgICAgKHJlZ2lzdGVyIDMyLCBiaXQgMTUpCisgICAgdnVzYjIgICAgIDogcmVndWxhdG9yIFZVU0IyCSAgICAocmVnaXN0ZXIgMzIsIGJpdCAxOCkKKyAgICB2Z2VuMyAgICAgOiByZWd1bGF0b3IgVkdFTjMJICAgIChyZWdpc3RlciAzMywgYml0IDApCisgICAgdmNhbSAgICAgIDogcmVndWxhdG9yIFZDQU0JICAgIChyZWdpc3RlciAzMywgYml0IDYpCisgICAgdnZpZGVvICAgIDogcmVndWxhdG9yIFZWSURFTyAgICAocmVnaXN0ZXIgMzMsIGJpdCAxMikKKyAgICB2YXVkaW8gICAgOiByZWd1bGF0b3IgVkFVRElPICAgIChyZWdpc3RlciAzMywgYml0IDE1KQorICAgIHZzZCAgICAgICA6IHJlZ3VsYXRvciBWU0QJICAgIChyZWdpc3RlciAzMywgYml0IDE4KQorICAgIGdwbz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OMkwKKyAgKiBJTjJSCisgICogSU4zTAorICAqIElOM1IKKyAgKiBETUlDREFUCisgICogSFBPVVRMCisgICogSFBPVVRSCisgICogTElORU9VVEwKKyAgKiBMSU5FT1VUUgorICAqIExPUAorICAqIExPTgorICAqIFJPUAorICAqIFJPTgorICAqIE1JQ0JJQVMKKworICBCb2FyZCBjb25uZWN0b3JzOgorCisgICogSGVhZHBob25lIEphY2sKKyAgKiBJbnQgU3BrCisgICogTWljIEphY2sKKworLSBudmlkaWEsaTJzLWNvbnRyb2xsZXIgOiBUaGUgcGhhbmRsZSBvZiB0aGUgVGVncmEgSTJTMSBjb250cm9sbGVyCistIG52aWRpYSxhdWRpby1jb2RlYyA6IFRoZSBwaGFuZGxlIG9mIHRoZSBXTTg5MDMgYXVkaW8gY29kZWMKKworT3B0aW9uYWwgcHJvcGVydGllczoKKy0gbnZpZGlhLHNwa3ItZW4tZ3Bpb3MgOiBUaGUgR1BJTyB0aGF0IGVuYWJsZXMgdGhlIHNwZWFrZXJzCistIG52aWRpYSxocC1tdXRlLWdwaW9zIDogVGhlIEdQSU8gdGhhdCBtdXRlcyB0aGUgaGVhZHBob25lcworLSBudmlkaWEsaHAtZGV0LWdwaW9zIDogVGhlIEdQSU8gdGhhdCBkZXRlY3QgaGVhZHBob25lcyBhcmUgcGx1Z2dlZCBpbgorLSBudmlkaWEsaW50LW1pYy1lbi1ncGlvcyA6IFRoZSBHUElPIHRoYXQgZW5hYmxlcyB0aGUgaW50ZXJuYWwgbWljcm9waG9uZQorLSBudmlkaWEsZXh0LW1pYy1lbi1ncGlvcyA6IFRoZSBHUElPIHRoYXQgZW5hYmxlcyB0aGUgZXh0ZXJuYWwgbWljcm9waG9uZQorCitFeGFtcGxlOgorCitzb3VuZCB7CisJY29tcGF0aWJsZSA9ICJudmlkaWEsdGVncmEtYXVkaW8td204OTAzLWhhcm1vbnkiLAorCQkgICAgICJudmlkaWEsdGVncmEtYXVkaW8td204OTAzIgorCW52aWRpYSxtb2RlbC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m90ZSB0aGF0IGlmIGdlc3R1cmUgYW5kIGFkZGl0aW9uYWwgYnV0dG9uaSAoQml0NH5CaXQ3KQorICAgICAgICAgICAgKiBOb3RlIHRoYXQgaWYgZ2VzdHVyZSBhbmQgYWRkaXRpb25hbCBidXR0b24gKEJpdDR+Qml0NykKICAgICAgICAgICAgICAgaGFwcGVuIGF0IHRoZSBzYW1lIHRpbWUsIHRoZSBidXR0b24gaW5mb3JtYXRpb24gd2lsbCBub3QKICAgICAgICAgICAgICAgYmUgc2VudC4KICAgICAgICAgQml0M35CaXQwID0+IFJlc2VydmVkCkBAIC0yMjcsNiArMjMwLDcgQEAKIEJ5dGUgMTogQml0N35CaXQ2ID0+IDAwLCBOb3JtYWwgZGF0YSBwYWNrZXQKICAgICAgICAgICAgICAgICAgID0+IDAxLCBBYnNvbHV0ZSBjb29yZGluYXRlcyBwYWNrZXQKICAgICAgICAgICAgICAgICAgID0+IDEwLCBOb3RpZnkgcGFja2V0CisgICAgICAgICAgICAgICAgICA9PiAxMSwgTm9ybWFsIGRhdGEgcGFja2V0IHdpdGggb24tcGFkIGNsaWNrCiAgICAgICAgIEJpdDUgPT4gVmFsaWQgYml0LCAwIG1lYW5zIHRoYXQgdGhlIGNvb3JkaW5hdGUgaXMgaW52YWxpZCBvciBmaW5nZXIgdXAuCiAgICAgICAgICAgICAgICAgV2hlbiBib3RoIGZpbmdlcnMgYXJlIHVwLCB0aGUgbGFzdCB0d28gcmVwb3J0cyBoYXZlIHplcm8gdmFsaWQKICAgICAgICAgICAgICAgICBiaXQuCkBAIC0yNTMsNiArMjU3LDcgQEAKIEJ5dGUgMTogQml0N35CaXQ2ID0+IDAwLCBOb3JtYWwgZGF0YSBwYWNrZXQKICAgICAgICAgICAgICAgICAgID0+IDAxLCBBYnNvbHV0ZSBjb29yZGluYXRpb24gcGFja2V0CiAgICAgICAgICAgICAgICAgICA9PiAxMCwgTm90aWZ5IHBhY2tldAorICAgICAgICAgICAgICAgICAgPT4gMTEsIE5v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JpdCA9PSAxKSwgTUZNQyBwYWNrZXQgMSAoYnl0ZSAxLCBiaXQgMiA9PSAwKSwKKwlNRk1DIHBhY2tldCAyIChieXRlIDEsIGJpdCAyID09IDEpLCBNRk1DIHBhY2tldCAxLCBNRk1DIHBhY2tldCAyLAorCS4uLiwgbm90aWZ5IHBhY2tldCAodmFsaWQgYml0ID09IDApCisKKwlUaGF0IGlzLCB3aGVuIHRoZSBkZXZpY2UgaXMgaW4gTUZNQyBtb2RlLCB0aGUgaG9zdCB3aWxsIHJlY2VpdmUKKwlpbnRlcmxlYXZlZCBhYnNvbHV0ZSBjb29yZGluYXRlIHBhY2tldHMgZm9yIGVhY2ggZmluZ2VyLgorCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogRlNQIEVuYWJsZS9EaXNhYmxlIHBhY2tldAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICBCaXQgNyA2IDUgNCAzIDIgMSAwICAgICAgIDcgNiA1IDQgMyAyIDEgMCAgICAgIDcgNiA1IDQgMyAyIDEgMCAgICAgIDcgNiA1IDQgMyAyIDEgMApAQCAtMzQ4LDkgKzQ1OCwxMCBAQAogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAxLiBJZGVudGlmeSBGU1AgYnkgcmVhZGluZyBkZXZpY2UgSUQoMHgwMCkgYW5kIHZlcnNpb24oMHgwMSkgcmVnaXN0ZXIKIAotMi4gRGV0ZXJtaW5lIG51bWJlciBvZiBidXR0b25zIGJ5IHJlYWRpbmcgc3RhdHVzMiAoMHgwYikgcmVnaXN0ZXIKKzJhLiBGb3IgRlNQIHZlcnNpb24gPCBTVEwzODg4IEN4LCBkZXRlcm1pbmUgbnVtYmVy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aXN0ZXIgaW52ZXJzaW9uIHJlcXVpcmVtZW50JyBzZWN0aW9uKSwKKwlnb3RvIHN0ZXAgNgorCisJNWEuIHNlbmQgMHg0NyBQUy8yIGNvbW1hbmQgdG8gRlNQOworCisJNWIuIHNlbmQgdGhlIGludmVydGVkIHBhZ2UgYWRkcmVzcyB0byBGU1AgYW5kIGdvdG8gc3RlcCA5OworCisJNi4gaWYgdGhlIHBhZ2UgYWRkcmVzcyBiZWluZyB3cml0dGVuIGlzIG5vdCByZXF1aXJlZCB0byBiZQorCXN3YXBwZWQocmVmZXIgdG8gdGhlICdSZWdpc3RlciBzd2FwcGluZyByZXF1aXJlbWVudCcgc2VjdGlvbiksCisJZ290byBzdGVwIDcKKworCTZhLiBzZW5kIDB4NDQgUFMvMiBjb21tYW5kIHRvIEZTUDsKKworCTZiLiBzZW5kIHRoZSBzd2FwcGVkIHBhZ2UgYWRkcmVzcyB0byBGU1AgYW5kIGdvdG8gc3RlcCA5OworCisJNy4gc2VuZCAweDMzIFBTLzIgY29tbWFuZCB0byBGU1A7CisKKwk4LiBzZW5kIHRoZSBwYWdlIGFkZHJlc3MgdG8gRlNQOworCisJOS4gdGhlIHBhZ2UgcmVnaXN0ZXIgd3JpdGluZyBzZXF1ZW5jZSBpcyBjb21wbGV0ZWQuCisKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorKiBHZXN0dXJlIElECis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworICBVbmxpa2Ugb3RoZXIgZGV2aWNlcyB3aGljaCBzZW5kcyBtdWx0aXBsZSBmaW5nZXJzJyBjb29yZGluYXRlcyB0byBob3N0LAorRlNQIHByb2Nlc3NlcyBtdWx0aXBsZSBmaW5nZXJzJyBjb29yZGluYXRlcyBpbnRlcm5hbGx5IGFuZCBjb252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cgaXMgZW5hYmxlZC4KKworMDogdHJ5IHRvIGNvbnRpbnVlIG9wZXJhdGlvbi4KKworMTogcGFuaWMgaW1tZWRpYXRlbHkuCisKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKwogcGlkX21heDoKIAogUElEIGFsbG9jYXRpb24gd3JhcCB2YWx1ZS4gIFdoZW4gdGhlIGtlcm5lbCdzIG5leHQgUElEIHZhbHVlCkBAIC00MDEsNiArNDE1LDE0IEBACiAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKK25zX2xhc3RfcGlkOgorCitUaGUgbGFzdCBwaWQgYWxsb2NhdGVkIGluIHRoZSBjdXJyZW50ICh0aGUgb25lIHRhc2sgdXNpbmcgdGhpcyBzeXNjdGwKK2xpdmVzIGluKSBwaWQgbmFtZXNwYWNlLiBXaGVuIHNlbGVjdGluZyBhIHBpZCBmb3IgYSBuZXh0IHRhc2sgb24gZm9yawora2VybmVsIHRyaWVzIHRvIGFsbG9jYXRlIGEgbnVtYmVyIHN0YXJ0aW5nIGZyb20gdGhpcyBvbmUuCisKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKIHBvd2Vyc2F2ZS1uYXA6IChQUEMgb25seSkKIAogSWYgc2V0LCBMaW51eC1QUEMgd2lsbCB1c2UgdGhlICduYXAnIG1vZGUgb2YgcG93ZXJzYXZpbmcsCkBAIC01NzksNiArNjAxLDggQEAKICAgICAgICAgaW5zdGVhZCBvZiB1c2luZyB0aGUgb25lIHByb3ZpZGVkIGJ5IHRoZSBoYXJkd2FyZS4KICA1MTIgLSBBIGtlcm5lbCB3YXJuaW5nIGhhcyBvY2N1cnJlZC4KIDEwMjQgLSBBIG1vZHVsZSBmcm9tIGRyaXZlcnMvc3RhZ2luZyB3YXMgbG9hZGVkLgorMjA0O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AgICAgICAgICAgICAgICAgICAoZW0yODgwKSAgICAgICAgWzBjY2Q6MDA0N10KKyAxMyAtPiBUZXJyYXRlYyBQcm9kaWd5IFhTICAgICAgICAgICAgICAgICAgICAgIChlbTI4ODApCiAgMTQgLT4gU0lJRyBBVlR1bmVyLVBWUiAvIFBpeGVsdmlldyBQcm9saW5rIFBsYXlUViBVU0IgMi4wIChlbTI4MjAvZW0yODQwKQogIDE1IC0+IFYtR2VhciBQb2NrZXRUViAgICAgICAgICAgICAgICAgICAgICAgICAgKGVtMjgwMCkKICAxNiAtPiBIYXVwcGF1Z2UgV2luVFYgSFZSIDk1MCAgICAgICAgICAgICAgICAgIChlbTI4ODMpICAgICAgICBbMjA0MDo2NTEzLDIwNDA6NjUxNywyMDQwOjY1MWJdCkBAIC00MCw3ICs0MCw3IEBACiAgMzkgLT4gS1dvcmxkIFBWUlRWIDMwMFUgICAgICAgICAgICAgICAgICAgICAgICAoZW0yODYxKSAgICAgICAgW2ViMWE6ZTMwMF0KICA0MCAtPiBQbGV4dG9yIENvbnZlcnRYIFBYLVRWMTAwVSAgICAgICAgICAgICAgIChlbTI4NjEpICAgICAgICBbMDkzYjphMDA1XQogIDQxIC0+IEt3b3JsZCAzNTAgVSBEVkItVCAgICAgICAgICAgICAgICAgICAgICAgKGVtMjg3MCkgICAgICAgIFtlYjFhOmUzNTBdCi0gNDIgLT4gS3dvcmxkIDM1NSBVIERWQi1UICAgICAgICAgICAgICAgICAgICAgICAoZW0yODcwKSAgICAgICAgW2ViMWE6ZTM1NSxlYjFhOmUzNTddCisgNDIgLT4gS3dvcmxkIDM1NSBVIERWQi1UICAgICAgICAgICAgICAgICAgICAgICAoZW0yODcwKSAgICAgICAgW2ViMWE6ZTM1NSxlYjFhOmUzNTcsZWIxYTplMzU5XQogIDQzIC0+IFRlcnJhdGVjIENpbmVyZ3kgVCBYUyAgICAgICAgICAgICAgICAgICAgKGVtMjg3MCkgICAgICAgIFswY2NkOjAwNDNdCiAgNDQgLT4gVGVycmF0ZWMgQ2luZXJneSBUIFhTIChNVDIwNjApICAgICAgICAgICAoZW0yODcwKQogIDQ1IC0+IFBpbm5hY2xlIFBDVFYgRFZCLVQgICAgICAgICAgICAgICAgICAgICAgKGVtMjg3MCkKQEAgLTY0LDcgKzY0LDcgQEAKICA2NCAtPiBFYXN5IENhcCBDYXB0dXJlIERDLTYwICAgICAgICAgICAgICAgICAgIChlbTI4NjApCiAgNjUgLT4gSU8tREFUQSBHVi1NVlAvU1ogICAgICAgICAgICAgICAgICAgICAgICAoZW0yODIwL2VtMjg0MCkgWzA0YmI6MDUxNV0KICA2NiAtPiBFbXBpcmUgZHVhbCBUViAgICAgICAgICAgICAgICAgICAgICAgICAgIChlbTI4ODApCi0gNjcgLT4gVGVycmF0ZWMgR3JhYmJ5ICAgICAgICAgICAgICAgICAgICAgICAgICAoZW0yODYwKSAgICAgICAgWzBjY2Q6MDA5Nl0KKyA2NyAtPiBUZXJyYXRlYyBHcmFiYnkgICAgICAgICAgICAgICAgICAgICAgICAgIChlbTI4NjApICAgICAgICBbMGNjZDowMDk2LDBjY2Q6MTBBRl0KICA2OCAtPiBUZXJyYXRlYyBBVjM1MCAgICAgICAgICAgICAgICAgICAgICAgICAgIChlbTI4NjApICAgICAgICBbMGNjZDowMDg0XQogIDY5IC0+IEtXb3JsZCBBVFNDIDMxNVUgSERUViBUViBCb3ggICAgICAgICAgICAgKGVtMjg4MikgICAgICAgIFtlYjFhOmEzMTNdCiAgNzAgLT4gRXZnYSBpbkR0dWJlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZW0yODgyKQpAQCAtNzYsMyArNzYsNyBAQAogIDc2IC0+IEtXb3JsZCBQbHVzVFYgMzQwVSBvciBVQjQzNS1RIChBVFNDKSAgICAgKGVtMjg3MCkgICAgICAgIFsxYjgwOmEzNDBdCiAgNzcgLT4gRU0yODc0IExlYWRlcnNoaXAgSVNEQlQgICAgICAgICAgICAgICAgICAoZW0yODc0KQogIDc4IC0+IFBDVFY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YXlzIGluZm9ybWF0aW9uIGZvciAvcHJvYy9kbWEvbWVtLXR5cGUKLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGludCBkbWFfcHJvY19yZWFkX21lbV90eXBlKGNoYXIgKmJ1ZiwgY2hhciAqKnN0YXJ0LCBvZmZfdCBvZmZzZXQsCi0JCQkJICBpbnQgY291bnQsIGludCAqZW9mLCB2b2lkICpkYXRhKQotewotCWludCBsZW4gPSAwOwotCi0JbGVuICs9IHNwcmludGYoYnVmICsgbGVuLCAiZG1hX21hcF9tZW0gc3RhdGlzdGljc1xuIik7Ci0JbGVuICs9Ci0JICAgIHNwcmludGYoYnVmICsgbGVuLCAiY29oZXJlbnQ6ICVkXG4iLAotCQkgICAgYXRvbWljX3JlYWQoJmdEbWFTdGF0TWVtVHlwZUNvaGVyZW50KSk7Ci0JbGVuICs9Ci0JICAgIHNwcmludGYoYnVmICsgbGVuLCAia21hbGxvYzogICVkXG4iLAotCQkgICAgYXRvbWljX3JlYWQoJmdEbWFTdGF0TWVtVHlwZUttYWxsb2MpKTsKLQlsZW4gKz0KLQkgICAgc3ByaW50ZihidWYgKyBsZW4sICJ2bWFsbG9jOiAgJWRcbiIsCi0JCSAgICBhdG9taWNfcmVhZCgmZ0RtYVN0YXRNZW1UeXBlVm1hbGxvYykpOwotCWxlbiArPQotCSAgICBzcHJpbnRmKGJ1ZiArIGxlbiwgInVzZXI6ICAgICAlZFxuIiwKLQkJICAgIGF0b21pY19yZWFkKCZnRG1hU3RhdE1lbVR5cGVVc2VyKSk7Ci0KLQlyZXR1cm4gbGVuOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgogKiAgIERpc3BsYXlzIGluZm9ybWF0aW9uIGZvciAvcHJvYy9kbWEvY2hhbm5lbHMKICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTg0Niw4ICs4MDAsNiBAQAogCQkJCSAgICAgICBkbWFfcHJvY19yZWFkX2NoYW5uZWxzLCBOVUxMKTsKIAkJY3JlYXRlX3Byb2NfcmVhZF9lbnRyeSgiZGV2aWNlcyIsIDAsIGdEbWFEaXIsCiAJCQkJICAgICAgIGRtYV9wcm9jX3JlYWRfZGV2aWNlcywgTlVMTCk7Ci0JCWNyZWF0ZV9wcm9jX3JlYWRfZW50cnkoIm1lbS10eXBlIiwgMCwgZ0RtYURpciwKLQkJCQkgICAgICAgZG1hX3Byb2NfcmVhZF9tZW1fdHlwZSwgTlVMTCk7CiAJfQogCiBvdXQ6CkBAIC0xNTY1LDc2NyArMTUxNywzIEBACiB9CiAKIEVYUE9SVF9TWU1CT0woZG1hX3NldF9kZXZpY2VfaGFuZGxlcik7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgSW5pdGlhbGl6ZXMgYSBtZW1vcnkgbWFwcGluZyBzdHJ1Y3R1cmUKLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9pbml0X21lbV9tYXAoRE1BX01lbU1hcF90ICptZW1NYXApCi17Ci0JbWVtc2V0KG1lbU1hcCwgMCwgc2l6ZW9mKCptZW1NYXApKTsKLQotCXNlbWFfaW5pdCgmbWVtTWFwLT5sb2NrLCAxKTsKLQotCXJldHVybiAwOwotfQotCi1FWFBPUlRfU1lNQk9MKGRtYV9pbml0X21lbV9tYXApOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIFJlbGVhc2VzIGFueSBtZW1vcnkgY3VycmVudGx5IGJlaW5nIGhlbGQgYnkgYSBtZW1vcnkgbWFwcGluZyBzdHJ1Y3R1cmUuCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWludCBkbWFfdGVybV9tZW1fbWFwKERNQV9NZW1NYXBfdCAqbWVtTWFwKQotewotCWRvd24oJm1lbU1hcC0+bG9jayk7CS8qIEp1c3QgYmVpbmcgcGFyYW5vaWQgKi8KLQotCS8qIEZyZWUgdXAgYW55IGFsbG9jYXRlZCBtZW1vcnkgKi8KLQotCXVwKCZtZW1NYXAtPmxvY2spOwotCW1lbXNldChtZW1NYXAsIDAsIHNpemVvZigqbWVtTWFwKSk7Ci0KLQlyZXR1cm4gMDsKLX0KLQotRVhQT1JUX1NZTUJPTChkbWFfdGVybV9tZW1fbWFwKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioKLSogICBMb29rcyBhdCBhIG1lbW9yeSBhZGRyZXNzIGFuZCBjYXRlZ29yaXplcyBpdC4KLSoKLSogICBAcmV0dXJuIE9uZSBvZiB0aGUgdmFsdWVzIGZyb20gdGhlIERNQV9NZW1UeXBlX3QgZW51bWVyYXRpb24uCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLURNQV9NZW1UeXBlX3QgZG1hX21lbV90eXBlKHZvaWQgKmFkZHIpCi17Ci0JdW5zaWduZWQgbG9uZyBhZGRyVmFsID0gKHVuc2lnbmVkIGxvbmcpYWRkcjsKLQotCWlmIChhZGRyVmFsID49IENPTlNJU1RFTlRfQkFTRSkgewotCQ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uIERNQV9NRU1fVFlQRV9VU0VSOwotfQotCi1FWFBPUlRfU1lNQk9MKGRtYV9tZW1fdHlwZSk7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgTG9va3MgYXQgYSBtZW1vcnkgYWRkcmVzcyBhbmQgZGV0ZXJtaW5lcyBpZiB3ZSBzdXBwb3J0IERNQSdpbmcgdG8vZnJvbQotKiAgIHRoYXQgdHlwZSBvZiBtZW1vcnkuCi0qCi0qICAgQHJldHVybiBib29sZWFuIC0KLSogICAgICAgICAgICAgICByZXR1cm4gdmFsdWUgIT0gMCBtZWFucyBkbWEgc3VwcG9ydGVkCi0qICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09IDAgbWVhbnMgZG1hIG5vdCBzdXBwb3J0ZWQKLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9tZW1fc3VwcG9ydHNfZG1hKHZvaWQgKmFkZHIpCi17Ci0JRE1BX01lbVR5cGVfdCBtZW1UeXBlID0gZG1hX21lbV90eXBlKGFkZHIpOwotCi0JcmV0dXJuIChtZW1UeXBlID09IERNQV9NRU1fVFlQRV9ETUEpCi0jaWYgQUxMT1dfTUFQX09GX0tNQUxMT0NfTUVNT1JZCi0JICAgIHx8IChtZW1UeXBlID09IERNQV9NRU1fVFlQRV9LTUFMTE9DKQotI2VuZGlmCi0JICAgIHx8IChtZW1UeXBlID09IERNQV9NRU1fVFlQRV9VU0VSKTsKLX0KLQotRVhQT1JUX1NZTUJPTChkbWFfbWVtX3N1cHBvcnRzX2RtYSk7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgTWFwc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c0FkZHIsCi0JCQkJCQkgc2VnbWVudC0+bnVtQnl0ZXMpOwotCQkJaWYgKHJjIDwgMCkgewotCQkJCXByaW50ayhLRVJOX0VSUgotCQkJCSAgICAgICAiJXM6IGRtYV9hZGRfZGVzY3JpcHRvcnMgZmFpbGVkOiAlZFxuIiwKLQkJCQkgICAgICAgX19mdW5jX18sIHJjKTsKLQkJCQlnb3RvIG91dDsKLQkJCX0KLQkJfQotCX0KLQotCXJjID0gMDsKLQotb3V0OgotCi0JdXAoJm1lbU1hcC0+bG9jayk7Ci0JcmV0dXJuIHJjOwotfQotCi1FWFBPUlRfU1lNQk9MKGRtYV9tYXBfY3JlYXRlX2Rlc2NyaXB0b3JfcmluZyk7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgTWFwcyBpbiBhIG1lbW9yeSByZWdpb24gc3VjaCB0aGF0IGl0IGNhbiBiZSB1c2VkIGZvciBwZXJmb3JtaW5nIGEgRE1BLgotKgotKiAgIEByZXR1cm4KLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV91bm1hcChETUFfTWVtTWFwX3QgKm1lbU1hcCwJLyogU3RvcmVzIHN0YXRlIGluZm9ybWF0aW9uIGFib3V0IHRoZSBtYXAgKi8KLQkgICAgICBpbnQgZGlydGllZAkvKiBub24temVybyBpZiBhbnkgb2YgdGhlIHBhZ2VzIHdlcmUgbW9kaWZpZWQgKi8KLSAgICApIHsKLQotCWludCByYyA9IDA7Ci0JaW50IHJlZ2lvbklkeDsKLQlpbnQgc2VnbWVudElkeDsKLQlETUFfUmVnaW9uX3QgKnJlZ2lvbjsKLQlETUFfU2VnbWVudF90ICpzZWdtZW50OwotCi0JZG93bigmbWVtTWFwLT5sb2NrKTsKLQotCWZvciA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ZyB0aGlzIHN0cnVjdHVyZSAqLwotCWVudW0gZG1hX2RhdGFfZGlyZWN0aW9uIGRpcjsJLyogRGlyZWN0aW9uIHRoaXMgdHJhbnNmZXIgaXMgaW50ZW5kZWQgZm9yICovCi0KLQkvKiBJbiB0aGUgZXZlbnQgdGhhdCB3ZSdyZSBtYXBwaW5nIHVzZXIgbWVtb3J5LCB3ZSBuZWVkIHRvIGtub3cgd2hpY2ggdGFzayAqLwotCS8qIHRoZSBtZW1vcnkgaXMgZm9yLCBzbyB0aGF0IHdlIGNhbiBvYnRhaW4gdGhlIGNvcnJlY3QgbW0gbG9ja3MuICovCi0KLQlzdHJ1Y3QgdGFza19zdHJ1Y3QgKnVzZXJUYXNrOwotCi0JaW50IG51bVJlZ2lvbnNVc2VkOwotCWludCBudW1SZWdpb25zQWxsb2NhdGVkOwotCURNQV9SZWdpb25fdCAqcmVnaW9uOwotCi19IERNQV9NZW1NYXBfdDsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoKICogICBUaGUgRE1BX0RldmljZUF0dHJpYnV0ZV90IGNvbnRhaW5zIGluZm9ybWF0aW9uIHdoaWNoIGRlc2NyaWJlcyBhCiAqICAgcGFydGljdWxhciBETUEgZGV2aWNlIChvciBwZXJpcGhlcmFsKS4KICoKQEAgLTU3MCwxMjQgKzQ5Miw2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqCi0qICAgSW5pdGlhbGl6ZXMgYSBETUFfTWVtTWFwX3QgZGF0YSBzdHJ1Y3R1cmUKLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9pbml0X21lbV9tYXAoRE1BX01lbU1hcF90ICptZW1NYXAJLyogU3RvcmVzIHN0YXRlIGluZm9ybWF0aW9uIGFib3V0IHRoZSBtYXAgKi8KLSAgICApOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIFJlbGVhc2VzIGFueSBtZW1vcnkgY3VycmVudGx5IGJlaW5nIGhlbGQgYnkgYSBtZW1vcnkgbWFwcGluZyBzdHJ1Y3R1cmUuCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWludCBkbWFfdGVybV9tZW1fbWFwKERNQV9NZW1NYXBfdCAqbWVtTWFwCS8qIFN0b3JlcyBzdGF0ZSBpbmZvcm1hdGlvbiBhYm91dCB0aGUgbWFwICovCi0gICAgKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioKLSogICBMb29rcyBhdCBhIG1lbW9yeSBhZGRyZXNzIGFuZCBjYXRlZ29yaXplcyBpdC4KLSoKLSogICBAcmV0dXJuIE9uZSBvZiB0aGUgdmFsdWVzIGZyb20gdGhlIERNQV9NZW1UeXBlX3QgZW51bWVyYXRpb24uCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLURNQV9NZW1UeXBlX3QgZG1hX21lbV90eXBlKHZvaWQgKmFkZHIpOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIFNldHMgdGhlIHByb2Nlc3MgKGFrYSB1c2VyVGFzaykgYXNzb2NpYXRlZCB3aXRoIGEgbWVtIG1hcC4gVGhpcyBpcwotKiAgIHJlcXVpcmVkIGlmIHVzZXItbW9kZSBzZWdtZW50cyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBtYXBwaW5nLgotKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1zdGF0aWMgaW5saW5lIHZvaWQgZG1hX21lbV9tYXBfc2V0X3VzZXJfdGFzayhETUFfTWVtTWFwX3QgKm1lbU1hcCwKLQkJCQkJICAgICBzdHJ1Y3QgdGFza19zdHJ1Y3QgKnRhc2spCi17Ci0JbWVtTWFwLT51c2VyVGFzayA9IHRhc2s7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgTG9va3MgYXQgYSBtZW1vcnkgYWRkcmVzcyBhbmQgZGV0ZXJtaW5lcyBpZiB3ZSBzdXBwb3J0IERNQSdpbmcgdG8vZnJvbQotKiAgIHRoYXQgdHlwZSBvZiBtZW1vcnkuCi0qCi0qICAgQHJldHVybiBib29sZWFuIC0KLSogICAgICAgICAgICAgICByZXR1cm4gdmFsdWUgIT0gMCBtZWFucyBkbWEgc3VwcG9ydGVkCi0qICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09IDAgbWVhbnMgZG1hIG5vdCBzdXBwb3J0ZWQKLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9tZW1fc3VwcG9ydHNfZG1hKHZvaWQgKmFkZHIpOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIEluaXRpYWxpemVzIGEgbWVtb3J5IG1hcCBmb3IgdXNlLiBTaW5jZSB0aGlzIGZ1bmN0aW9uIGFjcXVpcmVzIGEKLSogICBzZW1wYXBob3JlIHdpdGhpbiB0aGUgbWVtb3J5IG1hcCwgaXQgaXMgVkVSWSBpbXBvcnRhbnQgdGhhdCBkbWFfdW5tYXAKLSogICBiZSBjYWxsZWQgd2hlbiB5b3UncmUgZmluaXNoZWQgdXNpbmcgdGhlIG1hcC4KLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9tYXBfc3RhcnQoRE1BX01lbU1hcF90ICptZW1NYXAsCS8qIFN0b3JlcyBzdGF0ZSBpbmZvcm1hdGlvbiBhYm91dCB0aGUgbWFwICovCi0JCSAgZW51bSBkbWFfZGF0YV9kaXJlY3Rpb24gZGlyCS8qIERpcmVjdGlvbiB0aGF0IHRoZSBtYXBwaW5nIHdpbGwgYmUgZ29pbmcgKi8KLSAgICApOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIEFkZHMgYSBzZWdtZW50IG9mIG1lbW9yeSB0byBhIG1lbW9yeSBtYXAuCi0qCi0qICAgQHJldHVybiAgICAgMCBvbiBzdWNjZXNzLCBlcnJvciBjb2RlIG90aGVyd2lzZS4KLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9tYXBfYWRkX3JlZ2lvbihETUFfTWVtTWFwX3QgKm1lbU1hcCwJLyogU3RvcmVzIHN0YXRlIGluZm9ybWF0aW9uIGFib3V0IHRoZSBtYXAgKi8KLQkJICAgICAgIHZvaWQgKm1lbSwJLyogVmlydHVhbCBhZGRyZXNzIHRoYXQgd2Ugd2FudCB0byBnZXQgYSBtYXAgb2YgKi8KLQkJICAgICAgIHNpemVfdCBudW1CeXRlcwkvKiBOdW1iZXIgb2YgYnl0ZXMgYmVpbmcgbWFwcGVkICovCi0gICAgKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioKLSogICBDcmVhdGVzIGEgZGVzY3JpcHRvciByaW5nIGZyb20gYSBtZW1vcnkgbWFwcGluZy4KLSoKLSogICBAcmV0dXJuIDAgb24gc3VjY2VzcywgZXJyb3IgY29kZSBvdGhlcndpc2UuCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWludCBkbWFfbWFwX2NyZWF0ZV9kZXNjcmlwdG9yX3JpbmcoRE1BX0RldmljZV90IGRldiwJLyogRE1BIGRldmljZSAod2hlcmUgdGhlIHJpbmcgaXMgc3RvcmVkKSAqLwotCQkJCSAgIERNQV9NZW1NYXBfdCAqbWVtTWFwLAkvKiBNZW1vcnkgbWFwIHRoYXQgd2lsbCBiZSB1c2VkICovCi0JCQkJICAgZG1hX2FkZHJfdCBkZXZQaHlzQWRkcgkvKiBQaHlzaWNhbCBhZGRyZXNzIG9mIGRldmljZSAqLwotICAgICk7Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqCi0qICAgTWFwcyBpbiBhIG1lbW9yeSByZWdpb24gc3VjaCB0aGF0IGl0IGNhbiBiZSB1c2VkIGZvciBwZXJmb3JtaW5nIGEgRE1BLgotKgotKiAgIEByZXR1cm4KLSovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotaW50IGRtYV9tYXBfbWVtKERNQV9NZW1NYXBfdCAqbWVtTWFwLAkvKiBTdG9yZXMgc3RhdGUgaW5mb3JtYXRpb24gYWJvdXQgdGhlIG1hcCAqLwotCQl2b2lkICphZGRyLAkvKiBWaXJ0dWFsIGFkZHJlc3MgdGhhdCB3ZSB3YW50IHRvIGdldCBhIG1hcCBvZiAqLwotCQlzaXplX3QgY291bnQsCS8qIE51bWJlciBvZiBieXRlcyBiZWluZyBtYXBwZWQgKi8KLQkJZW51bSBkbWFfZGF0YV9kaXJlY3Rpb24gZGlyCS8qIERpcmVjdGlvbiB0aGF0IHRoZSBtYXBwaW5nIHdpbGwgYmUgZ29pbmcgKi8KLSAgICApOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKgotKiAgIE1hcHMgaW4gYSBtZW1vcnkgcmVnaW9uIHN1Y2ggdGhhdCBpdCBjYW4gYmUgdXNlZCBmb3IgcGVyZm9ybWluZyBhIERNQS4KLSoKLSogICBAcmV0dXJuCi0qLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWludCBkbWFfdW5tYXAoRE1BX01lbU1hcF90ICptZW1NYXAsCS8qIFN0b3JlcyBzdGF0ZSBpbmZvcm1hdGlvbiBhYm91dCB0aGUgbWFwICovCi0JICAgICAgaW50IGRpcnRpZWQJLyogbm9uLXplcm8gaWYgYW55IG9mIHRoZSBwYWdlcyB3ZXJlIG1vZGlmaWVkICovCi0gICAgKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKioKICogICBJbml0aWF0ZXMgYSB0cmFuc2ZlciB3aGVuIHRoZSBkZXNjcmlwdG9ycyBoYXZlIGFscmVhZHkgYmVlbiBzZXR1cC4KICoKICogICBUaGl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QSFlTX0JBU0UsIElSUV9ET1ZFX1VTQjApOworCW9yaW9uX2VoY2lfaW5pdChET1ZFX1VTQjBfUEhZU19CQVNFLCBJUlFfRE9WRV9VU0IwLCBFSENJX1BIWV9OQSk7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtODAsOCArODAsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiB2b2lkIF9faW5pdCBkb3ZlX2VoY2kxX2luaXQodm9pZCkKIHsKLQlvcmlvbl9laGNpXzFfaW5pdCgmZG92ZV9tYnVzX2RyYW1faW5mbywKLQkJCSAgRE9WRV9VU0IxX1BIWVNfQkFTRSwgSVJRX0RPVkVfVVNCMSk7CisJb3Jpb25fZWhjaV8xX2luaXQoRE9WRV9VU0IxX1BIWVNfQkFTRSwgSVJRX0RPVkVfVVNCMSk7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtODksNyArODgsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiB2b2lkIF9faW5pdCBkb3ZlX2dlMDBfaW5pdChzdHJ1Y3QgbXY2NDN4eF9ldGhfcGxhdGZvcm1fZGF0YSAqZXRoX2RhdGEpCiB7Ci0Jb3Jpb25fZ2UwMF9pbml0KGV0aF9kYXRhLCAmZG92ZV9tYnVzX2RyYW1faW5mbywKKwlvcmlvbl9nZTAwX2luaXQoZXRoX2RhdGEsCiAJCQlET1ZFX0dFMDBfUEhZU19CQVNFLCBJUlFfRE9WRV9HRTAwX1NVTSwKIAkJCTAsIGdldF90Y2xrKCkpOwogfQpAQC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luaXQoVVNCMV9QSFlTX0JBU0UsIElSUV9NVjc4WFgwX1VTQl8xKTsKIH0KIAogCkBAIC0xODksOCArMTg4LDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogdm9pZCBfX2luaXQgbXY3OHh4MF9laGNpMl9pbml0KHZvaWQpCiB7Ci0Jb3Jpb25fZWhjaV8yX2luaXQoJm12Nzh4eDBfbWJ1c19kcmFtX2luZm8sCi0JCQkgIFVTQjJfUEhZU19CQVNFLCBJUlFfTVY3OFhYMF9VU0JfMik7CisJb3Jpb25fZWhjaV8yX2luaXQoVVNCMl9QSFlTX0JBU0UsIElSUV9NVjc4WFgwX1VTQl8yKTsKIH0KIAogCkBAIC0xOTksNyArMTk3LDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogdm9pZCBfX2luaXQgbXY3OHh4MF9nZTAwX2luaXQoc3RydWN0IG12NjQzeHhfZXRoX3BsYXRmb3JtX2RhdGEgKmV0aF9kYXRhKQogewotCW9yaW9uX2dlMDBfaW5pdChldGhfZGF0YSwgJm12Nzh4eDBfbWJ1c19kcmFtX2luZm8sCisJb3Jpb25fZ2UwMF9pbml0KGV0aF9kYXRhLAogCQkJR0UwMF9QSFlTX0JBU0UsIElSUV9NVjc4WFgwX0dFMDBfU1VNLAogCQkJSVJRX01WNzhYWDBfR0VfRVJSLCBnZXRfdGNsaygpKTsKIH0KQEAgLTIxMCw3ICsyMDgsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiB2b2lkIF9faW5pdCBtdjc4eHgwX2dlMDFfaW5pdChzdHJ1Y3QgbXY2NDN4eF9ldGhfcGxhdGZvcm1fZGF0YSAqZXRoX2RhdGEp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ArMTIyLDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogdm9pZCBfX2luaXQgb3Jpb241eF9zYXRhX2luaXQoc3RydWN0IG12X3NhdGFfcGxhdGZvcm1fZGF0YSAqc2F0YV9kYXRhKQogewotCW9yaW9uX3NhdGFfaW5pdChzYXRhX2RhdGEsICZvcmlvbjV4X21idXNfZHJhbV9pbmZvLAotCQkJT1JJT041WF9TQVRBX1BIWVNfQkFTRSwgSVJRX09SSU9ONVhfU0FUQSk7CisJb3Jpb25fc2F0YV9pbml0KHNhdGFfZGF0YSwgT1JJT041WF9TQVRBX1BIWVNfQkFTRSwgSVJRX09SSU9ONVhfU0FUQSk7CiB9CiAKIApAQCAtMTU5LDggKzE1OCw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHZvaWQgX19pbml0IG9yaW9uNXhfeG9yX2luaXQodm9pZCkKIHsKLQlvcmlvbl94b3IwX2luaXQoJm9yaW9uNXhfbWJ1c19kcmFtX2luZm8sCi0JCQlPUklPTjVYX1hPUl9QSFlTX0JBU0UsCisJb3Jpb25feG9yMF9pbml0KE9SSU9ONVhfWE9SX1BIWVNfQkFTRSwKIAkJCU9SSU9ONVhfWE9SX1BIWVNfQkFTRSArIDB4MjAwLAogCQkJSVJRX09SSU9ONVhfWE9SMCwgSVJRX09SSU9ONVhfWE9SMSk7CiB9CkBAIC0xNzAsMTIgKzE2OCw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyB2b2lkIF9faW5pdCBvcmlvbjV4X2NyeXB0b19pbml0KHZvaWQpCiB7Ci0JaW50IHJldDsKLQotCXJldCA9IG9yaW9uNXhfc2V0dXBfc3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ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkwX1JYLAotCQkucnF0eXBlID0gREVWVE9NRU0sCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkwX1RYLAotCQkucnF0eXBlID0gTUVNVE9ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkxX1JYLAotCQkucnF0eXBlID0gREVWVE9NRU0sCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkxX1RYLAotCQkucnF0eXBlID0gTUVNVE9ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkyX1JYLAotCQkucnF0eXBlID0gREVWVE9NRU0sCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9TUEkyX1RYLAotCQkucnF0eXBlID0gTUVNVE9ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9QQ00wX1JYLAotCQkucnF0eXBlID0gREVWVE9NRU0sCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9QQ00xX1RYLAotCQkucnF0eXBlID0gTUVNVE9ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9QQ00xX1JYLAotCQkucnF0eXBlID0gREVWVE9NRU0sCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9QQ00xX1RYLAotCQkucnF0eXBlID0gTUVNVE9ERVYsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9NU01fUkVRMCwKLQl9LCB7Ci0JCS5wZXJpX2lkID0gKHU4KURNQUNIX01TTV9SRVExLAotCX0sIHsKLQkJLnBlcmlfaWQgPSAodTgpRE1BQ0hfTVNNX1JFUTIsCi0JfSwgewotCQkucGVyaV9pZCA9ICh1OClETUFDSF9NU01fUkVRMywKLQl9LAordTggcGRtYTFfcGVyaVtdID0geworCURNQUNIX1VBUlQwX1JYLAorCURNQUNIX1V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ybSBjb2RlLgorICovCitzdGF0aWMgc3RydWN0IGNsayBleHRhbDFfY2xrID0geworCS5yYXRlCT0gMjUwMDAwMDAsCit9OworCisvKgorICogNDhNSHogZGVmYXVsdCByYXRlIGZvciB0aGUgRVhUQUwyIHJvb3QgaW5wdXQgY2xvY2suCisgKiBJZiBuZWVkZWQsIHJlc2V0IHRoaXMgd2l0aCBjbGtfc2V0X3JhdGUoKSBmcm9tIHRoZSBwbGF0Zm9ybSBjb2RlLgorICovCitzdGF0aWMgc3RydWN0IGNsayBleHRhbDJfY2xrID0geworCS5yYXRlCT0gNDgwMDAwMDAsCit9OworCisvKgorICogMjdNSHogZGVmYXVsdCByYXRlIGZvciB0aGUgRFZfQ0xLSSByb290IGlucHV0IGNsb2NrLgorICogSWYgbmVlZGVkLCByZXNldCB0aGlzIHdpdGggY2xrX3NldF9yYXRlKCkgZnJvbSB0aGUgcGxhdGZvcm0gY29kZS4KKyAqLworc3RhdGljIHN0cnVjdCBjbGsgZHZfY2xrID0geworCS5yYXRlCT0gMjcwMDAwMDAsCit9OworCitzdGF0aWMgdW5zaWduZWQgbG9uZyBkaXZfcmVjYWxjKHN0cnVjdCBjbGsgKmNsaykKK3sKKwlyZXR1cm4gY2xrLT5wYXJlbnQtPnJhdGUgLyAoaW50KShjbGstPnByaXYpOworfQorCitzdGF0aWMgc3RydWN0IGNsa19vcHMgZGl2X2Nsa19vcHMgPSB7CisJLnJlY2FsYwk9IGRpdl9yZWNhbGMsCit9OworCisvKiBleHRhbDEgLyAyICovCitzdGF0aWMgc3RydWN0IGNsayBleHRhbDFfZGl2Ml9jbGsgPSB7CisJLm9wcwk9ICZkaXZfY2xrX29wcywKKwkucHJpdgk9ICh2b2lkICopMiwKKwkucGFyZW50CT0gJmV4dGFsMV9jbGssCit9OworCisvKiBleHRhbDEgLyAxMDI0ICovCitzdGF0aWMgc3RydWN0IGNsayBleHRhbDFfZGl2MTAyNF9jbGsgPSB7CisJLm9wcwk9ICZkaXZfY2xrX29wcywKKwkucHJpdgk9ICh2b2lkICopMTAyNCwKKwkucGFyZW50CT0gJmV4dGFsMV9jbGssCit9OworCisvKiBleHRhbDEgLyAyIC8gMTAyNCAqLworc3RhdGljIHN0cnVjdCBjbGsgZXh0YWwxX2RpdjIwNDhfY2xrID0geworCS5vcHMJPSAmZGl2X2Nsa19vcHMsCisJLnByaXYJPSAodm9pZCAqKTEwMjQsCisJLnBhcmVudAk9ICZleHRhbDFfZGl2Ml9jbGssCit9OworCisvKiBleHRhbDIgLyAyICovCitzdGF0aWMgc3RydWN0IGNsayBleHRhbDJfZGl2Ml9jbGsgPSB7CisJLm9wcwk9ICZkaXZfY2xrX29wcywKKwkucHJpdgk9ICh2b2lkICopMiwKKwkucGFyZW50CT0gJmV4dGFsMl9jbGssCit9OworCitzdGF0aWMgc3RydWN0IGNsa19vcHMgZm9sbG93cGFyZW50X2Nsa19vcHMgPSB7CisJLnJlY2FsYwk9IGZvbGxvd3BhcmVudF9yZWNhbGMsCit9OworCisvKiBNYWluIGNsb2NrICovCitzdGF0aWMgc3RydWN0IGNsayBzeXN0ZW1fY2xrID0geworCS5vcHMJPSAmZm9sbG93cGFyZW50X2Nsa19vcHMsCit9OworCitzdGF0aWMgc3RydWN0IGNsayBzeXN0ZW1fZGl2Ml9jbGsgPSB7CisJLm9wcwk9ICZkaXZfY2xrX29wcywKKwkucHJpdgk9ICh2b2lkICopMiwKKwkucGFyZW50CT0gJnN5c3RlbV9jbGssCit9OworCisvKiByX2NsayAqLworc3RhdGljIHN0cnVjdCBjbGsgcl9jbGsgPSB7CisJLm9wcwk9ICZmb2xsb3dwYXJlbnRfY2xrX29wcywKK307CisKKy8qIFBMTEMwL1BMTEMxICovCitzdGF0aWMgdW5zaWduZWQgbG9uZyBwbGxjMDFfcmVjYWxjKHN0cnVjdCBjbGsgKmNsaykKK3sKKwl1bnNpZ25lZCBsb25nIG11bHQgPSAxOworCisJaWYgKF9fcmF3X3JlYWRsKFBMTEMwMUNSKSAmICgxIDw8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nJlc291cmNlID0gaW50Y3NfcmVzb3VyY2VzLAogCS5udW1fcmVzb3VyY2VzID0gQVJSQVlfU0laRShpbnRjc19yZXNvdXJjZXMpLAogCS5odyA9IElOVENfSFdfREVTQyhpbnRjc192ZWN0b3JzLCBpbnRjc19ncm91cHMsIGludGNzX21hc2tfcmVnaXN0ZXJzLApAQCAtNjExLDMgKzYxMiw1MiBAQAogCWZvciAoayA9IDB4ODA7IGsgPD0gMHg5YzsgayArPSA0KQogCQlfX3Jhd193cml0ZWIoZmZkNVtrXSwgaW50Y3NfZmZkNSArIGspOwogfQorCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgZTY5NFsweDIwMF07CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgZTY5NVsweDIwMF07CisKK3ZvaWQgc2g3MzcyX2ludGNhX3N1c3BlbmQodm9pZCkKK3sKKwlpbnQgazsKKworCWZvciAoayA9IDB4MDA7IGsgPD0gMHgzODsgayArPSA0KQorCQllNjk0W2tdID0gX19yYXdfcmVhZHcoMHhlNjk0MDAwMCArIGspOworCisJZm9yIChrID0gMHg4MDsgayA8PSAweGI0OyBrICs9IDQpCisJCWU2OTRba10gPSBfX3Jhd19yZWFkYigweGU2OTQwMDAwICsgayk7CisKKwlmb3IgKGsgPSAweDE4MDsgayA8PSAweDFiNDsgayArPSA0KQorCQllNjk0W2tdID0gX19yYXdfcmVhZGIoMHhlNjk0MDAwMCArIGspOworCisJZm9yIChrID0gMHgwMDsgayA8PSAweDUwOyBrICs9IDQpCisJCWU2OTVba10gPSBfX3Jhd19yZWFkdygweGU2OTUwMDAwICsgayk7CisKKwlmb3IgKGsgPSAweDgwOyBrIDw9IDB4YTg7IGsgKz0gNCkKKwkJZTY5NVtrXSA9IF9fcmF3X3JlYWRiKDB4ZTY5NTAwMDAgKyBrKTsKKworCWZvciAoayA9IDB4MTgwOyBrIDw9IDB4MWE4OyBrICs9IDQpCisJCWU2OTVba10gPSBfX3Jhd19yZWFkYigweGU2OTUwMDAwICs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V9NQVJLLAlJREVfRDJfTUFSSywJSURFX0QzX01BUkssCisJSURFX0Q0X01BUkssCUlERV9ENV9NQVJLLAlJREVfRDZfTUFSSywJSURFX0Q3X01BUkssCisJSURFX0Q4X01BUkssCUlERV9EOV9NQVJLLAlJREVfRDEwX01BUkssCUlERV9EMTFfTUFSSywKKwlJREVfRDEyX01BUkssCUlERV9EMTNfTUFSSywJSURFX0QxNF9NQVJLLAlJREVfRDE1X01BUkssCisJSURFX0EwX01BUkssCUlERV9BMV9NQVJLLAlJREVfQTJfTUFSSywJSURFX0NTMF9NQVJLLAorCUlERV9DUzFfTUFSSywJSURFX0lPV1JfTUFSSywJSURFX0lPUkRfTUFSSywJSURFX0lPUkRZX01BUkssCisJSURFX0lOVF9NQVJLLAkJSURFX1JTVF9NQVJLLAkJSURFX0RJUkVDVElPTl9NQVJLLAorCUlERV9FWEJVRl9FTkJfTUFSSywJSURFX0lPREFDS19NQVJLLAlJREVfSU9EUkVRX01BUkssCisKKwkvKiBSTUlJICovCisJUk1JSV9DUlNfRFZfTUFSSywJUk1JSV9SWF9FUl9NQVJLLAlSTUlJX1JYRDBfTUFSSywKKwlSTUlJX1JYRDFfTUFSSywJCVJNSUlfVFhfRU5fTUFSSywJUk1JSV9UWEQwX01BUkssCisJUk1JSV9NRENfTUFSSywJCVJNSUlfVFhEMV9NQVJLLAkJUk1JSV9NRElPX01BUkssCisJUk1JSV9SRUY1MENLX01BUkssCS8qIGZvciBSTUlJICovCisJUk1JSV9SRUYxMjVDS19NQVJLLAkvKiBmb3IgR01JSSAqLworCisJLyogR0V0aGVyICovCisJRVRfVFhfQ0xLX01BUkssCUVUX1RYX0VOX01BUkssCUVUX0VUWEQwX01BUkssCUVUX0VUWEQxX01BUkssCisJRVRfRVRYRDJfTUFSSywJRVRfRVRYRDNfTUFSSywKKwlFVF9FVFhENF9NQVJLLAlFVF9FVFhENV9NQVJLLCAvKiBmb3IgR0V0aGVyICovCisJRVRfRVRYRDZfTUFSSywJRVRfR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ZOKFNERU5DX0NQRyksCisJR1BJT19GTihTREVOQ19EVl9DTEtJKSwKKworCS8qIFNZU0MgKi8KKwlHUElPX0ZOKFJFU0VUUF9QVUxMVVApLAorCUdQSU9fRk4oUkVTRVRQX1BMQUlOKSwKKworCS8qIERFQlVHICovCisJR1BJT19GTihFREVCR1JFUV9QVUxMRE9XTiksCisJR1BJT19GTihFREVCR1JFUV9QVUxMVVApLAorCisJR1BJT19GTihUUkFDRUFVRF9GUk9NX1ZJTyksCisJR1BJT19GTihUUkFDRUFVRF9GUk9NX0xDREMwKSwKKwlHUElPX0ZOKFRSQUNFQVVEX0ZST01fTUVNQyksCit9OworCitzdGF0aWMgc3RydWN0IHBpbm11eF9jZmdfcmVnIHBpbm11eF9jb25maWdfcmVnc1tdID0geworCVBPUlRDUigwLAkweGU2MDUwMDAwKSwgLyogUE9SVDBDUiAqLworCVBPUlRDUigxLAkweGU2MDUwMDAxKSwgLyogUE9SVDFDUiAqLworCVBPUlRDUigyLAkweGU2MDUwMDAyKSwgLyogUE9SVDJDUiAqLworCVBPUlRDUigzLAkweGU2MDUwMDAzKSwgLyogUE9SVDNDUiAqLworCVBPUlRDUig0LAkweGU2MDUwMDA0KSwgLyogUE9SVDRDUiAqLworCVBPUlRDUig1LAkweGU2MDUwMDA1KSwgLyogUE9SVDVDUiAqLworCVBPUlRDUig2LAkweGU2MDUwMDA2KSwgLyogUE9SVDZDUiAqLworCVBPUlRDUig3LAkweGU2MDUwMDA3KSwgLyogUE9SVDdDUiAqLworCVBPUlRDUig4LAkweGU2MDUwMDA4KSwgLyogUE9SVDhDUiAqLworCVBPUlRDUig5LAkweGU2MDUwMDA5KSwgLyogUE9SVDlDUiAqLworCVBPUlRDUigxMCwJMHhlNjA1MDAwYSksIC8qIFBPUlQxMENSICovCisJUE9SVENSKDExLAkweGU2MDUwMDBiKSwgLyogUE9SVDExQ1IgKi8KKwlQT1JUQ1IoMTIsCTB4ZTYwNTAwMGMpLCAvKiBQT1JUMTJDUiAq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m0vbWFjaC10ZWdyYS9NYWtlZmlsZQppbmRleCA5MWEwN2UxLi5lMTIwZmY1IDEwMDY0NAotLS0gYS9hcmNoL2FybS9tYWNoLXRlZ3JhL01ha2VmaWxlCisrKyBiL2FyY2gvYXJtL21hY2gtdGVncmEvTWFrZWZpbGUKQEAgLTEsMyArMSw0IEBACitvYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gYm9hcmQtcGlubXV4Lm8KIG9iai15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArPSBjb21tb24ubwogb2JqLXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICs9IGRldmljZXMubwogb2JqLXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICs9IGlvLm8KQEAgLTUsMTIgKzYsMTMgQEAKIG9iai15ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArPSBjbG9jay5vCiBvYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gdGltZXIubwogb2JqLXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICs9IHBpbm11eC5vCi1vYmoteSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKz0gcG93ZXJnYXRlLm8KIG9iai15CQkJCQkrPSBmdXNlLm8KLW9iai0kKENPTkZJR19BUkNIX1RFR1JBXzJ4X1NPQykgICAgICAgICArPSBjbG9jay5vCitvYmotJChDT05GSUdfQVJDSF9URUdSQV8yeF9TT0MpCQkrPSBwb3dlcmdhdGUubwogb2JqLSQoQ09ORklHX0FSQ0hfVEVHUkFfMnhfU09DKSAgICAgICAgICs9IHRlZ3JhMl9jbG9ja3Mubwogb2JqLSQoQ09ORklHX0FSQ0hfVEVHUkFfMnhfU09DKQkJKz0gdGVncmEyX2VtYy5vCi1vYmotJChDT05GSUdfQVJDSF9URUdSQV8yeF9TT0MpCQkrPSBwaW5tdXgtdDItdGFibGVzLm8KK29iai0kKENPTkZJR19BUkNIX1RFR1JBXzJ4X1NPQykJCSs9IHBpbm11eC10ZWdyYTIwLXRhYmxlcy5vCitvYmotJChDT05GSUdfQVJDSF9URUdSQV8zeF9TT0MpCQkrPSBwaW5tdXgtdGVncmEzMC10YWJsZXMubworb2JqLSQoQ09ORklHX0FSQ0hfVEVHUkFfM3hfU09DKQkJKz0gYm9hcmQtZHQtdGVncmEzMC5vCiBvYmotJChDT05GSUdfU01QKSAgICAgICAgICAgICAgICAgICAgICAgKz0gcGxhdHNtcC5vIGxvY2FsdGltZXIubyBoZWFkc21wLm8KIG9iai0kKENPTkZJR19IT1RQTFVHX0NQVSkgICAgICAgICAgICAgICArPSBob3RwbHVnLm8KIG9iai0kKENPTkZJR19URUdSQV9TWVNURU1fRE1BKQkJKz0gZG1hLm8KQEAgLTE4LDIwICsyMCwyMiBAQAogb2JqLSQoQ09ORklHX1RFR1JBX1BDSSkJCQkrPSBwY2llLm8KIG9iai0kKENPTkZJR19VU0JfU1VQUE9SVCkJCSs9IHVzYl9waHkubwogCi1vYmotJHtDT05GSUdfTUFDSF9IQVJNT05ZfSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS5vCi1vYmotJHtDT05GSUdfTUFDSF9IQVJNT05ZfSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS1waW5tdXgubwotb2JqLSR7Q09ORklHX01BQ0hfSEFSTU9OWX0gICAgICAgICAgICAgICs9IGJvYXJkLWhhcm1vbnktcGNpZS5vCi1vYmotJHtDT05GSUdfTUFDSF9IQVJNT05ZfSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS1wb3dlci5vCitvYmotJChDT05GSUdfTUFDSF9IQVJNT05ZKSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS5vCitvYmotJChDT05GSUdfTUFDSF9IQVJNT05ZKSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS1waW5tdXgubworb2JqLSQoQ09ORklHX01BQ0hfSEFSTU9OWSkgICAgICAgICAgICAgICs9IGJvYXJkLWhhcm1vbnktcGNpZS5vCitvYmotJChDT05GSUdfTUFDSF9IQVJNT05ZKSAgICAgICAgICAgICAgKz0gYm9hcmQtaGFybW9ueS1wb3dlci5vCiAKLW9iai0ke0NPTkZJR19NQUNIX1BBWjAwfQkJKz0gYm9hcmQtcGF6MDAubwotb2JqLSR7Q09ORklHX01BQ0hfUEFaMDB9CQkrPSBib2FyZC1wYXowMC1waW5tdXgubworb2JqLSQoQ09ORklHX01BQ0hfUEFaMDApCQkrPSBib2FyZC1wYXowMC5vCitvYmotJChDT05GSUdfTUFDSF9QQVowMCkJCSs9IGJvYXJkLXBhejAwLXBpbm11eC5vCiAKLW9iai0ke0NPTkZJR19NQUNIX1NFQUJPQVJEfSAgICAgICAgICAgICArPSBib2FyZC1zZWFib2FyZC5vCi1vYmotJHtDT05GSUdfTUFDSF9TRUFCT0FSRH0gICAgICAgICAgICAgKz0gYm9hcmQtc2VhYm9hcmQtcGlubXV4Lm8KK29iai0kKENPTkZJR19NQUNIX1NFQUJPQVJEKSAgICAgICAgICAgICArPSBib2FyZC1zZWFib2FyZC5vCitvYmotJChDT05GSUdfTUFDSF9TRUFCT0FSRCkgICAgICAgICAgICAgKz0gYm9hcmQtc2VhYm9hcmQtcGlubXV4Lm8KIAotb2JqLSR7Q09ORklHX01BQ0hfVEVHUkFfRFR9ICAgICAgICAgICAgICs9IGJvYXJkLWR0Lm8KLW9iai0ke0NPTkZJR19NQUNIX1RFR1JBX0RUfSAgICAgICAgICAgICArPSBib2FyZC1oYXJtb255LXBpbm11eC5vCi1vYmotJHtDT05GSUdfTUFDSF9URUdSQV9EVH0gICAgICAgICAgICAgKz0gYm9hcmQtc2VhYm9hcmQtcGlubXV4Lm8KK29iai0kKENPTkZJR19NQUNIX1RFR1JBX0RUKSAgICAgICAgICAgICArPSBib2FyZC1kdC10ZWdyYTIwLm8KK29iai0kKENPTkZJR19NQUNIX1RFR1JBX0RUKSAgICAgICAgICA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AoQVRFLCAgIE5BTkQsICBJREUsICAgICAgIE5BTkQsICAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBJREUsICAgICAgIDB4MTgsIDI1LCAweDgwLCAxMiwgMHhBMCwgOCksCi0JUElOR1JPVVAoQ0RFVjEsIEFVRElPLCBPU0MsICAgICAgIFBMTEFfT1VULCAgUExMTV9PVVQxLCBBVURJT19TWU5DLCAgICBPU0MsICAgICAgIDB4MTQsIDQsICAweDg4LCAyLCAgMHhBOCwgMCksCi0JUElOR1JPVVAoQ0RFVjIsIEFVRElPLCBPU0MsICAgICAgIEFIQl9DTEssICAgQVBCX0NMSywgICBQTExQX09VVDQsICAgICBPU0MsICAgICAgIDB4MTQsIDUsICAweDg4LCA0LCAgMHhBOCwgMiksCi0JUElOR1JPVVAoQ1JUUCwgIExDRCwgICBDUlQsICAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZELCAgICAgIDB4MjAsIDE0LCAweDk4LCAyMCwgMHhBNCwgMjQpLAotCVBJTkdST1VQKENTVVMsICBWSSwgICAgUExMQ19PVVQxLCBQTExQX09VVDIsIFBMTFBfT1VUMywgVklfU0VOU09SX0NMSywgUExMQ19PVVQxLCAweDE0LCA2LCAgMHg4OCwgNiwgIDB4QUMsIDI0KSwKLQlQSU5HUk9VUChEQVAxLCAgQVVESU8sIERBUDEsICAgICAgUlNWRCwgICAgICBHTUksICAgICAgIFNESU8yLCAgICAgICAgIERBUDEsICAgICAgMHgxNCwgNywgIDB4ODgsIDIwLCAweEEwLCAxMCksCi0JUElOR1JPVVAoREFQMiwgIEFVRElPLCBEQVAyLCAgICAgIFRXQywgICAgICAgUlNWRCwgICAgICBHTUksICAgICAgICAgICBEQVAyLCAgICAgIDB4MTQsIDgsICAweDg4LCAyMiwgMHhBMCwgMTIpLAotCVBJTkdST1VQKERBUDMsICBCQiwgICAgREFQMywgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgREFQMywgICAgICAweDE0LCA5LCAgMHg4OCwgMjQsIDB4QTAsIDE0KSwKLQlQSU5HUk9VUChEQVA0LCAgVUFSVCwgIERBUDQsICAgICAgUlNWRCwgICAgICBHTUksICAgICAgIFJTVkQsICAgICAgICAgIERBUDQsICAgICAgMHgxNCwgMTAsIDB4ODgsIDI2LCAweEEwLCAxNiksCi0JUElOR1JPVVAoRERDLCAgIExDRCwgICBJMkMyLCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTgsIDMxLCAweDg4LCAwLCAgMHhCMCwgMjgpLAotCVBJTkdST1VQKERUQSwgICBWSSwgICAgUlNWRCwgICAgICBTRElPMiwgICAgIFZJLCAgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDE0LCAxMSwgMHg4NCwgMjAsIDB4QTAsIDE4KSwKLQlQSU5HUk9VUChEVEIsICAgVkksICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBWSSwgICAgICAgIFNQSTEsICAgICAgICAgIFJTVkQxLCAgICAgMHgxNCwgMTIsIDB4ODQsIDIyLCAweEEwLCAyMCksCi0JUElOR1JPVVAoRFRDLCAgIFZJLCAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgVkksICAgICAgICBSU1ZELCAgICAgICAgICBSU1ZEMSwgICAgIDB4MTQsIDEzLCAweDg0LCAyNiwgMHhBMCwgMjIpLAotCVBJTkdST1VQKERURCwgICBWSSwgICAgUlNWRCwgICAgICBTRElPMiwgICAgIFZJLCAgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDEsICAgICAweDE0LCAxNCwgMHg4NCwgMjgsIDB4QTAsIDI0KSwKLQlQSU5HUk9VUChEVEUsICAgVkksICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBWSSwgICAgICAgIFNQSTEsICAgICAgICAgIFJTVkQxLCAgICAgMHgxNCwgMTUsIDB4ODQsIDMwLCAweEEwLCAyNiksCi0JUElOR1JPVVAoRFRGLCAgIFZJLCAgICBJMkMzLCAgICAgIFJTVkQsICAgICAgVkksICAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MjAsIDEyLCAweDk4LCAzMCwgMHhBMCwgMjgpLAotCVBJTkdST1VQKEdNQSwgICBOQU5ELCAgVUFSVEUsICAgICBTUEkzLCAgICAgIEdNSSwgICAgICAgU0RJTzQsICAgICAgICAgU1BJMywgICAgICAweDE0LCAyOCwgMHg4NCwgMCwgIDB4QjAsIDIwKSwKLQlQSU5HUk9VUChHTUIsICAgTkFORCwgIElERSwgICAgICAgTkFORCwgICAgICBHTUksICAgICAgIEdNSV9JTlQsICAgICAgIEdNSSwgICAgICAgMHgxOCwgMjksIDB4ODgsIDI4LCAweEIwLCAyMiksCi0JUElOR1JPVVAoR01DLCAgIE5BTkQsICBVQVJURCwgICAgIFNQSTQsICAgICAgR01JLCAgICAgICBTRkxBU0gsICAgICAgICBTUEk0LCAgICAgIDB4MTQsIDI5LCAweDg0LCAyLCAgMHhCMCwgMjQpLAotCVBJTkdST1VQKEdNRCwgICBOQU5ELCAgUlNWRCwgICAgICBOQU5ELCAgICAgIEdNSSwgICAgICAgU0ZMQVNILCAgICAgICAgR01JLCAgICAgICAweDE4LCAzMCwgMHg4OCwgMzAsIDB4QjAsIDI2KSwKLQlQSU5HUk9VUChHTUUsICAgTkFORCwgIFJTVkQsICAgICAgREFQNSwgICAgICBHTUksICAgICAgIFNESU80LCAgICAgICAgIEdNSSwgICAgICAgMHgxOCwgMCwgIDB4OEMsIDAsICAweEE4LCAyNCksCi0JUElOR1JPVVAoR1BVLCAgIFVBUlQsICBQV00sICAgICAgIFVBUlRBLCAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTQsIDE2LCAweDhDLCA0LCAgMHhBNCwgMjApLAotCVBJTkdST1VQKEdQVTcsICBTWVMsICAgUlRDSywgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlRDSywgICAgICAweDIwLCAxMSwgMHg5OCwgMjgsIDB4QTQsIDYpLAotCVBJTkdST1VQKEdQViwgICBTRCwgICAgUENJRSwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUENJRSwgICAgICAweDE0LCAxNywgMHg4QywgMiwgIDB4QTAsIDMwKSwKLQlQSU5HUk9VUChIRElOVCwgTENELCAgIEhETUksICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIEhETUksICAgICAgMHgxQywgMjMsIDB4ODQsIDQsICAweEFDLCAyMiksCi0JUElOR1JPVVAoSTJDUCwgIFNZUywgICBJMkMsICAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTQsIDE4LCAweDg4LCA4LCAgMHhBNCwgMiksCi0JUElOR1JPVVAoSVJSWCwgIFVBUlQsICBVQVJUQSwgICAgIFVBUlRCLCAgICAgR01JLCAgICAgICBTUEk0LCAgICAgICAgICBVQVJUQiwgICAgIDB4MTQsIDIwLCAweDg4LCAxOCwgMHhBOCwgMjIpLAotCVBJTkdST1VQKElSVFgsICBVQVJULCAgVUFSVEEsICAgICBVQVJUQiwgICAgIEdNSSwgICAgICAgU1BJNCwgICAgICAgICAgVUFSVEIsICAgICAweDE0LCAxOSwgMHg4OCwgMTYsIDB4QTgsIDIwKSwKLQlQSU5HUk9VUChLQkNBLCAgU1lTLCAgIEtCQywgICAgICAgTkFORCwgICAgICBTRElPMiwgICAgIEVNQ19URVNUMF9ETEwsIEtCQywgICAgICAgMHgxNCwgMjIsIDB4ODgsIDEwLCAweEE0LCA4KSwKLQlQSU5HUk9VUChLQkNCLCAgU1lTLCAgIEtCQywgICAgICAgTkFORCwgICAgICBTRElPMiwgICAgIE1JTywgICAgICAgICAgIEtCQywgICAgICAgMHgxNCwgMjEsIDB4ODgsIDEyLCAweEE0LCAxMCksCi0JUElOR1JPVVAoS0JDQywgIFNZUywgICBLQkMsICAgICAgIE5BTkQsICAgICAgVFJBQ0UsICAgICBFTUNfVEVTVDFfRExMLCBLQkMsICAgICAgIDB4MTgsIDI2LCAweDg4LCAxNCwgMHhBNCwgMTIpLAotCVBJTkdST1VQKEtCQ0QsICBTWVMsICAgS0JDLCAgICAgICBOQU5ELCAgICAgIFNESU8yLCAgICAgTUlPLCAgICAgICAgICAgS0JDLCAgICAgICAweDIwLCAxMCwgMHg5OCwgMjYsIDB4QTQsIDE0KSwKLQlQSU5HUk9VUChLQkNFLCAgU1lTLCAgIEtCQywgICAgICAgTkFORCwgICAgICBPV1IsICAgICAgIFJTVkQsICAgICAgICAgIEtCQywgICAgICAgMHgxNCwgMjYsIDB4ODAsIDI4LCAweEIwLCAyKSwKLQlQSU5HUk9VUChLQkNGLCAgU1lTLCAgIEtCQywgICAgICAgTkFORCwgICAgICBUUkFDRSwgICAgIE1JTywgICAgICAgICAgIEtCQywgICAgICAgMHgxNCwgMjcsIDB4ODAsIDI2LCAweEIwLCAwKSwKLQlQSU5HUk9VUChMQ1NOLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBTUEkzLCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMzEsIDB4OTAsIDEyLCAweEFDLCAyMCksCi0JUElOR1JPVVAoTEQwLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDAsICAweDk0LCAwLCAgMHhBQywgMTIpLAotCVBJTkdST1VQKExEMSwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxLCAgMHg5NCwgMiwgIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDEwLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTAsIDB4OTQsIDIwLCAweEFDLCAxMiksCi0JUElOR1JPVVAoTEQxMSwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDExLCAweDk0LCAyMiwgMHhBQywgMTIpLAotCVBJTkdST1VQKExEMTIsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxMiwgMHg5NCwgMjQsIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDEzLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTMsIDB4OTQsIDI2LCAweEFDLCAxMiksCi0JUElOR1JPVVAoTEQxNCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDE0LCAweDk0LCAyOCwgMHhBQywgMTIpLAotCVBJTkdST1VQKExEMTUsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxNSwgMHg5NCwgMzAsIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDE2LCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTYsIDB4OTgsIDAsICAweEFDLCAxMiksCi0JUElOR1JPVVAoTEQxNywgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDE3LCAweDk4LCAyLCAgMHhBQywgMTIpLAotCVBJTkdST1VQKExEMiwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyLCAgMHg5NCwgNCwgIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDMsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMywgIDB4OTQsIDYsICAweEFDLCAxMiksCi0JUElOR1JPVVAoTEQ0LCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDQsICAweDk0LCA4LCAgMHhBQywgMTIpLAotCVBJTkdST1VQKExENSwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCA1LCAgMHg5NCwgMTAsIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDYsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgNiwgIDB4OTQsIDEyLCAweEFDLCAxMiksCi0JUElOR1JPVVAoTEQ3LCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDcsICAweDk0LCAxNCwgMHhBQywgMTIpLAotCVBJTkdST1VQKExEOCwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCA4LCAgMHg5NCwgMTYsIDB4QUMsIDEyKSwKLQlQSU5HUk9VUChMRDksICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgOSwgIDB4OTQsIDE4LCAweEFDLCAxMiksCi0JUElOR1JPVVAoTERDLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDMwLCAweDkwLCAxNCwgMHhBQywgMjApLAotCVBJTkdST1VQKExESSwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDIwLCA2LCAgMHg5OCwgMTYsIDB4QUMsIDE4KSwKLQlQSU5HUk9VUChMSFAwLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTgsIDB4OTgsIDEwLCAweEFDLCAxNiksCi0JUElOR1JPVVAoTEhQMSwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDE5LCAweDk4LCA0LCAgMHhBQywgMTQpLAotCVBJTkdST1VQKExIUDIsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyMCwgMHg5OCwgNiwgIDB4QUMsIDE0KSwKLQlQSU5HUk9VUChMSFMsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgyMCwgNywgIDB4OTAsIDIyLCAweEFDLCAyMiksCi0JUElOR1JPVVAoTE0wLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDI0LCAweDkwLCAyNiwgMHhBQywgMjIpLAotCVBJTkdST1VQKExNMSwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgQ1JULCAgICAgICAgICAgUlNWRDMsICAgICAweDFDLCAyNSwgMHg5MCwgMjgsIDB4QUMsIDIyKSwKLQlQSU5HUk9VUChMUFAsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgyMCwgOCwgIDB4OTgsIDE0LCAweEFDLCAxOCksCi0JUElOR1JPVVAoTFBXMCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBIRE1JLCAgICAgICAgICBESVNQTEFZQSwgIDB4MjAsIDMsICAweDkwLCAwLCAgMHhBQywgMjApLAotCVBJTkdST1VQKExQVzEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDIwLCA0LCAgMHg5MCwgMiwgIDB4QUMsIDIwKSwKLQlQSU5HUk9VUChMUFcyLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBTUEkzLCAgICAgIEhETUksICAgICAgICAgIERJU1BMQVlBLCAgMHgyMCwgNSwgIDB4OTAsIDQsICAweEFDLCAyMCksCi0JUElOR1JPVVAoTFNDMCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDI3LCAweDkwLCAxOCwgMHhBQywgMjIpLAotCVBJTkdST1VQKExTQzEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFNQSTMsICAgICAgSERNSSwgICAgICAgICAgRElTUExBWUEsICAweDFDLCAyOCwgMHg5MCwgMjAsIDB4QUMsIDIwKSwKLQlQSU5HUk9VUChMU0NLLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBTUEkzLCAgICAgIEhETUksICAgICAgICAgIERJU1BMQVlBLCAgMHgxQywgMjksIDB4OTAsIDE2LCAweEFDLCAyMCksCi0JUElOR1JPVVAoTFNEQSwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBIRE1JLCAgICAgICAgICBESVNQTEFZQSwgIDB4MjAsIDEsICAweDkwLCA4LCAgMHhBQywgMjApLAotCVBJTkdST1VQKExTREksICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFNQSTMsICAgICAgUlNWRCwgICAgICAgICAgRElTUExBWUEsICAweDIwLCAyLCAgMHg5MCwgNiwgIDB4QUMsIDIwKSwKLQlQSU5HUk9VUChMU1BJLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIEhETUksICAgICAgICAgIERJU1BMQVlBLCAgMHgyMCwgMCwgIDB4OTAsIDEwLCAweEFDLCAyMiksCi0JUElOR1JPVVAoTFZQMCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDIxLCAweDkwLCAzMCwgMHhBQywgMjIpLAotCVBJTkdST1VQKExWUDEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyMiwgMHg5OCwgOCwgIDB4QUMsIDE2KSwKLQlQSU5HUk9VUChMVlMsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMjYsIDB4OTAsIDI0LCAweEFDLCAyMiksCi0JUElOR1JPVVAoT1dDLCAgIFNZUywgICBPV1IsICAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBPV1IsICAgICAgIDB4MTQsIDMxLCAweDg0LCA4LCAgMHhCMCwgMzApLAotCVBJTkdST1VQKFBNQywgICBTWVMsICAgUFdSX09OLCAgICBQV1JfSU5UUiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUFdSX09OLCAgICAweDE0LCAyMywgMHg5OCwgMTgsIC0xLCAgIC0xKSwKLQlQSU5HUk9VUChQVEEsICAgTkFORCwgIEkyQzIsICAgICAgSERNSSwgICAgICBHTUksICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxNCwgMjQsIDB4OTgsIDIyLCAweEE0LCA0KSwKLQlQSU5HUk9VUChSTSwgICAgVUFSVCwgIEkyQywgICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxNCwgMjUsIDB4ODAsIDE0LCAweEE0LCAwKSwKLQlQSU5HUk9VUChTREIsICAgU0QsICAgIFVBUlRBLCAgICAgUFdNLCAgICAgICBTRElPMywgICAgIFNQSTIsICAgICAgICAgIFBXTSwgICAgICAgMHgyMCwgMTUsIDB4OEMsIDEwLCAtMSwgICAtMSksCi0JUElOR1JPVVAoU0RDLCAgIFNELCAgICBQV00sICAgICAgIFRXQywgICAgICAgU0RJTzMsICAgICBTUEkzLCAgICAgICAgICBUV0MsICAgICAgIDB4MTgsIDEsICAweDhDLCAxMiwgMHhBQywgMjgpLAotCVBJTkdST1VQKFNERCwgICBTRCwgICAgVUFSVEEsICAgICBQV00sICAgICAgIFNESU8zLCAgICAgU1BJMywgICAgICAgICAgUFdNLCAgICAgICAweDE4LCAyLCAgMHg4QywgMTQsIDB4QUMsIDMwKSwKLQlQSU5HUk9VUChTRElPMSwgQkIsICAgIFNESU8xLCAgICAgUlNWRCwgICAgICBVQVJURSwgICAgIFVBUlRBLCAgICAgICAgIFJTVkQyLCAgICAgMHgxNCwgMzAsIDB4ODAsIDMwLCAweEIwLCAxOCksCi0JUElOR1JPVVAoU0xYQSwgIFNELCAgICBQQ0lFLCAgICAgIFNQSTQsICAgICAgU0RJTzMsICAgICBTUEkyLCAgICAgICAgICBQQ0lFLCAgICAgIDB4MTgsIDMsICAweDg0LCA2LCAgMHhBNCwgMjIpLAotCVBJTkdST1VQKFNMWEMsICBTRCwgICAgU1BESUYsICAgICBTUEk0LCAgICAgIFNESU8zLCAgICAgU1BJMiwgICAgICAgICAgU1BJNCwgICAgICAweDE4LCA1LCAgMHg4NCwgMTAsIDB4QTQsIDI2KSwKLQlQSU5HUk9VUChTTFhELCAgU0QsICAgIFNQRElGLCAgICAgU1BJNCwgICAgICBTRElPMywgICAgIFNQSTIsICAgICAgICAgIFNQSTQsICAgICAgMHgxOCwgNiwgIDB4ODQsIDEyLCAweEE0LCAyOCksCi0JUElOR1JPVVAoU0xYSywgIFNELCAgICBQQ0lFLCAgICAgIFNQSTQsICAgICAgU0RJTzMsICAgICBTUEkyLCAgICAgICAgICBQQ0lFLCAgICAgIDB4MTgsIDcsICAweDg0LCAxNCwgMHhBNCwgMzApLAotCVBJTkdST1VQKFNQREksICBBVURJTywgU1BESUYsICAgICBSU1ZELCAgICAgIEkyQywgICAgICAgU0RJTzIsICAgICAgICAgUlNWRDIsICAgICAweDE4LCA4LCAgMHg4QywgOCwgIDB4QTQsIDE2KSwKLQlQSU5HUk9VUChTUERPLCAgQVVESU8sIFNQRElGLCAgICAgUlNWRCwgICAgICBJMkMsICAgICAgIFNESU8yLCAgICAgICAgIFJTVkQyLCAgICAgMHgxOCwgOSwgIDB4OEMsIDYsICAweEE0LCAxOCksCi0JUElOR1JPVVAoU1BJQSwgIEFVRElPLCBTUEkxLCAgICAgIFNQSTIsICAgICAgU1BJMywgICAgICBHTUksICAgICAgICAgICBHTUksICAgICAgIDB4MTgsIDEwLCAweDhDLCAzMCwgMHhBOCwgNCksCi0JUElOR1JPVVAoU1BJQiwgIEFVRElPLCBTUEkxLCAgICAgIFNQSTIsICAgICAgU1BJMywgICAgICBHTUksICAgICAgICAgICBHTUksICAgICAgIDB4MTgsIDExLCAweDhDLCAyOCwgMHhBOCwgNiksCi0JUElOR1JPVVAoU1BJQywgIEFVRElPLCBTUEkxLCAgICAgIFNQSTIsICAgICAgU1BJMywgICAgICBHTUksICAgICAgICAgICBHTUksICAgICAgIDB4MTgsIDEyLCAweDhDLCAyNiwgMHhBOCwgOCksCi0JUElOR1JPVVAoU1BJRCwgIEFVRElPLCBTUEkyLCAgICAgIFNQSTEsICAgICAgU1BJMl9BTFQsICBHTUksICAgICAgICAgICBHTUksICAgICAgIDB4MTgsIDEzLCAweDhDLCAyNCwgMHhBOCwgMTApLAotCVBJTkdST1VQKFNQSUUsICBBVURJTywgU1BJMiwgICAgICBTUEkxLCAgICAgIFNQSTJfQUxULCAgR01JLCAgICAgICAgICAgR01JLCAgICAgICAweDE4LCAxNCwgMHg4QywgMjIsIDB4QTgsIDEyKSwKLQlQSU5HUk9VUChTUElGLCAgQVVESU8sIFNQSTMsICAgICAgU1BJMSwgICAgICBTUEkyLCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxOCwgMTUsIDB4OEMsIDIwLCAweEE4LCAxNCksCi0JUElOR1JPVVAoU1BJRywgIEFVRElPLCBTUEkzLCAgICAgIFNQSTIsICAgICAgU1BJMl9BTFQsICBJMkMsICAgICAgICAgICBTUEkyX0FMVCwgIDB4MTgsIDE2LCAweDhDLCAxOCwgMHhBOCwgMTYpLAotCVBJTkdST1VQKFNQSUgsICBBVURJTywgU1BJMywgICAgICBTUEkyLCAgICAgIFNQSTJfQUxULCAgSTJDLCAgICAgICAgICAgU1BJMl9BTFQsICAweDE4LCAxNywgMHg4QywgMTYsIDB4QTgsIDE4KSwKLQlQSU5HUk9VUChVQUEsICAgQkIsICAgIFNQSTMsICAgICAgTUlQSV9IUywgICBVQVJUQSwgICAgIFVMUEksICAgICAgICAgIE1JUElfSFMsICAgMHgxOCwgMTgsIDB4ODAsIDAsICAweEFDLCAwKSwKLQlQSU5HUk9VUChVQUIs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LCAxNCksCi0JUElOR1JPVVAoRERSQywgIEREUiwgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZELCAgICAgIC0xLCAgIC0xLCAtMSwgICAtMSwgMHhBQywgMjYpLAotCVBJTkdST1VQKFBNQ0EsICBTWVMsICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRCwgICAgICAtMSwgICAtMSwgLTEsICAgLTEsIDB4QjAsIDQpLAotCVBJTkdST1VQKFBNQ0IsICBTWVMsICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRCwgICAgICAtMSwgICAtMSwgLTEsICAgLTEsIDB4QjAsIDYpLAotCVBJTkdST1VQKFBNQ0MsICBTWVMsICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRCwgICAgICAtMSwgICAtMSwgLTEsICAgLTEsIDB4QjAsIDgpLAotCVBJTkdST1VQKFBNQ0QsICBTWVMsICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRCwgICAgICAtMSwgICAtMSwgLTEsICAgLTEsIDB4QjAsIDEwKSwKLQlQSU5HUk9VUChQTUNFLCAgU1lTLCAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQsICAgICAgLTEsICAgLTEsIC0xLCAgIC0xLCAweEIwLCAxMiksCi0JUElOR1JPVVAoWE0yQywgIEREUiwgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZELCAgICAgIC0xLCAgIC0xLCAtMSwgICAtMSwgMHhBOCwgMzApLAotCVBJTkdST1VQKFhNMkQsICBERFIsICAgUlNWRCwgICAgICBSU1ZELCAgIC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LAorCVBJTkdST1VQKEFUQiwgICBOQU5ELCAgSURFLCAgICAgICBOQU5ELCAgICAgIEdNSSwgICAgICAgU0RJTzQsICAgICAgICAgSURFLCAgICAgICAweDE0LCAxLCAgMHg4MCwgMTYsIDB4QTAsIDIpLAorCVBJTkdST1VQKEFUQywgICBOQU5ELCAgSURFLCAgICAgICBOQU5ELCAgICAgIEdNSSwgICAgICAgU0RJTzQsICAgICAgICAgSURFLCAgICAgICAweDE0LCAyLCAgMHg4MCwgMjIsIDB4QTAsIDQpLAorCVBJTkdST1VQKEFURCwgICBOQU5ELCAgSURFLCAgICAgICBOQU5ELCAgICAgIEdNSSwgICAgICAgU0RJTzQsICAgICAgICAgSURFLCAgICAgICAweDE0LCAzLCAgMHg4MCwgMjAsIDB4QTAsIDYpLAorCVBJTkdST1VQKEFURSwgICBOQU5ELCAgSURFLCAgICAgICBOQU5ELCAgICAgIEdNSSwgICAgICAgUlNWRCwgICAgICAgICAgSURFLCAgICAgICAweDE4LCAyNSwgMHg4MCwgMTIsIDB4QTAsIDgpLAorCVBJTkdST1VQKENERVYxLCBBVURJTywgT1NDLCAgICAgICBQTExBX09VVCwgIFBMTE1fT1VUMSwgQVVESU9fU1lOQywgICAgT1NDLCAgICAgICAweDE0LCA0LCAgMHg4OCwgMiwgIDB4QTgsIDApLAorCVBJTkdST1VQKENERVYyLCBBVURJTywgT1NDLCAgICAgICBBSEJfQ0xLLCAgIEFQQl9DTEssICAgUExMUF9PVVQ0LCAgICAgT1NDLCAgICAgICAweDE0LCA1LCAgMHg4OCwgNCwgIDB4QTgsIDIpLAorCVBJTkdST1VQKENSVFAsICBMQ0QsICAgQ1JULCAgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRCwgICAgICAweDIwLCAxNCwgMHg5OCwgMjAsIDB4QTQsIDI0KSwKKwlQSU5HUk9VUChDU1VTLCAgVkksICAgIFBMTENfT1VUMSwgUExMUF9PVVQyLCBQTExQX09VVDMsIFZJX1NFTlNPUl9DTEssIFBMTENfT1VUMSwgMHgxNCwgNiwgIDB4ODgsIDYsICAweEFDLCAyNCksCisJUElOR1JPVVAoREFQMSwgIEFVRElPLCBEQVAxLCAgICAgIFJTVkQsICAgICAgR01JLCAgICAgICBTRElPMiwgICAgICAgICBEQVAxLCAgICAgIDB4MTQsIDcsICAweDg4LCAyMCwgMHhBMCwgMTApLAorCVBJTkdST1VQKERBUDIsICBBVURJTywgREFQMiwgICAgICBUV0MsICAgICAgIFJTVkQsICAgICAgR01JLCAgICAgICAgICAgREFQMiwgICAgICAweDE0LCA4LCAgMHg4OCwgMjIsIDB4QTAsIDEyKSwKKwlQSU5HUk9VUChEQVAzLCAgQkIsICAgIERBUDMsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIERBUDMsICAgICAgMHgxNCwgOSwgIDB4ODgsIDI0LCAweEEwLCAxNCksCisJUElOR1JPVVAoREFQNCwgIFVBUlQsICBEQVA0LCAgICAgIFJTVkQsICAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBEQVA0LCAgICAgIDB4MTQsIDEwLCAweDg4LCAyNiwgMHhBMCwgMTYpLAorCVBJTkdST1VQKEREQywgICBMQ0QsICAgSTJDMiwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDE4LCAzMSwgMHg4OCwgMCwgIDB4QjAsIDI4KSwKKwlQSU5HUk9VUChEVEEsICAgVkksICAgIFJTVkQsICAgICAgU0RJTzIsICAgICBWSSwgICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxNCwgMTEsIDB4ODQsIDIwLCAweEEwLCAxOCksCisJUElOR1JPVVAoRFRCLCAgIFZJLCAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgVkksICAgICAgICBTUEkxLCAgICAgICAgICBSU1ZEMSwgICAgIDB4MTQsIDEyLCAweDg0LCAyMiwgMHhBMCwgMjApLAorCVBJTkdST1VQKERUQywgICBWSSwgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFZJLCAgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDEsICAgICAweDE0LCAxMywgMHg4NCwgMjYsIDB4QTAsIDIyKSwKKwlQSU5HUk9VUChEVEQsICAgVkksICAgIFJTVkQsICAgICAgU0RJTzIsICAgICBWSSwgICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQxLCAgICAgMHgxNCwgMTQsIDB4ODQsIDI4LCAweEEwLCAyNCksCisJUElOR1JPVVAoRFRFLCAgIFZJLCAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgVkksICAgICAgICBTUEkxLCAgICAgICAgICBSU1ZEMSwgICAgIDB4MTQsIDE1LCAweDg0LCAzMCwgMHhBMCwgMjYpLAorCVBJTkdST1VQKERURiwgICBWSSwgICAgSTJDMywgICAgICBSU1ZELCAgICAgIFZJLCAgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDIwLCAxMiwgMHg5OCwgMzAsIDB4QTAsIDI4KSwKKwlQSU5HUk9VUChHTUEsICAgTkFORCwgIFVBUlRFLCAgICAgU1BJMywgICAgICBHTUksICAgICAgIFNESU80LCAgICAgICAgIFNQSTMsICAgICAgMHgxNCwgMjgsIDB4ODQsIDAsICAweEIwLCAyMCksCisJUElOR1JPVVAoR01CLCAgIE5BTkQsICBJREUsICAgICAgIE5BTkQsICAgICAgR01JLCAgICAgICBHTUlfSU5ULCAgICAgICBHTUksICAgICAgIDB4MTgsIDI5LCAweDg4LCAyOCwgMHhCMCwgMjIpLAorCVBJTkdST1VQKEdNQywgICBOQU5ELCAgVUFSVEQsICAgICBTUEk0LCAgICAgIEdNSSwgICAgICAgU0ZMQVNILCAgICAgICAgU1BJNCwgICAgICAweDE0LCAyOSwgMHg4NCwgMiwgIDB4QjAsIDI0KSwKKwlQSU5HUk9VUChHTUQsICAgTkFORCwgIFJTVkQsICAgICAgTkFORCwgICAgICBHTUksICAgICAgIFNGTEFTSCwgICAgICAgIEdNSSwgICAgICAgMHgxOCwgMzAsIDB4ODgsIDMwLCAweEIwLCAyNiksCisJUElOR1JPVVAoR01FLCAgIE5BTkQsICBSU1ZELCAgICAgIERBUDUsICAgICAgR01JLCAgICAgICBTRElPNCwgICAgICAgICBHTUksICAgICAgIDB4MTgsIDAsICAweDhDLCAwLCAgMHhBOCwgMjQpLAorCVBJTkdST1VQKEdQVSwgICBVQVJULCAgUFdNLCAgICAgICBVQVJUQSwgICAgIEdNSSwgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDE0LCAxNiwgMHg4QywgNCwgIDB4QTQsIDIwKSwKKwlQSU5HUk9VUChHUFU3LCAgU1lTLCAgIFJUQ0ssICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJUQ0ssICAgICAgMHgyMCwgMTEsIDB4OTgsIDI4LCAweEE0LCA2KSwKKwlQSU5HUk9VUChHUFYsICAgU0QsICAgIFBDSUUsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFBDSUUsICAgICAgMHgxNCwgMTcsIDB4OEMsIDIsICAweEEwLCAzMCksCisJUElOR1JPVVAoSERJTlQsIExDRCwgICBIRE1JLCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBIRE1JLCAgICAgIDB4MUMsIDIzLCAweDg0LCA0LCAgMHhBQywgMjIpLAorCVBJTkdST1VQKEkyQ1AsICBTWVMsICAgSTJDLCAgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDE0LCAxOCwgMHg4OCwgOCwgIDB4QTQsIDIpLAorCVBJTkdST1VQKElSUlgsICBVQVJULCAgVUFSVEEsICAgICBVQVJUQiwgICAgIEdNSSwgICAgICAgU1BJNCwgICAgICAgICAgVUFSVEIsICAgICAweDE0LCAyMCwgMHg4OCwgMTgsIDB4QTgsIDIyKSwKKwlQSU5HUk9VUChJUlRYLCAgVUFSVCwgIFVBUlRBLCAgICAgVUFSVEIsICAgICBHTUksICAgICAgIFNQSTQsICAgICAgICAgIFVBUlRCLCAgICAgMHgxNCwgMTksIDB4ODgsIDE2LCAweEE4LCAyMCksCisJUElOR1JPVVAoS0JDQSwgIFNZUywgICBLQkMsICAgICAgIE5BTkQsICAgICAgU0RJTzIsICAgICBFTUNfVEVTVDBfRExMLCBLQkMsICAgICAgIDB4MTQsIDIyLCAweDg4LCAxMCwgMHhBNCwgOCksCisJUElOR1JPVVAoS0JDQiwgIFNZUywgICBLQkMsICAgICAgIE5BTkQsICAgICAgU0RJTzIsICAgICBNSU8sICAgICAgICAgICBLQkMsICAgICAgIDB4MTQsIDIxLCAweDg4LCAxMiwgMHhBNCwgMTApLAorCVBJTkdST1VQKEtCQ0MsICBTWVMsICAgS0JDLCAgICAgICBOQU5ELCAgICAgIFRSQUNFLCAgICAgRU1DX1RFU1QxX0RMTCwgS0JDLCAgICAgICAweDE4LCAyNiwgMHg4OCwgMTQsIDB4QTQsIDEyKSwKKwlQSU5HUk9VUChLQkNELCAgU1lTLCAgIEtCQywgICAgICAgTkFORCwgICAgICBTRElPMiwgICAgIE1JTywgICAgICAgICAgIEtCQywgICAgICAgMHgyMCwgMTAsIDB4OTgsIDI2LCAweEE0LCAxNCksCisJUElOR1JPVVAoS0JDRSwgIFNZUywgICBLQkMsICAgICAgIE5BTkQsICAgICAgT1dSLCAgICAgICBSU1ZELCAgICAgICAgICBLQkMsICAgICAgIDB4MTQsIDI2LCAweDgwLCAyOCwgMHhCMCwgMiksCisJUElOR1JPVVAoS0JDRiwgIFNZUywgICBLQkMsICAgICAgIE5BTkQsICAgICAgVFJBQ0UsICAgICBNSU8sICAgICAgICAgICBLQkMsICAgICAgIDB4MTQsIDI3LCAweDgwLCAyNiwgMHhCMCwgMCksCisJUElOR1JPVVAoTENTTiwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDMxLCAweDkwLCAxMiwgMHhBQywgMjApLAorCVBJTkdST1VQKExEMCwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAwLCAgMHg5NCwgMCwgIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDEsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMSwgIDB4OTQsIDIsICAweEFDLCAxMiksCisJUElOR1JPVVAoTEQxMCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDEwLCAweDk0LCAyMCwgMHhBQywgMTIpLAorCVBJTkdST1VQKExEMTEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxMSwgMHg5NCwgMjIsIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDEyLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTIsIDB4OTQsIDI0LCAweEFDLCAxMiksCisJUElOR1JPVVAoTEQxMywgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDEzLCAweDk0LCAyNiwgMHhBQywgMTIpLAorCVBJTkdST1VQKExEMTQsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxNCwgMHg5NCwgMjgsIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDE1LCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMTUsIDB4OTQsIDMwLCAweEFDLCAxMiksCisJUElOR1JPVVAoTEQxNiwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDE2LCAweDk4LCAwLCAgMHhBQywgMTIpLAorCVBJTkdST1VQKExEMTcsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxNywgMHg5OCwgMiwgIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDIsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMiwgIDB4OTQsIDQsICAweEFDLCAxMiksCisJUElOR1JPVVAoTEQzLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDMsICAweDk0LCA2LCAgMHhBQywgMTIpLAorCVBJTkdST1VQKExENCwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCA0LCAgMHg5NCwgOCwgIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDUsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgNSwgIDB4OTQsIDEwLCAweEFDLCAxMiksCisJUElOR1JPVVAoTEQ2LCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDYsICAweDk0LCAxMiwgMHhBQywgMTIpLAorCVBJTkdST1VQKExENywgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCA3LCAgMHg5NCwgMTQsIDB4QUMsIDEyKSwKKwlQSU5HUk9VUChMRDgsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBYSU8sICAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgOCwgIDB4OTQsIDE2LCAweEFDLCAxMiksCisJUElOR1JPVVAoTEQ5LCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDksICAweDk0LCAxOCwgMHhBQywgMTIpLAorCVBJTkdST1VQKExEQywgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAzMCwgMHg5MCwgMTQsIDB4QUMsIDIwKSwKKwlQSU5HUk9VUChMREksICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgyMCwgNiwgIDB4OTgsIDE2LCAweEFDLCAxOCksCisJUElOR1JPVVAoTEhQMCwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDE4LCAweDk4LCAxMCwgMHhBQywgMTYpLAorCVBJTkdST1VQKExIUDEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAxOSwgMHg5OCwgNCwgIDB4QUMsIDE0KSwKKwlQSU5HUk9VUChMSFAyLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMjAsIDB4OTgsIDYsICAweEFDLCAxNCksCisJUElOR1JPVVAoTEhTLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MjAsIDcsICAweDkwLCAyMiwgMHhBQywgMjIpLAorCVBJTkdST1VQKExNMCwgICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFNQSTMsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyNCwgMHg5MCwgMjYsIDB4QUMsIDIyKSwKKwlQSU5HUk9VUChMTTEsICAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIENSVCwgICAgICAgICAgIFJTVkQzLCAgICAgMHgxQywgMjUsIDB4OTAsIDI4LCAweEFDLCAyMiksCisJUElOR1JPVVAoTFBQLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MjAsIDgsICAweDk4LCAxNCwgMHhBQywgMTgpLAorCVBJTkdST1VQKExQVzAsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFNQSTMsICAgICAgSERNSSwgICAgICAgICAgRElTUExBWUEsICAweDIwLCAzLCAgMHg5MCwgMCwgIDB4QUMsIDIwKSwKKwlQSU5HUk9VUChMUFcxLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgyMCwgNCwgIDB4OTAsIDIsICAweEFDLCAyMCksCisJUElOR1JPVVAoTFBXMiwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBIRE1JLCAgICAgICAgICBESVNQTEFZQSwgIDB4MjAsIDUsICAweDkwLCA0LCAgMHhBQywgMjApLAorCVBJTkdST1VQKExTQzAsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFhJTywgICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyNywgMHg5MCwgMTgsIDB4QUMsIDIyKSwKKwlQSU5HUk9VUChMU0MxLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBTUEkzLCAgICAgIEhETUksICAgICAgICAgIERJU1BMQVlBLCAgMHgxQywgMjgsIDB4OTAsIDIwLCAweEFDLCAyMCksCisJUElOR1JPVVAoTFNDSywgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgU1BJMywgICAgICBIRE1JLCAgICAgICAgICBESVNQTEFZQSwgIDB4MUMsIDI5LCAweDkwLCAxNiwgMHhBQywgMjApLAorCVBJTkdST1VQKExTREEsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFNQSTMsICAgICAgSERNSSwgICAgICAgICAgRElTUExBWUEsICAweDIwLCAxLCAgMHg5MCwgOCwgIDB4QUMsIDIwKSwKKwlQSU5HUk9VUChMU0RJLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBTUEkzLCAgICAgIFJTVkQsICAgICAgICAgIERJU1BMQVlBLCAgMHgyMCwgMiwgIDB4OTAsIDYsICAweEFDLCAyMCksCisJUElOR1JPVVAoTFNQSSwgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBIRE1JLCAgICAgICAgICBESVNQTEFZQSwgIDB4MjAsIDAsICAweDkwLCAxMCwgMHhBQywgMjIpLAorCVBJTkdST1VQKExWUDAsICBMQ0QsICAgRElTUExBWUEsICBESVNQTEFZQiwgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgUlNWRDQsICAgICAweDFDLCAyMSwgMHg5MCwgMzAsIDB4QUMsIDIyKSwKKwlQSU5HUk9VUChMVlAxLCAgTENELCAgIERJU1BMQVlBLCAgRElTUExBWUIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFJTVkQ0LCAgICAgMHgxQywgMjIsIDB4OTgsIDgsICAweEFDLCAxNiksCisJUElOR1JPVVAoTFZTLCAgIExDRCwgICBESVNQTEFZQSwgIERJU1BMQVlCLCAgWElPLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MUMsIDI2LCAweDkwLCAyNCwgMHhBQywgMjIpLAorCVBJTkdST1VQKE9XQywgICBTWVMsICAgT1dSLCAgICAgICBSU1ZELCAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICAgICAgT1dSLCAgICAgICAweDE0LCAzMSwgMHg4NCwgOCwgIDB4QjAsIDMwKSwKKwlQSU5HUk9VUChQTUMsICAgU1lTLCAgIFBXUl9PTiwgICAgUFdSX0lOVFIsICBSU1ZELCAgICAgIFJTVkQsICAgICAgICAgIFBXUl9PTiwgICAgMHgxNCwgMjMsIDB4OTgsIDE4LCAtMSwgICAtMSksCisJUElOR1JPVVAoUFRBLCAgIE5BTkQsICBJMkMyLCAgICAgIEhETUksICAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTQsIDI0LCAweDk4LCAyMiwgMHhBNCwgNCksCisJUElOR1JPVVAoUk0sICAgIFVBUlQsICBJMkMsICAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTQsIDI1LCAweDgwLCAxNCwgMHhBNCwgMCksCisJUElOR1JPVVAoU0RCLCAgIFNELCAgICBVQVJUQSwgICAgIFBXTSwgICAgICAgU0RJTzMsICAgICBTUEkyLCAgICAgICAgICBQV00sICAgICAgIDB4MjAsIDE1LCAweDhDLCAxMCwgLTEsICAgLTEpLAorCVBJTkdST1VQKFNEQywgICBTRCwgICAgUFdNLCAgICAgICBUV0MsICAgICAgIFNESU8zLCAgICAgU1BJMywgICAgICAgICAgVFdDLCAgICAgICAweDE4LCAxLCAgMHg4QywgMTIsIDB4QUMsIDI4KSwKKwlQSU5HUk9VUChTREQsICAgU0QsICAgIFVBUlRBLCAgICAgUFdNLCAgICAgICBTRElPMywgICAgIFNQSTMsICAgICAgICAgIFBXTSwgICAgICAgMHgxOCwgMiwgIDB4OEMsIDE0LCAweEFDLCAzMCksCisJUElOR1JPVVAoU0RJTzEsIEJCLCAgICBTRElPMSwgICAgIFJTVkQsICAgICAgVUFSVEUsICAgICBVQVJUQSwgICAgICAgICBSU1ZEMiwgICAgIDB4MTQsIDMwLCAweDgwLCAzMCwgMHhCMCwgMTgpLAorCVBJTkdST1VQKFNMWEEsICBTRCwgICAgUENJRSwgICAgICBTUEk0LCAgICAgIFNESU8zLCAgICAgU1BJMiwgICAgICAgICAgUENJRSwgICAgICAweDE4LCAzLCAgMHg4NCwgNiwgIDB4QTQsIDIyKSwKKwlQSU5HUk9VUChTTFhDLCAgU0QsICAgIFNQRElGLCAgICAgU1BJNCwgICAgICBTRElPMywgICAgIFNQSTIsICAgICAgICAgIFNQSTQsICAgICAgMHgxOCwgNSwgIDB4ODQsIDEwLCAweEE0LCAyNiksCisJUElOR1JPVVAoU0xYRCwgIFNELCAgICBTUERJRiwgICAgIFNQSTQsICAgICAgU0RJTzMsICAgICBTUEkyLCAgICAgICAgICBTUEk0LCAgICAgIDB4MTgsIDYsICAweDg0LCAxMiwgMHhBNCwgMjgpLAorCVBJTkdST1VQKFNMWEssICBTRCwgICAgUENJRSwgICAgICBTUEk0LCAgICAgIFNESU8zLCAgICAgU1BJMiwgICAgICAgICAgUENJRSwgICAgICAweDE4LCA3LCAgMHg4NCwgMTQsIDB4QTQsIDMwKSwKKwlQSU5HUk9VUChTUERJLCAgQVVESU8sIFNQRElGLCAgICAgUlNWRCwgICAgICBJMkMsICAgICAgIFNESU8yLCAgICAgICAgIFJTVkQyLCAgICAgMHgxOCwgOCwgIDB4OEMsIDgsICAweEE0LCAxNiksCisJUElOR1JPVVAoU1BETywgIEFVRElPLCBTUERJRiwgICAgIFJTVkQsICAgICAgSTJDLCAgICAgICBTRElPMiwgICAgICAgICBSU1ZEMiwgICAgIDB4MTgsIDksICAweDhDLCA2LCAgMHhBNCwgMTgpLAorCVBJTkdST1VQKFNQSUEsICBBVURJTywgU1BJMSwgICAgICBTUEkyLCAgICAgIFNQSTMsICAgICAgR01JLCAgICAgICAgICAgR01JLCAgICAgICAweDE4LCAxMCwgMHg4QywgMzAsIDB4QTgsIDQpLAorCVBJTkdST1VQKFNQSUIsICBBVURJTywgU1BJMSwgICAgICBTUEkyLCAgICAgIFNQSTMsICAgICAgR01JLCAgICAgICAgICAgR01JLCAgICAgICAweDE4LCAxMSwgMHg4QywgMjgsIDB4QTgsIDYpLAorCVBJTkdST1VQKFNQSUMsICBBVURJTywgU1BJMSwgICAgICBTUEkyLCAgICAgIFNQSTMsICAgICAgR01JLCAgICAgICAgICAgR01JLCAgICAgICAweDE4LCAxMiwgMHg4QywgMjYsIDB4QTgsIDgpLAorCVBJTkdST1VQKFNQSUQsICBBVURJTywgU1BJMiwgICAgICBTUEkxLCAgICAgIFNQSTJfQUxULCAgR01JLCAgICAgICAgICAgR01JLCAgICAgICAweDE4LCAxMywgMHg4QywgMjQsIDB4QTgsIDEwKSwKKwlQSU5HUk9VUChTUElFLCAgQVVESU8sIFNQSTIsICAgICAgU1BJMSwgICAgICBTUEkyX0FMVCwgIEdNSSwgICAgICAgICAgIEdNSSwgICAgICAgMHgxOCwgMTQsIDB4OEMsIDIyLCAweEE4LCAxMiksCisJUElOR1JPVVAoU1BJRiwgIEFVRElPLCBTUEkzLCAgICAgIFNQSTEsICAgICAgU1BJMiwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTgsIDE1LCAweDhDLCAyMCwgMHhBOCwgMTQpLAorCVBJTkdST1VQKFNQSUcsICBBVURJTywgU1BJMywgICAgICBTUEkyLCAgICAgIFNQSTJfQUxULCAgSTJDLCAgICAgICAgICAgU1BJMl9BTFQsICAweDE4LCAxNiwgMHg4QywgMTgsIDB4QTgsIDE2KSwKKwlQSU5HUk9VUChTUElILCAgQVVESU8sIFNQSTMsICAgICAgU1BJMiwgICAgICBTUEkyX0FMVCwgIEkyQywgICAgICAgICAgIFNQSTJfQUxULCAgMHgxOCwgMTcsIDB4OEMsIDE2LCAweEE4LCAxOCksCisJUElOR1JPVVAoVUFBLCAgIEJCLCAgICBTUEkzLCAgICAgIE1JUElfSFMsICAgVUFSVEEsICAgICBVTFBJLCAgICAgICAgICBNSVBJX0hTLCAgIDB4MTgsIDE4LCAweDgwLCAwLCAgMHhBQywgMCksCisJUElOR1JPVVAoVUFCLCAgIEJCLCAgICBTUEkyLCAgICAgIE1JUElfSFMsICAgVUFSVEEsICAgICBVTFBJLCAgICAgICAgICBNSVBJX0hTLCAgIDB4MTgsIDE5LCAweDgwLCAyLCAgMHhBQywgMiksCisJUElOR1JPVVAoVUFDLCAgIEJCLCAgICBPV1IsICAgICAgIFJTVkQsICAgICAgUlNWRCwgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTgsIDIwLCAweDgwLCA0LCAgMHhBQywgNCksCisJUElOR1JPVVAoVUFELCAgIFVBUlQsICBJUkRBLCAgICAgIFNQRElGLCAgICAgVUFSVEEsICAgICBTUEk0LCAgICAgICAgICBTUERJRiwgICAgIDB4MTgsIDIxLCAweDgwLCA2LCAgMHhBQywgNiksCisJUElOR1JPVVAoVUNBLCAgIFVBUlQsICBVQVJUQywgICAgIFJTVkQsICAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICAgIDB4MTgsIDIyLCAweDg0LCAxNiwgMHhBQywgOCksCisJUElOR1JPVVAoVUNCLCAgIFVBUlQsICBVQVJUQywgICAgIFBXTSwgICAgICAgR01JLCAgICAgICBSU1ZELCAgICAgICAgICBSU1ZENCwgICA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zaW1wbGUtYnVzIjsKKwkJbW9kZWwgPSAidG1zMzIwYzY0NzIiOworCQkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkJI3NpemUtY2VsbHMgPSA8MT47CisJCXJhbmdlczsKKworCQljb3JlX3BpYzogaW50ZXJydXB0LWNvbnRyb2xsZXIgeworCQkJY29tcGF0aWJsZSA9ICJ0aSxjNjR4K2NvcmUtcGljIjsKKwkJCWludGVycnVwdC1jb250cm9sbGVyOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKwkJfTsKKworCQltZWdhbW9kX3BpYzogaW50ZXJydXB0LWNvbnRyb2xsZXJAMTgwMDAwMCB7CisJCSAgICAgICBjb21wYXRpYmxlID0gInRpLGM2NHgrbWVnYW1vZC1waWMiOworCQkgICAgICAgaW50ZXJydXB0LWNvbnRyb2xsZXI7CisJCSAgICAgICAjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCQkgICAgICAgcmVnID0gPDB4MTgwMDAwMCAweDEwMDA+OworCQkgICAgICAgaW50ZXJydXB0LXBhcmVudCA9IDwmY29yZV9waWM+OworCQl9OworCisJCWNhY2hlLWNvbnRyb2xsZXJAMTg0MDAwMCB7CisJCQljb21wYXRpYmxlID0gInRpLGM2NHgrY2FjaGUiOworCQkJcmVnID0gPDB4MDE4NDAwMDAgMHg4NDAwPjsKKwkJfTsKKworCQl0aW1lcjA6IHRpbWVyQDI1ZTAwMDAgeworCQkJY29tcGF0aWJsZSA9ICJ0aSxjNjR4K3RpbWVyNjQiOworCQkJdGksY29yZS1tYXNrID0gPCAweDAxID47CisJCQlyZWcgPSA8MHgyNWUwMDAwIDB4NDA+OworCQl9OworCisJCXRpbWVyMTogdGltZXJAMjVmMDAwMCB7CisJCQljb21wYXRpYmxlID0gInRpLGM2NHgrdGltZXI2NCI7CisJCQl0aSxjb3JlLW1hc2sgPSA8IDB4MDIgPjsKKwkJCXJlZyA9IDwweDI1ZjAwMDAgMHg0MD47CisJCX07CisKKwkJdGltZXIyO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iOworCQl9OworCQljcHVAMSB7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJcmVnID0gPDE+OworCQkJbW9kZWwgPSAidGksYzY0eCsiOworCQl9OworCQljcHVAMiB7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJcmVnID0gPDI+OworCQkJbW9kZWwgPSAidGksYzY0eCsiOworCQl9OworCX07CisKKwlzb2MgeworCQljb21wYXRpYmxlID0gInNpbXBsZS1idXMiOworCQltb2RlbCA9ICJ0bXMzMjBjNjQ3NCI7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwxPjsKKwkJcmFuZ2VzOworCisJCWNvcmVfcGljOiBpbnRlcnJ1cHQtY29udHJvbGxlciB7CisJCQlpbnRlcnJ1cHQtY29udHJvbGxlcjsKKwkJCSNpbnRlcnJ1cHQtY2VsbHMgPSA8MT47CisJCQljb21wYXRpYmxlID0gInRpLGM2NHgrY29yZS1waWMiOworCQl9OworCisJCW1lZ2Ftb2RfcGljOiBpbnRlcnJ1cHQtY29udHJvbGxlckAxODAwMDAwIHsKKwkJICAgICAgIGNvbXBhdGlibGUgPSAidGksYzY0eCttZWdhbW9kLXBpYyI7CisJCSAgICAgICBpbnRlcnJ1cHQtY29udHJvbGxlcjsKKwkJICAgICAgICNpbnRlcnJ1cHQtY2VsbHMgPSA8MT47CisJCSAgICAgICByZWcgPSA8MHgxODAwMDAwIDB4MTAwMD47CisJCSAgICAgICBpbnRlcnJ1cHQtcGFyZW50ID0gPCZjb3JlX3BpYz47CisJCX07CisKKwkJY2FjaGUtY29udHJvbGxlckAxODQwMDAwIHsKKwkJCWNvbXBhdGlibGUgPSAidGksYzY0eCtjYWNoZSI7CisJCQlyZWcgPSA8MHgwMTg0MDAwMCAweDg0MDA+OworCQl9OworCisJCXRpbWVyMzogdGltZXJAMjk0MDAwMCB7CisJCQljb21wYXRpYmxlID0gInRpLGM2NHgrdGltZXI2NCI7CisJCQl0a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FTgkJMHgxNDgKKyNkZWZpbmUgUExMQ0tTVEFUCTB4MTRjCisjZGVmaW5lIFBMTFNZU1RBVAkweDE1MAorI2RlZmluZSBQTExESVY0CQkweDE2MAorI2RlZmluZSBQTExESVY1CQkweDE2NAorI2RlZmluZSBQTExESVY2CQkweDE2OAorI2RlZmluZSBQTExESVY3CQkweDE2YworI2RlZmluZSBQTExESVY4CQkweDE3MAorI2RlZmluZSBQTExESVY5CQkweDE3NAorI2RlZmluZSBQTExESVYxMAkweDE3OAorI2RlZmluZSBQTExESVYxMQkweDE3YworI2RlZmluZSBQTExESVYxMgkweDE4MAorI2RlZmluZSBQTExESVYxMwkweDE4NAorI2RlZmluZSBQTExESVYxNAkweDE4OAorI2RlZmluZSBQTExESVYxNQkweDE4YworI2RlZmluZSBQTExESVYxNgkweDE5MAorCisvKiBQTExNIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgUExMTV9QTExNX01BU0sJMHhmZgorI2RlZmluZSBQTExNX1ZBTCh4KQkoKHgpIC0gMSkKKworLyogUFJFRElWIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgUExMUFJFRElWX0VOCUJJVCgxNSkKKyNkZWZpbmUgUExMUFJFRElWX1ZBTCh4KSAoKHgpIC0gMSkKKworLyogUExMQ1RMIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgUExMQ1RMX1BMTEVOCUJJVCgwKQorI2RlZmluZSBQTExDVExfUExMUFdSRE4JQklUKDEpCisjZGVmaW5lIFBMTENUTF9QTExSU1QJQklUKDMpCisjZGVmaW5lIFBMTENUTF9QTExESVMJQklUKDQpCisjZGVmaW5lIFBMTENUTF9QTExFTlNSQwlCSVQoNSkKKyNkZWZpbmUgUExMQ1RMX0NMS01PREUJQklUKDgpCisKKy8qIFBMTENNRCByZWdpc3RlciBiaXRzICovCisjZGVmaW5lIFBMTENNRF9HT1NUQVQJQklUKDApCisKKy8qIFBMTFNUQVQgcmVnaXN0ZXIgYml0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cyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgdmVyc2lvbiAyIGFzCisgKiAgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24uCisgKi8KKyNpZm5kZWYgX0FTTV9DNlhfREVMQVlfSAorI2RlZmluZSBfQVNNX0M2WF9ERUxBWV9ICisKKyNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KKworZXh0ZXJuIHVuc2lnbmVkIGludCB0aWNrc19wZXJfbnNfc2NhbGVkOworCitzdGF0aWMgaW5saW5lIHZvaWQgX19kZWxheSh1bnNpZ25lZCBsb25nIGxvb3BzKQoreworCXVpbnQzMl90IHRtcDsKKworCS8qIDYgY3ljbGVzIHBlciBsb29wICovCisJYXNtIHZvbGF0aWxlICgiICAgICAgICBtdiAgICAuczEgICUwLCUxXG4iCisJCSAgICAgICIwOiBbJTFdIGIgICAgIC5zMSAgMGJcbiIKKwkJICAgICAgIiAgICAgICAgYWRkICAgLmwxICAtNiwlMCwlMFxuIgorCQkgICAgICAiICAgICAgICBjbXBsdCAubDEgIDEsJTAsJTFcbiIKKwkJICAgICAgIiAgICAgICAgbm9wICAgM1xuIgorCQkgICAgICA6ICIrYSIobG9vcHMpLCAiPUEiKHRtcCkpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgX2M2eF90aWNrZGVsYXkodW5zaWduZWQgaW50IHgpCit7CisJdWludDMyX3QgY250LCBlbmRjbnQ7CisKKwlhc20gdm9sYXRpbGUgKCIgICAgICAgIG12YyAgIC5zMiAgIFRTQ0wsJTBcbiIKKwkJICAgICAgIiAgICAgICAgYWRkICAgLnMyeCAgJTAsJTEsJTJcbiIKKwkJICAgICAgIiB8fCAgICAgbXZrICAgLmwyICAgMSxCMFxuIgorCQkgICAgICAiMDogW0IwXSBiICAgICAuczIgICAwYlxuIgorCQkgICAgICAiICAgICAgICBtdmMgICAuczIgICBUU0NMLCUwXG4iCisJCSAgICAgICIgICA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jdGlvbnMKKyAqLworI2RlZmluZSBub3AoKSAgICAgICAgICAgICAgICAgICAgYXNtKCJOT1BcbiIpOworI2RlZmluZSBtYigpICAgICAgICAgICAgICAgICAgICAgYmFycmllcigpCisjZGVmaW5lIHJtYigpICAgICAgICAgICAgICAgICAgICBiYXJyaWVyKCkKKyNkZWZpbmUgd21iKCkgICAgICAgICAgICAgICAgICAgIGJhcnJpZXIoKQorI2RlZmluZSBzZXRfbWIodmFyLCB2YWx1ZSkgICAgICAgZG8geyB2YXIgPSB2YWx1ZTsgIG1iKCk7IH0gd2hpbGUgKDApCisjZGVmaW5lIHNldF93bWIodmFyLCB2YWx1ZSkgICAgICBkbyB7IHZhciA9IHZhbHVlOyB3bWIoKTsgfSB3aGlsZSAoMCkKKworI2RlZmluZSBzbXBfbWIoKQkgICAgICAgICBiYXJyaWVyKCkKKyNkZWZpbmUgc21wX3JtYigpCSAgICAgICAgIGJhcnJpZXIoKQorI2RlZmluZSBzbXBfd21iKCkJICAgICAgICAgYmFycmllcigpCisjZGVmaW5lIHNtcF9yZWFkX2JhcnJpZXJfZGVwZW5kcygpCWRvIHsgfSB3aGlsZSAoMCkKKworI2RlZmluZSB4Y2hnKHB0ciwgeCkgXAorCSgoX190eXBlb2ZfXygqKHB0cikpKV9feGNoZygodW5zaWduZWQgaW50KSh4KSwgKHZvaWQgKikgKHB0ciksIFwKKwkJCQkgICAgc2l6ZW9mKCoocHRyKSkpKQorI2RlZmluZSB0YXMocHRyKSAgICB4Y2hnKChwdHIpLCAxKQorCit1bnNpZ25lZCBpbnQgX2xtYmQodW5zaWduZWQgaW50LCB1bnNpZ25lZCBpbnQpOwordW5zaWduZWQgaW50IF9iaXRyKHVuc2lnbmVkIGludCk7CisKK3N0cnVjdCBfX3hjaGdfZHVtbXkgeyB1bnNpZ25lZCBpbnQgYVsxMDBdOyB9OworI2RlZmluZSBfX3hnKHgpICgodm9sYXRpbGUgc3RydWN0IF9feGNoZ19kdW1teSAqKSh4KSkKKworc3R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AgICAgOiAibWVtb3J5Iik7CisJCQlyZXR1cm4gMDsKKwkJY2FzZSA4OgorCQkJYXNtIHZvbGF0aWxlICgibGRuZHcgLmQxdDEgKiUyLCUwXG4iCisJCQkJICAgICAgIm5vcCAgIDRcbiIKKwkJCQkgICAgICAic3RuZHcgLmQxdDEgJTAsKiUxXG4iCisJCQkJICAgICAgOiAiPSZhIih0bXA2NCkKKwkJCQkgICAgICA6ICJhIih0byksICJhIihmcm9tKQorCQkJCSAgICAgIDogIm1lbW9yeSIpOworCQkJcmV0dXJuIDA7CisJCWRlZmF1bHQ6CisJCQlicmVhazsKKwkJfQorCX0KKworCW1lbWNweSh0bywgKGNvbnN0IHZvaWQgX19mb3JjZSAqKWZyb20sIG4pOworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIF9fbXVzdF9jaGVjayBsb25nIF9fY29weV90b191c2VyKHZvaWQgX191c2VyICp0bywKKwkJY29uc3Qgdm9pZCAqZnJvbSwgdW5zaWduZWQgbG9uZyBuKQoreworCXUzMiB0bXAzMjsKKwl1NjQgdG1wNjQ7CisKKwlpZiAoX19idWlsdGluX2NvbnN0YW50X3AobikpIHsKKwkJc3dpdGNoIChuKSB7CisJCWNhc2UgMToKKwkJCSoodTggX19mb3JjZSAqKXRvID0gKih1OCAqKWZyb207CisJCQlyZXR1cm4gMDsKKwkJY2FzZSA0OgorCQkJYXNtIHZvbGF0aWxlICgibGRudyAuZDF0MSAqJTIsJTBcbiIKKwkJCQkgICAgICAibm9wICA0XG4iCisJCQkJICAgICAgInN0bncgLmQxdDEgJTAsKiUxXG4iCisJCQkJICAgICAgOiAiPSZhIih0bXAzMikKKwkJCQkgICAgICA6ICJhIih0byksICJhIihmcm9tKQorCQkJCSAgICAgIDogIm1lbW9yeSIpOworCQkJcmV0dXJuIDA7CisJCWNhc2UgODoKKwkJCWFzbSB2b2xhdGlsZSAoImxkbmR3IC5kMXQxIColMiwlMFxuIgorCQkJCSAgICAgICJub3AgICA0XG4iCisJCQ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fCBbQTBdICAgIExEQlUgICAgLkQxVDEgICAqQTQrKyxBMQorI2Vsc2UKKyAgIFshQTBdICAgQk5PUCAgICAuUzEJICAgTDIxLDUKK3x8IFtBMF0gICAgTERCVSAgICAuRDFUMSAgICpBNCsrLEEwCisJICAgU1VCCSAgIC5MMgkgICBCMywxLEIzCit8fAkgICBTSEwJICAgLlMxCSAgIEEwLDgsQTEKK0wyMToKKyNlbmRpZgorCSAgIFNIUgkgICAuUzIJICAgQjMsMSxCMAorICAgWyFCMF0gICBCTk9QICAgIC5TMQkgICBMMjQsMworCSAgIE1WSwkgICAuTDEJICAgMixBMAorCSAgIEFORAkgICAuTDEJICAgQTQsQTAsQTAKKworICAgWyFBMF0gICBCTk9QICAgIC5TMQkgICBMMjIsNQorfHwgW0EwXSAgICBMREhVICAgIC5EMVQxICAgKkE0KyssQTAKKwkgICBTVUIJICAgLkwyCSAgIEIwLDEsQjAKK3x8CSAgIFNVQgkgICAuUzIJICAgQjMsMixCMworfHwJICAgQURECSAgIC5MMQkgICBBMCxBMSxBMQorTDIyOgorCSAgIFNIUgkgICAuUzIJICAgQjAsMSxCMAorfHwJICAgWkVSTyAgICAuTDEJICAgQTAKKworICAgWyFCMF0gICBCTk9QICAgIC5TMQkgICBMMjMsNQorfHwgW0IwXSAgICBNVkMJICAgLlMyCSAgIEIwLElMQworCisJICAgU1BMT09QICAzCisJICAgU1BNQVNLICBMMQorfHwJICAgTVYJICAgLkwxCSAgIEExLEEyCit8fAkgICBMRFcJICAgLkQxVDEgICAqQTQrKyxBMQorCisJICAgTk9QCSAgIDQKKwkgICBBREQJICAgLkwxCSAgIEEwLEExLEEwCisJICAgQURECSAgIC5MMQkgICBBMixBMCxBMgorCisJICAgU1BLRVJORUwgMSwyCit8fAkgICBDTVBHVFUgIC5MMQkgICBBMSxBMixBMAorCisJICAgQURECSAgIC5MMQkgICBBMCxBMixBNgorCSAgIEVYVFUgICAgLlMxCSAgIEE2LDE2LDE2LEE3CisJICAgU0hSVSAgICAuUzJYICAgIEE2LDE2LEIwCisJICAgTk9QCQkgICAxCisJICAgQURECSAgIC5MMVggICAgQTcsQjAsQTEKK0wyMzoKKwkgICBNVksJICAgLkwyCSAgIDIsQjAKKwkgICBBTkQJICAgLkwyCSAgIEIzLEIwLEIwCisgICBbQjBdICAgIExESFUgICAgLkQxVDEgICAqQTQrKyxBMAorCSAgIE5PUAkgICA0CisgICBbQjBdICAgIEFERAkgICAuTDEJICAgQTAsQTEsQTEKK0wyNDoKKwkgICBFWFRVICAgIC5TMgkgICBCMywzMSwzMSxCMAorI2lmZGVmIENPTkZJR19DUFVfQklHX0VORElBTgorICAgWyFCMF0gICBCTk9QICAgIC5TMQkgICBMMjUsNAorfHwgW0IwXSAgICBMREJVICAgIC5EMVQxICAgKkE0LEEwCisJICAgU0hMCSAgIC5TMQkgICBBMCw4LEEwCisJICAgQURECSAgIC5MMQkgICBBMCxBMSxBMQorTDI1OgorI2Vsc2UKKyAgIFtCMF0gICAgTERCVSAgICAuRDFUMSAgICpBNCxBMAorCSAgIE5PUAkgICA0CisgICBbQjBdICAgIEFERAkgICAuTDEJICAgQTAsQTEsQTEKKyNlbmRpZgorCSAgIEVYVFUgICAgLlMxCSAgIEExLDE2LDE2LEEwCisJICAgU0hSVSAgICAuUzJYICAgIEExLDE2LEIwCisJICAgTk9QCSAgIDEKKwkgICBBREQJICAgLkwxWCAgICBBMCxCMCxBMAorCSAgIFNIUlUgICAgLlMxCSAgIEEwLDE2LEExCisJICAgQURECSAgIC5MMQkgICBBMCxBMSxBMAorCSAgIEVYVFUgICAgLlMxCSAgIEEwLDE2LDE2LEExCisJICAgRVhUVSAgICAuUzEJICAgQTEsMTYsMjQsQTIKKworCSAgIEVYVFUgICAgLlMxCSAgIEExLDI0LDE2LEEwCit8fAkgICBNVgkgICAuTDJYICAgIEEzLEIwCisKKyAgIFtCMF0gICAgT1IJICAgLkwxCSAgIEEwLEEyLEExCitMMjY6CisJICAgTk9QCSAgIDEKKwkgICBCTk9Q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CQkgICAgICAiLmNoaXAgNjhrIiA6IDogImEiICgmemVybykpOworCQkJICAgICAgImZyZXN0b3JlICUwXG5cdCIKKwkJCSAgICAgICIuY2hpcCA2OGsiIDogOiAibSIgKHplcm8pKTsKICNlbmRpZgogfQogCmRpZmYgLS1naXQgYS9hcmNoL202OGsva2VybmVsL3RyYXBzLmMgYi9hcmNoL202OGsva2VybmVsL3RyYXBzLmMKaW5kZXggYTc2NDUyYy4uZGFhYTkxOCAxMDA2NDQKLS0tIGEvYXJjaC9tNjhrL2tlcm5lbC90cmFwcy5jCisrKyBiL2FyY2gvbTY4ay9rZXJuZWwvdHJhcHMuYwpAQCAtNTUyLDEzICs1NTIsMTMgQEAKIAogI2lmZGVmIERFQlVHCiAJCWFzbSB2b2xhdGlsZSAoInB0ZXN0ciAlMywlMkAsIzcsJTBcblx0IgotCQkJICAgICAgInBtb3ZlICUlcHNyLCUxQCIKLQkJCSAgICAgIDogIj1hJiIgKGRlc2MpCi0JCQkgICAgICA6ICJhIiAoJnRlbXApLCAiYSIgKGFkZHIpLCAiZCIgKHNzdykpOworCQkJICAgICAgInBtb3ZlICUlcHNyLCUxIgorCQkJICAgICAgOiAiPWEmIiAoZGVzYyksICI9bSIgKHRlbXApCisJCQkgICAgICA6ICJhIiAoYWRkciksICJkIiAoc3N3KSk7CiAjZWxzZQogCQlhc20gdm9sYXRpbGUgKCJwdGVzdHIgJTIsJTFALCM3XG5cdCIKLQkJCSAgICAgICJwbW92ZSAlJXBzciwlMEAiCi0JCQkgICAgICA6IDogImEiICgmdGVtcCksICJhIiAoYWRkciksICJkIiAoc3N3KSk7CisJCQkgICAgICAicG1vdmUgJSVwc3IsJTAiCisJCQkgICAgICA6ICI9bSIgKHRlbXApIDogImEiIChhZGRyKSwgImQiIChzc3cpKTsKICNlbmRpZgogCQltbXVzciA9IHRlbXA7CiAKQEAgLTYwNSwyMCArNjA1LDE4IEBACiAJCQkgICAgICAgIShzc3cgJiBSVykgPyAid3JpdGUiIDogInJl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mZnMocikpOwkJCSAgICAgIFwKKwllbHNlCQkJCQkJCQkgICAgICBcCisJCXNwdXJpb3VzX2ludGVycnVwdCgpOwkJCQkJICAgICAgXAogfQotZGV2aWNlX2luaXRjYWxsKGFsY2hlbXlfaWNfcG1faW5pdCk7CisKK0RJU1AoaWMwcjAsIEFVMTAwMF9JTlRDMF9JTlRfQkFTRSwgQVUxMDAwX0lDMF9QSFlTX0FERFIgKyBJQ19SRVEwSU5UKQorRElTUChpYzByMSwgQVUxMDAwX0lOVEMwX0lOVF9CQVNFLCBBVTEwMDBfSUMwX1BIWVNfQUREUiArIElDX1JFUTFJTlQpCitESVNQKGljMXIwLCBBVTEwMDBfSU5UQzFfSU5UX0JBU0UsIEFVMTAwMF9JQzFfUEhZU19BRERSICsgSUNfUkVRMElOVCkKK0RJU1AoaWMxcjEsIEFVMTAwMF9JTlRDMV9JTlRfQkFTRSwgQVUxMDAwX0lDMV9QSFlTX0FERFIgKyBJQ19SRVExSU5UKQorCitzdGF0aWMgdm9pZCBhbGNoZW15X2dwaWNfZGlzcGF0Y2godW5zaWduZWQgaW50IGlycSwgc3RydWN0IGlycV9kZXNjICpkKQoreworCWludCBpID0gX19yYXdfcmVhZGwoQVUxMzAwX0dQSUNfQUREUiArIEFVMTMwMF9HUElDX1BSSUVOQyk7CisJZ2VuZXJpY19oYW5kbGVfaXJxKEFMQ0hFTVlfR1BJQ19JTlRfQkFTRSArIGkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBfX2luaXQgYXUxMDAwX2luaXRfaXJxKHN0cnVjdCBhbGNoZW15X2lycW1hcCAqbWFwKQoreworCXVuc2lnbmVkIGludCBiaXQsIGlycV9ucjsKKwl2b2lkIF9faW9tZW0gKmJhc2U7CisKKwlpY19pbml0KCh2b2lkIF9faW9tZW0gKilLU0VHMUFERFIoQVUxMDAwX0l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yoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGlycXJldHVybl90IGRiMTEwMF9tbWNfY2QoaW50IGlycSwgdm9pZCAqcHRyKQoreworCXZvaWQgKCptbWNfY2QpKHN0cnVjdCBtbWNfaG9zdCAqLCB1bnNpZ25lZCBsb25nKTsKKwkvKiBsaW5rIGFnYWluc3QgQ09ORklHX01NQz1tICovCisJbW1jX2NkID0gc3ltYm9sX2dldChtbWNfZGV0ZWN0X2NoYW5nZSk7CisJbW1jX2NkKHB0ciwgbXNlY3NfdG9famlmZmllcyg1MDApKTsKKwlzeW1ib2xfcHV0KG1tY19kZXRlY3RfY2hhbmdlKTsKKworCXJldHVybiBJUlFfSEFORExFRDsKK30KKworc3RhdGljIGludCBkYjExMDBfbW1jX2NkX3NldHVwKHZvaWQgKm1tY19ob3N0LCBpbnQgZW4pCit7CisJaW50IHJldCA9IDA7CisKKwlpZiAoZW4pIHsKKwkJaXJxX3NldF9pcnFfdHlwZShBVTExMDBfR1BJTzE5X0lOVCwgSVJRX1RZUEVfRURHRV9CT1RIKTsKKwkJcmV0ID0gcmVxdWVzdF9pcnEoQVUxMTAwX0dQSU8xOV9JTlQsIGRiMTEwMF9tbWNfY2QsIDAsCisJCQkJICAic2QwX2NkIiwgbW1jX2hvc3QpOworCX0gZWxzZQorCQlmcmVlX2lycShBVTExMDBfR1BJTzE5X0lOVCwgbW1jX2hvc3QpOworCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgZGIxMTAwX21tYzFfY2Rfc2V0dXAodm9pZCAqbW1jX2hvc3QsIGludCBlbikKK3sKKwlpbnQgcmV0ID0gMDsKKworCWlmIChlbikgeworCQlpcnFfc2V0X2lycV90eXBlKEFVMTEwMF9HUElPMjBfSU5ULCBJUlFfVFlQRV9FREdFX0JPVEgpOworCQlyZXQgPSByZXF1ZXN0X2lycShBVTExMDBfR1B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X3BvcnQsCisJCQkJCSAgICAgX19jdm14X2hlbHBlcl9zZ21paV9saW5rX2dldAorCQkJCQkgICAgIChpcGRfcG9ydCkpOworCisJfQorCisJcmV0dXJuIDA7Cit9CisKK2ludCBfX2N2bXhfaGVscGVyX3NnbWlpX2VudW1lcmF0ZShpbnQgaW50ZXJmYWNlKQoreworCXJldHVybiA0OworfQorLyoqCisgKiBQcm9iZSBhIFNHTUlJIGludGVyZmFjZSBhbmQgZGV0ZXJtaW5lIHRoZSBudW1iZXIgb2YgcG9ydHMKKyAqIGNvbm5lY3RlZCB0byBpdC4gVGhlIFNHTUlJIGludGVyZmFjZSBzaG91bGQgc3RpbGwgYmUgZG93biBhZnRlcgorICogdGhpcyBjYWxsLgorICoKKyAqIEBpbnRlcmZhY2U6IEludGVyZmFjZSB0byBwcm9iZQorICoKKyAqIFJldHVybnMgTnVtYmVyIG9mIHBvcnRzIG9uIHRoZSBpbnRlcmZhY2UuIFplcm8gdG8gZGlzYWJsZS4KKyAqLworaW50IF9fY3ZteF9oZWxwZXJfc2dtaWlfcHJvYmUoaW50IGludGVyZmFjZSkKK3sKKwl1bmlvbiBjdm14X2dteHhfaW5mX21vZGUgbW9kZTsKKworCS8qCisJICogRHVlIHRvIGVycmF0YSBHTVgtNzAwIG9uIENONTZYWHAxLnggYW5kIENONTJYWHAxLngsIHRoZQorCSAqIGludGVyZmFjZSBuZWVkcyB0byBiZSBlbmFibGVkIGJlZm9yZSBJUEQgb3RoZXJ3aXNlIHBlciBwb3J0CisJICogYmFja3ByZXNzdXJlIG1heSBub3Qgd29yayBwcm9wZXJseQorCSAqLworCW1vZGUudTY0ID0gY3ZteF9yZWFkX2NzcihDVk1YX0dNWFhfSU5GX01PREUoaW50ZXJmYWNlKSk7CisJbW9kZS5zLmVuID0gMTsKKwljdm14X3dyaXRlX2NzcihDVk1YX0dNWFhfSU5GX01PREUoaW50ZXJmYWNlKSwgbW9kZS51NjQpOworCXJldHVybiBfX2N2bXhfaGVscGVyX3N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qLworCQlzd2l0Y2ggKChpbnQpcHJpb3JpdHlbcXVldWVdKSB7CisJCWNhc2UgMDoKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHgwMDsKKwkJCWJyZWFrOworCQljYXNlIDE6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4MDE7CisJCQlicmVhazsKKwkJY2FzZSAyOgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweDExOworCQkJYnJlYWs7CisJCWNhc2UgMzoKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHg0OTsKKwkJCWJyZWFrOworCQljYXNlIDQ6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4NTU7CisJCQlicmVhazsKKwkJY2FzZSA1OgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweDU3OworCQkJYnJlYWs7CisJCWNhc2UgNjoKKwkJCWNvbmZpZy5zLnFvc19tYXNrID0gMHg3NzsKKwkJCWJyZWFrOworCQljYXNlIDc6CisJCQljb25maWcucy5xb3NfbWFzayA9IDB4N2Y7CisJCQlicmVhazsKKwkJY2FzZSA4OgorCQkJY29uZmlnLnMucW9zX21hc2sgPSAweGZmOworCQkJYnJlYWs7CisJCWNhc2UgQ1ZNWF9QS09fUVVFVUVfU1RBVElDX1BSSU9SSVRZOgorCQkJLyogUGFzcyAxIHdpbGwgZmFsbCB0aHJvdWdoIHRvIHRoZSBlcnJvciBjYXNlICovCisJCQlpZiAoIWN2bXhfb2N0ZW9uX2lzX3Bhc3MxKCkpIHsKKwkJCQljb25maWcucy5xb3NfbWFzayA9IDB4ZmY7CisJCQkJYnJlYWs7CisJCQl9CisJCWRlZmF1bHQ6CisJCQljdm14X2RwcmludGYoIkVSUk9SOiBjdm14X3Brb19jb25maWdfcG9ydDogSW52YWxpZCAiCisJCQkJICAgICAicHJpb3JpdHkgJWxsdVxuIiwKKwkJCQkodW5zaWduZWQgbG9uZyBsb25nKXByaW9yaXR5W3F1ZXVlXSk7CisJCQljb25maWcucy5xb3NfbWFzay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fRUNDPXkKK0NPTkZJR19NVERfTkFORD15CitDT05GSUdfTVREX05BTkRfSURTPXkKK0NPTkZJR19NVERfTkFORF9QTEFURk9STT15CitDT05GSUdfQkxLX0RFVj15CitDT05GSUdfQkxLX0RFVl9MT09QPXkKK0NPTkZJR19CTEtfREVWX1VCPXkKK0NPTkZJR19IQVZFX0lERT15CitDT05GSUdfSURFPXkKK0NPTkZJR19JREVfR0Q9eQorQ09ORklHX0lERV9HRF9BVEE9eQorQ09ORklHX0JMS19ERVZfSURFQ1M9eQorQ09ORklHX0lERV9UQVNLX0lPQ1RMPXkKK0NPTkZJR19JREVfUFJPQ19GUz15CitDT05GSUdfQkxLX0RFVl9QTEFURk9STT15CitDT05GSUdfU0NTSV9NT0Q9eQorQ09ORklHX05FVERFVklDRVM9eQorQ09ORklHX01JST15CitDT05GSUdfUEhZTElCPXkKK0NPTkZJR19TTVNDX1BIWT15CitDT05GSUdfTkVUX0VUSEVSTkVUPXkKK0NPTkZJR19TTVNDOTExWD15CitDT05GSUdfSU5QVVQ9eQorQ09ORklHX0lOUFVUX0VWREVWPXkKK0NPTkZJR19JTlBVVF9LRVlCT0FSRD15CitDT05GSUdfS0VZQk9BUkRfR1BJTz15CitDT05GSUdfSU5QVVRfVE9VQ0hTQ1JFRU49eQorQ09ORklHX1RPVUNIU0NSRUVOX1dNOTdYWD15CitDT05GSUdfVE9VQ0hTQ1JFRU5fV005NzEyPXkKK0NPTkZJR19UT1VDSFNDUkVFTl9XTTk3MTM9eQorQ09ORklHX0lOUFVUX01JU0M9eQorQ09ORklHX0lOUFVUX1VJTlBVVD15CitDT05GSUdfVlQ9eQorQ09ORklHX0NPTlNPTEVfVFJBTlNMQVRJT05TPXkKK0NPTkZJR19WVF9DT05TT0xFPXkKK0NPTkZJR19IV19DT05TT0xFPXkKK0NPTkZJR19WVF9IV19DT05TT0xFX0JJTkRJTkc9eQorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19TRVJJQUxfODI1MD15C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VD15CitDT05GSUdfSU5FVDZfWEZSTV9NT0RFX1RVTk5FTD15CitDT05GSUdfSU5FVDZfWEZSTV9NT0RFX0JFRVQ9eQorQ09ORklHX0lQVjZfU0lUPXkKK0NPTkZJR19JUFY2X05ESVNDX05PREVUWVBFPXkKK0NPTkZJR19ETlNfUkVTT0xWRVI9eQorQ09ORklHX1VFVkVOVF9IRUxQRVJfUEFUSD0iIgorQ09ORklHX1NUQU5EQUxPTkU9eQorQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQorQ09ORklHX0ZXX0xPQURFUj15CitDT05GSUdfRklSTVdBUkVfSU5fS0VSTkVMPXkKIENPTkZJR19NVEQ9eQotQ09ORklHX01URF9QQVJUSVRJT05TPXkKIENPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMS0RFVlM9eQogQ09ORklHX01URF9CTE9DSz15CiBDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0dFTl9QUk9CRT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CiBDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorQ09ORklHX01URF9DRklfVVRJTD15CiBDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9NMjVQODA9eQorQ09ORklHX01URF9OQU5EX0VDQz15CiBDT05GSUdfTVREX05BTkQ9eQotQ09ORklHX01URF9OQU5EX0FVMTU1MD15Ci1DT05GSUdfQkxLX0RFVl9VQj15Ci0jIENPTkZJR19NSVNDX0RFVklDRVMgaXMgbm90IHNldAotQ09ORklHX0lERT15Ci1DT05GSUdfQkxLX0RFVl9JREVDUz15Ci1DT05GSUdfQkxLX0RFVl9JREVDRD15Ci0jIENPTkZJR19CTEtfREVWX0lERUNEX1ZFUk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tCitDT05GSUdfTkZTRF9WM19BQ0w9eQorQ09ORklHX05GU0RfVjQ9eQorQ09ORklHX0NJRlM9bQorQ09ORklHX0NJRlNfV0VBS19QV19IQVNIPXkKK0NPTkZJR19DSUZTX1VQQ0FMTD15CitDT05GSUdfQ0lGU19YQVRUUj15CitDT05GSUdfQ0lGU19QT1NJWD15CitDT05GSUdfQ0lGU19ERlNfVVBDQUxMPXkKK0NPTkZJR19OQ1BfRlM9bQorQ09ORklHX05DUEZTX1BBQ0tFVF9TSUdOSU5HPXkKK0NPTkZJR19OQ1BGU19JT0NUTF9MT0NLSU5HPXkKK0NPTkZJR19OQ1BGU19TVFJPTkc9eQorQ09ORklHX05DUEZTX05GU19OUz15CitDT05GSUdfTkNQRlNfT1MyX05TPXkKK0NPTkZJR19OQ1BGU19OTFM9eQorQ09ORklHX05DUEZTX0VYVFJBUz15CitDT05GSUdfQ09EQV9GUz1tCitDT05GSUdfQUZTX0ZTPW0KK0NPTkZJR19QQVJUSVRJT05fQURWQU5DRUQ9eQorQ09ORklHX0FDT1JOX1BBUlRJVElPTj15CitDT05GSUdfQUNPUk5fUEFSVElUSU9OX0lDUz15CitDT05GSUdfQUNPUk5fUEFSVElUSU9OX1JJU0NJWD15CitDT05GSUdfT1NGX1BBUlRJVElPTj15CitDT05GSUdfQU1JR0FfUEFSVElUSU9OPXkKK0NPTkZJR19BVEFSSV9QQVJUSVRJT049eQorQ09ORklHX01BQ19QQVJUSVRJT049eQorQ09ORklHX0JTRF9ESVNLTEFCRUw9eQorQ09ORklHX01JTklYX1NVQlBBUlRJVElPTj15CitDT05GSUdfU09MQVJJU19YODZfUEFSVElUSU9OPXkKK0NPTkZJR19VTklYV0FSRV9ESVNLTEFCRUw9eQorQ09ORklHX0xETV9QQVJUSVRJT049eQorQ09ORklHX1NHSV9QQVJUSVRJT049eQorQ09ORklHX1VMVFJJWF9QQVJUSVRJT049eQorQ09ORklHX1NVTl9QQVJUSVRJT049eQorQ09ORklHX0tBUk1BX1BBUlRJVElPTj15CitDT05GSUdfRUZJX1BBUlRJVElPTj15CitDT05GSUdfU1lTVjY4X1BBUlRJVElPTj15CitDT05GSUdfTkxTPXkKK0NPTkZJR19OTFNfREVGQVVMVD0iY3A0MzciCitDT05GSUdfTkxTX0NPREVQQUdFXzQzNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzczNz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzc3NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg1Nz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2MT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Mz1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2ND1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2NT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2Nj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg2OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzNj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk1MD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzkzMj1tCitDT05GSUdfTkxTX0NPREVQQUdFXzk0OT1tCitDT05GSUdfTkxTX0NPREVQQUdFXzg3ND1tCitDT05GSUdfTkxTX0lTTzg4NTlfOD1tCitDT05GSUdfTkxTX0NPREVQQUdFXzEyNTA9bQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUxPW0KK0NPTkZJR19OTFNfQVNDSUk9bQorQ09ORklHX05MU19JU084ODU5XzE9bQorQ09ORklHX05MU19JU084ODU5XzI9bQorQ09ORklHX05MU19JU084ODU5XzM9bQorQ09ORklHX05MU19JU084ODU5XzQ9bQorQ09ORklHX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KworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogX1JFRyByZWxhdGl2ZSB0byBSU0VUX0VORVRETUFTCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogUmluZyBTdGFydCBBZGRyZXNzIHJlZ2lzdGVyICovCisjZGVmaW5lIEVORVRETUFTX1JTVEFSVF9SRUcoeCkJCSgoeCkgKiAweDEwKQorCisvKiBTdGF0ZSBSYW0gV29yZCAyICovCisjZGVmaW5lIEVORVRETUFTX1NSQU0yX1JFRyh4KQkJKDB4NCArICh4KSAqIDB4MTApCisKKy8qIFN0YXRlIFJhbSBXb3JkIDMgKi8KKyNkZWZpbmUgRU5FVERNQVNfU1JBTTNfUkVHKHgpCQkoMHg4ICsgKHgpICogMHgxMCkKKworLyogU3RhdGUgUmFtIFdvcmQgNCAqLworI2RlZmluZSBFTkVURE1BU19TUkFNNF9SRUcoeCkJCSgweGMgKyAoeCkgKiAweDEwKQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBfUkVHIHJlbGF0aXZlIHRvIFJTRVRfRU5FVFNXCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogTUlCIHJlZ2lzdGVyICovCisjZGVmaW5lIEVORVRTV19NSUJfUkVHKHgpCQkoMHgyODAwICsgKHgpICogNCkKKyNkZWZpbmUgRU5FVFNXX01JQl9SRUdfQ09VTlQJCTQ3CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIF9SRUcgcmVsYXRpdmUgdG8gUlNFVF9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ZSBETUlQU1BMTENGR182MzY4X05ESVZfTUFTSwkoMHgxZmYgPDwgRE1JUFNQTExDRkdfNjM2OF9ORElWX1NISUZUKQorCisjZGVmaW5lIEREUl9ETUlQU1BMTERJVl82MzY4X1JFRwkweDI0CisjZGVmaW5lIERNSVBTUExMRElWXzYzNjhfTURJVl9TSElGVAkwCisjZGVmaW5lIERNSVBTUExMRElWXzYzNjhfTURJVl9NQVNLCSgweGZmIDw8IERNSVBTUExMRElWXzYzNjhfTURJVl9TSElGVCkKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogX1JFRyByZWxhdGl2ZSB0byBSU0VUX00yTQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgTTJNX1JYCQkJCTAKKyNkZWZpbmUgTTJNX1RYCQkJCTEKKworI2RlZmluZSBNMk1fU1JDX1JFRyh4KQkJCSgoeCkgKiAweDQwICsgMHgwMCkKKyNkZWZpbmUgTTJNX0RTVF9SRUcoeCkJCQkoKHgpICogMHg0MCArIDB4MDQpCisjZGVmaW5lIE0yTV9TSVpFX1JFRyh4KQkJCSgoeCkgKiAweDQwICsgMHgwOCkKKworI2RlZmluZSBNMk1fQ1RSTF9SRUcoeCkJCQkoKHgpICogMHg0MCArIDB4MGMpCisjZGVmaW5lIE0yTV9DVFJMX0VOQUJMRV9NQVNLCQkoMSA8PCAwKQorI2RlZmluZSBNMk1fQ1RSTF9JUlFFTl9NQVNLCQkoMSA8PCAxKQorI2RlZmluZSBNMk1fQ1RSTF9FUlJPUl9DTFJfTUFTSwkJKDEgPDwgNikKKyNkZWZpbmUgTTJNX0NUUkxfRE9ORV9DTFJfTUFTSwkJKDEgPDwgNykKKyNkZWZpbmUgTTJNX0NUUkxfTk9JTkNfTUFTSwkJKDEgPDwgOCkKKyNkZWZ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weDQwCisjZGVmaW5lIFBJQ19USU1FUjdfTUFYVkFMICAgIDB4NDIKKyNkZWZpbmUgUElDX1RJTUVSX01BWFZBTChpKSAgKFBJQ19USU1FUjBfTUFYVkFMICsgKChpKSAqIDIpKQorCisjZGVmaW5lIFBJQ19USU1FUjBfQ09VTlQgICAgIDB4NDQKKyNkZWZpbmUgUElDX1RJTUVSMV9DT1VOVCAgICAgMHg0NgorI2RlZmluZSBQSUNfVElNRVIyX0NPVU5UICAgICAweDQ4CisjZGVmaW5lIFBJQ19USU1FUjNfQ09VTlQgICAgIDB4NGEKKyNkZWZpbmUgUElDX1RJTUVSNF9DT1VOVCAgICAgMHg0YworI2RlZmluZSBQSUNfVElNRVI1X0NPVU5UICAgICAweDRlCisjZGVmaW5lIFBJQ19USU1FUjZfQ09VTlQgICAgIDB4NTAKKyNkZWZpbmUgUElDX1RJTUVSN19DT1VOVCAgICAgMHg1MgorI2RlZmluZSBQSUNfVElNRVJfQ09VTlQoaSkgICAoUElDX1RJTUVSMF9DT1VOVCArICgoaSkgKiAyKSkKKworI2RlZmluZSBQSUNfSVRFMF9OMF9OMSAgICAgICAgICAweDU0CisjZGVmaW5lIFBJQ19JVEUxX04wX04xICAgICAgICAgIDB4NTgKKyNkZWZpbmUgUElDX0lURTJfTjBfTjEgICAgICAgICAgMHg1YworI2RlZmluZSBQSUNfSVRFM19OMF9OMSAgICAgICAgICAweDYwCisjZGVmaW5lIFBJQ19JVEU0X04wX04xICAgICAgICAgIDB4NjQKKyNkZWZpbmUgUElDX0lURTVfTjBfTjEgICAgICAgICAgMHg2OAorI2RlZmluZSBQSUNfSVRFNl9OMF9OMSAgICAgICAgICAweDZjCisjZGVmaW5lIFBJQ19JVEU3X04wX04xICAgICAgICAgIDB4NzAKKyNkZWZpbmUgUElDX0lURV9OMF9OMShpKSAgICAgICAgKFBJQ19JVEUwX04wX04xICsgKChpKSAqIDQpKQorCisjZGVmaW5lIFBJQ19JVEUwX04yX04zICAgICAgICAgIDB4NTYKKyNkZWZpbmUgUElDX0lURTFfTjJfTjMgICAgICAgICAgMHg1YQorI2RlZmluZSBQSUNfSVRFMl9OMl9OMyAgICAgICAgICAweDVlCisjZGVmaW5lIFBJQ19JVEUzX04yX04zICAgICAgICAgIDB4NjIKKyNkZWZpbmUgUElDX0lURTRfTjJfTjMgICAgICAgICAgMHg2NgorI2RlZmluZSBQSUNfSVRFNV9OMl9OMyAgICAgICAgICAweDZhCisjZGVmaW5lIFBJQ19JVEU2X04yX04zICAgICAgICAgIDB4NmUKKyNkZWZpbmUgUElDX0lURTdfTjJfTjMgICAgICAgICAgMHg3MgorI2RlZmluZSBQSUNfSVRFX04yX04zKGkpICAgICAgICAoUElDX0lURTBfTjJfTjMgKyAoKGkpICogNCkpCisKKyNkZWZpbmUgUElDX0lSVDAgICAgICAgICAgICAgICAgMHg3NAorI2RlZmluZSBQSUNfSVJUKGkpICAgICAgICAgICAgICAoUElDX0lSVDAgKyAoKGkpICogMikpCisKKyNkZWZpbmUgVElNRVJfQ1lDTEVTX01BWFZBTAkweGZmZmZmZmZmZmZmZmZmZmZVTEwKKworLyoKKyAqICAgIElSVCBNYXAKKyAqLworI2RlZmluZSBQSUNfTlVNX0lSVFMJCTE2MAorCisjZGVmaW5lIFBJQ19JUlRfV0RfMF9JTkRFWAkwCisjZGVmaW5lIFBJQ19JUlRfV0RfMV9JTkRFWAkxCisjZGVmaW5lIFBJQ19JUlRfV0RfTk1JXzBfSU5ERVgJMgorI2RlZmluZSBQSUNfSVJUX1dEX05NSV8xX0lOREVYCTMKKyNkZWZpbmUgUElDX0lSVF9USU1FUl8wX0lOREVYCTQKKyNkZWZpbmUgUElDX0lSVF9USU1FUl8xX0lOREVYCTUKKyNkZWZpbmUgUElDX0lSVF9USU1FUl8yX0lOREVYCTYKKyNkZWZpbmUgUElDX0lSVF9USU1FUl8zX0lOREVYCTcKKyNkZWZpbmUgUElDX0lSVF9USU1FUl80X0lOREVYCTgKKyNkZWZpbmUgUElDX0lSVF9USU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9uZToxOworCQl1aW50NjRfdCBjbWRfZG9uZToxOworCQl1aW50NjRfdCBidWZfZG9uZToxOworCX0gczsKKwlzdHJ1Y3QgY3ZteF9taW9fZW1tX2ludF9lbl9zIGNuNjF4eDsKK307CisKK3VuaW9uIGN2bXhfbWlvX2VtbV9tb2RleCB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X21pb19lbW1fbW9kZXhfcyB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzQ5XzYzOjE1OworCQl1aW50NjRfdCBoc190aW1pbmc6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfNDNfNDc6NTsKKwkJdWludDY0X3QgYnVzX3dpZHRoOjM7CisJCXVpbnQ2NF90IHJlc2VydmVkXzM2XzM5OjQ7CisJCXVpbnQ2NF90IHBvd2VyX2NsYXNzOjQ7CisJCXVpbnQ2NF90IGNsa19oaToxNjsKKwkJdWludDY0X3QgY2xrX2xvOjE2OworCX0gczsKKwlzdHJ1Y3QgY3ZteF9taW9fZW1tX21vZGV4X3MgY242MXh4OworfTsKKwordW5pb24gY3ZteF9taW9fZW1tX3JjYSB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X21pb19lbW1fcmNhX3MgeworCQl1aW50NjRfdCByZXNlcnZlZF8xNl82Mzo0ODsKKwkJdWludDY0X3QgY2FyZF9yY2E6MTY7CisJfSBzOworCXN0cnVjdCBjdm14X21pb19lbW1fcmNhX3MgY242MXh4OworfTsKKwordW5pb24gY3ZteF9taW9fZW1tX3JzcF9oaSB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X21pb19lbW1fcnNwX2hpX3MgeworCQl1aW50NjRfdCBkYXQ6NjQ7CisJfSBzOworCXN0cnVjdCBjdm14X21pb19lbW1fcnNwX2hpX3MgY242MXh4OworfTsKKwordW5pb24gY3ZteF9taW9fZW1tX3JzcF9sbyB7CisJdWludDY0X3QgdTY0OworCXN0cnVjdCBjdm14X21pb19lbW1fcnNwX2xvX3M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HJlc2VydmVkXzM2XzYzOjI4OworCQl1aW50NjRfdCBjaGlwa2lsbDoxOworCQl1aW50NjRfdCBqdGNzcmRpczoxOworCQl1aW50NjRfdCBlanRhZ2RpczoxOworCQl1aW50NjRfdCByb21lbjoxOworCQl1aW50NjRfdCBja2lsbF9wcGRpczoxOworCQl1aW50NjRfdCBqdF90c3Rtb2RlOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzUwXzU3Ojg7CisJCXVpbnQ2NF90IGxib290X2V4dDoyOworCQl1aW50NjRfdCByZXNlcnZlZF80NF80Nzo0OworCQl1aW50NjRfdCBxbG00X3NwZDo0OworCQl1aW50NjRfdCBxbG0zX3NwZDo0OwogCQl1aW50NjRfdCBjX211bDo2OwogCQl1aW50NjRfdCBwbnJfbXVsOjY7CiAJCXVpbnQ2NF90IHFsbTJfc3BkOjQ7CkBAIC0xMjk4LDMyICsxOTY0LDEzNSBAQAogCQl1aW50NjRfdCByYm9vdDoxOwogCQl1aW50NjRfdCByYm9vdF9waW46MTsKIAl9IHM7Ci0Jc3RydWN0IGN2bXhfbWlvX3JzdF9ib290X3MgY242M3h4OwotCXN0cnVjdCBjdm14X21pb19yc3RfYm9vdF9zIGNuNjN4eHAxOworCXN0cnVjdCBjdm14X21pb19yc3RfYm9vdF9jbjYxeHggeworCQl1aW50NjRfdCBjaGlwa2lsbDoxOworCQl1aW50NjRfdCBqdGNzcmRpczoxOworCQl1aW50NjRfdCBlanRhZ2RpczoxOworCQl1aW50NjRfdCByb21lbjoxOworCQl1aW50NjRfdCBja2lsbF9wcGRpczoxOworCQl1aW50NjRfdCBqdF90c3Rtb2RlOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzUwXzU3Ojg7CisJCXVpbnQ2NF90IGxib290X2V4dDoyOworCQl1aW50NjRfdCByZXNlcnZlZF8zNl80NzoxMjsKKwkJdWludDY0X3QgY19tdWw6NjsKKwkJdWludDY0X3QgcG5yX211bDo2OworCQl1aW50NjRfdCBxbG0yX3NwZD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g7CisJc3RydWN0IGN2bXhfc2xpX2RtYXhfdGltX3MgY242OHh4OworCXN0cnVjdCBjdm14X3NsaV9kbWF4X3RpbV9zIGNuNjh4eHAxOworfTsKKwordW5pb24gY3ZteF9zbGlfaW50X2VuYl9jaXUgeworCXVpbnQ2NF90IHU2NDsKKwlzdHJ1Y3QgY3ZteF9zbGlfaW50X2VuYl9jaXVfcyB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisJCXVpbnQ2NF90IHBpcGVfZXJyOjE7CisJCXVpbnQ2NF90IGlsbF9wYWQ6MTsKKwkJdWludDY0X3Qgc3BydDNfZXJyOjE7CisJCXVpbnQ2NF90IHNwcnQyX2VycjoxOworCQl1aW50NjRfdCBzcHJ0MV9lcnI6MTsKKwkJdWludDY0X3Qgc3BydDBfZXJyOjE7CisJCXVpbnQ2NF90IHBpbnNfZXJyOjE7CisJCXVpbnQ2NF90IHBvcF9lcnI6MTsKKwkJdWludDY0X3QgcGRpX2VycjoxOworCQl1aW50NjRfdCBwZ2xfZXJyOjE7CisJCXVpbnQ2NF90IHBpbl9icDoxOworCQl1aW50NjRfdCBwb3V0X2VycjoxOworCQl1aW50NjRfdCBwc2xkYm9mOjE7CisJCXVpbnQ2NF90IHBpZGJvZjoxOworCQl1aW50NjRfdCByZXNlcnZlZF8zOF80NzoxMDsKKwkJdWludDY0X3QgZHRpbWU6MjsKKwkJdWludDY0X3QgZGNudDoyOworCQl1aW50NjRfdCBkbWFmaToyOworCQl1aW50NjRfdCByZXNlcnZlZF8yOF8zMTo0OworCQl1aW50NjRfdCBtM191bl93aToxOworCQl1aW50NjRfdCBtM191bl9iMDoxOworCQl1aW50NjRfdCBtM191cF93aToxOworCQl1aW50NjRfdCBtM191cF9iMDoxOworCQl1aW50NjRfdCBtMl91bl93aToxOworCQl1aW50NjRfdCBtMl91bl9iMDoxOworCQl1aW50NjRfdCBtMl91cF93aToxOworCQl1aW50NjRfdCBtMl91cF9iMDoxOworCQl1aW50NjRfdCByZXNlcnZlZF8xOF8xOToyOworCQl1aW50NjRfdCBtaW9faW50MToxOworCQl1aW50NjRfdCBtaW9faW50MDoxOworCQl1aW50NjRfdCBtMV91bl93aToxOworCQl1aW50NjRfdCBtMV91bl9iMDoxOworCQl1aW50NjRfdCBtMV91cF93aToxOworCQl1aW50NjRfdCBtMV91cF9iMDoxOworCQl1aW50NjRfdCBtMF91bl93aToxOworCQl1aW50NjRfdCBtMF91bl9iMDoxOworCQl1aW50NjRfdCBtMF91cF93aToxOworCQl1aW50NjRfdCBtMF91cF9iMDoxOworCQl1aW50NjRfdCByZXNlcnZlZF82Xzc6MjsKKwkJdWludDY0X3QgcHRpbWU6MTsKKwkJdWludDY0X3QgcGNudDoxOworCQl1aW50NjRfdCBpb2IyYmlnOjE7CisJCXVpbnQ2NF90IGJhcjBfdG86MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMV8xOjE7CisJCXVpbnQ2NF90IHJtbF90bzoxOworCX0gczsKKwlzdHJ1Y3QgY3ZteF9zbGlfaW50X2VuYl9jaXVfY242MXh4IHsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfNjFfNjM6MzsKKwkJdWludDY0X3QgaWxsX3BhZDoxOworCQl1aW50NjRfdCBzcHJ0M19lcnI6MTsKKwkJdWludDY0X3Qgc3BydDJfZXJyOjE7CisJCXVpbnQ2NF90IHNwcnQxX2VycjoxOworCQl1aW50NjRfdCBzcHJ0MF9lcnI6MTsKKwkJdWludDY0X3QgcGluc19lcnI6MTsKKwkJdWludDY0X3QgcG9wX2VycjoxOworCQl1aW50NjRfdCBwZGlfZXJyOjE7CisJCXVpbnQ2NF90IHBnbF9lcnI6MTsKKwkJdWludDY0X3QgcGluX2JwOjE7CisJCXVpbnQ2NF90IHBvdXRfZXJyOjE7CisJCXVpbnQ2NF90IHBzbGRib2Y6MTsKKwkJdWludDY0X3QgcGlkYm9mOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzM4XzQ3OjEwOworCQl1aW50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9iMDoxOworCQl1aW50NjRfdCBtM191cF93aToxOworCQl1aW50NjRfdCBtM191cF9iMDoxOworCQl1aW50NjRfdCBtMl91bl93aToxOworCQl1aW50NjRfdCBtMl91bl9iMDoxOworCQl1aW50NjRfdCBtMl91cF93aToxOworCQl1aW50NjRfdCBtMl91cF9iMDoxOworCQl1aW50NjRfdCBtYWMxX2ludDoxOworCQl1aW50NjRfdCBtYWMwX2ludDoxOworCQl1aW50NjRfdCBtaW9faW50MToxOworCQl1aW50NjRfdCBtaW9faW50MDoxOworCQl1aW50NjRfdCBtMV91bl93aToxOworCQl1aW50NjRfdCBtMV91bl9iMDoxOworCQl1aW50NjRfdCBtMV91cF93aToxOworCQl1aW50NjRfdCBtMV91cF9iMDoxOworCQl1aW50NjRfdCBtMF91bl93aToxOworCQl1aW50NjRfdCBtMF91bl9iMDoxOworCQl1aW50NjRfdCBtMF91cF93aToxOworCQl1aW50NjRfdCBtMF91cF9iMDoxOworCQl1aW50NjRfdCByZXNlcnZlZF82Xzc6MjsKKwkJdWludDY0X3QgcHRpbWU6MTsKKwkJdWludDY0X3QgcGNudDoxOworCQl1aW50NjRfdCBpb2IyYmlnOjE7CisJCXVpbnQ2NF90IGJhcjBfdG86MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMV8xOjE7CisJCXVpbnQ2NF90IHJtbF90bzoxOworCX0gczsKKwlzdHJ1Y3QgY3ZteF9zbGlfaW50X2VuYl9wb3J0eF9jbjYxeHggeworCQl1aW50NjRfdCByZXNlcnZlZF82MV82MzozOworCQl1aW50NjRfdCBpbGxfcGFkOjE7CisJCXVpbnQ2NF90IHNwcnQzX2VycjoxOworCQl1aW50NjRfdCBzcHJ0Ml9lcnI6MTsKKwkJdWludDY0X3Qgc3BydDFfZXJyOjE7CisJCXVpbnQ2NF90IHNwcnQwX2VycjoxOworCQl1aW50NjRfdCBwaW5zX2VycjoxOworCQl1aW50NjRfdCBwb3BfZXJyOjE7CisJCXVpbnQ2NF90IHBkaV9lc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CQl1aW50NjRfdCBiYXIwX3RvOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzFfMToxOworCQl1aW50NjRfdCBybWxfdG86MTsKKwl9IGNuNjF4eDsKKwlzdHJ1Y3QgY3ZteF9zbGlfaW50X2VuYl9wb3J0eF9jbjYzeHggeworCQl1aW50NjRfdCByZXNlcnZlZF82MV82MzozOworCQl1aW50NjRfdCBpbGxfcGFkOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzU4XzU5OjI7CisJCXVpbnQ2NF90IHNwcnQxX2VycjoxOworCQl1aW50NjRfdCBzcHJ0MF9lcnI6MTsKKwkJdWludDY0X3QgcGluc19lcnI6MTsKKwkJdWludDY0X3QgcG9wX2VycjoxOworCQl1aW50NjRfdCBwZGlfZXJyOjE7CisJCXVpbnQ2NF90IHBnbF9lcnI6MTsKKwkJdWludDY0X3QgcGluX2JwOjE7CisJCXVpbnQ2NF90IHBvdXRfZXJyOjE7CisJCXVpbnQ2NF90IHBzbGRib2Y6MTsKKwkJdWludDY0X3QgcGlkYm9mOjE7CisJCXVpbnQ2NF90IHJlc2VydmVkXzM4XzQ3OjEwOworCQl1aW50NjRfdCBkdGltZToyOworCQl1aW50NjRfdCBkY250OjI7CisJCXVpbnQ2NF90IGRtYWZpOjI7CisJCXVpbnQ2NF90IHJlc2VydmVkXzIwXzMxOjEyOworCQl1aW50NjRfdCBtYWMxX2ludDoxOworCQl1aW50NjRfdCBtYWMwX2ludDoxOworCQl1aW50NjRfdCBtaW9faW50MToxOworCQl1aW50NjRfdCBtaW9faW50MDoxOworCQl1aW50NjRfdCBtMV91bl93aToxOworCQl1aW50NjRfdCBtMV91bl9iMDoxOworCQl1aW50NjRfdCBtMV91cF93aToxOworCQl1aW50NjRfdCBtMV91cF9iMDoxOworCQl1aW50NjRfdCBtMF91bl93aToxOworCQl1aW50NjRfdCBtMF91bl9iMDoxOworCQl1aW50NjRfdCBtMF91cF93aToxOworCQl1aW50NjRfdCBtMF91cF9iMDoxOworCQ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E7CisJCXVpbnQ2NF90IHBpbl9icDoxOworCQl1aW50NjRfdCBwb3V0X2VycjoxOworCQl1aW50NjRfdCBwc2xkYm9mOjE7CisJCXVpbnQ2NF90IHBpZGJvZjoxOworCQl1aW50NjRfdCByZXNlcnZlZF8zOF80NzoxMDsKKwkJdWludDY0X3QgZHRpbWU6MjsKKwkJdWludDY0X3QgZGNudDoyOworCQl1aW50NjRfdCBkbWFmaToyOworCQl1aW50NjRfdCByZXNlcnZlZF8yOF8zMTo0OworCQl1aW50NjRfdCBtM191bl93aToxOworCQl1aW50NjRfdCBtM191bl9iMDoxOworCQl1aW50NjRfdCBtM191cF93aToxOworCQl1aW50NjRfdCBtM191cF9iMDoxOworCQl1aW50NjRfdCBtMl91bl93aToxOworCQl1aW50NjRfdCBtMl91bl9iMDoxOworCQl1aW50NjRfdCBtMl91cF93aToxOworCQl1aW50NjRfdCBtMl91cF9iMDoxOworCQl1aW50NjRfdCBtYWMxX2ludDoxOworCQl1aW50NjRfdCBtYWMwX2ludDoxOworCQl1aW50NjRfdCBtaW9faW50MToxOworCQl1aW50NjRfdCBtaW9faW50MDoxOworCQl1aW50NjRfdCBtMV91bl93aToxOworCQl1aW50NjRfdCBtMV91bl9iMDoxOworCQl1aW50NjRfdCBtMV91cF93aToxOworCQl1aW50NjRfdCBtMV91cF9iMDoxOworCQl1aW50NjRfdCBtMF91bl93aToxOworCQl1aW50NjRfdCBtMF91bl9iMDoxOworCQl1aW50NjRfdCBtMF91cF93aToxOworCQl1aW50NjRfdCBtMF91cF9iMDoxOworCQl1aW50NjRfdCByZXNlcnZlZF82Xzc6MjsKKwkJdWludDY0X3QgcHRpbWU6MTsKKwkJdWludDY0X3QgcGNudDoxOworCQl1aW50NjRfdCBpb2IyYmlnOjE7CisJCXVpbnQ2NF90IGJhcjBfdG86MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMV8xOjE7CisJCXVpbnQ2NF90IHJtbF90bzoxOworCX0gczsKKwlzdHJ1Y3QgY3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dCBtYWMwX2ludDoxOworCQl1aW50NjRfdCBtaW9faW50MToxOworCQl1aW50NjRfdCBtaW9faW50MDoxOworCQl1aW50NjRfdCBtMV91bl93aToxOworCQl1aW50NjRfdCBtMV91bl9iMDoxOworCQl1aW50NjRfdCBtMV91cF93aToxOworCQl1aW50NjRfdCBtMV91cF9iMDoxOworCQl1aW50NjRfdCBtMF91bl93aToxOworCQl1aW50NjRfdCBtMF91bl9iMDoxOworCQl1aW50NjRfdCBtMF91cF93aToxOworCQl1aW50NjRfdCBtMF91cF9iMDoxOworCQl1aW50NjRfdCByZXNlcnZlZF82Xzc6MjsKKwkJdWludDY0X3QgcHRpbWU6MTsKKwkJdWludDY0X3QgcGNudDoxOworCQl1aW50NjRfdCBpb2IyYmlnOjE7CisJCXVpbnQ2NF90IGJhcjBfdG86MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfMV8xOjE7CisJCXVpbnQ2NF90IHJtbF90bzoxOworCX0gY242M3h4OworCXN0cnVjdCBjdm14X3NsaV9pbnRfc3VtX2NuNjN4eCBjbjYzeHhwMTsKKwlzdHJ1Y3QgY3ZteF9zbGlfaW50X3N1bV9jbjYxeHggY242Nnh4OworCXN0cnVjdCBjdm14X3NsaV9pbnRfc3VtX2NuNjh4eCB7CisJCXVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisJCXVpbnQ2NF90IHBpcGVfZXJyOjE7CisJCXVpbnQ2NF90IGlsbF9wYWQ6MTsKKwkJdWludDY0X3QgcmVzZXJ2ZWRfNThfNTk6MjsKKwkJdWludDY0X3Qgc3BydDFfZXJyOjE7CisJCXVpbnQ2NF90IHNwcnQwX2VycjoxOworCQl1aW50NjRfdCBwaW5zX2VycjoxOworCQl1aW50NjRfdCBwb3BfZXJyOjE7CisJCXVpbnQ2NF90IHBkaV9lcnI6MTsKKwkJdWludDY0X3QgcGdsX2VycjoxOworCQl1aW50NjRfdCByZXNlcnZlZF81MV81MToxOworCQl1aW50NjRfdCBwb3V0X2Vyc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mg+CisKKwkubWFjcm8JQkFSUklFUgorCS5zZXQJbWlwczMyCisJX3Nzbm9wCisJX3Nzbm9wCisJX3Nzbm9wCisJLnNldAltaXBzMAorCS5lbmRtCisKKwlfX0NQVUlOSVQKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBBbHRlcm5hdGUgQ1BVMSBzdGFydHVwIHZlY3RvciBmb3IgQk1JUFM0MzUwCisgKgorICogT24gc29tZSBzeXN0ZW1zIHRoZSBib290bG9hZGVyIGhhcyBhbHJlYWR5IHN0YXJ0ZWQgQ1BVMSBhbmQgY29uZmlndXJlZAorICogaXQgdG8gcmVzdW1lIGV4ZWN1dGlvbiBhdCAweDgwMDBfMDIwMCAoIUJFViBJViB2ZWN0b3IpIHdoZW4gaXQgaXMKKyAqIHRyaWdnZXJlZCBieSB0aGUgU1cxIGludGVycnVwdC4gIElmIHRoYXQgaXMgdGhlIGNhc2Ugd2UgdHJ5IHRvIG1vdmUKKyAqIGl0IHRvIGEgbW9yZSBjb252ZW5pZW50IHBsYWNlOiBCTUlQU19XQVJNX1JFU1RBUlRfVkVDIEAgMHg4MDAwXzAzODAuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK0xFQUYoYm1pcHNfc21wX21vdmV2ZWMpCisJbGEJazAsIDFmCisJbGkJazEsIENLU0VHMQorCW9yCWswLCBrMQorCWpyCWswCisKKzE6CisJLyogY2xlYXIgSVYsIHBlbmRpbmcgSVBJcyAqLworCW10YzAJemVybywgQ1AwX0NBVVNFCisKKwkvKiByZS1lbmFibGUgSVJRcyB0byB3YWl0IGZvciBTVzEgKi8KKwlsaQlrMCwgU1QwX0lFIHwgU1QwX0JFViB8IFNUQVRVU0ZfSVAxCisJbXRjMAlrMCwgQ1AwX1NUQVRVUworCisJLyogc2V0IHVwIENQVTEgQ0JSOyBtb3ZlIEJBU0UgdG8gMHhhMDAwXzAwMDAgKi8KKwlsaQlrMCwgMHhmZjQwMDAwMAorCW10YzAJazAsICQyMiwgNgorCWxpCWsxLCBDS1NFRzEgfCBCTUlQU19SRUxPX1ZFQ1RPUl9DT05UUk9MXzEKKwlvcglrMCwgazEKKwlsaQlrMSwgMHhhMDA4MDAwMAorCXN3CWsxLCAwKGswKQorCisJLyogd2FpdCBoZXJlIGZvciBTVzEgaW50ZXJydXB0IGZyb20gYm1pcHNfYm9vdF9zZWNvbmRhcnkoKSAqLworCXdhaXQKKworCWxhCWswLCBibWlwc19yZXNldF9ubWlfdmVjCisJbGkJazEsIENLU0VHMQorCW9yCWswLCBrMQorCWpyCWswCitFTkQoYm1pcHNfc21wX21vdmV2ZWMpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUmVzZXQvTk1JIHZlY3RvcgorICogRm9yIEJNSVBTIHByb2Nlc3NvcnMgdGhhdCBjYW4gcmVsb2NhdGUgdGhlaXIgZXhjZXB0aW9uIHZlY3RvcnMsIHRoaXMKKyAqIGVudGlyZSBmdW5jdGlvbiBnZXRzIGNvcGllZCB0byAweDgwMDBfMDAwMC4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworTkVTVEVEKGJtaXBzX3Jlc2V0X25taV92ZWMsIFBUX1NJWkUsIHNwKQorCS5zZXQJcHVzaAorCS5zZXQJbm9hdAorCS5hbGlnbgk0CisKKyNpZmRlZiBDT05GSUdfU01QCisJLyogaWYgdGhlIE5NSSBiaXQgaXMgY2xlYXIsIGFzc3VtZSB0aGlzIGlzIGEgQ1BVMSByZXNldCBpbnN0ZWFkICovCisJbGkJazEsICgxIDw8IDE5KQorCW1mYzAJazAsIENQMF9TVEFUVVMKKwlhbmQJazAsIGsxCisJYmVxeglrMCwgYm1pcHNfc21wX2VudHJ5CisKKyNpZiBkZWZpbmVkKENPTkZJR19DUFVfQk1JUFM1MDAwKQorCS8qIGlmIHdlJ3JlIG5vdCBvbiBjb3JlIDAsIHRoaXMgbXVzdCBiZSB0aGUgU01QIGJvb3Qgc2lnbmFsICovCisJbGkJazEsICgzIDw8IDI1KQorCW1mYzAJazAsICQyMgorCWFuZAlrMCwgazEKKwlibmV6CWswLCBibWlwc19zbXBfZW50cnkKKyNlbmRpZgorI2VuZGlmIC8qIENPTkZJR19TTVAgKi8KKworCS8qIG5vcGUsIGl0J3MganVzdCBhIHJlZ3VsYXIgTk1JICovCisJU0FWRV9BTEwKKwltb3ZlCWEwLCBzcAorCisJLyogY2xlYXIgRVhMLCBFUkwsIEJFViBzbyB0aGF0IFRMQiByZWZpbGxzIHN0aWxsIHdvcmsgKi8KKwltZmMwCWswLCBDUDBfU1RBVFVTCisJbGkJazEsIFNUMF9FUkwgfCBTVDBfRVhMIHwgU1QwX0JFViB8IFNUMF9JRQorCW9yCWswLCBrMQorCXhvcglrMCwgazEKKwltdGMwCWswLCBDUDBfU1RBVFVTCisJQkFSUklFUgorCisJLyoganVtcCB0byB0aGUgTk1JIGhhbmRsZXIgZnVuY3Rpb24gKi8KKwlsYQlrMCwgbm1pX2hhbmRsZXIKKwlqcglrMAorCisJUkVTVE9SRV9BTEwKKwkuc2V0CW1pcHMzCisJZXJldAorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENQVTEgcmVzZXQgdmVjdG9yICh1c2VkIGZvciB0aGUgaW5pdGlhbCBib290IG9ubHkpCisgKiBUaGlzIGlzIHN0aWxsIHBhcnQgb2YgYm1pcHNfcmVzZXRfbm1pX3ZlYygpLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZkZWYgQ09OR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cCB1cHBlciBtZW1vcnkgVExCICovCisJbGkJc3AsIEJNSVBTX1dBUk1fUkVTVEFSVF9WRUMKKwlsYQlrMCwgcGxhdF93aXJlZF90bGJfc2V0dXAKKwlqYWxyCWswCisKKwkvKiBzd2l0Y2ggdG8gcGVybWFuZW50IHN0YWNrIGFuZCBjb250aW51ZSBib290aW5nICovCisKKwkuZ2xvYmFsCWJtaXBzX3NlY29uZGFyeV9yZWVudHJ5CitibWlwc19zZWNvbmRhcnlfcmVlbnRyeToKKwlsYQlrMCwgYm1pcHNfc21wX2Jvb3Rfc3AKKwlsdwlzcCwgMChrMCkKKwlsYQlrMCwgYm1pcHNfc21wX2Jvb3RfZ3AKKwlsdwlncCwgMChrMCkKKwlsYQlrMCwgc3RhcnRfc2Vjb25kYXJ5CisJanIJazAKKworI2VuZGlmIC8qIENPTkZJR19TTVAgKi8KKworCS5hbGlnbgk0CisJLmdsb2JhbAlibWlwc19yZXNldF9ubWlfdmVjX2VuZAorYm1pcHNfcmVzZXRfbm1pX3ZlY19lbmQ6CisKK0VORChibWlwc19yZXNldF9ubWlfdmVjKQorCisJLnNldAlwb3AKKwkucHJldmlvdXMKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBDUFUxIHdhcm0gcmVzdGFydCB2ZWN0b3IgKHVzZWQgZm9yIHNlY29uZCBhbmQgc3Vic2VxdWVudCBib290cykuCisgKiBBbHNvIHVzZWQgZm9yIFMyIHN0YW5kYnkgcmVjb3ZlcnkgKFBNKS4KKyAqIFRoaXMgZW50aXJlIGZ1bmN0aW9uIGdldHMgY29waWVkIHRvIChCTUlQU19XQVJNX1JFU1RBUlRfVkVDKQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitMRUFGKGJtaXBzX3NtcF9pbnRfdmVjKQorCisJLmFsaWduCTQKKwltZmMwCWswLCBDUDBfU1RBVFVTCisJb3JpCWswLCAweDAxCisJeG9yaQlrMCwgMHgwMQorCW10YzAJazAsIENQMF9TVEFUVVMKKwllcmV0CisKKwkuYWxpZ24JNAorCS5nbG9iYWwJYm1pcHNfc21wX2ludF92ZWNfZW5kCitibWlwc19zbXBfaW50X3ZlY19lbmQ6CisKK0VORChibWlwc19zbXBfaW50X3ZlYykKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBYS1MwMSBzdXBwb3J0CisgKiBDZXJ0YWluIENQVXMgc3VwcG9ydCBleHRlbmRpbmcga3NlZzAgdG8gMTAyNE1CLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJX19DUFVJTklUCisKK0xFQUYoYm1pcHNfZW5hYmxlX3hrczAxKQorCisjaWYgZGVmaW5lZChDT05GSUdfWEtTMDEpCisKKyNpZiBkZWZpbmVkKENPTkZJR19DUFVfQk1JUFM0MzgwKQorCW1mYzAJdDAsICQyMiwgMworCWxpCXQxLCAweDFmZjAKKwlsaQl0MiwgKDEgPDwgMTIpIHwgKDEgPDwgOSkKKwlvcgl0MCwgdDEKKwl4b3IJdDAsIHQxCisJb3IJdDAsIHQyCisJbXRjMAl0MCwgJDIyLCAzCisJQkFSUklFUgorI2VsaWYgZGVmaW5lZChDT05GSUdfQ1BVX0JNSVBTNTAwMCkKKwltZmMwCXQwLCAkMjIsIDUKKwlsaQl0MSwgMHgwMWZmCisJbGkJdDIsICgxIDw8IDgpIHwgKDEgPDwgNSkKKwlvcgl0MCwgdDEKKwl4b3IJdDAsIHQxCisJb3IJdDAsIHQyCisJbXRjMAl0MCwgJDIyLCA1CisJQkFSUklFUgorI2Vsc2UKKworI2Vycm9yIE1pc3NpbmcgWEtTMDEgc2V0dXAKKworI2VuZGlmCisKKyNlbmRpZi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uc21wX3NldHVwCQk9IGJtaXBzX3NtcF9zZXR1cCwKKwkucHJlcGFyZV9jcHVzCQk9IGJtaXBzX3ByZXBhcmVfY3B1cywKKwkuYm9vdF9zZWNvbmRhcnkJCT0gYm1pcHNfYm9vdF9zZWNvbmRhcnksCisJLnNtcF9maW5pc2gJCT0gYm1pcHNfc21wX2ZpbmlzaCwKKwkuaW5pdF9zZWNvbmRhcnkJCT0gYm1pcHNfaW5pdF9zZWNvbmRhcnksCisJLmNwdXNfZG9uZQkJPSBibWlwc19jcHVzX2RvbmUsCisJLnNlbmRfaXBpX3NpbmdsZQk9IGJtaXBzX3NlbmRfaXBpX3NpbmdsZSwKKwkuc2VuZF9pcGlfbWFzawkJPSBibWlwc19zZW5kX2lwaV9tYXNrLAorI2lmZGVmIENPTkZJR19IT1RQTFVHX0NQVQorCS5jcHVfZGlzYWJsZQkJPSBibWlwc19jcHVfZGlzYWJsZSwKKwkuY3B1X2RpZQkJPSBibWlwc19jcHVfZGllLAorI2VuZGlmCit9OworCisjZW5kaWYgLyogQ09ORklHX1NNUCAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEJNSVBTIHZlY3RvciByZWxvY2F0aW9uCisgKiBUaGlzIGlzIHByaW1hcmlseSB1c2VkIGZvciBTTVAgYm9vdCwgYnV0IGl0IGlzIGFwcGxpY2FibGUgdG8gc29tZQorICogVVAgQk1JUFMgc3lzdGVtcyBhcyB3ZWxsLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBfX2NwdWluaXQgYm1pcHNfd3JfdmVjKHVuc2lnbmVkIGxvbmcgZHN0LCBjaGFyICpzdGFydCwgY2hhciAqZW5kKQoreworCW1lbWNweSgodm9pZCAqKWRzdCwgc3RhcnQsIGVuZCAtIHN0YXJ0KTs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orCS5pcnFfZW5hYmxlCT0geGxwX3BpY19lbmFibGUsCisJLmlycV9kaXNhYmxlCT0geGxwX3BpY19kaXNhYmxlLAorCS5pcnFfbWFza19hY2sJPSB4bHBfcGljX21hc2tfYWNrLAorCS5pcnFfdW5tYXNrCT0geGxwX3BpY191bm1hc2ssCit9OworCitzdGF0aWMgdm9pZCBjcHVpbnRyX2Rpc2FibGUoc3RydWN0IGlycV9kYXRhICpkKQoreworCXVpbnQ2NF90IGVpbXI7CisJdWludDY0X3QgbWFzayA9IDF1bGwgPDwgZC0+aXJxOworCisJZWltciA9IHJlYWRfYzBfZWltcigpOworCXdyaXRlX2MwX2VpbXIoZWltciAmIH5tYXNrKTsKK30KKworc3RhdGljIHZvaWQgY3B1aW50cl9lbmFibGUoc3RydWN0IGlycV9kYXRhICpkKQoreworCXVpbnQ2NF90IGVpbXI7CisJdWludDY0X3QgbWFzayA9IDF1bGwgPDwgZC0+aXJxOworCisJZWltciA9IHJlYWRfYzBfZWltcigpOworCXdyaXRlX2MwX2VpbXIoZWltciB8IG1hc2spOworfQorCitzdGF0aWMgdm9pZCBjcHVpbnRyX2FjayhzdHJ1Y3QgaXJxX2RhdGEgKmQpCit7CisJdWludDY0X3QgbWFzayA9IDF1bGwgPDwgZC0+aXJxOworCisJd3JpdGVfYzBfZWlycihtYXNrKTsKK30KKworc3RhdGljIHZvaWQgY3B1aW50cl9ub3Aoc3RydWN0IGlycV9kYXRhICpkKQoreworCVdBUk4oZC0+aXJxID49IFBJQ19JUlFfQkFTRSwgIkJhZCBpcnEgJWQiLCBkLT5pcnEpOworfQorCisvKgorICogQ2hpcCBkZWZpbml0aW9uIGZvciBDUFUgb3JpZ2luYXRlZCBpbnRlcnJ1cHRzKHRpbWVyLCBtc2cpIGFuZAorICogSVBJcworICovCitzdHJ1Y3QgaXJxX2NoaXAgbmxtX2NwdV9pbnRyID0geworCS5uYW1lCQk9ICJYTFAtQ1BVLUlOVFIiLAorCS5pcnFfZW5hYmxlCT0gY3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AgICAgICBpZiAoIXB0cikKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICAgICAgICAgICAgICAgIGlmIChnZXRfdXNlcihmb3VydGguX19wYWQsICh2b2lkIF9fdXNlciAqIF9fdXNlciAqKSBwdHIpKQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FRkFVTFQ7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHN5c19zZW1jdGwoZmlyc3QsIChpbnQpc2Vjb25kLCB0aGlyZCwgZm91cnRoKTsKLSAgICAgICAgfQotICAgICAgICBjYXNlIE1TR1NORDoKLQkJcmV0dXJuIHN5c19tc2dzbmQgKGZpcnN0LCAoc3RydWN0IG1zZ2J1ZiBfX3VzZXIgKikgcHRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2l6ZV90KXNlY29uZCwgdGhpcmQpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSBNU0dSQ1Y6Ci0gICAgICAgICAgICAgICAgaWYgKCFwdHIpCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLSAgICAgICAgICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIgKCZ0bXAsIChzdHJ1Y3QgaXBjX2tsdWRnZSBfX3VzZXIgKikgcHRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mIChzdHJ1Y3QgaXBjX2tsdWRnZSkpKQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FRkFVTFQ7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHN5c19tc2dyY3YgKGZpcnN0LCB0bXAubXNncCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNpemVfdClzZWNvbmQsIHRtcC5tc2d0eXAsIHRoaXJkKTsKLSAgICAgICAgY2FzZSBNU0dHRVQ6Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHN5c19tc2dnZXQoKGtle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yAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKKyAqIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUKKyAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCisgKgorICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKyAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA1OSBUZW1wbGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNworICogVVNBCisgKgorICovCisKKy5maWxlICJzZXJwZW50LXNzZTIteDg2XzY0LWFzbV82NC5TIgorLnRleHQKKworI2RlZmluZSBDVFggJXJkaQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICA4LXdheSBTU0UyIHNlcnBlbnQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBSQTEgJXhtbTAKKyNkZWZpbmUgUkIxICV4bW0xCisjZGVmaW5lIFJDMSAleG1tMgorI2RlZmluZSBSRDEgJXhtbTMKKyNkZWZpbmUgUkUxICV4bW00CisKKyNkZWZpbmUgUkEyICV4bW01CisjZGVmaW5lIFJCMiAleG1tNgor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HI0LHIwKTsJTEsocjAscjMscjEscjQscjIsMTEpOwotCVMzKHIwLHIzLHIxLHI0LHIyKTsJTEsocjQscjIscjMscjAscjEsMTIpOwotCVM0KHI0LHIyLHIzLHIwLHIxKTsJTEsocjIscjMscjAscjEscjQsMTMpOwotCVM1KHIyLHIzLHIwLHIxLHI0KTsJTEsocjQscjIscjMscjEscjAsMTQpOwotCVM2KHI0LHIyLHIzLHIxLHIwKTsJTEsocjMscjAscjIscjEscjQsMTUpOwotCVM3KHIzLHIwLHIyLHIxLHI0KTsJTEsocjQscjIscjEscjMscjAsMTYpOwotCVMwKHI0LHIyLHIxLHIzLHIwKTsJTEsocjEscjIscjMscjQscjAsMTcpOwotCVMxKHIxLHIyLHIzLHI0LHIwKTsJTEsocjAscjMscjQscjEscjIsMTgpOwotCVMyKHIwLHIzLHI0LHIxLHIyKTsJTEsocjIscjMscjAscjEscjQsMTkpOwotCVMzKHIyLHIzLHIwLHIxLHI0KTsJTEsocjEscjQscjMscjIscjAsMjApOwotCVM0KHIxLHI0LHIzLHIyLHIwKTsJTEsocjQscjMscjIscjAscjEsMjEpOwotCVM1KHI0LHIzLHIyLHIwLHIxKTsJTEsocjEscjQscjMscjAscjIsMjIpOwotCVM2KHIxLHI0LHIzLHIwLHIyKTsJTEsocjMscjIscjQscjAscjEsMjMpOwotCVM3KHIzLHIyLHI0LHIwLHIxKTsJTEsocjEscjQscjAscjMscjIsMjQpOwotCVMwKHIxLHI0LHIwLHIzLHIyKTsJTEsocjAscjQscjMscjEscjIsMjUpOwotCVMxKHIwLHI0LHIzLHIxLHIyKTsJTEsocjIscjMscjEscjAscjQsMjYpOwotCVMyKHIyLHIzLHIxLHIwLHI0KTsJTEsocjQscjMscjIscjAscjEsMjcpOwotCVMzKHI0LHIzLHIyLHIwLHIxKTsJTEsocjAscjEscjMscjQscjIsMjgpOwotCVM0KHIwLHIxLHIzLHI0LHIyKTsJTEsocjEscjMscjQscjIscjAsMjkpOwotCVM1KHIxLHIzLHI0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iAoIXJldCkKKwkJCXJldCA9IHRyLT5lcnI7CisJCUlOSVRfQ09NUExFVElPTih0ci0+Y29tcGxldGlvbik7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCB0ZXN0X2FjaXBoZXJfamlmZmllcyhzdHJ1Y3QgYWJsa2NpcGhlcl9yZXF1ZXN0ICpyZXEsIGludCBlbmMsCisJCQkJaW50IGJsZW4sIGludCBzZWMpCit7CisJdW5zaWduZWQgbG9uZyBzdGFydCwgZW5kOworCWludCBiY291bnQ7CisJaW50IHJldDsKKworCWZvciAoc3RhcnQgPSBqaWZmaWVzLCBlbmQgPSBzdGFydCArIHNlYyAqIEhaLCBiY291bnQgPSAwOworCSAgICAgdGltZV9iZWZvcmUoamlmZmllcywgZW5kKTsgYmNvdW50KyspIHsKKwkJaWYgKGVuYykKKwkJCXJldCA9IGRvX29uZV9hY2lwaGVyX29wKHJlcSwKKwkJCQkJCWNyeXB0b19hYmxrY2lwaGVyX2VuY3J5cHQocmVxKSk7CisJCWVsc2UKKwkJCXJldCA9IGRvX29uZV9hY2lwaGVyX29wKHJlcSwKKwkJCQkJCWNyeXB0b19hYmxrY2lwaGVyX2RlY3J5cHQocmVxKSk7CisKKwkJaWYgKHJldCkKKwkJCXJldHVybiByZXQ7CisJfQorCisJcHJfY29udCgiJWQgb3BlcmF0aW9ucyBpbiAlZCBzZWNvbmRzICglbGQgYnl0ZXMpXG4iLAorCQliY291bnQsIHNlYywgKGxvbmcpYmNvdW50ICogYmxlbik7CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgdGVzdF9hY2lwaGVyX2N5Y2xlcyhzdHJ1Y3QgYWJsa2NpcGhlcl9yZXF1ZXN0ICpyZXEsIGludCBlbmMsCisJCQkgICAgICAgaW50IGJsZW4pCit7CisJdW5zaWduZWQgbG9uZyBjeWNsZXMgPSAwOworCWludCByZXQgPSAwOworCWludCBpOworCisJLyogV2FybS11cCBydW4uICovCisJZm9yIChpID0gMDsga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c3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvYWNjb25maWcuaCBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvYWNjb25maWcuaAppbmRleCBmODk1YTI0Li4xZjMwYWY2IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2FjY29uZmlnLmgKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9hY2NvbmZpZy5oCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtMTIzLDYgKzEyMywxMCBAQAogCiAjZGVmaW5lIEFDUElfTUFYX1NMRUVQICAgICAgICAgICAgICAgICAgMjAwMAkvKiBUd28gc2Vjb25kcyAqLwogCisvKiBBZGRyZXNzIFJhbmdlIGxpc3RzIGFyZSBwZXItc3BhY2VfaWQgKE1lbW9yeSBhbmQgSS9PIG9ubHkpICovCisKKyNkZWZpbmUgQUNQSV9BRERSRVNTX1JBTkdFX01BWCAgICAgICAgICAyCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBBQ1BJIFNwZWNpZmljYXRpb24gY29uc3RhbnR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dG9ycyAqLworCitBQ1BJX0VYVEVSTiB1OCBBQ1BJX0lOSVRfR0xPQkFMKGFjcGlfZ2JsX25vX3Jlc291cmNlX2Rpc2Fzc2VtYmx5LCBGQUxTRSk7CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIERlYnVnIHN1cHBvcnQKQEAgLTIwNyw3ICsyMTgsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBNdXR1YWwgZXhsdXNpb24gd2l0aGluIEFDUElDQSBzdWJzeXN0ZW0KKyAqIE11dHVhbCBleGNsdXNpb24gd2l0aGluIEFDUElDQSBzdWJzeXN0ZW0KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtMjk1LDYgKzMwNiw4IEBACiBBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9ldmVudHNfaW5pdGlhbGl6ZWQ7CiBBQ1BJX0VYVEVSTiB1OCBhY3BpX2dibF9vc2lfZGF0YTsKIEFDUElfRVhURVJOIHN0cnVjdCBhY3BpX2ludGVyZmFjZV9pbmZvICphY3BpX2dibF9zdXBwb3J0ZWRfaW50ZXJmYWNlczsKK0FDUElfRVhURVJOIHN0cnVjdCBhY3BpX2FkZHJlc3NfcmFuZ2UKKyAgICAqYWNwaV9nYmxfYWRkcmVzc19yYW5nZV9saXN0W0FDUElfQUREUkVTU19SQU5HRV9NQVhdOwogCiAjaWZuZGVmIERFRklORV9BQ1BJX0dMT0JBTFMKIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9hY2h3YXJlLmggYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2FjaHdhcmUuaAppbmR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csOSBAQAogI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfRVhURU5ERURfSVJRICAgICAgICAgMHg4OQogI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfQUREUkVTUzY0ICAgICAgICAgICAgMHg4QQogI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfRVhURU5ERURfQUREUkVTUzY0ICAgMHg4QgotI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfTEFSR0VfTUFYICAgICAgICAgICAgMHg4QgorI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfR1BJTyAgICAgICAgICAgICAgICAgMHg4QworI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfU0VSSUFMX0JVUyAgICAgICAgICAgMHg4RQorI2RlZmluZSBBQ1BJX1JFU09VUkNFX05BTUVfTEFSR0VfTUFYICAgICAgICAgICAgMHg4RQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2FjbWFjcm9zLmggYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2FjbWFjcm9zLmgKaW5kZXggYjc0OTFlZS4uZWYzMzhhOSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9hY21hY3Jvcy5oCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvYWNtYWNyb3MuaApAQCAtNSw3ICs1LDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyoKLSAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTEsIEludGVsIENvcnAuCisgKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDEyLCBJbnRlbCBDb3JwLgogICogQWxsIHJpZ2h0cyByZXNl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AogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtOTMsNiArOTMsNyBAQAogI2RlZmluZSBBUkdQX0NPTkNBVF9PUCAgICAgICAgICAgICAgICAgIEFSR1BfTElTVDMgKEFSR1BfVEVSTUFSRywgICAgQVJHUF9URVJNQVJHLCAgICAgICBBUkdQX1RBUkdFVCkKICNkZWZpbmUgQVJHUF9DT05DQVRfUkVTX09QICAgICAgICAgICAgICBBUkdQX0xJU1QzIChBUkdQX1RFUk1BUkcsICAgIEFSR1BfVEVSTUFSRywgICAgICAgQVJHUF9UQVJHRVQpCiAjZGVmaW5lIEFSR1BfQ09ORF9SRUZfT0ZfT1AgICAgICAgICAgICAgQVJHUF9MSVNUMiAoQVJHUF9TVVBFUk5BTUUsICBBUkdQX1NVUEVSTkFNRSkKKyNkZWZpbmUgQVJHUF9DT05ORUNURklFTERfT1AgICAgICAgICAgICBBUkdQX0xJU1QxIChBUkdQX05BTUVTVFJJTkcpCiAjZGVmaW5lIEFSR1BfQ09OVElOVUVfT1AgICAgICAgICAgICAgICAgQVJHX05PTkUKICNkZWZpbmUgQVJHUF9DT1BZX09QICAgICAgICAgICAgICAgICAgICBBUkdQX0xJU1QyIChBUkdQX1RFUk1BUkcsICAgIEFSR1BfU0lNUExFTkFNRSkKICNkZWZpbmUgQVJHUF9DUkVBVEVfQklUX0ZJRUxEX09QICAgICAgICBBUkdQX0xJU1QzIChBUkdQX1RFUk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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtNzMsMjggKzczLDQwIEBACiAKIC8qIFJlc291cmNlIGNvbnZlcnNpb24gb3Bjb2RlcyAqLwogCi0jZGVmaW5lIEFDUElfUlNDX0lOSVRHRVQgICAgICAgICAgICAgICAgMAotI2RlZmluZSBBQ1BJX1JTQ19JTklUU0VUICAgICAgICAgICAgICAgIDEKLSNkZWZpbmUgQUNQSV9SU0NfRkxBR0lOSVQgICAgICAgICAgICAgICAyCi0jZGVmaW5lIEFDUElfUlNDXzFCSVRGTEFHICAgICAgICAgICAgICAgMwotI2RlZmluZSBBQ1BJX1JTQ18yQklURkxBRyAgICAgICAgICAgICAgIDQKLSNkZWZpbmUgQUNQSV9SU0NfQ09VTlQgICAgICAgICAgICAgICAgICA1Ci0jZGVmaW5lIEFDUElfUlNDX0NPVU5UMTYgICAgICAgICAgICAgICAgNgotI2RlZmluZSBBQ1BJX1JTQ19MRU5HVEggICAgICAgICAgICAgICAgIDcKLSNkZWZpbmUgQUNQSV9SU0NfTU9WRTggICAgICAgICAgICAgICAgICA4Ci0jZGVmaW5lIEFDUElfUlNDX01PVkUxNiAgICAgICAgICAgICAgICAgOQotI2RlZmluZSBBQ1BJX1JTQ19NT1ZFMzIgICAgICAgICAgICAgICAgIDEwCi0jZGVmaW5lIEFDUElfUlNDX01PVkU2NCAgICAgICAgICAgICAgICAgMTEKLSNkZWZpbmUgQUNQSV9SU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NJRklDQVRUUklCVVRFUyAgICAgICJfQVRUIgogI2RlZmluZSBBQ1BJX1JFU1RBR19CQVNFQUREUkVTUyAgICAgICAgICAgICAgICAgIl9CQVMiCiAjZGVmaW5lIEFDUElfUkVTVEFHX0JVU01BU1RFUiAgICAgICAgICAgICAgICAgICAiX0JNXyIJLyogTWFzdGVyKDEpLCBTbGF2ZSgwKSAqLworI2RlZmluZSBBQ1BJX1JFU1RBR19ERUJPVU5DRVRJTUUgICAgICAgICAgICAgICAgIl9EQlQiCiAjZGVmaW5lIEFDUElfUkVTVEFHX0RFQ09ERSAgICAgICAgICAgICAgICAgICAgICAiX0RFQyIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfREVWSUNFUE9MQVJJVFkgICAgICAgICAgICAgICJfRFBMIgogI2RlZmluZSBBQ1BJX1JFU1RBR19ETUEgICAgICAgICAgICAgICAgICAgICAgICAgIl9ETUEiCiAjZGVmaW5lIEFDUElfUkVTVEFHX0RNQVRZUEUgICAgICAgICAgICAgICAgICAgICAiX1RZUCIJLyogQ29tcGF0aWJsZSgwKSwgQSgxKSwgQigyKSwgRigzKSAqLworI2RlZmluZSBBQ1BJX1JFU1RBR19EUklWRVNUUkVOR1RIICAgICAgICAgICAgICAgIl9EUlMiCisjZGVmaW5lIEFDUElfUkVTVEFHX0VORElBTk5FU1MgICAgICAgICAgICAgICAgICAiX0VORCIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfRkxPV0NPTlRST0wgICAgICAgICAgICAgICAgICJfRkxDIgogI2RlZmluZSBBQ1BJX1JFU1RBR19HUkFOVUxBUklUWSAgICAgICAgICAgICAgICAgIl9HUkEiCiAjZGVmaW5lIEFDUElfUkVTVEFHX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAiX0lOVCIKICNkZWZpbmUgQUNQSV9SRVNUQUdfSU5URVJSVVBUTEVWRUwgICAgICAgICAgICAgICJfTExfIgkvKiBhY3RpdmVfbG8oMSksIGFjdGl2ZV9oaSgwKSAqLwogI2RlZmluZSBBQ1BJX1JFU1RBR19JTlRFUlJVUFRTSEFSRSAgICAgICAgICAgICAgIl9TSFIiCS8qIFNoYXJlYWJsZSgxKSwgbm9fc2hhcmUoMCkgKi8KICNkZWZpbmUgQUNQSV9SRVNUQUdfSU5URVJSVVBUVFlQRSAgICAgICAgICAgICAgICJfSEVfIgkvKiBFZGdlKDEpLCBMZXZlbCgwKSAqLworI2RlZmluZSBBQ1BJX1JFU1RBR19JT1JFU1RSSUNUSU9OICAgICAgICAgICAgICAgIl9JT1IiCiAjZGVmaW5lIEFDUElfUkVTVEFHX0xFTkdUSCAgICAgICAgICAgICAgICAgICAgICAiX0xFTiIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfTElORSAgICAgICAgICAgICAgICAgICAgICAgICJfTElOIgogI2RlZmluZSBBQ1BJX1JFU1RBR19NRU1BVFRSSUJVVEVTICAgICAgICAgICAgICAgIl9NVFAiCS8qIE1lbW9yeSgwKSwgUmVzZXJ2ZWQoMSksIEFDUEkoMiksIE5WUygzKSAqLwogI2RlZmluZSBBQ1BJX1JFU1RBR19NRU1UWVBFICAgICAgICAgICAgICAgICAgICAgIl9NRU0iCS8qIG5vbl9jYWNoZSgwKSwgQ2FjaGVhYmxlKDEpIENhY2hlK2NvbWJpbmUoMiksIENhY2hlK3ByZWZldGNoKDMpICovCiAjZGVmaW5lIEFDUElfUkVTVEFHX01BWEFERFIgICAgICAgICAgICAgICAgICAgICAiX01BWCIKICNkZWZpbmUgQUNQSV9SRVNUQUdfTUlOQUREUiAgICAgICAgICAgICAgICAgICAgICJfTUlOIgogI2RlZmluZSBBQ1BJX1JFU1RBR19NQVhUWVBFICAgICAgICAgICAgICAgICAgICAgIl9NQUYiCiAjZGVmaW5lIEFDUElfUkVTVEFHX01JTlRZUEUgICAgICAgICAgICAgICAgICAgICAiX01JRiIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfTU9ERSAgICAgICAgICAgICAgICAgICAgICAgICJfTU9EIgorI2RlZmluZSBBQ1BJX1JFU1RBR19QQVJJVFkgICAgICAgICAgICAgICAgICAgICAgIl9QQVIiCisjZGVmaW5lIEFDUElfUkVTVEFHX1BIQVNFICAgICAgICAgICAgICAgICAgICAgICAiX1BIQSIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfUElOICAgICAgICAgICAgICAgICAgICAgICAgICJfUElOIgorI2RlZmluZSBBQ1BJX1JFU1RBR19QSU5DT05GSUcgICAgICAgICAgICAgICAgICAgIl9QUEkiCisjZGVmaW5lIEFDUElfUkVTVEFHX1BPTEFSSVRZICAgICAgICAgICAgICAgICAgICAiX1BPTCIKICNkZWZpbmUgQUNQSV9SRVNUQUdfUkVHSVNURVJCSVRPRkZTRVQgICAgICAgICAgICJfUkJPIgogI2RlZmluZSBBQ1BJX1JFU1RBR19SRUdJU1RFUkJJVFdJRFRIICAgICAgICAgICAgIl9SQlciCiAjZGVmaW5lIEFDUElfUkVTVEFHX1JBTkdFVFlQRSAgICAgICAgICAgICAgICAgICAiX1JORyIKICNkZWZpbmUgQUNQSV9SRVNUQUdfUkVBRFdSSVRFVFlQRSAgICAgICAgICAgICAgICJfUldfIgkvKiByZWFkX29ubHkoMCksIFdyaXRlYWJsZSAoMSkgKi8KKyNkZWZpbmUgQUNQSV9SRVNUQUdfTEVOR1RIX1JYICAgICAgICAgICAgICAgICAgICJfUlhMIgorI2RlZmluZSBBQ1BJX1JFU1RBR19MRU5HVEhfVFggICAgICAgICAgICAgICAgICAgIl9UWEwiCisjZGVmaW5lIEFDUElfUkVTVEFHX1NMQVZFTU9ERSAgICAgICAgICAgICAgICAgICAiX1NMViIKKyNkZWZpbmUgQUNQSV9SRVNUQUdfU1BFRUQgICAgICAgICAgICAgICAgICAgICAgICJfU1BFIgorI2RlZmluZSBBQ1BJX1JFU1RBR19TVE9QQklUUyAgICAgICAgICAgICAgICAgICAgIl9TVEIiCiAjZGVmaW5lIEFDUElfUkVTVEFHX1RSQU5TTEFUSU9OICAgICAgICAgICAgICAgICAiX1RS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ICAgICAgICAgIDEKKyNkZWZpbmUgQU1MX1JFU09VUkNFX01BWF9HUElPVFlQRSAgICAgICAgICAgICAgIDEKKworLyogQ29tbW9uIHByZWFtYmxlIGZvciBhbGwgc2VyaWFsIGRlc2NyaXB0b3JzIChBQ1BJIDUuMCkgKi8KKworI2RlZmluZSBBTUxfUkVTT1VSQ0VfU0VSSUFMX0NPTU1PTiBcCisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXZpc2lvbl9pZDsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzX3NvdXJjZV9pbmRleDsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3M7IFwKKwl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVfc3BlY2lmaWNfZmxhZ3M7IFwKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVfcmV2aXNpb25faWQ7IFwKKwl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVfZGF0YV9sZW5ndGg7IFwKKworLyogVmFsdWVzIGZvciB0aGUgdHlwZSBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFNTF9SRVNPVVJDRV9JMkNfU0VSSUFMQlVTVFlQRSAgICAgICAgICAxCisjZGVmaW5lIEFNTF9SRVNPVVJDRV9TUElfU0VSSUFMQlVTVFlQRSAgICAgICAgICAyCisjZGVmaW5lIEFNTF9SRVNPVVJDRV9VQVJUX1NFUklBTEJVU1RZUEUgICAgICAgICAzCisjZGVmaW5lIEFNTF9SRVNPVVJDRV9NQVhfU0VSSUFMQlVTVFlQRSAgICAgICAgICAzCisjZGVmaW5lIEFNTF9SRVNPVVJDRV9WRU5ET1JfU0VSSUFMQlVTVFlQRSAgICAgICAxOTIJLyogVmVuZG9yIGRlZmluZWQgaXMgMHhDMC0weEZGIChOT1QgU1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hLi5iZTc1MzM5IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2V2Z3BlYmxrLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9ldmdwZWJsay5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldmdwZWluaXQuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvZXZncGVpbml0LmMKaW5kZXggY2U5YWE5Zi4uYWRmNzQ5NCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldmdwZWluaXQuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2V2Z3BlaW5pdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldmdwZXV0aWwuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvZXZncGV1dGlsLmMKaW5kZXggODBhODFkMC4uMjUwNzM5MyAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldmdwZXV0aWwuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2V2Z3BldXRpbC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldm1pc2MuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvZXZtaXNjLmMKaW5kZXggZDBiMzMxOC4uODQ5NjZmNCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9ldm1pc2MuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2V2bWlzYy5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiB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yoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9pc192YWxpZF9zcGFjZV9pZAorICoKKyAqIFBBUkFNRVRFUlM6ICBzcGFjZV9pZCAgICAgICAgICAgIC0gSUQgdG8gYmUgdmFsaWRhdGVkCisgKgorICogUkVUVVJOOiAgICAgIFRSVUUgaWYgdmFsaWQvc3VwcG9ydGVkIElELgorICoKKyAqIERFU0NSSVBUSU9OOiBWYWxpZGF0ZSBhbiBvcGVyYXRpb24gcmVnaW9uIHNwYWNlX2lELgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3U4IGFjcGlfaXNfdmFsaWRfc3BhY2VfaWQodTggc3BhY2VfaWQpCit7CisKKwlpZiAoKHNwYWNlX2lkID49IEFDUElfTlVNX1BSRURFRklORURfUkVHSU9OUykgJiYKKwkgICAgKHNwYWNlX2lkIDwgQUNQSV9VU0VSX1JFR0lPTl9CRUdJTikgJiYKKwkgICAgKHNwYWNlX2lkICE9IEFDUElfQURSX1NQQUNFX0RBVEFfVEFCTEUpICYmCisJICAgIChzcGFjZV9pZCAhPSBBQ1BJX0FEUl9TUEFDRV9GSVhFRF9IQVJEV0FSRSkpIHsKKwkJcmV0dXJuIChGQUxTRSk7CisJfQorCisJcmV0dXJuIChUUlVFKTsKK30KKwogI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2h3YWNwaS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9od2FjcGkuYwppbmRleCBmYzM4MGQzLi5kMjFlYzVmIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2h3YWNwaS5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHdhY3BpLm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kvYWNwaWNhL2h3eGZhY2UuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHd4ZmFjZS5jCmluZGV4IGMyNzkzYTguLjlkMzhlYjYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHd4ZmFjZS5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHd4ZmFjZS5jCkBAIC02LDcgKzYsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtMzU2LDcgKzM1Niw3IEBACiAgKgogICogUEFSQU1FVEVSUzogIHJlZ2lzdGVyX2lkICAgICAtIElEIG9mIEFDUEkgQml0IFJlZ2lzdGVyIHRvIGFjY2VzcwogICogICAgICAgICAgICAgIFZhbHVlICAgICAgICAgICAtIFZhbHVlIHRvIHdyaXRlIHRvIHRoZSByZWdpc3RlciwgaW4gYml0Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gemVyby4gVGhlIGJpdCBpcyBhdXRvbWF0aWNhbGxseQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uIHplcm8uIFRoZSBiaXQgaXMgYXV0b21hdGljYWxseQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoaWZ0ZWQgdG8gdGhlIGNvcnJlY3QgcG9zaXRpb24uCiAgKgogICogUkVUVVJOOiAgICAgIFN0YXR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IC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2xvYWQuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvbnNsb2FkLmMKaW5kZXggNWY3ZGM2OS4uNWNiZjE1ZiAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc2xvYWQuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zbG9hZC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc25hbWVzLmMgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL25zbmFtZXMuYwppbmRleCBkNWZhNTIwLi5iMjBlN2M4IDE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2FjcGljYS9yc2lycS5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvcnNpcnEuYwpAQCAtNSw3ICs1LDcgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDExLCBJbnRlbCBDb3JwLgorICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMiwgSW50ZWwgQ29ycC4KICAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CkBAIC0yNjQsMyArMjY0LDM0IEBACiAJIEFNTF9PRkZTRVQoZG1hLmRtYV9jaGFubmVsX21hc2spLAogCSBBQ1BJX1JTX09GRlNFVChkYXRhLmRtYS5jaGFubmVsX2NvdW50KX0KIH07CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogYWNwaV9yc19jb252ZXJ0X2ZpeGVkX2RtYQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBhY3BpX3JzY29udmVydF9pbmZvIGFjcGlfcnNfY29udmVydF9maXhlZF9kbWFbNF0gPSB7CisJe0FDUElfUlNDX0lOSVRHRVQsIEFDUElfUkVTT1VSQ0VfVFlQRV9GSVhFRF9ETUEsCisJIEFDUElfUlNfU0laRShzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9maXhlZF9kbWEpLAorCSBBQ1BJX1JTQ19UQUJMRV9TSVpFKGFjcGlfcnNfY29udmVydF9maXhlZF9kbWEpfSwKKwor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zsgTE9TUyBPRiBVU0UsIERBVEEsIE9SIFBST0ZJVFM7IE9SIEJVU0lORVNTIElOVEVSUlVQVElPTikKKyAqIEhPV0VWRVIgQ0FVU0VEIEFORCBPTiBBTlkgVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwKKyAqIFNUUklDVCBMSUFCSUxJVFksIE9SIFRPUlQgKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORworICogSU4gQU5ZIFdBWSBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFCisgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCisgKi8KKworI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgorI2luY2x1ZGUgImFjY29tbW9uLmgiCisjaW5jbHVkZSAiYWNyZXNyYy5oIgorCisjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9SRVNPVVJDRVMKK0FDUElfTU9EVUxFX05BTUUoInJzc2VyaWFsIikKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBhY3BpX3JzX2NvbnZlcnRfZ3BpbworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgYWNwaV9yc2NvbnZlcnRfaW5mbyBhY3BpX3JzX2NvbnZlcnRfZ3Bpb1sxN10gPSB7CisJe0FDUElfUlNDX0lOSVRHRVQsIEFDUElfUkVTT1VSQ0VfVFlQRV9HUElPLAorCSBBQ1BJX1JTX1NJWkUoc3RydWN0IGFjcGlfcmVzb3VyY2VfZ3BpbyksCisJIEFDUElfUlNDX1RBQkxFX1NJWkUoYWNwaV9yc19jb252ZXJ0X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lNDX01PVkVfR1BJT19QSU46CiAJCQlBQ1BJX01PVkVfMTZfVE9fMTYoJkFDUElfQ0FTVF9QVFIodTE2LCBkZXN0aW5hdGlvbilbaV0sCiAJCQkJCSAgICZBQ1BJX0NBU1RfUFRSKHUxNiwgc291cmNlKVtpXSk7CiAJCQlicmVhazsKQEAgLTU5MCw2ICs1OTQsNTYgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBGVU5DVElPTjogICAgYWNwaV9yc19nZXRfYWVpX21ldGhvZF9kYXRhCisgKgorICogUEFSQU1FVEVSUzogIE5vZGUgICAgICAgICAgICAtIERldmljZSBub2RlCisgKiAgICAgICAgICAgICAgcmV0X2J1ZmZlciAgICAgIC0gUG9pbnRlciB0byBhIGJ1ZmZlciBzdHJ1Y3R1cmUgZm9yIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIHRvIGdldCB0aGUgX0FFSSB2YWx1ZSBvZiBhbiBvYmplY3QKKyAqICAgICAgICAgICAgICBjb250YWluZWQgaW4gYW4gb2JqZWN0IHNwZWNpZmllZCBieSB0aGUgaGFuZGxlIHBhc3NlZCBpbgorICoKKyAqICAgICAgICAgICAgICBJZiB0aGUgZnVuY3Rpb24gZmFpbHMgYW4gYXBwcm9wcmlhdGUgc3RhdHVzIHdpbGwgYmUgcmV0dXJuZWQKKyAqICAgICAgICAgICAgICBhbmQgdGhlIGNvbnRlbnRzIG9mIHRoZSBjYWxsZXJzIGJ1ZmZlciBpcyB1bmRlZmluZWQuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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pfZGVzYyk7CisJcmV0dXJuX0FDUElfU1RBVFVTKHN0YXR1cyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZ2V0X21ldGhvZF9kYXRhCiAgKgogICogUEFSQU1FVEVSUzogIEhhbmRsZSAgICAgICAgICAtIEhhbmRsZSB0byB0aGUgY29udGFpbmluZyBvYmplY3QKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvcnN4ZmFjZS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9yc3hmYWNlLmMKaW5kZXggZmU4NmIzNy4uZjU4YzA5OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9yc3hmYWNlLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9yc3hmYWNlLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtMzA3LDYgKzMwNyw0NiBAQAogCiBBQ1BJX0VYUE9SVF9TWU1CT0woYWNwaV9zZXRfY3VycmVudF9yZXNvdXJjZXMpCiAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZ2V0X2V2ZW50X3Jlc291cmNlcworICoKKyAqIFBBUkFNRVRFUlM6ICBkZXZpY2VfaGFuZGxlICAgLSBIYW5kbGUgdG8gdGhlIGRldmljZSBvYmplY3QgZm9yIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldmljZSB3ZSBhcmUgZ2V0dGluZyByZXNvdXJjZXMKKyAqICAgICAgICAgICAgICBpbl9idWZmZXIgICAgICAgLSBQb2ludGVyIHRvIGEgYnVmZmVyIGNvbnRhaW5pbmcgdGhlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzIHRvIGJlIHNldCBmb3IgdGhlIGRldmljZQorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgdG8gZ2V0IHRoZSBldmVudCByZXNvdXJjZXMgZm9yIGEKKyAqICAgICAgICAgICAgICBzcGVjaWZpYyBkZXZpY2UuIFRoZSBjYWxsZXIgbXVzdCBmaXJzdCBhY3F1aXJlIGEgaGFuZGxlIGZvcgorICogICAgICAgICAgICAgIHRoZSBkZXNpcmVkIGRldmljZS4gVGhlIHJlc291cmNlIGRhdGEgaXMgcGFzc2VkIHRvIHRoZSByb3V0aW5lCisgKiAgICAgICAgICAgICAgdGhlIGJ1ZmZlciBwb2ludGVkIHRvIGJ5IHRoZSBpbl9idWZmZXIgdmFyaWFibGUuIFVzZXMgdGhlCisgKiAgICAgICAgICAgICAgX0FFSSBtZXRob2QuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2FjcGlfc3RhdHVzCithY3BpX2dldF9ldmVudF9yZXNvdXJjZXMoYWNwaV9oYW5kbGUgZGV2aWNlX2hhbmRsZSwKKwkJCSBzdHJ1Y3QgYWNwaV9idWZmZXIgKnJldF9idWZmZXIpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOworCisJQUNQSV9GVU5DVElPTl9UUkFDRShhY3BpX2dldF9ldmVudF9yZXNvdXJjZXMpOworCisJLyogVmFsaWRhdGUgcGFyYW1ldGVycyB0aGVuIGRpc3BhdGNoIHRvIGludGVybmFsIHJvdXRpbmUgKi8KKworCXN0YXR1cyA9IGFjcGlfcnNfdmFsaWRhdGVfcGFyYW1ldGVycyhkZXZpY2VfaGFuZGxlLCByZXRfYnVmZmVyLCAmbm9kZSk7CisJaWYgKEFDUElfRkFJTFVSRShzdGF0dXMpKSB7CisJCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOworCX0KKworCXN0YXR1cyA9IGFjcGlfcnNfZ2V0X2FlaV9tZXRob2RfZGF0YShub2RlLCByZXRfYnVmZmVyKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKK30KKworQUNQSV9FWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X2V2ZW50X3Jlc291cmNlcykKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqIEZVTkNUSU9OOiAgICBhY3BpX3Jlc291cmNlX3RvX2FkZHJlc3M2NApAQCAtNDg2LDggKzUyNiw5IEBACiAgKgogICogUEFSQU1FVEVSUzogIGRldmljZV9oYW5kbGUgICAtIEhhbmRsZSB0byB0aGUgZGV2aWNlIG9iamVjdCBmb3IgdGhlCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlIHdlIGFyZSBxdWVyeWluZwotICogICAgICAgICAgICAgIE5hbWUgICAgICAgICAgICAtIE1ldGhvZCBuYW1lIG9mIHRoZSByZXNvdXJjZXMgd2Ugd2FudAotICogICAgICAgICAgICAgICAg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hY3BpY2EvdGJ4ZnJvb3QuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3RieGZyb290LmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDExLCBJbnRlbCBDb3JwLgorICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMiwgSW50ZWwgQ29ycC4KICAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0YWRkcmVzcy5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGFkZHJlc3MuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi42NzkzMmFlCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGFkZHJlc3MuYwpAQCAtMCwwICsxLDI5NCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE1vZHVsZSBOYW1lOiB1dGFkZHJlc3MgLSBvcF9yZWdpb24gYWRkcmVzcyByYW5nZSBjaGVjaworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgorICoKKyAqIFJlZGlzdHJpYnV0aW9uIGFu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T05UUkFDVCwKKyAqIFNUUklDVCBMSUFCSUxJVFksIE9SIFRPUlQgKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORworICogSU4gQU5ZIFdBWSBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFCisgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCisgKi8KKworI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgorI2luY2x1ZGUgImFjY29tbW9uLmgiCisjaW5jbHVkZSAiYWNuYW1lc3AuaCIKKworI2RlZmluZSBfQ09NUE9ORU5UICAgICAgICAgIEFDUElfVVRJTElUSUVTCitBQ1BJX01PRFVMRV9OQU1FKCJ1dGFkZHJlc3MiKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2FkZF9hZGRyZXNzX3JhbmdlCisgKgorICogUEFSQU1FVEVSUzogIHNwYWNlX2lkICAgICAgICAgICAgLSBBZGRyZXNzIHNwYWNlIElECisgKiAgICAgICAgICAgICAgQWRkcmVzcyAgICAgICAgICAgICAtIG9wX3JlZ2lvbiBzdGFydCBhZGRyZXNzCisgKiAgICAgICAgICAgICAgTGVuZ3RoICAgICAgICAgICAgICAtIG9wX3JlZ2lvbiBsZW5ndGgKKyAqICAgICAgICAgICAgICByZWdpb25fbm9kZSAgICAgICAgIC0gb3BfcmVnaW9uIG5hbWVzcGFjZSBub2RlCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBBZGQgdGhlIE9wZXJhdGlvbiBSZWdpb24gYWRkcmVzcyByYW5nZSB0byB0aGUgZ2xvYmFsIGxpc3QuCisgKiAgICAgICAgICAgICAgVGhlIG9ubHkgc3VwcG9yd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dXRfZ2V0X25vZGVfbmFtZShyYW5nZV9pbmZvLT5yZWdpb25fbm9kZSksCisJCQkgIEFDUElfQ0FTVF9QVFIodm9pZCwgYWRkcmVzcyksCisJCQkgIEFDUElfQ0FTVF9QVFIodm9pZCwgcmFuZ2VfaW5mby0+ZW5kX2FkZHJlc3MpKSk7CisKKwkodm9pZClhY3BpX3V0X3JlbGVhc2VfbXV0ZXgoQUNQSV9NVFhfTkFNRVNQQUNFKTsKKwlyZXR1cm5fQUNQSV9TVEFUVVMoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3JlbW92ZV9hZGRyZXNzX3JhbmdlCisgKgorICogUEFSQU1FVEVSUzogIHNwYWNlX2lkICAgICAgICAgICAgLSBBZGRyZXNzIHNwYWNlIElECisgKiAgICAgICAgICAgICAgcmVnaW9uX25vZGUgICAgICAgICAtIG9wX3JlZ2lvbiBuYW1lc3BhY2Ugbm9kZQorICoKKyAqIFJFVFVSTjogICAgICBOb25lCisgKgorICogREVTQ1JJUFRJT046IFJlbW92ZSB0aGUgT3BlcmF0aW9uIFJlZ2lvbiBmcm9tIHRoZSBnbG9iYWwgbGlzdC4gVGhlIG9ubHkKKyAqICAgICAgICAgICAgICBzdXBwb3J0ZWQgU3BhY2UgSURzIGFyZSBNZW1vcnkgYW5kIEkvTy4gQ2FsbGVkIHdoZW4gYW4KKyAqICAgICAgICAgICAgICBvcF9yZWdpb24gaXMgZGVsZXRlZC4KKyAqCisgKiBNVVRFWDogICAgICAgQXNzdW1lcyB0aGUgbmFtZXNwYWNlIGlzIGxvY2tlZAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQKK2FjcGlfdXRfcmVtb3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B4JXBcbiIsCisJCQkJCSAgYWNwaV91dF9nZXRfbm9kZV9uYW1lKHJhbmdlX2luZm8tPgorCQkJCQkJCQlyZWdpb25fbm9kZSksCisJCQkJCSAgQUNQSV9DQVNUX1BUUih2b2lkLAorCQkJCQkJCXJhbmdlX2luZm8tPgorCQkJCQkJCXN0YXJ0X2FkZHJlc3MpLAorCQkJCQkgIEFDUElfQ0FTVF9QVFIodm9pZCwKKwkJCQkJCQlyYW5nZV9pbmZvLT4KKwkJCQkJCQllbmRfYWRkcmVzcykpKTsKKworCQkJQUNQSV9GUkVFKHJhbmdlX2luZm8pOworCQkJcmV0dXJuX1ZPSUQ7CisJCX0KKworCQlwcmV2ID0gcmFuZ2VfaW5mbzsKKwkJcmFuZ2VfaW5mbyA9IHJhbmdlX2luZm8tPm5leHQ7CisJfQorCisJcmV0dXJuX1ZPSUQ7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfY2hlY2tfYWRkcmVzc19yYW5nZQorICoKKyAqIFBBUkFNRVRFUlM6ICBzcGFjZV9pZCAgICAgICAgICAgIC0gQWRkcmVzcyBzcGFjZSBJRAorICogICAgICAgICAgICAgIEFkZHJlc3MgICAgICAgICAgICAgLSBTdGFydCBhZGRyZXNzCisgKiAgICAgICAgICAgICAgTGVuZ3RoICAgICAgICAgICAgICAtIExlbmd0aCBvZiBhZGRyZXNzIHJhbmdlCisgKiAgICAgICAgICAgICAgV2FybiAgICAgICAgICAgICAgICAtIFRSVUUgaWYgd2FybmluZyBvbiBvdmVybGFwIGRlc2lyZWQKKyAqCisgKiBSRVRVUk46ICAgICAgQ291bnQgb2YgdGhlIG51bWJlciBvZiBjb25mbGljdHMgZGV0ZWN0ZWQuIFplcm8gaXMgYWx3YXlzCisgKiAgICAgICAgICAgICAgcmV0dXJuZWQgZm9yIFNw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bm9kZSk7CisKKwkJCQlBQ1BJX1dBUk5JTkcoKEFFX0lORk8sCisJCQkJCSAgICAgICIweCVwLTB4JXAgJXMgY29uZmxpY3RzIHdpdGggUmVnaW9uICVzICVkIiwKKwkJCQkJICAgICAgQUNQSV9DQVNUX1BUUih2b2lkLCBhZGRyZXNzKSwKKwkJCQkJICAgICAgQUNQSV9DQVNUX1BUUih2b2lkLCBlbmRfYWRkcmVzcyksCisJCQkJCSAgICAgIGFjcGlfdXRfZ2V0X3JlZ2lvbl9uYW1lKHNwYWNlX2lkKSwKKwkJCQkJICAgICAgcGF0aG5hbWUsIG92ZXJsYXBfY291bnQpKTsKKwkJCQlBQ1BJX0ZSRUUocGF0aG5hbWUpOworCQkJfQorCQl9CisKKwkJcmFuZ2VfaW5mbyA9IHJhbmdlX2luZm8tPm5leHQ7CisJfQorCisJcmV0dXJuX1VJTlQzMihvdmVybGFwX2NvdW50KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9kZWxldGVfYWRkcmVzc19saXN0cworICoKKyAqIFBBUkFNRVRFUlM6ICBOb25lCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogRGVsZXRlIGFsbCBnbG9iYWwgYWRkcmVzcyByYW5nZSBsaXN0cyAoY2FsbGVkIGR1cmluZworICogICAgICAgICAgICAgIHN1YnN5c3RlbSBzaHV0ZG93bikuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBhY3BpX3V0X2RlbGV0ZV9hZGRyZXNzX2xpc3RzKHZvaWQpCit7CisJc3RydWN0IGFjcGlfYWRkcmVzc19yYW5nZSAqbmV4dDsKKwlzdHJ1Y3QgYWNwaV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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGluaXQuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRpbml0LmMKaW5kZXggMTkxYjY4Mi4uODM1OWMwYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGluaXQuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0aW5pdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtOTIsNiArOTIsNyBAQAogCQlncGVfeHJ1cHRfaW5mbyA9IG5leHRfZ3BlX3hydXB0X2luZm87CiAJfQogCisJYWNwaV91dF9kZWxldGVfYWRkcmVzc19saXN0cygpOwogCXJldHVybl9WT0lEOwogfQogCmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bG9jay5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGxvY2suYwppbmRleCBmNmJiNzVjNi4uMTU1ZmQ3OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGxvY2suYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bG9jay5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dG1hdGguYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRtYXRoLmMKaW5kZXggY2U0ODFkYS4uMjQ5MWE1NSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dG1hdGguYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bWF0aC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyoKLSAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTEsIEludGVsIENvcnAuCisgKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDEyLCBJbnRlbCBDb3JwLgogICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAqCiAgKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdX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ewogCQkJCWlmIChpID09IG11dGV4X2lkKSB7CiAJCQkJCWNvbnRpbnVlOwogCQkJCX0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRvYmplY3QuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRvYmplY3QuYwppbmRleCAxODgzNDBhLi5iMTEyNzQ0IDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0b2JqZWN0LmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dG9iamVjdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMSwgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTIsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dG9zaS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dG9zaS5jCmluZGV4IDFmYjEwY2IuLjIzNjBjZjcgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRvc2kuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0b3NpLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDExLCBJbnRlbCBDb3JwLgorICogQ29weXJpZ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dpdGhvdXQKQEAgLTQ4LDYgKzQ4LDcgQEAKICNpbmNsdWRlICJhY25hbWVzcC5oIgogI2luY2x1ZGUgImFjZGVidWcuaCIKICNpbmNsdWRlICJhY3RhYmxlcy5oIgorI2luY2x1ZGUgImFjaW50ZXJwLmgiCiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwogQUNQSV9NT0RVTEVfTkFNRSgidXR4ZmFjZSIpCkBAIC02NDAsNCArNjQxLDQxIEBACiB9CiAKIEFDUElfRVhQT1JUX1NZTUJPTChhY3BpX2luc3RhbGxfaW50ZXJmYWNlX2hhbmRsZXIpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2NoZWNrX2FkZHJlc3NfcmFuZ2UKKyAqCisgKiBQQVJBTUVURVJTOiAgc3BhY2VfaWQgICAgICAgICAgICAtIEFkZHJlc3Mgc3BhY2UgSUQKKyAqICAgICAgICAgICAgICBBZGRyZXNzICAgICAgICAgICAgIC0gU3RhcnQgYWRkcmVzcworICogICAgICAgICAgICAgIExlbmd0aCAgICAgICAgICAgICAgLSBMZW5ndGgKKyAqICAgICAgICAgICAgICBXYXJuICAgICAgICAgICAgICAgIC0gVFJVRSBpZiB3YXJuaW5nIG9uIG92ZXJsYXAgZGVzaXJlZAorICoKKyAqIFJFVFVSTjogICAgICBDb3VudCBvZiB0aGUgbnVtYmVyIG9mIGNvbmZsaWN0cyBkZXRlY3RlZC4KKyAqCisgKiBERVNDUklQVElPTjogQ2hlY2sgaWYgdGhlIGlucHV0IGFkZHJlc3MgcmFuZ2Ugb3ZlcmxhcHMgYW55IG9mIHRoZQorICogICAgICAgICAgICAgIEFTTCBvcGVyYXRpb24gcmVnaW9uIGFkZHJlc3MgcmFuZ2VzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKio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EhFUldJU0UpIEFSSVNJTkcKKyAqIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRQorICogUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0VTLgorICovCisKKyNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KKyNpbmNsdWRlICJhY2NvbW1vbi5oIgorI2luY2x1ZGUgImFjbmFtZXNwLmgiCisKKyNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUworQUNQSV9NT0RVTEVfTkFNRSgidXR4Zm11dGV4IikKKworLyogTG9jYWwgcHJvdG90eXBlcyAqLworc3RhdGljIGFjcGlfc3RhdHVzCithY3BpX3V0X2dldF9tdXRleF9vYmplY3QoYWNwaV9oYW5kbGUgaGFuZGxlLAorCQkJIGFjcGlfc3RyaW5nIHBhdGhuYW1lLAorCQkJIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKipyZXRfb2JqKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfbXV0ZXhfb2JqZWN0CisgKgorICogUEFSQU1FVEVSUzogIEhhbmRsZSAgICAgICAgICAgICAgLSBNdXRleCBvciBwcmVmaXggaGFuZGxlIChvcHRpb25hbCkKKyAqICAgICAgICAgICAgICBQYXRobmFtZSAgICAgICAgICAgIC0gTXV0ZXggcGF0aG5hbWUgKG9wdGlvbmFsKQorICogICAgICAgICAgICAgIHJldF9vYmogICAgICAgICAgICAgLSBXaGVyZSB0aGUgbXV0ZXggb2JqZWN0IGlzIHJldHVybmVkCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBHZXQgYW4gQU1MIG11dGV4IG9iamVjd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X0KKwl9CisKKwkvKiBFbnN1cmUgdGhhdCB3ZSBhY3R1YWxseSBoYXZlIGEgTXV0ZXggb2JqZWN0ICovCisKKwlpZiAoIW11dGV4X25vZGUgfHwgKG11dGV4X25vZGUtPnR5cGUgIT0gQUNQSV9UWVBFX01VVEVYKSkgeworCQlyZXR1cm4gKEFFX1RZUEUpOworCX0KKworCS8qIEdldCB0aGUgbG93LWxldmVsIG11dGV4IG9iamVjdCAqLworCisJbXV0ZXhfb2JqID0gYWNwaV9uc19nZXRfYXR0YWNoZWRfb2JqZWN0KG11dGV4X25vZGUpOworCWlmICghbXV0ZXhfb2JqKSB7CisJCXJldHVybiAoQUVfTlVMTF9PQkpFQ1QpOworCX0KKworCSpyZXRfb2JqID0gbXV0ZXhfb2JqOworCXJldHVybiAoQUVfT0spOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2FjcXVpcmVfbXV0ZXgKKyAqCisgKiBQQVJBTUVURVJTOiAgSGFuZGxlICAgICAgICAgICAgICAtIE11dGV4IG9yIHByZWZpeCBoYW5kbGUgKG9wdGlvbmFsKQorICogICAgICAgICAgICAgIFBhdGhuYW1lICAgICAgICAgICAgLSBNdXRleCBwYXRobmFtZSAob3B0aW9uYWwpCisgKiAgICAgICAgICAgICAgVGltZW91dCAgICAgICAgICAgICAtIE1heCB0aW1lIHRvIHdhaXQgZm9yIHRoZSBsb2NrIChtaWxsaXNlYykKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IEFjcXVpcmUgYW4gQU1MIG11dGV4LiBUaGlzIGlzIGEgZGV2aWNlIGRyaXZlciBpbnRlcmZhY2UgdG8KKyAqICAgICAgICAgICAgICBBTUwgbXV0ZXggb2JqZWN0cywgYW5kIGFsbG93cyBmb3IgdHJhbnNhY3Rpb24gbG9ja2luZyBiZXR3ZWVuCisgKiAgICAgICAgICAgICAgZHJpdmVycyBhbmQgQU1MIGNvZGUuIFRoZSBtdXRleCBub2RlIGlzIHBvaW50ZWQgdG8gYnkKKyAqICAgICAgICAgICAgICBIYW5kbGU6UGF0aG5hbWUuIEVpdGhlciBIYW5kbGUgb3IgUGF0aG5hbWUgY2FuIGJlIE5VTEwsIGJ1dAorICogICAgICAgICAgICAgIG5vdCBib3RoLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzCithY3BpX2FjcXVpcmVfbXV0ZXgoYWNwaV9oYW5kbGUgaGFuZGxlLCBhY3BpX3N0cmluZyBwYXRobmFtZSwgdTE2IHRpbWVvdXQpCit7CisJYWNwaV9zdGF0dXMgc3RhdHVzOworCXVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm11dGV4X29iajsKKworCS8qIEdldCB0aGUgbG93LWxldmVsIG11dGV4IGFzc29jaWF0ZWQgd2l0aCBIYW5kbGU6UGF0aG5hbWUgKi8KKworCXN0YXR1cyA9IGFjcGlfdXRfZ2V0X211dGV4X29iamVjdChoYW5kbGUsIHBhdGhuYW1lLCAmbXV0ZXhfb2JqKTsKKwlpZiAoQUNQSV9GQUlMVVJFKHN0YXR1cykpIHsKKwkJcmV0dXJuIChzdGF0dXMpOworCX0KKworCS8qIEFjcXVpcmUgdGhlIE9TIG11dGV4ICovCisKKwlzdGF0dXMgPSBhY3BpX29zX2FjcXVpcmVfbXV0ZXgobXV0ZXhfb2JqLT5tdXRleC5vc19tdXRleCwgdGltZW91dCk7CisJcmV0dXJuIChzdGF0dXMpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JlbGVhc2VfbXV0ZXgKKyAqCisgKiBQQVJBTUVURVJTOiAgSGFuZGxlICAgICAgICAgICAgICAtIE11dGV4IG9yIHByZWZpeCBoYW5kbGUgKG9wdGlvbmFsKQorICogICAgICAgICAgICAgIFBhdGhuYW1lICAgICAgICAgICAgLSBNdXRleCBwYXRobmFtZSAob3B0aW9uYWwpCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBSZWxlYXNlIGFuIEFNTCBtdXRleC4gVGhpcyBpcyBhIGRldmljZSBkcml2ZXIgaW50ZXJmYWNlIHRvCisgKiAgICAgICAgICAgICAgQU1MIG11dGV4IG9iamVjdHMsIGFuZCBhbGxvd3MgZm9yIHRyYW5zYWN0aW9uIGxvY2tpbmcgYmV0d2VlbgorICogICAgICAgICAgICAgIGRyaXZlcnMgYW5kIEFNTCBjb2RlLiBUaGUgbXV0ZXggbm9kZSBpcyBwb2ludGVkIHRvIGJ5CisgKiAgICAgICAgICAgICAgSGFuZGxlOlBhdGhuYW1lLiBFaXRoZXIgSGFuZGxlIG9yIFBhdGhuYW1lIGNhbiBiZSBOVUxMLCBidXQKKyAqICAgICAgICAgICAgICBub3QgYm90aC4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCithY3BpX3N0YXR1cyBhY3BpX3JlbGVhc2VfbXV0ZXgoYWNwaV9oYW5kbGUgaGFuZGxlLCBhY3BpX3N0cmluZyBwYXRobmFtZSkKK3sKKwlhY3BpX3N0YXR1cyBzdGF0dXM7CisJdW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqbXV0ZXhfb2JqOworCisJLyogR2V0IHRoZSBsb3ctbGV2ZWwgbXV0ZXggYXNzb2NpYXRlZCB3aXRoIEhhbmRsZTpQYXRobmFtZSAqLworCisJc3RhdHVzID0gYWNwaV91dF9nZXRfbXV0ZXhfb2JqZWN0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5kIHRoYXQgaGFzIGNvbXBsZXRlZC4KKyAqIEBkYXRhICAgUG9pbnRlciB0byBhIGNvbXBsZXRpb24gc3RydWN0dXJlLgorICogQHN0YXR1cyBDb21wbGV0aW9uIHN0YXR1cy4KKyAqCisgKiByZXR1cm4gdmFsdWUKKyAqCU5vbmUKKyAqLworc3RhdGljIHZvaWQgbXRpcF9jb21wbGV0aW9uKHN0cnVjdCBtdGlwX3BvcnQgKnBvcnQsCisJCQkgICAgaW50IHRhZywKKwkJCSAgICB2b2lkICpkYXRhLAorCQkJICAgIGludCBzdGF0dXMpCit7CisJc3RydWN0IG10aXBfY21kICpjb21tYW5kID0gJnBvcnQtPmNvbW1hbmRzW3RhZ107CisJc3RydWN0IGNvbXBsZXRpb24gKndhaXRpbmcgPSBkYXRhOworCWlmICh1bmxpa2VseShzdGF0dXMgPT0gUE9SVF9JUlFfVEZfRVJSKSkKKwkJZGV2X3dhcm4oJnBvcnQtPmRkLT5wZGV2LT5kZXYsCisJCQkiSW50ZXJuYWwgY29tbWFuZCAlZCBjb21wbGV0ZWQgd2l0aCBURkVcbiIsIHRhZyk7CisKKwljb21tYW5kLT5hc3luY19jYWxsYmFjayA9IE5VTEw7CisJY29tbWFuZC0+Y29tcF9mdW5jID0gTlVMTDsKKworCWNvbXBsZXRlKHdhaXRpbmcpOworfQorCisvKgorICogSGVscGVyIGZ1bmN0aW9uIGZvciB0YWcgbG9nZ2luZworICovCitzdGF0aWMgdm9pZCBwcmludF90YWdzKHN0cnVjdCBkcml2ZXJfZGF0YSAqZGQsCisJCQljaGFyICptc2csCisJCQl1bnNpZ25lZCBsb25nICp0YWdiaXRzKQoreworCXVuc2lnbmVkIGludCB0YWcsIGNvdW50ID0gMDsKKworCWZvciAodGFnID0gMDsgdGFnIDwgKGRkLT5zbG90X2dyb3VwcykgKiAzMjsgdGFnKyspIHsKKwkJaWYgKHRlc3RfYml0KHRhZywgdGFnYml0cykpCisJCQljb3VudCsrOworCX0KKwlpZiAoY291bnQp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X1FfREVQVEgsIGkpOworCQlpZiAoSVNfRVJSKGRldi0+cXVldWVzW2kgKyAxXSkpCisJCQlyZXR1cm4gUFRSX0VSUihkZXYtPnF1ZXVlc1tpICsgMV0pOworCQlkZXYtPnF1ZXVlX2NvdW50Kys7CisJfQorCisJZm9yICg7IGkgPCBudW1fcG9zc2libGVfY3B1cygpOyBpKyspIHsKKwkJaW50IHRhcmdldCA9IGkgJSByb3VuZGRvd25fcG93X29mX3R3byhkZXYtPnF1ZXVlX2NvdW50IC0gMSk7CisJCWRldi0+cXVldWVzW2kgKyAxXSA9IGRldi0+cXVldWVzW3RhcmdldCArIDFdOworCX0KKworCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBudm1lX2ZyZWVfcXVldWVzKHN0cnVjdCBudm1lX2RldiAqZGV2KQoreworCWludCBpOworCisJZm9yIChpID0gZGV2LT5xdWV1ZV9jb3VudCAtIDE7IGkgPj0gMDsgaS0tKQorCQludm1lX2ZyZWVfcXVldWUoZGV2LCBpKTsKK30KKworc3RhdGljIGludCBfX2RldmluaXQgbnZtZV9kZXZfYWRkKHN0cnVjdCBudm1lX2RldiAqZGV2KQoreworCWludCByZXMsIG5uLCBpOworCXN0cnVjdCBudm1lX25zICpucywgKm5leHQ7CisJc3RydWN0IG52bWVfaWRfY3RybCAqY3RybDsKKwlzdHJ1Y3QgbnZtZV9pZF9ucyAqaWRfbnM7CisJdm9pZCAqbWVtOworCWRtYV9hZGRyX3QgZG1hX2FkZHI7CisKKwlyZXMgPSBudm1lX3NldHVwX2lvX3F1ZXVlcyhkZXYpOworCWlmIChyZXMpCisJCXJldHVybiByZXM7CisKKwltZW0gPSBkbWFfYWxsb2NfY29oZXJlbnQoJmRldi0+cGNpX2Rldi0+ZGV2LCA4MTkyLCAmZG1hX2FkZHIsCisJCQkJCQkJCUdGUF9LRVJORUwpOworCisJcmVzID0gbnZtZV9pZGVudGlmeShkZXYsIDAsIDEsIGRtYV9hZGRyKTsKKwlpZiAocmVzKSB7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GVmaW5lIENNRF9GSUZPX0xPQUQgICAgICAgICAgICgweDA0IDw8IENNRF9TSElGVCkKLSNkZWZpbmUgQ01EX1NFUV9GSUZPX0xPQUQgICAgICAgKDB4MDUgPDwgQ01EX1NISUZUKQotI2RlZmluZSBDTURfU1RPUkUgICAgICAgICAgICAgICAoMHgwYSA8PCBDTURfU0hJRlQpCi0jZGVmaW5lIENNRF9TRVFfU1RPUkUgICAgICAgICAgICgweDBiIDw8IENNRF9TSElGVCkKLSNkZWZpbmUgQ01EX0ZJRk9fU1RPUkUgICAgICAgICAgKDB4MGMgPDwgQ01EX1NISUZUKQotI2RlZmluZSBDTURfU0VRX0ZJRk9fU1RPUkUgICAgICAoMHgwZCA8PCBDTURfU0hJRlQpCi0jZGVmaW5lIENNRF9NT1ZFX0xFTiAgICAgICAgICAgICgweDBlIDw8IENNRF9TSElGVCkKLSNkZWZpbmUgQ01EX01PVkUgICAgICAgICAgICAgICAgKDB4MGYgPDwgQ01EX1NISUZUKQotI2RlZmluZSBDTURfT1BFUkFUSU9OICAgICAgICAgICAoMHgxMCA8PCBDTURfU0hJRlQpCi0jZGVmaW5lIENNRF9TSUdOQVRVUkUgICAgICAgICAgICgweDEyIDw8IENNRF9TSElGVCkKLSNkZWZpbmUgQ01EX0pVTVAgICAgICAgICAgICAgICAgKDB4MTQgPDwgQ01EX1NISUZUKQotI2RlZmluZSBDTURfTUFUSCAgICAgICAgICAgICAgICAoMHgxNSA8PCBDTURfU0hJRlQpCi0jZGVmaW5lIENNRF9ERVNDX0hEUiAgICAgICAgICAgICgweDE2IDw8IENNRF9TSElGVCkKLSNkZWZpbmUgQ01EX1NIQVJFRF9ERVNDX0hEUiAgICAgKDB4MTcgPDwgQ01EX1NISUZUKQotI2RlZmluZSBDTURfU0VRX0lOX1BUUiAgICAgICAgICAoMHgxZSA8PCBDTURfU0hJRlQpCi0jZGVmaW5lIENNRF9TRVFfT1VUX1BUUiAgICAgICAgICgweDFmIDw8IENNRF9TSElGVCkKKy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ICAgICAweDAyMDEKLSNkZWZpbmUgT1BfUENMX1dJTUFYX09GRE1BICAgICAgICAgICAgICAgICAgICAgICAweDAyMzEKKyNkZWZpbmUgT1BfUENMX1dJTUFYX09GRE0JCQkgMHgwMjAxCisjZGVmaW5lIE9QX1BDTF9XSU1BWF9PRkRNQQkJCSAweDAyMzEKIAogLyogODAyLjExIFdpRmkgcHJvdGluZm9zICovCi0jZGVmaW5lIE9QX1BDTF9XSUZJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhhYzA0CisjZGVmaW5lIE9QX1BDTF9XSUZJCQkJCSAweGFjMDQKIAogLyogTWFjU2VjIHByb3RpbmZvcyAqLwotI2RlZmluZSBPUF9QQ0xfTUFDU0VDICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMQorI2RlZmluZSBPUF9QQ0xfTUFDU0VDCQkJCSAweDAwMDEKIAogLyogUEtJIHVuaWRpcmVjdGlvbmFsIHByb3RvY29sIHByb3RpbmZvIGJpdHMgKi8KLSNkZWZpbmUgT1BfUENMX1BLUFJPVF9URVNUICAgICAgICAgICAgICAgICAgICAgICAweDAwMDgKLSNkZWZpbmUgT1BfUENMX1BLUFJPVF9ERUNSWVBUICAgICAgICAgICAgICAgICAgICAweDAwMDQKLSNkZWZpbmUgT1BfUENMX1BLUFJPVF9FQ0MgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIKLSNkZWZpbmUgT1BfUENMX1BLUFJPVF9GMk0gICAgICAgICAgICAgICAgICAgICAgICAweDAwMDEKKyNkZWZpbmUgT1BfUENMX1BLUFJPVF9URVNUCQkJIDB4MDAwOAorI2RlZmluZSBPUF9QQ0xfUEtQUk9UX0RFQ1JZUFQJCQkgMHgwMDA0CisjZGVmaW5lIE9QX1BDTF9QS1BST1RfRUNDCQkJIDB4MDAwMgorI2RlZmluZSBPUF9QQ0xfUEtQUk9UX0YyTQkJCSAweDAwMDEKIAogLyogRm9yIG5vbi1wcm90b2NvbC9hbGctb25seSBvcCBj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bnV4L29mX2FkZHJlc3MuaD4KKyNpbmNsdWRlIDxsaW51eC9vZl9kZXZpY2UuaD4KKyNpbmNsdWRlIDxsaW51eC9vZl9wbGF0Zm9ybS5oPgorI2luY2x1ZGUgPGxpbnV4L3NpcmZzb2NfZG1hLmg+CisKKyNkZWZpbmUgU0lSRlNPQ19ETUFfREVTQ1JJUFRPUlMgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIQU5ORUxTICAgICAgICAgICAgICAgICAgICAxNgorCisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX0FERFIgICAgICAgICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX1hMRU4gICAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX1lMRU4gICAgICAgICAgICAgICAgICAgICAweDA4CisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX0NUUkwgICAgICAgICAgICAgICAgICAgICAweDBDCisKKyNkZWZpbmUgU0lSRlNPQ19ETUFfV0lEVEhfMCAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX1ZBTElEICAgICAgICAgICAgICAgICAgICAweDE0MAorI2RlZmluZSBTSVJGU09DX0RNQV9DSF9JTlQgICAgICAgICAgICAgICAgICAgICAgMHgxNDQKKyNkZWZpbmUgU0lSRlNPQ19ETUFfSU5UX0VOICAgICAgICAgICAgICAgICAgICAgIDB4MTQ4CisjZGVmaW5lIFNJUkZTT0NfRE1BX0NIX0xPT1BfQ1RSTCAgICAgICAgICAgICAgICAweDE1MAorCisjZGVmaW5lIFNJUkZTT0NfRE1BX01PREVfQ1RSTF9CSVQgICAgICAgICAgICAgICA0CisjZGVmaW5lIFNJUkZTT0NfRE1BX0RJUl9DVFJMX0JJVCAgICAgICAgICAgICAgICA1CisKKy8qIHhsZW4gYW5kIGRtYV93aWR0aCByZWdpc3RlciB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3BpbykKK3sKKwlpZiAoZ3Bpb19pc19tbXBfdHlwZShncGlvX3R5cGUpKQorCQlyZXR1cm4gTU1QX0dQSU9fVE9fSVJRKGdwaW8pOworCXJldHVybiAtMTsKK30KKworc3RhdGljIGlubGluZSBpbnQgX19tbXBfaXJxX3RvX2dwaW8oaW50IGlycSkKK3sKKwlpZiAoZ3Bpb19pc19tbXBfdHlwZShncGlvX3R5cGUpKQorCQlyZXR1cm4gaXJxIC0gTU1QX0dQSU9fVE9fSVJRKDApOworCXJldHVybiAtMTsKK30KKyNlbHNlCitzdGF0aWMgaW5saW5lIGludCBfX21tcF9ncGlvX3RvX2lycShpbnQgZ3BpbykgeyByZXR1cm4gLTE7IH0KK3N0YXRpYyBpbmxpbmUgaW50IF9fbW1wX2lycV90b19ncGlvKGludCBpcnEpIHsgcmV0dXJuIC0xOyB9CisjZW5kaWYKKworc3RhdGljIGludCBweGFfZ3Bpb190b19pcnEoc3RydWN0IGdwaW9fY2hpcCAqY2hpcCwgdW5zaWduZWQgb2Zmc2V0KQoreworCWludCBncGlvLCByZXQ7CisKKwlncGlvID0gY2hpcC0+YmFzZSArIG9mZnNldDsKKwlyZXQgPSBfX3B4YV9ncGlvX3RvX2lycShncGlvKTsKKwlpZiAocmV0ID49IDApCisJCXJldHVybiByZXQ7CisJcmV0dXJuIF9fbW1wX2dwaW9fdG9faXJxKGdwaW8pOworfQorCitpbnQgcHhhX2lycV90b19ncGlvKGludCBpcnEpCit7CisJaW50IHJldDsKKworCXJldCA9IF9fcHhhX2lycV90b19ncGlvKGlycSk7CisJaWYgKHJldCA+PSAwKQorCQlyZXR1cm4gcmV0OworCXJldHVybiBfX21tcF9pcnFfdG9fZ3BpbyhpcnEpOworfQorCiBzdGF0aWMgaW50IHB4YV9ncGlvX2RpcmVjdGlvbl9pbnB1dChzdHJ1Y3QgZ3Bpb19jaGlwICpjaGlwLCB1bnNpZ25lZCBvZmZzZXQpCiB7CiAJdm9pZCBfX2lvbWVtICpiYXNlID0g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mc7CisJaW50IGk7CisKKwlEUk1fREVCVUdfS01TKCJbJWRdICVzXG4iLCBfX0xJTkVfXywgX19mdW5jX18pOworCisJRFJNX0RFQlVHX0tNUygiWyVkXXhbJWRdIFslZF1IeiBbJXhdXG4iLCBjaGVja190aW1pbmctPnhyZXMsCisJCQljaGVja190aW1pbmctPnlyZXMsIGNoZWNrX3RpbWluZy0+cmVmcmVzaCwKKwkJCWNoZWNrX3RpbWluZy0+dm1vZGUpOworCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUoaGRtaV9jb25mcyk7ICsraSkKKwkJaWYgKGhkbWlfY29uZnNbaV0ud2lkdGggPT0gY2hlY2tfdGltaW5nLT54cmVzICYmCisJCQloZG1pX2NvbmZzW2ldLmhlaWdodCA9PSBjaGVja190aW1pbmctPnlyZXMgJiYKKwkJCWhkbWlfY29uZnNbaV0udnJlZnJlc2ggPT0gY2hlY2tfdGltaW5nLT5yZWZyZXNoICYmCisJCQloZG1pX2NvbmZzW2ldLmludGVybGFjZSA9PQorCQkJKChjaGVja190aW1pbmctPnZtb2RlICYgRkJfVk1PREVfSU5URVJMQUNFRCkgPworCQkJIHRydWUgOiBmYWxzZSkpCisJCQlyZXR1cm4gMDsKKworCXJldHVybiAtRUlOVkFMOworfQorCitzdGF0aWMgaW50IGhkbWlfZGlzcGxheV9wb3dlcl9vbih2b2lkICpjdHgsIGludCBtb2RlKQoreworCURSTV9ERUJVR19LTVMoIlslZF0gJXNcbiIsIF9fTElORV9fLCBfX2Z1bmNfXyk7CisKKwlzd2l0Y2ggKG1vZGUpIHsKKwljYXNlIERSTV9NT0RFX0RQTVNfT046CisJCURSTV9ERUJVR19LTVMoImhkbWkgW29uXVxuIik7CisJCWJyZWFrOworCWNhc2UgRFJNX01PREVfRFBNU19TVEFOREJZOgorCQlicmVhazsKKwljYXNlIERSTV9NT0RFX0RQTVNfU1VTUEVORDoKKwkJYnJlYWs7CisJY2FzZSBEUk1fTU9ERV9EUE1TX09GRjoKKw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VfXywgX19mdW5jX18pOworCisJY2xrX2Rpc2FibGUocmVzLT5taXhlcik7CisJY2xrX2Rpc2FibGUocmVzLT52cCk7CisJY2xrX2Rpc2FibGUocmVzLT5zY2xrX21peGVyKTsKK30KKworc3RhdGljIGludCBtaXhlcl9ydW50aW1lX3Jlc3VtZShzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisJc3RydWN0IGV4eW5vc19kcm1faGRtaV9jb250ZXh0ICpjdHggPSBnZXRfbWl4ZXJfY29udGV4dChkZXYpOworCisJRFJNX0RFQlVHX0tNUygicmVzdW1lIC0gc3RhcnRcbiIpOworCisJbWl4ZXJfcmVzb3VyY2VfcG93ZXJvbigoc3RydWN0IG1peGVyX2NvbnRleHQgKiljdHgtPmN0eCk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBtaXhlcl9ydW50aW1lX3N1c3BlbmQoc3RydWN0IGRldmljZSAqZGV2KQoreworCXN0cnVjdCBleHlub3NfZHJtX2hkbWlfY29udGV4dCAqY3R4ID0gZ2V0X21peGVyX2NvbnRleHQoZGV2KTsKKworCURSTV9ERUJVR19LTVMoInN1c3BlbmQgLSBzdGFydFxuIik7CisKKwltaXhlcl9yZXNvdXJjZV9wb3dlcm9mZigoc3RydWN0IG1peGVyX2NvbnRleHQgKiljdHgtPmN0eCk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGNvbnN0IHN0cnVjdCBkZXZfcG1fb3BzIG1peGVyX3BtX29wcyA9IHsKKwkucnVudGltZV9zdXNwZW5kID0gbWl4ZXJfcnVudGltZV9zdXNwZW5kLAorCS5ydW50aW1lX3Jlc3VtZQkgPSBtaXhlcl9ydW50aW1lX3Jlc3VtZSwKK307CisKK3N0YXRpYyBpbnQgX19kZXZpbml0IG1peGVyX3Jlc291cmNlc19pbml0KHN0cnVjdCBleHlub3NfZHJtX2hkbWlfY29udGV4dCAqY3R4LAorCQkJCSBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2K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RlZmluZSBzZXRfZGlzcGxheV9vZmYJCQkweDI4CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICpcCitUaGlzIGNvbW1hbmQgY2F1c2VzIHRoZSBkaXNwbGF5IG1vZHVsZSB0byBzdG9wIGRpc3BsYXlpbmcgdGhlIGltYWdlIGRhdGEKK29uIHRoZSBkaXNwbGF5IGRldmljZS4gVGhlIGZyYW1lIG1lbW9yeSBjb250ZW50cyByZW1haW4gdW5jaGFuZ2VkLgorTm8gc3RhdHVzIGJpdHMgYXJlIGNoYW5nZWQuCitcKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisjZGVmaW5lIHNldF9kaXNwbGF5X29uCQkJMHgyOQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqXAorVGhpcyBjb21tYW5kIGNhdXNlcyB0aGUgZGlzcGxheSBtb2R1bGUgdG8gc3RhcnQgZGlzcGxheWluZyB0aGUgaW1hZ2UgZGF0YQorb24gdGhlIGRpc3BsYXkgZGV2aWNlLiBUaGUgZnJhbWUgbWVtb3J5IGNvbnRlbnRzIHJlbWFpbiB1bmNoYW5nZWQuCitObyBzdGF0dXMgYml0cyBhcmUgY2hhbmdlZC4KK1wqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyNkZWZpbmUgc2V0X2NvbHVtbl9hZGRyZXNzCQkweDJhCisvKgorICoJVGhpcyBjb21tYW5kIGRlZmluZXMgdGhlIGNvbHVtbiBleHRlbnQgb2YgdGhlIGZyYW1lIG1lbW9yeSBhY2Nlc3NlZCBieQorICoJdGhlIGhvc3Rwcm9jZXNzb3Igd2l0aCB0aGU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QVNTCQkJMHgwOAorCisvKiBTb21lIGhhbmR5IG1hY3JvcyBmb3IgcGxheWluZyB3aXRoIGJpdGZpZWxkcy4gKi8KKyNkZWZpbmUgUFNCX01BU0soaGlnaCwgbG93KSAoKCgxPDwoKGhpZ2gpLShsb3cpKzEpKS0xKTw8KGxvdykpCisjZGVmaW5lIFNFVF9GSUVMRCh2YWx1ZSwgZmllbGQpICgoKHZhbHVlKSA8PCBmaWVsZCAjIyBfU0hJRlQpICYgZmllbGQgIyMgX01BU0spCisjZGVmaW5lIEdFVF9GSUVMRCh3b3JkLCBmaWVsZCkgKCgod29yZCkgICYgZmllbGQgIyMgX01BU0spID4+IGZpZWxkICMjIF9TSElGVCkKKworI2RlZmluZSBfUElQRShwaXBlLCBhLCBiKSAoKGEpICsgKHBpcGUpKigoYiktKGEpKSkKKworLyogUENJIGNvbmZpZyBzcGFjZSAqLworCisjZGVmaW5lIFNCX1BDS1QgICAgICAgICAweDAyMTAwIC8qIGNlZGFydmlldyAqLworIyBkZWZpbmUgU0JfT1BDT0RFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgUFNCX01BU0soMzEsIDE2KQorIyBkZWZpbmUgU0JfT1BDT0RFX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyMgZGVmaW5lIFNCX09QQ09ERV9SRUFEICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyMgZGVmaW5lIFNCX09QQ09ERV9XUklURSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyMgZGVmaW5lIFNCX0RFU1RfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgIFBTQl9NQVNLKDE1LCA4KQorIyBkZWZpbmUgU0JfREVTVF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgOAorIyBkZWZpbmUgU0JfREVTVF9EUExMICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OAorIyBkZWZpbmUgU0JfQllURV9FTkFCTEVfTUFTSyAgICAgICAgICAgICAgICAgICAgUFNC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CSAgJnN0YXR1cykpCisJCQlnb3RvIGxvZ19mYWlsOworCX0KKworCWlmIChzdGF0dXMgPD0gU0RWT19DTURfU1RBVFVTX1NDQUxJTkdfTk9UX1NVUFApCisJCURSTV9MT0dfS01TKCIoJXMpIiwgY21kX3N0YXR1c19uYW1lc1tzdGF0dXNdKTsKKwllbHNlCisJCURSTV9MT0dfS01TKCIoPz8/ICVkKSIsIHN0YXR1cyk7CisKKwlpZiAoc3RhdHVzICE9IFNEVk9fQ01EX1NUQVRVU19TVUNDRVNTKQorCQlnb3RvIGxvZ19mYWlsOworCisJLyogUmVhZCB0aGUgY29tbWFuZCByZXNwb25zZSAqLworCWZvciAoaSA9IDA7IGkgPCByZXNwb25zZV9sZW47IGkrKykgeworCQlpZiAoIXBzYl9pbnRlbF9zZHZvX3JlYWRfYnl0ZShwc2JfaW50ZWxfc2R2bywKKwkJCQkJICBTRFZPX0kyQ19SRVRVUk5fMCArIGksCisJCQkJCSAgJigodTggKilyZXNwb25zZSlbaV0pKQorCQkJZ290byBsb2dfZmFpbDsKKwkJRFJNX0xPR19LTVMoIiAlMDJYIiwgKCh1OCAqKXJlc3BvbnNlKVtpXSk7CisJfQorCURSTV9MT0dfS01TKCJcbiIpOworCXJldHVybiB0cnVlOworCitsb2dfZmFpbDoKKwlEUk1fTE9HX0tNUygiLi4uIGZhaWxlZFxuIik7CisJcmV0dXJuIGZhbHNlOworfQorCitzdGF0aWMgaW50IHBzYl9pbnRlbF9zZHZvX2dldF9waXhlbF9tdWx0aXBsaWVyKHN0cnVjdCBkcm1fZGlzcGxheV9tb2RlICptb2RlKQoreworCWlmIChtb2RlLT5jbG9jayA+PSAxMDAwMDApCisJCXJldHVybiAxOworCWVsc2UgaWYgKG1vZGUtPmNsb2NrID49IDUwMDAwKQorCQlyZXR1cm4gMjsKKwllbHNlCisJCXJldHVybiA0OworfQorCitzdGF0aWMgYm9vbCBwc2JfaW50ZWxfc2R2b19zZXRfY29udHJvbF9idXNfc3dpdGNoKHN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nbmVkIGludCBzZWNhbV82MDoxOworICAgIHVuc2lnbmVkIGludCBwYWQ6NTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSk7CisKK3N0cnVjdCBwc2JfaW50ZWxfc2R2b19zZHR2X3Jlc29sdXRpb25fcmVwbHkgeworICAgIHVuc2lnbmVkIGludCByZXNfMzIweDIwMDoxOworICAgIHVuc2lnbmVkIGludCByZXNfMzIweDI0MDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNDAweDMwMDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNjQweDM1MDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNjQweDQwMDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNjQweDQ4MDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNzA0eDQ4MDoxOworICAgIHVuc2lnbmVkIGludCByZXNfNzA0eDU3NjoxOworCisgICAgdW5zaWduZWQgaW50IHJlc183MjB4MzUwOjE7CisgICAgdW5zaWduZWQgaW50IHJlc183MjB4NDAwOjE7CisgICAgdW5zaWduZWQgaW50IHJlc183MjB4NDgwOjE7CisgICAgdW5zaWduZWQgaW50IHJlc183MjB4NTQwOjE7CisgICAgdW5zaWduZWQgaW50IHJlc183MjB4NTc2OjE7CisgICAgdW5zaWduZWQgaW50IHJlc183Njh4NTc2OjE7CisgICAgdW5zaWduZWQgaW50IHJlc184MDB4NjAwOjE7CisgICAgdW5zaWduZWQgaW50IHJlc184MzJ4NjI0OjE7CisKKyAgICB1bnNpZ25lZCBpbnQgcmVzXzkyMHg3NjY6MTsKKyAgICB1bnNpZ25lZCBpbnQgcmVzXzEwMjR4NzY4OjE7CisgICAgdW5zaWduZWQgaW50IHJlc18xMjgweDEwMjQ6MTsKKyAgICB1bnNpZ25lZCBpbnQgcGFkOjU7Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOworCisvKiBHZXQgc3VwcG9ydGVkIHJlc29sdXRpb24gd2l0aCBzcXVpcmUgcGl4ZWwgYXNwZWN0I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gMDIxMTAtMTMwMSBVU0EuCisgKgorICogSW50ZWwgZnVuZGVkIFR1bmdzdGVuIEdyYXBoaWNzIChodHRwOi8vd3d3LnR1bmdzdGVuZ3JhcGhpY3MuY29tKSB0bworICogZGV2ZWxvcCB0aGlzIGRyaXZlci4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKgorICovCisKKyNpbmNsdWRlIDxkcm0vZHJtUC5oPgorI2luY2x1ZGUgInBzYl9kcnYuaCIKKyNpbmNsdWRlICJwc2JfcmVnLmgiCisjaW5jbHVkZSAicHNiX2ludGVsX3JlZy5oIgorI2luY2x1ZGUgInBvd2VyLmgiCisKKy8qCisgKiBpbmxpbmUgZnVuY3Rpb25zCisgKi8KKworc3RhdGljIGlubGluZSB1MzIKK3BzYl9waXBlc3RhdChpbnQgcGlwZSkKK3sKKwlpZiAocGlwZSA9PSAwKQorCQlyZXR1cm4gUElQRUFTVEFUOworCWlmIChwaXBlID09IDEpCisJCXJldHVybiBQSVBFQlNUQVQ7CisJaWYgKHBpcGUgPT0gMikKKwkJcmV0dXJuIFBJUEVDU1RBVDsKKwlCVUcoKTsKK30KKworc3RhdGljIGlubGluZSB1MzIKK21pZF9waXBlX2V2ZW50KGludCBwaXBlKQoreworCWlmIChwaXBlID09IDApCisJCXJldHVybiBfUFNCX1BJUEVBX0VWRU5UX0ZMQUc7CisJaWYgKHBpcGUgPT0gMSkKKwkJcmV0dXJuIF9NREZMRF9QSVBFQl9FVkVOVF9GTEFHOworCWlmIChwaXBlID09IDIpCisJCXJldHVybiBfTURGTERfUElQRUNfRVZFTlRfRkxBRzsKKwlCVUcoKTsKK30KKworc3RhdGljIGlubGluZSB1MzIKK21pZF9waXBlX3ZzeW5jKGludCBwaXBlKQoreworCWlmIChwaXBlID09IDApCisJCXJldHVybiBfUFNCX1ZTWU5DX1BJUEVBX0ZMQUc7CisJaWYgKHBpcGUg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ICAoc3RydWN0IGRybV9wc2JfcHJpdmF0ZSAqKSBkZXYtPmRldl9wcml2YXRlOworCXVuc2lnbmVkIGxvbmcgaXJxZmxhZ3M7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmZGV2X3ByaXYtPmlycW1hc2tfbG9jaywgaXJxZmxhZ3MpOworCisJbWlkX2Rpc2FibGVfcGlwZV9ldmVudChkZXZfcHJpdiwgMCk7CisJcHNiX2lycV90dXJuX29mZl9kcHN0KGRldik7CisKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZkZXZfcHJpdi0+aXJxbWFza19sb2NrLCBpcnFmbGFncyk7CisKKwlyZXR1cm4gMDsKK30KKworI2lmZGVmIFBTQl9GSVhNRQorc3RhdGljIGludCBwc2JfdmJsYW5rX2RvX3dhaXQoc3RydWN0IGRybV9kZXZpY2UgKmRldiwKKwkJCSAgICAgIHVuc2lnbmVkIGludCAqc2VxdWVuY2UsIGF0b21pY190ICpjb3VudGVyKQoreworCXVuc2lnbmVkIGludCBjdXJfdmJsYW5rOworCWludCByZXQgPSAwOworCURSTV9XQUlUX09OKHJldCwgZGV2LT52YmxfcXVldWUsIDMgKiBEUk1fSFosCisJCSAgICAoKChjdXJfdmJsYW5rID0gYXRvbWljX3JlYWQoY291bnRlcikpCisJCSAgICAgIC0gKnNlcXVlbmNlKSA8PSAoMSA8PCAyMykpKTsKKwkqc2VxdWVuY2UgPSBjdXJfdmJsYW5rOworCisJcmV0dXJuIHJldDsKK30KKyNlbmRpZgorCisvKgorICogSXQgaXMgdXNlZCB0byBlbmFibGUgVkJMQU5LIGludGVycnVwdAorICovCitpbnQgcHNiX2VuYWJsZV92Ymxhbmsoc3RydWN0IGRybV9kZXZpY2UgKmRldiwgaW50IHBpcGUpCit7CisJc3RydWN0IGRybV9wc2JfcHJpdmF0ZSAqZGV2X3ByaXYgPSBkZXYtPmRldl9wcml2YXRlOworCXVuc2lnbmVkIGxvbmcgaXJxZmxhZ3M7CisJdWludDMyX3QgcmVn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dmRzLmMgYi9kcml2ZXJzL2dwdS9kcm0vaTkxNS9pbnRlbF9sdmRzLmMKaW5kZXggZTQ0MTkxMS4uYWE4NDgzMiAxMDA2NDQKLS0tIGEvZHJpdmVycy9ncHUvZHJtL2k5MTUvaW50ZWxfbHZkcy5jCisrKyBiL2RyaXZlcnMvZ3B1L2RybS9pOTE1L2ludGVsX2x2ZHMuYwpAQCAtNjk0LDYgKzY5NCwxNCBAQAogCX0sCiAJewogCQkuY2FsbGJhY2sgPSBpbnRlbF9ub19sdmRzX2RtaV9jYWxsYmFjaywKKyAgICAgICAgICAgICAgICAuaWRlbnQgPSAiQU9wZW4gaTQ1R014LUkiLAorICAgICAgICAgICAgICAgIC5tYXRjaGVzID0geworICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9CT0FSRF9WRU5ET1IsICJBT3BlbiIpLAorICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9CT0FSRF9OQU1FLCAiaTQ1R014LUkiKSwKKyAgICAgICAgICAgICAgICB9LAorICAgICAgICB9LAorCXsKKwkJLmNhbGxiYWNrID0gaW50ZWxfbm9fbHZkc19kbWlfY2FsbGJhY2ssCiAJCS5pZGVudCA9ICJBb3BlbiBpOTQ1R1R0LVZGQSIsCiAJCS5tYXRjaGVzID0gewogCQkJRE1JX01BVENIKERNSV9QUk9EVUNUX1ZFUlNJT04sICJBTzAwMDAxSlciKSwKQEAgLTcwOCw2ICs3MTYsMTQgQEAKIAkJfSwKIAl9LAogCXsKKyAgICAgICAgICAgICAgICAuY2FsbGJhY2sgPSBpbnRlbF9ub19sdmRzX2RtaV9jYWxsYmFjaywKKyAgICAgICAgICAgICAgICAuaWRlbnQgPSAiQ2xpZW50cm9uIEU4MzAiLAorICAgICAgICAgICAgICAgIC5tYXRjaGVzID0geworICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9TWVNfVkVORE9SLCAiQ2xpZW50cm9uIiksCisgICAgICAgICAgICAgIC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hdV9wZXJmLm8gbm91dmVhdV90ZW1wLm8gXAotCSAgICAgbm91dmVhdV9tbS5vIG5vdXZlYXVfdm0ubyBcCisJICAgICBub3V2ZWF1X21tLm8gbm91dmVhdV92bS5vIG5vdXZlYXVfbXhtLm8gbm91dmVhdV9ncGlvLm8gXAogICAgICAgICAgICAgIG52MDRfdGltZXIubyBcCiAgICAgICAgICAgICAgbnYwNF9tYy5vIG52NDBfbWMubyBudjUwX21jLm8gXAogICAgICAgICAgICAgIG52MDRfZmIubyBudjEwX2ZiLm8gbnYzMF9mYi5vIG52NDBfZmIubyBudjUwX2ZiLm8gbnZjMF9mYi5vIFwKQEAgLTE5LDkgKzE5LDEyIEBACiAgICAgICAgICAgICAgbnYwNF9ncmFwaC5vIG52MTBfZ3JhcGgubyBudjIwX2dyYXBoLm8gXAogICAgICAgICAgICAgIG52NDBfZ3JhcGgubyBudjUwX2dyYXBoLm8gbnZjMF9ncmFwaC5vIFwKICAgICAgICAgICAgICBudjQwX2dyY3R4Lm8gbnY1MF9ncmN0eC5vIG52YzBfZ3JjdHgubyBcCi0gICAgICAgICAgICAgbnY4NF9jcnlwdC5vIFwKKyAgICAgICAgICAgICBudjg0X2NyeXB0Lm8gbnY5OF9jcnlwdC5vIFwKICAgICAgICAgICAgICBudmEzX2NvcHkubyBudmMwX2NvcHkubyBcCiAgICAgICAgICAgICAgbnYzMV9tcGVnLm8gbnY1MF9tcGVnLm8gXAorICAgICAgICAgICAgIG52ODRfYnNwLm8gXAorICAgICAgICAgICAgIG52ODRfdnAubyBcCisgICAgICAgICAgICAgbnY5OF9wcHAubyBcCiAgICAgICAgICAgICAgbnYwNF9pbnN0bWVtLm8gbnY1MF9pbnN0bWVtLm8gbnZjMF9pbnN0bWVtLm8gXAogICAgICAgICAgICAgIG52MDRfZGFjLm8gbnYwNF9kZnAubyBudjA0X3R2Lm8gbnYxN190di5vIG52MTdfdHZfbW9kZXMubyBcCiAgICAgICAgICAgICAgbnYwNF9jcnRjLm8gbnY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dfREVQVEhfNkJQQywgIjYgYnBjIiB9LAorCXsgNiwgRElUSEVSSU5HX0RFUFRIXzhCUEMsICI4IGJwYyIgfSwKKwl7fQorfTsKKworI2RlZmluZSBQUk9QX0VOVU0ocCxnZW4sbixsaXN0KSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlzdHJ1Y3QgZHJtX3Byb3BfZW51bV9saXN0ICpsID0gKGxpc3QpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpbnQgYyA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl3aGlsZSAobC0+Z2VuX21hc2spIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKGwtPmdlbl9tYXNrICYgKDEgPDwgKGdlbikpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJYysrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJbCsrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWlmIChjKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlwID0gZHJtX3Byb3BlcnR5X2NyZWF0ZShkZXYsIERSTV9NT0RFX1BST1BfRU5VTSwgbiwgYyk7ICAgICAgICBcCisJCWwgPSAobGlzdCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJYyA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQl3aGlsZSAocCAmJiBsLT5nZW5fbWFzaykgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQlpZiAobC0+Z2VuX21hc2sgJiAoMSA8PCAoZ2VuKSkpIHsgICAgICAgICAgICAgICAgICAgICAgXAorCQkJCWRybV9wcm9wZXJ0eV9hZGRfZW51bShwLCBjLCBsLT50eXBlLCBsLT5uYW1lKTsgXAorCQkJCWMrKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJCWwrKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUoMCkKKworaW50Citub3V2ZWF1X2Rpc3BsYXlfaW5pdChzdHJ1Y3QgZHJtX2RldmljZSAqZGV2KQoreworCXN0cnVjdCBkcm1fbm91dmVhdV9wcml2YXRlICpkZXZfcHJpdiA9IGRldi0+ZGV2X3ByaXZhdGU7CisJc3RydWN0IG5vdXZlYXVfZGlzcGxheV9lbmdpbmUgKmRpc3AgPSAmZGV2X3ByaXYtPmVuZ2luZS5kaXNwbGF5OworCXN0cnVjdCBkcm1fY29ubmVjdG9yICpjb25uZWN0b3I7CisJaW50IHJldDsKKworCXJldCA9IGRpc3AtPmluaXQoZGV2KTsKKwlpZiAocmV0KQorCQlyZXR1cm4gcmV0OworCisJLyogcG93ZXIgb24gaW50ZXJuYWwgcGFuZWwgaWYgaXQncyBub3QgYWxyZWFkeS4gIHRoZSBpbml0IHRhYmxlcyBvZgorCSAqIHNvbWU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yczogQmVuIFNrZWdncworICovCisKKyNpbmNsdWRlIDxsaW51eC9hY3BpLmg+CisKKyNpbmNsdWRlICJkcm1QLmgiCisjaW5jbHVkZSAibm91dmVhdV9kcnYuaCIKKworI2RlZmluZSBNWE1fREJHKGRldiwgZm10LCBhcmdzLi4uKSBOVl9ERUJVRygoZGV2KSwgIk1YTTogIiBmbXQsICMjYXJncykKKyNkZWZpbmUgTVhNX01TRyhkZXYsIGZtdCwgYXJncy4uLikgTlZfSU5GTygoZGV2KSwgIk1YTTogIiBmbXQsICMjYXJncykKKworc3RhdGljIHU4ICoKK214bXNfZGF0YShzdHJ1Y3QgZHJtX2RldmljZSAqZGV2KQoreworCXN0cnVjdCBkcm1fbm91dmVhdV9wcml2YXRlICpkZXZfcHJpdiA9IGRldi0+ZGV2X3ByaXZhdGU7CisJcmV0dXJuIGRldl9wcml2LT5teG1zOworCit9CisKK3N0YXRpYyB1MTYKK214bXNfdmVyc2lvbihzdHJ1Y3QgZHJtX2RldmljZSAqZGV2KQoreworCXU4ICpteG1zID0gbXhtc19kYXRhKGRldik7CisJdTE2IHZlcnNpb24gPSAobXhtc1s0XSA8PCA4KSB8IG14bXNbNV07CisJc3dpdGNoICh2ZXJzaW9uICkgeworCWNhc2UgMHgwMjAwOgorCWNhc2UgMHgwMjAxOgorCWNhc2UgMHgwMzAwOgorCQlyZXR1cm4gdmVyc2lvbjsKKwlkZWZhdWx0OgorCQlicmVhazsKKwl9CisKKwlNWE1fREJHKGRldiwgInVua25vd24gdmVyc2lvbiAlZC4lZFxuIiwgbXhtc1s0XSwgbXhtc1s1XSk7CisJcmV0dXJuIDB4MDAwMDsKK30KKworc3RhdGljIHUxNgorbXhtc19oZWFkZXJsZW4oc3RydWN0IGRybV9kZXZpY2UgKmRldikKK3sKKwlyZXR1cm4gODsKK30KKworc3RhdGljIHUxNgorbXhtc19zdHJ1Y3RsZW4oc3RydWN0IGRybV9kZXZpY2UgKmRldikKK3sKKwlyZXR1cm4gKih1MTYgKik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VzZXR0aW5nLi4uXG4iLCBjdHJsKTsKKworCQkvKiBkZWFjdGl2YXRlIGJvdGggaGVhZHMgZmlyc3QsIFBESVNQIHdpbGwgZGlzYXBwZWFyIGZvcmV2ZXIKKwkJICogKHdlbGwsIHVudGlsIHlvdSBwb3dlciBjeWNsZSkgb24gc29tZSBib2FyZHMgYXMgc29vbiBhcworCQkgKiBQTUNfRU5BQkxFIGlzIGhpdCB1bmxlc3MgdGhleSBhcmUuLgorCQkgKi8KKwkJZm9yIChpID0gMDsgaSA8IDI7IGkrKykgeworCQkJZXZvX2ljbWQoZGV2LCAwLCAweDA4ODAgKyAoaSAqIDB4NDAwKSwgMHgwNTAwMDAwMCk7CisJCQlldm9faWNtZChkZXYsIDAsIDB4MDg5YyArIChpICogMHg0MDApLCAwKTsKKwkJCWV2b19pY21kKGRldiwgMCwgMHgwODQwICsgKGkgKiAweDQwMCksIDApOworCQkJZXZvX2ljbWQoZGV2LCAwLCAweDA4NDQgKyAoaSAqIDB4NDAwKSwgMCk7CisJCQlldm9faWNtZChkZXYsIDAsIDB4MDg1YyArIChpICogMHg0MDApLCAwKTsKKwkJCWV2b19pY21kKGRldiwgMCwgMHgwODc0ICsgKGkgKiAweDQwMCksIDApOworCQl9CisJCWV2b19pY21kKGRldiwgMCwgMHgwMDgwLCAwKTsKKworCQkvKiByZXNldCBQRElTUCAqLworCQludl9tYXNrKGRldiwgMHgwMDAyMDAsIDB4NDAwMDAwMDAsIDB4MDAwMDAwMDApOworCQludl9tYXNrKGRldiwgMHgwMDAyMDAsIDB4NDAwMDAwMDAsIDB4NDAwMDAwMDApOworCX0KKwogCXJldHVybiAwOwogfQogCkBAIC02MiwxMSArMTA2LDQwIEBACiB9CiAKIGludAotbnY1MF9kaXNwbGF5X2luaXQoc3RydWN0IGRybV9kZXZpY2UgKmRldikKK252NTBfZGlzcGxheV9zeW5jKHN0cnVjdCBkcm1fZGV2aWNlICpkZXYpCiB7CiAJc3RydWN0IGRybV9ub3V2ZWF1X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IoZGV2LCAweDAwNDAyYywgaW5mby0+bmNvZWYpOworCW52X21hc2soZGV2LCAweDAwYzA0MCwgMHgwMDEwMDAzMywgaW5mby0+ZW1hc3QpOworCisJZ290byByZXN1bWU7CitlcnJvcjoKKwlyZXQgPSAtRUJVU1k7CityZXN1bWU6CisJbnZfbWFzayhkZXYsIDB4MDAyNTA0LCAweDAwMDAwMDAxLCAweDAwMDAwMDAwKTsKKwlrZnJlZShpbmZvKTsKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgaW50Citwd21faW5mbyhzdHJ1Y3QgZHJtX2RldmljZSAqZGV2LCBpbnQgKmxpbmUsIGludCAqY3RybCwgaW50ICppbmR4KQoreworCWlmICgqbGluZSA9PSAweDA0KSB7CisJCSpjdHJsID0gMHgwMGUxMDA7CisJCSpsaW5lID0gNDsKKwkJKmluZHggPSAwOworCX0gZWxzZQorCWlmICgqbGluZSA9PSAweDA5KSB7CisJCSpjdHJsID0gMHgwMGUxMDA7CisJCSpsaW5lID0gOTsKKwkJKmluZHggPSAxOworCX0gZWxzZQorCWlmICgqbGluZSA9PSAweDEwKSB7CisJCSpjdHJsID0gMHgwMGUyOGM7CisJCSpsaW5lID0gMDsKKwkJKmluZHggPSAwOworCX0gZWxzZSB7CisJCU5WX0VSUk9SKGRldiwgInVua25vd24gcHdtIGN0cmwgZm9yIGdwaW8gJWRcbiIsICpsaW5lKTsKKwkJcmV0dXJuIC1FTk9ERVY7CisJfQorCisJcmV0dXJuIDA7Cit9CisKK2ludAorbnY1MF9wbV9wd21fZ2V0KHN0cnVjdCBkcm1fZGV2aWNlICpkZXYsIGludCBsaW5lLCB1MzIgKmRpdnMsIHUzMiAqZHV0eSkKK3sKKwlpbnQgY3RybCwgaWQsIHJldCA9IHB3bV9pbmZvKGRldiwgJmxpbmUsICZjdHJsLCAmaWQpOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisKKwlpZiAobnZfcmQzMihkZXYsIGN0cmwpICYgKDEgPDwgbGluZSkp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ZGUgICAgICAgICAgICAgIH4weDAwMDAwZmZmCi0uYjMyIGN0eF9zcmNfeHNpemUgICAgICAgICAgICAgICAgICB+MHgwMDA3ZmZmZgotLmIzMiBjdHhfc3JjX3lzaXplICAgICAgICAgICAgICAgICAgfjB4MDAwMDFmZmYKLS5iMzIgY3R4X3NyY196c2l6ZSAgICAgICAgICAgICAgICAgIH4weDAwMDAwN2ZmCi0uYjMyIGN0eF9zcmNfem9mZiAgICAgICAgICAgICAgICAgICB+MHgwMDAwMGZmZgotLmIzMiBjdHhfc3JjX3hvZmYgICAgICAgICAgICAgICAgICAgfjB4MDAwN2ZmZmYKLS5iMzIgY3R4X3NyY195b2ZmICAgICAgICAgICAgICAgICAgIH4weDAwMDAxZmZmCisuYjMyICNjdHhfc3JjX3RpbGVfbW9kZSAgICAgICAgICAgICAgfjB4MDAwMDBmZmYKKy5iMzIgI2N0eF9zcmNfeHNpemUgICAgICAgICAgICAgICAgICB+MHgwMDA3ZmZmZgorLmIzMiAjY3R4X3NyY195c2l6ZSAgICAgICAgICAgICAgICAgIH4weDAwMDAxZmZmCisuYjMyICNjdHhfc3JjX3pzaXplICAgICAgICAgICAgICAgICAgfjB4MDAwMDA3ZmYKKy5iMzIgI2N0eF9zcmNfem9mZiAgICAgICAgICAgICAgICAgICB+MHgwMDAwMGZmZgorLmIzMiAjY3R4X3NyY194b2ZmICAgICAgICAgICAgICAgICAgIH4weDAwMDdmZmZmCisuYjMyICNjdHhfc3JjX3lvZmYgICAgICAgICAgICAgICAgICAgfjB4MDAwMDFmZmYKIC8vIG10aGQgMHgwMjIwLTB4MDIzOCwgRFNUX1RJTEUKIC5iMTYgMHg4OCA3Ci0uYjMyIGN0eF9kc3RfdGlsZV9tb2RlICAgICAgICAgICAgICB+MHgwMDAwMGZmZgotLmIzMiBjdHhfZHN0X3hzaXplICAgICAgICAgICAgICAgICAgfjB4MDAwN2ZmZmYKLS5iMzIgY3R4X2RzdF95c2l6ZSAgICAgICAgICAgICAgICAgIH4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KKyAgICAgICAgIGJyYSBuZSAjY21wX2MxCiAgICAgICAgICAgICBtb3YgJHIxMiAweDEwCiAgICAgICAgICAgICBhZGQgYjMyICRyMTIgJHIxMQotICAgICAgICAgICAgYnJhIGJwY19uZXh0CisgICAgICAgICAgICBicmEgI2JwY19uZXh0CiAgICAgICAgICBjbXBfYzE6CiAgICAgICAgICBjbXB1IGI4ICRyMTAgNgotICAgICAgICAgYnJhIG5jIGNtcF96ZXJvCisgICAgICAgICBicmEgbmMgI2NtcF96ZXJvCiAgICAgICAgICAgICBtb3YgJHIxMiAweDE0CiAgICAgICAgICAgICBhZGQgYjMyICRyMTIgJHIxMQotICAgICAgICAgICAgYnJhIGJwY19uZXh0CisgICAgICAgICAgICBicmEgI2JwY19uZXh0CiAgICAgICAgICBjbXBfemVybzoKICAgICAgICAgICAgIG1vdiAkcjEyIDB4ODAKICAgICAgICAgIGJwY19uZXh0OgpAQCAtNDcxLDIyICs0NzMsMjIgQEAKICAgICAgICAgIGFkZCBiMzIgJHI4IDEKICAgICAgICAgIGFkZCBiMzIgJHIxMSAxCiAgICAgICAgICBjbXB1IGIzMiAkcjExICRyNQotICAgICAgICAgYnJhIGMgYnBjX2xvb3AKKyAgICAgICAgIGJyYSBjICNicGNfbG9vcAogICAgICAgYWRkIGIzMiAkcjkgMQogICAgICAgY21wdSBiMzIgJHI5ICRyNwotICAgICAgYnJhIGMgbmNvbXBfbG9vcAorICAgICAgYnJhIGMgI25jb21wX2xvb3AKIAogICAgLy8gU1JDX1hDTlQgPSAoeGNudCAqIHNyY19jcHApLCBvciAwIGlmIG5vIHNyYyByZWYgaW4gc3d6IChodyB3aWxsIGhhbmcpCiAgICBtdWx1ICRyNiAkcjUKLSAgIHN0IGIzMiBEWyRyMCArIGN0eF9zcmNfY3BwXSAkcjYKLSAgIGxkIGIzMiAkcjggRFskcjAgKyBjdHhfeGNudF0KKyAgIHN0IGIzMiBEWyRyMCArICNjdHhfc3JjX2NwcF0gJHI2CisgICBsZCBiM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cnVjdCBldm8geworCWludCBpZHg7CisJZG1hX2FkZHJfdCBoYW5kbGU7CisJdTMyICpwdHI7CisJc3RydWN0IHsKKwkJdTMyIG9mZnNldDsKKwkJdTE2IHZhbHVlOworCX0gc2VtOworfTsKKwogc3RydWN0IG52ZDBfZGlzcGxheSB7CiAJc3RydWN0IG5vdXZlYXVfZ3B1b2JqICptZW07Ci0Jc3RydWN0IHsKLQkJZG1hX2FkZHJfdCBoYW5kbGU7Ci0JCXUzMiAqcHRyOwotCX0gZXZvWzFdOworCXN0cnVjdCBub3V2ZWF1X2JvICpzeW5jOworCXN0cnVjdCBldm8gZXZvWzldOwogCiAJc3RydWN0IHRhc2tsZXRfc3RydWN0IHRhc2tsZXQ7CiAJdTMyIG1vZGVzZXQ7CkBAIC01Myw2ICs3NSwxNSBAQAogCXJldHVybiBkZXZfcHJpdi0+ZW5naW5lLmRpc3BsYXkucHJpdjsKIH0KIAorc3RhdGljIHN0cnVjdCBkcm1fY3J0YyAqCitudmQwX2Rpc3BsYXlfY3J0Y19nZXQoc3RydWN0IGRybV9lbmNvZGVyICplbmNvZGVyKQoreworCXJldHVybiBub3V2ZWF1X2VuY29kZXIoZW5jb2RlciktPmNydGM7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEVWTyBjaGFubmVsIGhlbHBlcnMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyBpbmxpbmUgaW50CiBldm9faWNtZChzdHJ1Y3QgZHJtX2RldmljZSAqZGV2LCBpbnQgaWQsIHUzMiBtdGhkLCB1MzIgZGF0YSkKIHsKQEAgLTg0LDYgKzExNSw5IEBACiAJCXB1dCA9IDA7CiAJfQogCisJaWYgKG5vdXZlYXVfcmVnX2RlYnVnICYgTk9VVkVBVV9S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gKmRldiwgaW50IGNoKQogewotCXJldHVybiBub3V2ZWF1X2VuY29kZXIoZW5jb2RlciktPmNydGM7CisJc3RydWN0IG52ZDBfZGlzcGxheSAqZGlzcCA9IG52ZDBfZGlzcGxheShkZXYpOworCXUzMiBmbGFnczsKKworCWZsYWdzID0gMHgwMDAwMDAwMDsKKwlpZiAoY2ggPT0gRVZPX01BU1RFUikKKwkJZmxhZ3MgfD0gMHgwMTAwMDAwMDsKKworCW52X3dyMzIoZGV2LCAweDYxMDQ5NCArIChjaCAqIDB4MDAxMCksIChkaXNwLT5ldm9bY2hdLmhhbmRsZSA+PiA4KSB8IDMpOworCW52X3dyMzIoZGV2LCAweDYxMDQ5OCArIChjaCAqIDB4MDAxMCksIDB4MDAwMTAwMDApOworCW52X3dyMzIoZGV2LCAweDYxMDQ5YyArIChjaCAqIDB4MDAxMCksIDB4MDAwMDAwMDEpOworCW52X21hc2soZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCksIDB4MDAwMDAwMTAsIDB4MDAwMDAwMTApOworCW52X3dyMzIoZGV2LCAweDY0MDAwMCArIChjaCAqIDB4MTAwMCksIDB4MDAwMDAwMDApOworCW52X3dyMzIoZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCksIDB4MDAwMDAwMTMgfCBmbGFncyk7CisJaWYgKCFudl93YWl0KGRldiwgMHg2MTA0OTAgKyAoY2ggKiAweDAwMTApLCAweDgwMDAwMDAwLCAweDAwMDAwMDAwKSkgeworCQlOVl9FUlJPUihkZXYsICJQRElTUDogY2glZCAweCUwOHhcbiIsIGNoLAorCQkJICAgICAgbnZfcmQzMihkZXYsIDB4NjEwNDkwICsgKGNoICogMHgwMDEwKSkpOworCQlyZXR1cm4gLUVCVVNZOworCX0KKworCW52X21hc2soZGV2LCAweDYxMDA5MCwgKDEgPDwgY2gpLCAoMSA8PCBjaCkpOworCW52X21hc2soZGV2LCAweDYxMDBhMCwgKDEgPDwgY2gpLCAoMSA8PCBjaCkpO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AgICBudl9yZDMyKGRldiwgMHg2MTA0OTAgKyAoY2ggKiAweDAwMTApKSk7CisJCXJldHVybiAtRUJVU1k7CisJfQorCisJbnZfbWFzayhkZXYsIDB4NjEwMDkwLCAoMSA8PCBjaCksICgxIDw8IGNoKSk7CisJbnZfbWFzayhkZXYsIDB4NjEwMGEwLCAoMSA8PCBjaCksICgxIDw8IGNoKSk7CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkCitldm9fZmluaV9waW8oc3RydWN0IGRybV9kZXZpY2UgKmRldiwgaW50IGNoKQoreworCWlmICghKG52X3JkMzIoZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCkpICYgMHgwMDAwMDAwMSkpCisJCXJldHVybjsKKworCW52X21hc2soZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCksIDB4MDAwMDAwMTAsIDB4MDAwMDAwMTApOworCW52X21hc2soZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCksIDB4MDAwMDAwMDEsIDB4MDAwMDAwMDApOworCW52X3dhaXQoZGV2LCAweDYxMDQ5MCArIChjaCAqIDB4MDAxMCksIDB4MDAwMTAwMDAsIDB4MDAwMDAwMDApOworCW52X21hc2soZGV2LCAweDYxMDA5MCwgKDEgPDwgY2gpLCAweDAwMDAwMDAwKTsKKwludl9tYXNrKGRldiwgMHg2MTAwYTAsICgxIDw8IGNoKSwgMHgwMDAwMDAwMCk7Cit9CisKK3N0YXRpYyBib29sCitldm9fc3luY193YWl0KHZvaWQgKmRhdGEpCit7CisJcmV0dXJuIG5vdXZlYXVfYm9fcmQzMihkYXRhLCBFVk9fTUFTVF9OVEZZKSAhPSAweDAwMDAwMDAwOworfQorCitzdGF0aWMgaW50Citldm9fc3luYyhzdHJ1Y3QgZHJtX2RldmljZSAqZGV2LCBpbnQgY2gpCit7CisJc3RydWN0IG52ZDBfZGlzcGxheSAqZGlzcCA9IG52ZDBfZGlzcGxheShkZXYpOworCXUzMiAqcHVzaCA9IGV2b193YWl0KGRldiwgY2gsIDgpOworCWlmIChwdXNoKSB7CisJCW5vdXZlYXVfYm9fd3IzMihkaXNwLT5zeW5jLCBFVk9fTUFTVF9OVEZZLCAweDAwMDAwMDAwKTsKKwkJZXZvX210aGQocHVzaCwgMHgwMDg0LCAxKTsKKwkJZXZvX2RhdGEocHVzaCwgMHg4MDAwMDAwMCB8IEVWT19NQVNUX05URlkpOworCQlldm9fbXRoZChwdXNoLCAweDAwODAsIDIpOworCQlldm9fZGF0YShwdXNoLCAweDAwMDAwMDAwKTsKKwkJZXZvX2RhdGEocHVzaCwgMHgwMDAwMDAwMCk7CisJCWV2b19raWNrKHB1c2gsIGRldiwgY2gpOworCQlpZiAobnZfd2FpdF9jYihkZXYsIGV2b19zeW5jX3dhaXQsIGRpc3AtPnN5bmMpKQorCQkJcmV0dXJuIDA7CisJfQorCisJcmV0dXJuIC1FQlVTWTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUGFnZSBmbGlwcGluZyBjaGFubmVsCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3Qgbm91dmVhdV9ibyAqCitudmQwX2Rpc3BsYXlfY3J0Y19zZW1hKHN0cnVjdCBkcm1fZGV2aWNlICpkZXYsIGludCBjcnRjKQoreworCXJldHVybiBudmQwX2Rpc3BsYXkoZGV2KS0+c3luYzsKK30KKwordm9pZAorbnZkMF9kaXNwbGF5X2ZsaXBfc3RvcChzdHJ1Y3QgZHJtX2NydGMgKmNydGMpCit7CisJc3RydWN0IG52ZDBfZGlzcGxheSAqZGlzcCA9IG52ZDBfZGlzcGxheShjcnRjLT5kZXYpOworCXN0cnVjdCBub3V2ZWF1X2NydGMgKm52X2NydGMgPSBub3V2ZWF1X2NydGMoY3J0Yyk7CisJ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19tdGhkKHB1c2gsIDB4MDQwMCwgNSk7CisJZXZvX2RhdGEocHVzaCwgbnZfZmItPm52Ym8tPmJvLm9mZnNldCA+PiA4KTsKKwlldm9fZGF0YShwdXNoLCAwKTsKKwlldm9fZGF0YShwdXNoLCAoZmItPmhlaWdodCA8PCAxNikgfCBmYi0+d2lkdGgpOworCWV2b19kYXRhKHB1c2gsIG52X2ZiLT5yX3BpdGNoKTsKKwlldm9fZGF0YShwdXNoLCBudl9mYi0+cl9mb3JtYXQpOworCWV2b19tdGhkKHB1c2gsIDB4MDA4MCwgMSk7CisJZXZvX2RhdGEocHVzaCwgMHgwMDAwMDAwMCk7CisJZXZvX2tpY2socHVzaCwgY3J0Yy0+ZGV2LCBldm8tPmlkeCk7CisKKwlldm8tPnNlbS5vZmZzZXQgXj0gMHgxMDsKKwlldm8tPnNlbS52YWx1ZSsrOworCXJldHVybiAwOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBDUlRDCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgaW50Ci1udmQwX2NydGNfc2V0X2RpdGhlcihzdHJ1Y3Qgbm91dmVhdV9jcnRjICpudl9jcnRjLCBib29sIG9uLCBib29sIHVwZGF0ZSkKK252ZDBfY3J0Y19zZXRfZGl0aGVyKHN0cnVjdCBub3V2ZWF1X2NydGMgKm52X2NydGMsIGJvb2wgdXBkYXRlKQogewogCXN0cnVjdCBkcm1fZGV2aWNlICpkZXYgPSBudl9jcnRjLT5iYXNlLmRldjsKLQl1MzIgKnB1c2gsIG1vZGU7CisJc3RydWN0IG5vdXZlYXVfY29ubmVjdG9yICpudl9jb25uZWN0b3I7CisJc3RydWN0IGRybV9jb25uZWN0b3IgKmNvbm5lY3RvcjsKKwl1MzIgKnB1c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0+Y3J0YykgewogCQludmQwX2NydGNfcHJlcGFyZShudl9lbmNvZGVyLT5jcnRjKTsKIAotCQlwdXNoID0gZXZvX3dhaXQoZGV2LCAwLCA0KTsKKwkJcHVzaCA9IGV2b193YWl0KGRldiwgRVZPX01BU1RFUiwgNCk7CiAJCWlmIChwdXNoKSB7CiAJCQlldm9fbXRoZChwdXNoLCAweDAxODAgKyAobnZfZW5jb2Rlci0+b3IgKiAweDIwKSwgMSk7CiAJCQlldm9fZGF0YShwdXNoLCAweDAwMDAwMDAwKTsKIAkJCWV2b19tdGhkKHB1c2gsIDB4MDA4MCwgMSk7CiAJCQlldm9fZGF0YShwdXNoLCAweDAwMDAwMDAwKTsKLQkJCWV2b19raWNrKHB1c2gsIGRldiwgMCk7CisJCQlldm9fa2ljayhwdXNoLCBkZXYsIEVWT19NQVNURVIpOwogCQl9CiAKIAkJbnZfZW5jb2Rlci0+Y3J0YyA9IE5VTEw7CkBAIC03NjAsNiArMTA3OSwxMDggQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogQXVkaW8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkCitudmQwX2F1ZGlvX21vZGVfc2V0KHN0cnVjdCBkcm1fZW5jb2RlciAqZW5jb2Rlciwgc3RydWN0IGRybV9kaXNwbGF5X21vZGUgKm1vZGUpCit7CisJc3RydWN0IG5vdXZlYXVfZW5jb2RlciAqbnZfZW5jb2RlciA9IG5vdXZlYXVfZW5jb2RlcihlbmNvZGVyKTsKKwlzdHJ1Y3Qgbm91dmVhdV9jb25uZWN0b3IgKm52X2Nvbm5lY3RvcjsKKwlzdHJ1Y3QgZHJtX2RldmljZSAqZGV2ID0gZW5jb2Rlci0+ZGV2OworCWludCBpLCBvciA9I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CAweDgwMDAwMDAwKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogSERNSQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQKK252ZDBfaGRtaV9tb2RlX3NldChzdHJ1Y3QgZHJtX2VuY29kZXIgKmVuY29kZXIsIHN0cnVjdCBkcm1fZGlzcGxheV9tb2RlICptb2RlKQoreworCXN0cnVjdCBub3V2ZWF1X2VuY29kZXIgKm52X2VuY29kZXIgPSBub3V2ZWF1X2VuY29kZXIoZW5jb2Rlcik7CisJc3RydWN0IG5vdXZlYXVfY3J0YyAqbnZfY3J0YyA9IG5vdXZlYXVfY3J0YyhlbmNvZGVyLT5jcnRjKTsKKwlzdHJ1Y3Qgbm91dmVhdV9jb25uZWN0b3IgKm52X2Nvbm5lY3RvcjsKKwlzdHJ1Y3QgZHJtX2RldmljZSAqZGV2ID0gZW5jb2Rlci0+ZGV2OworCWludCBoZWFkID0gbnZfY3J0Yy0+aW5kZXggKiAweDgwMDsKKwl1MzIgcmVrZXkgPSA1NjsgLyogYmluYXJ5IGRyaXZlciwgYW5kIHRlZ3JhIGNvbnN0YW50ICovCisJdTMyIG1heF9hY19wYWNrZXQ7CisKKwludl9jb25uZWN0b3IgPSBub3V2ZWF1X2VuY29kZXJfY29ubmVjdG9yX2dldChudl9lbmNvZGVyKTsKKwlpZiAoIWRybV9kZXRlY3RfaGRtaV9tb25pdG9yKG52X2Nvbm5lY3Rvci0+ZWRpZCkpCisJCXJldHVybjsKKworCW1heF9hY19wYWNrZXQgID0gbW9kZS0+aHRvdGFsIC0gbW9kZS0+aGRpc3BsYXk7CisJbWF4X2FjX3BhY2tldCAtPSByZWtleTsKKwltYXhfYWNfcGFja2V0IC09IDE4OyAvKiBjb25zdGFudCBmcm9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bW9kZV9zZXQoZW5jb2RlciwgbW9kZSk7Cit9CisKK3N0YXRpYyB2b2lkCitudmQwX2hkbWlfZGlzY29ubmVjdChzdHJ1Y3QgZHJtX2VuY29kZXIgKmVuY29kZXIpCit7CisJc3RydWN0IG5vdXZlYXVfZW5jb2RlciAqbnZfZW5jb2RlciA9IG5vdXZlYXVfZW5jb2RlcihlbmNvZGVyKTsKKwlzdHJ1Y3Qgbm91dmVhdV9jcnRjICpudl9jcnRjID0gbm91dmVhdV9jcnRjKG52X2VuY29kZXItPmNydGMpOworCXN0cnVjdCBkcm1fZGV2aWNlICpkZXYgPSBlbmNvZGVyLT5kZXY7CisJaW50IGhlYWQgPSBudl9jcnRjLT5pbmRleCAqIDB4ODAwOworCisJbnZkMF9hdWRpb19kaXNjb25uZWN0KGVuY29kZXIpOworCisJbnZfbWFzayhkZXYsIDB4NjE2Nzk4ICsgaGVhZCwgMHg0MDAwMDAwMCwgMHgwMDAwMDAwMCk7CisJbnZfbWFzayhkZXYsIDB4NjE2N2E0ICsgaGVhZCwgMHgwMDAwMDAwMSwgMHgwMDAwMDAwMCk7CisJbnZfbWFzayhkZXYsIDB4NjE2NzE0ICsgaGVhZCwgMHgwMDAwMDAwMSwgMHgwMDAwMDAwMCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFNPUgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHZvaWQKQEAgLTgyOSw3ICsxMjUwLDggQEAKIG52ZDBfc29yX21vZGVfc2V0KHN0cnVjdCBkcm1fZW5jb2RlciAqZW5jb2Rlciwgc3RydWN0IGRybV9kaXNwbGF5X21vZGUgKnVtb2RlLAogCQkgIHN0cnVjdCBkcm1fZGlzcGxheV9tb2RlICptb2RlKQogewotCXN0cnVjd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HB1c2gsIGRldiwgRVZPX01BU1RFUik7CiAJCX0KIAorCQludmQwX2hkbWlfZGlzY29ubmVjdChlbmNvZGVyKTsKKwogCQludl9lbmNvZGVyLT5jcnRjID0gTlVMTDsKIAkJbnZfZW5jb2Rlci0+bGFzdF9kcG1zID0gRFJNX01PREVfRFBNU19PRkY7CiAJfQpAQCAtMTE1OSw2ICsxNTg1LDEyIEBACiAJc3RydWN0IG52ZDBfZGlzcGxheSAqZGlzcCA9IG52ZDBfZGlzcGxheShkZXYpOwogCXUzMiBpbnRyID0gbnZfcmQzMihkZXYsIDB4NjEwMDg4KTsKIAorCWlmIChpbnRyICYgMHgwMDAwMDAwMSkgeworCQl1MzIgc3RhdCA9IG52X3JkMzIoZGV2LCAweDYxMDA4Yyk7CisJCW52X3dyMzIoZGV2LCAweDYxMDA4Yywgc3RhdCk7CisJCWludHIgJj0gfjB4MDAwMDAwMDE7CisJfQorCiAJaWYgKGludHIgJiAweDAwMDAwMDAyKSB7CiAJCXUzMiBzdGF0ID0gbnZfcmQzMihkZXYsIDB4NjEwMDljKTsKIAkJaW50IGNoaWQgPSBmZnMoc3RhdCkgLSAxOwpAQCAtMTIxNSwzOCArMTY0NywyOSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogSW5pdAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIHZvaWQKK3ZvaWQKIG52ZDBfZGlzcGxheV9maW5pKHN0cnVjdCBkcm1fZGV2aWNlICpkZXYpCiB7CiAJaW50IGk7CiAKLQkvKiBmaW5pIGN1cnNvcnMgKi8KLQlmb3IgKGkgPSAxNDsgaSA+PSAxMzsgaS0tKSB7Ci0JCWlmICghKG52X3JkMzIoZGV2LCAweDYxMDQ5MCArIChpICogMHgxMCkpICYgMHgwMDA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CAgICAgICAgICAgICAgICAgICAgICAgIDB4MjgyNDAKICNkZWZpbmUgUEFfU0NfV0lORE9XX1NDSVNTT1JfVEwgICAgICAgICAgICAgICAgICAgICAgICAgMHgyODIwNAotI2RlZmluZSBWR1RfUFJJTUlUSVZFX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg5NTgKIAorI2RlZmluZSBWR1RfUFJJTUlUSVZFX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg5NTgKKyNkZWZpbmUgVkdUX0lOREVYX1RZUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OTVDCisKKyNkZWZpbmUgVkdUX05VTV9JTkRJQ0VTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OTcwCisKKyNkZWZpbmUgVkdUX0NPTVBVVEVfRElNX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OTkwCisjZGVmaW5lIFZHVF9DT01QVVRFX0RJTV9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODk5NAorI2RlZmluZSBWR1RfQ09NUFVURV9ESU1fWiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg5OTgKKyNkZWZpbmUgVkdUX0NPTVBVVEVfU1RBUlRfWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OTlDCisjZGVmaW5lIFZHVF9DT01QVVRFX1NUQVJUX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODlBMAorI2RlZmluZSBWR1RfQ09NUFVURV9TVEFSVF9aICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg5QTQKKyNkZWZpbmUgVkdUX0NPTVBVVEVfSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4OUE4CisjZGVmaW5lIFZHVF9DT01QVVRFX1RIUkVBRF9HUk9VUF9TSVpFICAgICAgICAgICAgICAgICAgIDB4ODlBQworI2RlZmluZSBWR1RfSFNfT0ZGQ0hJUF9QQVJBTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDg5QjAKKworI2RlZmluZSBEQl9ERUJVRwkJCQkJMHg5ODMwCisjZGVmaW5lIERCX0RFQlVHMgkJCQkJMHg5ODM0CisjZGVmaW5lIERCX0RFQlVHMwkJCQkJMHg5ODM4CisjZGVmaW5lIERCX0RFQlVHNAkJCQkJMHg5ODNDCisjZGVmaW5lIERCX1dBVEVSTUFSS1MJCQkJCTB4OTg1NAogI2RlZmluZSBEQl9ERVBUSF9DT05UUk9MCQkJCTB4Mjg4MDAKICNkZWZpbmUgREJfREVQVEhfVklFVwkJCQkJMHgyODAwOAogI2RlZmluZSBEQl9IVElMRV9EQVRBX0JBU0UJCQkJMHgyODAxNApAQCAtMTE4OSw4ICsxMjE5LDQwIEBACiAjZGVmaW5lIFNRX1ZUWF9DT05TVEFOVF9XT1JENl8wICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwMTgKICNkZWZpbmUgU1FfVlRYX0NPTlNUQU5UX1dPUkQ3XzAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAxYwogCisjZGVmaW5lIFREX1BTX0JPUkRFUl9DT0xPUl9JTkRFWCAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQwMAorI2RlZmluZSBURF9QU19CT1JERVJfQ09MT1JfUkVEICAgICAgICAgICAgICAgICAgICAgICAgICAweEE0MDQKKyNkZWZpbmUgVERfUFNfQk9SREVSX0NPTE9SX0dSRUVOICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDA4CisjZGVmaW5lIFREX1BTX0JPUkRFUl9DT0xPUl9CTFVFICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQwQworI2RlZmluZSBURF9QU19CT1JERVJfQ09MT1JfQUxQSEEgICAgICAgICAgICAgICAgICAgICAgICAweEE0MTAKKyNkZWZpbmUgVERfVlNfQk9SREVSX0NPTE9SX0lOREVYICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDE0CisjZGVmaW5lIFREX1ZTX0JPUkRFUl9DT0xPUl9SRUQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQxOAorI2RlZmluZSBURF9WU19CT1JERVJfQ09MT1JfR1JFRU4gICAgICAgICAgICAgICAgICAgICAgICAweEE0MUMKKyNkZWZpbmUgVERfVlNfQk9SREVSX0NPTE9SX0JMVUUgICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDIwCisjZGVmaW5lIFREX1ZTX0JPUkRFUl9DT0xPUl9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQyNAorI2RlZmluZSBURF9HU19CT1JERVJfQ09MT1JfSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAweEE0MjgKKyNkZWZpbmUgVERfR1NfQk9SREVSX0NPTE9SX1JFRCAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDJDCisjZGVmaW5lIFREX0dTX0JPUkRFUl9DT0xPUl9HUkVFTiAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQzMAorI2RlZmluZSBURF9HU19CT1JERVJfQ09MT1JfQkxVRSAgICAgICAgICAgICAgICAgICAgICAgICAweEE0MzQKKyNkZWZpbmUgVERfR1NfQk9SREVSX0NPTE9SX0FMUEhBICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDM4CisjZGVmaW5lIFREX0hTX0JPUkRFUl9DT0xPUl9JTkRFWCAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQzQworI2RlZmluZSBURF9IU19CT1JERVJfQ09MT1JfUkVEICAgICAgICAgICAgICAgICAgICAgICAgICAweEE0NDAKKyNkZWZpbmUgVERfSFNfQk9SREVSX0NPTE9SX0dSRUVOICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDQ0CisjZGVmaW5lIFREX0hTX0JPUkRFUl9DT0xPUl9CTFVFICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQ0OAorI2RlZmluZSBURF9IU19CT1JERVJfQ09MT1JfQUxQSEEgICAgICAgICAgICAgICAgICAgICAgICAweEE0NEMKKyNkZWZpbmUgVERfTFNfQk9SREVSX0NPTE9SX0lOREVYICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDUwCisjZGVmaW5lIFREX0xTX0JPUkRFUl9DT0xPUl9SRUQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQ1NAorI2RlZmluZSBURF9MU19CT1JERVJfQ09MT1JfR1JFRU4gICAgICAgICAgICAgICAgICAgICAgICAweEE0NTgKKyNkZWZpbmUgVERfTFNfQk9SREVSX0NPTE9SX0JMVUUgICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDVDCisjZGVmaW5lIFREX0xTX0JPUkRFUl9DT0xPUl9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQ2MAorI2RlZmluZSBURF9DU19CT1JERVJfQ09MT1JfSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAweEE0NjQKKyNkZWZpbmUgVERfQ1NfQk9SREVSX0NPTE9SX1JFRCAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDY4CisjZGVmaW5lIFREX0NTX0JPUkRFUl9DT0xPUl9HUkVFTiAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQ2QworI2RlZmluZSBURF9DU19CT1JERVJfQ09MT1JfQkxVRSAgICAgICAgICAgICAgICAgICAgICAgICAweEE0NzAKKyNkZWZpbmUgVERfQ1NfQk9SREVSX0NPTE9SX0FMUEhBICAgICAgICAgICAgICAgICAgICAgICAgMHhBNDc0CisKIC8qIGNheW1hbiAzRCByZWdzICovCi0jZGVmaW5lIENBWU1BTl9WR1RfT0ZGQ0hJUF9MRFNfQkFTRQkJCTB4ODlCMAorI2RlZmluZSBDQVlNQU5fVkdUX09GRkNISVBfTERTX0JBU0UJCQkweDg5QjQKKyNkZWZpbmUgQ0FZTUFOX1NRX0VYX0FMTE9DX1RBQkxFX1NMT1RTCQkJMHg4RTQ4CiAjZGVmaW5lIENBWU1BTl9EQl9FUUFBCQkJCQkweDI4ODA0CiAjZGVmaW5lIENBW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3MocmRldiwgYm9fdmEtPnZtLCBib192YS0+ZmxhZ3MpOworCWZvciAoaSA9IDAsIGFkZHIgPSAwOyBpIDwgbmdwdV9wYWdlczsgaSsrKSB7CisJCWlmIChtZW0gJiYgYm9fdmEtPnZhbGlkKSB7CisJCQlhZGRyID0gcmFkZW9uX3ZtX2dldF9hZGRyKHJkZXYsIG1lbSwgaSk7CisJCX0KKwkJcmRldi0+dm1fbWFuYWdlci5mdW5jcy0+c2V0X3BhZ2UocmRldiwgYm9fdmEtPnZtLCBpICsgcGZuLCBhZGRyLCBmbGFncyk7CisJfQorCXJkZXYtPnZtX21hbmFnZXIuZnVuY3MtPnRsYl9mbHVzaChyZGV2LCBib192YS0+dm0pOworCXJldHVybiAwOworfQorCisvKiBvYmplY3QgaGF2ZSB0byBiZSByZXNlcnZlZCAqLworaW50IHJhZGVvbl92bV9ib19ybXYoc3RydWN0IHJhZGVvbl9kZXZpY2UgKnJkZXYsCisJCSAgICAgc3RydWN0IHJhZGVvbl92bSAqdm0sCisJCSAgICAgc3RydWN0IHJhZGVvbl9ibyAqYm8pCit7CisJc3RydWN0IHJhZGVvbl9ib192YSAqYm9fdmE7CisKKwlib192YSA9IHJhZGVvbl9ib192YShibywgdm0pOworCWlmIChib192YSA9PSBOVUxMKQorCQlyZXR1cm4gMDsKKworCW11dGV4X2xvY2soJnZtLT5tdXRleCk7CisJcmFkZW9uX211dGV4X2xvY2soJnJkZXYtPmNzX211dGV4KTsKKwlyYWRlb25fdm1fYm9fdXBkYXRlX3B0ZShyZGV2LCB2bSwgYm8sIE5VTEwpOworCXJhZGVvbl9tdXRleF91bmxvY2soJnJkZXYtPmNzX211dGV4KTsKKwlsaXN0X2RlbCgmYm9fdmEtPnZtX2xpc3QpOworCW11dGV4X3VubG9jaygmdm0tPm11dGV4KTsKKwlsaXN0X2RlbCgmYm9fdmEtPmJvX2xpc3QpOworCisJa2ZyZWUoYm9fdmEpOworCXJldHVybiAwOworfQorCit2b2lkIHJhZGVvbl92b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mVwb3J0X2FicyhleHQtPm1wX2lucHV0LCBBQlNfUlosIHopOworCWlucHV0X3N5bmMoZXh0LT5tcF9pbnB1dCk7CisKKwlwbHVnZ2VkID0gcGF5bG9hZFs1XSAmIDB4MDE7CisJaWYgKHBsdWdnZWQgIT0gZXh0LT5tcF9wbHVnZ2VkKQorCQlleHQtPm1wX3BsdWdnZWQgPSBwbHVnZ2VkOworfQorCitzdGF0aWMgdm9pZCBoYW5kbGVyX251bmNodWNrKHN0cnVjdCB3aWltb3RlX2V4dCAqZXh0LCBjb25zdCBfX3U4ICpwYXlsb2FkKQoreworCV9fczE2IHgsIHksIHosIGJ4LCBieTsKKworCS8qICAgQnl0ZSB8ICAgOCAgICA3IHwgIDYgICAgNSB8ICA0ICAgIDMgfCAgMiB8ICAxICB8CisJICogICAtLS0tLSstLS0tLS0tLS0tKy0tLS0tLS0tLSstLS0tLS0tLS0rLS0tLSstLS0tLSsKKwkgKiAgICAxICAgfCAgICAgICAgICAgICAgQnV0dG9uIFggPDc6MD4gICAgICAgICAgICAgfAorCSAqICAgIDIgICB8ICAgICAgICAgICAgICBCdXR0b24gWSA8NzowPiAgICAgICAgICAgICB8CisJICogICAtLS0tLSstLS0tLS0tLS0tKy0tLS0tLS0tLSstLS0tLS0tLS0rLS0tLSstLS0tLSsKKwkgKiAgICAzICAgfCAgICAgICAgICAgICAgIFNwZWVkIFggPDk6Mj4gICAgICAgICAgICAgfAorCSAqICAgIDQgICB8ICAgICAgICAgICAgICAgU3BlZWQgWSA8OToyPiAgICAgICAgICAgICB8CisJICogICAgNSAgIHwgICAgICAgICAgICAgICBTcGVlZCBaIDw5OjI+ICAgICAgICAgICAgIHwKKwkgKiAgIC0tLS0tKy0tLS0tLS0tLS0rLS0tLS0tLS0tKy0tLS0tLS0tLSstLS0tKy0tLS0tKworCSAqICAgIDYgICB8IFogPDE6MD4gIHwgWSA8MTowPiB8IFggPDE6MD4gfCBCQyB8IEJaICB8CisJICogICAtLS0tLSstLS0tLS0tL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ZWhmLmMKaW5kZXggOTNmNWZjNy4uYTY1OGQ2MiAxMDA2NDQKLS0tIGEvZHJpdmVycy9od21vbi93ODM2MjdlaGYuYworKysgYi9kcml2ZXJzL2h3bW9uL3c4MzYyN2VoZi5jCkBAIC0zOSw3ICszOSw3IEBACiAJCQkJCSAgICAgICAweDg4NjAgMHhhMQogICAgIHc4MzYyN2RoZyAgICA5ICAgICAgNSAgICAgICA0ICAgICAgIDMgICAgICAweGEwMjAgMHhjMSAgICAweDVjYTMKICAgICB3ODM2MjdkaGctcCAgOSAgICAgIDUgICAgICAgNCAgICAgICAzICAgICAgMHhiMDcwIDB4YzEgICAgMHg1Y2EzCi0gICAgdzgzNjI3dWhnICAgIDggICAgICAyICAgICAgIDIgICAgICAgMiAgICAgIDB4YTIzMCAweGMxICAgIDB4NWNhMworICAgIHc4MzYyN3VoZyAgICA4ICAgICAgMiAgICAgICAyICAgICAgIDMgICAgICAweGEyMzAgMHhjMSAgICAweDVjYTMKICAgICB3ODM2NjdoZyAgICAgOSAgICAgIDUgICAgICAgMyAgICAgICAzICAgICAgMHhhNTEwIDB4YzEgICAgMHg1Y2EzCiAgICAgdzgzNjY3aGctYiAgIDkgICAgICA1ICAgICAgIDMgICAgICAgNCAgICAgIDB4YjM1MCAweGMxICAgIDB4NWNhMwogICAgIG5jdDY3NzVmICAgICA5ICAgICAgNCAgICAgICAzICAgICAgIDkgICAgICAweGI0NzAgMHhjMSAgICAweDVjYTMKQEAgLTkzNyw3ICs5MzcsNyBAQAogCWludCBuciA9IHNlbnNvcl9hdHRyLT5pbmRleDsgXAogCXVuc2lnbmVkIGxvbmcgdmFsOyBcCiAJaW50IGVycjsgXAotCWVyciA9IHN0cmljdF9zdHJ0b3VsKGJ1ZiwgMTAsICZ2YWwpOyBcCisJZXJyID0ga3N0cnRvdWwoYnVmLCAxMCwgJnZhbCk7IFwKIAlpZiAoZXJyIDwgMCkgXAogCQlyZXR1cm4gZXJyOyBcCiAJbXV0ZXhfbG9jaygm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pbmUgVENBNjUwN19MU19MRURfUFdNMQkweDMJLyogT3V0cHV0IExPVyB3aXRoIEJhbmsxIHJhdGUgKi8KKyNkZWZpbmUgVENBNjUwN19MU19MRURfT04JMHg0CS8qIE91dHB1dCBMT1cgKG9uKSAqLworI2RlZmluZSBUQ0E2NTA3X0xTX0xFRF9NSVIJMHg1CS8qIE91dHB1dCBMT1cgd2l0aCBNYXN0ZXIgSW50ZW5zaXR5ICovCisjZGVmaW5lIFRDQTY1MDdfTFNfQkxJTkswCTB4NgkvKiBCbGluayBhdCBCYW5rMCByYXRlICovCisjZGVmaW5lIFRDQTY1MDdfTFNfQkxJTksxCTB4NwkvKiBCbGluayBhdCBCYW5rMSByYXRlICovCisKK2VudW0geworCUJBTkswLAorCUJBTksxLAorCU1BU1RFUiwKK307CitzdGF0aWMgaW50IGJhbmtfc291cmNlWzNdID0geworCVRDQTY1MDdfTFNfTEVEX1BXTTAsCisJVENBNjUwN19MU19MRURfUFdNMSwKKwlUQ0E2NTA3X0xTX0xFRF9NSVIsCit9Oworc3RhdGljIGludCBibGlua19zb3VyY2VbMl0gPSB7CisJVENBNjUwN19MU19CTElOSzAsCisJVENBNjUwN19MU19CTElOSzEsCit9OworCisvKiBQV00gcmVnaXN0ZXJzICovCisjZGVmaW5lCVRDQTY1MDdfUkVHX0NOVAkJCTExCisKKy8qCisgKiAweDAwLCAweDAxLCAweDAyIGVuY29kZSB0aGUgVENBNjUwN19MU18qIHZhbHVlcywgZWFjaCBvdXRwdXQKKyAqIG93bnMgb25lIGJpdCBpbiBlYWNoIHJlZ2lzdGVyCisgKi8KKyNkZWZpbmUJVENBNjUwN19GQURFX09OCQkJMHgwMworI2RlZmluZQlUQ0E2NTA3X0ZVTExfT04JCQkweDA0CisjZGVmaW5lCVRDQTY1MDdfRkFERV9PRkYJCTB4MDUKKyNkZWZpbmUJVENBNjUwN19GSVJTVF9PRkYJCTB4MDYKKyNkZWZpbmUJVENBNjUwN19TRUNPTkRfT0ZGCQkweDA3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G9mIHRoZSBNVDIwNjMuCisgKi8KK2VudW0gTVQyMDYzX01hc2tfQml0cyB7CisJTVQyMDYzX1JFR19TRCA9IDB4MDA0MCwJCS8qIFNodXRkb3duIHJlZ3VsYXRvciAgICAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfU1JPX1NEID0gMHgwMDIwLAkJLyogU2h1dGRvd24gU1JPICAgICAgICAgICAgICAgICAgICAgICAqLworCU1UMjA2M19BRkNfU0QgPSAweDAwMTAsCQkvKiBTaHV0ZG93biBBRkMgQS9EICAgICAgICAgICAgICAgICAgICovCisJTVQyMDYzX1BEX1NEID0gMHgwMDAyLAkJLyogRW5hYmxlIHBvd2VyIGRldGVjdG9yIHNodXRkb3duICAgICAqLworCU1UMjA2M19QREFEQ19TRCA9IDB4MDAwMSwJLyogRW5hYmxlIHBvd2VyIGRldGVjdG9yIEEvRCBzaHV0ZG93biAqLworCU1UMjA2M19WQ09fU0QgPSAweDgwMDAsCQkvKiBFbmFibGUgVkNPIHNodXRkb3duICAgICAgICAgICAgICAgICovCisJTVQyMDYzX0xUWF9TRCA9IDB4NDAwMCwJCS8qIEVuYWJsZSBMVFggc2h1dGRvd24gICAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfTFQxX1NEID0gMHgyMDAwLAkJLyogRW5hYmxlIExUMSBzaHV0ZG93biAgICAgICAgICAgICAgICAqLworCU1UMjA2M19MTkFfU0QgPSAweDEwMDAsCQkvKiBFbmFibGUgTE5BIHNodXRkb3duICAgICAgICAgICAgICAgICovCisJTVQyMDYzX1VQQ19TRCA9IDB4MDgwMCwJCS8qIEVuYWJsZSB1cGNvbnZlcnRlciBzaHV0ZG93biAgICAgICAgKi8KKwlNVDIwNjNfRE5DX1NEID0gMHgwNDAwLAkJLyogRW5hYmxlIGRvd25jb252ZXJ0ZXIgc2h1dGRvd24gICAgICAqLworCU1UMjA2M19WR0FfU0QgPSAweDAyMDAsCQkvKiBFbmFibGUgVkdBIHNodXRkb3duICAgICAgICAgICAgICAg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QkvKiAgMHgxMzogVGVtcCBTdGF0dXMgICAgICAgICAgICovCisJTVQyMDYzX1JFR19YT19TVEFUVVMsCQkvKiAgMHgxNDogQ3J5c3RhbCBTdGF0dXMgICAgICAgICovCisJTVQyMDYzX1JFR19SRl9TVEFUVVMsCQkvKiAgMHgxNTogUkYgQXR0biBTdGF0dXMgICAgICAgICovCisJTVQyMDYzX1JFR19GSUZfU1RBVFVTLAkJLyogIDB4MTY6IEZJRiBBdHRuIFN0YXR1cyAgICAgICAqLworCU1UMjA2M19SRUdfTE5BX09WLAkJLyogIDB4MTc6IExOQSBBdHRuIE92ZXJyaWRlICAgICAqLworCU1UMjA2M19SRUdfUkZfT1YsCQkvKiAgMHgxODogUkYgQXR0biBPdmVycmlkZSAgICAgICovCisJTVQyMDYzX1JFR19GSUZfT1YsCQkvKiAgMHgxOTogRklGIEF0dG4gT3ZlcnJpZGUgICAgICovCisJTVQyMDYzX1JFR19MTkFfVEdULAkJLyogIDB4MUE6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUEQxX1RHVCwJCS8qICAweDFCOiBQd3IgRGV0IDEgVGFyZ2V0ICAgICAgKi8KKwlNVDIwNjNfUkVHX1BEMl9UR1QsCQkvKiAgMHgxQzogUHdyIERldCAyIFRhcmdldCAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzFELAkJLyogIDB4MUQ6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8xRSwJCS8qICAweDFFOiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfMUYsCQkvKiAgMHgxRjogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzIwLAkJLyogIDB4MjA6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfQllQX0NUUkwsCQkvKiAgMHgyMTogQnlwYXNzIENvbnRyb2wgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzIyLAkJLyogIDB4MjI6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8yMywJCS8qICAweDIzOiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfMjQsCQkvKiAgMHgyNDogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzI1LAkJLyogIDB4MjU6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8yNiwJCS8qICAweDI2OiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfMjcsCQkvKiAgMHgyNzogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19GSUZGX0NUUkwsCQkvKiAgMHgyODogRklGRiBDb250cm9sICAgICAgICAgICovCisJTVQyMDYzX1JFR19GSUZGX09GRlNFVCwJCS8qICAweDI5OiBGSUZGIE9mZnNldCAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX0NUVU5FX0NUUkwsCQkvKiAgMHgyQTogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19DVFVORV9PViwJCS8qICAweDJCOiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX0NUUkxfMkMsCQkvKiAgMHgyQzogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19GSUZGX0NUUkwyLAkJLyogIDB4MkQ6IEZpZmYgQ29udHJvbCAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8yRSwJCS8qICAweDJFOiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX0ROQ19HQUlOLAkJLyogIDB4MkY6IEROQyBDb250cm9sICAgICAgICAgICAqLworCU1UMjA2M19SRUdfVkdBX0dBSU4sCQkvKiAgMHgzMDogVkdBIEdhaW4gQ3RybCAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzMxLAkJLyogIDB4MzE6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfVEVNUF9TRUwsCQkvKiAgMHgzMjogVGVtcGVyYXR1cmUgU2VsZWN0aW9uICovCisJTVQyMDYzX1JFR19SU1ZEXzMzLAkJLyogIDB4MzM6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8zNCwJCS8qICAweDM0OiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfMzUsCQkvKiAgMHgzNTogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzM2LAkJLyogIDB4MzY6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8zNywJCS8qICAweDM3OiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfMzgsCQkvKiAgMHgzODogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzM5LAkJLyogIDB4Mzk6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfUlNWRF8zQSwJCS8qICAweDNBOiBSZXNlcnZlZCAgICAgICAgICAgICAgKi8KKwlNVDIwNjNfUkVHX1JTVkRfM0IsCQkvKiAgMHgzQjogUmVzZXJ2ZWQgICAgICAgICAgICAgICovCisJTVQyMDYzX1JFR19SU1ZEXzNDLAkJLyogIDB4M0M6IFJlc2VydmVkICAgICAgICAgICAgICAqLworCU1UMjA2M19SRUdfRU5EX1JFR1MKK307CisKK3N0cnVjdCBtdDIwNjNfc3RhdGUgeworCXN0cnVjdCBpMmNfYWRhcHRlciAqaTJjOworCisJYm9vbCBpbml0OworCisJY29uc3Qgc3RydWN0IG10MjA2M19jb25maWcg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RiBmaWx0ZXIgICovCisJaWYgKChmX21heCA+IChwQVNfSW5mby0+Zl9pZjFfQ2VudGVyIC0gKHBBU19JbmZvLT5mX2lmMV9idyAvIDIpKSkKKwkgICAgJiYgKGZfbWluIDwgKHBBU19JbmZvLT5mX2lmMV9DZW50ZXIgKyAocEFTX0luZm8tPmZfaWYxX2J3IC8gMikpKQorCSAgICAmJiAoZl9taW4gPCBmX21heCkpIHsKKwkJLyoKKwkJICogICAgICAgICAgICAgICAgMSAgICAgICAgMiAgICAgICAgIDMgICAgICA0ICAgICAgIDUgICAgICAgIDYKKwkJICoKKwkJICogICBOZXcgZW50cnk6ICB8LS0tfCAgICB8LS18ICAgICAgfC0tfCAgICB8LXwgICAgfC0tLXwgICAgfC0tfAorCQkgKiAgICAgICAgICAgICAgICBvciAgICAgICBvciAgICAgICAgb3IgICAgIG9yICAgICAgb3IKKwkJICogICBFeGlzdGluZzogIHwtLXwgICAgICB8LS18ICAgICAgfC0tfCAgICB8LS0tfCAgfC18ICAgICAgfC0tfAorCQkgKi8KKworCQkvKiAgQ2hlY2sgZm9yIG91ciBwbGFjZSBpbiB0aGUgbGlzdCAgKi8KKwkJd2hpbGUgKChwTm9kZSAhPSBOVUxMKSAmJiAocE5vZGUtPm1heF8gPCBmX21pbikpIHsKKwkJCXBQcmV2ID0gcE5vZGU7CisJCQlwTm9kZSA9IHBOb2RlLT5uZXh0XzsKKwkJfQorCisJCWlmICgocE5vZGUgIT0gTlVMTCkgJiYgKHBOb2RlLT5taW5fIDwgZl9tYXgpKSB7CisJCQkvKiAgQ29tYmluZSBtZSB3aXRoIHBOb2RlICAqLworCQkJaWYgKGZfbWluIDwgcE5vZGUtPm1pbl8pCisJCQkJcE5vZGUtPm1pbl8gPSBmX21pbjsKKwkJCWlmIChmX21heCA+IHBOb2RlLT5tYXhfKQorCQkJCXBOb2RlLT5tYXhfID0gZl9tYXg7CisJCX0gZWxzZSB7CisJCQlwTm9kZSA9IEluc2VydE5vZGUocEFTX0luZm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lc1tpXS5tYXhfKSA8IGFicyhiZXN0RGlmZikpCisJCQliZXN0RGlmZiA9IHpvbmVzW2ldLm1heF87CisJfQorCisJaWYgKGJlc3REaWZmIDwgMCkKKwkJcmV0dXJuIGZfQ2VudGVyIC0gKCh1MzIpICgtYmVzdERpZmYpICogZl9TdGVwKTsKKworCXJldHVybiBmX0NlbnRlciArIChiZXN0RGlmZiAqIGZfU3RlcCk7Cit9CisKKy8qKgorICogZ2NkKCkgLSBVc2VzIEV1Y2xpZCdzIGFsZ29yaXRobQorICoKKyAqIEB1LCBAdjoJVW5zaWduZWQgdmFsdWVzIHdob3NlIEdDRCBpcyBkZXNpcmVkLgorICoKKyAqIFJldHVybnMgVEhFIGdyZWF0ZXN0IGNvbW1vbiBkaXZpc29yIG9mIHUgYW5kIHYsIGlmIGVpdGhlciB2YWx1ZSBpcyAwLAorICogdGhlIG90aGVyIHZhbHVlIGlzIHJldHVybmVkIGFzIHRoZSByZXN1bHQuCisgKi8KK3N0YXRpYyB1MzIgTVQyMDYzX2djZCh1MzIgdSwgdTMyIHYpCit7CisJdTMyIHI7CisKKwl3aGlsZSAodiAhPSAwKSB7CisJCXIgPSB1ICUgdjsKKwkJdSA9IHY7CisJCXYgPSByOworCX0KKworCXJldHVybiB1OworfQorCisvKioKKyAqIElzU3B1ckluQmFuZCgpIC0gQ2hlY2tzIHRvIHNlZSBpZiBhIHNwdXIgd2lsbCBiZSBwcmVzZW50IHdpdGhpbiB0aGUgSUYncworICogICAgICAgICAgICAgICAgICBiYW5kd2lkdGguIChmSUZPdXQgKy8tIGZJRkJXLCAtZklGT3V0ICsvLSBmSUZCVykKKyAqCisgKiAgICAgICAgICAgICAgICAgICAgbWEgICBtYiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYyAgIG1kCisgKiAgICAgICAgICAgICAgICAgIDwtLSstKy0rLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tKy0rLSstLT4KKyAqICAgICAgICAgICAgICAgICAgICAgfCAgIF4gICAgICAgICAgICAgICAgICAgMCAgICAgICAgICAgICAgICAgICBeICAgfAorICogICAgICAgICAgICAgICAgICAgICBeICAgYj0tZklGT3V0K2ZJRkJXLzIgICAgICAtYj0rZklGT3V0LWZJRkJXLzIgICBeCisgKiAgICAgICAgICAgICAgICAgICAgIGE9LWZJRk91dC1mSUZCVy8yICAgICAgICAgICAgICAtYT0rZklGT3V0K2ZJRkJXLzIKKyAqCisgKiAgICAgICAgICAgICAgICAgIE5vdGUgdGhhdCBzb21lIGVxdWF0aW9ucyBhcmUgZG91YmxlZCB0byBwcmV2ZW50IHJvdW5kLW9mZgorICogICAgICAgICAgICAgICAgICBwcm9ibGVtcyB3aGVuIGNhbGN1bGF0aW5nIGZJRkJXLzIKKyAqCisgKiBAcEFTX0luZm86CUF2b2lkIFNwdXJzIGluZm9ybWF0aW9uIGJsb2NrCisgKiBAZm06CQlJZiBzcHVyLCBhbW91bnQgZl9JRjEgaGFzIHRvIG1vdmUgbmVnYXRpdmUKKyAqIEBmcDoJCUlmIHNwdXIsIGFtb3VudCBmX0lGMSBoYXMgdG8gbW92ZSBwb3NpdGl2ZQorICoKKyAqICBSZXR1cm5zIDEgaWYgYW4gTE8gc3B1ciB3b3VsZCBiZSBwcmVzZW50LCBvdGhlcndpc2UgMC4KKyAqLworc3RhdGljIHUzMiBJc1NwdXJJbkJhbmQoc3RydWN0IE1UMjA2M19Bdm9pZFNwdXJzRGF0YV90ICpwQVNfSW5mbywKKwkJCXUzMiAqZm0sIHUzMiAqIGZwKQoreworCS8qCisJICoqICBDYWxjdWxhdGUgTE8gZnJlcXVlbmN5IHNldHRpbmdzLgorCSAqLworCXUzMiBuLCBuMDsKKwljb25zdCB1MzIgZl9MTzEgPSBwQVNfSW5mby0+Zl9MTzE7CisJY29uc3QgdTMyIGZfTE8yID0gcEFTX0luZm8tPmZfTE8yOworCWNvbnN0IHUzMiBkID0gcEFTX0luZm8tPmZfb3V0ICsg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KworCQltYiA9IChuICogKChmX0xPMSArIGhnY3MpIC8gZ2NfU2NhbGUpICsKKwkJICAgICAgKChjICsgaGdjcykgLyBnY19TY2FsZSkpIC8gKChmX0xPMiArIGhnY3MpIC8gZ2NfU2NhbGUpOworCQlpZiAobWEgIT0gbWIpIHsKKwkJCWZfbnNMTzEgPSBuICogKGZfTE8xIC8gZ2NfU2NhbGUpOworCQkJZl9uc0xPMiA9IG1hICogKGZfTE8yIC8gZ2NfU2NhbGUpOworCQkJZl9TcHVyID0KKwkJCSAgICAoZ2NfU2NhbGUgKiAoZl9uc0xPMSAtIGZfbnNMTzIpKSArCisJCQkgICAgbiAqIChmX0xPMSAlIGdjX1NjYWxlKSAtIG1hICogKGZfTE8yICUgZ2NfU2NhbGUpOworCisJCQkqZnAgPSAoKChzMzIpIGQgKyBmX1NwdXIpIC8gKG1hIC0gbikpICsgMTsKKwkJCSpmbSA9ICgtKGZfU3B1ciArIChzMzIpIGMpIC8gKG1hIC0gbikpICsgMTsKKwkJCXJldHVybiAxOworCQl9CisJfQorCisJLyogIE5vIHNwdXJzIGZvdW5kICAqLworCXJldHVybiAwOworfQorCisvKgorICogTVRfQXZvaWRTcHVycygpIC0gTWFpbiBlbnRyeSBwb2ludCB0byBhdm9pZCBzcHVycy4KKyAqICAgICAgICAgICAgICAgICAgIENoZWNrcyBmb3IgZXhpc3Rpbmcgc3B1cnMgaW4gcHJlc2VudCBMTzEsIExPMiBmcmVxcworICogICAgICAgICAgICAgICAgICAgYW5kIGlmIHByZXNlbnQsIGNob29zZXMgc3B1ci1mcmVlIExPMSwgTE8yIGNvbWJpbmF0aW9uCisgKiAgICAgICAgICAgICAgICAgICB0aGF0IHR1bmVzIHRoZSBzYW1lIGlucHV0L291dHB1dCBmcmVxdWVuY2llcy4KKyAqLworc3RhdGljIHUzMiBNVDIwNjNfQXZvaWRTcHVycyhzdHJ1Y3QgTVQyMDYzX0F2b2lkU3B1cnNEYXRhX3QgKnBBU19JbmZvKQoreworCXUzM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YTUsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYTYsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYTksIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYWEsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYjAsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYzIsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweDAwYzYsIHsweDE5fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMDAsIHsweDBmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMTYsIHsweDEwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMTcsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMTgsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMTksIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMWEsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMjEsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMjIsIHsweDBhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMjMsIHsweDBhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMmIsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwMmMsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNjQsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNjUsIHsweGY5fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNjYsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNjcsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNmYsIHsweGUwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNzAsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNzIsIHsweDBmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNzMsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwNzgsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwODcsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWIsIHsweDNmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWMsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWQsIHsweDIwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWUsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWYsIHsweDBjfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwYTAsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxMzAsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxMzIsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNDQsIHsweDFhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNDYsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGEsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGMsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGQsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGYsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNTgsIHsweDdmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNWEsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNWIsIHsweDA4fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNWQsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNWUsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNjMsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNjYsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNjcsIHsweDQwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNjgsIHsweDBmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxN2EsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxN2IsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxODMsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxOWQsIHsweDQwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxYmMsIHsweDM2fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxYmQsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxY2IsIHsweGEwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxY2MsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYyMDQsIHsweDEwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYyMTQsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY0MGUsIHsweDBhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY0MGYsIHsweDQwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY0MTAsIHsweDA4fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1NWYsIHsweDBhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1NjEsIHsweDE1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1NjIsIHsweDIwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZGYsIHsweGZifSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZTAsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZTMsIHsweDA5fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZTQsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZTUsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZjgsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1ZmQsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDAsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDEsIHsweDA4fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDIsIHsweDBifSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDMsIHsweDBlfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDQsIHsweDExfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDUsIHsweDE0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDYsIHsweDE3fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MDcsIHsweDFmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MGUsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MGYsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MTAsIHsweDMyfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY2MTEsIHsweDEwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY3MDcsIHsweGZjfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY3MDgsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY3MDksIHsweDM3fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY3MGEsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY3OGIsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY4MGYsIHsweDQwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY4MTAsIHsweDU0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY4MTEsIHsweDVhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY5MDUsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGZiMDYsIHsweDAzf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9ELCAweGYwNzIsIHsweDBmLCAweDAzfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYwNzcsIHsweDAxLCAweDAwfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYwODcsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYwOWIsIHsweDNmLCAweDAwLCAweDIwLCAweDAwLCAweDBjLCAweDAwfSwgMHgwNn0sCisJe1BST19ETU9ELCAweGYxMzAsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxMzIsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNDQsIHsweDFhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNDYsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGEsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNGMsIHsweDAwLCAweDAwfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYxNGYsIHsweDA0fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNTgsIHsweDdmfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNWEsIHsweDAwLCAweDA4fSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYxNWQsIHsweDAzLCAweDA1fSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYxNjMsIHsweDA1fSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxNjYsIHsweDAxLCAweDQwLCAweDBmfSwgMHgwM30sCisJe1BST19ETU9ELCAweGYxN2EsIHsweDAwLCAweDAwfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYxODMsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxOWQsIHsweDQwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYxYmMsIHsweDM2LCAweDAwfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYxY2IsIHsweGEwLCAweDAxfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGYyMDQsIHsweDEwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYyMTQsIHsweDAwfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGYyNGMsIHsweDg4LCAweDk1LCAweDlhLCAweDkwfSwgMHgwNH0sCisJe1BST19ETU9ELCAweGYyNWEsIHsweDA3LCAweGU4LCAweDAzLCAweGIwLCAweDA0fSwgMHgwNX0sCisJe1BST19ETU9ELCAweGYyNzAsIHsweDAxLCAweDAyLCAweDAxLCAweDAyfSwgMHgwNH0sCisJe1BST19ETU9ELCAweGY0MGUsIHsweDBhLCAweDQwLCAweDA4fSwgMHgwM30sCisJe1BST19ETU9ELCAweGY1NWYsIHsweDBhfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY1NjEsIHsweDE1LCAweDIwfSwgMHgwMn0sCisJe1BST19ETU9ELCAweGY1ZTMsIHsweDA5LCAweDAxLCAweDAxfSwgMHgwM30sCisJe1BST19ETU9ELCAweGY2MDAsIHsJMHgwNSwgMHgwOCwgMHgwYiwgMHgwZSwgMHgxMSwgMHgxNCwgMHgxNywKKwkJCQkweDFmfSwgMHgwOH0sCisJe1BST19ETU9ELCAweGY2MGUsIHsweDAwLCAweDA0LCAweDMyLCAweDEwfSwgMHgwNH0sCisJe1BST19ETU9ELCAweGY3MDcsIHsweGZjLCAweDAwLCAweDM3LCAweDAwfSwgMHgwNH0sCisJe1BST19ETU9ELCAweGY3OGIsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGY4MGYsIHsweDQwLCAweDU0LCAweDVhfSwgMHgwM30sCisJe1BST19ETU9ELCAweGY5MDUsIHsweDAxfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGZiMDYsIHsweDAzfSwgMHgwMX0sCisJe1BST19ETU9ELCAweGZkOGIsIHsweDAwfSwgMHgwMX0sCisJezB4ZmYsIDB4MDAwMCwgezB4MDB9LCAweDAwfSAvKiBUZXJtaW5hdGluZyBFbnRyeSAqLworfTsKKworLyogVHVuZXIgc2V0dGluZyBzY3J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gMCBmb3IgdGhpcyBjb21wb25lbnQgKi8KKwlqcGVnX3NldF9odGJsKHJlZ3MsIGhhY3RibGcwLCBTNVBfSlBHX0hBQ1RCTEcoMCksIEFSUkFZX1NJWkUoaGFjdGJsZzApKTsKK30KKworLyoKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIERldmljZSBmaWxlIG9wZXJhdGlvbnMKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqLworCitzdGF0aWMgaW50IHF1ZXVlX2luaXQodm9pZCAqcHJpdiwgc3RydWN0IHZiMl9xdWV1ZSAqc3JjX3ZxLAorCQkgICAgICBzdHJ1Y3QgdmIyX3F1ZXVlICpkc3RfdnEpOworc3RhdGljIHN0cnVjdCBzNXBfanBlZ19mbXQgKnM1cF9qcGVnX2ZpbmRfZm9ybWF0KHVuc2lnbmVkIGludCBtb2RlLAorCQkJCQkJIF9fdTMyIHBpeGVsZm9ybWF0KTsKKworc3RhdGljIGludCBzNXBfanBlZ19vcGVuKHN0cnVjdCBmaWxlICpmaWxlKQoreworCXN0cnVjdCBzNXBfanBlZyAqanBlZyA9IHZpZGVvX2RydmRhdGEoZmlsZSk7CisJc3RydWN0IHZpZGVvX2RldmljZSAqdmZkID0gdmlkZW9fZGV2ZGF0YShmaWxlKTsKKwlzdHJ1Y3QgczVwX2pwZWdfY3R4ICpjdHg7CisJc3RydWN0IHM1cF9qcGVnX2ZtdCAqb3V0X2ZtdDsKKworCWN0eCA9IGt6YWxsb2Moc2l6ZW9mICpjdHgsIEdGUF9LRVJORUwpOworCWlmICghY3R4KQorCQlyZXR1cm4gLUVOT01FTTsKKworCWZpbGUtPnByaXZhdGVfZGF0YSA9IGN0eDsKKwljdHgtPmpwZWcgPSBqcGVnOworCWlmICh2ZmQgPT0ganBlZy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VdfT1VUXzQyMik7CisJCWpwZWdfanBnYWRyKGpwZWctPnJlZ3MsIHNyY19hZGRyKTsKKwkJanBlZ19pbWdhZHIoanBlZy0+cmVncywgZHN0X2FkZHIpOworCX0KKwlqcGVnX3N0YXJ0KGpwZWctPnJlZ3MpOworfQorCitzdGF0aWMgaW50IHM1cF9qcGVnX2pvYl9yZWFkeSh2b2lkICpwcml2KQoreworCXN0cnVjdCBzNXBfanBlZ19jdHggKmN0eCA9IHByaXY7CisKKwlpZiAoY3R4LT5tb2RlID09IFM1UF9KUEVHX0RFQ09ERSkKKwkJcmV0dXJuIGN0eC0+aGRyX3BhcnNlZDsKKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHZvaWQgczVwX2pwZWdfam9iX2Fib3J0KHZvaWQgKnByaXYpCit7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgdjRsMl9tMm1fb3BzIHM1cF9qcGVnX20ybV9vcHMgPSB7CisJLmRldmljZV9ydW4JPSBzNXBfanBlZ19kZXZpY2VfcnVuLAorCS5qb2JfcmVhZHkJPSBzNXBfanBlZ19qb2JfcmVhZHksCisJLmpvYl9hYm9ydAk9IHM1cF9qcGVnX2pvYl9hYm9ydCwKK307CisKKy8qCisgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBRdWV1ZSBvcGVyYXRpb25zCisgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKi8KKworc3RhdGljIGludCBzNXBfanBlZ19xdWV1ZV9zZXR1cChzdHJ1Y3QgdmIyX3F1ZXVlICp2cSwKKwkJCSAgIGNvbnN0IHN0cnVjdCB2NGwyX2Zvcm1hdCAqZm10LAorCQkJICAgdW5zaWduZWQgaW50ICpuYnVmZmVycywgdW5zaWduZWQgaW50ICpucGxhbmVzLAorCQkJICAgdW5zaW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gX19pb21lbSAqcmVncywgdW5zaWduZWQgaW50IHkpCit7CisJdW5zaWduZWQgbG9uZyByZWc7CisKKwlyZWcgPSByZWFkbChyZWdzICsgUzVQX0pQR1lfVSk7CisJcmVnICY9IH4weGZmOworCXJlZyB8PSAoeSA+PiA4KSAmIDB4ZmY7CisJd3JpdGVsKHJlZywgcmVncyArIFM1UF9KUEdZX1UpOworCisJcmVnID0gcmVhZGwocmVncyArIFM1UF9KUEdZX0wpOworCXJlZyAmPSB+MHhmZjsKKwlyZWcgfD0geSAmIDB4ZmY7CisJd3JpdGVsKHJlZywgcmVncyArIFM1UF9KUEdZX0wpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQganBlZ194KHZvaWQgX19pb21lbSAqcmVncywgdW5zaWduZWQgaW50IHgpCit7CisJdW5zaWduZWQgbG9uZyByZWc7CisKKwlyZWcgPSByZWFkbChyZWdzICsgUzVQX0pQR1hfVSk7CisJcmVnICY9IH4weGZmOworCXJlZyB8PSAoeCA+PiA4KSAmIDB4ZmY7CisJd3JpdGVsKHJlZywgcmVncyArIFM1UF9KUEdYX1UpOworCisJcmVnID0gcmVhZGwocmVncyArIFM1UF9KUEdYX0wpOworCXJlZyAmPSB+MHhmZjsKKwlyZWcgfD0geCAmIDB4ZmY7CisJd3JpdGVsKHJlZywgcmVncyArIFM1UF9KUEdYX0wpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQganBlZ19yc3RfaW50X2VuYWJsZSh2b2lkIF9faW9tZW0gKnJlZ3MsIGJvb2wgZW5hYmxlKQoreworCXVuc2lnbmVkIGxvbmcgcmVnOworCisJcmVnID0gcmVhZGwocmVncyArIFM1UF9KUEdJTlRTRSk7CisJcmVnICY9IH5TNVBfUlNUbV9JTlRfRU5fTUFTSzsKKwlpZiAoZW5hYmxlKQorCQlyZWcgfD0gUzVQX1JTVG1fSU5UX0VOOworCXdyaXRlbChyZWcsIHJlZ3MgKyBTNVBfSlBHSU5UU0UpOworfQorCitzdGF0aWMgaW5sa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ChzZCwgMCk7CisKKwkvKiBDYWxjdWxhdGUgaGVpZ2h0IGFuZCB3aWR0aCBiYXNlZCBvbiBjdXJyZW50IHN0YW5kYXJkICovCisJaWYgKGRlY29kZXItPm5vcm0gPT0gVjRMMl9TVERfQUxMKQorCQlzdGQgPSB0dnA1MTUwX3JlYWRfc3RkKHNkKTsKKwllbHNlCisJCXN0ZCA9IGRlY29kZXItPm5vcm07CisKKwlmLT53aWR0aCA9IDcyMDsKKwlpZiAoc3RkICYgVjRMMl9TVERfNTI1XzYwKQorCQlmLT5oZWlnaHQgPSA0ODA7CisJZWxzZQorCQlmLT5oZWlnaHQgPSA1NzY7CisKKwlmLT5jb2RlID0gVjRMMl9NQlVTX0ZNVF9ZVVlWOF8yWDg7CisJZi0+ZmllbGQgPSBWNEwyX0ZJRUxEX1NFUV9UQjsKKwlmLT5jb2xvcnNwYWNlID0gVjRMMl9DT0xPUlNQQUNFX1NNUFRFMTcwTTsKKworCXY0bDJfZGJnKDEsIGRlYnVnLCBzZCwgIndpZHRoID0gJWQsIGhlaWdodCA9ICVkXG4iLCBmLT53aWR0aCwKKwkJCWYtPmhlaWdodCk7CisJcmV0dXJuIDA7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJCQlJMkMgQ29tbWFuZAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC05MzEsNiArOTk1LDkgQEAKIAogc3RhdGljIGNvbnN0IHN0cnVjdCB2NGwyX3N1YmRldl92aWRlb19vcHMgdHZwNTE1MF92aWRlb19vcHMgPSB7CiAJLnNfcm91dGluZyA9IHR2cDUxNTBfc19yb3V0aW5nLAorCS5lbnVtX21idXNfZm10ID0gdHZwNTE1MF9lbnVtX21idXNfZm10LAorCS5zX21idXNfZm10ID0gdHZwNTE1MF9tYn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ID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJaTJjX3NldF9jbGllbnRkYXRhKGkyYywgczVtODd4eCk7CisJczVtODd4eC0+ZGV2ID0gJmkyYy0+ZGV2OworCXM1bTg3eHgtPmkyYyA9IGkyYzsKKwlzNW04N3h4LT5pcnEgPSBpMmMtPmlycTsKKwlzNW04N3h4LT50eXBlID0gaWQtPmRyaXZlcl9kYXRhOworCisJaWYgKHBkYXRhKSB7CisJCXM1bTg3eHgtPmRldmljZV90eXBlID0gcGRhdGEtPmRldmljZV90eXBlOworCQlzNW04N3h4LT5vbm8gPSBwZGF0YS0+b25vOworCQlzNW04N3h4LT5pcnFfYmFzZSA9IHBkYXRhLT5pcnFfYmFzZTsKKwkJczVtODd4eC0+d2FrZXVwID0gcGRhdGEtPndha2V1cDsKKwl9CisKKwlzNW04N3h4LT5yZWdtYXAgPSByZWdtYXBfaW5pdF9pMmMoaTJjLCAmczVtX3JlZ21hcF9jb25maWcpOworCWlmIChJU19FUlIoczVtODd4eC0+cmVnbWFwKSkgeworCQllcnJvciA9IFBUUl9FUlIoczVtODd4eC0+cmVnbWFwKTsKKwkJZGV2X2VycigmaTJjLT5kZXYsICJGYWlsZWQgdG8gYWxsb2NhdGUgcmVnaXN0ZXIgbWFwOiAlZFxuIiwKKwkJCWVycm9yKTsKKwkJZ290byBlcnI7CisJfQorCisJczVtODd4eC0+cnRjID0gaTJjX25ld19kdW1teShpMmMtPmFkYXB0ZXIsIFJUQ19JMkNfQUREUik7CisJaTJjX3NldF9jbGllbnRkYXRhKHM1bTg3eHgtPnJ0YywgczVtODd4eCk7CisKKwlpZiAocGRhdGEgJiYgcGRhdGEtPmNmZ19wbWljX2lycSkKKwkJcGRhdGEtPmNmZ19wbWljX2lycSgpOworCisJczVtX2lycV9pbml0KHM1bTg3eHgpOworCisJcG1fcnVudGltZV9zZXRfYWN0aXZlKHM1bTg3eHgtPmRldik7CisKKwlyZXQgPSBtZmRfYWRkX2RldmljZXMoczVtOD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307CisKK3N0YXRpYyBpbmxpbmUgc3RydWN0IHM1bV9pcnFfZGF0YSAqCitpcnFfdG9fczVtODc2N19pcnEoc3RydWN0IHM1bTg3eHhfZGV2ICpzNW04N3h4LCBpbnQgaXJxKQoreworCXJldHVybiAmczVtODc2N19pcnFzW2lycSAtIHM1bTg3eHgtPmlycV9iYXNlXTsKK30KKworc3RhdGljIHZvaWQgczVtODc2N19pcnFfbG9jayhzdHJ1Y3QgaXJxX2RhdGEgKmRhdGEpCit7CisJc3RydWN0IHM1bTg3eHhfZGV2ICpzNW04N3h4ID0gaXJxX2RhdGFfZ2V0X2lycV9jaGlwX2RhdGEoZGF0YSk7CisKKwltdXRleF9sb2NrKCZzNW04N3h4LT5pcnFsb2NrKTsKK30KKworc3RhdGljIHZvaWQgczVtODc2N19pcnFfc3luY191bmxvY2soc3RydWN0IGlycV9kYXRhICpkYXRhKQoreworCXN0cnVjdCBzNW04N3h4X2RldiAqczVtODd4eCA9IGlycV9kYXRhX2dldF9pcnFfY2hpcF9kYXRhKGRhdGEpOworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUoczVtODd4eC0+aXJxX21hc2tzX2N1cik7IGkrKykgeworCQlpZiAoczVtODd4eC0+aXJxX21hc2tzX2N1cltpXSAhPSBzNW04N3h4LT5pcnFfbWFza3NfY2FjaGVbaV0pIHsKKwkJCXM1bTg3eHgtPmlycV9tYXNrc19jYWNoZVtpXSA9IHM1bTg3eHgtPmlycV9tYXNrc19jdXJbaV07CisJCQlzNW1fcmVnX3dyaXRlKHM1bTg3eHgsIFM1TTg3NjdfUkVHX0lOVDFNICsgaSwKKwkJCQkJczVtODd4eC0+aXJxX21hc2tzX2N1cltpXSk7CisJCX0KKwl9CisKKwltdXRleF91bmxvY2soJnM1bTg3eHgtPmlycWxvY2spOworfQorCitzdGF0aWMgdm9pZCBzNW04NzY3X2lycV91bm1hc2soc3RydWN0IGlycV9kYXRhICpkYXRhKQoreworCXN0cnVjdCBzN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lycSAtIHM1bTg3eHgtPmlycV9iYXNlXTsKK30KKworc3RhdGljIHZvaWQgczVtODc2M19pcnFfbG9jayhzdHJ1Y3QgaXJxX2RhdGEgKmRhdGEpCit7CisJc3RydWN0IHM1bTg3eHhfZGV2ICpzNW04N3h4ID0gaXJxX2RhdGFfZ2V0X2lycV9jaGlwX2RhdGEoZGF0YSk7CisKKwltdXRleF9sb2NrKCZzNW04N3h4LT5pcnFsb2NrKTsKK30KKworc3RhdGljIHZvaWQgczVtODc2M19pcnFfc3luY191bmxvY2soc3RydWN0IGlycV9kYXRhICpkYXRhKQoreworCXN0cnVjdCBzNW04N3h4X2RldiAqczVtODd4eCA9IGlycV9kYXRhX2dldF9pcnFfY2hpcF9kYXRhKGRhdGEpOworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUoczVtODd4eC0+aXJxX21hc2tzX2N1cik7IGkrKykgeworCQlpZiAoczVtODd4eC0+aXJxX21hc2tzX2N1cltpXSAhPSBzNW04N3h4LT5pcnFfbWFza3NfY2FjaGVbaV0pIHsKKwkJCXM1bTg3eHgtPmlycV9tYXNrc19jYWNoZVtpXSA9IHM1bTg3eHgtPmlycV9tYXNrc19jdXJbaV07CisJCQlzNW1fcmVnX3dyaXRlKHM1bTg3eHgsIFM1TTg3NjNfUkVHX0lSUU0xICsgaSwKKwkJCQkJczVtODd4eC0+aXJxX21hc2tzX2N1cltpXSk7CisJCX0KKwl9CisKKwltdXRleF91bmxvY2soJnM1bTg3eHgtPmlycWxvY2spOworfQorCitzdGF0aWMgdm9pZCBzNW04NzYzX2lycV91bm1hc2soc3RydWN0IGlycV9kYXRhICpkYXRhKQoreworCXN0cnVjdCBzNW04N3h4X2RldiAqczVtODd4eCA9IGlycV9kYXRhX2dldF9pcnFfY2hpcF9kYXRhKGRhdGEpOworCXN0cnVjdCBzNW1faXJxX2RhdGEgKmlycV9kYXRhID0gaXJxX3RvX3M1bTg3NjNfaXJxKHM1bTg3eHgsCisJCQkJCQkJICAgICAgIGRhdGEtPmlycSk7CisKKwlzNW04N3h4LT5pcnFfbWFza3NfY3VyW2lycV9kYXRhLT5yZWcgLSAxXSAmPSB+aXJxX2RhdGEtPm1hc2s7Cit9CisKK3N0YXRpYyB2b2lkIHM1bTg3NjNfaXJxX21hc2soc3RydWN0IGlycV9kYXRhICpkYXRhKQoreworCXN0cnVjdCBzNW04N3h4X2RldiAqczVtODd4eCA9IGlycV9kYXRhX2dldF9pcnFfY2hpcF9kYXRhKGRhdGEpOworCXN0cnVjdCBzNW1faXJxX2RhdGEgKmlycV9kYXRhID0gaXJxX3RvX3M1bTg3NjNfaXJxKHM1bTg3eHgsCisJCQkJCQkJICAgICAgIGRhdGEtPmlycSk7CisKKwlzNW04N3h4LT5pcnFfbWFza3NfY3VyW2lycV9kYXRhLT5yZWcgLSAxXSB8PSBpcnFfZGF0YS0+bWFzazsKK30KKworc3RhdGljIHN0cnVjdCBpcnFfY2hpcCBzNW04NzYzX2lycV9jaGlwID0geworCS5uYW1lID0gInM1bTg3NjMiLAorCS5pcnFfYnVzX2xvY2sgPSBzNW04NzYzX2lycV9sb2NrLAorCS5pcnFfYnVzX3N5bmNfdW5sb2NrID0gczVtODc2M19pcnFfc3luY191bmxvY2ssCisJLmlycV9tYXNrID0gczVtODc2M19pcnFfbWFzaywKKwkuaXJxX3VubWFzayA9IHM1bTg3NjNfaXJxX3VubWFzaywKK307CisKKworc3RhdGljIGlycXJldHVybl90IHM1bTg3NjdfaXJxX3RocmVhZChpbnQgaXJxLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCBzNW04N3h4X2RldiAqczVtODd4eCA9IGRhdGE7CisJdTggaXJxX3JlZ1tOVU1fSVJRX1JFR1MtMV07CisJaW50IHJldDsKKwlpbnQgaTsKKworCisJcmV0ID0gczVtX2J1bGtfcmVhZChzNW04N3h4LCBTNU04NzY3X1JFR19JTlQxLAorCQkJCU5VTV9JUlFfUkVHUyAtIDEsIGlycV9yZWcpOworCWlmIChyZXQg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bWJkLm10ZCwgeGZlci0+T2Zmc2V0LCBzaXplb2YoaGVhZGVyKSwgJnJldGxlbiwKKyAgICAgICAgICAgICAgICAgICAgKHVfY2hhciAqKSZoZWFkZXIpOwogCiAgICAgaWYgKHJldCkgewogCXJldHVybiByZXQ7CkBAIC00MzgsOCArNDM4LDggQEAKIAogICAgIGZvciAoaSA9IDA7IGkgPCBuYmFtOyBpKyssIG9mZnNldCArPSBzaXplb2YodWludDMyX3QpKSB7CiAKLQlyZXQgPSBwYXJ0LT5tYmQubXRkLT53cml0ZShwYXJ0LT5tYmQubXRkLCBvZmZzZXQsIHNpemVvZih1aW50MzJfdCksCi0JCQkgICAgICAgJnJldGxlbiwgKHVfY2hhciAqKSZjdGwpOworCXJldCA9IG10ZF93cml0ZShwYXJ0LT5tYmQubXRkLCBvZmZzZXQsIHNpemVvZih1aW50MzJfdCksICZyZXRsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAodV9jaGFyICopJmN0bCk7CiAKIAlpZiAocmV0KQogCSAgICByZXR1cm4gcmV0OwpAQCAtNDg1LDkgKzQ4NSw5IEBACiAKIAlvZmZzZXQgPSBldW4tPk9mZnNldCArIGxlMzJfdG9fY3B1KHBhcnQtPmhlYWRlci5CQU1PZmZzZXQpOwogCi0JcmV0ID0gcGFydC0+bWJkLm10ZC0+cmVhZChwYXJ0LT5tYmQubXRkLCBvZmZzZXQsCi0JCQkgICAgICBwYXJ0LT5CbG9ja3NQZXJVbml0ICogc2l6ZW9mKHVpbnQzMl90KSwKLQkJCSAgICAgICZyZXRsZW4sICh1X2NoYXIgKikgKHBhcnQtPmJhbV9jYWNoZSkpOworCXJldCA9IG10ZF9yZWFkKHBhcnQtPm1iZC5tdGQsIG9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgcGFydC0+QmxvY2tzUGVyVW5pdCAqIHNpemVvZih1aW50MzJfdCksICZyZXRsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICh1X2NoYXIgKikocGFydC0+YmFt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aSkgPCA2NCkgPyAoMHgwMTAwMCArICgoX2kpICogMHg0MCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICgweDBEMDAwICsgKChfaSAtIDY0KSAqIDB4NDApKSkKKwkJCSAoMHgwRDAwMCArICgoKF9pKSAtIDY0KSAqIDB4NDApKSkKICNkZWZpbmUgSVhHQkVfUkRCQUgoX2kpICgoKF9pKSA8IDY0KSA/ICgweDAxMDA0ICsgKChfaSkgKiAweDQwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEQwMDQgKyAoKF9pIC0gNjQpICogMHg0MCkpKQorCQkJICgweDBEMDA0ICsgKCgoX2kpIC0gNjQpICogMHg0MCkpKQogI2RlZmluZSBJWEdCRV9SRExFTihfaSkgKCgoX2kpIDwgNjQpID8gKDB4MDEwMDggKyAoKF9pKSAqIDB4NDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRDAwOCArICgoX2kgLSA2NCkgKiAweDQwKSkpCisJCQkgKDB4MEQwMDggKyAoKChfaSkgLSA2NCkgKiAweDQwKSkpCiAjZGVmaW5lIElYR0JFX1JESChfaSkgICAoKChfaSkgPCA2NCkgPyAoMHgwMTAxMCArICgoX2kpICogMHg0MCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICgweDBEMDEwICsgKChfaSAtIDY0KSAqIDB4NDApKSkKKwkJCSAoMHgwRDAxMCArICgoKF9pKSAtIDY0KSAqIDB4NDApKSkKICNkZWZpbmUgSVhHQkVfUkRUKF9pKSAgICgoKF9pKSA8IDY0KSA/ICgweDAxMDE4ICsgKChfaSkgKiAweDQwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEQwMTggKyAoKF9pIC0gNjQpICogMHg0MCkpKQorCQkJICgweDBEMDE4ICsgKCgoX2kpIC0gNjQpICogMHg0MCkpKQogI2RlZmluZSBJWEdCRV9SWERDVEwoX2kpICgoKF9pKSA8IDY0KSA/ICgweDAxMDI4ICsgKChfaSkgKiAweDQwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICgweDBEMDI4ICsgKChfaSAtIDY0KSAqIDB4NDApKSkKKwkJCSAoMHgwRDAyOCArICgoKF9pKSAtIDY0KSAqIDB4NDApKSkKICNkZWZpbmUgSVhHQkVfUlNDQ1RMKF9pKSAoKChfaSkgPCA2NCkgPyAoMHgwMTAyQyArICgoX2kpICogMHg0MCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRDAyQyArICgoX2kgLSA2NCkgKiAweDQwKSkpCisJCQkgKDB4MEQwMkMgKyAoKChfaSkgLSA2NCkgKiAweDQwKSkpCiAjZGVmaW5lIElYR0JFX1JTQ0RCVSAgICAgMHgwMzAyOAogI2RlZmluZSBJWEdCRV9SRERDQyAgICAgIDB4MDJGMjAKICNkZWZpbmUgSVhHQkVfUlhNRU1XUkFQICAweDAzMTkwCkBAIC0xODYsNyArMTg2LDcgQEAKICAqLwogI2RlZmluZSBJWEdCRV9TUlJDVEwoX2kpICgoKF9pKSA8PSAxNSkgPyAoMHgwMjEwMCArICgoX2kpICogNCkpIDogXAogICAgICAgICAgICAgICAgICAgICAgICAgICAoKChfaSkgPCA2NCkgPyAoMHgwMTAxNCArICgoX2kpICogMHg0MCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRDAxNCArICgoX2kgLSA2NCkgKiAweDQwKSkpKQorCQkJICAoMHgwRDAxNCArICgoKF9pKSAtIDY0KSAqIDB4NDApKSkpCiAvKgogICogUnggRENBIENvbnRyb2wgUmVnaXN0ZXI6CiAgKiAwMC0xNSA6IDB4MDIyMDAgKyBuKjQKQEAgLTE5NSw3ICsxOTUsNyBAQAogICovCiAjZGVmaW5lIElYR0JFX0RDQV9SWENUUkwoX2kpICAgICgoKF9pKSA8PSAxNSkgPyAoMHgwMjIwMCArICgoX2kpICogNCkpIDogXAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoX2kpIDwgNjQpID8gKDB4MDEwMEMgKyAoKF9pKSAqIDB4NDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBEMDBDICsgKChfaSAtIDY0KSAqIDB4NDApKSkpCisJCQkJICgweDBEMDBDICsgKCgoX2kpIC0gNjQpICogMHg0MCkpKSkKICNkZWZpbmUgSVhHQkVfUkRSWENUTCAgICAgICAgICAgMHgwMkYwMAogI2RlZmluZSBJWEdCRV9SWFBCU0laRShfaSkgICAgICAoMHgwM0MwMCArICgoX2kpICogNCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiA4IG9mIHRoZXNlIDB4MDNDMDAgLSAweDAzQzFDICovCkBAIC0zNDQsOSArMzQ0LDkgQEAKIAogI2RlZmluZSBJWEdCRV9XVVBMICAgICAgMHgwNTkwMAogI2RlZmluZSBJWEdCRV9XVVBNICAgICAgMHgwNUEwMCAvKiB3YWtlIHVwIHBrdCBtZW1vcnkgMHg1QTAwLTB4NUE3QyAqLwotI2RlZmluZSBJWEdCRV9GSEZUKF9uKSAgICAgKDB4MDkwMDAgKyAoX24gKiAweDEwMCkpIC8qIEZsZXggaG9zdCBmaWx0ZXIgdGFibGUgKi8KLSNkZWZpbmUgSVhHQkVfRkhGVF9FWFQoX24pICgweDA5ODAwICsgKF9uICogMHgxMDApKSAvKiBFeHQgRmxleGlibGUgSG9zdAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpbHRlciBUYWJsZSAqLworI2RlZmluZSBJWEdCRV9GSEZUKF9uKQkoMHgwOTAwMCArICgoX24pICogMHgxMDApKSAvKiBGbGV4IGhvc3QgZmlsdGVyIHRhYmxlICovCisjZGVmaW5lIElYR0JFX0ZIRlRfRVhUKF9uKQkoMHgwOTgwMCArICgoX24pICogMHgxMDApKSAvKiBFeHQgRmxleGlibGUgSG9zdAorCQkJCQkJCSAgICAqIEZpbHRlciBUYWJs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JTkdfRU5BQkxFRAkJMHhGRjAwMDAwOAorI2RlZmluZSBSTkRJU19PSURfQ09fU0lHTkFMSU5HX0RJU0FCTEVECQkweEZGMDAwMDA5CisKKy8qIDgwMi4zIE9iamVjdHMgKEV0aGVybmV0KSAqLworI2RlZmluZSBSTkRJU19PSURfODAyXzNfUEVSTUFORU5UX0FERFJFU1MJMHgwMTAxMDEwMQorI2RlZmluZSBSTkRJU19PSURfODAyXzNfQ1VSUkVOVF9BRERSRVNTCQkweDAxMDEwMTAyCisjZGVmaW5lIFJORElTX09JRF84MDJfM19NVUxUSUNBU1RfTElTVAkJMHgwMTAxMDEwMworI2RlZmluZSBSTkRJU19PSURfODAyXzNfTUFYSU1VTV9MSVNUX1NJWkUJMHgwMTAxMDEwNAorI2RlZmluZSBSTkRJU19PSURfODAyXzNfTUFDX09QVElPTlMJCTB4MDEwMTAxMDUKKworI2RlZmluZSBORElTXzgwMl8zX01BQ19PUFRJT05fUFJJT1JJVFkJCTB4MDAwMDAwMDEKKworI2RlZmluZSBSTkRJU19PSURfODAyXzNfUkNWX0VSUk9SX0FMSUdOTUVOVAkweDAxMDIwMTAxCisjZGVmaW5lIFJORElTX09JRF84MDJfM19YTUlUX09ORV9DT0xMSVNJT04JMHgwMTAyMDEwMgorI2RlZmluZSBSTkRJU19PSURfODAyXzNfWE1JVF9NT1JFX0NPTExJU0lPTlMJMHgwMTAyMDEwMworCisjZGVmaW5lIFJORElTX09JRF84MDJfM19YTUlUX0RFRkVSUkVECQkweDAxMDIwMjAxCisjZGVmaW5lIFJORElTX09JRF84MDJfM19YTUlUX01BWF9DT0xMSVNJT05TCTB4MDEwMjAyMDIKKyNkZWZpbmUgUk5ESVNfT0lEXzgwMl8zX1JDVl9PVkVSUlVOCQkweDAxMDIwMjAzCisjZGVmaW5lIFJORElTX09JRF84MDJfM19YTUlUX1VOREVSUlVOCQkweDAxMDIwMjA0CisjZGVmaW5lIFJORElTX09JRF84MDJfM19YTUlUX0hFQVJUQkVBVF9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cmVnaXN0ZXIoMHhkZCk7CisKKwlkb2NrID0gc3RhdGUgJiAweDAyOworCisJaWYgKChmdWppdHN1LmNvbmZpZy5xdWlya3MgJiBGT1JDRV9UQUJMRVRfTU9ERV9JRl9VTkRPQ0spICYmICghZG9jaykpIHsKKwkJdGFibGV0X21vZGUgPSAxOworCX0gZWxzZXsKKwkJdGFibGV0X21vZGUgPSBzdGF0ZSAmIDB4MDE7CisJCWlmIChmdWppdHN1LmNvbmZpZy5xdWlya3MgJiBJTlZFUlRfVEFCTEVUX01PREVfQklUKQorCQkJdGFibGV0X21vZGUgPSAhdGFibGV0X21vZGU7CisJfQorCisJaW5wdXRfcmVwb3J0X3N3aXRjaChmdWppdHN1LmlkZXYsIFNXX0RPQ0ssIGRvY2spOworCWlucHV0X3JlcG9ydF9zd2l0Y2goZnVqaXRzdS5pZGV2LCBTV19UQUJMRVRfTU9ERSwgdGFibGV0X21vZGUpOworCWlucHV0X3N5bmMoZnVqaXRzdS5pZGV2KTsKK30KKworc3RhdGljIHZvaWQgZnVqaXRzdV9yZXNldCh2b2lkKQoreworCWludCB0aW1lb3V0ID0gNTA7CisKKwlmdWppdHN1X2FjaygpOworCisJd2hpbGUgKChmdWppdHN1X3N0YXR1cygpICYgMHgwMikgJiYgKC0tdGltZW91dCkpCisJCW1zbGVlcCgyMCk7CisKKwlmdWppdHN1X3NlbmRfc3RhdGUoKTsKK30KKworc3RhdGljIGludCBfX2RldmluaXQgaW5wdXRfZnVqaXRzdV9zZXR1cChzdHJ1Y3QgZGV2aWNlICpwYXJlbnQsCisJCQkJCSBjb25zdCBjaGFyICpuYW1lLCBjb25zdCBjaGFyICpwaHlzKQoreworCXN0cnVjdCBpbnB1dF9kZXYgKmlkZXY7CisJaW50IGVycm9yOworCWludCBpOworCisJaWRldiA9IGlucHV0X2FsbG9jYXRlX2RldmljZSgpOworCWlmICghaWRldikKKwkJcmV0dXJuIC1FTk9NRU07CisKKwlpZGV2LT5kZXYucGFyZW50ID0gcGFyZ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CXJldHJpZXMgPSBtYXgoY2hpcC0+cGRhdGEtPmkyY19yZXRyeV9jb3VudCArIDEsIDEpOworCisJd2hpbGUgKHJldHJpZXMgPiAwKSB7CisJCXJldCA9IGkyY19zbWJ1c19yZWFkX3dvcmRfZGF0YShjbGllbnQsIGFkZHJlc3MpOworCQlpZiAocmV0ID49IDApCisJCQlicmVhazsKKwkJcmV0cmllcy0tOworCX0KKworCWlmIChyZXQgPCAwKSB7CisJCWRldl9kYmcoJmNsaWVudC0+ZGV2LAorCQkJIiVzOiBpMmMgcmVhZCBhdCBhZGRyZXNzIDB4JXggZmFpbGVkXG4iLAorCQkJX19mdW5jX18sIGFkZHJlc3MpOworCQlyZXR1cm4gcmV0OworCX0KKworCXJldHVybiBsZTE2X3RvX2NwdShyZXQpOworfQorCitzdGF0aWMgaW50IHNic193cml0ZV93b3JkX2RhdGEoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTggYWRkcmVzcywKKwl1MTYgdmFsdWUpCit7CisJc3RydWN0IHNic19pbmZvICpjaGlwID0gaTJjX2dldF9jbGllbnRkYXRhKGNsaWVudCk7CisJczMyIHJldCA9IDA7CisJaW50IHJldHJpZXMgPSAxOworCisJaWYgKGNoaXAtPnBkYXRhKQorCQlyZXRyaWVzID0gbWF4KGNoaXAtPnBkYXRhLT5pMmNfcmV0cnlfY291bnQgKyAxLCAxKTsKKworCXdoaWxlIChyZXRyaWVzID4gMCkgeworCQlyZXQgPSBpMmNfc21idXNfd3JpdGVfd29yZF9kYXRhKGNsaWVudCwgYWRkcmVzcywKKwkJCWxlMTZfdG9fY3B1KHZhbHVlKSk7CisJCWlmIChyZXQgPj0gMCkKKwkJCWJyZWFrOworCQlyZXRyaWVzLS07CisJfQorCisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2RiZygmY2xpZW50LT5kZXYsCisJCQkiJXM6IGkyYyB3cml0ZSB0byBhZGRyZXNzIDB4JXggZmFpbGVkXG4iLAorCQkJX19mdW5jX18sIGFkZH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19wb3J0X2ZwZ19zdGF0c19zIHsKLSAgICB1MzIgICAgaW50cl9ldnQ7Ci0gICAgdTMyICAgIGludHI7Ci0gICAgdTMyICAgIGludHJfZXhjZXNzOwotICAgIHUzMiAgICBpbnRyX2NhdXNlMDsKLSAgICB1MzIgICAgaW50cl9vdGhlcjsKLSAgICB1MzIgICAgaW50cl9vdGhlcl9pZ247Ci0gICAgdTMyICAgIHNpZ19sb3N0OwotICAgIHUzMiAgICBzaWdfcmVnYWluZWQ7Ci0gICAgdTMyICAgIHN5bmNfbG9zdDsKLSAgICB1MzIgICAgc3luY190bzsKLSAgICB1MzIgICAgc3luY19yZWdhaW5lZDsKLSAgICB1MzIgICAgZGl2Ml9vdmVyZmxvdzsKLSAgICB1MzIgICAgZGl2Ml91bmRlcmZsb3c7Ci0gICAgdTMyICAgIGVmaWZvX292ZXJmbG93OwotICAgIHUzMiAgICBlZmlmb191bmRlcmZsb3c7Ci0gICAgdTMyICAgIGlkbGVfcng7Ci0gICAgdTMyICAgIGxycl9yeDsKLSAgICB1MzIgICAgbHJfcng7Ci0gICAgdTMyICAgIG9sc19yeDsKLSAgICB1MzIgICAgbm9zX3J4OwotICAgIHUzMiAgICBsaXBfcng7Ci0gICAgdTMyICAgIGFyYmYwX3J4OwotICAgIHUzMiAgICBhcmJfcng7Ci0gICAgdTMyICAgIG1ya19yeDsKLSAgICB1MzIgICAgY29uc3RfbXJrX3J4OwotICAgIHUzMiAgICBwcmltX3Vua25vd247CisJdTMyICAgIGludHJfZXZ0OworCXUzMiAgICBpbnRyOworCXUzMiAgICBpbnRyX2V4Y2VzczsKKwl1MzIgICAgaW50cl9jYXVzZTA7CisJdTMyICAgIGludHJfb3RoZXI7CisJdTMyICAgIGludHJfb3RoZXJfaWduOworCXUzMiAgICBzaWdfbG9zdDsKKwl1MzIgICAgc2lnX3JlZ2FpbmVkOworCXUzMiAgICBzeW5jX2xvc3Q7CisJdTMyICAgIHN5bmNfdG87CisJdTMyICAgIHN5bmNfcmVnYWluZWQ7CisJdTMyICAgIGRpdjJfb3ZlcmZsb3c7CisJdTMyICAgIGRpdjJfdW5kZXJmbG93OworCXUzMiAgICBlZmlmb19vdmVyZmxvdzsKKwl1MzIgICAgZWZpZm9fdW5kZXJmbG93OworCXUzMiAgICBpZGxlX3J4OworCXUzMiAgICBscnJfcng7CisJdTMyICAgIGxyX3J4OworCXUzMiAgICBvbHNfcng7CisJdTMyICAgIG5vc19yeDsKKwl1MzIgICAgbGlwX3J4OworCXUzMiAgICBhcmJmMF9yeDsKKwl1MzIgICAgYXJiX3J4OworCXUzMiAgICBtcmtfcng7CisJdTMyICAgIGNvbnN0X21ya19yeDsKKwl1MzIgICAgcHJpbV91bmtub3duOwogfTsKIAogCiBzdHJ1Y3QgYmZhX2Z3X3BvcnRfbGtzbV9zdGF0c19zIHsKLSAgICB1MzIgICAgaHdzbV9zdWNjZXNzOyAgICAgICAvKiAgaHdzbSBzdGF0ZSBtYWNoaW5lIHN1Y2Nlc3MgICAgICAgICAgKi8KLSAgICB1MzIgICAgaHdzbV9mYWlsczsgICAgICAgICAvKiAgaHdzbSBmYWlscyAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgaHdzbV93ZHRvdjsgICAgICAgICAvKiAgaHdzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgc3dzbV9zdWNjZXNzOyAgICAgICAvKiAgc3dzbSBzdWNjZXNzICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgc3dzbV9mYWlsczsgICAgICAgICAvKiAgc3dzbSBmYWlscyAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgc3dzbV93ZHRvdjsgICAgICAgICAvKiAgc3dzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgYnVzeWJ1ZnM7ICAgICAgICAgICAvKiAgbGluayBpbml0IGZhaWxlZCBkdWUgdG8gYnVzeWJ1ZiAgICAgKi8KLSAgICB1MzIgICAgYnVmX3dhaXRzOyAgICAgICAgICAvKiAgYnVmd2FpdCBzdGF0ZSBlbnRyaWVzICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgbGlua19mYWlsczsgICAgICAgICAvKiAgbGluayBmYWlsdXJlcyAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgcHNwX2Vycm9yczsgICAgICAgICAvKiAgcHJpbWl0aXZlIHNlcXVlbmNlIHByb3RvY29sIGVycm9ycyAgKi8KLSAgICB1MzIgICAgbHJfdW5leHA7ICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHJ4LWVkIHVuZXhwZWN0ZWRseSAgKi8KLSAgICB1MzIgICAgbHJyX3VuZXhwOyAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiByeC1lZCB1bmV4cGVjdGVkbHkgKi8KLSAgICB1MzIgICAgbHJfdHg7ICAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHR4IHN0YXJ0ZWQgICAgICAgICAgKi8KLSAgICB1MzIgICAgbHJyX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiB0eCBzdGFydGVkICAgICAgICAgKi8KLSAgICB1MzIgICAgb2xzX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIE9MUyB0eCBzdGFydGVkICAgICAgICAgKi8KLSAgICB1MzIgICAgbm9zX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIE5PUyB0eCBzdGFydGVkICAgICAgICAgKi8KLSAgICB1MzIgICAgaHdzbV9scnJfcng7ICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiByeC1lZCBieSBIV1NNICAgICAgKi8KLSAgICB1MzIgICAgaHdzbV9scl9yeDsgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHJ4LWVkIGJ5IEhXU00gICAgICAqLwotCXUzMgliYnNjX2xyOwkvKiBMS1NNIExSIHR4IGZvciBjcmVkaXQgcmVjb3ZlcnkJKi8KKwl1MzIgICAgaHdzbV9zdWNjZXNzOyAgICAgICAvKiAgaHdzbSBzdGF0ZSBtYWNoaW5lIHN1Y2Nlc3MgICAgICAgICAgKi8KKwl1MzIgICAgaHdzbV9mYWlsczsgICAgICAgICAvKiAgaHdzbSBmYWlscyAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgaHdzbV93ZHRvdjsgICAgICAgICAvKiAgaHdzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc3dzbV9zdWNjZXNzOyAgICAgICAvKiAgc3dzbSBzdWNjZXNzICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc3dzbV9mYWlsczsgICAgICAgICAvKiAgc3dzbSBmYWlscyAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc3dzbV93ZHRvdjsgICAgICAgICAvKiAgc3dzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgYnVzeWJ1ZnM7ICAgICAgICAgICAvKiAgbGluayBpbml0IGZhaWxlZCBkdWUgdG8gYnVzeWJ1ZiAgICAgKi8KKwl1MzIgICAgYnVmX3dhaXRzOyAgICAgICAgICAvKiAgYnVmd2FpdCBzdGF0ZSBlbnRyaWVzICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgbGlua19mYWlsczsgICAgICAgICAvKiAgbGluayBmYWlsdXJlcyAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgcHNwX2Vycm9yczsgICAgICAgICAvKiAgcHJpbWl0aXZlIHNlcXVlbmNlIHByb3RvY29sIGVycm9ycyAgKi8KKwl1MzIgICAgbHJfdW5leHA7ICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHJ4LWVkIHVuZXhwZWN0ZWRseSAgKi8KKwl1MzIgICAgbHJyX3VuZXhwOyAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiByeC1lZCB1bmV4cGVjdGVkbHkgKi8KKwl1MzIgICAgbHJfdHg7ICAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHR4IHN0YXJ0ZWQgICAgICAgICAgKi8KKwl1MzIgICAgbHJyX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiB0eCBzdGFydGVkICAgICAgICAgKi8KKwl1MzIgICAgb2xzX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIE9MUyB0eCBzdGFydGVkICAgICAgICAgKi8KKwl1MzIgICAgbm9zX3R4OyAgICAgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIE5PUyB0eCBzdGFydGVkICAgICAgICAgKi8KKwl1MzIgICAgaHdzbV9scnJfcng7ICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSUiByeC1lZCBieSBIV1NNICAgICAgKi8KKwl1MzIgICAgaHdzbV9scl9yeDsgICAgICAgICAvKiAgTm8uIG9mIHRpbWVzIExSIHJ4LWVkIGJ5IEhXU00gICAgICAgKi8KKwl1MzIgICAgYmJzY19scjsJCSAgIC8qIExLU00gTFIgdHggZm9yIGNyZWRpdCByZWNvdmVyeSAgICAgICAqLwogfTsKIAogc3RydWN0IGJmYV9md19wb3J0X3Nuc21fc3RhdHNfcyB7Ci0gICAgdTMyICAgIGh3c21fc3VjY2VzczsgICAgICAgLyogIFN1Y2Nlc3NmdWwgaHdzbSB0ZXJtaW5hdGlvbnMgICAgICAgICovCi0gICAgdTMyICAgIGh3c21fZmFpbHM7ICAgICAgICAgLyogIGh3c20gZmFpbCBjb3VudCAgICAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIGh3c21fd2R0b3Y7ICAgICAgICAgLyogIGh3c20gdGltZWQgb3V0ICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHN3c21fc3VjY2VzczsgICAgICAgLyogIHN3c20gc3VjY2VzcyAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHN3c21fd2R0b3Y7ICAgICAgICAgLyogIHN3c20gdGltZWQgb3V0ICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIGVycm9yX3Jlc2V0czsgICAgICAgLyogIGVycm9yIHJlc2V0cyBpbml0aWF0ZWQgYnkgdXBzbSAgICAgICovCi0gICAgdTMyICAgIHN5bmNfbG9zdDsgICAgICAgICAgLyogIFN5bmMgbG9zcyBjb3VudCAgICAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHNpZ19sb3N0OyAgICAgICAgICAgLyogIFNpZ25hbCBsb3NzIGNvdW50ICAgICAgICAgICAgICAgICAgICovCi0JdTMyCWFzbjhnX2F0dGVtcHRzOwkvKiBTTlNNIEhXU00gYXQgOEdicHMgYXR0ZW1wdHMgKi8KKwl1MzIgICAgaHdzbV9zdWNjZXNzOyAgICAgICAvKiAgU3VjY2Vzc2Z1bCBod3NtIHRlcm1pbmF0aW9ucyAgICAgICAgKi8KKwl1MzIgICAgaHdzbV9mYWlsczsgICAgICAgICAvKiAgaHdzbSBmYWlsIGNvdW50ICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgaHdzbV93ZHRvdjsgICAgICAgICAvKiAgaHdzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc3dzbV9zdWNjZXNzOyAgICAgICAvKiAgc3dzbSBzdWNjZXNzICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc3dzbV93ZHRvdjsgICAgICAgICAvKiAgc3dzbSB0aW1lZCBvdXQgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgZXJyb3JfcmVzZXRzOyAgICAgICAvKiAgZXJyb3IgcmVzZXRzIGluaXRpYXRlZCBieSB1cHNtICAgICAgKi8KKwl1MzIgICAgc3luY19sb3N0OyAgICAgICAgICAvKiAgU3luYyBsb3NzIGNvdW50ICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgc2lnX2xvc3Q7ICAgICAgICAgICAvKiAgU2lnbmFsIGxvc3MgY291bnQgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgYXNuOGdfYXR0ZW1wdHM7CSAgIC8qIFNOU00gSFdTTSBhdCA4R2JwcyBhdHRlbXB0cwkgICAqLwogfTsKIAogc3RydWN0IGJmYV9md19wb3J0X3BoeXNtX3N0YXRzX3MgewotICAgIHUzMiAgICBtb2R1bGVfaW5zZXJ0czsgICAgIC8qICBNb2R1bGUgaW5zZXJ0IGNvdW50ICAgICAgICAgICAgICAgICAqLwotICAgIHUzMiAgICBtb2R1bGVfeHRyYWN0czsgICAgIC8qICBNb2R1bGUgZXh0cmFjdHMgY291bnQgICAgICAgICAgICAgICAqLwotICAgIHUzMiAgICBtb2R1bGVfaW52YWxpZHM7ICAgIC8qICBJbnZhbGlkIG1vZHVsZSBpbnNlcnRlZCBjb3VudCAgICAgICAqLwotICAgIHUzMiAgICBtb2R1bGVfcmVhZF9pZ247ICAgIC8qICBNb2R1bGUgdmFsaWRhdGlvbiBzdGF0dXMgaWdub3JlZCAgICAqLwotICAgIHUzMiAgICBsYXNlcl9mYXVsdHM7ICAgICAgIC8qICBMYXNlciBmYXVsdCBjb3VudCAgICAgICAgICAgICAgICAgICAqLwotICAgIHUzMiAgICByc3ZkOworCXUzMiAgICBtb2R1bGVfaW5zZXJ0czsgICAgIC8qICBNb2R1bGUgaW5zZXJ0IGNvdW50ICAgICAgICAgICAgICAgICAqLworCXUzMiAgICBtb2R1bGVfeHRyYWN0czsgICAgIC8qICBNb2R1bGUgZXh0cmFjdHMgY291bnQgICAgICAgICAgICAgICAqLworCXUzMiAgICBtb2R1bGVfaW52YWxpZHM7ICAgIC8qICBJbnZhbGlkIG1vZHVsZSBpbnNlcnRlZCBjb3VudCAgICAgICAqLworCXUzMiAgICBtb2R1bGVfcmVhZF9pZ247ICAgIC8qICBNb2R1bGUgdmFsaWRhdGlvbiBzdGF0dXMgaWdub3JlZCAgICAqLworCXUzMiAgICBsYXNlcl9mYXVsdHM7ICAgICAgIC8qICBMYXNlciBmYXVsdCBjb3VudCAgICAgICAgICAgICAgICAgICAqLworCXUzMiAgICByc3ZkOwogfTsKIAogc3RydWN0IGJmYV9md19maXBfc3RhdHNfcyB7Ci0gICAgdTMyICAgIHZsYW5fcmVxOyAgICAgICAgICAgLyogIHZsYW4gZGlzY292ZXJ5IHJlcXVlc3RzICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHZsYW5fbm90aWZ5OyAgICAgICAgLyogIHZsYW4gbm90aWZpY2F0aW9ucyAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHZsYW5fZXJyOyAgICAgICAgICAgLyogIHZsYW4gcmVzcG9uc2UgZXJyb3IgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHZsYW5fdGltZW91dHM7ICAgICAgLyogIHZsYW4gZGlzdm9lcnkgdGltZW91dHMgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIHZsYW5faW52YWxpZHM7ICAgICAgLyogIGludmFsaWQgdmxhbiBpbiBkaXNjb3ZlcnkgYWR2ZXJ0LiAgICovCi0gICAgdTMyICAgIGRpc2NfcmVxOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBzb2xpY2l0IHJlcXVlc3RzICAgICAgICAgICovCi0gICAgdTMyICAgIGRpc2NfcnNwOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBzb2xpY2l0IHJlc3BvbnNlICAgICAgICAgICovCi0gICAgdTMyICAgIGRpc2NfZXJyOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBhZHZ0LiBwYXJzZSBlcnJvcnMgICAgICAgICovCi0gICAgdTMyICAgIGRpc2NfdW5zb2w7ICAgICAgICAgLyogIERpc2NvdmVyeSB1bnNvbGljaXRlZCAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIGRpc2NfdGltZW91dHM7ICAgICAgLyogIERpc2NvdmVyeSB0aW1lb3V0cyAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIGRpc2NfZmNmX3VuYXZhaWw7ICAgLyogIERpc2NvdmVyeSBGQ0YgTm90IEF2YWlsLiAgICAgICAgICAgICovCi0gICAgdTMyICAgIGxpbmtzdmNfdW5zdXBwOyAgICAgLyogIFVuc3VwcG9ydGVkIGxpbmsgc2VydmljZSByZXEgICAgICAgICovCi0gICAgdTMyICAgIGxpbmtzdmNfZXJyOyAgICAgICAgLyogIFBhcnNlIGVycm9yIGluIGxpbmsgc2VydmljZSByZXEgICAgICovCi0gICAgdTMyICAgIGxvZ29fcmVxOyAgICAgICAgICAgLyogIEZJUCBsb2dvcyByZWNlaXZlZCAgICAgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIGNscnZsaW5rX3JlcTsgICAgICAgLyogIENsZWFyIHZpcnR1YWwgbGluayByZXEgICAgICAgICAgICAgICovCi0gICAgdTMyICAgIG9wX3Vuc3VwcDsgICAgICAgICAgLyogIFVuc3VwcG9ydGVkIEZJUCBvcGVyYXRpb24gICAgICAgICAgICovCi0gICAgdTMyICAgIHVudGFnZ2VkOyAgICAgICAgICAgLyogIFVudGFnZ2VkIGZyYW1lcyAoaWdub3JlZCkgICAgICAgICAgICovCi0gICAgdTMyICAgIGludmFsaWRfdmVyc2lvbjsgICAgLyogIEludmFsaWQgRklQIHZlcnNpb24gICAgICAgICAgICAgICAgICovCisJdTMyICAgIHZsYW5fcmVxOyAgICAgICAgICAgLyogIHZsYW4gZGlzY292ZXJ5IHJlcXVlc3RzICAgICAgICAgICAgICovCisJdTMyICAgIHZsYW5fbm90aWZ5OyAgICAgICAgLyogIHZsYW4gbm90aWZpY2F0aW9ucyAgICAgICAgICAgICAgICAgICovCisJdTMyICAgIHZsYW5fZXJyOyAgICAgICAgICAgLyogIHZsYW4gcmVzcG9uc2UgZXJyb3IgICAgICAgICAgICAgICAgICovCisJdTMyICAgIHZsYW5fdGltZW91dHM7ICAgICAgLyogIHZsYW4gZGlzdm9lcnkgdGltZW91dHMgICAgICAgICAgICAgICovCisJdTMyICAgIHZsYW5faW52YWxpZHM7ICAgICAgLyogIGludmFsaWQgdmxhbiBpbiBkaXNjb3ZlcnkgYWR2ZXJ0LiAgICovCisJdTMyICAgIGRpc2NfcmVxOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBzb2xpY2l0IHJlcXVlc3RzICAgICAgICAgICovCisJdTMyICAgIGRpc2NfcnNwOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBzb2xpY2l0IHJlc3BvbnNlICAgICAgICAgICovCisJdTMyICAgIGRpc2NfZXJyOyAgICAgICAgICAgLyogIERpc2NvdmVyeSBhZHZ0LiBwYXJzZSBlcnJvcnMgICAgICAgICovCisJdTMyICAgIGRpc2NfdW5zb2w7ICAgICAgICAgLyogIERpc2NvdmVyeSB1bnNvbGljaXRlZCAgICAgICAgICAgICAgICovCisJdTMyICAgIGRpc2NfdGltZW91dHM7ICAgICAgLyogIERpc2NvdmVyeSB0aW1lb3V0cyAgICAgICAgICAgICAgICAgICovCisJdTMyICAgIGRpc2NfZmNmX3VuYXZhaWw7ICAgLyogIERpc2NvdmVyeSBGQ0YgTm90IEF2YWlsLiAgICAgICAgICAgICovCisJdTMyICAgIGxpbmtzdmNfdW5zdXBwOyAgICAgLyogIFVuc3VwcG9ydGVkIGxpbmsgc2VydmljZSByZXEgICAgICAgICovCisJdTMyICAgIGxpbmtzdmNfZXJyOyAgICAgICAgLyogIFBhcnNlIGVycm9yIGluIGxpbmsgc2VydmljZSByZXEgICAgICovCisJdTMyICAgIGxvZ29fcmVxOyAgICAgICAgICAgLyogIEZJUCBsb2dvcyByZWNlaXZlZCAgICAgICAgICAgICAgICAgICovCisJdTMyICAgIGNscnZsaW5rX3JlcTsgICAgICAgLyogIENsZWFyIHZpcnR1YWwgbGluayByZXEgICAgICAgICAgICAgICovCisJdTMyICAgIG9wX3Vuc3VwcDsgICAgICAgICAgLyogIFVuc3VwcG9ydGVkIEZJUCBvcGVyYXRpb24gICAgICAgICAgICovCisJdTMyICAgIHVudGFnZ2VkOyAgICAgICAgICAgLyogIFVudGFnZ2VkIGZyYW1lcyAoaWdub3JlZCkgICAgICAgICAgICovCisJdTMyICAgIGludmFsaWRfdmVyc2lvbjsgICAgLyogIEludmFsaWQgRklQIHZlcnNpb24gICAgICAgICAgICAgICAgICovCiB9OwogCiBzdHJ1Y3QgYmZhX2Z3X2xwc19zdGF0c19zIHsKLSAgICB1MzIgICAgbWFjX2ludmFsaWRzOyAgICAgICAvKiAgSW52YWxpZCBtYWMgYXNzaWduZWQgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgcnN2ZDsKKwl1MzIgICAgbWFjX2ludmFsaWRzOyAgICAgICAvKiAgSW52YWxpZCBtYWMgYXNzaWduZWQgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgcnN2ZDsKIH07CiAKIHN0cnVjdCBiZmFfZndfZmNvZV9zdGF0c19zIHsKLSAgICB1MzIgICAgY2VlX2xpbmt1cHM7ICAgICAgICAvKiAgQ0VFIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgY2VlX2xpbmtkbnM7ICAgICAgICAvKiAgQ0VFIGxpbmsgZG93biBjb3VudCAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgZmlwX2xpbmt1cHM7ICAgICAgICAvKiAgRklQIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgZmlwX2xpbmtkbnM7ICAgICAgICAvKiAgRklQIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgZmlwX2ZhaWxzOyAgICAgICAgICAvKiAgRklQIGZhaWwgY291bnQgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICB1MzIgICAgbWFjX2ludmFsaWRzOyAgICAgICAvKiAgSW52YWxpZCBtYWMgYXNzaWduZWQgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgY2VlX2xpbmt1cHM7ICAgICAgICAvKiAgQ0VFIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgY2VlX2xpbmtkbnM7ICAgICAgICAvKiAgQ0VFIGxpbmsgZG93biBjb3VudCAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgZmlwX2xpbmt1cHM7ICAgICAgICAvKiAgRklQIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgZmlwX2xpbmtkbnM7ICAgICAgICAvKiAgRklQIGxpbmsgdXAgY291bnQgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgZmlwX2ZhaWxzOyAgICAgICAgICAvKiAgRklQIGZhaWwgY291bnQgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgICAgbWFjX2ludmFsaWRzOyAgICAgICAvKiAgSW52YWxpZCBtYWMgYXNzaWduZWQgICAgICAgICAgICAgICAgKi8KIH07CiAKIC8qCiAgKiBJT0MgZmlybXdhcmUgRkNvRSBwb3J0IHN0YXRzCiAgKi8KIHN0cnVjdCBiZmFfZndfZmNvZV9wb3J0X3N0YXRzX3MgewotCXN0cnVjdCBiZmFfZndfZmNvZV9zdGF0c19zICBmY29lX3N0YXRzOwotCXN0cnVjdCBiZmFfZndfZmlwX3N0YXRzX3MgICBmaXBfc3RhdHM7CisJc3RydWN0IGJmYV9md19mY29lX3N0YXRzX3MJCWZjb2Vfc3RhdHM7CisJc3RydWN0IGJmYV9md19maXBfc3RhdHNfcwkJZmlwX3N0YXRzOwogfTsKIAogLyoKQEAgLTMzNSw4ICszMzYsOCBAQAogICogSU9DIGZpcm13YXJlIEZDIHBvcnQgc3RhdHMKICAqLwogdW5pb24gYmZhX2Z3X2ZjX3BvcnRfc3RhdHNfcyB7Ci0Jc3RydWN0IGJmYV9md19mY191cG9ydF9zdGF0c19zCWZjX3N0YXRzOwotCXN0cnVjd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mU6IGV4Y2VwdGlvbiBldmVudHMgICovCi0JdTMyICAgICAgICBzbV9kZWxfZndyc3A7CSAgICAvKiAgZGVsZXRlOiBmdyByZXNwb25zZXMgICAgICAgKi8KKwl1MzIgICAgICAgIHNtX29mZl91bmV4cDsgICAgLyogIG9mZmxpbmU6IGV4Y2VwdGlvbiBldmVudHMgICovCisJdTMyICAgICAgICBzbV9kZWxfZndyc3A7ICAgIC8qICBkZWxldGU6IGZ3IHJlc3BvbnNlcyAgICAgICAqLwogCXUzMiAgICAgICAgc21fZGVsX2h3ZjsJICAgIC8qICBkZWxldGU6IElPQyBkb3duIGV2ZW50cyAgICAqLwotCXUzMiAgICAgICAgc21fZGVsX3VuZXhwOwkgICAgLyogIGRlbGV0ZTogZXhjZXB0aW9uIGV2ZW50cyAgICovCi0JdTMyICAgICAgICBzbV9kZWxwX2Z3cnNwOwkgICAgLyogIGRlbGV0ZSBwZW5kOiBmdyByZXNwb25zZXMgICovCisJdTMyICAgICAgICBzbV9kZWxfdW5leHA7ICAgIC8qICBkZWxldGU6IGV4Y2VwdGlvbiBldmVudHMgICAqLworCXUzMiAgICAgICAgc21fZGVscF9md3JzcDsgICAvKiAgZGVsZXRlIHBlbmQ6IGZ3IHJlc3BvbnNlcyAgKi8KIAl1MzIgICAgICAgIHNtX2RlbHBfaHdmOwkgICAgLyogIGRlbGV0ZSBwZW5kOiBJT0MgZG93bnMgICAgICovCi0JdTMyICAgICAgICBzbV9kZWxwX3VuZXhwOwkgICAgLyogIGRlbGV0ZSBwZW5kOiBleGNlcHRpb25zICAgICovCi0JdTMyICAgICAgICBzbV9vZmZwX2Z3cnNwOwkgICAgLyogIG9mZi1wZW5kaW5nOiBmdyByZXNwb25zZXMgICovCisJdTMyICAgICAgICBzbV9kZWxwX3VuZXhwOyAgIC8qICBkZWxldGUgcGVuZDogZXhjZXB0aW9ucyAgICAqLworCXUzMiAgICAgICAgc21fb2ZmcF9md3JzcDsgICAvKiAgb2ZmLXBlbmRpbmc6IG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X3Jlc2V0X2Jsb2NrX2NvbmZpZ19hY2Nlc3M7CiAJfQogCiAJaXByX2NtZC0+dS50aW1lX2xlZnQgPSBJUFJfV0FJVF9GT1JfUkVTRVRfVElNRU9VVDsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9pcHIuaCBiL2RyaXZlcnMvc2NzaS9pcHIuaAppbmRleCBhYzg0NzM2Li5iMTNmOWNjIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvaXByLmgKKysrIGIvZHJpdmVycy9zY3NpL2lwci5oCkBAIC0xMzg3LDYgKzEzODcsNyBAQAogCXU4IG1zaV9yZWNlaXZlZDoxOwogCXU4IHNpczY0OjE7CiAJdTggZHVtcF90aW1lb3V0OjE7CisJdTggY2ZnX2xvY2tlZDoxOwogCiAJdTggcmV2aWQ7CiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9pcHMuYyBiL2RyaXZlcnMvc2NzaS9pcHMuYwppbmRleCAyMThmNzFhLi5kNzc4OTFlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvaXBzLmMKKysrIGIvZHJpdmVycy9zY3NpL2lwcy5jCkBAIC00NDk0LDcgKzQ0OTQsNyBAQAogLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiAgIEluaXRpYWxpemUgYSBDQ0IgdG8gZGVmYXVsdCB2YWx1ZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogQVNTVU1FRCB0byBiZSBjYWxsbGVkIGZyb20gd2l0aGluIGEgbG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBBU1NVTUVEIHRvIGJlIGNhbGxlZCBmcm9tIHdpdGhpbiBhIG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1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxMSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtODIsNyArODIsOCBAQAogc3RhdGljIGlubGluZSB2b2lkCiBscGZjX21lbWNweV90b19zbGltKCB2b2lkIF9faW9tZW0gKmRlc3QsIHZvaWQgKnNyYywgdW5zaWduZWQgaW50IGJ5dGVzKQogewotCV9faW93cml0ZTMyX2NvcHkoZGVzdCwgc3JjLCBieXRlcyk7CisJLyogY29udmVydCBieXRlcyBpbiBhcmd1bWVudCBsaXN0IHRvIHdvcmQgY291bnQgZm9yIGNvcHkgZnVuY3Rpb24gKi8KKwlfX2lvd3JpdGUzMl9jb3B5KGRlc3QsIHNyYywgYnl0ZXMgLyBzaXplb2YodWludDMyX3QpKTsKIH0KIAogc3RhdGljIGlubGluZSB2b2lkCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2NydG4uaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3J0bi5oCmluZGV4IDYwZjk1MzQuLjI2OTI0YjcgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3J0bi5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3J0bi5oCkBAIC0yNiw3ICsyNiw3IEBACiB2b2lkIGxwZmNfZHVtcF9tZW0oc3RydWN0IGx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AgICAgKi8KIAl1aW50MzJfdCBjZHNzICAgICAgOiAgMTsgIC8qIENvbmZpZ3VyZSBEYXRhIFNlY3VyaXR5IFNMSSAgICAgICAgICAqLwotCXVpbnQzMl90IHJzdmQyICAgICA6ICAzOyAgLyogUmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJdWludDMyX3QgY2FzYWJ0ICAgIDogIDE7ICAvKiBDb25maWd1cmUgYXN5bmMgYWJ0cyBzdGF0dXMgbm90aWNlICAgKi8KKwl1aW50MzJfdCByc3ZkMiAgICAgOiAgMjsgIC8qIFJlc2VydmVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogCXVpbnQzMl90IGNiZyAgICAgICA6ICAxOyAgLyogQ29uZmlndXJlIEJsb2NrR3VhcmQgICAgICAgICAgICAgICAgICovCiAJdWludDMyX3QgY212ICAgICAgIDogIDE7ICAvKiBDb25maWd1cmUgTWF4IFZQSXMgICAgICAgICAgICAgICAgICAgKi8KIAl1aW50MzJfdCBjY3JwICAgICAgOiAgMTsgIC8qIENvbmZpZyBDb21tYW5kIFJpbmcgUG9sbGluZyAgICAgICAgICAqLwpAQCAtMjgzOSwxNCArMjg0NiwxNiBAQAogCXVpbnQzMl90IGNjcnAgICAgICA6ICAxOyAgLyogQ29uZmlnIENvbW1hbmQgUmluZyBQb2xsaW5nICAgICAgICAgICovCiAJdWludDMyX3QgY212CSAgIDogIDE7ICAvKiBDb25maWd1cmUgTWF4IFZQSXMgICAgICAgICAgICAgICAgICAgKi8KIAl1aW50MzJfdCBjYmcgICAgICAgOiAgMTsgIC8qIENvbmZpZ3VyZSBCbG9ja0d1YXJkICAgICAgICAgICAgICAgICAqLwotCXVpbnQzMl90IHJzdmQyICAgICA6ICAzOyAgLyogUmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJdWludDMyX3QgcnN2ZDIgICAgIDogIDI7ICAvKiBSZXNlcnZlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1aW50MzJfdCBjYXNhYnQgICAgOiAgMTsgIC8qIENvbmZpZ3VyZSBhc3luYyBhYnRzIHN0YXR1cyBub3RpY2UgICAqLwogCXVpbnQzMl90IGNkc3MgICAgICA6ICAxOyAgLyogQ29uZmlndXJlIERhdGEgU2VjdXJpdHkgU0xJICAgICAgICAgICovCiAJdWludDMyX3QgcnN2ZDEgICAgIDogMTk7ICAvKiBSZXNlcnZlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KICNlbmRpZgogI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogCXVpbnQzMl90IHJzdmQzICAgICA6IDE5OyAgLyogUmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAJdWludDMyX3QgZ2RzcyAgICAgIDogIDE7ICAvKiBDb25maWd1cmUgRGF0YSBTZWN1cml0eSBTTEkgICAgICAgICAgKi8KLQl1aW50MzJfdCByc3ZkNCAgICAgOiAgMzsgIC8qIFJlc2VydmVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXVpbnQzMl90IGdhc2FidCAgICA6ICAxOyAgLyogR3JhbnQgYXN5bmMgYWJ0cyBzdGF0dXMgbm90aWNlICAgICAgICovCisJdWludDMyX3QgcnN2ZDQgICAgIDogIDI7ICAvKiBSZXNlcnZlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIAl1aW50MzJfdCBnYmcgICAgICAgOiAgMTsgIC8qIEdyYW50IEJsb2NrR3VhcmQgICAgICAgICAgICAgICAgICAgICAqLwogCXVpbnQzMl90IGdtdgkgICA6ICAxOyAgLyogR3JhbnQgTWF4IFZQSXMgICAgICAgICAgICAgICAgICAgICAgICovCiAJdWludDMyX3QgZ2NycAkgICA6ICAxOyAgLyogR3JhbnQgQ29tbWFuZCBSaW5nIFBvbGxpbmcgICAgICAgICAgICovCkBAIC0yODY2LDcgKzI4NzUsOCBAQAogCXVpbnQzMl90IGdjcnAJICAgOi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ICAgICAgIEFkZGVkIFNlbmQgSG9zdCBNZXNzYWdlIHJlcXVlc3QgYW5kIHJlcGx5LgorICogIDA1LTI1LTExICAwMi4wMC4xOCAgRm9yIEV4dGVuZGVkIEltYWdlIEhlYWRlciwgYWRkZWQKKyAqICAgICAgICAgICAgICAgICAgICAgIE1QSTJfRVhUX0lNQUdFX1RZUEVfTUlOX1BST0RVQ1RfU1BFQ0lGSUMgYW5kCisgKiAgICAgICAgICAgICAgICAgICAgICBNUEkyX0VYVF9JTUFHRV9UWVBFX01BWF9QUk9EVUNUX1NQRUNJRklDIGRlZmluZXMuCisgKiAgICAgICAgICAgICAgICAgICAgICBEZXByZWNhdGVkIE1QSTJfRVhUX0lNQUdFX1RZUEVfTUFYIGRlZmluZS4KKyAqICAwOC0yNC0xMSAgMDIuMDAuMTkgIEFkZGVkIFBoeXNpY2FsUG9ydCBmaWVsZCB0bworICogICAgICAgICAgICAgICAgICAgICAgTVBJMl9FVkVOVF9EQVRBX1NBU19ERVZJQ0VfU1RBVFVTX0NIQU5HRSBzdHJ1Y3R1cmUuCisgKiAgICAgICAgICAgICAgICAgICAgICBNYXJrZWQgTVBJMl9QTV9DT05UUk9MX0ZFQVRVUkVfUENJRV9MSU5LIGFzIG9ic29sZXRlLgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgKi8KIApAQCAtNTc4LDcgKzU4NSw3IEBACiB7CiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgVGFza1RhZzsgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDAwICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgUmVhc29uQ29kZTsgICAgICAgICAgICAgICAgICAgICAvKiAweDAyICovCi0gICAgVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDAzICovCisJVTggICAgICAgICAgICAgICAgICAgICAgUGh5c2ljYWxQb3J0OyAgICAgICAgICAgICAgICAgICAvKiAweDAzICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgQVNDOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDA0ICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgQVNDUTsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDA1ICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgRGV2SGFuZGxlOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDA2ICovCkBAIC0xMzY2LDE2ICsxMzczLDE4IEBACiAjZGVmaW5lIE1QSTJfRVhUX0lNQUdFX0hFQURFUl9TSVpFICAgICAgICAgICAgICAoMHg0MCkKIAogLyogZGVmaW5lcyBmb3IgdGhlIEltYWdlVHlwZSBmaWVsZCAqLwotI2RlZmluZSBNUEkyX0VYVF9JTUFHRV9UWVBFX1VOU1BFQ0lGSUVEICAgICAgICAgKDB4MDApCi0jZGVmaW5lIE1QSTJfRVhUX0lNQUdFX1RZUEVfRlcgICAgICAgICAgICAgICAgICAoMHgwMSkKLSNkZWZpbmUgTVBJMl9FWFRfSU1BR0VfVFlQRV9OVkRBVEEgICAgICAgICAgICAgICgweDAzKQotI2RlZmluZSBNUEkyX0VYVF9JTUFHRV9UWVBFX0JPT1RMT0FERVIgICAgICAgICAgKDB4MDQpCi0jZGVmaW5lIE1QSTJfRVhUX0lNQUdFX1RZUEVfSU5JVElBTElaQVRJT04gICAgICAoMHgwNSkKLSNkZWZpbmUgTVBJMl9FWFRfSU1BR0VfVFlQRV9GTEFTSF9MQVlPVVQgICAgICAgICgweDA2KQotI2RlZmluZSBNUEkyX0VYVF9JTUFHRV9UWVBFX1NVUFBPUlRFRF9ERVZJQ0VTICAgKDB4MDcpCi0jZGVmaW5lIE1QSTJfRVhUX0lNQUdFX1RZUEVfTUVHQVJBSUQgICAgICAgICAgICAoMHgwOCkKLQotI2RlZ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JRF9DT01QQVRfUkVQT1JUX1NPVVJDRV9JTkZPX0ZMQUcgICAgKDB4MDAwMDAwMDEpCisKIAogLyogUkFJRCBWb2x1bWUgSW5kaWNhdG9yIFN0cnVjdHVyZSAqLwogCkBAIC0yNjMsMTUgKzI4Niw0NSBAQAogI2RlZmluZSBNUEkyX1JBSURfVk9MX0ZMQUdTX09QX1JFU1lOQyAgICAgICAgICAgICAgICgweDAwMDAwMDAzKQogI2RlZmluZSBNUEkyX1JBSURfVk9MX0ZMQUdTX09QX01EQyAgICAgICAgICAgICAgICAgICgweDAwMDAwMDA0KQogCisvKiBSQUlEIENvbXBhdGliaWxpdHkgUmVzdWx0IFN0cnVjdHVyZSAqLworCit0eXBlZGVmIHN0cnVjdCBfTVBJMl9SQUlEX0NPTVBBVElCSUxJVFlfUkVTVUxUX1NUUlVDVCB7CisJVTggICAgICAgICAgICAgICAgICAgICAgU3RhdGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDAwICovCisJVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDAxICovCisJVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQyOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDAyICovCisJVTMyICAgICAgICAgICAgICAgICAgICAgR2VuZXJpY0F0dHJpYnV0ZXM7ICAgICAgICAgICAgICAvKiAweDA0ICovCisJVTMyICAgICAgICAgICAgICAgICAgICAgT0VNU3BlY2lmaWNBdHRyaWJ1dGVzOyAgICAgICAgICAvKiAweDA4ICovCisJVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDBDICovCisJVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ0OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDEwICovCit9IE1QSTJfUkFJRF9DT01QQVRJQklMSVRZX1JFU1VMVF9TVFJVQ1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QUk9UT0NPTCAgICAgICAgICgweDAwMDAwMDAyKQorI2RlZmluZSBNUEkyX1JBSURfQ09NUEFUX0dFTkFUVFJJQl9TQVRBX1BST1RPQ09MICAgICAgICAoMHgwMDAwMDAwMSkKIAogLyogUkFJRCBBY3Rpb24gUmVwbHkgQWN0aW9uRGF0YSB1bmlvbiAqLwogdHlwZWRlZiB1bmlvbiBfTVBJMl9SQUlEX0FDVElPTl9SRVBMWV9EQVRBCiB7Ci0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgV29yZFs1XTsKLSAgICBNUEkyX1JBSURfVk9MX0lORElDQVRPUiBSYWlkVm9sdW1lSW5kaWNhdG9yOwotICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFZvbERldkhhbmRsZTsKLSAgICBVOCAgICAgICAgICAgICAgICAgICAgICBWb2x1bWVTdGF0ZTsKLSAgICBVOCAgICAgICAgICAgICAgICAgICAgICBQaHlzRGlza051bTsKKwlVMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV29yZFs1XTsKKwlNUEkyX1JBSURfVk9MX0lORElDQVRPUiAgICAgICAgICAgICAgICAgUmFpZFZvbHVtZUluZGljYXRvcjsKKwlVMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVm9sRGV2SGFuZGxlOworCVU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x1bWVTdGF0ZTsKKwlVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGh5c0Rpc2tOdW07CisJTVBJMl9SQUlEX0NPTVBBVElCSUxJVFlfUkVTVUxUX1NUUlVDVCAgIFJhaWRDb21wYXRpYmlsaXR5UmVzdWx0OwogfSBNUEkyX1JBSURfQUNUSU9OX1JFUExZX0RBVEEsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9SQUlEX0FDVElPTl9SRVBMWV9EQVRBLAogICBNcGkyUmFpZEFjdGlvblJlcGx5RGF0YV90LCBNU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VC4KICAqICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICovCiAKQEAgLTE4MSw3ICsxODMsNyBAQAogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIERldkluZGV4OyAgICAgICAgICAgICAgICAgICAvKiAweDE0ICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgQWN0aW9uOyAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTUgKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBTR0xGbGFnczsgICAgICAgICAgICAgICAgICAgLyogMHgxNiAqLwotICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNzsgICAgICAgICAgICAgICAgICAvKiAweDE3ICovCisJIFU4ICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE3ICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgVHhEYXRhTGVuZ3RoOyAgICAgICAgICAgICAgIC8qIDB4MTggKi8KICAgICBVMTYgICAgICAgICAgICAgICAgICAgICBSeERhdGFMZW5ndGg7ICAgICAgICAgICAgICAgLyogMHgxQSAqLwogICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkODsgICAgICAgICAgICAgICAgICAvKiAweDFDICovCkBAIC0yMDUsNiArMjA3LDkgQEAKIAogLyogdXNlIE1QSTJfU0dMRkxBR1NfIGRlZmluZXMgZnJvbSBtcGkyLmggZm9yIHRoZSBTR0xGbGFncyBmaWVsZCAqLwogCisvKiB2YWx1ZXMgZm9yIHRoZSBGbGFncyBmaWVsZCAqLworI2RlZmluZSBNUEkyX1RPT0xfSVNUV0lfRkxBR19BVVRPX1JFU0VSVkVfUkVMRUFTRSAgICgweDgwKQorI2RlZmluZSBNUEkyX1RPT0xfSVNUV0lfRkxBR19QQUdFX0FERFJfTUFTS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BRdWV1ZSBDb21tYW5kIGFuZCBJTyB0cmFjaW5nIHwgICAgICAgMHgzMDJlICAgICAgIHwgICAgIDB4MzAwOCAgICAgfAorICogfCBEZXZpY2UgRGlzY292ZXJ5ICAgICAgICAgICAgIHwgICAgICAgMHgyMDg0ICAgICAgIHwJCXwKKyAqIHwgUXVldWUgQ29tbWFuZCBhbmQgSU8gdHJhY2luZyB8ICAgICAgIDB4MzAyZiAgICAgICB8IDB4MzAwOCwweDMwMmQsIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MzAyZSAgICAgICAgIHwKICAqIHwgRFBDIFRocmVhZCAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4NDAxYyAgICAgICB8CQl8Ci0gKiB8IEFzeW5jIEV2ZW50cyAgICAgICAgICAgICAgICAgfCAgICAgICAweDUwNTkgICAgICAgfAkJfAotICogfCBUaW1lciBSb3V0aW5lcyAgICAgICAgICAgICAgIHwgICAgICAgMHg2MDEwICAgICAgIHwgMHg2MDBlLDB4NjAwZiAgfAotICogfCBVc2VyIFNwYWNlIEludGVyYWN0aW9ucyAgICAgIHwgICAgICAgMHg3MDlkICAgICAgIHwJCXwKLSAqIHwgVGFzayBNYW5hZ2VtZW50ICAgICAgICAgICAgICB8ICAgICAgIDB4ODA0MSAgICAgICB8IDB4ODAwYiAgICAgICAgIHwKKyAqIHwgQXN5bmMgRXZlbnRzICAgICAgICAgICAgICAgICB8ICAgICAgIDB4NTA1NyAgICAgICB8IDB4NTA1MgkJfAorICogfCBUaW1lciBSb3V0aW5lcyAgICAgICAgICAgICAgIHwgICAgICAgMHg2MDExICAgICAgIHwgMHg2MDBlLDB4NjAwZiAgfAorICogfCBVc2VyIFNwYWNlIEludGVyYWN0aW9ucyAgICAgIHwgICAgICAgMHg3MDllICAgICAgIHwgMHg3MDE4LDB4NzAyZSAgfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MDM5LDB4NzA0NSAgfAorICogfCBUYXNrIE1hbmFnZW1lbnQgICAgICAgICAgICAgIHwgICAgICAgMHg4MDNjICAgICAgIHwgMHg4MDI1LTB4ODAyNiAgfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg4MDBiLDB4ODAzOSAgfAogICogfCBBRVIvRUVIICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHg5MDBmICAgICAgIHwJCXwKICAqIHwgVmlydHVhbCBQb3J0ICAgICAgICAgICAgICAgICB8ICAgICAgIDB4YTAwNyAgICAgICB8CQl8CiAgKiB8IElTUDgyWFggU3BlY2lmaWMgICAgICAgICAgICAgfCAgICAgICAweGIwNTIgICAgICAgfCAgICAJCXwKQEAgLTM2OCw3ICszNzEsNyBAQAogCiAJbWVtY3B5KGl0ZXJfcmVnLCBoYS0+ZmNlLCBudG9obChmY2VjLT5zaXplKSk7CiAKLQlyZXR1cm4gaXRlcl9yZWc7CisJcmV0dXJuIChjaGFyICopaXRlcl9yZWcgKyBudG9obChmY2VjLT5zaXplKTsKIH0KIAogc3RhdGljIGlubGluZSB2b2lkICoKQEAgLTE2NTAsNiArMTY1MywxNSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICBEcml2ZXIgRGVidWcgRnVuY3Rpb25zLiAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW5saW5lIGludAorcWxfbWFza19tYXRjaCh1aW50MzJfdCBsZXZlbCkKK3sKKwlpZiAocWwyeGV4dGVuZGVkX2Vycm9yX2xvZ2dpbmcgPT0gMS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YWNoZXAsIGFzbWEpOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBzc2l6ZV90IGFzaG1lbV9yZWFkKHN0cnVjdCBmaWxlICpmaWxlLCBjaGFyIF9fdXNlciAqYnVmLAorCQkJICAgc2l6ZV90IGxlbiwgbG9mZl90ICpwb3MpCit7CisJc3RydWN0IGFzaG1lbV9hcmVhICphc21hID0gZmlsZS0+cHJpdmF0ZV9kYXRhOworCWludCByZXQgPSAwOworCisJbXV0ZXhfbG9jaygmYXNobWVtX211dGV4KTsKKworCS8qIElmIHNpemUgaXMgbm90IHNldCwgb3Igc2V0IHRvIDAsIGFsd2F5cyByZXR1cm4gRU9GLiAqLworCWlmIChhc21hLT5zaXplID09IDApCisJCWdvdG8gb3V0OworCisJaWYgKCFhc21hLT5maWxlKSB7CisJCXJldCA9IC1FQkFERjsKKwkJZ290byBvdXQ7CisJfQorCisJcmV0ID0gYXNtYS0+ZmlsZS0+Zl9vcC0+cmVhZChhc21hLT5maWxlLCBidWYsIGxlbiwgcG9zKTsKKwlpZiAocmV0IDwgMCkKKwkJZ290byBvdXQ7CisKKwkvKiogVXBkYXRlIGJhY2tpbmcgZmlsZSBwb3MsIHNpbmNlIGZfb3BzLT5yZWFkKCkgZG9lc24ndCAqLworCWFzbWEtPmZpbGUtPmZfcG9zID0gKnBvczsKKworb3V0OgorCW11dGV4X3VubG9jaygmYXNobWVtX211dGV4KTsKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgbG9mZl90IGFzaG1lbV9sbHNlZWsoc3RydWN0IGZpbGUgKmZpbGUsIGxvZmZfdCBvZmZzZXQsIGludCBvcmlnaW4pCit7CisJc3RydWN0IGFzaG1lbV9hcmVhICphc21hID0gZmlsZS0+cHJpdmF0ZV9kYXRhOworCWludCByZXQ7CisKKwltdXRleF9sb2NrKCZhc2htZW1fbXV0ZXgpOworCisJaWYgKGFzbWEtPnNpemUgPT0gMCkgeworCQlyZXQgPSAtRUlOVkFMOworCQlnb3RvIG91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hvdywgaW5vZGUtPmlfcHJpdmF0ZSk7IFwKK30gXAorXAorc3RhdGljIGNvbnN0IHN0cnVjdCBmaWxlX29wZXJhdGlvbnMgYmluZGVyXyMjbmFtZSMjX2ZvcHMgPSB7IFwKKwkub3duZXIgPSBUSElTX01PRFVMRSwgXAorCS5vcGVuID0gYmluZGVyXyMjbmFtZSMjX29wZW4sIFwKKwkucmVhZCA9IHNlcV9yZWFkLCBcCisJLmxsc2VlayA9IHNlcV9sc2VlaywgXAorCS5yZWxlYXNlID0gc2luZ2xlX3JlbGVhc2UsIFwKK30KKworc3RhdGljIGludCBiaW5kZXJfcHJvY19zaG93KHN0cnVjdCBzZXFfZmlsZSAqbSwgdm9pZCAqdW51c2VkKTsKK0JJTkRFUl9ERUJVR19FTlRSWShwcm9jKTsKKworLyogVGhpcyBpcyBvbmx5IGRlZmluZWQgaW4gaW5jbHVkZS9hc20tYXJtL3NpemVzLmggKi8KKyNpZm5kZWYgU1pfMUsKKyNkZWZpbmUgU1pfMUsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNlbmRpZgorCisjaWZuZGVmIFNaXzRNCisjZGVmaW5lIFNaXzRNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDAwCisjZW5kaWYKKworI2RlZmluZSBGT1JCSURERU5fTU1BUF9GTEFHUyAgICAgICAgICAgICAgICAoVk1fV1JJVEUpCisKKyNkZWZpbmUgQklOREVSX1NNQUxMX0JVRl9TSVpFIChQQUdFX1NJWkUgKiA2NCkKKworZW51bSB7CisJQklOREVSX0RFQlVHX1VTRVJfRVJST1IgICAgICAgICAgICAgPSAxVSA8PCAwLAorCUJJTkRFUl9ERUJVR19GQUlMRURfVFJBTlNBQ1RJT04gICAgID0gMVUgPDwgMSwKKwlCSU5ERVJfREVCVUdfREVBRF9UUkFOU0FDVElPTiAgICAgICA9IDFVIDw8IDIsCisJQklOREVSX0RFQlVHX09QRU5fQ0xPU0UgICAgICAgICAgICAgP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Ci0JCQkJICAgICh1OClnZW5fY3RybF92YWwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTURGTERfRFNJX1NFTkRfUEFDS0FHRSk7Ci0KLQotCQkvKiBFbmFibGUgYmFja2xpZ2h0IGNvbnRyb2wgKi8KLQkJaWYgKGxldmVsID09IDApCi0JCQlnZW5fY3RybF92YWwgPSAwOwotCQllbHNlIAotCQkJZ2VuX2N0cmxfdmFsID0gZGV2X3ByaXYtPm1pcGlfY3RybF9kaXNwbGF5OwotCi0JCW1kZmxkX2RzaV9zZW5kX21jc19zaG9ydF9ocyhzZW5kZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZV9jdHJsX2Rpc3BsYXksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1OClnZW5fY3RybF92YWwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ERkxEX0RTSV9TRU5EX1BBQ0tBR0UpOwotCX0KLX0KLQotLyoKLSAqIHNodXQgZG93biBEU0kgY29udHJvbGxlcgotICovIAotdm9pZCBtZGZsZF9kc2lfY29udHJvbGxlcl9zaHV0ZG93bihzdHJ1Y3QgbWRmbGRfZHNpX2NvbmZpZyAqIGRzaV9jb25maWcsIGludCBwaXBlKQotewotCXN0cnVjdCBkcm1fZGV2aWNlICogZGV2OwotCXUzMiByZWdfb2Zmc2V0ID0gcGlwZSA/IE1JUElDX1JFR19PRkZTRVQgOiAwOwotCWludCByZXRyeSA9IDEwMDsKLQkKLQlpZiAoIWRzaV9jb25maWcpIHsKLQkgICAgICAgIFdBUk5fT04oMSk7Ci0JCXJldHVybjsKLQl9Ci0JCi0JZGV2ID0gZHNpX2NvbmZpZy0+ZGV2OwotCQotCWlmICghZ21hX3Bvd2VyX2JlZ2luKGRldi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kxEX0RPVF9NSU4sIC5tYXggPSBNREZMRF9ET1RfTUFYfSwKLQkgLm0gPSB7Lm1pbiA9IE1ERkxEX0RQTExfTV9NSU5fODMsIC5tYXggPSBNREZMRF9EUExMX01fTUFYXzgzfSwKLQkgLnAxID0gey5taW4gPSBNREZMRF9EUExMX1AxX01JTl84MywgLm1heCA9IE1ERkxEX0RQTExfUDFfTUFYXzgzfSwKLQkgfSwKLQl7CQkJLyogTURGTERfTElNVF9EUExMXzEwMCAqLwotCSAuZG90ID0gey5taW4gPSBNREZMRF9ET1RfTUlOLCAubWF4ID0gTURGTERfRE9UX01BWH0sCi0JIC5tID0gey5taW4gPSBNREZMRF9EUExMX01fTUlOXzEwMCwgLm1heCA9IE1ERkxEX0RQTExfTV9NQVhfMTAwfSwKLQkgLnAxID0gey5taW4gPSBNREZMRF9EUExMX1AxX01JTl8xMDAsIC5tYXggPSBNREZMRF9EUExMX1AxX01BWF8xMDB9LAotCSB9LAotCXsJCQkvKiBNREZMRF9MSU1UX0RTSVBMTF8xOSAqLwotCSAuZG90ID0gey5taW4gPSBNREZMRF9ET1RfTUlOLCAubWF4ID0gTURGTERfRE9UX01BWH0sCi0JIC5tID0gey5taW4gPSBNREZMRF9EU0lQTExfTV9NSU5fMTksIC5tYXggPSBNREZMRF9EU0lQTExfTV9NQVhfMTl9LAotCSAucDEgPSB7Lm1pbiA9IE1ERkxEX0RTSVBMTF9QMV9NSU5fMTksIC5tYXggPSBNREZMRF9EU0lQTExfUDFfTUFYXzE5fSwKLQkgfSwKLQl7CQkJLyogTURGTERfTElNVF9EU0lQTExfMjUgKi8KLQkgLmRvdCA9IHsubWluID0gTURGTERfRE9UX01JTiwgLm1heCA9IE1ERkxEX0RPVF9NQVh9LAotCSAubSA9IHsubWluID0gTURGTERfRFNJUExMX01fTUlOXzI1LCAubWF4ID0gTURGTERfRFNJUExMX01fTUFYXzI1fSwKLQkgLnAxID0gey5taW4gPSBNREZMRF9EU0lQTExfUDFfTUlOXzI1LCA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VmaW5lIFBTQl9NQVNLKGhpZ2gsIGxvdykgKCgoMTw8KChoaWdoKS0obG93KSsxKSktMSk8PChsb3cpKQotI2RlZmluZSBTRVRfRklFTEQodmFsdWUsIGZpZWxkKSAoKCh2YWx1ZSkgPDwgZmllbGQgIyMgX1NISUZUKSAmIGZpZWxkICMjIF9NQVNLKQotI2RlZmluZSBHRVRfRklFTEQod29yZCwgZmllbGQpICgoKHdvcmQpICAmIGZpZWxkICMjIF9NQVNLKSA+PiBmaWVsZCAjIyBfU0hJRlQpCi0KLSNkZWZpbmUgX1BJUEUocGlwZSwgYSwgYikgKChhKSArIChwaXBlKSooKGIpLShhKSkpCi0KLS8qIFBDSSBjb25maWcgc3BhY2UgKi8KLQotI2RlZmluZSBTQl9QQ0tUICAgICAgICAgMHgwMjEwMCAvKiBjZWRhcnZpZXcgKi8KLSMgZGVmaW5lIFNCX09QQ09ERV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIFBTQl9NQVNLKDMxLCAxNikKLSMgZGVmaW5lIFNCX09QQ09ERV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDE2Ci0jIGRlZmluZSBTQl9PUENPREVfUkVBRCAgICAgICAgICAgICAgICAgICAgICAgICAwCi0jIGRlZmluZSBTQl9PUENPREVfV1JJVEUgICAgICAgICAgICAgICAgICAgICAgICAxCi0jIGRlZmluZSBTQl9ERVNUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICBQU0JfTUFTSygxNSwgOCkKLSMgZGVmaW5lIFNCX0RFU1RfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDgKLSMgZGVmaW5lIFNCX0RFU1RfRFBMTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODgKLSMgZGVmaW5lIFNCX0JZVEVfRU5BQkxFX01BU0sgICAgICAgICAgICAgICAgICAgIFBTQl9NQVNLKDcsIDQpCi0jIGRlZmluZSBTQl9CWVRFX0VOQUJMRV9TSElGVCAgICAgICAgICAgICAgICAgIC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gICAgICAgfSwKLQl7ICJQT0R4dCIsICAgICAgICAgIlBPRHh0IiwgICAgICAgICAgICBMSU5FNl9CSVRfUE9EWFQsICAgICAgICAgTElORTZfQklUX0NPTlRST0xfUENNX0hXTU9OIH0sCi0JeyAiUE9EeHRMaXZlIiwgICAgICJQT0R4dCBMaXZlIiwgICAgICAgTElORTZfQklUX1BPRFhUTElWRSwgICAgIExJTkU2X0JJVF9DT05UUk9MX1BDTV9IV01PTiB9LAotCXsgIlBPRHh0UHJvIiwgICAgICAiUE9EeHQgUHJvIiwgICAgICAgIExJTkU2X0JJVF9QT0RYVFBSTywgICAgICBMSU5FNl9CSVRfQ09OVFJPTF9QQ01fSFdNT04gfSwKLQl7ICJUb25lUG9ydEdYIiwgICAgIlRvbmVQb3J0IEdYIiwgICAgICBMSU5FNl9CSVRfVE9ORVBPUlRfR1gsICAgTElORTZfQklUX1BDTSAgICAgICAgICAgICAgIH0sCi0JeyAiVG9uZVBvcnRVWDEiLCAgICJUb25lUG9ydCBVWDEiLCAgICAgTElORTZfQklUX1RPTkVQT1JUX1VYMSwgIExJTkU2X0JJVF9QQ00gICAgICAgICAgICAgICB9LAotCXsgIlRvbmVQb3J0VVgyIiwgICAiVG9uZVBvcnQgVVgyIiwgICAgIExJTkU2X0JJVF9UT05FUE9SVF9VWDIsICBMSU5FNl9CSVRfUENNICAgICAgICAgICAgICAgfSwKLQl7ICJWYXJpYXgiLCAgICAgICAgIlZhcmlheCBXb3JrYmVuY2giLCBMSU5FNl9CSVRfVkFSSUFYLCAgICAgICAgTElORTZfQklUX0NPTlRST0wgICAgICAgICAgIH0KKwl7IExJTkU2X0JJVF9CQVNTUE9EWFQsICAgICAiQmFzc1BPRHh0IiwgICAgICJCYXNzUE9EeHQiLCAgICAgICAgTElORTZfQklUX0NPTlRST0xfUENNX0hXTU9OIH0sCisJeyBMSU5FNl9CSVRfQkFTU1BPRFhUTElWRSwgIkJhc3NQT0R4dExpdmUiLCAiQmFzc1BPRHh0IExpdmU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lBPRFgzIiwgICAgICAgICAiUE9EIFgzIiwgICAgICAgICAgIExJTkU2X0JJVF9QQ00gICAgICAgICAgICAgICB9LAorCXsgTElORTZfQklUX1BPRFgzTElWRSwgICAgICJQT0RYM0xpdmUiLCAgICAgIlBPRCBYMyBMaXZlIiwgICAgICBMSU5FNl9CSVRfUENNICAgICAgICAgICAgICAgfSwKKwl7IExJTkU2X0JJVF9QT0RYVCwgICAgICAgICAiUE9EeHQiLCAgICAgICAgICJQT0R4dCIsICAgICAgICAgICAgTElORTZfQklUX0NPTlRST0xfUENNX0hXTU9OIH0sCisJeyBMSU5FNl9CSVRfUE9EWFRMSVZFLCAgICAgIlBPRHh0TGl2ZSIsICAgICAiUE9EeHQgTGl2ZSIsICAgICAgIExJTkU2X0JJVF9DT05UUk9MX1BDTV9IV01PTiB9LAorCXsgTElORTZfQklUX1BPRFhUUFJPLCAgICAgICJQT0R4dFBybyIsICAgICAgIlBPRHh0IFBybyIsICAgICAgICBMSU5FNl9CSVRfQ09OVFJPTF9QQ01fSFdNT04gfSwKKwl7IExJTkU2X0JJVF9UT05FUE9SVF9HWCwgICAiVG9uZVBvcnRHWCIsICAgICJUb25lUG9ydCBHWCIsICAgICAgTElORTZfQklUX1BDTSAgICAgICAgICAgICAgIH0sCisJeyBMSU5FNl9CSVRfVE9ORVBPUlRfVVgxLCAgIlRvbmVQb3J0VVgxIiwgICAiVG9uZVBvcnQgVVgxIiwgICAgIExJTkU2X0JJVF9QQ00gICAgICAgICAgICAgICB9LAorCXsgTElORTZfQklUX1RPTkVQT1JUX1VYMiwgICJUb25lUG9ydFVYMiIsICAgIlRvbmVQb3J0IFVYMiIsICAgICBMSU5FNl9CSVRfUENNICAgICAgICAgICAgICAgfSwKKwl7IExJTkU2X0JJVF9WQVJJQVgsICAgICAgICAiVmFyaWF4IiwgICAgICAgICJWYXJpYXggV29ya2JlbmNoIiwgTElORTZfQklUX0NPTlRST0wgICAgICAgICAgIH0sCiB9OwogLyogKklOREVOVC1PT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gICAgICAgICAgICAgPSAweDAwMDEsCi0gICBDT05UUk9MX1BST0NfVFVSTk9OX1JTUCAgICAgICAgICAgPSAweDAxMDAsCi0gICBDT05UUk9MX1BST0NfU0VUX1JFR0lTVEVSICAgICAgICAgPSAweDAwMDIsCi0gICBDT05UUk9MX1BST0NfU0VUX1JFR0lTVEVSX1JTUCAgICAgPSAweDAyMDAsCi0gICBDT05UUk9MX1BST0NfR0VUX1JFR0lTVEVSICAgICAgICAgPSAweDAwMDMsCi0gICBDT05UUk9MX1BST0NfR0VUX1JFR0lTVEVSX1JTUCAgICAgPSAweDAzMDAsCi0gICBDT05UUk9MX1BST0NfU0VUVFVORSAgICAgICAgICAgICAgPSAweDAwMEEsCi0gICBDT05UUk9MX1BST0NfU0VUVFVORV9SU1AgICAgICAgICAgPSAweDBBMDAsCi0gICBDT05UUk9MX1BST0NfR0VUVFVORVNUQVQgICAgICAgICAgPSAweDAwMEIsCi0gICBDT05UUk9MX1BST0NfR0VUVFVORVNUQVRfUlNQICAgICAgPSAweDBCMDAsCi0gICBDT05UUk9MX1BST0NfR0VUVFBTICAgICAgICAgICAgICAgPSAweDAwMEQsCi0gICBDT05UUk9MX1BST0NfR0VUVFBTX1JTUCAgICAgICAgICAgPSAweDBEMDAsCi0gICBDT05UUk9MX1BST0NfU0VURklMVEVSICAgICAgICAgICAgPSAweDAwMEUsCi0gICBDT05UUk9MX1BST0NfU0VURklMVEVSX1JTUCAgICAgICAgPSAweDBFMDAsCi0gICBDT05UUk9MX1BST0NfUkVNT1ZFRklMVEVSICAgICAgICAgPSAweDAwMEYsCi0gICBDT05UUk9MX1BST0NfUkVNT1ZFRklMVEVSX1JTUCAgICAgPSAweDBGMDAsCi0gICBDT05UUk9MX1BST0NfR0VUX0lNUFVMU0VfUkVTUCAgICAgPSAweDAwMTIsCi0gICBDT05UUk9MX1BST0NfR0VUX0lNUFVMU0VfUkVTUF9SU1AgPSAweDEyMDAsCi0gICBDT05UUk9MX1BST0NfU1RBUlRfU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XF1ZXN0IGlkZW50aWZpZXIgKi8KLSAgICAgIHVpbnQxNl90ICBwcm9jX2lkOwotICAgfSByZXE7Ci0gICAvKiByZXNwb25zZSAqLwotICAgc3RydWN0IHsKLSAgICAgIC8qIHJlc3BvbnNlIGlkZW50aWZpZXIgKi8KLSAgICAgIHVpbnQxNl90IHByb2NfaWQ7Ci0gICAgICAvKiByZXNwb25zZSBlcnJvciAqLwotICAgICAgdWludDhfdCBlcnJvcjsKLSAgIH0gcnNwOwotfSBDT01NT047Cit1bmlvbiBhczEweF9hZGRfcGlkX2ZpbHRlciB7CisJLyogcmVxdWVzdCAqLworCXN0cnVjdCB7CisJCS8qIHJlcXVlc3QgaWRlbnRpZmllciAqLworCQl1aW50MTZfdCAgcHJvY19pZDsKKwkJLyogUElEIHRvIGZpbHRlciAqLworCQl1aW50MTZfdCAgcGlkOworCQkvKiBzdHJlYW0gdHlwZSAoTVBFLCBQU0kvU0kgb3IgUEVTICkqLworCQl1aW50OF90IHN0cmVhbV90eXBlOworCQkvKiBQSUQgaW5kZXggaW4gZmlsdGVyIHRhYmxlICovCisJCXVpbnQ4X3QgaWR4OworCX0gcmVxOworCS8qIHJlc3BvbnNlICovCisJc3RydWN0IHsKKwkJLyogcmVzcG9uc2UgaWRlbnRpZmllciAqLworCQl1aW50MTZfdCBwcm9jX2lkOworCQkvKiByZXNwb25zZSBlcnJvciAqLworCQl1aW50OF90IGVycm9yOworCQkvKiBGaWx0ZXIgaWQgKi8KKwkJdWludDhfdCBmaWx0ZXJfaWQ7CisJfSByc3A7Cit9IF9fcGFja2VkOwogCi10eXBlZGVmIHVuaW9uIHsKLSAgIC8qIHJlcXVlc3QgKi8KLSAgIHN0cnVjdCB7Ci0gICAgICAvKiByZXF1ZXN0IGlkZW50aWZpZXIgKi8KLSAgICAgIHVpbnQxNl90ICBwcm9jX2lkOwotICAgICAgLyogUElEIHRvIGZpbHRlciAqLwotICAgICAgdWludDE2X3QgIHBpZDsKLSAgICAgIC8qIHN0cmVhbSB0eXBlIChNUEUsIFBTSS9TSSBvciBQRVMgKSovCi0gICAgICB1aW50OF90IHN0cmVhbV90eXBlOwotICAgICAgLyogUElEIGluZGV4IGluIGZpbHRlciB0YWJsZSAqLwotICAgICAgdWludDhfdCBpZHg7Ci0gICB9IHJlcTsKLSAgIC8qIHJlc3BvbnNlICovCi0gICBzdHJ1Y3QgewotICAgICAgLyogcmVzcG9uc2UgaWRlbnRpZmllciAqLwotICAgICAgdWludDE2X3QgcHJvY19pZDsKLSAgICAgIC8qIHJlc3BvbnNlIGVycm9yICovCi0gICAgICB1aW50OF90IGVycm9yOwotICAgICAgLyogRmlsdGVyIGlkICovCi0gICAgICB1aW50OF90IGZpbHRlcl9pZDsKLSAgIH0gcnNwOwotfSBBRERfUElEX0ZJTFRFUjsKK3VuaW9uIGFzMTB4X2RlbF9waWRfZmlsdGVyIHsKKwkvKiByZXF1ZXN0ICovCisJc3RydWN0IHsKKwkJLyogcmVxdWVzdCBpZGVudGlmaWVyICovCisJCXVpbnQxNl90ICBwcm9jX2lkOworCQkvKiBQSUQgdG8gcmVtb3ZlICovCisJCXVpbnQxNl90ICBwaWQ7CisJfSByZXE7CisJLyogcmVzcG9uc2UgKi8KKwlzdHJ1Y3QgeworCQkvKiByZXNwb25zZSBpZGVudGlmaWVyICovCisJCXVpbnQxNl90IHByb2NfaWQ7CisJCS8qIHJlc3BvbnNlIGVycm9yICovCisJCXVpbnQ4X3QgZXJyb3I7CisJfSByc3A7Cit9IF9fcGFja2VkOwogCi10eXBlZGVmIHVuaW9uIHsKLSAgIC8qIHJlcXVlc3QgKi8KLSAgIHN0cnVjdCB7Ci0gICAgICAvKiByZXF1ZXN0IGlkZW50aWZpZXIgKi8KLSAgICAgIHVpbnQxNl90ICBwcm9jX2lkOwotICAgICAgLyogUElEIHRvIHJlbW92ZSAqLwotICAgICAgdWludDE2X3QgIHBpZDsKLSAgIH0gcmVxOwotICAgLyogcmVzcG9uc2UgKi8KLSAgIHN0cnVjdCB7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AgLyogcmVzcG9uc2UgKi8KLSAgIHN0cnVjdCB7Ci0gICAgICAvKiByZXNwb25zZSBpZGVudGlmaWVyICovCi0gICAgICB1aW50MTZfdCBwcm9jX2lkOwotICAgICAgLyogdmFsdWUgcmVhZCAoZm9yIGdldCBjb250ZXh0KSAqLwotICAgICAgc3RydWN0IGFzMTB4X3JlZ2lzdGVyX3ZhbHVlIHJlZ192YWw7Ci0gICAgICAvKiBjb250ZXh0IHJlcXVlc3QgdHlwZSAqLwotICAgICAgdWludDE2X3QgdHlwZTsKLSAgICAgIC8qIGVycm9yICovCi0gICAgICB1aW50OF90IGVycm9yOwotICAgfSByc3A7Ci19IEZXX0NPTlRFWFQ7Cit1bmlvbiBhczEweF9zZXRfcmVnaXN0ZXIgeworCS8qIHJlcXVlc3QgKi8KKwlzdHJ1Y3QgeworCQkvKiByZXNwb25zZSBpZGVudGlmaWVyICovCisJCXVpbnQxNl90IHByb2NfaWQ7CisJCS8qIHJlZ2lzdGVyIGRlc2NyaXB0aW9uICovCisJCXN0cnVjdCBhczEweF9yZWdpc3Rlcl9hZGRyIHJlZ19hZGRyOworCQkvKiByZWdpc3RlciBjb250ZW50ICovCisJCXN0cnVjdCBhczEweF9yZWdpc3Rlcl92YWx1ZSByZWdfdmFsOworCX0gcmVxOworCS8qIHJlc3BvbnNlICovCisJc3RydWN0IHsKKwkJLyogcmVzcG9uc2UgaWRlbnRpZmllciAqLworCQl1aW50MTZfdCBwcm9jX2lkOworCQkvKiBlcnJvciAqLworCQl1aW50OF90IGVycm9yOworCX0gcnNwOworfSBfX3BhY2tlZDsKIAotdHlwZWRlZiB1bmlvbiB7Ci0gICAvKiByZXF1ZXN0ICovCi0gICBzdHJ1Y3QgewotICAgICAgLyogcmVzcG9uc2UgaWRlbnRpZmllciAqLwotICAgICAgdWludDE2X3QgcHJvY19pZDsKLSAgICAgIC8qIHJlZ2lzdGVyIGRlc2NyaXB0aW9uICovCi0gICAgICBzdHJ1Y3QgYXMxMHhfcmVna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Q0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hczEwMi9hczEweF90eXBlcy5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hczEwMi9hczEweF90eXBlcy5oCkBAIC0yNiwxNzMgKzI2LDE2OSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyogYmFuZHdpZHRoIGNvbnN0YW50IHZhbHVlcyAqLwotI2RlZmluZSBCV181X01IWiAgICAgICAgICAgMHgwMAotI2RlZmluZSBCV182X01IWiAgICAgICAgICAgMHgwMQotI2RlZmluZSBCV183X01IWiAgICAgICAgICAgMHgwMgotI2RlZmluZSBCV184X01IWiAgICAgICAgICAgMHgwMworI2RlZmluZSBCV181X01IWgkJMHgwMAorI2RlZmluZSBCV182X01IWgkJMHgwMQorI2RlZmluZSBCV183X01IWgkJMHgwMgorI2RlZmluZSBCV184X01IWgkJMHgwMwogCiAvKiBoaWVyYXJjaHkgcHJpb3JpdHkgc2VsZWN0aW9uIHZhbHVlcyAqLwotI2RlZmluZSBISUVSX05PX1BSSU9SSVRZICAgMHgwMAotI2RlZmluZSBISUVSX0xPV19QUklPUklUWSAgMHgwMQotI2RlZmluZSBISUVSX0hJR0hfUFJJT1JJVFkgMHgwMgorI2RlZmluZSBISUVSX05PX1BSSU9SSVRZCTB4MDAKKyNkZWZpbmUgSElFUl9MT1dfUFJJT1JJVFkJMHgwMQorI2RlZmluZSBISUVSX0hJR0hfUFJJT1JJVFkJMHgwMgogCiAvKiBjb25zdGVsbGF0aW9uIGF2YWlsYWJsZSB2YWx1ZXMgKi8KLSNkZWZpbmUgQ09OU1RfUVBTSyAgICAgICAgIDB4MDAKLSNkZWZpbmUgQ09OU1RfUUFNMTYgICAgICAgIDB4MDEKLSNkZWZpbmUgQ09OU1RfUUFNNjQgICAgICAgIDB4MDIKLSNkZWZpbmUgQ09OU1RfVU5LTk9XTiAgICAgIDB4RkYKKyNkZWZpbmUgQ09OU1R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AgICAgICAgICAgbWVyaXRfc2FhKHN0cnVjdCB1c2JfZGV2aWNlICopOwotaW50ICAgICAgICAgICAgICBjaGVja192dChzdHJ1Y3QgdXNiX2RldmljZSAqKTsKLWludCAgICAgICAgICAgICAgc2VsZWN0X2lucHV0KHN0cnVjdCB1c2JfZGV2aWNlICosIGludCwgaW50KTsKLWludCAgICAgICAgICAgICAgc2V0X3Jlc29sdXRpb24oc3RydWN0IHVzYl9kZXZpY2UgKiwKLQkJCQkJCXUxNiwgdTE2LCB1MTYsIHUxNik7CitpbnQgc2V0dXBfc3RrKHN0cnVjdCB1c2JfZGV2aWNlICosIGJvb2wpOworaW50IHNldHVwX3NhYShzdHJ1Y3QgdXNiX2RldmljZSAqLCBib29sKTsKK2ludCByZWFkeV9zYWEoc3RydWN0IHVzYl9kZXZpY2UgKik7CitpbnQgbWVyaXRfc2FhKHN0cnVjdCB1c2JfZGV2aWNlICopOworaW50IGNoZWNrX3Z0KHN0cnVjdCB1c2JfZGV2aWNlICopOworaW50IHNlbGVjdF9pbnB1dChzdHJ1Y3QgdXNiX2RldmljZSAqLCBpbnQsIGludCk7CitpbnQgc2V0X3Jlc29sdXRpb24oc3RydWN0IHVzYl9kZXZpY2UgKiwgdTE2LCB1MTYsIHUxNiwgdTE2KTsKIAotaW50ICAgICAgICAgICAgICByZWFkX3NhYShzdHJ1Y3QgdXNiX2RldmljZSAqLCB1MTYpOwotaW50ICAgICAgICAgICAgICByZWFkX3N0ayhzdHJ1Y3QgdXNiX2RldmljZSAqLCB1MzIpOwotaW50ICAgICAgICAgICAgICB3cml0ZV9zYWEoc3RydWN0IHVzYl9kZXZpY2UgKiwgdTE2LCB1MTYpOwotaW50ICAgICAgICAgICAgICB3cml0ZV8wMDAoc3RydWN0IHVzYl9kZXZpY2UgKiwgdTE2LCB1MTYpOwotaW50ICAgICAgICAgICAgICBzdGFydF8xMDAoc3RydWN0IHVzYl9kZXZpY2UgKik7Ci1pbnQgICAgICAgICAgICAgIHN0b3BfM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UKDgsICAiLi4uLmNmIFBBTF83MDR4NTI2OiAiCi0JCSIweCUwM1gsIDB4JTAzWCwgIgotCQkiMHglMDNYLCAweCUwM1gsICIKLQkJIjB4JTAzWCwgMHglMDNYLCAiCi0JCSIweCUwM1gsIDB4JTAzWFxuIiwKLQkJMHgwMDQsIDB4MDAwLCAweDAwMSwgMHgwMDAsIDB4NTg0LCAweDAwNSwgMHgxMjEsIDB4MDAxKTsKLQlKT1QoOCwgICIuLi4uY2YgVkdBXzY0MHg0ODA6ICIKLQkJIjB4JTAzWCwgMHglMDNYLCAiCi0JCSIweCUwM1gsIDB4JTAzWCwgIgotCQkiMHglMDNYLCAweCUwM1gsICIKLQkJIjB4JTAzWCwgMHglMDNYXG4iLAotCQkweDAwOCwgMHgwMDAsIDB4MDIwLCAweDAwMCwgMHg1MDgsIDB4MDA1LCAweDExMCwgMHgwMDEpOwotCXJldHVybiAwOwotfQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgY29uZmlybV9zdHJlYW0oc3RydWN0IHVzYl9kZXZpY2UgKnApCi17Ci0JdTE2IGdldDI7Ci0JdTggaWdvdDsKLQotCWlmICghcCkKLQkJcmV0dXJuIC1FTk9ERVY7Ci0JR0VUKHAsIDB4MDEwMCwgJmlnb3QpOyAgZ2V0MiA9IDB4ODAgJiBpZ290OwotCWlmICgweDgwID09IGdldDIpCi0JCUpPVCg4LCAiY29uZmlybV9zdHJlYW06ICBPS1xuIik7Ci0JZWxzZQotCQlKT1QoOCwgImNvbmZpcm1fc3RyZWFtOiAgU1RVQ0tcbiIpOwotCXJldHVybiAwOwotfQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgc2V0dXBfc3RrKHN0cnVjdCB1c2JfZGV2aWNlICpwLCBib29sIG50c2MpCi17Ci0JaW50IGk7Ci0JY29uc3Qgc3RydWN0IHN0azExNjBjb25maWcgKmNmZzsKLQlpZiAoIXApCi0JCXJldHVybiAtRU5PREVWOwotCWNmZyA9IChudHNjKSA/IHN0azExNjBjb25maWdOVFNDIDogc3RrMTE2MGNvbmZpZ1BBTDsKLQlmb3IgKGkgPSAwOyBjZmdbaV0ucmVnICE9IDB4RkZGOyBpKyspCi0JCVNFVChwLCBjZmdbaV0ucmVnLCBjZmdbaV0uc2V0KTsKLQotCXdyaXRlXzMwMChwKTsKLQotCXJldHVybiAwOwotfQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgc2V0dXBfc2FhKHN0cnVjdCB1c2JfZGV2aWNlICpwLCBib29sIG50c2MpCi17Ci0JaW50IGksIGlyOwotCWNvbnN0IHN0cnVjdCBzYWE3MTEzY29uZmlnICpjZmc7Ci0JaWYgKCFwKQotCQlyZXR1cm4gLUVOT0RFVjsKLQljZmcgPSAobnRzYykgPyAgc2FhNzExM2NvbmZpZ05UU0MgOiBzYWE3MTEzY29uZmlnUEFMOwotCWZvciAoaSA9IDA7IGNmZ1tpXS5yZWcgIT0gMHhGRjsgaSsrKQotCQlpciA9IHdyaXRlX3NhYShwLCBjZmdbaV0ucmVnLCBjZmdbaV0uc2V0KTsKLQlyZXR1cm4gMDsKLX0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdyaXRlXzAwMChzdHJ1Y3QgdXNiX2RldmljZSAqcCwgdTE2IHNldDIsIHUxNiBzZXQwKQotewotCXU4IGlnb3QwLCBpZ290MjsKLQotCWlmICghcCkKLQkJcmV0dXJuIC1FTk9ERVY7Ci0JR0VUKHAsIDB4MDAwMiwgJmlnb3QyKTsKLQlHRVQocCwgMHgwMDAwLCAmaWdvdDApOwotCVN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3QpOwogCXJldHVybiBpZ290OwogfQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLS8qCi0gKiAgICBIQVJEV0FSRSAgICBVU0VSU1BBQ0UgSU5QVVQgTlVNQkVSICAgUEhZU0lDQUwgSU5QVVQgICBEUklWRVIgaW5wdXQgVkFMVUUKLSAqCi0gKiAgQ1ZCUytTLVZJREVPICAgICAgICAgICAwIG9yIDEgICAgICAgICAgICAgIENWQlMgICAgICAgICAgICAgICAgIDEKLSAqICAgRk9VUi1DVkJTICAgICAgICAgICAgIDAgb3IgMSAgICAgICAgICAgICAgQ1ZCUzEgICAgICAgICAgICAgICAgMQotICogICBGT1VSLUNWQlMgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICBDVkJTMiAgICAgICAgICAgICAgICAyCi0gKiAgIEZPVVItQ1ZCUyAgICAgICAgICAgICAgICAzICAgICAgICAgICAgICAgIENWQlMzICAgICAgICAgICAgICAgIDMKLSAqICAgRk9VUi1DVkJTICAgICAgICAgICAgICAgIDQgICAgICAgICAgICAgICAgQ1ZCUzQgICAgICAgICAgICAgICAgNAotICogIENWQlMrUy1WSURFTyAgICAgICAgICAgICAgNSAgICAgICAgICAgICAgIFMtVklERU8gICAgICAgICAgICAgICA1Ci0gKgotICogIFdIRU4gNT09aW5wdXQgVEhFIEFSR1VNRU5UIG1vZGUgTVVTVCBBTFNPIEJFIFNVUFBMSUVEOgotICoKLSAqICAgICBtb2RlICA3ICAgPT4gR0FJTiBUTyBCRSBTRVQgRVhQTElDSVRMWSBVU0lORyBSRUdJU1RFUiAweDA1IChVTlRFU1RFRCkKLSAqICAgICBtb2RlICA5ICAgPT4gVVNFIEFVVE9NQVRJQyBHQUlOIENPTlRST0wgKERFRkFVTFQpCi0gKgotKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLWludAotc2VsZWN0X2lucHV0KHN0cnVjdCB1c2JfZGV2aWNlICpwLCBpbnQgaW5wdXQsIGludCBtb2RlKQoraW50IHNlbGVjdF9pbnB1dChzdHJ1Y3QgdXNiX2RldmljZSAqcCwgaW50IGlucHV0LCBpbnQgbW9kZSkKIHsKIAlpbnQgaXI7CiAKQEAgLTg3NywxMCArNzI4LDExIEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdha2V1cF9kZXZpY2Uoc3RydWN0IHVzYl9kZXZpY2UgKnB1c2JfZGV2aWNlKQoraW50IGVhc3ljYXBfd2FrZXVwX2RldmljZShzdHJ1Y3QgdXNiX2RldmljZSAqcHVzYl9kZXZpY2UpCiB7CiAJaWYgKCFwdXNiX2RldmljZSkKIAkJcmV0dXJuIC1FTk9ERVY7CisKIAlyZXR1cm4gdXNiX2NvbnRyb2xfbXNnKHB1c2JfZGV2aWNlLCB1c2Jfc25kY3RybHBpcGUocHVzYl9kZXZpY2UsIDApLAogCQkJVVNCX1JFUV9TRVRfRkVBVFVSRSwKIAkJCVVTQl9ESVJfT1VUIHwgVVNCX1RZUEVfU1RBTkRBUkQgfCBVU0JfUkVDSVBfREVWSUNFLApAQCAtODg4LDggKzc0MCw3IEBACiAJCQkwLCBOVUxMLCAwL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YWs7CiAJfQogCWRlZmF1bHQ6Ci0JCXJldHZhbCA9IC1FSU5WQUw7CisJCXJldHVybiAtRUlOVkFMOwogCX0KIAlyZXR1cm4gMDsKIH0KQEAgLTYxNSwyMDIgKzc0OCwzIEBACiAJcmV0dXJuIDA7CiB9CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLS8qCi0gKiAgQ09NTU9OIEFVRElPIElOSVRJQUxJWkFUSU9OCi0gKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLWludAotZWFzeWNhcF9zb3VuZF9zZXR1cChzdHJ1Y3QgZWFzeWNhcCAqcGVhc3ljYXApCi17Ci0JaW50IHJjOwotCi0JSk9NKDQsICJzdGFydGluZ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lBfS0VSTkVMKTsKKwlpZiAoIXByaXYpIHsKKwkJZGV2X2VycihkZXYtPmRldiwgImNvdWxkIG5vdCBhbGxvY2F0ZSBwcml2XG4iKTsKKwkJcmV0dXJuIC1FTk9NRU07CisJfQorCisJZGV2LT5kZXZfcHJpdmF0ZSA9IHByaXY7CisKKwlvbWFwX2dlbV9pbml0KGRldik7CisKKwlyZXQgPSBvbWFwX21vZGVzZXRfaW5pdChkZXYpOworCWlmIChyZXQpIHsKKwkJZGV2X2VycihkZXYtPmRldiwgIm9tYXBfbW9kZXNldF9pbml0IGZhaWxlZDogcmV0PSVkXG4iLCByZXQpOworCQlkZXYtPmRldl9wcml2YXRlID0gTlVMTDsKKwkJa2ZyZWUocHJpdik7CisJCXJldHVybiByZXQ7CisJfQorCisJcHJpdi0+ZmJkZXYgPSBvbWFwX2ZiZGV2X2luaXQoZGV2KTsKKwlpZiAoIXByaXYtPmZiZGV2KSB7CisJCWRldl93YXJuKGRldi0+ZGV2LCAib21hcF9mYmRldl9pbml0IGZhaWxlZFxuIik7CisJCS8qIHdlbGwsIGxpbXAgYWxvbmcgd2l0aG91dCBhbiBmYmRldi4uIG1heWJlIFgxMSB3aWxsIHdvcms/ICovCisJfQorCisJZHJtX2ttc19oZWxwZXJfcG9sbF9pbml0KGRldik7CisKKwlyZXQgPSBkcm1fdmJsYW5rX2luaXQoZGV2LCBwcml2LT5udW1fY3J0Y3MpOworCWlmIChyZXQpIHsKKwkJZGV2X3dhcm4oZGV2LT5kZXYsICJjb3VsZCBub3QgaW5pdCB2YmxhbmtcbiIpOworCX0KKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGRldl91bmxvYWQoc3RydWN0IGRybV9kZXZpY2UgKmRldikKK3sKKwlEQkcoInVubG9hZDogZGV2PSVwIiwgZGV2KTsKKworCWRybV92YmxhbmtfY2xlYW51cChkZXYpOworCWRybV9rbXNfaGVscGVyX3BvbGxfZmluaShkZXYpOworCisJb21hcF9mYmRldl9mcmVlKGRldik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iwgcmV0KTsKKwkJCQlnb3RvIGZhaWw7CisJCQl9CisKKwkJCW9tYXBfb2JqLT5wYWRkciA9IHRpbGVyX3NzcHRyKGJsb2NrKTsKKwkJCW9tYXBfb2JqLT5ibG9jayA9IGJsb2NrOworCisJCQlEQkcoImdvdCBwYWRkcjogJTA4eCIsIG9tYXBfb2JqLT5wYWRkcik7CisJCX0KKworCQlvbWFwX29iai0+cGFkZHJfY250Kys7CisKKwkJKnBhZGRyID0gb21hcF9vYmotPnBhZGRyOworCX0gZWxzZSBpZiAob21hcF9vYmotPmZsYWdzICYgT01BUF9CT19ETUEpIHsKKwkJKnBhZGRyID0gb21hcF9vYmotPnBhZGRyOworCX0gZWxzZSB7CisJCXJldCA9IC1FSU5WQUw7CisJfQorCitmYWlsOgorCW11dGV4X3VubG9jaygmb2JqLT5kZXYtPnN0cnVjdF9tdXRleCk7CisKKwlyZXR1cm4gcmV0OworfQorCisvKiBSZWxlYXNlIHBoeXNpY2FsIGFkZHJlc3MsIHdoZW4gRE1BIGlzIG5vIGxvbmdlciBiZWluZyBwZXJmb3JtZWQuLiB0aGlzCisgKiBjb3VsZCBwb3RlbnRpYWxseSB1bnBpbiBhbmQgdW5tYXAgYnVmZmVycyBmcm9tIFRJTEVSCisgKi8KK2ludCBvbWFwX2dlbV9wdXRfcGFkZHIoc3RydWN0IGRybV9nZW1fb2JqZWN0ICpvYmopCit7CisJc3RydWN0IG9tYXBfZ2VtX29iamVjdCAqb21hcF9vYmogPSB0b19vbWFwX2JvKG9iaik7CisJaW50IHJldCA9IDA7CisKKwltdXRleF9sb2NrKCZvYmotPmRldi0+c3RydWN0X211dGV4KTsKKwlpZiAob21hcF9vYmotPnBhZGRyX2NudCA+IDApIHsKKwkJb21hcF9vYmotPnBhZGRyX2NudC0tOworCQlpZiAob21hcF9vYmotPnBhZGRyX2NudCA9PSAwKSB7CisJCQlyZXQgPSB0aWxlcl91bnBpbihvbWFwX29iai0+YmxvY2spOworCQkJaWYgKHJldCkgewor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XQpICAgKHN0cnVjdCB0Y20gKnRjbSk7Cit9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgICAgQkFTSUMgVElMRVIgQ09OVEFJTkVSIE1BTkFHRVIgSU5URVJGQUNFCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qCisgKiBOT1RFOgorICoKKyAqIFNpbmNlIHNvbWUgYmFzaWMgcGFyYW1ldGVyIGNoZWNraW5nIGlzIGRvbmUgb3V0c2lkZSB0aGUgVENNIGFsZ29yaXRobXMsCisgKiBUQ00gaW1wbGVtZW50YXRpb24gZG8gTk9UIGhhdmUgdG8gY2hlY2sgdGhlIGZvbGxvd2luZzoKKyAqCisgKiAgIGFyZWEgcG9pbnRlciBpcyBOVUxMCisgKiAgIHdpZHRoIGFuZCBoZWlnaHQgZml0cyB3aXRoaW4gY29udGFpbmVyCisgKiAgIG51bWJlciBvZiBwYWdlcyBpcyBtb3JlIHRoYW4gdGhlIHNpemUgb2YgdGhlIGNvbnRhaW5lcgorICoKKyAqLworCitzdHJ1Y3QgdGNtICpzaXRhX2luaXQodTE2IHdpZHRoLCB1MTYgaGVpZ2h0LCBzdHJ1Y3QgdGNtX3B0ICphdHRyKTsKKworCisvKioKKyAqIERlaW5pdGlhbGl6ZSB0aWxlciBjb250YWluZXIgbWFuYWdlci4KKyAqCisgKiBAcGFyYW0gdGNtCVBvaW50ZXIgdG8gY29udGFpbmVyIG1hbmFnZXIuCisgKgorICogQHJldHVybiAwIG9uIHN1Y2Nlc3MsIG5vbi0wIGVycm9yIHZhbHVlIG9uIGVycm9yLiAgVGhlIGNhbGwKKyAqCSAgIHNob3VsZCBmcmVlIGFzIG11Y2ggbWVtb3J5IGFzIHBvc3NpYmxlIGFuZCBtZWFuaW5nZnVsCisgKgkgICBldmVuI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gdGhlCisgKiBmaWxlIGNhbGxlZCBMSUNFTlNFLgorICoKKyAqIENvbnRhY3QgSW5mb3JtYXRpb246CisgKiB3bGFuZmFlIDx3bGFuZmFlQHJlYWx0ZWsuY29tPgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaW5jbHVkZSAicnRsX2NvcmUuaCIKKyNpbmNsdWRlICJyODE5MkVfaHcuaCIKKyNpbmNsdWRlICJyODE5MkVfcGh5cmVnLmgiCisjaW5jbHVkZSAicjgxOTBQX3J0bDgyNTYuaCIKKyNpbmNsdWRlICJyODE5MkVfcGh5LmgiCisjaW5jbHVkZSAicnRsX2RtLmgiCisKKyNpbmNsdWRlICJyODE5MkVfaHdpbWcuaCIKKworc3RhdGljIHUzMiBSRl9DSEFOTkVMX1RBQkxFX1pFQlJBW10gPSB7CisJMCwKKwkweDA4NWMsCisJMHgwOGRjLAorCTB4MDk1YywKKwkweDA5ZGMsCisJMHgwYTVjLAorCTB4MGFkYywKKwkweDBiNWMsCisJMHgwYmRjLAorCTB4MGM1YywKKwkweDBjZGMsCisJMHgwZDVjLAorCTB4MGRkYywKKwkweDBlNWMsCisJMHgwZjcyLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKipEZWZpbmUgbG9jYWwgZnVuY3Rpb24gcHJvdG90eXBlKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHUzMiBwaHlfRndSRlNlcmlhbFJlYWQoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKwkJCSAgICAgIGVudW0gcmY5MF9yYWRpb19wYXRoIGVSRlBhdGgsCisJCQkgICAgICB1MzIgT2Zmc2V0KTsKK3N0YXRpYyB2b2lkIHBoeV9Gd1JGU2VyaWFsV3JpdGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKwkJCQllbnVtIHJmOTBfcmFkaW9fcGF0aCBlUkZQYXRoLAorCQkJC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ICpkZXYsIGludCB4LCB1MTYgeSkKK3sKKwl3cml0ZXcoeSwgKHU4IF9faW9tZW0gKilkZXYtPm1lbV9zdGFydCArIHgpOworCisJdWRlbGF5KDIwKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tR0VORVJBTCBGVU5DVElPTi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworYm9vbCBNZ250QWN0U2V0X1JGX1N0YXRlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisJCQkgZW51bSBydF9yZl9wb3dlcl9zdGF0ZSBTdGF0ZVRvU2V0LAorCQkJIFJUX1JGX0NIQU5HRV9TT1VSQ0UgQ2hhbmdlU291cmNlLAorCQkJIGJvb2wJUHJvdGVjdE9yTm90KQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gcnRsbGliX3ByaXYoZGV2KTsKKwlzdHJ1Y3QgcnRsbGliX2RldmljZSAqaWVlZSA9IHByaXYtPnJ0bGxpYjsKKwlib29sCQkJYkFjdGlvbkFsbG93ZWQgPSBmYWxzZTsKKwlib29sCQkJYkNvbm5lY3RCeVNTSUQgPSBmYWxzZTsKKwllbnVtIHJ0X3JmX3Bvd2VyX3N0YXRlIHJ0U3RhdGU7CisJdTE2CQkJUkZXYWl0Q291bnRlciA9IDA7CisJdW5zaWduZWQgbG9uZyBmbGFnOworCVJUX1RSQUNFKChDT01QX1BTIHwgQ09NUF9SRiksICI9PT0+TWdudEFjdFNldF9SRl9TdGF0ZSgpOiAiCisJCSAiU3RhdGVUb1NldCglZClcbiIsIFN0YXRlVG9TZXQpOworCisJUHJvdGVjdE9yTm90ID0gZmFsc2U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2F0aW5nIElSUSAlZCIsIGRldi0+aXJxKTsKKwkJcmV0dXJuIC0xOworCX0gZWxzZSB7CisJCXByaXYtPmlycSA9IGRldi0+aXJxOworCQlSVF9UUkFDRShDT01QX0lOSVQsICJJUlEgJWRcbiIsIGRldi0+aXJxKTsKKwl9CisKKwlpZiAocnRsODE5Ml9wY2lfaW5pdGRlc2NyaW5nKGRldikgIT0gMCkgeworCQlwcmludGsoS0VSTl9FUlIgIkVuZG9wb2ludHMgaW5pdGlhbGl6YXRpb24gZmFpbGVkIik7CisJCWZyZWVfaXJxKGRldi0+aXJxLCBkZXYpOworCQlyZXR1cm4gLTE7CisJfQorCisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tV0FUQ0hET0cgU1RVRkYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3Nob3J0IHJ0bDgxOTJfaXNfdHhfcXVldWVfZW1wdHkoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKK3sKKwlpbnQgaSA9IDA7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBydGxsaWJfcHJpdihkZXYpOworCWZvciAoaSA9IDA7IGkgPD0gTUdOVF9RVUVVRTsgaSsrKSB7CisJCWlmICgoaSA9PSBUWENNRF9RVUVVRSkgfHwgKGkgPT0gSENDQV9RVUVVRSkpCisJCQljb250aW51ZTsKKwkJaWYgKHNrYl9xdWV1ZV9sZW4oJigmcHJpdi0+dHhfcmluZ1tpXSktPnF1ZXVlKSA+IDApIHsKKwkJCXByaW50ayhLRVJOX0lORk8gIj09PT50eCBxdWV1ZSBpcyBub3QgZW1wdHk6J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hZF9uaWNfZHdvcmQocHJpdi0+cnRsbGliLT5kZXYsIElOVEFfTUFTSykgfCBJTVJfUkRVKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIE5JQyBTVEFSVC9DTE9TRSBTVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIHJ0bDgxOTJfY2FuY2VsX2RlZmVycmVkX3dvcmsoc3RydWN0IHI4MTkyX3ByaXYgKnByaXYpCit7CisJY2FuY2VsX2RlbGF5ZWRfd29yaygmcHJpdi0+d2F0Y2hfZG9nX3dxKTsKKwljYW5jZWxfZGVsYXllZF93b3JrKCZwcml2LT51cGRhdGVfYmVhY29uX3dxKTsKKwljYW5jZWxfZGVsYXllZF93b3JrKCZwcml2LT5ydGxsaWItPmh3X3NsZWVwX3dxKTsKKwljYW5jZWxfd29ya19zeW5jKCZwcml2LT5yZXNldF93cSk7CisJY2FuY2VsX3dvcmtfc3luYygmcHJpdi0+cW9zX2FjdGl2YXRlKTsKK30KKworaW50IF9ydGw4MTkyX3VwKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIGJvb2wgaXNfc2lsZW50X3Jlc2V0KQoreworCWlmIChfcnRsODE5Ml9zdGFfdXAoZGV2LCBpc19zaWxlbnRfcmVzZXQpID09IC0xKQorCQlyZXR1cm4gLTE7CisJcmV0dXJuIDA7Cit9CisKKworc3RhdGljIGludCBydGw4MTkyX29wZW4oc3RydWN0IG5ldF9kZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IHJ0bGxpYl9wcml2KGRldik7CisJaW50IHJldDsKKworCWRvd24oJnByaXYtPnd4X3NlbSk7CisJcmV0ID0gcnRsODE5Ml91cChkZXYpOworCXVwKCZwcml2LT53eF9zZW0pOworCXJldHVybiByZXQ7CisKK30KKworCitpbnQgcnRsODE5Ml91cChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gcnRsbGliX3ByaXYoZGV2KTsKKworCWlmIChwcml2LT51cCA9PSAxKQorCQlyZXR1cm4gLTE7CisJcmV0dXJuIF9ydGw4MTkyX3VwKGRldiwgZmFsc2UpOworfQorCisKK3N0YXRpYyBpbnQgcnRsODE5Ml9jbG9zZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gcnRsbGliX3ByaXYoZGV2KTsKKwlpbnQgcmV0OworCisJaWYgKChydGxsaWJfYWN0X3NjYW5uaW5nKHByaXYtPnJ0bGxpYiwgZmFsc2UpKSAmJgorCQkhKHByaXYtPnJ0bGxpYi0+c29mdG1hY19mZWF0dXJlcyAmIElFRUVfU09GVE1BQ19TQ0FOKSkgeworCQlydGxsaWJfc3RvcF9zY2FuKHByaXYtPnJ0bGxpYik7CisJfQorCisJZG93bigmcHJpdi0+d3hfc2VtKTsKKworCXJldCA9IHJ0bDgxOTJfZG93bihkZXYsIHRydWUpOworCisJdXAoJnByaXYtPnd4X3NlbSk7CisKKwlyZXR1cm4gcmV0OworCit9CisKK2ludCBydGw4MTkyX2Rvd24oc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgYm9vbCBzaHV0ZG93bnJmKQoreworCWlmIChydGw4MTkyX3N0YV9kb3duKGRldiwgc2h1dGRvd25yZikgPT0gLTEpCisJCXJldHVybiAtMTsKKworCXJldHVybiAwOworfQorCit2b2lkIHJ0bDgxOTJfY29tbWl0KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBydGxsaWJfcHJpdihkZXYpOworCisJaWYgKHByaXYtPnVwID09IDApCisJCXJldHVybjsKKwlydGxsaWJfc29mdG1hY19zdG9wX3Byb3RvY29sKHByaXYtPnJ0bGxpYiwgMCAsIHRydWUpOworCXJ0bDgxOTJfaXJxX2Rpc2FibGUoZGV2KTsKKwlwcml2LT5vcHMtPnN0b3BfYWRhcHRlcihkZXYsIHRydWUpOworCV9ydGw4MTkyX3VwKGRldiwgZmFsc2UpOworfQorCit2b2lkIHJ0bDgxOTJfcmVzdGFydCh2b2lkICpkYXRhKQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gY29udGFpbmVyX29mX3dvcmtfcnNsKGRhdGEsIHN0cnVjdCByODE5Ml9wcml2LAorCQkJCSAgcmVzZXRfd3EpOworCXN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBwcml2LT5ydGxsaWItPmRldjsKKworCWRvd24oJnByaXYtPnd4X3NlbSk7CisKKwlydGw4MTkyX2NvbW1pdChkZXYpOworCisJdXAoJnByaXYtPnd4X3NlbSk7Cit9CisKK3N0YXRpYyB2b2lkIHI4MTkyX3NldF9tdWx0aWNhc3Qoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IHJ0bGxpYl9wcml2KGRldik7CisJc2hvcnQgcHJvbWlzYzsKKworCXByb21pc2MgPSAoZGV2LT5mbGFncyAmIElGRl9QUk9NSVNDKSA/IDEgOiAwOworCXByaXYtPnByb21pc2MgPSBwcm9taXNjOworCit9CisKKworc3RhdGljIGludCByODE5Ml9zZXRfbWFjX2FkcihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCB2b2lkICptYWMpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBydGxsaWJfcHJpdihkZXYpOworCXN0cnVjdCBzb2NrYWRkciAqYWRkciA9IG1hYzsKKworCWRvd24oJnByaXYtPnd4X3NlbSk7CisKKwltZW1jcHkoZGV2L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NrX2lycXJlc3RvcmUoJnByaXYtPmlycV90aF9sb2NrLCBmbGFncyk7CisJCWdvdG8gZG9uZTsKKwl9CisKKwlpZiAoaW50YSA9PSAweGZmZmYpIHsKKwkJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcHJpdi0+aXJxX3RoX2xvY2ssIGZsYWdzKTsKKwkJZ290byBkb25lOworCX0KKworCXByaXYtPnN0YXRzLmludHMrKzsKKworCWlmICghbmV0aWZfcnVubmluZyhkZXYpKSB7CisJCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJnByaXYtPmlycV90aF9sb2NrLCBmbGFncyk7CisJCWdvdG8gZG9uZTsKKwl9CisKKwlpZiAoaW50YSAmIElNUl9UQkRPSykgeworCQlSVF9UUkFDRShDT01QX0lOVFIsICJiZWFjb24gb2sgaW50ZXJydXB0IVxuIik7CisJCXByaXYtPnN0YXRzLnR4YmVhY29ub2tpbnQrKzsKKwl9CisKKwlpZiAoaW50YSAmIElNUl9UQkRFUikgeworCQlSVF9UUkFDRShDT01QX0lOVFIsICJiZWFjb24gb2sgaW50ZXJydXB0IVxuIik7CisJCXByaXYtPnN0YXRzLnR4YmVhY29uZXJyKys7CisJfQorCisJaWYgKGludGEgJiBJTVJfQkRPSykKKwkJUlRfVFJBQ0UoQ09NUF9JTlRSLCAiYmVhY29uIGludGVycnVwdCFcbiIpOworCisJaWYgKGludGEgICYgSU1SX01HTlRET0spIHsKKwkJUlRfVFJBQ0UoQ09NUF9JTlRSLCAiTWFuYWdlIG9rIGludGVycnVwdCFcbiIpOworCQlwcml2LT5zdGF0cy50eG1hbmFnZW9raW50Kys7CisJCXJ0bDgxOTJfdHhfaXNyKGRldiwgTUdOVF9RVUVVRSk7CisJCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJnByaXYtPmlycV90aF9sb2NrLCBmbGFncyk7CisJCWlmIChwcml2LT5ydGxsaWItPmFja190eF90b19pZWVlKSB7CisJCQlpZiAocnRsODE5Ml9pc190eF9xdWV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kJcmV0dXJuIC1FTk9ERVY7CisJfQorCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBfX2V4aXQgcnRsODE5Ml9wY2lfbW9kdWxlX2V4aXQodm9pZCkKK3sKKwlwY2lfdW5yZWdpc3Rlcl9kcml2ZXIoJnJ0bDgxOTJfcGNpX2RyaXZlcik7CisKKwlSVF9UUkFDRShDT01QX0RPV04sICJFeGl0aW5nIik7CisJcnRsODE5Ml9wcm9jX21vZHVsZV9yZW1vdmUoKTsKK30KKwordm9pZCBjaGVja19yZmN0cmxfZ3Bpb190aW1lcih1bnNpZ25lZCBsb25nIGRhdGEpCit7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBydGxsaWJfcHJpdigoc3RydWN0IG5ldF9kZXZpY2UgKilkYXRhKTsKKworCXByaXYtPnBvbGxpbmdfdGltZXJfb24gPSAxOworCisJcXVldWVfZGVsYXllZF93b3JrX3JzbChwcml2LT5wcml2X3dxLCAmcHJpdi0+Z3Bpb19jaGFuZ2VfcmZfd3EsIDApOworCisJbW9kX3RpbWVyKCZwcml2LT5ncGlvX3BvbGxpbmdfdGltZXIsIGppZmZpZXMgKworCQkgIE1TRUNTKFJUTExJQl9XQVRDSF9ET0dfVElNRSkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJLS0tLS0tLS0tLS0tLS0tLS0tLSBtb2R1bGUgaW5pdCAvIGV4aXQgc3R1YnMgLS0tLS0tLS0tLS0tLS0tLQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK21vZHVsZV9pbml0KHJ0bDgxOTJfcGNpX21vZHVsZV9pbml0KTsKK21vZHVsZV9leGl0KHJ0bDgxOTJfcGNpX21vZHVsZV9leGl0KTsKKworTU9EVUxFX0RFU0NSSVBUSU9OKCJMaW51eCBkc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vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCWVudW0gY2FyZF90eXBlIHsKKwkJUENJLCBNSU5JUENJLAorCQlDQVJEQlVTLCBVU0IKKwl9IGNhcmRfdHlwZTsKKworCXN0cnVjdCB3b3JrX3N0cnVjdCBxb3NfYWN0aXZhdGU7CisKKwl1OCBiSWJzc0Nvb3JkaW5hdG9yOworCisJc2hvcnQJcHJvbWlzYzsKKwlzaG9ydAljcmNtb247CisKKwlpbnQgdHhiZWFjb25jb3VudDsKKworCXNob3J0CWNoYW47CisJc2hvcnQJc2VuczsKKwlzaG9ydAltYXhfc2VuczsKKwl1MzIgcnhfcHJldmxlbjsKKworCXU4IFNjYW5EZWxheTsKKwlib29sIHBzX2ZvcmNlOworCisJdTMyIGlycV9tYXNrWzJdOworCisJdTggUmZfTW9kZTsKKwllbnVtIG5pY190IGNhcmRfODE5MjsKKwl1OCBjYXJkXzgxOTJfdmVyc2lvbjsKKworCXNob3J0CWVuYWJsZV9ncGlvMDsKKworCXU4IHJmX3R5cGU7CisJdTggSUNfQ3V0OworCWNoYXIgbmlja1tJV19FU1NJRF9NQVhfU0laRSArIDFdOworCisJdTggUmVnQmNuQ3RybFZhbDsKKwlib29sIGJId0FudERpdjsKKworCWJvb2wgYlRLSVBpbk5tb2RlRnJvbVJlZzsKKwlib29sIGJXRVBpbk5tb2RlRnJvbVJlZzsKKworCWJvb2wgYkxlZE9wZW5EcmFpbjsKKworCXU4IGNoZWNrX3JvYW1pbmdfY250OworCisJYm9vbCBiSWdub3JlU2lsZW50UmVzZXQ7CisJdTMyIFNpbGVudFJlc2V0UnhTb2x0TnVtOworCXUzMiBTaWxlbnRSZXNldFJ4U2xvdEluZGV4OworCXUzMiBTaWxlbnRSZXNldFJ4U3R1Y2tFdmVudFtNQVhfU0lMRU5UX1JFU0VUX1JYX1NMT1RfTlVNXTsKKworCXZvaWQgKnNjYW5fY21kOworCXU4IGh3c2N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W9uOgorICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpbmNsdWRlICJydGxfY29yZS5oIgorI2luY2x1ZGUgInI4MTkyRV9waHkuaCIKKyNpbmNsdWRlICJyODE5MkVfcGh5cmVnLmgiCisjaW5jbHVkZSAicjgxOTBQX3J0bDgyNTYuaCIgLyogUlRMODIyNSBSYWRpbyBmcm9udGVuZCAqLworI2luY2x1ZGUgInI4MTkyRV9jbWRwa3QuaCIKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tUFJPQ0ZTIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKlRoaXMgcGFydCBpcyByZWxhdGVkIHRvIFBST0MsIHdoaWNoIHdpbGwgcmVjb3JkIHNvbWUgc3RhdGlzdGljcy4gKi8KK3N0YXRpYyBzdHJ1Y3QgcHJvY19kaXJfZW50cnkgKnJ0bDgxOTJfcHJvYzsKKworc3RhdGljIGludCBwcm9jX2dldF9zdGF0c19hcChjaGFyICpwYWdlLCBjaGFyICoqc3RhcnQsCisJCQkgIG9mZl90IG9mZnNldCwgaW50IGNvdW50LAorCQkJICBpbnQgKmVvZiwgdm9pZCAqZGF0YSkKK3sKKwlzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ID0gZGF0YTsKKwlzdHJ1Y3QgcjgxOTJfcHJpdiAqcHJpdiA9IChzdHJ1Y3QgcjgxOTJfcHJpdiAqKXJ0bGxpYl9wcml2KGRldik7CisJc3RydWN0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oKTpodyByYWRpbyBvZmYsb3IgUmYgc3RhdGUgaXMgIgorCQkgICAgICAgImVSZk9mZiwgcmV0dXJuXG4iLCBfX2Z1bmNfXyk7CisJCXJldHVybiAwOworCX0KKwlkb3duKCZwcml2LT53eF9zZW0pOworCXJldCA9IHJ0bGxpYl93eF9zZXRfZXNzaWQocHJpdi0+cnRsbGliLCBhLCB3cnF1LCBiKTsKKworCXVwKCZwcml2LT53eF9zZW0pOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCByODE5Ml93eF9nZXRfZXNzaWQoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKwkJCSAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmEsCisJCQkgICAgICB1bmlvbiBpd3JlcV9kYXRhICp3cnF1LCBjaGFyICpiKQoreworCWludCByZXQ7CisJc3RydWN0IHI4MTkyX3ByaXYgKnByaXYgPSBydGxsaWJfcHJpdihkZXYpOworCisJZG93bigmcHJpdi0+d3hfc2VtKTsKKworCXJldCA9IHJ0bGxpYl93eF9nZXRfZXNzaWQocHJpdi0+cnRsbGliLCBhLCB3cnF1LCBiKTsKKworCXVwKCZwcml2LT53eF9zZW0pOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCByODE5Ml93eF9zZXRfbmljayhzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorCQkJICAgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqaW5mbywKKwkJCSAgIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmV4dHJhKQoreworCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gcnRsbGliX3ByaXYoZGV2KTsKKworCWlmICh3cnF1LT5kYXRhLmxlbmd0aCA+IElXX0VTU0lEX01BWF9TSVpFKQorCQlyZXR1cm4gLUUyQklHOworCWRvd24oJnByaXYtPnd4X3NlbSk7CisJd3JxdS0+ZGF0YS5sZW5ndGggPSBtaW4oKHNpemVfdCkgd3JxdS0+Z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GNpX2Rpc2Nvbm5lY3Qoc3RydWN0IHBjaV9kZXYgKnBkZXYpOwotCi1zdGF0aWMgc3RydWN0IHBjaV9kcml2ZXIgcnRsODE5Ml9wY2lfZHJpdmVyID0gewotCS5uYW1lID0gRFJWX05BTUUsCS8qIERyaXZlciBuYW1lICAgKi8KLQkuaWRfdGFibGUgPSBydGw4MTkyX3BjaV9pZF90YmwsCS8qIFBDSV9JRCB0YWJsZSAgKi8KLQkucHJvYmUJPSBydGw4MTkyX3BjaV9wcm9iZSwJLyogcHJvYmUgZm4gICAgICAqLwotCS5yZW1vdmUJID0gX19kZXZleGl0X3AocnRsODE5Ml9wY2lfZGlzY29ubmVjdCksCS8qIHJlbW92ZSBmbiAqLwotCS5zdXNwZW5kID0gcnRsODE5MkVfc3VzcGVuZCwJLyogUE0gc3VzcGVuZCBmbiAqLwotCS5yZXN1bWUgPSBydGw4MTkyRV9yZXN1bWUsICAgICAgICAgICAgICAgICAvKiBQTSByZXN1bWUgZm4gICovCi19OwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1JTyBTVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGJvb2wgUGxhdGZvcm1JT0NoZWNrUGFnZUxlZ2FsQW5kR2V0UmVnTWFzayh1MzIgdTRiUGFnZSwgdTggKnB1MWJQYWdlTWFzaykKLXsKLQlib29sCQliUmV0dXJuID0gZmFsc2U7Ci0KLQkqcHUxYlBhZ2VNYXNrID0gMHhmZTsKLQotCXN3aXRjaCAodTRiUGFnZSkgewotCWNhc2UgMTogY2FzZSAyOiBjYXNlIDM6IGNhc2UgNDoKLQljYXNlID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EJCQkvKnVzZSB0aGlzIHRvIHNldCBhIGZpZWxkIGluc3RlYWQgb2YgInBhc3MiKi8KLSNkZWZpbmUgRkFJTCAxCQkJLypmYWlsZWQgZmxhZyovCi0jZGVmaW5lIFBBU1MgMAkJCS8qc3VjY2VzcyBmbGFnKi8KLSNkZWZpbmUgRVJSIC0xCQkJLyplcnJvciBmbGFnKi8KLQotI2RlZmluZSAgIEVSQVNFX0NNRCAgICAgICAgICAgICAxMAotI2RlZmluZSAgIFdSSVRFX01BSU5fQ01EICAgICAgICAxMQotI2RlZmluZSAgIFJFQURfTUFJTl9DTUQgICAgICAgICAxMgotI2RlZmluZSAgIFdSSVRFX1NQQVJFX0NNRCAgICAgICAxMwotI2RlZmluZSAgIFJFQURfU1BBUkVfQ01EICAgICAgICAxNAotI2RlZmluZSAgIFdSSVRFX01BSU5fU1BBUkVfQ01EICAxNQotI2RlZmluZSAgIFJFQURfTUFJTl9TUEFSRV9DTUQgICAxNgotI2RlZmluZSAgIE1FTUNPUFlfQ01EICAgICAgICAgICAxNwotI2RlZmluZSAgIERVTU1ZX0NNRCAgICAgICAgICAgICA5OQotCi0jZGVmaW5lICAgICBFVkVOVF9QQVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAKLSNkZWZpbmUgICAgIEVWRU5UX0NPUlJFQ1RBQkxFX0RBVEFfRVJST1JfRklYRUQgICAgICAgICAweDAxCi0jZGVmaW5lICAgICBFVkVOVF9VTkNPUlJFQ1RBQkxFX0RBVEFfRVJST1IgICAgICAgICAgICAgIDB4MDIKLSNkZWZpbmUgICAgIEVWRU5UX1RJTUVfT1VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMwotI2RlZmluZSAgICAgRVZFTlRfUFJPR1JBTV9GQUlMVVJFICAgICAgICAgICAgICAgICAgICAgICAweDA0Ci0jZGVmaW5lICAgICBFVkVOVF9FUkFTRV9GQUlMVVJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDUKLSN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iBzdWNjZXNzZnVsIC0gdGhpcyBpcyB1c2VkIGluIHRoZSBwcm9iZSB0bworICogZW5zdXJlIHdlIGhhdmUgYSB2YWxpZCBjYXJkLgorICovCitzdGF0aWMgaW50IHBpbzJfcmVzZXRfY2FyZChzdHJ1Y3QgcGlvMl9jYXJkICpjYXJkKQoreworCWludCByZXR2YWwgPSAwOworCXU4IGRhdGEgPSAwOworCisJLyogQ2xlYXIgbWFpbiByZWdpc3RlciovCisJcmV0dmFsID0gdm1lX21hc3Rlcl93cml0ZShjYXJkLT53aW5kb3csICZkYXRhLCAxLCBQSU8yX1JFR1NfQ1RSTCk7CisJaWYgKHJldHZhbCA8IDApCisJCXJldHVybiByZXR2YWw7CisKKwkvKiBDbGVhciBWTUUgdmVjdG9yICovCisJcmV0dmFsID0gdm1lX21hc3Rlcl93cml0ZShjYXJkLT53aW5kb3csICZkYXRhLCAxLCBQSU8yX1JFR1NfVk1FX1ZFQ1RPUik7CisJaWYgKHJldHZhbCA8IDApCisJCXJldHVybiByZXR2YWw7CisKKwkvKiBSZXNldCBHUElPICovCisJcmV0dmFsID0gcGlvMl9ncGlvX3Jlc2V0KGNhcmQpOworCWlmIChyZXR2YWwgPCAwKQorCQlyZXR1cm4gcmV0dmFsOworCisJLyogUmVzZXQgY291bnRlcnMgKi8KKwlyZXR2YWwgPSBwaW8yX2NudHJfcmVzZXQoY2FyZCk7CisJaWYgKHJldHZhbCA8IDApCisJCXJldHVybiByZXR2YWw7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHN0cnVjdCB2bWVfZHJpdmVyIHBpbzJfZHJpdmVyID0geworCS5uYW1lID0gZHJpdmVyX25hbWUsCisJLm1hdGNoID0gcGlvMl9tYXRjaCwKKwkucHJvYmUgPSBwaW8yX3Byb2JlLAorCS5yZW1vdmUgPSBfX2RldmV4aXRfcChwaW8yX3JlbW92ZSksCit9OworCisKK3N0YXRpYyBpbnQgX19pbml0IHBpbzJfaW5pdCh2b2lkKQoreworCWludCByZ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HBEZXZpY2UtPmJ5UkZUeXBlID09IFJGX01BWElNMjgyOSkgfHwKLSAgICAgICAgIChwRGV2aWNlLT5ieVJGVHlwZSA9PSBSRl9VVzI0NTIpIHx8Ci0gICAgICAgICAocERldmljZS0+YnlSRlR5cGUgPT0gUkZfQUlST0hBNzIzMCkgKSB7IC8vIFJvYmVydFl1OiAyMDA0MTIxMCwgMjAwNTAxMDQKLQotICAgICAgICBzd2l0Y2ggKGJ5QW50ZW5uYU1vZGUpIHsKLSAgICAgICAgICAgIGNhc2UgQU5UX1RYQToKLSAgICAgICAgICAgICAgICBieUFudGVubmFNb2RlID0gQU5UX1RYQjsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgQU5UX1RYQjoKLSAgICAgICAgICAgICAgICBieUFudGVubmFNb2RlID0gQU5UX1RYQTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgQU5UX1JYQToKLSAgICAgICAgICAgICAgICBieUFudGVubmFNb2RlID0gQU5UX1JYQjsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgQU5UX1JYQjoKLSAgICAgICAgICAgICAgICBieUFudGVubmFNb2RlID0gQU5UX1JYQTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgIH0qLwotCiAgICAgc3dpdGNoIChieUFudGVubmFNb2RlKSB7CiAgICAgICAgIGNhc2UgQU5UX1RYQToKLSAgICAgICAgICAgIGJyZWFrOwogICAgICAgICBjYXNlIEFOVF9UWEI6CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgY2FzZSBBTlRfUlhBOgpAQCAtMTI0OSw4ICsxMjI3LDcgQEAKICAgICAgICAgLy8gU2V0IHRoZSBDUjMzIEJpdDIgdG8gZGlzYWJsZSBpbnRlcm5hbCBMb29wYmFjay4KICAgICAgICAgQ29udHJvbHZSZWFkQnl0ZSAocERldmljZSwgTUVTU0FHRV9SRVFVRVNU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1BBIGVuYWJsZS4KLSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEpIHx8Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEFQU0spKSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChwQ3VyckJTUy0+YldQQVZhbGlkID09IEZBTFNFKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBzdGF0aW9uIHdpdGggV1BBIGVuYWJsZSBjYW4ndCBqb2luIE5vbldQQSBBUC4KLSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocE1nbXQtPmVBdXRoZW5Nb2RlID09IFdNQUNfQVVUSF9XUEEyKSB8fAotICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBNZ210LT5lQXV0aGVuTW9kZSA9PSBXTUFDX0FVVEhfV1BBMlBTSykpIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKHBDdXJyQlNTLT5iV1BBMlZhbGlkID09IEZBTFNFKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvLyBzdGF0aW9uIHdpdGggV1BBMiBlbmFibGUgY2FuJ3Qgam9pbiBOb25XUEEyIEFQLgotICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0qLwogCiAgICAgICAgIHBNZ210LT5wU2FtZUJTU1tqal0udUNoYW5uZWwgPSBwQ3VyckJTUy0+dUNoYW5uZWw7CiAgICAgICAgIERCR19QUlQoTVNHX0xFVkVMX0RFQlVHLCBLRVJOX0lORk8iQlNTcFNlY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ci0gICAgICAgIENBUkR2U2V0Q291bnRyeUluZm8ocE1nbXQtPnBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBCU1NMaXN0LT5lTmV0d29ya1R5cGVJblVzZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSUVfQ291bnRyeSk7Ci0gICAgfQotCi0gICAgaWYgKChiUGFyc2luZ1F1aWV0ID09IFRSVUUpICYmIChwSUVfUXVpZXQgIT0gTlVMTCkpIHsKLSAgICAgICAgaWYgKCgoKFBXTEFOX0lFX1FVSUVUKXBJRV9RdWlldCktPmxlbiA9PSA4KSAmJgotICAgICAgICAgICAgKCgoUFdMQU5fSUVfUVVJRVQpcElFX1F1aWV0KS0+YnlRdWlldENvdW50ICE9IDApKSB7Ci0gICAgICAgICAgICAvLyB2YWxpZCBFSUQKLSAgICAgICAgICAgIGlmIChwUXVpZXQgPT0gTlVMTCkgewotICAgICAgICAgICAgICAgIHBRdWlldCA9IChQV0xBTl9JRV9RVUlFVClwSUVfUXVpZXQ7Ci0gICAgICAgICAgICAgICAgQ0FSRGJTZXRRdWlldCggIHBNZ210LT5wQWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVFJVRSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFF1aWV0LT5ieVF1aWV0Q291bnQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBRdWlldC0+YnlRdWlldFBlcmlvZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKigoUFdPUkQpcFF1aWV0LT5hYnlRdWlldER1cmF0aW9uKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKigoUFdPUkQpcFF1aWV0LT5hYnlRdWlldE9mZnNldCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKLSAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgcFF1aWV0ID0gKFBXTEFOX0lFX1FVSUVUKXBJRV9RdWlldDsKLSAgICAgICAgICAgICAgICBDQVJEYlNldFF1aWV0KCAgcE1nbXQtPnBBZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGQUxTRSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFF1aWV0LT5ieVF1aWV0Q291bnQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBRdWlldC0+YnlRdWlldFBlcmlvZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKigoUFdPUkQpcFF1aWV0LT5hYnlRdWlldER1cmF0aW9uKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKigoUFdPUkQpcFF1aWV0LT5hYnlRdWlldE9mZnNldCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLQotICAgIGlmICgoYlBhcnNpbmdRdWlldCA9PSBUUlVFKSAmJgotICAgICAgICAocFF1aWV0ICE9IE5VTEwpKSB7Ci0gICAgICAgIENBUkRiU3RhcnRRdWlldChwTWdtdC0+cEFkYXB0ZXIpOwotICAgIH0KLSovCi0KICAgICBwQlNTTGlzdC0+dUlFTGVuZ3RoID0gdUlFTGVuZ3RoOwogICAgIGlmIChwQlNTTGlzdC0+dUlFTGVuZ3RoID4gV0xBTl9CRUFDT05fRlJfTUFYTEVOKQogICAgICAgICBwQlNTTGlzdC0+dUlFTGVuZ3RoID0gV0xBTl9CRUFDT05fRlJfTUFYTEVOOwpAQCAtNjA5LDggKzU0Miw2IEBACiAgICAgUFNSeE1nbXRQYWNrZXQgIHBSeFBhY2tldCA9IChQU1J4TWdtdFBhY2tldClwUnhQYWNrZXRDb250ZXh0OwogICAgIHNpZ25lZCBsb25nICAgICAgICAgICAgbGRCbSwgbGRCbVN1bTsKICAgICBCT09MICAgICAgICAgICAgYlBhcnNpbmdRdWlldCA9IEZBTFNFOwot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Lyogc192Q2hlY2tTZW5zaXRpdml0eSgodm9pZCAqKSBwRGV2aWNlKTsgKi8KQEAgLTExOTQsNyArMTExNiw2IEBACiAgICAgICAgICAgICAgcERldmljZS0+c2tiID0gZGV2X2FsbG9jX3NrYigoaW50KXBEZXZpY2UtPnJ4X2J1Zl9zeik7CiAgICAgICAgICB9CiAgICAjaWZkZWYgV1BBX1NVUFBMSUNBTlRfRFJJVkVSX1dFWFRfU1VQUE9SVAotICAvLyBpZihwRGV2aWNlLT5iV1BBU3VwcFdleHRFbmFibGVkID09IFRSVUUpCiAgICAgICB7CiAJdW5pb24gaXdyZXFfZGF0YSAgd3JxdTsKIAltZW1zZXQoJndycXUsIDAsIHNpemVvZiAod3JxdSkpOwpAQCAtMTIyMyw3ICsxMTQ0LDYgQEAKICAgICAgICAgICAgICAgICBwRGV2aWNlLT51SXNyb2FtaW5nVGltZSA9IDA7CiAgICAgICAgICAgICAgICAgcERldmljZS0+YlJvYW1pbmcgPSBGQUxTRTsKIAotLy8gICAgICAgICAgICBpZiAoKHBEZXZpY2UtPmJXUEFERVZVcCkgJiYgKHBEZXZpY2UtPnNrYiAhPSBOVUxMKSkgewogICAgICAgICAgICAgIHdwYWhkciA9ICh2aWF3Z2V0X3dwYV9oZWFkZXIgKilwRGV2aWNlLT5za2ItPmRhdGE7CiAgICAgICAgICAgICAgd3BhaGRyLT50eXBlID0gVklBV0dFVF9DQ0tNX1JPQU1fTVNHOwogICAgICAgICAgICAgIHdwYWhkci0+cmVzcF9pZV9sZW4gPSAwOwpAQCAtMTIzNyw3ICsxMTU3LDYgQEAKICAgICAgICAgICAgICBuZXRpZl9yeChwRGV2aWNlLT5za2IpOwogICAgICAgICAgICAgcERldmljZS0+c2tiID0gZGV2X2FsbG9jX3NrYigoaW50KXBEZXZpY2UtPnJ4X2J1Zl9zeik7CiAKLS8vICAgICAgICAgfQogICAgICAgICAgIH0KICAgICAgIGVsc2UgaWYgKChwRGV2aWNlLT5iUm9hbWluZyA9PSBGQ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OiAxO0xWRFMgc2lnbmFsIG9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAgICAgIGJsWzFdIDogMTtMVkRTIGJhY2tsaWdodCBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogICAgICBibFswXSA6IDE6TFZEUyBWREQgb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qICAgICAgYmg6IDEwMDAwMGIgOiBjbGVhciBiaXQgNSwgdG8gc2V0IGJpdDUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAgICAgICAgICAwMDAwMTBiIDogY2xlYXIgYml0IDEsIHRvIHNldCBiaXQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogICAgICAgICAgMDAwMDAxYiA6IGNsZWFyIGJpdCAwLCB0byBzZXQgYml0MCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCitzdGF0aWMgdm9pZCBYR0lfWEcyMUJMU2lnbmFsVkREKHVuc2lnbmVkIHNob3J0IHRlbXBiaCwgdW5zaWduZWQgc2hvcnQgdGVtcGJsLAorCQlzdHJ1Y3QgdmJfZGV2aWNlX2luZm8gKnBWQkluZm8pCit7CisJdW5zaWduZWQgY2hhciBDUjRBLCB0ZW1wOworCisJQ1I0QSA9IHhnaWZiX3JlZ19nZXQocFZCSW5mby0+UDNkNCwgMHg0QSk7CisJdGVtcGJoICY9IDB4MjM7CisJdGVtcGJsICY9IDB4MjM7CisJeGdpZmJfcmVnX2FuZChwVkJJbmZvLT5QM2Q0LCAweDRBLCB+dGVtcGJoKTsgLyogZW5hYmxlIEdQSU8gd3JpdGUgKi8KKworCWlmICh0Z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VkJJbmZvKTsKLQkJCS8qIExvYWREQUMyKHBWQkluZm8tPlBhcnQ1UG9ydCwgTW9kZU5vLCBNb2RlSWRJbmRleCk7ICovCiAJCX0KIAl9CiAJcmV0dXJuOwpAQCAtNTkyMSwxMTggKzU4MDUsMTEgQEAKIAl4Z2lmYl9yZWdfYW5kX29yKHBWQkluZm8tPlAzZDQsIDB4NjMsIDB4QkYsIDB4MDApOwogfQogCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotLyogaW5wdXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgYmxbNV0gOiAxO0xWRFMgc2lnbmFsIG9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgIGJsWzFdIDogMTtMVkRTIGJhY2tsaWdodCBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICBibFswXSA6IDE6TFZEUyBWREQgb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgYmg6IDEwMDAwMGIgOiBjbGVhciBiaXQgNSwgdG8gc2V0IGJpdDUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAwMDAwMTBiIDogY2xlYXIgYml0IDEsIHRvIHNldCBiaXQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgMDAwMDAxYiA6IGNsZWFyIGJpdCAwLCB0byBzZXQgYml0MCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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Rlc3RzPyAqLworc3RhdGljIGludCBidWdneV91YXJ0OworCittb2R1bGVfcGFyYW0oZG9fc291bmQsIGludCwgMDQ0NCk7Cittb2R1bGVfcGFyYW0oYnVnZ3lfdWFydCwgaW50LCAwNDQ0KTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qIFRhYmxlIG9mIG11bHRpLXBvcnQgY2FyZCBJRCdzICovCisKK3N0cnVjdCBzZXJpYWxfcXVpcmsgeworCXVuc2lnbmVkIGludCBtYW5maWQ7CisJdW5zaWduZWQgaW50IHByb2RpZDsKKwlpbnQgbXVsdGk7CQkvKiAxID0gbXVsdGlmdW5jdGlvbiwgPiAxID0gIyBwb3J0cyAqLworCXZvaWQgKCpjb25maWcpKHN0cnVjdCBwY21jaWFfZGV2aWNlICopOworCXZvaWQgKCpzZXR1cCkoc3RydWN0IHBjbWNpYV9kZXZpY2UgKiwgc3RydWN0IHVhcnRfcG9ydCAqKTsKKwl2b2lkICgqd2FrZXVwKShzdHJ1Y3QgcGNtY2lhX2RldmljZSAqKTsKKwlpbnQgKCpwb3N0KShzdHJ1Y3QgcGNtY2lhX2RldmljZSAqKTsKK307CisKK3N0cnVjdCBzZXJpYWxfaW5mbyB7CisJc3RydWN0IHBjbWNpYV9kZXZpY2UJKnBfZGV2OworCWludAkJCW5kZXY7CisJaW50CQkJbXVsdGk7CisJaW50CQkJc2xhdmU7CisJaW50CQkJbWFuZmlkOworCWludAkJCXByb2RpZDsKKwlpbnQJCQljOTUwY3RybDsKKwlpbnQJCQlsaW5lWzRdOworCWNvbnN0IHN0cnVjdCBzZXJpYWxfcXVpcmsgKnF1aXJrOworfTsKKworc3RydWN0IHNlcmlhbF9jZmdfbWVtIHsKKwl0dXBsZV90IHR1cGxlOworCWNpc3BhcnNlX3QgcGFyc2U7CisJdV9jaGFyIGJ1ZlsyNTZdOworfTsKKworLyoKKyAqIHZlcnNfMS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jsKKworCSpiYXNlMiA9IHBfZGV2LT5yZXNvdXJjZVswXS0+c3RhcnQgKyA4OworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG11bHRpX2NvbmZpZyhzdHJ1Y3QgcGNtY2lhX2RldmljZSAqbGluaykKK3sKKwlzdHJ1Y3Qgc2VyaWFsX2luZm8gKmluZm8gPSBsaW5rLT5wcml2OworCWludCBpLCBiYXNlMiA9IDA7CisKKwkvKiBGaXJzdCwgbG9vayBmb3IgYSBnZW5lcmljIGZ1bGwtc2l6ZWQgd2luZG93ICovCisJaWYgKCFwY21jaWFfbG9vcF9jb25maWcobGluaywgbXVsdGlfY29uZmlnX2NoZWNrLCAmaW5mby0+bXVsdGkpKQorCQliYXNlMiA9IGxpbmstPnJlc291cmNlWzBdLT5zdGFydCArIDg7CisJZWxzZSB7CisJCS8qIElmIHRoYXQgZGlkbid0IHdvcmssIGxvb2sgZm9yIHR3byB3aW5kb3dzICovCisJCWluZm8tPm11bHRpID0gMjsKKwkJaWYgKHBjbWNpYV9sb29wX2NvbmZpZyhsaW5rLCBtdWx0aV9jb25maWdfY2hlY2tfbm90cGlja3ksCisJCQkJICAgICAgICZiYXNlMikpIHsKKwkJCWRldl93YXJuKCZsaW5rLT5kZXYsICJubyB1c2FibGUgcG9ydCByYW5nZSAiCisJCQkgICAgICAgImZvdW5kLCBnaXZpbmcgdXBcbiIpOworCQkJcmV0dXJuIC1FTk9ERVY7CisJCX0KKwl9CisKKwlpZiAoIWxpbmstPmlycSkKKwkJZGV2X3dhcm4oJmxpbmstPmRldiwgIm5vIHVzYWJsZSBJUlEgZm91bmQsIGNvbnRpbnVpbmcuLi5cbiIpOworCisJLyoKKwkgKiBBcHBseSBhbnkgY29uZmlndXJhdGlvbiBxdWlya3MuCisJICovCisJaWYgKGluZm8tPnF1aXJrICYmIGluZm8tPnF1aXJrLT5jb25maWcpCisJCWluZm8tPnF1aXJrLT5jb25maWcobGluayk7CisKKwlpID0gcGNtY2lhX2VuYWJsZV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AiQiBEZXZpY2UgTm8gUmVzcG9uc2UhXG4iKTsKKworCWlmIChzcGluX3RyeWxvY2soJm12b3RnLT53cV9sb2NrKSkgeworCQltdl9vdGdfcnVuX3N0YXRlX21hY2hpbmUobXZvdGcsIDApOworCQlzcGluX3VubG9jaygmbXZvdGctPndxX2xvY2spOworCX0KK30KKworc3RhdGljIGludCBtdl9vdGdfY2FuY2VsX3RpbWVyKHN0cnVjdCBtdl9vdGcgKm12b3RnLCB1bnNpZ25lZCBpbnQgaWQpCit7CisJc3RydWN0IHRpbWVyX2xpc3QgKnRpbWVyOworCisJaWYgKGlkID49IE9UR19USU1FUl9OVU0pCisJCXJldHVybiAtRUlOVkFMOworCisJdGltZXIgPSAmbXZvdGctPm90Z19jdHJsLnRpbWVyW2lkXTsKKworCWlmICh0aW1lcl9wZW5kaW5nKHRpbWVyKSkKKwkJZGVsX3RpbWVyKHRpbWVyKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG12X290Z19zZXRfdGltZXIoc3RydWN0IG12X290ZyAqbXZvdGcsIHVuc2lnbmVkIGludCBpZCwKKwkJCSAgICB1bnNpZ25lZCBsb25nIGludGVydmFsLAorCQkJICAgIHZvaWQgKCpjYWxsYmFjaykgKHVuc2lnbmVkIGxvbmcpKQoreworCXN0cnVjdCB0aW1lcl9saXN0ICp0aW1lcjsKKworCWlmIChpZCA+PSBPVEdfVElNRVJfTlVNKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCXRpbWVyID0gJm12b3RnLT5vdGdfY3RybC50aW1lcltpZF07CisJaWYgKHRpbWVyX3BlbmRpbmcodGltZXIpKSB7CisJCWRldl9lcnIoJm12b3RnLT5wZGV2LT5kZXYsICJUaW1lciVkIGlzIGFscmVhZHkgcnVubmluZ1xuIiwgaWQpOworCQlyZXR1cm4gLUVCVVNZOworCX0KKworCWluaXRfdGltZXIodGltZXIpOworCXRpbWVyLT5kYXRhID0gKHVuc2lnbmVkIGxvbmcpIG12b3RnOworCXRpbWVyLT5mdW5jdGlvbiA9IGNhbGxiYWNrOworCXRpbWVyLT5leHBpcmVzID0gamlmZmllcyArIGludGVydmFsOworCWFkZF90aW1lcih0aW1lcik7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBtdl9vdGdfcmVzZXQoc3RydWN0IG12X290ZyAqbXZvdGcpCit7CisJdW5zaWduZWQgaW50IGxvb3BzOworCXUzMiB0bXA7CisKKwkvKiBTdG9wIHRoZSBjb250cm9sbGVyICovCisJdG1wID0gcmVhZGwoJm12b3RnLT5vcF9yZWdzLT51c2JjbWQpOworCXRtcCAmPSB+VVNCQ01EX1JVTl9TVE9QOworCXdyaXRlbCh0bXAsICZtdm90Zy0+b3BfcmVncy0+dXNiY21kKTsKKworCS8qIFJlc2V0IHRoZSBjb250cm9sbGVyIHRvIGdldCBkZWZhdWx0IHZhbHVlcyAqLworCXdyaXRlbChVU0JDTURfQ1RSTF9SRVNFVCwgJm12b3RnLT5vcF9yZWdzLT51c2JjbWQpOworCisJbG9vcHMgPSA1MDA7CisJd2hpbGUgKHJlYWRsKCZtdm90Zy0+b3BfcmVncy0+dXNiY21kKSAmIFVTQkNNRF9DVFJMX1JFU0VUKSB7CisJCWlmIChsb29wcyA9PSAwKSB7CisJCQlkZXZfZXJyKCZtdm90Zy0+cGRldi0+ZGV2LAorCQkJCSJXYWl0IGZvciBSRVNFVCBjb21wbGV0ZWQgVElNRU9VVFxuIik7CisJCQlyZXR1cm4gLUVUSU1FRE9VVDsKKwkJfQorCQlsb29wcy0tOworCQl1ZGVsYXkoMjApOworCX0KKworCXdyaXRlbCgweDAsICZtdm90Zy0+b3BfcmVncy0+dXNiaW50cik7CisJdG1wID0gcmVhZGwoJm12b3RnLT5vcF9yZWdzLT51c2JzdHMpOworCXdyaXRlbCh0bXAsICZtdm90Zy0+b3BfcmVncy0+dXNic3RzKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBtdl9vdGdfaW5pdF9pcnEoc3RydWN0IG12X290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S0tLSAgICAtLS0tLQorCSAgICAgICB4cmVzICB5cmVzICAgIGxlZnQgIHJpZ2h0ICB1cHBlciAgbG93ZXIgICAgaHN5bmMgICAgdnN5bmMKKwkgICAgICAgLS0tLSAgLS0tLSAgICAtLS0tICAtLS0tLSAgLS0tLS0gIC0tLS0tICAgIC0tLS0tICAgIC0tLS0tCiAKICAgICAgIFZHQSAgICAgICA2NDAgICA0ODAgICAgICA1MiAgICAxMTIgICAgIDI0ICAgICAxOSAgICAxMTIgLSAgICAgIDIgKwogICAgICAgVkdBNzAgICAgIDY0MCAgIDQwMCAgICAgIDUyICAgIDExMiAgICAgMjcgICAgIDIxICAgIDExMiAtICAgICAgMiAtCkBAIC0zMDksMTAgKzMwOSwxMCBAQAogCiAgICAgICBWU1lOQyAgICBIU1lOQyAgICBWZXJ0aWNhbCBzaXplICAgIFZlcnRpY2FsIHRvdGFsCiAgICAgICAtLS0tLSAgICAtLS0tLSAgICAtLS0tLS0tLS0tLS0tICAgIC0tLS0tLS0tLS0tLS0tCi0gICAgICAgICsgICAgICAgICsgICAgICAgICAgIFJlc2VydmVkICAgICAgICAgIFJlc2VydmVkCi0gICAgICAgICsgICAgICAgIC0gICAgICAgICAgICAgICAgNDAwICAgICAgICAgICAgICAgNDE0Ci0gICAgICAgIC0gICAgICAgICsgICAgICAgICAgICAgICAgMzUwICAgICAgICAgICAgICAgMzYyCi0gICAgICAgIC0gICAgICAgIC0gICAgICAgICAgICAgICAgNDgwICAgICAgICAgICAgICAgNDk2CisJKyAgICAgICAgKyAgICAgICAgICAgUmVzZXJ2ZWQgICAgICAgICAgUmVzZXJ2ZWQKKwkrICAgICAgICAtICAgICAgICAgICAgICAgIDQwMCAgICAgICAgICAgICAgIDQxNAorCS0gICAgICAgICsgICAgICAgICAgICAgICAgMzUwICAgICAgICAgICAgICAgMzYyCisJLSAgICAgICAgLSAgICAgICAgICAgICAgICA0ODAgICAgICAgICAgICAgICA0OTYKIAogICAgU291cmNlOiBDTC1HRDU0M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3ItPm5hbWUpOworCQlyID0gLUVJTlZBTDsKKwkJZ290byBlcnI7CisJfQorCisJZHNzZGV2LT5tYW5hZ2VyID0gbWdyOworCW1nci0+ZGV2aWNlID0gZHNzZGV2OworCisJbXV0ZXhfdW5sb2NrKCZhcHBseV9sb2NrKTsKKworCXJldHVybiAwOworZXJyOgorCW11dGV4X3VubG9jaygmYXBwbHlfbG9jayk7CisJcmV0dXJuIHI7Cit9CisKK2ludCBkc3NfbWdyX3Vuc2V0X2RldmljZShzdHJ1Y3Qgb21hcF9vdmVybGF5X21hbmFnZXIgKm1ncikKK3sKKwlpbnQgcjsKKworCW11dGV4X2xvY2soJmFwcGx5X2xvY2spOworCisJaWYgKCFtZ3ItPmRldmljZSkgeworCQlEU1NFUlIoImZhaWxlZCB0byB1bnNldCBkaXNwbGF5LCBkaXNwbGF5IG5vdCBzZXQuXG4iKTsKKwkJciA9IC1FSU5WQUw7CisJCWdvdG8gZXJyOworCX0KKworCS8qCisJICogRG9uJ3QgYWxsb3cgY3VycmVudGx5IGVuYWJsZWQgZGlzcGxheXMgdG8gaGF2ZSB0aGUgb3ZlcmxheSBtYW5hZ2VyCisJICogcHVsbGVkIG91dCBmcm9tIHVuZGVybmVhdGggdGhlbQorCSAqLworCWlmIChtZ3ItPmRldmljZS0+c3RhdGUgIT0gT01BUF9EU1NfRElTUExBWV9ESVNBQkxFRCkgeworCQlyID0gLUVJTlZBTDsKKwkJZ290byBlcnI7CisJfQorCisJbWdyLT5kZXZpY2UtPm1hbmFnZXIgPSBOVUxMOworCW1nci0+ZGV2aWNlID0gTlVMTDsKKworCW11dGV4X3VubG9jaygmYXBwbHlfbG9jayk7CisKKwlyZXR1cm4gMDsKK2VycjoKKwltdXRleF91bmxvY2soJmFwcGx5X2xvY2spOworCXJldHVybiByOworfQorCisKK2ludCBkc3Nfb3ZsX3NldF9pbmZvKHN0cnVjdCBvbWFwX292ZXJsYXkgKm92bCwKKwkJc3RydWN0IG9tYXBfb3ZlcmxheV9p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GhlIG1hbmFnZXJcbiIpOworCQlyID0gLUVJTlZBTDsKKwkJZ290byBlcnI7CisJfQorCisJb3AtPmNoYW5uZWwgPSAtMTsKKworCW92bC0+bWFuYWdlciA9IE5VTEw7CisJbGlzdF9kZWwoJm92bC0+bGlzdCk7CisKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZkYXRhX2xvY2ssIGZsYWdzKTsKKworCW11dGV4X3VubG9jaygmYXBwbHlfbG9jayk7CisKKwlyZXR1cm4gMDsKK2VycjoKKwltdXRleF91bmxvY2soJmFwcGx5X2xvY2spOworCXJldHVybiByOworfQorCitib29sIGRzc19vdmxfaXNfZW5hYmxlZChzdHJ1Y3Qgb21hcF9vdmVybGF5ICpvdmwpCit7CisJc3RydWN0IG92bF9wcml2X2RhdGEgKm9wID0gZ2V0X292bF9wcml2KG92bCk7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKwlib29sIGU7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmZGF0YV9sb2NrLCBmbGFncyk7CisKKwllID0gb3AtPmVuYWJsZWQ7CisKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZkYXRhX2xvY2ssIGZsYWdzKTsKKworCXJldHVybiBlOworfQorCitpbnQgZHNzX292bF9lbmFibGUoc3RydWN0IG9tYXBfb3ZlcmxheSAqb3ZsKQoreworCXN0cnVjdCBvdmxfcHJpdl9kYXRhICpvcCA9IGdldF9vdmxfcHJpdihvdmwpOworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisJaW50IHI7CisKKwltdXRleF9sb2NrKCZhcHBseV9sb2NrKTsKKworCWlmIChvcC0+ZW5hYmxlZCkgeworCQlyID0gMDsKKwkJZ290byBlcnIxOworCX0KKworCWlmIChvdmwtPm1hbmFnZXIgPT0gTlVMTCB8fCBvdmwtPm1hbmFnZXItPmRldmljZSA9PSBOVUxMKSB7CisJCXIgPSAtRUlOVkFMOworCQlnb3RvIGVycjE7CisJfQorCisJc3Bpbl9sb2NrX2l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0lbGx1KSwiCisJCQkgICAgICAgIiBuZXcoZ2VuPSVsbHUpLCIKKwkJCSAgICAgICAiIHdoaWNoIGlzIHJlZmVyZW5jZWQgYnkgbW9zdCByZWNlbnQgc3VwZXJibG9jayIKKwkJCSAgICAgICAiIChzdXBlcmJsb2NrZ2VuPSVsbHUpIVxuIiwKKwkJCSAgICAgICBidHJmc2ljX2dldF9ibG9ja190eXBlKHN0YXRlLCBibG9jayksCisJCQkgICAgICAgKHVuc2lnbmVkIGxvbmcgbG9uZylieXRlbnIsCisJCQkgICAgICAgZGV2X3N0YXRlLT5uYW1lLAorCQkJICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpZGV2X2J5dGVuciwKKwkJCSAgICAgICBibG9jay0+bWlycm9yX251bSwKKwkJCSAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKWJsb2NrLT5nZW5lcmF0aW9uLAorCQkJICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpCisJCQkgICAgICAgbGU2NF90b19jcHUoYmxvY2stPmRpc2tfa2V5Lm9iamVjdGlkKSwKKwkJCSAgICAgICBibG9jay0+ZGlza19rZXkudHlwZSwKKwkJCSAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKQorCQkJICAgICAgIGxlNjRfdG9fY3B1KGJsb2NrLT5kaXNrX2tleS5vZmZzZXQpLAorCQkJICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpCisJCQkgICAgICAgbGU2NF90b19jcHUoKChzdHJ1Y3QgYnRyZnNfaGVhZGVyICopCisJCQkJCSAgICBtYXBwZWRfZGF0YSktPmdlbmVyYXRpb24pLAorCQkJICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpCisJCQkgICAgICAgc3RhdGUtPm1heF9zdXBlcmJsb2NrX2dlbmVyYXRpb24pOworCQkJYnRyZnNpY19kdW1wX3RyZWUoc3RhdGUpOworCQl9CisKKwkJaWYgKCFibG9jay0+aXNfaW9kb25lICYmICFibG9jay0+bmV2ZXJfd3Jpd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9XT1JEMV9USU1FX0FDQ0VTU19TRVQgICB8IEZBVFRSNF9XT1JEMV9USU1FX01PRElGWV9TRVQpCiAKIC8qIFRoZXNlIGFyZSB0aGUgb25seSBhdHRycyBhbGxvd2VkIGluIENSRUFURS9PUEVOL1NFVEFUVFIuICovCi0jZGVmaW5lIE5GU0RfV1JJVEVBQkxFX0FUVFJTX1dPUkQwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLShGQVRUUjRfV09SRDBfU0laRSAgICAgICAgICAgICAgfCBGQVRUUjRfV09SRDBfQUNMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApCi0jZGVmaW5lIE5GU0RfV1JJVEVBQkxFX0FUVFJTX1dPUkQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLShGQVRUUjRfV09SRDFfTU9ERSAgICAgICAgICAgICAgfCBGQVRUUjRfV09SRDFfT1dORVIgICAgICAgICB8IEZBVFRSNF9XT1JEMV9PV05FUl9HUk9VUCAgICAgXAotIHwgRkFUVFI0X1dPUkQxX1RJTUVfQUNDRVNTX1NFVCB8IEZBVFRSNF9XT1JEMV9USU1FX01PRElGWV9TRVQpCisjZGVmaW5lIE5GU0RfV1JJVEVBQkxFX0FUVFJTX1dPUkQwIFwKKwkoRkFUVFI0X1dPUkQwX1NJWkUgfCBGQVRUUjRfV09SRDBfQUNMKQorI2RlZmluZSBORlNEX1dSSVRFQUJMRV9BVFRSU19XT1JEMSBcCisJKEZBVFRSNF9XT1JEMV9NT0RFIHwgRkFUVFI0X1dPUkQxX09XTkVSIHwgRkFUVFI0X1dPUkQxX09XTkVSX0dST1VQIFwKKwl8IEZBVFRSNF9XT1JEMV9USU1FX0FDQ0VTU19TRVQgfCBGQVRUUjRfV09SRDFfVElNRV9NT0RJRllfU0VUKQogI2RlZmluZSBORlNEX1dSSVRFQUJMRV9BVFRSU19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DcgKzUwNSw4IEBACiAJCWludCBubGVuID0gbGUxNl90b19jcHUoZGVudC0+bmxlbik7CiAKIAkJa2V5X3JlYWQoYywgJmRlbnQtPmtleSwgJmtleSk7Ci0JCXByaW50ayhLRVJOX0RFQlVHICJcdGtleSAgICAgICAgICAgICVzXG4iLCBEQkdLRVkoJmtleSkpOworCQlwcmludGsoS0VSTl9ERUJVRyAiXHRrZXkgICAgICAgICAgICAlc1xuIiwKKwkJICAgICAgIGRiZ19zbnByaW50Zl9rZXkoYywgJmtleSwga2V5X2J1ZiwgREJHX0tFWV9CVUZfTEVOKSk7CiAJCXByaW50ayhLRVJOX0RFQlVHICJcdGludW0gICAgICAgICAgICVsbHVcbiIsCiAJCSAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKWxlNjRfdG9fY3B1KGRlbnQtPmludW0pKTsKIAkJcHJpbnRrKEtFUk5fREVCVUcgIlx0dHlwZSAgICAgICAgICAgJWRcbiIsIChpbnQpZGVudC0+dHlwZSk7CkBAIC01NDEsNyArNTMwLDggQEAKIAkJaW50IGRsZW4gPSBsZTMyX3RvX2NwdShjaC0+bGVuKSAtIFVCSUZTX0RBVEFfTk9ERV9TWjsKIAogCQlrZXlfcmVhZChjLCAmZG4tPmtleSwgJmtleSk7Ci0JCXByaW50ayhLRVJOX0RFQlVHICJcdGtleSAgICAgICAgICAgICVzXG4iLCBEQkdLRVkoJmtleSkpOworCQlwcmludGsoS0VSTl9ERUJVRyAiXHRrZXkgICAgICAgICAgICAlc1xuIiwKKwkJICAgICAgIGRiZ19zbnByaW50Zl9rZXkoYywgJmtleSwga2V5X2J1ZiwgREJHX0tFWV9CVUZfTEVOKSk7CiAJCXByaW50ayhLRVJOX0RFQlVHICJcdHNpemUgICAgICAgICAgICV1XG4iLAogCQkgICAgICAgbGUzMl90b19jcHUoZG4tPnNpemUpKTsKIAkJcHJpbnRrKEtFUk5fREVCVUcgIlx0Y29tcHJfdHlwICAgICAgJWRcbiIsCkBAIC01ODIsNyArNTc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ZG8geyAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlzcGluX2xvY2soJmRiZ19sb2NrKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX2RlYnVnKCJVQklGUyBEQkcgIiB0eXBlICI6ICIgZm10ICJcbiIsICMjX19WQV9BUkdTX18pOyBcCi0Jc3Bpbl91bmxvY2soJmRiZ19sb2NrKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyNkZWZpbmUgREJHX0tFWV9CVUZfTEVOIDMyCisjZGVmaW5lIHViaWZzX2RiZ19tc2dfa2V5KHR5cGUsIGtleSwgZm10LCAuLi4pIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCWNoYXIgX190bXBfa2V5X2J1ZltEQkdfS0VZX0JVRl9MRU5dOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX2RlYnVnKCJVQklGUyBEQkcgIiB0eXBlICI6ICIgZm10ICIlc1xuIiwgIyNfX1ZBX0FSR1NfXywgICAgICAgICAgICAgXAorCQkgZGJnX3NucHJpbnRmX2tleShjLCBrZXksIF9fdG1wX2tleV9idWYsIERCR19LRVlfQlVGX0xFTikpOyAgICBcCiB9IHdoaWxlICgwKQogCiAvKiBKdXN0IGEgZGVidWdnaW5nIG1lc3NhZ2VzIG5vdCByZWxhdGVkIHRvIGFueSBzcGVjaWZpYyBVQklGUyBzdWJzeXN0ZW0gKi8KLSNkZWZpbmUgZGJnX21zZyhmbXQsIC4uLikgICB1Ymlmc19kYmdfbXNnKCJtc2ciLCBmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19tc2coZm10LCAuLi4pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByaW50ayhLRVJOX0RFQlVHICJVQklGUyBEQkcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCBjdXJyZW50LT5waWQsICAgXAorC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TkdFUykKQEAgLTgxLDE2ICs4NCwyNiBAQAogI2RlZmluZSBBQ1BJX0RFQ09ERV8xNiAgICAgICAgICAgICAgICAgICh1OCkgMHgwMQkvKiAxNi1iaXQgSU8gYWRkcmVzcyBkZWNvZGUgKi8KIAogLyoKLSAqIElSUSBBdHRyaWJ1dGVzCisgKiBJbnRlcnJ1cHQgYXR0cmlidXRlcyAtIHVzZWQgaW4gbXVsdGlwbGUgZGVzY3JpcHRvcnMKICAqLworCisvKiBUcmlnZ2VyaW5nICovCisKICNkZWZpbmUgQUNQSV9MRVZFTF9TRU5TSVRJVkUgICAgICAgICAgICAodTgpIDB4MDAKICNkZWZpbmUgQUNQSV9FREdFX1NFTlNJVElWRSAgICAgICAgICAgICAodTgpIDB4MDEKIAorLyogUG9sYXJpdHkgKi8KKwogI2RlZmluZSBBQ1BJX0FDVElWRV9ISUdIICAgICAgICAgICAgICAgICh1OCkgMHgwMAogI2RlZmluZSBBQ1BJX0FDVElWRV9MT1cgICAgICAgICAgICAgICAgICh1OCkgMHgwMQorI2RlZmluZSBBQ1BJX0FDVElWRV9CT1RIICAgICAgICAgICAgICAgICh1OCkgMHgwMgorCisvKiBTaGFyaW5nICovCiAKICNkZWZpbmUgQUNQSV9FWENMVVNJVkUgICAgICAgICAgICAgICAgICAodTgpIDB4MDAKICNkZWZpbmUgQUNQSV9TSEFSRUQgICAgICAgICAgICAgICAgICAgICAodTgpIDB4MDEKKyNkZWZpbmUgQUNQSV9FWENMVVNJVkVfQU5EX1dBS0UgICAgICAgICAodTgpIDB4MDIKKyNkZWZpbmUgQUNQSV9TSEFSRURfQU5EX1dBS0UgICAgICAgICAgICAodTgpIDB4MDMKIAogLyoKICAqIERNQSBBdHRyaWJ1dGVzCkBAIC0xMjcsNiArMTQwLDggQEAKICNkZWZpbmUgQUNQSV9QT1NfREVDT0RFICAgICAgICAgICAgICAgICAodTgpIDB4MDAKICNkZWZpbmUgQUNQSV9TVUJfREVDT0RFICAgICAgICAgICAgICAgICAodTgpIDB4MDEKIAorLyogUHJvZHVjZXIvQ29uc3VtZXIgKi8KKwogI2RlZmluZSBBQ1BJX1BST0RVQ0VSICAgICAgICAgICAgICAgICAgICh1OCkgMHgwMAogI2RlZmluZSBBQ1BJX0NPTlNVTUVSICAgICAgICAgICAgICAgICAgICh1OCkgMHgwMQogCkBAIC0xOTIsNiArMjA3LDIxIEBACiAJdTggYWRkcmVzc19sZW5ndGg7CiB9OwogCitzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9maXhlZF9kbWEgeworCXUxNiByZXF1ZXN0X2xpbmVzOworCXUxNiBjaGFubmVsczsKKwl1OCB3aWR0aDsKK307CisKKy8qIFZhbHVlcyBmb3IgV2lkdGggZmllbGQgYWJvdmUgKi8KKworI2RlZmluZSBBQ1BJX0RNQV9XSURUSDggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1BJX0RNQV9XSURUSDE2ICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX0RNQV9XSURUSDMyICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBQ1BJX0RNQV9XSURUSDY0ICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBQ1BJX0RNQV9XSURUSDEyOCAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBQ1BJX0RNQV9XSURUSDI1NiAgICAgICAgICAgICAgICAgICAgICAgNQorCiBzdHJ1Y3QgYWNwaV9yZXNvdXJjZV92ZW5kb3IgewogCXUxNiBieXRlX2xlbmd0aDsKIAl1OCBieXRlX2RhdGFbMV07CkBAIC0zMjksNiArMzU5LDE2NiBAQAogCXU2NCBhZGRyZXNzOwogfTsKIAorc3RydWN0IGFjcGlfcmVzb3VyY2VfZ3BpbyB7CisJdTggcmV2aXNpb25faWQ7CisJdTggY29ubmVjdGlvbl90eXBlOworCXU4IHByb2R1Y2VyX2NvbnN1bWVyOwkvKiBGb3IgdmFsdWVzLCBzZWUgUHJ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zCisKKy8qIFZhbHVlcyBmb3IgaW9fcmVzdHJpY3Rpb24gZmllbGQgYWJvdmUgKi8KKworI2RlZmluZSBBQ1BJX0lPX1JFU1RSSUNUX05PTkUgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1BJX0lPX1JFU1RSSUNUX0lOUFVUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX0lPX1JFU1RSSUNUX09VVFBVVCAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBQ1BJX0lPX1JFU1RSSUNUX05PTkVfUFJFU0VSVkUgICAgICAgICAgMworCisvKiBDb21tb24gc3RydWN0dXJlIGZvciBJMkMsIFNQSSwgYW5kIFVBUlQgc2VyaWFsIGRlc2NyaXB0b3JzICovCisKKyNkZWZpbmUgQUNQSV9SRVNPVVJDRV9TRVJJQUxfQ09NTU9OIFwKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2aXNpb25faWQ7IFwKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9kdWNlcl9jb25zdW1lcjsgICAvKiBGb3IgdmFsdWVzLCBzZWUgUHJvZHVjZXIvQ29uc3VtZXIgYWJvdmUgKi9cCisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsYXZlX21vZGU7IFwKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZV9yZXZpc2lvbl9pZDsgXAorCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlX2RhdGFfbGVuZ3RoOyBcCisJdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlbmRvcl9sZW5ndGg7IFwKKwlzdHJ1Y3QgYWNwaV9yZXNvdXJjZV9zb3VyY2UgICAgICAgICAgICAgcmVzb3Vy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B1OCB3aXJlX21vZGU7CisJdTggZGV2aWNlX3BvbGFyaXR5OworCXU4IGRhdGFfYml0X2xlbmd0aDsKKwl1OCBjbG9ja19waGFzZTsKKwl1OCBjbG9ja19wb2xhcml0eTsKKwl1MTYgZGV2aWNlX3NlbGVjdGlvbjsKKwl1MzIgY29ubmVjdGlvbl9zcGVlZDsKK307CisKKy8qIFZhbHVlcyBmb3Igd2lyZV9tb2RlIGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9TUElfNFdJUkVfTU9ERSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNQSV9TUElfM1dJUkVfTU9ERSAgICAgICAgICAgICAgICAgICAgIDEKKworLyogVmFsdWVzIGZvciBkZXZpY2VfcG9sYXJpdHkgZmllbGQgYWJvdmUgKi8KKworI2RlZmluZSBBQ1BJX1NQSV9BQ1RJVkVfTE9XICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1BJX1NQSV9BQ1RJVkVfSElHSCAgICAgICAgICAgICAgICAgICAgMQorCisvKiBWYWx1ZXMgZm9yIGNsb2NrX3BoYXNlIGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9TUElfRklSU1RfUEhBU0UgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNQSV9TUElfU0VDT05EX1BIQVNFICAgICAgICAgICAgICAgICAgIDEKKworLyogVmFsdWVzIGZvciBjbG9ja19wb2xhcml0eSBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFDUElfU1BJX1NUQVJUX0xPVyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUElfU1BJX1NUQVJUX0hJR0ggICAgICAgICAgICAgICAgICAgICAxCisKK3N0cnVjdCBhY3BpX3Jlc291cmNlX3VhcnRfc2VyaWFsYnVzIHsKKwlBQ1BJX1JFU09VUkNFX1NFUklBTF9DT01NT04gdTggZW5kaWFuOworCXU4IGRhdGFfYml0czsKKwl1OCBzdG9wX2JpdHM7CisJdTggZmxvd19jb250cm9sOworCXU4IHBhcml0eTsKKwl1OCBsaW5lc19lbmFibGVkOworCXUxNiByeF9maWZvX3NpemU7CisJdTE2IHR4X2ZpZm9fc2l6ZTsKKwl1MzIgZGVmYXVsdF9iYXVkX3JhdGU7Cit9OworCisvKiBWYWx1ZXMgZm9yIEVuZGlhbiBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFDUElfVUFSVF9MSVRUTEVfRU5ESUFOICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUElfVUFSVF9CSUdfRU5ESUFOICAgICAgICAgICAgICAgICAgICAxCisKKy8qIFZhbHVlcyBmb3IgZGF0YV9iaXRzIGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9VQVJUXzVfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNQSV9VQVJUXzZfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUNQSV9VQVJUXzdfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNQSV9VQVJUXzhfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQUNQSV9VQVJUXzlfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgIDQKKworLyogVmFsdWVzIGZvciBzdG9wX2JpdHMgZmllbGQgYWJvdmUgKi8KKworI2RlZmluZSBBQ1BJX1VBUlRfTk9fU1RPUF9CSVRTICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1BJX1VBUlRfMV9TVE9QX0JJVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX1VBUlRfMVA1X1NUT1BfQklUUyAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBQ1BJX1VBUlRfMl9TVE9QX0JJVFMgICAgICAgICAgICAgICAgICAgMworCisvKiBWYWx1ZXMgZm9yIGZsb3dfY29udHJvbCBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFDUElfVUFSVF9GTE9XX0NPTlRST0xfTk9ORSAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUElfVUFSVF9GTE9XX0NPTlRST0xfSFcgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFDUElfVUFSVF9GTE9XX0NPTlRST0xfWE9OX1hPRkYgICAgICAgICAyCisKKy8qIFZhbHVlcyBmb3IgUGFyaXR5IGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9VQVJUX1BBUklUWV9OT05FICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNQSV9VQVJUX1BBUklUWV9FVkVOICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUNQSV9VQVJUX1BBUklUWV9PREQgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNQSV9VQVJUX1BBUklUWV9NQVJLICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQUNQSV9VQVJUX1BBUklUWV9TUEFDRSAgICAgICAgICAgICAgICAgIDQKKworLyogVmFsdWVzIGZvciBsaW5lc19lbmFibGVkIGJpdGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9VQVJUX0NBUlJJRVJfREVURUNUICAgICAgICAgICAgICAgICgxPDwyKQorI2RlZmluZSBBQ1BJX1VBUlRfUklOR19JTkRJQ0FUT1IgICAgICAgICAgICAgICAgKDE8PDMpCisjZGVmaW5lIEFDUElfVUFSVF9EQVRBX1NFVF9SRUFEWSAgICAgICAgICAgICAgICAoMTw8NCkKKyNkZWZpbmUgQUNQSV9VQVJUX0RBVEFfVEVSTUlOQUxfUkVBRFkgICAgICAgICAgICgxPDw1KQorI2RlZmluZSBBQ1BJX1VBUlRfQ0xFQVJfVE9fU0VORCAgICAgICAgICAgICAgICAgKDE8PDYpCisjZGVmaW5lIEFDUElfVUFSVF9SRVFVRVNUX1RPX1NFTkQgICAgICAgICAgICAgICAoMTw8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5BQkxFRCAgICAgICAgICAgKDEpCS8qIDAwOiBQcm9jZXNzb3IgaXMgdXNhYmxlIGlmIHNldCAqLwogCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FjcGkvYWN0YmwzLmggYi9pbmNsdWRlL2FjcGkvYWN0YmwzLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYzIyY2U4MAotLS0gL2Rldi9udWxsCisrKyBiL2luY2x1ZGUvYWNwaS9hY3RibDMuaApAQCAtMCwwICsxLDU1MiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE5hbWU6IGFjdGJsMy5oIC0gQUNQSSBUYWJsZSBEZWZpbml0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTEsIEludGVsIENvcnAuCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgorICoKKyAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dAorICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCisgKiBhcmUgbWV0OgorICogMS4gUmVkaXN0cmlidXRpb25zIG9mIHNvdXJjZSBjb2RlIG11c3QgcmV0YWluIHRoZSBhYm92ZSBjb3B5cmlnaHQKKyAqICAgIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMsIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIsCisgKiAgICB3aXRob3V0IG1vZGlmaWNhdGlvbi4KKyAqIDIuIFJlZGl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Rpb25hbCBBQ1BJIFRhYmxlcyAoMykKKyAqCisgKiBUaGVzZSB0YWJsZXMgYXJlIG5vdCBjb25zdW1lZCBkaXJlY3RseSBieSB0aGUgQUNQSUNBIHN1YnN5c3RlbSwgYnV0IGFyZQorICogaW5jbHVkZWQgaGVyZSB0byBzdXBwb3J0IGRldmljZSBkcml2ZXJzIGFuZCB0aGUgQU1MIGRpc2Fzc2VtYmxlci4KKyAqCisgKiBUaGUgdGFibGVzIGluIHRoaXMgZmlsZSBhcmUgZnVsbHkgZGVmaW5lZCB3aXRoaW4gdGhlIEFDUEkgc3BlY2lmaWNhdGlvbi4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogVmFsdWVzIGZvciBkZXNjcmlwdGlvbiB0YWJsZSBoZWFkZXIgc2lnbmF0dXJlcyBmb3IgdGFibGVzIGRlZmluZWQgaW4gdGhpcworICogZmlsZS4gVXNlZnVsIGJlY2F1c2UgdGhleSBtYWtlIGl0IG1vcmUgZGlmZmljdWx0IHRvIGluYWR2ZXJ0ZW50bHkgdHlwZSBpbgorICogdGhlIHdyb25nIHNpZ25hdHVyZS4KKyAqLworI2RlZmluZSBBQ1BJX1NJR19CR1JUICAgICAgICAgICAiQkdSVCIJLyogQm9vdCBHcmFwaGljcyBSZXNvdXJjZSBUYWJsZSAqLworI2RlZmluZSBBQ1BJX1NJR19EUlRNICAgICAgICAgICAiRFJUTSIJLyogRHluYW1pYyBSb290IG9mIFRydXN0IGZvciBNZWFzdXJlbWVudCB0YWJsZSAqLworI2RlZmluZSBBQ1BJX1NJR19GUERUICAgICAgICAgICAiRlBEVCIJLyogRmlybXdhcmUgUGVyZm9ybWFuY2UgRGF0YSBUYWJsZSAqLworI2RlZmluZSBBQ1BJX1NJR19HVERUICAgICAgICAgICAiR1REVCIJLyogR2VuZXJpYyBUaW1lciBEZXNjcmlwdGlvbiBUY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aW5kb3dzIFBsYXRmb3JtIEJpbmFyeSBUYWJsZSAqLworCisvKgorICogQWxsIHRhYmxlcyBtdXN0IGJlIGJ5dGUtcGFja2VkIHRvIG1hdGNoIHRoZSBBQ1BJIHNwZWNpZmljYXRpb24sIHNpbmNlCisgKiB0aGUgdGFibGVzIGFyZSBwcm92aWRlZCBieSB0aGUgc3lzdGVtIEJJT1MuCisgKi8KKyNwcmFnbWEgcGFjaygxKQorCisvKgorICogTm90ZSBhYm91dCBiaXRmaWVsZHM6IFRoZSB1OCB0eXBlIGlzIHVzZWQgZm9yIGJpdGZpZWxkcyBpbiBBQ1BJIHRhYmxlcy4KKyAqIFRoaXMgaXMgdGhlIG9ubHkgdHlwZSB0aGF0IGlzIGV2ZW4gcmVtb3RlbHkgcG9ydGFibGUuIEFueXRoaW5nIGVsc2UgaXMgbm90CisgKiBwb3J0YWJsZSwgc28gZG8gbm90IHVzZSBhbnkgb3RoZXIgYml0ZmllbGQgdHlwZXMuCisgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBCR1JUIC0gQm9vdCBHcmFwaGljcyBSZXNvdXJjZSBUYWJsZSAoQUNQSSA1LjApCisgKiAgICAgICAgVmVyc2lvbiAxCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RydWN0IGFjcGlfdGFibGVfYmdydCB7CisJc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyIGhlYWRlcjsJLyogQ29tbW9uIEFDUEkgdGFibGUgaGVhZGVyICovCisJdTE2IHZlcnNpb247CisJdTggc3RhdHVzOworCXU4IGltYWdlX3R5cGU7CisJdTY0IGltYWdlX2FkZHJlc3M7CisJdTMyIGltYWdlX29mZnNldF94OworCXUzMiBpbWFnZV9vZmZzZXRfeTsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRFJUTSAtIER5bmFtaWMgUm9vdCBvZiBUcnVzdCBmb3IgTWVhc3VyZW1lbnQgdGFibGUKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdHJ1Y3QgYWNwaV90YWJsZV9kcnRtIHsKKwlzdHJ1Y3QgYWNwaV90YWJsZV9oZWFkZXIgaGVhZGVyOwkvKiBDb21tb24gQUNQSSB0YWJsZSBoZWFkZXIgKi8KKwl1NjQgZW50cnlfYmFzZV9hZGRyZXNzOworCXU2NCBlbnRyeV9sZW5ndGg7CisJdTMyIGVudHJ5X2FkZHJlc3MzMjsKKwl1NjQgZW50cnlfYWRkcmVzczY0OworCXU2NCBleGl0X2FkZHJlc3M7CisJdTY0IGxvZ19hcmVhX2FkZHJlc3M7CisJdTMyIGxvZ19hcmVhX2xlbmd0aDsKKwl1NjQgYXJjaF9kZXBlbmRlbnRfYWRkcmVzczsKKwl1MzIgZmxhZ3M7Cit9OworCisvKiAxKSBWYWxpZGF0ZWQgVGFibGVzIExpc3QgKi8KKworc3RydWN0IGFjcGlfZHJ0bV92dGxfbGlzdCB7CisJdTMyIHZhbGlkYXRlZF90YWJsZV9saXN0X2NvdW50OworfTsKKworLyogMikgUmVzb3VyY2VzIExpc3QgKi8KKworc3RydWN0IGFjcGlfZHJ0bV9yZXNvdXJjZV9saXN0IHsKKwl1MzIgcmVzb3VyY2VfbGlzdF9jb3VudDsKK307CisKKy8qIDMpIFBsYXRmb3JtLXNwZWNpZmljIElkZW50aWZpZXJzIExpc3QgKi8KKworc3RydWN0IGFjcGlfZHJ0bV9pZF9saXN0IHsKKwl1MzIgaWRfbGlzdF9jb3VudDsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlBEVCAtIEZpcm13YXJlIFBlcmZvcm1hbmNlIERhdGEgVGFibGUgKEFDUEkgNS4wKQorICogICAgICAgIFZlcnNpb24gMQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBhY3BpX3RhYmxlX2ZwZHQgeworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLworfTsKKworLyogRlBEVCBzdWJ0YWJsZSBoZWFkZXIgKi8KKworc3RydWN0IGFjcGlfZnBkdF9oZWFkZXIgeworCXUxNiB0eXBlOworCXU4IGxlbmd0aDsKKwl1OCByZXZpc2lvbjsKK307CisKKy8qIFZhbHVlcyBmb3IgVHlwZSBmaWVsZCBhYm92ZSAqLworCitlbnVtIGFjcGlfZnBkdF90eXBlIHsKKwlBQ1BJX0ZQRFRfVFlQRV9CT09UID0gMCwKKwlBQ1BJX0ZQRFRfVFlQRV9TM1BFUkYgPSAxLAorfTsKKworLyoKKyAqIEZQRFQgc3VidGFibGVzCisgKi8KKworLyogMDogRmlybXdhcmUgQmFzaWMgQm9vdCBQZXJmb3JtYW5jZSBSZWNvcmQgKi8KKworc3RydWN0IGFjcGlfZnBkdF9ib290IHsKKwlzdHJ1Y3QgYWNwaV9mcGR0X2hlYWRlciBoZWFkZXI7CisJdTggcmVzZXJ2ZWRbNF07CisJdTY0IHJlc2V0X2VuZDsKKwl1NjQgbG9hZF9zdGFydDsKKwl1NjQgc3RhcnR1cF9zdGFydDsKKwl1NjQgZXhpdF9zZXJ2aWNlc19lbnRyeTsKKwl1NjQgZXhpdF9zZXJ2aWNlc19leGl0OworfTsKKworLyogMTogUzMgUGVyZm9ybWFuY2UgVGFibGUgUG9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qKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBHVERUIC0gR2VuZXJpYyBUaW1lciBEZXNjcmlwdGlvbiBUYWJsZSAoQUNQSSA1LjApCisgKiAgICAgICAgVmVyc2lvbiAxCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RydWN0IGFjcGlfdGFibGVfZ3RkdCB7CisJc3RydWN0IGFjcGlfdGFibGVfaGVhZGVyIGhlYWRlcjsJLyogQ29tbW9uIEFDUEkgdGFibGUgaGVhZGVyICovCisJdTY0IGFkZHJlc3M7CisJdTMyIGZsYWdzOworCXUzMiBzZWN1cmVfcGwxX2ludGVycnVwdDsKKwl1MzIgc2VjdXJlX3BsMV9mbGFnczsKKwl1MzIgbm9uX3NlY3VyZV9wbDFfaW50ZXJydXB0OworCXUzMiBub25fc2VjdXJlX3BsMV9mbGFnczsKKwl1MzIgdmlydHVhbF90aW1lcl9pbnRlcnJ1cHQ7CisJdTMyIHZpcnR1YWxfdGltZXJfZmxhZ3M7CisJdTMyIG5vbl9zZWN1cmVfcGwyX2ludGVycnVwdDsKKwl1MzIgbm9uX3NlY3VyZV9wbDJfZmxhZ3M7Cit9OworCisvKiBWYWx1ZXMgZm9yIEZsYWdzIGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9HVERUX01BUFBFRF9CTE9DS19QUkVTRU5UICAgICAgMQorCisvKiBWYWx1ZXMgZm9yIGFsbCAiVGltZXJGbGFncyIgZmllbGRzIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9HVERUX0lOVEVSUlVQVF9NT0RFICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX0dURFRfSU5URVJSVVBUX1BPTEFSSVRZICAgICAgICAyCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogTVBTVCAtIE1lbW9yeSBQb3dlciBTdGF0ZSBUYWJsZSAoQUNQSSA1LjApCisgKiAgICAgICAgVmVyc2lvbiAxCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBBQ1BJX01QU1RfQ0hBTk5FTF9JTkZPIFwKKwl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkMTsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhbm5lbF9pZDsgXAorCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXJ2ZWQyOyBcCisJdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3dlcl9ub2RlX2NvdW50OworCisvKiBNYWluIHRhYmxlICovCisKK3N0cnVjdCBhY3BpX3RhYmxlX21wc3QgeworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLworCSBBQ1BJX01QU1RfQ0hBTk5FTF9JTkZPCS8qIFBsYXRmb3JtIENvbW11bmljYXRpb24gQ2hhbm5lbCAqLworfTsKKworLyogTWVtb3J5IFBsYXRmb3JtIENvbW11bmljYXRpb24gQ2hhbm5lbCBJbmZvICovCisKK3N0cnVjdCBhY3BpX21wc3RfY2hhbm5lbCB7CisJQUNQSV9NUFNUX0NIQU5ORUxfSU5GTwkvKiBQbGF0Zm9ybSBDb21tdW5pY2F0aW9uIENoYW5uZWwgKi8KK307CisKKy8qIE1lbW9yeSBQb3dlciBOb2RlIFN0cnVjdHVyZSAqLworCitzdHJ1Y3QgYWNwaV9tcHN0X3Bvd2VyX25vZGUgeworCXU4IGZsYWdzOworCXU4IHJlc2VydmVkMTsKKwl1MTYgbm9kZV9pZDsKKwl1MzIgbGVuZ3RoOworCXU2NCByYW5nZV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sKKwl1NjQgcmVzZXJ2ZWQyOworfTsKKworLyogVmFsdWVzIGZvciBGbGFncyBmaWVsZCBhYm92ZSAqLworCisjZGVmaW5lIEFDUElfTVBTVF9QUkVTRVJWRSAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1BJX01QU1RfQVVUT0VOVFJZICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNQSV9NUFNUX0FVVE9FWElUICAgICAgICAgICAgICA0CisKKy8qIFNoYXJlZCBNZW1vcnkgUmVnaW9uIChub3QgcGFydCBvZiBhbiBBQ1BJIHRhYmxlKSAqLworCitzdHJ1Y3QgYWNwaV9tcHN0X3NoYXJlZCB7CisJdTMyIHNpZ25hdHVyZTsKKwl1MTYgcGNjX2NvbW1hbmQ7CisJdTE2IHBjY19zdGF0dXM7CisJdTE2IGNvbW1hbmRfcmVnaXN0ZXI7CisJdTE2IHN0YXR1c19yZWdpc3RlcjsKKwl1MTYgcG93ZXJfc3RhdGVfaWQ7CisJdTE2IHBvd2VyX25vZGVfaWQ7CisJdTY0IGVuZXJneV9jb25zdW1lZDsKKwl1NjQgYXZlcmFnZV9wb3dlcjsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogUENDVCAtIFBsYXRmb3JtIENvbW11bmljYXRpb25zIENoYW5uZWwgVGFibGUgKEFDUEkgNS4wKQorICogICAgICAgIFZlcnNpb24gMQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBhY3BpX3RhYmxlX3BjY3QgeworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLworCXUzMiBmbGFnczsKKwl1MzIgbGF0ZW5jeTsKKwl1MzIgcmVzZXJ2ZWQ7Cit9OworCisvKiBWYWx1ZXMgZm9yIEZsYWdzIGZpZWxkIGFib3ZlICovCisKKyNkZWZpbmUgQUNQSV9QQ0NUX0RPT1JCRUxMICAgICAgICAgICAgICAxCisKKy8qCisgKiBQQ0NUIHN1YnRhYmxlcworICovCisKKy8qIDA6IEdlbmVyaWMgQ29tbXVuaWNhdGlvbnMgU3Vic3BhY2UgKi8KKworc3RydWN0IGFjcGlfcGNjdF9zdWJzcGFjZSB7CisJc3RydWN0IGFjcGlfc3VidGFibGVfaGVhZGVyIGhlYWRlcjsKKwl1OCByZXNlcnZlZFs2XTsKKwl1NjQgYmFzZV9hZGRyZXNzOworCXU2NCBsZW5ndGg7CisJc3RydWN0IGFjcGlfZ2VuZXJpY19hZGRyZXNzIGRvb3JiZWxsX3JlZ2lzdGVyOworCXU2NCBwcmVzZXJ2ZV9tYXNrOworCXU2NCB3cml0ZV9tYXNrOworfTsKKworLyoKKyAqIFBDQyBtZW1vcnkgc3RydWN0dXJlcyAobm90IHBhcnQgb2YgdGhlIEFDUEkgdGFibGUpCisgKi8KKworLyogU2hhcmVkIE1lbW9yeSBSZWdpb24gKi8KKworc3RydWN0IGFjcGlfcGNjdF9zaGFyZWRfbWVtb3J5IHsKKwl1MzIgc2lnbmF0dXJlOworCXUxNiBjb21tYW5kOworCXUxNiBzdGF0dXM7Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFBNVFQgLSBQbGF0Zm9ybSBNZW1vcnkgVG9wb2xvZ3kgVGFibGUgKEFDUEkgNS4wKQorICogICAgICAgIFZlcnNpb24gMQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBhY3BpX3RhYmxlX3BtdHQgeworCXN0cnVjdCBhY3Bp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ZXI7CisJdTE2IHNvY2tldF9pZDsKKwl1MTYgcmVzZXJ2ZWQ7Cit9OworCisvKiAxOiBNZW1vcnkgQ29udHJvbGxlciBzdWJ0YWJsZSAqLworCitzdHJ1Y3QgYWNwaV9wbXR0X2NvbnRyb2xsZXIgeworCXN0cnVjdCBhY3BpX3BtdHRfaGVhZGVyIGhlYWRlcjsKKwl1MzIgcmVhZF9sYXRlbmN5OworCXUzMiB3cml0ZV9sYXRlbmN5OworCXUzMiByZWFkX2JhbmR3aWR0aDsKKwl1MzIgd3JpdGVfYmFuZHdpZHRoOworCXUxNiBhY2Nlc3Nfd2lkdGg7CisJdTE2IGFsaWdubWVudDsKKwl1MTYgcmVzZXJ2ZWQ7CisJdTE2IGRvbWFpbl9jb3VudDsKK307CisKKy8qIDFhOiBQcm94aW1pdHkgRG9tYWluIHN1YnN0cnVjdHVyZSAqLworCitzdHJ1Y3QgYWNwaV9wbXR0X2RvbWFpbiB7CisJdTMyIHByb3hpbWl0eV9kb21haW47Cit9OworCisvKiAyOiBQaHlzaWNhbCBDb21wb25lbnQgSWRlbnRpZmllciAoRElNTSkgKi8KKworc3RydWN0IGFjcGlfcG10dF9waHlzaWNhbF9jb21wb25lbnQgeworCXN0cnVjdCBhY3BpX3BtdHRfaGVhZGVyIGhlYWRlcjsKKwl1MTYgY29tcG9uZW50X2lkOworCXUxNiByZXNlcnZlZDsKKwl1MzIgbWVtb3J5X3NpemU7CisJdTMyIGJpb3NfaGFuZGxlOworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBSQVNGIC0gUkFTIEZlYXR1cmUgVGFibGUgKEFDUEkgNS4wKQorICogICAgICAgIFZlcnNpb24gMQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnV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kJCSgqY2ZnX3BtaWNfaXJxKSh2b2lkKTsKKworCWludAkJCQlvbm87CisJYm9vbAkJCQl3YWtldXA7CisJYm9vbAkJCQlidWNrX3ZvbHRhZ2VfbG9jazsKKworCWludAkJCQlidWNrX2dwaW9zWzNdOworCWludAkJCQlidWNrMl92b2x0YWdlWzhdOworCWJvb2wJCQkJYnVjazJfZ3Bpb2R2czsKKwlpbnQJCQkJYnVjazNfdm9sdGFnZVs4XTsKKwlib29sCQkJCWJ1Y2szX2dwaW9kdnM7CisJaW50CQkJCWJ1Y2s0X3ZvbHRhZ2VbOF07CisJYm9vbAkJCQlidWNrNF9ncGlvZHZzOworCisJaW50CQkJCWJ1Y2tfc2V0MTsKKwlpbnQJCQkJYnVja19zZXQyOworCWludAkJCQlidWNrX3NldDM7CisJaW50CQkJCWJ1Y2syX2VuYWJsZTsKKwlpbnQJCQkJYnVjazNfZW5hYmxlOworCWludAkJCQlidWNrNF9lbmFibGU7CisJaW50CQkJCWJ1Y2tfZGVmYXVsdF9pZHg7CisJaW50CQkJCWJ1Y2syX2RlZmF1bHRfaWR4OworCWludAkJCQlidWNrM19kZWZhdWx0X2lkeDsKKwlpbnQJCQkJYnVjazRfZGVmYXVsdF9pZHg7CisKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1Y2tfcmFtcF9kZWxheTsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1Y2syX3JhbXBfZW5hYmxlOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVjazNfcmFtcF9lbmFibGU7CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWNrNF9yYW1wX2VuYWJsZTsKK307CisKKyNlbmRpZiAvKiAgX19MSU5VWF9NRkRfUzVNX0NPUkVfSCAqLwpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9saW51eC9tZmQvczVtODd4eC9zNW0tcG1pYy5oIGIvaW5jbHVkZS9saW51eC9tZmQvczVtODd4e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1TTg3NjdfTERPMTUsCisJUzVNODc2N19MRE8xNiwKKwlTNU04NzY3X0xETzE3LAorCVM1TTg3NjdfTERPMTgsCisJUzVNODc2N19MRE8xOSwKKwlTNU04NzY3X0xETzIwLAorCVM1TTg3NjdfTERPMjEsCisJUzVNODc2N19MRE8yMiwKKwlTNU04NzY3X0xETzIzLAorCVM1TTg3NjdfTERPMjQsCisJUzVNODc2N19MRE8yNSwKKwlTNU04NzY3X0xETzI2LAorCVM1TTg3NjdfTERPMjcsCisJUzVNODc2N19MRE8yOCwKKwlTNU04NzY3X0JVQ0sxLAorCVM1TTg3NjdfQlVDSzIsCisJUzVNODc2N19CVUNLMywKKwlTNU04NzY3X0JVQ0s0LAorCVM1TTg3NjdfQlVDSzUsCisJUzVNODc2N19CVUNLNiwKKwlTNU04NzY3X0JVQ0s3LAorCVM1TTg3NjdfQlVDSzgsCisJUzVNODc2N19CVUNLOSwKKwlTNU04NzY3X0FQX0VOMzJLSFosCisJUzVNODc2N19DUF9FTjMyS0haLAorCisJUzVNODc2N19SRUdfTUFYLAorfTsKKworLyogUzVNODc2MyByZWd1bGF0b3IgaWRzICovCitlbnVtIHM1bTg3NjNfcmVndWxhdG9ycyB7CisJUzVNODc2M19MRE8xLAorCVM1TTg3NjNfTERPMiwKKwlTNU04NzYzX0xETzMsCisJUzVNODc2M19MRE80LAorCVM1TTg3NjNfTERPNSwKKwlTNU04NzYzX0xETzYsCisJUzVNODc2M19MRE83LAorCVM1TTg3NjNfTERPOCwKKwlTNU04NzYzX0xETzksCisJUzVNODc2M19MRE8xMCwKKwlTNU04NzYzX0xETzExLAorCVM1TTg3NjNfTERPMTIsCisJUzVNODc2M19MRE8xMywKKwlTNU04NzYzX0xETzE0LAorCVM1TTg3NjNfTERPMTUsCisJUzVNODc2M19MRE8xNiwKKwlTNU04NzYzX0JVQ0sxLAorCVM1TTg3NjNfQlVDSzIsCisJUzVNODc2M19CVUNLMywKKwlTNU04NzYzX0JVQ0s0LAorCVM1TTg3N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RoZSBkZXZpY2Ugb24gdGhpcworCSAqIHN5c3RlbS4KKwkgKi8KKwlib29sIHNwa21vZGVfcHU7CiB9OwogCiAjZW5kaWYKZGlmZiAtLWdpdCBhL2luY2x1ZGUvbGludXgvbWZkL3dtODk5NC9yZWdpc3RlcnMuaCBiL2luY2x1ZGUvbGludXgvbWZkL3dtODk5NC9yZWdpc3RlcnMuaAppbmRleCA4M2E5Y2FlLi44NmU2YTAzIDEwMDY0NAotLS0gYS9pbmNsdWRlL2xpbnV4L21mZC93bTg5OTQvcmVnaXN0ZXJzLmgKKysrIGIvaW5jbHVkZS9saW51eC9tZmQvd204OTk0L3JlZ2lzdGVycy5oCkBAIC05NSwxMSArOTUsMTUgQEAKICNkZWZpbmUgV004OTk0X0ZMTDFfQ09OVFJPTF8zICAgICAgICAgICAgICAgICAgIDB4MjIyCiAjZGVmaW5lIFdNODk5NF9GTEwxX0NPTlRST0xfNCAgICAgICAgICAgICAgICAgICAweDIyMwogI2RlZmluZSBXTTg5OTRfRkxMMV9DT05UUk9MXzUgICAgICAgICAgICAgICAgICAgMHgyMjQKKyNkZWZpbmUgV004OTU4X0ZMTDFfRUZTXzEgICAgICAgICAgICAgICAgICAgICAgIDB4MjI2CisjZGVmaW5lIFdNODk1OF9GTEwxX0VGU18yICAgICAgICAgICAgICAgICAgICAgICAweDIyNwogI2RlZmluZSBXTTg5OTRfRkxMMl9DT05UUk9MXzEgICAgICAgICAgICAgICAgICAgMHgyNDAKICNkZWZpbmUgV004OTk0X0ZMTDJfQ09OVFJPTF8yICAgICAgICAgICAgICAgICAgIDB4MjQxCiAjZGVmaW5lIFdNODk5NF9GTEwyX0NPTlRST0xfMyAgICAgICAgICAgICAgICAgICAweDI0MgogI2RlZmluZSBXTTg5OTRfRkxMMl9DT05UUk9MXzQgICAgICAgICAgICAgICAgICAgMHgyNDMKICNkZWZpbmUgV004OTk0X0ZMTDJfQ09OVFJPTF81ICAgICAgICAgICAgICAgICAgIDB4MjQ0CisjZGVmaW5lIFdNODk1OF9GTEwyX0VGU18xICAgICAgICAgICAgICAgICAgICAgICAweDI0NgorI2RlZmluZSBXTTg5NThfRkxMMl9FRlNfMiAgICAgICAgICAgICAgICAgICAgICAgMHgyNDcKICNkZWZpbmUgV004OTk0X0FJRjFfQ09OVFJPTF8xICAgICAgICAgICAgICAgICAgIDB4MzAwCiAjZGVmaW5lIFdNODk5NF9BSUYxX0NPTlRST0xfMiAgICAgICAgICAgICAgICAgICAweDMwMQogI2RlZmluZSBXTTg5OTRfQUlGMV9NQVNURVJfU0xBVkUgICAgICAgICAgICAgICAgMHgzMDIKQEAgLTExNiw2ICsxMjAsNyBAQAogI2RlZmluZSBXTTg5OTRfQUlGMkRBQ19MUkNMSyAgICAgICAgICAgICAgICAgICAgMHgzMTUKICNkZWZpbmUgV004OTk0X0FJRjJEQUNfREFUQSAgICAgICAgICAgICAgICAgICAgIDB4MzE2CiAjZGVmaW5lIFdNODk5NF9BSUYyQURDX0RBVEEgICAgICAgICAgICAgICAgICAgICAweDMxNworI2RlZmluZSBXTTE4MTFfQUlGMlRYX0NPTlRST0wgICAgICAgICAgICAgICAgICAgMHgzMTgKICNkZWZpbmUgV004OTU4X0FJRjNfQ09OVFJPTF8xICAgICAgICAgICAgICAgICAgIDB4MzIwCiAjZGVmaW5lIFdNODk1OF9BSUYzX0NPTlRST0xfMiAgICAgICAgICAgICAgICAgICAweDMyMQogI2RlZmluZSBXTTg5NThfQUlGM0RBQ19EQVRBICAgICAgICAgICAgICAgICAgICAgMHgzMjIKQEAgLTE2Niw2ICsxNzEsNyBAQAogI2RlZmluZSBXTTg5OTRfQUlGMV9EQUMxX0VRX0JBTkRfNV9BICAgICAgICAgICAgMHg0OTEKICNkZWZpbmUgV004OTk0X0FJRjFfREFDMV9FUV9CQU5EXzVfQiAgICAgICAgICAgIDB4NDkyCiAjZGVmaW5lIFdNODk5NF9BSUYxX0RBQzFfRVFfQkFORF81X1BHICAgICAgICAgICAweDQ5MworI2RlZmluZSBXTTg5OTRfQUlGMV9EQUMxX0VRX0JBTkRfMV9DICAgICAgICAgICAgMHg0OTQKICNkZWZpbmUgV004OTk0X0FJRjFfREFDMl9FUV9HQUlOU18xICAgICAgICAgICAgIDB4NEEwCiAjZGVmaW5lIFdNODk5NF9BSUYxX0RBQzJfRVFfR0FJTlNfMiAgICAgICAgICAgICAweDRBMQogI2RlZmluZSBXTTg5OTRfQUlGMV9EQUMyX0VRX0JBTkRfMV9BICAgICAgICAgICAgMHg0QTIKQEAgLTE4Niw2ICsxOTIsNyBAQAogI2RlZmluZSBXTTg5OTRfQUlGMV9EQUMyX0VRX0JBTkRfNV9BICAgICAgICAgICAgMHg0QjEKICNkZWZpbmUgV004OTk0X0FJRjFfREFDMl9FUV9CQU5EXzVfQiAgICAgICAgICAgIDB4NEIyCiAjZGVmaW5lIFdNODk5NF9BSUYxX0RBQzJfRVFfQkFORF81X1BHICAgICAgICAgICAweDRCMworI2RlZmluZSBXTTg5OTRfQUlGMV9EQUMyX0VRX0JBTkRfMV9DICAgICAgICAgICAgMHg0QjQKICNkZWZpbmUgV004OTk0X0FJRjJfQURDX0xFRlRfVk9MVU1FICAgICAgICAgICAgIDB4NTAwCiAjZGVmaW5lIFdNODk5NF9BSUYyX0FEQ19SSUdIVF9WT0xVTUUgICAgICAgICAgICAweDUwMQogI2RlZmluZSBXTTg5OTRfQUlGMl9EQUNfTEVGVF9WT0xVTUUgICAgICAgICAgICAgMHg1MDIKQEAgLTIxOSw2ICsyMjYsNyBAQAogI2RlZmluZSBXTTg5OTRfQUlGMl9FUV9CQU5EXzVfQSAgICAgICAgICAgICAgICAgMHg1OTEKICNkZWZpbmUgV004OTk0X0FJRjJfRVFfQkFORF81X0IgICAgICAgICAgICAgICAgIDB4NTkyCiAjZGVmaW5lIFdNODk5NF9BSUYyX0VRX0JBTkRfNV9QRyAgICAgICAgICAgICAgICAweDU5MworI2RlZmluZSBXTTg5OTRfQUlGMl9FUV9CQU5EXzFfQyAgICAgICAgICAgICAgICAgMHg1OTQKICNkZWZpbmUgV004OTk0X0RBQzFfTUlYRVJfVk9MVU1FUyAgICAgICAgICAgICAgIDB4NjAwCiAjZGVmaW5lIFdNODk5NF9EQUMxX0xFRlRfTUlYRVJfUk9VVElORyAgICAgICAgICAweDYwMQogI2RlZmluZSBXTTg5OTRfREFDMV9SSUdIVF9NSVhFUl9ST1VUSU5HICAgICAgICAgMHg2MDIKQEAgLTI0Miw2ICsyNTAsNyBAQAogI2RlZmluZSBXTTg5OTRfR1BJT180ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MDMKICNkZWZpbmUgV004OTk0X0dQSU9fNSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzA0CiAjZGVmaW5lIFdNODk5NF9HUElPXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcwNQorI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9DVFJMCQkJMHg3MDUKICNkZWZpbmUgV004OTk0X0dQSU9fNyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzA2CiAjZGVmaW5lIFdNODk5NF9HUElPXzggICAgICAgICAgICAgICAgICAgICAgICAgICAweDcwNwogI2RlZmluZSBXTTg5OTRfR1BJT185ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MDgKQEAgLTI2NCw3ICsyNzMsNDMgQEAKICNkZWZpbmUgV004OTU4X0RTUDJfUkVMRUFTRVRJTUUgICAgICAgICAgICAgICAgIDB4QTAzCiAjZGVmaW5lIFdNODk1OF9EU1AyX1ZFUk1BSk1JTiAgICAgICAgICAgICAgICAgICAweEEwNAogI2RlZmluZSBXTTg5NThfRFNQMl9WRVJCVUlMRCAgICAgICAgICAgICAgICAgICAgMHhBMDUKKyNkZWZpbmUgV004OTU4X0RTUDJfVEVTVFJFRyAgICAgICAgICAgICAgICAgICAgIDB4QTA2CisjZGVmaW5lIFdNODk1OF9EU1AyX1hPUlJFRyAgICAgICAgICAgICAgICAgICAgICAweEEwNworI2RlZmluZSBXTTg5NThfRFNQMl9TSElGVE1BWFggICAgICAgICAgICAgICAgICAgMHhBMDgKKyNkZWZpbmUgV004OTU4X0RTUDJfU0hJRlRNQVhZICAgICAgICAgICAgICAgICAgIDB4QTA5CisjZGVmaW5lIFdNODk1OF9EU1AyX1NISUZUTUFYWiAgICAgICAgICAgICAgICAgICAweEEwQQorI2RlZmluZSBXTTg5NThfRFNQMl9TSElGVE1BWEVYVExPICAgICAgICAgICAgICAgMHhBMEIKKyNkZWZpbmUgV004OTU4X0RTUDJfQUVTU0VMRUNUICAgICAgICAgICAgICAgICAgIDB4QTBDCiAjZGVmaW5lIFdNODk1OF9EU1AyX0VYRUNDT05UUk9MICAgICAgICAgICAgICAgICAweEEwRAorI2RlZmluZSBXTTg5NThfRFNQMl9TQU1QTEVCUkVBSyAgICAgICAgICAgICAgICAgMHhBMEUKKyNkZWZpbmUgV004OTU4X0RTUDJfQ09VTlRCUkVBSyAgICAgICAgICAgICAgICAgIDB4QTBGCisjZGVmaW5lIFdNODk1OF9EU1AyX0lOVFNUQVRVUyAgICAgICAgICAgICAgICAgICAweEExMAorI2RlZmluZSBXTTg5NThfRFNQMl9FVkVOVFNUQVRVUyAgICAgICAgICAgICAgICAgMHhBMTEKKyNkZWZpbmUgV004OTU4X0RTUDJfSU5UTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4QTEyCisjZGVmaW5lIFdNODk1OF9EU1AyX0NPTkZJR0RXSURUSCAgICAgICAgICAgICAgICAweEExMworI2RlZmluZSBXTTg5NThfRFNQMl9DT05GSUdJTlNUUiAgICAgICAgICAgICAgICAgMHhBMTQKKyNkZWZpbmUgV004OTU4X0RTUDJfQ09ORklHRE1FTSAgICAgICAgICAgICAgICAgIDB4QTE1CisjZGVmaW5lIFdNODk1OF9EU1AyX0NPTkZJR0RFTEFZUyAgICAgICAgICAgICAgICAweEExNgorI2RlZmluZSBXTTg5NThfRFNQMl9DT05GSUdOVU1JTyAgICAgICAgICAgICAgICAgMHhBMTcKKyNkZWZpbmUgV004OTU4X0RTUDJfQ09ORklHRVhUREVQVEggICAgICAgICAgICAgIDB4QTE4CisjZGVmaW5lIFdNODk1OF9EU1AyX0NPTkZJR01VTFRJUExJRVIgICAgICAgICAgICAweEExOQorI2RlZmluZSBXTTg5NThfRFNQMl9DT05GSUdDVFJMRFdJRFRIICAgICAgICAgICAgMHhBMUEKKyNkZWZpbmUgV004OTU4X0RTUDJfQ09ORklHUElQRUxJTkUgICAgICAgICAgICAgIDB4QTFCCisjZGVmaW5lIFdNODk1OF9EU1AyX1NISUZUTUFYRVhUSEkgICAgICAgICAgICAgICAweEExQworI2RlZmluZSBXTTg5NThfRFNQMl9TV1ZFUlNJT05SRUcgICAgICAgICAgICAgICAgMHhBMUQKKyNkZWZpbmUgV004OTU4X0RTUDJfQ09ORklHWE1FTSAgICAgICAgICAgICAgICAgIDB4QTFFCisjZGVmaW5lIFdNODk1OF9EU1AyX0NPTkZJR1lNRU0gICAgICAgICAgICAgICAgICAweEExRgorI2RlZmluZSBXTTg5NThfRFNQMl9DT05GSUdaTUVNICAgICAgICAgICAgICAgICAgMHhBMjAKKyNkZWZpbmUgV004OTU4X0ZXX0JVSUxEXzEgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMAorI2RlZmluZSBXTTg5NThfRldfQlVJTERfMCAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAxCisjZGVmaW5lIFdNODk1OF9GV19JRF8xICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDIKKyNkZWZpbmUgV004OTU4X0ZXX0lEXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMworI2RlZmluZSBXTTg5NThfRldfTUFKT1JfMSAgICAgICAgICAgICAgICAgICAgICAgMHgyMDA0CisjZGVmaW5lIFdNODk1OF9GV19NQUpPUl8wICAgICAgICAgICAgICAgICAgICAgICAweDIwMDUKKyNkZWZpbmUgV004OTU4X0ZXX01JTk9SXzEgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwNgorI2RlZmluZSBXTTg5NThfRldfTUlOT1JfMCAgICAgICAgICAgICAgICAgICAgICAgMHgyMDA3CisjZGVmaW5lIFdNODk1OF9GV19QQVRDSF8xICAgICAgICAgICAgICAgICAgICAgICAweDIwMDgKKyNkZWZpbmUgV004OTU4X0ZXX1BBVENIXzAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwOQogI2RlZmluZSBXTTg5NThfTUJDX0JBTkRfMl9MT1dFUl9DVVRPRkZfQzFfMSAgICAgMHgyMjAwCiAjZGVmaW5lIFdNODk1OF9NQkNfQkFORF8yX0xPV0VSX0NVVE9GRl9DMV8yICAgICAweDIyMDEKICNkZWZpbmUgV004OTU4X01CQ19CQU5EXzJfTE9XRVJfQ1VUT0ZGX0MyXzEgICAgIDB4MjIwMgpAQCAtMzMzLDYgKzM3OCwxNCBAQAogI2RlZmluZSBXTTg5NThfTUJDX0IyX1BHMl8yICAgICAgICAgICAgICAgICAgICAgMHgyNDJECiAjZGVmaW5lIFdNODk1OF9NQkNfQjFfUEcyXzEgICAgICAgICAgICAgICAgICAgICAweDI0MkUKICNkZWZpbmUgV004OTU4X01CQ19CMV9QRzJfMiAgICAgICAgICAgICAgICAgICAgIDB4MjQyRgorI2RlZmluZSBXTTg5NThfTUJDX0NST1NTT1ZFUl8xICAgICAgICAgICAgICAgICAgMHgyNjAwCisjZGVmaW5lIFdNODk1OF9NQkNfQ1JPU1NPVkVSXzIgICAgICAgICAgICAgICAgICAweDI2MDEKKyNkZWZpbmUgV004OTU4X01CQ19IUEZfMSAgICAgICAgICAgICAgICAgICAgICAgIDB4MjYwMgorI2RlZmluZSBXTTg5NThfTUJDX0hQRl8yICAgICAgICAgICAgICAgICAgICAgICAgMHgyNjAzCisjZGVmaW5lIFdNODk1OF9NQkNfTFBGXzEgICAgICAgICAgICAgICAgICAgICAgICAweDI2MDYKKyNkZWZpbmUgV004OTU4X01CQ19MUEZfMiAgICAgICAgICAgICAgICAgICAgICAgIDB4MjYwNworI2RlZmluZSBXTTg5NThfTUJDX1JNU19MSU1JVF8xICAgICAgICAgICAgICAgICAgMHgyNjBBCisjZGVmaW5lIFdNODk1OF9NQkNfUk1TX0xJTUlUXzIgICAgICAgICAgICAgICAgICAweDI2MEIKICNkZWZpbmUgV004OTk0X1dSSVRFX1NFUVVFTkNFUl8wICAgICAgICAgICAgICAgIDB4MzAwMAogI2RlZmluZSBXTTg5OTRfV1JJVEVfU0VRVUVOQ0VSXzEgICAgICAgICAgICAgICAgMHgzMDAxCiAjZGVmaW5lIFdNODk5NF9XUklURV9TRVFVRU5DRVJfMiAgICAgICAgICAgICAgICAweDMwMDIKQEAgLTE4NTIsNiArMTkwNSw5IEBACiAvKgogICogUjU3ICgweDM5KSAtIEFudGlQT1AgKDIpCiAgKi8KKyNkZWZpbmUgV00xODExX0pBQ0tERVRfTU9ERV9NQVNLICAgICAgICAgICAgICAgIDB4MDE4MCAgLyogSkFDS0RFVF9NT0RFIC0gWzg6N10gKi8KKyNkZWZpbmUgV00xODExX0pBQ0tERVRfTU9ERV9TSElGVCAgICAgICAgICAgICAgICAgICAgNyAgLyogSkFDS0RFVF9NT0RFIC0gWzg6N10gKi8KKyNkZWZpbmUgV00xODExX0pBQ0tERVRfTU9ERV9XSURUSCAgICAgICAgICAgICAgICAgICAgMiAgLyogSkFDS0RFVF9NT0RFIC0gWzg6N10gKi8KICNkZWZpbmUgV004OTk0X01JQ0IyX0RJU0NIICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTUlDQjJfRElTQ0ggKi8KICNkZWZpbmUgV004OTk0X01JQ0IyX0RJU0NIX01BU0sgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogTUlDQjJfRElTQ0ggKi8KICNkZWZpbmUgV004OTk0X01JQ0IyX0RJU0NIX1NISUZUICAgICAgICAgICAgICAgICAgICAgOCAgLyogTUlDQjJfRElTQ0ggKi8KQEAgLTIzODksNiArMjQ0NSwxMCBAQAogLyoKICAqIFI1NDggKDB4MjI0KSAtIEZMTDEgQ29udHJvbCAoNSkKICAqLworI2RlZmluZSBXTTg5NThfRkxMMV9CWVAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBGTEwxX0JZUCAqLworI2RlZmluZSBXTTg5NThfRkxMMV9CWVBfTUFTSyAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBGTEwxX0JZUCAqLworI2RlZmluZSBXTTg5NThfRkxMMV9CWVBfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgIDE1ICAvKiBGTEwxX0JZUCAqLworI2RlZmluZSBXTTg5NThfRkxMMV9CWVBfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBGTEwxX0JZUCAqLwogI2RlZmluZSBXTTg5OTRfRkxMMV9GUkNfTkNPX1ZBTF9NQVNLICAgICAgICAgICAgMHgxRjgwICAvKiBGTEwxX0ZSQ19OQ09fVkFMIC0gWzEyOjddICovCiAjZGVmaW5lIFdNODk5NF9GTEwxX0ZSQ19OQ09fVkFMX1NISUZUICAgICAgICAgICAgICAgIDcgIC8qIEZMTDFfRlJDX05DT19WQUwgLSBbMTI6N10gKi8KICNkZWZpbmUgV004OTk0X0ZMTDFfRlJDX05DT19WQUxfV0lEVEggICAgICAgICAgICAgICAgNiAgLyogRkxMMV9GUkNfTkNPX1ZBTCAtIFsxMjo3XSAqLwpAQCAtMjQwNCw2ICsyNDY0LDI0IEBACiAjZGVmaW5lIFdNODk5NF9GTEwxX1JFRkNMS19TUkNfV0lEVEggICAgICAgICAgICAgICAgIDIgIC8qIEZMTDFfUkVGQ0xLX1NSQyAtIFsxOjBdICovCiAKIC8qCisgKiBSNTUwICgweDIyNikgLSBGTEwxIEVGUyAxCisgKi8KKyNkZWZpbmUgV004OTU4X0ZMTDFfTEFNQkRBX01BU0sgICAgICAgICAgICAgICAgIDB4RkZGRiAgLyogRkxMMV9MQU1CREEgLSBbMTU6MF0gKi8KKyNkZWZpbmUgV004OTU4X0ZMTDFfTEFNQkRBX1NISUZUICAgICAgICAgICAgICAgICAgIC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EQ0xfU1JDICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBBSUYxQURDTF9TUkMgKi8KQEAgLTQxODcsNiArNDI4NywxOCBAQAogI2RlZmluZSBXTTg5OTRfU1RMX1NFTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBTVExfU0VMICovCiAKIC8qCisgKiBSMTc5NyAoMHg3MDUpIC0gSkFDS0RFVCBDdHJsCisgKi8KKyNkZWZpbmUgV00xODExX0pBQ0tERVRfREIgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogSkFDS0RFVF9EQiAqLworI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9EQl9NQVNLICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBKQUNLREVUX0RCICovCisjZGVmaW5lIFdNMTgxMV9KQUNLREVUX0RCX1NISUZUICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEpBQ0tERVRfREIgKi8KKyNkZWZpbmUgV00xODExX0pBQ0tERVRfREJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogSkFDS0RFVF9EQiAqLworI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9MVkwgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBKQUNLREVUX0xWTCAqLworI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9MVkxfTUFTSyAgICAgICAgICAgICAgICAgMHgwMDQwICAvKiBKQUNLREVUX0xWTCAqLworI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9MVkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICA2ICAvKiBKQUNLREVUX0xWTCAqLworI2RlZmluZSBXTTE4MTFfSkFDS0RFVF9MVkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAxICAvKiBKQUNLREVUX0xWTCAqLworCisvKgogICogUjE4MjQgKDB4NzIwKSAtIFB1bGwgQ29udHJvbCAoMSkKICAqLwogI2RlZmluZSBXTTg5OTRfRE1JQ0RBVDJfUFUgICAgIC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gICAgICAgICAgIGluaXRpYWxpemUgdGhlIHBsYXRmb3JtIChlLmcuLCBzZXQgdXAgdGhlIHBpbiBtdXgpLgorICogQG1pbl9wcm9wX2RlbGF5X2luX25zOiAgICBNaW5pbXVtIHByb3BhZ2F0aW9uIGRlbGF5IG9mIEdQTUkgc2lnbmFscyB0byBhbmQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB0aGUgTkFORCBGbGFzaCBkZXZpY2UsIGluIG5hbm9zZWNvbmRzLgorICogQG1heF9wcm9wX2RlbGF5X2luX25zOiAgICBNYXhpbXVtIHByb3BhZ2F0aW9uIGRlbGF5IG9mIEdQTUkgc2lnbmFscyB0byBhbmQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB0aGUgTkFORCBGbGFzaCBkZXZpY2UsIGluIG5hbm9zZWNvbmRzLgorICogQG1heF9jaGlwX2NvdW50OiAgICAgICAgICBUaGUgbWF4aW11bSBudW1iZXIgb2YgY2hpcHMgZm9yIHdoaWNoIHRoZSBkcml2ZXIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkIGNvbmZpZ3VyZSB0aGUgaGFyZHdhcmUuIFRoaXMgdmFsdWUgbW9zdAorICogICAgICAgICAgICAgICAgICAgICAgICAgICBsaWtlbHkgcmVmbGVjdHMgdGhlIG51bWJlciBvZiBwaW5zIHRoYXQgYXJlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbm5lY3RlZCB0byBhIE5BTkQgRmxhc2ggZGV2aWNlLiBJZiB0aGlzIGlzCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyZWF0ZXIgdGhhbiB0aGUgU29DIGhhcmR3YXJlIGNhbiBzdXBwb3J0LCB0aGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJpdmVyIHdpbGwgcHJpbnQgYSBtZXNzYWdlIGFuZCBmYWlsIHRvIGluaXRpYWxpemUuCisgKiBAcGFydGl0aW9uczogICA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9ncm91cCwKKwkJCQl1bnNpZ25lZCBsb25nICpjb25maWcpOworZXh0ZXJuIGludCBwaW5fY29uZmlnX2dyb3VwX3NldChjb25zdCBjaGFyICpkZXZfbmFtZSwKKwkJCQljb25zdCBjaGFyICpwaW5fZ3JvdXAsCisJCQkJdW5zaWduZWQgbG9uZyBjb25maWcpOworCisjZWxzZQorCitzdGF0aWMgaW5saW5lIGludCBwaW5fY29uZmlnX2dldChjb25zdCBjaGFyICpkZXZfbmFtZSwgY29uc3QgY2hhciAqbmFtZSwKKwkJCQkgdW5zaWduZWQgbG9uZyAqY29uZmlnKQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludCBwaW5fY29uZmlnX3NldChjb25zdCBjaGFyICpkZXZfbmFtZSwgY29uc3QgY2hhciAqbmFtZSwKKwkJCQkgdW5zaWduZWQgbG9uZyBjb25maWcpCit7CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IHBpbl9jb25maWdfZ3JvdXBfZ2V0KGNvbnN0IGNoYXIgKmRldl9uYW1lLAorCQkJCSAgICAgICBjb25zdCBjaGFyICpwaW5fZ3JvdXAsCisJCQkJICAgICAgIHVuc2lnbmVkIGxvbmcgKmNvbmZpZykKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgcGluX2NvbmZpZ19ncm91cF9zZXQoY29uc3QgY2hhciAqZGV2X25hbWUsCisJCQkJICAgICAgIGNvbnN0IGNoYXIgKnBpbl9ncm91cCwKKwkJCQkgICAgICAgdW5zaWduZWQgbG9uZyBjb25maWcpCit7CisJcmV0dXJuIDA7Cit9CisKKyNlbmRpZgorCisjZW5kaWYgLyogX19MSU5VWF9QSU5DVFJMX1BJTkNPTkZfSCAqLwpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9saW51eC9waW5jdHJsL3BpbmN0cmwuaCBiL2luY2x1ZGUvbGludXgvcGluY3RybC9waW5jdHJsLmgKaW5kZXggMDRjMDExM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BBUklTSU5HIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFCisgKiBNQVRFUklBTFMgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUgTUFURVJJQUxTLgorICoKKyAqLworI2lmbmRlZiBfX1NORF9DT01QUkVTU19QQVJBTVNfSAorI2RlZmluZSBfX1NORF9DT01QUkVTU19QQVJBTVNfSAorCisvKiBBVURJTyBDT0RFQ1MgU1VQUE9SVEVEICovCisjZGVmaW5lIE1BWF9OVU1fQ09ERUNTIDMyCisjZGVmaW5lIE1BWF9OVU1fQ09ERUNfREVTQ1JJUFRPUlMgMzIKKyNkZWZpbmUgTUFYX05VTV9CSVRSQVRFUyAzMgorCisvKiBDb2RlY3MgYXJlIGxpc3RlZCBsaW5lYXJseSB0byBhbGxvdyBmb3IgZXh0ZW5zaWJpbGl0eSAqLworI2RlZmluZSBTTkRfQVVESU9DT0RFQ19QQ00gICAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKyNkZWZpbmUgU05EX0FVRElPQ09ERUNfTVAzICAgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDIpCisjZGVmaW5lIFNORF9BVURJT0NPREVDX0FNUiAgICAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAzKQorI2RlZmluZSBTTkRfQVVESU9DT0RFQ19BTVJXQiAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwNCkKKyNkZWZpbmUgU05EX0FVRElPQ09ERUNfQU1SV0JQTFVTICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDUpCisjZGVmaW5lIFNORF9BVURJT0NPREVDX0FBQyAgICAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA2KQorI2RlZmluZSBTTkRfQVVESU9DT0RFQ19XTUEgICAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwNykKKyNkZWZpbmUgU05EX0FVRElPQ09ERUNfUkVBTCAgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDgpCisjZGVmaW5lIFNORF9BVURJT0NPREVDX1ZPUkJJUyAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA5KQorI2RlZmluZSBTTkRfQVVESU9DT0RFQ19GTEFDICAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwQSkKKyNkZWZpbmUgU05EX0FVRElPQ09ERUNfSUVDNjE5MzcgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMEIpCisjZGVmaW5lIFNORF9BVURJT0NPREVDX0c3MjNfMSAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDBDKQorI2RlZmluZSBTTkRfQVVESU9DT0RFQ19HNzI5ICAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwRCkKKworLyoKKyAqIFByb2ZpbGUgYW5kIG1vZGVzIGFyZSBsaXN0ZWQgd2l0aCBiaXQgbWFza3MuIFRoaXMgYWxsb3dzIGZvciBhCisgKiBtb3JlIGNvbXBhY3QgcmVwcmVzZW50YXRpb24gb2YgZmllbGRzIHRoYXQgd2lsbCBub3QgZXZvbHZlCisgKiAoaW4gY29udHJhc3QgdG8gdGhlIGxpc3Qgb2YgY29kZWNzKQorICovCisKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9QQ00gICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisKKy8qIE1QMyBtb2RlcyBhcmUgb25seSB1c2VmdWwgZm9yIGVuY29kZXJzICovCisjZGVmaW5lIFNORF9BVURJT0NIQU5NT0RFX01QM19NT05PICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAxKQorI2RlZmluZSBTTkRfQVVESU9DSEFOTU9ERV9NUDNfU1RFUkVPICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMikKKyNkZWZpbmUgU05EX0FVRElPQ0hBTk1PREVfTVAzX0pPSU5UU1RFUkVPICAgICgoX191MzIpIDB4MDAwMDAwMDQpCisjZGVmaW5lIFNORF9BVURJT0NIQU5NT0RFX01QM19EVUFMICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA4KQorCisjZGVmaW5lIFNORF9BVURJT1BST0ZJTEVfQU1SICAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAxKQorCisvKiBBTVIgbW9kZXMgYXJlIG9ubHkgdXNlZnVsIGZvciBlbmNvZGVycyAqLworI2RlZmluZSBTTkRfQVVESU9NT0RFX0FNUl9EVFhfT0ZGICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9BTVJfVkFEMSAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDIpCisjZGVmaW5lIFNORF9BVURJT01PREVfQU1SX1ZBRDIgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA0KQorCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9VTkRFRklORUQJICAgICAoKF9fdTMyKSAweDAwMDAwMDAwKQorI2RlZmluZSBTTkRfQVVESU9TVFJFQU1GT1JNQVRfQ09ORk9STUFOQ0UgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKyNkZWZpbmUgU05EX0FVRElPU1RSRUFNRk9STUFUX0lGMSAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDIpCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9JRjIgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA0KQorI2RlZmluZSBTTkRfQVVESU9TVFJFQU1GT1JNQVRfRlNGICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwOCkKKyNkZWZpbmUgU05EX0FVRElPU1RSRUFNRk9STUFUX1JUUFBBWUxPQUQgICAgICgoX191MzIpIDB4MDAwMDAwMTApCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9JVFUgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDIwKQorCisjZGVmaW5lIFNORF9BVURJT1BST0ZJTEVfQU1SV0IgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAxKQorCisvKiBBTVJXQiBtb2RlcyBhcmUgb25seSB1c2VmdWwgZm9yIGVuY29kZXJzICovCisjZGVmaW5lIFNORF9BVURJT01PREVfQU1SV0JfRFRYX09GRiAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAxKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0FNUldCX1ZBRDEgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMikKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9BTVJXQl9WQUQyICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDQpCisKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9BTVJXQlBMVVMgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9BQUMgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisKKy8qIEFBQyBtb2RlcyBhcmUgcmVxdWlyZWQgZm9yIGVuY29kZXJzIGFuZCBkZWNvZGVycyAqLworI2RlZmluZSBTTkRfQVVESU9NT0RFX0FBQ19NQUlOICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9BQUNfTEMgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDIpCisjZGVmaW5lIFNORF9BVURJT01PREVfQUFDX1NTUiAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA0KQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0FBQ19MVFAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwOCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9BQUNfSEUgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMTApCisjZGVmaW5lIFNORF9BVURJT01PREVfQUFDX1NDQUxBQkxFICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDIwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0FBQ19FUkxDICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDA0MCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9BQUNfTEQgICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwODApCisjZGVmaW5lIFNORF9BVURJT01PREVfQUFDX0hFX1BTICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMTAwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0FBQ19IRV9NUFMgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDIwMCkKKworLyogQUFDIGZvcm1hdHMgYXJlIHJlcXVpcmVkIGZvciBlbmNvZGVycyBhbmQgZGVjb2RlcnMgKi8KKyNkZWZpbmUgU05EX0FVRElPU1RSRUFNRk9STUFUX01QMkFEVFMgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9NUDRBRFRTICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAyKQorI2RlZmluZSBTTkRfQVVESU9TVFJFQU1GT1JNQVRfTVA0TE9BUyAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwNCkKKyNkZWZpbmUgU05EX0FVRElPU1RSRUFNRk9STUFUX01QNExBVE0gICAgICAgICgoX191MzIpIDB4MDAwMDAwMDgpCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9BRElGICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDEwKQorI2RlZmluZSBTTkRfQVVESU9TVFJFQU1GT1JNQVRfTVA0RkYgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAyMCkKKyNkZWZpbmUgU05EX0FVRElPU1RSRUFNRk9STUFUX1JBVyAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwNDApCisKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9XTUE3ICAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisjZGVmaW5lIFNORF9BVURJT1BST0ZJTEVfV01BOCAgICAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAyKQorI2RlZmluZSBTTkRfQVVESU9QUk9GSUxFX1dNQTkgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwNCkKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9XTUExMCAgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDgpCisKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9XTUFfTEVWRUwxICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisjZGVmaW5lIFNORF9BVURJT01PREVfV01BX0xFVkVMMiAgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAyKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX1dNQV9MRVZFTDMgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwNCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9XTUFfTEVWRUw0ICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDgpCisjZGVmaW5lIFNORF9BVURJT01PREVfV01BUFJPX0xFVkVMTTAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDEwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX1dNQVBST19MRVZFTE0xICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAyMCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9XTUFQUk9fTEVWRUxNMiAgICAgICAgICgoX191MzIpIDB4MDAwMDAwNDApCisjZGVmaW5lIFNORF9BVURJT01PREVfV01BUFJPX0xFVkVMTTMgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDgwKQorCisjZGVmaW5lIFNORF9BVURJT1NUUkVBTUZPUk1BVF9XTUFfQVNGICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDAxKQorLyoKKyAqIFNvbWUgaW1wbGVtZW50YXRpb25zIHN0cmlwIHRoZSBBU0YgaGVhZGVyIGFuZCBvbmx5IHNlbmQgQVNGIHBhY2tldHMKKyAqIHRvIHRoZSBEU1AKKyAqLworI2RlZmluZSBTTkRfQVVESU9TVFJFQU1GT1JNQVRfV01BX05PQVNGX0hEUiAgKChfX3UzMikgMHgwMDAwMDAwMikKKworI2RlZmluZSBTTkRfQVVESU9QUk9GSUxFX1JFQUxBVURJTyAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKworI2RlZmluZSBTTkRfQVVESU9NT0RFX1JFQUxBVURJT19HMiAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9SRUFMQVVESU9fOCAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDIpCisjZGVmaW5lIFNORF9BVURJT01PREVfUkVBTEFVRElPXzEwICAgICAgICAgICAoKF9fdTMyKSAweDAwMDAwMDA0KQorI2RlZmluZSBTTkRfQVVESU9NT0RFX1JFQUxBVURJT19TVVJST1VORCAgICAgKChfX3UzMikgMHgwMDAwMDAwOCkKKworI2RlZmluZSBTTkRfQVVESU9QUk9GSUxFX1ZPUkJJUyAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKworI2RlZmluZSBTTkRfQVVESU9NT0RFX1ZPUkJJUyAgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKworI2RlZmluZSBTTkRfQVVESU9QUk9GSUxFX0ZMQUMgICAgICAgICAgICAgICAgKChfX3UzMikgMHgwMDAwMDAwMSkKKworLyoKKyAqIERlZmluZSBxdWFsaXR5IGxldmVscyBmb3IgRkxBQyBlbmNvZGVycywgZnJvbSBMRVZFTDAgKGZhc3QpCisgKiB0byBMRV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DB4MDAwMDAwNDApCisjZGVmaW5lIFNORF9BVURJT01PREVfSUVDX0FUUkFDCQkgICAgICgoX191MzIpIDB4MDAwMDAwODApCisjZGVmaW5lIFNORF9BVURJT01PREVfSUVDX1NBQ0QJCSAgICAgKChfX3UzMikgMHgwMDAwMDEwMCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9JRUNfRUFDMwkJICAgICAoKF9fdTMyKSAweDAwMDAwMjAwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0lFQ19EVFNfSEQJICAgICAoKF9fdTMyKSAweDAwMDAwNDAwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0lFQ19NTFAJCSAgICAgKChfX3UzMikgMHgwMDAwMDgwMCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9JRUNfRFNUCQkgICAgICgoX191MzIpIDB4MDAwMDEwMDApCisjZGVmaW5lIFNORF9BVURJT01PREVfSUVDX1dNQVBSTwkgICAgICgoX191MzIpIDB4MDAwMDIwMDApCisjZGVmaW5lIFNORF9BVURJT01PREVfSUVDX1JFRl9DWFQgICAgICAgICAgICAoKF9fdTMyKSAweDAwMDA0MDAwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0lFQ19IRV9BQUMJICAgICAoKF9fdTMyKSAweDAwMDA4MDAwKQorI2RlZmluZSBTTkRfQVVESU9NT0RFX0lFQ19IRV9BQUMyCSAgICAgKChfX3UzMikgMHgwMDAxMDAwMCkKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9JRUNfTVBFR19TVVJST1VORAkgICAgICgoX191MzIpIDB4MDAwMjAwMDApCisKKyNkZWZpbmUgU05EX0FVRElPUFJPRklMRV9HNzIzXzEgICAgICAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisKKyNkZWZpbmUgU05EX0FVRElPTU9ERV9HNzIzXzFfQU5ORVhfQSAgICAgICAgICgoX191MzIpIDB4MDAwMDAwMDEpCisjZGVmaW5lIFNORF9BVURJT01PREVfRzcyM18xX0F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qZW5kcDsKKwlzdHJ1Y3QgdXNlcl9rZXlfcGF5bG9hZCAqdWtwOworCXN0cnVjdCBwdWJrZXlfaGRyICpwa2g7CisKKwlkb3duX3JlYWQoJmtleS0+c2VtKTsKKwl1a3AgPSBrZXktPnBheWxvYWQuZGF0YTsKKworCWlmICh1a3AtPmRhdGFsZW4gPCBzaXplb2YoKnBraCkpCisJCWdvdG8gZXJyMTsKKworCXBraCA9IChzdHJ1Y3QgcHVia2V5X2hkciAqKXVrcC0+ZGF0YTsKKworCWlmIChwa2gtPnZlcnNpb24gIT0gMSkKKwkJZ290byBlcnIxOworCisJaWYgKHBraC0+YWxnbyAhPSBQVUJLRVlfQUxHT19SU0EpCisJCWdvdG8gZXJyMTsKKworCWlmIChwa2gtPm5tcGkgIT0gMikKKwkJZ290byBlcnIxOworCisJZGF0YXAgPSBwa2gtPm1waTsKKwllbmRwID0gdWtwLT5kYXRhICsgdWtwLT5kYXRhbGVuOworCisJZXJyID0gLUVOT01FTTsKKworCWZvciAoaSA9IDA7IGkgPCBwa2gtPm5tcGk7IGkrKykgeworCQl1bnNpZ25lZCBpbnQgcmVtYWluaW5nID0gZW5kcCAtIGRhdGFwOworCQlwa2V5W2ldID0gbXBpX3JlYWRfZnJvbV9idWZmZXIoZGF0YXAsICZyZW1haW5pbmcpOworCQlpZiAoIXBrZXlbaV0pCisJCQlnb3RvIGVycjsKKwkJZGF0YXAgKz0gcmVtYWluaW5nOworCX0KKworCW1ibGVuID0gbXBpX2dldF9uYml0cyhwa2V5WzBdKTsKKwltbGVuID0gKG1ibGVuICsgNykvODsKKworCWlmIChtbGVuID09IDApCisJCWdvdG8gZXJyOworCisJb3V0MSA9IGt6YWxsb2MobWxlbiwgR0ZQX0tFUk5FTCk7CisJaWYgKCFvdXQxKQorCQlnb3RvIGVycjsKKworCW91dDIgPSBremFsbG9jKG1sZW4sIEdGUF9LRVJORUwpOworCWlmICghb3V0MikKKwkJZ290byBlcnI7CisKKwlucmV0ID0gc2lnbGVuOworCWluID0gbXBpX3JlYWRfZnJvbV9idWZmZXIoc2lnLCAmbnJldCk7CisJaWYgKCFpbikKKwkJZ290byBlcnI7CisKKwlyZXMgPSBtcGlfYWxsb2MobXBpX2dldF9ubGltYnMoaW4pICogMik7CisJaWYgKCFyZXMpCisJCWdvdG8gZXJyOworCisJZXJyID0gbXBpX3Bvd20ocmVzLCBpbiwgcGtleVsxXSwgcGtleVswXSk7CisJaWYgKGVycikKKwkJZ290byBlcnI7CisKKwlpZiAobXBpX2dldF9ubGltYnMocmVzKSAqIEJZVEVTX1BFUl9NUElfTElNQiA+IG1sZW4pIHsKKwkJZXJyID0gLUVJTlZBTDsKKwkJZ290byBlcnI7CisJfQorCisJcCA9IG1waV9nZXRfYnVmZmVyKHJlcywgJmwsIE5VTEwpOworCWlmICghcCkgeworCQllcnIgPSAtRUlOVkFMOworCQlnb3RvIGVycjsKKwl9CisKKwlsZW4gPSBtbGVuOworCWhlYWQgPSBsZW4gLSBsOworCW1lbXNldChvdXQxLCAwLCBoZWFkKTsKKwltZW1jcHkob3V0MSArIGhlYWQsIHAsIGwpOworCisJZXJyID0gcGtjc18xX3YxXzVfZGVjb2RlX2Vtc2Eob3V0MSwgbGVuLCBtYmxlbiwgb3V0MiwgJmxlbik7CisKKwlpZiAoIWVyciAmJiBsZW4gPT0gaGxlbikKKwkJZXJyID0gbWVtY21wKG91dDIsIGgsIGhsZW4pOworCitlcnI6CisJbXBpX2ZyZWUoaW4pOworCW1waV9mcmVlKHJlcyk7CisJa2ZyZWUob3V0MSk7CisJa2ZyZWUob3V0Mik7CisJd2hpbGUgKC0taSA+PSAwKQorCQltcGlfZnJlZShwa2V5W2ldKTsKK2VycjE6CisJdXBfcmVhZCgma2V5LT5zZW0pOworCisJcmV0dXJuIGVycjsKK30KKworLyoqCisgKiBkaWdzaWdfdmVyaWZ5KCkgLSBkaWdpdGFsIHNpZ25hdHVyZSB2ZXJpZmljYXRpb24gd2l0aCBwdWJsaWMga2V5CisgKiBAa2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SkpCisjZGVmaW5lIENPVU5UX0xFQURJTkdfWkVST1NfMCAzMgorI2VuZGlmIC8qIF9fYTI5a19fICovCisKKyNpZiBkZWZpbmVkKF9fYWxwaGEpICYmIFdfVFlQRV9TSVpFID09IDY0CisjZGVmaW5lIHVtdWxfcHBtbShwaCwgcGwsIG0wLCBtMSkgXAorZG8geyBcCisJCVVESXR5cGUgX19tMCA9IChtMCksIF9fbTEgPSAobTEpOyBcCisJCV9fYXNtX18gKCJ1bXVsaCAlcjEsJTIsJTAiIFwKKwkJOiAiPXIiICgoVURJdHlwZSkgcGgpIFwKKwkJOiAiJXJKIiAoX19tMCksIFwKKwkJCSJySSIgKF9fbTEpKTsgXAorCQkocGwpID0gX19tMCAqIF9fbTE7IFwKKwl9IHdoaWxlICgwKQorI2RlZmluZSBVTVVMX1RJTUUgNDYKKyNpZm5kZWYgTE9OR0xPTkdfU1RBTkRBTE9ORQorI2RlZmluZSB1ZGl2X3Fybm5kKHEsIHIsIG4xLCBuMCwgZCkgXAorZG8geyBVREl0eXBlIF9fcjsgXAorCShxKSA9IF9fdWRpdl9xcm5uZCgmX19yLCAobjEpLCAobjApLCAoZCkpOyBcCisJKHIpID0gX19yOyBcCit9IHdoaWxlICgwKQorZXh0ZXJuIFVESXR5cGUgX191ZGl2X3Fybm5kKCk7CisjZGVmaW5lIFVESVZfVElNRSAyMjAKKyNlbmRpZiAvKiBMT05HTE9OR19TVEFOREFMT05FICovCisjZW5kaWYgLyogX19hbHBoYSAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKiogIEFSTSAgKioqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmIGRlZmluZWQoX19hcm1fXykgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoIm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CUxIiBcCisJOiAiPWciICgoVVNJdHlwZSkocSkpLCBcCisJCSI9ciIgKChVU0l0eXBlKShyKSkgXAorCTogIjEiICgoVVNJdHlwZSkobmgpKSwgXAorCQkiMCIgKChVU0l0eXBlKShubCkpLCBcCisJCSJnIiAoKFVTSXR5cGUpKGQpKSkKKyNkZWZpbmUgY291bnRfbGVhZGluZ196ZXJvcyhjb3VudCwgeCkgXAorCV9fYXNtX18gKCJic2NoLzEgJTEsJTAiIFwKKwk6ICI9ZyIgKGNvdW50KSBcCisJOiAiZyIgKChVU0l0eXBlKSh4KSksIFwKKwkgICAgICIwIiAoKFVTSXR5cGUpMCkpCisjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqICBIUFBBICAqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiBkZWZpbmVkKF9faHBwYSkgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoImFkZCAlNCwlNSwlMVxuIiBcCisJCSAgICJhZGRjICUyLCUzLCUwIiBcCisJOiAiPXIiICgoVVNJdHlwZSkoc2gpKSwgXAorCSAgICAgIj0mciIgKChVU0l0eXBlKShzbCkpIFwKKwk6ICIlck0iICgoVVNJdHlwZSkoYWgpKSwgXAorCSAgICAgInJNIiAoKFVTSXR5cGUpKGJoKSksIFwKKwkgICAgICIlck0iICgoVVNJdHlwZSkoYWwpKSwgXAorCSAgICAgInJNIiAoKFVTSXR5cGUpKGJsKSkpCisjZGVmaW5lIHN1Yl9kZG1tc3Moc2gsIHNsLCBhaCwgYWwsIGJoLCBibCkgXAorCV9fYXNtX18gKCJzdWIgJTQsJTUsJTFcbiIgXAorCSAgICJzdWJiICUyLCUzLCUwIiBcCisJOiAiPXIiICgoVVNJdHl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gICAgICAgICIgXAorCTogIj1yIiAoY291bnQpLCAiPXIiIChfX3RtcCkgOiAiMSIgKHgpKTsgXAorfSB3aGlsZSAoMCkKKyNlbmRpZiAvKiBocHBhICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgSTM3MCAgKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgKGRlZmluZWQoX19pMzcwX18pIHx8IGRlZmluZWQoX19tdnNfXykpICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVmaW5lIHVtdWxfcHBtbSh4aCwgeGwsIG0wLCBtMSkgXAorZG8geyBcCisJdW5pb24ge1VESXR5cGUgX19sbDsgXAorCSAgIHN0cnVjdCB7VVNJdHlwZSBfX2gsIF9fbDsgfSBfX2k7IFwKKwl9IF9feHg7IFwKKwlVU0l0eXBlIF9fbTAgPSAobTApLCBfX20xID0gKG0xKTsgXAorCV9fYXNtX18gKCJtciAlMCwlMyIgXAorCTogIj1yIiAoX194eC5fX2kuX19oKSwgXAorCSAgICAgICAiPXIiIChfX3h4Ll9faS5fX2wpIFwKKwk6ICIlMSIgKF9fbTApLCBcCisJICAgICAgICJyIiAoX19tMSkpOyBcCisJKHhoKSA9IF9feHguX19pLl9faDsgKHhsKSA9IF9feHguX19pLl9fbDsgXAorCSh4aCkgKz0gKCgoKFNJdHlwZSkgX19tMCA+PiAzMSkgJiBfX20xKSBcCisJICAgICArICgoKFNJdHlwZSkgX19tMSA+PiAzMSkgJiBfX20wKSk7IFwKK30gd2hpbGUgKDApCisjZGVmaW5lIHNtdWxfcHBtbSh4aCwgeGwsIG0wLCBtMSkgXAorZG8geyBcCisJdW5pb24ge0RJdHlwZSBfX2xsOyBcCisJICAgc3RydWN0IHtVU0l0eXBlIF9faCwgX19sOyB9IF9faTsgXAorCX0gX194eDsgXAorCV9fYXNtX18gKCJtciAlMCwlMyIgXAorCTogIj1yIiAoX194eC5fX2kuX19oKSwgXAorCSAgICAgICAiPXIiIChfX3h4Ll9faS5fX2wpIFwKKwk6ICIlMSIgKG0wKSwgXAorCSAgICAgICAiciIgKG0xKSk7IFwKKwkoeGgpID0gX194eC5fX2kuX19oOyAoeGwpID0gX194eC5fX2kuX19sOyBcCit9IHdoaWxlICgwKQorI2RlZmluZSBzZGl2X3Fybm5kKHEsIHIsIG4xLCBuMCwgZCkgXAorZG8geyBcCisJdW5pb24ge0RJdHlwZSBfX2xsOyBcCisJICAgc3RydWN0IHtVU0l0eXBlIF9faCwgX19sOyB9IF9faTsgXAorCX0gX194eDsgXAorCV9feHguX19pLl9faCA9IG4xOyBfX3h4Ll9faS5fX2wgPSBuMDsgXAorCV9fYXNtX18gKCJkciAlMCwlMiIgXAorCTogIj1yIiAoX194eC5fX2xsKSBcCisJOiAiMCIgKF9feHguX19sbCksICJyIiAoZCkpOyBcCisJKHEpID0gX194eC5fX2kuX19sOyAocikgPSBfX3h4Ll9faS5fX2g7IFwKK30gd2hpbGUgKDApCisjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqICBJMzg2ICAqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyN1bmRlZiBfX2kzODZfXworI2lmIChkZWZpbmVkKF9faTM4Nl9fKSB8fCBkZWZpbmVkKF9faTQ4Nl9fKSkgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoImFkZGwgJTUsJTFcbiIgXAorCSAgICJhZGNsICUzLCUwIiBcCisJOiAiPXIiICgoVVNJdHlwZSkoc2gpKSwgXAorCSAgICAgIj0mciIgKChVU0l0eXBlKShzbCkpIFwKKwk6ICIlMCIgKChVU0l0eXBlKShhaCkpLCBcCisJICAgIC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Y2J0bXApIDogInJtIiAoKFVTSXR5cGUpKHgpKSk7IFwKKwkoY291bnQpID0gX19jYnRtcCBeIDMxOyBcCit9IHdoaWxlICgwKQorI2RlZmluZSBjb3VudF90cmFpbGluZ196ZXJvcyhjb3VudCwgeCkgXAorCV9fYXNtX18gKCJic2ZsICUxLCUwIiA6ICI9ciIgKGNvdW50KSA6ICJybSIgKChVU0l0eXBlKSh4KSkpCisjaWZuZGVmIFVNVUxfVElNRQorI2RlZmluZSBVTVVMX1RJTUUgNDAKKyNlbmRpZgorI2lmbmRlZiBVRElWX1RJTUUKKyNkZWZpbmUgVURJVl9USU1FIDQwCisjZW5kaWYKKyNlbmRpZiAvKiA4MHg4NiAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKiogIEk4NjAgICoqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmIGRlZmluZWQoX19pODYwX18pICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVmaW5lIHJzaGlmdF9yaGxjKHIsIGgsIGwsIGMpIFwKKwlfX2FzbV9fICgic2hyICUzLHIwLHIwXG4iIFwKKwkic2hyZCAlMSwlMiwlMCIgXAorCSAgICI9ciIgKHIpIDogInIiIChoKSwgInIiIChsKSwgInJuIiAoYykpCisjZW5kaWYgLyogaTg2MCAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKiogIEk5NjAgICoqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmIGRlZmluZWQoX19pOTYwX18pICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVmaW5lIGFkZF9zc2FhYWEoc2gsIHNsLCBhaCwgYWwsIGJoLCBibCkgXAorCV9fYXNtX18gKCJjbXBvIDEsMFxuIiBcCisJImFkZGMgJTUsJTQsJTFcbiIgX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5cGUgX19sLCBfX2g7IH0gX19pOyBcCisJfSBfX25uOyBcCisJX19ubi5fX2kuX19oID0gKGgpOyBfX25uLl9faS5fX2wgPSAobCk7IFwKKwlfX2FzbV9fICgic2hyZSAlMiwlMSwlMCIgXAorCTogIj1kIiAocikgOiAiZEkiIChfX25uLl9fbGwpLCAiZEkiIChjKSk7IFwKK30KKyNlbmRpZiAvKiBpOTYwbXggKi8KKyNlbmRpZiAvKiBpOTYwICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgNjgwMDAJKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiAoZGVmaW5lZChfX21jNjgwMDBfXykgfHwgZGVmaW5lZChfX21jNjgwMjBfXykgfHwgZGVmaW5lZChfX05lWFRfXykgfHwgZGVmaW5lZChtYzY4MDIwKSkgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoImFkZCUubCAlNSwlMVxuIiBcCisJICAgImFkZHglLmwgJTMsJTAiIFwKKwk6ICI9ZCIgKChVU0l0eXBlKShzaCkpLCBcCisJICAgICAiPSZkIiAoKFVTSXR5cGUpKHNsKSkgXAorCTogIiUwIiAoKFVTSXR5cGUpKGFoKSksIFwKKwkgICAgICJkIiAoKFVTSXR5cGUpKGJoKSksIFwKKwkgICAgICIlMSIgKChVU0l0eXBlKShhbCkpLCBcCisJICAgICAiZyIgKChVU0l0eXBlKShibCkpKQorI2RlZmluZSBzdWJfZGRtbXNzKHNoLCBzbCwgYWgsIGFsLCBiaCwgYmwpIFwKKwlfX2FzbV9fICgic3ViJS5sICU1LCUxXG4iIFwKKwkgICAic3VieCUubCAlMywlMCIgXAorCTogIj1kIiAoKFVTSXR5cGUpKHNoKSksIFwKKwkgICAgICI9JmQiICgo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9JmQiIChfX3VtdWxfdG1wMikgXAorCTogIiUyIiAoKFVTSXR5cGUpKGEpKSwgImQiICgoVVNJdHlwZSkoYikpKTsgXAorfSB3aGlsZSAoMCkKKyNkZWZpbmUgVU1VTF9USU1FIDEwMAorI2RlZmluZSBVRElWX1RJTUUgNDAwCisjZW5kaWYgLyogbm90IG1jNjgwMjAgKi8KKyNlbmRpZiAvKiBtYzY4MDAwICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgODgwMDAJKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiBkZWZpbmVkKF9fbTg4MDAwX18pICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVmaW5lIGFkZF9zc2FhYWEoc2gsIHNsLCBhaCwgYWwsIGJoLCBibCkgXAorCV9fYXNtX18gKCJhZGR1LmNvICUxLCVyNCwlcjVcbiIgXAorCSAgICJhZGR1LmNpICUwLCVyMiwlcjMiIFwKKwk6ICI9ciIgKChVU0l0eXBlKShzaCkpLCBcCisJICAgICAiPSZyIiAoKFVTSXR5cGUpKHNsKSkgXAorCTogIiVySiIgKChVU0l0eXBlKShhaCkpLCBcCisJICAgICAickoiICgoVVNJdHlwZSkoYmgpKSwgXAorCSAgICAgIiVySiIgKChVU0l0eXBlKShhbCkpLCBcCisJICAgICAickoiICgoVVNJdHlwZSkoYmwpKSkKKyNkZWZpbmUgc3ViX2RkbW1zcyhzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoInN1YnUuY28gJTEsJXI0LCVyNVxuIiBcCisJICAgInN1YnUuY2kgJTAsJXIyLCVyMyIgXAorCTogIj1yIiAoKFVTSXR5cGUpKHNoKSksIFwKKwkgICAgICI9JnIiICgoVVNJdHlwZSkoc2wpKSBcCisJOiAickoiICgoVVNJdHlwZSkoYWgpKSwgXAorCSAgICAgInJKIiAoKFVTS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C0gX19xLl9fbCAqIChkKTsgKHEpID0gX19xLl9fbDsgfSkKKyNkZWZpbmUgVU1VTF9USU1FIDUKKyNkZWZpbmUgVURJVl9USU1FIDI1CisjZWxzZQorI2RlZmluZSBVTVVMX1RJTUUgMTcKKyNkZWZpbmUgVURJVl9USU1FIDE1MAorI2VuZGlmIC8qIF9fbTg4MTEwX18gKi8KKyNlbmRpZiAvKiBfX204ODAwMF9fICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgTUlQUyAgKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgZGVmaW5lZChfX21pcHNfXykgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNpZiBfX0dOVUNfXyA+IDIgfHwgX19HTlVDX01JTk9SX18gPj0gNworI2RlZmluZSB1bXVsX3BwbW0odzEsIHcwLCB1LCB2KSBcCisJX19hc21fXyAoIm11bHR1ICUyLCUzIiBcCisJOiAiPWwiICgoVVNJdHlwZSkodzApKSwgXAorCSAgICAgIj1oIiAoKFVTSXR5cGUpKHcxKSkgXAorCTogImQiICgoVVNJdHlwZSkodSkpLCBcCisJICAgICAiZCIgKChVU0l0eXBlKSh2KSkpCisjZWxzZQorI2RlZmluZSB1bXVsX3BwbW0odzEsIHcwLCB1LCB2KSBcCisJX19hc21fXyAoIm11bHR1ICUyLCUzXG4iIFwKKwkgICAibWZsbyAlMFxuIiBcCisJICAgIm1maGkgJTEiIFwKKwk6ICI9ZCIgKChVU0l0eXBlKSh3MCkpLCBcCisJICAgICAiPWQiICgoVVNJdHlwZSkodzEpKSBcCisJOiAiZCIgKChVU0l0eXBlKSh1KSksIFwKKwkgICAgICJkIiAoKFVTSXR5cGUpKHYpKSkKKyNlbmRpZgorI2RlZmluZSBVTVVMX1RJTUUgMTAKKyNkZWZpbmUgVURJVl9USU1FIDEwMAorI2VuZGlmIC8qIF9fbWlwc19fICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgTUlQUy82NCAgKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgKGRlZmluZWQoX19taXBzKSAmJiBfX21pcHMgPj0gMykgJiYgV19UWVBFX1NJWkUgPT0gNjQKKyNpZiBfX0dOVUNfXyA+IDIgfHwgX19HTlVDX01JTk9SX18gPj0gNworI2RlZmluZSB1bXVsX3BwbW0odzEsIHcwLCB1LCB2KSBcCisJX19hc21fXyAoImRtdWx0dSAlMiwlMyIgXAorCTogIj1sIiAoKFVESXR5cGUpKHcwKSksIFwKKwkgICAgICI9aCIgKChVREl0eXBlKSh3MSkpIFwKKwk6ICJkIiAoKFVESXR5cGUpKHUpKSwgXAorCSAgICAgImQiICgoVURJdHlwZSkodikpKQorI2Vsc2UKKyNkZWZpbmUgdW11bF9wcG1tKHcxLCB3MCwgdSwgdikgXAorCV9fYXNtX18gKCJkbXVsdHUgJTIsJTNcbiIgXAorCSAgICJtZmxvICUwXG4iIFwKKwkgICAibWZoaSAlMSIgXAorCTogIj1kIiAoKFVESXR5cGUpKHcwKSksIFwKKwkgICAgICI9ZCIgKChVREl0eXBlKSh3MSkpIFwKKwk6ICJkIiAoKFVESXR5cGUpKHUpKSwgXAorCSAgICAgImQiICgoVURJdHlwZSkodikpKQorI2VuZGlmCisjZGVmaW5lIFVNVUxfVElNRSAyMAorI2RlZmluZSBVRElWX1RJTUUgMTQwCisjZW5kaWYgLyogX19taXBzX18gKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqICAzMjAwMAkqKioqKioqKioqKioqKioqCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmIGRlZmluZWQoX19uczMyMDAwX18pICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVma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TSXR5cGUpIChjb3VudCkpIFwKKwk6ICIwIigoVVNJdHlwZSkgMCksICJyIigoVVNJdHlwZSkgKHgpKSk7IFwKKwl9IHdoaWxlICgwKQorI2VuZGlmIC8qIF9fbnMzMjAwMF9fICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgUFBDICAqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgKGRlZmluZWQoX0FSQ0hfUFBDKSB8fCBkZWZpbmVkKF9JQk1SMikpICYmIFdfVFlQRV9TSVpFID09IDMyCisjZGVmaW5lIGFkZF9zc2FhYWEoc2gsIHNsLCBhaCwgYWwsIGJoLCBibCkgXAorZG8geyBcCisJaWYgKF9fYnVpbHRpbl9jb25zdGFudF9wKGJoKSAmJiAoYmgpID09IDApIFwKKwkJX19hc21fXyAoInthJUk0fGFkZCVJNGN9ICUxLCUzLCU0XG5cdHthemV8YWRkemV9ICUwLCUyIiBcCisJCTogIj1yIiAoKFVTSXR5cGUpKHNoKSksIFwKKwkJIj0mciIgKChVU0l0eXBlKShzbCkpIFwKKwkJOiAiJXIiICgoVVNJdHlwZSkoYWgpKSwgXAorCQkiJXIiICgoVVNJdHlwZSkoYWwpKSwgXAorCQkickkiICgoVVNJdHlwZSkoYmwpKSk7IFwKKwllbHNlIGlmIChfX2J1aWx0aW5fY29uc3RhbnRfcChiaCkgJiYgKGJoKSA9PSB+KFVTSXR5cGUpIDApIFwKKwkJX19hc21fXyAoInthJUk0fGFkZCVJNGN9ICUxLCUzLCU0XG5cdHthbWV8YWRkbWV9ICUwLCUyIiBcCisJCTogIj1yIiAoKFVTSXR5cGUpKHNoKSksIFwKKwkJIj0mciIgKChVU0l0eXBlKShzbCkpIFwKKwkJOiAiJXIiICgoVVNJdHlwZSkoYWgpKSwgXAorCQkiJXIiICgoVVNJdHlwZSkoYWwpKSwgXAorCQkickkiICgoV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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiAoZGVmaW5lZChfX3NoMl9fKSB8fCBkZWZpbmVkKF9fc2gzX18pIHx8IGRlZmluZWQoX19TSDRfXykpIFwKKwkmJiBXX1RZUEVfU0laRSA9PSAzMgorI2RlZmluZSB1bXVsX3BwbW0odzEsIHcwLCB1LCB2KSBcCisJX19hc21fXyAoIFwKKwkiZG11bHUubCAlMiwlM1xuIiBcCisJInN0cwltYWNsLCUxXG4iIFwKKwkic3RzCW1hY2gsJTAiIFwKKwk6ICI9ciIgKChVU0l0eXBlKSh3MSkpLCBcCisJIj1yIiAoKFVTSXR5cGUpKHcwKSkgXAorCTogInIiICgoVVNJdHlwZSkodSkpLCBcCisJInIiICgoVVNJdHlwZSkodikpIFwKKwk6ICJtYWNsIiwgIm1hY2giKQorI2RlZmluZSBVTVVMX1RJTUUgNQorI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgU1BBUkMJKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZiBkZWZpbmVkKF9fc3BhcmNfXykgJiYgV19UWVBFX1NJWkUgPT0gMzIKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSBcCisJX19hc21fXyAoImFkZGNjICVyNCwlNSwlMVxuIiBcCisJImFkZHggJXIyLCUzLCUwIiBcCisJOiAiPXIiICgoVVNJdHlwZSkoc2gpKSwgXAorCSI9JnIiICgoVVNJdHlwZSkoc2wpKSBcCisJOiAiJXJKIiAoKFVTSXR5cGUpKGFoKSksIFwKKwkickkiICgoVVNJdHlwZSkoYmgpKSwgXAorCSIlckoiICgoVVNJdHlwZSkoYWwpKSwgXAorCSJySSIgKChVU0l0eXBlKShibCkpIFwKKwlfX0NMT0JCRVJfQ0MpCisjZGVmaW5lIHN1Yl9k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hbmQgYSAwLWJpdCBpbiBsc2Jcblx0IiBcCisJICAgInN1YgklMSwlMiwlMVxuXHQiCQkJCQkJXAorCSAgICIzOgl4bm9yCSUwLDAsJTBcblx0IgkJCQkJXAorCSAgICIhIEVuZCBvZiBpbmxpbmUgdWRpdl9xcm5uZFxuIgkJCQlcCisJICAgOiAiPSZyIiAoKFVTSXR5cGUpKHEpKSwJCQkJCVwKKwkgICAgICI9JnIiICgoVVNJdHlwZSkocikpCQkJCQlcCisJICAgOiAiciIgKChVU0l0eXBlKShkKSksCQkJCQlcCisJICAgICAiMSIgKChVU0l0eXBlKShuMSkpLAkJCQkJXAorCSAgICAgIjAiICgoVVNJdHlwZSkobjApKSA6ICIlZzEiLCAiY2MiKQorI2RlZmluZSBVRElWX1RJTUUgKDMrNyozMikgICAgICAvKiA3IGluc3RydWN0aW9ucy9pdGVyYXRpb24uIDMyIGl0ZXJhdGlvbnMuICAqLworI2VuZGlmCisjZW5kaWYgLyogX19zcGFyY19fICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKiAgVkFYICAqKioqKioqKioqKioqKioqKioKKwkqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWYgZGVmaW5lZChfX3ZheF9fKSAmJiBXX1RZUEVfU0laRSA9PSAzMgorI2RlZmluZSBhZGRfc3NhYWFhKHNoLCBzbCwgYWgsIGFsLCBiaCwgYmwpIFwKKwlfX2FzbV9fICgiYWRkbDIgJTUsJTFcbiIgXAorCSJhZHdjICUzLCUwIiBcCisJOiAiPWciICgoVVNJdHlwZSkoc2gpKSwgXAorCSI9JmciICgoVVNJdHlwZSkoc2wpKSBcCisJOiAiJTAiICgoVVNJdHlwZSkoYWgpKSwgXAorCSJnIiAoKFVTSXR5cGUpKGJoKSksIFwKKwkiJTEiICgoVVNJdHlwZSkoYWwpKSwgXAorCSJnIiAoKFVTSXR5cGUpKGJsKSkpCisjZGVmaW5l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cG1tKHhoLCB4bCwgbTAsIG0xKSBcCitkbyB7IFwKKwl1bmlvbiB7bG9uZyBpbnQgX19sbDsgXAorCXN0cnVjdCB7dW5zaWduZWQgaW50IF9faCwgX19sOyB9IF9faTsgXAorCX0gX194eDsgXAorCXVuc2lnbmVkIGludCBfX20wID0gKG0wKSwgX19tMSA9IChtMSk7IFwKKwlfX2FzbV9fICgibXVsdCAgICAgICVTMCwlSDMiIFwKKwk6ICI9ciIgKF9feHguX19pLl9faCksIFwKKwkiPXIiIChfX3h4Ll9faS5fX2wpIFwKKwk6ICIlMSIgKF9fbTApLCBcCisJInJRUiIgKF9fbTEpKTsgXAorCSh4aCkgPSBfX3h4Ll9faS5fX2g7ICh4bCkgPSBfX3h4Ll9faS5fX2w7IFwKKwkoeGgpICs9ICgoKChzaWduZWQgaW50KSBfX20wID4+IDE1KSAmIF9fbTEpIFwKKwkrICgoKHNpZ25lZCBpbnQpIF9fbTEgPj4gMTUpICYgX19tMCkpOyBcCit9IHdoaWxlICgwKQorI2VuZGlmIC8qIF9fejgwMDBfXyAqLworCisjZW5kaWYgLyogX19HTlVDX18gKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCSoqKioqKioqKioqICBHZW5lcmljIFZlcnNpb25zCSoqKioqKioqCisJKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmICFkZWZpbmVkKHVtdWxfcHBtbSkgJiYgZGVmaW5lZChfX3VtdWxzaWRpMykKKyNkZWZpbmUgdW11bF9wcG1tKHBoLCBwbCwgbTAsIG0xKSBcCit7IFwKKwlVRFd0eXBlIF9fbGwgPSBfX3VtdWxzaWRpMyhtMCwgbTEpOyBcCisJcGggPSAoVVd0eXBlKSAoX19sbCA+PiBXX1RZUEVfU0laRSk7IFwKKwlwbCA9IChVV3R5cGUpIF9fbGw7IFwKK30KKyNlbmRpZgorCisjaWYgIWRlZmluZWQoX191bXVsc2lkaTMpCisjZGVmaW5lIF9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bGltYm5vLCBiaXRubzsKKwltcGlfbGltYl90IGxpbWI7CisKKwlsaW1ibm8gPSBuIC8gQklUU19QRVJfTVBJX0xJTUI7CisJYml0bm8gPSBuICUgQklUU19QRVJfTVBJX0xJTUI7CisKKwlpZiAobGltYm5vID49IGEtPm5saW1icykKKwkJcmV0dXJuIDA7CS8qIHRvbyBmYXIgbGVmdDogdGhpcyBpcyBhIDAgKi8KKwlsaW1iID0gYS0+ZFtsaW1ibm9dOworCXJldHVybiAobGltYiAmIChBX0xJTUJfMSA8PCBiaXRubykpID8gMSA6IDA7Cit9CisKKy8qKioqKioqKioqKioqKioqCisgKiBTZXQgYml0IE4gb2YgQS4KKyAqLworaW50IG1waV9zZXRfYml0KE1QSSBhLCB1bnNpZ25lZCBuKQoreworCXVuc2lnbmVkIGxpbWJubywgYml0bm87CisKKwlsaW1ibm8gPSBuIC8gQklUU19QRVJfTVBJX0xJTUI7CisJYml0bm8gPSBuICUgQklUU19QRVJfTVBJX0xJTUI7CisKKwlpZiAobGltYm5vID49IGEtPm5saW1icykgewkvKiByZXNpemUgKi8KKwkJaWYgKGEtPmFsbG9jZWQgPj0gbGltYm5vKQorCQkJaWYgKG1waV9yZXNpemUoYSwgbGltYm5vICsgMSkgPCAwKQorCQkJCXJldHVybiAtRU5PTUVNOworCQlhLT5ubGltYnMgPSBsaW1ibm8gKyAxOworCX0KKwlhLT5kW2xpbWJub10gfD0gKEFfTElNQl8xIDw8IGJpdG5vKTsKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioKKyAqIFNldCBiaXQgTiBvZiBBLiBhbmQgY2xlYXIgYWxsIGJpdHMgYWJvdmUKKyAqLworaW50IG1waV9zZXRfaGlnaGJpdChNUEkgYSwgdW5zaWduZWQgbikKK3sKKwl1bnNpZ25lZCBsaW1ibm8sIGJpdG5vOworCisJbGltYm5vID0gbiAvIEJJVFNfUEVSX01QSV9MSU1COworCWJpdG5vID0gbiAlIEJJVFNfUEVSX01QSV9MSU1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dW5zaWduZWQgbGltYm5vLCBiaXRubzsKKworCWxpbWJubyA9IG4gLyBCSVRTX1BFUl9NUElfTElNQjsKKwliaXRubyA9IG4gJSBCSVRTX1BFUl9NUElfTElNQjsKKworCWlmIChsaW1ibm8gPj0gYS0+bmxpbWJzKQorCQlyZXR1cm47CQkvKiBkb24ndCBuZWVkIHRvIGNsZWFyIHRoaXMgYml0LCBpdCdzIHRvIGZhciB0byBsZWZ0ICovCisJYS0+ZFtsaW1ibm9dICY9IH4oQV9MSU1CXzEgPDwgYml0bm8pOworfQorCisvKioqKioqKioqKioqKioqKgorICogU2hpZnQgQSBieSBOIGJpdHMgdG8gdGhlIHJpZ2h0CisgKiBGSVhNRTogc2hvdWxkIHVzZSBhbGxvY19saW1iIGlmIFggYW5kIEEgYXJlIHNhbWUuCisgKi8KK2ludCBtcGlfcnNoaWZ0KE1QSSB4LCBNUEkgYSwgdW5zaWduZWQgbikKK3sKKwltcGlfcHRyX3QgeHA7CisJbXBpX3NpemVfdCB4c2l6ZTsKKworCXhzaXplID0gYS0+bmxpbWJzOworCXgtPnNpZ24gPSBhLT5zaWduOworCWlmIChSRVNJWkVfSUZfTkVFREVEKHgsIChzaXplX3QpIHhzaXplKSA8IDApCisJCXJldHVybiAtRU5PTUVNOworCXhwID0geC0+ZDsKKworCWlmICh4c2l6ZSkgeworCQltcGloZWxwX3JzaGlmdCh4cCwgYS0+ZCwgeHNpemUsIG4pOworCQlNUE5fTk9STUFMSVpFKHhwLCB4c2l6ZSk7CisJfQorCXgtPm5saW1icyA9IHhzaXplOworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKgorICogU2hpZnQgQSBieSBDT1VOVCBsaW1icyB0byB0aGUgbGVmdAorICogVGhpcyBpcyB1c2VkIG9ubHkgd2l0aGluIHRoZSBNUEkgbGlicmFyeQorICovCitpbnQgbXBpX2xzaGlmdF9saW1icyhNUEkgYSwgdW5zaWduZWQgaW50IGNvdW50KQoreworCW1waV9wdHJfdCBhcCA9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MDIxMTEtMTMwNywgVVNBCisgKi8KKworI2luY2x1ZGUgIm1waS1pbnRlcm5hbC5oIgorCitpbnQgbXBpX2NtcF91aShNUEkgdSwgdW5zaWduZWQgbG9uZyB2KQoreworCW1waV9saW1iX3QgbGltYiA9IHY7CisKKwltcGlfbm9ybWFsaXplKHUpOworCWlmICghdS0+bmxpbWJzICYmICFsaW1iKQorCQlyZXR1cm4gMDsKKwlpZiAodS0+c2lnbikKKwkJcmV0dXJuIC0xOworCWlmICh1LT5ubGltYnMgPiAxKQorCQlyZXR1cm4gMTsKKworCWlmICh1LT5kWzBdID09IGxpbWIpCisJCXJldHVybiAwOworCWVsc2UgaWYgKHUtPmRbMF0gPiBsaW1iKQorCQlyZXR1cm4gMTsKKwllbHNlCisJCXJldHVybiAtMTsKK30KKworaW50IG1waV9jbXAoTVBJIHUsIE1QSSB2KQoreworCW1waV9zaXplX3QgdXNpemUsIHZzaXplOworCWludCBjbXA7CisKKwltcGlfbm9ybWFsaXplKHUpOworCW1waV9ub3JtYWxpemUodik7CisJdXNpemUgPSB1LT5ubGltYnM7CisJdnNpemUgPSB2LT5ubGltYnM7CisJaWYgKCF1LT5zaWduICYmIHYtPnNpZ24pCisJCXJldHVybiAxOworCWlmICh1LT5zaWduICYmICF2LT5zaWduKQorCQlyZXR1cm4gLTE7CisJaWYgKHVzaXplICE9IHZzaXplICYmICF1LT5zaWduICYmICF2LT5zaWduKQorCQlyZXR1cm4gdXNpemUgLSB2c2l6ZTsKKwlpZiAodXNpemUgIT0gdnNpemUgJiYgdS0+c2lnbiAmJiB2LT5zaWduKQorCQlyZXR1cm4gdnNpemUgKyB1c2l6ZTsKKwlpZiAoIXVzaXplKQorCQlyZXR1cm4gMDsKKwljbXAgPSBtcGloZWxwX2NtcCh1LT5kLCB2LT5kLCB1c2l6ZSk7CisJaWYgKCFjbXApCisJCXJldHVybiAwOworCWlmICgoY21wIDwgMCA/IDEgOiAwKSA9PSAodS0+c2lnbiA/IDEgOiAwKSkKKw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HRyX3QgdHA7CisKKwkJCXRwID0gbWFya2VyW21hcmtpZHgrK10gPSBtcGlfYWxsb2NfbGltYl9zcGFjZShkc2l6ZSk7CisJCQlpZiAoIXRwKQorCQkJCWdvdG8gbm9tZW07CisJCQlNUE5fQ09QWSh0cCwgZHAsIGRzaXplKTsKKwkJCWRwID0gdHA7CisJCX0KKworCQkvKiBNb3ZlIHRoZSBudW1lcmF0b3IgdG8gdGhlIHJlbWFpbmRlci4gICovCisJCWlmIChycCAhPSBucCkKKwkJCU1QTl9DT1BZKHJwLCBucCwgbnNpemUpOworCisJCXJzaXplID0gbnNpemU7CisJfQorCisJcV9saW1iID0gbXBpaGVscF9kaXZyZW0ocXAsIDAsIHJwLCByc2l6ZSwgZHAsIGRzaXplKTsKKworCWlmIChxdW90KSB7CisJCXFzaXplID0gcnNpemUgLSBkc2l6ZTsKKwkJaWYgKHFfbGltYikgeworCQkJcXBbcXNpemVdID0gcV9saW1iOworCQkJcXNpemUgKz0gMTsKKwkJfQorCisJCXF1b3QtPm5saW1icyA9IHFzaXplOworCQlxdW90LT5zaWduID0gc2lnbl9xdW90aWVudDsKKwl9CisKKwlyc2l6ZSA9IGRzaXplOworCU1QTl9OT1JNQUxJWkUocnAsIHJzaXplKTsKKworCWlmIChub3JtYWxpemF0aW9uX3N0ZXBzICYmIHJzaXplKSB7CisJCW1waWhlbHBfcnNoaWZ0KHJwLCBycCwgcnNpemUsIG5vcm1hbGl6YXRpb25fc3RlcHMpOworCQlyc2l6ZSAtPSBycFtyc2l6ZSAtIDFdID09IDAgPyAxIDogMDsKKwl9CisKKwlyZW0tPm5saW1icyA9IHJzaXplOworCXJlbS0+c2lnbiA9IHNpZ25fcmVtYWluZGVyOworCisJcmMgPSAwOworbm9tZW06CisJd2hpbGUgKG1hcmtpZHgpCisJCW1waV9mcmVlX2xpbWJfc3BhY2UobWFya2VyWy0tbWFya2lkeF0pOworCXJldHVybiByYzsKK30KKworaW50IG1waV90ZGl2X3FfMmV4cChNUEkg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paGVscF9hZGRfMShyZXNfcHRyICsgczJfc2l6ZSwgczFfcHRyICsgczJfc2l6ZSwKKwkJCQkgICBzMV9zaXplIC0gczJfc2l6ZSwgY3kpOworCXJldHVybiBjeTsKK30KKworRzEwX01QSV9JTkxJTkVfREVDTCBtcGlfbGltYl90CittcGloZWxwX3N1Yl8xKG1waV9wdHJfdCByZXNfcHRyLCBtcGlfcHRyX3QgczFfcHRyLAorCSAgICAgIG1waV9zaXplX3QgczFfc2l6ZSwgbXBpX2xpbWJfdCBzMl9saW1iKQoreworCW1waV9saW1iX3QgeDsKKworCXggPSAqczFfcHRyKys7CisJczJfbGltYiA9IHggLSBzMl9saW1iOworCSpyZXNfcHRyKysgPSBzMl9saW1iOworCWlmIChzMl9saW1iID4geCkgeworCQl3aGlsZSAoLS1zMV9zaXplKSB7CisJCQl4ID0gKnMxX3B0cisrOworCQkJKnJlc19wdHIrKyA9IHggLSAxOworCQkJaWYgKHgpCisJCQkJZ290byBsZWF2ZTsKKwkJfQorCQlyZXR1cm4gMTsKKwl9CisKK2xlYXZlOgorCWlmIChyZXNfcHRyICE9IHMxX3B0cikgeworCQltcGlfc2l6ZV90IGk7CisJCWZvciAoaSA9IDA7IGkgPCBzMV9zaXplIC0gMTsgaSsrKQorCQkJcmVzX3B0cltpXSA9IHMxX3B0cltpXTsKKwl9CisJcmV0dXJuIDA7Cit9CisKK0cxMF9NUElfSU5MSU5FX0RFQ0wgbXBpX2xpbWJfdAorbXBpaGVscF9zdWIobXBpX3B0cl90IHJlc19wdHIsIG1waV9wdHJfdCBzMV9wdHIsIG1waV9zaXplX3QgczFfc2l6ZSwKKwkgICAgbXBpX3B0cl90IHMyX3B0ciwgbXBpX3NpemVfdCBzMl9zaXplKQoreworCW1waV9saW1iX3QgY3kgPSAwOworCisJaWYgKHMyX3NpemUpCisJCWN5ID0gbXBpaGVscF9zdWJfbihyZXNfcHRyLCBzMV9wdHIsIHMyX3B0ciwgczJfc2l6ZSk7CisKKwlpZiAoczFf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jaWRlZCB0byBwdWJsaXNoIHRoaXMgY29kZSB1bmRlciB0aGUgcGxhaW4gR1BMLgorICovCisKKyNpbmNsdWRlICJtcGktaW50ZXJuYWwuaCIKKworaW50IG1waV9tdWxfdWkoTVBJIHByb2QsIE1QSSBtdWx0LCB1bnNpZ25lZCBsb25nIHNtYWxsX211bHQpCit7CisJbXBpX3NpemVfdCBzaXplLCBwcm9kX3NpemU7CisJbXBpX3B0cl90IHByb2RfcHRyOworCW1waV9saW1iX3QgY3k7CisJaW50IHNpZ247CisKKwlzaXplID0gbXVsdC0+bmxpbWJzOworCXNpZ24gPSBtdWx0LT5zaWduOworCisJaWYgKCFzaXplIHx8ICFzbWFsbF9tdWx0KSB7CisJCXByb2QtPm5saW1icyA9IDA7CisJCXByb2QtPnNpZ24gPSAwOworCQlyZXR1cm4gMDsKKwl9CisKKwlwcm9kX3NpemUgPSBzaXplICsgMTsKKwlpZiAocHJvZC0+YWxsb2NlZCA8IHByb2Rfc2l6ZSkKKwkJaWYgKG1waV9yZXNpemUocHJvZCwgcHJvZF9zaXplKSA8IDApCisJCQlyZXR1cm4gLUVOT01FTTsKKwlwcm9kX3B0ciA9IHByb2QtPmQ7CisKKwljeSA9IG1waWhlbHBfbXVsXzEocHJvZF9wdHIsIG11bHQtPmQsIHNpemUsIChtcGlfbGltYl90KSBzbWFsbF9tdWx0KTsKKwlpZiAoY3kpCisJCXByb2RfcHRyW3NpemUrK10gPSBjeTsKKwlwcm9kLT5ubGltYnMgPSBzaXplOworCXByb2QtPnNpZ24gPSBzaWduOworCXJldHVybiAwOworfQorCitpbnQgbXBpX211bF8yZXhwKE1QSSB3LCBNUEkgdSwgdW5zaWduZWQgbG9uZyBjbnQpCit7CisJbXBpX3NpemVfdCB1c2l6ZSwgd3NpemUsIGxpbWJfY250OworCW1waV9wdHJfdCB3cDsKKwltcGlfbGltYl90IHdsaW1iOworCWludCB1c2lnbiwgd3NpZ247CisKKwl1c2l6ZSA9IHUtPm5saW1iczsKKwl1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GNvZGUgdW5kZXIgdGhlIHBsYWluIEdQTC4KKyAqLworCisjaW5jbHVkZSA8bGludXgvc3RyaW5nLmg+CisjaW5jbHVkZSAibXBpLWludGVybmFsLmgiCisjaW5jbHVkZSAibG9uZ2xvbmcuaCIKKworLyoqKioqKioqKioqKioqKioKKyAqIFJFUyA9IEJBU0UgXiBFWFAgbW9kIE1PRAorICovCitpbnQgbXBpX3Bvd20oTVBJIHJlcywgTVBJIGJhc2UsIE1QSSBleHAsIE1QSSBtb2QpCit7CisJbXBpX3B0cl90IG1wX21hcmtlciA9IE5VTEwsIGJwX21hcmtlciA9IE5VTEwsIGVwX21hcmtlciA9IE5VTEw7CisJbXBpX3B0cl90IHhwX21hcmtlciA9IE5VTEw7CisJbXBpX3B0cl90IHRzcGFjZSA9IE5VTEw7CisJbXBpX3B0cl90IHJwLCBlcCwgbXAsIGJwOworCW1waV9zaXplX3QgZXNpemUsIG1zaXplLCBic2l6ZSwgcnNpemU7CisJaW50IGVzaWduLCBtc2lnbiwgYnNpZ24sIHJzaWduOworCW1waV9zaXplX3Qgc2l6ZTsKKwlpbnQgbW9kX3NoaWZ0X2NudDsKKwlpbnQgbmVnYXRpdmVfcmVzdWx0OworCWludCBhc3NpZ25fcnAgPSAwOworCW1waV9zaXplX3QgdHNpemUgPSAwOwkvKiB0byBhdm9pZCBjb21waWxlciB3YXJuaW5nICovCisJLyogZml4bWU6IHdlIHNob3VsZCBjaGVjayB0aGF0IHRoZSB3YXJuaW5nIGlzIHZvaWQgKi8KKwlpbnQgcmMgPSAtRU5PTUVNOworCisJZXNpemUgPSBleHAtPm5saW1iczsKKwltc2l6ZSA9IG1vZC0+bmxpbWJzOworCXNpemUgPSAyICogbXNpemU7CisJZXNpZ24gPSBleHAtPnNpZ247CisJbXNpZ24gPSBtb2QtPnNpZ247CisKKwlycCA9IHJlcy0+ZDsKKwllcCA9IGV4cC0+ZDsKKworCWlmICghbXNpemUpCisJCXJldHVybiAtRUlOVkFMOworCisJaWYgKC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CX0gZWxzZSB7CisJCS8qIEFuYXRvbGlqIEFsZWtzZWV2aWNoIEthcmF0c3ViYSdzIGRpdmlkZS1hbmQtY29ucXVlciBhbGdvcml0aG0uCisJCSAqCisJCSAqIFNwbGl0IFUgaW4gdHdvIHBpZWNlcywgVTEgYW5kIFUwLCBzdWNoIHRoYXQKKwkJICogVSA9IFUwICsgVTEqKEIqKm4pLAorCQkgKiBhbmQgViBpbiBWMSBhbmQgVjAsIHN1Y2ggdGhhdAorCQkgKiBWID0gVjAgKyBWMSooQioqbikuCisJCSAqCisJCSAqIFVWIGlzIHRoZW4gY29tcHV0ZWQgcmVjdXJzaXZlbHkgdXNpbmcgdGhlIGlkZW50aXR5CisJCSAqCisJCSAqICAgICAgICAybiAgIG4gICAgICAgICAgbiAgICAgICAgICAgICAgICAgICAgIG4KKwkJICogVVYgPSAoQiAgKyBCIClVIFYgICsgIEIgKFUgLVUgKShWIC1WICkgICsgIChCICsgMSlVIFYKKwkJICogICAgICAgICAgICAgICAgMSAxICAgICAgICAxICAwICAgMCAgMSAgICAgICAgICAgICAgMCAwCisJCSAqCisJCSAqIFdoZXJlIEIgPSAyKipCSVRTX1BFUl9NUF9MSU1CLgorCQkgKi8KKwkJbXBpX3NpemVfdCBoc2l6ZSA9IHNpemUgPj4gMTsKKwkJbXBpX2xpbWJfdCBjeTsKKwkJaW50IG5lZ2ZsZzsKKworCQkvKiBQcm9kdWN0IEguICAgICAgX19fX19fX19fX19fX19fXyAgX19fX19fX19fX19fX19fXworCQkgKiAgICAgICAgICAgICAgICB8X19fX19VMSB4IFYxX19fX3x8X19fX1UwIHggVjBfX19fX3wKKwkJICogUHV0IHJlc3VsdCBpbiB1cHBlciBwYXJ0IG9mIFBST0QgYW5kIHBhc3MgbG93IHBhcnQgb2YgVFNQQUNFCisJCSAqIGFzIG5ldyBUU1BBQ0UuCisJCSAqLworCQlNUE5fTVVMX05fUkVDVVJTRShwcm9kcCArIHNpemUsIHVwICsgaHNpemUsIHZwICsgaH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XBpX2NsZWFyKE1QSSBhKQoreworCWEtPm5saW1icyA9IDA7CisJYS0+bmJpdHMgPSAwOworCWEtPmZsYWdzID0gMDsKK30KKwordm9pZCBtcGlfZnJlZShNUEkgYSkKK3sKKwlpZiAoIWEpCisJCXJldHVybjsKKworCWlmIChhLT5mbGFncyAmIDQpCisJCWtmcmVlKGEtPmQpOworCWVsc2UKKwkJbXBpX2ZyZWVfbGltYl9zcGFjZShhLT5kKTsKKworCWlmIChhLT5mbGFncyAmIH43KQorCQlwcl9pbmZvKCJpbnZhbGlkIGZsYWcgdmFsdWUgaW4gbXBpXG4iKTsKKwlrZnJlZShhKTsKK30KK0VYUE9SVF9TWU1CT0xfR1BMKG1waV9mcmVlKTsKKworLyoqKioqKioqKioqKioqKioKKyAqIE5vdGU6IFRoaXMgY29weSBmdW5jdGlvbiBzaG91bGQgbm90IGludGVycHJldCB0aGUgTVBJCisgKgkgYnV0IGNvcHkgaXQgdHJhbnNwYXJlbnRseS4KKyAqLworaW50IG1waV9jb3B5KE1QSSAqY29waWVkLCBjb25zdCBNUEkgYSkKK3sKKwlzaXplX3QgaTsKKwlNUEkgYjsKKworCSpjb3BpZWQgPSBOVUxMOworCisJaWYgKGEpIHsKKwkJYiA9IG1waV9hbGxvYyhhLT5ubGltYnMpOworCQlpZiAoIWIpCisJCQlyZXR1cm4gLUVOT01FTTsKKworCQliLT5ubGltYnMgPSBhLT5ubGltYnM7CisJCWItPnNpZ24gPSBhLT5zaWduOworCQliLT5mbGFncyA9IGEtPmZsYWdzOworCQliLT5uYml0cyA9IGEtPm5iaXRzOworCisJCWZvciAoaSA9IDA7IGkgPCBiLT5ubGltYnM7IGkrKykKKwkJCWItPmRbaV0gPSBhLT5kW2ldOworCisJCSpjb3BpZWQgPSBiOworCX0KKworCXJldHVybiAwOworfQorCitpbnQgbXBpX3NldChNUEkgdywgY29uc3QgTVBJIHUpCit7CisJbXBpX3B0cl90IHdwLCB1cDsKKwltcGlfc2l6ZV90IHVzaXplID0g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gYSBnZW5lcmF0ZWQvIGRpcmVjdG9yeQogIwogIyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCiAjIGNhbGxlZCBtYXkgc2V0IGRlc3RpbmF0aW9uIGRpciAod2hlbiBpbnN0YWxsaW5nIHRvIGFzbS8pCiBfZHN0IDo9ICQoaWYgJChkc3QpLCQoZHN0KSwkKG9iaikpCiAKKyMgZ2VuZXJhdGVkIGhlYWRlciBkaXJlY3RvcnkKK2dlbiA6PSAkKGlmICQoZ2VuKSwkKGdlbiksJChzdWJzdCBpbmNsdWRlLyxpbmNsdWRlL2dlbmVyYXRlZC8sJChvYmopKSkKKwoga2J1aWxkLWZpbGUgOj0gJChzcmN0cmVlKS8kKG9iaikvS2J1aWxkCiBpbmNsdWRlICQoa2J1aWxkLWZpbGUpCiAKQEAgLTMzLDkgKzM3LDEwIEBACiAKICMgYWxsIGhlYWRlcnMgZmlsZXMgZm9yIHRoaXMgZGlyCiBoZWFkZXIteSAgICAgIDo9ICQoZmlsdGVyLW91dCAkKGdlbmVyaWMteSksICQoaGVhZGVyLXkpKQotYWxsLWZpbGVzICAgICA6PSAkKGhlYWRlci15KSAkKG9iamhkci15KSAkKHdyYXBwZXItZmlsZXMpCithbGwtZmlsZXMgICAgIDo9ICQoaGVhZGVyLXkpICQob2JqaGRyLXkpICQoZ2VuaGRyLXkpICQod3JhcHBlci1maWxlcykKIGlucHV0LWZpbGVzICAgOj0gJChhZGRwcmVmaXggJChzcmN0cmVlKS8kKG9iaikvLCQoaGVhZGVyLXkpKSBcCi0gICAgICAgICAgICAgICAgICQoYWRkcHJlZml4ICQob2JqdHJlZSkvJChvYmopLywkKG9iamhkci15KSkKKyAgICAgICAgICAgICAgICAgJChhZGRwcmVmaXggJChvYmp0cmVlKS8kKG9iaikvLCQob2JqaGRyLXkpKSBcCisgICAgICAgICAgICAgICAgICQoYWRkcHJlZml4ICQob2JqdHJlZSkvJChnZW4pLywkKGdlbmhkci15KSkKIG91dHB1dC1maWxlcyAgOj0gJChhZGRwcmVmaXggJChpbnN0YWxsKS8sICQoYWxsLWZpbGVzKSkKIAogIyBXb3JrIG91dCB3aGF0IG5lZWRzIHRvIGJlIHJlbW92ZWQKQEAgLTUyLDYgKzU3LDcgQEAKICAgICAgIGNtZF9pbnN0YWxsID0gXAogICAgICAgICAkKFBFUkwpICQ8ICQoc3JjdHJlZSkvJChvYmopICQoaW5zdGFsbCkgJChTUkNBUkNIKSAkKGhlYWRlci15KTsgXAogICAgICAgICAkKFBFUkwpICQ8ICQob2JqdHJlZSkvJChvYmopICQoaW5zdGFsbCkgJChTUkNBUkNIKSAkKG9iamhkci15KTsgXAorICAgICAgICAkKFBFUkwpICQ8ICQob2JqdHJlZSkvJChnZW4pICQoaW5zdGFsbCkgJChTUkNBUkNIKSAkKGdlbmhkci15KTsgXAogICAgICAgICBmb3IgRiBpbiAkKHdyYXBwZXItZmlsZXMpOyBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgIGVjaG8gIlwjaW5jbHVkZSA8YXNtLWdlbmVyaWMvJCRGPiIgPiAkKGluc3RhbGwpLyQkRjsgICAgXAogICAgICAgICBkb25lOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvc2NyaXB0cy9NYWtlZmlsZS5saWIgYi9zY3JpcHRzL01ha2VmaWxlLmxpYgppbmRleCA1ZDk4NmQ5Li4wMGMzNjhjIDEwMDY0NAotLS0gYS9zY3JpcHRzL01ha2VmaWxlLmxpYgorKysgYi9zY3JpcHRzL01ha2VmaWxlLmxpYgpAQCAtOTMsOSArOTMsOSBAQAogIyBhbHJlYWR5CiAjICQobW9kbmFtZV9mbGFncykgI2RlZmluZXMgS0JVSUxEX01PRE5BTUUgYXMgdGhlIG5hbWUgb2YgdGhlIG1vZHVsZ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vIHJlcGFpciBhIGRlZmljaWVuY3kgaW4gYXJjaC91bQogdXBkYXRlLXBvLWNvbmZpZzogJChvYmopL2t4Z2V0dGV4dCAkKG9iaikvZ2NvbmYuZ2xhZGUuaAotCSQoUSllY2hvICIgIEdFTiBjb25maWciCisJJChRKWVjaG8gIiAgR0VOICAgICBjb25maWcucG90IgogCSQoUSl4Z2V0dGV4dCAtLWRlZmF1bHQtZG9tYWluPWxpbnV4ICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkgICAgLS1hZGQtY29tbWVudHMgLS1rZXl3b3JkPV8gLS1rZXl3b3JkPU5fICAgICAgICAgICAgICAgICBcCiAJICAgIC0tZnJvbS1jb2RlPVVURi04ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtNjMsMTAgKzYyLDExIEBACiAJJChRKShmb3IgaSBpbiBgbHMgJChzcmN0cmVlKS9hcmNoLyovS2NvbmZpZyAgICAgIFwKIAkgICAgJChzcmN0cmVlKS9hcmNoLyovdW0vS2NvbmZpZ2A7ICAgICAgICAgICAgICAgXAogCSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCWVjaG8gIiAgR0VOICQkaSI7ICAgICAgICAgICAgICAgICAgICAgICAgXAorCQllY2hvICIgIEdFTiAgICAgJCRpIjsgICAgICAgICAgICAgICAgICAgIFwKIAkJJChvYmopL2t4Z2V0dGV4dCAkJGkgICAgICAgICAgICAgICAgICAgICBcCiAJCSAgICAgPj4gJChvYmopL2NvbmZpZy5wb3Q7ICAgICAgICAgICAgICAgXAogCSAgICBkb25lICkKKwkkKFEpZWNobyAiICBHRU4gICAgIGxpbnV4LnBvdCIKIAkkKFEpbXNndW5pcSAtLXNvcnQtYnktZmlsZSAtLXRvLWNvZGU9VVRGLTggJChvYmopL2NvbmZpZy5wb3QgXAogCSAgICAtLW91dHB1dCAkKG9iaikvbGludXgucG90CiAJJChRKXJtIC1mICQob2JqKS9jb25ma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Qgc25kX2RldmljZV9vcHMgb3BzID0geworCQkuZGV2X2ZyZWUgPSBOVUxMLAorCQkuZGV2X3JlZ2lzdGVyID0gc25kX2NvbXByZXNzX2Rldl9yZWdpc3RlciwKKwkJLmRldl9kaXNjb25uZWN0ID0gc25kX2NvbXByZXNzX2Rldl9kaXNjb25uZWN0LAorCX07CisKKwljb21wci0+Y2FyZCA9IGNhcmQ7CisJY29tcHItPmRldmljZSA9IGRldmljZTsKKwljb21wci0+ZGlyZWN0aW9uID0gZGlybjsKKwlyZXR1cm4gc25kX2RldmljZV9uZXcoY2FyZCwgU05EUlZfREVWX0NPTVBSRVNTLCBjb21wciwgJm9wcyk7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChzbmRfY29tcHJlc3NfbmV3KTsKKworc3RhdGljIGludCBzbmRfY29tcHJlc3NfYWRkX2RldmljZShzdHJ1Y3Qgc25kX2NvbXByICpkZXZpY2UpCit7CisJaW50IHJldDsKKworCWlmICghZGV2aWNlLT5jYXJkKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCS8qIHJlZ2lzdGVyIHRoZSBjYXJkICovCisJcmV0ID0gc25kX2NhcmRfcmVnaXN0ZXIoZGV2aWNlLT5jYXJkKTsKKwlpZiAocmV0KQorCQlnb3RvIG91dDsKKwlyZXR1cm4gMDsKKworb3V0OgorCXByX2VycigiZmFpbGVkIHdpdGggJWRcbiIsIHJldCk7CisJcmV0dXJuIHJldDsKKworfQorCitzdGF0aWMgaW50IHNuZF9jb21wcmVzc19yZW1vdmVfZGV2aWNlKHN0cnVjdCBzbmRfY29tcHIgKmRldmljZSkKK3sKKwlyZXR1cm4gc25kX2NhcmRfZnJlZShkZXZpY2UtPmNhcmQpOworfQorCisvKioKKyAqIHNuZF9jb21wcmVzc19yZWdpc3RlciAtIHJlZ2lzdGVyIGNvbXByZXNzZWQgZGV2aWNlCisgKgorICogQGRldmljZTogY29tcHJlc3NlZCBkZXZpY2UgdG8gcmVnaXN0ZXIKKyAqLworaW50IH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DAwMCwgICAgIC8qIFI4MDIgKi8KLQkweDAwMDAsICAgICAvKiBSODAzICovCi0JMHgwMDAwLCAgICAgLyogUjgwNCAqLwotCTB4MDAwMCwgICAgIC8qIFI4MDUgKi8KLQkweDAwMDAsICAgICAvKiBSODA2ICovCi0JMHgwMDAwLCAgICAgLyogUjgwNyAqLwotCTB4MDAwMCwgICAgIC8qIFI4MDggKi8KLQkweDAwMDAsICAgICAvKiBSODA5ICovCi0JMHgwMDAwLCAgICAgLyogUjgxMCAqLwotCTB4MDAwMCwgICAgIC8qIFI4MTEgKi8KLQkweDAwMDAsICAgICAvKiBSODEyICovCi0JMHgwMDAwLCAgICAgLyogUjgxMyAqLwotCTB4MDAwMCwgICAgIC8qIFI4MTQgKi8KLQkweDAwMDAsICAgICAvKiBSODE1ICovCi0JMHgwMDAwLCAgICAgLyogUjgxNiAqLwotCTB4MDAwMCwgICAgIC8qIFI4MTcgKi8KLQkweDAwMDAsICAgICAvKiBSODE4ICovCi0JMHgwMDAwLCAgICAgLyogUjgxOSAqLwotCTB4MDAwMCwgICAgIC8qIFI4MjAgKi8KLQkweDAwMDAsICAgICAvKiBSODIxICovCi0JMHgwMDAwLCAgICAgLyogUjgyMiAqLwotCTB4MDAwMCwgICAgIC8qIFI4MjMgKi8KLQkweDAwMDAsICAgICAvKiBSODI0ICovCi0JMHgwMDAwLCAgICAgLyogUjgyNSAqLwotCTB4MDAwMCwgICAgIC8qIFI4MjYgKi8KLQkweDAwMDAsICAgICAvKiBSODI3ICovCi0JMHgwMDAwLCAgICAgLyogUjgyOCAqLwotCTB4MDAwMCwgICAgIC8qIFI4MjkgKi8KLQkweDAwMDAsICAgICAvKiBSODMwICovCi0JMHgwMDAwLCAgICAgLyogUjgzMSAqLwotCTB4MDAwMCwgICAgIC8qIFI4MzIgKi8KLQkweDAwMDAsICAgICAvKiBSODMzICovCi0JMHgwMDAwLCAgICAgLyogUjgzNCAqLwotCTB4MDAwMCwgICAgIC8qIFI4MzUgKi8KLQkweDAwMDAsICAgICAvKiBSODM2ICovCi0JMHgwMDAwLCAgICAgLyogUjgzNyAqLwotCTB4MDAwMCwgICAgIC8qIFI4MzggKi8KLQkweDAwMDAsICAgICAvKiBSODM5ICovCi0JMHgwMDAwLCAgICAgLyogUjg0MCAqLwotCTB4MDAwMCwgICAgIC8qIFI4NDEgKi8KLQkweDAwMDAsICAgICAvKiBSODQyICovCi0JMHgwMDAwLCAgICAgLyogUjg0MyAqLwotCTB4MDAwMCwgICAgIC8qIFI4NDQgKi8KLQkweDAwMDAsICAgICAvKiBSODQ1ICovCi0JMHgwMDAwLCAgICAgLyogUjg0NiAqLwotCTB4MDAwMCwgICAgIC8qIFI4NDcgKi8KLQkweDAwMDAsICAgICAvKiBSODQ4ICovCi0JMHgwMDAwLCAgICAgLyogUjg0OSAqLwotCTB4MDAwMCwgICAgIC8qIFI4NTAgKi8KLQkweDAwMDAsICAgICAvKiBSODUxICovCi0JMHgwMDAwLCAgICAgLyogUjg1MiAqLwotCTB4MDAwMCwgICAgIC8qIFI4NTMgKi8KLQkweDAwMDAsICAgICAvKiBSODU0ICovCi0JMHgwMDAwLCAgICAgLyogUjg1NSAqLwotCTB4MDAwMCwgICAgIC8qIFI4NTYgKi8KLQkweDAwMDAsICAgICAvKiBSODU3ICovCi0JMHgwMDAwLCAgICAgLyogUjg1OCAqLwotCTB4MDAwMCwgICAgIC8qIFI4NTkgKi8KLQkweDAwMDAsICAgICAvKiBSODYwICovCi0JMHgwMDAwLCAgICAgLyogUjg2MSAqLwotCTB4MDAwMCwgICAgIC8qIFI4NjIgKi8KLQkweDAwMDAsICAgICAvKiBSODYzICovCi0JMHgwMDAwLCAgICAgLyogUjg2NCAqLwotCTB4MDAwMCwgICAgIC8qIFI4NjUgKi8KLQkweDAwMDAsICAgICAvKiBSODY2ICovCi0JMHgwMDAwLCAgICAgLyogUjg2NyAqLwotCTB4MDAwMCwgICAgIC8qIFI4NjggKi8KLQkweDAwMDAsICAgICAvKiBSODY5ICovCi0JMHgwMDAwLCAgICAgLyogUjg3MCAqLwotCTB4MDAwMCwgICAgIC8qIFI4NzEgKi8KLQkweDAwMDAsICAgICAvKiBSODcyICovCi0JMHgwMDAwLCAgICAgLyogUjg3MyAqLwotCTB4MDAwMCwgICAgIC8qIFI4NzQgKi8KLQkweDAwMDAsICAgICAvKiBSODc1ICovCi0JMHgwMDAwLCAgICAgLyogUjg3NiAqLwotCTB4MDAwMCwgICAgIC8qIFI4NzcgKi8KLQkweDAwMDAsICAgICAvKiBSODc4ICovCi0JMHgwMDAwLCAgICAgLyogUjg3OSAqLwotCTB4MDAwMCwgICAgIC8qIFI4ODAgKi8KLQkweDAwMDAsICAgICAvKiBSODgxICovCi0JMHgwMDAwLCAgICAgLyogUjg4MiAqLwotCTB4MDAwMCwgICAgIC8qIFI4ODMgKi8KLQkweDAwMDAsICAgICAvKiBSODg0ICovCi0JMHgwMDAwLCAgICAgLyogUjg4NSAqLwotCTB4MDAwMCwgICAgIC8qIFI4ODYgKi8KLQkweDAwMDAsICAgICAvKiBSODg3ICovCi0JMHgwMDAwLCAgICAgLyogUjg4OCAqLwotCTB4MDAwMCwgICAgIC8qIFI4ODkgKi8KLQkweDAwMDAsICAgICAvKiBSODkwICovCi0JMHgwMDAwLCAgICAgLyogUjg5MSAqLwotCTB4MDAwMCwgICAgIC8qIFI4OTIgKi8KLQkweDAwMDAsICAgICAvKiBSODkzICovCi0JMHgwMDAwLCAgICAgLyogUjg5NCAqLwotCTB4MDAwMCwgICAgIC8qIFI4OTUgKi8KLQkweDAwMDAsICAgICAvKiBSODk2ICovCi0JMHgwMDAwLCAgICAgLyogUjg5NyAqLwotCTB4MDAwMCwgICAgIC8qIFI4OTggKi8KLQkweDAwMDAsICAgICAvKiBSODk5ICovCi0JMHgwMDAwLCAgICAgLyogUjkwMCAqLwotCTB4MDAwMCwgICAgIC8qIFI5MDEgKi8KLQkweDAwMDAsICAgICAvKiBSOTAyICovCi0JMHgwMDAwLCAgICAgLyogUjkwMyAqL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MTExMCAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTExICovCi0JMHgwMDAwLCAgICAgLyogUjExMTIgKi8KLQkweDAwMDAsICAgICAvKiBSMTExMyAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTE0ICovCi0JMHgwMDAwLCAgICAgLyogUjExMTUgKi8KLQkweDAwMDAsICAgICAvKiBSMTExNiAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTE3ICovCi0JMHgwMDAwLCAgICAgLyogUjExMTggKi8KLQkweDAwMDAsICAgICAvKiBSMTExOSAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTIwICovCi0JMHgwMDAwLCAgICAgLyogUjExMjEgKi8KLQkweDAwMDAsICAgICAvKiBSMTEyMiAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTIzICovCi0JMHgwMDAwLCAgICAgLyogUjExMjQgKi8KLQkweDAwMDAsICAgICAvKiBSMTEyNSAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTI2ICovCi0JMHgwMDAwLCAgICAgLyogUjExMjcgKi8KLQkweDAwMDAsICAgICAvKiBSMTEyOCAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTI5ICovCi0JMHgwMDAwLCAgICAgLyogUjExMzAgKi8KLQkweDAwMDAsICAgICAvKiBSMTEzMSAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTMyICovCi0JMHgwMDAwLCAgICAgLyogUjExMzMgKi8KLQkweDAwMDAsICAgICAvKiBSMTEzNCAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTM1ICovCi0JMHgwMDAwLCAgICAgLyogUjExMzYgKi8KLQkweDAwMDAsICAgICAvKiBSMTEzNyAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTM4ICovCi0JMHgwMDAwLCAgICAgLyogUjExMzkgKi8KLQkweDAwMDAsICAgICAvKiBSMTE0MCAqLwotCTB4MDAwMCwgICAgIC8qIFIxMTQxICovCi0JMHgwMDAwLCAgICAgLyogUjExNDIgKi8KLQkweDAwMDAs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Zm9yICg7OykgewotCXByaW50ICIkcHJvbXB0IFtZL25dICI7CisJaWYgKCRjYW5jZWwpIHsKKwkgICAgcHJpbnQgIiRwcm9tcHQgW3kvbi9DXSAiOworCX0gZWxzZSB7CisJICAgIHByaW50ICIkcHJvbXB0IFtZL25dICI7CisJfQogCSRhbnMgPSA8U1RESU4+OwogCWNob21wICRhbnM7CiAJaWYgKCRhbnMgPX4gL15ccyokLykgewotCSAgICAkYW5zID0gInkiOworCSAgICBpZiAoJGNhbmNlbCkgeworCQkkYW5zID0gImMiOworCSAgICB9IGVsc2UgeworCQkkYW5zID0gInkiOworCSAgICB9CiAJfQogCWxhc3QgaWYgKCRhbnMgPX4gL155JC9pIHx8ICRhbnMgPX4gL15uJC9pKTsKLQlwcmludCAiUGxlYXNlIGFuc3dlciBlaXRoZXIgJ3knIG9yICduJy5cbiI7CisJaWYgKCRjYW5jZWwpIHsKKwkgICAgbGFzdCBpZiAoJGFucyA9fiAvXmMkL2kpOworCSAgICBwcmludCAiUGxlYXNlIGFuc3dlciBlaXRoZXIgJ3knLCAnbicgb3IgJ2MnLlxuIjsKKwl9IGVsc2UgeworCSAgICBwcmludCAiUGxlYXNlIGFuc3dlciBlaXRoZXIgJ3knIG9yICduJy5cbiI7CisJfQorICAgIH0KKyAgICBpZiAoJGFucyA9fiAvXmMvaSkgeworCWV4aXQ7CiAgICAgfQogICAgIGlmICgkYW5zICF+IC9eeSQvaSkgewogCXJldHVybiAwOwpAQCAtMjQ4LDYgKzQwNSwxOCBAQAogICAgIHJldHVybiAxOwogfQogCitzdWIgcmVhZF95biB7CisgICAgbXkgKCRwcm9tcHQpID0gQF87CisKKyAgICByZXR1cm4gcmVhZF9wcm9tcHQgMCwgJHByb21wdDsKK30KKworc3ViIHJlYWRfeW5jIHsKKyAgICBteSAoJHByb21wdCkgPSBAXzsKKworICAgIHJldHVybiByZWFkX3Byb21wdCAxLCAkcHJvbXB0OworfQorCiBzdWIgZ2V0X2t0ZXN0X2NvbmZpZyB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PSAwOworCisJbnJfdGVzdHMrKzsKK30KKworc3RhdGljIHZvaWQgd3JpdGVfdmFyKGludCBsZW4pCit7CisJY2hhciAqcGN2YWw7IHNob3J0ICpwc3ZhbDsgaW50ICpwaXZhbDsgbG9uZyBsb25nICpwbHZhbDsKKwlpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCA0OyBpKyspIHsKKwkJc3dpdGNoIChsZW4pIHsKKwkJY2FzZSAxOgorCQkJcGN2YWwgPSAoY2hhciAqKSZkdW1teV92YXJbaV07CisJCQkqcGN2YWwgPSAweGZmOworCQkJYnJlYWs7CisJCWNhc2UgMjoKKwkJCXBzdmFsID0gKHNob3J0ICopJmR1bW15X3ZhcltpXTsKKwkJCSpwc3ZhbCA9IDB4ZmZmZjsKKwkJCWJyZWFrOworCQljYXNlIDQ6CisJCQlwaXZhbCA9IChpbnQgKikmZHVtbXlfdmFyW2ldOworCQkJKnBpdmFsID0gMHhmZmZmZmZmZjsKKwkJCWJyZWFrOworCQljYXNlIDg6CisJCQlwbHZhbCA9IChsb25nIGxvbmcgKikmZHVtbXlfdmFyW2ldOworCQkJKnBsdmFsID0gMHhmZmZmZmZmZmZmZmZmZmZmTEw7CisJCQlicmVhazsKKwkJfQorCQljaGVja190cmFwcGVkKCk7CisJfQorfQorCitzdGF0aWMgdm9pZCByZWFkX3ZhcihpbnQgbGVuKQoreworCWNoYXIgY3ZhbDsgc2hvcnQgc3ZhbDsgaW50IGl2YWw7IGxvbmcgbG9uZyBsdmFsOworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IDQ7IGkrKykgeworCQlzd2l0Y2ggKGxlbikgeworCQljYXNlIDE6CisJCQljdmFsID0gKihjaGFyICopJmR1bW15X3ZhcltpXTsKKwkJCWJyZWFrOworCQljYXNlIDI6CisJCQlzdmFsID0gKihzaG9ydCAqKSZkdW1teV92YXJbaV07CisJCQlicmVhazsKKwkJY2FzZSA0OgorCQkJaXZhbCA9ICooaW50ICopJmR1bW15X3ZhcltpXTs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