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8gMzIKKzB4MEEgICAgWzc6MF0gICAgICAgICBZIHN1bSBvdXRzaWRlIEF1dG8tRXhwb3N1cmUgYXJlYSAobG93LWJ5dGUpCisweDBCICAgIFs3OjBdICAgICAgICAgWSBzdW0gb3V0c2lkZSBBdXRvLUV4cG9zdXJlIGFyZWEgKGhpZ2gtYnl0ZSkKKwkJICAgICAgd2hlcmUgWSBzdW0gPSAoUi80ICsgNUcvMTYgKyBCLzgpIC8gMTI4CisweDBDICAgIDB4WFggICAgICAgICAgTm90IHVzZWQKKzB4MEQgICAgMHhYWCAgICAgICAgICBOb3QgdXNlZAorMHgwRSAgICAweFhYICAgICAgICAgIE5vdCB1c2VkCisweDBGICAgIDB4WFggICAgICAgICAgTm90IHVzZWQKKzB4MTAgICAgMHhYWCAgICAgICAgICBOb3QgdXNlZAorMHgxMSAgICAweFhYICAgICAgICAgIE5vdCB1c2VkCiAKLVRoZSBmb2xsb3dpbmcgYnl0ZXMgYXJlIHVzZWQgYnkgdGhlIFNOOUMxMDMgYnJpZGdlIG9ubHk6CitUaGUgZm9sbG93aW5nIHRhYmxlIGRlc2NyaWJlcyB0aGUgZnJhbWUgaGVhZGVyIGV4cG9ydGVkIGJ5IHRoZSBTTjlDMTAzOgogCi0weDBDICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCi0weDBEICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCi0weDBFICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCi0weDBGICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCi0weDEwICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCi0weDExICAgIDB4WFggICAgICAgICAgVW5rbm93biBtZWFuaW5nCitCeXRlICMgIFZhbHVlIG9yIGJpdHMgRGVzY3JpcHRpb24KKy0tLS0tLSAgLS0tLS0tLS0tLS0tLSAtLS0tLS0tLS0tLQorMHgwMCAgICAweEZGICAgICAgICAgIEZyYW1lI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NVERfQkxPQ0tfUk8gaXMgbm90IHNldAorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9DRkkgaXMgbm90IHNldAorQ09ORklHX01URF9KRURFQ1BST0JFPXkKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4MAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1BNQzU1MSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CiAKICMKICMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CkBAIC0zODMsNiArNDYzLDcgQEAKICMKICMgUGx1ZyBhbmQgUGxheSBzdXBwb3J0CiAjCisjIENPTkZJR19QT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pbGUgdTggKilTTklfUk0yMDBfSU5UX0VOQV9SRUcgXiAweDFmOwpkaWZmIC0tZ2l0IGEvYXJjaC9taXBzL3NuaS9zbmlwcm9tLmMgYi9hcmNoL21pcHMvc25pL3NuaXByb20uYwppbmRleCA2YTQ0YmJmLi42NDMzNjZlIDEwMDY0NAotLS0gYS9hcmNoL21pcHMvc25pL3NuaXByb20uYworKysgYi9hcmNoL21pcHMvc25pL3NuaXByb20uYwpAQCAtOSw2ICs5LDggQEAKICAqIENvcHlyaWdodCAoQykgMjAwNS0yMDA2IFRob21hcyBCb2dlbmRvZXJmZXIgKHRzYm9nZW5kQGFscGhhLmZyYW5rZW4uZGUpCiAgKi8KIAorI2RlZmluZSBERUJVRworCiAjaW5jbHVkZSA8bGludXgva2VybmVsLmg+CiAjaW5jbHVkZSA8bGludXgvaW5pdC5oPgogI2luY2x1ZGUgPGxpbnV4L3N0cmluZy5oPgpAQCAtMzIsMTQgKzM0LDEzIEBACiAjZGVmaW5lIFBST01fRU5UUlkoeCkJCShQUk9NX1ZFQyArICh4KSkKIAogCi0jZGVmaW5lIERFQlVHCi0jaWZkZWYgREVCVUcKLSNkZWZpbmUgREJHX1BSSU5URih4Li4uKSAgICAgcHJvbV9wcmludGYoeCkKLSNlbHNlCi0jZGVmaW5lIERCR19QUklOVEYoeC4uLikKLSNlbmRpZgotCiBzdGF0aWMgaW50ICooKl9fcHJvbV9wdXRjaGFyKShpbnQpICAgICAgICA9IChpbnQgKigqKShpbnQpKVBST01fRU5UUlkoUFJPTV9QVVRDSEFSKTsKKwordm9pZCBwcm9tX3B1dGNoYXIoY2hhciBjKQoreworCV9fcHJvbV9wdXRjaGFyKGMpOworfQorCiBzdGF0aWMgY2hhciAqKCpfX3Byb21fZ2V0ZW52KShjaGFyICopICAgICA9IChjaGFyICooKikoY2hhciAqKSlQUk9NX0VOVFJZKFBST01fR0VURU5WKTsKIHN0YXRpYyB2b2lkICgqX19wcm9tX2dldF9tZW1jb25mKSh2b2lkICopID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9pbl9XKQogCS5wcm9jCiAJLmNhbGxpbmZvIGZyYW1lPTAsTk9fQ0FMTFMKIAkuZW50cnkKQEAgLTU1MCw2ICs1NDksNyBAQAogCS5leGl0CiAJTVRESUFHXzIJKDI0KQkJCTsgcmVzdG9yZSBEUjIKIAkucHJvY2VuZAorRU5EUFJPQyhwZXJmX3Jkcl9zaGlmdF9pbl9XKQogCiAKIDsqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNTc1LDggKzU3NSw3IEBACiA7KgogOyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAKLQkuZXhwb3J0IHBlcmZfcmRyX3NoaWZ0X291dF9XLGNvZGUKLXBlcmZfcmRyX3NoaWZ0X291dF9XOgorRU5UUlkocGVyZl9yZHJfc2hpZnRfb3V0X1cpCiAJLnByb2MKIAkuY2FsbGluZm8gZnJhbWU9MCxOT19DQUxMUwogCS5lbnRyeQpAQCAtOTgzLDYgKzk4Miw3IEBACiAJLmV4aXQKIAlNVERJQUdfMgkoMjMpCQkJOyByZXN0b3JlIERSMgogCS5wcm9jZW5kCitFTkRQUk9DKHBlcmZfcmRyX3NoaWZ0X291dF9XKQogCiAKIDsqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTAxMiw4ICsxMDEyLDcgQEAKIDsqCiA7KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAotCS5leHBvcnQgcGVyZl9yZHJfc2hpZnRfaW5fVSxjb2RlCi1wZXJmX3Jkcl9zaGlmdF9pbl9VOgorRU5UUlkocGVyZl9yZHJfc2hpZnRfaW5fVSkKIAkucHJvYwogCS5jYWxsaW5mbyBmcmFtZT0wLE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19fX19fX19fX19fX19fX19fX19fX19fX19fX19fIFxuIgorS0VSTl9DUklUICIgICAgIDwgWW91ciBTeXN0ZW0gYXRlIGEgU1BBUkMhIEdhaCEgPlxuIgorS0VSTl9DUklUICIgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIFxuIgorS0VSTl9DUklUICIgICAgICAgICAgICAgXFwgICBeX19eXG4iCitLRVJOX0NSSVQgIiAgICAgICAgICAgICAgXFwgICh4eClcXF9fX19fX19cbiIKK0tFUk5fQ1JJVCAiICAgICAgICAgICAgICAgICAoX18pXFwgICAgICAgKVxcL1xcXG4iCitLRVJOX0NSSVQgIiAgICAgICAgICAgICAgICAgIFUgIHx8LS0tLXcgfFxuIgorS0VSTl9DUklUICIgICAgICAgICAgICAgICAgICAgICB8fCAgICAgfHxcbiIpOwogCQogCS8qIHVubG9jayB0aGUgcGRjIGxvY2sgaWYgbmVjZXNzYXJ5ICovCiAJcGRjX2VtZXJnZW5jeV91bmxvY2soKTsKQEAgLTI0Miw5ICsyNTEsMjAgQEAKIAlpZiAoIWNvbnNvbGVfZHJpdmVycykKIAkJcGRjX2NvbnNvbGVfcmVzdGFydCgpOwogCQotCXByaW50ayhLRVJOX0NSSVQgIiVzIChwaWQgJWQpOiAlcyAoY29kZSAlbGQpXG4iLAotCQljdXJyZW50LT5jb21tLCBjdXJyZW50LT5waWQsIHN0ciwgZXJyKTsKKwlpZiAoZXJyKQorCQlwcmludGsoS0VSTl9DUklUICIlcyAocGlkICVkKTogJXMgKGNvZGUgJWxkKVxuIiwKKwkJCWN1cnJlbnQtPmNvbW0sIGN1cnJlbnQtPnBpZCwgc3RyLCBlcnIpOworCisJLyogV290J3Mgd3Jvbmcgd2lmIGJlaW4nIHJhY3k/ICovCisJaWYgKGN1cnJlbnQtPnRocmVhZC5mbGFncyAmIFBBUklTQ19LRVJORUxfREVBVEgpIHsKKwkJcHJpbnRrKEtFUk5fQ1JJVCAiJXMoKSByZWN1cnNpb24g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T04JIjAuNzYiCisjZGVmaW5lIERSSVZFUl9WRVJTSU9OCSIwLjc3IgogCiAjaW5jbHVkZSA8bGludXgvdmVyc2lvbi5oPiAgICAgIC8qIGZvciBLRVJORUxfVkVSU0lPTiBNQUNSTyAgICAgKi8KLSNkZWZpbmUgUkFESU9fVkVSU0lPTiBLRVJORUxfVkVSU0lPTigwLDcsNikKKyNkZWZpbmUgUkFESU9fVkVSU0lPTiBLRVJORUxfVkVSU0lPTigwLDcsNykKKworc3RhdGljIHN0cnVjdCB2aWRlb19kZXZpY2UgbWF4aXJhZGlvX3JhZGlvOworCisjZGVmaW5lIGRwcmludGsobnVtLCBmbXQsIGFyZy4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKG1heGlyYWRpb19yYWRpby5kZWJ1ZyA+PSBudW0pICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCQlwcmludGsoS0VSTl9ERUJVRyAiJXM6ICIgZm10LCAgICAgICAgICAgICAgICAgICAgICBcCisJCQkJbWF4aXJhZGlvX3JhZGlvLm5hbWUsICMjIGFyZyk7IH0gd2hpbGUgKDApCiAKIHN0YXRpYyBzdHJ1Y3QgdjRsMl9xdWVyeWN0cmwgcmFkaW9fcWN0cmxbXSA9IHsKIAl7CkBAIC04MSwzMCArOTEsMjEgQEAKICNkZWZpbmUgRlJFUV9JRiAgICAgICAgIDE3MTIwMCAvKiAxMC43KjE2MDAwICAgKi8KICNkZWZpbmUgRlJFUV9TVEVQICAgICAgIDIwMCAgICAvKiAxMi41KjE2ICAgICAgKi8KIAotI2RlZmluZSBGUkVRMkJJVFMoeCkJKCgoICh1bnNpZ25lZCBpbnQpKHgpK0ZSRVFfSUYrKEZSRVFfU1RFUDw8MSkpXAotCQkJLyhGUkVRX1NURVA8PDIpKTw8MikgLyogKHg9PWZ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k5PUk1TID0gQVJSQVlfU0laRShidHR2X3R2bm9ybXMpOwpAQCAtNjc4LDI1ICs3ODUsODkgQEAKIC8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiAvKiByZXNvdXJjZSBtYW5hZ2VtZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogCisvKgorICAgUkVTT1VSQ0VfICAgIGFsbG9jYXRlZCBieSAgICAgICAgICAgICAgICBmcmVlZCBieQorCisgICBWSURFT19SRUFEICAgYnR0dl9yZWFkIDEpICAgICAgICAgICAgICAgIGJ0dHZfcmVhZCAyKQorCisgICBWSURFT19TVFJFQU0gVklESU9DX1NUUkVBTU9OICAgICAgICAgICAgIFZJRElPQ19TVFJFQU1PRkYKKwkJIFZJRElPQ19RQlVGIDEpICAgICAgICAgICAgICBidHR2X3JlbGVhc2UKKwkJIFZJRElPQ01DQVBUVVJFIDEpCisKKyAgIE9WRVJMQVkJIFZJRElPQ0NBUFRVUkUgb24gICAgICAgICAgICBWSURJT0NDQVBUVVJFIG9mZgorCQkgVklESU9DX09WRVJMQVkgb24gICAgICAgICAgIFZJRElPQ19PVkVSTEFZIG9mZgorCQkgMykgICAgICAgICAgICAgICAgICAgICAgICAgIGJ0dHZfcmVsZWFzZQorCisgICBWQkkJCSBWSURJT0NfU1RSRUFNT04gICAgICAgICAgICAgVklESU9DX1NUUkVBTU9GRgorCQkgVklESU9DX1FCVUYgMSkgICAgICAgICAgICAgIGJ0dHZfcmVsZWFzZQorCQkgYnR0dl9yZWFkLCBidHR2X3BvbGwgMSkgNCkKKworICAgMSkgVGhlIHJlc291cmNlIG11c3QgYmUgYWxsb2NhdGVkIHdoZW4gd2UgZW50ZXIgYnVmZmVyIHByZXBhcmUgZnVuY3Rpb25zCisgICAgICBhbmQgcmVtYWluIGFsbG9jYX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Nyb3AucmVjdCB1bml0cy4gKi8KKwlfX3MzMiAgICAgICAgICAgICAgICAgIGVuZDsKK307CisKKy8qIGJ0dHYtdmJpLmMgKi8KK3ZvaWQgYnR0dl92YmlfZm10X3Jlc2V0KHN0cnVjdCBidHR2X3ZiaV9mbXQgKmYsIGludCBub3JtKTsKKworc3RydWN0IGJ0dHZfY3JvcCB7CisJLyogQSBjcm9wcGluZyByZWN0YW5nbGUgaW4gc3RydWN0IGJ0dHZfdHZub3JtLmNyb3BjYXAgdW5pdHMuICovCisJc3RydWN0IHY0bDJfcmVjdCAgICAgICByZWN0OworCisJLyogU2NhbGVkIGltYWdlIHNpemUgbGltaXRzIHdpdGggdGhpcyBjcm9wIHJlY3QuIERpdmlkZQorCSAgIG1heF9oZWlnaHQsIGJ1dCBub3QgbWluX2hlaWdodCwgYnkgdHdvIHdoZW4gY2FwdHVyaW5nCisJICAgc2luZ2xlIGZpZWxkcy4gU2VlIGFsc28gYnR0dl9jcm9wX3Jlc2V0KCkgYW5kCisJICAgYnR0dl9jcm9wX2FkanVzdCgpIGluIGJ0dHYtZHJpdmVyLmMuICovCisJX19zMzIgICAgICAgICAgICAgICAgICBtaW5fc2NhbGVkX3dpZHRoOworCV9fczMyICAgICAgICAgICAgICAgICAgbWluX3NjYWxlZF9oZWlnaHQ7CisJX19zMzIgICAgICAgICAgICAgICAgICBtYXhfc2NhbGVkX3dpZHRoOworCV9fczMyICAgICAgICAgICAgICAgICAgbWF4X3NjYWxlZF9oZWlnaHQ7Cit9OworCiBzdHJ1Y3QgYnR0dl9maCB7CiAJc3RydWN0IGJ0dHYgICAgICAgICAgICAgICpidHY7CiAJaW50IHJlc291cmNlczsKQEAgLTE2MCwxMyArMjA0LDE5IEBACiAJaW50ICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOwogCWludCAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ7CiAKLQkvKiBjdXJyZW50IHNldHRpbmdzICovCisJLyogdmlkZW8gb3ZlcmxheSA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3BzID0KQEAgLTE4NDQsMTggKzE2OTEsMzAgQEAKIAkub3duZXIgICAgICAgICA9IFRISVNfTU9EVUxFLAogCS5vcGVuICAgICAgICAgID0gdmlkZW9fb3BlbiwKIAkucmVsZWFzZSAgICAgICA9IHZpZGVvX3JlbGVhc2UsCi0JLmlvY3RsICAgICAgICAgPSByYWRpb19pb2N0bCwKKwkuaW9jdGwgICAgICAgICA9IHZpZGVvX2lvY3RsMiwKIAkuY29tcGF0X2lvY3RsICA9IHY0bF9jb21wYXRfaW9jdGwzMiwKIAkubGxzZWVrICAgICAgICA9IG5vX2xsc2VlaywKIH07CiAKIHN0YXRpYyBzdHJ1Y3QgdmlkZW9fZGV2aWNlIGN4ODgwMF9yYWRpb190ZW1wbGF0ZSA9CiB7Ci0JLm5hbWUgICAgICAgICAgPSAiY3g4ODAwLXJhZGlvIiwKLQkudHlwZSAgICAgICAgICA9IFZJRF9UWVBFX1RVTkVSLAotCS5oYXJkd2FyZSAgICAgID0gMCwKLQkuZm9wcyAgICAgICAgICA9ICZyYWRpb19mb3BzLAotCS5taW5vciAgICAgICAgID0gLTEsCisJLm5hbWUgICAgICAgICAgICAgICAgID0gImN4ODgwMC1yYWRpbyIsCisJLnR5cGUgICAgICAgICAgICAgICAgID0gVklEX1RZUEVfVFVORVIsCisJLmhhcmR3YXJlICAgICAgICAgICAgID0gMCwKKwkuZm9wcyAgICAgICAgICAgICAgICAgPSAmcmFkaW9fZm9wcywKKwkubWlub3IgICAgICAgICAgICAgICAgPSAtMSwKKwkudmlkaW9jX3F1ZXJ5Y2FwICAgICAgPSByYWRpb19xdWVyeWNhcCwKKwkudmlkaW9jX2dfdHVuZXIgICAgICAgPSByYWRpb19nX3R1bmVyLAorCS52aWRpb2NfZW51bV9pbnB1dCAgICA9IHJhZGlvX2VudW1faW5wdXQsCisJLnZpZGlvY19nX2F1ZGlvICAgICAgID0gcmFkaW9fZ19hdWRpbywKKwkudmlkaW9jX3NfdHVuZXIgICAgICAgPSByYWRpb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lcnMvbWVkaWEvdmlkZW8vZXQ2MXgyNTEvZXQ2MXgyNTFfY29yZS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVjRMMiBkcml2ZXIgZm9yIEVUNjFYWzEyXTUxIFBDIENhbWVyYSBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA2IGJ5IEx1Y2EgUmlzb2xpYSA8bHVjYS5yaXNvbGlhQHN0dWRpby51bmliby5pdD4gICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA2LTIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgogICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICAgKgpAQCAtNDgsOCArNDgsOCBAQAogI2RlZmluZSBFVDYxWDI1MV9NT0RVTEVfQVVUSE9SICAiKEMpIDIwMDYgTHVjYSBSaXNvbGlhIgogI2RlZmluZSBFVDYxWDI1MV9BVVRIT1JfRU1BSUwgICAiPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+IgogI2RlZmluZSBFVDYxWDI1MV9NT0RVTEVfTElDRU5TRSAiR1BMIgotI2R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AgICAgICAgICAgICAgICAgICAgICAgIG1hc2tfa2V5Y29kZTsKLQl1MzIgICAgICAgICAgICAgICAgICAgICAgICBtYXNrX2tleWRvd247Ci0JdTMyICAgICAgICAgICAgICAgICAgICAgICAgbWFza19rZXl1cDsKLQlpbnQgICAgICAgICAgICAgICAgICAgICAgICBwb2xsaW5nOwotCXUzMiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RfZ3BpbzsKLQlzdHJ1Y3QgdGltZXJfbGlzdCAgICAgICAgICB0aW1lcjsKLX07Ci0KIC8qIHRzL21wZWcgc3RhdHVzICovCiBzdHJ1Y3Qgc2FhNzEzNF90cyB7CiAJLyogVFMgY2FwdHVyZSAqLwpAQCAtNDYzLDcgKzQ0OCw3IEBACiAKIAkvKiBpbmZyYXJlZCByZW1vdGUgKi8KIAlpbnQgICAgICAgICAgICAgICAgICAgICAgICBoYXNfcmVtb3RlOwotCXN0cnVjdCBzYWE3MTM0X2lyICAgICAgICAgICpyZW1vdGU7CisJc3RydWN0IGNhcmRfaXIJCSAgICpyZW1vdGU7CiAKIAkvKiBwY2kgaS9vICovCiAJY2hhciAgICAgICAgICAgICAgICAgICAgICAgbmFtZVszMl07CkBAIC01NDMsOSArNTI4LDExIEBACiAJc3RydWN0IHdvcmtfc3RydWN0ICAgICAgICAgZW1wcmVzc193b3JrcXVldWU7CiAJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZW1wcmVzc19zdGFydGVkOwogCisjaWYgZGVmaW5lZChDT05GSUdfVklERU9fQlVGX0RWQikgfHwgZGVmaW5lZChDT05GSUdfVklERU9fQlVGX0RWQl9NT0RVTEUpCiAJLyogU0FBNzEzNF9NUEVHX0RWQiBvbmx5ICovCiAJc3RydWN0IHZpZGVvYnVmX2R2YiAgICAgICAgZHZiOwogCWludCAoKm9yaWdpbmFsX2RlbW9kX3NsZWVwKShzdHJ1Y3QgZHZiX2Zyb250ZW5kKiBmZSk7CisjZW5kaWYKIH07CiAKIC8qIC0tLS0tLS0tLS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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBWNEwyIGRyaXZlciBmb3IgU045QzEweCBQQyBDYW1lcmEgQ29udHJvbGxlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBWNEwyIGRyaXZlciBmb3IgU045QzF4eCBQQyBDYW1lcmEgQ29udHJvbGxlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNiBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0zNywzMyArMzcsMTAgQEAKICNpbmNsdWRlIDxsaW51eC9zdHJpbmcuaD4KICNpbmNsdWRlIDxsaW51eC9zdGRkZWYuaD4KIAorI2luY2x1ZGUgInNuOWMxMDJfY29uZmlnLmgiCiAjaW5jbHVkZSAic245YzEwMl9zZW5zb3IuaCIKKyNpbmNsdWRlICJzbjljMTAyX2RldnRhYmxlLmgiCiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2RlZmluZSBTTjlDMTAyX0RFQlVHCi0jZGVmaW5lIFNOOUMxMDJfREVCVUdfTEVWRUwgICAgICAgMgotI2RlZmluZSBTTjlDMTAyX01BWF9ERVZJQ0VTICAgICAgIDY0Ci0jZGVmaW5lIFNOOUMxMDJfUFJFU0VSVkVfSU1HU0NBTEUgMAotI2RlZmluZSBTTjlDMTAyX0ZPUkNFX01VTk1BUCAgICAgIDAKLSNkZWZpbmUgU045QzE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ZGdlOworfQorCisKK3N0cnVjdCBzbjljMTAyX3NlbnNvciogc245YzEwMl9nZXRfc2Vuc29yKHN0cnVjdCBzbjljMTAyX2RldmljZSogY2FtKQoreworCXJldHVybiAmY2FtLT5zZW5zb3I7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI3VuZGVmIERCRwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfY29uZmlnLmggYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9jb25maWcuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4wZjRlMDM3Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfY29uZmlnLmgKQEAgLTAsMCArMSw4NiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogR2xvYmFsIHBhcmFtZXRlcnMgZm9yIHRoZSBWNEwyIGRyaXZlciBmb3IgU045QzF4eCBQQyBDYW1lcmEgQ29udHJvbGxlcnMgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA3IGJ5IEx1Y2EgUmlzb2xpYSA8bHVjYS5yaXNvbGlhQHN0dWRpby51bmliby5pdD4gICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgorICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICAgKgorICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICAgKgorICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICAgKgorICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICAgKgorICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICAgKgorICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICAgKgorICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgICAgICAgICAgICAgKgorICogRm91bmRhdGlvbiwgSW5jLiwgNjc1IE1hc3MgQXZlLCBDYW1icmlkZ2UsIE1BIDAyMTM5LCBVU0EuICAgICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfU045QzEwMl9DT05GSUdfSF8KKyNkZWZpbmUgX1NOOUMxMDJfQ09ORklHX0hfCisKKyNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgorI2luY2x1ZGUgPGxpbnV4L2ppZmZpZXMuaD4KKworI2RlZmluZSBTTjlDMTAyX0RFQlVHCisjZGVmaW5lIFNOOUMxMDJfREVCVUdfTEVWRUwgICAgICAgMgorI2RlZmluZSBTTjlDMTAyX01BWF9ERVZJQ0VTICAgICAgIDY0CisjZGVmaW5lIFNOOUMxMDJfUFJFU0VSVkVfSU1HU0NBTEUgMAorI2RlZmluZSBTTjlDMTAyX0ZPUkNFX01VTk1BUCAgICAgIDAKKyNkZWZpbmUgU045QzEwMl9NQVhfRlJBTUVTICAgICAgICAzMgorI2RlZmluZSBTTjlDMTAyX1VSQlMgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU045QzEwMl9JU09fUEFDS0VUUyAgICAgICA3CisjZGVmaW5lIFNOOUMxMDJfQUxURVJOQVRFX1NFVFRJTkcgOAorI2RlZmluZSBTTjlDMTAyX1VSQl9USU1FT1VUICAgICAgIG1zZWNzX3RvX2ppZmZpZXMoMiAqIFNOOUMxMDJfSVNPX1BBQ0tFVFMpCisjZGVmaW5lIFNOOUMxMDJfQ1RSTF9USU1FT1VUICAgICAgMzAwCisjZGVmaW5lIFNOOUMxMDJfRlJBTUVfVElNRU9VVCAgICAgMAorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBjb25zdCB1OCBTTjlDMTAyX1l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L21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9jb3JlLmMKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfY29yZS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVjRMMiBkcml2ZXIgZm9yIFNOOUMxMHggUEMgQ2FtZXJhIENvbnRyb2xsZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogVjRMMiBkcml2ZXIgZm9yIFNOOUMxeHggUEMgQ2FtZXJhIENvbnRyb2xsZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgogICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICAgKgpAQCAtNDMsMTIgKzQzLDEyIEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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l2aWRlb191bnJlZ2lzdGVyX2RldmljZShjYW0tPnY0bGRldik7Ci0jZW5kaWYKLWZhaWwyOgotCXZpZGVvX25yW2Rldl9ucl0gPSAtMTsKLQlkZXZfbnIgPSAoZGV2X25yIDwgU045QzEwMl9NQVhfREVWSUNFUy0xKSA/IGRldl9ucisxIDogMDsKLQltdXRleF91bmxvY2soJmNhbS0+ZGV2X211dGV4KTsKIGZhaWw6CiAJaWYgKGNhbSkgewogCQlrZnJlZShjYW0tPmNvbnRyb2xfYnVmZmVyKTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX2RldnRhYmxlLmggYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9kZXZ0YWJsZS5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjNhNjgyZWMKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9kZXZ0YWJsZS5oCkBAIC0wLDAgKzEsMTQyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUYWJsZSBvZiBkZXZpY2UgaWRlbnRpZmllcnMgb2YgdGhlIFNOOUMxeHggUEMgQ2FtZXJhIENvbnRyb2xsZXJzICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCisgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgICAqCisgKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgICAqCisgKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgICAqCisgKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgICAqCisgKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgICAqCisgKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgICAqCisgKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZSAgICAgICAgICAgICAqCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4gICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9TTjlDMTAyX0RFVlRBQkxFX0hfCisjZGVmaW5lIF9TTjlDMTAyX0RFVlRBQkxFX0hfCisKKyNpbmNsdWRlIDxsaW51eC91c2IuaD4KKworc3RydWN0IHNuOWMxMDJfZGV2aWNlOworCisvKgorICAgRWFjaCBTTjlDMXh4IGNhbWVyYSBoYXMgcHJvcGVyIFBJRC9WSUQgaWRlbnRpZmllcnMuCisgICBTTjlDMTAzLCBTTjlDMTA1LCBTTjlDMTIwIHN1cHBvcnQgbXVsdGlwbGUgaW50ZXJmYWNlcywgYnV0IHdlIG9ubHkgaGF2ZSB0bworICAgaGFuZGxlIHRoZSB2aWRlbyBjbGFzcyBpbnRlcmZhY2UuCisqLworI2RlZmluZSBTTjlDMTAyX1VTQl9ERVZJQ0UodmVuZCwgcHJvZCwgYnJpZGdlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCS5tYXRjaF9mbGFncyA9IFVTQl9ERVZJQ0VfSURfTUFUQ0hfREVWSUNFIHwgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCSAgICAgICBVU0JfREVWSUNFX0lEX01BVENIX0lOVF9DTEFTUywgICAgICAgICAgICAgICAgICAgICAgICAgXAorCS5pZFZlbmRvciA9ICh2ZW5kKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJLmlkUHJvZHVjdCA9IChwcm9kKSwgICAgIC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WQuYworKysgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9odjcxMzFkLmMKQEAgLTEsOCArMSw4IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQbHVnLWluIGZvciBIVjcxMzFEIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAgICAqCisgKiBQbHVnLWluIGZvciBIVjcxMzFEIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxeHggUEMgQ2FtZXJhICAgICAqCiAgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNiBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCiAgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgICAqCkBAIC0xMjQsNyArMT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DA2NDQKLS0tIGEvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfbWkwMzQzLmMKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfbWkwMzQzLmMKQEAgLTEsOCArMSw4IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQbHVnLWluIGZvciBNSS0wMzQzIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAgICAqCisgKiBQbHVnLWluIGZvciBNSS0wMzQzIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxeHggUEMgQ2FtZXJhICAgICAqCiAgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNiBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCiAgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmF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C5jCmluZGV4IDNkYTA0MjAuLjdkZjA5ZmYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX292NzYzMC5jCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX292NzYzMC5jCkBAIC0xLDggKzEsOCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUGx1Zy1pbiBmb3IgT1Y3NjMwIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAgICAgKgorICogUGx1Zy1pbiBmb3IgT1Y3NjMwIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxeHggUEMgQ2FtZXJhICAgICAgKgogICogQ29udHJvbGxlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA1LTIwMDYgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgorICogQ29weXJpZ2h0IChDKSAyMDA2LTIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgogICogaXQgdW5kZXIgdGhlIHRlcm1zIG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jljMTAyL3NuOWMxMDJfb3Y3NjYwLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZDY3MGMyNAotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX292NzY2MC5jCkBAIC0wLDAgKzEsNTkyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQbHVnLWluIGZvciBPVjc2NjAgaW1hZ2Ugc2Vuc29yIGNvbm5lY3RlZCB0byB0aGUgU045QzF4eCBQQyBDYW1lcmEgICAgICAqCisgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCisgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgICAqCisgKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgICAqCisgKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgICAgICAgICAqCisgKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiAgICAgICAgICAqCisgKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlICAgICAgICAgICAqCisgKiBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSAgICAgICAqCisgKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZSAgICAgICAgICAgICAqCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4gICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaW5jbHVkZSAic245YzEwMl9zZW5zb3IuaC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2MCwgMHgwYSk7CisJdmVyID0gc245YzEwMl9pMmNfdHJ5X3JlYWQoY2FtLCAmb3Y3NjYwLCAweDBiKTsKKwlpZiAoZXJyIHx8IHBpZCA8IDAgfHwgdmVyIDwgMCkKKwkJcmV0dXJuIC1FSU87CisJaWYgKHBpZCAhPSAweDc2IHx8IHZlciAhPSAweDYwKQorCQlyZXR1cm4gLUVOT0RFVjsKKwlzbjljMTAyX2F0dGFjaF9zZW5zb3IoY2FtLCAmb3Y3NjYwKTsKKworCXJldHVybiAwOworfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfcGFzMTA2Yi5jIGIvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfcGFzMTA2Yi5jCmluZGV4IDk5MTU5NDQuLjhkNzlhNWYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX3BhczEwNmIuYworKysgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl9wYXMxMDZiLmMKQEAgLTEsOCArMSw4IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQbHVnLWluIGZvciBQQVMxMDZCIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAgICAqCisgKiBQbHVnLWluIGZvciBQQVMxMDZCIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxeHggUEMgQ2FtZXJhICAgICAqCiAgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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sKIAkubmFtZSA9ICJQQVMxMDZCIiwKIAkubWFpbnRhaW5lciA9ICJMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+IiwKKwkuc3VwcG9ydGVkX2JyaWRnZSA9IEJSSURHRV9TTjlDMTAxIHwgQlJJREdFX1NOOUMxMDIgfCBCUklER0VfU045QzEwMywKIAkuc3lzZnNfb3BzID0gU045QzEwMl9JMkNfUkVBRCB8IFNOOUMxMDJfSTJDX1dSSVRFLAogCS5mcmVxdWVuY3kgPSBTTjlDMTAyX0kyQ180MDBLSFogfCBTTjlDMTAyX0kyQ18xMDBLSFosCiAJLmludGVyZmFjZSA9IFNOOUMxMDJfSTJDXzJXSVJFUywKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX3BhczIwMmJjYS5jIGIvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfcGFzMjAyYmNhLmMKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IGM4ZjFhZTIuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9tZWRpYS92aWRlby9zbjljMTAyL3NuOWMxMDJfcGFzMjAyYmNhLmMKKysrIC9kZXYvbnVsbApAQCAtMSwyMzggKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUGx1Zy1pbiBmb3IgUEFTMjAyQkNBIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAgKgotICogQ29udHJvbGxlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA2IGJ5IEx1Y2EgUmlzb2xpYSA8bHVjYS5yaXNvbGlhQHN0dWRpby51bmliby5pdD4gICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgotICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICAgKgotICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICAgKgotICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsICAgICAgICAgKgotICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgICAgICAgICAgKgotICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZSAgICAgICAgICAgKgotICogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICA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3BhczIwMmJjYi5jCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX3BhczIwMmJjYi5jCkBAIC0xLDEzICsxLDEzIEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQbHVnLWluIGZvciBQQVMyMDJCQ0IgaW1hZ2Ugc2Vuc29yIGNvbm5lY3RlZCB0byB0aGUgU045QzEweCBQQyBDYW1lcmEgICAqCisgKiBQbHVnLWluIGZvciBQQVMyMDJCQ0IgaW1hZ2Ugc2Vuc29yIGNvbm5lY3RlZCB0byB0aGUgU045QzF4eCBQQyBDYW1lcmEgICAqCiAgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBDb3B5cmlnaHQgKEMpIDIwMDQgYnkgQ2FybG9zIEVkdWFyZG8gTWVkYWdsaWEgRHlvbmlzaW8gICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgPG1lZGFnbGlhQHVuZGwub3JnLmJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgaHR0cDovL2NhZHUuaG9tZWxpbnV4LmNvbTo4MDgwLyAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBEQUMgTWFnbml0dWRlLCBleHBvc3VyZSBhbmQgZ3JlZW4gZ2FpbiBjb250cm9scyBhZGRlZCBieSAgICAgICAgICAgICAgICAqCi0gKiBMdWNhIFJpc29saWEgPGx1Y2E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qKioqKgotICogQVBJIGZvciBpbWFnZSBzZW5zb3JzIGNvbm5lY3RlZCB0byB0aGUgU045QzEweCBQQyBDYW1lcmEgQ29udHJvbGxlcnMgICAgKgorICogQVBJIGZvciBpbWFnZSBzZW5zb3JzIGNvbm5lY3RlZCB0byB0aGUgU045QzF4eCBQQyBDYW1lcmEgQ29udHJvbGxlcnMgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgICAgKgogICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgICAgKgpAQCAtMzYsMTQgKzM2LDEzIEBACiAvKgogICAgT1ZFUlZJRVcuCiAgICBUaGlzIGlzIGEgc21hbGwgaW50ZXJmYWNlIHRoYXQgYWxsb3dzIHlvdSB0byBhZGQgc3VwcG9ydCBmb3IgYW55IENDRC9DTU9TCi0gICBpbWFnZSBzZW5zb3JzIGNvbm5lY3RlZCB0byB0aGUgU045QzEwWCBicmlkZ2VzLiBUaGUgZW50aXJlIEFQSSBpcyBkb2N1bWVudGVkCisgICBpbWFnZSBzZW5zb3JzIGNvbm5lY3Rl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WN0IHNuOWMxMDJfZGV2aWNlKiBjYW0sIGNvbnN0IHN0cnVjdCB1c2JfZGV2aWNlX2lkICppZCk7CiAKQEAgLTk5LDY4ICs3Nyw4IEBACiAJCSAgICAgIHN0cnVjdCBzbjljMTAyX3NlbnNvciogc2Vuc29yKTsKIAogLyoKLSAgIEVhY2ggU045QzEweCBjYW1lcmEgaGFzIHByb3BlciBQSUQvVklEIGlkZW50aWZpZXJzLgotICAgU045QzEwMyBzdXBwb3J0cyBtdWx0aXBsZSBpbnRlcmZhY2VzLCBidXQgd2Ugb25seSBoYW5kbGUgdGhlIHZpZGVvIGNsYXNzCi0gICBpbnRlcmZhY2UuCi0qLwotI2RlZmluZSBTTjlDMTAyX1VTQl9ERVZJQ0UodmVuZCwgcHJvZCwgaW50Y2xhc3MpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCS5tYXRjaF9mbGFncyA9IFVTQl9ERVZJQ0VfSURfTUFUQ0hfREVWSUNFIHwgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCSAgICAgICBVU0JfREVWSUNFX0lEX01BVENIX0lOVF9DTEFTUywgICAgICAgICAgICAgICAgICAgICAgICAgXAotCS5pZFZlbmRvciA9ICh2ZW5kKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JLmlkUHJvZHVjdCA9IChwcm9kKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkuYkludGVyZmFjZUNsYXNzID0gKGludGNsYXNzKQotCi0jZGVmaW5lIFNOOUMxMDJfSURfVEFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi1zdGF0aWMgY29uc3Qgc3RydWN0IHVzYl9kZXZpY2VfaWQgc245YzEwMl9pZF90YWJsZVtdID0geyAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBVU0JfREVWSUNFKDB4MGM0NSwgMHg2MDAxKSwgfSwgLyogVEFTNTExMEMxQiAqLyAgICAgICAgICAgICAgICAgICAgIFwKLQl7IFVTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwMDUpLCB9LCAvKiBUQVM1MTEwQzFCICovICAgICAgICAgICAgICAgICAgICAgXAotCXsgVVNCX0RFVklDRSgweDBjNDUsIDB4NjAwNyksIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBVU0JfREVWSUNFKDB4MGM0NSwgMHg2MDA5KSwgfSwgLyogUEFTMTA2QiAqLyAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7IFVTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwMGQpLCB9LCAvKiBQQVMxMDZCICovICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgVVNCX0RFVklDRSgweDBjNDUsIDB4NjAyNCksIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBVU0JfREVWSUNFKDB4MGM0NSwgMHg2MDI1KSwgfSwgLyogVEFTNTEzMEQxQiBhbmQgVEFTNTExMEMxQiAqLyAgICAgIFwKLQl7IFVTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwMjgpLCB9LCAvKiBQQVMyMDJCQ0IgKi8gICAgICAgICAgICAgICAgICAgICAgXAotCXsgVVNCX0RFVklDRSgweDBjNDUsIDB4NjAyOSksIH0sIC8qIFBBUzEwNkIgKi8gICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBVU0JfREVWSUNFKDB4MGM0NSwgMHg2MDJhKSwgfSwgLyogSFY3MTMxRCAqLyAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7IFVTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwMmIpLCB9LCAvKiBNSS0wMzQzICovICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgVVNCX0RFVklDRSgweDBjNDUsIDB4NjAyYyksIH0sIC8qIE9WNzYzMCAqLyAgICAgICAgICAgICAgICAgIC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iMiwgMHhmZiksIH0sICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgU045QzEwMl9VU0JfREVWSUNFKDB4MGM0NSwgMHg2MGIzLCAweGZmKSwgfSwgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBTTjlDMTAyX1VTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwYjgsIDB4ZmYpLCB9LCAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7IFNOOUMxMDJfVVNCX0RFVklDRSgweDBjNDUsIDB4NjBiYSwgMHhmZiksIH0sICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgU045QzEwMl9VU0JfREVWSUNFKDB4MGM0NSwgMHg2MGJiLCAweGZmKSwgfSwgICAgICAgICAgICAgICAgICAgICAgICBcCi0JeyBTTjlDMTAyX1VTQl9ERVZJQ0UoMHgwYzQ1LCAweDYwYmMsIDB4ZmYpLCB9LCAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl7IFNOOUMxMDJfVVNCX0RFVklDRSgweDBjNDUsIDB4NjBiZSwgMHhmZiksIH0sICAgICAgICAgICAgICAgICAgICAgICAgXAotCXsgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19OwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCiAgICBSZWFkL3dyaXRlIHJvdXRpbmVzOiB0aGV5IGFsd2F5cyByZXR1cm4gLTEgb24gZXJyb3IsIDAgb3IgdGhlIHJlYWQgdmFsdWUKLSAgIG90aGVyd2lzZS4gTk9URSB0aGF0IGEgcmVhbCByZWFkIG9wZXJhdGlvbiBpcyBub3Qgc3VwcG9ydGVkIGJ5IHRoZSBTTjlDMTBYCisgICBvdGhlcndpc2UuIE5PVEUgdGhhdCBhIHJlYWwgcmVhZCBvcGVyYXRpb24gaXMgbm90IHN1cHB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0Ci0tLSBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vc245YzEwMi9zbjljMTAyX3RhczUxMzBkMWIuYworKysgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3NuOWMxMDIvc245YzEwMl90YXM1MTMwZDFiLmMKQEAgLTEsOCArMSw4IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBQbHVnLWluIGZvciBUQVM1MTMwRDFCIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxMHggUEMgQ2FtZXJhICAqCisgKiBQbHVnLWluIGZvciBUQVM1MTMwRDFCIGltYWdlIHNlbnNvciBjb25uZWN0ZWQgdG8gdGhlIFNOOUMxeHggUEMgQ2FtZXJhICAqCiAgKiBDb250cm9sbGVycyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNiBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNyBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCiAgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSB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QgQ29udHJvbCBDaGlwICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDYgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDYtMjAwNyBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCiAgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfY29yZS5jIGIvZHJpdmVycy9tZWRpYS92aWRlby96YzAzMDEvemMwMzAxX2NvcmUuYwppbmRleCA4ZGE3ZjE1Li5mMTEyMDU1IDEwMDY0NAotLS0gYS9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfY29yZS5jCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vemMwMzAxL3pjMDMwMV9jb3JlLmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBWaWRlbzRMaW51eDIgZHJpdmVyIGZvciBaQzAzMDFbUF0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0WDoweCUwNFgpIixpZC0+aWRWZW5kb3IsIGlkLT5pZFByb2R1Y3QpOwogCiAJZm9yICAoaSA9IDA7IHpjMDMwMV9zZW5zb3JfdGFibGVbaV07IGkrKykgewogCQllcnIgPSB6YzAzMDFfc2Vuc29yX3RhYmxlW2ldKGNhbSk7CmRpZmYgLS1naXQgYS9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfcGFzMjAyYmNiLmMgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfcGFzMjAyYmNiLmMKaW5kZXggZWNmZDM5YS4uM2VmYjkyYSAxMDA2NDQKLS0tIGEvZHJpdmVycy9tZWRpYS92aWRlby96YzAzMDEvemMwMzAxX3BhczIwMmJjYi5jCisrKyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vemMwMzAxL3pjMDMwMV9wYXMyMDJiY2IuYwpAQCAtMSw4ICsxLDggQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFBsdWctaW4gZm9yIFBBUzIwMkJDQiBpbWFnZSBzZW5zb3IgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDFbUF0gSW1hZ2UgICAgICoKKyAqIFBsdWctaW4gZm9yIFBBUzIwMkJDQiBpbWFnZSBzZW5zb3IgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDEgSW1hZ2UgICAgICAgICoKICAqIFByb2Nlc3NvciBhbmQgQ29udHJvbCBDaGlwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNiBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNi0yMDA3IGJ5IEx1Y2EgUmlzb2xpYSA8bHVjYS5yaXNvbGlhQHN0dWRpby51bmliby5pdD4gICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIEluaXRpYWxpemF0aW9uIHZhbHVlcyBvZiB0aGUgWkMwMzAxW1BdIGhhdmUgYmVlbiB0YWtlbiBmcm9tIHRoZSBTUENBNVhYICoKICAqIGRyaXZlciBtYWludGFpbmVkIGJ5IE1pY2hlbCBYaGFhcmQgPG14aGFhcmRAbWFnaWMuZnI+ICAgICAgICAgICAgICAgICAgICoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vemMwMzAxL3pjMDMwMV9wYjAzMzAuYyBiL2RyaXZlcnMvbWVkaWEvdmlkZW8vemMwMzAxL3pjMDMwMV9wYjAzMzAuYwppbmRleCBlZDg1NDJlLi41Nzg0YjFkIDEwMDY0NAotLS0gYS9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfcGIwMzMwLmMKKysrIGIvZHJpdmVycy9tZWRpYS92aWRlby96YzAzMDEvemMwMzAxX3BiMDMzMC5jCkBAIC0xLDggKzEsOCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUGx1Zy1pbiBmb3IgUEItMDMzMCBpbWFnZSBzZW5zb3IgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDFbUF0gSW1hZ2UgICAgICAgKgorICogUGx1Zy1pbiBmb3IgUEItMDMzMCBpbWFnZSBzZW5zb3IgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDFQIEltYWdlICAgICAgICAgKgogICogUHJvY2Vzc29yIGFuZCBDb250cm9sIENoaXAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA2IGJ5IEx1Y2EgUmlzb2xpYSA8bHVjYS5yaXNvbGlhQHN0dWRpby51bmliby5pdD4gICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA2LTIwMDcgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogSW5pdGlhbGl6YXRpb24gdmFsdWVzIG9mIHRoZSBaQzAzMDFbUF0gaGF2ZSBiZWVuIHRha2VuIGZyb20gdGhlIFNQQ0E1WFggKgogICogZHJpdmVyIG1haW50YWluZWQgYnkgTWljaGVsIFhoYWFyZCA8bXhoYWFyZEBtYWdpYy5mcj4gICAgICAgICAgICAgICAgICAgKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9tZWRpYS92aWRlby96YzAzMDEvemMwMzAxX3NlbnNvci5oIGIvZHJpdmVycy9tZWRpYS92aWRlby96YzAzMDEvemMwMzAxX3NlbnNvci5oCmluZGV4IDNkYWYwNDkuLjQ0ZTgyY2YgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVkaWEvdmlkZW8vemMwMzAxL3pjMDMwMV9zZW5zb3IuaAorKysgYi9kcml2ZXJzL21lZGlhL3ZpZGVvL3pjMDMwMS96YzAzMDFfc2Vuc29yLmgKQEAgLTEsOCArMSw4IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBBUEkgZm9yIGltYWdlIHNlbnNvcnMgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDEgSW1hZ2UgUHJvY2Vzc29yIGFuZCAgICAgICAqCisgKiBBUEkgZm9yIGltYWdlIHNlbnNvcnMgY29ubmVjdGVkIHRvIHRoZSBaQzAzMDFbUF0gSW1hZ2UgUHJvY2Vzc29yIGFuZCAgICAqCiAgKiBDb250cm9sIENoaXAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDYgYnkgTHVjYSBSaXNvbGlhIDxsdWNhLnJpc29saWFAc3R1ZGlvLnVuaWJvLml0PiAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDYtMjAwNyBieSBMdWNhIFJpc29saWEgPGx1Y2Eucmlzb2xpYUBzdHVkaW8udW5pYm8uaXQ+ICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgICAqCiAgKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgICAqCkBAIC03MCw3ICs3MCw3IEBACiAJeyBaQzAzMDFfVVNCX0RFVklDRSgweDA0MWUsIDB4NDAzNiwgMHhmZiksIH0sIC8qIEhWNzEzMSAqLyAgICAgICAgICAgIFwKIAl7IFpDMDMwMV9VU0JfREVWSUNFKDB4MDQxZSwgMHg0MDNhLCAweGZmKSwgfSwgLyogSFY3MTMxICovICAgICAgICAgICAgXAogCXsgWkMwMzAxX1VTQl9ERVZJQ0UoMHgwNDU4LCAweDcwMD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ICNlbmRpZgkJCiB9CiAKLWludCBpYm10cl9wcm9iZV9jYXJkKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCi17Ci0JaW50IGVyciA9IGlibXRyX3Byb2JlKGRldik7Ci0JaWYgKCFlcnIpIHsKLQkJZXJyID0gcmVnaXN0ZXJfbmV0ZGV2KGRldik7Ci0JCWlmIChlcnIpCi0JCQlpYm10cl9jbGVhbnVwX2NhcmQoZGV2KTsKLQl9Ci0JcmV0dXJuIGVycjsKLX0KLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCWlibXRyX3Byb2JlKCk6ICBSb3V0aW5lIHNwZWNpZmllZCBpbiB0aGUgbmV0d29yayBkZXZpY2Ugc3RydWN0dXJlCiAgKgl0byBwcm9iZSBmb3IgYW4gSUJNIFRva2VuIFJpbmcgQWRhcHRlci4gIFJvdXRpbmUgb3V0bGluZToKQEAgLTM1OCw3ICszNDYsNyBAQAogICoJd2hpY2ggcmVmZXJlbmNlcyBpdC4KICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgaW50IGlibXRyX3Byb2JlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCitzdGF0aWMgaW50IF9faW5pdCBpYm10cl9wcm9iZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewogCWludCBpOwogCWludCBiYXNlX2FkZHIgPSBkZXYtPmJhc2VfYWRkcjsKQEAgLTM3OCw2ICszNjYsMTcgQEAKIAlyZXR1cm4gLUVOT0RFVjsKIH0KIAoraW50IF9faW5pdCBpYm10cl9wcm9iZV9jYXJkKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJaW50IGVyciA9IGlibXRyX3Byb2JlKGRldik7CisJaWYgKCFlcnIpIHsKKwkJZXJyID0gcmVnaXN0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gICAgICAqLwotI2RlZmluZSBDRDE4MF9TQ0hSNCAgICAgMHgwYyAgICAvKiBTcGVjaWFsIENoYXJhY3RlciBSZWdpc3RlciA0ICAgICAgICAgICAgKi8KLSNkZWZpbmUgQ0QxODBfTUNSICAgICAgIDB4MTIgICAgLyogTW9kZW0gQ2hhbmdlIFJlZ2lzdGVyICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENEMTgwX01DT1IxICAgICAweDEwICAgIC8qIE1vZGVtIENoYW5nZSBPcHRpb24gMSBSZWdpc3RlciAgICAgICAgICAqLwotI2RlZmluZSBDRDE4MF9NQ09SMiAgICAgMHgxMSAgICAvKiBNb2RlbSBDaGFuZ2UgT3B0aW9uIDIgUmVnaXN0ZXIgICAgICAgICAgKi8KLSNkZWZpbmUgQ0QxODBfTVNWUiAgICAgIDB4MjggICAgLyogTW9kZW0gU2lnbmFsIFZhbHVlIFJlZ2lzdGVyICAgICAgICAgICAgICovCi0jZGVmaW5lIENEMTgwX01TVlJUUyAgICAweDI5ICAgIC8qIE1vZGVtIFNpZ25hbCBWYWx1ZSBSVFMgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBDRDE4MF9NU1ZEVFIgICAgMHgyYSAgICAvKiBNb2RlbSBTaWduYWwgVmFsdWUgRFRSICAgICAgICAgICAgICAgICAgKi8KLQotLyogR2xvYmFsIEludGVycnVwdCBWZWN0b3IgUmVnaXN0ZXIgKFIvVykgKi8KLQotI2RlZmluZSBHU1ZSX0lUTUFTSyAgICAgMHgwNyAgICAgLyogSW50ZXJydXB0IHR5cGUgbWFzayAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lICBHU1ZSX0lUX01ETSAgICAgMHgwMSAgICAvKiBNb2RlbSBTaWduYWwgQ2hhbmdlIEludGVycnVwdCAgICAgICAgICAgKi8KLSNkZWZpbmUgIEdTVlJfSVRfVFggICAgICAweDAyICAgIC8qIFRyYW5zbWl0IERhdGEgSW50ZXJydXB0ICAgICAgICAgICAgICAg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IChvciAxICYgMykgRGV0ZWN0ZWQgICAgICAqLwotI2RlZmluZSAgUkNTUl9TQ18yICAgICAgIDB4MjAgICAvKiBTcGVjaWFsIENoYXIgMiAob3IgMiAmIDQpIERldGVjdGVkICAgICAgKi8KLSNkZWZpbmUgIFJDU1JfU0NfMyAgICAgICAweDMwICAgLyogU3BlY2lhbCBDaGFyIDMgRGV0ZWN0ZWQgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lICBSQ1NSX1NDXzQgICAgICAgMHg0MCAgIC8qIFNwZWNpYWwgQ2hhciA0IERldGVjdGVkICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBSQ1NSX0JSRUFLICAgICAgMHgwOCAgICAvKiBCcmVhayBoYXMgYmVlbiBkZXRlY3RlZCAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgUkNTUl9QRSAgICAgICAgIDB4MDQgICAgLyogUGFyaXR5IEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIFJDU1JfRkUgICAgICAgICAweDAyICAgIC8qIEZyYW1lIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBSQ1NSX09FICAgICAgICAgMHgwMSAgICAvKiBPdmVycnVuIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotCi0vKiBDaGFubmVsIENvbW1hbmQgUmVnaXN0ZXIgKFIvVykgKGNvbW1hbmRzIGluIGdyb3VwcyBjYW4gYmUgT1ItZWQpICovCi0KLSNkZWZpbmUgQ0NSX0hBUkRSRVNFVCAgIDB4ODEgICAgLyogUmVzZXQgdGhlIGNoaXAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0KLSNkZWZpbmUgQ0NSX1NPRlRSRVNFVCAgIDB4ODAgICAgLyogU29mdCBDaGFubmVsIFJlc2V0ICAgICAgICAgICAgICAgICAgICAgICovCi0KLSNkZWZpbmUgQ0NSX0NPUkNIRzEgICAgIDB4NDIgICAgLyogQ2h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ICAgIC8qIFBhcml0eSBNb2RlIG1hc2sgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSAgQ09SMV9OT1BBUiAgICAgIDB4MDAgICAvKiBObyBQYXJpdHkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgIENPUjFfRk9SQ0VQQVIgICAweDIwICAgLyogRm9yY2UgUGFyaXR5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lICBDT1IxX05PUk1QQVIgICAgMHg0MCAgIC8qIE5vcm1hbCBQYXJpdHkgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBDT1IxX0lHTk9SRSAgICAgMHgxMCAgICAvKiBJZ25vcmUgUGFyaXR5IG9uIFJYICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQ09SMV9TVE9QQklUUyAgIDB4MGMgICAgLyogTnVtYmVyIG9mIFN0b3AgQml0cyAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lICBDT1IxXzFTQiAgICAgICAgMHgwMCAgIC8qIDEgU3RvcCBCaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSAgQ09SMV8xNVNCICAgICAgIDB4MDQgICAvKiAxLjUgU3RvcCBCaXRzICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgIENPUjFfMlNCICAgICAgICAweDA4ICAgLyogMiBTdG9wIEJpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENPUjFfQ0hBUkxFTiAgICAweDAzICAgIC8qIENoYXJhY3RlciBMZW5ndGggICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSAgQ09SMV81QklUUyAgICAgIDB4MDAgICAvKiA1IGJpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgIENPUjFfNkJJVFMgICAgICAweDAxICAgLyogNiBiaXRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lICBDT1IxXzdCSVRTICAgICAgMHgwMiAgIC8qIDcgYml0cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSAgQ09SMV84QklUUyAgICAgIDB4MDMgICAvKiA4IGJpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotCi0vKiBDaGFubmVsIE9wdGlvbiBSZWdpc3RlciAyIChSL1cpICovCi0KLSNkZWZpbmUgQ09SMl9JWE0gICAgICAgIDB4ODAgICAgLyogSW1wbGllZCBYT04gbW9kZSAgICAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENPUjJfVFhJQkUgICAgICAweDQwICAgIC8qIEVuYWJsZSBJbi1CYW5kIChYT04vWE9GRikgRmxvdyBDb250cm9sICAqLwotI2RlZmluZSBDT1IyX0VUQyAgICAgICAgMHgyMCAgICAvKiBFbWJlZGRlZCBUeCBDb21tYW5kcyBFbmFibGUgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQ09SMl9MTE0gICAgICAgIDB4MTAgICAgLyogTG9jYWwgTG9vcGJhY2sgTW9kZSAgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENPUjJfUkxNICAgICAgICAweDA4ICAgIC8qIFJlbW90ZSBMb29wYmFjayBNb2RlICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBDT1IyX1JUU0FPICAgICAgMHgwNCAgICAvKiBSVFMgQXV0b21hdGljIE91dHB1dCBFbmFibGUgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQ09SMl9DVFNBRSAgICAgIDB4MDIgICAgLyogQ1RTIEF1dG9tYXRpYyBFbmFibGUgICAgICAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENPUjJfRFNSQUUgICAgICAweDAxICAgIC8qIERTUiBBdXRvbWF0aWMgRW5hYmxlICAgICAgICAgICAgICAgICAgICAqLwotCi0KLS8qIENoYW5u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TICAgICAgICAgICAqLwotCi0KLS8qIE1vZGVtIENoYW5nZSBSZWdpc3RlciAoUi9XKSAqLwotCi0jZGVmaW5lIE1DUl9EU1JDSEcgICAgICAweDgwICAgIC8qIERTUiBDaGFuZ2VkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBNQ1JfQ0RDSEcgICAgICAgMHg0MCAgICAvKiBDRCBDaGFuZ2VkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgTUNSX0NUU0NIRyAgICAgIDB4MjAgICAgLyogQ1RTIENoYW5nZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0KLQotLyogTW9kZW0gU2lnbmFsIFZhbHVlIFJlZ2lzdGVyIChSL1cpICovCi0KLSNkZWZpbmUgTVNWUl9EU1IgICAgICAgIDB4ODAgICAgLyogQ3VycmVudCBzdGF0ZSBvZiBEU1IgaW5wdXQgICAgICAgICAgICAgICovCi0jZGVmaW5lIE1TVlJfQ0QgICAgICAgICAweDQwICAgIC8qIEN1cnJlbnQgc3RhdGUgb2YgQ0QgaW5wdXQgICAgICAgICAgICAgICAqLwotI2RlZmluZSBNU1ZSX0NUUyAgICAgICAgMHgyMCAgICAvKiBDdXJyZW50IHN0YXRlIG9mIENUUyBpbnB1dCAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgTVNWUl9EVFIgICAgICAgIDB4MDIgICAgLyogQ3VycmVudCBzdGF0ZSBvZiBEVFIgb3V0cHV0ICAgICAgICAgICAgICovCi0jZGVmaW5lIE1TVlJfUlRTICAgICAgICAweDAxICAgIC8qIEN1cnJlbnQgc3RhdGUgb2YgUlRTIG91dHB1dCAgICAgICAgICAgICAqLwotCi0KLS8qIFNlcnZpY2UgUmVxdWVzdCBTdGF0dXMgUmVnaXN0ZXIgKi8KLQotI2RlZmluZSBTUlNSX0NNQVNLCTB4QzAJLyogQ3VycmVudCBTZXJ2aWNlIENvbnRleHQgTWFzayAgICAgICAgICAgICovC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wkvKiBlbmFibGUgQ1JUIHRpbWluZyAqLworCWNvbnRyb2wgfD0gU001MDFfRENfQ1JUX0NPTlRST0xfRU5BQkxFOwkvKiBlbmFibGUgQ1JUIHBsYW5lICovCisKKyBvdXRfdXBkYXRlOgorCWRldl9kYmcoZmJpLT5kZXYsICJuZXcgY29udHJvbCBpcyAlMDhseFxuIiwgY29udHJvbCk7CisKKwl3cml0ZWwoY29udHJvbCwgZmJpLT5yZWdzICsgU001MDFfRENfQ1JUX0NPTlRST0wpOworCXNtNTAxZmJfc3luY19yZWdzKGZiaSk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHZvaWQgc201MDFmYl9wYW5lbF9wb3dlcihzdHJ1Y3Qgc201MDFmYl9pbmZvICpmYmksIGludCB0bykKK3sKKwl1bnNpZ25lZCBsb25nIGNvbnRyb2w7CisJdm9pZCBfX2lvbWVtICpjdHJsX3JlZyA9IGZiaS0+cmVncyArIFNNNTAxX0RDX1BBTkVMX0NPTlRST0w7CisKKwljb250cm9sID0gcmVhZGwoY3RybF9yZWcpOworCisJaWYgKHRvICYmIChjb250cm9sICYgU001MDFfRENfUEFORUxfQ09OVFJPTF9WREQpID09IDApIHsKKwkJLyogZW5hYmxlIHBhbmVsIHBvd2VyICovCisKKwkJY29udHJvbCB8PSBTTTUwMV9EQ19QQU5FTF9DT05UUk9MX1ZERDsJLyogRlBWRERFTiAqLworCQl3cml0ZWwoY29udHJvbCwgY3RybF9yZWcpOworCQlzbTUwMWZiX3N5bmNfcmVncyhmYmkpOworCQltZGVsYXkoMTApOworCisJCWNvbnRyb2wgfD0gU001MDFfRENfUEFORUxfQ09OVFJPTF9EQVRBOwkvKiBEQVRBICovCisJCXdyaXRlbChjb250cm9sLCBjdHJsX3JlZyk7CisJCXNtNTAxZmJfc3luY19yZWdzKGZiaSk7CisJCW1kZWxheSgxMCk7CisKKwkJY29udHJvbCB8PSBTTTUwMV9EQ19QQU5FTF9DT05UUk9MX0JJQVM7CS8qIFZCSUFT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0aW9uIF9fZXhfdGFibGUsXCJhd1wiXG4iICAgICAgICBcCi0JCSJcdC53b3JkXHQxYixmaXh1cF9nZXRfdXNlcl9za2lwXzFcbiIJXAotCQkiXHQucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgICAJXAotCQk6ICI9ciIoX19ndV92YWwpLCAiPXIiKF9fZ3VfZXJyKSAgICAgICAgXAotCQk6ICJyIihwdHIpLCAiMSIoX19ndV9lcnIpCQlcCi0JCTogInIxIik7Ci0KLSNkZWZpbmUgX19nZXRfdXNlcl9hc20obGR4LHB0cikgICAgICAgICAgICAgICAgICAgICAgICAgXAotCV9fYXNtX18oIlxuMTpcdCIgbGR4ICJcdDAoJSVzcjMsJTIpLCUwXG4iICAgICAgIFwKLQkJIlx0LnNlY3Rpb24gX19leF90YWJsZSxcImF3XCJcbiIJXAotCQkgIlx0LndvcmRcdDFiLGZpeHVwX2dldF91c2VyX3NraXBfMVxuIglcCi0JCSAiXHQucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogIj1yIihfX2d1X3ZhbCksICI9ciIoX19ndV9lcnIpICAgICAgICBcCi0JCTogInIiKHB0ciksICIxIihfX2d1X2VycikJCVwKLQkJOiAicjEiKTsKLSNlbmRpZiAvKiAhX19MUDY0X18gKi8KIAogI2RlZmluZSBfX3B1dF91c2VyKHgscHRyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICh7CQkJCQkJCQlcCkBAIC0xNzksODAgKzE2MSw1NCBAQAogICogcjgvcjkgYXJlIGFscmVhZHkgbGlzdGVkIGFzIGVyci92YWwuCiAgKi8KIAotI2lmZGVmIF9fTFA2NF9fCiAjZGVmaW5lIF9fcHV0X2tlcm5lbF9hc20oc3R4LHgscHRyKSAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJIlxuMTpcdCIgc3R4ICJcdCUyLDAoJTEpXG4iICAgICAgICAgICAgICAgICBcCi0JCSJcdC5zZWN0aW9uIF9fZXhfdGFibGUsXCJhd1wiXG4iICAgICAgICAgICAgXAotCQkiXHQuZHdvcmRcdDFiLGZpeHVwX3B1dF91c2VyX3NraXBfMVxuIgkgICAgXAotCQkiXHQucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJIlxuMTpcdCIgc3R4ICJcdCUyLDAoJTEpXG5cdCIJCSAgICBcCisJCUFTTV9FWENFUFRJT05UQUJMRV9FTlRSWSgxYixmaXh1cF9wdXRfdXNlcl9za2lwXzEpXAogCQk6ICI9ciIoX19wdV9lcnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiciIocHRyKSwgInIiKHgpLCAiMCIoX19wdV9lcnIpCSAgICBcCiAJICAgIAk6ICJyMSIpCiAKICNkZWZpbmUgX19wdXRfdXNlcl9hc20oc3R4LHgscHRyKSAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkiXG4xOlx0IiBzdHggIlx0JTIsMCglJXNyMywlMSlcbiIgICAgICAgICAgIFwKLQkJIlx0LnNlY3Rpb24gX19leF90YWJsZSxcImF3XCJcbiIgICAgICAgICAgICBcCi0JCSAiXHQuZHdvcmRcdDFiLGZpeHVwX3B1dF91c2VyX3NraXBfMVxuIgkgICAgXAotCQkgIlx0LnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJOiAiPXIiKF9fcHVfZXJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogInIiKHB0ciksICJyIih4KSwgIjAiKF9fcHVfZXJyKQkgICAgXAotCQk6ICJyMSIpCi0jZWxzZQotI2RlZmluZSBfX3B1dF9rZXJuZWxfYXNtKHN0eCx4LHB0cikgICAgICAgICAgICAgICAgICAgICAgICAgXAotCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCSJcbjE6XHQiIHN0eCAiXHQlMiwwKCUxKVxuIiAgICAgICAgICAgICAgICAgXAotCQkiXHQuc2VjdGlvbiBfX2V4X3RhYmxlLFwiYXdcIlxuIiAgICAgICAgICAgIFwKLQkJICJcdC53b3JkXHQxYixmaXh1cF9wdXRfdXNlcl9za2lwXzFcbiIJICAgIFwKLQkJICJcdC5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCSJcbjE6XHQiIHN0eCAiXHQlMiwwKCUlc3IzLCUxKVxuXHQiCSAgICBcCisJCUFTTV9FWENFUFRJT05UQUJMRV9FTlRSWSgxYixmaXh1cF9wdXRfdXNlcl9za2lwXzEpXAogCQk6ICI9ciIoX19wdV9lcnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiciIocHRyKSwgInIiKHgpLCAiMCIoX19wdV9lcnIpCSAgICBcCiAJCTogInIxIikKIAotI2RlZmluZSBfX3B1dF91c2VyX2FzbShzdHgseCxwdHIpICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCSJcbjE6XHQiIHN0eCAiXHQlMiwwKCUlc3IzLCUxKVxuIiAgICAgICAgICAgXAotCQkiXHQuc2VjdGlvbiBfX2V4X3RhYmxlLFwiYXdcIlxuIiAgICAgICAgICAgIFwKLQkJICJcdC53b3JkXHQxYixmaXh1cF9wdXRfdXNlcl9za2lwXzFcbiIgICAgICBcCi0JCSAiXHQucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQk6ICI9ciIoX19wdV9lcnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJOiAiciIocHRyKSwgInIiKHgpLCAiMCIoX19wdV9lcnIpCSAgICBc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