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klHX05FVEZJTFRFUikgPSBuZXRmaWx0ZXIubwogCkBAIC02LDEzICs3LDQzIEBACiBvYmotJChDT05GSUdfTkVURklMVEVSX05FVExJTktfUVVFVUUpICs9IG5mbmV0bGlua19xdWV1ZS5vCiBvYmotJChDT05GSUdfTkVURklMVEVSX05FVExJTktfTE9HKSArPSBuZm5ldGxpbmtfbG9nLm8KIAotbmZfY29ubnRyYWNrLW9ianMJOj0gbmZfY29ubnRyYWNrX2NvcmUubyBuZl9jb25udHJhY2tfc3RhbmRhbG9uZS5vIG5mX2Nvbm50cmFja19sM3Byb3RvX2dlbmVyaWMubyBuZl9jb25udHJhY2tfcHJvdG9fZ2VuZXJpYy5vIG5mX2Nvbm50cmFja19wcm90b190Y3AubyBuZl9jb25udHJhY2tfcHJvdG9fdWRwLm8KLQorIyBjb25uZWN0aW9uIHRyYWNraW5nCiBvYmotJChDT05GSUdfTkZfQ09OTlRSQUNLKSArPSBuZl9jb25udHJhY2subwotb2JqLSQoQ09ORklHX05GX0NPTk5UUkFDS19GVFApICs9IG5mX2Nvbm50cmFja19mdHAubwogCiAjIFNDVFAgcHJvdG9jb2wgY29ubmVjdGlvbiB0cmFja2luZwogb2JqLSQoQ09ORklHX05GX0NUX1BST1RPX1NDVFApICs9IG5mX2Nvbm50cmFja19wcm90b19zY3RwLm8KIAogIyBuZXRsaW5rIGludGVyZmFjZSBmb3IgbmZfY29ubnRyYWNrCiBvYmotJChDT05GSUdfTkZfQ1RfTkVUTElOSykgKz0gbmZfY29ubnRyYWNrX25ldGxpbmsubworCisjIGNvbm5lY3Rpb24gdHJhY2tpbmcgaGVscGVycworb2JqLSQoQ09ORklHX05GX0NPTk5UUkFDS19GVFApICs9IG5mX2Nvbm50cmFja19mdHAubworCisjIGdlbmVyaWMgWCB0YWJsZXMgCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUQUJMRVMpICs9IHhfdGFibGVzLm8geHRfdGNwdWRwLm8KKworIyB0YXJnZXRzCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX1RBUkdFVF9DTEFTU0lGWSkgKz0geHRfQ0xBU1NJRlkubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9UQVJHRVRfQ09OTk1BUkspICs9IHh0X0NPTk5NQVJLLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfVEFSR0VUX01BUkspICs9IHh0X01BUksubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9UQVJHRVRfTkZRVUVVRSkgKz0geHRfTkZRVUVVRS5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX1RBUkdFVF9OT1RSQUNLKSArPSB4dF9OT1RSQUNLLm8KKworIyBtYXRjaGVzCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTU1FTlQpICs9IHh0X2NvbW1lbnQubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9DT05OQllURVMpICs9IHh0X2Nvbm5ieXRlcy5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTk5NQVJLKSArPSB4dF9jb25ubWFyay5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0NPTk5UUkFDSykgKz0geHRfY29ubnRyYWNrLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfRENDUCkgKz0geHRfZGNjcC5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0hFTFBFUikgKz0geHRfaGVscGVyLm8KK29iai0kKENPTkZJR19ORVRGSUxURVJfWFRfTUFUQ0hfTEVOR1RIKSArPSB4dF9sZW5ndGgubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9MSU1JVCkgKz0geHRfbGltaXQubworb2JqLSQoQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9NQUMpICs9IHh0X21hYy5vCitvYmotJChDT05GSUdfTkVURklMVEVSX1hUX01BVENIX01BUkspICs9IHh0X21hcmsubworb2JqLSQ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4gaW5mby0+aW52ZXJ0OworfQorCitzdGF0aWMgaW50CittYXRjaDYoY29uc3Qgc3RydWN0IHNrX2J1ZmYgKnNrYiwKKyAgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqaW4sCisgICAgICAgY29uc3Qgc3RydWN0IG5ldF9kZXZpY2UgKm91dCwKKyAgICAgICBjb25zdCB2b2lkICptYXRjaGluZm8sCisgICAgICAgaW50IG9mZnNldCwKKyAgICAgICB1bnNpZ25lZCBpbnQgcHJvdG9mZiwKKyAgICAgICBpbnQgKmhvdGRyb3ApCit7CisJY29uc3Qgc3RydWN0IHh0X2xlbmd0aF9pbmZvICppbmZvID0gbWF0Y2hpbmZvOworCXVfaW50MTZfdCBwa3RsZW4gPSBudG9ocyhza2ItPm5oLmlwdjZoLT5wYXlsb2FkX2xlbikgKyBzaXplb2Yoc3RydWN0IGlwdjZoZHIpOworCQorCXJldHVybiAocGt0bGVuID49IGluZm8tPm1pbiAmJiBwa3RsZW4gPD0gaW5mby0+bWF4KSBeIGluZm8tPmludmVydDsKK30KKworc3RhdGljIGludAorY2hlY2tlbnRyeShjb25zdCBjaGFyICp0YWJsZW5hbWUsCisgICAgICAgICAgIGNvbnN0IHZvaWQgKmlwLAorICAgICAgICAgICB2b2lkICptYXRjaGluZm8sCisgICAgICAgICAgIHVuc2lnbmVkIGludCBtYXRjaHNpemUsCisgICAgICAgICAgIHVuc2lnbmVkIGludCBob29rX21hc2spCit7CisJaWYgKG1hdGNoc2l6ZSAhPSBYVF9BTElHTihzaXplb2Yoc3RydWN0IHh0X2xlbmd0aF9pbmZvKSkpCisJCXJldHVybiAwOworCisJcmV0dXJuIDE7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgeHRfbWF0Y2ggbGVuZ3RoX21hdGNoID0geworCS5uYW1lCQk9ICJsZW5ndGgiLAorCS5tYXRjaAkJPSAmbWF0Y2gsCisJLmNoZWNrZW50cnkJPSAmY2hlY2tlbnRyeSwKKwkubWUJCT0gVEhJ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