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z3Bpby50eHQgYi9Eb2N1bWVudGF0aW9uL2J0OHh4Z3Bpby50eHQKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZDgyOTdlNAotLS0gL2Rldi9udWxsCisrKyBiL0RvY3VtZW50YXRpb24vYnQ4eHhncGlvLnR4dApAQCAtMCwwICsxLDY3IEBACis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKz09ICBCVDhYWEdQSU8gZHJpdmVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PQorPT0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09Cis9PSAgQSBkcml2ZXIgZm9yIGEgc2VsZm1hZGUgY2hlYXAgQlQ4eHggYmFzZWQgUENJIEdQSU8tY2FyZCAgPT0KKz09ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PQorPT0gIEZvciBhZHZhbmNlZCBkb2N1bWVudGF0aW9uLCBzZWUgICAgICAgICAgICAgICAgICAgICAgICAgID09Cis9PSAgaHR0cDovL3d3dy5idTNzY2guZGUvYnRncGlvLnBocCAgICAgICAgICAgICAgICAgICAgICAgICAgPT0KKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorCisKK0EgZ2VuZXJpYyBkaWdpdGFsIDI0LXBvcnQgUENJIEdQSU8gY2FyZCBjYW4gYmUgYnVpbHQgb3V0IG9mIGFuIG9yZGluYXJ5CitCcm9va3RyZWUgYnQ4NDgsIGJ0ODQ5LCBidDg3OCBvciBidDg3OSBiYXNlZCBhbmFsb2cgVFYgdHVuZXIgY2FyZC4gVGhlCitCcm9va3RyZWUgY2hpcCBpcyB1c2VkIGluIG9sZCBhbmFsb2cgSGF1cHBhdWdlIFdpblRWIFBDSSBj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ICAgICAgICAgICAgICAgICAgIDAgMCAwIDAgMCAwIDAgMCAwIDAgMSAxICAgICAxIDEgMSAxIDEgMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxICAgICAyIDMgNCA1IDYgNworICAgICAgICAgICB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwKKyAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBeICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGluIDg2ICAgICAgICAgICAgICAgICAgICAgICAgICAgcGluIDY3ICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaW4gNjEgPiAgfC0tIEcxOAorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLSBHMTkKKyAgICAgICAgIC0tfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8LS0gRzIwCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tIEcyMQorICAgICAgICAgLS18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwtLSBHMjIKKyAgICAgICAgIC0tfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpbiA1NiA+ICB8LS0gRzIzCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICBCcm9va3RyZWUgODc4Lzg3OSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICBPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfC0tCisgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgICAgICB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwgfCB8IHwKKyAgICAgICAg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B0byB0aGUgYXR0cmlidXRlCisJcmF0ZSBpcyBzZXQgYnkgd3JpdGluZyBhIG1pbmltdW0gYmFuZHdpZHRoIGluIGJ5dGVzL3NlYyB0byB0aGUgYXR0cmlidXRlCiAJZmlsZS4gVGhlIHJhdGUgd2lsbCBiZSB0cmFuc2xhdGVkIHRvIGFuIGludGVybmFsIHZhbHVlIHRoYXQgZ2l2ZXMgYXQKIAlsZWFzdCB0aGUgc3BlY2lmaWVkIHJhdGUuCiAKQEAgLTUzNyw3ICs0NzIsNiBAQAogCW1vdGhlcmJvYXJkIHNwZWNpZmljIGFuZCBkZXRlcm1pbmF0aW9uIG9mIHRoaXMgaW5mb3JtYXRpb24KIAltdXN0IG9jY3VyIGluIHVzZXJsYW5kIGF0IHRoaXMgdGltZS4KIAotCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiBTWVNURU0gTE9HR0lORwogCkBAIC01NzAsNyArNTA0LDYgQEAKIGRyaXZlci1zcGVjaWZpYyBlcnJvciBtZXNzYWdlLgogCiAKLQogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogUENJIEJ1cyBQYXJpdHkgRGV0ZWN0aW9uCiAKQEAgLTYwNCw2ICs1MzcsNzQgQEAKIAllY2hvICIwIiA+L3N5cy9kZXZpY2VzL3N5c3RlbS9lZGFjL3BjaS9jaGVja19wY2lfcGFyaXR5CiAKIAorUGFyaXR5IENvdW50OgorCisJJ3BjaV9wYXJpdHlfY291bnQnCisKKwlUaGlzIGF0dHJpYnV0ZSBmaWxlIHdpbGwgZGlzcGxheSB0aGUgbnVtYmVyIG9mIHBhcml0eSBlcnJvcnMgdGhhdAorCWhhdmUgYmVlbiBkZXRlY3RlZC4KKworCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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mdpbiAgID0gMTYsICAgLyogSFNZTlNUQVJUIC0gWFJFUyAqLworICAgICAgIC51cHBlcl9tYXJnaW4gICA9IDMzLCAgIC8qIFZUT1QgLSAoVlNZTkxFTiArIFZTWU5TVEFSVCkgKi8KKyAgICAgICAubG93ZXJfbWFyZ2luICAgPSAxMCwgICAvKiBWU1lOU1RBUlQgLSBZUkVTICovCisgICAgICAgLnN5bmMgICAgICAgICAgID0gRkJfU1lOQ19IT1JfSElHSF9BQ1QgfCBGQl9TWU5DX1ZFUlRfSElHSF9BQ1QsCisgICAgICAgLnZtb2RlICAgICAgICAgID0gRkJfVk1PREVfTk9OSU5URVJMQUNFRCwKKyAgICAgICAuZmxhZyAgICAgICAgICAgPSAwLAorfTsKKworc3RhdGljIHN0cnVjdCBzaDc3NjBmYl9wbGF0ZGF0YSBzaDc3NjBmYl9ubDY0NDggPSB7CisgICAgICAgLmRlZl9tb2RlICAgICAgID0gJm5sNjQ0OGJjMjYsCisgICAgICAgLmxkbXRyICAgICAgICAgID0gTERNVFJfVEZUX0NPTE9SXzE2LCAgIC8qIDE2Yml0IFRGVCBwYW5lbCAqLworICAgICAgIC5sZGRmciAgICAgICAgICA9IExEREZSXzhCUFAsICAgICAgICAgICAvKiB3ZSB3YW50IDhiaXQgb3V0cHV0ICovCisgICAgICAgLmxkcG1tciAgICAgICAgID0gMHgwMDcwLAorICAgICAgIC5sZHBzcHIgICAgICAgICA9IDB4MDUwMCwKKyAgICAgICAubGRhY2xuciAgICAgICAgPSAwLAorICAgICAgIC5sZGlja3IgICAgICAgICA9IExESUNLUl9DTEtTUkMoTENEQ19DTEtTUkNfRVhURVJOQUwpIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICBMRElDS1JfQ0xLRElWKDEpLAorICAgICAgIC5yb3RhdGUgICAgICAgICA9IDAsCisgICAgICAgLm5vdnN5bmMgICAgICAgID0gMSwKKyAgICAgICAuYmxhbmsgICAgICAgICAgPSBOVUxMLAorfTsKKworLyogU0g3NzYwOgorICogMHhGRTMwMDgwMDogMjU2ICogNGJ5dGUgeFJHQiBwYWxldHRlIHJhbQorICogMHhGRTMwMEMwMDogNDIgYnl0ZXMgY3RybCByZWdpc3RlcnMKKyAqLworc3RhdGljIHN0cnVjdCByZXNvdXJjZSBzaDc3NjBfbGNkY19yZXNbXSA9IHsKKyAgICAgICBbMF0gPSB7CisgICAgICAgICAgICAgICAuc3RhcnQgID0gMHhGRTMwMDgwMCwKKyAgICAgICAgICAgICAgIC5lbmQgICAgPSAweEZFMzAwQ0ZGLAorICAgICAgICAgICAgICAgLmZsYWdzICA9IElPUkVTT1VSQ0VfTUVNLAorICAgICAgIH0sCisgICAgICAgWzFdID0geworICAgICAgICAgICAgICAgLnN0YXJ0ICA9IDY1LAorICAgICAgICAgICAgICAgLmVuZCAgICA9IDY1LAorICAgICAgICAgICAgICAgLmZsYWdzICA9IElPUkVTT1VSQ0VfSVJRLAorICAgICAgIH0sCit9OworCitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSBzaDc3NjBfbGNkY19kZXYgPSB7CisgICAgICAgLmRldiAgICA9IHsKKyAgICAgICAgICAgICAgIC5wbGF0Zm9ybV9kYXRhID0gJnNoNzc2MGZiX25sNjQ0OCwKKyAgICAgICB9LAorICAgICAgIC5uYW1lICAgICAgICAgICA9ICJzaDc3NjAtbGNkYyIsCisgICAgICAgLmlkICAgICAgICAgICAgID0gLTEsCisgICAgICAgLnJlc291cmNlICAgICAgID0gc2g3NzYwX2xjZGNfcmVzLAorICAgICAgIC5udW1fcmVzb3VyY2VzICA9IEFSUkFZX1NJWkUoc2g3NzYwX2xjZGNfcmVzKSwKK307CisKKz09PT09PT09PT09PT09PT09PT09PT0gY3V0IGhlcmUgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZmIvdHJpZGVudGZiLnR4dCBiL0RvY3VtZW50YXRpb24vZmIvdHJpZGVudGZiLnR4dApp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plOyAgICAgICAgICAgICAvKiBzaXplIG9mIHVzZWZ1bCBkYXRhIGFmdGVyIGhlYWRlciAqLworICAgICAgICBfX2JlMTYgaF9jcmM7ICAgICAgICAgICAgICAgICAgIC8qIGNyYy1jY2l0dCBvZiBib2R5X3NpemUgYnl0ZXMgKi8KKyAgICAgICAgY2hhciBoX2ZpbGwxWzJdOworICAgICAgICB1OCBoX3ZlcnNpb247ICAgICAgICAgICAgICAgICAgIC8qIHZlcnNpb24sIGFsd2F5cyAxICovCisgICAgICAgIGNoYXIgaF90eXBlOyAgICAgICAgICAgICAgICAgICAgLyogT01GU19JTk9ERV9YICovCisgICAgICAgIHU4IGhfbWFnaWM7ICAgICAgICAgICAgICAgICAgICAgLyogT01GU19JTUFHSUMgKi8KKyAgICAgICAgdTggaF9jaGVja194b3I7ICAgICAgICAgICAgICAgICAvKiBYT1Igb2YgaGVhZGVyIGJ5dGVzIGJlZm9yZSB0aGlzICovCisgICAgICAgIF9fYmUzMiBoX2ZpbGwyOworfTsKKworRmlsZXMgYW5kIGRpcmVjdG9yaWVzIGFyZSBib3RoIHJlcHJlc2VudGVkIGJ5IG9tZnNfaW5vZGU6CisKK3N0cnVjdCBvbWZzX2lub2RlIHsKKyAgICAgICAgc3RydWN0IG9tZnNfaGVhZGVyIGlfaGVhZDsgICAgICAvKiBoZWFkZXIgKi8KKyAgICAgICAgX19iZTY0IGlfcGFyZW50OyAgICAgICAgICAgICAgICAvKiBwYXJlbnQgY29udGFpbmluZyB0aGlzIGlub2RlICovCisgICAgICAgIF9fYmU2NCBpX3NpYmxpbmc7ICAgICAgICAgICAgICAgLyogbmV4dCBpbm9kZSBpbiBoYXNoIGJ1Y2tldCAqLworICAgICAgICBfX2JlNjQgaV9jdGltZTsgICAgICAgICAgICAgICAgIC8qIGN0aW1lLCBpbiBtaWxsaXNlY29uZHMgKi8KKyAgICAgICAgY2hhciBpX2ZpbGwxWzM1XTsKKyAgICAgICAgY2hhciBpX3R5cGU7ICAgICAgICAgIC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3VtZW50YXRpb24vbW94YS1zbWFydGlvCkBAIC0xLDE0ICsxLDIyIEBACiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi0JTU9YQSBTbWFydGlvIEZhbWlseSBEZXZpY2UgRHJpdmVyIFZlciAxLjEgSW5zdGFsbGF0aW9uIEd1aWRlCi0JCSAgICBmb3IgTGludXggS2VybmVsIDIuMi54IGFuZCAyLjAuM3gKLQkgICAgICAgQ29weXJpZ2h0IChDKSAxOTk5LCBNb3hhIFRlY2hub2xvZ2llcyBDbywgTHRkLgorICAgICAgICAgIE1PWEEgU21hcnRpby9JbmR1c3RpbyBGYW1pbHkgRGV2aWNlIERyaXZlciBJbnN0YWxsYXRpb24gR3VpZGUKKwkJICAgIGZvciBMaW51eCBLZXJuZWwgMi40LngsIDIuNi54CisJICAgICAgIENvcHlyaWdodCAoQykgMjAwOCwgTW94YSBJbmMuCiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorRGF0ZTogMDEvMjEvMjAwOAorCiBDb250ZW50CiAKIDEuIEludHJvZHVjdGlvbgogMi4gU3lzdGVtIFJlcXVpcmVtZW50CiAzLiBJbnN0YWxsYXRpb24KKyAgIDMuMSBIYXJkd2FyZSBpbnN0YWxsYXRpb24KKyAgIDMuMiBEcml2ZXIgZmlsZXMKKyAgIDMuMyBEZXZpY2UgbmFtaW5nIGNvbnZlbnRpb24KKyAgIDMuNCBNb2R1bGUgZHJpdmVyIGNvbmZpZ3VyYXRpb24KKyAgIDMuNSBTdGF0aWMgZHJpdmVyIGNvbmZpZ3VyYXRpb24gZm9yIExpbnV4IGtlcm5lbCAyLjQueCBhbmQgMi42LnguCisgICAzLjYgQ3VzdG9tIGNvbmZpZ3VyYXRpb24KKyAgIDMuNyBWZXJpZnkgZHJpdmVyIGluc3RhbGxhdG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W4vaG90cGx1ZyIKK0NPTkZJR19TVEFOREFMT05FPXkKK0NPTkZJR19QUkVWRU5UX0ZJUk1XQVJFX0JVSUxEPXkKK0NPTkZJR19GV19MT0FERVI9bQorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorQ09ORklHX0NPTk5FQ1RPUj1tCitDT05GSUdfTVREPXkKKyMgQ09ORklHX01URF9ERUJVRyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ09OQ0FUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEFSVElUSU9OUz15CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ01ETElORV9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUZTX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BUjdfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorIyBDT05GSUdfTVREX0JMS0RFVlMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DS19STyBpcyBub3Qgc2V0CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorQ09ORklHX01URF9DRklfQURWX09QVElPTlM9eQorQ09ORklHX01URF9DRklfTk9TV0FQPXkKKyMgQ09ORklHX01URF9DRklfQkVfQllURV9TV0FQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfTEVfQllURV9TV0FQIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0dFT01FVFJZPXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKKyMgQ09ORklHX01URF9DRklfSTIgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PVFAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQorIyBDT05GSUdfTVREX0NGSV9BTURTVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorQ09ORklHX01URF9YSVA9eQorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEhZU01BUD15CitDT05GSUdfTVREX1BIWVNNQVBfU1RBUlQ9MHgwCitDT05GSUdfTVREX1BIWVNNQVBfTEVOPTB4MAorQ09ORklHX01URF9QSFlTTUFQX0JBTktXSURUSD0yCisjIENPTkZJR19NVERfUFhBMlhYIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BUk1fSU5URUdSQVRPUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0hBUlBfU0wgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX0RBVEFGTEFTSCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTTI1UDgwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgVUJJIC0gVW5zb3J0ZWQgYmxvY2sgaW1hZ2VzCisjCisjIENPTkZJR19NVERfVUJJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BBUlBPUlQgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVY9eQorIyBDT05GSUdfQkxLX0RFVl9DT1dfQ09NTU9OI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kZJR19TUElfU1BJREVWIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSV9UTEU2MlgwIGlzIG5vdCBzZXQKK0NPTkZJR19IQVZFX0dQSU9fTElCPXkKKworIworIyBHUElPIFN1cHBvcnQKKyMKKworIworIyBJMkMgR1BJTyBleHBhbmRlcnM6CisjCisjIENPTkZJR19HUElPX1BDQTk1M1ggaXMgbm90IHNldAorIyBDT05GSUdfR1BJT19QQ0Y4NTdYIGlzIG5vdCBzZXQKKworIworIyBTUEkgR1BJTyBleHBhbmRlcnM6CisjCisjIENPTkZJR19HUElPX01DUDIzUzA4IGlzIG5vdCBzZXQKKyMgQ09ORklHX1cxIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BPV0VSX1NVUFBMWSBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisKKyMKKyMgU29uaWNzIFNpbGljb24gQmFja3BsYW5lCisjCitDT05GSUdfU1NCX1BPU1NJQkxFPXkKKyMgQ09ORklHX1NTQiBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGlmdW5jdGlvbiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTUZEX0NPUkUgaXMgbm90IHNldAorIyBDT05GSUdfTUZEX1NNNTAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01GRF9BU0lDMyBpcyBub3Qgc2V0CisjIENPTkZJR19IVENfRUdQSU8gaXMgbm90IHNldAorIyBDT05GSUdfSFRDX1BBU0lDMyBpcyBub3Qgc2V0CisjIENPTkZJR19NRkRfVEM2MzkzWEIgaXMgbm90IHNldAorQ09ORklHX0VaWF9QQ0FQPXkKKworIworIyBNdWx0aW1lZGlhIGRldmljZXMKKyMKKworIworIyBNdWx0aW1lZGlhIGNvcmUgc3VwcG9ydAorIworQ09ORklHX1ZJREVPX0RFVj1tCitDT05GSUdfVklERU9fVjRMMl9DT01NT049bQorQ09ORklHX1ZJREVPX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oL2FybS9tYWNoLXB4YS9jbG9jay5oCkBAIC00Nyw5ICs0Nyw0MiBAQAogCQkub3RoZXIJPSBfb3RoZXIsCQkJXAogCX0KIAorI2RlZmluZSBJTklUX0NMSyhfbmFtZSwgX29wcywgX3JhdGUsIF9kZWxheSwgX2RldikgICAgICBcCisJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkubmFtZSAgID0gX25hbWUsICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuZGV2ICAgID0gX2RldiwgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkub3BzICAgID0gX29wcywgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkucmF0ZSAgID0gX3JhdGUsICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkuZGVsYXkJPSBfZGVsYXksCQkJXAorCX0KKwogZXh0ZXJuIGNvbnN0IHN0cnVjdCBjbGtvcHMgY2xrX2NrZW5fb3BzOwogCiB2b2lkIGNsa19ja2VuX2VuYWJsZShzdHJ1Y3QgY2xrICpjbGspOwogdm9pZCBjbGtfY2tlbl9kaXNhYmxlKHN0cnVjdCBjbGsgKmNsayk7CiAKKyNpZmRlZiBDT05GSUdfUFhBM3h4CisjZGVmaW5lIFBYQTN4eF9DS0VOKF9uYW1lLCBfY2tlbiwgX3JhdGUsIF9kZWxheSwgX2RldikJXAorCXsJCQkJCQlcCisJCS5uYW1lCT0gX25hbWUsCQkJXAorCQkuZGV2CT0gX2RldiwJCQkJXAorCQkub3BzCT0gJmNsa19weGEzeHhfY2tlbl9vcHMsCQlcCisJCS5yYXRlCT0gX3JhdGUsCQkJXAorCQkuY2tlbgk9IENLRU5fIyNfY2tlbiwJCQlcCisJCS5kZWxheQk9IF9kZWxheSwJCQlcCisJfQorCisjZGVmaW5lIFBYQTN4eF9DSyhfbmFtZSwgX2NrZW4sIF9vcHMsIF9kZXYpCQlcCisJewkJCQkJCVwKKwkJLm5hbWUJPSBfbmFtZSwJCQlcC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XgvcGxhdGZvcm1fZGV2aWNlLmg+CisKKyNpbmNsdWRlIDxhc20vbWFjaC10eXBlcy5oPgorCisjaW5jbHVkZSA8dmlkZW8vdzEwMGZiLmg+CisKK3N0YXRpYyBzdHJ1Y3QgdzEwMF9nZW5fcmVncyBlODAwX2xjZF9yZWdzID0geworCS5sY2RfZm9ybWF0ID0gICAgICAgICAgICAweDAwMDA4MDAzLAorCS5sY2RkX2NudGwxID0gICAgICAgICAgICAweDAyYTAwMDAwLAorCS5sY2RkX2NudGwyID0gICAgICAgICAgICAweDAwMDNmZmZmLAorCS5nZW5sY2RfY250bDEgPSAgICAgICAgICAweDAwMGZmMmEzLAorCS5nZW5sY2RfY250bDIgPSAgICAgICAgICAweDAwMDAwMmEzLAorCS5nZW5sY2RfY250bDMgPSAgICAgICAgICAweDAwMDEwMmFhLAorfTsKKworc3RhdGljIHN0cnVjdCB3MTAwX21vZGUgZTgwMF9sY2RfbW9kZVsyXSA9IHsKKwlbMF0gPSB7CisJCS54cmVzICAgICAgICAgICAgPSA0ODAsCisJCS55cmVzICAgICAgICAgICAgPSA2NDAsCisJCS5sZWZ0X21hcmdpbiAgICAgPSA1MiwKKwkJLnJpZ2h0X21hcmdpbiAgICA9IDE0OCwKKwkJLnVwcGVyX21hcmdpbiAgICA9IDIsCisJCS5sb3dlcl9tYXJnaW4gICAgPSA2LAorCQkuY3J0Y19zcyAgICAgICAgID0gMHg4MDM1MDAzNCwKKwkJLmNydGNfbHMgICAgICAgICA9IDB4ODAyYjAwMjYsCisJCS5jcnRjX2dzICAgICAgICAgPSAweDgwMTYwMDE2LAorCQkuY3J0Y192cG9zX2dzICAgID0gMHgwMDAyMDAwMywKKwkJLmNydGNfcmV2ICAgICAgICA9IDB4MDA0MDAwMWQsCisJCS5jcnRjX2RjbGsgICAgICAgPSAweGUwMDAwMDAwLAorCQkuY3J0Y19nY2xrICAgICAgID0gMHg4MmE1MDA0OSwKKwkJLmNydGNfZ29lICAgICAgICA9IDB4ODBlZT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yY2gvcHhhZmIuaD4KKyNpbmNsdWRlIDxhc20vYXJjaC9weGEtcmVncy5oPgorI2luY2x1ZGUgPGFzbS9hcmNoL21mcC1weGEyN3guaD4KKyNpbmNsdWRlIDxhc20vYXJjaC9pcmRhLmg+CisjaW5jbHVkZSA8YXNtL2FyY2gvcHhhMjd4X2tleXBhZC5oPgorI2luY2x1ZGUgPGFzbS9hcmNoL3VkYy5oPgorCisjaW5jbHVkZSAiZ2VuZXJpYy5oIgorI2luY2x1ZGUgImRldmljZXMuaCIKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUGluIGNvbmZpZ3VyYXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdW5zaWduZWQgbG9uZyBwYWxtdHhfcGluX2NvbmZpZ1tdIF9faW5pdGRhdGEgPSB7CisJLyogTU1DICovCisJR1BJTzMyX01NQ19DTEssCisJR1BJTzkyX01NQ19EQVRfMCwKKwlHUElPMTA5X01NQ19EQVRfMSwKKwlHUElPMTEwX01NQ19EQVRfMiwKKwlHUElPMTExX01NQ19EQVRfMywKKwlHUElPMTEyX01NQ19DTUQsCisKKwkvKiBBQzk3ICovCisJR1BJTzI4X0FDOTdfQklUQ0xLLAorCUdQSU8yOV9BQzk3X1NEQVRBX0lOXzAsCisJR1BJTzMwX0FDOTdfU0RBVEFfT1VULAorCUdQSU8zMV9BQzk3X1NZTkMsCisKKwkvKiBJckRBICovCisJR1BJTzQ2X0ZJQ1BfUlhELAorCUdQSU80N19GSUNQX1RYRCwKKworCS8qIFBXTSAqLworCUdQSU8xNl9QV00wX09VVCwKKworCS8qIFVTQiAqLworCUdQSU8xM19HUElPLAorCisJLyogUENNQ0lBICovCisJR1BJTzQ4X25QT0UsCisJR1BJTzQ5X25QV0UsCisJR1BJTzUwX25QSU9SLAorCUdQSU81MV9uUElPVywKKwlHUElPODVfblBDRV8xLAorCUdQSU81NF9uUENFXzIsCisJR1BJTzc5X1BTS1RTRUwsCisJR1BJTzU1X25QUkVHLAorCUdQSU81Nl9uUFdBSVQsCisJR1BJTzU3X25JT0lTMTYsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTRC9NTUMgY2FyZCBjb250cm9sbGVyCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBwYWxtdHhfbWNpX2luaXQoc3RydWN0IGRldmljZSAqZGV2LCBpcnFfaGFuZGxlcl90IHBhbG10eF9kZXRlY3RfaW50LAorCQkJCXZvaWQgKmRhdGEpCit7CisJaW50IGVyciA9IDA7CisKKwkvKiBTZXR1cCBhbiBpbnRlcnJ1cHQgZm9yIGRldGVjdGluZyBjYXJkIGluc2VydC9yZW1vdmUgZXZlbnRzICovCisJZXJyID0gcmVxdWVzdF9pcnEoSVJRX0dQSU9fUEFMTVRYX1NEX0RFVEVDVF9OLCBwYWxtdHhfZGV0ZWN0X2ludCwKKwkJCUlSUUZfRElTQUJMRUQgfCBJUlFGX1NBTVBMRV9SQU5ET00gfAorCQkJSVJRRl9UUklHR0VSX0ZBTExJTkcgfCBJUlFGX1RSSUdHRVJfUklTSU5HLAorCQkJIlNEL01NQyBjYXJkIGRldGVjdCIsIGRhdGEpOworCWlmIChlcnIpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICIlczogY2Fubm90IHJlcXVlc3QgU0QvTU1DIGNhcmQgZGV0ZWN0IElSUVxuIiwKKwkJCQlfX2Z1bmNfXyk7CisJCXJldHVybiBlcnI7CisJfQorCisJZXJyID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfUEFMTVRYX1NE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SX1BBTE1UWF9TRF9SRUFET05MWSk7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcHhhbWNpX3BsYXRmb3JtX2RhdGEgcGFsbXR4X21jaV9wbGF0Zm9ybV9kYXRhID0geworCS5vY3JfbWFzawk9IE1NQ19WRERfMzJfMzMgfCBNTUNfVkREXzMzXzM0LAorCS5zZXRwb3dlcgk9IHBhbG10eF9tY2lfcG93ZXIsCisJLmdldF9ybwkJPSBwYWxtdHhfbWNpX2dldF9ybywKKwkuaW5pdCAJCT0gcGFsbXR4X21jaV9pbml0LAorCS5leGl0CQk9IHBhbG10eF9tY2lfZXhpdCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEdQSU8ga2V5Ym9hcmQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdW5zaWduZWQgaW50IHBhbG10eF9tYXRyaXhfa2V5c1tdID0geworCUtFWSgwLCAwLCBLRVlfUE9XRVIpLAorCUtFWSgwLCAxLCBLRVlfRjEpLAorCUtFWSgwLCAyLCBLRVlfRU5URVIpLAorCisJS0VZKDEsIDAsIEtFWV9GMiksCisJS0VZKDEsIDEsIEtFWV9GMyksCisJS0VZKDEsIDIsIEtFWV9GNCksCisKKwlLRVkoMiwgMCwgS0VZX1VQKSwKKwlLRVkoMiwgMiwgS0VZX0RPV04pLAorCisJS0VZKDMsIDAsIEtFWV9SSUdIVCksCisJS0VZKDMsIDIsIEtFWV9MRUZUKSwKKworfTsKKworc3RhdGljIHN0cnVjdCBweGEyN3hfa2V5cGFkX3BsYXRmb3JtX2RhdGEgcGFsbXR4X2tleXBhZF9wbGF0Zm9ybV9kYXRhID0geworCS5tYXRyaXhfa2V5X3Jvd3MJPSA0LAorCS5tYXRyaXhfa2V5X2NvbHMJPSAzLAorCS5tYXRyaXhfa2V5X21hcAkJPSBwYWxtdHhfbWF0cml4X2tleXMsCisJLm1hdHJpeF9rZXlfbWFwX3NpemUJPSBBUlJBWV9TSVpFKHBhbG10eF9tYXRyaXhfa2V5cyksCisKKwkuZGVib3VuY2VfaW50ZXJ2YWwJPSAzMCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEdQSU8ga2V5cworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgZ3Bpb19rZXlzX2J1dHRvbiBwYWxtdHhfcHhhX2J1dHRvbnNbXSA9IHsKKwl7S0VZX0Y4LCBHUElPX05SX1BBTE1UWF9IT1RTWU5DX0JVVFRPTl9OLCAxLCAiSG90U3luYyBCdXR0b24iIH0sCit9OworCitzdGF0aWMgc3RydWN0IGdwaW9fa2V5c19wbGF0Zm9ybV9kYXRhIHBhbG10eF9weGFfa2V5c19kYXRhID0geworCS5idXR0b25zCT0gcGFsbXR4X3B4YV9idXR0b25zLAorCS5uYnV0dG9ucwk9IEFSUkFZX1NJWkUocGFsbXR4X3B4YV9idXR0b25zKSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlIHBhbG10eF9weGFfa2V5cyA9IHsKKwkubmFtZQk9ICJncGlvLWtleXMiLAorCS5pZAk9IC0xLAorCS5kZXYJPSB7CisJCS5wbGF0Zm9ybV9kYXRhID0gJnBhbG10eF9weGFfa2V5c19kYXRhLAorCX0sCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBCYWNrbGlnaHQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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JUl9PRkYsCisJLnRyYW5zY2VpdmVyX21vZGUJPSBwYWxtdHhfaXJkYV90cmFuc2NlaXZlcl9tb2RlLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVURDCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgcGFsbXR4X3VkY19jb21tYW5kKGludCBjbWQpCit7CisJZ3Bpb19zZXRfdmFsdWUoR1BJT19OUl9QQUxNVFhfVVNCX1BPV0VSLCAhY21kKTsKKwl1ZGVsYXkoNTApOworCWdwaW9fc2V0X3ZhbHVlKEdQSU9fTlJfUEFMTVRYX1VTQl9QVUxMVVAsICFjbWQpOworfQorCitzdGF0aWMgc3RydWN0IHB4YTJ4eF91ZGNfbWFjaF9pbmZvIHBhbG10eF91ZGNfaW5mbyBfX2luaXRkYXRhID0geworCS5ncGlvX3ZidXMJCT0gR1BJT19OUl9QQUxNVFhfVVNCX0RFVEVDVF9OLAorCS5ncGlvX3ZidXNfaW52ZXJ0ZWQJPSAxLAorCS51ZGNfY29tbWFuZAkJPSBwYWxtdHhfdWRjX2NvbW1hbmQsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQb3dlciBzdXBwbHkKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHBvd2VyX3N1cHBseV9pbml0KHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKwlpbnQgcmV0OworCisJcmV0ID0gZ3Bpb19yZXF1ZXN0KEdQSU9fTlJfUEFMTVRYX1BPV0VSX0RFVEVDVCwgIk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aXNfdXNiX29ubGluZSwKKwkuZXhpdCAgICAgICAgICAgID0gcG93ZXJfc3VwcGx5X2V4aXQsCisJLnN1cHBsaWVkX3RvICAgICA9IHBhbG10eF9zdXBwbGljYW50cywKKwkubnVtX3N1cHBsaWNhbnRzID0gQVJSQVlfU0laRShwYWxtdHhfc3VwcGxpY2FudHMpLAorfTsKKworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgcG93ZXJfc3VwcGx5ID0geworCS5uYW1lID0gInBkYS1wb3dlciIsCisJLmlkICAgPSAtMSwKKwkuZGV2ICA9IHsKKwkJLnBsYXRmb3JtX2RhdGEgPSAmcG93ZXJfc3VwcGx5X2luZm8sCisJfSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEZyYW1lYnVmZmVyCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBweGFmYl9tb2RlX2luZm8gcGFsbXR4X2xjZF9tb2Rlc1tdID0geworeworCS5waXhjbG9jawk9IDU3NjkyLAorCS54cmVzCQk9IDMyMCwKKwkueXJlcwkJPSA0ODAsCisJLmJwcAkJPSAxNiwKKworCS5sZWZ0X21hcmdpbgk9IDMyLAorCS5yaWdodF9tYXJnaW4JPSAxLAorCS51cHBlcl9tYXJnaW4JPSA3LAorCS5sb3dlcl9tYXJnaW4JPSAxLAorCisJLmhzeW5jX2xlbgk9IDQsCisJLnZzeW5jX2xlbgk9IDEsCit9LAorfTsKKworc3RhdGljIHN0cnVjdCBweGFmYl9tYWNoX2luZm8gcGFsbXR4X2xjZF9zY3JlZW4gPSB7CisJLm1vZGVzCQk9IHBhbG10eF9sY2RfbW9kZXMsCisJLm51bV9tb2Rlcwk9IEFSUkFZX1NJWkUocGFsbXR4X2xjZF9tb2RlcyksCisJLmxjZF9jb25uCT0gTENEX0NPTE9SX1RGVF8xNkJQUCB8IExDRF9QQ0xLX0VER0VfRkFMTCwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIE1hY2hpbmUgaW5pdAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpkZXZpY2VzW10gX19pbml0ZGF0YSA9IHsKKyNpZiBkZWZpbmVkKENPTkZJR19LRVlCT0FSRF9HUElPKSB8fCBkZWZpbmVkKENPTkZJR19LRVlCT0FSRF9HUElPX01PRFVMRSkKKwkmcGFsbXR4X3B4YV9rZXlzLAorI2VuZGlmCisJJnBhbG10eF9iYWNrbGlnaHQsCisJJnBvd2VyX3N1cHBseSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgbWFwX2Rlc2MgcGFsbXR4X2lvX2Rlc2NbXSBfX2luaXRkYXRhID0geworeworCS52aXJ0dWFsCT0gUEFMTVRYX1BDTUNJQV9WSVJULAorCS5wZm4JCT0gX19waHlzX3RvX3BmbihQQUxNVFhfUENNQ0lBX1BIWVMpLAorCS5sZW5ndGgJCT0gUEFMTVRYX1BDTUNJQV9TSVpFLAorCS50eXBlCQk9IE1UX0RFVklDRQorfSwKK307CisKK3N0YXRpYyB2b2lkIF9faW5pdCBwYWxtdHhfbWFwX2lvKHZvaWQpCit7CisJcHhhX21hcF9pbygpOworCWlvdGFibGVfaW5pdChwYWxtdHhfaW9fZGVzYywgQVJSQVlfU0laRShwYWxtdHhfaW9fZGVzYykpOworfQorCitzdGF0aWMgdm9pZCBfX2luaXQgcGFsbXR4X2luaXQodm9pZCkKK3sKKwlweGEyeHhfbWZwX2NvbmZpZyhBUlJBWV9BTkRfU0laRShw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BRERSKEdQSU80OCwgMHgwMmI0KSwKKwlNRlBfQUREUihHUElPNDksIDB4MDJiOCksCisJTUZQX0FERFIoR1BJTzUwLCAweDAyYzgpLAorCU1GUF9BRERSKEdQSU81MSwgMHgwMmMwKSwKKwlNRlBfQUREUihHUElPNTIsIDB4MDJjNCksCisJTUZQX0FERFIoR1BJTzUzLCAweDAyZDApLAorCU1GUF9BRERSKEdQSU81NCwgMHgwMmNjKSwKKwlNRlBfQUREUihHUElPNTUsIDB4MDI5YyksCisJTUZQX0FERFIoR1BJTzU2LCAweDAyYTApLAorCU1GUF9BRERSKEdQSU81NywgMHgwMjk0KSwKKwlNRlBfQUREUihHUElPNTgsIDB4MDI5OCksCisJTUZQX0FERFIoR1BJTzU5LCAweDAyYTQpLAorCU1GUF9BRERSKEdQSU82MCwgMHgwMmE4KSwKKwlNRlBfQUREUihHUElPNjEsIDB4MDJiMCksCisJTUZQX0FERFIoR1BJTzYyLCAweDAyYWMpLAorCU1GUF9BRERSKEdQSU82MywgMHgwNjQwKSwKKwlNRlBfQUREUihHUElPNjQsIDB4MDY1YyksCisJTUZQX0FERFIoR1BJTzY1LCAweDA2NDgpLAorCU1GUF9BRERSKEdQSU82NiwgMHgwNjQ0KSwKKwlNRlBfQUREUihHUElPNjcsIDB4MDY3NCksCisJTUZQX0FERFIoR1BJTzY4LCAweDA2NTgpLAorCU1GUF9BRERSKEdQSU82OSwgMHgwNjU0KSwKKwlNRlBfQUREUihHUElPNzAsIDB4MDY2MCksCisJTUZQX0FERFIoR1BJTzcxLCAweDA2NjgpLAorCU1GUF9BRERSKEdQSU83MiwgMHgwNjY0KSwKKwlNRlBfQUREUihHUElPNzMsIDB4MDY1MCksCisJTUZQX0FERFIoR1BJTzc0LCAweDA2NmMpLAorCU1GUF9BRERSKEdQSU83NSwgMHgwNjRjKSwKKwlNRlBfQUREUihHUElPNzYsIDB4MDY3MCksCisJTUZQX0FERFIoR1BJTzc3LCAweDA2NzgpLAorCU1GUF9BRERSKEdQSU83OCwgMHgwNjdjKSwKKwlNRlBfQUREUihHUElPNzksIDB4MDY5NCksCisJTUZQX0FERFIoR1BJTzgwLCAweDA2OWMpLAorCU1GUF9BRERSKEdQSU84MSwgMHgwNmEwKSwKKwlNRlBfQUREUihHUElPODIsIDB4MDZhNCksCisJTUZQX0FERFIoR1BJTzgzLCAweDA2OTgpLAorCU1GUF9BRERSKEdQSU84NCwgMHgwNmJjKSwKKwlNRlBfQUREUihHUElPODUsIDB4MDZiNCksCisJTUZQX0FERFIoR1BJTzg2LCAweDA2YjApLAorCU1GUF9BRERSKEdQSU84NywgMHgwNmMwKSwKKwlNRlBfQUREUihHUElPODgsIDB4MDZjNCksCisJTUZQX0FERFIoR1BJTzg5LCAweDA2YWMpLAorCU1GUF9BRERSKEdQSU85MCwgMHgwNjgwKSwKKwlNRlBfQUREUihHUElPOTEsIDB4MDY4NCksCisJTUZQX0FERFIoR1BJTzkyLCAweDA2ODgpLAorCU1GUF9BRERSKEdQSU85MywgMHgwNjkwKSwKKwlNRlBfQUREUihHUElPOTQsIDB4MDY4YyksCisJTUZQX0FERFIoR1BJTzk1LCAweDA2YTgpLAorCU1GUF9BRERSKEdQSU85NiwgMHgwNmI4KSwKKwlNRlBfQUREUihHUElPOTcsIDB4MDQxMCksCisJTUZQX0FERFIoR1BJTzk4LCAweDA0MTgpLAorCU1GUF9BRERSKEdQSU85OSwgMHgwNDFjKSwKKwlNRlBfQUREUihHUElPMTAwLCAweDA0MTQpLAorCU1GUF9BRERSKEdQSU8xMDEsIDB4MDQwOCksCisJTUZQX0FERFIoR1BJTzEwMiwgMHgwMzI0KSwKKwlNRlBfQUREUihHUElPMTAzLCAweDA0MGMpLAorCU1GUF9BRERSKEdQSU8xMDQsIDB4MDQwMCksCisJTUZQX0FERFIoR1BJTzEwNSwgMHgwMzI4KSwKKwlNRlBfQUREUihHUElPMTA2LCAweDA0MDQpLAorCisJTUZQX0FERFIoblhDVlJFTiwgMHgwMjA0KSwKKwlNRlBfQUREUihERl9DTEVfbk9FLCAweDAyMGMpLAorCU1GUF9BRERSKERGX25BRFYxX0FMRSwgMHgwMjE4KSwKKwlNRlBfQUREUihERl9TQ0xLX0UsIDB4MDIxNCksCisJTUZQX0FERFIoREZfU0NMS19TLCAweDAyMTApLAorCU1GUF9BRERSKG5CRTAsIDB4MDIxYyksCisJTUZQX0FERFIobkJFMSwgMHgwMjIwKSwKKwlNRlBfQUREUihERl9uQURWMl9BTEUsIDB4MDIyNCksCisJTUZQX0FERFIoREZfSU5UX1JuQiwgMHgwMjI4KSwKKwlNRlBfQUREUihERl9uQ1MwLCAweDAyMmMpLAorCU1GUF9BRERSKERGX25DUzEsIDB4MDIzMCksCisJTUZQX0FERFIobkxVQSwgMHgwMjU0KSwKKwlNRlBfQUREUihuTExBLCAweDAyNTgpLAorCU1GUF9BRERSKERGX25XRSwgMHgwMjM0KSwKKwlNRlBfQUREUihERl9uUkVfbk9FLCAweDAyMzgpLAorCU1GUF9BRERSKERGX0FERFIwLCAweDAyNGMpLAorCU1GUF9BRERSKERGX0FERFIxLCAweDAyNTApLAorCU1GUF9BRERSKERGX0FERFIyLCAweDAyNWMpLAorCU1GUF9BRERSKERGX0FERFIzLCAweDAyNjApLAorCU1GUF9BRERSKERGX0lPMCwgMHgwMjNjKSwKKwlNRlBfQUREUihERl9JTzEsIDB4MDI0MCksCisJTUZQX0FERFIoREZfSU8yLCAweDAyNDQpLAorCU1GUF9BRERSKERGX0lPMywgMHgwMjQ4KSwKKwlNRlBfQUREUihERl9JTzQsIDB4MDI2NCksCisJTUZQX0FERFIoREZfSU81LCAweDAyNjgpLAorCU1GUF9BRERSKERGX0lPNiwgMHgwMjZjKSwKKwlNRlBfQUREUihERl9JTzcsIDB4MDI3MCksCisJTUZQX0FERFIoREZfSU84LCAweDAyNzQpLAorCU1GUF9BRERSKERGX0lPOSwgMHgwMjc4KSwKKwlNRlBfQUREUihERl9JTzEwLCAweDAyN2MpLAorCU1GUF9BRERSKERGX0lPMTEsIDB4M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R19JMkMgaXMgbm90IHNldAogCkBAIC03NDgsMjIgKzY5OCwzNyBAQAogIwogIyBDT05GSUdfU1BJX0FUMjUgaXMgbm90IHNldAogIyBDT05GSUdfU1BJX1NQSURFViBpcyBub3Qgc2V0Ci0KLSMKLSMgRGFsbGFzJ3MgMS13aXJlIGJ1cwotIworIyBDT05GSUdfU1BJX1RMRTYyWDAgaXMgbm90IHNldAogIyBDT05GSUdfVzEgaXMgbm90IHNldAorIyBDT05GSUdfUE9XRVJfU1VQUExZIGlzIG5vdCBzZXQKIENPTkZJR19IV01PTj15CiAjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAotIyBDT05GSUdfU0VOU09SU19BQklUVUdVUlUgaXMgbm90IHNldAogIyBDT05GSUdfU0VOU09SU19GNzE4MDVGIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfRjcxODgyRkcgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19JVDg3IGlzIG5vdCBzZXQKICMgQ09ORklHX1NFTlNPUlNfTE03MCBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1BDODczNjAgaXMgbm90IHNldAogIyBDT05GSUdfU0VOU09SU19QQzg3NDI3IGlzIG5vdCBzZXQKICMgQ09ORklHX1NFTlNPUlNfU01TQzQ3TTEgaXMgbm90IHNldAogIyBDT05GSUdfU0VOU09SU19TTVNDNDdCMzk3IGlzIG5vdCBzZXQKICMgQ09ORklHX1NFTlNPUlNfVlQxMjExIGlzIG5vdCBzZXQKICMgQ09ORklHX1NFTlNPUlNfVzgzNjI3SEYgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM2MjdFSEYgaXMgbm90IHNldAogIyBDT05GSUdfSFdNT05fREVCVUdfQ0hJUCBpcyBub3Qgc2V0CitDT05GSUdfV0FUQ0hET0c9eQorIyBDT05GSUdfV0FUQ0hET0dfTk9XQVlPVVQgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIERldmljZSBEcml2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Uj1tCisjIENPTkZJR19CRklOX1NJUjAgaXMgbm90IHNldAorIyBDT05GSUdfQkZJTl9TSVIyIGlzIG5vdCBzZXQKK0NPTkZJR19CRklOX1NJUjM9eQorQ09ORklHX1NJUl9CRklOX0RNQT15CisjIENPTkZJR19TSVJfQkZJTl9QSU8gaXMgbm90IHNldAorCisjCisjIERvbmdsZSBzdXBwb3J0CisjCisjIENPTkZJR19ET05HTEUgaXMgbm90IHNldAorIyBDT05GSUdfS0lOR1NVTl9ET05HTEUgaXMgbm90IHNldAorIyBDT05GSUdfS1NEQVpaTEVfRE9OR0xFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0tTOTU5X0RPTkdMRSBpcyBub3Qgc2V0CisKKyMKKyMgT2xkIFNJUiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfSVJQT1JUX1NJUiBpcyBub3Qgc2V0CisKKyMKKyMgT2xkIFNlcmlhbCBkb25nbGUgc3VwcG9ydAorIworCisjCisjIEZJUiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfVVNCX0lSREEgaXMgbm90IHNldAorIyBDT05GSUdfU0lHTUFURUxfRklSIGlzIG5vdCBzZXQKKyMgQ09ORklHX01DU19GSVIgaXMgbm90IHNldAogIyBDT05GSUdfQlQgaXMgbm90IHNldAogIyBDT05GSUdfQUZfUlhSUEMgaXMgbm90IHNldAogCkBAIC01NzUsNiArNjI4LDcgQEAKIENPTkZJR19NVERfTkFORF9JRFM9eQogQ09ORklHX01URF9OQU5EX0JGNVhYPXkKIENPTkZJR19NVERfTkFORF9CRjVYWF9IV0VDQz15CisjIENPTkZJR19NVERfTkFORF9CRjVYWF9CT09UUk9NX0VDQyBpcyBub3Qgc2V0CiAjIENPTkZJR19NVERfTkFORF9ESVNLT05DSElQIGlzIG5vdCBzZXQKICMgQ09ORklHX01URF9OQU5EX05BTkRTSU0gaXMgbm90IHNldAogIyBDT05GSUdfTVREX05BTkRfUExBVEZPUk0gaXMgbm90IHNldApAQCAtNzY2L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VEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DTURMSU5FX1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPW0KK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCisjIENPTkZJR19NVERfQ0ZJIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfSkVERUNQUk9CRT1tCitDT05GSUdfTVREX0dFTl9QUk9CRT1tCisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9BTURTVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUkFNPXkKK0NPTkZJR19NVERfUk9NPW0KKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKK0NPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUz15CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfVUNMSU5VWCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfREFUQUZMQVNIIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NMjVQODAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PTkVOQU5EIGl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2lnbmVkIGxvbmcgKilhZGRyKQorCQkJCXByaW50aygiWyUwOHhdIiwgKmFkZHIpOworCQkJZWxzZSBpZiAocmV0X2FkZHIpCisJCQkJaWYgKGopIHsKKwkJCQkJZGVjb2RlX2FkZHJlc3MoYnVmLCAodW5zaWduZWQgaW50KSphZGRyKTsKKwkJCQkJaWYgKGZyYW1lID09IGFkZHIpIHsKKwkJCQkJCXByaW50ayhLRVJOX05PVElDRSAiICAgZnJhbWUgJTJpIDogJXNcbiIsIGZyYW1lX25vLCBidWYpOworCQkJCQkJY29udGludWU7CisJCQkJCX0KKwkJCQkJcHJpbnRrKEtFUk5fTk9USUNFICIgICAgYWRkcmVzcyA6ICVzXG4iLCBidWYpOworCQkJCX0gZWxzZQorCQkJCQlwcmludGsoIjwlMDh4PiIsICphZGRyKTsKKwkJCWVsc2UgaWYgKGZwID09IGFkZHIpIHsKKwkJCQlpZiAoaikKKwkJCQkJZnJhbWUgPSBhZGRyKzE7CisJCQkJZWxzZQorCQkJCQlwcmludGsoIiglMDh4KSIsICphZGRyKTsKKworCQkJCWZwID0gKHVuc2lnbmVkIGludCAqKSphZGRyOworCQkJCWZyYW1lX25vKys7CisKKwkJCX0gZWxzZSBpZiAoIWopCisJCQkJcHJpbnRrKCIgJTA4eCAiLCAqYWRkcik7CisJCX0KKwkJaWYgKCFqKQorCQkJcHJpbnRrKCJcbiIpOwogCX0KIAotCWFkZHIgPSAodW5zaWduZWQgbG9uZylzdGFjazsKLQllbmRzdGFjayA9ICh1bnNpZ25lZCBsb25nICopUEFHRV9BTElHTihhZGRyKTsKLQotCXByaW50ayhLRVJOX05PVElDRSAiU3RhY2sgZnJvbSAlMDhseDoiLCAodW5zaWduZWQgbG9uZylzdGFjayk7Ci0JZm9yIChpID0gMDsgaSA8IGtzdGFja19kZXB0aF90b19wcmludDsgaSsrKSB7Ci0JCWlmIChzdGFjayArIDEgPiBlbmRzdGFjaykKLQkJCWJyZWFrOwotCQlpZiAoaSAlIDggPT0gMCkK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KQorCVBNX1BVU0goRENQTEJfQUREUjgpCisJUE1fUFVTSChEQ1BMQl9BRERSOSkKKwlQTV9QVVNIKERDUExCX0FERFIxMCkKKwlQTV9QVVNIKERDUExCX0FERFIxMSkKKwlQTV9QVVNIKERDUExCX0FERFIxMikKKwlQTV9QVVNIKERDUExCX0FERFIxMykKKwlQTV9QVVNIKERDUExCX0FERFIxNCkKKwlQTV9QVVNIKERDUExCX0FERFIxNSkKKwlQTV9QVVNIKERDUExCX0RBVEEwKQorCVBNX1BVU0goRENQTEJfREFUQTEpCisJUE1fUFVTSChEQ1BMQl9EQVRBMikKKwlQTV9QVVNIKERDUExCX0RBVEEzKQorCVBNX1BVU0goRENQTEJfREFUQTQpCisJUE1fUFVTSChEQ1BMQl9EQVRBNSkKKwlQTV9QVVNIKERDUExCX0RBVEE2KQorCVBNX1BVU0goRENQTEJfREFUQTcpCisJUE1fUFVTSChEQ1BMQl9EQVRBOCkKKwlQTV9QVVNIKERDUExCX0RBVEE5KQorCVBNX1BVU0goRENQTEJfREFUQTEwKQorCVBNX1BVU0goRENQTEJfREFUQTExKQorCVBNX1BVU0goRENQTEJfREFUQTEyKQorCVBNX1BVU0goRENQTEJfREFUQTEzKQorCVBNX1BVU0goRENQTEJfREFUQTE0KQorCVBNX1BVU0goRENQTEJfREFUQTE1KQorCVBNX1BVU0goSU1FTV9DT05UUk9MKQorCVBNX1BVU0goSUNQTEJfQUREUjApCisJUE1fUFVTSChJQ1BMQl9BRERSMSkKKwlQTV9QVVNIKElDUExCX0FERFIyKQorCVBNX1BVU0goSUNQTEJfQUREUjMpCisJUE1fUFVTSChJQ1BMQl9BRERSNCkKKwlQTV9QVVNIKElDUExCX0FERFI1KQorCVBNX1BVU0goSUNQTEJfQUREUjYpCisJUE1fUFVTSChJQ1BMQl9BRERSNykKKwlQTV9QVVNIKElDUExCX0FERFI4KQorCVBNX1BVU0goSUNQTEJfQUREUjkpCisJUE1fUFVTSChJQ1BMQl9BRERSMTApCisJUE1fUFV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klPRCkKKwlQTV9QVVNIKFRTQ0FMRSkKKwlQTV9QVVNIKFRDT1VOVCkKKwlQTV9QVVNIKFRCVUZDVEwpCisKKwkvKiBTYXZlIENvcmUgUmVnaXN0ZXJzICovCisJWy0tc3BdID0gU1lTQ0ZHOworCVstLXNwXSA9ICggUjc6MCwgUDU6MCApOworCVstLXNwXSA9IGZwOworCVstLXNwXSA9IHVzcDsKKworCVstLXNwXSA9IGkwOworCVstLXNwXSA9IGkxOworCVstLXNwXSA9IGkyOworCVstLXNwXSA9IGkzOworCisJWy0tc3BdID0gbTA7CisJWy0tc3BdID0gbTE7CisJWy0tc3BdID0gbTI7CisJWy0tc3BdID0gbTM7CisKKwlbLS1zcF0gPSBsMDsKKwlbLS1zcF0gPSBsMTsKKwlbLS1zcF0gPSBsMjsKKwlbLS1zcF0gPSBsMzsKKworCVstLXNwXSA9IGIwOworCVstLXNwXSA9IGIxOworCVstLXNwXSA9IGIyOworCVstLXNwXSA9IGIzOworCVstLXNwXSA9IGEwLng7CisJWy0tc3BdID0gYTAudzsKKwlbLS1zcF0gPSBhMS54OworCVstLXNwXSA9IGExLnc7CisKKwlbLS1zcF0gPSBMQzA7CisJWy0tc3BdID0gTEMxOworCVstLXNwXSA9IExUMDsKKwlbLS1zcF0gPSBMVDE7CisJWy0tc3BdID0gTEIwOworCVstLXNwXSA9IExCMTsKKworCVstLXNwXSA9IEFTVEFUOworCVstLXNwXSA9IENZQ0xFUzsKKwlbLS1zcF0gPSBDWUNMRVMyOworCisJWy0tc3BdID0gUkVUUzsKKwlyMCA9IFJFVEk7CisJWy0tc3BdID0gcjA7CisJWy0tc3BdID0gUkVUWDsKKwlbLS1zcF0gPSBSRVROOworCVstLXNwXSA9IFJFVEU7CisJWy0tc3BdID0gU0VRU1RBVDsKKworCS8qIFNhdmUgTWFnaWMsIHJldHVybiBhZGRyZXNzIGFuZCBTdGFjayBQb2ludGVyICovCisJUDAuSCA9IDA7CisJUDAuTCA9IDA7CisJUjAuSCA9IDB4REVBRDsJLyogSGliZXJuYXRlIE1hZ2ljICovCisJUjAuTCA9IDB4QkVFRjsKKwlbUDArK10gPSBSMDsJLyogU3RvcmUgSGliZXJuYXRlIE1hZ2ljICovCisJUjAuSCA9IC5McG1fcmVzdW1lX2hlcmU7CisJUjAuTCA9IC5McG1fcmVzdW1lX2hlcmU7CisJW1AwKytdID0gUjA7CS8qIFNhdmUgUmV0dXJuIEFkZHJlc3MgKi8KKwlbUDArK10gPSBTUDsJLyogU2F2ZSBTdGFjayBQb2ludGVyICovCisJUDAuSCA9IF9oaWJlcm5hdGVfbW9kZTsKKwlQMC5MID0gX2hpYmVybmF0ZV9tb2RlOworCVIwID0gUjI7CisJY2FsbCAoUDApOyAvKiBHb29kYnllICovCisKKy5McG1fcmVzdW1lX2hlcmU6CisKKwkvKiBSZXN0b3JlIENvcmUgUmVnaXN0ZXJzICovCisJU0VRU1RBVCA9IFtzcCsrXTsKKwlSRVRFID0gW3NwKytdOworCVJFVE4gPSBbc3ArK107CisJUkVUWCA9IFtzcCsrXTsKKwlyMCA9IFtzcCsrXTsKKwlSRVRJID0gcjA7CisJUkVUUyA9IFtzcCsrXTsKKworCUNZQ0xFUzIgPSBbc3ArK107CisJQ1lDTEVTID0gW3NwKytdOworCUFTVEFUID0gW3NwKytdOworCisJTEIxID0gW3NwKytdOworCUxCMCA9IFtzcCsrXTsKKwlMVDEgPSBbc3ArK107CisJTFQwID0gW3NwKytdOworCUxDMSA9IFtzcCsrXTsKKwlMQzAgPSBbc3ArK107CisKKwlhMS53ID0gW3NwKytdOworCWExLnggPSBbc3ArK107CisJYTAudyA9IFtzcCsrXTsKKwlhMC54ID0gW3NwKytdOworCWIzID0gW3NwKytdOworCWIyID0gW3NwKytdOworCWIxID0gW3NwKytdOworCWIwID0gW3NwKytdOworCisJbDMgPSBbc3ArK107CisJbDIgPSBbc3ArK107CisJbDEgPSBbc3ArK107CisJbDAgPSBbc3ArK107CisKKwltMyA9IFtzcCsrXTsKKwltMiA9IF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KworIworIyBJTyBTY2hlZHVsZXJzCisjCitDT05GSUdfSU9TQ0hFRF9OT09QPXkKKyMgQ09ORklHX0lPU0NIRURfQVMgaXMgbm90IHNldAorIyBDT05GSUdfSU9TQ0hFRF9ERUFETElORSBpcyBub3Qgc2V0CisjIENPTkZJR19JT1NDSEVEX0NGUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUZBVUxUX0FTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RFRkFVTFRfREVBRExJTkUgaXMgbm90IHNldAorIyBDT05GSUdfREVGQVVMVF9DRlEgaXMgbm90IHNldAorQ09ORklHX0RFRkFVTFRfTk9PUD15CitDT05GSUdfREVGQVVMVF9JT1NDSEVEPSJub29wIgorQ09ORklHX0NMQVNTSUNfUkNVPXkKKworIworIyBQcm9jZXNzb3IgdHlwZSBhbmQgZmVhdHVyZXMKKyMKKyMgQ09ORklHX002ODMyOCBpcyBub3Qgc2V0CisjIENPTkZJR19NNjhFWjMyOCBpcyBub3Qgc2V0CisjIENPTkZJR19NNjhWWjMyOCBpcyBub3Qgc2V0CisjIENPTkZJR19NNjgzNjAgaXMgbm90IHNldAorIyBDT05GSUdfTTUyMDYgaXMgbm90IHNldAorIyBDT05GSUdfTTUyMDZlIGlzIG5vdCBzZXQKK0NPTkZJR19NNTIweD15CisjIENPTkZJR19NNTIzeCBpcyBub3Qgc2V0CisjIENPTkZJR19NNTI0OSBpcyBub3Qgc2V0CisjIENPTkZJR19NNTI3MSBpcyBub3Qgc2V0CisjIENPTkZJR19NNTI3MiBpcyBub3Qgc2V0CisjIENPTkZJR19NNTI3NSBpcyBub3Qgc2V0CisjIENPTkZJR19NNTI4eCBpcyBub3Qgc2V0CisjIENPTkZJR19NNTMwNyBpcyBub3Qgc2V0CisjIENPTkZJR19NNTMyeCBpcyBub3Qgc2V0CisjIENPTkZJR19NNTQwNyBpcyBub3Qgc2V0CitDT05GSUdfQ09MREZJUkU9eQorQ09ORklHX0NMT0NLX1NFVD15CitDT05GSUd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ORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfQ0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lSREEgaXMgbm90IHNldAorIyBDT05GSUdfQlQgaXMgbm90IHNldAorIyBDT05GSUdfQUZfUlhSUEMgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzCisjCisjIENPTkZJR19DRkc4MDIxMSBpcyBub3Qgc2V0CisjIENPTkZJR19XSVJFTEVTU19FWFQgaXMgbm90IHNldAorIyBDT05GSUdfTUFDODAyMTEgaXMgbm90IHNldAorIyBDT05GSUdfSUVFRTgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGS0lMTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfOVAgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1NUQU5EQUxPTkU9eQorQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DTURMSU5FX1BBUlRTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BUjdfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTEtERVZTPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT09QUyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorQ09ORklHX01URF9SQU09eQorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1VDTElOVVg9eQorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PTkVOQU5EIGlzIG5vdCBzZXQKKworIworIyBVQkkgLSBVbnNv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GSUdfUE9XRVJfU1VQUExZIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hXTU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RIRVJNQUwgaXMgbm90IHNldAorIyBDT05GSUdfV0FUQ0hET0cgaXMgbm90IHNldAorCisjCisjIFNvbmljcyBTaWxpY29uIEJhY2twbGFuZQorIworQ09ORklHX1NTQl9QT1NTSUJMRT15CisjIENPTkZJR19TU0IgaXMgbm90IHNldAorCisjCisjIE11bHRpZnVuY3Rpb24gZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01GRF9TTTUwMSBpcyBub3Qgc2V0CisjIENPTkZJR19IVENfUEFTSUMzIGlzIG5vdCBzZXQKKworIworIyBNdWx0aW1lZGlhIGRldmljZXMKKyMKKworIworIyBNdWx0aW1lZGlhIGNvcmUgc3VwcG9ydAorIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RWQl9DT1JFIGlzIG5vdCBzZXQKKworIworIyBNdWx0aW1lZGlhIGRyaXZlcnMKKyMKKyMgQ09ORklHX0RBQiBpcyBub3Qgc2V0CisKKyMKKyMgR3JhcGhpY3Mgc3VwcG9ydAorIworIyBDT05GSUdfVkdBU1RBVEUgaXMgbm90IHNldAorIyBDT05GSUdfVklERU9fT1VUUFVUX0NPTlRST0wgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorIyBDT05GSUdfQkFDS0xJR0hUX0xDRF9TVVBQT1JUIGlzIG5vdCBzZXQKKworIworIyBEaXNwbGF5IGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19ESVNQTEFZX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfU1VQUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19NTUMgaXMgbm90IHNldAorIyBDT05GSUdfTUVNU1RJQ0sgaXMgbm90IH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jdfUEFSVFMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTEtERVZTPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT09QUyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9DRkkgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorQ09ORklHX01URF9SQU09eQorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1VDTElOVVg9eQorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PTkVOQU5EIGlzIG5vdCBzZXQKKworIworIyBVQkkgLSBVbnNvcnRlZCBibG9jayBpbWFnZXMKKyMKKyMgQ09ORklHX01URF9VQkkgaXMgbm90IHNldAorIyBDT05GSUdfUEFSUE9SVCBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVj15CisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9MT09QIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX1JBTT15CitDT05GSUdfQkxLX0RFVl9SQU1fQ09VTlQ9MTYKK0NPTkZJR19CTEtfREVWX1JBTV9TSVpFPTQwOTYKKyMgQ09ORklHX0JMS19ERVZfWElQIGlzIG5vdCBzZXQKKyMgQ09ORklHX0NEUk9NX1BLVENEVkQgaXMgbm90IHNldAorQ09ORklHX01JU0NfREVWSUNFUz15CisjIENPTkZJR19FRVBST01fOTNDWDYgaXMg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R19CVCBpcyBub3Qgc2V0CisjIENPTkZJR19BRl9SWFJQQyBpcyBub3Qgc2V0CisKKyMKKyMgV2lyZWxlc3MKKyMKKyMgQ09ORklHX0NGRzgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dJUkVMRVNTX0VYVCBpcyBub3Qgc2V0CisjIENPTkZJR19NQUM4MDIxMSBpcyBub3Qgc2V0CisjIENPTkZJR19JRUVFODAyMTEgaXMgbm90IHNldAorIyBDT05GSUdfUkZLSUxMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF85UCBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NNRExJTkVfUEFSVFMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FSN19QQVJUUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlciBNb2R1bGVzIEFuZCBUcmFuc2xhdGlvbiBMYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CitDT05GSUdfTVREX0JMS0RFVlM9eQorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PT1BTIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworIyBDT05GSUdfTVREX0NGSSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1JBTT15CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfVUNMSU5VWD15CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVREX1VCSSBpcyBub3Qgc2V0CisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWPXkKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9NDA5NgorIyBDT05GSUdfQkxLX0RFVl9YSVAgaXMgbm90IHNldAorIyBDT05GSUdfQ0RST01fUEtUQ0RWRCBpcyBub3Qgc2V0CisjIENPTkZJR19BVEFfT1ZFUl9FVEggaXMgbm90IHNldAorIyBDT05GSUdfTUlTQ19ERVZJQ0VTIGlzIG5vdCBzZXQKK0NPTkZJR19IQVZFX0lERT15CisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSSBpcyBub3Qgc2V0CisjIENPTkZJR19TQ1NJX0RNQSBpcyBub3Qgc2V0Cisj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gbm90IHNldAorCisjCisjIENELVJPTS9EVkQgRmlsZXN5c3RlbXMKKyMKKyMgQ09ORklHX0lTTzk2NjBfRlMgaXMgbm90IHNldAorIyBDT05GSUdfVURGX0ZTIGlzIG5vdCBzZXQKKworIworIyBET1MvRkFUL05UIEZpbGVzeXN0ZW1zCisjCisjIENPTkZJR19NU0RPU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19WRkFUX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX05URlNfRlMgaXMgbm90IHNldAorCisjCisjIFBzZXVkbyBmaWxlc3lzdGVtcworIworQ09ORklHX1BST0NfRlM9eQorQ09ORklHX1BST0NfU1lTQ1RMPXkKK0NPTkZJR19TWVNGUz15CisjIENPTkZJR19UTVBGUyBpcyBub3Qgc2V0CisjIENPTkZJR19IVUdFVExCX1BBR0UgaXMgbm90IHNldAorIyBDT05GSUdfQ09ORklHRlNfRlMgaXMgbm90IHNldAorCisjCisjIE1pc2NlbGxhbmVvdXMgZmlsZXN5c3RlbXMKKyMKKyMgQ09ORklHX0FERlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQUZGU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19IRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfSEZTUExVU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19CRUZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JGU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19FRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ1JBTUZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1ZYRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfTUlOSVhfRlMgaXMgbm90IHNldAorIyBDT05GSUdfSFBGU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19RTlg0RlNfRlMgaXMgbm90IHNldAorQ09ORklHX1JPTUZTX0ZTPXkKKyMgQ09ORklHX1NZU1ZfRlMgaXMgbm90IHNldAorIyBDT05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0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCisjIENPTkZJR19NVERfQ0ZJIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUkFNPXkKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorQ09ORklHX01URF9VQ0xJTlVYPXkKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90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ob3VyLCBtaW4sIHNlYyk7OwogfQogCit1bnNpZ25lZCBsb25nIHJlYWRfcGVyc2lzdGVudF9jbG9jayh2b2lkKQoreworCXJldHVybiByZWFkX3J0Y19tbXNzKCk7Cit9CisKK2ludCB1cGRhdGVfcGVyc2lzdGVudF9jbG9jayhzdHJ1Y3QgdGltZXNwZWMgbm93KQoreworCXJldHVybiBzZXRfcnRjX21tc3Mobm93LnR2X3NlYyk7Cit9CisKK3ZvaWQgdGltZV9pbml0KHZvaWQpCit7CisJaHdfdGltZXJfaW5pdCgpOworfQpkaWZmIC0tZ2l0IGEvYXJjaC9tNjhrbm9tbXUva2VybmVsL3RyYXBzLmMgYi9hcmNoL202OGtub21tdS9rZXJuZWwvdHJhcHMuYwppbmRleCBlYzlhZWE2Li40NmY4ZjlkIDEwMDY0NAotLS0gYS9hcmNoL202OGtub21tdS9rZXJuZWwvdHJhcHMuYworKysgYi9hcmNoL202OGtub21tdS9rZXJuZWwvdHJhcHMuYwpAQCAtMTAzLDEyICsxMDMsMjggQEAKIAlmb3JjZV9zaWcoU0lHU0VHViwgY3VycmVudCk7CiB9CiAKK3N0YXRpYyB2b2lkIHByaW50X3RoaXNfYWRkcmVzcyh1bnNpZ25lZCBsb25nIGFkZHIsIGludCBpKQoreworI2lmZGVmIENPTkZJR19LQUxMU1lNUworCXByaW50ayhLRVJOX0VNRVJHICIgWyUwOGx4XSAiLCBhZGRyKTsKKwlwcmludF9zeW1ib2woS0VSTl9DT05UICIlc1xuIiwgYWRkcik7CisjZWxzZQorCWlmIChpICUgNSkKKwkJcHJpbnRrKEtFUk5fQ09OVCAiIFslMDhseF0gIiwgYWRkcik7CisJZWxzZQorCQlwcmludGsoS0VSTl9DT05UICJcbiIgS0VSTl9FTUVSRyAiIFslMDhseF0gIiwgYWRkcik7CisJaSsrOworI2VuZGlmCit9CisKIGludCBrc3RhY2tfZGVwdGhfdG9fcHJpbnQgPSA0ODsKIAogc3RhdGljIHZvaWQgX19zaG93X3N0YWNrKH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bGUoc3RydWN0IGRldmljZSAqZGV2LCB2b2lkICp2YWRkciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplX3Qgc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGRtYV9kYXRhX2RpcmVjdGlvbiBkaXJlY3Rpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGRtYV9hdHRycyAqYXR0cnMpCit7CisJc3RydWN0IHZpb19kZXYgKnZpb2RldiA9IHRvX3Zpb19kZXYoZGV2KTsKKwlkbWFfYWRkcl90IHJldCA9IERNQV9FUlJPUl9DT0RFOworCisJaWYgKHZpb19jbW9fYWxsb2ModmlvZGV2LCByb3VuZHVwKHNpemUsIElPTU1VX1BBR0VfU0laRSkpKSB7CisJCWF0b21pY19pbmMoJnZpb2Rldi0+Y21vLmFsbG9jc19mYWlsZWQpOworCQlyZXR1cm4gcmV0OworCX0KKworCXJldCA9IGRtYV9pb21tdV9vcHMubWFwX3NpbmdsZShkZXYsIHZhZGRyLCBzaXplLCBkaXJlY3Rpb24sIGF0dHJzKTsKKwlpZiAodW5saWtlbHkoZG1hX21hcHBpbmdfZXJyb3IocmV0KSkpIHsKKwkJdmlvX2Ntb19kZWFsbG9jKHZpb2Rldiwgcm91bmR1cChzaXplLCBJT01NVV9QQUdFX1NJWkUpKTsKKwkJYXRvbWljX2luYygmdmlvZGV2LT5jbW8uYWxsb2NzX2ZhaWxlZCk7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIHZvaWQgdmlvX2RtYV9pb21tdV91bm1hcF9zaW5nbGUoc3RydWN0IGRldmljZSAqZGV2LAorCQlkbWFfYWRkcl90IGRtYV9oYW5kbGUsIHNpemVfdCBzaXplLAorCQllbnVtIGRtYV9kYXRhX2RpcmVjdGlvbiBkaXJlY3Rpb24sCisJCXN0cnVjdCBkbWFfYXR0cnMgKmF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mb3IgQ01PICovCisKKyNkZWZpbmUgdmlvZGV2X2Ntb19yZF9hdHRyKG5hbWUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK3N0YXRpYyBzc2l6ZV90IHZpb2Rldl9jbW9fIyNuYW1lIyNfc2hvdyhzdHJ1Y3QgZGV2aWNlICpkZXYsICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZGV2aWNlX2F0dHJpYnV0ZSAqYXR0ciwgIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAqYnVmKSAgICAgICAgICAgICAgICAgICAgIFwKK3sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlyZXR1cm4gc3ByaW50ZihidWYsICIlbHVcbiIsIHRvX3Zpb19kZXYoZGV2KS0+Y21vLm5hbWUpOyAgICAgICAgXAorfQorCitzdGF0aWMgc3NpemVfdCB2aW9kZXZfY21vX2FsbG9jc19mYWlsZWRfc2hvdyhzdHJ1Y3QgZGV2aWNlICpkZXYsCisJCXN0cnVjdCBkZXZpY2VfYXR0cmlidXRlICphdHRyLCBjaGFyICpidWYpCit7CisJc3RydWN0IHZpb19kZXYgKnZpb2RldiA9IHRvX3Zpb19kZXYoZGV2KTsKKwlyZXR1cm4gc3ByaW50ZihidWYsICIlZFxuIiwgYXRvbWljX3JlYWQoJnZpb2Rldi0+Y21vLmFsbG9jc19mYWlsZWQpKTsKK30KKworc3RhdGljIHNzaXplX3QgdmlvZGV2X2Ntb19hbGxvY3NfZmFpbGVkX3Jlc2V0KHN0cnVjdCBkZXZpY2UgKmRldiwKKwkJc3RydWN0IGRldmljZV9hdHRyaWJ1dGUgKmF0dHIsIGNvbnN0IGNoYXIgKmJ1Ziwgc2l6ZV90IGNvdW50KQoreworCXN0cnVjdCB2aW9fZGV2IC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AgICAgU19JV1VTUnxTX0lSVVNSfFNfSVdHUlB8U19JUkdSUHxTX0lST1RILAorCSAgICAgICB2aW9kZXZfY21vX2Rlc2lyZWRfc2hvdywgdmlvZGV2X2Ntb19kZXNpcmVkX3NldCksCisJX19BVFRSKGNtb19lbnRpdGxlZCwgICAgICBTX0lSVUdPLCB2aW9kZXZfY21vX2VudGl0bGVkX3Nob3csICAgICAgTlVMTCksCisJX19BVFRSKGNtb19hbGxvY2F0ZWQsICAgICBTX0lSVUdPLCB2aW9kZXZfY21vX2FsbG9jYXRlZF9zaG93LCAgICAgTlVMTCksCisJX19BVFRSKGNtb19hbGxvY3NfZmFpbGVkLCBTX0lXVVNSfFNfSVJVU1J8U19JV0dSUHxTX0lSR1JQfFNfSVJPVEgsCisJICAgICAgIHZpb2Rldl9jbW9fYWxsb2NzX2ZhaWxlZF9zaG93LCB2aW9kZXZfY21vX2FsbG9jc19mYWlsZWRfcmVzZXQpLAorCV9fQVRUUl9OVUxMCit9OworCisvKiBzeXNmcyBidXMgZnVuY3Rpb25zIGFuZCBkYXRhIHN0cnVjdHVyZXMgZm9yIENNTyAqLworCisjZGVmaW5lIHZpb2J1c19jbW9fcmRfYXR0cihuYW1lKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCitzdGF0aWMgc3NpemVfdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit2aW9idXNfY21vXyMjbmFtZSMjX3Nob3coc3RydWN0IGJ1c190eXBlICpidCwgY2hhciAqYnVmKSAgICAgICAgICAgICAgICBcCit7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJcmV0dXJuIHNwcmludGYoYnVmLCAiJWx1XG4iLCB2aW9fY21vLm5hbWUpOyAgICAgICAgICAgICAgICAgICAgIFwKK30KKworI2RlZmluZSB2aW9idXNfY21vX3Bvb2xfcmRfYXR0cihuYW1lLCB2YXIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorc3RhdGljIHNzaXplX3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAordmlvYnVzX2Ntb18jI25hbWUjI19wb29sX3Nob3dfIyN2YXIoc3RydWN0IGJ1c190eXBlICpidCwgY2hhciAqYnVmKSAgICAgXAoreyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXJldHVybiBzcHJpbnRmKGJ1ZiwgIiVsdVxuIiwgdmlvX2Ntby5uYW1lLnZhcik7ICAgICAgICAgICAgICAgICBcCit9CisKK3N0YXRpYyBzc2l6ZV90IHZpb2J1c19jbW9faGlnaF9yZXNldChzdHJ1Y3QgYnVzX3R5cGUgKmJ0LCBjb25zdCBjaGFyICpidWYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZV90IGNvdW50KQoreworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmdmlvX2Ntby5sb2NrLCBmbGFncyk7CisJdmlvX2Ntby5oaWdoID0gdmlvX2Ntby5jdXJyOworCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJnZpb19jbW8ubG9jaywgZmxhZ3MpOworCisJcmV0dXJuIGNvdW50OworfQorCit2aW9idXNfY21vX3JkX2F0dHIoZW50aXRsZWQpOwordmlvYnVzX2Ntb19wb29sX3JkX2F0dHIocmVzZXJ2ZSwgc2l6ZSk7Cit2aW9idXNfY21vX3Bvb2xfcmRfYXR0cihleGNlc3MsIHNpemUpOwordmlvYnVzX2Ntb19wb29sX3JkX2F0dHIoZXhjZXNzLCBmcmVlKTsKK3Zpb2J1c19jbW9fcmRfYXR0cihzcGFyZSk7Cit2aW9idXNfY21vX3JkX2F0dHIobWluKTsKK3Zpb2J1c19jb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zQgotI2RlZmluZSBCVVRUT05fTGVmdF9CICAgICAgICAgICAgIDB4RkEKLQotI2RlZmluZSBCVVRUT05fUmlnaHQgICAgICAgICAgICAgIDB4MzcKLSNkZWZpbmUgQlVUVE9OX1JpZ2h0X0IgICAgICAgICAgICAweERFCi0KLSNkZWZpbmUgQlVUVE9OX1VwICAgICAgICAgICAgICAgICAweDJGCi0jZGVmaW5lIEJVVFRPTl9VcF9CICAgICAgICAgICAgICAgMHhGNgotCi0jZGVmaW5lIEJVVFRPTl9Eb3duICAgICAgICAgICAgICAgMHgxRgotI2RlZmluZSBCVVRUT05fRG93bl9CICAgICAgICAgICAgIDB4RUUKLQotI2RlZmluZSBCVVRUT05fTmV4dCAgICAgICAgICAgICAgIDB4M0QKLSNkZWZpbmUgQlVUVE9OX05leHRfQiAgICAgICAgICAgICAweDdFCi0KLSNkZWZpbmUgQlVUVE9OX0VudGVyICAgICAgICAgICAgICAweDNFCi0jZGVmaW5lIEJVVFRPTl9FbnRlcl9CICAgICAgICAgICAgMHhCRQotCi0jZGVmaW5lIEJVVFRPTl9SZXNldF9CICAgICAgICAgICAgMHhGQwotCi0KLS8vIGRlYm91bmNlIGNvbnN0YW50cwotCi0jZGVmaW5lIEJVVFRPTl9TRU5TRSAgICAgICAgICAgIDE2MDAwMAotI2RlZmluZSBCVVRUT05fREVCT1VOQ0UJCTUwMDAKLQotCi0vLyAgR2FsaWxlbyByZWdpc3RlciBzdHVmZgotCi0jZGVmaW5lIGtHYWxfRGV2QmFuazJDZmcgICAgICAgIDB4MTQ2NkRCMzMKLSNkZWZpbmUga0dhbF9EZXZCYW5rMlBSZWcgICAgICAgMHg0NjQKLSNkZWZpbmUga0dhbF9EZXZCYW5rM0NmZyAgICAgICAgMHgxNDZGREZGQgotI2RlZmluZSBrR2FsX0RldkJhbmszUFJlZyAgICAgICAweDQ2OAotCi0vLyBOZXR3b3JrCi0KLSNkZWZpbmUga0lQQUREUgkJCTEKLSNkZWZpbmUga05FVE1BU0sJC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0X3VzZWQgPSBsYXN0X3VzZWQ7CisJCQltdl9kZXNjX2NsZWFyX25leHRfZGVzYyhhbGxvY19zdGFydCk7CisJCQltdl9kZXNjX2NsZWFyX25leHRfZGVzYyhhbGxvY190YWlsKTsKKwkJCXJldHVybiBhbGxvY190YWlsOworCQl9CisJfQorCWlmICghcmV0cnkrKykKKwkJZ290byByZXRyeTsKKworCS8qIHRyeSB0byBmcmVlIHNvbWUgc2xvdHMgaWYgdGhlIGFsbG9jYXRpb24gZmFpbHMgKi8KKwl0YXNrbGV0X3NjaGVkdWxlKCZtdl9jaGFuLT5pcnFfdGFza2xldCk7CisKKwlyZXR1cm4gTlVMTDsKK30KKworc3RhdGljIGRtYV9jb29raWVfdAorbXZfZGVzY19hc3NpZ25fY29va2llKHN0cnVjdCBtdl94b3JfY2hhbiAqbXZfY2hhbiwKKwkJICAgICAgc3RydWN0IG12X3hvcl9kZXNjX3Nsb3QgKmRlc2MpCit7CisJZG1hX2Nvb2tpZV90IGNvb2tpZSA9IG12X2NoYW4tPmNvbW1vbi5jb29raWU7CisKKwlpZiAoKytjb29raWUgPCAwKQorCQljb29raWUgPSAxOworCW12X2NoYW4tPmNvbW1vbi5jb29raWUgPSBkZXNjLT5hc3luY190eC5jb29raWUgPSBjb29raWU7CisJcmV0dXJuIGNvb2tpZTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKiBETUEgZW5naW5lIEFQSSBmdW5jdGlvbnMgKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBkbWFfY29va2llX3QKK212X3hvcl90eF9zdWJtaXQoc3RydWN0IGRtYV9hc3luY190eF9kZXNjcmlwdG9yICp0eCkKK3sKKwlzdHJ1Y3QgbXZfeG9yX2Rlc2Nfc2xvdCAqc3dfZGVzYyA9IHRvX212X3hvcl9zbG90KHR4KTsKKwlzdHJ1Y3QgbXZfeG9yX2NoYW4gKm12X2NoYW4gPSB0b19tdl94b3JfY2hhbih0eC0+Y2hhbik7CisJc3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pbWl0KHUzMiBhKQoreworCXJldHVybiBhID4+IDE2ICYgKCgxIDw8IDExKSAtIDEpOworfQorCitzdGF0aWMgaW5saW5lIHUzMiBpNTEwMF9kbWlyX3JhbmsodTMyIGEsIHUzMiBpKQoreworCXJldHVybiBhID4+ICg0ICogaSkgJiAoKDEgPDwgMikgLSAxKTsKK30KKworc3RhdGljIGlubGluZSB1MTYgaTUxMDBfbXRyX3ByZXNlbnQodTE2IGEpCit7CisJcmV0dXJuIGEgPj4gMTAgJiAxOworfQorCitzdGF0aWMgaW5saW5lIHUxNiBpNTEwMF9tdHJfZXRocm90dGxlKHUxNiBhKQoreworCXJldHVybiBhID4+IDkgJiAxOworfQorCitzdGF0aWMgaW5saW5lIHUxNiBpNTEwMF9tdHJfd2lkdGgodTE2IGEpCit7CisJcmV0dXJuIGEgPj4gOCAmIDE7Cit9CisKK3N0YXRpYyBpbmxpbmUgdTE2IGk1MTAwX210cl9udW1iYW5rKHUxNiBhKQoreworCXJldHVybiBhID4+IDYgJiAxOworfQorCitzdGF0aWMgaW5saW5lIHUxNiBpNTEwMF9tdHJfbnVtcm93KHUxNiBhKQoreworCXJldHVybiBhID4+IDIgJiAoKDEgPDwgMikgLSAxKTsKK30KKworc3RhdGljIGlubGluZSB1MTYgaTUxMDBfbXRyX251bWNvbCh1MTYgYSkKK3sKKwlyZXR1cm4gYSAmICgoMSA8PCAyKSAtIDEpOworfQorCisKK3N0YXRpYyBpbmxpbmUgdTMyIGk1MTAwX3ZhbGlkbG9nX3JlZG1lbXZhbGlkKHUzMiBhKQoreworCXJldHVybiBhID4+IDIgJiAxOworfQorCitzdGF0aWMgaW5saW5lIHUzMiBpNTEwMF92YWxpZGxvZ19yZWNtZW12YWxpZCh1MzIgYSkKK3sKKwlyZXR1cm4gYSA+PiAxICYgMTsKK30KKworc3RhdGljIGlubGluZSB1MzIgaTUxMDBfdmFsaWRsb2dfbnJlY21lbXZhbGlkKHUzMiBhKQoreworCXJldHVybiBhICYgMTsKK30KK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193b3JkKHBkZXYsIEk1MTAwX0FNSVJfMSwgJncpOworCXByaXYtPmFtaXJbMV0gPSB3OworCisJZm9yIChpID0gMDsgaSA8IEk1MTAwX01BWF9DVExSUzsgaSsrKSB7CisJCWludCBqOworCisJCWZvciAoaiA9IDA7IGogPCA1OyBqKyspIHsKKwkJCWludCBrOworCisJCQlwY2lfcmVhZF9jb25maWdfZHdvcmQobW1zW2ldLCBJNTEwMF9ETUlSICsgaiAqIDQsICZkdyk7CisKKwkJCXByaXYtPmRtaXJbaV1bal0ubGltaXQgPQorCQkJCSh1NjQpIGk1MTAwX2RtaXJfbGltaXQoZHcpIDw8IDI4OworCQkJZm9yIChrID0gMDsgayA8IEk1MTAwX01BWF9SQU5LU19QRVJfRElNTTsgaysrKQorCQkJCXByaXYtPmRtaXJbaV1bal0ucmFua1trXSA9CisJCQkJCWk1MTAwX2RtaXJfcmFuayhkdywgayk7CisJCX0KKwl9CisKKwlpNTEwMF9pbml0X210cihtY2kpOworfQorCitzdGF0aWMgdm9pZCBfX2RldmluaXQgaTUxMDBfaW5pdF9jc3Jvd3Moc3RydWN0IG1lbV9jdGxfaW5mbyAqbWNpKQoreworCWludCBpOworCXVuc2lnbmVkIGxvbmcgdG90YWxfcGFnZXMgPSAwVUw7CisJc3RydWN0IGk1MTAwX3ByaXYgKnByaXYgPSBtY2ktPnB2dF9pbmZvOworCisJZm9yIChpID0gMDsgaSA8IG1jaS0+bnJfY3Nyb3dzOyBpKyspIHsKKwkJY29uc3QgdW5zaWduZWQgbG9uZyBucGFnZXMgPSBpNTEwMF9ucGFnZXMobWNpLCBpKTsKKwkJY29uc3QgdW5zaWduZWQgY250bHIgPSBpNTEwMF9jc3Jvd190b19jbnRscihtY2ksIGkpOworCQljb25zdCB1bnNpZ25lZCByYW5rID0gaTUxMDBfY3Nyb3dfdG9fcmFuayhtY2ksIGkpOworCisJCWlmICghbnBhZ2VzKQorCQkJY29udGludWU7CisKKwkJLyoKKwkJICogRklYTUU6IHRoZXN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LDEyIEBACiAgKi8KIAogLyoKLSAqCi0gKiAgVmVyc2lvbiAwLjAxICAgICAgICBJbml0aWFsIHZlcnNpb24gaGFja2VkIG91dCBvZiBpZGUuYwotICoKLSAqICBWZXJzaW9uIDAuMDIgICAgICAgIEFkZGVkIHN1cHBvcnQgZm9yIFBJTyBtb2RlcywgYXV0by10dW5lCi0gKgotICogIFZlcnNpb24gMC4wMyAgICAgICAgU29tZSBjbGVhbnVwcwotICoKLSAqICBWZXJzaW9uIDAuMDUgICAgICAgIFBJTyBtb2RlIGN5Y2xlIHRpbWluZ3MgYXV0by10dW5lIHVzaW5nIGJ1cy1zcGVlZAotICoKLSAqICBWZXJzaW9uIDAuMDYgICAgICAgIFByZWZldGNoIG1vZGUgbm93IGRlZmF1bHRzIG5vIE9GRi4gVG8gc2V0Ci0gKiAgICAgICAgICAgICAgICAgICAgICBwcmVmZXRjaCBtb2RlIE9GRi9PTiB1c2UgImhkcGFybSAtcDgvLXA5Ii4KLSAqICAgICAgICAgICAgICAgICAgICAgIFVubWFzayBpcnEgaXMgZGlzYWJsZWQgd2hlbiBwcmVmZXRjaCBtb2RlCi0gKiAgICAgICAgICAgICAgICAgICAgICBpcyBlbmFibGVkLgotICoKLSAqICBWZXJzaW9uIDAuMDcgICAgICAgIFRyeWluZyB0byBmaXggQ0QtUk9NIGRldGVjdGlvbiBwcm9ibGVtLgotICogICAgICAgICAgICAgICAgICAgICAgIlByZWZldGNoIiBtb2RlIGJpdCBPRkYgZm9yIGlkZSBkaXNrcyBhbmQKLSAqICAgICAgICAgICAgICAgICAgICAgIE9OIGZvciBhbnl0aGluZyBlbHNlLgotICoKLSAqICBWZXJzaW9uIDAuMDggICAgICAgIE5lZWQgdG8gZm9yY2UgcHJlZmV0Y2ggZm9yIENEcyBhbmQgb3RoZXIgbm9uLWRpc2sKLSAqICAgICAgICAgICAgICAgICAgICAgIGRldmljZXMuIChub3Qgc3VyZSB3aGljaCBkZXZpY2VzIGV4YWN0bHkgbmVlZAot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ZGYtPnphW2RmLT5mMiAmIERfRlJFR19NQVNLXS56MiA9IGNwdV90b19sZTE2KCgKKwkJCSAgICBsZTE2X3RvX2NwdSh6cC0+ejIpICsgdG90YWwpICYgKERfRklGT19TSVpFIC0gMSkpOworCQkJcmVjdl9EY2hhbm5lbChkY2gpOworCQl9CisJfQorCXJldHVybiAxOworfQorCisvKgorICogY2hlY2sgZm9yIHRyYW5zcGFyZW50IHJlY2VpdmUgZGF0YSBhbmQgcmVhZCBtYXggb25lIHRocmVzaG9sZCBzaXplIGlmIGF2YWlsCisgKi8KK2ludAoraGZjcGNpX2VtcHR5X2ZpZm9fdHJhbnMoc3RydWN0IGJjaGFubmVsICpiY2gsIHN0cnVjdCBiemZpZm8gKmJ6LCB1X2NoYXIgKmJkYXRhKQoreworCXVuc2lnbmVkIHNob3J0CSp6MXIsICp6MnI7CisJaW50CQluZXdfejIsIGZjbnQsIG1heGxlbjsKKwl1X2NoYXIJCSpwdHIsICpwdHIxOworCisJejFyID0gJmJ6LT56YVtNQVhfQl9GUkFNRVNdLnoxOwkJLyogcG9pbnRlciB0byB6IHJlZyAqLworCXoyciA9IHoxciArIDE7CisKKwlmY250ID0gbGUxNl90b19jcHUoKnoxcikgLSBsZTE2X3RvX2NwdSgqejJyKTsKKwlpZiAoIWZjbnQpCisJCXJldHVybiAwOwkvKiBubyBkYXRhIGF2YWlsICovCisKKwlpZiAoZmNudCA8PSAwKQorCQlmY250ICs9IEJfRklGT19TSVpFOwkvKiBieXRlcyBhY3R1YWxseSBidWZmZXJlZCAqLworCWlmIChmY250ID4gSEZDUENJX0JUUkFOU19USFJFU0hPTEQpCisJCWZjbnQgPSBIRkNQQ0lfQlRSQU5TX1RIUkVTSE9MRDsJCS8qIGxpbWl0IHNpemUgKi8KKworCW5ld196MiA9IGxlMTZfdG9fY3B1KCp6MnIpICsgZmNudDsJLyogbmV3IHBvc2l0aW9uIGluIGZpZm8gKi8KKwlpZiAobmV3X3oyID49IChCX0ZJRk9fU0laRSAr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b19hbGF3WzI1Nl07Cit1OCBkc3Bfc2lsZW5jZTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIGdlbmVyYXRlIHRhYmxlIGZvciBjb252ZXJzaW9uIG9mIHMxNiB0byBhbGF3L3VsYXcgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZGVmaW5lIEFNSV9NQVNLIDB4NTUKKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBjaGFyIGxpbmVhcjJhbGF3KHNob3J0IGludCBsaW5lYXIpCit7CisJaW50IG1hc2s7CisJaW50IHNlZzsKKwlpbnQgcGNtX3ZhbDsKKwlzdGF0aWMgaW50IHNlZ19lbmRbOF0gPSB7CisJCTB4RkYsIDB4MUZGLCAweDNGRiwgMHg3RkYsIDB4RkZGLCAweDFGRkYsIDB4M0ZGRiwgMHg3RkZGCisJfTsKKworCXBjbV92YWwgPSBsaW5lYXI7CisJaWYgKHBjbV92YWwgPj0gMCkgeworCQkvKiBTaWduICg3dGgpIGJpdCA9IDEgKi8KKwkJbWFzayA9IEFNSV9NQVNLIHwgMHg4MDsKKwl9IGVsc2UgeworCQkvKiBTaWduIGJpdCA9IDAgKi8KKwkJbWFzayA9IEFNSV9NQVNLOworCQlwY21fdmFsID0gLXBjbV92YWw7CisJfQorCisJLyogQ29udmVydCB0aGUgc2NhbGVkIG1hZ25pdHVkZSB0byBzZWdtZW50IG51bWJlci4gKi8KKwlmb3IgKHNlZyA9IDA7ICBzZWcgPCA4OyAgc2VnKyspIHsKKwkJaWYgKHBjbV92YWwgPD0gc2VnX2VuZFtzZWddKQorCQkJYnJlYWs7CisJfQorCS8qIENvbWJpbmUgdGhlIHNpZ24sIHNlZ21lbnQsIGFuZCBxdWFudGl6YXRpb24gYml0cy4gKi8KKwlyZXR1cm4gICgoc2VnIDw8IDQpIHwKKwkJICgocGNtX3ZhbCA+PiAoKHN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uWzI1Nl07CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogZ2VuZXJhdGUgdGFibGUgZm9yIGNvbnZlcnNpb24gbGF3IGZyb20vdG8gNy1iaXQgYWxhdy1saWtlIHNhbXBsZSAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQKK2RzcF9hdWRpb19nZW5lcmF0ZV9zZXZlbih2b2lkKQoreworCWludCBpLCBqLCBrOworCXU4IHNwbDsKKwl1OCBzb3J0ZWRfYWxhd1syNTZdOworCisJLyogZ2VuZXJhdGUgYWxhdyB0YWJsZSwgc29ydGVkIGJ5IHRoZSBsaW5lYXIgdmFsdWUgKi8KKwlmb3IgKGkgPSAwOyBpIDwgMjU2OyBpKyspIHsKKwkJaiA9IDA7CisJCWZvciAoayA9IDA7IGsgPCAyNTY7IGsrKykgeworCQkJaWYgKGRzcF9hdWRpb19hbGF3X3RvX3MzMltrXQorCQkJCTwgZHNwX2F1ZGlvX2FsYXdfdG9fczMyW2ldKSB7CisJCQlqKys7CisJCQl9CisJCX0KKwkJc29ydGVkX2FsYXdbal0gPSBpOworCX0KKworCS8qIGdlbmVyYXRlIHRhYmVscyAqLworCWZvciAoaSA9IDA7IGkgPCAyNTY7IGkrKykgeworCQkvKiBzcGwgaXMgdGhlIHNvdXJjZTogdGhlIGxhdy1zYW1wbGUgKGNvbnZlcnRlZCB0byBhbGF3KSAqLworCQlzcGwgPSBpOworCQlpZiAoZHNwX29wdGlvbnMgJiBEU1BfT1BUX1VMQVcpCisJCQlzcGwgPSBkc3BfYXVkaW9fdWxhd190b19hbGF3W2ldOworCQkvKiBmaW5kIHRoZSA3LWJpdC1zYW1wbGUgKi8KKwkJZm9yIChqID0gMDsgaiA8IDI1NjsgaisrKSB7CisJCQlpZiAoc29ydGVkX2FsYXdbal0gPT0gc3BsKQorCQkJCWJyZWFrOworCQl9CisJCS8qIHdyaXRlIDctYml0IGF1ZGlvIHZhbHVlICovCisJCWRzcF9hdWRpb19sYXcyc2V2ZW5baV0gPSBqID4+IDE7CisJfQorCWZvciAoaSA9IDA7IGkgPCAxMjg7IGkrKykgeworCQlzcGwgPSBzb3J0ZWRfYWxhd1tpIDw8IDFdOworCQlpZiAoZHNwX29wdGlvbnMgJiBEU1BfT1BUX1VMQVcpCisJCQlzcGwgPSBkc3BfYXVkaW9fYWxhd190b191bGF3W3NwbF07CisJCWRzcF9hdWRpb19zZXZlbjJsYXdbaV0gPSBzcGw7CisJfQorfQorCisKKy8qIG1peCAyKmxhdyAtPiBsYXcgKi8KK3U4IGRzcF9hdWRpb19taXhfbGF3WzY1NTM2XTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogZ2VuZXJhdGUgbWl4IHRhYmxlIHRvIG1peCB0d28gbGF3IHNhbXBsZXMgaW50byBvbmUgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZAorZHNwX2F1ZGlvX2dlbmVyYXRlX21peF90YWJsZSh2b2lkKQoreworCWludCBpLCBqOworCXMzMiBzYW1wbGU7CisKKwlpID0gMDsKKwl3aGlsZSAoaSA8IDI1NikgeworCQlqID0gMDsKKwkJd2hpbGUgKGogPCAyNTYpIHsKKwkJCXNhbXBsZSA9IGRzcF9hdWRpb19sYXdfdG9fczMyW2ldOworCQkJc2FtcGxlICs9IGRzcF9hdWRpb19sYXdfdG9fczMyW2pdOworCQkJaWYgKHNhbXBsZSA+IDMyNzY3KQorCQkJCXNhbXBsZSA9IDMyNzY3OworCQkJaWYgKHNhbXBsZSA8IC0zMjc2OCkKKwkJCQlzYW1wbGUgPSAtMzI3Njg7CisJCQlkc3BfYXVkaW9fbWl4X2xhd1soaTw8OCl8al0gPQorCQkJCWRzcF9hdWRpb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gkJQWxsIGZlYXR1cmVzIGFyZSBkb25lIGluIGtlcm5lbCBzcGFjZSBhbmQgd2lsbCBiZSByZWFsaXplZAorICoJCXVzaW5nIGhhcmR3YXJlLCBpZiBhdmFpbGFibGUgYW5kIHN1cHBvcnRlZCBieSBjaGlwIHNldC4KKyAqCQlCbG93ZmlzaCBlbmNyeXB0aW9uL2RlY3J5cHRpb24KKyAqLworCisvKiBTVFJVQ1RVUkU6CisgKgorICogVGhlIGRzcCBtb2R1bGUgcHJvdmlkZXMgbGF5ZXIgMiBmb3IgYi1jaGFubmVscyAoNjRrYml0KS4gSXQgcHJvdmlkZXMKKyAqIHRyYW5zcGFyZW50IGF1ZGlvIGZvcndhcmRpbmcgd2l0aCBzcGVjaWFsIGRpZ2l0YWwgc2lnbmFsIHByb2Nlc3Npbmc6CisgKgorICogLSAoMSkgZ2VuZXJhdGlvbiBvZiB0b25lcworICogLSAoMikgZGV0ZWN0aW9uIG9mIGR0bWYgdG9uZXMKKyAqIC0gKDMpIGNyb3NzY29ubmVjdGluZyBhbmQgY29uZmVyZW5jZXMgKGNsb2NraW5nKQorICogLSAoNCkgZWNobyBnZW5lcmF0aW9uIGZvciBkZWxheSB0ZXN0CisgKiAtICg1KSB2b2x1bWUgY29udHJvbAorICogLSAoNikgZGlzYWJsZSByZWNlaXZlIGRhdGEKKyAqIC0gKDcpIHBpcGVsaW5lCisgKiAtICg4KSBlbmNyeXB0aW9uL2RlY3J5cHRpb24KKyAqCisgKiBMb29rOgorICogICAgICAgICAgICAgVFggICAgICAgICAgICBSWAorICogICAgICAgICAtLS0tLS11cHBlciBsYXllci0tLS0tLQorICogICAgICAgICAgICAgfCAgICAgICAgICAgICBeCisgKiAgICAgICAgICAgICB8ICAgICAgICAgICAgIHwoNikKKyAqICAgICAgICAgICAgIHYgICAgICAgICAgICAgfAorICogICAgICAgKy0tLS0tKy0tLS0tLS0tLS0tLS0rLS0tLS0rCisgKiAgICAgICB8KDMpKDQpICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgIHwgICAgICAgICAgIENNWCAgICAgICAgICAgfAorICogICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiAgICAgICB8ICAgICAgICAgICArLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgIHwgICAgICAgICAgIHwgICAgICAgXgorICogICAgICAgfCAgICAgICAgICAgfCAgICAgICB8CisgKiAgICAgICB8Ky0tLS0tLS0tLSt8ICArLS0tLSstLS0tKworICogICAgICAgfHwoMSkgICAgICB8fCAgfCgyKSAgICAgIHwKKyAqICAgICAgIHx8ICAgICAgICAgfHwgIHwgICAgICAgICB8CisgKiAgICAgICB8fCAgVG9uZXMgIHx8ICB8ICBEVE1GICAgfAorICogICAgICAgfHwgICAgICAgICB8fCAgfCAgICAgICAgIHwKKyAqICAgICAgIHx8ICAgICAgICAgfHwgIHwgICAgICAgICB8CisgKiAgICAgICB8Ky0tLS0rLS0tLSt8ICArLS0tLSstLS0tKworICogICAgICAgKy0tLS0tKy0tLS0tKyAgICAgICBeCisgKiAgICAgICAgICAgICB8ICAgICAgICAgICAgIHwKKyAqICAgICAgICAgICAgIHYgICAgICAgICAgICAgfAorICogICAgICAgICstLS0tKy0tLS0rICAgKy0tLS0rLS0tLSsKKyAqICAgICAgICB8KDUpICAgICAgfCAgIHwoNSkgICAgICB8CisgKiAgICAgICAgfCAgICAgICAgIHwgICB8ICAgICAgICAgfAorICogICAgICAgIHxUWCBWb2x1bWV8ICAgfFJYIFZvbHVtZXwKKyAqICAgICAgICB8ICAgICAgICAgfCAgIHwgICAgICAgICB8CisgKiAgICAgICAgfCAgICAgICAgIHwgICB8ICAgICAgICAgfAorICogICAgICAgICstLS0tKy0tLS0rICAgKy0tLS0rLS0tLSsKKyAqICAgICAgICAgICAgIHwgICAgICAgICAgICAgXgorICogICAgICAgICAgICAgfCAgICAgICAgICAgICB8CisgKiAgICAgICAgICAgICB2ICAgICAgICAgICAgIHwKKyAqICAgICAgICArLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0rCisgKiAgICAgICAgfCg3KSAgICAgICAgICAgICAgICAgICAgfAorICogICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICB8ICBQaXBlbGluZSBQcm9jZXNzaW5nICB8CisgKiAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgfAorICogICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICArLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0rCisgKiAgICAgICAgICAgICB8ICAgICAgICAgICAgIF4KKyAqICAgICAgICAgICAgIHwgICAgICAgICAgICAgfAorICogICAgICAgICAgICAgdiAgICAgICAgICAgICB8CisgKiAgICAgICAgKy0tLS0rLS0tLSsgICArLS0tLSstLS0tKworICogICAgICAgIHwoOCkgICAgICB8ICAgfCg4KSAgICAgIHwKKyAqICAgICAgICB8ICAgICAgICAgfCAgIHwgICAgICAgICB8CisgKiAgICAgICAgfCBFbmNyeXB0IHwgICB8IERlY3J5cHQgfAorICogICAgICAgIHwgICAgICAgICB8ICAgfCAgICAgICAgIHwKKyAqICAgICAgICB8ICAgICAgICAgfCAgIHwgICAgICAgICB8CisgKiAgICAgICAgKy0tLS0rLS0tLSsgICArLS0tLSstLS0tKworICogICAgICAgICAgICAgfCAgICAgICAgICAgICBeCisgKiAgICAgICAgICAgICB8ICAgICAgICAgICAgIHwKKyAqICAgICAgICAgICAgIHYgICAgICAgICAgICAgfAorICogICAgICAgICAtLS0tLS1jYXJkICBsYXllci0tLS0tLQorICogICAgICAgICAgICAgVFggICAgICAgICAgICBSWAorICoKKyAqIEFib3ZlIHlvdSBjYW4gc2VlIHRoZSBsb2dpY2FsIGRhdGEgZmxvdy4gSWYgc29mdHdhcmUgaXMgdXNlZCB0byBkbyB0aGUKKyAqIHByb2Nlc3MsIGl0IGlzIGFjdHVhbGx5IHRoZSByZWFsIGRhdGEgZmxvdy4gSWYgaGFyZHdhcmUgaXMgdXNlZCwgZGF0YQor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ovCisJCXN0YXJ0ID0gY291bnQgJSAoKihwYXQtPnNpeltpbmRleF0pKTsKKwkJbnVtID0gbGVuOworCQlpZiAobnVtK2NvdW50ID4gcGF0LT5zZXFbaW5kZXhdKQorCQkJbnVtID0gcGF0LT5zZXFbaW5kZXhdIC0gY291bnQ7CisJCWlmIChudW0rc3RhcnQgPiAoKihwYXQtPnNpeltpbmRleF0pKSkKKwkJCW51bSA9ICgqKHBhdC0+c2l6W2luZGV4XSkpIC0gc3RhcnQ7CisJCS8qIGNvcHkgbWVtb3J5ICovCisJCW1lbWNweShkYXRhLCBwYXQtPmRhdGFbaW5kZXhdK3N0YXJ0LCBudW0pOworCQkvKiByZWR1Y2UgbGVuZ3RoICovCisJCWRhdGEgKz0gbnVtOworCQljb3VudCArPSBudW07CisJCWxlbiAtPSBudW07CisJfQorCXRvbmUtPmluZGV4ID0gaW5kZXg7CisJdG9uZS0+Y291bnQgPSBjb3VudDsKKworCS8qIHJldHVybiBza19idWZmICovCisJcmV0dXJuOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBzZW5kIEhXIG1lc3NhZ2UgdG8gaGZjIGNhcmQgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitkc3BfdG9uZV9od19tZXNzYWdlKHN0cnVjdCBkc3AgKmRzcCwgdTggKnNhbXBsZSwgaW50IGxlbikKK3sKKwlzdHJ1Y3Qgc2tfYnVmZiAqbnNrYjsKKworCS8qIHVubG9ja2luZyBpcyBub3QgcmVxdWlyZWQsIGJlY2F1c2Ugd2UgZG9uJ3QgZXhwZWN0IGEgcmVzcG9uc2UgKi8KKwluc2tiID0gX2FsbG9jX21JU0ROX3NrYihQSF9DT05UUk9MX1JFUSwKKwkJKGxlbik/SEZDX1NQTF9MT09QX09OOkhGQ19TUExfTE9PUF9PRkYsIGxlbiwgc2FtcGxlLAorCQlHRlBfQVRPTUlDKTsKKwlpZiAobnNrYikgeworCQlpZiAoZHNwLT5jaC5wZWVyKSB7CisJCQlpZiAoZHNwLT5jaC5yZWN2KGRzcC0+Y2gucGVlciwgbnNrYikpCisJCQkJZGV2X2tmcmVlX3NrYihuc2tiKTsKKwkJfSBlbHNlCisJCQlkZXZfa2ZyZWVfc2tiKG5za2IpOworCX0KK30KKworCisvKioqKioqKioqKioqKioqKioKKyAqIHRpbWVyIGV4cGlyZXMgKgorICoqKioqKioqKioqKioqKioqLwordm9pZAorZHNwX3RvbmVfdGltZW91dCh2b2lkICphcmcpCit7CisJc3RydWN0IGRzcCAqZHNwID0gYXJnOworCXN0cnVjdCBkc3BfdG9uZSAqdG9uZSA9ICZkc3AtPnRvbmU7CisJc3RydWN0IHBhdHRlcm4gKnBhdCA9IChzdHJ1Y3QgcGF0dGVybiAqKXRvbmUtPnBhdHRlcm47CisJaW50IGluZGV4ID0gdG9uZS0+aW5kZXg7CisKKwlpZiAoIXRvbmUtPnRvbmUpCisJCXJldHVybjsKKworCWluZGV4Kys7CisJaWYgKCFwYXQtPnNlcVtpbmRleF0pCisJCWluZGV4ID0gMDsKKwl0b25lLT5pbmRleCA9IGluZGV4OworCisJLyogc2V0IG5leHQgdG9uZSAqLworCWlmIChwYXQtPmRhdGFbaW5kZXhdID09IERBVEFfUykKKwkJZHNwX3RvbmVfaHdfbWVzc2FnZShkc3AsIDAsIDApOworCWVsc2UKKwkJZHNwX3RvbmVfaHdfbWVzc2FnZShkc3AsIHBhdC0+ZGF0YVtpbmRleF0sICoocGF0LT5zaXpbaW5kZXhdKSk7CisJLyogc2V0IHRpbWVyICovCisJaW5pdF90aW1lcigmdG9uZS0+dGwpOworCXRvbmUtPnRsLmV4cGlyZXMgPSBqaWZmaWVzICsgKHBhdC0+c2VxW2luZGV4XSAqIEhaKSAvIDgwMDA7CisJYWRkX3RpbWVyKCZ0b25lLT50bCk7Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqCisgKiBzZXQvcmVsZWFzZSB0b25lICoKKyAqKioqKioqK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0dXJuOworCXZhX3N0YXJ0KHZhLCBmbXQpOworCXByaW50ayhLRVJOX0RFQlVHICJsMiAodGVpICVkKTogIiwgbDItPnRlaSk7CisJdnByaW50ayhmbXQsIHZhKTsKKwlwcmludGsoIlxuIik7CisJdmFfZW5kKHZhKTsKK30KKworaW5saW5lIHVfaW50CitsMmhlYWRlcnNpemUoc3RydWN0IGxheWVyMiAqbDIsIGludCB1aSkKK3sKKwlyZXR1cm4gKCh0ZXN0X2JpdChGTEdfTU9EMTI4LCAmbDItPmZsYWcpICYmICghdWkpKSA/IDIgOiAxKSArCisJCSh0ZXN0X2JpdChGTEdfTEFQRCwgJmwyLT5mbGFnKSA/IDIgOiAxKTsKK30KKworaW5saW5lIHVfaW50CitsMmFkZHJzaXplKHN0cnVjdCBsYXllcjIgKmwyKQoreworCXJldHVybiB0ZXN0X2JpdChGTEdfTEFQRCwgJmwyLT5mbGFnKSA/IDIgOiAxOworfQorCitzdGF0aWMgdV9pbnQKK2wyX25ld2lkKHN0cnVjdCBsYXllcjIgKmwyKQoreworCXVfaW50CWlkOworCisJaWQgPSBsMi0+bmV4dF9pZCsrOworCWlmIChpZCA9PSAweDdmZmYpCisJCWwyLT5uZXh0X2lkID0gMTsKKwlpZCA8PD0gMTY7CisJaWQgfD0gbDItPnRlaSA8PCA4OworCWlkIHw9IGwyLT5zYXBpOworCXJldHVybiBpZDsKK30KKworc3RhdGljIHZvaWQKK2wydXAoc3RydWN0IGxheWVyMiAqbDIsIHVfaW50IHByaW0sIHN0cnVjdCBza19idWZmICpza2IpCit7CisJaW50CWVycjsKKworCWlmICghbDItPnVwKQorCQlyZXR1cm47CisJbUlTRE5fSEVBRF9QUklNKHNrYikgPSBwcmltOworCW1JU0ROX0hFQURfSUQoc2tiKSA9IChsMi0+Y2gubnIgPDwgMTYpIHwgbDItPmNoLmFkZHI7CisJZXJyID0gbDItPnVwLT5zZW5kKGwyLT51cCwgc2tiKTsKKwlpZiAoZXJyKSB7CisJCXByaW50ayhLRV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aWYgKGNyYml0KQorCQkJKnB0cisrID0gbDItPmFkZHIuQjsKKwkJZWxzZQorCQkJKnB0cisrID0gbDItPmFkZHIuQTsKKwkJcmV0dXJuIDE7CisJfQorfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2VucXVldWVfc3VwZXIoc3RydWN0IGxheWVyMiAqbDIsIHN0cnVjdCBza19idWZmICpza2IpCit7CisJaWYgKGwyZG93bihsMiwgUEhfREFUQV9SRVEsIGwyX25ld2lkKGwyKSwgc2tiKSkKKwkJZGV2X2tmcmVlX3NrYihza2IpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2VucXVldWVfdWkoc3RydWN0IGxheWVyMiAqbDIsIHN0cnVjdCBza19idWZmICpza2IpCit7CisJaWYgKGwyLT50bSkKKwkJbDJfdGVpKGwyLCBNRExfU1RBVFVTX1VJX0lORCwgMCk7CisJaWYgKGwyZG93bihsMiwgUEhfREFUQV9SRVEsIGwyX25ld2lkKGwyKSwgc2tiKSkKKwkJZGV2X2tmcmVlX3NrYihza2IpOworfQorCitpbmxpbmUgaW50CitJc1VJKHVfY2hhciAqZGF0YSkKK3sKKwlyZXR1cm4gKGRhdGFbMF0gJiAweGVmKSA9PSBVSTsKK30KKworaW5saW5lIGludAorSXNVQSh1X2NoYXIgKmRhdGEpCit7CisJcmV0dXJuIChkYXRhWzBdICYgMHhlZikgPT0gVUE7Cit9CisKK2lubGluZSBpbnQKK0lzRE0odV9jaGFyICpkYXRhKQoreworCXJldHVybiAoZGF0YVswXSAmIDB4ZWYpID09IERNOworfQorCitpbmxpbmUgaW50CitJc0RJU0ModV9jaGFyICpkYXRhKQoreworCXJldHVybiAoZGF0YVswXSAmIDB4ZWYpID09IERJU0M7Cit9CisKK2lubGluZSBpbnQKK0lzUlIodV9jaGFyICpkYXRhLCBzdHJ1Y3QgbGF5ZXIyICpsMikKK3sKKwlpZiAodGVzdF9iaXQoRkxHX01PRDEyOCwgJmwyLT5mbGFnKSkKKwkJcmV0dXJuIGRh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wdCwKKwkuZ2V0c29ja29wdAk9IGRhdGFfc29ja19nZXRzb2Nrb3B0LAorCS5jb25uZWN0CT0gc29ja19ub19jb25uZWN0LAorCS5zb2NrZXRwYWlyCT0gc29ja19ub19zb2NrZXRwYWlyLAorCS5hY2NlcHQJCT0gc29ja19ub19hY2NlcHQsCisJLm1tYXAJCT0gc29ja19ub19tbWFwCit9OworCitzdGF0aWMgaW50CitkYXRhX3NvY2tfY3JlYXRlKHN0cnVjdCBuZXQgKm5ldCwgc3RydWN0IHNvY2tldCAqc29jaywgaW50IHByb3RvY29sKQoreworCXN0cnVjdCBzb2NrICpzazsKKworCWlmIChzb2NrLT50eXBlICE9IFNPQ0tfREdSQU0pCisJCXJldHVybiAtRVNPQ0tUTk9TVVBQT1JUOworCisJc2sgPSBza19hbGxvYyhuZXQsIFBGX0lTRE4sIEdGUF9LRVJORUwsICZtSVNETl9wcm90byk7CisJaWYgKCFzaykKKwkJcmV0dXJuIC1FTk9NRU07CisKKwlzb2NrX2luaXRfZGF0YShzb2NrLCBzayk7CisKKwlzb2NrLT5vcHMgPSAmZGF0YV9zb2NrX29wczsKKwlzb2NrLT5zdGF0ZSA9IFNTX1VOQ09OTkVDVEVEOworCXNvY2tfcmVzZXRfZmxhZyhzaywgU09DS19aQVBQRUQpOworCisJc2stPnNrX3Byb3RvY29sID0gcHJvdG9jb2w7CisJc2stPnNrX3N0YXRlICAgID0gTUlTRE5fT1BFTjsKKwltSVNETl9zb2NrX2xpbmsoJmRhdGFfc29ja2V0cywgc2spOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQKK2Jhc2Vfc29ja19yZWxlYXNlKHN0cnVjdCBzb2NrZXQgKnNvY2spCit7CisJc3RydWN0IHNvY2sgKnNrID0gc29jay0+c2s7CisKKwlwcmludGsoS0VSTl9ERUJVRyAiJXMoJXApIHNrPSVwXG4iLCBfX2Z1bmNfXywgc29jaywgc2spOworCWlmICghc2spCisJCXJldHVybiAwOworCisJbUlTRE5f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2MobmV0LCBQRl9JU0ROLCBHRlBfS0VSTkVMLCAmbUlTRE5fcHJvdG8pOworCWlmICghc2spCisJCXJldHVybiAtRU5PTUVNOworCisJc29ja19pbml0X2RhdGEoc29jaywgc2spOworCXNvY2stPm9wcyA9ICZiYXNlX3NvY2tfb3BzOworCXNvY2stPnN0YXRlID0gU1NfVU5DT05ORUNURUQ7CisJc29ja19yZXNldF9mbGFnKHNrLCBTT0NLX1pBUFBFRCk7CisJc2stPnNrX3Byb3RvY29sID0gcHJvdG9jb2w7CisJc2stPnNrX3N0YXRlICAgID0gTUlTRE5fT1BFTjsKKwltSVNETl9zb2NrX2xpbmsoJmJhc2Vfc29ja2V0cywgc2spOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQKK21JU0ROX3NvY2tfY3JlYXRlKHN0cnVjdCBuZXQgKm5ldCwgc3RydWN0IHNvY2tldCAqc29jaywgaW50IHByb3RvKQoreworCWludCBlcnIgPSAtRVBST1RPTk9TVVBQT1JUOworCisJc3dpdGNoCShwcm90bykgeworCWNhc2UgSVNETl9QX0JBU0U6CisJCWVyciA9IGJhc2Vfc29ja19jcmVhdGUobmV0LCBzb2NrLCBwcm90byk7CisJCWJyZWFrOworCWNhc2UgSVNETl9QX1RFX1MwOgorCWNhc2UgSVNETl9QX05UX1MwOgorCWNhc2UgSVNETl9QX1RFX0UxOgorCWNhc2UgSVNETl9QX05UX0UxOgorCWNhc2UgSVNETl9QX0xBUERfVEU6CisJY2FzZSBJU0ROX1BfTEFQRF9OVDoKKwljYXNlIElTRE5fUF9CX1JBVzoKKwljYXNlIElTRE5fUF9CX0hETEM6CisJY2FzZSBJU0ROX1BfQl9YNzVTTFA6CisJY2FzZSBJU0ROX1BfQl9MMkRUTUY6CisJY2FzZSBJU0ROX1BfQl9MMkRTUDoKKwljYXNlIElTRE5fUF9CX0wyRFNQSERMQzoKKwkJZXJyID0gZGF0YV9zb2NrX2NyZWF0ZShuZXQsIHNvY2ssIHByb3RvKTsK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FUVVNfQ0hBTkdFIGFuZAorICogIDA4LTMxLTAxICAwMS4wMi4wMiAgQWRkZWQgZXZlbnQgTVBJX0VWRU5UX1NDU0lfREVWSUNFX1NUQVRVU19DSEFOR0UgYW5kCiAgKiAgICAgICAgICAgICAgICAgICAgICByZWxhdGVkIHN0cnVjdHVyZSBhbmQgZGVmaW5lcy4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIGV2ZW50IE1QSV9FVkVOVF9PTl9CVVNfVElNRVJfRVhQSVJFRC4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1QSV9JT0NJTklUX0ZMQUdTX0RJU0NBUkRfRldfSU1BR0UuCkBAIC0xODcsNyArMTg3LDcgQEAKICAqICAxMC0xMS0wNiAgMDEuMDUuMTIgIEFkZGVkIE1QSV9JT0NGQUNUU19FWENFUFRfTUVUQURBVEFfVU5TVVBQT1JURUQuCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNYXhJbml0aWF0b3JzIGZpZWxkIHRvIFBvcnRGYWN0cyByZXBseS4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIFNBUyBEZXZpY2UgU3RhdHVzIENoYW5nZSBSZWFzb25Db2RlIGZvcgotICogICAgICAgICAgICAgICAgICAgICAgYXN5bmNocm9ub3VzIG5vdGlmaWNhaXRvbi4KKyAqICAgICAgICAgICAgICAgICAgICAgIGFzeW5jaHJvbm91cyBub3RpZmljYXRpb24uCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfRVZFTlRfU0FTX0VYUEFOREVSX1NUQVRVU19DSEFOR0UgYW5kIGV2ZW50CiAgKiAgICAgICAgICAgICAgICAgICAgICBkYXRhIHN0cnVjdHVyZS4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIG5ldyBJbWFnZVR5cGUgdmFsdWVzIGZvciBGV0Rvd25sb2FkIGFuZCBGV1VwbG9hZApAQCAtMjEzLDcgKzIxMyw3IEBACiAgKiAgICAg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AuLi4pICh7fSkKLSNlbmRpZgogCi0jaWZkZWYgQ09ORklHX01URF9VQklfREVCVUdfRElTQUJMRV9CR1QKLSNkZWZpbmUgREJHX0RJU0FCTEVfQkdUIDEKLSNlbHNlCi0jZGVmaW5lIERCR19ESVNBQkxFX0JHVCAwCi0jZW5kaWYKKyNkZWZpbmUgdWJpX2Fzc2VydChleHByKSAgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICBpZiAodW5saWtlbHkoIShleHByKSkpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fQ1JJVCAiVUJJIGFzc2VydCBmYWlsZWQgaW4gJXMgYXQgJXUgKHBpZCAlZClcbiIsIFwKKyAgICAgICAgICAgICAgICAgICAgICAgX19mdW5jX18sIF9fTElORV9fLCBjdXJyZW50LT5waWQpOyAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICAgIHViaV9kYmdfZHVtcF9zdGFjaygpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCiAKLSNpZmRlZiBDT05GSUdfTVREX1VCSV9ERUJVR19NU0cKLS8qIEdlbmVyaWMgZGVidWdnaW5nIG1lc3NhZ2UgKi8KICNkZWZpbmUgZGJnX21zZyhmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJcHJpbnRrKEtFUk5fREVCVUcgIlVCSSBEQkcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCBcCiAJICAgICAgIGN1cnJlbnQtPnBpZCwgX19mdW5jX18sICMjX19WQV9BUkdTX18pCkBAIC02MSwzNiArNTYsMjkgQEAKIHZvaW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UXMgdGhvdWdoLi4uCisgKi8KKyNpZmRlZiBDT05GSUdfSFBFVF9FTVVMQVRFX1JUQworI2luY2x1ZGUgPGFzbS9ocGV0Lmg+CisjZWxzZQorCitzdGF0aWMgaW5saW5lIGludCBpc19ocGV0X2VuYWJsZWQodm9pZCkKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaHBldF9tYXNrX3J0Y19pcnFfYml0KHVuc2lnbmVkIGxvbmcgbWFzaykKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaHBldF9zZXRfcnRjX2lycV9iaXQodW5zaWduZWQgbG9uZyBtYXNrKQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludAoraHBldF9zZXRfYWxhcm1fdGltZSh1bnNpZ25lZCBjaGFyIGhycywgdW5zaWduZWQgY2hhciBtaW4sIHVuc2lnbmVkIGNoYXIgc2VjKQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludCBocGV0X3NldF9wZXJpb2RpY19mcmVxKHVuc2lnbmVkIGxvbmcgZnJlcSkKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaHBldF9ydGNfZHJvcHBlZF9pcnEodm9pZCkKK3sKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGlubGluZSBpbnQgaHBldF9ydGNfdGltZXJfaW5pdCh2b2lkKQoreworCXJldHVybiAwOworfQorCitleHRlcm4gaXJxX2hhbmRsZXJfdCBocGV0X3J0Y19pbnRlcnJ1cHQ7CisKK3N0YXRpYyBpbmxpbmUgaW50IGhwZXRfcmVnaXN0ZXJfaXJxX2hhbmRsZXIoaXJxX2hhbmRsZXJfdCBoYW5kbGVyKQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludCBocGV0X3VucmVnaXN0ZXJfaXJxX2hhbmRsZXIoaXJxX2hhbmRsZXJfdCBoYW5kbGVyKQoreworCXJldHVybiAw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fjApIHsKKwkJZGlydHkgPSBvbWZzX2lnZXQoZGlyLT5pX3NiLCBwcmV2KTsKKwkJaWYgKCFJU19FUlIoZGlydHkpKSB7CisJCQltYXJrX2lub2RlX2RpcnR5KGRpcnR5KTsKKwkJCWlwdXQoZGlydHkpOworCQl9CisJfQorCisJZXJyID0gMDsKK291dF9mcmVlX2JoOgorCWJyZWxzZShiaCk7CitvdXQ6CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBvbWZzX2Rpcl9pc19lbXB0eShzdHJ1Y3QgaW5vZGUgKmlub2RlKQoreworCWludCBuYnVja2V0cyA9IChpbm9kZS0+aV9zaXplIC0gT01GU19ESVJfU1RBUlQpIC8gODsKKwlzdHJ1Y3QgYnVmZmVyX2hlYWQgKmJoOworCXU2NCAqcHRyOworCWludCBpOworCisJYmggPSBzYl9icmVhZChpbm9kZS0+aV9zYiwgY2x1c190b19ibGsoT01GU19TQihpbm9kZS0+aV9zYiksCisJCQlpbm9kZS0+aV9pbm8pKTsKKworCWlmICghYmgpCisJCXJldHVybiAwOworCisJcHRyID0gKHU2NCAqKSAmYmgtPmJfZGF0YVtPTUZTX0RJUl9TVEFSVF07CisKKwlmb3IgKGkgPSAwOyBpIDwgbmJ1Y2tldHM7IGkrKywgcHRyKyspCisJCWlmICgqcHRyICE9IH4wKQorCQkJYnJlYWs7CisKKwlicmVsc2UoYmgpOworCXJldHVybiAqcHRyICE9IH4wOworfQorCitzdGF0aWMgaW50IG9tZnNfdW5saW5rKHN0cnVjdCBpbm9kZSAqZGlyLCBzdHJ1Y3QgZGVudHJ5ICpkZW50cnkpCit7CisJaW50IHJldDsKKwlzdHJ1Y3QgaW5vZGUgKmlub2RlID0gZGVudHJ5LT5kX2lub2RlOworCisJcmV0ID0gb21mc19kZWxldGVfZW50cnkoZGVudHJ5KTsKKwlpZiAocmV0KQorCQlnb3RvIGVuZF91bmxpbms7CisKKwlpbm9kZV9kZWNfbGlua19jb3VudChpbm9kZSk7CisJbWFya19pb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nB0ciArIGNvdW50LCAweGZmLAorCQkJCXNiLT5zX2Jsb2Nrc2l6ZSAtIGNvdW50KTsKKwkJYnJlbHNlKGJoKTsKKwkJcHRyKys7CisJfQorb3V0OgorCXJldHVybiAwOworCitub21lbV9mcmVlOgorCWZvciAoY291bnQgPSAwOyBjb3VudCA8IGFycmF5X3NpemU7IGNvdW50KyspCisJCWtmcmVlKHNiaS0+c19pbWFwW2NvdW50XSk7CisKKwlrZnJlZShzYmktPnNfaW1hcCk7Citub21lbToKKwlzYmktPnNfaW1hcCA9IE5VTEw7CisJc2JpLT5zX2ltYXBfc2l6ZSA9IDA7CisJcmV0dXJuIC1FTk9NRU07Cit9CisKK2VudW0geworCU9wdF91aWQsIE9wdF9naWQsIE9wdF91bWFzaywgT3B0X2RtYXNrLCBPcHRfZm1hc2sKK307CisKK3N0YXRpYyBtYXRjaF90YWJsZV90IHRva2VucyA9IHsKKwl7T3B0X3VpZCwgInVpZD0ldSJ9LAorCXtPcHRfZ2lkLCAiZ2lkPSV1In0sCisJe09wdF91bWFzaywgInVtYXNrPSVvIn0sCisJe09wdF9kbWFzaywgImRtYXNrPSVvIn0sCisJe09wdF9mbWFzaywgImZtYXNrPSVvIn0sCit9OworCitzdGF0aWMgaW50IHBhcnNlX29wdGlvbnMoY2hhciAqb3B0aW9ucywgc3RydWN0IG9tZnNfc2JfaW5mbyAqc2JpKQoreworCWNoYXIgKnA7CisJc3Vic3RyaW5nX3QgYXJnc1tNQVhfT1BUX0FSR1NdOworCWludCBvcHRpb247CisKKwlpZiAoIW9wdGlvbnMpCisJCXJldHVybiAxOworCisJd2hpbGUgKChwID0gc3Ryc2VwKCZvcHRpb25zLCAiLCIpKSAhPSBOVUxMKSB7CisJCWludCB0b2tlbjsKKwkJaWYgKCEqcCkKKwkJCWNvbnRpbnVlOworCisJCXRva2VuID0gbWF0Y2hfdG9rZW4ocCwgdG9rZW5zLCBhcmdzKTsKKwkJc3dpdGNoICh0b2tlbikgeworCQljYXNlIE9wd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Cit9OworCitzdGF0aWMgaW50IF9faW5pdCBpbml0X29tZnNfZnModm9pZCkKK3sKKwlyZXR1cm4gcmVnaXN0ZXJfZmlsZXN5c3RlbSgmb21mc19mc190eXBlKTsKK30KKworc3RhdGljIHZvaWQgX19leGl0IGV4aXRfb21mc19mcyh2b2lkKQoreworCXVucmVnaXN0ZXJfZmlsZXN5c3RlbSgmb21mc19mc190eXBlKTsKK30KKworbW9kdWxlX2luaXQoaW5pdF9vbWZzX2ZzKTsKK21vZHVsZV9leGl0KGV4aXRfb21mc19mcyk7CmRpZmYgLS1naXQgYS9mcy9vbWZzL29tZnMuaCBiL2ZzL29tZnMvb21mcy5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjJiYzBmMDYKLS0tIC9kZXYvbnVsbAorKysgYi9mcy9vbWZzL29tZnMuaApAQCAtMCwwICsxLDY3IEBACisjaWZuZGVmIF9PTUZTX0gKKyNkZWZpbmUgX09NRlNfSAorCisjaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+CisjaW5jbHVkZSA8bGludXgvZnMuaD4KKworI2luY2x1ZGUgIm9tZnNfZnMuaCIKKworLyogSW4tbWVtb3J5IHN0cnVjdHVyZXMgKi8KK3N0cnVjdCBvbWZzX3NiX2luZm8geworCXU2NCBzX251bV9ibG9ja3M7CisJdTY0IHNfYml0bWFwX2lubzsKKwl1NjQgc19yb290X2lubzsKKwl1MzIgc19ibG9ja3NpemU7CisJdTMyIHNfbWlycm9yczsKKwl1MzIgc19zeXNfYmxvY2tzaXplOworCXUzMiBzX2NsdXN0ZXJzaXplOworCWludCBzX2Jsb2NrX3NoaWZ0OworCXVuc2lnbmVkIGxvbmcgKipzX2ltYXA7CisJaW50IHNfaW1hcF9zaXplOworCXN0cnVjdCBtdXRleCBzX2JpdG1hcF9sb2NrOworCWludCBzX3VpZDsKKwlpbnQgc19naWQ7CisJaW50IHNfZG1hc2s7CisJaW50IHNfZm1hc2s7Cit9OworCisvKiB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ICAgIGFyZ3NbMF0sIGFyZ3NbMV0sIGFyZ3NbMl0sIGFyZ3NbM10sIGFyZ3NbNF0sIGFyZ3NbNV0sCisJCSAgICAgICBzcCwgcGMpOworfQorI2VuZGlmIC8qIENPTkZJR19IQVZFX0FSQ0hfVFJBQ0VIT09LICovCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgSGVyZSB0aGUgZnMgcGFydCBiZWdpbnMgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTE4MzQsOCArMTg1OSw3IEBACiAgKiAvcHJvYy9waWQvZmQgbmVlZHMgYSBzcGVjaWFsIHBlcm1pc3Npb24gaGFuZGxlciBzbyB0aGF0IGEgcHJvY2VzcyBjYW4gc3RpbGwKICAqIGFjY2VzcyAvcHJvYy9zZWxmL2ZkIGFmdGVyIGl0IGhhcyBleGVjdXRlZCBhIHNldHVpZCgpLgogICovCi1zdGF0aWMgaW50IHByb2NfZmRfcGVybWlzc2lvbihzdHJ1Y3QgaW5vZGUgKmlub2RlLCBpbnQgbWFzaywKLQkJCQlzdHJ1Y3QgbmFtZWlkYXRhICpuZCkKK3N0YXRpYyBpbnQgcHJvY19mZF9wZXJtaXNzaW9uKHN0cnVjdCBpbm9kZSAqaW5vZGUsIGludCBtYXNrKQogewogCWludCBydjsKIApAQCAtMjM3NiwyOSArMjQwMCw3MCBAQAogfQogCiAjaWZkZWYgQ09ORklHX1RBU0tfSU9fQUNDT1VOVElORwotc3RhdGljIGludCBwcm9jX3BpZF9pb19hY2NvdW50aW5nKHN0cnVjdCB0YXNrX3N0cnVjdCAqdGFzaywgY2hhciAqYnVmZmVyKQorc3RhdGljIGludCBkb19pb19hY2NvdW50aW5nKHN0cn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dodCAoQykgMjAwMiAgICAgICBZb3NoaW5vcmkgU2F0byAoeXNhdG9AdXNlcnMuc291cmNlZm9yZ2UuanApCi0gKiAgQ29weXJpZ2h0IChDKSAyMDA1ICAgICAgIEhlbm5lcmljaCBNaWNoYWVsIChoZW5uZXJpY2hAYmxhY2tmaW4udWNsaW51eC5vcmcpCi0gKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jaWZuZGVmIF9CTEFDS0ZJTl9JREVfSAotI2RlZmluZSBfQkxBQ0tGSU5fSURFX0gKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmZGVmIF9fS0VSTkVMX18KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIE1BWF9IV0lGUwkxCi0KLSNpbmNsdWRlIDxhc20tZ2VuZXJpYy9pZGVfaW9wcy5oPgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNlbmRpZgkJCQkvKiBfX0tFUk5FTF9fICovCi0jZW5kaWYJCQkJLyogX0JMQUNLRklOX0lERV9IICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLWJsYWNrZmluL2t2bS5oIGIvaW5jbHVkZS9hc20tYmxhY2tmaW4va3ZtLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGUzNDc3ZDcuLjAwMDAwMDAKLS0tIGEvaW5jbHVkZS9hc20tYmxhY2tma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DB4ODEwMDAwCisjZGVmaW5lIEVMRl9DT1JFX0VGTEFHUyAweDgxMDAwMAogI2VuZGlmCiAjaWYgZGVmaW5lZChfX0g4MzAwU19fKQotI2RlZmluZSBFTEZfRkxBR1MgICAgICAgMHg4MjAwMDAKKyNkZWZpbmUgRUxGX0NPUkVfRUZMQUdTIDB4ODIwMDAwCiAjZW5kaWYKIAogI2RlZmluZSBFTEZfUExBVF9JTklUKF9yKQlfci0+ZXIxID0gMApkaWZmIC0tZ2l0IGEvaW5jbHVkZS9hc20taDgzMDAvaWRlLmggYi9pbmNsdWRlL2FzbS1oODMwMC9pZGUuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggZjg1MzVjZS4uMDAwMDAwMAotLS0gYS9pbmNsdWRlL2FzbS1oODMwMC9pZGUuaAorKysgL2Rldi9udWxsCkBAIC0xLDI2ICswLDAgQEAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICogIGxpbnV4L2luY2x1ZGUvYXNtLWg4MzAwL2lkZS5oCi0gKgotICogIENvcHlyaWdodCAoQykgMTk5NC0xOTk2ICBMaW51cyBUb3J2YWxkcyAmIGF1dGhvcnMKLSAqICBDb3B5cmlnaHQgKEMpIDIwMDEgICAgICAgTGluZW8gSW5jLiwgZGF2aWRtQHNuYXBnZWFyLmNvbQotICogIENvcHlyaWdodCAoQykgMjAwMiAgICAgICBHcmVnIFVuZ2VyZXIgKGdlcmdAc25hcGdlYXIuY29tKQotICogIENvcHlyaWdodCAoQykgMjAwMiAgICAgICBZb3NoaW5vcmkgU2F0byAoeXNhdG9AdXNlcnMuc291cmNlZm9yZ2UuanApCi0gKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jaWZuZGVmIF9IODMwMF9JREVfSAotI2RlZmluZSBfSDgzMDBfSURFX0gKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmZGVmIF9fS0VSTkVMX18KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIE1BWF9IV0lGUwkxCi0KLSNpbmNsdWRlIDxhc20tZ2VuZXJpYy9pZGVfaW9wcy5oPgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNlbmRpZiAvKiBfX0tFUk5FTF9fICovCi0jZW5kaWYgLyogX0g4MzAwX0lERV9IICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLWg4MzAwL2tleWJvYXJkLmggYi9pbmNsdWRlL2FzbS1oODMwMC9rZXlib2FyZC5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCA5MGVmYmQ2Li4wMDAwMDAwCi0tLSBhL2luY2x1ZGUvYXNtLWg4MzAwL2tleWJvYXJkLmgKKysrIC9kZXYvbnVsbApAQCAtMSwyNCArMCwwIEBACi0vKgotICogIGxpbnV4L2luY2x1ZGUvYXNtLWg4MzAwL2tleWJvYXJkLmgKLSAqICBDcmVhdGVkIDA0IERlYyAyMDAxIGJ5IEtoYWxlZCBIYXNzb3VuYWggPGtoYXNzb3VuYWhAbWVkaXVtd2FyZS5uZXQ+Ci0gKiAgVGhpcyBmaWxlIGNvbnRhaW5zIHRoZSBEcmFnb25iYWxsIGFyY2hpdGVjdHVyZSBzcGVjaWZpYyBrZXlib2FyZCBkZWZpbml0aW9ucwotICovCi0KL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kKLSNlbmRpZiAvKiBQQUdFX1NISUZUID09IDEzICovCisjZGVmaW5lIFRIUkVBRF9TSVpFX09SREVSICgxMyAtIFBBR0VfU0hJRlQpCiAKICNkZWZpbmUgaW5pdF90aHJlYWRfaW5mbwkoaW5pdF90YXNrLnRocmVhZC5pbmZvKQogI2RlZmluZSBpbml0X3N0YWNrCQkoaW5pdF90aHJlYWRfdW5pb24uc3RhY2spCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FzbS1tNjhrbm9tbXUvYml0b3BzLmggYi9pbmNsdWRlL2FzbS1tNjhrbm9tbXUvYml0b3BzLmgKaW5kZXggYzE0MmZiZi4uNmYzNjg1ZSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9hc20tbTY4a25vbW11L2JpdG9wcy5oCisrKyBiL2luY2x1ZGUvYXNtLW02OGtub21tdS9iaXRvcHMuaApAQCAtMTQsOCArMTQsMzggQEAKICNlcnJvciBvbmx5IDxsaW51eC9iaXRvcHMuaD4gY2FuIGJlIGluY2x1ZGVkIGRpcmVjdGx5CiAjZW5kaWYKIAorI2lmIGRlZmluZWQgKF9fbWNmaXNhYXBsdXNfXykgfHwgZGVmaW5lZCAoX19tY2Zpc2FjX18pCitzdGF0aWMgaW5saW5lIGludCBmZnModW5zaWduZWQgaW50IHZhbCkKK3sKKyAgICAgICAgaWYgKCF2YWwpCisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisKKyAgICAgICAgYXNtIHZvbGF0aWxlKAorICAgICAgICAgICAgICAgICAgICAgICAgImJpdHJldiAlMFxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAiZmYxICUwXG5cdCIKKyAgICAgICAgICAgICAgICAgICAgICAgIDogIj1kIiAodmFsKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAiMCIgKHZhbCkKKwkJICAgICk7CisgICAgICAgIHZhbCsrOworICAgICAgICByZXR1cm4gdmFsOworfQorCitzdGF0aWMgaW5saW5lIGludCBfX2Zmcyh1bnNpZ25lZCBpb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ciwgYWRkcikKLSNkZWZpbmUgdGVzdF9hbmRfY2xlYXJfYml0KG5yLCBhZGRyKQlfX3Ruc19hdG9taWNfYml0X29wICgiY2xyMSIsIG5yLCBhZGRyKQotCi0jZGVmaW5lIF9fdGVzdF9hbmRfY2hhbmdlX2JpdChuciwgYWRkcikJX190bnNfYml0X29wICgibm90MSIsIG5yLCBhZGRyKQotI2RlZmluZSB0ZXN0X2FuZF9jaGFuZ2VfYml0KG5yLCBhZGRyKQlfX3Ruc19hdG9taWNfYml0X29wICgibm90MSIsIG5yLCBhZGRyKQotCi0KLSNkZWZpbmUgX19jb25zdF90ZXN0X2JpdChuciwgYWRkcikJCQkJCSAgICAgIFwKLSAgKHsgaW50IF9fdGVzdF9iaXRfcmVzOwkJCQkJCSAgICAgIFwKLSAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJ0c3QxICglMSAtIDB4MTIzKSwgJTI7IHNldGYgbnosICUwIgkJICAgICAgXAotCQkJICAgOiAiPXIiIChfX3Rlc3RfYml0X3JlcykJCQkgICAgICBcCi0JCQkgICA6ICJnIiAoKChucikgJiAweDcpICsgMHgxMjMpLAkJICAgICAgXAotCQkJICAgICAibSIgKCooKGNvbnN0IGNoYXIgKikoYWRkcikgKyAoKG5yKSA+PiAzKSkpKTsgICAgXAotICAgICBfX3Rlc3RfYml0X3JlczsJCQkJCQkJICAgICAgXAotICB9KQotc3RhdGljIGlubGluZSBpbnQgX190ZXN0X2JpdCAoaW50IG5yLCBjb25zdCB2b2lkICphZGRyKQotewotCWludCByZXM7Ci0JX19hc21fXyBfX3ZvbGF0aWxlX18gKCJ0c3QxICUxLCBbJTJdOyBzZXRmIG56LCAlMCIKLQkJCSAgICAgIDogIj1yIiAocmVzKQotCQkJICAgICAgOiAiciIgKG5yICYgMHg3KSwgInIiIChhZGRyICsgKG5yID4+IDMpKSk7Ci0JcmV0dXJuIHJlczsKLX0KLSNkZWZpbmUgdGVzdF9iaXQobnIsYWRkcikJCQkJCQlcCi0g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AgICgweGEwKSAgIC8qICAtICAgICAgICAgICIgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfUkRBRFIgICAgKDB4YzApICAgLyogIC0gICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgRkRDMTc3MkNNRF9SRFRSQSAgICAoMHhlMCkgICAvKiAgIHwgIFRZUCAzIENvbW1hbmRzICAqLwotI2RlZmluZSBGREMxNzcyQ01EX1dSVFJBICAgICgweGYwKSAgIC8qICAtICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIEZEQzE3NzJDTURfRk9SQ0kgICAgKDB4ZDApICAgLyogIC0gICBUWVAgNCBDb21tYW5kICAgKi8KLQotLyogY29tbWFuZCBtb2RpZmllciBiaXRzICovCi0KLSNkZWZpbmUgRkRDMTc3MkNNREFERF9TUjYgICAoMHgwMCkgICAvKiBzdGVwIHJhdGUgc2V0dGluZ3MgKi8KLSNkZWZpbmUgRkRDMTc3MkNNREFERF9TUjEyICAoMHgwMSkKLSNkZWZpbmUgRkRDMTc3MkNNREFERF9TUjIgICAoMHgwMikKLSNkZWZpbmUgRkRDMTc3MkNNREFERF9TUjMgICAoMHgwMykKLSNkZWZpbmUgRkRDMTc3MkNNREFERF9WICAgICAoMHgwNCkgICAvKiB2ZXJpZnkgKi8KLSNkZWZpbmUgRkRDMTc3MkNNREFERF9IICAgICAoMHgwOCkgICAvKiB3YWl0IGZvciBzcGluLXVwICovCi0jZGVmaW5lIEZEQzE3NzJDTURBRERfVSAgICAgKDB4MTApICAgLyogdXBkYXRlIHRyYWNrIHJlZ2lzdGVyICovCi0jZGVmaW5lIEZEQzE3NzJDTURBRERfTSAgICAgKDB4MTApICAgLyogbXVsdGlwbGUgc2VjdG9yIGFjY2VzcyAqLwotI2RlZmluZSBGREMxNzcyQ01EQUREX0UgICAgICgweDA0KSAgIC8qIGhlYWQgc2V0dGxpbmcgZmxhZyAqLwotI2RlZmluZSBGREMxNzcyQ01EQUREX1AgICAgICgweDAyKSAgIC8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21lbXN0aWNrLmgKaW5kZXggMzdhNWNkYi4uYTlmOTk4YSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9saW51eC9tZW1zdGljay5oCisrKyBiL2luY2x1ZGUvbGludXgvbWVtc3RpY2suaApAQCAtMjYzLDYgKzI2MywxMCBAQAogCS8qIEdldCBuZXh0IHJlcXVlc3QgZnJvbSB0aGUgbWVkaWEgZHJpdmVyLiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogCWludCAgICAgICAgICAgICAgICAgICAgICAoKm5leHRfcmVxdWVzdCkoc3RydWN0IG1lbXN0aWNrX2RldiAqY2FyZCwKIAkJCQkJCSBzdHJ1Y3QgbWVtc3RpY2tfcmVxdWVzdCAqKm1ycSk7CisJLyogVGVsbCB0aGUgbWVkaWEgZHJpdmVyIHRvIHN0b3AgZG9pbmcgdGhpbmdzICAgICAgICAgICAgICAgICAgICAgICovCisJdm9pZCAgICAgICAgICAgICAgICAgICAgICgqc3RvcCkoc3RydWN0IG1lbXN0aWNrX2RldiAqY2FyZCk7CisJLyogQWxsb3cgdGhlIG1lZGlhIGRyaXZlciB0byBjb250aW51ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJdm9pZCAgICAgICAgICAgICAgICAgICAgICgqc3RhcnQpKHN0cnVjdCBtZW1zdGlja19kZXYgKmNhcmQpOwogCiAJc3RydWN0IGRldmljZSAgICAgICAgICAgIGRldjsKIH07CkBAIC0yODQsNyArMjg4LDcgQEAKIAkvKiBOb3RpZnkgdGhlIGhvc3QgdGhhdCBzb21lIHJlcXVlc3RzIGFyZSBwZW5kaW5nLiAqLwogCXZvaWQgICAgICAgICAgICAgICAgKCpyZXF1ZXN0KShzdHJ1Y3QgbWVtc3RpY2tfaG9zdCAqaG9zdCk7CiAJLyogU2V0IGhvc3QgSU8gcGFyYW1ldGVycyAocG93ZXIsIGNsb2NrLCBldGMpLiAgICAgKi8KLQl2b2lkICAgICAgICAgICAgICAgICgqc2V0X3BhcmFtKShzdHJ1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zKTsKIAogCQlpZiAodW5saWtlbHkoZXJyIDwgMCkpIHsKIAkJCXB1dF9maWxwKG5ld2ZpbGUpOwpAQCAtMTIxOCwxMiArMTIyMCwyNyBAQAogewogCWludCByZXR2YWw7CiAJc3RydWN0IHNvY2tldCAqc29jazsKKwlpbnQgZmxhZ3M7CisKKwkvKiBDaGVjayB0aGUgU09DS18qIGNvbnN0YW50cyBmb3IgY29uc2lzdGVuY3kuICAqLworCUJVSUxEX0JVR19PTihTT0NLX0NMT0VYRUMgIT0gT19DTE9FWEVDKTsKKwlCVUlMRF9CVUdfT04oKFNPQ0tfTUFYIHwgU09DS19UWVBFX01BU0spICE9IFNPQ0tfVFlQRV9NQVNLKTsKKwlCVUlMRF9CVUdfT04oU09DS19DTE9FWEVDICYgU09DS19UWVBFX01BU0spOworCUJVSUxEX0JVR19PTihTT0NLX05PTkJMT0NLICYgU09DS19UWVBFX01BU0spOworCisJZmxhZ3MgPSB0eXBlICYgflNPQ0tfVFlQRV9NQVNLOworCWlmIChmbGFncyAmIH4oU09DS19DTE9FWEVDIHwgU09DS19OT05CTE9DSykpCisJCXJldHVybiAtRUlOVkFMOworCXR5cGUgJj0gU09DS19UWVBFX01BU0s7CisKKwlpZiAoU09DS19OT05CTE9DSyAhPSBPX05PTkJMT0NLICYmIChmbGFncyAmIFNPQ0tfTk9OQkxPQ0spKQorCQlmbGFncyA9IChmbGFncyAmIH5TT0NLX05PTkJMT0NLKSB8IE9fTk9OQkxPQ0s7CiAKIAlyZXR2YWwgPSBzb2NrX2NyZWF0ZShmYW1pbHksIHR5cGUsIHByb3RvY29sLCAmc29jayk7CiAJaWYgKHJldHZhbCA8IDApCiAJCWdvdG8gb3V0OwogCi0JcmV0dmFsID0gc29ja19tYXBfZmQoc29jayk7CisJcmV0dmFsID0gc29ja19tYXBfZmQoc29jaywgZmxhZ3MgJiAoT19DTE9FWEVDIHwgT19OT05CTE9DSykpOwogCWlmIChyZXR2YWwgPCAwKQogCQlnb3RvIG91dF9y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