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UsIHNlZSB0aGUgQ09QWUlORy5tZCBmaWxlIGZvciBtb3JlIGluZm9ybWF0aW9uCi0KLWZyb20gd2FmbGliIGltcG9ydCBMb2dzLCBDb25maWd1cmUKLQotZGVmIG9wdGlvbnMob3B0KToKLSAgICBvcHQuYWRkX29wdGlvbignLS1kZWJ1ZycsICctLXdpdGgtZGVidWcnLCBhY3Rpb249J3N0b3JlX3RydWUnLCBkZWZhdWx0PUZhbHNlLCBkZXN0PSdkZWJ1ZycsCi0gICAgICAgICAgICAgICAgICAgaGVscD0nJydDb21waWxlIGluIGRlYnVnZ2luZyBtb2RlIHdpdGhvdXQgb3B0aW1pemF0aW9ucyAoLU8wIG9yIC1PZyknJycpCi0KLWRlZiBjb25maWd1cmUoY29uZik6Ci0gICAgYXJlQ3VzdG9tQ3h4ZmxhZ3NQcmVzZW50ID0gKGxlbihjb25mLmVudi5DWFhGTEFHUykgPiAwKQotICAgIGRlZmF1bHRGbGFncyA9IFsnLXN0ZD1jKysweCcsICctc3RkPWMrKzExJywKLSAgICAgICAgICAgICAgICAgICAgJy1zdGRsaWI9bGliYysrJywgICAjIGNsYW5nIG9uIE9TWCA8IDEwLjkgYnkgZGVmYXVsdCB1c2VzIGdjYydzCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBsaWJzdGRjKyssIHdoaWNoIGlzIG5vdCBDKysxMSBjb21wYXRpYmxlCi0gICAgICAgICAgICAgICAgICAgICctcGVkYW50aWMnLCAnLVdhbGwnXQotCi0gICAgaWYgY29uZi5vcHRpb25zLmRlYnVnOgotICAgICAgICBjb25mLmRlZmluZSgnX0RFQlVHJywgMSkKLSAgICAgICAgZGVmYXVsdEZsYWdzICs9IFsnLU8wJywKLSAgICAgICAgICAgICAgICAgICAgICAgICAnLU9nJywgIyBnY2MgPj0gNC44Ci0gICAgICAgICAgICAgICAgICAgICAgICAgJy1nMycsCi0gICAgICAgICAgICAgICAgICAgICAgICAgJy1mY29sb3ItZGlhZ25vc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gICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyOjpvblJlc29sdmVFcnJvciwgdGhpcywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJUaW1lb3V0Iiwgc2VsZikpOwotICB9Ci0KLSAgdm9pZAotICBvblJlc29sdmVTdWNjZXNzKGNvbnN0IGJvb3N0OjpzeXN0ZW06OmVycm9yX2NvZGUmIGVycm9yLAotICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lIHJlc29sdmVyOjppdGVyYXRvciByZW1vdGVFbmRwb2ludCwKLSAgICAgICAgICAgICAgICAgICBjb25zdCBzaGFyZWRfcHRyPFJlc29sdmVyPiYgc2VsZikKLSAgewotICAgIHNjaGVkdWxlcjo6Y2FuY2VsKG1fcmVzb2x2ZVRpbWVvdXQpOwotCi0gICAgaWYgKGVycm9yKQotICAgICAgewotICAgICAgICBpZiAoZXJyb3IgPT0gYm9vc3Q6OnN5c3RlbTo6ZXJyYzo6b3BlcmF0aW9uX2NhbmNlbGVkKQotICAgICAgICAgIHJldHVybjsKLQotICAgICAgICByZXR1cm4gbV9vbkVycm9yKCJSZW1vdGUgZW5kcG9pbnQgaG9zdG5hbWUgb3IgcG9ydCBjYW5ub3QgYmUgcmVzb2x2ZWQ6ICIgKwotICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhdGVnb3J5KCkubWVzc2FnZShlcnJvci52YWx1ZSgpKSk7Ci0gICAgICB9Ci0KLSAgICB0eXBlbmFtZSByZXNvbHZlcjo6aXRlcmF0b3IgZW5kOwotICAgIGZvciAoOyByZW1vdGVFbmRwb2ludCAhPSBlbmQ7ICsrcmVtb3RlRW5kcG9pbnQpCi0gICAgICB7Ci0gICAgICAgIGlmIChtX2FkZHJlc3NTZWxlY3Rvcih0eXBlbmFtZSBQcm90b2NvbDo6ZW5kcG9pbnQoKnJlbW90ZUVuZHBvaW50KS5hZGRyZXNzKCkpKQotICAgICAgICAgIHJldHVybiBtX29u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lLCB0aGlzLCBfMSwgXzIpKTsKLX0KLQotdGVtcGxhdGU8Y2xhc3MgVCwgY2xhc3MgVT4KLWlubGluZSB2b2lkCi1EYXRhZ3JhbUZhY2U8VCwgVT46OnJlY2VpdmVEYXRhZ3JhbShjb25zdCB1aW50OF90KiBidWZmZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplX3QgbkJ5dGVzUmVjZWl2ZWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBib29zdDo6c3lzdGVtOjplcnJvcl9jb2RlJiBlcnJvcikKLXsKLSAgaWYgKGVycm9yICE9IDAgfHwgbkJ5dGVzUmVjZWl2ZWQgPT0gMCkgewotICAgIGlmIChlcnJvciA9PSBib29zdDo6c3lzdGVtOjplcnJjOjpvcGVyYXRpb25fY2FuY2VsZWQpIC8vIHdoZW4gc29ja2V0IGlzIGNsb3NlZCBieSBzb21lb25lCi0gICAgICByZXR1cm47Ci0KLSAgICAvLyB0aGlzIHNob3VsZCBiZSB1bm5lY2Vzc2FyeSwgYnV0IGp1c3QgaW4gY2FzZQotICAgIGlmICghbV9zb2NrZXQtPmlzX29wZW4oKSkgewotICAgICAgZmFpbCgiVHVubmVsIGNsb3NlZCIpOwotICAgICAgcmV0dXJuOwotICAgIH0KLQotICAgIE5GRF9MT0dfV0FSTigiW2lkOiIgPDwgdGhpcy0+Z2V0SWQoKQotICAgICAgICAgICAgICAgICA8PCAiLHVyaToiIDw8IHRoaXMtPmdldFJlbW90ZVVyaSgpCi0gICAgICAgICAgICAgICAgIDw8ICJdIFJlY2VpdmUgb3BlcmF0aW9uIGZhaWxlZDogIgotICAgICAgICAgICAgICAgICA8PCBlcnJvci5jYXRlZ29yeSgpLm1lc3NhZ2UoZXJyb3IudmFsdWUoKSkpOwotCi0gICAgY2xvc2VTb2NrZXQoKTsKLQotICAgIGlmIChlcnJvciA9PSBib29zdDo6YXNpbzo6ZXJyb3I6OmVvZikgewotICAgIC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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hhcmVkX3B0cjxNdWx0aWNhc3RVZHBGYWNlOjpwcm90b2NvbDo6c29ja2V0PiYgc2VuZFNvY2tldCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgTXVsdGljYXN0VWRwRmFjZTo6cHJvdG9jb2w6OmVuZHBvaW50JiBsb2NhbEVuZHBvaW50LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBNdWx0aWNhc3RVZHBGYWNlOjpwcm90b2NvbDo6ZW5kcG9pbnQmIG11bHRpY2FzdEVuZHBvaW50KQotICA6IERhdGFncmFtRmFjZTxwcm90b2NvbCwgTXVsdGljYXN0PihGYWNlVXJpKG11bHRpY2FzdEVuZHBvaW50KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmFjZVVyaShsb2NhbEVuZHBvaW50KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdlNvY2tldCwgZmFsc2UpCi0gICwgbV9tdWx0aWNhc3RHcm91cChtdWx0aWNhc3RFbmRwb2ludCkKLSAgLCBtX3NlbmRTb2NrZXQoc2VuZFNvY2tldCkKLXsKLSAgTkZEX0xPR19JTkZPKCJDcmVhdGluZyBtdWx0aWNhc3QgVURQIGZhY2UgZm9yIGdyb3VwICIgPDwgbV9tdWx0aWNhc3RHcm91cCk7Ci19Ci0KLWNvbnN0IE11bHRpY2FzdFVkcEZhY2U6OnByb3RvY29sOjplbmRwb2ludCYKLU11bHRpY2FzdFVkcEZhY2U6OmdldE11bHRpY2FzdEdyb3VwKCkgY29uc3QKLXsKLSAgcmV0dXJuIG1fbXVsdGljYXN0R3JvdXA7Ci19Ci0KLXZvaWQKLU11bHRpY2FzdFVkcEZhY2U6OnNlbmRCbG9jayhjb25zdCBCbG9jayYgYmxvY2spCi17Ci0gIG1fc2VuZFNvY2tldC0+YXN5bmNfc2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N0aW1hdG9yOwotICBzaXplX3QgZXN0aW1hdGVkU2l6ZSA9IHRoaXMtPmVuY29kZUZyYWdtZW50KGVzdGltYXRvciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6Om51bWVyaWNfbGltaXRzPHVpbnQ2NF90Pjo6bWF4KCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjpudW1lcmljX2xpbWl0czx1aW50MTZfdD46Om1heCgpIC0gMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6Om51bWVyaWNfbGltaXRzPHVpbnQxNl90Pjo6bWF4KCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbHB0ciwgbV9tdHUpOwotCi0gIHNpemVfdCBvdmVyaGVhZCA9IGVzdGltYXRlZFNpemUgLSBtX210dTsgLy8gbWludXMgcGF5bG9hZCBsZW5ndGggaW4gZXN0aW1hdGlvbgotICBtX21heFBheWxvYWQgPSBtX210dSAtIG92ZXJoZWFkOwotfQotCi1QYWNrZXRBcnJheQotU2xpY2VyOjpzbGljZShjb25zdCBCbG9jayYgYmxvY2spCi17Ci0gIEJPT1NUX0FTU0VSVChibG9jay5oYXNXaXJlKCkpOwotICBjb25zdCB1aW50OF90KiBuZXR3b3JrUGFja2V0ID0gYmxvY2sud2lyZSgpOwotICBzaXplX3QgbmV0d29ya1BhY2tldFNpemUgPSBibG9jay5zaXplKCk7Ci0KLSAgdWludDE2X3QgZnJhZ0NvdW50ID0gc3RhdGljX2Nhc3Q8dWludDE2X3Q+KAotICAgICAgICAgICAgICAgICAgICAgICAgIChuZXR3b3JrUGFja2V0U2l6ZSAvIG1fbWF4UGF5bG9hZCkgKwotICAgICAgICAgICAgICAgICAgICAgICAgIChuZXR3b3JrUGFja2V0U2l6ZSAlIG1fbWF4UGF5bG9hZCA9PSAwID8gMCA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faW5wdXRCdWZmZXJTaXplIC0gb2Zmc2V0LCBlbGVtZW50KTsKLSAgICAgIGlmICghaXNPaykKLSAgICAgICAgYnJlYWs7Ci0KLSAgICAgIG9mZnNldCArPSBlbGVtZW50LnNpemUoKTsKLQotICAgICAgQk9PU1RfQVNTRVJUKG9mZnNldCA8PSBtX2lucHV0QnVmZmVyU2l6ZSk7Ci0KLSAgICAgIGlmICghdGhpcy0+ZGVjb2RlQW5kRGlzcGF0Y2hJbnB1dChlbGVtZW50KSkKLSAgICAgICAgewotICAgICAgICAgIE5GRF9MT0dfV0FSTigiW2lkOiIgPDwgdGhpcy0+Z2V0SWQoKQotICAgICAgICAgICAgICAgICAgICAgICA8PCAiLHVyaToiIDw8IHRoaXMtPmdldFJlbW90ZVVyaSgpCi0gICAgICAgICAgICAgICAgICAgICAgIDw8ICJdIFJlY2VpdmVkIHVucmVjb2duaXplZCBibG9jayBvZiB0eXBlIFsiCi0gICAgICAgICAgICAgICAgICAgICAgIDw8IGVsZW1lbnQudHlwZSgpIDw8ICJdIik7Ci0gICAgICAgICAgLy8gaWdub3JlIHVua25vd24gcGFja2V0IGFuZCBwcm9jZWVkCi0gICAgICAgIH0KLSAgICB9Ci0gIGlmICghaXNPayAmJiBtX2lucHV0QnVmZmVyU2l6ZSA9PSBuZG46Ok1BWF9ORE5fUEFDS0VUX1NJWkUgJiYgb2Zmc2V0ID09IDApCi0gICAgewotICAgICAgTkZEX0xPR19XQVJOKCJbaWQ6IiA8PCB0aGlzLT5nZXRJZCgpCi0gICAgICAgICAgICAgICAgICAgPDwgIix1cmk6IiA8PCB0aGlzLT5nZXRSZW1vdGVVcmkoKQotICAgICAgICAgICAgICAgICAgIDw8ICJdIEZhaWxlZCB0byBwYXJzZSBpbmNvbWluZyBwYWNrZXQgb3IgcGFja2V0IHRvbyBsYXJnZSB0byBwcm9jZXNzLCAiCi0gICAgICAgICAgICAgICAgICAgPDwgImNsb3NpbmcgZG93biB0aGUgZmFjZSIpOwotICAgICAgc2h1dGRvd25Tb2NrZXQoKTsKLSAgICAgIHRoaXMtPmZhaWwoIkZhaWxlZCB0byBwYXJzZSBpbmNvbWluZyBwYWNrZXQgb3IgcGFja2V0IHRvbyBsYXJnZSB0byBwcm9jZXNzLCAiCi0gICAgICAgICAgICAgICAgICJjbG9zaW5nIGRvd24gdGhlIGZhY2UiKTsKLSAgICAgIHJldHVybjsKLSAgICB9Ci0KLSAgaWYgKG9mZnNldCA+IDApCi0gICAgewotICAgICAgaWYgKG9mZnNldCAhPSBtX2lucHV0QnVmZmVyU2l6ZSkKLSAgICAgICAgewotICAgICAgICAgIHN0ZDo6Y29weShtX2lucHV0QnVmZmVyICsgb2Zmc2V0LCBtX2lucHV0QnVmZmVyICsgbV9pbnB1dEJ1ZmZlclNpemUsCi0gICAgICAgICAgICAgICAgICAgIG1faW5wdXRCdWZmZXIpOwotICAgICAgICAgIG1faW5wdXRCdWZmZXJTaXplIC09IG9mZnNldDsKLSAgICAgICAgfQotICAgICAgZWxzZQotICAgICAgICB7Ci0gICAgICAgICAgbV9pbnB1dEJ1ZmZlclNpemUgPSAwOwotICAgICAgICB9Ci0gICAgfQotCi0gIG1fc29ja2V0LT5hc3luY19yZWNlaXZlKGJvb3N0Ojphc2lvOjpidWZmZXIobV9pbnB1dEJ1ZmZlciArIG1faW5wdXRCdWZmZXJTaXplLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6TUFYX05ETl9QQUNLRVRfU0laRSAtIG1faW5wdXRCdWZmZXJTaXplKSwgMCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmU3RyZWFtRmFjZTxULCBVPjo6aGFuZGxlUmVjZWl2ZSwgdGhpcywgXzEsIF8yKSk7Ci19Ci0KLXRlbXBsYXRlPGNsYXNzIFQsIGNsYXNzIFU+Ci1pbmxpbmUgdm9pZAotU3RyZWFtRmFjZTxULCBVPjo6c2h1dGRvd25Tb2NrZXQoKQotewotICAvLyBDYW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9uQ29ubmVjdEZhaWxlZCwKLSAgICAgICAgICAgICAgICAgICAgY29uc3QgdGltZTo6c2Vjb25kcyYgdGltZW91dC8qID0gdGltZTo6c2Vjb25kcyg0KSovKQotewotICBDaGFubmVsRmFjZU1hcDo6aXRlcmF0b3IgaSA9IG1fY2hhbm5lbEZhY2VzLmZpbmQocmVtb3RlRW5kcG9pbnQpOwotICBpZiAoaSAhPSBtX2NoYW5uZWxGYWNlcy5lbmQoKSkgewotICAgIG9uRmFjZUNyZWF0ZWQoaS0+c2Vjb25kKTsKLSAgICByZXR1cm47Ci0gIH0KLQotICBzaGFyZWRfcHRyPGlwOjp0Y3A6OnNvY2tldD4gY2xpZW50U29ja2V0ID0KLSAgICBtYWtlX3NoYXJlZDxpcDo6dGNwOjpzb2NrZXQ+KHJlZihnZXRHbG9iYWxJb1NlcnZpY2UoKSkpOwotCi0gIEV2ZW50SWQgY29ubmVjdFRpbWVvdXRFdmVudCA9IHNjaGVkdWxlcjo6c2NoZWR1bGUodGltZW91dCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZUY3BDaGFubmVsOjpoYW5kbGVGYWlsZWRDb25uZWN0LCB0aGlzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpZW50U29ja2V0LCBvbkNvbm5lY3RGYWlsZWQpKTsKLQotICBjbGllbnRTb2NrZXQtPmFzeW5jX2Nvbm5lY3QocmVtb3RlRW5kcG9pbnQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZUY3BDaGFubmVsOjpoYW5kbGVTdWNjZXNzZnVsQ29ubmVjdCwgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWVudFNvY2tldCwgY29ubmVjdFRpbWVvdXRFdmVudCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25GYWNlQ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AgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBFdmVudElkJiBjb25uZWN0VGltZW91dEV2ZW50LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmFjZUNyZWF0ZWRDYWxsYmFjayYgb25GYWNlQ3JlYXRlZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IENvbm5lY3RGYWlsZWRDYWxsYmFjayYgb25Db25uZWN0RmFpbGVkKQotewotICBzY2hlZHVsZXI6OmNhbmNlbChjb25uZWN0VGltZW91dEV2ZW50KTsKLQotI2lmIChCT09TVF9WRVJTSU9OID09IDEwNTQwMCkKLSAgLy8gVG8gaGFuZGxlIHJlZ3Jlc3Npb24gaW4gQm9vc3QgMS41NAotICAvLyBodHRwczovL3N2bi5ib29zdC5vcmcvdHJhYy9ib29zdC90aWNrZXQvODc5NQotICBib29zdDo6c3lzdGVtOjplcnJvcl9jb2RlIGFub3RoZXJFcnJvckNvZGU7Ci0gIHNvY2tldC0+cmVtb3RlX2VuZHBvaW50KGFub3RoZXJFcnJvckNvZGUpOwotICBpZiAoZXJyb3IgfHwgYW5vdGhlckVycm9yQ29kZSkgewotI2Vsc2UKLSAgaWYgKGVycm9yKSB7Ci0jZW5kaWYKLQotICAgIGlmIChlcnJvciA9PSBib29zdDo6c3lzdGVtOjplcnJjOjpvcGVyYXRpb25fY2FuY2VsZWQpIC8vIHdoZW4gc29ja2V0IGlzIGNsb3NlZCBieSBzb21lb25lCi0gICAgICByZXR1cm47Ci0KLSAgICBzb2NrZXQtPmNsb3NlKCk7Ci0KLSAgICBORkRfTE9HX0RFQlVHKCJDb25uZWN0IHRvIHJlbW90ZSBlbmRwb2ludCBmYWlsZWQ6ICIKLSAgICAgICAgICAgICAgICAgIDw8IGVycm9yLmNhdGVnb3J5KCkubWVzc2FnZShlcnJvci52YWx1ZSgpKSk7Ci0KLSAgICBvbkNvbm5lY3RGYWlsZWQoIkNvbm5lY3QgdG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I8Ym9vc3Q6OmFzaW86OmlwOjp0Y3A6OnNvY2tldD4mIHNvY2tldCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBFdmVudElkJiBjb25uZWN0VGltZW91dEV2ZW50LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IEZhY2VDcmVhdGVkQ2FsbGJhY2smIG9uRmFjZUNyZWF0ZWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQ29ubmVjdEZhaWxlZENhbGxiYWNrJiBvbkNvbm5lY3RGYWlsZWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hhcmVkX3B0cjxpcDo6dGNwOjpyZXNvbHZlcj4mIHJlc29sdmVyKQotewotICBpZiAoZXJyb3IgfHwKLSAgICAgIHJlbW90ZUVuZHBvaW50ID09IGlwOjp0Y3A6OnJlc29sdmVyOjppdGVyYXRvcigpKQotICAgIHsKLSAgICAgIGlmIChlcnJvciA9PSBib29zdDo6c3lzdGVtOjplcnJjOjpvcGVyYXRpb25fY2FuY2VsZWQpIC8vIHdoZW4gc29ja2V0IGlzIGNsb3NlZCBieSBzb21lb25lCi0gICAgICAgIHJldHVybjsKLQotICAgICAgc29ja2V0LT5jbG9zZSgpOwotICAgICAgc2NoZWR1bGVyOjpjYW5jZWwoY29ubmVjdFRpbWVvdXRFdmVudCk7Ci0KLSAgICAgIE5GRF9MT0dfREVCVUcoIlJlbW90ZSBlbmRwb2ludCBob3N0bmFtZSBvciBwb3J0IGNhbm5vdCBiZSByZXNvbHZlZDogIgotICAgICAgICAgICAgICAgICAgICA8PCBlcnJvci5jYXRlZ29yeSgpLm1lc3NhZ2UoZXJyb3IudmFsdWUoKSkpOwotCi0gICAgICBvbkNvbm5lY3RGYWlsZWQoIlJlbW90ZSBlbmRwb2ludCBob3N0bmFtZSBvciBwb3J0IGNhbm5vdCBiZSByZXNvbHZl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AgICAgICAgICAgICAgICAgVGNwTG9jYWxGYWNlOjpwcm90b2NvbCwgTG9jYWxGYWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlRjcExvY2FsRmFjZSIpOwotCi1UY3BGYWNlOjpUY3BGYWNlKGNvbnN0IHNoYXJlZF9wdHI8VGNwRmFjZTo6cHJvdG9jb2w6OnNvY2tldD4mIHNvY2tldCwgYm9vbCBpc09uRGVtYW5kKQotICA6IFN0cmVhbUZhY2U8cHJvdG9jb2w+KEZhY2VVcmkoc29ja2V0LT5yZW1vdGVfZW5kcG9pbnQoKSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgRmFjZVVyaShzb2NrZXQtPmxvY2FsX2VuZHBvaW50KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2tldCwgaXNPbkRlbWFuZCkKLXsKLX0KLQotVGNwTG9jYWxGYWNlOjpUY3BMb2NhbEZhY2UoY29uc3Qgc2hhcmVkX3B0cjxUY3BMb2NhbEZhY2U6OnByb3RvY29sOjpzb2NrZXQ+JiBzb2NrZXQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGlzT25EZW1hbmQpCi0gIDogU3RyZWFtRmFjZTxwcm90b2NvbCwgTG9jYWxGYWNlPihGYWNlVXJpKHNvY2tldC0+cmVtb3RlX2VuZHBvaW50KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmFjZVVyaShzb2NrZXQtPmxvY2FsX2VuZHBvaW50KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29ja2V0LCBpc09uRGVtYW5kKQotewotfQotCi19IC8vIG5hbWVzcGFjZSBuZmQKZGlmZiAtLWdpdCBhL05GRC9kYWVtb24vZmFjZS90Y3AtZmFjZS5ocHAgYi9ORkQvZGFlbW9uL2ZhY2UvdGNwLWZhY2UuaHBwCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleC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E9ICIvIikKLSAgICB7Ci0gICAgICBvbkNvbm5lY3RGYWlsZWQoIkludmFsaWQgVVJJIik7Ci0gICAgfQotCi0gIFRjcFJlc29sdmVyOjphc3luY1Jlc29sdmUodXJpLmdldEhvc3QoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmkuZ2V0UG9ydCgpLmVtcHR5KCkgPyBtX2RlZmF1bHRQb3J0IDogdXJpLmdldFBvcnQoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZUY3BGYWN0b3J5Ojpjb250aW51ZUNyZWF0ZUZhY2VBZnRlclJlc29sdmUsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DcmVhdGVkLCBvbkNvbm5lY3RGYWlsZWQpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ29ubmVjdEZhaWxlZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyZXNzU2VsZWN0b3IpOwotfQotCi12b2lkCi1UY3BGYWN0b3J5Ojpjb250aW51ZUNyZWF0ZUZhY2VBZnRlclJlc29sdmUoY29uc3QgdGNwOjpFbmRwb2ludCYgZW5kcG9pbnQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmFjZUNyZWF0ZWRDYWxsYmFjayYgb25DcmVhdGVkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IEZhY2VDb25uZWN0RmFpbGVkQ2FsbGJhY2smIG9uQ29ubmVjdEZhaWxlZCkKLXsKLSAgaWYgKG1fcHJvaGliaXRlZEVuZHBvaW50cy5maW5kKGVuZHBvaW50KSAhPSBtX3Byb2hpYml0ZWRFbmRwb2ludHMuZW5kKCkpCi0gICAgewotICAgICAgb25Db25uZWN0RmFpbGVkKCJSZXF1ZXN0ZWQgZW5kcG9pbnQgaXMgcHJvaGliaXRlZCAiCi0gICAgICAgICAgICAgIC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hc3RVZHBGYWNlPihyZWNlaXZlU29ja2V0LCBzZW5kU29ja2V0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWxFbmRwb2ludCwgbXVsdGljYXN0RW5kcG9pbnQpOwotICBtdWx0aWNhc3RGYWNlLT5vbkZhaWwgKz0gYmluZCgmVWRwRmFjdG9yeTo6YWZ0ZXJGYWNlRmFpbGVkLCB0aGlzLCBsb2NhbEVuZHBvaW50KTsKLQotICBtX211bHRpY2FzdEZhY2VzW2xvY2FsRW5kcG9pbnRdID0gbXVsdGljYXN0RmFjZTsKLQotICByZXR1cm4gbXVsdGljYXN0RmFjZTsKLX0KLQotc2hhcmVkX3B0cjxNdWx0aWNhc3RVZHBGYWNlPgotVWRwRmFjdG9yeTo6Y3JlYXRlTXVsdGljYXN0RmFjZShjb25zdCBzdGQ6OnN0cmluZyYgbG9jYWxJcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIG11bHRpY2FzdElwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgbXVsdGljYXN0UG9ydCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIG5ldHdvcmtJbnRlcmZhY2VOYW1lIC8qICIiICovKQotewotCi0gIHJldHVybiBjcmVhdGVNdWx0aWNhc3RGYWNlKFVkcFJlc29sdmVyOjpzeW5jUmVzb2x2ZShsb2NhbElwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGljYXN0UG9ydCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVkcFJlc29sdmVyOjpzeW5jUmVzb2x2ZShtdWx0aWNhc3RJcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG11bHRp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nZXRGYWNlVGFibGUoKSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtX2ludGVybmFsRmFjZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6cmVmKG1fa2V5Q2hhaW4pKTsKLQotICAgIG1fc3RyYXRlZ3lDaG9pY2VNYW5hZ2VyID0KLSAgICAgIG1ha2Vfc2hhcmVkPFN0cmF0ZWd5Q2hvaWNlTWFuYWdlcj4ocmVmKG1fZm9yd2FyZGVyLT5nZXRTdHJhdGVneUNob2ljZSgpKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbV9pbnRlcm5hbEZhY2UsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6cmVmKG1fa2V5Q2hhaW4pKTsKLQotICAgIG1fc3RhdHVzU2VydmVyID0gbWFrZV9zaGFyZWQ8U3RhdHVzU2VydmVyPihtX2ludGVybmFsRmFjZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmKCptX2ZvcndhcmRlciksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6cmVmKG1fa2V5Q2hhaW4pKTsKLQotICAgIENvbmZpZ0ZpbGUgY29uZmlnKChJZ25vcmVSaWJBbmRMb2dTZWN0aW9ucygpKSk7Ci0gICAgZ2VuZXJhbDo6c2V0Q29uZmlnRmlsZShjb25maWcpOwotCi0gICAgVGFibGVzQ29uZmlnU2VjdGlvbiB0YWJsZXNDb25maWcobV9mb3J3YXJkZXItPmdldENzKCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbV9mb3J3YXJkZXItPmdldFBpdCgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1fZm9yd2FyZGVyLT5nZXRGaWIoKSwKLSAgICAgICAgIC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LSAgcGFyc2VDb21tYW5kTGluZShpbnQgYXJnYywgY2hhcioqIGFyZ3YsIFByb2dyYW1PcHRpb25zJiBvcHRpb25zKQotICB7Ci0gICAgb3B0aW9ucy5zaG93VXNhZ2UgPSBmYWxzZTsKLSAgICBvcHRpb25zLnNob3dWZXJzaW9uID0gZmFsc2U7Ci0gICAgb3B0aW9ucy5zaG93TW9kdWxlcyA9IGZhbHNlOwotICAgIG9wdGlvbnMuY29uZmlnID0gREVGQVVMVF9DT05GSUdfRklMRTsKLQotICAgIHdoaWxlICh0cnVlKSB7Ci0gICAgICBpbnQgb3B0aW9uSW5kZXggPSAwOwotICAgICAgc3RhdGljIDo6b3B0aW9uIGxvbmdPcHRpb25zW10gPSB7Ci0gICAgICAgIHsgImhlbHAiICAgLCBub19hcmd1bWVudCAgICAgICwgMCwgMCB9LAotICAgICAgICB7ICJtb2R1bGVzIiwgbm9fYXJndW1lbnQgICAgICAsIDAsIDAgfSwKLSAgICAgICAgeyAiY29uZmlnIiAsIHJlcXVpcmVkX2FyZ3VtZW50LCAwLCAwIH0sCi0gICAgICAgIHsgInZlcnNpb24iLCBub19hcmd1bWVudCAgICAgICwgMCwgMCB9LAotICAgICAgICB7IDAgICAgICAgICwgMCAgICAgICAgICAgICAgICAsIDAsIDAgfQotICAgICAgfTsKLSAgICAgIGludCBjID0gZ2V0b3B0X2xvbmdfb25seShhcmdjLCBhcmd2LCAiIiwgbG9uZ09wdGlvbnMsICZvcHRpb25JbmRleCk7Ci0gICAgICBpZiAoYyA9PSAtMSkKLSAgICAgICAgYnJlYWs7Ci0KLSAgICAgIHN3aXRjaCAoYykgewotICAgICAgY2FzZSAwOgotICAgICAgICBzd2l0Y2ggKG9wdGlvbkluZGV4KSB7Ci0gICAgICAgIGNhc2UgMDogLy8gaGVscAotICAgICAgICAgIG9wdGlvbnMuc2hvd1VzYWdlID0gdHJ1ZTsKLSAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSAxOiAvLyBtb2R1bGVz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WQKLSAgcmVsb2FkKGNvbnN0IGJvb3N0OjpzeXN0ZW06OmVycm9yX2NvZGUmIGVycm9yLAotICAgICAgICAgaW50IHNpZ25hbE5vLAotICAgICAgICAgYm9vc3Q6OmFzaW86OnNpZ25hbF9zZXQmIHNpZ25hbFNldCkKLSAgewotICAgIGlmIChlcnJvcikKLSAgICAgIHJldHVybjsKLQotICAgIE5GRF9MT0dfSU5GTygiQ2F1Z2h0IHNpZ25hbCAnIiA8PCBzdHJzaWduYWwoc2lnbmFsTm8pKTsKLQotICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLwotICAgIC8vIFJlbG9hZCBjb25maWcgZmlsZSAvLwotICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLwotCi0gICAgLy8gTG9nZ2luZwotICAgIGluaXRpYWxpemVMb2dnaW5nKCk7Ci0gICAgLy8vIFx0b2RvIFJlb3BlbiBsb2cgZmlsZQotCi0gICAgLy8gT3RoZXIgc3R1ZmYKLSAgICBDb25maWdGaWxlIGNvbmZpZygoSWdub3JlUmliQW5kTG9nU2VjdGlvbnMoKSkpOwotCi0gICAgZ2VuZXJhbDo6c2V0Q29uZmlnRmlsZShjb25maWcpOwotCi0gICAgVGFibGVzQ29uZmlnU2VjdGlvbiB0YWJsZXNDb25maWcobV9mb3J3YXJkZXItPmdldENzKCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbV9mb3J3YXJkZXItPmdldFBpdCgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1fZm9yd2FyZGVyLT5nZXRGaWIoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtX2ZvcndhcmRlci0+Z2V0U3RyYXRlZ3lDaG9pY2UoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtX2ZvcndhcmRlci0+Z2V0TWVhc3VyZW1lbnRzKCkpOwotCi0gICAgdGFibGVzQ29uZmlnLnN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1cHg7Ci19Ci0KLXRhYmxlLmZpZWxkdGFibGUgewotICAgICAgICB3aWR0aDogMTAwJTsKLSAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsKLSAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI0I5QjlCOTsKLSAgICAgICAgYm9yZGVyLXNwYWNpbmc6IDBweDsKLSAgICAgICAgLW1vei1ib3JkZXItcmFkaXVzOiA0cHg7Ci0gICAgICAgIC13ZWJraXQtYm9yZGVyLXJhZGl1czogNHB4OwotICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7Ci0gICAgICAgIC1tb3otYm94LXNoYWRvdzogcmdiYSgwLCAwLCAwLCAwLjE1KSAycHggMnB4IDJweDsKLSAgICAgICAgLXdlYmtpdC1ib3gtc2hhZG93OiAycHggMnB4IDJweCByZ2JhKDAsIDAsIDAsIDAuMTUpOwotICAgICAgICBib3gtc2hhZG93OiAycHggMnB4IDJweCByZ2JhKDAsIDAsIDAsIDAuMTUpOwotfQotCi0uZmllbGR0YWJsZSB0ZCwgLmZpZWxkdGFibGUgdGggewotICAgICAgICBwYWRkaW5nOiAzcHggN3B4IDJweDsKLX0KLQotLmZpZWxkdGFibGUgdGQuZmllbGR0eXBlLCAuZmllbGR0YWJsZSB0ZC5maWVsZG5hbWUgewotICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwotICAgICAgICBib3JkZXItcmlnaHQ6IDFweCBzb2xpZCAjQjlCOUI5OwotICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgI0I5QjlCOTsKLSAgICAgICAgdmVydGljYWwtYWxpZ246IHRvcDsKLX0KLQotLmZpZWxkdGFibGUgdGQuZmllbGRkb2MgewotICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgI0I5QjlCOTsKLSAgICAgICAgd2lkdGg6IDEwMCU7Ci19Ci0KLS5maWVsZHRhYmxlIHRyOmxhc3QtY2hpbGQgdGQgewotICAgICAgICBib3JkZXItYm90dG9tOiBub25lO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dGVyCi0gIDsgICAgIHsKLSAgOyAgICAgICB0eXBlIG5hbWUgICAgICAgICAgICAgICAgICAgICAgICAgIDsgY29uZGl0aW9uIG9uIGludGVyZXN0IG5hbWUgKHcvbyBzaWduYXR1cmUpCi0gIDsgICAgICAgcmVnZXggXls8bG9jYWxob3A+PGxvY2FsaG9zdD5dPG5mZD48cmliPls8cmVnaXN0ZXI+PHVucmVnaXN0ZXI+XTw+JCA7IHByZWZpeCBiZWZvcmUKLSAgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDsgdGltZXN0YW1wCi0gIDsgICAgIH0KLSAgOyAgICAgY2hlY2tlcgotICA7ICAgICB7Ci0gIDsgICAgICAgdHlwZSBjdXN0b21pemVkCi0gIDsgICAgICAgc2lnLXR5cGUgcnNhLXNoYTI1NiAgICAgICAgICAgICAgICA7IGludGVyZXN0IG11c3QgaGF2ZSBhIHJzYS1zaGEyNTYgc2lnbmF0dXJlCi0gIDsgICAgICAga2V5LWxvY2F0b3IKLSAgOyAgICAgICB7Ci0gIDsgICAgICAgICB0eXBlIG5hbWUgICAgICAgICAgICAgICAgICAgICAgICA7IGtleSBsb2NhdG9yIG11c3QgYmUgdGhlIGNlcnRpZmljYXRlIG5hbWUgb2YgdGhlCi0gIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7IHNpZ25pbmcga2V5Ci0gIDsgICAgICAgICByZWdleCBeW148S0VZPl0qPEtFWT48Pio8a3NrLS4qPjxJRC1DRVJUPiQKLSAgOyAgICAgICB9Ci0gIDsgICAgIH0KLSAgOyAgIH0KLSAgOyAgIHJ1bGUKLSAgOyAgIHsKLSAgOyAgICAgaWQgIk5ETiBUZXN0YmVkIEhpZXJhcmNoeSBSdWxlIgotICA7ICAgICBmb3IgZGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOyBydWxlIGZvciBEYXRhICh0byB2YWx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W1lbnQgICAgICAsIDAsIDAgfSwKLSAgICAgICAgeyAwICAgICAgICAsIDAgICAgICAgICAgICAgICAgLCAwLCAwIH0KLSAgICAgIH07Ci0gICAgICBpbnQgYyA9IGdldG9wdF9sb25nX29ubHkoYXJnYywgYXJndiwgIiIsIGxvbmdPcHRpb25zLCAmb3B0aW9uSW5kZXgpOwotICAgICAgaWYgKGMgPT0gLTEpCi0gICAgICAgIGJyZWFrOwotCi0gICAgICBzd2l0Y2ggKGMpIHsKLSAgICAgIGNhc2UgMDoKLSAgICAgICAgc3dpdGNoIChvcHRpb25JbmRleCkgewotICAgICAgICBjYXNlIDA6IC8vIGhlbHAKLSAgICAgICAgICBvcHRpb25zLnNob3dVc2FnZSA9IHRydWU7Ci0gICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTogLy8gbW9kdWxlcwotICAgICAgICAgIG9wdGlvbnMuc2hvd01vZHVsZXMgPSB0cnVlOwotICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDI6IC8vIGNvbmZpZwotICAgICAgICAgIG9wdGlvbnMuY29uZmlnID0gOjpvcHRhcmc7Ci0gICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMzogLy8gdmVyc2lvbgotICAgICAgICAgIG9wdGlvbnMuc2hvd1ZlcnNpb24gPSB0cnVlOwotICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgfQotICAgICAgICBicmVhazsKLSAgICAgIH0KLSAgICB9Ci0gICAgcmV0dXJuIHRydWU7Ci0gIH0KLQotCi0gIHZvaWQKLSAgdGVybWluYXRlKGNvbnN0IGJvb3N0OjpzeXN0ZW06OmVycm9yX2NvZGUmIGVycm9yLAotICAgICAgICAgICAgaW50IHNpZ25hbE5vLAotICAgICAgICAgICAgYm9vc3Q6OmFzaW86OnNpZ25hbF9zZXQmIHNpZ25hbFNldCkKLSAgewotICAgIGlmIChlcn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nNlY29uZCA9IG1heExlbmd0aDsKLQotICByZXR1cm4gY2FuZGlkYXRlSWRlbnRpdHk7Ci19Ci0KLXZvaWQKLVJlbW90ZVJlZ2lzdHJhdG9yOjpzdGFydFJlZ2lzdHJhdGlvbihjb25zdCBDb250cm9sUGFyYW1ldGVycyYgcGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBDb21tYW5kT3B0aW9ucyYgb3B0aW9ucywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgblJldHJpZXMpCi17Ci0gIE5GRF9MT0dfSU5GTygic3RhcnQgcmVnaXN0ZXIgIiA8PCBwYXJhbWV0ZXJzLmdldE5hbWUoKSk7Ci0KLSAgbV9uZmRDb250cm9sbGVyLnN0YXJ0PG5kbjo6bmZkOjpSaWJSZWdpc3RlckNvbW1hbmQ+KAotICAgICBwYXJhbWV0ZXJzLAotICAgICBiaW5kKCZSZW1vdGVSZWdpc3RyYXRvcjo6b25SZWdTdWNjZXNzLAotICAgICAgICAgIHRoaXMsIHBhcmFtZXRlcnMsIG9wdGlvbnMpLAotICAgICBiaW5kKCZSZW1vdGVSZWdpc3RyYXRvcjo6b25SZWdGYWlsdXJlLAotICAgICAgICAgIHRoaXMsIF8xLCBfMiwgcGFyYW1ldGVycywgb3B0aW9ucywgblJldHJpZXMpLAotICAgICBvcHRpb25zKTsKLX0KLQotdm9pZAotUmVtb3RlUmVnaXN0cmF0b3I6OnN0YXJ0VW5yZWdpc3RyYXRpb24oY29uc3QgQ29udHJvbFBhcmFtZXRlcnMmIHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBDb21tYW5kT3B0aW9ucyYgb3B0aW9ucywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBuUmV0cmllcykKLXsKLSAgTkZEX0xPR19JTkZPKCJzdGFydCB1bnJlZ2lzdG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w8ICIpIik7Ci0KLSAgICAgIHNjaGVkdWxlcjo6Y2FuY2VsKGlSZWdFbnRyeS0+c2Vjb25kKTsKLSAgICAgIGlSZWdFbnRyeS0+c2Vjb25kID0gc2NoZWR1bGVyOjpzY2hlZHVsZSgKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBtX3JlZnJlc2hJbnRlcnZhbCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZW1vdGVSZWdpc3RyYXRvcjo6c3RhcnRSZWdpc3RyYXRpb24sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLCBwYXJhbWV0ZXJzLCBvcHRpb25zLCBtX25SZXRyaWVzKSk7Ci0gICAgfQotICBlbHNlCi0gICAgewotICAgICAgTkZEX0xPR19ERUJVRygiTmV3IEVudHJ5Iik7Ci0gICAgICBtX3JlZ0VudHJpZXMuaW5zZXJ0KFJlZ2lzdGVyZWRFbnRyeSgKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZ2V0TmFtZSgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NoZWR1bGVyOjpzY2hlZHVsZSgKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbV9yZWZyZXNoSW50ZXJ2YWwsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlbW90ZVJlZ2lzdHJhdG9yOjpzdGFydFJlZ2lzdHJhdGlvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLCBwYXJhbWV0ZXJzLCBvcHRpb25zLCBtX25SZXRyaWVzKSkpKTsKLSAgICB9Ci19Ci0KLXZvaWQKLVJlbW90ZVJlZ2lzdHJhdG9yOjpvblJlZ0ZhaWx1cmUodWludDMyX3QgY29kZSwgY29uc3Qgc3RkOjpzdHJpbmcmIHJlYXNvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQ29udHJvbFBhcmFtZXRlcnMmIHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IENvbW1hbmRPcHRpb25zJiBvcHRpb25zLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgblJldHJpZXMpCi17Ci0gIE5GRF9MT0dfSU5GTygiZmFpbCB0byByZWdpc3RlciAiIDw8IHBhcmFtZXRlcnMuZ2V0TmFtZSgpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICJcblx0IHJlYXNvbjoiIDw8IHJlYXNvbgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiXG5cdCByZW1haW4gcmV0cmllczoiIDw8IG5SZXRyaWVzKTsKLQotICBpZiAoblJldHJpZXMgPiAwKQotICAgIHsKLSAgICAgIHN0YXJ0UmVnaXN0cmF0aW9uKHBhcmFtZXRlcnMsIG9wdGlvbnMsIG5SZXRyaWVzIC0gMSk7Ci0gICAgfQotfQotCi12b2lkCi1SZW1vdGVSZWdpc3RyYXRvcjo6b25VbnJlZ1N1Y2Nlc3MoY29uc3QgQ29udHJvbFBhcmFtZXRlcnMmIHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQ29tbWFuZE9wdGlvbnMmIG9wdGlvbnMpCi17Ci0gIE5GRF9MT0dfSU5GTygic3VjY2VzcyB0byB1bnJlZ2lzdGVyICIgPDwgcGFyYW1ldGVycy5nZXROYW1lKCkpOwotfQotCi12b2lkCi1SZW1vdGVSZWdpc3RyYXRvcjo6b25VbnJlZ0ZhaWx1cmUodWludDMyX3QgY29kZSwgY29uc3Qgc3RkOjpzdHJpbmcmIHJlYXNvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBDb250cm9sUGFyYW1ldGVycyYgcGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBDb21tYW5kT3B0aW9ucyYgb3B0aW9ucywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgblJldHJpZXMpCi17Ci0gIE5GRF9MT0dfSU5GTygiZmFpbCB0byB1bnJlZ2lzdGVyICIgPDwgcGFyYW1ldGVycy5nZXROYW1lKCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiXG5cdCByZWFzb246IiA8PCByZWFzb24KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiXG5cdCByZW1haW4gcmV0cmllczoiIDw8IG5SZXRyaWVzKTsKLQotICBpZiAoblJldHJpZXMgPiAwKQotICAgIHsKLSAgICAgIHN0YXJ0VW5yZWdpc3RyYXRpb24ocGFyYW1ldGVycywgb3B0aW9ucywgblJldHJpZXMgLSAxKTsKLSAgICB9Ci19Ci0KLXZvaWQKLVJlbW90ZVJlZ2lzdHJhdG9yOjpyZWRvUmVnaXN0cmF0aW9uKCkKLXsKLSAgTkZEX0xPR19JTkZPKCJyZWRvICIgPDwgbV9yZWdFbnRyaWVzLnNpemUoKQotICAgICAgICAgICAgICAgICAgICAgICA8PCAiIHJlZ2lzdHJhdGlvbiB3aGVuIG5ldyBIdWIgY29ubmVjdGlvbiBpcyBidWlsdC4iKTsKLQotICBmb3IgKGF1dG8mJiBlbnRyeSA6IG1fcmVnRW50cmllcykKLSAgICB7Ci0gICAgICAvLyBtYWtlIGNvcGllcyB0byBhdm9pZCB1bnJlYXNvbmFibGUgb3ZlcndyaXRlLgotICAgICAgQ29udHJvbFBhcmFtZXRlcnMgcGFyYW1ldGVycyA9IG1fY29udHJvbFBhcmFtZXRlcnM7Ci0gICAgICBDb21tYW5kT3B0aW9ucyAgICBvcHRpb25zICAgID0gbV9jb21tYW5kT3B0aW9uczsKLSAgICAgIHN0YXJ0UmVnaXN0cmF0aW9uKHBhcmFtZXRlcnMuc2V0TmFtZShlbnRyeS5maXJzdCksCi0gICAg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ci0gIHsKLSAgICBTaWduZWRWZXJiQW5kUHJvY2Vzc29yKAotICAgICAgICAgICAgICAgICAgICAgICAgICAgTmFtZTo6Q29tcG9uZW50KCJyZWdpc3RlciIpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgJlJpYk1hbmFnZXI6OnJlZ2lzdGVyRW50cnkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICksCi0KLSAgICBTaWduZWRWZXJiQW5kUHJvY2Vzc29yKAotICAgICAgICAgICAgICAgICAgICAgICAgICAgTmFtZTo6Q29tcG9uZW50KCJ1bnJlZ2lzdGVyIiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAmUmliTWFuYWdlcjo6dW5yZWdpc3RlckVudHJ5Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICApLAotICB9OwotCi1jb25zdCBSaWJNYW5hZ2VyOjpVbnNpZ25lZFZlcmJBbmRQcm9jZXNzb3IgUmliTWFuYWdlcjo6VU5TSUdORURfQ09NTUFORF9WRVJCU1tdID0KLSAgewotICAgIFVuc2lnbmVkVmVyYkFuZFByb2Nlc3NvcigKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTmFtZTo6Q29tcG9uZW50KCJsaXN0IiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICZSaWJNYW5hZ2VyOjpsaXN0RW50cmllcwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLAotICB9OwotCi1jb25zdCBOYW1lIFJpYk1hbmFnZXI6OkxJU1RfQ09NTUFORF9QUkVGSVgoIi9sb2NhbGhvc3QvbmZkL3JpYi9saXN0Iik7Ci1jb25zdCBzaXplX3QgUmliTWFuYWdlcjo6TElTVF9DT01NQU5EX05DT01QUyA9IExJU1RfQ09NTUFORF9QUkVGSVguc2l6ZSgpOwotCi1jb25zdCB0aW1lOjpzZWNvbmRzIFJpYk1hbmFnZXI6OkFDVElWRV9GQUNFX0ZFVENIX0lOVEVSVkFMID0gdGltZTo6c2Vjb25kcygzMDApOwotCi1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LSAgICAgICAgICAgICAgLnNldEZhY2VJZChmYWNlRW50cnkuZmFjZUlkKQotICAgICAgICAgICAgICAuc2V0Q29zdChmYWNlRW50cnkuY29zdCksCi0gICAgICAgICAgICBiaW5kKCZSaWJNYW5hZ2VyOjpvbkFkZE5leHRIb3BTdWNjZXNzLCB0aGlzLCByZXF1ZXN0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRUcmFuc2FjdGlvbklkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkV2FpdFRvUmVzcG9uZCksCi0gICAgICAgICAgICBiaW5kKCZSaWJNYW5hZ2VyOjpvbkFkZE5leHRIb3BFcnJvciwgdGhpcywgXzEsIF8yLCByZXF1ZXN0LCBjdXJyZW50VHJhbnNhY3Rpb25JZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3VsZFdhaXRUb1Jlc3BvbmQpKTsKLSAgICAgICAgfQotICAgICAgZWxzZSBpZiAodXBkYXRlLT5hY3Rpb24gPT0gRmliVXBkYXRlOjpSRU1PVkVfTkVYVEhPUCkKLSAgICAgICAgewotICAgICAgICAgIEZhY2VFbnRyeSBmYWNlRW50cnk7Ci0gICAgICAgICAgZmFjZUVudHJ5LmZhY2VJZCA9IHVwZGF0ZS0+ZmFjZUlkOwotCi0gICAgICAgICAgbV9uZmRDb250cm9sbGVyLnN0YXJ0PG5kbjo6bmZkOjpGaWJSZW1vdmVOZXh0SG9wQ29tbWFuZD4oCi0gICAgICAgICAgICBDb250cm9sUGFyYW1ldGVycygpCi0gICAgICAgICAgICAgIC5zZXROYW1lKHVwZGF0ZS0+bmFtZSkKLSAgICAgICAgICAgICAgLnNldEZhY2VJZChmYWNlRW50cnkuZmFjZUlkKSwKLSAgICAgICAgICAgIGJpbmQoJlJpYk1hbmFnZXI6Om9uUmVtb3ZlTmV4dEhvcFN1Y2Nlc3MsIHRoaXMsIHJlcXVlc3QsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFRyYW5zYWN0aW9uSWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG91bGRXYWl0VG9SZXNwb25kKSwKLSAgICAgICAgICAgIGJpbmQoJlJpYk1hbmFnZXI6Om9uUmVtb3ZlTmV4dEhvcEVycm9yLCB0aGlzLCBfMSwgXzIsIHJlcXVlc3QsIGN1cnJlbnRUcmFuc2FjdGlvbklkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkV2FpdFRvUmVzcG9uZCkpOwotICAgICAgICB9Ci0gICAgfQotCi0gIG1fbWFuYWdlZFJpYi5jbGVhckZpYlVwZGF0ZXMoKTsKLX0KLQotdm9pZAotUmliTWFuYWdlcjo6c2VuZFVwZGF0ZXNUb0ZpYkFmdGVyRmFjZURlc3Ryb3lFdmVudCgpCi17Ci0gIENvbnRyb2xQYXJhbWV0ZXJzIHBhcmFtZXRlcnM7Ci0gIHBhcmFtZXRlcnMuc2V0T3JpZ2luKG5kbjo6bmZkOjpST1VURV9PUklHSU5fU1RBVElDKTsKLQotICBzZW5kVXBkYXRlc1RvRmliKHNoYXJlZF9wdHI8Y29uc3QgSW50ZXJlc3Q+KCksIHBhcmFtZXRlcnMpOwotfQotCi12b2lkCi1SaWJNYW5hZ2VyOjpsaXN0R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0KLSAgfQotfTsKLQotY2xhc3MgRHVtbXlPbmVTdWJzY3JpYmVyIDogcHVibGljIER1bW15U3Vic2NyaWJlcgotewotcHVibGljOgotICBEdW1teU9uZVN1YnNjcmliZXIoQ29uZmlnRmlsZSYgY29uZmlnLAotICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIHNlY3Rpb25OYW1lLAotICAgICAgICAgICAgICAgICAgICAgYm9vbCBleHBlY3REcnlSdW49ZmFsc2UpCi0gICAgOiBEdW1teVN1YnNjcmliZXIoY29uZmlnLAotICAgICAgICAgICAgICAgICAgICAgIChzZWN0aW9uTmFtZSA9PSAiYSIpLAotICAgICAgICAgICAgICAgICAgICAgIChzZWN0aW9uTmFtZSA9PSAiYiIpLAotICAgICAgICAgICAgICAgICAgICAgIGV4cGVjdERyeVJ1bikKLSAgewotICAgIGlmIChzZWN0aW9uTmFtZSA9PSAiYSIpCi0gICAgICB7Ci0gICAgICAgIGNvbmZpZy5hZGRTZWN0aW9uSGFuZGxlcihzZWN0aW9uTmFtZSwgYmluZCgmRHVtbXlTdWJzY3JpYmVyOjpvbkEsIHRoaXMsIF8xLCBfMikpOwotICAgICAgfQotICAgIGVsc2UgaWYgKHNlY3Rpb25OYW1lID09ICJiIikKLSAgICAgIHsKLSAgICAgICAgY29uZmlnLmFkZFNlY3Rpb25IYW5kbGVyKHNlY3Rpb25OYW1lLCBiaW5kKCZEdW1teVN1YnNjcmliZXI6Om9uQiwgdGhpcywgXzEsIF8yKSk7Ci0gICAgICB9Ci0gICAgZWxzZQotICAgICAgewotICAgICAgICBCT09TVF9GQUlMKCJUZXN0IHNldHVwIGVycm9yOiAiCi0gICAgICAgICAgICAgICAgICAgPDwgIlVuZXhwZWN0ZWQgc2VjdGlvbiBuYW1lICIKLSAgICAgICAgICAgICAgICAgICA8PCJcIiIgPDwgc2VjdGlvbk5hbWUgPDwgIlwiIik7Ci0gICAgICB9Ci0KLSAgfQotCi0gIHZpcnR1YWwKLSA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F8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGNwOjplbmRwb2ludChhZGRyZXNzX3Y0KCksIDgwKSwgdHJ1ZSwgZmFsc2UpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvbkZhaWx1cmUsIHRoaXMsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlcjo6SXB2NEFkZHJlc3MoKSk7IC8vIHJlcXVlc3QgSVB2NCBhZGRyZXNzCi0KLSAgVGNwUmVzb2x2ZXI6OmFzeW5jUmVzb2x2ZSgid3d3Lmdvb2dsZS5jb20iLCAiODAiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGNwOjplbmRwb2ludChhZGRyZXNzX3Y2KCksIDgwKSwgdHJ1ZSwgZmFsc2UpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvbkZhaWx1cmUsIHRoaXMsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlcjo6SXB2NkFkZHJlc3MoKSk7IC8vIHJlcXVlc3QgSVB2NiBhZGRyZXNzCi0KLSAgVGNwUmVzb2x2ZXI6OmFzeW5jUmVzb2x2ZSgiaXB2Ni5nb29nbGUuY29tIiwgIjgwIiwgLy8gb25seSBJUHY2IGFkZHJlc3Mgc2hvdWxkIGJlIGF2YWlsYWJsZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGNwOjplbmRwb2ludChh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0aGlzLCB0cnVlKSwgLy8gc2hvdWxkIGZhaWwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlcjo6SXB2NEFkZHJlc3MoKSk7Ci0KLSAgVGNwUmVzb2x2ZXI6OmFzeW5jUmVzb2x2ZSgiMTkyLjAuMi4xIiwgIjgwIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dGNwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRjcDo6ZW5kcG9pbnQoYWRkcmVzc192NDo6ZnJvbV9zdHJpbmcoIjE5Mi4wLjIuMSIpLCA4MCksIHRydWUsIHRydWUpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvbkZhaWx1cmUsIHRoaXMsIGZhbHNlKSk7Ci0KLSAgVGNwUmVzb2x2ZXI6OmFzeW5jUmVzb2x2ZSgiMjAwMTpkYjg6M2Y5OjA6MzAyNTpjY2M1OmVlZWI6ODZkMyIsICI4MCIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmUmVzb2x2ZXJGaXh0dXJlPHRjcD46Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Y3A6OmVuZHBvaW50KGFkZHJlc3NfdjY6OgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tX3N0cmluZygiMjAwMTpkYjg6M2Y5OjA6MzAyNTpjY2M1OmVlZWI6ODZkMyIpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4MCksIHRydWUsIHRydWUpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx0Y3A+OjpvbkZhaWx1cmUsIHRoaXMsI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mVzb2x2ZSgid3d3Lm5hbWVkLWRhdGEubmV0IiwgIm5vdHBvcnQiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx1ZHA+OjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWRwOjplbmRwb2ludChhZGRyZXNzX3Y0KCksIDApLCBmYWxzZSwgZmFsc2UpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx1ZHA+OjpvbkZhaWx1cmUsIHRoaXMsIHRydWUpKTsgLy8gc2hvdWxkIGZhaWwKLQotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoIm5vdGhvc3Qubm90aG9zdC5ub3Rob3N0LmFycGEiLCAiNjM2MyIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmUmVzb2x2ZXJGaXh0dXJlPHVkcD46Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZHA6OmVuZHBvaW50KGFkZHJlc3NfdjQoKSwgNjM2MyksIGZhbHNlLCBmYWxzZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmUmVzb2x2ZXJGaXh0dXJlPHVkcD46Om9uRmFpbHVyZSwgdGhpcywgdHJ1ZSkpOyAvLyBzaG91bGQgZmFpbAotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoInd3dy5nb29nbGUuY29tIiwgIjgwIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkcDo6ZW5kcG9pbnQoYWRkcmVzc192NCgpLCA4MCksIHRydWUsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZXI6OklwdjRBZGRyZXNzKCkpOyAvLyByZXF1ZXN0IElQdjQgYWRkcmVzcwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoInd3dy5nb29nbGUuY29tIiwgIjgwIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkcDo6ZW5kcG9pbnQoYWRkcmVzc192NigpLCA4MCksIHRydWUsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZXI6OklwdjZBZGRyZXNzKCkpOyAvLyByZXF1ZXN0IElQdjYgYWRkcmVzcwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoImlwdjYuZ29vZ2xlLmNvbSIsICI4MCIsIC8vIG9ubHkgSVB2NiBhZGRyZXNzIHNob3VsZCBiZSBhdmFpbGFibGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkcDo6ZW5kcG9pbnQoYWRkcmVzc192NigpLCA4MCksIHRydWUsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSkpOwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoImlwdjYuZ29vZ2xlLmNvbSIsICI4MCIsIC8vIG9ubHkgSVB2NiBhZGRyZXNzIHNob3VsZCBiZSBhdmFpbGFibGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkcDo6ZW5kcG9pbnQoYWRkcmVzc192NigpLCA4MCksIHRydWUsIGZhbHNlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZXI6OklwdjZBZGRyZXNzKCkpOwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoImlwdjYuZ29vZ2xlLmNvbSIsICI4MCIsIC8vIG9ubHkgSVB2NiBhZGRyZXNzIHNob3VsZCBiZSBhdmFpbGFibGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkcDo6ZW5kcG9pbnQoYWRkcmVzc192NigpLCA4MCksIGZhbHNlLCBmYWxzZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmUmVzb2x2ZXJGaXh0dXJlPHVkcD46Om9uRmFpbHVyZSwgdGhpcywgdHJ1ZSksIC8vIHNob3VsZCBmYWlsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZXI6OklwdjRBZGRyZXNzKCkpOwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoIjE5Mi4wLjIuMSIsICI4MCIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmUmVzb2x2ZXJGaXh0dXJlPHVkcD46Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZHA6OmVuZHBvaW50KGFkZHJlc3NfdjQ6OmZyb21fc3RyaW5nKCIxOTIuMC4yLjEiKSwgODApLCB0cnVlLCB0cnVlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSkpOwotCi0gIFVkcFJlc29sdmVyOjphc3luY1Jlc29sdmUoIjIwMDE6ZGI4OjNmOTowOjMwMjU6Y2NjNTplZWViOjg2ZDMiLCAiODAiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJlJlc29sdmVyRml4dHVyZTx1ZHA+OjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWRwOjplbmRwb2ludChhZGRyZXNzX3Y2OjoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbV9zdHJpbmcoIjIwMDE6ZGI4OjNmOTowOjMwMjU6Y2NjNTplZWViOjg2ZDMiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODApLCB0cnVlLCB0cnVlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZSZXNvbHZlckZpeHR1cmU8dWRwPjo6b25GYWlsdXJlLCB0aGlzLCBmYWxzZSkpOwotCi0gIGdfaW8ucnVuKCk7Ci0KLSAgQk9PU1RfQ0hFQ0tfRVFVQUwobV9uRmFpbHVyZXMsIDMpOwotICBCT09TVF9DSEVDS19FUVVBTChtX25TdWNjZXNzZXMsIDcpOwotfQotCi1CT09TVF9BVVRPX1RFU1R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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzAiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIFVkcEZhY3Rvcnk6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgaXNUaGVTYW1lVW5pY2FzdEVuZHBvaW50KTsKLQotCi0gIHNoYXJlZF9wdHI8TXVsdGljYXN0VWRwRmFjZT4gbXVsdGljYXN0RmFjZTEgPSBmYWN0b3J5LmNyZWF0ZU11bHRpY2FzdEZhY2UoaW50ZXJmYWNlSXAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIyNC4wLjAuMSIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIwMDcyIik7Ci0gIHNoYXJlZF9wdHI8TXVsdGljYXN0VWRwRmFjZT4gbXVsdGljYXN0RmFjZTFhID0gZmFjdG9yeS5jcmVhdGVNdWx0aWNhc3RGYWNlKGludGVyZmFjZUlwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIyMjQuMC4wLjEiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIyMDA3MiIpOwotICBCT09TVF9DSEVDS19FUVVBTChtdWx0aWNhc3RGYWNlMSwgbXVsdGljYXN0RmFjZTFhKTsKLQotCi0gIC8vc2FtZSBlbmRwb2ludCBvZiBhIG11bHRpY2FzdCBmYWNlCi0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihmYWN0b3J5LmNyZWF0ZUNoYW5uZWwoaW50ZXJmYWNlSXAsICIyMDA3MiIpLAotICAgICAgICAgICAgICAgICAgICAgICAgVWRwRmFjdG9yeTo6RXJyb3IsCi0gICAgICAgICAgICAgICAgICAgICAgICBpc1RoZVNhbWVNdWx0aWNhc3RFbmRwb2ludCk7Ci0KLSAgLy9zYW1lIG11bHRpY2FzdCBlbmRwb2ludCwgZGlmZmVyZW50IGdyb3VwCi0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihmYWN0b3J5LmNyZWF0ZU11bHRpY2FzdEZhY2UoaW50ZXJmYWNlSXAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIyNC4wLjAuNDIiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIyMDA3MiIpLAotICAgICAgICAgICAgICAgICAgICAgICAgVWRwRmFjdG9yeTo6RXJyb3IsCi0gICAgICAgICAgICAgICAgICAgICAgICBpc0xvY2FsRW5kcG9pbnRPbkRpZmZlcmVudEdyb3VwKTsKLQotICBCT09TVF9DSEVDS19FWENFUFRJT04oZmFjdG9yeS5jcmVhdGVNdWx0aWNhc3RGYWNlKGludGVyZmFjZUlwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIxOTIuMTY4LjEwLjE1IiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwMjUiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIFVkcEZhY3Rvcnk6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgaXNOb3RNdWx0aWNhc3RBZGRyZXNzKTsKLQotCi0vLyAgLy9UZXN0IGNvbW1lbnRlZCBiZWNhdXNlIGl0IHJlcXVpcmVkIHRvIGJlIHJ1biBpbiBhIG1hY2hpbmUgdGhhdCBjYW4gcmVzb2x2ZSBpcHY2IHF1ZXJ5Ci0vLyAgc2hhcmVkX3B0cjxVZHBDaGFubmVsPiBjaGFubmVsMXY2ID0gZmFjdG9yeS5jcmVhdGVDaGFubmVsKC8vIjo6MSIsCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImZlODA6OjVlOTY6OWRmZjpmZTdkOjljOGQlZW4xIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyJmZTgwOjphYTU0OmIyZmY6ZmUwODoyN2I4JXdsYW4wIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzAiKTsKLS8vCi0vLyAgLy90aGUgY3JlYXRpb24gb2YgbXVsdGljYXN0RmFjZTIgd29ya3MgcHJvcGVybHkuIEl0IGhhcyBiZWVuIGRpc2FibGUgYmVjYXVzZSBpdCBuZWVkcyBhbiBJUCBhZGRyZXNzIG9mCi0vLyAgLy9hbiBhdmFpbGFibGUgbmV0d29yayBpbnRlcmZhY2UgKGRpZmZlcmVudCBmcm9tIHRoZSBmaXJzdCBvbmUgdXNlZCkKLS8vICBzaGFyZWRfcHRyPE11bHRpY2FzdFVkcEZhY2U+IG11bHRpY2FzdEZhY2UyID0gZmFjdG9yeS5jcmVhdGVNdWx0aWNhc3RGYWNlKCIxOTIuMTY4LjEuMTciLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIyNC4wLjAuMSIsCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzMiKTsKLS8vICBCT09TVF9DSEVDS19ORShtdWx0aWNhc3RGYWNlMSwgbXVsdGljYXN0RmFjZTIpOwotLy8KLS8vCi0vLyAgLy9pcHY2IC0gd29yayBpbiBwcm9ncmVzcwotLy8gIHNoYXJlZF9wdHI8TXVsdGljYXN0VWRwRmFjZT4gbXVsdGljYXN0RmFjZTMgPSBmYWN0b3J5LmNyZWF0ZU11bHRpY2FzdEZhY2UoImZlODA6OjVlOTY6OWRmZjpmZTdkOjljOGQlZW4xIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGRjAxOjA6MDowOjA6MDowOjIiLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIwMDczIik7Ci0vLwotLy8gIHNoYXJlZF9wdHI8TXVsdGljYXN0VWRwRmFjZT4gbXVsdGljYXN0RmFjZTQgPSBmYWN0b3J5LmNyZWF0ZU11bHRpY2FzdEZhY2UoImZlODA6OmFhNTQ6YjJmZjpmZTA4OjI3Yjgld2xhbjAiLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkZGMDE6MDowOjA6MDowOjA6MiIsCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzMiKTsKLS8vCi0vLyAgQk9PU1RfQ0hFQ0tfRVFVQUwobXVsdGljYXN0RmFjZTMsIG11bHRpY2FzdEZhY2U0KTsKLS8vCi0vLyAgc2hhcmVkX3B0cjxNdWx0aWNhc3RVZHBGYWNlPiBtdWx0aWNhc3RGYWNlNSA9IGZhY3RvcnkuY3JlYXRlTXVsdGljYXN0RmFjZSgiOjoxIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGRjAxOjA6MDowOjA6MDowOjIiLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIwMDczIik7Ci0vLwotLy8gIEJPT1NUX0NIRUNLX05FKG11bHRpY2FzdEZhY2UzLCBtdWx0aWNhc3RGYWNlNSk7Ci0vLwotLy8gIC8vc2FtZSBsb2NhbCBpcHY2IGVuZHBvaW50IGZvciBhIGRpZmZlcmVudCBtdWx0aWNhc3QgZ3JvdXAKLS8vICBCT09TVF9DSEVDS19USFJPVyhmYWN0b3J5LmNyZWF0ZU11bHRpY2FzdEZhY2UoImZlODA6OmFhNTQ6YjJmZjpmZTA4OjI3Yjgld2xhbjAiLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRkUwMTowOjA6MDowOjA6MDoyIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjIwMDczIiksCi0vLyAgICAgICAgICAgICAgICAgICAgVWRwRmFjdG9yeTo6RXJyb3IpOwotLy8KLS8vICAvL3NhbWUgbG9jYWwgaXB2NiAoZXhwZWN0IGZvciB0aCBwb3J0IG51bWJlcikgZW5kcG9pbnQgZm9yIGEgZGlmZmVyZW50IG11bHRpY2FzdCBncm91cAotLy8gIEJPT1NUX0NIRUNLX1RIUk9XKGZhY3RvcnkuY3JlYXRlTXVsdGljYXN0RmFjZSgiZmU4MDo6YWE1NDpiMmZmOmZlMDg6MjdiOCV3bGFuMCIsCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGRTAxOjA6MDowOjA6MDowOjIiLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzUiKSwKLS8vICAgICAgICAgICAgICAgICAgICBVZHBGYWN0b3J5OjpFcnJvcik7Ci0vLwotLy8gIEJPT1NUX0NIRUNLX1RIUk9XKGZhY3RvcnkuY3JlYXRlTXVsdGljYXN0RmFjZSgiZmE4MDo6MjBhOjlkZmY6ZmVmNjoxMmZmIiwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFubmVsX29uRmFjZUNyZWF0ZWQsIHRoaXMsIF8xKSksCi0vLyAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNfY2FzdDxVZHBDaGFubmVsOjpDb25uZWN0RmFpbGVkQ2FsbGJhY2s+KGJpbmQoJkVuZFRvRW5kRml4dHVyZTo6Ci0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhbm5lbF9vbkNvbm5lY3RGYWlsZWQsIHRoaXMsIF8xKSkpKTsKLS8vCi0vLyAgbGltaXRlZElvUmVtYWluaW5nID0gMjsgLy8gMiBjb25uZWN0cwotLy8gIGFib3J0RXZlbnQgPQotLy8gIHNjaGVkdWxlci5zY2hlZHVsZUV2ZW50KHRpbWU6OnNlY29uZHMoNCksCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmRW5kVG9FbmRGaXh0dXJlOjphYm9ydFRlc3RDYXNlLCB0aGlzLAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlVkcENoYW5uZWwgZXJyb3I6IGNhbm5vdCBjb25uZWN0IG9yIGNhbm5vdCBhY2NlcHQgbXVsdGlwbGUgY29ubmVjdGlvbnMiKSk7Ci0vLwotLy8gIHNjaGVkdWxlci5zY2hlZHVsZUV2ZW50KHRpbWU6OnNlY29uZHMoMC40KSwKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZFbmRUb0VuZEZpeHR1cmU6OmNoZWNrRmFjZUxpc3QsIHRoaXMsIDIpKTsKLS8vCi0vLyAgZ19pby5ydW4oKTsKLS8vICBnX2lvLnJlc2V0KCk7Ci0vLwotLy8gIEJPT1NUX0NIRUNLX0VRVUFMKGZhY2VzLnNpemUoKSwgMyk7Ci0vLwotLy8KLS8vICBmYWNlMi0+c2VuZEludGVyZXN0KGludG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c2FnZSh3ZWJzb2NrZXRwcDo6Y29ubmVjdGlvbl9oZGwgaGRsLAotICAgICAgICAgICAgICAgICAgICB3ZWJzb2NrZXRwcDo6Y29uZmlnOjphc2lvX2NsaWVudDo6bWVzc2FnZV90eXBlOjpwdHIgbXNnKQotICB7Ci0gICAgYm9vbCBpc09rID0gdHJ1ZTsKLSAgICBCbG9jayBlbGVtZW50OwotICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBwYXlsb2FkID0gbXNnLT5nZXRfcGF5bG9hZCgpOwotICAgIGlzT2sgPSBCbG9jazo6ZnJvbUJ1ZmZlcihyZWludGVycHJldF9jYXN0PGNvbnN0IHVpbnQ4X3QqPihwYXlsb2FkLmNfc3RyKCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXlsb2FkLnNpemUoKSwgZWxlbWVudCk7Ci0gICAgaWYgKGlzT2spCi0gICAgICB7Ci0gICAgICAgIHRyeSB7Ci0gICAgICAgICAgaWYgKGVsZW1lbnQudHlwZSgpID09IHRsdjo6SW50ZXJlc3QpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgIHNoYXJlZF9wdHI8SW50ZXJlc3Q+IGkgPSBtYWtlX3NoYXJlZDxJbnRlcmVzdD4oKTsKLSAgICAgICAgICAgICAgaS0+d2lyZURlY29kZShlbGVtZW50KTsKLSAgICAgICAgICAgICAgY2xpZW50MV9vblJlY2VpdmVJbnRlcmVzdCgqaSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgZWxzZSBpZiAoZWxlbWVudC50eXBlKCkgPT0gdGx2OjpEYXRhKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICBzaGFyZWRfcHRyPERhdGE+IGQgPSBtYWtlX3NoYXJlZDxEYXRhPigpOwotICAgICAgICAgICAgICBkLT53aXJlRGVjb2RlKGVsZW1lbnQpOwotICAgICAgICAgICAgICBjbGllbnQxX29uUmVjZWl2ZURhdGEoKmQpOwotICAgICAgICAgICAgfQotICAgICAgICB9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fQ0FTRShOb0NlcnRmaWxlRHJ5UnVuKQotewotICBjb25zdCBzdGQ6OnN0cmluZyBOT19DRVJUX0NPTkZJRyA9Ci0gICAgImF1dGhvcml6YXRpb25zXG4iCi0gICAgIntcbiIKLSAgICAiICBhdXRob3JpemVcbiIKLSAgICAiICB7XG4iCi0gICAgIiAgICBwcml2aWxlZ2VzXG4iCi0gICAgIiAgICB7XG4iCi0gICAgIiAgICAgIGZpYlxuIgotICAgICIgICAgICBzdGF0c1xuIgotICAgICIgICAgfVxuIgotICAgICIgIH1cbiIKLSAgICAiICBhdXRob3JpemVcbiIKLSAgICAiICB7XG4iCi0gICAgIiAgfVxuIgotICAgICJ9XG4iOwotCi0KLSAgQ29uZmlnRmlsZSBjb25maWc7Ci0gIENvbW1hbmRWYWxpZGF0b3IgdmFsaWRhdG9yOwotCi0gIHZhbGlkYXRvci5zZXRDb25maWdGaWxlKGNvbmZpZyk7Ci0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihjb25maWcucGFyc2UoTk9fQ0VSVF9DT05GSUcsIHRydWUsIENPTkZJR19QQVRILm5hdGl2ZSgpKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmdmFsaWRhdGVFcnJvck1lc3NhZ2UsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICJObyBjZXJ0ZmlsZSBzcGVjaWZpZWRcbiIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5vIGNlcnRmaWxlIHNwZWNpZmllZCIsIF8xKSk7Ci19Ci0KLUJPT1NUX0FVVE9fVEVTVF9DQVNFKE1hbGZvcm1lZENlcnREcnlSdW4pCi17Ci0gIHVzaW5nIG5hbWVzcGFjZSBib29zdDo6ZmlsZXN5c3RlbTsKLQotICBjb25zdCBzdGQ6OnN0cmluZyBNQUxGT1JNRURfQ0VSVF9DT05GSUcgPQotICAgICJhdXRob3JpemF0aW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GUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBleHBlY3RlZFRleHQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xSZXNwb25zZSYgY29udHJvbCkKLSAgewotICAgIG1fY2FsbGJhY2tGaXJlZCA9IHRydWU7Ci0gICAgQmxvY2sgY29udHJvbFJhdyA9IHJlc3BvbnNlLmdldENvbnRlbnQoKS5ibG9ja0Zyb21WYWx1ZSgpOwotCi0gICAgY29udHJvbC53aXJlRGVjb2RlKGNvbnRyb2xSYXcpOwotCi0gICAgLy8gTkZEX0xPR19ERUJVRygicmVjZWl2ZWQgY29udHJvbCByZXNwb25zZSIKLSAgICAvLyAgICAgICAgICAgICAgIDw8ICIgTmFtZTogIiA8PCByZXNwb25zZS5nZXROYW1lKCkKLSAgICAvLyAgICAgICAgICAgICAgIDw8ICIgY29kZTogIiA8PCBjb250cm9sLmdldENvZGUoKQotICAgIC8vICAgICAgICAgICAgICAgPDwgIiB0ZXh0OiAiIDw8IGNvbnRyb2wuZ2V0VGV4dCgpKTsKLQotICAgIEJPT1NUX0NIRUNLX0VRVUFMKHJlc3BvbnNlLmdldE5hbWUoKSwgZXhwZWN0ZWROYW1lKTsKLSAgICBCT09TVF9DSEVDS19FUVVBTChjb250cm9sLmdldENvZGUoKSwgZXhwZWN0ZWRDb2RlKTsKLSAgICBCT09TVF9DSEVDS19FUVVBTChjb250cm9sLmdldFRleHQoKSwgZXhwZWN0ZWRUZXh0KTsKLSAgfQotCi0gIHZvaWQKLSAgdmFsaWRhdGVDb250cm9sUmVzcG9uc2UoY29uc3QgRGF0YSYgcmVzcG9uc2UsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IE5hbWUmIGV4cGVjdGVkTmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgdWludDMyX3QgZXhwZWN0ZWRDb2RlLAotICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgZXhwZWN0ZWRUZXh0KQotICB7Ci0gICAgQ29udHJvbFJlc3BvbnNlIGNvbnRyb2w7Ci0gICAgdmFsaWRhdGVDb250cm9sUmVzcG9uc2VDb21tb24ocmVzcG9uc2UsIGV4cGVjdGVkTmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBlY3RlZENvZGUsIGV4cGVjdGVkVGV4dCwgY29udHJvbCk7Ci0KLSAgICBpZiAoIWNvbnRyb2wuZ2V0Qm9keSgpLmVtcHR5KCkpCi0gICAgICB7Ci0gICAgICAgIEJPT1NUX0ZBSUwoImZvdW5kIHVuZXhwZWN0ZWQgY29udHJvbCByZXNwb25zZSBib2R5Iik7Ci0gICAgICB9Ci0gIH0KLQotICB2b2lkCi0gIHZhbGlkYXRlQ29udHJvbFJlc3BvbnNlKGNvbnN0IERhdGEmIHJlc3BvbnNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBOYW1lJiBleHBlY3RlZE5hbWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQzMl90IGV4cGVjdGVkQ29kZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGV4cGVjdGVkVGV4dCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQmxvY2smIGV4cGVjdGVkQm9keSkKLSAgewotICAgIENvbnRyb2xSZXNwb25zZSBjb250cm9sOwotICAgIHZhbGlkYXRlQ29udHJvbFJlc3BvbnNlQ29tbW9uKHJlc3BvbnNlLCBleHBlY3RlZE5hbWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0ZWRDb2RlLCBleHBlY3RlZFRleHQsIGNvbnRyb2wpOwotCi0gICAgQk9PU1RfUkVRVUlSRSghY29udHJvbC5nZXRCb2R5KCkuZW1wdHkoKSk7Ci0gICAgQk9PU1RfUkVRVUlSRShjb250cm9sLm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fQotCi1CT09TVF9BVVRPX1RFU1RfQ0FTRShUZXN0UHJvY2Vzc1NlY3Rpb25UY3BDaGFubmVsc0Rpc2FibGVkKQotewotICBjb25zdCBzdGQ6OnN0cmluZyBDT05GSUcgPQotICAgICJmYWNlX3N5c3RlbVxuIgotICAgICJ7XG4iCi0gICAgIiAgdGNwXG4iCi0gICAgIiAge1xuIgotICAgICIgICAgcG9ydCA2MzYzXG4iCi0gICAgIiAgICBlbmFibGVfdjQgbm9cbiIKLSAgICAiICAgIGVuYWJsZV92NiBub1xuIgotICAgICIgIH1cbiIKLSAgICAifVxuIjsKLSAgQk9PU1RfQ0hFQ0tfRVhDRVBUSU9OKHBhcnNlQ29uZmlnKENPTkZJRywgZmFsc2UpLCBDb25maWdGaWxlOjpFcnJvciwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJmlzRXhwZWN0ZWRFeGNlcHRpb24sIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiSVB2NCBhbmQgSVB2NiBjaGFubmVscyBoYXZlIGJlZW4gZGlzYWJsZWQuIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiIFJlbW92ZSBcInRjcFwiIHNlY3Rpb24gdG8gZGlzYWJsZSBUQ1AgY2hhbm5lbHMgb3IiCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgcmUtZW5hYmxlIGF0IGxlYXN0IG9uZSBjaGFubmVsIHR5cGUuIikpOwotfQotCi1CT09TVF9BVVRPX1RFU1RfQ0FTRShUZXN0UHJvY2Vzc1NlY3Rpb25UY3BVbmtub3duT3B0aW9uKQotewotICBjb25zdCBzdGQ6OnN0cmluZyBDT05GSUcgPQotICAgICJmYWNlX3N5c3RlbVxuIgotICAgICJ7XG4iCi0gICAgIiAgdGNwXG4iCi0gICAgIiAge1xuIgotICAgICIgICAgaGVsbG9cbiIKLSAgICAiICB9XG4iCi0gICAgIn1cbiI7Ci0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihwYXJ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gIH1cbiIKLSAgICAifVxuIjsKLQotICBCT09TVF9DSEVDS19FWENFUFRJT04ocGFyc2VDb25maWcoQ09ORklHLCBmYWxzZSksIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmaXNFeHBlY3RlZEV4Y2VwdGlvbiwgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICJJbnZhbGlkIHZhbHVlIGZvciBvcHRpb24gXCJtY2FzdFwiIGluIFwidWRwXCIgc2VjdGlvbiIpKTsKLX0KLQotQk9PU1RfQVVUT19URVNUX0NBU0UoVGVzdFByb2Nlc3NTZWN0aW9uVWRwQmFkTWNhc3RHcm91cCkKLXsKLSAgY29uc3Qgc3RkOjpzdHJpbmcgQ09ORklHID0KLSAgICAiZmFjZV9zeXN0ZW1cbiIKLSAgICAie1xuIgotICAgICIgIHVkcFxuIgotICAgICIgIHtcbiIKLSAgICAiICAgIG1jYXN0IG5vXG4iCi0gICAgIiAgICBtY2FzdF9wb3J0IDUwXG4iCi0gICAgIiAgICBtY2FzdF9ncm91cCBoZWxsb1xuIgotICAgICIgIH1cbiIKLSAgICAifVxuIjsKLQotICBCT09TVF9DSEVDS19FWENFUFRJT04ocGFyc2VDb25maWcoQ09ORklHLCBmYWxzZSksIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmaXNFeHBlY3RlZEV4Y2VwdGlvbiwgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICJJbnZhbGlkIHZhbHVlIGZvciBvcHRpb24gXCJtY2FzdF9ncm91cFwiIGluIFwidWRwXCIgc2VjdGlvbiIpKTsKLX0KLQotQk9PU1RfQVVUT19URVNUX0NBU0UoVGVzdFByb2Nlc3NTZWN0aW9uVWRwQmFkTWNhc3RHcm91cFY2KQotewotICBjb25zdCBzdGQ6OnN0cmluZyBDT05GSUcgPQotICAgICJmYWNlX3N5c3RlbVxuIgotICAgICJ7X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otICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlciwgbV9rZXlDaGFpbik7Ci0gIEJPT1NUX0NIRUNLX0VRVUFMKGZhY2VRdWVyeVN0YXR1c1B1Ymxpc2hlci5kb2VzTWF0Y2hGaWx0ZXIobV9kdW1teUZhY2UpLCBmYWxzZSk7Ci0gIEJPT1NUX0NIRUNLX0VRVUFMKGZhY2VRdWVyeVN0YXR1c1B1Ymxpc2hlci5kb2VzTWF0Y2hGaWx0ZXIobV9kdW1teVVyaSksIHRydWUpOwotfQotCi0KLUJPT1NUX0FVVE9fVEVTVF9DQVNFKExpbmtUeXBlRmlsdGVyKQotewotICBzaGFyZWRfcHRyPE11bHRpY2FzdFVkcEZhY2U+IG11bHRpY2FzdEZhY2UgPSBtX2ZhY3RvcnkuY3JlYXRlTXVsdGljYXN0RmFjZSgiMC4wLjAuMCIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIyMjQuMC4wLjEiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMjAwNzAiKTsKLSAgbmRuOjpuZmQ6OkZhY2VRdWVyeUZpbHRlciBmaWx0ZXI7Ci0gIGZpbHRlci5zZXRMaW5rVHlwZShuZG46Om5mZDo6TElOS19UWVBFX01VTFRJX0FDQ0VTUyk7Ci0gIEZhY2VRdWVyeVN0YXR1c1B1Ymxpc2hlciBmYWNlUXVlcnlTdGF0dXNQdWJsaXNoZXIobV90YWJsZSwgKm1fZmFjZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiL2xvY2FsaG9zdC9uZmQvRmFjZVN0YXR1c1B1Ymxpc2hlckZpeHR1cmUiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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saXNoZXJGaXh0dXJlKCkKLSAgICA6IG1fZmliKG1fbmFtZVRyZWUpCi0gICAgLCBtX2ZhY2UobWFrZV9zaGFyZWQ8SW50ZXJuYWxGYWNlPigpKQotICAgICwgbV9wdWJsaXNoZXIobV9maWIsICptX2ZhY2UsICIvbG9jYWxob3N0L25mZC9GaWJFbnVtZXJhdGlvblB1Ymxpc2hlckZpeHR1cmUiLCBtX2tleUNoYWluKQotICAgICwgbV9maW5pc2hlZChmYWxzZSkKLSAgewotICB9Ci0KLSAgdmlydHVhbAotICB+RmliRW51bWVyYXRpb25QdWJsaXNoZXJGaXh0dXJlKCkKLSAgewotICB9Ci0KLSAgYm9vbAotICBoYXNOZXh0SG9wV2l0aENvc3QoY29uc3QgZmliOjpOZXh0SG9wTGlzdCYgbmV4dEhvcHMsCi0gICAgICAgICAgICAgICAgICAgICBGYWNlSWQgZmFjZUlkLAotICAgICAgICAgICAgICAgICAgICAgdWludDY0X3QgY29zdCkKLSAgewotICAgIGZvciAoZmliOjpOZXh0SG9wTGlzdDo6Y29uc3RfaXRlcmF0b3IgaSA9IG5leHRIb3BzLmJlZ2luKCk7Ci0gICAgICAgICBpICE9IG5leHRIb3BzLmVuZCgpOwotICAgICAgICAgKytpKQotICAgICAgewotICAgICAgICBpZiAoaS0+Z2V0RmFjZSgpLT5nZXRJZCgpID09IGZhY2VJZCAmJiBpLT5nZXRDb3N0KCkgPT0gY29zdCkKLSAgICAgICAgICB7Ci0gICAgICAgICAgICByZXR1cm4gdHJ1ZTsKLSAgICAgICAgICB9Ci0gICAgICB9Ci0gICAgcmV0dXJuIGZhbHNlOwotICB9Ci0KLSAgYm9vbAotICBlbnRyeUhhc1ByZWZpeChjb25zdCBzaGFyZWRfcHRyPGZpYjo6RW50cnk+IGVudHJ5LCBjb25zdCBOYW1lJiBwcmVmaXgpCi0gIHsKLSAgICByZXR1cm4gZW50cnktPmdldFByZWZpeCgpID09IHByZWZpeDsKLSAgfQotCi0gIHZvaWQKLSAgdmF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9wcyA9IHJlZmVyZW5jZS0+Z2V0TmV4dEhvcHMoKTsKLSAgICBmb3IgKDsgaSAhPSBlbnRyeS5lbGVtZW50c19lbmQoKTsgKytpKQotICAgICAgewotICAgICAgICBjb25zdCBuZG46OkJsb2NrJiBuZXh0SG9wUmVjb3JkID0gKmk7Ci0gICAgICAgIEJPT1NUX1JFUVVJUkUobmV4dEhvcFJlY29yZC50eXBlKCkgPT0gbmRuOjp0bHY6Om5mZDo6TmV4dEhvcFJlY29yZCk7Ci0gICAgICAgIG5leHRIb3BSZWNvcmQucGFyc2UoKTsKLQotICAgICAgICBCbG9jazo6ZWxlbWVudF9jb25zdF9pdGVyYXRvciBqID0gbmV4dEhvcFJlY29yZC5lbGVtZW50c19iZWdpbigpOwotCi0gICAgICAgIEZhY2VJZCBmYWNlSWQgPQotICAgICAgICAgIGNoZWNrZWRSZWFkTm9uTmVnYXRpdmVJbnRlZ2VyVHlwZShqLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5lbGVtZW50c19lbmQoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmRuOjp0bHY6Om5mZDo6RmFjZUlkKTsKLQotICAgICAgICB1aW50NjRfdCBjb3N0ID0KLSAgICAgICAgICBjaGVja2VkUmVhZE5vbk5lZ2F0aXZlSW50ZWdlclR5cGUoaiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW50cnkuZWxlbWVudHNfZW5kKCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6dGx2OjpuZmQ6OkNvc3QpOwotCi0gICAgICAgIEJPT1NUX1JFUVVJUkUoaGFzTmV4dEhvcFdpdGhDb3N0KHJlZmVyZW5jZU5leHRIb3BzLCBmYWNlSWQsIGNvc3QpKTsKLQotICAgICAgICBCT09TVF9SRVFVSVJFKGogPT0gbmV4dEhvcFJlY29yZ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b2xSZXNwb25zZUNvbW1vbihjb25zdCBEYXRhJiByZXNwb25zZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgTmFtZSYgZXhwZWN0ZWROYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBleHBlY3RlZENvZGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBleHBlY3RlZFRleHQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xSZXNwb25zZSYgY29udHJvbCkKLSAgewotICAgIG1fY2FsbGJhY2tGaXJlZCA9IHRydWU7Ci0gICAgQmxvY2sgY29udHJvbFJhdyA9IHJlc3BvbnNlLmdldENvbnRlbnQoKS5ibG9ja0Zyb21WYWx1ZSgpOwotCi0gICAgY29udHJvbC53aXJlRGVjb2RlKGNvbnRyb2xSYXcpOwotCi0gICAgLy8gTkZEX0xPR19ERUJVRygicmVjZWl2ZWQgY29udHJvbCByZXNwb25zZSIKLSAgICAvLyAgICAgICAgICAgICAgIDw8ICIgTmFtZTogIiA8PCByZXNwb25zZS5nZXROYW1lKCkKLSAgICAvLyAgICAgICAgICAgICAgIDw8ICIgY29kZTogIiA8PCBjb250cm9sLmdldENvZGUoKQotICAgIC8vICAgICAgICAgICAgICAgPDwgIiB0ZXh0OiAiIDw8IGNvbnRyb2wuZ2V0VGV4dCgpKTsKLQotICAgIEJPT1NUX0NIRUNLX0VRVUFMKHJlc3BvbnNlLmdldE5hbWUoKSwgZXhwZWN0ZWROYW1lKTsKLSAgICBCT09TVF9DSEVDS19FUVVBTChjb250cm9sLmdldENvZGUoKSwgZXhwZWN0ZWRDb2RlKTsKLSAgICBCT09TVF9DSEVDS19FUVVBTChjb250cm9sLmdldFRleHQoKSwgZXhwZWN0ZWRUZXh0KTsKLSAgfQotCi0gIHZvaWQKLSAgdmFsaWRhdGVDb250cm9sUmVzcG9uc2UoY29uc3QgRGF0YSYgcmVzcG9uc2UsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IE5hbWUmIGV4cGVjdGVkTmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgdWludDMyX3QgZXhwZWN0ZWRDb2RlLAotICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgZXhwZWN0ZWRUZXh0KQotICB7Ci0gICAgQ29udHJvbFJlc3BvbnNlIGNvbnRyb2w7Ci0gICAgdmFsaWRhdGVDb250cm9sUmVzcG9uc2VDb21tb24ocmVzcG9uc2UsIGV4cGVjdGVkTmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBlY3RlZENvZGUsIGV4cGVjdGVkVGV4dCwgY29udHJvbCk7Ci0KLSAgICBpZiAoIWNvbnRyb2wuZ2V0Qm9keSgpLmVtcHR5KCkpCi0gICAgICB7Ci0gICAgICAgIEJPT1NUX0ZBSUwoImZvdW5kIHVuZXhwZWN0ZWQgY29udHJvbCByZXNwb25zZSBib2R5Iik7Ci0gICAgICB9Ci0gIH0KLQotICB2b2lkCi0gIHZhbGlkYXRlQ29udHJvbFJlc3BvbnNlKGNvbnN0IERhdGEmIHJlc3BvbnNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBOYW1lJiBleHBlY3RlZE5hbWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQzMl90IGV4cGVjdGVkQ29kZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGV4cGVjdGVkVGV4dCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQmxvY2smIGV4cGVjdGVkQm9keSkKLSAgewotICAgIENvbnRyb2xSZXNwb25zZSBjb250cm9sOwotICAgIHZhbGlkYXRlQ29udHJvbFJlc3BvbnNlQ29tbW9uKHJlc3BvbnNlLCBleHBlY3RlZE5hbWUsCi0gICAgICAgICA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ICAgPDwgIiBuYW1lOiAiIDw8IHJlc3BvbnNlLmdldE5hbWUoKQotICAgICAgICAgICAgICAgICAgPDwgIiBjb2RlOiAiIDw8IGNvbnRyb2wuZ2V0Q29kZSgpCi0gICAgICAgICAgICAgICAgICA8PCAiIHRleHQ6ICIgPDwgY29udHJvbC5nZXRUZXh0KCkpOwotCi0gICAgQk9PU1RfUkVRVUlSRShyZXNwb25zZS5nZXROYW1lKCkgPT0gZXhwZWN0ZWROYW1lKTsKLSAgICBCT09TVF9SRVFVSVJFKGNvbnRyb2wuZ2V0Q29kZSgpID09IGV4cGVjdGVkQ29kZSk7Ci0gICAgQk9PU1RfUkVRVUlSRShjb250cm9sLmdldFRleHQoKSA9PSBleHBlY3RlZFRleHQpOwotICB9Ci0KLSAgdm9pZAotICB2YWxpZGF0ZUNvbnRyb2xSZXNwb25zZShjb25zdCBEYXRhJiByZXNwb25zZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgTmFtZSYgZXhwZWN0ZWROYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBleHBlY3RlZENvZGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBleHBlY3RlZFRleHQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IEJsb2NrJiBleHBlY3RlZEJvZHkpCi0gIHsKLSAgICBtX2NhbGxiYWNrRmlyZWQgPSB0cnVlOwotICAgIEJsb2NrIGNvbnRyb2xSYXcgPSByZXNwb25zZS5nZXRDb250ZW50KCkuYmxvY2tGcm9tVmFsdWUoKTsKLQotICAgIENvbnRyb2xSZXNwb25zZSBjb250cm9sOwotICAgIGNvbnRyb2wud2lyZURlY29kZShjb250cm9sUmF3KTsKLQotICAgIE5GRF9MT0dfREVCVUcoInJlY2VpdmVkIGNvbnRyb2wgcmVzcG9uc2UiCi0gICAgICAgICAgICAgICAgICA8PCAiIG5hbWU6ICIgPDwgcmVzc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GV4dCkKLSAgewotICAgIENvbnRyb2xSZXNwb25zZSBjb250cm9sOwotICAgIHZhbGlkYXRlQ29udHJvbFJlc3BvbnNlQ29tbW9uKHJlc3BvbnNlLCBleHBlY3RlZE5hbWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0ZWRDb2RlLCBleHBlY3RlZFRleHQsIGNvbnRyb2wpOwotCi0gICAgaWYgKCFjb250cm9sLmdldEJvZHkoKS5lbXB0eSgpKQotICAgICAgewotICAgICAgICBCT09TVF9GQUlMKCJmb3VuZCB1bmV4cGVjdGVkIGNvbnRyb2wgcmVzcG9uc2UgYm9keSIpOwotICAgICAgfQotICB9Ci0KLSAgdm9pZAotICB2YWxpZGF0ZUNvbnRyb2xSZXNwb25zZShjb25zdCBEYXRhJiByZXNwb25zZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgTmFtZSYgZXhwZWN0ZWROYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBleHBlY3RlZENvZGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBleHBlY3RlZFRleHQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IEJsb2NrJiBleHBlY3RlZEJvZHkpCi0gIHsKLSAgICBDb250cm9sUmVzcG9uc2UgY29udHJvbDsKLSAgICB2YWxpZGF0ZUNvbnRyb2xSZXNwb25zZUNvbW1vbihyZXNwb25zZSwgZXhwZWN0ZWROYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cGVjdGVkQ29kZSwgZXhwZWN0ZWRUZXh0LCBjb250cm9sKTsKLQotICAgIEJPT1NUX1JFUVVJUkUoIWNvbnRyb2wuZ2V0Qm9keSgpLmVtcHR5KCkpOwotICAgIEJPT1NUX1JFUVVJUkUoY29udHJvbC5nZXRCb2R5KCkudmFsdWVfc2l6ZSgpID09IGV4cGVjdGVkQm9keS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AgICAgICAgICAgICAgICAgIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmVGFibGVzQ29uZmlnU2VjdGlvbkZpeHR1cmU6OnZhbGlkYXRlRXhjZXB0aW9uLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLCBfMSwgZXhwZWN0ZWRNc2cpKTsKLQotICBCT09TVF9DSEVDS19FWENFUFRJT04ocnVuQ29uZmlnKENPTkZJRywgZmFsc2UpLAotICAgICAgICAgICAgICAgICAgICAgICAgQ29uZmlnRmlsZTo6RXJyb3IsCi0gICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZUYWJsZXNDb25maWdTZWN0aW9uRml4dHVyZTo6dmFsaWRhdGVFeGNlcHRpb24sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMsIF8xLCBleHBlY3RlZE1zZykpOwotfQotCi1CT09TVF9BVVRPX1RFU1RfQ0FTRShJbnZhbGlkVmFsdWVDc01heFBhY2tldHMpCi17Ci0gIGNvbnN0IHN0ZDo6c3RyaW5nIENPTkZJRyA9Ci0gICAgInRhYmxlc1xuIgotICAgICJ7XG4iCi0gICAgIiAgY3NfbWF4X3BhY2tldHMgaW52YWxpZFxuIgotICAgICJ9XG4iOwotCi0gIGNvbnN0IHN0ZDo6c3RyaW5nIGV4cGVjdGVkTXNnID0KLSAgICAiSW52YWxpZCB2YWx1ZSBmb3Igb3B0aW9uIFwiY3NfbWF4X3BhY2tldHNcIiBpbiBcInRhYmxlc1wiIHNlY3Rpb24iOwotCi0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihydW5Db25maWcoQ09ORklHLCB0cnVlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmVGFibGVzQ29uZmlnU2VjdGlvbkZpeHR1cmU6OnZhbGlkYXRlRXhjZXB0aW9uLAotICAgICAgIC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3k+KHJlZihtX2ZvcndhcmRlciksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiL2xvY2FsaG9zdC9uZmQvc3RyYXRlZ3kvdGVzdC1zdHJhdGVneS1hIikpOwotCi0KLSAgY29uc3Qgc3RkOjpzdHJpbmcgZXhwZWN0ZWRNc2cgPSAiSW52YWxpZCBzdHJhdGVneSBjaG9pY2UgXCJcIiBmb3IgcHJlZml4ICIKLSAgICAiXCIvbG9jYWxob3N0L25mZC9zdHJhdGVneS90ZXN0LXN0cmF0ZWd5LWFcIiBpbiBcInN0cmF0ZWd5X2Nob2ljZVwiIHNlY3Rpb24iOwotCi0gIEJPT1NUX0NIRUNLX0VYQ0VQVElPTihydW5Db25maWcoQ09ORklHLCB0cnVlKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIENvbmZpZ0ZpbGU6OkVycm9yLAotICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmVGFibGVzQ29uZmlnU2VjdGlvbkZpeHR1cmU6OnZhbGlkYXRlRXhjZXB0aW9uLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLCBfMSwgZXhwZWN0ZWRNc2cpKTsKLQotICBCT09TVF9DSEVDS19FWENFUFRJT04ocnVuQ29uZmlnKENPTkZJRywgZmFsc2UpLAotICAgICAgICAgICAgICAgICAgICAgICAgQ29uZmlnRmlsZTo6RXJyb3IsCi0gICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZUYWJsZXNDb25maWdTZWN0aW9uRml4dHVyZTo6dmFsaWRhdGVFeGNlcHRpb24sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMsIF8xLCBleHBlY3RlZE1zZykpOwotfQotCi1CT09TVF9BVVRPX1RFU1RfQ0FTRShEdXBsaWNhdGVTdHJhdGVneSkKLXsKLSAgY29uc3Qgc3RkOjpzdHJpbmcgQ09ORklHID0KLSAgICAidGFibGVzXG4iCi0gICAgIntcbiIKL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0gICAgICAgICMgbWFpbigpCi0gICAgICAgIHVuaXRfdGVzdF9tYWluID0gYmxkKAotICAgICAgICAgICAgdGFyZ2V0PSd1bml0LXRlc3RzLW1haW4nLAotICAgICAgICAgICAgbmFtZT0ndW5pdC10ZXN0cy1tYWluJywKLSAgICAgICAgICAgIGZlYXR1cmVzPSdjeHgnLAotICAgICAgICAgICAgdXNlPSdjb3JlLW9iamVjdHMnLAotICAgICAgICAgICAgc291cmNlPSdtYWluLmNwcCcsCi0gICAgICAgICAgKQotCi0gICAgICAgICMgY29tbW9uIHRlc3QgbW9kdWxlcwotICAgICAgICB1bml0X3Rlc3RfYmFzZSA9IGJsZCgKLSAgICAgICAgICAgIHRhcmdldD0ndW5pdC10ZXN0cy1iYXNlJywKLSAgICAgICAgICAgIG5hbWU9J3VuaXQtdGVzdHMtYmFzZScsCi0gICAgICAgICAgICBmZWF0dXJlcz0nY3h4IHBjaCcsCi0gICAgICAgICAgICBzb3VyY2U9YmxkLnBhdGguYW50X2dsb2IoWycqLmNwcCddLCBleGNsPSdtYWluLmNwcCcpLAotICAgICAgICAgICAgdXNlPSdjb3JlLW9iamVjdHMnLAotICAgICAgICAgICAgaGVhZGVycz0nLi4vY29tbW9uLmhwcCBib29zdC10ZXN0LmhwcCcsCi0gICAgICAgICAgKQotCi0gICAgICAgICMgY29yZSB0ZXN0cwotICAgICAgICB1bml0X3Rlc3RzX2NvcmUgPSBibGQucHJvZ3JhbSgKLSAgICAgICAgICAgIHRhcmdldD0nLi4vdW5pdC10ZXN0cy1jb3JlJywKLSAgICAgICAgICAgIGZlYXR1cmVzPSdjeHggY3h4cHJvZ3JhbScsCi0gICAgICAgICAgICBzb3VyY2U9YmxkLnBhdGguYW50X2dsb2IoWydjb3JlLyoqLyouY3BwJ10pLAotICAgICAgICAgICAgdXNlPSdjb3JlLW9iamVjdHMgdW5pdC10ZXN0cy1iYXNlIHVuaXQtdGVzdHMtbWFpbicsCi0gICAgICAgICAgICBpbmNsdWRlcz0nLicsCi0gICAgICAgICAgICBpbnN0YWxsX3BhdGg9Tm9uZSwKLSAgICAgICAgICApCi0KLSAgICAgICAgIyBORkQgdGVzdHMKLSAgICAgICAgdW5pdF90ZXN0c19uZmQgPSBibGQucHJvZ3JhbSgKLSAgICAgICAgICAgIHRhcmdldD0nLi4vdW5pdC10ZXN0cy1kYWVtb24nLAotICAgICAgICAgICAgZmVhdHVyZXM9J2N4eCBjeHhwcm9ncmFtJywKLSAgICAgICAgICAgIHNvdXJjZT1ibGQucGF0aC5hbnRfZ2xvYihbJ2RhZW1vbi8qKi8qLmNwcCddLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4Y2w9WydkYWVtb24vZmFjZS9ldGhlcm5ldC5jcHAnLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkYWVtb24vZmFjZS91bml4LSouY3BwJywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGFlbW9uL2ZhY2Uvd2Vic29ja2V0Ki5jcHAnXSksCi0gICAgICAgICAgICB1c2U9J2RhZW1vbi1vYmplY3RzIHVuaXQtdGVzdHMtYmFzZSB1bml0LXRlc3RzLW1haW4nLAotICAgICAgICAgICAgaW5jbHVkZXM9Jy4nLAotICAgICAgICAgICAgaW5zdGFsbF9wYXRoPU5vbmUsCi0gICAgICAgICAgKQotCi0gICAgICAgIGlmIGJsZC5lbnZbJ0hBVkVfTElCUENBUCddOgotICAgICAgICAgICAgdW5pdF90ZXN0c19uZmQuc291cmNlICs9IGJsZC5wYXRoLmFudF9nbG9iKCdkYWVtb24vZmFjZS9ldGhlcm5ldC5jcHAnKQotCi0gICAgICAgIGlmIGJsZC5lbnZbJ0hBVkVfVU5JWF9TT0NLRVRTJ106Ci0gICAgICAgICAgICB1bml0X3Rlc3RzX25mZC5zb3VyY2UgKz0gYmxkLnBhdGguYW50X2dsb2IoJ2RhZW1vbi9mYWNlL3VuaXgtKi5jcHAnKQot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VnbWVudChjdXJyZW50U2VnbWVudCsxKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZG46OmJpbmQoJk5kbkF1dG9jb25maWc6OmZldGNoU2VnbWVudHMsIHRoaXMsIF8yLCBidWZmZXIsIG9uRG9uZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmRuOjpiaW5kKCZOZG5BdXRvY29uZmlnOjpkaXNjb3Zlckh1YlN0YWdlMiwgdGhpcywgIlRpbWVvdXQiKSk7Ci0gICAgICB9Ci0gICAgZWxzZQotICAgICAgewotICAgICAgICByZXR1cm4gKHRoaXMtPipvbkRvbmUpKGJ1ZmZlcik7Ci0gICAgICB9Ci0gIH0KLQotICB2b2lkCi0gIGRpc2NvdmVySHViU3RhZ2UxKCkKLSAgewotICAgIHNoYXJlZF9wdHI8T0J1ZmZlclN0cmVhbT4gYnVmZmVyID0gbWFrZV9zaGFyZWQ8T0J1ZmZlclN0cmVhbT4oKTsKLQotICAgIEludGVyZXN0IGludGVyZXN0KCIvbG9jYWxob3N0L25mZC9mYWNlcy9saXN0Iik7Ci0gICAgaW50ZXJlc3Quc2V0Q2hpbGRTZWxlY3RvcigxKTsKLSAgICBpbnRlcmVzdC5zZXRNdXN0QmVGcmVzaCh0cnVlKTsKLQotICAgIG1fZmFjZS5leHByZXNzSW50ZXJlc3QoaW50ZXJlc3QsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBuZG46OmJpbmQoJk5kbkF1dG9jb25maWc6OmZldGNoU2VnbWVudHMsIHRoaXMsIF8yLCBidWZmZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJk5kbkF1dG9jb25maWc6OmRpc2NvdmVySHViU3RhZ2UxX3JlZ2lzdGVySHViRGlzY292ZXJ5UHJlZml4KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIG5kbjo6YmluZCgmTmRuQXV0b2NvbmZpZzo6ZGlzY292ZXJIdWJTdGFnZTIsIHRoaXMsICJ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OU19NQVhETkFNRV07Ci0gICAgICBpbnQgc2VydmVyTmFtZVNpemUgPSBkbl9leHBhbmQocXVlcnlBbnN3ZXIuYnVmLCAgICAgICAgICAgICAgIC8vIG1lc3NhZ2UgcG9pbnRlcgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5QW5zd2VyLmJ1ZiArIGFuc3dlclNpemUsICAvLyBlbmQgb2YgbWVzc2FnZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2IsICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb21wcmVzc2VkIHNlcnZlciBuYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3J2TmFtZSwgICAgICAgICAgICAgICAgICAgICAgIC8vIGV4cGFuZGVkIHNlcnZlciBuYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlNfTUFYRE5BTUUpOwotICAgICAgaWYgKHNlcnZlck5hbWVTaXplIDwgMCkKLSAgICAgIHsKLSAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgfQotCi0gICAgICBzcnZfdCogc2VydmVyID0gcmVpbnRlcnByZXRfY2FzdDxzcnZfdCo+KCZibG9iW3NpemVvZihyZWNoZHIpXSk7Ci0gICAgICB1aW50MTZfdCBjb252ZXJ0ZWRQb3J0ID0gYmUxNnRvaChzZXJ2ZXItPnBvcnQpOwotCi0gICAgICBibG9iICs9IHNlcnZlck5hbWVTaXplICsgTlNfSEZJWEVEU1ogKyBOU19RRklYRURTWjsKLQotICAgICAgY2hhciBob3N0TmFtZVtOU19NQVhETkFNRV07Ci0gICAgICBpbnQgaG9zdE5hbWVTaXplID0gZG5fZXhwYW5kKHF1ZXJ5QW5zd2VyLmJ1ZiwgICAgICAgICAgICAgICAvLyBtZXNzYWdlIHBvaW50ZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnlBbnN3ZXIuYnVmICsgYW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dHJ1ZTsKLSAgICAgIH0KLQotICAgIHJldHVybiBmYWxzZTsKLSAgfQotCi0gIC8qKgotICAgKiBccmV0dXJuIHRydWUgaWYgYWRkcmVzcyBpcyB3aGl0ZWxpc3RlZAotICAgKi8KLSAgYm9vbAotICBpc1doaXRlbGlzdGVkKGNvbnN0IGJvb3N0Ojphc2lvOjppcDo6YWRkcmVzcyYgYWRkcmVzcykKLSAgewotICAgIGZvciAoc3RkOjp2ZWN0b3I8TmV0d29yaz46OmNvbnN0X2l0ZXJhdG9yIG5ldHdvcmsgPSBtX3doaXRlTGlzdC5iZWdpbigpOwotICAgICAgICAgbmV0d29yayAhPSBtX3doaXRlTGlzdC5lbmQoKTsKLSAgICAgICAgICsrbmV0d29yaykKLSAgICAgIHsKLSAgICAgICAgaWYgKG5ldHdvcmstPmRvZXNDb250YWluKGFkZHJlc3MpKQotICAgICAgICAgIHJldHVybiB0cnVlOwotICAgICAgfQotCi0gICAgcmV0dXJuIGZhbHNlOwotICB9Ci0KLSAgdm9pZAotICByZWdpc3RlclByZWZpeGVzRm9yRmFjZSh1aW50NjRfdCBmYWNlSWQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6dmVjdG9yPG5kbjo6TmFtZT4mIHByZWZpeGVzKQotICB7Ci0gICAgZm9yIChzdGQ6OnZlY3RvcjxuZG46Ok5hbWU+Ojpjb25zdF9pdGVyYXRvciBwcmVmaXggPSBwcmVmaXhlcy5iZWdpbigpOwotICAgICAgICAgcHJlZml4ICE9IHByZWZpeGVzLmVuZCgpOwotICAgICAgICAgKytwcmVmaXgpCi0gICAgICB7Ci0gICAgICAgIG1fY29udHJvbGxlci5zdGFydDxSaWJSZWdpc3RlckNvbW1hbmQ+KAotICAgICAgICAgIENvbnRyb2xQYXJhbWV0ZXJzKCkKLSAgICAgICAgICAgIC5zZXROYW1lKCpwcmVmaXgpCi0gICAgICAgICAgICAuc2V0RmFjZUlkKGZhY2VJZCkKLSAgICAgICAgICA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ICA8L3RyPgotICAgICAgICAgICAgPHRyPgotICAgICAgICAgICAgICA8dGg+Q2hpbGRJbmhlcml0PC90aD4KLSAgICAgICAgICAgICAgPHhzbDpmb3ItZWFjaCBzZWxlY3Q9Im5mZDpyb3V0ZXMvbmZkOnJvdXRlIj4KLSAgICAgICAgICAgICAgICA8dGQ+Ci0gICAgICAgICAgICAgICAgICA8eHNsOmlmIHRlc3Q9Im5mZDpmbGFncy9uZmQ6Y2hpbGRJbmhlcml0Ij4KLSAgICAgICAgICAgICAgICAgICAgWQotICAgICAgICAgICAgICAgICAgPC94c2w6aWY+Ci0gICAgICAgICAgICAgICAgPC90ZD4KLSAgICAgICAgICAgICAgPC94c2w6Zm9yLWVhY2g+Ci0gICAgICAgICAgICA8L3RyPgotICAgICAgICAgICAgPHRyPgotICAgICAgICAgICAgICA8dGg+UmliQ2FwdHVyZTwvdGg+Ci0gICAgICAgICAgICAgIDx4c2w6Zm9yLWVhY2ggc2VsZWN0PSJuZmQ6cm91dGVzL25mZDpyb3V0ZSI+Ci0gICAgICAgICAgICAgICAgPHRkPgotICAgICAgICAgICAgICAgICAgPHhzbDppZiB0ZXN0PSJuZmQ6ZmxhZ3MvbmZkOnJpYkNhcHR1cmUiPgotICAgICAgICAgICAgICAgICAgICBZCi0gICAgICAgICAgICAgICAgICA8L3hzbDppZj4KLSAgICAgICAgICAgICAgICA8L3RkPgotICAgICAgICAgICAgICA8L3hzbDpmb3ItZWFjaD4KLSAgICAgICAgICAgIDwvdHI+Ci0gICAgICAgICAgICA8dHI+Ci0gICAgICAgICAgICAgIDx0aD5FeHBpcmVzIGluPC90aD4KLSAgICAgICAgICAgICAgPHhzbDpmb3ItZWFjaCBzZWxlY3Q9Im5mZDpyb3V0ZXMvbmZkOnJvdXRlIj4KLSAgICAgICAgICAgICAgICA8dGQ+Ci0gICAgICAgICAgICAgICAgICA8eHNsOmNob29zZT4KLSAgICAgICAgICAgICAgICAgICAgPHhzbDp3aGVuIHRlc3Q9Im5mZDp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XMoc2VsZik6Ci0gICAgICAgICIiIgotICAgICAgICBUaGlzIGZ1bmN0aW9uIGlzIHRvIGNhbGwgbmZkLXN0YXR1cyBjb21tYW5kCi0gICAgICAgIHRvIGdldCB4bWwgZm9ybWF0IG91dHB1dAotICAgICAgICAiIiIKLSAgICAgICAgc3AgPSBzdWJwcm9jZXNzLlBvcGVuKFsnbmZkLXN0YXR1cycsICcteCddLCBzdGRvdXQ9c3VicHJvY2Vzcy5QSVBFLCBjbG9zZV9mZHM9VHJ1ZSkKLSAgICAgICAgb3V0cHV0ID0gc3AuY29tbXVuaWNhdGUoKVswXQotICAgICAgICBpZiBzcC5yZXR1cm5jb2RlID09IDA6Ci0gICAgICAgICAgICAjIGFkZCB0aGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBhZnRlciB0aGUgMXN0ICc+JyBzeW1ib2wKLSAgICAgICAgICAgIG5ld0xpbmVJbmRleCA9IG91dHB1dC5pbmRleCgnPicpICsgMQotICAgICAgICAgICAgcmVzdWx0U3RyID0gb3V0cHV0WzpuZXdMaW5lSW5kZXhdXAotICAgICAgICAgICAgICAgICAgICAgICsgIjw/eG1sLXN0eWxlc2hlZXQgdHlwZT1cInRleHQveHNsXCIgaHJlZj1cIm5mZC1zdGF0dXMueHNsXCI/PiJcCi0gICAgICAgICAgICAgICAgICAgICAgKyBvdXRwdXRbbmV3TGluZUluZGV4Ol0KLSAgICAgICAgICAgIHJldHVybiAoc3AucmV0dXJuY29kZSwgcmVzdWx0U3RyKQotICAgICAgICBlbHNlOgotICAgICAgICAgICAgaHRtbFN0ciA9ICc8IURPQ1RZUEUgSFRNTCBQVUJMSUMgIi0vL1czQy8vRFREIEhUTUwgNC4wMSBUcmFuc2l0aW9uYWwnXAotICAgICAgICAgICAgICAgICAgICArICcvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvbG9vc2UuZHRkIj5cbidcCi0gICAgICAgICAgICAgICAgICAgICs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x5ID0gc29ja2V0LkFGX0lORVQ2Ci0gICAgICAgIGVsaWYgaXBUeXBlID09IHNvY2tldC5BRl9JTkVUOgotICAgICAgICAgICAgc2VsZi5hZGRyZXNzX2ZhbWlseSA9PSBzb2NrZXQuQUZfSU5FVAotICAgICAgICBlbHNlOgotICAgICAgICAgICAgbG9nZ2luZy5lcnJvcigiVGhlIGlucHV0IElQIGFkZHJlc3MgaXMgbmVpdGhlciBJUHY2IG5vciBJUHY0IikKLSAgICAgICAgICAgIHN5cy5leGl0KDIpCi0KLSAgICAgICAgdHJ5OgotICAgICAgICAgICAgSFRUUFNlcnZlci5fX2luaXRfXyhzZWxmLCBzZXJ2ZXIsIGhhbmRsZXIpCi0gICAgICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKLSAgICAgICAgICAgIGxvZ2dpbmcuZXJyb3Ioc3RyKGUpKQotICAgICAgICAgICAgc3lzLmV4aXQoMikKLSAgICAgICAgc2VsZi52ZXJib3NlID0gdmVyYm9zZQotICAgICAgICBzZWxmLnJvYm90cyA9IHJvYm90cwotCi0gICAgZGVmIGdldElwVHlwZShzZWxmLCBpcEFkZHIpOgotICAgICAgICAiIiIgR2V0IGlwQWRkcidzIGFkZHJlc3MgdHlwZSAiIiIKLSAgICAgICAgIyBpZiBpcEFkZHIgaXMgYW4gSVB2NiBhZGRyLCByZXR1cm4gQUZfSU5FVDYKLSAgICAgICAgdHJ5OgotICAgICAgICAgICAgc29ja2V0LmluZXRfcHRvbihzb2NrZXQuQUZfSU5FVDYsIGlwQWRkcikKLSAgICAgICAgICAgIHJldHVybiBzb2NrZXQuQUZfSU5FVDYKLSAgICAgICAgZXhjZXB0IHNvY2tldC5lcnJvcjoKLSAgICAgICAgICAgIHBhc3MKLSAgICAgICAgIyBpZiBpcEFkZHIgaXMgYW4gSVB2NCBhZGRyIHJldHVybiBBRl9JTkVULCBpZiBub3QsIHJldHVybiBOb25lCi0gICAgICAgIHRyeToKLSAgICAgICAgICAgIHNvY2tldC5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lcnNpb24oKSA8PCAiPC92ZXJzaW9uPiI7Ci0gICAgICAgIHN0ZDo6Y291dCA8PCAiPHN0YXJ0VGltZT4iCi0gICAgICAgICAgICAgICAgICA8PCB0aW1lOjp0b1N0cmluZyhzdGF0dXMuZ2V0U3RhcnRUaW1lc3RhbXAoKSwgIiVZLSVtLSVkVCVIOiVNOiVTJUYiKQotICAgICAgICAgICAgICAgICAgPDwgIjwvc3RhcnRUaW1lPiI7Ci0gICAgICAgIHN0ZDo6Y291dCA8PCAiPGN1cnJlbnRUaW1lPiIKLSAgICAgICAgICAgICAgICAgIDw8IHRpbWU6OnRvU3RyaW5nKHN0YXR1cy5nZXRDdXJyZW50VGltZXN0YW1wKCksICIlWS0lbS0lZFQlSDolTTolUyVGIikKLSAgICAgICAgICAgICAgICAgIDw8ICI8L2N1cnJlbnRUaW1lPiI7Ci0gICAgICAgIHN0ZDo6Y291dCA8PCAiPHVwdGltZT5QVCIKLSAgICAgICAgICAgICAgICAgIDw8IHRpbWU6OmR1cmF0aW9uX2Nhc3Q8dGltZTo6c2Vjb25kcz4oc3RhdHVzLmdldEN1cnJlbnRUaW1lc3RhbXAoKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHN0YXR1cy5nZXRTdGFydFRpbWVzdGFtcCgpKS5jb3VudCgpCi0gICAgICAgICAgICAgICAgICA8PCAiUzwvdXB0aW1lPiI7Ci0gICAgICAgIHN0ZDo6Y291dCA8PCAiPG5OYW1lVHJlZUVudHJpZXM+IiAgICAgPDwgc3RhdHVzLmdldE5OYW1lVHJlZUVudHJpZXMoKQotICAgICAgICAgICAgICAgICAgPDwgIjwvbk5hbWVUcmVlRW50cmllcz4iOwotICAgICAgICBzdGQ6OmNvdXQgPDwgIjxuRmliRW50cmllcz4iICAgICAgICAgIDw8IHN0YXR1cy5nZXRORmliRW50cmllcygpCi0gICAgICAgICAgICAgICAgICA8PCAiPC9uRmliRW50cmllcz4iOwotIC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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZOZmRTdGF0dXM6OmFmdGVyRmV0Y2hlZENoYW5uZWxTdGF0dXNJbmZvcm1hdGlvbiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRTdGF0dXM6Om9uVGltZW91dCwgdGhpcykpOwotICB9Ci0KLSAgdm9pZAotICBhZnRlckZldGNoZWRDaGFubmVsU3RhdHVzSW5mb3JtYXRpb24oKQotICB7Ci0gICAgQ29uc3RCdWZmZXJQdHIgYnVmID0gbV9idWZmZXItPmJ1ZigpOwotICAgIGlmIChtX2lzT3V0cHV0WG1sKQotICAgICAgewotICAgICAgICBzdGQ6OmNvdXQgPDwgIjxjaGFubmVscz4iOwotCi0gICAgICAgIEJsb2NrIGJsb2NrOwotICAgICAgICBzaXplX3Qgb2Zmc2V0ID0gMDsKLSAgICAgICAgd2hpbGUgKG9mZnNldCA8IGJ1Zi0+c2l6ZSgpKQotICAgICAgICAgIHsKLSAgICAgICAgICAgIGJvb2wgb2sgPSBCbG9jazo6ZnJvbUJ1ZmZlcihidWYsIG9mZnNldCwgYmxvY2spOwotICAgICAgICAgICAgaWYgKCFvaykKLSAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAiRVJST1I6IGNhbm5vdCBkZWNvZGUgQ2hhbm5lbFN0YXR1cyBUTFYiIDw8IHN0ZDo6ZW5kbDsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICBvZmZzZXQgKz0gYmxvY2suc2l6ZSgpOwotCi0gICAgICAgICAgICBuZmQ6OkNoYW5uZWxTdGF0dXMgY2hhbm5lbFN0YXR1cyhibG9jayk7Ci0KLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiPGNoYW5uZWw+IjsKLQotICAgICAgICAgICAgc3RkOjpzdHJpbmcgbG9jYWxVcmkoY2hhbm5lbFN0YXR1cy5nZXRMb2NhbFVyaS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xpbmNvbWluZ1BhY2tldHM+IjsKLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiPG5JbnRlcmVzdHM+IiAgICAgICA8PCBmYWNlU3RhdHVzLmdldE5JbkludGVyZXN0cygpCi0gICAgICAgICAgICAgICAgICAgICAgPDwgIjwvbkludGVyZXN0cz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8bkRhdGFzPiIgICAgICAgICAgIDw8IGZhY2VTdGF0dXMuZ2V0TkluRGF0YXMoKQotICAgICAgICAgICAgICAgICAgICAgIDw8ICI8L25EYXRhcz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8L2luY29taW5nUGFja2V0cz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8b3V0Z29pbmdQYWNrZXRzPiI7Ci0gICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIjxuSW50ZXJlc3RzPiIgICAgICAgPDwgZmFjZVN0YXR1cy5nZXROT3V0SW50ZXJlc3RzKCkKLSAgICAgICAgICAgICAgICAgICAgICA8PCAiPC9uSW50ZXJlc3RzPiI7Ci0gICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIjxuRGF0YXM+IiAgICAgICAgICAgPDwgZmFjZVN0YXR1cy5nZXROT3V0RGF0YXMoKQotICAgICAgICAgICAgICAgICAgICAgIDw8ICI8L25EYXRhcz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8L291dGdvaW5nUGFja2V0cz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8L3BhY2tldENvdW50ZXJzPiI7Ci0KLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiPGJ5dGVDb3VudGVycz4iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8aW5jb21pbmdCeXRlcz4iICAgIDw8IGZhY2VTdGF0dXMuZ2V0TkluQnl0ZXMoKQotICAgICAgICAgICAgICAgICAgICAgIDw8ICI8L2luY29taW5nQnl0ZXM+IjsKL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A8PCBmYWNlU3RhdHVzLmdldFJlbW90ZVVyaSgpCi0gICAgICAgICAgICAgICAgICAgICAgPDwgIiBsb2NhbD0iIDw8IGZhY2VTdGF0dXMuZ2V0TG9jYWxVcmkoKTsKLSAgICAgICAgICAgIGlmIChmYWNlU3RhdHVzLmhhc0V4cGlyYXRpb25QZXJpb2QoKSkgewotICAgICAgICAgICAgICBzdGQ6OmNvdXQgIDw8ICIgZXhwaXJlcz0iCi0gICAgICAgICAgICAgICAgICAgICAgICAgPDwgdGltZTo6ZHVyYXRpb25fY2FzdDx0aW1lOjpzZWNvbmRzPihmYWNlU3RhdHVzLmdldEV4cGlyYXRpb25QZXJpb2QoKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb3VudCgpIDw8ICJzIjsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiIGNvdW50ZXJzPXsiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgImluPXsiIDw8IGZhY2VTdGF0dXMuZ2V0TkluSW50ZXJlc3RzKCkgPDwgImkgIgotICAgICAgICAgICAgICAgICAgICAgIDw8IGZhY2VTdGF0dXMuZ2V0TkluRGF0YXMoKSA8PCAiZCAiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgZmFjZVN0YXR1cy5nZXROSW5CeXRlcygpIDw8ICJCfSIKLSAgICAgICAgICAgICAgICAgICAgICA8PCAiIG91dD17IiA8PCBmYWNlU3RhdHVzLmdldE5PdXRJbnRlcmVzdHMoKSA8PCAiaSAiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgZmFjZVN0YXR1cy5nZXROT3V0RGF0YXMoKSA8PCAiZCAiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgZmFjZVN0YXR1cy5nZXROT3V0Qnl0ZXMoKSA8PCAiQn0iCi0gICAgICAgICAgICAgICAgICAgICAgPDwgIn0iOwotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICIgIiA8PCBmYWNlU3RhdHV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emUoKSkKLSAgICAgICAgICB7Ci0gICAgICAgICAgICBib29sIG9rID0gQmxvY2s6OmZyb21CdWZmZXIoYnVmLCBvZmZzZXQsIGJsb2NrKTsKLSAgICAgICAgICAgIGlmICghb2spCi0gICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkVSUk9SOiBjYW5ub3QgZGVjb2RlIEZpYkVudHJ5IFRMViIgPDwgc3RkOjplbmRsOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICBvZmZzZXQgKz0gYmxvY2suc2l6ZSgpOwotCi0gICAgICAgICAgICBuZmQ6OkZpYkVudHJ5IGZpYkVudHJ5KGJsb2NrKTsKLQotICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICIgICIgPDwgZmliRW50cnkuZ2V0UHJlZml4KCkgPDwgIiBuZXh0aG9wcz17IjsKLSAgICAgICAgICAgIGZvciAoc3RkOjpsaXN0PG5mZDo6TmV4dEhvcFJlY29yZD46OmNvbnN0X2l0ZXJhdG9yCi0gICAgICAgICAgICAgICAgICAgbmV4dEhvcCA9IGZpYkVudHJ5LmdldE5leHRIb3BSZWNvcmRzKCkuYmVnaW4oKTsKLSAgICAgICAgICAgICAgICAgbmV4dEhvcCAhPSBmaWJFbnRyeS5nZXROZXh0SG9wUmVjb3JkcygpLmVuZCgpOwotICAgICAgICAgICAgICAgICArK25leHRIb3ApCi0gICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBpZiAobmV4dEhvcCAhPSBmaWJFbnRyeS5nZXROZXh0SG9wUmVjb3JkcygpLmJlZ2luKCkpCi0gICAgICAgICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIiwgIjsKLSAgICAgICAgICAgICAgICBzdGQ6OmNvdXQgPDwgImZhY2VpZD0iIDw8IG5leHRIb3AtPmdldEZhY2VJZCgpCi0gICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgKGNvc3Q9IiA8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Dx0aW1lOjpzZWNvbmRzPihuZXh0Um91dGUtPmdldEV4cGlyYXRpb25QZXJpb2QoKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb3VudCgpIDw8ICJTIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICI8L2V4cGlyYXRpb25QZXJpb2Q+IjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICI8L3JvdXRlPiI7Ci0gICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiPC9yb3V0ZXM+IjsKLSAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiPC9yaWJFbnRyeT4iOwotICAgICAgICAgIH0KLQotICAgICAgICBzdGQ6OmNvdXQgPDwgIjwvcmliPiI7Ci0gICAgICB9Ci0gICAgZWxzZQotICAgICAgewotICAgICAgICBzdGQ6OmNvdXQgPDwgIlJJQjoiIDw8IHN0ZDo6ZW5kbDsKLQotICAgICAgICBCbG9jayBibG9jazsKLSAgICAgICAgc2l6ZV90IG9mZnNldCA9IDA7Ci0gICAgICAgIHdoaWxlIChvZmZzZXQgPCBidWYtPnNpemUoKSkKLSAgICAgICAgICB7Ci0gICAgICAgICAgICBib29sIG9rID0gQmxvY2s6OmZyb21CdWZmZXIoYnVmLCBvZmZzZXQsIGJsb2NrKTsKLSAgICAgICAgICAgIGlmICghb2spCi0gICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkVSUk9SOiBjYW5ub3QgZGVjb2RlIFJpYkVudHJ5IFRMViIgPDwgc3RkOjplbmRsOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIG9mZnNldCArPSBibG9jay5zaXplKCk7Ci0KLSAgICAgICAgICAgIG5mZDo6UmliRW50cnkgcmliRW50cnkoYmxvY2spOwotCi0gICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIiAgIiA8PCByaWJFbnRyeS5nZXROYW1lKCkudG9VcmkoKSA8PCAiIHJvdXRlPXsiOwotICAgICAgICAgICAgZm9yIChzdGQ6Omxpc3Q8bmZkOjpSb3V0ZT46OmNvbnN0X2l0ZXJhdG9yCi0gICAgICAgICAgICAgICAgICAgbmV4dFJvdXRlID0gcmliRW50cnkuYmVnaW4oKTsKLSAgICAgICAgICAgICAgICAgbmV4dFJvdXRlICE9IHJpYkVudHJ5LmVuZCgpOwotICAgICAgICAgICAgICAgICArK25leHRSb3V0ZSkKLSAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmIChuZXh0Um91dGUgIT0gcmliRW50cnkuYmVnaW4oKSkKLSAgICAgICAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiLCAiOwotICAgICAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiZmFjZWlkPSIgICA8PCBuZXh0Um91dGUtPmdldEZhY2VJZCgpCi0gICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgKG9yaWdpbj0iICA8PCBuZXh0Um91dGUtPmdldE9yaWdpbigpCi0gICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgY29zdD0iICAgIDw8IG5leHRSb3V0ZS0+Z2V0Q29zdCgpOwotICAgICAgICAgICAgICAgIGlmICghbmV4dFJvdXRlLT5oYXNJbmZpbml0ZUV4cGlyYXRpb25QZXJpb2QoKSkgewotICAgICAgICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICIgZXhwaXJlcz0iCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgdGltZTo6ZHVyYXRpb25fY2FzdDx0aW1lOjpzZWNvbmRzPihuZXh0Um91dGUtPmdldEV4cGlyYXRpb25QZXJpb2QoKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY291bnQoKSA8PCAicyI7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKG5leHRSb3V0ZS0+aXNDa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ZhY2VJZEZldGNoZXIobmRuOjpGYWNlJiBmYWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9sbGVyJiBjb250cm9sbGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFsbG93Q3JlYXRlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBTdWNjZXNzQ2FsbGJhY2smIG9uU3VjY2VlZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmFpbHVyZUNhbGxiYWNrJiBvbkZhaWwpCi0gIDogbV9mYWNlKGZhY2UpCi0gICwgbV9jb250cm9sbGVyKGNvbnRyb2xsZXIpCi0gICwgbV9hbGxvd0NyZWF0ZShhbGxvd0NyZWF0ZSkKLSAgLCBtX29uU3VjY2VlZChvblN1Y2NlZWQpCi0gICwgbV9vbkZhaWwob25GYWlsKQotewotfQotCi12b2lkCi1OZmRjOjpGYWNlSWRGZXRjaGVyOjpzdGFydChuZG46OkZhY2UmIGZhY2UsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9sbGVyJiBjb250cm9sbGVyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGlucHV0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhbGxvd0NyZWF0ZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFN1Y2Nlc3NDYWxsYmFjayYgb25TdWNjZWVkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmFpbHVyZUNhbGxiYWNrJiBvbkZhaWwpCi17Ci0gIC8vIDEuIFRyeSBwYXJzZSBpbnB1dCBhcyBGYWNlSWQsIGlmIGlucHV0IGlzIEZhY2VJZCwgc3VjY2VlZCB3aXRoIHBhcnNlZCBGYWNlSWQKLSAgLy8gMi4gVHJ5IHBhcnNlIGlucHV0IGFzIEZhY2VVcmksI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ICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgZXJyb3IsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgbWVzc2FnZSkKLXsKLSAgc3RkOjpzdHJpbmdzdHJlYW0gc3M7Ci0gIHNzIDw8IG1lc3NhZ2UgPDwgIiA6ICIgPDwgZXJyb3IgPDwgIiAoY29kZSAiIDw8IGNvZGUgPDwgIikiOwotICBmYWlsKHNzLnN0cigpKTsKLX0KLQotdm9pZAotTmZkYzo6RmFjZUlkRmV0Y2hlcjo6c3RhcnRGYWNlQ3JlYXRlKGNvbnN0IG5kbjo6dXRpbDo6RmFjZVVyaSYgY2Fub25pY2FsVXJpKQotewotICBDb250cm9sUGFyYW1ldGVycyBwYXJhbWV0ZXJzOwotICBwYXJhbWV0ZXJzLnNldFVyaShjYW5vbmljYWxVcmkudG9TdHJpbmcoKSk7Ci0KLSAgbV9jb250cm9sbGVyLnN0YXJ0PEZhY2VDcmVhdGVDb21tYW5kPihwYXJhbWV0ZXJzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt0aGlzXSAoY29uc3QgQ29udHJvbFBhcmFtZXRlcnMmIHJlc3VsdCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2VlZChyZXN1bHQuZ2V0RmFjZUlkKCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmRmFjZUlkRmV0Y2hlcjo6b25GYWNlQ3JlYXRlRXJyb3IsIHRoaXMsIF8xLCBfMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGYWNlIGNyZWF0aW9uIGZhaWxlZCIpKTsKLX0KLQotdm9pZAotTmZkYzo6RmFjZUlkRmV0Y2h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FjZUlkRmV0Y2hlcjo6c3RhcnQobV9mYWNlLCBtX2NvbnRyb2xsZXIsIGZhY2VOYW1lLCB0cnVlLAotICAgICAgICAgICAgICAgICAgICAgICBbdGhpc10gKGNvbnN0IHVpbnQzMl90IGZhY2VJZCkgewotICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xQYXJhbWV0ZXJzIHBhcmFtZXRlcnM7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycwotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldE5hbWUobV9uYW1lKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldENvc3QobV9jb3N0KQotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldEZhY2VJZChmYWNlSWQpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAgbV9jb250cm9sbGVyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc3RhcnQ8RmliQWRkTmV4dEhvcENvbW1hbmQ+KHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5leHRob3AgaW5zZXJ0aW9uIHN1Y2NlZWRlZCIpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbkVycm9yLCB0aGlzLCBfMSwgXzIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5leHRob3AgaW5zZXJ0aW9uIGZhaWxlZCIpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgfSwKLSAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25PYnRhaW5GYWNlSWRGYWlsdXJlLCB0aGlzLCBfMSkpOwotfQotCi12b2lkCi1OZmRjOjpmaWJSZW1vdmVOZXh0SG9wKCkKLXsKLSAgbV9uYW1lID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1swXTsKLSAgY29uc3Qgc3RkOjpzdHJpbmcmIGZhY2VOYW1lID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1sxXTsKLQotICBGYWNlSWRGZXRjaGVyOjpzdGFydChtX2ZhY2UsIG1fY29udHJvbGxlciwgZmFjZU5hbWUsIGZhbHNlLAotICAgICAgICAgICAgICAgICAgICAgICBbdGhpc10gKGNvbnN0IHVpbnQzMl90IGZhY2VJZCkgewotICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xQYXJhbWV0ZXJzIHBhcmFtZXRlcnM7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycwotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldE5hbWUobV9uYW1lKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldEZhY2VJZChmYWNlSWQpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAgbV9jb250cm9sbGVyCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc3RhcnQ8RmliUmVtb3ZlTmV4dEhvcENvbW1hbmQ+KHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5leHRob3AgcmVtb3ZhbCBzdWNjZWVkZWQiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25FcnJvciwgdGhpcywgXzEsIF8yLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJOZXh0aG9wIHJlbW92YWwgZmFpbGVkIikpOwotICAgICAgICAgICAgICAgICAgICAgICB9LAotICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbk9idGFpbkZhY2VJZEZhaWx1cmUsIHRoaXMsIF8xKSk7Ci19Ci0KLXZvaWQKLU5mZGM6OnJpYlJlZ2lzdGVyUHJlZml4KCkKLXsKLSAgbV9uYW1lID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1swXTsKLSAgY29uc3Qgc3RkOjpzdHJpbmcmIGZhY2VOYW1lID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1sxXTsKLQotICBGYWNlSWRGZXRjaGVyOjpzdGFydChtX2ZhY2UsIG1fY29udHJvbGxlciwgZmFjZU5hbWUsIHRydWUsCi0gICAgICAgICAgICAgICAgICAgICAgIFt0aGlzXSAoY29uc3QgdWludDMyX3QgZmFjZUlkKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgQ29udHJvbFBhcmFtZXRlcnMgcGFyYW1ldGVyczsKLSAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0TmFtZShtX25hbWUpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0Q29zdChtX2Nvc3QpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0RmxhZ3MobV9mbGFncykKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRPcmlnaW4obV9vcmlnaW4pCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0RmFjZUlkKGZhY2VJZCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobV9leHBpcmVzICE9IERFRkFVTFRfRVhQSVJBVElPTl9QRVJJT0QpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLnNldEV4cGlyYXRpb25QZXJpb2QobV9leHBpcmVzKTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgIG1fY29udHJvbGxlcgotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnN0YXJ0PFJpYlJlZ2lzdGVyQ29tbWFuZD4ocGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJTdWNjZXNzZnVsIGluIG5hbWUgcmVnaXN0cmF0aW9uIiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbkVycm9yLCB0aGlzLCBfMSwgXzIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGYWlsZWQgaW4gbmFtZSByZWdpc3RyYXRpb24iKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgIH0sCi0gICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uT2J0YWluRmFjZUlkRmFpbHVyZSwgdGhpcywgXzEpKTsKLX0KLQotdm9pZAotTmZkYzo6cmliVW5yZWdpc3RlclByZWZpeCgpCi17Ci0gIG1fbmFtZSA9IG1fY29tbWFuZExpbmVBcmd1bWVudHNbMF07Ci0gIGNvbnN0IHN0ZDo6c3RyaW5nJiBmYWNlTmFtZSA9IG1fY29tbWFuZExpbmVBcmd1bWVudHNbMV07Ci0KLSAgRmFjZUlkRmV0Y2hlcjo6c3RhcnQobV9mYWNlLCBtX2NvbnRyb2xsZXIsIGZhY2VOYW1lLCBmYWxzZSwKLSAgICAgICAgICAgICAgICAgICAgICAgW3RoaXNdIChjb25zdCB1aW50MzJfdCBmYWNlSWQpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9sUGFyYW1ldGVycyBwYXJhbWV0ZXJzOwotICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXROYW1lKG1fbmFtZSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRGYWNlSWQoZmFjZUlkKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldE9yaWdpbihtX29yaWdpbik7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgICBtX2NvbnRyb2xsZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zdGFydDxSaWJVbnJlZ2lzdGVyQ29tbWFuZD4ocGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiU3VjY2Vzc2Z1bCBpbiB1bnJlZ2lzdGVyaW5nIG5hbWUiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25FcnJvciwgdGhpcywgXzEsIF8yLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGYWlsZWQgaW4gdW5yZWdpc3RlcmluZyBuYW1lIikpOwotICAgICAgICAgICAgICAgICAgICAgICB9LAotICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbk9idGFpbkZhY2VJZEZhaWx1cmUsIHRoaXMsIF8xKSk7Ci19Ci0KLXZvaWQKLU5mZGM6Om9uQ2Fub25pemVGYWlsdXJlKGNvbnN0IHN0ZDo6c3RyaW5nJiByZWFzb24pCi17Ci0gIHN0ZDo6Y2VyciA8PCByZWFzb24gPDwgc3RkOjplbm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ICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25TdWNjZXNzLCB0aGlzLCBfMSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGYWNlIGNyZWF0aW9uIHN1Y2NlZWRlZCIpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uRXJyb3IsIHRoaXMsIF8xLCBfMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJGYWNlIGNyZWF0aW9uIGZhaWxlZCIpKTsKLX0KLQotdm9pZAotTmZkYzo6ZmFjZURlc3Ryb3koKQotewotICBDb250cm9sUGFyYW1ldGVycyBwYXJhbWV0ZXJzOwotICBjb25zdCBzdGQ6OnN0cmluZyYgZmFjZU5hbWUgPSBtX2NvbW1hbmRMaW5lQXJndW1lbnRzWzBdOwotCi0gIEZhY2VJZEZldGNoZXI6OnN0YXJ0KG1fZmFjZSwgbV9jb250cm9sbGVyLCBmYWNlTmFtZSwgZmFsc2UsCi0gICAgICAgICAgICAgICAgICAgICAgIFt0aGlzXSAoY29uc3QgdWludDMyX3QgZmFjZUlkKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgQ29udHJvbFBhcmFtZXRlcnMgZmFjZVBhcmFtZXRlcnM7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgZmFjZVBhcmFtZXRlcnMuc2V0RmFjZUlkKGZhY2VJZCk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgICBtX2NvbnRyb2xsZXIuc3RhcnQ8RmFjZURlc3Ryb3lDb21tYW5kPihmYWNlUGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkZhY2UgZGVzdHJveSBzdWNjZWVkZWQiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbkVycm9yLCB0aGlzLCBfMSwgXzIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRmFjZSBkZXN0cm95IGZhaWxlZCIpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgfSwKLSAgICAgICAgICAgICAgICAgICAgICAgYmluZCgmTmZkYzo6b25PYnRhaW5GYWNlSWRGYWlsdXJlLCB0aGlzLCBfMSkpOwotfQotCi12b2lkCi1OZmRjOjpzdHJhdGVneUNob2ljZVNldCgpCi17Ci0gIGNvbnN0IHN0ZDo6c3RyaW5nJiBuYW1lID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1swXTsKLSAgY29uc3Qgc3RkOjpzdHJpbmcmIHN0cmF0ZWd5ID0gbV9jb21tYW5kTGluZUFyZ3VtZW50c1sxXTsKLQotICBDb250cm9sUGFyYW1ldGVycyBwYXJhbWV0ZXJzOwotICBwYXJhbWV0ZXJzCi0gICAgLnNldE5hbWUobmFtZSkKLSAgICAuc2V0U3RyYXRlZ3koc3RyYXRlZ3kpOwotCi0gIG1fY29udHJvbGxlci5zdGFydDxTdHJhdGVneUNob2ljZVNldENvbW1hbmQ+KHBhcmFtZXRlcnMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uU3VjY2VzcywgdGhpcywgXzEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlN1Y2Nlc3NmdWxseSBzZXQgc3RyYXRlZ3kgY2hvaWNlIiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbmQoJk5mZGM6Om9uRXJyb3IsIHRoaXMsIF8xLCBfMiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRmFpbGVkIHRvIHNldCBzdHJhdGVneSBjaG9pY2UiKSk7Ci19Ci0KLXZvaWQKLU5mZGM6OnN0cmF0ZWd5Q2hvaWNlVW5zZXQoKQotewotICBjb25zdCBzdGQ6OnN0cmluZyYgbmFtZSA9IG1fY29tbWFuZExpbmVBcmd1bWVudHNbMF07Ci0KLSAgQ29udHJvbFBhcmFtZXRlcnMgcGFyYW1ldGVyczsKLSAgcGFyYW1ldGVycy5zZXROYW1lKG5hbWUpOwotCi0gIG1fY29udHJvbGxlci5zdGFydDxTdHJhdGVneUNob2ljZVVuc2V0Q29tbWFuZD4ocGFyYW1ldGVycywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvblN1Y2Nlc3MsIHRoaXMsIF8xLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlN1Y2Nlc3NmdWxseSB1bnNldCBzdHJhdGVneSBjaG9pY2UiKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kKCZOZmRjOjpvbkVycm9yLCB0aGlzLCBfMSwgXzIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRmFpbGVkIHRvIHVuc2V0IHN0cmF0ZWd5IGNob2ljZSIpKTsKLX0KLQotdm9pZAotTmZkYzo6b25TdWNjZXNzKGNvbnN0IENvbnRyb2xQYXJhbWV0ZXJzJiBjb21tYW5kU3VjY2Vzc1Jlc3VsdCwgY29uc3Qgc3RkOjpzdHJpbmcmIG1lc3NhZ2UpCi17Ci0gIHN0ZDo6Y291dCA8PCBtZXNzYWdlIDw8ICI6ICIgPDwgY29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pZiB3OiByZXR1cm4gdwotCi0JI3VucGFjawotCXVucGFja193YWZkaXIoZGlyLCBzcmMpCi0JcmV0dXJuIGRpcgotCi13YWZkaXIgPSBmaW5kX2xpYigpCi1zeXMucGF0aC5pbnNlcnQoMCwgd2FmZGlyKQotCi1pZiBfX25hbWVfXyA9PSAnX19tYWluX18nOgotCi0JZnJvbSB3YWZsaWIgaW1wb3J0IFNjcmlwdGluZwotCVNjcmlwdGluZy53YWZfZW50cnlfcG9pbnQoY3dkLCBWRVJTSU9OLCB3YWZkaXIpCi0KLSM9PT4KLSNCWmg5MUFZJlNZnclMdAMi7////7wCQH///////////////5CGBqKmeIASgSMpASEyBIRYYelc93isHCMpIykjKSMpIykjKSMpIykjKSMpIykjKSMpIykjKSMpIykjKSMpL7r61T1b3Xt7ntLhr1q7beXLs105eZtvjzPPWh7du73191PS+zVLbbu299eeo9804NZM1ZdzDqpfXi9e3CYu622YfSvcZSMpOnp7t6Htqh7sHPe67FVnrZU6dtppPnvXjZjXzd7nwe8+alds+vvt98aGu7d93Xe99nD0A1nbxt7a7sc+769tvAXYdiy2dcgjKSMpIy4jKSMpeewjKYPJbIAjyCgGAU3b3sKcwBdZxmDLJ0Zd22e57qGgB7YGg1zqtiMuBgFC7akSoUkFIynXQ3YWZhQokqoSAlJd7dJPY0FUlAKUlQUVUVrJSSMuN6Btg8ttqunt3Dx69469W3bOFuzqBaxkFbZo0k0SeVUsaqZ6Uy8e3b17d999O33butx7GXz7n17WWX1rvO2O8zda9rNO7LtbVvNu32K+93OtG69XDtu2aOQjKVKmxqgQIy+ignskkFGHlZuZ3LuvM8aAIymhe3ezFR0ltmSJa3vbvdtwAaAkBARVUAHeZ7uaXVtprY6Zvbonudrtzt7wyd63h1u9bvfd5tu3zt9ZVUiSOmxW1u3UmpjXbfLdb207Z3Bzszodyd8e9U9rbK7143jfe9z32rXe3vVYWmPKntzXpryNSkAjL1Um+948mTX19vO9PVCuk9u9w45vs77ydn171ndc53vb3u11Pemvve81Pvd3s9cdvtZp2wd7uq1nurve7H3r3AtvSh3t4q55nu3Fdju3kevbNve8avaqtKW8dbbO7b6qlUKSbjdu733Nc7Pvnu9de+fd2e9JXt7OPtnj5ds0uLfdo120d3bZXcue7ja95129d9MwAXpPnvN7zPZvg9uDdNzTgFACoVCglAvYd2ayabtyjrYjL7l1tJznH0bm+R09HfbyPLqXVfO955Xb0qU4razBpRGXtsZKj74stt58c980UFPfXOhUIymH3s3u5X3d3ne+PvvbXOB4777u8XudRL3YW66PutOb7221HW93Ym6jGg8CIy82z16Xu7XZyauByb2+73VX0V97rvM+9vEyfevh9IAD1evvru9Xr1HXu9A99m+pX327sHq1u2pbfWjt7ue993327d0ut7rc91vHdw+udbe032w2ted3OeF7W05Pctm15O+2qtI29hdu5lBPrNOVLBrrfXg+JoMJ00PqvDUfW4y02NX3bPOee97B8KIHQGnxIy46+aadfXN7uD7KdudO3vZzm9Mem8Vbn3Gcq98SbW73d73Z9fVp8843vSffWH33u0G3XAOlBssppQyi+x3tb31i+fdUifW9gAHFhCn1oe4PtgPI6CmlAbMl2rPe87uwDzZO7neerGm8+1vvvOAyBQdCzVQrZyH3sOPlC9OHt6x27nc0PS5zm6Vzb7qPWd3W3em9tCiqSL124naLtyqd2febmhPs59PdrKuvc3usrvse2e93d6++9d47Xxzr306lX3q3Zufe2vduqU6cnTve3eRTvYrTqtXpXr7eMt12e97tyfea++xLUW1cryO9et3k3YPqGvi0JTRCIykgASMpBCMpEaAIyaNAIykmjUwmpp6po08oGg9Q0xNND1PQ1BKaBBECAhMImmmQKYEnpo01GKNNqek9IaeoaHqBoeojKSMpIykjKSMpCQSIggIjKSJiEzIjalT8p7VTzRPSmepplHpG1PKPUyAaB6gjKcgGgCMpIylJ6pSSCapqflQfqj2lNqemoaepo9IjKRkaIykaIykjKSMpPUABkCMpIykjKQIUkQIjKYGgEaaaTRojKU0CYE0mGk9MkJ5Rsp6TaQ9QIykjKRkjKRoBJqIggIAjQCaZNCAR6VP1T2im1I9lEe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bm90IG9zLmVudmlyb24uaGFzX2tleSgnUEtHX0NPTkZJR19QQVRIJyk6Ci0gICAgICAgIG9zLmVudmlyb25bJ1BLR19DT05GSUdfUEFUSCddID0gJzonLmpvaW4oWwotICAgICAgICAgICAgJy91c3IvbG9jYWwvbGliL3BrZ2NvbmZpZycsCi0gICAgICAgICAgICAnL29wdC9sb2NhbC9saWIvcGtnY29uZmlnJ10pCi0gICAgY29uZi5jaGVja19jZmcocGFja2FnZT0nbGlibmRuLWN4eCcsIGFyZ3M9WyctLWNmbGFncycsICctLWxpYnMnXSwKLSAgICAgICAgICAgICAgICAgICB1c2VsaWJfc3RvcmU9J05ETl9DWFgnLCBtYW5kYXRvcnk9VHJ1ZSkKLQotICAgIGNvbmYuY2hlY2tEZXBlbmRlbmN5KG5hbWU9J2xpYnJ0JywgbGliPSdydCcsIG1hbmRhdG9yeT1GYWxzZSkKLSAgICBjb25mLmNoZWNrRGVwZW5kZW5jeShuYW1lPSdsaWJyZXNvbHYnLCBsaWI9J3Jlc29sdicsIG1hbmRhdG9yeT1GYWxzZSkKLQotICAgIGJvb3N0X2xpYnMgPSAnc3lzdGVtIGNocm9ubyBwcm9ncmFtX29wdGlvbnMgcmFuZG9tJwotICAgIGlmIGNvbmYub3B0aW9ucy53aXRoX3Rlc3RzOgotICAgICAgICBjb25mLmVudlsnV0lUSF9URVNUUyddID0gMQotICAgICAgICBjb25mLmRlZmluZSgnV0lUSF9URVNUUycsIDEpOwotICAgICAgICBib29zdF9saWJzICs9ICcgdW5pdF90ZXN0X2ZyYW1ld29yaycKLQotICAgIGlmIGNvbmYub3B0aW9ucy53aXRoX290aGVyX3Rlc3RzOgotICAgICAgICBjb25mLmVudlsnV0lUSF9PVEhFUl9URVNUUyddID0gMQotCi0gICAgY29uZi5jaGVja19ib29zdChsaWI9Ym9vc3RfbGlicykKLSAgICBpZiBjb25mLmVudi5CT09TVF9WRVJTSU9OX05VTUJFUiA8IDEwNDgwMDoKLSAgICAgICAgTG9ncy5l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NJT04sCi0gICAgICAgIFZFUlNJT049aW50KFZFUlNJT05fU1BMSVRbMF0pICogMTAwMDAwMCArCi0gICAgICAgICAgICAgICAgaW50KFZFUlNJT05fU1BMSVRbMV0pICogMTAwMCArCi0gICAgICAgICAgICAgICAgaW50KFZFUlNJT05fU1BMSVRbMl0pLAotICAgICAgICBWRVJTSU9OX01BSk9SPVZFUlNJT05fU1BMSVRbMF0sCi0gICAgICAgIFZFUlNJT05fTUlOT1I9VkVSU0lPTl9TUExJVFsxXSwKLSAgICAgICAgVkVSU0lPTl9QQVRDSD1WRVJTSU9OX1NQTElUWzJdLAotICAgICAgICApCi0KLSAgICBjb3JlID0gYmxkKAotICAgICAgICB0YXJnZXQ9J2NvcmUtb2JqZWN0cycsCi0gICAgICAgIG5hbWU9J2NvcmUtb2JqZWN0cycsCi0gICAgICAgIGZlYXR1cmVzPSdjeHggcGNoJywKLSAgICAgICAgc291cmNlPWJsZC5wYXRoLmFudF9nbG9iKFsnY29yZS8qKi8qLmNwcCddKSwKLSAgICAgICAgdXNlPSd2ZXJzaW9uIEJPT1NUIE5ETl9DWFggTElCUlQnLAotICAgICAgICBpbmNsdWRlcz0nLiBjb3JlJywKLSAgICAgICAgZXhwb3J0X2luY2x1ZGVzPScuIGNvcmUnLAotICAgICAgICBoZWFkZXJzPSdjb21tb24uaHBwJywKLSAgICAgICAgKQotCi0gICAgbmZkX29iamVjdHMgPSBibGQoCi0gICAgICAgIHRhcmdldD0nZGFlbW9uLW9iamVjdHMnLAotICAgICAgICBuYW1lPSdkYWVtb24tb2JqZWN0cycsCi0gICAgICAgIGZlYXR1cmVzPSdjeHgnLAotICAgICAgICBzb3VyY2U9YmxkLnBhdGguYW50X2dsb2IoWydkYWVtb24vKiovKi5jcHAnXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4Y2w9WydkYWVtb24vZmFjZS9ldGhlcm5ldC0qLmNwcCcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGFlbW9uL2ZhY2UvdW5peC0qLmNwcCcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGFlbW9uL2ZhY2Uvd2Vic29ja2V0LSouY3BwJywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkYWVtb24vbWFpbi5jcHAnXSksCi0gICAgICAgIHVzZT0nY29yZS1vYmplY3RzIFdFQlNPQ0tFVCcsCi0gICAgICAgIGluY2x1ZGVzPSdkYWVtb24nLAotICAgICAgICBleHBvcnRfaW5jbHVkZXM9J2RhZW1vbicsCi0gICAgICAgICkKLQotICAgIGlmIGJsZC5lbnZbJ0hBVkVfTElCUENBUCddOgotICAgICAgICBuZmRfb2JqZWN0cy5zb3VyY2UgKz0gYmxkLnBhdGguYW50X2dsb2IoJ2RhZW1vbi9mYWNlL2V0aGVybmV0LSouY3BwJykKLSAgICAgICAgbmZkX29iamVjdHMudXNlICs9ICcgTElCUENBUCcKLQotICAgIGlmIGJsZC5lbnZbJ0hBVkVfVU5JWF9TT0NLRVRTJ106Ci0gICAgICAgIG5mZF9vYmplY3RzLnNvdXJjZSArPSBibGQucGF0aC5hbnRfZ2xvYignZGFlbW9uL2ZhY2UvdW5peC0qLmNwcCcpCi0KLSAgICBpZiBibGQuZW52WydIQVZFX1dFQlNPQ0tFVCddOgotICAgICAgICBuZmRfb2JqZWN0cy5zb3VyY2UgKz0gYmxkLnBhdGguYW50X2dsb2IoJ2RhZW1vbi9mYWNlL3dlYnNvY2tldC0qLmNwcCcpCi0KLSAgICBibGQodGFyZ2V0PSdiaW4vbmZkJywKLSAgICAgICAgZmVhdHVyZXM9J2N4eCBjeHhwcm9ncmFtJywKLSAgICAgICAgc291cmNlPSdkYWVtb24vbWFpbi5jcHAnLAotICAgICAgICB1c2U9J2RhZW1vbi1vYmplY3RzJywKLSAgICAgICAgKQotCi0gICAgcmliX29iamVjdHMgPSBibGQoCi0gICAgICAgIHRhcmdldD0ncmliLW9iamVjdHMnLAotICAgICAgICBuYW1lPSdyaWItb2JqZWN0cycsCi0gICAgICAgIGZlYXR1cmVzPSdjeHgnLAotICAgICAgICBzb3VyY2U9YmxkLnBhdGguYW50X2dsb2IoWydyaWIvKiovKi5jcHAnXSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4Y2w9WydyaWIvbWFpbi5jcHAnXSksCi0gICAgICAgIHVzZT0nY29yZS1vYmplY3RzJywKLSAgICAgICAgKQotCi0gICAgYmxkKHRhcmdldD0nYmluL25yZCcsCi0gICAgICAgIGZlYXR1cmVzPSdjeHggY3h4cHJvZ3JhbScsCi0gICAgICAgIHNvdXJjZT0ncmliL21haW4uY3BwJywKLSAgICAgICAgdXNlPSdyaWItb2JqZWN0cycsCi0gICAgICAgICkKLQotICAgIGZvciBhcHAgaW4gYmxkLnBhdGguYW50X2dsb2IoJ3Rvb2xzLyouY3BwJyk6Ci0gICAgICAgIGJsZChmZWF0dXJlcz1bJ2N4eCcsICdjeHhwcm9ncmFtJ10sCi0gICAgICAgICAgICB0YXJnZXQ9J2Jpbi8lcycgJSAoc3RyKGFwcC5jaGFuZ2VfZXh0KCcnKSkpLAotICAgICAgICAgICAgc291cmNlPVsndG9vbHMvJXMnICUgKHN0cihhcHApKV0sCi0gICAgICAgICAgICB1c2U9J2NvcmUtb2JqZWN0cyBMSUJSRVNPTFYnLAotICAgICAgICAgICAgKQotCi0gICAgYmxkLnJlY3Vyc2UoInRlc3RzIikKLQotICAgIGJsZChmZWF0dXJlcz0ic3Vic3QiLAotICAgICAgICBzb3VyY2U9J25mZC5jb25mLnNhbXBsZS5pbicsCi0gICAgICAgIHRhcmdldD0nbmZkLmNvbmYuc2FtcGxlJywKLSAgICAgICAgaW5zdGFsbF9wYXRoPSIke1NZU0NPTkZESVJ9L25kbiIsCi0gICAgICAgIElGX0hBVkVfTElCUENBUD0iIiBpZiBibGQuZW52WydIQVZFX0xJQlBDQVAnXSBlbHNlICI7ICIsCi0gICAgICAg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