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QorCQkJdmlkID0gMTg2MjUgLSAodmFsICYgMHgxZikgKiAyNTA7CisJCWlmKHZhbCAmIDB4MjApCisJCQl2aWQgLT0gMTI1OworCQl2aWQgLz0gMTA7ICAgICAgLyogb25seSByZXR1cm4gMyBkZWMuIHBsYWNlcyBmb3Igbm93ICovCisJCXJldHVybiB2aWQ7CisKKwljYXNlIDI0OiAgICAgICAgICAgICAgICAvKiBPcHRlcm9uIHByb2Nlc3NvciAqLworCQlyZXR1cm4odmFsID09IDB4MWYgPyAwIDogMTU1MCAtIHZhbCAqIDI1KTsKKworCWNhc2UgOTE6CQkvKiBWUk0gOS4xICovCisJY2FzZSA5MDoJCS8qIFZSTSA5LjAgKi8KKwkJcmV0dXJuKHZhbCA9PSAweDFmID8gMCA6CisJCSAgICAgICAgICAgICAgICAgICAgICAgMTg1MCAtIHZhbCAqIDI1KTsKKworCWNhc2UgODU6CQkvKiBWUk0gOC41ICovCisJCXJldHVybigodmFsICYgMHgxMCAgPyAyNSA6IDApICsKKwkJICAgICAgICgodmFsICYgMHgwZikgPiAweDA0ID8gMjA1MCA6IDEyNTApIC0KKwkJICAgICAgICgodmFsICYgMHgwZikgKiA1MCkpOworCisJY2FzZSA4NDoJCS8qIFZSTSA4LjQgKi8KKwkJdmFsICY9IDB4MGY7CisJCQkJLyogZmFsbCB0aHJvdWdoICovCisJZGVmYXVsdDoJCS8qIFZSTSA4LjIgKi8KKwkJcmV0dXJuKHZhbCA9PSAweDFmID8gMCA6CisJCSAgICAgICB2YWwgJiAweDEwICA/IDUxMDAgLSAodmFsKSAqIDEwMCA6CisJCSAgICAgICAgICAgICAgICAgICAgIDIwNTAgLSAodmFsKSAqIDUwKTsKKwl9Cit9CisKKworLyoKKyAgICBBZnRlciB0aGlzIHBvaW50IGlzIHRoZSBjb2RlIHRvIGF1dG9tYXRpY2FsbHkgZGV0ZXJtaW5lIHdoaWNoCisgICAgVlJNL1ZSRCBzcGVjaWZpY2F0aW9uIHNob3VsZCBiZSB1c2Vk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3cgTGltaXQgaW4gRGF0YVNoZWV0ICovCisJMHhCNSwJLyogNVZTQiBMb3cgTGltaXQgaW4gRGF0YVNoZWV0ICovCisJMHhCNwkvKiBWQkFUIExvdyBMaW1pdCBpbiBEYXRhU2hlZXQgKi8KK307CitzdGF0aWMgY29uc3QgdTggVzgzNzkyRF9SRUdfRkFOWzddID0geworCTB4MjgsCS8qIEZBTiAxIENvdW50IGluIERhdGFTaGVldCAqLworCTB4MjksCS8qIEZBTiAyIENvdW50IGluIERhdGFTaGVldCAqLworCTB4MkEsCS8qIEZBTiAzIENvdW50IGluIERhdGFTaGVldCAqLworCTB4QjgsCS8qIEZBTiA0IENvdW50IGluIERhdGFTaGVldCAqLworCTB4QjksCS8qIEZBTiA1IENvdW50IGluIERhdGFTaGVldCAqLworCTB4QkEsCS8qIEZBTiA2IENvdW50IGluIERhdGFTaGVldCAqLworCTB4QkUJLyogRkFOIDcgQ291bnQgaW4gRGF0YVNoZWV0ICovCit9Oworc3RhdGljIGNvbnN0IHU4IFc4Mzc5MkRfUkVHX0ZBTl9NSU5bN10gPSB7CisJMHgzQiwJLyogRkFOIDEgQ291bnQgTG93IExpbWl0IGluIERhdGFTaGVldCAqLworCTB4M0MsCS8qIEZBTiAyIENvdW50IExvdyBMaW1pdCBpbiBEYXRhU2hlZXQgKi8KKwkweDNELAkvKiBGQU4gMyBDb3VudCBMb3cgTGltaXQgaW4gRGF0YVNoZWV0ICovCisJMHhCQiwJLyogRkFOIDQgQ291bnQgTG93IExpbWl0IGluIERhdGFTaGVldCAqLworCTB4QkMsCS8qIEZBTiA1IENvdW50IExvdyBMaW1pdCBpbiBEYXRhU2hlZXQgKi8KKwkweEJELAkvKiBGQU4gNiBDb3VudCBMb3cgTGltaXQgaW4gRGF0YVNoZWV0ICovCisJMHhCRgkvKiBGQU4gNyBDb3VudCBMb3cgTGltaXQgaW4gRGF0YVNoZWV0ICovCit9OworI2RlZmluZSBXODM3OTJEX1JFR19GQU5fQ0ZHIDB4ODQJ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ogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKIAotCi0jaWZkZWYgQ09ORklHX0lFRUUxMzk0X1ZFUkJPU0VERUJVRwotICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaTJjX3NtYnVzX2RhdGEgZGF0YTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGkyY19zbWJ1c194ZmVyKGkyY19hZCwgODAsIDAsIEkyQ19TTUJVU19XUklURSwgMCwgSTJDX1NNQlVTX0JZVEUsTlVMTCkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBSSU5UKEtFUk5fRVJSLCBseW54LT5pZCwiZWVwcm9tIHJlYWQgc3RhcnQgaGFzIGZhaWxlZCIpOwotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MTYgYWRkcjsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChhZGRyPTB4MDA7IGFkZHIgPCAweDEwMDsgYWRkcisrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGkyY19zbWJ1c194ZmVyKGkyY19hZCwgODAsIDAsIEkyQ19TTUJVU19SRUFELCAwLCBJMkNfU01CVVNfQllURSwmIGRhdGEpKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQUklOVChLRVJOX0VSUiwgbHlueC0+aWQsICJ1bmFibGUgdG8gcmVhZCBpMmMgJXgiLCBhZGRyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICA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BzdHJsY3B5KGluZm8uaWQsICJ0diBjYXJkIiwgc2l6ZW9mKGluZm8uaWQpKTsKLSAgICAgICAgICAgICAgICBzdHJsY3B5KGluZm8ubmFtZSwgaTJjX2NsaWVudG5hbWUoY2xpZW50KSwgc2l6ZW9mKGluZm8ubmFtZSkpOworICAgICAgICAgICAgICAgIHN0cmxjcHkoaW5mby5uYW1lLCBjbGllbnQtPm5hbWUsIHNpemVvZihpbmZvLm5hbWUpKTsKICAgICAgICAgICAgICAgICBpbmZvLm1vZGlmeV9jb3VudGVyID0gNDIgLyogRklYTUUgKi87CiAgICAgICAgICAgICAgICAgaWYgKGNvcHlfdG9fdXNlcihhcmdwLCAmaW5mbywgc2l6ZW9mKGluZm8pKSkKICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZBVUxUOwpAQCAtMTAwLDcgKzEwMCw3IEBACiAgICAgICAgIGlmIChjbWQgPT0gU09VTkRfT0xEX01JWEVSX0lORk8pIHsKICAgICAgICAgICAgICAgICBfb2xkX21peGVyX2luZm8gaW5mbzsKICAgICAgICAgICAgICAgICBzdHJsY3B5KGluZm8uaWQsICJ0diBjYXJkIiwgc2l6ZW9mKGluZm8uaWQpKTsKLSAgICAgICAgICAgICAgICBzdHJsY3B5KGluZm8ubmFtZSwgaTJjX2NsaWVudG5hbWUoY2xpZW50KSwgc2l6ZW9mKGluZm8ubmFtZSkpOworICAgICAgICAgICAgICAgIHN0cmxjcHkoaW5mby5uYW1lLCBjbGllbnQtPm5hbWUsIHNpemVvZihpbmZvLm5hbWUpKTsKICAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKGFyZ3AsICZpbmZvLCBzaXplb2YoaW5mbykpKQogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FRkFVTFQ7CiAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CkBAIC0yNzYsOSArMjc2LDkgQEAKICNlbHNlCiAJLyogVFYgY2FyZCA/Pz8gKi8KIAlzd2l0Y2ggK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W5kIGVuYWJsZWQgaW4gdGhlIGtlcm5lbC4KKyAqLworLyogI2RlZmluZSBTUEVDVFJVTV9GV19JTkNMVURFRCAxICovCisKKyNpZmRlZiBTUEVDVFJVTV9GV19JTkNMVURFRAorLyogSGVhZGVyIHdpdGggdGhlIGZpcm13YXJlICovCisjaW5jbHVkZSAic3BlY3RydW1fZncuaCIKKyNlbHNlCS8qICFTUEVDVFJVTV9GV19JTkNMVURFRCAqLworI2luY2x1ZGUgPGxpbnV4L2Zpcm13YXJlLmg+CitzdGF0aWMgdW5zaWduZWQgY2hhciAqcHJpbXN5bTsKK3N0YXRpYyB1bnNpZ25lZCBjaGFyICpzZWNzeW07CitzdGF0aWMgY29uc3QgY2hhciBwcmltYXJ5X2Z3X25hbWVbXSA9ICJzeW1ib2xfc3AyNHRfcHJpbV9mdyI7CitzdGF0aWMgY29uc3QgY2hhciBzZWNvbmRhcnlfZndfbmFtZVtdID0gInN5bWJvbF9zcDI0dF9zZWNfZnciOworI2VuZGlmCS8qICFTUEVDVFJVTV9GV19JTkNMVURFRCAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBNb2R1bGUgc3R1ZmYJCQkJCQkJICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK01PRFVMRV9BVVRIT1IoIlBhdmVsIFJvc2tpbiA8cHJvc2tpQGdudS5vcmc+Iik7CitNT0RVTEVfREVTQ1JJUFRJT04oIkRyaXZlciBmb3IgU3ltYm9sIFNwZWN0cnVtMjQgVHJpbG9neSBjYXJkcyB3aXRoIGZpcm13YXJlIGRvd25sb2FkZXIiKTsKK01PRFVMRV9MSUNFTlNFKCJEdWFsIE1QTC9HUEwiKTsKKworLyogTW9kdWxlIHBhcmFtZXRlcnMgKi8KKworLyogU29tZSBELUxpbmsgY2FyZHMgaGF2ZSBidWdneSBDSVMuIFRoZXkgZG8gd29yayBhdCA1diBwcm9wZXJseSwgYnV0CisgKiBkb24ndCBoYXZlIGFueSBDSVMgZW50cnkgZm9yIGl0LiBUaGlzIHdvcmthcm91bmQgaXQuLi4gKi8KK3N0YXRpYyBpbnQgaWdub3JlX2Npc192Y2M7IC8qID0gMCAqLworbW9kdWxlX3BhcmFtKGlnbm9yZV9jaXNfdmNjLCBpbnQsIDApOworTU9EVUxFX1BBUk1fREVTQyhpZ25vcmVfY2lzX3ZjYywgIkFsbG93IHZvbHRhZ2UgbWlzbWF0Y2ggYmV0d2VlbiBjYXJkIGFuZCBzb2NrZXQiKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogTWFnaWMgY29uc3RhbnRzCQkJCQkJICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBUaGUgZGV2X2luZm8gdmFyaWFibGUgaXMgdGhlICJrZXkiIHRoYXQgaXMgdXNlZCB0byBtYXRjaCB1cCB0aGlzCisgKiBkZXZpY2UgZHJpdmVyIHdpdGggYXBwcm9wcmlhdGUgY2FyZHMsIHRocm91Z2ggdGhlIGNhcmQKKyAqIGNvbmZpZ3VyYXRpb24gZGF0YWJhc2UuCisgKi8KK3N0YXRpYyBkZXZfaW5mb190IGRldl9pbmZvID0gRFJJVkVSX05BTUU7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIERhdGEgc3RydWN0dXJlcwkJCQkJCSAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBQQ01DSUEgc3BlY2lmaWMgZGV2aWNlIGluZm9ybWF0aW9uIChnb2VzIGluIHRoZSBjYXJkIGZpZWxkIG9mCisgKiBzdHJ1Y3Qgb3Jpbm9jb19wcml2YXRlICovCitzdHJ1Y3Qgb3Jpbm9jb19wY2NhcmQgeworCWRldl9saW5rX3QgbGluazsKKwlkZXZfbm9kZV90IG5vZGU7Cit9OworCisvKgorICogQSBsaW5rZWQgbGlzdCBvZiAiaW5zdGFuY2VzIiBvZiB0aGUgZGV2aWNlLiAgRWFjaCBhY3R1YWwgUENNQ0lBCisgKiBjYXJkIGNvcnJlc3BvbmRzIHRvIG9uZSBkZXZpY2UgaW5zdGFuY2UsIGFuZCBpcyBkZXNjcmliZWQgYnkgb25lCisgKiBkZXZfbGlua190IHN0cnVjdHVyZSAoZGVmaW5lZCBpbiBkcy5oKS4KKyAqLworc3RhdGljIGRldl9saW5rX3QgKmRldl9saXN0OyAvKiA9IE5VTEwgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogRnVuY3Rpb24gcHJvdG90eXBlcwkJCQkJCSAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBkZXZpY2UgbWV0aG9kcyAqLworc3RhdGljIGludCBzcGVjdHJ1bV9jc19oYXJkX3Jlc2V0KHN0cnVjdCBvcmlub2NvX3ByaXZhdGUgKnByaXYpOworCisvKiBQQ01DSUEgZ3VtcGYgKi8KK3N0YXRpYyB2b2lkIHNwZWN0cnVtX2NzX2NvbmZpZyhkZXZfbGlua190ICogbGluayk7CitzdGF0aWMgdm9pZCBzcGVjdHJ1bV9jc19yZWxlYXNlKGRldl9saW5rX3QgKiBsaW5rKTsKK3N0YXRpYyBpbnQgc3BlY3RydW1fY3NfZXZlbnQoZXZlbnRfdCBldmVudCwgaW50IHByaW9yaXR5LAorCQkJICAgIGV2ZW50X2NhbGxiYWNrX2FyZ3NfdCAqIGFyZ3MpOworCitzdGF0aWMgZGV2X2xpbmtfdCAqc3BlY3RydW1fY3NfYXR0YWNoKHZvaWQpOworc3RhdGljIHZvaWQgc3BlY3RydW1fY3NfZGV0YWNoKGRldl9saW5rX3QgKik7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEZpcm13YXJlIGRvd25sb2FkZXIJCQkJCQkgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogUG9zaXRpb24gb2YgUERBIGluIHRoZSBhZGFwdGVyIG1lbW9yeSAqLworI2RlZmluZSBFRVBST01fQUREUgkweDMwMDAKKyNkZWZpbmUgRUVQUk9NX0xFTgkweDIwMAorI2RlZmluZSBQREFfT0ZGU0VUCTB4MTAwCisKKyNkZWZpbmUgUERBX0FERFIJKEVFUFJPTV9BRERSICsgUERBX09GRlNFVCkKKyNkZWZpbmUgUERBX1dPUkRTCSgoRUVQUk9NX0xFTiAtIFBEQV9PRkZTRVQpIC8gMikKKworLyogQ29uc3RhbnRzIGZvciB0aGUgQ0lTUkVHX0NDU1IgcmVnaXN0ZXIgKi8KKyNkZWZpbmUgSENSX1JVTgkJMHgwNwkvKiBydW4gZmlybXdhcmUgYWZ0ZXIgcmVzZXQgKi8KKyNkZWZpbmUgSENSX0lETEUJMHgwRQkvKiBkb24ndCBydW4gZmlybXdhcmUgYWZ0ZXIgcmVzZXQgKi8KKyNkZWZpbmUgSENSX01FTTE2CTB4MTAJLyogbWVtb3J5IHdpZHRoIGJpdCwgc2hvdWxkIGJlIHByZXNlcnZlZCAqLworCisvKgorICogQVVYIHBvcnQgYWNjZXNzLiAgVG8gdW5sb2NrIHRoZSBBVVggcG9ydCB3cml0ZSB0aGUgYWNjZXNzIGtleXMgdG8gdGhlCisgKiBQQVJBTTAtMiByZWdpc3RlcnMsIHR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BwcmltYXJ5IGZpcm13YXJlLiAgVGhleSByZWZlciB0byB0aGUgZGV2aWNlLXNwZWNpZmljIGRhdGEgdGhhdCBzaG91bGQKKyAqIGJlIHBsdWdnZWQgaW50byB0aGUgc2Vjb25kYXJ5IGZpcm13YXJlLgorICovCitzdHJ1Y3QgcGRpIHsKKwl1MTYgX2xlbjsJCS8qIGxlbmd0aCBvZiBJRCBhbmQgZGF0YSwgaW4gd29yZHMgKi8KKwl1MTYgX2lkOwkJLyogcmVjb3JkIElEICovCisJY2hhciBkYXRhWzBdOwkJLyogcGx1ZyBkYXRhICovCit9IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTs7CisKKworLyogRnVuY3Rpb25zIGZvciBhY2Nlc3MgdG8gbGl0dGxlLWVuZGlhbiBkYXRhICovCitzdGF0aWMgaW5saW5lIHUzMgorZGJsb2NrX2FkZHIoY29uc3Qgc3RydWN0IGRibG9jayAqYmxrKQoreworCXJldHVybiBsZTMyX3RvX2NwdShibGstPl9hZGRyKTsKK30KKworc3RhdGljIGlubGluZSB1MzIKK2RibG9ja19sZW4oY29uc3Qgc3RydWN0IGRibG9jayAqYmxrKQoreworCXJldHVybiBsZTE2X3RvX2NwdShibGstPl9sZW4pOworfQorCitzdGF0aWMgaW5saW5lIHUzMgorcGRyX2lkKGNvbnN0IHN0cnVjdCBwZHIgKnBkcikKK3sKKwlyZXR1cm4gbGUzMl90b19jcHUocGRyLT5faWQpOworfQorCitzdGF0aWMgaW5saW5lIHUzMgorcGRyX2FkZHIoY29uc3Qgc3RydWN0IHBkciAqcGRyKQoreworCXJldHVybiBsZTMyX3RvX2NwdShwZHItPl9hZGRyKTsKK30KKworc3RhdGljIGlubGluZSB1MzIKK3Bkcl9sZW4oY29uc3Qgc3RydWN0IHBkciAqcGRyKQoreworCXJldHVybiBsZTMyX3RvX2NwdShwZHItPl9sZW4pOworfQorCitzdGF0aWMgaW5saW5lIHUzMgorcGRpX2lkKGNvbnN0IHN0cnVjdCBwZGkgKnB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kYXRhOworCX0gZWxzZSB7CisJCXByaW50ayhLRVJOX0VSUiBQRlggIkNhbm5vdCBmaW5kIGZpcm13YXJlOiAlc1xuIiwKKwkJICAgICAgIHNlY29uZGFyeV9md19uYW1lKTsKKwkJcmV0dXJuIC1FTk9FTlQ7CisJfQorI2VuZGlmCisKKwkvKiBMb2FkIHByaW1hcnkgZmlybXdhcmUgKi8KKwlyZXQgPSBzcGVjdHJ1bV9kbF9pbWFnZShodywgbGluaywgcHJpbXN5bSk7CisJaWYgKHJldCkgeworCQlwcmludGsoS0VSTl9FUlIgUEZYICJQcmltYXJ5IGZpcm13YXJlIGRvd25sb2FkIGZhaWxlZFxuIik7CisJCXJldHVybiByZXQ7CisJfQorCisJLyogTG9hZCBzZWNvbmRhcnkgZmlybXdhcmUgKi8KKwlyZXQgPSBzcGVjdHJ1bV9kbF9pbWFnZShodywgbGluaywgc2Vjc3ltKTsKKworCWlmIChyZXQpIHsKKwkJcHJpbnRrKEtFUk5fRVJSIFBGWCAiU2Vjb25kYXJ5IGZpcm13YXJlIGRvd25sb2FkIGZhaWxlZFxuIik7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogRGV2aWNlIG1ldGhvZHMgICAgIAkJCQkJCSAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50CitzcGVjdHJ1bV9jc19oYXJkX3Jlc2V0KHN0cnVjdCBvcmlub2NvX3ByaXZhdGUgKnByaXYpCit7CisJc3RydWN0IG9yaW5vY29fcGNjYXJkICpjYXJkID0gcHJpdi0+Y2FyZDsKKwlkZXZfbGlua190ICpsaW5rID0gJmNhcmQtPmxpbms7CisJaW50IGVycjsKKworCWlmICghaGVybWVzX3ByZXNlbnQoJnByaXYtPmh3KSkgeworCQkvKiBUaGUgZmlybXdhcmUgbmVlZHMgdG8gYmUgcmVsb2FkZWQgKi8KKwkJaWYgKHNwZWN0cnVtX2RsX2Zpcm13YXJlKCZwcml2LT5odywgJmNhcmQtPmxpbmspICE9IDApIHsKKwkJCXByaW50ayhLRVJOX0VSUiBQRlggIkZpcm13YXJlIGRvd25sb2FkIGZhaWxlZFxuIik7CisJCQllcnIgPSAtRU5PREVWOworCQl9CisJfSBlbHNlIHsKKwkJLyogU29mdCByZXNldCB1c2luZyBDT1IgYW5kIEhDUiAqLworCQlzcGVjdHJ1bV9yZXNldChsaW5rLCAwKTsKKwl9CisKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogUENNQ0lBIHN0dWZmICAgICAJCQkJCQkgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIFRoaXMgY3JlYXRlcyBhbiAiaW5zdGFuY2UiIG9mIHRoZSBkcml2ZXIsIGFsbG9jYXRpbmcgbG9jYWwgZGF0YQorICogc3RydWN0dXJlcyBmb3Igb25lIGRldmljZS4gIFRoZSBkZXZpY2UgaXMgcmVnaXN0ZXJlZCB3aXRoIENhcmQKKyAqIFNlcnZpY2VzLgorICogCisgKiBUaGUgZGV2X2xpbmsgc3RydWN0dXJlIGlzIGluaXRpYWxpemVkLCBidXQgd2UgZG9uJ3QgYWN0dWFsbHkKKyAqIGNvbmZpZ3VyZSB0aGUgY2FyZCBhdCB0aGlzIHBvaW50IC0tIHdlIHdhaXQgdW50aWwgd2UgcmVjZWl2ZSBhIGNhcmQKKyAqIGluc2VydGlvbiBldmVudC4gICovCitzdGF0aWMgZGV2X2xpbmtfdCAqCitzcGVjdHJ1bV9jc19hdHRhY2godm9pZCkKK3sKKwlzdHJ1Y3QgbmV0X2RldmljZ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JCX0KKwkJYnJlYWs7CisJfQorCisJcmV0dXJuIGVycjsKK30JCQkJLyogc3BlY3RydW1fY3NfZXZlbnQgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogTW9kdWxlIGluaXRpYWxpemF0aW9uCQkJCQkgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogQ2FuJ3QgYmUgZGVjbGFyZWQgImNvbnN0IiBvciB0aGUgd2hvbGUgX19pbml0ZGF0YSBzZWN0aW9uIHdpbGwKKyAqIGJlY29tZSBjb25zdCAqLworc3RhdGljIGNoYXIgdmVyc2lvbltdIF9faW5pdGRhdGEgPSBEUklWRVJfTkFNRSAiICIgRFJJVkVSX1ZFUlNJT04KKwkiIChQYXZlbCBSb3NraW4gPHByb3NraUBnbnUub3JnPiwiCisJIiBEYXZpZCBHaWJzb24gPGhlcm1lc0BnaWJzb24uZHJvcGJlYXIuaWQuYXU+LCBldCBhbCkiOworCitzdGF0aWMgc3RydWN0IHBjbWNpYV9kZXZpY2VfaWQgc3BlY3RydW1fY3NfaWRzW10gPSB7CisJUENNQ0lBX0RFVklDRV9NQU5GX0NBUkQoMHgwMjZjLCAweDAwMDEpLCAvKiBTeW1ib2wgU3BlY3RydW0yNCBMQTQxMDAgKi8KKwlQQ01DSUFfREVWSUNFX01BTkZfQ0FSRCgweDAxMDQsIDB4MDAwMSksIC8qIFNvY2tldCBDb21tdW5pY2F0aW9ucyBDRiAqLworCVBDTUNJQV9ERVZJQ0VfTUFORl9DQVJEKDB4MDA4OSwgMHgwMDAxKSwgLyogSW50ZWwgUFJPL1dpcmVsZXNzIDIwMTFCICovCisJUENNQ0lBX0RFVklDRV9OVUxMLAorfTsKK01PRFVMRV9ERVZJQ0VfVEFCTEUocGNtY2lhLCBzcGVjdHJ1bV9jc19pZHMp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ICBzdGF0aWMgc3RydWN0IGkyY19mb3JjZV9kYXRhIGZvcmNlc1tdID0ge3tmb3JjZSxhbnlfY2hpcH0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXAxLGNoaXAxfSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDIsY2hpcDJ9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge05VTEx9fTsgXAotICBTRU5TT1JTX0lOU01PRAotCi0jZGVmaW5lIFNFTlNPUlNfSU5TTU9EXzMoY2hpcDEsY2hpcDIsY2hpcDMpIFwKLSAgZW51bSBjaGlwcyB7IGFueV9jaGlwLCBjaGlwMSwgY2hpcDIsIGNoaXAzIH07IFwKLSAgSTJDX0NMSUVOVF9NT0RVTEVfUEFSTShmb3JjZSwgXAotICAgICAgICAgICAgICAgICAgICAgICJMaXN0IG9mIGFkYXB0ZXIsYWRkcmVzcyBwYWlycyB0byBib2xkbHkgYXNzdW1lICIgXAotICAgICAgICAgICAgICAgICAgICAgICJ0byBiZSBwcmVzZW50Iik7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMSk7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMik7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMyk7IFwKLSAgc3RhdGljIHN0cnVjdCBpMmNfZm9yY2VfZGF0YSBmb3JjZXNbXSA9IHt7Zm9yY2UsYW55X2NoaXB9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwMSxjaGlwMX0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXAzLGNoaXAzfSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDQsY2hpcDR9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge05VTEx9fTsgXAotICBTRU5TT1JTX0lOU01PRAotCi0jZGVmaW5lIFNFTlNPUlNfSU5TTU9EXzUoY2hpcDEsY2hpcDIsY2hpcDMsY2hpcDQsY2hpcDUpIFwKLSAgZW51bSBjaGlwcyB7IGFueV9jaGlwLCBjaGlwMSwgY2hpcDIsIGNoaXAzLCBjaGlwNCwgY2hpcDUgfTsgXAotICBJMkNfQ0xJRU5UX01PRFVMRV9QQVJNKGZvcmNlLCBcCi0gICAgICAgICAgICAgICAgICAgICAgIkxpc3Qgb2YgYWRhcHRlcixhZGRyZXNzIHBhaXJzIHRvIGJvbGRseSBhc3N1bWUgIiBcCi0gICAgICAgICAgICAgICAgICAgICAgInRvIGJlIHByZXNlbnQiKTsgXAotICBTRU5TT1JTX01PRFVMRV9QQVJNX0ZPUkNFKGNoaXAxKTsgXAotICBTRU5TT1JTX01PRFVMRV9QQVJNX0ZPUkNFKGNoaXAyKTsgXAotICBTRU5TT1JTX01PRFVMRV9QQVJNX0ZPUkNFKGNoaXAzKTsgXAotICBTRU5TT1JTX01PRFVMRV9QQVJNX0ZPUkNFKGNoaXA0KTsgXAotICBTRU5TT1JTX01PRFVMRV9QQVJNX0ZPUkNFKGNoaXA1KTsgXAotICBzdGF0aWMgc3RydWN0IGkyY19mb3JjZV9kYXRhIGZvcmNlc1tdID0ge3tmb3JjZSxhbnlfY2hpcH0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXAxLGNoaXAxfSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDIsY2hpcDJ9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwMyxjaGlwM30sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXA0LGNoaXA0fSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDUsY2hpcDV9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge05VTEx9fTsgXAotICBTRU5TT1JTX0lOU01PRAotCi0jZGVmaW5lIFNFTlNPUlNfSU5TTU9EXzYoY2hpcDEsY2hpcDIsY2hpcDMsY2hpcDQsY2hpcDUsY2hpcDYpIFwKLSAgZW51bSBjaGlwcyB7IGFueV9jaGlwLCBjaGlwMSwgY2hpcDIsIGNoaXAzLCBjaGlwNCwgY2hpcDUsIGNoaXA2IH07IFwKLSAgSTJDX0NMSUVOVF9NT0RVTEVfUEFSTShmb3JjZSwgXAotICAgICAgICAgICAgICAgICAgICAgICJMaXN0IG9mIGFkYXB0ZXIsYWRkcmVzcyBwYWlycyB0byBib2xkbHkgYXNzdW1lICIgXAotICAgICAgICAgICAgICAgICAgICAgICJ0byBiZSBwcmVzZW50Iik7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMSk7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMik7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwMyk7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwNCk7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwNSk7IFwKLSAgU0VOU09SU19NT0RVTEVfUEFSTV9GT1JDRShjaGlwNik7IFwKLSAgc3RhdGljIHN0cnVjdCBpMmNfZm9yY2VfZGF0YSBmb3JjZXNbXSA9IHt7Zm9yY2UsYW55X2NoaXB9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwMSxjaGlwMX0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXAyLGNoaXAyfSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDMsY2hpcDN9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwNCxjaGlwNH0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXA1LGNoaXA1fSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDYsY2hpcDZ9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge05VTEx9fTsgXAotICBTRU5TT1JTX0lOU01PRAotCi0jZGVmaW5lIFNFTlNPUlNfSU5TTU9EXzcoY2hpcDEsY2hpcDIsY2hpcDMsY2hpcDQsY2hpcDUsY2hpcDYsY2hpcDcpIFwKLSAgZW51bSBjaGlwcyB7IGFueV9jaGlwLCBjaGlwMSwgY2hpcDIsIGNoaXAzLCBjaGlwNCwgY2hpcDUsIGNoaXA2LCBjaGlwNyB9OyBcCi0gIEkyQ19DTElFTlRfTU9EVUxFX1BBUk0oZm9yY2UsIFwKLSAgICAgICAgICAgICAgICAgICAgICAiTGlzdCBvZiBhZGFwdGVyLGFkZHJl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ydWN0IGkyY19mb3JjZV9kYXRhIGZvcmNlc1tdID0ge3tmb3JjZSxhbnlfY2hpcH0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXAxLGNoaXAxfSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDIsY2hpcDJ9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwMyxjaGlwM30sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXA0LGNoaXA0fSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDUsY2hpcDV9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2ZvcmNlXyAjIyBjaGlwNixjaGlwNn0sIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Zm9yY2VfICMjIGNoaXA3LGNoaXA3fSwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmb3JjZV8gIyMgY2hpcDgsY2hpcDh9LCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge05VTEx9fTsgXAotICBTRU5TT1JTX0lOU01PRAotCi0vKiBEZXRlY3QgZnVuY3Rpb24uIEl0IGl0ZXJhdGVzIG92ZXIgYWxsIHBvc3NpYmxlIGFkZHJlc3NlcyBpdHNlbGYuIEZvcgotICAgU01CdXMgYWRkcmVzc2VzLCBpdCB3aWxsIG9ubHkgY2FsbCBmb3VuZF9wcm9jIGlmIHNvbWUgY2xpZW50IGl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