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ljLWVsZW1lbnQpKQorCSAob2Zmc2V0ICgtICgxKyBjb2x1bW4pIGFuY2hvcikpCisJIChzdGVwcyAoZmxvb3Igb2Zmc2V0IGMtYmFzaWMtb2Zmc2V0KSkpCisgICAgKCogKG1heCBzdGVwcyAxKQorICAgICAgIGMtYmFzaWMtb2Zmc2V0KSkpCiAKLVRoaXMgd2lsbCBkZWZpbmUgdGhlIE0teCBsaW51eC1jLW1vZGUgY29tbWFuZC4gIFdoZW4gaGFja2luZyBvbiBhCi1tb2R1bGUsIGlmIHlvdSBwdXQgdGhlIHN0cmluZyAtKi0gbGludXgtYyAtKi0gc29tZXdoZXJlIG9uIHRoZSBmaXJzdAotdHdvIGxpbmVzLCB0aGlzIG1vZGUgd2lsbCBiZSBhdXRvbWF0aWNhbGx5IGludm9rZWQuIEFsc28sIHlvdSBtYXkgd2FudAotdG8gYWRkCisoYWRkLWhvb2sgJ2MtbW9kZS1ob29rCisgICAgICAgICAgKGxhbWJkYSAoKQorICAgICAgICAgICAgKGxldCAoKGZpbGVuYW1lIChidWZmZXItZmlsZS1uYW1lKSkpCisgICAgICAgICAgICAgIDs7IEVuYWJsZSBrZXJuZWwgbW9kZSBmb3IgdGhlIGFwcHJvcHJpYXRlIGZpbGVzCisgICAgICAgICAgICAgICh3aGVuIChhbmQgZmlsZW5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLW1hdGNoICJ+L3NyYy9saW51eC10cmVlcyIgZmlsZW5hbWUpKQorICAgICAgICAgICAgICAgIChzZXRxIGluZGVudC10YWJzLW1vZGUgdCkKKyAgICAgICAgICAgICAgICAoYy1zZXQtc3R5bGUgImxpbnV4IikKKyAgICAgICAgICAgICAgICAoYy1zZXQtb2Zmc2V0ICdhcmdsaXN0LWNvbnQtbm9uZW1wdHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcoYy1saW5ldXAtZ2NjLWFzbS1yZWcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY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Q0CmluZGV4IDAwMDAwMDAuLmQ4Mjk3ZTQKLS0tIC9kZXYvbnVsbAorKysgYi9Eb2N1bWVudGF0aW9uL2J0OHh4Z3Bpby50eHQKQEAgLTAsMCArMSw2NyBAQAorPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cis9PSAgQlQ4WFhHUElPIGRyaXZlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0KKz09ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PQorPT0gIEEgZHJpdmVyIGZvciBhIHNlbGZtYWRlIGNoZWFwIEJUOHh4IGJhc2VkIFBDSSBHUElPLWNhcmQgID09Cis9PSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0KKz09ICBGb3IgYWR2YW5jZWQgZG9jdW1lbnRhdGlvbiwgc2VlICAgICAgICAgICAgICAgICAgICAgICAgICA9PQorPT0gIGh0dHA6Ly93d3cuYnUzc2NoLmRlL2J0Z3Bpby5waHAgICAgICAgICAgICAgICAgICAgICAgICAgID09Cis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKworCitBIGdlbmVyaWMgZGlnaXRhbCAyNC1wb3J0IFBDSSBHUElPIGNhcmQgY2FuIGJlIGJ1aWx0IG91dCBvZiBhbiBvcmRpbmFyeQorQnJvb2t0cmVlIGJ0ODQ4LCBidDg0OSwgYnQ4Nzggb3IgYnQ4NzkgYmFzZWQgYW5hbG9nIFRWIHR1bmVyIGNhcmQuIFRoZQorQnJvb2t0cmVlIGNoaXAgaXMgdXNlZCBpbiBvbGQgYW5hbG9nIEhhdXBwYXVnZSBXaW5UViBQQ0kgY2FyZHMuIFlvdSBjYW4gZWFzaWx5CitmaW5kIHRoZW0gdXNlZCBmb3IgbG93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gMSAxIDEgMSAxIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAgICAgMiAzIDQgNSA2IDcKKyAgICAgICAgICAgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8CisgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXiAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpbiA4NiAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpbiA2NyAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGluIDYxID4gIHwtLSBHMTgKKyAgICAgICAgIC0tfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8LS0gRzE5CisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tIEcyMAorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLSBHMjEKKyAgICAgICAgIC0tfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8LS0gRzIyCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaW4gNTYgPiAgfC0tIEcyMworICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgQnJvb2t0cmVlIDg3OC84NzkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLQorICAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICAgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8CisgICAgICAgICAgIF4KKyAgICAgICAgICAgVGhpcyBpcyBwaW4gMQorCmRpZmYgLS1na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0ZQorCXJhdGUgaXMgc2V0IGJ5IHdyaXRpbmcgYSBtaW5pbXVtIGJhbmR3aWR0aCBpbiBieXRlcy9zZWMgdG8gdGhlIGF0dHJpYnV0ZQogCWZpbGUuIFRoZSByYXRlIHdpbGwgYmUgdHJhbnNsYXRlZCB0byBhbiBpbnRlcm5hbCB2YWx1ZSB0aGF0IGdpdmVzIGF0CiAJbGVhc3QgdGhlIHNwZWNpZmllZCByYXRlLgogCkBAIC01MzcsNyArNDcyLDYgQEAKIAltb3RoZXJib2FyZCBzcGVjaWZpYyBhbmQgZGV0ZXJtaW5hdGlvbiBvZiB0aGlzIGluZm9ybWF0aW9uCiAJbXVzdCBvY2N1ciBpbiB1c2VybGFuZCBhdCB0aGlzIHRpbWUuCiAKLQogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogU1lTVEVNIExPR0dJTkcKIApAQCAtNTcwLDcgKzUwNCw2IEBACiBkcml2ZXItc3BlY2lmaWMgZXJyb3IgbWVzc2FnZS4KIAogCi0KID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIFBDSSBCdXMgUGFyaXR5IERldGVjdGlvbgogCkBAIC02MDQsNiArNTM3LDc0IEBACiAJZWNobyAiMCIgPi9zeXMvZGV2aWNlcy9zeXN0ZW0vZWRhYy9wY2kvY2hlY2tfcGNpX3Bhcml0eQogCiAKK1Bhcml0eSBDb3VudDoKKworCSdwY2lfcGFyaXR5X2NvdW50JworCisJVGhpcyBhdHRyaWJ1dGUgZmlsZSB3aWxsIGRpc3BsYXkgdGhlIG51bWJlciBvZiBwYXJpdHkgZXJyb3JzIHRoYXQKKwloYXZlIGJlZW4gZGV0ZWN0ZWQuCisKKworPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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NoNzc2MGZiLmg+CisKKy8qCisgKiBORUMgTkw2NDQwYmMyNi0wMSA2NDB4NDgwIFRGVAorICogZG90Y2xvY2sgMjUxNzUga0h6CisgKiBYcmVzICAgICAgICAgICAgICAgIDY0MCAgICAgWXJlcyAgICAgICAgICAgIDQ4MAorICogSHRvdGFsICAgICAgODAwICAgICBWdG90YWwgICAgICAgICAgNTI1CisgKiBIc3luU3RhcnQgICA2NTYgICAgIFZzeW5TdGFydCAgICAgICA0OTAKKyAqIEhzeW5MZW5uICAgIDMwICAgICAgVnN5bkxlbm4gICAgICAgIDIKKyAqCisgKiBUaGUgbGludXggZnJhbWVidWZmZXIgbGF5ZXIgZG9lcyBub3QgdXNlIHRoZSBzeW5jc3RhcnQvc3luY2xlbgorICogdmFsdWVzIGJ1dCByaWdodC9sZWZ0L3VwcGVyL2xvd2VyIG1hcmdpbiB2YWx1ZXMuIFRoZSBjb21tZW50cworICogZm9yIHRoZSB4X21hcmdpbiBleHBsYWluIGhvdyB0byBjYWxjdWxhdGUgdGhvc2UgZnJvbSBnaXZlbgorICogcGFuZWwgc3luYyB0aW1pbmdzLgorICovCitzdGF0aWMgc3RydWN0IGZiX3ZpZGVvbW9kZSBubDY0NDhiYzI2ID0geworICAgICAgIC5uYW1lICAgICAgICAgICA9ICJOTDY0NDhCQzI2IiwKKyAgICAgICAucmVmcmVzaCAgICAgICAgPSA2MCwKKyAgICAgICAueHJlcyAgICAgICAgICAgPSA2NDAsCisgICAgICAgLnlyZXMgICAgICAgICAgID0gNDgwLAorICAgICAgIC5waXhjbG9jayAgICAgICA9IDM5NjgzLCAgICAgICAgLyogaW4gcGljb3NlY29uZHMhICovCisgICAgICAgLmhzeW5jX2xlbiAgICAgID0gMzAsCisgICAgICAgLnZzeW5jX2xlbiAgICAgID0gMiwKKyAgICAgICAubGVmdF9tYXJnaW4gICAgPSAxMTQsICAvKiBIVE9UIC0gKEhTWU5TTEVOICsgSFNZTlNUQVJUKSAqLworICAgICAgIC5yaWdodF9tYXJnaW4gICA9IDE2LCAgIC8qIEhTWU5TVEFSVCAtIFhSRVMgKi8KKyAgICAgICAudXBwZXJfbWFyZ2luICAgPSAzMywgICAvKiBWVE9UIC0gKFZTWU5MRU4gKyBWU1lOU1RBUlQpICovCisgICAgICAgLmxvd2VyX21hcmdpbiAgID0gMTAsICAgLyogVlNZTlNUQVJUIC0gWVJFUyAqLworICAgICAgIC5zeW5jICAgICAgICAgICA9IEZCX1NZTkNfSE9SX0hJR0hfQUNUIHwgRkJfU1lOQ19WRVJUX0hJR0hfQUNULAorICAgICAgIC52bW9kZSAgICAgICAgICA9IEZCX1ZNT0RFX05PTklOVEVSTEFDRUQsCisgICAgICAgLmZsYWcgICAgICAgICAgID0gMCwKK307CisKK3N0YXRpYyBzdHJ1Y3Qgc2g3NzYwZmJfcGxhdGRhdGEgc2g3NzYwZmJfbmw2NDQ4ID0geworICAgICAgIC5kZWZfbW9kZSAgICAgICA9ICZubDY0NDhiYzI2LAorICAgICAgIC5sZG10ciAgICAgICAgICA9IExETVRSX1RGVF9DT0xPUl8xNiwgICAvKiAxNmJpdCBURlQgcGFuZWwgKi8KKyAgICAgICAubGRkZnIgICAgICAgICAgPSBMRERGUl84QlBQLCAgICAgICAgICAgLyogd2Ugd2FudCA4Yml0IG91dHB1dCAqLworICAgICAgIC5sZHBtbXIgICAgICAgICA9IDB4MDA3MCwKKyAgICAgICAubGRwc3ByICAgICAgICAgPSAweDA1MDAsCisgICAgICAgLmxkYWNsbnIgICAgICAgID0gMCwKKyAgICAgICAubGRpY2tyICAgICAgICAgPSBMRElDS1JfQ0xLU1JDKExDRENfQ0xLU1JDX0VYVEVSTkFMKSB8CisgICAgICAgICAgICAgICAgICAgICAgICAgTERJQ0tSX0NMS0RJVigxKSwKKyAgICAgICAucm90YXRlICAgICAgICAgPSAwLAorICAgICAgIC5ub3ZzeW5jICAgICAgICA9IDEsCisgICAgICAgLmJsYW5rICAgICAgICAgID0gTlVMTCwKK307CisKKy8qIFNINzc2MDoKKyAqIDB4RkUzMDA4MDA6IDI1NiAqIDRieXRlIHhSR0IgcGFsZXR0ZSByYW0KKyAqIDB4RkUzMDBDMDA6IDQyIGJ5dGVzIGN0cmwgcmVnaXN0ZXJzCisgKi8KK3N0YXRpYyBzdHJ1Y3QgcmVzb3VyY2Ugc2g3NzYwX2xjZGNfcmVzW10gPSB7CisgICAgICAgWzBdID0geworICAgICAgICAgICAgICAgLnN0YXJ0ICA9IDB4RkUzMDA4MDAsCisgICAgICAgICAgICAgICAuZW5kICAgID0gMHhGRTMwMENGRiwKKyAgICAgICAgICAgICAgIC5mbGFncyAgPSBJT1JFU09VUkNFX01FTSwKKyAgICAgICB9LAorICAgICAgIFsxXSA9IHsKKyAgICAgICAgICAgICAgIC5zdGFydCAgPSA2NSwKKyAgICAgICAgICAgICAgIC5lbmQgICAgPSA2NSwKKyAgICAgICAgICAgICAgIC5mbGFncyAgPSBJT1JFU09VUkNFX0lSUSwKKyAgICAgICB9LAorfTsKKworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2Ugc2g3NzYwX2xjZGNfZGV2ID0geworICAgICAgIC5kZXYgICAgPSB7CisgICAgICAgICAgICAgICAucGxhdGZvcm1fZGF0YSA9ICZzaDc3NjBmYl9ubDY0NDgsCisgICAgICAgfSwKKyAgICAgICAubmFtZSAgICAgICAgICAgPSAic2g3NzYwLWxjZGMiLAorICAgICAgIC5pZCAgICAgICAgICAgICA9IC0xLAorICAgICAgIC5yZXNvdXJjZSAgICAgICA9IHNoNzc2MF9sY2RjX3JlcywKKyAgICAgICAubnVtX3Jlc291cmNlcyAgPSBBUlJBWV9TSVpFKHNoNzc2MF9sY2RjX3JlcyksCit9OworCis9PT09PT09PT09PT09PT09PT09PT09IGN1dCBoZXJlID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL2ZiL3RyaWRlbnRmYi50eHQgYi9Eb2N1bWVudGF0aW9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ICovCisgICAgICAgIF9fYmUzMiBoX2JvZHlfc2l6ZTsgICAgICAgICAgICAgLyogc2l6ZSBvZiB1c2VmdWwgZGF0YSBhZnRlciBoZWFkZXIgKi8KKyAgICAgICAgX19iZTE2IGhfY3JjOyAgICAgICAgICAgICAgICAgICAvKiBjcmMtY2NpdHQgb2YgYm9keV9zaXplIGJ5dGVzICovCisgICAgICAgIGNoYXIgaF9maWxsMVsyXTsKKyAgICAgICAgdTggaF92ZXJzaW9uOyAgICAgICAgICAgICAgICAgICAvKiB2ZXJzaW9uLCBhbHdheXMgMSAqLworICAgICAgICBjaGFyIGhfdHlwZTsgICAgICAgICAgICAgICAgICAgIC8qIE9NRlNfSU5PREVfWCAqLworICAgICAgICB1OCBoX21hZ2ljOyAgICAgICAgICAgICAgICAgICAgIC8qIE9NRlNfSU1BR0lDICovCisgICAgICAgIHU4IGhfY2hlY2tfeG9yOyAgICAgICAgICAgICAgICAgLyogWE9SIG9mIGhlYWRlciBieXRlcyBiZWZvcmUgdGhpcyAqLworICAgICAgICBfX2JlMzIgaF9maWxsMjsKK307CisKK0ZpbGVzIGFuZCBkaXJlY3RvcmllcyBhcmUgYm90aCByZXByZXNlbnRlZCBieSBvbWZzX2lub2RlOgorCitzdHJ1Y3Qgb21mc19pbm9kZSB7CisgICAgICAgIHN0cnVjdCBvbWZzX2hlYWRlciBpX2hlYWQ7ICAgICAgLyogaGVhZGVyICovCisgICAgICAgIF9fYmU2NCBpX3BhcmVudDsgICAgICAgICAgICAgICAgLyogcGFyZW50IGNvbnRhaW5pbmcgdGhpcyBpbm9kZSAqLworICAgICAgICBfX2JlNjQgaV9zaWJsaW5nOyAgICAgICAgICAgICAgIC8qIG5leHQgaW5vZGUgaW4gaGFzaCBidWNrZXQgKi8KKyAgICAgICAgX19iZTY0IGlfY3RpbWU7ICAgICAgICAgICAgICAgICAvKiBjdGltZSwgaW4gbWlsbGlzZWNvbmRzICovCisgICAgICAgIGNoYXIgaV9maWxsMVszNV07CisgICAgIC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giLiBGb3IgY2FsbG91dCBwb3J0LCB0aGUgbmFtaW5nIGNvbnZlbnRpb24KICAgICAgICBpcyAiY3VteHgiLgogCiAgICAgICAgRGV2aWNlIG5hbWluZyB3aGVuIG1vcmUgdGhhbiAyIGJvYXJkcyBpbnN0YWxsZWQKICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotICAgICAgIE5hbWluZyBjb252ZW50aW9uIGZvciBlYWNoIFNtYXJ0aW8gbXVsdGlwb3J0IGJvYXJkIGlzIHByZS1kZWZpbmVkCi0gICAgICAgYXMgYmVsb3cuCisgICAgICAgTmFtaW5nIGNvbnZlbnRpb24gZm9yIGVhY2ggU21hcnRpby9JbmR1c3RpbyBtdWx0aXBvcnQgYm9hcmQgaXMKKyAgICAgICBwcmUtZGVmaW5lZCBhcyBiZWxvdy4KIAogICAgICAgIEJvYXJkIE51bS4JIERpYWwtaW4gUG9ydAkgICAgICBDYWxsb3V0IHBvcnQKICAgICAgICAxc3QgYm9hcmQJdHR5TTAgIC0gdHR5TTcJICAgICAgY3VtMCAgLSBjdW03CkBAIC0xMjksNiArMTc2LDEyIEBACiAgICAgICAgM3JkIGJvYXJkCXR0eU0xNiAtIHR0eU0yMyAgICAgICBjdW0xNiAtIGN1bTIzCiAgICAgICAgNHRoIGJvYXJkCXR0eU0yNCAtIHR0eW0zMSAgICAgICBjdW0yNCAtIGN1bTMxCiAKKworICAgICAgICEhISEhISEhISEhISEhISEhISEhIE5PVEUgISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhIQorICAgICAgIFVuZGVyIEtlcm5lbCAyLjYgdGhlIGN1bSBEZXZpY2UgaXMgT2Jzb2xldGUuIFNvIHVzZSB0dHlNKgorICAgICAgIGRldmljZSBpbnN0ZWFkLgorICAgICAgICEhISEhISEhISEhISEhISEhISEhIE5PVEUgISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhIQorCiAgICAgICAgQm9hcmQ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0yMjIsNzMgKzMzNyw1NSBAQAogCSAgICAgc3RhdGljIGludCBteHNlckJvYXJkQ0FQW10KIAkgICAgID0gezB4MjgwLCAweDE4MCwgMHgwMCwgMHgwMH07CiAKLSAgICAgICAzLiBNb2RpZnkgdHR5X2lvLmMKLQkgICMgY2QgL3Vzci9zcmMvbGludXgvZHJpdmVycy9jaGFyLwotCSAgIyB2aSB0dHlfaW8uYwotCSAgICBGaW5kIHB0eV9pbml0KCksIGluc2VydCAibXhzZXJfaW5pdCgpIiBhcworICAgICAgIDMuNS40IFNldHVwIGtlcm5lbCBjb25maWd1cmF0aW9uCiAKLQkgICAgcHR5X2luaXQoKTsKLQkgICAgbXhzZXJfaW5pdCgpOworICAgICAgICAgIENvbmZpZ3VyZSB0aGUga2VybmVsOgogCi0gICAgICAgNC4gTW9kaWZ5IHR0eS5oCi0JICAjIGNkIC91c3Ivc3JjL2xpbnV4L2luY2x1ZGUvbGludXgKLQkgICMgdmkgdHR5LmgKLQkgICAgRmluZCBleHRlcm4gaW50IHR0eV9pbml0KHZvaWQpLCBpbnNlcnQgIm14c2VyX2luaXQoKSIgYXMKKyAgICAgICAgICAgICMgY2QgL3Vzci9zcmMvbGludXgKKyAgICAgICAgICAgICMgbWFrZSBtZW51Y29uZmlnCiAKLQkgICAgZXh0ZXJuIGludCB0dHlfaW5pdCh2b2lkKTsKLQkgICAgZXh0ZXJuIGludCBteHNlcl9pbml0KHZvaWQpOwotICAgICAKLSAgICAgICA1LiBNb2RpZnkgTWFrZWZpbGUKLQkgICMgY2QgL3Vzci9zcmMvbGludXgvZHJpdmVycy9jaGFyCi0JICAjIHZpIE1ha2VmaWxlCi0JICAgIEZpbmQgTF9PQkpTIDo9IHR0eV9pby5vIC4uLi4uLiByYW5kb20ubywgYWRkCi0JICAgICJteHNlci5vIiBhdCBsYXN0IG9mIHRoaXMgbGluZSBhcwotCSAgICBMX09CSlMgOj0gdHR5X2lvLm8gLi4uLi4uLiBteHNlci5vCisgICAgICAgICAgW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qgc2V0CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CisjIENPTkZJR19NVERfQkxLREVWUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0sgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLX1JPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CitDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUz15CitDT05GSUdfTVREX0NGSV9OT1NXQVA9eQorIyBDT05GSUdfTVREX0NGSV9CRV9CWVRFX1NXQVAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9MRV9CWVRFX1NXQVAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfR0VPTUVUUlk9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzEgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorIyBDT05GSUdfTVREX0NGSV9JMiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX09UUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JTlRFTEVYVD15CisjIENPTkZJR19NVERfQ0ZJX0FNRFNURCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1hJUD15CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorQ09ORklHX01URF9QSFlTTUFQPXkKK0NPTkZJR19NVERfUEhZU01BUF9TVEFSVD0weDAKK0NPTkZJR19NVERfUEhZU01BUF9MRU49MHgwCitDT05GSUdfTVREX1BIWVNNQVBfQkFOS1dJRFRIPTIKKyMgQ09ORklHX01URF9QWEEyWFggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSTV9JTlRFR1JBVE9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TSEFSUF9TTCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfREFUQUZMQVNIIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NMjVQODAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKK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Tb25pY3MgU2lsaWNvbiBCYWNrcGxhbmUKKyMKK0NPTkZJR19TU0JfUE9TU0lCTEU9eQorIyBDT05GSUdfU1NCIGlzIG5vdCBzZXQKKworIworIyBNdWx0aWZ1bmN0aW9uIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NRkRfQ09SRSBpcyBub3Qgc2V0CisjIENPTkZJR19NRkRfU001MDEgaXMgbm90IHNldAorIyBDT05GSUdfTUZEX0FTSUMzIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hUQ19FR1BJTyBpcyBub3Qgc2V0CisjIENPTkZJR19IVENfUEFTSUMzIGlzIG5vdCBzZXQKKyMgQ09ORklHX01GRF9UQzYzOTNYQiBpcyBub3Qgc2V0CitDT05GSUdfRVpYX1BDQVA9eQorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgY29yZSBzdXBwb3J0CisjCitDT05GSUdfVklERU9fREVWPW0KK0NPTkZJR19WSURFT19WNEwyX0NPTU1PTj1tCitDT05GSUdfVklERU9fQUxMT1dfVjRMMT15CitDT05GSUdfVklERU9fVjRMMV9DT01QQVQ9eQorIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAorQ09ORklHX1ZJREVPX01FRElBPW0KKworIworIyBNdWx0aW1lZGlhIGRyaXZlcnMKKyMKKyMgQ09ORklHX01FRElBX0FUVEFDSCBpcyBub3Qgc2V0CitDT05GSUdfTUVESUFfVFVORVI9bQorIyBDT05GSUdfTUVESUFfVFVORVJfQ1VTVE9NSVpFIGlzIG5vdCBzZXQKK0NPTkZJR19NRURJQV9UVU5FUl9TSU1QTEU9bQorQ09ORklHX01FRElBX1RVTkVSX1REQTgyOTA9bQorQ09ORklHX01FRElBX1RVTkVSX1REQTk4ODc9bQorQ09ORklHX01FRElBX1RVTkVSX1RFQTU3NjE9bQorQ09ORklHX01FRElBX1RVTkVSX1RFQTU3Njc9bQorQ09ORklHX01FRElBX1RVTkVSX01UMjBYWD1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cyBub3Qgc2V0CisjIENPTkZJR19VU0JfR0FER0VUX05FVDIyODAgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9QWEEyNVggaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9NNjY1OTIgaXMgbm90IHNldAorQ09ORklHX1VTQl9HQURHRVRfUFhBMjdYPXkKK0NPTkZJR19VU0JfUFhBMjdYPXkKKyMgQ09ORklHX1VTQl9HQURHRVRfR09LVSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR0FER0VUX0xIN0E0MFggaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9PTUFQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9HQURHRVRfUzNDMjQxMCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR0FER0VUX0FUOTEgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9EVU1NWV9IQ0QgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0dBREdFVF9EVUFMU1BFRUQgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX1pFUk8gaXMgbm90IHNldAorQ09ORklHX1VTQl9FVEg9eQorIyBDT05GSUdfVVNCX0VUSF9STkRJUyBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR0FER0VURlMgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0ZJTEVfU1RPUkFHRSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfR19TRVJJQUwgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX01JRElfR0FER0VUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9HX1BSSU5URVIgaXMgbm90IHNldAorQ09ORklHX01NQz15CisjIENPTkZJR19NTUNfREVCVUcgaXMgbm90IHNldAorQ09ORklHX01NQ19VTlNBRkVfUkVTVU1FPXkKKworIworIyBNTUMvU0QgQ2FyZCBEcml2ZXJzCisjCitDT05GSUdfTU1DX0JMT0NLPXkKK0NPTkZJR19NTUNfQkxPQ0tfQk9VTkNFPXkKK0NPTkZJR19TRElPX1VBUlQ9eQorCisjCisjIE1NQy9TRCBIb3N0IENvbnRyb2xsZXIgRHJpdmVycworIworQ09ORklHX01NQ19QWEE9eQorIyBDT05GSUdfTU1DX1NQSSBpcyBub3Qgc2V0CitDT05GSUdfTkVXX0xFRFM9eQorQ09ORklHX0xFRFNfQ0xBU1M9eQorCisjCisjIExFRCBkcml2ZXJzCisjCisjIENPTkZJR19MRURTX0dQSU8gaXMgbm90IHNldAorCisjCisjIExFRCBUcmlnZ2VycworIworQ09ORklHX0xFRFNfVFJJR0dFUlM9eQorQ09ORklHX0xFRFNfVFJJR0dFUl9USU1FUj15CitDT05GSUdfTEVEU19UUklHR0VSX0hFQVJUQkVBVD15CisjIENPTkZJR19MRURTX1RSSUdHRVJfREVGQVVMVF9PTiBpcyBub3Qgc2V0CitDT05GSUdfUlRDX0xJQj15CitDT05GSUdfUlRDX0NMQVNTPXkKK0NPTkZJR19SVENfSENUT1NZUz15CitDT05GSUdfUlRDX0hDVE9TWVNfREVWSUNFPSJydGMwIgorIyBDT05GSUdfUlRDX0RFQlVHIGlzIG5vdCBzZXQKKworIworIyBSVEMgaW50ZXJmYWNlcworIworQ09ORklHX1JUQ19JTlRGX1NZU0ZTPXkKK0NPTkZJR19SVENfSU5URl9QUk9DPXkKK0NPTkZJR19SVENfSU5URl9ERVY9eQorIyBDT05GSUdfUlRDX0lOVEZfREVWX1VJRV9FTVVMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JUQ19EUlZfVEVTVCBpcyBub3Qgc2V0CisKKyMKKyMgSTJDIFJUQyBkcml2ZXJzCisjCisjIENPTkZJR19SVENfRFJWX0RTMTMwNyBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfRFJWX0RTMTM3NCBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfRFJWX0RTMTY3MiBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfRFJWX01BWDY5MDAgaXMgbm90IHNld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ZJR19DSUZTX1BPU0lYPXkKKyMgQ09ORklHX0NJRlNfREVCVUcyIGlzIG5vdCBzZXQKKyMgQ09ORklHX0NJRlNfRVhQRVJJTUVOVEFMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05DUF9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19DT0RBX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FGU19GUyBpcyBub3Qgc2V0CisKKyMKKyMgUGFydGl0aW9uIFR5cGVzCisjCisjIENPTkZJR19QQVJUSVRJT05fQURWQU5DRUQgaXMgbm90IHNldAorQ09ORklHX01TRE9TX1BBUlRJVElPTj15CitDT05GSUdfTkxTPXkKK0NPTkZJR19OTFNfREVGQVVMVD0iaXNvODg1OS0xIgorQ09ORklHX05MU19DT0RFUEFHRV80Mzc9bQorQ09ORklHX05MU19DT0RFUEFHRV83Mzc9bQorQ09ORklHX05MU19DT0RFUEFHRV83NzU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTA9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTI9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTc9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjA9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjE9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjI9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjM9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjQ9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjY9bQorQ09ORklHX05MU19DT0RFUEFHRV84Njk9bQorQ09ORklHX05MU19DT0RFUEFHRV85MzY9bQorQ09ORklHX05MU19DT0RFUEFHRV85NTA9bQorQ09ORklHX05MU19DT0RFUEFHRV85MzI9bQorQ09ORklHX05MU19DT0RFUEFHRV85NDk9bQorQ09ORklHX05MU19DT0RFUEFHRV84NzQ9bQorQ09ORklHX05MU19J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yBlODAwX2xjZF9yZWdzID0geworCS5sY2RfZm9ybWF0ID0gICAgICAgICAgICAweDAwMDA4MDAzLAorCS5sY2RkX2NudGwxID0gICAgICAgICAgICAweDAyYTAwMDAwLAorCS5sY2RkX2NudGwyID0gICAgICAgICAgICAweDAwMDNmZmZmLAorCS5nZW5sY2RfY250bDEgPSAgICAgICAgICAweDAwMGZmMmEzLAorCS5nZW5sY2RfY250bDIgPSAgICAgICAgICAweDAwMDAwMmEzLAorCS5nZW5sY2RfY250bDMgPSAgICAgICAgICAweDAwMDEwMmFhLAorfTsKKworc3RhdGljIHN0cnVjdCB3MTAwX21vZGUgZTgwMF9sY2RfbW9kZVsyXSA9IHsKKwlbMF0gPSB7CisJCS54cmVzICAgICAgICAgICAgPSA0ODAsCisJCS55cmVzICAgICAgICAgICAgPSA2NDAsCisJCS5sZWZ0X21hcmdpbiAgICAgPSA1MiwKKwkJLnJpZ2h0X21hcmdpbiAgICA9IDE0OCwKKwkJLnVwcGVyX21hcmdpbiAgICA9IDIsCisJCS5sb3dlcl9tYXJnaW4gICAgPSA2LAorCQkuY3J0Y19zcyAgICAgICAgID0gMHg4MDM1MDAzNCwKKwkJLmNydGNfbHMgICAgICAgICA9IDB4ODAyYjAwMjYsCisJCS5jcnRjX2dzICAgICAgICAgPSAweDgwMTYwMDE2LAorCQkuY3J0Y192cG9zX2dzICAgID0gMHgwMDAyMDAwMywKKwkJLmNydGNfcmV2ICAgICAgICA9IDB4MDA0MDAwMWQsCisJCS5jcnRjX2RjbGsgICAgICAgPSAweGUwMDAwMDAwLAorCQkuY3J0Y19nY2xrICAgICAgID0gMHg4MmE1MDA0OSwKKwkJLmNydGNfZ29lICAgICAgICA9IDB4ODBlZTAwMWMsCisJCS5jcnRjX3BzMV9hY3RpdmUgPSAweDAwMDAwMDAwLAorCQkucGxsX2ZyZXEgICAgICAgID0gMTI4LAorCQkucGl4Y2xrX2RpdmlkZXIgICAgICAgICA9IDQsCisJCS5waXhjbGtfZGl2aWRlc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kZSA8YXNtL2FyY2gvcHhhMjd4X2tleXBhZC5oPgorI2luY2x1ZGUgPGFzbS9hcmNoL3VkYy5oPgorCisjaW5jbHVkZSAiZ2VuZXJpYy5oIgorI2luY2x1ZGUgImRldmljZXMuaCIKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUGluIGNvbmZpZ3VyYXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdW5zaWduZWQgbG9uZyBwYWxtdHhfcGluX2NvbmZpZ1tdIF9faW5pdGRhdGEgPSB7CisJLyogTU1DICovCisJR1BJTzMyX01NQ19DTEssCisJR1BJTzkyX01NQ19EQVRfMCwKKwlHUElPMTA5X01NQ19EQVRfMSwKKwlHUElPMTEwX01NQ19EQVRfMiwKKwlHUElPMTExX01NQ19EQVRfMywKKwlHUElPMTEyX01NQ19DTUQsCisKKwkvKiBBQzk3ICovCisJR1BJTzI4X0FDOTdfQklUQ0xLLAorCUdQSU8yOV9BQzk3X1NEQVRBX0lOXzAsCisJR1BJTzMwX0FDOTdfU0RBVEFfT1VULAorCUdQSU8zMV9BQzk3X1NZTkMsCisKKwkvKiBJckRBICovCisJR1BJTzQ2X0ZJQ1BfUlhELAorCUdQSU80N19GSUNQX1RYRCwKKworCS8qIFBXTSAqLworCUdQSU8xNl9QV00wX09VVCwKKworCS8qIFVTQiAqLworCUdQSU8xM19HUElPLAorCisJLyogUENNQ0lBICovCisJR1BJTzQ4X25QT0UsCisJR1BJTzQ5X25QV0UsCisJR1BJTzUwX25QSU9SLAorCUdQSU81MV9uUElPVywKKwlHUElPODVfblBDRV8xLAorCUdQSU81NF9uUENFXzIsCisJR1BJTzc5X1BTS1RTRUwsCisJR1BJTzU1X25QUkVHLAorCUdQSU81Nl9uUFdBSVQsCisJR1BJTzU3X25JT0lTMTYsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTRC9NTUMgY2FyZCBjb250cm9sbGVyCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBwYWxtdHhfbWNpX2luaXQoc3RydWN0IGRldmljZSAqZGV2LCBpcnFfaGFuZGxlcl90IHBhbG10eF9kZXRlY3RfaW50LAorCQkJCXZvaWQgKmRhdGEpCit7CisJaW50IGVyciA9IDA7CisKKwkvKiBTZXR1cCBhbiBpbnRlcnJ1cHQgZm9yIGRldGVjdGluZyBjYXJkIGluc2VydC9yZW1vdmUgZXZlbnRzICovCisJZXJyID0gcmVxdWVzdF9pcnEoSVJRX0dQSU9fUEFMTVRYX1NEX0RFVEVDVF9OLCBwYWxtdHhfZGV0ZWN0X2ludCwKKwkJCUlSUUZfRElTQUJMRUQgfCBJUlFGX1NBTVBMRV9SQU5ET00gfAorCQkJSVJRRl9UUklHR0VSX0ZBTExJTkcgfCBJUlFGX1RSSUdHRVJfUklTSU5HLAorCQkJIlNEL01NQyBjYXJkIGRldGVjdCIsIGRhdGEpOworCWlmIChlcnIpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICIlczogY2Fubm90IHJlcXVlc3QgU0QvTU1DIGNhcmQgZGV0ZWN0IElSUVxuIiwKKwkJCQlfX2Z1bmNfXyk7CisJCXJldHVybiBlcnI7CisJfQorCisJZXJyID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfUEFMTVRYX1NEX1BPV0VSLCAiU0RfUE9XRVIiKTsKKwlpZiAoZXJyKQorCQlnb3RvIHB3cl9lcnI7CisKKwllcnIgPSBncGlvX3JlcXVlc3QoR1BJT19OUl9QQUxNVFhfU0RfUkVBRE9OTFksICJTRF9SRUFET05MWSIp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RERfMzJfMzMgfCBNTUNfVkREXzMzXzM0LAorCS5zZXRwb3dlcgk9IHBhbG10eF9tY2lfcG93ZXIsCisJLmdldF9ybwkJPSBwYWxtdHhfbWNpX2dldF9ybywKKwkuaW5pdCAJCT0gcGFsbXR4X21jaV9pbml0LAorCS5leGl0CQk9IHBhbG10eF9tY2lfZXhpdCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEdQSU8ga2V5Ym9hcmQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdW5zaWduZWQgaW50IHBhbG10eF9tYXRyaXhfa2V5c1tdID0geworCUtFWSgwLCAwLCBLRVlfUE9XRVIpLAorCUtFWSgwLCAxLCBLRVlfRjEpLAorCUtFWSgwLCAyLCBLRVlfRU5URVIpLAorCisJS0VZKDEsIDAsIEtFWV9GMiksCisJS0VZKDEsIDEsIEtFWV9GMyksCisJS0VZKDEsIDIsIEtFWV9GNCksCisKKwlLRVkoMiwgMCwgS0VZX1VQKSwKKwlLRVkoMiwgMiwgS0VZX0RPV04pLAorCisJS0VZKDMsIDAsIEtFWV9SSUdIVCksCisJS0VZKDMsIDIsIEtFWV9MRUZUKSwKKworfTsKKworc3RhdGljIHN0cnVjdCBweGEyN3hfa2V5cGFkX3BsYXRmb3JtX2RhdGEgcGFsbXR4X2tleXBhZF9wbGF0Zm9ybV9kYXRhID0geworCS5tYXRyaXhfa2V5X3Jvd3MJPSA0LAorCS5tYXRyaXhfa2V5X2NvbHMJPSAzLAorCS5tYXRyaXhfa2V5X21hcAkJPSBwYWxtdHhfbWF0cml4X2tleXMsCisJLm1hdHJpeF9rZXlfbWFwX3NpemUJPSBBUlJBWV9TSVpFKHBhbG10eF9tYXRyaXhfa2V5cyksCisKKwkuZGVib3VuY2VfaW50ZXJ2YWwJPSAzMCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEdQSU8ga2V5cworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgZ3Bpb19rZXlzX2J1dHRvbiBwYWxtdHhfcHhhX2J1dHRvbnNbXSA9IHsKKwl7S0VZX0Y4LCBHUElPX05SX1BBTE1UWF9IT1RTWU5DX0JVVFRPTl9OLCAxLCAiSG90U3luYyBCdXR0b24iIH0sCit9OworCitzdGF0aWMgc3RydWN0IGdwaW9fa2V5c19wbGF0Zm9ybV9kYXRhIHBhbG10eF9weGFfa2V5c19kYXRhID0geworCS5idXR0b25zCT0gcGFsbXR4X3B4YV9idXR0b25zLAorCS5uYnV0dG9ucwk9IEFSUkFZX1NJWkUocGFsbXR4X3B4YV9idXR0b25zKSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIHBhbG10eF9weGFfa2V5cyA9IHsKKwkubmFtZQk9ICJncGlvLWtleXMiLAorCS5pZAk9IC0xLAorCS5kZXYJPSB7CisJCS5wbGF0Zm9ybV9kYXRhID0gJnBhbG10eF9weGFfa2V5c19kYXRhLAorCX0sCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBCYWNrbGlnaHQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHBhbG10eF9iYWNrbGlnaHRfaW5pdChzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisJaW50IHJldDsKKworCXJldCA9IGdw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9pbml0LAorCS5ub3RpZnkJCT0gcGFsbXR4X2JhY2tsaWdodF9ub3RpZnksCisJLmV4aXQJCT0gcGFsbXR4X2JhY2tsaWdodF9leGl0LAorfTsKKworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgcGFsbXR4X2JhY2tsaWdodCA9IHsKKwkubmFtZQk9ICJwd20tYmFja2xpZ2h0IiwKKwkuZGV2CT0geworCQkucGFyZW50CQk9ICZweGEyN3hfZGV2aWNlX3B3bTAuZGV2LAorCQkucGxhdGZvcm1fZGF0YQk9ICZwYWxtdHhfYmFja2xpZ2h0X2RhdGEsCisJfSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIElyREEKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBwYWxtdHhfaXJkYV90cmFuc2NlaXZlcl9tb2RlKHN0cnVjdCBkZXZpY2UgKmRldiwgaW50IG1vZGUpCit7CisJZ3Bpb19zZXRfdmFsdWUoR1BJT19OUl9QQUxNVFhfSVJfRElTQUJMRSwgbW9kZSAmIElSX09GRik7CisJcHhhMnh4X3RyYW5zY2VpdmVyX21vZGUoZGV2LCBtb2RlKTsKK30KKworc3RhdGljIHN0cnVjdCBweGFmaWNwX3BsYXRmb3JtX2RhdGEgcGFsbXR4X2ZpY3BfcGxhdGZvcm1fZGF0YSA9IHsKKwkudHJhbnNjZWl2ZXJfY2FwCT0gSVJfU0lSTU9ERSB8IElSX0ZJUk1PREUgfCBJUl9PRkYsCisJLnRyYW5zY2VpdmVyX21vZGUJPSBwYWxtdHhfaXJkYV90cmFuc2NlaXZlcl9tb2RlLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVURDCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgcGFsbXR4X3VkY19jb21tYW5kKGludCBjbWQpCit7CisJZ3Bpb19zZXRfdmFsdWUoR1BJT19OUl9QQUxNVFhfVVNCX1BPV0VSLCAhY21kKTsKKwl1ZGVsYXkoNTApOworCWdwaW9fc2V0X3ZhbHVlKEdQSU9fTlJfUEFMTVRYX1VTQl9QVUxMVVAsICFjbWQpOworfQorCitzdGF0aWMgc3RydWN0IHB4YTJ4eF91ZGNfbWFjaF9pbmZvIHBhbG10eF91ZGNfaW5mbyBfX2luaXRkYXRhID0geworCS5ncGlvX3ZidXMJCT0gR1BJT19OUl9QQUxNVFhfVVNCX0RFVEVDVF9OLAorCS5ncGlvX3ZidXNfaW52ZXJ0ZWQJPSAxLAorCS51ZGNfY29tbWFuZAkJPSBwYWxtdHhfdWRjX2NvbW1hbmQsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQb3dlciBzdXBwbHkKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHBvd2VyX3N1cHBseV9pbml0KHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfUEFMTVRYX1BPV0VSX0RFVEVDVCwgIkNBQkxFX1NUQVRFX0FDIik7CisJaWYgKHJldCkKKwkJZ290byBlcnJfY3NfYWM7CisKKwlyZXQgPSBncGlvX3JlcXVlc3QoR1BJT19OUl9QQUxNVFhfVVNCX0RFVEVDVF9OLCAiQ0FCTEVfU1RBVEVf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JSQVlfU0laRShwYWxtdHhfc3VwcGxpY2FudHMpLAorfTsKKworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgcG93ZXJfc3VwcGx5ID0geworCS5uYW1lID0gInBkYS1wb3dlciIsCisJLmlkICAgPSAtMSwKKwkuZGV2ICA9IHsKKwkJLnBsYXRmb3JtX2RhdGEgPSAmcG93ZXJfc3VwcGx5X2luZm8sCisJfSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEZyYW1lYnVmZmVyCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBweGFmYl9tb2RlX2luZm8gcGFsbXR4X2xjZF9tb2Rlc1tdID0geworeworCS5waXhjbG9jawk9IDU3NjkyLAorCS54cmVzCQk9IDMyMCwKKwkueXJlcwkJPSA0ODAsCisJLmJwcAkJPSAxNiwKKworCS5sZWZ0X21hcmdpbgk9IDMyLAorCS5yaWdodF9tYXJnaW4JPSAxLAorCS51cHBlcl9tYXJnaW4JPSA3LAorCS5sb3dlcl9tYXJnaW4JPSAxLAorCisJLmhzeW5jX2xlbgk9IDQsCisJLnZzeW5jX2xlbgk9IDEsCit9LAorfTsKKworc3RhdGljIHN0cnVjdCBweGFmYl9tYWNoX2luZm8gcGFsbXR4X2xjZF9zY3JlZW4gPSB7CisJLm1vZGVzCQk9IHBhbG10eF9sY2RfbW9kZXMsCisJLm51bV9tb2Rlcwk9IEFSUkFZX1NJWkUocGFsbXR4X2xjZF9tb2RlcyksCisJLmxjZF9jb25uCT0gTENEX0NPTE9SX1RGVF8xNkJQUCB8IExDRF9QQ0xLX0VER0VfRkFMTCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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DJjMCksCisJTUZQX0FERFIoR1BJTzUyLCAweDAyYzQpLAorCU1GUF9BRERSKEdQSU81MywgMHgwMmQwKSwKKwlNRlBfQUREUihHUElPNTQsIDB4MDJjYyksCisJTUZQX0FERFIoR1BJTzU1LCAweDAyOWMpLAorCU1GUF9BRERSKEdQSU81NiwgMHgwMmEwKSwKKwlNRlBfQUREUihHUElPNTcsIDB4MDI5NCksCisJTUZQX0FERFIoR1BJTzU4LCAweDAyOTgpLAorCU1GUF9BRERSKEdQSU81OSwgMHgwMmE0KSwKKwlNRlBfQUREUihHUElPNjAsIDB4MDJhOCksCisJTUZQX0FERFIoR1BJTzYxLCAweDAyYjApLAorCU1GUF9BRERSKEdQSU82MiwgMHgwMmFjKSwKKwlNRlBfQUREUihHUElPNjMsIDB4MDY0MCksCisJTUZQX0FERFIoR1BJTzY0LCAweDA2NWMpLAorCU1GUF9BRERSKEdQSU82NSwgMHgwNjQ4KSwKKwlNRlBfQUREUihHUElPNjYsIDB4MDY0NCksCisJTUZQX0FERFIoR1BJTzY3LCAweDA2NzQpLAorCU1GUF9BRERSKEdQSU82OCwgMHgwNjU4KSwKKwlNRlBfQUREUihHUElPNjksIDB4MDY1NCksCisJTUZQX0FERFIoR1BJTzcwLCAweDA2NjApLAorCU1GUF9BRERSKEdQSU83MSwgMHgwNjY4KSwKKwlNRlBfQUREUihHUElPNzIsIDB4MDY2NCksCisJTUZQX0FERFIoR1BJTzczLCAweDA2NTApLAorCU1GUF9BRERSKEdQSU83NCwgMHgwNjZjKSwKKwlNRlBfQUREUihHUElPNzUsIDB4MDY0YyksCisJTUZQX0FERFIoR1BJTzc2LCAweDA2NzApLAorCU1GUF9BRERSKEdQSU83NywgMHgwNjc4KSwKKwlNRlBfQUREUihHUElPNzgsIDB4MDY3YyksCisJTUZQX0FERFIoR1BJTzc5LCAweDA2OTQpLAorCU1GUF9BRERSKEdQSU84MCwgMHgwNjljKSwKKwlNRlBfQUREUihHUElPODEsIDB4MDZhMCksCisJTUZQX0FERFIoR1BJTzgyLCAweDA2YTQpLAorCU1GUF9BRERSKEdQSU84MywgMHgwNjk4KSwKKwlNRlBfQUREUihHUElPODQsIDB4MDZiYyksCisJTUZQX0FERFIoR1BJTzg1LCAweDA2YjQpLAorCU1GUF9BRERSKEdQSU84NiwgMHgwNmIwKSwKKwlNRlBfQUREUihHUElPODcsIDB4MDZjMCksCisJTUZQX0FERFIoR1BJTzg4LCAweDA2YzQpLAorCU1GUF9BRERSKEdQSU84OSwgMHgwNmFjKSwKKwlNRlBfQUREUihHUElPOTAsIDB4MDY4MCksCisJTUZQX0FERFIoR1BJTzkxLCAweDA2ODQpLAorCU1GUF9BRERSKEdQSU85MiwgMHgwNjg4KSwKKwlNRlBfQUREUihHUElPOTMsIDB4MDY5MCksCisJTUZQX0FERFIoR1BJTzk0LCAweDA2OGMpLAorCU1GUF9BRERSKEdQSU85NSwgMHgwNmE4KSwKKwlNRlBfQUREUihHUElPOTYsIDB4MDZiOCksCisJTUZQX0FERFIoR1BJTzk3LCAweDA0MTApLAorCU1GUF9BRERSKEdQSU85OCwgMHgwNDE4KSwKKwlNRlBfQUREUihHUElPOTksIDB4MDQxYyksCisJTUZQX0FERFIoR1BJTzEwMCwgMHgwNDE0KSwKKwlNRlBfQUREUihHUElPMTAxLCAweDA0MDgpLAorCU1GUF9BRERSKEdQSU8xMDIsIDB4MDMyNCksCisJTUZQX0FERFIoR1BJTzEwMywgMHgwNDBjKSwKKwlNRlBfQUREUihHUElPMTA0LCAweDA0MDApLAorCU1GUF9BRERSKEdQSU8xMDUsIDB4MDMyOCksCisJTUZQX0FERFIoR1BJTzEwNiwgMHgwNDA0KSwKKworCU1GUF9BRERSKG5YQ1ZSRU4sIDB4MDIwNCksCisJTUZQX0FERFIoREZfQ0xFX25PRSwgMHgwMjBjKSwKKwlNRlBfQUREUihERl9uQURWMV9BTEUsIDB4MDIxOCksCisJTUZQX0FERFIoREZfU0NMS19FLCAweDAyMTQpLAorCU1GUF9BRERSKERGX1NDTEtfUywgMHgwMjEwKSwKKwlNRlBfQUREUihuQkUwLCAweDAyMWMpLAorCU1GUF9BRERSKG5CRTEsIDB4MDIyMCksCisJTUZQX0FERFIoREZfbkFEVjJfQUxFLCAweDAyMjQpLAorCU1GUF9BRERSKERGX0lOVF9SbkIsIDB4MDIyOCksCisJTUZQX0FERFIoREZfbkNTMCwgMHgwMjJjKSwKKwlNRlBfQUREUihERl9uQ1MxLCAweDAyMzApLAorCU1GUF9BRERSKG5MVUEsIDB4MDI1NCksCisJTUZQX0FERFIobkxMQSwgMHgwMjU4KSwKKwlNRlBfQUREUihERl9uV0UsIDB4MDIzNCksCisJTUZQX0FERFIoREZfblJFX25PRSwgMHgwMjM4KSwKKwlNRlBfQUREUihERl9BRERSMCwgMHgwMjRjKSwKKwlNRlBfQUREUihERl9BRERSMSwgMHgwMjUwKSwKKwlNRlBfQUREUihERl9BRERSMiwgMHgwMjVjKSwKKwlNRlBfQUREUihERl9BRERSMywgMHgwMjYwKSwKKwlNRlBfQUREUihERl9JTzAsIDB4MDIzYyksCisJTUZQX0FERFIoREZfSU8xLCAweDAyNDApLAorCU1GUF9BRERSKERGX0lPMiwgMHgwMjQ0KSwKKwlNRlBfQUREUihERl9JTzMsIDB4MDI0OCksCisJTUZQX0FERFIoREZfSU80LCAweDAyNjQpLAorCU1GUF9BRERSKERGX0lPNSwgMHgwMjY4KSwKKwlNRlBfQUREUihERl9JTzYsIDB4MDI2YyksCisJTUZQX0FERFIoREZfSU83LCAweDAyNzApLAorCU1GUF9BRERSKERGX0lPOCwgMHgwMjc0KSwKKwlNRlBfQUREUihERl9JTzksIDB4MDI3OCksCisJTUZQX0FERFIoREZfSU8xMCwgMHgwMjdjKSwKKwlNRlBfQUREUihERl9JTzExLCAweDAyODApLAorCU1GUF9BRERSKERGX0lPMTIsIDB4MDI4NCksCisJTUZQX0FERFIoREZfSU8xMywgMHgwMjg4KSwKKwlNRlBfQUREUihERl9JTzE0LCAweDAyOGMpLAorCU1GUF9BRER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orIyBDT05GSUdfS1M5NTlfRE9OR0xFIGlzIG5vdCBzZXQKKworIworIyBPbGQgU0lSIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19JUlBPUlRfU0lSIGlzIG5vdCBzZXQKKworIworIyBPbGQgU2VyaWFsIGRvbmdsZSBzdXBwb3J0CisjCisKKyMKKyMgRklSIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19VU0JfSVJEQSBpcyBub3Qgc2V0CisjIENPTkZJR19TSUdNQVRFTF9GSVIgaXMgbm90IHNldAorIyBDT05GSUdfTUNTX0ZJUiBpcyBub3Qgc2V0CiAjIENPTkZJR19CVCBpcyBub3Qgc2V0CiAjIENPTkZJR19BRl9SWFJQQyBpcyBub3Qgc2V0CiAKQEAgLTU3NSw2ICs2MjgsNyBAQAogQ09ORklHX01URF9OQU5EX0lEUz15CiBDT05GSUdfTVREX05BTkRfQkY1WFg9eQogQ09ORklHX01URF9OQU5EX0JGNVhYX0hXRUNDPXkKKyMgQ09ORklHX01URF9OQU5EX0JGNVhYX0JPT1RST01fRUNDIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9OQU5EX0RJU0tPTkNISVAgaXMgbm90IHNldAogIyBDT05GSUdfTVREX05BTkRfTkFORFNJTSBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfTkFORF9QTEFURk9STSBpcyBub3Qgc2V0CkBAIC03NjYsNyArODIwLDcgQEAKICMgQ09ORklHX0JGSU5fU1BPUlQgaXMgbm90IHNldAogIyBDT05GSUdfQkZJTl9USU1FUl9MQVRFTkNZIGlzIG5vdCBzZXQKICMgQ09ORklHX1RXSV9MQ0QgaXMgbm90IHNldAotIyBDT05GSUdfU0lNUExFX0dQSU8gaXMgbm90IHNldAorQ09ORklHX1NJTVBMRV9HUElPPW0KIENPTkZJR19WVD15CiBDT05GSUdfVlRfQ09OU09MRT15CiBDT05GSUdfSFdfQ09OU09MRT15CkBAIC0xMDcxLDYgKzExMjUsNyBAQAogQ09ORklHX1NORF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QgaXMgbm90IHNldAorIyBDT05GSUdfQUZfUlhSUEMgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzCisjCisjIENPTkZJR19DRkc4MDIxMSBpcyBub3Qgc2V0CisjIENPTkZJR19XSVJFTEVTU19FWFQgaXMgbm90IHNldAorIyBDT05GSUdfTUFDODAyMTEgaXMgbm90IHNldAorIyBDT05GSUdfSUVFRTgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGS0lMTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfOVAgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1VFVkVOVF9IRUxQRVJfUEFUSD0iL3NiaW4vaG90cGx1ZyIKK0NPTkZJR19TVEFOREFMT05FPXkKK0NPTkZJR19QUkVWRU5UX0ZJUk1XQVJFX0JVSUxEPXkKKyMgQ09ORklHX0ZXX0xPQURFUiBpcyBub3Qgc2V0CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NNRExJTkVfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9bQorQ09ORklHX01URF9CTEtERVZTPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT09QUyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9DRkkgaXMgbm90IHNldAorQ09ORklHX01URF9KRURFQ1BST0JFPW0KK0NPTkZJR19NVERfR0VOX1BST0JFPW0KKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0FNRFNURCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9SQU09eQorQ09ORklHX01URF9ST009bQorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTPXkKKyMgQ09ORklHX01URF9QSFlTTUFQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9VQ0xJTlVYIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9EQVRBRkxBU0ggaXMgbm90IHNldAorIyBDT05GSUdfTVREX00yNVA4MCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVREX1VCSSBpcyBub3Qgc2V0CisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWPXkKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9VQiBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9SQU09eQorQ09ORklHX0JMS19ERVZfUkFNX0NPVU5UPTE2CitDT05GSUdfQkxLX0RFVl9SQU1fU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iBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfOTUwIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19DT0RFUEFHRV85MzIgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzk0OSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfODc0IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzggaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTAgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0FTQ0lJIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8zIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV82IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzcgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19LT0k4X1UgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX1VURjggaXMgbm90IHNldAorIyBDT05GSUdfRExNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lOU1RSVU1FTlRBVElPTiBpcyBub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iBFQklVX0ZDVEwKKwlQTV9TWVNfUFVTSChFQklVX01CU0NUTCkKKwlQTV9TWVNfUFVTSChFQklVX01PREUpCisJUE1fU1lTX1BVU0goRUJJVV9GQ1RMKQorI2VuZGlmCisKKwlQTV9TWVNfUFVTSDE2KFNZU0NSKQorCisJLyogU2F2ZSBDb3JlIE1NUnMgKi8KKwlQMC5IID0gaGkoU1JBTV9CQVNFX0FERFJFU1MpOworCVAwLkwgPSBsbyhTUkFNX0JBU0VfQUREUkVTUyk7CisKKwlQTV9QVVNIKERNRU1fQ09OVFJPTCkKKwlQTV9QVVNIKERDUExCX0FERFIwKQorCVBNX1BVU0goRENQTEJfQUREUjEpCisJUE1fUFVTSChEQ1BMQl9BRERSMikKKwlQTV9QVVNIKERDUExCX0FERFIzKQorCVBNX1BVU0goRENQTEJfQUREUjQpCisJUE1fUFVTSChEQ1BMQl9BRERSNSkKKwlQTV9QVVNIKERDUExCX0FERFI2KQorCVBNX1BVU0goRENQTEJfQUREUjcpCisJUE1fUFVTSChEQ1BMQl9BRERSOCkKKwlQTV9QVVNIKERDUExCX0FERFI5KQorCVBNX1BVU0goRENQTEJfQUREUjEwKQorCVBNX1BVU0goRENQTEJfQUREUjExKQorCVBNX1BVU0goRENQTEJfQUREUjEyKQorCVBNX1BVU0goRENQTEJfQUREUjEzKQorCVBNX1BVU0goRENQTEJfQUREUjE0KQorCVBNX1BVU0goRENQTEJfQUREUjE1KQorCVBNX1BVU0goRENQTEJfREFUQTApCisJUE1fUFVTSChEQ1BMQl9EQVRBMSkKKwlQTV9QVVNIKERDUExCX0RBVEEyKQorCVBNX1BVU0goRENQTEJfREFUQTMpCisJUE1fUFVTSChEQ1BMQl9EQVRBNCkKKwlQTV9QVVNIKERDUExCX0RBVEE1KQorCVBNX1BVU0goRENQTEJfREFUQTYpCisJUE1fUFVTSChEQ1BMQl9EQVRBNykKKwlQTV9QVVNIKERDUExCX0RBVEE4KQorCVBNX1BVU0goRENQTEJfREFUQTkpCisJUE1f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bc3ArK107CisJUkVUTiA9IFtzcCsrXTsKKwlSRVRYID0gW3NwKytdOworCXIwID0gW3NwKytdOworCVJFVEkgPSByMDsKKwlSRVRTID0gW3NwKytdOworCisJQ1lDTEVTMiA9IFtzcCsrXTsKKwlDWUNMRVMgPSBbc3ArK107CisJQVNUQVQgPSBbc3ArK107CisKKwlMQjEgPSBbc3ArK107CisJTEIwID0gW3NwKytdOworCUxUMSA9IFtzcCsrXTsKKwlMVDAgPSBbc3ArK107CisJTEMxID0gW3NwKytdOworCUxDMCA9IFtzcCsrXTsKKworCWExLncgPSBbc3ArK107CisJYTEueCA9IFtzcCsrXTsKKwlhMC53ID0gW3NwKytdOworCWEwLnggPSBbc3ArK107CisJYjMgPSBbc3ArK107CisJYjIgPSBbc3ArK107CisJYjEgPSBbc3ArK107CisJYjAgPSBbc3ArK107CisKKwlsMyA9IFtzcCsrXTsKKwlsMiA9IFtzcCsrXTsKKwlsMSA9IFtzcCsrXTsKKwlsMCA9IFtzcCsrXTsKKworCW0zID0gW3NwKytdOworCW0yID0gW3NwKytdOworCW0xID0gW3NwKytdOworCW0wID0gW3NwKytdOworCisJaTMgPSBbc3ArK107CisJaTIgPSBbc3ArK107CisJaTEgPSBbc3ArK107CisJaTAgPSBbc3ArK107CisKKwl1c3AgPSBbc3ArK107CisJZnAgPSBbc3ArK107CisKKwkoIFI3IDogMCwgUDUgOiAwKSA9IFsgU1AgKysgXTsKKwlTWVNDRkcgPSBbc3ArK107CisKKwkvKiBSZXN0b3JlIENvcmUgTU1ScyAqLworCisJUE1fUE9QKFRCVUZDVEwpCisJUE1fUE9QKFRDT1VOVCkKKwlQTV9QT1AoVFNDQUxFKQorCVBNX1BPUChUUEVSSU9EKQorCVBNX1BPUChUQ05UTCkKKwlQTV9QT1AoSVBSSU8pCisJUE1fUE9QKElMQVQpCisJUE1fUE9QKElNQVNLKQorCVBNX1BPUChFVlQxNSkKKwlQTV9QT1AoRVZUMTQpCisJUE1fUE9QKEVWVDEzKQorCV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qgc2V0CisjIENPTkZJR19NQUM4MDIxMSBpcyBub3Qgc2V0CisjIENPTkZJR19JRUVFODAyMTEgaXMgbm90IHNldAorIyBDT05GSUdfUkZLSUxMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF85UCBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NNRExJTkVfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSN19QQVJUUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMS0RFVlM9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CitDT05GSUdfTVREX1JBTT15CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFlTTUFQIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfVUNMSU5VWD15CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVREX1VCSSBpcyBub3Qgc2V0CisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWPXkKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9NDA5NgorIyBDT05GSUdfQkxLX0RFVl9YSVAgaXMgbm90IHNldAorIyBDT05GSUdfQ0RST01fUEtUQ0RWRCBpcyBub3Qgc2V0CisjIENPTkZJR19BVEFfT1ZFUl9FVEggaXMgbm90IHNldAorIyBDT05GSUdfTUlTQ19ERVZJQ0VTIGlzIG5vdCBzZXQKK0NPTkZJR19IQVZFX0lERT15CisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQ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F9QVFlTIGlzIG5vdCBzZXQKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKyMgQ09ORklHX0lQTUlfSEFORExFUiBpcyBub3Qgc2V0CisjIENPTkZJR19IV19SQU5ET00gaXMgbm90IHNldAorIyBDT05GSUdfR0VOX1JUQyBpcyBub3Qgc2V0CisjIENPTkZJR19SMzk2NCBpcyBub3Qgc2V0CisjIENPTkZJR19SQVdfRFJJVkVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RDR19UUE0gaXMgbm90IHNldAorIyBDT05GSUdfSTJDIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSSBpcyBub3Qgc2V0CisjIENPTkZJR19XMSBpcyBub3Qgc2V0CisjIENPTkZJR19QT1dFUl9TVVBQTFkgaXMgbm90IHNldAorIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAorIyBDT05GSUdfVEhFUk1BTCBpcyBub3Qgc2V0CisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisKKyMKKyMgU29uaWNzIFNpbGljb24gQmFja3BsYW5lCisjCitDT05GSUdfU1NCX1BPU1NJQkxFPXkKKyMgQ09ORklHX1NTQiBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGlmdW5jdGlvbiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTUZEX1NNNTAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hUQ19QQVNJQzMgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgY29yZSBzdXBwb3J0CisjCisjIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAorIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZHJpdmVycworIworIyBDT05GSUdfREFCIGlzIG5vdCBzZXQKKworIworIyBHcmFwaGljcyBzdXBwb3J0CisjCisjIENPTkZJR19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klHX1FOWDRGU19GUyBpcyBub3Qgc2V0CitDT05GSUdfUk9NRlNfRlM9eQorIyBDT05GSUdfU1lTVl9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19VRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfTkVUV09SS19GSUxFU1lTVEVNUyBpcyBub3Qgc2V0CisKKyMKKyMgUGFydGl0aW9uIFR5cGVzCisjCisjIENPTkZJR19QQVJUSVRJT05fQURWQU5DRUQgaXMgbm90IHNldAorQ09ORklHX01TRE9TX1BBUlRJVElPTj15CisjIENPTkZJR19OTFMgaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBoYWNraW5nCisjCisjIENPTkZJR19QUklOVEtfVElNRSBpcyBub3Qgc2V0CitDT05GSUdfRU5BQkxFX1dBUk5fREVQUkVDQVRFRD15CitDT05GSUdfRU5BQkxFX01VU1RfQ0hFQ0s9eQorQ09ORklHX0ZSQU1FX1dBUk49MTAyNAorIyBDT05GSUdfTUFHSUNfU1lTUlEgaXMgbm90IHNldAorIyBDT05GSUdfVU5VU0VEX1NZTUJPTFMgaXMgbm90IHNldAorIyBDT05GSUdfSEVBREVSU19DSEVDSyBpcyBub3Qgc2V0CisjIENPTkZJR19ERUJVR19LRVJORUwgaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfQlVHVkVSQk9TRSBpcyBub3Qgc2V0CisjIENPTkZJR19TQU1QTEVTIGlzIG5vdCBzZXQKK0NPTkZJR19GVUxMREVCVUc9eQorIyBDT05GSUdfSElHSFBST0ZJTEUgaXMgbm90IHNldAorIyBDT05GSUdfQk9PVFBBUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX05PX0tFUk5FTF9NU0cgaXMgbm90IHNldAorIyBDT05GSUdfQkRNX0RJU0FCTEUgaXMgbm90IHNldAorCisjCisjIFNlY3VyaXR5IG9wdGlvbnMKKyMKKyMgQ09ORklHX0tFWVMgaXMgbm90IHNldAorIyBDT05GSUdfU0VDVVJJVFlfRklMRV9DQVBBQklMS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CisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1NUQU5EQUxPTkU9eQorQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NNRExJTkVfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSN19QQVJUUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMS0RFVlM9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworIyBDT05GSUdfTVREX0NGSSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1JBTT15CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfVUNMSU5VWD15CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVRE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orIworQ09ORklHX1NTQl9QT1NTSUJMRT15CisjIENPTkZJR19TU0IgaXMgbm90IHNldAorCisjCisjIE11bHRpZnVuY3Rpb24gZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01GRF9TTTUwMSBpcyBub3Qgc2V0CisjIENPTkZJR19IVENfUEFTSUMzIGlzIG5vdCBzZXQKKworIworIyBNdWx0aW1lZGlhIGRldmljZXMKKyMKKworIworIyBNdWx0aW1lZGlhIGNvcmUgc3VwcG9ydAorIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBNdWx0aW1lZGlhIGRyaXZlcnMKKyMKKyMgQ09ORklHX0RBQiBpcyBub3Qgc2V0CisKKyMKKyMgR3JhcGhpY3Mgc3VwcG9ydAorIworIyBDT05GSUdfVkdBU1RBVEUgaXMgbm90IHNldAorIyBDT05GSUdfVklERU9fT1VUUFVUX0NPTlRST0wgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorIyBDT05GSUdfQkFDS0xJR0hUX0xDRF9TVVBQT1JUIGlzIG5vdCBzZXQKKworIworIyBEaXNwbGF5IGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ESVNQTEFZX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfU1VQUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19NTUMgaXMgbm90IHNldAorIyBDT05GSUdfTUVNU1RJQ0sgaXMgbm90IHNldAorIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorIyBDT05GSUdfQUNDRVNTSUJJTElUWSBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfQ0xBU1MgaXMgbm90IHNldAorIyBDT05GSUdfVUlPIGlzIG5vdCBzZXQKKworIworIyBGaWxlIHN5c3RlbXMKKyMKK0NPTkZJR19FWFQyX0ZTPXkKKyMgQ09ORklHX0VYV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fQ09OQ0FUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEFSVElUSU9OUz15CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ01ETElORV9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQVI3X1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCisjIENPTkZJR19NVERfQ0ZJIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCB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ORklHX1NQSSBpcyBub3Qgc2V0CisjIENPTkZJR19XMSBpcyBub3Qgc2V0CisjIENPTkZJR19QT1dFUl9TVVBQTFkgaXMgbm90IHNldAorIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAorIyBDT05GSUdfVEhFUk1BTCBpcyBub3Qgc2V0CisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisKKyMKKyMgU29uaWNzIFNpbGljb24gQmFja3BsYW5lCisjCitDT05GSUdfU1NCX1BPU1NJQkxFPXkKKyMgQ09ORklHX1NTQiBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGlmdW5jdGlvbiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTUZEX1NNNTAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hUQ19QQVNJQzMgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgY29yZSBzdXBwb3J0CisjCisjIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAorIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZHJpdmVycworIworQ09ORklHX0RBQj15CisKKyMKKyMgR3JhcGhpY3Mgc3VwcG9ydAorIworIyBDT05GSUdfVkdBU1RBVEUgaXMgbm90IHNldAorIyBDT05GSUdfVklERU9fT1VUUFVUX0NPTlRST0wgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorIyBDT05GSUdfQkFDS0xJR0hUX0xDRF9TVVBQT1JUIGlzIG5vdCBzZXQKKworIworIyBEaXNwbGF5IGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ESVNQTEFZX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfU1VQUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19NTUMgaXMgbm90IHN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IxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfQ0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lSREEgaXMgbm90IHNldAorIyBDT05GSUdfQlQgaXMgbm90IHNldAorIyBDT05GSUdfQUZfUlhSUEMgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzCisjCisjIENPTkZJR19DRkc4MDIxMSBpcyBub3Qgc2V0CisjIENPTkZJR19XSVJFTEVTU19FWFQgaXMgbm90IHNldAorIyBDT05GSUdfTUFDODAyMTEgaXMgbm90IHNldAorIyBDT05GSUdfSUVFRTgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGS0lMTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfOVAgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1NUQU5EQUxPTkU9eQorQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DTURMSU5FX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BUjdfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTEtERVZTPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT09QUyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9DRkkgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorQ09ORklHX01URF9SQU09eQorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1VDTElOVVg9eQorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PTkVOQU5EIGlzIG5vdCBzZXQKKworIworIyBVQkkgLSBVbnNvcnRlZCBibG9jayBpbWFnZXMKKyMKKyMgQ09ORklHX01URF9VQkkgaXMgbm90IHNldAorIyBDT05GSUdfUEFSUE9SVCBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVj15CisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9MT09QIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ER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aXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgY29yZSBzdXBwb3J0CisjCisjIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAorIyBDT05GSUdfRFZCX0NPUkUgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZHJpdmVycworIworQ09ORklHX0RBQj15CisKKyMKKyMgR3JhcGhpY3Mgc3VwcG9ydAorIworIyBDT05GSUdfVkdBU1RBVEUgaXMgbm90IHNldAorIyBDT05GSUdfVklERU9fT1VUUFVUX0NPTlRST0wgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorIyBDT05GSUdfQkFDS0xJR0hUX0xDRF9TVVBQT1JUIGlzIG5vdCBzZXQKKworIworIyBEaXNwbGF5IGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ESVNQTEFZX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisjIENPTkZJR19ISURfU1VQUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfU1VQUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19NTUMgaXMgbm90IHNldAorIyBDT05GSUdfTUVNU1RJQ0sgaXMgbm90IHNldAorIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorIyBDT05GSUdfQUNDRVNTSUJJTElUWSBpcyBub3Qgc2V0CisjIENPTkZJR19SVENfQ0xBU1MgaXMgbm90IHNldAorIyBDT05GSUdfVUlPIGlzIG5vdCBzZXQKKworIworIyBGaWxlIHN5c3RlbXMKKyMKK0NPTkZJR19FWFQyX0ZTPXkKKyMgQ09ORklHX0VYVDJfRlNfWEFUVFIgaXMgbm90IHNldAorIyBDT05GSUdfRVhUM19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQ0REVWX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JFSV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uoc3RydWN0IHdvcmtfc3RydWN0ICp3b3JrKQoreworCXN0cnVjdCB2aW9fY21vICpjbW87CisJc3RydWN0IHZpb19kZXYgKnZpb2RldjsKKwlzdHJ1Y3QgdmlvX2Ntb19kZXZfZW50cnkgKmRldl9lbnQ7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKwlzaXplX3QgYXZhaWwgPSAwLCBsZXZlbCwgY2h1bmssIG5lZWQ7CisJaW50IGRldmNvdW50ID0gMCwgZnVsZmlsbGVkOworCisJY21vID0gY29udGFpbmVyX29mKHdvcmssIHN0cnVjdCB2aW9fY21vLCBiYWxhbmNlX3Eud29yayk7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmdmlvX2Ntby5sb2NrLCBmbGFncyk7CisKKwkvKiBDYWxjdWxhdGUgbWluaW11bSBlbnRpdGxlbWVudCBhbmQgZnVsZmlsbCBzcGFyZSAqLworCWNtby0+bWluID0gdmlvX2Ntb19udW1fT0ZfZGV2cygpICogVklPX0NNT19NSU5fRU5UOworCUJVR19PTihjbW8tPm1pbiA+IGNtby0+ZW50aXRsZWQpOworCWNtby0+c3BhcmUgPSBtaW5fdChzaXplX3QsIFZJT19DTU9fTUlOX0VOVCwgKGNtby0+ZW50aXRsZWQgLSBjbW8tPm1pbikpOworCWNtby0+bWluICs9IGNtby0+c3BhcmU7CisJY21vLT5kZXNpcmVkID0gY21vLT5taW47CisKKwkvKgorCSAqIERldGVybWluZSBob3cgbXVjaCBlbnRpdGxlbWVudCBpcyBhdmFpbGFibGUgYW5kIHJlc2V0IGRldmljZQorCSAqIGVudGl0bGVtZW50cworCSAqLworCWF2YWlsID0gY21vLT5lbnRpdGxlZCAtIGNtby0+c3BhcmU7CisJbGlzdF9mb3JfZWFjaF9lbnRyeShkZXZfZW50LCAmdmlvX2Ntby5kZXZpY2VfbGlzdCwgbGlzdCkgeworCQl2aW9kZXYgPSBkZXZfZW50LT52aW9kZXY7CisJCWRldmNvdW50Kys7CisJCXZpb2Rldi0+Y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5hbGxvY19jb2hlcmVudChkZXYsIHNpemUsIGRtYV9oYW5kbGUsIGZsYWcpOworCWlmICh1bmxpa2VseShyZXQgPT0gTlVMTCkpIHsKKwkJdmlvX2Ntb19kZWFsbG9jKHZpb2Rldiwgcm91bmR1cChzaXplLCBJT01NVV9QQUdFX1NJWkUpKTsKKwkJYXRvbWljX2luYygmdmlvZGV2LT5jbW8uYWxsb2NzX2ZhaWxlZCk7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIHZvaWQgdmlvX2RtYV9pb21tdV9mcmVlX2NvaGVyZW50KHN0cnVjdCBkZXZpY2UgKmRldiwgc2l6ZV90IHNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9pZCAqdmFkZHIsIGRtYV9hZGRyX3QgZG1hX2hhbmRsZSkKK3sKKwlzdHJ1Y3QgdmlvX2RldiAqdmlvZGV2ID0gdG9fdmlvX2RldihkZXYpOworCisJZG1hX2lvbW11X29wcy5mcmVlX2NvaGVyZW50KGRldiwgc2l6ZSwgdmFkZHIsIGRtYV9oYW5kbGUpOworCisJdmlvX2Ntb19kZWFsbG9jKHZpb2Rldiwgcm91bmR1cChzaXplLCBJT01NVV9QQUdFX1NJWkUpKTsKK30KKworc3RhdGljIGRtYV9hZGRyX3QgdmlvX2RtYV9pb21tdV9tYXBfc2luZ2xlKHN0cnVjdCBkZXZpY2UgKmRldiwgdm9pZCAqdmFkZHIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZV90IHNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBkbWFfZGF0YV9kaXJlY3Rpb24gZGlyZWN0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBkbWFfYXR0cnMgKmF0dHJzKQoreworCXN0cnVjdCB2aW9fZGV2ICp2aW9kZXYgPSB0b192aW9fZGV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ucmVzZXJ2ZS5zaXplICs9ICh2aW9fY21vX251bV9PRl9kZXZzKCkgKgorCSAgICAgICAgICAgICAgICAgICAgICAgICBWSU9fQ01PX01JTl9FTlQpOworCWlmICh2aW9fY21vLnJlc2VydmUuc2l6ZSA+IHZpb19jbW8uZW50aXRsZWQpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICIlczogaW5zdWZmaWNpZW50IHN5c3RlbSBlbnRpdGxlbWVudFxuIiwKKwkJICAgICAgIF9fZnVuY19fKTsKKwkJcGFuaWMoIiVzOiBJbnN1ZmZpY2llbnQgc3lzdGVtIGVudGl0bGVtZW50IiwgX19mdW5jX18pOworCX0KKworCS8qIFNldCB0aGUgcmVtYWluaW5nIGFjY291bnRpbmcgdmFyaWFibGVzICovCisJdmlvX2Ntby5leGNlc3Muc2l6ZSA9IHZpb19jbW8uZW50aXRsZWQgLSB2aW9fY21vLnJlc2VydmUuc2l6ZTsKKwl2aW9fY21vLmV4Y2Vzcy5mcmVlID0gdmlvX2Ntby5leGNlc3Muc2l6ZTsKKwl2aW9fY21vLm1pbiA9IHZpb19jbW8ucmVzZXJ2ZS5zaXplOworCXZpb19jbW8uZGVzaXJlZCA9IHZpb19jbW8ucmVzZXJ2ZS5zaXplOworfQorCisvKiBzeXNmcyBkZXZpY2UgZnVuY3Rpb25zIGFuZCBkYXRhIHN0cnVjdHVyZXMgZm9yIENNTyAqLworCisjZGVmaW5lIHZpb2Rldl9jbW9fcmRfYXR0cihuYW1lKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCitzdGF0aWMgc3NpemVfdCB2aW9kZXZfY21vXyMjbmFtZSMjX3Nob3coc3RydWN0IGRldmljZSAqZGV2LCAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGRldmljZV9hdHRyaWJ1dGUgKmF0dHIsICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoY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ZhaWxlZCwgU19JV1VTUnxTX0lSVVNSfFNfSVdHUlB8U19JUkdSUHxTX0lST1RILAorCSAgICAgICB2aW9kZXZfY21vX2FsbG9jc19mYWlsZWRfc2hvdywgdmlvZGV2X2Ntb19hbGxvY3NfZmFpbGVkX3Jlc2V0KSwKKwlfX0FUVFJfTlVMTAorfTsKKworLyogc3lzZnMgYnVzIGZ1bmN0aW9ucyBhbmQgZGF0YSBzdHJ1Y3R1cmVzIGZvciBDTU8gKi8KKworI2RlZmluZSB2aW9idXNfY21vX3JkX2F0dHIobmFtZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorc3RhdGljIHNzaXplX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAordmlvYnVzX2Ntb18jI25hbWUjI19zaG93KHN0cnVjdCBidXNfdHlwZSAqYnQsIGNoYXIgKmJ1ZikgICAgICAgICAgICAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXJldHVybiBzcHJpbnRmKGJ1ZiwgIiVsdVxuIiwgdmlvX2Ntby5uYW1lKTsgICAgICAgICAgICAgICAgICAgICBcCit9CisKKyNkZWZpbmUgdmlvYnVzX2Ntb19wb29sX3JkX2F0dHIobmFtZSwgdmFyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3N0YXRpYyBzc2l6ZV90ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3Zpb2J1c19jbW9fIyNuYW1lIyNfcG9vbF9zaG93XyMjdmFyKHN0cnVjdCBidXNfdHlwZSAqYnQsIGNoYXIgKmJ1ZikgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlyZXR1cm4g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CiAJLm9wZW4JCT0gaXAyX2lwbF9vcGVuLAogfTsgCiAKQEAgLTI4NDUsMTAgKzI4NDUsMTAgQEAKIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0YXRpYyBpbnQKLWlwMl9pcGxfaW9jdGwgKCBzdHJ1Y3QgaW5vZGUgKnBJbm9kZSwgc3RydWN0IGZpbGUgKnBGaWxlLCBVSU5UIGNtZCwgVUxPTkcgYXJnICkKK3N0YXRpYyBsb25nCitpcDJfaXBsX2lvY3RsIChzdHJ1Y3QgZmlsZSAqcEZpbGUsIFVJTlQgY21kLCBVTE9ORyBhcmcgKQogewotCXVuc2lnbmVkIGludCBpcGxtaW5vciA9IGltaW5vcihwSW5vZGUpOworCXVuc2lnbmVkIGludCBpcGxtaW5vciA9IGltaW5vcihwRmlsZS0+Zl9wYXRoLmRlbnRyeS0+ZF9pbm9kZSk7CiAJaW50IHJjID0gMDsKIAl2b2lkIF9fdXNlciAqYXJncCA9ICh2b2lkIF9fdXNlciAqKWFyZzsKIAlVTE9ORyBfX3VzZXIgKnBJbmRleCA9IGFyZ3A7CkBAIC0yODU5LDYgKzI4NTksOCBAQAogCXByaW50ayAoS0VSTl9ERUJVRyAiSVAySVBMOiBpb2N0bCBjbWQgJWQsIGFyZyAlbGRcbiIsIGNtZCwgYXJnICk7CiAjZW5kaWYKIAorCWxvY2tfa2VybmVsKCk7CisKIAlzd2l0Y2ggKCBpcGxtaW5vciApIHsKIAljYXNlIDA6CSAgICAvLyBJUEwgZGV2aWNlCiAJCXJjID0gLUVJTlZBTDsKQ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ci0KLSNkZWZpbmUgTEVEX1NldAkJCTQwCi0jZGVmaW5lIExFRF9CaXRfU2V0CQk0MQotI2RlZmluZSBMRURfQml0X0NsZWFyCQk0MgotCi0KLS8vICBCdXR0b24gZGVmcwotI2RlZmluZSBCVVRUT05fUmVhZCAgICAgICAgICAgICA1MAotCi0KLS8vIEV0aGVybmV0IExJTksgY2hlY2sgaGFja2Fyb28KLSNkZWZpbmUgTElOS19DaGVjayAgICAgICAgICAgICAgOTAKLSNkZWZpbmUgTElOS19DaGVja18yCQk5MQotCi0vLyAgQnV0dG9uIHBhdHRlcm5zICBfQiAtIHNpbmdsZSBsYXllciBsY2QgYm9hcmRzCi0KLSNkZWZpbmUgQlVUVE9OX05PTkUgICAgICAgICAgICAgICAweDNGCi0jZGVmaW5lIEJVVFRPTl9OT05FX0IgICAgICAgICAgICAgMHhGRQotCi0jZGVmaW5lIEJVVFRPTl9MZWZ0ICAgICAgICAgICAgICAgMHgzQgotI2RlZmluZSBCVVRUT05fTGVmdF9CICAgICAgICAgICAgIDB4RkEKLQotI2RlZmluZSBCVVRUT05fUmlnaHQgICAgICAgICAgICAgIDB4MzcKLSNkZWZpbmUgQlVUVE9OX1JpZ2h0X0IgICAgICAgICAgICAweERFCi0KLSNkZWZpbmUgQlVUVE9OX1VwICAgICAgICAgICAgICAgICAweDJGCi0jZGVmaW5lIEJVVFRPTl9VcF9CICAgICAgICAgICAgICAgMHhGNgotCi0jZGVmaW5lIEJVVFRPTl9Eb3duICAgICAgICAgICAgICAgMHgxRgotI2RlZmluZSBCVVRUT05fRG93bl9CICAgICAgICAgICAgIDB4RUUKLQotI2RlZmluZSBCVVRUT05fTmV4dCAgICAgICAgICAgICAgIDB4M0QKLSNkZWZpbmUgQlVUVE9OX05leHRfQiAgICAgICAgICAgICAweDdFCi0KLSNkZWZpbmUgQlVUVE9OX0VudGVyICAgICAgICAgICAgICAweDNFCi0jZGVmaW5lIEJVVFRPTl9FbnRlcl9CICAgICAgICAgICAgMHhCRQ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25vdy5yeCwgJnBfY3VzZXItPnJ4KSkKLQkJCXJldHVybiAtRUZBVUxUOwotCQlpZiAocHV0X3VzZXIoY25vdy50eCwgJnBfY3VzZXItPnR4KSkKLQkJCXJldHVybiAtRUZBVUxUOwotCQlwdXRfdXNlcihjbm93LmN0cywgJnBfY3VzZXItPmN0cyk7Ci0JCXB1dF91c2VyKGNub3cuZHNyLCAmcF9jdXNlci0+ZHNyKTsKLQkJcHV0X3VzZXIoY25vdy5ybmcsICZwX2N1c2VyLT5ybmcpOwotCQlwdXRfdXNlcihjbm93LmRjZCwgJnBfY3VzZXItPmRjZCk7Ci0JCXJldHVybiAwOworCisJCWljbnQuZnJhbWUgPSBjbm93LmZyYW1lOworCQlpY250LmJyayA9IGNub3cuYnJrOworCQlpY250Lm92ZXJydW4gPSBjbm93Lm92ZXJydW47CisJCWljbnQuYnVmX292ZXJydW4gPSBjbm93LmJ1Zl9vdmVycnVuOworCQlpY250LnBhcml0eSA9IGNub3cucGFyaXR5OworCQlpY250LnJ4ID0gY25vdy5yeDsKKwkJaWNudC50eCA9IGNub3cudHg7CisJCWljbnQuY3RzID0gY25vdy5jdHM7CisJCWljbnQuZHNyID0gY25vdy5kc3I7CisJCWljbnQucm5nID0gY25vdy5ybmc7CisJCWljbnQuZGNkID0gY25vdy5kY2Q7CisKKwkJcmV0dXJuIGNvcHlfdG9fdXNlcihhcmdwLCAmaWNudCwgc2l6ZW9mKGljbnQpKSA/IC1FRkFVTFQgOiAwOworCX0KIAljYXNlIE1PWEFfSGlnaFNwZWVkT246CiAJCXJldHVybiBwdXRfdXNlcihpbmZvLT5iYXVkX2Jhc2UgIT0gMTE1MjAwID8gMSA6IDAsIChpbnQgX191c2VyICopYXJncCk7CiAJY2FzZSBNT1hBX1NEU19SU1RJQ09VTlRFUjoKQEAgLTI1MDMsNyArMjQ2NCw4IEBACiAJdW5zaWduZWQgaW50IGk7CiAJaW50IHJldHZhbDsKIAotCXByaW50ayhLRVJOX0lORk8gIm1heC4g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y1zcGVlZAotICoKLSAqICBWZXJzaW9uIDAuMDYgICAgICAgIFByZWZldGNoIG1vZGUgbm93IGRlZmF1bHRzIG5vIE9GRi4gVG8gc2V0Ci0gKiAgICAgICAgICAgICAgICAgICAgICBwcmVmZXRjaCBtb2RlIE9GRi9PTiB1c2UgImhkcGFybSAtcDgvLXA5Ii4KLSAqICAgICAgICAgICAgICAgICAgICAgIFVubWFzayBpcnEgaXMgZGlzYWJsZWQgd2hlbiBwcmVmZXRjaCBtb2RlCi0gKiAgICAgICAgICAgICAgICAgICAgICBpcyBlbmFibGVkLgotICoKLSAqICBWZXJzaW9uIDAuMDcgICAgICAgIFRyeWluZyB0byBmaXggQ0QtUk9NIGRldGVjdGlvbiBwcm9ibGVtLgotICogICAgICAgICAgICAgICAgICAgICAgIlByZWZldGNoIiBtb2RlIGJpdCBPRkYgZm9yIGlkZSBkaXNrcyBhbmQKLSAqICAgICAgICAgICAgICAgICAgICAgIE9OIGZvciBhbnl0aGluZyBlbHNlLgotICoKLSAqICBWZXJzaW9uIDAuMDggICAgICAgIE5lZWQgdG8gZm9yY2UgcHJlZmV0Y2ggZm9yIENEcyBhbmQgb3RoZXIgbm9uLWRpc2sKLSAqICAgICAgICAgICAgICAgICAgICAgIGRldmljZXMuIChub3Qgc3VyZSB3aGljaCBkZXZpY2VzIGV4YWN0bHkgbmVlZAotICogICAgICAgICAgICAgICAgICAgICAgcHJlZmV0Y2gpCi0gKgogICogIEhULTY1NjBCIEVJREUtY29udHJvbGxlciBzdXBwb3J0CiAgKiAgVG8gYWN0aXZhdGUgY29udHJvbGxlciBzdXBwb3J0IHVzZSBrZXJuZWwgcGFyYW1ldGVyICJpZGUwPWh0NjU2MGIiLgogICogIFVzZSBoZHBhcm0gdXRpbGl0eSB0byBlbmFibGUgUElPIG1vZGUgc3VwcG9ydC4KICAqCiAgKiAgQXV0aG9yOiAgICBNaWtrbyBBbGEtRm9zc2kgICAgICAgICAgICA8bWFmQGlraS5maT4KLSAqICAgICAg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kuCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBTQVMgRGV2aWNlIFN0YXR1cyBDaGFuZ2UgUmVhc29uQ29kZSBmb3IKLSAqICAgICAgICAgICAgICAgICAgICAgIGFzeW5jaHJvbm91cyBub3RpZmljYWl0b24uCisgKiAgICAgICAgICAgICAgICAgICAgICBhc3luY2hyb25vdXMgbm90aWZpY2F0aW9uLgogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTVBJX0VWRU5UX1NBU19FWFBBTkRFUl9TVEFUVVNfQ0hBTkdFIGFuZCBldmVudAogICogICAgICAgICAgICAgICAgICAgICAgZGF0YSBzdHJ1Y3R1cmUuCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBuZXcgSW1hZ2VUeXBlIHZhbHVlcyBmb3IgRldEb3dubG9hZCBhbmQgRldVcGxvYWQKQEAgLTIxMyw3ICsyMTMsNyBAQAogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgX1JFU1BPTlNFX0lEX01BU0sgZGVmaW5pdGlvbiB0byBTQ1NJX1BPUlRfMQogICogICAgICAgICAgICAgICAgICAgICAgcGFnZSBhbmQgdXBkYXRlZCB0aGUgcGFnZSB2ZXJzaW9uLgogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgSW5mb3JtYXRpb24gZmllbGQgYW5kIF9JTkZPX1BBUkFNU19ORUdPVElBVEVECi0gKiAgICAgICAgICAgICAgICAgICAgICBkZWZpbml0aW9udG8gU0NTSV9ERVZJQ0VfMCBwYWdlLgorICogICAgICAgICAgICAgICAgICAgICAgZGVmaW5pdGlvbiB0byBTQ1NJX0RFVklDRV8wIHBhZ2UuCiAgKiAgMDYtMjItMDAgIDAxLjAwLjAzICBSZW1vdmVkIGJhdGNoIGNvbnRyb2xzIGZyb20gTEFOXzAgcGFnZSBhbmQgdXBkYXRlZCB0aGUKICAqICAgICAgICAgICAgICAgICAgICAgIHBhZ2UgdmVyc2lvbi4KICAqICAgICAgICAgICAgICAgIC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NhbmNvZGUoaW50IGNvZGUpCit7CisJc3RydWN0IGtleV9lbnRyeSAqa2V5OworCisJZm9yIChrZXkgPSBocF93bWlfa2V5bWFwOyBrZXktPnR5cGUgIT0gS0VfRU5EOyBrZXkrKykKKwkJaWYgKGNvZGUgPT0ga2V5LT5jb2RlKQorCQkJcmV0dXJuIGtleTsKKworCXJldHVybiBOVUxMOworfQorCitzdGF0aWMgc3RydWN0IGtleV9lbnRyeSAqaHBfd21pX2dldF9lbnRyeV9ieV9rZXljb2RlKGludCBrZXljb2RlKQoreworCXN0cnVjdCBrZXlfZW50cnkgKmtleTsKKworCWZvciAoa2V5ID0gaHBfd21pX2tleW1hcDsga2V5LT50eXBlICE9IEtFX0VORDsga2V5KyspCisJCWlmIChrZXktPnR5cGUgPT0gS0VfS0VZICYmIGtleWNvZGUgPT0ga2V5LT5rZXljb2RlKQorCQkJcmV0dXJuIGtleTsKKworCXJldHVybiBOVUxMOworfQorCitzdGF0aWMgaW50IGhwX3dtaV9nZXRrZXljb2RlKHN0cnVjdCBpbnB1dF9kZXYgKmRldiwgaW50IHNjYW5jb2RlLCBpbnQgKmtleWNvZGUpCit7CisJc3RydWN0IGtleV9lbnRyeSAqa2V5ID0gaHBfd21pX2dldF9lbnRyeV9ieV9zY2FuY29kZShzY2FuY29kZSk7CisKKwlpZiAoa2V5ICYmIGtleS0+dHlwZSA9PSBLRV9LRVkpIHsKKwkJKmtleWNvZGUgPSBrZXktPmtleWNvZGU7CisJCXJldHVybiAwOworCX0KKworCXJldHVybiAtRUlOVkFMOworfQorCitzdGF0aWMgaW50IGhwX3dtaV9zZXRrZXljb2RlKHN0cnVjdCBpbnB1dF9kZXYgKmRldiwgaW50IHNjYW5jb2RlLCBpbnQga2V5Y29kZSkKK3sKKwlzdHJ1Y3Qga2V5X2VudHJ5ICprZXk7CisJaW50IG9sZF9rZXljb2RlOworCisJaWYgKGtleWNvZGUgPCAwIHx8IGtleWNvZGUgPiBLRVlfTUFYKQorCQlyZXR1cm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VuZGlmCiAKLSNpZmRlZiBDT05GSUdfTVREX1VCSV9ERUJVR19ESVNBQkxFX0JHVAotI2RlZmluZSBEQkdfRElTQUJMRV9CR1QgMQotI2Vsc2UKLSNkZWZpbmUgREJHX0RJU0FCTEVfQkdUIDAKLSNlbmRpZgorI2RlZmluZSB1YmlfYXNzZXJ0KGV4cHIpICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIGlmICh1bmxpa2VseSghKGV4cHIpKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9DUklUICJVQkkgYXNzZXJ0IGZhaWxlZCBpbiAlcyBhdCAldSAocGlkICVkKVxuIiwgXAorICAgICAgICAgICAgICAgICAgICAgICBfX2Z1bmNfXywgX19MSU5FX18sIGN1cnJlbnQtPnBpZCk7ICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgdWJpX2RiZ19kdW1wX3N0YWNrKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfSB3aGlsZSAoMCkKIAotI2lmZGVmIENPTkZJR19NVERfVUJJX0RFQlVHX01TRwotLyogR2VuZXJpYyBkZWJ1Z2dpbmcgbWVzc2FnZSAqLwogI2RlZmluZSBkYmdfbXNnKGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAlwcmludGsoS0VSTl9ERUJVRyAiVUJJIERCRyAocGlkICVkKTogJXM6ICIgZm10ICJcbiIsIFwKIAkgICAgICAgY3VycmVudC0+cGlkLCBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKQEAgLTYxLDM2ICs1NiwyOSBAQAogdm9pZCB1Yml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KworCS8qIHN0b3AgdGhlIGxjZGMgZmlyc3QgKi8KKwlzaF9tb2JpbGVfbGNkY19zdGFydF9zdG9wKHByaXYsIDApOworCisJLyogY29uZmlndXJlIGNsb2NrcyAqLworCXRtcCA9IHByaXYtPmxkZGNrcjsKKwlmb3IgKGsgPSAwOyBrIDwgQVJSQVlfU0laRShwcml2LT5jaCk7IGsrKykgeworCQljaCA9ICZwcml2LT5jaFtrXTsKKworCQlpZiAoIXByaXYtPmNoW2tdLmVuYWJsZWQpCisJCQljb250aW51ZTsKKworCQltID0gY2gtPmNmZy5jbG9ja19kaXZpZGVyOworCQlpZiAoIW0pCisJCQljb250aW51ZTsKKworCQlpZiAobSA9PSAxKQorCQkJbSA9IDEgPDwgNjsKKwkJdG1wIHw9IG0gPDwgKGxjZGNfY2hhbl9pc19zdWJsY2QoY2gpID8gOCA6IDApOworCisJCWxjZGNfd3JpdGVfY2hhbihjaCwgTEREQ0tQQVQxUiwgMHgwMDAwMDAwMCk7CisJCWxjZGNfd3JpdGVfY2hhbihjaCwgTEREQ0tQQVQyUiwgKDEgPDwgKG0vMikpIC0gMSk7CisJfQorCisJbGNkY193cml0ZShwcml2LCBfTEREQ0tSLCB0bXApOworCisJLyogc3RhcnQgZG90Y2xvY2sgYWdhaW4gKi8KKwlsY2RjX3dyaXRlKHByaXYsIF9MRERDS1NUUFIsIDApOworCWxjZGNfd2FpdF9iaXQocHJpdiwgX0xERENLU1RQUiwgfjAsIDApOworCisJLyogaW50ZXJydXB0cyBhcmUgZGlzYWJsZWQgKi8KKwlsY2RjX3dyaXRlKHByaXYsIF9MRElOVFIsIDApOworCisJZm9yIChrID0gMDsgayA8IEFSUkFZX1NJWkUocHJpdi0+Y2gpOyBrKyspIHsKKwkJY2ggPSAmcHJpdi0+Y2hba107CisJCWxjZF9jZmcgPSAmY2gtPmNmZy5sY2RfY2ZnOworCisJCWlmICghY2gtPmVuYWJsZWQpCisJCQljb250aW51ZTsKKworCQl0bXAgPSBjaC0+bGRt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g7CisKKwlmb3IgKGkgPSAwOyBpIDwgc2JpLT5zX2ltYXBfc2l6ZTsgaSsrKQorCQlzdW0gKz0gbmJpdHMgLSBiaXRtYXBfd2VpZ2h0KHNiaS0+c19pbWFwW2ldLCBuYml0cyk7CisKKwlyZXR1cm4gc3VtOworfQorCisvKgorICogIENvdW50cyB0aGUgcnVuIG9mIHplcm8gYml0cyBzdGFydGluZyBhdCBiaXQgdXAgdG8gbWF4LgorICogIEl0IGhhbmRsZXMgdGhlIGNhc2Ugd2hlcmUgYSBydW4gbWlnaHQgc3BpbGwgb3ZlciBhIGJ1ZmZlci4KKyAqICBDYWxsZWQgd2l0aCBiaXRtYXAgbG9jay4KKyAqLworc3RhdGljIGludCBjb3VudF9ydW4odW5zaWduZWQgbG9uZyAqKmFkZHIsIGludCBuYml0cywKKwkJaW50IGFkZHJsZW4sIGludCBiaXQsIGludCBtYXgpCit7CisJaW50IGNvdW50ID0gMDsKKwlpbnQgeDsKKworCWZvciAoOyBhZGRybGVuID4gMDsgYWRkcmxlbi0tLCBhZGRyKyspIHsKKwkJeCA9IGZpbmRfbmV4dF9iaXQoKmFkZHIsIG5iaXRzLCBiaXQpOworCQljb3VudCArPSB4IC0gYml0OworCisJCWlmICh4IDwgbmJpdHMgfHwgY291bnQgPiBtYXgpCisJCQlyZXR1cm4gbWluKGNvdW50LCBtYXgpOworCisJCWJpdCA9IDA7CisJfQorCXJldHVybiBtaW4oY291bnQsIG1heCk7Cit9CisKKy8qCisgKiBTZXRzIG9yIGNsZWFycyB0aGUgcnVuIG9mIGNvdW50IGJpdHMgc3RhcnRpbmcgd2l0aCBiaXQuCisgKiBDYWxsZWQgd2l0aCBiaXRtYXAgbG9jay4KKyAqLworc3RhdGljIGludCBzZXRfcnVuKHN0cnVjdCBzdXBlcl9ibG9jayAqc2IsIGludCBtYXAsCisJCWludCBuYml0cywgaW50IGJpdCwgaW50IGNvdW50LCBpbnQgc2V0KQoreworCWludCBpOworCWludCBlcnI7CisJc3RydWN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TsKKwkJCWlwdXQoZGlydHkpOworCQl9CisJfQorCisJZXJyID0gMDsKK291dF9mcmVlX2JoOgorCWJyZWxzZShiaCk7CitvdXQ6CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBvbWZzX2Rpcl9pc19lbXB0eShzdHJ1Y3QgaW5vZGUgKmlub2RlKQoreworCWludCBuYnVja2V0cyA9IChpbm9kZS0+aV9zaXplIC0gT01GU19ESVJfU1RBUlQpIC8gODsKKwlzdHJ1Y3QgYnVmZmVyX2hlYWQgKmJoOworCXU2NCAqcHRyOworCWludCBpOworCisJYmggPSBzYl9icmVhZChpbm9kZS0+aV9zYiwgY2x1c190b19ibGsoT01GU19TQihpbm9kZS0+aV9zYiksCisJCQlpbm9kZS0+aV9pbm8pKTsKKworCWlmICghYmgpCisJCXJldHVybiAwOworCisJcHRyID0gKHU2NCAqKSAmYmgtPmJfZGF0YVtPTUZTX0RJUl9TVEFSVF07CisKKwlmb3IgKGkgPSAwOyBpIDwgbmJ1Y2tldHM7IGkrKywgcHRyKyspCisJCWlmICgqcHRyICE9IH4wKQorCQkJYnJlYWs7CisKKwlicmVsc2UoYmgpOworCXJldHVybiAqcHRyICE9IH4wOworfQorCitzdGF0aWMgaW50IG9tZnNfdW5saW5rKHN0cnVjdCBpbm9kZSAqZGlyLCBzdHJ1Y3QgZGVudHJ5ICpkZW50cnkpCit7CisJaW50IHJldDsKKwlzdHJ1Y3QgaW5vZGUgKmlub2RlID0gZGVudHJ5LT5kX2lub2RlOworCisJcmV0ID0gb21mc19kZWxldGVfZW50cnkoZGVudHJ5KTsKKwlpZiAocmV0KQorCQlnb3RvIGVuZF91bmxpbms7CisKKwlpbm9kZV9kZWNfbGlua19jb3VudChpbm9kZSk7CisJbWFya19pbm9kZV9kaXJ0eShkaXIpOworCitlbmRfdW5saW5rOgorCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgb21mc19ybWRpcihzdHJ1Y3QgaW5vZGUgKmRpciwgc3RydWN0IG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itub21lbV9mcmVlOgorCWZvciAoY291bnQgPSAwOyBjb3VudCA8IGFycmF5X3NpemU7IGNvdW50KyspCisJCWtmcmVlKHNiaS0+c19pbWFwW2NvdW50XSk7CisKKwlrZnJlZShzYmktPnNfaW1hcCk7Citub21lbToKKwlzYmktPnNfaW1hcCA9IE5VTEw7CisJc2JpLT5zX2ltYXBfc2l6ZSA9IDA7CisJcmV0dXJuIC1FTk9NRU07Cit9CisKK2VudW0geworCU9wdF91aWQsIE9wdF9naWQsIE9wdF91bWFzaywgT3B0X2RtYXNrLCBPcHRfZm1hc2sKK307CisKK3N0YXRpYyBtYXRjaF90YWJsZV90IHRva2VucyA9IHsKKwl7T3B0X3VpZCwgInVpZD0ldSJ9LAorCXtPcHRfZ2lkLCAiZ2lkPSV1In0sCisJe09wdF91bWFzaywgInVtYXNrPSVvIn0sCisJe09wdF9kbWFzaywgImRtYXNrPSVvIn0sCisJe09wdF9mbWFzaywgImZtYXNrPSVvIn0sCit9OworCitzdGF0aWMgaW50IHBhcnNlX29wdGlvbnMoY2hhciAqb3B0aW9ucywgc3RydWN0IG9tZnNfc2JfaW5mbyAqc2JpKQoreworCWNoYXIgKnA7CisJc3Vic3RyaW5nX3QgYXJnc1tNQVhfT1BUX0FSR1NdOworCWludCBvcHRpb247CisKKwlpZiAoIW9wdGlvbnMpCisJCXJldHVybiAxOworCisJd2hpbGUgKChwID0gc3Ryc2VwKCZvcHRpb25zLCAiLCIpKSAhPSBOVUxMKSB7CisJCWludCB0b2tlbjsKKwkJaWYgKCEqcCkKKwkJCWNvbnRpbnVlOworCisJCXRva2VuID0gbWF0Y2hfdG9rZW4ocCwgdG9rZW5zLCBhcmdzKTsKKwkJc3dpdGNoICh0b2tlbikgeworCQljYXNlIE9wdF91aWQ6CisJCQlpZiAobWF0Y2hfaW50KCZhcmdzWzBdLCAmb3B0aW9uKSkKKwkJCQlyZXR1cm4gMDsKKwkJCXNiaS0+c191aWQgPSBvcHRpb247CisJCQlicmVhazsKKwkJ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CXJldHVybiBzcHJpbnRmKGJ1ZmZlciwgIiVsZCAweCVseCAweCVseFxuIiwgbnIsIHNwLCBwYyk7CisKKwlyZXR1cm4gc3ByaW50ZihidWZmZXIsCisJCSAgICAgICAiJWxkIDB4JWx4IDB4JWx4IDB4JWx4IDB4JWx4IDB4JWx4IDB4JWx4IDB4JWx4IDB4JWx4XG4iLAorCQkgICAgICAgbnIsCisJCSAgICAgICBhcmdzWzBdLCBhcmdzWzFdLCBhcmdzWzJdLCBhcmdzWzNdLCBhcmdzWzRdLCBhcmdzWzVdLAorCQkgICAgICAgc3AsIHBjKTsKK30KKyNlbmRpZiAvKiBDT05GSUdfSEFWRV9BUkNIX1RSQUNFSE9PSyAqLworCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogICAgICAgICAgICAgICAgICAgICAgIEhlcmUgdGhlIGZzIHBhcnQgYmVnaW5zICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMzc2LDI5ICsyNDAxLDcwIEBACiB9CiAKICNpZmRlZiBDT05GSUdfVEFTS19JT19BQ0NPVU5USU5HCi1zdGF0aWMgaW50IHByb2NfcGlkX2lvX2FjY291bnRpbmcoc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrLCBjaGFyICpidWZmZXIpCitzdGF0aWMgaW50IGRvX2lvX2FjY291bnRpbmcoc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrLCBjaGFyICpidWZmZXIsIGludCB3aG9sZSkKIHsKKwl1NjQgcmNoYXIsIHdjaGFyLCBzeXNjciwgc3lzY3c7CisJc3RydWN0IHRhc2tfaW9fYWNjb3VudGluZyBpb2FjOworCisJcmNoYXIgPSB0YXNrLT5yY2hhcjsKKwl3Y2hhciA9IHRhc2stPndjaGFyOwor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2h0IChDKSAyMDAxICAgICAgIExpbmVvIEluYy4sIGRhdmlkbUBzbmFwZ2Vhci5jb20KLSAqICBDb3B5cmlnaHQgKEMpIDIwMDIgICAgICAgR3JlZyBVbmdlcmVyIChnZXJnQHNuYXBnZWFyLmNvbSkKLSAqICBDb3B5cmlnaHQgKEMpIDIwMDIgICAgICAgWW9zaGlub3JpIFNhdG8gKHlzYXRvQHVzZXJzLnNvdXJjZWZvcmdlLmpwKQotICogIENvcHlyaWdodCAoQykgMjAwNSAgICAgICBIZW5uZXJpY2ggTWljaGFlbCAoaGVubmVyaWNoQGJsYWNrZmluLnVjbGludXgub3JnKQotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmbmRlZiBfQkxBQ0tGSU5fSURFX0gKLSNkZWZpbmUgX0JMQUNLRklOX0lERV9ICi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpZmRlZiBfX0tFUk5FTF9fCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2RlZmluZSBNQVhfSFdJRlMJMQotCi0jaW5jbHVkZSA8YXNtLWdlbmVyaWMvaWRlX2lvcHMuaD4KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZW5kaWYJCQkJLyogX19LRVJORUxfXyAqLwotI2VuZGlmCQkJCS8qIF9CTEFDS0ZJTl9JREVfSCAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FzbS1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G8gKHlzYXRvQHVzZXJzLnNvdXJjZWZvcmdlLmpwKQotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmbmRlZiBfSDgzMDBfSURFX0gKLSNkZWZpbmUgX0g4MzAwX0lERV9ICi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpZmRlZiBfX0tFUk5FTF9fCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2RlZmluZSBNQVhfSFdJRlMJMQotCi0jaW5jbHVkZSA8YXNtLWdlbmVyaWMvaWRlX2lvcHMuaD4KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZW5kaWYgLyogX19LRVJORUxfXyAqLwotI2VuZGlmIC8qIF9IODMwMF9JREVfSCAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FzbS1oODMwMC9rZXlib2FyZC5oIGIvaW5jbHVkZS9hc20taDgzMDAva2V5Ym9hcmQuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggOTBlZmJkNi4uMDAwMDAwMAotLS0gYS9pbmNsdWRlL2FzbS1oODMwMC9rZXlib2FyZC5oCisrKyAvZGV2L251bGwKQEAgLTEsMjQgKzAsMCBAQAotLyoKLSAqICBsaW51eC9pbmNsdWRlL2FzbS1oODMwMC9rZXlib2FyZC5oCi0gKiAgQ3JlYXRlZCAwNCBEZWMgMjAwMSBieSBLaGFsZWQgSGFzc291bmFo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5kaWYKIAorI2lmIGRlZmluZWQgKF9fbWNmaXNhYXBsdXNfXykgfHwgZGVmaW5lZCAoX19tY2Zpc2FjX18pCitzdGF0aWMgaW5saW5lIGludCBmZnModW5zaWduZWQgaW50IHZhbCkKK3sKKyAgICAgICAgaWYgKCF2YWwpCisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisKKyAgICAgICAgYXNtIHZvbGF0aWxlKAorICAgICAgICAgICAgICAgICAgICAgICAgImJpdHJldiAlMFxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAiZmYxICUwXG5cdCIKKyAgICAgICAgICAgICAgICAgICAgICAgIDogIj1kIiAodmFsKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAiMCIgKHZhbCkKKwkJICAgICk7CisgICAgICAgIHZhbCsrOworICAgICAgICByZXR1cm4gdmFsOworfQorCitzdGF0aWMgaW5saW5lIGludCBfX2Zmcyh1bnNpZ25lZCBpbnQgdmFsKQoreworICAgICAgICBhc20gdm9sYXRpbGUoCisgICAgICAgICAgICAgICAgICAgICAgICAiYml0cmV2ICUwXG5cdCIKKyAgICAgICAgICAgICAgICAgICAgICAgICJmZjEgJTBcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgOiAiPWQiICh2YWwpCisgICAgICAgICAgICAgICAgICAgICAgICA6ICIwIiAodmFsKQorCQkgICAgKTsKKyAgICAgICAgcmV0dXJuIHZhbDsKK30KKworI2Vsc2UKICNpbmNsdWRlIDxhc20tZ2VuZXJpYy9iaXRvcHMvZmZzLmg+CiAjaW5jbHVkZSA8YXNtLWdlbmVyaWMvYml0b3BzL19fZmZzLmg+CisjZW5kaWYKKwogI2luY2x1ZGUgPGFzbS1nZW5lcmljL2JpdG9wcy9zY2hlZC5oPgogI2luY2x1ZGUgPGFzbS1nZW5lcmljL2JpdG9wcy9mZnouaD4KIApkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20tbTY4a25vbW11L2J5dGVvcmRlci5oIGIvaW5jbHVkZS9hc20tbTY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lciBzdXBwbHkgLyBldGMuCisJICovCisJdm9pZCAoKmJsYW5rKSAoaW50KTsKK307CisKKyNlbmRpZiAvKiBfQVNNX1NIX1NINzc2MEZCX0ggKi8KZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLXNoL3NoX21vYmlsZV9sY2RjLmggYi9pbmNsdWRlL2FzbS1zaC9zaF9tb2JpbGVfbGNkYy5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjI3Njc3NzI3Ci0tLSAvZGV2L251bGwKKysrIGIvaW5jbHVkZS9hc20tc2gvc2hfbW9iaWxlX2xjZGMuaApAQCAtMCwwICsxLDY2IEBACisjaWZuZGVmIF9fQVNNX1NIX01PQklMRV9MQ0RDX0hfXworI2RlZmluZSBfX0FTTV9TSF9NT0JJTEVfTENEQ19IX18KKworI2luY2x1ZGUgPGxpbnV4L2ZiLmg+CisKK2VudW0geyBSR0I4LCAgIC8qIDI0YnBwLCA4Ojg6OCAqLworICAgICAgIFJHQjksICAgLyogMThicHAsIDk6OSAqLworICAgICAgIFJHQjEyQSwgLyogMjRicHAsIDEyOjEyICovCisgICAgICAgUkdCMTJCLCAvKiAxMmJwcCAqLworICAgICAgIFJHQjE2LCAgLyogMTZicHAgKi8KKyAgICAgICBSR0IxOCwgIC8qIDE4YnBwICovCisgICAgICAgUkdCMjQsICAvKiAyNGJwcCAqLworICAgICAgIFNZUzhBLCAgLyogMjRicHAsIDg6ODo4ICovCisgICAgICAgU1lTOEIsICAvKiAxOGJwcCwgODo4OjIgKi8KKyAgICAgICBTWVM4QywgIC8qIDE4YnBwLCAyOjg6OCAqLworICAgICAgIFNZUzhELCAgLyogMTZicHAsIDg6OCAqLworICAgICAgIFNZUzksICAgLyogMThicHAsIDk6OSAqLworICAgICAgIFNZUzEyLCAgLyogMjRicHAsIDEyOjEyICovCisgICAgICAgU1lTMTZBLCAvKiAxNmJwcCAqLworICAgICAgIFNZUzE2QiwgLyogMThicHAsIDE2OjI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BcCi0JICAgICA6ICI9JnIiIChfX3Ruc19yZXMpCQkJCQkgICAgICBcCi0JICAgICA6ICJnIiAoKChucikgJiAweDcpICsgMHgxMjMpLAkJCQkgICAgICBcCi0JICAgICAgICJtIiAoKigoY2hhciAqKShhZGRyKSArICgobnIpID4+IDMpKSkJCQkgICAgICBcCi0JICAgICA6ICJtZW1vcnkiKTsJCQkJCQkgICAgICBcCi0gICAgIF9fdG5zX3JlczsJCQkJCQkJCSAgICAgIFwKLSAgfSkKLSNkZWZpbmUgX192YXJfdG5zX2JpdF9vcChvcCwgbnIsIGFkZHIpCQkJCQkgICAgICBcCi0gICh7IGludCBfX25yID0gKG5yKTsJCQkJCQkJICAgICAgXAotICAgICBpbnQgX190bnNfcmVzOwkJCQkJCQkgICAgICBcCi0gICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgJCQkJCQkgICAgICBcCi0JICAgICAidHN0MSAlMSwgWyUyXTsgc2V0ZiBueiwgJTA7ICIgb3AgIiAlMSwgWyUyXSIJCSAgICAgIFwKLQkgICAgICA6ICI9JnIiIChfX3Ruc19yZXMpCQkJCQkgICAgICBcCi0JICAgICAgOiAiciIgKF9fbnIgJiAweDcpLAkJCQkJICAgICAgXAotCQkiciIgKChjaGFyICopKGFkZHIpICsgKF9fbnIgPj4gMykpCQkJICAgICAgXAotCSAgICAgIDogIm1lbW9yeSIpOwkJCQkJCSAgICAgIFwKLSAgICAgX190bnNfcmVzOwkJCQkJCQkJICAgICAgXAotICB9KQotI2RlZmluZSBfX3Ruc19iaXRfb3Aob3AsIG5yLCBhZGRyKQkJCQkJXAotICAoKF9fYnVpbHRpbl9jb25zdGFudF9wIChucikgJiYgKHVuc2lnbmVkKShucikgPD0gMHg3RkZGRikJCVwKLSAgID8gX19jb25zdF90bnNfYml0X29wIChvcCwgbnIsIGFkZHIpCQkJCQlcCi0gICA6IF9fdmFyX3Ruc19iaXRfb3AgKG9wLCBuciwgYWRkcikpCi0jZGVmaW5lIF9fdG5zX2F0b21p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kFDSyAgICAgICAyCi0jZGVmaW5lIEZEQzE3NzJSRUdfU0VDVE9SICAgICAgNAotI2RlZmluZSBGREMxNzcyUkVHX0RBVEEgICAgICAgICAgICAgICAgNgotCi0vKiBjb21tYW5kIG9wY29kZXMgKi8KLQotI2RlZmluZSBGREMxNzcyQ01EX1JFU1RPUkUgICgweDAwKSAgIC8qICAtICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfU0VFSyAgICAgKDB4MTApICAgLyogICB8ICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgRkRDMTc3MkNNRF9TVEVQICAgICAoMHgyMCkgICAvKiAgIHwgIFRZUCAxIENvbW1hbmRzICAqLwotI2RlZmluZSBGREMxNzcyQ01EX1NUSU4gICAgICgweDQwKSAgIC8qICAgfCAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfU1RPVCAgICAgKDB4NjApICAgLyogIC0gICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgRkRDMTc3MkNNRF9SRFNFQyAgICAoMHg4MCkgICAvKiAgLSAgIFRZUCAyIENvbW1hbmRzICAqLwotI2RlZmluZSBGREMxNzcyQ01EX1dSU0VDICAgICgweGEwKSAgIC8qICAtICAgICAgICAgICIgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfUkRBRFIgICAgKDB4YzApICAgLyogIC0gICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgRkRDMTc3MkNNRF9SRFRSQSAgICAoMHhlMCkgICAvKiAgIHwgIFRZUCAzIENvbW1hbmRzICAqLwotI2RlZmluZSBGREMxNzcyQ01EX1dSVFJBICAgICgweGYwKSAgIC8qICAtICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfRk9SQ0kgICAgKDB4ZDApICAgLyogIC0gICBUWVAgNCBDb21tYW5kICAgKi8KLQotLyogY29tbWFuZCBtb2RpZmllciBiaXRzICovCi0KLSNkZ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